From e5d2973973018d92d92563c47d2017ec3d68e9ed Mon Sep 17 00:00:00 2001 From: Andrea Amorese Date: Tue, 10 Aug 2021 12:39:22 +0200 Subject: [PATCH] Built motion from commit c2e747ee.|2.5.32 --- apidoc/api_project.js | 2 +- apidoc/api_project.json | 2 +- public/index.html | 2 +- public/styles/app.287b5956.css | 1 - public/styles/app.ea7a1be4.css | 1 + 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 +- 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/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 +- .../api/cloudProvider/cloudProvider.attributes.js | 2 +- .../api/cloudProvider/cloudProvider.controller.js | 2 +- server/api/cloudProvider/cloudProvider.model.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 +- .../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 +- .../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 +- 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.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/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 +- 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/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 +- 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/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/integrations/configuration.js | 2 +- server/components/interaction/service.js | 2 +- server/components/license/service.js | 2 +- server/components/parsers/advancedSearch.js | 2 +- server/components/parsers/qs.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/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/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/graph/index.js | 2 +- server/services/agi/index.js | 2 +- server/services/agi/mailRpc/index.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/action.js | 2 +- server/services/ami/dialer/agentComplete.js | 2 +- server/services/ami/dialer/final.js | 2 +- server/services/ami/dialer/hangup.js | 2 +- server/services/ami/dialer/history.js | 2 +- server/services/ami/dialer/index.js | 2 +- server/services/ami/dialer/queueCallerAbandon.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/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/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/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/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/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 +- 1148 files changed, 1147 insertions(+), 1147 deletions(-) delete mode 100644 public/styles/app.287b5956.css create mode 100644 public/styles/app.ea7a1be4.css diff --git a/apidoc/api_project.js b/apidoc/api_project.js index d382e90..4f9675c 100644 --- a/apidoc/api_project.js +++ b/apidoc/api_project.js @@ -17,7 +17,7 @@ define({ "apidoc": "0.3.0", "generator": { "name": "apidoc", - "time": "2021-08-10T09:52:16.292Z", + "time": "2021-08-10T10:26:04.798Z", "url": "http://apidocjs.com", "version": "0.24.0" } diff --git a/apidoc/api_project.json b/apidoc/api_project.json index 29a0ed5..928d7d4 100644 --- a/apidoc/api_project.json +++ b/apidoc/api_project.json @@ -17,7 +17,7 @@ "apidoc": "0.3.0", "generator": { "name": "apidoc", - "time": "2021-08-10T09:52:16.292Z", + "time": "2021-08-10T10:26:04.798Z", "url": "http://apidocjs.com", "version": "0.24.0" } diff --git a/public/index.html b/public/index.html index c96e76b..84da41a 100644 --- a/public/index.html +++ b/public/index.html @@ -16,7 +16,7 @@ - + diff --git a/public/styles/app.287b5956.css b/public/styles/app.287b5956.css deleted file mode 100644 index 66d9e12..0000000 --- a/public/styles/app.287b5956.css +++ /dev/null @@ -1 +0,0 @@ -[data-ng-click],[ng-click],[x-ng-click]{cursor:pointer}.ms-container{width:100%!important}.ms-container .ms-list{height:380px!important}.ms-container .ms-selectable li.ms-elem-selectable,.ms-container .ms-selection li.ms-elem-selection{padding:6px 12px!important;height:34px!important}md-input-container:not(.md-input-has-value) input:not(:focus){color:inherit!important}.ms-container .ms-search{height:34px;margin-bottom:5px;border:solid 1px #e5e5e5;background-color:#fff;box-shadow:none;width:100%;padding-left:6px}.ms-container .ms-footer{text-align:center}.no-border{border:none!important}.left .motion-spinner{border-top-color:#00d7cc!important;border-left-color:#00d7cc!important}.right .motion-spinner{border-top-color:#00d7cc!important;border-right-color:#00d7cc!important}.md-option-info-text{font-size:10px}md-pagination-wrapper{width:auto!important}md-autocomplete.no-container-margin md-autocomplete-wrap md-input-container{margin:0!important}md-dialog.report-selection-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}md-dialog.advanced-search-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}.md-dialog-action-center{justify-content:center!important}.flag-24{height:24px}button.auto-width{min-width:auto!important}button.size-8{transform:scale(.8)}md-icon.auto-size{height:auto!important;width:auto!important}md-switch.auto-height{height:auto!important}.hidden{visibility:hidden}.user-profile-section-help{background:#fcf20f0f;border:1px solid rgba(0,0,0,.12);padding:5px}.email-preview-message{display:-webkit-box;margin:0 auto;display:block;height:200px;line-height:1.4;-webkit-line-clamp:10;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;word-break:break-all}button.advanced-search.md-accent-bg.md-button.md-default-theme:not([disabled]).md-icon-button:hover{background-color:#0091ea}.blink{animation:blink 2s ease-in infinite}.no-click{pointer-events:none}.spinner-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2;background:rgba(43,43,43,.5)}ms-quick-filter[disabled]{pointer-events:none;opacity:.7}ms-search-bar[disabled]{pointer-events:none;opacity:.7}@keyframes blink{from,to{opacity:1}50%{opacity:0}}textarea.api-key-area{background:0 0;resize:none}.badge{min-width:20px;height:20px;line-height:20px;padding:0 7px;font-size:11px;font-weight:700;border-radius:20px;transition:opacity .2s ease-in-out .1s}md-tooltip.multiline div.md-content{height:auto!important}.auto-margin{margin:auto}md-menu-item md-menu.no-margin button{display:inline-block;border-radius:0;margin:auto 0;font-size:15px;text-transform:none;font-weight:400;height:100%;padding-left:16px;padding-right:16px;width:100%}md-date-range md-menu span.md-select-value{border-bottom-color:rgba(0,0,0,.12)}.keep-on-top{z-index:9999!important}.margin-auto{margin:auto}.xenialab-violet-light-bg{background-color:#9c4fd3!important}.xenialab-violet-light-fg{color:#9c4fd3!important}.no-margin-top{margin-top:0!important}.no-margin-bottom{margin-bottom:0!important}.disabled-button{display:inline-block;position:relative;cursor:default;min-height:36px;min-width:88px;line-height:36px;vertical-align:middle;align-items:center;text-align:center;border-radius:3px;box-sizing:border-box;user-select:none;outline:0;border:0;padding:0 6px;margin:6px 8px;background:rgba(0,0,0,.12);color:rgba(0,0,0,.38);white-space:nowrap;text-transform:uppercase;font-weight:500;font-size:14px;font-style:inherit;font-variant:inherit;font-family:inherit;text-decoration:none;overflow:hidden}@supports (-ms-ime-align:auto){md-tabs{display:inline!important}}@supports (-ms-accelerator:true){md-tabs{display:inline!important}}@supports (-moz-transform:translate(0,0)){md-tabs{display:inline!important}}body[dir=rtl] table.md-table td.md-cell,body[dir=rtl] table.md-table th.md-column{text-align:right!important}body[dir=rtl] table.md-table td.md-cell md-checkbox,body[dir=rtl] table.md-table th.md-column md-checkbox{margin-right:12px!important}body[dir=rtl] .ms-navigation .ms-navigation-node .ms-navigation-item>.ms-navigation-button .icon{margin:0 0 0 16px!important}body[dir=rtl] .ms-navigation .ms-navigation-node .ms-navigation-item>a.ms-navigation-button{padding-right:45px}body[dir=rtl] .md-table-pagination>.buttons{direction:ltr}body[dir=rtl] .md-table-pagination>.buttons>.label{direction:rtl}body[dir=rtl] .header .logo .logo-icon{margin:5px 0 0 15px!important}body[dir=rtl] md-switch .md-container{margin-right:inherit!important}body,html{height:100%;position:relative}body{margin:0;padding:0}[tabindex='-1']:focus{outline:0}.inset{padding:10px}a.md-no-style,button.md-no-style{font-weight:400;background-color:inherit;text-align:left;border:none;padding:0;margin:0}button,input,select,textarea{vertical-align:baseline}button,html input[type=button],input[type=reset],input[type=submit]{cursor:pointer;-webkit-appearance:button}button[disabled],html input[type=button][disabled],input[type=reset][disabled],input[type=submit][disabled]{cursor:default}textarea{vertical-align:top;overflow:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box;-webkit-box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}input:-webkit-autofill{text-shadow:none}.md-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;text-transform:none;width:1px}.md-shadow{position:absolute;top:0;left:0;bottom:0;right:0;border-radius:inherit;pointer-events:none}.md-shadow-bottom-z-1{box-shadow:0 2px 5px 0 rgba(0,0,0,.26)}.md-shadow-bottom-z-2{box-shadow:0 4px 8px 0 rgba(0,0,0,.4)}.md-shadow-animated.md-shadow{transition:box-shadow .28s cubic-bezier(.4,0,.2,1)}.md-ripple-container{pointer-events:none;position:absolute;overflow:hidden;left:0;top:0;width:100%;height:100%;transition:all .55s cubic-bezier(.25,.8,.25,1)}.md-ripple{position:absolute;transform:translate(-50%,-50%) scale(0);transform-origin:50% 50%;opacity:0;border-radius:50%}.md-ripple.md-ripple-placed{transition:margin .9s cubic-bezier(.25,.8,.25,1),border .9s cubic-bezier(.25,.8,.25,1),width .9s cubic-bezier(.25,.8,.25,1),height .9s cubic-bezier(.25,.8,.25,1),opacity .9s cubic-bezier(.25,.8,.25,1),transform .9s cubic-bezier(.25,.8,.25,1)}.md-ripple.md-ripple-scaled{transform:translate(-50%,-50%) scale(1)}.md-ripple.md-ripple-active,.md-ripple.md-ripple-full,.md-ripple.md-ripple-visible{opacity:.2}.md-ripple.md-ripple-remove{animation:md-remove-ripple .9s cubic-bezier(.25,.8,.25,1)}@keyframes md-remove-ripple{0%{opacity:.15}100%{opacity:0}}.md-padding{padding:8px}.md-margin{margin:8px}.md-scroll-mask{position:absolute;background-color:transparent;top:0;right:0;bottom:0;left:0;z-index:50}.md-scroll-mask>.md-scroll-mask-bar{display:block;position:absolute;background-color:#fafafa;right:0;top:0;bottom:0;z-index:65;box-shadow:inset 0 0 1px rgba(0,0,0,.3)}.md-no-momentum{-webkit-overflow-scrolling:auto}.md-no-flicker{-webkit-filter:blur(0)}@media (min-width:960px){.md-padding{padding:16px}}body[dir=ltr],body[dir=rtl],html[dir=ltr],html[dir=rtl]{unicode-bidi:embed}bdo[dir=rtl]{direction:rtl;unicode-bidi:bidi-override}bdo[dir=ltr]{direction:ltr;unicode-bidi:bidi-override}body,html{-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;min-height:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.md-display-4{font-size:112px;font-weight:300;letter-spacing:-.010em;line-height:112px}.md-display-3{font-size:56px;font-weight:400;letter-spacing:-.005em;line-height:56px}.md-display-2{font-size:45px;font-weight:400;line-height:64px}.md-display-1{font-size:34px;font-weight:400;line-height:40px}.md-headline{font-size:24px;font-weight:400;line-height:32px}.md-title{font-size:20px;font-weight:500;letter-spacing:.005em}.md-subhead{font-size:16px;font-weight:400;letter-spacing:.010em;line-height:24px}.md-body-1{font-size:14px;font-weight:400;letter-spacing:.010em;line-height:20px}.md-body-2{font-size:14px;font-weight:500;letter-spacing:.010em;line-height:24px}.md-caption{font-size:12px;letter-spacing:.020em}.md-button{letter-spacing:.010em}button,html,input,select,textarea{font-family:Roboto,"Helvetica Neue",sans-serif}button,input,select,textarea{font-size:100%}@keyframes md-autocomplete-list-out{0%{animation-timing-function:linear}50%{opacity:0;height:40px;animation-timing-function:ease-in}100%{height:0;opacity:0}}@keyframes md-autocomplete-list-in{0%{opacity:0;height:0;animation-timing-function:ease-out}50%{opacity:0;height:40px}100%{opacity:1;height:40px}}md-autocomplete{border-radius:2px;display:block;height:40px;position:relative;overflow:visible;min-width:190px}md-autocomplete[disabled] input{cursor:default}md-autocomplete[md-floating-label]{border-radius:0;background:0 0;height:auto}md-autocomplete[md-floating-label] md-input-container{padding-bottom:0}md-autocomplete[md-floating-label] md-autocomplete-wrap{height:auto}md-autocomplete[md-floating-label] button{position:absolute;top:auto;bottom:0;right:0;width:30px;height:30px}md-autocomplete md-autocomplete-wrap{display:flex;flex-direction:row;box-sizing:border-box;position:relative;overflow:visible;height:40px}md-autocomplete md-autocomplete-wrap.md-menu-showing{z-index:51}md-autocomplete md-autocomplete-wrap input,md-autocomplete md-autocomplete-wrap md-input-container{flex:1 1 0%;box-sizing:border-box;min-width:0}md-autocomplete md-autocomplete-wrap md-progress-linear{position:absolute;bottom:-2px;left:0}md-autocomplete md-autocomplete-wrap md-progress-linear.md-inline{bottom:40px;right:2px;left:2px;width:auto}md-autocomplete md-autocomplete-wrap md-progress-linear .md-mode-indeterminate{position:absolute;top:0;left:0;width:100%;height:3px;transition:none}md-autocomplete md-autocomplete-wrap md-progress-linear .md-mode-indeterminate .md-container{transition:none;height:3px}md-autocomplete md-autocomplete-wrap md-progress-linear .md-mode-indeterminate.ng-enter{transition:opacity .15s linear}md-autocomplete md-autocomplete-wrap md-progress-linear .md-mode-indeterminate.ng-enter.ng-enter-active{opacity:1}md-autocomplete md-autocomplete-wrap md-progress-linear .md-mode-indeterminate.ng-leave{transition:opacity .15s linear}md-autocomplete md-autocomplete-wrap md-progress-linear .md-mode-indeterminate.ng-leave.ng-leave-active{opacity:0}md-autocomplete input:not(.md-input){font-size:14px;box-sizing:border-box;border:none;box-shadow:none;outline:0;background:0 0;width:100%;padding:0 15px;line-height:40px;height:40px}md-autocomplete input:not(.md-input)::-ms-clear{display:none}md-autocomplete button{position:relative;line-height:20px;text-align:center;width:30px;height:30px;cursor:pointer;border:none;border-radius:50%;padding:0;font-size:12px;background:0 0;margin:auto 5px}md-autocomplete button:after{content:'';position:absolute;top:-6px;right:-6px;bottom:-6px;left:-6px;border-radius:50%;transform:scale(0);opacity:0;transition:all .4s cubic-bezier(.25,.8,.25,1)}md-autocomplete button:focus{outline:0}md-autocomplete button:focus:after{transform:scale(1);opacity:1}md-autocomplete button md-icon{position:absolute;top:50%;left:50%;transform:translate3d(-50%,-50%,0) scale(.9)}md-autocomplete button md-icon path{stroke-width:0}md-autocomplete button.ng-enter{transform:scale(0);transition:transform .15s ease-out}md-autocomplete button.ng-enter.ng-enter-active{transform:scale(1)}md-autocomplete button.ng-leave{transition:transform .15s ease-out}md-autocomplete button.ng-leave.ng-leave-active{transform:scale(0)}@media screen and (-ms-high-contrast:active){md-autocomplete input{border:1px solid #fff}md-autocomplete li:focus{color:#fff}}.md-virtual-repeat-container.md-autocomplete-suggestions-container{position:absolute;box-shadow:0 2px 5px rgba(0,0,0,.25);height:225.5px;max-height:225.5px;z-index:100}.md-virtual-repeat-container.md-not-found{height:48px}.md-autocomplete-suggestions{margin:0;list-style:none;padding:0}.md-autocomplete-suggestions li{font-size:14px;overflow:hidden;padding:0 15px;line-height:48px;height:48px;transition:background .15s linear;margin:0;white-space:nowrap;text-overflow:ellipsis}.md-autocomplete-suggestions li:focus{outline:0}.md-autocomplete-suggestions li:not(.md-not-found-wrapper){cursor:pointer}@media screen and (-ms-high-contrast:active){.md-autocomplete-suggestions,md-autocomplete{border:1px solid #fff}}md-backdrop{transition:opacity 450ms;position:absolute;top:0;bottom:0;left:0;right:0;z-index:50}md-backdrop.md-menu-backdrop{position:fixed!important;z-index:99}md-backdrop.md-select-backdrop{z-index:81;transition-duration:0}md-backdrop.md-dialog-backdrop{z-index:79}md-backdrop.md-bottom-sheet-backdrop{z-index:69}md-backdrop.md-sidenav-backdrop{z-index:59}md-backdrop.md-click-catcher{position:absolute}md-backdrop.md-opaque{opacity:.48}md-backdrop.md-opaque.ng-enter{opacity:0}md-backdrop.md-opaque.ng-enter.md-opaque.ng-enter-active{opacity:.48}md-backdrop.md-opaque.ng-leave{opacity:.48;transition:opacity .4s}md-backdrop.md-opaque.ng-leave.md-opaque.ng-leave-active{opacity:0}md-bottom-sheet{position:absolute;left:0;right:0;bottom:0;padding:8px 16px 88px 16px;z-index:70;border-top-width:1px;border-top-style:solid;transform:translate3d(0,80px,0);transition:all .4s cubic-bezier(.25,.8,.25,1);transition-property:transform}md-bottom-sheet.md-has-header{padding-top:0}md-bottom-sheet.ng-enter{opacity:0;transform:translate3d(0,100%,0)}md-bottom-sheet.ng-enter-active{opacity:1;display:block;transform:translate3d(0,80px,0)!important}md-bottom-sheet.ng-leave-active{transform:translate3d(0,100%,0)!important;transition:all .3s cubic-bezier(.55,0,.55,.2)}md-bottom-sheet .md-subheader{background-color:transparent;font-family:Roboto,"Helvetica Neue",sans-serif;line-height:56px;padding:0;white-space:nowrap}md-bottom-sheet md-inline-icon{display:inline-block;height:24px;width:24px;fill:#444}md-bottom-sheet md-list-item{display:flex;outline:0}md-bottom-sheet md-list-item:hover{cursor:pointer}md-bottom-sheet.md-list md-list-item{padding:0;align-items:center;height:48px}md-bottom-sheet.md-grid{padding-left:24px;padding-right:24px;padding-top:0}md-bottom-sheet.md-grid md-list{display:flex;flex-direction:row;flex-wrap:wrap;transition:all .5s;align-items:center}md-bottom-sheet.md-grid md-list-item{flex-direction:column;align-items:center;transition:all .5s;height:96px;margin-top:8px;margin-bottom:8px}@media (max-width:960px){md-bottom-sheet.md-grid md-list-item{flex:1 1 33.3333333333%;max-width:33.3333333333%}md-bottom-sheet.md-grid md-list-item:nth-of-type(3n+1){align-items:flex-start}md-bottom-sheet.md-grid md-list-item:nth-of-type(3n){align-items:flex-end}}@media (min-width:960px) and (max-width:1279px){md-bottom-sheet.md-grid md-list-item{flex:1 1 25%;max-width:25%}}@media (min-width:1280px) and (max-width:1919px){md-bottom-sheet.md-grid md-list-item{flex:1 1 16.6666666667%;max-width:16.6666666667%}}@media (min-width:1920px){md-bottom-sheet.md-grid md-list-item{flex:1 1 14.2857142857%;max-width:14.2857142857%}}md-bottom-sheet.md-grid md-list-item::before{display:none}md-bottom-sheet.md-grid md-list-item .md-list-item-content{display:flex;flex-direction:column;align-items:center;width:48px;padding-bottom:16px}md-bottom-sheet.md-grid md-list-item .md-grid-item-content{border:1px solid transparent;display:flex;flex-direction:column;align-items:center;width:80px}md-bottom-sheet.md-grid md-list-item .md-grid-text{font-weight:400;line-height:16px;font-size:13px;margin:0;white-space:nowrap;width:64px;text-align:center;text-transform:none;padding-top:8px}@media screen and (-ms-high-contrast:active){md-bottom-sheet{border:1px solid #fff}}button.md-button::-moz-focus-inner{border:0}.md-button{display:inline-block;position:relative;cursor:pointer;min-height:36px;min-width:88px;line-height:36px;vertical-align:middle;align-items:center;text-align:center;border-radius:3px;box-sizing:border-box;user-select:none;outline:0;border:0;padding:0 6px;margin:6px 8px;background:0 0;color:currentColor;white-space:nowrap;text-transform:uppercase;font-weight:500;font-size:14px;font-style:inherit;font-variant:inherit;font-family:inherit;text-decoration:none;overflow:hidden;transition:box-shadow .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1)}.md-button:focus{outline:0}.md-button:focus,.md-button:hover{text-decoration:none}.md-button.ng-hide,.md-button.ng-leave{transition:none}.md-button.md-cornered{border-radius:0}.md-button.md-icon{padding:0;background:0 0}.md-button.md-raised:not([disabled]){box-shadow:0 2px 5px 0 rgba(0,0,0,.26)}.md-button.md-icon-button{margin:0 6px;height:40px;min-width:0;line-height:24px;padding:8px;width:40px;border-radius:50%}.md-button.md-icon-button .md-ripple-container{border-radius:50%;background-clip:padding-box;overflow:hidden;-webkit-mask-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC)}.md-button.md-fab{z-index:20;line-height:56px;min-width:0;width:56px;height:56px;vertical-align:middle;box-shadow:0 2px 5px 0 rgba(0,0,0,.26);border-radius:50%;background-clip:padding-box;overflow:hidden;transition:all .3s cubic-bezier(.55,0,.55,.2);transition-property:background-color,box-shadow,transform}.md-button.md-fab.md-fab-bottom-right{top:auto;right:20px;bottom:20px;left:auto;position:absolute}.md-button.md-fab.md-fab-bottom-left{top:auto;right:auto;bottom:20px;left:20px;position:absolute}.md-button.md-fab.md-fab-top-right{top:20px;right:20px;bottom:auto;left:auto;position:absolute}.md-button.md-fab.md-fab-top-left{top:20px;right:auto;bottom:auto;left:20px;position:absolute}.md-button.md-fab .md-ripple-container{border-radius:50%;background-clip:padding-box;overflow:hidden;-webkit-mask-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC)}.md-button.md-fab.md-mini{line-height:40px;width:40px;height:40px}.md-button.md-fab.ng-hide,.md-button.md-fab.ng-leave{transition:none}.md-button:not([disabled]).md-fab.md-focused,.md-button:not([disabled]).md-raised.md-focused{box-shadow:0 2px 5px 0 rgba(0,0,0,.26)}.md-button:not([disabled]).md-fab:active,.md-button:not([disabled]).md-raised:active{box-shadow:0 4px 8px 0 rgba(0,0,0,.4)}.md-button .md-ripple-container{border-radius:3px;background-clip:padding-box;overflow:hidden;-webkit-mask-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC)}.md-button.md-icon-button md-icon,button.md-button.md-fab md-icon{display:block}.md-toast-open-top .md-button.md-fab-top-left,.md-toast-open-top .md-button.md-fab-top-right{transition:all .4s cubic-bezier(.25,.8,.25,1);transform:translate3d(0,42px,0)}.md-toast-open-top .md-button.md-fab-top-left:not([disabled]).md-focused,.md-toast-open-top .md-button.md-fab-top-left:not([disabled]):hover,.md-toast-open-top .md-button.md-fab-top-right:not([disabled]).md-focused,.md-toast-open-top .md-button.md-fab-top-right:not([disabled]):hover{transform:translate3d(0,41px,0)}.md-toast-open-bottom .md-button.md-fab-bottom-left,.md-toast-open-bottom .md-button.md-fab-bottom-right{transition:all .4s cubic-bezier(.25,.8,.25,1);transform:translate3d(0,-42px,0)}.md-toast-open-bottom .md-button.md-fab-bottom-left:not([disabled]).md-focused,.md-toast-open-bottom .md-button.md-fab-bottom-left:not([disabled]):hover,.md-toast-open-bottom .md-button.md-fab-bottom-right:not([disabled]).md-focused,.md-toast-open-bottom .md-button.md-fab-bottom-right:not([disabled]):hover{transform:translate3d(0,-43px,0)}.md-button-group{display:flex;flex:1;width:100%}.md-button-group>.md-button{flex:1;display:block;overflow:hidden;width:0;border-width:1px 0 1px 1px;border-radius:0;text-align:center;text-overflow:ellipsis;white-space:nowrap}.md-button-group>.md-button:first-child{border-radius:2px 0 0 2px}.md-button-group>.md-button:last-child{border-right-width:1px;border-radius:0 2px 2px 0}@media screen and (-ms-high-contrast:active){.md-button.md-fab,.md-button.md-raised{border:1px solid #fff}}md-card{box-sizing:border-box;display:flex;flex-direction:column;margin:8px;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}md-card md-card-header{padding:16px;display:flex;flex-direction:row}md-card md-card-header:first-child md-card-avatar{margin-right:12px}[dir=rtl] md-card md-card-header:first-child md-card-avatar{margin-right:auto;margin-left:12px}md-card md-card-header:last-child md-card-avatar{margin-left:12px}[dir=rtl] md-card md-card-header:last-child md-card-avatar{margin-left:auto;margin-right:12px}md-card md-card-header md-card-avatar{width:40px;height:40px}md-card md-card-header md-card-avatar .md-user-avatar,md-card md-card-header md-card-avatar md-icon{border-radius:50%}md-card md-card-header md-card-avatar md-icon{padding:8px}md-card md-card-header md-card-avatar+md-card-header-text{max-height:40px}md-card md-card-header md-card-avatar+md-card-header-text .md-title{font-size:14px}md-card md-card-header md-card-header-text{display:flex;flex:1;flex-direction:column}md-card md-card-header md-card-header-text .md-subhead{font-size:14px}md-card md-card-title-media img,md-card>img,md-card>md-card-header img{box-sizing:border-box;display:flex;flex:0 0 auto;width:100%;height:auto}md-card md-card-title{padding:24px 16px 16px;display:flex;flex:1 1 auto;flex-direction:row}md-card md-card-title+md-card-content{padding-top:0}md-card md-card-title md-card-title-text{flex:1;flex-direction:column;display:flex}md-card md-card-title md-card-title-text .md-subhead{padding-top:0;font-size:14px}md-card md-card-title md-card-title-text:only-child .md-subhead{padding-top:12px}md-card md-card-title md-card-title-media{margin-top:-8px}md-card md-card-title md-card-title-media .md-media-sm{height:80px;width:80px}md-card md-card-title md-card-title-media .md-media-md{height:112px;width:112px}md-card md-card-title md-card-title-media .md-media-lg{height:152px;width:152px}md-card md-card-content{display:block;padding:16px}md-card md-card-content>p:first-child{margin-top:0}md-card md-card-content>p:last-child{margin-bottom:0}md-card md-card-content .md-media-xl{height:240px;width:240px}md-card .md-actions,md-card md-card-actions{margin:8px}md-card .md-actions.layout-column .md-button:not(.md-icon-button),md-card md-card-actions.layout-column .md-button:not(.md-icon-button){margin:2px 0}md-card .md-actions.layout-column .md-button:not(.md-icon-button):first-of-type,md-card md-card-actions.layout-column .md-button:not(.md-icon-button):first-of-type{margin-top:0}md-card .md-actions.layout-column .md-button:not(.md-icon-button):last-of-type,md-card md-card-actions.layout-column .md-button:not(.md-icon-button):last-of-type{margin-bottom:0}md-card .md-actions.layout-column .md-button.md-icon-button,md-card md-card-actions.layout-column .md-button.md-icon-button{margin-top:6px;margin-bottom:6px}md-card .md-actions md-card-icon-actions,md-card md-card-actions md-card-icon-actions{flex:1;justify-content:flex-start;display:flex;flex-direction:row}md-card .md-actions:not(.layout-column) .md-button:not(.md-icon-button),md-card md-card-actions:not(.layout-column) .md-button:not(.md-icon-button){margin:0 4px}md-card .md-actions:not(.layout-column) .md-button:not(.md-icon-button):first-of-type,md-card md-card-actions:not(.layout-column) .md-button:not(.md-icon-button):first-of-type{margin-left:0}[dir=rtl] md-card .md-actions:not(.layout-column) .md-button:not(.md-icon-button):first-of-type,[dir=rtl] md-card md-card-actions:not(.layout-column) .md-button:not(.md-icon-button):first-of-type{margin-left:auto;margin-right:0}md-card .md-actions:not(.layout-column) .md-button:not(.md-icon-button):last-of-type,md-card md-card-actions:not(.layout-column) .md-button:not(.md-icon-button):last-of-type{margin-right:0}[dir=rtl] md-card .md-actions:not(.layout-column) .md-button:not(.md-icon-button):last-of-type,[dir=rtl] md-card md-card-actions:not(.layout-column) .md-button:not(.md-icon-button):last-of-type{margin-right:auto;margin-left:0}md-card .md-actions:not(.layout-column) .md-button.md-icon-button,md-card md-card-actions:not(.layout-column) .md-button.md-icon-button{margin-left:6px;margin-right:6px}md-card .md-actions:not(.layout-column) .md-button.md-icon-button:first-of-type,md-card md-card-actions:not(.layout-column) .md-button.md-icon-button:first-of-type{margin-left:12px}[dir=rtl] md-card .md-actions:not(.layout-column) .md-button.md-icon-button:first-of-type,[dir=rtl] md-card md-card-actions:not(.layout-column) .md-button.md-icon-button:first-of-type{margin-left:auto;margin-right:12px}md-card .md-actions:not(.layout-column) .md-button.md-icon-button:last-of-type,md-card md-card-actions:not(.layout-column) .md-button.md-icon-button:last-of-type{margin-right:12px}[dir=rtl] md-card .md-actions:not(.layout-column) .md-button.md-icon-button:last-of-type,[dir=rtl] md-card md-card-actions:not(.layout-column) .md-button.md-icon-button:last-of-type{margin-right:auto;margin-left:12px}md-card .md-actions:not(.layout-column) .md-button+md-card-icon-actions,md-card md-card-actions:not(.layout-column) .md-button+md-card-icon-actions{flex:1;justify-content:flex-end;display:flex;flex-direction:row}md-card md-card-footer{margin-top:auto;padding:16px}@media screen and (-ms-high-contrast:active){md-card{border:1px solid #fff}}.md-image-no-fill>img{width:auto;height:auto}.md-contact-chips .md-chips md-chip{padding:0 25px 0 0}[dir=rtl] .md-contact-chips .md-chips md-chip{padding:0 0 0 25px}.md-contact-chips .md-chips md-chip .md-contact-avatar{float:left}[dir=rtl] .md-contact-chips .md-chips md-chip .md-contact-avatar{float:right}.md-contact-chips .md-chips md-chip .md-contact-avatar img{height:32px;border-radius:16px}.md-contact-chips .md-chips md-chip .md-contact-name{display:inline-block;height:32px;margin-left:8px}[dir=rtl] .md-contact-chips .md-chips md-chip .md-contact-name{margin-left:auto;margin-right:8px}.md-contact-suggestion{height:56px}.md-contact-suggestion img{height:40px;border-radius:20px;margin-top:8px}.md-contact-suggestion .md-contact-name{margin-left:8px;width:120px}[dir=rtl] .md-contact-suggestion .md-contact-name{margin-left:auto;margin-right:8px}.md-contact-suggestion .md-contact-email,.md-contact-suggestion .md-contact-name{display:inline-block;overflow:hidden;text-overflow:ellipsis}.md-contact-chips-suggestions li{height:100%}.md-chips{display:block;font-family:Roboto,"Helvetica Neue",sans-serif;font-size:16px;padding:0 0 8px 3px;vertical-align:middle}.md-chips:after{content:'';display:table;clear:both}[dir=rtl] .md-chips{padding:0 3px 8px 0}.md-chips.md-readonly .md-chip-input-container{min-height:32px}.md-chips:not(.md-readonly){cursor:text}.md-chips.md-removable md-chip{padding-right:22px}[dir=rtl] .md-chips.md-removable md-chip{padding-right:0;padding-left:22px}.md-chips.md-removable md-chip .md-chip-content{padding-right:4px}[dir=rtl] .md-chips.md-removable md-chip .md-chip-content{padding-right:0;padding-left:4px}.md-chips md-chip{cursor:default;border-radius:16px;display:block;height:32px;line-height:32px;margin:8px 8px 0 0;padding:0 12px 0 12px;float:left;box-sizing:border-box;max-width:100%;position:relative}[dir=rtl] .md-chips md-chip{margin:8px 0 0 8px}[dir=rtl] .md-chips md-chip{float:right}.md-chips md-chip .md-chip-content{display:block;float:left;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}[dir=rtl] .md-chips md-chip .md-chip-content{float:right}.md-chips md-chip .md-chip-content:focus{outline:0}.md-chips md-chip._md-chip-content-edit-is-enabled{-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;-ms-user-select:none}.md-chips md-chip .md-chip-remove-container{position:absolute;right:0;line-height:22px}[dir=rtl] .md-chips md-chip .md-chip-remove-container{right:auto;left:0}.md-chips md-chip .md-chip-remove{text-align:center;width:32px;height:32px;min-width:0;padding:0;background:0 0;border:none;box-shadow:none;margin:0;position:relative}.md-chips md-chip .md-chip-remove md-icon{height:18px;width:18px;position:absolute;top:50%;left:50%;transform:translate3d(-50%,-50%,0)}.md-chips .md-chip-input-container{display:block;line-height:32px;margin:8px 8px 0 0;padding:0;float:left}[dir=rtl] .md-chips .md-chip-input-container{margin:8px 0 0 8px}[dir=rtl] .md-chips .md-chip-input-container{float:right}.md-chips .md-chip-input-container input:not([type]),.md-chips .md-chip-input-container input[type=email],.md-chips .md-chip-input-container input[type=number],.md-chips .md-chip-input-container input[type=tel],.md-chips .md-chip-input-container input[type=text],.md-chips .md-chip-input-container input[type=url]{border:0;height:32px;line-height:32px;padding:0}.md-chips .md-chip-input-container input:not([type]):focus,.md-chips .md-chip-input-container input[type=email]:focus,.md-chips .md-chip-input-container input[type=number]:focus,.md-chips .md-chip-input-container input[type=tel]:focus,.md-chips .md-chip-input-container input[type=text]:focus,.md-chips .md-chip-input-container input[type=url]:focus{outline:0}.md-chips .md-chip-input-container md-autocomplete,.md-chips .md-chip-input-container md-autocomplete-wrap{background:0 0;height:32px}.md-chips .md-chip-input-container md-autocomplete md-autocomplete-wrap{box-shadow:none}.md-chips .md-chip-input-container md-autocomplete input{position:relative}.md-chips .md-chip-input-container input{border:0;height:32px;line-height:32px;padding:0}.md-chips .md-chip-input-container input:focus{outline:0}.md-chips .md-chip-input-container md-autocomplete,.md-chips .md-chip-input-container md-autocomplete-wrap{height:32px}.md-chips .md-chip-input-container md-autocomplete{box-shadow:none}.md-chips .md-chip-input-container md-autocomplete input{position:relative}.md-chips .md-chip-input-container:not(:first-child){margin:8px 8px 0 0}[dir=rtl] .md-chips .md-chip-input-container:not(:first-child){margin:8px 0 0 8px}.md-chips .md-chip-input-container input{background:0 0;border-width:0}.md-chips md-autocomplete button{display:none}@media screen and (-ms-high-contrast:active){.md-chip-input-container,md-chip{border:1px solid #fff}.md-chip-input-container md-autocomplete{border:none}}.md-inline-form md-checkbox{margin:19px 0 18px}md-checkbox{box-sizing:border-box;display:inline-block;margin-bottom:16px;white-space:nowrap;cursor:pointer;outline:0;user-select:none;position:relative;min-width:20px;min-height:20px;margin-left:0;margin-right:16px}[dir=rtl] md-checkbox{margin-left:16px}[dir=rtl] md-checkbox{margin-right:0}md-checkbox:last-of-type{margin-left:0;margin-right:0}md-checkbox.md-focused:not([disabled]) .md-container:before{left:-8px;top:-8px;right:-8px;bottom:-8px}md-checkbox.md-focused:not([disabled]):not(.md-checked) .md-container:before{background-color:rgba(0,0,0,.12)}md-checkbox.md-align-top-left>div.md-container{top:12px}md-checkbox .md-container{position:absolute;top:50%;transform:translateY(-50%);box-sizing:border-box;display:inline-block;width:20px;height:20px;left:0;right:auto}[dir=rtl] md-checkbox .md-container{left:auto}[dir=rtl] md-checkbox .md-container{right:0}md-checkbox .md-container:before{box-sizing:border-box;background-color:transparent;border-radius:50%;content:'';position:absolute;display:block;height:auto;left:0;top:0;right:0;bottom:0;transition:all .5s;width:auto}md-checkbox .md-container:after{box-sizing:border-box;content:'';position:absolute;top:-10px;right:-10px;bottom:-10px;left:-10px}md-checkbox .md-container .md-ripple-container{position:absolute;display:block;width:auto;height:auto;left:-15px;top:-15px;right:-15px;bottom:-15px}md-checkbox .md-icon{box-sizing:border-box;transition:240ms;position:absolute;top:0;left:0;width:20px;height:20px;border-width:2px;border-style:solid;border-radius:2px}md-checkbox.md-checked .md-icon{border-color:transparent}md-checkbox.md-checked .md-icon:after{box-sizing:border-box;transform:rotate(45deg);position:absolute;left:4.6666666667px;top:.2222222222px;display:table;width:6.6666666667px;height:13.3333333333px;border-width:2px;border-style:solid;border-top:0;border-left:0;content:''}md-checkbox[disabled]{cursor:default}md-checkbox.md-indeterminate .md-icon:after{box-sizing:border-box;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:table;width:12px;height:2px;border-width:2px;border-style:solid;border-top:0;border-left:0;content:''}md-checkbox .md-label{box-sizing:border-box;position:relative;display:inline-block;vertical-align:middle;white-space:normal;user-select:text;margin-left:30px;margin-right:0}[dir=rtl] md-checkbox .md-label{margin-left:0}[dir=rtl] md-checkbox .md-label{margin-right:30px}md-content{display:block;position:relative;overflow:auto;-webkit-overflow-scrolling:touch}md-content[md-scroll-y]{overflow-y:auto;overflow-x:hidden}md-content[md-scroll-x]{overflow-x:auto;overflow-y:hidden}@media print{md-content{overflow:visible!important}}md-calendar{font-size:13px;user-select:none}.md-calendar-scroll-mask{display:inline-block;overflow:hidden;height:308px}.md-calendar-scroll-mask .md-virtual-repeat-scroller{overflow-y:scroll;-webkit-overflow-scrolling:touch}.md-calendar-scroll-mask .md-virtual-repeat-scroller::-webkit-scrollbar{display:none}.md-calendar-scroll-mask .md-virtual-repeat-offsetter{width:100%}.md-calendar-scroll-container{box-shadow:inset -3px 3px 6px rgba(0,0,0,.2);display:inline-block;height:308px;width:346px}.md-calendar-date{height:44px;width:44px;text-align:center;padding:0;border:none;box-sizing:content-box}.md-calendar-date:first-child{padding-left:16px}[dir=rtl] .md-calendar-date:first-child{padding-left:0;padding-right:16px}.md-calendar-date:last-child{padding-right:16px}[dir=rtl] .md-calendar-date:last-child{padding-right:0;padding-left:16px}.md-calendar-date.md-calendar-date-disabled{cursor:default}.md-calendar-date-selection-indicator{transition:background-color,color .4s cubic-bezier(.25,.8,.25,1);border-radius:50%;display:inline-block;width:40px;height:40px;line-height:40px}.md-calendar-date:not(.md-disabled) .md-calendar-date-selection-indicator{cursor:pointer}.md-calendar-month-label{height:44px;font-size:14px;font-weight:500;padding:0 0 0 24px}[dir=rtl] .md-calendar-month-label{padding:0 24px 0 0}md-calendar-month .md-calendar-month-label:not(.md-calendar-month-label-disabled){cursor:pointer}.md-calendar-month-label md-icon{transform:rotate(180deg)}[dir=rtl] .md-calendar-month-label md-icon{transform:none}.md-calendar-month-label span{vertical-align:middle}.md-calendar-day-header{table-layout:fixed;border-spacing:0;border-collapse:collapse}.md-calendar-day-header th{height:40px;width:44px;text-align:center;padding:0;border:none;box-sizing:content-box;font-weight:400}.md-calendar-day-header th:first-child{padding-left:16px}[dir=rtl] .md-calendar-day-header th:first-child{padding-left:0;padding-right:16px}.md-calendar-day-header th:last-child{padding-right:16px}[dir=rtl] .md-calendar-day-header th:last-child{padding-right:0;padding-left:16px}.md-calendar{table-layout:fixed;border-spacing:0;border-collapse:collapse}.md-calendar tr:last-child td{border-bottom-width:1px;border-bottom-style:solid}.md-calendar:first-child{border-top:1px solid transparent}.md-calendar tbody,.md-calendar td,.md-calendar tr{vertical-align:middle;box-sizing:content-box}md-datepicker{white-space:nowrap;overflow:hidden;padding-right:18px;margin-right:-18px;vertical-align:middle}[dir=rtl] md-datepicker{padding-right:0;padding-left:18px}[dir=rtl] md-datepicker{margin-right:auto;margin-left:-18px}.md-inline-form md-datepicker{margin-top:12px}.md-datepicker-button{display:inline-block;box-sizing:border-box;background:0 0;vertical-align:middle;position:relative}.md-datepicker-button:before{top:0;left:0;bottom:0;right:0;position:absolute;content:'';speak:none}.md-datepicker-input{font-size:14px;box-sizing:border-box;border:none;box-shadow:none;outline:0;background:0 0;min-width:120px;max-width:328px;padding:0 0 5px}.md-datepicker-input::-ms-clear{display:none}._md-datepicker-floating-label>md-datepicker{overflow:visible}._md-datepicker-floating-label>md-datepicker .md-datepicker-input-container{border:none}._md-datepicker-floating-label>md-datepicker .md-datepicker-button{float:left;margin-top:-2.5px}[dir=rtl] ._md-datepicker-floating-label>md-datepicker .md-datepicker-button{float:right}._md-datepicker-floating-label._md-datepicker-has-calendar-icon>label:not(.md-no-float):not(.md-container-ignore){right:18px;left:auto;width:calc(100% - 84px)}[dir=rtl] ._md-datepicker-floating-label._md-datepicker-has-calendar-icon>label:not(.md-no-float):not(.md-container-ignore){right:auto}[dir=rtl] ._md-datepicker-floating-label._md-datepicker-has-calendar-icon>label:not(.md-no-float):not(.md-container-ignore){left:18px}._md-datepicker-floating-label._md-datepicker-has-calendar-icon .md-input-message-animation{margin-left:64px}[dir=rtl] ._md-datepicker-floating-label._md-datepicker-has-calendar-icon .md-input-message-animation{margin-left:auto;margin-right:64px}.md-datepicker-input-container{position:relative;border-bottom-width:1px;border-bottom-style:solid;display:inline-block;width:auto}.md-icon-button+.md-datepicker-input-container{margin-left:12px}[dir=rtl] .md-icon-button+.md-datepicker-input-container{margin-left:auto;margin-right:12px}.md-datepicker-input-container.md-datepicker-focused{border-bottom-width:2px}.md-datepicker-is-showing .md-scroll-mask{z-index:99}.md-datepicker-calendar-pane{position:absolute;top:0;left:-100%;z-index:100;border-width:1px;border-style:solid;background:0 0;transform:scale(0);transform-origin:0 0;transition:transform .2s cubic-bezier(.25,.8,.25,1)}.md-datepicker-calendar-pane.md-pane-open{transform:scale(1)}.md-datepicker-input-mask{height:40px;width:340px;position:relative;overflow:hidden;background:0 0;pointer-events:none;cursor:text}.md-datepicker-calendar{opacity:0;transition:opacity .2s cubic-bezier(.5,0,.25,1)}.md-pane-open .md-datepicker-calendar{opacity:1}.md-datepicker-calendar md-calendar:focus{outline:0}.md-datepicker-expand-triangle{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid}.md-datepicker-triangle-button{position:absolute;right:0;top:5px;transform:translateY(-25%) translateX(45%)}[dir=rtl] .md-datepicker-triangle-button{right:auto;left:0}[dir=rtl] .md-datepicker-triangle-button{transform:translateY(-25%) translateX(-45%)}.md-datepicker-triangle-button.md-button.md-icon-button{height:36px;width:36px;position:absolute;padding:8px}md-datepicker[disabled] .md-datepicker-input-container{border-bottom-color:transparent}md-datepicker[disabled] .md-datepicker-triangle-button{display:none}.md-datepicker-open{overflow:hidden}.md-datepicker-open .md-datepicker-input-container,.md-datepicker-open input.md-input{border-bottom-color:transparent}.md-datepicker-open .md-datepicker-triangle-button,.md-datepicker-open.md-input-has-placeholder>label,.md-datepicker-open.md-input-has-value>label{display:none}.md-datepicker-pos-adjusted .md-datepicker-input-mask{display:none}.md-datepicker-calendar-pane .md-calendar{transform:translateY(-85px);transition:transform .65s cubic-bezier(.25,.8,.25,1);transition-delay:125ms}.md-datepicker-calendar-pane.md-pane-open .md-calendar{transform:translateY(0)}.md-dialog-is-showing{max-height:100%}.md-dialog-container{display:flex;justify-content:center;align-items:center;position:absolute;top:0;left:0;width:100%;height:100%;z-index:80;overflow:hidden}md-dialog{opacity:0;min-width:240px;max-width:80%;max-height:80%;position:relative;overflow:auto;box-shadow:0 7px 8px -4px rgba(0,0,0,.2),0 13px 19px 2px rgba(0,0,0,.14),0 5px 24px 4px rgba(0,0,0,.12);display:flex;flex-direction:column}md-dialog.md-transition-in{opacity:1;transition:all .4s cubic-bezier(.25,.8,.25,1);transform:translate(0,0) scale(1)}md-dialog.md-transition-out{opacity:0;transition:all .4s cubic-bezier(.25,.8,.25,1);transform:translate(0,100%) scale(.2)}md-dialog>form{display:flex;flex-direction:column;overflow:auto}md-dialog .md-dialog-content{padding:24px}md-dialog md-dialog-content{order:1;flex-direction:column;overflow:auto;-webkit-overflow-scrolling:touch}md-dialog md-dialog-content:not([layout=row])>:first-child:not(.md-subheader){margin-top:0}md-dialog md-dialog-content:focus{outline:0}md-dialog md-dialog-content .md-subheader{margin:0}md-dialog md-dialog-content .md-dialog-content-body{width:100%}md-dialog md-dialog-content .md-prompt-input-container{width:100%;box-sizing:border-box}md-dialog .md-actions,md-dialog md-dialog-actions{display:flex;order:2;box-sizing:border-box;align-items:center;justify-content:flex-end;margin-bottom:0;padding-right:8px;padding-left:16px;min-height:52px;overflow:hidden}[dir=rtl] md-dialog .md-actions,[dir=rtl] md-dialog md-dialog-actions{padding-right:16px}[dir=rtl] md-dialog .md-actions,[dir=rtl] md-dialog md-dialog-actions{padding-left:8px}md-dialog .md-actions .md-button,md-dialog md-dialog-actions .md-button{margin-bottom:8px;margin-left:8px;margin-right:0;margin-top:8px}[dir=rtl] md-dialog .md-actions .md-button,[dir=rtl] md-dialog md-dialog-actions .md-button{margin-left:0}[dir=rtl] md-dialog .md-actions .md-button,[dir=rtl] md-dialog md-dialog-actions .md-button{margin-right:8px}md-dialog.md-content-overflow .md-actions,md-dialog.md-content-overflow md-dialog-actions{border-top-width:1px;border-top-style:solid}@media screen and (-ms-high-contrast:active){md-dialog{border:1px solid #fff}}@media (max-width:959px){md-dialog.md-dialog-fullscreen{min-height:100%;min-width:100%;border-radius:0}}md-divider{display:block;border-top-width:1px;border-top-style:solid;margin:0}md-divider[md-inset]{margin-left:80px}[dir=rtl] md-divider[md-inset]{margin-left:auto;margin-right:80px}.layout-gt-lg-row>md-divider,.layout-gt-md-row>md-divider,.layout-gt-sm-row>md-divider,.layout-gt-xs-row>md-divider,.layout-lg-row>md-divider,.layout-md-row>md-divider,.layout-row>md-divider,.layout-sm-row>md-divider,.layout-xl-row>md-divider,.layout-xs-row>md-divider{border-top-width:0;border-right-width:1px;border-right-style:solid}md-fab-speed-dial{position:relative;display:flex;align-items:center;z-index:20}md-fab-speed-dial.md-fab-bottom-right{top:auto;right:20px;bottom:20px;left:auto;position:absolute}md-fab-speed-dial.md-fab-bottom-left{top:auto;right:auto;bottom:20px;left:20px;position:absolute}md-fab-speed-dial.md-fab-top-right{top:20px;right:20px;bottom:auto;left:auto;position:absolute}md-fab-speed-dial.md-fab-top-left{top:20px;right:auto;bottom:auto;left:20px;position:absolute}md-fab-speed-dial:not(.md-hover-full){pointer-events:none}md-fab-speed-dial:not(.md-hover-full) .md-fab-action-item,md-fab-speed-dial:not(.md-hover-full) md-fab-trigger{pointer-events:auto}md-fab-speed-dial:not(.md-hover-full).md-is-open{pointer-events:auto}md-fab-speed-dial ._md-css-variables{z-index:20}md-fab-speed-dial.md-is-open .md-fab-action-item{align-items:center}md-fab-speed-dial md-fab-actions{display:flex;height:auto}md-fab-speed-dial md-fab-actions .md-fab-action-item{transition:all .3s cubic-bezier(.55,0,.55,.2)}md-fab-speed-dial.md-down{flex-direction:column}md-fab-speed-dial.md-down md-fab-trigger{order:1}md-fab-speed-dial.md-down md-fab-actions{flex-direction:column;order:2}md-fab-speed-dial.md-up{flex-direction:column}md-fab-speed-dial.md-up md-fab-trigger{order:2}md-fab-speed-dial.md-up md-fab-actions{flex-direction:column-reverse;order:1}md-fab-speed-dial.md-left{flex-direction:row}md-fab-speed-dial.md-left md-fab-trigger{order:2}md-fab-speed-dial.md-left md-fab-actions{flex-direction:row-reverse;order:1}md-fab-speed-dial.md-left md-fab-actions .md-fab-action-item{transition:all .3s cubic-bezier(.55,0,.55,.2)}md-fab-speed-dial.md-right{flex-direction:row}md-fab-speed-dial.md-right md-fab-trigger{order:1}md-fab-speed-dial.md-right md-fab-actions{flex-direction:row;order:2}md-fab-speed-dial.md-right md-fab-actions .md-fab-action-item{transition:all .3s cubic-bezier(.55,0,.55,.2)}md-fab-speed-dial.md-fling-remove .md-fab-action-item>*,md-fab-speed-dial.md-scale-remove .md-fab-action-item>*{visibility:hidden}md-fab-speed-dial.md-fling .md-fab-action-item{opacity:1}md-fab-speed-dial.md-fling.md-animations-waiting .md-fab-action-item{opacity:0;transition-duration:0s}md-fab-speed-dial.md-scale .md-fab-action-item{transform:scale(0);transition:all .3s cubic-bezier(.55,0,.55,.2);transition-duration:.1428571429s}md-fab-toolbar{display:block}md-fab-toolbar.md-fab-bottom-right{top:auto;right:20px;bottom:20px;left:auto;position:absolute}md-fab-toolbar.md-fab-bottom-left{top:auto;right:auto;bottom:20px;left:20px;position:absolute}md-fab-toolbar.md-fab-top-right{top:20px;right:20px;bottom:auto;left:auto;position:absolute}md-fab-toolbar.md-fab-top-left{top:20px;right:auto;bottom:auto;left:20px;position:absolute}md-fab-toolbar .md-fab-toolbar-wrapper{display:block;position:relative;overflow:hidden;height:68px}md-fab-toolbar md-fab-trigger{position:absolute;z-index:20}md-fab-toolbar md-fab-trigger button{overflow:visible!important}md-fab-toolbar md-fab-trigger .md-fab-toolbar-background{display:block;position:absolute;z-index:21;opacity:1;transition:all .3s cubic-bezier(.55,0,.55,.2)}md-fab-toolbar md-fab-trigger md-icon{position:relative;z-index:22;opacity:1;transition:all .2s ease-in}md-fab-toolbar.md-left md-fab-trigger{right:0}[dir=rtl] md-fab-toolbar.md-left md-fab-trigger{right:auto;left:0}md-fab-toolbar.md-left .md-toolbar-tools{flex-direction:row-reverse}md-fab-toolbar.md-left .md-toolbar-tools>.md-button:first-child{margin-right:.6rem}[dir=rtl] md-fab-toolbar.md-left .md-toolbar-tools>.md-button:first-child{margin-right:auto;margin-left:.6rem}md-fab-toolbar.md-left .md-toolbar-tools>.md-button:first-child{margin-left:-.8rem}[dir=rtl] md-fab-toolbar.md-left .md-toolbar-tools>.md-button:first-child{margin-left:auto;margin-right:-.8rem}md-fab-toolbar.md-left .md-toolbar-tools>.md-button:last-child{margin-right:8px}[dir=rtl] md-fab-toolbar.md-left .md-toolbar-tools>.md-button:last-child{margin-right:auto;margin-left:8px}md-fab-toolbar.md-right md-fab-trigger{left:0}[dir=rtl] md-fab-toolbar.md-right md-fab-trigger{left:auto;right:0}md-fab-toolbar.md-right .md-toolbar-tools{flex-direction:row}md-fab-toolbar md-toolbar{background-color:transparent!important;pointer-events:none;z-index:23}md-fab-toolbar md-toolbar .md-toolbar-tools{padding:0 20px;margin-top:3px}md-fab-toolbar md-toolbar .md-fab-action-item{opacity:0;transform:scale(0);transition:all .3s cubic-bezier(.55,0,.55,.2);transition-duration:.15s}md-fab-toolbar.md-is-open md-fab-trigger>button{box-shadow:none}md-fab-toolbar.md-is-open md-fab-trigger>button md-icon{opacity:0}md-fab-toolbar.md-is-open .md-fab-action-item{opacity:1;transform:scale(1)}md-grid-list{box-sizing:border-box;display:block;position:relative}md-grid-list md-grid-tile,md-grid-list md-grid-tile-footer,md-grid-list md-grid-tile-header,md-grid-list md-grid-tile>figure{box-sizing:border-box}md-grid-list md-grid-tile{display:block;position:absolute}md-grid-list md-grid-tile figure{display:flex;align-items:center;justify-content:center;height:100%;position:absolute;top:0;right:0;bottom:0;left:0;padding:0;margin:0}md-grid-list md-grid-tile md-grid-tile-footer,md-grid-list md-grid-tile md-grid-tile-header{display:flex;flex-direction:row;align-items:center;height:48px;color:#fff;background:rgba(0,0,0,.18);overflow:hidden;position:absolute;left:0;right:0}md-grid-list md-grid-tile md-grid-tile-footer h3,md-grid-list md-grid-tile md-grid-tile-footer h4,md-grid-list md-grid-tile md-grid-tile-header h3,md-grid-list md-grid-tile md-grid-tile-header h4{font-weight:400;margin:0 0 0 16px}md-grid-list md-grid-tile md-grid-tile-footer h3,md-grid-list md-grid-tile md-grid-tile-header h3{font-size:14px}md-grid-list md-grid-tile md-grid-tile-footer h4,md-grid-list md-grid-tile md-grid-tile-header h4{font-size:12px}md-grid-list md-grid-tile md-grid-tile-header{top:0}md-grid-list md-grid-tile md-grid-tile-footer{bottom:0}@media screen and (-ms-high-contrast:active){md-grid-tile{border:1px solid #fff}md-grid-tile-footer{border-top:1px solid #fff}}md-icon{margin:auto;background-repeat:no-repeat no-repeat;display:inline-block;vertical-align:middle;fill:currentColor;height:24px;width:24px;min-height:24px;min-width:24px}md-icon svg{pointer-events:none;display:block}md-icon[md-font-icon]{line-height:24px;width:auto}md-input-container{display:inline-block;position:relative;padding:2px;margin:18px 0;vertical-align:middle}md-input-container:after{content:'';display:table;clear:both}md-input-container.md-block{display:block}md-input-container .md-errors-spacer{float:right;min-height:24px;min-width:1px}[dir=rtl] md-input-container .md-errors-spacer{float:left}md-input-container>md-icon{position:absolute;top:8px;left:2px;right:auto}[dir=rtl] md-input-container>md-icon{left:auto}[dir=rtl] md-input-container>md-icon{right:2px}md-input-container input[type=color],md-input-container input[type=date],md-input-container input[type=datetime-local],md-input-container input[type=datetime],md-input-container input[type=email],md-input-container input[type=month],md-input-container input[type=number],md-input-container input[type=password],md-input-container input[type=search],md-input-container input[type=tel],md-input-container input[type=text],md-input-container input[type=time],md-input-container input[type=url],md-input-container input[type=week],md-input-container textarea{-moz-appearance:none;-webkit-appearance:none}md-input-container input[type=date],md-input-container input[type=datetime-local],md-input-container input[type=month],md-input-container input[type=time],md-input-container input[type=week]{min-height:26px}md-input-container textarea{resize:none;overflow:hidden}md-input-container textarea.md-input{min-height:26px;-ms-flex-preferred-size:auto}md-input-container textarea[md-no-autogrow]{height:auto;overflow:auto}md-input-container label:not(.md-container-ignore){position:absolute;bottom:100%;left:0;right:auto}[dir=rtl] md-input-container label:not(.md-container-ignore){left:auto}[dir=rtl] md-input-container label:not(.md-container-ignore){right:0}md-input-container label:not(.md-container-ignore).md-required:after{content:' *';font-size:13px;vertical-align:top}md-input-container .md-placeholder,md-input-container label:not(.md-no-float):not(.md-container-ignore){overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;order:1;pointer-events:none;-webkit-font-smoothing:antialiased;padding-left:3px;padding-right:0;z-index:1;transform:translate3d(0,28px,0) scale(1);transition:transform .4s cubic-bezier(.25,.8,.25,1);max-width:100%;transform-origin:left top}[dir=rtl] md-input-container .md-placeholder,[dir=rtl] md-input-container label:not(.md-no-float):not(.md-container-ignore){padding-left:0}[dir=rtl] md-input-container .md-placeholder,[dir=rtl] md-input-container label:not(.md-no-float):not(.md-container-ignore){padding-right:3px}[dir=rtl] md-input-container .md-placeholder,[dir=rtl] md-input-container label:not(.md-no-float):not(.md-container-ignore){transform-origin:right top}md-input-container .md-placeholder{position:absolute;top:0;opacity:0;transition-property:opacity,transform;transform:translate3d(0,30px,0)}md-input-container.md-input-focused .md-placeholder{opacity:1;transform:translate3d(0,24px,0)}md-input-container.md-input-has-value .md-placeholder{transition:none;opacity:0}md-input-container:not(.md-input-has-value) input:not(:focus),md-input-container:not(.md-input-has-value) input:not(:focus)::-webkit-datetime-edit-ampm-field,md-input-container:not(.md-input-has-value) input:not(:focus)::-webkit-datetime-edit-day-field,md-input-container:not(.md-input-has-value) input:not(:focus)::-webkit-datetime-edit-hour-field,md-input-container:not(.md-input-has-value) input:not(:focus)::-webkit-datetime-edit-millisecond-field,md-input-container:not(.md-input-has-value) input:not(:focus)::-webkit-datetime-edit-minute-field,md-input-container:not(.md-input-has-value) input:not(:focus)::-webkit-datetime-edit-month-field,md-input-container:not(.md-input-has-value) input:not(:focus)::-webkit-datetime-edit-second-field,md-input-container:not(.md-input-has-value) input:not(:focus)::-webkit-datetime-edit-text,md-input-container:not(.md-input-has-value) input:not(:focus)::-webkit-datetime-edit-week-field,md-input-container:not(.md-input-has-value) input:not(:focus)::-webkit-datetime-edit-year-field{color:transparent}md-input-container .md-input{order:2;display:block;margin-top:0;background:0 0;padding-top:2px;padding-bottom:1px;padding-left:2px;padding-right:2px;border-width:0 0 1px 0;line-height:26px;height:30px;-ms-flex-preferred-size:26px;border-radius:0;border-style:solid;width:100%;box-sizing:border-box;float:left}[dir=rtl] md-input-container .md-input{float:right}md-input-container .md-input:focus{outline:0}md-input-container .md-input:invalid{outline:0;box-shadow:none}md-input-container .md-input.md-no-flex{flex:none!important}md-input-container .md-char-counter{text-align:right;padding-right:2px;padding-left:0}[dir=rtl] md-input-container .md-char-counter{text-align:left}[dir=rtl] md-input-container .md-char-counter{padding-right:0}[dir=rtl] md-input-container .md-char-counter{padding-left:2px}md-input-container .md-input-messages-animation{position:relative;order:4;overflow:hidden;clear:left}[dir=rtl] md-input-container .md-input-messages-animation{clear:right}md-input-container .md-input-messages-animation.ng-enter .md-input-message-animation{opacity:0;margin-top:-100px}md-input-container .md-char-counter,md-input-container .md-input-message-animation{font-size:12px;line-height:14px;overflow:hidden;transition:all .3s cubic-bezier(.55,0,.55,.2);opacity:1;margin-top:0;padding-top:5px}md-input-container .md-char-counter:not(.md-char-counter),md-input-container .md-input-message-animation:not(.md-char-counter){padding-right:5px;padding-left:0}[dir=rtl] md-input-container .md-char-counter:not(.md-char-counter),[dir=rtl] md-input-container .md-input-message-animation:not(.md-char-counter){padding-right:0}[dir=rtl] md-input-container .md-char-counter:not(.md-char-counter),[dir=rtl] md-input-container .md-input-message-animation:not(.md-char-counter){padding-left:5px}md-input-container:not(.md-input-invalid) .md-auto-hide .md-input-message-animation{opacity:0;margin-top:-100px}md-input-container .md-input-message-animation:not(.ng-animate){opacity:0;margin-top:-100px}md-input-container .md-input-message-animation.ng-enter{opacity:0;margin-top:-100px}md-input-container.md-input-focused label:not(.md-no-float),md-input-container.md-input-has-placeholder label:not(.md-no-float),md-input-container.md-input-has-value label:not(.md-no-float){transform:translate3d(0,6px,0) scale(.75);transition:transform cubic-bezier(.25,.8,.25,1) .4s,width cubic-bezier(.25,.8,.25,1) .4s}md-input-container.md-input-has-value label{transition:none}md-input-container .md-input.ng-invalid.ng-dirty,md-input-container.md-input-focused .md-input,md-input-container.md-input-resized .md-input{padding-bottom:0;border-width:0 0 2px 0}[disabled] md-input-container .md-input,md-input-container .md-input[disabled]{background-position:bottom -1px left 0;background-size:4px 1px;background-repeat:repeat-x}md-input-container.md-icon-float{transition:margin-top .4s cubic-bezier(.25,.8,.25,1)}md-input-container.md-icon-float>label{pointer-events:none;position:absolute}md-input-container.md-icon-float>md-icon{top:8px;left:2px;right:auto}[dir=rtl] md-input-container.md-icon-float>md-icon{left:auto}[dir=rtl] md-input-container.md-icon-float>md-icon{right:2px}md-input-container.md-icon-left>label .md-placeholder,md-input-container.md-icon-left>label:not(.md-no-float):not(.md-container-ignore),md-input-container.md-icon-right>label .md-placeholder,md-input-container.md-icon-right>label:not(.md-no-float):not(.md-container-ignore){width:calc(100% - 36px - 18px)}md-input-container.md-icon-left{padding-left:36px;padding-right:0}[dir=rtl] md-input-container.md-icon-left{padding-left:0}[dir=rtl] md-input-container.md-icon-left{padding-right:36px}md-input-container.md-icon-left>label{left:36px;right:auto}[dir=rtl] md-input-container.md-icon-left>label{left:auto}[dir=rtl] md-input-container.md-icon-left>label{right:36px}md-input-container.md-icon-right{padding-left:0;padding-right:36px}[dir=rtl] md-input-container.md-icon-right{padding-left:36px}[dir=rtl] md-input-container.md-icon-right{padding-right:0}md-input-container.md-icon-right>md-icon:last-of-type{margin:0;right:2px;left:auto}[dir=rtl] md-input-container.md-icon-right>md-icon:last-of-type{right:auto}[dir=rtl] md-input-container.md-icon-right>md-icon:last-of-type{left:2px}md-input-container.md-icon-left.md-icon-right{padding-left:36px;padding-right:36px}md-input-container.md-icon-left.md-icon-right>label .md-placeholder,md-input-container.md-icon-left.md-icon-right>label:not(.md-no-float):not(.md-container-ignore){width:calc(100% - (36px * 2))}.md-resize-wrapper{position:relative}.md-resize-wrapper:after{content:'';display:table;clear:both}.md-resize-handle{position:absolute;bottom:-5px;left:0;height:10px;background:0 0;width:100%;cursor:ns-resize}@media screen and (-ms-high-contrast:active){md-input-container.md-default-theme>md-icon{fill:#fff}}md-list{display:block;padding:8px 0 8px 0}md-list .md-subheader{font-size:14px;font-weight:500;letter-spacing:.010em;line-height:1.2em}md-list.md-dense md-list-item,md-list.md-dense md-list-item .md-list-item-inner{min-height:48px}md-list.md-dense md-list-item .md-list-item-inner::before,md-list.md-dense md-list-item::before{content:'';min-height:48px;visibility:hidden;display:inline-block}md-list.md-dense md-list-item .md-list-item-inner md-icon:first-child,md-list.md-dense md-list-item md-icon:first-child{width:20px;height:20px}md-list.md-dense md-list-item .md-list-item-inner>md-icon:first-child:not(.md-avatar-icon),md-list.md-dense md-list-item>md-icon:first-child:not(.md-avatar-icon){margin-right:36px}[dir=rtl] md-list.md-dense md-list-item .md-list-item-inner>md-icon:first-child:not(.md-avatar-icon),[dir=rtl] md-list.md-dense md-list-item>md-icon:first-child:not(.md-avatar-icon){margin-right:auto;margin-left:36px}md-list.md-dense md-list-item .md-avatar,md-list.md-dense md-list-item .md-avatar-icon,md-list.md-dense md-list-item .md-list-item-inner .md-avatar,md-list.md-dense md-list-item .md-list-item-inner .md-avatar-icon{margin-right:20px}[dir=rtl] md-list.md-dense md-list-item .md-avatar,[dir=rtl] md-list.md-dense md-list-item .md-avatar-icon,[dir=rtl] md-list.md-dense md-list-item .md-list-item-inner .md-avatar,[dir=rtl] md-list.md-dense md-list-item .md-list-item-inner .md-avatar-icon{margin-right:auto;margin-left:20px}md-list.md-dense md-list-item .md-avatar,md-list.md-dense md-list-item .md-list-item-inner .md-avatar{flex:none;width:36px;height:36px}md-list.md-dense md-list-item.md-2-line .md-list-item-text.md-offset,md-list.md-dense md-list-item.md-2-line>.md-no-style .md-list-item-text.md-offset,md-list.md-dense md-list-item.md-3-line .md-list-item-text.md-offset,md-list.md-dense md-list-item.md-3-line>.md-no-style .md-list-item-text.md-offset{margin-left:56px}[dir=rtl] md-list.md-dense md-list-item.md-2-line .md-list-item-text.md-offset,[dir=rtl] md-list.md-dense md-list-item.md-2-line>.md-no-style .md-list-item-text.md-offset,[dir=rtl] md-list.md-dense md-list-item.md-3-line .md-list-item-text.md-offset,[dir=rtl] md-list.md-dense md-list-item.md-3-line>.md-no-style .md-list-item-text.md-offset{margin-left:auto;margin-right:56px}md-list.md-dense md-list-item.md-2-line .md-list-item-text h3,md-list.md-dense md-list-item.md-2-line .md-list-item-text h4,md-list.md-dense md-list-item.md-2-line .md-list-item-text p,md-list.md-dense md-list-item.md-2-line>.md-no-style .md-list-item-text h3,md-list.md-dense md-list-item.md-2-line>.md-no-style .md-list-item-text h4,md-list.md-dense md-list-item.md-2-line>.md-no-style .md-list-item-text p,md-list.md-dense md-list-item.md-3-line .md-list-item-text h3,md-list.md-dense md-list-item.md-3-line .md-list-item-text h4,md-list.md-dense md-list-item.md-3-line .md-list-item-text p,md-list.md-dense md-list-item.md-3-line>.md-no-style .md-list-item-text h3,md-list.md-dense md-list-item.md-3-line>.md-no-style .md-list-item-text h4,md-list.md-dense md-list-item.md-3-line>.md-no-style .md-list-item-text p{line-height:1.05;font-size:12px}md-list.md-dense md-list-item.md-2-line .md-list-item-text h3,md-list.md-dense md-list-item.md-2-line>.md-no-style .md-list-item-text h3,md-list.md-dense md-list-item.md-3-line .md-list-item-text h3,md-list.md-dense md-list-item.md-3-line>.md-no-style .md-list-item-text h3{font-size:13px}md-list.md-dense md-list-item.md-2-line,md-list.md-dense md-list-item.md-2-line>.md-no-style{min-height:60px}md-list.md-dense md-list-item.md-2-line::before,md-list.md-dense md-list-item.md-2-line>.md-no-style::before{content:'';min-height:60px;visibility:hidden;display:inline-block}md-list.md-dense md-list-item.md-2-line .md-avatar-icon,md-list.md-dense md-list-item.md-2-line>.md-avatar,md-list.md-dense md-list-item.md-2-line>.md-no-style .md-avatar-icon,md-list.md-dense md-list-item.md-2-line>.md-no-style>.md-avatar{margin-top:12px}md-list.md-dense md-list-item.md-3-line,md-list.md-dense md-list-item.md-3-line>.md-no-style{min-height:76px}md-list.md-dense md-list-item.md-3-line::before,md-list.md-dense md-list-item.md-3-line>.md-no-style::before{content:'';min-height:76px;visibility:hidden;display:inline-block}md-list.md-dense md-list-item.md-3-line>.md-avatar,md-list.md-dense md-list-item.md-3-line>.md-no-style>.md-avatar,md-list.md-dense md-list-item.md-3-line>.md-no-style>md-icon:first-child,md-list.md-dense md-list-item.md-3-line>md-icon:first-child{margin-top:16px}md-list-item{position:relative}md-list-item.md-proxy-focus.md-focused .md-no-style{transition:background-color .15s linear}md-list-item._md-button-wrap{position:relative}md-list-item._md-button-wrap>div.md-button:first-child{display:flex;align-items:center;justify-content:flex-start;padding:0 16px;margin:0;font-weight:400;text-align:left;border:medium none}[dir=rtl] md-list-item._md-button-wrap>div.md-button:first-child{text-align:right}md-list-item._md-button-wrap>div.md-button:first-child>.md-button:first-child{position:absolute;top:0;left:0;height:100%;margin:0;padding:0}md-list-item._md-button-wrap>div.md-button:first-child .md-list-item-inner{width:100%;min-height:inherit}md-list-item .md-no-style,md-list-item.md-no-proxy{position:relative;padding:0 16px;flex:1 1 auto}md-list-item .md-no-style.md-button,md-list-item.md-no-proxy.md-button{font-size:inherit;height:inherit;text-align:left;text-transform:none;width:100%;white-space:normal;flex-direction:inherit;align-items:inherit;border-radius:0;margin:0}[dir=rtl] md-list-item .md-no-style.md-button,[dir=rtl] md-list-item.md-no-proxy.md-button{text-align:right}md-list-item .md-no-style.md-button>.md-ripple-container,md-list-item.md-no-proxy.md-button>.md-ripple-container{border-radius:0}md-list-item .md-no-style:focus,md-list-item.md-no-proxy:focus{outline:0}md-list-item.md-clickable:hover{cursor:pointer}md-list-item md-divider{position:absolute;bottom:0;left:0;width:100%}[dir=rtl] md-list-item md-divider{left:auto;right:0}md-list-item md-divider[md-inset]{left:72px;width:calc(100% - 72px);margin:0!important}[dir=rtl] md-list-item md-divider[md-inset]{left:auto;right:72px}md-list-item,md-list-item .md-list-item-inner{display:flex;justify-content:flex-start;align-items:center;min-height:48px;height:auto}md-list-item .md-list-item-inner::before,md-list-item::before{content:'';min-height:48px;visibility:hidden;display:inline-block}md-list-item .md-list-item-inner>div.md-primary>md-icon:not(.md-avatar-icon),md-list-item .md-list-item-inner>div.md-secondary>md-icon:not(.md-avatar-icon),md-list-item .md-list-item-inner>md-icon.md-secondary:not(.md-avatar-icon),md-list-item .md-list-item-inner>md-icon:first-child:not(.md-avatar-icon),md-list-item>div.md-primary>md-icon:not(.md-avatar-icon),md-list-item>div.md-secondary>md-icon:not(.md-avatar-icon),md-list-item>md-icon.md-secondary:not(.md-avatar-icon),md-list-item>md-icon:first-child:not(.md-avatar-icon){width:24px;margin-top:16px;margin-bottom:12px;box-sizing:content-box}md-list-item .md-list-item-inner md-checkbox.md-secondary,md-list-item .md-list-item-inner>div.md-primary>md-checkbox,md-list-item .md-list-item-inner>div.md-secondary>md-checkbox,md-list-item .md-list-item-inner>md-checkbox,md-list-item md-checkbox.md-secondary,md-list-item>div.md-primary>md-checkbox,md-list-item>div.md-secondary>md-checkbox,md-list-item>md-checkbox{align-self:center}md-list-item .md-list-item-inner md-checkbox.md-secondary .md-label,md-list-item .md-list-item-inner>div.md-primary>md-checkbox .md-label,md-list-item .md-list-item-inner>div.md-secondary>md-checkbox .md-label,md-list-item .md-list-item-inner>md-checkbox .md-label,md-list-item md-checkbox.md-secondary .md-label,md-list-item>div.md-primary>md-checkbox .md-label,md-list-item>div.md-secondary>md-checkbox .md-label,md-list-item>md-checkbox .md-label{display:none}md-list-item .md-list-item-inner>md-icon:first-child:not(.md-avatar-icon),md-list-item>md-icon:first-child:not(.md-avatar-icon){margin-right:32px}[dir=rtl] md-list-item .md-list-item-inner>md-icon:first-child:not(.md-avatar-icon),[dir=rtl] md-list-item>md-icon:first-child:not(.md-avatar-icon){margin-right:auto;margin-left:32px}md-list-item .md-avatar,md-list-item .md-avatar-icon,md-list-item .md-list-item-inner .md-avatar,md-list-item .md-list-item-inner .md-avatar-icon{margin-top:8px;margin-bottom:8px;margin-right:16px;border-radius:50%;box-sizing:content-box}[dir=rtl] md-list-item .md-avatar,[dir=rtl] md-list-item .md-avatar-icon,[dir=rtl] md-list-item .md-list-item-inner .md-avatar,[dir=rtl] md-list-item .md-list-item-inner .md-avatar-icon{margin-right:auto;margin-left:16px}md-list-item .md-avatar,md-list-item .md-list-item-inner .md-avatar{flex:none;width:40px;height:40px}md-list-item .md-avatar-icon,md-list-item .md-list-item-inner .md-avatar-icon{padding:8px}md-list-item .md-avatar-icon svg,md-list-item .md-list-item-inner .md-avatar-icon svg{width:24px;height:24px}md-list-item .md-list-item-inner>md-checkbox,md-list-item>md-checkbox{width:24px;margin-left:3px;margin-right:29px;margin-top:16px}[dir=rtl] md-list-item .md-list-item-inner>md-checkbox,[dir=rtl] md-list-item>md-checkbox{margin-left:29px}[dir=rtl] md-list-item .md-list-item-inner>md-checkbox,[dir=rtl] md-list-item>md-checkbox{margin-right:3px}md-list-item .md-list-item-inner .md-secondary-container,md-list-item .md-secondary-container{display:flex;align-items:center;flex-shrink:0;margin:auto;margin-right:0;margin-left:auto}[dir=rtl] md-list-item .md-list-item-inner .md-secondary-container,[dir=rtl] md-list-item .md-secondary-container{margin-right:auto}[dir=rtl] md-list-item .md-list-item-inner .md-secondary-container,[dir=rtl] md-list-item .md-secondary-container{margin-left:0}md-list-item .md-list-item-inner .md-secondary-container .md-button:last-of-type,md-list-item .md-list-item-inner .md-secondary-container .md-icon-button:last-of-type,md-list-item .md-secondary-container .md-button:last-of-type,md-list-item .md-secondary-container .md-icon-button:last-of-type{margin-right:0}[dir=rtl] md-list-item .md-list-item-inner .md-secondary-container .md-button:last-of-type,[dir=rtl] md-list-item .md-list-item-inner .md-secondary-container .md-icon-button:last-of-type,[dir=rtl] md-list-item .md-secondary-container .md-button:last-of-type,[dir=rtl] md-list-item .md-secondary-container .md-icon-button:last-of-type{margin-right:auto;margin-left:0}md-list-item .md-list-item-inner .md-secondary-container md-checkbox,md-list-item .md-secondary-container md-checkbox{margin-top:0;margin-bottom:0}md-list-item .md-list-item-inner .md-secondary-container md-checkbox:last-child,md-list-item .md-secondary-container md-checkbox:last-child{width:24px;margin-right:0}[dir=rtl] md-list-item .md-list-item-inner .md-secondary-container md-checkbox:last-child,[dir=rtl] md-list-item .md-secondary-container md-checkbox:last-child{margin-right:auto;margin-left:0}md-list-item .md-list-item-inner .md-secondary-container md-switch,md-list-item .md-secondary-container md-switch{margin-top:0;margin-bottom:0;margin-right:-6px}[dir=rtl] md-list-item .md-list-item-inner .md-secondary-container md-switch,[dir=rtl] md-list-item .md-secondary-container md-switch{margin-right:auto;margin-left:-6px}md-list-item .md-list-item-inner>.md-list-item-inner>p,md-list-item .md-list-item-inner>p,md-list-item>.md-list-item-inner>p,md-list-item>p{flex:1 1 auto;margin:0}md-list-item.md-2-line,md-list-item.md-2-line>.md-no-style,md-list-item.md-3-line,md-list-item.md-3-line>.md-no-style{align-items:flex-start;justify-content:center}md-list-item.md-2-line.md-long-text,md-list-item.md-2-line>.md-no-style.md-long-text,md-list-item.md-3-line.md-long-text,md-list-item.md-3-line>.md-no-style.md-long-text{margin-top:8px;margin-bottom:8px}md-list-item.md-2-line .md-list-item-text,md-list-item.md-2-line>.md-no-style .md-list-item-text,md-list-item.md-3-line .md-list-item-text,md-list-item.md-3-line>.md-no-style .md-list-item-text{flex:1 1 auto;margin:auto;text-overflow:ellipsis;overflow:hidden}md-list-item.md-2-line .md-list-item-text.md-offset,md-list-item.md-2-line>.md-no-style .md-list-item-text.md-offset,md-list-item.md-3-line .md-list-item-text.md-offset,md-list-item.md-3-line>.md-no-style .md-list-item-text.md-offset{margin-left:56px}[dir=rtl] md-list-item.md-2-line .md-list-item-text.md-offset,[dir=rtl] md-list-item.md-2-line>.md-no-style .md-list-item-text.md-offset,[dir=rtl] md-list-item.md-3-line .md-list-item-text.md-offset,[dir=rtl] md-list-item.md-3-line>.md-no-style .md-list-item-text.md-offset{margin-left:auto;margin-right:56px}md-list-item.md-2-line .md-list-item-text h3,md-list-item.md-2-line>.md-no-style .md-list-item-text h3,md-list-item.md-3-line .md-list-item-text h3,md-list-item.md-3-line>.md-no-style .md-list-item-text h3{font-size:16px;font-weight:400;letter-spacing:.010em;margin:0;line-height:1.2em;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}md-list-item.md-2-line .md-list-item-text h4,md-list-item.md-2-line>.md-no-style .md-list-item-text h4,md-list-item.md-3-line .md-list-item-text h4,md-list-item.md-3-line>.md-no-style .md-list-item-text h4{font-size:14px;letter-spacing:.010em;margin:3px 0 1px 0;font-weight:400;line-height:1.2em;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}md-list-item.md-2-line .md-list-item-text p,md-list-item.md-2-line>.md-no-style .md-list-item-text p,md-list-item.md-3-line .md-list-item-text p,md-list-item.md-3-line>.md-no-style .md-list-item-text p{font-size:14px;font-weight:500;letter-spacing:.010em;margin:0;line-height:1.6em}md-list-item.md-2-line,md-list-item.md-2-line>.md-no-style{height:auto;min-height:72px}md-list-item.md-2-line::before,md-list-item.md-2-line>.md-no-style::before{content:'';min-height:72px;visibility:hidden;display:inline-block}md-list-item.md-2-line .md-avatar-icon,md-list-item.md-2-line>.md-avatar,md-list-item.md-2-line>.md-no-style .md-avatar-icon,md-list-item.md-2-line>.md-no-style>.md-avatar{margin-top:12px}md-list-item.md-2-line>.md-no-style>md-icon:first-child,md-list-item.md-2-line>md-icon:first-child{align-self:flex-start}md-list-item.md-2-line .md-list-item-text,md-list-item.md-2-line>.md-no-style .md-list-item-text{flex:1 1 auto}md-list-item.md-3-line,md-list-item.md-3-line>.md-no-style{height:auto;min-height:88px}md-list-item.md-3-line::before,md-list-item.md-3-line>.md-no-style::before{content:'';min-height:88px;visibility:hidden;display:inline-block}md-list-item.md-3-line>.md-avatar,md-list-item.md-3-line>.md-no-style>.md-avatar,md-list-item.md-3-line>.md-no-style>md-icon:first-child,md-list-item.md-3-line>md-icon:first-child{margin-top:16px}.md-open-menu-container{position:fixed;left:0;top:0;z-index:100;opacity:0;border-radius:2px}.md-open-menu-container md-menu-divider{margin-top:4px;margin-bottom:4px;height:1px;min-height:1px;max-height:1px;width:100%}.md-open-menu-container md-menu-content>*{opacity:0}.md-open-menu-container:not(.md-clickable){pointer-events:none}.md-open-menu-container.md-active{opacity:1;transition:all .4s cubic-bezier(.25,.8,.25,1);transition-duration:.2s}.md-open-menu-container.md-active>md-menu-content>*{opacity:1;transition:all .3s cubic-bezier(.55,0,.55,.2);transition-duration:.2s;transition-delay:.1s}.md-open-menu-container.md-leave{opacity:0;transition:all .3s cubic-bezier(.55,0,.55,.2);transition-duration:250ms}md-menu-content{display:flex;flex-direction:column;padding:8px 0;max-height:304px;overflow-y:auto}md-menu-content.md-dense{max-height:208px}md-menu-content.md-dense md-menu-item{height:32px;min-height:0}md-menu-item{display:flex;flex-direction:row;min-height:48px;height:48px;align-content:center;justify-content:flex-start}md-menu-item>*{width:100%;margin:auto 0;padding-left:16px;padding-right:16px}md-menu-item>a.md-button{padding-top:5px}md-menu-item>.md-button{text-align:left;display:inline-block;border-radius:0;margin:auto 0;font-size:15px;text-transform:none;font-weight:400;height:100%;padding-left:16px;padding-right:16px;width:100%}md-menu-item>.md-button::-moz-focus-inner{padding:0;border:0}[dir=rtl] md-menu-item>.md-button{text-align:right}md-menu-item>.md-button md-icon{margin:auto 16px auto 0}[dir=rtl] md-menu-item>.md-button md-icon{margin:auto 0 auto 16px}md-menu-item>.md-button p{display:inline-block;margin:auto}md-menu-item>.md-button span{margin-top:auto;margin-bottom:auto}md-menu-item>.md-button .md-ripple-container{border-radius:inherit}md-toolbar .md-menu{height:auto;margin:auto;padding:0}@media (max-width:959px){md-menu-content{min-width:112px}md-menu-content[width="3"]{min-width:168px}md-menu-content[width="4"]{min-width:224px}md-menu-content[width="5"]{min-width:280px}md-menu-content[width="6"]{min-width:336px}md-menu-content[width="7"]{min-width:392px}}@media (min-width:960px){md-menu-content{min-width:96px}md-menu-content[width="3"]{min-width:192px}md-menu-content[width="4"]{min-width:256px}md-menu-content[width="5"]{min-width:320px}md-menu-content[width="6"]{min-width:384px}md-menu-content[width="7"]{min-width:448px}}md-toolbar.md-menu-toolbar h2.md-toolbar-tools{line-height:1rem;height:auto;padding:28px;padding-bottom:12px}md-toolbar.md-has-open-menu{position:relative;z-index:100}md-menu-bar{padding:0 20px;display:block;position:relative;z-index:2}md-menu-bar .md-menu{display:inline-block;padding:0;position:relative}md-menu-bar button{font-size:14px;padding:0 10px;margin:0;border:0;background-color:transparent;height:40px}md-menu-bar md-backdrop.md-menu-backdrop{z-index:-2}md-menu-content.md-menu-bar-menu.md-dense{max-height:none;padding:16px 0}md-menu-content.md-menu-bar-menu.md-dense md-menu-item.md-indent{position:relative}md-menu-content.md-menu-bar-menu.md-dense md-menu-item.md-indent>md-icon{position:absolute;padding:0;width:24px;top:6px;left:24px}[dir=rtl] md-menu-content.md-menu-bar-menu.md-dense md-menu-item.md-indent>md-icon{left:auto;right:24px}md-menu-content.md-menu-bar-menu.md-dense md-menu-item.md-indent .md-menu>.md-button,md-menu-content.md-menu-bar-menu.md-dense md-menu-item.md-indent>.md-button{padding:0 32px 0 64px}[dir=rtl] md-menu-content.md-menu-bar-menu.md-dense md-menu-item.md-indent .md-menu>.md-button,[dir=rtl] md-menu-content.md-menu-bar-menu.md-dense md-menu-item.md-indent>.md-button{padding:0 64px 0 32px}md-menu-content.md-menu-bar-menu.md-dense .md-button{min-height:0;height:32px;display:flex}md-menu-content.md-menu-bar-menu.md-dense .md-button span{flex-grow:1}md-menu-content.md-menu-bar-menu.md-dense .md-button span.md-alt-text{flex-grow:0;align-self:flex-end;margin:0 8px}md-menu-content.md-menu-bar-menu.md-dense md-menu-divider{margin:8px 0}md-menu-content.md-menu-bar-menu.md-dense .md-menu>.md-button,md-menu-content.md-menu-bar-menu.md-dense md-menu-item>.md-button{text-align:left}[dir=rtl] md-menu-content.md-menu-bar-menu.md-dense .md-menu>.md-button,[dir=rtl] md-menu-content.md-menu-bar-menu.md-dense md-menu-item>.md-button{text-align:right}md-menu-content.md-menu-bar-menu.md-dense .md-menu{padding:0}md-menu-content.md-menu-bar-menu.md-dense .md-menu>.md-button{position:relative;margin:0;width:100%;text-transform:none;font-weight:400;border-radius:0;padding-left:16px}[dir=rtl] md-menu-content.md-menu-bar-menu.md-dense .md-menu>.md-button{padding-left:0;padding-right:16px}md-menu-content.md-menu-bar-menu.md-dense .md-menu>.md-button:after{display:block;content:'\25BC';position:absolute;top:0;speak:none;transform:rotate(270deg) scaleY(.45) scaleX(.9);right:28px}[dir=rtl] md-menu-content.md-menu-bar-menu.md-dense .md-menu>.md-button:after{transform:rotate(90deg) scaleY(.45) scaleX(.9)}[dir=rtl] md-menu-content.md-menu-bar-menu.md-dense .md-menu>.md-button:after{right:auto;left:28px}.md-nav-bar{border-style:solid;border-width:0 0 1px;height:48px;position:relative}._md-nav-bar-list{outline:0;list-style:none;margin:0;padding:0;box-sizing:border-box;display:flex;flex-direction:row}.md-nav-item:first-of-type{margin-left:8px}.md-button._md-nav-button{line-height:24px;margin:0 4px;padding:12px 16px;transition:background-color .35s cubic-bezier(.35,0,.25,1)}.md-button._md-nav-button:focus{outline:0}.md-button._md-nav-button:hover{background-color:inherit}md-nav-ink-bar{bottom:0;height:2px;left:auto;position:absolute;right:auto;background-color:#000}md-nav-ink-bar._md-left{transition:left 125ms cubic-bezier(.35,0,.25,1),right .25s cubic-bezier(.35,0,.25,1)}md-nav-ink-bar._md-right{transition:left .25s cubic-bezier(.35,0,.25,1),right 125ms cubic-bezier(.35,0,.25,1)}md-nav-extra-content{min-height:48px;padding-right:12px}.md-panel-outer-wrapper{height:100%;left:0;position:absolute;top:0;width:100%}._md-panel-hidden{display:none}._md-panel-fullscreen{border-radius:0;left:0;min-height:100%;min-width:100%;position:fixed;top:0}._md-panel-shown .md-panel{opacity:1;transition:none}.md-panel{opacity:0;position:fixed}.md-panel._md-panel-shown{opacity:1;transition:none}.md-panel._md-panel-animate-enter{opacity:1;transition:all .3s cubic-bezier(0,0,.2,1)}.md-panel._md-panel-animate-leave{opacity:1;transition:all .3s cubic-bezier(.4,0,1,1)}.md-panel._md-panel-animate-fade-out,.md-panel._md-panel-animate-scale-out{opacity:0}.md-panel._md-panel-backdrop{height:100%;position:absolute;width:100%}.md-panel._md-opaque-enter{opacity:.48;transition:opacity .3s cubic-bezier(0,0,.2,1)}.md-panel._md-opaque-leave{transition:opacity .3s cubic-bezier(.4,0,1,1)}@keyframes indeterminate-rotate{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}md-progress-circular{position:relative;display:block}md-progress-circular._md-progress-circular-disabled{visibility:hidden}md-progress-circular.md-mode-indeterminate svg{animation:indeterminate-rotate 2.9s linear infinite}md-progress-circular svg{position:absolute;overflow:visible;top:0;left:0}md-progress-linear{display:block;position:relative;width:100%;height:5px;padding-top:0!important;margin-bottom:0!important}md-progress-linear._md-progress-linear-disabled{visibility:hidden}md-progress-linear .md-container{display:block;position:relative;overflow:hidden;width:100%;height:5px;transform:translate(0,0) scale(1,1)}md-progress-linear .md-container .md-bar{position:absolute;left:0;top:0;bottom:0;width:100%;height:5px}md-progress-linear .md-container .md-dashed:before{content:"";display:none;position:absolute;margin-top:0;height:5px;width:100%;background-color:transparent;background-size:10px 10px!important;background-position:0 -23px}md-progress-linear .md-container .md-bar1,md-progress-linear .md-container .md-bar2{transition:transform .2s linear}md-progress-linear .md-container.md-mode-query .md-bar1{display:none}md-progress-linear .md-container.md-mode-query .md-bar2{transition:all .2s linear;animation:query .8s infinite cubic-bezier(.39,.575,.565,1)}md-progress-linear .md-container.md-mode-determinate .md-bar1{display:none}md-progress-linear .md-container.md-mode-indeterminate .md-bar1{animation:md-progress-linear-indeterminate-scale-1 4s infinite,md-progress-linear-indeterminate-1 4s infinite}md-progress-linear .md-container.md-mode-indeterminate .md-bar2{animation:md-progress-linear-indeterminate-scale-2 4s infinite,md-progress-linear-indeterminate-2 4s infinite}md-progress-linear .md-container.ng-hide ._md-progress-linear-disabled md-progress-linear .md-container{animation:none}md-progress-linear .md-container.ng-hide ._md-progress-linear-disabled md-progress-linear .md-container .md-bar1{animation-name:none}md-progress-linear .md-container.ng-hide ._md-progress-linear-disabled md-progress-linear .md-container .md-bar2{animation-name:none}md-progress-linear .md-container.md-mode-buffer{background-color:transparent!important;transition:all .2s linear}md-progress-linear .md-container.md-mode-buffer .md-dashed:before{display:block;animation:buffer 3s infinite linear}@keyframes query{0%{opacity:1;transform:translateX(35%) scale(.3,1)}100%{opacity:0;transform:translateX(-50%) scale(0,1)}}@keyframes buffer{0%{opacity:1;background-position:0 -23px}50%{opacity:0}100%{opacity:1;background-position:-200px -23px}}@keyframes md-progress-linear-indeterminate-scale-1{0%{transform:scaleX(.1);animation-timing-function:linear}36.6%{transform:scaleX(.1);animation-timing-function:cubic-bezier(.334731432,.124819821,.785843996,1)}69.15%{transform:scaleX(.83);animation-timing-function:cubic-bezier(.225732004,0,.233648906,1.3709798)}100%{transform:scaleX(.1)}}@keyframes md-progress-linear-indeterminate-1{0%{left:-105.166666667%;animation-timing-function:linear}20%{left:-105.166666667%;animation-timing-function:cubic-bezier(.5,0,.701732,.495818703)}69.15%{left:21.5%;animation-timing-function:cubic-bezier(.302435,.38135197,.55,.956352125)}100%{left:95.4444444444%}}@keyframes md-progress-linear-indeterminate-scale-2{0%{transform:scaleX(.1);animation-timing-function:cubic-bezier(.205028172,.057050836,.57660995,.453970841)}19.15%{transform:scaleX(.57);animation-timing-function:cubic-bezier(.152312994,.196431957,.648373778,1.00431535)}44.15%{transform:scaleX(.91);animation-timing-function:cubic-bezier(.25775882,-.003163357,.211761916,1.38178961)}100%{transform:scaleX(.1)}}@keyframes md-progress-linear-indeterminate-2{0%{left:-54.8888888889%;animation-timing-function:cubic-bezier(.15,0,.5150584,.409684966)}25%{left:-17.25%;animation-timing-function:cubic-bezier(.3103299,.284057684,.8,.733718979)}48.35%{left:29.5%;animation-timing-function:cubic-bezier(.4,.627034903,.6,.902025796)}100%{left:117.388888889%}}md-radio-button{box-sizing:border-box;display:block;margin-bottom:16px;white-space:nowrap;cursor:pointer;position:relative}md-radio-button[disabled]{cursor:default}md-radio-button[disabled] .md-container{cursor:default}md-radio-button .md-container{position:absolute;top:50%;transform:translateY(-50%);box-sizing:border-box;display:inline-block;width:20px;height:20px;cursor:pointer;left:0;right:auto}[dir=rtl] md-radio-button .md-container{left:auto}[dir=rtl] md-radio-button .md-container{right:0}md-radio-button .md-container .md-ripple-container{position:absolute;display:block;width:auto;height:auto;left:-15px;top:-15px;right:-15px;bottom:-15px}md-radio-button .md-container:before{box-sizing:border-box;background-color:transparent;border-radius:50%;content:'';position:absolute;display:block;height:auto;left:0;top:0;right:0;bottom:0;transition:all .5s;width:auto}md-radio-button.md-align-top-left>div.md-container{top:12px}md-radio-button .md-off{box-sizing:border-box;position:absolute;top:0;left:0;width:20px;height:20px;border-style:solid;border-width:2px;border-radius:50%;transition:border-color ease .28s}md-radio-button .md-on{box-sizing:border-box;position:absolute;top:0;left:0;width:20px;height:20px;border-radius:50%;transition:transform ease .28s;transform:scale(0)}md-radio-button.md-checked .md-on{transform:scale(.5)}md-radio-button .md-label{box-sizing:border-box;position:relative;display:inline-block;margin-left:30px;margin-right:0;vertical-align:middle;white-space:normal;pointer-events:none;width:auto}[dir=rtl] md-radio-button .md-label{margin-left:0}[dir=rtl] md-radio-button .md-label{margin-right:30px}md-radio-group.layout-column md-radio-button,md-radio-group.layout-gt-lg-column md-radio-button,md-radio-group.layout-gt-md-column md-radio-button,md-radio-group.layout-gt-sm-column md-radio-button,md-radio-group.layout-gt-xs-column md-radio-button,md-radio-group.layout-lg-column md-radio-button,md-radio-group.layout-md-column md-radio-button,md-radio-group.layout-sm-column md-radio-button,md-radio-group.layout-xl-column md-radio-button,md-radio-group.layout-xs-column md-radio-button{margin-bottom:16px}md-radio-group.layout-gt-lg-row md-radio-button,md-radio-group.layout-gt-md-row md-radio-button,md-radio-group.layout-gt-sm-row md-radio-button,md-radio-group.layout-gt-xs-row md-radio-button,md-radio-group.layout-lg-row md-radio-button,md-radio-group.layout-md-row md-radio-button,md-radio-group.layout-row md-radio-button,md-radio-group.layout-sm-row md-radio-button,md-radio-group.layout-xl-row md-radio-button,md-radio-group.layout-xs-row md-radio-button{margin-top:0;margin-bottom:0;margin-left:0;margin-right:16px}[dir=rtl] md-radio-group.layout-gt-lg-row md-radio-button,[dir=rtl] md-radio-group.layout-gt-md-row md-radio-button,[dir=rtl] md-radio-group.layout-gt-sm-row md-radio-button,[dir=rtl] md-radio-group.layout-gt-xs-row md-radio-button,[dir=rtl] md-radio-group.layout-lg-row md-radio-button,[dir=rtl] md-radio-group.layout-md-row md-radio-button,[dir=rtl] md-radio-group.layout-row md-radio-button,[dir=rtl] md-radio-group.layout-sm-row md-radio-button,[dir=rtl] md-radio-group.layout-xl-row md-radio-button,[dir=rtl] md-radio-group.layout-xs-row md-radio-button{margin-left:16px}[dir=rtl] md-radio-group.layout-gt-lg-row md-radio-button,[dir=rtl] md-radio-group.layout-gt-md-row md-radio-button,[dir=rtl] md-radio-group.layout-gt-sm-row md-radio-button,[dir=rtl] md-radio-group.layout-gt-xs-row md-radio-button,[dir=rtl] md-radio-group.layout-lg-row md-radio-button,[dir=rtl] md-radio-group.layout-md-row md-radio-button,[dir=rtl] md-radio-group.layout-row md-radio-button,[dir=rtl] md-radio-group.layout-sm-row md-radio-button,[dir=rtl] md-radio-group.layout-xl-row md-radio-button,[dir=rtl] md-radio-group.layout-xs-row md-radio-button{margin-right:0}md-radio-group.layout-gt-lg-row md-radio-button:last-of-type,md-radio-group.layout-gt-md-row md-radio-button:last-of-type,md-radio-group.layout-gt-sm-row md-radio-button:last-of-type,md-radio-group.layout-gt-xs-row md-radio-button:last-of-type,md-radio-group.layout-lg-row md-radio-button:last-of-type,md-radio-group.layout-md-row md-radio-button:last-of-type,md-radio-group.layout-row md-radio-button:last-of-type,md-radio-group.layout-sm-row md-radio-button:last-of-type,md-radio-group.layout-xl-row md-radio-button:last-of-type,md-radio-group.layout-xs-row md-radio-button:last-of-type{margin-left:0;margin-right:0}md-radio-group:focus{outline:0}md-radio-group.md-focused .md-checked .md-container:before{left:-8px;top:-8px;right:-8px;bottom:-8px}md-radio-group[disabled] md-radio-button{cursor:default}md-radio-group[disabled] md-radio-button .md-container{cursor:default}.md-inline-form md-radio-group{margin:18px 0 19px}.md-inline-form md-radio-group md-radio-button{display:inline-block;height:30px;padding:2px;box-sizing:border-box;margin-top:0;margin-bottom:0}@media screen and (-ms-high-contrast:active){md-radio-button.md-default-theme .md-on{background-color:#fff}}md-input-container:not([md-no-float]) .md-select-placeholder span:first-child{transition:transform .4s cubic-bezier(.25,.8,.25,1);transform-origin:left top}[dir=rtl] md-input-container:not([md-no-float]) .md-select-placeholder span:first-child{transform-origin:right top}md-input-container.md-input-focused:not([md-no-float]) .md-select-placeholder span:first-child{transform:translateY(-22px) translateX(-2px) scale(.75)}.md-select-menu-container{position:fixed;left:0;top:0;z-index:90;opacity:0;display:none;transform:translateY(-1px)}.md-select-menu-container:not(.md-clickable){pointer-events:none}.md-select-menu-container md-progress-circular{display:table;margin:24px auto!important}.md-select-menu-container.md-active{display:block;opacity:1}.md-select-menu-container.md-active md-select-menu{transition:all .4s cubic-bezier(.25,.8,.25,1);transition-duration:150ms}.md-select-menu-container.md-active md-select-menu>*{opacity:1;transition:all .3s cubic-bezier(.55,0,.55,.2);transition-duration:150ms;transition-delay:.1s}.md-select-menu-container.md-leave{opacity:0;transition:all .3s cubic-bezier(.55,0,.55,.2);transition-duration:250ms}md-input-container>md-select{margin:0;order:2}md-input-container:not(.md-input-has-value) md-select.ng-required:not(.md-no-asterisk) .md-select-value span:first-child:after,md-input-container:not(.md-input-has-value) md-select[required]:not(.md-no-asterisk) .md-select-value span:first-child:after{content:' *';font-size:13px;vertical-align:top}md-input-container.md-input-invalid md-select .md-select-value{border-bottom-style:solid;padding-bottom:1px}md-select{display:flex;margin:20px 0 26px 0}md-select.ng-required.ng-invalid:not(.md-no-asterisk) .md-select-value span:first-child:after,md-select[required].ng-invalid:not(.md-no-asterisk) .md-select-value span:first-child:after{content:' *';font-size:13px;vertical-align:top}md-select[disabled] .md-select-value{background-position:0 bottom;background-size:4px 1px;background-repeat:repeat-x;margin-bottom:-1px}md-select:focus{outline:0}md-select[disabled]:hover{cursor:default}md-select:not([disabled]):hover{cursor:pointer}md-select:not([disabled]).ng-invalid.ng-touched .md-select-value{border-bottom-style:solid;padding-bottom:1px}md-select:not([disabled]):focus .md-select-value{border-bottom-width:2px;border-bottom-style:solid;padding-bottom:0}md-select:not([disabled]):focus.ng-invalid.ng-touched .md-select-value{padding-bottom:0}md-input-container.md-input-has-value .md-select-value>span:not(.md-select-icon){transform:translate3d(0,1px,0)}.md-select-value{display:flex;align-items:center;padding:2px 2px 1px;border-bottom-width:1px;border-bottom-style:solid;background-color:transparent;position:relative;box-sizing:content-box;min-width:64px;min-height:26px;flex-grow:1}.md-select-value>span:not(.md-select-icon){max-width:100%;flex:1 1 auto;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.md-select-value>span:not(.md-select-icon) .md-text{display:inline}.md-select-value .md-select-icon{display:block;align-items:flex-end;text-align:end;width:24px;margin:0 4px;transform:translate3d(0,-2px,0);font-size:1.2rem}.md-select-value .md-select-icon:after{display:block;content:'\25BC';position:relative;top:2px;speak:none;font-size:13px;transform:scaleY(.5) scaleX(1)}.md-select-value.md-select-placeholder{display:flex;order:1;pointer-events:none;-webkit-font-smoothing:antialiased;padding-left:2px;z-index:1}md-select-menu{display:flex;flex-direction:column;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);max-height:256px;min-height:48px;overflow-y:hidden;transform-origin:left top;transform:scale(1)}md-select-menu.md-reverse{flex-direction:column-reverse}md-select-menu:not(.md-overflow) md-content{padding-top:8px;padding-bottom:8px}[dir=rtl] md-select-menu{transform-origin:right top}md-select-menu md-content{min-width:136px;min-height:48px;max-height:256px;overflow-y:auto}md-select-menu>*{opacity:0}md-option{cursor:pointer;position:relative;display:flex;align-items:center;width:auto;transition:background .15s linear;padding:0 16px 0 16px;height:48px}md-option[disabled]{cursor:default}md-option:focus{outline:0}md-option .md-text{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}md-optgroup{display:block}md-optgroup label{display:block;font-size:14px;text-transform:uppercase;padding:16px;font-weight:500}md-optgroup md-option{padding-left:32px;padding-right:32px}@media screen and (-ms-high-contrast:active){.md-select-backdrop{background-color:transparent}md-select-menu{border:1px solid #fff}}md-select-menu[multiple] md-option.md-checkbox-enabled{padding-left:40px;padding-right:16px}[dir=rtl] md-select-menu[multiple] md-option.md-checkbox-enabled{padding-left:16px}[dir=rtl] md-select-menu[multiple] md-option.md-checkbox-enabled{padding-right:40px}md-select-menu[multiple] md-option.md-checkbox-enabled .md-container{position:absolute;top:50%;transform:translateY(-50%);box-sizing:border-box;display:inline-block;width:20px;height:20px;left:0;right:auto}[dir=rtl] md-select-menu[multiple] md-option.md-checkbox-enabled .md-container{left:auto}[dir=rtl] md-select-menu[multiple] md-option.md-checkbox-enabled .md-container{right:0}md-select-menu[multiple] md-option.md-checkbox-enabled .md-container:before{box-sizing:border-box;background-color:transparent;border-radius:50%;content:'';position:absolute;display:block;height:auto;left:0;top:0;right:0;bottom:0;transition:all .5s;width:auto}md-select-menu[multiple] md-option.md-checkbox-enabled .md-container:after{box-sizing:border-box;content:'';position:absolute;top:-10px;right:-10px;bottom:-10px;left:-10px}md-select-menu[multiple] md-option.md-checkbox-enabled .md-container .md-ripple-container{position:absolute;display:block;width:auto;height:auto;left:-15px;top:-15px;right:-15px;bottom:-15px}md-select-menu[multiple] md-option.md-checkbox-enabled .md-icon{box-sizing:border-box;transition:240ms;position:absolute;top:0;left:0;width:20px;height:20px;border-width:2px;border-style:solid;border-radius:2px}md-select-menu[multiple] md-option.md-checkbox-enabled[selected] .md-icon{border-color:transparent}md-select-menu[multiple] md-option.md-checkbox-enabled[selected] .md-icon:after{box-sizing:border-box;transform:rotate(45deg);position:absolute;left:4.6666666667px;top:.2222222222px;display:table;width:6.6666666667px;height:13.3333333333px;border-width:2px;border-style:solid;border-top:0;border-left:0;content:''}md-select-menu[multiple] md-option.md-checkbox-enabled[disabled]{cursor:default}md-select-menu[multiple] md-option.md-checkbox-enabled.md-indeterminate .md-icon:after{box-sizing:border-box;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:table;width:12px;height:2px;border-width:2px;border-style:solid;border-top:0;border-left:0;content:''}md-select-menu[multiple] md-option.md-checkbox-enabled .md-container{margin-left:10.6666666667px;margin-right:auto}[dir=rtl] md-select-menu[multiple] md-option.md-checkbox-enabled .md-container{margin-left:auto}[dir=rtl] md-select-menu[multiple] md-option.md-checkbox-enabled .md-container{margin-right:10.6666666667px}md-sidenav{box-sizing:border-box;position:absolute;flex-direction:column;z-index:60;width:320px;max-width:320px;bottom:0;overflow:auto;-webkit-overflow-scrolling:touch}md-sidenav ul{list-style:none}md-sidenav.md-closed{display:none}md-sidenav.md-closed-add,md-sidenav.md-closed-remove{display:flex;transition:.2s ease-in all}md-sidenav.md-closed-add.md-closed-add-active,md-sidenav.md-closed-remove.md-closed-remove-active{transition:all .4s cubic-bezier(.25,.8,.25,1)}md-sidenav.md-locked-open-add,md-sidenav.md-locked-open-remove{position:static;display:flex;transform:translate3d(0,0,0)}md-sidenav.md-locked-open,md-sidenav.md-locked-open-remove.md-closed,md-sidenav.md-locked-open.md-closed,md-sidenav.md-locked-open.md-closed.md-sidenav-left,md-sidenav.md-locked-open.md-closed.md-sidenav-right{position:static;display:flex;transform:translate3d(0,0,0)}md-sidenav.md-locked-open-remove-active{transition:width .3s cubic-bezier(.55,0,.55,.2),min-width .3s cubic-bezier(.55,0,.55,.2);width:0!important;min-width:0!important}md-sidenav.md-closed.md-locked-open-add{width:0!important;min-width:0!important;transform:translate3d(0,0,0)}md-sidenav.md-closed.md-locked-open-add-active{transition:width .3s cubic-bezier(.55,0,.55,.2),min-width .3s cubic-bezier(.55,0,.55,.2);width:320px;min-width:320px;transform:translate3d(0,0,0)}.md-sidenav-backdrop.md-locked-open{display:none}.md-sidenav-left,md-sidenav{left:0;top:0;transform:translate3d(0,0,0)}.md-sidenav-left.md-closed,md-sidenav.md-closed{transform:translate3d(-100%,0,0)}.md-sidenav-right{left:100%;top:0;transform:translate(-100%,0)}.md-sidenav-right.md-closed{transform:translate(0,0)}@media (min-width:600px){md-sidenav{max-width:400px}}@media (max-width:456px){md-sidenav{width:calc(100% - 56px);min-width:calc(100% - 56px);max-width:calc(100% - 56px)}}@media screen and (-ms-high-contrast:active){.md-sidenav-left,md-sidenav{border-right:1px solid #fff}.md-sidenav-right{border-left:1px solid #fff}}@keyframes sliderFocusThumb{0%{transform:scale(.7)}30%{transform:scale(1)}100%{transform:scale(.7)}}@keyframes sliderDiscreteFocusThumb{0%{transform:scale(.7)}50%{transform:scale(.8)}100%{transform:scale(0)}}@keyframes sliderDiscreteFocusRing{0%{transform:scale(.7);opacity:0}50%{transform:scale(1);opacity:1}100%{transform:scale(0)}}md-slider{height:48px;min-width:128px;position:relative;margin-left:4px;margin-right:4px;padding:0;display:block;flex-direction:row}md-slider *,md-slider :after{box-sizing:border-box}md-slider .md-slider-wrapper{outline:0;width:100%;height:100%}md-slider .md-slider-content{position:relative}md-slider .md-track-container{width:100%;position:absolute;top:23px;height:2px}md-slider .md-track{position:absolute;left:0;right:0;height:100%}md-slider .md-track-fill{transition:all .4s cubic-bezier(.25,.8,.25,1);transition-property:width,height}md-slider .md-track-ticks{position:absolute;left:0;right:0;height:100%}md-slider .md-track-ticks canvas{width:100%;height:100%}md-slider .md-thumb-container{position:absolute;left:0;top:50%;transform:translate3d(-50%,-50%,0);transition:all .4s cubic-bezier(.25,.8,.25,1);transition-property:left,right,bottom}[dir=rtl] md-slider .md-thumb-container{left:auto;right:0}md-slider .md-thumb{z-index:1;position:absolute;left:-10px;top:14px;width:20px;height:20px;border-radius:20px;transform:scale(.7);transition:all .4s cubic-bezier(.25,.8,.25,1)}[dir=rtl] md-slider .md-thumb{left:auto;right:-10px}md-slider .md-thumb:after{content:'';position:absolute;width:20px;height:20px;border-radius:20px;border-width:3px;border-style:solid;transition:inherit}md-slider .md-sign{display:flex;align-items:center;justify-content:center;position:absolute;left:-14px;top:-17px;width:28px;height:28px;border-radius:28px;transform:scale(.4) translate3d(0,67.5px,0);transition:all .3s cubic-bezier(.35,0,.25,1)}md-slider .md-sign:after{position:absolute;content:'';left:0;border-radius:16px;top:19px;border-left:14px solid transparent;border-right:14px solid transparent;border-top-width:16px;border-top-style:solid;opacity:0;transform:translate3d(0,-8px,0);transition:all .2s cubic-bezier(.35,0,.25,1)}[dir=rtl] md-slider .md-sign:after{left:auto;right:0}md-slider .md-sign .md-thumb-text{z-index:1;font-size:12px;font-weight:700}md-slider .md-focus-ring{position:absolute;left:-17px;top:7px;width:34px;height:34px;border-radius:34px;transform:scale(.7);opacity:0;transition:all .35s cubic-bezier(.35,0,.25,1)}[dir=rtl] md-slider .md-focus-ring{left:auto;right:-17px}md-slider .md-disabled-thumb{position:absolute;left:-14px;top:10px;width:28px;height:28px;border-radius:28px;transform:scale(.5);border-width:4px;border-style:solid;display:none}[dir=rtl] md-slider .md-disabled-thumb{left:auto;right:-14px}md-slider.md-min .md-sign{opacity:0}md-slider:focus{outline:0}md-slider.md-dragging .md-thumb-container,md-slider.md-dragging .md-track-fill{transition:none}md-slider:not([md-discrete]) .md-sign,md-slider:not([md-discrete]) .md-track-ticks{display:none}md-slider:not([md-discrete]):not([disabled]) .md-slider-wrapper .md-thumb:hover{transform:scale(.8)}md-slider:not([md-discrete]):not([disabled]) .md-slider-wrapper.md-focused .md-focus-ring{transform:scale(1);opacity:1}md-slider:not([md-discrete]):not([disabled]) .md-slider-wrapper.md-focused .md-thumb{animation:sliderFocusThumb .7s cubic-bezier(.35,0,.25,1)}md-slider:not([md-discrete]):not([disabled]).md-active .md-slider-wrapper .md-thumb{transform:scale(1)}md-slider[md-discrete]:not([disabled]) .md-slider-wrapper.md-focused .md-focus-ring{transform:scale(0);animation:sliderDiscreteFocusRing .5s cubic-bezier(.35,0,.25,1)}md-slider[md-discrete]:not([disabled]) .md-slider-wrapper.md-focused .md-thumb{animation:sliderDiscreteFocusThumb .5s cubic-bezier(.35,0,.25,1)}md-slider[md-discrete]:not([disabled]) .md-slider-wrapper.md-focused .md-thumb,md-slider[md-discrete]:not([disabled]).md-active .md-thumb{transform:scale(0)}md-slider[md-discrete]:not([disabled]) .md-slider-wrapper.md-focused .md-sign,md-slider[md-discrete]:not([disabled]) .md-slider-wrapper.md-focused .md-sign:after,md-slider[md-discrete]:not([disabled]).md-active .md-sign,md-slider[md-discrete]:not([disabled]).md-active .md-sign:after{opacity:1;transform:translate3d(0,0,0) scale(1)}md-slider[md-discrete][disabled][readonly] .md-thumb{transform:scale(0)}md-slider[md-discrete][disabled][readonly] .md-sign,md-slider[md-discrete][disabled][readonly] .md-sign:after{opacity:1;transform:translate3d(0,0,0) scale(1)}md-slider[disabled] .md-track-fill{display:none}md-slider[disabled] .md-track-ticks{opacity:0}md-slider[disabled]:not([readonly]) .md-sign{opacity:0}md-slider[disabled] .md-thumb{transform:scale(.5)}md-slider[disabled] .md-disabled-thumb{display:block}md-slider[md-vertical]{flex-direction:column;min-height:128px;min-width:0}md-slider[md-vertical] .md-slider-wrapper{flex:1;padding-top:12px;padding-bottom:12px;width:48px;align-self:center;display:flex;justify-content:center}md-slider[md-vertical] .md-track-container{height:100%;width:2px;top:0;left:calc(50% - (2px / 2))}md-slider[md-vertical] .md-thumb-container{top:auto;margin-bottom:23px;left:calc(50% - 1px);bottom:0}md-slider[md-vertical] .md-thumb-container .md-thumb:after{left:1px}md-slider[md-vertical] .md-thumb-container .md-focus-ring{left:-16px}md-slider[md-vertical] .md-track-fill{bottom:0}md-slider[md-vertical][md-discrete] .md-sign{left:-40px;top:9.5px;transform:scale(.4) translate3d(67.5px,0,0)}md-slider[md-vertical][md-discrete] .md-sign:after{top:9.5px;left:19px;border-top:14px solid transparent;border-right:0;border-bottom:14px solid transparent;border-left-width:16px;border-left-style:solid;opacity:0;transform:translate3d(0,-8px,0);transition:all .2s ease-in-out}md-slider[md-vertical][md-discrete] .md-sign .md-thumb-text{z-index:1;font-size:12px;font-weight:700}md-slider[md-vertical][md-discrete] .md-focused .md-sign:after,md-slider[md-vertical][md-discrete].md-active .md-sign:after,md-slider[md-vertical][md-discrete][disabled][readonly] .md-sign:after{top:0}md-slider[md-vertical][disabled][readonly] .md-thumb{transform:scale(0)}md-slider[md-vertical][disabled][readonly] .md-sign,md-slider[md-vertical][disabled][readonly] .md-sign:after{opacity:1;transform:translate3d(0,0,0) scale(1)}md-slider[md-invert]:not([md-vertical]) .md-track-fill{left:auto;right:0}[dir=rtl] md-slider[md-invert]:not([md-vertical]) .md-track-fill{left:0}[dir=rtl] md-slider[md-invert]:not([md-vertical]) .md-track-fill{right:auto}md-slider[md-invert][md-vertical] .md-track-fill{bottom:auto;top:0}md-slider-container{display:flex;align-items:center;flex-direction:row}md-slider-container>:first-child:not(md-slider),md-slider-container>:last-child:not(md-slider){min-width:25px;max-width:42px;height:25px;transition:all .4s cubic-bezier(.25,.8,.25,1);transition-property:color,max-width}md-slider-container>:first-child:not(md-slider){margin-right:16px}[dir=rtl] md-slider-container>:first-child:not(md-slider){margin-right:auto;margin-left:16px}md-slider-container>:last-child:not(md-slider){margin-left:16px}[dir=rtl] md-slider-container>:last-child:not(md-slider){margin-left:auto;margin-right:16px}md-slider-container[md-vertical]{flex-direction:column}md-slider-container[md-vertical]>:first-child:not(md-slider),md-slider-container[md-vertical]>:last-child:not(md-slider){margin-right:0;margin-left:0;text-align:center}md-slider-container md-input-container input[type=number]{text-align:center;padding-left:15px;height:50px;margin-top:-25px}[dir=rtl] md-slider-container md-input-container input[type=number]{padding-left:0;padding-right:15px}@media screen and (-ms-high-contrast:active){md-slider.md-default-theme .md-track{border-bottom:1px solid #fff}}.md-sticky-clone{z-index:2;top:0;left:0;right:0;position:absolute!important;transform:translate3d(-9999px,-9999px,0)}.md-sticky-clone[sticky-state=active]{transform:translate3d(0,0,0)}.md-sticky-clone[sticky-state=active]:not(.md-sticky-no-effect) .md-subheader-inner{animation:subheaderStickyHoverIn .3s ease-out both}@keyframes subheaderStickyHoverIn{0%{box-shadow:0 0 0 0 transparent}100%{box-shadow:0 2px 4px 0 rgba(0,0,0,.16)}}@keyframes subheaderStickyHoverOut{0%{box-shadow:0 2px 4px 0 rgba(0,0,0,.16)}100%{box-shadow:0 0 0 0 transparent}}.md-subheader-wrapper:not(.md-sticky-no-effect){transition:.2s ease-out margin}.md-subheader-wrapper:not(.md-sticky-no-effect) .md-subheader{margin:0}.md-subheader-wrapper:not(.md-sticky-no-effect).md-sticky-clone{z-index:2}.md-subheader-wrapper:not(.md-sticky-no-effect)[sticky-state=active]{margin-top:-2px}.md-subheader-wrapper:not(.md-sticky-no-effect):not(.md-sticky-clone)[sticky-prev-state=active] .md-subheader-inner:after{animation:subheaderStickyHoverOut .3s ease-out both}.md-subheader{display:block;font-size:14px;font-weight:500;line-height:1em;margin:0;position:relative}.md-subheader .md-subheader-inner{display:block;padding:16px}.md-subheader .md-subheader-content{display:block;z-index:1;position:relative}.md-inline-form md-switch{margin-top:18px;margin-bottom:19px}md-switch{margin:16px 0;white-space:nowrap;cursor:pointer;outline:0;user-select:none;height:30px;line-height:28px;align-items:center;display:flex;margin-left:inherit;margin-right:16px}[dir=rtl] md-switch{margin-left:16px}[dir=rtl] md-switch{margin-right:inherit}md-switch:last-of-type{margin-left:inherit;margin-right:0}[dir=rtl] md-switch:last-of-type{margin-left:0}[dir=rtl] md-switch:last-of-type{margin-right:inherit}md-switch[disabled]{cursor:default}md-switch[disabled] .md-container{cursor:default}md-switch .md-container{cursor:grab;width:36px;height:24px;position:relative;user-select:none;margin-right:8px;float:left}[dir=rtl] md-switch .md-container{margin-right:auto;margin-left:8px}md-switch:not([disabled]) .md-dragging,md-switch:not([disabled]).md-dragging .md-container{cursor:grabbing}md-switch.md-focused:not([disabled]) .md-thumb:before{left:-8px;top:-8px;right:-8px;bottom:-8px}md-switch.md-focused:not([disabled]):not(.md-checked) .md-thumb:before{background-color:rgba(0,0,0,.12)}md-switch .md-label{border-color:transparent;border-width:0;float:left}md-switch .md-bar{left:1px;width:34px;top:5px;height:14px;border-radius:8px;position:absolute}md-switch .md-thumb-container{top:2px;left:0;width:16px;position:absolute;transform:translate3d(0,0,0);z-index:1}md-switch.md-checked .md-thumb-container{transform:translate3d(100%,0,0)}md-switch .md-thumb{position:absolute;margin:0;left:0;top:0;outline:0;height:20px;width:20px;border-radius:50%;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}md-switch .md-thumb:before{background-color:transparent;border-radius:50%;content:'';position:absolute;display:block;height:auto;left:0;top:0;right:0;bottom:0;transition:all .5s;width:auto}md-switch .md-thumb .md-ripple-container{position:absolute;display:block;width:auto;height:auto;left:-20px;top:-20px;right:-20px;bottom:-20px}md-switch:not(.md-dragging) .md-bar,md-switch:not(.md-dragging) .md-thumb,md-switch:not(.md-dragging) .md-thumb-container{transition:all 80ms linear;transition-property:transform,background-color}md-switch:not(.md-dragging) .md-bar,md-switch:not(.md-dragging) .md-thumb{transition-delay:50ms}@media screen and (-ms-high-contrast:active){md-switch.md-default-theme .md-bar{background-color:#666}md-switch.md-default-theme.md-checked .md-bar{background-color:#9e9e9e}md-switch.md-default-theme .md-thumb{background-color:#fff}}@keyframes md-tab-content-hide{0%{opacity:1}50%{opacity:1}100%{opacity:0}}md-tab-data{position:absolute;top:0;left:0;right:0;bottom:0;z-index:-1;opacity:0}md-tabs{display:block;margin:0;border-radius:2px;overflow:hidden;position:relative;flex-shrink:0}md-tabs:not(.md-no-tab-content):not(.md-dynamic-height){min-height:248px}md-tabs[md-align-tabs=bottom]{padding-bottom:48px}md-tabs[md-align-tabs=bottom] md-tabs-wrapper{position:absolute;bottom:0;left:0;right:0;height:48px;z-index:2}md-tabs[md-align-tabs=bottom] md-tabs-content-wrapper{top:0;bottom:48px}md-tabs.md-dynamic-height md-tabs-content-wrapper{min-height:0;position:relative;top:auto;left:auto;right:auto;bottom:auto;overflow:visible}md-tabs.md-dynamic-height md-tab-content.md-active{position:relative}md-tabs[md-border-bottom] md-tabs-wrapper{border-width:0 0 1px;border-style:solid}md-tabs[md-border-bottom]:not(.md-dynamic-height) md-tabs-content-wrapper{top:49px}md-tabs-wrapper{display:block;position:relative;transform:translate3d(0,0,0)}md-tabs-wrapper md-next-button,md-tabs-wrapper md-prev-button{height:100%;width:32px;position:absolute;top:50%;transform:translateY(-50%);line-height:1em;z-index:2;cursor:pointer;font-size:16px;background:transparent no-repeat center center;transition:all .5s cubic-bezier(.35,0,.25,1)}md-tabs-wrapper md-next-button:focus,md-tabs-wrapper md-prev-button:focus{outline:0}md-tabs-wrapper md-next-button.md-disabled,md-tabs-wrapper md-prev-button.md-disabled{opacity:.25;cursor:default}md-tabs-wrapper md-next-button.ng-leave,md-tabs-wrapper md-prev-button.ng-leave{transition:none}md-tabs-wrapper md-next-button md-icon,md-tabs-wrapper md-prev-button md-icon{position:absolute;top:50%;left:50%;transform:translate3d(-50%,-50%,0)}md-tabs-wrapper md-prev-button{left:0;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE3LjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPiA8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPiA8c3ZnIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIyNHB4IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMjQgMjQiIHhtbDpzcGFjZT0icHJlc2VydmUiPiA8ZyBpZD0iSGVhZGVyIj4gPGc+IDxyZWN0IHg9Ii02MTgiIHk9Ii0xMjA4IiBmaWxsPSJub25lIiB3aWR0aD0iMTQwMCIgaGVpZ2h0PSIzNjAwIi8+IDwvZz4gPC9nPiA8ZyBpZD0iTGFiZWwiPiA8L2c+IDxnIGlkPSJJY29uIj4gPGc+IDxwb2x5Z29uIHBvaW50cz0iMTUuNCw3LjQgMTQsNiA4LDEyIDE0LDE4IDE1LjQsMTYuNiAxMC44LDEyIAkJIiBzdHlsZT0iZmlsbDp3aGl0ZTsiLz4gPHJlY3QgZmlsbD0ibm9uZSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ii8+IDwvZz4gPC9nPiA8ZyBpZD0iR3JpZCIgZGlzcGxheT0ibm9uZSI+IDxnIGRpc3BsYXk9ImlubGluZSI+IDwvZz4gPC9nPiA8L3N2Zz4NCg==)}[dir=rtl] md-tabs-wrapper md-prev-button{left:auto;right:0}md-tabs-wrapper md-next-button{right:0;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE3LjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPiA8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPiA8c3ZnIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIyNHB4IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMjQgMjQiIHhtbDpzcGFjZT0icHJlc2VydmUiPiA8ZyBpZD0iSGVhZGVyIj4gPGc+IDxyZWN0IHg9Ii02MTgiIHk9Ii0xMzM2IiBmaWxsPSJub25lIiB3aWR0aD0iMTQwMCIgaGVpZ2h0PSIzNjAwIi8+IDwvZz4gPC9nPiA8ZyBpZD0iTGFiZWwiPiA8L2c+IDxnIGlkPSJJY29uIj4gPGc+IDxwb2x5Z29uIHBvaW50cz0iMTAsNiA4LjYsNy40IDEzLjIsMTIgOC42LDE2LjYgMTAsMTggMTYsMTIgCQkiIHN0eWxlPSJmaWxsOndoaXRlOyIvPiA8cmVjdCBmaWxsPSJub25lIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiLz4gPC9nPiA8L2c+IDxnIGlkPSJHcmlkIiBkaXNwbGF5PSJub25lIj4gPGcgZGlzcGxheT0iaW5saW5lIj4gPC9nPiA8L2c+IDwvc3ZnPg0K)}[dir=rtl] md-tabs-wrapper md-next-button{right:auto;left:0}md-tabs-wrapper md-next-button md-icon{transform:translate3d(-50%,-50%,0) rotate(180deg)}md-tabs-wrapper.md-stretch-tabs md-pagination-wrapper{width:100%;display:flex;flex-direction:row}md-tabs-wrapper.md-stretch-tabs md-pagination-wrapper md-tab-item{flex-grow:1}md-tabs-canvas{position:relative;overflow:hidden;display:block;height:48px}md-tabs-canvas:after{content:'';display:table;clear:both}md-tabs-canvas .md-dummy-wrapper{position:absolute;top:0;left:0}[dir=rtl] md-tabs-canvas .md-dummy-wrapper{left:auto;right:0}md-tabs-canvas.md-paginated{margin:0 32px}md-tabs-canvas.md-center-tabs{display:flex;flex-direction:column;text-align:center}md-tabs-canvas.md-center-tabs .md-tab{float:none;display:inline-block}md-pagination-wrapper{height:48px;display:block;transition:transform .5s cubic-bezier(.35,0,.25,1);position:absolute;width:999999px;left:0;transform:translate3d(0,0,0)}md-pagination-wrapper:after{content:'';display:table;clear:both}[dir=rtl] md-pagination-wrapper{left:auto;right:0}md-pagination-wrapper.md-center-tabs{position:relative;width:auto;margin:0 auto}md-tabs-content-wrapper{display:block;position:absolute;top:48px;left:0;right:0;bottom:0;overflow:hidden}md-tab-content{display:block;position:absolute;top:0;left:0;right:0;bottom:0;transition:transform .5s cubic-bezier(.35,0,.25,1);overflow:auto;transform:translate3d(0,0,0)}md-tab-content.md-no-scroll{bottom:auto;overflow:hidden}md-tab-content.md-no-transition,md-tab-content.ng-leave{transition:none}md-tab-content.md-left:not(.md-active){transform:translateX(-100%);animation:1s md-tab-content-hide;opacity:0}[dir=rtl] md-tab-content.md-left:not(.md-active){transform:translateX(100%)}md-tab-content.md-left:not(.md-active) *{transition:visibility 0s linear;transition-delay:.5s;visibility:hidden}md-tab-content.md-right:not(.md-active){transform:translateX(100%);animation:1s md-tab-content-hide;opacity:0}[dir=rtl] md-tab-content.md-right:not(.md-active){transform:translateX(-100%)}md-tab-content.md-right:not(.md-active) *{transition:visibility 0s linear;transition-delay:.5s;visibility:hidden}md-tab-content>div.ng-leave{animation:1s md-tab-content-hide}md-ink-bar{position:absolute;left:auto;right:auto;bottom:0;height:2px}md-ink-bar.md-left{transition:left 125ms cubic-bezier(.35,0,.25,1),right .25s cubic-bezier(.35,0,.25,1)}md-ink-bar.md-right{transition:left .25s cubic-bezier(.35,0,.25,1),right 125ms cubic-bezier(.35,0,.25,1)}md-tab{position:absolute;z-index:-1;left:-9999px}.md-tab{font-size:14px;text-align:center;line-height:24px;padding:12px 24px;transition:background-color .35s cubic-bezier(.35,0,.25,1);cursor:pointer;white-space:nowrap;position:relative;text-transform:uppercase;float:left;font-weight:500;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis}[dir=rtl] .md-tab{float:right}.md-tab.md-focused{box-shadow:none;outline:0}.md-tab.md-active{cursor:default}.md-tab.md-disabled{pointer-events:none;touch-action:pan-y;user-select:none;-webkit-user-drag:none;opacity:.5;cursor:default}.md-tab.ng-leave{transition:none}md-toolbar+md-tabs{border-top-left-radius:0;border-top-right-radius:0}.md-toast-text{padding:0 6px}md-toast{position:absolute;z-index:105;box-sizing:border-box;cursor:default;overflow:hidden;padding:8px;opacity:1;transition:all .4s cubic-bezier(.25,.8,.25,1)}md-toast .md-toast-content{display:flex;direction:row;align-items:center;max-height:168px;max-width:100%;min-height:48px;padding:0 18px;box-shadow:0 2px 5px 0 rgba(0,0,0,.26);border-radius:2px;font-size:14px;overflow:hidden;transform:translate3d(0,0,0) rotateZ(0);transition:all .4s cubic-bezier(.25,.8,.25,1);justify-content:flex-start}md-toast .md-toast-content::before{content:'';min-height:48px;visibility:hidden;display:inline-block}[dir=rtl] md-toast .md-toast-content{justify-content:flex-end}md-toast .md-toast-content span{flex:1 1 0%;box-sizing:border-box;min-width:0}md-toast.md-capsule{border-radius:24px}md-toast.md-capsule .md-toast-content{border-radius:24px}md-toast.ng-leave-active .md-toast-content{transition:all .3s cubic-bezier(.55,0,.55,.2)}md-toast.md-swipedown .md-toast-content,md-toast.md-swipeleft .md-toast-content,md-toast.md-swiperight .md-toast-content,md-toast.md-swipeup .md-toast-content{transition:all .4s cubic-bezier(.25,.8,.25,1)}md-toast.ng-enter{opacity:0}md-toast.ng-enter .md-toast-content{transform:translate3d(0,100%,0)}md-toast.ng-enter.md-top .md-toast-content{transform:translate3d(0,-100%,0)}md-toast.ng-enter.ng-enter-active{opacity:1}md-toast.ng-enter.ng-enter-active .md-toast-content{transform:translate3d(0,0,0)}md-toast.ng-leave.ng-leave-active .md-toast-content{opacity:0;transform:translate3d(0,100%,0)}md-toast.ng-leave.ng-leave-active.md-swipeup .md-toast-content{transform:translate3d(0,-50%,0)}md-toast.ng-leave.ng-leave-active.md-swipedown .md-toast-content{transform:translate3d(0,50%,0)}md-toast.ng-leave.ng-leave-active.md-top .md-toast-content{transform:translate3d(0,-100%,0)}md-toast .md-action{line-height:19px;margin-left:24px;margin-right:0;cursor:pointer;text-transform:uppercase;float:right}md-toast .md-button{min-width:0;margin-right:0;margin-left:12px}[dir=rtl] md-toast .md-button{margin-right:12px}[dir=rtl] md-toast .md-button{margin-left:0}@media (max-width:959px){md-toast{left:0;right:0;width:100%;max-width:100%;min-width:0;border-radius:0;bottom:0;padding:0}md-toast.ng-leave.ng-leave-active.md-swipeup .md-toast-content{transform:translate3d(0,-50%,0)}md-toast.ng-leave.ng-leave-active.md-swipedown .md-toast-content{transform:translate3d(0,50%,0)}}@media (min-width:960px){md-toast{min-width:304px}md-toast.md-bottom{bottom:0}md-toast.md-left{left:0}md-toast.md-right{right:0}md-toast.md-top{top:0}md-toast._md-start{left:0}[dir=rtl] md-toast._md-start{left:auto;right:0}md-toast._md-end{right:0}[dir=rtl] md-toast._md-end{right:auto;left:0}md-toast.ng-leave.ng-leave-active.md-swipeleft .md-toast-content{transform:translate3d(-50%,0,0)}md-toast.ng-leave.ng-leave-active.md-swiperight .md-toast-content{transform:translate3d(50%,0,0)}}@media (min-width:1920px){md-toast .md-toast-content{max-width:568px}}@media screen and (-ms-high-contrast:active){md-toast{border:1px solid #fff}}.md-toast-animating{overflow:hidden!important}md-toolbar{box-sizing:border-box;display:flex;flex-direction:column;position:relative;z-index:2;font-size:20px;min-height:64px;width:100%}md-toolbar._md-toolbar-transitions{transition-duration:.5s;transition-timing-function:cubic-bezier(.35,0,.25,1);transition-property:background-color,fill,color}md-toolbar.md-whiteframe-z1-add,md-toolbar.md-whiteframe-z1-remove{transition:box-shadow .5s linear}md-toolbar md-toolbar-filler{width:72px}md-toolbar *,md-toolbar :after,md-toolbar :before{box-sizing:border-box}md-toolbar.ng-animate{transition:none}md-toolbar.md-tall{height:128px;min-height:128px;max-height:128px}md-toolbar.md-medium-tall{height:88px;min-height:88px;max-height:88px}md-toolbar.md-medium-tall .md-toolbar-tools{height:48px;min-height:48px;max-height:48px}md-toolbar>.md-indent{margin-left:64px}[dir=rtl] md-toolbar>.md-indent{margin-left:auto;margin-right:64px}md-toolbar~md-content>md-list{padding:0}md-toolbar~md-content>md-list md-list-item:last-child md-divider{display:none}.md-toolbar-tools{font-size:20px;letter-spacing:.005em;box-sizing:border-box;font-weight:400;display:flex;align-items:center;flex-direction:row;width:100%;height:64px;max-height:64px;padding:0 16px;margin:0}.md-toolbar-tools h1,.md-toolbar-tools h2,.md-toolbar-tools h3{font-size:inherit;font-weight:inherit;margin:inherit}.md-toolbar-tools a{color:inherit;text-decoration:none}.md-toolbar-tools .fill-height{display:flex;align-items:center}.md-toolbar-tools .md-button{margin-top:0;margin-bottom:0}.md-toolbar-tools .md-button,.md-toolbar-tools .md-button.md-icon-button md-icon{transition-duration:.5s;transition-timing-function:cubic-bezier(.35,0,.25,1);transition-property:background-color,fill,color}.md-toolbar-tools .md-button.md-icon-button md-icon.ng-animate,.md-toolbar-tools .md-button.ng-animate{transition:none}.md-toolbar-tools>.md-button:first-child{margin-left:-8px}[dir=rtl] .md-toolbar-tools>.md-button:first-child{margin-left:auto;margin-right:-8px}.md-toolbar-tools>.md-button:last-child{margin-right:-8px}[dir=rtl] .md-toolbar-tools>.md-button:last-child{margin-right:auto;margin-left:-8px}.md-toolbar-tools>md-menu:last-child{margin-right:-8px}[dir=rtl] .md-toolbar-tools>md-menu:last-child{margin-right:auto;margin-left:-8px}.md-toolbar-tools>md-menu:last-child>.md-button{margin-right:0}[dir=rtl] .md-toolbar-tools>md-menu:last-child>.md-button{margin-right:auto;margin-left:0}@media screen and (-ms-high-contrast:active){.md-toolbar-tools{border-bottom:1px solid #fff}}@media (min-width:0) and (max-width:959px) and (orientation:portrait){md-toolbar{min-height:56px}.md-toolbar-tools{height:56px;max-height:56px}}@media (min-width:0) and (max-width:959px) and (orientation:landscape){md-toolbar{min-height:48px}.md-toolbar-tools{height:48px;max-height:48px}}md-tooltip{position:absolute;z-index:100;overflow:hidden;pointer-events:none;border-radius:4px;font-weight:500;font-size:14px}@media (min-width:960px){md-tooltip{font-size:10px}}md-tooltip .md-content{position:relative;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transform-origin:center top;transform:scale(0);opacity:0;height:32px;line-height:32px;padding-left:16px;padding-right:16px}@media (min-width:960px){md-tooltip .md-content{height:22px;line-height:22px;padding-left:8px;padding-right:8px}}md-tooltip .md-content.md-show-add{transition:all .4s cubic-bezier(.25,.8,.25,1);transition-duration:.2s;transform:scale(0);opacity:0}md-tooltip .md-content.md-show,md-tooltip .md-content.md-show-add-active{transform:scale(1);opacity:.9;transform-origin:center top}md-tooltip .md-content.md-show-remove{transition:all .4s cubic-bezier(.25,.8,.25,1);transition-duration:.2s}md-tooltip .md-content.md-show-remove.md-show-remove-active{transform:scale(0);opacity:0}md-tooltip.md-hide{transition:all .3s cubic-bezier(.55,0,.55,.2)}md-tooltip.md-show{transition:all .4s cubic-bezier(.25,.8,.25,1);pointer-events:auto}.md-virtual-repeat-container{box-sizing:border-box;display:block;margin:0;overflow:hidden;padding:0;position:relative}.md-virtual-repeat-container .md-virtual-repeat-scroller{bottom:0;box-sizing:border-box;left:0;margin:0;overflow-x:hidden;padding:0;position:absolute;right:0;top:0;-webkit-overflow-scrolling:touch}.md-virtual-repeat-container .md-virtual-repeat-sizer{box-sizing:border-box;height:1px;display:block;margin:0;padding:0;width:1px}.md-virtual-repeat-container .md-virtual-repeat-offsetter{box-sizing:border-box;left:0;margin:0;padding:0;position:absolute;right:0;top:0}.md-virtual-repeat-container.md-orient-horizontal .md-virtual-repeat-scroller{overflow-x:auto;overflow-y:hidden}.md-virtual-repeat-container.md-orient-horizontal .md-virtual-repeat-offsetter{bottom:16px;right:auto;white-space:nowrap}[dir=rtl] .md-virtual-repeat-container.md-orient-horizontal .md-virtual-repeat-offsetter{right:auto;left:auto}.md-whiteframe-1dp,.md-whiteframe-z1{box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}.md-whiteframe-2dp{box-shadow:0 1px 5px 0 rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12)}.md-whiteframe-3dp{box-shadow:0 1px 8px 0 rgba(0,0,0,.2),0 3px 4px 0 rgba(0,0,0,.14),0 3px 3px -2px rgba(0,0,0,.12)}.md-whiteframe-4dp,.md-whiteframe-z2{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.md-whiteframe-5dp{box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 5px 8px 0 rgba(0,0,0,.14),0 1px 14px 0 rgba(0,0,0,.12)}.md-whiteframe-6dp{box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12)}.md-whiteframe-7dp,.md-whiteframe-z3{box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12)}.md-whiteframe-8dp{box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.md-whiteframe-9dp{box-shadow:0 5px 6px -3px rgba(0,0,0,.2),0 9px 12px 1px rgba(0,0,0,.14),0 3px 16px 2px rgba(0,0,0,.12)}.md-whiteframe-10dp,.md-whiteframe-z4{box-shadow:0 6px 6px -3px rgba(0,0,0,.2),0 10px 14px 1px rgba(0,0,0,.14),0 4px 18px 3px rgba(0,0,0,.12)}.md-whiteframe-11dp{box-shadow:0 6px 7px -4px rgba(0,0,0,.2),0 11px 15px 1px rgba(0,0,0,.14),0 4px 20px 3px rgba(0,0,0,.12)}.md-whiteframe-12dp{box-shadow:0 7px 8px -4px rgba(0,0,0,.2),0 12px 17px 2px rgba(0,0,0,.14),0 5px 22px 4px rgba(0,0,0,.12)}.md-whiteframe-13dp,.md-whiteframe-z5{box-shadow:0 7px 8px -4px rgba(0,0,0,.2),0 13px 19px 2px rgba(0,0,0,.14),0 5px 24px 4px rgba(0,0,0,.12)}.md-whiteframe-14dp{box-shadow:0 7px 9px -4px rgba(0,0,0,.2),0 14px 21px 2px rgba(0,0,0,.14),0 5px 26px 4px rgba(0,0,0,.12)}.md-whiteframe-15dp{box-shadow:0 8px 9px -5px rgba(0,0,0,.2),0 15px 22px 2px rgba(0,0,0,.14),0 6px 28px 5px rgba(0,0,0,.12)}.md-whiteframe-16dp{box-shadow:0 8px 10px -5px rgba(0,0,0,.2),0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12)}.md-whiteframe-17dp{box-shadow:0 8px 11px -5px rgba(0,0,0,.2),0 17px 26px 2px rgba(0,0,0,.14),0 6px 32px 5px rgba(0,0,0,.12)}.md-whiteframe-18dp{box-shadow:0 9px 11px -5px rgba(0,0,0,.2),0 18px 28px 2px rgba(0,0,0,.14),0 7px 34px 6px rgba(0,0,0,.12)}.md-whiteframe-19dp{box-shadow:0 9px 12px -6px rgba(0,0,0,.2),0 19px 29px 2px rgba(0,0,0,.14),0 7px 36px 6px rgba(0,0,0,.12)}.md-whiteframe-20dp{box-shadow:0 10px 13px -6px rgba(0,0,0,.2),0 20px 31px 3px rgba(0,0,0,.14),0 8px 38px 7px rgba(0,0,0,.12)}.md-whiteframe-21dp{box-shadow:0 10px 13px -6px rgba(0,0,0,.2),0 21px 33px 3px rgba(0,0,0,.14),0 8px 40px 7px rgba(0,0,0,.12)}.md-whiteframe-22dp{box-shadow:0 10px 14px -6px rgba(0,0,0,.2),0 22px 35px 3px rgba(0,0,0,.14),0 8px 42px 7px rgba(0,0,0,.12)}.md-whiteframe-23dp{box-shadow:0 11px 14px -7px rgba(0,0,0,.2),0 23px 36px 3px rgba(0,0,0,.14),0 9px 44px 8px rgba(0,0,0,.12)}.md-whiteframe-24dp{box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12)}@media screen and (-ms-high-contrast:active){md-whiteframe{border:1px solid #fff}}@media print{[md-whiteframe],md-whiteframe{background-color:#fff}}.ng-cloak,.x-ng-cloak,[data-ng-cloak],[ng-cloak],[ng\:cloak],[x-ng-cloak]{display:none!important}@-moz-document url-prefix(){.layout-fill{margin:0;width:100%;min-height:100%;height:100%}}.flex-order{order:0}.flex-order--20{order:-20}.flex-order--19{order:-19}.flex-order--18{order:-18}.flex-order--17{order:-17}.flex-order--16{order:-16}.flex-order--15{order:-15}.flex-order--14{order:-14}.flex-order--13{order:-13}.flex-order--12{order:-12}.flex-order--11{order:-11}.flex-order--10{order:-10}.flex-order--9{order:-9}.flex-order--8{order:-8}.flex-order--7{order:-7}.flex-order--6{order:-6}.flex-order--5{order:-5}.flex-order--4{order:-4}.flex-order--3{order:-3}.flex-order--2{order:-2}.flex-order--1{order:-1}.flex-order-0{order:0}.flex-order-1{order:1}.flex-order-2{order:2}.flex-order-3{order:3}.flex-order-4{order:4}.flex-order-5{order:5}.flex-order-6{order:6}.flex-order-7{order:7}.flex-order-8{order:8}.flex-order-9{order:9}.flex-order-10{order:10}.flex-order-11{order:11}.flex-order-12{order:12}.flex-order-13{order:13}.flex-order-14{order:14}.flex-order-15{order:15}.flex-order-16{order:16}.flex-order-17{order:17}.flex-order-18{order:18}.flex-order-19{order:19}.flex-order-20{order:20}.flex-offset-0,.offset-0{margin-left:0}[dir=rtl] .flex-offset-0,[dir=rtl] .offset-0{margin-left:auto;margin-right:0}.flex-offset-5,.offset-5{margin-left:5%}[dir=rtl] .flex-offset-5,[dir=rtl] .offset-5{margin-left:auto;margin-right:5%}.flex-offset-10,.offset-10{margin-left:10%}[dir=rtl] .flex-offset-10,[dir=rtl] .offset-10{margin-left:auto;margin-right:10%}.flex-offset-15,.offset-15{margin-left:15%}[dir=rtl] .flex-offset-15,[dir=rtl] .offset-15{margin-left:auto;margin-right:15%}.flex-offset-20,.offset-20{margin-left:20%}[dir=rtl] .flex-offset-20,[dir=rtl] .offset-20{margin-left:auto;margin-right:20%}.flex-offset-25,.offset-25{margin-left:25%}[dir=rtl] .flex-offset-25,[dir=rtl] .offset-25{margin-left:auto;margin-right:25%}.flex-offset-30,.offset-30{margin-left:30%}[dir=rtl] .flex-offset-30,[dir=rtl] .offset-30{margin-left:auto;margin-right:30%}.flex-offset-35,.offset-35{margin-left:35%}[dir=rtl] .flex-offset-35,[dir=rtl] .offset-35{margin-left:auto;margin-right:35%}.flex-offset-40,.offset-40{margin-left:40%}[dir=rtl] .flex-offset-40,[dir=rtl] .offset-40{margin-left:auto;margin-right:40%}.flex-offset-45,.offset-45{margin-left:45%}[dir=rtl] .flex-offset-45,[dir=rtl] .offset-45{margin-left:auto;margin-right:45%}.flex-offset-50,.offset-50{margin-left:50%}[dir=rtl] .flex-offset-50,[dir=rtl] .offset-50{margin-left:auto;margin-right:50%}.flex-offset-55,.offset-55{margin-left:55%}[dir=rtl] .flex-offset-55,[dir=rtl] .offset-55{margin-left:auto;margin-right:55%}.flex-offset-60,.offset-60{margin-left:60%}[dir=rtl] .flex-offset-60,[dir=rtl] .offset-60{margin-left:auto;margin-right:60%}.flex-offset-65,.offset-65{margin-left:65%}[dir=rtl] .flex-offset-65,[dir=rtl] .offset-65{margin-left:auto;margin-right:65%}.flex-offset-70,.offset-70{margin-left:70%}[dir=rtl] .flex-offset-70,[dir=rtl] .offset-70{margin-left:auto;margin-right:70%}.flex-offset-75,.offset-75{margin-left:75%}[dir=rtl] .flex-offset-75,[dir=rtl] .offset-75{margin-left:auto;margin-right:75%}.flex-offset-80,.offset-80{margin-left:80%}[dir=rtl] .flex-offset-80,[dir=rtl] .offset-80{margin-left:auto;margin-right:80%}.flex-offset-85,.offset-85{margin-left:85%}[dir=rtl] .flex-offset-85,[dir=rtl] .offset-85{margin-left:auto;margin-right:85%}.flex-offset-90,.offset-90{margin-left:90%}[dir=rtl] .flex-offset-90,[dir=rtl] .offset-90{margin-left:auto;margin-right:90%}.flex-offset-95,.offset-95{margin-left:95%}[dir=rtl] .flex-offset-95,[dir=rtl] .offset-95{margin-left:auto;margin-right:95%}.flex-offset-33,.offset-33{margin-left:calc(100% / 3)}.flex-offset-66,.offset-66{margin-left:calc(200% / 3)}[dir=rtl] .flex-offset-66,[dir=rtl] .offset-66{margin-left:auto;margin-right:calc(200% / 3)}.layout-align,.layout-align-start-stretch{justify-content:flex-start;align-content:stretch;align-items:stretch}.layout-align-start,.layout-align-start-center,.layout-align-start-end,.layout-align-start-start,.layout-align-start-stretch{justify-content:flex-start}.layout-align-center,.layout-align-center-center,.layout-align-center-end,.layout-align-center-start,.layout-align-center-stretch{justify-content:center}.layout-align-end,.layout-align-end-center,.layout-align-end-end,.layout-align-end-start,.layout-align-end-stretch{justify-content:flex-end}.layout-align-space-around,.layout-align-space-around-center,.layout-align-space-around-end,.layout-align-space-around-start,.layout-align-space-around-stretch{justify-content:space-around}.layout-align-space-between,.layout-align-space-between-center,.layout-align-space-between-end,.layout-align-space-between-start,.layout-align-space-between-stretch{justify-content:space-between}.layout-align-center-start,.layout-align-end-start,.layout-align-space-around-start,.layout-align-space-between-start,.layout-align-start-start{align-items:flex-start;align-content:flex-start}.layout-align-center-center,.layout-align-end-center,.layout-align-space-around-center,.layout-align-space-between-center,.layout-align-start-center{align-items:center;align-content:center;max-width:100%}.layout-align-center-center>*,.layout-align-end-center>*,.layout-align-space-around-center>*,.layout-align-space-between-center>*,.layout-align-start-center>*{max-width:100%;box-sizing:border-box}.layout-align-center-end,.layout-align-end-end,.layout-align-space-around-end,.layout-align-space-between-end,.layout-align-start-end{align-items:flex-end;align-content:flex-end}.layout-align-center-stretch,.layout-align-end-stretch,.layout-align-space-around-stretch,.layout-align-space-between-stretch,.layout-align-start-stretch{align-items:stretch;align-content:stretch}.flex{flex:1;box-sizing:border-box}.flex-grow{flex:1 1 100%;box-sizing:border-box}.flex-initial{flex:0 1 auto;box-sizing:border-box}.flex-auto{flex:1 1 auto;box-sizing:border-box}.flex-none{flex:0 0 auto;box-sizing:border-box}.flex-noshrink{flex:1 0 auto;box-sizing:border-box}.flex-nogrow{flex:0 1 auto;box-sizing:border-box}.flex-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box}.layout-row>.flex-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box;min-height:0}.flex-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-row>.flex-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.flex-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-row>.flex-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.flex-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-row>.flex-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.flex-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-row>.flex-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.flex-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-row>.flex-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.flex-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-row>.flex-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.flex-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-row>.flex-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.flex-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-row>.flex-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.flex-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-row>.flex-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.flex-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-row>.flex-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.flex-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-row>.flex-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.flex-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-row>.flex-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.flex-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-row>.flex-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.flex-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-row>.flex-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.flex-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-row>.flex-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.flex-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-row>.flex-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.flex-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-row>.flex-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.flex-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-row>.flex-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.flex-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-row>.flex-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.flex-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-row>.flex{min-width:0}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-column>.flex{min-height:0}.layout,.layout-column,.layout-row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.layout-column{flex-direction:column}.layout-row{flex-direction:row}.layout-padding-sm>*,.layout-padding>.flex-sm{padding:4px}.layout-padding,.layout-padding-gt-sm,.layout-padding-gt-sm>*,.layout-padding-md,.layout-padding-md>*,.layout-padding>*,.layout-padding>.flex,.layout-padding>.flex-gt-sm,.layout-padding>.flex-md{padding:8px}.layout-padding-gt-lg>*,.layout-padding-gt-md>*,.layout-padding-lg>*,.layout-padding>.flex-gt-lg,.layout-padding>.flex-gt-md,.layout-padding>.flex-lg{padding:16px}.layout-margin-sm>*,.layout-margin>.flex-sm{margin:4px}.layout-margin,.layout-margin-gt-sm,.layout-margin-gt-sm>*,.layout-margin-md,.layout-margin-md>*,.layout-margin>*,.layout-margin>.flex,.layout-margin>.flex-gt-sm,.layout-margin>.flex-md{margin:8px}.layout-margin-gt-lg>*,.layout-margin-gt-md>*,.layout-margin-lg>*,.layout-margin>.flex-gt-lg,.layout-margin>.flex-gt-md,.layout-margin>.flex-lg{margin:16px}.layout-wrap{flex-wrap:wrap}.layout-nowrap{flex-wrap:nowrap}.layout-fill{margin:0;width:100%;min-height:100%;height:100%}@media (max-width:599px){.hide-xs:not(.show-xs):not(.show),.hide:not(.show-xs):not(.show){display:none}.flex-order-xs--20{order:-20}.flex-order-xs--19{order:-19}.flex-order-xs--18{order:-18}.flex-order-xs--17{order:-17}.flex-order-xs--16{order:-16}.flex-order-xs--15{order:-15}.flex-order-xs--14{order:-14}.flex-order-xs--13{order:-13}.flex-order-xs--12{order:-12}.flex-order-xs--11{order:-11}.flex-order-xs--10{order:-10}.flex-order-xs--9{order:-9}.flex-order-xs--8{order:-8}.flex-order-xs--7{order:-7}.flex-order-xs--6{order:-6}.flex-order-xs--5{order:-5}.flex-order-xs--4{order:-4}.flex-order-xs--3{order:-3}.flex-order-xs--2{order:-2}.flex-order-xs--1{order:-1}.flex-order-xs-0{order:0}.flex-order-xs-1{order:1}.flex-order-xs-2{order:2}.flex-order-xs-3{order:3}.flex-order-xs-4{order:4}.flex-order-xs-5{order:5}.flex-order-xs-6{order:6}.flex-order-xs-7{order:7}.flex-order-xs-8{order:8}.flex-order-xs-9{order:9}.flex-order-xs-10{order:10}.flex-order-xs-11{order:11}.flex-order-xs-12{order:12}.flex-order-xs-13{order:13}.flex-order-xs-14{order:14}.flex-order-xs-15{order:15}.flex-order-xs-16{order:16}.flex-order-xs-17{order:17}.flex-order-xs-18{order:18}.flex-order-xs-19{order:19}.flex-order-xs-20{order:20}.flex-offset-xs-0,.offset-xs-0{margin-left:0}[dir=rtl] .flex-offset-xs-0,[dir=rtl] .offset-xs-0{margin-left:auto;margin-right:0}.flex-offset-xs-5,.offset-xs-5{margin-left:5%}[dir=rtl] .flex-offset-xs-5,[dir=rtl] .offset-xs-5{margin-left:auto;margin-right:5%}.flex-offset-xs-10,.offset-xs-10{margin-left:10%}[dir=rtl] .flex-offset-xs-10,[dir=rtl] .offset-xs-10{margin-left:auto;margin-right:10%}.flex-offset-xs-15,.offset-xs-15{margin-left:15%}[dir=rtl] .flex-offset-xs-15,[dir=rtl] .offset-xs-15{margin-left:auto;margin-right:15%}.flex-offset-xs-20,.offset-xs-20{margin-left:20%}[dir=rtl] .flex-offset-xs-20,[dir=rtl] .offset-xs-20{margin-left:auto;margin-right:20%}.flex-offset-xs-25,.offset-xs-25{margin-left:25%}[dir=rtl] .flex-offset-xs-25,[dir=rtl] .offset-xs-25{margin-left:auto;margin-right:25%}.flex-offset-xs-30,.offset-xs-30{margin-left:30%}[dir=rtl] .flex-offset-xs-30,[dir=rtl] .offset-xs-30{margin-left:auto;margin-right:30%}.flex-offset-xs-35,.offset-xs-35{margin-left:35%}[dir=rtl] .flex-offset-xs-35,[dir=rtl] .offset-xs-35{margin-left:auto;margin-right:35%}.flex-offset-xs-40,.offset-xs-40{margin-left:40%}[dir=rtl] .flex-offset-xs-40,[dir=rtl] .offset-xs-40{margin-left:auto;margin-right:40%}.flex-offset-xs-45,.offset-xs-45{margin-left:45%}[dir=rtl] .flex-offset-xs-45,[dir=rtl] .offset-xs-45{margin-left:auto;margin-right:45%}.flex-offset-xs-50,.offset-xs-50{margin-left:50%}[dir=rtl] .flex-offset-xs-50,[dir=rtl] .offset-xs-50{margin-left:auto;margin-right:50%}.flex-offset-xs-55,.offset-xs-55{margin-left:55%}[dir=rtl] .flex-offset-xs-55,[dir=rtl] .offset-xs-55{margin-left:auto;margin-right:55%}.flex-offset-xs-60,.offset-xs-60{margin-left:60%}[dir=rtl] .flex-offset-xs-60,[dir=rtl] .offset-xs-60{margin-left:auto;margin-right:60%}.flex-offset-xs-65,.offset-xs-65{margin-left:65%}[dir=rtl] .flex-offset-xs-65,[dir=rtl] .offset-xs-65{margin-left:auto;margin-right:65%}.flex-offset-xs-70,.offset-xs-70{margin-left:70%}[dir=rtl] .flex-offset-xs-70,[dir=rtl] .offset-xs-70{margin-left:auto;margin-right:70%}.flex-offset-xs-75,.offset-xs-75{margin-left:75%}[dir=rtl] .flex-offset-xs-75,[dir=rtl] .offset-xs-75{margin-left:auto;margin-right:75%}.flex-offset-xs-80,.offset-xs-80{margin-left:80%}[dir=rtl] .flex-offset-xs-80,[dir=rtl] .offset-xs-80{margin-left:auto;margin-right:80%}.flex-offset-xs-85,.offset-xs-85{margin-left:85%}[dir=rtl] .flex-offset-xs-85,[dir=rtl] .offset-xs-85{margin-left:auto;margin-right:85%}.flex-offset-xs-90,.offset-xs-90{margin-left:90%}[dir=rtl] .flex-offset-xs-90,[dir=rtl] .offset-xs-90{margin-left:auto;margin-right:90%}.flex-offset-xs-95,.offset-xs-95{margin-left:95%}[dir=rtl] .flex-offset-xs-95,[dir=rtl] .offset-xs-95{margin-left:auto;margin-right:95%}.flex-offset-xs-33,.offset-xs-33{margin-left:calc(100% / 3)}.flex-offset-xs-66,.offset-xs-66{margin-left:calc(200% / 3)}[dir=rtl] .flex-offset-xs-66,[dir=rtl] .offset-xs-66{margin-left:auto;margin-right:calc(200% / 3)}.layout-align-xs,.layout-align-xs-start-stretch{justify-content:flex-start;align-content:stretch;align-items:stretch}.layout-align-xs-start,.layout-align-xs-start-center,.layout-align-xs-start-end,.layout-align-xs-start-start,.layout-align-xs-start-stretch{justify-content:flex-start}.layout-align-xs-center,.layout-align-xs-center-center,.layout-align-xs-center-end,.layout-align-xs-center-start,.layout-align-xs-center-stretch{justify-content:center}.layout-align-xs-end,.layout-align-xs-end-center,.layout-align-xs-end-end,.layout-align-xs-end-start,.layout-align-xs-end-stretch{justify-content:flex-end}.layout-align-xs-space-around,.layout-align-xs-space-around-center,.layout-align-xs-space-around-end,.layout-align-xs-space-around-start,.layout-align-xs-space-around-stretch{justify-content:space-around}.layout-align-xs-space-between,.layout-align-xs-space-between-center,.layout-align-xs-space-between-end,.layout-align-xs-space-between-start,.layout-align-xs-space-between-stretch{justify-content:space-between}.layout-align-xs-center-start,.layout-align-xs-end-start,.layout-align-xs-space-around-start,.layout-align-xs-space-between-start,.layout-align-xs-start-start{align-items:flex-start;align-content:flex-start}.layout-align-xs-center-center,.layout-align-xs-end-center,.layout-align-xs-space-around-center,.layout-align-xs-space-between-center,.layout-align-xs-start-center{align-items:center;align-content:center;max-width:100%}.layout-align-xs-center-center>*,.layout-align-xs-end-center>*,.layout-align-xs-space-around-center>*,.layout-align-xs-space-between-center>*,.layout-align-xs-start-center>*{max-width:100%;box-sizing:border-box}.layout-align-xs-center-end,.layout-align-xs-end-end,.layout-align-xs-space-around-end,.layout-align-xs-space-between-end,.layout-align-xs-start-end{align-items:flex-end;align-content:flex-end}.layout-align-xs-center-stretch,.layout-align-xs-end-stretch,.layout-align-xs-space-around-stretch,.layout-align-xs-space-between-stretch,.layout-align-xs-start-stretch{align-items:stretch;align-content:stretch}.flex-xs{flex:1;box-sizing:border-box}.flex-xs-grow{flex:1 1 100%;box-sizing:border-box}.flex-xs-initial{flex:0 1 auto;box-sizing:border-box}.flex-xs-auto{flex:1 1 auto;box-sizing:border-box}.flex-xs-none{flex:0 0 auto;box-sizing:border-box}.flex-xs-noshrink{flex:1 0 auto;box-sizing:border-box}.flex-xs-nogrow{flex:0 1 auto;box-sizing:border-box}.flex-xs-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-xs-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-xs-column>.flex-xs-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box;min-height:0}.flex-xs-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.flex-xs-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.flex-xs-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.flex-xs-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.flex-xs-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.flex-xs-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.flex-xs-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.flex-xs-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.flex-xs-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.flex-xs-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.flex-xs-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.flex-xs-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.flex-xs-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.flex-xs-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.flex-xs-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.flex-xs-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.flex-xs-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.flex-xs-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.flex-xs-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.flex-xs-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-xs-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-xs-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-xs-row>.flex{min-width:0}.layout-xs-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-xs-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-column>.flex{min-height:0}.layout-xs,.layout-xs-column,.layout-xs-row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.layout-xs-column{flex-direction:column}.layout-xs-row{flex-direction:row}}@media (min-width:600px){.flex-order-gt-xs--20{order:-20}.flex-order-gt-xs--19{order:-19}.flex-order-gt-xs--18{order:-18}.flex-order-gt-xs--17{order:-17}.flex-order-gt-xs--16{order:-16}.flex-order-gt-xs--15{order:-15}.flex-order-gt-xs--14{order:-14}.flex-order-gt-xs--13{order:-13}.flex-order-gt-xs--12{order:-12}.flex-order-gt-xs--11{order:-11}.flex-order-gt-xs--10{order:-10}.flex-order-gt-xs--9{order:-9}.flex-order-gt-xs--8{order:-8}.flex-order-gt-xs--7{order:-7}.flex-order-gt-xs--6{order:-6}.flex-order-gt-xs--5{order:-5}.flex-order-gt-xs--4{order:-4}.flex-order-gt-xs--3{order:-3}.flex-order-gt-xs--2{order:-2}.flex-order-gt-xs--1{order:-1}.flex-order-gt-xs-0{order:0}.flex-order-gt-xs-1{order:1}.flex-order-gt-xs-2{order:2}.flex-order-gt-xs-3{order:3}.flex-order-gt-xs-4{order:4}.flex-order-gt-xs-5{order:5}.flex-order-gt-xs-6{order:6}.flex-order-gt-xs-7{order:7}.flex-order-gt-xs-8{order:8}.flex-order-gt-xs-9{order:9}.flex-order-gt-xs-10{order:10}.flex-order-gt-xs-11{order:11}.flex-order-gt-xs-12{order:12}.flex-order-gt-xs-13{order:13}.flex-order-gt-xs-14{order:14}.flex-order-gt-xs-15{order:15}.flex-order-gt-xs-16{order:16}.flex-order-gt-xs-17{order:17}.flex-order-gt-xs-18{order:18}.flex-order-gt-xs-19{order:19}.flex-order-gt-xs-20{order:20}.flex-offset-gt-xs-0,.offset-gt-xs-0{margin-left:0}[dir=rtl] .flex-offset-gt-xs-0,[dir=rtl] .offset-gt-xs-0{margin-left:auto;margin-right:0}.flex-offset-gt-xs-5,.offset-gt-xs-5{margin-left:5%}[dir=rtl] .flex-offset-gt-xs-5,[dir=rtl] .offset-gt-xs-5{margin-left:auto;margin-right:5%}.flex-offset-gt-xs-10,.offset-gt-xs-10{margin-left:10%}[dir=rtl] .flex-offset-gt-xs-10,[dir=rtl] .offset-gt-xs-10{margin-left:auto;margin-right:10%}.flex-offset-gt-xs-15,.offset-gt-xs-15{margin-left:15%}[dir=rtl] .flex-offset-gt-xs-15,[dir=rtl] .offset-gt-xs-15{margin-left:auto;margin-right:15%}.flex-offset-gt-xs-20,.offset-gt-xs-20{margin-left:20%}[dir=rtl] .flex-offset-gt-xs-20,[dir=rtl] .offset-gt-xs-20{margin-left:auto;margin-right:20%}.flex-offset-gt-xs-25,.offset-gt-xs-25{margin-left:25%}[dir=rtl] .flex-offset-gt-xs-25,[dir=rtl] .offset-gt-xs-25{margin-left:auto;margin-right:25%}.flex-offset-gt-xs-30,.offset-gt-xs-30{margin-left:30%}[dir=rtl] .flex-offset-gt-xs-30,[dir=rtl] .offset-gt-xs-30{margin-left:auto;margin-right:30%}.flex-offset-gt-xs-35,.offset-gt-xs-35{margin-left:35%}[dir=rtl] .flex-offset-gt-xs-35,[dir=rtl] .offset-gt-xs-35{margin-left:auto;margin-right:35%}.flex-offset-gt-xs-40,.offset-gt-xs-40{margin-left:40%}[dir=rtl] .flex-offset-gt-xs-40,[dir=rtl] .offset-gt-xs-40{margin-left:auto;margin-right:40%}.flex-offset-gt-xs-45,.offset-gt-xs-45{margin-left:45%}[dir=rtl] .flex-offset-gt-xs-45,[dir=rtl] .offset-gt-xs-45{margin-left:auto;margin-right:45%}.flex-offset-gt-xs-50,.offset-gt-xs-50{margin-left:50%}[dir=rtl] .flex-offset-gt-xs-50,[dir=rtl] .offset-gt-xs-50{margin-left:auto;margin-right:50%}.flex-offset-gt-xs-55,.offset-gt-xs-55{margin-left:55%}[dir=rtl] .flex-offset-gt-xs-55,[dir=rtl] .offset-gt-xs-55{margin-left:auto;margin-right:55%}.flex-offset-gt-xs-60,.offset-gt-xs-60{margin-left:60%}[dir=rtl] .flex-offset-gt-xs-60,[dir=rtl] .offset-gt-xs-60{margin-left:auto;margin-right:60%}.flex-offset-gt-xs-65,.offset-gt-xs-65{margin-left:65%}[dir=rtl] .flex-offset-gt-xs-65,[dir=rtl] .offset-gt-xs-65{margin-left:auto;margin-right:65%}.flex-offset-gt-xs-70,.offset-gt-xs-70{margin-left:70%}[dir=rtl] .flex-offset-gt-xs-70,[dir=rtl] .offset-gt-xs-70{margin-left:auto;margin-right:70%}.flex-offset-gt-xs-75,.offset-gt-xs-75{margin-left:75%}[dir=rtl] .flex-offset-gt-xs-75,[dir=rtl] .offset-gt-xs-75{margin-left:auto;margin-right:75%}.flex-offset-gt-xs-80,.offset-gt-xs-80{margin-left:80%}[dir=rtl] .flex-offset-gt-xs-80,[dir=rtl] .offset-gt-xs-80{margin-left:auto;margin-right:80%}.flex-offset-gt-xs-85,.offset-gt-xs-85{margin-left:85%}[dir=rtl] .flex-offset-gt-xs-85,[dir=rtl] .offset-gt-xs-85{margin-left:auto;margin-right:85%}.flex-offset-gt-xs-90,.offset-gt-xs-90{margin-left:90%}[dir=rtl] .flex-offset-gt-xs-90,[dir=rtl] .offset-gt-xs-90{margin-left:auto;margin-right:90%}.flex-offset-gt-xs-95,.offset-gt-xs-95{margin-left:95%}[dir=rtl] .flex-offset-gt-xs-95,[dir=rtl] .offset-gt-xs-95{margin-left:auto;margin-right:95%}.flex-offset-gt-xs-33,.offset-gt-xs-33{margin-left:calc(100% / 3)}.flex-offset-gt-xs-66,.offset-gt-xs-66{margin-left:calc(200% / 3)}[dir=rtl] .flex-offset-gt-xs-66,[dir=rtl] .offset-gt-xs-66{margin-left:auto;margin-right:calc(200% / 3)}.layout-align-gt-xs,.layout-align-gt-xs-start-stretch{justify-content:flex-start;align-content:stretch;align-items:stretch}.layout-align-gt-xs-start,.layout-align-gt-xs-start-center,.layout-align-gt-xs-start-end,.layout-align-gt-xs-start-start,.layout-align-gt-xs-start-stretch{justify-content:flex-start}.layout-align-gt-xs-center,.layout-align-gt-xs-center-center,.layout-align-gt-xs-center-end,.layout-align-gt-xs-center-start,.layout-align-gt-xs-center-stretch{justify-content:center}.layout-align-gt-xs-end,.layout-align-gt-xs-end-center,.layout-align-gt-xs-end-end,.layout-align-gt-xs-end-start,.layout-align-gt-xs-end-stretch{justify-content:flex-end}.layout-align-gt-xs-space-around,.layout-align-gt-xs-space-around-center,.layout-align-gt-xs-space-around-end,.layout-align-gt-xs-space-around-start,.layout-align-gt-xs-space-around-stretch{justify-content:space-around}.layout-align-gt-xs-space-between,.layout-align-gt-xs-space-between-center,.layout-align-gt-xs-space-between-end,.layout-align-gt-xs-space-between-start,.layout-align-gt-xs-space-between-stretch{justify-content:space-between}.layout-align-gt-xs-center-start,.layout-align-gt-xs-end-start,.layout-align-gt-xs-space-around-start,.layout-align-gt-xs-space-between-start,.layout-align-gt-xs-start-start{align-items:flex-start;align-content:flex-start}.layout-align-gt-xs-center-center,.layout-align-gt-xs-end-center,.layout-align-gt-xs-space-around-center,.layout-align-gt-xs-space-between-center,.layout-align-gt-xs-start-center{align-items:center;align-content:center;max-width:100%}.layout-align-gt-xs-center-center>*,.layout-align-gt-xs-end-center>*,.layout-align-gt-xs-space-around-center>*,.layout-align-gt-xs-space-between-center>*,.layout-align-gt-xs-start-center>*{max-width:100%;box-sizing:border-box}.layout-align-gt-xs-center-end,.layout-align-gt-xs-end-end,.layout-align-gt-xs-space-around-end,.layout-align-gt-xs-space-between-end,.layout-align-gt-xs-start-end{align-items:flex-end;align-content:flex-end}.layout-align-gt-xs-center-stretch,.layout-align-gt-xs-end-stretch,.layout-align-gt-xs-space-around-stretch,.layout-align-gt-xs-space-between-stretch,.layout-align-gt-xs-start-stretch{align-items:stretch;align-content:stretch}.flex-gt-xs{flex:1;box-sizing:border-box}.flex-gt-xs-grow{flex:1 1 100%;box-sizing:border-box}.flex-gt-xs-initial{flex:0 1 auto;box-sizing:border-box}.flex-gt-xs-auto{flex:1 1 auto;box-sizing:border-box}.flex-gt-xs-none{flex:0 0 auto;box-sizing:border-box}.flex-gt-xs-noshrink{flex:1 0 auto;box-sizing:border-box}.flex-gt-xs-nogrow{flex:0 1 auto;box-sizing:border-box}.flex-gt-xs-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-gt-xs-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-gt-xs-column>.flex-gt-xs-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box;min-height:0}.flex-gt-xs-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.flex-gt-xs-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.flex-gt-xs-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.flex-gt-xs-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.flex-gt-xs-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.flex-gt-xs-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.flex-gt-xs-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.flex-gt-xs-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.flex-gt-xs-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.flex-gt-xs-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.flex-gt-xs-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.flex-gt-xs-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.flex-gt-xs-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.flex-gt-xs-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.flex-gt-xs-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.flex-gt-xs-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.flex-gt-xs-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.flex-gt-xs-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.flex-gt-xs-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.flex-gt-xs-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-gt-xs-row>.flex{min-width:0}.layout-gt-xs-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-column>.flex{min-height:0}.layout-gt-xs,.layout-gt-xs-column,.layout-gt-xs-row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.layout-gt-xs-column{flex-direction:column}.layout-gt-xs-row{flex-direction:row}}@media (min-width:600px) and (max-width:959px){.hide-gt-xs:not(.show-gt-xs):not(.show-sm):not(.show),.hide:not(.show-gt-xs):not(.show-sm):not(.show){display:none}.hide-sm:not(.show-gt-xs):not(.show-sm):not(.show){display:none}.flex-order-sm--20{order:-20}.flex-order-sm--19{order:-19}.flex-order-sm--18{order:-18}.flex-order-sm--17{order:-17}.flex-order-sm--16{order:-16}.flex-order-sm--15{order:-15}.flex-order-sm--14{order:-14}.flex-order-sm--13{order:-13}.flex-order-sm--12{order:-12}.flex-order-sm--11{order:-11}.flex-order-sm--10{order:-10}.flex-order-sm--9{order:-9}.flex-order-sm--8{order:-8}.flex-order-sm--7{order:-7}.flex-order-sm--6{order:-6}.flex-order-sm--5{order:-5}.flex-order-sm--4{order:-4}.flex-order-sm--3{order:-3}.flex-order-sm--2{order:-2}.flex-order-sm--1{order:-1}.flex-order-sm-0{order:0}.flex-order-sm-1{order:1}.flex-order-sm-2{order:2}.flex-order-sm-3{order:3}.flex-order-sm-4{order:4}.flex-order-sm-5{order:5}.flex-order-sm-6{order:6}.flex-order-sm-7{order:7}.flex-order-sm-8{order:8}.flex-order-sm-9{order:9}.flex-order-sm-10{order:10}.flex-order-sm-11{order:11}.flex-order-sm-12{order:12}.flex-order-sm-13{order:13}.flex-order-sm-14{order:14}.flex-order-sm-15{order:15}.flex-order-sm-16{order:16}.flex-order-sm-17{order:17}.flex-order-sm-18{order:18}.flex-order-sm-19{order:19}.flex-order-sm-20{order:20}.flex-offset-sm-0,.offset-sm-0{margin-left:0}[dir=rtl] .flex-offset-sm-0,[dir=rtl] .offset-sm-0{margin-left:auto;margin-right:0}.flex-offset-sm-5,.offset-sm-5{margin-left:5%}[dir=rtl] .flex-offset-sm-5,[dir=rtl] .offset-sm-5{margin-left:auto;margin-right:5%}.flex-offset-sm-10,.offset-sm-10{margin-left:10%}[dir=rtl] .flex-offset-sm-10,[dir=rtl] .offset-sm-10{margin-left:auto;margin-right:10%}.flex-offset-sm-15,.offset-sm-15{margin-left:15%}[dir=rtl] .flex-offset-sm-15,[dir=rtl] .offset-sm-15{margin-left:auto;margin-right:15%}.flex-offset-sm-20,.offset-sm-20{margin-left:20%}[dir=rtl] .flex-offset-sm-20,[dir=rtl] .offset-sm-20{margin-left:auto;margin-right:20%}.flex-offset-sm-25,.offset-sm-25{margin-left:25%}[dir=rtl] .flex-offset-sm-25,[dir=rtl] .offset-sm-25{margin-left:auto;margin-right:25%}.flex-offset-sm-30,.offset-sm-30{margin-left:30%}[dir=rtl] .flex-offset-sm-30,[dir=rtl] .offset-sm-30{margin-left:auto;margin-right:30%}.flex-offset-sm-35,.offset-sm-35{margin-left:35%}[dir=rtl] .flex-offset-sm-35,[dir=rtl] .offset-sm-35{margin-left:auto;margin-right:35%}.flex-offset-sm-40,.offset-sm-40{margin-left:40%}[dir=rtl] .flex-offset-sm-40,[dir=rtl] .offset-sm-40{margin-left:auto;margin-right:40%}.flex-offset-sm-45,.offset-sm-45{margin-left:45%}[dir=rtl] .flex-offset-sm-45,[dir=rtl] .offset-sm-45{margin-left:auto;margin-right:45%}.flex-offset-sm-50,.offset-sm-50{margin-left:50%}[dir=rtl] .flex-offset-sm-50,[dir=rtl] .offset-sm-50{margin-left:auto;margin-right:50%}.flex-offset-sm-55,.offset-sm-55{margin-left:55%}[dir=rtl] .flex-offset-sm-55,[dir=rtl] .offset-sm-55{margin-left:auto;margin-right:55%}.flex-offset-sm-60,.offset-sm-60{margin-left:60%}[dir=rtl] .flex-offset-sm-60,[dir=rtl] .offset-sm-60{margin-left:auto;margin-right:60%}.flex-offset-sm-65,.offset-sm-65{margin-left:65%}[dir=rtl] .flex-offset-sm-65,[dir=rtl] .offset-sm-65{margin-left:auto;margin-right:65%}.flex-offset-sm-70,.offset-sm-70{margin-left:70%}[dir=rtl] .flex-offset-sm-70,[dir=rtl] .offset-sm-70{margin-left:auto;margin-right:70%}.flex-offset-sm-75,.offset-sm-75{margin-left:75%}[dir=rtl] .flex-offset-sm-75,[dir=rtl] .offset-sm-75{margin-left:auto;margin-right:75%}.flex-offset-sm-80,.offset-sm-80{margin-left:80%}[dir=rtl] .flex-offset-sm-80,[dir=rtl] .offset-sm-80{margin-left:auto;margin-right:80%}.flex-offset-sm-85,.offset-sm-85{margin-left:85%}[dir=rtl] .flex-offset-sm-85,[dir=rtl] .offset-sm-85{margin-left:auto;margin-right:85%}.flex-offset-sm-90,.offset-sm-90{margin-left:90%}[dir=rtl] .flex-offset-sm-90,[dir=rtl] .offset-sm-90{margin-left:auto;margin-right:90%}.flex-offset-sm-95,.offset-sm-95{margin-left:95%}[dir=rtl] .flex-offset-sm-95,[dir=rtl] .offset-sm-95{margin-left:auto;margin-right:95%}.flex-offset-sm-33,.offset-sm-33{margin-left:calc(100% / 3)}.flex-offset-sm-66,.offset-sm-66{margin-left:calc(200% / 3)}[dir=rtl] .flex-offset-sm-66,[dir=rtl] .offset-sm-66{margin-left:auto;margin-right:calc(200% / 3)}.layout-align-sm,.layout-align-sm-start-stretch{justify-content:flex-start;align-content:stretch;align-items:stretch}.layout-align-sm-start,.layout-align-sm-start-center,.layout-align-sm-start-end,.layout-align-sm-start-start,.layout-align-sm-start-stretch{justify-content:flex-start}.layout-align-sm-center,.layout-align-sm-center-center,.layout-align-sm-center-end,.layout-align-sm-center-start,.layout-align-sm-center-stretch{justify-content:center}.layout-align-sm-end,.layout-align-sm-end-center,.layout-align-sm-end-end,.layout-align-sm-end-start,.layout-align-sm-end-stretch{justify-content:flex-end}.layout-align-sm-space-around,.layout-align-sm-space-around-center,.layout-align-sm-space-around-end,.layout-align-sm-space-around-start,.layout-align-sm-space-around-stretch{justify-content:space-around}.layout-align-sm-space-between,.layout-align-sm-space-between-center,.layout-align-sm-space-between-end,.layout-align-sm-space-between-start,.layout-align-sm-space-between-stretch{justify-content:space-between}.layout-align-sm-center-start,.layout-align-sm-end-start,.layout-align-sm-space-around-start,.layout-align-sm-space-between-start,.layout-align-sm-start-start{align-items:flex-start;align-content:flex-start}.layout-align-sm-center-center,.layout-align-sm-end-center,.layout-align-sm-space-around-center,.layout-align-sm-space-between-center,.layout-align-sm-start-center{align-items:center;align-content:center;max-width:100%}.layout-align-sm-center-center>*,.layout-align-sm-end-center>*,.layout-align-sm-space-around-center>*,.layout-align-sm-space-between-center>*,.layout-align-sm-start-center>*{max-width:100%;box-sizing:border-box}.layout-align-sm-center-end,.layout-align-sm-end-end,.layout-align-sm-space-around-end,.layout-align-sm-space-between-end,.layout-align-sm-start-end{align-items:flex-end;align-content:flex-end}.layout-align-sm-center-stretch,.layout-align-sm-end-stretch,.layout-align-sm-space-around-stretch,.layout-align-sm-space-between-stretch,.layout-align-sm-start-stretch{align-items:stretch;align-content:stretch}.flex-sm{flex:1;box-sizing:border-box}.flex-sm-grow{flex:1 1 100%;box-sizing:border-box}.flex-sm-initial{flex:0 1 auto;box-sizing:border-box}.flex-sm-auto{flex:1 1 auto;box-sizing:border-box}.flex-sm-none{flex:0 0 auto;box-sizing:border-box}.flex-sm-noshrink{flex:1 0 auto;box-sizing:border-box}.flex-sm-nogrow{flex:0 1 auto;box-sizing:border-box}.flex-sm-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-sm-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-sm-column>.flex-sm-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box;min-height:0}.flex-sm-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.flex-sm-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.flex-sm-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.flex-sm-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.flex-sm-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.flex-sm-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.flex-sm-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.flex-sm-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.flex-sm-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.flex-sm-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.flex-sm-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.flex-sm-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.flex-sm-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.flex-sm-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.flex-sm-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.flex-sm-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.flex-sm-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.flex-sm-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.flex-sm-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.flex-sm-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-sm-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-sm-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-sm-row>.flex{min-width:0}.layout-sm-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-sm-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-column>.flex{min-height:0}.layout-sm,.layout-sm-column,.layout-sm-row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.layout-sm-column{flex-direction:column}.layout-sm-row{flex-direction:row}}@media (min-width:960px){.flex-order-gt-sm--20{order:-20}.flex-order-gt-sm--19{order:-19}.flex-order-gt-sm--18{order:-18}.flex-order-gt-sm--17{order:-17}.flex-order-gt-sm--16{order:-16}.flex-order-gt-sm--15{order:-15}.flex-order-gt-sm--14{order:-14}.flex-order-gt-sm--13{order:-13}.flex-order-gt-sm--12{order:-12}.flex-order-gt-sm--11{order:-11}.flex-order-gt-sm--10{order:-10}.flex-order-gt-sm--9{order:-9}.flex-order-gt-sm--8{order:-8}.flex-order-gt-sm--7{order:-7}.flex-order-gt-sm--6{order:-6}.flex-order-gt-sm--5{order:-5}.flex-order-gt-sm--4{order:-4}.flex-order-gt-sm--3{order:-3}.flex-order-gt-sm--2{order:-2}.flex-order-gt-sm--1{order:-1}.flex-order-gt-sm-0{order:0}.flex-order-gt-sm-1{order:1}.flex-order-gt-sm-2{order:2}.flex-order-gt-sm-3{order:3}.flex-order-gt-sm-4{order:4}.flex-order-gt-sm-5{order:5}.flex-order-gt-sm-6{order:6}.flex-order-gt-sm-7{order:7}.flex-order-gt-sm-8{order:8}.flex-order-gt-sm-9{order:9}.flex-order-gt-sm-10{order:10}.flex-order-gt-sm-11{order:11}.flex-order-gt-sm-12{order:12}.flex-order-gt-sm-13{order:13}.flex-order-gt-sm-14{order:14}.flex-order-gt-sm-15{order:15}.flex-order-gt-sm-16{order:16}.flex-order-gt-sm-17{order:17}.flex-order-gt-sm-18{order:18}.flex-order-gt-sm-19{order:19}.flex-order-gt-sm-20{order:20}.flex-offset-gt-sm-0,.offset-gt-sm-0{margin-left:0}[dir=rtl] .flex-offset-gt-sm-0,[dir=rtl] .offset-gt-sm-0{margin-left:auto;margin-right:0}.flex-offset-gt-sm-5,.offset-gt-sm-5{margin-left:5%}[dir=rtl] .flex-offset-gt-sm-5,[dir=rtl] .offset-gt-sm-5{margin-left:auto;margin-right:5%}.flex-offset-gt-sm-10,.offset-gt-sm-10{margin-left:10%}[dir=rtl] .flex-offset-gt-sm-10,[dir=rtl] .offset-gt-sm-10{margin-left:auto;margin-right:10%}.flex-offset-gt-sm-15,.offset-gt-sm-15{margin-left:15%}[dir=rtl] .flex-offset-gt-sm-15,[dir=rtl] .offset-gt-sm-15{margin-left:auto;margin-right:15%}.flex-offset-gt-sm-20,.offset-gt-sm-20{margin-left:20%}[dir=rtl] .flex-offset-gt-sm-20,[dir=rtl] .offset-gt-sm-20{margin-left:auto;margin-right:20%}.flex-offset-gt-sm-25,.offset-gt-sm-25{margin-left:25%}[dir=rtl] .flex-offset-gt-sm-25,[dir=rtl] .offset-gt-sm-25{margin-left:auto;margin-right:25%}.flex-offset-gt-sm-30,.offset-gt-sm-30{margin-left:30%}[dir=rtl] .flex-offset-gt-sm-30,[dir=rtl] .offset-gt-sm-30{margin-left:auto;margin-right:30%}.flex-offset-gt-sm-35,.offset-gt-sm-35{margin-left:35%}[dir=rtl] .flex-offset-gt-sm-35,[dir=rtl] .offset-gt-sm-35{margin-left:auto;margin-right:35%}.flex-offset-gt-sm-40,.offset-gt-sm-40{margin-left:40%}[dir=rtl] .flex-offset-gt-sm-40,[dir=rtl] .offset-gt-sm-40{margin-left:auto;margin-right:40%}.flex-offset-gt-sm-45,.offset-gt-sm-45{margin-left:45%}[dir=rtl] .flex-offset-gt-sm-45,[dir=rtl] .offset-gt-sm-45{margin-left:auto;margin-right:45%}.flex-offset-gt-sm-50,.offset-gt-sm-50{margin-left:50%}[dir=rtl] .flex-offset-gt-sm-50,[dir=rtl] .offset-gt-sm-50{margin-left:auto;margin-right:50%}.flex-offset-gt-sm-55,.offset-gt-sm-55{margin-left:55%}[dir=rtl] .flex-offset-gt-sm-55,[dir=rtl] .offset-gt-sm-55{margin-left:auto;margin-right:55%}.flex-offset-gt-sm-60,.offset-gt-sm-60{margin-left:60%}[dir=rtl] .flex-offset-gt-sm-60,[dir=rtl] .offset-gt-sm-60{margin-left:auto;margin-right:60%}.flex-offset-gt-sm-65,.offset-gt-sm-65{margin-left:65%}[dir=rtl] .flex-offset-gt-sm-65,[dir=rtl] .offset-gt-sm-65{margin-left:auto;margin-right:65%}.flex-offset-gt-sm-70,.offset-gt-sm-70{margin-left:70%}[dir=rtl] .flex-offset-gt-sm-70,[dir=rtl] .offset-gt-sm-70{margin-left:auto;margin-right:70%}.flex-offset-gt-sm-75,.offset-gt-sm-75{margin-left:75%}[dir=rtl] .flex-offset-gt-sm-75,[dir=rtl] .offset-gt-sm-75{margin-left:auto;margin-right:75%}.flex-offset-gt-sm-80,.offset-gt-sm-80{margin-left:80%}[dir=rtl] .flex-offset-gt-sm-80,[dir=rtl] .offset-gt-sm-80{margin-left:auto;margin-right:80%}.flex-offset-gt-sm-85,.offset-gt-sm-85{margin-left:85%}[dir=rtl] .flex-offset-gt-sm-85,[dir=rtl] .offset-gt-sm-85{margin-left:auto;margin-right:85%}.flex-offset-gt-sm-90,.offset-gt-sm-90{margin-left:90%}[dir=rtl] .flex-offset-gt-sm-90,[dir=rtl] .offset-gt-sm-90{margin-left:auto;margin-right:90%}.flex-offset-gt-sm-95,.offset-gt-sm-95{margin-left:95%}[dir=rtl] .flex-offset-gt-sm-95,[dir=rtl] .offset-gt-sm-95{margin-left:auto;margin-right:95%}.flex-offset-gt-sm-33,.offset-gt-sm-33{margin-left:calc(100% / 3)}.flex-offset-gt-sm-66,.offset-gt-sm-66{margin-left:calc(200% / 3)}[dir=rtl] .flex-offset-gt-sm-66,[dir=rtl] .offset-gt-sm-66{margin-left:auto;margin-right:calc(200% / 3)}.layout-align-gt-sm,.layout-align-gt-sm-start-stretch{justify-content:flex-start;align-content:stretch;align-items:stretch}.layout-align-gt-sm-start,.layout-align-gt-sm-start-center,.layout-align-gt-sm-start-end,.layout-align-gt-sm-start-start,.layout-align-gt-sm-start-stretch{justify-content:flex-start}.layout-align-gt-sm-center,.layout-align-gt-sm-center-center,.layout-align-gt-sm-center-end,.layout-align-gt-sm-center-start,.layout-align-gt-sm-center-stretch{justify-content:center}.layout-align-gt-sm-end,.layout-align-gt-sm-end-center,.layout-align-gt-sm-end-end,.layout-align-gt-sm-end-start,.layout-align-gt-sm-end-stretch{justify-content:flex-end}.layout-align-gt-sm-space-around,.layout-align-gt-sm-space-around-center,.layout-align-gt-sm-space-around-end,.layout-align-gt-sm-space-around-start,.layout-align-gt-sm-space-around-stretch{justify-content:space-around}.layout-align-gt-sm-space-between,.layout-align-gt-sm-space-between-center,.layout-align-gt-sm-space-between-end,.layout-align-gt-sm-space-between-start,.layout-align-gt-sm-space-between-stretch{justify-content:space-between}.layout-align-gt-sm-center-start,.layout-align-gt-sm-end-start,.layout-align-gt-sm-space-around-start,.layout-align-gt-sm-space-between-start,.layout-align-gt-sm-start-start{align-items:flex-start;align-content:flex-start}.layout-align-gt-sm-center-center,.layout-align-gt-sm-end-center,.layout-align-gt-sm-space-around-center,.layout-align-gt-sm-space-between-center,.layout-align-gt-sm-start-center{align-items:center;align-content:center;max-width:100%}.layout-align-gt-sm-center-center>*,.layout-align-gt-sm-end-center>*,.layout-align-gt-sm-space-around-center>*,.layout-align-gt-sm-space-between-center>*,.layout-align-gt-sm-start-center>*{max-width:100%;box-sizing:border-box}.layout-align-gt-sm-center-end,.layout-align-gt-sm-end-end,.layout-align-gt-sm-space-around-end,.layout-align-gt-sm-space-between-end,.layout-align-gt-sm-start-end{align-items:flex-end;align-content:flex-end}.layout-align-gt-sm-center-stretch,.layout-align-gt-sm-end-stretch,.layout-align-gt-sm-space-around-stretch,.layout-align-gt-sm-space-between-stretch,.layout-align-gt-sm-start-stretch{align-items:stretch;align-content:stretch}.flex-gt-sm{flex:1;box-sizing:border-box}.flex-gt-sm-grow{flex:1 1 100%;box-sizing:border-box}.flex-gt-sm-initial{flex:0 1 auto;box-sizing:border-box}.flex-gt-sm-auto{flex:1 1 auto;box-sizing:border-box}.flex-gt-sm-none{flex:0 0 auto;box-sizing:border-box}.flex-gt-sm-noshrink{flex:1 0 auto;box-sizing:border-box}.flex-gt-sm-nogrow{flex:0 1 auto;box-sizing:border-box}.flex-gt-sm-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-gt-sm-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-gt-sm-column>.flex-gt-sm-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box;min-height:0}.flex-gt-sm-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.flex-gt-sm-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.flex-gt-sm-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.flex-gt-sm-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.flex-gt-sm-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.flex-gt-sm-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.flex-gt-sm-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.flex-gt-sm-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.flex-gt-sm-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.flex-gt-sm-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.flex-gt-sm-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.flex-gt-sm-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.flex-gt-sm-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.flex-gt-sm-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.flex-gt-sm-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.flex-gt-sm-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.flex-gt-sm-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.flex-gt-sm-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.flex-gt-sm-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.flex-gt-sm-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-gt-sm-row>.flex{min-width:0}.layout-gt-sm-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-column>.flex{min-height:0}.layout-gt-sm,.layout-gt-sm-column,.layout-gt-sm-row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.layout-gt-sm-column{flex-direction:column}.layout-gt-sm-row{flex-direction:row}}@media (min-width:960px) and (max-width:1279px){.hide-gt-sm:not(.show-gt-xs):not(.show-gt-sm):not(.show-md):not(.show),.hide-gt-xs:not(.show-gt-xs):not(.show-gt-sm):not(.show-md):not(.show),.hide:not(.show-gt-xs):not(.show-gt-sm):not(.show-md):not(.show){display:none}.hide-md:not(.show-md):not(.show-gt-sm):not(.show-gt-xs):not(.show){display:none}.flex-order-md--20{order:-20}.flex-order-md--19{order:-19}.flex-order-md--18{order:-18}.flex-order-md--17{order:-17}.flex-order-md--16{order:-16}.flex-order-md--15{order:-15}.flex-order-md--14{order:-14}.flex-order-md--13{order:-13}.flex-order-md--12{order:-12}.flex-order-md--11{order:-11}.flex-order-md--10{order:-10}.flex-order-md--9{order:-9}.flex-order-md--8{order:-8}.flex-order-md--7{order:-7}.flex-order-md--6{order:-6}.flex-order-md--5{order:-5}.flex-order-md--4{order:-4}.flex-order-md--3{order:-3}.flex-order-md--2{order:-2}.flex-order-md--1{order:-1}.flex-order-md-0{order:0}.flex-order-md-1{order:1}.flex-order-md-2{order:2}.flex-order-md-3{order:3}.flex-order-md-4{order:4}.flex-order-md-5{order:5}.flex-order-md-6{order:6}.flex-order-md-7{order:7}.flex-order-md-8{order:8}.flex-order-md-9{order:9}.flex-order-md-10{order:10}.flex-order-md-11{order:11}.flex-order-md-12{order:12}.flex-order-md-13{order:13}.flex-order-md-14{order:14}.flex-order-md-15{order:15}.flex-order-md-16{order:16}.flex-order-md-17{order:17}.flex-order-md-18{order:18}.flex-order-md-19{order:19}.flex-order-md-20{order:20}.flex-offset-md-0,.offset-md-0{margin-left:0}[dir=rtl] .flex-offset-md-0,[dir=rtl] .offset-md-0{margin-left:auto;margin-right:0}.flex-offset-md-5,.offset-md-5{margin-left:5%}[dir=rtl] .flex-offset-md-5,[dir=rtl] .offset-md-5{margin-left:auto;margin-right:5%}.flex-offset-md-10,.offset-md-10{margin-left:10%}[dir=rtl] .flex-offset-md-10,[dir=rtl] .offset-md-10{margin-left:auto;margin-right:10%}.flex-offset-md-15,.offset-md-15{margin-left:15%}[dir=rtl] .flex-offset-md-15,[dir=rtl] .offset-md-15{margin-left:auto;margin-right:15%}.flex-offset-md-20,.offset-md-20{margin-left:20%}[dir=rtl] .flex-offset-md-20,[dir=rtl] .offset-md-20{margin-left:auto;margin-right:20%}.flex-offset-md-25,.offset-md-25{margin-left:25%}[dir=rtl] .flex-offset-md-25,[dir=rtl] .offset-md-25{margin-left:auto;margin-right:25%}.flex-offset-md-30,.offset-md-30{margin-left:30%}[dir=rtl] .flex-offset-md-30,[dir=rtl] .offset-md-30{margin-left:auto;margin-right:30%}.flex-offset-md-35,.offset-md-35{margin-left:35%}[dir=rtl] .flex-offset-md-35,[dir=rtl] .offset-md-35{margin-left:auto;margin-right:35%}.flex-offset-md-40,.offset-md-40{margin-left:40%}[dir=rtl] .flex-offset-md-40,[dir=rtl] .offset-md-40{margin-left:auto;margin-right:40%}.flex-offset-md-45,.offset-md-45{margin-left:45%}[dir=rtl] .flex-offset-md-45,[dir=rtl] .offset-md-45{margin-left:auto;margin-right:45%}.flex-offset-md-50,.offset-md-50{margin-left:50%}[dir=rtl] .flex-offset-md-50,[dir=rtl] .offset-md-50{margin-left:auto;margin-right:50%}.flex-offset-md-55,.offset-md-55{margin-left:55%}[dir=rtl] .flex-offset-md-55,[dir=rtl] .offset-md-55{margin-left:auto;margin-right:55%}.flex-offset-md-60,.offset-md-60{margin-left:60%}[dir=rtl] .flex-offset-md-60,[dir=rtl] .offset-md-60{margin-left:auto;margin-right:60%}.flex-offset-md-65,.offset-md-65{margin-left:65%}[dir=rtl] .flex-offset-md-65,[dir=rtl] .offset-md-65{margin-left:auto;margin-right:65%}.flex-offset-md-70,.offset-md-70{margin-left:70%}[dir=rtl] .flex-offset-md-70,[dir=rtl] .offset-md-70{margin-left:auto;margin-right:70%}.flex-offset-md-75,.offset-md-75{margin-left:75%}[dir=rtl] .flex-offset-md-75,[dir=rtl] .offset-md-75{margin-left:auto;margin-right:75%}.flex-offset-md-80,.offset-md-80{margin-left:80%}[dir=rtl] .flex-offset-md-80,[dir=rtl] .offset-md-80{margin-left:auto;margin-right:80%}.flex-offset-md-85,.offset-md-85{margin-left:85%}[dir=rtl] .flex-offset-md-85,[dir=rtl] .offset-md-85{margin-left:auto;margin-right:85%}.flex-offset-md-90,.offset-md-90{margin-left:90%}[dir=rtl] .flex-offset-md-90,[dir=rtl] .offset-md-90{margin-left:auto;margin-right:90%}.flex-offset-md-95,.offset-md-95{margin-left:95%}[dir=rtl] .flex-offset-md-95,[dir=rtl] .offset-md-95{margin-left:auto;margin-right:95%}.flex-offset-md-33,.offset-md-33{margin-left:calc(100% / 3)}.flex-offset-md-66,.offset-md-66{margin-left:calc(200% / 3)}[dir=rtl] .flex-offset-md-66,[dir=rtl] .offset-md-66{margin-left:auto;margin-right:calc(200% / 3)}.layout-align-md,.layout-align-md-start-stretch{justify-content:flex-start;align-content:stretch;align-items:stretch}.layout-align-md-start,.layout-align-md-start-center,.layout-align-md-start-end,.layout-align-md-start-start,.layout-align-md-start-stretch{justify-content:flex-start}.layout-align-md-center,.layout-align-md-center-center,.layout-align-md-center-end,.layout-align-md-center-start,.layout-align-md-center-stretch{justify-content:center}.layout-align-md-end,.layout-align-md-end-center,.layout-align-md-end-end,.layout-align-md-end-start,.layout-align-md-end-stretch{justify-content:flex-end}.layout-align-md-space-around,.layout-align-md-space-around-center,.layout-align-md-space-around-end,.layout-align-md-space-around-start,.layout-align-md-space-around-stretch{justify-content:space-around}.layout-align-md-space-between,.layout-align-md-space-between-center,.layout-align-md-space-between-end,.layout-align-md-space-between-start,.layout-align-md-space-between-stretch{justify-content:space-between}.layout-align-md-center-start,.layout-align-md-end-start,.layout-align-md-space-around-start,.layout-align-md-space-between-start,.layout-align-md-start-start{align-items:flex-start;align-content:flex-start}.layout-align-md-center-center,.layout-align-md-end-center,.layout-align-md-space-around-center,.layout-align-md-space-between-center,.layout-align-md-start-center{align-items:center;align-content:center;max-width:100%}.layout-align-md-center-center>*,.layout-align-md-end-center>*,.layout-align-md-space-around-center>*,.layout-align-md-space-between-center>*,.layout-align-md-start-center>*{max-width:100%;box-sizing:border-box}.layout-align-md-center-end,.layout-align-md-end-end,.layout-align-md-space-around-end,.layout-align-md-space-between-end,.layout-align-md-start-end{align-items:flex-end;align-content:flex-end}.layout-align-md-center-stretch,.layout-align-md-end-stretch,.layout-align-md-space-around-stretch,.layout-align-md-space-between-stretch,.layout-align-md-start-stretch{align-items:stretch;align-content:stretch}.flex-md{flex:1;box-sizing:border-box}.flex-md-grow{flex:1 1 100%;box-sizing:border-box}.flex-md-initial{flex:0 1 auto;box-sizing:border-box}.flex-md-auto{flex:1 1 auto;box-sizing:border-box}.flex-md-none{flex:0 0 auto;box-sizing:border-box}.flex-md-noshrink{flex:1 0 auto;box-sizing:border-box}.flex-md-nogrow{flex:0 1 auto;box-sizing:border-box}.flex-md-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-md-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-md-column>.flex-md-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box;min-height:0}.flex-md-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.flex-md-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.flex-md-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.flex-md-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.flex-md-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.flex-md-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.flex-md-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.flex-md-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.flex-md-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.flex-md-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.flex-md-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.flex-md-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.flex-md-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.flex-md-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.flex-md-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.flex-md-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.flex-md-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.flex-md-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.flex-md-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.flex-md-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-md-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-md-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-md-row>.flex{min-width:0}.layout-md-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-md-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-column>.flex{min-height:0}.layout-md,.layout-md-column,.layout-md-row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.layout-md-column{flex-direction:column}.layout-md-row{flex-direction:row}}@media (min-width:1280px){.flex-order-gt-md--20{order:-20}.flex-order-gt-md--19{order:-19}.flex-order-gt-md--18{order:-18}.flex-order-gt-md--17{order:-17}.flex-order-gt-md--16{order:-16}.flex-order-gt-md--15{order:-15}.flex-order-gt-md--14{order:-14}.flex-order-gt-md--13{order:-13}.flex-order-gt-md--12{order:-12}.flex-order-gt-md--11{order:-11}.flex-order-gt-md--10{order:-10}.flex-order-gt-md--9{order:-9}.flex-order-gt-md--8{order:-8}.flex-order-gt-md--7{order:-7}.flex-order-gt-md--6{order:-6}.flex-order-gt-md--5{order:-5}.flex-order-gt-md--4{order:-4}.flex-order-gt-md--3{order:-3}.flex-order-gt-md--2{order:-2}.flex-order-gt-md--1{order:-1}.flex-order-gt-md-0{order:0}.flex-order-gt-md-1{order:1}.flex-order-gt-md-2{order:2}.flex-order-gt-md-3{order:3}.flex-order-gt-md-4{order:4}.flex-order-gt-md-5{order:5}.flex-order-gt-md-6{order:6}.flex-order-gt-md-7{order:7}.flex-order-gt-md-8{order:8}.flex-order-gt-md-9{order:9}.flex-order-gt-md-10{order:10}.flex-order-gt-md-11{order:11}.flex-order-gt-md-12{order:12}.flex-order-gt-md-13{order:13}.flex-order-gt-md-14{order:14}.flex-order-gt-md-15{order:15}.flex-order-gt-md-16{order:16}.flex-order-gt-md-17{order:17}.flex-order-gt-md-18{order:18}.flex-order-gt-md-19{order:19}.flex-order-gt-md-20{order:20}.flex-offset-gt-md-0,.offset-gt-md-0{margin-left:0}[dir=rtl] .flex-offset-gt-md-0,[dir=rtl] .offset-gt-md-0{margin-left:auto;margin-right:0}.flex-offset-gt-md-5,.offset-gt-md-5{margin-left:5%}[dir=rtl] .flex-offset-gt-md-5,[dir=rtl] .offset-gt-md-5{margin-left:auto;margin-right:5%}.flex-offset-gt-md-10,.offset-gt-md-10{margin-left:10%}[dir=rtl] .flex-offset-gt-md-10,[dir=rtl] .offset-gt-md-10{margin-left:auto;margin-right:10%}.flex-offset-gt-md-15,.offset-gt-md-15{margin-left:15%}[dir=rtl] .flex-offset-gt-md-15,[dir=rtl] .offset-gt-md-15{margin-left:auto;margin-right:15%}.flex-offset-gt-md-20,.offset-gt-md-20{margin-left:20%}[dir=rtl] .flex-offset-gt-md-20,[dir=rtl] .offset-gt-md-20{margin-left:auto;margin-right:20%}.flex-offset-gt-md-25,.offset-gt-md-25{margin-left:25%}[dir=rtl] .flex-offset-gt-md-25,[dir=rtl] .offset-gt-md-25{margin-left:auto;margin-right:25%}.flex-offset-gt-md-30,.offset-gt-md-30{margin-left:30%}[dir=rtl] .flex-offset-gt-md-30,[dir=rtl] .offset-gt-md-30{margin-left:auto;margin-right:30%}.flex-offset-gt-md-35,.offset-gt-md-35{margin-left:35%}[dir=rtl] .flex-offset-gt-md-35,[dir=rtl] .offset-gt-md-35{margin-left:auto;margin-right:35%}.flex-offset-gt-md-40,.offset-gt-md-40{margin-left:40%}[dir=rtl] .flex-offset-gt-md-40,[dir=rtl] .offset-gt-md-40{margin-left:auto;margin-right:40%}.flex-offset-gt-md-45,.offset-gt-md-45{margin-left:45%}[dir=rtl] .flex-offset-gt-md-45,[dir=rtl] .offset-gt-md-45{margin-left:auto;margin-right:45%}.flex-offset-gt-md-50,.offset-gt-md-50{margin-left:50%}[dir=rtl] .flex-offset-gt-md-50,[dir=rtl] .offset-gt-md-50{margin-left:auto;margin-right:50%}.flex-offset-gt-md-55,.offset-gt-md-55{margin-left:55%}[dir=rtl] .flex-offset-gt-md-55,[dir=rtl] .offset-gt-md-55{margin-left:auto;margin-right:55%}.flex-offset-gt-md-60,.offset-gt-md-60{margin-left:60%}[dir=rtl] .flex-offset-gt-md-60,[dir=rtl] .offset-gt-md-60{margin-left:auto;margin-right:60%}.flex-offset-gt-md-65,.offset-gt-md-65{margin-left:65%}[dir=rtl] .flex-offset-gt-md-65,[dir=rtl] .offset-gt-md-65{margin-left:auto;margin-right:65%}.flex-offset-gt-md-70,.offset-gt-md-70{margin-left:70%}[dir=rtl] .flex-offset-gt-md-70,[dir=rtl] .offset-gt-md-70{margin-left:auto;margin-right:70%}.flex-offset-gt-md-75,.offset-gt-md-75{margin-left:75%}[dir=rtl] .flex-offset-gt-md-75,[dir=rtl] .offset-gt-md-75{margin-left:auto;margin-right:75%}.flex-offset-gt-md-80,.offset-gt-md-80{margin-left:80%}[dir=rtl] .flex-offset-gt-md-80,[dir=rtl] .offset-gt-md-80{margin-left:auto;margin-right:80%}.flex-offset-gt-md-85,.offset-gt-md-85{margin-left:85%}[dir=rtl] .flex-offset-gt-md-85,[dir=rtl] .offset-gt-md-85{margin-left:auto;margin-right:85%}.flex-offset-gt-md-90,.offset-gt-md-90{margin-left:90%}[dir=rtl] .flex-offset-gt-md-90,[dir=rtl] .offset-gt-md-90{margin-left:auto;margin-right:90%}.flex-offset-gt-md-95,.offset-gt-md-95{margin-left:95%}[dir=rtl] .flex-offset-gt-md-95,[dir=rtl] .offset-gt-md-95{margin-left:auto;margin-right:95%}.flex-offset-gt-md-33,.offset-gt-md-33{margin-left:calc(100% / 3)}.flex-offset-gt-md-66,.offset-gt-md-66{margin-left:calc(200% / 3)}[dir=rtl] .flex-offset-gt-md-66,[dir=rtl] .offset-gt-md-66{margin-left:auto;margin-right:calc(200% / 3)}.layout-align-gt-md,.layout-align-gt-md-start-stretch{justify-content:flex-start;align-content:stretch;align-items:stretch}.layout-align-gt-md-start,.layout-align-gt-md-start-center,.layout-align-gt-md-start-end,.layout-align-gt-md-start-start,.layout-align-gt-md-start-stretch{justify-content:flex-start}.layout-align-gt-md-center,.layout-align-gt-md-center-center,.layout-align-gt-md-center-end,.layout-align-gt-md-center-start,.layout-align-gt-md-center-stretch{justify-content:center}.layout-align-gt-md-end,.layout-align-gt-md-end-center,.layout-align-gt-md-end-end,.layout-align-gt-md-end-start,.layout-align-gt-md-end-stretch{justify-content:flex-end}.layout-align-gt-md-space-around,.layout-align-gt-md-space-around-center,.layout-align-gt-md-space-around-end,.layout-align-gt-md-space-around-start,.layout-align-gt-md-space-around-stretch{justify-content:space-around}.layout-align-gt-md-space-between,.layout-align-gt-md-space-between-center,.layout-align-gt-md-space-between-end,.layout-align-gt-md-space-between-start,.layout-align-gt-md-space-between-stretch{justify-content:space-between}.layout-align-gt-md-center-start,.layout-align-gt-md-end-start,.layout-align-gt-md-space-around-start,.layout-align-gt-md-space-between-start,.layout-align-gt-md-start-start{align-items:flex-start;align-content:flex-start}.layout-align-gt-md-center-center,.layout-align-gt-md-end-center,.layout-align-gt-md-space-around-center,.layout-align-gt-md-space-between-center,.layout-align-gt-md-start-center{align-items:center;align-content:center;max-width:100%}.layout-align-gt-md-center-center>*,.layout-align-gt-md-end-center>*,.layout-align-gt-md-space-around-center>*,.layout-align-gt-md-space-between-center>*,.layout-align-gt-md-start-center>*{max-width:100%;box-sizing:border-box}.layout-align-gt-md-center-end,.layout-align-gt-md-end-end,.layout-align-gt-md-space-around-end,.layout-align-gt-md-space-between-end,.layout-align-gt-md-start-end{align-items:flex-end;align-content:flex-end}.layout-align-gt-md-center-stretch,.layout-align-gt-md-end-stretch,.layout-align-gt-md-space-around-stretch,.layout-align-gt-md-space-between-stretch,.layout-align-gt-md-start-stretch{align-items:stretch;align-content:stretch}.flex-gt-md{flex:1;box-sizing:border-box}.flex-gt-md-grow{flex:1 1 100%;box-sizing:border-box}.flex-gt-md-initial{flex:0 1 auto;box-sizing:border-box}.flex-gt-md-auto{flex:1 1 auto;box-sizing:border-box}.flex-gt-md-none{flex:0 0 auto;box-sizing:border-box}.flex-gt-md-noshrink{flex:1 0 auto;box-sizing:border-box}.flex-gt-md-nogrow{flex:0 1 auto;box-sizing:border-box}.flex-gt-md-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-gt-md-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-gt-md-column>.flex-gt-md-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box;min-height:0}.flex-gt-md-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.flex-gt-md-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.flex-gt-md-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.flex-gt-md-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.flex-gt-md-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.flex-gt-md-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.flex-gt-md-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.flex-gt-md-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.flex-gt-md-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.flex-gt-md-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.flex-gt-md-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.flex-gt-md-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.flex-gt-md-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.flex-gt-md-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.flex-gt-md-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.flex-gt-md-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.flex-gt-md-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.flex-gt-md-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.flex-gt-md-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.flex-gt-md-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-gt-md-row>.flex{min-width:0}.layout-gt-md-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-column>.flex{min-height:0}.layout-gt-md,.layout-gt-md-column,.layout-gt-md-row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.layout-gt-md-column{flex-direction:column}.layout-gt-md-row{flex-direction:row}}@media (min-width:1280px) and (max-width:1919px){.hide-gt-md:not(.show-gt-xs):not(.show-gt-sm):not(.show-gt-md):not(.show-lg):not(.show),.hide-gt-sm:not(.show-gt-xs):not(.show-gt-sm):not(.show-gt-md):not(.show-lg):not(.show),.hide-gt-xs:not(.show-gt-xs):not(.show-gt-sm):not(.show-gt-md):not(.show-lg):not(.show),.hide:not(.show-gt-xs):not(.show-gt-sm):not(.show-gt-md):not(.show-lg):not(.show){display:none}.hide-lg:not(.show-lg):not(.show-gt-md):not(.show-gt-sm):not(.show-gt-xs):not(.show){display:none}.flex-order-lg--20{order:-20}.flex-order-lg--19{order:-19}.flex-order-lg--18{order:-18}.flex-order-lg--17{order:-17}.flex-order-lg--16{order:-16}.flex-order-lg--15{order:-15}.flex-order-lg--14{order:-14}.flex-order-lg--13{order:-13}.flex-order-lg--12{order:-12}.flex-order-lg--11{order:-11}.flex-order-lg--10{order:-10}.flex-order-lg--9{order:-9}.flex-order-lg--8{order:-8}.flex-order-lg--7{order:-7}.flex-order-lg--6{order:-6}.flex-order-lg--5{order:-5}.flex-order-lg--4{order:-4}.flex-order-lg--3{order:-3}.flex-order-lg--2{order:-2}.flex-order-lg--1{order:-1}.flex-order-lg-0{order:0}.flex-order-lg-1{order:1}.flex-order-lg-2{order:2}.flex-order-lg-3{order:3}.flex-order-lg-4{order:4}.flex-order-lg-5{order:5}.flex-order-lg-6{order:6}.flex-order-lg-7{order:7}.flex-order-lg-8{order:8}.flex-order-lg-9{order:9}.flex-order-lg-10{order:10}.flex-order-lg-11{order:11}.flex-order-lg-12{order:12}.flex-order-lg-13{order:13}.flex-order-lg-14{order:14}.flex-order-lg-15{order:15}.flex-order-lg-16{order:16}.flex-order-lg-17{order:17}.flex-order-lg-18{order:18}.flex-order-lg-19{order:19}.flex-order-lg-20{order:20}.flex-offset-lg-0,.offset-lg-0{margin-left:0}[dir=rtl] .flex-offset-lg-0,[dir=rtl] .offset-lg-0{margin-left:auto;margin-right:0}.flex-offset-lg-5,.offset-lg-5{margin-left:5%}[dir=rtl] .flex-offset-lg-5,[dir=rtl] .offset-lg-5{margin-left:auto;margin-right:5%}.flex-offset-lg-10,.offset-lg-10{margin-left:10%}[dir=rtl] .flex-offset-lg-10,[dir=rtl] .offset-lg-10{margin-left:auto;margin-right:10%}.flex-offset-lg-15,.offset-lg-15{margin-left:15%}[dir=rtl] .flex-offset-lg-15,[dir=rtl] .offset-lg-15{margin-left:auto;margin-right:15%}.flex-offset-lg-20,.offset-lg-20{margin-left:20%}[dir=rtl] .flex-offset-lg-20,[dir=rtl] .offset-lg-20{margin-left:auto;margin-right:20%}.flex-offset-lg-25,.offset-lg-25{margin-left:25%}[dir=rtl] .flex-offset-lg-25,[dir=rtl] .offset-lg-25{margin-left:auto;margin-right:25%}.flex-offset-lg-30,.offset-lg-30{margin-left:30%}[dir=rtl] .flex-offset-lg-30,[dir=rtl] .offset-lg-30{margin-left:auto;margin-right:30%}.flex-offset-lg-35,.offset-lg-35{margin-left:35%}[dir=rtl] .flex-offset-lg-35,[dir=rtl] .offset-lg-35{margin-left:auto;margin-right:35%}.flex-offset-lg-40,.offset-lg-40{margin-left:40%}[dir=rtl] .flex-offset-lg-40,[dir=rtl] .offset-lg-40{margin-left:auto;margin-right:40%}.flex-offset-lg-45,.offset-lg-45{margin-left:45%}[dir=rtl] .flex-offset-lg-45,[dir=rtl] .offset-lg-45{margin-left:auto;margin-right:45%}.flex-offset-lg-50,.offset-lg-50{margin-left:50%}[dir=rtl] .flex-offset-lg-50,[dir=rtl] .offset-lg-50{margin-left:auto;margin-right:50%}.flex-offset-lg-55,.offset-lg-55{margin-left:55%}[dir=rtl] .flex-offset-lg-55,[dir=rtl] .offset-lg-55{margin-left:auto;margin-right:55%}.flex-offset-lg-60,.offset-lg-60{margin-left:60%}[dir=rtl] .flex-offset-lg-60,[dir=rtl] .offset-lg-60{margin-left:auto;margin-right:60%}.flex-offset-lg-65,.offset-lg-65{margin-left:65%}[dir=rtl] .flex-offset-lg-65,[dir=rtl] .offset-lg-65{margin-left:auto;margin-right:65%}.flex-offset-lg-70,.offset-lg-70{margin-left:70%}[dir=rtl] .flex-offset-lg-70,[dir=rtl] .offset-lg-70{margin-left:auto;margin-right:70%}.flex-offset-lg-75,.offset-lg-75{margin-left:75%}[dir=rtl] .flex-offset-lg-75,[dir=rtl] .offset-lg-75{margin-left:auto;margin-right:75%}.flex-offset-lg-80,.offset-lg-80{margin-left:80%}[dir=rtl] .flex-offset-lg-80,[dir=rtl] .offset-lg-80{margin-left:auto;margin-right:80%}.flex-offset-lg-85,.offset-lg-85{margin-left:85%}[dir=rtl] .flex-offset-lg-85,[dir=rtl] .offset-lg-85{margin-left:auto;margin-right:85%}.flex-offset-lg-90,.offset-lg-90{margin-left:90%}[dir=rtl] .flex-offset-lg-90,[dir=rtl] .offset-lg-90{margin-left:auto;margin-right:90%}.flex-offset-lg-95,.offset-lg-95{margin-left:95%}[dir=rtl] .flex-offset-lg-95,[dir=rtl] .offset-lg-95{margin-left:auto;margin-right:95%}.flex-offset-lg-33,.offset-lg-33{margin-left:calc(100% / 3)}.flex-offset-lg-66,.offset-lg-66{margin-left:calc(200% / 3)}[dir=rtl] .flex-offset-lg-66,[dir=rtl] .offset-lg-66{margin-left:auto;margin-right:calc(200% / 3)}.layout-align-lg,.layout-align-lg-start-stretch{justify-content:flex-start;align-content:stretch;align-items:stretch}.layout-align-lg-start,.layout-align-lg-start-center,.layout-align-lg-start-end,.layout-align-lg-start-start,.layout-align-lg-start-stretch{justify-content:flex-start}.layout-align-lg-center,.layout-align-lg-center-center,.layout-align-lg-center-end,.layout-align-lg-center-start,.layout-align-lg-center-stretch{justify-content:center}.layout-align-lg-end,.layout-align-lg-end-center,.layout-align-lg-end-end,.layout-align-lg-end-start,.layout-align-lg-end-stretch{justify-content:flex-end}.layout-align-lg-space-around,.layout-align-lg-space-around-center,.layout-align-lg-space-around-end,.layout-align-lg-space-around-start,.layout-align-lg-space-around-stretch{justify-content:space-around}.layout-align-lg-space-between,.layout-align-lg-space-between-center,.layout-align-lg-space-between-end,.layout-align-lg-space-between-start,.layout-align-lg-space-between-stretch{justify-content:space-between}.layout-align-lg-center-start,.layout-align-lg-end-start,.layout-align-lg-space-around-start,.layout-align-lg-space-between-start,.layout-align-lg-start-start{align-items:flex-start;align-content:flex-start}.layout-align-lg-center-center,.layout-align-lg-end-center,.layout-align-lg-space-around-center,.layout-align-lg-space-between-center,.layout-align-lg-start-center{align-items:center;align-content:center;max-width:100%}.layout-align-lg-center-center>*,.layout-align-lg-end-center>*,.layout-align-lg-space-around-center>*,.layout-align-lg-space-between-center>*,.layout-align-lg-start-center>*{max-width:100%;box-sizing:border-box}.layout-align-lg-center-end,.layout-align-lg-end-end,.layout-align-lg-space-around-end,.layout-align-lg-space-between-end,.layout-align-lg-start-end{align-items:flex-end;align-content:flex-end}.layout-align-lg-center-stretch,.layout-align-lg-end-stretch,.layout-align-lg-space-around-stretch,.layout-align-lg-space-between-stretch,.layout-align-lg-start-stretch{align-items:stretch;align-content:stretch}.flex-lg{flex:1;box-sizing:border-box}.flex-lg-grow{flex:1 1 100%;box-sizing:border-box}.flex-lg-initial{flex:0 1 auto;box-sizing:border-box}.flex-lg-auto{flex:1 1 auto;box-sizing:border-box}.flex-lg-none{flex:0 0 auto;box-sizing:border-box}.flex-lg-noshrink{flex:1 0 auto;box-sizing:border-box}.flex-lg-nogrow{flex:0 1 auto;box-sizing:border-box}.flex-lg-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-lg-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-lg-column>.flex-lg-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box;min-height:0}.flex-lg-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.flex-lg-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.flex-lg-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.flex-lg-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.flex-lg-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.flex-lg-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.flex-lg-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.flex-lg-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.flex-lg-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.flex-lg-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.flex-lg-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.flex-lg-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.flex-lg-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.flex-lg-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.flex-lg-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.flex-lg-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.flex-lg-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.flex-lg-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.flex-lg-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.flex-lg-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-lg-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-lg-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-lg-row>.flex{min-width:0}.layout-lg-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-lg-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-column>.flex{min-height:0}.layout-lg,.layout-lg-column,.layout-lg-row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.layout-lg-column{flex-direction:column}.layout-lg-row{flex-direction:row}}@media (min-width:1920px){.flex-order-gt-lg--20{order:-20}.flex-order-gt-lg--19{order:-19}.flex-order-gt-lg--18{order:-18}.flex-order-gt-lg--17{order:-17}.flex-order-gt-lg--16{order:-16}.flex-order-gt-lg--15{order:-15}.flex-order-gt-lg--14{order:-14}.flex-order-gt-lg--13{order:-13}.flex-order-gt-lg--12{order:-12}.flex-order-gt-lg--11{order:-11}.flex-order-gt-lg--10{order:-10}.flex-order-gt-lg--9{order:-9}.flex-order-gt-lg--8{order:-8}.flex-order-gt-lg--7{order:-7}.flex-order-gt-lg--6{order:-6}.flex-order-gt-lg--5{order:-5}.flex-order-gt-lg--4{order:-4}.flex-order-gt-lg--3{order:-3}.flex-order-gt-lg--2{order:-2}.flex-order-gt-lg--1{order:-1}.flex-order-gt-lg-0{order:0}.flex-order-gt-lg-1{order:1}.flex-order-gt-lg-2{order:2}.flex-order-gt-lg-3{order:3}.flex-order-gt-lg-4{order:4}.flex-order-gt-lg-5{order:5}.flex-order-gt-lg-6{order:6}.flex-order-gt-lg-7{order:7}.flex-order-gt-lg-8{order:8}.flex-order-gt-lg-9{order:9}.flex-order-gt-lg-10{order:10}.flex-order-gt-lg-11{order:11}.flex-order-gt-lg-12{order:12}.flex-order-gt-lg-13{order:13}.flex-order-gt-lg-14{order:14}.flex-order-gt-lg-15{order:15}.flex-order-gt-lg-16{order:16}.flex-order-gt-lg-17{order:17}.flex-order-gt-lg-18{order:18}.flex-order-gt-lg-19{order:19}.flex-order-gt-lg-20{order:20}.flex-offset-gt-lg-0,.offset-gt-lg-0{margin-left:0}[dir=rtl] .flex-offset-gt-lg-0,[dir=rtl] .offset-gt-lg-0{margin-left:auto;margin-right:0}.flex-offset-gt-lg-5,.offset-gt-lg-5{margin-left:5%}[dir=rtl] .flex-offset-gt-lg-5,[dir=rtl] .offset-gt-lg-5{margin-left:auto;margin-right:5%}.flex-offset-gt-lg-10,.offset-gt-lg-10{margin-left:10%}[dir=rtl] .flex-offset-gt-lg-10,[dir=rtl] .offset-gt-lg-10{margin-left:auto;margin-right:10%}.flex-offset-gt-lg-15,.offset-gt-lg-15{margin-left:15%}[dir=rtl] .flex-offset-gt-lg-15,[dir=rtl] .offset-gt-lg-15{margin-left:auto;margin-right:15%}.flex-offset-gt-lg-20,.offset-gt-lg-20{margin-left:20%}[dir=rtl] .flex-offset-gt-lg-20,[dir=rtl] .offset-gt-lg-20{margin-left:auto;margin-right:20%}.flex-offset-gt-lg-25,.offset-gt-lg-25{margin-left:25%}[dir=rtl] .flex-offset-gt-lg-25,[dir=rtl] .offset-gt-lg-25{margin-left:auto;margin-right:25%}.flex-offset-gt-lg-30,.offset-gt-lg-30{margin-left:30%}[dir=rtl] .flex-offset-gt-lg-30,[dir=rtl] .offset-gt-lg-30{margin-left:auto;margin-right:30%}.flex-offset-gt-lg-35,.offset-gt-lg-35{margin-left:35%}[dir=rtl] .flex-offset-gt-lg-35,[dir=rtl] .offset-gt-lg-35{margin-left:auto;margin-right:35%}.flex-offset-gt-lg-40,.offset-gt-lg-40{margin-left:40%}[dir=rtl] .flex-offset-gt-lg-40,[dir=rtl] .offset-gt-lg-40{margin-left:auto;margin-right:40%}.flex-offset-gt-lg-45,.offset-gt-lg-45{margin-left:45%}[dir=rtl] .flex-offset-gt-lg-45,[dir=rtl] .offset-gt-lg-45{margin-left:auto;margin-right:45%}.flex-offset-gt-lg-50,.offset-gt-lg-50{margin-left:50%}[dir=rtl] .flex-offset-gt-lg-50,[dir=rtl] .offset-gt-lg-50{margin-left:auto;margin-right:50%}.flex-offset-gt-lg-55,.offset-gt-lg-55{margin-left:55%}[dir=rtl] .flex-offset-gt-lg-55,[dir=rtl] .offset-gt-lg-55{margin-left:auto;margin-right:55%}.flex-offset-gt-lg-60,.offset-gt-lg-60{margin-left:60%}[dir=rtl] .flex-offset-gt-lg-60,[dir=rtl] .offset-gt-lg-60{margin-left:auto;margin-right:60%}.flex-offset-gt-lg-65,.offset-gt-lg-65{margin-left:65%}[dir=rtl] .flex-offset-gt-lg-65,[dir=rtl] .offset-gt-lg-65{margin-left:auto;margin-right:65%}.flex-offset-gt-lg-70,.offset-gt-lg-70{margin-left:70%}[dir=rtl] .flex-offset-gt-lg-70,[dir=rtl] .offset-gt-lg-70{margin-left:auto;margin-right:70%}.flex-offset-gt-lg-75,.offset-gt-lg-75{margin-left:75%}[dir=rtl] .flex-offset-gt-lg-75,[dir=rtl] .offset-gt-lg-75{margin-left:auto;margin-right:75%}.flex-offset-gt-lg-80,.offset-gt-lg-80{margin-left:80%}[dir=rtl] .flex-offset-gt-lg-80,[dir=rtl] .offset-gt-lg-80{margin-left:auto;margin-right:80%}.flex-offset-gt-lg-85,.offset-gt-lg-85{margin-left:85%}[dir=rtl] .flex-offset-gt-lg-85,[dir=rtl] .offset-gt-lg-85{margin-left:auto;margin-right:85%}.flex-offset-gt-lg-90,.offset-gt-lg-90{margin-left:90%}[dir=rtl] .flex-offset-gt-lg-90,[dir=rtl] .offset-gt-lg-90{margin-left:auto;margin-right:90%}.flex-offset-gt-lg-95,.offset-gt-lg-95{margin-left:95%}[dir=rtl] .flex-offset-gt-lg-95,[dir=rtl] .offset-gt-lg-95{margin-left:auto;margin-right:95%}.flex-offset-gt-lg-33,.offset-gt-lg-33{margin-left:calc(100% / 3)}.flex-offset-gt-lg-66,.offset-gt-lg-66{margin-left:calc(200% / 3)}[dir=rtl] .flex-offset-gt-lg-66,[dir=rtl] .offset-gt-lg-66{margin-left:auto;margin-right:calc(200% / 3)}.layout-align-gt-lg,.layout-align-gt-lg-start-stretch{justify-content:flex-start;align-content:stretch;align-items:stretch}.layout-align-gt-lg-start,.layout-align-gt-lg-start-center,.layout-align-gt-lg-start-end,.layout-align-gt-lg-start-start,.layout-align-gt-lg-start-stretch{justify-content:flex-start}.layout-align-gt-lg-center,.layout-align-gt-lg-center-center,.layout-align-gt-lg-center-end,.layout-align-gt-lg-center-start,.layout-align-gt-lg-center-stretch{justify-content:center}.layout-align-gt-lg-end,.layout-align-gt-lg-end-center,.layout-align-gt-lg-end-end,.layout-align-gt-lg-end-start,.layout-align-gt-lg-end-stretch{justify-content:flex-end}.layout-align-gt-lg-space-around,.layout-align-gt-lg-space-around-center,.layout-align-gt-lg-space-around-end,.layout-align-gt-lg-space-around-start,.layout-align-gt-lg-space-around-stretch{justify-content:space-around}.layout-align-gt-lg-space-between,.layout-align-gt-lg-space-between-center,.layout-align-gt-lg-space-between-end,.layout-align-gt-lg-space-between-start,.layout-align-gt-lg-space-between-stretch{justify-content:space-between}.layout-align-gt-lg-center-start,.layout-align-gt-lg-end-start,.layout-align-gt-lg-space-around-start,.layout-align-gt-lg-space-between-start,.layout-align-gt-lg-start-start{align-items:flex-start;align-content:flex-start}.layout-align-gt-lg-center-center,.layout-align-gt-lg-end-center,.layout-align-gt-lg-space-around-center,.layout-align-gt-lg-space-between-center,.layout-align-gt-lg-start-center{align-items:center;align-content:center;max-width:100%}.layout-align-gt-lg-center-center>*,.layout-align-gt-lg-end-center>*,.layout-align-gt-lg-space-around-center>*,.layout-align-gt-lg-space-between-center>*,.layout-align-gt-lg-start-center>*{max-width:100%;box-sizing:border-box}.layout-align-gt-lg-center-end,.layout-align-gt-lg-end-end,.layout-align-gt-lg-space-around-end,.layout-align-gt-lg-space-between-end,.layout-align-gt-lg-start-end{align-items:flex-end;align-content:flex-end}.layout-align-gt-lg-center-stretch,.layout-align-gt-lg-end-stretch,.layout-align-gt-lg-space-around-stretch,.layout-align-gt-lg-space-between-stretch,.layout-align-gt-lg-start-stretch{align-items:stretch;align-content:stretch}.flex-gt-lg{flex:1;box-sizing:border-box}.flex-gt-lg-grow{flex:1 1 100%;box-sizing:border-box}.flex-gt-lg-initial{flex:0 1 auto;box-sizing:border-box}.flex-gt-lg-auto{flex:1 1 auto;box-sizing:border-box}.flex-gt-lg-none{flex:0 0 auto;box-sizing:border-box}.flex-gt-lg-noshrink{flex:1 0 auto;box-sizing:border-box}.flex-gt-lg-nogrow{flex:0 1 auto;box-sizing:border-box}.flex-gt-lg-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-gt-lg-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-gt-lg-column>.flex-gt-lg-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box;min-height:0}.flex-gt-lg-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.flex-gt-lg-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.flex-gt-lg-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.flex-gt-lg-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.flex-gt-lg-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.flex-gt-lg-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.flex-gt-lg-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.flex-gt-lg-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.flex-gt-lg-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.flex-gt-lg-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.flex-gt-lg-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.flex-gt-lg-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.flex-gt-lg-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.flex-gt-lg-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.flex-gt-lg-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.flex-gt-lg-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.flex-gt-lg-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.flex-gt-lg-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.flex-gt-lg-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.flex-gt-lg-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-gt-lg-row>.flex{min-width:0}.layout-gt-lg-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-column>.flex{min-height:0}.layout-gt-lg,.layout-gt-lg-column,.layout-gt-lg-row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.layout-gt-lg-column{flex-direction:column}.layout-gt-lg-row{flex-direction:row}.flex-order-xl--20{order:-20}.flex-order-xl--19{order:-19}.flex-order-xl--18{order:-18}.flex-order-xl--17{order:-17}.flex-order-xl--16{order:-16}.flex-order-xl--15{order:-15}.flex-order-xl--14{order:-14}.flex-order-xl--13{order:-13}.flex-order-xl--12{order:-12}.flex-order-xl--11{order:-11}.flex-order-xl--10{order:-10}.flex-order-xl--9{order:-9}.flex-order-xl--8{order:-8}.flex-order-xl--7{order:-7}.flex-order-xl--6{order:-6}.flex-order-xl--5{order:-5}.flex-order-xl--4{order:-4}.flex-order-xl--3{order:-3}.flex-order-xl--2{order:-2}.flex-order-xl--1{order:-1}.flex-order-xl-0{order:0}.flex-order-xl-1{order:1}.flex-order-xl-2{order:2}.flex-order-xl-3{order:3}.flex-order-xl-4{order:4}.flex-order-xl-5{order:5}.flex-order-xl-6{order:6}.flex-order-xl-7{order:7}.flex-order-xl-8{order:8}.flex-order-xl-9{order:9}.flex-order-xl-10{order:10}.flex-order-xl-11{order:11}.flex-order-xl-12{order:12}.flex-order-xl-13{order:13}.flex-order-xl-14{order:14}.flex-order-xl-15{order:15}.flex-order-xl-16{order:16}.flex-order-xl-17{order:17}.flex-order-xl-18{order:18}.flex-order-xl-19{order:19}.flex-order-xl-20{order:20}.flex-offset-xl-0,.offset-xl-0{margin-left:0}[dir=rtl] .flex-offset-xl-0,[dir=rtl] .offset-xl-0{margin-left:auto;margin-right:0}.flex-offset-xl-5,.offset-xl-5{margin-left:5%}[dir=rtl] .flex-offset-xl-5,[dir=rtl] .offset-xl-5{margin-left:auto;margin-right:5%}.flex-offset-xl-10,.offset-xl-10{margin-left:10%}[dir=rtl] .flex-offset-xl-10,[dir=rtl] .offset-xl-10{margin-left:auto;margin-right:10%}.flex-offset-xl-15,.offset-xl-15{margin-left:15%}[dir=rtl] .flex-offset-xl-15,[dir=rtl] .offset-xl-15{margin-left:auto;margin-right:15%}.flex-offset-xl-20,.offset-xl-20{margin-left:20%}[dir=rtl] .flex-offset-xl-20,[dir=rtl] .offset-xl-20{margin-left:auto;margin-right:20%}.flex-offset-xl-25,.offset-xl-25{margin-left:25%}[dir=rtl] .flex-offset-xl-25,[dir=rtl] .offset-xl-25{margin-left:auto;margin-right:25%}.flex-offset-xl-30,.offset-xl-30{margin-left:30%}[dir=rtl] .flex-offset-xl-30,[dir=rtl] .offset-xl-30{margin-left:auto;margin-right:30%}.flex-offset-xl-35,.offset-xl-35{margin-left:35%}[dir=rtl] .flex-offset-xl-35,[dir=rtl] .offset-xl-35{margin-left:auto;margin-right:35%}.flex-offset-xl-40,.offset-xl-40{margin-left:40%}[dir=rtl] .flex-offset-xl-40,[dir=rtl] .offset-xl-40{margin-left:auto;margin-right:40%}.flex-offset-xl-45,.offset-xl-45{margin-left:45%}[dir=rtl] .flex-offset-xl-45,[dir=rtl] .offset-xl-45{margin-left:auto;margin-right:45%}.flex-offset-xl-50,.offset-xl-50{margin-left:50%}[dir=rtl] .flex-offset-xl-50,[dir=rtl] .offset-xl-50{margin-left:auto;margin-right:50%}.flex-offset-xl-55,.offset-xl-55{margin-left:55%}[dir=rtl] .flex-offset-xl-55,[dir=rtl] .offset-xl-55{margin-left:auto;margin-right:55%}.flex-offset-xl-60,.offset-xl-60{margin-left:60%}[dir=rtl] .flex-offset-xl-60,[dir=rtl] .offset-xl-60{margin-left:auto;margin-right:60%}.flex-offset-xl-65,.offset-xl-65{margin-left:65%}[dir=rtl] .flex-offset-xl-65,[dir=rtl] .offset-xl-65{margin-left:auto;margin-right:65%}.flex-offset-xl-70,.offset-xl-70{margin-left:70%}[dir=rtl] .flex-offset-xl-70,[dir=rtl] .offset-xl-70{margin-left:auto;margin-right:70%}.flex-offset-xl-75,.offset-xl-75{margin-left:75%}[dir=rtl] .flex-offset-xl-75,[dir=rtl] .offset-xl-75{margin-left:auto;margin-right:75%}.flex-offset-xl-80,.offset-xl-80{margin-left:80%}[dir=rtl] .flex-offset-xl-80,[dir=rtl] .offset-xl-80{margin-left:auto;margin-right:80%}.flex-offset-xl-85,.offset-xl-85{margin-left:85%}[dir=rtl] .flex-offset-xl-85,[dir=rtl] .offset-xl-85{margin-left:auto;margin-right:85%}.flex-offset-xl-90,.offset-xl-90{margin-left:90%}[dir=rtl] .flex-offset-xl-90,[dir=rtl] .offset-xl-90{margin-left:auto;margin-right:90%}.flex-offset-xl-95,.offset-xl-95{margin-left:95%}[dir=rtl] .flex-offset-xl-95,[dir=rtl] .offset-xl-95{margin-left:auto;margin-right:95%}.flex-offset-xl-33,.offset-xl-33{margin-left:calc(100% / 3)}.flex-offset-xl-66,.offset-xl-66{margin-left:calc(200% / 3)}[dir=rtl] .flex-offset-xl-66,[dir=rtl] .offset-xl-66{margin-left:auto;margin-right:calc(200% / 3)}.layout-align-xl,.layout-align-xl-start-stretch{justify-content:flex-start;align-content:stretch;align-items:stretch}.layout-align-xl-start,.layout-align-xl-start-center,.layout-align-xl-start-end,.layout-align-xl-start-start,.layout-align-xl-start-stretch{justify-content:flex-start}.layout-align-xl-center,.layout-align-xl-center-center,.layout-align-xl-center-end,.layout-align-xl-center-start,.layout-align-xl-center-stretch{justify-content:center}.layout-align-xl-end,.layout-align-xl-end-center,.layout-align-xl-end-end,.layout-align-xl-end-start,.layout-align-xl-end-stretch{justify-content:flex-end}.layout-align-xl-space-around,.layout-align-xl-space-around-center,.layout-align-xl-space-around-end,.layout-align-xl-space-around-start,.layout-align-xl-space-around-stretch{justify-content:space-around}.layout-align-xl-space-between,.layout-align-xl-space-between-center,.layout-align-xl-space-between-end,.layout-align-xl-space-between-start,.layout-align-xl-space-between-stretch{justify-content:space-between}.layout-align-xl-center-start,.layout-align-xl-end-start,.layout-align-xl-space-around-start,.layout-align-xl-space-between-start,.layout-align-xl-start-start{align-items:flex-start;align-content:flex-start}.layout-align-xl-center-center,.layout-align-xl-end-center,.layout-align-xl-space-around-center,.layout-align-xl-space-between-center,.layout-align-xl-start-center{align-items:center;align-content:center;max-width:100%}.layout-align-xl-center-center>*,.layout-align-xl-end-center>*,.layout-align-xl-space-around-center>*,.layout-align-xl-space-between-center>*,.layout-align-xl-start-center>*{max-width:100%;box-sizing:border-box}.layout-align-xl-center-end,.layout-align-xl-end-end,.layout-align-xl-space-around-end,.layout-align-xl-space-between-end,.layout-align-xl-start-end{align-items:flex-end;align-content:flex-end}.layout-align-xl-center-stretch,.layout-align-xl-end-stretch,.layout-align-xl-space-around-stretch,.layout-align-xl-space-between-stretch,.layout-align-xl-start-stretch{align-items:stretch;align-content:stretch}.flex-xl{flex:1;box-sizing:border-box}.flex-xl-grow{flex:1 1 100%;box-sizing:border-box}.flex-xl-initial{flex:0 1 auto;box-sizing:border-box}.flex-xl-auto{flex:1 1 auto;box-sizing:border-box}.flex-xl-none{flex:0 0 auto;box-sizing:border-box}.flex-xl-noshrink{flex:1 0 auto;box-sizing:border-box}.flex-xl-nogrow{flex:0 1 auto;box-sizing:border-box}.flex-xl-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-xl-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-xl-column>.flex-xl-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box;min-height:0}.flex-xl-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.flex-xl-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.flex-xl-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.flex-xl-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.flex-xl-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.flex-xl-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.flex-xl-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.flex-xl-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.flex-xl-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.flex-xl-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.flex-xl-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.flex-xl-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.flex-xl-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.flex-xl-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.flex-xl-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.flex-xl-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.flex-xl-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.flex-xl-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.flex-xl-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.flex-xl-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-xl-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-xl-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-xl-row>.flex{min-width:0}.layout-xl-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-xl-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-column>.flex{min-height:0}.layout-xl,.layout-xl-column,.layout-xl-row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.layout-xl-column{flex-direction:column}.layout-xl-row{flex-direction:row}.hide-gt-lg:not(.show-gt-xs):not(.show-gt-sm):not(.show-gt-md):not(.show-gt-lg):not(.show-xl):not(.show),.hide-gt-md:not(.show-gt-xs):not(.show-gt-sm):not(.show-gt-md):not(.show-gt-lg):not(.show-xl):not(.show),.hide-gt-sm:not(.show-gt-xs):not(.show-gt-sm):not(.show-gt-md):not(.show-gt-lg):not(.show-xl):not(.show),.hide-gt-xs:not(.show-gt-xs):not(.show-gt-sm):not(.show-gt-md):not(.show-gt-lg):not(.show-xl):not(.show),.hide:not(.show-gt-xs):not(.show-gt-sm):not(.show-gt-md):not(.show-gt-lg):not(.show-xl):not(.show){display:none}.hide-xl:not(.show-xl):not(.show-gt-lg):not(.show-gt-md):not(.show-gt-sm):not(.show-gt-xs):not(.show){display:none}}@media print{.hide-print:not(.show-print):not(.show){display:none!important}}*{text-rendering:optimizeLegibility;-o-text-rendering:optimizeLegibility;-ms-text-rendering:optimizeLegibility;-moz-text-rendering:optimizeLegibility;-webkit-text-rendering:optimizeLegibility;-webkit-tap-highlight-color:transparent;box-sizing:border-box}:after,:before{box-sizing:border-box}:focus{outline:0}:not(md-input-container)>button,:not(md-input-container)>input[type=button],:not(md-input-container)>input[type=email],:not(md-input-container)>input[type=image],:not(md-input-container)>input[type=password],:not(md-input-container)>input[type=search],:not(md-input-container)>input[type=submit],:not(md-input-container)>input[type=tel],:not(md-input-container)>input[type=text],:not(md-input-container)>textarea{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;appearance:none;-moz-appearance:none;-webkit-appearance:none;border:none;padding:0;margin:0}:not(md-input-container)>button,:not(md-input-container)>input[type=button],:not(md-input-container)>input[type=submit]{background:0 0}button{border-radius:0;font-family:inherit;font-size:inherit;padding:0;margin:0;appearance:none;-moz-appearance:none;-webkit-appearance:none}[layout]>*{min-height:auto;min-height:initial}md-card>:not(md-card-content) img,md-card>img{height:inherit;height:initial}.md-datepicker-calendar-pane *{box-sizing:initial}md-autocomplete-wrap>input[type=search]{background:#fff;padding:0 15px!important}md-backdrop.md-opaque{background-color:rgba(33,33,33,.48)!important}md-card md-card-header md-card-avatar md-icon{width:40px;height:40px}md-checkbox.no-label{margin:0}md-chip .md-chip-remove md-icon{margin-left:2px}md-chip .md-chip-remove md-icon svg{width:18px;height:18px;max-width:18px;max-height:18px;margin:4px}md-datepicker .md-datepicker-button{padding:0!important;margin:0!important;vertical-align:middle}md-datepicker .md-datepicker-input-container{margin-left:0}.md-inline-form md-datepicker{margin-top:14px}md-dialog md-dialog-content{padding:32px 24px 24px 24px}md-dialog md-dialog-actions{min-height:64px;padding-top:8px;padding-bottom:8px}md-dialog md-dialog-actions .md-button{margin:0 8px}md-input-container.no-errors-spacer .md-errors-spacer{display:none}md-input-container .input-hint{position:absolute;right:auto;bottom:7px;left:2px;font-size:12px;line-height:14px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-input-container.md-icon-left .input-hint{left:38px}md-list-item .md-list-item-text p{font-size:13px!important}.md-menu,md-menu{padding:0}md-menu-content.md-menu-bar-menu.md-dense{padding:8px 0}md-menu-content.md-menu-bar-menu.md-dense .md-button,md-menu-content.md-menu-bar-menu.md-dense md-menu-item{height:40px;line-height:40px}md-menu-content.md-menu-bar-menu.md-dense .md-button.md-indent>md-icon,md-menu-content.md-menu-bar-menu.md-dense md-menu-item.md-indent>md-icon{top:8px}.md-open-menu-container md-menu-content md-menu-item.selected{opacity:.4}md-menu-content md-menu-item .md-button{text-align:left}md-select.simplified{margin:0 8px}md-select.simplified .md-select-value{border:none!important;box-sizing:border-box;padding:0}md-select.simplified .md-select-value :first-child{transform:none;height:auto}md-select.simplified .md-select-value .md-select-icon{transform:none;font-size:16px}md-select.simplified .md-select-value .md-select-icon:after{top:1px}md-select[multiple] md-select-value>:first-child{display:flex}md-select[multiple] md-select-value>:first-child>:first-child{flex:0}md-select[multiple] md-select-value>:first-child .md-container{padding-right:6px}md-select[multiple] md-select-value>:first-child .md-container:first-of-type{padding-right:0}md-select-menu md-select-header{position:relative;display:flex;align-items:center;width:auto;height:48px;padding-left:10.667px;box-shadow:0 1px 0 0 rgba(0,0,0,.1),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12);cursor:pointer}md-select-menu md-select-header input[type=search]{border:none;outline:0;height:100%;width:100%;padding:0}md-sidenav{-webkit-overflow-scrolling:touch}md-toolbar.colored-toolbar{color:rgba(255,255,255,.87)}md-toolbar.colored-toolbar md-menu-bar md-menu._md-open>button{background:rgba(0,0,0,.12)}md-toolbar.colored-toolbar md-menu._md-open>button{background:rgba(0,0,0,.12)}md-toolbar.colored-toolbar input{color:rgba(255,255,255,.87)!important}md-progress-circular[disabled]{visibility:hidden}body,html{overflow:hidden!important}#main{position:absolute;top:0;right:0;bottom:0;left:0}body.boxed{background:#3f4450}body.boxed #main{overflow:hidden!important;width:100%;max-width:1280px;margin:0 auto;box-shadow:0 0 12px rgba(0,0,0,.45)}#layout-content-only{position:relative;height:100%;max-height:100%}#layout-content-only #content{position:absolute;top:0;right:0;bottom:0;left:0}#layout-content-with-toolbar{position:relative;height:100%;max-height:100%}#layout-content-with-toolbar #content{position:absolute;top:64px;right:0;bottom:0;left:0}#layout-vertical-navigation{height:100%;max-height:100%}#layout-vertical-navigation #content-container{position:relative;overflow:hidden}#layout-vertical-navigation #content-container #content{position:absolute;top:64px;right:0;bottom:0;left:0}#layout-vertical-navigation-fullwidth-toolbar{height:100%;max-height:100%}#layout-vertical-navigation-fullwidth-toolbar #main-container{position:relative}#layout-vertical-navigation-fullwidth-toolbar #main-container #content-container{position:relative;overflow:hidden}#layout-vertical-navigation-fullwidth-toolbar #main-container #content-container #content{position:absolute;top:0;right:0;bottom:0;left:0}#layout-vertical-navigation-fullwidth-toolbar-2{height:100%;max-height:100%}#layout-vertical-navigation-fullwidth-toolbar-2 #main-container{position:relative}#layout-vertical-navigation-fullwidth-toolbar-2 #main-container #content-container{position:relative;overflow:hidden}#layout-vertical-navigation-fullwidth-toolbar-2 #main-container #content-container #content{position:absolute;top:0;right:0;bottom:0;left:0}#layout-horizontal-navigation{height:100%;max-height:100%}#layout-horizontal-navigation #content-container{position:relative;overflow:hidden}#layout-horizontal-navigation #content-container #content{position:absolute;top:0;right:0;bottom:0;left:0}.page-layout{position:relative;overflow:hidden}.page-layout .top-bg{position:absolute;z-index:1;top:0;right:0;left:0;height:200px;background-image:url(/assets/images/backgrounds/header-bg.png);background-size:cover}.page-layout md-backdrop{z-index:50}.page-layout>.header .breadcrumb{margin-bottom:16px;font-weight:500;color:rgba(0,0,0,.54)}.page-layout>.header .breadcrumb md-icon{margin:0}.page-layout>.header .breadcrumb .separator{margin:0 8px}.page-layout>.header .title{font-size:34px}.page-layout.carded{min-height:100%;height:100%}.page-layout.carded.fullwidth.single-scroll{height:auto}.page-layout.carded.fullwidth.single-scroll>.center .content-card .content{overflow:hidden}.page-layout.carded.fullwidth>.center{position:relative;z-index:2;margin-left:32px;margin-right:32px}.page-layout.carded.fullwidth>.center .header{height:136px;min-height:136px;max-height:136px;padding:24px}.page-layout.carded.fullwidth>.center .content-card{background:#fff;box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12);overflow:hidden}.page-layout.carded.fullwidth>.center .content-card .toolbar{padding:8px 24px;height:64px;min-height:64px;max-height:64px;border-bottom:1px solid rgba(0,0,0,.12)}.page-layout.carded.fullwidth>.center .content-card .content{padding:24px;background:#fff}.page-layout.carded.left-sidenav.single-scroll{height:auto}.page-layout.carded.left-sidenav.single-scroll>.center .content-card .content{overflow:hidden}.page-layout.carded.left-sidenav>.sidenav{width:240px;min-width:240px;max-width:240px;box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12);z-index:51}.page-layout.carded.left-sidenav>.sidenav .header{height:200px;min-height:200px;max-height:200px;padding:24px}.page-layout.carded.left-sidenav>.sidenav .content{background:0 0;padding:24px}.page-layout.carded.left-sidenav>.sidenav.md-locked-open{width:220px;min-width:220px;max-width:220px;z-index:2;background:0 0;box-shadow:none}.page-layout.carded.left-sidenav>.sidenav.md-locked-open+.center{margin-left:0}.page-layout.carded.left-sidenav>.sidenav:not(.md-locked-open) .header{border-bottom:1px solid rgba(0,0,0,.12)}.page-layout.carded.left-sidenav>.sidenav:not(.md-locked-open) .content{overflow:hidden}.page-layout.carded.left-sidenav>.center{position:relative;z-index:2;margin-left:32px;margin-right:32px}.page-layout.carded.left-sidenav>.center .header{height:136px;min-height:136px;max-height:136px;padding:24px}.page-layout.carded.left-sidenav>.center .content-card{background:#fff;box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12);overflow:hidden}.page-layout.carded.left-sidenav>.center .content-card .toolbar{padding:8px 24px;height:64px;min-height:64px;max-height:64px;border-bottom:1px solid rgba(0,0,0,.12)}.page-layout.carded.left-sidenav>.center .content-card .toolbar .sidenav-toggle{margin:0 8px 0 0!important;padding:0!important;border-radius:0}.page-layout.carded.left-sidenav>.center .content-card .content{padding:24px;background:#fff}.page-layout.carded.right-sidenav.single-scroll{height:auto}.page-layout.carded.right-sidenav.single-scroll>.center .content-card .content{overflow:hidden}.page-layout.carded.right-sidenav>.sidenav{width:240px;min-width:240px;max-width:240px;box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12);z-index:51}.page-layout.carded.right-sidenav>.sidenav .header{height:200px;min-height:200px;max-height:200px;padding:24px 24px 24px 0}.page-layout.carded.right-sidenav>.sidenav .content{background:0 0;padding:24px 24px 24px 0}.page-layout.carded.right-sidenav>.sidenav.md-locked-open{width:196px;min-width:196px;max-width:196px;z-index:2;background:0 0;box-shadow:none}.page-layout.carded.right-sidenav>.sidenav:not(.md-locked-open) .header{padding:24px;border-bottom:1px solid rgba(0,0,0,.12)}.page-layout.carded.right-sidenav>.sidenav:not(.md-locked-open) .content{overflow:hidden;padding:24px}.page-layout.carded.right-sidenav>.center{position:relative;z-index:2;margin-left:32px;margin-right:32px}.page-layout.carded.right-sidenav>.center .header{height:136px;min-height:136px;max-height:136px;padding:24px}.page-layout.carded.right-sidenav>.center .content-card{background:#fff;box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12);overflow:hidden}.page-layout.carded.right-sidenav>.center .content-card .toolbar{padding:8px 24px;height:64px;min-height:64px;max-height:64px;border-bottom:1px solid rgba(0,0,0,.12)}.page-layout.carded.right-sidenav>.center .content-card .toolbar .sidenav-toggle{margin:0 0 0 8px!important;padding:0!important;border-radius:0}.page-layout.carded.right-sidenav>.center .content-card .content{padding:24px;background:#fff}.page-layout.simple.fullwidth,.page-layout.simple.inner-sidenav{min-height:100%}.page-layout.simple.fullwidth>.header,.page-layout.simple.inner-sidenav>.header{height:200px;min-height:200px;max-height:200px;padding:24px;background-image:url(/assets/images/backgrounds/header-bg.png);background-size:cover}.page-layout.simple.fullwidth>.content,.page-layout.simple.inner-sidenav>.content{padding:24px}.page-layout.simple.left-sidenav{min-height:100%;height:100%}.page-layout.simple.left-sidenav.single-scroll{height:auto}.page-layout.simple.left-sidenav.single-scroll>.center{overflow:hidden}.page-layout.simple.left-sidenav.inner-sidenav>.content>md-sidenav{margin-right:24px}.page-layout.simple.left-sidenav .sidenav{width:240px;min-width:240px;max-width:240px;padding:24px;z-index:51;box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12)}.page-layout.simple.left-sidenav .sidenav.md-locked-open{width:220px;min-width:220px;max-width:220px;z-index:2;box-shadow:none;background:0 0}.page-layout.simple.left-sidenav>.center{position:relative;overflow:auto;z-index:3;box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12)}.page-layout.simple.left-sidenav>.center .header{height:200px;min-height:200px;max-height:200px;padding:24px;background-image:url(/assets/images/backgrounds/header-bg.png);background-size:cover}.page-layout.simple.left-sidenav>.center .content{padding:24px;background:#fff}.page-layout.simple.right-sidenav{min-height:100%;height:100%}.page-layout.simple.right-sidenav.single-scroll{height:auto}.page-layout.simple.right-sidenav.single-scroll>.center{overflow:hidden}.page-layout.simple.right-sidenav.inner-sidenav>.content>md-sidenav{margin-left:24px}.page-layout.simple.right-sidenav .sidenav{width:240px;min-width:240px;max-width:240px;padding:24px;z-index:51;box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12)}.page-layout.simple.right-sidenav .sidenav.md-locked-open{width:220px;min-width:220px;max-width:220px;z-index:2;box-shadow:none;background:0 0}.page-layout.simple.right-sidenav>.center{position:relative;overflow:auto;z-index:3;box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12)}.page-layout.simple.right-sidenav>.center .header{height:200px;min-height:200px;max-height:200px;padding:24px;background-image:url(/assets/images/backgrounds/header-bg.png);background-size:cover}.page-layout.simple.right-sidenav>.center .content{padding:24px;background:#fff}.page-layout.simple.inner-sidenav{height:auto}.page-layout.simple.inner-sidenav>.content>md-sidenav.md-locked-open{padding:0}.page-layout.simple.tabbed{min-height:100%}.page-layout.simple.tabbed>.header{height:200px;min-height:200px;max-height:200px;padding:24px;background-image:url(/assets/images/backgrounds/header-bg.png);background-size:cover}.page-layout.simple.tabbed>.content>md-tabs>md-tabs-wrapper{background:#fff;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);padding:0 24px}.page-layout.simple.tabbed>.content>md-tabs>md-tabs-wrapper md-tabs-canvas{height:56px}.page-layout.simple.tabbed>.content>md-tabs>md-tabs-wrapper md-tabs-canvas md-pagination-wrapper{height:56px}.page-layout.simple.tabbed>.content>md-tabs>md-tabs-wrapper md-tabs-canvas .md-tab{padding:16px 24px;text-transform:none}.page-layout.simple.tabbed>.content>md-tabs:not(.md-dynamic-height) md-tabs-content-wrapper{top:56px}.page-layout.simple.tabbed>.content>md-tabs>md-tabs-content-wrapper>md-tab-content{padding:24px}.page-layout.simple.tabbed>.content>md-nav-bar .md-nav-bar{background:#fff;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);border:none;height:56px}.page-layout.simple.tabbed>.content>md-nav-bar .md-nav-bar nav{margin:0 12px}.page-layout.simple.tabbed>.content>md-nav-bar .md-nav-bar nav .md-nav-item{height:56px}.page-layout.simple.tabbed>.content>md-nav-bar .md-nav-bar nav .md-nav-item ._md-nav-button{height:56px;line-height:32px}.page-layout.simple.tabbed>.content>md-nav-bar .md-nav-bar nav .md-nav-item ._md-nav-button-text{text-transform:none}.page-layout.blank{min-height:100%;padding:24px}.single-scroll .carded.fullwidth{height:auto}.single-scroll .carded.fullwidth>.center .content-card .content{overflow:hidden}.single-scroll .carded.left-sidenav{height:auto}.single-scroll .carded.left-sidenav>.center .content-card .content{overflow:hidden}.single-scroll .carded.right-sidenav{height:auto}.single-scroll .carded.right-sidenav>.center .content-card .content{overflow:hidden}.single-scroll .simple.left-sidenav{height:auto}.single-scroll .simple.left-sidenav>.center{overflow:hidden}.single-scroll .simple.right-sidenav{height:auto}.single-scroll .simple.right-sidenav>.center{overflow:hidden}@media screen and (max-width:1280px){.page-layout.simple.inner-sidenav.left-sidenav>.content,.page-layout.simple.inner-sidenav.right-sidenav>.content{height:auto!important}.page-layout.simple.inner-sidenav.left-sidenav>.content>md-sidenav,.page-layout.simple.inner-sidenav.right-sidenav>.content>md-sidenav{margin-left:0;margin-right:0}.sidenav-open .page-layout.simple.inner-sidenav{height:100%}}@media screen and (max-width:600px){.page-layout .top-bg{height:160px}.page-layout.carded.fullwidth>.center,.page-layout.carded.left-sidenav>.center,.page-layout.carded.right-sidenav>.center{margin-left:16px;margin-right:16px}.page-layout.carded.fullwidth>.center .header,.page-layout.carded.left-sidenav>.center .header,.page-layout.carded.right-sidenav>.center .header{height:96px;min-height:96px;max-height:96px;padding:16px}.page-layout.carded.fullwidth{height:auto}.page-layout.carded.fullwidth>.center .content-card .content{overflow:hidden}.page-layout.carded.left-sidenav,.page-layout.carded.right-sidenav{height:auto}.page-layout.carded.left-sidenav>.center .content-card .content,.page-layout.carded.right-sidenav>.center .content-card .content{overflow:hidden}.page-layout.simple.fullwidth>.header,.page-layout.simple.inner-sidenav>.header{height:160px;min-height:160px;max-height:160px;padding:16px}.page-layout.simple.left-sidenav>.center .header,.page-layout.simple.right-sidenav>.center .header{height:160px;min-height:160px;max-height:160px;padding:16px}.page-layout.simple.left-sidenav,.page-layout.simple.right-sidenav{height:auto}.page-layout.simple.left-sidenav>.center,.page-layout.simple.right-sidenav>.center{overflow:hidden}}.animate-slide-up{-webkit-backface-visibility:hidden;-webkit-perspective:1000px;transition-property:none;transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.46,.45,.94);opacity:1}.animate-slide-up.ng-enter{transform:translateY(100%);opacity:0}.animate-slide-up.ng-enter.ng-enter-active{transition-property:all;transform:translateY(0);opacity:1}.animate-slide-up.ng-leave{transform:translateY(0);opacity:1}.animate-slide-up.ng-leave.ng-leave-active{transition-property:all;transform:translateY(-100%);opacity:0}.animate-slide-up.ng-hide{transform:translateY(-100%);opacity:0}.animate-slide-up.ng-hide-add-active,.animate-slide-up.ng-hide-remove-active{transition-property:all}.animate-slide-down{-webkit-backface-visibility:hidden;-webkit-perspective:1000px;transition-property:none;transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.46,.45,.94);opacity:1}.animate-slide-down.ng-enter{transform:translateY(-100%);opacity:0}.animate-slide-down.ng-enter.ng-enter-active{transition-property:all;transform:translateY(0);opacity:1}.animate-slide-down.ng-leave{transform:translateY(0);opacity:1}.animate-slide-down.ng-leave.ng-leave-active{transition-property:all;transform:translateY(100%);opacity:0}.animate-slide-down.ng-hide{transform:translateY(-100%);opacity:0}.animate-slide-down.ng-hide-add-active,.animate-slide-down.ng-hide-remove-active{transition-property:all}.animate-slide-left{-webkit-backface-visibility:hidden;-webkit-perspective:1000px;transition-property:none;transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.46,.45,.94);opacity:1}.animate-slide-left.ng-enter{transform:translateX(100%);opacity:0}.animate-slide-left.ng-enter.ng-enter-active{transition-property:all;transform:translateX(0);opacity:1}.animate-slide-left.ng-leave{transform:translateX(0);opacity:1}.animate-slide-left.ng-leave.ng-leave-active{transition-property:all;transform:translateX(-100%);opacity:0}.animate-slide-left.ng-hide{transform:translateX(-100%);opacity:0}.animate-slide-left.ng-hide-add-active,.animate-slide-left.ng-hide-remove-active{transition-property:all}.animate-slide-right{-webkit-backface-visibility:hidden;-webkit-perspective:1000px;transition-property:none;transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.46,.45,.94);opacity:1}.animate-slide-right.ng-enter{transform:translateX(-100%);opacity:0}.animate-slide-right.ng-enter.ng-enter-active{transition-property:all;transform:translateX(0);opacity:1}.animate-slide-right.ng-leave{transform:translateX(0);opacity:1}.animate-slide-right.ng-leave.ng-leave-active{transition-property:all;transform:translateX(100%);opacity:0}.animate-slide-right.ng-hide{transform:translateX(100%);opacity:0}.animate-slide-right.ng-hide-add-active,.animate-slide-right.ng-hide-remove-active{transition-property:all}.animate-fade-in-out{-webkit-backface-visibility:hidden;-webkit-perspective:1000px;transition-property:none;transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.46,.45,.94);opacity:1}.animate-fade-in-out.ng-enter{opacity:0}.animate-fade-in-out.ng-enter.ng-enter-active{transition-property:all;opacity:1}.animate-fade-in-out.ng-leave{opacity:1}.animate-fade-in-out.ng-leave.ng-leave-active{transition-property:all;opacity:0}.animate-fade-in-out.ng-hide{opacity:0}.animate-fade-in-out.ng-hide-add-active,.animate-fade-in-out.ng-hide-remove-active{transition-property:all}@keyframes slide-in-left{0%{opacity:0;transform:translateX(-500px)}65%{opacity:1;transform:translateX(0)}100%{transform:translateX(0)}}@keyframes slide-in-right{0%{opacity:0;transform:translateX(500px)}65%{opacity:1;transform:translateX(0)}100%{transform:translateX(0)}}@keyframes slide-in-bottom{0%{opacity:0;transform:translateY(200px)}65%{opacity:1;transform:translateY(0)}100%{transform:translateY(0)}}.animate-rotate{animation:rotate 1.75s linear infinite}@keyframes rotate{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.black-fg,.black-text{color:rgba(0,0,0,.87)!important}.black-fg .icon,.black-fg .secondary-text,.black-fg.icon,.black-fg.secondary-text,.black-text .icon,.black-text .secondary-text,.black-text.icon,.black-text.secondary-text{color:rgba(0,0,0,.54)!important}.black-fg .disabled-text,.black-fg .hint-text,.black-fg.disabled-text,.black-fg.hint-text,.black-text .disabled-text,.black-text .hint-text,.black-text.disabled-text,.black-text.hint-text{color:rgba(0,0,0,.26)!important}.black-fg .divider,.black-fg .faint-text,.black-fg.divider,.black-fg.faint-text,.black-text .divider,.black-text .faint-text,.black-text.divider,.black-text.faint-text{color:rgba(0,0,0,.12)!important}.white-fg,.white-text{color:#fff!important}.white-fg .icon,.white-fg .secondary-text,.white-fg.icon,.white-fg.secondary-text,.white-text .icon,.white-text .secondary-text,.white-text.icon,.white-text.secondary-text{color:rgba(255,255,255,.7)!important}.white-fg .disabled-text,.white-fg .hint-text,.white-fg.disabled-text,.white-fg.hint-text,.white-text .disabled-text,.white-text .hint-text,.white-text.disabled-text,.white-text.hint-text{color:rgba(255,255,255,.3)!important}.white-fg .divider,.white-fg .faint-text,.white-fg.divider,.white-fg.faint-text,.white-text .divider,.white-text .faint-text,.white-text.divider,.white-text.faint-text{color:rgba(255,255,255,.12)!important}.white-fg md-icon,.white-text md-icon{color:#fff}.white-fg md-progress-linear .md-container,.white-text md-progress-linear .md-container{background:rgba(255,255,255,.3)}.white-fg md-progress-linear .md-bar,.white-text md-progress-linear .md-bar{background:rgba(255,255,255,.7)}.red-50-bg{background-color:#ffebee!important}.md-red-50-bg{background-color:#ffebee!important;color:rgba(0,0,0,.87)}.red-50-fg{color:#ffebee!important}.red-50-border{border-color:#ffebee!important}.red-50-border-top{border-top-color:#ffebee!important}.red-50-border-right{border-right-color:#ffebee!important}.red-50-border-bottom{border-bottom-color:#ffebee!important}.red-50-border-left{border-left-color:#ffebee!important}.red-100-bg{background-color:#ffcdd2!important}.md-red-100-bg{background-color:#ffcdd2!important;color:rgba(0,0,0,.87)}.red-100-fg{color:#ffcdd2!important}.red-100-border{border-color:#ffcdd2!important}.red-100-border-top{border-top-color:#ffcdd2!important}.red-100-border-right{border-right-color:#ffcdd2!important}.red-100-border-bottom{border-bottom-color:#ffcdd2!important}.red-100-border-left{border-left-color:#ffcdd2!important}.red-200-bg{background-color:#ef9a9a!important}.md-red-200-bg{background-color:#ef9a9a!important;color:rgba(0,0,0,.87)}.red-200-fg{color:#ef9a9a!important}.red-200-border{border-color:#ef9a9a!important}.red-200-border-top{border-top-color:#ef9a9a!important}.red-200-border-right{border-right-color:#ef9a9a!important}.red-200-border-bottom{border-bottom-color:#ef9a9a!important}.red-200-border-left{border-left-color:#ef9a9a!important}.red-300-bg{background-color:#e57373!important}.md-red-300-bg{background-color:#e57373!important;color:rgba(0,0,0,.87)}.red-300-fg{color:#e57373!important}.red-300-border{border-color:#e57373!important}.red-300-border-top{border-top-color:#e57373!important}.red-300-border-right{border-right-color:#e57373!important}.red-300-border-bottom{border-bottom-color:#e57373!important}.red-300-border-left{border-left-color:#e57373!important}.red-400-bg{background-color:#ef5350!important}.md-red-400-bg{background-color:#ef5350!important;color:#fff}.red-400-fg{color:#ef5350!important}.red-400-border{border-color:#ef5350!important}.red-400-border-top{border-top-color:#ef5350!important}.red-400-border-right{border-right-color:#ef5350!important}.red-400-border-bottom{border-bottom-color:#ef5350!important}.red-400-border-left{border-left-color:#ef5350!important}.red-500-bg{background-color:#f44336!important}.md-red-500-bg{background-color:#f44336!important;color:#fff}.red-500-fg{color:#f44336!important}.red-500-border{border-color:#f44336!important}.red-500-border-top{border-top-color:#f44336!important}.red-500-border-right{border-right-color:#f44336!important}.red-500-border-bottom{border-bottom-color:#f44336!important}.red-500-border-left{border-left-color:#f44336!important}.md-red-bg{background-color:#f44336!important;color:#fff}.red-bg{background-color:#f44336!important}.red-fg{color:#f44336!important}.red-border{border-color:#f44336!important}.red-border-top{border-top-color:#f44336!important}.red-border-right{border-right-color:#f44336!important}.red-border-bottom{border-bottom-color:#f44336!important}.red-border-left{border-left-color:#f44336!important}.red-600-bg{background-color:#e53935!important}.md-red-600-bg{background-color:#e53935!important;color:#fff}.red-600-fg{color:#e53935!important}.red-600-border{border-color:#e53935!important}.red-600-border-top{border-top-color:#e53935!important}.red-600-border-right{border-right-color:#e53935!important}.red-600-border-bottom{border-bottom-color:#e53935!important}.red-600-border-left{border-left-color:#e53935!important}.red-700-bg{background-color:#d32f2f!important}.md-red-700-bg{background-color:#d32f2f!important;color:#fff}.red-700-fg{color:#d32f2f!important}.red-700-border{border-color:#d32f2f!important}.red-700-border-top{border-top-color:#d32f2f!important}.red-700-border-right{border-right-color:#d32f2f!important}.red-700-border-bottom{border-bottom-color:#d32f2f!important}.red-700-border-left{border-left-color:#d32f2f!important}.red-800-bg{background-color:#c62828!important}.md-red-800-bg{background-color:#c62828!important;color:rgba(255,255,255,.87)}.red-800-fg{color:#c62828!important}.red-800-border{border-color:#c62828!important}.red-800-border-top{border-top-color:#c62828!important}.red-800-border-right{border-right-color:#c62828!important}.red-800-border-bottom{border-bottom-color:#c62828!important}.red-800-border-left{border-left-color:#c62828!important}.red-900-bg{background-color:#b71c1c!important}.md-red-900-bg{background-color:#b71c1c!important;color:rgba(255,255,255,.87)}.red-900-fg{color:#b71c1c!important}.red-900-border{border-color:#b71c1c!important}.red-900-border-top{border-top-color:#b71c1c!important}.red-900-border-right{border-right-color:#b71c1c!important}.red-900-border-bottom{border-bottom-color:#b71c1c!important}.red-900-border-left{border-left-color:#b71c1c!important}.red-A100-bg{background-color:#ff8a80!important}.md-red-A100-bg{background-color:#ff8a80!important;color:rgba(0,0,0,.87)}.red-A100-fg{color:#ff8a80!important}.red-A100-border{border-color:#ff8a80!important}.red-A100-border-top{border-top-color:#ff8a80!important}.red-A100-border-right{border-right-color:#ff8a80!important}.red-A100-border-bottom{border-bottom-color:#ff8a80!important}.red-A100-border-left{border-left-color:#ff8a80!important}.red-A200-bg{background-color:#ff5252!important}.md-red-A200-bg{background-color:#ff5252!important;color:#fff}.red-A200-fg{color:#ff5252!important}.red-A200-border{border-color:#ff5252!important}.red-A200-border-top{border-top-color:#ff5252!important}.red-A200-border-right{border-right-color:#ff5252!important}.red-A200-border-bottom{border-bottom-color:#ff5252!important}.red-A200-border-left{border-left-color:#ff5252!important}.red-A400-bg{background-color:#ff1744!important}.md-red-A400-bg{background-color:#ff1744!important;color:#fff}.red-A400-fg{color:#ff1744!important}.red-A400-border{border-color:#ff1744!important}.red-A400-border-top{border-top-color:#ff1744!important}.red-A400-border-right{border-right-color:#ff1744!important}.red-A400-border-bottom{border-bottom-color:#ff1744!important}.red-A400-border-left{border-left-color:#ff1744!important}.red-A700-bg{background-color:#d50000!important}.md-red-A700-bg{background-color:#d50000!important;color:#fff}.red-A700-fg{color:#d50000!important}.red-A700-border{border-color:#d50000!important}.red-A700-border-top{border-top-color:#d50000!important}.red-A700-border-right{border-right-color:#d50000!important}.red-A700-border-bottom{border-bottom-color:#d50000!important}.red-A700-border-left{border-left-color:#d50000!important}.pink-50-bg{background-color:#fce4ec!important}.md-pink-50-bg{background-color:#fce4ec!important;color:rgba(0,0,0,.87)}.pink-50-fg{color:#fce4ec!important}.pink-50-border{border-color:#fce4ec!important}.pink-50-border-top{border-top-color:#fce4ec!important}.pink-50-border-right{border-right-color:#fce4ec!important}.pink-50-border-bottom{border-bottom-color:#fce4ec!important}.pink-50-border-left{border-left-color:#fce4ec!important}.pink-100-bg{background-color:#f8bbd0!important}.md-pink-100-bg{background-color:#f8bbd0!important;color:rgba(0,0,0,.87)}.pink-100-fg{color:#f8bbd0!important}.pink-100-border{border-color:#f8bbd0!important}.pink-100-border-top{border-top-color:#f8bbd0!important}.pink-100-border-right{border-right-color:#f8bbd0!important}.pink-100-border-bottom{border-bottom-color:#f8bbd0!important}.pink-100-border-left{border-left-color:#f8bbd0!important}.pink-200-bg{background-color:#f48fb1!important}.md-pink-200-bg{background-color:#f48fb1!important;color:rgba(0,0,0,.87)}.pink-200-fg{color:#f48fb1!important}.pink-200-border{border-color:#f48fb1!important}.pink-200-border-top{border-top-color:#f48fb1!important}.pink-200-border-right{border-right-color:#f48fb1!important}.pink-200-border-bottom{border-bottom-color:#f48fb1!important}.pink-200-border-left{border-left-color:#f48fb1!important}.pink-300-bg{background-color:#f06292!important}.md-pink-300-bg{background-color:#f06292!important;color:rgba(255,255,255,.87)}.pink-300-fg{color:#f06292!important}.pink-300-border{border-color:#f06292!important}.pink-300-border-top{border-top-color:#f06292!important}.pink-300-border-right{border-right-color:#f06292!important}.pink-300-border-bottom{border-bottom-color:#f06292!important}.pink-300-border-left{border-left-color:#f06292!important}.pink-400-bg{background-color:#ec407a!important}.md-pink-400-bg{background-color:#ec407a!important;color:rgba(255,255,255,.87)}.pink-400-fg{color:#ec407a!important}.pink-400-border{border-color:#ec407a!important}.pink-400-border-top{border-top-color:#ec407a!important}.pink-400-border-right{border-right-color:#ec407a!important}.pink-400-border-bottom{border-bottom-color:#ec407a!important}.pink-400-border-left{border-left-color:#ec407a!important}.pink-500-bg{background-color:#e91e63!important}.md-pink-500-bg{background-color:#e91e63!important;color:#fff}.pink-500-fg{color:#e91e63!important}.pink-500-border{border-color:#e91e63!important}.pink-500-border-top{border-top-color:#e91e63!important}.pink-500-border-right{border-right-color:#e91e63!important}.pink-500-border-bottom{border-bottom-color:#e91e63!important}.pink-500-border-left{border-left-color:#e91e63!important}.md-pink-bg{background-color:#e91e63!important;color:#fff}.pink-bg{background-color:#e91e63!important}.pink-fg{color:#e91e63!important}.pink-border{border-color:#e91e63!important}.pink-border-top{border-top-color:#e91e63!important}.pink-border-right{border-right-color:#e91e63!important}.pink-border-bottom{border-bottom-color:#e91e63!important}.pink-border-left{border-left-color:#e91e63!important}.pink-600-bg{background-color:#d81b60!important}.md-pink-600-bg{background-color:#d81b60!important;color:#fff}.pink-600-fg{color:#d81b60!important}.pink-600-border{border-color:#d81b60!important}.pink-600-border-top{border-top-color:#d81b60!important}.pink-600-border-right{border-right-color:#d81b60!important}.pink-600-border-bottom{border-bottom-color:#d81b60!important}.pink-600-border-left{border-left-color:#d81b60!important}.pink-700-bg{background-color:#c2185b!important}.md-pink-700-bg{background-color:#c2185b!important;color:rgba(255,255,255,.87)}.pink-700-fg{color:#c2185b!important}.pink-700-border{border-color:#c2185b!important}.pink-700-border-top{border-top-color:#c2185b!important}.pink-700-border-right{border-right-color:#c2185b!important}.pink-700-border-bottom{border-bottom-color:#c2185b!important}.pink-700-border-left{border-left-color:#c2185b!important}.pink-800-bg{background-color:#ad1457!important}.md-pink-800-bg{background-color:#ad1457!important;color:rgba(255,255,255,.87)}.pink-800-fg{color:#ad1457!important}.pink-800-border{border-color:#ad1457!important}.pink-800-border-top{border-top-color:#ad1457!important}.pink-800-border-right{border-right-color:#ad1457!important}.pink-800-border-bottom{border-bottom-color:#ad1457!important}.pink-800-border-left{border-left-color:#ad1457!important}.pink-900-bg{background-color:#880e4f!important}.md-pink-900-bg{background-color:#880e4f!important;color:rgba(255,255,255,.87)}.pink-900-fg{color:#880e4f!important}.pink-900-border{border-color:#880e4f!important}.pink-900-border-top{border-top-color:#880e4f!important}.pink-900-border-right{border-right-color:#880e4f!important}.pink-900-border-bottom{border-bottom-color:#880e4f!important}.pink-900-border-left{border-left-color:#880e4f!important}.pink-A100-bg{background-color:#ff80ab!important}.md-pink-A100-bg{background-color:#ff80ab!important;color:rgba(0,0,0,.87)}.pink-A100-fg{color:#ff80ab!important}.pink-A100-border{border-color:#ff80ab!important}.pink-A100-border-top{border-top-color:#ff80ab!important}.pink-A100-border-right{border-right-color:#ff80ab!important}.pink-A100-border-bottom{border-bottom-color:#ff80ab!important}.pink-A100-border-left{border-left-color:#ff80ab!important}.pink-A200-bg{background-color:#ff4081!important}.md-pink-A200-bg{background-color:#ff4081!important;color:#fff}.pink-A200-fg{color:#ff4081!important}.pink-A200-border{border-color:#ff4081!important}.pink-A200-border-top{border-top-color:#ff4081!important}.pink-A200-border-right{border-right-color:#ff4081!important}.pink-A200-border-bottom{border-bottom-color:#ff4081!important}.pink-A200-border-left{border-left-color:#ff4081!important}.pink-A400-bg{background-color:#f50057!important}.md-pink-A400-bg{background-color:#f50057!important;color:#fff}.pink-A400-fg{color:#f50057!important}.pink-A400-border{border-color:#f50057!important}.pink-A400-border-top{border-top-color:#f50057!important}.pink-A400-border-right{border-right-color:#f50057!important}.pink-A400-border-bottom{border-bottom-color:#f50057!important}.pink-A400-border-left{border-left-color:#f50057!important}.pink-A700-bg{background-color:#c51162!important}.md-pink-A700-bg{background-color:#c51162!important;color:#fff}.pink-A700-fg{color:#c51162!important}.pink-A700-border{border-color:#c51162!important}.pink-A700-border-top{border-top-color:#c51162!important}.pink-A700-border-right{border-right-color:#c51162!important}.pink-A700-border-bottom{border-bottom-color:#c51162!important}.pink-A700-border-left{border-left-color:#c51162!important}.purple-50-bg{background-color:#f3e5f5!important}.md-purple-50-bg{background-color:#f3e5f5!important;color:rgba(0,0,0,.87)}.purple-50-fg{color:#f3e5f5!important}.purple-50-border{border-color:#f3e5f5!important}.purple-50-border-top{border-top-color:#f3e5f5!important}.purple-50-border-right{border-right-color:#f3e5f5!important}.purple-50-border-bottom{border-bottom-color:#f3e5f5!important}.purple-50-border-left{border-left-color:#f3e5f5!important}.purple-100-bg{background-color:#e1bee7!important}.md-purple-100-bg{background-color:#e1bee7!important;color:rgba(0,0,0,.87)}.purple-100-fg{color:#e1bee7!important}.purple-100-border{border-color:#e1bee7!important}.purple-100-border-top{border-top-color:#e1bee7!important}.purple-100-border-right{border-right-color:#e1bee7!important}.purple-100-border-bottom{border-bottom-color:#e1bee7!important}.purple-100-border-left{border-left-color:#e1bee7!important}.purple-200-bg{background-color:#ce93d8!important}.md-purple-200-bg{background-color:#ce93d8!important;color:rgba(0,0,0,.87)}.purple-200-fg{color:#ce93d8!important}.purple-200-border{border-color:#ce93d8!important}.purple-200-border-top{border-top-color:#ce93d8!important}.purple-200-border-right{border-right-color:#ce93d8!important}.purple-200-border-bottom{border-bottom-color:#ce93d8!important}.purple-200-border-left{border-left-color:#ce93d8!important}.purple-300-bg{background-color:#ba68c8!important}.md-purple-300-bg{background-color:#ba68c8!important;color:#fff}.purple-300-fg{color:#ba68c8!important}.purple-300-border{border-color:#ba68c8!important}.purple-300-border-top{border-top-color:#ba68c8!important}.purple-300-border-right{border-right-color:#ba68c8!important}.purple-300-border-bottom{border-bottom-color:#ba68c8!important}.purple-300-border-left{border-left-color:#ba68c8!important}.purple-400-bg{background-color:#ab47bc!important}.md-purple-400-bg{background-color:#ab47bc!important;color:#fff}.purple-400-fg{color:#ab47bc!important}.purple-400-border{border-color:#ab47bc!important}.purple-400-border-top{border-top-color:#ab47bc!important}.purple-400-border-right{border-right-color:#ab47bc!important}.purple-400-border-bottom{border-bottom-color:#ab47bc!important}.purple-400-border-left{border-left-color:#ab47bc!important}.purple-500-bg{background-color:#9c27b0!important}.md-purple-500-bg{background-color:#9c27b0!important;color:rgba(255,255,255,.87)}.purple-500-fg{color:#9c27b0!important}.purple-500-border{border-color:#9c27b0!important}.purple-500-border-top{border-top-color:#9c27b0!important}.purple-500-border-right{border-right-color:#9c27b0!important}.purple-500-border-bottom{border-bottom-color:#9c27b0!important}.purple-500-border-left{border-left-color:#9c27b0!important}.md-purple-bg{background-color:#9c27b0!important;color:rgba(255,255,255,.87)}.purple-bg{background-color:#9c27b0!important}.purple-fg{color:#9c27b0!important}.purple-border{border-color:#9c27b0!important}.purple-border-top{border-top-color:#9c27b0!important}.purple-border-right{border-right-color:#9c27b0!important}.purple-border-bottom{border-bottom-color:#9c27b0!important}.purple-border-left{border-left-color:#9c27b0!important}.purple-600-bg{background-color:#8e24aa!important}.md-purple-600-bg{background-color:#8e24aa!important;color:rgba(255,255,255,.87)}.purple-600-fg{color:#8e24aa!important}.purple-600-border{border-color:#8e24aa!important}.purple-600-border-top{border-top-color:#8e24aa!important}.purple-600-border-right{border-right-color:#8e24aa!important}.purple-600-border-bottom{border-bottom-color:#8e24aa!important}.purple-600-border-left{border-left-color:#8e24aa!important}.purple-700-bg{background-color:#7b1fa2!important}.md-purple-700-bg{background-color:#7b1fa2!important;color:rgba(255,255,255,.87)}.purple-700-fg{color:#7b1fa2!important}.purple-700-border{border-color:#7b1fa2!important}.purple-700-border-top{border-top-color:#7b1fa2!important}.purple-700-border-right{border-right-color:#7b1fa2!important}.purple-700-border-bottom{border-bottom-color:#7b1fa2!important}.purple-700-border-left{border-left-color:#7b1fa2!important}.purple-800-bg{background-color:#6a1b9a!important}.md-purple-800-bg{background-color:#6a1b9a!important;color:rgba(255,255,255,.87)}.purple-800-fg{color:#6a1b9a!important}.purple-800-border{border-color:#6a1b9a!important}.purple-800-border-top{border-top-color:#6a1b9a!important}.purple-800-border-right{border-right-color:#6a1b9a!important}.purple-800-border-bottom{border-bottom-color:#6a1b9a!important}.purple-800-border-left{border-left-color:#6a1b9a!important}.purple-900-bg{background-color:#4a148c!important}.md-purple-900-bg{background-color:#4a148c!important;color:rgba(255,255,255,.87)}.purple-900-fg{color:#4a148c!important}.purple-900-border{border-color:#4a148c!important}.purple-900-border-top{border-top-color:#4a148c!important}.purple-900-border-right{border-right-color:#4a148c!important}.purple-900-border-bottom{border-bottom-color:#4a148c!important}.purple-900-border-left{border-left-color:#4a148c!important}.purple-A100-bg{background-color:#ea80fc!important}.md-purple-A100-bg{background-color:#ea80fc!important;color:rgba(0,0,0,.87)}.purple-A100-fg{color:#ea80fc!important}.purple-A100-border{border-color:#ea80fc!important}.purple-A100-border-top{border-top-color:#ea80fc!important}.purple-A100-border-right{border-right-color:#ea80fc!important}.purple-A100-border-bottom{border-bottom-color:#ea80fc!important}.purple-A100-border-left{border-left-color:#ea80fc!important}.purple-A200-bg{background-color:#e040fb!important}.md-purple-A200-bg{background-color:#e040fb!important;color:#fff}.purple-A200-fg{color:#e040fb!important}.purple-A200-border{border-color:#e040fb!important}.purple-A200-border-top{border-top-color:#e040fb!important}.purple-A200-border-right{border-right-color:#e040fb!important}.purple-A200-border-bottom{border-bottom-color:#e040fb!important}.purple-A200-border-left{border-left-color:#e040fb!important}.purple-A400-bg{background-color:#d500f9!important}.md-purple-A400-bg{background-color:#d500f9!important;color:#fff}.purple-A400-fg{color:#d500f9!important}.purple-A400-border{border-color:#d500f9!important}.purple-A400-border-top{border-top-color:#d500f9!important}.purple-A400-border-right{border-right-color:#d500f9!important}.purple-A400-border-bottom{border-bottom-color:#d500f9!important}.purple-A400-border-left{border-left-color:#d500f9!important}.purple-A700-bg{background-color:#a0f!important}.md-purple-A700-bg{background-color:#a0f!important;color:#fff}.purple-A700-fg{color:#a0f!important}.purple-A700-border{border-color:#a0f!important}.purple-A700-border-top{border-top-color:#a0f!important}.purple-A700-border-right{border-right-color:#a0f!important}.purple-A700-border-bottom{border-bottom-color:#a0f!important}.purple-A700-border-left{border-left-color:#a0f!important}.deep-purple-50-bg{background-color:#ede7f6!important}.md-deep-purple-50-bg{background-color:#ede7f6!important;color:rgba(0,0,0,.87)}.deep-purple-50-fg{color:#ede7f6!important}.deep-purple-50-border{border-color:#ede7f6!important}.deep-purple-50-border-top{border-top-color:#ede7f6!important}.deep-purple-50-border-right{border-right-color:#ede7f6!important}.deep-purple-50-border-bottom{border-bottom-color:#ede7f6!important}.deep-purple-50-border-left{border-left-color:#ede7f6!important}.deep-purple-100-bg{background-color:#d1c4e9!important}.md-deep-purple-100-bg{background-color:#d1c4e9!important;color:rgba(0,0,0,.87)}.deep-purple-100-fg{color:#d1c4e9!important}.deep-purple-100-border{border-color:#d1c4e9!important}.deep-purple-100-border-top{border-top-color:#d1c4e9!important}.deep-purple-100-border-right{border-right-color:#d1c4e9!important}.deep-purple-100-border-bottom{border-bottom-color:#d1c4e9!important}.deep-purple-100-border-left{border-left-color:#d1c4e9!important}.deep-purple-200-bg{background-color:#b39ddb!important}.md-deep-purple-200-bg{background-color:#b39ddb!important;color:rgba(0,0,0,.87)}.deep-purple-200-fg{color:#b39ddb!important}.deep-purple-200-border{border-color:#b39ddb!important}.deep-purple-200-border-top{border-top-color:#b39ddb!important}.deep-purple-200-border-right{border-right-color:#b39ddb!important}.deep-purple-200-border-bottom{border-bottom-color:#b39ddb!important}.deep-purple-200-border-left{border-left-color:#b39ddb!important}.deep-purple-300-bg{background-color:#9575cd!important}.md-deep-purple-300-bg{background-color:#9575cd!important;color:#fff}.deep-purple-300-fg{color:#9575cd!important}.deep-purple-300-border{border-color:#9575cd!important}.deep-purple-300-border-top{border-top-color:#9575cd!important}.deep-purple-300-border-right{border-right-color:#9575cd!important}.deep-purple-300-border-bottom{border-bottom-color:#9575cd!important}.deep-purple-300-border-left{border-left-color:#9575cd!important}.deep-purple-400-bg{background-color:#7e57c2!important}.md-deep-purple-400-bg{background-color:#7e57c2!important;color:#fff}.deep-purple-400-fg{color:#7e57c2!important}.deep-purple-400-border{border-color:#7e57c2!important}.deep-purple-400-border-top{border-top-color:#7e57c2!important}.deep-purple-400-border-right{border-right-color:#7e57c2!important}.deep-purple-400-border-bottom{border-bottom-color:#7e57c2!important}.deep-purple-400-border-left{border-left-color:#7e57c2!important}.deep-purple-500-bg{background-color:#673ab7!important}.md-deep-purple-500-bg{background-color:#673ab7!important;color:rgba(255,255,255,.87)}.deep-purple-500-fg{color:#673ab7!important}.deep-purple-500-border{border-color:#673ab7!important}.deep-purple-500-border-top{border-top-color:#673ab7!important}.deep-purple-500-border-right{border-right-color:#673ab7!important}.deep-purple-500-border-bottom{border-bottom-color:#673ab7!important}.deep-purple-500-border-left{border-left-color:#673ab7!important}.md-deep-purple-bg{background-color:#673ab7!important;color:rgba(255,255,255,.87)}.deep-purple-bg{background-color:#673ab7!important}.deep-purple-fg{color:#673ab7!important}.deep-purple-border{border-color:#673ab7!important}.deep-purple-border-top{border-top-color:#673ab7!important}.deep-purple-border-right{border-right-color:#673ab7!important}.deep-purple-border-bottom{border-bottom-color:#673ab7!important}.deep-purple-border-left{border-left-color:#673ab7!important}.deep-purple-600-bg{background-color:#5e35b1!important}.md-deep-purple-600-bg{background-color:#5e35b1!important;color:rgba(255,255,255,.87)}.deep-purple-600-fg{color:#5e35b1!important}.deep-purple-600-border{border-color:#5e35b1!important}.deep-purple-600-border-top{border-top-color:#5e35b1!important}.deep-purple-600-border-right{border-right-color:#5e35b1!important}.deep-purple-600-border-bottom{border-bottom-color:#5e35b1!important}.deep-purple-600-border-left{border-left-color:#5e35b1!important}.deep-purple-700-bg{background-color:#512da8!important}.md-deep-purple-700-bg{background-color:#512da8!important;color:rgba(255,255,255,.87)}.deep-purple-700-fg{color:#512da8!important}.deep-purple-700-border{border-color:#512da8!important}.deep-purple-700-border-top{border-top-color:#512da8!important}.deep-purple-700-border-right{border-right-color:#512da8!important}.deep-purple-700-border-bottom{border-bottom-color:#512da8!important}.deep-purple-700-border-left{border-left-color:#512da8!important}.deep-purple-800-bg{background-color:#4527a0!important}.md-deep-purple-800-bg{background-color:#4527a0!important;color:rgba(255,255,255,.87)}.deep-purple-800-fg{color:#4527a0!important}.deep-purple-800-border{border-color:#4527a0!important}.deep-purple-800-border-top{border-top-color:#4527a0!important}.deep-purple-800-border-right{border-right-color:#4527a0!important}.deep-purple-800-border-bottom{border-bottom-color:#4527a0!important}.deep-purple-800-border-left{border-left-color:#4527a0!important}.deep-purple-900-bg{background-color:#311b92!important}.md-deep-purple-900-bg{background-color:#311b92!important;color:rgba(255,255,255,.87)}.deep-purple-900-fg{color:#311b92!important}.deep-purple-900-border{border-color:#311b92!important}.deep-purple-900-border-top{border-top-color:#311b92!important}.deep-purple-900-border-right{border-right-color:#311b92!important}.deep-purple-900-border-bottom{border-bottom-color:#311b92!important}.deep-purple-900-border-left{border-left-color:#311b92!important}.deep-purple-A100-bg{background-color:#b388ff!important}.md-deep-purple-A100-bg{background-color:#b388ff!important;color:rgba(0,0,0,.87)}.deep-purple-A100-fg{color:#b388ff!important}.deep-purple-A100-border{border-color:#b388ff!important}.deep-purple-A100-border-top{border-top-color:#b388ff!important}.deep-purple-A100-border-right{border-right-color:#b388ff!important}.deep-purple-A100-border-bottom{border-bottom-color:#b388ff!important}.deep-purple-A100-border-left{border-left-color:#b388ff!important}.deep-purple-A200-bg{background-color:#7c4dff!important}.md-deep-purple-A200-bg{background-color:#7c4dff!important;color:#fff}.deep-purple-A200-fg{color:#7c4dff!important}.deep-purple-A200-border{border-color:#7c4dff!important}.deep-purple-A200-border-top{border-top-color:#7c4dff!important}.deep-purple-A200-border-right{border-right-color:#7c4dff!important}.deep-purple-A200-border-bottom{border-bottom-color:#7c4dff!important}.deep-purple-A200-border-left{border-left-color:#7c4dff!important}.deep-purple-A400-bg{background-color:#651fff!important}.md-deep-purple-A400-bg{background-color:#651fff!important;color:rgba(255,255,255,.87)}.deep-purple-A400-fg{color:#651fff!important}.deep-purple-A400-border{border-color:#651fff!important}.deep-purple-A400-border-top{border-top-color:#651fff!important}.deep-purple-A400-border-right{border-right-color:#651fff!important}.deep-purple-A400-border-bottom{border-bottom-color:#651fff!important}.deep-purple-A400-border-left{border-left-color:#651fff!important}.deep-purple-A700-bg{background-color:#6200ea!important}.md-deep-purple-A700-bg{background-color:#6200ea!important;color:rgba(255,255,255,.87)}.deep-purple-A700-fg{color:#6200ea!important}.deep-purple-A700-border{border-color:#6200ea!important}.deep-purple-A700-border-top{border-top-color:#6200ea!important}.deep-purple-A700-border-right{border-right-color:#6200ea!important}.deep-purple-A700-border-bottom{border-bottom-color:#6200ea!important}.deep-purple-A700-border-left{border-left-color:#6200ea!important}.indigo-50-bg{background-color:#e8eaf6!important}.md-indigo-50-bg{background-color:#e8eaf6!important;color:rgba(0,0,0,.87)}.indigo-50-fg{color:#e8eaf6!important}.indigo-50-border{border-color:#e8eaf6!important}.indigo-50-border-top{border-top-color:#e8eaf6!important}.indigo-50-border-right{border-right-color:#e8eaf6!important}.indigo-50-border-bottom{border-bottom-color:#e8eaf6!important}.indigo-50-border-left{border-left-color:#e8eaf6!important}.indigo-100-bg{background-color:#c5cae9!important}.md-indigo-100-bg{background-color:#c5cae9!important;color:rgba(0,0,0,.87)}.indigo-100-fg{color:#c5cae9!important}.indigo-100-border{border-color:#c5cae9!important}.indigo-100-border-top{border-top-color:#c5cae9!important}.indigo-100-border-right{border-right-color:#c5cae9!important}.indigo-100-border-bottom{border-bottom-color:#c5cae9!important}.indigo-100-border-left{border-left-color:#c5cae9!important}.indigo-200-bg{background-color:#9fa8da!important}.md-indigo-200-bg{background-color:#9fa8da!important;color:rgba(0,0,0,.87)}.indigo-200-fg{color:#9fa8da!important}.indigo-200-border{border-color:#9fa8da!important}.indigo-200-border-top{border-top-color:#9fa8da!important}.indigo-200-border-right{border-right-color:#9fa8da!important}.indigo-200-border-bottom{border-bottom-color:#9fa8da!important}.indigo-200-border-left{border-left-color:#9fa8da!important}.indigo-300-bg{background-color:#7986cb!important}.md-indigo-300-bg{background-color:#7986cb!important;color:#fff}.indigo-300-fg{color:#7986cb!important}.indigo-300-border{border-color:#7986cb!important}.indigo-300-border-top{border-top-color:#7986cb!important}.indigo-300-border-right{border-right-color:#7986cb!important}.indigo-300-border-bottom{border-bottom-color:#7986cb!important}.indigo-300-border-left{border-left-color:#7986cb!important}.indigo-400-bg{background-color:#5c6bc0!important}.md-indigo-400-bg{background-color:#5c6bc0!important;color:#fff}.indigo-400-fg{color:#5c6bc0!important}.indigo-400-border{border-color:#5c6bc0!important}.indigo-400-border-top{border-top-color:#5c6bc0!important}.indigo-400-border-right{border-right-color:#5c6bc0!important}.indigo-400-border-bottom{border-bottom-color:#5c6bc0!important}.indigo-400-border-left{border-left-color:#5c6bc0!important}.indigo-500-bg{background-color:#3f51b5!important}.md-indigo-500-bg{background-color:#3f51b5!important;color:rgba(255,255,255,.87)}.indigo-500-fg{color:#3f51b5!important}.indigo-500-border{border-color:#3f51b5!important}.indigo-500-border-top{border-top-color:#3f51b5!important}.indigo-500-border-right{border-right-color:#3f51b5!important}.indigo-500-border-bottom{border-bottom-color:#3f51b5!important}.indigo-500-border-left{border-left-color:#3f51b5!important}.md-indigo-bg{background-color:#3f51b5!important;color:rgba(255,255,255,.87)}.indigo-bg{background-color:#3f51b5!important}.indigo-fg{color:#3f51b5!important}.indigo-border{border-color:#3f51b5!important}.indigo-border-top{border-top-color:#3f51b5!important}.indigo-border-right{border-right-color:#3f51b5!important}.indigo-border-bottom{border-bottom-color:#3f51b5!important}.indigo-border-left{border-left-color:#3f51b5!important}.indigo-600-bg{background-color:#3949ab!important}.md-indigo-600-bg{background-color:#3949ab!important;color:rgba(255,255,255,.87)}.indigo-600-fg{color:#3949ab!important}.indigo-600-border{border-color:#3949ab!important}.indigo-600-border-top{border-top-color:#3949ab!important}.indigo-600-border-right{border-right-color:#3949ab!important}.indigo-600-border-bottom{border-bottom-color:#3949ab!important}.indigo-600-border-left{border-left-color:#3949ab!important}.indigo-700-bg{background-color:#303f9f!important}.md-indigo-700-bg{background-color:#303f9f!important;color:rgba(255,255,255,.87)}.indigo-700-fg{color:#303f9f!important}.indigo-700-border{border-color:#303f9f!important}.indigo-700-border-top{border-top-color:#303f9f!important}.indigo-700-border-right{border-right-color:#303f9f!important}.indigo-700-border-bottom{border-bottom-color:#303f9f!important}.indigo-700-border-left{border-left-color:#303f9f!important}.indigo-800-bg{background-color:#283593!important}.md-indigo-800-bg{background-color:#283593!important;color:rgba(255,255,255,.87)}.indigo-800-fg{color:#283593!important}.indigo-800-border{border-color:#283593!important}.indigo-800-border-top{border-top-color:#283593!important}.indigo-800-border-right{border-right-color:#283593!important}.indigo-800-border-bottom{border-bottom-color:#283593!important}.indigo-800-border-left{border-left-color:#283593!important}.indigo-900-bg{background-color:#1a237e!important}.md-indigo-900-bg{background-color:#1a237e!important;color:rgba(255,255,255,.87)}.indigo-900-fg{color:#1a237e!important}.indigo-900-border{border-color:#1a237e!important}.indigo-900-border-top{border-top-color:#1a237e!important}.indigo-900-border-right{border-right-color:#1a237e!important}.indigo-900-border-bottom{border-bottom-color:#1a237e!important}.indigo-900-border-left{border-left-color:#1a237e!important}.indigo-A100-bg{background-color:#8c9eff!important}.md-indigo-A100-bg{background-color:#8c9eff!important;color:rgba(0,0,0,.87)}.indigo-A100-fg{color:#8c9eff!important}.indigo-A100-border{border-color:#8c9eff!important}.indigo-A100-border-top{border-top-color:#8c9eff!important}.indigo-A100-border-right{border-right-color:#8c9eff!important}.indigo-A100-border-bottom{border-bottom-color:#8c9eff!important}.indigo-A100-border-left{border-left-color:#8c9eff!important}.indigo-A200-bg{background-color:#536dfe!important}.md-indigo-A200-bg{background-color:#536dfe!important;color:#fff}.indigo-A200-fg{color:#536dfe!important}.indigo-A200-border{border-color:#536dfe!important}.indigo-A200-border-top{border-top-color:#536dfe!important}.indigo-A200-border-right{border-right-color:#536dfe!important}.indigo-A200-border-bottom{border-bottom-color:#536dfe!important}.indigo-A200-border-left{border-left-color:#536dfe!important}.indigo-A400-bg{background-color:#3d5afe!important}.md-indigo-A400-bg{background-color:#3d5afe!important;color:#fff}.indigo-A400-fg{color:#3d5afe!important}.indigo-A400-border{border-color:#3d5afe!important}.indigo-A400-border-top{border-top-color:#3d5afe!important}.indigo-A400-border-right{border-right-color:#3d5afe!important}.indigo-A400-border-bottom{border-bottom-color:#3d5afe!important}.indigo-A400-border-left{border-left-color:#3d5afe!important}.indigo-A700-bg{background-color:#304ffe!important}.md-indigo-A700-bg{background-color:#304ffe!important;color:rgba(255,255,255,.87)}.indigo-A700-fg{color:#304ffe!important}.indigo-A700-border{border-color:#304ffe!important}.indigo-A700-border-top{border-top-color:#304ffe!important}.indigo-A700-border-right{border-right-color:#304ffe!important}.indigo-A700-border-bottom{border-bottom-color:#304ffe!important}.indigo-A700-border-left{border-left-color:#304ffe!important}.blue-50-bg{background-color:#e3f2fd!important}.md-blue-50-bg{background-color:#e3f2fd!important;color:rgba(0,0,0,.87)}.blue-50-fg{color:#e3f2fd!important}.blue-50-border{border-color:#e3f2fd!important}.blue-50-border-top{border-top-color:#e3f2fd!important}.blue-50-border-right{border-right-color:#e3f2fd!important}.blue-50-border-bottom{border-bottom-color:#e3f2fd!important}.blue-50-border-left{border-left-color:#e3f2fd!important}.blue-100-bg{background-color:#bbdefb!important}.md-blue-100-bg{background-color:#bbdefb!important;color:rgba(0,0,0,.87)}.blue-100-fg{color:#bbdefb!important}.blue-100-border{border-color:#bbdefb!important}.blue-100-border-top{border-top-color:#bbdefb!important}.blue-100-border-right{border-right-color:#bbdefb!important}.blue-100-border-bottom{border-bottom-color:#bbdefb!important}.blue-100-border-left{border-left-color:#bbdefb!important}.blue-200-bg{background-color:#90caf9!important}.md-blue-200-bg{background-color:#90caf9!important;color:rgba(0,0,0,.87)}.blue-200-fg{color:#90caf9!important}.blue-200-border{border-color:#90caf9!important}.blue-200-border-top{border-top-color:#90caf9!important}.blue-200-border-right{border-right-color:#90caf9!important}.blue-200-border-bottom{border-bottom-color:#90caf9!important}.blue-200-border-left{border-left-color:#90caf9!important}.blue-300-bg{background-color:#64b5f6!important}.md-blue-300-bg{background-color:#64b5f6!important;color:rgba(0,0,0,.87)}.blue-300-fg{color:#64b5f6!important}.blue-300-border{border-color:#64b5f6!important}.blue-300-border-top{border-top-color:#64b5f6!important}.blue-300-border-right{border-right-color:#64b5f6!important}.blue-300-border-bottom{border-bottom-color:#64b5f6!important}.blue-300-border-left{border-left-color:#64b5f6!important}.blue-400-bg{background-color:#42a5f5!important}.md-blue-400-bg{background-color:#42a5f5!important;color:rgba(0,0,0,.87)}.blue-400-fg{color:#42a5f5!important}.blue-400-border{border-color:#42a5f5!important}.blue-400-border-top{border-top-color:#42a5f5!important}.blue-400-border-right{border-right-color:#42a5f5!important}.blue-400-border-bottom{border-bottom-color:#42a5f5!important}.blue-400-border-left{border-left-color:#42a5f5!important}.blue-500-bg{background-color:#2196f3!important}.md-blue-500-bg{background-color:#2196f3!important;color:#fff}.blue-500-fg{color:#2196f3!important}.blue-500-border{border-color:#2196f3!important}.blue-500-border-top{border-top-color:#2196f3!important}.blue-500-border-right{border-right-color:#2196f3!important}.blue-500-border-bottom{border-bottom-color:#2196f3!important}.blue-500-border-left{border-left-color:#2196f3!important}.md-blue-bg{background-color:#2196f3!important;color:#fff}.blue-bg{background-color:#2196f3!important}.blue-fg{color:#2196f3!important}.blue-border{border-color:#2196f3!important}.blue-border-top{border-top-color:#2196f3!important}.blue-border-right{border-right-color:#2196f3!important}.blue-border-bottom{border-bottom-color:#2196f3!important}.blue-border-left{border-left-color:#2196f3!important}.blue-600-bg{background-color:#1e88e5!important}.md-blue-600-bg{background-color:#1e88e5!important;color:#fff}.blue-600-fg{color:#1e88e5!important}.blue-600-border{border-color:#1e88e5!important}.blue-600-border-top{border-top-color:#1e88e5!important}.blue-600-border-right{border-right-color:#1e88e5!important}.blue-600-border-bottom{border-bottom-color:#1e88e5!important}.blue-600-border-left{border-left-color:#1e88e5!important}.blue-700-bg{background-color:#1976d2!important}.md-blue-700-bg{background-color:#1976d2!important;color:#fff}.blue-700-fg{color:#1976d2!important}.blue-700-border{border-color:#1976d2!important}.blue-700-border-top{border-top-color:#1976d2!important}.blue-700-border-right{border-right-color:#1976d2!important}.blue-700-border-bottom{border-bottom-color:#1976d2!important}.blue-700-border-left{border-left-color:#1976d2!important}.blue-800-bg{background-color:#1565c0!important}.md-blue-800-bg{background-color:#1565c0!important;color:rgba(255,255,255,.87)}.blue-800-fg{color:#1565c0!important}.blue-800-border{border-color:#1565c0!important}.blue-800-border-top{border-top-color:#1565c0!important}.blue-800-border-right{border-right-color:#1565c0!important}.blue-800-border-bottom{border-bottom-color:#1565c0!important}.blue-800-border-left{border-left-color:#1565c0!important}.blue-900-bg{background-color:#0d47a1!important}.md-blue-900-bg{background-color:#0d47a1!important;color:rgba(255,255,255,.87)}.blue-900-fg{color:#0d47a1!important}.blue-900-border{border-color:#0d47a1!important}.blue-900-border-top{border-top-color:#0d47a1!important}.blue-900-border-right{border-right-color:#0d47a1!important}.blue-900-border-bottom{border-bottom-color:#0d47a1!important}.blue-900-border-left{border-left-color:#0d47a1!important}.blue-A100-bg{background-color:#82b1ff!important}.md-blue-A100-bg{background-color:#82b1ff!important;color:rgba(0,0,0,.87)}.blue-A100-fg{color:#82b1ff!important}.blue-A100-border{border-color:#82b1ff!important}.blue-A100-border-top{border-top-color:#82b1ff!important}.blue-A100-border-right{border-right-color:#82b1ff!important}.blue-A100-border-bottom{border-bottom-color:#82b1ff!important}.blue-A100-border-left{border-left-color:#82b1ff!important}.blue-A200-bg{background-color:#448aff!important}.md-blue-A200-bg{background-color:#448aff!important;color:#fff}.blue-A200-fg{color:#448aff!important}.blue-A200-border{border-color:#448aff!important}.blue-A200-border-top{border-top-color:#448aff!important}.blue-A200-border-right{border-right-color:#448aff!important}.blue-A200-border-bottom{border-bottom-color:#448aff!important}.blue-A200-border-left{border-left-color:#448aff!important}.blue-A400-bg{background-color:#2979ff!important}.md-blue-A400-bg{background-color:#2979ff!important;color:#fff}.blue-A400-fg{color:#2979ff!important}.blue-A400-border{border-color:#2979ff!important}.blue-A400-border-top{border-top-color:#2979ff!important}.blue-A400-border-right{border-right-color:#2979ff!important}.blue-A400-border-bottom{border-bottom-color:#2979ff!important}.blue-A400-border-left{border-left-color:#2979ff!important}.blue-A700-bg{background-color:#2962ff!important}.md-blue-A700-bg{background-color:#2962ff!important;color:#fff}.blue-A700-fg{color:#2962ff!important}.blue-A700-border{border-color:#2962ff!important}.blue-A700-border-top{border-top-color:#2962ff!important}.blue-A700-border-right{border-right-color:#2962ff!important}.blue-A700-border-bottom{border-bottom-color:#2962ff!important}.blue-A700-border-left{border-left-color:#2962ff!important}.light-blue-50-bg{background-color:#e1f5fe!important}.md-light-blue-50-bg{background-color:#e1f5fe!important;color:rgba(0,0,0,.87)}.light-blue-50-fg{color:#e1f5fe!important}.light-blue-50-border{border-color:#e1f5fe!important}.light-blue-50-border-top{border-top-color:#e1f5fe!important}.light-blue-50-border-right{border-right-color:#e1f5fe!important}.light-blue-50-border-bottom{border-bottom-color:#e1f5fe!important}.light-blue-50-border-left{border-left-color:#e1f5fe!important}.light-blue-100-bg{background-color:#b3e5fc!important}.md-light-blue-100-bg{background-color:#b3e5fc!important;color:rgba(0,0,0,.87)}.light-blue-100-fg{color:#b3e5fc!important}.light-blue-100-border{border-color:#b3e5fc!important}.light-blue-100-border-top{border-top-color:#b3e5fc!important}.light-blue-100-border-right{border-right-color:#b3e5fc!important}.light-blue-100-border-bottom{border-bottom-color:#b3e5fc!important}.light-blue-100-border-left{border-left-color:#b3e5fc!important}.light-blue-200-bg{background-color:#81d4fa!important}.md-light-blue-200-bg{background-color:#81d4fa!important;color:rgba(0,0,0,.87)}.light-blue-200-fg{color:#81d4fa!important}.light-blue-200-border{border-color:#81d4fa!important}.light-blue-200-border-top{border-top-color:#81d4fa!important}.light-blue-200-border-right{border-right-color:#81d4fa!important}.light-blue-200-border-bottom{border-bottom-color:#81d4fa!important}.light-blue-200-border-left{border-left-color:#81d4fa!important}.light-blue-300-bg{background-color:#4fc3f7!important}.md-light-blue-300-bg{background-color:#4fc3f7!important;color:rgba(0,0,0,.87)}.light-blue-300-fg{color:#4fc3f7!important}.light-blue-300-border{border-color:#4fc3f7!important}.light-blue-300-border-top{border-top-color:#4fc3f7!important}.light-blue-300-border-right{border-right-color:#4fc3f7!important}.light-blue-300-border-bottom{border-bottom-color:#4fc3f7!important}.light-blue-300-border-left{border-left-color:#4fc3f7!important}.light-blue-400-bg{background-color:#29b6f6!important}.md-light-blue-400-bg{background-color:#29b6f6!important;color:rgba(0,0,0,.87)}.light-blue-400-fg{color:#29b6f6!important}.light-blue-400-border{border-color:#29b6f6!important}.light-blue-400-border-top{border-top-color:#29b6f6!important}.light-blue-400-border-right{border-right-color:#29b6f6!important}.light-blue-400-border-bottom{border-bottom-color:#29b6f6!important}.light-blue-400-border-left{border-left-color:#29b6f6!important}.light-blue-500-bg{background-color:#03a9f4!important}.md-light-blue-500-bg{background-color:#03a9f4!important;color:rgba(0,0,0,.87)}.light-blue-500-fg{color:#03a9f4!important}.light-blue-500-border{border-color:#03a9f4!important}.light-blue-500-border-top{border-top-color:#03a9f4!important}.light-blue-500-border-right{border-right-color:#03a9f4!important}.light-blue-500-border-bottom{border-bottom-color:#03a9f4!important}.light-blue-500-border-left{border-left-color:#03a9f4!important}.md-light-blue-bg{background-color:#03a9f4!important;color:rgba(0,0,0,.87)}.light-blue-bg{background-color:#03a9f4!important}.light-blue-fg{color:#03a9f4!important}.light-blue-border{border-color:#03a9f4!important}.light-blue-border-top{border-top-color:#03a9f4!important}.light-blue-border-right{border-right-color:#03a9f4!important}.light-blue-border-bottom{border-bottom-color:#03a9f4!important}.light-blue-border-left{border-left-color:#03a9f4!important}.light-blue-600-bg{background-color:#039be5!important}.md-light-blue-600-bg{background-color:#039be5!important;color:#fff}.light-blue-600-fg{color:#039be5!important}.light-blue-600-border{border-color:#039be5!important}.light-blue-600-border-top{border-top-color:#039be5!important}.light-blue-600-border-right{border-right-color:#039be5!important}.light-blue-600-border-bottom{border-bottom-color:#039be5!important}.light-blue-600-border-left{border-left-color:#039be5!important}.light-blue-700-bg{background-color:#0288d1!important}.md-light-blue-700-bg{background-color:#0288d1!important;color:#fff}.light-blue-700-fg{color:#0288d1!important}.light-blue-700-border{border-color:#0288d1!important}.light-blue-700-border-top{border-top-color:#0288d1!important}.light-blue-700-border-right{border-right-color:#0288d1!important}.light-blue-700-border-bottom{border-bottom-color:#0288d1!important}.light-blue-700-border-left{border-left-color:#0288d1!important}.light-blue-800-bg{background-color:#0277bd!important}.md-light-blue-800-bg{background-color:#0277bd!important;color:#fff}.light-blue-800-fg{color:#0277bd!important}.light-blue-800-border{border-color:#0277bd!important}.light-blue-800-border-top{border-top-color:#0277bd!important}.light-blue-800-border-right{border-right-color:#0277bd!important}.light-blue-800-border-bottom{border-bottom-color:#0277bd!important}.light-blue-800-border-left{border-left-color:#0277bd!important}.light-blue-900-bg{background-color:#01579b!important}.md-light-blue-900-bg{background-color:#01579b!important;color:#fff}.light-blue-900-fg{color:#01579b!important}.light-blue-900-border{border-color:#01579b!important}.light-blue-900-border-top{border-top-color:#01579b!important}.light-blue-900-border-right{border-right-color:#01579b!important}.light-blue-900-border-bottom{border-bottom-color:#01579b!important}.light-blue-900-border-left{border-left-color:#01579b!important}.light-blue-A100-bg{background-color:#80d8ff!important}.md-light-blue-A100-bg{background-color:#80d8ff!important;color:rgba(0,0,0,.87)}.light-blue-A100-fg{color:#80d8ff!important}.light-blue-A100-border{border-color:#80d8ff!important}.light-blue-A100-border-top{border-top-color:#80d8ff!important}.light-blue-A100-border-right{border-right-color:#80d8ff!important}.light-blue-A100-border-bottom{border-bottom-color:#80d8ff!important}.light-blue-A100-border-left{border-left-color:#80d8ff!important}.light-blue-A200-bg{background-color:#40c4ff!important}.md-light-blue-A200-bg{background-color:#40c4ff!important;color:rgba(0,0,0,.87)}.light-blue-A200-fg{color:#40c4ff!important}.light-blue-A200-border{border-color:#40c4ff!important}.light-blue-A200-border-top{border-top-color:#40c4ff!important}.light-blue-A200-border-right{border-right-color:#40c4ff!important}.light-blue-A200-border-bottom{border-bottom-color:#40c4ff!important}.light-blue-A200-border-left{border-left-color:#40c4ff!important}.light-blue-A400-bg{background-color:#00b0ff!important}.md-light-blue-A400-bg{background-color:#00b0ff!important;color:rgba(0,0,0,.87)}.light-blue-A400-fg{color:#00b0ff!important}.light-blue-A400-border{border-color:#00b0ff!important}.light-blue-A400-border-top{border-top-color:#00b0ff!important}.light-blue-A400-border-right{border-right-color:#00b0ff!important}.light-blue-A400-border-bottom{border-bottom-color:#00b0ff!important}.light-blue-A400-border-left{border-left-color:#00b0ff!important}.light-blue-A700-bg{background-color:#0091ea!important}.md-light-blue-A700-bg{background-color:#0091ea!important;color:#fff}.light-blue-A700-fg{color:#0091ea!important}.light-blue-A700-border{border-color:#0091ea!important}.light-blue-A700-border-top{border-top-color:#0091ea!important}.light-blue-A700-border-right{border-right-color:#0091ea!important}.light-blue-A700-border-bottom{border-bottom-color:#0091ea!important}.light-blue-A700-border-left{border-left-color:#0091ea!important}.cyan-50-bg{background-color:#e0f7fa!important}.md-cyan-50-bg{background-color:#e0f7fa!important;color:rgba(0,0,0,.87)}.cyan-50-fg{color:#e0f7fa!important}.cyan-50-border{border-color:#e0f7fa!important}.cyan-50-border-top{border-top-color:#e0f7fa!important}.cyan-50-border-right{border-right-color:#e0f7fa!important}.cyan-50-border-bottom{border-bottom-color:#e0f7fa!important}.cyan-50-border-left{border-left-color:#e0f7fa!important}.cyan-100-bg{background-color:#b2ebf2!important}.md-cyan-100-bg{background-color:#b2ebf2!important;color:rgba(0,0,0,.87)}.cyan-100-fg{color:#b2ebf2!important}.cyan-100-border{border-color:#b2ebf2!important}.cyan-100-border-top{border-top-color:#b2ebf2!important}.cyan-100-border-right{border-right-color:#b2ebf2!important}.cyan-100-border-bottom{border-bottom-color:#b2ebf2!important}.cyan-100-border-left{border-left-color:#b2ebf2!important}.cyan-200-bg{background-color:#80deea!important}.md-cyan-200-bg{background-color:#80deea!important;color:rgba(0,0,0,.87)}.cyan-200-fg{color:#80deea!important}.cyan-200-border{border-color:#80deea!important}.cyan-200-border-top{border-top-color:#80deea!important}.cyan-200-border-right{border-right-color:#80deea!important}.cyan-200-border-bottom{border-bottom-color:#80deea!important}.cyan-200-border-left{border-left-color:#80deea!important}.cyan-300-bg{background-color:#4dd0e1!important}.md-cyan-300-bg{background-color:#4dd0e1!important;color:rgba(0,0,0,.87)}.cyan-300-fg{color:#4dd0e1!important}.cyan-300-border{border-color:#4dd0e1!important}.cyan-300-border-top{border-top-color:#4dd0e1!important}.cyan-300-border-right{border-right-color:#4dd0e1!important}.cyan-300-border-bottom{border-bottom-color:#4dd0e1!important}.cyan-300-border-left{border-left-color:#4dd0e1!important}.cyan-400-bg{background-color:#26c6da!important}.md-cyan-400-bg{background-color:#26c6da!important;color:rgba(0,0,0,.87)}.cyan-400-fg{color:#26c6da!important}.cyan-400-border{border-color:#26c6da!important}.cyan-400-border-top{border-top-color:#26c6da!important}.cyan-400-border-right{border-right-color:#26c6da!important}.cyan-400-border-bottom{border-bottom-color:#26c6da!important}.cyan-400-border-left{border-left-color:#26c6da!important}.cyan-500-bg{background-color:#00bcd4!important}.md-cyan-500-bg{background-color:#00bcd4!important;color:rgba(0,0,0,.87)}.cyan-500-fg{color:#00bcd4!important}.cyan-500-border{border-color:#00bcd4!important}.cyan-500-border-top{border-top-color:#00bcd4!important}.cyan-500-border-right{border-right-color:#00bcd4!important}.cyan-500-border-bottom{border-bottom-color:#00bcd4!important}.cyan-500-border-left{border-left-color:#00bcd4!important}.md-cyan-bg{background-color:#00bcd4!important;color:rgba(0,0,0,.87)}.cyan-bg{background-color:#00bcd4!important}.cyan-fg{color:#00bcd4!important}.cyan-border{border-color:#00bcd4!important}.cyan-border-top{border-top-color:#00bcd4!important}.cyan-border-right{border-right-color:#00bcd4!important}.cyan-border-bottom{border-bottom-color:#00bcd4!important}.cyan-border-left{border-left-color:#00bcd4!important}.cyan-600-bg{background-color:#00acc1!important}.md-cyan-600-bg{background-color:#00acc1!important;color:rgba(0,0,0,.87)}.cyan-600-fg{color:#00acc1!important}.cyan-600-border{border-color:#00acc1!important}.cyan-600-border-top{border-top-color:#00acc1!important}.cyan-600-border-right{border-right-color:#00acc1!important}.cyan-600-border-bottom{border-bottom-color:#00acc1!important}.cyan-600-border-left{border-left-color:#00acc1!important}.cyan-700-bg{background-color:#0097a7!important}.md-cyan-700-bg{background-color:#0097a7!important;color:#fff}.cyan-700-fg{color:#0097a7!important}.cyan-700-border{border-color:#0097a7!important}.cyan-700-border-top{border-top-color:#0097a7!important}.cyan-700-border-right{border-right-color:#0097a7!important}.cyan-700-border-bottom{border-bottom-color:#0097a7!important}.cyan-700-border-left{border-left-color:#0097a7!important}.cyan-800-bg{background-color:#00838f!important}.md-cyan-800-bg{background-color:#00838f!important;color:#fff}.cyan-800-fg{color:#00838f!important}.cyan-800-border{border-color:#00838f!important}.cyan-800-border-top{border-top-color:#00838f!important}.cyan-800-border-right{border-right-color:#00838f!important}.cyan-800-border-bottom{border-bottom-color:#00838f!important}.cyan-800-border-left{border-left-color:#00838f!important}.cyan-900-bg{background-color:#006064!important}.md-cyan-900-bg{background-color:#006064!important;color:#fff}.cyan-900-fg{color:#006064!important}.cyan-900-border{border-color:#006064!important}.cyan-900-border-top{border-top-color:#006064!important}.cyan-900-border-right{border-right-color:#006064!important}.cyan-900-border-bottom{border-bottom-color:#006064!important}.cyan-900-border-left{border-left-color:#006064!important}.cyan-A100-bg{background-color:#84ffff!important}.md-cyan-A100-bg{background-color:#84ffff!important;color:rgba(0,0,0,.87)}.cyan-A100-fg{color:#84ffff!important}.cyan-A100-border{border-color:#84ffff!important}.cyan-A100-border-top{border-top-color:#84ffff!important}.cyan-A100-border-right{border-right-color:#84ffff!important}.cyan-A100-border-bottom{border-bottom-color:#84ffff!important}.cyan-A100-border-left{border-left-color:#84ffff!important}.cyan-A200-bg{background-color:#18ffff!important}.md-cyan-A200-bg{background-color:#18ffff!important;color:rgba(0,0,0,.87)}.cyan-A200-fg{color:#18ffff!important}.cyan-A200-border{border-color:#18ffff!important}.cyan-A200-border-top{border-top-color:#18ffff!important}.cyan-A200-border-right{border-right-color:#18ffff!important}.cyan-A200-border-bottom{border-bottom-color:#18ffff!important}.cyan-A200-border-left{border-left-color:#18ffff!important}.cyan-A400-bg{background-color:#00e5ff!important}.md-cyan-A400-bg{background-color:#00e5ff!important;color:rgba(0,0,0,.87)}.cyan-A400-fg{color:#00e5ff!important}.cyan-A400-border{border-color:#00e5ff!important}.cyan-A400-border-top{border-top-color:#00e5ff!important}.cyan-A400-border-right{border-right-color:#00e5ff!important}.cyan-A400-border-bottom{border-bottom-color:#00e5ff!important}.cyan-A400-border-left{border-left-color:#00e5ff!important}.cyan-A700-bg{background-color:#00b8d4!important}.md-cyan-A700-bg{background-color:#00b8d4!important;color:rgba(0,0,0,.87)}.cyan-A700-fg{color:#00b8d4!important}.cyan-A700-border{border-color:#00b8d4!important}.cyan-A700-border-top{border-top-color:#00b8d4!important}.cyan-A700-border-right{border-right-color:#00b8d4!important}.cyan-A700-border-bottom{border-bottom-color:#00b8d4!important}.cyan-A700-border-left{border-left-color:#00b8d4!important}.teal-50-bg{background-color:#e0f2f1!important}.md-teal-50-bg{background-color:#e0f2f1!important;color:rgba(0,0,0,.87)}.teal-50-fg{color:#e0f2f1!important}.teal-50-border{border-color:#e0f2f1!important}.teal-50-border-top{border-top-color:#e0f2f1!important}.teal-50-border-right{border-right-color:#e0f2f1!important}.teal-50-border-bottom{border-bottom-color:#e0f2f1!important}.teal-50-border-left{border-left-color:#e0f2f1!important}.teal-100-bg{background-color:#b2dfdb!important}.md-teal-100-bg{background-color:#b2dfdb!important;color:rgba(0,0,0,.87)}.teal-100-fg{color:#b2dfdb!important}.teal-100-border{border-color:#b2dfdb!important}.teal-100-border-top{border-top-color:#b2dfdb!important}.teal-100-border-right{border-right-color:#b2dfdb!important}.teal-100-border-bottom{border-bottom-color:#b2dfdb!important}.teal-100-border-left{border-left-color:#b2dfdb!important}.teal-200-bg{background-color:#80cbc4!important}.md-teal-200-bg{background-color:#80cbc4!important;color:rgba(0,0,0,.87)}.teal-200-fg{color:#80cbc4!important}.teal-200-border{border-color:#80cbc4!important}.teal-200-border-top{border-top-color:#80cbc4!important}.teal-200-border-right{border-right-color:#80cbc4!important}.teal-200-border-bottom{border-bottom-color:#80cbc4!important}.teal-200-border-left{border-left-color:#80cbc4!important}.teal-300-bg{background-color:#4db6ac!important}.md-teal-300-bg{background-color:#4db6ac!important;color:rgba(0,0,0,.87)}.teal-300-fg{color:#4db6ac!important}.teal-300-border{border-color:#4db6ac!important}.teal-300-border-top{border-top-color:#4db6ac!important}.teal-300-border-right{border-right-color:#4db6ac!important}.teal-300-border-bottom{border-bottom-color:#4db6ac!important}.teal-300-border-left{border-left-color:#4db6ac!important}.teal-400-bg{background-color:#26a69a!important}.md-teal-400-bg{background-color:#26a69a!important;color:rgba(0,0,0,.87)}.teal-400-fg{color:#26a69a!important}.teal-400-border{border-color:#26a69a!important}.teal-400-border-top{border-top-color:#26a69a!important}.teal-400-border-right{border-right-color:#26a69a!important}.teal-400-border-bottom{border-bottom-color:#26a69a!important}.teal-400-border-left{border-left-color:#26a69a!important}.teal-500-bg{background-color:#009688!important}.md-teal-500-bg{background-color:#009688!important;color:#fff}.teal-500-fg{color:#009688!important}.teal-500-border{border-color:#009688!important}.teal-500-border-top{border-top-color:#009688!important}.teal-500-border-right{border-right-color:#009688!important}.teal-500-border-bottom{border-bottom-color:#009688!important}.teal-500-border-left{border-left-color:#009688!important}.md-teal-bg{background-color:#009688!important;color:#fff}.teal-bg{background-color:#009688!important}.teal-fg{color:#009688!important}.teal-border{border-color:#009688!important}.teal-border-top{border-top-color:#009688!important}.teal-border-right{border-right-color:#009688!important}.teal-border-bottom{border-bottom-color:#009688!important}.teal-border-left{border-left-color:#009688!important}.teal-600-bg{background-color:#00897b!important}.md-teal-600-bg{background-color:#00897b!important;color:#fff}.teal-600-fg{color:#00897b!important}.teal-600-border{border-color:#00897b!important}.teal-600-border-top{border-top-color:#00897b!important}.teal-600-border-right{border-right-color:#00897b!important}.teal-600-border-bottom{border-bottom-color:#00897b!important}.teal-600-border-left{border-left-color:#00897b!important}.teal-700-bg{background-color:#00796b!important}.md-teal-700-bg{background-color:#00796b!important;color:#fff}.teal-700-fg{color:#00796b!important}.teal-700-border{border-color:#00796b!important}.teal-700-border-top{border-top-color:#00796b!important}.teal-700-border-right{border-right-color:#00796b!important}.teal-700-border-bottom{border-bottom-color:#00796b!important}.teal-700-border-left{border-left-color:#00796b!important}.teal-800-bg{background-color:#00695c!important}.md-teal-800-bg{background-color:#00695c!important;color:rgba(255,255,255,.87)}.teal-800-fg{color:#00695c!important}.teal-800-border{border-color:#00695c!important}.teal-800-border-top{border-top-color:#00695c!important}.teal-800-border-right{border-right-color:#00695c!important}.teal-800-border-bottom{border-bottom-color:#00695c!important}.teal-800-border-left{border-left-color:#00695c!important}.teal-900-bg{background-color:#004d40!important}.md-teal-900-bg{background-color:#004d40!important;color:rgba(255,255,255,.87)}.teal-900-fg{color:#004d40!important}.teal-900-border{border-color:#004d40!important}.teal-900-border-top{border-top-color:#004d40!important}.teal-900-border-right{border-right-color:#004d40!important}.teal-900-border-bottom{border-bottom-color:#004d40!important}.teal-900-border-left{border-left-color:#004d40!important}.teal-A100-bg{background-color:#a7ffeb!important}.md-teal-A100-bg{background-color:#a7ffeb!important;color:rgba(0,0,0,.87)}.teal-A100-fg{color:#a7ffeb!important}.teal-A100-border{border-color:#a7ffeb!important}.teal-A100-border-top{border-top-color:#a7ffeb!important}.teal-A100-border-right{border-right-color:#a7ffeb!important}.teal-A100-border-bottom{border-bottom-color:#a7ffeb!important}.teal-A100-border-left{border-left-color:#a7ffeb!important}.teal-A200-bg{background-color:#64ffda!important}.md-teal-A200-bg{background-color:#64ffda!important;color:rgba(0,0,0,.87)}.teal-A200-fg{color:#64ffda!important}.teal-A200-border{border-color:#64ffda!important}.teal-A200-border-top{border-top-color:#64ffda!important}.teal-A200-border-right{border-right-color:#64ffda!important}.teal-A200-border-bottom{border-bottom-color:#64ffda!important}.teal-A200-border-left{border-left-color:#64ffda!important}.teal-A400-bg{background-color:#1de9b6!important}.md-teal-A400-bg{background-color:#1de9b6!important;color:rgba(0,0,0,.87)}.teal-A400-fg{color:#1de9b6!important}.teal-A400-border{border-color:#1de9b6!important}.teal-A400-border-top{border-top-color:#1de9b6!important}.teal-A400-border-right{border-right-color:#1de9b6!important}.teal-A400-border-bottom{border-bottom-color:#1de9b6!important}.teal-A400-border-left{border-left-color:#1de9b6!important}.teal-A700-bg{background-color:#00bfa5!important}.md-teal-A700-bg{background-color:#00bfa5!important;color:rgba(0,0,0,.87)}.teal-A700-fg{color:#00bfa5!important}.teal-A700-border{border-color:#00bfa5!important}.teal-A700-border-top{border-top-color:#00bfa5!important}.teal-A700-border-right{border-right-color:#00bfa5!important}.teal-A700-border-bottom{border-bottom-color:#00bfa5!important}.teal-A700-border-left{border-left-color:#00bfa5!important}.green-50-bg{background-color:#e8f5e9!important}.md-green-50-bg{background-color:#e8f5e9!important;color:rgba(0,0,0,.87)}.green-50-fg{color:#e8f5e9!important}.green-50-border{border-color:#e8f5e9!important}.green-50-border-top{border-top-color:#e8f5e9!important}.green-50-border-right{border-right-color:#e8f5e9!important}.green-50-border-bottom{border-bottom-color:#e8f5e9!important}.green-50-border-left{border-left-color:#e8f5e9!important}.green-100-bg{background-color:#c8e6c9!important}.md-green-100-bg{background-color:#c8e6c9!important;color:rgba(0,0,0,.87)}.green-100-fg{color:#c8e6c9!important}.green-100-border{border-color:#c8e6c9!important}.green-100-border-top{border-top-color:#c8e6c9!important}.green-100-border-right{border-right-color:#c8e6c9!important}.green-100-border-bottom{border-bottom-color:#c8e6c9!important}.green-100-border-left{border-left-color:#c8e6c9!important}.green-200-bg{background-color:#a5d6a7!important}.md-green-200-bg{background-color:#a5d6a7!important;color:rgba(0,0,0,.87)}.green-200-fg{color:#a5d6a7!important}.green-200-border{border-color:#a5d6a7!important}.green-200-border-top{border-top-color:#a5d6a7!important}.green-200-border-right{border-right-color:#a5d6a7!important}.green-200-border-bottom{border-bottom-color:#a5d6a7!important}.green-200-border-left{border-left-color:#a5d6a7!important}.green-300-bg{background-color:#81c784!important}.md-green-300-bg{background-color:#81c784!important;color:rgba(0,0,0,.87)}.green-300-fg{color:#81c784!important}.green-300-border{border-color:#81c784!important}.green-300-border-top{border-top-color:#81c784!important}.green-300-border-right{border-right-color:#81c784!important}.green-300-border-bottom{border-bottom-color:#81c784!important}.green-300-border-left{border-left-color:#81c784!important}.green-400-bg{background-color:#66bb6a!important}.md-green-400-bg{background-color:#66bb6a!important;color:rgba(0,0,0,.87)}.green-400-fg{color:#66bb6a!important}.green-400-border{border-color:#66bb6a!important}.green-400-border-top{border-top-color:#66bb6a!important}.green-400-border-right{border-right-color:#66bb6a!important}.green-400-border-bottom{border-bottom-color:#66bb6a!important}.green-400-border-left{border-left-color:#66bb6a!important}.green-500-bg{background-color:#4caf50!important}.md-green-500-bg{background-color:#4caf50!important;color:rgba(0,0,0,.87)}.green-500-fg{color:#4caf50!important}.green-500-border{border-color:#4caf50!important}.green-500-border-top{border-top-color:#4caf50!important}.green-500-border-right{border-right-color:#4caf50!important}.green-500-border-bottom{border-bottom-color:#4caf50!important}.green-500-border-left{border-left-color:#4caf50!important}.md-green-bg{background-color:#4caf50!important;color:rgba(0,0,0,.87)}.green-bg{background-color:#4caf50!important}.green-fg{color:#4caf50!important}.green-border{border-color:#4caf50!important}.green-border-top{border-top-color:#4caf50!important}.green-border-right{border-right-color:#4caf50!important}.green-border-bottom{border-bottom-color:#4caf50!important}.green-border-left{border-left-color:#4caf50!important}.green-600-bg{background-color:#43a047!important}.md-green-600-bg{background-color:#43a047!important;color:#fff}.green-600-fg{color:#43a047!important}.green-600-border{border-color:#43a047!important}.green-600-border-top{border-top-color:#43a047!important}.green-600-border-right{border-right-color:#43a047!important}.green-600-border-bottom{border-bottom-color:#43a047!important}.green-600-border-left{border-left-color:#43a047!important}.green-700-bg{background-color:#388e3c!important}.md-green-700-bg{background-color:#388e3c!important;color:#fff}.green-700-fg{color:#388e3c!important}.green-700-border{border-color:#388e3c!important}.green-700-border-top{border-top-color:#388e3c!important}.green-700-border-right{border-right-color:#388e3c!important}.green-700-border-bottom{border-bottom-color:#388e3c!important}.green-700-border-left{border-left-color:#388e3c!important}.green-800-bg{background-color:#2e7d32!important}.md-green-800-bg{background-color:#2e7d32!important;color:rgba(255,255,255,.87)}.green-800-fg{color:#2e7d32!important}.green-800-border{border-color:#2e7d32!important}.green-800-border-top{border-top-color:#2e7d32!important}.green-800-border-right{border-right-color:#2e7d32!important}.green-800-border-bottom{border-bottom-color:#2e7d32!important}.green-800-border-left{border-left-color:#2e7d32!important}.green-900-bg{background-color:#1b5e20!important}.md-green-900-bg{background-color:#1b5e20!important;color:rgba(255,255,255,.87)}.green-900-fg{color:#1b5e20!important}.green-900-border{border-color:#1b5e20!important}.green-900-border-top{border-top-color:#1b5e20!important}.green-900-border-right{border-right-color:#1b5e20!important}.green-900-border-bottom{border-bottom-color:#1b5e20!important}.green-900-border-left{border-left-color:#1b5e20!important}.green-A100-bg{background-color:#b9f6ca!important}.md-green-A100-bg{background-color:#b9f6ca!important;color:rgba(0,0,0,.87)}.green-A100-fg{color:#b9f6ca!important}.green-A100-border{border-color:#b9f6ca!important}.green-A100-border-top{border-top-color:#b9f6ca!important}.green-A100-border-right{border-right-color:#b9f6ca!important}.green-A100-border-bottom{border-bottom-color:#b9f6ca!important}.green-A100-border-left{border-left-color:#b9f6ca!important}.green-A200-bg{background-color:#69f0ae!important}.md-green-A200-bg{background-color:#69f0ae!important;color:rgba(0,0,0,.87)}.green-A200-fg{color:#69f0ae!important}.green-A200-border{border-color:#69f0ae!important}.green-A200-border-top{border-top-color:#69f0ae!important}.green-A200-border-right{border-right-color:#69f0ae!important}.green-A200-border-bottom{border-bottom-color:#69f0ae!important}.green-A200-border-left{border-left-color:#69f0ae!important}.green-A400-bg{background-color:#00e676!important}.md-green-A400-bg{background-color:#00e676!important;color:rgba(0,0,0,.87)}.green-A400-fg{color:#00e676!important}.green-A400-border{border-color:#00e676!important}.green-A400-border-top{border-top-color:#00e676!important}.green-A400-border-right{border-right-color:#00e676!important}.green-A400-border-bottom{border-bottom-color:#00e676!important}.green-A400-border-left{border-left-color:#00e676!important}.green-A700-bg{background-color:#00c853!important}.md-green-A700-bg{background-color:#00c853!important;color:rgba(0,0,0,.87)}.green-A700-fg{color:#00c853!important}.green-A700-border{border-color:#00c853!important}.green-A700-border-top{border-top-color:#00c853!important}.green-A700-border-right{border-right-color:#00c853!important}.green-A700-border-bottom{border-bottom-color:#00c853!important}.green-A700-border-left{border-left-color:#00c853!important}.light-green-50-bg{background-color:#f1f8e9!important}.md-light-green-50-bg{background-color:#f1f8e9!important;color:rgba(0,0,0,.87)}.light-green-50-fg{color:#f1f8e9!important}.light-green-50-border{border-color:#f1f8e9!important}.light-green-50-border-top{border-top-color:#f1f8e9!important}.light-green-50-border-right{border-right-color:#f1f8e9!important}.light-green-50-border-bottom{border-bottom-color:#f1f8e9!important}.light-green-50-border-left{border-left-color:#f1f8e9!important}.light-green-100-bg{background-color:#dcedc8!important}.md-light-green-100-bg{background-color:#dcedc8!important;color:rgba(0,0,0,.87)}.light-green-100-fg{color:#dcedc8!important}.light-green-100-border{border-color:#dcedc8!important}.light-green-100-border-top{border-top-color:#dcedc8!important}.light-green-100-border-right{border-right-color:#dcedc8!important}.light-green-100-border-bottom{border-bottom-color:#dcedc8!important}.light-green-100-border-left{border-left-color:#dcedc8!important}.light-green-200-bg{background-color:#c5e1a5!important}.md-light-green-200-bg{background-color:#c5e1a5!important;color:rgba(0,0,0,.87)}.light-green-200-fg{color:#c5e1a5!important}.light-green-200-border{border-color:#c5e1a5!important}.light-green-200-border-top{border-top-color:#c5e1a5!important}.light-green-200-border-right{border-right-color:#c5e1a5!important}.light-green-200-border-bottom{border-bottom-color:#c5e1a5!important}.light-green-200-border-left{border-left-color:#c5e1a5!important}.light-green-300-bg{background-color:#aed581!important}.md-light-green-300-bg{background-color:#aed581!important;color:rgba(0,0,0,.87)}.light-green-300-fg{color:#aed581!important}.light-green-300-border{border-color:#aed581!important}.light-green-300-border-top{border-top-color:#aed581!important}.light-green-300-border-right{border-right-color:#aed581!important}.light-green-300-border-bottom{border-bottom-color:#aed581!important}.light-green-300-border-left{border-left-color:#aed581!important}.light-green-400-bg{background-color:#9ccc65!important}.md-light-green-400-bg{background-color:#9ccc65!important;color:rgba(0,0,0,.87)}.light-green-400-fg{color:#9ccc65!important}.light-green-400-border{border-color:#9ccc65!important}.light-green-400-border-top{border-top-color:#9ccc65!important}.light-green-400-border-right{border-right-color:#9ccc65!important}.light-green-400-border-bottom{border-bottom-color:#9ccc65!important}.light-green-400-border-left{border-left-color:#9ccc65!important}.light-green-500-bg{background-color:#8bc34a!important}.md-light-green-500-bg{background-color:#8bc34a!important;color:rgba(0,0,0,.87)}.light-green-500-fg{color:#8bc34a!important}.light-green-500-border{border-color:#8bc34a!important}.light-green-500-border-top{border-top-color:#8bc34a!important}.light-green-500-border-right{border-right-color:#8bc34a!important}.light-green-500-border-bottom{border-bottom-color:#8bc34a!important}.light-green-500-border-left{border-left-color:#8bc34a!important}.md-light-green-bg{background-color:#8bc34a!important;color:rgba(0,0,0,.87)}.light-green-bg{background-color:#8bc34a!important}.light-green-fg{color:#8bc34a!important}.light-green-border{border-color:#8bc34a!important}.light-green-border-top{border-top-color:#8bc34a!important}.light-green-border-right{border-right-color:#8bc34a!important}.light-green-border-bottom{border-bottom-color:#8bc34a!important}.light-green-border-left{border-left-color:#8bc34a!important}.light-green-600-bg{background-color:#7cb342!important}.md-light-green-600-bg{background-color:#7cb342!important;color:rgba(0,0,0,.87)}.light-green-600-fg{color:#7cb342!important}.light-green-600-border{border-color:#7cb342!important}.light-green-600-border-top{border-top-color:#7cb342!important}.light-green-600-border-right{border-right-color:#7cb342!important}.light-green-600-border-bottom{border-bottom-color:#7cb342!important}.light-green-600-border-left{border-left-color:#7cb342!important}.light-green-700-bg{background-color:#689f38!important}.md-light-green-700-bg{background-color:#689f38!important;color:#fff}.light-green-700-fg{color:#689f38!important}.light-green-700-border{border-color:#689f38!important}.light-green-700-border-top{border-top-color:#689f38!important}.light-green-700-border-right{border-right-color:#689f38!important}.light-green-700-border-bottom{border-bottom-color:#689f38!important}.light-green-700-border-left{border-left-color:#689f38!important}.light-green-800-bg{background-color:#558b2f!important}.md-light-green-800-bg{background-color:#558b2f!important;color:#fff}.light-green-800-fg{color:#558b2f!important}.light-green-800-border{border-color:#558b2f!important}.light-green-800-border-top{border-top-color:#558b2f!important}.light-green-800-border-right{border-right-color:#558b2f!important}.light-green-800-border-bottom{border-bottom-color:#558b2f!important}.light-green-800-border-left{border-left-color:#558b2f!important}.light-green-900-bg{background-color:#33691e!important}.md-light-green-900-bg{background-color:#33691e!important;color:#fff}.light-green-900-fg{color:#33691e!important}.light-green-900-border{border-color:#33691e!important}.light-green-900-border-top{border-top-color:#33691e!important}.light-green-900-border-right{border-right-color:#33691e!important}.light-green-900-border-bottom{border-bottom-color:#33691e!important}.light-green-900-border-left{border-left-color:#33691e!important}.light-green-A100-bg{background-color:#ccff90!important}.md-light-green-A100-bg{background-color:#ccff90!important;color:rgba(0,0,0,.87)}.light-green-A100-fg{color:#ccff90!important}.light-green-A100-border{border-color:#ccff90!important}.light-green-A100-border-top{border-top-color:#ccff90!important}.light-green-A100-border-right{border-right-color:#ccff90!important}.light-green-A100-border-bottom{border-bottom-color:#ccff90!important}.light-green-A100-border-left{border-left-color:#ccff90!important}.light-green-A200-bg{background-color:#b2ff59!important}.md-light-green-A200-bg{background-color:#b2ff59!important;color:rgba(0,0,0,.87)}.light-green-A200-fg{color:#b2ff59!important}.light-green-A200-border{border-color:#b2ff59!important}.light-green-A200-border-top{border-top-color:#b2ff59!important}.light-green-A200-border-right{border-right-color:#b2ff59!important}.light-green-A200-border-bottom{border-bottom-color:#b2ff59!important}.light-green-A200-border-left{border-left-color:#b2ff59!important}.light-green-A400-bg{background-color:#76ff03!important}.md-light-green-A400-bg{background-color:#76ff03!important;color:rgba(0,0,0,.87)}.light-green-A400-fg{color:#76ff03!important}.light-green-A400-border{border-color:#76ff03!important}.light-green-A400-border-top{border-top-color:#76ff03!important}.light-green-A400-border-right{border-right-color:#76ff03!important}.light-green-A400-border-bottom{border-bottom-color:#76ff03!important}.light-green-A400-border-left{border-left-color:#76ff03!important}.light-green-A700-bg{background-color:#64dd17!important}.md-light-green-A700-bg{background-color:#64dd17!important;color:rgba(0,0,0,.87)}.light-green-A700-fg{color:#64dd17!important}.light-green-A700-border{border-color:#64dd17!important}.light-green-A700-border-top{border-top-color:#64dd17!important}.light-green-A700-border-right{border-right-color:#64dd17!important}.light-green-A700-border-bottom{border-bottom-color:#64dd17!important}.light-green-A700-border-left{border-left-color:#64dd17!important}.lime-50-bg{background-color:#f9fbe7!important}.md-lime-50-bg{background-color:#f9fbe7!important;color:rgba(0,0,0,.87)}.lime-50-fg{color:#f9fbe7!important}.lime-50-border{border-color:#f9fbe7!important}.lime-50-border-top{border-top-color:#f9fbe7!important}.lime-50-border-right{border-right-color:#f9fbe7!important}.lime-50-border-bottom{border-bottom-color:#f9fbe7!important}.lime-50-border-left{border-left-color:#f9fbe7!important}.lime-100-bg{background-color:#f0f4c3!important}.md-lime-100-bg{background-color:#f0f4c3!important;color:rgba(0,0,0,.87)}.lime-100-fg{color:#f0f4c3!important}.lime-100-border{border-color:#f0f4c3!important}.lime-100-border-top{border-top-color:#f0f4c3!important}.lime-100-border-right{border-right-color:#f0f4c3!important}.lime-100-border-bottom{border-bottom-color:#f0f4c3!important}.lime-100-border-left{border-left-color:#f0f4c3!important}.lime-200-bg{background-color:#e6ee9c!important}.md-lime-200-bg{background-color:#e6ee9c!important;color:rgba(0,0,0,.87)}.lime-200-fg{color:#e6ee9c!important}.lime-200-border{border-color:#e6ee9c!important}.lime-200-border-top{border-top-color:#e6ee9c!important}.lime-200-border-right{border-right-color:#e6ee9c!important}.lime-200-border-bottom{border-bottom-color:#e6ee9c!important}.lime-200-border-left{border-left-color:#e6ee9c!important}.lime-300-bg{background-color:#dce775!important}.md-lime-300-bg{background-color:#dce775!important;color:rgba(0,0,0,.87)}.lime-300-fg{color:#dce775!important}.lime-300-border{border-color:#dce775!important}.lime-300-border-top{border-top-color:#dce775!important}.lime-300-border-right{border-right-color:#dce775!important}.lime-300-border-bottom{border-bottom-color:#dce775!important}.lime-300-border-left{border-left-color:#dce775!important}.lime-400-bg{background-color:#d4e157!important}.md-lime-400-bg{background-color:#d4e157!important;color:rgba(0,0,0,.87)}.lime-400-fg{color:#d4e157!important}.lime-400-border{border-color:#d4e157!important}.lime-400-border-top{border-top-color:#d4e157!important}.lime-400-border-right{border-right-color:#d4e157!important}.lime-400-border-bottom{border-bottom-color:#d4e157!important}.lime-400-border-left{border-left-color:#d4e157!important}.lime-500-bg{background-color:#cddc39!important}.md-lime-500-bg{background-color:#cddc39!important;color:rgba(0,0,0,.87)}.lime-500-fg{color:#cddc39!important}.lime-500-border{border-color:#cddc39!important}.lime-500-border-top{border-top-color:#cddc39!important}.lime-500-border-right{border-right-color:#cddc39!important}.lime-500-border-bottom{border-bottom-color:#cddc39!important}.lime-500-border-left{border-left-color:#cddc39!important}.md-lime-bg{background-color:#cddc39!important;color:rgba(0,0,0,.87)}.lime-bg{background-color:#cddc39!important}.lime-fg{color:#cddc39!important}.lime-border{border-color:#cddc39!important}.lime-border-top{border-top-color:#cddc39!important}.lime-border-right{border-right-color:#cddc39!important}.lime-border-bottom{border-bottom-color:#cddc39!important}.lime-border-left{border-left-color:#cddc39!important}.lime-600-bg{background-color:#c0ca33!important}.md-lime-600-bg{background-color:#c0ca33!important;color:rgba(0,0,0,.87)}.lime-600-fg{color:#c0ca33!important}.lime-600-border{border-color:#c0ca33!important}.lime-600-border-top{border-top-color:#c0ca33!important}.lime-600-border-right{border-right-color:#c0ca33!important}.lime-600-border-bottom{border-bottom-color:#c0ca33!important}.lime-600-border-left{border-left-color:#c0ca33!important}.lime-700-bg{background-color:#afb42b!important}.md-lime-700-bg{background-color:#afb42b!important;color:rgba(0,0,0,.87)}.lime-700-fg{color:#afb42b!important}.lime-700-border{border-color:#afb42b!important}.lime-700-border-top{border-top-color:#afb42b!important}.lime-700-border-right{border-right-color:#afb42b!important}.lime-700-border-bottom{border-bottom-color:#afb42b!important}.lime-700-border-left{border-left-color:#afb42b!important}.lime-800-bg{background-color:#9e9d24!important}.md-lime-800-bg{background-color:#9e9d24!important;color:rgba(0,0,0,.87)}.lime-800-fg{color:#9e9d24!important}.lime-800-border{border-color:#9e9d24!important}.lime-800-border-top{border-top-color:#9e9d24!important}.lime-800-border-right{border-right-color:#9e9d24!important}.lime-800-border-bottom{border-bottom-color:#9e9d24!important}.lime-800-border-left{border-left-color:#9e9d24!important}.lime-900-bg{background-color:#827717!important}.md-lime-900-bg{background-color:#827717!important;color:#fff}.lime-900-fg{color:#827717!important}.lime-900-border{border-color:#827717!important}.lime-900-border-top{border-top-color:#827717!important}.lime-900-border-right{border-right-color:#827717!important}.lime-900-border-bottom{border-bottom-color:#827717!important}.lime-900-border-left{border-left-color:#827717!important}.lime-A100-bg{background-color:#f4ff81!important}.md-lime-A100-bg{background-color:#f4ff81!important;color:rgba(0,0,0,.87)}.lime-A100-fg{color:#f4ff81!important}.lime-A100-border{border-color:#f4ff81!important}.lime-A100-border-top{border-top-color:#f4ff81!important}.lime-A100-border-right{border-right-color:#f4ff81!important}.lime-A100-border-bottom{border-bottom-color:#f4ff81!important}.lime-A100-border-left{border-left-color:#f4ff81!important}.lime-A200-bg{background-color:#eeff41!important}.md-lime-A200-bg{background-color:#eeff41!important;color:rgba(0,0,0,.87)}.lime-A200-fg{color:#eeff41!important}.lime-A200-border{border-color:#eeff41!important}.lime-A200-border-top{border-top-color:#eeff41!important}.lime-A200-border-right{border-right-color:#eeff41!important}.lime-A200-border-bottom{border-bottom-color:#eeff41!important}.lime-A200-border-left{border-left-color:#eeff41!important}.lime-A400-bg{background-color:#c6ff00!important}.md-lime-A400-bg{background-color:#c6ff00!important;color:rgba(0,0,0,.87)}.lime-A400-fg{color:#c6ff00!important}.lime-A400-border{border-color:#c6ff00!important}.lime-A400-border-top{border-top-color:#c6ff00!important}.lime-A400-border-right{border-right-color:#c6ff00!important}.lime-A400-border-bottom{border-bottom-color:#c6ff00!important}.lime-A400-border-left{border-left-color:#c6ff00!important}.lime-A700-bg{background-color:#aeea00!important}.md-lime-A700-bg{background-color:#aeea00!important;color:rgba(0,0,0,.87)}.lime-A700-fg{color:#aeea00!important}.lime-A700-border{border-color:#aeea00!important}.lime-A700-border-top{border-top-color:#aeea00!important}.lime-A700-border-right{border-right-color:#aeea00!important}.lime-A700-border-bottom{border-bottom-color:#aeea00!important}.lime-A700-border-left{border-left-color:#aeea00!important}.yellow-50-bg{background-color:#fffde7!important}.md-yellow-50-bg{background-color:#fffde7!important;color:rgba(0,0,0,.87)}.yellow-50-fg{color:#fffde7!important}.yellow-50-border{border-color:#fffde7!important}.yellow-50-border-top{border-top-color:#fffde7!important}.yellow-50-border-right{border-right-color:#fffde7!important}.yellow-50-border-bottom{border-bottom-color:#fffde7!important}.yellow-50-border-left{border-left-color:#fffde7!important}.yellow-100-bg{background-color:#fff9c4!important}.md-yellow-100-bg{background-color:#fff9c4!important;color:rgba(0,0,0,.87)}.yellow-100-fg{color:#fff9c4!important}.yellow-100-border{border-color:#fff9c4!important}.yellow-100-border-top{border-top-color:#fff9c4!important}.yellow-100-border-right{border-right-color:#fff9c4!important}.yellow-100-border-bottom{border-bottom-color:#fff9c4!important}.yellow-100-border-left{border-left-color:#fff9c4!important}.yellow-200-bg{background-color:#fff59d!important}.md-yellow-200-bg{background-color:#fff59d!important;color:rgba(0,0,0,.87)}.yellow-200-fg{color:#fff59d!important}.yellow-200-border{border-color:#fff59d!important}.yellow-200-border-top{border-top-color:#fff59d!important}.yellow-200-border-right{border-right-color:#fff59d!important}.yellow-200-border-bottom{border-bottom-color:#fff59d!important}.yellow-200-border-left{border-left-color:#fff59d!important}.yellow-300-bg{background-color:#fff176!important}.md-yellow-300-bg{background-color:#fff176!important;color:rgba(0,0,0,.87)}.yellow-300-fg{color:#fff176!important}.yellow-300-border{border-color:#fff176!important}.yellow-300-border-top{border-top-color:#fff176!important}.yellow-300-border-right{border-right-color:#fff176!important}.yellow-300-border-bottom{border-bottom-color:#fff176!important}.yellow-300-border-left{border-left-color:#fff176!important}.yellow-400-bg{background-color:#ffee58!important}.md-yellow-400-bg{background-color:#ffee58!important;color:rgba(0,0,0,.87)}.yellow-400-fg{color:#ffee58!important}.yellow-400-border{border-color:#ffee58!important}.yellow-400-border-top{border-top-color:#ffee58!important}.yellow-400-border-right{border-right-color:#ffee58!important}.yellow-400-border-bottom{border-bottom-color:#ffee58!important}.yellow-400-border-left{border-left-color:#ffee58!important}.yellow-500-bg{background-color:#ffeb3b!important}.md-yellow-500-bg{background-color:#ffeb3b!important;color:rgba(0,0,0,.87)}.yellow-500-fg{color:#ffeb3b!important}.yellow-500-border{border-color:#ffeb3b!important}.yellow-500-border-top{border-top-color:#ffeb3b!important}.yellow-500-border-right{border-right-color:#ffeb3b!important}.yellow-500-border-bottom{border-bottom-color:#ffeb3b!important}.yellow-500-border-left{border-left-color:#ffeb3b!important}.md-yellow-bg{background-color:#ffeb3b!important;color:rgba(0,0,0,.87)}.yellow-bg{background-color:#ffeb3b!important}.yellow-fg{color:#ffeb3b!important}.yellow-border{border-color:#ffeb3b!important}.yellow-border-top{border-top-color:#ffeb3b!important}.yellow-border-right{border-right-color:#ffeb3b!important}.yellow-border-bottom{border-bottom-color:#ffeb3b!important}.yellow-border-left{border-left-color:#ffeb3b!important}.yellow-600-bg{background-color:#fdd835!important}.md-yellow-600-bg{background-color:#fdd835!important;color:rgba(0,0,0,.87)}.yellow-600-fg{color:#fdd835!important}.yellow-600-border{border-color:#fdd835!important}.yellow-600-border-top{border-top-color:#fdd835!important}.yellow-600-border-right{border-right-color:#fdd835!important}.yellow-600-border-bottom{border-bottom-color:#fdd835!important}.yellow-600-border-left{border-left-color:#fdd835!important}.yellow-700-bg{background-color:#fbc02d!important}.md-yellow-700-bg{background-color:#fbc02d!important;color:rgba(0,0,0,.87)}.yellow-700-fg{color:#fbc02d!important}.yellow-700-border{border-color:#fbc02d!important}.yellow-700-border-top{border-top-color:#fbc02d!important}.yellow-700-border-right{border-right-color:#fbc02d!important}.yellow-700-border-bottom{border-bottom-color:#fbc02d!important}.yellow-700-border-left{border-left-color:#fbc02d!important}.yellow-800-bg{background-color:#f9a825!important}.md-yellow-800-bg{background-color:#f9a825!important;color:rgba(0,0,0,.87)}.yellow-800-fg{color:#f9a825!important}.yellow-800-border{border-color:#f9a825!important}.yellow-800-border-top{border-top-color:#f9a825!important}.yellow-800-border-right{border-right-color:#f9a825!important}.yellow-800-border-bottom{border-bottom-color:#f9a825!important}.yellow-800-border-left{border-left-color:#f9a825!important}.yellow-900-bg{background-color:#f57f17!important}.md-yellow-900-bg{background-color:#f57f17!important;color:rgba(0,0,0,.87)}.yellow-900-fg{color:#f57f17!important}.yellow-900-border{border-color:#f57f17!important}.yellow-900-border-top{border-top-color:#f57f17!important}.yellow-900-border-right{border-right-color:#f57f17!important}.yellow-900-border-bottom{border-bottom-color:#f57f17!important}.yellow-900-border-left{border-left-color:#f57f17!important}.yellow-A100-bg{background-color:#ffff8d!important}.md-yellow-A100-bg{background-color:#ffff8d!important;color:rgba(0,0,0,.87)}.yellow-A100-fg{color:#ffff8d!important}.yellow-A100-border{border-color:#ffff8d!important}.yellow-A100-border-top{border-top-color:#ffff8d!important}.yellow-A100-border-right{border-right-color:#ffff8d!important}.yellow-A100-border-bottom{border-bottom-color:#ffff8d!important}.yellow-A100-border-left{border-left-color:#ffff8d!important}.yellow-A200-bg{background-color:#ff0!important}.md-yellow-A200-bg{background-color:#ff0!important;color:rgba(0,0,0,.87)}.yellow-A200-fg{color:#ff0!important}.yellow-A200-border{border-color:#ff0!important}.yellow-A200-border-top{border-top-color:#ff0!important}.yellow-A200-border-right{border-right-color:#ff0!important}.yellow-A200-border-bottom{border-bottom-color:#ff0!important}.yellow-A200-border-left{border-left-color:#ff0!important}.yellow-A400-bg{background-color:#ffea00!important}.md-yellow-A400-bg{background-color:#ffea00!important;color:rgba(0,0,0,.87)}.yellow-A400-fg{color:#ffea00!important}.yellow-A400-border{border-color:#ffea00!important}.yellow-A400-border-top{border-top-color:#ffea00!important}.yellow-A400-border-right{border-right-color:#ffea00!important}.yellow-A400-border-bottom{border-bottom-color:#ffea00!important}.yellow-A400-border-left{border-left-color:#ffea00!important}.yellow-A700-bg{background-color:#ffd600!important}.md-yellow-A700-bg{background-color:#ffd600!important;color:rgba(0,0,0,.87)}.yellow-A700-fg{color:#ffd600!important}.yellow-A700-border{border-color:#ffd600!important}.yellow-A700-border-top{border-top-color:#ffd600!important}.yellow-A700-border-right{border-right-color:#ffd600!important}.yellow-A700-border-bottom{border-bottom-color:#ffd600!important}.yellow-A700-border-left{border-left-color:#ffd600!important}.amber-50-bg{background-color:#fff8e1!important}.md-amber-50-bg{background-color:#fff8e1!important;color:rgba(0,0,0,.87)}.amber-50-fg{color:#fff8e1!important}.amber-50-border{border-color:#fff8e1!important}.amber-50-border-top{border-top-color:#fff8e1!important}.amber-50-border-right{border-right-color:#fff8e1!important}.amber-50-border-bottom{border-bottom-color:#fff8e1!important}.amber-50-border-left{border-left-color:#fff8e1!important}.amber-100-bg{background-color:#ffecb3!important}.md-amber-100-bg{background-color:#ffecb3!important;color:rgba(0,0,0,.87)}.amber-100-fg{color:#ffecb3!important}.amber-100-border{border-color:#ffecb3!important}.amber-100-border-top{border-top-color:#ffecb3!important}.amber-100-border-right{border-right-color:#ffecb3!important}.amber-100-border-bottom{border-bottom-color:#ffecb3!important}.amber-100-border-left{border-left-color:#ffecb3!important}.amber-200-bg{background-color:#ffe082!important}.md-amber-200-bg{background-color:#ffe082!important;color:rgba(0,0,0,.87)}.amber-200-fg{color:#ffe082!important}.amber-200-border{border-color:#ffe082!important}.amber-200-border-top{border-top-color:#ffe082!important}.amber-200-border-right{border-right-color:#ffe082!important}.amber-200-border-bottom{border-bottom-color:#ffe082!important}.amber-200-border-left{border-left-color:#ffe082!important}.amber-300-bg{background-color:#ffd54f!important}.md-amber-300-bg{background-color:#ffd54f!important;color:rgba(0,0,0,.87)}.amber-300-fg{color:#ffd54f!important}.amber-300-border{border-color:#ffd54f!important}.amber-300-border-top{border-top-color:#ffd54f!important}.amber-300-border-right{border-right-color:#ffd54f!important}.amber-300-border-bottom{border-bottom-color:#ffd54f!important}.amber-300-border-left{border-left-color:#ffd54f!important}.amber-400-bg{background-color:#ffca28!important}.md-amber-400-bg{background-color:#ffca28!important;color:rgba(0,0,0,.87)}.amber-400-fg{color:#ffca28!important}.amber-400-border{border-color:#ffca28!important}.amber-400-border-top{border-top-color:#ffca28!important}.amber-400-border-right{border-right-color:#ffca28!important}.amber-400-border-bottom{border-bottom-color:#ffca28!important}.amber-400-border-left{border-left-color:#ffca28!important}.amber-500-bg{background-color:#ffc107!important}.md-amber-500-bg{background-color:#ffc107!important;color:rgba(0,0,0,.87)}.amber-500-fg{color:#ffc107!important}.amber-500-border{border-color:#ffc107!important}.amber-500-border-top{border-top-color:#ffc107!important}.amber-500-border-right{border-right-color:#ffc107!important}.amber-500-border-bottom{border-bottom-color:#ffc107!important}.amber-500-border-left{border-left-color:#ffc107!important}.md-amber-bg{background-color:#ffc107!important;color:rgba(0,0,0,.87)}.amber-bg{background-color:#ffc107!important}.amber-fg{color:#ffc107!important}.amber-border{border-color:#ffc107!important}.amber-border-top{border-top-color:#ffc107!important}.amber-border-right{border-right-color:#ffc107!important}.amber-border-bottom{border-bottom-color:#ffc107!important}.amber-border-left{border-left-color:#ffc107!important}.amber-600-bg{background-color:#ffb300!important}.md-amber-600-bg{background-color:#ffb300!important;color:rgba(0,0,0,.87)}.amber-600-fg{color:#ffb300!important}.amber-600-border{border-color:#ffb300!important}.amber-600-border-top{border-top-color:#ffb300!important}.amber-600-border-right{border-right-color:#ffb300!important}.amber-600-border-bottom{border-bottom-color:#ffb300!important}.amber-600-border-left{border-left-color:#ffb300!important}.amber-700-bg{background-color:#ffa000!important}.md-amber-700-bg{background-color:#ffa000!important;color:rgba(0,0,0,.87)}.amber-700-fg{color:#ffa000!important}.amber-700-border{border-color:#ffa000!important}.amber-700-border-top{border-top-color:#ffa000!important}.amber-700-border-right{border-right-color:#ffa000!important}.amber-700-border-bottom{border-bottom-color:#ffa000!important}.amber-700-border-left{border-left-color:#ffa000!important}.amber-800-bg{background-color:#ff8f00!important}.md-amber-800-bg{background-color:#ff8f00!important;color:rgba(0,0,0,.87)}.amber-800-fg{color:#ff8f00!important}.amber-800-border{border-color:#ff8f00!important}.amber-800-border-top{border-top-color:#ff8f00!important}.amber-800-border-right{border-right-color:#ff8f00!important}.amber-800-border-bottom{border-bottom-color:#ff8f00!important}.amber-800-border-left{border-left-color:#ff8f00!important}.amber-900-bg{background-color:#ff6f00!important}.md-amber-900-bg{background-color:#ff6f00!important;color:rgba(0,0,0,.87)}.amber-900-fg{color:#ff6f00!important}.amber-900-border{border-color:#ff6f00!important}.amber-900-border-top{border-top-color:#ff6f00!important}.amber-900-border-right{border-right-color:#ff6f00!important}.amber-900-border-bottom{border-bottom-color:#ff6f00!important}.amber-900-border-left{border-left-color:#ff6f00!important}.amber-A100-bg{background-color:#ffe57f!important}.md-amber-A100-bg{background-color:#ffe57f!important;color:rgba(0,0,0,.87)}.amber-A100-fg{color:#ffe57f!important}.amber-A100-border{border-color:#ffe57f!important}.amber-A100-border-top{border-top-color:#ffe57f!important}.amber-A100-border-right{border-right-color:#ffe57f!important}.amber-A100-border-bottom{border-bottom-color:#ffe57f!important}.amber-A100-border-left{border-left-color:#ffe57f!important}.amber-A200-bg{background-color:#ffd740!important}.md-amber-A200-bg{background-color:#ffd740!important;color:rgba(0,0,0,.87)}.amber-A200-fg{color:#ffd740!important}.amber-A200-border{border-color:#ffd740!important}.amber-A200-border-top{border-top-color:#ffd740!important}.amber-A200-border-right{border-right-color:#ffd740!important}.amber-A200-border-bottom{border-bottom-color:#ffd740!important}.amber-A200-border-left{border-left-color:#ffd740!important}.amber-A400-bg{background-color:#ffc400!important}.md-amber-A400-bg{background-color:#ffc400!important;color:rgba(0,0,0,.87)}.amber-A400-fg{color:#ffc400!important}.amber-A400-border{border-color:#ffc400!important}.amber-A400-border-top{border-top-color:#ffc400!important}.amber-A400-border-right{border-right-color:#ffc400!important}.amber-A400-border-bottom{border-bottom-color:#ffc400!important}.amber-A400-border-left{border-left-color:#ffc400!important}.amber-A700-bg{background-color:#ffab00!important}.md-amber-A700-bg{background-color:#ffab00!important;color:rgba(0,0,0,.87)}.amber-A700-fg{color:#ffab00!important}.amber-A700-border{border-color:#ffab00!important}.amber-A700-border-top{border-top-color:#ffab00!important}.amber-A700-border-right{border-right-color:#ffab00!important}.amber-A700-border-bottom{border-bottom-color:#ffab00!important}.amber-A700-border-left{border-left-color:#ffab00!important}.orange-50-bg{background-color:#fff3e0!important}.md-orange-50-bg{background-color:#fff3e0!important;color:rgba(0,0,0,.87)}.orange-50-fg{color:#fff3e0!important}.orange-50-border{border-color:#fff3e0!important}.orange-50-border-top{border-top-color:#fff3e0!important}.orange-50-border-right{border-right-color:#fff3e0!important}.orange-50-border-bottom{border-bottom-color:#fff3e0!important}.orange-50-border-left{border-left-color:#fff3e0!important}.orange-100-bg{background-color:#ffe0b2!important}.md-orange-100-bg{background-color:#ffe0b2!important;color:rgba(0,0,0,.87)}.orange-100-fg{color:#ffe0b2!important}.orange-100-border{border-color:#ffe0b2!important}.orange-100-border-top{border-top-color:#ffe0b2!important}.orange-100-border-right{border-right-color:#ffe0b2!important}.orange-100-border-bottom{border-bottom-color:#ffe0b2!important}.orange-100-border-left{border-left-color:#ffe0b2!important}.orange-200-bg{background-color:#ffcc80!important}.md-orange-200-bg{background-color:#ffcc80!important;color:rgba(0,0,0,.87)}.orange-200-fg{color:#ffcc80!important}.orange-200-border{border-color:#ffcc80!important}.orange-200-border-top{border-top-color:#ffcc80!important}.orange-200-border-right{border-right-color:#ffcc80!important}.orange-200-border-bottom{border-bottom-color:#ffcc80!important}.orange-200-border-left{border-left-color:#ffcc80!important}.orange-300-bg{background-color:#ffb74d!important}.md-orange-300-bg{background-color:#ffb74d!important;color:rgba(0,0,0,.87)}.orange-300-fg{color:#ffb74d!important}.orange-300-border{border-color:#ffb74d!important}.orange-300-border-top{border-top-color:#ffb74d!important}.orange-300-border-right{border-right-color:#ffb74d!important}.orange-300-border-bottom{border-bottom-color:#ffb74d!important}.orange-300-border-left{border-left-color:#ffb74d!important}.orange-400-bg{background-color:#ffa726!important}.md-orange-400-bg{background-color:#ffa726!important;color:rgba(0,0,0,.87)}.orange-400-fg{color:#ffa726!important}.orange-400-border{border-color:#ffa726!important}.orange-400-border-top{border-top-color:#ffa726!important}.orange-400-border-right{border-right-color:#ffa726!important}.orange-400-border-bottom{border-bottom-color:#ffa726!important}.orange-400-border-left{border-left-color:#ffa726!important}.orange-500-bg{background-color:#ff9800!important}.md-orange-500-bg{background-color:#ff9800!important;color:rgba(0,0,0,.87)}.orange-500-fg{color:#ff9800!important}.orange-500-border{border-color:#ff9800!important}.orange-500-border-top{border-top-color:#ff9800!important}.orange-500-border-right{border-right-color:#ff9800!important}.orange-500-border-bottom{border-bottom-color:#ff9800!important}.orange-500-border-left{border-left-color:#ff9800!important}.md-orange-bg{background-color:#ff9800!important;color:rgba(0,0,0,.87)}.orange-bg{background-color:#ff9800!important}.orange-fg{color:#ff9800!important}.orange-border{border-color:#ff9800!important}.orange-border-top{border-top-color:#ff9800!important}.orange-border-right{border-right-color:#ff9800!important}.orange-border-bottom{border-bottom-color:#ff9800!important}.orange-border-left{border-left-color:#ff9800!important}.orange-600-bg{background-color:#fb8c00!important}.md-orange-600-bg{background-color:#fb8c00!important;color:rgba(0,0,0,.87)}.orange-600-fg{color:#fb8c00!important}.orange-600-border{border-color:#fb8c00!important}.orange-600-border-top{border-top-color:#fb8c00!important}.orange-600-border-right{border-right-color:#fb8c00!important}.orange-600-border-bottom{border-bottom-color:#fb8c00!important}.orange-600-border-left{border-left-color:#fb8c00!important}.orange-700-bg{background-color:#f57c00!important}.md-orange-700-bg{background-color:#f57c00!important;color:rgba(0,0,0,.87)}.orange-700-fg{color:#f57c00!important}.orange-700-border{border-color:#f57c00!important}.orange-700-border-top{border-top-color:#f57c00!important}.orange-700-border-right{border-right-color:#f57c00!important}.orange-700-border-bottom{border-bottom-color:#f57c00!important}.orange-700-border-left{border-left-color:#f57c00!important}.orange-800-bg{background-color:#ef6c00!important}.md-orange-800-bg{background-color:#ef6c00!important;color:#fff}.orange-800-fg{color:#ef6c00!important}.orange-800-border{border-color:#ef6c00!important}.orange-800-border-top{border-top-color:#ef6c00!important}.orange-800-border-right{border-right-color:#ef6c00!important}.orange-800-border-bottom{border-bottom-color:#ef6c00!important}.orange-800-border-left{border-left-color:#ef6c00!important}.orange-900-bg{background-color:#e65100!important}.md-orange-900-bg{background-color:#e65100!important;color:#fff}.orange-900-fg{color:#e65100!important}.orange-900-border{border-color:#e65100!important}.orange-900-border-top{border-top-color:#e65100!important}.orange-900-border-right{border-right-color:#e65100!important}.orange-900-border-bottom{border-bottom-color:#e65100!important}.orange-900-border-left{border-left-color:#e65100!important}.orange-A100-bg{background-color:#ffd180!important}.md-orange-A100-bg{background-color:#ffd180!important;color:rgba(0,0,0,.87)}.orange-A100-fg{color:#ffd180!important}.orange-A100-border{border-color:#ffd180!important}.orange-A100-border-top{border-top-color:#ffd180!important}.orange-A100-border-right{border-right-color:#ffd180!important}.orange-A100-border-bottom{border-bottom-color:#ffd180!important}.orange-A100-border-left{border-left-color:#ffd180!important}.orange-A200-bg{background-color:#ffab40!important}.md-orange-A200-bg{background-color:#ffab40!important;color:rgba(0,0,0,.87)}.orange-A200-fg{color:#ffab40!important}.orange-A200-border{border-color:#ffab40!important}.orange-A200-border-top{border-top-color:#ffab40!important}.orange-A200-border-right{border-right-color:#ffab40!important}.orange-A200-border-bottom{border-bottom-color:#ffab40!important}.orange-A200-border-left{border-left-color:#ffab40!important}.orange-A400-bg{background-color:#ff9100!important}.md-orange-A400-bg{background-color:#ff9100!important;color:rgba(0,0,0,.87)}.orange-A400-fg{color:#ff9100!important}.orange-A400-border{border-color:#ff9100!important}.orange-A400-border-top{border-top-color:#ff9100!important}.orange-A400-border-right{border-right-color:#ff9100!important}.orange-A400-border-bottom{border-bottom-color:#ff9100!important}.orange-A400-border-left{border-left-color:#ff9100!important}.orange-A700-bg{background-color:#ff6d00!important}.md-orange-A700-bg{background-color:#ff6d00!important;color:rgba(0,0,0,.87)}.orange-A700-fg{color:#ff6d00!important}.orange-A700-border{border-color:#ff6d00!important}.orange-A700-border-top{border-top-color:#ff6d00!important}.orange-A700-border-right{border-right-color:#ff6d00!important}.orange-A700-border-bottom{border-bottom-color:#ff6d00!important}.orange-A700-border-left{border-left-color:#ff6d00!important}.deep-orange-50-bg{background-color:#fbe9e7!important}.md-deep-orange-50-bg{background-color:#fbe9e7!important;color:rgba(0,0,0,.87)}.deep-orange-50-fg{color:#fbe9e7!important}.deep-orange-50-border{border-color:#fbe9e7!important}.deep-orange-50-border-top{border-top-color:#fbe9e7!important}.deep-orange-50-border-right{border-right-color:#fbe9e7!important}.deep-orange-50-border-bottom{border-bottom-color:#fbe9e7!important}.deep-orange-50-border-left{border-left-color:#fbe9e7!important}.deep-orange-100-bg{background-color:#ffccbc!important}.md-deep-orange-100-bg{background-color:#ffccbc!important;color:rgba(0,0,0,.87)}.deep-orange-100-fg{color:#ffccbc!important}.deep-orange-100-border{border-color:#ffccbc!important}.deep-orange-100-border-top{border-top-color:#ffccbc!important}.deep-orange-100-border-right{border-right-color:#ffccbc!important}.deep-orange-100-border-bottom{border-bottom-color:#ffccbc!important}.deep-orange-100-border-left{border-left-color:#ffccbc!important}.deep-orange-200-bg{background-color:#ffab91!important}.md-deep-orange-200-bg{background-color:#ffab91!important;color:rgba(0,0,0,.87)}.deep-orange-200-fg{color:#ffab91!important}.deep-orange-200-border{border-color:#ffab91!important}.deep-orange-200-border-top{border-top-color:#ffab91!important}.deep-orange-200-border-right{border-right-color:#ffab91!important}.deep-orange-200-border-bottom{border-bottom-color:#ffab91!important}.deep-orange-200-border-left{border-left-color:#ffab91!important}.deep-orange-300-bg{background-color:#ff8a65!important}.md-deep-orange-300-bg{background-color:#ff8a65!important;color:rgba(0,0,0,.87)}.deep-orange-300-fg{color:#ff8a65!important}.deep-orange-300-border{border-color:#ff8a65!important}.deep-orange-300-border-top{border-top-color:#ff8a65!important}.deep-orange-300-border-right{border-right-color:#ff8a65!important}.deep-orange-300-border-bottom{border-bottom-color:#ff8a65!important}.deep-orange-300-border-left{border-left-color:#ff8a65!important}.deep-orange-400-bg{background-color:#ff7043!important}.md-deep-orange-400-bg{background-color:#ff7043!important;color:rgba(0,0,0,.87)}.deep-orange-400-fg{color:#ff7043!important}.deep-orange-400-border{border-color:#ff7043!important}.deep-orange-400-border-top{border-top-color:#ff7043!important}.deep-orange-400-border-right{border-right-color:#ff7043!important}.deep-orange-400-border-bottom{border-bottom-color:#ff7043!important}.deep-orange-400-border-left{border-left-color:#ff7043!important}.deep-orange-500-bg{background-color:#ff5722!important}.md-deep-orange-500-bg{background-color:#ff5722!important;color:#fff}.deep-orange-500-fg{color:#ff5722!important}.deep-orange-500-border{border-color:#ff5722!important}.deep-orange-500-border-top{border-top-color:#ff5722!important}.deep-orange-500-border-right{border-right-color:#ff5722!important}.deep-orange-500-border-bottom{border-bottom-color:#ff5722!important}.deep-orange-500-border-left{border-left-color:#ff5722!important}.md-deep-orange-bg{background-color:#ff5722!important;color:#fff}.deep-orange-bg{background-color:#ff5722!important}.deep-orange-fg{color:#ff5722!important}.deep-orange-border{border-color:#ff5722!important}.deep-orange-border-top{border-top-color:#ff5722!important}.deep-orange-border-right{border-right-color:#ff5722!important}.deep-orange-border-bottom{border-bottom-color:#ff5722!important}.deep-orange-border-left{border-left-color:#ff5722!important}.deep-orange-600-bg{background-color:#f4511e!important}.md-deep-orange-600-bg{background-color:#f4511e!important;color:#fff}.deep-orange-600-fg{color:#f4511e!important}.deep-orange-600-border{border-color:#f4511e!important}.deep-orange-600-border-top{border-top-color:#f4511e!important}.deep-orange-600-border-right{border-right-color:#f4511e!important}.deep-orange-600-border-bottom{border-bottom-color:#f4511e!important}.deep-orange-600-border-left{border-left-color:#f4511e!important}.deep-orange-700-bg{background-color:#e64a19!important}.md-deep-orange-700-bg{background-color:#e64a19!important;color:#fff}.deep-orange-700-fg{color:#e64a19!important}.deep-orange-700-border{border-color:#e64a19!important}.deep-orange-700-border-top{border-top-color:#e64a19!important}.deep-orange-700-border-right{border-right-color:#e64a19!important}.deep-orange-700-border-bottom{border-bottom-color:#e64a19!important}.deep-orange-700-border-left{border-left-color:#e64a19!important}.deep-orange-800-bg{background-color:#d84315!important}.md-deep-orange-800-bg{background-color:#d84315!important;color:#fff}.deep-orange-800-fg{color:#d84315!important}.deep-orange-800-border{border-color:#d84315!important}.deep-orange-800-border-top{border-top-color:#d84315!important}.deep-orange-800-border-right{border-right-color:#d84315!important}.deep-orange-800-border-bottom{border-bottom-color:#d84315!important}.deep-orange-800-border-left{border-left-color:#d84315!important}.deep-orange-900-bg{background-color:#bf360c!important}.md-deep-orange-900-bg{background-color:#bf360c!important;color:#fff}.deep-orange-900-fg{color:#bf360c!important}.deep-orange-900-border{border-color:#bf360c!important}.deep-orange-900-border-top{border-top-color:#bf360c!important}.deep-orange-900-border-right{border-right-color:#bf360c!important}.deep-orange-900-border-bottom{border-bottom-color:#bf360c!important}.deep-orange-900-border-left{border-left-color:#bf360c!important}.deep-orange-A100-bg{background-color:#ff9e80!important}.md-deep-orange-A100-bg{background-color:#ff9e80!important;color:rgba(0,0,0,.87)}.deep-orange-A100-fg{color:#ff9e80!important}.deep-orange-A100-border{border-color:#ff9e80!important}.deep-orange-A100-border-top{border-top-color:#ff9e80!important}.deep-orange-A100-border-right{border-right-color:#ff9e80!important}.deep-orange-A100-border-bottom{border-bottom-color:#ff9e80!important}.deep-orange-A100-border-left{border-left-color:#ff9e80!important}.deep-orange-A200-bg{background-color:#ff6e40!important}.md-deep-orange-A200-bg{background-color:#ff6e40!important;color:rgba(0,0,0,.87)}.deep-orange-A200-fg{color:#ff6e40!important}.deep-orange-A200-border{border-color:#ff6e40!important}.deep-orange-A200-border-top{border-top-color:#ff6e40!important}.deep-orange-A200-border-right{border-right-color:#ff6e40!important}.deep-orange-A200-border-bottom{border-bottom-color:#ff6e40!important}.deep-orange-A200-border-left{border-left-color:#ff6e40!important}.deep-orange-A400-bg{background-color:#ff3d00!important}.md-deep-orange-A400-bg{background-color:#ff3d00!important;color:#fff}.deep-orange-A400-fg{color:#ff3d00!important}.deep-orange-A400-border{border-color:#ff3d00!important}.deep-orange-A400-border-top{border-top-color:#ff3d00!important}.deep-orange-A400-border-right{border-right-color:#ff3d00!important}.deep-orange-A400-border-bottom{border-bottom-color:#ff3d00!important}.deep-orange-A400-border-left{border-left-color:#ff3d00!important}.deep-orange-A700-bg{background-color:#dd2c00!important}.md-deep-orange-A700-bg{background-color:#dd2c00!important;color:#fff}.deep-orange-A700-fg{color:#dd2c00!important}.deep-orange-A700-border{border-color:#dd2c00!important}.deep-orange-A700-border-top{border-top-color:#dd2c00!important}.deep-orange-A700-border-right{border-right-color:#dd2c00!important}.deep-orange-A700-border-bottom{border-bottom-color:#dd2c00!important}.deep-orange-A700-border-left{border-left-color:#dd2c00!important}.brown-50-bg{background-color:#efebe9!important}.md-brown-50-bg{background-color:#efebe9!important;color:rgba(0,0,0,.87)}.brown-50-fg{color:#efebe9!important}.brown-50-border{border-color:#efebe9!important}.brown-50-border-top{border-top-color:#efebe9!important}.brown-50-border-right{border-right-color:#efebe9!important}.brown-50-border-bottom{border-bottom-color:#efebe9!important}.brown-50-border-left{border-left-color:#efebe9!important}.brown-100-bg{background-color:#d7ccc8!important}.md-brown-100-bg{background-color:#d7ccc8!important;color:rgba(0,0,0,.87)}.brown-100-fg{color:#d7ccc8!important}.brown-100-border{border-color:#d7ccc8!important}.brown-100-border-top{border-top-color:#d7ccc8!important}.brown-100-border-right{border-right-color:#d7ccc8!important}.brown-100-border-bottom{border-bottom-color:#d7ccc8!important}.brown-100-border-left{border-left-color:#d7ccc8!important}.brown-200-bg{background-color:#bcaaa4!important}.md-brown-200-bg{background-color:#bcaaa4!important;color:rgba(0,0,0,.87)}.brown-200-fg{color:#bcaaa4!important}.brown-200-border{border-color:#bcaaa4!important}.brown-200-border-top{border-top-color:#bcaaa4!important}.brown-200-border-right{border-right-color:#bcaaa4!important}.brown-200-border-bottom{border-bottom-color:#bcaaa4!important}.brown-200-border-left{border-left-color:#bcaaa4!important}.brown-300-bg{background-color:#a1887f!important}.md-brown-300-bg{background-color:#a1887f!important;color:#fff}.brown-300-fg{color:#a1887f!important}.brown-300-border{border-color:#a1887f!important}.brown-300-border-top{border-top-color:#a1887f!important}.brown-300-border-right{border-right-color:#a1887f!important}.brown-300-border-bottom{border-bottom-color:#a1887f!important}.brown-300-border-left{border-left-color:#a1887f!important}.brown-400-bg{background-color:#8d6e63!important}.md-brown-400-bg{background-color:#8d6e63!important;color:#fff}.brown-400-fg{color:#8d6e63!important}.brown-400-border{border-color:#8d6e63!important}.brown-400-border-top{border-top-color:#8d6e63!important}.brown-400-border-right{border-right-color:#8d6e63!important}.brown-400-border-bottom{border-bottom-color:#8d6e63!important}.brown-400-border-left{border-left-color:#8d6e63!important}.brown-500-bg{background-color:#795548!important}.md-brown-500-bg{background-color:#795548!important;color:rgba(255,255,255,.87)}.brown-500-fg{color:#795548!important}.brown-500-border{border-color:#795548!important}.brown-500-border-top{border-top-color:#795548!important}.brown-500-border-right{border-right-color:#795548!important}.brown-500-border-bottom{border-bottom-color:#795548!important}.brown-500-border-left{border-left-color:#795548!important}.md-brown-bg{background-color:#795548!important;color:rgba(255,255,255,.87)}.brown-bg{background-color:#795548!important}.brown-fg{color:#795548!important}.brown-border{border-color:#795548!important}.brown-border-top{border-top-color:#795548!important}.brown-border-right{border-right-color:#795548!important}.brown-border-bottom{border-bottom-color:#795548!important}.brown-border-left{border-left-color:#795548!important}.brown-600-bg{background-color:#6d4c41!important}.md-brown-600-bg{background-color:#6d4c41!important;color:rgba(255,255,255,.87)}.brown-600-fg{color:#6d4c41!important}.brown-600-border{border-color:#6d4c41!important}.brown-600-border-top{border-top-color:#6d4c41!important}.brown-600-border-right{border-right-color:#6d4c41!important}.brown-600-border-bottom{border-bottom-color:#6d4c41!important}.brown-600-border-left{border-left-color:#6d4c41!important}.brown-700-bg{background-color:#5d4037!important}.md-brown-700-bg{background-color:#5d4037!important;color:rgba(255,255,255,.87)}.brown-700-fg{color:#5d4037!important}.brown-700-border{border-color:#5d4037!important}.brown-700-border-top{border-top-color:#5d4037!important}.brown-700-border-right{border-right-color:#5d4037!important}.brown-700-border-bottom{border-bottom-color:#5d4037!important}.brown-700-border-left{border-left-color:#5d4037!important}.brown-800-bg{background-color:#4e342e!important}.md-brown-800-bg{background-color:#4e342e!important;color:rgba(255,255,255,.87)}.brown-800-fg{color:#4e342e!important}.brown-800-border{border-color:#4e342e!important}.brown-800-border-top{border-top-color:#4e342e!important}.brown-800-border-right{border-right-color:#4e342e!important}.brown-800-border-bottom{border-bottom-color:#4e342e!important}.brown-800-border-left{border-left-color:#4e342e!important}.brown-900-bg{background-color:#3e2723!important}.md-brown-900-bg{background-color:#3e2723!important;color:rgba(255,255,255,.87)}.brown-900-fg{color:#3e2723!important}.brown-900-border{border-color:#3e2723!important}.brown-900-border-top{border-top-color:#3e2723!important}.brown-900-border-right{border-right-color:#3e2723!important}.brown-900-border-bottom{border-bottom-color:#3e2723!important}.brown-900-border-left{border-left-color:#3e2723!important}.brown-A100-bg{background-color:#d7ccc8!important}.md-brown-A100-bg{background-color:#d7ccc8!important;color:rgba(255,255,255,.87)}.brown-A100-fg{color:#d7ccc8!important}.brown-A100-border{border-color:#d7ccc8!important}.brown-A100-border-top{border-top-color:#d7ccc8!important}.brown-A100-border-right{border-right-color:#d7ccc8!important}.brown-A100-border-bottom{border-bottom-color:#d7ccc8!important}.brown-A100-border-left{border-left-color:#d7ccc8!important}.brown-A200-bg{background-color:#bcaaa4!important}.md-brown-A200-bg{background-color:#bcaaa4!important;color:rgba(255,255,255,.87)}.brown-A200-fg{color:#bcaaa4!important}.brown-A200-border{border-color:#bcaaa4!important}.brown-A200-border-top{border-top-color:#bcaaa4!important}.brown-A200-border-right{border-right-color:#bcaaa4!important}.brown-A200-border-bottom{border-bottom-color:#bcaaa4!important}.brown-A200-border-left{border-left-color:#bcaaa4!important}.brown-A400-bg{background-color:#8d6e63!important}.md-brown-A400-bg{background-color:#8d6e63!important;color:rgba(255,255,255,.87)}.brown-A400-fg{color:#8d6e63!important}.brown-A400-border{border-color:#8d6e63!important}.brown-A400-border-top{border-top-color:#8d6e63!important}.brown-A400-border-right{border-right-color:#8d6e63!important}.brown-A400-border-bottom{border-bottom-color:#8d6e63!important}.brown-A400-border-left{border-left-color:#8d6e63!important}.brown-A700-bg{background-color:#5d4037!important}.md-brown-A700-bg{background-color:#5d4037!important;color:rgba(255,255,255,.87)}.brown-A700-fg{color:#5d4037!important}.brown-A700-border{border-color:#5d4037!important}.brown-A700-border-top{border-top-color:#5d4037!important}.brown-A700-border-right{border-right-color:#5d4037!important}.brown-A700-border-bottom{border-bottom-color:#5d4037!important}.brown-A700-border-left{border-left-color:#5d4037!important}.grey-50-bg{background-color:#fafafa!important}.md-grey-50-bg{background-color:#fafafa!important;color:rgba(0,0,0,.87)}.grey-50-fg{color:#fafafa!important}.grey-50-border{border-color:#fafafa!important}.grey-50-border-top{border-top-color:#fafafa!important}.grey-50-border-right{border-right-color:#fafafa!important}.grey-50-border-bottom{border-bottom-color:#fafafa!important}.grey-50-border-left{border-left-color:#fafafa!important}.grey-100-bg{background-color:#f5f5f5!important}.md-grey-100-bg{background-color:#f5f5f5!important;color:rgba(0,0,0,.87)}.grey-100-fg{color:#f5f5f5!important}.grey-100-border{border-color:#f5f5f5!important}.grey-100-border-top{border-top-color:#f5f5f5!important}.grey-100-border-right{border-right-color:#f5f5f5!important}.grey-100-border-bottom{border-bottom-color:#f5f5f5!important}.grey-100-border-left{border-left-color:#f5f5f5!important}.grey-200-bg{background-color:#eee!important}.md-grey-200-bg{background-color:#eee!important;color:rgba(0,0,0,.87)}.grey-200-fg{color:#eee!important}.grey-200-border{border-color:#eee!important}.grey-200-border-top{border-top-color:#eee!important}.grey-200-border-right{border-right-color:#eee!important}.grey-200-border-bottom{border-bottom-color:#eee!important}.grey-200-border-left{border-left-color:#eee!important}.grey-300-bg{background-color:#e0e0e0!important}.md-grey-300-bg{background-color:#e0e0e0!important;color:rgba(0,0,0,.87)}.grey-300-fg{color:#e0e0e0!important}.grey-300-border{border-color:#e0e0e0!important}.grey-300-border-top{border-top-color:#e0e0e0!important}.grey-300-border-right{border-right-color:#e0e0e0!important}.grey-300-border-bottom{border-bottom-color:#e0e0e0!important}.grey-300-border-left{border-left-color:#e0e0e0!important}.grey-400-bg{background-color:#bdbdbd!important}.md-grey-400-bg{background-color:#bdbdbd!important;color:rgba(0,0,0,.87)}.grey-400-fg{color:#bdbdbd!important}.grey-400-border{border-color:#bdbdbd!important}.grey-400-border-top{border-top-color:#bdbdbd!important}.grey-400-border-right{border-right-color:#bdbdbd!important}.grey-400-border-bottom{border-bottom-color:#bdbdbd!important}.grey-400-border-left{border-left-color:#bdbdbd!important}.grey-500-bg{background-color:#9e9e9e!important}.md-grey-500-bg{background-color:#9e9e9e!important;color:rgba(0,0,0,.87)}.grey-500-fg{color:#9e9e9e!important}.grey-500-border{border-color:#9e9e9e!important}.grey-500-border-top{border-top-color:#9e9e9e!important}.grey-500-border-right{border-right-color:#9e9e9e!important}.grey-500-border-bottom{border-bottom-color:#9e9e9e!important}.grey-500-border-left{border-left-color:#9e9e9e!important}.md-grey-bg{background-color:#9e9e9e!important;color:rgba(0,0,0,.87)}.grey-bg{background-color:#9e9e9e!important}.grey-fg{color:#9e9e9e!important}.grey-border{border-color:#9e9e9e!important}.grey-border-top{border-top-color:#9e9e9e!important}.grey-border-right{border-right-color:#9e9e9e!important}.grey-border-bottom{border-bottom-color:#9e9e9e!important}.grey-border-left{border-left-color:#9e9e9e!important}.grey-600-bg{background-color:#757575!important}.md-grey-600-bg{background-color:#757575!important;color:rgba(255,255,255,.87)}.grey-600-fg{color:#757575!important}.grey-600-border{border-color:#757575!important}.grey-600-border-top{border-top-color:#757575!important}.grey-600-border-right{border-right-color:#757575!important}.grey-600-border-bottom{border-bottom-color:#757575!important}.grey-600-border-left{border-left-color:#757575!important}.grey-700-bg{background-color:#616161!important}.md-grey-700-bg{background-color:#616161!important;color:rgba(255,255,255,.87)}.grey-700-fg{color:#616161!important}.grey-700-border{border-color:#616161!important}.grey-700-border-top{border-top-color:#616161!important}.grey-700-border-right{border-right-color:#616161!important}.grey-700-border-bottom{border-bottom-color:#616161!important}.grey-700-border-left{border-left-color:#616161!important}.grey-800-bg{background-color:#424242!important}.md-grey-800-bg{background-color:#424242!important;color:rgba(255,255,255,.87)}.grey-800-fg{color:#424242!important}.grey-800-border{border-color:#424242!important}.grey-800-border-top{border-top-color:#424242!important}.grey-800-border-right{border-right-color:#424242!important}.grey-800-border-bottom{border-bottom-color:#424242!important}.grey-800-border-left{border-left-color:#424242!important}.grey-900-bg{background-color:#212121!important}.md-grey-900-bg{background-color:#212121!important;color:rgba(255,255,255,.87)}.grey-900-fg{color:#212121!important}.grey-900-border{border-color:#212121!important}.grey-900-border-top{border-top-color:#212121!important}.grey-900-border-right{border-right-color:#212121!important}.grey-900-border-bottom{border-bottom-color:#212121!important}.grey-900-border-left{border-left-color:#212121!important}.grey-1000-bg{background-color:#000!important}.md-grey-1000-bg{background-color:#000!important}.grey-1000-fg{color:#000!important}.grey-1000-border{border-color:#000!important}.grey-1000-border-top{border-top-color:#000!important}.grey-1000-border-right{border-right-color:#000!important}.grey-1000-border-bottom{border-bottom-color:#000!important}.grey-1000-border-left{border-left-color:#000!important}.grey-A100-bg{background-color:#fff!important}.md-grey-A100-bg{background-color:#fff!important;color:rgba(0,0,0,.87)}.grey-A100-fg{color:#fff!important}.grey-A100-border{border-color:#fff!important}.grey-A100-border-top{border-top-color:#fff!important}.grey-A100-border-right{border-right-color:#fff!important}.grey-A100-border-bottom{border-bottom-color:#fff!important}.grey-A100-border-left{border-left-color:#fff!important}.grey-A200-bg{background-color:#eee!important}.md-grey-A200-bg{background-color:#eee!important;color:rgba(0,0,0,.87)}.grey-A200-fg{color:#eee!important}.grey-A200-border{border-color:#eee!important}.grey-A200-border-top{border-top-color:#eee!important}.grey-A200-border-right{border-right-color:#eee!important}.grey-A200-border-bottom{border-bottom-color:#eee!important}.grey-A200-border-left{border-left-color:#eee!important}.grey-A400-bg{background-color:#bdbdbd!important}.md-grey-A400-bg{background-color:#bdbdbd!important;color:rgba(0,0,0,.87)}.grey-A400-fg{color:#bdbdbd!important}.grey-A400-border{border-color:#bdbdbd!important}.grey-A400-border-top{border-top-color:#bdbdbd!important}.grey-A400-border-right{border-right-color:#bdbdbd!important}.grey-A400-border-bottom{border-bottom-color:#bdbdbd!important}.grey-A400-border-left{border-left-color:#bdbdbd!important}.grey-A700-bg{background-color:#616161!important}.md-grey-A700-bg{background-color:#616161!important;color:rgba(0,0,0,.87)}.grey-A700-fg{color:#616161!important}.grey-A700-border{border-color:#616161!important}.grey-A700-border-top{border-top-color:#616161!important}.grey-A700-border-right{border-right-color:#616161!important}.grey-A700-border-bottom{border-bottom-color:#616161!important}.grey-A700-border-left{border-left-color:#616161!important}.blue-grey-50-bg{background-color:#eceff1!important}.md-blue-grey-50-bg{background-color:#eceff1!important;color:rgba(0,0,0,.87)}.blue-grey-50-fg{color:#eceff1!important}.blue-grey-50-border{border-color:#eceff1!important}.blue-grey-50-border-top{border-top-color:#eceff1!important}.blue-grey-50-border-right{border-right-color:#eceff1!important}.blue-grey-50-border-bottom{border-bottom-color:#eceff1!important}.blue-grey-50-border-left{border-left-color:#eceff1!important}.blue-grey-100-bg{background-color:#cfd8dc!important}.md-blue-grey-100-bg{background-color:#cfd8dc!important;color:rgba(0,0,0,.87)}.blue-grey-100-fg{color:#cfd8dc!important}.blue-grey-100-border{border-color:#cfd8dc!important}.blue-grey-100-border-top{border-top-color:#cfd8dc!important}.blue-grey-100-border-right{border-right-color:#cfd8dc!important}.blue-grey-100-border-bottom{border-bottom-color:#cfd8dc!important}.blue-grey-100-border-left{border-left-color:#cfd8dc!important}.blue-grey-200-bg{background-color:#b0bec5!important}.md-blue-grey-200-bg{background-color:#b0bec5!important;color:rgba(0,0,0,.87)}.blue-grey-200-fg{color:#b0bec5!important}.blue-grey-200-border{border-color:#b0bec5!important}.blue-grey-200-border-top{border-top-color:#b0bec5!important}.blue-grey-200-border-right{border-right-color:#b0bec5!important}.blue-grey-200-border-bottom{border-bottom-color:#b0bec5!important}.blue-grey-200-border-left{border-left-color:#b0bec5!important}.blue-grey-300-bg{background-color:#90a4ae!important}.md-blue-grey-300-bg{background-color:#90a4ae!important;color:rgba(0,0,0,.87)}.blue-grey-300-fg{color:#90a4ae!important}.blue-grey-300-border{border-color:#90a4ae!important}.blue-grey-300-border-top{border-top-color:#90a4ae!important}.blue-grey-300-border-right{border-right-color:#90a4ae!important}.blue-grey-300-border-bottom{border-bottom-color:#90a4ae!important}.blue-grey-300-border-left{border-left-color:#90a4ae!important}.blue-grey-400-bg{background-color:#78909c!important}.md-blue-grey-400-bg{background-color:#78909c!important;color:#fff}.blue-grey-400-fg{color:#78909c!important}.blue-grey-400-border{border-color:#78909c!important}.blue-grey-400-border-top{border-top-color:#78909c!important}.blue-grey-400-border-right{border-right-color:#78909c!important}.blue-grey-400-border-bottom{border-bottom-color:#78909c!important}.blue-grey-400-border-left{border-left-color:#78909c!important}.blue-grey-500-bg{background-color:#607d8b!important}.md-blue-grey-500-bg{background-color:#607d8b!important;color:#fff}.blue-grey-500-fg{color:#607d8b!important}.blue-grey-500-border{border-color:#607d8b!important}.blue-grey-500-border-top{border-top-color:#607d8b!important}.blue-grey-500-border-right{border-right-color:#607d8b!important}.blue-grey-500-border-bottom{border-bottom-color:#607d8b!important}.blue-grey-500-border-left{border-left-color:#607d8b!important}.md-blue-grey-bg{background-color:#607d8b!important;color:#fff}.blue-grey-bg{background-color:#607d8b!important}.blue-grey-fg{color:#607d8b!important}.blue-grey-border{border-color:#607d8b!important}.blue-grey-border-top{border-top-color:#607d8b!important}.blue-grey-border-right{border-right-color:#607d8b!important}.blue-grey-border-bottom{border-bottom-color:#607d8b!important}.blue-grey-border-left{border-left-color:#607d8b!important}.blue-grey-600-bg{background-color:#546e7a!important}.md-blue-grey-600-bg{background-color:#546e7a!important;color:rgba(255,255,255,.87)}.blue-grey-600-fg{color:#546e7a!important}.blue-grey-600-border{border-color:#546e7a!important}.blue-grey-600-border-top{border-top-color:#546e7a!important}.blue-grey-600-border-right{border-right-color:#546e7a!important}.blue-grey-600-border-bottom{border-bottom-color:#546e7a!important}.blue-grey-600-border-left{border-left-color:#546e7a!important}.blue-grey-700-bg{background-color:#455a64!important}.md-blue-grey-700-bg{background-color:#455a64!important;color:rgba(255,255,255,.87)}.blue-grey-700-fg{color:#455a64!important}.blue-grey-700-border{border-color:#455a64!important}.blue-grey-700-border-top{border-top-color:#455a64!important}.blue-grey-700-border-right{border-right-color:#455a64!important}.blue-grey-700-border-bottom{border-bottom-color:#455a64!important}.blue-grey-700-border-left{border-left-color:#455a64!important}.blue-grey-800-bg{background-color:#37474f!important}.md-blue-grey-800-bg{background-color:#37474f!important;color:rgba(255,255,255,.87)}.blue-grey-800-fg{color:#37474f!important}.blue-grey-800-border{border-color:#37474f!important}.blue-grey-800-border-top{border-top-color:#37474f!important}.blue-grey-800-border-right{border-right-color:#37474f!important}.blue-grey-800-border-bottom{border-bottom-color:#37474f!important}.blue-grey-800-border-left{border-left-color:#37474f!important}.blue-grey-900-bg{background-color:#263238!important}.md-blue-grey-900-bg{background-color:#263238!important;color:rgba(255,255,255,.87)}.blue-grey-900-fg{color:#263238!important}.blue-grey-900-border{border-color:#263238!important}.blue-grey-900-border-top{border-top-color:#263238!important}.blue-grey-900-border-right{border-right-color:#263238!important}.blue-grey-900-border-bottom{border-bottom-color:#263238!important}.blue-grey-900-border-left{border-left-color:#263238!important}.blue-grey-A100-bg{background-color:#cfd8dc!important}.md-blue-grey-A100-bg{background-color:#cfd8dc!important;color:rgba(255,255,255,.87)}.blue-grey-A100-fg{color:#cfd8dc!important}.blue-grey-A100-border{border-color:#cfd8dc!important}.blue-grey-A100-border-top{border-top-color:#cfd8dc!important}.blue-grey-A100-border-right{border-right-color:#cfd8dc!important}.blue-grey-A100-border-bottom{border-bottom-color:#cfd8dc!important}.blue-grey-A100-border-left{border-left-color:#cfd8dc!important}.blue-grey-A200-bg{background-color:#b0bec5!important}.md-blue-grey-A200-bg{background-color:#b0bec5!important;color:rgba(255,255,255,.87)}.blue-grey-A200-fg{color:#b0bec5!important}.blue-grey-A200-border{border-color:#b0bec5!important}.blue-grey-A200-border-top{border-top-color:#b0bec5!important}.blue-grey-A200-border-right{border-right-color:#b0bec5!important}.blue-grey-A200-border-bottom{border-bottom-color:#b0bec5!important}.blue-grey-A200-border-left{border-left-color:#b0bec5!important}.blue-grey-A400-bg{background-color:#78909c!important}.md-blue-grey-A400-bg{background-color:#78909c!important;color:rgba(255,255,255,.87)}.blue-grey-A400-fg{color:#78909c!important}.blue-grey-A400-border{border-color:#78909c!important}.blue-grey-A400-border-top{border-top-color:#78909c!important}.blue-grey-A400-border-right{border-right-color:#78909c!important}.blue-grey-A400-border-bottom{border-bottom-color:#78909c!important}.blue-grey-A400-border-left{border-left-color:#78909c!important}.blue-grey-A700-bg{background-color:#455a64!important}.md-blue-grey-A700-bg{background-color:#455a64!important;color:rgba(255,255,255,.87)}.blue-grey-A700-fg{color:#455a64!important}.blue-grey-A700-border{border-color:#455a64!important}.blue-grey-A700-border-top{border-top-color:#455a64!important}.blue-grey-A700-border-right{border-right-color:#455a64!important}.blue-grey-A700-border-bottom{border-bottom-color:#455a64!important}.blue-grey-A700-border-left{border-left-color:#455a64!important}.white-500-bg{background-color:#fff!important}.md-white-500-bg{background-color:#fff!important;color:rgba(0,0,0,.87)}.white-500-fg{color:#fff!important}.white-500-border{border-color:#fff!important}.white-500-border-top{border-top-color:#fff!important}.white-500-border-right{border-right-color:#fff!important}.white-500-border-bottom{border-bottom-color:#fff!important}.white-500-border-left{border-left-color:#fff!important}.md-white-bg{background-color:#fff!important;color:rgba(0,0,0,.87)}.white-bg{background-color:#fff!important}.white-fg{color:#fff!important}.white-border{border-color:#fff!important}.white-border-top{border-top-color:#fff!important}.white-border-right{border-right-color:#fff!important}.white-border-bottom{border-bottom-color:#fff!important}.white-border-left{border-left-color:#fff!important}.black-500-bg{background-color:#000!important}.md-black-500-bg{background-color:#000!important;color:rgba(255,255,255,.87)}.black-500-fg{color:#000!important}.black-500-border{border-color:#000!important}.black-500-border-top{border-top-color:#000!important}.black-500-border-right{border-right-color:#000!important}.black-500-border-bottom{border-bottom-color:#000!important}.black-500-border-left{border-left-color:#000!important}.md-black-bg{background-color:#000!important;color:rgba(255,255,255,.87)}.black-bg{background-color:#000!important}.black-fg{color:#000!important}.black-border{border-color:#000!important}.black-border-top{border-top-color:#000!important}.black-border-right{border-right-color:#000!important}.black-border-bottom{border-bottom-color:#000!important}.black-border-left{border-left-color:#000!important}i,md-icon[md-font-icon]{font-size:24px;width:24px;height:24px;min-width:24px;min-height:24px;line-height:24px}i.s4,md-icon[md-font-icon].s4{font-size:4px!important;width:4px!important;height:4px!important;min-width:4px!important;min-height:4px!important;line-height:4px!important}i.s6,md-icon[md-font-icon].s6{font-size:6px!important;width:6px!important;height:6px!important;min-width:6px!important;min-height:6px!important;line-height:6px!important}i.s8,md-icon[md-font-icon].s8{font-size:8px!important;width:8px!important;height:8px!important;min-width:8px!important;min-height:8px!important;line-height:8px!important}i.s10,md-icon[md-font-icon].s10{font-size:10px!important;width:10px!important;height:10px!important;min-width:10px!important;min-height:10px!important;line-height:10px!important}i.s12,md-icon[md-font-icon].s12{font-size:12px!important;width:12px!important;height:12px!important;min-width:12px!important;min-height:12px!important;line-height:12px!important}i.s14,md-icon[md-font-icon].s14{font-size:14px!important;width:14px!important;height:14px!important;min-width:14px!important;min-height:14px!important;line-height:14px!important}i.s16,md-icon[md-font-icon].s16{font-size:16px!important;width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;line-height:16px!important}i.s18,md-icon[md-font-icon].s18{font-size:18px!important;width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;line-height:18px!important}i.s20,md-icon[md-font-icon].s20{font-size:20px!important;width:20px!important;height:20px!important;min-width:20px!important;min-height:20px!important;line-height:20px!important}i.s22,md-icon[md-font-icon].s22{font-size:22px!important;width:22px!important;height:22px!important;min-width:22px!important;min-height:22px!important;line-height:22px!important}i.s24,md-icon[md-font-icon].s24{font-size:24px!important;width:24px!important;height:24px!important;min-width:24px!important;min-height:24px!important;line-height:24px!important}i.s26,md-icon[md-font-icon].s26{font-size:26px!important;width:26px!important;height:26px!important;min-width:26px!important;min-height:26px!important;line-height:26px!important}i.s28,md-icon[md-font-icon].s28{font-size:28px!important;width:28px!important;height:28px!important;min-width:28px!important;min-height:28px!important;line-height:28px!important}i.s30,md-icon[md-font-icon].s30{font-size:30px!important;width:30px!important;height:30px!important;min-width:30px!important;min-height:30px!important;line-height:30px!important}i.s32,md-icon[md-font-icon].s32{font-size:32px!important;width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important;line-height:32px!important}i.s34,md-icon[md-font-icon].s34{font-size:34px!important;width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;line-height:34px!important}i.s36,md-icon[md-font-icon].s36{font-size:36px!important;width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important;line-height:36px!important}i.s38,md-icon[md-font-icon].s38{font-size:38px!important;width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important;line-height:38px!important}i.s40,md-icon[md-font-icon].s40{font-size:40px!important;width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;line-height:40px!important}i.s42,md-icon[md-font-icon].s42{font-size:42px!important;width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important;line-height:42px!important}i.s44,md-icon[md-font-icon].s44{font-size:44px!important;width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;line-height:44px!important}i.s46,md-icon[md-font-icon].s46{font-size:46px!important;width:46px!important;height:46px!important;min-width:46px!important;min-height:46px!important;line-height:46px!important}i.s48,md-icon[md-font-icon].s48{font-size:48px!important;width:48px!important;height:48px!important;min-width:48px!important;min-height:48px!important;line-height:48px!important}i.s50,md-icon[md-font-icon].s50{font-size:50px!important;width:50px!important;height:50px!important;min-width:50px!important;min-height:50px!important;line-height:50px!important}i.s52,md-icon[md-font-icon].s52{font-size:52px!important;width:52px!important;height:52px!important;min-width:52px!important;min-height:52px!important;line-height:52px!important}i.s54,md-icon[md-font-icon].s54{font-size:54px!important;width:54px!important;height:54px!important;min-width:54px!important;min-height:54px!important;line-height:54px!important}i.s56,md-icon[md-font-icon].s56{font-size:56px!important;width:56px!important;height:56px!important;min-width:56px!important;min-height:56px!important;line-height:56px!important}i.s58,md-icon[md-font-icon].s58{font-size:58px!important;width:58px!important;height:58px!important;min-width:58px!important;min-height:58px!important;line-height:58px!important}i.s60,md-icon[md-font-icon].s60{font-size:60px!important;width:60px!important;height:60px!important;min-width:60px!important;min-height:60px!important;line-height:60px!important}i.s62,md-icon[md-font-icon].s62{font-size:62px!important;width:62px!important;height:62px!important;min-width:62px!important;min-height:62px!important;line-height:62px!important}i.s64,md-icon[md-font-icon].s64{font-size:64px!important;width:64px!important;height:64px!important;min-width:64px!important;min-height:64px!important;line-height:64px!important}i.s66,md-icon[md-font-icon].s66{font-size:66px!important;width:66px!important;height:66px!important;min-width:66px!important;min-height:66px!important;line-height:66px!important}i.s68,md-icon[md-font-icon].s68{font-size:68px!important;width:68px!important;height:68px!important;min-width:68px!important;min-height:68px!important;line-height:68px!important}i.s70,md-icon[md-font-icon].s70{font-size:70px!important;width:70px!important;height:70px!important;min-width:70px!important;min-height:70px!important;line-height:70px!important}i.s72,md-icon[md-font-icon].s72{font-size:72px!important;width:72px!important;height:72px!important;min-width:72px!important;min-height:72px!important;line-height:72px!important}i.s74,md-icon[md-font-icon].s74{font-size:74px!important;width:74px!important;height:74px!important;min-width:74px!important;min-height:74px!important;line-height:74px!important}i.s76,md-icon[md-font-icon].s76{font-size:76px!important;width:76px!important;height:76px!important;min-width:76px!important;min-height:76px!important;line-height:76px!important}i.s78,md-icon[md-font-icon].s78{font-size:78px!important;width:78px!important;height:78px!important;min-width:78px!important;min-height:78px!important;line-height:78px!important}i.s80,md-icon[md-font-icon].s80{font-size:80px!important;width:80px!important;height:80px!important;min-width:80px!important;min-height:80px!important;line-height:80px!important}i.s82,md-icon[md-font-icon].s82{font-size:82px!important;width:82px!important;height:82px!important;min-width:82px!important;min-height:82px!important;line-height:82px!important}i.s84,md-icon[md-font-icon].s84{font-size:84px!important;width:84px!important;height:84px!important;min-width:84px!important;min-height:84px!important;line-height:84px!important}i.s86,md-icon[md-font-icon].s86{font-size:86px!important;width:86px!important;height:86px!important;min-width:86px!important;min-height:86px!important;line-height:86px!important}i.s88,md-icon[md-font-icon].s88{font-size:88px!important;width:88px!important;height:88px!important;min-width:88px!important;min-height:88px!important;line-height:88px!important}i.s90,md-icon[md-font-icon].s90{font-size:90px!important;width:90px!important;height:90px!important;min-width:90px!important;min-height:90px!important;line-height:90px!important}i.s92,md-icon[md-font-icon].s92{font-size:92px!important;width:92px!important;height:92px!important;min-width:92px!important;min-height:92px!important;line-height:92px!important}i.s94,md-icon[md-font-icon].s94{font-size:94px!important;width:94px!important;height:94px!important;min-width:94px!important;min-height:94px!important;line-height:94px!important}i.s96,md-icon[md-font-icon].s96{font-size:96px!important;width:96px!important;height:96px!important;min-width:96px!important;min-height:96px!important;line-height:96px!important}i.s98,md-icon[md-font-icon].s98{font-size:98px!important;width:98px!important;height:98px!important;min-width:98px!important;min-height:98px!important;line-height:98px!important}i.s100,md-icon[md-font-icon].s100{font-size:100px!important;width:100px!important;height:100px!important;min-width:100px!important;min-height:100px!important;line-height:100px!important}i.s102,md-icon[md-font-icon].s102{font-size:102px!important;width:102px!important;height:102px!important;min-width:102px!important;min-height:102px!important;line-height:102px!important}i.s104,md-icon[md-font-icon].s104{font-size:104px!important;width:104px!important;height:104px!important;min-width:104px!important;min-height:104px!important;line-height:104px!important}i.s106,md-icon[md-font-icon].s106{font-size:106px!important;width:106px!important;height:106px!important;min-width:106px!important;min-height:106px!important;line-height:106px!important}i.s108,md-icon[md-font-icon].s108{font-size:108px!important;width:108px!important;height:108px!important;min-width:108px!important;min-height:108px!important;line-height:108px!important}i.s110,md-icon[md-font-icon].s110{font-size:110px!important;width:110px!important;height:110px!important;min-width:110px!important;min-height:110px!important;line-height:110px!important}i.s112,md-icon[md-font-icon].s112{font-size:112px!important;width:112px!important;height:112px!important;min-width:112px!important;min-height:112px!important;line-height:112px!important}i.s114,md-icon[md-font-icon].s114{font-size:114px!important;width:114px!important;height:114px!important;min-width:114px!important;min-height:114px!important;line-height:114px!important}i.s116,md-icon[md-font-icon].s116{font-size:116px!important;width:116px!important;height:116px!important;min-width:116px!important;min-height:116px!important;line-height:116px!important}i.s118,md-icon[md-font-icon].s118{font-size:118px!important;width:118px!important;height:118px!important;min-width:118px!important;min-height:118px!important;line-height:118px!important}i.s120,md-icon[md-font-icon].s120{font-size:120px!important;width:120px!important;height:120px!important;min-width:120px!important;min-height:120px!important;line-height:120px!important}i.s122,md-icon[md-font-icon].s122{font-size:122px!important;width:122px!important;height:122px!important;min-width:122px!important;min-height:122px!important;line-height:122px!important}i.s124,md-icon[md-font-icon].s124{font-size:124px!important;width:124px!important;height:124px!important;min-width:124px!important;min-height:124px!important;line-height:124px!important}i.s126,md-icon[md-font-icon].s126{font-size:126px!important;width:126px!important;height:126px!important;min-width:126px!important;min-height:126px!important;line-height:126px!important}i.s128,md-icon[md-font-icon].s128{font-size:128px!important;width:128px!important;height:128px!important;min-width:128px!important;min-height:128px!important;line-height:128px!important}i.s130,md-icon[md-font-icon].s130{font-size:130px!important;width:130px!important;height:130px!important;min-width:130px!important;min-height:130px!important;line-height:130px!important}i.s132,md-icon[md-font-icon].s132{font-size:132px!important;width:132px!important;height:132px!important;min-width:132px!important;min-height:132px!important;line-height:132px!important}i.s134,md-icon[md-font-icon].s134{font-size:134px!important;width:134px!important;height:134px!important;min-width:134px!important;min-height:134px!important;line-height:134px!important}i.s136,md-icon[md-font-icon].s136{font-size:136px!important;width:136px!important;height:136px!important;min-width:136px!important;min-height:136px!important;line-height:136px!important}i.s138,md-icon[md-font-icon].s138{font-size:138px!important;width:138px!important;height:138px!important;min-width:138px!important;min-height:138px!important;line-height:138px!important}i.s140,md-icon[md-font-icon].s140{font-size:140px!important;width:140px!important;height:140px!important;min-width:140px!important;min-height:140px!important;line-height:140px!important}i.s142,md-icon[md-font-icon].s142{font-size:142px!important;width:142px!important;height:142px!important;min-width:142px!important;min-height:142px!important;line-height:142px!important}i.s144,md-icon[md-font-icon].s144{font-size:144px!important;width:144px!important;height:144px!important;min-width:144px!important;min-height:144px!important;line-height:144px!important}i.s146,md-icon[md-font-icon].s146{font-size:146px!important;width:146px!important;height:146px!important;min-width:146px!important;min-height:146px!important;line-height:146px!important}i.s148,md-icon[md-font-icon].s148{font-size:148px!important;width:148px!important;height:148px!important;min-width:148px!important;min-height:148px!important;line-height:148px!important}i.s150,md-icon[md-font-icon].s150{font-size:150px!important;width:150px!important;height:150px!important;min-width:150px!important;min-height:150px!important;line-height:150px!important}i.s152,md-icon[md-font-icon].s152{font-size:152px!important;width:152px!important;height:152px!important;min-width:152px!important;min-height:152px!important;line-height:152px!important}i.s154,md-icon[md-font-icon].s154{font-size:154px!important;width:154px!important;height:154px!important;min-width:154px!important;min-height:154px!important;line-height:154px!important}i.s156,md-icon[md-font-icon].s156{font-size:156px!important;width:156px!important;height:156px!important;min-width:156px!important;min-height:156px!important;line-height:156px!important}i.s158,md-icon[md-font-icon].s158{font-size:158px!important;width:158px!important;height:158px!important;min-width:158px!important;min-height:158px!important;line-height:158px!important}i.s160,md-icon[md-font-icon].s160{font-size:160px!important;width:160px!important;height:160px!important;min-width:160px!important;min-height:160px!important;line-height:160px!important}i.s162,md-icon[md-font-icon].s162{font-size:162px!important;width:162px!important;height:162px!important;min-width:162px!important;min-height:162px!important;line-height:162px!important}i.s164,md-icon[md-font-icon].s164{font-size:164px!important;width:164px!important;height:164px!important;min-width:164px!important;min-height:164px!important;line-height:164px!important}i.s166,md-icon[md-font-icon].s166{font-size:166px!important;width:166px!important;height:166px!important;min-width:166px!important;min-height:166px!important;line-height:166px!important}i.s168,md-icon[md-font-icon].s168{font-size:168px!important;width:168px!important;height:168px!important;min-width:168px!important;min-height:168px!important;line-height:168px!important}i.s170,md-icon[md-font-icon].s170{font-size:170px!important;width:170px!important;height:170px!important;min-width:170px!important;min-height:170px!important;line-height:170px!important}i.s172,md-icon[md-font-icon].s172{font-size:172px!important;width:172px!important;height:172px!important;min-width:172px!important;min-height:172px!important;line-height:172px!important}i.s174,md-icon[md-font-icon].s174{font-size:174px!important;width:174px!important;height:174px!important;min-width:174px!important;min-height:174px!important;line-height:174px!important}i.s176,md-icon[md-font-icon].s176{font-size:176px!important;width:176px!important;height:176px!important;min-width:176px!important;min-height:176px!important;line-height:176px!important}i.s178,md-icon[md-font-icon].s178{font-size:178px!important;width:178px!important;height:178px!important;min-width:178px!important;min-height:178px!important;line-height:178px!important}i.s180,md-icon[md-font-icon].s180{font-size:180px!important;width:180px!important;height:180px!important;min-width:180px!important;min-height:180px!important;line-height:180px!important}i.s182,md-icon[md-font-icon].s182{font-size:182px!important;width:182px!important;height:182px!important;min-width:182px!important;min-height:182px!important;line-height:182px!important}i.s184,md-icon[md-font-icon].s184{font-size:184px!important;width:184px!important;height:184px!important;min-width:184px!important;min-height:184px!important;line-height:184px!important}i.s186,md-icon[md-font-icon].s186{font-size:186px!important;width:186px!important;height:186px!important;min-width:186px!important;min-height:186px!important;line-height:186px!important}i.s188,md-icon[md-font-icon].s188{font-size:188px!important;width:188px!important;height:188px!important;min-width:188px!important;min-height:188px!important;line-height:188px!important}i.s190,md-icon[md-font-icon].s190{font-size:190px!important;width:190px!important;height:190px!important;min-width:190px!important;min-height:190px!important;line-height:190px!important}i.s192,md-icon[md-font-icon].s192{font-size:192px!important;width:192px!important;height:192px!important;min-width:192px!important;min-height:192px!important;line-height:192px!important}i.s194,md-icon[md-font-icon].s194{font-size:194px!important;width:194px!important;height:194px!important;min-width:194px!important;min-height:194px!important;line-height:194px!important}i.s196,md-icon[md-font-icon].s196{font-size:196px!important;width:196px!important;height:196px!important;min-width:196px!important;min-height:196px!important;line-height:196px!important}i.s198,md-icon[md-font-icon].s198{font-size:198px!important;width:198px!important;height:198px!important;min-width:198px!important;min-height:198px!important;line-height:198px!important}i.s200,md-icon[md-font-icon].s200{font-size:200px!important;width:200px!important;height:200px!important;min-width:200px!important;min-height:200px!important;line-height:200px!important}i.s202,md-icon[md-font-icon].s202{font-size:202px!important;width:202px!important;height:202px!important;min-width:202px!important;min-height:202px!important;line-height:202px!important}i.s204,md-icon[md-font-icon].s204{font-size:204px!important;width:204px!important;height:204px!important;min-width:204px!important;min-height:204px!important;line-height:204px!important}i.s206,md-icon[md-font-icon].s206{font-size:206px!important;width:206px!important;height:206px!important;min-width:206px!important;min-height:206px!important;line-height:206px!important}i.s208,md-icon[md-font-icon].s208{font-size:208px!important;width:208px!important;height:208px!important;min-width:208px!important;min-height:208px!important;line-height:208px!important}i.s210,md-icon[md-font-icon].s210{font-size:210px!important;width:210px!important;height:210px!important;min-width:210px!important;min-height:210px!important;line-height:210px!important}i.s212,md-icon[md-font-icon].s212{font-size:212px!important;width:212px!important;height:212px!important;min-width:212px!important;min-height:212px!important;line-height:212px!important}i.s214,md-icon[md-font-icon].s214{font-size:214px!important;width:214px!important;height:214px!important;min-width:214px!important;min-height:214px!important;line-height:214px!important}i.s216,md-icon[md-font-icon].s216{font-size:216px!important;width:216px!important;height:216px!important;min-width:216px!important;min-height:216px!important;line-height:216px!important}i.s218,md-icon[md-font-icon].s218{font-size:218px!important;width:218px!important;height:218px!important;min-width:218px!important;min-height:218px!important;line-height:218px!important}i.s220,md-icon[md-font-icon].s220{font-size:220px!important;width:220px!important;height:220px!important;min-width:220px!important;min-height:220px!important;line-height:220px!important}i.s222,md-icon[md-font-icon].s222{font-size:222px!important;width:222px!important;height:222px!important;min-width:222px!important;min-height:222px!important;line-height:222px!important}i.s224,md-icon[md-font-icon].s224{font-size:224px!important;width:224px!important;height:224px!important;min-width:224px!important;min-height:224px!important;line-height:224px!important}i.s226,md-icon[md-font-icon].s226{font-size:226px!important;width:226px!important;height:226px!important;min-width:226px!important;min-height:226px!important;line-height:226px!important}i.s228,md-icon[md-font-icon].s228{font-size:228px!important;width:228px!important;height:228px!important;min-width:228px!important;min-height:228px!important;line-height:228px!important}i.s230,md-icon[md-font-icon].s230{font-size:230px!important;width:230px!important;height:230px!important;min-width:230px!important;min-height:230px!important;line-height:230px!important}i.s232,md-icon[md-font-icon].s232{font-size:232px!important;width:232px!important;height:232px!important;min-width:232px!important;min-height:232px!important;line-height:232px!important}i.s234,md-icon[md-font-icon].s234{font-size:234px!important;width:234px!important;height:234px!important;min-width:234px!important;min-height:234px!important;line-height:234px!important}i.s236,md-icon[md-font-icon].s236{font-size:236px!important;width:236px!important;height:236px!important;min-width:236px!important;min-height:236px!important;line-height:236px!important}i.s238,md-icon[md-font-icon].s238{font-size:238px!important;width:238px!important;height:238px!important;min-width:238px!important;min-height:238px!important;line-height:238px!important}i.s240,md-icon[md-font-icon].s240{font-size:240px!important;width:240px!important;height:240px!important;min-width:240px!important;min-height:240px!important;line-height:240px!important}i.s242,md-icon[md-font-icon].s242{font-size:242px!important;width:242px!important;height:242px!important;min-width:242px!important;min-height:242px!important;line-height:242px!important}i.s244,md-icon[md-font-icon].s244{font-size:244px!important;width:244px!important;height:244px!important;min-width:244px!important;min-height:244px!important;line-height:244px!important}i.s246,md-icon[md-font-icon].s246{font-size:246px!important;width:246px!important;height:246px!important;min-width:246px!important;min-height:246px!important;line-height:246px!important}i.s248,md-icon[md-font-icon].s248{font-size:248px!important;width:248px!important;height:248px!important;min-width:248px!important;min-height:248px!important;line-height:248px!important}i.s250,md-icon[md-font-icon].s250{font-size:250px!important;width:250px!important;height:250px!important;min-width:250px!important;min-height:250px!important;line-height:250px!important}i.s252,md-icon[md-font-icon].s252{font-size:252px!important;width:252px!important;height:252px!important;min-width:252px!important;min-height:252px!important;line-height:252px!important}i.s254,md-icon[md-font-icon].s254{font-size:254px!important;width:254px!important;height:254px!important;min-width:254px!important;min-height:254px!important;line-height:254px!important}i.s256,md-icon[md-font-icon].s256{font-size:256px!important;width:256px!important;height:256px!important;min-width:256px!important;min-height:256px!important;line-height:256px!important}@font-face{font-family:icomoon;src:url(../assets/icons/fonts/icomoon.eot?5km1tg);src:url(../assets/icons/fonts/icomoon.eot?#iefix5km1tg) format("embedded-opentype"),url(../assets/icons/fonts/icomoon.ttf?5km1tg) format("truetype"),url(../assets/icons/fonts/icomoon.woff?5km1tg) format("woff"),url(../assets/icons/fonts/icomoon.svg?5km1tg#icomoon) format("svg");font-weight:400;font-style:normal}[class*=' icon-'],[class^=icon-]{font-family:icomoon;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-account-alert:before{content:'\e600'}.icon-account-box-outline:before{content:'\e601'}.icon-account-box:before{content:'\e602'}.icon-account-check:before{content:'\e603'}.icon-account-circle:before{content:'\e604'}.icon-account-key:before{content:'\e605'}.icon-account-location:before{content:'\e606'}.icon-account-minus:before{content:'\e607'}.icon-account-multiple-outline:before{content:'\e608'}.icon-account-multiple-plus:before{content:'\e609'}.icon-account-multiple:before{content:'\e60a'}.icon-account-network:before{content:'\e60b'}.icon-account-outline:before{content:'\e60c'}.icon-account-plus:before{content:'\e60d'}.icon-account-remove:before{content:'\e60e'}.icon-account-search:before{content:'\e60f'}.icon-account-switch:before{content:'\e610'}.icon-account:before{content:'\e611'}.icon-airballoon:before{content:'\e612'}.icon-airplane-off:before{content:'\e613'}.icon-airplane:before{content:'\e614'}.icon-alarm-check:before{content:'\e615'}.icon-alarm-multiple:before{content:'\e616'}.icon-alarm-off:before{content:'\e617'}.icon-alarm-plus:before{content:'\e618'}.icon-alarm:before{content:'\e619'}.icon-album:before{content:'\e61a'}.icon-alert-box:before{content:'\e61b'}.icon-alert-circle:before{content:'\e61c'}.icon-alert-octagon:before{content:'\e61d'}.icon-alert:before{content:'\e61e'}.icon-alpha:before{content:'\e61f'}.icon-alphabetical:before{content:'\e620'}.icon-amazon-clouddrive:before{content:'\e621'}.icon-amazon:before{content:'\e622'}.icon-ambulance:before{content:'\e623'}.icon-android-debug-bridge:before{content:'\e624'}.icon-android-studio:before{content:'\e625'}.icon-android:before{content:'\e626'}.icon-apple-finder:before{content:'\e627'}.icon-apple-ios:before{content:'\e628'}.icon-apple-mobileme:before{content:'\e629'}.icon-apple-safari:before{content:'\e62a'}.icon-apple:before{content:'\e62b'}.icon-appnet:before{content:'\e62c'}.icon-apps:before{content:'\e62d'}.icon-archive:before{content:'\e62e'}.icon-arrange-bring-forward:before{content:'\e62f'}.icon-arrange-bring-to-front:before{content:'\e630'}.icon-arrange-send-backward:before{content:'\e631'}.icon-arrange-send-to-back:before{content:'\e632'}.icon-arrow-all:before{content:'\e633'}.icon-arrow-bottom-left:before{content:'\e634'}.icon-arrow-bottom-right:before{content:'\e635'}.icon-arrow-collapse:before{content:'\e636'}.icon-arrow-down-bold-circle-outline:before{content:'\e637'}.icon-arrow-down-bold-circle:before{content:'\e638'}.icon-arrow-down-bold-hexagon-outline:before{content:'\e639'}.icon-arrow-down-bold:before{content:'\e63a'}.icon-arrow-down:before{content:'\e63b'}.icon-arrow-expand:before{content:'\e63c'}.icon-arrow-left-bold-circle-outline:before{content:'\e63d'}.icon-arrow-left-bold-circle:before{content:'\e63e'}.icon-arrow-left-bold-hexagon-outline:before{content:'\e63f'}.icon-arrow-left-bold:before{content:'\e640'}.icon-arrow-left:before{content:'\e641'}.icon-arrow-right-bold-circle-outline:before{content:'\e642'}.icon-arrow-right-bold-circle:before{content:'\e643'}.icon-arrow-right-bold-hexagon-outline:before{content:'\e644'}.icon-arrow-right-bold:before{content:'\e645'}.icon-arrow-right:before{content:'\e646'}.icon-arrow-top-left:before{content:'\e647'}.icon-arrow-top-right:before{content:'\e648'}.icon-arrow-up-bold-circle-outline:before{content:'\e649'}.icon-arrow-up-bold-circle:before{content:'\e64a'}.icon-arrow-up-bold-hexagon-outline:before{content:'\e64b'}.icon-arrow-up-bold:before{content:'\e64c'}.icon-arrow-up:before{content:'\e64d'}.icon-at:before{content:'\e64e'}.icon-attachment:before{content:'\e64f'}.icon-audiobook:before{content:'\e650'}.icon-auto-fix:before{content:'\e651'}.icon-auto-upload:before{content:'\e652'}.icon-baby:before{content:'\e653'}.icon-backburger:before{content:'\e654'}.icon-backup-restore:before{content:'\e655'}.icon-bank:before{content:'\e656'}.icon-barcode:before{content:'\e657'}.icon-barley:before{content:'\e658'}.icon-barrel:before{content:'\e659'}.icon-basecamp:before{content:'\e65a'}.icon-basket-fill:before{content:'\e65b'}.icon-basket-unfill:before{content:'\e65c'}.icon-basket:before{content:'\e65d'}.icon-battery-10:before{content:'\e65e'}.icon-battery-20:before{content:'\e65f'}.icon-battery-30:before{content:'\e660'}.icon-battery-40:before{content:'\e661'}.icon-battery-50:before{content:'\e662'}.icon-battery-60:before{content:'\e663'}.icon-battery-70:before{content:'\e664'}.icon-battery-80:before{content:'\e665'}.icon-battery-90:before{content:'\e666'}.icon-battery-alert:before{content:'\e667'}.icon-battery-charging-20:before{content:'\e668'}.icon-battery-charging-30:before{content:'\e669'}.icon-battery-charging-40:before{content:'\e66a'}.icon-battery-charging-60:before{content:'\e66b'}.icon-battery-charging-80:before{content:'\e66c'}.icon-battery-charging-90:before{content:'\e66d'}.icon-battery-charging-100:before{content:'\e66e'}.icon-battery-minus:before{content:'\e66f'}.icon-battery-negative:before{content:'\e670'}.icon-battery-outline:before{content:'\e671'}.icon-battery-plus:before{content:'\e672'}.icon-battery-positive:before{content:'\e673'}.icon-battery-standard:before{content:'\e674'}.icon-battery-unknown:before{content:'\e675'}.icon-battery:before{content:'\e676'}.icon-beach:before{content:'\e677'}.icon-beaker-empty-outline:before{content:'\e678'}.icon-beaker-empty:before{content:'\e679'}.icon-beaker-outline:before{content:'\e67a'}.icon-beaker:before{content:'\e67b'}.icon-beats:before{content:'\e67c'}.icon-beer:before{content:'\e67d'}.icon-behance:before{content:'\e67e'}.icon-bell-off:before{content:'\e67f'}.icon-bell-outline:before{content:'\e680'}.icon-bell-ring-outline:before{content:'\e681'}.icon-bell-ring:before{content:'\e682'}.icon-bell-sleep:before{content:'\e683'}.icon-bell:before{content:'\e684'}.icon-beta:before{content:'\e685'}.icon-bike:before{content:'\e686'}.icon-bing:before{content:'\e687'}.icon-binoculars:before{content:'\e688'}.icon-bio:before{content:'\e689'}.icon-bitbucket:before{content:'\e68a'}.icon-black-mesa:before{content:'\e68b'}.icon-blackberry:before{content:'\e68c'}.icon-blinds:before{content:'\e68d'}.icon-block-helper:before{content:'\e68e'}.icon-blogger:before{content:'\e68f'}.icon-bluetooth-audio:before{content:'\e690'}.icon-bluetooth-connect:before{content:'\e691'}.icon-bluetooth-settings:before{content:'\e692'}.icon-bluetooth-transfer:before{content:'\e693'}.icon-bluetooth:before{content:'\e694'}.icon-blur-linear:before{content:'\e695'}.icon-blur-off:before{content:'\e696'}.icon-blur-radial:before{content:'\e697'}.icon-blur:before{content:'\e698'}.icon-bone:before{content:'\e699'}.icon-book-multiple-variant:before{content:'\e69a'}.icon-book-multiple:before{content:'\e69b'}.icon-book-open:before{content:'\e69c'}.icon-book-variant:before{content:'\e69d'}.icon-book:before{content:'\e69e'}.icon-bookmark-check:before{content:'\e69f'}.icon-bookmark-music:before{content:'\e6a0'}.icon-bookmark-outline-plus:before{content:'\e6a1'}.icon-bookmark-outline:before{content:'\e6a2'}.icon-bookmark-plus:before{content:'\e6a3'}.icon-bookmark-remove:before{content:'\e6a4'}.icon-bookmark:before{content:'\e6a5'}.icon-border-all:before{content:'\e6a6'}.icon-border-bottom:before{content:'\e6a7'}.icon-border-color:before{content:'\e6a8'}.icon-border-horizontal:before{content:'\e6a9'}.icon-border-inside:before{content:'\e6aa'}.icon-border-left:before{content:'\e6ab'}.icon-border-none:before{content:'\e6ac'}.icon-border-outside:before{content:'\e6ad'}.icon-border-right:before{content:'\e6ae'}.icon-border-top:before{content:'\e6af'}.icon-border-vertical:before{content:'\e6b0'}.icon-bowling:before{content:'\e6b1'}.icon-box-download:before{content:'\e6b2'}.icon-box-upload:before{content:'\e6b3'}.icon-box:before{content:'\e6b4'}.icon-briefcase-checked:before{content:'\e6b5'}.icon-briefcase-download:before{content:'\e6b6'}.icon-briefcase-upload:before{content:'\e6b7'}.icon-briefcase:before{content:'\e6b8'}.icon-brightness-1:before{content:'\e6b9'}.icon-brightness-2:before{content:'\e6ba'}.icon-brightness-3:before{content:'\e6bb'}.icon-brightness-4:before{content:'\e6bc'}.icon-brightness-5:before{content:'\e6bd'}.icon-brightness-6:before{content:'\e6be'}.icon-brightness-7:before{content:'\e6bf'}.icon-brightness-auto:before{content:'\e6c0'}.icon-brightness:before{content:'\e6c1'}.icon-broom:before{content:'\e6c2'}.icon-brush:before{content:'\e6c3'}.icon-bug:before{content:'\e6c4'}.icon-bulletin-board:before{content:'\e6c5'}.icon-bullhorn:before{content:'\e6c6'}.icon-bus:before{content:'\e6c7'}.icon-cake-variant:before{content:'\e6c8'}.icon-cake:before{content:'\e6c9'}.icon-calculator:before{content:'\e6ca'}.icon-calendar-blank:before{content:'\e6cb'}.icon-calendar-check-multiple:before{content:'\e6cc'}.icon-calendar-check:before{content:'\e6cd'}.icon-calendar-clock:before{content:'\e6ce'}.icon-calendar-multiple:before{content:'\e6cf'}.icon-calendar-plus:before{content:'\e6d0'}.icon-calendar-remove:before{content:'\e6d1'}.icon-calendar-select:before{content:'\e6d2'}.icon-calendar-text:before{content:'\e6d3'}.icon-calendar-today:before{content:'\e6d4'}.icon-calendar:before{content:'\e6d5'}.icon-camcorder-box-off:before{content:'\e6d6'}.icon-camcorder-box:before{content:'\e6d7'}.icon-camcorder-off:before{content:'\e6d8'}.icon-camcorder:before{content:'\e6d9'}.icon-camera-front-variant:before{content:'\e6da'}.icon-camera-front:before{content:'\e6db'}.icon-camera-iris:before{content:'\e6dc'}.icon-camera-party-mode:before{content:'\e6dd'}.icon-camera-rear-variant:before{content:'\e6de'}.icon-camera-rear:before{content:'\e6df'}.icon-camera-switch:before{content:'\e6e0'}.icon-camera-timer:before{content:'\e6e1'}.icon-camera:before{content:'\e6e2'}.icon-cancel:before{content:'\e6e3'}.icon-candycane:before{content:'\e6e4'}.icon-car-wash:before{content:'\e6e5'}.icon-car:before{content:'\e6e6'}.icon-carrot:before{content:'\e6e7'}.icon-cart-outline:before{content:'\e6e8'}.icon-cart:before{content:'\e6e9'}.icon-cash-100:before{content:'\e6ea'}.icon-cash-multiple:before{content:'\e6eb'}.icon-cash-usd:before{content:'\e6ec'}.icon-cash:before{content:'\e6ed'}.icon-cast-connected:before{content:'\e6ee'}.icon-cast:before{content:'\e6ef'}.icon-castle:before{content:'\e6f0'}.icon-cat:before{content:'\e6f1'}.icon-cellphone-android:before{content:'\e6f2'}.icon-cellphone-dock:before{content:'\e6f3'}.icon-cellphone-iphone:before{content:'\e6f4'}.icon-cellphone-link-off:before{content:'\e6f5'}.icon-cellphone-link:before{content:'\e6f6'}.icon-cellphone-settings:before{content:'\e6f7'}.icon-cellphone:before{content:'\e6f8'}.icon-chair-school:before{content:'\e6f9'}.icon-chart-arc:before{content:'\e6fa'}.icon-chart-areaspline:before{content:'\e6fb'}.icon-chart-bar:before{content:'\e6fc'}.icon-chart-histogram:before{content:'\e6fd'}.icon-chart-line:before{content:'\e6fe'}.icon-chart-pie:before{content:'\e6ff'}.icon-check-all:before{content:'\e700'}.icon-check-bookmark:before{content:'\e701'}.icon-check-circle:before{content:'\e702'}.icon-check:before{content:'\e703'}.icon-checkbox-blank-circle-outline:before{content:'\e704'}.icon-checkbox-blank-circle:before{content:'\e705'}.icon-checkbox-blank-outline:before{content:'\e706'}.icon-checkbox-blank:before{content:'\e707'}.icon-checkbox-marked-circle-outline:before{content:'\e708'}.icon-checkbox-marked-circle:before{content:'\e709'}.icon-checkbox-marked-outline:before{content:'\e70a'}.icon-checkbox-marked:before{content:'\e70b'}.icon-checkbox-multiple-blank-outline:before{content:'\e70c'}.icon-checkbox-multiple-blank:before{content:'\e70d'}.icon-checkbox-multiple-marked-outline:before{content:'\e70e'}.icon-checkbox-multiple-marked:before{content:'\e70f'}.icon-checkerboard:before{content:'\e710'}.icon-chevron-double-down:before{content:'\e711'}.icon-chevron-double-left:before{content:'\e712'}.icon-chevron-double-right:before{content:'\e713'}.icon-chevron-double-up:before{content:'\e714'}.icon-chevron-down:before{content:'\e715'}.icon-chevron-left:before{content:'\e716'}.icon-chevron-right:before{content:'\e717'}.icon-chevron-up:before{content:'\e718'}.icon-church:before{content:'\e719'}.icon-cisco-webex:before{content:'\e71a'}.icon-city:before{content:'\e71b'}.icon-clapperboard:before{content:'\e71c'}.icon-clipboard-account:before{content:'\e71d'}.icon-clipboard-alert:before{content:'\e71e'}.icon-clipboard-arrow-down:before{content:'\e71f'}.icon-clipboard-arrow-left:before{content:'\e720'}.icon-clipboard-check:before{content:'\e721'}.icon-clipboard-outline:before{content:'\e722'}.icon-clipboard-text:before{content:'\e723'}.icon-clipboard:before{content:'\e724'}.icon-clippy:before{content:'\e725'}.icon-clock-fast:before{content:'\e726'}.icon-clock:before{content:'\e727'}.icon-close-circle-outline:before{content:'\e728'}.icon-close-circle:before{content:'\e729'}.icon-close-network:before{content:'\e72a'}.icon-close:before{content:'\e72b'}.icon-closed-caption:before{content:'\e72c'}.icon-cloud-check:before{content:'\e72d'}.icon-cloud-circle:before{content:'\e72e'}.icon-cloud-download:before{content:'\e72f'}.icon-cloud-outline-off:before{content:'\e730'}.icon-cloud-outline:before{content:'\e731'}.icon-cloud-upload:before{content:'\e732'}.icon-cloud:before{content:'\e733'}.icon-code-array:before{content:'\e734'}.icon-code-braces:before{content:'\e735'}.icon-code-equal:before{content:'\e736'}.icon-code-greater-than-or-equal:before{content:'\e737'}.icon-code-greater-than:before{content:'\e738'}.icon-code-less-than-or-equal:before{content:'\e739'}.icon-code-less-than:before{content:'\e73a'}.icon-code-not-equal-variant:before{content:'\e73b'}.icon-code-not-equal:before{content:'\e73c'}.icon-code-string:before{content:'\e73d'}.icon-code-tags:before{content:'\e73e'}.icon-codepen:before{content:'\e73f'}.icon-coffee-to-go:before{content:'\e740'}.icon-coffee:before{content:'\e741'}.icon-cog-box:before{content:'\e742'}.icon-cog:before{content:'\e743'}.icon-coin:before{content:'\e744'}.icon-color-helper:before{content:'\e745'}.icon-comment-account-outline:before{content:'\e746'}.icon-comment-account:before{content:'\e747'}.icon-comment-alert-outline:before{content:'\e748'}.icon-comment-alert:before{content:'\e749'}.icon-comment-check-outline:before{content:'\e74a'}.icon-comment-check:before{content:'\e74b'}.icon-comment-multipe-outline:before{content:'\e74c'}.icon-comment-outline:before{content:'\e74d'}.icon-comment-plus-outline:before{content:'\e74e'}.icon-comment-processing-outline:before{content:'\e74f'}.icon-comment-processing:before{content:'\e750'}.icon-comment-remove-outline:before{content:'\e751'}.icon-comment-text-outline:before{content:'\e752'}.icon-comment-text:before{content:'\e753'}.icon-comment:before{content:'\e754'}.icon-compare:before{content:'\e755'}.icon-compass-outline:before{content:'\e756'}.icon-compass:before{content:'\e757'}.icon-console:before{content:'\e758'}.icon-content-copy:before{content:'\e759'}.icon-content-cut:before{content:'\e75a'}.icon-content-duplicate:before{content:'\e75b'}.icon-content-paste:before{content:'\e75c'}.icon-content-save-all:before{content:'\e75d'}.icon-content-save:before{content:'\e75e'}.icon-contrast-box:before{content:'\e75f'}.icon-contrast-circle:before{content:'\e760'}.icon-contrast:before{content:'\e761'}.icon-controller-xbox:before{content:'\e762'}.icon-cow:before{content:'\e763'}.icon-credit-card-multiple:before{content:'\e764'}.icon-credit-card:before{content:'\e765'}.icon-crop-free:before{content:'\e766'}.icon-crop-landscape:before{content:'\e767'}.icon-crop-portrait:before{content:'\e768'}.icon-crop-square:before{content:'\e769'}.icon-crop:before{content:'\e76a'}.icon-crosshairs-gps:before{content:'\e76b'}.icon-crosshairs:before{content:'\e76c'}.icon-crown:before{content:'\e76d'}.icon-cube-outline:before{content:'\e76e'}.icon-cube-unfolded:before{content:'\e76f'}.icon-cube:before{content:'\e770'}.icon-cup-water:before{content:'\e771'}.icon-cup:before{content:'\e772'}.icon-currency-btc:before{content:'\e773'}.icon-currency-eur:before{content:'\e774'}.icon-currency-gbp:before{content:'\e775'}.icon-currency-inr:before{content:'\e776'}.icon-currency-rub:before{content:'\e777'}.icon-currency-try:before{content:'\e778'}.icon-currency-usd:before{content:'\e779'}.icon-cursor-default-outline:before{content:'\e77a'}.icon-cursor-default:before{content:'\e77b'}.icon-cursor-move:before{content:'\e77c'}.icon-cursor-pointer:before{content:'\e77d'}.icon-data:before{content:'\e77e'}.icon-debug-step-into:before{content:'\e77f'}.icon-debug-step-out:before{content:'\e780'}.icon-debug-step-over:before{content:'\e781'}.icon-decimal-decrease:before{content:'\e782'}.icon-decimal-increase:before{content:'\e783'}.icon-delete-variant:before{content:'\e784'}.icon-delete:before{content:'\e785'}.icon-deskphone:before{content:'\e786'}.icon-desktop-mac:before{content:'\e787'}.icon-desktop-tower:before{content:'\e788'}.icon-details:before{content:'\e789'}.icon-deviantart:before{content:'\e78a'}.icon-diamond:before{content:'\e78b'}.icon-dice-1:before{content:'\e78c'}.icon-dice-2:before{content:'\e78d'}.icon-dice-3:before{content:'\e78e'}.icon-dice-4:before{content:'\e78f'}.icon-dice-5:before{content:'\e790'}.icon-dice-6:before{content:'\e791'}.icon-dice:before{content:'\e792'}.icon-directions:before{content:'\e793'}.icon-disk-alert:before{content:'\e794'}.icon-disqus-outline:before{content:'\e795'}.icon-disqus:before{content:'\e796'}.icon-division-box:before{content:'\e797'}.icon-division:before{content:'\e798'}.icon-dns:before{content:'\e799'}.icon-document:before{content:'\e79a'}.icon-domain:before{content:'\e79b'}.icon-dots-horizontal:before{content:'\e79c'}.icon-dots-vertical:before{content:'\e79d'}.icon-download:before{content:'\e79e'}.icon-drag-horizontal:before{content:'\e79f'}.icon-drag-vertical:before{content:'\e7a0'}.icon-drag:before{content:'\e7a1'}.icon-drawing-box:before{content:'\e7a2'}.icon-drawing:before{content:'\e7a3'}.icon-dribbble-box:before{content:'\e7a4'}.icon-dribbble:before{content:'\e7a5'}.icon-drone:before{content:'\e7a6'}.icon-dropbox:before{content:'\e7a7'}.icon-drupal:before{content:'\e7a8'}.icon-duck:before{content:'\e7a9'}.icon-dumbbell:before{content:'\e7aa'}.icon-earth-off:before{content:'\e7ab'}.icon-earth:before{content:'\e7ac'}.icon-ebay:before{content:'\e7ad'}.icon-edge:before{content:'\e7ae'}.icon-eject:before{content:'\e7af'}.icon-elevation-decline:before{content:'\e7b0'}.icon-elevation-rise:before{content:'\e7b1'}.icon-elevator:before{content:'\e7b2'}.icon-email-open:before{content:'\e7b3'}.icon-email-secure:before{content:'\e7b4'}.icon-email:before{content:'\e7b5'}.icon-emoticon-cool:before{content:'\e7b6'}.icon-emoticon-devil:before{content:'\e7b7'}.icon-emoticon-happy:before{content:'\e7b8'}.icon-emoticon-neutral:before{content:'\e7b9'}.icon-emoticon-poop:before{content:'\e7ba'}.icon-emoticon-sad:before{content:'\e7bb'}.icon-emoticon-tongue:before{content:'\e7bc'}.icon-emoticon:before{content:'\e7bd'}.icon-engine-outline:before{content:'\e7be'}.icon-engine:before{content:'\e7bf'}.icon-equal-box:before{content:'\e7c0'}.icon-equal:before{content:'\e7c1'}.icon-eraser:before{content:'\e7c2'}.icon-escalator:before{content:'\e7c3'}.icon-etsy:before{content:'\e7c4'}.icon-evernote:before{content:'\e7c5'}.icon-exclamation:before{content:'\e7c6'}.icon-exit-to-app:before{content:'\e7c7'}.icon-export:before{content:'\e7c8'}.icon-eye-off:before{content:'\e7c9'}.icon-eye:before{content:'\e7ca'}.icon-eyedropper-variant:before{content:'\e7cb'}.icon-eyedropper:before{content:'\e7cc'}.icon-facebook-box:before{content:'\e7cd'}.icon-facebook:before{content:'\e7ce'}.icon-factory:before{content:'\e7cf'}.icon-fan:before{content:'\e7d0'}.icon-fast-forward:before{content:'\e7d1'}.icon-ferry:before{content:'\e7d2'}.icon-file-cloud:before{content:'\e7d3'}.icon-file-delimited:before{content:'\e7d4'}.icon-file-document-box:before{content:'\e7d5'}.icon-file-document:before{content:'\e7d6'}.icon-file-excel-box:before{content:'\e7d7'}.icon-file-excel:before{content:'\e7d8'}.icon-file-find:before{content:'\e7d9'}.icon-file-hidden:before{content:'\e7da'}.icon-file-image-box:before{content:'\e7db'}.icon-file-image:before{content:'\e7dc'}.icon-file-multiple:before{content:'\e7dd'}.icon-file-music:before{content:'\e7de'}.icon-file-outline:before{content:'\e7df'}.icon-file-pdf-box:before{content:'\e7e0'}.icon-file-pdf:before{content:'\e7e1'}.icon-file-powerpoint-box:before{content:'\e7e2'}.icon-file-powerpoint:before{content:'\e7e3'}.icon-file-presentation-box:before{content:'\e7e4'}.icon-file-video:before{content:'\e7e5'}.icon-file-word-box:before{content:'\e7e6'}.icon-file-word:before{content:'\e7e7'}.icon-file-xml:before{content:'\e7e8'}.icon-file:before{content:'\e7e9'}.icon-fill:before{content:'\e7ea'}.icon-film:before{content:'\e7eb'}.icon-filmstrip-off:before{content:'\e7ec'}.icon-filmstrip:before{content:'\e7ed'}.icon-filter-outline:before{content:'\e7ee'}.icon-filter-remove-outline:before{content:'\e7ef'}.icon-filter-remove:before{content:'\e7f0'}.icon-filter-variant:before{content:'\e7f1'}.icon-filter:before{content:'\e7f2'}.icon-fire:before{content:'\e7f3'}.icon-fish:before{content:'\e7f4'}.icon-flag-checkered-variant:before{content:'\e7f5'}.icon-flag-checkered:before{content:'\e7f6'}.icon-flag-outline-variant:before{content:'\e7f7'}.icon-flag-outline:before{content:'\e7f8'}.icon-flag-triangle:before{content:'\e7f9'}.icon-flag-variant:before{content:'\e7fa'}.icon-flag:before{content:'\e7fb'}.icon-flash-auto:before{content:'\e7fc'}.icon-flash-off:before{content:'\e7fd'}.icon-flash:before{content:'\e7fe'}.icon-flashlight-off:before{content:'\e7ff'}.icon-flashlight:before{content:'\e800'}.icon-flattr:before{content:'\e801'}.icon-flickr-after:before{content:'\e802'}.icon-flickr-before:before{content:'\e803'}.icon-flip-to-back:before{content:'\e804'}.icon-flip-to-front:before{content:'\e805'}.icon-floppy:before{content:'\e806'}.icon-flower:before{content:'\e807'}.icon-folder-account:before{content:'\e808'}.icon-folder-download:before{content:'\e809'}.icon-folder-google-drive:before{content:'\e80a'}.icon-folder-image:before{content:'\e80b'}.icon-folder-lock-open:before{content:'\e80c'}.icon-folder-lock:before{content:'\e80d'}.icon-folder-move:before{content:'\e80e'}.icon-folder-multiple-image:before{content:'\e80f'}.icon-folder-multiple-outline:before{content:'\e810'}.icon-folder-multiple:before{content:'\e811'}.icon-folder-outline-lock:before{content:'\e812'}.icon-folder-outline:before{content:'\e813'}.icon-folder-plus:before{content:'\e814'}.icon-folder-remove:before{content:'\e815'}.icon-folder-upload:before{content:'\e816'}.icon-folder:before{content:'\e817'}.icon-food-apple:before{content:'\e818'}.icon-food-variant:before{content:'\e819'}.icon-food:before{content:'\e81a'}.icon-football-helmet:before{content:'\e81b'}.icon-football:before{content:'\e81c'}.icon-format-align-center:before{content:'\e81d'}.icon-format-align-justify:before{content:'\e81e'}.icon-format-align-left:before{content:'\e81f'}.icon-format-align-right:before{content:'\e820'}.icon-format-bold:before{content:'\e821'}.icon-format-clear:before{content:'\e822'}.icon-format-color-fill:before{content:'\e823'}.icon-format-color:before{content:'\e824'}.icon-format-float-center:before{content:'\e825'}.icon-format-float-left:before{content:'\e826'}.icon-format-float-none:before{content:'\e827'}.icon-format-float-right:before{content:'\e828'}.icon-format-header-1:before{content:'\e829'}.icon-format-header-2:before{content:'\e82a'}.icon-format-header-3:before{content:'\e82b'}.icon-format-header-4:before{content:'\e82c'}.icon-format-header-5:before{content:'\e82d'}.icon-format-header-6:before{content:'\e82e'}.icon-format-header-decrease:before{content:'\e82f'}.icon-format-header-down:before{content:'\e830'}.icon-format-header-equal:before{content:'\e831'}.icon-format-header-increase:before{content:'\e832'}.icon-format-header-pound:before{content:'\e833'}.icon-format-header-up:before{content:'\e834'}.icon-format-indent-decrease:before{content:'\e835'}.icon-format-indent-increase:before{content:'\e836'}.icon-format-italic:before{content:'\e837'}.icon-format-line-spacing:before{content:'\e838'}.icon-format-list-bulleted:before{content:'\e839'}.icon-format-list-numbers:before{content:'\e83a'}.icon-format-object-inline:before{content:'\e83b'}.icon-format-object-square:before{content:'\e83c'}.icon-format-object-tight:before{content:'\e83d'}.icon-format-object-top-bottom:before{content:'\e83e'}.icon-format-paint:before{content:'\e83f'}.icon-format-paragraph:before{content:'\e840'}.icon-format-quote:before{content:'\e841'}.icon-format-size:before{content:'\e842'}.icon-format-strikethrough:before{content:'\e843'}.icon-format-subscript:before{content:'\e844'}.icon-format-superscript:before{content:'\e845'}.icon-format-text:before{content:'\e846'}.icon-format-textdirection-l-to-r:before{content:'\e847'}.icon-format-textdirection-r-to-l:before{content:'\e848'}.icon-format-underline:before{content:'\e849'}.icon-forum:before{content:'\e84a'}.icon-forward:before{content:'\e84b'}.icon-foursquare:before{content:'\e84c'}.icon-fridge:before{content:'\e84d'}.icon-fullscreen-exit:before{content:'\e84e'}.icon-fullscreen:before{content:'\e84f'}.icon-function:before{content:'\e850'}.icon-gamepad-variant:before{content:'\e851'}.icon-gamepad:before{content:'\e852'}.icon-gas-station:before{content:'\e853'}.icon-gavel:before{content:'\e854'}.icon-gender-female:before{content:'\e855'}.icon-gender-male-female:before{content:'\e856'}.icon-gender-male:before{content:'\e857'}.icon-gender-transgender:before{content:'\e858'}.icon-gift:before{content:'\e859'}.icon-git:before{content:'\e85a'}.icon-github-box:before{content:'\e85b'}.icon-github:before{content:'\e85c'}.icon-glass-flute:before{content:'\e85d'}.icon-glass-mug:before{content:'\e85e'}.icon-glass-stange:before{content:'\e85f'}.icon-glass-tulip:before{content:'\e860'}.icon-glasses:before{content:'\e861'}.icon-gmail:before{content:'\e862'}.icon-google-chrome:before{content:'\e863'}.icon-google-circles-communities:before{content:'\e864'}.icon-google-circles-extended:before{content:'\e865'}.icon-google-circles-invite:before{content:'\e866'}.icon-google-circles:before{content:'\e867'}.icon-google-controller-off:before{content:'\e868'}.icon-google-controller:before{content:'\e869'}.icon-google-drive:before{content:'\e86a'}.icon-google-earth:before{content:'\e86b'}.icon-google-glass:before{content:'\e86c'}.icon-google-maps:before{content:'\e86d'}.icon-google-pages:before{content:'\e86e'}.icon-google-play:before{content:'\e86f'}.icon-google-plus-box:before{content:'\e870'}.icon-google-plus:before{content:'\e871'}.icon-google:before{content:'\e872'}.icon-grid-off:before{content:'\e873'}.icon-grid:before{content:'\e874'}.icon-group:before{content:'\e875'}.icon-hand-pointing-right:before{content:'\e876'}.icon-hanger:before{content:'\e877'}.icon-hangouts:before{content:'\e878'}.icon-harddisk:before{content:'\e879'}.icon-headphones-box:before{content:'\e87a'}.icon-headphones-dots:before{content:'\e87b'}.icon-headphones:before{content:'\e87c'}.icon-headset-dock:before{content:'\e87d'}.icon-headset-off:before{content:'\e87e'}.icon-headset:before{content:'\e87f'}.icon-heart-box-outline:before{content:'\e880'}.icon-heart-box:before{content:'\e881'}.icon-heart-broken:before{content:'\e882'}.icon-heart-outline:before{content:'\e883'}.icon-heart:before{content:'\e884'}.icon-help-circle:before{content:'\e885'}.icon-help:before{content:'\e886'}.icon-hexagon-outline:before{content:'\e887'}.icon-hexagon:before{content:'\e888'}.icon-history:before{content:'\e889'}.icon-hololens:before{content:'\e88a'}.icon-home-modern:before{content:'\e88b'}.icon-home-variant:before{content:'\e88c'}.icon-home:before{content:'\e88d'}.icon-hops:before{content:'\e88e'}.icon-hospital-building:before{content:'\e88f'}.icon-hospital-marker:before{content:'\e890'}.icon-hospital:before{content:'\e891'}.icon-hotel:before{content:'\e892'}.icon-houzz-box:before{content:'\e893'}.icon-human-child:before{content:'\e894'}.icon-human-male-female:before{content:'\e895'}.icon-human:before{content:'\e896'}.icon-image-album:before{content:'\e897'}.icon-image-area-close:before{content:'\e898'}.icon-image-area:before{content:'\e899'}.icon-image-broken:before{content:'\e89a'}.icon-image-filter-black-white:before{content:'\e89b'}.icon-image-filter-center-focus:before{content:'\e89c'}.icon-image-filter-drama:before{content:'\e89d'}.icon-image-filter-frames:before{content:'\e89e'}.icon-image-filter-hdr:before{content:'\e89f'}.icon-image-filter-none:before{content:'\e8a0'}.icon-image-filter-tilt-shift:before{content:'\e8a1'}.icon-image-filter-vintage:before{content:'\e8a2'}.icon-image-filter:before{content:'\e8a3'}.icon-image:before{content:'\e8a4'}.icon-import:before{content:'\e8a5'}.icon-inbox:before{content:'\e8a6'}.icon-indent:before{content:'\e8a7'}.icon-information-outline:before{content:'\e8a8'}.icon-information:before{content:'\e8a9'}.icon-instagram:before{content:'\e8aa'}.icon-instapaper:before{content:'\e8ab'}.icon-internet-explorer:before{content:'\e8ac'}.icon-invert-colors:before{content:'\e8ad'}.icon-jira:before{content:'\e8ae'}.icon-jsfiddle:before{content:'\e8af'}.icon-keg:before{content:'\e8b0'}.icon-key-change:before{content:'\e8b1'}.icon-key-minus:before{content:'\e8b2'}.icon-key-plus:before{content:'\e8b3'}.icon-key-remove:before{content:'\e8b4'}.icon-key-variant:before{content:'\e8b5'}.icon-key:before{content:'\e8b6'}.icon-keyboard-backspace:before{content:'\e8b7'}.icon-keyboard-caps:before{content:'\e8b8'}.icon-keyboard-close:before{content:'\e8b9'}.icon-keyboard-off:before{content:'\e8ba'}.icon-keyboard-return:before{content:'\e8bb'}.icon-keyboard-tab:before{content:'\e8bc'}.icon-keyboard-variant:before{content:'\e8bd'}.icon-keyboard:before{content:'\e8be'}.icon-label-outline:before{content:'\e8bf'}.icon-label:before{content:'\e8c0'}.icon-language-csharp:before{content:'\e8c1'}.icon-language-css3:before{content:'\e8c2'}.icon-language-html5:before{content:'\e8c3'}.icon-language-javascript:before{content:'\e8c4'}.icon-language-python-text:before{content:'\e8c5'}.icon-language-python:before{content:'\e8c6'}.icon-laptop-chromebook:before{content:'\e8c7'}.icon-laptop-mac:before{content:'\e8c8'}.icon-laptop-windows:before{content:'\e8c9'}.icon-laptop:before{content:'\e8ca'}.icon-lastfm:before{content:'\e8cb'}.icon-launch:before{content:'\e8cc'}.icon-layers-off:before{content:'\e8cd'}.icon-layers:before{content:'\e8ce'}.icon-leaf:before{content:'\e8cf'}.icon-library-books:before{content:'\e8d0'}.icon-library-music:before{content:'\e8d1'}.icon-library-plus:before{content:'\e8d2'}.icon-library:before{content:'\e8d3'}.icon-lightbulb-outline:before{content:'\e8d4'}.icon-lightbulb:before{content:'\e8d5'}.icon-link-off:before{content:'\e8d6'}.icon-link-variant-off:before{content:'\e8d7'}.icon-link-variant:before{content:'\e8d8'}.icon-link:before{content:'\e8d9'}.icon-linkedin-box:before{content:'\e8da'}.icon-linkedin:before{content:'\e8db'}.icon-linode:before{content:'\e8dc'}.icon-linux:before{content:'\e8dd'}.icon-lock-outline:before{content:'\e8de'}.icon-lock-unlocked-outline:before{content:'\e8df'}.icon-lock-unlocked:before{content:'\e8e0'}.icon-lock:before{content:'\e8e1'}.icon-login:before{content:'\e8e2'}.icon-logout:before{content:'\e8e3'}.icon-looks:before{content:'\e8e4'}.icon-loupe:before{content:'\e8e5'}.icon-lumx:before{content:'\e8e6'}.icon-magnet-on:before{content:'\e8e7'}.icon-magnet:before{content:'\e8e8'}.icon-magnify-minus:before{content:'\e8e9'}.icon-magnify-plus:before{content:'\e8ea'}.icon-magnify:before{content:'\e8eb'}.icon-mail-ru:before{content:'\e8ec'}.icon-map-marker-circle:before{content:'\e8ed'}.icon-map-marker-multiple:before{content:'\e8ee'}.icon-map-marker-off:before{content:'\e8ef'}.icon-map-marker-radius:before{content:'\e8f0'}.icon-map-marker:before{content:'\e8f1'}.icon-map:before{content:'\e8f2'}.icon-margin:before{content:'\e8f3'}.icon-markdown:before{content:'\e8f4'}.icon-marker-check:before{content:'\e8f5'}.icon-martini:before{content:'\e8f6'}.icon-material-ui:before{content:'\e8f7'}.icon-maxcdn:before{content:'\e8f8'}.icon-medium:before{content:'\e8f9'}.icon-memory:before{content:'\e8fa'}.icon-menu-down:before{content:'\e8fb'}.icon-menu-left:before{content:'\e8fc'}.icon-menu-right:before{content:'\e8fd'}.icon-menu-up:before{content:'\e8fe'}.icon-menu:before{content:'\e8ff'}.icon-message-alert:before{content:'\e900'}.icon-message-draw:before{content:'\e901'}.icon-message-image:before{content:'\e902'}.icon-message-processing:before{content:'\e903'}.icon-message-reply:before{content:'\e904'}.icon-message-text-outline:before{content:'\e905'}.icon-message-text:before{content:'\e906'}.icon-message-video:before{content:'\e907'}.icon-message:before{content:'\e908'}.icon-microphone-dots:before{content:'\e909'}.icon-microphone-off:before{content:'\e90a'}.icon-microphone-outline:before{content:'\e90b'}.icon-microphone-settings:before{content:'\e90c'}.icon-microphone-variant-off:before{content:'\e90d'}.icon-microphone-variant:before{content:'\e90e'}.icon-microphone:before{content:'\e90f'}.icon-minus-box:before{content:'\e910'}.icon-minus-circle-outline:before{content:'\e911'}.icon-minus-circle:before{content:'\e912'}.icon-minus-network:before{content:'\e913'}.icon-minus:before{content:'\e914'}.icon-monitor-multiple:before{content:'\e915'}.icon-monitor:before{content:'\e916'}.icon-more:before{content:'\e917'}.icon-mouse-off:before{content:'\e918'}.icon-mouse-variant-off:before{content:'\e919'}.icon-mouse-variant:before{content:'\e91a'}.icon-mouse:before{content:'\e91b'}.icon-movie:before{content:'\e91c'}.icon-multiplication-box:before{content:'\e91d'}.icon-multiplication:before{content:'\e91e'}.icon-music-box-outline:before{content:'\e91f'}.icon-music-box:before{content:'\e920'}.icon-music-circle:before{content:'\e921'}.icon-music-note-eighth:before{content:'\e922'}.icon-music-note-half:before{content:'\e923'}.icon-music-note-off:before{content:'\e924'}.icon-music-note-quarter:before{content:'\e925'}.icon-music-note-sixteenth:before{content:'\e926'}.icon-music-note-whole:before{content:'\e927'}.icon-music-note:before{content:'\e928'}.icon-nature-people:before{content:'\e929'}.icon-nature:before{content:'\e92a'}.icon-navigation:before{content:'\e92b'}.icon-needle:before{content:'\e92c'}.icon-nest-protect:before{content:'\e92d'}.icon-nest-thermostat:before{content:'\e92e'}.icon-newspaper:before{content:'\e92f'}.icon-nfc-tap:before{content:'\e930'}.icon-nfc-variant:before{content:'\e931'}.icon-nfc:before{content:'\e932'}.icon-no:before{content:'\e933'}.icon-not-equal:before{content:'\e934'}.icon-note-outline:before{content:'\e935'}.icon-note-text:before{content:'\e936'}.icon-note:before{content:'\e937'}.icon-numeric-0-box-multiple-outline:before{content:'\e938'}.icon-numeric-0-box-outline:before{content:'\e939'}.icon-numeric-0-box:before{content:'\e93a'}.icon-numeric-1-box-multiple-outline:before{content:'\e93b'}.icon-numeric-1-box-outline:before{content:'\e93c'}.icon-numeric-1-box:before{content:'\e93d'}.icon-numeric-2-box-multiple-outline:before{content:'\e93e'}.icon-numeric-2-box-outline:before{content:'\e93f'}.icon-numeric-2-box:before{content:'\e940'}.icon-numeric-3-box-multiple-outline:before{content:'\e941'}.icon-numeric-3-box-outline:before{content:'\e942'}.icon-numeric-3-box:before{content:'\e943'}.icon-numeric-4-box-multiple-outline:before{content:'\e944'}.icon-numeric-4-box-outline:before{content:'\e945'}.icon-numeric-4-box:before{content:'\e946'}.icon-numeric-5-box-multiple-outline:before{content:'\e947'}.icon-numeric-5-box-outline:before{content:'\e948'}.icon-numeric-5-box:before{content:'\e949'}.icon-numeric-6-box-multiple-outline:before{content:'\e94a'}.icon-numeric-6-box-outline:before{content:'\e94b'}.icon-numeric-6-box:before{content:'\e94c'}.icon-numeric-7-box-multiple-outline:before{content:'\e94d'}.icon-numeric-7-box-outline:before{content:'\e94e'}.icon-numeric-7-box:before{content:'\e94f'}.icon-numeric-8-box-multiple-outline:before{content:'\e950'}.icon-numeric-8-box-outline:before{content:'\e951'}.icon-numeric-8-box:before{content:'\e952'}.icon-numeric-9-box-multiple-outline:before{content:'\e953'}.icon-numeric-9-box-outline:before{content:'\e954'}.icon-numeric-9-box:before{content:'\e955'}.icon-numeric-9-plus-box-multiple-outline:before{content:'\e956'}.icon-numeric-9-plus-box-outline:before{content:'\e957'}.icon-numeric-9-plus-box:before{content:'\e958'}.icon-numeric:before{content:'\e959'}.icon-nutriton:before{content:'\e95a'}.icon-odnoklassniki:before{content:'\e95b'}.icon-office:before{content:'\e95c'}.icon-oil:before{content:'\e95d'}.icon-omega:before{content:'\e95e'}.icon-onedrive:before{content:'\e95f'}.icon-open-in-app:before{content:'\e960'}.icon-open-in-new:before{content:'\e961'}.icon-ornament-variant:before{content:'\e962'}.icon-ornament:before{content:'\e963'}.icon-outbox:before{content:'\e964'}.icon-outdent:before{content:'\e965'}.icon-owl:before{content:'\e966'}.icon-package-down:before{content:'\e967'}.icon-package-up:before{content:'\e968'}.icon-package-variant-closed:before{content:'\e969'}.icon-package-variant:before{content:'\e96a'}.icon-package:before{content:'\e96b'}.icon-palette-advanced:before{content:'\e96c'}.icon-palette:before{content:'\e96d'}.icon-panda:before{content:'\e96e'}.icon-pandora:before{content:'\e96f'}.icon-panorama-fisheye:before{content:'\e970'}.icon-panorama-horizontal:before{content:'\e971'}.icon-panorama-vertical:before{content:'\e972'}.icon-panorama-wide-angle:before{content:'\e973'}.icon-panorama:before{content:'\e974'}.icon-paper-cut-vertical:before{content:'\e975'}.icon-paperclip:before{content:'\e976'}.icon-parking:before{content:'\e977'}.icon-pause-circle-outline:before{content:'\e978'}.icon-pause-circle:before{content:'\e979'}.icon-pause-octagon-outline:before{content:'\e97a'}.icon-pause-octagon:before{content:'\e97b'}.icon-pause:before{content:'\e97c'}.icon-paw:before{content:'\e97d'}.icon-pen:before{content:'\e97e'}.icon-pencil-box-outline:before{content:'\e97f'}.icon-pencil-box:before{content:'\e980'}.icon-pencil:before{content:'\e981'}.icon-people:before{content:'\e982'}.icon-percent:before{content:'\e983'}.icon-person-box:before{content:'\e984'}.icon-person-minus:before{content:'\e985'}.icon-person-plus:before{content:'\e986'}.icon-pharmacy:before{content:'\e987'}.icon-phone-bluetooth:before{content:'\e988'}.icon-phone-dots:before{content:'\e989'}.icon-phone-forward:before{content:'\e98a'}.icon-phone-hangup:before{content:'\e98b'}.icon-phone-in-talk:before{content:'\e98c'}.icon-phone-incoming:before{content:'\e98d'}.icon-phone-locked:before{content:'\e98e'}.icon-phone-log:before{content:'\e98f'}.icon-phone-missed:before{content:'\e990'}.icon-phone-outgoing:before{content:'\e991'}.icon-phone-paused:before{content:'\e992'}.icon-phone:before{content:'\e993'}.icon-picture:before{content:'\e994'}.icon-pig:before{content:'\e995'}.icon-pill:before{content:'\e996'}.icon-pin-off:before{content:'\e997'}.icon-pin:before{content:'\e998'}.icon-pine-tree-box:before{content:'\e999'}.icon-pine-tree:before{content:'\e99a'}.icon-pinterest-box:before{content:'\e99b'}.icon-pinterest:before{content:'\e99c'}.icon-pizza:before{content:'\e99d'}.icon-plane:before{content:'\e99e'}.icon-play-box-outline:before{content:'\e99f'}.icon-play-circle-outline:before{content:'\e9a0'}.icon-play-circle:before{content:'\e9a1'}.icon-play:before{content:'\e9a2'}.icon-playlist-minus:before{content:'\e9a3'}.icon-playlist-plus:before{content:'\e9a4'}.icon-playstation:before{content:'\e9a5'}.icon-plus-box:before{content:'\e9a6'}.icon-plus-circle-outline:before{content:'\e9a7'}.icon-plus-circle:before{content:'\e9a8'}.icon-plus-network:before{content:'\e9a9'}.icon-plus-one:before{content:'\e9aa'}.icon-plus:before{content:'\e9ab'}.icon-pocket:before{content:'\e9ac'}.icon-poll-box:before{content:'\e9ad'}.icon-poll:before{content:'\e9ae'}.icon-polymer:before{content:'\e9af'}.icon-popcorn:before{content:'\e9b0'}.icon-pound-box:before{content:'\e9b1'}.icon-pound:before{content:'\e9b2'}.icon-power-settings:before{content:'\e9b3'}.icon-power-socket:before{content:'\e9b4'}.icon-power:before{content:'\e9b5'}.icon-presentation-play:before{content:'\e9b6'}.icon-presentation:before{content:'\e9b7'}.icon-printer-3d:before{content:'\e9b8'}.icon-printer:before{content:'\e9b9'}.icon-pulse:before{content:'\e9ba'}.icon-puzzle:before{content:'\e9bb'}.icon-qrcode:before{content:'\e9bc'}.icon-quadcopter:before{content:'\e9bd'}.icon-quality-high:before{content:'\e9be'}.icon-question-mark-circle:before{content:'\e9bf'}.icon-quick-reply:before{content:'\e9c0'}.icon-quicktime:before{content:'\e9c1'}.icon-rabbit:before{content:'\e9c2'}.icon-radiator:before{content:'\e9c3'}.icon-radio-tower:before{content:'\e9c4'}.icon-radio:before{content:'\e9c5'}.icon-radioactive:before{content:'\e9c6'}.icon-radiobox-blank:before{content:'\e9c7'}.icon-radiobox-marked:before{content:'\e9c8'}.icon-raspberrypi:before{content:'\e9c9'}.icon-rdio:before{content:'\e9ca'}.icon-read:before{content:'\e9cb'}.icon-readability:before{content:'\e9cc'}.icon-receipt:before{content:'\e9cd'}.icon-recycle:before{content:'\e9ce'}.icon-reddit:before{content:'\e9cf'}.icon-redo-variant:before{content:'\e9d0'}.icon-redo:before{content:'\e9d1'}.icon-refresh:before{content:'\e9d2'}.icon-relative-scale:before{content:'\e9d3'}.icon-reload:before{content:'\e9d4'}.icon-remote:before{content:'\e9d5'}.icon-rename-box:before{content:'\e9d6'}.icon-repeat-off:before{content:'\e9d7'}.icon-repeat-once:before{content:'\e9d8'}.icon-repeat:before{content:'\e9d9'}.icon-replay:before{content:'\e9da'}.icon-reply-all:before{content:'\e9db'}.icon-reply:before{content:'\e9dc'}.icon-reproduction:before{content:'\e9dd'}.icon-resize-bottom-right:before{content:'\e9de'}.icon-responsive:before{content:'\e9df'}.icon-restore:before{content:'\e9e0'}.icon-rewind:before{content:'\e9e1'}.icon-ribbon:before{content:'\e9e2'}.icon-road:before{content:'\e9e3'}.icon-rocket:before{content:'\e9e4'}.icon-rotate-3d:before{content:'\e9e5'}.icon-rotate-left-variant:before{content:'\e9e6'}.icon-rotate-left:before{content:'\e9e7'}.icon-rotate-right-variant:before{content:'\e9e8'}.icon-rotate-right:before{content:'\e9e9'}.icon-routes:before{content:'\e9ea'}.icon-rss-box:before{content:'\e9eb'}.icon-ruler:before{content:'\e9ec'}.icon-run:before{content:'\e9ed'}.icon-sale:before{content:'\e9ee'}.icon-satellite-variant:before{content:'\e9ef'}.icon-satellite:before{content:'\e9f0'}.icon-scale-bathroom:before{content:'\e9f1'}.icon-scale:before{content:'\e9f2'}.icon-school:before{content:'\e9f3'}.icon-screen-rotation-lock:before{content:'\e9f4'}.icon-screen-rotation:before{content:'\e9f5'}.icon-script:before{content:'\e9f6'}.icon-security-network:before{content:'\e9f7'}.icon-security:before{content:'\e9f8'}.icon-select-all:before{content:'\e9f9'}.icon-select-inverse:before{content:'\e9fa'}.icon-select-off:before{content:'\e9fb'}.icon-select:before{content:'\e9fc'}.icon-send:before{content:'\e9fd'}.icon-server-minus:before{content:'\e9fe'}.icon-server-network-off:before{content:'\e9ff'}.icon-server-network:before{content:'\ea00'}.icon-server-off:before{content:'\ea01'}.icon-server-plus:before{content:'\ea02'}.icon-server-remove:before{content:'\ea03'}.icon-server-security:before{content:'\ea04'}.icon-server:before{content:'\ea05'}.icon-shape-plus:before{content:'\ea06'}.icon-share-variant:before{content:'\ea07'}.icon-share:before{content:'\ea08'}.icon-shield-outline:before{content:'\ea09'}.icon-shield:before{content:'\ea0a'}.icon-shopping-music:before{content:'\ea0b'}.icon-shopping:before{content:'\ea0c'}.icon-shuffle:before{content:'\ea0d'}.icon-sigma:before{content:'\ea0e'}.icon-sign-caution:before{content:'\ea0f'}.icon-signal:before{content:'\ea10'}.icon-silverware-fork:before{content:'\ea11'}.icon-silverware-spoon:before{content:'\ea12'}.icon-silverware-variant:before{content:'\ea13'}.icon-silverware:before{content:'\ea14'}.icon-sim-alert:before{content:'\ea15'}.icon-sim:before{content:'\ea16'}.icon-sitemap:before{content:'\ea17'}.icon-skip-next:before{content:'\ea18'}.icon-skip-previous:before{content:'\ea19'}.icon-skype-business:before{content:'\ea1a'}.icon-skype:before{content:'\ea1b'}.icon-sleep-off:before{content:'\ea1c'}.icon-sleep:before{content:'\ea1d'}.icon-smoking-off:before{content:'\ea1e'}.icon-smoking:before{content:'\ea1f'}.icon-snapchat:before{content:'\ea20'}.icon-snowman:before{content:'\ea21'}.icon-sofa:before{content:'\ea22'}.icon-sort-alphabetical:before{content:'\ea23'}.icon-sort-ascending:before{content:'\ea24'}.icon-sort-descending:before{content:'\ea25'}.icon-sort-numeric:before{content:'\ea26'}.icon-sort-variant:before{content:'\ea27'}.icon-sort:before{content:'\ea28'}.icon-soundcloud:before{content:'\ea29'}.icon-source-fork:before{content:'\ea2a'}.icon-source-pull:before{content:'\ea2b'}.icon-speaker-off:before{content:'\ea2c'}.icon-speaker:before{content:'\ea2d'}.icon-speedometer:before{content:'\ea2e'}.icon-spellcheck:before{content:'\ea2f'}.icon-spotify:before{content:'\ea30'}.icon-spotlight-beam:before{content:'\ea31'}.icon-spotlight:before{content:'\ea32'}.icon-spreadsheet:before{content:'\ea33'}.icon-square-inc-cash:before{content:'\ea34'}.icon-square-inc:before{content:'\ea35'}.icon-stackoverflow:before{content:'\ea36'}.icon-star-circle:before{content:'\ea37'}.icon-star-half:before{content:'\ea38'}.icon-star-of-david:before{content:'\ea39'}.icon-star-outline:before{content:'\ea3a'}.icon-star:before{content:'\ea3b'}.icon-steam:before{content:'\ea3c'}.icon-stethoscope:before{content:'\ea3d'}.icon-stocking:before{content:'\ea3e'}.icon-stop:before{content:'\ea3f'}.icon-store-24-hour:before{content:'\ea40'}.icon-store:before{content:'\ea41'}.icon-stove:before{content:'\ea42'}.icon-subway:before{content:'\ea43'}.icon-sunglasses:before{content:'\ea44'}.icon-swap-horizontal:before{content:'\ea45'}.icon-swap-vertical:before{content:'\ea46'}.icon-swim:before{content:'\ea47'}.icon-sword:before{content:'\ea48'}.icon-sync-alert:before{content:'\ea49'}.icon-sync-off:before{content:'\ea4a'}.icon-sync:before{content:'\ea4b'}.icon-tab-unselected:before{content:'\ea4c'}.icon-tab:before{content:'\ea4d'}.icon-table-column-plus-after:before{content:'\ea4e'}.icon-table-column-plus-before:before{content:'\ea4f'}.icon-table-column-remove:before{content:'\ea50'}.icon-table-column-width:before{content:'\ea51'}.icon-table-edit:before{content:'\ea52'}.icon-table-large:before{content:'\ea53'}.icon-table-row-height:before{content:'\ea54'}.icon-table-row-plus-after:before{content:'\ea55'}.icon-table-row-plus-before:before{content:'\ea56'}.icon-table-row-remove:before{content:'\ea57'}.icon-table:before{content:'\ea58'}.icon-tablet-android:before{content:'\ea59'}.icon-tablet-ipad:before{content:'\ea5a'}.icon-tablet:before{content:'\ea5b'}.icon-tag-faces:before{content:'\ea5c'}.icon-tag-multiple:before{content:'\ea5d'}.icon-tag-outline:before{content:'\ea5e'}.icon-tag-text-outline:before{content:'\ea5f'}.icon-tag:before{content:'\ea60'}.icon-taxi:before{content:'\ea61'}.icon-teamviewer:before{content:'\ea62'}.icon-telegram:before{content:'\ea63'}.icon-television-guide:before{content:'\ea64'}.icon-television:before{content:'\ea65'}.icon-temperature-celsius:before{content:'\ea66'}.icon-temperature-fahrenheit:before{content:'\ea67'}.icon-temperature-kelvin:before{content:'\ea68'}.icon-tennis:before{content:'\ea69'}.icon-tent:before{content:'\ea6a'}.icon-terrain:before{content:'\ea6b'}.icon-text-to-speech-off:before{content:'\ea6c'}.icon-text-to-speech:before{content:'\ea6d'}.icon-texture:before{content:'\ea6e'}.icon-theater:before{content:'\ea6f'}.icon-theme-light-dark:before{content:'\ea70'}.icon-thermometer-lines:before{content:'\ea71'}.icon-thermometer:before{content:'\ea72'}.icon-thumb-down-outline:before{content:'\ea73'}.icon-thumb-down:before{content:'\ea74'}.icon-thumb-up-outline:before{content:'\ea75'}.icon-thumb-up:before{content:'\ea76'}.icon-thumbs-up-down:before{content:'\ea77'}.icon-ticket-account:before{content:'\ea78'}.icon-ticket:before{content:'\ea79'}.icon-tie:before{content:'\ea7a'}.icon-tile-four:before{content:'\ea7b'}.icon-timelapse:before{content:'\ea7c'}.icon-timer-3:before{content:'\ea7d'}.icon-timer-10:before{content:'\ea7e'}.icon-timer-off:before{content:'\ea7f'}.icon-timer-sand:before{content:'\ea80'}.icon-timer:before{content:'\ea81'}.icon-timetable:before{content:'\ea82'}.icon-toggle-switch-off:before{content:'\ea83'}.icon-toggle-switch-on:before{content:'\ea84'}.icon-tooltip-edit:before{content:'\ea85'}.icon-tooltip-image:before{content:'\ea86'}.icon-tooltip-outline-plus:before{content:'\ea87'}.icon-tooltip-outline:before{content:'\ea88'}.icon-tooltip-text:before{content:'\ea89'}.icon-tooltip:before{content:'\ea8a'}.icon-tor:before{content:'\ea8b'}.icon-traffic-light:before{content:'\ea8c'}.icon-train:before{content:'\ea8d'}.icon-tram:before{content:'\ea8e'}.icon-transcribe-close:before{content:'\ea8f'}.icon-transcribe:before{content:'\ea90'}.icon-transfer:before{content:'\ea91'}.icon-trash:before{content:'\ea92'}.icon-tree:before{content:'\ea93'}.icon-trello:before{content:'\ea94'}.icon-trending-down:before{content:'\ea95'}.icon-trending-neutral:before{content:'\ea96'}.icon-trending-up:before{content:'\ea97'}.icon-truck:before{content:'\ea98'}.icon-tshirt-crew:before{content:'\ea99'}.icon-tshirt-v:before{content:'\ea9a'}.icon-tumblr-reblog:before{content:'\ea9b'}.icon-tumblr:before{content:'\ea9c'}.icon-twitch:before{content:'\ea9d'}.icon-twitter-box:before{content:'\ea9e'}.icon-twitter-circle:before{content:'\ea9f'}.icon-twitter-retweet:before{content:'\eaa0'}.icon-twitter:before{content:'\eaa1'}.icon-ubuntu:before{content:'\eaa2'}.icon-umbrella-outline:before{content:'\eaa3'}.icon-umbrella:before{content:'\eaa4'}.icon-undo-variant:before{content:'\eaa5'}.icon-undo:before{content:'\eaa6'}.icon-unfold-less:before{content:'\eaa7'}.icon-unfold-more:before{content:'\eaa8'}.icon-ungroup:before{content:'\eaa9'}.icon-untappd:before{content:'\eaaa'}.icon-upload:before{content:'\eaab'}.icon-usb:before{content:'\eaac'}.icon-vector-curve:before{content:'\eaad'}.icon-vector-point:before{content:'\eaae'}.icon-vector-square:before{content:'\eaaf'}.icon-verified:before{content:'\eab0'}.icon-vibration:before{content:'\eab1'}.icon-video-off:before{content:'\eab2'}.icon-video-switch:before{content:'\eab3'}.icon-video:before{content:'\eab4'}.icon-view-agenda:before{content:'\eab5'}.icon-view-array:before{content:'\eab6'}.icon-view-carousel:before{content:'\eab7'}.icon-view-column:before{content:'\eab8'}.icon-view-dashboard:before{content:'\eab9'}.icon-view-day:before{content:'\eaba'}.icon-view-headline:before{content:'\eabb'}.icon-view-list:before{content:'\eabc'}.icon-view-module:before{content:'\eabd'}.icon-view-quilt:before{content:'\eabe'}.icon-view-stream:before{content:'\eabf'}.icon-view-week:before{content:'\eac0'}.icon-vimeo:before{content:'\eac1'}.icon-vine:before{content:'\eac2'}.icon-vk-box:before{content:'\eac3'}.icon-vk-circle:before{content:'\eac4'}.icon-vk:before{content:'\eac5'}.icon-voicemail:before{content:'\eac6'}.icon-volume-high:before{content:'\eac7'}.icon-volume-low:before{content:'\eac8'}.icon-volume-medium:before{content:'\eac9'}.icon-volume-off:before{content:'\eaca'}.icon-volume:before{content:'\eacb'}.icon-vpn:before{content:'\eacc'}.icon-walk:before{content:'\eacd'}.icon-wallet-giftcard:before{content:'\eace'}.icon-wallet-membership:before{content:'\eacf'}.icon-wallet-travel:before{content:'\ead0'}.icon-wallet:before{content:'\ead1'}.icon-washing-machine:before{content:'\ead2'}.icon-watch-export:before{content:'\ead3'}.icon-watch-import:before{content:'\ead4'}.icon-watch:before{content:'\ead5'}.icon-water-off:before{content:'\ead6'}.icon-water-pump:before{content:'\ead7'}.icon-water:before{content:'\ead8'}.icon-weather-cloudy:before{content:'\ead9'}.icon-weather-fog:before{content:'\eada'}.icon-weather-hail:before{content:'\eadb'}.icon-weather-lightning:before{content:'\eadc'}.icon-weather-night:before{content:'\eadd'}.icon-weather-partlycloudy:before{content:'\eade'}.icon-weather-pouring:before{content:'\eadf'}.icon-weather-rainy:before{content:'\eae0'}.icon-weather-snowy:before{content:'\eae1'}.icon-weather-sunny:before{content:'\eae2'}.icon-weather-sunset-down:before{content:'\eae3'}.icon-weather-sunset-up:before{content:'\eae4'}.icon-weather-sunset:before{content:'\eae5'}.icon-weather-windy-variant:before{content:'\eae6'}.icon-weather-windy:before{content:'\eae7'}.icon-web:before{content:'\eae8'}.icon-webcam:before{content:'\eae9'}.icon-weight-kilogram:before{content:'\eaea'}.icon-weight:before{content:'\eaeb'}.icon-whatsapp:before{content:'\eaec'}.icon-wheelchair-accessibility:before{content:'\eaed'}.icon-white-balance-auto:before{content:'\eaee'}.icon-white-balance-incandescent:before{content:'\eaef'}.icon-white-balance-irradescent:before{content:'\eaf0'}.icon-white-balance-sunny:before{content:'\eaf1'}.icon-wifi:before{content:'\eaf2'}.icon-wii:before{content:'\eaf3'}.icon-wikipedia:before{content:'\eaf4'}.icon-window-close:before{content:'\eaf5'}.icon-window-closed:before{content:'\eaf6'}.icon-window-maximize:before{content:'\eaf7'}.icon-window-minimize:before{content:'\eaf8'}.icon-window-open:before{content:'\eaf9'}.icon-window-restore:before{content:'\eafa'}.icon-windows:before{content:'\eafb'}.icon-wordpress:before{content:'\eafc'}.icon-worker:before{content:'\eafd'}.icon-wunderlist:before{content:'\eafe'}.icon-xbox-controller-off:before{content:'\eaff'}.icon-xbox-controller:before{content:'\eb00'}.icon-xbox:before{content:'\eb01'}.icon-xda:before{content:'\eb02'}.icon-xml:before{content:'\eb03'}.icon-yeast:before{content:'\eb04'}.icon-yelp:before{content:'\eb05'}.icon-youtube-play:before{content:'\eb06'}.icon-youtube:before{content:'\eb07'}.icon-zip-box:before{content:'\eb08'}.avatar{width:40px;min-width:40px;height:40px;line-height:40px;margin:0 8px 0 0;border-radius:50%;font-size:17px;font-weight:500;text-align:center;color:#fff}.avatar.square{border-radius:0}.avatar.small{width:20px;min-width:20px;height:20px;line-height:20px}.avatar.big{width:72px;min-width:72px;height:72px;line-height:72px}.avatar.huge{width:96px;min-width:96px;height:96px;line-height:96px}.form-wrapper{background:#fff;padding:16px}.form-wrapper .form-title{font-size:21px;padding:8px 0}.navigation-simple .item{position:relative;cursor:pointer;text-align:left;margin:0;padding:0 24px;text-transform:none;line-height:48px;max-height:48px;height:48px}.navigation-simple .item md-icon{margin:0 16px 0 0}.navigation-simple .item .title{font-size:13px;font-weight:500;line-height:1}.navigation-simple .item.selected{background-color:rgba(0,0,0,.06)}.navigation-simple .subheader{font-size:13px;border-top:1px solid rgba(0,0,0,.12);font-weight:500;margin-top:8px}.navigation-simple .subheader.light{border-top:1px solid rgba(255,255,255,.12)}.navigation-simple md-divider{margin:8px 0}.simple-pagination{position:relative;display:inline-flex;flex-direction:row;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);background-color:#fff;padding:0 8px}.simple-pagination .pagination-item{min-width:48px;min-height:56px;line-height:56px;border-radius:0;margin:0;font-weight:400;color:rgba(0,0,0,.54)}.simple-pagination .pagination-item:hover{color:rgba(0,0,0,.87)}.simple-pagination .pagination-item.active{cursor:default;color:rgba(0,0,0,.87)}.simple-pagination .pagination-item.disabled{cursor:default;color:rgba(0,0,0,.26)}.price-tables .price-table{position:relative;background-color:#fff;width:280px;border-radius:2px;margin:24px 24px 0 0;overflow:hidden}.price-tables .price-table.style-1 .package-type{font-size:17px;padding:16px 24px}.price-tables .price-table.style-1 .package-type .sale{font-size:13px;font-weight:600}.price-tables .price-table.style-1 .price{padding:32px 32px 16px 32px}.price-tables .price-table.style-1 .price .currency{padding-right:4px;font-size:24px;font-weight:500;color:rgba(0,0,0,.54)}.price-tables .price-table.style-1 .price .value{font-size:72px;font-weight:300;line-height:1}.price-tables .price-table.style-1 .price .period{padding:0 0 5px 4px;font-size:17px;color:rgba(0,0,0,.54)}.price-tables .price-table.style-1 md-divider{margin:16px 32px}.price-tables .price-table.style-1 .terms{padding:16px 32px;font-size:15px}.price-tables .price-table.style-1 .cta-button{margin:16px auto 32px auto;width:128px}.price-tables .price-table.style-2 .badge{position:absolute;top:0;left:50%;transform:translateX(-50%);font-size:11px;font-weight:500;padding:6px 8px}.price-tables .price-table.style-2 .package-type{padding:48px 32px 24px 32px;font-size:20px;font-weight:500;text-align:center}.price-tables .price-table.style-2 .price{padding:0 32px 8px 32px}.price-tables .price-table.style-2 .price .currency{padding-right:4px;font-size:24px;font-weight:500;color:rgba(0,0,0,.54)}.price-tables .price-table.style-2 .price .value{font-size:56px;font-weight:300;line-height:1}.price-tables .price-table.style-2 .period{padding:0 32px;font-size:15px;font-weight:500;color:rgba(0,0,0,.54);text-align:center}.price-tables .price-table.style-2 .terms{padding:32px;font-size:15px}.price-tables .price-table.style-2 .terms .term{padding-bottom:8px}.price-tables .price-table.style-2 .terms .term:last-child{padding-bottom:0}.price-tables .price-table.style-2 .cta-button{margin:8px auto 32px auto;width:128px}.price-tables .price-table.style-3 .package-type{padding:32px;text-align:center}.price-tables .price-table.style-3 .package-type .title{font-size:34px}.price-tables .price-table.style-3 .package-type .subtitle{font-size:17px;color:rgba(0,0,0,.54);font-weight:500}.price-tables .price-table.style-3 .price{padding:16px 32px}.price-tables .price-table.style-3 .price .currency{padding-right:4px;font-size:15px;font-weight:500}.price-tables .price-table.style-3 .price .value{font-size:34px;font-weight:300;line-height:1}.price-tables .price-table.style-3 .price .period{padding-left:4px;text-align:center}.price-tables .price-table.style-3 .terms{margin:32px;font-size:15px;color:rgba(0,0,0,.54)}.price-tables .price-table.style-3 .terms .term{padding-bottom:16px}.price-tables .price-table.style-3 .terms .term:last-child{padding-bottom:0}.price-tables .price-table.style-3 .cta-button{margin:8px 32px}.price-tables .price-table.style-3 .note{padding:8px 32px 16px 32px;text-align:center;color:rgba(0,0,0,.54)}.simple-table-container{background:#fff}.simple-table-container .table-title{font-size:20px;padding:24px}table.simple{width:100%;border:none;border-spacing:0;text-align:left}table.simple thead tr th{padding:16px 8px;font-weight:500;color:rgba(0,0,0,.54);border-bottom:1px solid rgba(0,0,0,.12);white-space:nowrap;min-width:120px}table.simple thead tr th:first-child{padding-left:24px}table.simple thead tr th:last-child{padding-right:24px}table.simple tbody tr td{padding:16px 8px;border-bottom:1px solid rgba(0,0,0,.12)}table.simple tbody tr td:first-child{padding-left:24px}table.simple tbody tr td:last-child{padding-right:24px}table.simple tbody tr:last-child td{border-bottom:none}table.simple.clickable tbody tr{cursor:pointer}table.simple.clickable tbody tr:hover{background:rgba(0,0,0,.03)}html{font-size:62.5%;font-family:Roboto,"Helvetica Neue",Arial,sans-serif;line-height:1.4;letter-spacing:-.1px}body{font-size:1.3rem}body,html{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}form{font-size:1.6rem}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-weight:400}.h1,h1{font-size:2.4rem}.h2,h2{font-size:2rem}.h3,h3{font-size:1.6rem}.h4,h4{font-size:1.4rem}.h5,h5{font-size:1.3rem}.h6,h6{font-size:1.2rem}a{text-decoration:none}a:active,a:hover{text-decoration:underline}abbr{cursor:help;border-bottom:1px dotted rgba(0,0,0,.54)}blockquote{border-left:3px solid rgba(0,0,0,.12);font-style:italic;margin:1em 0;padding-left:16px}blockquote footer{font-style:normal}blockquote footer:before{content:'\2014 \00A0'}blockquote.reverse{border-left:none;border-right:3px solid rgba(0,0,0,.12);text-align:right;padding-left:0;padding-right:16px}blockquote.reverse footer:before{content:''}blockquote.reverse footer:after{content:'\2014 \00A0'}code{font-family:Monaco,Menlo,Consolas,"Ubuntu Mono",monospace}code:not(.highlight){background:rgba(0,0,0,.065);color:#106cc8;margin:0 1px;padding:2px 3px;border-radius:2px}dl dt{font-weight:700}dl dd{margin:4px 0 16px 0}mark{background:#f7f49a}pre{line-height:1.6;margin:8px 16px;white-space:pre-wrap}small{font-size:80%}table thead tr th{text-align:left}.text-italic{font-style:italic}.text-semibold{font-weight:600}.text-bold,strong{font-weight:700}.text-strike{text-decoration:line-through}.text-super{vertical-align:super}.text-sub{vertical-align:sub}.text-capitalize{text-transform:capitalize}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-weight-100{font-weight:100}.font-weight-200{font-weight:200}.font-weight-300{font-weight:300}.font-weight-400{font-weight:400}.font-weight-500{font-weight:500}.font-weight-600{font-weight:600}.font-weight-700{font-weight:700}.font-weight-800{font-weight:800}.font-weight-900{font-weight:900}.font-size-2{font-size:2px}.font-size-4{font-size:4px}.font-size-6{font-size:6px}.font-size-8{font-size:8px}.font-size-10{font-size:10px}.font-size-12{font-size:12px}.font-size-14{font-size:14px}.font-size-16{font-size:16px}.font-size-18{font-size:18px}.font-size-20{font-size:20px}.font-size-22{font-size:22px}.font-size-24{font-size:24px}.font-size-26{font-size:26px}.font-size-28{font-size:28px}.font-size-30{font-size:30px}.font-size-32{font-size:32px}.font-size-34{font-size:34px}.font-size-36{font-size:36px}.font-size-38{font-size:38px}.font-size-40{font-size:40px}.font-size-42{font-size:42px}.font-size-44{font-size:44px}.font-size-46{font-size:46px}.font-size-48{font-size:48px}.font-size-50{font-size:50px}.font-size-52{font-size:52px}.font-size-54{font-size:54px}.font-size-56{font-size:56px}.font-size-58{font-size:58px}.font-size-60{font-size:60px}.font-size-62{font-size:62px}.font-size-64{font-size:64px}.font-size-66{font-size:66px}.font-size-68{font-size:68px}.font-size-70{font-size:70px}.font-size-72{font-size:72px}.font-size-74{font-size:74px}.font-size-76{font-size:76px}.font-size-78{font-size:78px}.font-size-80{font-size:80px}.font-size-82{font-size:82px}.font-size-84{font-size:84px}.font-size-86{font-size:86px}.font-size-88{font-size:88px}.font-size-90{font-size:90px}.font-size-92{font-size:92px}.font-size-94{font-size:94px}.font-size-96{font-size:96px}.font-size-98{font-size:98px}.font-size-100{font-size:100px}.font-size-102{font-size:102px}.font-size-104{font-size:104px}.font-size-106{font-size:106px}.font-size-108{font-size:108px}.font-size-110{font-size:110px}.font-size-112{font-size:112px}.font-size-114{font-size:114px}.font-size-116{font-size:116px}.font-size-118{font-size:118px}.font-size-120{font-size:120px}.line-height-2{line-height:2px}.line-height-4{line-height:4px}.line-height-6{line-height:6px}.line-height-8{line-height:8px}.line-height-10{line-height:10px}.line-height-12{line-height:12px}.line-height-14{line-height:14px}.line-height-16{line-height:16px}.line-height-18{line-height:18px}.line-height-20{line-height:20px}.line-height-22{line-height:22px}.line-height-24{line-height:24px}.line-height-26{line-height:26px}.line-height-28{line-height:28px}.line-height-30{line-height:30px}.line-height-32{line-height:32px}.line-height-34{line-height:34px}.line-height-36{line-height:36px}.line-height-38{line-height:38px}.line-height-40{line-height:40px}.line-height-42{line-height:42px}.line-height-44{line-height:44px}.line-height-46{line-height:46px}.line-height-48{line-height:48px}.line-height-50{line-height:50px}.line-height-52{line-height:52px}.line-height-54{line-height:54px}.line-height-56{line-height:56px}.line-height-58{line-height:58px}.line-height-60{line-height:60px}.line-height-62{line-height:62px}.line-height-64{line-height:64px}.line-height-66{line-height:66px}.line-height-68{line-height:68px}.line-height-70{line-height:70px}.line-height-72{line-height:72px}.line-height-74{line-height:74px}.line-height-76{line-height:76px}.line-height-78{line-height:78px}.line-height-80{line-height:80px}.line-height-82{line-height:82px}.line-height-84{line-height:84px}.line-height-86{line-height:86px}.line-height-88{line-height:88px}.line-height-90{line-height:90px}.line-height-92{line-height:92px}.line-height-94{line-height:94px}.line-height-96{line-height:96px}.line-height-98{line-height:98px}.line-height-100{line-height:100px}.line-height-102{line-height:102px}.line-height-104{line-height:104px}.line-height-106{line-height:106px}.line-height-108{line-height:108px}.line-height-110{line-height:110px}.line-height-112{line-height:112px}.line-height-114{line-height:114px}.line-height-116{line-height:116px}.line-height-118{line-height:118px}.line-height-120{line-height:120px}.text-boxed,.text-boxed-light{border-radius:2px;padding:4px 8px;margin:0 8px;font-size:11px;font-weight:500;color:rgba(0,0,0,.54);background-color:rgba(0,0,0,.12);white-space:nowrap}.text-boxed-light{background-color:rgba(255,255,255,.7)}.text-truncate{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-nowrap{white-space:nowrap}.angular-google-map-container{height:400px}.moment-picker .moment-picker-container{width:296px;border:none;border-radius:2px;box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12);margin-left:0;padding:8px}.moment-picker .moment-picker-container td,.moment-picker .moment-picker-container th{min-width:0;width:40px;height:40px;padding:8px;text-shadow:none;border-radius:35px}.moment-picker .moment-picker-container td:hover,.moment-picker .moment-picker-container th:hover{background:#f5f5f5;background-image:none}.moment-picker .moment-picker-container td.selected{background:#03a9f4;background-image:none}.moment-picker .moment-picker-container .header-view th{border-radius:0;white-space:nowrap;width:auto}.moment-picker .moment-picker-container .header-view th:first-child,.moment-picker .moment-picker-container .header-view th:last-child{width:20%}.c3{transition:all .3s ease}.c3 svg{font:12px RobotoDraft,Roboto,'Helvetica Neue',sans-serif}.c3 line,.c3 path{fill:none;stroke:#000}.c3 text{font-family:Roboto,"Helvetica Neue",Arial,sans-serif;user-select:none}.c3 .c3-bars path,.c3 .c3-event-rect,.c3 .c3-legend-item-tile,.c3 .c3-xgrid-focus,.c3 .c3-ygrid{shape-rendering:crispEdges}.c3 .c3-chart-line{transition:all .3s ease}.c3 .c3-line{stroke-width:1px}.c3.stroke-3 .c3-line{stroke-width:3px}.c3.stroke-2 .c3-line{stroke-width:2px}.c3 .c3-circle{transition:all .3s ease;stroke:#fff;stroke-width:2}.c3 .c3-circle._expanded_{stroke-width:3;stroke:#fff}.c3 .c3-chart-arc path{stroke:#fff}.c3 .c3-chart-arc text{fill:#fff;font-size:13px}.c3 .c3-grid line{stroke:rgba(0,0,0,.04);stroke-width:1px;stroke-dasharray:0}.c3 .c3-grid text{fill:#aaa}.c3 .c3-axis .tick{stroke-width:0}.c3 .c3-axis text{fill:rgba(0,0,0,.33)}.c3 .c3-axis line,.c3 .c3-axis path{stroke:rgba(0,0,0,.04)}.c3 .c3-xgrid,.c3 .c3-ygrid{stroke-dasharray:0 0}.c3 .c3-text.c3-empty{fill:grey;font-size:2em}.c3 .c3-bar{stroke-width:0}.c3 .c3-bar._expanded_{fill-opacity:.75}.c3 .c3-target.c3-focused{opacity:1}.c3 .c3-target.c3-focused .c3-target.c3-focused path.c3-step,.c3 .c3-target.c3-focused path.c3-line{stroke-width:3px;transition:all .3s ease}.c3 .c3-target.c3-defocused{opacity:.3!important}.c3 .c3-region{fill:#4682b4;fill-opacity:.1}.c3 .c3-brush .extent{fill-opacity:.1}.c3 .c3-legend-item{font-size:12px}.c3 .c3-legend-item-hidden{opacity:.15}.c3 .c3-legend-background{opacity:.75;fill:#fff;stroke:#d3d3d3;stroke-width:1}.c3 .c3-tooltip-container{z-index:10}.c3 .c3-tooltip{border-collapse:collapse;border-spacing:0;background-color:#fff;empty-cells:show;box-shadow:0 2px 4px -1px rgba(0,0,0,.14),0 4px 5px 0 rgba(0,0,0,.098),0 1px 10px 0 rgba(0,0,0,.084);opacity:1;border-radius:2px;overflow:hidden;padding:4px 0}.c3 .c3-tooltip tr{border:none}.c3 .c3-tooltip th{background-color:transparent;font-size:14px;font-weight:400;padding:8px 12px;text-align:left;color:rgba(0,0,0,.54)}.c3 .c3-tooltip td{font-size:13px;padding:4px 12px!important;background-color:#fff;border-left:none;color:rgba(0,0,0,.84)}.c3 .c3-tooltip td>span{display:inline-block;width:10px;height:10px;margin-right:6px}.c3 .c3-tooltip td.value{font-size:14px!important;text-align:right;color:rgba(0,0,0,.84)}.c3 .c3-area{stroke-width:0;opacity:.2}.c3 .c3-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}.c3 .c3-chart-arcs .c3-chart-arcs-background{fill:#e0e0e0;stroke:none}.c3 .c3-chart-arcs .c3-chart-arcs-gauge-unit{fill:#000;font-size:16px}.c3 .c3-chart-arcs .c3-chart-arcs-gauge-max{fill:#777}.c3 .c3-chart-arcs .c3-chart-arcs-gauge-min{fill:#777}.c3 .c3-chart-arc .c3-gauge-value{fill:#000}.ct-label{font-size:13px}.ct-chart-donut .ct-label,.ct-chart-pie .ct-label{font-size:13px}.bar-legend,.chart-legend,.doughnut-legend,.line-legend,.pie-legend,.polararea-legend,.radar-legend{margin-top:15px}table.dataTable{width:100%;margin:0 auto;clear:both;border-spacing:0}table.dataTable thead tr{background:#fff}table.dataTable thead th{text-align:left;vertical-align:middle;border-bottom:1px solid rgba(0,0,0,.12);padding:16px 8px}table.dataTable thead th:first-child{padding-left:24px}table.dataTable thead th:last-child{border-right:none;padding-right:24px}table.dataTable thead th:active{outline:0}table.dataTable thead th.dt-head-left{text-align:left}table.dataTable thead th.dt-head-center{text-align:center}table.dataTable thead th.dt-head-right{text-align:right}table.dataTable thead th.dt-head-justify{text-align:justify}table.dataTable thead th.dt-head-nowrap{white-space:nowrap}table.dataTable thead th .table-header .column-title{display:block;font-weight:600;white-space:nowrap}table.dataTable thead th .table-header .selectize-control{margin-top:15px}table.dataTable thead th .table-header .selectize-control.single .selectize-input{padding:7px 10px}table.dataTable thead th .table-header .selectize-control.single .selectize-input:after{right:10px;border-width:5px 4px 0 4px;border-color:rgba(0,0,0,.12) transparent transparent transparent}table.dataTable thead th .table-header .column-search-input{display:inline-block;margin-top:15px;width:100%;height:33px}table.dataTable thead td{padding:15px;vertical-align:middle}table.dataTable thead td:active{outline:0}table.dataTable thead td.dt-head-left{text-align:left}table.dataTable thead td.dt-head-center{text-align:center}table.dataTable thead td.dt-head-right{text-align:right}table.dataTable thead td.dt-head-justify{text-align:justify}table.dataTable thead td.dt-head-nowrap{white-space:nowrap}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc{background:0 0}table.dataTable thead .sorting .table-header .column-title,table.dataTable thead .sorting_asc .table-header .column-title,table.dataTable thead .sorting_desc .table-header .column-title{cursor:pointer}table.dataTable thead .sorting .table-header .column-title:after,table.dataTable thead .sorting_asc .table-header .column-title:after,table.dataTable thead .sorting_desc .table-header .column-title:after{position:relative;font-family:icomoon;font-weight:400;margin-left:10px;top:2px;font-size:16px;color:rgba(0,0,0,.54)}table.dataTable thead .sorting .table-header .column-title:after{content:'\eaa8'}table.dataTable thead .sorting_asc .table-header .column-title:after{content:'\e718'}table.dataTable thead .sorting_desc .table-header .column-title:after{content:'\e715'}table.dataTable tfoot th{font-weight:600;text-align:left;padding:10px 18px 6px 18px;border-top:1px solid #111}table.dataTable tfoot th.dt-head-left{text-align:left}table.dataTable tfoot th.dt-head-center{text-align:center}table.dataTable tfoot th.dt-head-right{text-align:right}table.dataTable tfoot th.dt-head-justify{text-align:justify}table.dataTable tfoot th.dt-head-nowrap{white-space:nowrap}table.dataTable tfoot td{padding:10px 18px 6px 18px;border-top:1px solid #111}table.dataTable tfoot td.dt-head-left{text-align:left}table.dataTable tfoot td.dt-head-center{text-align:center}table.dataTable tfoot td.dt-head-right{text-align:right}table.dataTable tfoot td.dt-head-justify{text-align:justify}table.dataTable tfoot td.dt-head-nowrap{white-space:nowrap}table.dataTable tbody tr{background-color:#fff}table.dataTable tbody tr.selected{background-color:#b0bed9}table.dataTable tbody tr.details-open td.detail-column i{background:#fff}table.dataTable tbody tr.details-row.odd tr{background:#fff}table.dataTable tbody tr.details-row>td{padding:0}table.dataTable tbody th{padding:14px 15px;vertical-align:middle}table.dataTable tbody th.dt-body-left{text-align:left}table.dataTable tbody th.dt-body-center{text-align:center}table.dataTable tbody th.dt-body-right{text-align:right}table.dataTable tbody th.dt-body-justify{text-align:justify}table.dataTable tbody th.dt-body-nowrap{white-space:nowrap}table.dataTable tbody td{padding:16px 8px;vertical-align:middle}table.dataTable tbody td:first-child{padding-left:24px}table.dataTable tbody td:last-child{padding-right:24px}table.dataTable tbody td.dt-body-left{text-align:left}table.dataTable tbody td.dt-body-center{text-align:center}table.dataTable tbody td.dt-body-right{text-align:right}table.dataTable tbody td.dt-body-justify{text-align:justify}table.dataTable tbody td.dt-body-nowrap{white-space:nowrap}table.dataTable th.dt-left{text-align:left}table.dataTable th.dt-center{text-align:center}table.dataTable th.dt-right{text-align:right}table.dataTable th.dt-justify{text-align:justify}table.dataTable th.dt-nowrap{white-space:nowrap}table.dataTable td.dt-left{text-align:left}table.dataTable td.dt-center{text-align:center}table.dataTable td.dataTables_empty{height:51px;text-align:center}table.dataTable td.dt-right{text-align:right}table.dataTable td.dt-justify{text-align:justify}table.dataTable td.dt-nowrap{white-space:nowrap}table.dataTable.row-border thead{border-bottom:1px solid rgba(0,0,0,.12)}table.dataTable.row-border tbody tr:first-child th{border-top:none}table.dataTable.row-border tbody tr:first-child td{border-top:none}table.dataTable.row-border tbody tr:last-child td{border-bottom:1px solid rgba(0,0,0,.12)}table.dataTable.row-border tbody th{border-top:1px solid rgba(0,0,0,.12)}table.dataTable.row-border tbody td{border-top:1px solid rgba(0,0,0,.12)}table.dataTable.cell-border tbody tr:first-child th{border-top:none}table.dataTable.cell-border tbody tr:first-child td{border-top:none}table.dataTable.cell-border tbody th{border-top:1px solid rgba(0,0,0,.12);border-right:1px solid rgba(0,0,0,.12)}table.dataTable.cell-border tbody th:last-child{border-right:none}table.dataTable.cell-border tbody td{border-top:1px solid rgba(0,0,0,.12);border-right:1px solid rgba(0,0,0,.12)}table.dataTable.cell-border tbody td:last-child{border-right:none}table.dataTable.stripe tbody tr.odd{background-color:#fff}table.dataTable.stripe tbody tr.odd.selected{background-color:#abb9d3}table.dataTable.hover tbody tr:hover{background-color:#f5f5f5}table.dataTable.hover tbody tr:hover.selected{background-color:#a9b7d1}table.dataTable.hover tbody tr.odd:hover{background-color:#f5f5f5}table.dataTable.hover tbody tr.odd:hover.selected{background-color:#a9b7d1}table.dataTable.hover tbody tr.even:hover{background-color:#f5f5f5}table.dataTable.hover tbody tr.even:hover.selected{background-color:#a9b7d1}table.dataTable.order-column tbody tr>.sorting_1{background-color:#f9f9f9}table.dataTable.order-column tbody tr>.sorting_2{background-color:#f9f9f9}table.dataTable.order-column tbody tr>.sorting_3{background-color:#f9f9f9}table.dataTable.order-column tbody tr.selected>.sorting_1{background-color:#acbad4}table.dataTable.order-column tbody tr.selected>.sorting_2{background-color:#acbad4}table.dataTable.order-column tbody tr.selected>.sorting_3{background-color:#acbad4}table.dataTable.order-column.stripe tbody tr.odd>.sorting_1{background-color:#f1f1f1}table.dataTable.order-column.stripe tbody tr.odd>.sorting_2{background-color:#f3f3f3}table.dataTable.order-column.stripe tbody tr.odd>.sorting_3{background-color:#f5f5f5}table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_1{background-color:#a6b3cd}table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_2{background-color:#a7b5ce}table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_3{background-color:#a9b6d0}table.dataTable.order-column.stripe tbody tr.even>.sorting_1{background-color:#f9f9f9}table.dataTable.order-column.stripe tbody tr.even>.sorting_2{background-color:#fbfbfb}table.dataTable.order-column.stripe tbody tr.even>.sorting_3{background-color:#fdfdfd}table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_1{background-color:#acbad4}table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_2{background-color:#adbbd6}table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_3{background-color:#afbdd8}table.dataTable.order-column.hover tbody tr:hover>.sorting_1{background-color:#eaeaea}table.dataTable.order-column.hover tbody tr:hover>.sorting_2{background-color:#ebebeb}table.dataTable.order-column.hover tbody tr:hover>.sorting_3{background-color:#eee}table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_1{background-color:#a1aec7}table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_2{background-color:#a2afc8}table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_3{background-color:#a4b2cb}table.dataTable.order-column.hover tbody tr.odd:hover>.sorting_1{background-color:#eaeaea}table.dataTable.order-column.hover tbody tr.odd:hover>.sorting_2{background-color:#ebebeb}table.dataTable.order-column.hover tbody tr.odd:hover>.sorting_3{background-color:#eee}table.dataTable.order-column.hover tbody tr.odd:hover.selected>.sorting_1{background-color:#a1aec7}table.dataTable.order-column.hover tbody tr.odd:hover.selected>.sorting_2{background-color:#a2afc8}table.dataTable.order-column.hover tbody tr.odd:hover.selected>.sorting_3{background-color:#a4b2cb}table.dataTable.order-column.hover tbody tr.even:hover>.sorting_1{background-color:#eaeaea}table.dataTable.order-column.hover tbody tr.even:hover>.sorting_2{background-color:#ebebeb}table.dataTable.order-column.hover tbody tr.even:hover>.sorting_3{background-color:#eee}table.dataTable.order-column.hover tbody tr.even:hover.selected>.sorting_1{background-color:#a1aec7}table.dataTable.order-column.hover tbody tr.even:hover.selected>.sorting_2{background-color:#a2afc8}table.dataTable.order-column.hover tbody tr.even:hover.selected>.sorting_3{background-color:#a4b2cb}table.dataTable.no-footer{border-bottom:none}table.dataTable.nowrap th{white-space:nowrap}table.dataTable.nowrap td{white-space:nowrap}table.dataTable.compact thead th{padding:5px 9px}table.dataTable.compact thead td{padding:5px 9px}table.dataTable.compact tfoot th{padding:5px 9px 3px 9px}table.dataTable.compact tfoot td{padding:5px 9px 3px 9px}table.dataTable.compact tbody th{padding:4px 5px}table.dataTable.compact tbody td{padding:4px 5px}.dataTables_wrapper{display:flex;flex:1 0 auto;flex-direction:column;min-height:0}.dataTables_wrapper .top{padding:16px 24px}.dataTables_wrapper .bottom{display:flex;min-height:64px;justify-content:space-between;padding:16px 8px;border-top:1px solid rgba(0,0,0,.12)}.dataTables_wrapper .bottom .left{display:flex;flex:0 0 50%;max-width:50%;align-self:center;padding:0 8px}.dataTables_wrapper .bottom .left .length{display:block}.dataTables_wrapper .bottom .right{display:flex;flex:0 0 50%;max-width:50%;align-self:center;justify-content:flex-end;padding:0 8px}.dataTables_wrapper .bottom .right .info{display:block;align-self:center}.dataTables_wrapper .bottom .right .info .dataTables_info{padding:0 8px;font-weight:600}.dataTables_wrapper .bottom .right .pagination{display:block;align-self:center;white-space:nowrap}.dataTables_wrapper .bottom .right .pagination .dataTables_paginate{padding:0;margin:0!important}.dataTables_wrapper .dataTables_filter{float:right}.dataTables_wrapper .dataTables_filter input{margin-left:.5em;border:1px solid rgba(0,0,0,.12);height:24px;padding:4px 8px}.dataTables_wrapper .dataTables_paginate .paginate_button{background:#fff;color:rgba(0,0,0,.87);border:1px solid rgba(0,0,0,.12);padding:9px 12px;border-radius:2px;cursor:pointer;user-select:none;margin:0 2px}.dataTables_wrapper .dataTables_paginate .paginate_button:hover{box-shadow:inset 999em 0 0 0 rgba(0,0,0,.05);color:rgba(0,0,0,.87)!important;border:1px solid rgba(0,0,0,.12)!important;background:0 0}.dataTables_wrapper .dataTables_paginate .paginate_button:active{box-shadow:inset 999em 0 0 0 rgba(0,0,0,.08),inset 0 1px 3px 0 rgba(0,0,0,.1),0 1px 0 0 rgba(255,255,255,.35)}.dataTables_wrapper .dataTables_paginate .paginate_button.current,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover{color:rgba(0,0,0,.54)!important;border-color:rgba(0,0,0,.12)!important;background:#fff!important;box-shadow:none!important;cursor:default}.dataTables_wrapper .dataTables_processing{position:absolute;top:50%;left:50%;width:100%;height:40px;margin-left:-50%;margin-top:-25px;padding-top:20px;text-align:center;font-size:1.2em;background-color:#fff;background:-webkit-gradient(linear,left top,right top,color-stop(0,rgba(255,255,255,0)),color-stop(25%,rgba(255,255,255,.9)),color-stop(75%,rgba(255,255,255,.9)),color-stop(100%,rgba(255,255,255,0)));background:-webkit-linear-gradient(left,rgba(255,255,255,0) 0,rgba(255,255,255,.9) 25%,rgba(255,255,255,.9) 75%,rgba(255,255,255,0) 100%);background:-moz-linear-gradient(left,rgba(255,255,255,0) 0,rgba(255,255,255,.9) 25%,rgba(255,255,255,.9) 75%,rgba(255,255,255,0) 100%);background:-ms-linear-gradient(left,rgba(255,255,255,0) 0,rgba(255,255,255,.9) 25%,rgba(255,255,255,.9) 75%,rgba(255,255,255,0) 100%);background:-o-linear-gradient(left,rgba(255,255,255,0) 0,rgba(255,255,255,.9) 25%,rgba(255,255,255,.9) 75%,rgba(255,255,255,0) 100%);background:linear-gradient(to right,rgba(255,255,255,0) 0,rgba(255,255,255,.9) 25%,rgba(255,255,255,.9) 75%,rgba(255,255,255,0) 100%)}.dataTables_wrapper .dataTables_scroll{display:flex;flex:1 1 0;flex-direction:column;clear:both;min-height:0}.dataTables_wrapper .dataTables_scroll table.dataTable{box-shadow:none}.dataTables_wrapper .dataTables_scroll table.dataTable.row-border thead{border:none}.dataTables_wrapper .dataTables_scroll .dataTables_scrollHead{display:flex;min-height:56px;box-shadow:0 0 0 1px rgba(0,0,0,.095),0 1px 1px 0 rgba(0,0,0,.1),0 2px 1px 0 rgba(0,0,0,.05);background:#fff;overflow:visible!important}.dataTables_wrapper .dataTables_scroll .dataTables_scrollHead tr th:last-child .table-header .column-title{position:relative;left:7px}.dataTables_wrapper .dataTables_scroll .dataTables_scrollBody{display:flex;overflow-x:hidden!important;overflow-y:scroll!important;-webkit-overflow-scrolling:touch}.dataTables_wrapper .dataTables_scroll .dataTables_scrollBody th>.dataTables_sizing{height:0;overflow:hidden;margin:0!important;padding:0!important}.dataTables_wrapper .dataTables_scroll .dataTables_scrollBody td>.dataTables_sizing{height:0;overflow:hidden;margin:0!important;padding:0!important}.dataTables_wrapper.no-footer .dataTables_scrollBody{border-bottom:none}.dataTables_wrapper.no-footer .dataTables_scrollBody table,.dataTables_wrapper.no-footer .dataTables_scrollHead table{border-bottom:none}.dataTables_wrapper:after{visibility:hidden;display:block;content:'';clear:both;height:0}table.dataTable .show-details{padding:5px 10px;font-weight:700}table.dataTable .action-buttons{display:flex;justify-content:center}table.dataTable .action-buttons .button{padding:8px}.fullpage-datatable .dataTables_wrapper{height:100%;max-height:100%}.explorer-11 .fullpage-datatable .dataTables_scroll{flex:1}table.dataTable.dtr-inline.collapsed.dtr-inline.collapsed>tbody>tr>td:first-child,table.dataTable.dtr-inline.collapsed.dtr-inline.collapsed>tbody>tr>th:first-child{padding-left:40px}table.dataTable.dtr-inline.collapsed.dtr-inline.collapsed>tbody>tr>td:first-child:before,table.dataTable.dtr-inline.collapsed.dtr-inline.collapsed>tbody>tr>th:first-child:before{content:'+';width:15px;height:15px;line-height:15px;top:50%;margin-top:-7px;left:8px;color:rgba(0,0,0,.54);background:0 0;border:none;box-shadow:0 0 0 2px rgba(0,0,0,.54);font-weight:700}table.dataTable.dtr-inline.collapsed.dtr-inline.collapsed>tbody>tr.parent>td:first-child:before,table.dataTable.dtr-inline.collapsed.dtr-inline.collapsed>tbody>tr.parent>th:first-child:before{background:0 0}table.dataTable.dtr-inline.collapsed>tbody>tr.child ul{display:block}table.dataTable.dtr-inline.collapsed>tbody>tr.child ul li{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;border-bottom:1px solid rgba(0,0,0,.12);padding:8px 0}table.dataTable.dtr-inline.collapsed>tbody>tr.child ul li:first-child{padding-top:0}table.dataTable.dtr-inline.collapsed>tbody>tr.child ul li:last-child{border-bottom:none;padding-bottom:0}table.dataTable.dtr-inline.collapsed>tbody>tr.child ul li .dtr-title{margin-right:8px}[hljs],hljs{display:block;overflow-x:auto;color:#333;background:#f8f8f8;-webkit-text-size-adjust:none}.diff .hljs-header,.hljs-comment{color:#998;font-style:italic}.css .rule .hljs-keyword,.hljs-keyword,.hljs-request,.hljs-status,.hljs-subst,.hljs-winutils,.nginx .hljs-title{color:#333;font-weight:700}.hljs-hexcolor,.hljs-number,.ruby .hljs-constant{color:teal}.hljs-doctag,.hljs-string,.hljs-tag .hljs-value,.tex .hljs-formula{color:#d14}.hljs-id,.hljs-title,.scss .hljs-preprocessor{color:#900;font-weight:700}.hljs-list .hljs-keyword,.hljs-subst{font-weight:400}.hljs-class .hljs-title,.hljs-type,.tex .hljs-command,.vhdl .hljs-literal{color:#458;font-weight:700}.django .hljs-tag .hljs-keyword,.hljs-rule .hljs-property,.hljs-tag,.hljs-tag .hljs-title{color:navy;font-weight:400}.hljs-attribute,.hljs-name,.hljs-variable,.lisp .hljs-body{color:teal}.hljs-regexp{color:#009926}.clojure .hljs-keyword,.hljs-prompt,.hljs-symbol,.lisp .hljs-keyword,.ruby .hljs-symbol .hljs-string,.scheme .hljs-keyword,.tex .hljs-special{color:#990073}.hljs-built_in{color:#0086b3}.hljs-cdata,.hljs-doctype,.hljs-pi,.hljs-pragma,.hljs-preprocessor,.hljs-shebang{color:#999;font-weight:700}.hljs-deletion{background:#fdd}.hljs-addition{background:#dfd}.diff .hljs-change{background:#0086b3}.hljs-chunk{color:#aaa}nvd3{display:block;width:100%;height:100%}nvd3.remove-x-lines .nv-x .tick line{display:none}nvd3.remove-y-lines .nv-y .tick line{display:none}nvd3.remove-line-stroke .nv-groups path.nv-line{stroke-width:0!important}nvd3.remove-opacity .nv-groups .nv-group{fill-opacity:1!important}nvd3.show-line-points .nv-line .nv-scatter .nv-groups .nv-point{fill-opacity:1!important;stroke-opacity:1!important}.nvd3 text{font-family:Roboto,"Helvetica Neue",Arial,sans-serif}.nvd3 line.nv-guideline{stroke:rgba(0,0,0,.54)}.nvd3 .nv-groups .nv-point.hover{stroke-width:3px!important;fill-opacity:1!important;stroke-opacity:1!important}.nvtooltip{background:0 0;color:#fff;padding:0;border:none}.nvtooltip.gravity-n:after{display:block;position:absolute;content:'';width:0;height:0;left:50%;bottom:100%;margin-left:-5px;border:5px solid transparent;border-bottom-color:rgba(0,0,0,.87)}.nvtooltip.gravity-s:after{display:block;position:absolute;content:'';width:0;height:0;top:100%;left:50%;margin-left:-5px;border:5px solid transparent;border-top-color:rgba(0,0,0,.87)}.nvtooltip.gravity-e:after{display:block;position:absolute;content:'';width:0;height:0;top:50%;right:0;margin-top:-6px;margin-right:-11px;border:6px solid transparent;border-left-color:rgba(0,0,0,.87)}.nvtooltip.gravity-w:after{display:block;position:absolute;content:'';width:0;height:0;top:50%;margin-top:-6px;margin-left:-11px;border:6px solid transparent;border-right-color:rgba(0,0,0,.87)}.nvtooltip table{background:rgba(0,0,0,.87);padding:8px 12px;margin:0;border-radius:2px}.nvtooltip table tbody tr td.legend-color-guide div{border:none}.nvtooltip table tbody tr td:last-child{padding-right:0}.ps-container:hover .ps-in-scrolling{pointer-events:auto}.ps-container .ps-in-scrolling{pointer-events:auto}.ps-container>.ps-scrollbar-x-rail{background:0 0!important;margin:4px 0;height:4px;z-index:49}.ps-container>.ps-scrollbar-x-rail>.ps-scrollbar-x{height:4px}.ps-container>.ps-scrollbar-y-rail{background:0 0!important;margin:4px 0;width:4px;z-index:49}.ps-container>.ps-scrollbar-y-rail>.ps-scrollbar-y{width:4px}.ta-root{display:block}.ta-root .ta-scroll-window.form-control{border:1px solid rgba(0,0,0,.12)}.ta-root.focussed>.ta-scroll-window.form-control{outline:0 solid transparent;border:1px solid rgba(0,0,0,.12);box-shadow:none}.ta-root textarea.ta-editor.ta-html{resize:vertical;width:100%!important;border:1px solid rgba(0,0,0,.12);padding:16px}.ta-root .ta-toolbar{border:1px solid rgba(0,0,0,.12);border-bottom:none;background:#f5f5f5}.ta-root .ta-toolbar .ta-group{display:flex;align-items:center;align-content:center;flex-wrap:wrap}.ta-root .ta-toolbar .ta-group #toolbarCC,.ta-root .ta-toolbar .ta-group #toolbarWC{display:inline-block!important;line-height:24px}.ta-root .ta-toolbar .ta-group .md-button{width:40px;min-width:40px;line-height:14px;height:36px;min-height:36px;padding:6px;margin:4px 0}.ta-root .ta-toolbar .ta-group .md-button i{font-size:20px;width:20px;height:20px;line-height:20px}.ng-cloak,.x-ng-cloak,[data-ng-cloak],[ng-cloak],[ng\:cloak],[x-ng-cloak]{display:none!important}.no-padding{padding:0!important}.no-margin{margin:0!important}.no-radius{border-radius:0}.divider-vertical{background:rgba(0,0,0,.12);height:24px;width:1px;margin:0 8px}.hidden{visibility:hidden;opacity:0}[fill-width]{min-width:100%}[fill-height]{min-height:100%}.full-height{height:100%!important}a img{display:block;outline:0}img{max-width:100%;height:auto;vertical-align:top;border:none}.scrollable{display:block;position:relative;overflow-x:auto;overflow-y:auto;-webkit-overflow-scrolling:touch}.scrollable.only-x{overflow-x:auto;overflow-y:hidden}.scrollable.only-y{overflow-x:hidden;overflow-y:auto}.flex-scrollable{position:relative;overflow-x:auto;overflow-y:auto;-webkit-overflow-scrolling:touch}.flex-scrollable.only-x{overflow-x:auto;overflow-y:hidden}.flex-scrollable.only-y{overflow-x:hidden;overflow-y:auto}.background-image-center{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:-1}.align-vertical:before{display:inline-block;height:100%;content:'';vertical-align:middle}.align-vertical .align-vertical-bottom,.align-vertical .align-vertical-middle,.align-vertical .align-vertical-top{display:inline-block}.align-vertical .align-vertical-top{vertical-align:top}.align-vertical .align-vertical-middle{vertical-align:middle}.align-vertical .align-vertical-bottom{vertical-align:bottom}.p-0,.padding-0{padding:0}.padding-top-0,.pt-0{padding-top:0}.padding-right-0,.pr-0{padding-right:0}.padding-bottom-0,.pb-0{padding-bottom:0}.padding-left-0,.pl-0{padding-left:0}.padding-horizontal-0,.ph-0{padding-left:0;padding-right:0}.padding-vertical-0,.pv-0{padding-top:0;padding-bottom:0}.p-5,.padding-5{padding:5px}.padding-top-5,.pt-5{padding-top:5px}.padding-right-5,.pr-5{padding-right:5px}.padding-bottom-5,.pb-5{padding-bottom:5px}.padding-left-5,.pl-5{padding-left:5px}.padding-horizontal-5,.ph-5{padding-left:5px;padding-right:5px}.padding-vertical-5,.pv-5{padding-top:5px;padding-bottom:5px}.p-10,.padding-10{padding:10px}.padding-top-10,.pt-10{padding-top:10px}.padding-right-10,.pr-10{padding-right:10px}.padding-bottom-10,.pb-10{padding-bottom:10px}.padding-left-10,.pl-10{padding-left:10px}.padding-horizontal-10,.ph-10{padding-left:10px;padding-right:10px}.padding-vertical-10,.pv-10{padding-top:10px;padding-bottom:10px}.p-15,.padding-15{padding:15px}.padding-top-15,.pt-15{padding-top:15px}.padding-right-15,.pr-15{padding-right:15px}.padding-bottom-15,.pb-15{padding-bottom:15px}.padding-left-15,.pl-15{padding-left:15px}.padding-horizontal-15,.ph-15{padding-left:15px;padding-right:15px}.padding-vertical-15,.pv-15{padding-top:15px;padding-bottom:15px}.p-20,.padding-20{padding:20px}.padding-top-20,.pt-20{padding-top:20px}.padding-right-20,.pr-20{padding-right:20px}.padding-bottom-20,.pb-20{padding-bottom:20px}.padding-left-20,.pl-20{padding-left:20px}.padding-horizontal-20,.ph-20{padding-left:20px;padding-right:20px}.padding-vertical-20,.pv-20{padding-top:20px;padding-bottom:20px}.p-25,.padding-25{padding:25px}.padding-top-25,.pt-25{padding-top:25px}.padding-right-25,.pr-25{padding-right:25px}.padding-bottom-25,.pb-25{padding-bottom:25px}.padding-left-25,.pl-25{padding-left:25px}.padding-horizontal-25,.ph-25{padding-left:25px;padding-right:25px}.padding-vertical-25,.pv-25{padding-top:25px;padding-bottom:25px}.p-30,.padding-30{padding:30px}.padding-top-30,.pt-30{padding-top:30px}.padding-right-30,.pr-30{padding-right:30px}.padding-bottom-30,.pb-30{padding-bottom:30px}.padding-left-30,.pl-30{padding-left:30px}.padding-horizontal-30,.ph-30{padding-left:30px;padding-right:30px}.padding-vertical-30,.pv-30{padding-top:30px;padding-bottom:30px}.p-35,.padding-35{padding:35px}.padding-top-35,.pt-35{padding-top:35px}.padding-right-35,.pr-35{padding-right:35px}.padding-bottom-35,.pb-35{padding-bottom:35px}.padding-left-35,.pl-35{padding-left:35px}.padding-horizontal-35,.ph-35{padding-left:35px;padding-right:35px}.padding-vertical-35,.pv-35{padding-top:35px;padding-bottom:35px}.p-40,.padding-40{padding:40px}.padding-top-40,.pt-40{padding-top:40px}.padding-right-40,.pr-40{padding-right:40px}.padding-bottom-40,.pb-40{padding-bottom:40px}.padding-left-40,.pl-40{padding-left:40px}.padding-horizontal-40,.ph-40{padding-left:40px;padding-right:40px}.padding-vertical-40,.pv-40{padding-top:40px;padding-bottom:40px}.p-45,.padding-45{padding:45px}.padding-top-45,.pt-45{padding-top:45px}.padding-right-45,.pr-45{padding-right:45px}.padding-bottom-45,.pb-45{padding-bottom:45px}.padding-left-45,.pl-45{padding-left:45px}.padding-horizontal-45,.ph-45{padding-left:45px;padding-right:45px}.padding-vertical-45,.pv-45{padding-top:45px;padding-bottom:45px}.p-50,.padding-50{padding:50px}.padding-top-50,.pt-50{padding-top:50px}.padding-right-50,.pr-50{padding-right:50px}.padding-bottom-50,.pb-50{padding-bottom:50px}.padding-left-50,.pl-50{padding-left:50px}.padding-horizontal-50,.ph-50{padding-left:50px;padding-right:50px}.padding-vertical-50,.pv-50{padding-top:50px;padding-bottom:50px}.p-55,.padding-55{padding:55px}.padding-top-55,.pt-55{padding-top:55px}.padding-right-55,.pr-55{padding-right:55px}.padding-bottom-55,.pb-55{padding-bottom:55px}.padding-left-55,.pl-55{padding-left:55px}.padding-horizontal-55,.ph-55{padding-left:55px;padding-right:55px}.padding-vertical-55,.pv-55{padding-top:55px;padding-bottom:55px}.p-60,.padding-60{padding:60px}.padding-top-60,.pt-60{padding-top:60px}.padding-right-60,.pr-60{padding-right:60px}.padding-bottom-60,.pb-60{padding-bottom:60px}.padding-left-60,.pl-60{padding-left:60px}.padding-horizontal-60,.ph-60{padding-left:60px;padding-right:60px}.padding-vertical-60,.pv-60{padding-top:60px;padding-bottom:60px}.p-65,.padding-65{padding:65px}.padding-top-65,.pt-65{padding-top:65px}.padding-right-65,.pr-65{padding-right:65px}.padding-bottom-65,.pb-65{padding-bottom:65px}.padding-left-65,.pl-65{padding-left:65px}.padding-horizontal-65,.ph-65{padding-left:65px;padding-right:65px}.padding-vertical-65,.pv-65{padding-top:65px;padding-bottom:65px}.p-70,.padding-70{padding:70px}.padding-top-70,.pt-70{padding-top:70px}.padding-right-70,.pr-70{padding-right:70px}.padding-bottom-70,.pb-70{padding-bottom:70px}.padding-left-70,.pl-70{padding-left:70px}.padding-horizontal-70,.ph-70{padding-left:70px;padding-right:70px}.padding-vertical-70,.pv-70{padding-top:70px;padding-bottom:70px}.p-75,.padding-75{padding:75px}.padding-top-75,.pt-75{padding-top:75px}.padding-right-75,.pr-75{padding-right:75px}.padding-bottom-75,.pb-75{padding-bottom:75px}.padding-left-75,.pl-75{padding-left:75px}.padding-horizontal-75,.ph-75{padding-left:75px;padding-right:75px}.padding-vertical-75,.pv-75{padding-top:75px;padding-bottom:75px}.p-80,.padding-80{padding:80px}.padding-top-80,.pt-80{padding-top:80px}.padding-right-80,.pr-80{padding-right:80px}.padding-bottom-80,.pb-80{padding-bottom:80px}.padding-left-80,.pl-80{padding-left:80px}.padding-horizontal-80,.ph-80{padding-left:80px;padding-right:80px}.padding-vertical-80,.pv-80{padding-top:80px;padding-bottom:80px}.p-85,.padding-85{padding:85px}.padding-top-85,.pt-85{padding-top:85px}.padding-right-85,.pr-85{padding-right:85px}.padding-bottom-85,.pb-85{padding-bottom:85px}.padding-left-85,.pl-85{padding-left:85px}.padding-horizontal-85,.ph-85{padding-left:85px;padding-right:85px}.padding-vertical-85,.pv-85{padding-top:85px;padding-bottom:85px}.p-90,.padding-90{padding:90px}.padding-top-90,.pt-90{padding-top:90px}.padding-right-90,.pr-90{padding-right:90px}.padding-bottom-90,.pb-90{padding-bottom:90px}.padding-left-90,.pl-90{padding-left:90px}.padding-horizontal-90,.ph-90{padding-left:90px;padding-right:90px}.padding-vertical-90,.pv-90{padding-top:90px;padding-bottom:90px}.p-95,.padding-95{padding:95px}.padding-top-95,.pt-95{padding-top:95px}.padding-right-95,.pr-95{padding-right:95px}.padding-bottom-95,.pb-95{padding-bottom:95px}.padding-left-95,.pl-95{padding-left:95px}.padding-horizontal-95,.ph-95{padding-left:95px;padding-right:95px}.padding-vertical-95,.pv-95{padding-top:95px;padding-bottom:95px}.p-100,.padding-100{padding:100px}.padding-top-100,.pt-100{padding-top:100px}.padding-right-100,.pr-100{padding-right:100px}.padding-bottom-100,.pb-100{padding-bottom:100px}.padding-left-100,.pl-100{padding-left:100px}.padding-horizontal-100,.ph-100{padding-left:100px;padding-right:100px}.padding-vertical-100,.pv-100{padding-top:100px;padding-bottom:100px}.p-8,.padding-8{padding:8px}.padding-top-8,.pt-8{padding-top:8px}.padding-right-8,.pr-8{padding-right:8px}.padding-bottom-8,.pb-8{padding-bottom:8px}.padding-left-8,.pl-8{padding-left:8px}.padding-horizontal-8,.ph-8{padding-left:8px;padding-right:8px}.padding-vertical-8,.pv-8{padding-top:8px;padding-bottom:8px}.p-16,.padding-16{padding:16px}.padding-top-16,.pt-16{padding-top:16px}.padding-right-16,.pr-16{padding-right:16px}.padding-bottom-16,.pb-16{padding-bottom:16px}.padding-left-16,.pl-16{padding-left:16px}.padding-horizontal-16,.ph-16{padding-left:16px;padding-right:16px}.padding-vertical-16,.pv-16{padding-top:16px;padding-bottom:16px}.p-24,.padding-24{padding:24px}.padding-top-24,.pt-24{padding-top:24px}.padding-right-24,.pr-24{padding-right:24px}.padding-bottom-24,.pb-24{padding-bottom:24px}.padding-left-24,.pl-24{padding-left:24px}.padding-horizontal-24,.ph-24{padding-left:24px;padding-right:24px}.padding-vertical-24,.pv-24{padding-top:24px;padding-bottom:24px}.p-32,.padding-32{padding:32px}.padding-top-32,.pt-32{padding-top:32px}.padding-right-32,.pr-32{padding-right:32px}.padding-bottom-32,.pb-32{padding-bottom:32px}.padding-left-32,.pl-32{padding-left:32px}.padding-horizontal-32,.ph-32{padding-left:32px;padding-right:32px}.padding-vertical-32,.pv-32{padding-top:32px;padding-bottom:32px}.p-48,.padding-48{padding:48px}.padding-top-48,.pt-48{padding-top:48px}.padding-right-48,.pr-48{padding-right:48px}.padding-bottom-48,.pb-48{padding-bottom:48px}.padding-left-48,.pl-48{padding-left:48px}.padding-horizontal-48,.ph-48{padding-left:48px;padding-right:48px}.padding-vertical-48,.pv-48{padding-top:48px;padding-bottom:48px}.p-56,.padding-56{padding:56px}.padding-top-56,.pt-56{padding-top:56px}.padding-right-56,.pr-56{padding-right:56px}.padding-bottom-56,.pb-56{padding-bottom:56px}.padding-left-56,.pl-56{padding-left:56px}.padding-horizontal-56,.ph-56{padding-left:56px;padding-right:56px}.padding-vertical-56,.pv-56{padding-top:56px;padding-bottom:56px}.p-64,.padding-64{padding:64px}.padding-top-64,.pt-64{padding-top:64px}.padding-right-64,.pr-64{padding-right:64px}.padding-bottom-64,.pb-64{padding-bottom:64px}.padding-left-64,.pl-64{padding-left:64px}.padding-horizontal-64,.ph-64{padding-left:64px;padding-right:64px}.padding-vertical-64,.pv-64{padding-top:64px;padding-bottom:64px}.p-72,.padding-72{padding:72px}.padding-top-72,.pt-72{padding-top:72px}.padding-right-72,.pr-72{padding-right:72px}.padding-bottom-72,.pb-72{padding-bottom:72px}.padding-left-72,.pl-72{padding-left:72px}.padding-horizontal-72,.ph-72{padding-left:72px;padding-right:72px}.padding-vertical-72,.pv-72{padding-top:72px;padding-bottom:72px}.p-88,.padding-88{padding:88px}.padding-top-88,.pt-88{padding-top:88px}.padding-right-88,.pr-88{padding-right:88px}.padding-bottom-88,.pb-88{padding-bottom:88px}.padding-left-88,.pl-88{padding-left:88px}.padding-horizontal-88,.ph-88{padding-left:88px;padding-right:88px}.padding-vertical-88,.pv-88{padding-top:88px;padding-bottom:88px}.p-96,.padding-96{padding:96px}.padding-top-96,.pt-96{padding-top:96px}.padding-right-96,.pr-96{padding-right:96px}.padding-bottom-96,.pb-96{padding-bottom:96px}.padding-left-96,.pl-96{padding-left:96px}.padding-horizontal-96,.ph-96{padding-left:96px;padding-right:96px}.padding-vertical-96,.pv-96{padding-top:96px;padding-bottom:96px}.m-0,.margin-0{margin:0}.margin-top-0,.mt-0{margin-top:0}.margin-right-0,.mr-0{margin-right:0}.margin-bottom-0,.mb-0{margin-bottom:0}.margin-left-0,.ml-0{margin-left:0}.margin-horizontal-0,.mh-0{margin-left:0;margin-right:0}.margin-vertical-0,.mv-0{margin-top:0;margin-bottom:0}.m-5,.margin-5{margin:5px}.margin-top-5,.mt-5{margin-top:5px}.margin-right-5,.mr-5{margin-right:5px}.margin-bottom-5,.mb-5{margin-bottom:5px}.margin-left-5,.ml-5{margin-left:5px}.margin-horizontal-5,.mh-5{margin-left:5px;margin-right:5px}.margin-vertical-5,.mv-5{margin-top:5px;margin-bottom:5px}.m-10,.margin-10{margin:10px}.margin-top-10,.mt-10{margin-top:10px}.margin-right-10,.mr-10{margin-right:10px}.margin-bottom-10,.mb-10{margin-bottom:10px}.margin-left-10,.ml-10{margin-left:10px}.margin-horizontal-10,.mh-10{margin-left:10px;margin-right:10px}.margin-vertical-10,.mv-10{margin-top:10px;margin-bottom:10px}.m-15,.margin-15{margin:15px}.margin-top-15,.mt-15{margin-top:15px}.margin-right-15,.mr-15{margin-right:15px}.margin-bottom-15,.mb-15{margin-bottom:15px}.margin-left-15,.ml-15{margin-left:15px}.margin-horizontal-15,.mh-15{margin-left:15px;margin-right:15px}.margin-vertical-15,.mv-15{margin-top:15px;margin-bottom:15px}.m-20,.margin-20{margin:20px}.margin-top-20,.mt-20{margin-top:20px}.margin-right-20,.mr-20{margin-right:20px}.margin-bottom-20,.mb-20{margin-bottom:20px}.margin-left-20,.ml-20{margin-left:20px}.margin-horizontal-20,.mh-20{margin-left:20px;margin-right:20px}.margin-vertical-20,.mv-20{margin-top:20px;margin-bottom:20px}.m-25,.margin-25{margin:25px}.margin-top-25,.mt-25{margin-top:25px}.margin-right-25,.mr-25{margin-right:25px}.margin-bottom-25,.mb-25{margin-bottom:25px}.margin-left-25,.ml-25{margin-left:25px}.margin-horizontal-25,.mh-25{margin-left:25px;margin-right:25px}.margin-vertical-25,.mv-25{margin-top:25px;margin-bottom:25px}.m-30,.margin-30{margin:30px}.margin-top-30,.mt-30{margin-top:30px}.margin-right-30,.mr-30{margin-right:30px}.margin-bottom-30,.mb-30{margin-bottom:30px}.margin-left-30,.ml-30{margin-left:30px}.margin-horizontal-30,.mh-30{margin-left:30px;margin-right:30px}.margin-vertical-30,.mv-30{margin-top:30px;margin-bottom:30px}.m-35,.margin-35{margin:35px}.margin-top-35,.mt-35{margin-top:35px}.margin-right-35,.mr-35{margin-right:35px}.margin-bottom-35,.mb-35{margin-bottom:35px}.margin-left-35,.ml-35{margin-left:35px}.margin-horizontal-35,.mh-35{margin-left:35px;margin-right:35px}.margin-vertical-35,.mv-35{margin-top:35px;margin-bottom:35px}.m-40,.margin-40{margin:40px}.margin-top-40,.mt-40{margin-top:40px}.margin-right-40,.mr-40{margin-right:40px}.margin-bottom-40,.mb-40{margin-bottom:40px}.margin-left-40,.ml-40{margin-left:40px}.margin-horizontal-40,.mh-40{margin-left:40px;margin-right:40px}.margin-vertical-40,.mv-40{margin-top:40px;margin-bottom:40px}.m-45,.margin-45{margin:45px}.margin-top-45,.mt-45{margin-top:45px}.margin-right-45,.mr-45{margin-right:45px}.margin-bottom-45,.mb-45{margin-bottom:45px}.margin-left-45,.ml-45{margin-left:45px}.margin-horizontal-45,.mh-45{margin-left:45px;margin-right:45px}.margin-vertical-45,.mv-45{margin-top:45px;margin-bottom:45px}.m-50,.margin-50{margin:50px}.margin-top-50,.mt-50{margin-top:50px}.margin-right-50,.mr-50{margin-right:50px}.margin-bottom-50,.mb-50{margin-bottom:50px}.margin-left-50,.ml-50{margin-left:50px}.margin-horizontal-50,.mh-50{margin-left:50px;margin-right:50px}.margin-vertical-50,.mv-50{margin-top:50px;margin-bottom:50px}.m-55,.margin-55{margin:55px}.margin-top-55,.mt-55{margin-top:55px}.margin-right-55,.mr-55{margin-right:55px}.margin-bottom-55,.mb-55{margin-bottom:55px}.margin-left-55,.ml-55{margin-left:55px}.margin-horizontal-55,.mh-55{margin-left:55px;margin-right:55px}.margin-vertical-55,.mv-55{margin-top:55px;margin-bottom:55px}.m-60,.margin-60{margin:60px}.margin-top-60,.mt-60{margin-top:60px}.margin-right-60,.mr-60{margin-right:60px}.margin-bottom-60,.mb-60{margin-bottom:60px}.margin-left-60,.ml-60{margin-left:60px}.margin-horizontal-60,.mh-60{margin-left:60px;margin-right:60px}.margin-vertical-60,.mv-60{margin-top:60px;margin-bottom:60px}.m-65,.margin-65{margin:65px}.margin-top-65,.mt-65{margin-top:65px}.margin-right-65,.mr-65{margin-right:65px}.margin-bottom-65,.mb-65{margin-bottom:65px}.margin-left-65,.ml-65{margin-left:65px}.margin-horizontal-65,.mh-65{margin-left:65px;margin-right:65px}.margin-vertical-65,.mv-65{margin-top:65px;margin-bottom:65px}.m-70,.margin-70{margin:70px}.margin-top-70,.mt-70{margin-top:70px}.margin-right-70,.mr-70{margin-right:70px}.margin-bottom-70,.mb-70{margin-bottom:70px}.margin-left-70,.ml-70{margin-left:70px}.margin-horizontal-70,.mh-70{margin-left:70px;margin-right:70px}.margin-vertical-70,.mv-70{margin-top:70px;margin-bottom:70px}.m-75,.margin-75{margin:75px}.margin-top-75,.mt-75{margin-top:75px}.margin-right-75,.mr-75{margin-right:75px}.margin-bottom-75,.mb-75{margin-bottom:75px}.margin-left-75,.ml-75{margin-left:75px}.margin-horizontal-75,.mh-75{margin-left:75px;margin-right:75px}.margin-vertical-75,.mv-75{margin-top:75px;margin-bottom:75px}.m-80,.margin-80{margin:80px}.margin-top-80,.mt-80{margin-top:80px}.margin-right-80,.mr-80{margin-right:80px}.margin-bottom-80,.mb-80{margin-bottom:80px}.margin-left-80,.ml-80{margin-left:80px}.margin-horizontal-80,.mh-80{margin-left:80px;margin-right:80px}.margin-vertical-80,.mv-80{margin-top:80px;margin-bottom:80px}.m-85,.margin-85{margin:85px}.margin-top-85,.mt-85{margin-top:85px}.margin-right-85,.mr-85{margin-right:85px}.margin-bottom-85,.mb-85{margin-bottom:85px}.margin-left-85,.ml-85{margin-left:85px}.margin-horizontal-85,.mh-85{margin-left:85px;margin-right:85px}.margin-vertical-85,.mv-85{margin-top:85px;margin-bottom:85px}.m-90,.margin-90{margin:90px}.margin-top-90,.mt-90{margin-top:90px}.margin-right-90,.mr-90{margin-right:90px}.margin-bottom-90,.mb-90{margin-bottom:90px}.margin-left-90,.ml-90{margin-left:90px}.margin-horizontal-90,.mh-90{margin-left:90px;margin-right:90px}.margin-vertical-90,.mv-90{margin-top:90px;margin-bottom:90px}.m-95,.margin-95{margin:95px}.margin-top-95,.mt-95{margin-top:95px}.margin-right-95,.mr-95{margin-right:95px}.margin-bottom-95,.mb-95{margin-bottom:95px}.margin-left-95,.ml-95{margin-left:95px}.margin-horizontal-95,.mh-95{margin-left:95px;margin-right:95px}.margin-vertical-95,.mv-95{margin-top:95px;margin-bottom:95px}.m-100,.margin-100{margin:100px}.margin-top-100,.mt-100{margin-top:100px}.margin-right-100,.mr-100{margin-right:100px}.margin-bottom-100,.mb-100{margin-bottom:100px}.margin-left-100,.ml-100{margin-left:100px}.margin-horizontal-100,.mh-100{margin-left:100px;margin-right:100px}.margin-vertical-100,.mv-100{margin-top:100px;margin-bottom:100px}.m-8,.margin-8{margin:8px}.margin-top-8,.mt-8{margin-top:8px}.margin-right-8,.mr-8{margin-right:8px}.margin-bottom-8,.mb-8{margin-bottom:8px}.margin-left-8,.ml-8{margin-left:8px}.margin-horizontal-8,.mh-8{margin-left:8px;margin-right:8px}.margin-vertical-8,.mv-8{margin-top:8px;margin-bottom:8px}.m-16,.margin-16{margin:16px}.margin-top-16,.mt-16{margin-top:16px}.margin-right-16,.mr-16{margin-right:16px}.margin-bottom-16,.mb-16{margin-bottom:16px}.margin-left-16,.ml-16{margin-left:16px}.margin-horizontal-16,.mh-16{margin-left:16px;margin-right:16px}.margin-vertical-16,.mv-16{margin-top:16px;margin-bottom:16px}.m-24,.margin-24{margin:24px}.margin-top-24,.mt-24{margin-top:24px}.margin-right-24,.mr-24{margin-right:24px}.margin-bottom-24,.mb-24{margin-bottom:24px}.margin-left-24,.ml-24{margin-left:24px}.margin-horizontal-24,.mh-24{margin-left:24px;margin-right:24px}.margin-vertical-24,.mv-24{margin-top:24px;margin-bottom:24px}.m-32,.margin-32{margin:32px}.margin-top-32,.mt-32{margin-top:32px}.margin-right-32,.mr-32{margin-right:32px}.margin-bottom-32,.mb-32{margin-bottom:32px}.margin-left-32,.ml-32{margin-left:32px}.margin-horizontal-32,.mh-32{margin-left:32px;margin-right:32px}.margin-vertical-32,.mv-32{margin-top:32px;margin-bottom:32px}.m-48,.margin-48{margin:48px}.margin-top-48,.mt-48{margin-top:48px}.margin-right-48,.mr-48{margin-right:48px}.margin-bottom-48,.mb-48{margin-bottom:48px}.margin-left-48,.ml-48{margin-left:48px}.margin-horizontal-48,.mh-48{margin-left:48px;margin-right:48px}.margin-vertical-48,.mv-48{margin-top:48px;margin-bottom:48px}.m-56,.margin-56{margin:56px}.margin-top-56,.mt-56{margin-top:56px}.margin-right-56,.mr-56{margin-right:56px}.margin-bottom-56,.mb-56{margin-bottom:56px}.margin-left-56,.ml-56{margin-left:56px}.margin-horizontal-56,.mh-56{margin-left:56px;margin-right:56px}.margin-vertical-56,.mv-56{margin-top:56px;margin-bottom:56px}.m-64,.margin-64{margin:64px}.margin-top-64,.mt-64{margin-top:64px}.margin-right-64,.mr-64{margin-right:64px}.margin-bottom-64,.mb-64{margin-bottom:64px}.margin-left-64,.ml-64{margin-left:64px}.margin-horizontal-64,.mh-64{margin-left:64px;margin-right:64px}.margin-vertical-64,.mv-64{margin-top:64px;margin-bottom:64px}.m-72,.margin-72{margin:72px}.margin-top-72,.mt-72{margin-top:72px}.margin-right-72,.mr-72{margin-right:72px}.margin-bottom-72,.mb-72{margin-bottom:72px}.margin-left-72,.ml-72{margin-left:72px}.margin-horizontal-72,.mh-72{margin-left:72px;margin-right:72px}.margin-vertical-72,.mv-72{margin-top:72px;margin-bottom:72px}.m-88,.margin-88{margin:88px}.margin-top-88,.mt-88{margin-top:88px}.margin-right-88,.mr-88{margin-right:88px}.margin-bottom-88,.mb-88{margin-bottom:88px}.margin-left-88,.ml-88{margin-left:88px}.margin-horizontal-88,.mh-88{margin-left:88px;margin-right:88px}.margin-vertical-88,.mv-88{margin-top:88px;margin-bottom:88px}.m-96,.margin-96{margin:96px}.margin-top-96,.mt-96{margin-top:96px}.margin-right-96,.mr-96{margin-right:96px}.margin-bottom-96,.mb-96{margin-bottom:96px}.margin-left-96,.ml-96{margin-left:96px}.margin-horizontal-96,.mh-96{margin-left:96px;margin-right:96px}.margin-vertical-96,.mv-96{margin-top:96px;margin-bottom:96px}.h-0,.height-0{height:0!important;min-height:0!important;max-height:0!important}.w-0,.width-0{width:0!important;min-width:0!important;max-width:0!important}.h-5,.height-5{height:5px!important;min-height:5px!important;max-height:5px!important}.w-5,.width-5{width:5px!important;min-width:5px!important;max-width:5px!important}.h-10,.height-10{height:10px!important;min-height:10px!important;max-height:10px!important}.w-10,.width-10{width:10px!important;min-width:10px!important;max-width:10px!important}.h-15,.height-15{height:15px!important;min-height:15px!important;max-height:15px!important}.w-15,.width-15{width:15px!important;min-width:15px!important;max-width:15px!important}.h-20,.height-20{height:20px!important;min-height:20px!important;max-height:20px!important}.w-20,.width-20{width:20px!important;min-width:20px!important;max-width:20px!important}.h-25,.height-25{height:25px!important;min-height:25px!important;max-height:25px!important}.w-25,.width-25{width:25px!important;min-width:25px!important;max-width:25px!important}.h-30,.height-30{height:30px!important;min-height:30px!important;max-height:30px!important}.w-30,.width-30{width:30px!important;min-width:30px!important;max-width:30px!important}.h-35,.height-35{height:35px!important;min-height:35px!important;max-height:35px!important}.w-35,.width-35{width:35px!important;min-width:35px!important;max-width:35px!important}.h-40,.height-40{height:40px!important;min-height:40px!important;max-height:40px!important}.w-40,.width-40{width:40px!important;min-width:40px!important;max-width:40px!important}.h-45,.height-45{height:45px!important;min-height:45px!important;max-height:45px!important}.w-45,.width-45{width:45px!important;min-width:45px!important;max-width:45px!important}.h-50,.height-50{height:50px!important;min-height:50px!important;max-height:50px!important}.w-50,.width-50{width:50px!important;min-width:50px!important;max-width:50px!important}.h-55,.height-55{height:55px!important;min-height:55px!important;max-height:55px!important}.w-55,.width-55{width:55px!important;min-width:55px!important;max-width:55px!important}.h-60,.height-60{height:60px!important;min-height:60px!important;max-height:60px!important}.w-60,.width-60{width:60px!important;min-width:60px!important;max-width:60px!important}.h-65,.height-65{height:65px!important;min-height:65px!important;max-height:65px!important}.w-65,.width-65{width:65px!important;min-width:65px!important;max-width:65px!important}.h-70,.height-70{height:70px!important;min-height:70px!important;max-height:70px!important}.w-70,.width-70{width:70px!important;min-width:70px!important;max-width:70px!important}.h-75,.height-75{height:75px!important;min-height:75px!important;max-height:75px!important}.w-75,.width-75{width:75px!important;min-width:75px!important;max-width:75px!important}.h-80,.height-80{height:80px!important;min-height:80px!important;max-height:80px!important}.w-80,.width-80{width:80px!important;min-width:80px!important;max-width:80px!important}.h-85,.height-85{height:85px!important;min-height:85px!important;max-height:85px!important}.w-85,.width-85{width:85px!important;min-width:85px!important;max-width:85px!important}.h-90,.height-90{height:90px!important;min-height:90px!important;max-height:90px!important}.w-90,.width-90{width:90px!important;min-width:90px!important;max-width:90px!important}.h-95,.height-95{height:95px!important;min-height:95px!important;max-height:95px!important}.w-95,.width-95{width:95px!important;min-width:95px!important;max-width:95px!important}.h-100,.height-100{height:100px!important;min-height:100px!important;max-height:100px!important}.w-100,.width-100{width:100px!important;min-width:100px!important;max-width:100px!important}.h-105,.height-105{height:105px!important;min-height:105px!important;max-height:105px!important}.w-105,.width-105{width:105px!important;min-width:105px!important;max-width:105px!important}.h-110,.height-110{height:110px!important;min-height:110px!important;max-height:110px!important}.w-110,.width-110{width:110px!important;min-width:110px!important;max-width:110px!important}.h-115,.height-115{height:115px!important;min-height:115px!important;max-height:115px!important}.w-115,.width-115{width:115px!important;min-width:115px!important;max-width:115px!important}.h-120,.height-120{height:120px!important;min-height:120px!important;max-height:120px!important}.w-120,.width-120{width:120px!important;min-width:120px!important;max-width:120px!important}.h-125,.height-125{height:125px!important;min-height:125px!important;max-height:125px!important}.w-125,.width-125{width:125px!important;min-width:125px!important;max-width:125px!important}.h-130,.height-130{height:130px!important;min-height:130px!important;max-height:130px!important}.w-130,.width-130{width:130px!important;min-width:130px!important;max-width:130px!important}.h-135,.height-135{height:135px!important;min-height:135px!important;max-height:135px!important}.w-135,.width-135{width:135px!important;min-width:135px!important;max-width:135px!important}.h-140,.height-140{height:140px!important;min-height:140px!important;max-height:140px!important}.w-140,.width-140{width:140px!important;min-width:140px!important;max-width:140px!important}.h-145,.height-145{height:145px!important;min-height:145px!important;max-height:145px!important}.w-145,.width-145{width:145px!important;min-width:145px!important;max-width:145px!important}.h-150,.height-150{height:150px!important;min-height:150px!important;max-height:150px!important}.w-150,.width-150{width:150px!important;min-width:150px!important;max-width:150px!important}.h-155,.height-155{height:155px!important;min-height:155px!important;max-height:155px!important}.w-155,.width-155{width:155px!important;min-width:155px!important;max-width:155px!important}.h-160,.height-160{height:160px!important;min-height:160px!important;max-height:160px!important}.w-160,.width-160{width:160px!important;min-width:160px!important;max-width:160px!important}.h-165,.height-165{height:165px!important;min-height:165px!important;max-height:165px!important}.w-165,.width-165{width:165px!important;min-width:165px!important;max-width:165px!important}.h-170,.height-170{height:170px!important;min-height:170px!important;max-height:170px!important}.w-170,.width-170{width:170px!important;min-width:170px!important;max-width:170px!important}.h-175,.height-175{height:175px!important;min-height:175px!important;max-height:175px!important}.w-175,.width-175{width:175px!important;min-width:175px!important;max-width:175px!important}.h-180,.height-180{height:180px!important;min-height:180px!important;max-height:180px!important}.w-180,.width-180{width:180px!important;min-width:180px!important;max-width:180px!important}.h-185,.height-185{height:185px!important;min-height:185px!important;max-height:185px!important}.w-185,.width-185{width:185px!important;min-width:185px!important;max-width:185px!important}.h-190,.height-190{height:190px!important;min-height:190px!important;max-height:190px!important}.w-190,.width-190{width:190px!important;min-width:190px!important;max-width:190px!important}.h-195,.height-195{height:195px!important;min-height:195px!important;max-height:195px!important}.w-195,.width-195{width:195px!important;min-width:195px!important;max-width:195px!important}.h-200,.height-200{height:200px!important;min-height:200px!important;max-height:200px!important}.w-200,.width-200{width:200px!important;min-width:200px!important;max-width:200px!important}.h-205,.height-205{height:205px!important;min-height:205px!important;max-height:205px!important}.w-205,.width-205{width:205px!important;min-width:205px!important;max-width:205px!important}.h-210,.height-210{height:210px!important;min-height:210px!important;max-height:210px!important}.w-210,.width-210{width:210px!important;min-width:210px!important;max-width:210px!important}.h-215,.height-215{height:215px!important;min-height:215px!important;max-height:215px!important}.w-215,.width-215{width:215px!important;min-width:215px!important;max-width:215px!important}.h-220,.height-220{height:220px!important;min-height:220px!important;max-height:220px!important}.w-220,.width-220{width:220px!important;min-width:220px!important;max-width:220px!important}.h-225,.height-225{height:225px!important;min-height:225px!important;max-height:225px!important}.w-225,.width-225{width:225px!important;min-width:225px!important;max-width:225px!important}.h-230,.height-230{height:230px!important;min-height:230px!important;max-height:230px!important}.w-230,.width-230{width:230px!important;min-width:230px!important;max-width:230px!important}.h-235,.height-235{height:235px!important;min-height:235px!important;max-height:235px!important}.w-235,.width-235{width:235px!important;min-width:235px!important;max-width:235px!important}.h-240,.height-240{height:240px!important;min-height:240px!important;max-height:240px!important}.w-240,.width-240{width:240px!important;min-width:240px!important;max-width:240px!important}.h-245,.height-245{height:245px!important;min-height:245px!important;max-height:245px!important}.w-245,.width-245{width:245px!important;min-width:245px!important;max-width:245px!important}.h-250,.height-250{height:250px!important;min-height:250px!important;max-height:250px!important}.w-250,.width-250{width:250px!important;min-width:250px!important;max-width:250px!important}.h-255,.height-255{height:255px!important;min-height:255px!important;max-height:255px!important}.w-255,.width-255{width:255px!important;min-width:255px!important;max-width:255px!important}.h-260,.height-260{height:260px!important;min-height:260px!important;max-height:260px!important}.w-260,.width-260{width:260px!important;min-width:260px!important;max-width:260px!important}.h-265,.height-265{height:265px!important;min-height:265px!important;max-height:265px!important}.w-265,.width-265{width:265px!important;min-width:265px!important;max-width:265px!important}.h-270,.height-270{height:270px!important;min-height:270px!important;max-height:270px!important}.w-270,.width-270{width:270px!important;min-width:270px!important;max-width:270px!important}.h-275,.height-275{height:275px!important;min-height:275px!important;max-height:275px!important}.w-275,.width-275{width:275px!important;min-width:275px!important;max-width:275px!important}.h-280,.height-280{height:280px!important;min-height:280px!important;max-height:280px!important}.w-280,.width-280{width:280px!important;min-width:280px!important;max-width:280px!important}.h-285,.height-285{height:285px!important;min-height:285px!important;max-height:285px!important}.w-285,.width-285{width:285px!important;min-width:285px!important;max-width:285px!important}.h-290,.height-290{height:290px!important;min-height:290px!important;max-height:290px!important}.w-290,.width-290{width:290px!important;min-width:290px!important;max-width:290px!important}.h-295,.height-295{height:295px!important;min-height:295px!important;max-height:295px!important}.w-295,.width-295{width:295px!important;min-width:295px!important;max-width:295px!important}.h-300,.height-300{height:300px!important;min-height:300px!important;max-height:300px!important}.w-300,.width-300{width:300px!important;min-width:300px!important;max-width:300px!important}.h-305,.height-305{height:305px!important;min-height:305px!important;max-height:305px!important}.w-305,.width-305{width:305px!important;min-width:305px!important;max-width:305px!important}.h-310,.height-310{height:310px!important;min-height:310px!important;max-height:310px!important}.w-310,.width-310{width:310px!important;min-width:310px!important;max-width:310px!important}.h-315,.height-315{height:315px!important;min-height:315px!important;max-height:315px!important}.w-315,.width-315{width:315px!important;min-width:315px!important;max-width:315px!important}.h-320,.height-320{height:320px!important;min-height:320px!important;max-height:320px!important}.w-320,.width-320{width:320px!important;min-width:320px!important;max-width:320px!important}.h-325,.height-325{height:325px!important;min-height:325px!important;max-height:325px!important}.w-325,.width-325{width:325px!important;min-width:325px!important;max-width:325px!important}.h-330,.height-330{height:330px!important;min-height:330px!important;max-height:330px!important}.w-330,.width-330{width:330px!important;min-width:330px!important;max-width:330px!important}.h-335,.height-335{height:335px!important;min-height:335px!important;max-height:335px!important}.w-335,.width-335{width:335px!important;min-width:335px!important;max-width:335px!important}.h-340,.height-340{height:340px!important;min-height:340px!important;max-height:340px!important}.w-340,.width-340{width:340px!important;min-width:340px!important;max-width:340px!important}.h-345,.height-345{height:345px!important;min-height:345px!important;max-height:345px!important}.w-345,.width-345{width:345px!important;min-width:345px!important;max-width:345px!important}.h-350,.height-350{height:350px!important;min-height:350px!important;max-height:350px!important}.w-350,.width-350{width:350px!important;min-width:350px!important;max-width:350px!important}.h-355,.height-355{height:355px!important;min-height:355px!important;max-height:355px!important}.w-355,.width-355{width:355px!important;min-width:355px!important;max-width:355px!important}.h-360,.height-360{height:360px!important;min-height:360px!important;max-height:360px!important}.w-360,.width-360{width:360px!important;min-width:360px!important;max-width:360px!important}.h-365,.height-365{height:365px!important;min-height:365px!important;max-height:365px!important}.w-365,.width-365{width:365px!important;min-width:365px!important;max-width:365px!important}.h-370,.height-370{height:370px!important;min-height:370px!important;max-height:370px!important}.w-370,.width-370{width:370px!important;min-width:370px!important;max-width:370px!important}.h-375,.height-375{height:375px!important;min-height:375px!important;max-height:375px!important}.w-375,.width-375{width:375px!important;min-width:375px!important;max-width:375px!important}.h-380,.height-380{height:380px!important;min-height:380px!important;max-height:380px!important}.w-380,.width-380{width:380px!important;min-width:380px!important;max-width:380px!important}.h-385,.height-385{height:385px!important;min-height:385px!important;max-height:385px!important}.w-385,.width-385{width:385px!important;min-width:385px!important;max-width:385px!important}.h-390,.height-390{height:390px!important;min-height:390px!important;max-height:390px!important}.w-390,.width-390{width:390px!important;min-width:390px!important;max-width:390px!important}.h-395,.height-395{height:395px!important;min-height:395px!important;max-height:395px!important}.w-395,.width-395{width:395px!important;min-width:395px!important;max-width:395px!important}.h-400,.height-400{height:400px!important;min-height:400px!important;max-height:400px!important}.w-400,.width-400{width:400px!important;min-width:400px!important;max-width:400px!important}.h-405,.height-405{height:405px!important;min-height:405px!important;max-height:405px!important}.w-405,.width-405{width:405px!important;min-width:405px!important;max-width:405px!important}.h-410,.height-410{height:410px!important;min-height:410px!important;max-height:410px!important}.w-410,.width-410{width:410px!important;min-width:410px!important;max-width:410px!important}.h-415,.height-415{height:415px!important;min-height:415px!important;max-height:415px!important}.w-415,.width-415{width:415px!important;min-width:415px!important;max-width:415px!important}.h-420,.height-420{height:420px!important;min-height:420px!important;max-height:420px!important}.w-420,.width-420{width:420px!important;min-width:420px!important;max-width:420px!important}.h-425,.height-425{height:425px!important;min-height:425px!important;max-height:425px!important}.w-425,.width-425{width:425px!important;min-width:425px!important;max-width:425px!important}.h-430,.height-430{height:430px!important;min-height:430px!important;max-height:430px!important}.w-430,.width-430{width:430px!important;min-width:430px!important;max-width:430px!important}.h-435,.height-435{height:435px!important;min-height:435px!important;max-height:435px!important}.w-435,.width-435{width:435px!important;min-width:435px!important;max-width:435px!important}.h-440,.height-440{height:440px!important;min-height:440px!important;max-height:440px!important}.w-440,.width-440{width:440px!important;min-width:440px!important;max-width:440px!important}.h-445,.height-445{height:445px!important;min-height:445px!important;max-height:445px!important}.w-445,.width-445{width:445px!important;min-width:445px!important;max-width:445px!important}.h-450,.height-450{height:450px!important;min-height:450px!important;max-height:450px!important}.w-450,.width-450{width:450px!important;min-width:450px!important;max-width:450px!important}.h-455,.height-455{height:455px!important;min-height:455px!important;max-height:455px!important}.w-455,.width-455{width:455px!important;min-width:455px!important;max-width:455px!important}.h-460,.height-460{height:460px!important;min-height:460px!important;max-height:460px!important}.w-460,.width-460{width:460px!important;min-width:460px!important;max-width:460px!important}.h-465,.height-465{height:465px!important;min-height:465px!important;max-height:465px!important}.w-465,.width-465{width:465px!important;min-width:465px!important;max-width:465px!important}.h-470,.height-470{height:470px!important;min-height:470px!important;max-height:470px!important}.w-470,.width-470{width:470px!important;min-width:470px!important;max-width:470px!important}.h-475,.height-475{height:475px!important;min-height:475px!important;max-height:475px!important}.w-475,.width-475{width:475px!important;min-width:475px!important;max-width:475px!important}.h-480,.height-480{height:480px!important;min-height:480px!important;max-height:480px!important}.w-480,.width-480{width:480px!important;min-width:480px!important;max-width:480px!important}.h-485,.height-485{height:485px!important;min-height:485px!important;max-height:485px!important}.w-485,.width-485{width:485px!important;min-width:485px!important;max-width:485px!important}.h-490,.height-490{height:490px!important;min-height:490px!important;max-height:490px!important}.w-490,.width-490{width:490px!important;min-width:490px!important;max-width:490px!important}.h-495,.height-495{height:495px!important;min-height:495px!important;max-height:495px!important}.w-495,.width-495{width:495px!important;min-width:495px!important;max-width:495px!important}.h-500,.height-500{height:500px!important;min-height:500px!important;max-height:500px!important}.w-500,.width-500{width:500px!important;min-width:500px!important;max-width:500px!important}.h-8,.height-8{height:8px!important;min-height:8px!important;max-height:8px!important}.w-8,.width-8{width:8px!important;min-width:8px!important;max-width:8px!important}.h-16,.height-16{height:16px!important;min-height:16px!important;max-height:16px!important}.w-16,.width-16{width:16px!important;min-width:16px!important;max-width:16px!important}.h-24,.height-24{height:24px!important;min-height:24px!important;max-height:24px!important}.w-24,.width-24{width:24px!important;min-width:24px!important;max-width:24px!important}.h-32,.height-32{height:32px!important;min-height:32px!important;max-height:32px!important}.w-32,.width-32{width:32px!important;min-width:32px!important;max-width:32px!important}.h-48,.height-48{height:48px!important;min-height:48px!important;max-height:48px!important}.w-48,.width-48{width:48px!important;min-width:48px!important;max-width:48px!important}.h-56,.height-56{height:56px!important;min-height:56px!important;max-height:56px!important}.w-56,.width-56{width:56px!important;min-width:56px!important;max-width:56px!important}.h-64,.height-64{height:64px!important;min-height:64px!important;max-height:64px!important}.w-64,.width-64{width:64px!important;min-width:64px!important;max-width:64px!important}.h-72,.height-72{height:72px!important;min-height:72px!important;max-height:72px!important}.w-72,.width-72{width:72px!important;min-width:72px!important;max-width:72px!important}.h-88,.height-88{height:88px!important;min-height:88px!important;max-height:88px!important}.w-88,.width-88{width:88px!important;min-width:88px!important;max-width:88px!important}.h-96,.height-96{height:96px!important;min-height:96px!important;max-height:96px!important}.w-96,.width-96{width:96px!important;min-width:96px!important;max-width:96px!important}.h-104,.height-104{height:104px!important;min-height:104px!important;max-height:104px!important}.w-104,.width-104{width:104px!important;min-width:104px!important;max-width:104px!important}.h-112,.height-112{height:112px!important;min-height:112px!important;max-height:112px!important}.w-112,.width-112{width:112px!important;min-width:112px!important;max-width:112px!important}.h-128,.height-128{height:128px!important;min-height:128px!important;max-height:128px!important}.w-128,.width-128{width:128px!important;min-width:128px!important;max-width:128px!important}.h-136,.height-136{height:136px!important;min-height:136px!important;max-height:136px!important}.w-136,.width-136{width:136px!important;min-width:136px!important;max-width:136px!important}.h-144,.height-144{height:144px!important;min-height:144px!important;max-height:144px!important}.w-144,.width-144{width:144px!important;min-width:144px!important;max-width:144px!important}.h-152,.height-152{height:152px!important;min-height:152px!important;max-height:152px!important}.w-152,.width-152{width:152px!important;min-width:152px!important;max-width:152px!important}.h-168,.height-168{height:168px!important;min-height:168px!important;max-height:168px!important}.w-168,.width-168{width:168px!important;min-width:168px!important;max-width:168px!important}.h-176,.height-176{height:176px!important;min-height:176px!important;max-height:176px!important}.w-176,.width-176{width:176px!important;min-width:176px!important;max-width:176px!important}.h-184,.height-184{height:184px!important;min-height:184px!important;max-height:184px!important}.w-184,.width-184{width:184px!important;min-width:184px!important;max-width:184px!important}.h-192,.height-192{height:192px!important;min-height:192px!important;max-height:192px!important}.w-192,.width-192{width:192px!important;min-width:192px!important;max-width:192px!important}.h-208,.height-208{height:208px!important;min-height:208px!important;max-height:208px!important}.w-208,.width-208{width:208px!important;min-width:208px!important;max-width:208px!important}.h-216,.height-216{height:216px!important;min-height:216px!important;max-height:216px!important}.w-216,.width-216{width:216px!important;min-width:216px!important;max-width:216px!important}.h-224,.height-224{height:224px!important;min-height:224px!important;max-height:224px!important}.w-224,.width-224{width:224px!important;min-width:224px!important;max-width:224px!important}.h-232,.height-232{height:232px!important;min-height:232px!important;max-height:232px!important}.w-232,.width-232{width:232px!important;min-width:232px!important;max-width:232px!important}.h-248,.height-248{height:248px!important;min-height:248px!important;max-height:248px!important}.w-248,.width-248{width:248px!important;min-width:248px!important;max-width:248px!important}.h-256,.height-256{height:256px!important;min-height:256px!important;max-height:256px!important}.w-256,.width-256{width:256px!important;min-width:256px!important;max-width:256px!important}.h-264,.height-264{height:264px!important;min-height:264px!important;max-height:264px!important}.w-264,.width-264{width:264px!important;min-width:264px!important;max-width:264px!important}.h-272,.height-272{height:272px!important;min-height:272px!important;max-height:272px!important}.w-272,.width-272{width:272px!important;min-width:272px!important;max-width:272px!important}.h-288,.height-288{height:288px!important;min-height:288px!important;max-height:288px!important}.w-288,.width-288{width:288px!important;min-width:288px!important;max-width:288px!important}.h-296,.height-296{height:296px!important;min-height:296px!important;max-height:296px!important}.w-296,.width-296{width:296px!important;min-width:296px!important;max-width:296px!important}.h-304,.height-304{height:304px!important;min-height:304px!important;max-height:304px!important}.w-304,.width-304{width:304px!important;min-width:304px!important;max-width:304px!important}.h-312,.height-312{height:312px!important;min-height:312px!important;max-height:312px!important}.w-312,.width-312{width:312px!important;min-width:312px!important;max-width:312px!important}.h-328,.height-328{height:328px!important;min-height:328px!important;max-height:328px!important}.w-328,.width-328{width:328px!important;min-width:328px!important;max-width:328px!important}.h-336,.height-336{height:336px!important;min-height:336px!important;max-height:336px!important}.w-336,.width-336{width:336px!important;min-width:336px!important;max-width:336px!important}.h-344,.height-344{height:344px!important;min-height:344px!important;max-height:344px!important}.w-344,.width-344{width:344px!important;min-width:344px!important;max-width:344px!important}.h-352,.height-352{height:352px!important;min-height:352px!important;max-height:352px!important}.w-352,.width-352{width:352px!important;min-width:352px!important;max-width:352px!important}.h-368,.height-368{height:368px!important;min-height:368px!important;max-height:368px!important}.w-368,.width-368{width:368px!important;min-width:368px!important;max-width:368px!important}.h-376,.height-376{height:376px!important;min-height:376px!important;max-height:376px!important}.w-376,.width-376{width:376px!important;min-width:376px!important;max-width:376px!important}.h-384,.height-384{height:384px!important;min-height:384px!important;max-height:384px!important}.w-384,.width-384{width:384px!important;min-width:384px!important;max-width:384px!important}.h-392,.height-392{height:392px!important;min-height:392px!important;max-height:392px!important}.w-392,.width-392{width:392px!important;min-width:392px!important;max-width:392px!important}.h-408,.height-408{height:408px!important;min-height:408px!important;max-height:408px!important}.w-408,.width-408{width:408px!important;min-width:408px!important;max-width:408px!important}.h-416,.height-416{height:416px!important;min-height:416px!important;max-height:416px!important}.w-416,.width-416{width:416px!important;min-width:416px!important;max-width:416px!important}.h-424,.height-424{height:424px!important;min-height:424px!important;max-height:424px!important}.w-424,.width-424{width:424px!important;min-width:424px!important;max-width:424px!important}.h-432,.height-432{height:432px!important;min-height:432px!important;max-height:432px!important}.w-432,.width-432{width:432px!important;min-width:432px!important;max-width:432px!important}.h-448,.height-448{height:448px!important;min-height:448px!important;max-height:448px!important}.w-448,.width-448{width:448px!important;min-width:448px!important;max-width:448px!important}.h-456,.height-456{height:456px!important;min-height:456px!important;max-height:456px!important}.w-456,.width-456{width:456px!important;min-width:456px!important;max-width:456px!important}.h-464,.height-464{height:464px!important;min-height:464px!important;max-height:464px!important}.w-464,.width-464{width:464px!important;min-width:464px!important;max-width:464px!important}.h-472,.height-472{height:472px!important;min-height:472px!important;max-height:472px!important}.w-472,.width-472{width:472px!important;min-width:472px!important;max-width:472px!important}.h-488,.height-488{height:488px!important;min-height:488px!important;max-height:488px!important}.w-488,.width-488{width:488px!important;min-width:488px!important;max-width:488px!important}.h-496,.height-496{height:496px!important;min-height:496px!important;max-height:496px!important}.w-496,.width-496{width:496px!important;min-width:496px!important;max-width:496px!important}.h-504,.height-504{height:504px!important;min-height:504px!important;max-height:504px!important}.w-504,.width-504{width:504px!important;min-width:504px!important;max-width:504px!important}.h-512,.height-512{height:512px!important;min-height:512px!important;max-height:512px!important}.w-512,.width-512{width:512px!important;min-width:512px!important;max-width:512px!important}.h-528,.height-528{height:528px!important;min-height:528px!important;max-height:528px!important}.w-528,.width-528{width:528px!important;min-width:528px!important;max-width:528px!important}.h-536,.height-536{height:536px!important;min-height:536px!important;max-height:536px!important}.w-536,.width-536{width:536px!important;min-width:536px!important;max-width:536px!important}.h-544,.height-544{height:544px!important;min-height:544px!important;max-height:544px!important}.w-544,.width-544{width:544px!important;min-width:544px!important;max-width:544px!important}.h-552,.height-552{height:552px!important;min-height:552px!important;max-height:552px!important}.w-552,.width-552{width:552px!important;min-width:552px!important;max-width:552px!important}.h-568,.height-568{height:568px!important;min-height:568px!important;max-height:568px!important}.w-568,.width-568{width:568px!important;min-width:568px!important;max-width:568px!important}.h-576,.height-576{height:576px!important;min-height:576px!important;max-height:576px!important}.w-576,.width-576{width:576px!important;min-width:576px!important;max-width:576px!important}.h-584,.height-584{height:584px!important;min-height:584px!important;max-height:584px!important}.w-584,.width-584{width:584px!important;min-width:584px!important;max-width:584px!important}.h-592,.height-592{height:592px!important;min-height:592px!important;max-height:592px!important}.w-592,.width-592{width:592px!important;min-width:592px!important;max-width:592px!important}.h-608,.height-608{height:608px!important;min-height:608px!important;max-height:608px!important}.w-608,.width-608{width:608px!important;min-width:608px!important;max-width:608px!important}.h-616,.height-616{height:616px!important;min-height:616px!important;max-height:616px!important}.w-616,.width-616{width:616px!important;min-width:616px!important;max-width:616px!important}.h-624,.height-624{height:624px!important;min-height:624px!important;max-height:624px!important}.w-624,.width-624{width:624px!important;min-width:624px!important;max-width:624px!important}.h-632,.height-632{height:632px!important;min-height:632px!important;max-height:632px!important}.w-632,.width-632{width:632px!important;min-width:632px!important;max-width:632px!important}.h-648,.height-648{height:648px!important;min-height:648px!important;max-height:648px!important}.w-648,.width-648{width:648px!important;min-width:648px!important;max-width:648px!important}.h-656,.height-656{height:656px!important;min-height:656px!important;max-height:656px!important}.w-656,.width-656{width:656px!important;min-width:656px!important;max-width:656px!important}.h-664,.height-664{height:664px!important;min-height:664px!important;max-height:664px!important}.w-664,.width-664{width:664px!important;min-width:664px!important;max-width:664px!important}.h-672,.height-672{height:672px!important;min-height:672px!important;max-height:672px!important}.w-672,.width-672{width:672px!important;min-width:672px!important;max-width:672px!important}.h-688,.height-688{height:688px!important;min-height:688px!important;max-height:688px!important}.w-688,.width-688{width:688px!important;min-width:688px!important;max-width:688px!important}.h-696,.height-696{height:696px!important;min-height:696px!important;max-height:696px!important}.w-696,.width-696{width:696px!important;min-width:696px!important;max-width:696px!important}.h-704,.height-704{height:704px!important;min-height:704px!important;max-height:704px!important}.w-704,.width-704{width:704px!important;min-width:704px!important;max-width:704px!important}.h-712,.height-712{height:712px!important;min-height:712px!important;max-height:712px!important}.w-712,.width-712{width:712px!important;min-width:712px!important;max-width:712px!important}.h-728,.height-728{height:728px!important;min-height:728px!important;max-height:728px!important}.w-728,.width-728{width:728px!important;min-width:728px!important;max-width:728px!important}.h-736,.height-736{height:736px!important;min-height:736px!important;max-height:736px!important}.w-736,.width-736{width:736px!important;min-width:736px!important;max-width:736px!important}.h-744,.height-744{height:744px!important;min-height:744px!important;max-height:744px!important}.w-744,.width-744{width:744px!important;min-width:744px!important;max-width:744px!important}.h-752,.height-752{height:752px!important;min-height:752px!important;max-height:752px!important}.w-752,.width-752{width:752px!important;min-width:752px!important;max-width:752px!important}.h-768,.height-768{height:768px!important;min-height:768px!important;max-height:768px!important}.w-768,.width-768{width:768px!important;min-width:768px!important;max-width:768px!important}.h-776,.height-776{height:776px!important;min-height:776px!important;max-height:776px!important}.w-776,.width-776{width:776px!important;min-width:776px!important;max-width:776px!important}.h-784,.height-784{height:784px!important;min-height:784px!important;max-height:784px!important}.w-784,.width-784{width:784px!important;min-width:784px!important;max-width:784px!important}.h-792,.height-792{height:792px!important;min-height:792px!important;max-height:792px!important}.w-792,.width-792{width:792px!important;min-width:792px!important;max-width:792px!important}.b,.border{border:1px solid rgba(0,0,0,.12)}.border-top,.bt{border-top:1px solid rgba(0,0,0,.12)}.border-right,.br{border-right:1px solid rgba(0,0,0,.12)}.bb,.border-bottom{border-bottom:1px solid rgba(0,0,0,.12)}.bl,.border-left{border-left:1px solid rgba(0,0,0,.12)}.bh,.border-horizontal{border-left:1px solid rgba(0,0,0,.12);border-right:1px solid rgba(0,0,0,.12)}.border-vertical,.bv{border-top:1px solid rgba(0,0,0,.12);border-bottom:1px solid rgba(0,0,0,.12)}.brad-1{border-radius:1px}.brad-2{border-radius:2px}.brad-3{border-radius:3px}.brad-4{border-radius:4px}.brad-5{border-radius:5px}.brad-6{border-radius:6px}.brad-7{border-radius:7px}.brad-8{border-radius:8px}.brad-9{border-radius:9px}.brad-10{border-radius:10px}.brad-11{border-radius:11px}.brad-12{border-radius:12px}@media all{.page-break{display:none}}@media print{.page-break{display:block;break-after:always;page-break-after:always}#main #vertical-navigation{display:none}#main #toolbar{display:none}#main #quick-panel{display:none}#main #content{position:relative!important;top:0!important;right:0!important;bottom:0!important;left:0!important;background:0 0!important}ms-theme-options{display:none}.ps-scrollbar-x-rail,.ps-scrollbar-y-rail{display:none!important}.printable{overflow:visible!important}.printable .template-layout{display:inline!important}}.advanced-search-container{border-bottom:1px rgba(0,0,0,.12) solid}.advanced-search-conditions{border-bottom:1px rgba(0,0,0,.12) solid;padding:4px 0}.advanced-search-conditions .errors{font-size:12px;color:#dd2c00;margin-top:10px}.advanced-search-conditions .advanced-search-chips md-chips-wrap{box-shadow:none}.advanced-search-conditions .advanced-search-chips md-chip{position:relative}.advanced-search-conditions .advanced-search-chips md-chip .md-chip-content md-chip-template span p.filter-text{display:inline-block;margin:0}.advanced-search-conditions .advanced-search-chips md-chip .md-chip-remove-container{position:absolute;right:4px;top:4px;margin-right:0;height:24px}.advanced-search-conditions .advanced-search-chips md-chip .md-chip-remove-container button.remove-filter{position:relative;height:24px;width:24px;line-height:30px;text-align:center;border-radius:50%;border:none;box-shadow:none;padding:0;margin:0;transition:background .15s linear;display:block}.advanced-search-conditions .advanced-search-chips md-chip .md-chip-remove-container button.remove-filter md-icon{position:absolute;top:50%;left:50%;transform:translate3d(-50%,-50%,0);color:#616161}.advanced-search-conditions .advanced-search-chips md-chip .md-chip-remove-container button.remove-filter md-icon:focus,.advanced-search-conditions .advanced-search-chips md-chip .md-chip-remove-container button.remove-filter md-icon:hover{color:rgba(255,0,0,.8)}.advanced-search-conditions .advanced-search-chips md-chips-wrap.md-removable md-chip md-chip-template{padding-right:5px}.advanced-search-bar{padding:10px 0}.advanced-search-bar md-input-container.no-errors{font-size:12px;transition:0s none;-webkit-transition:0s none;animation:0s none;-webkit-animation:0s none}.advanced-search-bar md-input-container.no-errors input{font-family:Arial Unicode MS,Arial,Helvetica}.advanced-search-bar md-input-container.no-errors .md-errors-spacer{min-height:0}md-option div div.operators-list{display:table}md-option div div.operators-list span{display:table-cell}md-option div div.operators-list span.operator-symbol{display:table-cell;font-size:14px;width:30px}.advanced-search-bar mdp-date-picker button{margin:0!important}.advanced-search-bar mdp-date-picker md-input-container{flex:1;margin:0}.advanced-search-bar mdp-date-picker md-input-container label{font-size:12px}.advanced-search-bar mdp-date-picker md-input-container .md-errors-spacer{min-height:0}.advanced-search-bar div md-date-range{font-size:12px;margin-left:10px}.advanced-search-bar div.autocomplete-input md-icon{margin:8px 8px 8px 0}.advanced-search-bar div.autocomplete-input md-autocomplete{font-size:12px!important}.advanced-search-bar div.autocomplete-input md-autocomplete md-autocomplete-wrap{height:0}.advanced-search-bar div.autocomplete-input md-autocomplete md-autocomplete-wrap md-input-container{margin:0}.advanced-search-bar div.autocomplete-input md-autocomplete md-autocomplete-wrap md-input-container input[type=search]{padding:0!important}.advanced-search-bar div.autocomplete-input md-autocomplete md-autocomplete-wrap md-input-container div.md-errors-spacer{min-height:0}md-toolbar.advanced-search-dialog-header{background-image:url(/assets/images/backgrounds/header-bg.png);background-position:top}.md-autocomplete-suggestions-container li .highlight,.md-autocomplete-suggestions-container.md-default-theme li .highlight{color:#ca1d1d;font-weight:700}.chip-disabled{opacity:.4}.ms-card{display:flex;flex-direction:row;padding:8px}.ms-card .ms-card-content-wrapper{position:relative;overflow:hidden;width:100%;max-width:400px;border-radius:2px;background:#fff;box-shadow:0 3px 1px -2px rgba(0,0,0,.14),0 2px 2px 0 rgba(0,0,0,.098),0 1px 5px 0 rgba(0,0,0,.084)}.ms-card .template-1 .media .image{width:100%;border-radius:2px 2px 0 0}.ms-card .template-10 .media{width:80px;min-width:80px;max-width:80px}.ms-card .template-2 .header .avatar .image{display:block;width:40px;height:40px;border-radius:20px}.ms-card .template-2 .media .image{width:100%}.ms-card .template-4 .info{position:absolute;right:0;bottom:0;left:0;z-index:2;background:rgba(0,0,0,.54)}.ms-card .template-4 .media{z-index:1}.ms-card .template-4 .media .image{width:100%}.ms-card .template-5 .media{width:80px;min-width:80px;max-width:80px}.ms-card .template-5 .info,.ms-card .template-5 .media{-ms-flex:0 1 auto}.ms-card .template-8 .media .image{width:100%;border-radius:2px 2px 0 0}.ms-card .template-9 .header .avatar .image{display:block;width:40px;height:40px;border-radius:20px}.ms-card .template-9 .media .image{width:100%}md-list-item .md-list-item-text p.ms-dual-multiselect-line-xs{font-size:10px!important;padding-top:5px}md-list-item md-icon.hidden{visibility:hidden}md-icon.add-disabled{cursor:default!important;opacity:.4}md-list-item.read-only-mode{cursor:none!important}.ms-form-wizard{background:#fff;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}.ms-form-wizard md-tabs md-tabs-wrapper{box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}.ms-form-wizard md-tabs md-tabs-wrapper md-tabs-canvas{height:72px}.ms-form-wizard md-tabs md-tabs-wrapper md-tabs-canvas md-pagination-wrapper{height:72px}.ms-form-wizard md-tabs md-tabs-wrapper md-tabs-canvas md-pagination-wrapper md-tab-item{opacity:1!important;padding:24px}.ms-form-wizard md-tabs md-tabs-wrapper md-tabs-canvas md-pagination-wrapper md-tab-item:before{content:'';display:block;position:absolute;top:50%;left:0;right:50%;border-bottom:1px solid rgba(0,0,0,.12);z-index:8}.ms-form-wizard md-tabs md-tabs-wrapper md-tabs-canvas md-pagination-wrapper md-tab-item:after{content:'';display:block;position:absolute;top:50%;left:50%;right:0;border-bottom:1px solid rgba(0,0,0,.12);z-index:8}.ms-form-wizard md-tabs md-tabs-wrapper md-tabs-canvas md-pagination-wrapper md-tab-item:first-of-type:before{display:none}.ms-form-wizard md-tabs md-tabs-wrapper md-tabs-canvas md-pagination-wrapper md-tab-item:last-of-type:after{display:none}.ms-form-wizard md-tabs md-tabs-wrapper md-tabs-canvas md-pagination-wrapper md-tab-item.md-disabled .ms-form-wizard-step-label .ms-form-wizard-step-number{background:rgba(0,0,0,.12)!important}.ms-form-wizard md-tabs md-tabs-wrapper md-tabs-canvas md-pagination-wrapper md-tab-item .md-ripple-container{z-index:11}.ms-form-wizard md-tabs md-tabs-wrapper md-tabs-canvas md-ink-bar{display:none!important}.ms-form-wizard .ms-form-wizard-step-label{display:inline-block;position:relative;background:#fff;z-index:10;padding:0 16px;line-height:24px}.ms-form-wizard .ms-form-wizard-step-label .ms-form-wizard-step-number{display:inline-block;vertical-align:middle;width:24px;height:24px;line-height:24px;font-size:14px;margin-right:12px;border-radius:50%;color:#fff!important}.ms-form-wizard .ms-form-wizard-step-label .ms-form-wizard-step-number i{line-height:24px!important}.ms-form-wizard .ms-form-wizard-step-label .ms-form-wizard-step-text{display:inline-block;vertical-align:middle;position:relative;line-height:24px}.ms-form-wizard .ms-form-wizard-form{padding:24px 16px}.ms-form-wizard .navigation{padding:16px}.ms-form-wizard .navigation .steps{display:flex;align-items:center;justify-content:center;padding:0 16px}.ms-form-wizard .navigation .steps span{width:5px;height:5px;margin:0 4px;border-radius:50%}.ms-form-wizard .navigation .steps span:not(.md-accent-bg){background:rgba(0,0,0,.12)}.ms-form-wizard .navigation .steps span.selected{width:8px;height:8px}ms-info-bar{display:block;position:relative;width:100%;height:44px;background-color:#e91e63;z-index:99998;box-shadow:0 1px 5px 0 rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12)}ms-info-bar #ms-info-bar-message{padding:8px 16px;line-height:28px;font-size:14px}ms-info-bar #ms-info-bar-message a{overflow:hidden;height:48px;color:#fff}ms-masonry{width:100%;display:block}ms-masonry [ms-masonry-item],ms-masonry ms-masonry-item{transition:transform .3s ease;position:absolute;transform:translate3d(50vw,100vh,0)}ms-material-color-picker md-menu .md-button{font-size:12px}md-menu-content.ms-material-color-picker-menu-content{width:208px;max-width:208px;min-width:208px;padding:0;overflow:hidden}md-menu-content.ms-material-color-picker-menu-content header{height:48px;text-transform:uppercase}md-menu-content.ms-material-color-picker-menu-content header .md-button{display:flex;margin:0}md-menu-content.ms-material-color-picker-menu-content header>span{line-height:13px}md-menu-content.ms-material-color-picker-menu-content .colors{position:relative;width:208px;min-height:258px;height:258px;padding:4px}md-menu-content.ms-material-color-picker-menu-content .colors .color{position:relative;width:46px;height:46px;margin:2px;border-radius:0;cursor:pointer}md-menu-content.ms-material-color-picker-menu-content .colors .color .label{padding:2px;font-size:10px}md-menu-content.ms-material-color-picker-menu-content .colors .color .icon-check{position:absolute;top:2px;right:2px;font-size:16px;opacity:.7}ms-nav{display:block;position:relative;color:rgba(255,255,255,.7);user-select:none;z-index:70}ms-nav ms-nav-item{display:block;position:relative;line-height:48px}ms-nav ms-nav-item.ms-nav-title{line-height:32px;font-size:12px;font-weight:500;margin-top:8px;padding:0 24px;width:100%;color:rgba(255,255,255,.3);text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}ms-nav ms-nav-item .ms-nav-button{display:flex;align-self:flex-start;align-items:center;position:relative;cursor:pointer;padding:0 48px 0 24px;color:rgba(255,255,255,.7);text-decoration:none}ms-nav ms-nav-item .ms-nav-button:not(.active):hover{background:rgba(0,0,0,.1);text-decoration:none}ms-nav ms-nav-item .ms-nav-button .ms-nav-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:opacity .2s ease-in-out .1s}ms-nav ms-nav-item .ms-nav-button .arrow{position:absolute;top:16px;right:24px;margin:0;transition:transform .3s ease-in-out,opacity .2s ease-in-out .1s}ms-nav ms-nav-item .ms-nav-button .ms-nav-badge{position:absolute;top:50%;right:24px;min-width:20px;height:20px;line-height:20px;padding:0 7px;font-size:11px;font-weight:700;border-radius:20px;transform:translateY(-50%);transition:opacity .2s ease-in-out .1s}ms-nav ms-nav-item .ms-nav-button.active{color:#fff!important}ms-nav ms-nav-item .ms-nav-button.active .ms-nav-badge{background:#fff!important;color:rgba(0,0,0,.87)!important}ms-nav ms-nav-item .ms-nav-button.active i{color:#fff}ms-nav ms-nav-item i{color:rgba(255,255,255,.7);margin:0 16px 0 0}ms-nav .ms-nav-toggle ms-nav-toggle-items{display:none;overflow:hidden}ms-nav .ms-nav-toggle ms-nav-toggle-items.expand-animation{transition:height .35s cubic-bezier(.25,.46,.45,.94)}ms-nav .ms-nav-toggle ms-nav-toggle-items.collapse-animation{transition:height .35s cubic-bezier(.25,.46,.45,.94)}ms-nav .ms-nav-toggle ms-nav-toggle-items ms-nav-item .ms-nav-button{padding-left:58px}ms-nav .ms-nav-toggle ms-nav-toggle-items ms-nav-item ms-nav-toggle-items ms-nav-item .ms-nav-button{padding-left:68px}ms-nav .ms-nav-toggle ms-nav-toggle-items ms-nav-item ms-nav-toggle-items ms-nav-item ms-nav-toggle-items ms-nav-item .ms-nav-button{padding-left:78px}ms-nav .ms-nav-toggle ms-nav-toggle-items ms-nav-item ms-nav-toggle-items ms-nav-item ms-nav-toggle-items ms-nav-item ms-nav-toggle-items ms-nav-item .ms-nav-button{padding-left:88px}ms-nav .ms-nav-toggle ms-nav-toggle-items ms-nav-item ms-nav-toggle-items ms-nav-item ms-nav-toggle-items ms-nav-item ms-nav-toggle-items ms-nav-item ms-nav-toggle-items ms-nav-item .ms-nav-button{padding-left:98px}ms-nav .ms-nav-toggle.active>.ms-nav-button{color:#fff}ms-nav .ms-nav-toggle.active>.ms-nav-button a,ms-nav .ms-nav-toggle.active>.ms-nav-button md-icon{color:#fff}ms-nav .ms-nav-toggle[collapsed=false]>.ms-nav-button>.arrow{transform:rotate(90deg)}ms-nav>.ms-nav-toggle[collapsed=false]{background-color:rgba(0,0,0,.12)}@media only screen and (min-width:1280px){.ms-nav-folded #ms-nav-fold-close-overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:0 0;z-index:998}.ms-nav-folded #ms-nav-fold-open-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:999}.ms-nav-folded:not(.ms-nav-folded-open) ms-nav ms-nav-item.ms-nav-title{height:32px}.ms-nav-folded:not(.ms-nav-folded-open) ms-nav ms-nav-item.ms-nav-title:before{content:'';display:block;position:relative;top:12px;width:16px;border-top:1px solid rgba(255,255,255,.12)}.ms-nav-folded:not(.ms-nav-folded-open) ms-nav ms-nav-item.ms-nav-title span{display:none}.ms-nav-folded:not(.ms-nav-folded-open) ms-nav ms-nav-item .ms-nav-button{height:48px}.ms-nav-folded:not(.ms-nav-folded-open) ms-nav ms-nav-item .ms-nav-button>.arrow,.ms-nav-folded:not(.ms-nav-folded-open) ms-nav ms-nav-item .ms-nav-button>.ms-nav-badge,.ms-nav-folded:not(.ms-nav-folded-open) ms-nav ms-nav-item .ms-nav-button>.ms-nav-label{opacity:0;visibility:hidden}}.ms-navigation{display:block;position:relative;color:rgba(255,255,255,.7);user-select:none}.ms-navigation li,.ms-navigation ul{padding:0;margin:0}.ms-navigation ul{display:block;overflow:hidden}.ms-navigation ul li{position:relative}.ms-navigation ul li.collapsed ul{display:none}.ms-navigation .animate-height{transition:height .25s cubic-bezier(.25,.46,.45,.94)}.ms-navigation .ms-navigation-node .ms-navigation-item{display:block;position:relative;cursor:pointer;color:rgba(255,255,255,.7)}.ms-navigation .ms-navigation-node .ms-navigation-item:hover{background:rgba(0,0,0,.1)}.ms-navigation .ms-navigation-node .ms-navigation-item>.ms-navigation-button{display:flex;position:relative;width:100%;height:48px;line-height:48px;flex-direction:row;justify-content:flex-start;align-items:center;padding-right:16px;color:rgba(255,255,255,.7);text-decoration:none;white-space:nowrap;overflow:hidden}.ms-navigation .ms-navigation-node .ms-navigation-item>.ms-navigation-button .icon{color:rgba(255,255,255,.7);margin:0 16px 0 0}.ms-navigation .ms-navigation-node .ms-navigation-item>.ms-navigation-button span{white-space:nowrap;overflow:hidden;opacity:1;transition:opacity .25s ease-in-out .1s}.ms-navigation .ms-navigation-node .ms-navigation-item>.ms-navigation-button a{white-space:nowrap;overflow:hidden;opacity:1;transition:opacity .25s ease-in-out .1s}.ms-navigation .ms-navigation-node .ms-navigation-item>.ms-navigation-button .arrow{margin:0;opacity:1;transition:transform .3s ease-in-out,opacity .25s ease-in-out .1s}.ms-navigation .ms-navigation-node .ms-navigation-item>.ms-navigation-button .badge{position:absolute;top:50%;right:16px;min-width:20px;height:20px;line-height:20px;padding:0 7px;font-size:11px;font-weight:700;border-radius:20px;transform:translateY(-50%);transition:opacity .2s ease-in-out .1s}.ms-navigation .ms-navigation-node .ms-navigation-item>.ms-navigation-button.active{color:#fff}.ms-navigation .ms-navigation-node .ms-navigation-item>.ms-navigation-button.active .icon{color:#fff}.ms-navigation .ms-navigation-node .ms-navigation-item>.ms-navigation-button.active .badge{background:#fff!important;color:rgba(0,0,0,.87)!important}.ms-navigation .ms-navigation-node:not(.collapsed)>.ms-navigation-item>.ms-navigation-button .arrow{transform:rotate(90deg)}.ms-navigation .ms-navigation-node.group>.ms-navigation-item{font-size:12px;font-weight:500;margin-top:8px;cursor:auto;background:0 0!important;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ms-navigation .ms-navigation-node.group>.ms-navigation-item>.ms-navigation-button{height:32px;line-height:32px;color:rgba(255,255,255,.3)}.ms-navigation .ms-navigation-node:not(.group).has-children:not(.collapsed){background-color:rgba(0,0,0,.12)}.ms-navigation .ms-navigation-node:not(.group).has-children.collapsing{background-color:rgba(0,0,0,.12)}.ms-navigation .ms-navigation-node:not(.group).has-children .has-children:not(.collapsed){background:0 0}.ms-navigation li .ms-navigation-button{padding-left:24px}.ms-navigation li li .ms-navigation-button{padding-left:56px}.ms-navigation li li li .ms-navigation-button{padding-left:72px}.ms-navigation li li li li .ms-navigation-button{padding-left:88px}.ms-navigation li li li li li .ms-navigation-button{padding-left:104px}.ms-navigation li.group .ms-navigation-button{padding-left:24px}.ms-navigation li.group li .ms-navigation-button{padding-left:24px}.ms-navigation li.group li li .ms-navigation-button{padding-left:56px}.ms-navigation li.group li li li .ms-navigation-button{padding-left:72px}.ms-navigation li.group li li li li .ms-navigation-button{padding-left:88px}#horizontal-navigation{height:64px;min-height:64px;max-height:64px;background:#fff;z-index:54}#horizontal-navigation .ms-navigation-horizontal{display:flex;position:relative;user-select:none}#horizontal-navigation .ms-navigation-horizontal li,#horizontal-navigation .ms-navigation-horizontal ul{padding:0;margin:0;list-style:none}#horizontal-navigation .ms-navigation-horizontal .horizontal{display:flex;flex:1}#horizontal-navigation .ms-navigation-horizontal .horizontal li{position:relative;cursor:pointer}#horizontal-navigation .ms-navigation-horizontal .horizontal li:not(.active):hover{background:rgba(0,0,0,.12)}#horizontal-navigation .ms-navigation-horizontal .horizontal>li>.ms-navigation-horizontal-item>.ms-navigation-horizontal-button{display:block;float:left;padding:12px 14px}#horizontal-navigation .ms-navigation-horizontal .horizontal>li>.ms-navigation-horizontal-item>.ms-navigation-horizontal-button .arrow{display:none}#horizontal-navigation .ms-navigation-horizontal .horizontal>li>.ms-navigation-horizontal-item>.ms-navigation-horizontal-button.active{background:0 0;border-bottom:2px solid}#horizontal-navigation .ms-navigation-horizontal .horizontal>li:last-child{margin-right:0}#horizontal-navigation .ms-navigation-horizontal .horizontal>li li .ms-navigation-horizontal-item .ms-navigation-horizontal-button.active{color:#fff!important}#horizontal-navigation .ms-navigation-horizontal .horizontal .has-children ul{display:none;position:absolute;background:#fff;z-index:999;min-width:200px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);top:0;left:100%}#horizontal-navigation .ms-navigation-horizontal .horizontal .has-children:hover>ul{display:block}#horizontal-navigation .ms-navigation-horizontal .horizontal>.has-children>ul{top:100%;left:0}#horizontal-navigation .ms-navigation-horizontal .horizontal .ms-navigation-horizontal-item .ms-navigation-horizontal-button{display:flex;align-items:center;width:100%;color:rgba(0,0,0,.87);white-space:nowrap;padding:14px 16px;text-decoration:none}#horizontal-navigation .ms-navigation-horizontal .horizontal .ms-navigation-horizontal-item .ms-navigation-horizontal-button .icon{color:rgba(0,0,0,.54);margin-right:8px}#horizontal-navigation .ms-navigation-horizontal .horizontal .ms-navigation-horizontal-item .ms-navigation-horizontal-button .badge{min-width:20px;height:20px;line-height:20px;padding:0 7px;font-size:11px;font-weight:700;border-radius:20px;transition:opacity .2s ease-in-out .1s}#horizontal-navigation .ms-navigation-horizontal .horizontal .ms-navigation-horizontal-item .ms-navigation-horizontal-button .arrow{margin-left:8px}#horizontal-navigation .ms-navigation-horizontal .horizontal .ms-navigation-horizontal-item .ms-navigation-horizontal-button.active .badge{background:#fff!important;color:rgba(0,0,0,.87)!important}#horizontal-navigation .ms-navigation-horizontal .horizontal .ms-navigation-horizontal-item .ms-navigation-horizontal-button.active .icon{color:#fff}@media only screen and (min-width:960px){body.ms-navigation-folded:not(.ms-navigation-folded-open) .ms-navigation .animate-height{transition:none}body.ms-navigation-folded:not(.ms-navigation-folded-open) .ms-navigation .ms-navigation-node .ms-navigation-item .ms-navigation-button .icon{margin:0}body.ms-navigation-folded:not(.ms-navigation-folded-open) .ms-navigation .ms-navigation-node .ms-navigation-item .ms-navigation-button .arrow,body.ms-navigation-folded:not(.ms-navigation-folded-open) .ms-navigation .ms-navigation-node .ms-navigation-item .ms-navigation-button .badge,body.ms-navigation-folded:not(.ms-navigation-folded-open) .ms-navigation .ms-navigation-node .ms-navigation-item .ms-navigation-button .title{opacity:0;visibility:hidden}body.ms-navigation-folded:not(.ms-navigation-folded-open) .ms-navigation .ms-navigation-node.group>.ms-navigation-item .ms-navigation-button:before{content:'';display:block;position:relative;width:16px;border-top:1px solid rgba(255,255,255,.12)}body.ms-navigation-folded:not(.ms-navigation-folded-open) #ms-navigation-fold-expander{position:absolute;top:0;right:0;bottom:0;left:0;z-index:999}body.ms-navigation-folded #ms-navigation-fold-collapser{position:absolute;top:0;right:0;bottom:0;left:0;z-index:59}}@media only screen and (max-width:960px){body.ms-navigation-horizontal-mobile-menu-active #horizontal-navigation .navigation-toggle{height:64px;margin-right:16px}body.ms-navigation-horizontal-mobile-menu-active #horizontal-navigation .navigation-toggle .md-button{margin:0;width:64px;height:64px}body.ms-navigation-horizontal-mobile-menu-active #horizontal-navigation .ms-navigation-horizontal{display:block!important;background:#fff}#horizontal-navigation{z-index:60}#horizontal-navigation .ms-navigation-horizontal{position:absolute;display:none;top:0;right:0;bottom:0;left:0;padding:0 0 16px 0;z-index:9998;overflow-x:hidden;overflow-y:scroll}#horizontal-navigation .ms-navigation-horizontal .horizontal{flex-direction:column;min-height:100%;width:100%}#horizontal-navigation .ms-navigation-horizontal .horizontal li:not(.active):hover{background:0 0}#horizontal-navigation .ms-navigation-horizontal .horizontal li:not(.active) .ms-navigation-horizontal-item{margin:4px}#horizontal-navigation .ms-navigation-horizontal .horizontal li:not(.active) .ms-navigation-horizontal-item:hover{background:rgba(0,0,0,.12)}#horizontal-navigation .ms-navigation-horizontal .horizontal>li{padding:0 12px}#horizontal-navigation .ms-navigation-horizontal .horizontal>li>.ms-navigation-horizontal-item>.ms-navigation-horizontal-button{display:flex;float:none}#horizontal-navigation .ms-navigation-horizontal .horizontal>li>.ms-navigation-horizontal-item>.ms-navigation-horizontal-button .arrow{display:block}#horizontal-navigation .ms-navigation-horizontal .horizontal .has-children ul{position:relative;top:0;left:0;box-shadow:none}#horizontal-navigation .ms-navigation-horizontal .horizontal .has-children:hover>ul{display:none}#horizontal-navigation .ms-navigation-horizontal .horizontal .has-children .expanded>.ms-navigation-horizontal-button .arrow{transform:rotate(90deg)}#horizontal-navigation .ms-navigation-horizontal .horizontal .has-children .expanded+ul{display:block;margin-left:16px}#horizontal-navigation .ms-navigation-horizontal .horizontal .ms-navigation-horizontal-item{min-height:48px;height:48px}}md-dialog.md-phonebar-dialog{max-width:720px;width:720px}md-dialog.md-phonebar-dialog md-dialog-content{display:block;position:relative;height:500px}md-dialog.md-phonebar-dialog md-toolbar .title{font-size:17px}md-dialog.md-phonebar-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.md-phonebar-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}md-dialog.md-phonebar-dialog md-tabs{position:static}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}.ms-phonebar{height:64px;font-size:13px}.ms-phonebar .phonebar-container{height:64px;padding:0}.ms-phonebar .phonebar-container .quantity-indicator{display:inline-block;vertical-align:middle;width:8px;height:8px;border-radius:4px;margin-right:5px;margin-left:5px}.ms-phonebar .phonebar-container .sessions{overflow-x:auto}.ms-phonebar .phonebar-container .session{border-radius:3px;border:1px solid #dcdcdc;margin-left:3px;cursor:pointer}.ms-phonebar .phonebar-container .session-info{padding-left:3px;padding-right:3px;color:grey}.ms-phonebar .phonebar-container .session-button{border:1px solid grey;margin:3px}.ms-phonebar .phonebar-container .button-bar{border:1px solid grey}.ms-phonebar .phonebar-container .num-pad{position:fixed;border-radius:3px;border:1px solid #9e9e9e;top:80px;left:80px}.ms-phonebar .phonebar-container .num-pad-logo{height:40px;width:42px}.ms-phonebar .phonebar-container p{margin:0;padding:0 0 10px 0;line-height:10px;font-size:10px}.ms-phonebar .phonebar-container .span4{width:50px;float:left;margin:8px}.ms-phonebar .phonebar-container .num{border:1px solid #9e9e9e;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;height:50px;background-color:#fff;color:#333;cursor:pointer}.ms-phonebar .phonebar-container .num:hover{background-color:#9e9e9e;color:#fff;transition-property:background-color .2s linear 0s;-moz-transition:background-color .2s linear 0s;-webkit-transition:background-color .2s linear 0s;-o-transition:background-color .2s linear 0s}.ms-phonebar .phonebar-container .txt{font-size:20px;text-align:center;margin-top:3px;font-family:Lato,sans-serif;color:#333}.ms-phonebar .phonebar-container .small{font-size:15px}.ms-phonebar .phonebar-container .angucomplete-dropdown{top:45px;overflow-y:auto;max-height:200px}.ms-phonebar .phonebar-container .highlight{color:red}.ms-phonebar .phonebar-container .input-number{margin-left:5px;padding:8px;border:1px solid #ccc;border-radius:3px;box-sizing:border-box}.ms-phonebar .phonebar-container .phonebar{position:relative}.ms-phonebar .phonebar-container .phonebar>div{height:64px;min-width:44px}.ms-phonebar .phonebar-container .phonebar>div.dragging{cursor:grabbing}.ms-phonebar .phonebar-container .phonebar>div.dragging .md-ripple-container{display:none}.ms-phonebar .phonebar-container .phonebar>div.ghost .shortcut{opacity:.27}.ms-phonebar .phonebar-container.mobile-bar-active{position:absolute;top:0;right:0;bottom:0;left:0;background:#fff;z-index:99;max-width:none!important}.ms-phonebar .phonebar-container.mobile-bar-active .phonebar,.ms-phonebar .phonebar-container.mobile-bar-active .toggle-mobile-menu{display:flex!important}.ms-phonebar .phonebar-container.mobile-bar-active .toggle-mobile-menu{margin-left:14px}.ms-phonebar .phonebar-container.mobile-bar-active>div{border-right:1px solid rgba(0,0,0,.12)}.quick-filter-container md-select .md-select-value.md-select-placeholder{color:inherit}.quick-filter-container md-select[multiple] md-select-value>:first-child{max-width:250px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}.ms-responsive-table-wrapper{overflow-x:auto;overflow-y:hidden}.ms-scroll{overflow:hidden!important}.ms-search-bar{height:64px;font-size:13px}.ms-search-bar .ms-search-bar-collapser,.ms-search-bar .ms-search-bar-expander{cursor:pointer;padding:0 20px;margin:0;width:64px!important;height:64px!important;line-height:64px!important}.ms-search-bar .ms-search-bar-loader{width:64px!important;height:64px!important;line-height:64px!important}.ms-search-bar .ms-search-button-expanded{pointer-events:none}.ms-search-bar .ms-search-bar-collapser{display:none}.ms-search-bar input{background-color:transparent;font-size:16px}.ms-search-bar .ms-search-bar-results{position:absolute;top:64px;left:0;right:0;overflow-x:hidden;overflow-y:scroll;background:#fff;max-height:300px;box-shadow:0 1px 8px 0 rgba(0,0,0,.2),0 3px 4px 0 rgba(0,0,0,.14),0 3px 3px -2px rgba(0,0,0,.12)}.ms-search-bar .ms-search-bar-results .no-results{font-size:18px;padding:16px;color:rgba(0,0,0,.54)}.ms-search-bar .ms-search-bar-results .result{position:relative;height:56px;min-height:56px;max-height:56px;padding:16px;cursor:pointer}.ms-search-bar .ms-search-bar-results .result.selected{background:rgba(0,0,0,.07)}.ms-search-bar .ms-search-bar-results .result .icon-container{min-width:32px;margin-right:8px}.ms-search-bar .ms-search-bar-results .result .icon-container .square{width:6px;height:6px}.ms-search-bar .ms-search-bar-results .result .title{font-size:16px}.ms-search-bar .ms-search-bar-results .result .description{padding-top:6px;font-size:14px}.ms-search-bar.expanded{position:absolute;top:0;right:0;bottom:0;left:0;background:#fff;z-index:10}.ms-search-bar.expanded #ms-search-bar-input{display:block}.ms-search-bar.expanded .ms-search-bar-collapser{display:block}.ms-search-bar.down{top:64px;border-bottom:1px rgba(0,0,0,.12) solid}.ms-search-bar[disabled] input{pointer-events:none}body.ms-search-bar-expanded #toolbar{z-index:999!important}@media screen and (max-width:960px){.ms-search-bar-label{padding:0 8px 0 12px}}.ms-shortcuts{height:64px;font-size:13px}.ms-shortcuts .shortcuts-container{height:64px;padding:0 8px;max-width:400px}.ms-shortcuts .shortcuts-container .shortcuts{position:relative;overflow-x:scroll}.ms-shortcuts .shortcuts-container .shortcuts>div{height:64px;min-width:44px}.ms-shortcuts .shortcuts-container .shortcuts>div.dragging{cursor:grabbing}.ms-shortcuts .shortcuts-container .shortcuts>div.dragging .md-ripple-container{display:none}.ms-shortcuts .shortcuts-container .shortcuts>div.ghost .shortcut{opacity:.27}.ms-shortcuts .shortcuts-container .shortcuts>div .shortcut{margin:2px}.ms-shortcuts .shortcuts-container .shortcuts>div .shortcut .first-letter{display:inline-block;vertical-align:middle;font-size:20px;text-transform:uppercase;color:rgba(0,0,0,.54)}.ms-shortcuts .shortcuts-container .shortcut-menu{margin:0}.ms-shortcuts .shortcuts-container.mobile-bar-active{position:absolute;top:0;right:0;bottom:0;left:0;background:#fff;z-index:99;max-width:none!important}.ms-shortcuts .shortcuts-container.mobile-bar-active .shortcut-menu,.ms-shortcuts .shortcuts-container.mobile-bar-active .shortcuts,.ms-shortcuts .shortcuts-container.mobile-bar-active .toggle-mobile-menu{display:flex!important}.ms-shortcuts .shortcuts-container.mobile-bar-active .toggle-mobile-menu{margin-left:14px}.ms-shortcuts .shortcuts-container.mobile-bar-active>div{border-right:1px solid rgba(0,0,0,.12)}#ms-shortcut-add-menu{position:relative;width:240px;min-width:240px;max-width:240px}#ms-shortcut-add-menu .add-shortcut-button{width:48px;height:48px;padding:0 12px;margin:0}#ms-shortcut-add-menu .shortcut-search{height:45px;padding:0 8px}#ms-shortcut-add-menu .shortcut-search .search-icon{width:40px;height:40px;line-height:48px}#ms-shortcut-add-menu .shortcut-search .shortcut-loader{padding:10px}#ms-shortcut-add-menu .shortcut-search input{padding:8px}#ms-shortcut-add-menu .results{position:relative;overflow-y:scroll;max-height:233px;margin-top:8px;padding-top:8px;border-top:1px solid rgba(0,0,0,.12)}#ms-shortcut-add-menu .results .no-results{font-size:18px;padding:16px;color:rgba(0,0,0,.54)}#ms-shortcut-add-menu .results .result{position:relative;min-height:56px;padding:16px;cursor:pointer}#ms-shortcut-add-menu .results .result.selected{background:rgba(0,0,0,.07)}#ms-shortcut-add-menu .results .result .icon-container{min-width:32px;margin-right:8px}#ms-shortcut-add-menu .results .result .icon-container .square{width:6px;height:6px}#ms-shortcut-add-menu .results .result .title{font-size:16px}#ms-shortcut-add-menu .results .result .description{padding-top:6px;font-size:14px}#splash-screen{display:block;position:absolute;top:0;left:0;right:0;bottom:0;background-color:#3c4252;z-index:99999}#splash-screen.ng-leave{opacity:1;transition:all linear .2s}#splash-screen.ng-leave-active{opacity:0}#splash-screen .center{display:block;width:100%;position:absolute;top:50%;transform:translateY(-50%)}#splash-screen .logo{width:96px;height:96px;line-height:96px;margin:0 auto;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:56px;text-align:center;border-radius:2px;background-color:#039be5;color:#fff;box-shadow:0 2px 14px 0 rgba(0,0,0,.22)}#splash-screen .spinner-wrapper{display:block;position:relative;width:100%;min-height:100px;height:100px}#splash-screen .spinner-wrapper .spinner{position:absolute;overflow:hidden;left:50%;margin-left:-50px;animation:outer-rotate 2.91667s linear infinite}#splash-screen .spinner-wrapper .spinner .inner{width:100px;height:100px;position:relative;animation:sporadic-rotate 5.25s cubic-bezier(.35,0,.25,1) infinite}#splash-screen .spinner-wrapper .spinner .inner .gap{position:absolute;left:49px;right:49px;top:0;bottom:0;border-top:10px solid;box-sizing:border-box}#splash-screen .spinner-wrapper .spinner .inner .left,#splash-screen .spinner-wrapper .spinner .inner .right{position:absolute;top:0;height:100px;width:50px;overflow:hidden}#splash-screen .spinner-wrapper .spinner .inner .left .half-circle,#splash-screen .spinner-wrapper .spinner .inner .right .half-circle{position:absolute;top:0;width:100px;height:100px;box-sizing:border-box;border:10px solid #4285f4;border-bottom-color:transparent;border-radius:50%}#splash-screen .spinner-wrapper .spinner .inner .left{left:0}#splash-screen .spinner-wrapper .spinner .inner .left .half-circle{left:0;border-right-color:transparent;animation:left-wobble 1.3125s cubic-bezier(.35,0,.25,1) infinite;-webkit-animation:left-wobble 1.3125s cubic-bezier(.35,0,.25,1) infinite}#splash-screen .spinner-wrapper .spinner .inner .right{right:0}#splash-screen .spinner-wrapper .spinner .inner .right .half-circle{right:0;border-left-color:transparent;animation:right-wobble 1.3125s cubic-bezier(.35,0,.25,1) infinite;-webkit-animation:right-wobble 1.3125s cubic-bezier(.35,0,.25,1) infinite}@keyframes outer-rotate{0%{transform:rotate(0) scale(.5)}100%{transform:rotate(360deg) scale(.5)}}@keyframes left-wobble{0%,100%{transform:rotate(130deg)}50%{transform:rotate(-5deg)}}@keyframes right-wobble{0%,100%{transform:rotate(-130deg)}50%{transform:rotate(5deg)}}@keyframes sporadic-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}.ms-stepper .ms-stepper-horizontal{background:#fff;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation{height:72px;min-height:72px;max-height:72px;background:#fff;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item{display:flex;flex-direction:row;align-items:center;position:relative;height:72px;min-height:72px;max-height:72px;line-height:24px;margin:0;padding:24px;border-radius:0;cursor:pointer;font-size:14px;text-transform:none}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item:after,.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item:before{content:'';display:block;position:absolute;top:50%;width:24px;border-bottom:1px solid rgba(0,0,0,.12)}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item:before{left:0}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item:after{right:0}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item:first-child:before{display:none}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item:last-child:after{display:none}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item.current .title{font-weight:600;color:rgba(0,0,0,.87)}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item.disabled{cursor:default}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item.disabled .step{background:rgba(0,0,0,.12)}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item.disabled .title{color:rgba(0,0,0,.27)}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item.disabled .subtitle{color:rgba(0,0,0,.27)}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item.optional{padding:16px 24px}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item .step{width:24px;min-width:24px;height:24px;border-radius:50%;margin:0 8px 0 16px;color:#fff}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item .step .icon{color:#fff;font-weight:700;line-height:24px!important}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item .title{padding-right:16px;color:rgba(0,0,0,.54)}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item .subtitle{font-size:12px;padding-right:16px;color:rgba(0,0,0,.54);line-height:1}.ms-stepper .ms-stepper-horizontal .ms-stepper-steps{padding:24px 16px}.ms-stepper .ms-stepper-horizontal .ms-stepper-controls{padding:0 16px 16px 16px}.ms-stepper .ms-stepper-horizontal .ms-stepper-controls .ms-stepper-dots{display:none;align-items:center;justify-content:center;padding:0 16px}.ms-stepper .ms-stepper-horizontal .ms-stepper-controls .ms-stepper-dots span{width:5px;height:5px;margin:0 4px;border-radius:50%}.ms-stepper .ms-stepper-horizontal .ms-stepper-controls .ms-stepper-dots span:not(.md-accent-bg){background:rgba(0,0,0,.12)}.ms-stepper .ms-stepper-horizontal .ms-stepper-controls .ms-stepper-dots span.selected{width:8px;height:8px}@media screen and (max-width:600px){.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation{display:none}.ms-stepper .ms-stepper-horizontal .ms-stepper-controls .ms-stepper-dots{display:flex}}.ms-stepper .ms-stepper-vertical{position:relative;background:#fff;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}.ms-stepper .ms-stepper-vertical .ms-stepper-vertical-line{display:block;position:absolute;width:1px;top:32px;bottom:32px;left:43px;border-left:1px solid rgba(0,0,0,.12)}.ms-stepper .ms-stepper-vertical .ms-stepper-steps{padding:8px 0}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step{display:block}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item{display:flex;flex-direction:row;align-items:center;position:relative;width:100%;height:72px;min-height:72px;max-height:72px;line-height:24px;margin:0;padding:0 24px;border-radius:0;cursor:pointer;font-size:14px;text-transform:none}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item:first-child:before{display:none}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item:last-child:after{display:none}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item:hover:not(.disabled) .step{background-color:#ececec;border-color:#ececec}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item.current .title{font-weight:600;color:rgba(0,0,0,.87)}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item.disabled{cursor:default}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item.disabled .title{color:rgba(0,0,0,.27)}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item.disabled .subtitle{color:rgba(0,0,0,.27)}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item.optional{padding:16px 24px}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item .step{width:40px;min-width:40px;height:40px;margin:0 16px 0 0;border-radius:50%;background:#fff;border:8px solid #fff;color:#fff;transition:border-color .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1)}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item .step .icon{font-weight:700;line-height:28px!important}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item .title{padding-right:16px;color:rgba(0,0,0,.54)}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item .subtitle{font-size:12px;padding-right:16px;color:rgba(0,0,0,.54);line-height:1}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-step-content{padding:0 24px 16px 64px}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-controls{padding:0 16px 16px 56px}.ms-tab-scroll .scroll-arrow{height:inherit;padding:0}.ms-tab-scroll .bar-container{overflow:hidden}.ms-tab-scroll .scroll-container{overflow-x:hidden;overflow-y:hidden;transition:transform .2s ease-in-out}.ms-timeline .ms-timeline-loader{position:relative;display:flex;align-items:center;justify-content:center;width:56px;height:56px;margin:0 auto;background:#fff;font-weight:500;opacity:0;z-index:11;border-radius:50%}.ms-timeline .ms-timeline-loader.show{opacity:1}.ms-timeline .ms-timeline-loader .spinner{width:24px;height:24px;border:3px solid rgba(255,255,255,.35);border-top-color:#fff;border-radius:50%}.ms-widget .ms-widget-front{box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}.ms-widget .ms-widget-back{box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}.ms-widget.sidenav-widget .ms-widget-back,.ms-widget.sidenav-widget .ms-widget-front{box-shadow:none}.ms-widget .flip-to-front{position:absolute;top:0;right:0}.ms-widget .c3{height:100%}.ms-widget .chart-fill-8{margin:0 -8px -8px -8px}.ms-widget .chart-fill-16{margin:0 -16px -16px -16px}.ms-widget .chart-fill-24{margin:0 -24px -24px -24px}.ms-widget .chart-fill-32{margin:0 -32px -32px -32px}.ms-widget .chart-fill-40{margin:0 -40px -40px -40px}.ms-widget .chart-fill-48{margin:0 -48px -48px -48px}.ms-widget .chart-fill-56{margin:0 -56px -56px -56px}.ms-widget .chart-fill-64{margin:0 -64px -64px -64px}.ms-widget .chart-fill-72{margin:0 -72px -72px -72px}.ms-widget .chart-fill-80{margin:0 -80px -80px -80px}.ms-widget{position:relative;font-size:1.3rem;perspective:3000px;padding:12px}.ms-widget .ms-widget-front{display:flex;flex-direction:column;flex:1 1 auto;position:relative;overflow:hidden;visibility:visible;width:100%;opacity:1;z-index:10;border-radius:2px;transition:transform .5s ease-out 0s,visibility 0s ease-in .2s,opacity 0s ease-in .2s;transform:rotateY(0);backface-visibility:hidden}.ms-widget .ms-widget-back{display:block;position:absolute;overflow:hidden;visibility:hidden;opacity:0;z-index:10;top:12px;right:12px;bottom:12px;left:12px;border-radius:2px;transition:transform .5s ease-out 0s,visibility 0s ease-in .2s,opacity 0s ease-in .2s;transform:rotateY(180deg);backface-visibility:hidden}.ms-widget .md-button{margin:0}.ms-widget .md-button.md-icon-button{margin:0}.ms-widget.flipped .ms-widget-front{visibility:hidden;opacity:0;transform:rotateY(180deg)}.ms-widget.flipped .ms-widget-back{display:block;visibility:visible;opacity:1;transform:rotateY(360deg)}.ms-widget.sidenav-widget{padding:0}.ms-widget.ar-2-1 .widget{padding:0;position:relative}.ms-widget.ar-2-1 .widget:before{display:block;content:'';width:100%;padding-top:50%}.ms-widget.ar-2-1 .widget>.widget{position:absolute;top:8px;left:8px;right:8px;bottom:8px}.ms-widget.ar-1-1 .widget{padding:0;position:relative}.ms-widget.ar-1-1 .widget:before{display:block;content:'';width:100%;padding-top:100%}.ms-widget.ar-1-1 .widget>.widget{position:absolute;top:8px;left:8px;right:8px;bottom:8px}.ms-theme-options .ms-theme-options-button{position:absolute;top:160px;right:0;z-index:50;box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12);width:48px;height:48px;line-height:48px;text-align:center;cursor:pointer;border-radius:0;margin:0;pointer-events:auto;opacity:.75}.ms-theme-options .ms-theme-options-button:hover{opacity:1}.ms-theme-options md-sidenav{width:384px;min-width:384px;max-width:384px}.ms-theme-options md-sidenav .ms-theme-options-list{background:#fff;z-index:12;pointer-events:auto}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option{padding:16px}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option.layout-options md-radio-button{width:160px;max-width:160px;margin:8px 8px 16px 8px}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option.layout-options md-radio-button.md-checked ._md-label img,.ms-theme-options md-sidenav .ms-theme-options-list .theme-option.layout-options md-radio-button:hover ._md-label img{opacity:1;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option.layout-options md-radio-button ._md-container{display:none}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option.layout-options md-radio-button ._md-label{margin-left:0}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option.layout-options md-radio-button ._md-label img{opacity:.8;margin-bottom:8px}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option.color-palettes md-menu-item{max-width:192px}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option.color-palettes .theme-button{border-bottom:16px solid;text-align:left;width:101px;height:88px;box-shadow:none;opacity:.8}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option.color-palettes .theme-button.active,.ms-theme-options md-sidenav .ms-theme-options-list .theme-option.color-palettes .theme-button:hover{opacity:1;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option md-radio-button{margin:8px}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option .option-title{font-size:14px;font-weight:500;padding:0 8px 12px 8px}#error-404 .content{width:90%;max-width:512px;margin-top:128px}#error-404 .content .error-code{font-size:112px;text-align:center;line-height:1;margin-bottom:16px;font-weight:500}#error-404 .content .message{font-size:24px;text-align:center;color:rgba(0,0,0,.54)}#error-404 .content .search{width:100%;height:56px;line-height:56px;margin:48px auto 16px auto;padding:16px;background:#fff}#error-404 .content .search input{padding:0 0 0 16px}#error-404 .content .back-link{font-size:15px;text-align:center}#error-500 .content{width:90%;max-width:512px;margin-top:128px}#error-500 .content .error-code{font-size:112px;line-height:1;text-align:center;margin-bottom:16px;font-weight:500}#error-500 .content .message{font-size:24px;text-align:center;color:rgba(0,0,0,.54)}#error-500 .content .sub-message{font-size:17px;text-align:center;color:rgba(0,0,0,.54);margin:16px auto 48px auto}#error-500 .content .report-link{text-align:center;font-size:15px}#forgot-password{height:100%;background:url(/assets/images/backgrounds/tech.png) no-repeat;background-size:cover}#forgot-password #forgot-password-form-wrapper{flex:1 0 auto;padding:32px}#forgot-password #forgot-password-form-wrapper #forgot-password-form{width:384px;max-width:384px;padding:32px;text-align:center;background:#fff}#forgot-password #forgot-password-form-wrapper #forgot-password-form .logo{width:128px;height:128px;line-height:128px;font-size:86px;font-weight:500;margin:32px auto;color:#fff;border-radius:2px}#forgot-password #forgot-password-form-wrapper #forgot-password-form .title{font-size:17px;margin:16px 0 32px 0}#forgot-password #forgot-password-form-wrapper #forgot-password-form .logo_login{max-height:200px}#forgot-password #forgot-password-form-wrapper #forgot-password-form form{width:100%;text-align:left}#forgot-password #forgot-password-form-wrapper #forgot-password-form form .submit-button{width:220px;margin:16px auto;display:block}#forgot-password #forgot-password-form-wrapper #forgot-password-form .login{margin:32px auto 24px auto;width:250px;font-weight:500}#forgot-password #forgot-password-form-wrapper #forgot-password-form .login .text{margin-right:8px}@media screen and (max-width:600px){#forgot-password #forgot-password-form-wrapper{padding:16px}#forgot-password #forgot-password-form-wrapper #forgot-password-form{padding:24px;width:100%}#forgot-password #forgot-password-form-wrapper #forgot-password-form form .md-button{width:90%}}#login{height:100%;background:url(/assets/images/backgrounds/tech.png) no-repeat;background-size:cover}#login #login-form-wrapper{flex:1 0 auto;padding:32px}#login #login-form-wrapper #login-form{width:384px;max-width:384px;padding:32px;background:#fff;text-align:center}#login #login-form-wrapper #login-form .logo{width:128px;height:128px;line-height:128px;font-size:86px;font-weight:500;margin:32px auto;color:#fff;border-radius:2px}#login #login-form-wrapper #login-form .title{font-size:17px;margin:16px 0 32px 0}#login #login-form-wrapper #login-form .logo_login{max-height:200px}#login #login-form-wrapper #login-form form{width:100%;text-align:left}#login #login-form-wrapper #login-form form md-checkbox{margin:0}#login #login-form-wrapper #login-form form .remember-forgot-password{font-size:13px;margin-top:8px}#login #login-form-wrapper #login-form form .remember-forgot-password .remember-me{margin-bottom:16px}#login #login-form-wrapper #login-form form .remember-forgot-password .forgot-password{font-size:13px;font-weight:500;margin-bottom:16px}#login #login-form-wrapper #login-form form .submit-button{width:220px;margin:16px auto;display:block}#login #login-form-wrapper #login-form .register{margin:32px auto 24px auto;width:250px;font-weight:500}#login #login-form-wrapper #login-form .register .text{margin-right:8px}#login #login-form-wrapper #login-form .separator{font-size:15px;font-weight:600;margin:24px auto 16px auto;position:relative;overflow:hidden;width:100px;color:rgba(0,0,0,.54)}#login #login-form-wrapper #login-form .separator .text{display:inline-block;vertical-align:baseline;position:relative;padding:0 8px;z-index:9999}#login #login-form-wrapper #login-form .separator .text:after,#login #login-form-wrapper #login-form .separator .text:before{content:'';display:block;width:30px;position:absolute;top:10px;border-top:1px solid rgba(0,0,0,.12)}#login #login-form-wrapper #login-form .separator .text:before{right:100%}#login #login-form-wrapper #login-form .separator .text:after{left:100%}#login #login-form-wrapper #login-form .md-button.facebook,#login #login-form-wrapper #login-form .md-button.google{width:192px;text-transform:none;color:#fff;font-size:13px}#login #login-form-wrapper #login-form .md-button.facebook md-icon,#login #login-form-wrapper #login-form .md-button.google md-icon{color:#fff;margin:0 8px 0 0}#login #login-form-wrapper #login-form .md-button.google{background-color:#d73d32}#login #login-form-wrapper #login-form .md-button.facebook{background-color:#3f5c9a}@media screen and (max-width:600px){#login #login-form-wrapper{padding:16px}#login #login-form-wrapper #login-form{padding:24px;width:100%}#login #login-form-wrapper #login-form form .md-button{width:90%}#login #login-form-wrapper #login-form .md-button.facebook,#login #login-form-wrapper #login-form .md-button.google{width:80%}}md-dialog.extractedReport-dialog{max-width:720px;width:720px}md-dialog.extractedReport-dialog md-dialog-content{display:block;position:relative}md-dialog.extractedReport-dialog md-toolbar .title{font-size:17px}md-dialog.extractedReport-dialog md-input-container textarea{min-height:150px}md-dialog.extractedReport-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.extractedReport-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.extractedReport-dialog .date-container{padding:16px 0 24px 0}md-dialog.extractedReport-dialog .error-list{font-size:13px}md-dialog.extractedReport-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.extractedReport-dialog .error-list .error .message{font-weight:500}md-dialog.extractedReport-dialog .error-list .error .md-button{margin:0}md-dialog.extractedReport-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.extractedReport-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#extractedReports{position:relative}#extractedReports>.header{height:76px;min-height:76px;max-height:76px}#extractedReports>.header .logo .logo-icon{margin:0 16px 0 0}#extractedReports>.header .logo .logo-text{font-size:24px}#extractedReports>.header md-icon{color:#fff}#extractedReports>.header .search-input-wrapper{position:relative}#extractedReports>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#extractedReports>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#extractedReports>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#extractedReports>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#extractedReports>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#extractedReports>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#extractedReports>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#extractedReports>.header.selected-bar .close-button-wrapper{width:244px}#extractedReports>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#extractedReports>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#extractedReports>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#extractedReports #add-extractedReport-button{position:fixed;bottom:8px;right:8px;padding:0}#extractedReports #upload-extractedReport-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.metric-dialog{max-width:720px;width:720px}md-dialog.metric-dialog md-dialog-content{display:block;position:relative}md-dialog.metric-dialog md-toolbar .title{font-size:17px}md-dialog.metric-dialog md-input-container textarea{min-height:150px}md-dialog.metric-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.metric-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.metric-dialog .date-container{padding:16px 0 24px 0}md-dialog.metric-dialog .error-list{font-size:13px}md-dialog.metric-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.metric-dialog .error-list .error .message{font-weight:500}md-dialog.metric-dialog .error-list .error .md-button{margin:0}md-dialog.metric-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.metric-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#metrics{position:relative}#metrics>.header{height:76px;min-height:76px;max-height:76px}#metrics>.header .logo .logo-icon{margin:0 16px 0 0}#metrics>.header .logo .logo-text{font-size:24px}#metrics>.header md-icon{color:#fff}#metrics>.header .search-input-wrapper{position:relative}#metrics>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#metrics>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#metrics>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#metrics>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#metrics>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#metrics>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#metrics>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#metrics>.header.selected-bar .close-button-wrapper{width:244px}#metrics>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#metrics>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#metrics>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#metrics #add-metric-button{position:fixed;bottom:8px;right:8px;padding:0}#metrics #upload-metric-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.report-dialog{max-width:720px;width:720px}md-dialog.report-dialog md-dialog-content{display:block;position:relative}md-dialog.report-dialog md-toolbar .title{font-size:17px}md-dialog.report-dialog md-input-container textarea{min-height:150px}md-dialog.report-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.report-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.report-dialog .date-container{padding:16px 0 24px 0}md-dialog.report-dialog .error-list{font-size:13px}md-dialog.report-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.report-dialog .error-list .error .message{font-weight:500}md-dialog.report-dialog .error-list .error .md-button{margin:0}md-dialog.report-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.report-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.report-dialog{max-width:720px;width:720px}md-dialog.report-dialog md-dialog-content{display:block;position:relative}md-dialog.report-dialog md-toolbar .title{font-size:17px}md-dialog.report-dialog md-input-container textarea{min-height:150px}md-dialog.report-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.report-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.report-dialog .date-container{padding:16px 0 24px 0}md-dialog.report-dialog .error-list{font-size:13px}md-dialog.report-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.report-dialog .error-list .error .message{font-weight:500}md-dialog.report-dialog .error-list .error .md-button{margin:0}md-dialog.report-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.report-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.reportField-dialog{max-width:720px;width:720px}md-dialog.reportField-dialog md-dialog-content{display:block;position:relative}md-dialog.reportField-dialog md-toolbar .title{font-size:17px}md-dialog.reportField-dialog md-input-container textarea{min-height:150px}md-dialog.reportField-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.reportField-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.reportField-dialog .date-container{padding:16px 0 24px 0}md-dialog.reportField-dialog .error-list{font-size:13px}md-dialog.reportField-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.reportField-dialog .error-list .error .message{font-weight:500}md-dialog.reportField-dialog .error-list .error .md-button{margin:0}md-dialog.reportField-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.reportField-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#analytics-report .header{height:76px;min-height:76px;max-height:76px}#analytics-report .header .goto-reports-button{margin-right:16px}#analytics-report .header .report-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#analytics-report .header .report-image img{height:100%;width:auto;max-width:none}#analytics-report .header .subtitle{margin:6px 0 0 0}#analytics-report .report-detail-form-container{padding:24px;margin-bottom:24px}#analytics-report .report-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#analytics-report .report-detail-form-container .handle{cursor:move}#analytics-report .report-detail-form-container md-input-container md-switch{margin:0!important}#analytics-report .report-detail-form-container #report-image-uploader{position:relative}#analytics-report .report-detail-form-container #report-image-uploader.dropping .drop-text{display:flex}#analytics-report .report-detail-form-container #report-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#analytics-report .report-detail-form-container #report-image-uploader .upload-button{margin-bottom:16px}#analytics-report .report-detail-form-container #report-image-uploader .report-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#analytics-report .report-detail-form-container #report-image-uploader .report-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#analytics-report .report-detail-form-container #report-image-uploader .report-image .media{max-height:100%}md-dialog.report-dialog{max-width:720px;width:720px}md-dialog.report-dialog md-dialog-content{display:block;position:relative}md-dialog.report-dialog md-toolbar .title{font-size:17px}md-dialog.report-dialog md-input-container textarea{min-height:150px}md-dialog.report-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.report-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.report-dialog .date-container{padding:16px 0 24px 0}md-dialog.report-dialog .error-list{font-size:13px}md-dialog.report-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.report-dialog .error-list .error .message{font-weight:500}md-dialog.report-dialog .error-list .error .md-button{margin:0}md-dialog.report-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.report-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#reports{position:relative}#reports>.header{height:76px;min-height:76px;max-height:76px}#reports>.header .logo .logo-icon{margin:0 16px 0 0}#reports>.header .logo .logo-text{font-size:24px}#reports>.header md-icon{color:#fff}#reports>.header .search-input-wrapper{position:relative}#reports>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#reports>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#reports>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#reports>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#reports>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#reports>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#reports>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#reports>.header.selected-bar .close-button-wrapper{width:244px}#reports>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#reports>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#reports>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}md-dialog.report-dialog{max-width:720px;width:720px}md-dialog.report-dialog md-dialog-content{display:block;position:relative}md-dialog.report-dialog md-toolbar .title{font-size:17px}md-dialog.report-dialog md-input-container textarea{min-height:150px}md-dialog.report-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.report-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.report-dialog .date-container{padding:16px 0 24px 0}md-dialog.report-dialog .error-list{font-size:13px}md-dialog.report-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.report-dialog .error-list .error .message{font-weight:500}md-dialog.report-dialog .error-list .error .md-button{margin:0}md-dialog.report-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.report-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.web-dialog md-dialog-content{display:block;position:relative}md-dialog.web-dialog md-toolbar .title{font-size:17px}md-dialog.web-dialog md-input-container textarea{min-height:150px}md-dialog.web-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.web-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.web-dialog .date-container{padding:16px 0 24px 0}md-dialog.web-dialog .error-list{font-size:13px}md-dialog.web-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.web-dialog .error-list .error .message{font-weight:500}md-dialog.web-dialog .error-list .error .md-button{margin:0}md-dialog.web-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.web-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.odbc-dialog{max-width:720px;width:720px}md-dialog.odbc-dialog md-dialog-content{display:block;position:relative}md-dialog.odbc-dialog md-toolbar .title{font-size:17px}md-dialog.odbc-dialog md-input-container textarea{min-height:150px}md-dialog.odbc-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.odbc-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.odbc-dialog .date-container{padding:16px 0 24px 0}md-dialog.odbc-dialog .error-list{font-size:13px}md-dialog.odbc-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.odbc-dialog .error-list .error .message{font-weight:500}md-dialog.odbc-dialog .error-list .error .md-button{margin:0}md-dialog.odbc-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.odbc-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#odbcs{position:relative}#odbcs>.header{height:76px;min-height:76px;max-height:76px}#odbcs>.header .logo .logo-icon{margin:0 16px 0 0}#odbcs>.header .logo .logo-text{font-size:24px}#odbcs>.header md-icon{color:#fff}#odbcs>.header .search-input-wrapper{position:relative}#odbcs>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#odbcs>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#odbcs>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#odbcs>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#odbcs>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#odbcs>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#odbcs>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#odbcs>.header.selected-bar .close-button-wrapper{width:244px}#odbcs>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#odbcs>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#odbcs>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#odbcs #add-odbc-button{position:fixed;bottom:8px;right:8px;padding:0}#odbcs #upload-odbc-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.project-dialog{max-width:720px;width:720px}md-dialog.project-dialog md-dialog-content{display:block;position:relative}md-dialog.project-dialog md-toolbar .title{font-size:17px}md-dialog.project-dialog md-input-container textarea{min-height:150px}md-dialog.project-dialog .date-container{padding:16px 0 24px 0}md-dialog.project-dialog .error-list{font-size:13px}md-dialog.project-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.project-dialog .error-list .error .message{font-weight:500}md-dialog.project-dialog .error-list .error .md-button{margin:0}md-dialog.project-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.project-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}md-dialog.project-dialog .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#callysquare-project .header{height:76px;min-height:76px;max-height:76px}#callysquare-project .header .goto-projects-button{margin-right:16px}#callysquare-project .header .project-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#callysquare-project .header .project-image img{height:100%;width:auto;max-width:none}#callysquare-project .header .subtitle{margin:6px 0 0 0}#callysquare-project .project-detail-form-container{padding:24px;margin-bottom:24px}#callysquare-project .project-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#callysquare-project .project-detail-form-container #project-image-uploader{position:relative}#callysquare-project .project-detail-form-container #project-image-uploader.dropping .drop-text{display:flex}#callysquare-project .project-detail-form-container #project-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#callysquare-project .project-detail-form-container #project-image-uploader .upload-button{margin-bottom:16px}#callysquare-project .project-detail-form-container #project-image-uploader .project-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#callysquare-project .project-detail-form-container #project-image-uploader .project-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#callysquare-project .project-detail-form-container #project-image-uploader .project-image .media{max-height:100%}#callysquare-project>.callysquare-content{position:absolute;top:76px;bottom:0;left:0;right:0}#projects{position:relative}#projects>.header{height:76px;min-height:76px;max-height:76px}#projects>.header .logo .logo-icon{margin:0 16px 0 0}#projects>.header .logo .logo-text{font-size:24px}#projects>.header md-icon{color:#fff}#projects>.header .search-input-wrapper{position:relative}#projects>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#projects>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#projects>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#projects>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#projects>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#projects>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#projects>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#projects>.header.selected-bar .close-button-wrapper{width:244px}#projects>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#projects>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#projects>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#projects #add-project-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.squareRecording-dialog{max-width:720px;width:720px}md-dialog.squareRecording-dialog md-dialog-content{display:block;position:relative}md-dialog.squareRecording-dialog md-toolbar .title{font-size:17px}md-dialog.squareRecording-dialog md-input-container textarea{min-height:150px}md-dialog.squareRecording-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.squareRecording-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.squareRecording-dialog .date-container{padding:16px 0 24px 0}md-dialog.squareRecording-dialog .error-list{font-size:13px}md-dialog.squareRecording-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.squareRecording-dialog .error-list .error .message{font-weight:500}md-dialog.squareRecording-dialog .error-list .error .md-button{margin:0}md-dialog.squareRecording-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.squareRecording-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#squareRecordings{position:relative}#squareRecordings>.header{height:76px;min-height:76px;max-height:76px}#squareRecordings>.header .logo .logo-icon{margin:0 16px 0 0}#squareRecordings>.header .logo .logo-text{font-size:24px}#squareRecordings>.header md-icon{color:#fff}#squareRecordings>.header .search-input-wrapper{position:relative}#squareRecordings>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#squareRecordings>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#squareRecordings>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#squareRecordings>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#squareRecordings>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#squareRecordings>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#squareRecordings>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#squareRecordings>.header.selected-bar .close-button-wrapper{width:244px}#squareRecordings>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#squareRecordings>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#squareRecordings>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#squareRecordings #add-squareRecording-button{position:fixed;bottom:8px;right:8px;padding:0}#squareRecordings #upload-squareRecording-button{position:fixed;bottom:8px;right:8px;padding:0}#chatQueues{position:relative}#chatQueues>.header{height:76px;min-height:76px;max-height:76px}#chatQueues>.header .logo .logo-icon{margin:0 16px 0 0}#chatQueues>.header .logo .logo-text{font-size:24px}#chatQueues>.header md-icon{color:#fff}#chatQueues>.header .search-input-wrapper{position:relative}#chatQueues>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#chatQueues>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#chatQueues>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#chatQueues>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#chatQueues>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#chatQueues>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#chatQueues>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#chatQueues>.header.selected-bar .close-button-wrapper{width:244px}#chatQueues>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#chatQueues>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#chatQueues>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#chatQueues #add-chatQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#chatQueues #upload-chatQueue-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.chatQueue-dialog{max-width:720px;width:720px}md-dialog.chatQueue-dialog md-dialog-content{display:block;position:relative}md-dialog.chatQueue-dialog md-toolbar .title{font-size:17px}md-dialog.chatQueue-dialog md-input-container textarea{min-height:150px}md-dialog.chatQueue-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.chatQueue-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.chatQueue-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatQueue-dialog .error-list{font-size:13px}md-dialog.chatQueue-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatQueue-dialog .error-list .error .message{font-weight:500}md-dialog.chatQueue-dialog .error-list .error .md-button{margin:0}md-dialog.chatQueue-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatQueue-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#chat-chatQueue .header{height:76px;min-height:76px;max-height:76px}#chat-chatQueue .header .goto-chatQueues-button{margin-right:16px}#chat-chatQueue .header .chatQueue-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#chat-chatQueue .header .chatQueue-image img{height:100%;width:auto;max-width:none}#chat-chatQueue .header .subtitle{margin:6px 0 0 0}#chat-chatQueue .chatQueue-detail-form-container{padding:24px;margin-bottom:24px}#chat-chatQueue .chatQueue-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#chat-chatQueue .chatQueue-detail-form-container .handle{cursor:move}#chat-chatQueue .chatQueue-detail-form-container md-input-container md-switch{margin:0!important}#chat-chatQueue .chatQueue-detail-form-container #chatQueue-image-uploader{position:relative}#chat-chatQueue .chatQueue-detail-form-container #chatQueue-image-uploader.dropping .drop-text{display:flex}#chat-chatQueue .chatQueue-detail-form-container #chatQueue-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#chat-chatQueue .chatQueue-detail-form-container #chatQueue-image-uploader .upload-button{margin-bottom:16px}#chat-chatQueue .chatQueue-detail-form-container #chatQueue-image-uploader .chatQueue-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#chat-chatQueue .chatQueue-detail-form-container #chatQueue-image-uploader .chatQueue-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#chat-chatQueue .chatQueue-detail-form-container #chatQueue-image-uploader .chatQueue-image .media{max-height:100%}#chat-chatQueue md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#chat-chatQueue md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#chat-chatQueue md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#chat-chatQueue md-table-container.font-size-12 td.md-cell{font-size:12px!important}#chatWebsites{position:relative}#chatWebsites>.header{height:76px;min-height:76px;max-height:76px}#chatWebsites>.header .logo .logo-icon{margin:0 16px 0 0}#chatWebsites>.header .logo .logo-text{font-size:24px}#chatWebsites>.header md-icon{color:#fff}#chatWebsites>.header .search-input-wrapper{position:relative}#chatWebsites>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#chatWebsites>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#chatWebsites>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#chatWebsites>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#chatWebsites>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#chatWebsites>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#chatWebsites>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#chatWebsites>.header.selected-bar .close-button-wrapper{width:244px}#chatWebsites>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#chatWebsites>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#chatWebsites>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#chatWebsites #add-chatWebsite-button{position:fixed;bottom:8px;right:8px;padding:0}#chatWebsites #upload-chatWebsite-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.chatWebsite-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatCannedAnswer-dialog{max-width:720px;width:720px}md-dialog.chatCannedAnswer-dialog md-dialog-content{display:block;position:relative}md-dialog.chatCannedAnswer-dialog md-toolbar .title{font-size:17px}md-dialog.chatCannedAnswer-dialog md-input-container textarea{min-height:150px}md-dialog.chatCannedAnswer-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.chatCannedAnswer-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.chatCannedAnswer-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatCannedAnswer-dialog .error-list{font-size:13px}md-dialog.chatCannedAnswer-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatCannedAnswer-dialog .error-list .error .message{font-weight:500}md-dialog.chatCannedAnswer-dialog .error-list .error .md-button{margin:0}md-dialog.chatCannedAnswer-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatCannedAnswer-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.offlineMessage-dialog{max-width:720px;width:720px}md-dialog.offlineMessage-dialog md-dialog-content{display:block;position:relative}md-dialog.offlineMessage-dialog md-toolbar .title{font-size:17px}md-dialog.offlineMessage-dialog md-input-container textarea{min-height:150px}md-dialog.offlineMessage-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.offlineMessage-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.offlineMessage-dialog .date-container{padding:16px 0 24px 0}md-dialog.offlineMessage-dialog .error-list{font-size:13px}md-dialog.offlineMessage-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.offlineMessage-dialog .error-list .error .message{font-weight:500}md-dialog.offlineMessage-dialog .error-list .error .md-button{margin:0}md-dialog.offlineMessage-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.offlineMessage-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatProactiveAction-dialog{max-width:720px;width:720px}md-dialog.chatProactiveAction-dialog md-dialog-content{display:block;position:relative}md-dialog.chatProactiveAction-dialog md-toolbar .title{font-size:17px}md-dialog.chatProactiveAction-dialog md-input-container textarea{min-height:150px}md-dialog.chatProactiveAction-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.chatProactiveAction-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.chatProactiveAction-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatProactiveAction-dialog .error-list{font-size:13px}md-dialog.chatProactiveAction-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatProactiveAction-dialog .error-list .error .message{font-weight:500}md-dialog.chatProactiveAction-dialog .error-list .error .md-button{margin:0}md-dialog.chatProactiveAction-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatProactiveAction-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#chat-chatWebsite .header{height:76px;min-height:76px;max-height:76px}#chat-chatWebsite .header .goto-chatWebsites-button{margin-right:16px}#chat-chatWebsite .header .chatWebsite-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#chat-chatWebsite .header .chatWebsite-image img{height:100%;width:auto;max-width:none}#chat-chatWebsite .header .subtitle{margin:6px 0 0 0}#chat-chatWebsite .chatWebsite-detail-form-container{padding:24px;margin-bottom:24px}#chat-chatWebsite .chatWebsite-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#chat-chatWebsite .chatWebsite-detail-form-container .handle{cursor:move}#chat-chatWebsite .chatWebsite-detail-form-container md-input-container md-switch{margin:0!important}#chat-chatWebsite .chatWebsite-detail-form-container #chatWebsite-image-uploader{position:relative}#chat-chatWebsite .chatWebsite-detail-form-container #chatWebsite-image-uploader.dropping .drop-text{display:flex}#chat-chatWebsite .chatWebsite-detail-form-container #chatWebsite-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#chat-chatWebsite .chatWebsite-detail-form-container #chatWebsite-image-uploader .upload-button{margin-bottom:16px}#chat-chatWebsite .chatWebsite-detail-form-container #chatWebsite-image-uploader .chatWebsite-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#chat-chatWebsite .chatWebsite-detail-form-container #chatWebsite-image-uploader .chatWebsite-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#chat-chatWebsite .chatWebsite-detail-form-container #chatWebsite-image-uploader .chatWebsite-image .media{max-height:100%}#chat-chatWebsite md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#chat-chatWebsite md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#chat-chatWebsite md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#chat-chatWebsite md-table-container.font-size-12 td.md-cell{font-size:12px!important}#realtime>.content .blink{animation:blinker 2s linear infinite}#realtime>.content .avatar-wrapper{position:relative}#realtime>.content .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .search-input-wrapper{position:relative;margin-left:20px}#realtime>.content .search-input-wrapper label{padding:6px;cursor:pointer}#realtime>.content .search-input-wrapper md-input-container{padding-top:20px}#realtime>.content .main .labels{padding:8px 16px}#realtime>.content .main .labels .label{margin:0 0 2px 4px;padding:2px 5px;font-size:11px;white-space:nowrap;border-radius:2px}#realtime>.content .main .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .main .avatar-wrapper{position:relative}#realtime>.content .main .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .custom-column{padding:0 24px!important}@keyframes blinker{50%{opacity:0}}#companies{position:relative}#companies>.header{height:76px;min-height:76px;max-height:76px}#companies>.header .logo .logo-icon{margin:0 16px 0 0}#companies>.header .logo .logo-text{font-size:24px}#companies>.header md-icon{color:#fff}#companies>.header .search-input-wrapper{position:relative}#companies>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#companies>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#companies>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#companies>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#companies>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#companies>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#companies>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#companies>.header.selected-bar .close-button-wrapper{width:244px}#companies>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#companies>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#companies>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#companies #add-company-button{position:fixed;bottom:8px;right:8px;padding:0}#companies #upload-company-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.company-dialog{max-width:720px;width:720px}md-dialog.company-dialog md-dialog-content{display:block;position:relative}md-dialog.company-dialog md-toolbar .title{font-size:17px}md-dialog.company-dialog md-input-container textarea{min-height:150px}md-dialog.company-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.company-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.company-dialog .date-container{padding:16px 0 24px 0}md-dialog.company-dialog .error-list{font-size:13px}md-dialog.company-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.company-dialog .error-list .error .message{font-weight:500}md-dialog.company-dialog .error-list .error .md-button{margin:0}md-dialog.company-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.company-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#contactmanager-company .header{height:76px;min-height:76px;max-height:76px}#contactmanager-company .header .goto-companies-button{margin-right:16px}#contactmanager-company .header .company-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#contactmanager-company .header .company-image img{height:100%;width:auto;max-width:none}#contactmanager-company .header .subtitle{margin:6px 0 0 0}#contactmanager-company .company-detail-form-container{padding:24px;margin-bottom:24px}#contactmanager-company .company-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#contactmanager-company .company-detail-form-container .handle{cursor:move}#contactmanager-company .company-detail-form-container md-input-container md-switch{margin:0!important}#contactmanager-company .company-detail-form-container #company-image-uploader{position:relative}#contactmanager-company .company-detail-form-container #company-image-uploader.dropping .drop-text{display:flex}#contactmanager-company .company-detail-form-container #company-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#contactmanager-company .company-detail-form-container #company-image-uploader .upload-button{margin-bottom:16px}#contactmanager-company .company-detail-form-container #company-image-uploader .company-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#contactmanager-company .company-detail-form-container #company-image-uploader .company-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#contactmanager-company .company-detail-form-container #company-image-uploader .company-image .media{max-height:100%}#contactmanager-company md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#contactmanager-company md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#contactmanager-company md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#contactmanager-company md-table-container.font-size-12 td.md-cell{font-size:12px!important}#contacts{position:relative}#contacts>.header{height:76px;min-height:76px;max-height:76px}#contacts>.header .logo .logo-icon{margin:0 16px 0 0}#contacts>.header .logo .logo-text{font-size:24px}#contacts>.header md-icon{color:#fff}#contacts>.header .search-input-wrapper{position:relative}#contacts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#contacts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#contacts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#contacts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#contacts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#contacts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#contacts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#contacts>.header.selected-bar .close-button-wrapper{width:244px}#contacts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#contacts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#contacts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#contacts #add-contact-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.cm-contact-dialog{max-width:720px;width:720px}md-dialog.cm-contact-dialog md-dialog-content{display:block;position:relative}md-dialog.cm-contact-dialog md-toolbar .title{font-size:17px}md-dialog.cm-contact-dialog md-input-container textarea{min-height:150px}md-dialog.cm-contact-dialog .date-container{padding:16px 0 24px 0}md-dialog.cm-contact-dialog .error-list{font-size:13px}md-dialog.cm-contact-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.cm-contact-dialog .error-list .error .message{font-weight:500}md-dialog.cm-contact-dialog .error-list .error .md-button{margin:0}md-dialog.cm-contact-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.cm-contact-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.cm-contact-dialog{max-width:720px;width:720px}md-dialog.cm-contact-dialog md-dialog-content{display:block;position:relative}md-dialog.cm-contact-dialog md-toolbar .title{font-size:17px}md-dialog.cm-contact-dialog md-input-container textarea{min-height:150px}md-dialog.cm-contact-dialog .date-container{padding:16px 0 24px 0}md-dialog.cm-contact-dialog .error-list{font-size:13px}md-dialog.cm-contact-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.cm-contact-dialog .error-list .error .message{font-weight:500}md-dialog.cm-contact-dialog .error-list .error .md-button{margin:0}md-dialog.cm-contact-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.cm-contact-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.hopper-dialog{max-width:720px;width:720px}md-dialog.hopper-dialog md-dialog-content{display:block;position:relative}md-dialog.hopper-dialog md-toolbar .title{font-size:17px}md-dialog.hopper-dialog md-input-container textarea{min-height:150px}md-dialog.hopper-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.hopper-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.hopper-dialog .date-container{padding:16px 0 24px 0}md-dialog.hopper-dialog .error-list{font-size:13px}md-dialog.hopper-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.hopper-dialog .error-list .error .message{font-weight:500}md-dialog.hopper-dialog .error-list .error .md-button{margin:0}md-dialog.hopper-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.hopper-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#cm-contact .pointer{cursor:pointer}#cm-contact .header{height:76px;min-height:76px;max-height:76px}#cm-contact .header .goto-contacts-button{margin-right:16px}#cm-contact .header .contact-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#cm-contact .header .contact-image img{height:100%;width:auto;max-width:none}#cm-contact .header .subtitle{margin:6px 0 0 0}#cm-contact .contact-detail-form-container{padding:24px;margin-bottom:24px}#cm-contact .contact-detail-form-container md-input-container:not(.md-input-invalid)>md-icon.email{color:green}#cm-contact .contact-detail-form-container md-input-container:not(.md-input-invalid)>md-icon.firstname{color:#1e90ff}#cm-contact .contact-detail-form-container md-input-container.md-input-invalid>md-icon.email,#cm-contact .contact-detail-form-container md-input-container.md-input-invalid>md-icon.firstname{color:red}#cm-contact .contact-detail-form-container .hint{position:absolute;left:2px;right:auto;bottom:7px;font-size:10px;line-height:14px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.import-dialog{max-width:720px;width:720px}md-dialog.import-dialog md-dialog-content{display:block;position:relative}md-dialog.import-dialog md-toolbar .title{font-size:17px}md-dialog.import-dialog md-input-container textarea{min-height:150px}md-dialog.import-dialog .date-container{padding:16px 0 24px 0}md-dialog.import-dialog .error-list{font-size:13px}md-dialog.import-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.import-dialog .error-list .error .message{font-weight:500}md-dialog.import-dialog .error-list .error .md-button{margin:0}md-dialog.import-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.import-dialog .error-list .info{background-color:rgba(24,160,135,.08);border:1px solid rgba(24,160,135,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.import-dialog .error-list .info .message{font-weight:500}md-dialog.import-dialog .error-list .info .md-button{margin:0}md-dialog.import-dialog .error-list .info:last-child{margin-bottom:30px}md-dialog.import-dialog .contact-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}md-dialog.import-dialog .contact-image img{height:100%;width:auto;max-width:none}md-dialog.import-dialog .contact-image .media{max-height:100%}md-dialog.import-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.cm-contact-dialog{max-width:720px;width:720px}md-dialog.cm-contact-dialog md-dialog-content{display:block;position:relative}md-dialog.cm-contact-dialog md-toolbar .title{font-size:17px}md-dialog.cm-contact-dialog md-input-container textarea{min-height:150px}md-dialog.cm-contact-dialog .date-container{padding:16px 0 24px 0}md-dialog.cm-contact-dialog .error-list{font-size:13px}md-dialog.cm-contact-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.cm-contact-dialog .error-list .error .message{font-weight:500}md-dialog.cm-contact-dialog .error-list .error .md-button{margin:0}md-dialog.cm-contact-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.cm-contact-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.globalCustomField-dialog{max-width:720px;width:720px}md-dialog.globalCustomField-dialog md-dialog-content{display:block;position:relative}md-dialog.globalCustomField-dialog md-toolbar .title{font-size:17px}md-dialog.globalCustomField-dialog md-input-container textarea{min-height:150px}md-dialog.globalCustomField-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.globalCustomField-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.globalCustomField-dialog .date-container{padding:16px 0 24px 0}md-dialog.globalCustomField-dialog .error-list{font-size:13px}md-dialog.globalCustomField-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.globalCustomField-dialog .error-list .error .message{font-weight:500}md-dialog.globalCustomField-dialog .error-list .error .md-button{margin:0}md-dialog.globalCustomField-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.globalCustomField-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#globalCustomFields{position:relative}#globalCustomFields>.header{height:76px;min-height:76px;max-height:76px}#globalCustomFields>.header .logo .logo-icon{margin:0 16px 0 0}#globalCustomFields>.header .logo .logo-text{font-size:24px}#globalCustomFields>.header md-icon{color:#fff}#globalCustomFields>.header .search-input-wrapper{position:relative}#globalCustomFields>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#globalCustomFields>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#globalCustomFields>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#globalCustomFields>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#globalCustomFields>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#globalCustomFields>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#globalCustomFields>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#globalCustomFields>.header.selected-bar .close-button-wrapper{width:244px}#globalCustomFields>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#globalCustomFields>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#globalCustomFields>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#globalCustomFields #add-globalCustomField-button{position:fixed;bottom:8px;right:8px;padding:0}#globalCustomFields #upload-globalCustomField-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.list-dialog{max-width:720px;width:720px}md-dialog.list-dialog md-dialog-content{display:block;position:relative}md-dialog.list-dialog md-toolbar .title{font-size:17px}md-dialog.list-dialog md-input-container textarea{min-height:150px}md-dialog.list-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.list-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.list-dialog .date-container{padding:16px 0 24px 0}md-dialog.list-dialog .error-list{font-size:13px}md-dialog.list-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.list-dialog .error-list .error .message{font-weight:500}md-dialog.list-dialog .error-list .error .md-button{margin:0}md-dialog.list-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.list-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.customField-dialog{max-width:720px;width:720px}md-dialog.customField-dialog md-dialog-content{display:block;position:relative}md-dialog.customField-dialog md-toolbar .title{font-size:17px}md-dialog.customField-dialog md-input-container textarea{min-height:150px}md-dialog.customField-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.customField-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.customField-dialog .date-container{padding:16px 0 24px 0}md-dialog.customField-dialog .error-list{font-size:13px}md-dialog.customField-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.customField-dialog .error-list .error .message{font-weight:500}md-dialog.customField-dialog .error-list .error .md-button{margin:0}md-dialog.customField-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.customField-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#contactmanager-list .header{height:76px;min-height:76px;max-height:76px}#contactmanager-list .header .goto-lists-button{margin-right:16px}#contactmanager-list .header .list-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#contactmanager-list .header .list-image img{height:100%;width:auto;max-width:none}#contactmanager-list .header .subtitle{margin:6px 0 0 0}#contactmanager-list .list-detail-form-container{padding:24px;margin-bottom:24px}#contactmanager-list .list-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#contactmanager-list .list-detail-form-container .handle{cursor:move}#contactmanager-list .list-detail-form-container md-input-container md-switch{margin:0!important}#contactmanager-list .list-detail-form-container #list-image-uploader{position:relative}#contactmanager-list .list-detail-form-container #list-image-uploader.dropping .drop-text{display:flex}#contactmanager-list .list-detail-form-container #list-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#contactmanager-list .list-detail-form-container #list-image-uploader .upload-button{margin-bottom:16px}#contactmanager-list .list-detail-form-container #list-image-uploader .list-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#contactmanager-list .list-detail-form-container #list-image-uploader .list-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#contactmanager-list .list-detail-form-container #list-image-uploader .list-image .media{max-height:100%}#contactmanager-list md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#contactmanager-list md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#contactmanager-list md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#contactmanager-list md-table-container.font-size-12 td.md-cell{font-size:12px!important}#lists{position:relative}#lists>.header{height:76px;min-height:76px;max-height:76px}#lists>.header .logo .logo-icon{margin:0 16px 0 0}#lists>.header .logo .logo-text{font-size:24px}#lists>.header md-icon{color:#fff}#lists>.header .search-input-wrapper{position:relative}#lists>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#lists>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#lists>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#lists>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#lists>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#lists>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#lists>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#lists>.header.selected-bar .close-button-wrapper{width:244px}#lists>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#lists>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#lists>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#lists #add-list-button{position:fixed;bottom:8px;right:8px;padding:0}#lists #upload-list-button{position:fixed;bottom:8px;right:8px;padding:0}#dashboard-custom .filter-header{background-image:url(/assets/images/backgrounds/header-bg.png);color:#fff}#agent-general{position:fixed;width:100%;height:100%}#agent-general .agent-content{position:fixed;top:36px;bottom:0;left:0;right:0}#agent-general .badge{min-width:20px;height:20px;line-height:20px;padding:0 7px;font-size:11px;font-weight:700;border-radius:20px;transition:opacity .2s ease-in-out .1s}#agent-general .table-header{background-image:url(/assets/images/backgrounds/header-bg.png);color:#fff}#agent-general .table-header .md-toolbar-tools div md-select .md-select-value.md-select-placeholder{color:#fff}#agent-general .table-header .md-toolbar-tools div md-select[disabled] .md-select-value.md-select-placeholder{color:#fff}#agent-general .table-header .md-toolbar-tools div md-select[disabled] .md-select-value.md-select-placeholder .md-select-icon{display:none}#agent-general .table-header ms-quick-filter .quick-filter-date-clear-button{color:#fff}#agent-general .tooltip-preview{position:relative;display:inline-block;text-decoration:underline}#agent-general .tooltip-preview .tooltip-preview-text{visibility:hidden;width:500px;position:absolute;white-space:pre-line;left:100%;z-index:9999}#agent-general .tooltip-preview:hover .tooltip-preview-text{visibility:visible}#agent-general .reload-list md-icon{color:#fff}#agent-general .advanced-search md-icon{color:#fff}#agent-general .create-new md-icon{color:#fff}#agent-general div.draft-manager-bar{background-color:#f5f5f5;position:sticky;height:34px;bottom:0;border-top:1px solid #e0e0e0}#agent-general div.draft-manager-bar ms-tab-scroll{overflow:hidden}#agent-general div.draft-manager-bar ms-tab-scroll div.draft-manager-tab{height:34px;border-right:1px solid #e0e0e0}#agent-general td.width-5,#agent-general th.width-5{width:5px!important;min-width:auto!important;max-width:none!important}#agent-general td.width-10,#agent-general th.width-10{width:10px!important;min-width:auto!important;max-width:none!important}#agent-general td.width-15,#agent-general th.width-15{width:15px!important;min-width:auto!important;max-width:none!important}#agent-general td.no-padding,#agent-general th.no-padding{padding:0!important}#agent-general span.contact-text{width:100px!important}#agent-general span.subject-text{width:300px!important}#agent-general span.no-margin-bottom{margin-bottom:0!important}#agent-general span.no-margin-top{margin-top:0!important}#agent-general md-table-container.interactions-list thead tr th:not(.no-padding):not(.id-header){padding:0 20px 0 0!important}#agent-general md-table-container.interactions-list tbody tr td:not(.no-padding):not(.actions-padding):not(.id){padding:0 20px 0 0!important}#agent-general td.actions-padding{padding:0 8px 0 0!important}#agent-general md-toolbar.md-table-toolbar[disabled]{pointer-events:none}#agent-general md-toolbar.md-table-toolbar[disabled] ms-search-bar{opacity:.7}#agent-general md-toolbar.md-table-toolbar[disabled] ms-quick-filter{opacity:.7}#agent-general md-toolbar.md-table-toolbar[disabled] button.advanced-search,#agent-general md-toolbar.md-table-toolbar[disabled] button.interaction-reload{opacity:.7}#agent-general md-card.call-info-card{min-width:200px}#agent-general md-card.call-info-card div.reload-container{position:relative}#agent-general md-card.call-info-card button.reload-button{position:absolute;right:-16px}@media screen and (max-width:1280px){#agent-general span.contact-text{width:100px!important}#agent-general span.subject-text{width:350px!important}}@media screen and (max-width:1920px){#agent-general span.contact-text{width:150px!important}#agent-general span.subject-text{width:500px!important}}#agent-general-dialog{position:fixed;width:100%;height:100%}#agent-general-dialog .agent-content{position:fixed;top:0;bottom:0;left:0;right:0}body .md-select-menu-container{z-index:110}.md-toolbar-tools{font-size:12px}div.toolbar-quick-filter[disabled]{pointer-events:none;opacity:.7}md-dialog.agent-dialog{max-width:720px;width:720px}md-dialog.agent-dialog md-dialog-content{display:block;position:relative}md-dialog.agent-dialog md-toolbar .title{font-size:17px}md-dialog.agent-dialog md-input-container textarea{min-height:150px}md-dialog.agent-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.agent-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.agent-dialog .date-container{padding:16px 0 24px 0}md-dialog.agent-dialog .error-list{font-size:13px}md-dialog.agent-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.agent-dialog .error-list .error .message{font-weight:500}md-dialog.agent-dialog .error-list .error .md-button{margin:0}md-dialog.agent-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.agent-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.agent-dialog{max-width:720px;width:720px}md-dialog.agent-dialog md-dialog-content{display:block;position:relative}md-dialog.agent-dialog md-toolbar .title{font-size:17px}md-dialog.agent-dialog md-input-container textarea{min-height:150px}md-dialog.agent-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.agent-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.agent-dialog .date-container{padding:16px 0 24px 0}md-dialog.agent-dialog .error-list{font-size:13px}md-dialog.agent-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.agent-dialog .error-list .error .message{font-weight:500}md-dialog.agent-dialog .error-list .error .md-button{margin:0}md-dialog.agent-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.agent-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.contact-trigger-dialog{max-width:720px;width:720px}md-dialog.contact-trigger-dialog md-dialog-content{display:block;position:relative;max-height:400px;height:400px}md-dialog.contact-trigger-dialog md-toolbar{background-image:url(/assets/images/backgrounds/header-bg.png);background-position:top}md-dialog.contact-trigger-dialog md-toolbar .title{font-size:17px}md-dialog.contact-trigger-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}md-dialog.contact-trigger-dialog md-dialog-actions button.select-button{position:absolute;right:0;margin-right:16px}md-dialog md-grid-list.one-row-layout{height:150px;max-height:150px}md-dialog md-grid-list.two-rows-layout{height:300px;max-height:300px}md-dialog md-card.contact-info:hover{background-color:#e9eef1ad}@media screen and (max-width:1280px){md-dialog.contact-trigger-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.contact-trigger-dialog{width:90%}}md-dialog.agent-dialog{max-width:720px;width:720px}md-dialog.agent-dialog md-dialog-content{display:block;position:relative}md-dialog.agent-dialog md-toolbar .title{font-size:17px}md-dialog.agent-dialog md-input-container textarea{min-height:150px}md-dialog.agent-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.agent-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.agent-dialog .date-container{padding:16px 0 24px 0}md-dialog.agent-dialog .error-list{font-size:13px}md-dialog.agent-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.agent-dialog .error-list .error .message{font-weight:500}md-dialog.agent-dialog .error-list .error .md-button{margin:0}md-dialog.agent-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.agent-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.details-dialog{max-width:500px;width:500px}md-dialog.details-dialog md-dialog-content{display:block;position:relative}md-dialog.details-dialog md-toolbar .title{font-size:17px}md-dialog.details-dialog md-input-container textarea{min-height:150px}md-dialog.details-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.details-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.details-dialog .date-container{padding:16px 0 24px 0}md-dialog.details-dialog .error-list{font-size:13px}md-dialog.details-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.details-dialog .error-list .error .message{font-weight:500}md-dialog.details-dialog .error-list .error .md-button{margin:0}md-dialog.details-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.details-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#interaction-app .tags{font-size:12px}#interaction-app .tags .tag{border-radius:2px;padding:3px 8px;background-color:rgba(0,0,0,.08)}#interaction-app .tags .tag .tag-color{width:8px;height:8px;margin-right:8px;border-radius:50%}#interaction-app .content-card{position:relative;height:100%}#interaction-app .content-card .interaction{background:linear-gradient(to bottom,rgba(255,255,255,.8) 0,rgba(255,255,255,.6) 20%,rgba(255,255,255,.8))}#interaction-app .content-card .interaction .avatar-small{width:30px;min-width:30px;height:30px;line-height:30px;margin:0 8px 0 0;border-radius:50%;font-size:17px;font-weight:500;text-align:center;color:#fff}#interaction-app .content-card .interaction .interaction-agents{min-height:40px;background-color:#f3f4f5;color:rgba(0,0,0,.87);border-bottom:1px solid rgba(0,0,0,.08)}#interaction-app .content-card .interaction .interaction-agents .responsive-interactions-button{padding:0}#interaction-app .content-card .interaction .interaction-agents .interaction-contact{cursor:pointer}#interaction-app .content-card .interaction .interaction-agents .interaction-contact .avatar{margin-right:16px}#interaction-app .content-card .interaction .interaction-toolbar{min-height:64px;background-color:#f3f4f5;color:rgba(0,0,0,.87);border-bottom:1px solid rgba(0,0,0,.08)}#interaction-app .content-card .interaction .interaction-toolbar md-icon{color:rgba(0,0,0,.87)}#interaction-app .content-card .interaction .interaction-toolbar .responsive-interactions-button{padding:0}#interaction-app .content-card .interaction .interaction-toolbar .interaction-contact{cursor:pointer}#interaction-app .content-card .interaction .interaction-toolbar .interaction-contact .avatar{margin-right:16px}#interaction-app .content-card .interaction .cannedarea{margin-right:7px;font-size:14px;border:1px solid #ccc;border-radius:3px;align-self:stretch}#interaction-app .content-card .interaction .cannedarea md-autocomplete-wrap{padding:0 1em}#interaction-app .content-card .interaction .emojionearea{margin-right:7px}#interaction-app .content-card .interaction #interaction-content{background:url(/assets/images/patterns/circles-light.png) repeat}#interaction-app .content-card .interaction #interaction-content .message-row .mail-content{padding:24px 0}#interaction-app .content-card .interaction #interaction-content .message-row .mail-content .subject{color:rgba(0,0,0,.54)}#interaction-app .content-card .interaction #interaction-content .message-row .mail-content .subject .subject-text{margin-right:4px;text-transform:lowercase}#interaction-app .content-card .interaction #interaction-content .message-row .mail-content .info{padding-bottom:16px}#interaction-app .content-card .interaction #interaction-content .message-row .mail-content .info .avatar{margin-right:16px}#interaction-app .content-card .interaction #interaction-content .message-row .mail-content .info .name{margin-right:8px;font-weight:500}#interaction-app .content-card .interaction #interaction-content .message-row .mail-content .info .toggle-details{padding-top:16px;cursor:pointer;font-weight:500}#interaction-app .content-card .interaction #interaction-content .message-row .mail-content .info .details{padding-top:8px}#interaction-app .content-card .interaction #interaction-content .message-row .mail-content .info .details .title{font-weight:500;margin-right:6px}#interaction-app .content-card .interaction #interaction-content .message-row .mail-content .info .details .detail{color:rgba(0,0,0,.54)}#interaction-app .content-card .interaction #interaction-content .message-row .bubble{position:relative;padding:6px 7px 8px 9px;background-color:#fff;border:1px solid #dcdfe1;border-radius:6px;word-break:break-word}#interaction-app .content-card .interaction #interaction-content .message-row .bubble:after,#interaction-app .content-card .interaction #interaction-content .message-row .bubble:before{content:' ';position:absolute;width:0;height:0}#interaction-app .content-card .interaction #interaction-content .message-row .bubble:after{left:-7px;right:auto;top:0;bottom:auto;border:11px solid;border-color:#fff transparent transparent transparent}#interaction-app .content-card .interaction #interaction-content .message-row .bubble:before{left:-9px;right:auto;top:-1px;bottom:auto;border:8px solid;border-color:#dcdfe1 transparent transparent transparent}#interaction-app .content-card .interaction #interaction-content .message-row .bubble .time{font-size:11px;margin-top:0;text-align:right}#interaction-app .content-card .interaction #interaction-content .message-row .bubble .message{white-space:pre-wrap}#interaction-app .content-card .interaction #interaction-content .message-row .bubble .message span{word-break:break-all}#interaction-app .content-card .interaction #interaction-content .message-row.in{padding:5px}#interaction-app .content-card .interaction #interaction-content .message-row.in .avatar{margin:0 16px 0 0}#interaction-app .content-card .interaction #interaction-content .message-row.in-right-aligned{padding:5px;align-items:flex-end}#interaction-app .content-card .interaction #interaction-content .message-row.in-right-aligned .avatar{order:2;margin:0 0 0 16px}#interaction-app .content-card .interaction #interaction-content .message-row.in-right-aligned .bubble{margin-left:auto;order:1}#interaction-app .content-card .interaction #interaction-content .message-row.in-right-aligned .bubble:after{right:-9px;left:auto;top:auto;bottom:0;border-color:transparent transparent #e8f5e9 transparent}#interaction-app .content-card .interaction #interaction-content .message-row.in-right-aligned .bubble:before{right:-11px;left:auto;-moz-transform:scaleX(-1);-o-transform:scaleX(-1);-webkit-transform:scaleX(-1);transform:scaleX(-1)}#interaction-app .content-card .interaction #interaction-content .message-row.out{padding:5px;align-items:flex-end}#interaction-app .content-card .interaction #interaction-content .message-row.out .avatar{order:2;margin:0 0 0 16px}#interaction-app .content-card .interaction #interaction-content .message-row.out .bubble{margin-left:auto;background-color:#e8f5e9;border:1px solid #dfebe0;order:1}#interaction-app .content-card .interaction #interaction-content .message-row.out .bubble:after{right:-7px;left:auto;top:auto;bottom:0;border-color:transparent transparent #e8f5e9 transparent}#interaction-app .content-card .interaction #interaction-content .message-row.out .bubble:before{right:-9px;left:auto;top:auto;bottom:-1px;border-color:transparent transparent #dfebe0 transparent}#interaction-app .content-card .interaction #interaction-content .message-row.out-left-aligned{padding:5px}#interaction-app .content-card .interaction #interaction-content .message-row.out-left-aligned .avatar{order:1;margin:0 16px 0 0}#interaction-app .content-card .interaction #interaction-content .message-row.out-left-aligned .bubble{background-color:#e8f5e9;border:1px solid #dfebe0;order:2}#interaction-app .content-card .interaction #interaction-content .message-row.out-left-aligned .bubble:after{right:-7px;left:auto;top:auto;bottom:0;border-color:transparent transparent #e8f5e9 transparent}#interaction-app .content-card .interaction #interaction-content .message-row.out-left-aligned .bubble:before{right:-9px;left:auto;top:auto;bottom:-1px;border-color:transparent transparent #dfebe0 transparent}#interaction-app .content-card .interaction .interaction-footer{min-height:64px;max-height:180px;background-color:#f3f4f5;color:rgba(0,0,0,.87);border-top:1px solid rgba(0,0,0,.08);padding:8px 8px 8px 16px}#interaction-app .content-card .interaction .interaction-footer .reply-form md-input-container{margin:0;padding-right:16px}#interaction-app .content-card .interaction .interaction-footer .reply-form md-input-container textarea{overflow:auto;max-height:80px;transition:height .2s ease}#interaction-app .content-card .interaction .interaction-footer .reply-form md-input-container textarea.grow{height:80px}#interaction-app .content-card .interaction .interaction-footer .reply-form md-input-container .md-errors-spacer{display:none}#interaction-app .content-card .interaction .interaction-footer .reply-form .md-button{margin:0}#interaction-app .content-card .info md-list-item{min-height:40px;height:52px}#interaction-app .content-card .start-point{background:linear-gradient(to bottom,rgba(255,255,255,.8) 0,rgba(255,255,255,.6) 20%,rgba(255,255,255,.8))}#interaction-app .content-card .start-point .big-circle{background:linear-gradient(to bottom,rgba(255,255,255,.8) 0,rgba(255,255,255,.6) 20%,rgba(255,255,255,.8));border-radius:50%;width:300px;height:300px;line-height:300px;text-align:center}#interaction-app .content-card .start-point .app-title{font-weight:500;font-size:32px;margin:12px 0}#interaction-app .content-card .start-point .secondary-text{font-size:16px}#interaction-app .content-card .sidenav md-toolbar{border-bottom:1px solid rgba(0,0,0,.08)}#interaction-app .content-card .sidenav md-toolbar .md-toolbar-tools-bottom .search{height:36px;line-height:36px;padding:8px;background:#fff;font-size:13px}#interaction-app .content-card .sidenav md-toolbar .md-toolbar-tools-bottom .search .icon{margin:0;color:rgba(0,0,0,.54)}#interaction-app .content-card .sidenav md-toolbar .md-toolbar-tools-bottom .search input{padding-left:12px;height:36px;color:rgba(0,0,0,.54)}#interaction-app .content-card .sidenav md-list.contact-list,#interaction-app .content-card .sidenav md-list.interaction-list{position:relative;transition:all .2s ease-out}#interaction-app .content-card .sidenav md-list.contact-list .subheader,#interaction-app .content-card .sidenav md-list.contact-list md-list-item,#interaction-app .content-card .sidenav md-list.interaction-list .subheader,#interaction-app .content-card .sidenav md-list.interaction-list md-list-item{position:absolute;right:0;left:0;width:100%;transition:transform .2s ease-out;background:#fff;will-change:transform}#interaction-app .content-card .sidenav md-list.contact-list .subheader.ng-leave,#interaction-app .content-card .sidenav md-list.contact-list md-list-item.ng-leave,#interaction-app .content-card .sidenav md-list.interaction-list .subheader.ng-leave,#interaction-app .content-card .sidenav md-list.interaction-list md-list-item.ng-leave{transform:translateY(0);display:none}#interaction-app .content-card .sidenav md-list.contact-list .subheader.ng-leave.ng-leave-active,#interaction-app .content-card .sidenav md-list.contact-list md-list-item.ng-leave.ng-leave-active,#interaction-app .content-card .sidenav md-list.interaction-list .subheader.ng-leave.ng-leave-active,#interaction-app .content-card .sidenav md-list.interaction-list md-list-item.ng-leave.ng-leave-active{transform:translateY(-100%)}#interaction-app .content-card .sidenav md-list.contact-list .subheader.ng-hide,#interaction-app .content-card .sidenav md-list.contact-list md-list-item.ng-hide,#interaction-app .content-card .sidenav md-list.interaction-list .subheader.ng-hide,#interaction-app .content-card .sidenav md-list.interaction-list md-list-item.ng-hide{display:none}#interaction-app .content-card .sidenav md-list.contact-list .subheader.ng-hide-add-active,#interaction-app .content-card .sidenav md-list.contact-list .subheader.ng-hide-remove-active,#interaction-app .content-card .sidenav md-list.contact-list md-list-item.ng-hide-add-active,#interaction-app .content-card .sidenav md-list.contact-list md-list-item.ng-hide-remove-active,#interaction-app .content-card .sidenav md-list.interaction-list .subheader.ng-hide-add-active,#interaction-app .content-card .sidenav md-list.interaction-list .subheader.ng-hide-remove-active,#interaction-app .content-card .sidenav md-list.interaction-list md-list-item.ng-hide-add-active,#interaction-app .content-card .sidenav md-list.interaction-list md-list-item.ng-hide-remove-active{display:block;transition-property:all}#interaction-app .content-card .sidenav md-list.contact-list .subheader,#interaction-app .content-card .sidenav md-list.interaction-list .subheader{padding-left:16px;font-size:20px;font-weight:300;height:88px;line-height:88px}#interaction-app .content-card .sidenav .no-results-message{position:absolute;width:100%;height:88px;padding:16px;background:#fff;font-size:15px;font-weight:400}#interaction-app .avatar-wrapper{position:relative}#interaction-app .avatar-wrapper .avatar{margin-top:0;margin-bottom:0}#interaction-app .status{position:absolute;top:28px;left:28px;border-radius:50%}#interaction-app .status.online{color:#4caf50}#interaction-app .status.online:before{content:'\e709'}#interaction-app .status.do-not-disturb{color:#f44336}#interaction-app .status.do-not-disturb:before{content:'\e912'}#interaction-app .status.away{background-color:#ffc107;color:#fff}#interaction-app .status.away:before{content:'\e727'}#interaction-app .status.offline{color:#4caf50;background-color:#fff}#interaction-app .status.offline:before{content:'\e704'}#interaction-app .editable-wrap{position:relative}#interaction-app .editable-wrap .editable-controls{display:flex;flex-direction:row;align-items:center;width:100%}#interaction-app .editable-wrap .editable-controls .editable-input{width:inherit;background-color:#fff;padding:8px;border:1px solid rgba(0,0,0,.12)}#interaction-app .editable-wrap .editable-controls .editable-buttons{display:inherit}#interaction-app .editable-wrap .editable-controls .editable-buttons .md-button{margin:0}#interaction-app .editable-wrap .editable-controls .editable-buttons .md-button:first-of-type{padding-right:0}#interaction-app .editable-wrap .editable-controls .editable-buttons .md-button .icon-cancel{color:rgba(0,0,0,.32)}#interaction-app .editable-click{cursor:pointer;text-decoration:none;color:inherit;border-bottom:none}#interaction-app .emoji-picker-icon{right:5px;cursor:pointer}#interaction-app .input-show-hide{transition:all linear .5s}#interaction-app .input-show-hide.ng-hide{opacity:0}#interaction-app div.interaction-reply-button-container{display:inline;padding-bottom:14px}#timeline{position:relative;height:auto;padding-bottom:30px}#timeline:before{display:block;position:absolute;z-index:10;content:'';width:2px;background:rgba(0,0,0,.08);top:0;left:50%;bottom:0;margin-left:-1px}#timeline .ms-timeline-item{overflow:hidden;position:relative;z-index:20;width:100%;margin:0 auto;max-width:1200px}#timeline .ms-timeline-item .timeline-card{order:1}#timeline .ms-timeline-item .timeline-card .interaction .header .avatar .image{display:block;width:40px;height:40px;border-radius:20px}#timeline .ms-timeline-item .timeline-card .interaction .media .image{width:100%}#timeline .ms-timeline-item .timeline-point{position:absolute;width:40px;height:40px;line-height:40px;text-align:center;border-radius:50%;left:50%;margin:16px 0 0 -28px;order:2}#timeline .ms-timeline-item .timeline-point md-icon{color:#fff}#timeline .ms-timeline-item .timeline-detail{flex:50% 0 0;padding-top:28px;order:3}#timeline .ms-timeline-item .timeline-detail .time{font-size:15px;padding-left:68px}#timeline .ms-timeline-item .timeline-detail .event{color:rgba(0,0,0,.54);padding-left:68px}#timeline .ms-timeline-item:nth-child(odd) .timeline-card{flex-direction:row-reverse}#timeline .ms-timeline-item:nth-child(even) .timeline-card{order:3;padding-right:0}#timeline .ms-timeline-item:nth-child(even) .timeline-card ms-card{padding-left:84px}#timeline .ms-timeline-item:nth-child(even) .timeline-detail{order:1;padding-left:0;text-align:right}#timeline .ms-timeline-item:nth-child(even) .timeline-detail .event,#timeline .ms-timeline-item:nth-child(even) .timeline-detail .time{padding-right:68px}#timeline .ms-timeline-item:first-child{padding-top:15px}#timeline .ms-timeline-item.animate .timeline-card{animation:slide-in-left .4s}#timeline .ms-timeline-item.animate .timeline-point{animation:slide-in-bottom .4s}#timeline .ms-timeline-item.animate .timeline-detail{animation:slide-in-right .4s}#timeline .ms-timeline-item:nth-child(even).animate .timeline-card{animation:slide-in-right .4s}#timeline .ms-timeline-item:nth-child(even).animate .timeline-detail{animation:slide-in-left .4s}#timeline.timeline-left .ms-timeline-item .timeline-card{order:1}#timeline.timeline-left .ms-timeline-item .timeline-card ms-card{padding-right:68px;padding-left:0;margin-left:auto}#timeline.timeline-left .ms-timeline-item .timeline-detail{order:3;text-align:left}#timeline.timeline-left .ms-timeline-item.animate .timeline-card{animation:slide-in-left .4s}#timeline.timeline-left .ms-timeline-item.animate .timeline-detail{animation:slide-in-right .4s}#timeline.timeline-right .ms-timeline-item .timeline-card{order:3}#timeline.timeline-right .ms-timeline-item .timeline-card ms-card{padding-left:68px;padding-right:0;margin-right:auto}#timeline.timeline-right .ms-timeline-item .timeline-detail{order:1;text-align:right}#timeline.timeline-right .ms-timeline-item .timeline-detail .event,#timeline.timeline-right .ms-timeline-item .timeline-detail .time{padding-right:68px;padding-left:0}#timeline.timeline-right .ms-timeline-item.animate .timeline-card{animation:slide-in-right .4s}#timeline.timeline-right .ms-timeline-item.animate .timeline-detail{animation:slide-in-left .4s}@media screen and (max-width:1280px){#timeline .ms-timeline-item,#timeline.timeline-left .ms-timeline-item,#timeline.timeline-right .ms-timeline-item{display:block}#timeline .ms-timeline-item .timeline-point,#timeline.timeline-left .ms-timeline-item .timeline-point,#timeline.timeline-right .ms-timeline-item .timeline-point{position:relative;left:auto;margin:0 auto 16px auto;padding:0}#timeline .ms-timeline-item .timeline-detail,#timeline.timeline-left .ms-timeline-item .timeline-detail,#timeline.timeline-right .ms-timeline-item .timeline-detail{padding:2px;margin-bottom:16px}#timeline .ms-timeline-item .timeline-detail .event,#timeline .ms-timeline-item .timeline-detail .time,#timeline.timeline-left .ms-timeline-item .timeline-detail .event,#timeline.timeline-left .ms-timeline-item .timeline-detail .time,#timeline.timeline-right .ms-timeline-item .timeline-detail .event,#timeline.timeline-right .ms-timeline-item .timeline-detail .time{padding-right:0;padding-left:0;text-align:center}#timeline .ms-timeline-item .timeline-card ms-card,#timeline.timeline-left .ms-timeline-item .timeline-card ms-card,#timeline.timeline-right .ms-timeline-item .timeline-card ms-card{margin:0 auto;padding:0}#timeline .ms-timeline-item:nth-child(even) .timeline-point,#timeline.timeline-left .ms-timeline-item:nth-child(even) .timeline-point,#timeline.timeline-right .ms-timeline-item:nth-child(even) .timeline-point{position:relative;left:auto;margin:0 auto 16px auto;padding:0}#timeline .ms-timeline-item:nth-child(even) .timeline-detail,#timeline.timeline-left .ms-timeline-item:nth-child(even) .timeline-detail,#timeline.timeline-right .ms-timeline-item:nth-child(even) .timeline-detail{padding:2px;margin-bottom:16px}#timeline .ms-timeline-item:nth-child(even) .timeline-detail .event,#timeline .ms-timeline-item:nth-child(even) .timeline-detail .time,#timeline.timeline-left .ms-timeline-item:nth-child(even) .timeline-detail .event,#timeline.timeline-left .ms-timeline-item:nth-child(even) .timeline-detail .time,#timeline.timeline-right .ms-timeline-item:nth-child(even) .timeline-detail .event,#timeline.timeline-right .ms-timeline-item:nth-child(even) .timeline-detail .time{padding-right:0;padding-left:0;text-align:center}#timeline .ms-timeline-item:nth-child(even) .timeline-card ms-card,#timeline.timeline-left .ms-timeline-item:nth-child(even) .timeline-card ms-card,#timeline.timeline-right .ms-timeline-item:nth-child(even) .timeline-card ms-card{margin:0 auto;padding:0}}md-dialog.compose-dialog{height:100%;width:100%;max-width:70%;max-height:80%}md-dialog.compose-dialog md-dialog-content{display:block;position:relative}md-dialog.compose-dialog md-toolbar .title{font-size:17px}md-dialog.compose-dialog md-chips md-chip{font-size:12px}md-dialog.compose-dialog md-chips .md-chip-input-container{width:100%}md-dialog.compose-dialog .to{position:relative}md-dialog.compose-dialog .error-list{font-size:13px}md-dialog.compose-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.compose-dialog .error-list .error .message{font-weight:500}md-dialog.compose-dialog .error-list .error .md-button{margin:0}md-dialog.compose-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.compose-dialog .emojionearea{min-height:250px}md-dialog.compose-dialog md-dialog-actions{position:relative;justify-content:space-between;border-top:1px solid rgba(0,0,0,.12);background-color:rgba(0,0,0,.03)}@media screen and (max-width:960px){md-dialog.compose-dialog{width:80%}}@media screen and (max-width:600px){md-dialog.compose-dialog{width:90%}}md-dialog.compose-dialog-fax{max-width:720px;width:720px;max-height:450px;height:450px}md-dialog.compose-dialog-fax md-dialog-content{display:block;position:relative}md-dialog.compose-dialog-fax md-toolbar .title{font-size:17px}md-dialog.compose-dialog-fax md-chips md-chip{font-size:12px}md-dialog.compose-dialog-fax md-chips .md-chip-input-container{width:100%}md-dialog.compose-dialog-fax .to{position:relative}md-dialog.compose-dialog-fax .attachment-list{font-size:13px}md-dialog.compose-dialog-fax .attachment-list .attachment{background-color:rgba(0,0,0,.08);border:1px solid rgba(0,0,0,.16);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.compose-dialog-fax .attachment-list .attachment .filename{font-weight:500}md-dialog.compose-dialog-fax .attachment-list .attachment .md-button{margin:0}md-dialog.compose-dialog-fax .attachment-list .attachment:last-child{margin-bottom:0}md-dialog.compose-dialog-fax .error-list{font-size:13px}md-dialog.compose-dialog-fax .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.compose-dialog-fax .error-list .error .message{font-weight:500}md-dialog.compose-dialog-fax .error-list .error .md-button{margin:0}md-dialog.compose-dialog-fax .error-list .error:last-child{margin-bottom:30px}md-dialog.compose-dialog-fax md-dialog-actions{position:relative;justify-content:space-between;border-top:1px solid rgba(0,0,0,.12);background-color:rgba(0,0,0,.03)}@media screen and (max-width:960px){md-dialog.compose-dialog{width:80%}}@media screen and (max-width:600px){md-dialog.compose-dialog{width:90%}}md-dialog.compose-dialog .vertical-divider{position:absolute;border-right-width:.5px;border-right-style:solid;height:100%}md-dialog.compose-dialog md-dialog-content{display:block;position:relative}md-dialog.compose-dialog md-toolbar .title{font-size:17px}md-dialog.compose-dialog md-chips md-chip{font-size:12px}md-dialog.compose-dialog md-chips .md-chip-input-container{width:100%}md-dialog.compose-dialog .to{position:relative}md-dialog.compose-dialog .to.hidden-cc input{padding-right:32px}md-dialog.compose-dialog .to.hidden-cc.hidden-bcc input{padding-right:56px}md-dialog.compose-dialog .to.hidden-bcc input{padding-right:32px}md-dialog.compose-dialog .to .cc-bcc{position:absolute;bottom:8px;right:0}md-dialog.compose-dialog .to .cc-bcc .show-bcc,md-dialog.compose-dialog .to .cc-bcc .show-cc{cursor:pointer;font-size:12px}md-dialog.compose-dialog .to .cc-bcc .show-bcc{margin-left:8px}md-dialog.compose-dialog .attachment-list{font-size:13px}md-dialog.compose-dialog .attachment-list .attachment{background-color:rgba(0,0,0,.08);border:1px solid rgba(0,0,0,.16);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.compose-dialog .attachment-list .attachment .filename{font-weight:500}md-dialog.compose-dialog .attachment-list .attachment .md-button{margin:0}md-dialog.compose-dialog .attachment-list .attachment:last-child{margin-bottom:0}md-dialog.compose-dialog .error-list{font-size:13px}md-dialog.compose-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.compose-dialog .error-list .error .message{font-weight:500}md-dialog.compose-dialog .error-list .error .md-button{margin:0}md-dialog.compose-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.compose-dialog md-dialog-actions{position:relative;justify-content:space-between;border-top:1px solid rgba(0,0,0,.12);background-color:rgba(0,0,0,.03)}@media screen and (max-width:960px){md-dialog.compose-dialog{width:80%}}@media screen and (max-width:600px){md-dialog.compose-dialog{width:90%}}md-dialog.compose-dialog{height:100%;width:100%;max-width:70%;max-height:80%}md-dialog.compose-dialog md-dialog-content{display:block;position:relative}md-dialog.compose-dialog md-toolbar .title{font-size:17px}md-dialog.compose-dialog md-chips md-chip{font-size:12px}md-dialog.compose-dialog md-chips .md-chip-input-container{width:100%}md-dialog.compose-dialog .to{position:relative}md-dialog.compose-dialog .error-list{font-size:13px}md-dialog.compose-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.compose-dialog .error-list .error .message{font-weight:500}md-dialog.compose-dialog .error-list .error .md-button{margin:0}md-dialog.compose-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.compose-dialog .emojionearea{min-height:250px}md-dialog.compose-dialog md-dialog-actions{position:relative;justify-content:space-between;border-top:1px solid rgba(0,0,0,.12);background-color:rgba(0,0,0,.03)}@media screen and (max-width:960px){md-dialog.compose-dialog{width:80%}}@media screen and (max-width:600px){md-dialog.compose-dialog{width:90%}}md-dialog.compose-dialog{height:100%;width:100%;max-width:70%;max-height:80%}md-dialog.compose-dialog md-dialog-content{display:block;position:relative}md-dialog.compose-dialog md-toolbar .title{font-size:17px}md-dialog.compose-dialog md-chips md-chip{font-size:12px}md-dialog.compose-dialog md-chips .md-chip-input-container{width:100%}md-dialog.compose-dialog .to{position:relative}md-dialog.compose-dialog .error-list{font-size:13px}md-dialog.compose-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.compose-dialog .error-list .error .message{font-weight:500}md-dialog.compose-dialog .error-list .error .md-button{margin:0}md-dialog.compose-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.compose-dialog .emojionearea{min-height:250px}md-dialog.compose-dialog md-dialog-actions{position:relative;justify-content:space-between;border-top:1px solid rgba(0,0,0,.12);background-color:rgba(0,0,0,.03)}@media screen and (max-width:960px){md-dialog.compose-dialog{width:80%}}@media screen and (max-width:600px){md-dialog.compose-dialog{width:90%}}md-dialog.compose-dialog{height:100%;width:100%;max-width:70%;max-height:80%}md-dialog.compose-dialog md-dialog-content{display:block;position:relative}md-dialog.compose-dialog md-toolbar .title{font-size:17px}md-dialog.compose-dialog md-chips md-chip{font-size:12px}md-dialog.compose-dialog md-chips .md-chip-input-container{width:100%}md-dialog.compose-dialog .to{position:relative}md-dialog.compose-dialog .error-list{font-size:13px}md-dialog.compose-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.compose-dialog .error-list .error .message{font-weight:500}md-dialog.compose-dialog .error-list .error .md-button{margin:0}md-dialog.compose-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.compose-dialog .emojionearea{min-height:250px}md-dialog.compose-dialog md-dialog-actions{position:relative;justify-content:space-between;border-top:1px solid rgba(0,0,0,.12);background-color:rgba(0,0,0,.03)}@media screen and (max-width:960px){md-dialog.compose-dialog{width:80%}}@media screen and (max-width:600px){md-dialog.compose-dialog{width:90%}}md-dialog.disposition-dialog{max-width:720px;width:720px}md-dialog.disposition-dialog md-dialog-content{display:block;position:relative}md-dialog.disposition-dialog md-toolbar .title{font-size:17px}md-dialog.disposition-dialog md-input-container textarea{min-height:150px}md-dialog.disposition-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.disposition-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.disposition-dialog .date-container{padding:16px 0 24px 0}md-dialog.disposition-dialog .error-list{font-size:13px}md-dialog.disposition-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.disposition-dialog .error-list .error .message{font-weight:500}md-dialog.disposition-dialog .error-list .error .md-button{margin:0}md-dialog.disposition-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.disposition-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.disposition-dialog{max-width:720px;width:720px}md-dialog.disposition-dialog md-dialog-content{display:block;position:relative}md-dialog.disposition-dialog md-toolbar .title{font-size:17px}md-dialog.disposition-dialog md-input-container textarea{min-height:150px}md-dialog.disposition-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.disposition-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.disposition-dialog .date-container{padding:16px 0 24px 0}md-dialog.disposition-dialog .error-list{font-size:13px}md-dialog.disposition-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.disposition-dialog .error-list .error .message{font-weight:500}md-dialog.disposition-dialog .error-list .error .md-button{margin:0}md-dialog.disposition-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.disposition-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.disposition-dialog{max-width:720px;width:720px}md-dialog.disposition-dialog md-dialog-content{display:block;position:relative}md-dialog.disposition-dialog md-toolbar .title{font-size:17px}md-dialog.disposition-dialog md-input-container textarea{min-height:150px}md-dialog.disposition-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.disposition-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.disposition-dialog .date-container{padding:16px 0 24px 0}md-dialog.disposition-dialog .error-list{font-size:13px}md-dialog.disposition-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.disposition-dialog .error-list .error .message{font-weight:500}md-dialog.disposition-dialog .error-list .error .md-button{margin:0}md-dialog.disposition-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.disposition-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#dashboard-general>.center>.header{height:160px;min-height:160px;max-height:160px;padding-bottom:0}#dashboard-general>.center>.header .selected-general{background:rgba(0,0,0,.12);color:#fff;padding:8px 16px;height:40px;line-height:24px;font-size:16px}#dashboard-general>.center>.header .general-selector{margin-left:1px;border-radius:0;background:rgba(0,0,0,.12)}#dashboard-general>.center>.header .general-selector md-icon{color:#fff}#dashboard-general>.center>.content{background:0 0;padding:0}#dashboard-general>.center>.content>md-tabs>md-tabs-wrapper{background:#fff;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);padding:0 24px}#dashboard-general>.center>.content>md-tabs>md-tabs-wrapper md-tabs-canvas{height:56px}#dashboard-general>.center>.content>md-tabs>md-tabs-wrapper md-tabs-canvas md-pagination-wrapper{height:56px}#dashboard-general>.center>.content>md-tabs>md-tabs-wrapper md-tabs-canvas .md-tab{padding:16px 24px;text-transform:none}#dashboard-general>.center>.content>md-tabs:not(.md-dynamic-height) md-tabs-content-wrapper{top:56px}#dashboard-general>.center>.content>md-tabs>md-tabs-content-wrapper md-tab-content{padding:12px}#dashboard-general>.sidenav{width:330px;min-width:330px;max-width:330px;padding:0;z-index:51;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}#dashboard-general>.sidenav.md-locked-open{width:250px;min-width:250px;max-width:250px;z-index:2;box-shadow:none;background:#eee}#dashboard-general .dashboard-container{padding:24px;margin-bottom:24px}#dashboard-general .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.faxAccount-dialog{max-width:720px;width:720px}md-dialog.faxAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.faxAccount-dialog md-toolbar .title{font-size:17px}md-dialog.faxAccount-dialog md-input-container textarea{min-height:150px}md-dialog.faxAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.faxAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.faxAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxAccount-dialog .error-list{font-size:13px}md-dialog.faxAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxAccount-dialog .error-list .error .message{font-weight:500}md-dialog.faxAccount-dialog .error-list .error .md-button{margin:0}md-dialog.faxAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.faxAccount-dialog{max-width:720px;width:720px}md-dialog.faxAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.faxAccount-dialog md-toolbar .title{font-size:17px}md-dialog.faxAccount-dialog md-input-container textarea{min-height:150px}md-dialog.faxAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxAccount-dialog .error-list{font-size:13px}md-dialog.faxAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxAccount-dialog .error-list .error .message{font-weight:500}md-dialog.faxAccount-dialog .error-list .error .md-button{margin:0}md-dialog.faxAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.faxAccount-dialog{max-width:720px;width:720px}md-dialog.faxAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.faxAccount-dialog md-toolbar .title{font-size:17px}md-dialog.faxAccount-dialog md-input-container textarea{min-height:150px}md-dialog.faxAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxAccount-dialog .error-list{font-size:13px}md-dialog.faxAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxAccount-dialog .error-list .error .message{font-weight:500}md-dialog.faxAccount-dialog .error-list .error .md-button{margin:0}md-dialog.faxAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.faxAccount-dialog{max-width:720px;width:720px}md-dialog.faxAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.faxAccount-dialog md-toolbar .title{font-size:17px}md-dialog.faxAccount-dialog md-input-container textarea{min-height:150px}md-dialog.faxAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxAccount-dialog .error-list{font-size:13px}md-dialog.faxAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxAccount-dialog .error-list .error .message{font-weight:500}md-dialog.faxAccount-dialog .error-list .error .md-button{margin:0}md-dialog.faxAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.faxAccount-dialog{max-width:720px;width:720px}md-dialog.faxAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.faxAccount-dialog md-toolbar .title{font-size:17px}md-dialog.faxAccount-dialog md-input-container textarea{min-height:150px}md-dialog.faxAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxAccount-dialog .error-list{font-size:13px}md-dialog.faxAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxAccount-dialog .error-list .error .message{font-weight:500}md-dialog.faxAccount-dialog .error-list .error .md-button{margin:0}md-dialog.faxAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.faxAccount-dialog{max-width:720px;width:720px}md-dialog.faxAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.faxAccount-dialog md-toolbar .title{font-size:17px}md-dialog.faxAccount-dialog md-input-container textarea{min-height:150px}md-dialog.faxAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxAccount-dialog .error-list{font-size:13px}md-dialog.faxAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxAccount-dialog .error-list .error .message{font-weight:500}md-dialog.faxAccount-dialog .error-list .error .md-button{margin:0}md-dialog.faxAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.faxAccount-dialog{max-width:720px;width:720px}md-dialog.faxAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.faxAccount-dialog md-toolbar .title{font-size:17px}md-dialog.faxAccount-dialog md-input-container textarea{min-height:150px}md-dialog.faxAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxAccount-dialog .error-list{font-size:13px}md-dialog.faxAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxAccount-dialog .error-list .error .message{font-weight:500}md-dialog.faxAccount-dialog .error-list .error .md-button{margin:0}md-dialog.faxAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.faxAccount-dialog{max-width:720px;width:720px}md-dialog.faxAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.faxAccount-dialog md-toolbar .title{font-size:17px}md-dialog.faxAccount-dialog md-input-container textarea{min-height:150px}md-dialog.faxAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxAccount-dialog .error-list{font-size:13px}md-dialog.faxAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxAccount-dialog .error-list .error .message{font-weight:500}md-dialog.faxAccount-dialog .error-list .error .md-button{margin:0}md-dialog.faxAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.faxAccount-dialog{max-width:720px;width:720px}md-dialog.faxAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.faxAccount-dialog md-toolbar .title{font-size:17px}md-dialog.faxAccount-dialog md-input-container textarea{min-height:150px}md-dialog.faxAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxAccount-dialog .error-list{font-size:13px}md-dialog.faxAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxAccount-dialog .error-list .error .message{font-weight:500}md-dialog.faxAccount-dialog .error-list .error .md-button{margin:0}md-dialog.faxAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.faxAccount-dialog{max-width:720px;width:720px}md-dialog.faxAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.faxAccount-dialog md-toolbar .title{font-size:17px}md-dialog.faxAccount-dialog md-input-container textarea{min-height:150px}md-dialog.faxAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxAccount-dialog .error-list{font-size:13px}md-dialog.faxAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxAccount-dialog .error-list .error .message{font-weight:500}md-dialog.faxAccount-dialog .error-list .error .md-button{margin:0}md-dialog.faxAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#fax-faxAccount .header{height:76px;min-height:76px;max-height:76px}#fax-faxAccount .header .goto-faxAccounts-button{margin-right:16px}#fax-faxAccount .header .faxAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#fax-faxAccount .header .faxAccount-image img{height:100%;width:auto;max-width:none}#fax-faxAccount .header .subtitle{margin:6px 0 0 0}#fax-faxAccount .faxAccount-detail-form-container{padding:24px;margin-bottom:24px}#fax-faxAccount .faxAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#fax-faxAccount .faxAccount-detail-form-container .handle{cursor:move}#fax-faxAccount .faxAccount-detail-form-container md-input-container md-switch{margin:0!important}#fax-faxAccount .faxAccount-detail-form-container #faxAccount-image-uploader{position:relative}#fax-faxAccount .faxAccount-detail-form-container #faxAccount-image-uploader.dropping .drop-text{display:flex}#fax-faxAccount .faxAccount-detail-form-container #faxAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#fax-faxAccount .faxAccount-detail-form-container #faxAccount-image-uploader .upload-button{margin-bottom:16px}#fax-faxAccount .faxAccount-detail-form-container #faxAccount-image-uploader .faxAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#fax-faxAccount .faxAccount-detail-form-container #faxAccount-image-uploader .faxAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#fax-faxAccount .faxAccount-detail-form-container #faxAccount-image-uploader .faxAccount-image .media{max-height:100%}#fax-faxAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#fax-faxAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#fax-faxAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#fax-faxAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}#faxAccounts{position:relative}#faxAccounts>.header{height:76px;min-height:76px;max-height:76px}#faxAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#faxAccounts>.header .logo .logo-text{font-size:24px}#faxAccounts>.header md-icon{color:#fff}#faxAccounts>.header .search-input-wrapper{position:relative}#faxAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#faxAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#faxAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#faxAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#faxAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#faxAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#faxAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#faxAccounts>.header.selected-bar .close-button-wrapper{width:244px}#faxAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#faxAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#faxAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#faxAccounts #add-faxAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#faxAccounts #upload-faxAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.faxQueue-dialog{max-width:720px;width:720px}md-dialog.faxQueue-dialog md-dialog-content{display:block;position:relative}md-dialog.faxQueue-dialog md-toolbar .title{font-size:17px}md-dialog.faxQueue-dialog md-input-container textarea{min-height:150px}md-dialog.faxQueue-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.faxQueue-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.faxQueue-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxQueue-dialog .error-list{font-size:13px}md-dialog.faxQueue-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxQueue-dialog .error-list .error .message{font-weight:500}md-dialog.faxQueue-dialog .error-list .error .md-button{margin:0}md-dialog.faxQueue-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxQueue-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#fax-faxQueue .header{height:76px;min-height:76px;max-height:76px}#fax-faxQueue .header .goto-faxQueues-button{margin-right:16px}#fax-faxQueue .header .faxQueue-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#fax-faxQueue .header .faxQueue-image img{height:100%;width:auto;max-width:none}#fax-faxQueue .header .subtitle{margin:6px 0 0 0}#fax-faxQueue .faxQueue-detail-form-container{padding:24px;margin-bottom:24px}#fax-faxQueue .faxQueue-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#fax-faxQueue .faxQueue-detail-form-container .handle{cursor:move}#fax-faxQueue .faxQueue-detail-form-container md-input-container md-switch{margin:0!important}#fax-faxQueue .faxQueue-detail-form-container #faxQueue-image-uploader{position:relative}#fax-faxQueue .faxQueue-detail-form-container #faxQueue-image-uploader.dropping .drop-text{display:flex}#fax-faxQueue .faxQueue-detail-form-container #faxQueue-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#fax-faxQueue .faxQueue-detail-form-container #faxQueue-image-uploader .upload-button{margin-bottom:16px}#fax-faxQueue .faxQueue-detail-form-container #faxQueue-image-uploader .faxQueue-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#fax-faxQueue .faxQueue-detail-form-container #faxQueue-image-uploader .faxQueue-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#fax-faxQueue .faxQueue-detail-form-container #faxQueue-image-uploader .faxQueue-image .media{max-height:100%}#fax-faxQueue md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#fax-faxQueue md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#fax-faxQueue md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#fax-faxQueue md-table-container.font-size-12 td.md-cell{font-size:12px!important}#faxQueues{position:relative}#faxQueues>.header{height:76px;min-height:76px;max-height:76px}#faxQueues>.header .logo .logo-icon{margin:0 16px 0 0}#faxQueues>.header .logo .logo-text{font-size:24px}#faxQueues>.header md-icon{color:#fff}#faxQueues>.header .search-input-wrapper{position:relative}#faxQueues>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#faxQueues>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#faxQueues>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#faxQueues>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#faxQueues>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#faxQueues>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#faxQueues>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#faxQueues>.header.selected-bar .close-button-wrapper{width:244px}#faxQueues>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#faxQueues>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#faxQueues>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#faxQueues #add-faxQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#faxQueues #upload-faxQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#realtime>.content .blink{animation:blinker 2s linear infinite}#realtime>.content .avatar-wrapper{position:relative}#realtime>.content .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .search-input-wrapper{position:relative;margin-left:20px}#realtime>.content .search-input-wrapper label{padding:6px;cursor:pointer}#realtime>.content .search-input-wrapper md-input-container{padding-top:20px}#realtime>.content .main .labels{padding:8px 16px}#realtime>.content .main .labels .label{margin:0 0 2px 4px;padding:2px 5px;font-size:11px;white-space:nowrap;border-radius:2px}#realtime>.content .main .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .main .avatar-wrapper{position:relative}#realtime>.content .main .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .custom-column{padding:0 24px!important}@keyframes blinker{50%{opacity:0}}#profile .about-tab{max-width:1200px}#profile .about-tab .about{padding:8px}#profile .about-tab .about .general .location md-icon{line-height:13px!important}#profile .about-tab .about .work .job .company{padding:0 16px 0 0;font-weight:500}#profile .about-tab .about .work .job .date{color:rgba(0,0,0,.54)}#profile .about-tab .about-sidebar{padding:8px 8px 8px 32px}#profile .about-tab .about-sidebar .friends .content .friend{padding:4px}#profile .about-tab .about-sidebar .groups .content .group{margin-bottom:16px}#profile .about-tab .about-sidebar .groups .content .group:last-child{margin-bottom:0}#profile .about-tab .about-sidebar .groups .content .group .logo{border:1px solid rgba(0,0,0,.12);margin-right:16px}#profile .about-tab .about-sidebar .groups .content .group .name{font-weight:500;font-size:15px}#profile .about-tab .about-sidebar .groups .content .group .category,#profile .about-tab .about-sidebar .groups .content .group .members{color:rgba(0,0,0,.54)}#profile .about-tab .about-sidebar .groups .content .group .members{margin-top:16px}@media screen and (max-width:960px){#profile .about-tab .about-sidebar{padding:8px}}#maintenance{height:100%;background:url(/assets/images/backgrounds/tech.png) no-repeat;background-size:cover}#maintenance #maintenance-form-wrapper{flex:1 0 auto;padding:32px}#maintenance #maintenance-form-wrapper #maintenance-form{max-width:384px;padding:32px;background:#fff;text-align:center}#maintenance #maintenance-form-wrapper #maintenance-form .logo{width:128px;height:128px;line-height:128px;font-size:86px;font-weight:500;margin:32px auto;color:#fff;border-radius:2px}#maintenance #maintenance-form-wrapper #maintenance-form .title{font-size:17px;margin-top:16px}#maintenance #maintenance-form-wrapper #maintenance-form .subtitle{margin:16px 0;max-width:300px;color:rgba(0,0,0,.54);font-size:15px}@media screen and (max-width:600px){#maintenance #maintenance-form-wrapper{padding:16px}#maintenance #maintenance-form-wrapper #maintenance-form{padding:24px;width:100%}}md-dialog.deskAccount-dialog{max-width:720px;width:720px}md-dialog.deskAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.deskAccount-dialog md-toolbar .title{font-size:17px}md-dialog.deskAccount-dialog md-input-container textarea{min-height:150px}md-dialog.deskAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.deskAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.deskAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.deskAccount-dialog .error-list{font-size:13px}md-dialog.deskAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.deskAccount-dialog .error-list .error .message{font-weight:500}md-dialog.deskAccount-dialog .error-list .error .md-button{margin:0}md-dialog.deskAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.deskAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#deskAccounts{position:relative}#deskAccounts>.header{height:76px;min-height:76px;max-height:76px}#deskAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#deskAccounts>.header .logo .logo-text{font-size:24px}#deskAccounts>.header md-icon{color:#fff}#deskAccounts>.header .search-input-wrapper{position:relative}#deskAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#deskAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#deskAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#deskAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#deskAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#deskAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#deskAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#deskAccounts>.header.selected-bar .close-button-wrapper{width:244px}#deskAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#deskAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#deskAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#deskAccounts #add-deskAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#deskAccounts #upload-deskAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.deskConfiguration-dialog{max-width:720px;width:720px}md-dialog.deskConfiguration-dialog md-dialog-content{display:block;position:relative}md-dialog.deskConfiguration-dialog md-toolbar .title{font-size:17px}md-dialog.deskConfiguration-dialog md-input-container textarea{min-height:150px}md-dialog.deskConfiguration-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.deskConfiguration-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.deskConfiguration-dialog .date-container{padding:16px 0 24px 0}md-dialog.deskConfiguration-dialog .error-list{font-size:13px}md-dialog.deskConfiguration-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.deskConfiguration-dialog .error-list .error .message{font-weight:500}md-dialog.deskConfiguration-dialog .error-list .error .md-button{margin:0}md-dialog.deskConfiguration-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.deskConfiguration-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.deskAccount-item-dialog{max-width:720px;width:720px}md-dialog.deskAccount-item-dialog md-dialog-content{display:block;position:relative}md-dialog.deskAccount-item-dialog md-toolbar .title{font-size:17px}md-dialog.deskAccount-item-dialog md-input-container textarea{min-height:150px}md-dialog.deskAccount-item-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.deskAccount-item-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.deskAccount-item-dialog .date-container{padding:16px 0 24px 0}md-dialog.deskAccount-item-dialog .error-list{font-size:13px}md-dialog.deskAccount-item-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.deskAccount-item-dialog .error-list .error .message{font-weight:500}md-dialog.deskAccount-item-dialog .error-list .error .md-button{margin:0}md-dialog.deskAccount-item-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.deskAccount-item-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#integrations-deskAccount .header{height:76px;min-height:76px;max-height:76px}#integrations-deskAccount .header .goto-deskAccounts-button{margin-right:16px}#integrations-deskAccount .header .deskAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#integrations-deskAccount .header .deskAccount-image img{height:100%;width:auto;max-width:none}#integrations-deskAccount .header .subtitle{margin:6px 0 0 0}#integrations-deskAccount .deskAccount-detail-form-container{padding:24px;margin-bottom:24px}#integrations-deskAccount .deskAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#integrations-deskAccount .deskAccount-detail-form-container .handle{cursor:move}#integrations-deskAccount .deskAccount-detail-form-container md-input-container md-switch{margin:0!important}#integrations-deskAccount .deskAccount-detail-form-container #deskAccount-image-uploader{position:relative}#integrations-deskAccount .deskAccount-detail-form-container #deskAccount-image-uploader.dropping .drop-text{display:flex}#integrations-deskAccount .deskAccount-detail-form-container #deskAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#integrations-deskAccount .deskAccount-detail-form-container #deskAccount-image-uploader .upload-button{margin-bottom:16px}#integrations-deskAccount .deskAccount-detail-form-container #deskAccount-image-uploader .deskAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#integrations-deskAccount .deskAccount-detail-form-container #deskAccount-image-uploader .deskAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#integrations-deskAccount .deskAccount-detail-form-container #deskAccount-image-uploader .deskAccount-image .media{max-height:100%}#integrations-deskAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#integrations-deskAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#integrations-deskAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#integrations-deskAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}md-dialog.dynamics365Account-dialog{max-width:720px;width:720px}md-dialog.dynamics365Account-dialog md-dialog-content{display:block;position:relative}md-dialog.dynamics365Account-dialog md-toolbar .title{font-size:17px}md-dialog.dynamics365Account-dialog md-input-container textarea{min-height:150px}md-dialog.dynamics365Account-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.dynamics365Account-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.dynamics365Account-dialog .date-container{padding:16px 0 24px 0}md-dialog.dynamics365Account-dialog .error-list{font-size:13px}md-dialog.dynamics365Account-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.dynamics365Account-dialog .error-list .error .message{font-weight:500}md-dialog.dynamics365Account-dialog .error-list .error .md-button{margin:0}md-dialog.dynamics365Account-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.dynamics365Account-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#dynamics365Accounts{position:relative}#dynamics365Accounts>.header{height:76px;min-height:76px;max-height:76px}#dynamics365Accounts>.header .logo .logo-icon{margin:0 16px 0 0}#dynamics365Accounts>.header .logo .logo-text{font-size:24px}#dynamics365Accounts>.header md-icon{color:#fff}#dynamics365Accounts>.header .search-input-wrapper{position:relative}#dynamics365Accounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#dynamics365Accounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#dynamics365Accounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#dynamics365Accounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#dynamics365Accounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#dynamics365Accounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#dynamics365Accounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#dynamics365Accounts>.header.selected-bar .close-button-wrapper{width:244px}#dynamics365Accounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#dynamics365Accounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#dynamics365Accounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#dynamics365Accounts #add-dynamics365Account-button{position:fixed;bottom:8px;right:8px;padding:0}#dynamics365Accounts #upload-dynamics365Account-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.dynamics365Configuration-dialog{max-width:720px;width:720px}md-dialog.dynamics365Configuration-dialog md-dialog-content{display:block;position:relative}md-dialog.dynamics365Configuration-dialog md-toolbar .title{font-size:17px}md-dialog.dynamics365Configuration-dialog md-input-container textarea{min-height:150px}md-dialog.dynamics365Configuration-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.dynamics365Configuration-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.dynamics365Configuration-dialog .date-container{padding:16px 0 24px 0}md-dialog.dynamics365Configuration-dialog .error-list{font-size:13px}md-dialog.dynamics365Configuration-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.dynamics365Configuration-dialog .error-list .error .message{font-weight:500}md-dialog.dynamics365Configuration-dialog .error-list .error .md-button{margin:0}md-dialog.dynamics365Configuration-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.dynamics365Configuration-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.dynamics365Account-item-dialog{max-width:720px;width:720px}md-dialog.dynamics365Account-item-dialog md-dialog-content{display:block;position:relative}md-dialog.dynamics365Account-item-dialog md-toolbar .title{font-size:17px}md-dialog.dynamics365Account-item-dialog md-input-container textarea{min-height:150px}md-dialog.dynamics365Account-item-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.dynamics365Account-item-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.dynamics365Account-item-dialog .date-container{padding:16px 0 24px 0}md-dialog.dynamics365Account-item-dialog .error-list{font-size:13px}md-dialog.dynamics365Account-item-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.dynamics365Account-item-dialog .error-list .error .message{font-weight:500}md-dialog.dynamics365Account-item-dialog .error-list .error .md-button{margin:0}md-dialog.dynamics365Account-item-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.dynamics365Account-item-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#integrations-dynamics365Account .header{height:76px;min-height:76px;max-height:76px}#integrations-dynamics365Account .header .goto-dynamics365Accounts-button{margin-right:16px}#integrations-dynamics365Account .header .dynamics365Account-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#integrations-dynamics365Account .header .dynamics365Account-image img{height:100%;width:auto;max-width:none}#integrations-dynamics365Account .header .subtitle{margin:6px 0 0 0}#integrations-dynamics365Account .dynamics365Account-detail-form-container{padding:24px;margin-bottom:24px}#integrations-dynamics365Account .dynamics365Account-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#integrations-dynamics365Account .dynamics365Account-detail-form-container .handle{cursor:move}#integrations-dynamics365Account .dynamics365Account-detail-form-container md-input-container md-switch{margin:0!important}#integrations-dynamics365Account .dynamics365Account-detail-form-container #dynamics365Account-image-uploader{position:relative}#integrations-dynamics365Account .dynamics365Account-detail-form-container #dynamics365Account-image-uploader.dropping .drop-text{display:flex}#integrations-dynamics365Account .dynamics365Account-detail-form-container #dynamics365Account-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#integrations-dynamics365Account .dynamics365Account-detail-form-container #dynamics365Account-image-uploader .upload-button{margin-bottom:16px}#integrations-dynamics365Account .dynamics365Account-detail-form-container #dynamics365Account-image-uploader .dynamics365Account-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#integrations-dynamics365Account .dynamics365Account-detail-form-container #dynamics365Account-image-uploader .dynamics365Account-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#integrations-dynamics365Account .dynamics365Account-detail-form-container #dynamics365Account-image-uploader .dynamics365Account-image .media{max-height:100%}#integrations-dynamics365Account md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#integrations-dynamics365Account md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#integrations-dynamics365Account md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#integrations-dynamics365Account md-table-container.font-size-12 td.md-cell{font-size:12px!important}md-dialog.freshdeskAccount-dialog{max-width:720px;width:720px}md-dialog.freshdeskAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.freshdeskAccount-dialog md-toolbar .title{font-size:17px}md-dialog.freshdeskAccount-dialog md-input-container textarea{min-height:150px}md-dialog.freshdeskAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.freshdeskAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.freshdeskAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.freshdeskAccount-dialog .error-list{font-size:13px}md-dialog.freshdeskAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.freshdeskAccount-dialog .error-list .error .message{font-weight:500}md-dialog.freshdeskAccount-dialog .error-list .error .md-button{margin:0}md-dialog.freshdeskAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.freshdeskAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.freshdeskConfiguration-dialog{max-width:720px;width:720px}md-dialog.freshdeskConfiguration-dialog md-dialog-content{display:block;position:relative}md-dialog.freshdeskConfiguration-dialog md-toolbar .title{font-size:17px}md-dialog.freshdeskConfiguration-dialog md-input-container textarea{min-height:150px}md-dialog.freshdeskConfiguration-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.freshdeskConfiguration-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.freshdeskConfiguration-dialog .date-container{padding:16px 0 24px 0}md-dialog.freshdeskConfiguration-dialog .error-list{font-size:13px}md-dialog.freshdeskConfiguration-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.freshdeskConfiguration-dialog .error-list .error .message{font-weight:500}md-dialog.freshdeskConfiguration-dialog .error-list .error .md-button{margin:0}md-dialog.freshdeskConfiguration-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.freshdeskConfiguration-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.freshdeskAccount-item-dialog{max-width:720px;width:720px}md-dialog.freshdeskAccount-item-dialog md-dialog-content{display:block;position:relative}md-dialog.freshdeskAccount-item-dialog md-toolbar .title{font-size:17px}md-dialog.freshdeskAccount-item-dialog md-input-container textarea{min-height:150px}md-dialog.freshdeskAccount-item-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.freshdeskAccount-item-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.freshdeskAccount-item-dialog .date-container{padding:16px 0 24px 0}md-dialog.freshdeskAccount-item-dialog .error-list{font-size:13px}md-dialog.freshdeskAccount-item-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.freshdeskAccount-item-dialog .error-list .error .message{font-weight:500}md-dialog.freshdeskAccount-item-dialog .error-list .error .md-button{margin:0}md-dialog.freshdeskAccount-item-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.freshdeskAccount-item-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#integrations-freshdeskAccount .header{height:76px;min-height:76px;max-height:76px}#integrations-freshdeskAccount .header .goto-freshdeskAccounts-button{margin-right:16px}#integrations-freshdeskAccount .header .freshdeskAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#integrations-freshdeskAccount .header .freshdeskAccount-image img{height:100%;width:auto;max-width:none}#integrations-freshdeskAccount .header .subtitle{margin:6px 0 0 0}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container{padding:24px;margin-bottom:24px}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container .handle{cursor:move}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container md-input-container md-switch{margin:0!important}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container #freshdeskAccount-image-uploader{position:relative}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container #freshdeskAccount-image-uploader.dropping .drop-text{display:flex}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container #freshdeskAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container #freshdeskAccount-image-uploader .upload-button{margin-bottom:16px}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container #freshdeskAccount-image-uploader .freshdeskAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container #freshdeskAccount-image-uploader .freshdeskAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container #freshdeskAccount-image-uploader .freshdeskAccount-image .media{max-height:100%}#integrations-freshdeskAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#integrations-freshdeskAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#integrations-freshdeskAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#integrations-freshdeskAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}#freshdeskAccounts{position:relative}#freshdeskAccounts>.header{height:76px;min-height:76px;max-height:76px}#freshdeskAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#freshdeskAccounts>.header .logo .logo-text{font-size:24px}#freshdeskAccounts>.header md-icon{color:#fff}#freshdeskAccounts>.header .search-input-wrapper{position:relative}#freshdeskAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#freshdeskAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#freshdeskAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#freshdeskAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#freshdeskAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#freshdeskAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#freshdeskAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#freshdeskAccounts>.header.selected-bar .close-button-wrapper{width:244px}#freshdeskAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#freshdeskAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#freshdeskAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#freshdeskAccounts #add-freshdeskAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#freshdeskAccounts #upload-freshdeskAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.freshsalesAccount-dialog{max-width:720px;width:720px}md-dialog.freshsalesAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.freshsalesAccount-dialog md-toolbar .title{font-size:17px}md-dialog.freshsalesAccount-dialog md-input-container textarea{min-height:150px}md-dialog.freshsalesAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.freshsalesAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.freshsalesAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.freshsalesAccount-dialog .error-list{font-size:13px}md-dialog.freshsalesAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.freshsalesAccount-dialog .error-list .error .message{font-weight:500}md-dialog.freshsalesAccount-dialog .error-list .error .md-button{margin:0}md-dialog.freshsalesAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.freshsalesAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.freshsalesConfiguration-dialog{max-width:720px;width:720px}md-dialog.freshsalesConfiguration-dialog md-dialog-content{display:block;position:relative}md-dialog.freshsalesConfiguration-dialog md-toolbar .title{font-size:17px}md-dialog.freshsalesConfiguration-dialog md-input-container textarea{min-height:150px}md-dialog.freshsalesConfiguration-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.freshsalesConfiguration-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.freshsalesConfiguration-dialog .date-container{padding:16px 0 24px 0}md-dialog.freshsalesConfiguration-dialog .error-list{font-size:13px}md-dialog.freshsalesConfiguration-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.freshsalesConfiguration-dialog .error-list .error .message{font-weight:500}md-dialog.freshsalesConfiguration-dialog .error-list .error .md-button{margin:0}md-dialog.freshsalesConfiguration-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.freshsalesConfiguration-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.freshsalesAccount-item-dialog{max-width:720px;width:720px}md-dialog.freshsalesAccount-item-dialog md-dialog-content{display:block;position:relative}md-dialog.freshsalesAccount-item-dialog md-toolbar .title{font-size:17px}md-dialog.freshsalesAccount-item-dialog md-input-container textarea{min-height:150px}md-dialog.freshsalesAccount-item-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.freshsalesAccount-item-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.freshsalesAccount-item-dialog .date-container{padding:16px 0 24px 0}md-dialog.freshsalesAccount-item-dialog .error-list{font-size:13px}md-dialog.freshsalesAccount-item-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.freshsalesAccount-item-dialog .error-list .error .message{font-weight:500}md-dialog.freshsalesAccount-item-dialog .error-list .error .md-button{margin:0}md-dialog.freshsalesAccount-item-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.freshsalesAccount-item-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#integrations-freshsalesAccount .header{height:76px;min-height:76px;max-height:76px}#integrations-freshsalesAccount .header .goto-freshsalesAccounts-button{margin-right:16px}#integrations-freshsalesAccount .header .freshsalesAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#integrations-freshsalesAccount .header .freshsalesAccount-image img{height:100%;width:auto;max-width:none}#integrations-freshsalesAccount .header .subtitle{margin:6px 0 0 0}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container{padding:24px;margin-bottom:24px}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container .handle{cursor:move}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container md-input-container md-switch{margin:0!important}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container #freshsalesAccount-image-uploader{position:relative}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container #freshsalesAccount-image-uploader.dropping .drop-text{display:flex}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container #freshsalesAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container #freshsalesAccount-image-uploader .upload-button{margin-bottom:16px}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container #freshsalesAccount-image-uploader .freshsalesAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container #freshsalesAccount-image-uploader .freshsalesAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container #freshsalesAccount-image-uploader .freshsalesAccount-image .media{max-height:100%}#integrations-freshsalesAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#integrations-freshsalesAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#integrations-freshsalesAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#integrations-freshsalesAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}#freshsalesAccounts{position:relative}#freshsalesAccounts>.header{height:76px;min-height:76px;max-height:76px}#freshsalesAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#freshsalesAccounts>.header .logo .logo-text{font-size:24px}#freshsalesAccounts>.header md-icon{color:#fff}#freshsalesAccounts>.header .search-input-wrapper{position:relative}#freshsalesAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#freshsalesAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#freshsalesAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#freshsalesAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#freshsalesAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#freshsalesAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#freshsalesAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#freshsalesAccounts>.header.selected-bar .close-button-wrapper{width:244px}#freshsalesAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#freshsalesAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#freshsalesAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#freshsalesAccounts #add-freshsalesAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#freshsalesAccounts #upload-freshsalesAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.salesforceAccount-dialog{max-width:720px;width:720px}md-dialog.salesforceAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.salesforceAccount-dialog md-toolbar .title{font-size:17px}md-dialog.salesforceAccount-dialog md-input-container textarea{min-height:150px}md-dialog.salesforceAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.salesforceAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.salesforceAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.salesforceAccount-dialog .error-list{font-size:13px}md-dialog.salesforceAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.salesforceAccount-dialog .error-list .error .message{font-weight:500}md-dialog.salesforceAccount-dialog .error-list .error .md-button{margin:0}md-dialog.salesforceAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.salesforceAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.salesforceConfiguration-dialog{max-width:720px;width:720px}md-dialog.salesforceConfiguration-dialog md-dialog-content{display:block;position:relative}md-dialog.salesforceConfiguration-dialog md-toolbar .title{font-size:17px}md-dialog.salesforceConfiguration-dialog md-input-container textarea{min-height:150px}md-dialog.salesforceConfiguration-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.salesforceConfiguration-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.salesforceConfiguration-dialog .date-container{padding:16px 0 24px 0}md-dialog.salesforceConfiguration-dialog .error-list{font-size:13px}md-dialog.salesforceConfiguration-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.salesforceConfiguration-dialog .error-list .error .message{font-weight:500}md-dialog.salesforceConfiguration-dialog .error-list .error .md-button{margin:0}md-dialog.salesforceConfiguration-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.salesforceConfiguration-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.salesforceAccount-item-dialog{max-width:720px;width:720px}md-dialog.salesforceAccount-item-dialog md-dialog-content{display:block;position:relative}md-dialog.salesforceAccount-item-dialog md-toolbar .title{font-size:17px}md-dialog.salesforceAccount-item-dialog md-input-container textarea{min-height:150px}md-dialog.salesforceAccount-item-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.salesforceAccount-item-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.salesforceAccount-item-dialog .date-container{padding:16px 0 24px 0}md-dialog.salesforceAccount-item-dialog .error-list{font-size:13px}md-dialog.salesforceAccount-item-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.salesforceAccount-item-dialog .error-list .error .message{font-weight:500}md-dialog.salesforceAccount-item-dialog .error-list .error .md-button{margin:0}md-dialog.salesforceAccount-item-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.salesforceAccount-item-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#integrations-salesforceAccount .header{height:76px;min-height:76px;max-height:76px}#integrations-salesforceAccount .header .goto-salesforceAccounts-button{margin-right:16px}#integrations-salesforceAccount .header .salesforceAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#integrations-salesforceAccount .header .salesforceAccount-image img{height:100%;width:auto;max-width:none}#integrations-salesforceAccount .header .subtitle{margin:6px 0 0 0}#integrations-salesforceAccount .salesforceAccount-detail-form-container{padding:24px;margin-bottom:24px}#integrations-salesforceAccount .salesforceAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#integrations-salesforceAccount .salesforceAccount-detail-form-container .handle{cursor:move}#integrations-salesforceAccount .salesforceAccount-detail-form-container md-input-container md-switch{margin:0!important}#integrations-salesforceAccount .salesforceAccount-detail-form-container #salesforceAccount-image-uploader{position:relative}#integrations-salesforceAccount .salesforceAccount-detail-form-container #salesforceAccount-image-uploader.dropping .drop-text{display:flex}#integrations-salesforceAccount .salesforceAccount-detail-form-container #salesforceAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#integrations-salesforceAccount .salesforceAccount-detail-form-container #salesforceAccount-image-uploader .upload-button{margin-bottom:16px}#integrations-salesforceAccount .salesforceAccount-detail-form-container #salesforceAccount-image-uploader .salesforceAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#integrations-salesforceAccount .salesforceAccount-detail-form-container #salesforceAccount-image-uploader .salesforceAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#integrations-salesforceAccount .salesforceAccount-detail-form-container #salesforceAccount-image-uploader .salesforceAccount-image .media{max-height:100%}#integrations-salesforceAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#integrations-salesforceAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#integrations-salesforceAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#integrations-salesforceAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}#salesforceAccounts{position:relative}#salesforceAccounts>.header{height:76px;min-height:76px;max-height:76px}#salesforceAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#salesforceAccounts>.header .logo .logo-text{font-size:24px}#salesforceAccounts>.header md-icon{color:#fff}#salesforceAccounts>.header .search-input-wrapper{position:relative}#salesforceAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#salesforceAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#salesforceAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#salesforceAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#salesforceAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#salesforceAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#salesforceAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#salesforceAccounts>.header.selected-bar .close-button-wrapper{width:244px}#salesforceAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#salesforceAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#salesforceAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#salesforceAccounts #add-salesforceAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#salesforceAccounts #upload-salesforceAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.servicenowAccount-dialog{max-width:720px;width:720px}md-dialog.servicenowAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.servicenowAccount-dialog md-toolbar .title{font-size:17px}md-dialog.servicenowAccount-dialog md-input-container textarea{min-height:150px}md-dialog.servicenowAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.servicenowAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.servicenowAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.servicenowAccount-dialog .error-list{font-size:13px}md-dialog.servicenowAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.servicenowAccount-dialog .error-list .error .message{font-weight:500}md-dialog.servicenowAccount-dialog .error-list .error .md-button{margin:0}md-dialog.servicenowAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.servicenowAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.servicenowConfiguration-dialog{max-width:720px;width:720px}md-dialog.servicenowConfiguration-dialog md-dialog-content{display:block;position:relative}md-dialog.servicenowConfiguration-dialog md-toolbar .title{font-size:17px}md-dialog.servicenowConfiguration-dialog md-input-container textarea{min-height:150px}md-dialog.servicenowConfiguration-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.servicenowConfiguration-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.servicenowConfiguration-dialog .date-container{padding:16px 0 24px 0}md-dialog.servicenowConfiguration-dialog .error-list{font-size:13px}md-dialog.servicenowConfiguration-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.servicenowConfiguration-dialog .error-list .error .message{font-weight:500}md-dialog.servicenowConfiguration-dialog .error-list .error .md-button{margin:0}md-dialog.servicenowConfiguration-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.servicenowConfiguration-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.servicenowAccount-item-dialog{max-width:720px;width:720px}md-dialog.servicenowAccount-item-dialog md-dialog-content{display:block;position:relative}md-dialog.servicenowAccount-item-dialog md-toolbar .title{font-size:17px}md-dialog.servicenowAccount-item-dialog md-input-container textarea{min-height:150px}md-dialog.servicenowAccount-item-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.servicenowAccount-item-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.servicenowAccount-item-dialog .date-container{padding:16px 0 24px 0}md-dialog.servicenowAccount-item-dialog .error-list{font-size:13px}md-dialog.servicenowAccount-item-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.servicenowAccount-item-dialog .error-list .error .message{font-weight:500}md-dialog.servicenowAccount-item-dialog .error-list .error .md-button{margin:0}md-dialog.servicenowAccount-item-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.servicenowAccount-item-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#integrations-servicenowAccount .header{height:76px;min-height:76px;max-height:76px}#integrations-servicenowAccount .header .goto-servicenowAccounts-button{margin-right:16px}#integrations-servicenowAccount .header .servicenowAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#integrations-servicenowAccount .header .servicenowAccount-image img{height:100%;width:auto;max-width:none}#integrations-servicenowAccount .header .subtitle{margin:6px 0 0 0}#integrations-servicenowAccount .servicenowAccount-detail-form-container{padding:24px;margin-bottom:24px}#integrations-servicenowAccount .servicenowAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#integrations-servicenowAccount .servicenowAccount-detail-form-container .handle{cursor:move}#integrations-servicenowAccount .servicenowAccount-detail-form-container md-input-container md-switch{margin:0!important}#integrations-servicenowAccount .servicenowAccount-detail-form-container #servicenowAccount-image-uploader{position:relative}#integrations-servicenowAccount .servicenowAccount-detail-form-container #servicenowAccount-image-uploader.dropping .drop-text{display:flex}#integrations-servicenowAccount .servicenowAccount-detail-form-container #servicenowAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#integrations-servicenowAccount .servicenowAccount-detail-form-container #servicenowAccount-image-uploader .upload-button{margin-bottom:16px}#integrations-servicenowAccount .servicenowAccount-detail-form-container #servicenowAccount-image-uploader .servicenowAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#integrations-servicenowAccount .servicenowAccount-detail-form-container #servicenowAccount-image-uploader .servicenowAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#integrations-servicenowAccount .servicenowAccount-detail-form-container #servicenowAccount-image-uploader .servicenowAccount-image .media{max-height:100%}#integrations-servicenowAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#integrations-servicenowAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#integrations-servicenowAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#integrations-servicenowAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}#servicenowAccounts{position:relative}#servicenowAccounts>.header{height:76px;min-height:76px;max-height:76px}#servicenowAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#servicenowAccounts>.header .logo .logo-text{font-size:24px}#servicenowAccounts>.header md-icon{color:#fff}#servicenowAccounts>.header .search-input-wrapper{position:relative}#servicenowAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#servicenowAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#servicenowAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#servicenowAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#servicenowAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#servicenowAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#servicenowAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#servicenowAccounts>.header.selected-bar .close-button-wrapper{width:244px}#servicenowAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#servicenowAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#servicenowAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#servicenowAccounts #add-servicenowAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#servicenowAccounts #upload-servicenowAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.sugarcrmAccount-dialog{max-width:720px;width:720px}md-dialog.sugarcrmAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.sugarcrmAccount-dialog md-toolbar .title{font-size:17px}md-dialog.sugarcrmAccount-dialog md-input-container textarea{min-height:150px}md-dialog.sugarcrmAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.sugarcrmAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.sugarcrmAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.sugarcrmAccount-dialog .error-list{font-size:13px}md-dialog.sugarcrmAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.sugarcrmAccount-dialog .error-list .error .message{font-weight:500}md-dialog.sugarcrmAccount-dialog .error-list .error .md-button{margin:0}md-dialog.sugarcrmAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.sugarcrmAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.sugarcrmConfiguration-dialog{max-width:720px;width:720px}md-dialog.sugarcrmConfiguration-dialog md-dialog-content{display:block;position:relative}md-dialog.sugarcrmConfiguration-dialog md-toolbar .title{font-size:17px}md-dialog.sugarcrmConfiguration-dialog md-input-container textarea{min-height:150px}md-dialog.sugarcrmConfiguration-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.sugarcrmConfiguration-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.sugarcrmConfiguration-dialog .date-container{padding:16px 0 24px 0}md-dialog.sugarcrmConfiguration-dialog .error-list{font-size:13px}md-dialog.sugarcrmConfiguration-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.sugarcrmConfiguration-dialog .error-list .error .message{font-weight:500}md-dialog.sugarcrmConfiguration-dialog .error-list .error .md-button{margin:0}md-dialog.sugarcrmConfiguration-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.sugarcrmConfiguration-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.sugarcrmAccount-item-dialog{max-width:720px;width:720px}md-dialog.sugarcrmAccount-item-dialog md-dialog-content{display:block;position:relative}md-dialog.sugarcrmAccount-item-dialog md-toolbar .title{font-size:17px}md-dialog.sugarcrmAccount-item-dialog md-input-container textarea{min-height:150px}md-dialog.sugarcrmAccount-item-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.sugarcrmAccount-item-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.sugarcrmAccount-item-dialog .date-container{padding:16px 0 24px 0}md-dialog.sugarcrmAccount-item-dialog .error-list{font-size:13px}md-dialog.sugarcrmAccount-item-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.sugarcrmAccount-item-dialog .error-list .error .message{font-weight:500}md-dialog.sugarcrmAccount-item-dialog .error-list .error .md-button{margin:0}md-dialog.sugarcrmAccount-item-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.sugarcrmAccount-item-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#integrations-sugarcrmAccount .header{height:76px;min-height:76px;max-height:76px}#integrations-sugarcrmAccount .header .goto-sugarcrmAccounts-button{margin-right:16px}#integrations-sugarcrmAccount .header .sugarcrmAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#integrations-sugarcrmAccount .header .sugarcrmAccount-image img{height:100%;width:auto;max-width:none}#integrations-sugarcrmAccount .header .subtitle{margin:6px 0 0 0}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container{padding:24px;margin-bottom:24px}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container .handle{cursor:move}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container md-input-container md-switch{margin:0!important}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container #sugarcrmAccount-image-uploader{position:relative}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container #sugarcrmAccount-image-uploader.dropping .drop-text{display:flex}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container #sugarcrmAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container #sugarcrmAccount-image-uploader .upload-button{margin-bottom:16px}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container #sugarcrmAccount-image-uploader .sugarcrmAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container #sugarcrmAccount-image-uploader .sugarcrmAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container #sugarcrmAccount-image-uploader .sugarcrmAccount-image .media{max-height:100%}#integrations-sugarcrmAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#integrations-sugarcrmAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#integrations-sugarcrmAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#integrations-sugarcrmAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}#sugarcrmAccounts{position:relative}#sugarcrmAccounts>.header{height:76px;min-height:76px;max-height:76px}#sugarcrmAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#sugarcrmAccounts>.header .logo .logo-text{font-size:24px}#sugarcrmAccounts>.header md-icon{color:#fff}#sugarcrmAccounts>.header .search-input-wrapper{position:relative}#sugarcrmAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#sugarcrmAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#sugarcrmAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#sugarcrmAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#sugarcrmAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#sugarcrmAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#sugarcrmAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#sugarcrmAccounts>.header.selected-bar .close-button-wrapper{width:244px}#sugarcrmAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#sugarcrmAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#sugarcrmAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#sugarcrmAccounts #add-sugarcrmAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#sugarcrmAccounts #upload-sugarcrmAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.vtigerAccount-dialog{max-width:720px;width:720px}md-dialog.vtigerAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.vtigerAccount-dialog md-toolbar .title{font-size:17px}md-dialog.vtigerAccount-dialog md-input-container textarea{min-height:150px}md-dialog.vtigerAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.vtigerAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.vtigerAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.vtigerAccount-dialog .error-list{font-size:13px}md-dialog.vtigerAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.vtigerAccount-dialog .error-list .error .message{font-weight:500}md-dialog.vtigerAccount-dialog .error-list .error .md-button{margin:0}md-dialog.vtigerAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.vtigerAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.vtigerConfiguration-dialog{max-width:720px;width:720px}md-dialog.vtigerConfiguration-dialog md-dialog-content{display:block;position:relative}md-dialog.vtigerConfiguration-dialog md-toolbar .title{font-size:17px}md-dialog.vtigerConfiguration-dialog md-input-container textarea{min-height:150px}md-dialog.vtigerConfiguration-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.vtigerConfiguration-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.vtigerConfiguration-dialog .date-container{padding:16px 0 24px 0}md-dialog.vtigerConfiguration-dialog .error-list{font-size:13px}md-dialog.vtigerConfiguration-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.vtigerConfiguration-dialog .error-list .error .message{font-weight:500}md-dialog.vtigerConfiguration-dialog .error-list .error .md-button{margin:0}md-dialog.vtigerConfiguration-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.vtigerConfiguration-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.vtigerAccount-item-dialog{max-width:720px;width:720px}md-dialog.vtigerAccount-item-dialog md-dialog-content{display:block;position:relative}md-dialog.vtigerAccount-item-dialog md-toolbar .title{font-size:17px}md-dialog.vtigerAccount-item-dialog md-input-container textarea{min-height:150px}md-dialog.vtigerAccount-item-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.vtigerAccount-item-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.vtigerAccount-item-dialog .date-container{padding:16px 0 24px 0}md-dialog.vtigerAccount-item-dialog .error-list{font-size:13px}md-dialog.vtigerAccount-item-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.vtigerAccount-item-dialog .error-list .error .message{font-weight:500}md-dialog.vtigerAccount-item-dialog .error-list .error .md-button{margin:0}md-dialog.vtigerAccount-item-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.vtigerAccount-item-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#integrations-vtigerAccount .header{height:76px;min-height:76px;max-height:76px}#integrations-vtigerAccount .header .goto-vtigerAccounts-button{margin-right:16px}#integrations-vtigerAccount .header .vtigerAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#integrations-vtigerAccount .header .vtigerAccount-image img{height:100%;width:auto;max-width:none}#integrations-vtigerAccount .header .subtitle{margin:6px 0 0 0}#integrations-vtigerAccount .vtigerAccount-detail-form-container{padding:24px;margin-bottom:24px}#integrations-vtigerAccount .vtigerAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#integrations-vtigerAccount .vtigerAccount-detail-form-container .handle{cursor:move}#integrations-vtigerAccount .vtigerAccount-detail-form-container md-input-container md-switch{margin:0!important}#integrations-vtigerAccount .vtigerAccount-detail-form-container #vtigerAccount-image-uploader{position:relative}#integrations-vtigerAccount .vtigerAccount-detail-form-container #vtigerAccount-image-uploader.dropping .drop-text{display:flex}#integrations-vtigerAccount .vtigerAccount-detail-form-container #vtigerAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#integrations-vtigerAccount .vtigerAccount-detail-form-container #vtigerAccount-image-uploader .upload-button{margin-bottom:16px}#integrations-vtigerAccount .vtigerAccount-detail-form-container #vtigerAccount-image-uploader .vtigerAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#integrations-vtigerAccount .vtigerAccount-detail-form-container #vtigerAccount-image-uploader .vtigerAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#integrations-vtigerAccount .vtigerAccount-detail-form-container #vtigerAccount-image-uploader .vtigerAccount-image .media{max-height:100%}#integrations-vtigerAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#integrations-vtigerAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#integrations-vtigerAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#integrations-vtigerAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}#vtigerAccounts{position:relative}#vtigerAccounts>.header{height:76px;min-height:76px;max-height:76px}#vtigerAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#vtigerAccounts>.header .logo .logo-text{font-size:24px}#vtigerAccounts>.header md-icon{color:#fff}#vtigerAccounts>.header .search-input-wrapper{position:relative}#vtigerAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#vtigerAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#vtigerAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#vtigerAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#vtigerAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#vtigerAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#vtigerAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#vtigerAccounts>.header.selected-bar .close-button-wrapper{width:244px}#vtigerAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#vtigerAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#vtigerAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#vtigerAccounts #add-vtigerAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#vtigerAccounts #upload-vtigerAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.zendeskAccount-dialog{max-width:720px;width:720px}md-dialog.zendeskAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.zendeskAccount-dialog md-toolbar .title{font-size:17px}md-dialog.zendeskAccount-dialog md-input-container textarea{min-height:150px}md-dialog.zendeskAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.zendeskAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.zendeskAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.zendeskAccount-dialog .error-list{font-size:13px}md-dialog.zendeskAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.zendeskAccount-dialog .error-list .error .message{font-weight:500}md-dialog.zendeskAccount-dialog .error-list .error .md-button{margin:0}md-dialog.zendeskAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.zendeskAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.zendeskAccount-item-dialog{max-width:720px;width:720px}md-dialog.zendeskAccount-item-dialog md-dialog-content{display:block;position:relative}md-dialog.zendeskAccount-item-dialog md-toolbar .title{font-size:17px}md-dialog.zendeskAccount-item-dialog md-input-container textarea{min-height:150px}md-dialog.zendeskAccount-item-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.zendeskAccount-item-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.zendeskAccount-item-dialog .date-container{padding:16px 0 24px 0}md-dialog.zendeskAccount-item-dialog .error-list{font-size:13px}md-dialog.zendeskAccount-item-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.zendeskAccount-item-dialog .error-list .error .message{font-weight:500}md-dialog.zendeskAccount-item-dialog .error-list .error .md-button{margin:0}md-dialog.zendeskAccount-item-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.zendeskAccount-item-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#integrations-zendeskAccount .header{height:76px;min-height:76px;max-height:76px}#integrations-zendeskAccount .header .goto-zendeskAccounts-button{margin-right:16px}#integrations-zendeskAccount .header .zendeskAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#integrations-zendeskAccount .header .zendeskAccount-image img{height:100%;width:auto;max-width:none}#integrations-zendeskAccount .header .subtitle{margin:6px 0 0 0}#integrations-zendeskAccount .zendeskAccount-detail-form-container{padding:24px;margin-bottom:24px}#integrations-zendeskAccount .zendeskAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#integrations-zendeskAccount .zendeskAccount-detail-form-container .handle{cursor:move}#integrations-zendeskAccount .zendeskAccount-detail-form-container md-input-container md-switch{margin:0!important}#integrations-zendeskAccount .zendeskAccount-detail-form-container #zendeskAccount-image-uploader{position:relative}#integrations-zendeskAccount .zendeskAccount-detail-form-container #zendeskAccount-image-uploader.dropping .drop-text{display:flex}#integrations-zendeskAccount .zendeskAccount-detail-form-container #zendeskAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#integrations-zendeskAccount .zendeskAccount-detail-form-container #zendeskAccount-image-uploader .upload-button{margin-bottom:16px}#integrations-zendeskAccount .zendeskAccount-detail-form-container #zendeskAccount-image-uploader .zendeskAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#integrations-zendeskAccount .zendeskAccount-detail-form-container #zendeskAccount-image-uploader .zendeskAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#integrations-zendeskAccount .zendeskAccount-detail-form-container #zendeskAccount-image-uploader .zendeskAccount-image .media{max-height:100%}#integrations-zendeskAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#integrations-zendeskAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#integrations-zendeskAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#integrations-zendeskAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}md-dialog.zendeskConfiguration-dialog{max-width:720px;width:720px}md-dialog.zendeskConfiguration-dialog md-dialog-content{display:block;position:relative}md-dialog.zendeskConfiguration-dialog md-toolbar .title{font-size:17px}md-dialog.zendeskConfiguration-dialog md-input-container textarea{min-height:150px}md-dialog.zendeskConfiguration-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.zendeskConfiguration-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.zendeskConfiguration-dialog .date-container{padding:16px 0 24px 0}md-dialog.zendeskConfiguration-dialog .error-list{font-size:13px}md-dialog.zendeskConfiguration-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.zendeskConfiguration-dialog .error-list .error .message{font-weight:500}md-dialog.zendeskConfiguration-dialog .error-list .error .md-button{margin:0}md-dialog.zendeskConfiguration-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.zendeskConfiguration-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#zendeskAccounts{position:relative}#zendeskAccounts>.header{height:76px;min-height:76px;max-height:76px}#zendeskAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#zendeskAccounts>.header .logo .logo-text{font-size:24px}#zendeskAccounts>.header md-icon{color:#fff}#zendeskAccounts>.header .search-input-wrapper{position:relative}#zendeskAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#zendeskAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#zendeskAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#zendeskAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#zendeskAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#zendeskAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#zendeskAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#zendeskAccounts>.header.selected-bar .close-button-wrapper{width:244px}#zendeskAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#zendeskAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#zendeskAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#zendeskAccounts #add-zendeskAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#zendeskAccounts #upload-zendeskAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.zohoAccount-dialog{max-width:720px;width:720px}md-dialog.zohoAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.zohoAccount-dialog md-toolbar .title{font-size:17px}md-dialog.zohoAccount-dialog md-input-container textarea{min-height:150px}md-dialog.zohoAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.zohoAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.zohoAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.zohoAccount-dialog .error-list{font-size:13px}md-dialog.zohoAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.zohoAccount-dialog .error-list .error .message{font-weight:500}md-dialog.zohoAccount-dialog .error-list .error .md-button{margin:0}md-dialog.zohoAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.zohoAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.zohoConfiguration-dialog{max-width:720px;width:720px}md-dialog.zohoConfiguration-dialog md-dialog-content{display:block;position:relative}md-dialog.zohoConfiguration-dialog md-toolbar .title{font-size:17px}md-dialog.zohoConfiguration-dialog md-input-container textarea{min-height:150px}md-dialog.zohoConfiguration-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.zohoConfiguration-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.zohoConfiguration-dialog .date-container{padding:16px 0 24px 0}md-dialog.zohoConfiguration-dialog .error-list{font-size:13px}md-dialog.zohoConfiguration-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.zohoConfiguration-dialog .error-list .error .message{font-weight:500}md-dialog.zohoConfiguration-dialog .error-list .error .md-button{margin:0}md-dialog.zohoConfiguration-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.zohoConfiguration-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.zohoAccount-item-dialog{max-width:720px;width:720px}md-dialog.zohoAccount-item-dialog md-dialog-content{display:block;position:relative}md-dialog.zohoAccount-item-dialog md-toolbar .title{font-size:17px}md-dialog.zohoAccount-item-dialog md-input-container textarea{min-height:150px}md-dialog.zohoAccount-item-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.zohoAccount-item-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.zohoAccount-item-dialog .date-container{padding:16px 0 24px 0}md-dialog.zohoAccount-item-dialog .error-list{font-size:13px}md-dialog.zohoAccount-item-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.zohoAccount-item-dialog .error-list .error .message{font-weight:500}md-dialog.zohoAccount-item-dialog .error-list .error .md-button{margin:0}md-dialog.zohoAccount-item-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.zohoAccount-item-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#integrations-zohoAccount .header{height:76px;min-height:76px;max-height:76px}#integrations-zohoAccount .header .goto-zohoAccounts-button{margin-right:16px}#integrations-zohoAccount .header .zohoAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#integrations-zohoAccount .header .zohoAccount-image img{height:100%;width:auto;max-width:none}#integrations-zohoAccount .header .subtitle{margin:6px 0 0 0}#integrations-zohoAccount .zohoAccount-detail-form-container{padding:24px;margin-bottom:24px}#integrations-zohoAccount .zohoAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#integrations-zohoAccount .zohoAccount-detail-form-container .handle{cursor:move}#integrations-zohoAccount .zohoAccount-detail-form-container md-input-container md-switch{margin:0!important}#integrations-zohoAccount .zohoAccount-detail-form-container #zohoAccount-image-uploader{position:relative}#integrations-zohoAccount .zohoAccount-detail-form-container #zohoAccount-image-uploader.dropping .drop-text{display:flex}#integrations-zohoAccount .zohoAccount-detail-form-container #zohoAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#integrations-zohoAccount .zohoAccount-detail-form-container #zohoAccount-image-uploader .upload-button{margin-bottom:16px}#integrations-zohoAccount .zohoAccount-detail-form-container #zohoAccount-image-uploader .zohoAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#integrations-zohoAccount .zohoAccount-detail-form-container #zohoAccount-image-uploader .zohoAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#integrations-zohoAccount .zohoAccount-detail-form-container #zohoAccount-image-uploader .zohoAccount-image .media{max-height:100%}#integrations-zohoAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#integrations-zohoAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#integrations-zohoAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#integrations-zohoAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}#zohoAccounts{position:relative}#zohoAccounts>.header{height:76px;min-height:76px;max-height:76px}#zohoAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#zohoAccounts>.header .logo .logo-text{font-size:24px}#zohoAccounts>.header md-icon{color:#fff}#zohoAccounts>.header .search-input-wrapper{position:relative}#zohoAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#zohoAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#zohoAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#zohoAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#zohoAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#zohoAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#zohoAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#zohoAccounts>.header.selected-bar .close-button-wrapper{width:244px}#zohoAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#zohoAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#zohoAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#zohoAccounts #add-zohoAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#zohoAccounts #upload-zohoAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.project-dialog{max-width:720px;width:720px}md-dialog.project-dialog md-dialog-content{display:block;position:relative}md-dialog.project-dialog md-toolbar .title{font-size:17px}md-dialog.project-dialog md-input-container textarea{min-height:150px}md-dialog.project-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.project-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.project-dialog .date-container{padding:16px 0 24px 0}md-dialog.project-dialog .error-list{font-size:13px}md-dialog.project-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.project-dialog .error-list .error .message{font-weight:500}md-dialog.project-dialog .error-list .error .md-button{margin:0}md-dialog.project-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.project-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.session-dialog{max-width:720px;width:720px}md-dialog.session-dialog md-dialog-content{display:block;position:relative}md-dialog.session-dialog md-toolbar .title{font-size:17px}md-dialog.session-dialog md-input-container textarea{min-height:150px}md-dialog.session-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.session-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.session-dialog .date-container{padding:16px 0 24px 0}md-dialog.session-dialog .error-list{font-size:13px}md-dialog.session-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.session-dialog .error-list .error .message{font-weight:500}md-dialog.session-dialog .error-list .error .md-button{margin:0}md-dialog.session-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.session-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#jscripty-project .header{height:76px;min-height:76px;max-height:76px}#jscripty-project .header .goto-projects-button{margin-right:16px}#jscripty-project .header .project-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#jscripty-project .header .project-image img{height:100%;width:auto;max-width:none}#jscripty-project .header .subtitle{margin:6px 0 0 0}#jscripty-project .project-detail-form-container{padding:24px;margin-bottom:24px}#jscripty-project .project-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#jscripty-project .project-detail-form-container .handle{cursor:move}#jscripty-project .project-detail-form-container md-input-container md-switch{margin:0!important}#jscripty-project .project-detail-form-container #project-image-uploader{position:relative}#jscripty-project .project-detail-form-container #project-image-uploader.dropping .drop-text{display:flex}#jscripty-project .project-detail-form-container #project-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#jscripty-project .project-detail-form-container #project-image-uploader .upload-button{margin-bottom:16px}#jscripty-project .project-detail-form-container #project-image-uploader .project-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#jscripty-project .project-detail-form-container #project-image-uploader .project-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#jscripty-project .project-detail-form-container #project-image-uploader .project-image .media{max-height:100%}#jscripty-project md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#jscripty-project md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#jscripty-project md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#jscripty-project md-table-container.font-size-12 td.md-cell{font-size:12px!important}#projects{position:relative}#projects>.header{height:76px;min-height:76px;max-height:76px}#projects>.header .logo .logo-icon{margin:0 16px 0 0}#projects>.header .logo .logo-text{font-size:24px}#projects>.header md-icon{color:#fff}#projects>.header .search-input-wrapper{position:relative}#projects>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#projects>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#projects>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#projects>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#projects>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#projects>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#projects>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#projects>.header.selected-bar .close-button-wrapper{width:244px}#projects>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#projects>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#projects>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#projects #add-project-button{position:fixed;bottom:8px;right:8px;padding:0}#projects #upload-project-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.mailAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailCannedAnswer-dialog{max-width:720px;width:720px}md-dialog.mailCannedAnswer-dialog md-dialog-content{display:block;position:relative}md-dialog.mailCannedAnswer-dialog md-toolbar .title{font-size:17px}md-dialog.mailCannedAnswer-dialog md-input-container textarea{min-height:150px}md-dialog.mailCannedAnswer-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.mailCannedAnswer-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.mailCannedAnswer-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailCannedAnswer-dialog .error-list{font-size:13px}md-dialog.mailCannedAnswer-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailCannedAnswer-dialog .error-list .error .message{font-weight:500}md-dialog.mailCannedAnswer-dialog .error-list .error .md-button{margin:0}md-dialog.mailCannedAnswer-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailCannedAnswer-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#mail-mailAccount .header{height:76px;min-height:76px;max-height:76px}#mail-mailAccount .header .goto-mailAccounts-button{margin-right:16px}#mail-mailAccount .header .mailAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#mail-mailAccount .header .mailAccount-image img{height:100%;width:auto;max-width:none}#mail-mailAccount .header .subtitle{margin:6px 0 0 0}#mail-mailAccount .mailAccount-detail-form-container{padding:24px;margin-bottom:24px}#mail-mailAccount .mailAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#mail-mailAccount .mailAccount-detail-form-container .handle{cursor:move}#mail-mailAccount .mailAccount-detail-form-container md-input-container md-switch{margin:0!important}#mail-mailAccount .mailAccount-detail-form-container #mailAccount-image-uploader{position:relative}#mail-mailAccount .mailAccount-detail-form-container #mailAccount-image-uploader.dropping .drop-text{display:flex}#mail-mailAccount .mailAccount-detail-form-container #mailAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#mail-mailAccount .mailAccount-detail-form-container #mailAccount-image-uploader .upload-button{margin-bottom:16px}#mail-mailAccount .mailAccount-detail-form-container #mailAccount-image-uploader .mailAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#mail-mailAccount .mailAccount-detail-form-container #mailAccount-image-uploader .mailAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#mail-mailAccount .mailAccount-detail-form-container #mailAccount-image-uploader .mailAccount-image .media{max-height:100%}#mail-mailAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#mail-mailAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#mail-mailAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#mail-mailAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}#mailAccounts{position:relative}#mailAccounts>.header{height:76px;min-height:76px;max-height:76px}#mailAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#mailAccounts>.header .logo .logo-text{font-size:24px}#mailAccounts>.header md-icon{color:#fff}#mailAccounts>.header .search-input-wrapper{position:relative}#mailAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#mailAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#mailAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#mailAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#mailAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#mailAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#mailAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#mailAccounts>.header.selected-bar .close-button-wrapper{width:244px}#mailAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#mailAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#mailAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#mailAccounts #add-mailAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#mailAccounts #upload-mailAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.mailQueue-dialog{max-width:720px;width:720px}md-dialog.mailQueue-dialog md-dialog-content{display:block;position:relative}md-dialog.mailQueue-dialog md-toolbar .title{font-size:17px}md-dialog.mailQueue-dialog md-input-container textarea{min-height:150px}md-dialog.mailQueue-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.mailQueue-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.mailQueue-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailQueue-dialog .error-list{font-size:13px}md-dialog.mailQueue-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailQueue-dialog .error-list .error .message{font-weight:500}md-dialog.mailQueue-dialog .error-list .error .md-button{margin:0}md-dialog.mailQueue-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailQueue-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#mail-mailQueue .header{height:76px;min-height:76px;max-height:76px}#mail-mailQueue .header .goto-mailQueues-button{margin-right:16px}#mail-mailQueue .header .mailQueue-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#mail-mailQueue .header .mailQueue-image img{height:100%;width:auto;max-width:none}#mail-mailQueue .header .subtitle{margin:6px 0 0 0}#mail-mailQueue .mailQueue-detail-form-container{padding:24px;margin-bottom:24px}#mail-mailQueue .mailQueue-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#mail-mailQueue .mailQueue-detail-form-container .handle{cursor:move}#mail-mailQueue .mailQueue-detail-form-container md-input-container md-switch{margin:0!important}#mail-mailQueue .mailQueue-detail-form-container #mailQueue-image-uploader{position:relative}#mail-mailQueue .mailQueue-detail-form-container #mailQueue-image-uploader.dropping .drop-text{display:flex}#mail-mailQueue .mailQueue-detail-form-container #mailQueue-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#mail-mailQueue .mailQueue-detail-form-container #mailQueue-image-uploader .upload-button{margin-bottom:16px}#mail-mailQueue .mailQueue-detail-form-container #mailQueue-image-uploader .mailQueue-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#mail-mailQueue .mailQueue-detail-form-container #mailQueue-image-uploader .mailQueue-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#mail-mailQueue .mailQueue-detail-form-container #mailQueue-image-uploader .mailQueue-image .media{max-height:100%}#mail-mailQueue md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#mail-mailQueue md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#mail-mailQueue md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#mail-mailQueue md-table-container.font-size-12 td.md-cell{font-size:12px!important}#mailQueues{position:relative}#mailQueues>.header{height:76px;min-height:76px;max-height:76px}#mailQueues>.header .logo .logo-icon{margin:0 16px 0 0}#mailQueues>.header .logo .logo-text{font-size:24px}#mailQueues>.header md-icon{color:#fff}#mailQueues>.header .search-input-wrapper{position:relative}#mailQueues>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#mailQueues>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#mailQueues>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#mailQueues>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#mailQueues>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#mailQueues>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#mailQueues>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#mailQueues>.header.selected-bar .close-button-wrapper{width:244px}#mailQueues>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#mailQueues>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#mailQueues>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#mailQueues #add-mailQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#mailQueues #upload-mailQueue-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.mailSubstatus-dialog{max-width:720px;width:720px}md-dialog.mailSubstatus-dialog md-dialog-content{display:block;position:relative}md-dialog.mailSubstatus-dialog md-toolbar .title{font-size:17px}md-dialog.mailSubstatus-dialog md-input-container textarea{min-height:150px}md-dialog.mailSubstatus-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.mailSubstatus-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.mailSubstatus-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailSubstatus-dialog .error-list{font-size:13px}md-dialog.mailSubstatus-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailSubstatus-dialog .error-list .error .message{font-weight:500}md-dialog.mailSubstatus-dialog .error-list .error .md-button{margin:0}md-dialog.mailSubstatus-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailSubstatus-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#mailSubtatuses{position:relative}#mailSubtatuses>.header{height:76px;min-height:76px;max-height:76px}#mailSubtatuses>.header .logo .logo-icon{margin:0 16px 0 0}#mailSubtatuses>.header .logo .logo-text{font-size:24px}#mailSubtatuses>.header md-icon{color:#fff}#mailSubtatuses>.header .search-input-wrapper{position:relative}#mailSubtatuses>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#mailSubtatuses>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#mailSubtatuses>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#mailSubtatuses>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#mailSubtatuses>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#mailSubtatuses>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#mailSubtatuses>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#mailSubtatuses>.header.selected-bar .close-button-wrapper{width:244px}#mailSubtatuses>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#mailSubtatuses>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#mailSubtatuses>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#mailSubtatuses #add-mailSubstatus-button{position:fixed;bottom:8px;right:8px;padding:0}#mailSubtatuses #upload-mailSubstatus-button{position:fixed;bottom:8px;right:8px;padding:0}#realtime>.content .blink{animation:blinker 2s linear infinite}#realtime>.content .avatar-wrapper{position:relative}#realtime>.content .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .search-input-wrapper{position:relative;margin-left:20px}#realtime>.content .search-input-wrapper label{padding:6px;cursor:pointer}#realtime>.content .search-input-wrapper md-input-container{padding-top:20px}#realtime>.content .main .labels{padding:8px 16px}#realtime>.content .main .labels .label{margin:0 0 2px 4px;padding:2px 5px;font-size:11px;white-space:nowrap;border-radius:2px}#realtime>.content .main .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .main .avatar-wrapper{position:relative}#realtime>.content .main .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .custom-column{padding:0 24px!important}@keyframes blinker{50%{opacity:0}}md-dialog.plugin-dialog{max-width:720px;width:720px}md-dialog.plugin-dialog md-dialog-content{display:block;position:relative}md-dialog.plugin-dialog md-toolbar .title{font-size:17px}md-dialog.plugin-dialog md-input-container textarea{min-height:150px}md-dialog.plugin-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.plugin-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.plugin-dialog .date-container{padding:16px 0 24px 0}md-dialog.plugin-dialog .error-list{font-size:13px}md-dialog.plugin-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.plugin-dialog .error-list .error .message{font-weight:500}md-dialog.plugin-dialog .error-list .error .md-button{margin:0}md-dialog.plugin-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.plugin-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#marketplace-plugin .header{height:76px;min-height:76px;max-height:76px}#marketplace-plugin .header .goto-plugins-button{margin-right:16px}#marketplace-plugin .header .plugin-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#marketplace-plugin .header .plugin-image img{height:100%;width:auto;max-width:none}#marketplace-plugin .header .subtitle{margin:6px 0 0 0}#marketplace-plugin .plugin-detail-form-container{padding:24px;margin-bottom:24px}#marketplace-plugin .plugin-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#marketplace-plugin .plugin-detail-form-container .handle{cursor:move}#marketplace-plugin .plugin-detail-form-container md-input-container md-switch{margin:0!important}#marketplace-plugin .plugin-detail-form-container #plugin-image-uploader{position:relative}#marketplace-plugin .plugin-detail-form-container #plugin-image-uploader.dropping .drop-text{display:flex}#marketplace-plugin .plugin-detail-form-container #plugin-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#marketplace-plugin .plugin-detail-form-container #plugin-image-uploader .upload-button{margin-bottom:16px}#marketplace-plugin .plugin-detail-form-container #plugin-image-uploader .plugin-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#marketplace-plugin .plugin-detail-form-container #plugin-image-uploader .plugin-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#marketplace-plugin .plugin-detail-form-container #plugin-image-uploader .plugin-image .media{max-height:100%}#marketplace-plugin md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#marketplace-plugin md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#marketplace-plugin md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#marketplace-plugin md-table-container.font-size-12 td.md-cell{font-size:12px!important}#plugins{position:relative}#plugins>.header{height:76px;min-height:76px;max-height:76px}#plugins>.header .logo .logo-icon{margin:0 16px 0 0}#plugins>.header .logo .logo-text{font-size:24px}#plugins>.header md-icon{color:#fff}#plugins>.header .search-input-wrapper{position:relative}#plugins>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#plugins>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#plugins>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#plugins>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#plugins>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#plugins>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#plugins>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#plugins>.header.selected-bar .close-button-wrapper{width:244px}#plugins>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#plugins>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#plugins>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#plugins #add-plugin-button{position:fixed;bottom:8px;right:8px;padding:0}#plugins #upload-plugin-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.upload-dialog{max-width:720px;width:720px}md-dialog.upload-dialog md-dialog-content{display:block;position:relative}md-dialog.upload-dialog md-toolbar .title{font-size:17px}md-dialog.upload-dialog md-input-container textarea{min-height:150px}md-dialog.upload-dialog md-progress-linear{padding-top:16px!important}md-dialog.upload-dialog .date-container{padding:16px 0 24px 0}md-dialog.upload-dialog .error-list{font-size:13px}md-dialog.upload-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.upload-dialog .error-list .error .message{font-weight:500}md-dialog.upload-dialog .error-list .error .md-button{margin:0}md-dialog.upload-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.upload-dialog .plugin-image{overflow:hidden;max-width:148px;margin-right:16px;border:3px solid rgba(0,0,0,.12);padding:10px}md-dialog.upload-dialog .plugin-image img{width:auto;max-width:none}md-dialog.upload-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.ivrCampaign-dialog{max-width:720px;width:720px}md-dialog.ivrCampaign-dialog md-dialog-content{display:block;position:relative}md-dialog.ivrCampaign-dialog md-toolbar .title{font-size:17px}md-dialog.ivrCampaign-dialog md-input-container textarea{min-height:150px}md-dialog.ivrCampaign-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.ivrCampaign-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.ivrCampaign-dialog .date-container{padding:16px 0 24px 0}md-dialog.ivrCampaign-dialog .error-list{font-size:13px}md-dialog.ivrCampaign-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.ivrCampaign-dialog .error-list .error .message{font-weight:500}md-dialog.ivrCampaign-dialog .error-list .error .md-button{margin:0}md-dialog.ivrCampaign-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.ivrCampaign-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.hopper-dialog{max-width:720px;width:720px}md-dialog.hopper-dialog md-dialog-content{display:block;position:relative}md-dialog.hopper-dialog md-toolbar .title{font-size:17px}md-dialog.hopper-dialog md-input-container textarea{min-height:150px}md-dialog.hopper-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.hopper-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.hopper-dialog .date-container{padding:16px 0 24px 0}md-dialog.hopper-dialog .error-list{font-size:13px}md-dialog.hopper-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.hopper-dialog .error-list .error .message{font-weight:500}md-dialog.hopper-dialog .error-list .error .md-button{margin:0}md-dialog.hopper-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.hopper-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#motiondialer-ivrCampaign .header{height:76px;min-height:76px;max-height:76px}#motiondialer-ivrCampaign .header .goto-ivrCampaigns-button{margin-right:16px}#motiondialer-ivrCampaign .header .ivrCampaign-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#motiondialer-ivrCampaign .header .ivrCampaign-image img{height:100%;width:auto;max-width:none}#motiondialer-ivrCampaign .header .subtitle{margin:6px 0 0 0}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container{padding:24px;margin-bottom:24px}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container .handle{cursor:move}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container md-input-container md-switch{margin:0!important}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container #ivrCampaign-image-uploader{position:relative}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container #ivrCampaign-image-uploader.dropping .drop-text{display:flex}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container #ivrCampaign-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container #ivrCampaign-image-uploader .upload-button{margin-bottom:16px}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container #ivrCampaign-image-uploader .ivrCampaign-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container #ivrCampaign-image-uploader .ivrCampaign-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container #ivrCampaign-image-uploader .ivrCampaign-image .media{max-height:100%}#motiondialer-ivrCampaign md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#motiondialer-ivrCampaign md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#motiondialer-ivrCampaign md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#motiondialer-ivrCampaign md-table-container.font-size-12 td.md-cell{font-size:12px!important}#ivrCampaigns{position:relative}#ivrCampaigns>.header{height:76px;min-height:76px;max-height:76px}#ivrCampaigns>.header .logo .logo-icon{margin:0 16px 0 0}#ivrCampaigns>.header .logo .logo-text{font-size:24px}#ivrCampaigns>.header md-icon{color:#fff}#ivrCampaigns>.header .search-input-wrapper{position:relative}#ivrCampaigns>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#ivrCampaigns>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#ivrCampaigns>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#ivrCampaigns>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#ivrCampaigns>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#ivrCampaigns>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#ivrCampaigns>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#ivrCampaigns>.header.selected-bar .close-button-wrapper{width:244px}#ivrCampaigns>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#ivrCampaigns>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#ivrCampaigns>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#ivrCampaigns #add-ivrCampaign-button{position:fixed;bottom:8px;right:8px;padding:0}#ivrCampaigns #upload-ivrCampaign-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.queueCampaign-dialog{max-width:720px;width:720px}md-dialog.queueCampaign-dialog md-dialog-content{display:block;position:relative}md-dialog.queueCampaign-dialog md-toolbar .title{font-size:17px}md-dialog.queueCampaign-dialog md-input-container textarea{min-height:150px}md-dialog.queueCampaign-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.queueCampaign-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.queueCampaign-dialog .date-container{padding:16px 0 24px 0}md-dialog.queueCampaign-dialog .error-list{font-size:13px}md-dialog.queueCampaign-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.queueCampaign-dialog .error-list .error .message{font-weight:500}md-dialog.queueCampaign-dialog .error-list .error .md-button{margin:0}md-dialog.queueCampaign-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.queueCampaign-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.hopper-dialog{max-width:720px;width:720px}md-dialog.hopper-dialog md-dialog-content{display:block;position:relative}md-dialog.hopper-dialog md-toolbar .title{font-size:17px}md-dialog.hopper-dialog md-input-container textarea{min-height:150px}md-dialog.hopper-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.hopper-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.hopper-dialog .date-container{padding:16px 0 24px 0}md-dialog.hopper-dialog .error-list{font-size:13px}md-dialog.hopper-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.hopper-dialog .error-list .error .message{font-weight:500}md-dialog.hopper-dialog .error-list .error .md-button{margin:0}md-dialog.hopper-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.hopper-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#motiondialer-queueCampaign .header{height:76px;min-height:76px;max-height:76px}#motiondialer-queueCampaign .header .goto-queueCampaigns-button{margin-right:16px}#motiondialer-queueCampaign .header .queueCampaign-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#motiondialer-queueCampaign .header .queueCampaign-image img{height:100%;width:auto;max-width:none}#motiondialer-queueCampaign .header .subtitle{margin:6px 0 0 0}#motiondialer-queueCampaign .queueCampaign-detail-form-container{padding:24px;margin-bottom:24px}#motiondialer-queueCampaign .queueCampaign-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#motiondialer-queueCampaign .queueCampaign-detail-form-container .handle{cursor:move}#motiondialer-queueCampaign .queueCampaign-detail-form-container md-input-container md-switch{margin:0!important}#motiondialer-queueCampaign .queueCampaign-detail-form-container #queueCampaign-image-uploader{position:relative}#motiondialer-queueCampaign .queueCampaign-detail-form-container #queueCampaign-image-uploader.dropping .drop-text{display:flex}#motiondialer-queueCampaign .queueCampaign-detail-form-container #queueCampaign-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#motiondialer-queueCampaign .queueCampaign-detail-form-container #queueCampaign-image-uploader .upload-button{margin-bottom:16px}#motiondialer-queueCampaign .queueCampaign-detail-form-container #queueCampaign-image-uploader .queueCampaign-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#motiondialer-queueCampaign .queueCampaign-detail-form-container #queueCampaign-image-uploader .queueCampaign-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#motiondialer-queueCampaign .queueCampaign-detail-form-container #queueCampaign-image-uploader .queueCampaign-image .media{max-height:100%}#motiondialer-queueCampaign md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#motiondialer-queueCampaign md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#motiondialer-queueCampaign md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#motiondialer-queueCampaign md-table-container.font-size-12 td.md-cell{font-size:12px!important}#queueCampaigns{position:relative}#queueCampaigns>.header{height:76px;min-height:76px;max-height:76px}#queueCampaigns>.header .logo .logo-icon{margin:0 16px 0 0}#queueCampaigns>.header .logo .logo-text{font-size:24px}#queueCampaigns>.header md-icon{color:#fff}#queueCampaigns>.header .search-input-wrapper{position:relative}#queueCampaigns>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#queueCampaigns>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#queueCampaigns>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#queueCampaigns>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#queueCampaigns>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#queueCampaigns>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#queueCampaigns>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#queueCampaigns>.header.selected-bar .close-button-wrapper{width:244px}#queueCampaigns>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#queueCampaigns>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#queueCampaigns>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#queueCampaigns #add-queueCampaign-button{position:fixed;bottom:8px;right:8px;padding:0}#queueCampaigns #upload-queueCampaign-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.predictive-dialog{max-width:720px;width:720px}md-dialog.predictive-dialog md-dialog-content{display:block;position:relative}md-dialog.predictive-dialog md-toolbar .title{font-size:17px}md-dialog.predictive-dialog md-input-container textarea{min-height:150px}md-dialog.predictive-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.predictive-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.predictive-dialog .date-container{padding:16px 0 24px 0}md-dialog.predictive-dialog .error-list{font-size:13px}md-dialog.predictive-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.predictive-dialog .error-list .error .message{font-weight:500}md-dialog.predictive-dialog .error-list .error .md-button{margin:0}md-dialog.predictive-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.predictive-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#realtime>.content .blink{animation:blinker 2s linear infinite}#realtime>.content .avatar-wrapper{position:relative}#realtime>.content .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .search-input-wrapper{position:relative;margin-left:20px}#realtime>.content .search-input-wrapper label{padding:6px;cursor:pointer}#realtime>.content .search-input-wrapper md-input-container{padding-top:20px}#realtime>.content .main .labels{padding:8px 16px}#realtime>.content .main .labels .label{margin:0 0 2px 4px;padding:2px 5px;font-size:11px;white-space:nowrap;border-radius:2px}#realtime>.content .main .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .main .avatar-wrapper{position:relative}#realtime>.content .main .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .custom-column{padding:0 24px!important}@keyframes blinker{50%{opacity:0}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.openchannelAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelCannedAnswer-dialog{max-width:720px;width:720px}md-dialog.openchannelCannedAnswer-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelCannedAnswer-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelCannedAnswer-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelCannedAnswer-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.openchannelCannedAnswer-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.openchannelCannedAnswer-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelCannedAnswer-dialog .error-list{font-size:13px}md-dialog.openchannelCannedAnswer-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelCannedAnswer-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelCannedAnswer-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelCannedAnswer-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelCannedAnswer-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#openchannel-openchannelAccount .header{height:76px;min-height:76px;max-height:76px}#openchannel-openchannelAccount .header .goto-openchannelAccounts-button{margin-right:16px}#openchannel-openchannelAccount .header .openchannelAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#openchannel-openchannelAccount .header .openchannelAccount-image img{height:100%;width:auto;max-width:none}#openchannel-openchannelAccount .header .subtitle{margin:6px 0 0 0}#openchannel-openchannelAccount .openchannelAccount-detail-form-container{padding:24px;margin-bottom:24px}#openchannel-openchannelAccount .openchannelAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#openchannel-openchannelAccount .openchannelAccount-detail-form-container .handle{cursor:move}#openchannel-openchannelAccount .openchannelAccount-detail-form-container md-input-container md-switch{margin:0!important}#openchannel-openchannelAccount .openchannelAccount-detail-form-container #openchannelAccount-image-uploader{position:relative}#openchannel-openchannelAccount .openchannelAccount-detail-form-container #openchannelAccount-image-uploader.dropping .drop-text{display:flex}#openchannel-openchannelAccount .openchannelAccount-detail-form-container #openchannelAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#openchannel-openchannelAccount .openchannelAccount-detail-form-container #openchannelAccount-image-uploader .upload-button{margin-bottom:16px}#openchannel-openchannelAccount .openchannelAccount-detail-form-container #openchannelAccount-image-uploader .openchannelAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#openchannel-openchannelAccount .openchannelAccount-detail-form-container #openchannelAccount-image-uploader .openchannelAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#openchannel-openchannelAccount .openchannelAccount-detail-form-container #openchannelAccount-image-uploader .openchannelAccount-image .media{max-height:100%}#openchannel-openchannelAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#openchannel-openchannelAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#openchannel-openchannelAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#openchannel-openchannelAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}#openchannelAccounts{position:relative}#openchannelAccounts>.header{height:76px;min-height:76px;max-height:76px}#openchannelAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#openchannelAccounts>.header .logo .logo-text{font-size:24px}#openchannelAccounts>.header md-icon{color:#fff}#openchannelAccounts>.header .search-input-wrapper{position:relative}#openchannelAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#openchannelAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#openchannelAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#openchannelAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#openchannelAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#openchannelAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#openchannelAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#openchannelAccounts>.header.selected-bar .close-button-wrapper{width:244px}#openchannelAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#openchannelAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#openchannelAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#openchannelAccounts #add-openchannelAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#openchannelAccounts #upload-openchannelAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.openchannelQueue-dialog{max-width:720px;width:720px}md-dialog.openchannelQueue-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelQueue-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelQueue-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelQueue-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.openchannelQueue-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.openchannelQueue-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelQueue-dialog .error-list{font-size:13px}md-dialog.openchannelQueue-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelQueue-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelQueue-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelQueue-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelQueue-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#openchannel-openchannelQueue .header{height:76px;min-height:76px;max-height:76px}#openchannel-openchannelQueue .header .goto-openchannelQueues-button{margin-right:16px}#openchannel-openchannelQueue .header .openchannelQueue-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#openchannel-openchannelQueue .header .openchannelQueue-image img{height:100%;width:auto;max-width:none}#openchannel-openchannelQueue .header .subtitle{margin:6px 0 0 0}#openchannel-openchannelQueue .openchannelQueue-detail-form-container{padding:24px;margin-bottom:24px}#openchannel-openchannelQueue .openchannelQueue-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#openchannel-openchannelQueue .openchannelQueue-detail-form-container .handle{cursor:move}#openchannel-openchannelQueue .openchannelQueue-detail-form-container md-input-container md-switch{margin:0!important}#openchannel-openchannelQueue .openchannelQueue-detail-form-container #openchannelQueue-image-uploader{position:relative}#openchannel-openchannelQueue .openchannelQueue-detail-form-container #openchannelQueue-image-uploader.dropping .drop-text{display:flex}#openchannel-openchannelQueue .openchannelQueue-detail-form-container #openchannelQueue-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#openchannel-openchannelQueue .openchannelQueue-detail-form-container #openchannelQueue-image-uploader .upload-button{margin-bottom:16px}#openchannel-openchannelQueue .openchannelQueue-detail-form-container #openchannelQueue-image-uploader .openchannelQueue-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#openchannel-openchannelQueue .openchannelQueue-detail-form-container #openchannelQueue-image-uploader .openchannelQueue-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#openchannel-openchannelQueue .openchannelQueue-detail-form-container #openchannelQueue-image-uploader .openchannelQueue-image .media{max-height:100%}#openchannel-openchannelQueue md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#openchannel-openchannelQueue md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#openchannel-openchannelQueue md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#openchannel-openchannelQueue md-table-container.font-size-12 td.md-cell{font-size:12px!important}#openchannelQueues{position:relative}#openchannelQueues>.header{height:76px;min-height:76px;max-height:76px}#openchannelQueues>.header .logo .logo-icon{margin:0 16px 0 0}#openchannelQueues>.header .logo .logo-text{font-size:24px}#openchannelQueues>.header md-icon{color:#fff}#openchannelQueues>.header .search-input-wrapper{position:relative}#openchannelQueues>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#openchannelQueues>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#openchannelQueues>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#openchannelQueues>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#openchannelQueues>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#openchannelQueues>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#openchannelQueues>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#openchannelQueues>.header.selected-bar .close-button-wrapper{width:244px}#openchannelQueues>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#openchannelQueues>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#openchannelQueues>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#openchannelQueues #add-openchannelQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#openchannelQueues #upload-openchannelQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#realtime>.content .blink{animation:blinker 2s linear infinite}#realtime>.content .avatar-wrapper{position:relative}#realtime>.content .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .search-input-wrapper{position:relative;margin-left:20px}#realtime>.content .search-input-wrapper label{padding:6px;cursor:pointer}#realtime>.content .search-input-wrapper md-input-container{padding-top:20px}#realtime>.content .main .labels{padding:8px 16px}#realtime>.content .main .labels .label{margin:0 0 2px 4px;padding:2px 5px;font-size:11px;white-space:nowrap;border-radius:2px}#realtime>.content .main .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .main .avatar-wrapper{position:relative}#realtime>.content .main .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .custom-column{padding:0 24px!important}@keyframes blinker{50%{opacity:0}}#plugin .filter-header{background-image:url(/assets/images/backgrounds/header-bg.png);color:#fff}#cloudProviders{position:relative}#cloudProviders>.header{height:76px;min-height:76px;max-height:76px}#cloudProviders>.header .logo .logo-icon{margin:0 16px 0 0}#cloudProviders>.header .logo .logo-text{font-size:24px}#cloudProviders>.header md-icon{color:#fff}#cloudProviders>.header .search-input-wrapper{position:relative}#cloudProviders>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#cloudProviders>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#cloudProviders>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#cloudProviders>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#cloudProviders>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#cloudProviders>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#cloudProviders>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#cloudProviders>.header.selected-bar .close-button-wrapper{width:244px}#cloudProviders>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#cloudProviders>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#cloudProviders>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#cloudProviders #add-cloudProvider-button{position:fixed;bottom:8px;right:8px;padding:0}#cloudProviders #upload-cloudProvider-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.cloudProvider-dialog{max-width:720px;width:720px}md-dialog.cloudProvider-dialog md-dialog-content{display:block;position:relative}md-dialog.cloudProvider-dialog md-toolbar .title{font-size:17px}md-dialog.cloudProvider-dialog md-input-container textarea{min-height:150px}md-dialog.cloudProvider-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.cloudProvider-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.cloudProvider-dialog .date-container{padding:16px 0 24px 0}md-dialog.cloudProvider-dialog .error-list{font-size:13px}md-dialog.cloudProvider-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.cloudProvider-dialog .error-list .error .message{font-weight:500}md-dialog.cloudProvider-dialog .error-list .error .md-button{margin:0}md-dialog.cloudProvider-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.cloudProvider-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.customization-dialog{max-width:720px;width:720px}md-dialog.customization-dialog md-dialog-content{display:block;position:relative}md-dialog.customization-dialog md-toolbar .title{font-size:17px}md-dialog.customization-dialog md-input-container textarea{min-height:150px}md-dialog.customization-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.customization-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.customization-dialog .date-container{padding:16px 0 24px 0}md-dialog.customization-dialog .error-list{font-size:13px}md-dialog.customization-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.customization-dialog .error-list .error .message{font-weight:500}md-dialog.customization-dialog .error-list .error .md-button{margin:0}md-dialog.customization-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.customization-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#customizations{position:relative}#customizations>.header{height:76px;min-height:76px;max-height:76px}#customizations>.header .logo .logo-icon{margin:0 16px 0 0}#customizations>.header .logo .logo-text{font-size:24px}#customizations>.header md-icon{color:#fff}#customizations>.header .search-input-wrapper{position:relative}#customizations>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#customizations>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#customizations>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#customizations>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#customizations>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#customizations>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#customizations>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#customizations>.header.selected-bar .close-button-wrapper{width:244px}#customizations>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#customizations>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#customizations>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#customizations>.content .customization-detail-form-container{padding:24px;margin-bottom:24px}#customizations>.content .customization-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#customizations>.content .customization-detail-form-container .handle{cursor:move}#customizations>.content .customization-detail-form-container md-input-container md-switch{margin:0!important}#customizations>.content .customization-detail-form-container #customization-image-uploader{position:relative}#customizations>.content .customization-detail-form-container #customization-image-uploader.dropping .drop-text{display:flex}#customizations>.content .customization-detail-form-container #customization-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#customizations>.content .customization-detail-form-container #customization-image-uploader .upload-button{margin-bottom:16px}#customizations>.content .customization-detail-form-container #customization-image-uploader .customization-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#customizations>.content .customization-detail-form-container #customization-image-uploader .customization-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#customizations>.content .customization-detail-form-container #customization-image-uploader .customization-image .media{max-height:100%}#customizations #add-customization-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.general-dialog{max-width:720px;width:720px}md-dialog.general-dialog md-dialog-content{display:block;position:relative}md-dialog.general-dialog md-toolbar .title{font-size:17px}md-dialog.general-dialog md-input-container textarea{min-height:150px}md-dialog.general-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.general-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.general-dialog .date-container{padding:16px 0 24px 0}md-dialog.general-dialog .error-list{font-size:13px}md-dialog.general-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.general-dialog .error-list .error .message{font-weight:500}md-dialog.general-dialog .error-list .error .md-button{margin:0}md-dialog.general-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.general-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#generals{position:relative}#generals>.header{height:76px;min-height:76px;max-height:76px}#generals>.header .logo .logo-icon{margin:0 16px 0 0}#generals>.header .logo .logo-text{font-size:24px}#generals>.header md-icon{color:#fff}#generals>.header .search-input-wrapper{position:relative}#generals>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#generals>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#generals>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#generals>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#generals>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#generals>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#generals>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#generals>.header.selected-bar .close-button-wrapper{width:244px}#generals>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#generals>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#generals>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#generals>.content .general-detail-form-container{padding:24px;margin-bottom:24px}#generals>.content .general-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#generals>.content .general-detail-form-container .handle{cursor:move}#generals>.content .general-detail-form-container md-input-container md-switch{margin:0!important}#generals>.content .general-detail-form-container #general-image-uploader{position:relative}#generals>.content .general-detail-form-container #general-image-uploader.dropping .drop-text{display:flex}#generals>.content .general-detail-form-container #general-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#generals>.content .general-detail-form-container #general-image-uploader .upload-button{margin-bottom:16px}#generals>.content .general-detail-form-container #general-image-uploader .general-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#generals>.content .general-detail-form-container #general-image-uploader .general-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#generals>.content .general-detail-form-container #general-image-uploader .general-image .media{max-height:100%}#generals #add-general-button{position:fixed;bottom:8px;right:8px;padding:0}#license{position:relative}#license .blink{animation:blinker 2s linear infinite}#license>.header{height:76px;min-height:76px;max-height:76px}#license>.header .logo .logo-icon{margin:0 16px 0 0}#license>.header .logo .logo-text{font-size:24px}#license>.header md-icon{color:#fff}#license>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#license>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#license>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#license>.content .badge{position:absolute;top:0;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);font-size:11px;font-weight:500;padding:6px 8px}md-dialog.request-dialog{max-width:720px;width:720px}md-dialog.request-dialog md-dialog-content{display:block;position:relative}md-dialog.request-dialog md-toolbar .title{font-size:17px}md-dialog.request-dialog md-input-container textarea{min-height:150px}md-dialog.request-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.request-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.request-dialog .date-container{padding:16px 0 24px 0}md-dialog.request-dialog .error-list{font-size:13px}md-dialog.request-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.request-dialog .error-list .error .message{font-weight:500}md-dialog.request-dialog .error-list .error .md-button{margin:0}md-dialog.request-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.request-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.update-dialog{max-width:720px;width:720px}md-dialog.update-dialog md-dialog-content{display:block;position:relative}md-dialog.update-dialog md-toolbar .title{font-size:17px}md-dialog.update-dialog md-input-container textarea{min-height:60px}md-dialog.update-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.update-dialog .error-list{font-size:13px}md-dialog.update-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.update-dialog .error-list .error .message{font-weight:500}md-dialog.update-dialog .error-list .error .md-button{margin:0}md-dialog.update-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.update-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.network-dialog{max-width:720px;width:720px}md-dialog.network-dialog md-dialog-content{display:block;position:relative}md-dialog.network-dialog md-toolbar .title{font-size:17px}md-dialog.network-dialog md-input-container textarea{min-height:150px}md-dialog.network-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.network-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.network-dialog .date-container{padding:16px 0 24px 0}md-dialog.network-dialog .error-list{font-size:13px}md-dialog.network-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.network-dialog .error-list .error .message{font-weight:500}md-dialog.network-dialog .error-list .error .md-button{margin:0}md-dialog.network-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.network-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#networks{position:relative}#networks>.header{height:76px;min-height:76px;max-height:76px}#networks>.header .logo .logo-icon{margin:0 16px 0 0}#networks>.header .logo .logo-text{font-size:24px}#networks>.header md-icon{color:#fff}#networks>.header .search-input-wrapper{position:relative}#networks>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#networks>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#networks>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#networks>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#networks>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#networks>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#networks>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#networks>.header.selected-bar .close-button-wrapper{width:244px}#networks>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#networks>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#networks>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#networks #add-network-button{position:fixed;bottom:8px;right:8px;padding:0}#networks #upload-network-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.smtp-dialog{max-width:720px;width:720px}md-dialog.smtp-dialog md-dialog-content{display:block;position:relative}md-dialog.smtp-dialog md-toolbar .title{font-size:17px}md-dialog.smtp-dialog md-input-container textarea{min-height:150px}md-dialog.smtp-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.smtp-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.smtp-dialog .date-container{padding:16px 0 24px 0}md-dialog.smtp-dialog .error-list{font-size:13px}md-dialog.smtp-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smtp-dialog .error-list .error .message{font-weight:500}md-dialog.smtp-dialog .error-list .error .md-button{margin:0}md-dialog.smtp-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smtp-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#smtps{position:relative}#smtps>.header{height:76px;min-height:76px;max-height:76px}#smtps>.header .logo .logo-icon{margin:0 16px 0 0}#smtps>.header .logo .logo-text{font-size:24px}#smtps>.header md-icon{color:#fff}#smtps>.header .search-input-wrapper{position:relative}#smtps>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#smtps>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#smtps>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#smtps>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#smtps>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#smtps>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#smtps>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#smtps>.header.selected-bar .close-button-wrapper{width:244px}#smtps>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#smtps>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#smtps>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#smtps>.content .smtp-detail-form-container{padding:24px;margin-bottom:24px}#smtps>.content .smtp-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#smtps>.content .smtp-detail-form-container .handle{cursor:move}#smtps>.content .smtp-detail-form-container md-input-container md-switch{margin:0!important}#smtps>.content .smtp-detail-form-container #smtp-image-uploader{position:relative}#smtps>.content .smtp-detail-form-container #smtp-image-uploader.dropping .drop-text{display:flex}#smtps>.content .smtp-detail-form-container #smtp-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#smtps>.content .smtp-detail-form-container #smtp-image-uploader .upload-button{margin-bottom:16px}#smtps>.content .smtp-detail-form-container #smtp-image-uploader .smtp-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#smtps>.content .smtp-detail-form-container #smtp-image-uploader .smtp-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#smtps>.content .smtp-detail-form-container #smtp-image-uploader .smtp-image .media{max-height:100%}#smtps #add-smtp-button{position:fixed;bottom:8px;right:8px;padding:0}#system>.header{height:76px;min-height:76px;max-height:76px}#system>.header .logo .logo-icon{margin:0 16px 0 0}#system>.header .logo .logo-text{font-size:24px}#system>.header md-icon{color:#fff}#system .system-detail-form-container{padding:24px;margin-bottom:24px}#system .system-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#system .system-detail-form-container .handle{cursor:move}#system .system-detail-form-container md-input-container md-switch{margin:0!important}#system .system-detail-form-container #system-image-uploader{position:relative}#system .system-detail-form-container #system-image-uploader.dropping .drop-text{display:flex}#system .system-detail-form-container #system-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#system .system-detail-form-container #system-image-uploader .upload-button{margin-bottom:16px}#system .system-detail-form-container #system-image-uploader .system-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#system .system-detail-form-container #system-image-uploader .system-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#system .system-detail-form-container #system-image-uploader .system-image .media{max-height:100%}#updates{position:relative}#updates>.header{height:76px;min-height:76px;max-height:76px}#updates>.header .logo .logo-icon{margin:0 16px 0 0}#updates>.header .logo .logo-text{font-size:24px}#updates>.header md-icon{color:#fff}#updates>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#updates>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#updates>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#realtime>.content .blink{animation:blinker 2s linear infinite}#realtime>.content .avatar-wrapper{position:relative}#realtime>.content .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .search-input-wrapper{position:relative;margin-left:20px}#realtime>.content .search-input-wrapper label{padding:6px;cursor:pointer}#realtime>.content .search-input-wrapper md-input-container{padding-top:20px}#realtime>.content .main .labels{padding:8px 16px}#realtime>.content .main .labels .label{margin:0 0 2px 4px;padding:2px 5px;font-size:11px;white-space:nowrap;border-radius:2px}#realtime>.content .main .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .main .avatar-wrapper{position:relative}#realtime>.content .main .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .custom-column{padding:0 24px!important}@keyframes blinker{50%{opacity:0}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.smsAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsCannedAnswer-dialog{max-width:720px;width:720px}md-dialog.smsCannedAnswer-dialog md-dialog-content{display:block;position:relative}md-dialog.smsCannedAnswer-dialog md-toolbar .title{font-size:17px}md-dialog.smsCannedAnswer-dialog md-input-container textarea{min-height:150px}md-dialog.smsCannedAnswer-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.smsCannedAnswer-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.smsCannedAnswer-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsCannedAnswer-dialog .error-list{font-size:13px}md-dialog.smsCannedAnswer-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsCannedAnswer-dialog .error-list .error .message{font-weight:500}md-dialog.smsCannedAnswer-dialog .error-list .error .md-button{margin:0}md-dialog.smsCannedAnswer-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsCannedAnswer-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#sms-smsAccount .header{height:76px;min-height:76px;max-height:76px}#sms-smsAccount .header .goto-smsAccounts-button{margin-right:16px}#sms-smsAccount .header .smsAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#sms-smsAccount .header .smsAccount-image img{height:100%;width:auto;max-width:none}#sms-smsAccount .header .subtitle{margin:6px 0 0 0}#sms-smsAccount .smsAccount-detail-form-container{padding:24px;margin-bottom:24px}#sms-smsAccount .smsAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#sms-smsAccount .smsAccount-detail-form-container .handle{cursor:move}#sms-smsAccount .smsAccount-detail-form-container md-input-container md-switch{margin:0!important}#sms-smsAccount .smsAccount-detail-form-container #smsAccount-image-uploader{position:relative}#sms-smsAccount .smsAccount-detail-form-container #smsAccount-image-uploader.dropping .drop-text{display:flex}#sms-smsAccount .smsAccount-detail-form-container #smsAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#sms-smsAccount .smsAccount-detail-form-container #smsAccount-image-uploader .upload-button{margin-bottom:16px}#sms-smsAccount .smsAccount-detail-form-container #smsAccount-image-uploader .smsAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#sms-smsAccount .smsAccount-detail-form-container #smsAccount-image-uploader .smsAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#sms-smsAccount .smsAccount-detail-form-container #smsAccount-image-uploader .smsAccount-image .media{max-height:100%}#sms-smsAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#sms-smsAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#sms-smsAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#sms-smsAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}#smsAccounts{position:relative}#smsAccounts>.header{height:76px;min-height:76px;max-height:76px}#smsAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#smsAccounts>.header .logo .logo-text{font-size:24px}#smsAccounts>.header md-icon{color:#fff}#smsAccounts>.header .search-input-wrapper{position:relative}#smsAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#smsAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#smsAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#smsAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#smsAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#smsAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#smsAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#smsAccounts>.header.selected-bar .close-button-wrapper{width:244px}#smsAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#smsAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#smsAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#smsAccounts #add-smsAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#smsAccounts #upload-smsAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.smsQueue-dialog{max-width:720px;width:720px}md-dialog.smsQueue-dialog md-dialog-content{display:block;position:relative}md-dialog.smsQueue-dialog md-toolbar .title{font-size:17px}md-dialog.smsQueue-dialog md-input-container textarea{min-height:150px}md-dialog.smsQueue-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.smsQueue-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.smsQueue-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsQueue-dialog .error-list{font-size:13px}md-dialog.smsQueue-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsQueue-dialog .error-list .error .message{font-weight:500}md-dialog.smsQueue-dialog .error-list .error .md-button{margin:0}md-dialog.smsQueue-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsQueue-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#sms-smsQueue .header{height:76px;min-height:76px;max-height:76px}#sms-smsQueue .header .goto-smsQueues-button{margin-right:16px}#sms-smsQueue .header .smsQueue-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#sms-smsQueue .header .smsQueue-image img{height:100%;width:auto;max-width:none}#sms-smsQueue .header .subtitle{margin:6px 0 0 0}#sms-smsQueue .smsQueue-detail-form-container{padding:24px;margin-bottom:24px}#sms-smsQueue .smsQueue-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#sms-smsQueue .smsQueue-detail-form-container .handle{cursor:move}#sms-smsQueue .smsQueue-detail-form-container md-input-container md-switch{margin:0!important}#sms-smsQueue .smsQueue-detail-form-container #smsQueue-image-uploader{position:relative}#sms-smsQueue .smsQueue-detail-form-container #smsQueue-image-uploader.dropping .drop-text{display:flex}#sms-smsQueue .smsQueue-detail-form-container #smsQueue-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#sms-smsQueue .smsQueue-detail-form-container #smsQueue-image-uploader .upload-button{margin-bottom:16px}#sms-smsQueue .smsQueue-detail-form-container #smsQueue-image-uploader .smsQueue-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#sms-smsQueue .smsQueue-detail-form-container #smsQueue-image-uploader .smsQueue-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#sms-smsQueue .smsQueue-detail-form-container #smsQueue-image-uploader .smsQueue-image .media{max-height:100%}#sms-smsQueue md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#sms-smsQueue md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#sms-smsQueue md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#sms-smsQueue md-table-container.font-size-12 td.md-cell{font-size:12px!important}#smsQueues{position:relative}#smsQueues>.header{height:76px;min-height:76px;max-height:76px}#smsQueues>.header .logo .logo-icon{margin:0 16px 0 0}#smsQueues>.header .logo .logo-text{font-size:24px}#smsQueues>.header md-icon{color:#fff}#smsQueues>.header .search-input-wrapper{position:relative}#smsQueues>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#smsQueues>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#smsQueues>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#smsQueues>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#smsQueues>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#smsQueues>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#smsQueues>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#smsQueues>.header.selected-bar .close-button-wrapper{width:244px}#smsQueues>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#smsQueues>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#smsQueues>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#smsQueues #add-smsQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#smsQueues #upload-smsQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#agents{position:relative}#agents>.header{height:76px;min-height:76px;max-height:76px}#agents>.header .logo .logo-icon{margin:0 16px 0 0}#agents>.header .logo .logo-text{font-size:24px}#agents>.header md-icon{color:#fff}#agents>.header .search-input-wrapper{position:relative}#agents>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#agents>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#agents>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#agents>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#agents>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#agents>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#agents>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#agents>.header.selected-bar .close-button-wrapper{width:244px}#agents>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#agents>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#agents>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#agents #add-agent-button{position:fixed;bottom:8px;right:8px;padding:0}#agents #upload-agent-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.agent-dialog{max-width:720px;width:720px}md-dialog.agent-dialog md-dialog-content{display:block;position:relative}md-dialog.agent-dialog md-toolbar .title{font-size:17px}md-dialog.agent-dialog md-input-container textarea{min-height:150px}md-dialog.agent-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.agent-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.agent-dialog .date-container{padding:16px 0 24px 0}md-dialog.agent-dialog .error-list{font-size:13px}md-dialog.agent-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.agent-dialog .error-list .error .message{font-weight:500}md-dialog.agent-dialog .error-list .error .md-button{margin:0}md-dialog.agent-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.agent-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#staff-agent .header{height:76px;min-height:76px;max-height:76px}#staff-agent .header .goto-agents-button{margin-right:16px}#staff-agent .header .agent-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#staff-agent .header .agent-image img{height:100%;width:auto;max-width:none}#staff-agent .header .subtitle{margin:6px 0 0 0}#staff-agent .agent-detail-form-container{padding:24px;margin-bottom:24px}#staff-agent .agent-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#staff-agent .agent-detail-form-container .handle{cursor:move}#staff-agent .agent-detail-form-container md-input-container md-switch{margin:0!important}#staff-agent .agent-detail-form-container #agent-image-uploader{position:relative}#staff-agent .agent-detail-form-container #agent-image-uploader.dropping .drop-text{display:flex}#staff-agent .agent-detail-form-container #agent-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#staff-agent .agent-detail-form-container #agent-image-uploader .upload-button{margin-bottom:16px}#staff-agent .agent-detail-form-container #agent-image-uploader .agent-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#staff-agent .agent-detail-form-container #agent-image-uploader .agent-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#staff-agent .agent-detail-form-container #agent-image-uploader .agent-image .media{max-height:100%}#staff-agent md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#staff-agent md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#staff-agent md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#staff-agent md-table-container.font-size-12 td.md-cell{font-size:12px!important}md-dialog.team-dialog{max-width:720px;width:720px}md-dialog.team-dialog md-dialog-content{display:block;position:relative}md-dialog.team-dialog md-toolbar .title{font-size:17px}md-dialog.team-dialog md-input-container textarea{min-height:150px}md-dialog.team-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.team-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.team-dialog .date-container{padding:16px 0 24px 0}md-dialog.team-dialog .error-list{font-size:13px}md-dialog.team-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.team-dialog .error-list .error .message{font-weight:500}md-dialog.team-dialog .error-list .error .md-button{margin:0}md-dialog.team-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.team-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#teams{position:relative}#teams>.header{height:76px;min-height:76px;max-height:76px}#teams>.header .logo .logo-icon{margin:0 16px 0 0}#teams>.header .logo .logo-text{font-size:24px}#teams>.header md-icon{color:#fff}#teams>.header .search-input-wrapper{position:relative}#teams>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#teams>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#teams>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#teams>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#teams>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#teams>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#teams>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#teams>.header.selected-bar .close-button-wrapper{width:244px}#teams>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#teams>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#teams>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#teams #add-team-button{position:fixed;bottom:8px;right:8px;padding:0}#teams #upload-team-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.telephone-dialog{max-width:720px;width:720px}md-dialog.telephone-dialog md-dialog-content{display:block;position:relative}md-dialog.telephone-dialog md-toolbar .title{font-size:17px}md-dialog.telephone-dialog md-input-container textarea{min-height:150px}md-dialog.telephone-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.telephone-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.telephone-dialog .date-container{padding:16px 0 24px 0}md-dialog.telephone-dialog .error-list{font-size:13px}md-dialog.telephone-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.telephone-dialog .error-list .error .message{font-weight:500}md-dialog.telephone-dialog .error-list .error .md-button{margin:0}md-dialog.telephone-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.telephone-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#staff-telephone .header{height:76px;min-height:76px;max-height:76px}#staff-telephone .header .goto-telephones-button{margin-right:16px}#staff-telephone .header .telephone-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#staff-telephone .header .telephone-image img{height:100%;width:auto;max-width:none}#staff-telephone .header .subtitle{margin:6px 0 0 0}#staff-telephone .telephone-detail-form-container{padding:24px;margin-bottom:24px}#staff-telephone .telephone-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#staff-telephone .telephone-detail-form-container .handle{cursor:move}#staff-telephone .telephone-detail-form-container md-input-container md-switch{margin:0!important}#staff-telephone .telephone-detail-form-container #telephone-image-uploader{position:relative}#staff-telephone .telephone-detail-form-container #telephone-image-uploader.dropping .drop-text{display:flex}#staff-telephone .telephone-detail-form-container #telephone-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#staff-telephone .telephone-detail-form-container #telephone-image-uploader .upload-button{margin-bottom:16px}#staff-telephone .telephone-detail-form-container #telephone-image-uploader .telephone-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#staff-telephone .telephone-detail-form-container #telephone-image-uploader .telephone-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#staff-telephone .telephone-detail-form-container #telephone-image-uploader .telephone-image .media{max-height:100%}#staff-telephone md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#staff-telephone md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#staff-telephone md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#staff-telephone md-table-container.font-size-12 td.md-cell{font-size:12px!important}#telephones{position:relative}#telephones>.header{height:76px;min-height:76px;max-height:76px}#telephones>.header .logo .logo-icon{margin:0 16px 0 0}#telephones>.header .logo .logo-text{font-size:24px}#telephones>.header md-icon{color:#fff}#telephones>.header .search-input-wrapper{position:relative}#telephones>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#telephones>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#telephones>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#telephones>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#telephones>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#telephones>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#telephones>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#telephones>.header.selected-bar .close-button-wrapper{width:244px}#telephones>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#telephones>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#telephones>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#telephones #add-telephone-button{position:fixed;bottom:8px;right:8px;padding:0}#telephones #upload-telephone-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.userProfile-dialog{max-width:720px;width:720px}md-dialog.userProfile-dialog md-dialog-content{display:block;position:relative}md-dialog.userProfile-dialog md-toolbar .title{font-size:17px}md-dialog.userProfile-dialog md-input-container textarea{min-height:150px}md-dialog.userProfile-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.userProfile-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.userProfile-dialog .date-container{padding:16px 0 24px 0}md-dialog.userProfile-dialog .error-list{font-size:13px}md-dialog.userProfile-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.userProfile-dialog .error-list .error .message{font-weight:500}md-dialog.userProfile-dialog .error-list .error .md-button{margin:0}md-dialog.userProfile-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.userProfile-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#staff-userProfile .header{height:76px;min-height:76px;max-height:76px}#staff-userProfile .header .goto-userProfiles-button{margin-right:16px}#staff-userProfile .header .userProfile-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#staff-userProfile .header .userProfile-image img{height:100%;width:auto;max-width:none}#staff-userProfile .header .subtitle{margin:6px 0 0 0}#staff-userProfile .userProfile-detail-form-container{padding:24px;margin-bottom:24px}#staff-userProfile .userProfile-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#staff-userProfile .userProfile-detail-form-container .handle{cursor:move}#staff-userProfile .userProfile-detail-form-container md-input-container md-switch{margin:0!important}#staff-userProfile .userProfile-detail-form-container #userProfile-image-uploader{position:relative}#staff-userProfile .userProfile-detail-form-container #userProfile-image-uploader.dropping .drop-text{display:flex}#staff-userProfile .userProfile-detail-form-container #userProfile-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#staff-userProfile .userProfile-detail-form-container #userProfile-image-uploader .upload-button{margin-bottom:16px}#staff-userProfile .userProfile-detail-form-container #userProfile-image-uploader .userProfile-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#staff-userProfile .userProfile-detail-form-container #userProfile-image-uploader .userProfile-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#staff-userProfile .userProfile-detail-form-container #userProfile-image-uploader .userProfile-image .media{max-height:100%}#staff-userProfile md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#staff-userProfile md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#staff-userProfile md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#staff-userProfile md-table-container.font-size-12 td.md-cell{font-size:12px!important}#userProfiles{position:relative}#userProfiles>.header{height:76px;min-height:76px;max-height:76px}#userProfiles>.header .logo .logo-icon{margin:0 16px 0 0}#userProfiles>.header .logo .logo-text{font-size:24px}#userProfiles>.header md-icon{color:#fff}#userProfiles>.header .search-input-wrapper{position:relative}#userProfiles>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#userProfiles>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#userProfiles>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#userProfiles>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#userProfiles>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#userProfiles>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#userProfiles>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#userProfiles>.header.selected-bar .close-button-wrapper{width:244px}#userProfiles>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#userProfiles>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#userProfiles>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#userProfiles #add-userProfile-button{position:fixed;bottom:8px;right:8px;padding:0}#userProfiles #upload-userProfile-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.user-dialog{max-width:720px;width:720px}md-dialog.user-dialog md-dialog-content{display:block;position:relative}md-dialog.user-dialog md-toolbar .title{font-size:17px}md-dialog.user-dialog md-input-container textarea{min-height:150px}md-dialog.user-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.user-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.user-dialog .date-container{padding:16px 0 24px 0}md-dialog.user-dialog .error-list{font-size:13px}md-dialog.user-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.user-dialog .error-list .error .message{font-weight:500}md-dialog.user-dialog .error-list .error .md-button{margin:0}md-dialog.user-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.user-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#staff-user .header{height:76px;min-height:76px;max-height:76px}#staff-user .header .goto-users-button{margin-right:16px}#staff-user .header .user-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#staff-user .header .user-image img{height:100%;width:auto;max-width:none}#staff-user .header .subtitle{margin:6px 0 0 0}#staff-user .user-detail-form-container{padding:24px;margin-bottom:24px}#staff-user .user-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#staff-user .user-detail-form-container .handle{cursor:move}#staff-user .user-detail-form-container md-input-container md-switch{margin:0!important}#staff-user .user-detail-form-container #user-image-uploader{position:relative}#staff-user .user-detail-form-container #user-image-uploader.dropping .drop-text{display:flex}#staff-user .user-detail-form-container #user-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#staff-user .user-detail-form-container #user-image-uploader .upload-button{margin-bottom:16px}#staff-user .user-detail-form-container #user-image-uploader .user-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#staff-user .user-detail-form-container #user-image-uploader .user-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#staff-user .user-detail-form-container #user-image-uploader .user-image .media{max-height:100%}#staff-user md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#staff-user md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#staff-user md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#staff-user md-table-container.font-size-12 td.md-cell{font-size:12px!important}#users{position:relative}#users>.header{height:76px;min-height:76px;max-height:76px}#users>.header .logo .logo-icon{margin:0 16px 0 0}#users>.header .logo .logo-text{font-size:24px}#users>.header md-icon{color:#fff}#users>.header .search-input-wrapper{position:relative}#users>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#users>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#users>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#users>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#users>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#users>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#users>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#users>.header.selected-bar .close-button-wrapper{width:244px}#users>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#users>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#users>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#users #add-user-button{position:fixed;bottom:8px;right:8px;padding:0}#users #upload-user-button{position:fixed;bottom:8px;right:8px;padding:0}#cannedAnswers{position:relative}#cannedAnswers>.header{height:76px;min-height:76px;max-height:76px}#cannedAnswers>.header .logo .logo-icon{margin:0 16px 0 0}#cannedAnswers>.header .logo .logo-text{font-size:24px}#cannedAnswers>.header md-icon{color:#fff}#cannedAnswers>.header .search-input-wrapper{position:relative}#cannedAnswers>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#cannedAnswers>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#cannedAnswers>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#cannedAnswers>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#cannedAnswers>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#cannedAnswers>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#cannedAnswers>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#cannedAnswers>.header.selected-bar .close-button-wrapper{width:244px}#cannedAnswers>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#cannedAnswers>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#cannedAnswers>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#cannedAnswers #add-cannedAnswer-button{position:fixed;bottom:8px;right:8px;padding:0}#cannedAnswers #upload-cannedAnswer-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.cannedAnswer-dialog{max-width:720px;width:720px}md-dialog.cannedAnswer-dialog md-dialog-content{display:block;position:relative}md-dialog.cannedAnswer-dialog md-toolbar .title{font-size:17px}md-dialog.cannedAnswer-dialog md-input-container textarea{min-height:150px}md-dialog.cannedAnswer-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.cannedAnswer-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.cannedAnswer-dialog .date-container{padding:16px 0 24px 0}md-dialog.cannedAnswer-dialog .error-list{font-size:13px}md-dialog.cannedAnswer-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.cannedAnswer-dialog .error-list .error .message{font-weight:500}md-dialog.cannedAnswer-dialog .error-list .error .md-button{margin:0}md-dialog.cannedAnswer-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.cannedAnswer-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.customDashboard-dialog{max-width:720px;width:720px}md-dialog.customDashboard-dialog md-dialog-content{display:block;position:relative}md-dialog.customDashboard-dialog md-toolbar .title{font-size:17px}md-dialog.customDashboard-dialog md-input-container textarea{min-height:150px}md-dialog.customDashboard-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.customDashboard-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.customDashboard-dialog .date-container{padding:16px 0 24px 0}md-dialog.customDashboard-dialog .error-list{font-size:13px}md-dialog.customDashboard-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.customDashboard-dialog .error-list .error .message{font-weight:500}md-dialog.customDashboard-dialog .error-list .error .md-button{margin:0}md-dialog.customDashboard-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.customDashboard-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#customDashboards{position:relative}#customDashboards>.header{height:76px;min-height:76px;max-height:76px}#customDashboards>.header .logo .logo-icon{margin:0 16px 0 0}#customDashboards>.header .logo .logo-text{font-size:24px}#customDashboards>.header md-icon{color:#fff}#customDashboards>.header .search-input-wrapper{position:relative}#customDashboards>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#customDashboards>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#customDashboards>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#customDashboards>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#customDashboards>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#customDashboards>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#customDashboards>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#customDashboards>.header.selected-bar .close-button-wrapper{width:244px}#customDashboards>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#customDashboards>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#customDashboards>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#customDashboards #add-customDashboard-button{position:fixed;bottom:8px;right:8px;padding:0}#customDashboards #upload-customDashboard-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.dashboarditem-dialog{max-width:720px;width:720px}md-dialog.dashboarditem-dialog md-dialog-content{display:block;position:relative}md-dialog.dashboarditem-dialog md-toolbar .title{font-size:17px}md-dialog.dashboarditem-dialog md-input-container textarea{min-height:150px}md-dialog.dashboarditem-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.dashboarditem-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.dashboarditem-dialog .date-container{padding:16px 0 24px 0}md-dialog.dashboarditem-dialog .error-list{font-size:13px}md-dialog.dashboarditem-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.dashboarditem-dialog .error-list .error .message{font-weight:500}md-dialog.dashboarditem-dialog .error-list .error .md-button{margin:0}md-dialog.dashboarditem-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.dashboarditem-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#tools-customDashboard .header{height:76px;min-height:76px;max-height:76px}#tools-customDashboard .header .goto-customDashboards-button{margin-right:16px}#tools-customDashboard .header .customDashboard-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#tools-customDashboard .header .customDashboard-image img{height:100%;width:auto;max-width:none}#tools-customDashboard .header .subtitle{margin:6px 0 0 0}#tools-customDashboard .customDashboard-detail-form-container{padding:24px;margin-bottom:24px}#tools-customDashboard .customDashboard-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#tools-customDashboard .customDashboard-detail-form-container .handle{cursor:move}#tools-customDashboard .customDashboard-detail-form-container md-input-container md-switch{margin:0!important}#tools-customDashboard .customDashboard-detail-form-container #customDashboard-image-uploader{position:relative}#tools-customDashboard .customDashboard-detail-form-container #customDashboard-image-uploader.dropping .drop-text{display:flex}#tools-customDashboard .customDashboard-detail-form-container #customDashboard-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#tools-customDashboard .customDashboard-detail-form-container #customDashboard-image-uploader .upload-button{margin-bottom:16px}#tools-customDashboard .customDashboard-detail-form-container #customDashboard-image-uploader .customDashboard-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#tools-customDashboard .customDashboard-detail-form-container #customDashboard-image-uploader .customDashboard-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#tools-customDashboard .customDashboard-detail-form-container #customDashboard-image-uploader .customDashboard-image .media{max-height:100%}#tools-customDashboard md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#tools-customDashboard md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#tools-customDashboard md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#tools-customDashboard md-table-container.font-size-12 td.md-cell{font-size:12px!important}md-dialog.disposition-dialog{max-width:720px;width:720px}md-dialog.disposition-dialog md-dialog-content{display:block;position:relative}md-dialog.disposition-dialog md-toolbar .title{font-size:17px}md-dialog.disposition-dialog md-input-container textarea{min-height:150px}md-dialog.disposition-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.disposition-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.disposition-dialog .date-container{padding:16px 0 24px 0}md-dialog.disposition-dialog .error-list{font-size:13px}md-dialog.disposition-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.disposition-dialog .error-list .error .message{font-weight:500}md-dialog.disposition-dialog .error-list .error .md-button{margin:0}md-dialog.disposition-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.disposition-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#dispositions{position:relative}#dispositions>.header{height:76px;min-height:76px;max-height:76px}#dispositions>.header .logo .logo-icon{margin:0 16px 0 0}#dispositions>.header .logo .logo-text{font-size:24px}#dispositions>.header md-icon{color:#fff}#dispositions>.header .search-input-wrapper{position:relative}#dispositions>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#dispositions>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#dispositions>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#dispositions>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#dispositions>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#dispositions>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#dispositions>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#dispositions>.header.selected-bar .close-button-wrapper{width:244px}#dispositions>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#dispositions>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#dispositions>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#dispositions #add-disposition-button{position:fixed;bottom:8px;right:8px;padding:0}#dispositions #upload-disposition-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.interval-dialog{max-width:720px;width:720px}md-dialog.interval-dialog md-dialog-content{display:block;position:relative}md-dialog.interval-dialog md-toolbar .title{font-size:17px}md-dialog.interval-dialog md-input-container textarea{min-height:150px}md-dialog.interval-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.interval-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.interval-dialog .date-container{padding:16px 0 24px 0}md-dialog.interval-dialog .error-list{font-size:13px}md-dialog.interval-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.interval-dialog .error-list .error .message{font-weight:500}md-dialog.interval-dialog .error-list .error .md-button{margin:0}md-dialog.interval-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.interval-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.interval-dialog{max-width:720px;width:720px}md-dialog.interval-dialog md-dialog-content{display:block;position:relative}md-dialog.interval-dialog md-toolbar .title{font-size:17px}md-dialog.interval-dialog md-input-container textarea{min-height:150px}md-dialog.interval-dialog .date-container{padding:16px 0 24px 0}md-dialog.interval-dialog .error-list{font-size:13px}md-dialog.interval-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.interval-dialog .error-list .error .message{font-weight:500}md-dialog.interval-dialog .error-list .error .md-button{margin:0}md-dialog.interval-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.interval-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.interval-dialog{max-width:720px;width:720px}md-dialog.interval-dialog md-dialog-content{display:block;position:relative}md-dialog.interval-dialog md-toolbar .title{font-size:17px}md-dialog.interval-dialog md-input-container textarea{min-height:150px}md-dialog.interval-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.interval-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.interval-dialog .date-container{padding:16px 0 24px 0}md-dialog.interval-dialog .error-list{font-size:13px}md-dialog.interval-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.interval-dialog .error-list .error .message{font-weight:500}md-dialog.interval-dialog .error-list .error .md-button{margin:0}md-dialog.interval-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.interval-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#tools-interval .header{height:76px;min-height:76px;max-height:76px}#tools-interval .header .goto-intervals-button{margin-right:16px}#tools-interval .header .interval-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#tools-interval .header .interval-image img{height:100%;width:auto;max-width:none}#tools-interval .header .subtitle{margin:6px 0 0 0}#tools-interval .interval-detail-form-container{padding:24px;margin-bottom:24px}#tools-interval .interval-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#tools-interval .interval-detail-form-container .handle{cursor:move}#tools-interval .interval-detail-form-container md-input-container md-switch{margin:0!important}#tools-interval .interval-detail-form-container #interval-image-uploader{position:relative}#tools-interval .interval-detail-form-container #interval-image-uploader.dropping .drop-text{display:flex}#tools-interval .interval-detail-form-container #interval-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#tools-interval .interval-detail-form-container #interval-image-uploader .upload-button{margin-bottom:16px}#tools-interval .interval-detail-form-container #interval-image-uploader .interval-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#tools-interval .interval-detail-form-container #interval-image-uploader .interval-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#tools-interval .interval-detail-form-container #interval-image-uploader .interval-image .media{max-height:100%}#tools-interval md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#tools-interval md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#tools-interval md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#tools-interval md-table-container.font-size-12 td.md-cell{font-size:12px!important}#intervals{position:relative}#intervals>.header{height:76px;min-height:76px;max-height:76px}#intervals>.header .logo .logo-icon{margin:0 16px 0 0}#intervals>.header .logo .logo-text{font-size:24px}#intervals>.header md-icon{color:#fff}#intervals>.header .search-input-wrapper{position:relative}#intervals>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#intervals>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#intervals>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#intervals>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#intervals>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#intervals>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#intervals>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#intervals>.header.selected-bar .close-button-wrapper{width:244px}#intervals>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#intervals>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#intervals>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#intervals #add-interval-button{position:fixed;bottom:8px;right:8px;padding:0}#intervals #upload-interval-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.pause-dialog{max-width:720px;width:720px}md-dialog.pause-dialog md-dialog-content{display:block;position:relative}md-dialog.pause-dialog md-toolbar .title{font-size:17px}md-dialog.pause-dialog md-input-container textarea{min-height:150px}md-dialog.pause-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.pause-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.pause-dialog .date-container{padding:16px 0 24px 0}md-dialog.pause-dialog .error-list{font-size:13px}md-dialog.pause-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.pause-dialog .error-list .error .message{font-weight:500}md-dialog.pause-dialog .error-list .error .md-button{margin:0}md-dialog.pause-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.pause-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#pauses{position:relative}#pauses>.header{height:76px;min-height:76px;max-height:76px}#pauses>.header .logo .logo-icon{margin:0 16px 0 0}#pauses>.header .logo .logo-text{font-size:24px}#pauses>.header md-icon{color:#fff}#pauses>.header .search-input-wrapper{position:relative}#pauses>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#pauses>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#pauses>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#pauses>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#pauses>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#pauses>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#pauses>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#pauses>.header.selected-bar .close-button-wrapper{width:244px}#pauses>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#pauses>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#pauses>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#pauses #add-pause-button{position:fixed;bottom:8px;right:8px;padding:0}#pauses #upload-pause-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.schedule-dialog{max-width:720px;width:720px}md-dialog.schedule-dialog md-dialog-content{display:block;position:relative}md-dialog.schedule-dialog md-toolbar .title{font-size:17px}md-dialog.schedule-dialog md-input-container textarea{min-height:150px}md-dialog.schedule-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.schedule-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.schedule-dialog .date-container{padding:16px 0 24px 0}md-dialog.schedule-dialog .error-list{font-size:13px}md-dialog.schedule-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.schedule-dialog .error-list .error .message{font-weight:500}md-dialog.schedule-dialog .error-list .error .md-button{margin:0}md-dialog.schedule-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.schedule-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#schedules{position:relative}#schedules>.header{height:76px;min-height:76px;max-height:76px}#schedules>.header .logo .logo-icon{margin:0 16px 0 0}#schedules>.header .logo .logo-text{font-size:24px}#schedules>.header md-icon{color:#fff}#schedules>.header .search-input-wrapper{position:relative}#schedules>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#schedules>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#schedules>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#schedules>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#schedules>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#schedules>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#schedules>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#schedules>.header.selected-bar .close-button-wrapper{width:244px}#schedules>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#schedules>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#schedules>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#schedules #add-schedule-button{position:fixed;bottom:8px;right:8px;padding:0}#schedules #upload-schedule-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.sound-dialog{max-width:720px;width:720px}md-dialog.sound-dialog md-dialog-content{display:block;position:relative}md-dialog.sound-dialog md-toolbar .title{font-size:17px}md-dialog.sound-dialog md-input-container textarea{min-height:150px}md-dialog.sound-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.sound-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.sound-dialog .date-container{padding:16px 0 24px 0}md-dialog.sound-dialog .error-list{font-size:13px}md-dialog.sound-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.sound-dialog .error-list .error .message{font-weight:500}md-dialog.sound-dialog .error-list .error .md-button{margin:0}md-dialog.sound-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.sound-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#sounds{position:relative}#sounds>.header{height:76px;min-height:76px;max-height:76px}#sounds>.header .logo .logo-icon{margin:0 16px 0 0}#sounds>.header .logo .logo-text{font-size:24px}#sounds>.header md-icon{color:#fff}#sounds>.header .search-input-wrapper{position:relative}#sounds>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#sounds>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#sounds>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#sounds>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#sounds>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#sounds>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#sounds>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#sounds>.header.selected-bar .close-button-wrapper{width:244px}#sounds>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#sounds>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#sounds>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#sounds #add-sound-button{position:fixed;bottom:8px;right:8px;padding:0}#sounds #upload-sound-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.upload-dialog{max-width:720px;width:720px}md-dialog.upload-dialog md-dialog-content{display:block;position:relative}md-dialog.upload-dialog md-toolbar .title{font-size:17px}md-dialog.upload-dialog md-input-container textarea{min-height:150px}md-dialog.upload-dialog md-progress-linear{padding-top:16px!important}md-dialog.upload-dialog .date-container{padding:16px 0 24px 0}md-dialog.upload-dialog .error-list{font-size:13px}md-dialog.upload-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.upload-dialog .error-list .error .message{font-weight:500}md-dialog.upload-dialog .error-list .error .md-button{margin:0}md-dialog.upload-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.upload-dialog .sound-image{overflow:hidden;max-width:148px;margin-right:16px;border:3px solid rgba(0,0,0,.12);padding:10px}md-dialog.upload-dialog .sound-image img{width:auto;max-width:none}md-dialog.upload-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.tag-dialog{max-width:720px;width:720px}md-dialog.tag-dialog md-dialog-content{display:block;position:relative}md-dialog.tag-dialog md-toolbar .title{font-size:17px}md-dialog.tag-dialog md-input-container textarea{min-height:150px}md-dialog.tag-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.tag-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.tag-dialog .date-container{padding:16px 0 24px 0}md-dialog.tag-dialog .error-list{font-size:13px}md-dialog.tag-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.tag-dialog .error-list .error .message{font-weight:500}md-dialog.tag-dialog .error-list .error .md-button{margin:0}md-dialog.tag-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.tag-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#tags{position:relative}#tags>.header{height:76px;min-height:76px;max-height:76px}#tags>.header .logo .logo-icon{margin:0 16px 0 0}#tags>.header .logo .logo-text{font-size:24px}#tags>.header md-icon{color:#fff}#tags>.header .search-input-wrapper{position:relative}#tags>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#tags>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#tags>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#tags>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#tags>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#tags>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#tags>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#tags>.header.selected-bar .close-button-wrapper{width:244px}#tags>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#tags>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#tags>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#tags #add-tag-button{position:fixed;bottom:8px;right:8px;padding:0}#tags #upload-tag-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.template-dialog{max-width:720px;width:720px}md-dialog.template-dialog md-dialog-content{display:block;position:relative}md-dialog.template-dialog md-toolbar .title{font-size:17px}md-dialog.template-dialog md-input-container textarea{min-height:150px}md-dialog.template-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.template-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.template-dialog .date-container{padding:16px 0 24px 0}md-dialog.template-dialog .error-list{font-size:13px}md-dialog.template-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.template-dialog .error-list .error .message{font-weight:500}md-dialog.template-dialog .error-list .error .md-button{margin:0}md-dialog.template-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.template-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#templates{position:relative}#templates>.header{height:76px;min-height:76px;max-height:76px}#templates>.header .logo .logo-icon{margin:0 16px 0 0}#templates>.header .logo .logo-text{font-size:24px}#templates>.header md-icon{color:#fff}#templates>.header .search-input-wrapper{position:relative}#templates>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#templates>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#templates>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#templates>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#templates>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#templates>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#templates>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#templates>.header.selected-bar .close-button-wrapper{width:244px}#templates>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#templates>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#templates>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#templates #add-template-button{position:fixed;bottom:8px;right:8px;padding:0}#templates #upload-template-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.trigger-dialog{max-width:720px;width:720px}md-dialog.trigger-dialog md-dialog-content{display:block;position:relative}md-dialog.trigger-dialog md-toolbar .title{font-size:17px}md-dialog.trigger-dialog md-input-container textarea{min-height:150px}md-dialog.trigger-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.trigger-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.trigger-dialog .date-container{padding:16px 0 24px 0}md-dialog.trigger-dialog .error-list{font-size:13px}md-dialog.trigger-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.trigger-dialog .error-list .error .message{font-weight:500}md-dialog.trigger-dialog .error-list .error .md-button{margin:0}md-dialog.trigger-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.trigger-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.action-dialog{max-width:720px;width:720px}md-dialog.action-dialog md-dialog-content{display:block;position:relative}md-dialog.action-dialog md-toolbar .title{font-size:17px}md-dialog.action-dialog md-input-container textarea{min-height:150px}md-dialog.action-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.action-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.action-dialog .date-container{padding:16px 0 24px 0}md-dialog.action-dialog .error-list{font-size:13px}md-dialog.action-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.action-dialog .error-list .error .message{font-weight:500}md-dialog.action-dialog .error-list .error .md-button{margin:0}md-dialog.action-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.action-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.allCondition-dialog{max-width:720px;width:720px}md-dialog.allCondition-dialog md-dialog-content{display:block;position:relative}md-dialog.allCondition-dialog md-toolbar .title{font-size:17px}md-dialog.allCondition-dialog md-input-container textarea{min-height:150px}md-dialog.allCondition-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.allCondition-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.allCondition-dialog .date-container{padding:16px 0 24px 0}md-dialog.allCondition-dialog .error-list{font-size:13px}md-dialog.allCondition-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.allCondition-dialog .error-list .error .message{font-weight:500}md-dialog.allCondition-dialog .error-list .error .md-button{margin:0}md-dialog.allCondition-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.allCondition-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.anyCondition-dialog{max-width:720px;width:720px}md-dialog.anyCondition-dialog md-dialog-content{display:block;position:relative}md-dialog.anyCondition-dialog md-toolbar .title{font-size:17px}md-dialog.anyCondition-dialog md-input-container textarea{min-height:150px}md-dialog.anyCondition-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.anyCondition-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.anyCondition-dialog .date-container{padding:16px 0 24px 0}md-dialog.anyCondition-dialog .error-list{font-size:13px}md-dialog.anyCondition-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.anyCondition-dialog .error-list .error .message{font-weight:500}md-dialog.anyCondition-dialog .error-list .error .md-button{margin:0}md-dialog.anyCondition-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.anyCondition-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#tools-trigger .header{height:76px;min-height:76px;max-height:76px}#tools-trigger .header .goto-triggers-button{margin-right:16px}#tools-trigger .header .trigger-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#tools-trigger .header .trigger-image img{height:100%;width:auto;max-width:none}#tools-trigger .header .subtitle{margin:6px 0 0 0}#tools-trigger .trigger-detail-form-container{padding:24px;margin-bottom:24px}#tools-trigger .trigger-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#tools-trigger .trigger-detail-form-container .handle{cursor:move}#tools-trigger .trigger-detail-form-container md-input-container md-switch{margin:0!important}#tools-trigger .trigger-detail-form-container #trigger-image-uploader{position:relative}#tools-trigger .trigger-detail-form-container #trigger-image-uploader.dropping .drop-text{display:flex}#tools-trigger .trigger-detail-form-container #trigger-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#tools-trigger .trigger-detail-form-container #trigger-image-uploader .upload-button{margin-bottom:16px}#tools-trigger .trigger-detail-form-container #trigger-image-uploader .trigger-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#tools-trigger .trigger-detail-form-container #trigger-image-uploader .trigger-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#tools-trigger .trigger-detail-form-container #trigger-image-uploader .trigger-image .media{max-height:100%}#tools-trigger md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#tools-trigger md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#tools-trigger md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#tools-trigger md-table-container.font-size-12 td.md-cell{font-size:12px!important}#triggers{position:relative}#triggers>.header{height:76px;min-height:76px;max-height:76px}#triggers>.header .logo .logo-icon{margin:0 16px 0 0}#triggers>.header .logo .logo-text{font-size:24px}#triggers>.header md-icon{color:#fff}#triggers>.header .search-input-wrapper{position:relative}#triggers>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#triggers>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#triggers>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#triggers>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#triggers>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#triggers>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#triggers>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#triggers>.header.selected-bar .close-button-wrapper{width:244px}#triggers>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#triggers>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#triggers>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#triggers #add-trigger-button{position:fixed;bottom:8px;right:8px;padding:0}#triggers #upload-trigger-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.trunk-dialog{max-width:720px;width:720px}md-dialog.trunk-dialog md-dialog-content{display:block;position:relative}md-dialog.trunk-dialog md-toolbar .title{font-size:17px}md-dialog.trunk-dialog md-input-container textarea{min-height:150px}md-dialog.trunk-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.trunk-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.trunk-dialog .date-container{padding:16px 0 24px 0}md-dialog.trunk-dialog .error-list{font-size:13px}md-dialog.trunk-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.trunk-dialog .error-list .error .message{font-weight:500}md-dialog.trunk-dialog .error-list .error .md-button{margin:0}md-dialog.trunk-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.trunk-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#tools-trunk .header{height:76px;min-height:76px;max-height:76px}#tools-trunk .header .goto-trunks-button{margin-right:16px}#tools-trunk .header .trunk-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#tools-trunk .header .trunk-image img{height:100%;width:auto;max-width:none}#tools-trunk .header .subtitle{margin:6px 0 0 0}#tools-trunk .trunk-detail-form-container{padding:24px;margin-bottom:24px}#tools-trunk .trunk-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#tools-trunk .trunk-detail-form-container .handle{cursor:move}#tools-trunk .trunk-detail-form-container md-input-container md-switch{margin:0!important}#tools-trunk .trunk-detail-form-container #trunk-image-uploader{position:relative}#tools-trunk .trunk-detail-form-container #trunk-image-uploader.dropping .drop-text{display:flex}#tools-trunk .trunk-detail-form-container #trunk-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#tools-trunk .trunk-detail-form-container #trunk-image-uploader .upload-button{margin-bottom:16px}#tools-trunk .trunk-detail-form-container #trunk-image-uploader .trunk-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#tools-trunk .trunk-detail-form-container #trunk-image-uploader .trunk-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#tools-trunk .trunk-detail-form-container #trunk-image-uploader .trunk-image .media{max-height:100%}#tools-trunk md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#tools-trunk md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#tools-trunk md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#tools-trunk md-table-container.font-size-12 td.md-cell{font-size:12px!important}#trunks{position:relative}#trunks>.header{height:76px;min-height:76px;max-height:76px}#trunks>.header .logo .logo-icon{margin:0 16px 0 0}#trunks>.header .logo .logo-text{font-size:24px}#trunks>.header md-icon{color:#fff}#trunks>.header .search-input-wrapper{position:relative}#trunks>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#trunks>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#trunks>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#trunks>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#trunks>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#trunks>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#trunks>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#trunks>.header.selected-bar .close-button-wrapper{width:244px}#trunks>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#trunks>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#trunks>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#trunks #add-trunk-button{position:fixed;bottom:8px;right:8px;padding:0}#trunks #upload-trunk-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.variable-dialog{max-width:720px;width:720px}md-dialog.variable-dialog md-dialog-content{display:block;position:relative}md-dialog.variable-dialog md-toolbar .title{font-size:17px}md-dialog.variable-dialog md-input-container textarea{min-height:150px}md-dialog.variable-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.variable-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.variable-dialog .date-container{padding:16px 0 24px 0}md-dialog.variable-dialog .error-list{font-size:13px}md-dialog.variable-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.variable-dialog .error-list .error .message{font-weight:500}md-dialog.variable-dialog .error-list .error .md-button{margin:0}md-dialog.variable-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.variable-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#variables{position:relative}#variables>.header{height:76px;min-height:76px;max-height:76px}#variables>.header .logo .logo-icon{margin:0 16px 0 0}#variables>.header .logo .logo-text{font-size:24px}#variables>.header md-icon{color:#fff}#variables>.header .search-input-wrapper{position:relative}#variables>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#variables>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#variables>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#variables>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#variables>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#variables>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#variables>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#variables>.header.selected-bar .close-button-wrapper{width:244px}#variables>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#variables>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#variables>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#variables #add-variable-button{position:fixed;bottom:8px;right:8px;padding:0}#variables #upload-variable-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.screenRecording-dialog{max-width:720px;width:720px}md-dialog.screenRecording-dialog md-dialog-content{display:block;position:relative}md-dialog.screenRecording-dialog md-toolbar .title{font-size:17px}md-dialog.screenRecording-dialog md-input-container textarea{min-height:150px}md-dialog.screenRecording-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.screenRecording-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.screenRecording-dialog .date-container{padding:16px 0 24px 0}md-dialog.screenRecording-dialog .error-list{font-size:13px}md-dialog.screenRecording-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.screenRecording-dialog .error-list .error .message{font-weight:500}md-dialog.screenRecording-dialog .error-list .error .md-button{margin:0}md-dialog.screenRecording-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.screenRecording-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#screenRecordings{position:relative}#screenRecordings>.header{height:76px;min-height:76px;max-height:76px}#screenRecordings>.header .logo .logo-icon{margin:0 16px 0 0}#screenRecordings>.header .logo .logo-text{font-size:24px}#screenRecordings>.header md-icon{color:#fff}#screenRecordings>.header .search-input-wrapper{position:relative}#screenRecordings>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#screenRecordings>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#screenRecordings>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#screenRecordings>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#screenRecordings>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#screenRecordings>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#screenRecordings>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#screenRecordings>.header.selected-bar .close-button-wrapper{width:244px}#screenRecordings>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#screenRecordings>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#screenRecordings>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#screenRecordings #add-screenRecording-button{position:fixed;bottom:8px;right:8px;padding:0}#screenRecordings #upload-screenRecording-button{position:fixed;bottom:8px;right:8px;padding:0}#chanSpies{position:relative}#chanSpies>.header{height:76px;min-height:76px;max-height:76px}#chanSpies>.header .logo .logo-icon{margin:0 16px 0 0}#chanSpies>.header .logo .logo-text{font-size:24px}#chanSpies>.header md-icon{color:#fff}#chanSpies>.header .search-input-wrapper{position:relative}#chanSpies>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#chanSpies>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#chanSpies>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#chanSpies>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#chanSpies>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#chanSpies>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#chanSpies>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#chanSpies>.header.selected-bar .close-button-wrapper{width:244px}#chanSpies>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#chanSpies>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#chanSpies>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#chanSpies #add-chanSpy-button{position:fixed;bottom:8px;right:8px;padding:0}#chanSpies #upload-chanSpy-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.chanSpy-dialog{max-width:720px;width:720px}md-dialog.chanSpy-dialog md-dialog-content{display:block;position:relative}md-dialog.chanSpy-dialog md-toolbar .title{font-size:17px}md-dialog.chanSpy-dialog md-input-container textarea{min-height:150px}md-dialog.chanSpy-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.chanSpy-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.chanSpy-dialog .date-container{padding:16px 0 24px 0}md-dialog.chanSpy-dialog .error-list{font-size:13px}md-dialog.chanSpy-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chanSpy-dialog .error-list .error .message{font-weight:500}md-dialog.chanSpy-dialog .error-list .error .md-button{margin:0}md-dialog.chanSpy-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chanSpy-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#contexts{position:relative}#contexts>.header{height:76px;min-height:76px;max-height:76px}#contexts>.header .logo .logo-icon{margin:0 16px 0 0}#contexts>.header .logo .logo-text{font-size:24px}#contexts>.header md-icon{color:#fff}#contexts>.header .search-input-wrapper{position:relative}#contexts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#contexts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#contexts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#contexts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#contexts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#contexts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#contexts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#contexts>.header.selected-bar .close-button-wrapper{width:244px}#contexts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#contexts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#contexts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#contexts #add-context-button{position:fixed;bottom:8px;right:8px;padding:0}#contexts #upload-context-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.context-dialog{max-width:720px;width:720px}md-dialog.context-dialog md-dialog-content{display:block;position:relative}md-dialog.context-dialog md-toolbar .title{font-size:17px}md-dialog.context-dialog md-input-container textarea{min-height:150px}md-dialog.context-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.context-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.context-dialog .date-container{padding:16px 0 24px 0}md-dialog.context-dialog .error-list{font-size:13px}md-dialog.context-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.context-dialog .error-list .error .message{font-weight:500}md-dialog.context-dialog .error-list .error .md-button{margin:0}md-dialog.context-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.context-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.inboundroute-dialog{max-width:720px;width:720px}md-dialog.inboundroute-dialog md-dialog-content{display:block;position:relative}md-dialog.inboundroute-dialog md-toolbar .title{font-size:17px}md-dialog.inboundroute-dialog md-input-container textarea{min-height:150px}md-dialog.inboundroute-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.inboundroute-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.inboundroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.inboundroute-dialog .error-list{font-size:13px}md-dialog.inboundroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.inboundroute-dialog .error-list .error .message{font-weight:500}md-dialog.inboundroute-dialog .error-list .error .md-button{margin:0}md-dialog.inboundroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.inboundroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.inboundroute-dialog{max-width:720px;width:720px}md-dialog.inboundroute-dialog md-dialog-content{display:block;position:relative}md-dialog.inboundroute-dialog md-toolbar .title{font-size:17px}md-dialog.inboundroute-dialog md-input-container textarea{min-height:150px}md-dialog.inboundroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.inboundroute-dialog .error-list{font-size:13px}md-dialog.inboundroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.inboundroute-dialog .error-list .error .message{font-weight:500}md-dialog.inboundroute-dialog .error-list .error .md-button{margin:0}md-dialog.inboundroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.inboundroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.inboundroute-dialog{max-width:720px;width:720px}md-dialog.inboundroute-dialog md-dialog-content{display:block;position:relative}md-dialog.inboundroute-dialog md-toolbar .title{font-size:17px}md-dialog.inboundroute-dialog md-input-container textarea{min-height:150px}md-dialog.inboundroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.inboundroute-dialog .error-list{font-size:13px}md-dialog.inboundroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.inboundroute-dialog .error-list .error .message{font-weight:500}md-dialog.inboundroute-dialog .error-list .error .md-button{margin:0}md-dialog.inboundroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.inboundroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.inboundroute-dialog{max-width:720px;width:720px}md-dialog.inboundroute-dialog md-dialog-content{display:block;position:relative}md-dialog.inboundroute-dialog md-toolbar .title{font-size:17px}md-dialog.inboundroute-dialog md-input-container textarea{min-height:150px}md-dialog.inboundroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.inboundroute-dialog .error-list{font-size:13px}md-dialog.inboundroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.inboundroute-dialog .error-list .error .message{font-weight:500}md-dialog.inboundroute-dialog .error-list .error .md-button{margin:0}md-dialog.inboundroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.inboundroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.inboundroute-dialog{max-width:720px;width:720px}md-dialog.inboundroute-dialog md-dialog-content{display:block;position:relative}md-dialog.inboundroute-dialog md-toolbar .title{font-size:17px}md-dialog.inboundroute-dialog md-input-container textarea{min-height:150px}md-dialog.inboundroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.inboundroute-dialog .error-list{font-size:13px}md-dialog.inboundroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.inboundroute-dialog .error-list .error .message{font-weight:500}md-dialog.inboundroute-dialog .error-list .error .md-button{margin:0}md-dialog.inboundroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.inboundroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.inboundroute-dialog{max-width:720px;width:720px}md-dialog.inboundroute-dialog md-dialog-content{display:block;position:relative}md-dialog.inboundroute-dialog md-toolbar .title{font-size:17px}md-dialog.inboundroute-dialog md-input-container textarea{min-height:150px}md-dialog.inboundroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.inboundroute-dialog .error-list{font-size:13px}md-dialog.inboundroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.inboundroute-dialog .error-list .error .message{font-weight:500}md-dialog.inboundroute-dialog .error-list .error .md-button{margin:0}md-dialog.inboundroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.inboundroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.inboundroute-dialog{max-width:720px;width:720px}md-dialog.inboundroute-dialog md-dialog-content{display:block;position:relative}md-dialog.inboundroute-dialog md-toolbar .title{font-size:17px}md-dialog.inboundroute-dialog md-input-container textarea{min-height:150px}md-dialog.inboundroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.inboundroute-dialog .error-list{font-size:13px}md-dialog.inboundroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.inboundroute-dialog .error-list .error .message{font-weight:500}md-dialog.inboundroute-dialog .error-list .error .md-button{margin:0}md-dialog.inboundroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.inboundroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.inboundroute-dialog{max-width:720px;width:720px}md-dialog.inboundroute-dialog md-dialog-content{display:block;position:relative}md-dialog.inboundroute-dialog md-toolbar .title{font-size:17px}md-dialog.inboundroute-dialog md-input-container textarea{min-height:150px}md-dialog.inboundroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.inboundroute-dialog .error-list{font-size:13px}md-dialog.inboundroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.inboundroute-dialog .error-list .error .message{font-weight:500}md-dialog.inboundroute-dialog .error-list .error .md-button{margin:0}md-dialog.inboundroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.inboundroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.inboundroute-dialog{max-width:720px;width:720px}md-dialog.inboundroute-dialog md-dialog-content{display:block;position:relative}md-dialog.inboundroute-dialog md-toolbar .title{font-size:17px}md-dialog.inboundroute-dialog md-input-container textarea{min-height:150px}md-dialog.inboundroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.inboundroute-dialog .error-list{font-size:13px}md-dialog.inboundroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.inboundroute-dialog .error-list .error .message{font-weight:500}md-dialog.inboundroute-dialog .error-list .error .md-button{margin:0}md-dialog.inboundroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.inboundroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.inboundroute-dialog{max-width:720px;width:720px}md-dialog.inboundroute-dialog md-dialog-content{display:block;position:relative}md-dialog.inboundroute-dialog md-toolbar .title{font-size:17px}md-dialog.inboundroute-dialog md-input-container textarea{min-height:150px}md-dialog.inboundroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.inboundroute-dialog .error-list{font-size:13px}md-dialog.inboundroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.inboundroute-dialog .error-list .error .message{font-weight:500}md-dialog.inboundroute-dialog .error-list .error .md-button{margin:0}md-dialog.inboundroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.inboundroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.inboundroute-dialog{max-width:720px;width:720px}md-dialog.inboundroute-dialog md-dialog-content{display:block;position:relative}md-dialog.inboundroute-dialog md-toolbar .title{font-size:17px}md-dialog.inboundroute-dialog md-input-container textarea{min-height:150px}md-dialog.inboundroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.inboundroute-dialog .error-list{font-size:13px}md-dialog.inboundroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.inboundroute-dialog .error-list .error .message{font-weight:500}md-dialog.inboundroute-dialog .error-list .error .md-button{margin:0}md-dialog.inboundroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.inboundroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.inboundroute-dialog{max-width:720px;width:720px}md-dialog.inboundroute-dialog md-dialog-content{display:block;position:relative}md-dialog.inboundroute-dialog md-toolbar .title{font-size:17px}md-dialog.inboundroute-dialog md-input-container textarea{min-height:150px}md-dialog.inboundroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.inboundroute-dialog .error-list{font-size:13px}md-dialog.inboundroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.inboundroute-dialog .error-list .error .message{font-weight:500}md-dialog.inboundroute-dialog .error-list .error .md-button{margin:0}md-dialog.inboundroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.inboundroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.inboundroute-dialog{max-width:720px;width:720px}md-dialog.inboundroute-dialog md-dialog-content{display:block;position:relative}md-dialog.inboundroute-dialog md-toolbar .title{font-size:17px}md-dialog.inboundroute-dialog md-input-container textarea{min-height:150px}md-dialog.inboundroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.inboundroute-dialog .error-list{font-size:13px}md-dialog.inboundroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.inboundroute-dialog .error-list .error .message{font-weight:500}md-dialog.inboundroute-dialog .error-list .error .md-button{margin:0}md-dialog.inboundroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.inboundroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.inboundroute-dialog{max-width:720px;width:720px}md-dialog.inboundroute-dialog md-dialog-content{display:block;position:relative}md-dialog.inboundroute-dialog md-toolbar .title{font-size:17px}md-dialog.inboundroute-dialog md-input-container textarea{min-height:150px}md-dialog.inboundroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.inboundroute-dialog .error-list{font-size:13px}md-dialog.inboundroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.inboundroute-dialog .error-list .error .message{font-weight:500}md-dialog.inboundroute-dialog .error-list .error .md-button{margin:0}md-dialog.inboundroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.inboundroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#voice-inboundroute .header{height:76px;min-height:76px;max-height:76px}#voice-inboundroute .header .goto-inboundroutes-button{margin-right:16px}#voice-inboundroute .header .inboundroute-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#voice-inboundroute .header .inboundroute-image img{height:100%;width:auto;max-width:none}#voice-inboundroute .header .subtitle{margin:6px 0 0 0}#voice-inboundroute .inboundroute-detail-form-container{padding:24px;margin-bottom:24px}#voice-inboundroute .inboundroute-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#voice-inboundroute .inboundroute-detail-form-container .handle{cursor:move}#voice-inboundroute .inboundroute-detail-form-container md-input-container md-switch{margin:0!important}#voice-inboundroute .inboundroute-detail-form-container #inboundroute-image-uploader{position:relative}#voice-inboundroute .inboundroute-detail-form-container #inboundroute-image-uploader.dropping .drop-text{display:flex}#voice-inboundroute .inboundroute-detail-form-container #inboundroute-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#voice-inboundroute .inboundroute-detail-form-container #inboundroute-image-uploader .upload-button{margin-bottom:16px}#voice-inboundroute .inboundroute-detail-form-container #inboundroute-image-uploader .inboundroute-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#voice-inboundroute .inboundroute-detail-form-container #inboundroute-image-uploader .inboundroute-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#voice-inboundroute .inboundroute-detail-form-container #inboundroute-image-uploader .inboundroute-image .media{max-height:100%}#voice-inboundroute md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#voice-inboundroute md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#voice-inboundroute md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#voice-inboundroute md-table-container.font-size-12 td.md-cell{font-size:12px!important}#inboundroutes{position:relative}#inboundroutes>.header{height:76px;min-height:76px;max-height:76px}#inboundroutes>.header .logo .logo-icon{margin:0 16px 0 0}#inboundroutes>.header .logo .logo-text{font-size:24px}#inboundroutes>.header md-icon{color:#fff}#inboundroutes>.header .search-input-wrapper{position:relative}#inboundroutes>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#inboundroutes>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#inboundroutes>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#inboundroutes>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#inboundroutes>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#inboundroutes>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#inboundroutes>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#inboundroutes>.header.selected-bar .close-button-wrapper{width:244px}#inboundroutes>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#inboundroutes>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#inboundroutes>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#inboundroutes #add-inboundroute-button{position:fixed;bottom:8px;right:8px;padding:0}#inboundroutes #upload-inboundroute-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.internalroute-dialog{max-width:720px;width:720px}md-dialog.internalroute-dialog md-dialog-content{display:block;position:relative}md-dialog.internalroute-dialog md-toolbar .title{font-size:17px}md-dialog.internalroute-dialog md-input-container textarea{min-height:150px}md-dialog.internalroute-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.internalroute-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.internalroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.internalroute-dialog .error-list{font-size:13px}md-dialog.internalroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.internalroute-dialog .error-list .error .message{font-weight:500}md-dialog.internalroute-dialog .error-list .error .md-button{margin:0}md-dialog.internalroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.internalroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.internalroute-dialog{max-width:720px;width:720px}md-dialog.internalroute-dialog md-dialog-content{display:block;position:relative}md-dialog.internalroute-dialog md-toolbar .title{font-size:17px}md-dialog.internalroute-dialog md-input-container textarea{min-height:150px}md-dialog.internalroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.internalroute-dialog .error-list{font-size:13px}md-dialog.internalroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.internalroute-dialog .error-list .error .message{font-weight:500}md-dialog.internalroute-dialog .error-list .error .md-button{margin:0}md-dialog.internalroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.internalroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.internalroute-dialog{max-width:720px;width:720px}md-dialog.internalroute-dialog md-dialog-content{display:block;position:relative}md-dialog.internalroute-dialog md-toolbar .title{font-size:17px}md-dialog.internalroute-dialog md-input-container textarea{min-height:150px}md-dialog.internalroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.internalroute-dialog .error-list{font-size:13px}md-dialog.internalroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.internalroute-dialog .error-list .error .message{font-weight:500}md-dialog.internalroute-dialog .error-list .error .md-button{margin:0}md-dialog.internalroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.internalroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.internalroute-dialog{max-width:720px;width:720px}md-dialog.internalroute-dialog md-dialog-content{display:block;position:relative}md-dialog.internalroute-dialog md-toolbar .title{font-size:17px}md-dialog.internalroute-dialog md-input-container textarea{min-height:150px}md-dialog.internalroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.internalroute-dialog .error-list{font-size:13px}md-dialog.internalroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.internalroute-dialog .error-list .error .message{font-weight:500}md-dialog.internalroute-dialog .error-list .error .md-button{margin:0}md-dialog.internalroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.internalroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.internalroute-dialog{max-width:720px;width:720px}md-dialog.internalroute-dialog md-dialog-content{display:block;position:relative}md-dialog.internalroute-dialog md-toolbar .title{font-size:17px}md-dialog.internalroute-dialog md-input-container textarea{min-height:150px}md-dialog.internalroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.internalroute-dialog .error-list{font-size:13px}md-dialog.internalroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.internalroute-dialog .error-list .error .message{font-weight:500}md-dialog.internalroute-dialog .error-list .error .md-button{margin:0}md-dialog.internalroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.internalroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.internalroute-dialog{max-width:720px;width:720px}md-dialog.internalroute-dialog md-dialog-content{display:block;position:relative}md-dialog.internalroute-dialog md-toolbar .title{font-size:17px}md-dialog.internalroute-dialog md-input-container textarea{min-height:150px}md-dialog.internalroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.internalroute-dialog .error-list{font-size:13px}md-dialog.internalroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.internalroute-dialog .error-list .error .message{font-weight:500}md-dialog.internalroute-dialog .error-list .error .md-button{margin:0}md-dialog.internalroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.internalroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.internalroute-dialog{max-width:720px;width:720px}md-dialog.internalroute-dialog md-dialog-content{display:block;position:relative}md-dialog.internalroute-dialog md-toolbar .title{font-size:17px}md-dialog.internalroute-dialog md-input-container textarea{min-height:150px}md-dialog.internalroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.internalroute-dialog .error-list{font-size:13px}md-dialog.internalroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.internalroute-dialog .error-list .error .message{font-weight:500}md-dialog.internalroute-dialog .error-list .error .md-button{margin:0}md-dialog.internalroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.internalroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.internalroute-dialog{max-width:720px;width:720px}md-dialog.internalroute-dialog md-dialog-content{display:block;position:relative}md-dialog.internalroute-dialog md-toolbar .title{font-size:17px}md-dialog.internalroute-dialog md-input-container textarea{min-height:150px}md-dialog.internalroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.internalroute-dialog .error-list{font-size:13px}md-dialog.internalroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.internalroute-dialog .error-list .error .message{font-weight:500}md-dialog.internalroute-dialog .error-list .error .md-button{margin:0}md-dialog.internalroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.internalroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.internalroute-dialog{max-width:720px;width:720px}md-dialog.internalroute-dialog md-dialog-content{display:block;position:relative}md-dialog.internalroute-dialog md-toolbar .title{font-size:17px}md-dialog.internalroute-dialog md-input-container textarea{min-height:150px}md-dialog.internalroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.internalroute-dialog .error-list{font-size:13px}md-dialog.internalroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.internalroute-dialog .error-list .error .message{font-weight:500}md-dialog.internalroute-dialog .error-list .error .md-button{margin:0}md-dialog.internalroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.internalroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.internalroute-dialog{max-width:720px;width:720px}md-dialog.internalroute-dialog md-dialog-content{display:block;position:relative}md-dialog.internalroute-dialog md-toolbar .title{font-size:17px}md-dialog.internalroute-dialog md-input-container textarea{min-height:150px}md-dialog.internalroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.internalroute-dialog .error-list{font-size:13px}md-dialog.internalroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.internalroute-dialog .error-list .error .message{font-weight:500}md-dialog.internalroute-dialog .error-list .error .md-button{margin:0}md-dialog.internalroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.internalroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.internalroute-dialog{max-width:720px;width:720px}md-dialog.internalroute-dialog md-dialog-content{display:block;position:relative}md-dialog.internalroute-dialog md-toolbar .title{font-size:17px}md-dialog.internalroute-dialog md-input-container textarea{min-height:150px}md-dialog.internalroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.internalroute-dialog .error-list{font-size:13px}md-dialog.internalroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.internalroute-dialog .error-list .error .message{font-weight:500}md-dialog.internalroute-dialog .error-list .error .md-button{margin:0}md-dialog.internalroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.internalroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.internalroute-dialog{max-width:720px;width:720px}md-dialog.internalroute-dialog md-dialog-content{display:block;position:relative}md-dialog.internalroute-dialog md-toolbar .title{font-size:17px}md-dialog.internalroute-dialog md-input-container textarea{min-height:150px}md-dialog.internalroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.internalroute-dialog .error-list{font-size:13px}md-dialog.internalroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.internalroute-dialog .error-list .error .message{font-weight:500}md-dialog.internalroute-dialog .error-list .error .md-button{margin:0}md-dialog.internalroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.internalroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.internalroute-dialog{max-width:720px;width:720px}md-dialog.internalroute-dialog md-dialog-content{display:block;position:relative}md-dialog.internalroute-dialog md-toolbar .title{font-size:17px}md-dialog.internalroute-dialog md-input-container textarea{min-height:150px}md-dialog.internalroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.internalroute-dialog .error-list{font-size:13px}md-dialog.internalroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.internalroute-dialog .error-list .error .message{font-weight:500}md-dialog.internalroute-dialog .error-list .error .md-button{margin:0}md-dialog.internalroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.internalroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.internalroute-dialog{max-width:720px;width:720px}md-dialog.internalroute-dialog md-dialog-content{display:block;position:relative}md-dialog.internalroute-dialog md-toolbar .title{font-size:17px}md-dialog.internalroute-dialog md-input-container textarea{min-height:150px}md-dialog.internalroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.internalroute-dialog .error-list{font-size:13px}md-dialog.internalroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.internalroute-dialog .error-list .error .message{font-weight:500}md-dialog.internalroute-dialog .error-list .error .md-button{margin:0}md-dialog.internalroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.internalroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#voice-internalroute .header{height:76px;min-height:76px;max-height:76px}#voice-internalroute .header .goto-internalroutes-button{margin-right:16px}#voice-internalroute .header .internalroute-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#voice-internalroute .header .internalroute-image img{height:100%;width:auto;max-width:none}#voice-internalroute .header .subtitle{margin:6px 0 0 0}#voice-internalroute .internalroute-detail-form-container{padding:24px;margin-bottom:24px}#voice-internalroute .internalroute-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#voice-internalroute .internalroute-detail-form-container .handle{cursor:move}#voice-internalroute .internalroute-detail-form-container md-input-container md-switch{margin:0!important}#voice-internalroute .internalroute-detail-form-container #internalroute-image-uploader{position:relative}#voice-internalroute .internalroute-detail-form-container #internalroute-image-uploader.dropping .drop-text{display:flex}#voice-internalroute .internalroute-detail-form-container #internalroute-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#voice-internalroute .internalroute-detail-form-container #internalroute-image-uploader .upload-button{margin-bottom:16px}#voice-internalroute .internalroute-detail-form-container #internalroute-image-uploader .internalroute-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#voice-internalroute .internalroute-detail-form-container #internalroute-image-uploader .internalroute-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#voice-internalroute .internalroute-detail-form-container #internalroute-image-uploader .internalroute-image .media{max-height:100%}#voice-internalroute md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#voice-internalroute md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#voice-internalroute md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#voice-internalroute md-table-container.font-size-12 td.md-cell{font-size:12px!important}#internalroutes{position:relative}#internalroutes>.header{height:76px;min-height:76px;max-height:76px}#internalroutes>.header .logo .logo-icon{margin:0 16px 0 0}#internalroutes>.header .logo .logo-text{font-size:24px}#internalroutes>.header md-icon{color:#fff}#internalroutes>.header .search-input-wrapper{position:relative}#internalroutes>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#internalroutes>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#internalroutes>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#internalroutes>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#internalroutes>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#internalroutes>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#internalroutes>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#internalroutes>.header.selected-bar .close-button-wrapper{width:244px}#internalroutes>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#internalroutes>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#internalroutes>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#internalroutes #add-internalroute-button{position:fixed;bottom:8px;right:8px;padding:0}#internalroutes #upload-internalroute-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.musiconhold-dialog{max-width:720px;width:720px}md-dialog.musiconhold-dialog md-dialog-content{display:block;position:relative}md-dialog.musiconhold-dialog md-toolbar .title{font-size:17px}md-dialog.musiconhold-dialog md-input-container textarea{min-height:150px}md-dialog.musiconhold-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.musiconhold-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.musiconhold-dialog .date-container{padding:16px 0 24px 0}md-dialog.musiconhold-dialog .error-list{font-size:13px}md-dialog.musiconhold-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.musiconhold-dialog .error-list .error .message{font-weight:500}md-dialog.musiconhold-dialog .error-list .error .md-button{margin:0}md-dialog.musiconhold-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.musiconhold-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mohSound-dialog{max-width:720px;width:720px}md-dialog.mohSound-dialog md-dialog-content{display:block;position:relative}md-dialog.mohSound-dialog md-toolbar .title{font-size:17px}md-dialog.mohSound-dialog md-input-container textarea{min-height:150px}md-dialog.mohSound-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.mohSound-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.mohSound-dialog .date-container{padding:16px 0 24px 0}md-dialog.mohSound-dialog .error-list{font-size:13px}md-dialog.mohSound-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mohSound-dialog .error-list .error .message{font-weight:500}md-dialog.mohSound-dialog .error-list .error .md-button{margin:0}md-dialog.mohSound-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mohSound-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#voice-musiconhold .header{height:76px;min-height:76px;max-height:76px}#voice-musiconhold .header .goto-musiconholds-button{margin-right:16px}#voice-musiconhold .header .musiconhold-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#voice-musiconhold .header .musiconhold-image img{height:100%;width:auto;max-width:none}#voice-musiconhold .header .subtitle{margin:6px 0 0 0}#voice-musiconhold .musiconhold-detail-form-container{padding:24px;margin-bottom:24px}#voice-musiconhold .musiconhold-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#voice-musiconhold .musiconhold-detail-form-container .handle{cursor:move}#voice-musiconhold .musiconhold-detail-form-container md-input-container md-switch{margin:0!important}#voice-musiconhold .musiconhold-detail-form-container #musiconhold-image-uploader{position:relative}#voice-musiconhold .musiconhold-detail-form-container #musiconhold-image-uploader.dropping .drop-text{display:flex}#voice-musiconhold .musiconhold-detail-form-container #musiconhold-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#voice-musiconhold .musiconhold-detail-form-container #musiconhold-image-uploader .upload-button{margin-bottom:16px}#voice-musiconhold .musiconhold-detail-form-container #musiconhold-image-uploader .musiconhold-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#voice-musiconhold .musiconhold-detail-form-container #musiconhold-image-uploader .musiconhold-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#voice-musiconhold .musiconhold-detail-form-container #musiconhold-image-uploader .musiconhold-image .media{max-height:100%}#voice-musiconhold md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#voice-musiconhold md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#voice-musiconhold md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#voice-musiconhold md-table-container.font-size-12 td.md-cell{font-size:12px!important}#musiconholds{position:relative}#musiconholds>.header{height:76px;min-height:76px;max-height:76px}#musiconholds>.header .logo .logo-icon{margin:0 16px 0 0}#musiconholds>.header .logo .logo-text{font-size:24px}#musiconholds>.header md-icon{color:#fff}#musiconholds>.header .search-input-wrapper{position:relative}#musiconholds>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#musiconholds>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#musiconholds>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#musiconholds>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#musiconholds>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#musiconholds>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#musiconholds>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#musiconholds>.header.selected-bar .close-button-wrapper{width:244px}#musiconholds>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#musiconholds>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#musiconholds>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#musiconholds #add-musiconhold-button{position:fixed;bottom:8px;right:8px;padding:0}#musiconholds #upload-musiconhold-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.outboundroute-dialog{max-width:720px;width:720px}md-dialog.outboundroute-dialog md-dialog-content{display:block;position:relative}md-dialog.outboundroute-dialog md-toolbar .title{font-size:17px}md-dialog.outboundroute-dialog md-input-container textarea{min-height:150px}md-dialog.outboundroute-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.outboundroute-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.outboundroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.outboundroute-dialog .error-list{font-size:13px}md-dialog.outboundroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.outboundroute-dialog .error-list .error .message{font-weight:500}md-dialog.outboundroute-dialog .error-list .error .md-button{margin:0}md-dialog.outboundroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.outboundroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.outboundroute-dialog{max-width:720px;width:720px}md-dialog.outboundroute-dialog md-dialog-content{display:block;position:relative}md-dialog.outboundroute-dialog md-toolbar .title{font-size:17px}md-dialog.outboundroute-dialog md-input-container textarea{min-height:150px}md-dialog.outboundroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.outboundroute-dialog .error-list{font-size:13px}md-dialog.outboundroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.outboundroute-dialog .error-list .error .message{font-weight:500}md-dialog.outboundroute-dialog .error-list .error .md-button{margin:0}md-dialog.outboundroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.outboundroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.outboundroute-dialog{max-width:720px;width:720px}md-dialog.outboundroute-dialog md-dialog-content{display:block;position:relative}md-dialog.outboundroute-dialog md-toolbar .title{font-size:17px}md-dialog.outboundroute-dialog md-input-container textarea{min-height:150px}md-dialog.outboundroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.outboundroute-dialog .error-list{font-size:13px}md-dialog.outboundroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.outboundroute-dialog .error-list .error .message{font-weight:500}md-dialog.outboundroute-dialog .error-list .error .md-button{margin:0}md-dialog.outboundroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.outboundroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.outboundroute-dialog{max-width:720px;width:720px}md-dialog.outboundroute-dialog md-dialog-content{display:block;position:relative}md-dialog.outboundroute-dialog md-toolbar .title{font-size:17px}md-dialog.outboundroute-dialog md-input-container textarea{min-height:150px}md-dialog.outboundroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.outboundroute-dialog .error-list{font-size:13px}md-dialog.outboundroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.outboundroute-dialog .error-list .error .message{font-weight:500}md-dialog.outboundroute-dialog .error-list .error .md-button{margin:0}md-dialog.outboundroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.outboundroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#voice-outboundroute .header{height:76px;min-height:76px;max-height:76px}#voice-outboundroute .header .goto-outboundroutes-button{margin-right:16px}#voice-outboundroute .header .outboundroute-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#voice-outboundroute .header .outboundroute-image img{height:100%;width:auto;max-width:none}#voice-outboundroute .header .subtitle{margin:6px 0 0 0}#voice-outboundroute .outboundroute-detail-form-container{padding:24px;margin-bottom:24px}#voice-outboundroute .outboundroute-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#voice-outboundroute .outboundroute-detail-form-container .handle{cursor:move}#voice-outboundroute .outboundroute-detail-form-container md-input-container md-switch{margin:0!important}#voice-outboundroute .outboundroute-detail-form-container #outboundroute-image-uploader{position:relative}#voice-outboundroute .outboundroute-detail-form-container #outboundroute-image-uploader.dropping .drop-text{display:flex}#voice-outboundroute .outboundroute-detail-form-container #outboundroute-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#voice-outboundroute .outboundroute-detail-form-container #outboundroute-image-uploader .upload-button{margin-bottom:16px}#voice-outboundroute .outboundroute-detail-form-container #outboundroute-image-uploader .outboundroute-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#voice-outboundroute .outboundroute-detail-form-container #outboundroute-image-uploader .outboundroute-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#voice-outboundroute .outboundroute-detail-form-container #outboundroute-image-uploader .outboundroute-image .media{max-height:100%}#voice-outboundroute md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#voice-outboundroute md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#voice-outboundroute md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#voice-outboundroute md-table-container.font-size-12 td.md-cell{font-size:12px!important}#outboundroutes{position:relative}#outboundroutes>.header{height:76px;min-height:76px;max-height:76px}#outboundroutes>.header .logo .logo-icon{margin:0 16px 0 0}#outboundroutes>.header .logo .logo-text{font-size:24px}#outboundroutes>.header md-icon{color:#fff}#outboundroutes>.header .search-input-wrapper{position:relative}#outboundroutes>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#outboundroutes>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#outboundroutes>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#outboundroutes>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#outboundroutes>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#outboundroutes>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#outboundroutes>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#outboundroutes>.header.selected-bar .close-button-wrapper{width:244px}#outboundroutes>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#outboundroutes>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#outboundroutes>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#outboundroutes #add-outboundroute-button{position:fixed;bottom:8px;right:8px;padding:0}#outboundroutes #upload-outboundroute-button{position:fixed;bottom:8px;right:8px;padding:0}#realtime>.content .blink{animation:blinker 2s linear infinite}#realtime>.content .avatar-wrapper{position:relative}#realtime>.content .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .search-input-wrapper{position:relative;margin-left:20px}#realtime>.content .search-input-wrapper label{padding:6px;cursor:pointer}#realtime>.content .search-input-wrapper md-input-container{padding-top:20px}#realtime>.content .main .labels{padding:8px 16px}#realtime>.content .main .labels .label{margin:0 0 2px 4px;padding:2px 5px;font-size:11px;white-space:nowrap;border-radius:2px}#realtime>.content .main .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .main .avatar-wrapper{position:relative}#realtime>.content .main .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .custom-column{padding:0 24px!important}@keyframes blinker{50%{opacity:0}}md-dialog.voicemail-dialog{max-width:720px;width:720px}md-dialog.voicemail-dialog md-dialog-content{display:block;position:relative}md-dialog.voicemail-dialog md-toolbar .title{font-size:17px}md-dialog.voicemail-dialog md-input-container textarea{min-height:150px}md-dialog.voicemail-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.voicemail-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.voicemail-dialog .date-container{padding:16px 0 24px 0}md-dialog.voicemail-dialog .error-list{font-size:13px}md-dialog.voicemail-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.voicemail-dialog .error-list .error .message{font-weight:500}md-dialog.voicemail-dialog .error-list .error .md-button{margin:0}md-dialog.voicemail-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.voicemail-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#voice-voicemail .header{height:76px;min-height:76px;max-height:76px}#voice-voicemail .header .goto-voicemails-button{margin-right:16px}#voice-voicemail .header .voicemail-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#voice-voicemail .header .voicemail-image img{height:100%;width:auto;max-width:none}#voice-voicemail .header .subtitle{margin:6px 0 0 0}#voice-voicemail .voicemail-detail-form-container{padding:24px;margin-bottom:24px}#voice-voicemail .voicemail-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#voice-voicemail .voicemail-detail-form-container .handle{cursor:move}#voice-voicemail .voicemail-detail-form-container md-input-container md-switch{margin:0!important}#voice-voicemail .voicemail-detail-form-container #voicemail-image-uploader{position:relative}#voice-voicemail .voicemail-detail-form-container #voicemail-image-uploader.dropping .drop-text{display:flex}#voice-voicemail .voicemail-detail-form-container #voicemail-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#voice-voicemail .voicemail-detail-form-container #voicemail-image-uploader .upload-button{margin-bottom:16px}#voice-voicemail .voicemail-detail-form-container #voicemail-image-uploader .voicemail-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#voice-voicemail .voicemail-detail-form-container #voicemail-image-uploader .voicemail-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#voice-voicemail .voicemail-detail-form-container #voicemail-image-uploader .voicemail-image .media{max-height:100%}#voice-voicemail md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#voice-voicemail md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#voice-voicemail md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#voice-voicemail md-table-container.font-size-12 td.md-cell{font-size:12px!important}#voicemails{position:relative}#voicemails>.header{height:76px;min-height:76px;max-height:76px}#voicemails>.header .logo .logo-icon{margin:0 16px 0 0}#voicemails>.header .logo .logo-text{font-size:24px}#voicemails>.header md-icon{color:#fff}#voicemails>.header .search-input-wrapper{position:relative}#voicemails>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#voicemails>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#voicemails>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#voicemails>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#voicemails>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#voicemails>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#voicemails>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#voicemails>.header.selected-bar .close-button-wrapper{width:244px}#voicemails>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#voicemails>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#voicemails>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#voicemails #add-voicemail-button{position:fixed;bottom:8px;right:8px;padding:0}#voicemails #upload-voicemail-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.voicePrefix-dialog{max-width:720px;width:720px}md-dialog.voicePrefix-dialog md-dialog-content{display:block;position:relative}md-dialog.voicePrefix-dialog md-toolbar .title{font-size:17px}md-dialog.voicePrefix-dialog md-input-container textarea{min-height:150px}md-dialog.voicePrefix-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.voicePrefix-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.voicePrefix-dialog .date-container{padding:16px 0 24px 0}md-dialog.voicePrefix-dialog .error-list{font-size:13px}md-dialog.voicePrefix-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.voicePrefix-dialog .error-list .error .message{font-weight:500}md-dialog.voicePrefix-dialog .error-list .error .md-button{margin:0}md-dialog.voicePrefix-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.voicePrefix-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#voicePrefixes{position:relative}#voicePrefixes>.header{height:76px;min-height:76px;max-height:76px}#voicePrefixes>.header .logo .logo-icon{margin:0 16px 0 0}#voicePrefixes>.header .logo .logo-text{font-size:24px}#voicePrefixes>.header md-icon{color:#fff}#voicePrefixes>.header .search-input-wrapper{position:relative}#voicePrefixes>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#voicePrefixes>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#voicePrefixes>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#voicePrefixes>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#voicePrefixes>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#voicePrefixes>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#voicePrefixes>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#voicePrefixes>.header.selected-bar .close-button-wrapper{width:244px}#voicePrefixes>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#voicePrefixes>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#voicePrefixes>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#voicePrefixes #add-voicePrefix-button{position:fixed;bottom:8px;right:8px;padding:0}#voicePrefixes #upload-voicePrefix-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.voiceQueue-dialog{max-width:720px;width:720px}md-dialog.voiceQueue-dialog md-dialog-content{display:block;position:relative}md-dialog.voiceQueue-dialog md-toolbar .title{font-size:17px}md-dialog.voiceQueue-dialog md-input-container textarea{min-height:150px}md-dialog.voiceQueue-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.voiceQueue-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.voiceQueue-dialog .date-container{padding:16px 0 24px 0}md-dialog.voiceQueue-dialog .error-list{font-size:13px}md-dialog.voiceQueue-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.voiceQueue-dialog .error-list .error .message{font-weight:500}md-dialog.voiceQueue-dialog .error-list .error .md-button{margin:0}md-dialog.voiceQueue-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.voiceQueue-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#voice-voiceQueue .header{height:76px;min-height:76px;max-height:76px}#voice-voiceQueue .header .goto-voiceQueues-button{margin-right:16px}#voice-voiceQueue .header .voiceQueue-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#voice-voiceQueue .header .voiceQueue-image img{height:100%;width:auto;max-width:none}#voice-voiceQueue .header .subtitle{margin:6px 0 0 0}#voice-voiceQueue .voiceQueue-detail-form-container{padding:24px;margin-bottom:24px}#voice-voiceQueue .voiceQueue-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#voice-voiceQueue .voiceQueue-detail-form-container .handle{cursor:move}#voice-voiceQueue .voiceQueue-detail-form-container md-input-container md-switch{margin:0!important}#voice-voiceQueue .voiceQueue-detail-form-container #voiceQueue-image-uploader{position:relative}#voice-voiceQueue .voiceQueue-detail-form-container #voiceQueue-image-uploader.dropping .drop-text{display:flex}#voice-voiceQueue .voiceQueue-detail-form-container #voiceQueue-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#voice-voiceQueue .voiceQueue-detail-form-container #voiceQueue-image-uploader .upload-button{margin-bottom:16px}#voice-voiceQueue .voiceQueue-detail-form-container #voiceQueue-image-uploader .voiceQueue-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#voice-voiceQueue .voiceQueue-detail-form-container #voiceQueue-image-uploader .voiceQueue-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#voice-voiceQueue .voiceQueue-detail-form-container #voiceQueue-image-uploader .voiceQueue-image .media{max-height:100%}#voice-voiceQueue md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#voice-voiceQueue md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#voice-voiceQueue md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#voice-voiceQueue md-table-container.font-size-12 td.md-cell{font-size:12px!important}#voiceQueues{position:relative}#voiceQueues>.header{height:76px;min-height:76px;max-height:76px}#voiceQueues>.header .logo .logo-icon{margin:0 16px 0 0}#voiceQueues>.header .logo .logo-text{font-size:24px}#voiceQueues>.header md-icon{color:#fff}#voiceQueues>.header .search-input-wrapper{position:relative}#voiceQueues>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#voiceQueues>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#voiceQueues>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#voiceQueues>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#voiceQueues>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#voiceQueues>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#voiceQueues>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#voiceQueues>.header.selected-bar .close-button-wrapper{width:244px}#voiceQueues>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#voiceQueues>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#voiceQueues>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#voiceQueues #add-voiceQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#voiceQueues #upload-voiceQueue-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.voiceRecording-dialog{max-width:720px;width:720px}md-dialog.voiceRecording-dialog md-dialog-content{display:block;position:relative}md-dialog.voiceRecording-dialog md-toolbar .title{font-size:17px}md-dialog.voiceRecording-dialog md-input-container textarea{min-height:150px}md-dialog.voiceRecording-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.voiceRecording-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.voiceRecording-dialog .date-container{padding:16px 0 24px 0}md-dialog.voiceRecording-dialog .error-list{font-size:13px}md-dialog.voiceRecording-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.voiceRecording-dialog .error-list .error .message{font-weight:500}md-dialog.voiceRecording-dialog .error-list .error .md-button{margin:0}md-dialog.voiceRecording-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.voiceRecording-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#voice-voiceRecording .header{height:76px;min-height:76px;max-height:76px}#voice-voiceRecording .header .goto-voiceRecordings-button{margin-right:16px}#voice-voiceRecording .header .voiceRecording-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#voice-voiceRecording .header .voiceRecording-image img{height:100%;width:auto;max-width:none}#voice-voiceRecording .header .subtitle{margin:6px 0 0 0}#voice-voiceRecording .voiceRecording-detail-form-container{padding:24px;margin-bottom:24px}#voice-voiceRecording .voiceRecording-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#voice-voiceRecording .voiceRecording-detail-form-container .handle{cursor:move}#voice-voiceRecording .voiceRecording-detail-form-container md-input-container md-switch{margin:0!important}#voice-voiceRecording .voiceRecording-detail-form-container #voiceRecording-image-uploader{position:relative}#voice-voiceRecording .voiceRecording-detail-form-container #voiceRecording-image-uploader.dropping .drop-text{display:flex}#voice-voiceRecording .voiceRecording-detail-form-container #voiceRecording-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#voice-voiceRecording .voiceRecording-detail-form-container #voiceRecording-image-uploader .upload-button{margin-bottom:16px}#voice-voiceRecording .voiceRecording-detail-form-container #voiceRecording-image-uploader .voiceRecording-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#voice-voiceRecording .voiceRecording-detail-form-container #voiceRecording-image-uploader .voiceRecording-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#voice-voiceRecording .voiceRecording-detail-form-container #voiceRecording-image-uploader .voiceRecording-image .media{max-height:100%}#voice-voiceRecording md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#voice-voiceRecording md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#voice-voiceRecording md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#voice-voiceRecording md-table-container.font-size-12 td.md-cell{font-size:12px!important}#voice-voiceRecording .sentiment.POSITIVE{color:#4caf50;font-size:25px}#voice-voiceRecording .sentiment.NEGATIVE{color:#f40505;font-size:30px}#voice-voiceRecording .sentiment.NEUTRAL{color:#03a9f4;font-size:30px}#voice-voiceRecording .sentiment.MIXED{color:#9c27b0;font-size:30px}#voiceRecordings{position:relative}#voiceRecordings>.header{height:76px;min-height:76px;max-height:76px}#voiceRecordings>.header .logo .logo-icon{margin:0 16px 0 0}#voiceRecordings>.header .logo .logo-text{font-size:24px}#voiceRecordings>.header md-icon{color:#fff}#voiceRecordings>.header .search-input-wrapper{position:relative}#voiceRecordings>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#voiceRecordings>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#voiceRecordings>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#voiceRecordings>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#voiceRecordings>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#voiceRecordings>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#voiceRecordings>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#voiceRecordings>.header.selected-bar .close-button-wrapper{width:244px}#voiceRecordings>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#voiceRecordings>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#voiceRecordings>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#voiceRecordings #add-voiceRecording-button{position:fixed;bottom:8px;right:8px;padding:0}#voiceRecordings #upload-voiceRecording-button{position:fixed;bottom:8px;right:8px;padding:0}#realtime>.content .blink{animation:blinker 2s linear infinite}#realtime>.content .avatar-wrapper{position:relative}#realtime>.content .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .search-input-wrapper{position:relative;margin-left:20px}#realtime>.content .search-input-wrapper label{padding:6px;cursor:pointer}#realtime>.content .search-input-wrapper md-input-container{padding-top:20px}#realtime>.content .main .labels{padding:8px 16px}#realtime>.content .main .labels .label{margin:0 0 2px 4px;padding:2px 5px;font-size:11px;white-space:nowrap;border-radius:2px}#realtime>.content .main .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .main .avatar-wrapper{position:relative}#realtime>.content .main .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .custom-column{padding:0 24px!important}@keyframes blinker{50%{opacity:0}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.whatsappAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#whatsapp-whatsappAccount .header{height:76px;min-height:76px;max-height:76px}#whatsapp-whatsappAccount .header .goto-whatsappAccounts-button{margin-right:16px}#whatsapp-whatsappAccount .header .whatsappAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#whatsapp-whatsappAccount .header .whatsappAccount-image img{height:100%;width:auto;max-width:none}#whatsapp-whatsappAccount .header .subtitle{margin:6px 0 0 0}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container{padding:24px;margin-bottom:24px}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container .handle{cursor:move}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container md-input-container md-switch{margin:0!important}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container #whatsappAccount-image-uploader{position:relative}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container #whatsappAccount-image-uploader.dropping .drop-text{display:flex}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container #whatsappAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container #whatsappAccount-image-uploader .upload-button{margin-bottom:16px}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container #whatsappAccount-image-uploader .whatsappAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container #whatsappAccount-image-uploader .whatsappAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container #whatsappAccount-image-uploader .whatsappAccount-image .media{max-height:100%}#whatsapp-whatsappAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#whatsapp-whatsappAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#whatsapp-whatsappAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#whatsapp-whatsappAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}md-dialog.whatsappCannedAnswer-dialog{max-width:720px;width:720px}md-dialog.whatsappCannedAnswer-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappCannedAnswer-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappCannedAnswer-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappCannedAnswer-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.whatsappCannedAnswer-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.whatsappCannedAnswer-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappCannedAnswer-dialog .error-list{font-size:13px}md-dialog.whatsappCannedAnswer-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappCannedAnswer-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappCannedAnswer-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappCannedAnswer-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappCannedAnswer-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#whatsappAccounts{position:relative}#whatsappAccounts>.header{height:76px;min-height:76px;max-height:76px}#whatsappAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#whatsappAccounts>.header .logo .logo-text{font-size:24px}#whatsappAccounts>.header md-icon{color:#fff}#whatsappAccounts>.header .search-input-wrapper{position:relative}#whatsappAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#whatsappAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#whatsappAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#whatsappAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#whatsappAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#whatsappAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#whatsappAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#whatsappAccounts>.header.selected-bar .close-button-wrapper{width:244px}#whatsappAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#whatsappAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#whatsappAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#whatsappAccounts #add-whatsappAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#whatsappAccounts #upload-whatsappAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.whatsappQueue-dialog{max-width:720px;width:720px}md-dialog.whatsappQueue-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappQueue-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappQueue-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappQueue-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.whatsappQueue-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.whatsappQueue-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappQueue-dialog .error-list{font-size:13px}md-dialog.whatsappQueue-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappQueue-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappQueue-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappQueue-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappQueue-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#whatsapp-whatsappQueue .header{height:76px;min-height:76px;max-height:76px}#whatsapp-whatsappQueue .header .goto-whatsappQueues-button{margin-right:16px}#whatsapp-whatsappQueue .header .whatsappQueue-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#whatsapp-whatsappQueue .header .whatsappQueue-image img{height:100%;width:auto;max-width:none}#whatsapp-whatsappQueue .header .subtitle{margin:6px 0 0 0}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container{padding:24px;margin-bottom:24px}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container .handle{cursor:move}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container md-input-container md-switch{margin:0!important}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container #whatsappQueue-image-uploader{position:relative}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container #whatsappQueue-image-uploader.dropping .drop-text{display:flex}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container #whatsappQueue-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container #whatsappQueue-image-uploader .upload-button{margin-bottom:16px}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container #whatsappQueue-image-uploader .whatsappQueue-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container #whatsappQueue-image-uploader .whatsappQueue-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container #whatsappQueue-image-uploader .whatsappQueue-image .media{max-height:100%}#whatsapp-whatsappQueue md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#whatsapp-whatsappQueue md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#whatsapp-whatsappQueue md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#whatsapp-whatsappQueue md-table-container.font-size-12 td.md-cell{font-size:12px!important}#whatsappQueues{position:relative}#whatsappQueues>.header{height:76px;min-height:76px;max-height:76px}#whatsappQueues>.header .logo .logo-icon{margin:0 16px 0 0}#whatsappQueues>.header .logo .logo-text{font-size:24px}#whatsappQueues>.header md-icon{color:#fff}#whatsappQueues>.header .search-input-wrapper{position:relative}#whatsappQueues>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#whatsappQueues>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#whatsappQueues>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#whatsappQueues>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#whatsappQueues>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#whatsappQueues>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#whatsappQueues>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#whatsappQueues>.header.selected-bar .close-button-wrapper{width:244px}#whatsappQueues>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#whatsappQueues>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#whatsappQueues>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#whatsappQueues #add-whatsappQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#whatsappQueues #upload-whatsappQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#layout-vertical-navigation-fullwidth-toolbar-2 #vertical-navigation{width:240px;min-width:240px;max-width:240px;overflow-x:hidden;transition:all .3s cubic-bezier(.55,0,.55,.2),width .1s linear,min-width .1s linear,max-width .1s linear;box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12)}#layout-vertical-navigation-fullwidth-toolbar-2 #vertical-navigation .navigation-header{height:64px;min-height:64px;background-color:rgba(255,255,255,.05);padding:0 16px 0 24px}#layout-vertical-navigation-fullwidth-toolbar-2 #vertical-navigation:not(._md-locked-open){box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}@media only screen and (min-width:960px){.ms-navigation-folded #content-container{margin-left:64px}.ms-navigation-folded #layout-vertical-navigation-fullwidth-toolbar-2 #vertical-navigation{position:absolute}.ms-navigation-folded:not(.ms-navigation-folded-open) #layout-vertical-navigation-fullwidth-toolbar-2 #vertical-navigation{position:absolute;width:64px;min-width:64px;max-width:64px}.ms-navigation-folded:not(.ms-navigation-folded-open) #layout-vertical-navigation-fullwidth-toolbar-2 #vertical-navigation .navigation-header{padding:0 16px}.ms-navigation-folded:not(.ms-navigation-folded-open) #layout-vertical-navigation-fullwidth-toolbar-2 #vertical-navigation .navigation-header .logo-text{display:none}}#vertical-navigation{width:240px;min-width:240px;max-width:240px;overflow-x:hidden;transition:all .3s cubic-bezier(.55,0,.55,.2),width .1s linear,min-width .1s linear,max-width .1s linear;box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12)}#vertical-navigation .navigation-header{height:64px;min-height:64px;background-color:rgba(255,255,255,.05);padding:0 16px 0 24px}#vertical-navigation .navigation-header .logo .logo-image{display:block;width:32px;min-width:32px;height:32px;line-height:32px;text-align:center;font-size:16px;font-weight:500;color:#fff;border-radius:2px}#vertical-navigation .navigation-header .logo .logo-text{color:#fff;margin-left:16px;font-size:16px}#vertical-navigation .navigation-header .fold-toggle{transition:transform .3s ease-in-out .1s;transform:rotate(0);margin:0;padding:8px;width:34px!important;height:34px!important;cursor:pointer}#vertical-navigation:not(._md-locked-open){box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}@media only screen and (min-width:960px){.ms-navigation-folded #content-container{margin-left:64px}.ms-navigation-folded #vertical-navigation{position:absolute}.ms-navigation-folded #vertical-navigation .navigation-header .fold-toggle{transform:rotate(180deg);opacity:0}.ms-navigation-folded.ms-navigation-folded-open #vertical-navigation .navigation-header .fold-toggle{transition:transform .3s ease-in-out .1s,opacity .3s ease-in-out .2s;opacity:1}.ms-navigation-folded:not(.ms-navigation-folded-open) #vertical-navigation{position:absolute;width:64px;min-width:64px;max-width:64px}.ms-navigation-folded:not(.ms-navigation-folded-open) #vertical-navigation .navigation-header{padding:0 16px}.ms-navigation-folded:not(.ms-navigation-folded-open) #vertical-navigation .navigation-header .logo-text{display:none}}#quick-panel{width:330px;min-width:330px;max-width:330px;z-index:99}#quick-panel md-content{height:100%}#quick-panel md-content md-tabs{position:static;height:100%}#quick-panel md-content md-tabs md-tabs-wrapper{background-color:rgba(0,0,0,.03);border-bottom:1px solid rgba(0,0,0,.06)}#quick-panel md-content md-tabs md-tabs-wrapper .md-tab{max-width:none!important}#quick-panel md-content md-tabs md-tabs-content-wrapper md-tab-content{height:100%;overflow:hidden}#quick-panel md-content md-tabs md-tabs-content-wrapper md-tab-content>div{overflow:hidden;height:100%}.unread-message-count-chat{position:absolute;top:5px;left:10px;width:18px;height:18px;z-index:10;border-radius:50%;text-align:center;line-height:18px;font-size:10px}@media screen and (max-width:600px){#quick-panel{width:80%;min-width:80%;max-width:80%}}#quick-panel .activity-tab .friends .friend{position:relative}#quick-panel .activity-tab .friends .friend .status{position:absolute;top:8px;left:44px;width:18px;height:18px;z-index:10;border-radius:50%;border:3px solid #fff}#quick-panel .activity-tab .friends .friend .status.online{background-color:#00c853}#quick-panel .activity-tab .friends .friend .status.offline{background-color:#d50000}#quick-panel .activity-tab .friends .friend .status.away{background-color:#ff6d00}#quick-panel .activity-tab .friends .friend .unread-message-count{position:absolute;left:16px;bottom:16px;width:18px;height:18px;z-index:10;border-radius:50%;text-align:center;line-height:18px;font-size:11px}#quick-panel .activity-tab .servers .server .status{margin:24px 20px 28px 8px}#quick-panel .activity-tab .servers .server .status.normal{color:#00c853}#quick-panel .activity-tab .servers .server .status.warn{color:#d50000}#quick-panel .activity-tab .servers .server .status.error{color:#ff6d00}#quick-panel .activity-tab .stat md-progress-linear.normal .md-bar{background-color:#00c853}#quick-panel .activity-tab .stat md-progress-linear.normal .md-container{background-color:rgba(0,200,83,.3)}#quick-panel .activity-tab .stat md-progress-linear.warn .md-bar{background-color:#ff6d00}#quick-panel .activity-tab .stat md-progress-linear.warn .md-container{background-color:rgba(255,109,0,.3)}#quick-panel .activity-tab .stat md-progress-linear.alert .md-bar{background-color:#d50000}#quick-panel .activity-tab .stat md-progress-linear.alert .md-container{background-color:rgba(213,0,0,.3)}#quick-panel .chat-tab .chat,#quick-panel .chat-tab .main{position:absolute;width:100%;top:0;bottom:0}#quick-panel .chat-tab .main .contact{position:relative}#quick-panel .chat-tab .main .contact .status{position:absolute;top:8px;left:44px;width:18px;height:18px;border:3px solid #fff;border-radius:50%;z-index:10}#quick-panel .chat-tab .main .contact .status.online{background-color:#00c853}#quick-panel .chat-tab .main .contact .status.offline{background-color:#d50000}#quick-panel .chat-tab .main .contact .status.away{background-color:#ff6d00}#quick-panel .chat-tab .main .contact .unread-message-count{position:absolute;left:16px;bottom:16px;width:18px;height:18px;z-index:10;border-radius:50%;text-align:center;line-height:18px;font-size:11px}#quick-panel .chat-tab .main .recent .contact .status{top:18px}#quick-panel .chat-tab .chat{max-height:100%;overflow:hidden}#quick-panel .chat-tab .chat .message-row .bubble{position:relative;padding:8px;background-color:#eceff1;border:1px solid #dcdfe1}#quick-panel .chat-tab .chat .message-row .bubble:after,#quick-panel .chat-tab .chat .message-row .bubble:before{content:' ';position:absolute;width:0;height:0}#quick-panel .chat-tab .chat .message-row .bubble:after{left:-7px;right:auto;top:0;bottom:auto;border:11px solid;border-color:#eceff1 transparent transparent transparent}#quick-panel .chat-tab .chat .message-row .bubble:before{left:-9px;right:auto;top:-1px;bottom:auto;border:8px solid;border-color:#dcdfe1 transparent transparent transparent}#quick-panel .chat-tab .chat .message-row .bubble .time{font-size:11px;margin-top:8px}#quick-panel .chat-tab .chat .message-row .bubble .message{word-wrap:break-word}#quick-panel .chat-tab .chat .message-row.contact .avatar{margin:0 16px 0 0}#quick-panel .chat-tab .chat .message-row.user{align-items:flex-end}#quick-panel .chat-tab .chat .message-row.user .avatar{order:2;margin:0 0 0 16px}#quick-panel .chat-tab .chat .message-row.user .bubble{background-color:#e8f5e9;border:1px solid #dfebe0;order:1}#quick-panel .chat-tab .chat .message-row.user .bubble:after{right:-7px;left:auto;top:auto;bottom:0;border-color:transparent transparent #e8f5e9 transparent}#quick-panel .chat-tab .chat .message-row.user .bubble:before{right:-9px;left:auto;top:auto;bottom:-1px;border-color:transparent transparent #dfebe0 transparent}#quick-panel .chat-tab .chat .reply{border-top:1px solid rgba(0,0,0,.12)}#quick-panel .chat-tab .chat .reply textarea{margin:8px;resize:none;padding:8px 16px 8px 8px}md-dialog.group-dialog{max-width:720px;width:720px}md-dialog.group-dialog md-dialog-content{display:block;position:relative}md-dialog.group-dialog md-toolbar .title{font-size:17px}md-dialog.group-dialog md-input-container textarea{min-height:150px}md-dialog.group-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.group-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.group-dialog .date-container{padding:16px 0 24px 0}md-dialog.group-dialog .error-list{font-size:13px}md-dialog.group-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.group-dialog .error-list .error .message{font-weight:500}md-dialog.group-dialog .error-list .error .md-button{margin:0}md-dialog.group-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.group-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#quick-panel .group-tab .chat,#quick-panel .group-tab .main{position:absolute;width:100%;top:0;bottom:0}#quick-panel .group-tab .main .contact{position:relative}#quick-panel .group-tab .main .contact .status{position:absolute;top:8px;left:44px;width:18px;height:18px;border:3px solid #fff;border-radius:50%;z-index:10}#quick-panel .group-tab .main .contact .status.online{background-color:#00c853}#quick-panel .group-tab .main .contact .status.offline{background-color:#d50000}#quick-panel .group-tab .main .contact .status.away{background-color:#ff6d00}#quick-panel .group-tab .main .contact .unread-message-count{position:absolute;left:16px;bottom:16px;width:18px;height:18px;z-index:10;border-radius:50%;text-align:center;line-height:18px;font-size:11px}#quick-panel .group-tab .main .recent .contact .status{top:18px}#quick-panel .group-tab .chat{max-height:100%;overflow:hidden}#quick-panel .group-tab .chat .message-row{padding:8px}#quick-panel .group-tab .chat .message-row .bubble{position:relative;padding:8px;background-color:#eceff1;border:1px solid #dcdfe1}#quick-panel .group-tab .chat .message-row .bubble:after,#quick-panel .group-tab .chat .message-row .bubble:before{content:' ';position:absolute;width:0;height:0}#quick-panel .group-tab .chat .message-row .bubble:after{left:-7px;right:auto;top:0;bottom:auto;border:11px solid;border-color:#eceff1 transparent transparent transparent}#quick-panel .group-tab .chat .message-row .bubble:before{left:-9px;right:auto;top:-1px;bottom:auto;border:8px solid;border-color:#dcdfe1 transparent transparent transparent}#quick-panel .group-tab .chat .message-row .bubble .time{font-size:11px;margin-top:8px}#quick-panel .group-tab .chat .message-row .bubble .message{word-wrap:break-word}#quick-panel .group-tab .chat .message-row.contact .avatar{margin:0 16px 0 0}#quick-panel .group-tab .chat .message-row.user{align-items:flex-end}#quick-panel .group-tab .chat .message-row.user .avatar{order:2;margin:0 0 0 16px}#quick-panel .group-tab .chat .message-row.user .bubble{background-color:#e8f5e9;border:1px solid #dfebe0;order:1}#quick-panel .group-tab .chat .message-row.user .bubble:after{right:-7px;left:auto;top:auto;bottom:0;border-color:transparent transparent #e8f5e9 transparent}#quick-panel .group-tab .chat .message-row.user .bubble:before{right:-9px;left:auto;top:auto;bottom:-1px;border-color:transparent transparent #dfebe0 transparent}#quick-panel .group-tab .chat .reply{border-top:1px solid rgba(0,0,0,.12)}#quick-panel .group-tab .chat .reply textarea{margin:8px;resize:none;padding:8px 16px 8px 8px}md-dialog.group-dialog{max-width:720px;width:720px}md-dialog.group-dialog md-dialog-content{display:block;position:relative}md-dialog.group-dialog md-toolbar .title{font-size:17px}md-dialog.group-dialog md-input-container textarea{min-height:150px}md-dialog.group-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.group-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.group-dialog .date-container{padding:16px 0 24px 0}md-dialog.group-dialog .error-list{font-size:13px}md-dialog.group-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.group-dialog .error-list .error .message{font-weight:500}md-dialog.group-dialog .error-list .error .md-button{margin:0}md-dialog.group-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.group-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#reset-password{height:100%;background:url(/assets/images/backgrounds/tech.png) no-repeat;background-size:cover}#reset-password #reset-password-form-wrapper{flex:1 0 auto;padding:32px}#reset-password #reset-password-form-wrapper #reset-password-form{width:384px;max-width:384px;padding:32px;text-align:center;background:#fff}#reset-password #reset-password-form-wrapper #reset-password-form .logo{width:128px;height:128px;line-height:128px;font-size:86px;font-weight:500;margin:32px auto;color:#fff;border-radius:2px}#reset-password #reset-password-form-wrapper #reset-password-form .title{font-size:17px;margin:16px 0 32px 0}#reset-password #reset-password-form-wrapper #reset-password-form .logo_login{max-height:200px}#reset-password #reset-password-form-wrapper #reset-password-form form{width:100%;text-align:left}#reset-password #reset-password-form-wrapper #reset-password-form form .submit-button{width:220px;margin:16px auto;display:block}#reset-password #reset-password-form-wrapper #reset-password-form .login{margin:32px auto 24px auto;width:250px;font-weight:500}#reset-password #reset-password-form-wrapper #reset-password-form .login .text{margin-right:8px}@media screen and (max-width:600px){#reset-password #reset-password-form-wrapper{padding:16px}#reset-password #reset-password-form-wrapper #reset-password-form{padding:24px;width:100%}#reset-password #reset-password-form-wrapper #reset-password-form form .md-button{width:90%}}md-dialog.preview-dialog{max-width:1020px;width:1020px}md-dialog.preview-dialog md-dialog-content{display:block;position:relative;padding:0}md-dialog.preview-dialog md-toolbar .title{font-size:17px}md-dialog.preview-dialog md-input-container textarea{min-height:150px}md-dialog.preview-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.preview-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.preview-dialog .date-container{padding:16px 0 24px 0}md-dialog.preview-dialog .error-list{font-size:13px}md-dialog.preview-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.preview-dialog .error-list .error .message{font-weight:500}md-dialog.preview-dialog .error-list .error .md-button{margin:0}md-dialog.preview-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.preview-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#toolbar{height:64px;min-height:64px;max-height:64px;z-index:55!important}#toolbar .blink{animation:blinker 2s linear infinite}#toolbar #navigation-toggle{width:64px;min-width:64px;height:64px;margin:0;border-right:1px solid rgba(0,0,0,.12);border-radius:0}#toolbar .logo-image{display:block;width:32px;min-width:32px;height:32px;line-height:32px;text-align:center;font-size:16px;font-weight:500;color:#fff;border-radius:2px;margin-left:10px;margin-right:8px}#toolbar #user-menu{height:64px;padding:0}#toolbar #user-menu md-menu-item .md-button{font-size:15px}#toolbar #user-menu md-menu-item .md-button md-icon{margin:auto 16px auto 0}#toolbar #user-menu .user-button{margin:0;padding:0 16px;height:64px;text-transform:none}#toolbar #user-menu .user-button .avatar-wrapper{position:relative}#toolbar #user-menu .user-button .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#toolbar #user-menu .user-button .username{margin:0 12px 0 8px}#toolbar #language-menu{height:64px}#toolbar #language-menu .language-button{min-width:64px;height:64px;margin:0;padding:0 16px;border-radius:0}#toolbar #language-menu .language-button .iso{text-transform:uppercase}#toolbar #language-menu .language-button .flag{margin-right:8px}#toolbar #quick-panel-toggle{width:64px;height:64px;margin:0;border-radius:0}#toolbar #quick-panel-toggle .unread-message-count{position:absolute;top:8px;left:38px;width:18px;height:18px;z-index:10;border-radius:50%;text-align:center;line-height:18px;font-size:10px}#toolbar .toolbar-separator{height:64px;width:1px;background:rgba(0,0,0,.12)}#language-menu-content md-menu-item .flag{margin-right:16px}#language-message{min-height:88px;max-width:600px}#language-message .md-toast-content{height:90px}.open-contact-count{position:absolute;top:1px;left:25px;width:18px;height:18px;z-index:10;border-radius:50%;text-align:center;line-height:18px;font-size:10px}.md-button.preview-button{min-width:46px;min-height:50px}@media screen and (max-width:600px){#toolbar #user-menu .user-button{min-width:64px;padding:0 2px 0 10px}}.geEditor{font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;font-size:10pt;overflow:hidden;height:100%}.geMenubarContainer .geItem,.geSidebarContainer .geTitle,.geToolbar .geButton,.geToolbar .geLabel{cursor:pointer!important}.geContentEditable div,.geContentEditable table,.geContentEditable table td{border:1px dashed #d3d3d3}.geBackgroundPage{-webkit-box-shadow:0 0 3px 0 #d9d9d9;-moz-box-shadow:0 0 3px 0 #d9d9d9;box-shadow:0 0 3px 0 #d9d9d9}.geMenubarContainer a,.geSidebarContainer a,.geToolbar a{color:#000!important;text-decoration:none}.geDiagramContainer,.geFooterContainer,.geHsplit,.geMenubarContainer,.geOutlineContainer,.geSidebarContainer,.geToolbarContainer,.geVsplit{overflow:hidden;position:absolute;cursor:default}.geDiagramContainer,.geOutlineContainer{background-color:#fff;outline:0}.geMenubar,.geToolbar{white-space:nowrap;display:block;width:100%}.geMenubarContainer .geItem,.geSidebar,.geSidebar .geItem,.geSidebarContainer .geTitle,.geToolbar .geButton,.geToolbar .geLabel,.mxPopupMenuItem{-webkit-transition:all .1s ease-in-out;-moz-transition:all .1s ease-in-out;-o-transition:all .1s ease-in-out;-ms-transition:all .1s ease-in-out;transition:all .1s ease-in-out}.geHint{background-color:#fff;border:1px solid gray;padding:4px 16px 4px 16px;border-radius:3px;-webkit-box-shadow:1px 1px 2px 0 #ddd;-moz-box-shadow:1px 1px 2px 0 #ddd;box-shadow:1px 1px 2px 0 #ddd;opacity:.8}.geStatusAlert{white-space:nowrap;margin-top:-5px;font-size:12px;padding:4px 6px 4px 6px;background-color:#f2dede;border:1px solid #ebccd1;color:#a94442!important;border-radius:3px}.geStatusAlert:hover{background-color:#f1d8d8;border-color:#d6b2b8}.geStatusMessage{white-space:nowrap;margin-top:-5px;padding:4px 6px 4px 6px;font-size:12px;background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#c8e5bc));background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);background-repeat:repeat-x;border:1px solid #b2dba1;border-radius:3px;color:#3c763d!important}.geStatusMessage:hover{background:#c8e5bc;border-color:#b2dba1}.geAlert{position:absolute;white-space:nowrap;padding:14px;background-color:#f2dede;border:1px solid #ebccd1;color:#a94442;border-radius:3px;-webkit-box-shadow:2px 2px 3px 0 #ddd;-moz-box-shadow:2px 2px 3px 0 #ddd;box-shadow:2px 2px 3px 0 #ddd}.geBtn{background-color:#f5f5f5;border-radius:2px;border:1px solid #d8d8d8;color:#333;cursor:default;font-size:11px;font-weight:700;height:29px;line-height:27px;margin:0 0 0 8px;min-width:72px;outline:0;padding:0 8px;cursor:pointer}.geBtn:hover{-webkit-box-shadow:0 1px 1px rgba(0,0,0,.1);-moz-box-shadow:0 1px 1px rgba(0,0,0,.1);box-shadow:0 1px 1px rgba(0,0,0,.1);border:1px solid #c6c6c6;background-color:#f8f8f8;background-image:linear-gradient(#f8f8f8 0,#f1f1f1 100%);color:#111}.geBtn:disabled{opacity:.5}.geBtnUp{background-image:url(data:image/gif;base64,R0lGODlhCgAGAJECAGZmZtXV1f///wAAACH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo0QzM3ODJERjg4NUQxMUU0OTFEQ0E2MzRGQzcwNUY3NCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo0QzM3ODJFMDg4NUQxMUU0OTFEQ0E2MzRGQzcwNUY3NCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjRDMzc4MkREODg1RDExRTQ5MURDQTYzNEZDNzA1Rjc0IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjRDMzc4MkRFODg1RDExRTQ5MURDQTYzNEZDNzA1Rjc0Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAQAAAgAsAAAAAAoABgAAAg6UjwiQBhGYglCKhXFLBQA7);background-position:center center;background-repeat:no-repeat}.geBtnUp:active{background-color:#4d90fe;background-image:linear-gradient(#4d90fe 0,#357ae8 100%)}.geBtnDown{background-image:url(data:image/gif;base64,R0lGODlhCgAGAJECANXV1WZmZv///wAAACH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo0QzM3ODJEQjg4NUQxMUU0OTFEQ0E2MzRGQzcwNUY3NCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo0QzM3ODJEQzg4NUQxMUU0OTFEQ0E2MzRGQzcwNUY3NCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjRDMzc4MkQ5ODg1RDExRTQ5MURDQTYzNEZDNzA1Rjc0IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjRDMzc4MkRBODg1RDExRTQ5MURDQTYzNEZDNzA1Rjc0Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAQAAAgAsAAAAAAoABgAAAg6UjxLLewEiCAnOZBzeBQA7);background-position:center center;background-repeat:no-repeat}.geBtnDown:active{background-color:#4d90fe;background-image:linear-gradient(#4d90fe 0,#357ae8 100%)}.geColorBtn{background-color:#f5f5f5;background-image:linear-gradient(#f5f5f5 0,#e1e1e1 100%);border-radius:4px;border:1px solid rgba(0,0,0,.5);color:#333;cursor:default;margin:0;outline:0;padding:0;cursor:pointer}.geColorBtn:hover{-webkit-box-shadow:0 1px 1px rgba(0,0,0,.1);-moz-box-shadow:0 1px 1px rgba(0,0,0,.1);box-shadow:0 1px 1px rgba(0,0,0,.1);border:1px solid rgba(0,0,0,.7)}.geColorBtn:active{background-color:#4d90fe;background-image:linear-gradient(#4d90fe 0,#357ae8 100%);border:1px solid #2f5bb7;color:#fff}.geColorBtn:disabled{opacity:.5}.gePrimaryBtn{background-color:#4d90fe;background-image:linear-gradient(#4d90fe 0,#4787ed 100%);border:1px solid #3079ed;color:#fff}.gePrimaryBtn:hover{background-color:#357ae8;background-image:linear-gradient(#4d90fe 0,#357ae8 100%);border:1px solid #2f5bb7;color:#fff}.gePrimaryBtn:disabled{opacity:.5}.geAlertLink{color:#843534;font-weight:700;text-decoration:none}.geMenubarContainer{background-color:#fff}.geMenubar{padding:0 2px 0 2px;vertical-align:middle}.geMenubarContainer .geItem,.geToolbar .geItem{padding:6px 8px 6px 8px;cursor:default}.geMenubarContainer .geItem:hover,.geToolbarContainer .geItem:hover{background:#eee}.mxDisabled:hover{background:inherit!important}.geMenubar a.geStatus{color:#b3b3b3;padding-left:6px;display:inline-block;cursor:default!important}.geMenubar a.geStatus:hover{background:0 0}.geMenubarMenu{border:1px solid #d5d5d5!important}.geToolbarContainer{background:#f5f5f5;border-bottom:1px solid #e0e0e0}.geSidebarContainer .geToolbarContainer{background:0 0;border-bottom:none}.geSidebarContainer button{text-overflow:ellipsis;overflow:hidden}.geToolbar{padding:1px 0 0 6px;border-top:1px solid #e0e0e0;-webkit-box-shadow:inset 0 1px 0 0 #fff;-moz-box-shadow:inset 0 1px 0 0 #fff;box-shadow:inset 0 1px 0 0 #fff}.geToolbarContainer .geSeparator{float:left;width:1px;height:34px;background:#e5e5e5;margin-left:6px;margin-right:6px;margin-top:-2px}.geToolbarContainer .geButton{float:left;width:20px;height:20px;padding:0 2px 4px 2px;margin:2px;border:1px solid transparent;cursor:pointer;opacity:.6}.geToolbarContainer .geButton:hover{border:1px solid gray;border-radius:2px;opacity:1;filter:none!important}.geToolbarContainer .geButton:active{border:1px solid #000}div.mxWindow .geButton{margin:-1px 2px 2px 2px;padding:1px 2px 2px 1px}.geToolbarContainer .geLabel{float:left;margin:2px;cursor:pointer;padding:3px 5px 3px 5px;border:1px solid transparent;opacity:.6}.geToolbarContainer .geLabel:hover{border:1px solid gray;border-radius:2px;opacity:.9}.geToolbarContainer .geLabel:active{border:1px solid #000;opacity:1;filter:none!important}.geToolbarContainer .mxDisabled:hover{border:1px solid transparent!important;opacity:.2!important}.geToolbarMenu{border:3px solid #e0e0e0!important;-webkit-box-shadow:none!important;-moz-box-shadow:none!important;box-shadow:none!important;filter:none!important}.geDiagramBackdrop{background-color:#ebebeb;border-style:solid;border-color:#e5e5e5;border-width:1px 0 0 1px}.geSidebarContainer{background:#fff;overflow:hidden;position:absolute;border-top:1px solid #e5e5e5;overflow:auto}.geSidebar{background:#f5f5f5;border-bottom:1px solid #e5e5e5;padding:5px;padding-bottom:12px;overflow:hidden}.geSidebarContainer .geTitle{display:block;font-size:9pt;border-bottom:1px solid #e5e5e5;font-weight:400;padding:6px 0 6px 14px;margin:0;cursor:default;background:#eee;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.4em}.geSidebarContainer .geTitle:hover{background:#e5e5e5}.geTitle img{opacity:.5}.geTitle img:hover{opacity:1}.geSidebar .geItem{display:inline-block;background-repeat:no-repeat;background-position:50% 50%;border:1px solid transparent;border-radius:2px;cursor:move}.geSidebar .geItem:hover{border:1px solid gray!important}.geItem{vertical-align:top;display:inline-block}.geSidebarTooltip{position:absolute;background:#fff;overflow:hidden;border:1px solid gray;border-radius:8px;-webkit-box-shadow:0 0 2px 2px #d5d5d5;-moz-box-shadow:0 0 2px 2px #d5d5d5;box-shadow:0 0 2px 2px #d5d5d5}.geFooterContainer{background:#e5e5e5;border-top:1px solid silver}.geFooterContainer a{font-size:14px;color:#235695;font-weight:700;text-decoration:none}.geFooterContainer table{border-collapse:collapse;margin:0 auto}.geFooterContainer td{border-left:1px solid silver;border-right:1px solid silver}.geFooterContainer td:hover{background-color:#b3b3b3}.geFooterContainer a{display:block;box-sizing:border-box;width:100%;height:100%;padding:11px 42px 11px 42px;white-space:nowrap}.geHsplit{cursor:col-resize;background-color:#e5e5e5;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAHBAMAAADdS/HjAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAHUlEQVQImWMQEGAQFWUQFmYQF2cQEmIQE2MQEQEACy4BF67hpEwAAAAASUVORK5CYII=);background-repeat:no-repeat;background-position:center center}.geVsplit{font-size:1pt;cursor:row-resize;background-color:#e5e5e5;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAEBAMAAACw6DhOAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAFElEQVQImWNgNVdzYBAUFBRggLMAEzYBy29kEPgAAAAASUVORK5CYII=);background-repeat:no-repeat;background-position:center center}.geHsplit:hover,.geVsplit:hover{background-color:#d5d5d5}.geDialog{position:absolute;background:#fff;overflow:hidden;padding:30px;border:1px solid #acacac;-webkit-box-shadow:0 0 2px 2px #d5d5d5;-moz-box-shadow:0 0 2px 2px #d5d5d5;box-shadow:0 0 2px 2px #d5d5d5;z-index:2}.geDialogClose{position:absolute;width:9px;height:9px;opacity:.5;cursor:pointer}.geDialogClose:hover{opacity:1}.geDialogTitle{box-sizing:border-box;white-space:nowrap;background:#e5e5e5;border-bottom:1px solid silver;font-size:15px;font-weight:700;text-align:center;color:#235695}.geDialogFooter{background:#f5f5f5;white-space:nowrap;text-align:right;box-sizing:border-box;border-top:1px solid #e5e5e5;color:#a9a9a9}.geSprite{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAk/CAYAAACauMYVAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAAAsTAAALEwEAmpwYAAABWWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNS40LjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgpMwidZAAAWn0lEQVR4Ae2dW4gdxdbHO0aJYjzxTtR4EhSDSNB84kPEQOL9CB/Ex4igg8iAGCSgiIIQH1SOqJAnn4N4wBdvYBRBcYTIp0+OF0SDYoJRgyAmeA1e5lv/PrM6q6urqqu7a2/3ZP4NPVVdtda/Vv2qZ9Nrd++9i2IE2xJoHn/88XOq/ccff5RtepxSuv7HqxPE0GkNtC+lVH/YjiTSKoi+EaqA9T9OG3OW4xNdu3btHPZY9DGbRqRtYhiozaYhunfvXu95aoVCNjqzhqh2uGWbkLVPFrWRWgFfvSFqnW3dOtt2W7c2Zd2evI3OhAbr34g0wb/VZOGIjuRVagG+nrYuKQ1IgARIgARIgARIgARIoEbAm93BwmYb1mP58uXFoUOHgn6wTUok8K4Ddgj+9NNPxamnnhpNhpNENdL169eXVQj32jB93VUAEaJNxKORBtmEmGIAoNCBfGXS9C1TiLRF6huobNOp24g3b97cQBIU8HX4RJVp2+oH2dgI7aAp56m1Z50ESIAESIAESIAESIAESGCREtBMJXX6SclZqpjaUVRJ5CuPEabI623ii3rvXN/SVeFsgioO4SwRquDElNU7E3ZB+kTX9g5QH036kAAJkAAJkAAJkAAJkMDEEqiupBFh36vpsVxF1yJVnqkRjyVCDaoWaWqE6qzlWCKuRaojp0Y8lgg1qFqkqRGqs5ZjibgWqY6cGvFYItSgWJIACZAACZAACZAACZDAJBHwXknbAENX1bGr6IZoSMQO5KvbQUZyi9M36OC2xvRVMRWDnbb6jmT6FFW8+UoyzcdSlUbCVMVZkgAJkAAJkAAJkAAJTCqB1Pypc/yu8Jo1a6KfhE0eAMI7duyYS/04aJIwBCGsUeL507bPmbYKQwCCFsUgYQjaJ2MHC7uCvim1RVxLzSHY5YPUq1atKvbt21fTQBC9sxN8ltcnCNHGKCnR2g8HP/TQQ+U5/Mgjj1RajUjxiXc4hTYrCJtff/213K19pW4bUfdF7Aree++9tf+0p556qtRrRKribsSuoNr1KhEx9pAzonUjDtmynQRIgARIgARIgARIgASOGQLlNbrN6Hy3LNtm6/ovwC+qtVNom66v3/p7Ux4YuLsrZLNst686tiO5grZPHdCmbzCgzdp4I1VHX6kDou/AgQOFFW7Y25HU0ZauA/ps0mb9O0eq4uvWrWv9OrgaE3XsUmaJNDZgdPp29JiI2xcVdY1Tj72iOLE1SpRJJ7pvRBXRPpwuaLOnjfb5Ste/tPE1Rk9sR9n68/XUgcNDEiABEiABEiABEjgmCTTunMkl4Z65ublVbbM97rjj3v3999+3+uyqLFo7Ifjqq6+ulq1YsqQxJr6huXj77beLe+65Z5/6uGVDFAZysVtcdNFFXlGJrpDfPSp13nrrLczouauvvnpj2TD/x3vNjz5flOooUy8uvPDCDV9//fX/yb3ADc8///we7UMZFEXnn3/+WbzwwgvF559/XiBCbCeccEJx/fXXF4899tiyxx9/fNXpp5++VO4K19bAO/3SW/4goquuuqp4+OGHi08//bQ8vuyyy4rbb7+9ePTRR4svvvjioAyy9a+//jqiPt5y6dKl+z777DNZr6Pb+++/P3fHHXfMSd/cGWecMXf55Zcjc3lfBDZ4RdxGnyjkZ2Zm5q655ppSGOIiOuP66nGUKYx++eWX4pVXXilXfGpqqnjppZcKuZNbyDjrzzvvvJk33njjORXTMioqrIoPPvigPDdxmm3cuLG49tpri5tvvrm47bbbVkj/pp9//vlfL7744nYVRBldKBgsW7asEIbFWWedVZx00kkFBvrtt9/QVZ520r/ihx9+gOjOslH+REWx+hC0G04zWcjimWee2X/OOefsWrFiRfHtt98esjZeUTji39H3D4B29EvfPnkP5eErr7zS6pV1r+h7771XfPXVV0HRjz76qCFkGxqvGHIyPycru9Ia+eoS6az8l9UWyGfHNhIgARIgARIgARIgARLoQKBxfer6fvLJJ899/PHHZb506aWXvnvxxRdvdW3c48aV9O7du/eIUZUW3nXXXStvvPHGZbhUf/rpp1dK/z4VQUp5ySWXHJAHhuMJ75133rlKcqfVJ5988mpJJFYfPnx42ZNPPlk88cQTuPu4DG3og83999+/WjKTKgAdrJFHfffdd8Xs7OxWcd4sD//Ofvnll4UIlzvqDz74YCGPkIvJ7Nbvv/++TCpULFgijZTO1TK1nVI/hJTR3edTyNXnn3/+nIjDvrY1mGqvJAm7pP6iHjvlYee4dhgUffPNN9dLzrQG1sjyZJu56aabZlCZ31ZrxS2DoiI0Jcab4IDMT7bNr7/++gwqSMxuuOGGt1D3bY2F8hnNt22S/Goq0l91BSOtLI5W3paId0mEu+abuk8fGR1OeIlOme4Spip4dChPLRjpdddd1ztF7MLUE5O/aSSioek3/p89MZU2YO5uDVFZnAPyb/kf19B3LIL7pf2Ar49tJEACJEACJEACJEAC/Qh4c1O5sfWhXHz9MyK5Rx51/N9Qf+OqD4abNm36hxQrQk5XXHHFvyQz/PDss8++1GfjFf3xxx+RHm595513tp944ollBq3Octfs3YMHD+6US87/iPAeEd6ofVp6Rec7D956662N+6FHjhz5Hxl055lnnrlUbnduEFR75F5qTTgmWj5d/OyzzxYbNtSCXSaDrsSTx7fccstSYd+46o6KIuKVK1cWuIPeZWsVhZjcyC6++eYbPExcyLQLyZ6jYySJ4pamvFlQ3vPDImKXvCAo3CnlQSaCtzgQKcrQ1kkU2TQ+y3vKKafkiRR5KkSBAnxjWzDSBx54YEpuYJfLftpppxUXXHBBsWbNmkLOzZhe2ecVlYh2Crf9El352iBPG+BxhlIY4ueee24lLJxXvPbaaw9UDVLxrr68f7Lz7rvvxim0Wd548Z6k8q9a6sg7GKdKBaL/Lhvkj1dUOyXQ2fvuu08PG6Xc4C5PM7Hr+ZvkDUk2kAAJkAAJkAAJkAAJkAAJLFYC3vdQXBiS+jRvj4mR3AFO8nf1quPt27d3+qho5RirINpQxK6fN410jTZv3lxOH19Rlm3rEiUGbY1UMucySjzNnW3rGmVrpPqh4G3btnUK0nuehVZ58HnZKTQakwAJkAAJkAAJkAAJkAAJZCBQu+YPXeu3jTOWXKBXpGOJzMXTK1JXZCyR94p0LJG5OHpF6oqMJfJekY4lMhcHj0mABEiABEiABEiABEhgnkDXe1Ktd876kKVomJr9ZmFYYcF6f7uwHUaFswmqOISzRKiCE1NWGV/f9090JsdwFph99bOfp1ZQX/6yna8qqCvdVvKlr40Q+0mABEiABEiABEiABBY8gSqP8s2kLbcK5U4juZL2BTi4rTH9timHRrQoBk3fCtnBBomGZjVI1EZn69EPBsMwNMVQlPAZSaQQDm6xaGJ9I4m0lWksouAU2UECJEACJEACJEACJEACJEACWQnITzuVP5mLDEX3Qff4VCRUWnHYtM4GRvpZaDXGJ7j1B391IHusdt5SPwzs7ZRGDKaitgzZF4gm2Gk65JeuGsKmu55F4wemUjb50a+oWeM9lKi1dAKP/Fhawyz0vkDDkA0kQAIkQAIkQAIkQAIkQAILnkAtkUBe1GdGY0kiapG6UaZGPv5IUyNzZzT+SN0IUiMff6SpkbkzGn+kbgSpkY8lUjc4HpMACZAACZAACZAACZAACaQQaOSmqdf5Vty95h/vQ63u6DYyrYdmlSXS6enpOew6WBZRFdOSokoiXxl8Tjp0uqQMPZKFakRqT3p77qVEqDYjiVTFWZIACZAACZAACZAACZDARBKQa/0P5XeLD0lwbT8Z9E/Ywd6dSONKWn5XV38qO/yLyP9VQQa+Yt6+ptsQrfX2PFjkoo08SjHKyk7JzwtfrceeEovkaY5/2nhKnFb7vNAu+3ZfH9qCkaJTfjB9lxSHZcdT2ftl3yc7tk2YCSq+rXX15eTeKQIzUk75BHxtraI+p7a2hqgszgFx+lMd5Ri/Nr1fSvzrJm0NppJFb5Sp7pGFwI+aHZFfud4KJeFrBfEb8mCMH6FGENxIgARIgARIgARIgARIYHERQNJabnL17E+K1KCltPexWkwXWjc+WWw/XTw4foiBN/YswlYwqzCmqoKp025kfKmOMTuKxuj061s4TPvNj14kQAIkQAIkQAIkQAIkQAIBAqEsL9RuZRZOIsFI7bodra9ahdumRbFjx47qXSCta99R63qtegup3vzfI5w+vva2t4uiCwVnGxXqbYK+ILK0eacfmrY74t8WtRsIj0mABEiABEiABEiABEiABBYBAffWMb6lGd/dnTx1+63Xrpi+eWDLJGE4QBi7dcax+63Y+rXarcJWSOvuF4C7InZ2bl95rEJa4ru4vYZOozuLaMLb9l3cqu1+t3ctN0WEaqjl8uXLi0OHDtXstI8lCZAACZAACZAACZAACZAACTQIuFkfjhtGnoZg1uHLVNS/7Y6ZN49SwW3btpU3CiGCHcfYtF8HaS11yjaLW7t2bTVttEM0FUU5IBzcSKwojHw2NtoGUxXEdF0xOO7du3eJtbFiwbovClfcZ2MFGwu1bt26st8ytQ7arna2L1rXSFRAjXWRdPranlyqcKjstPp2VD29VFiFtF2Prc+g+tiFG6vfJfzZ2dklOAsk6i5utCUBEiABEiABEiABEiCBySGgl+DuNX9bhI2MTx0gpHW3nNws2kaqCVqndEf5WSG33mbT+H4pK+AmuuhDFm1tkuptUUCkzaaRR2l27Ca7GpG2q522t5YaiQqogy4S+rWtU6nCobLT6tuRQ/9R2t5b2A5i62MXbqy+jaatziy6jRD7SYAESIAESIAESOBYJtA9ffHQsDkAUsxoHmX9raNt13opNp9gJIvCOZToarKhAySXbZFaoUGX51bI1ilqaeSpk2kejlZlkTMtX6Xsi0Xolcgya6tXL336emgHaHMO9Zev/FYoR6ShwdhOAiRAAiRAAiRAAscYgZFk0dmupO2FXTZRe+WYbTWtaLZIbXQUtTTy1KvsxK5eHmlRySnK1c+2LJXQSJiOJDetIrWvh9U8elYq0Zznac9Y6EYCJEACJEACJEACC43AIsqid+/eXT41m+2qEYIQU+HBa0/BwQgLMiTDHgSynjZ4UdA924uDvmxp2WOSNRdm0TUcPCABEiABEiABEiCBTgQmK4vWa1m9Uhx870UF9VpWr211gE6s1BjOKqhtg0qNcpCI68woXSL9jnVxsq44F6ffYvi8Jo8lItIdEWc5hSAIMRVGOeScHMldcwTIjQRIgARIgARIgAQWAYHJyqJd4DaLru6duEZdj/VytKtf1N6KZovUjkhRSyNPnUzzcLQqi5wpPxdtTwbWSYAESIAESIAESOBYJTCSLLr6vGlXajYXhS+yaG0bdHkOIU3JVbBrcDX7mMigSGujmAOKGhiZqsHzNLa6vcceIsrV74096DgSpiPJoqtI7UvYkNMJTHgvOnhmsIMESIAESIAESIAESIAESCBEoPYW0tCsRDOc0GBsJwESIAESIAESIAESIAESIAESmFQCyAiHfGYyOC8Ij0RchbOLW2FXfLKy6FikwQWJdVjBLGeDCmYRQ+TugsRmwz4SIAESIAESIAESIAESIAESGD2B7GmPhnxsCE9WFj0yttkXa/IFlSVLEiABEiABEiABEiABEiABEuhEIHu6g9FVFGXWu5LZha2g1m3Ek5NFa3S2tJF2WnU1tmKoDxYc+epniVCnz5IESIAESIAESIAESIAESIAEJoMAUh2boA1OfVxBFbfCtYQ3hQNEQnb6Eebat4vFHEJCvvaRRFp9v5RvRF/byy+/7GsuQu1eY1+ju1h2kXz2bCMBEiABEiABEiABEiABEiCBBUYglh12zvgwdyuo+ahl0lnUCqqQK9xJ1CfoE66JxpzUOVZqxDXRmAP6YoOqIOw6iYaErWAvUVfYFUR/7y2GorcoHUmABEiABEiABEiABEiABEjg7yNg70IOvgNpxZA/2d0n3ppGpiZhNvOriaYKhBZAhWuiPuPUgVQQGq33omEcu8+MPivoCyzaZhfMt0BRZ3aSAAmQAAmQAAmQAAmQAAmQwGQTQKI2klQHwiMRV+Hs4iqoA1gstYQXBl1WVXNS9dPjLho121ikNcPUA52yCqf6Be1U0DIMGqd0ZIssZTDakAAJkAAJkAAJkAAJkAAJkEArgexpD0ZU0awpEMSseJZETUVDwr2zaJsx6yC2DQN22lQETqhjH4xARbMJ2uiyRKiMskaooixJgARIgARIgARIgARIgARIYDIIILvTtMeXS7U+fexOA4L6xDFyUew4HpRGIjJ3IBzb9pF8u5hv0GibjcgahtqtTbAOdtPT0zUEOB7EFKNBAJHpPlgwOAV2kAAJkAAJkAAJkAAJkAAJkMDfQmBQMuaLGIKaS/n6O7epIByzCFtBjaZVGE6xPZQutgprBL6yV6Q+IbfNCg+KMCSMAdy+QcfZBQdFQ2cSIAESIAESIAESIAESIAESyEIAqU5bulN7Tjo2qgrpt2Jt2bKlNO/1bDRutELQl+xqGunenK0Fp1NzS5+gOiYJq7GWfSL9e5hqxFoqGj1mSQIkQAIkQAIkQAIkQAIkQAILmIBmdFmmoGLImwYLWrHBgq7YEMEqNx0iAjzevD9npI01cMUbBkMarPgQHa+vins72UgCJEACJEACJEACJEACJEACIyWgGcnQLLAKcnEJji+LrgDnqGRfJA1q4Qlr5CxJgARIgARIgARIgARIgARIIIlA9rTHCmZJzV3BwaI+wb6i48uiEaHuSSsbM/IhiNkn97nCyY5thla4zZb9JEACJEACJEACJEACJEACJLBACNhUBxkfjgeF7gpqGtlHOCnh9T5YHZlCkmjEv+qyA9e++LuycCrWwenyHlbfe66fIXetQu2uXfDYXaw+ixQUZwcJkAAJkAAJkAAJkAAJkAAJTA4B5KZ9o6nSSCtgBbtme9BpiFpBHaircE3UJ9hHuBKNCapwrLSzqUThEBO2TjFx9NVE0eAT7iLoFXWFuwrCP7j5Ig4as4MESIAESIAESIAESIAESIAEFhYBe2dy8F1JK4Zcyu6p4rU0MjUha8sCK9FUwdAi2oEqURinClsB3yDVvWh0wjh27xl9bYK+Qao2u2CpC1Q5s0ICJEACJEACJEACJEACJEACC4OApj5ZolWx1CwwOqgVGyxoxbQeHT3SWSW8GpXmnnoc8a11qV+tUaODmNZrBkMOVBDiXaNtHdeKtxp3NVDxrn60JwESIAESIAESIAESIAESIIHhBDQjyZZHWcEsolYQ8x0s6goOEQ1m0V1FW7NoCGIbPH2IuAiyiLrC2URdYRxzIwESIAESIAESIAESIAESIIFjgIBNzpBD4bjPtKqnjyGgTxcjz8SO477CZTCh7C7UHptB0heBpQjbLDpJ1DrEImz0gd309HRtYXA8iClGgQCmqvtgwUbobCABEiABEiABEiABEiABEiCBiSCQkuV1ChSCmlN1cgwZqyD6swhbQR10kLBP0BWGTWhX20bpEx4UqY5ghbMIusIYQNuylNkFs0RFERIgARIgARIgARIgARIgARLIRgBpT5/Up3pO2kaiQvqtWFu2bCm7e92Uxc1XCCJ9tIOgrimle8PWtasdxwTVUIUViy3VplHGhFUwJdLRM3VD1+m57TwmgTCB/wdigVA7yGo0NAAAAABJRU5ErkJggg==) no-repeat top left;width:21px;height:21px}.geSprite-actualsize{background-position:0 0}.geSprite-bold{background-position:0 -46px}.geSprite-bottom{background-position:0 -92px}.geSprite-center{background-position:0 -138px}.geSprite-delete{background-position:0 -184px}.geSprite-fillcolor{background-position:0 -230px}.geSprite-fit{background-position:0 -276px}.geSprite-fontcolor{background-position:0 -322px}.geSprite-gradientcolor{background-position:0 -368px}.geSprite-image{background-position:0 -414px}.geSprite-italic{background-position:0 -460px}.geSprite-left{background-position:0 -506px}.geSprite-middle{background-position:0 -552px}.geSprite-print{background-position:0 -598px}.geSprite-redo{background-position:0 -644px}.geSprite-right{background-position:0 -690px}.geSprite-shadow{background-position:0 -736px}.geSprite-strokecolor{background-position:0 -782px}.geSprite-top{background-position:0 -828px}.geSprite-underline{background-position:0 -874px}.geSprite-undo{background-position:0 -920px}.geSprite-zoomin{background-position:0 -966px}.geSprite-zoomout{background-position:0 -1012px}.geSprite-helbow{background-position:0 -1058px}.geSprite-velbow{background-position:0 -1104px}.geSprite-straight{background-position:0 -1150px}.geSprite-entity{background-position:0 -1196px}.geSprite-segment{background-position:0 -1242px}.geSprite-orthogonal{background-position:0 -1288px}.geSprite-noarrow{background-position:0 -1334px}.geSprite-endclassic{background-position:0 -1380px}.geSprite-endopen{background-position:0 -1426px}.geSprite-endblock{background-position:0 -1472px}.geSprite-endoval{background-position:0 -1518px}.geSprite-enddiamond{background-position:0 -1564px}.geSprite-endthindiamond{background-position:0 -1610px}.geSprite-endclassictrans{background-position:0 -1656px}.geSprite-endblocktrans{background-position:0 -1702px}.geSprite-endovaltrans{background-position:0 -1748px}.geSprite-enddiamondtrans{background-position:0 -1794px}.geSprite-endthindiamondtrans{background-position:0 -1840px}.geSprite-startclassic{background-position:0 -1886px}.geSprite-startopen{background-position:0 -1932px}.geSprite-startblock{background-position:0 -1978px}.geSprite-startoval{background-position:0 -2024px}.geSprite-startdiamond{background-position:0 -2070px}.geSprite-startthindiamond{background-position:0 -2116px}.geSprite-startclassictrans{background-position:0 -2162px}.geSprite-startblocktrans{background-position:0 -2208px}.geSprite-startovaltrans{background-position:0 -2254px}.geSprite-startdiamondtrans{background-position:0 -2300px}.geSprite-startthindiamondtrans{background-position:0 -2346px}.geSprite-copy{background-position:0 -410px}.geSprite-cut{background-position:0 -320px}.geSprite-paste{background-position:0 -367px}.geSprite-duplicate{background-position:0 -736px}.geSprite-save{background-position:0 -782px}.geSprite-publish{background-position:0 -92px}.geBaseButton{padding:10px;border-radius:6px;border:1px solid silver;cursor:pointer;background-color:#ececec;background-image:linear-gradient(#ececec 0,#fcfcfc 100%)}.geBaseButton:hover{background:#ececec}.geBigButton{color:#fff;border:none;padding:10px;font-size:14pt;white-space:nowrap;border-radius:6px;text-shadow:#295989 0 1px 0;background-color:#428bca;background-image:linear-gradient(#4687ce 0,#3068a2 100%);-webkit-box-shadow:rgba(255,255,255,.0980392) 0 1px 0 0 inset,rgba(0,0,0,.2) 0 1px 1px 0;-moz-box-shadow:rgba(255,255,255,.0980392) 0 1px 0 0 inset,rgba(0,0,0,.2) 0 1px 1px 0;box-shadow:rgba(255,255,255,.0980392) 0 1px 0 0 inset,rgba(0,0,0,.2) 0 1px 1px 0}.geBigButton:hover{background-color:#2d6ca2;background-image:linear-gradient(#5a94d3 0,#3673b5 100%)}.geBigButton:active{background-color:#3673b5;background-image:none}@media print{div.geNoPrint{display:none!important}}html div.mxRubberband{border-color:#00d;background:#9cf}td.mxPopupMenuIcon div{width:16px;height:16px}html div.mxPopupMenu{-webkit-box-shadow:2px 2px 3px #d5d5d5;-moz-box-shadow:2px 2px 3px #d5d5d5;box-shadow:2px 2px 3px #d5d5d5;background:#fff;position:absolute;border:3px solid #e7e7e7;padding:3px}html table.mxPopupMenu{border-collapse:collapse;margin:0}html td.mxPopupMenuItem{padding:7px 30px 7px 30px;font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;font-size:10pt}html td.mxPopupMenuIcon{background-color:#fff;padding:0}td.mxPopupMenuIcon .geIcon{padding:2px;padding-bottom:4px;margin:2px;border:1px solid transparent;opacity:.5}td.mxPopupMenuIcon .geIcon:hover{border:1px solid gray;border-radius:2px;opacity:1}html tr.mxPopupMenuItemHover{background-color:#eee;color:#000}table.mxPopupMenu hr{color:#ccc;background-color:#ccc;border:none;height:1px}table.mxPopupMenu tr{font-size:4pt}html td.mxWindowTitle{font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;text-align:left;font-size:12px;color:#707070;padding:4px}div.mxTooltip{-webkit-box-shadow:3px 3px 12px silver;-moz-box-shadow:3px 3px 12px silver;box-shadow:3px 3px 12px silver;background:#ffc;border-style:solid;border-width:1px;border-color:#000;font-family:Arial;font-size:8pt;position:absolute;cursor:default;padding:4px;color:#000}body{font-family:Arial Unicode MS,Arial,Helvetica;font-size:10pt} \ No newline at end of file diff --git a/public/styles/app.ea7a1be4.css b/public/styles/app.ea7a1be4.css new file mode 100644 index 0000000..e747992 --- /dev/null +++ b/public/styles/app.ea7a1be4.css @@ -0,0 +1 @@ +[data-ng-click],[ng-click],[x-ng-click]{cursor:pointer}.ms-container{width:100%!important}.ms-container .ms-list{height:380px!important}.ms-container .ms-selectable li.ms-elem-selectable,.ms-container .ms-selection li.ms-elem-selection{padding:6px 12px!important;height:34px!important}md-input-container:not(.md-input-has-value) input:not(:focus){color:inherit!important}.ms-container .ms-search{height:34px;margin-bottom:5px;border:solid 1px #e5e5e5;background-color:#fff;box-shadow:none;width:100%;padding-left:6px}.ms-container .ms-footer{text-align:center}.no-border{border:none!important}.left .motion-spinner{border-top-color:#00d7cc!important;border-left-color:#00d7cc!important}.right .motion-spinner{border-top-color:#00d7cc!important;border-right-color:#00d7cc!important}.md-option-info-text{font-size:10px}md-pagination-wrapper{width:auto!important}md-autocomplete.no-container-margin md-autocomplete-wrap md-input-container{margin:0!important}md-dialog.report-selection-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}md-dialog.advanced-search-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}.md-dialog-action-center{justify-content:center!important}.flag-24{height:24px}button.auto-width{min-width:auto!important}button.size-8{transform:scale(.8)}md-icon.auto-size{height:auto!important;width:auto!important}md-switch.auto-height{height:auto!important}.hidden{visibility:hidden}.user-profile-section-help{background:#fcf20f0f;border:1px solid rgba(0,0,0,.12);padding:5px}.email-preview-message{display:-webkit-box;margin:0 auto;display:block;height:200px;line-height:1.4;-webkit-line-clamp:10;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;word-break:break-all}button.advanced-search.md-accent-bg.md-button.md-default-theme:not([disabled]).md-icon-button:hover{background-color:#0091ea}.blink{animation:blink 2s ease-in infinite}.no-click{pointer-events:none}.spinner-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2;background:rgba(43,43,43,.5)}ms-quick-filter[disabled]{pointer-events:none;opacity:.7}ms-search-bar[disabled]{pointer-events:none;opacity:.7}@keyframes blink{from,to{opacity:1}50%{opacity:0}}textarea.api-key-area{background:0 0;resize:none}.badge{min-width:20px;height:20px;line-height:20px;padding:0 7px;font-size:11px;font-weight:700;border-radius:20px;transition:opacity .2s ease-in-out .1s}md-tooltip.multiline div.md-content{height:auto!important}.auto-margin{margin:auto}md-menu-item md-menu.no-margin button{display:inline-block;border-radius:0;margin:auto 0;font-size:15px;text-transform:none;font-weight:400;height:100%;padding-left:16px;padding-right:16px;width:100%}md-date-range md-menu span.md-select-value{border-bottom-color:rgba(0,0,0,.12)}.keep-on-top{z-index:9999!important}.margin-auto{margin:auto}.xenialab-violet-light-bg{background-color:#9c4fd3!important}.xenialab-violet-light-fg{color:#9c4fd3!important}.no-margin-top{margin-top:0!important}.no-margin-bottom{margin-bottom:0!important}.disabled-button{display:inline-block;position:relative;cursor:default;min-height:36px;min-width:88px;line-height:36px;vertical-align:middle;align-items:center;text-align:center;border-radius:3px;box-sizing:border-box;user-select:none;outline:0;border:0;padding:0 6px;margin:6px 8px;background:rgba(0,0,0,.12);color:rgba(0,0,0,.38);white-space:nowrap;text-transform:uppercase;font-weight:500;font-size:14px;font-style:inherit;font-variant:inherit;font-family:inherit;text-decoration:none;overflow:hidden}@supports (-ms-ime-align:auto){md-tabs{display:inline!important}}@supports (-ms-accelerator:true){md-tabs{display:inline!important}}@supports (-moz-transform:translate(0,0)){md-tabs{display:inline!important}}body[dir=rtl] table.md-table td.md-cell,body[dir=rtl] table.md-table th.md-column{text-align:right!important}body[dir=rtl] table.md-table td.md-cell md-checkbox,body[dir=rtl] table.md-table th.md-column md-checkbox{margin-right:12px!important}body[dir=rtl] .ms-navigation .ms-navigation-node .ms-navigation-item>.ms-navigation-button .icon{margin:0 0 0 16px!important}body[dir=rtl] .ms-navigation .ms-navigation-node .ms-navigation-item>a.ms-navigation-button{padding-right:45px}body[dir=rtl] .md-table-pagination>.buttons{direction:ltr}body[dir=rtl] .md-table-pagination>.buttons>.label{direction:rtl}body[dir=rtl] .header .logo .logo-icon{margin:5px 0 0 15px!important}body[dir=rtl] md-switch .md-container{margin-right:inherit!important}body,html{height:100%;position:relative}body{margin:0;padding:0}[tabindex='-1']:focus{outline:0}.inset{padding:10px}a.md-no-style,button.md-no-style{font-weight:400;background-color:inherit;text-align:left;border:none;padding:0;margin:0}button,input,select,textarea{vertical-align:baseline}button,html input[type=button],input[type=reset],input[type=submit]{cursor:pointer;-webkit-appearance:button}button[disabled],html input[type=button][disabled],input[type=reset][disabled],input[type=submit][disabled]{cursor:default}textarea{vertical-align:top;overflow:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box;-webkit-box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}input:-webkit-autofill{text-shadow:none}.md-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;text-transform:none;width:1px}.md-shadow{position:absolute;top:0;left:0;bottom:0;right:0;border-radius:inherit;pointer-events:none}.md-shadow-bottom-z-1{box-shadow:0 2px 5px 0 rgba(0,0,0,.26)}.md-shadow-bottom-z-2{box-shadow:0 4px 8px 0 rgba(0,0,0,.4)}.md-shadow-animated.md-shadow{transition:box-shadow .28s cubic-bezier(.4,0,.2,1)}.md-ripple-container{pointer-events:none;position:absolute;overflow:hidden;left:0;top:0;width:100%;height:100%;transition:all .55s cubic-bezier(.25,.8,.25,1)}.md-ripple{position:absolute;transform:translate(-50%,-50%) scale(0);transform-origin:50% 50%;opacity:0;border-radius:50%}.md-ripple.md-ripple-placed{transition:margin .9s cubic-bezier(.25,.8,.25,1),border .9s cubic-bezier(.25,.8,.25,1),width .9s cubic-bezier(.25,.8,.25,1),height .9s cubic-bezier(.25,.8,.25,1),opacity .9s cubic-bezier(.25,.8,.25,1),transform .9s cubic-bezier(.25,.8,.25,1)}.md-ripple.md-ripple-scaled{transform:translate(-50%,-50%) scale(1)}.md-ripple.md-ripple-active,.md-ripple.md-ripple-full,.md-ripple.md-ripple-visible{opacity:.2}.md-ripple.md-ripple-remove{animation:md-remove-ripple .9s cubic-bezier(.25,.8,.25,1)}@keyframes md-remove-ripple{0%{opacity:.15}100%{opacity:0}}.md-padding{padding:8px}.md-margin{margin:8px}.md-scroll-mask{position:absolute;background-color:transparent;top:0;right:0;bottom:0;left:0;z-index:50}.md-scroll-mask>.md-scroll-mask-bar{display:block;position:absolute;background-color:#fafafa;right:0;top:0;bottom:0;z-index:65;box-shadow:inset 0 0 1px rgba(0,0,0,.3)}.md-no-momentum{-webkit-overflow-scrolling:auto}.md-no-flicker{-webkit-filter:blur(0)}@media (min-width:960px){.md-padding{padding:16px}}body[dir=ltr],body[dir=rtl],html[dir=ltr],html[dir=rtl]{unicode-bidi:embed}bdo[dir=rtl]{direction:rtl;unicode-bidi:bidi-override}bdo[dir=ltr]{direction:ltr;unicode-bidi:bidi-override}body,html{-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;min-height:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.md-display-4{font-size:112px;font-weight:300;letter-spacing:-.010em;line-height:112px}.md-display-3{font-size:56px;font-weight:400;letter-spacing:-.005em;line-height:56px}.md-display-2{font-size:45px;font-weight:400;line-height:64px}.md-display-1{font-size:34px;font-weight:400;line-height:40px}.md-headline{font-size:24px;font-weight:400;line-height:32px}.md-title{font-size:20px;font-weight:500;letter-spacing:.005em}.md-subhead{font-size:16px;font-weight:400;letter-spacing:.010em;line-height:24px}.md-body-1{font-size:14px;font-weight:400;letter-spacing:.010em;line-height:20px}.md-body-2{font-size:14px;font-weight:500;letter-spacing:.010em;line-height:24px}.md-caption{font-size:12px;letter-spacing:.020em}.md-button{letter-spacing:.010em}button,html,input,select,textarea{font-family:Roboto,"Helvetica Neue",sans-serif}button,input,select,textarea{font-size:100%}@keyframes md-autocomplete-list-out{0%{animation-timing-function:linear}50%{opacity:0;height:40px;animation-timing-function:ease-in}100%{height:0;opacity:0}}@keyframes md-autocomplete-list-in{0%{opacity:0;height:0;animation-timing-function:ease-out}50%{opacity:0;height:40px}100%{opacity:1;height:40px}}md-autocomplete{border-radius:2px;display:block;height:40px;position:relative;overflow:visible;min-width:190px}md-autocomplete[disabled] input{cursor:default}md-autocomplete[md-floating-label]{border-radius:0;background:0 0;height:auto}md-autocomplete[md-floating-label] md-input-container{padding-bottom:0}md-autocomplete[md-floating-label] md-autocomplete-wrap{height:auto}md-autocomplete[md-floating-label] button{position:absolute;top:auto;bottom:0;right:0;width:30px;height:30px}md-autocomplete md-autocomplete-wrap{display:flex;flex-direction:row;box-sizing:border-box;position:relative;overflow:visible;height:40px}md-autocomplete md-autocomplete-wrap.md-menu-showing{z-index:51}md-autocomplete md-autocomplete-wrap input,md-autocomplete md-autocomplete-wrap md-input-container{flex:1 1 0%;box-sizing:border-box;min-width:0}md-autocomplete md-autocomplete-wrap md-progress-linear{position:absolute;bottom:-2px;left:0}md-autocomplete md-autocomplete-wrap md-progress-linear.md-inline{bottom:40px;right:2px;left:2px;width:auto}md-autocomplete md-autocomplete-wrap md-progress-linear .md-mode-indeterminate{position:absolute;top:0;left:0;width:100%;height:3px;transition:none}md-autocomplete md-autocomplete-wrap md-progress-linear .md-mode-indeterminate .md-container{transition:none;height:3px}md-autocomplete md-autocomplete-wrap md-progress-linear .md-mode-indeterminate.ng-enter{transition:opacity .15s linear}md-autocomplete md-autocomplete-wrap md-progress-linear .md-mode-indeterminate.ng-enter.ng-enter-active{opacity:1}md-autocomplete md-autocomplete-wrap md-progress-linear .md-mode-indeterminate.ng-leave{transition:opacity .15s linear}md-autocomplete md-autocomplete-wrap md-progress-linear .md-mode-indeterminate.ng-leave.ng-leave-active{opacity:0}md-autocomplete input:not(.md-input){font-size:14px;box-sizing:border-box;border:none;box-shadow:none;outline:0;background:0 0;width:100%;padding:0 15px;line-height:40px;height:40px}md-autocomplete input:not(.md-input)::-ms-clear{display:none}md-autocomplete button{position:relative;line-height:20px;text-align:center;width:30px;height:30px;cursor:pointer;border:none;border-radius:50%;padding:0;font-size:12px;background:0 0;margin:auto 5px}md-autocomplete button:after{content:'';position:absolute;top:-6px;right:-6px;bottom:-6px;left:-6px;border-radius:50%;transform:scale(0);opacity:0;transition:all .4s cubic-bezier(.25,.8,.25,1)}md-autocomplete button:focus{outline:0}md-autocomplete button:focus:after{transform:scale(1);opacity:1}md-autocomplete button md-icon{position:absolute;top:50%;left:50%;transform:translate3d(-50%,-50%,0) scale(.9)}md-autocomplete button md-icon path{stroke-width:0}md-autocomplete button.ng-enter{transform:scale(0);transition:transform .15s ease-out}md-autocomplete button.ng-enter.ng-enter-active{transform:scale(1)}md-autocomplete button.ng-leave{transition:transform .15s ease-out}md-autocomplete button.ng-leave.ng-leave-active{transform:scale(0)}@media screen and (-ms-high-contrast:active){md-autocomplete input{border:1px solid #fff}md-autocomplete li:focus{color:#fff}}.md-virtual-repeat-container.md-autocomplete-suggestions-container{position:absolute;box-shadow:0 2px 5px rgba(0,0,0,.25);height:225.5px;max-height:225.5px;z-index:100}.md-virtual-repeat-container.md-not-found{height:48px}.md-autocomplete-suggestions{margin:0;list-style:none;padding:0}.md-autocomplete-suggestions li{font-size:14px;overflow:hidden;padding:0 15px;line-height:48px;height:48px;transition:background .15s linear;margin:0;white-space:nowrap;text-overflow:ellipsis}.md-autocomplete-suggestions li:focus{outline:0}.md-autocomplete-suggestions li:not(.md-not-found-wrapper){cursor:pointer}@media screen and (-ms-high-contrast:active){.md-autocomplete-suggestions,md-autocomplete{border:1px solid #fff}}md-backdrop{transition:opacity 450ms;position:absolute;top:0;bottom:0;left:0;right:0;z-index:50}md-backdrop.md-menu-backdrop{position:fixed!important;z-index:99}md-backdrop.md-select-backdrop{z-index:81;transition-duration:0}md-backdrop.md-dialog-backdrop{z-index:79}md-backdrop.md-bottom-sheet-backdrop{z-index:69}md-backdrop.md-sidenav-backdrop{z-index:59}md-backdrop.md-click-catcher{position:absolute}md-backdrop.md-opaque{opacity:.48}md-backdrop.md-opaque.ng-enter{opacity:0}md-backdrop.md-opaque.ng-enter.md-opaque.ng-enter-active{opacity:.48}md-backdrop.md-opaque.ng-leave{opacity:.48;transition:opacity .4s}md-backdrop.md-opaque.ng-leave.md-opaque.ng-leave-active{opacity:0}md-bottom-sheet{position:absolute;left:0;right:0;bottom:0;padding:8px 16px 88px 16px;z-index:70;border-top-width:1px;border-top-style:solid;transform:translate3d(0,80px,0);transition:all .4s cubic-bezier(.25,.8,.25,1);transition-property:transform}md-bottom-sheet.md-has-header{padding-top:0}md-bottom-sheet.ng-enter{opacity:0;transform:translate3d(0,100%,0)}md-bottom-sheet.ng-enter-active{opacity:1;display:block;transform:translate3d(0,80px,0)!important}md-bottom-sheet.ng-leave-active{transform:translate3d(0,100%,0)!important;transition:all .3s cubic-bezier(.55,0,.55,.2)}md-bottom-sheet .md-subheader{background-color:transparent;font-family:Roboto,"Helvetica Neue",sans-serif;line-height:56px;padding:0;white-space:nowrap}md-bottom-sheet md-inline-icon{display:inline-block;height:24px;width:24px;fill:#444}md-bottom-sheet md-list-item{display:flex;outline:0}md-bottom-sheet md-list-item:hover{cursor:pointer}md-bottom-sheet.md-list md-list-item{padding:0;align-items:center;height:48px}md-bottom-sheet.md-grid{padding-left:24px;padding-right:24px;padding-top:0}md-bottom-sheet.md-grid md-list{display:flex;flex-direction:row;flex-wrap:wrap;transition:all .5s;align-items:center}md-bottom-sheet.md-grid md-list-item{flex-direction:column;align-items:center;transition:all .5s;height:96px;margin-top:8px;margin-bottom:8px}@media (max-width:960px){md-bottom-sheet.md-grid md-list-item{flex:1 1 33.3333333333%;max-width:33.3333333333%}md-bottom-sheet.md-grid md-list-item:nth-of-type(3n+1){align-items:flex-start}md-bottom-sheet.md-grid md-list-item:nth-of-type(3n){align-items:flex-end}}@media (min-width:960px) and (max-width:1279px){md-bottom-sheet.md-grid md-list-item{flex:1 1 25%;max-width:25%}}@media (min-width:1280px) and (max-width:1919px){md-bottom-sheet.md-grid md-list-item{flex:1 1 16.6666666667%;max-width:16.6666666667%}}@media (min-width:1920px){md-bottom-sheet.md-grid md-list-item{flex:1 1 14.2857142857%;max-width:14.2857142857%}}md-bottom-sheet.md-grid md-list-item::before{display:none}md-bottom-sheet.md-grid md-list-item .md-list-item-content{display:flex;flex-direction:column;align-items:center;width:48px;padding-bottom:16px}md-bottom-sheet.md-grid md-list-item .md-grid-item-content{border:1px solid transparent;display:flex;flex-direction:column;align-items:center;width:80px}md-bottom-sheet.md-grid md-list-item .md-grid-text{font-weight:400;line-height:16px;font-size:13px;margin:0;white-space:nowrap;width:64px;text-align:center;text-transform:none;padding-top:8px}@media screen and (-ms-high-contrast:active){md-bottom-sheet{border:1px solid #fff}}button.md-button::-moz-focus-inner{border:0}.md-button{display:inline-block;position:relative;cursor:pointer;min-height:36px;min-width:88px;line-height:36px;vertical-align:middle;align-items:center;text-align:center;border-radius:3px;box-sizing:border-box;user-select:none;outline:0;border:0;padding:0 6px;margin:6px 8px;background:0 0;color:currentColor;white-space:nowrap;text-transform:uppercase;font-weight:500;font-size:14px;font-style:inherit;font-variant:inherit;font-family:inherit;text-decoration:none;overflow:hidden;transition:box-shadow .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1)}.md-button:focus{outline:0}.md-button:focus,.md-button:hover{text-decoration:none}.md-button.ng-hide,.md-button.ng-leave{transition:none}.md-button.md-cornered{border-radius:0}.md-button.md-icon{padding:0;background:0 0}.md-button.md-raised:not([disabled]){box-shadow:0 2px 5px 0 rgba(0,0,0,.26)}.md-button.md-icon-button{margin:0 6px;height:40px;min-width:0;line-height:24px;padding:8px;width:40px;border-radius:50%}.md-button.md-icon-button .md-ripple-container{border-radius:50%;background-clip:padding-box;overflow:hidden;-webkit-mask-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC)}.md-button.md-fab{z-index:20;line-height:56px;min-width:0;width:56px;height:56px;vertical-align:middle;box-shadow:0 2px 5px 0 rgba(0,0,0,.26);border-radius:50%;background-clip:padding-box;overflow:hidden;transition:all .3s cubic-bezier(.55,0,.55,.2);transition-property:background-color,box-shadow,transform}.md-button.md-fab.md-fab-bottom-right{top:auto;right:20px;bottom:20px;left:auto;position:absolute}.md-button.md-fab.md-fab-bottom-left{top:auto;right:auto;bottom:20px;left:20px;position:absolute}.md-button.md-fab.md-fab-top-right{top:20px;right:20px;bottom:auto;left:auto;position:absolute}.md-button.md-fab.md-fab-top-left{top:20px;right:auto;bottom:auto;left:20px;position:absolute}.md-button.md-fab .md-ripple-container{border-radius:50%;background-clip:padding-box;overflow:hidden;-webkit-mask-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC)}.md-button.md-fab.md-mini{line-height:40px;width:40px;height:40px}.md-button.md-fab.ng-hide,.md-button.md-fab.ng-leave{transition:none}.md-button:not([disabled]).md-fab.md-focused,.md-button:not([disabled]).md-raised.md-focused{box-shadow:0 2px 5px 0 rgba(0,0,0,.26)}.md-button:not([disabled]).md-fab:active,.md-button:not([disabled]).md-raised:active{box-shadow:0 4px 8px 0 rgba(0,0,0,.4)}.md-button .md-ripple-container{border-radius:3px;background-clip:padding-box;overflow:hidden;-webkit-mask-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC)}.md-button.md-icon-button md-icon,button.md-button.md-fab md-icon{display:block}.md-toast-open-top .md-button.md-fab-top-left,.md-toast-open-top .md-button.md-fab-top-right{transition:all .4s cubic-bezier(.25,.8,.25,1);transform:translate3d(0,42px,0)}.md-toast-open-top .md-button.md-fab-top-left:not([disabled]).md-focused,.md-toast-open-top .md-button.md-fab-top-left:not([disabled]):hover,.md-toast-open-top .md-button.md-fab-top-right:not([disabled]).md-focused,.md-toast-open-top .md-button.md-fab-top-right:not([disabled]):hover{transform:translate3d(0,41px,0)}.md-toast-open-bottom .md-button.md-fab-bottom-left,.md-toast-open-bottom .md-button.md-fab-bottom-right{transition:all .4s cubic-bezier(.25,.8,.25,1);transform:translate3d(0,-42px,0)}.md-toast-open-bottom .md-button.md-fab-bottom-left:not([disabled]).md-focused,.md-toast-open-bottom .md-button.md-fab-bottom-left:not([disabled]):hover,.md-toast-open-bottom .md-button.md-fab-bottom-right:not([disabled]).md-focused,.md-toast-open-bottom .md-button.md-fab-bottom-right:not([disabled]):hover{transform:translate3d(0,-43px,0)}.md-button-group{display:flex;flex:1;width:100%}.md-button-group>.md-button{flex:1;display:block;overflow:hidden;width:0;border-width:1px 0 1px 1px;border-radius:0;text-align:center;text-overflow:ellipsis;white-space:nowrap}.md-button-group>.md-button:first-child{border-radius:2px 0 0 2px}.md-button-group>.md-button:last-child{border-right-width:1px;border-radius:0 2px 2px 0}@media screen and (-ms-high-contrast:active){.md-button.md-fab,.md-button.md-raised{border:1px solid #fff}}md-card{box-sizing:border-box;display:flex;flex-direction:column;margin:8px;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}md-card md-card-header{padding:16px;display:flex;flex-direction:row}md-card md-card-header:first-child md-card-avatar{margin-right:12px}[dir=rtl] md-card md-card-header:first-child md-card-avatar{margin-right:auto;margin-left:12px}md-card md-card-header:last-child md-card-avatar{margin-left:12px}[dir=rtl] md-card md-card-header:last-child md-card-avatar{margin-left:auto;margin-right:12px}md-card md-card-header md-card-avatar{width:40px;height:40px}md-card md-card-header md-card-avatar .md-user-avatar,md-card md-card-header md-card-avatar md-icon{border-radius:50%}md-card md-card-header md-card-avatar md-icon{padding:8px}md-card md-card-header md-card-avatar+md-card-header-text{max-height:40px}md-card md-card-header md-card-avatar+md-card-header-text .md-title{font-size:14px}md-card md-card-header md-card-header-text{display:flex;flex:1;flex-direction:column}md-card md-card-header md-card-header-text .md-subhead{font-size:14px}md-card md-card-title-media img,md-card>img,md-card>md-card-header img{box-sizing:border-box;display:flex;flex:0 0 auto;width:100%;height:auto}md-card md-card-title{padding:24px 16px 16px;display:flex;flex:1 1 auto;flex-direction:row}md-card md-card-title+md-card-content{padding-top:0}md-card md-card-title md-card-title-text{flex:1;flex-direction:column;display:flex}md-card md-card-title md-card-title-text .md-subhead{padding-top:0;font-size:14px}md-card md-card-title md-card-title-text:only-child .md-subhead{padding-top:12px}md-card md-card-title md-card-title-media{margin-top:-8px}md-card md-card-title md-card-title-media .md-media-sm{height:80px;width:80px}md-card md-card-title md-card-title-media .md-media-md{height:112px;width:112px}md-card md-card-title md-card-title-media .md-media-lg{height:152px;width:152px}md-card md-card-content{display:block;padding:16px}md-card md-card-content>p:first-child{margin-top:0}md-card md-card-content>p:last-child{margin-bottom:0}md-card md-card-content .md-media-xl{height:240px;width:240px}md-card .md-actions,md-card md-card-actions{margin:8px}md-card .md-actions.layout-column .md-button:not(.md-icon-button),md-card md-card-actions.layout-column .md-button:not(.md-icon-button){margin:2px 0}md-card .md-actions.layout-column .md-button:not(.md-icon-button):first-of-type,md-card md-card-actions.layout-column .md-button:not(.md-icon-button):first-of-type{margin-top:0}md-card .md-actions.layout-column .md-button:not(.md-icon-button):last-of-type,md-card md-card-actions.layout-column .md-button:not(.md-icon-button):last-of-type{margin-bottom:0}md-card .md-actions.layout-column .md-button.md-icon-button,md-card md-card-actions.layout-column .md-button.md-icon-button{margin-top:6px;margin-bottom:6px}md-card .md-actions md-card-icon-actions,md-card md-card-actions md-card-icon-actions{flex:1;justify-content:flex-start;display:flex;flex-direction:row}md-card .md-actions:not(.layout-column) .md-button:not(.md-icon-button),md-card md-card-actions:not(.layout-column) .md-button:not(.md-icon-button){margin:0 4px}md-card .md-actions:not(.layout-column) .md-button:not(.md-icon-button):first-of-type,md-card md-card-actions:not(.layout-column) .md-button:not(.md-icon-button):first-of-type{margin-left:0}[dir=rtl] md-card .md-actions:not(.layout-column) .md-button:not(.md-icon-button):first-of-type,[dir=rtl] md-card md-card-actions:not(.layout-column) .md-button:not(.md-icon-button):first-of-type{margin-left:auto;margin-right:0}md-card .md-actions:not(.layout-column) .md-button:not(.md-icon-button):last-of-type,md-card md-card-actions:not(.layout-column) .md-button:not(.md-icon-button):last-of-type{margin-right:0}[dir=rtl] md-card .md-actions:not(.layout-column) .md-button:not(.md-icon-button):last-of-type,[dir=rtl] md-card md-card-actions:not(.layout-column) .md-button:not(.md-icon-button):last-of-type{margin-right:auto;margin-left:0}md-card .md-actions:not(.layout-column) .md-button.md-icon-button,md-card md-card-actions:not(.layout-column) .md-button.md-icon-button{margin-left:6px;margin-right:6px}md-card .md-actions:not(.layout-column) .md-button.md-icon-button:first-of-type,md-card md-card-actions:not(.layout-column) .md-button.md-icon-button:first-of-type{margin-left:12px}[dir=rtl] md-card .md-actions:not(.layout-column) .md-button.md-icon-button:first-of-type,[dir=rtl] md-card md-card-actions:not(.layout-column) .md-button.md-icon-button:first-of-type{margin-left:auto;margin-right:12px}md-card .md-actions:not(.layout-column) .md-button.md-icon-button:last-of-type,md-card md-card-actions:not(.layout-column) .md-button.md-icon-button:last-of-type{margin-right:12px}[dir=rtl] md-card .md-actions:not(.layout-column) .md-button.md-icon-button:last-of-type,[dir=rtl] md-card md-card-actions:not(.layout-column) .md-button.md-icon-button:last-of-type{margin-right:auto;margin-left:12px}md-card .md-actions:not(.layout-column) .md-button+md-card-icon-actions,md-card md-card-actions:not(.layout-column) .md-button+md-card-icon-actions{flex:1;justify-content:flex-end;display:flex;flex-direction:row}md-card md-card-footer{margin-top:auto;padding:16px}@media screen and (-ms-high-contrast:active){md-card{border:1px solid #fff}}.md-image-no-fill>img{width:auto;height:auto}.md-contact-chips .md-chips md-chip{padding:0 25px 0 0}[dir=rtl] .md-contact-chips .md-chips md-chip{padding:0 0 0 25px}.md-contact-chips .md-chips md-chip .md-contact-avatar{float:left}[dir=rtl] .md-contact-chips .md-chips md-chip .md-contact-avatar{float:right}.md-contact-chips .md-chips md-chip .md-contact-avatar img{height:32px;border-radius:16px}.md-contact-chips .md-chips md-chip .md-contact-name{display:inline-block;height:32px;margin-left:8px}[dir=rtl] .md-contact-chips .md-chips md-chip .md-contact-name{margin-left:auto;margin-right:8px}.md-contact-suggestion{height:56px}.md-contact-suggestion img{height:40px;border-radius:20px;margin-top:8px}.md-contact-suggestion .md-contact-name{margin-left:8px;width:120px}[dir=rtl] .md-contact-suggestion .md-contact-name{margin-left:auto;margin-right:8px}.md-contact-suggestion .md-contact-email,.md-contact-suggestion .md-contact-name{display:inline-block;overflow:hidden;text-overflow:ellipsis}.md-contact-chips-suggestions li{height:100%}.md-chips{display:block;font-family:Roboto,"Helvetica Neue",sans-serif;font-size:16px;padding:0 0 8px 3px;vertical-align:middle}.md-chips:after{content:'';display:table;clear:both}[dir=rtl] .md-chips{padding:0 3px 8px 0}.md-chips.md-readonly .md-chip-input-container{min-height:32px}.md-chips:not(.md-readonly){cursor:text}.md-chips.md-removable md-chip{padding-right:22px}[dir=rtl] .md-chips.md-removable md-chip{padding-right:0;padding-left:22px}.md-chips.md-removable md-chip .md-chip-content{padding-right:4px}[dir=rtl] .md-chips.md-removable md-chip .md-chip-content{padding-right:0;padding-left:4px}.md-chips md-chip{cursor:default;border-radius:16px;display:block;height:32px;line-height:32px;margin:8px 8px 0 0;padding:0 12px 0 12px;float:left;box-sizing:border-box;max-width:100%;position:relative}[dir=rtl] .md-chips md-chip{margin:8px 0 0 8px}[dir=rtl] .md-chips md-chip{float:right}.md-chips md-chip .md-chip-content{display:block;float:left;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}[dir=rtl] .md-chips md-chip .md-chip-content{float:right}.md-chips md-chip .md-chip-content:focus{outline:0}.md-chips md-chip._md-chip-content-edit-is-enabled{-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;-ms-user-select:none}.md-chips md-chip .md-chip-remove-container{position:absolute;right:0;line-height:22px}[dir=rtl] .md-chips md-chip .md-chip-remove-container{right:auto;left:0}.md-chips md-chip .md-chip-remove{text-align:center;width:32px;height:32px;min-width:0;padding:0;background:0 0;border:none;box-shadow:none;margin:0;position:relative}.md-chips md-chip .md-chip-remove md-icon{height:18px;width:18px;position:absolute;top:50%;left:50%;transform:translate3d(-50%,-50%,0)}.md-chips .md-chip-input-container{display:block;line-height:32px;margin:8px 8px 0 0;padding:0;float:left}[dir=rtl] .md-chips .md-chip-input-container{margin:8px 0 0 8px}[dir=rtl] .md-chips .md-chip-input-container{float:right}.md-chips .md-chip-input-container input:not([type]),.md-chips .md-chip-input-container input[type=email],.md-chips .md-chip-input-container input[type=number],.md-chips .md-chip-input-container input[type=tel],.md-chips .md-chip-input-container input[type=text],.md-chips .md-chip-input-container input[type=url]{border:0;height:32px;line-height:32px;padding:0}.md-chips .md-chip-input-container input:not([type]):focus,.md-chips .md-chip-input-container input[type=email]:focus,.md-chips .md-chip-input-container input[type=number]:focus,.md-chips .md-chip-input-container input[type=tel]:focus,.md-chips .md-chip-input-container input[type=text]:focus,.md-chips .md-chip-input-container input[type=url]:focus{outline:0}.md-chips .md-chip-input-container md-autocomplete,.md-chips .md-chip-input-container md-autocomplete-wrap{background:0 0;height:32px}.md-chips .md-chip-input-container md-autocomplete md-autocomplete-wrap{box-shadow:none}.md-chips .md-chip-input-container md-autocomplete input{position:relative}.md-chips .md-chip-input-container input{border:0;height:32px;line-height:32px;padding:0}.md-chips .md-chip-input-container input:focus{outline:0}.md-chips .md-chip-input-container md-autocomplete,.md-chips .md-chip-input-container md-autocomplete-wrap{height:32px}.md-chips .md-chip-input-container md-autocomplete{box-shadow:none}.md-chips .md-chip-input-container md-autocomplete input{position:relative}.md-chips .md-chip-input-container:not(:first-child){margin:8px 8px 0 0}[dir=rtl] .md-chips .md-chip-input-container:not(:first-child){margin:8px 0 0 8px}.md-chips .md-chip-input-container input{background:0 0;border-width:0}.md-chips md-autocomplete button{display:none}@media screen and (-ms-high-contrast:active){.md-chip-input-container,md-chip{border:1px solid #fff}.md-chip-input-container md-autocomplete{border:none}}.md-inline-form md-checkbox{margin:19px 0 18px}md-checkbox{box-sizing:border-box;display:inline-block;margin-bottom:16px;white-space:nowrap;cursor:pointer;outline:0;user-select:none;position:relative;min-width:20px;min-height:20px;margin-left:0;margin-right:16px}[dir=rtl] md-checkbox{margin-left:16px}[dir=rtl] md-checkbox{margin-right:0}md-checkbox:last-of-type{margin-left:0;margin-right:0}md-checkbox.md-focused:not([disabled]) .md-container:before{left:-8px;top:-8px;right:-8px;bottom:-8px}md-checkbox.md-focused:not([disabled]):not(.md-checked) .md-container:before{background-color:rgba(0,0,0,.12)}md-checkbox.md-align-top-left>div.md-container{top:12px}md-checkbox .md-container{position:absolute;top:50%;transform:translateY(-50%);box-sizing:border-box;display:inline-block;width:20px;height:20px;left:0;right:auto}[dir=rtl] md-checkbox .md-container{left:auto}[dir=rtl] md-checkbox .md-container{right:0}md-checkbox .md-container:before{box-sizing:border-box;background-color:transparent;border-radius:50%;content:'';position:absolute;display:block;height:auto;left:0;top:0;right:0;bottom:0;transition:all .5s;width:auto}md-checkbox .md-container:after{box-sizing:border-box;content:'';position:absolute;top:-10px;right:-10px;bottom:-10px;left:-10px}md-checkbox .md-container .md-ripple-container{position:absolute;display:block;width:auto;height:auto;left:-15px;top:-15px;right:-15px;bottom:-15px}md-checkbox .md-icon{box-sizing:border-box;transition:240ms;position:absolute;top:0;left:0;width:20px;height:20px;border-width:2px;border-style:solid;border-radius:2px}md-checkbox.md-checked .md-icon{border-color:transparent}md-checkbox.md-checked .md-icon:after{box-sizing:border-box;transform:rotate(45deg);position:absolute;left:4.6666666667px;top:.2222222222px;display:table;width:6.6666666667px;height:13.3333333333px;border-width:2px;border-style:solid;border-top:0;border-left:0;content:''}md-checkbox[disabled]{cursor:default}md-checkbox.md-indeterminate .md-icon:after{box-sizing:border-box;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:table;width:12px;height:2px;border-width:2px;border-style:solid;border-top:0;border-left:0;content:''}md-checkbox .md-label{box-sizing:border-box;position:relative;display:inline-block;vertical-align:middle;white-space:normal;user-select:text;margin-left:30px;margin-right:0}[dir=rtl] md-checkbox .md-label{margin-left:0}[dir=rtl] md-checkbox .md-label{margin-right:30px}md-content{display:block;position:relative;overflow:auto;-webkit-overflow-scrolling:touch}md-content[md-scroll-y]{overflow-y:auto;overflow-x:hidden}md-content[md-scroll-x]{overflow-x:auto;overflow-y:hidden}@media print{md-content{overflow:visible!important}}md-calendar{font-size:13px;user-select:none}.md-calendar-scroll-mask{display:inline-block;overflow:hidden;height:308px}.md-calendar-scroll-mask .md-virtual-repeat-scroller{overflow-y:scroll;-webkit-overflow-scrolling:touch}.md-calendar-scroll-mask .md-virtual-repeat-scroller::-webkit-scrollbar{display:none}.md-calendar-scroll-mask .md-virtual-repeat-offsetter{width:100%}.md-calendar-scroll-container{box-shadow:inset -3px 3px 6px rgba(0,0,0,.2);display:inline-block;height:308px;width:346px}.md-calendar-date{height:44px;width:44px;text-align:center;padding:0;border:none;box-sizing:content-box}.md-calendar-date:first-child{padding-left:16px}[dir=rtl] .md-calendar-date:first-child{padding-left:0;padding-right:16px}.md-calendar-date:last-child{padding-right:16px}[dir=rtl] .md-calendar-date:last-child{padding-right:0;padding-left:16px}.md-calendar-date.md-calendar-date-disabled{cursor:default}.md-calendar-date-selection-indicator{transition:background-color,color .4s cubic-bezier(.25,.8,.25,1);border-radius:50%;display:inline-block;width:40px;height:40px;line-height:40px}.md-calendar-date:not(.md-disabled) .md-calendar-date-selection-indicator{cursor:pointer}.md-calendar-month-label{height:44px;font-size:14px;font-weight:500;padding:0 0 0 24px}[dir=rtl] .md-calendar-month-label{padding:0 24px 0 0}md-calendar-month .md-calendar-month-label:not(.md-calendar-month-label-disabled){cursor:pointer}.md-calendar-month-label md-icon{transform:rotate(180deg)}[dir=rtl] .md-calendar-month-label md-icon{transform:none}.md-calendar-month-label span{vertical-align:middle}.md-calendar-day-header{table-layout:fixed;border-spacing:0;border-collapse:collapse}.md-calendar-day-header th{height:40px;width:44px;text-align:center;padding:0;border:none;box-sizing:content-box;font-weight:400}.md-calendar-day-header th:first-child{padding-left:16px}[dir=rtl] .md-calendar-day-header th:first-child{padding-left:0;padding-right:16px}.md-calendar-day-header th:last-child{padding-right:16px}[dir=rtl] .md-calendar-day-header th:last-child{padding-right:0;padding-left:16px}.md-calendar{table-layout:fixed;border-spacing:0;border-collapse:collapse}.md-calendar tr:last-child td{border-bottom-width:1px;border-bottom-style:solid}.md-calendar:first-child{border-top:1px solid transparent}.md-calendar tbody,.md-calendar td,.md-calendar tr{vertical-align:middle;box-sizing:content-box}md-datepicker{white-space:nowrap;overflow:hidden;padding-right:18px;margin-right:-18px;vertical-align:middle}[dir=rtl] md-datepicker{padding-right:0;padding-left:18px}[dir=rtl] md-datepicker{margin-right:auto;margin-left:-18px}.md-inline-form md-datepicker{margin-top:12px}.md-datepicker-button{display:inline-block;box-sizing:border-box;background:0 0;vertical-align:middle;position:relative}.md-datepicker-button:before{top:0;left:0;bottom:0;right:0;position:absolute;content:'';speak:none}.md-datepicker-input{font-size:14px;box-sizing:border-box;border:none;box-shadow:none;outline:0;background:0 0;min-width:120px;max-width:328px;padding:0 0 5px}.md-datepicker-input::-ms-clear{display:none}._md-datepicker-floating-label>md-datepicker{overflow:visible}._md-datepicker-floating-label>md-datepicker .md-datepicker-input-container{border:none}._md-datepicker-floating-label>md-datepicker .md-datepicker-button{float:left;margin-top:-2.5px}[dir=rtl] ._md-datepicker-floating-label>md-datepicker .md-datepicker-button{float:right}._md-datepicker-floating-label._md-datepicker-has-calendar-icon>label:not(.md-no-float):not(.md-container-ignore){right:18px;left:auto;width:calc(100% - 84px)}[dir=rtl] ._md-datepicker-floating-label._md-datepicker-has-calendar-icon>label:not(.md-no-float):not(.md-container-ignore){right:auto}[dir=rtl] ._md-datepicker-floating-label._md-datepicker-has-calendar-icon>label:not(.md-no-float):not(.md-container-ignore){left:18px}._md-datepicker-floating-label._md-datepicker-has-calendar-icon .md-input-message-animation{margin-left:64px}[dir=rtl] ._md-datepicker-floating-label._md-datepicker-has-calendar-icon .md-input-message-animation{margin-left:auto;margin-right:64px}.md-datepicker-input-container{position:relative;border-bottom-width:1px;border-bottom-style:solid;display:inline-block;width:auto}.md-icon-button+.md-datepicker-input-container{margin-left:12px}[dir=rtl] .md-icon-button+.md-datepicker-input-container{margin-left:auto;margin-right:12px}.md-datepicker-input-container.md-datepicker-focused{border-bottom-width:2px}.md-datepicker-is-showing .md-scroll-mask{z-index:99}.md-datepicker-calendar-pane{position:absolute;top:0;left:-100%;z-index:100;border-width:1px;border-style:solid;background:0 0;transform:scale(0);transform-origin:0 0;transition:transform .2s cubic-bezier(.25,.8,.25,1)}.md-datepicker-calendar-pane.md-pane-open{transform:scale(1)}.md-datepicker-input-mask{height:40px;width:340px;position:relative;overflow:hidden;background:0 0;pointer-events:none;cursor:text}.md-datepicker-calendar{opacity:0;transition:opacity .2s cubic-bezier(.5,0,.25,1)}.md-pane-open .md-datepicker-calendar{opacity:1}.md-datepicker-calendar md-calendar:focus{outline:0}.md-datepicker-expand-triangle{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid}.md-datepicker-triangle-button{position:absolute;right:0;top:5px;transform:translateY(-25%) translateX(45%)}[dir=rtl] .md-datepicker-triangle-button{right:auto;left:0}[dir=rtl] .md-datepicker-triangle-button{transform:translateY(-25%) translateX(-45%)}.md-datepicker-triangle-button.md-button.md-icon-button{height:36px;width:36px;position:absolute;padding:8px}md-datepicker[disabled] .md-datepicker-input-container{border-bottom-color:transparent}md-datepicker[disabled] .md-datepicker-triangle-button{display:none}.md-datepicker-open{overflow:hidden}.md-datepicker-open .md-datepicker-input-container,.md-datepicker-open input.md-input{border-bottom-color:transparent}.md-datepicker-open .md-datepicker-triangle-button,.md-datepicker-open.md-input-has-placeholder>label,.md-datepicker-open.md-input-has-value>label{display:none}.md-datepicker-pos-adjusted .md-datepicker-input-mask{display:none}.md-datepicker-calendar-pane .md-calendar{transform:translateY(-85px);transition:transform .65s cubic-bezier(.25,.8,.25,1);transition-delay:125ms}.md-datepicker-calendar-pane.md-pane-open .md-calendar{transform:translateY(0)}.md-dialog-is-showing{max-height:100%}.md-dialog-container{display:flex;justify-content:center;align-items:center;position:absolute;top:0;left:0;width:100%;height:100%;z-index:80;overflow:hidden}md-dialog{opacity:0;min-width:240px;max-width:80%;max-height:80%;position:relative;overflow:auto;box-shadow:0 7px 8px -4px rgba(0,0,0,.2),0 13px 19px 2px rgba(0,0,0,.14),0 5px 24px 4px rgba(0,0,0,.12);display:flex;flex-direction:column}md-dialog.md-transition-in{opacity:1;transition:all .4s cubic-bezier(.25,.8,.25,1);transform:translate(0,0) scale(1)}md-dialog.md-transition-out{opacity:0;transition:all .4s cubic-bezier(.25,.8,.25,1);transform:translate(0,100%) scale(.2)}md-dialog>form{display:flex;flex-direction:column;overflow:auto}md-dialog .md-dialog-content{padding:24px}md-dialog md-dialog-content{order:1;flex-direction:column;overflow:auto;-webkit-overflow-scrolling:touch}md-dialog md-dialog-content:not([layout=row])>:first-child:not(.md-subheader){margin-top:0}md-dialog md-dialog-content:focus{outline:0}md-dialog md-dialog-content .md-subheader{margin:0}md-dialog md-dialog-content .md-dialog-content-body{width:100%}md-dialog md-dialog-content .md-prompt-input-container{width:100%;box-sizing:border-box}md-dialog .md-actions,md-dialog md-dialog-actions{display:flex;order:2;box-sizing:border-box;align-items:center;justify-content:flex-end;margin-bottom:0;padding-right:8px;padding-left:16px;min-height:52px;overflow:hidden}[dir=rtl] md-dialog .md-actions,[dir=rtl] md-dialog md-dialog-actions{padding-right:16px}[dir=rtl] md-dialog .md-actions,[dir=rtl] md-dialog md-dialog-actions{padding-left:8px}md-dialog .md-actions .md-button,md-dialog md-dialog-actions .md-button{margin-bottom:8px;margin-left:8px;margin-right:0;margin-top:8px}[dir=rtl] md-dialog .md-actions .md-button,[dir=rtl] md-dialog md-dialog-actions .md-button{margin-left:0}[dir=rtl] md-dialog .md-actions .md-button,[dir=rtl] md-dialog md-dialog-actions .md-button{margin-right:8px}md-dialog.md-content-overflow .md-actions,md-dialog.md-content-overflow md-dialog-actions{border-top-width:1px;border-top-style:solid}@media screen and (-ms-high-contrast:active){md-dialog{border:1px solid #fff}}@media (max-width:959px){md-dialog.md-dialog-fullscreen{min-height:100%;min-width:100%;border-radius:0}}md-divider{display:block;border-top-width:1px;border-top-style:solid;margin:0}md-divider[md-inset]{margin-left:80px}[dir=rtl] md-divider[md-inset]{margin-left:auto;margin-right:80px}.layout-gt-lg-row>md-divider,.layout-gt-md-row>md-divider,.layout-gt-sm-row>md-divider,.layout-gt-xs-row>md-divider,.layout-lg-row>md-divider,.layout-md-row>md-divider,.layout-row>md-divider,.layout-sm-row>md-divider,.layout-xl-row>md-divider,.layout-xs-row>md-divider{border-top-width:0;border-right-width:1px;border-right-style:solid}md-fab-speed-dial{position:relative;display:flex;align-items:center;z-index:20}md-fab-speed-dial.md-fab-bottom-right{top:auto;right:20px;bottom:20px;left:auto;position:absolute}md-fab-speed-dial.md-fab-bottom-left{top:auto;right:auto;bottom:20px;left:20px;position:absolute}md-fab-speed-dial.md-fab-top-right{top:20px;right:20px;bottom:auto;left:auto;position:absolute}md-fab-speed-dial.md-fab-top-left{top:20px;right:auto;bottom:auto;left:20px;position:absolute}md-fab-speed-dial:not(.md-hover-full){pointer-events:none}md-fab-speed-dial:not(.md-hover-full) .md-fab-action-item,md-fab-speed-dial:not(.md-hover-full) md-fab-trigger{pointer-events:auto}md-fab-speed-dial:not(.md-hover-full).md-is-open{pointer-events:auto}md-fab-speed-dial ._md-css-variables{z-index:20}md-fab-speed-dial.md-is-open .md-fab-action-item{align-items:center}md-fab-speed-dial md-fab-actions{display:flex;height:auto}md-fab-speed-dial md-fab-actions .md-fab-action-item{transition:all .3s cubic-bezier(.55,0,.55,.2)}md-fab-speed-dial.md-down{flex-direction:column}md-fab-speed-dial.md-down md-fab-trigger{order:1}md-fab-speed-dial.md-down md-fab-actions{flex-direction:column;order:2}md-fab-speed-dial.md-up{flex-direction:column}md-fab-speed-dial.md-up md-fab-trigger{order:2}md-fab-speed-dial.md-up md-fab-actions{flex-direction:column-reverse;order:1}md-fab-speed-dial.md-left{flex-direction:row}md-fab-speed-dial.md-left md-fab-trigger{order:2}md-fab-speed-dial.md-left md-fab-actions{flex-direction:row-reverse;order:1}md-fab-speed-dial.md-left md-fab-actions .md-fab-action-item{transition:all .3s cubic-bezier(.55,0,.55,.2)}md-fab-speed-dial.md-right{flex-direction:row}md-fab-speed-dial.md-right md-fab-trigger{order:1}md-fab-speed-dial.md-right md-fab-actions{flex-direction:row;order:2}md-fab-speed-dial.md-right md-fab-actions .md-fab-action-item{transition:all .3s cubic-bezier(.55,0,.55,.2)}md-fab-speed-dial.md-fling-remove .md-fab-action-item>*,md-fab-speed-dial.md-scale-remove .md-fab-action-item>*{visibility:hidden}md-fab-speed-dial.md-fling .md-fab-action-item{opacity:1}md-fab-speed-dial.md-fling.md-animations-waiting .md-fab-action-item{opacity:0;transition-duration:0s}md-fab-speed-dial.md-scale .md-fab-action-item{transform:scale(0);transition:all .3s cubic-bezier(.55,0,.55,.2);transition-duration:.1428571429s}md-fab-toolbar{display:block}md-fab-toolbar.md-fab-bottom-right{top:auto;right:20px;bottom:20px;left:auto;position:absolute}md-fab-toolbar.md-fab-bottom-left{top:auto;right:auto;bottom:20px;left:20px;position:absolute}md-fab-toolbar.md-fab-top-right{top:20px;right:20px;bottom:auto;left:auto;position:absolute}md-fab-toolbar.md-fab-top-left{top:20px;right:auto;bottom:auto;left:20px;position:absolute}md-fab-toolbar .md-fab-toolbar-wrapper{display:block;position:relative;overflow:hidden;height:68px}md-fab-toolbar md-fab-trigger{position:absolute;z-index:20}md-fab-toolbar md-fab-trigger button{overflow:visible!important}md-fab-toolbar md-fab-trigger .md-fab-toolbar-background{display:block;position:absolute;z-index:21;opacity:1;transition:all .3s cubic-bezier(.55,0,.55,.2)}md-fab-toolbar md-fab-trigger md-icon{position:relative;z-index:22;opacity:1;transition:all .2s ease-in}md-fab-toolbar.md-left md-fab-trigger{right:0}[dir=rtl] md-fab-toolbar.md-left md-fab-trigger{right:auto;left:0}md-fab-toolbar.md-left .md-toolbar-tools{flex-direction:row-reverse}md-fab-toolbar.md-left .md-toolbar-tools>.md-button:first-child{margin-right:.6rem}[dir=rtl] md-fab-toolbar.md-left .md-toolbar-tools>.md-button:first-child{margin-right:auto;margin-left:.6rem}md-fab-toolbar.md-left .md-toolbar-tools>.md-button:first-child{margin-left:-.8rem}[dir=rtl] md-fab-toolbar.md-left .md-toolbar-tools>.md-button:first-child{margin-left:auto;margin-right:-.8rem}md-fab-toolbar.md-left .md-toolbar-tools>.md-button:last-child{margin-right:8px}[dir=rtl] md-fab-toolbar.md-left .md-toolbar-tools>.md-button:last-child{margin-right:auto;margin-left:8px}md-fab-toolbar.md-right md-fab-trigger{left:0}[dir=rtl] md-fab-toolbar.md-right md-fab-trigger{left:auto;right:0}md-fab-toolbar.md-right .md-toolbar-tools{flex-direction:row}md-fab-toolbar md-toolbar{background-color:transparent!important;pointer-events:none;z-index:23}md-fab-toolbar md-toolbar .md-toolbar-tools{padding:0 20px;margin-top:3px}md-fab-toolbar md-toolbar .md-fab-action-item{opacity:0;transform:scale(0);transition:all .3s cubic-bezier(.55,0,.55,.2);transition-duration:.15s}md-fab-toolbar.md-is-open md-fab-trigger>button{box-shadow:none}md-fab-toolbar.md-is-open md-fab-trigger>button md-icon{opacity:0}md-fab-toolbar.md-is-open .md-fab-action-item{opacity:1;transform:scale(1)}md-grid-list{box-sizing:border-box;display:block;position:relative}md-grid-list md-grid-tile,md-grid-list md-grid-tile-footer,md-grid-list md-grid-tile-header,md-grid-list md-grid-tile>figure{box-sizing:border-box}md-grid-list md-grid-tile{display:block;position:absolute}md-grid-list md-grid-tile figure{display:flex;align-items:center;justify-content:center;height:100%;position:absolute;top:0;right:0;bottom:0;left:0;padding:0;margin:0}md-grid-list md-grid-tile md-grid-tile-footer,md-grid-list md-grid-tile md-grid-tile-header{display:flex;flex-direction:row;align-items:center;height:48px;color:#fff;background:rgba(0,0,0,.18);overflow:hidden;position:absolute;left:0;right:0}md-grid-list md-grid-tile md-grid-tile-footer h3,md-grid-list md-grid-tile md-grid-tile-footer h4,md-grid-list md-grid-tile md-grid-tile-header h3,md-grid-list md-grid-tile md-grid-tile-header h4{font-weight:400;margin:0 0 0 16px}md-grid-list md-grid-tile md-grid-tile-footer h3,md-grid-list md-grid-tile md-grid-tile-header h3{font-size:14px}md-grid-list md-grid-tile md-grid-tile-footer h4,md-grid-list md-grid-tile md-grid-tile-header h4{font-size:12px}md-grid-list md-grid-tile md-grid-tile-header{top:0}md-grid-list md-grid-tile md-grid-tile-footer{bottom:0}@media screen and (-ms-high-contrast:active){md-grid-tile{border:1px solid #fff}md-grid-tile-footer{border-top:1px solid #fff}}md-icon{margin:auto;background-repeat:no-repeat no-repeat;display:inline-block;vertical-align:middle;fill:currentColor;height:24px;width:24px;min-height:24px;min-width:24px}md-icon svg{pointer-events:none;display:block}md-icon[md-font-icon]{line-height:24px;width:auto}md-input-container{display:inline-block;position:relative;padding:2px;margin:18px 0;vertical-align:middle}md-input-container:after{content:'';display:table;clear:both}md-input-container.md-block{display:block}md-input-container .md-errors-spacer{float:right;min-height:24px;min-width:1px}[dir=rtl] md-input-container .md-errors-spacer{float:left}md-input-container>md-icon{position:absolute;top:8px;left:2px;right:auto}[dir=rtl] md-input-container>md-icon{left:auto}[dir=rtl] md-input-container>md-icon{right:2px}md-input-container input[type=color],md-input-container input[type=date],md-input-container input[type=datetime-local],md-input-container input[type=datetime],md-input-container input[type=email],md-input-container input[type=month],md-input-container input[type=number],md-input-container input[type=password],md-input-container input[type=search],md-input-container input[type=tel],md-input-container input[type=text],md-input-container input[type=time],md-input-container input[type=url],md-input-container input[type=week],md-input-container textarea{-moz-appearance:none;-webkit-appearance:none}md-input-container input[type=date],md-input-container input[type=datetime-local],md-input-container input[type=month],md-input-container input[type=time],md-input-container input[type=week]{min-height:26px}md-input-container textarea{resize:none;overflow:hidden}md-input-container textarea.md-input{min-height:26px;-ms-flex-preferred-size:auto}md-input-container textarea[md-no-autogrow]{height:auto;overflow:auto}md-input-container label:not(.md-container-ignore){position:absolute;bottom:100%;left:0;right:auto}[dir=rtl] md-input-container label:not(.md-container-ignore){left:auto}[dir=rtl] md-input-container label:not(.md-container-ignore){right:0}md-input-container label:not(.md-container-ignore).md-required:after{content:' *';font-size:13px;vertical-align:top}md-input-container .md-placeholder,md-input-container label:not(.md-no-float):not(.md-container-ignore){overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;order:1;pointer-events:none;-webkit-font-smoothing:antialiased;padding-left:3px;padding-right:0;z-index:1;transform:translate3d(0,28px,0) scale(1);transition:transform .4s cubic-bezier(.25,.8,.25,1);max-width:100%;transform-origin:left top}[dir=rtl] md-input-container .md-placeholder,[dir=rtl] md-input-container label:not(.md-no-float):not(.md-container-ignore){padding-left:0}[dir=rtl] md-input-container .md-placeholder,[dir=rtl] md-input-container label:not(.md-no-float):not(.md-container-ignore){padding-right:3px}[dir=rtl] md-input-container .md-placeholder,[dir=rtl] md-input-container label:not(.md-no-float):not(.md-container-ignore){transform-origin:right top}md-input-container .md-placeholder{position:absolute;top:0;opacity:0;transition-property:opacity,transform;transform:translate3d(0,30px,0)}md-input-container.md-input-focused .md-placeholder{opacity:1;transform:translate3d(0,24px,0)}md-input-container.md-input-has-value .md-placeholder{transition:none;opacity:0}md-input-container:not(.md-input-has-value) input:not(:focus),md-input-container:not(.md-input-has-value) input:not(:focus)::-webkit-datetime-edit-ampm-field,md-input-container:not(.md-input-has-value) input:not(:focus)::-webkit-datetime-edit-day-field,md-input-container:not(.md-input-has-value) input:not(:focus)::-webkit-datetime-edit-hour-field,md-input-container:not(.md-input-has-value) input:not(:focus)::-webkit-datetime-edit-millisecond-field,md-input-container:not(.md-input-has-value) input:not(:focus)::-webkit-datetime-edit-minute-field,md-input-container:not(.md-input-has-value) input:not(:focus)::-webkit-datetime-edit-month-field,md-input-container:not(.md-input-has-value) input:not(:focus)::-webkit-datetime-edit-second-field,md-input-container:not(.md-input-has-value) input:not(:focus)::-webkit-datetime-edit-text,md-input-container:not(.md-input-has-value) input:not(:focus)::-webkit-datetime-edit-week-field,md-input-container:not(.md-input-has-value) input:not(:focus)::-webkit-datetime-edit-year-field{color:transparent}md-input-container .md-input{order:2;display:block;margin-top:0;background:0 0;padding-top:2px;padding-bottom:1px;padding-left:2px;padding-right:2px;border-width:0 0 1px 0;line-height:26px;height:30px;-ms-flex-preferred-size:26px;border-radius:0;border-style:solid;width:100%;box-sizing:border-box;float:left}[dir=rtl] md-input-container .md-input{float:right}md-input-container .md-input:focus{outline:0}md-input-container .md-input:invalid{outline:0;box-shadow:none}md-input-container .md-input.md-no-flex{flex:none!important}md-input-container .md-char-counter{text-align:right;padding-right:2px;padding-left:0}[dir=rtl] md-input-container .md-char-counter{text-align:left}[dir=rtl] md-input-container .md-char-counter{padding-right:0}[dir=rtl] md-input-container .md-char-counter{padding-left:2px}md-input-container .md-input-messages-animation{position:relative;order:4;overflow:hidden;clear:left}[dir=rtl] md-input-container .md-input-messages-animation{clear:right}md-input-container .md-input-messages-animation.ng-enter .md-input-message-animation{opacity:0;margin-top:-100px}md-input-container .md-char-counter,md-input-container .md-input-message-animation{font-size:12px;line-height:14px;overflow:hidden;transition:all .3s cubic-bezier(.55,0,.55,.2);opacity:1;margin-top:0;padding-top:5px}md-input-container .md-char-counter:not(.md-char-counter),md-input-container .md-input-message-animation:not(.md-char-counter){padding-right:5px;padding-left:0}[dir=rtl] md-input-container .md-char-counter:not(.md-char-counter),[dir=rtl] md-input-container .md-input-message-animation:not(.md-char-counter){padding-right:0}[dir=rtl] md-input-container .md-char-counter:not(.md-char-counter),[dir=rtl] md-input-container .md-input-message-animation:not(.md-char-counter){padding-left:5px}md-input-container:not(.md-input-invalid) .md-auto-hide .md-input-message-animation{opacity:0;margin-top:-100px}md-input-container .md-input-message-animation:not(.ng-animate){opacity:0;margin-top:-100px}md-input-container .md-input-message-animation.ng-enter{opacity:0;margin-top:-100px}md-input-container.md-input-focused label:not(.md-no-float),md-input-container.md-input-has-placeholder label:not(.md-no-float),md-input-container.md-input-has-value label:not(.md-no-float){transform:translate3d(0,6px,0) scale(.75);transition:transform cubic-bezier(.25,.8,.25,1) .4s,width cubic-bezier(.25,.8,.25,1) .4s}md-input-container.md-input-has-value label{transition:none}md-input-container .md-input.ng-invalid.ng-dirty,md-input-container.md-input-focused .md-input,md-input-container.md-input-resized .md-input{padding-bottom:0;border-width:0 0 2px 0}[disabled] md-input-container .md-input,md-input-container .md-input[disabled]{background-position:bottom -1px left 0;background-size:4px 1px;background-repeat:repeat-x}md-input-container.md-icon-float{transition:margin-top .4s cubic-bezier(.25,.8,.25,1)}md-input-container.md-icon-float>label{pointer-events:none;position:absolute}md-input-container.md-icon-float>md-icon{top:8px;left:2px;right:auto}[dir=rtl] md-input-container.md-icon-float>md-icon{left:auto}[dir=rtl] md-input-container.md-icon-float>md-icon{right:2px}md-input-container.md-icon-left>label .md-placeholder,md-input-container.md-icon-left>label:not(.md-no-float):not(.md-container-ignore),md-input-container.md-icon-right>label .md-placeholder,md-input-container.md-icon-right>label:not(.md-no-float):not(.md-container-ignore){width:calc(100% - 36px - 18px)}md-input-container.md-icon-left{padding-left:36px;padding-right:0}[dir=rtl] md-input-container.md-icon-left{padding-left:0}[dir=rtl] md-input-container.md-icon-left{padding-right:36px}md-input-container.md-icon-left>label{left:36px;right:auto}[dir=rtl] md-input-container.md-icon-left>label{left:auto}[dir=rtl] md-input-container.md-icon-left>label{right:36px}md-input-container.md-icon-right{padding-left:0;padding-right:36px}[dir=rtl] md-input-container.md-icon-right{padding-left:36px}[dir=rtl] md-input-container.md-icon-right{padding-right:0}md-input-container.md-icon-right>md-icon:last-of-type{margin:0;right:2px;left:auto}[dir=rtl] md-input-container.md-icon-right>md-icon:last-of-type{right:auto}[dir=rtl] md-input-container.md-icon-right>md-icon:last-of-type{left:2px}md-input-container.md-icon-left.md-icon-right{padding-left:36px;padding-right:36px}md-input-container.md-icon-left.md-icon-right>label .md-placeholder,md-input-container.md-icon-left.md-icon-right>label:not(.md-no-float):not(.md-container-ignore){width:calc(100% - (36px * 2))}.md-resize-wrapper{position:relative}.md-resize-wrapper:after{content:'';display:table;clear:both}.md-resize-handle{position:absolute;bottom:-5px;left:0;height:10px;background:0 0;width:100%;cursor:ns-resize}@media screen and (-ms-high-contrast:active){md-input-container.md-default-theme>md-icon{fill:#fff}}md-list{display:block;padding:8px 0 8px 0}md-list .md-subheader{font-size:14px;font-weight:500;letter-spacing:.010em;line-height:1.2em}md-list.md-dense md-list-item,md-list.md-dense md-list-item .md-list-item-inner{min-height:48px}md-list.md-dense md-list-item .md-list-item-inner::before,md-list.md-dense md-list-item::before{content:'';min-height:48px;visibility:hidden;display:inline-block}md-list.md-dense md-list-item .md-list-item-inner md-icon:first-child,md-list.md-dense md-list-item md-icon:first-child{width:20px;height:20px}md-list.md-dense md-list-item .md-list-item-inner>md-icon:first-child:not(.md-avatar-icon),md-list.md-dense md-list-item>md-icon:first-child:not(.md-avatar-icon){margin-right:36px}[dir=rtl] md-list.md-dense md-list-item .md-list-item-inner>md-icon:first-child:not(.md-avatar-icon),[dir=rtl] md-list.md-dense md-list-item>md-icon:first-child:not(.md-avatar-icon){margin-right:auto;margin-left:36px}md-list.md-dense md-list-item .md-avatar,md-list.md-dense md-list-item .md-avatar-icon,md-list.md-dense md-list-item .md-list-item-inner .md-avatar,md-list.md-dense md-list-item .md-list-item-inner .md-avatar-icon{margin-right:20px}[dir=rtl] md-list.md-dense md-list-item .md-avatar,[dir=rtl] md-list.md-dense md-list-item .md-avatar-icon,[dir=rtl] md-list.md-dense md-list-item .md-list-item-inner .md-avatar,[dir=rtl] md-list.md-dense md-list-item .md-list-item-inner .md-avatar-icon{margin-right:auto;margin-left:20px}md-list.md-dense md-list-item .md-avatar,md-list.md-dense md-list-item .md-list-item-inner .md-avatar{flex:none;width:36px;height:36px}md-list.md-dense md-list-item.md-2-line .md-list-item-text.md-offset,md-list.md-dense md-list-item.md-2-line>.md-no-style .md-list-item-text.md-offset,md-list.md-dense md-list-item.md-3-line .md-list-item-text.md-offset,md-list.md-dense md-list-item.md-3-line>.md-no-style .md-list-item-text.md-offset{margin-left:56px}[dir=rtl] md-list.md-dense md-list-item.md-2-line .md-list-item-text.md-offset,[dir=rtl] md-list.md-dense md-list-item.md-2-line>.md-no-style .md-list-item-text.md-offset,[dir=rtl] md-list.md-dense md-list-item.md-3-line .md-list-item-text.md-offset,[dir=rtl] md-list.md-dense md-list-item.md-3-line>.md-no-style .md-list-item-text.md-offset{margin-left:auto;margin-right:56px}md-list.md-dense md-list-item.md-2-line .md-list-item-text h3,md-list.md-dense md-list-item.md-2-line .md-list-item-text h4,md-list.md-dense md-list-item.md-2-line .md-list-item-text p,md-list.md-dense md-list-item.md-2-line>.md-no-style .md-list-item-text h3,md-list.md-dense md-list-item.md-2-line>.md-no-style .md-list-item-text h4,md-list.md-dense md-list-item.md-2-line>.md-no-style .md-list-item-text p,md-list.md-dense md-list-item.md-3-line .md-list-item-text h3,md-list.md-dense md-list-item.md-3-line .md-list-item-text h4,md-list.md-dense md-list-item.md-3-line .md-list-item-text p,md-list.md-dense md-list-item.md-3-line>.md-no-style .md-list-item-text h3,md-list.md-dense md-list-item.md-3-line>.md-no-style .md-list-item-text h4,md-list.md-dense md-list-item.md-3-line>.md-no-style .md-list-item-text p{line-height:1.05;font-size:12px}md-list.md-dense md-list-item.md-2-line .md-list-item-text h3,md-list.md-dense md-list-item.md-2-line>.md-no-style .md-list-item-text h3,md-list.md-dense md-list-item.md-3-line .md-list-item-text h3,md-list.md-dense md-list-item.md-3-line>.md-no-style .md-list-item-text h3{font-size:13px}md-list.md-dense md-list-item.md-2-line,md-list.md-dense md-list-item.md-2-line>.md-no-style{min-height:60px}md-list.md-dense md-list-item.md-2-line::before,md-list.md-dense md-list-item.md-2-line>.md-no-style::before{content:'';min-height:60px;visibility:hidden;display:inline-block}md-list.md-dense md-list-item.md-2-line .md-avatar-icon,md-list.md-dense md-list-item.md-2-line>.md-avatar,md-list.md-dense md-list-item.md-2-line>.md-no-style .md-avatar-icon,md-list.md-dense md-list-item.md-2-line>.md-no-style>.md-avatar{margin-top:12px}md-list.md-dense md-list-item.md-3-line,md-list.md-dense md-list-item.md-3-line>.md-no-style{min-height:76px}md-list.md-dense md-list-item.md-3-line::before,md-list.md-dense md-list-item.md-3-line>.md-no-style::before{content:'';min-height:76px;visibility:hidden;display:inline-block}md-list.md-dense md-list-item.md-3-line>.md-avatar,md-list.md-dense md-list-item.md-3-line>.md-no-style>.md-avatar,md-list.md-dense md-list-item.md-3-line>.md-no-style>md-icon:first-child,md-list.md-dense md-list-item.md-3-line>md-icon:first-child{margin-top:16px}md-list-item{position:relative}md-list-item.md-proxy-focus.md-focused .md-no-style{transition:background-color .15s linear}md-list-item._md-button-wrap{position:relative}md-list-item._md-button-wrap>div.md-button:first-child{display:flex;align-items:center;justify-content:flex-start;padding:0 16px;margin:0;font-weight:400;text-align:left;border:medium none}[dir=rtl] md-list-item._md-button-wrap>div.md-button:first-child{text-align:right}md-list-item._md-button-wrap>div.md-button:first-child>.md-button:first-child{position:absolute;top:0;left:0;height:100%;margin:0;padding:0}md-list-item._md-button-wrap>div.md-button:first-child .md-list-item-inner{width:100%;min-height:inherit}md-list-item .md-no-style,md-list-item.md-no-proxy{position:relative;padding:0 16px;flex:1 1 auto}md-list-item .md-no-style.md-button,md-list-item.md-no-proxy.md-button{font-size:inherit;height:inherit;text-align:left;text-transform:none;width:100%;white-space:normal;flex-direction:inherit;align-items:inherit;border-radius:0;margin:0}[dir=rtl] md-list-item .md-no-style.md-button,[dir=rtl] md-list-item.md-no-proxy.md-button{text-align:right}md-list-item .md-no-style.md-button>.md-ripple-container,md-list-item.md-no-proxy.md-button>.md-ripple-container{border-radius:0}md-list-item .md-no-style:focus,md-list-item.md-no-proxy:focus{outline:0}md-list-item.md-clickable:hover{cursor:pointer}md-list-item md-divider{position:absolute;bottom:0;left:0;width:100%}[dir=rtl] md-list-item md-divider{left:auto;right:0}md-list-item md-divider[md-inset]{left:72px;width:calc(100% - 72px);margin:0!important}[dir=rtl] md-list-item md-divider[md-inset]{left:auto;right:72px}md-list-item,md-list-item .md-list-item-inner{display:flex;justify-content:flex-start;align-items:center;min-height:48px;height:auto}md-list-item .md-list-item-inner::before,md-list-item::before{content:'';min-height:48px;visibility:hidden;display:inline-block}md-list-item .md-list-item-inner>div.md-primary>md-icon:not(.md-avatar-icon),md-list-item .md-list-item-inner>div.md-secondary>md-icon:not(.md-avatar-icon),md-list-item .md-list-item-inner>md-icon.md-secondary:not(.md-avatar-icon),md-list-item .md-list-item-inner>md-icon:first-child:not(.md-avatar-icon),md-list-item>div.md-primary>md-icon:not(.md-avatar-icon),md-list-item>div.md-secondary>md-icon:not(.md-avatar-icon),md-list-item>md-icon.md-secondary:not(.md-avatar-icon),md-list-item>md-icon:first-child:not(.md-avatar-icon){width:24px;margin-top:16px;margin-bottom:12px;box-sizing:content-box}md-list-item .md-list-item-inner md-checkbox.md-secondary,md-list-item .md-list-item-inner>div.md-primary>md-checkbox,md-list-item .md-list-item-inner>div.md-secondary>md-checkbox,md-list-item .md-list-item-inner>md-checkbox,md-list-item md-checkbox.md-secondary,md-list-item>div.md-primary>md-checkbox,md-list-item>div.md-secondary>md-checkbox,md-list-item>md-checkbox{align-self:center}md-list-item .md-list-item-inner md-checkbox.md-secondary .md-label,md-list-item .md-list-item-inner>div.md-primary>md-checkbox .md-label,md-list-item .md-list-item-inner>div.md-secondary>md-checkbox .md-label,md-list-item .md-list-item-inner>md-checkbox .md-label,md-list-item md-checkbox.md-secondary .md-label,md-list-item>div.md-primary>md-checkbox .md-label,md-list-item>div.md-secondary>md-checkbox .md-label,md-list-item>md-checkbox .md-label{display:none}md-list-item .md-list-item-inner>md-icon:first-child:not(.md-avatar-icon),md-list-item>md-icon:first-child:not(.md-avatar-icon){margin-right:32px}[dir=rtl] md-list-item .md-list-item-inner>md-icon:first-child:not(.md-avatar-icon),[dir=rtl] md-list-item>md-icon:first-child:not(.md-avatar-icon){margin-right:auto;margin-left:32px}md-list-item .md-avatar,md-list-item .md-avatar-icon,md-list-item .md-list-item-inner .md-avatar,md-list-item .md-list-item-inner .md-avatar-icon{margin-top:8px;margin-bottom:8px;margin-right:16px;border-radius:50%;box-sizing:content-box}[dir=rtl] md-list-item .md-avatar,[dir=rtl] md-list-item .md-avatar-icon,[dir=rtl] md-list-item .md-list-item-inner .md-avatar,[dir=rtl] md-list-item .md-list-item-inner .md-avatar-icon{margin-right:auto;margin-left:16px}md-list-item .md-avatar,md-list-item .md-list-item-inner .md-avatar{flex:none;width:40px;height:40px}md-list-item .md-avatar-icon,md-list-item .md-list-item-inner .md-avatar-icon{padding:8px}md-list-item .md-avatar-icon svg,md-list-item .md-list-item-inner .md-avatar-icon svg{width:24px;height:24px}md-list-item .md-list-item-inner>md-checkbox,md-list-item>md-checkbox{width:24px;margin-left:3px;margin-right:29px;margin-top:16px}[dir=rtl] md-list-item .md-list-item-inner>md-checkbox,[dir=rtl] md-list-item>md-checkbox{margin-left:29px}[dir=rtl] md-list-item .md-list-item-inner>md-checkbox,[dir=rtl] md-list-item>md-checkbox{margin-right:3px}md-list-item .md-list-item-inner .md-secondary-container,md-list-item .md-secondary-container{display:flex;align-items:center;flex-shrink:0;margin:auto;margin-right:0;margin-left:auto}[dir=rtl] md-list-item .md-list-item-inner .md-secondary-container,[dir=rtl] md-list-item .md-secondary-container{margin-right:auto}[dir=rtl] md-list-item .md-list-item-inner .md-secondary-container,[dir=rtl] md-list-item .md-secondary-container{margin-left:0}md-list-item .md-list-item-inner .md-secondary-container .md-button:last-of-type,md-list-item .md-list-item-inner .md-secondary-container .md-icon-button:last-of-type,md-list-item .md-secondary-container .md-button:last-of-type,md-list-item .md-secondary-container .md-icon-button:last-of-type{margin-right:0}[dir=rtl] md-list-item .md-list-item-inner .md-secondary-container .md-button:last-of-type,[dir=rtl] md-list-item .md-list-item-inner .md-secondary-container .md-icon-button:last-of-type,[dir=rtl] md-list-item .md-secondary-container .md-button:last-of-type,[dir=rtl] md-list-item .md-secondary-container .md-icon-button:last-of-type{margin-right:auto;margin-left:0}md-list-item .md-list-item-inner .md-secondary-container md-checkbox,md-list-item .md-secondary-container md-checkbox{margin-top:0;margin-bottom:0}md-list-item .md-list-item-inner .md-secondary-container md-checkbox:last-child,md-list-item .md-secondary-container md-checkbox:last-child{width:24px;margin-right:0}[dir=rtl] md-list-item .md-list-item-inner .md-secondary-container md-checkbox:last-child,[dir=rtl] md-list-item .md-secondary-container md-checkbox:last-child{margin-right:auto;margin-left:0}md-list-item .md-list-item-inner .md-secondary-container md-switch,md-list-item .md-secondary-container md-switch{margin-top:0;margin-bottom:0;margin-right:-6px}[dir=rtl] md-list-item .md-list-item-inner .md-secondary-container md-switch,[dir=rtl] md-list-item .md-secondary-container md-switch{margin-right:auto;margin-left:-6px}md-list-item .md-list-item-inner>.md-list-item-inner>p,md-list-item .md-list-item-inner>p,md-list-item>.md-list-item-inner>p,md-list-item>p{flex:1 1 auto;margin:0}md-list-item.md-2-line,md-list-item.md-2-line>.md-no-style,md-list-item.md-3-line,md-list-item.md-3-line>.md-no-style{align-items:flex-start;justify-content:center}md-list-item.md-2-line.md-long-text,md-list-item.md-2-line>.md-no-style.md-long-text,md-list-item.md-3-line.md-long-text,md-list-item.md-3-line>.md-no-style.md-long-text{margin-top:8px;margin-bottom:8px}md-list-item.md-2-line .md-list-item-text,md-list-item.md-2-line>.md-no-style .md-list-item-text,md-list-item.md-3-line .md-list-item-text,md-list-item.md-3-line>.md-no-style .md-list-item-text{flex:1 1 auto;margin:auto;text-overflow:ellipsis;overflow:hidden}md-list-item.md-2-line .md-list-item-text.md-offset,md-list-item.md-2-line>.md-no-style .md-list-item-text.md-offset,md-list-item.md-3-line .md-list-item-text.md-offset,md-list-item.md-3-line>.md-no-style .md-list-item-text.md-offset{margin-left:56px}[dir=rtl] md-list-item.md-2-line .md-list-item-text.md-offset,[dir=rtl] md-list-item.md-2-line>.md-no-style .md-list-item-text.md-offset,[dir=rtl] md-list-item.md-3-line .md-list-item-text.md-offset,[dir=rtl] md-list-item.md-3-line>.md-no-style .md-list-item-text.md-offset{margin-left:auto;margin-right:56px}md-list-item.md-2-line .md-list-item-text h3,md-list-item.md-2-line>.md-no-style .md-list-item-text h3,md-list-item.md-3-line .md-list-item-text h3,md-list-item.md-3-line>.md-no-style .md-list-item-text h3{font-size:16px;font-weight:400;letter-spacing:.010em;margin:0;line-height:1.2em;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}md-list-item.md-2-line .md-list-item-text h4,md-list-item.md-2-line>.md-no-style .md-list-item-text h4,md-list-item.md-3-line .md-list-item-text h4,md-list-item.md-3-line>.md-no-style .md-list-item-text h4{font-size:14px;letter-spacing:.010em;margin:3px 0 1px 0;font-weight:400;line-height:1.2em;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}md-list-item.md-2-line .md-list-item-text p,md-list-item.md-2-line>.md-no-style .md-list-item-text p,md-list-item.md-3-line .md-list-item-text p,md-list-item.md-3-line>.md-no-style .md-list-item-text p{font-size:14px;font-weight:500;letter-spacing:.010em;margin:0;line-height:1.6em}md-list-item.md-2-line,md-list-item.md-2-line>.md-no-style{height:auto;min-height:72px}md-list-item.md-2-line::before,md-list-item.md-2-line>.md-no-style::before{content:'';min-height:72px;visibility:hidden;display:inline-block}md-list-item.md-2-line .md-avatar-icon,md-list-item.md-2-line>.md-avatar,md-list-item.md-2-line>.md-no-style .md-avatar-icon,md-list-item.md-2-line>.md-no-style>.md-avatar{margin-top:12px}md-list-item.md-2-line>.md-no-style>md-icon:first-child,md-list-item.md-2-line>md-icon:first-child{align-self:flex-start}md-list-item.md-2-line .md-list-item-text,md-list-item.md-2-line>.md-no-style .md-list-item-text{flex:1 1 auto}md-list-item.md-3-line,md-list-item.md-3-line>.md-no-style{height:auto;min-height:88px}md-list-item.md-3-line::before,md-list-item.md-3-line>.md-no-style::before{content:'';min-height:88px;visibility:hidden;display:inline-block}md-list-item.md-3-line>.md-avatar,md-list-item.md-3-line>.md-no-style>.md-avatar,md-list-item.md-3-line>.md-no-style>md-icon:first-child,md-list-item.md-3-line>md-icon:first-child{margin-top:16px}.md-open-menu-container{position:fixed;left:0;top:0;z-index:100;opacity:0;border-radius:2px}.md-open-menu-container md-menu-divider{margin-top:4px;margin-bottom:4px;height:1px;min-height:1px;max-height:1px;width:100%}.md-open-menu-container md-menu-content>*{opacity:0}.md-open-menu-container:not(.md-clickable){pointer-events:none}.md-open-menu-container.md-active{opacity:1;transition:all .4s cubic-bezier(.25,.8,.25,1);transition-duration:.2s}.md-open-menu-container.md-active>md-menu-content>*{opacity:1;transition:all .3s cubic-bezier(.55,0,.55,.2);transition-duration:.2s;transition-delay:.1s}.md-open-menu-container.md-leave{opacity:0;transition:all .3s cubic-bezier(.55,0,.55,.2);transition-duration:250ms}md-menu-content{display:flex;flex-direction:column;padding:8px 0;max-height:304px;overflow-y:auto}md-menu-content.md-dense{max-height:208px}md-menu-content.md-dense md-menu-item{height:32px;min-height:0}md-menu-item{display:flex;flex-direction:row;min-height:48px;height:48px;align-content:center;justify-content:flex-start}md-menu-item>*{width:100%;margin:auto 0;padding-left:16px;padding-right:16px}md-menu-item>a.md-button{padding-top:5px}md-menu-item>.md-button{text-align:left;display:inline-block;border-radius:0;margin:auto 0;font-size:15px;text-transform:none;font-weight:400;height:100%;padding-left:16px;padding-right:16px;width:100%}md-menu-item>.md-button::-moz-focus-inner{padding:0;border:0}[dir=rtl] md-menu-item>.md-button{text-align:right}md-menu-item>.md-button md-icon{margin:auto 16px auto 0}[dir=rtl] md-menu-item>.md-button md-icon{margin:auto 0 auto 16px}md-menu-item>.md-button p{display:inline-block;margin:auto}md-menu-item>.md-button span{margin-top:auto;margin-bottom:auto}md-menu-item>.md-button .md-ripple-container{border-radius:inherit}md-toolbar .md-menu{height:auto;margin:auto;padding:0}@media (max-width:959px){md-menu-content{min-width:112px}md-menu-content[width="3"]{min-width:168px}md-menu-content[width="4"]{min-width:224px}md-menu-content[width="5"]{min-width:280px}md-menu-content[width="6"]{min-width:336px}md-menu-content[width="7"]{min-width:392px}}@media (min-width:960px){md-menu-content{min-width:96px}md-menu-content[width="3"]{min-width:192px}md-menu-content[width="4"]{min-width:256px}md-menu-content[width="5"]{min-width:320px}md-menu-content[width="6"]{min-width:384px}md-menu-content[width="7"]{min-width:448px}}md-toolbar.md-menu-toolbar h2.md-toolbar-tools{line-height:1rem;height:auto;padding:28px;padding-bottom:12px}md-toolbar.md-has-open-menu{position:relative;z-index:100}md-menu-bar{padding:0 20px;display:block;position:relative;z-index:2}md-menu-bar .md-menu{display:inline-block;padding:0;position:relative}md-menu-bar button{font-size:14px;padding:0 10px;margin:0;border:0;background-color:transparent;height:40px}md-menu-bar md-backdrop.md-menu-backdrop{z-index:-2}md-menu-content.md-menu-bar-menu.md-dense{max-height:none;padding:16px 0}md-menu-content.md-menu-bar-menu.md-dense md-menu-item.md-indent{position:relative}md-menu-content.md-menu-bar-menu.md-dense md-menu-item.md-indent>md-icon{position:absolute;padding:0;width:24px;top:6px;left:24px}[dir=rtl] md-menu-content.md-menu-bar-menu.md-dense md-menu-item.md-indent>md-icon{left:auto;right:24px}md-menu-content.md-menu-bar-menu.md-dense md-menu-item.md-indent .md-menu>.md-button,md-menu-content.md-menu-bar-menu.md-dense md-menu-item.md-indent>.md-button{padding:0 32px 0 64px}[dir=rtl] md-menu-content.md-menu-bar-menu.md-dense md-menu-item.md-indent .md-menu>.md-button,[dir=rtl] md-menu-content.md-menu-bar-menu.md-dense md-menu-item.md-indent>.md-button{padding:0 64px 0 32px}md-menu-content.md-menu-bar-menu.md-dense .md-button{min-height:0;height:32px;display:flex}md-menu-content.md-menu-bar-menu.md-dense .md-button span{flex-grow:1}md-menu-content.md-menu-bar-menu.md-dense .md-button span.md-alt-text{flex-grow:0;align-self:flex-end;margin:0 8px}md-menu-content.md-menu-bar-menu.md-dense md-menu-divider{margin:8px 0}md-menu-content.md-menu-bar-menu.md-dense .md-menu>.md-button,md-menu-content.md-menu-bar-menu.md-dense md-menu-item>.md-button{text-align:left}[dir=rtl] md-menu-content.md-menu-bar-menu.md-dense .md-menu>.md-button,[dir=rtl] md-menu-content.md-menu-bar-menu.md-dense md-menu-item>.md-button{text-align:right}md-menu-content.md-menu-bar-menu.md-dense .md-menu{padding:0}md-menu-content.md-menu-bar-menu.md-dense .md-menu>.md-button{position:relative;margin:0;width:100%;text-transform:none;font-weight:400;border-radius:0;padding-left:16px}[dir=rtl] md-menu-content.md-menu-bar-menu.md-dense .md-menu>.md-button{padding-left:0;padding-right:16px}md-menu-content.md-menu-bar-menu.md-dense .md-menu>.md-button:after{display:block;content:'\25BC';position:absolute;top:0;speak:none;transform:rotate(270deg) scaleY(.45) scaleX(.9);right:28px}[dir=rtl] md-menu-content.md-menu-bar-menu.md-dense .md-menu>.md-button:after{transform:rotate(90deg) scaleY(.45) scaleX(.9)}[dir=rtl] md-menu-content.md-menu-bar-menu.md-dense .md-menu>.md-button:after{right:auto;left:28px}.md-nav-bar{border-style:solid;border-width:0 0 1px;height:48px;position:relative}._md-nav-bar-list{outline:0;list-style:none;margin:0;padding:0;box-sizing:border-box;display:flex;flex-direction:row}.md-nav-item:first-of-type{margin-left:8px}.md-button._md-nav-button{line-height:24px;margin:0 4px;padding:12px 16px;transition:background-color .35s cubic-bezier(.35,0,.25,1)}.md-button._md-nav-button:focus{outline:0}.md-button._md-nav-button:hover{background-color:inherit}md-nav-ink-bar{bottom:0;height:2px;left:auto;position:absolute;right:auto;background-color:#000}md-nav-ink-bar._md-left{transition:left 125ms cubic-bezier(.35,0,.25,1),right .25s cubic-bezier(.35,0,.25,1)}md-nav-ink-bar._md-right{transition:left .25s cubic-bezier(.35,0,.25,1),right 125ms cubic-bezier(.35,0,.25,1)}md-nav-extra-content{min-height:48px;padding-right:12px}.md-panel-outer-wrapper{height:100%;left:0;position:absolute;top:0;width:100%}._md-panel-hidden{display:none}._md-panel-fullscreen{border-radius:0;left:0;min-height:100%;min-width:100%;position:fixed;top:0}._md-panel-shown .md-panel{opacity:1;transition:none}.md-panel{opacity:0;position:fixed}.md-panel._md-panel-shown{opacity:1;transition:none}.md-panel._md-panel-animate-enter{opacity:1;transition:all .3s cubic-bezier(0,0,.2,1)}.md-panel._md-panel-animate-leave{opacity:1;transition:all .3s cubic-bezier(.4,0,1,1)}.md-panel._md-panel-animate-fade-out,.md-panel._md-panel-animate-scale-out{opacity:0}.md-panel._md-panel-backdrop{height:100%;position:absolute;width:100%}.md-panel._md-opaque-enter{opacity:.48;transition:opacity .3s cubic-bezier(0,0,.2,1)}.md-panel._md-opaque-leave{transition:opacity .3s cubic-bezier(.4,0,1,1)}@keyframes indeterminate-rotate{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}md-progress-circular{position:relative;display:block}md-progress-circular._md-progress-circular-disabled{visibility:hidden}md-progress-circular.md-mode-indeterminate svg{animation:indeterminate-rotate 2.9s linear infinite}md-progress-circular svg{position:absolute;overflow:visible;top:0;left:0}md-progress-linear{display:block;position:relative;width:100%;height:5px;padding-top:0!important;margin-bottom:0!important}md-progress-linear._md-progress-linear-disabled{visibility:hidden}md-progress-linear .md-container{display:block;position:relative;overflow:hidden;width:100%;height:5px;transform:translate(0,0) scale(1,1)}md-progress-linear .md-container .md-bar{position:absolute;left:0;top:0;bottom:0;width:100%;height:5px}md-progress-linear .md-container .md-dashed:before{content:"";display:none;position:absolute;margin-top:0;height:5px;width:100%;background-color:transparent;background-size:10px 10px!important;background-position:0 -23px}md-progress-linear .md-container .md-bar1,md-progress-linear .md-container .md-bar2{transition:transform .2s linear}md-progress-linear .md-container.md-mode-query .md-bar1{display:none}md-progress-linear .md-container.md-mode-query .md-bar2{transition:all .2s linear;animation:query .8s infinite cubic-bezier(.39,.575,.565,1)}md-progress-linear .md-container.md-mode-determinate .md-bar1{display:none}md-progress-linear .md-container.md-mode-indeterminate .md-bar1{animation:md-progress-linear-indeterminate-scale-1 4s infinite,md-progress-linear-indeterminate-1 4s infinite}md-progress-linear .md-container.md-mode-indeterminate .md-bar2{animation:md-progress-linear-indeterminate-scale-2 4s infinite,md-progress-linear-indeterminate-2 4s infinite}md-progress-linear .md-container.ng-hide ._md-progress-linear-disabled md-progress-linear .md-container{animation:none}md-progress-linear .md-container.ng-hide ._md-progress-linear-disabled md-progress-linear .md-container .md-bar1{animation-name:none}md-progress-linear .md-container.ng-hide ._md-progress-linear-disabled md-progress-linear .md-container .md-bar2{animation-name:none}md-progress-linear .md-container.md-mode-buffer{background-color:transparent!important;transition:all .2s linear}md-progress-linear .md-container.md-mode-buffer .md-dashed:before{display:block;animation:buffer 3s infinite linear}@keyframes query{0%{opacity:1;transform:translateX(35%) scale(.3,1)}100%{opacity:0;transform:translateX(-50%) scale(0,1)}}@keyframes buffer{0%{opacity:1;background-position:0 -23px}50%{opacity:0}100%{opacity:1;background-position:-200px -23px}}@keyframes md-progress-linear-indeterminate-scale-1{0%{transform:scaleX(.1);animation-timing-function:linear}36.6%{transform:scaleX(.1);animation-timing-function:cubic-bezier(.334731432,.124819821,.785843996,1)}69.15%{transform:scaleX(.83);animation-timing-function:cubic-bezier(.225732004,0,.233648906,1.3709798)}100%{transform:scaleX(.1)}}@keyframes md-progress-linear-indeterminate-1{0%{left:-105.166666667%;animation-timing-function:linear}20%{left:-105.166666667%;animation-timing-function:cubic-bezier(.5,0,.701732,.495818703)}69.15%{left:21.5%;animation-timing-function:cubic-bezier(.302435,.38135197,.55,.956352125)}100%{left:95.4444444444%}}@keyframes md-progress-linear-indeterminate-scale-2{0%{transform:scaleX(.1);animation-timing-function:cubic-bezier(.205028172,.057050836,.57660995,.453970841)}19.15%{transform:scaleX(.57);animation-timing-function:cubic-bezier(.152312994,.196431957,.648373778,1.00431535)}44.15%{transform:scaleX(.91);animation-timing-function:cubic-bezier(.25775882,-.003163357,.211761916,1.38178961)}100%{transform:scaleX(.1)}}@keyframes md-progress-linear-indeterminate-2{0%{left:-54.8888888889%;animation-timing-function:cubic-bezier(.15,0,.5150584,.409684966)}25%{left:-17.25%;animation-timing-function:cubic-bezier(.3103299,.284057684,.8,.733718979)}48.35%{left:29.5%;animation-timing-function:cubic-bezier(.4,.627034903,.6,.902025796)}100%{left:117.388888889%}}md-radio-button{box-sizing:border-box;display:block;margin-bottom:16px;white-space:nowrap;cursor:pointer;position:relative}md-radio-button[disabled]{cursor:default}md-radio-button[disabled] .md-container{cursor:default}md-radio-button .md-container{position:absolute;top:50%;transform:translateY(-50%);box-sizing:border-box;display:inline-block;width:20px;height:20px;cursor:pointer;left:0;right:auto}[dir=rtl] md-radio-button .md-container{left:auto}[dir=rtl] md-radio-button .md-container{right:0}md-radio-button .md-container .md-ripple-container{position:absolute;display:block;width:auto;height:auto;left:-15px;top:-15px;right:-15px;bottom:-15px}md-radio-button .md-container:before{box-sizing:border-box;background-color:transparent;border-radius:50%;content:'';position:absolute;display:block;height:auto;left:0;top:0;right:0;bottom:0;transition:all .5s;width:auto}md-radio-button.md-align-top-left>div.md-container{top:12px}md-radio-button .md-off{box-sizing:border-box;position:absolute;top:0;left:0;width:20px;height:20px;border-style:solid;border-width:2px;border-radius:50%;transition:border-color ease .28s}md-radio-button .md-on{box-sizing:border-box;position:absolute;top:0;left:0;width:20px;height:20px;border-radius:50%;transition:transform ease .28s;transform:scale(0)}md-radio-button.md-checked .md-on{transform:scale(.5)}md-radio-button .md-label{box-sizing:border-box;position:relative;display:inline-block;margin-left:30px;margin-right:0;vertical-align:middle;white-space:normal;pointer-events:none;width:auto}[dir=rtl] md-radio-button .md-label{margin-left:0}[dir=rtl] md-radio-button .md-label{margin-right:30px}md-radio-group.layout-column md-radio-button,md-radio-group.layout-gt-lg-column md-radio-button,md-radio-group.layout-gt-md-column md-radio-button,md-radio-group.layout-gt-sm-column md-radio-button,md-radio-group.layout-gt-xs-column md-radio-button,md-radio-group.layout-lg-column md-radio-button,md-radio-group.layout-md-column md-radio-button,md-radio-group.layout-sm-column md-radio-button,md-radio-group.layout-xl-column md-radio-button,md-radio-group.layout-xs-column md-radio-button{margin-bottom:16px}md-radio-group.layout-gt-lg-row md-radio-button,md-radio-group.layout-gt-md-row md-radio-button,md-radio-group.layout-gt-sm-row md-radio-button,md-radio-group.layout-gt-xs-row md-radio-button,md-radio-group.layout-lg-row md-radio-button,md-radio-group.layout-md-row md-radio-button,md-radio-group.layout-row md-radio-button,md-radio-group.layout-sm-row md-radio-button,md-radio-group.layout-xl-row md-radio-button,md-radio-group.layout-xs-row md-radio-button{margin-top:0;margin-bottom:0;margin-left:0;margin-right:16px}[dir=rtl] md-radio-group.layout-gt-lg-row md-radio-button,[dir=rtl] md-radio-group.layout-gt-md-row md-radio-button,[dir=rtl] md-radio-group.layout-gt-sm-row md-radio-button,[dir=rtl] md-radio-group.layout-gt-xs-row md-radio-button,[dir=rtl] md-radio-group.layout-lg-row md-radio-button,[dir=rtl] md-radio-group.layout-md-row md-radio-button,[dir=rtl] md-radio-group.layout-row md-radio-button,[dir=rtl] md-radio-group.layout-sm-row md-radio-button,[dir=rtl] md-radio-group.layout-xl-row md-radio-button,[dir=rtl] md-radio-group.layout-xs-row md-radio-button{margin-left:16px}[dir=rtl] md-radio-group.layout-gt-lg-row md-radio-button,[dir=rtl] md-radio-group.layout-gt-md-row md-radio-button,[dir=rtl] md-radio-group.layout-gt-sm-row md-radio-button,[dir=rtl] md-radio-group.layout-gt-xs-row md-radio-button,[dir=rtl] md-radio-group.layout-lg-row md-radio-button,[dir=rtl] md-radio-group.layout-md-row md-radio-button,[dir=rtl] md-radio-group.layout-row md-radio-button,[dir=rtl] md-radio-group.layout-sm-row md-radio-button,[dir=rtl] md-radio-group.layout-xl-row md-radio-button,[dir=rtl] md-radio-group.layout-xs-row md-radio-button{margin-right:0}md-radio-group.layout-gt-lg-row md-radio-button:last-of-type,md-radio-group.layout-gt-md-row md-radio-button:last-of-type,md-radio-group.layout-gt-sm-row md-radio-button:last-of-type,md-radio-group.layout-gt-xs-row md-radio-button:last-of-type,md-radio-group.layout-lg-row md-radio-button:last-of-type,md-radio-group.layout-md-row md-radio-button:last-of-type,md-radio-group.layout-row md-radio-button:last-of-type,md-radio-group.layout-sm-row md-radio-button:last-of-type,md-radio-group.layout-xl-row md-radio-button:last-of-type,md-radio-group.layout-xs-row md-radio-button:last-of-type{margin-left:0;margin-right:0}md-radio-group:focus{outline:0}md-radio-group.md-focused .md-checked .md-container:before{left:-8px;top:-8px;right:-8px;bottom:-8px}md-radio-group[disabled] md-radio-button{cursor:default}md-radio-group[disabled] md-radio-button .md-container{cursor:default}.md-inline-form md-radio-group{margin:18px 0 19px}.md-inline-form md-radio-group md-radio-button{display:inline-block;height:30px;padding:2px;box-sizing:border-box;margin-top:0;margin-bottom:0}@media screen and (-ms-high-contrast:active){md-radio-button.md-default-theme .md-on{background-color:#fff}}md-input-container:not([md-no-float]) .md-select-placeholder span:first-child{transition:transform .4s cubic-bezier(.25,.8,.25,1);transform-origin:left top}[dir=rtl] md-input-container:not([md-no-float]) .md-select-placeholder span:first-child{transform-origin:right top}md-input-container.md-input-focused:not([md-no-float]) .md-select-placeholder span:first-child{transform:translateY(-22px) translateX(-2px) scale(.75)}.md-select-menu-container{position:fixed;left:0;top:0;z-index:90;opacity:0;display:none;transform:translateY(-1px)}.md-select-menu-container:not(.md-clickable){pointer-events:none}.md-select-menu-container md-progress-circular{display:table;margin:24px auto!important}.md-select-menu-container.md-active{display:block;opacity:1}.md-select-menu-container.md-active md-select-menu{transition:all .4s cubic-bezier(.25,.8,.25,1);transition-duration:150ms}.md-select-menu-container.md-active md-select-menu>*{opacity:1;transition:all .3s cubic-bezier(.55,0,.55,.2);transition-duration:150ms;transition-delay:.1s}.md-select-menu-container.md-leave{opacity:0;transition:all .3s cubic-bezier(.55,0,.55,.2);transition-duration:250ms}md-input-container>md-select{margin:0;order:2}md-input-container:not(.md-input-has-value) md-select.ng-required:not(.md-no-asterisk) .md-select-value span:first-child:after,md-input-container:not(.md-input-has-value) md-select[required]:not(.md-no-asterisk) .md-select-value span:first-child:after{content:' *';font-size:13px;vertical-align:top}md-input-container.md-input-invalid md-select .md-select-value{border-bottom-style:solid;padding-bottom:1px}md-select{display:flex;margin:20px 0 26px 0}md-select.ng-required.ng-invalid:not(.md-no-asterisk) .md-select-value span:first-child:after,md-select[required].ng-invalid:not(.md-no-asterisk) .md-select-value span:first-child:after{content:' *';font-size:13px;vertical-align:top}md-select[disabled] .md-select-value{background-position:0 bottom;background-size:4px 1px;background-repeat:repeat-x;margin-bottom:-1px}md-select:focus{outline:0}md-select[disabled]:hover{cursor:default}md-select:not([disabled]):hover{cursor:pointer}md-select:not([disabled]).ng-invalid.ng-touched .md-select-value{border-bottom-style:solid;padding-bottom:1px}md-select:not([disabled]):focus .md-select-value{border-bottom-width:2px;border-bottom-style:solid;padding-bottom:0}md-select:not([disabled]):focus.ng-invalid.ng-touched .md-select-value{padding-bottom:0}md-input-container.md-input-has-value .md-select-value>span:not(.md-select-icon){transform:translate3d(0,1px,0)}.md-select-value{display:flex;align-items:center;padding:2px 2px 1px;border-bottom-width:1px;border-bottom-style:solid;background-color:transparent;position:relative;box-sizing:content-box;min-width:64px;min-height:26px;flex-grow:1}.md-select-value>span:not(.md-select-icon){max-width:100%;flex:1 1 auto;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.md-select-value>span:not(.md-select-icon) .md-text{display:inline}.md-select-value .md-select-icon{display:block;align-items:flex-end;text-align:end;width:24px;margin:0 4px;transform:translate3d(0,-2px,0);font-size:1.2rem}.md-select-value .md-select-icon:after{display:block;content:'\25BC';position:relative;top:2px;speak:none;font-size:13px;transform:scaleY(.5) scaleX(1)}.md-select-value.md-select-placeholder{display:flex;order:1;pointer-events:none;-webkit-font-smoothing:antialiased;padding-left:2px;z-index:1}md-select-menu{display:flex;flex-direction:column;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);max-height:256px;min-height:48px;overflow-y:hidden;transform-origin:left top;transform:scale(1)}md-select-menu.md-reverse{flex-direction:column-reverse}md-select-menu:not(.md-overflow) md-content{padding-top:8px;padding-bottom:8px}[dir=rtl] md-select-menu{transform-origin:right top}md-select-menu md-content{min-width:136px;min-height:48px;max-height:256px;overflow-y:auto}md-select-menu>*{opacity:0}md-option{cursor:pointer;position:relative;display:flex;align-items:center;width:auto;transition:background .15s linear;padding:0 16px 0 16px;height:48px}md-option[disabled]{cursor:default}md-option:focus{outline:0}md-option .md-text{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}md-optgroup{display:block}md-optgroup label{display:block;font-size:14px;text-transform:uppercase;padding:16px;font-weight:500}md-optgroup md-option{padding-left:32px;padding-right:32px}@media screen and (-ms-high-contrast:active){.md-select-backdrop{background-color:transparent}md-select-menu{border:1px solid #fff}}md-select-menu[multiple] md-option.md-checkbox-enabled{padding-left:40px;padding-right:16px}[dir=rtl] md-select-menu[multiple] md-option.md-checkbox-enabled{padding-left:16px}[dir=rtl] md-select-menu[multiple] md-option.md-checkbox-enabled{padding-right:40px}md-select-menu[multiple] md-option.md-checkbox-enabled .md-container{position:absolute;top:50%;transform:translateY(-50%);box-sizing:border-box;display:inline-block;width:20px;height:20px;left:0;right:auto}[dir=rtl] md-select-menu[multiple] md-option.md-checkbox-enabled .md-container{left:auto}[dir=rtl] md-select-menu[multiple] md-option.md-checkbox-enabled .md-container{right:0}md-select-menu[multiple] md-option.md-checkbox-enabled .md-container:before{box-sizing:border-box;background-color:transparent;border-radius:50%;content:'';position:absolute;display:block;height:auto;left:0;top:0;right:0;bottom:0;transition:all .5s;width:auto}md-select-menu[multiple] md-option.md-checkbox-enabled .md-container:after{box-sizing:border-box;content:'';position:absolute;top:-10px;right:-10px;bottom:-10px;left:-10px}md-select-menu[multiple] md-option.md-checkbox-enabled .md-container .md-ripple-container{position:absolute;display:block;width:auto;height:auto;left:-15px;top:-15px;right:-15px;bottom:-15px}md-select-menu[multiple] md-option.md-checkbox-enabled .md-icon{box-sizing:border-box;transition:240ms;position:absolute;top:0;left:0;width:20px;height:20px;border-width:2px;border-style:solid;border-radius:2px}md-select-menu[multiple] md-option.md-checkbox-enabled[selected] .md-icon{border-color:transparent}md-select-menu[multiple] md-option.md-checkbox-enabled[selected] .md-icon:after{box-sizing:border-box;transform:rotate(45deg);position:absolute;left:4.6666666667px;top:.2222222222px;display:table;width:6.6666666667px;height:13.3333333333px;border-width:2px;border-style:solid;border-top:0;border-left:0;content:''}md-select-menu[multiple] md-option.md-checkbox-enabled[disabled]{cursor:default}md-select-menu[multiple] md-option.md-checkbox-enabled.md-indeterminate .md-icon:after{box-sizing:border-box;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:table;width:12px;height:2px;border-width:2px;border-style:solid;border-top:0;border-left:0;content:''}md-select-menu[multiple] md-option.md-checkbox-enabled .md-container{margin-left:10.6666666667px;margin-right:auto}[dir=rtl] md-select-menu[multiple] md-option.md-checkbox-enabled .md-container{margin-left:auto}[dir=rtl] md-select-menu[multiple] md-option.md-checkbox-enabled .md-container{margin-right:10.6666666667px}md-sidenav{box-sizing:border-box;position:absolute;flex-direction:column;z-index:60;width:320px;max-width:320px;bottom:0;overflow:auto;-webkit-overflow-scrolling:touch}md-sidenav ul{list-style:none}md-sidenav.md-closed{display:none}md-sidenav.md-closed-add,md-sidenav.md-closed-remove{display:flex;transition:.2s ease-in all}md-sidenav.md-closed-add.md-closed-add-active,md-sidenav.md-closed-remove.md-closed-remove-active{transition:all .4s cubic-bezier(.25,.8,.25,1)}md-sidenav.md-locked-open-add,md-sidenav.md-locked-open-remove{position:static;display:flex;transform:translate3d(0,0,0)}md-sidenav.md-locked-open,md-sidenav.md-locked-open-remove.md-closed,md-sidenav.md-locked-open.md-closed,md-sidenav.md-locked-open.md-closed.md-sidenav-left,md-sidenav.md-locked-open.md-closed.md-sidenav-right{position:static;display:flex;transform:translate3d(0,0,0)}md-sidenav.md-locked-open-remove-active{transition:width .3s cubic-bezier(.55,0,.55,.2),min-width .3s cubic-bezier(.55,0,.55,.2);width:0!important;min-width:0!important}md-sidenav.md-closed.md-locked-open-add{width:0!important;min-width:0!important;transform:translate3d(0,0,0)}md-sidenav.md-closed.md-locked-open-add-active{transition:width .3s cubic-bezier(.55,0,.55,.2),min-width .3s cubic-bezier(.55,0,.55,.2);width:320px;min-width:320px;transform:translate3d(0,0,0)}.md-sidenav-backdrop.md-locked-open{display:none}.md-sidenav-left,md-sidenav{left:0;top:0;transform:translate3d(0,0,0)}.md-sidenav-left.md-closed,md-sidenav.md-closed{transform:translate3d(-100%,0,0)}.md-sidenav-right{left:100%;top:0;transform:translate(-100%,0)}.md-sidenav-right.md-closed{transform:translate(0,0)}@media (min-width:600px){md-sidenav{max-width:400px}}@media (max-width:456px){md-sidenav{width:calc(100% - 56px);min-width:calc(100% - 56px);max-width:calc(100% - 56px)}}@media screen and (-ms-high-contrast:active){.md-sidenav-left,md-sidenav{border-right:1px solid #fff}.md-sidenav-right{border-left:1px solid #fff}}@keyframes sliderFocusThumb{0%{transform:scale(.7)}30%{transform:scale(1)}100%{transform:scale(.7)}}@keyframes sliderDiscreteFocusThumb{0%{transform:scale(.7)}50%{transform:scale(.8)}100%{transform:scale(0)}}@keyframes sliderDiscreteFocusRing{0%{transform:scale(.7);opacity:0}50%{transform:scale(1);opacity:1}100%{transform:scale(0)}}md-slider{height:48px;min-width:128px;position:relative;margin-left:4px;margin-right:4px;padding:0;display:block;flex-direction:row}md-slider *,md-slider :after{box-sizing:border-box}md-slider .md-slider-wrapper{outline:0;width:100%;height:100%}md-slider .md-slider-content{position:relative}md-slider .md-track-container{width:100%;position:absolute;top:23px;height:2px}md-slider .md-track{position:absolute;left:0;right:0;height:100%}md-slider .md-track-fill{transition:all .4s cubic-bezier(.25,.8,.25,1);transition-property:width,height}md-slider .md-track-ticks{position:absolute;left:0;right:0;height:100%}md-slider .md-track-ticks canvas{width:100%;height:100%}md-slider .md-thumb-container{position:absolute;left:0;top:50%;transform:translate3d(-50%,-50%,0);transition:all .4s cubic-bezier(.25,.8,.25,1);transition-property:left,right,bottom}[dir=rtl] md-slider .md-thumb-container{left:auto;right:0}md-slider .md-thumb{z-index:1;position:absolute;left:-10px;top:14px;width:20px;height:20px;border-radius:20px;transform:scale(.7);transition:all .4s cubic-bezier(.25,.8,.25,1)}[dir=rtl] md-slider .md-thumb{left:auto;right:-10px}md-slider .md-thumb:after{content:'';position:absolute;width:20px;height:20px;border-radius:20px;border-width:3px;border-style:solid;transition:inherit}md-slider .md-sign{display:flex;align-items:center;justify-content:center;position:absolute;left:-14px;top:-17px;width:28px;height:28px;border-radius:28px;transform:scale(.4) translate3d(0,67.5px,0);transition:all .3s cubic-bezier(.35,0,.25,1)}md-slider .md-sign:after{position:absolute;content:'';left:0;border-radius:16px;top:19px;border-left:14px solid transparent;border-right:14px solid transparent;border-top-width:16px;border-top-style:solid;opacity:0;transform:translate3d(0,-8px,0);transition:all .2s cubic-bezier(.35,0,.25,1)}[dir=rtl] md-slider .md-sign:after{left:auto;right:0}md-slider .md-sign .md-thumb-text{z-index:1;font-size:12px;font-weight:700}md-slider .md-focus-ring{position:absolute;left:-17px;top:7px;width:34px;height:34px;border-radius:34px;transform:scale(.7);opacity:0;transition:all .35s cubic-bezier(.35,0,.25,1)}[dir=rtl] md-slider .md-focus-ring{left:auto;right:-17px}md-slider .md-disabled-thumb{position:absolute;left:-14px;top:10px;width:28px;height:28px;border-radius:28px;transform:scale(.5);border-width:4px;border-style:solid;display:none}[dir=rtl] md-slider .md-disabled-thumb{left:auto;right:-14px}md-slider.md-min .md-sign{opacity:0}md-slider:focus{outline:0}md-slider.md-dragging .md-thumb-container,md-slider.md-dragging .md-track-fill{transition:none}md-slider:not([md-discrete]) .md-sign,md-slider:not([md-discrete]) .md-track-ticks{display:none}md-slider:not([md-discrete]):not([disabled]) .md-slider-wrapper .md-thumb:hover{transform:scale(.8)}md-slider:not([md-discrete]):not([disabled]) .md-slider-wrapper.md-focused .md-focus-ring{transform:scale(1);opacity:1}md-slider:not([md-discrete]):not([disabled]) .md-slider-wrapper.md-focused .md-thumb{animation:sliderFocusThumb .7s cubic-bezier(.35,0,.25,1)}md-slider:not([md-discrete]):not([disabled]).md-active .md-slider-wrapper .md-thumb{transform:scale(1)}md-slider[md-discrete]:not([disabled]) .md-slider-wrapper.md-focused .md-focus-ring{transform:scale(0);animation:sliderDiscreteFocusRing .5s cubic-bezier(.35,0,.25,1)}md-slider[md-discrete]:not([disabled]) .md-slider-wrapper.md-focused .md-thumb{animation:sliderDiscreteFocusThumb .5s cubic-bezier(.35,0,.25,1)}md-slider[md-discrete]:not([disabled]) .md-slider-wrapper.md-focused .md-thumb,md-slider[md-discrete]:not([disabled]).md-active .md-thumb{transform:scale(0)}md-slider[md-discrete]:not([disabled]) .md-slider-wrapper.md-focused .md-sign,md-slider[md-discrete]:not([disabled]) .md-slider-wrapper.md-focused .md-sign:after,md-slider[md-discrete]:not([disabled]).md-active .md-sign,md-slider[md-discrete]:not([disabled]).md-active .md-sign:after{opacity:1;transform:translate3d(0,0,0) scale(1)}md-slider[md-discrete][disabled][readonly] .md-thumb{transform:scale(0)}md-slider[md-discrete][disabled][readonly] .md-sign,md-slider[md-discrete][disabled][readonly] .md-sign:after{opacity:1;transform:translate3d(0,0,0) scale(1)}md-slider[disabled] .md-track-fill{display:none}md-slider[disabled] .md-track-ticks{opacity:0}md-slider[disabled]:not([readonly]) .md-sign{opacity:0}md-slider[disabled] .md-thumb{transform:scale(.5)}md-slider[disabled] .md-disabled-thumb{display:block}md-slider[md-vertical]{flex-direction:column;min-height:128px;min-width:0}md-slider[md-vertical] .md-slider-wrapper{flex:1;padding-top:12px;padding-bottom:12px;width:48px;align-self:center;display:flex;justify-content:center}md-slider[md-vertical] .md-track-container{height:100%;width:2px;top:0;left:calc(50% - (2px / 2))}md-slider[md-vertical] .md-thumb-container{top:auto;margin-bottom:23px;left:calc(50% - 1px);bottom:0}md-slider[md-vertical] .md-thumb-container .md-thumb:after{left:1px}md-slider[md-vertical] .md-thumb-container .md-focus-ring{left:-16px}md-slider[md-vertical] .md-track-fill{bottom:0}md-slider[md-vertical][md-discrete] .md-sign{left:-40px;top:9.5px;transform:scale(.4) translate3d(67.5px,0,0)}md-slider[md-vertical][md-discrete] .md-sign:after{top:9.5px;left:19px;border-top:14px solid transparent;border-right:0;border-bottom:14px solid transparent;border-left-width:16px;border-left-style:solid;opacity:0;transform:translate3d(0,-8px,0);transition:all .2s ease-in-out}md-slider[md-vertical][md-discrete] .md-sign .md-thumb-text{z-index:1;font-size:12px;font-weight:700}md-slider[md-vertical][md-discrete] .md-focused .md-sign:after,md-slider[md-vertical][md-discrete].md-active .md-sign:after,md-slider[md-vertical][md-discrete][disabled][readonly] .md-sign:after{top:0}md-slider[md-vertical][disabled][readonly] .md-thumb{transform:scale(0)}md-slider[md-vertical][disabled][readonly] .md-sign,md-slider[md-vertical][disabled][readonly] .md-sign:after{opacity:1;transform:translate3d(0,0,0) scale(1)}md-slider[md-invert]:not([md-vertical]) .md-track-fill{left:auto;right:0}[dir=rtl] md-slider[md-invert]:not([md-vertical]) .md-track-fill{left:0}[dir=rtl] md-slider[md-invert]:not([md-vertical]) .md-track-fill{right:auto}md-slider[md-invert][md-vertical] .md-track-fill{bottom:auto;top:0}md-slider-container{display:flex;align-items:center;flex-direction:row}md-slider-container>:first-child:not(md-slider),md-slider-container>:last-child:not(md-slider){min-width:25px;max-width:42px;height:25px;transition:all .4s cubic-bezier(.25,.8,.25,1);transition-property:color,max-width}md-slider-container>:first-child:not(md-slider){margin-right:16px}[dir=rtl] md-slider-container>:first-child:not(md-slider){margin-right:auto;margin-left:16px}md-slider-container>:last-child:not(md-slider){margin-left:16px}[dir=rtl] md-slider-container>:last-child:not(md-slider){margin-left:auto;margin-right:16px}md-slider-container[md-vertical]{flex-direction:column}md-slider-container[md-vertical]>:first-child:not(md-slider),md-slider-container[md-vertical]>:last-child:not(md-slider){margin-right:0;margin-left:0;text-align:center}md-slider-container md-input-container input[type=number]{text-align:center;padding-left:15px;height:50px;margin-top:-25px}[dir=rtl] md-slider-container md-input-container input[type=number]{padding-left:0;padding-right:15px}@media screen and (-ms-high-contrast:active){md-slider.md-default-theme .md-track{border-bottom:1px solid #fff}}.md-sticky-clone{z-index:2;top:0;left:0;right:0;position:absolute!important;transform:translate3d(-9999px,-9999px,0)}.md-sticky-clone[sticky-state=active]{transform:translate3d(0,0,0)}.md-sticky-clone[sticky-state=active]:not(.md-sticky-no-effect) .md-subheader-inner{animation:subheaderStickyHoverIn .3s ease-out both}@keyframes subheaderStickyHoverIn{0%{box-shadow:0 0 0 0 transparent}100%{box-shadow:0 2px 4px 0 rgba(0,0,0,.16)}}@keyframes subheaderStickyHoverOut{0%{box-shadow:0 2px 4px 0 rgba(0,0,0,.16)}100%{box-shadow:0 0 0 0 transparent}}.md-subheader-wrapper:not(.md-sticky-no-effect){transition:.2s ease-out margin}.md-subheader-wrapper:not(.md-sticky-no-effect) .md-subheader{margin:0}.md-subheader-wrapper:not(.md-sticky-no-effect).md-sticky-clone{z-index:2}.md-subheader-wrapper:not(.md-sticky-no-effect)[sticky-state=active]{margin-top:-2px}.md-subheader-wrapper:not(.md-sticky-no-effect):not(.md-sticky-clone)[sticky-prev-state=active] .md-subheader-inner:after{animation:subheaderStickyHoverOut .3s ease-out both}.md-subheader{display:block;font-size:14px;font-weight:500;line-height:1em;margin:0;position:relative}.md-subheader .md-subheader-inner{display:block;padding:16px}.md-subheader .md-subheader-content{display:block;z-index:1;position:relative}.md-inline-form md-switch{margin-top:18px;margin-bottom:19px}md-switch{margin:16px 0;white-space:nowrap;cursor:pointer;outline:0;user-select:none;height:30px;line-height:28px;align-items:center;display:flex;margin-left:inherit;margin-right:16px}[dir=rtl] md-switch{margin-left:16px}[dir=rtl] md-switch{margin-right:inherit}md-switch:last-of-type{margin-left:inherit;margin-right:0}[dir=rtl] md-switch:last-of-type{margin-left:0}[dir=rtl] md-switch:last-of-type{margin-right:inherit}md-switch[disabled]{cursor:default}md-switch[disabled] .md-container{cursor:default}md-switch .md-container{cursor:grab;width:36px;height:24px;position:relative;user-select:none;margin-right:8px;float:left}[dir=rtl] md-switch .md-container{margin-right:auto;margin-left:8px}md-switch:not([disabled]) .md-dragging,md-switch:not([disabled]).md-dragging .md-container{cursor:grabbing}md-switch.md-focused:not([disabled]) .md-thumb:before{left:-8px;top:-8px;right:-8px;bottom:-8px}md-switch.md-focused:not([disabled]):not(.md-checked) .md-thumb:before{background-color:rgba(0,0,0,.12)}md-switch .md-label{border-color:transparent;border-width:0;float:left}md-switch .md-bar{left:1px;width:34px;top:5px;height:14px;border-radius:8px;position:absolute}md-switch .md-thumb-container{top:2px;left:0;width:16px;position:absolute;transform:translate3d(0,0,0);z-index:1}md-switch.md-checked .md-thumb-container{transform:translate3d(100%,0,0)}md-switch .md-thumb{position:absolute;margin:0;left:0;top:0;outline:0;height:20px;width:20px;border-radius:50%;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}md-switch .md-thumb:before{background-color:transparent;border-radius:50%;content:'';position:absolute;display:block;height:auto;left:0;top:0;right:0;bottom:0;transition:all .5s;width:auto}md-switch .md-thumb .md-ripple-container{position:absolute;display:block;width:auto;height:auto;left:-20px;top:-20px;right:-20px;bottom:-20px}md-switch:not(.md-dragging) .md-bar,md-switch:not(.md-dragging) .md-thumb,md-switch:not(.md-dragging) .md-thumb-container{transition:all 80ms linear;transition-property:transform,background-color}md-switch:not(.md-dragging) .md-bar,md-switch:not(.md-dragging) .md-thumb{transition-delay:50ms}@media screen and (-ms-high-contrast:active){md-switch.md-default-theme .md-bar{background-color:#666}md-switch.md-default-theme.md-checked .md-bar{background-color:#9e9e9e}md-switch.md-default-theme .md-thumb{background-color:#fff}}@keyframes md-tab-content-hide{0%{opacity:1}50%{opacity:1}100%{opacity:0}}md-tab-data{position:absolute;top:0;left:0;right:0;bottom:0;z-index:-1;opacity:0}md-tabs{display:block;margin:0;border-radius:2px;overflow:hidden;position:relative;flex-shrink:0}md-tabs:not(.md-no-tab-content):not(.md-dynamic-height){min-height:248px}md-tabs[md-align-tabs=bottom]{padding-bottom:48px}md-tabs[md-align-tabs=bottom] md-tabs-wrapper{position:absolute;bottom:0;left:0;right:0;height:48px;z-index:2}md-tabs[md-align-tabs=bottom] md-tabs-content-wrapper{top:0;bottom:48px}md-tabs.md-dynamic-height md-tabs-content-wrapper{min-height:0;position:relative;top:auto;left:auto;right:auto;bottom:auto;overflow:visible}md-tabs.md-dynamic-height md-tab-content.md-active{position:relative}md-tabs[md-border-bottom] md-tabs-wrapper{border-width:0 0 1px;border-style:solid}md-tabs[md-border-bottom]:not(.md-dynamic-height) md-tabs-content-wrapper{top:49px}md-tabs-wrapper{display:block;position:relative;transform:translate3d(0,0,0)}md-tabs-wrapper md-next-button,md-tabs-wrapper md-prev-button{height:100%;width:32px;position:absolute;top:50%;transform:translateY(-50%);line-height:1em;z-index:2;cursor:pointer;font-size:16px;background:transparent no-repeat center center;transition:all .5s cubic-bezier(.35,0,.25,1)}md-tabs-wrapper md-next-button:focus,md-tabs-wrapper md-prev-button:focus{outline:0}md-tabs-wrapper md-next-button.md-disabled,md-tabs-wrapper md-prev-button.md-disabled{opacity:.25;cursor:default}md-tabs-wrapper md-next-button.ng-leave,md-tabs-wrapper md-prev-button.ng-leave{transition:none}md-tabs-wrapper md-next-button md-icon,md-tabs-wrapper md-prev-button md-icon{position:absolute;top:50%;left:50%;transform:translate3d(-50%,-50%,0)}md-tabs-wrapper md-prev-button{left:0;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE3LjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPiA8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPiA8c3ZnIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIyNHB4IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMjQgMjQiIHhtbDpzcGFjZT0icHJlc2VydmUiPiA8ZyBpZD0iSGVhZGVyIj4gPGc+IDxyZWN0IHg9Ii02MTgiIHk9Ii0xMjA4IiBmaWxsPSJub25lIiB3aWR0aD0iMTQwMCIgaGVpZ2h0PSIzNjAwIi8+IDwvZz4gPC9nPiA8ZyBpZD0iTGFiZWwiPiA8L2c+IDxnIGlkPSJJY29uIj4gPGc+IDxwb2x5Z29uIHBvaW50cz0iMTUuNCw3LjQgMTQsNiA4LDEyIDE0LDE4IDE1LjQsMTYuNiAxMC44LDEyIAkJIiBzdHlsZT0iZmlsbDp3aGl0ZTsiLz4gPHJlY3QgZmlsbD0ibm9uZSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ii8+IDwvZz4gPC9nPiA8ZyBpZD0iR3JpZCIgZGlzcGxheT0ibm9uZSI+IDxnIGRpc3BsYXk9ImlubGluZSI+IDwvZz4gPC9nPiA8L3N2Zz4NCg==)}[dir=rtl] md-tabs-wrapper md-prev-button{left:auto;right:0}md-tabs-wrapper md-next-button{right:0;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE3LjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPiA8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPiA8c3ZnIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIyNHB4IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMjQgMjQiIHhtbDpzcGFjZT0icHJlc2VydmUiPiA8ZyBpZD0iSGVhZGVyIj4gPGc+IDxyZWN0IHg9Ii02MTgiIHk9Ii0xMzM2IiBmaWxsPSJub25lIiB3aWR0aD0iMTQwMCIgaGVpZ2h0PSIzNjAwIi8+IDwvZz4gPC9nPiA8ZyBpZD0iTGFiZWwiPiA8L2c+IDxnIGlkPSJJY29uIj4gPGc+IDxwb2x5Z29uIHBvaW50cz0iMTAsNiA4LjYsNy40IDEzLjIsMTIgOC42LDE2LjYgMTAsMTggMTYsMTIgCQkiIHN0eWxlPSJmaWxsOndoaXRlOyIvPiA8cmVjdCBmaWxsPSJub25lIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiLz4gPC9nPiA8L2c+IDxnIGlkPSJHcmlkIiBkaXNwbGF5PSJub25lIj4gPGcgZGlzcGxheT0iaW5saW5lIj4gPC9nPiA8L2c+IDwvc3ZnPg0K)}[dir=rtl] md-tabs-wrapper md-next-button{right:auto;left:0}md-tabs-wrapper md-next-button md-icon{transform:translate3d(-50%,-50%,0) rotate(180deg)}md-tabs-wrapper.md-stretch-tabs md-pagination-wrapper{width:100%;display:flex;flex-direction:row}md-tabs-wrapper.md-stretch-tabs md-pagination-wrapper md-tab-item{flex-grow:1}md-tabs-canvas{position:relative;overflow:hidden;display:block;height:48px}md-tabs-canvas:after{content:'';display:table;clear:both}md-tabs-canvas .md-dummy-wrapper{position:absolute;top:0;left:0}[dir=rtl] md-tabs-canvas .md-dummy-wrapper{left:auto;right:0}md-tabs-canvas.md-paginated{margin:0 32px}md-tabs-canvas.md-center-tabs{display:flex;flex-direction:column;text-align:center}md-tabs-canvas.md-center-tabs .md-tab{float:none;display:inline-block}md-pagination-wrapper{height:48px;display:block;transition:transform .5s cubic-bezier(.35,0,.25,1);position:absolute;width:999999px;left:0;transform:translate3d(0,0,0)}md-pagination-wrapper:after{content:'';display:table;clear:both}[dir=rtl] md-pagination-wrapper{left:auto;right:0}md-pagination-wrapper.md-center-tabs{position:relative;width:auto;margin:0 auto}md-tabs-content-wrapper{display:block;position:absolute;top:48px;left:0;right:0;bottom:0;overflow:hidden}md-tab-content{display:block;position:absolute;top:0;left:0;right:0;bottom:0;transition:transform .5s cubic-bezier(.35,0,.25,1);overflow:auto;transform:translate3d(0,0,0)}md-tab-content.md-no-scroll{bottom:auto;overflow:hidden}md-tab-content.md-no-transition,md-tab-content.ng-leave{transition:none}md-tab-content.md-left:not(.md-active){transform:translateX(-100%);animation:1s md-tab-content-hide;opacity:0}[dir=rtl] md-tab-content.md-left:not(.md-active){transform:translateX(100%)}md-tab-content.md-left:not(.md-active) *{transition:visibility 0s linear;transition-delay:.5s;visibility:hidden}md-tab-content.md-right:not(.md-active){transform:translateX(100%);animation:1s md-tab-content-hide;opacity:0}[dir=rtl] md-tab-content.md-right:not(.md-active){transform:translateX(-100%)}md-tab-content.md-right:not(.md-active) *{transition:visibility 0s linear;transition-delay:.5s;visibility:hidden}md-tab-content>div.ng-leave{animation:1s md-tab-content-hide}md-ink-bar{position:absolute;left:auto;right:auto;bottom:0;height:2px}md-ink-bar.md-left{transition:left 125ms cubic-bezier(.35,0,.25,1),right .25s cubic-bezier(.35,0,.25,1)}md-ink-bar.md-right{transition:left .25s cubic-bezier(.35,0,.25,1),right 125ms cubic-bezier(.35,0,.25,1)}md-tab{position:absolute;z-index:-1;left:-9999px}.md-tab{font-size:14px;text-align:center;line-height:24px;padding:12px 24px;transition:background-color .35s cubic-bezier(.35,0,.25,1);cursor:pointer;white-space:nowrap;position:relative;text-transform:uppercase;float:left;font-weight:500;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis}[dir=rtl] .md-tab{float:right}.md-tab.md-focused{box-shadow:none;outline:0}.md-tab.md-active{cursor:default}.md-tab.md-disabled{pointer-events:none;touch-action:pan-y;user-select:none;-webkit-user-drag:none;opacity:.5;cursor:default}.md-tab.ng-leave{transition:none}md-toolbar+md-tabs{border-top-left-radius:0;border-top-right-radius:0}.md-toast-text{padding:0 6px}md-toast{position:absolute;z-index:105;box-sizing:border-box;cursor:default;overflow:hidden;padding:8px;opacity:1;transition:all .4s cubic-bezier(.25,.8,.25,1)}md-toast .md-toast-content{display:flex;direction:row;align-items:center;max-height:168px;max-width:100%;min-height:48px;padding:0 18px;box-shadow:0 2px 5px 0 rgba(0,0,0,.26);border-radius:2px;font-size:14px;overflow:hidden;transform:translate3d(0,0,0) rotateZ(0);transition:all .4s cubic-bezier(.25,.8,.25,1);justify-content:flex-start}md-toast .md-toast-content::before{content:'';min-height:48px;visibility:hidden;display:inline-block}[dir=rtl] md-toast .md-toast-content{justify-content:flex-end}md-toast .md-toast-content span{flex:1 1 0%;box-sizing:border-box;min-width:0}md-toast.md-capsule{border-radius:24px}md-toast.md-capsule .md-toast-content{border-radius:24px}md-toast.ng-leave-active .md-toast-content{transition:all .3s cubic-bezier(.55,0,.55,.2)}md-toast.md-swipedown .md-toast-content,md-toast.md-swipeleft .md-toast-content,md-toast.md-swiperight .md-toast-content,md-toast.md-swipeup .md-toast-content{transition:all .4s cubic-bezier(.25,.8,.25,1)}md-toast.ng-enter{opacity:0}md-toast.ng-enter .md-toast-content{transform:translate3d(0,100%,0)}md-toast.ng-enter.md-top .md-toast-content{transform:translate3d(0,-100%,0)}md-toast.ng-enter.ng-enter-active{opacity:1}md-toast.ng-enter.ng-enter-active .md-toast-content{transform:translate3d(0,0,0)}md-toast.ng-leave.ng-leave-active .md-toast-content{opacity:0;transform:translate3d(0,100%,0)}md-toast.ng-leave.ng-leave-active.md-swipeup .md-toast-content{transform:translate3d(0,-50%,0)}md-toast.ng-leave.ng-leave-active.md-swipedown .md-toast-content{transform:translate3d(0,50%,0)}md-toast.ng-leave.ng-leave-active.md-top .md-toast-content{transform:translate3d(0,-100%,0)}md-toast .md-action{line-height:19px;margin-left:24px;margin-right:0;cursor:pointer;text-transform:uppercase;float:right}md-toast .md-button{min-width:0;margin-right:0;margin-left:12px}[dir=rtl] md-toast .md-button{margin-right:12px}[dir=rtl] md-toast .md-button{margin-left:0}@media (max-width:959px){md-toast{left:0;right:0;width:100%;max-width:100%;min-width:0;border-radius:0;bottom:0;padding:0}md-toast.ng-leave.ng-leave-active.md-swipeup .md-toast-content{transform:translate3d(0,-50%,0)}md-toast.ng-leave.ng-leave-active.md-swipedown .md-toast-content{transform:translate3d(0,50%,0)}}@media (min-width:960px){md-toast{min-width:304px}md-toast.md-bottom{bottom:0}md-toast.md-left{left:0}md-toast.md-right{right:0}md-toast.md-top{top:0}md-toast._md-start{left:0}[dir=rtl] md-toast._md-start{left:auto;right:0}md-toast._md-end{right:0}[dir=rtl] md-toast._md-end{right:auto;left:0}md-toast.ng-leave.ng-leave-active.md-swipeleft .md-toast-content{transform:translate3d(-50%,0,0)}md-toast.ng-leave.ng-leave-active.md-swiperight .md-toast-content{transform:translate3d(50%,0,0)}}@media (min-width:1920px){md-toast .md-toast-content{max-width:568px}}@media screen and (-ms-high-contrast:active){md-toast{border:1px solid #fff}}.md-toast-animating{overflow:hidden!important}md-toolbar{box-sizing:border-box;display:flex;flex-direction:column;position:relative;z-index:2;font-size:20px;min-height:64px;width:100%}md-toolbar._md-toolbar-transitions{transition-duration:.5s;transition-timing-function:cubic-bezier(.35,0,.25,1);transition-property:background-color,fill,color}md-toolbar.md-whiteframe-z1-add,md-toolbar.md-whiteframe-z1-remove{transition:box-shadow .5s linear}md-toolbar md-toolbar-filler{width:72px}md-toolbar *,md-toolbar :after,md-toolbar :before{box-sizing:border-box}md-toolbar.ng-animate{transition:none}md-toolbar.md-tall{height:128px;min-height:128px;max-height:128px}md-toolbar.md-medium-tall{height:88px;min-height:88px;max-height:88px}md-toolbar.md-medium-tall .md-toolbar-tools{height:48px;min-height:48px;max-height:48px}md-toolbar>.md-indent{margin-left:64px}[dir=rtl] md-toolbar>.md-indent{margin-left:auto;margin-right:64px}md-toolbar~md-content>md-list{padding:0}md-toolbar~md-content>md-list md-list-item:last-child md-divider{display:none}.md-toolbar-tools{font-size:20px;letter-spacing:.005em;box-sizing:border-box;font-weight:400;display:flex;align-items:center;flex-direction:row;width:100%;height:64px;max-height:64px;padding:0 16px;margin:0}.md-toolbar-tools h1,.md-toolbar-tools h2,.md-toolbar-tools h3{font-size:inherit;font-weight:inherit;margin:inherit}.md-toolbar-tools a{color:inherit;text-decoration:none}.md-toolbar-tools .fill-height{display:flex;align-items:center}.md-toolbar-tools .md-button{margin-top:0;margin-bottom:0}.md-toolbar-tools .md-button,.md-toolbar-tools .md-button.md-icon-button md-icon{transition-duration:.5s;transition-timing-function:cubic-bezier(.35,0,.25,1);transition-property:background-color,fill,color}.md-toolbar-tools .md-button.md-icon-button md-icon.ng-animate,.md-toolbar-tools .md-button.ng-animate{transition:none}.md-toolbar-tools>.md-button:first-child{margin-left:-8px}[dir=rtl] .md-toolbar-tools>.md-button:first-child{margin-left:auto;margin-right:-8px}.md-toolbar-tools>.md-button:last-child{margin-right:-8px}[dir=rtl] .md-toolbar-tools>.md-button:last-child{margin-right:auto;margin-left:-8px}.md-toolbar-tools>md-menu:last-child{margin-right:-8px}[dir=rtl] .md-toolbar-tools>md-menu:last-child{margin-right:auto;margin-left:-8px}.md-toolbar-tools>md-menu:last-child>.md-button{margin-right:0}[dir=rtl] .md-toolbar-tools>md-menu:last-child>.md-button{margin-right:auto;margin-left:0}@media screen and (-ms-high-contrast:active){.md-toolbar-tools{border-bottom:1px solid #fff}}@media (min-width:0) and (max-width:959px) and (orientation:portrait){md-toolbar{min-height:56px}.md-toolbar-tools{height:56px;max-height:56px}}@media (min-width:0) and (max-width:959px) and (orientation:landscape){md-toolbar{min-height:48px}.md-toolbar-tools{height:48px;max-height:48px}}md-tooltip{position:absolute;z-index:100;overflow:hidden;pointer-events:none;border-radius:4px;font-weight:500;font-size:14px}@media (min-width:960px){md-tooltip{font-size:10px}}md-tooltip .md-content{position:relative;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transform-origin:center top;transform:scale(0);opacity:0;height:32px;line-height:32px;padding-left:16px;padding-right:16px}@media (min-width:960px){md-tooltip .md-content{height:22px;line-height:22px;padding-left:8px;padding-right:8px}}md-tooltip .md-content.md-show-add{transition:all .4s cubic-bezier(.25,.8,.25,1);transition-duration:.2s;transform:scale(0);opacity:0}md-tooltip .md-content.md-show,md-tooltip .md-content.md-show-add-active{transform:scale(1);opacity:.9;transform-origin:center top}md-tooltip .md-content.md-show-remove{transition:all .4s cubic-bezier(.25,.8,.25,1);transition-duration:.2s}md-tooltip .md-content.md-show-remove.md-show-remove-active{transform:scale(0);opacity:0}md-tooltip.md-hide{transition:all .3s cubic-bezier(.55,0,.55,.2)}md-tooltip.md-show{transition:all .4s cubic-bezier(.25,.8,.25,1);pointer-events:auto}.md-virtual-repeat-container{box-sizing:border-box;display:block;margin:0;overflow:hidden;padding:0;position:relative}.md-virtual-repeat-container .md-virtual-repeat-scroller{bottom:0;box-sizing:border-box;left:0;margin:0;overflow-x:hidden;padding:0;position:absolute;right:0;top:0;-webkit-overflow-scrolling:touch}.md-virtual-repeat-container .md-virtual-repeat-sizer{box-sizing:border-box;height:1px;display:block;margin:0;padding:0;width:1px}.md-virtual-repeat-container .md-virtual-repeat-offsetter{box-sizing:border-box;left:0;margin:0;padding:0;position:absolute;right:0;top:0}.md-virtual-repeat-container.md-orient-horizontal .md-virtual-repeat-scroller{overflow-x:auto;overflow-y:hidden}.md-virtual-repeat-container.md-orient-horizontal .md-virtual-repeat-offsetter{bottom:16px;right:auto;white-space:nowrap}[dir=rtl] .md-virtual-repeat-container.md-orient-horizontal .md-virtual-repeat-offsetter{right:auto;left:auto}.md-whiteframe-1dp,.md-whiteframe-z1{box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}.md-whiteframe-2dp{box-shadow:0 1px 5px 0 rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12)}.md-whiteframe-3dp{box-shadow:0 1px 8px 0 rgba(0,0,0,.2),0 3px 4px 0 rgba(0,0,0,.14),0 3px 3px -2px rgba(0,0,0,.12)}.md-whiteframe-4dp,.md-whiteframe-z2{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.md-whiteframe-5dp{box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 5px 8px 0 rgba(0,0,0,.14),0 1px 14px 0 rgba(0,0,0,.12)}.md-whiteframe-6dp{box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12)}.md-whiteframe-7dp,.md-whiteframe-z3{box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12)}.md-whiteframe-8dp{box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.md-whiteframe-9dp{box-shadow:0 5px 6px -3px rgba(0,0,0,.2),0 9px 12px 1px rgba(0,0,0,.14),0 3px 16px 2px rgba(0,0,0,.12)}.md-whiteframe-10dp,.md-whiteframe-z4{box-shadow:0 6px 6px -3px rgba(0,0,0,.2),0 10px 14px 1px rgba(0,0,0,.14),0 4px 18px 3px rgba(0,0,0,.12)}.md-whiteframe-11dp{box-shadow:0 6px 7px -4px rgba(0,0,0,.2),0 11px 15px 1px rgba(0,0,0,.14),0 4px 20px 3px rgba(0,0,0,.12)}.md-whiteframe-12dp{box-shadow:0 7px 8px -4px rgba(0,0,0,.2),0 12px 17px 2px rgba(0,0,0,.14),0 5px 22px 4px rgba(0,0,0,.12)}.md-whiteframe-13dp,.md-whiteframe-z5{box-shadow:0 7px 8px -4px rgba(0,0,0,.2),0 13px 19px 2px rgba(0,0,0,.14),0 5px 24px 4px rgba(0,0,0,.12)}.md-whiteframe-14dp{box-shadow:0 7px 9px -4px rgba(0,0,0,.2),0 14px 21px 2px rgba(0,0,0,.14),0 5px 26px 4px rgba(0,0,0,.12)}.md-whiteframe-15dp{box-shadow:0 8px 9px -5px rgba(0,0,0,.2),0 15px 22px 2px rgba(0,0,0,.14),0 6px 28px 5px rgba(0,0,0,.12)}.md-whiteframe-16dp{box-shadow:0 8px 10px -5px rgba(0,0,0,.2),0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12)}.md-whiteframe-17dp{box-shadow:0 8px 11px -5px rgba(0,0,0,.2),0 17px 26px 2px rgba(0,0,0,.14),0 6px 32px 5px rgba(0,0,0,.12)}.md-whiteframe-18dp{box-shadow:0 9px 11px -5px rgba(0,0,0,.2),0 18px 28px 2px rgba(0,0,0,.14),0 7px 34px 6px rgba(0,0,0,.12)}.md-whiteframe-19dp{box-shadow:0 9px 12px -6px rgba(0,0,0,.2),0 19px 29px 2px rgba(0,0,0,.14),0 7px 36px 6px rgba(0,0,0,.12)}.md-whiteframe-20dp{box-shadow:0 10px 13px -6px rgba(0,0,0,.2),0 20px 31px 3px rgba(0,0,0,.14),0 8px 38px 7px rgba(0,0,0,.12)}.md-whiteframe-21dp{box-shadow:0 10px 13px -6px rgba(0,0,0,.2),0 21px 33px 3px rgba(0,0,0,.14),0 8px 40px 7px rgba(0,0,0,.12)}.md-whiteframe-22dp{box-shadow:0 10px 14px -6px rgba(0,0,0,.2),0 22px 35px 3px rgba(0,0,0,.14),0 8px 42px 7px rgba(0,0,0,.12)}.md-whiteframe-23dp{box-shadow:0 11px 14px -7px rgba(0,0,0,.2),0 23px 36px 3px rgba(0,0,0,.14),0 9px 44px 8px rgba(0,0,0,.12)}.md-whiteframe-24dp{box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12)}@media screen and (-ms-high-contrast:active){md-whiteframe{border:1px solid #fff}}@media print{[md-whiteframe],md-whiteframe{background-color:#fff}}.ng-cloak,.x-ng-cloak,[data-ng-cloak],[ng-cloak],[ng\:cloak],[x-ng-cloak]{display:none!important}@-moz-document url-prefix(){.layout-fill{margin:0;width:100%;min-height:100%;height:100%}}.flex-order{order:0}.flex-order--20{order:-20}.flex-order--19{order:-19}.flex-order--18{order:-18}.flex-order--17{order:-17}.flex-order--16{order:-16}.flex-order--15{order:-15}.flex-order--14{order:-14}.flex-order--13{order:-13}.flex-order--12{order:-12}.flex-order--11{order:-11}.flex-order--10{order:-10}.flex-order--9{order:-9}.flex-order--8{order:-8}.flex-order--7{order:-7}.flex-order--6{order:-6}.flex-order--5{order:-5}.flex-order--4{order:-4}.flex-order--3{order:-3}.flex-order--2{order:-2}.flex-order--1{order:-1}.flex-order-0{order:0}.flex-order-1{order:1}.flex-order-2{order:2}.flex-order-3{order:3}.flex-order-4{order:4}.flex-order-5{order:5}.flex-order-6{order:6}.flex-order-7{order:7}.flex-order-8{order:8}.flex-order-9{order:9}.flex-order-10{order:10}.flex-order-11{order:11}.flex-order-12{order:12}.flex-order-13{order:13}.flex-order-14{order:14}.flex-order-15{order:15}.flex-order-16{order:16}.flex-order-17{order:17}.flex-order-18{order:18}.flex-order-19{order:19}.flex-order-20{order:20}.flex-offset-0,.offset-0{margin-left:0}[dir=rtl] .flex-offset-0,[dir=rtl] .offset-0{margin-left:auto;margin-right:0}.flex-offset-5,.offset-5{margin-left:5%}[dir=rtl] .flex-offset-5,[dir=rtl] .offset-5{margin-left:auto;margin-right:5%}.flex-offset-10,.offset-10{margin-left:10%}[dir=rtl] .flex-offset-10,[dir=rtl] .offset-10{margin-left:auto;margin-right:10%}.flex-offset-15,.offset-15{margin-left:15%}[dir=rtl] .flex-offset-15,[dir=rtl] .offset-15{margin-left:auto;margin-right:15%}.flex-offset-20,.offset-20{margin-left:20%}[dir=rtl] .flex-offset-20,[dir=rtl] .offset-20{margin-left:auto;margin-right:20%}.flex-offset-25,.offset-25{margin-left:25%}[dir=rtl] .flex-offset-25,[dir=rtl] .offset-25{margin-left:auto;margin-right:25%}.flex-offset-30,.offset-30{margin-left:30%}[dir=rtl] .flex-offset-30,[dir=rtl] .offset-30{margin-left:auto;margin-right:30%}.flex-offset-35,.offset-35{margin-left:35%}[dir=rtl] .flex-offset-35,[dir=rtl] .offset-35{margin-left:auto;margin-right:35%}.flex-offset-40,.offset-40{margin-left:40%}[dir=rtl] .flex-offset-40,[dir=rtl] .offset-40{margin-left:auto;margin-right:40%}.flex-offset-45,.offset-45{margin-left:45%}[dir=rtl] .flex-offset-45,[dir=rtl] .offset-45{margin-left:auto;margin-right:45%}.flex-offset-50,.offset-50{margin-left:50%}[dir=rtl] .flex-offset-50,[dir=rtl] .offset-50{margin-left:auto;margin-right:50%}.flex-offset-55,.offset-55{margin-left:55%}[dir=rtl] .flex-offset-55,[dir=rtl] .offset-55{margin-left:auto;margin-right:55%}.flex-offset-60,.offset-60{margin-left:60%}[dir=rtl] .flex-offset-60,[dir=rtl] .offset-60{margin-left:auto;margin-right:60%}.flex-offset-65,.offset-65{margin-left:65%}[dir=rtl] .flex-offset-65,[dir=rtl] .offset-65{margin-left:auto;margin-right:65%}.flex-offset-70,.offset-70{margin-left:70%}[dir=rtl] .flex-offset-70,[dir=rtl] .offset-70{margin-left:auto;margin-right:70%}.flex-offset-75,.offset-75{margin-left:75%}[dir=rtl] .flex-offset-75,[dir=rtl] .offset-75{margin-left:auto;margin-right:75%}.flex-offset-80,.offset-80{margin-left:80%}[dir=rtl] .flex-offset-80,[dir=rtl] .offset-80{margin-left:auto;margin-right:80%}.flex-offset-85,.offset-85{margin-left:85%}[dir=rtl] .flex-offset-85,[dir=rtl] .offset-85{margin-left:auto;margin-right:85%}.flex-offset-90,.offset-90{margin-left:90%}[dir=rtl] .flex-offset-90,[dir=rtl] .offset-90{margin-left:auto;margin-right:90%}.flex-offset-95,.offset-95{margin-left:95%}[dir=rtl] .flex-offset-95,[dir=rtl] .offset-95{margin-left:auto;margin-right:95%}.flex-offset-33,.offset-33{margin-left:calc(100% / 3)}.flex-offset-66,.offset-66{margin-left:calc(200% / 3)}[dir=rtl] .flex-offset-66,[dir=rtl] .offset-66{margin-left:auto;margin-right:calc(200% / 3)}.layout-align,.layout-align-start-stretch{justify-content:flex-start;align-content:stretch;align-items:stretch}.layout-align-start,.layout-align-start-center,.layout-align-start-end,.layout-align-start-start,.layout-align-start-stretch{justify-content:flex-start}.layout-align-center,.layout-align-center-center,.layout-align-center-end,.layout-align-center-start,.layout-align-center-stretch{justify-content:center}.layout-align-end,.layout-align-end-center,.layout-align-end-end,.layout-align-end-start,.layout-align-end-stretch{justify-content:flex-end}.layout-align-space-around,.layout-align-space-around-center,.layout-align-space-around-end,.layout-align-space-around-start,.layout-align-space-around-stretch{justify-content:space-around}.layout-align-space-between,.layout-align-space-between-center,.layout-align-space-between-end,.layout-align-space-between-start,.layout-align-space-between-stretch{justify-content:space-between}.layout-align-center-start,.layout-align-end-start,.layout-align-space-around-start,.layout-align-space-between-start,.layout-align-start-start{align-items:flex-start;align-content:flex-start}.layout-align-center-center,.layout-align-end-center,.layout-align-space-around-center,.layout-align-space-between-center,.layout-align-start-center{align-items:center;align-content:center;max-width:100%}.layout-align-center-center>*,.layout-align-end-center>*,.layout-align-space-around-center>*,.layout-align-space-between-center>*,.layout-align-start-center>*{max-width:100%;box-sizing:border-box}.layout-align-center-end,.layout-align-end-end,.layout-align-space-around-end,.layout-align-space-between-end,.layout-align-start-end{align-items:flex-end;align-content:flex-end}.layout-align-center-stretch,.layout-align-end-stretch,.layout-align-space-around-stretch,.layout-align-space-between-stretch,.layout-align-start-stretch{align-items:stretch;align-content:stretch}.flex{flex:1;box-sizing:border-box}.flex-grow{flex:1 1 100%;box-sizing:border-box}.flex-initial{flex:0 1 auto;box-sizing:border-box}.flex-auto{flex:1 1 auto;box-sizing:border-box}.flex-none{flex:0 0 auto;box-sizing:border-box}.flex-noshrink{flex:1 0 auto;box-sizing:border-box}.flex-nogrow{flex:0 1 auto;box-sizing:border-box}.flex-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box}.layout-row>.flex-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box;min-height:0}.flex-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-row>.flex-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.flex-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-row>.flex-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.flex-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-row>.flex-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.flex-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-row>.flex-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.flex-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-row>.flex-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.flex-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-row>.flex-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.flex-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-row>.flex-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.flex-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-row>.flex-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.flex-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-row>.flex-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.flex-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-row>.flex-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.flex-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-row>.flex-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.flex-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-row>.flex-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.flex-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-row>.flex-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.flex-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-row>.flex-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.flex-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-row>.flex-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.flex-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-row>.flex-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.flex-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-row>.flex-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.flex-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-row>.flex-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.flex-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-row>.flex-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.flex-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-row>.flex{min-width:0}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-column>.flex{min-height:0}.layout,.layout-column,.layout-row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.layout-column{flex-direction:column}.layout-row{flex-direction:row}.layout-padding-sm>*,.layout-padding>.flex-sm{padding:4px}.layout-padding,.layout-padding-gt-sm,.layout-padding-gt-sm>*,.layout-padding-md,.layout-padding-md>*,.layout-padding>*,.layout-padding>.flex,.layout-padding>.flex-gt-sm,.layout-padding>.flex-md{padding:8px}.layout-padding-gt-lg>*,.layout-padding-gt-md>*,.layout-padding-lg>*,.layout-padding>.flex-gt-lg,.layout-padding>.flex-gt-md,.layout-padding>.flex-lg{padding:16px}.layout-margin-sm>*,.layout-margin>.flex-sm{margin:4px}.layout-margin,.layout-margin-gt-sm,.layout-margin-gt-sm>*,.layout-margin-md,.layout-margin-md>*,.layout-margin>*,.layout-margin>.flex,.layout-margin>.flex-gt-sm,.layout-margin>.flex-md{margin:8px}.layout-margin-gt-lg>*,.layout-margin-gt-md>*,.layout-margin-lg>*,.layout-margin>.flex-gt-lg,.layout-margin>.flex-gt-md,.layout-margin>.flex-lg{margin:16px}.layout-wrap{flex-wrap:wrap}.layout-nowrap{flex-wrap:nowrap}.layout-fill{margin:0;width:100%;min-height:100%;height:100%}@media (max-width:599px){.hide-xs:not(.show-xs):not(.show),.hide:not(.show-xs):not(.show){display:none}.flex-order-xs--20{order:-20}.flex-order-xs--19{order:-19}.flex-order-xs--18{order:-18}.flex-order-xs--17{order:-17}.flex-order-xs--16{order:-16}.flex-order-xs--15{order:-15}.flex-order-xs--14{order:-14}.flex-order-xs--13{order:-13}.flex-order-xs--12{order:-12}.flex-order-xs--11{order:-11}.flex-order-xs--10{order:-10}.flex-order-xs--9{order:-9}.flex-order-xs--8{order:-8}.flex-order-xs--7{order:-7}.flex-order-xs--6{order:-6}.flex-order-xs--5{order:-5}.flex-order-xs--4{order:-4}.flex-order-xs--3{order:-3}.flex-order-xs--2{order:-2}.flex-order-xs--1{order:-1}.flex-order-xs-0{order:0}.flex-order-xs-1{order:1}.flex-order-xs-2{order:2}.flex-order-xs-3{order:3}.flex-order-xs-4{order:4}.flex-order-xs-5{order:5}.flex-order-xs-6{order:6}.flex-order-xs-7{order:7}.flex-order-xs-8{order:8}.flex-order-xs-9{order:9}.flex-order-xs-10{order:10}.flex-order-xs-11{order:11}.flex-order-xs-12{order:12}.flex-order-xs-13{order:13}.flex-order-xs-14{order:14}.flex-order-xs-15{order:15}.flex-order-xs-16{order:16}.flex-order-xs-17{order:17}.flex-order-xs-18{order:18}.flex-order-xs-19{order:19}.flex-order-xs-20{order:20}.flex-offset-xs-0,.offset-xs-0{margin-left:0}[dir=rtl] .flex-offset-xs-0,[dir=rtl] .offset-xs-0{margin-left:auto;margin-right:0}.flex-offset-xs-5,.offset-xs-5{margin-left:5%}[dir=rtl] .flex-offset-xs-5,[dir=rtl] .offset-xs-5{margin-left:auto;margin-right:5%}.flex-offset-xs-10,.offset-xs-10{margin-left:10%}[dir=rtl] .flex-offset-xs-10,[dir=rtl] .offset-xs-10{margin-left:auto;margin-right:10%}.flex-offset-xs-15,.offset-xs-15{margin-left:15%}[dir=rtl] .flex-offset-xs-15,[dir=rtl] .offset-xs-15{margin-left:auto;margin-right:15%}.flex-offset-xs-20,.offset-xs-20{margin-left:20%}[dir=rtl] .flex-offset-xs-20,[dir=rtl] .offset-xs-20{margin-left:auto;margin-right:20%}.flex-offset-xs-25,.offset-xs-25{margin-left:25%}[dir=rtl] .flex-offset-xs-25,[dir=rtl] .offset-xs-25{margin-left:auto;margin-right:25%}.flex-offset-xs-30,.offset-xs-30{margin-left:30%}[dir=rtl] .flex-offset-xs-30,[dir=rtl] .offset-xs-30{margin-left:auto;margin-right:30%}.flex-offset-xs-35,.offset-xs-35{margin-left:35%}[dir=rtl] .flex-offset-xs-35,[dir=rtl] .offset-xs-35{margin-left:auto;margin-right:35%}.flex-offset-xs-40,.offset-xs-40{margin-left:40%}[dir=rtl] .flex-offset-xs-40,[dir=rtl] .offset-xs-40{margin-left:auto;margin-right:40%}.flex-offset-xs-45,.offset-xs-45{margin-left:45%}[dir=rtl] .flex-offset-xs-45,[dir=rtl] .offset-xs-45{margin-left:auto;margin-right:45%}.flex-offset-xs-50,.offset-xs-50{margin-left:50%}[dir=rtl] .flex-offset-xs-50,[dir=rtl] .offset-xs-50{margin-left:auto;margin-right:50%}.flex-offset-xs-55,.offset-xs-55{margin-left:55%}[dir=rtl] .flex-offset-xs-55,[dir=rtl] .offset-xs-55{margin-left:auto;margin-right:55%}.flex-offset-xs-60,.offset-xs-60{margin-left:60%}[dir=rtl] .flex-offset-xs-60,[dir=rtl] .offset-xs-60{margin-left:auto;margin-right:60%}.flex-offset-xs-65,.offset-xs-65{margin-left:65%}[dir=rtl] .flex-offset-xs-65,[dir=rtl] .offset-xs-65{margin-left:auto;margin-right:65%}.flex-offset-xs-70,.offset-xs-70{margin-left:70%}[dir=rtl] .flex-offset-xs-70,[dir=rtl] .offset-xs-70{margin-left:auto;margin-right:70%}.flex-offset-xs-75,.offset-xs-75{margin-left:75%}[dir=rtl] .flex-offset-xs-75,[dir=rtl] .offset-xs-75{margin-left:auto;margin-right:75%}.flex-offset-xs-80,.offset-xs-80{margin-left:80%}[dir=rtl] .flex-offset-xs-80,[dir=rtl] .offset-xs-80{margin-left:auto;margin-right:80%}.flex-offset-xs-85,.offset-xs-85{margin-left:85%}[dir=rtl] .flex-offset-xs-85,[dir=rtl] .offset-xs-85{margin-left:auto;margin-right:85%}.flex-offset-xs-90,.offset-xs-90{margin-left:90%}[dir=rtl] .flex-offset-xs-90,[dir=rtl] .offset-xs-90{margin-left:auto;margin-right:90%}.flex-offset-xs-95,.offset-xs-95{margin-left:95%}[dir=rtl] .flex-offset-xs-95,[dir=rtl] .offset-xs-95{margin-left:auto;margin-right:95%}.flex-offset-xs-33,.offset-xs-33{margin-left:calc(100% / 3)}.flex-offset-xs-66,.offset-xs-66{margin-left:calc(200% / 3)}[dir=rtl] .flex-offset-xs-66,[dir=rtl] .offset-xs-66{margin-left:auto;margin-right:calc(200% / 3)}.layout-align-xs,.layout-align-xs-start-stretch{justify-content:flex-start;align-content:stretch;align-items:stretch}.layout-align-xs-start,.layout-align-xs-start-center,.layout-align-xs-start-end,.layout-align-xs-start-start,.layout-align-xs-start-stretch{justify-content:flex-start}.layout-align-xs-center,.layout-align-xs-center-center,.layout-align-xs-center-end,.layout-align-xs-center-start,.layout-align-xs-center-stretch{justify-content:center}.layout-align-xs-end,.layout-align-xs-end-center,.layout-align-xs-end-end,.layout-align-xs-end-start,.layout-align-xs-end-stretch{justify-content:flex-end}.layout-align-xs-space-around,.layout-align-xs-space-around-center,.layout-align-xs-space-around-end,.layout-align-xs-space-around-start,.layout-align-xs-space-around-stretch{justify-content:space-around}.layout-align-xs-space-between,.layout-align-xs-space-between-center,.layout-align-xs-space-between-end,.layout-align-xs-space-between-start,.layout-align-xs-space-between-stretch{justify-content:space-between}.layout-align-xs-center-start,.layout-align-xs-end-start,.layout-align-xs-space-around-start,.layout-align-xs-space-between-start,.layout-align-xs-start-start{align-items:flex-start;align-content:flex-start}.layout-align-xs-center-center,.layout-align-xs-end-center,.layout-align-xs-space-around-center,.layout-align-xs-space-between-center,.layout-align-xs-start-center{align-items:center;align-content:center;max-width:100%}.layout-align-xs-center-center>*,.layout-align-xs-end-center>*,.layout-align-xs-space-around-center>*,.layout-align-xs-space-between-center>*,.layout-align-xs-start-center>*{max-width:100%;box-sizing:border-box}.layout-align-xs-center-end,.layout-align-xs-end-end,.layout-align-xs-space-around-end,.layout-align-xs-space-between-end,.layout-align-xs-start-end{align-items:flex-end;align-content:flex-end}.layout-align-xs-center-stretch,.layout-align-xs-end-stretch,.layout-align-xs-space-around-stretch,.layout-align-xs-space-between-stretch,.layout-align-xs-start-stretch{align-items:stretch;align-content:stretch}.flex-xs{flex:1;box-sizing:border-box}.flex-xs-grow{flex:1 1 100%;box-sizing:border-box}.flex-xs-initial{flex:0 1 auto;box-sizing:border-box}.flex-xs-auto{flex:1 1 auto;box-sizing:border-box}.flex-xs-none{flex:0 0 auto;box-sizing:border-box}.flex-xs-noshrink{flex:1 0 auto;box-sizing:border-box}.flex-xs-nogrow{flex:0 1 auto;box-sizing:border-box}.flex-xs-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-xs-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-xs-column>.flex-xs-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box;min-height:0}.flex-xs-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.flex-xs-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.flex-xs-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.flex-xs-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.flex-xs-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.flex-xs-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.flex-xs-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.flex-xs-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.flex-xs-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.flex-xs-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.flex-xs-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.flex-xs-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.flex-xs-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.flex-xs-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.flex-xs-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.flex-xs-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.flex-xs-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.flex-xs-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.flex-xs-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.flex-xs-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-xs-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-xs-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-xs-row>.flex{min-width:0}.layout-xs-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-xs-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-column>.flex{min-height:0}.layout-xs,.layout-xs-column,.layout-xs-row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.layout-xs-column{flex-direction:column}.layout-xs-row{flex-direction:row}}@media (min-width:600px){.flex-order-gt-xs--20{order:-20}.flex-order-gt-xs--19{order:-19}.flex-order-gt-xs--18{order:-18}.flex-order-gt-xs--17{order:-17}.flex-order-gt-xs--16{order:-16}.flex-order-gt-xs--15{order:-15}.flex-order-gt-xs--14{order:-14}.flex-order-gt-xs--13{order:-13}.flex-order-gt-xs--12{order:-12}.flex-order-gt-xs--11{order:-11}.flex-order-gt-xs--10{order:-10}.flex-order-gt-xs--9{order:-9}.flex-order-gt-xs--8{order:-8}.flex-order-gt-xs--7{order:-7}.flex-order-gt-xs--6{order:-6}.flex-order-gt-xs--5{order:-5}.flex-order-gt-xs--4{order:-4}.flex-order-gt-xs--3{order:-3}.flex-order-gt-xs--2{order:-2}.flex-order-gt-xs--1{order:-1}.flex-order-gt-xs-0{order:0}.flex-order-gt-xs-1{order:1}.flex-order-gt-xs-2{order:2}.flex-order-gt-xs-3{order:3}.flex-order-gt-xs-4{order:4}.flex-order-gt-xs-5{order:5}.flex-order-gt-xs-6{order:6}.flex-order-gt-xs-7{order:7}.flex-order-gt-xs-8{order:8}.flex-order-gt-xs-9{order:9}.flex-order-gt-xs-10{order:10}.flex-order-gt-xs-11{order:11}.flex-order-gt-xs-12{order:12}.flex-order-gt-xs-13{order:13}.flex-order-gt-xs-14{order:14}.flex-order-gt-xs-15{order:15}.flex-order-gt-xs-16{order:16}.flex-order-gt-xs-17{order:17}.flex-order-gt-xs-18{order:18}.flex-order-gt-xs-19{order:19}.flex-order-gt-xs-20{order:20}.flex-offset-gt-xs-0,.offset-gt-xs-0{margin-left:0}[dir=rtl] .flex-offset-gt-xs-0,[dir=rtl] .offset-gt-xs-0{margin-left:auto;margin-right:0}.flex-offset-gt-xs-5,.offset-gt-xs-5{margin-left:5%}[dir=rtl] .flex-offset-gt-xs-5,[dir=rtl] .offset-gt-xs-5{margin-left:auto;margin-right:5%}.flex-offset-gt-xs-10,.offset-gt-xs-10{margin-left:10%}[dir=rtl] .flex-offset-gt-xs-10,[dir=rtl] .offset-gt-xs-10{margin-left:auto;margin-right:10%}.flex-offset-gt-xs-15,.offset-gt-xs-15{margin-left:15%}[dir=rtl] .flex-offset-gt-xs-15,[dir=rtl] .offset-gt-xs-15{margin-left:auto;margin-right:15%}.flex-offset-gt-xs-20,.offset-gt-xs-20{margin-left:20%}[dir=rtl] .flex-offset-gt-xs-20,[dir=rtl] .offset-gt-xs-20{margin-left:auto;margin-right:20%}.flex-offset-gt-xs-25,.offset-gt-xs-25{margin-left:25%}[dir=rtl] .flex-offset-gt-xs-25,[dir=rtl] .offset-gt-xs-25{margin-left:auto;margin-right:25%}.flex-offset-gt-xs-30,.offset-gt-xs-30{margin-left:30%}[dir=rtl] .flex-offset-gt-xs-30,[dir=rtl] .offset-gt-xs-30{margin-left:auto;margin-right:30%}.flex-offset-gt-xs-35,.offset-gt-xs-35{margin-left:35%}[dir=rtl] .flex-offset-gt-xs-35,[dir=rtl] .offset-gt-xs-35{margin-left:auto;margin-right:35%}.flex-offset-gt-xs-40,.offset-gt-xs-40{margin-left:40%}[dir=rtl] .flex-offset-gt-xs-40,[dir=rtl] .offset-gt-xs-40{margin-left:auto;margin-right:40%}.flex-offset-gt-xs-45,.offset-gt-xs-45{margin-left:45%}[dir=rtl] .flex-offset-gt-xs-45,[dir=rtl] .offset-gt-xs-45{margin-left:auto;margin-right:45%}.flex-offset-gt-xs-50,.offset-gt-xs-50{margin-left:50%}[dir=rtl] .flex-offset-gt-xs-50,[dir=rtl] .offset-gt-xs-50{margin-left:auto;margin-right:50%}.flex-offset-gt-xs-55,.offset-gt-xs-55{margin-left:55%}[dir=rtl] .flex-offset-gt-xs-55,[dir=rtl] .offset-gt-xs-55{margin-left:auto;margin-right:55%}.flex-offset-gt-xs-60,.offset-gt-xs-60{margin-left:60%}[dir=rtl] .flex-offset-gt-xs-60,[dir=rtl] .offset-gt-xs-60{margin-left:auto;margin-right:60%}.flex-offset-gt-xs-65,.offset-gt-xs-65{margin-left:65%}[dir=rtl] .flex-offset-gt-xs-65,[dir=rtl] .offset-gt-xs-65{margin-left:auto;margin-right:65%}.flex-offset-gt-xs-70,.offset-gt-xs-70{margin-left:70%}[dir=rtl] .flex-offset-gt-xs-70,[dir=rtl] .offset-gt-xs-70{margin-left:auto;margin-right:70%}.flex-offset-gt-xs-75,.offset-gt-xs-75{margin-left:75%}[dir=rtl] .flex-offset-gt-xs-75,[dir=rtl] .offset-gt-xs-75{margin-left:auto;margin-right:75%}.flex-offset-gt-xs-80,.offset-gt-xs-80{margin-left:80%}[dir=rtl] .flex-offset-gt-xs-80,[dir=rtl] .offset-gt-xs-80{margin-left:auto;margin-right:80%}.flex-offset-gt-xs-85,.offset-gt-xs-85{margin-left:85%}[dir=rtl] .flex-offset-gt-xs-85,[dir=rtl] .offset-gt-xs-85{margin-left:auto;margin-right:85%}.flex-offset-gt-xs-90,.offset-gt-xs-90{margin-left:90%}[dir=rtl] .flex-offset-gt-xs-90,[dir=rtl] .offset-gt-xs-90{margin-left:auto;margin-right:90%}.flex-offset-gt-xs-95,.offset-gt-xs-95{margin-left:95%}[dir=rtl] .flex-offset-gt-xs-95,[dir=rtl] .offset-gt-xs-95{margin-left:auto;margin-right:95%}.flex-offset-gt-xs-33,.offset-gt-xs-33{margin-left:calc(100% / 3)}.flex-offset-gt-xs-66,.offset-gt-xs-66{margin-left:calc(200% / 3)}[dir=rtl] .flex-offset-gt-xs-66,[dir=rtl] .offset-gt-xs-66{margin-left:auto;margin-right:calc(200% / 3)}.layout-align-gt-xs,.layout-align-gt-xs-start-stretch{justify-content:flex-start;align-content:stretch;align-items:stretch}.layout-align-gt-xs-start,.layout-align-gt-xs-start-center,.layout-align-gt-xs-start-end,.layout-align-gt-xs-start-start,.layout-align-gt-xs-start-stretch{justify-content:flex-start}.layout-align-gt-xs-center,.layout-align-gt-xs-center-center,.layout-align-gt-xs-center-end,.layout-align-gt-xs-center-start,.layout-align-gt-xs-center-stretch{justify-content:center}.layout-align-gt-xs-end,.layout-align-gt-xs-end-center,.layout-align-gt-xs-end-end,.layout-align-gt-xs-end-start,.layout-align-gt-xs-end-stretch{justify-content:flex-end}.layout-align-gt-xs-space-around,.layout-align-gt-xs-space-around-center,.layout-align-gt-xs-space-around-end,.layout-align-gt-xs-space-around-start,.layout-align-gt-xs-space-around-stretch{justify-content:space-around}.layout-align-gt-xs-space-between,.layout-align-gt-xs-space-between-center,.layout-align-gt-xs-space-between-end,.layout-align-gt-xs-space-between-start,.layout-align-gt-xs-space-between-stretch{justify-content:space-between}.layout-align-gt-xs-center-start,.layout-align-gt-xs-end-start,.layout-align-gt-xs-space-around-start,.layout-align-gt-xs-space-between-start,.layout-align-gt-xs-start-start{align-items:flex-start;align-content:flex-start}.layout-align-gt-xs-center-center,.layout-align-gt-xs-end-center,.layout-align-gt-xs-space-around-center,.layout-align-gt-xs-space-between-center,.layout-align-gt-xs-start-center{align-items:center;align-content:center;max-width:100%}.layout-align-gt-xs-center-center>*,.layout-align-gt-xs-end-center>*,.layout-align-gt-xs-space-around-center>*,.layout-align-gt-xs-space-between-center>*,.layout-align-gt-xs-start-center>*{max-width:100%;box-sizing:border-box}.layout-align-gt-xs-center-end,.layout-align-gt-xs-end-end,.layout-align-gt-xs-space-around-end,.layout-align-gt-xs-space-between-end,.layout-align-gt-xs-start-end{align-items:flex-end;align-content:flex-end}.layout-align-gt-xs-center-stretch,.layout-align-gt-xs-end-stretch,.layout-align-gt-xs-space-around-stretch,.layout-align-gt-xs-space-between-stretch,.layout-align-gt-xs-start-stretch{align-items:stretch;align-content:stretch}.flex-gt-xs{flex:1;box-sizing:border-box}.flex-gt-xs-grow{flex:1 1 100%;box-sizing:border-box}.flex-gt-xs-initial{flex:0 1 auto;box-sizing:border-box}.flex-gt-xs-auto{flex:1 1 auto;box-sizing:border-box}.flex-gt-xs-none{flex:0 0 auto;box-sizing:border-box}.flex-gt-xs-noshrink{flex:1 0 auto;box-sizing:border-box}.flex-gt-xs-nogrow{flex:0 1 auto;box-sizing:border-box}.flex-gt-xs-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-gt-xs-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-gt-xs-column>.flex-gt-xs-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box;min-height:0}.flex-gt-xs-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.flex-gt-xs-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.flex-gt-xs-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.flex-gt-xs-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.flex-gt-xs-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.flex-gt-xs-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.flex-gt-xs-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.flex-gt-xs-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.flex-gt-xs-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.flex-gt-xs-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.flex-gt-xs-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.flex-gt-xs-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.flex-gt-xs-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.flex-gt-xs-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.flex-gt-xs-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.flex-gt-xs-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.flex-gt-xs-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.flex-gt-xs-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.flex-gt-xs-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.flex-gt-xs-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-gt-xs-row>.flex{min-width:0}.layout-gt-xs-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-column>.flex{min-height:0}.layout-gt-xs,.layout-gt-xs-column,.layout-gt-xs-row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.layout-gt-xs-column{flex-direction:column}.layout-gt-xs-row{flex-direction:row}}@media (min-width:600px) and (max-width:959px){.hide-gt-xs:not(.show-gt-xs):not(.show-sm):not(.show),.hide:not(.show-gt-xs):not(.show-sm):not(.show){display:none}.hide-sm:not(.show-gt-xs):not(.show-sm):not(.show){display:none}.flex-order-sm--20{order:-20}.flex-order-sm--19{order:-19}.flex-order-sm--18{order:-18}.flex-order-sm--17{order:-17}.flex-order-sm--16{order:-16}.flex-order-sm--15{order:-15}.flex-order-sm--14{order:-14}.flex-order-sm--13{order:-13}.flex-order-sm--12{order:-12}.flex-order-sm--11{order:-11}.flex-order-sm--10{order:-10}.flex-order-sm--9{order:-9}.flex-order-sm--8{order:-8}.flex-order-sm--7{order:-7}.flex-order-sm--6{order:-6}.flex-order-sm--5{order:-5}.flex-order-sm--4{order:-4}.flex-order-sm--3{order:-3}.flex-order-sm--2{order:-2}.flex-order-sm--1{order:-1}.flex-order-sm-0{order:0}.flex-order-sm-1{order:1}.flex-order-sm-2{order:2}.flex-order-sm-3{order:3}.flex-order-sm-4{order:4}.flex-order-sm-5{order:5}.flex-order-sm-6{order:6}.flex-order-sm-7{order:7}.flex-order-sm-8{order:8}.flex-order-sm-9{order:9}.flex-order-sm-10{order:10}.flex-order-sm-11{order:11}.flex-order-sm-12{order:12}.flex-order-sm-13{order:13}.flex-order-sm-14{order:14}.flex-order-sm-15{order:15}.flex-order-sm-16{order:16}.flex-order-sm-17{order:17}.flex-order-sm-18{order:18}.flex-order-sm-19{order:19}.flex-order-sm-20{order:20}.flex-offset-sm-0,.offset-sm-0{margin-left:0}[dir=rtl] .flex-offset-sm-0,[dir=rtl] .offset-sm-0{margin-left:auto;margin-right:0}.flex-offset-sm-5,.offset-sm-5{margin-left:5%}[dir=rtl] .flex-offset-sm-5,[dir=rtl] .offset-sm-5{margin-left:auto;margin-right:5%}.flex-offset-sm-10,.offset-sm-10{margin-left:10%}[dir=rtl] .flex-offset-sm-10,[dir=rtl] .offset-sm-10{margin-left:auto;margin-right:10%}.flex-offset-sm-15,.offset-sm-15{margin-left:15%}[dir=rtl] .flex-offset-sm-15,[dir=rtl] .offset-sm-15{margin-left:auto;margin-right:15%}.flex-offset-sm-20,.offset-sm-20{margin-left:20%}[dir=rtl] .flex-offset-sm-20,[dir=rtl] .offset-sm-20{margin-left:auto;margin-right:20%}.flex-offset-sm-25,.offset-sm-25{margin-left:25%}[dir=rtl] .flex-offset-sm-25,[dir=rtl] .offset-sm-25{margin-left:auto;margin-right:25%}.flex-offset-sm-30,.offset-sm-30{margin-left:30%}[dir=rtl] .flex-offset-sm-30,[dir=rtl] .offset-sm-30{margin-left:auto;margin-right:30%}.flex-offset-sm-35,.offset-sm-35{margin-left:35%}[dir=rtl] .flex-offset-sm-35,[dir=rtl] .offset-sm-35{margin-left:auto;margin-right:35%}.flex-offset-sm-40,.offset-sm-40{margin-left:40%}[dir=rtl] .flex-offset-sm-40,[dir=rtl] .offset-sm-40{margin-left:auto;margin-right:40%}.flex-offset-sm-45,.offset-sm-45{margin-left:45%}[dir=rtl] .flex-offset-sm-45,[dir=rtl] .offset-sm-45{margin-left:auto;margin-right:45%}.flex-offset-sm-50,.offset-sm-50{margin-left:50%}[dir=rtl] .flex-offset-sm-50,[dir=rtl] .offset-sm-50{margin-left:auto;margin-right:50%}.flex-offset-sm-55,.offset-sm-55{margin-left:55%}[dir=rtl] .flex-offset-sm-55,[dir=rtl] .offset-sm-55{margin-left:auto;margin-right:55%}.flex-offset-sm-60,.offset-sm-60{margin-left:60%}[dir=rtl] .flex-offset-sm-60,[dir=rtl] .offset-sm-60{margin-left:auto;margin-right:60%}.flex-offset-sm-65,.offset-sm-65{margin-left:65%}[dir=rtl] .flex-offset-sm-65,[dir=rtl] .offset-sm-65{margin-left:auto;margin-right:65%}.flex-offset-sm-70,.offset-sm-70{margin-left:70%}[dir=rtl] .flex-offset-sm-70,[dir=rtl] .offset-sm-70{margin-left:auto;margin-right:70%}.flex-offset-sm-75,.offset-sm-75{margin-left:75%}[dir=rtl] .flex-offset-sm-75,[dir=rtl] .offset-sm-75{margin-left:auto;margin-right:75%}.flex-offset-sm-80,.offset-sm-80{margin-left:80%}[dir=rtl] .flex-offset-sm-80,[dir=rtl] .offset-sm-80{margin-left:auto;margin-right:80%}.flex-offset-sm-85,.offset-sm-85{margin-left:85%}[dir=rtl] .flex-offset-sm-85,[dir=rtl] .offset-sm-85{margin-left:auto;margin-right:85%}.flex-offset-sm-90,.offset-sm-90{margin-left:90%}[dir=rtl] .flex-offset-sm-90,[dir=rtl] .offset-sm-90{margin-left:auto;margin-right:90%}.flex-offset-sm-95,.offset-sm-95{margin-left:95%}[dir=rtl] .flex-offset-sm-95,[dir=rtl] .offset-sm-95{margin-left:auto;margin-right:95%}.flex-offset-sm-33,.offset-sm-33{margin-left:calc(100% / 3)}.flex-offset-sm-66,.offset-sm-66{margin-left:calc(200% / 3)}[dir=rtl] .flex-offset-sm-66,[dir=rtl] .offset-sm-66{margin-left:auto;margin-right:calc(200% / 3)}.layout-align-sm,.layout-align-sm-start-stretch{justify-content:flex-start;align-content:stretch;align-items:stretch}.layout-align-sm-start,.layout-align-sm-start-center,.layout-align-sm-start-end,.layout-align-sm-start-start,.layout-align-sm-start-stretch{justify-content:flex-start}.layout-align-sm-center,.layout-align-sm-center-center,.layout-align-sm-center-end,.layout-align-sm-center-start,.layout-align-sm-center-stretch{justify-content:center}.layout-align-sm-end,.layout-align-sm-end-center,.layout-align-sm-end-end,.layout-align-sm-end-start,.layout-align-sm-end-stretch{justify-content:flex-end}.layout-align-sm-space-around,.layout-align-sm-space-around-center,.layout-align-sm-space-around-end,.layout-align-sm-space-around-start,.layout-align-sm-space-around-stretch{justify-content:space-around}.layout-align-sm-space-between,.layout-align-sm-space-between-center,.layout-align-sm-space-between-end,.layout-align-sm-space-between-start,.layout-align-sm-space-between-stretch{justify-content:space-between}.layout-align-sm-center-start,.layout-align-sm-end-start,.layout-align-sm-space-around-start,.layout-align-sm-space-between-start,.layout-align-sm-start-start{align-items:flex-start;align-content:flex-start}.layout-align-sm-center-center,.layout-align-sm-end-center,.layout-align-sm-space-around-center,.layout-align-sm-space-between-center,.layout-align-sm-start-center{align-items:center;align-content:center;max-width:100%}.layout-align-sm-center-center>*,.layout-align-sm-end-center>*,.layout-align-sm-space-around-center>*,.layout-align-sm-space-between-center>*,.layout-align-sm-start-center>*{max-width:100%;box-sizing:border-box}.layout-align-sm-center-end,.layout-align-sm-end-end,.layout-align-sm-space-around-end,.layout-align-sm-space-between-end,.layout-align-sm-start-end{align-items:flex-end;align-content:flex-end}.layout-align-sm-center-stretch,.layout-align-sm-end-stretch,.layout-align-sm-space-around-stretch,.layout-align-sm-space-between-stretch,.layout-align-sm-start-stretch{align-items:stretch;align-content:stretch}.flex-sm{flex:1;box-sizing:border-box}.flex-sm-grow{flex:1 1 100%;box-sizing:border-box}.flex-sm-initial{flex:0 1 auto;box-sizing:border-box}.flex-sm-auto{flex:1 1 auto;box-sizing:border-box}.flex-sm-none{flex:0 0 auto;box-sizing:border-box}.flex-sm-noshrink{flex:1 0 auto;box-sizing:border-box}.flex-sm-nogrow{flex:0 1 auto;box-sizing:border-box}.flex-sm-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-sm-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-sm-column>.flex-sm-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box;min-height:0}.flex-sm-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.flex-sm-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.flex-sm-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.flex-sm-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.flex-sm-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.flex-sm-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.flex-sm-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.flex-sm-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.flex-sm-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.flex-sm-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.flex-sm-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.flex-sm-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.flex-sm-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.flex-sm-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.flex-sm-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.flex-sm-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.flex-sm-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.flex-sm-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.flex-sm-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.flex-sm-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-sm-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-sm-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-sm-row>.flex{min-width:0}.layout-sm-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-sm-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-column>.flex{min-height:0}.layout-sm,.layout-sm-column,.layout-sm-row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.layout-sm-column{flex-direction:column}.layout-sm-row{flex-direction:row}}@media (min-width:960px){.flex-order-gt-sm--20{order:-20}.flex-order-gt-sm--19{order:-19}.flex-order-gt-sm--18{order:-18}.flex-order-gt-sm--17{order:-17}.flex-order-gt-sm--16{order:-16}.flex-order-gt-sm--15{order:-15}.flex-order-gt-sm--14{order:-14}.flex-order-gt-sm--13{order:-13}.flex-order-gt-sm--12{order:-12}.flex-order-gt-sm--11{order:-11}.flex-order-gt-sm--10{order:-10}.flex-order-gt-sm--9{order:-9}.flex-order-gt-sm--8{order:-8}.flex-order-gt-sm--7{order:-7}.flex-order-gt-sm--6{order:-6}.flex-order-gt-sm--5{order:-5}.flex-order-gt-sm--4{order:-4}.flex-order-gt-sm--3{order:-3}.flex-order-gt-sm--2{order:-2}.flex-order-gt-sm--1{order:-1}.flex-order-gt-sm-0{order:0}.flex-order-gt-sm-1{order:1}.flex-order-gt-sm-2{order:2}.flex-order-gt-sm-3{order:3}.flex-order-gt-sm-4{order:4}.flex-order-gt-sm-5{order:5}.flex-order-gt-sm-6{order:6}.flex-order-gt-sm-7{order:7}.flex-order-gt-sm-8{order:8}.flex-order-gt-sm-9{order:9}.flex-order-gt-sm-10{order:10}.flex-order-gt-sm-11{order:11}.flex-order-gt-sm-12{order:12}.flex-order-gt-sm-13{order:13}.flex-order-gt-sm-14{order:14}.flex-order-gt-sm-15{order:15}.flex-order-gt-sm-16{order:16}.flex-order-gt-sm-17{order:17}.flex-order-gt-sm-18{order:18}.flex-order-gt-sm-19{order:19}.flex-order-gt-sm-20{order:20}.flex-offset-gt-sm-0,.offset-gt-sm-0{margin-left:0}[dir=rtl] .flex-offset-gt-sm-0,[dir=rtl] .offset-gt-sm-0{margin-left:auto;margin-right:0}.flex-offset-gt-sm-5,.offset-gt-sm-5{margin-left:5%}[dir=rtl] .flex-offset-gt-sm-5,[dir=rtl] .offset-gt-sm-5{margin-left:auto;margin-right:5%}.flex-offset-gt-sm-10,.offset-gt-sm-10{margin-left:10%}[dir=rtl] .flex-offset-gt-sm-10,[dir=rtl] .offset-gt-sm-10{margin-left:auto;margin-right:10%}.flex-offset-gt-sm-15,.offset-gt-sm-15{margin-left:15%}[dir=rtl] .flex-offset-gt-sm-15,[dir=rtl] .offset-gt-sm-15{margin-left:auto;margin-right:15%}.flex-offset-gt-sm-20,.offset-gt-sm-20{margin-left:20%}[dir=rtl] .flex-offset-gt-sm-20,[dir=rtl] .offset-gt-sm-20{margin-left:auto;margin-right:20%}.flex-offset-gt-sm-25,.offset-gt-sm-25{margin-left:25%}[dir=rtl] .flex-offset-gt-sm-25,[dir=rtl] .offset-gt-sm-25{margin-left:auto;margin-right:25%}.flex-offset-gt-sm-30,.offset-gt-sm-30{margin-left:30%}[dir=rtl] .flex-offset-gt-sm-30,[dir=rtl] .offset-gt-sm-30{margin-left:auto;margin-right:30%}.flex-offset-gt-sm-35,.offset-gt-sm-35{margin-left:35%}[dir=rtl] .flex-offset-gt-sm-35,[dir=rtl] .offset-gt-sm-35{margin-left:auto;margin-right:35%}.flex-offset-gt-sm-40,.offset-gt-sm-40{margin-left:40%}[dir=rtl] .flex-offset-gt-sm-40,[dir=rtl] .offset-gt-sm-40{margin-left:auto;margin-right:40%}.flex-offset-gt-sm-45,.offset-gt-sm-45{margin-left:45%}[dir=rtl] .flex-offset-gt-sm-45,[dir=rtl] .offset-gt-sm-45{margin-left:auto;margin-right:45%}.flex-offset-gt-sm-50,.offset-gt-sm-50{margin-left:50%}[dir=rtl] .flex-offset-gt-sm-50,[dir=rtl] .offset-gt-sm-50{margin-left:auto;margin-right:50%}.flex-offset-gt-sm-55,.offset-gt-sm-55{margin-left:55%}[dir=rtl] .flex-offset-gt-sm-55,[dir=rtl] .offset-gt-sm-55{margin-left:auto;margin-right:55%}.flex-offset-gt-sm-60,.offset-gt-sm-60{margin-left:60%}[dir=rtl] .flex-offset-gt-sm-60,[dir=rtl] .offset-gt-sm-60{margin-left:auto;margin-right:60%}.flex-offset-gt-sm-65,.offset-gt-sm-65{margin-left:65%}[dir=rtl] .flex-offset-gt-sm-65,[dir=rtl] .offset-gt-sm-65{margin-left:auto;margin-right:65%}.flex-offset-gt-sm-70,.offset-gt-sm-70{margin-left:70%}[dir=rtl] .flex-offset-gt-sm-70,[dir=rtl] .offset-gt-sm-70{margin-left:auto;margin-right:70%}.flex-offset-gt-sm-75,.offset-gt-sm-75{margin-left:75%}[dir=rtl] .flex-offset-gt-sm-75,[dir=rtl] .offset-gt-sm-75{margin-left:auto;margin-right:75%}.flex-offset-gt-sm-80,.offset-gt-sm-80{margin-left:80%}[dir=rtl] .flex-offset-gt-sm-80,[dir=rtl] .offset-gt-sm-80{margin-left:auto;margin-right:80%}.flex-offset-gt-sm-85,.offset-gt-sm-85{margin-left:85%}[dir=rtl] .flex-offset-gt-sm-85,[dir=rtl] .offset-gt-sm-85{margin-left:auto;margin-right:85%}.flex-offset-gt-sm-90,.offset-gt-sm-90{margin-left:90%}[dir=rtl] .flex-offset-gt-sm-90,[dir=rtl] .offset-gt-sm-90{margin-left:auto;margin-right:90%}.flex-offset-gt-sm-95,.offset-gt-sm-95{margin-left:95%}[dir=rtl] .flex-offset-gt-sm-95,[dir=rtl] .offset-gt-sm-95{margin-left:auto;margin-right:95%}.flex-offset-gt-sm-33,.offset-gt-sm-33{margin-left:calc(100% / 3)}.flex-offset-gt-sm-66,.offset-gt-sm-66{margin-left:calc(200% / 3)}[dir=rtl] .flex-offset-gt-sm-66,[dir=rtl] .offset-gt-sm-66{margin-left:auto;margin-right:calc(200% / 3)}.layout-align-gt-sm,.layout-align-gt-sm-start-stretch{justify-content:flex-start;align-content:stretch;align-items:stretch}.layout-align-gt-sm-start,.layout-align-gt-sm-start-center,.layout-align-gt-sm-start-end,.layout-align-gt-sm-start-start,.layout-align-gt-sm-start-stretch{justify-content:flex-start}.layout-align-gt-sm-center,.layout-align-gt-sm-center-center,.layout-align-gt-sm-center-end,.layout-align-gt-sm-center-start,.layout-align-gt-sm-center-stretch{justify-content:center}.layout-align-gt-sm-end,.layout-align-gt-sm-end-center,.layout-align-gt-sm-end-end,.layout-align-gt-sm-end-start,.layout-align-gt-sm-end-stretch{justify-content:flex-end}.layout-align-gt-sm-space-around,.layout-align-gt-sm-space-around-center,.layout-align-gt-sm-space-around-end,.layout-align-gt-sm-space-around-start,.layout-align-gt-sm-space-around-stretch{justify-content:space-around}.layout-align-gt-sm-space-between,.layout-align-gt-sm-space-between-center,.layout-align-gt-sm-space-between-end,.layout-align-gt-sm-space-between-start,.layout-align-gt-sm-space-between-stretch{justify-content:space-between}.layout-align-gt-sm-center-start,.layout-align-gt-sm-end-start,.layout-align-gt-sm-space-around-start,.layout-align-gt-sm-space-between-start,.layout-align-gt-sm-start-start{align-items:flex-start;align-content:flex-start}.layout-align-gt-sm-center-center,.layout-align-gt-sm-end-center,.layout-align-gt-sm-space-around-center,.layout-align-gt-sm-space-between-center,.layout-align-gt-sm-start-center{align-items:center;align-content:center;max-width:100%}.layout-align-gt-sm-center-center>*,.layout-align-gt-sm-end-center>*,.layout-align-gt-sm-space-around-center>*,.layout-align-gt-sm-space-between-center>*,.layout-align-gt-sm-start-center>*{max-width:100%;box-sizing:border-box}.layout-align-gt-sm-center-end,.layout-align-gt-sm-end-end,.layout-align-gt-sm-space-around-end,.layout-align-gt-sm-space-between-end,.layout-align-gt-sm-start-end{align-items:flex-end;align-content:flex-end}.layout-align-gt-sm-center-stretch,.layout-align-gt-sm-end-stretch,.layout-align-gt-sm-space-around-stretch,.layout-align-gt-sm-space-between-stretch,.layout-align-gt-sm-start-stretch{align-items:stretch;align-content:stretch}.flex-gt-sm{flex:1;box-sizing:border-box}.flex-gt-sm-grow{flex:1 1 100%;box-sizing:border-box}.flex-gt-sm-initial{flex:0 1 auto;box-sizing:border-box}.flex-gt-sm-auto{flex:1 1 auto;box-sizing:border-box}.flex-gt-sm-none{flex:0 0 auto;box-sizing:border-box}.flex-gt-sm-noshrink{flex:1 0 auto;box-sizing:border-box}.flex-gt-sm-nogrow{flex:0 1 auto;box-sizing:border-box}.flex-gt-sm-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-gt-sm-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-gt-sm-column>.flex-gt-sm-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box;min-height:0}.flex-gt-sm-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.flex-gt-sm-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.flex-gt-sm-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.flex-gt-sm-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.flex-gt-sm-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.flex-gt-sm-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.flex-gt-sm-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.flex-gt-sm-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.flex-gt-sm-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.flex-gt-sm-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.flex-gt-sm-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.flex-gt-sm-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.flex-gt-sm-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.flex-gt-sm-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.flex-gt-sm-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.flex-gt-sm-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.flex-gt-sm-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.flex-gt-sm-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.flex-gt-sm-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.flex-gt-sm-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-gt-sm-row>.flex{min-width:0}.layout-gt-sm-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-column>.flex{min-height:0}.layout-gt-sm,.layout-gt-sm-column,.layout-gt-sm-row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.layout-gt-sm-column{flex-direction:column}.layout-gt-sm-row{flex-direction:row}}@media (min-width:960px) and (max-width:1279px){.hide-gt-sm:not(.show-gt-xs):not(.show-gt-sm):not(.show-md):not(.show),.hide-gt-xs:not(.show-gt-xs):not(.show-gt-sm):not(.show-md):not(.show),.hide:not(.show-gt-xs):not(.show-gt-sm):not(.show-md):not(.show){display:none}.hide-md:not(.show-md):not(.show-gt-sm):not(.show-gt-xs):not(.show){display:none}.flex-order-md--20{order:-20}.flex-order-md--19{order:-19}.flex-order-md--18{order:-18}.flex-order-md--17{order:-17}.flex-order-md--16{order:-16}.flex-order-md--15{order:-15}.flex-order-md--14{order:-14}.flex-order-md--13{order:-13}.flex-order-md--12{order:-12}.flex-order-md--11{order:-11}.flex-order-md--10{order:-10}.flex-order-md--9{order:-9}.flex-order-md--8{order:-8}.flex-order-md--7{order:-7}.flex-order-md--6{order:-6}.flex-order-md--5{order:-5}.flex-order-md--4{order:-4}.flex-order-md--3{order:-3}.flex-order-md--2{order:-2}.flex-order-md--1{order:-1}.flex-order-md-0{order:0}.flex-order-md-1{order:1}.flex-order-md-2{order:2}.flex-order-md-3{order:3}.flex-order-md-4{order:4}.flex-order-md-5{order:5}.flex-order-md-6{order:6}.flex-order-md-7{order:7}.flex-order-md-8{order:8}.flex-order-md-9{order:9}.flex-order-md-10{order:10}.flex-order-md-11{order:11}.flex-order-md-12{order:12}.flex-order-md-13{order:13}.flex-order-md-14{order:14}.flex-order-md-15{order:15}.flex-order-md-16{order:16}.flex-order-md-17{order:17}.flex-order-md-18{order:18}.flex-order-md-19{order:19}.flex-order-md-20{order:20}.flex-offset-md-0,.offset-md-0{margin-left:0}[dir=rtl] .flex-offset-md-0,[dir=rtl] .offset-md-0{margin-left:auto;margin-right:0}.flex-offset-md-5,.offset-md-5{margin-left:5%}[dir=rtl] .flex-offset-md-5,[dir=rtl] .offset-md-5{margin-left:auto;margin-right:5%}.flex-offset-md-10,.offset-md-10{margin-left:10%}[dir=rtl] .flex-offset-md-10,[dir=rtl] .offset-md-10{margin-left:auto;margin-right:10%}.flex-offset-md-15,.offset-md-15{margin-left:15%}[dir=rtl] .flex-offset-md-15,[dir=rtl] .offset-md-15{margin-left:auto;margin-right:15%}.flex-offset-md-20,.offset-md-20{margin-left:20%}[dir=rtl] .flex-offset-md-20,[dir=rtl] .offset-md-20{margin-left:auto;margin-right:20%}.flex-offset-md-25,.offset-md-25{margin-left:25%}[dir=rtl] .flex-offset-md-25,[dir=rtl] .offset-md-25{margin-left:auto;margin-right:25%}.flex-offset-md-30,.offset-md-30{margin-left:30%}[dir=rtl] .flex-offset-md-30,[dir=rtl] .offset-md-30{margin-left:auto;margin-right:30%}.flex-offset-md-35,.offset-md-35{margin-left:35%}[dir=rtl] .flex-offset-md-35,[dir=rtl] .offset-md-35{margin-left:auto;margin-right:35%}.flex-offset-md-40,.offset-md-40{margin-left:40%}[dir=rtl] .flex-offset-md-40,[dir=rtl] .offset-md-40{margin-left:auto;margin-right:40%}.flex-offset-md-45,.offset-md-45{margin-left:45%}[dir=rtl] .flex-offset-md-45,[dir=rtl] .offset-md-45{margin-left:auto;margin-right:45%}.flex-offset-md-50,.offset-md-50{margin-left:50%}[dir=rtl] .flex-offset-md-50,[dir=rtl] .offset-md-50{margin-left:auto;margin-right:50%}.flex-offset-md-55,.offset-md-55{margin-left:55%}[dir=rtl] .flex-offset-md-55,[dir=rtl] .offset-md-55{margin-left:auto;margin-right:55%}.flex-offset-md-60,.offset-md-60{margin-left:60%}[dir=rtl] .flex-offset-md-60,[dir=rtl] .offset-md-60{margin-left:auto;margin-right:60%}.flex-offset-md-65,.offset-md-65{margin-left:65%}[dir=rtl] .flex-offset-md-65,[dir=rtl] .offset-md-65{margin-left:auto;margin-right:65%}.flex-offset-md-70,.offset-md-70{margin-left:70%}[dir=rtl] .flex-offset-md-70,[dir=rtl] .offset-md-70{margin-left:auto;margin-right:70%}.flex-offset-md-75,.offset-md-75{margin-left:75%}[dir=rtl] .flex-offset-md-75,[dir=rtl] .offset-md-75{margin-left:auto;margin-right:75%}.flex-offset-md-80,.offset-md-80{margin-left:80%}[dir=rtl] .flex-offset-md-80,[dir=rtl] .offset-md-80{margin-left:auto;margin-right:80%}.flex-offset-md-85,.offset-md-85{margin-left:85%}[dir=rtl] .flex-offset-md-85,[dir=rtl] .offset-md-85{margin-left:auto;margin-right:85%}.flex-offset-md-90,.offset-md-90{margin-left:90%}[dir=rtl] .flex-offset-md-90,[dir=rtl] .offset-md-90{margin-left:auto;margin-right:90%}.flex-offset-md-95,.offset-md-95{margin-left:95%}[dir=rtl] .flex-offset-md-95,[dir=rtl] .offset-md-95{margin-left:auto;margin-right:95%}.flex-offset-md-33,.offset-md-33{margin-left:calc(100% / 3)}.flex-offset-md-66,.offset-md-66{margin-left:calc(200% / 3)}[dir=rtl] .flex-offset-md-66,[dir=rtl] .offset-md-66{margin-left:auto;margin-right:calc(200% / 3)}.layout-align-md,.layout-align-md-start-stretch{justify-content:flex-start;align-content:stretch;align-items:stretch}.layout-align-md-start,.layout-align-md-start-center,.layout-align-md-start-end,.layout-align-md-start-start,.layout-align-md-start-stretch{justify-content:flex-start}.layout-align-md-center,.layout-align-md-center-center,.layout-align-md-center-end,.layout-align-md-center-start,.layout-align-md-center-stretch{justify-content:center}.layout-align-md-end,.layout-align-md-end-center,.layout-align-md-end-end,.layout-align-md-end-start,.layout-align-md-end-stretch{justify-content:flex-end}.layout-align-md-space-around,.layout-align-md-space-around-center,.layout-align-md-space-around-end,.layout-align-md-space-around-start,.layout-align-md-space-around-stretch{justify-content:space-around}.layout-align-md-space-between,.layout-align-md-space-between-center,.layout-align-md-space-between-end,.layout-align-md-space-between-start,.layout-align-md-space-between-stretch{justify-content:space-between}.layout-align-md-center-start,.layout-align-md-end-start,.layout-align-md-space-around-start,.layout-align-md-space-between-start,.layout-align-md-start-start{align-items:flex-start;align-content:flex-start}.layout-align-md-center-center,.layout-align-md-end-center,.layout-align-md-space-around-center,.layout-align-md-space-between-center,.layout-align-md-start-center{align-items:center;align-content:center;max-width:100%}.layout-align-md-center-center>*,.layout-align-md-end-center>*,.layout-align-md-space-around-center>*,.layout-align-md-space-between-center>*,.layout-align-md-start-center>*{max-width:100%;box-sizing:border-box}.layout-align-md-center-end,.layout-align-md-end-end,.layout-align-md-space-around-end,.layout-align-md-space-between-end,.layout-align-md-start-end{align-items:flex-end;align-content:flex-end}.layout-align-md-center-stretch,.layout-align-md-end-stretch,.layout-align-md-space-around-stretch,.layout-align-md-space-between-stretch,.layout-align-md-start-stretch{align-items:stretch;align-content:stretch}.flex-md{flex:1;box-sizing:border-box}.flex-md-grow{flex:1 1 100%;box-sizing:border-box}.flex-md-initial{flex:0 1 auto;box-sizing:border-box}.flex-md-auto{flex:1 1 auto;box-sizing:border-box}.flex-md-none{flex:0 0 auto;box-sizing:border-box}.flex-md-noshrink{flex:1 0 auto;box-sizing:border-box}.flex-md-nogrow{flex:0 1 auto;box-sizing:border-box}.flex-md-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-md-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-md-column>.flex-md-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box;min-height:0}.flex-md-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.flex-md-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.flex-md-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.flex-md-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.flex-md-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.flex-md-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.flex-md-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.flex-md-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.flex-md-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.flex-md-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.flex-md-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.flex-md-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.flex-md-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.flex-md-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.flex-md-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.flex-md-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.flex-md-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.flex-md-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.flex-md-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.flex-md-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-md-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-md-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-md-row>.flex{min-width:0}.layout-md-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-md-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-column>.flex{min-height:0}.layout-md,.layout-md-column,.layout-md-row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.layout-md-column{flex-direction:column}.layout-md-row{flex-direction:row}}@media (min-width:1280px){.flex-order-gt-md--20{order:-20}.flex-order-gt-md--19{order:-19}.flex-order-gt-md--18{order:-18}.flex-order-gt-md--17{order:-17}.flex-order-gt-md--16{order:-16}.flex-order-gt-md--15{order:-15}.flex-order-gt-md--14{order:-14}.flex-order-gt-md--13{order:-13}.flex-order-gt-md--12{order:-12}.flex-order-gt-md--11{order:-11}.flex-order-gt-md--10{order:-10}.flex-order-gt-md--9{order:-9}.flex-order-gt-md--8{order:-8}.flex-order-gt-md--7{order:-7}.flex-order-gt-md--6{order:-6}.flex-order-gt-md--5{order:-5}.flex-order-gt-md--4{order:-4}.flex-order-gt-md--3{order:-3}.flex-order-gt-md--2{order:-2}.flex-order-gt-md--1{order:-1}.flex-order-gt-md-0{order:0}.flex-order-gt-md-1{order:1}.flex-order-gt-md-2{order:2}.flex-order-gt-md-3{order:3}.flex-order-gt-md-4{order:4}.flex-order-gt-md-5{order:5}.flex-order-gt-md-6{order:6}.flex-order-gt-md-7{order:7}.flex-order-gt-md-8{order:8}.flex-order-gt-md-9{order:9}.flex-order-gt-md-10{order:10}.flex-order-gt-md-11{order:11}.flex-order-gt-md-12{order:12}.flex-order-gt-md-13{order:13}.flex-order-gt-md-14{order:14}.flex-order-gt-md-15{order:15}.flex-order-gt-md-16{order:16}.flex-order-gt-md-17{order:17}.flex-order-gt-md-18{order:18}.flex-order-gt-md-19{order:19}.flex-order-gt-md-20{order:20}.flex-offset-gt-md-0,.offset-gt-md-0{margin-left:0}[dir=rtl] .flex-offset-gt-md-0,[dir=rtl] .offset-gt-md-0{margin-left:auto;margin-right:0}.flex-offset-gt-md-5,.offset-gt-md-5{margin-left:5%}[dir=rtl] .flex-offset-gt-md-5,[dir=rtl] .offset-gt-md-5{margin-left:auto;margin-right:5%}.flex-offset-gt-md-10,.offset-gt-md-10{margin-left:10%}[dir=rtl] .flex-offset-gt-md-10,[dir=rtl] .offset-gt-md-10{margin-left:auto;margin-right:10%}.flex-offset-gt-md-15,.offset-gt-md-15{margin-left:15%}[dir=rtl] .flex-offset-gt-md-15,[dir=rtl] .offset-gt-md-15{margin-left:auto;margin-right:15%}.flex-offset-gt-md-20,.offset-gt-md-20{margin-left:20%}[dir=rtl] .flex-offset-gt-md-20,[dir=rtl] .offset-gt-md-20{margin-left:auto;margin-right:20%}.flex-offset-gt-md-25,.offset-gt-md-25{margin-left:25%}[dir=rtl] .flex-offset-gt-md-25,[dir=rtl] .offset-gt-md-25{margin-left:auto;margin-right:25%}.flex-offset-gt-md-30,.offset-gt-md-30{margin-left:30%}[dir=rtl] .flex-offset-gt-md-30,[dir=rtl] .offset-gt-md-30{margin-left:auto;margin-right:30%}.flex-offset-gt-md-35,.offset-gt-md-35{margin-left:35%}[dir=rtl] .flex-offset-gt-md-35,[dir=rtl] .offset-gt-md-35{margin-left:auto;margin-right:35%}.flex-offset-gt-md-40,.offset-gt-md-40{margin-left:40%}[dir=rtl] .flex-offset-gt-md-40,[dir=rtl] .offset-gt-md-40{margin-left:auto;margin-right:40%}.flex-offset-gt-md-45,.offset-gt-md-45{margin-left:45%}[dir=rtl] .flex-offset-gt-md-45,[dir=rtl] .offset-gt-md-45{margin-left:auto;margin-right:45%}.flex-offset-gt-md-50,.offset-gt-md-50{margin-left:50%}[dir=rtl] .flex-offset-gt-md-50,[dir=rtl] .offset-gt-md-50{margin-left:auto;margin-right:50%}.flex-offset-gt-md-55,.offset-gt-md-55{margin-left:55%}[dir=rtl] .flex-offset-gt-md-55,[dir=rtl] .offset-gt-md-55{margin-left:auto;margin-right:55%}.flex-offset-gt-md-60,.offset-gt-md-60{margin-left:60%}[dir=rtl] .flex-offset-gt-md-60,[dir=rtl] .offset-gt-md-60{margin-left:auto;margin-right:60%}.flex-offset-gt-md-65,.offset-gt-md-65{margin-left:65%}[dir=rtl] .flex-offset-gt-md-65,[dir=rtl] .offset-gt-md-65{margin-left:auto;margin-right:65%}.flex-offset-gt-md-70,.offset-gt-md-70{margin-left:70%}[dir=rtl] .flex-offset-gt-md-70,[dir=rtl] .offset-gt-md-70{margin-left:auto;margin-right:70%}.flex-offset-gt-md-75,.offset-gt-md-75{margin-left:75%}[dir=rtl] .flex-offset-gt-md-75,[dir=rtl] .offset-gt-md-75{margin-left:auto;margin-right:75%}.flex-offset-gt-md-80,.offset-gt-md-80{margin-left:80%}[dir=rtl] .flex-offset-gt-md-80,[dir=rtl] .offset-gt-md-80{margin-left:auto;margin-right:80%}.flex-offset-gt-md-85,.offset-gt-md-85{margin-left:85%}[dir=rtl] .flex-offset-gt-md-85,[dir=rtl] .offset-gt-md-85{margin-left:auto;margin-right:85%}.flex-offset-gt-md-90,.offset-gt-md-90{margin-left:90%}[dir=rtl] .flex-offset-gt-md-90,[dir=rtl] .offset-gt-md-90{margin-left:auto;margin-right:90%}.flex-offset-gt-md-95,.offset-gt-md-95{margin-left:95%}[dir=rtl] .flex-offset-gt-md-95,[dir=rtl] .offset-gt-md-95{margin-left:auto;margin-right:95%}.flex-offset-gt-md-33,.offset-gt-md-33{margin-left:calc(100% / 3)}.flex-offset-gt-md-66,.offset-gt-md-66{margin-left:calc(200% / 3)}[dir=rtl] .flex-offset-gt-md-66,[dir=rtl] .offset-gt-md-66{margin-left:auto;margin-right:calc(200% / 3)}.layout-align-gt-md,.layout-align-gt-md-start-stretch{justify-content:flex-start;align-content:stretch;align-items:stretch}.layout-align-gt-md-start,.layout-align-gt-md-start-center,.layout-align-gt-md-start-end,.layout-align-gt-md-start-start,.layout-align-gt-md-start-stretch{justify-content:flex-start}.layout-align-gt-md-center,.layout-align-gt-md-center-center,.layout-align-gt-md-center-end,.layout-align-gt-md-center-start,.layout-align-gt-md-center-stretch{justify-content:center}.layout-align-gt-md-end,.layout-align-gt-md-end-center,.layout-align-gt-md-end-end,.layout-align-gt-md-end-start,.layout-align-gt-md-end-stretch{justify-content:flex-end}.layout-align-gt-md-space-around,.layout-align-gt-md-space-around-center,.layout-align-gt-md-space-around-end,.layout-align-gt-md-space-around-start,.layout-align-gt-md-space-around-stretch{justify-content:space-around}.layout-align-gt-md-space-between,.layout-align-gt-md-space-between-center,.layout-align-gt-md-space-between-end,.layout-align-gt-md-space-between-start,.layout-align-gt-md-space-between-stretch{justify-content:space-between}.layout-align-gt-md-center-start,.layout-align-gt-md-end-start,.layout-align-gt-md-space-around-start,.layout-align-gt-md-space-between-start,.layout-align-gt-md-start-start{align-items:flex-start;align-content:flex-start}.layout-align-gt-md-center-center,.layout-align-gt-md-end-center,.layout-align-gt-md-space-around-center,.layout-align-gt-md-space-between-center,.layout-align-gt-md-start-center{align-items:center;align-content:center;max-width:100%}.layout-align-gt-md-center-center>*,.layout-align-gt-md-end-center>*,.layout-align-gt-md-space-around-center>*,.layout-align-gt-md-space-between-center>*,.layout-align-gt-md-start-center>*{max-width:100%;box-sizing:border-box}.layout-align-gt-md-center-end,.layout-align-gt-md-end-end,.layout-align-gt-md-space-around-end,.layout-align-gt-md-space-between-end,.layout-align-gt-md-start-end{align-items:flex-end;align-content:flex-end}.layout-align-gt-md-center-stretch,.layout-align-gt-md-end-stretch,.layout-align-gt-md-space-around-stretch,.layout-align-gt-md-space-between-stretch,.layout-align-gt-md-start-stretch{align-items:stretch;align-content:stretch}.flex-gt-md{flex:1;box-sizing:border-box}.flex-gt-md-grow{flex:1 1 100%;box-sizing:border-box}.flex-gt-md-initial{flex:0 1 auto;box-sizing:border-box}.flex-gt-md-auto{flex:1 1 auto;box-sizing:border-box}.flex-gt-md-none{flex:0 0 auto;box-sizing:border-box}.flex-gt-md-noshrink{flex:1 0 auto;box-sizing:border-box}.flex-gt-md-nogrow{flex:0 1 auto;box-sizing:border-box}.flex-gt-md-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-gt-md-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-gt-md-column>.flex-gt-md-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box;min-height:0}.flex-gt-md-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.flex-gt-md-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.flex-gt-md-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.flex-gt-md-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.flex-gt-md-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.flex-gt-md-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.flex-gt-md-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.flex-gt-md-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.flex-gt-md-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.flex-gt-md-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.flex-gt-md-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.flex-gt-md-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.flex-gt-md-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.flex-gt-md-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.flex-gt-md-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.flex-gt-md-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.flex-gt-md-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.flex-gt-md-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.flex-gt-md-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.flex-gt-md-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-gt-md-row>.flex{min-width:0}.layout-gt-md-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-column>.flex{min-height:0}.layout-gt-md,.layout-gt-md-column,.layout-gt-md-row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.layout-gt-md-column{flex-direction:column}.layout-gt-md-row{flex-direction:row}}@media (min-width:1280px) and (max-width:1919px){.hide-gt-md:not(.show-gt-xs):not(.show-gt-sm):not(.show-gt-md):not(.show-lg):not(.show),.hide-gt-sm:not(.show-gt-xs):not(.show-gt-sm):not(.show-gt-md):not(.show-lg):not(.show),.hide-gt-xs:not(.show-gt-xs):not(.show-gt-sm):not(.show-gt-md):not(.show-lg):not(.show),.hide:not(.show-gt-xs):not(.show-gt-sm):not(.show-gt-md):not(.show-lg):not(.show){display:none}.hide-lg:not(.show-lg):not(.show-gt-md):not(.show-gt-sm):not(.show-gt-xs):not(.show){display:none}.flex-order-lg--20{order:-20}.flex-order-lg--19{order:-19}.flex-order-lg--18{order:-18}.flex-order-lg--17{order:-17}.flex-order-lg--16{order:-16}.flex-order-lg--15{order:-15}.flex-order-lg--14{order:-14}.flex-order-lg--13{order:-13}.flex-order-lg--12{order:-12}.flex-order-lg--11{order:-11}.flex-order-lg--10{order:-10}.flex-order-lg--9{order:-9}.flex-order-lg--8{order:-8}.flex-order-lg--7{order:-7}.flex-order-lg--6{order:-6}.flex-order-lg--5{order:-5}.flex-order-lg--4{order:-4}.flex-order-lg--3{order:-3}.flex-order-lg--2{order:-2}.flex-order-lg--1{order:-1}.flex-order-lg-0{order:0}.flex-order-lg-1{order:1}.flex-order-lg-2{order:2}.flex-order-lg-3{order:3}.flex-order-lg-4{order:4}.flex-order-lg-5{order:5}.flex-order-lg-6{order:6}.flex-order-lg-7{order:7}.flex-order-lg-8{order:8}.flex-order-lg-9{order:9}.flex-order-lg-10{order:10}.flex-order-lg-11{order:11}.flex-order-lg-12{order:12}.flex-order-lg-13{order:13}.flex-order-lg-14{order:14}.flex-order-lg-15{order:15}.flex-order-lg-16{order:16}.flex-order-lg-17{order:17}.flex-order-lg-18{order:18}.flex-order-lg-19{order:19}.flex-order-lg-20{order:20}.flex-offset-lg-0,.offset-lg-0{margin-left:0}[dir=rtl] .flex-offset-lg-0,[dir=rtl] .offset-lg-0{margin-left:auto;margin-right:0}.flex-offset-lg-5,.offset-lg-5{margin-left:5%}[dir=rtl] .flex-offset-lg-5,[dir=rtl] .offset-lg-5{margin-left:auto;margin-right:5%}.flex-offset-lg-10,.offset-lg-10{margin-left:10%}[dir=rtl] .flex-offset-lg-10,[dir=rtl] .offset-lg-10{margin-left:auto;margin-right:10%}.flex-offset-lg-15,.offset-lg-15{margin-left:15%}[dir=rtl] .flex-offset-lg-15,[dir=rtl] .offset-lg-15{margin-left:auto;margin-right:15%}.flex-offset-lg-20,.offset-lg-20{margin-left:20%}[dir=rtl] .flex-offset-lg-20,[dir=rtl] .offset-lg-20{margin-left:auto;margin-right:20%}.flex-offset-lg-25,.offset-lg-25{margin-left:25%}[dir=rtl] .flex-offset-lg-25,[dir=rtl] .offset-lg-25{margin-left:auto;margin-right:25%}.flex-offset-lg-30,.offset-lg-30{margin-left:30%}[dir=rtl] .flex-offset-lg-30,[dir=rtl] .offset-lg-30{margin-left:auto;margin-right:30%}.flex-offset-lg-35,.offset-lg-35{margin-left:35%}[dir=rtl] .flex-offset-lg-35,[dir=rtl] .offset-lg-35{margin-left:auto;margin-right:35%}.flex-offset-lg-40,.offset-lg-40{margin-left:40%}[dir=rtl] .flex-offset-lg-40,[dir=rtl] .offset-lg-40{margin-left:auto;margin-right:40%}.flex-offset-lg-45,.offset-lg-45{margin-left:45%}[dir=rtl] .flex-offset-lg-45,[dir=rtl] .offset-lg-45{margin-left:auto;margin-right:45%}.flex-offset-lg-50,.offset-lg-50{margin-left:50%}[dir=rtl] .flex-offset-lg-50,[dir=rtl] .offset-lg-50{margin-left:auto;margin-right:50%}.flex-offset-lg-55,.offset-lg-55{margin-left:55%}[dir=rtl] .flex-offset-lg-55,[dir=rtl] .offset-lg-55{margin-left:auto;margin-right:55%}.flex-offset-lg-60,.offset-lg-60{margin-left:60%}[dir=rtl] .flex-offset-lg-60,[dir=rtl] .offset-lg-60{margin-left:auto;margin-right:60%}.flex-offset-lg-65,.offset-lg-65{margin-left:65%}[dir=rtl] .flex-offset-lg-65,[dir=rtl] .offset-lg-65{margin-left:auto;margin-right:65%}.flex-offset-lg-70,.offset-lg-70{margin-left:70%}[dir=rtl] .flex-offset-lg-70,[dir=rtl] .offset-lg-70{margin-left:auto;margin-right:70%}.flex-offset-lg-75,.offset-lg-75{margin-left:75%}[dir=rtl] .flex-offset-lg-75,[dir=rtl] .offset-lg-75{margin-left:auto;margin-right:75%}.flex-offset-lg-80,.offset-lg-80{margin-left:80%}[dir=rtl] .flex-offset-lg-80,[dir=rtl] .offset-lg-80{margin-left:auto;margin-right:80%}.flex-offset-lg-85,.offset-lg-85{margin-left:85%}[dir=rtl] .flex-offset-lg-85,[dir=rtl] .offset-lg-85{margin-left:auto;margin-right:85%}.flex-offset-lg-90,.offset-lg-90{margin-left:90%}[dir=rtl] .flex-offset-lg-90,[dir=rtl] .offset-lg-90{margin-left:auto;margin-right:90%}.flex-offset-lg-95,.offset-lg-95{margin-left:95%}[dir=rtl] .flex-offset-lg-95,[dir=rtl] .offset-lg-95{margin-left:auto;margin-right:95%}.flex-offset-lg-33,.offset-lg-33{margin-left:calc(100% / 3)}.flex-offset-lg-66,.offset-lg-66{margin-left:calc(200% / 3)}[dir=rtl] .flex-offset-lg-66,[dir=rtl] .offset-lg-66{margin-left:auto;margin-right:calc(200% / 3)}.layout-align-lg,.layout-align-lg-start-stretch{justify-content:flex-start;align-content:stretch;align-items:stretch}.layout-align-lg-start,.layout-align-lg-start-center,.layout-align-lg-start-end,.layout-align-lg-start-start,.layout-align-lg-start-stretch{justify-content:flex-start}.layout-align-lg-center,.layout-align-lg-center-center,.layout-align-lg-center-end,.layout-align-lg-center-start,.layout-align-lg-center-stretch{justify-content:center}.layout-align-lg-end,.layout-align-lg-end-center,.layout-align-lg-end-end,.layout-align-lg-end-start,.layout-align-lg-end-stretch{justify-content:flex-end}.layout-align-lg-space-around,.layout-align-lg-space-around-center,.layout-align-lg-space-around-end,.layout-align-lg-space-around-start,.layout-align-lg-space-around-stretch{justify-content:space-around}.layout-align-lg-space-between,.layout-align-lg-space-between-center,.layout-align-lg-space-between-end,.layout-align-lg-space-between-start,.layout-align-lg-space-between-stretch{justify-content:space-between}.layout-align-lg-center-start,.layout-align-lg-end-start,.layout-align-lg-space-around-start,.layout-align-lg-space-between-start,.layout-align-lg-start-start{align-items:flex-start;align-content:flex-start}.layout-align-lg-center-center,.layout-align-lg-end-center,.layout-align-lg-space-around-center,.layout-align-lg-space-between-center,.layout-align-lg-start-center{align-items:center;align-content:center;max-width:100%}.layout-align-lg-center-center>*,.layout-align-lg-end-center>*,.layout-align-lg-space-around-center>*,.layout-align-lg-space-between-center>*,.layout-align-lg-start-center>*{max-width:100%;box-sizing:border-box}.layout-align-lg-center-end,.layout-align-lg-end-end,.layout-align-lg-space-around-end,.layout-align-lg-space-between-end,.layout-align-lg-start-end{align-items:flex-end;align-content:flex-end}.layout-align-lg-center-stretch,.layout-align-lg-end-stretch,.layout-align-lg-space-around-stretch,.layout-align-lg-space-between-stretch,.layout-align-lg-start-stretch{align-items:stretch;align-content:stretch}.flex-lg{flex:1;box-sizing:border-box}.flex-lg-grow{flex:1 1 100%;box-sizing:border-box}.flex-lg-initial{flex:0 1 auto;box-sizing:border-box}.flex-lg-auto{flex:1 1 auto;box-sizing:border-box}.flex-lg-none{flex:0 0 auto;box-sizing:border-box}.flex-lg-noshrink{flex:1 0 auto;box-sizing:border-box}.flex-lg-nogrow{flex:0 1 auto;box-sizing:border-box}.flex-lg-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-lg-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-lg-column>.flex-lg-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box;min-height:0}.flex-lg-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.flex-lg-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.flex-lg-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.flex-lg-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.flex-lg-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.flex-lg-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.flex-lg-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.flex-lg-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.flex-lg-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.flex-lg-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.flex-lg-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.flex-lg-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.flex-lg-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.flex-lg-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.flex-lg-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.flex-lg-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.flex-lg-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.flex-lg-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.flex-lg-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.flex-lg-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-lg-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-lg-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-lg-row>.flex{min-width:0}.layout-lg-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-lg-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-column>.flex{min-height:0}.layout-lg,.layout-lg-column,.layout-lg-row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.layout-lg-column{flex-direction:column}.layout-lg-row{flex-direction:row}}@media (min-width:1920px){.flex-order-gt-lg--20{order:-20}.flex-order-gt-lg--19{order:-19}.flex-order-gt-lg--18{order:-18}.flex-order-gt-lg--17{order:-17}.flex-order-gt-lg--16{order:-16}.flex-order-gt-lg--15{order:-15}.flex-order-gt-lg--14{order:-14}.flex-order-gt-lg--13{order:-13}.flex-order-gt-lg--12{order:-12}.flex-order-gt-lg--11{order:-11}.flex-order-gt-lg--10{order:-10}.flex-order-gt-lg--9{order:-9}.flex-order-gt-lg--8{order:-8}.flex-order-gt-lg--7{order:-7}.flex-order-gt-lg--6{order:-6}.flex-order-gt-lg--5{order:-5}.flex-order-gt-lg--4{order:-4}.flex-order-gt-lg--3{order:-3}.flex-order-gt-lg--2{order:-2}.flex-order-gt-lg--1{order:-1}.flex-order-gt-lg-0{order:0}.flex-order-gt-lg-1{order:1}.flex-order-gt-lg-2{order:2}.flex-order-gt-lg-3{order:3}.flex-order-gt-lg-4{order:4}.flex-order-gt-lg-5{order:5}.flex-order-gt-lg-6{order:6}.flex-order-gt-lg-7{order:7}.flex-order-gt-lg-8{order:8}.flex-order-gt-lg-9{order:9}.flex-order-gt-lg-10{order:10}.flex-order-gt-lg-11{order:11}.flex-order-gt-lg-12{order:12}.flex-order-gt-lg-13{order:13}.flex-order-gt-lg-14{order:14}.flex-order-gt-lg-15{order:15}.flex-order-gt-lg-16{order:16}.flex-order-gt-lg-17{order:17}.flex-order-gt-lg-18{order:18}.flex-order-gt-lg-19{order:19}.flex-order-gt-lg-20{order:20}.flex-offset-gt-lg-0,.offset-gt-lg-0{margin-left:0}[dir=rtl] .flex-offset-gt-lg-0,[dir=rtl] .offset-gt-lg-0{margin-left:auto;margin-right:0}.flex-offset-gt-lg-5,.offset-gt-lg-5{margin-left:5%}[dir=rtl] .flex-offset-gt-lg-5,[dir=rtl] .offset-gt-lg-5{margin-left:auto;margin-right:5%}.flex-offset-gt-lg-10,.offset-gt-lg-10{margin-left:10%}[dir=rtl] .flex-offset-gt-lg-10,[dir=rtl] .offset-gt-lg-10{margin-left:auto;margin-right:10%}.flex-offset-gt-lg-15,.offset-gt-lg-15{margin-left:15%}[dir=rtl] .flex-offset-gt-lg-15,[dir=rtl] .offset-gt-lg-15{margin-left:auto;margin-right:15%}.flex-offset-gt-lg-20,.offset-gt-lg-20{margin-left:20%}[dir=rtl] .flex-offset-gt-lg-20,[dir=rtl] .offset-gt-lg-20{margin-left:auto;margin-right:20%}.flex-offset-gt-lg-25,.offset-gt-lg-25{margin-left:25%}[dir=rtl] .flex-offset-gt-lg-25,[dir=rtl] .offset-gt-lg-25{margin-left:auto;margin-right:25%}.flex-offset-gt-lg-30,.offset-gt-lg-30{margin-left:30%}[dir=rtl] .flex-offset-gt-lg-30,[dir=rtl] .offset-gt-lg-30{margin-left:auto;margin-right:30%}.flex-offset-gt-lg-35,.offset-gt-lg-35{margin-left:35%}[dir=rtl] .flex-offset-gt-lg-35,[dir=rtl] .offset-gt-lg-35{margin-left:auto;margin-right:35%}.flex-offset-gt-lg-40,.offset-gt-lg-40{margin-left:40%}[dir=rtl] .flex-offset-gt-lg-40,[dir=rtl] .offset-gt-lg-40{margin-left:auto;margin-right:40%}.flex-offset-gt-lg-45,.offset-gt-lg-45{margin-left:45%}[dir=rtl] .flex-offset-gt-lg-45,[dir=rtl] .offset-gt-lg-45{margin-left:auto;margin-right:45%}.flex-offset-gt-lg-50,.offset-gt-lg-50{margin-left:50%}[dir=rtl] .flex-offset-gt-lg-50,[dir=rtl] .offset-gt-lg-50{margin-left:auto;margin-right:50%}.flex-offset-gt-lg-55,.offset-gt-lg-55{margin-left:55%}[dir=rtl] .flex-offset-gt-lg-55,[dir=rtl] .offset-gt-lg-55{margin-left:auto;margin-right:55%}.flex-offset-gt-lg-60,.offset-gt-lg-60{margin-left:60%}[dir=rtl] .flex-offset-gt-lg-60,[dir=rtl] .offset-gt-lg-60{margin-left:auto;margin-right:60%}.flex-offset-gt-lg-65,.offset-gt-lg-65{margin-left:65%}[dir=rtl] .flex-offset-gt-lg-65,[dir=rtl] .offset-gt-lg-65{margin-left:auto;margin-right:65%}.flex-offset-gt-lg-70,.offset-gt-lg-70{margin-left:70%}[dir=rtl] .flex-offset-gt-lg-70,[dir=rtl] .offset-gt-lg-70{margin-left:auto;margin-right:70%}.flex-offset-gt-lg-75,.offset-gt-lg-75{margin-left:75%}[dir=rtl] .flex-offset-gt-lg-75,[dir=rtl] .offset-gt-lg-75{margin-left:auto;margin-right:75%}.flex-offset-gt-lg-80,.offset-gt-lg-80{margin-left:80%}[dir=rtl] .flex-offset-gt-lg-80,[dir=rtl] .offset-gt-lg-80{margin-left:auto;margin-right:80%}.flex-offset-gt-lg-85,.offset-gt-lg-85{margin-left:85%}[dir=rtl] .flex-offset-gt-lg-85,[dir=rtl] .offset-gt-lg-85{margin-left:auto;margin-right:85%}.flex-offset-gt-lg-90,.offset-gt-lg-90{margin-left:90%}[dir=rtl] .flex-offset-gt-lg-90,[dir=rtl] .offset-gt-lg-90{margin-left:auto;margin-right:90%}.flex-offset-gt-lg-95,.offset-gt-lg-95{margin-left:95%}[dir=rtl] .flex-offset-gt-lg-95,[dir=rtl] .offset-gt-lg-95{margin-left:auto;margin-right:95%}.flex-offset-gt-lg-33,.offset-gt-lg-33{margin-left:calc(100% / 3)}.flex-offset-gt-lg-66,.offset-gt-lg-66{margin-left:calc(200% / 3)}[dir=rtl] .flex-offset-gt-lg-66,[dir=rtl] .offset-gt-lg-66{margin-left:auto;margin-right:calc(200% / 3)}.layout-align-gt-lg,.layout-align-gt-lg-start-stretch{justify-content:flex-start;align-content:stretch;align-items:stretch}.layout-align-gt-lg-start,.layout-align-gt-lg-start-center,.layout-align-gt-lg-start-end,.layout-align-gt-lg-start-start,.layout-align-gt-lg-start-stretch{justify-content:flex-start}.layout-align-gt-lg-center,.layout-align-gt-lg-center-center,.layout-align-gt-lg-center-end,.layout-align-gt-lg-center-start,.layout-align-gt-lg-center-stretch{justify-content:center}.layout-align-gt-lg-end,.layout-align-gt-lg-end-center,.layout-align-gt-lg-end-end,.layout-align-gt-lg-end-start,.layout-align-gt-lg-end-stretch{justify-content:flex-end}.layout-align-gt-lg-space-around,.layout-align-gt-lg-space-around-center,.layout-align-gt-lg-space-around-end,.layout-align-gt-lg-space-around-start,.layout-align-gt-lg-space-around-stretch{justify-content:space-around}.layout-align-gt-lg-space-between,.layout-align-gt-lg-space-between-center,.layout-align-gt-lg-space-between-end,.layout-align-gt-lg-space-between-start,.layout-align-gt-lg-space-between-stretch{justify-content:space-between}.layout-align-gt-lg-center-start,.layout-align-gt-lg-end-start,.layout-align-gt-lg-space-around-start,.layout-align-gt-lg-space-between-start,.layout-align-gt-lg-start-start{align-items:flex-start;align-content:flex-start}.layout-align-gt-lg-center-center,.layout-align-gt-lg-end-center,.layout-align-gt-lg-space-around-center,.layout-align-gt-lg-space-between-center,.layout-align-gt-lg-start-center{align-items:center;align-content:center;max-width:100%}.layout-align-gt-lg-center-center>*,.layout-align-gt-lg-end-center>*,.layout-align-gt-lg-space-around-center>*,.layout-align-gt-lg-space-between-center>*,.layout-align-gt-lg-start-center>*{max-width:100%;box-sizing:border-box}.layout-align-gt-lg-center-end,.layout-align-gt-lg-end-end,.layout-align-gt-lg-space-around-end,.layout-align-gt-lg-space-between-end,.layout-align-gt-lg-start-end{align-items:flex-end;align-content:flex-end}.layout-align-gt-lg-center-stretch,.layout-align-gt-lg-end-stretch,.layout-align-gt-lg-space-around-stretch,.layout-align-gt-lg-space-between-stretch,.layout-align-gt-lg-start-stretch{align-items:stretch;align-content:stretch}.flex-gt-lg{flex:1;box-sizing:border-box}.flex-gt-lg-grow{flex:1 1 100%;box-sizing:border-box}.flex-gt-lg-initial{flex:0 1 auto;box-sizing:border-box}.flex-gt-lg-auto{flex:1 1 auto;box-sizing:border-box}.flex-gt-lg-none{flex:0 0 auto;box-sizing:border-box}.flex-gt-lg-noshrink{flex:1 0 auto;box-sizing:border-box}.flex-gt-lg-nogrow{flex:0 1 auto;box-sizing:border-box}.flex-gt-lg-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-gt-lg-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-gt-lg-column>.flex-gt-lg-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box;min-height:0}.flex-gt-lg-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.flex-gt-lg-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.flex-gt-lg-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.flex-gt-lg-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.flex-gt-lg-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.flex-gt-lg-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.flex-gt-lg-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.flex-gt-lg-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.flex-gt-lg-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.flex-gt-lg-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.flex-gt-lg-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.flex-gt-lg-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.flex-gt-lg-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.flex-gt-lg-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.flex-gt-lg-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.flex-gt-lg-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.flex-gt-lg-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.flex-gt-lg-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.flex-gt-lg-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.flex-gt-lg-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-gt-lg-row>.flex{min-width:0}.layout-gt-lg-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-column>.flex{min-height:0}.layout-gt-lg,.layout-gt-lg-column,.layout-gt-lg-row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.layout-gt-lg-column{flex-direction:column}.layout-gt-lg-row{flex-direction:row}.flex-order-xl--20{order:-20}.flex-order-xl--19{order:-19}.flex-order-xl--18{order:-18}.flex-order-xl--17{order:-17}.flex-order-xl--16{order:-16}.flex-order-xl--15{order:-15}.flex-order-xl--14{order:-14}.flex-order-xl--13{order:-13}.flex-order-xl--12{order:-12}.flex-order-xl--11{order:-11}.flex-order-xl--10{order:-10}.flex-order-xl--9{order:-9}.flex-order-xl--8{order:-8}.flex-order-xl--7{order:-7}.flex-order-xl--6{order:-6}.flex-order-xl--5{order:-5}.flex-order-xl--4{order:-4}.flex-order-xl--3{order:-3}.flex-order-xl--2{order:-2}.flex-order-xl--1{order:-1}.flex-order-xl-0{order:0}.flex-order-xl-1{order:1}.flex-order-xl-2{order:2}.flex-order-xl-3{order:3}.flex-order-xl-4{order:4}.flex-order-xl-5{order:5}.flex-order-xl-6{order:6}.flex-order-xl-7{order:7}.flex-order-xl-8{order:8}.flex-order-xl-9{order:9}.flex-order-xl-10{order:10}.flex-order-xl-11{order:11}.flex-order-xl-12{order:12}.flex-order-xl-13{order:13}.flex-order-xl-14{order:14}.flex-order-xl-15{order:15}.flex-order-xl-16{order:16}.flex-order-xl-17{order:17}.flex-order-xl-18{order:18}.flex-order-xl-19{order:19}.flex-order-xl-20{order:20}.flex-offset-xl-0,.offset-xl-0{margin-left:0}[dir=rtl] .flex-offset-xl-0,[dir=rtl] .offset-xl-0{margin-left:auto;margin-right:0}.flex-offset-xl-5,.offset-xl-5{margin-left:5%}[dir=rtl] .flex-offset-xl-5,[dir=rtl] .offset-xl-5{margin-left:auto;margin-right:5%}.flex-offset-xl-10,.offset-xl-10{margin-left:10%}[dir=rtl] .flex-offset-xl-10,[dir=rtl] .offset-xl-10{margin-left:auto;margin-right:10%}.flex-offset-xl-15,.offset-xl-15{margin-left:15%}[dir=rtl] .flex-offset-xl-15,[dir=rtl] .offset-xl-15{margin-left:auto;margin-right:15%}.flex-offset-xl-20,.offset-xl-20{margin-left:20%}[dir=rtl] .flex-offset-xl-20,[dir=rtl] .offset-xl-20{margin-left:auto;margin-right:20%}.flex-offset-xl-25,.offset-xl-25{margin-left:25%}[dir=rtl] .flex-offset-xl-25,[dir=rtl] .offset-xl-25{margin-left:auto;margin-right:25%}.flex-offset-xl-30,.offset-xl-30{margin-left:30%}[dir=rtl] .flex-offset-xl-30,[dir=rtl] .offset-xl-30{margin-left:auto;margin-right:30%}.flex-offset-xl-35,.offset-xl-35{margin-left:35%}[dir=rtl] .flex-offset-xl-35,[dir=rtl] .offset-xl-35{margin-left:auto;margin-right:35%}.flex-offset-xl-40,.offset-xl-40{margin-left:40%}[dir=rtl] .flex-offset-xl-40,[dir=rtl] .offset-xl-40{margin-left:auto;margin-right:40%}.flex-offset-xl-45,.offset-xl-45{margin-left:45%}[dir=rtl] .flex-offset-xl-45,[dir=rtl] .offset-xl-45{margin-left:auto;margin-right:45%}.flex-offset-xl-50,.offset-xl-50{margin-left:50%}[dir=rtl] .flex-offset-xl-50,[dir=rtl] .offset-xl-50{margin-left:auto;margin-right:50%}.flex-offset-xl-55,.offset-xl-55{margin-left:55%}[dir=rtl] .flex-offset-xl-55,[dir=rtl] .offset-xl-55{margin-left:auto;margin-right:55%}.flex-offset-xl-60,.offset-xl-60{margin-left:60%}[dir=rtl] .flex-offset-xl-60,[dir=rtl] .offset-xl-60{margin-left:auto;margin-right:60%}.flex-offset-xl-65,.offset-xl-65{margin-left:65%}[dir=rtl] .flex-offset-xl-65,[dir=rtl] .offset-xl-65{margin-left:auto;margin-right:65%}.flex-offset-xl-70,.offset-xl-70{margin-left:70%}[dir=rtl] .flex-offset-xl-70,[dir=rtl] .offset-xl-70{margin-left:auto;margin-right:70%}.flex-offset-xl-75,.offset-xl-75{margin-left:75%}[dir=rtl] .flex-offset-xl-75,[dir=rtl] .offset-xl-75{margin-left:auto;margin-right:75%}.flex-offset-xl-80,.offset-xl-80{margin-left:80%}[dir=rtl] .flex-offset-xl-80,[dir=rtl] .offset-xl-80{margin-left:auto;margin-right:80%}.flex-offset-xl-85,.offset-xl-85{margin-left:85%}[dir=rtl] .flex-offset-xl-85,[dir=rtl] .offset-xl-85{margin-left:auto;margin-right:85%}.flex-offset-xl-90,.offset-xl-90{margin-left:90%}[dir=rtl] .flex-offset-xl-90,[dir=rtl] .offset-xl-90{margin-left:auto;margin-right:90%}.flex-offset-xl-95,.offset-xl-95{margin-left:95%}[dir=rtl] .flex-offset-xl-95,[dir=rtl] .offset-xl-95{margin-left:auto;margin-right:95%}.flex-offset-xl-33,.offset-xl-33{margin-left:calc(100% / 3)}.flex-offset-xl-66,.offset-xl-66{margin-left:calc(200% / 3)}[dir=rtl] .flex-offset-xl-66,[dir=rtl] .offset-xl-66{margin-left:auto;margin-right:calc(200% / 3)}.layout-align-xl,.layout-align-xl-start-stretch{justify-content:flex-start;align-content:stretch;align-items:stretch}.layout-align-xl-start,.layout-align-xl-start-center,.layout-align-xl-start-end,.layout-align-xl-start-start,.layout-align-xl-start-stretch{justify-content:flex-start}.layout-align-xl-center,.layout-align-xl-center-center,.layout-align-xl-center-end,.layout-align-xl-center-start,.layout-align-xl-center-stretch{justify-content:center}.layout-align-xl-end,.layout-align-xl-end-center,.layout-align-xl-end-end,.layout-align-xl-end-start,.layout-align-xl-end-stretch{justify-content:flex-end}.layout-align-xl-space-around,.layout-align-xl-space-around-center,.layout-align-xl-space-around-end,.layout-align-xl-space-around-start,.layout-align-xl-space-around-stretch{justify-content:space-around}.layout-align-xl-space-between,.layout-align-xl-space-between-center,.layout-align-xl-space-between-end,.layout-align-xl-space-between-start,.layout-align-xl-space-between-stretch{justify-content:space-between}.layout-align-xl-center-start,.layout-align-xl-end-start,.layout-align-xl-space-around-start,.layout-align-xl-space-between-start,.layout-align-xl-start-start{align-items:flex-start;align-content:flex-start}.layout-align-xl-center-center,.layout-align-xl-end-center,.layout-align-xl-space-around-center,.layout-align-xl-space-between-center,.layout-align-xl-start-center{align-items:center;align-content:center;max-width:100%}.layout-align-xl-center-center>*,.layout-align-xl-end-center>*,.layout-align-xl-space-around-center>*,.layout-align-xl-space-between-center>*,.layout-align-xl-start-center>*{max-width:100%;box-sizing:border-box}.layout-align-xl-center-end,.layout-align-xl-end-end,.layout-align-xl-space-around-end,.layout-align-xl-space-between-end,.layout-align-xl-start-end{align-items:flex-end;align-content:flex-end}.layout-align-xl-center-stretch,.layout-align-xl-end-stretch,.layout-align-xl-space-around-stretch,.layout-align-xl-space-between-stretch,.layout-align-xl-start-stretch{align-items:stretch;align-content:stretch}.flex-xl{flex:1;box-sizing:border-box}.flex-xl-grow{flex:1 1 100%;box-sizing:border-box}.flex-xl-initial{flex:0 1 auto;box-sizing:border-box}.flex-xl-auto{flex:1 1 auto;box-sizing:border-box}.flex-xl-none{flex:0 0 auto;box-sizing:border-box}.flex-xl-noshrink{flex:1 0 auto;box-sizing:border-box}.flex-xl-nogrow{flex:0 1 auto;box-sizing:border-box}.flex-xl-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-xl-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-xl-column>.flex-xl-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box;min-height:0}.flex-xl-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.flex-xl-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.flex-xl-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.flex-xl-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.flex-xl-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.flex-xl-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.flex-xl-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.flex-xl-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.flex-xl-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.flex-xl-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.flex-xl-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.flex-xl-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.flex-xl-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.flex-xl-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.flex-xl-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.flex-xl-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.flex-xl-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.flex-xl-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.flex-xl-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.flex-xl-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-xl-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-xl-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-xl-row>.flex{min-width:0}.layout-xl-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-xl-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-column>.flex{min-height:0}.layout-xl,.layout-xl-column,.layout-xl-row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.layout-xl-column{flex-direction:column}.layout-xl-row{flex-direction:row}.hide-gt-lg:not(.show-gt-xs):not(.show-gt-sm):not(.show-gt-md):not(.show-gt-lg):not(.show-xl):not(.show),.hide-gt-md:not(.show-gt-xs):not(.show-gt-sm):not(.show-gt-md):not(.show-gt-lg):not(.show-xl):not(.show),.hide-gt-sm:not(.show-gt-xs):not(.show-gt-sm):not(.show-gt-md):not(.show-gt-lg):not(.show-xl):not(.show),.hide-gt-xs:not(.show-gt-xs):not(.show-gt-sm):not(.show-gt-md):not(.show-gt-lg):not(.show-xl):not(.show),.hide:not(.show-gt-xs):not(.show-gt-sm):not(.show-gt-md):not(.show-gt-lg):not(.show-xl):not(.show){display:none}.hide-xl:not(.show-xl):not(.show-gt-lg):not(.show-gt-md):not(.show-gt-sm):not(.show-gt-xs):not(.show){display:none}}@media print{.hide-print:not(.show-print):not(.show){display:none!important}}*{text-rendering:optimizeLegibility;-o-text-rendering:optimizeLegibility;-ms-text-rendering:optimizeLegibility;-moz-text-rendering:optimizeLegibility;-webkit-text-rendering:optimizeLegibility;-webkit-tap-highlight-color:transparent;box-sizing:border-box}:after,:before{box-sizing:border-box}:focus{outline:0}:not(md-input-container)>button,:not(md-input-container)>input[type=button],:not(md-input-container)>input[type=email],:not(md-input-container)>input[type=image],:not(md-input-container)>input[type=password],:not(md-input-container)>input[type=search],:not(md-input-container)>input[type=submit],:not(md-input-container)>input[type=tel],:not(md-input-container)>input[type=text],:not(md-input-container)>textarea{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;appearance:none;-moz-appearance:none;-webkit-appearance:none;border:none;padding:0;margin:0}:not(md-input-container)>button,:not(md-input-container)>input[type=button],:not(md-input-container)>input[type=submit]{background:0 0}button{border-radius:0;font-family:inherit;font-size:inherit;padding:0;margin:0;appearance:none;-moz-appearance:none;-webkit-appearance:none}[layout]>*{min-height:auto;min-height:initial}md-card>:not(md-card-content) img,md-card>img{height:inherit;height:initial}.md-datepicker-calendar-pane *{box-sizing:initial}md-autocomplete-wrap>input[type=search]{background:#fff;padding:0 15px!important}md-backdrop.md-opaque{background-color:rgba(33,33,33,.48)!important}md-card md-card-header md-card-avatar md-icon{width:40px;height:40px}md-checkbox.no-label{margin:0}md-chip .md-chip-remove md-icon{margin-left:2px}md-chip .md-chip-remove md-icon svg{width:18px;height:18px;max-width:18px;max-height:18px;margin:4px}md-datepicker .md-datepicker-button{padding:0!important;margin:0!important;vertical-align:middle}md-datepicker .md-datepicker-input-container{margin-left:0}.md-inline-form md-datepicker{margin-top:14px}md-dialog md-dialog-content{padding:32px 24px 24px 24px}md-dialog md-dialog-actions{min-height:64px;padding-top:8px;padding-bottom:8px}md-dialog md-dialog-actions .md-button{margin:0 8px}md-input-container.no-errors-spacer .md-errors-spacer{display:none}md-input-container .input-hint{position:absolute;right:auto;bottom:7px;left:2px;font-size:12px;line-height:14px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-input-container.md-icon-left .input-hint{left:38px}md-list-item .md-list-item-text p{font-size:13px!important}.md-menu,md-menu{padding:0}md-menu-content.md-menu-bar-menu.md-dense{padding:8px 0}md-menu-content.md-menu-bar-menu.md-dense .md-button,md-menu-content.md-menu-bar-menu.md-dense md-menu-item{height:40px;line-height:40px}md-menu-content.md-menu-bar-menu.md-dense .md-button.md-indent>md-icon,md-menu-content.md-menu-bar-menu.md-dense md-menu-item.md-indent>md-icon{top:8px}.md-open-menu-container md-menu-content md-menu-item.selected{opacity:.4}md-menu-content md-menu-item .md-button{text-align:left}md-select.simplified{margin:0 8px}md-select.simplified .md-select-value{border:none!important;box-sizing:border-box;padding:0}md-select.simplified .md-select-value :first-child{transform:none;height:auto}md-select.simplified .md-select-value .md-select-icon{transform:none;font-size:16px}md-select.simplified .md-select-value .md-select-icon:after{top:1px}md-select[multiple] md-select-value>:first-child{display:flex}md-select[multiple] md-select-value>:first-child>:first-child{flex:0}md-select[multiple] md-select-value>:first-child .md-container{padding-right:6px}md-select[multiple] md-select-value>:first-child .md-container:first-of-type{padding-right:0}md-select-menu md-select-header{position:relative;display:flex;align-items:center;width:auto;height:48px;padding-left:10.667px;box-shadow:0 1px 0 0 rgba(0,0,0,.1),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12);cursor:pointer}md-select-menu md-select-header input[type=search]{border:none;outline:0;height:100%;width:100%;padding:0}md-sidenav{-webkit-overflow-scrolling:touch}md-toolbar.colored-toolbar{color:rgba(255,255,255,.87)}md-toolbar.colored-toolbar md-menu-bar md-menu._md-open>button{background:rgba(0,0,0,.12)}md-toolbar.colored-toolbar md-menu._md-open>button{background:rgba(0,0,0,.12)}md-toolbar.colored-toolbar input{color:rgba(255,255,255,.87)!important}md-progress-circular[disabled]{visibility:hidden}body,html{overflow:hidden!important}#main{position:absolute;top:0;right:0;bottom:0;left:0}body.boxed{background:#3f4450}body.boxed #main{overflow:hidden!important;width:100%;max-width:1280px;margin:0 auto;box-shadow:0 0 12px rgba(0,0,0,.45)}#layout-content-only{position:relative;height:100%;max-height:100%}#layout-content-only #content{position:absolute;top:0;right:0;bottom:0;left:0}#layout-content-with-toolbar{position:relative;height:100%;max-height:100%}#layout-content-with-toolbar #content{position:absolute;top:64px;right:0;bottom:0;left:0}#layout-vertical-navigation{height:100%;max-height:100%}#layout-vertical-navigation #content-container{position:relative;overflow:hidden}#layout-vertical-navigation #content-container #content{position:absolute;top:64px;right:0;bottom:0;left:0}#layout-vertical-navigation-fullwidth-toolbar{height:100%;max-height:100%}#layout-vertical-navigation-fullwidth-toolbar #main-container{position:relative}#layout-vertical-navigation-fullwidth-toolbar #main-container #content-container{position:relative;overflow:hidden}#layout-vertical-navigation-fullwidth-toolbar #main-container #content-container #content{position:absolute;top:0;right:0;bottom:0;left:0}#layout-vertical-navigation-fullwidth-toolbar-2{height:100%;max-height:100%}#layout-vertical-navigation-fullwidth-toolbar-2 #main-container{position:relative}#layout-vertical-navigation-fullwidth-toolbar-2 #main-container #content-container{position:relative;overflow:hidden}#layout-vertical-navigation-fullwidth-toolbar-2 #main-container #content-container #content{position:absolute;top:0;right:0;bottom:0;left:0}#layout-horizontal-navigation{height:100%;max-height:100%}#layout-horizontal-navigation #content-container{position:relative;overflow:hidden}#layout-horizontal-navigation #content-container #content{position:absolute;top:0;right:0;bottom:0;left:0}.page-layout{position:relative;overflow:hidden}.page-layout .top-bg{position:absolute;z-index:1;top:0;right:0;left:0;height:200px;background-image:url(/assets/images/backgrounds/header-bg.png);background-size:cover}.page-layout md-backdrop{z-index:50}.page-layout>.header .breadcrumb{margin-bottom:16px;font-weight:500;color:rgba(0,0,0,.54)}.page-layout>.header .breadcrumb md-icon{margin:0}.page-layout>.header .breadcrumb .separator{margin:0 8px}.page-layout>.header .title{font-size:34px}.page-layout.carded{min-height:100%;height:100%}.page-layout.carded.fullwidth.single-scroll{height:auto}.page-layout.carded.fullwidth.single-scroll>.center .content-card .content{overflow:hidden}.page-layout.carded.fullwidth>.center{position:relative;z-index:2;margin-left:32px;margin-right:32px}.page-layout.carded.fullwidth>.center .header{height:136px;min-height:136px;max-height:136px;padding:24px}.page-layout.carded.fullwidth>.center .content-card{background:#fff;box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12);overflow:hidden}.page-layout.carded.fullwidth>.center .content-card .toolbar{padding:8px 24px;height:64px;min-height:64px;max-height:64px;border-bottom:1px solid rgba(0,0,0,.12)}.page-layout.carded.fullwidth>.center .content-card .content{padding:24px;background:#fff}.page-layout.carded.left-sidenav.single-scroll{height:auto}.page-layout.carded.left-sidenav.single-scroll>.center .content-card .content{overflow:hidden}.page-layout.carded.left-sidenav>.sidenav{width:240px;min-width:240px;max-width:240px;box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12);z-index:51}.page-layout.carded.left-sidenav>.sidenav .header{height:200px;min-height:200px;max-height:200px;padding:24px}.page-layout.carded.left-sidenav>.sidenav .content{background:0 0;padding:24px}.page-layout.carded.left-sidenav>.sidenav.md-locked-open{width:220px;min-width:220px;max-width:220px;z-index:2;background:0 0;box-shadow:none}.page-layout.carded.left-sidenav>.sidenav.md-locked-open+.center{margin-left:0}.page-layout.carded.left-sidenav>.sidenav:not(.md-locked-open) .header{border-bottom:1px solid rgba(0,0,0,.12)}.page-layout.carded.left-sidenav>.sidenav:not(.md-locked-open) .content{overflow:hidden}.page-layout.carded.left-sidenav>.center{position:relative;z-index:2;margin-left:32px;margin-right:32px}.page-layout.carded.left-sidenav>.center .header{height:136px;min-height:136px;max-height:136px;padding:24px}.page-layout.carded.left-sidenav>.center .content-card{background:#fff;box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12);overflow:hidden}.page-layout.carded.left-sidenav>.center .content-card .toolbar{padding:8px 24px;height:64px;min-height:64px;max-height:64px;border-bottom:1px solid rgba(0,0,0,.12)}.page-layout.carded.left-sidenav>.center .content-card .toolbar .sidenav-toggle{margin:0 8px 0 0!important;padding:0!important;border-radius:0}.page-layout.carded.left-sidenav>.center .content-card .content{padding:24px;background:#fff}.page-layout.carded.right-sidenav.single-scroll{height:auto}.page-layout.carded.right-sidenav.single-scroll>.center .content-card .content{overflow:hidden}.page-layout.carded.right-sidenav>.sidenav{width:240px;min-width:240px;max-width:240px;box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12);z-index:51}.page-layout.carded.right-sidenav>.sidenav .header{height:200px;min-height:200px;max-height:200px;padding:24px 24px 24px 0}.page-layout.carded.right-sidenav>.sidenav .content{background:0 0;padding:24px 24px 24px 0}.page-layout.carded.right-sidenav>.sidenav.md-locked-open{width:196px;min-width:196px;max-width:196px;z-index:2;background:0 0;box-shadow:none}.page-layout.carded.right-sidenav>.sidenav:not(.md-locked-open) .header{padding:24px;border-bottom:1px solid rgba(0,0,0,.12)}.page-layout.carded.right-sidenav>.sidenav:not(.md-locked-open) .content{overflow:hidden;padding:24px}.page-layout.carded.right-sidenav>.center{position:relative;z-index:2;margin-left:32px;margin-right:32px}.page-layout.carded.right-sidenav>.center .header{height:136px;min-height:136px;max-height:136px;padding:24px}.page-layout.carded.right-sidenav>.center .content-card{background:#fff;box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12);overflow:hidden}.page-layout.carded.right-sidenav>.center .content-card .toolbar{padding:8px 24px;height:64px;min-height:64px;max-height:64px;border-bottom:1px solid rgba(0,0,0,.12)}.page-layout.carded.right-sidenav>.center .content-card .toolbar .sidenav-toggle{margin:0 0 0 8px!important;padding:0!important;border-radius:0}.page-layout.carded.right-sidenav>.center .content-card .content{padding:24px;background:#fff}.page-layout.simple.fullwidth,.page-layout.simple.inner-sidenav{min-height:100%}.page-layout.simple.fullwidth>.header,.page-layout.simple.inner-sidenav>.header{height:200px;min-height:200px;max-height:200px;padding:24px;background-image:url(/assets/images/backgrounds/header-bg.png);background-size:cover}.page-layout.simple.fullwidth>.content,.page-layout.simple.inner-sidenav>.content{padding:24px}.page-layout.simple.left-sidenav{min-height:100%;height:100%}.page-layout.simple.left-sidenav.single-scroll{height:auto}.page-layout.simple.left-sidenav.single-scroll>.center{overflow:hidden}.page-layout.simple.left-sidenav.inner-sidenav>.content>md-sidenav{margin-right:24px}.page-layout.simple.left-sidenav .sidenav{width:240px;min-width:240px;max-width:240px;padding:24px;z-index:51;box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12)}.page-layout.simple.left-sidenav .sidenav.md-locked-open{width:220px;min-width:220px;max-width:220px;z-index:2;box-shadow:none;background:0 0}.page-layout.simple.left-sidenav>.center{position:relative;overflow:auto;z-index:3;box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12)}.page-layout.simple.left-sidenav>.center .header{height:200px;min-height:200px;max-height:200px;padding:24px;background-image:url(/assets/images/backgrounds/header-bg.png);background-size:cover}.page-layout.simple.left-sidenav>.center .content{padding:24px;background:#fff}.page-layout.simple.right-sidenav{min-height:100%;height:100%}.page-layout.simple.right-sidenav.single-scroll{height:auto}.page-layout.simple.right-sidenav.single-scroll>.center{overflow:hidden}.page-layout.simple.right-sidenav.inner-sidenav>.content>md-sidenav{margin-left:24px}.page-layout.simple.right-sidenav .sidenav{width:240px;min-width:240px;max-width:240px;padding:24px;z-index:51;box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12)}.page-layout.simple.right-sidenav .sidenav.md-locked-open{width:220px;min-width:220px;max-width:220px;z-index:2;box-shadow:none;background:0 0}.page-layout.simple.right-sidenav>.center{position:relative;overflow:auto;z-index:3;box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12)}.page-layout.simple.right-sidenav>.center .header{height:200px;min-height:200px;max-height:200px;padding:24px;background-image:url(/assets/images/backgrounds/header-bg.png);background-size:cover}.page-layout.simple.right-sidenav>.center .content{padding:24px;background:#fff}.page-layout.simple.inner-sidenav{height:auto}.page-layout.simple.inner-sidenav>.content>md-sidenav.md-locked-open{padding:0}.page-layout.simple.tabbed{min-height:100%}.page-layout.simple.tabbed>.header{height:200px;min-height:200px;max-height:200px;padding:24px;background-image:url(/assets/images/backgrounds/header-bg.png);background-size:cover}.page-layout.simple.tabbed>.content>md-tabs>md-tabs-wrapper{background:#fff;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);padding:0 24px}.page-layout.simple.tabbed>.content>md-tabs>md-tabs-wrapper md-tabs-canvas{height:56px}.page-layout.simple.tabbed>.content>md-tabs>md-tabs-wrapper md-tabs-canvas md-pagination-wrapper{height:56px}.page-layout.simple.tabbed>.content>md-tabs>md-tabs-wrapper md-tabs-canvas .md-tab{padding:16px 24px;text-transform:none}.page-layout.simple.tabbed>.content>md-tabs:not(.md-dynamic-height) md-tabs-content-wrapper{top:56px}.page-layout.simple.tabbed>.content>md-tabs>md-tabs-content-wrapper>md-tab-content{padding:24px}.page-layout.simple.tabbed>.content>md-nav-bar .md-nav-bar{background:#fff;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);border:none;height:56px}.page-layout.simple.tabbed>.content>md-nav-bar .md-nav-bar nav{margin:0 12px}.page-layout.simple.tabbed>.content>md-nav-bar .md-nav-bar nav .md-nav-item{height:56px}.page-layout.simple.tabbed>.content>md-nav-bar .md-nav-bar nav .md-nav-item ._md-nav-button{height:56px;line-height:32px}.page-layout.simple.tabbed>.content>md-nav-bar .md-nav-bar nav .md-nav-item ._md-nav-button-text{text-transform:none}.page-layout.blank{min-height:100%;padding:24px}.single-scroll .carded.fullwidth{height:auto}.single-scroll .carded.fullwidth>.center .content-card .content{overflow:hidden}.single-scroll .carded.left-sidenav{height:auto}.single-scroll .carded.left-sidenav>.center .content-card .content{overflow:hidden}.single-scroll .carded.right-sidenav{height:auto}.single-scroll .carded.right-sidenav>.center .content-card .content{overflow:hidden}.single-scroll .simple.left-sidenav{height:auto}.single-scroll .simple.left-sidenav>.center{overflow:hidden}.single-scroll .simple.right-sidenav{height:auto}.single-scroll .simple.right-sidenav>.center{overflow:hidden}@media screen and (max-width:1280px){.page-layout.simple.inner-sidenav.left-sidenav>.content,.page-layout.simple.inner-sidenav.right-sidenav>.content{height:auto!important}.page-layout.simple.inner-sidenav.left-sidenav>.content>md-sidenav,.page-layout.simple.inner-sidenav.right-sidenav>.content>md-sidenav{margin-left:0;margin-right:0}.sidenav-open .page-layout.simple.inner-sidenav{height:100%}}@media screen and (max-width:600px){.page-layout .top-bg{height:160px}.page-layout.carded.fullwidth>.center,.page-layout.carded.left-sidenav>.center,.page-layout.carded.right-sidenav>.center{margin-left:16px;margin-right:16px}.page-layout.carded.fullwidth>.center .header,.page-layout.carded.left-sidenav>.center .header,.page-layout.carded.right-sidenav>.center .header{height:96px;min-height:96px;max-height:96px;padding:16px}.page-layout.carded.fullwidth{height:auto}.page-layout.carded.fullwidth>.center .content-card .content{overflow:hidden}.page-layout.carded.left-sidenav,.page-layout.carded.right-sidenav{height:auto}.page-layout.carded.left-sidenav>.center .content-card .content,.page-layout.carded.right-sidenav>.center .content-card .content{overflow:hidden}.page-layout.simple.fullwidth>.header,.page-layout.simple.inner-sidenav>.header{height:160px;min-height:160px;max-height:160px;padding:16px}.page-layout.simple.left-sidenav>.center .header,.page-layout.simple.right-sidenav>.center .header{height:160px;min-height:160px;max-height:160px;padding:16px}.page-layout.simple.left-sidenav,.page-layout.simple.right-sidenav{height:auto}.page-layout.simple.left-sidenav>.center,.page-layout.simple.right-sidenav>.center{overflow:hidden}}.animate-slide-up{-webkit-backface-visibility:hidden;-webkit-perspective:1000px;transition-property:none;transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.46,.45,.94);opacity:1}.animate-slide-up.ng-enter{transform:translateY(100%);opacity:0}.animate-slide-up.ng-enter.ng-enter-active{transition-property:all;transform:translateY(0);opacity:1}.animate-slide-up.ng-leave{transform:translateY(0);opacity:1}.animate-slide-up.ng-leave.ng-leave-active{transition-property:all;transform:translateY(-100%);opacity:0}.animate-slide-up.ng-hide{transform:translateY(-100%);opacity:0}.animate-slide-up.ng-hide-add-active,.animate-slide-up.ng-hide-remove-active{transition-property:all}.animate-slide-down{-webkit-backface-visibility:hidden;-webkit-perspective:1000px;transition-property:none;transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.46,.45,.94);opacity:1}.animate-slide-down.ng-enter{transform:translateY(-100%);opacity:0}.animate-slide-down.ng-enter.ng-enter-active{transition-property:all;transform:translateY(0);opacity:1}.animate-slide-down.ng-leave{transform:translateY(0);opacity:1}.animate-slide-down.ng-leave.ng-leave-active{transition-property:all;transform:translateY(100%);opacity:0}.animate-slide-down.ng-hide{transform:translateY(-100%);opacity:0}.animate-slide-down.ng-hide-add-active,.animate-slide-down.ng-hide-remove-active{transition-property:all}.animate-slide-left{-webkit-backface-visibility:hidden;-webkit-perspective:1000px;transition-property:none;transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.46,.45,.94);opacity:1}.animate-slide-left.ng-enter{transform:translateX(100%);opacity:0}.animate-slide-left.ng-enter.ng-enter-active{transition-property:all;transform:translateX(0);opacity:1}.animate-slide-left.ng-leave{transform:translateX(0);opacity:1}.animate-slide-left.ng-leave.ng-leave-active{transition-property:all;transform:translateX(-100%);opacity:0}.animate-slide-left.ng-hide{transform:translateX(-100%);opacity:0}.animate-slide-left.ng-hide-add-active,.animate-slide-left.ng-hide-remove-active{transition-property:all}.animate-slide-right{-webkit-backface-visibility:hidden;-webkit-perspective:1000px;transition-property:none;transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.46,.45,.94);opacity:1}.animate-slide-right.ng-enter{transform:translateX(-100%);opacity:0}.animate-slide-right.ng-enter.ng-enter-active{transition-property:all;transform:translateX(0);opacity:1}.animate-slide-right.ng-leave{transform:translateX(0);opacity:1}.animate-slide-right.ng-leave.ng-leave-active{transition-property:all;transform:translateX(100%);opacity:0}.animate-slide-right.ng-hide{transform:translateX(100%);opacity:0}.animate-slide-right.ng-hide-add-active,.animate-slide-right.ng-hide-remove-active{transition-property:all}.animate-fade-in-out{-webkit-backface-visibility:hidden;-webkit-perspective:1000px;transition-property:none;transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.46,.45,.94);opacity:1}.animate-fade-in-out.ng-enter{opacity:0}.animate-fade-in-out.ng-enter.ng-enter-active{transition-property:all;opacity:1}.animate-fade-in-out.ng-leave{opacity:1}.animate-fade-in-out.ng-leave.ng-leave-active{transition-property:all;opacity:0}.animate-fade-in-out.ng-hide{opacity:0}.animate-fade-in-out.ng-hide-add-active,.animate-fade-in-out.ng-hide-remove-active{transition-property:all}@keyframes slide-in-left{0%{opacity:0;transform:translateX(-500px)}65%{opacity:1;transform:translateX(0)}100%{transform:translateX(0)}}@keyframes slide-in-right{0%{opacity:0;transform:translateX(500px)}65%{opacity:1;transform:translateX(0)}100%{transform:translateX(0)}}@keyframes slide-in-bottom{0%{opacity:0;transform:translateY(200px)}65%{opacity:1;transform:translateY(0)}100%{transform:translateY(0)}}.animate-rotate{animation:rotate 1.75s linear infinite}@keyframes rotate{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.black-fg,.black-text{color:rgba(0,0,0,.87)!important}.black-fg .icon,.black-fg .secondary-text,.black-fg.icon,.black-fg.secondary-text,.black-text .icon,.black-text .secondary-text,.black-text.icon,.black-text.secondary-text{color:rgba(0,0,0,.54)!important}.black-fg .disabled-text,.black-fg .hint-text,.black-fg.disabled-text,.black-fg.hint-text,.black-text .disabled-text,.black-text .hint-text,.black-text.disabled-text,.black-text.hint-text{color:rgba(0,0,0,.26)!important}.black-fg .divider,.black-fg .faint-text,.black-fg.divider,.black-fg.faint-text,.black-text .divider,.black-text .faint-text,.black-text.divider,.black-text.faint-text{color:rgba(0,0,0,.12)!important}.white-fg,.white-text{color:#fff!important}.white-fg .icon,.white-fg .secondary-text,.white-fg.icon,.white-fg.secondary-text,.white-text .icon,.white-text .secondary-text,.white-text.icon,.white-text.secondary-text{color:rgba(255,255,255,.7)!important}.white-fg .disabled-text,.white-fg .hint-text,.white-fg.disabled-text,.white-fg.hint-text,.white-text .disabled-text,.white-text .hint-text,.white-text.disabled-text,.white-text.hint-text{color:rgba(255,255,255,.3)!important}.white-fg .divider,.white-fg .faint-text,.white-fg.divider,.white-fg.faint-text,.white-text .divider,.white-text .faint-text,.white-text.divider,.white-text.faint-text{color:rgba(255,255,255,.12)!important}.white-fg md-icon,.white-text md-icon{color:#fff}.white-fg md-progress-linear .md-container,.white-text md-progress-linear .md-container{background:rgba(255,255,255,.3)}.white-fg md-progress-linear .md-bar,.white-text md-progress-linear .md-bar{background:rgba(255,255,255,.7)}.red-50-bg{background-color:#ffebee!important}.md-red-50-bg{background-color:#ffebee!important;color:rgba(0,0,0,.87)}.red-50-fg{color:#ffebee!important}.red-50-border{border-color:#ffebee!important}.red-50-border-top{border-top-color:#ffebee!important}.red-50-border-right{border-right-color:#ffebee!important}.red-50-border-bottom{border-bottom-color:#ffebee!important}.red-50-border-left{border-left-color:#ffebee!important}.red-100-bg{background-color:#ffcdd2!important}.md-red-100-bg{background-color:#ffcdd2!important;color:rgba(0,0,0,.87)}.red-100-fg{color:#ffcdd2!important}.red-100-border{border-color:#ffcdd2!important}.red-100-border-top{border-top-color:#ffcdd2!important}.red-100-border-right{border-right-color:#ffcdd2!important}.red-100-border-bottom{border-bottom-color:#ffcdd2!important}.red-100-border-left{border-left-color:#ffcdd2!important}.red-200-bg{background-color:#ef9a9a!important}.md-red-200-bg{background-color:#ef9a9a!important;color:rgba(0,0,0,.87)}.red-200-fg{color:#ef9a9a!important}.red-200-border{border-color:#ef9a9a!important}.red-200-border-top{border-top-color:#ef9a9a!important}.red-200-border-right{border-right-color:#ef9a9a!important}.red-200-border-bottom{border-bottom-color:#ef9a9a!important}.red-200-border-left{border-left-color:#ef9a9a!important}.red-300-bg{background-color:#e57373!important}.md-red-300-bg{background-color:#e57373!important;color:rgba(0,0,0,.87)}.red-300-fg{color:#e57373!important}.red-300-border{border-color:#e57373!important}.red-300-border-top{border-top-color:#e57373!important}.red-300-border-right{border-right-color:#e57373!important}.red-300-border-bottom{border-bottom-color:#e57373!important}.red-300-border-left{border-left-color:#e57373!important}.red-400-bg{background-color:#ef5350!important}.md-red-400-bg{background-color:#ef5350!important;color:#fff}.red-400-fg{color:#ef5350!important}.red-400-border{border-color:#ef5350!important}.red-400-border-top{border-top-color:#ef5350!important}.red-400-border-right{border-right-color:#ef5350!important}.red-400-border-bottom{border-bottom-color:#ef5350!important}.red-400-border-left{border-left-color:#ef5350!important}.red-500-bg{background-color:#f44336!important}.md-red-500-bg{background-color:#f44336!important;color:#fff}.red-500-fg{color:#f44336!important}.red-500-border{border-color:#f44336!important}.red-500-border-top{border-top-color:#f44336!important}.red-500-border-right{border-right-color:#f44336!important}.red-500-border-bottom{border-bottom-color:#f44336!important}.red-500-border-left{border-left-color:#f44336!important}.md-red-bg{background-color:#f44336!important;color:#fff}.red-bg{background-color:#f44336!important}.red-fg{color:#f44336!important}.red-border{border-color:#f44336!important}.red-border-top{border-top-color:#f44336!important}.red-border-right{border-right-color:#f44336!important}.red-border-bottom{border-bottom-color:#f44336!important}.red-border-left{border-left-color:#f44336!important}.red-600-bg{background-color:#e53935!important}.md-red-600-bg{background-color:#e53935!important;color:#fff}.red-600-fg{color:#e53935!important}.red-600-border{border-color:#e53935!important}.red-600-border-top{border-top-color:#e53935!important}.red-600-border-right{border-right-color:#e53935!important}.red-600-border-bottom{border-bottom-color:#e53935!important}.red-600-border-left{border-left-color:#e53935!important}.red-700-bg{background-color:#d32f2f!important}.md-red-700-bg{background-color:#d32f2f!important;color:#fff}.red-700-fg{color:#d32f2f!important}.red-700-border{border-color:#d32f2f!important}.red-700-border-top{border-top-color:#d32f2f!important}.red-700-border-right{border-right-color:#d32f2f!important}.red-700-border-bottom{border-bottom-color:#d32f2f!important}.red-700-border-left{border-left-color:#d32f2f!important}.red-800-bg{background-color:#c62828!important}.md-red-800-bg{background-color:#c62828!important;color:rgba(255,255,255,.87)}.red-800-fg{color:#c62828!important}.red-800-border{border-color:#c62828!important}.red-800-border-top{border-top-color:#c62828!important}.red-800-border-right{border-right-color:#c62828!important}.red-800-border-bottom{border-bottom-color:#c62828!important}.red-800-border-left{border-left-color:#c62828!important}.red-900-bg{background-color:#b71c1c!important}.md-red-900-bg{background-color:#b71c1c!important;color:rgba(255,255,255,.87)}.red-900-fg{color:#b71c1c!important}.red-900-border{border-color:#b71c1c!important}.red-900-border-top{border-top-color:#b71c1c!important}.red-900-border-right{border-right-color:#b71c1c!important}.red-900-border-bottom{border-bottom-color:#b71c1c!important}.red-900-border-left{border-left-color:#b71c1c!important}.red-A100-bg{background-color:#ff8a80!important}.md-red-A100-bg{background-color:#ff8a80!important;color:rgba(0,0,0,.87)}.red-A100-fg{color:#ff8a80!important}.red-A100-border{border-color:#ff8a80!important}.red-A100-border-top{border-top-color:#ff8a80!important}.red-A100-border-right{border-right-color:#ff8a80!important}.red-A100-border-bottom{border-bottom-color:#ff8a80!important}.red-A100-border-left{border-left-color:#ff8a80!important}.red-A200-bg{background-color:#ff5252!important}.md-red-A200-bg{background-color:#ff5252!important;color:#fff}.red-A200-fg{color:#ff5252!important}.red-A200-border{border-color:#ff5252!important}.red-A200-border-top{border-top-color:#ff5252!important}.red-A200-border-right{border-right-color:#ff5252!important}.red-A200-border-bottom{border-bottom-color:#ff5252!important}.red-A200-border-left{border-left-color:#ff5252!important}.red-A400-bg{background-color:#ff1744!important}.md-red-A400-bg{background-color:#ff1744!important;color:#fff}.red-A400-fg{color:#ff1744!important}.red-A400-border{border-color:#ff1744!important}.red-A400-border-top{border-top-color:#ff1744!important}.red-A400-border-right{border-right-color:#ff1744!important}.red-A400-border-bottom{border-bottom-color:#ff1744!important}.red-A400-border-left{border-left-color:#ff1744!important}.red-A700-bg{background-color:#d50000!important}.md-red-A700-bg{background-color:#d50000!important;color:#fff}.red-A700-fg{color:#d50000!important}.red-A700-border{border-color:#d50000!important}.red-A700-border-top{border-top-color:#d50000!important}.red-A700-border-right{border-right-color:#d50000!important}.red-A700-border-bottom{border-bottom-color:#d50000!important}.red-A700-border-left{border-left-color:#d50000!important}.pink-50-bg{background-color:#fce4ec!important}.md-pink-50-bg{background-color:#fce4ec!important;color:rgba(0,0,0,.87)}.pink-50-fg{color:#fce4ec!important}.pink-50-border{border-color:#fce4ec!important}.pink-50-border-top{border-top-color:#fce4ec!important}.pink-50-border-right{border-right-color:#fce4ec!important}.pink-50-border-bottom{border-bottom-color:#fce4ec!important}.pink-50-border-left{border-left-color:#fce4ec!important}.pink-100-bg{background-color:#f8bbd0!important}.md-pink-100-bg{background-color:#f8bbd0!important;color:rgba(0,0,0,.87)}.pink-100-fg{color:#f8bbd0!important}.pink-100-border{border-color:#f8bbd0!important}.pink-100-border-top{border-top-color:#f8bbd0!important}.pink-100-border-right{border-right-color:#f8bbd0!important}.pink-100-border-bottom{border-bottom-color:#f8bbd0!important}.pink-100-border-left{border-left-color:#f8bbd0!important}.pink-200-bg{background-color:#f48fb1!important}.md-pink-200-bg{background-color:#f48fb1!important;color:rgba(0,0,0,.87)}.pink-200-fg{color:#f48fb1!important}.pink-200-border{border-color:#f48fb1!important}.pink-200-border-top{border-top-color:#f48fb1!important}.pink-200-border-right{border-right-color:#f48fb1!important}.pink-200-border-bottom{border-bottom-color:#f48fb1!important}.pink-200-border-left{border-left-color:#f48fb1!important}.pink-300-bg{background-color:#f06292!important}.md-pink-300-bg{background-color:#f06292!important;color:rgba(255,255,255,.87)}.pink-300-fg{color:#f06292!important}.pink-300-border{border-color:#f06292!important}.pink-300-border-top{border-top-color:#f06292!important}.pink-300-border-right{border-right-color:#f06292!important}.pink-300-border-bottom{border-bottom-color:#f06292!important}.pink-300-border-left{border-left-color:#f06292!important}.pink-400-bg{background-color:#ec407a!important}.md-pink-400-bg{background-color:#ec407a!important;color:rgba(255,255,255,.87)}.pink-400-fg{color:#ec407a!important}.pink-400-border{border-color:#ec407a!important}.pink-400-border-top{border-top-color:#ec407a!important}.pink-400-border-right{border-right-color:#ec407a!important}.pink-400-border-bottom{border-bottom-color:#ec407a!important}.pink-400-border-left{border-left-color:#ec407a!important}.pink-500-bg{background-color:#e91e63!important}.md-pink-500-bg{background-color:#e91e63!important;color:#fff}.pink-500-fg{color:#e91e63!important}.pink-500-border{border-color:#e91e63!important}.pink-500-border-top{border-top-color:#e91e63!important}.pink-500-border-right{border-right-color:#e91e63!important}.pink-500-border-bottom{border-bottom-color:#e91e63!important}.pink-500-border-left{border-left-color:#e91e63!important}.md-pink-bg{background-color:#e91e63!important;color:#fff}.pink-bg{background-color:#e91e63!important}.pink-fg{color:#e91e63!important}.pink-border{border-color:#e91e63!important}.pink-border-top{border-top-color:#e91e63!important}.pink-border-right{border-right-color:#e91e63!important}.pink-border-bottom{border-bottom-color:#e91e63!important}.pink-border-left{border-left-color:#e91e63!important}.pink-600-bg{background-color:#d81b60!important}.md-pink-600-bg{background-color:#d81b60!important;color:#fff}.pink-600-fg{color:#d81b60!important}.pink-600-border{border-color:#d81b60!important}.pink-600-border-top{border-top-color:#d81b60!important}.pink-600-border-right{border-right-color:#d81b60!important}.pink-600-border-bottom{border-bottom-color:#d81b60!important}.pink-600-border-left{border-left-color:#d81b60!important}.pink-700-bg{background-color:#c2185b!important}.md-pink-700-bg{background-color:#c2185b!important;color:rgba(255,255,255,.87)}.pink-700-fg{color:#c2185b!important}.pink-700-border{border-color:#c2185b!important}.pink-700-border-top{border-top-color:#c2185b!important}.pink-700-border-right{border-right-color:#c2185b!important}.pink-700-border-bottom{border-bottom-color:#c2185b!important}.pink-700-border-left{border-left-color:#c2185b!important}.pink-800-bg{background-color:#ad1457!important}.md-pink-800-bg{background-color:#ad1457!important;color:rgba(255,255,255,.87)}.pink-800-fg{color:#ad1457!important}.pink-800-border{border-color:#ad1457!important}.pink-800-border-top{border-top-color:#ad1457!important}.pink-800-border-right{border-right-color:#ad1457!important}.pink-800-border-bottom{border-bottom-color:#ad1457!important}.pink-800-border-left{border-left-color:#ad1457!important}.pink-900-bg{background-color:#880e4f!important}.md-pink-900-bg{background-color:#880e4f!important;color:rgba(255,255,255,.87)}.pink-900-fg{color:#880e4f!important}.pink-900-border{border-color:#880e4f!important}.pink-900-border-top{border-top-color:#880e4f!important}.pink-900-border-right{border-right-color:#880e4f!important}.pink-900-border-bottom{border-bottom-color:#880e4f!important}.pink-900-border-left{border-left-color:#880e4f!important}.pink-A100-bg{background-color:#ff80ab!important}.md-pink-A100-bg{background-color:#ff80ab!important;color:rgba(0,0,0,.87)}.pink-A100-fg{color:#ff80ab!important}.pink-A100-border{border-color:#ff80ab!important}.pink-A100-border-top{border-top-color:#ff80ab!important}.pink-A100-border-right{border-right-color:#ff80ab!important}.pink-A100-border-bottom{border-bottom-color:#ff80ab!important}.pink-A100-border-left{border-left-color:#ff80ab!important}.pink-A200-bg{background-color:#ff4081!important}.md-pink-A200-bg{background-color:#ff4081!important;color:#fff}.pink-A200-fg{color:#ff4081!important}.pink-A200-border{border-color:#ff4081!important}.pink-A200-border-top{border-top-color:#ff4081!important}.pink-A200-border-right{border-right-color:#ff4081!important}.pink-A200-border-bottom{border-bottom-color:#ff4081!important}.pink-A200-border-left{border-left-color:#ff4081!important}.pink-A400-bg{background-color:#f50057!important}.md-pink-A400-bg{background-color:#f50057!important;color:#fff}.pink-A400-fg{color:#f50057!important}.pink-A400-border{border-color:#f50057!important}.pink-A400-border-top{border-top-color:#f50057!important}.pink-A400-border-right{border-right-color:#f50057!important}.pink-A400-border-bottom{border-bottom-color:#f50057!important}.pink-A400-border-left{border-left-color:#f50057!important}.pink-A700-bg{background-color:#c51162!important}.md-pink-A700-bg{background-color:#c51162!important;color:#fff}.pink-A700-fg{color:#c51162!important}.pink-A700-border{border-color:#c51162!important}.pink-A700-border-top{border-top-color:#c51162!important}.pink-A700-border-right{border-right-color:#c51162!important}.pink-A700-border-bottom{border-bottom-color:#c51162!important}.pink-A700-border-left{border-left-color:#c51162!important}.purple-50-bg{background-color:#f3e5f5!important}.md-purple-50-bg{background-color:#f3e5f5!important;color:rgba(0,0,0,.87)}.purple-50-fg{color:#f3e5f5!important}.purple-50-border{border-color:#f3e5f5!important}.purple-50-border-top{border-top-color:#f3e5f5!important}.purple-50-border-right{border-right-color:#f3e5f5!important}.purple-50-border-bottom{border-bottom-color:#f3e5f5!important}.purple-50-border-left{border-left-color:#f3e5f5!important}.purple-100-bg{background-color:#e1bee7!important}.md-purple-100-bg{background-color:#e1bee7!important;color:rgba(0,0,0,.87)}.purple-100-fg{color:#e1bee7!important}.purple-100-border{border-color:#e1bee7!important}.purple-100-border-top{border-top-color:#e1bee7!important}.purple-100-border-right{border-right-color:#e1bee7!important}.purple-100-border-bottom{border-bottom-color:#e1bee7!important}.purple-100-border-left{border-left-color:#e1bee7!important}.purple-200-bg{background-color:#ce93d8!important}.md-purple-200-bg{background-color:#ce93d8!important;color:rgba(0,0,0,.87)}.purple-200-fg{color:#ce93d8!important}.purple-200-border{border-color:#ce93d8!important}.purple-200-border-top{border-top-color:#ce93d8!important}.purple-200-border-right{border-right-color:#ce93d8!important}.purple-200-border-bottom{border-bottom-color:#ce93d8!important}.purple-200-border-left{border-left-color:#ce93d8!important}.purple-300-bg{background-color:#ba68c8!important}.md-purple-300-bg{background-color:#ba68c8!important;color:#fff}.purple-300-fg{color:#ba68c8!important}.purple-300-border{border-color:#ba68c8!important}.purple-300-border-top{border-top-color:#ba68c8!important}.purple-300-border-right{border-right-color:#ba68c8!important}.purple-300-border-bottom{border-bottom-color:#ba68c8!important}.purple-300-border-left{border-left-color:#ba68c8!important}.purple-400-bg{background-color:#ab47bc!important}.md-purple-400-bg{background-color:#ab47bc!important;color:#fff}.purple-400-fg{color:#ab47bc!important}.purple-400-border{border-color:#ab47bc!important}.purple-400-border-top{border-top-color:#ab47bc!important}.purple-400-border-right{border-right-color:#ab47bc!important}.purple-400-border-bottom{border-bottom-color:#ab47bc!important}.purple-400-border-left{border-left-color:#ab47bc!important}.purple-500-bg{background-color:#9c27b0!important}.md-purple-500-bg{background-color:#9c27b0!important;color:rgba(255,255,255,.87)}.purple-500-fg{color:#9c27b0!important}.purple-500-border{border-color:#9c27b0!important}.purple-500-border-top{border-top-color:#9c27b0!important}.purple-500-border-right{border-right-color:#9c27b0!important}.purple-500-border-bottom{border-bottom-color:#9c27b0!important}.purple-500-border-left{border-left-color:#9c27b0!important}.md-purple-bg{background-color:#9c27b0!important;color:rgba(255,255,255,.87)}.purple-bg{background-color:#9c27b0!important}.purple-fg{color:#9c27b0!important}.purple-border{border-color:#9c27b0!important}.purple-border-top{border-top-color:#9c27b0!important}.purple-border-right{border-right-color:#9c27b0!important}.purple-border-bottom{border-bottom-color:#9c27b0!important}.purple-border-left{border-left-color:#9c27b0!important}.purple-600-bg{background-color:#8e24aa!important}.md-purple-600-bg{background-color:#8e24aa!important;color:rgba(255,255,255,.87)}.purple-600-fg{color:#8e24aa!important}.purple-600-border{border-color:#8e24aa!important}.purple-600-border-top{border-top-color:#8e24aa!important}.purple-600-border-right{border-right-color:#8e24aa!important}.purple-600-border-bottom{border-bottom-color:#8e24aa!important}.purple-600-border-left{border-left-color:#8e24aa!important}.purple-700-bg{background-color:#7b1fa2!important}.md-purple-700-bg{background-color:#7b1fa2!important;color:rgba(255,255,255,.87)}.purple-700-fg{color:#7b1fa2!important}.purple-700-border{border-color:#7b1fa2!important}.purple-700-border-top{border-top-color:#7b1fa2!important}.purple-700-border-right{border-right-color:#7b1fa2!important}.purple-700-border-bottom{border-bottom-color:#7b1fa2!important}.purple-700-border-left{border-left-color:#7b1fa2!important}.purple-800-bg{background-color:#6a1b9a!important}.md-purple-800-bg{background-color:#6a1b9a!important;color:rgba(255,255,255,.87)}.purple-800-fg{color:#6a1b9a!important}.purple-800-border{border-color:#6a1b9a!important}.purple-800-border-top{border-top-color:#6a1b9a!important}.purple-800-border-right{border-right-color:#6a1b9a!important}.purple-800-border-bottom{border-bottom-color:#6a1b9a!important}.purple-800-border-left{border-left-color:#6a1b9a!important}.purple-900-bg{background-color:#4a148c!important}.md-purple-900-bg{background-color:#4a148c!important;color:rgba(255,255,255,.87)}.purple-900-fg{color:#4a148c!important}.purple-900-border{border-color:#4a148c!important}.purple-900-border-top{border-top-color:#4a148c!important}.purple-900-border-right{border-right-color:#4a148c!important}.purple-900-border-bottom{border-bottom-color:#4a148c!important}.purple-900-border-left{border-left-color:#4a148c!important}.purple-A100-bg{background-color:#ea80fc!important}.md-purple-A100-bg{background-color:#ea80fc!important;color:rgba(0,0,0,.87)}.purple-A100-fg{color:#ea80fc!important}.purple-A100-border{border-color:#ea80fc!important}.purple-A100-border-top{border-top-color:#ea80fc!important}.purple-A100-border-right{border-right-color:#ea80fc!important}.purple-A100-border-bottom{border-bottom-color:#ea80fc!important}.purple-A100-border-left{border-left-color:#ea80fc!important}.purple-A200-bg{background-color:#e040fb!important}.md-purple-A200-bg{background-color:#e040fb!important;color:#fff}.purple-A200-fg{color:#e040fb!important}.purple-A200-border{border-color:#e040fb!important}.purple-A200-border-top{border-top-color:#e040fb!important}.purple-A200-border-right{border-right-color:#e040fb!important}.purple-A200-border-bottom{border-bottom-color:#e040fb!important}.purple-A200-border-left{border-left-color:#e040fb!important}.purple-A400-bg{background-color:#d500f9!important}.md-purple-A400-bg{background-color:#d500f9!important;color:#fff}.purple-A400-fg{color:#d500f9!important}.purple-A400-border{border-color:#d500f9!important}.purple-A400-border-top{border-top-color:#d500f9!important}.purple-A400-border-right{border-right-color:#d500f9!important}.purple-A400-border-bottom{border-bottom-color:#d500f9!important}.purple-A400-border-left{border-left-color:#d500f9!important}.purple-A700-bg{background-color:#a0f!important}.md-purple-A700-bg{background-color:#a0f!important;color:#fff}.purple-A700-fg{color:#a0f!important}.purple-A700-border{border-color:#a0f!important}.purple-A700-border-top{border-top-color:#a0f!important}.purple-A700-border-right{border-right-color:#a0f!important}.purple-A700-border-bottom{border-bottom-color:#a0f!important}.purple-A700-border-left{border-left-color:#a0f!important}.deep-purple-50-bg{background-color:#ede7f6!important}.md-deep-purple-50-bg{background-color:#ede7f6!important;color:rgba(0,0,0,.87)}.deep-purple-50-fg{color:#ede7f6!important}.deep-purple-50-border{border-color:#ede7f6!important}.deep-purple-50-border-top{border-top-color:#ede7f6!important}.deep-purple-50-border-right{border-right-color:#ede7f6!important}.deep-purple-50-border-bottom{border-bottom-color:#ede7f6!important}.deep-purple-50-border-left{border-left-color:#ede7f6!important}.deep-purple-100-bg{background-color:#d1c4e9!important}.md-deep-purple-100-bg{background-color:#d1c4e9!important;color:rgba(0,0,0,.87)}.deep-purple-100-fg{color:#d1c4e9!important}.deep-purple-100-border{border-color:#d1c4e9!important}.deep-purple-100-border-top{border-top-color:#d1c4e9!important}.deep-purple-100-border-right{border-right-color:#d1c4e9!important}.deep-purple-100-border-bottom{border-bottom-color:#d1c4e9!important}.deep-purple-100-border-left{border-left-color:#d1c4e9!important}.deep-purple-200-bg{background-color:#b39ddb!important}.md-deep-purple-200-bg{background-color:#b39ddb!important;color:rgba(0,0,0,.87)}.deep-purple-200-fg{color:#b39ddb!important}.deep-purple-200-border{border-color:#b39ddb!important}.deep-purple-200-border-top{border-top-color:#b39ddb!important}.deep-purple-200-border-right{border-right-color:#b39ddb!important}.deep-purple-200-border-bottom{border-bottom-color:#b39ddb!important}.deep-purple-200-border-left{border-left-color:#b39ddb!important}.deep-purple-300-bg{background-color:#9575cd!important}.md-deep-purple-300-bg{background-color:#9575cd!important;color:#fff}.deep-purple-300-fg{color:#9575cd!important}.deep-purple-300-border{border-color:#9575cd!important}.deep-purple-300-border-top{border-top-color:#9575cd!important}.deep-purple-300-border-right{border-right-color:#9575cd!important}.deep-purple-300-border-bottom{border-bottom-color:#9575cd!important}.deep-purple-300-border-left{border-left-color:#9575cd!important}.deep-purple-400-bg{background-color:#7e57c2!important}.md-deep-purple-400-bg{background-color:#7e57c2!important;color:#fff}.deep-purple-400-fg{color:#7e57c2!important}.deep-purple-400-border{border-color:#7e57c2!important}.deep-purple-400-border-top{border-top-color:#7e57c2!important}.deep-purple-400-border-right{border-right-color:#7e57c2!important}.deep-purple-400-border-bottom{border-bottom-color:#7e57c2!important}.deep-purple-400-border-left{border-left-color:#7e57c2!important}.deep-purple-500-bg{background-color:#673ab7!important}.md-deep-purple-500-bg{background-color:#673ab7!important;color:rgba(255,255,255,.87)}.deep-purple-500-fg{color:#673ab7!important}.deep-purple-500-border{border-color:#673ab7!important}.deep-purple-500-border-top{border-top-color:#673ab7!important}.deep-purple-500-border-right{border-right-color:#673ab7!important}.deep-purple-500-border-bottom{border-bottom-color:#673ab7!important}.deep-purple-500-border-left{border-left-color:#673ab7!important}.md-deep-purple-bg{background-color:#673ab7!important;color:rgba(255,255,255,.87)}.deep-purple-bg{background-color:#673ab7!important}.deep-purple-fg{color:#673ab7!important}.deep-purple-border{border-color:#673ab7!important}.deep-purple-border-top{border-top-color:#673ab7!important}.deep-purple-border-right{border-right-color:#673ab7!important}.deep-purple-border-bottom{border-bottom-color:#673ab7!important}.deep-purple-border-left{border-left-color:#673ab7!important}.deep-purple-600-bg{background-color:#5e35b1!important}.md-deep-purple-600-bg{background-color:#5e35b1!important;color:rgba(255,255,255,.87)}.deep-purple-600-fg{color:#5e35b1!important}.deep-purple-600-border{border-color:#5e35b1!important}.deep-purple-600-border-top{border-top-color:#5e35b1!important}.deep-purple-600-border-right{border-right-color:#5e35b1!important}.deep-purple-600-border-bottom{border-bottom-color:#5e35b1!important}.deep-purple-600-border-left{border-left-color:#5e35b1!important}.deep-purple-700-bg{background-color:#512da8!important}.md-deep-purple-700-bg{background-color:#512da8!important;color:rgba(255,255,255,.87)}.deep-purple-700-fg{color:#512da8!important}.deep-purple-700-border{border-color:#512da8!important}.deep-purple-700-border-top{border-top-color:#512da8!important}.deep-purple-700-border-right{border-right-color:#512da8!important}.deep-purple-700-border-bottom{border-bottom-color:#512da8!important}.deep-purple-700-border-left{border-left-color:#512da8!important}.deep-purple-800-bg{background-color:#4527a0!important}.md-deep-purple-800-bg{background-color:#4527a0!important;color:rgba(255,255,255,.87)}.deep-purple-800-fg{color:#4527a0!important}.deep-purple-800-border{border-color:#4527a0!important}.deep-purple-800-border-top{border-top-color:#4527a0!important}.deep-purple-800-border-right{border-right-color:#4527a0!important}.deep-purple-800-border-bottom{border-bottom-color:#4527a0!important}.deep-purple-800-border-left{border-left-color:#4527a0!important}.deep-purple-900-bg{background-color:#311b92!important}.md-deep-purple-900-bg{background-color:#311b92!important;color:rgba(255,255,255,.87)}.deep-purple-900-fg{color:#311b92!important}.deep-purple-900-border{border-color:#311b92!important}.deep-purple-900-border-top{border-top-color:#311b92!important}.deep-purple-900-border-right{border-right-color:#311b92!important}.deep-purple-900-border-bottom{border-bottom-color:#311b92!important}.deep-purple-900-border-left{border-left-color:#311b92!important}.deep-purple-A100-bg{background-color:#b388ff!important}.md-deep-purple-A100-bg{background-color:#b388ff!important;color:rgba(0,0,0,.87)}.deep-purple-A100-fg{color:#b388ff!important}.deep-purple-A100-border{border-color:#b388ff!important}.deep-purple-A100-border-top{border-top-color:#b388ff!important}.deep-purple-A100-border-right{border-right-color:#b388ff!important}.deep-purple-A100-border-bottom{border-bottom-color:#b388ff!important}.deep-purple-A100-border-left{border-left-color:#b388ff!important}.deep-purple-A200-bg{background-color:#7c4dff!important}.md-deep-purple-A200-bg{background-color:#7c4dff!important;color:#fff}.deep-purple-A200-fg{color:#7c4dff!important}.deep-purple-A200-border{border-color:#7c4dff!important}.deep-purple-A200-border-top{border-top-color:#7c4dff!important}.deep-purple-A200-border-right{border-right-color:#7c4dff!important}.deep-purple-A200-border-bottom{border-bottom-color:#7c4dff!important}.deep-purple-A200-border-left{border-left-color:#7c4dff!important}.deep-purple-A400-bg{background-color:#651fff!important}.md-deep-purple-A400-bg{background-color:#651fff!important;color:rgba(255,255,255,.87)}.deep-purple-A400-fg{color:#651fff!important}.deep-purple-A400-border{border-color:#651fff!important}.deep-purple-A400-border-top{border-top-color:#651fff!important}.deep-purple-A400-border-right{border-right-color:#651fff!important}.deep-purple-A400-border-bottom{border-bottom-color:#651fff!important}.deep-purple-A400-border-left{border-left-color:#651fff!important}.deep-purple-A700-bg{background-color:#6200ea!important}.md-deep-purple-A700-bg{background-color:#6200ea!important;color:rgba(255,255,255,.87)}.deep-purple-A700-fg{color:#6200ea!important}.deep-purple-A700-border{border-color:#6200ea!important}.deep-purple-A700-border-top{border-top-color:#6200ea!important}.deep-purple-A700-border-right{border-right-color:#6200ea!important}.deep-purple-A700-border-bottom{border-bottom-color:#6200ea!important}.deep-purple-A700-border-left{border-left-color:#6200ea!important}.indigo-50-bg{background-color:#e8eaf6!important}.md-indigo-50-bg{background-color:#e8eaf6!important;color:rgba(0,0,0,.87)}.indigo-50-fg{color:#e8eaf6!important}.indigo-50-border{border-color:#e8eaf6!important}.indigo-50-border-top{border-top-color:#e8eaf6!important}.indigo-50-border-right{border-right-color:#e8eaf6!important}.indigo-50-border-bottom{border-bottom-color:#e8eaf6!important}.indigo-50-border-left{border-left-color:#e8eaf6!important}.indigo-100-bg{background-color:#c5cae9!important}.md-indigo-100-bg{background-color:#c5cae9!important;color:rgba(0,0,0,.87)}.indigo-100-fg{color:#c5cae9!important}.indigo-100-border{border-color:#c5cae9!important}.indigo-100-border-top{border-top-color:#c5cae9!important}.indigo-100-border-right{border-right-color:#c5cae9!important}.indigo-100-border-bottom{border-bottom-color:#c5cae9!important}.indigo-100-border-left{border-left-color:#c5cae9!important}.indigo-200-bg{background-color:#9fa8da!important}.md-indigo-200-bg{background-color:#9fa8da!important;color:rgba(0,0,0,.87)}.indigo-200-fg{color:#9fa8da!important}.indigo-200-border{border-color:#9fa8da!important}.indigo-200-border-top{border-top-color:#9fa8da!important}.indigo-200-border-right{border-right-color:#9fa8da!important}.indigo-200-border-bottom{border-bottom-color:#9fa8da!important}.indigo-200-border-left{border-left-color:#9fa8da!important}.indigo-300-bg{background-color:#7986cb!important}.md-indigo-300-bg{background-color:#7986cb!important;color:#fff}.indigo-300-fg{color:#7986cb!important}.indigo-300-border{border-color:#7986cb!important}.indigo-300-border-top{border-top-color:#7986cb!important}.indigo-300-border-right{border-right-color:#7986cb!important}.indigo-300-border-bottom{border-bottom-color:#7986cb!important}.indigo-300-border-left{border-left-color:#7986cb!important}.indigo-400-bg{background-color:#5c6bc0!important}.md-indigo-400-bg{background-color:#5c6bc0!important;color:#fff}.indigo-400-fg{color:#5c6bc0!important}.indigo-400-border{border-color:#5c6bc0!important}.indigo-400-border-top{border-top-color:#5c6bc0!important}.indigo-400-border-right{border-right-color:#5c6bc0!important}.indigo-400-border-bottom{border-bottom-color:#5c6bc0!important}.indigo-400-border-left{border-left-color:#5c6bc0!important}.indigo-500-bg{background-color:#3f51b5!important}.md-indigo-500-bg{background-color:#3f51b5!important;color:rgba(255,255,255,.87)}.indigo-500-fg{color:#3f51b5!important}.indigo-500-border{border-color:#3f51b5!important}.indigo-500-border-top{border-top-color:#3f51b5!important}.indigo-500-border-right{border-right-color:#3f51b5!important}.indigo-500-border-bottom{border-bottom-color:#3f51b5!important}.indigo-500-border-left{border-left-color:#3f51b5!important}.md-indigo-bg{background-color:#3f51b5!important;color:rgba(255,255,255,.87)}.indigo-bg{background-color:#3f51b5!important}.indigo-fg{color:#3f51b5!important}.indigo-border{border-color:#3f51b5!important}.indigo-border-top{border-top-color:#3f51b5!important}.indigo-border-right{border-right-color:#3f51b5!important}.indigo-border-bottom{border-bottom-color:#3f51b5!important}.indigo-border-left{border-left-color:#3f51b5!important}.indigo-600-bg{background-color:#3949ab!important}.md-indigo-600-bg{background-color:#3949ab!important;color:rgba(255,255,255,.87)}.indigo-600-fg{color:#3949ab!important}.indigo-600-border{border-color:#3949ab!important}.indigo-600-border-top{border-top-color:#3949ab!important}.indigo-600-border-right{border-right-color:#3949ab!important}.indigo-600-border-bottom{border-bottom-color:#3949ab!important}.indigo-600-border-left{border-left-color:#3949ab!important}.indigo-700-bg{background-color:#303f9f!important}.md-indigo-700-bg{background-color:#303f9f!important;color:rgba(255,255,255,.87)}.indigo-700-fg{color:#303f9f!important}.indigo-700-border{border-color:#303f9f!important}.indigo-700-border-top{border-top-color:#303f9f!important}.indigo-700-border-right{border-right-color:#303f9f!important}.indigo-700-border-bottom{border-bottom-color:#303f9f!important}.indigo-700-border-left{border-left-color:#303f9f!important}.indigo-800-bg{background-color:#283593!important}.md-indigo-800-bg{background-color:#283593!important;color:rgba(255,255,255,.87)}.indigo-800-fg{color:#283593!important}.indigo-800-border{border-color:#283593!important}.indigo-800-border-top{border-top-color:#283593!important}.indigo-800-border-right{border-right-color:#283593!important}.indigo-800-border-bottom{border-bottom-color:#283593!important}.indigo-800-border-left{border-left-color:#283593!important}.indigo-900-bg{background-color:#1a237e!important}.md-indigo-900-bg{background-color:#1a237e!important;color:rgba(255,255,255,.87)}.indigo-900-fg{color:#1a237e!important}.indigo-900-border{border-color:#1a237e!important}.indigo-900-border-top{border-top-color:#1a237e!important}.indigo-900-border-right{border-right-color:#1a237e!important}.indigo-900-border-bottom{border-bottom-color:#1a237e!important}.indigo-900-border-left{border-left-color:#1a237e!important}.indigo-A100-bg{background-color:#8c9eff!important}.md-indigo-A100-bg{background-color:#8c9eff!important;color:rgba(0,0,0,.87)}.indigo-A100-fg{color:#8c9eff!important}.indigo-A100-border{border-color:#8c9eff!important}.indigo-A100-border-top{border-top-color:#8c9eff!important}.indigo-A100-border-right{border-right-color:#8c9eff!important}.indigo-A100-border-bottom{border-bottom-color:#8c9eff!important}.indigo-A100-border-left{border-left-color:#8c9eff!important}.indigo-A200-bg{background-color:#536dfe!important}.md-indigo-A200-bg{background-color:#536dfe!important;color:#fff}.indigo-A200-fg{color:#536dfe!important}.indigo-A200-border{border-color:#536dfe!important}.indigo-A200-border-top{border-top-color:#536dfe!important}.indigo-A200-border-right{border-right-color:#536dfe!important}.indigo-A200-border-bottom{border-bottom-color:#536dfe!important}.indigo-A200-border-left{border-left-color:#536dfe!important}.indigo-A400-bg{background-color:#3d5afe!important}.md-indigo-A400-bg{background-color:#3d5afe!important;color:#fff}.indigo-A400-fg{color:#3d5afe!important}.indigo-A400-border{border-color:#3d5afe!important}.indigo-A400-border-top{border-top-color:#3d5afe!important}.indigo-A400-border-right{border-right-color:#3d5afe!important}.indigo-A400-border-bottom{border-bottom-color:#3d5afe!important}.indigo-A400-border-left{border-left-color:#3d5afe!important}.indigo-A700-bg{background-color:#304ffe!important}.md-indigo-A700-bg{background-color:#304ffe!important;color:rgba(255,255,255,.87)}.indigo-A700-fg{color:#304ffe!important}.indigo-A700-border{border-color:#304ffe!important}.indigo-A700-border-top{border-top-color:#304ffe!important}.indigo-A700-border-right{border-right-color:#304ffe!important}.indigo-A700-border-bottom{border-bottom-color:#304ffe!important}.indigo-A700-border-left{border-left-color:#304ffe!important}.blue-50-bg{background-color:#e3f2fd!important}.md-blue-50-bg{background-color:#e3f2fd!important;color:rgba(0,0,0,.87)}.blue-50-fg{color:#e3f2fd!important}.blue-50-border{border-color:#e3f2fd!important}.blue-50-border-top{border-top-color:#e3f2fd!important}.blue-50-border-right{border-right-color:#e3f2fd!important}.blue-50-border-bottom{border-bottom-color:#e3f2fd!important}.blue-50-border-left{border-left-color:#e3f2fd!important}.blue-100-bg{background-color:#bbdefb!important}.md-blue-100-bg{background-color:#bbdefb!important;color:rgba(0,0,0,.87)}.blue-100-fg{color:#bbdefb!important}.blue-100-border{border-color:#bbdefb!important}.blue-100-border-top{border-top-color:#bbdefb!important}.blue-100-border-right{border-right-color:#bbdefb!important}.blue-100-border-bottom{border-bottom-color:#bbdefb!important}.blue-100-border-left{border-left-color:#bbdefb!important}.blue-200-bg{background-color:#90caf9!important}.md-blue-200-bg{background-color:#90caf9!important;color:rgba(0,0,0,.87)}.blue-200-fg{color:#90caf9!important}.blue-200-border{border-color:#90caf9!important}.blue-200-border-top{border-top-color:#90caf9!important}.blue-200-border-right{border-right-color:#90caf9!important}.blue-200-border-bottom{border-bottom-color:#90caf9!important}.blue-200-border-left{border-left-color:#90caf9!important}.blue-300-bg{background-color:#64b5f6!important}.md-blue-300-bg{background-color:#64b5f6!important;color:rgba(0,0,0,.87)}.blue-300-fg{color:#64b5f6!important}.blue-300-border{border-color:#64b5f6!important}.blue-300-border-top{border-top-color:#64b5f6!important}.blue-300-border-right{border-right-color:#64b5f6!important}.blue-300-border-bottom{border-bottom-color:#64b5f6!important}.blue-300-border-left{border-left-color:#64b5f6!important}.blue-400-bg{background-color:#42a5f5!important}.md-blue-400-bg{background-color:#42a5f5!important;color:rgba(0,0,0,.87)}.blue-400-fg{color:#42a5f5!important}.blue-400-border{border-color:#42a5f5!important}.blue-400-border-top{border-top-color:#42a5f5!important}.blue-400-border-right{border-right-color:#42a5f5!important}.blue-400-border-bottom{border-bottom-color:#42a5f5!important}.blue-400-border-left{border-left-color:#42a5f5!important}.blue-500-bg{background-color:#2196f3!important}.md-blue-500-bg{background-color:#2196f3!important;color:#fff}.blue-500-fg{color:#2196f3!important}.blue-500-border{border-color:#2196f3!important}.blue-500-border-top{border-top-color:#2196f3!important}.blue-500-border-right{border-right-color:#2196f3!important}.blue-500-border-bottom{border-bottom-color:#2196f3!important}.blue-500-border-left{border-left-color:#2196f3!important}.md-blue-bg{background-color:#2196f3!important;color:#fff}.blue-bg{background-color:#2196f3!important}.blue-fg{color:#2196f3!important}.blue-border{border-color:#2196f3!important}.blue-border-top{border-top-color:#2196f3!important}.blue-border-right{border-right-color:#2196f3!important}.blue-border-bottom{border-bottom-color:#2196f3!important}.blue-border-left{border-left-color:#2196f3!important}.blue-600-bg{background-color:#1e88e5!important}.md-blue-600-bg{background-color:#1e88e5!important;color:#fff}.blue-600-fg{color:#1e88e5!important}.blue-600-border{border-color:#1e88e5!important}.blue-600-border-top{border-top-color:#1e88e5!important}.blue-600-border-right{border-right-color:#1e88e5!important}.blue-600-border-bottom{border-bottom-color:#1e88e5!important}.blue-600-border-left{border-left-color:#1e88e5!important}.blue-700-bg{background-color:#1976d2!important}.md-blue-700-bg{background-color:#1976d2!important;color:#fff}.blue-700-fg{color:#1976d2!important}.blue-700-border{border-color:#1976d2!important}.blue-700-border-top{border-top-color:#1976d2!important}.blue-700-border-right{border-right-color:#1976d2!important}.blue-700-border-bottom{border-bottom-color:#1976d2!important}.blue-700-border-left{border-left-color:#1976d2!important}.blue-800-bg{background-color:#1565c0!important}.md-blue-800-bg{background-color:#1565c0!important;color:rgba(255,255,255,.87)}.blue-800-fg{color:#1565c0!important}.blue-800-border{border-color:#1565c0!important}.blue-800-border-top{border-top-color:#1565c0!important}.blue-800-border-right{border-right-color:#1565c0!important}.blue-800-border-bottom{border-bottom-color:#1565c0!important}.blue-800-border-left{border-left-color:#1565c0!important}.blue-900-bg{background-color:#0d47a1!important}.md-blue-900-bg{background-color:#0d47a1!important;color:rgba(255,255,255,.87)}.blue-900-fg{color:#0d47a1!important}.blue-900-border{border-color:#0d47a1!important}.blue-900-border-top{border-top-color:#0d47a1!important}.blue-900-border-right{border-right-color:#0d47a1!important}.blue-900-border-bottom{border-bottom-color:#0d47a1!important}.blue-900-border-left{border-left-color:#0d47a1!important}.blue-A100-bg{background-color:#82b1ff!important}.md-blue-A100-bg{background-color:#82b1ff!important;color:rgba(0,0,0,.87)}.blue-A100-fg{color:#82b1ff!important}.blue-A100-border{border-color:#82b1ff!important}.blue-A100-border-top{border-top-color:#82b1ff!important}.blue-A100-border-right{border-right-color:#82b1ff!important}.blue-A100-border-bottom{border-bottom-color:#82b1ff!important}.blue-A100-border-left{border-left-color:#82b1ff!important}.blue-A200-bg{background-color:#448aff!important}.md-blue-A200-bg{background-color:#448aff!important;color:#fff}.blue-A200-fg{color:#448aff!important}.blue-A200-border{border-color:#448aff!important}.blue-A200-border-top{border-top-color:#448aff!important}.blue-A200-border-right{border-right-color:#448aff!important}.blue-A200-border-bottom{border-bottom-color:#448aff!important}.blue-A200-border-left{border-left-color:#448aff!important}.blue-A400-bg{background-color:#2979ff!important}.md-blue-A400-bg{background-color:#2979ff!important;color:#fff}.blue-A400-fg{color:#2979ff!important}.blue-A400-border{border-color:#2979ff!important}.blue-A400-border-top{border-top-color:#2979ff!important}.blue-A400-border-right{border-right-color:#2979ff!important}.blue-A400-border-bottom{border-bottom-color:#2979ff!important}.blue-A400-border-left{border-left-color:#2979ff!important}.blue-A700-bg{background-color:#2962ff!important}.md-blue-A700-bg{background-color:#2962ff!important;color:#fff}.blue-A700-fg{color:#2962ff!important}.blue-A700-border{border-color:#2962ff!important}.blue-A700-border-top{border-top-color:#2962ff!important}.blue-A700-border-right{border-right-color:#2962ff!important}.blue-A700-border-bottom{border-bottom-color:#2962ff!important}.blue-A700-border-left{border-left-color:#2962ff!important}.light-blue-50-bg{background-color:#e1f5fe!important}.md-light-blue-50-bg{background-color:#e1f5fe!important;color:rgba(0,0,0,.87)}.light-blue-50-fg{color:#e1f5fe!important}.light-blue-50-border{border-color:#e1f5fe!important}.light-blue-50-border-top{border-top-color:#e1f5fe!important}.light-blue-50-border-right{border-right-color:#e1f5fe!important}.light-blue-50-border-bottom{border-bottom-color:#e1f5fe!important}.light-blue-50-border-left{border-left-color:#e1f5fe!important}.light-blue-100-bg{background-color:#b3e5fc!important}.md-light-blue-100-bg{background-color:#b3e5fc!important;color:rgba(0,0,0,.87)}.light-blue-100-fg{color:#b3e5fc!important}.light-blue-100-border{border-color:#b3e5fc!important}.light-blue-100-border-top{border-top-color:#b3e5fc!important}.light-blue-100-border-right{border-right-color:#b3e5fc!important}.light-blue-100-border-bottom{border-bottom-color:#b3e5fc!important}.light-blue-100-border-left{border-left-color:#b3e5fc!important}.light-blue-200-bg{background-color:#81d4fa!important}.md-light-blue-200-bg{background-color:#81d4fa!important;color:rgba(0,0,0,.87)}.light-blue-200-fg{color:#81d4fa!important}.light-blue-200-border{border-color:#81d4fa!important}.light-blue-200-border-top{border-top-color:#81d4fa!important}.light-blue-200-border-right{border-right-color:#81d4fa!important}.light-blue-200-border-bottom{border-bottom-color:#81d4fa!important}.light-blue-200-border-left{border-left-color:#81d4fa!important}.light-blue-300-bg{background-color:#4fc3f7!important}.md-light-blue-300-bg{background-color:#4fc3f7!important;color:rgba(0,0,0,.87)}.light-blue-300-fg{color:#4fc3f7!important}.light-blue-300-border{border-color:#4fc3f7!important}.light-blue-300-border-top{border-top-color:#4fc3f7!important}.light-blue-300-border-right{border-right-color:#4fc3f7!important}.light-blue-300-border-bottom{border-bottom-color:#4fc3f7!important}.light-blue-300-border-left{border-left-color:#4fc3f7!important}.light-blue-400-bg{background-color:#29b6f6!important}.md-light-blue-400-bg{background-color:#29b6f6!important;color:rgba(0,0,0,.87)}.light-blue-400-fg{color:#29b6f6!important}.light-blue-400-border{border-color:#29b6f6!important}.light-blue-400-border-top{border-top-color:#29b6f6!important}.light-blue-400-border-right{border-right-color:#29b6f6!important}.light-blue-400-border-bottom{border-bottom-color:#29b6f6!important}.light-blue-400-border-left{border-left-color:#29b6f6!important}.light-blue-500-bg{background-color:#03a9f4!important}.md-light-blue-500-bg{background-color:#03a9f4!important;color:rgba(0,0,0,.87)}.light-blue-500-fg{color:#03a9f4!important}.light-blue-500-border{border-color:#03a9f4!important}.light-blue-500-border-top{border-top-color:#03a9f4!important}.light-blue-500-border-right{border-right-color:#03a9f4!important}.light-blue-500-border-bottom{border-bottom-color:#03a9f4!important}.light-blue-500-border-left{border-left-color:#03a9f4!important}.md-light-blue-bg{background-color:#03a9f4!important;color:rgba(0,0,0,.87)}.light-blue-bg{background-color:#03a9f4!important}.light-blue-fg{color:#03a9f4!important}.light-blue-border{border-color:#03a9f4!important}.light-blue-border-top{border-top-color:#03a9f4!important}.light-blue-border-right{border-right-color:#03a9f4!important}.light-blue-border-bottom{border-bottom-color:#03a9f4!important}.light-blue-border-left{border-left-color:#03a9f4!important}.light-blue-600-bg{background-color:#039be5!important}.md-light-blue-600-bg{background-color:#039be5!important;color:#fff}.light-blue-600-fg{color:#039be5!important}.light-blue-600-border{border-color:#039be5!important}.light-blue-600-border-top{border-top-color:#039be5!important}.light-blue-600-border-right{border-right-color:#039be5!important}.light-blue-600-border-bottom{border-bottom-color:#039be5!important}.light-blue-600-border-left{border-left-color:#039be5!important}.light-blue-700-bg{background-color:#0288d1!important}.md-light-blue-700-bg{background-color:#0288d1!important;color:#fff}.light-blue-700-fg{color:#0288d1!important}.light-blue-700-border{border-color:#0288d1!important}.light-blue-700-border-top{border-top-color:#0288d1!important}.light-blue-700-border-right{border-right-color:#0288d1!important}.light-blue-700-border-bottom{border-bottom-color:#0288d1!important}.light-blue-700-border-left{border-left-color:#0288d1!important}.light-blue-800-bg{background-color:#0277bd!important}.md-light-blue-800-bg{background-color:#0277bd!important;color:#fff}.light-blue-800-fg{color:#0277bd!important}.light-blue-800-border{border-color:#0277bd!important}.light-blue-800-border-top{border-top-color:#0277bd!important}.light-blue-800-border-right{border-right-color:#0277bd!important}.light-blue-800-border-bottom{border-bottom-color:#0277bd!important}.light-blue-800-border-left{border-left-color:#0277bd!important}.light-blue-900-bg{background-color:#01579b!important}.md-light-blue-900-bg{background-color:#01579b!important;color:#fff}.light-blue-900-fg{color:#01579b!important}.light-blue-900-border{border-color:#01579b!important}.light-blue-900-border-top{border-top-color:#01579b!important}.light-blue-900-border-right{border-right-color:#01579b!important}.light-blue-900-border-bottom{border-bottom-color:#01579b!important}.light-blue-900-border-left{border-left-color:#01579b!important}.light-blue-A100-bg{background-color:#80d8ff!important}.md-light-blue-A100-bg{background-color:#80d8ff!important;color:rgba(0,0,0,.87)}.light-blue-A100-fg{color:#80d8ff!important}.light-blue-A100-border{border-color:#80d8ff!important}.light-blue-A100-border-top{border-top-color:#80d8ff!important}.light-blue-A100-border-right{border-right-color:#80d8ff!important}.light-blue-A100-border-bottom{border-bottom-color:#80d8ff!important}.light-blue-A100-border-left{border-left-color:#80d8ff!important}.light-blue-A200-bg{background-color:#40c4ff!important}.md-light-blue-A200-bg{background-color:#40c4ff!important;color:rgba(0,0,0,.87)}.light-blue-A200-fg{color:#40c4ff!important}.light-blue-A200-border{border-color:#40c4ff!important}.light-blue-A200-border-top{border-top-color:#40c4ff!important}.light-blue-A200-border-right{border-right-color:#40c4ff!important}.light-blue-A200-border-bottom{border-bottom-color:#40c4ff!important}.light-blue-A200-border-left{border-left-color:#40c4ff!important}.light-blue-A400-bg{background-color:#00b0ff!important}.md-light-blue-A400-bg{background-color:#00b0ff!important;color:rgba(0,0,0,.87)}.light-blue-A400-fg{color:#00b0ff!important}.light-blue-A400-border{border-color:#00b0ff!important}.light-blue-A400-border-top{border-top-color:#00b0ff!important}.light-blue-A400-border-right{border-right-color:#00b0ff!important}.light-blue-A400-border-bottom{border-bottom-color:#00b0ff!important}.light-blue-A400-border-left{border-left-color:#00b0ff!important}.light-blue-A700-bg{background-color:#0091ea!important}.md-light-blue-A700-bg{background-color:#0091ea!important;color:#fff}.light-blue-A700-fg{color:#0091ea!important}.light-blue-A700-border{border-color:#0091ea!important}.light-blue-A700-border-top{border-top-color:#0091ea!important}.light-blue-A700-border-right{border-right-color:#0091ea!important}.light-blue-A700-border-bottom{border-bottom-color:#0091ea!important}.light-blue-A700-border-left{border-left-color:#0091ea!important}.cyan-50-bg{background-color:#e0f7fa!important}.md-cyan-50-bg{background-color:#e0f7fa!important;color:rgba(0,0,0,.87)}.cyan-50-fg{color:#e0f7fa!important}.cyan-50-border{border-color:#e0f7fa!important}.cyan-50-border-top{border-top-color:#e0f7fa!important}.cyan-50-border-right{border-right-color:#e0f7fa!important}.cyan-50-border-bottom{border-bottom-color:#e0f7fa!important}.cyan-50-border-left{border-left-color:#e0f7fa!important}.cyan-100-bg{background-color:#b2ebf2!important}.md-cyan-100-bg{background-color:#b2ebf2!important;color:rgba(0,0,0,.87)}.cyan-100-fg{color:#b2ebf2!important}.cyan-100-border{border-color:#b2ebf2!important}.cyan-100-border-top{border-top-color:#b2ebf2!important}.cyan-100-border-right{border-right-color:#b2ebf2!important}.cyan-100-border-bottom{border-bottom-color:#b2ebf2!important}.cyan-100-border-left{border-left-color:#b2ebf2!important}.cyan-200-bg{background-color:#80deea!important}.md-cyan-200-bg{background-color:#80deea!important;color:rgba(0,0,0,.87)}.cyan-200-fg{color:#80deea!important}.cyan-200-border{border-color:#80deea!important}.cyan-200-border-top{border-top-color:#80deea!important}.cyan-200-border-right{border-right-color:#80deea!important}.cyan-200-border-bottom{border-bottom-color:#80deea!important}.cyan-200-border-left{border-left-color:#80deea!important}.cyan-300-bg{background-color:#4dd0e1!important}.md-cyan-300-bg{background-color:#4dd0e1!important;color:rgba(0,0,0,.87)}.cyan-300-fg{color:#4dd0e1!important}.cyan-300-border{border-color:#4dd0e1!important}.cyan-300-border-top{border-top-color:#4dd0e1!important}.cyan-300-border-right{border-right-color:#4dd0e1!important}.cyan-300-border-bottom{border-bottom-color:#4dd0e1!important}.cyan-300-border-left{border-left-color:#4dd0e1!important}.cyan-400-bg{background-color:#26c6da!important}.md-cyan-400-bg{background-color:#26c6da!important;color:rgba(0,0,0,.87)}.cyan-400-fg{color:#26c6da!important}.cyan-400-border{border-color:#26c6da!important}.cyan-400-border-top{border-top-color:#26c6da!important}.cyan-400-border-right{border-right-color:#26c6da!important}.cyan-400-border-bottom{border-bottom-color:#26c6da!important}.cyan-400-border-left{border-left-color:#26c6da!important}.cyan-500-bg{background-color:#00bcd4!important}.md-cyan-500-bg{background-color:#00bcd4!important;color:rgba(0,0,0,.87)}.cyan-500-fg{color:#00bcd4!important}.cyan-500-border{border-color:#00bcd4!important}.cyan-500-border-top{border-top-color:#00bcd4!important}.cyan-500-border-right{border-right-color:#00bcd4!important}.cyan-500-border-bottom{border-bottom-color:#00bcd4!important}.cyan-500-border-left{border-left-color:#00bcd4!important}.md-cyan-bg{background-color:#00bcd4!important;color:rgba(0,0,0,.87)}.cyan-bg{background-color:#00bcd4!important}.cyan-fg{color:#00bcd4!important}.cyan-border{border-color:#00bcd4!important}.cyan-border-top{border-top-color:#00bcd4!important}.cyan-border-right{border-right-color:#00bcd4!important}.cyan-border-bottom{border-bottom-color:#00bcd4!important}.cyan-border-left{border-left-color:#00bcd4!important}.cyan-600-bg{background-color:#00acc1!important}.md-cyan-600-bg{background-color:#00acc1!important;color:rgba(0,0,0,.87)}.cyan-600-fg{color:#00acc1!important}.cyan-600-border{border-color:#00acc1!important}.cyan-600-border-top{border-top-color:#00acc1!important}.cyan-600-border-right{border-right-color:#00acc1!important}.cyan-600-border-bottom{border-bottom-color:#00acc1!important}.cyan-600-border-left{border-left-color:#00acc1!important}.cyan-700-bg{background-color:#0097a7!important}.md-cyan-700-bg{background-color:#0097a7!important;color:#fff}.cyan-700-fg{color:#0097a7!important}.cyan-700-border{border-color:#0097a7!important}.cyan-700-border-top{border-top-color:#0097a7!important}.cyan-700-border-right{border-right-color:#0097a7!important}.cyan-700-border-bottom{border-bottom-color:#0097a7!important}.cyan-700-border-left{border-left-color:#0097a7!important}.cyan-800-bg{background-color:#00838f!important}.md-cyan-800-bg{background-color:#00838f!important;color:#fff}.cyan-800-fg{color:#00838f!important}.cyan-800-border{border-color:#00838f!important}.cyan-800-border-top{border-top-color:#00838f!important}.cyan-800-border-right{border-right-color:#00838f!important}.cyan-800-border-bottom{border-bottom-color:#00838f!important}.cyan-800-border-left{border-left-color:#00838f!important}.cyan-900-bg{background-color:#006064!important}.md-cyan-900-bg{background-color:#006064!important;color:#fff}.cyan-900-fg{color:#006064!important}.cyan-900-border{border-color:#006064!important}.cyan-900-border-top{border-top-color:#006064!important}.cyan-900-border-right{border-right-color:#006064!important}.cyan-900-border-bottom{border-bottom-color:#006064!important}.cyan-900-border-left{border-left-color:#006064!important}.cyan-A100-bg{background-color:#84ffff!important}.md-cyan-A100-bg{background-color:#84ffff!important;color:rgba(0,0,0,.87)}.cyan-A100-fg{color:#84ffff!important}.cyan-A100-border{border-color:#84ffff!important}.cyan-A100-border-top{border-top-color:#84ffff!important}.cyan-A100-border-right{border-right-color:#84ffff!important}.cyan-A100-border-bottom{border-bottom-color:#84ffff!important}.cyan-A100-border-left{border-left-color:#84ffff!important}.cyan-A200-bg{background-color:#18ffff!important}.md-cyan-A200-bg{background-color:#18ffff!important;color:rgba(0,0,0,.87)}.cyan-A200-fg{color:#18ffff!important}.cyan-A200-border{border-color:#18ffff!important}.cyan-A200-border-top{border-top-color:#18ffff!important}.cyan-A200-border-right{border-right-color:#18ffff!important}.cyan-A200-border-bottom{border-bottom-color:#18ffff!important}.cyan-A200-border-left{border-left-color:#18ffff!important}.cyan-A400-bg{background-color:#00e5ff!important}.md-cyan-A400-bg{background-color:#00e5ff!important;color:rgba(0,0,0,.87)}.cyan-A400-fg{color:#00e5ff!important}.cyan-A400-border{border-color:#00e5ff!important}.cyan-A400-border-top{border-top-color:#00e5ff!important}.cyan-A400-border-right{border-right-color:#00e5ff!important}.cyan-A400-border-bottom{border-bottom-color:#00e5ff!important}.cyan-A400-border-left{border-left-color:#00e5ff!important}.cyan-A700-bg{background-color:#00b8d4!important}.md-cyan-A700-bg{background-color:#00b8d4!important;color:rgba(0,0,0,.87)}.cyan-A700-fg{color:#00b8d4!important}.cyan-A700-border{border-color:#00b8d4!important}.cyan-A700-border-top{border-top-color:#00b8d4!important}.cyan-A700-border-right{border-right-color:#00b8d4!important}.cyan-A700-border-bottom{border-bottom-color:#00b8d4!important}.cyan-A700-border-left{border-left-color:#00b8d4!important}.teal-50-bg{background-color:#e0f2f1!important}.md-teal-50-bg{background-color:#e0f2f1!important;color:rgba(0,0,0,.87)}.teal-50-fg{color:#e0f2f1!important}.teal-50-border{border-color:#e0f2f1!important}.teal-50-border-top{border-top-color:#e0f2f1!important}.teal-50-border-right{border-right-color:#e0f2f1!important}.teal-50-border-bottom{border-bottom-color:#e0f2f1!important}.teal-50-border-left{border-left-color:#e0f2f1!important}.teal-100-bg{background-color:#b2dfdb!important}.md-teal-100-bg{background-color:#b2dfdb!important;color:rgba(0,0,0,.87)}.teal-100-fg{color:#b2dfdb!important}.teal-100-border{border-color:#b2dfdb!important}.teal-100-border-top{border-top-color:#b2dfdb!important}.teal-100-border-right{border-right-color:#b2dfdb!important}.teal-100-border-bottom{border-bottom-color:#b2dfdb!important}.teal-100-border-left{border-left-color:#b2dfdb!important}.teal-200-bg{background-color:#80cbc4!important}.md-teal-200-bg{background-color:#80cbc4!important;color:rgba(0,0,0,.87)}.teal-200-fg{color:#80cbc4!important}.teal-200-border{border-color:#80cbc4!important}.teal-200-border-top{border-top-color:#80cbc4!important}.teal-200-border-right{border-right-color:#80cbc4!important}.teal-200-border-bottom{border-bottom-color:#80cbc4!important}.teal-200-border-left{border-left-color:#80cbc4!important}.teal-300-bg{background-color:#4db6ac!important}.md-teal-300-bg{background-color:#4db6ac!important;color:rgba(0,0,0,.87)}.teal-300-fg{color:#4db6ac!important}.teal-300-border{border-color:#4db6ac!important}.teal-300-border-top{border-top-color:#4db6ac!important}.teal-300-border-right{border-right-color:#4db6ac!important}.teal-300-border-bottom{border-bottom-color:#4db6ac!important}.teal-300-border-left{border-left-color:#4db6ac!important}.teal-400-bg{background-color:#26a69a!important}.md-teal-400-bg{background-color:#26a69a!important;color:rgba(0,0,0,.87)}.teal-400-fg{color:#26a69a!important}.teal-400-border{border-color:#26a69a!important}.teal-400-border-top{border-top-color:#26a69a!important}.teal-400-border-right{border-right-color:#26a69a!important}.teal-400-border-bottom{border-bottom-color:#26a69a!important}.teal-400-border-left{border-left-color:#26a69a!important}.teal-500-bg{background-color:#009688!important}.md-teal-500-bg{background-color:#009688!important;color:#fff}.teal-500-fg{color:#009688!important}.teal-500-border{border-color:#009688!important}.teal-500-border-top{border-top-color:#009688!important}.teal-500-border-right{border-right-color:#009688!important}.teal-500-border-bottom{border-bottom-color:#009688!important}.teal-500-border-left{border-left-color:#009688!important}.md-teal-bg{background-color:#009688!important;color:#fff}.teal-bg{background-color:#009688!important}.teal-fg{color:#009688!important}.teal-border{border-color:#009688!important}.teal-border-top{border-top-color:#009688!important}.teal-border-right{border-right-color:#009688!important}.teal-border-bottom{border-bottom-color:#009688!important}.teal-border-left{border-left-color:#009688!important}.teal-600-bg{background-color:#00897b!important}.md-teal-600-bg{background-color:#00897b!important;color:#fff}.teal-600-fg{color:#00897b!important}.teal-600-border{border-color:#00897b!important}.teal-600-border-top{border-top-color:#00897b!important}.teal-600-border-right{border-right-color:#00897b!important}.teal-600-border-bottom{border-bottom-color:#00897b!important}.teal-600-border-left{border-left-color:#00897b!important}.teal-700-bg{background-color:#00796b!important}.md-teal-700-bg{background-color:#00796b!important;color:#fff}.teal-700-fg{color:#00796b!important}.teal-700-border{border-color:#00796b!important}.teal-700-border-top{border-top-color:#00796b!important}.teal-700-border-right{border-right-color:#00796b!important}.teal-700-border-bottom{border-bottom-color:#00796b!important}.teal-700-border-left{border-left-color:#00796b!important}.teal-800-bg{background-color:#00695c!important}.md-teal-800-bg{background-color:#00695c!important;color:rgba(255,255,255,.87)}.teal-800-fg{color:#00695c!important}.teal-800-border{border-color:#00695c!important}.teal-800-border-top{border-top-color:#00695c!important}.teal-800-border-right{border-right-color:#00695c!important}.teal-800-border-bottom{border-bottom-color:#00695c!important}.teal-800-border-left{border-left-color:#00695c!important}.teal-900-bg{background-color:#004d40!important}.md-teal-900-bg{background-color:#004d40!important;color:rgba(255,255,255,.87)}.teal-900-fg{color:#004d40!important}.teal-900-border{border-color:#004d40!important}.teal-900-border-top{border-top-color:#004d40!important}.teal-900-border-right{border-right-color:#004d40!important}.teal-900-border-bottom{border-bottom-color:#004d40!important}.teal-900-border-left{border-left-color:#004d40!important}.teal-A100-bg{background-color:#a7ffeb!important}.md-teal-A100-bg{background-color:#a7ffeb!important;color:rgba(0,0,0,.87)}.teal-A100-fg{color:#a7ffeb!important}.teal-A100-border{border-color:#a7ffeb!important}.teal-A100-border-top{border-top-color:#a7ffeb!important}.teal-A100-border-right{border-right-color:#a7ffeb!important}.teal-A100-border-bottom{border-bottom-color:#a7ffeb!important}.teal-A100-border-left{border-left-color:#a7ffeb!important}.teal-A200-bg{background-color:#64ffda!important}.md-teal-A200-bg{background-color:#64ffda!important;color:rgba(0,0,0,.87)}.teal-A200-fg{color:#64ffda!important}.teal-A200-border{border-color:#64ffda!important}.teal-A200-border-top{border-top-color:#64ffda!important}.teal-A200-border-right{border-right-color:#64ffda!important}.teal-A200-border-bottom{border-bottom-color:#64ffda!important}.teal-A200-border-left{border-left-color:#64ffda!important}.teal-A400-bg{background-color:#1de9b6!important}.md-teal-A400-bg{background-color:#1de9b6!important;color:rgba(0,0,0,.87)}.teal-A400-fg{color:#1de9b6!important}.teal-A400-border{border-color:#1de9b6!important}.teal-A400-border-top{border-top-color:#1de9b6!important}.teal-A400-border-right{border-right-color:#1de9b6!important}.teal-A400-border-bottom{border-bottom-color:#1de9b6!important}.teal-A400-border-left{border-left-color:#1de9b6!important}.teal-A700-bg{background-color:#00bfa5!important}.md-teal-A700-bg{background-color:#00bfa5!important;color:rgba(0,0,0,.87)}.teal-A700-fg{color:#00bfa5!important}.teal-A700-border{border-color:#00bfa5!important}.teal-A700-border-top{border-top-color:#00bfa5!important}.teal-A700-border-right{border-right-color:#00bfa5!important}.teal-A700-border-bottom{border-bottom-color:#00bfa5!important}.teal-A700-border-left{border-left-color:#00bfa5!important}.green-50-bg{background-color:#e8f5e9!important}.md-green-50-bg{background-color:#e8f5e9!important;color:rgba(0,0,0,.87)}.green-50-fg{color:#e8f5e9!important}.green-50-border{border-color:#e8f5e9!important}.green-50-border-top{border-top-color:#e8f5e9!important}.green-50-border-right{border-right-color:#e8f5e9!important}.green-50-border-bottom{border-bottom-color:#e8f5e9!important}.green-50-border-left{border-left-color:#e8f5e9!important}.green-100-bg{background-color:#c8e6c9!important}.md-green-100-bg{background-color:#c8e6c9!important;color:rgba(0,0,0,.87)}.green-100-fg{color:#c8e6c9!important}.green-100-border{border-color:#c8e6c9!important}.green-100-border-top{border-top-color:#c8e6c9!important}.green-100-border-right{border-right-color:#c8e6c9!important}.green-100-border-bottom{border-bottom-color:#c8e6c9!important}.green-100-border-left{border-left-color:#c8e6c9!important}.green-200-bg{background-color:#a5d6a7!important}.md-green-200-bg{background-color:#a5d6a7!important;color:rgba(0,0,0,.87)}.green-200-fg{color:#a5d6a7!important}.green-200-border{border-color:#a5d6a7!important}.green-200-border-top{border-top-color:#a5d6a7!important}.green-200-border-right{border-right-color:#a5d6a7!important}.green-200-border-bottom{border-bottom-color:#a5d6a7!important}.green-200-border-left{border-left-color:#a5d6a7!important}.green-300-bg{background-color:#81c784!important}.md-green-300-bg{background-color:#81c784!important;color:rgba(0,0,0,.87)}.green-300-fg{color:#81c784!important}.green-300-border{border-color:#81c784!important}.green-300-border-top{border-top-color:#81c784!important}.green-300-border-right{border-right-color:#81c784!important}.green-300-border-bottom{border-bottom-color:#81c784!important}.green-300-border-left{border-left-color:#81c784!important}.green-400-bg{background-color:#66bb6a!important}.md-green-400-bg{background-color:#66bb6a!important;color:rgba(0,0,0,.87)}.green-400-fg{color:#66bb6a!important}.green-400-border{border-color:#66bb6a!important}.green-400-border-top{border-top-color:#66bb6a!important}.green-400-border-right{border-right-color:#66bb6a!important}.green-400-border-bottom{border-bottom-color:#66bb6a!important}.green-400-border-left{border-left-color:#66bb6a!important}.green-500-bg{background-color:#4caf50!important}.md-green-500-bg{background-color:#4caf50!important;color:rgba(0,0,0,.87)}.green-500-fg{color:#4caf50!important}.green-500-border{border-color:#4caf50!important}.green-500-border-top{border-top-color:#4caf50!important}.green-500-border-right{border-right-color:#4caf50!important}.green-500-border-bottom{border-bottom-color:#4caf50!important}.green-500-border-left{border-left-color:#4caf50!important}.md-green-bg{background-color:#4caf50!important;color:rgba(0,0,0,.87)}.green-bg{background-color:#4caf50!important}.green-fg{color:#4caf50!important}.green-border{border-color:#4caf50!important}.green-border-top{border-top-color:#4caf50!important}.green-border-right{border-right-color:#4caf50!important}.green-border-bottom{border-bottom-color:#4caf50!important}.green-border-left{border-left-color:#4caf50!important}.green-600-bg{background-color:#43a047!important}.md-green-600-bg{background-color:#43a047!important;color:#fff}.green-600-fg{color:#43a047!important}.green-600-border{border-color:#43a047!important}.green-600-border-top{border-top-color:#43a047!important}.green-600-border-right{border-right-color:#43a047!important}.green-600-border-bottom{border-bottom-color:#43a047!important}.green-600-border-left{border-left-color:#43a047!important}.green-700-bg{background-color:#388e3c!important}.md-green-700-bg{background-color:#388e3c!important;color:#fff}.green-700-fg{color:#388e3c!important}.green-700-border{border-color:#388e3c!important}.green-700-border-top{border-top-color:#388e3c!important}.green-700-border-right{border-right-color:#388e3c!important}.green-700-border-bottom{border-bottom-color:#388e3c!important}.green-700-border-left{border-left-color:#388e3c!important}.green-800-bg{background-color:#2e7d32!important}.md-green-800-bg{background-color:#2e7d32!important;color:rgba(255,255,255,.87)}.green-800-fg{color:#2e7d32!important}.green-800-border{border-color:#2e7d32!important}.green-800-border-top{border-top-color:#2e7d32!important}.green-800-border-right{border-right-color:#2e7d32!important}.green-800-border-bottom{border-bottom-color:#2e7d32!important}.green-800-border-left{border-left-color:#2e7d32!important}.green-900-bg{background-color:#1b5e20!important}.md-green-900-bg{background-color:#1b5e20!important;color:rgba(255,255,255,.87)}.green-900-fg{color:#1b5e20!important}.green-900-border{border-color:#1b5e20!important}.green-900-border-top{border-top-color:#1b5e20!important}.green-900-border-right{border-right-color:#1b5e20!important}.green-900-border-bottom{border-bottom-color:#1b5e20!important}.green-900-border-left{border-left-color:#1b5e20!important}.green-A100-bg{background-color:#b9f6ca!important}.md-green-A100-bg{background-color:#b9f6ca!important;color:rgba(0,0,0,.87)}.green-A100-fg{color:#b9f6ca!important}.green-A100-border{border-color:#b9f6ca!important}.green-A100-border-top{border-top-color:#b9f6ca!important}.green-A100-border-right{border-right-color:#b9f6ca!important}.green-A100-border-bottom{border-bottom-color:#b9f6ca!important}.green-A100-border-left{border-left-color:#b9f6ca!important}.green-A200-bg{background-color:#69f0ae!important}.md-green-A200-bg{background-color:#69f0ae!important;color:rgba(0,0,0,.87)}.green-A200-fg{color:#69f0ae!important}.green-A200-border{border-color:#69f0ae!important}.green-A200-border-top{border-top-color:#69f0ae!important}.green-A200-border-right{border-right-color:#69f0ae!important}.green-A200-border-bottom{border-bottom-color:#69f0ae!important}.green-A200-border-left{border-left-color:#69f0ae!important}.green-A400-bg{background-color:#00e676!important}.md-green-A400-bg{background-color:#00e676!important;color:rgba(0,0,0,.87)}.green-A400-fg{color:#00e676!important}.green-A400-border{border-color:#00e676!important}.green-A400-border-top{border-top-color:#00e676!important}.green-A400-border-right{border-right-color:#00e676!important}.green-A400-border-bottom{border-bottom-color:#00e676!important}.green-A400-border-left{border-left-color:#00e676!important}.green-A700-bg{background-color:#00c853!important}.md-green-A700-bg{background-color:#00c853!important;color:rgba(0,0,0,.87)}.green-A700-fg{color:#00c853!important}.green-A700-border{border-color:#00c853!important}.green-A700-border-top{border-top-color:#00c853!important}.green-A700-border-right{border-right-color:#00c853!important}.green-A700-border-bottom{border-bottom-color:#00c853!important}.green-A700-border-left{border-left-color:#00c853!important}.light-green-50-bg{background-color:#f1f8e9!important}.md-light-green-50-bg{background-color:#f1f8e9!important;color:rgba(0,0,0,.87)}.light-green-50-fg{color:#f1f8e9!important}.light-green-50-border{border-color:#f1f8e9!important}.light-green-50-border-top{border-top-color:#f1f8e9!important}.light-green-50-border-right{border-right-color:#f1f8e9!important}.light-green-50-border-bottom{border-bottom-color:#f1f8e9!important}.light-green-50-border-left{border-left-color:#f1f8e9!important}.light-green-100-bg{background-color:#dcedc8!important}.md-light-green-100-bg{background-color:#dcedc8!important;color:rgba(0,0,0,.87)}.light-green-100-fg{color:#dcedc8!important}.light-green-100-border{border-color:#dcedc8!important}.light-green-100-border-top{border-top-color:#dcedc8!important}.light-green-100-border-right{border-right-color:#dcedc8!important}.light-green-100-border-bottom{border-bottom-color:#dcedc8!important}.light-green-100-border-left{border-left-color:#dcedc8!important}.light-green-200-bg{background-color:#c5e1a5!important}.md-light-green-200-bg{background-color:#c5e1a5!important;color:rgba(0,0,0,.87)}.light-green-200-fg{color:#c5e1a5!important}.light-green-200-border{border-color:#c5e1a5!important}.light-green-200-border-top{border-top-color:#c5e1a5!important}.light-green-200-border-right{border-right-color:#c5e1a5!important}.light-green-200-border-bottom{border-bottom-color:#c5e1a5!important}.light-green-200-border-left{border-left-color:#c5e1a5!important}.light-green-300-bg{background-color:#aed581!important}.md-light-green-300-bg{background-color:#aed581!important;color:rgba(0,0,0,.87)}.light-green-300-fg{color:#aed581!important}.light-green-300-border{border-color:#aed581!important}.light-green-300-border-top{border-top-color:#aed581!important}.light-green-300-border-right{border-right-color:#aed581!important}.light-green-300-border-bottom{border-bottom-color:#aed581!important}.light-green-300-border-left{border-left-color:#aed581!important}.light-green-400-bg{background-color:#9ccc65!important}.md-light-green-400-bg{background-color:#9ccc65!important;color:rgba(0,0,0,.87)}.light-green-400-fg{color:#9ccc65!important}.light-green-400-border{border-color:#9ccc65!important}.light-green-400-border-top{border-top-color:#9ccc65!important}.light-green-400-border-right{border-right-color:#9ccc65!important}.light-green-400-border-bottom{border-bottom-color:#9ccc65!important}.light-green-400-border-left{border-left-color:#9ccc65!important}.light-green-500-bg{background-color:#8bc34a!important}.md-light-green-500-bg{background-color:#8bc34a!important;color:rgba(0,0,0,.87)}.light-green-500-fg{color:#8bc34a!important}.light-green-500-border{border-color:#8bc34a!important}.light-green-500-border-top{border-top-color:#8bc34a!important}.light-green-500-border-right{border-right-color:#8bc34a!important}.light-green-500-border-bottom{border-bottom-color:#8bc34a!important}.light-green-500-border-left{border-left-color:#8bc34a!important}.md-light-green-bg{background-color:#8bc34a!important;color:rgba(0,0,0,.87)}.light-green-bg{background-color:#8bc34a!important}.light-green-fg{color:#8bc34a!important}.light-green-border{border-color:#8bc34a!important}.light-green-border-top{border-top-color:#8bc34a!important}.light-green-border-right{border-right-color:#8bc34a!important}.light-green-border-bottom{border-bottom-color:#8bc34a!important}.light-green-border-left{border-left-color:#8bc34a!important}.light-green-600-bg{background-color:#7cb342!important}.md-light-green-600-bg{background-color:#7cb342!important;color:rgba(0,0,0,.87)}.light-green-600-fg{color:#7cb342!important}.light-green-600-border{border-color:#7cb342!important}.light-green-600-border-top{border-top-color:#7cb342!important}.light-green-600-border-right{border-right-color:#7cb342!important}.light-green-600-border-bottom{border-bottom-color:#7cb342!important}.light-green-600-border-left{border-left-color:#7cb342!important}.light-green-700-bg{background-color:#689f38!important}.md-light-green-700-bg{background-color:#689f38!important;color:#fff}.light-green-700-fg{color:#689f38!important}.light-green-700-border{border-color:#689f38!important}.light-green-700-border-top{border-top-color:#689f38!important}.light-green-700-border-right{border-right-color:#689f38!important}.light-green-700-border-bottom{border-bottom-color:#689f38!important}.light-green-700-border-left{border-left-color:#689f38!important}.light-green-800-bg{background-color:#558b2f!important}.md-light-green-800-bg{background-color:#558b2f!important;color:#fff}.light-green-800-fg{color:#558b2f!important}.light-green-800-border{border-color:#558b2f!important}.light-green-800-border-top{border-top-color:#558b2f!important}.light-green-800-border-right{border-right-color:#558b2f!important}.light-green-800-border-bottom{border-bottom-color:#558b2f!important}.light-green-800-border-left{border-left-color:#558b2f!important}.light-green-900-bg{background-color:#33691e!important}.md-light-green-900-bg{background-color:#33691e!important;color:#fff}.light-green-900-fg{color:#33691e!important}.light-green-900-border{border-color:#33691e!important}.light-green-900-border-top{border-top-color:#33691e!important}.light-green-900-border-right{border-right-color:#33691e!important}.light-green-900-border-bottom{border-bottom-color:#33691e!important}.light-green-900-border-left{border-left-color:#33691e!important}.light-green-A100-bg{background-color:#ccff90!important}.md-light-green-A100-bg{background-color:#ccff90!important;color:rgba(0,0,0,.87)}.light-green-A100-fg{color:#ccff90!important}.light-green-A100-border{border-color:#ccff90!important}.light-green-A100-border-top{border-top-color:#ccff90!important}.light-green-A100-border-right{border-right-color:#ccff90!important}.light-green-A100-border-bottom{border-bottom-color:#ccff90!important}.light-green-A100-border-left{border-left-color:#ccff90!important}.light-green-A200-bg{background-color:#b2ff59!important}.md-light-green-A200-bg{background-color:#b2ff59!important;color:rgba(0,0,0,.87)}.light-green-A200-fg{color:#b2ff59!important}.light-green-A200-border{border-color:#b2ff59!important}.light-green-A200-border-top{border-top-color:#b2ff59!important}.light-green-A200-border-right{border-right-color:#b2ff59!important}.light-green-A200-border-bottom{border-bottom-color:#b2ff59!important}.light-green-A200-border-left{border-left-color:#b2ff59!important}.light-green-A400-bg{background-color:#76ff03!important}.md-light-green-A400-bg{background-color:#76ff03!important;color:rgba(0,0,0,.87)}.light-green-A400-fg{color:#76ff03!important}.light-green-A400-border{border-color:#76ff03!important}.light-green-A400-border-top{border-top-color:#76ff03!important}.light-green-A400-border-right{border-right-color:#76ff03!important}.light-green-A400-border-bottom{border-bottom-color:#76ff03!important}.light-green-A400-border-left{border-left-color:#76ff03!important}.light-green-A700-bg{background-color:#64dd17!important}.md-light-green-A700-bg{background-color:#64dd17!important;color:rgba(0,0,0,.87)}.light-green-A700-fg{color:#64dd17!important}.light-green-A700-border{border-color:#64dd17!important}.light-green-A700-border-top{border-top-color:#64dd17!important}.light-green-A700-border-right{border-right-color:#64dd17!important}.light-green-A700-border-bottom{border-bottom-color:#64dd17!important}.light-green-A700-border-left{border-left-color:#64dd17!important}.lime-50-bg{background-color:#f9fbe7!important}.md-lime-50-bg{background-color:#f9fbe7!important;color:rgba(0,0,0,.87)}.lime-50-fg{color:#f9fbe7!important}.lime-50-border{border-color:#f9fbe7!important}.lime-50-border-top{border-top-color:#f9fbe7!important}.lime-50-border-right{border-right-color:#f9fbe7!important}.lime-50-border-bottom{border-bottom-color:#f9fbe7!important}.lime-50-border-left{border-left-color:#f9fbe7!important}.lime-100-bg{background-color:#f0f4c3!important}.md-lime-100-bg{background-color:#f0f4c3!important;color:rgba(0,0,0,.87)}.lime-100-fg{color:#f0f4c3!important}.lime-100-border{border-color:#f0f4c3!important}.lime-100-border-top{border-top-color:#f0f4c3!important}.lime-100-border-right{border-right-color:#f0f4c3!important}.lime-100-border-bottom{border-bottom-color:#f0f4c3!important}.lime-100-border-left{border-left-color:#f0f4c3!important}.lime-200-bg{background-color:#e6ee9c!important}.md-lime-200-bg{background-color:#e6ee9c!important;color:rgba(0,0,0,.87)}.lime-200-fg{color:#e6ee9c!important}.lime-200-border{border-color:#e6ee9c!important}.lime-200-border-top{border-top-color:#e6ee9c!important}.lime-200-border-right{border-right-color:#e6ee9c!important}.lime-200-border-bottom{border-bottom-color:#e6ee9c!important}.lime-200-border-left{border-left-color:#e6ee9c!important}.lime-300-bg{background-color:#dce775!important}.md-lime-300-bg{background-color:#dce775!important;color:rgba(0,0,0,.87)}.lime-300-fg{color:#dce775!important}.lime-300-border{border-color:#dce775!important}.lime-300-border-top{border-top-color:#dce775!important}.lime-300-border-right{border-right-color:#dce775!important}.lime-300-border-bottom{border-bottom-color:#dce775!important}.lime-300-border-left{border-left-color:#dce775!important}.lime-400-bg{background-color:#d4e157!important}.md-lime-400-bg{background-color:#d4e157!important;color:rgba(0,0,0,.87)}.lime-400-fg{color:#d4e157!important}.lime-400-border{border-color:#d4e157!important}.lime-400-border-top{border-top-color:#d4e157!important}.lime-400-border-right{border-right-color:#d4e157!important}.lime-400-border-bottom{border-bottom-color:#d4e157!important}.lime-400-border-left{border-left-color:#d4e157!important}.lime-500-bg{background-color:#cddc39!important}.md-lime-500-bg{background-color:#cddc39!important;color:rgba(0,0,0,.87)}.lime-500-fg{color:#cddc39!important}.lime-500-border{border-color:#cddc39!important}.lime-500-border-top{border-top-color:#cddc39!important}.lime-500-border-right{border-right-color:#cddc39!important}.lime-500-border-bottom{border-bottom-color:#cddc39!important}.lime-500-border-left{border-left-color:#cddc39!important}.md-lime-bg{background-color:#cddc39!important;color:rgba(0,0,0,.87)}.lime-bg{background-color:#cddc39!important}.lime-fg{color:#cddc39!important}.lime-border{border-color:#cddc39!important}.lime-border-top{border-top-color:#cddc39!important}.lime-border-right{border-right-color:#cddc39!important}.lime-border-bottom{border-bottom-color:#cddc39!important}.lime-border-left{border-left-color:#cddc39!important}.lime-600-bg{background-color:#c0ca33!important}.md-lime-600-bg{background-color:#c0ca33!important;color:rgba(0,0,0,.87)}.lime-600-fg{color:#c0ca33!important}.lime-600-border{border-color:#c0ca33!important}.lime-600-border-top{border-top-color:#c0ca33!important}.lime-600-border-right{border-right-color:#c0ca33!important}.lime-600-border-bottom{border-bottom-color:#c0ca33!important}.lime-600-border-left{border-left-color:#c0ca33!important}.lime-700-bg{background-color:#afb42b!important}.md-lime-700-bg{background-color:#afb42b!important;color:rgba(0,0,0,.87)}.lime-700-fg{color:#afb42b!important}.lime-700-border{border-color:#afb42b!important}.lime-700-border-top{border-top-color:#afb42b!important}.lime-700-border-right{border-right-color:#afb42b!important}.lime-700-border-bottom{border-bottom-color:#afb42b!important}.lime-700-border-left{border-left-color:#afb42b!important}.lime-800-bg{background-color:#9e9d24!important}.md-lime-800-bg{background-color:#9e9d24!important;color:rgba(0,0,0,.87)}.lime-800-fg{color:#9e9d24!important}.lime-800-border{border-color:#9e9d24!important}.lime-800-border-top{border-top-color:#9e9d24!important}.lime-800-border-right{border-right-color:#9e9d24!important}.lime-800-border-bottom{border-bottom-color:#9e9d24!important}.lime-800-border-left{border-left-color:#9e9d24!important}.lime-900-bg{background-color:#827717!important}.md-lime-900-bg{background-color:#827717!important;color:#fff}.lime-900-fg{color:#827717!important}.lime-900-border{border-color:#827717!important}.lime-900-border-top{border-top-color:#827717!important}.lime-900-border-right{border-right-color:#827717!important}.lime-900-border-bottom{border-bottom-color:#827717!important}.lime-900-border-left{border-left-color:#827717!important}.lime-A100-bg{background-color:#f4ff81!important}.md-lime-A100-bg{background-color:#f4ff81!important;color:rgba(0,0,0,.87)}.lime-A100-fg{color:#f4ff81!important}.lime-A100-border{border-color:#f4ff81!important}.lime-A100-border-top{border-top-color:#f4ff81!important}.lime-A100-border-right{border-right-color:#f4ff81!important}.lime-A100-border-bottom{border-bottom-color:#f4ff81!important}.lime-A100-border-left{border-left-color:#f4ff81!important}.lime-A200-bg{background-color:#eeff41!important}.md-lime-A200-bg{background-color:#eeff41!important;color:rgba(0,0,0,.87)}.lime-A200-fg{color:#eeff41!important}.lime-A200-border{border-color:#eeff41!important}.lime-A200-border-top{border-top-color:#eeff41!important}.lime-A200-border-right{border-right-color:#eeff41!important}.lime-A200-border-bottom{border-bottom-color:#eeff41!important}.lime-A200-border-left{border-left-color:#eeff41!important}.lime-A400-bg{background-color:#c6ff00!important}.md-lime-A400-bg{background-color:#c6ff00!important;color:rgba(0,0,0,.87)}.lime-A400-fg{color:#c6ff00!important}.lime-A400-border{border-color:#c6ff00!important}.lime-A400-border-top{border-top-color:#c6ff00!important}.lime-A400-border-right{border-right-color:#c6ff00!important}.lime-A400-border-bottom{border-bottom-color:#c6ff00!important}.lime-A400-border-left{border-left-color:#c6ff00!important}.lime-A700-bg{background-color:#aeea00!important}.md-lime-A700-bg{background-color:#aeea00!important;color:rgba(0,0,0,.87)}.lime-A700-fg{color:#aeea00!important}.lime-A700-border{border-color:#aeea00!important}.lime-A700-border-top{border-top-color:#aeea00!important}.lime-A700-border-right{border-right-color:#aeea00!important}.lime-A700-border-bottom{border-bottom-color:#aeea00!important}.lime-A700-border-left{border-left-color:#aeea00!important}.yellow-50-bg{background-color:#fffde7!important}.md-yellow-50-bg{background-color:#fffde7!important;color:rgba(0,0,0,.87)}.yellow-50-fg{color:#fffde7!important}.yellow-50-border{border-color:#fffde7!important}.yellow-50-border-top{border-top-color:#fffde7!important}.yellow-50-border-right{border-right-color:#fffde7!important}.yellow-50-border-bottom{border-bottom-color:#fffde7!important}.yellow-50-border-left{border-left-color:#fffde7!important}.yellow-100-bg{background-color:#fff9c4!important}.md-yellow-100-bg{background-color:#fff9c4!important;color:rgba(0,0,0,.87)}.yellow-100-fg{color:#fff9c4!important}.yellow-100-border{border-color:#fff9c4!important}.yellow-100-border-top{border-top-color:#fff9c4!important}.yellow-100-border-right{border-right-color:#fff9c4!important}.yellow-100-border-bottom{border-bottom-color:#fff9c4!important}.yellow-100-border-left{border-left-color:#fff9c4!important}.yellow-200-bg{background-color:#fff59d!important}.md-yellow-200-bg{background-color:#fff59d!important;color:rgba(0,0,0,.87)}.yellow-200-fg{color:#fff59d!important}.yellow-200-border{border-color:#fff59d!important}.yellow-200-border-top{border-top-color:#fff59d!important}.yellow-200-border-right{border-right-color:#fff59d!important}.yellow-200-border-bottom{border-bottom-color:#fff59d!important}.yellow-200-border-left{border-left-color:#fff59d!important}.yellow-300-bg{background-color:#fff176!important}.md-yellow-300-bg{background-color:#fff176!important;color:rgba(0,0,0,.87)}.yellow-300-fg{color:#fff176!important}.yellow-300-border{border-color:#fff176!important}.yellow-300-border-top{border-top-color:#fff176!important}.yellow-300-border-right{border-right-color:#fff176!important}.yellow-300-border-bottom{border-bottom-color:#fff176!important}.yellow-300-border-left{border-left-color:#fff176!important}.yellow-400-bg{background-color:#ffee58!important}.md-yellow-400-bg{background-color:#ffee58!important;color:rgba(0,0,0,.87)}.yellow-400-fg{color:#ffee58!important}.yellow-400-border{border-color:#ffee58!important}.yellow-400-border-top{border-top-color:#ffee58!important}.yellow-400-border-right{border-right-color:#ffee58!important}.yellow-400-border-bottom{border-bottom-color:#ffee58!important}.yellow-400-border-left{border-left-color:#ffee58!important}.yellow-500-bg{background-color:#ffeb3b!important}.md-yellow-500-bg{background-color:#ffeb3b!important;color:rgba(0,0,0,.87)}.yellow-500-fg{color:#ffeb3b!important}.yellow-500-border{border-color:#ffeb3b!important}.yellow-500-border-top{border-top-color:#ffeb3b!important}.yellow-500-border-right{border-right-color:#ffeb3b!important}.yellow-500-border-bottom{border-bottom-color:#ffeb3b!important}.yellow-500-border-left{border-left-color:#ffeb3b!important}.md-yellow-bg{background-color:#ffeb3b!important;color:rgba(0,0,0,.87)}.yellow-bg{background-color:#ffeb3b!important}.yellow-fg{color:#ffeb3b!important}.yellow-border{border-color:#ffeb3b!important}.yellow-border-top{border-top-color:#ffeb3b!important}.yellow-border-right{border-right-color:#ffeb3b!important}.yellow-border-bottom{border-bottom-color:#ffeb3b!important}.yellow-border-left{border-left-color:#ffeb3b!important}.yellow-600-bg{background-color:#fdd835!important}.md-yellow-600-bg{background-color:#fdd835!important;color:rgba(0,0,0,.87)}.yellow-600-fg{color:#fdd835!important}.yellow-600-border{border-color:#fdd835!important}.yellow-600-border-top{border-top-color:#fdd835!important}.yellow-600-border-right{border-right-color:#fdd835!important}.yellow-600-border-bottom{border-bottom-color:#fdd835!important}.yellow-600-border-left{border-left-color:#fdd835!important}.yellow-700-bg{background-color:#fbc02d!important}.md-yellow-700-bg{background-color:#fbc02d!important;color:rgba(0,0,0,.87)}.yellow-700-fg{color:#fbc02d!important}.yellow-700-border{border-color:#fbc02d!important}.yellow-700-border-top{border-top-color:#fbc02d!important}.yellow-700-border-right{border-right-color:#fbc02d!important}.yellow-700-border-bottom{border-bottom-color:#fbc02d!important}.yellow-700-border-left{border-left-color:#fbc02d!important}.yellow-800-bg{background-color:#f9a825!important}.md-yellow-800-bg{background-color:#f9a825!important;color:rgba(0,0,0,.87)}.yellow-800-fg{color:#f9a825!important}.yellow-800-border{border-color:#f9a825!important}.yellow-800-border-top{border-top-color:#f9a825!important}.yellow-800-border-right{border-right-color:#f9a825!important}.yellow-800-border-bottom{border-bottom-color:#f9a825!important}.yellow-800-border-left{border-left-color:#f9a825!important}.yellow-900-bg{background-color:#f57f17!important}.md-yellow-900-bg{background-color:#f57f17!important;color:rgba(0,0,0,.87)}.yellow-900-fg{color:#f57f17!important}.yellow-900-border{border-color:#f57f17!important}.yellow-900-border-top{border-top-color:#f57f17!important}.yellow-900-border-right{border-right-color:#f57f17!important}.yellow-900-border-bottom{border-bottom-color:#f57f17!important}.yellow-900-border-left{border-left-color:#f57f17!important}.yellow-A100-bg{background-color:#ffff8d!important}.md-yellow-A100-bg{background-color:#ffff8d!important;color:rgba(0,0,0,.87)}.yellow-A100-fg{color:#ffff8d!important}.yellow-A100-border{border-color:#ffff8d!important}.yellow-A100-border-top{border-top-color:#ffff8d!important}.yellow-A100-border-right{border-right-color:#ffff8d!important}.yellow-A100-border-bottom{border-bottom-color:#ffff8d!important}.yellow-A100-border-left{border-left-color:#ffff8d!important}.yellow-A200-bg{background-color:#ff0!important}.md-yellow-A200-bg{background-color:#ff0!important;color:rgba(0,0,0,.87)}.yellow-A200-fg{color:#ff0!important}.yellow-A200-border{border-color:#ff0!important}.yellow-A200-border-top{border-top-color:#ff0!important}.yellow-A200-border-right{border-right-color:#ff0!important}.yellow-A200-border-bottom{border-bottom-color:#ff0!important}.yellow-A200-border-left{border-left-color:#ff0!important}.yellow-A400-bg{background-color:#ffea00!important}.md-yellow-A400-bg{background-color:#ffea00!important;color:rgba(0,0,0,.87)}.yellow-A400-fg{color:#ffea00!important}.yellow-A400-border{border-color:#ffea00!important}.yellow-A400-border-top{border-top-color:#ffea00!important}.yellow-A400-border-right{border-right-color:#ffea00!important}.yellow-A400-border-bottom{border-bottom-color:#ffea00!important}.yellow-A400-border-left{border-left-color:#ffea00!important}.yellow-A700-bg{background-color:#ffd600!important}.md-yellow-A700-bg{background-color:#ffd600!important;color:rgba(0,0,0,.87)}.yellow-A700-fg{color:#ffd600!important}.yellow-A700-border{border-color:#ffd600!important}.yellow-A700-border-top{border-top-color:#ffd600!important}.yellow-A700-border-right{border-right-color:#ffd600!important}.yellow-A700-border-bottom{border-bottom-color:#ffd600!important}.yellow-A700-border-left{border-left-color:#ffd600!important}.amber-50-bg{background-color:#fff8e1!important}.md-amber-50-bg{background-color:#fff8e1!important;color:rgba(0,0,0,.87)}.amber-50-fg{color:#fff8e1!important}.amber-50-border{border-color:#fff8e1!important}.amber-50-border-top{border-top-color:#fff8e1!important}.amber-50-border-right{border-right-color:#fff8e1!important}.amber-50-border-bottom{border-bottom-color:#fff8e1!important}.amber-50-border-left{border-left-color:#fff8e1!important}.amber-100-bg{background-color:#ffecb3!important}.md-amber-100-bg{background-color:#ffecb3!important;color:rgba(0,0,0,.87)}.amber-100-fg{color:#ffecb3!important}.amber-100-border{border-color:#ffecb3!important}.amber-100-border-top{border-top-color:#ffecb3!important}.amber-100-border-right{border-right-color:#ffecb3!important}.amber-100-border-bottom{border-bottom-color:#ffecb3!important}.amber-100-border-left{border-left-color:#ffecb3!important}.amber-200-bg{background-color:#ffe082!important}.md-amber-200-bg{background-color:#ffe082!important;color:rgba(0,0,0,.87)}.amber-200-fg{color:#ffe082!important}.amber-200-border{border-color:#ffe082!important}.amber-200-border-top{border-top-color:#ffe082!important}.amber-200-border-right{border-right-color:#ffe082!important}.amber-200-border-bottom{border-bottom-color:#ffe082!important}.amber-200-border-left{border-left-color:#ffe082!important}.amber-300-bg{background-color:#ffd54f!important}.md-amber-300-bg{background-color:#ffd54f!important;color:rgba(0,0,0,.87)}.amber-300-fg{color:#ffd54f!important}.amber-300-border{border-color:#ffd54f!important}.amber-300-border-top{border-top-color:#ffd54f!important}.amber-300-border-right{border-right-color:#ffd54f!important}.amber-300-border-bottom{border-bottom-color:#ffd54f!important}.amber-300-border-left{border-left-color:#ffd54f!important}.amber-400-bg{background-color:#ffca28!important}.md-amber-400-bg{background-color:#ffca28!important;color:rgba(0,0,0,.87)}.amber-400-fg{color:#ffca28!important}.amber-400-border{border-color:#ffca28!important}.amber-400-border-top{border-top-color:#ffca28!important}.amber-400-border-right{border-right-color:#ffca28!important}.amber-400-border-bottom{border-bottom-color:#ffca28!important}.amber-400-border-left{border-left-color:#ffca28!important}.amber-500-bg{background-color:#ffc107!important}.md-amber-500-bg{background-color:#ffc107!important;color:rgba(0,0,0,.87)}.amber-500-fg{color:#ffc107!important}.amber-500-border{border-color:#ffc107!important}.amber-500-border-top{border-top-color:#ffc107!important}.amber-500-border-right{border-right-color:#ffc107!important}.amber-500-border-bottom{border-bottom-color:#ffc107!important}.amber-500-border-left{border-left-color:#ffc107!important}.md-amber-bg{background-color:#ffc107!important;color:rgba(0,0,0,.87)}.amber-bg{background-color:#ffc107!important}.amber-fg{color:#ffc107!important}.amber-border{border-color:#ffc107!important}.amber-border-top{border-top-color:#ffc107!important}.amber-border-right{border-right-color:#ffc107!important}.amber-border-bottom{border-bottom-color:#ffc107!important}.amber-border-left{border-left-color:#ffc107!important}.amber-600-bg{background-color:#ffb300!important}.md-amber-600-bg{background-color:#ffb300!important;color:rgba(0,0,0,.87)}.amber-600-fg{color:#ffb300!important}.amber-600-border{border-color:#ffb300!important}.amber-600-border-top{border-top-color:#ffb300!important}.amber-600-border-right{border-right-color:#ffb300!important}.amber-600-border-bottom{border-bottom-color:#ffb300!important}.amber-600-border-left{border-left-color:#ffb300!important}.amber-700-bg{background-color:#ffa000!important}.md-amber-700-bg{background-color:#ffa000!important;color:rgba(0,0,0,.87)}.amber-700-fg{color:#ffa000!important}.amber-700-border{border-color:#ffa000!important}.amber-700-border-top{border-top-color:#ffa000!important}.amber-700-border-right{border-right-color:#ffa000!important}.amber-700-border-bottom{border-bottom-color:#ffa000!important}.amber-700-border-left{border-left-color:#ffa000!important}.amber-800-bg{background-color:#ff8f00!important}.md-amber-800-bg{background-color:#ff8f00!important;color:rgba(0,0,0,.87)}.amber-800-fg{color:#ff8f00!important}.amber-800-border{border-color:#ff8f00!important}.amber-800-border-top{border-top-color:#ff8f00!important}.amber-800-border-right{border-right-color:#ff8f00!important}.amber-800-border-bottom{border-bottom-color:#ff8f00!important}.amber-800-border-left{border-left-color:#ff8f00!important}.amber-900-bg{background-color:#ff6f00!important}.md-amber-900-bg{background-color:#ff6f00!important;color:rgba(0,0,0,.87)}.amber-900-fg{color:#ff6f00!important}.amber-900-border{border-color:#ff6f00!important}.amber-900-border-top{border-top-color:#ff6f00!important}.amber-900-border-right{border-right-color:#ff6f00!important}.amber-900-border-bottom{border-bottom-color:#ff6f00!important}.amber-900-border-left{border-left-color:#ff6f00!important}.amber-A100-bg{background-color:#ffe57f!important}.md-amber-A100-bg{background-color:#ffe57f!important;color:rgba(0,0,0,.87)}.amber-A100-fg{color:#ffe57f!important}.amber-A100-border{border-color:#ffe57f!important}.amber-A100-border-top{border-top-color:#ffe57f!important}.amber-A100-border-right{border-right-color:#ffe57f!important}.amber-A100-border-bottom{border-bottom-color:#ffe57f!important}.amber-A100-border-left{border-left-color:#ffe57f!important}.amber-A200-bg{background-color:#ffd740!important}.md-amber-A200-bg{background-color:#ffd740!important;color:rgba(0,0,0,.87)}.amber-A200-fg{color:#ffd740!important}.amber-A200-border{border-color:#ffd740!important}.amber-A200-border-top{border-top-color:#ffd740!important}.amber-A200-border-right{border-right-color:#ffd740!important}.amber-A200-border-bottom{border-bottom-color:#ffd740!important}.amber-A200-border-left{border-left-color:#ffd740!important}.amber-A400-bg{background-color:#ffc400!important}.md-amber-A400-bg{background-color:#ffc400!important;color:rgba(0,0,0,.87)}.amber-A400-fg{color:#ffc400!important}.amber-A400-border{border-color:#ffc400!important}.amber-A400-border-top{border-top-color:#ffc400!important}.amber-A400-border-right{border-right-color:#ffc400!important}.amber-A400-border-bottom{border-bottom-color:#ffc400!important}.amber-A400-border-left{border-left-color:#ffc400!important}.amber-A700-bg{background-color:#ffab00!important}.md-amber-A700-bg{background-color:#ffab00!important;color:rgba(0,0,0,.87)}.amber-A700-fg{color:#ffab00!important}.amber-A700-border{border-color:#ffab00!important}.amber-A700-border-top{border-top-color:#ffab00!important}.amber-A700-border-right{border-right-color:#ffab00!important}.amber-A700-border-bottom{border-bottom-color:#ffab00!important}.amber-A700-border-left{border-left-color:#ffab00!important}.orange-50-bg{background-color:#fff3e0!important}.md-orange-50-bg{background-color:#fff3e0!important;color:rgba(0,0,0,.87)}.orange-50-fg{color:#fff3e0!important}.orange-50-border{border-color:#fff3e0!important}.orange-50-border-top{border-top-color:#fff3e0!important}.orange-50-border-right{border-right-color:#fff3e0!important}.orange-50-border-bottom{border-bottom-color:#fff3e0!important}.orange-50-border-left{border-left-color:#fff3e0!important}.orange-100-bg{background-color:#ffe0b2!important}.md-orange-100-bg{background-color:#ffe0b2!important;color:rgba(0,0,0,.87)}.orange-100-fg{color:#ffe0b2!important}.orange-100-border{border-color:#ffe0b2!important}.orange-100-border-top{border-top-color:#ffe0b2!important}.orange-100-border-right{border-right-color:#ffe0b2!important}.orange-100-border-bottom{border-bottom-color:#ffe0b2!important}.orange-100-border-left{border-left-color:#ffe0b2!important}.orange-200-bg{background-color:#ffcc80!important}.md-orange-200-bg{background-color:#ffcc80!important;color:rgba(0,0,0,.87)}.orange-200-fg{color:#ffcc80!important}.orange-200-border{border-color:#ffcc80!important}.orange-200-border-top{border-top-color:#ffcc80!important}.orange-200-border-right{border-right-color:#ffcc80!important}.orange-200-border-bottom{border-bottom-color:#ffcc80!important}.orange-200-border-left{border-left-color:#ffcc80!important}.orange-300-bg{background-color:#ffb74d!important}.md-orange-300-bg{background-color:#ffb74d!important;color:rgba(0,0,0,.87)}.orange-300-fg{color:#ffb74d!important}.orange-300-border{border-color:#ffb74d!important}.orange-300-border-top{border-top-color:#ffb74d!important}.orange-300-border-right{border-right-color:#ffb74d!important}.orange-300-border-bottom{border-bottom-color:#ffb74d!important}.orange-300-border-left{border-left-color:#ffb74d!important}.orange-400-bg{background-color:#ffa726!important}.md-orange-400-bg{background-color:#ffa726!important;color:rgba(0,0,0,.87)}.orange-400-fg{color:#ffa726!important}.orange-400-border{border-color:#ffa726!important}.orange-400-border-top{border-top-color:#ffa726!important}.orange-400-border-right{border-right-color:#ffa726!important}.orange-400-border-bottom{border-bottom-color:#ffa726!important}.orange-400-border-left{border-left-color:#ffa726!important}.orange-500-bg{background-color:#ff9800!important}.md-orange-500-bg{background-color:#ff9800!important;color:rgba(0,0,0,.87)}.orange-500-fg{color:#ff9800!important}.orange-500-border{border-color:#ff9800!important}.orange-500-border-top{border-top-color:#ff9800!important}.orange-500-border-right{border-right-color:#ff9800!important}.orange-500-border-bottom{border-bottom-color:#ff9800!important}.orange-500-border-left{border-left-color:#ff9800!important}.md-orange-bg{background-color:#ff9800!important;color:rgba(0,0,0,.87)}.orange-bg{background-color:#ff9800!important}.orange-fg{color:#ff9800!important}.orange-border{border-color:#ff9800!important}.orange-border-top{border-top-color:#ff9800!important}.orange-border-right{border-right-color:#ff9800!important}.orange-border-bottom{border-bottom-color:#ff9800!important}.orange-border-left{border-left-color:#ff9800!important}.orange-600-bg{background-color:#fb8c00!important}.md-orange-600-bg{background-color:#fb8c00!important;color:rgba(0,0,0,.87)}.orange-600-fg{color:#fb8c00!important}.orange-600-border{border-color:#fb8c00!important}.orange-600-border-top{border-top-color:#fb8c00!important}.orange-600-border-right{border-right-color:#fb8c00!important}.orange-600-border-bottom{border-bottom-color:#fb8c00!important}.orange-600-border-left{border-left-color:#fb8c00!important}.orange-700-bg{background-color:#f57c00!important}.md-orange-700-bg{background-color:#f57c00!important;color:rgba(0,0,0,.87)}.orange-700-fg{color:#f57c00!important}.orange-700-border{border-color:#f57c00!important}.orange-700-border-top{border-top-color:#f57c00!important}.orange-700-border-right{border-right-color:#f57c00!important}.orange-700-border-bottom{border-bottom-color:#f57c00!important}.orange-700-border-left{border-left-color:#f57c00!important}.orange-800-bg{background-color:#ef6c00!important}.md-orange-800-bg{background-color:#ef6c00!important;color:#fff}.orange-800-fg{color:#ef6c00!important}.orange-800-border{border-color:#ef6c00!important}.orange-800-border-top{border-top-color:#ef6c00!important}.orange-800-border-right{border-right-color:#ef6c00!important}.orange-800-border-bottom{border-bottom-color:#ef6c00!important}.orange-800-border-left{border-left-color:#ef6c00!important}.orange-900-bg{background-color:#e65100!important}.md-orange-900-bg{background-color:#e65100!important;color:#fff}.orange-900-fg{color:#e65100!important}.orange-900-border{border-color:#e65100!important}.orange-900-border-top{border-top-color:#e65100!important}.orange-900-border-right{border-right-color:#e65100!important}.orange-900-border-bottom{border-bottom-color:#e65100!important}.orange-900-border-left{border-left-color:#e65100!important}.orange-A100-bg{background-color:#ffd180!important}.md-orange-A100-bg{background-color:#ffd180!important;color:rgba(0,0,0,.87)}.orange-A100-fg{color:#ffd180!important}.orange-A100-border{border-color:#ffd180!important}.orange-A100-border-top{border-top-color:#ffd180!important}.orange-A100-border-right{border-right-color:#ffd180!important}.orange-A100-border-bottom{border-bottom-color:#ffd180!important}.orange-A100-border-left{border-left-color:#ffd180!important}.orange-A200-bg{background-color:#ffab40!important}.md-orange-A200-bg{background-color:#ffab40!important;color:rgba(0,0,0,.87)}.orange-A200-fg{color:#ffab40!important}.orange-A200-border{border-color:#ffab40!important}.orange-A200-border-top{border-top-color:#ffab40!important}.orange-A200-border-right{border-right-color:#ffab40!important}.orange-A200-border-bottom{border-bottom-color:#ffab40!important}.orange-A200-border-left{border-left-color:#ffab40!important}.orange-A400-bg{background-color:#ff9100!important}.md-orange-A400-bg{background-color:#ff9100!important;color:rgba(0,0,0,.87)}.orange-A400-fg{color:#ff9100!important}.orange-A400-border{border-color:#ff9100!important}.orange-A400-border-top{border-top-color:#ff9100!important}.orange-A400-border-right{border-right-color:#ff9100!important}.orange-A400-border-bottom{border-bottom-color:#ff9100!important}.orange-A400-border-left{border-left-color:#ff9100!important}.orange-A700-bg{background-color:#ff6d00!important}.md-orange-A700-bg{background-color:#ff6d00!important;color:rgba(0,0,0,.87)}.orange-A700-fg{color:#ff6d00!important}.orange-A700-border{border-color:#ff6d00!important}.orange-A700-border-top{border-top-color:#ff6d00!important}.orange-A700-border-right{border-right-color:#ff6d00!important}.orange-A700-border-bottom{border-bottom-color:#ff6d00!important}.orange-A700-border-left{border-left-color:#ff6d00!important}.deep-orange-50-bg{background-color:#fbe9e7!important}.md-deep-orange-50-bg{background-color:#fbe9e7!important;color:rgba(0,0,0,.87)}.deep-orange-50-fg{color:#fbe9e7!important}.deep-orange-50-border{border-color:#fbe9e7!important}.deep-orange-50-border-top{border-top-color:#fbe9e7!important}.deep-orange-50-border-right{border-right-color:#fbe9e7!important}.deep-orange-50-border-bottom{border-bottom-color:#fbe9e7!important}.deep-orange-50-border-left{border-left-color:#fbe9e7!important}.deep-orange-100-bg{background-color:#ffccbc!important}.md-deep-orange-100-bg{background-color:#ffccbc!important;color:rgba(0,0,0,.87)}.deep-orange-100-fg{color:#ffccbc!important}.deep-orange-100-border{border-color:#ffccbc!important}.deep-orange-100-border-top{border-top-color:#ffccbc!important}.deep-orange-100-border-right{border-right-color:#ffccbc!important}.deep-orange-100-border-bottom{border-bottom-color:#ffccbc!important}.deep-orange-100-border-left{border-left-color:#ffccbc!important}.deep-orange-200-bg{background-color:#ffab91!important}.md-deep-orange-200-bg{background-color:#ffab91!important;color:rgba(0,0,0,.87)}.deep-orange-200-fg{color:#ffab91!important}.deep-orange-200-border{border-color:#ffab91!important}.deep-orange-200-border-top{border-top-color:#ffab91!important}.deep-orange-200-border-right{border-right-color:#ffab91!important}.deep-orange-200-border-bottom{border-bottom-color:#ffab91!important}.deep-orange-200-border-left{border-left-color:#ffab91!important}.deep-orange-300-bg{background-color:#ff8a65!important}.md-deep-orange-300-bg{background-color:#ff8a65!important;color:rgba(0,0,0,.87)}.deep-orange-300-fg{color:#ff8a65!important}.deep-orange-300-border{border-color:#ff8a65!important}.deep-orange-300-border-top{border-top-color:#ff8a65!important}.deep-orange-300-border-right{border-right-color:#ff8a65!important}.deep-orange-300-border-bottom{border-bottom-color:#ff8a65!important}.deep-orange-300-border-left{border-left-color:#ff8a65!important}.deep-orange-400-bg{background-color:#ff7043!important}.md-deep-orange-400-bg{background-color:#ff7043!important;color:rgba(0,0,0,.87)}.deep-orange-400-fg{color:#ff7043!important}.deep-orange-400-border{border-color:#ff7043!important}.deep-orange-400-border-top{border-top-color:#ff7043!important}.deep-orange-400-border-right{border-right-color:#ff7043!important}.deep-orange-400-border-bottom{border-bottom-color:#ff7043!important}.deep-orange-400-border-left{border-left-color:#ff7043!important}.deep-orange-500-bg{background-color:#ff5722!important}.md-deep-orange-500-bg{background-color:#ff5722!important;color:#fff}.deep-orange-500-fg{color:#ff5722!important}.deep-orange-500-border{border-color:#ff5722!important}.deep-orange-500-border-top{border-top-color:#ff5722!important}.deep-orange-500-border-right{border-right-color:#ff5722!important}.deep-orange-500-border-bottom{border-bottom-color:#ff5722!important}.deep-orange-500-border-left{border-left-color:#ff5722!important}.md-deep-orange-bg{background-color:#ff5722!important;color:#fff}.deep-orange-bg{background-color:#ff5722!important}.deep-orange-fg{color:#ff5722!important}.deep-orange-border{border-color:#ff5722!important}.deep-orange-border-top{border-top-color:#ff5722!important}.deep-orange-border-right{border-right-color:#ff5722!important}.deep-orange-border-bottom{border-bottom-color:#ff5722!important}.deep-orange-border-left{border-left-color:#ff5722!important}.deep-orange-600-bg{background-color:#f4511e!important}.md-deep-orange-600-bg{background-color:#f4511e!important;color:#fff}.deep-orange-600-fg{color:#f4511e!important}.deep-orange-600-border{border-color:#f4511e!important}.deep-orange-600-border-top{border-top-color:#f4511e!important}.deep-orange-600-border-right{border-right-color:#f4511e!important}.deep-orange-600-border-bottom{border-bottom-color:#f4511e!important}.deep-orange-600-border-left{border-left-color:#f4511e!important}.deep-orange-700-bg{background-color:#e64a19!important}.md-deep-orange-700-bg{background-color:#e64a19!important;color:#fff}.deep-orange-700-fg{color:#e64a19!important}.deep-orange-700-border{border-color:#e64a19!important}.deep-orange-700-border-top{border-top-color:#e64a19!important}.deep-orange-700-border-right{border-right-color:#e64a19!important}.deep-orange-700-border-bottom{border-bottom-color:#e64a19!important}.deep-orange-700-border-left{border-left-color:#e64a19!important}.deep-orange-800-bg{background-color:#d84315!important}.md-deep-orange-800-bg{background-color:#d84315!important;color:#fff}.deep-orange-800-fg{color:#d84315!important}.deep-orange-800-border{border-color:#d84315!important}.deep-orange-800-border-top{border-top-color:#d84315!important}.deep-orange-800-border-right{border-right-color:#d84315!important}.deep-orange-800-border-bottom{border-bottom-color:#d84315!important}.deep-orange-800-border-left{border-left-color:#d84315!important}.deep-orange-900-bg{background-color:#bf360c!important}.md-deep-orange-900-bg{background-color:#bf360c!important;color:#fff}.deep-orange-900-fg{color:#bf360c!important}.deep-orange-900-border{border-color:#bf360c!important}.deep-orange-900-border-top{border-top-color:#bf360c!important}.deep-orange-900-border-right{border-right-color:#bf360c!important}.deep-orange-900-border-bottom{border-bottom-color:#bf360c!important}.deep-orange-900-border-left{border-left-color:#bf360c!important}.deep-orange-A100-bg{background-color:#ff9e80!important}.md-deep-orange-A100-bg{background-color:#ff9e80!important;color:rgba(0,0,0,.87)}.deep-orange-A100-fg{color:#ff9e80!important}.deep-orange-A100-border{border-color:#ff9e80!important}.deep-orange-A100-border-top{border-top-color:#ff9e80!important}.deep-orange-A100-border-right{border-right-color:#ff9e80!important}.deep-orange-A100-border-bottom{border-bottom-color:#ff9e80!important}.deep-orange-A100-border-left{border-left-color:#ff9e80!important}.deep-orange-A200-bg{background-color:#ff6e40!important}.md-deep-orange-A200-bg{background-color:#ff6e40!important;color:rgba(0,0,0,.87)}.deep-orange-A200-fg{color:#ff6e40!important}.deep-orange-A200-border{border-color:#ff6e40!important}.deep-orange-A200-border-top{border-top-color:#ff6e40!important}.deep-orange-A200-border-right{border-right-color:#ff6e40!important}.deep-orange-A200-border-bottom{border-bottom-color:#ff6e40!important}.deep-orange-A200-border-left{border-left-color:#ff6e40!important}.deep-orange-A400-bg{background-color:#ff3d00!important}.md-deep-orange-A400-bg{background-color:#ff3d00!important;color:#fff}.deep-orange-A400-fg{color:#ff3d00!important}.deep-orange-A400-border{border-color:#ff3d00!important}.deep-orange-A400-border-top{border-top-color:#ff3d00!important}.deep-orange-A400-border-right{border-right-color:#ff3d00!important}.deep-orange-A400-border-bottom{border-bottom-color:#ff3d00!important}.deep-orange-A400-border-left{border-left-color:#ff3d00!important}.deep-orange-A700-bg{background-color:#dd2c00!important}.md-deep-orange-A700-bg{background-color:#dd2c00!important;color:#fff}.deep-orange-A700-fg{color:#dd2c00!important}.deep-orange-A700-border{border-color:#dd2c00!important}.deep-orange-A700-border-top{border-top-color:#dd2c00!important}.deep-orange-A700-border-right{border-right-color:#dd2c00!important}.deep-orange-A700-border-bottom{border-bottom-color:#dd2c00!important}.deep-orange-A700-border-left{border-left-color:#dd2c00!important}.brown-50-bg{background-color:#efebe9!important}.md-brown-50-bg{background-color:#efebe9!important;color:rgba(0,0,0,.87)}.brown-50-fg{color:#efebe9!important}.brown-50-border{border-color:#efebe9!important}.brown-50-border-top{border-top-color:#efebe9!important}.brown-50-border-right{border-right-color:#efebe9!important}.brown-50-border-bottom{border-bottom-color:#efebe9!important}.brown-50-border-left{border-left-color:#efebe9!important}.brown-100-bg{background-color:#d7ccc8!important}.md-brown-100-bg{background-color:#d7ccc8!important;color:rgba(0,0,0,.87)}.brown-100-fg{color:#d7ccc8!important}.brown-100-border{border-color:#d7ccc8!important}.brown-100-border-top{border-top-color:#d7ccc8!important}.brown-100-border-right{border-right-color:#d7ccc8!important}.brown-100-border-bottom{border-bottom-color:#d7ccc8!important}.brown-100-border-left{border-left-color:#d7ccc8!important}.brown-200-bg{background-color:#bcaaa4!important}.md-brown-200-bg{background-color:#bcaaa4!important;color:rgba(0,0,0,.87)}.brown-200-fg{color:#bcaaa4!important}.brown-200-border{border-color:#bcaaa4!important}.brown-200-border-top{border-top-color:#bcaaa4!important}.brown-200-border-right{border-right-color:#bcaaa4!important}.brown-200-border-bottom{border-bottom-color:#bcaaa4!important}.brown-200-border-left{border-left-color:#bcaaa4!important}.brown-300-bg{background-color:#a1887f!important}.md-brown-300-bg{background-color:#a1887f!important;color:#fff}.brown-300-fg{color:#a1887f!important}.brown-300-border{border-color:#a1887f!important}.brown-300-border-top{border-top-color:#a1887f!important}.brown-300-border-right{border-right-color:#a1887f!important}.brown-300-border-bottom{border-bottom-color:#a1887f!important}.brown-300-border-left{border-left-color:#a1887f!important}.brown-400-bg{background-color:#8d6e63!important}.md-brown-400-bg{background-color:#8d6e63!important;color:#fff}.brown-400-fg{color:#8d6e63!important}.brown-400-border{border-color:#8d6e63!important}.brown-400-border-top{border-top-color:#8d6e63!important}.brown-400-border-right{border-right-color:#8d6e63!important}.brown-400-border-bottom{border-bottom-color:#8d6e63!important}.brown-400-border-left{border-left-color:#8d6e63!important}.brown-500-bg{background-color:#795548!important}.md-brown-500-bg{background-color:#795548!important;color:rgba(255,255,255,.87)}.brown-500-fg{color:#795548!important}.brown-500-border{border-color:#795548!important}.brown-500-border-top{border-top-color:#795548!important}.brown-500-border-right{border-right-color:#795548!important}.brown-500-border-bottom{border-bottom-color:#795548!important}.brown-500-border-left{border-left-color:#795548!important}.md-brown-bg{background-color:#795548!important;color:rgba(255,255,255,.87)}.brown-bg{background-color:#795548!important}.brown-fg{color:#795548!important}.brown-border{border-color:#795548!important}.brown-border-top{border-top-color:#795548!important}.brown-border-right{border-right-color:#795548!important}.brown-border-bottom{border-bottom-color:#795548!important}.brown-border-left{border-left-color:#795548!important}.brown-600-bg{background-color:#6d4c41!important}.md-brown-600-bg{background-color:#6d4c41!important;color:rgba(255,255,255,.87)}.brown-600-fg{color:#6d4c41!important}.brown-600-border{border-color:#6d4c41!important}.brown-600-border-top{border-top-color:#6d4c41!important}.brown-600-border-right{border-right-color:#6d4c41!important}.brown-600-border-bottom{border-bottom-color:#6d4c41!important}.brown-600-border-left{border-left-color:#6d4c41!important}.brown-700-bg{background-color:#5d4037!important}.md-brown-700-bg{background-color:#5d4037!important;color:rgba(255,255,255,.87)}.brown-700-fg{color:#5d4037!important}.brown-700-border{border-color:#5d4037!important}.brown-700-border-top{border-top-color:#5d4037!important}.brown-700-border-right{border-right-color:#5d4037!important}.brown-700-border-bottom{border-bottom-color:#5d4037!important}.brown-700-border-left{border-left-color:#5d4037!important}.brown-800-bg{background-color:#4e342e!important}.md-brown-800-bg{background-color:#4e342e!important;color:rgba(255,255,255,.87)}.brown-800-fg{color:#4e342e!important}.brown-800-border{border-color:#4e342e!important}.brown-800-border-top{border-top-color:#4e342e!important}.brown-800-border-right{border-right-color:#4e342e!important}.brown-800-border-bottom{border-bottom-color:#4e342e!important}.brown-800-border-left{border-left-color:#4e342e!important}.brown-900-bg{background-color:#3e2723!important}.md-brown-900-bg{background-color:#3e2723!important;color:rgba(255,255,255,.87)}.brown-900-fg{color:#3e2723!important}.brown-900-border{border-color:#3e2723!important}.brown-900-border-top{border-top-color:#3e2723!important}.brown-900-border-right{border-right-color:#3e2723!important}.brown-900-border-bottom{border-bottom-color:#3e2723!important}.brown-900-border-left{border-left-color:#3e2723!important}.brown-A100-bg{background-color:#d7ccc8!important}.md-brown-A100-bg{background-color:#d7ccc8!important;color:rgba(255,255,255,.87)}.brown-A100-fg{color:#d7ccc8!important}.brown-A100-border{border-color:#d7ccc8!important}.brown-A100-border-top{border-top-color:#d7ccc8!important}.brown-A100-border-right{border-right-color:#d7ccc8!important}.brown-A100-border-bottom{border-bottom-color:#d7ccc8!important}.brown-A100-border-left{border-left-color:#d7ccc8!important}.brown-A200-bg{background-color:#bcaaa4!important}.md-brown-A200-bg{background-color:#bcaaa4!important;color:rgba(255,255,255,.87)}.brown-A200-fg{color:#bcaaa4!important}.brown-A200-border{border-color:#bcaaa4!important}.brown-A200-border-top{border-top-color:#bcaaa4!important}.brown-A200-border-right{border-right-color:#bcaaa4!important}.brown-A200-border-bottom{border-bottom-color:#bcaaa4!important}.brown-A200-border-left{border-left-color:#bcaaa4!important}.brown-A400-bg{background-color:#8d6e63!important}.md-brown-A400-bg{background-color:#8d6e63!important;color:rgba(255,255,255,.87)}.brown-A400-fg{color:#8d6e63!important}.brown-A400-border{border-color:#8d6e63!important}.brown-A400-border-top{border-top-color:#8d6e63!important}.brown-A400-border-right{border-right-color:#8d6e63!important}.brown-A400-border-bottom{border-bottom-color:#8d6e63!important}.brown-A400-border-left{border-left-color:#8d6e63!important}.brown-A700-bg{background-color:#5d4037!important}.md-brown-A700-bg{background-color:#5d4037!important;color:rgba(255,255,255,.87)}.brown-A700-fg{color:#5d4037!important}.brown-A700-border{border-color:#5d4037!important}.brown-A700-border-top{border-top-color:#5d4037!important}.brown-A700-border-right{border-right-color:#5d4037!important}.brown-A700-border-bottom{border-bottom-color:#5d4037!important}.brown-A700-border-left{border-left-color:#5d4037!important}.grey-50-bg{background-color:#fafafa!important}.md-grey-50-bg{background-color:#fafafa!important;color:rgba(0,0,0,.87)}.grey-50-fg{color:#fafafa!important}.grey-50-border{border-color:#fafafa!important}.grey-50-border-top{border-top-color:#fafafa!important}.grey-50-border-right{border-right-color:#fafafa!important}.grey-50-border-bottom{border-bottom-color:#fafafa!important}.grey-50-border-left{border-left-color:#fafafa!important}.grey-100-bg{background-color:#f5f5f5!important}.md-grey-100-bg{background-color:#f5f5f5!important;color:rgba(0,0,0,.87)}.grey-100-fg{color:#f5f5f5!important}.grey-100-border{border-color:#f5f5f5!important}.grey-100-border-top{border-top-color:#f5f5f5!important}.grey-100-border-right{border-right-color:#f5f5f5!important}.grey-100-border-bottom{border-bottom-color:#f5f5f5!important}.grey-100-border-left{border-left-color:#f5f5f5!important}.grey-200-bg{background-color:#eee!important}.md-grey-200-bg{background-color:#eee!important;color:rgba(0,0,0,.87)}.grey-200-fg{color:#eee!important}.grey-200-border{border-color:#eee!important}.grey-200-border-top{border-top-color:#eee!important}.grey-200-border-right{border-right-color:#eee!important}.grey-200-border-bottom{border-bottom-color:#eee!important}.grey-200-border-left{border-left-color:#eee!important}.grey-300-bg{background-color:#e0e0e0!important}.md-grey-300-bg{background-color:#e0e0e0!important;color:rgba(0,0,0,.87)}.grey-300-fg{color:#e0e0e0!important}.grey-300-border{border-color:#e0e0e0!important}.grey-300-border-top{border-top-color:#e0e0e0!important}.grey-300-border-right{border-right-color:#e0e0e0!important}.grey-300-border-bottom{border-bottom-color:#e0e0e0!important}.grey-300-border-left{border-left-color:#e0e0e0!important}.grey-400-bg{background-color:#bdbdbd!important}.md-grey-400-bg{background-color:#bdbdbd!important;color:rgba(0,0,0,.87)}.grey-400-fg{color:#bdbdbd!important}.grey-400-border{border-color:#bdbdbd!important}.grey-400-border-top{border-top-color:#bdbdbd!important}.grey-400-border-right{border-right-color:#bdbdbd!important}.grey-400-border-bottom{border-bottom-color:#bdbdbd!important}.grey-400-border-left{border-left-color:#bdbdbd!important}.grey-500-bg{background-color:#9e9e9e!important}.md-grey-500-bg{background-color:#9e9e9e!important;color:rgba(0,0,0,.87)}.grey-500-fg{color:#9e9e9e!important}.grey-500-border{border-color:#9e9e9e!important}.grey-500-border-top{border-top-color:#9e9e9e!important}.grey-500-border-right{border-right-color:#9e9e9e!important}.grey-500-border-bottom{border-bottom-color:#9e9e9e!important}.grey-500-border-left{border-left-color:#9e9e9e!important}.md-grey-bg{background-color:#9e9e9e!important;color:rgba(0,0,0,.87)}.grey-bg{background-color:#9e9e9e!important}.grey-fg{color:#9e9e9e!important}.grey-border{border-color:#9e9e9e!important}.grey-border-top{border-top-color:#9e9e9e!important}.grey-border-right{border-right-color:#9e9e9e!important}.grey-border-bottom{border-bottom-color:#9e9e9e!important}.grey-border-left{border-left-color:#9e9e9e!important}.grey-600-bg{background-color:#757575!important}.md-grey-600-bg{background-color:#757575!important;color:rgba(255,255,255,.87)}.grey-600-fg{color:#757575!important}.grey-600-border{border-color:#757575!important}.grey-600-border-top{border-top-color:#757575!important}.grey-600-border-right{border-right-color:#757575!important}.grey-600-border-bottom{border-bottom-color:#757575!important}.grey-600-border-left{border-left-color:#757575!important}.grey-700-bg{background-color:#616161!important}.md-grey-700-bg{background-color:#616161!important;color:rgba(255,255,255,.87)}.grey-700-fg{color:#616161!important}.grey-700-border{border-color:#616161!important}.grey-700-border-top{border-top-color:#616161!important}.grey-700-border-right{border-right-color:#616161!important}.grey-700-border-bottom{border-bottom-color:#616161!important}.grey-700-border-left{border-left-color:#616161!important}.grey-800-bg{background-color:#424242!important}.md-grey-800-bg{background-color:#424242!important;color:rgba(255,255,255,.87)}.grey-800-fg{color:#424242!important}.grey-800-border{border-color:#424242!important}.grey-800-border-top{border-top-color:#424242!important}.grey-800-border-right{border-right-color:#424242!important}.grey-800-border-bottom{border-bottom-color:#424242!important}.grey-800-border-left{border-left-color:#424242!important}.grey-900-bg{background-color:#212121!important}.md-grey-900-bg{background-color:#212121!important;color:rgba(255,255,255,.87)}.grey-900-fg{color:#212121!important}.grey-900-border{border-color:#212121!important}.grey-900-border-top{border-top-color:#212121!important}.grey-900-border-right{border-right-color:#212121!important}.grey-900-border-bottom{border-bottom-color:#212121!important}.grey-900-border-left{border-left-color:#212121!important}.grey-1000-bg{background-color:#000!important}.md-grey-1000-bg{background-color:#000!important}.grey-1000-fg{color:#000!important}.grey-1000-border{border-color:#000!important}.grey-1000-border-top{border-top-color:#000!important}.grey-1000-border-right{border-right-color:#000!important}.grey-1000-border-bottom{border-bottom-color:#000!important}.grey-1000-border-left{border-left-color:#000!important}.grey-A100-bg{background-color:#fff!important}.md-grey-A100-bg{background-color:#fff!important;color:rgba(0,0,0,.87)}.grey-A100-fg{color:#fff!important}.grey-A100-border{border-color:#fff!important}.grey-A100-border-top{border-top-color:#fff!important}.grey-A100-border-right{border-right-color:#fff!important}.grey-A100-border-bottom{border-bottom-color:#fff!important}.grey-A100-border-left{border-left-color:#fff!important}.grey-A200-bg{background-color:#eee!important}.md-grey-A200-bg{background-color:#eee!important;color:rgba(0,0,0,.87)}.grey-A200-fg{color:#eee!important}.grey-A200-border{border-color:#eee!important}.grey-A200-border-top{border-top-color:#eee!important}.grey-A200-border-right{border-right-color:#eee!important}.grey-A200-border-bottom{border-bottom-color:#eee!important}.grey-A200-border-left{border-left-color:#eee!important}.grey-A400-bg{background-color:#bdbdbd!important}.md-grey-A400-bg{background-color:#bdbdbd!important;color:rgba(0,0,0,.87)}.grey-A400-fg{color:#bdbdbd!important}.grey-A400-border{border-color:#bdbdbd!important}.grey-A400-border-top{border-top-color:#bdbdbd!important}.grey-A400-border-right{border-right-color:#bdbdbd!important}.grey-A400-border-bottom{border-bottom-color:#bdbdbd!important}.grey-A400-border-left{border-left-color:#bdbdbd!important}.grey-A700-bg{background-color:#616161!important}.md-grey-A700-bg{background-color:#616161!important;color:rgba(0,0,0,.87)}.grey-A700-fg{color:#616161!important}.grey-A700-border{border-color:#616161!important}.grey-A700-border-top{border-top-color:#616161!important}.grey-A700-border-right{border-right-color:#616161!important}.grey-A700-border-bottom{border-bottom-color:#616161!important}.grey-A700-border-left{border-left-color:#616161!important}.blue-grey-50-bg{background-color:#eceff1!important}.md-blue-grey-50-bg{background-color:#eceff1!important;color:rgba(0,0,0,.87)}.blue-grey-50-fg{color:#eceff1!important}.blue-grey-50-border{border-color:#eceff1!important}.blue-grey-50-border-top{border-top-color:#eceff1!important}.blue-grey-50-border-right{border-right-color:#eceff1!important}.blue-grey-50-border-bottom{border-bottom-color:#eceff1!important}.blue-grey-50-border-left{border-left-color:#eceff1!important}.blue-grey-100-bg{background-color:#cfd8dc!important}.md-blue-grey-100-bg{background-color:#cfd8dc!important;color:rgba(0,0,0,.87)}.blue-grey-100-fg{color:#cfd8dc!important}.blue-grey-100-border{border-color:#cfd8dc!important}.blue-grey-100-border-top{border-top-color:#cfd8dc!important}.blue-grey-100-border-right{border-right-color:#cfd8dc!important}.blue-grey-100-border-bottom{border-bottom-color:#cfd8dc!important}.blue-grey-100-border-left{border-left-color:#cfd8dc!important}.blue-grey-200-bg{background-color:#b0bec5!important}.md-blue-grey-200-bg{background-color:#b0bec5!important;color:rgba(0,0,0,.87)}.blue-grey-200-fg{color:#b0bec5!important}.blue-grey-200-border{border-color:#b0bec5!important}.blue-grey-200-border-top{border-top-color:#b0bec5!important}.blue-grey-200-border-right{border-right-color:#b0bec5!important}.blue-grey-200-border-bottom{border-bottom-color:#b0bec5!important}.blue-grey-200-border-left{border-left-color:#b0bec5!important}.blue-grey-300-bg{background-color:#90a4ae!important}.md-blue-grey-300-bg{background-color:#90a4ae!important;color:rgba(0,0,0,.87)}.blue-grey-300-fg{color:#90a4ae!important}.blue-grey-300-border{border-color:#90a4ae!important}.blue-grey-300-border-top{border-top-color:#90a4ae!important}.blue-grey-300-border-right{border-right-color:#90a4ae!important}.blue-grey-300-border-bottom{border-bottom-color:#90a4ae!important}.blue-grey-300-border-left{border-left-color:#90a4ae!important}.blue-grey-400-bg{background-color:#78909c!important}.md-blue-grey-400-bg{background-color:#78909c!important;color:#fff}.blue-grey-400-fg{color:#78909c!important}.blue-grey-400-border{border-color:#78909c!important}.blue-grey-400-border-top{border-top-color:#78909c!important}.blue-grey-400-border-right{border-right-color:#78909c!important}.blue-grey-400-border-bottom{border-bottom-color:#78909c!important}.blue-grey-400-border-left{border-left-color:#78909c!important}.blue-grey-500-bg{background-color:#607d8b!important}.md-blue-grey-500-bg{background-color:#607d8b!important;color:#fff}.blue-grey-500-fg{color:#607d8b!important}.blue-grey-500-border{border-color:#607d8b!important}.blue-grey-500-border-top{border-top-color:#607d8b!important}.blue-grey-500-border-right{border-right-color:#607d8b!important}.blue-grey-500-border-bottom{border-bottom-color:#607d8b!important}.blue-grey-500-border-left{border-left-color:#607d8b!important}.md-blue-grey-bg{background-color:#607d8b!important;color:#fff}.blue-grey-bg{background-color:#607d8b!important}.blue-grey-fg{color:#607d8b!important}.blue-grey-border{border-color:#607d8b!important}.blue-grey-border-top{border-top-color:#607d8b!important}.blue-grey-border-right{border-right-color:#607d8b!important}.blue-grey-border-bottom{border-bottom-color:#607d8b!important}.blue-grey-border-left{border-left-color:#607d8b!important}.blue-grey-600-bg{background-color:#546e7a!important}.md-blue-grey-600-bg{background-color:#546e7a!important;color:rgba(255,255,255,.87)}.blue-grey-600-fg{color:#546e7a!important}.blue-grey-600-border{border-color:#546e7a!important}.blue-grey-600-border-top{border-top-color:#546e7a!important}.blue-grey-600-border-right{border-right-color:#546e7a!important}.blue-grey-600-border-bottom{border-bottom-color:#546e7a!important}.blue-grey-600-border-left{border-left-color:#546e7a!important}.blue-grey-700-bg{background-color:#455a64!important}.md-blue-grey-700-bg{background-color:#455a64!important;color:rgba(255,255,255,.87)}.blue-grey-700-fg{color:#455a64!important}.blue-grey-700-border{border-color:#455a64!important}.blue-grey-700-border-top{border-top-color:#455a64!important}.blue-grey-700-border-right{border-right-color:#455a64!important}.blue-grey-700-border-bottom{border-bottom-color:#455a64!important}.blue-grey-700-border-left{border-left-color:#455a64!important}.blue-grey-800-bg{background-color:#37474f!important}.md-blue-grey-800-bg{background-color:#37474f!important;color:rgba(255,255,255,.87)}.blue-grey-800-fg{color:#37474f!important}.blue-grey-800-border{border-color:#37474f!important}.blue-grey-800-border-top{border-top-color:#37474f!important}.blue-grey-800-border-right{border-right-color:#37474f!important}.blue-grey-800-border-bottom{border-bottom-color:#37474f!important}.blue-grey-800-border-left{border-left-color:#37474f!important}.blue-grey-900-bg{background-color:#263238!important}.md-blue-grey-900-bg{background-color:#263238!important;color:rgba(255,255,255,.87)}.blue-grey-900-fg{color:#263238!important}.blue-grey-900-border{border-color:#263238!important}.blue-grey-900-border-top{border-top-color:#263238!important}.blue-grey-900-border-right{border-right-color:#263238!important}.blue-grey-900-border-bottom{border-bottom-color:#263238!important}.blue-grey-900-border-left{border-left-color:#263238!important}.blue-grey-A100-bg{background-color:#cfd8dc!important}.md-blue-grey-A100-bg{background-color:#cfd8dc!important;color:rgba(255,255,255,.87)}.blue-grey-A100-fg{color:#cfd8dc!important}.blue-grey-A100-border{border-color:#cfd8dc!important}.blue-grey-A100-border-top{border-top-color:#cfd8dc!important}.blue-grey-A100-border-right{border-right-color:#cfd8dc!important}.blue-grey-A100-border-bottom{border-bottom-color:#cfd8dc!important}.blue-grey-A100-border-left{border-left-color:#cfd8dc!important}.blue-grey-A200-bg{background-color:#b0bec5!important}.md-blue-grey-A200-bg{background-color:#b0bec5!important;color:rgba(255,255,255,.87)}.blue-grey-A200-fg{color:#b0bec5!important}.blue-grey-A200-border{border-color:#b0bec5!important}.blue-grey-A200-border-top{border-top-color:#b0bec5!important}.blue-grey-A200-border-right{border-right-color:#b0bec5!important}.blue-grey-A200-border-bottom{border-bottom-color:#b0bec5!important}.blue-grey-A200-border-left{border-left-color:#b0bec5!important}.blue-grey-A400-bg{background-color:#78909c!important}.md-blue-grey-A400-bg{background-color:#78909c!important;color:rgba(255,255,255,.87)}.blue-grey-A400-fg{color:#78909c!important}.blue-grey-A400-border{border-color:#78909c!important}.blue-grey-A400-border-top{border-top-color:#78909c!important}.blue-grey-A400-border-right{border-right-color:#78909c!important}.blue-grey-A400-border-bottom{border-bottom-color:#78909c!important}.blue-grey-A400-border-left{border-left-color:#78909c!important}.blue-grey-A700-bg{background-color:#455a64!important}.md-blue-grey-A700-bg{background-color:#455a64!important;color:rgba(255,255,255,.87)}.blue-grey-A700-fg{color:#455a64!important}.blue-grey-A700-border{border-color:#455a64!important}.blue-grey-A700-border-top{border-top-color:#455a64!important}.blue-grey-A700-border-right{border-right-color:#455a64!important}.blue-grey-A700-border-bottom{border-bottom-color:#455a64!important}.blue-grey-A700-border-left{border-left-color:#455a64!important}.white-500-bg{background-color:#fff!important}.md-white-500-bg{background-color:#fff!important;color:rgba(0,0,0,.87)}.white-500-fg{color:#fff!important}.white-500-border{border-color:#fff!important}.white-500-border-top{border-top-color:#fff!important}.white-500-border-right{border-right-color:#fff!important}.white-500-border-bottom{border-bottom-color:#fff!important}.white-500-border-left{border-left-color:#fff!important}.md-white-bg{background-color:#fff!important;color:rgba(0,0,0,.87)}.white-bg{background-color:#fff!important}.white-fg{color:#fff!important}.white-border{border-color:#fff!important}.white-border-top{border-top-color:#fff!important}.white-border-right{border-right-color:#fff!important}.white-border-bottom{border-bottom-color:#fff!important}.white-border-left{border-left-color:#fff!important}.black-500-bg{background-color:#000!important}.md-black-500-bg{background-color:#000!important;color:rgba(255,255,255,.87)}.black-500-fg{color:#000!important}.black-500-border{border-color:#000!important}.black-500-border-top{border-top-color:#000!important}.black-500-border-right{border-right-color:#000!important}.black-500-border-bottom{border-bottom-color:#000!important}.black-500-border-left{border-left-color:#000!important}.md-black-bg{background-color:#000!important;color:rgba(255,255,255,.87)}.black-bg{background-color:#000!important}.black-fg{color:#000!important}.black-border{border-color:#000!important}.black-border-top{border-top-color:#000!important}.black-border-right{border-right-color:#000!important}.black-border-bottom{border-bottom-color:#000!important}.black-border-left{border-left-color:#000!important}i,md-icon[md-font-icon]{font-size:24px;width:24px;height:24px;min-width:24px;min-height:24px;line-height:24px}i.s4,md-icon[md-font-icon].s4{font-size:4px!important;width:4px!important;height:4px!important;min-width:4px!important;min-height:4px!important;line-height:4px!important}i.s6,md-icon[md-font-icon].s6{font-size:6px!important;width:6px!important;height:6px!important;min-width:6px!important;min-height:6px!important;line-height:6px!important}i.s8,md-icon[md-font-icon].s8{font-size:8px!important;width:8px!important;height:8px!important;min-width:8px!important;min-height:8px!important;line-height:8px!important}i.s10,md-icon[md-font-icon].s10{font-size:10px!important;width:10px!important;height:10px!important;min-width:10px!important;min-height:10px!important;line-height:10px!important}i.s12,md-icon[md-font-icon].s12{font-size:12px!important;width:12px!important;height:12px!important;min-width:12px!important;min-height:12px!important;line-height:12px!important}i.s14,md-icon[md-font-icon].s14{font-size:14px!important;width:14px!important;height:14px!important;min-width:14px!important;min-height:14px!important;line-height:14px!important}i.s16,md-icon[md-font-icon].s16{font-size:16px!important;width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;line-height:16px!important}i.s18,md-icon[md-font-icon].s18{font-size:18px!important;width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;line-height:18px!important}i.s20,md-icon[md-font-icon].s20{font-size:20px!important;width:20px!important;height:20px!important;min-width:20px!important;min-height:20px!important;line-height:20px!important}i.s22,md-icon[md-font-icon].s22{font-size:22px!important;width:22px!important;height:22px!important;min-width:22px!important;min-height:22px!important;line-height:22px!important}i.s24,md-icon[md-font-icon].s24{font-size:24px!important;width:24px!important;height:24px!important;min-width:24px!important;min-height:24px!important;line-height:24px!important}i.s26,md-icon[md-font-icon].s26{font-size:26px!important;width:26px!important;height:26px!important;min-width:26px!important;min-height:26px!important;line-height:26px!important}i.s28,md-icon[md-font-icon].s28{font-size:28px!important;width:28px!important;height:28px!important;min-width:28px!important;min-height:28px!important;line-height:28px!important}i.s30,md-icon[md-font-icon].s30{font-size:30px!important;width:30px!important;height:30px!important;min-width:30px!important;min-height:30px!important;line-height:30px!important}i.s32,md-icon[md-font-icon].s32{font-size:32px!important;width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important;line-height:32px!important}i.s34,md-icon[md-font-icon].s34{font-size:34px!important;width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;line-height:34px!important}i.s36,md-icon[md-font-icon].s36{font-size:36px!important;width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important;line-height:36px!important}i.s38,md-icon[md-font-icon].s38{font-size:38px!important;width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important;line-height:38px!important}i.s40,md-icon[md-font-icon].s40{font-size:40px!important;width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;line-height:40px!important}i.s42,md-icon[md-font-icon].s42{font-size:42px!important;width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important;line-height:42px!important}i.s44,md-icon[md-font-icon].s44{font-size:44px!important;width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;line-height:44px!important}i.s46,md-icon[md-font-icon].s46{font-size:46px!important;width:46px!important;height:46px!important;min-width:46px!important;min-height:46px!important;line-height:46px!important}i.s48,md-icon[md-font-icon].s48{font-size:48px!important;width:48px!important;height:48px!important;min-width:48px!important;min-height:48px!important;line-height:48px!important}i.s50,md-icon[md-font-icon].s50{font-size:50px!important;width:50px!important;height:50px!important;min-width:50px!important;min-height:50px!important;line-height:50px!important}i.s52,md-icon[md-font-icon].s52{font-size:52px!important;width:52px!important;height:52px!important;min-width:52px!important;min-height:52px!important;line-height:52px!important}i.s54,md-icon[md-font-icon].s54{font-size:54px!important;width:54px!important;height:54px!important;min-width:54px!important;min-height:54px!important;line-height:54px!important}i.s56,md-icon[md-font-icon].s56{font-size:56px!important;width:56px!important;height:56px!important;min-width:56px!important;min-height:56px!important;line-height:56px!important}i.s58,md-icon[md-font-icon].s58{font-size:58px!important;width:58px!important;height:58px!important;min-width:58px!important;min-height:58px!important;line-height:58px!important}i.s60,md-icon[md-font-icon].s60{font-size:60px!important;width:60px!important;height:60px!important;min-width:60px!important;min-height:60px!important;line-height:60px!important}i.s62,md-icon[md-font-icon].s62{font-size:62px!important;width:62px!important;height:62px!important;min-width:62px!important;min-height:62px!important;line-height:62px!important}i.s64,md-icon[md-font-icon].s64{font-size:64px!important;width:64px!important;height:64px!important;min-width:64px!important;min-height:64px!important;line-height:64px!important}i.s66,md-icon[md-font-icon].s66{font-size:66px!important;width:66px!important;height:66px!important;min-width:66px!important;min-height:66px!important;line-height:66px!important}i.s68,md-icon[md-font-icon].s68{font-size:68px!important;width:68px!important;height:68px!important;min-width:68px!important;min-height:68px!important;line-height:68px!important}i.s70,md-icon[md-font-icon].s70{font-size:70px!important;width:70px!important;height:70px!important;min-width:70px!important;min-height:70px!important;line-height:70px!important}i.s72,md-icon[md-font-icon].s72{font-size:72px!important;width:72px!important;height:72px!important;min-width:72px!important;min-height:72px!important;line-height:72px!important}i.s74,md-icon[md-font-icon].s74{font-size:74px!important;width:74px!important;height:74px!important;min-width:74px!important;min-height:74px!important;line-height:74px!important}i.s76,md-icon[md-font-icon].s76{font-size:76px!important;width:76px!important;height:76px!important;min-width:76px!important;min-height:76px!important;line-height:76px!important}i.s78,md-icon[md-font-icon].s78{font-size:78px!important;width:78px!important;height:78px!important;min-width:78px!important;min-height:78px!important;line-height:78px!important}i.s80,md-icon[md-font-icon].s80{font-size:80px!important;width:80px!important;height:80px!important;min-width:80px!important;min-height:80px!important;line-height:80px!important}i.s82,md-icon[md-font-icon].s82{font-size:82px!important;width:82px!important;height:82px!important;min-width:82px!important;min-height:82px!important;line-height:82px!important}i.s84,md-icon[md-font-icon].s84{font-size:84px!important;width:84px!important;height:84px!important;min-width:84px!important;min-height:84px!important;line-height:84px!important}i.s86,md-icon[md-font-icon].s86{font-size:86px!important;width:86px!important;height:86px!important;min-width:86px!important;min-height:86px!important;line-height:86px!important}i.s88,md-icon[md-font-icon].s88{font-size:88px!important;width:88px!important;height:88px!important;min-width:88px!important;min-height:88px!important;line-height:88px!important}i.s90,md-icon[md-font-icon].s90{font-size:90px!important;width:90px!important;height:90px!important;min-width:90px!important;min-height:90px!important;line-height:90px!important}i.s92,md-icon[md-font-icon].s92{font-size:92px!important;width:92px!important;height:92px!important;min-width:92px!important;min-height:92px!important;line-height:92px!important}i.s94,md-icon[md-font-icon].s94{font-size:94px!important;width:94px!important;height:94px!important;min-width:94px!important;min-height:94px!important;line-height:94px!important}i.s96,md-icon[md-font-icon].s96{font-size:96px!important;width:96px!important;height:96px!important;min-width:96px!important;min-height:96px!important;line-height:96px!important}i.s98,md-icon[md-font-icon].s98{font-size:98px!important;width:98px!important;height:98px!important;min-width:98px!important;min-height:98px!important;line-height:98px!important}i.s100,md-icon[md-font-icon].s100{font-size:100px!important;width:100px!important;height:100px!important;min-width:100px!important;min-height:100px!important;line-height:100px!important}i.s102,md-icon[md-font-icon].s102{font-size:102px!important;width:102px!important;height:102px!important;min-width:102px!important;min-height:102px!important;line-height:102px!important}i.s104,md-icon[md-font-icon].s104{font-size:104px!important;width:104px!important;height:104px!important;min-width:104px!important;min-height:104px!important;line-height:104px!important}i.s106,md-icon[md-font-icon].s106{font-size:106px!important;width:106px!important;height:106px!important;min-width:106px!important;min-height:106px!important;line-height:106px!important}i.s108,md-icon[md-font-icon].s108{font-size:108px!important;width:108px!important;height:108px!important;min-width:108px!important;min-height:108px!important;line-height:108px!important}i.s110,md-icon[md-font-icon].s110{font-size:110px!important;width:110px!important;height:110px!important;min-width:110px!important;min-height:110px!important;line-height:110px!important}i.s112,md-icon[md-font-icon].s112{font-size:112px!important;width:112px!important;height:112px!important;min-width:112px!important;min-height:112px!important;line-height:112px!important}i.s114,md-icon[md-font-icon].s114{font-size:114px!important;width:114px!important;height:114px!important;min-width:114px!important;min-height:114px!important;line-height:114px!important}i.s116,md-icon[md-font-icon].s116{font-size:116px!important;width:116px!important;height:116px!important;min-width:116px!important;min-height:116px!important;line-height:116px!important}i.s118,md-icon[md-font-icon].s118{font-size:118px!important;width:118px!important;height:118px!important;min-width:118px!important;min-height:118px!important;line-height:118px!important}i.s120,md-icon[md-font-icon].s120{font-size:120px!important;width:120px!important;height:120px!important;min-width:120px!important;min-height:120px!important;line-height:120px!important}i.s122,md-icon[md-font-icon].s122{font-size:122px!important;width:122px!important;height:122px!important;min-width:122px!important;min-height:122px!important;line-height:122px!important}i.s124,md-icon[md-font-icon].s124{font-size:124px!important;width:124px!important;height:124px!important;min-width:124px!important;min-height:124px!important;line-height:124px!important}i.s126,md-icon[md-font-icon].s126{font-size:126px!important;width:126px!important;height:126px!important;min-width:126px!important;min-height:126px!important;line-height:126px!important}i.s128,md-icon[md-font-icon].s128{font-size:128px!important;width:128px!important;height:128px!important;min-width:128px!important;min-height:128px!important;line-height:128px!important}i.s130,md-icon[md-font-icon].s130{font-size:130px!important;width:130px!important;height:130px!important;min-width:130px!important;min-height:130px!important;line-height:130px!important}i.s132,md-icon[md-font-icon].s132{font-size:132px!important;width:132px!important;height:132px!important;min-width:132px!important;min-height:132px!important;line-height:132px!important}i.s134,md-icon[md-font-icon].s134{font-size:134px!important;width:134px!important;height:134px!important;min-width:134px!important;min-height:134px!important;line-height:134px!important}i.s136,md-icon[md-font-icon].s136{font-size:136px!important;width:136px!important;height:136px!important;min-width:136px!important;min-height:136px!important;line-height:136px!important}i.s138,md-icon[md-font-icon].s138{font-size:138px!important;width:138px!important;height:138px!important;min-width:138px!important;min-height:138px!important;line-height:138px!important}i.s140,md-icon[md-font-icon].s140{font-size:140px!important;width:140px!important;height:140px!important;min-width:140px!important;min-height:140px!important;line-height:140px!important}i.s142,md-icon[md-font-icon].s142{font-size:142px!important;width:142px!important;height:142px!important;min-width:142px!important;min-height:142px!important;line-height:142px!important}i.s144,md-icon[md-font-icon].s144{font-size:144px!important;width:144px!important;height:144px!important;min-width:144px!important;min-height:144px!important;line-height:144px!important}i.s146,md-icon[md-font-icon].s146{font-size:146px!important;width:146px!important;height:146px!important;min-width:146px!important;min-height:146px!important;line-height:146px!important}i.s148,md-icon[md-font-icon].s148{font-size:148px!important;width:148px!important;height:148px!important;min-width:148px!important;min-height:148px!important;line-height:148px!important}i.s150,md-icon[md-font-icon].s150{font-size:150px!important;width:150px!important;height:150px!important;min-width:150px!important;min-height:150px!important;line-height:150px!important}i.s152,md-icon[md-font-icon].s152{font-size:152px!important;width:152px!important;height:152px!important;min-width:152px!important;min-height:152px!important;line-height:152px!important}i.s154,md-icon[md-font-icon].s154{font-size:154px!important;width:154px!important;height:154px!important;min-width:154px!important;min-height:154px!important;line-height:154px!important}i.s156,md-icon[md-font-icon].s156{font-size:156px!important;width:156px!important;height:156px!important;min-width:156px!important;min-height:156px!important;line-height:156px!important}i.s158,md-icon[md-font-icon].s158{font-size:158px!important;width:158px!important;height:158px!important;min-width:158px!important;min-height:158px!important;line-height:158px!important}i.s160,md-icon[md-font-icon].s160{font-size:160px!important;width:160px!important;height:160px!important;min-width:160px!important;min-height:160px!important;line-height:160px!important}i.s162,md-icon[md-font-icon].s162{font-size:162px!important;width:162px!important;height:162px!important;min-width:162px!important;min-height:162px!important;line-height:162px!important}i.s164,md-icon[md-font-icon].s164{font-size:164px!important;width:164px!important;height:164px!important;min-width:164px!important;min-height:164px!important;line-height:164px!important}i.s166,md-icon[md-font-icon].s166{font-size:166px!important;width:166px!important;height:166px!important;min-width:166px!important;min-height:166px!important;line-height:166px!important}i.s168,md-icon[md-font-icon].s168{font-size:168px!important;width:168px!important;height:168px!important;min-width:168px!important;min-height:168px!important;line-height:168px!important}i.s170,md-icon[md-font-icon].s170{font-size:170px!important;width:170px!important;height:170px!important;min-width:170px!important;min-height:170px!important;line-height:170px!important}i.s172,md-icon[md-font-icon].s172{font-size:172px!important;width:172px!important;height:172px!important;min-width:172px!important;min-height:172px!important;line-height:172px!important}i.s174,md-icon[md-font-icon].s174{font-size:174px!important;width:174px!important;height:174px!important;min-width:174px!important;min-height:174px!important;line-height:174px!important}i.s176,md-icon[md-font-icon].s176{font-size:176px!important;width:176px!important;height:176px!important;min-width:176px!important;min-height:176px!important;line-height:176px!important}i.s178,md-icon[md-font-icon].s178{font-size:178px!important;width:178px!important;height:178px!important;min-width:178px!important;min-height:178px!important;line-height:178px!important}i.s180,md-icon[md-font-icon].s180{font-size:180px!important;width:180px!important;height:180px!important;min-width:180px!important;min-height:180px!important;line-height:180px!important}i.s182,md-icon[md-font-icon].s182{font-size:182px!important;width:182px!important;height:182px!important;min-width:182px!important;min-height:182px!important;line-height:182px!important}i.s184,md-icon[md-font-icon].s184{font-size:184px!important;width:184px!important;height:184px!important;min-width:184px!important;min-height:184px!important;line-height:184px!important}i.s186,md-icon[md-font-icon].s186{font-size:186px!important;width:186px!important;height:186px!important;min-width:186px!important;min-height:186px!important;line-height:186px!important}i.s188,md-icon[md-font-icon].s188{font-size:188px!important;width:188px!important;height:188px!important;min-width:188px!important;min-height:188px!important;line-height:188px!important}i.s190,md-icon[md-font-icon].s190{font-size:190px!important;width:190px!important;height:190px!important;min-width:190px!important;min-height:190px!important;line-height:190px!important}i.s192,md-icon[md-font-icon].s192{font-size:192px!important;width:192px!important;height:192px!important;min-width:192px!important;min-height:192px!important;line-height:192px!important}i.s194,md-icon[md-font-icon].s194{font-size:194px!important;width:194px!important;height:194px!important;min-width:194px!important;min-height:194px!important;line-height:194px!important}i.s196,md-icon[md-font-icon].s196{font-size:196px!important;width:196px!important;height:196px!important;min-width:196px!important;min-height:196px!important;line-height:196px!important}i.s198,md-icon[md-font-icon].s198{font-size:198px!important;width:198px!important;height:198px!important;min-width:198px!important;min-height:198px!important;line-height:198px!important}i.s200,md-icon[md-font-icon].s200{font-size:200px!important;width:200px!important;height:200px!important;min-width:200px!important;min-height:200px!important;line-height:200px!important}i.s202,md-icon[md-font-icon].s202{font-size:202px!important;width:202px!important;height:202px!important;min-width:202px!important;min-height:202px!important;line-height:202px!important}i.s204,md-icon[md-font-icon].s204{font-size:204px!important;width:204px!important;height:204px!important;min-width:204px!important;min-height:204px!important;line-height:204px!important}i.s206,md-icon[md-font-icon].s206{font-size:206px!important;width:206px!important;height:206px!important;min-width:206px!important;min-height:206px!important;line-height:206px!important}i.s208,md-icon[md-font-icon].s208{font-size:208px!important;width:208px!important;height:208px!important;min-width:208px!important;min-height:208px!important;line-height:208px!important}i.s210,md-icon[md-font-icon].s210{font-size:210px!important;width:210px!important;height:210px!important;min-width:210px!important;min-height:210px!important;line-height:210px!important}i.s212,md-icon[md-font-icon].s212{font-size:212px!important;width:212px!important;height:212px!important;min-width:212px!important;min-height:212px!important;line-height:212px!important}i.s214,md-icon[md-font-icon].s214{font-size:214px!important;width:214px!important;height:214px!important;min-width:214px!important;min-height:214px!important;line-height:214px!important}i.s216,md-icon[md-font-icon].s216{font-size:216px!important;width:216px!important;height:216px!important;min-width:216px!important;min-height:216px!important;line-height:216px!important}i.s218,md-icon[md-font-icon].s218{font-size:218px!important;width:218px!important;height:218px!important;min-width:218px!important;min-height:218px!important;line-height:218px!important}i.s220,md-icon[md-font-icon].s220{font-size:220px!important;width:220px!important;height:220px!important;min-width:220px!important;min-height:220px!important;line-height:220px!important}i.s222,md-icon[md-font-icon].s222{font-size:222px!important;width:222px!important;height:222px!important;min-width:222px!important;min-height:222px!important;line-height:222px!important}i.s224,md-icon[md-font-icon].s224{font-size:224px!important;width:224px!important;height:224px!important;min-width:224px!important;min-height:224px!important;line-height:224px!important}i.s226,md-icon[md-font-icon].s226{font-size:226px!important;width:226px!important;height:226px!important;min-width:226px!important;min-height:226px!important;line-height:226px!important}i.s228,md-icon[md-font-icon].s228{font-size:228px!important;width:228px!important;height:228px!important;min-width:228px!important;min-height:228px!important;line-height:228px!important}i.s230,md-icon[md-font-icon].s230{font-size:230px!important;width:230px!important;height:230px!important;min-width:230px!important;min-height:230px!important;line-height:230px!important}i.s232,md-icon[md-font-icon].s232{font-size:232px!important;width:232px!important;height:232px!important;min-width:232px!important;min-height:232px!important;line-height:232px!important}i.s234,md-icon[md-font-icon].s234{font-size:234px!important;width:234px!important;height:234px!important;min-width:234px!important;min-height:234px!important;line-height:234px!important}i.s236,md-icon[md-font-icon].s236{font-size:236px!important;width:236px!important;height:236px!important;min-width:236px!important;min-height:236px!important;line-height:236px!important}i.s238,md-icon[md-font-icon].s238{font-size:238px!important;width:238px!important;height:238px!important;min-width:238px!important;min-height:238px!important;line-height:238px!important}i.s240,md-icon[md-font-icon].s240{font-size:240px!important;width:240px!important;height:240px!important;min-width:240px!important;min-height:240px!important;line-height:240px!important}i.s242,md-icon[md-font-icon].s242{font-size:242px!important;width:242px!important;height:242px!important;min-width:242px!important;min-height:242px!important;line-height:242px!important}i.s244,md-icon[md-font-icon].s244{font-size:244px!important;width:244px!important;height:244px!important;min-width:244px!important;min-height:244px!important;line-height:244px!important}i.s246,md-icon[md-font-icon].s246{font-size:246px!important;width:246px!important;height:246px!important;min-width:246px!important;min-height:246px!important;line-height:246px!important}i.s248,md-icon[md-font-icon].s248{font-size:248px!important;width:248px!important;height:248px!important;min-width:248px!important;min-height:248px!important;line-height:248px!important}i.s250,md-icon[md-font-icon].s250{font-size:250px!important;width:250px!important;height:250px!important;min-width:250px!important;min-height:250px!important;line-height:250px!important}i.s252,md-icon[md-font-icon].s252{font-size:252px!important;width:252px!important;height:252px!important;min-width:252px!important;min-height:252px!important;line-height:252px!important}i.s254,md-icon[md-font-icon].s254{font-size:254px!important;width:254px!important;height:254px!important;min-width:254px!important;min-height:254px!important;line-height:254px!important}i.s256,md-icon[md-font-icon].s256{font-size:256px!important;width:256px!important;height:256px!important;min-width:256px!important;min-height:256px!important;line-height:256px!important}@font-face{font-family:icomoon;src:url(../assets/icons/fonts/icomoon.eot?5km1tg);src:url(../assets/icons/fonts/icomoon.eot?#iefix5km1tg) format("embedded-opentype"),url(../assets/icons/fonts/icomoon.ttf?5km1tg) format("truetype"),url(../assets/icons/fonts/icomoon.woff?5km1tg) format("woff"),url(../assets/icons/fonts/icomoon.svg?5km1tg#icomoon) format("svg");font-weight:400;font-style:normal}[class*=' icon-'],[class^=icon-]{font-family:icomoon;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-account-alert:before{content:'\e600'}.icon-account-box-outline:before{content:'\e601'}.icon-account-box:before{content:'\e602'}.icon-account-check:before{content:'\e603'}.icon-account-circle:before{content:'\e604'}.icon-account-key:before{content:'\e605'}.icon-account-location:before{content:'\e606'}.icon-account-minus:before{content:'\e607'}.icon-account-multiple-outline:before{content:'\e608'}.icon-account-multiple-plus:before{content:'\e609'}.icon-account-multiple:before{content:'\e60a'}.icon-account-network:before{content:'\e60b'}.icon-account-outline:before{content:'\e60c'}.icon-account-plus:before{content:'\e60d'}.icon-account-remove:before{content:'\e60e'}.icon-account-search:before{content:'\e60f'}.icon-account-switch:before{content:'\e610'}.icon-account:before{content:'\e611'}.icon-airballoon:before{content:'\e612'}.icon-airplane-off:before{content:'\e613'}.icon-airplane:before{content:'\e614'}.icon-alarm-check:before{content:'\e615'}.icon-alarm-multiple:before{content:'\e616'}.icon-alarm-off:before{content:'\e617'}.icon-alarm-plus:before{content:'\e618'}.icon-alarm:before{content:'\e619'}.icon-album:before{content:'\e61a'}.icon-alert-box:before{content:'\e61b'}.icon-alert-circle:before{content:'\e61c'}.icon-alert-octagon:before{content:'\e61d'}.icon-alert:before{content:'\e61e'}.icon-alpha:before{content:'\e61f'}.icon-alphabetical:before{content:'\e620'}.icon-amazon-clouddrive:before{content:'\e621'}.icon-amazon:before{content:'\e622'}.icon-ambulance:before{content:'\e623'}.icon-android-debug-bridge:before{content:'\e624'}.icon-android-studio:before{content:'\e625'}.icon-android:before{content:'\e626'}.icon-apple-finder:before{content:'\e627'}.icon-apple-ios:before{content:'\e628'}.icon-apple-mobileme:before{content:'\e629'}.icon-apple-safari:before{content:'\e62a'}.icon-apple:before{content:'\e62b'}.icon-appnet:before{content:'\e62c'}.icon-apps:before{content:'\e62d'}.icon-archive:before{content:'\e62e'}.icon-arrange-bring-forward:before{content:'\e62f'}.icon-arrange-bring-to-front:before{content:'\e630'}.icon-arrange-send-backward:before{content:'\e631'}.icon-arrange-send-to-back:before{content:'\e632'}.icon-arrow-all:before{content:'\e633'}.icon-arrow-bottom-left:before{content:'\e634'}.icon-arrow-bottom-right:before{content:'\e635'}.icon-arrow-collapse:before{content:'\e636'}.icon-arrow-down-bold-circle-outline:before{content:'\e637'}.icon-arrow-down-bold-circle:before{content:'\e638'}.icon-arrow-down-bold-hexagon-outline:before{content:'\e639'}.icon-arrow-down-bold:before{content:'\e63a'}.icon-arrow-down:before{content:'\e63b'}.icon-arrow-expand:before{content:'\e63c'}.icon-arrow-left-bold-circle-outline:before{content:'\e63d'}.icon-arrow-left-bold-circle:before{content:'\e63e'}.icon-arrow-left-bold-hexagon-outline:before{content:'\e63f'}.icon-arrow-left-bold:before{content:'\e640'}.icon-arrow-left:before{content:'\e641'}.icon-arrow-right-bold-circle-outline:before{content:'\e642'}.icon-arrow-right-bold-circle:before{content:'\e643'}.icon-arrow-right-bold-hexagon-outline:before{content:'\e644'}.icon-arrow-right-bold:before{content:'\e645'}.icon-arrow-right:before{content:'\e646'}.icon-arrow-top-left:before{content:'\e647'}.icon-arrow-top-right:before{content:'\e648'}.icon-arrow-up-bold-circle-outline:before{content:'\e649'}.icon-arrow-up-bold-circle:before{content:'\e64a'}.icon-arrow-up-bold-hexagon-outline:before{content:'\e64b'}.icon-arrow-up-bold:before{content:'\e64c'}.icon-arrow-up:before{content:'\e64d'}.icon-at:before{content:'\e64e'}.icon-attachment:before{content:'\e64f'}.icon-audiobook:before{content:'\e650'}.icon-auto-fix:before{content:'\e651'}.icon-auto-upload:before{content:'\e652'}.icon-baby:before{content:'\e653'}.icon-backburger:before{content:'\e654'}.icon-backup-restore:before{content:'\e655'}.icon-bank:before{content:'\e656'}.icon-barcode:before{content:'\e657'}.icon-barley:before{content:'\e658'}.icon-barrel:before{content:'\e659'}.icon-basecamp:before{content:'\e65a'}.icon-basket-fill:before{content:'\e65b'}.icon-basket-unfill:before{content:'\e65c'}.icon-basket:before{content:'\e65d'}.icon-battery-10:before{content:'\e65e'}.icon-battery-20:before{content:'\e65f'}.icon-battery-30:before{content:'\e660'}.icon-battery-40:before{content:'\e661'}.icon-battery-50:before{content:'\e662'}.icon-battery-60:before{content:'\e663'}.icon-battery-70:before{content:'\e664'}.icon-battery-80:before{content:'\e665'}.icon-battery-90:before{content:'\e666'}.icon-battery-alert:before{content:'\e667'}.icon-battery-charging-20:before{content:'\e668'}.icon-battery-charging-30:before{content:'\e669'}.icon-battery-charging-40:before{content:'\e66a'}.icon-battery-charging-60:before{content:'\e66b'}.icon-battery-charging-80:before{content:'\e66c'}.icon-battery-charging-90:before{content:'\e66d'}.icon-battery-charging-100:before{content:'\e66e'}.icon-battery-minus:before{content:'\e66f'}.icon-battery-negative:before{content:'\e670'}.icon-battery-outline:before{content:'\e671'}.icon-battery-plus:before{content:'\e672'}.icon-battery-positive:before{content:'\e673'}.icon-battery-standard:before{content:'\e674'}.icon-battery-unknown:before{content:'\e675'}.icon-battery:before{content:'\e676'}.icon-beach:before{content:'\e677'}.icon-beaker-empty-outline:before{content:'\e678'}.icon-beaker-empty:before{content:'\e679'}.icon-beaker-outline:before{content:'\e67a'}.icon-beaker:before{content:'\e67b'}.icon-beats:before{content:'\e67c'}.icon-beer:before{content:'\e67d'}.icon-behance:before{content:'\e67e'}.icon-bell-off:before{content:'\e67f'}.icon-bell-outline:before{content:'\e680'}.icon-bell-ring-outline:before{content:'\e681'}.icon-bell-ring:before{content:'\e682'}.icon-bell-sleep:before{content:'\e683'}.icon-bell:before{content:'\e684'}.icon-beta:before{content:'\e685'}.icon-bike:before{content:'\e686'}.icon-bing:before{content:'\e687'}.icon-binoculars:before{content:'\e688'}.icon-bio:before{content:'\e689'}.icon-bitbucket:before{content:'\e68a'}.icon-black-mesa:before{content:'\e68b'}.icon-blackberry:before{content:'\e68c'}.icon-blinds:before{content:'\e68d'}.icon-block-helper:before{content:'\e68e'}.icon-blogger:before{content:'\e68f'}.icon-bluetooth-audio:before{content:'\e690'}.icon-bluetooth-connect:before{content:'\e691'}.icon-bluetooth-settings:before{content:'\e692'}.icon-bluetooth-transfer:before{content:'\e693'}.icon-bluetooth:before{content:'\e694'}.icon-blur-linear:before{content:'\e695'}.icon-blur-off:before{content:'\e696'}.icon-blur-radial:before{content:'\e697'}.icon-blur:before{content:'\e698'}.icon-bone:before{content:'\e699'}.icon-book-multiple-variant:before{content:'\e69a'}.icon-book-multiple:before{content:'\e69b'}.icon-book-open:before{content:'\e69c'}.icon-book-variant:before{content:'\e69d'}.icon-book:before{content:'\e69e'}.icon-bookmark-check:before{content:'\e69f'}.icon-bookmark-music:before{content:'\e6a0'}.icon-bookmark-outline-plus:before{content:'\e6a1'}.icon-bookmark-outline:before{content:'\e6a2'}.icon-bookmark-plus:before{content:'\e6a3'}.icon-bookmark-remove:before{content:'\e6a4'}.icon-bookmark:before{content:'\e6a5'}.icon-border-all:before{content:'\e6a6'}.icon-border-bottom:before{content:'\e6a7'}.icon-border-color:before{content:'\e6a8'}.icon-border-horizontal:before{content:'\e6a9'}.icon-border-inside:before{content:'\e6aa'}.icon-border-left:before{content:'\e6ab'}.icon-border-none:before{content:'\e6ac'}.icon-border-outside:before{content:'\e6ad'}.icon-border-right:before{content:'\e6ae'}.icon-border-top:before{content:'\e6af'}.icon-border-vertical:before{content:'\e6b0'}.icon-bowling:before{content:'\e6b1'}.icon-box-download:before{content:'\e6b2'}.icon-box-upload:before{content:'\e6b3'}.icon-box:before{content:'\e6b4'}.icon-briefcase-checked:before{content:'\e6b5'}.icon-briefcase-download:before{content:'\e6b6'}.icon-briefcase-upload:before{content:'\e6b7'}.icon-briefcase:before{content:'\e6b8'}.icon-brightness-1:before{content:'\e6b9'}.icon-brightness-2:before{content:'\e6ba'}.icon-brightness-3:before{content:'\e6bb'}.icon-brightness-4:before{content:'\e6bc'}.icon-brightness-5:before{content:'\e6bd'}.icon-brightness-6:before{content:'\e6be'}.icon-brightness-7:before{content:'\e6bf'}.icon-brightness-auto:before{content:'\e6c0'}.icon-brightness:before{content:'\e6c1'}.icon-broom:before{content:'\e6c2'}.icon-brush:before{content:'\e6c3'}.icon-bug:before{content:'\e6c4'}.icon-bulletin-board:before{content:'\e6c5'}.icon-bullhorn:before{content:'\e6c6'}.icon-bus:before{content:'\e6c7'}.icon-cake-variant:before{content:'\e6c8'}.icon-cake:before{content:'\e6c9'}.icon-calculator:before{content:'\e6ca'}.icon-calendar-blank:before{content:'\e6cb'}.icon-calendar-check-multiple:before{content:'\e6cc'}.icon-calendar-check:before{content:'\e6cd'}.icon-calendar-clock:before{content:'\e6ce'}.icon-calendar-multiple:before{content:'\e6cf'}.icon-calendar-plus:before{content:'\e6d0'}.icon-calendar-remove:before{content:'\e6d1'}.icon-calendar-select:before{content:'\e6d2'}.icon-calendar-text:before{content:'\e6d3'}.icon-calendar-today:before{content:'\e6d4'}.icon-calendar:before{content:'\e6d5'}.icon-camcorder-box-off:before{content:'\e6d6'}.icon-camcorder-box:before{content:'\e6d7'}.icon-camcorder-off:before{content:'\e6d8'}.icon-camcorder:before{content:'\e6d9'}.icon-camera-front-variant:before{content:'\e6da'}.icon-camera-front:before{content:'\e6db'}.icon-camera-iris:before{content:'\e6dc'}.icon-camera-party-mode:before{content:'\e6dd'}.icon-camera-rear-variant:before{content:'\e6de'}.icon-camera-rear:before{content:'\e6df'}.icon-camera-switch:before{content:'\e6e0'}.icon-camera-timer:before{content:'\e6e1'}.icon-camera:before{content:'\e6e2'}.icon-cancel:before{content:'\e6e3'}.icon-candycane:before{content:'\e6e4'}.icon-car-wash:before{content:'\e6e5'}.icon-car:before{content:'\e6e6'}.icon-carrot:before{content:'\e6e7'}.icon-cart-outline:before{content:'\e6e8'}.icon-cart:before{content:'\e6e9'}.icon-cash-100:before{content:'\e6ea'}.icon-cash-multiple:before{content:'\e6eb'}.icon-cash-usd:before{content:'\e6ec'}.icon-cash:before{content:'\e6ed'}.icon-cast-connected:before{content:'\e6ee'}.icon-cast:before{content:'\e6ef'}.icon-castle:before{content:'\e6f0'}.icon-cat:before{content:'\e6f1'}.icon-cellphone-android:before{content:'\e6f2'}.icon-cellphone-dock:before{content:'\e6f3'}.icon-cellphone-iphone:before{content:'\e6f4'}.icon-cellphone-link-off:before{content:'\e6f5'}.icon-cellphone-link:before{content:'\e6f6'}.icon-cellphone-settings:before{content:'\e6f7'}.icon-cellphone:before{content:'\e6f8'}.icon-chair-school:before{content:'\e6f9'}.icon-chart-arc:before{content:'\e6fa'}.icon-chart-areaspline:before{content:'\e6fb'}.icon-chart-bar:before{content:'\e6fc'}.icon-chart-histogram:before{content:'\e6fd'}.icon-chart-line:before{content:'\e6fe'}.icon-chart-pie:before{content:'\e6ff'}.icon-check-all:before{content:'\e700'}.icon-check-bookmark:before{content:'\e701'}.icon-check-circle:before{content:'\e702'}.icon-check:before{content:'\e703'}.icon-checkbox-blank-circle-outline:before{content:'\e704'}.icon-checkbox-blank-circle:before{content:'\e705'}.icon-checkbox-blank-outline:before{content:'\e706'}.icon-checkbox-blank:before{content:'\e707'}.icon-checkbox-marked-circle-outline:before{content:'\e708'}.icon-checkbox-marked-circle:before{content:'\e709'}.icon-checkbox-marked-outline:before{content:'\e70a'}.icon-checkbox-marked:before{content:'\e70b'}.icon-checkbox-multiple-blank-outline:before{content:'\e70c'}.icon-checkbox-multiple-blank:before{content:'\e70d'}.icon-checkbox-multiple-marked-outline:before{content:'\e70e'}.icon-checkbox-multiple-marked:before{content:'\e70f'}.icon-checkerboard:before{content:'\e710'}.icon-chevron-double-down:before{content:'\e711'}.icon-chevron-double-left:before{content:'\e712'}.icon-chevron-double-right:before{content:'\e713'}.icon-chevron-double-up:before{content:'\e714'}.icon-chevron-down:before{content:'\e715'}.icon-chevron-left:before{content:'\e716'}.icon-chevron-right:before{content:'\e717'}.icon-chevron-up:before{content:'\e718'}.icon-church:before{content:'\e719'}.icon-cisco-webex:before{content:'\e71a'}.icon-city:before{content:'\e71b'}.icon-clapperboard:before{content:'\e71c'}.icon-clipboard-account:before{content:'\e71d'}.icon-clipboard-alert:before{content:'\e71e'}.icon-clipboard-arrow-down:before{content:'\e71f'}.icon-clipboard-arrow-left:before{content:'\e720'}.icon-clipboard-check:before{content:'\e721'}.icon-clipboard-outline:before{content:'\e722'}.icon-clipboard-text:before{content:'\e723'}.icon-clipboard:before{content:'\e724'}.icon-clippy:before{content:'\e725'}.icon-clock-fast:before{content:'\e726'}.icon-clock:before{content:'\e727'}.icon-close-circle-outline:before{content:'\e728'}.icon-close-circle:before{content:'\e729'}.icon-close-network:before{content:'\e72a'}.icon-close:before{content:'\e72b'}.icon-closed-caption:before{content:'\e72c'}.icon-cloud-check:before{content:'\e72d'}.icon-cloud-circle:before{content:'\e72e'}.icon-cloud-download:before{content:'\e72f'}.icon-cloud-outline-off:before{content:'\e730'}.icon-cloud-outline:before{content:'\e731'}.icon-cloud-upload:before{content:'\e732'}.icon-cloud:before{content:'\e733'}.icon-code-array:before{content:'\e734'}.icon-code-braces:before{content:'\e735'}.icon-code-equal:before{content:'\e736'}.icon-code-greater-than-or-equal:before{content:'\e737'}.icon-code-greater-than:before{content:'\e738'}.icon-code-less-than-or-equal:before{content:'\e739'}.icon-code-less-than:before{content:'\e73a'}.icon-code-not-equal-variant:before{content:'\e73b'}.icon-code-not-equal:before{content:'\e73c'}.icon-code-string:before{content:'\e73d'}.icon-code-tags:before{content:'\e73e'}.icon-codepen:before{content:'\e73f'}.icon-coffee-to-go:before{content:'\e740'}.icon-coffee:before{content:'\e741'}.icon-cog-box:before{content:'\e742'}.icon-cog:before{content:'\e743'}.icon-coin:before{content:'\e744'}.icon-color-helper:before{content:'\e745'}.icon-comment-account-outline:before{content:'\e746'}.icon-comment-account:before{content:'\e747'}.icon-comment-alert-outline:before{content:'\e748'}.icon-comment-alert:before{content:'\e749'}.icon-comment-check-outline:before{content:'\e74a'}.icon-comment-check:before{content:'\e74b'}.icon-comment-multipe-outline:before{content:'\e74c'}.icon-comment-outline:before{content:'\e74d'}.icon-comment-plus-outline:before{content:'\e74e'}.icon-comment-processing-outline:before{content:'\e74f'}.icon-comment-processing:before{content:'\e750'}.icon-comment-remove-outline:before{content:'\e751'}.icon-comment-text-outline:before{content:'\e752'}.icon-comment-text:before{content:'\e753'}.icon-comment:before{content:'\e754'}.icon-compare:before{content:'\e755'}.icon-compass-outline:before{content:'\e756'}.icon-compass:before{content:'\e757'}.icon-console:before{content:'\e758'}.icon-content-copy:before{content:'\e759'}.icon-content-cut:before{content:'\e75a'}.icon-content-duplicate:before{content:'\e75b'}.icon-content-paste:before{content:'\e75c'}.icon-content-save-all:before{content:'\e75d'}.icon-content-save:before{content:'\e75e'}.icon-contrast-box:before{content:'\e75f'}.icon-contrast-circle:before{content:'\e760'}.icon-contrast:before{content:'\e761'}.icon-controller-xbox:before{content:'\e762'}.icon-cow:before{content:'\e763'}.icon-credit-card-multiple:before{content:'\e764'}.icon-credit-card:before{content:'\e765'}.icon-crop-free:before{content:'\e766'}.icon-crop-landscape:before{content:'\e767'}.icon-crop-portrait:before{content:'\e768'}.icon-crop-square:before{content:'\e769'}.icon-crop:before{content:'\e76a'}.icon-crosshairs-gps:before{content:'\e76b'}.icon-crosshairs:before{content:'\e76c'}.icon-crown:before{content:'\e76d'}.icon-cube-outline:before{content:'\e76e'}.icon-cube-unfolded:before{content:'\e76f'}.icon-cube:before{content:'\e770'}.icon-cup-water:before{content:'\e771'}.icon-cup:before{content:'\e772'}.icon-currency-btc:before{content:'\e773'}.icon-currency-eur:before{content:'\e774'}.icon-currency-gbp:before{content:'\e775'}.icon-currency-inr:before{content:'\e776'}.icon-currency-rub:before{content:'\e777'}.icon-currency-try:before{content:'\e778'}.icon-currency-usd:before{content:'\e779'}.icon-cursor-default-outline:before{content:'\e77a'}.icon-cursor-default:before{content:'\e77b'}.icon-cursor-move:before{content:'\e77c'}.icon-cursor-pointer:before{content:'\e77d'}.icon-data:before{content:'\e77e'}.icon-debug-step-into:before{content:'\e77f'}.icon-debug-step-out:before{content:'\e780'}.icon-debug-step-over:before{content:'\e781'}.icon-decimal-decrease:before{content:'\e782'}.icon-decimal-increase:before{content:'\e783'}.icon-delete-variant:before{content:'\e784'}.icon-delete:before{content:'\e785'}.icon-deskphone:before{content:'\e786'}.icon-desktop-mac:before{content:'\e787'}.icon-desktop-tower:before{content:'\e788'}.icon-details:before{content:'\e789'}.icon-deviantart:before{content:'\e78a'}.icon-diamond:before{content:'\e78b'}.icon-dice-1:before{content:'\e78c'}.icon-dice-2:before{content:'\e78d'}.icon-dice-3:before{content:'\e78e'}.icon-dice-4:before{content:'\e78f'}.icon-dice-5:before{content:'\e790'}.icon-dice-6:before{content:'\e791'}.icon-dice:before{content:'\e792'}.icon-directions:before{content:'\e793'}.icon-disk-alert:before{content:'\e794'}.icon-disqus-outline:before{content:'\e795'}.icon-disqus:before{content:'\e796'}.icon-division-box:before{content:'\e797'}.icon-division:before{content:'\e798'}.icon-dns:before{content:'\e799'}.icon-document:before{content:'\e79a'}.icon-domain:before{content:'\e79b'}.icon-dots-horizontal:before{content:'\e79c'}.icon-dots-vertical:before{content:'\e79d'}.icon-download:before{content:'\e79e'}.icon-drag-horizontal:before{content:'\e79f'}.icon-drag-vertical:before{content:'\e7a0'}.icon-drag:before{content:'\e7a1'}.icon-drawing-box:before{content:'\e7a2'}.icon-drawing:before{content:'\e7a3'}.icon-dribbble-box:before{content:'\e7a4'}.icon-dribbble:before{content:'\e7a5'}.icon-drone:before{content:'\e7a6'}.icon-dropbox:before{content:'\e7a7'}.icon-drupal:before{content:'\e7a8'}.icon-duck:before{content:'\e7a9'}.icon-dumbbell:before{content:'\e7aa'}.icon-earth-off:before{content:'\e7ab'}.icon-earth:before{content:'\e7ac'}.icon-ebay:before{content:'\e7ad'}.icon-edge:before{content:'\e7ae'}.icon-eject:before{content:'\e7af'}.icon-elevation-decline:before{content:'\e7b0'}.icon-elevation-rise:before{content:'\e7b1'}.icon-elevator:before{content:'\e7b2'}.icon-email-open:before{content:'\e7b3'}.icon-email-secure:before{content:'\e7b4'}.icon-email:before{content:'\e7b5'}.icon-emoticon-cool:before{content:'\e7b6'}.icon-emoticon-devil:before{content:'\e7b7'}.icon-emoticon-happy:before{content:'\e7b8'}.icon-emoticon-neutral:before{content:'\e7b9'}.icon-emoticon-poop:before{content:'\e7ba'}.icon-emoticon-sad:before{content:'\e7bb'}.icon-emoticon-tongue:before{content:'\e7bc'}.icon-emoticon:before{content:'\e7bd'}.icon-engine-outline:before{content:'\e7be'}.icon-engine:before{content:'\e7bf'}.icon-equal-box:before{content:'\e7c0'}.icon-equal:before{content:'\e7c1'}.icon-eraser:before{content:'\e7c2'}.icon-escalator:before{content:'\e7c3'}.icon-etsy:before{content:'\e7c4'}.icon-evernote:before{content:'\e7c5'}.icon-exclamation:before{content:'\e7c6'}.icon-exit-to-app:before{content:'\e7c7'}.icon-export:before{content:'\e7c8'}.icon-eye-off:before{content:'\e7c9'}.icon-eye:before{content:'\e7ca'}.icon-eyedropper-variant:before{content:'\e7cb'}.icon-eyedropper:before{content:'\e7cc'}.icon-facebook-box:before{content:'\e7cd'}.icon-facebook:before{content:'\e7ce'}.icon-factory:before{content:'\e7cf'}.icon-fan:before{content:'\e7d0'}.icon-fast-forward:before{content:'\e7d1'}.icon-ferry:before{content:'\e7d2'}.icon-file-cloud:before{content:'\e7d3'}.icon-file-delimited:before{content:'\e7d4'}.icon-file-document-box:before{content:'\e7d5'}.icon-file-document:before{content:'\e7d6'}.icon-file-excel-box:before{content:'\e7d7'}.icon-file-excel:before{content:'\e7d8'}.icon-file-find:before{content:'\e7d9'}.icon-file-hidden:before{content:'\e7da'}.icon-file-image-box:before{content:'\e7db'}.icon-file-image:before{content:'\e7dc'}.icon-file-multiple:before{content:'\e7dd'}.icon-file-music:before{content:'\e7de'}.icon-file-outline:before{content:'\e7df'}.icon-file-pdf-box:before{content:'\e7e0'}.icon-file-pdf:before{content:'\e7e1'}.icon-file-powerpoint-box:before{content:'\e7e2'}.icon-file-powerpoint:before{content:'\e7e3'}.icon-file-presentation-box:before{content:'\e7e4'}.icon-file-video:before{content:'\e7e5'}.icon-file-word-box:before{content:'\e7e6'}.icon-file-word:before{content:'\e7e7'}.icon-file-xml:before{content:'\e7e8'}.icon-file:before{content:'\e7e9'}.icon-fill:before{content:'\e7ea'}.icon-film:before{content:'\e7eb'}.icon-filmstrip-off:before{content:'\e7ec'}.icon-filmstrip:before{content:'\e7ed'}.icon-filter-outline:before{content:'\e7ee'}.icon-filter-remove-outline:before{content:'\e7ef'}.icon-filter-remove:before{content:'\e7f0'}.icon-filter-variant:before{content:'\e7f1'}.icon-filter:before{content:'\e7f2'}.icon-fire:before{content:'\e7f3'}.icon-fish:before{content:'\e7f4'}.icon-flag-checkered-variant:before{content:'\e7f5'}.icon-flag-checkered:before{content:'\e7f6'}.icon-flag-outline-variant:before{content:'\e7f7'}.icon-flag-outline:before{content:'\e7f8'}.icon-flag-triangle:before{content:'\e7f9'}.icon-flag-variant:before{content:'\e7fa'}.icon-flag:before{content:'\e7fb'}.icon-flash-auto:before{content:'\e7fc'}.icon-flash-off:before{content:'\e7fd'}.icon-flash:before{content:'\e7fe'}.icon-flashlight-off:before{content:'\e7ff'}.icon-flashlight:before{content:'\e800'}.icon-flattr:before{content:'\e801'}.icon-flickr-after:before{content:'\e802'}.icon-flickr-before:before{content:'\e803'}.icon-flip-to-back:before{content:'\e804'}.icon-flip-to-front:before{content:'\e805'}.icon-floppy:before{content:'\e806'}.icon-flower:before{content:'\e807'}.icon-folder-account:before{content:'\e808'}.icon-folder-download:before{content:'\e809'}.icon-folder-google-drive:before{content:'\e80a'}.icon-folder-image:before{content:'\e80b'}.icon-folder-lock-open:before{content:'\e80c'}.icon-folder-lock:before{content:'\e80d'}.icon-folder-move:before{content:'\e80e'}.icon-folder-multiple-image:before{content:'\e80f'}.icon-folder-multiple-outline:before{content:'\e810'}.icon-folder-multiple:before{content:'\e811'}.icon-folder-outline-lock:before{content:'\e812'}.icon-folder-outline:before{content:'\e813'}.icon-folder-plus:before{content:'\e814'}.icon-folder-remove:before{content:'\e815'}.icon-folder-upload:before{content:'\e816'}.icon-folder:before{content:'\e817'}.icon-food-apple:before{content:'\e818'}.icon-food-variant:before{content:'\e819'}.icon-food:before{content:'\e81a'}.icon-football-helmet:before{content:'\e81b'}.icon-football:before{content:'\e81c'}.icon-format-align-center:before{content:'\e81d'}.icon-format-align-justify:before{content:'\e81e'}.icon-format-align-left:before{content:'\e81f'}.icon-format-align-right:before{content:'\e820'}.icon-format-bold:before{content:'\e821'}.icon-format-clear:before{content:'\e822'}.icon-format-color-fill:before{content:'\e823'}.icon-format-color:before{content:'\e824'}.icon-format-float-center:before{content:'\e825'}.icon-format-float-left:before{content:'\e826'}.icon-format-float-none:before{content:'\e827'}.icon-format-float-right:before{content:'\e828'}.icon-format-header-1:before{content:'\e829'}.icon-format-header-2:before{content:'\e82a'}.icon-format-header-3:before{content:'\e82b'}.icon-format-header-4:before{content:'\e82c'}.icon-format-header-5:before{content:'\e82d'}.icon-format-header-6:before{content:'\e82e'}.icon-format-header-decrease:before{content:'\e82f'}.icon-format-header-down:before{content:'\e830'}.icon-format-header-equal:before{content:'\e831'}.icon-format-header-increase:before{content:'\e832'}.icon-format-header-pound:before{content:'\e833'}.icon-format-header-up:before{content:'\e834'}.icon-format-indent-decrease:before{content:'\e835'}.icon-format-indent-increase:before{content:'\e836'}.icon-format-italic:before{content:'\e837'}.icon-format-line-spacing:before{content:'\e838'}.icon-format-list-bulleted:before{content:'\e839'}.icon-format-list-numbers:before{content:'\e83a'}.icon-format-object-inline:before{content:'\e83b'}.icon-format-object-square:before{content:'\e83c'}.icon-format-object-tight:before{content:'\e83d'}.icon-format-object-top-bottom:before{content:'\e83e'}.icon-format-paint:before{content:'\e83f'}.icon-format-paragraph:before{content:'\e840'}.icon-format-quote:before{content:'\e841'}.icon-format-size:before{content:'\e842'}.icon-format-strikethrough:before{content:'\e843'}.icon-format-subscript:before{content:'\e844'}.icon-format-superscript:before{content:'\e845'}.icon-format-text:before{content:'\e846'}.icon-format-textdirection-l-to-r:before{content:'\e847'}.icon-format-textdirection-r-to-l:before{content:'\e848'}.icon-format-underline:before{content:'\e849'}.icon-forum:before{content:'\e84a'}.icon-forward:before{content:'\e84b'}.icon-foursquare:before{content:'\e84c'}.icon-fridge:before{content:'\e84d'}.icon-fullscreen-exit:before{content:'\e84e'}.icon-fullscreen:before{content:'\e84f'}.icon-function:before{content:'\e850'}.icon-gamepad-variant:before{content:'\e851'}.icon-gamepad:before{content:'\e852'}.icon-gas-station:before{content:'\e853'}.icon-gavel:before{content:'\e854'}.icon-gender-female:before{content:'\e855'}.icon-gender-male-female:before{content:'\e856'}.icon-gender-male:before{content:'\e857'}.icon-gender-transgender:before{content:'\e858'}.icon-gift:before{content:'\e859'}.icon-git:before{content:'\e85a'}.icon-github-box:before{content:'\e85b'}.icon-github:before{content:'\e85c'}.icon-glass-flute:before{content:'\e85d'}.icon-glass-mug:before{content:'\e85e'}.icon-glass-stange:before{content:'\e85f'}.icon-glass-tulip:before{content:'\e860'}.icon-glasses:before{content:'\e861'}.icon-gmail:before{content:'\e862'}.icon-google-chrome:before{content:'\e863'}.icon-google-circles-communities:before{content:'\e864'}.icon-google-circles-extended:before{content:'\e865'}.icon-google-circles-invite:before{content:'\e866'}.icon-google-circles:before{content:'\e867'}.icon-google-controller-off:before{content:'\e868'}.icon-google-controller:before{content:'\e869'}.icon-google-drive:before{content:'\e86a'}.icon-google-earth:before{content:'\e86b'}.icon-google-glass:before{content:'\e86c'}.icon-google-maps:before{content:'\e86d'}.icon-google-pages:before{content:'\e86e'}.icon-google-play:before{content:'\e86f'}.icon-google-plus-box:before{content:'\e870'}.icon-google-plus:before{content:'\e871'}.icon-google:before{content:'\e872'}.icon-grid-off:before{content:'\e873'}.icon-grid:before{content:'\e874'}.icon-group:before{content:'\e875'}.icon-hand-pointing-right:before{content:'\e876'}.icon-hanger:before{content:'\e877'}.icon-hangouts:before{content:'\e878'}.icon-harddisk:before{content:'\e879'}.icon-headphones-box:before{content:'\e87a'}.icon-headphones-dots:before{content:'\e87b'}.icon-headphones:before{content:'\e87c'}.icon-headset-dock:before{content:'\e87d'}.icon-headset-off:before{content:'\e87e'}.icon-headset:before{content:'\e87f'}.icon-heart-box-outline:before{content:'\e880'}.icon-heart-box:before{content:'\e881'}.icon-heart-broken:before{content:'\e882'}.icon-heart-outline:before{content:'\e883'}.icon-heart:before{content:'\e884'}.icon-help-circle:before{content:'\e885'}.icon-help:before{content:'\e886'}.icon-hexagon-outline:before{content:'\e887'}.icon-hexagon:before{content:'\e888'}.icon-history:before{content:'\e889'}.icon-hololens:before{content:'\e88a'}.icon-home-modern:before{content:'\e88b'}.icon-home-variant:before{content:'\e88c'}.icon-home:before{content:'\e88d'}.icon-hops:before{content:'\e88e'}.icon-hospital-building:before{content:'\e88f'}.icon-hospital-marker:before{content:'\e890'}.icon-hospital:before{content:'\e891'}.icon-hotel:before{content:'\e892'}.icon-houzz-box:before{content:'\e893'}.icon-human-child:before{content:'\e894'}.icon-human-male-female:before{content:'\e895'}.icon-human:before{content:'\e896'}.icon-image-album:before{content:'\e897'}.icon-image-area-close:before{content:'\e898'}.icon-image-area:before{content:'\e899'}.icon-image-broken:before{content:'\e89a'}.icon-image-filter-black-white:before{content:'\e89b'}.icon-image-filter-center-focus:before{content:'\e89c'}.icon-image-filter-drama:before{content:'\e89d'}.icon-image-filter-frames:before{content:'\e89e'}.icon-image-filter-hdr:before{content:'\e89f'}.icon-image-filter-none:before{content:'\e8a0'}.icon-image-filter-tilt-shift:before{content:'\e8a1'}.icon-image-filter-vintage:before{content:'\e8a2'}.icon-image-filter:before{content:'\e8a3'}.icon-image:before{content:'\e8a4'}.icon-import:before{content:'\e8a5'}.icon-inbox:before{content:'\e8a6'}.icon-indent:before{content:'\e8a7'}.icon-information-outline:before{content:'\e8a8'}.icon-information:before{content:'\e8a9'}.icon-instagram:before{content:'\e8aa'}.icon-instapaper:before{content:'\e8ab'}.icon-internet-explorer:before{content:'\e8ac'}.icon-invert-colors:before{content:'\e8ad'}.icon-jira:before{content:'\e8ae'}.icon-jsfiddle:before{content:'\e8af'}.icon-keg:before{content:'\e8b0'}.icon-key-change:before{content:'\e8b1'}.icon-key-minus:before{content:'\e8b2'}.icon-key-plus:before{content:'\e8b3'}.icon-key-remove:before{content:'\e8b4'}.icon-key-variant:before{content:'\e8b5'}.icon-key:before{content:'\e8b6'}.icon-keyboard-backspace:before{content:'\e8b7'}.icon-keyboard-caps:before{content:'\e8b8'}.icon-keyboard-close:before{content:'\e8b9'}.icon-keyboard-off:before{content:'\e8ba'}.icon-keyboard-return:before{content:'\e8bb'}.icon-keyboard-tab:before{content:'\e8bc'}.icon-keyboard-variant:before{content:'\e8bd'}.icon-keyboard:before{content:'\e8be'}.icon-label-outline:before{content:'\e8bf'}.icon-label:before{content:'\e8c0'}.icon-language-csharp:before{content:'\e8c1'}.icon-language-css3:before{content:'\e8c2'}.icon-language-html5:before{content:'\e8c3'}.icon-language-javascript:before{content:'\e8c4'}.icon-language-python-text:before{content:'\e8c5'}.icon-language-python:before{content:'\e8c6'}.icon-laptop-chromebook:before{content:'\e8c7'}.icon-laptop-mac:before{content:'\e8c8'}.icon-laptop-windows:before{content:'\e8c9'}.icon-laptop:before{content:'\e8ca'}.icon-lastfm:before{content:'\e8cb'}.icon-launch:before{content:'\e8cc'}.icon-layers-off:before{content:'\e8cd'}.icon-layers:before{content:'\e8ce'}.icon-leaf:before{content:'\e8cf'}.icon-library-books:before{content:'\e8d0'}.icon-library-music:before{content:'\e8d1'}.icon-library-plus:before{content:'\e8d2'}.icon-library:before{content:'\e8d3'}.icon-lightbulb-outline:before{content:'\e8d4'}.icon-lightbulb:before{content:'\e8d5'}.icon-link-off:before{content:'\e8d6'}.icon-link-variant-off:before{content:'\e8d7'}.icon-link-variant:before{content:'\e8d8'}.icon-link:before{content:'\e8d9'}.icon-linkedin-box:before{content:'\e8da'}.icon-linkedin:before{content:'\e8db'}.icon-linode:before{content:'\e8dc'}.icon-linux:before{content:'\e8dd'}.icon-lock-outline:before{content:'\e8de'}.icon-lock-unlocked-outline:before{content:'\e8df'}.icon-lock-unlocked:before{content:'\e8e0'}.icon-lock:before{content:'\e8e1'}.icon-login:before{content:'\e8e2'}.icon-logout:before{content:'\e8e3'}.icon-looks:before{content:'\e8e4'}.icon-loupe:before{content:'\e8e5'}.icon-lumx:before{content:'\e8e6'}.icon-magnet-on:before{content:'\e8e7'}.icon-magnet:before{content:'\e8e8'}.icon-magnify-minus:before{content:'\e8e9'}.icon-magnify-plus:before{content:'\e8ea'}.icon-magnify:before{content:'\e8eb'}.icon-mail-ru:before{content:'\e8ec'}.icon-map-marker-circle:before{content:'\e8ed'}.icon-map-marker-multiple:before{content:'\e8ee'}.icon-map-marker-off:before{content:'\e8ef'}.icon-map-marker-radius:before{content:'\e8f0'}.icon-map-marker:before{content:'\e8f1'}.icon-map:before{content:'\e8f2'}.icon-margin:before{content:'\e8f3'}.icon-markdown:before{content:'\e8f4'}.icon-marker-check:before{content:'\e8f5'}.icon-martini:before{content:'\e8f6'}.icon-material-ui:before{content:'\e8f7'}.icon-maxcdn:before{content:'\e8f8'}.icon-medium:before{content:'\e8f9'}.icon-memory:before{content:'\e8fa'}.icon-menu-down:before{content:'\e8fb'}.icon-menu-left:before{content:'\e8fc'}.icon-menu-right:before{content:'\e8fd'}.icon-menu-up:before{content:'\e8fe'}.icon-menu:before{content:'\e8ff'}.icon-message-alert:before{content:'\e900'}.icon-message-draw:before{content:'\e901'}.icon-message-image:before{content:'\e902'}.icon-message-processing:before{content:'\e903'}.icon-message-reply:before{content:'\e904'}.icon-message-text-outline:before{content:'\e905'}.icon-message-text:before{content:'\e906'}.icon-message-video:before{content:'\e907'}.icon-message:before{content:'\e908'}.icon-microphone-dots:before{content:'\e909'}.icon-microphone-off:before{content:'\e90a'}.icon-microphone-outline:before{content:'\e90b'}.icon-microphone-settings:before{content:'\e90c'}.icon-microphone-variant-off:before{content:'\e90d'}.icon-microphone-variant:before{content:'\e90e'}.icon-microphone:before{content:'\e90f'}.icon-minus-box:before{content:'\e910'}.icon-minus-circle-outline:before{content:'\e911'}.icon-minus-circle:before{content:'\e912'}.icon-minus-network:before{content:'\e913'}.icon-minus:before{content:'\e914'}.icon-monitor-multiple:before{content:'\e915'}.icon-monitor:before{content:'\e916'}.icon-more:before{content:'\e917'}.icon-mouse-off:before{content:'\e918'}.icon-mouse-variant-off:before{content:'\e919'}.icon-mouse-variant:before{content:'\e91a'}.icon-mouse:before{content:'\e91b'}.icon-movie:before{content:'\e91c'}.icon-multiplication-box:before{content:'\e91d'}.icon-multiplication:before{content:'\e91e'}.icon-music-box-outline:before{content:'\e91f'}.icon-music-box:before{content:'\e920'}.icon-music-circle:before{content:'\e921'}.icon-music-note-eighth:before{content:'\e922'}.icon-music-note-half:before{content:'\e923'}.icon-music-note-off:before{content:'\e924'}.icon-music-note-quarter:before{content:'\e925'}.icon-music-note-sixteenth:before{content:'\e926'}.icon-music-note-whole:before{content:'\e927'}.icon-music-note:before{content:'\e928'}.icon-nature-people:before{content:'\e929'}.icon-nature:before{content:'\e92a'}.icon-navigation:before{content:'\e92b'}.icon-needle:before{content:'\e92c'}.icon-nest-protect:before{content:'\e92d'}.icon-nest-thermostat:before{content:'\e92e'}.icon-newspaper:before{content:'\e92f'}.icon-nfc-tap:before{content:'\e930'}.icon-nfc-variant:before{content:'\e931'}.icon-nfc:before{content:'\e932'}.icon-no:before{content:'\e933'}.icon-not-equal:before{content:'\e934'}.icon-note-outline:before{content:'\e935'}.icon-note-text:before{content:'\e936'}.icon-note:before{content:'\e937'}.icon-numeric-0-box-multiple-outline:before{content:'\e938'}.icon-numeric-0-box-outline:before{content:'\e939'}.icon-numeric-0-box:before{content:'\e93a'}.icon-numeric-1-box-multiple-outline:before{content:'\e93b'}.icon-numeric-1-box-outline:before{content:'\e93c'}.icon-numeric-1-box:before{content:'\e93d'}.icon-numeric-2-box-multiple-outline:before{content:'\e93e'}.icon-numeric-2-box-outline:before{content:'\e93f'}.icon-numeric-2-box:before{content:'\e940'}.icon-numeric-3-box-multiple-outline:before{content:'\e941'}.icon-numeric-3-box-outline:before{content:'\e942'}.icon-numeric-3-box:before{content:'\e943'}.icon-numeric-4-box-multiple-outline:before{content:'\e944'}.icon-numeric-4-box-outline:before{content:'\e945'}.icon-numeric-4-box:before{content:'\e946'}.icon-numeric-5-box-multiple-outline:before{content:'\e947'}.icon-numeric-5-box-outline:before{content:'\e948'}.icon-numeric-5-box:before{content:'\e949'}.icon-numeric-6-box-multiple-outline:before{content:'\e94a'}.icon-numeric-6-box-outline:before{content:'\e94b'}.icon-numeric-6-box:before{content:'\e94c'}.icon-numeric-7-box-multiple-outline:before{content:'\e94d'}.icon-numeric-7-box-outline:before{content:'\e94e'}.icon-numeric-7-box:before{content:'\e94f'}.icon-numeric-8-box-multiple-outline:before{content:'\e950'}.icon-numeric-8-box-outline:before{content:'\e951'}.icon-numeric-8-box:before{content:'\e952'}.icon-numeric-9-box-multiple-outline:before{content:'\e953'}.icon-numeric-9-box-outline:before{content:'\e954'}.icon-numeric-9-box:before{content:'\e955'}.icon-numeric-9-plus-box-multiple-outline:before{content:'\e956'}.icon-numeric-9-plus-box-outline:before{content:'\e957'}.icon-numeric-9-plus-box:before{content:'\e958'}.icon-numeric:before{content:'\e959'}.icon-nutriton:before{content:'\e95a'}.icon-odnoklassniki:before{content:'\e95b'}.icon-office:before{content:'\e95c'}.icon-oil:before{content:'\e95d'}.icon-omega:before{content:'\e95e'}.icon-onedrive:before{content:'\e95f'}.icon-open-in-app:before{content:'\e960'}.icon-open-in-new:before{content:'\e961'}.icon-ornament-variant:before{content:'\e962'}.icon-ornament:before{content:'\e963'}.icon-outbox:before{content:'\e964'}.icon-outdent:before{content:'\e965'}.icon-owl:before{content:'\e966'}.icon-package-down:before{content:'\e967'}.icon-package-up:before{content:'\e968'}.icon-package-variant-closed:before{content:'\e969'}.icon-package-variant:before{content:'\e96a'}.icon-package:before{content:'\e96b'}.icon-palette-advanced:before{content:'\e96c'}.icon-palette:before{content:'\e96d'}.icon-panda:before{content:'\e96e'}.icon-pandora:before{content:'\e96f'}.icon-panorama-fisheye:before{content:'\e970'}.icon-panorama-horizontal:before{content:'\e971'}.icon-panorama-vertical:before{content:'\e972'}.icon-panorama-wide-angle:before{content:'\e973'}.icon-panorama:before{content:'\e974'}.icon-paper-cut-vertical:before{content:'\e975'}.icon-paperclip:before{content:'\e976'}.icon-parking:before{content:'\e977'}.icon-pause-circle-outline:before{content:'\e978'}.icon-pause-circle:before{content:'\e979'}.icon-pause-octagon-outline:before{content:'\e97a'}.icon-pause-octagon:before{content:'\e97b'}.icon-pause:before{content:'\e97c'}.icon-paw:before{content:'\e97d'}.icon-pen:before{content:'\e97e'}.icon-pencil-box-outline:before{content:'\e97f'}.icon-pencil-box:before{content:'\e980'}.icon-pencil:before{content:'\e981'}.icon-people:before{content:'\e982'}.icon-percent:before{content:'\e983'}.icon-person-box:before{content:'\e984'}.icon-person-minus:before{content:'\e985'}.icon-person-plus:before{content:'\e986'}.icon-pharmacy:before{content:'\e987'}.icon-phone-bluetooth:before{content:'\e988'}.icon-phone-dots:before{content:'\e989'}.icon-phone-forward:before{content:'\e98a'}.icon-phone-hangup:before{content:'\e98b'}.icon-phone-in-talk:before{content:'\e98c'}.icon-phone-incoming:before{content:'\e98d'}.icon-phone-locked:before{content:'\e98e'}.icon-phone-log:before{content:'\e98f'}.icon-phone-missed:before{content:'\e990'}.icon-phone-outgoing:before{content:'\e991'}.icon-phone-paused:before{content:'\e992'}.icon-phone:before{content:'\e993'}.icon-picture:before{content:'\e994'}.icon-pig:before{content:'\e995'}.icon-pill:before{content:'\e996'}.icon-pin-off:before{content:'\e997'}.icon-pin:before{content:'\e998'}.icon-pine-tree-box:before{content:'\e999'}.icon-pine-tree:before{content:'\e99a'}.icon-pinterest-box:before{content:'\e99b'}.icon-pinterest:before{content:'\e99c'}.icon-pizza:before{content:'\e99d'}.icon-plane:before{content:'\e99e'}.icon-play-box-outline:before{content:'\e99f'}.icon-play-circle-outline:before{content:'\e9a0'}.icon-play-circle:before{content:'\e9a1'}.icon-play:before{content:'\e9a2'}.icon-playlist-minus:before{content:'\e9a3'}.icon-playlist-plus:before{content:'\e9a4'}.icon-playstation:before{content:'\e9a5'}.icon-plus-box:before{content:'\e9a6'}.icon-plus-circle-outline:before{content:'\e9a7'}.icon-plus-circle:before{content:'\e9a8'}.icon-plus-network:before{content:'\e9a9'}.icon-plus-one:before{content:'\e9aa'}.icon-plus:before{content:'\e9ab'}.icon-pocket:before{content:'\e9ac'}.icon-poll-box:before{content:'\e9ad'}.icon-poll:before{content:'\e9ae'}.icon-polymer:before{content:'\e9af'}.icon-popcorn:before{content:'\e9b0'}.icon-pound-box:before{content:'\e9b1'}.icon-pound:before{content:'\e9b2'}.icon-power-settings:before{content:'\e9b3'}.icon-power-socket:before{content:'\e9b4'}.icon-power:before{content:'\e9b5'}.icon-presentation-play:before{content:'\e9b6'}.icon-presentation:before{content:'\e9b7'}.icon-printer-3d:before{content:'\e9b8'}.icon-printer:before{content:'\e9b9'}.icon-pulse:before{content:'\e9ba'}.icon-puzzle:before{content:'\e9bb'}.icon-qrcode:before{content:'\e9bc'}.icon-quadcopter:before{content:'\e9bd'}.icon-quality-high:before{content:'\e9be'}.icon-question-mark-circle:before{content:'\e9bf'}.icon-quick-reply:before{content:'\e9c0'}.icon-quicktime:before{content:'\e9c1'}.icon-rabbit:before{content:'\e9c2'}.icon-radiator:before{content:'\e9c3'}.icon-radio-tower:before{content:'\e9c4'}.icon-radio:before{content:'\e9c5'}.icon-radioactive:before{content:'\e9c6'}.icon-radiobox-blank:before{content:'\e9c7'}.icon-radiobox-marked:before{content:'\e9c8'}.icon-raspberrypi:before{content:'\e9c9'}.icon-rdio:before{content:'\e9ca'}.icon-read:before{content:'\e9cb'}.icon-readability:before{content:'\e9cc'}.icon-receipt:before{content:'\e9cd'}.icon-recycle:before{content:'\e9ce'}.icon-reddit:before{content:'\e9cf'}.icon-redo-variant:before{content:'\e9d0'}.icon-redo:before{content:'\e9d1'}.icon-refresh:before{content:'\e9d2'}.icon-relative-scale:before{content:'\e9d3'}.icon-reload:before{content:'\e9d4'}.icon-remote:before{content:'\e9d5'}.icon-rename-box:before{content:'\e9d6'}.icon-repeat-off:before{content:'\e9d7'}.icon-repeat-once:before{content:'\e9d8'}.icon-repeat:before{content:'\e9d9'}.icon-replay:before{content:'\e9da'}.icon-reply-all:before{content:'\e9db'}.icon-reply:before{content:'\e9dc'}.icon-reproduction:before{content:'\e9dd'}.icon-resize-bottom-right:before{content:'\e9de'}.icon-responsive:before{content:'\e9df'}.icon-restore:before{content:'\e9e0'}.icon-rewind:before{content:'\e9e1'}.icon-ribbon:before{content:'\e9e2'}.icon-road:before{content:'\e9e3'}.icon-rocket:before{content:'\e9e4'}.icon-rotate-3d:before{content:'\e9e5'}.icon-rotate-left-variant:before{content:'\e9e6'}.icon-rotate-left:before{content:'\e9e7'}.icon-rotate-right-variant:before{content:'\e9e8'}.icon-rotate-right:before{content:'\e9e9'}.icon-routes:before{content:'\e9ea'}.icon-rss-box:before{content:'\e9eb'}.icon-ruler:before{content:'\e9ec'}.icon-run:before{content:'\e9ed'}.icon-sale:before{content:'\e9ee'}.icon-satellite-variant:before{content:'\e9ef'}.icon-satellite:before{content:'\e9f0'}.icon-scale-bathroom:before{content:'\e9f1'}.icon-scale:before{content:'\e9f2'}.icon-school:before{content:'\e9f3'}.icon-screen-rotation-lock:before{content:'\e9f4'}.icon-screen-rotation:before{content:'\e9f5'}.icon-script:before{content:'\e9f6'}.icon-security-network:before{content:'\e9f7'}.icon-security:before{content:'\e9f8'}.icon-select-all:before{content:'\e9f9'}.icon-select-inverse:before{content:'\e9fa'}.icon-select-off:before{content:'\e9fb'}.icon-select:before{content:'\e9fc'}.icon-send:before{content:'\e9fd'}.icon-server-minus:before{content:'\e9fe'}.icon-server-network-off:before{content:'\e9ff'}.icon-server-network:before{content:'\ea00'}.icon-server-off:before{content:'\ea01'}.icon-server-plus:before{content:'\ea02'}.icon-server-remove:before{content:'\ea03'}.icon-server-security:before{content:'\ea04'}.icon-server:before{content:'\ea05'}.icon-shape-plus:before{content:'\ea06'}.icon-share-variant:before{content:'\ea07'}.icon-share:before{content:'\ea08'}.icon-shield-outline:before{content:'\ea09'}.icon-shield:before{content:'\ea0a'}.icon-shopping-music:before{content:'\ea0b'}.icon-shopping:before{content:'\ea0c'}.icon-shuffle:before{content:'\ea0d'}.icon-sigma:before{content:'\ea0e'}.icon-sign-caution:before{content:'\ea0f'}.icon-signal:before{content:'\ea10'}.icon-silverware-fork:before{content:'\ea11'}.icon-silverware-spoon:before{content:'\ea12'}.icon-silverware-variant:before{content:'\ea13'}.icon-silverware:before{content:'\ea14'}.icon-sim-alert:before{content:'\ea15'}.icon-sim:before{content:'\ea16'}.icon-sitemap:before{content:'\ea17'}.icon-skip-next:before{content:'\ea18'}.icon-skip-previous:before{content:'\ea19'}.icon-skype-business:before{content:'\ea1a'}.icon-skype:before{content:'\ea1b'}.icon-sleep-off:before{content:'\ea1c'}.icon-sleep:before{content:'\ea1d'}.icon-smoking-off:before{content:'\ea1e'}.icon-smoking:before{content:'\ea1f'}.icon-snapchat:before{content:'\ea20'}.icon-snowman:before{content:'\ea21'}.icon-sofa:before{content:'\ea22'}.icon-sort-alphabetical:before{content:'\ea23'}.icon-sort-ascending:before{content:'\ea24'}.icon-sort-descending:before{content:'\ea25'}.icon-sort-numeric:before{content:'\ea26'}.icon-sort-variant:before{content:'\ea27'}.icon-sort:before{content:'\ea28'}.icon-soundcloud:before{content:'\ea29'}.icon-source-fork:before{content:'\ea2a'}.icon-source-pull:before{content:'\ea2b'}.icon-speaker-off:before{content:'\ea2c'}.icon-speaker:before{content:'\ea2d'}.icon-speedometer:before{content:'\ea2e'}.icon-spellcheck:before{content:'\ea2f'}.icon-spotify:before{content:'\ea30'}.icon-spotlight-beam:before{content:'\ea31'}.icon-spotlight:before{content:'\ea32'}.icon-spreadsheet:before{content:'\ea33'}.icon-square-inc-cash:before{content:'\ea34'}.icon-square-inc:before{content:'\ea35'}.icon-stackoverflow:before{content:'\ea36'}.icon-star-circle:before{content:'\ea37'}.icon-star-half:before{content:'\ea38'}.icon-star-of-david:before{content:'\ea39'}.icon-star-outline:before{content:'\ea3a'}.icon-star:before{content:'\ea3b'}.icon-steam:before{content:'\ea3c'}.icon-stethoscope:before{content:'\ea3d'}.icon-stocking:before{content:'\ea3e'}.icon-stop:before{content:'\ea3f'}.icon-store-24-hour:before{content:'\ea40'}.icon-store:before{content:'\ea41'}.icon-stove:before{content:'\ea42'}.icon-subway:before{content:'\ea43'}.icon-sunglasses:before{content:'\ea44'}.icon-swap-horizontal:before{content:'\ea45'}.icon-swap-vertical:before{content:'\ea46'}.icon-swim:before{content:'\ea47'}.icon-sword:before{content:'\ea48'}.icon-sync-alert:before{content:'\ea49'}.icon-sync-off:before{content:'\ea4a'}.icon-sync:before{content:'\ea4b'}.icon-tab-unselected:before{content:'\ea4c'}.icon-tab:before{content:'\ea4d'}.icon-table-column-plus-after:before{content:'\ea4e'}.icon-table-column-plus-before:before{content:'\ea4f'}.icon-table-column-remove:before{content:'\ea50'}.icon-table-column-width:before{content:'\ea51'}.icon-table-edit:before{content:'\ea52'}.icon-table-large:before{content:'\ea53'}.icon-table-row-height:before{content:'\ea54'}.icon-table-row-plus-after:before{content:'\ea55'}.icon-table-row-plus-before:before{content:'\ea56'}.icon-table-row-remove:before{content:'\ea57'}.icon-table:before{content:'\ea58'}.icon-tablet-android:before{content:'\ea59'}.icon-tablet-ipad:before{content:'\ea5a'}.icon-tablet:before{content:'\ea5b'}.icon-tag-faces:before{content:'\ea5c'}.icon-tag-multiple:before{content:'\ea5d'}.icon-tag-outline:before{content:'\ea5e'}.icon-tag-text-outline:before{content:'\ea5f'}.icon-tag:before{content:'\ea60'}.icon-taxi:before{content:'\ea61'}.icon-teamviewer:before{content:'\ea62'}.icon-telegram:before{content:'\ea63'}.icon-television-guide:before{content:'\ea64'}.icon-television:before{content:'\ea65'}.icon-temperature-celsius:before{content:'\ea66'}.icon-temperature-fahrenheit:before{content:'\ea67'}.icon-temperature-kelvin:before{content:'\ea68'}.icon-tennis:before{content:'\ea69'}.icon-tent:before{content:'\ea6a'}.icon-terrain:before{content:'\ea6b'}.icon-text-to-speech-off:before{content:'\ea6c'}.icon-text-to-speech:before{content:'\ea6d'}.icon-texture:before{content:'\ea6e'}.icon-theater:before{content:'\ea6f'}.icon-theme-light-dark:before{content:'\ea70'}.icon-thermometer-lines:before{content:'\ea71'}.icon-thermometer:before{content:'\ea72'}.icon-thumb-down-outline:before{content:'\ea73'}.icon-thumb-down:before{content:'\ea74'}.icon-thumb-up-outline:before{content:'\ea75'}.icon-thumb-up:before{content:'\ea76'}.icon-thumbs-up-down:before{content:'\ea77'}.icon-ticket-account:before{content:'\ea78'}.icon-ticket:before{content:'\ea79'}.icon-tie:before{content:'\ea7a'}.icon-tile-four:before{content:'\ea7b'}.icon-timelapse:before{content:'\ea7c'}.icon-timer-3:before{content:'\ea7d'}.icon-timer-10:before{content:'\ea7e'}.icon-timer-off:before{content:'\ea7f'}.icon-timer-sand:before{content:'\ea80'}.icon-timer:before{content:'\ea81'}.icon-timetable:before{content:'\ea82'}.icon-toggle-switch-off:before{content:'\ea83'}.icon-toggle-switch-on:before{content:'\ea84'}.icon-tooltip-edit:before{content:'\ea85'}.icon-tooltip-image:before{content:'\ea86'}.icon-tooltip-outline-plus:before{content:'\ea87'}.icon-tooltip-outline:before{content:'\ea88'}.icon-tooltip-text:before{content:'\ea89'}.icon-tooltip:before{content:'\ea8a'}.icon-tor:before{content:'\ea8b'}.icon-traffic-light:before{content:'\ea8c'}.icon-train:before{content:'\ea8d'}.icon-tram:before{content:'\ea8e'}.icon-transcribe-close:before{content:'\ea8f'}.icon-transcribe:before{content:'\ea90'}.icon-transfer:before{content:'\ea91'}.icon-trash:before{content:'\ea92'}.icon-tree:before{content:'\ea93'}.icon-trello:before{content:'\ea94'}.icon-trending-down:before{content:'\ea95'}.icon-trending-neutral:before{content:'\ea96'}.icon-trending-up:before{content:'\ea97'}.icon-truck:before{content:'\ea98'}.icon-tshirt-crew:before{content:'\ea99'}.icon-tshirt-v:before{content:'\ea9a'}.icon-tumblr-reblog:before{content:'\ea9b'}.icon-tumblr:before{content:'\ea9c'}.icon-twitch:before{content:'\ea9d'}.icon-twitter-box:before{content:'\ea9e'}.icon-twitter-circle:before{content:'\ea9f'}.icon-twitter-retweet:before{content:'\eaa0'}.icon-twitter:before{content:'\eaa1'}.icon-ubuntu:before{content:'\eaa2'}.icon-umbrella-outline:before{content:'\eaa3'}.icon-umbrella:before{content:'\eaa4'}.icon-undo-variant:before{content:'\eaa5'}.icon-undo:before{content:'\eaa6'}.icon-unfold-less:before{content:'\eaa7'}.icon-unfold-more:before{content:'\eaa8'}.icon-ungroup:before{content:'\eaa9'}.icon-untappd:before{content:'\eaaa'}.icon-upload:before{content:'\eaab'}.icon-usb:before{content:'\eaac'}.icon-vector-curve:before{content:'\eaad'}.icon-vector-point:before{content:'\eaae'}.icon-vector-square:before{content:'\eaaf'}.icon-verified:before{content:'\eab0'}.icon-vibration:before{content:'\eab1'}.icon-video-off:before{content:'\eab2'}.icon-video-switch:before{content:'\eab3'}.icon-video:before{content:'\eab4'}.icon-view-agenda:before{content:'\eab5'}.icon-view-array:before{content:'\eab6'}.icon-view-carousel:before{content:'\eab7'}.icon-view-column:before{content:'\eab8'}.icon-view-dashboard:before{content:'\eab9'}.icon-view-day:before{content:'\eaba'}.icon-view-headline:before{content:'\eabb'}.icon-view-list:before{content:'\eabc'}.icon-view-module:before{content:'\eabd'}.icon-view-quilt:before{content:'\eabe'}.icon-view-stream:before{content:'\eabf'}.icon-view-week:before{content:'\eac0'}.icon-vimeo:before{content:'\eac1'}.icon-vine:before{content:'\eac2'}.icon-vk-box:before{content:'\eac3'}.icon-vk-circle:before{content:'\eac4'}.icon-vk:before{content:'\eac5'}.icon-voicemail:before{content:'\eac6'}.icon-volume-high:before{content:'\eac7'}.icon-volume-low:before{content:'\eac8'}.icon-volume-medium:before{content:'\eac9'}.icon-volume-off:before{content:'\eaca'}.icon-volume:before{content:'\eacb'}.icon-vpn:before{content:'\eacc'}.icon-walk:before{content:'\eacd'}.icon-wallet-giftcard:before{content:'\eace'}.icon-wallet-membership:before{content:'\eacf'}.icon-wallet-travel:before{content:'\ead0'}.icon-wallet:before{content:'\ead1'}.icon-washing-machine:before{content:'\ead2'}.icon-watch-export:before{content:'\ead3'}.icon-watch-import:before{content:'\ead4'}.icon-watch:before{content:'\ead5'}.icon-water-off:before{content:'\ead6'}.icon-water-pump:before{content:'\ead7'}.icon-water:before{content:'\ead8'}.icon-weather-cloudy:before{content:'\ead9'}.icon-weather-fog:before{content:'\eada'}.icon-weather-hail:before{content:'\eadb'}.icon-weather-lightning:before{content:'\eadc'}.icon-weather-night:before{content:'\eadd'}.icon-weather-partlycloudy:before{content:'\eade'}.icon-weather-pouring:before{content:'\eadf'}.icon-weather-rainy:before{content:'\eae0'}.icon-weather-snowy:before{content:'\eae1'}.icon-weather-sunny:before{content:'\eae2'}.icon-weather-sunset-down:before{content:'\eae3'}.icon-weather-sunset-up:before{content:'\eae4'}.icon-weather-sunset:before{content:'\eae5'}.icon-weather-windy-variant:before{content:'\eae6'}.icon-weather-windy:before{content:'\eae7'}.icon-web:before{content:'\eae8'}.icon-webcam:before{content:'\eae9'}.icon-weight-kilogram:before{content:'\eaea'}.icon-weight:before{content:'\eaeb'}.icon-whatsapp:before{content:'\eaec'}.icon-wheelchair-accessibility:before{content:'\eaed'}.icon-white-balance-auto:before{content:'\eaee'}.icon-white-balance-incandescent:before{content:'\eaef'}.icon-white-balance-irradescent:before{content:'\eaf0'}.icon-white-balance-sunny:before{content:'\eaf1'}.icon-wifi:before{content:'\eaf2'}.icon-wii:before{content:'\eaf3'}.icon-wikipedia:before{content:'\eaf4'}.icon-window-close:before{content:'\eaf5'}.icon-window-closed:before{content:'\eaf6'}.icon-window-maximize:before{content:'\eaf7'}.icon-window-minimize:before{content:'\eaf8'}.icon-window-open:before{content:'\eaf9'}.icon-window-restore:before{content:'\eafa'}.icon-windows:before{content:'\eafb'}.icon-wordpress:before{content:'\eafc'}.icon-worker:before{content:'\eafd'}.icon-wunderlist:before{content:'\eafe'}.icon-xbox-controller-off:before{content:'\eaff'}.icon-xbox-controller:before{content:'\eb00'}.icon-xbox:before{content:'\eb01'}.icon-xda:before{content:'\eb02'}.icon-xml:before{content:'\eb03'}.icon-yeast:before{content:'\eb04'}.icon-yelp:before{content:'\eb05'}.icon-youtube-play:before{content:'\eb06'}.icon-youtube:before{content:'\eb07'}.icon-zip-box:before{content:'\eb08'}.avatar{width:40px;min-width:40px;height:40px;line-height:40px;margin:0 8px 0 0;border-radius:50%;font-size:17px;font-weight:500;text-align:center;color:#fff}.avatar.square{border-radius:0}.avatar.small{width:20px;min-width:20px;height:20px;line-height:20px}.avatar.big{width:72px;min-width:72px;height:72px;line-height:72px}.avatar.huge{width:96px;min-width:96px;height:96px;line-height:96px}.form-wrapper{background:#fff;padding:16px}.form-wrapper .form-title{font-size:21px;padding:8px 0}.navigation-simple .item{position:relative;cursor:pointer;text-align:left;margin:0;padding:0 24px;text-transform:none;line-height:48px;max-height:48px;height:48px}.navigation-simple .item md-icon{margin:0 16px 0 0}.navigation-simple .item .title{font-size:13px;font-weight:500;line-height:1}.navigation-simple .item.selected{background-color:rgba(0,0,0,.06)}.navigation-simple .subheader{font-size:13px;border-top:1px solid rgba(0,0,0,.12);font-weight:500;margin-top:8px}.navigation-simple .subheader.light{border-top:1px solid rgba(255,255,255,.12)}.navigation-simple md-divider{margin:8px 0}.simple-pagination{position:relative;display:inline-flex;flex-direction:row;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);background-color:#fff;padding:0 8px}.simple-pagination .pagination-item{min-width:48px;min-height:56px;line-height:56px;border-radius:0;margin:0;font-weight:400;color:rgba(0,0,0,.54)}.simple-pagination .pagination-item:hover{color:rgba(0,0,0,.87)}.simple-pagination .pagination-item.active{cursor:default;color:rgba(0,0,0,.87)}.simple-pagination .pagination-item.disabled{cursor:default;color:rgba(0,0,0,.26)}.price-tables .price-table{position:relative;background-color:#fff;width:280px;border-radius:2px;margin:24px 24px 0 0;overflow:hidden}.price-tables .price-table.style-1 .package-type{font-size:17px;padding:16px 24px}.price-tables .price-table.style-1 .package-type .sale{font-size:13px;font-weight:600}.price-tables .price-table.style-1 .price{padding:32px 32px 16px 32px}.price-tables .price-table.style-1 .price .currency{padding-right:4px;font-size:24px;font-weight:500;color:rgba(0,0,0,.54)}.price-tables .price-table.style-1 .price .value{font-size:72px;font-weight:300;line-height:1}.price-tables .price-table.style-1 .price .period{padding:0 0 5px 4px;font-size:17px;color:rgba(0,0,0,.54)}.price-tables .price-table.style-1 md-divider{margin:16px 32px}.price-tables .price-table.style-1 .terms{padding:16px 32px;font-size:15px}.price-tables .price-table.style-1 .cta-button{margin:16px auto 32px auto;width:128px}.price-tables .price-table.style-2 .badge{position:absolute;top:0;left:50%;transform:translateX(-50%);font-size:11px;font-weight:500;padding:6px 8px}.price-tables .price-table.style-2 .package-type{padding:48px 32px 24px 32px;font-size:20px;font-weight:500;text-align:center}.price-tables .price-table.style-2 .price{padding:0 32px 8px 32px}.price-tables .price-table.style-2 .price .currency{padding-right:4px;font-size:24px;font-weight:500;color:rgba(0,0,0,.54)}.price-tables .price-table.style-2 .price .value{font-size:56px;font-weight:300;line-height:1}.price-tables .price-table.style-2 .period{padding:0 32px;font-size:15px;font-weight:500;color:rgba(0,0,0,.54);text-align:center}.price-tables .price-table.style-2 .terms{padding:32px;font-size:15px}.price-tables .price-table.style-2 .terms .term{padding-bottom:8px}.price-tables .price-table.style-2 .terms .term:last-child{padding-bottom:0}.price-tables .price-table.style-2 .cta-button{margin:8px auto 32px auto;width:128px}.price-tables .price-table.style-3 .package-type{padding:32px;text-align:center}.price-tables .price-table.style-3 .package-type .title{font-size:34px}.price-tables .price-table.style-3 .package-type .subtitle{font-size:17px;color:rgba(0,0,0,.54);font-weight:500}.price-tables .price-table.style-3 .price{padding:16px 32px}.price-tables .price-table.style-3 .price .currency{padding-right:4px;font-size:15px;font-weight:500}.price-tables .price-table.style-3 .price .value{font-size:34px;font-weight:300;line-height:1}.price-tables .price-table.style-3 .price .period{padding-left:4px;text-align:center}.price-tables .price-table.style-3 .terms{margin:32px;font-size:15px;color:rgba(0,0,0,.54)}.price-tables .price-table.style-3 .terms .term{padding-bottom:16px}.price-tables .price-table.style-3 .terms .term:last-child{padding-bottom:0}.price-tables .price-table.style-3 .cta-button{margin:8px 32px}.price-tables .price-table.style-3 .note{padding:8px 32px 16px 32px;text-align:center;color:rgba(0,0,0,.54)}.simple-table-container{background:#fff}.simple-table-container .table-title{font-size:20px;padding:24px}table.simple{width:100%;border:none;border-spacing:0;text-align:left}table.simple thead tr th{padding:16px 8px;font-weight:500;color:rgba(0,0,0,.54);border-bottom:1px solid rgba(0,0,0,.12);white-space:nowrap;min-width:120px}table.simple thead tr th:first-child{padding-left:24px}table.simple thead tr th:last-child{padding-right:24px}table.simple tbody tr td{padding:16px 8px;border-bottom:1px solid rgba(0,0,0,.12)}table.simple tbody tr td:first-child{padding-left:24px}table.simple tbody tr td:last-child{padding-right:24px}table.simple tbody tr:last-child td{border-bottom:none}table.simple.clickable tbody tr{cursor:pointer}table.simple.clickable tbody tr:hover{background:rgba(0,0,0,.03)}html{font-size:62.5%;font-family:Roboto,"Helvetica Neue",Arial,sans-serif;line-height:1.4;letter-spacing:-.1px}body{font-size:1.3rem}body,html{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}form{font-size:1.6rem}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-weight:400}.h1,h1{font-size:2.4rem}.h2,h2{font-size:2rem}.h3,h3{font-size:1.6rem}.h4,h4{font-size:1.4rem}.h5,h5{font-size:1.3rem}.h6,h6{font-size:1.2rem}a{text-decoration:none}a:active,a:hover{text-decoration:underline}abbr{cursor:help;border-bottom:1px dotted rgba(0,0,0,.54)}blockquote{border-left:3px solid rgba(0,0,0,.12);font-style:italic;margin:1em 0;padding-left:16px}blockquote footer{font-style:normal}blockquote footer:before{content:'\2014 \00A0'}blockquote.reverse{border-left:none;border-right:3px solid rgba(0,0,0,.12);text-align:right;padding-left:0;padding-right:16px}blockquote.reverse footer:before{content:''}blockquote.reverse footer:after{content:'\2014 \00A0'}code{font-family:Monaco,Menlo,Consolas,"Ubuntu Mono",monospace}code:not(.highlight){background:rgba(0,0,0,.065);color:#106cc8;margin:0 1px;padding:2px 3px;border-radius:2px}dl dt{font-weight:700}dl dd{margin:4px 0 16px 0}mark{background:#f7f49a}pre{line-height:1.6;margin:8px 16px;white-space:pre-wrap}small{font-size:80%}table thead tr th{text-align:left}.text-italic{font-style:italic}.text-semibold{font-weight:600}.text-bold,strong{font-weight:700}.text-strike{text-decoration:line-through}.text-super{vertical-align:super}.text-sub{vertical-align:sub}.text-capitalize{text-transform:capitalize}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-weight-100{font-weight:100}.font-weight-200{font-weight:200}.font-weight-300{font-weight:300}.font-weight-400{font-weight:400}.font-weight-500{font-weight:500}.font-weight-600{font-weight:600}.font-weight-700{font-weight:700}.font-weight-800{font-weight:800}.font-weight-900{font-weight:900}.font-size-2{font-size:2px}.font-size-4{font-size:4px}.font-size-6{font-size:6px}.font-size-8{font-size:8px}.font-size-10{font-size:10px}.font-size-12{font-size:12px}.font-size-14{font-size:14px}.font-size-16{font-size:16px}.font-size-18{font-size:18px}.font-size-20{font-size:20px}.font-size-22{font-size:22px}.font-size-24{font-size:24px}.font-size-26{font-size:26px}.font-size-28{font-size:28px}.font-size-30{font-size:30px}.font-size-32{font-size:32px}.font-size-34{font-size:34px}.font-size-36{font-size:36px}.font-size-38{font-size:38px}.font-size-40{font-size:40px}.font-size-42{font-size:42px}.font-size-44{font-size:44px}.font-size-46{font-size:46px}.font-size-48{font-size:48px}.font-size-50{font-size:50px}.font-size-52{font-size:52px}.font-size-54{font-size:54px}.font-size-56{font-size:56px}.font-size-58{font-size:58px}.font-size-60{font-size:60px}.font-size-62{font-size:62px}.font-size-64{font-size:64px}.font-size-66{font-size:66px}.font-size-68{font-size:68px}.font-size-70{font-size:70px}.font-size-72{font-size:72px}.font-size-74{font-size:74px}.font-size-76{font-size:76px}.font-size-78{font-size:78px}.font-size-80{font-size:80px}.font-size-82{font-size:82px}.font-size-84{font-size:84px}.font-size-86{font-size:86px}.font-size-88{font-size:88px}.font-size-90{font-size:90px}.font-size-92{font-size:92px}.font-size-94{font-size:94px}.font-size-96{font-size:96px}.font-size-98{font-size:98px}.font-size-100{font-size:100px}.font-size-102{font-size:102px}.font-size-104{font-size:104px}.font-size-106{font-size:106px}.font-size-108{font-size:108px}.font-size-110{font-size:110px}.font-size-112{font-size:112px}.font-size-114{font-size:114px}.font-size-116{font-size:116px}.font-size-118{font-size:118px}.font-size-120{font-size:120px}.line-height-2{line-height:2px}.line-height-4{line-height:4px}.line-height-6{line-height:6px}.line-height-8{line-height:8px}.line-height-10{line-height:10px}.line-height-12{line-height:12px}.line-height-14{line-height:14px}.line-height-16{line-height:16px}.line-height-18{line-height:18px}.line-height-20{line-height:20px}.line-height-22{line-height:22px}.line-height-24{line-height:24px}.line-height-26{line-height:26px}.line-height-28{line-height:28px}.line-height-30{line-height:30px}.line-height-32{line-height:32px}.line-height-34{line-height:34px}.line-height-36{line-height:36px}.line-height-38{line-height:38px}.line-height-40{line-height:40px}.line-height-42{line-height:42px}.line-height-44{line-height:44px}.line-height-46{line-height:46px}.line-height-48{line-height:48px}.line-height-50{line-height:50px}.line-height-52{line-height:52px}.line-height-54{line-height:54px}.line-height-56{line-height:56px}.line-height-58{line-height:58px}.line-height-60{line-height:60px}.line-height-62{line-height:62px}.line-height-64{line-height:64px}.line-height-66{line-height:66px}.line-height-68{line-height:68px}.line-height-70{line-height:70px}.line-height-72{line-height:72px}.line-height-74{line-height:74px}.line-height-76{line-height:76px}.line-height-78{line-height:78px}.line-height-80{line-height:80px}.line-height-82{line-height:82px}.line-height-84{line-height:84px}.line-height-86{line-height:86px}.line-height-88{line-height:88px}.line-height-90{line-height:90px}.line-height-92{line-height:92px}.line-height-94{line-height:94px}.line-height-96{line-height:96px}.line-height-98{line-height:98px}.line-height-100{line-height:100px}.line-height-102{line-height:102px}.line-height-104{line-height:104px}.line-height-106{line-height:106px}.line-height-108{line-height:108px}.line-height-110{line-height:110px}.line-height-112{line-height:112px}.line-height-114{line-height:114px}.line-height-116{line-height:116px}.line-height-118{line-height:118px}.line-height-120{line-height:120px}.text-boxed,.text-boxed-light{border-radius:2px;padding:4px 8px;margin:0 8px;font-size:11px;font-weight:500;color:rgba(0,0,0,.54);background-color:rgba(0,0,0,.12);white-space:nowrap}.text-boxed-light{background-color:rgba(255,255,255,.7)}.text-truncate{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-nowrap{white-space:nowrap}.angular-google-map-container{height:400px}.moment-picker .moment-picker-container{width:296px;border:none;border-radius:2px;box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12);margin-left:0;padding:8px}.moment-picker .moment-picker-container td,.moment-picker .moment-picker-container th{min-width:0;width:40px;height:40px;padding:8px;text-shadow:none;border-radius:35px}.moment-picker .moment-picker-container td:hover,.moment-picker .moment-picker-container th:hover{background:#f5f5f5;background-image:none}.moment-picker .moment-picker-container td.selected{background:#03a9f4;background-image:none}.moment-picker .moment-picker-container .header-view th{border-radius:0;white-space:nowrap;width:auto}.moment-picker .moment-picker-container .header-view th:first-child,.moment-picker .moment-picker-container .header-view th:last-child{width:20%}.c3{transition:all .3s ease}.c3 svg{font:12px RobotoDraft,Roboto,'Helvetica Neue',sans-serif}.c3 line,.c3 path{fill:none;stroke:#000}.c3 text{font-family:Roboto,"Helvetica Neue",Arial,sans-serif;user-select:none}.c3 .c3-bars path,.c3 .c3-event-rect,.c3 .c3-legend-item-tile,.c3 .c3-xgrid-focus,.c3 .c3-ygrid{shape-rendering:crispEdges}.c3 .c3-chart-line{transition:all .3s ease}.c3 .c3-line{stroke-width:1px}.c3.stroke-3 .c3-line{stroke-width:3px}.c3.stroke-2 .c3-line{stroke-width:2px}.c3 .c3-circle{transition:all .3s ease;stroke:#fff;stroke-width:2}.c3 .c3-circle._expanded_{stroke-width:3;stroke:#fff}.c3 .c3-chart-arc path{stroke:#fff}.c3 .c3-chart-arc text{fill:#fff;font-size:13px}.c3 .c3-grid line{stroke:rgba(0,0,0,.04);stroke-width:1px;stroke-dasharray:0}.c3 .c3-grid text{fill:#aaa}.c3 .c3-axis .tick{stroke-width:0}.c3 .c3-axis text{fill:rgba(0,0,0,.33)}.c3 .c3-axis line,.c3 .c3-axis path{stroke:rgba(0,0,0,.04)}.c3 .c3-xgrid,.c3 .c3-ygrid{stroke-dasharray:0 0}.c3 .c3-text.c3-empty{fill:grey;font-size:2em}.c3 .c3-bar{stroke-width:0}.c3 .c3-bar._expanded_{fill-opacity:.75}.c3 .c3-target.c3-focused{opacity:1}.c3 .c3-target.c3-focused .c3-target.c3-focused path.c3-step,.c3 .c3-target.c3-focused path.c3-line{stroke-width:3px;transition:all .3s ease}.c3 .c3-target.c3-defocused{opacity:.3!important}.c3 .c3-region{fill:#4682b4;fill-opacity:.1}.c3 .c3-brush .extent{fill-opacity:.1}.c3 .c3-legend-item{font-size:12px}.c3 .c3-legend-item-hidden{opacity:.15}.c3 .c3-legend-background{opacity:.75;fill:#fff;stroke:#d3d3d3;stroke-width:1}.c3 .c3-tooltip-container{z-index:10}.c3 .c3-tooltip{border-collapse:collapse;border-spacing:0;background-color:#fff;empty-cells:show;box-shadow:0 2px 4px -1px rgba(0,0,0,.14),0 4px 5px 0 rgba(0,0,0,.098),0 1px 10px 0 rgba(0,0,0,.084);opacity:1;border-radius:2px;overflow:hidden;padding:4px 0}.c3 .c3-tooltip tr{border:none}.c3 .c3-tooltip th{background-color:transparent;font-size:14px;font-weight:400;padding:8px 12px;text-align:left;color:rgba(0,0,0,.54)}.c3 .c3-tooltip td{font-size:13px;padding:4px 12px!important;background-color:#fff;border-left:none;color:rgba(0,0,0,.84)}.c3 .c3-tooltip td>span{display:inline-block;width:10px;height:10px;margin-right:6px}.c3 .c3-tooltip td.value{font-size:14px!important;text-align:right;color:rgba(0,0,0,.84)}.c3 .c3-area{stroke-width:0;opacity:.2}.c3 .c3-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}.c3 .c3-chart-arcs .c3-chart-arcs-background{fill:#e0e0e0;stroke:none}.c3 .c3-chart-arcs .c3-chart-arcs-gauge-unit{fill:#000;font-size:16px}.c3 .c3-chart-arcs .c3-chart-arcs-gauge-max{fill:#777}.c3 .c3-chart-arcs .c3-chart-arcs-gauge-min{fill:#777}.c3 .c3-chart-arc .c3-gauge-value{fill:#000}.ct-label{font-size:13px}.ct-chart-donut .ct-label,.ct-chart-pie .ct-label{font-size:13px}.bar-legend,.chart-legend,.doughnut-legend,.line-legend,.pie-legend,.polararea-legend,.radar-legend{margin-top:15px}table.dataTable{width:100%;margin:0 auto;clear:both;border-spacing:0}table.dataTable thead tr{background:#fff}table.dataTable thead th{text-align:left;vertical-align:middle;border-bottom:1px solid rgba(0,0,0,.12);padding:16px 8px}table.dataTable thead th:first-child{padding-left:24px}table.dataTable thead th:last-child{border-right:none;padding-right:24px}table.dataTable thead th:active{outline:0}table.dataTable thead th.dt-head-left{text-align:left}table.dataTable thead th.dt-head-center{text-align:center}table.dataTable thead th.dt-head-right{text-align:right}table.dataTable thead th.dt-head-justify{text-align:justify}table.dataTable thead th.dt-head-nowrap{white-space:nowrap}table.dataTable thead th .table-header .column-title{display:block;font-weight:600;white-space:nowrap}table.dataTable thead th .table-header .selectize-control{margin-top:15px}table.dataTable thead th .table-header .selectize-control.single .selectize-input{padding:7px 10px}table.dataTable thead th .table-header .selectize-control.single .selectize-input:after{right:10px;border-width:5px 4px 0 4px;border-color:rgba(0,0,0,.12) transparent transparent transparent}table.dataTable thead th .table-header .column-search-input{display:inline-block;margin-top:15px;width:100%;height:33px}table.dataTable thead td{padding:15px;vertical-align:middle}table.dataTable thead td:active{outline:0}table.dataTable thead td.dt-head-left{text-align:left}table.dataTable thead td.dt-head-center{text-align:center}table.dataTable thead td.dt-head-right{text-align:right}table.dataTable thead td.dt-head-justify{text-align:justify}table.dataTable thead td.dt-head-nowrap{white-space:nowrap}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc{background:0 0}table.dataTable thead .sorting .table-header .column-title,table.dataTable thead .sorting_asc .table-header .column-title,table.dataTable thead .sorting_desc .table-header .column-title{cursor:pointer}table.dataTable thead .sorting .table-header .column-title:after,table.dataTable thead .sorting_asc .table-header .column-title:after,table.dataTable thead .sorting_desc .table-header .column-title:after{position:relative;font-family:icomoon;font-weight:400;margin-left:10px;top:2px;font-size:16px;color:rgba(0,0,0,.54)}table.dataTable thead .sorting .table-header .column-title:after{content:'\eaa8'}table.dataTable thead .sorting_asc .table-header .column-title:after{content:'\e718'}table.dataTable thead .sorting_desc .table-header .column-title:after{content:'\e715'}table.dataTable tfoot th{font-weight:600;text-align:left;padding:10px 18px 6px 18px;border-top:1px solid #111}table.dataTable tfoot th.dt-head-left{text-align:left}table.dataTable tfoot th.dt-head-center{text-align:center}table.dataTable tfoot th.dt-head-right{text-align:right}table.dataTable tfoot th.dt-head-justify{text-align:justify}table.dataTable tfoot th.dt-head-nowrap{white-space:nowrap}table.dataTable tfoot td{padding:10px 18px 6px 18px;border-top:1px solid #111}table.dataTable tfoot td.dt-head-left{text-align:left}table.dataTable tfoot td.dt-head-center{text-align:center}table.dataTable tfoot td.dt-head-right{text-align:right}table.dataTable tfoot td.dt-head-justify{text-align:justify}table.dataTable tfoot td.dt-head-nowrap{white-space:nowrap}table.dataTable tbody tr{background-color:#fff}table.dataTable tbody tr.selected{background-color:#b0bed9}table.dataTable tbody tr.details-open td.detail-column i{background:#fff}table.dataTable tbody tr.details-row.odd tr{background:#fff}table.dataTable tbody tr.details-row>td{padding:0}table.dataTable tbody th{padding:14px 15px;vertical-align:middle}table.dataTable tbody th.dt-body-left{text-align:left}table.dataTable tbody th.dt-body-center{text-align:center}table.dataTable tbody th.dt-body-right{text-align:right}table.dataTable tbody th.dt-body-justify{text-align:justify}table.dataTable tbody th.dt-body-nowrap{white-space:nowrap}table.dataTable tbody td{padding:16px 8px;vertical-align:middle}table.dataTable tbody td:first-child{padding-left:24px}table.dataTable tbody td:last-child{padding-right:24px}table.dataTable tbody td.dt-body-left{text-align:left}table.dataTable tbody td.dt-body-center{text-align:center}table.dataTable tbody td.dt-body-right{text-align:right}table.dataTable tbody td.dt-body-justify{text-align:justify}table.dataTable tbody td.dt-body-nowrap{white-space:nowrap}table.dataTable th.dt-left{text-align:left}table.dataTable th.dt-center{text-align:center}table.dataTable th.dt-right{text-align:right}table.dataTable th.dt-justify{text-align:justify}table.dataTable th.dt-nowrap{white-space:nowrap}table.dataTable td.dt-left{text-align:left}table.dataTable td.dt-center{text-align:center}table.dataTable td.dataTables_empty{height:51px;text-align:center}table.dataTable td.dt-right{text-align:right}table.dataTable td.dt-justify{text-align:justify}table.dataTable td.dt-nowrap{white-space:nowrap}table.dataTable.row-border thead{border-bottom:1px solid rgba(0,0,0,.12)}table.dataTable.row-border tbody tr:first-child th{border-top:none}table.dataTable.row-border tbody tr:first-child td{border-top:none}table.dataTable.row-border tbody tr:last-child td{border-bottom:1px solid rgba(0,0,0,.12)}table.dataTable.row-border tbody th{border-top:1px solid rgba(0,0,0,.12)}table.dataTable.row-border tbody td{border-top:1px solid rgba(0,0,0,.12)}table.dataTable.cell-border tbody tr:first-child th{border-top:none}table.dataTable.cell-border tbody tr:first-child td{border-top:none}table.dataTable.cell-border tbody th{border-top:1px solid rgba(0,0,0,.12);border-right:1px solid rgba(0,0,0,.12)}table.dataTable.cell-border tbody th:last-child{border-right:none}table.dataTable.cell-border tbody td{border-top:1px solid rgba(0,0,0,.12);border-right:1px solid rgba(0,0,0,.12)}table.dataTable.cell-border tbody td:last-child{border-right:none}table.dataTable.stripe tbody tr.odd{background-color:#fff}table.dataTable.stripe tbody tr.odd.selected{background-color:#abb9d3}table.dataTable.hover tbody tr:hover{background-color:#f5f5f5}table.dataTable.hover tbody tr:hover.selected{background-color:#a9b7d1}table.dataTable.hover tbody tr.odd:hover{background-color:#f5f5f5}table.dataTable.hover tbody tr.odd:hover.selected{background-color:#a9b7d1}table.dataTable.hover tbody tr.even:hover{background-color:#f5f5f5}table.dataTable.hover tbody tr.even:hover.selected{background-color:#a9b7d1}table.dataTable.order-column tbody tr>.sorting_1{background-color:#f9f9f9}table.dataTable.order-column tbody tr>.sorting_2{background-color:#f9f9f9}table.dataTable.order-column tbody tr>.sorting_3{background-color:#f9f9f9}table.dataTable.order-column tbody tr.selected>.sorting_1{background-color:#acbad4}table.dataTable.order-column tbody tr.selected>.sorting_2{background-color:#acbad4}table.dataTable.order-column tbody tr.selected>.sorting_3{background-color:#acbad4}table.dataTable.order-column.stripe tbody tr.odd>.sorting_1{background-color:#f1f1f1}table.dataTable.order-column.stripe tbody tr.odd>.sorting_2{background-color:#f3f3f3}table.dataTable.order-column.stripe tbody tr.odd>.sorting_3{background-color:#f5f5f5}table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_1{background-color:#a6b3cd}table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_2{background-color:#a7b5ce}table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_3{background-color:#a9b6d0}table.dataTable.order-column.stripe tbody tr.even>.sorting_1{background-color:#f9f9f9}table.dataTable.order-column.stripe tbody tr.even>.sorting_2{background-color:#fbfbfb}table.dataTable.order-column.stripe tbody tr.even>.sorting_3{background-color:#fdfdfd}table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_1{background-color:#acbad4}table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_2{background-color:#adbbd6}table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_3{background-color:#afbdd8}table.dataTable.order-column.hover tbody tr:hover>.sorting_1{background-color:#eaeaea}table.dataTable.order-column.hover tbody tr:hover>.sorting_2{background-color:#ebebeb}table.dataTable.order-column.hover tbody tr:hover>.sorting_3{background-color:#eee}table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_1{background-color:#a1aec7}table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_2{background-color:#a2afc8}table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_3{background-color:#a4b2cb}table.dataTable.order-column.hover tbody tr.odd:hover>.sorting_1{background-color:#eaeaea}table.dataTable.order-column.hover tbody tr.odd:hover>.sorting_2{background-color:#ebebeb}table.dataTable.order-column.hover tbody tr.odd:hover>.sorting_3{background-color:#eee}table.dataTable.order-column.hover tbody tr.odd:hover.selected>.sorting_1{background-color:#a1aec7}table.dataTable.order-column.hover tbody tr.odd:hover.selected>.sorting_2{background-color:#a2afc8}table.dataTable.order-column.hover tbody tr.odd:hover.selected>.sorting_3{background-color:#a4b2cb}table.dataTable.order-column.hover tbody tr.even:hover>.sorting_1{background-color:#eaeaea}table.dataTable.order-column.hover tbody tr.even:hover>.sorting_2{background-color:#ebebeb}table.dataTable.order-column.hover tbody tr.even:hover>.sorting_3{background-color:#eee}table.dataTable.order-column.hover tbody tr.even:hover.selected>.sorting_1{background-color:#a1aec7}table.dataTable.order-column.hover tbody tr.even:hover.selected>.sorting_2{background-color:#a2afc8}table.dataTable.order-column.hover tbody tr.even:hover.selected>.sorting_3{background-color:#a4b2cb}table.dataTable.no-footer{border-bottom:none}table.dataTable.nowrap th{white-space:nowrap}table.dataTable.nowrap td{white-space:nowrap}table.dataTable.compact thead th{padding:5px 9px}table.dataTable.compact thead td{padding:5px 9px}table.dataTable.compact tfoot th{padding:5px 9px 3px 9px}table.dataTable.compact tfoot td{padding:5px 9px 3px 9px}table.dataTable.compact tbody th{padding:4px 5px}table.dataTable.compact tbody td{padding:4px 5px}.dataTables_wrapper{display:flex;flex:1 0 auto;flex-direction:column;min-height:0}.dataTables_wrapper .top{padding:16px 24px}.dataTables_wrapper .bottom{display:flex;min-height:64px;justify-content:space-between;padding:16px 8px;border-top:1px solid rgba(0,0,0,.12)}.dataTables_wrapper .bottom .left{display:flex;flex:0 0 50%;max-width:50%;align-self:center;padding:0 8px}.dataTables_wrapper .bottom .left .length{display:block}.dataTables_wrapper .bottom .right{display:flex;flex:0 0 50%;max-width:50%;align-self:center;justify-content:flex-end;padding:0 8px}.dataTables_wrapper .bottom .right .info{display:block;align-self:center}.dataTables_wrapper .bottom .right .info .dataTables_info{padding:0 8px;font-weight:600}.dataTables_wrapper .bottom .right .pagination{display:block;align-self:center;white-space:nowrap}.dataTables_wrapper .bottom .right .pagination .dataTables_paginate{padding:0;margin:0!important}.dataTables_wrapper .dataTables_filter{float:right}.dataTables_wrapper .dataTables_filter input{margin-left:.5em;border:1px solid rgba(0,0,0,.12);height:24px;padding:4px 8px}.dataTables_wrapper .dataTables_paginate .paginate_button{background:#fff;color:rgba(0,0,0,.87);border:1px solid rgba(0,0,0,.12);padding:9px 12px;border-radius:2px;cursor:pointer;user-select:none;margin:0 2px}.dataTables_wrapper .dataTables_paginate .paginate_button:hover{box-shadow:inset 999em 0 0 0 rgba(0,0,0,.05);color:rgba(0,0,0,.87)!important;border:1px solid rgba(0,0,0,.12)!important;background:0 0}.dataTables_wrapper .dataTables_paginate .paginate_button:active{box-shadow:inset 999em 0 0 0 rgba(0,0,0,.08),inset 0 1px 3px 0 rgba(0,0,0,.1),0 1px 0 0 rgba(255,255,255,.35)}.dataTables_wrapper .dataTables_paginate .paginate_button.current,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover{color:rgba(0,0,0,.54)!important;border-color:rgba(0,0,0,.12)!important;background:#fff!important;box-shadow:none!important;cursor:default}.dataTables_wrapper .dataTables_processing{position:absolute;top:50%;left:50%;width:100%;height:40px;margin-left:-50%;margin-top:-25px;padding-top:20px;text-align:center;font-size:1.2em;background-color:#fff;background:-webkit-gradient(linear,left top,right top,color-stop(0,rgba(255,255,255,0)),color-stop(25%,rgba(255,255,255,.9)),color-stop(75%,rgba(255,255,255,.9)),color-stop(100%,rgba(255,255,255,0)));background:-webkit-linear-gradient(left,rgba(255,255,255,0) 0,rgba(255,255,255,.9) 25%,rgba(255,255,255,.9) 75%,rgba(255,255,255,0) 100%);background:-moz-linear-gradient(left,rgba(255,255,255,0) 0,rgba(255,255,255,.9) 25%,rgba(255,255,255,.9) 75%,rgba(255,255,255,0) 100%);background:-ms-linear-gradient(left,rgba(255,255,255,0) 0,rgba(255,255,255,.9) 25%,rgba(255,255,255,.9) 75%,rgba(255,255,255,0) 100%);background:-o-linear-gradient(left,rgba(255,255,255,0) 0,rgba(255,255,255,.9) 25%,rgba(255,255,255,.9) 75%,rgba(255,255,255,0) 100%);background:linear-gradient(to right,rgba(255,255,255,0) 0,rgba(255,255,255,.9) 25%,rgba(255,255,255,.9) 75%,rgba(255,255,255,0) 100%)}.dataTables_wrapper .dataTables_scroll{display:flex;flex:1 1 0;flex-direction:column;clear:both;min-height:0}.dataTables_wrapper .dataTables_scroll table.dataTable{box-shadow:none}.dataTables_wrapper .dataTables_scroll table.dataTable.row-border thead{border:none}.dataTables_wrapper .dataTables_scroll .dataTables_scrollHead{display:flex;min-height:56px;box-shadow:0 0 0 1px rgba(0,0,0,.095),0 1px 1px 0 rgba(0,0,0,.1),0 2px 1px 0 rgba(0,0,0,.05);background:#fff;overflow:visible!important}.dataTables_wrapper .dataTables_scroll .dataTables_scrollHead tr th:last-child .table-header .column-title{position:relative;left:7px}.dataTables_wrapper .dataTables_scroll .dataTables_scrollBody{display:flex;overflow-x:hidden!important;overflow-y:scroll!important;-webkit-overflow-scrolling:touch}.dataTables_wrapper .dataTables_scroll .dataTables_scrollBody th>.dataTables_sizing{height:0;overflow:hidden;margin:0!important;padding:0!important}.dataTables_wrapper .dataTables_scroll .dataTables_scrollBody td>.dataTables_sizing{height:0;overflow:hidden;margin:0!important;padding:0!important}.dataTables_wrapper.no-footer .dataTables_scrollBody{border-bottom:none}.dataTables_wrapper.no-footer .dataTables_scrollBody table,.dataTables_wrapper.no-footer .dataTables_scrollHead table{border-bottom:none}.dataTables_wrapper:after{visibility:hidden;display:block;content:'';clear:both;height:0}table.dataTable .show-details{padding:5px 10px;font-weight:700}table.dataTable .action-buttons{display:flex;justify-content:center}table.dataTable .action-buttons .button{padding:8px}.fullpage-datatable .dataTables_wrapper{height:100%;max-height:100%}.explorer-11 .fullpage-datatable .dataTables_scroll{flex:1}table.dataTable.dtr-inline.collapsed.dtr-inline.collapsed>tbody>tr>td:first-child,table.dataTable.dtr-inline.collapsed.dtr-inline.collapsed>tbody>tr>th:first-child{padding-left:40px}table.dataTable.dtr-inline.collapsed.dtr-inline.collapsed>tbody>tr>td:first-child:before,table.dataTable.dtr-inline.collapsed.dtr-inline.collapsed>tbody>tr>th:first-child:before{content:'+';width:15px;height:15px;line-height:15px;top:50%;margin-top:-7px;left:8px;color:rgba(0,0,0,.54);background:0 0;border:none;box-shadow:0 0 0 2px rgba(0,0,0,.54);font-weight:700}table.dataTable.dtr-inline.collapsed.dtr-inline.collapsed>tbody>tr.parent>td:first-child:before,table.dataTable.dtr-inline.collapsed.dtr-inline.collapsed>tbody>tr.parent>th:first-child:before{background:0 0}table.dataTable.dtr-inline.collapsed>tbody>tr.child ul{display:block}table.dataTable.dtr-inline.collapsed>tbody>tr.child ul li{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;border-bottom:1px solid rgba(0,0,0,.12);padding:8px 0}table.dataTable.dtr-inline.collapsed>tbody>tr.child ul li:first-child{padding-top:0}table.dataTable.dtr-inline.collapsed>tbody>tr.child ul li:last-child{border-bottom:none;padding-bottom:0}table.dataTable.dtr-inline.collapsed>tbody>tr.child ul li .dtr-title{margin-right:8px}[hljs],hljs{display:block;overflow-x:auto;color:#333;background:#f8f8f8;-webkit-text-size-adjust:none}.diff .hljs-header,.hljs-comment{color:#998;font-style:italic}.css .rule .hljs-keyword,.hljs-keyword,.hljs-request,.hljs-status,.hljs-subst,.hljs-winutils,.nginx .hljs-title{color:#333;font-weight:700}.hljs-hexcolor,.hljs-number,.ruby .hljs-constant{color:teal}.hljs-doctag,.hljs-string,.hljs-tag .hljs-value,.tex .hljs-formula{color:#d14}.hljs-id,.hljs-title,.scss .hljs-preprocessor{color:#900;font-weight:700}.hljs-list .hljs-keyword,.hljs-subst{font-weight:400}.hljs-class .hljs-title,.hljs-type,.tex .hljs-command,.vhdl .hljs-literal{color:#458;font-weight:700}.django .hljs-tag .hljs-keyword,.hljs-rule .hljs-property,.hljs-tag,.hljs-tag .hljs-title{color:navy;font-weight:400}.hljs-attribute,.hljs-name,.hljs-variable,.lisp .hljs-body{color:teal}.hljs-regexp{color:#009926}.clojure .hljs-keyword,.hljs-prompt,.hljs-symbol,.lisp .hljs-keyword,.ruby .hljs-symbol .hljs-string,.scheme .hljs-keyword,.tex .hljs-special{color:#990073}.hljs-built_in{color:#0086b3}.hljs-cdata,.hljs-doctype,.hljs-pi,.hljs-pragma,.hljs-preprocessor,.hljs-shebang{color:#999;font-weight:700}.hljs-deletion{background:#fdd}.hljs-addition{background:#dfd}.diff .hljs-change{background:#0086b3}.hljs-chunk{color:#aaa}nvd3{display:block;width:100%;height:100%}nvd3.remove-x-lines .nv-x .tick line{display:none}nvd3.remove-y-lines .nv-y .tick line{display:none}nvd3.remove-line-stroke .nv-groups path.nv-line{stroke-width:0!important}nvd3.remove-opacity .nv-groups .nv-group{fill-opacity:1!important}nvd3.show-line-points .nv-line .nv-scatter .nv-groups .nv-point{fill-opacity:1!important;stroke-opacity:1!important}.nvd3 text{font-family:Roboto,"Helvetica Neue",Arial,sans-serif}.nvd3 line.nv-guideline{stroke:rgba(0,0,0,.54)}.nvd3 .nv-groups .nv-point.hover{stroke-width:3px!important;fill-opacity:1!important;stroke-opacity:1!important}.nvtooltip{background:0 0;color:#fff;padding:0;border:none}.nvtooltip.gravity-n:after{display:block;position:absolute;content:'';width:0;height:0;left:50%;bottom:100%;margin-left:-5px;border:5px solid transparent;border-bottom-color:rgba(0,0,0,.87)}.nvtooltip.gravity-s:after{display:block;position:absolute;content:'';width:0;height:0;top:100%;left:50%;margin-left:-5px;border:5px solid transparent;border-top-color:rgba(0,0,0,.87)}.nvtooltip.gravity-e:after{display:block;position:absolute;content:'';width:0;height:0;top:50%;right:0;margin-top:-6px;margin-right:-11px;border:6px solid transparent;border-left-color:rgba(0,0,0,.87)}.nvtooltip.gravity-w:after{display:block;position:absolute;content:'';width:0;height:0;top:50%;margin-top:-6px;margin-left:-11px;border:6px solid transparent;border-right-color:rgba(0,0,0,.87)}.nvtooltip table{background:rgba(0,0,0,.87);padding:8px 12px;margin:0;border-radius:2px}.nvtooltip table tbody tr td.legend-color-guide div{border:none}.nvtooltip table tbody tr td:last-child{padding-right:0}.ps-container:hover .ps-in-scrolling{pointer-events:auto}.ps-container .ps-in-scrolling{pointer-events:auto}.ps-container>.ps-scrollbar-x-rail{background:0 0!important;margin:4px 0;height:4px;z-index:49}.ps-container>.ps-scrollbar-x-rail>.ps-scrollbar-x{height:4px}.ps-container>.ps-scrollbar-y-rail{background:0 0!important;margin:4px 0;width:4px;z-index:49}.ps-container>.ps-scrollbar-y-rail>.ps-scrollbar-y{width:4px}.ta-root{display:block}.ta-root .ta-scroll-window.form-control{border:1px solid rgba(0,0,0,.12)}.ta-root.focussed>.ta-scroll-window.form-control{outline:0 solid transparent;border:1px solid rgba(0,0,0,.12);box-shadow:none}.ta-root textarea.ta-editor.ta-html{resize:vertical;width:100%!important;border:1px solid rgba(0,0,0,.12);padding:16px}.ta-root .ta-toolbar{border:1px solid rgba(0,0,0,.12);border-bottom:none;background:#f5f5f5}.ta-root .ta-toolbar .ta-group{display:flex;align-items:center;align-content:center;flex-wrap:wrap}.ta-root .ta-toolbar .ta-group #toolbarCC,.ta-root .ta-toolbar .ta-group #toolbarWC{display:inline-block!important;line-height:24px}.ta-root .ta-toolbar .ta-group .md-button{width:40px;min-width:40px;line-height:14px;height:36px;min-height:36px;padding:6px;margin:4px 0}.ta-root .ta-toolbar .ta-group .md-button i{font-size:20px;width:20px;height:20px;line-height:20px}.ng-cloak,.x-ng-cloak,[data-ng-cloak],[ng-cloak],[ng\:cloak],[x-ng-cloak]{display:none!important}.no-padding{padding:0!important}.no-margin{margin:0!important}.no-radius{border-radius:0}.divider-vertical{background:rgba(0,0,0,.12);height:24px;width:1px;margin:0 8px}.hidden{visibility:hidden;opacity:0}[fill-width]{min-width:100%}[fill-height]{min-height:100%}.full-height{height:100%!important}a img{display:block;outline:0}img{max-width:100%;height:auto;vertical-align:top;border:none}.scrollable{display:block;position:relative;overflow-x:auto;overflow-y:auto;-webkit-overflow-scrolling:touch}.scrollable.only-x{overflow-x:auto;overflow-y:hidden}.scrollable.only-y{overflow-x:hidden;overflow-y:auto}.flex-scrollable{position:relative;overflow-x:auto;overflow-y:auto;-webkit-overflow-scrolling:touch}.flex-scrollable.only-x{overflow-x:auto;overflow-y:hidden}.flex-scrollable.only-y{overflow-x:hidden;overflow-y:auto}.background-image-center{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:-1}.align-vertical:before{display:inline-block;height:100%;content:'';vertical-align:middle}.align-vertical .align-vertical-bottom,.align-vertical .align-vertical-middle,.align-vertical .align-vertical-top{display:inline-block}.align-vertical .align-vertical-top{vertical-align:top}.align-vertical .align-vertical-middle{vertical-align:middle}.align-vertical .align-vertical-bottom{vertical-align:bottom}.p-0,.padding-0{padding:0}.padding-top-0,.pt-0{padding-top:0}.padding-right-0,.pr-0{padding-right:0}.padding-bottom-0,.pb-0{padding-bottom:0}.padding-left-0,.pl-0{padding-left:0}.padding-horizontal-0,.ph-0{padding-left:0;padding-right:0}.padding-vertical-0,.pv-0{padding-top:0;padding-bottom:0}.p-5,.padding-5{padding:5px}.padding-top-5,.pt-5{padding-top:5px}.padding-right-5,.pr-5{padding-right:5px}.padding-bottom-5,.pb-5{padding-bottom:5px}.padding-left-5,.pl-5{padding-left:5px}.padding-horizontal-5,.ph-5{padding-left:5px;padding-right:5px}.padding-vertical-5,.pv-5{padding-top:5px;padding-bottom:5px}.p-10,.padding-10{padding:10px}.padding-top-10,.pt-10{padding-top:10px}.padding-right-10,.pr-10{padding-right:10px}.padding-bottom-10,.pb-10{padding-bottom:10px}.padding-left-10,.pl-10{padding-left:10px}.padding-horizontal-10,.ph-10{padding-left:10px;padding-right:10px}.padding-vertical-10,.pv-10{padding-top:10px;padding-bottom:10px}.p-15,.padding-15{padding:15px}.padding-top-15,.pt-15{padding-top:15px}.padding-right-15,.pr-15{padding-right:15px}.padding-bottom-15,.pb-15{padding-bottom:15px}.padding-left-15,.pl-15{padding-left:15px}.padding-horizontal-15,.ph-15{padding-left:15px;padding-right:15px}.padding-vertical-15,.pv-15{padding-top:15px;padding-bottom:15px}.p-20,.padding-20{padding:20px}.padding-top-20,.pt-20{padding-top:20px}.padding-right-20,.pr-20{padding-right:20px}.padding-bottom-20,.pb-20{padding-bottom:20px}.padding-left-20,.pl-20{padding-left:20px}.padding-horizontal-20,.ph-20{padding-left:20px;padding-right:20px}.padding-vertical-20,.pv-20{padding-top:20px;padding-bottom:20px}.p-25,.padding-25{padding:25px}.padding-top-25,.pt-25{padding-top:25px}.padding-right-25,.pr-25{padding-right:25px}.padding-bottom-25,.pb-25{padding-bottom:25px}.padding-left-25,.pl-25{padding-left:25px}.padding-horizontal-25,.ph-25{padding-left:25px;padding-right:25px}.padding-vertical-25,.pv-25{padding-top:25px;padding-bottom:25px}.p-30,.padding-30{padding:30px}.padding-top-30,.pt-30{padding-top:30px}.padding-right-30,.pr-30{padding-right:30px}.padding-bottom-30,.pb-30{padding-bottom:30px}.padding-left-30,.pl-30{padding-left:30px}.padding-horizontal-30,.ph-30{padding-left:30px;padding-right:30px}.padding-vertical-30,.pv-30{padding-top:30px;padding-bottom:30px}.p-35,.padding-35{padding:35px}.padding-top-35,.pt-35{padding-top:35px}.padding-right-35,.pr-35{padding-right:35px}.padding-bottom-35,.pb-35{padding-bottom:35px}.padding-left-35,.pl-35{padding-left:35px}.padding-horizontal-35,.ph-35{padding-left:35px;padding-right:35px}.padding-vertical-35,.pv-35{padding-top:35px;padding-bottom:35px}.p-40,.padding-40{padding:40px}.padding-top-40,.pt-40{padding-top:40px}.padding-right-40,.pr-40{padding-right:40px}.padding-bottom-40,.pb-40{padding-bottom:40px}.padding-left-40,.pl-40{padding-left:40px}.padding-horizontal-40,.ph-40{padding-left:40px;padding-right:40px}.padding-vertical-40,.pv-40{padding-top:40px;padding-bottom:40px}.p-45,.padding-45{padding:45px}.padding-top-45,.pt-45{padding-top:45px}.padding-right-45,.pr-45{padding-right:45px}.padding-bottom-45,.pb-45{padding-bottom:45px}.padding-left-45,.pl-45{padding-left:45px}.padding-horizontal-45,.ph-45{padding-left:45px;padding-right:45px}.padding-vertical-45,.pv-45{padding-top:45px;padding-bottom:45px}.p-50,.padding-50{padding:50px}.padding-top-50,.pt-50{padding-top:50px}.padding-right-50,.pr-50{padding-right:50px}.padding-bottom-50,.pb-50{padding-bottom:50px}.padding-left-50,.pl-50{padding-left:50px}.padding-horizontal-50,.ph-50{padding-left:50px;padding-right:50px}.padding-vertical-50,.pv-50{padding-top:50px;padding-bottom:50px}.p-55,.padding-55{padding:55px}.padding-top-55,.pt-55{padding-top:55px}.padding-right-55,.pr-55{padding-right:55px}.padding-bottom-55,.pb-55{padding-bottom:55px}.padding-left-55,.pl-55{padding-left:55px}.padding-horizontal-55,.ph-55{padding-left:55px;padding-right:55px}.padding-vertical-55,.pv-55{padding-top:55px;padding-bottom:55px}.p-60,.padding-60{padding:60px}.padding-top-60,.pt-60{padding-top:60px}.padding-right-60,.pr-60{padding-right:60px}.padding-bottom-60,.pb-60{padding-bottom:60px}.padding-left-60,.pl-60{padding-left:60px}.padding-horizontal-60,.ph-60{padding-left:60px;padding-right:60px}.padding-vertical-60,.pv-60{padding-top:60px;padding-bottom:60px}.p-65,.padding-65{padding:65px}.padding-top-65,.pt-65{padding-top:65px}.padding-right-65,.pr-65{padding-right:65px}.padding-bottom-65,.pb-65{padding-bottom:65px}.padding-left-65,.pl-65{padding-left:65px}.padding-horizontal-65,.ph-65{padding-left:65px;padding-right:65px}.padding-vertical-65,.pv-65{padding-top:65px;padding-bottom:65px}.p-70,.padding-70{padding:70px}.padding-top-70,.pt-70{padding-top:70px}.padding-right-70,.pr-70{padding-right:70px}.padding-bottom-70,.pb-70{padding-bottom:70px}.padding-left-70,.pl-70{padding-left:70px}.padding-horizontal-70,.ph-70{padding-left:70px;padding-right:70px}.padding-vertical-70,.pv-70{padding-top:70px;padding-bottom:70px}.p-75,.padding-75{padding:75px}.padding-top-75,.pt-75{padding-top:75px}.padding-right-75,.pr-75{padding-right:75px}.padding-bottom-75,.pb-75{padding-bottom:75px}.padding-left-75,.pl-75{padding-left:75px}.padding-horizontal-75,.ph-75{padding-left:75px;padding-right:75px}.padding-vertical-75,.pv-75{padding-top:75px;padding-bottom:75px}.p-80,.padding-80{padding:80px}.padding-top-80,.pt-80{padding-top:80px}.padding-right-80,.pr-80{padding-right:80px}.padding-bottom-80,.pb-80{padding-bottom:80px}.padding-left-80,.pl-80{padding-left:80px}.padding-horizontal-80,.ph-80{padding-left:80px;padding-right:80px}.padding-vertical-80,.pv-80{padding-top:80px;padding-bottom:80px}.p-85,.padding-85{padding:85px}.padding-top-85,.pt-85{padding-top:85px}.padding-right-85,.pr-85{padding-right:85px}.padding-bottom-85,.pb-85{padding-bottom:85px}.padding-left-85,.pl-85{padding-left:85px}.padding-horizontal-85,.ph-85{padding-left:85px;padding-right:85px}.padding-vertical-85,.pv-85{padding-top:85px;padding-bottom:85px}.p-90,.padding-90{padding:90px}.padding-top-90,.pt-90{padding-top:90px}.padding-right-90,.pr-90{padding-right:90px}.padding-bottom-90,.pb-90{padding-bottom:90px}.padding-left-90,.pl-90{padding-left:90px}.padding-horizontal-90,.ph-90{padding-left:90px;padding-right:90px}.padding-vertical-90,.pv-90{padding-top:90px;padding-bottom:90px}.p-95,.padding-95{padding:95px}.padding-top-95,.pt-95{padding-top:95px}.padding-right-95,.pr-95{padding-right:95px}.padding-bottom-95,.pb-95{padding-bottom:95px}.padding-left-95,.pl-95{padding-left:95px}.padding-horizontal-95,.ph-95{padding-left:95px;padding-right:95px}.padding-vertical-95,.pv-95{padding-top:95px;padding-bottom:95px}.p-100,.padding-100{padding:100px}.padding-top-100,.pt-100{padding-top:100px}.padding-right-100,.pr-100{padding-right:100px}.padding-bottom-100,.pb-100{padding-bottom:100px}.padding-left-100,.pl-100{padding-left:100px}.padding-horizontal-100,.ph-100{padding-left:100px;padding-right:100px}.padding-vertical-100,.pv-100{padding-top:100px;padding-bottom:100px}.p-8,.padding-8{padding:8px}.padding-top-8,.pt-8{padding-top:8px}.padding-right-8,.pr-8{padding-right:8px}.padding-bottom-8,.pb-8{padding-bottom:8px}.padding-left-8,.pl-8{padding-left:8px}.padding-horizontal-8,.ph-8{padding-left:8px;padding-right:8px}.padding-vertical-8,.pv-8{padding-top:8px;padding-bottom:8px}.p-16,.padding-16{padding:16px}.padding-top-16,.pt-16{padding-top:16px}.padding-right-16,.pr-16{padding-right:16px}.padding-bottom-16,.pb-16{padding-bottom:16px}.padding-left-16,.pl-16{padding-left:16px}.padding-horizontal-16,.ph-16{padding-left:16px;padding-right:16px}.padding-vertical-16,.pv-16{padding-top:16px;padding-bottom:16px}.p-24,.padding-24{padding:24px}.padding-top-24,.pt-24{padding-top:24px}.padding-right-24,.pr-24{padding-right:24px}.padding-bottom-24,.pb-24{padding-bottom:24px}.padding-left-24,.pl-24{padding-left:24px}.padding-horizontal-24,.ph-24{padding-left:24px;padding-right:24px}.padding-vertical-24,.pv-24{padding-top:24px;padding-bottom:24px}.p-32,.padding-32{padding:32px}.padding-top-32,.pt-32{padding-top:32px}.padding-right-32,.pr-32{padding-right:32px}.padding-bottom-32,.pb-32{padding-bottom:32px}.padding-left-32,.pl-32{padding-left:32px}.padding-horizontal-32,.ph-32{padding-left:32px;padding-right:32px}.padding-vertical-32,.pv-32{padding-top:32px;padding-bottom:32px}.p-48,.padding-48{padding:48px}.padding-top-48,.pt-48{padding-top:48px}.padding-right-48,.pr-48{padding-right:48px}.padding-bottom-48,.pb-48{padding-bottom:48px}.padding-left-48,.pl-48{padding-left:48px}.padding-horizontal-48,.ph-48{padding-left:48px;padding-right:48px}.padding-vertical-48,.pv-48{padding-top:48px;padding-bottom:48px}.p-56,.padding-56{padding:56px}.padding-top-56,.pt-56{padding-top:56px}.padding-right-56,.pr-56{padding-right:56px}.padding-bottom-56,.pb-56{padding-bottom:56px}.padding-left-56,.pl-56{padding-left:56px}.padding-horizontal-56,.ph-56{padding-left:56px;padding-right:56px}.padding-vertical-56,.pv-56{padding-top:56px;padding-bottom:56px}.p-64,.padding-64{padding:64px}.padding-top-64,.pt-64{padding-top:64px}.padding-right-64,.pr-64{padding-right:64px}.padding-bottom-64,.pb-64{padding-bottom:64px}.padding-left-64,.pl-64{padding-left:64px}.padding-horizontal-64,.ph-64{padding-left:64px;padding-right:64px}.padding-vertical-64,.pv-64{padding-top:64px;padding-bottom:64px}.p-72,.padding-72{padding:72px}.padding-top-72,.pt-72{padding-top:72px}.padding-right-72,.pr-72{padding-right:72px}.padding-bottom-72,.pb-72{padding-bottom:72px}.padding-left-72,.pl-72{padding-left:72px}.padding-horizontal-72,.ph-72{padding-left:72px;padding-right:72px}.padding-vertical-72,.pv-72{padding-top:72px;padding-bottom:72px}.p-88,.padding-88{padding:88px}.padding-top-88,.pt-88{padding-top:88px}.padding-right-88,.pr-88{padding-right:88px}.padding-bottom-88,.pb-88{padding-bottom:88px}.padding-left-88,.pl-88{padding-left:88px}.padding-horizontal-88,.ph-88{padding-left:88px;padding-right:88px}.padding-vertical-88,.pv-88{padding-top:88px;padding-bottom:88px}.p-96,.padding-96{padding:96px}.padding-top-96,.pt-96{padding-top:96px}.padding-right-96,.pr-96{padding-right:96px}.padding-bottom-96,.pb-96{padding-bottom:96px}.padding-left-96,.pl-96{padding-left:96px}.padding-horizontal-96,.ph-96{padding-left:96px;padding-right:96px}.padding-vertical-96,.pv-96{padding-top:96px;padding-bottom:96px}.m-0,.margin-0{margin:0}.margin-top-0,.mt-0{margin-top:0}.margin-right-0,.mr-0{margin-right:0}.margin-bottom-0,.mb-0{margin-bottom:0}.margin-left-0,.ml-0{margin-left:0}.margin-horizontal-0,.mh-0{margin-left:0;margin-right:0}.margin-vertical-0,.mv-0{margin-top:0;margin-bottom:0}.m-5,.margin-5{margin:5px}.margin-top-5,.mt-5{margin-top:5px}.margin-right-5,.mr-5{margin-right:5px}.margin-bottom-5,.mb-5{margin-bottom:5px}.margin-left-5,.ml-5{margin-left:5px}.margin-horizontal-5,.mh-5{margin-left:5px;margin-right:5px}.margin-vertical-5,.mv-5{margin-top:5px;margin-bottom:5px}.m-10,.margin-10{margin:10px}.margin-top-10,.mt-10{margin-top:10px}.margin-right-10,.mr-10{margin-right:10px}.margin-bottom-10,.mb-10{margin-bottom:10px}.margin-left-10,.ml-10{margin-left:10px}.margin-horizontal-10,.mh-10{margin-left:10px;margin-right:10px}.margin-vertical-10,.mv-10{margin-top:10px;margin-bottom:10px}.m-15,.margin-15{margin:15px}.margin-top-15,.mt-15{margin-top:15px}.margin-right-15,.mr-15{margin-right:15px}.margin-bottom-15,.mb-15{margin-bottom:15px}.margin-left-15,.ml-15{margin-left:15px}.margin-horizontal-15,.mh-15{margin-left:15px;margin-right:15px}.margin-vertical-15,.mv-15{margin-top:15px;margin-bottom:15px}.m-20,.margin-20{margin:20px}.margin-top-20,.mt-20{margin-top:20px}.margin-right-20,.mr-20{margin-right:20px}.margin-bottom-20,.mb-20{margin-bottom:20px}.margin-left-20,.ml-20{margin-left:20px}.margin-horizontal-20,.mh-20{margin-left:20px;margin-right:20px}.margin-vertical-20,.mv-20{margin-top:20px;margin-bottom:20px}.m-25,.margin-25{margin:25px}.margin-top-25,.mt-25{margin-top:25px}.margin-right-25,.mr-25{margin-right:25px}.margin-bottom-25,.mb-25{margin-bottom:25px}.margin-left-25,.ml-25{margin-left:25px}.margin-horizontal-25,.mh-25{margin-left:25px;margin-right:25px}.margin-vertical-25,.mv-25{margin-top:25px;margin-bottom:25px}.m-30,.margin-30{margin:30px}.margin-top-30,.mt-30{margin-top:30px}.margin-right-30,.mr-30{margin-right:30px}.margin-bottom-30,.mb-30{margin-bottom:30px}.margin-left-30,.ml-30{margin-left:30px}.margin-horizontal-30,.mh-30{margin-left:30px;margin-right:30px}.margin-vertical-30,.mv-30{margin-top:30px;margin-bottom:30px}.m-35,.margin-35{margin:35px}.margin-top-35,.mt-35{margin-top:35px}.margin-right-35,.mr-35{margin-right:35px}.margin-bottom-35,.mb-35{margin-bottom:35px}.margin-left-35,.ml-35{margin-left:35px}.margin-horizontal-35,.mh-35{margin-left:35px;margin-right:35px}.margin-vertical-35,.mv-35{margin-top:35px;margin-bottom:35px}.m-40,.margin-40{margin:40px}.margin-top-40,.mt-40{margin-top:40px}.margin-right-40,.mr-40{margin-right:40px}.margin-bottom-40,.mb-40{margin-bottom:40px}.margin-left-40,.ml-40{margin-left:40px}.margin-horizontal-40,.mh-40{margin-left:40px;margin-right:40px}.margin-vertical-40,.mv-40{margin-top:40px;margin-bottom:40px}.m-45,.margin-45{margin:45px}.margin-top-45,.mt-45{margin-top:45px}.margin-right-45,.mr-45{margin-right:45px}.margin-bottom-45,.mb-45{margin-bottom:45px}.margin-left-45,.ml-45{margin-left:45px}.margin-horizontal-45,.mh-45{margin-left:45px;margin-right:45px}.margin-vertical-45,.mv-45{margin-top:45px;margin-bottom:45px}.m-50,.margin-50{margin:50px}.margin-top-50,.mt-50{margin-top:50px}.margin-right-50,.mr-50{margin-right:50px}.margin-bottom-50,.mb-50{margin-bottom:50px}.margin-left-50,.ml-50{margin-left:50px}.margin-horizontal-50,.mh-50{margin-left:50px;margin-right:50px}.margin-vertical-50,.mv-50{margin-top:50px;margin-bottom:50px}.m-55,.margin-55{margin:55px}.margin-top-55,.mt-55{margin-top:55px}.margin-right-55,.mr-55{margin-right:55px}.margin-bottom-55,.mb-55{margin-bottom:55px}.margin-left-55,.ml-55{margin-left:55px}.margin-horizontal-55,.mh-55{margin-left:55px;margin-right:55px}.margin-vertical-55,.mv-55{margin-top:55px;margin-bottom:55px}.m-60,.margin-60{margin:60px}.margin-top-60,.mt-60{margin-top:60px}.margin-right-60,.mr-60{margin-right:60px}.margin-bottom-60,.mb-60{margin-bottom:60px}.margin-left-60,.ml-60{margin-left:60px}.margin-horizontal-60,.mh-60{margin-left:60px;margin-right:60px}.margin-vertical-60,.mv-60{margin-top:60px;margin-bottom:60px}.m-65,.margin-65{margin:65px}.margin-top-65,.mt-65{margin-top:65px}.margin-right-65,.mr-65{margin-right:65px}.margin-bottom-65,.mb-65{margin-bottom:65px}.margin-left-65,.ml-65{margin-left:65px}.margin-horizontal-65,.mh-65{margin-left:65px;margin-right:65px}.margin-vertical-65,.mv-65{margin-top:65px;margin-bottom:65px}.m-70,.margin-70{margin:70px}.margin-top-70,.mt-70{margin-top:70px}.margin-right-70,.mr-70{margin-right:70px}.margin-bottom-70,.mb-70{margin-bottom:70px}.margin-left-70,.ml-70{margin-left:70px}.margin-horizontal-70,.mh-70{margin-left:70px;margin-right:70px}.margin-vertical-70,.mv-70{margin-top:70px;margin-bottom:70px}.m-75,.margin-75{margin:75px}.margin-top-75,.mt-75{margin-top:75px}.margin-right-75,.mr-75{margin-right:75px}.margin-bottom-75,.mb-75{margin-bottom:75px}.margin-left-75,.ml-75{margin-left:75px}.margin-horizontal-75,.mh-75{margin-left:75px;margin-right:75px}.margin-vertical-75,.mv-75{margin-top:75px;margin-bottom:75px}.m-80,.margin-80{margin:80px}.margin-top-80,.mt-80{margin-top:80px}.margin-right-80,.mr-80{margin-right:80px}.margin-bottom-80,.mb-80{margin-bottom:80px}.margin-left-80,.ml-80{margin-left:80px}.margin-horizontal-80,.mh-80{margin-left:80px;margin-right:80px}.margin-vertical-80,.mv-80{margin-top:80px;margin-bottom:80px}.m-85,.margin-85{margin:85px}.margin-top-85,.mt-85{margin-top:85px}.margin-right-85,.mr-85{margin-right:85px}.margin-bottom-85,.mb-85{margin-bottom:85px}.margin-left-85,.ml-85{margin-left:85px}.margin-horizontal-85,.mh-85{margin-left:85px;margin-right:85px}.margin-vertical-85,.mv-85{margin-top:85px;margin-bottom:85px}.m-90,.margin-90{margin:90px}.margin-top-90,.mt-90{margin-top:90px}.margin-right-90,.mr-90{margin-right:90px}.margin-bottom-90,.mb-90{margin-bottom:90px}.margin-left-90,.ml-90{margin-left:90px}.margin-horizontal-90,.mh-90{margin-left:90px;margin-right:90px}.margin-vertical-90,.mv-90{margin-top:90px;margin-bottom:90px}.m-95,.margin-95{margin:95px}.margin-top-95,.mt-95{margin-top:95px}.margin-right-95,.mr-95{margin-right:95px}.margin-bottom-95,.mb-95{margin-bottom:95px}.margin-left-95,.ml-95{margin-left:95px}.margin-horizontal-95,.mh-95{margin-left:95px;margin-right:95px}.margin-vertical-95,.mv-95{margin-top:95px;margin-bottom:95px}.m-100,.margin-100{margin:100px}.margin-top-100,.mt-100{margin-top:100px}.margin-right-100,.mr-100{margin-right:100px}.margin-bottom-100,.mb-100{margin-bottom:100px}.margin-left-100,.ml-100{margin-left:100px}.margin-horizontal-100,.mh-100{margin-left:100px;margin-right:100px}.margin-vertical-100,.mv-100{margin-top:100px;margin-bottom:100px}.m-8,.margin-8{margin:8px}.margin-top-8,.mt-8{margin-top:8px}.margin-right-8,.mr-8{margin-right:8px}.margin-bottom-8,.mb-8{margin-bottom:8px}.margin-left-8,.ml-8{margin-left:8px}.margin-horizontal-8,.mh-8{margin-left:8px;margin-right:8px}.margin-vertical-8,.mv-8{margin-top:8px;margin-bottom:8px}.m-16,.margin-16{margin:16px}.margin-top-16,.mt-16{margin-top:16px}.margin-right-16,.mr-16{margin-right:16px}.margin-bottom-16,.mb-16{margin-bottom:16px}.margin-left-16,.ml-16{margin-left:16px}.margin-horizontal-16,.mh-16{margin-left:16px;margin-right:16px}.margin-vertical-16,.mv-16{margin-top:16px;margin-bottom:16px}.m-24,.margin-24{margin:24px}.margin-top-24,.mt-24{margin-top:24px}.margin-right-24,.mr-24{margin-right:24px}.margin-bottom-24,.mb-24{margin-bottom:24px}.margin-left-24,.ml-24{margin-left:24px}.margin-horizontal-24,.mh-24{margin-left:24px;margin-right:24px}.margin-vertical-24,.mv-24{margin-top:24px;margin-bottom:24px}.m-32,.margin-32{margin:32px}.margin-top-32,.mt-32{margin-top:32px}.margin-right-32,.mr-32{margin-right:32px}.margin-bottom-32,.mb-32{margin-bottom:32px}.margin-left-32,.ml-32{margin-left:32px}.margin-horizontal-32,.mh-32{margin-left:32px;margin-right:32px}.margin-vertical-32,.mv-32{margin-top:32px;margin-bottom:32px}.m-48,.margin-48{margin:48px}.margin-top-48,.mt-48{margin-top:48px}.margin-right-48,.mr-48{margin-right:48px}.margin-bottom-48,.mb-48{margin-bottom:48px}.margin-left-48,.ml-48{margin-left:48px}.margin-horizontal-48,.mh-48{margin-left:48px;margin-right:48px}.margin-vertical-48,.mv-48{margin-top:48px;margin-bottom:48px}.m-56,.margin-56{margin:56px}.margin-top-56,.mt-56{margin-top:56px}.margin-right-56,.mr-56{margin-right:56px}.margin-bottom-56,.mb-56{margin-bottom:56px}.margin-left-56,.ml-56{margin-left:56px}.margin-horizontal-56,.mh-56{margin-left:56px;margin-right:56px}.margin-vertical-56,.mv-56{margin-top:56px;margin-bottom:56px}.m-64,.margin-64{margin:64px}.margin-top-64,.mt-64{margin-top:64px}.margin-right-64,.mr-64{margin-right:64px}.margin-bottom-64,.mb-64{margin-bottom:64px}.margin-left-64,.ml-64{margin-left:64px}.margin-horizontal-64,.mh-64{margin-left:64px;margin-right:64px}.margin-vertical-64,.mv-64{margin-top:64px;margin-bottom:64px}.m-72,.margin-72{margin:72px}.margin-top-72,.mt-72{margin-top:72px}.margin-right-72,.mr-72{margin-right:72px}.margin-bottom-72,.mb-72{margin-bottom:72px}.margin-left-72,.ml-72{margin-left:72px}.margin-horizontal-72,.mh-72{margin-left:72px;margin-right:72px}.margin-vertical-72,.mv-72{margin-top:72px;margin-bottom:72px}.m-88,.margin-88{margin:88px}.margin-top-88,.mt-88{margin-top:88px}.margin-right-88,.mr-88{margin-right:88px}.margin-bottom-88,.mb-88{margin-bottom:88px}.margin-left-88,.ml-88{margin-left:88px}.margin-horizontal-88,.mh-88{margin-left:88px;margin-right:88px}.margin-vertical-88,.mv-88{margin-top:88px;margin-bottom:88px}.m-96,.margin-96{margin:96px}.margin-top-96,.mt-96{margin-top:96px}.margin-right-96,.mr-96{margin-right:96px}.margin-bottom-96,.mb-96{margin-bottom:96px}.margin-left-96,.ml-96{margin-left:96px}.margin-horizontal-96,.mh-96{margin-left:96px;margin-right:96px}.margin-vertical-96,.mv-96{margin-top:96px;margin-bottom:96px}.h-0,.height-0{height:0!important;min-height:0!important;max-height:0!important}.w-0,.width-0{width:0!important;min-width:0!important;max-width:0!important}.h-5,.height-5{height:5px!important;min-height:5px!important;max-height:5px!important}.w-5,.width-5{width:5px!important;min-width:5px!important;max-width:5px!important}.h-10,.height-10{height:10px!important;min-height:10px!important;max-height:10px!important}.w-10,.width-10{width:10px!important;min-width:10px!important;max-width:10px!important}.h-15,.height-15{height:15px!important;min-height:15px!important;max-height:15px!important}.w-15,.width-15{width:15px!important;min-width:15px!important;max-width:15px!important}.h-20,.height-20{height:20px!important;min-height:20px!important;max-height:20px!important}.w-20,.width-20{width:20px!important;min-width:20px!important;max-width:20px!important}.h-25,.height-25{height:25px!important;min-height:25px!important;max-height:25px!important}.w-25,.width-25{width:25px!important;min-width:25px!important;max-width:25px!important}.h-30,.height-30{height:30px!important;min-height:30px!important;max-height:30px!important}.w-30,.width-30{width:30px!important;min-width:30px!important;max-width:30px!important}.h-35,.height-35{height:35px!important;min-height:35px!important;max-height:35px!important}.w-35,.width-35{width:35px!important;min-width:35px!important;max-width:35px!important}.h-40,.height-40{height:40px!important;min-height:40px!important;max-height:40px!important}.w-40,.width-40{width:40px!important;min-width:40px!important;max-width:40px!important}.h-45,.height-45{height:45px!important;min-height:45px!important;max-height:45px!important}.w-45,.width-45{width:45px!important;min-width:45px!important;max-width:45px!important}.h-50,.height-50{height:50px!important;min-height:50px!important;max-height:50px!important}.w-50,.width-50{width:50px!important;min-width:50px!important;max-width:50px!important}.h-55,.height-55{height:55px!important;min-height:55px!important;max-height:55px!important}.w-55,.width-55{width:55px!important;min-width:55px!important;max-width:55px!important}.h-60,.height-60{height:60px!important;min-height:60px!important;max-height:60px!important}.w-60,.width-60{width:60px!important;min-width:60px!important;max-width:60px!important}.h-65,.height-65{height:65px!important;min-height:65px!important;max-height:65px!important}.w-65,.width-65{width:65px!important;min-width:65px!important;max-width:65px!important}.h-70,.height-70{height:70px!important;min-height:70px!important;max-height:70px!important}.w-70,.width-70{width:70px!important;min-width:70px!important;max-width:70px!important}.h-75,.height-75{height:75px!important;min-height:75px!important;max-height:75px!important}.w-75,.width-75{width:75px!important;min-width:75px!important;max-width:75px!important}.h-80,.height-80{height:80px!important;min-height:80px!important;max-height:80px!important}.w-80,.width-80{width:80px!important;min-width:80px!important;max-width:80px!important}.h-85,.height-85{height:85px!important;min-height:85px!important;max-height:85px!important}.w-85,.width-85{width:85px!important;min-width:85px!important;max-width:85px!important}.h-90,.height-90{height:90px!important;min-height:90px!important;max-height:90px!important}.w-90,.width-90{width:90px!important;min-width:90px!important;max-width:90px!important}.h-95,.height-95{height:95px!important;min-height:95px!important;max-height:95px!important}.w-95,.width-95{width:95px!important;min-width:95px!important;max-width:95px!important}.h-100,.height-100{height:100px!important;min-height:100px!important;max-height:100px!important}.w-100,.width-100{width:100px!important;min-width:100px!important;max-width:100px!important}.h-105,.height-105{height:105px!important;min-height:105px!important;max-height:105px!important}.w-105,.width-105{width:105px!important;min-width:105px!important;max-width:105px!important}.h-110,.height-110{height:110px!important;min-height:110px!important;max-height:110px!important}.w-110,.width-110{width:110px!important;min-width:110px!important;max-width:110px!important}.h-115,.height-115{height:115px!important;min-height:115px!important;max-height:115px!important}.w-115,.width-115{width:115px!important;min-width:115px!important;max-width:115px!important}.h-120,.height-120{height:120px!important;min-height:120px!important;max-height:120px!important}.w-120,.width-120{width:120px!important;min-width:120px!important;max-width:120px!important}.h-125,.height-125{height:125px!important;min-height:125px!important;max-height:125px!important}.w-125,.width-125{width:125px!important;min-width:125px!important;max-width:125px!important}.h-130,.height-130{height:130px!important;min-height:130px!important;max-height:130px!important}.w-130,.width-130{width:130px!important;min-width:130px!important;max-width:130px!important}.h-135,.height-135{height:135px!important;min-height:135px!important;max-height:135px!important}.w-135,.width-135{width:135px!important;min-width:135px!important;max-width:135px!important}.h-140,.height-140{height:140px!important;min-height:140px!important;max-height:140px!important}.w-140,.width-140{width:140px!important;min-width:140px!important;max-width:140px!important}.h-145,.height-145{height:145px!important;min-height:145px!important;max-height:145px!important}.w-145,.width-145{width:145px!important;min-width:145px!important;max-width:145px!important}.h-150,.height-150{height:150px!important;min-height:150px!important;max-height:150px!important}.w-150,.width-150{width:150px!important;min-width:150px!important;max-width:150px!important}.h-155,.height-155{height:155px!important;min-height:155px!important;max-height:155px!important}.w-155,.width-155{width:155px!important;min-width:155px!important;max-width:155px!important}.h-160,.height-160{height:160px!important;min-height:160px!important;max-height:160px!important}.w-160,.width-160{width:160px!important;min-width:160px!important;max-width:160px!important}.h-165,.height-165{height:165px!important;min-height:165px!important;max-height:165px!important}.w-165,.width-165{width:165px!important;min-width:165px!important;max-width:165px!important}.h-170,.height-170{height:170px!important;min-height:170px!important;max-height:170px!important}.w-170,.width-170{width:170px!important;min-width:170px!important;max-width:170px!important}.h-175,.height-175{height:175px!important;min-height:175px!important;max-height:175px!important}.w-175,.width-175{width:175px!important;min-width:175px!important;max-width:175px!important}.h-180,.height-180{height:180px!important;min-height:180px!important;max-height:180px!important}.w-180,.width-180{width:180px!important;min-width:180px!important;max-width:180px!important}.h-185,.height-185{height:185px!important;min-height:185px!important;max-height:185px!important}.w-185,.width-185{width:185px!important;min-width:185px!important;max-width:185px!important}.h-190,.height-190{height:190px!important;min-height:190px!important;max-height:190px!important}.w-190,.width-190{width:190px!important;min-width:190px!important;max-width:190px!important}.h-195,.height-195{height:195px!important;min-height:195px!important;max-height:195px!important}.w-195,.width-195{width:195px!important;min-width:195px!important;max-width:195px!important}.h-200,.height-200{height:200px!important;min-height:200px!important;max-height:200px!important}.w-200,.width-200{width:200px!important;min-width:200px!important;max-width:200px!important}.h-205,.height-205{height:205px!important;min-height:205px!important;max-height:205px!important}.w-205,.width-205{width:205px!important;min-width:205px!important;max-width:205px!important}.h-210,.height-210{height:210px!important;min-height:210px!important;max-height:210px!important}.w-210,.width-210{width:210px!important;min-width:210px!important;max-width:210px!important}.h-215,.height-215{height:215px!important;min-height:215px!important;max-height:215px!important}.w-215,.width-215{width:215px!important;min-width:215px!important;max-width:215px!important}.h-220,.height-220{height:220px!important;min-height:220px!important;max-height:220px!important}.w-220,.width-220{width:220px!important;min-width:220px!important;max-width:220px!important}.h-225,.height-225{height:225px!important;min-height:225px!important;max-height:225px!important}.w-225,.width-225{width:225px!important;min-width:225px!important;max-width:225px!important}.h-230,.height-230{height:230px!important;min-height:230px!important;max-height:230px!important}.w-230,.width-230{width:230px!important;min-width:230px!important;max-width:230px!important}.h-235,.height-235{height:235px!important;min-height:235px!important;max-height:235px!important}.w-235,.width-235{width:235px!important;min-width:235px!important;max-width:235px!important}.h-240,.height-240{height:240px!important;min-height:240px!important;max-height:240px!important}.w-240,.width-240{width:240px!important;min-width:240px!important;max-width:240px!important}.h-245,.height-245{height:245px!important;min-height:245px!important;max-height:245px!important}.w-245,.width-245{width:245px!important;min-width:245px!important;max-width:245px!important}.h-250,.height-250{height:250px!important;min-height:250px!important;max-height:250px!important}.w-250,.width-250{width:250px!important;min-width:250px!important;max-width:250px!important}.h-255,.height-255{height:255px!important;min-height:255px!important;max-height:255px!important}.w-255,.width-255{width:255px!important;min-width:255px!important;max-width:255px!important}.h-260,.height-260{height:260px!important;min-height:260px!important;max-height:260px!important}.w-260,.width-260{width:260px!important;min-width:260px!important;max-width:260px!important}.h-265,.height-265{height:265px!important;min-height:265px!important;max-height:265px!important}.w-265,.width-265{width:265px!important;min-width:265px!important;max-width:265px!important}.h-270,.height-270{height:270px!important;min-height:270px!important;max-height:270px!important}.w-270,.width-270{width:270px!important;min-width:270px!important;max-width:270px!important}.h-275,.height-275{height:275px!important;min-height:275px!important;max-height:275px!important}.w-275,.width-275{width:275px!important;min-width:275px!important;max-width:275px!important}.h-280,.height-280{height:280px!important;min-height:280px!important;max-height:280px!important}.w-280,.width-280{width:280px!important;min-width:280px!important;max-width:280px!important}.h-285,.height-285{height:285px!important;min-height:285px!important;max-height:285px!important}.w-285,.width-285{width:285px!important;min-width:285px!important;max-width:285px!important}.h-290,.height-290{height:290px!important;min-height:290px!important;max-height:290px!important}.w-290,.width-290{width:290px!important;min-width:290px!important;max-width:290px!important}.h-295,.height-295{height:295px!important;min-height:295px!important;max-height:295px!important}.w-295,.width-295{width:295px!important;min-width:295px!important;max-width:295px!important}.h-300,.height-300{height:300px!important;min-height:300px!important;max-height:300px!important}.w-300,.width-300{width:300px!important;min-width:300px!important;max-width:300px!important}.h-305,.height-305{height:305px!important;min-height:305px!important;max-height:305px!important}.w-305,.width-305{width:305px!important;min-width:305px!important;max-width:305px!important}.h-310,.height-310{height:310px!important;min-height:310px!important;max-height:310px!important}.w-310,.width-310{width:310px!important;min-width:310px!important;max-width:310px!important}.h-315,.height-315{height:315px!important;min-height:315px!important;max-height:315px!important}.w-315,.width-315{width:315px!important;min-width:315px!important;max-width:315px!important}.h-320,.height-320{height:320px!important;min-height:320px!important;max-height:320px!important}.w-320,.width-320{width:320px!important;min-width:320px!important;max-width:320px!important}.h-325,.height-325{height:325px!important;min-height:325px!important;max-height:325px!important}.w-325,.width-325{width:325px!important;min-width:325px!important;max-width:325px!important}.h-330,.height-330{height:330px!important;min-height:330px!important;max-height:330px!important}.w-330,.width-330{width:330px!important;min-width:330px!important;max-width:330px!important}.h-335,.height-335{height:335px!important;min-height:335px!important;max-height:335px!important}.w-335,.width-335{width:335px!important;min-width:335px!important;max-width:335px!important}.h-340,.height-340{height:340px!important;min-height:340px!important;max-height:340px!important}.w-340,.width-340{width:340px!important;min-width:340px!important;max-width:340px!important}.h-345,.height-345{height:345px!important;min-height:345px!important;max-height:345px!important}.w-345,.width-345{width:345px!important;min-width:345px!important;max-width:345px!important}.h-350,.height-350{height:350px!important;min-height:350px!important;max-height:350px!important}.w-350,.width-350{width:350px!important;min-width:350px!important;max-width:350px!important}.h-355,.height-355{height:355px!important;min-height:355px!important;max-height:355px!important}.w-355,.width-355{width:355px!important;min-width:355px!important;max-width:355px!important}.h-360,.height-360{height:360px!important;min-height:360px!important;max-height:360px!important}.w-360,.width-360{width:360px!important;min-width:360px!important;max-width:360px!important}.h-365,.height-365{height:365px!important;min-height:365px!important;max-height:365px!important}.w-365,.width-365{width:365px!important;min-width:365px!important;max-width:365px!important}.h-370,.height-370{height:370px!important;min-height:370px!important;max-height:370px!important}.w-370,.width-370{width:370px!important;min-width:370px!important;max-width:370px!important}.h-375,.height-375{height:375px!important;min-height:375px!important;max-height:375px!important}.w-375,.width-375{width:375px!important;min-width:375px!important;max-width:375px!important}.h-380,.height-380{height:380px!important;min-height:380px!important;max-height:380px!important}.w-380,.width-380{width:380px!important;min-width:380px!important;max-width:380px!important}.h-385,.height-385{height:385px!important;min-height:385px!important;max-height:385px!important}.w-385,.width-385{width:385px!important;min-width:385px!important;max-width:385px!important}.h-390,.height-390{height:390px!important;min-height:390px!important;max-height:390px!important}.w-390,.width-390{width:390px!important;min-width:390px!important;max-width:390px!important}.h-395,.height-395{height:395px!important;min-height:395px!important;max-height:395px!important}.w-395,.width-395{width:395px!important;min-width:395px!important;max-width:395px!important}.h-400,.height-400{height:400px!important;min-height:400px!important;max-height:400px!important}.w-400,.width-400{width:400px!important;min-width:400px!important;max-width:400px!important}.h-405,.height-405{height:405px!important;min-height:405px!important;max-height:405px!important}.w-405,.width-405{width:405px!important;min-width:405px!important;max-width:405px!important}.h-410,.height-410{height:410px!important;min-height:410px!important;max-height:410px!important}.w-410,.width-410{width:410px!important;min-width:410px!important;max-width:410px!important}.h-415,.height-415{height:415px!important;min-height:415px!important;max-height:415px!important}.w-415,.width-415{width:415px!important;min-width:415px!important;max-width:415px!important}.h-420,.height-420{height:420px!important;min-height:420px!important;max-height:420px!important}.w-420,.width-420{width:420px!important;min-width:420px!important;max-width:420px!important}.h-425,.height-425{height:425px!important;min-height:425px!important;max-height:425px!important}.w-425,.width-425{width:425px!important;min-width:425px!important;max-width:425px!important}.h-430,.height-430{height:430px!important;min-height:430px!important;max-height:430px!important}.w-430,.width-430{width:430px!important;min-width:430px!important;max-width:430px!important}.h-435,.height-435{height:435px!important;min-height:435px!important;max-height:435px!important}.w-435,.width-435{width:435px!important;min-width:435px!important;max-width:435px!important}.h-440,.height-440{height:440px!important;min-height:440px!important;max-height:440px!important}.w-440,.width-440{width:440px!important;min-width:440px!important;max-width:440px!important}.h-445,.height-445{height:445px!important;min-height:445px!important;max-height:445px!important}.w-445,.width-445{width:445px!important;min-width:445px!important;max-width:445px!important}.h-450,.height-450{height:450px!important;min-height:450px!important;max-height:450px!important}.w-450,.width-450{width:450px!important;min-width:450px!important;max-width:450px!important}.h-455,.height-455{height:455px!important;min-height:455px!important;max-height:455px!important}.w-455,.width-455{width:455px!important;min-width:455px!important;max-width:455px!important}.h-460,.height-460{height:460px!important;min-height:460px!important;max-height:460px!important}.w-460,.width-460{width:460px!important;min-width:460px!important;max-width:460px!important}.h-465,.height-465{height:465px!important;min-height:465px!important;max-height:465px!important}.w-465,.width-465{width:465px!important;min-width:465px!important;max-width:465px!important}.h-470,.height-470{height:470px!important;min-height:470px!important;max-height:470px!important}.w-470,.width-470{width:470px!important;min-width:470px!important;max-width:470px!important}.h-475,.height-475{height:475px!important;min-height:475px!important;max-height:475px!important}.w-475,.width-475{width:475px!important;min-width:475px!important;max-width:475px!important}.h-480,.height-480{height:480px!important;min-height:480px!important;max-height:480px!important}.w-480,.width-480{width:480px!important;min-width:480px!important;max-width:480px!important}.h-485,.height-485{height:485px!important;min-height:485px!important;max-height:485px!important}.w-485,.width-485{width:485px!important;min-width:485px!important;max-width:485px!important}.h-490,.height-490{height:490px!important;min-height:490px!important;max-height:490px!important}.w-490,.width-490{width:490px!important;min-width:490px!important;max-width:490px!important}.h-495,.height-495{height:495px!important;min-height:495px!important;max-height:495px!important}.w-495,.width-495{width:495px!important;min-width:495px!important;max-width:495px!important}.h-500,.height-500{height:500px!important;min-height:500px!important;max-height:500px!important}.w-500,.width-500{width:500px!important;min-width:500px!important;max-width:500px!important}.h-8,.height-8{height:8px!important;min-height:8px!important;max-height:8px!important}.w-8,.width-8{width:8px!important;min-width:8px!important;max-width:8px!important}.h-16,.height-16{height:16px!important;min-height:16px!important;max-height:16px!important}.w-16,.width-16{width:16px!important;min-width:16px!important;max-width:16px!important}.h-24,.height-24{height:24px!important;min-height:24px!important;max-height:24px!important}.w-24,.width-24{width:24px!important;min-width:24px!important;max-width:24px!important}.h-32,.height-32{height:32px!important;min-height:32px!important;max-height:32px!important}.w-32,.width-32{width:32px!important;min-width:32px!important;max-width:32px!important}.h-48,.height-48{height:48px!important;min-height:48px!important;max-height:48px!important}.w-48,.width-48{width:48px!important;min-width:48px!important;max-width:48px!important}.h-56,.height-56{height:56px!important;min-height:56px!important;max-height:56px!important}.w-56,.width-56{width:56px!important;min-width:56px!important;max-width:56px!important}.h-64,.height-64{height:64px!important;min-height:64px!important;max-height:64px!important}.w-64,.width-64{width:64px!important;min-width:64px!important;max-width:64px!important}.h-72,.height-72{height:72px!important;min-height:72px!important;max-height:72px!important}.w-72,.width-72{width:72px!important;min-width:72px!important;max-width:72px!important}.h-88,.height-88{height:88px!important;min-height:88px!important;max-height:88px!important}.w-88,.width-88{width:88px!important;min-width:88px!important;max-width:88px!important}.h-96,.height-96{height:96px!important;min-height:96px!important;max-height:96px!important}.w-96,.width-96{width:96px!important;min-width:96px!important;max-width:96px!important}.h-104,.height-104{height:104px!important;min-height:104px!important;max-height:104px!important}.w-104,.width-104{width:104px!important;min-width:104px!important;max-width:104px!important}.h-112,.height-112{height:112px!important;min-height:112px!important;max-height:112px!important}.w-112,.width-112{width:112px!important;min-width:112px!important;max-width:112px!important}.h-128,.height-128{height:128px!important;min-height:128px!important;max-height:128px!important}.w-128,.width-128{width:128px!important;min-width:128px!important;max-width:128px!important}.h-136,.height-136{height:136px!important;min-height:136px!important;max-height:136px!important}.w-136,.width-136{width:136px!important;min-width:136px!important;max-width:136px!important}.h-144,.height-144{height:144px!important;min-height:144px!important;max-height:144px!important}.w-144,.width-144{width:144px!important;min-width:144px!important;max-width:144px!important}.h-152,.height-152{height:152px!important;min-height:152px!important;max-height:152px!important}.w-152,.width-152{width:152px!important;min-width:152px!important;max-width:152px!important}.h-168,.height-168{height:168px!important;min-height:168px!important;max-height:168px!important}.w-168,.width-168{width:168px!important;min-width:168px!important;max-width:168px!important}.h-176,.height-176{height:176px!important;min-height:176px!important;max-height:176px!important}.w-176,.width-176{width:176px!important;min-width:176px!important;max-width:176px!important}.h-184,.height-184{height:184px!important;min-height:184px!important;max-height:184px!important}.w-184,.width-184{width:184px!important;min-width:184px!important;max-width:184px!important}.h-192,.height-192{height:192px!important;min-height:192px!important;max-height:192px!important}.w-192,.width-192{width:192px!important;min-width:192px!important;max-width:192px!important}.h-208,.height-208{height:208px!important;min-height:208px!important;max-height:208px!important}.w-208,.width-208{width:208px!important;min-width:208px!important;max-width:208px!important}.h-216,.height-216{height:216px!important;min-height:216px!important;max-height:216px!important}.w-216,.width-216{width:216px!important;min-width:216px!important;max-width:216px!important}.h-224,.height-224{height:224px!important;min-height:224px!important;max-height:224px!important}.w-224,.width-224{width:224px!important;min-width:224px!important;max-width:224px!important}.h-232,.height-232{height:232px!important;min-height:232px!important;max-height:232px!important}.w-232,.width-232{width:232px!important;min-width:232px!important;max-width:232px!important}.h-248,.height-248{height:248px!important;min-height:248px!important;max-height:248px!important}.w-248,.width-248{width:248px!important;min-width:248px!important;max-width:248px!important}.h-256,.height-256{height:256px!important;min-height:256px!important;max-height:256px!important}.w-256,.width-256{width:256px!important;min-width:256px!important;max-width:256px!important}.h-264,.height-264{height:264px!important;min-height:264px!important;max-height:264px!important}.w-264,.width-264{width:264px!important;min-width:264px!important;max-width:264px!important}.h-272,.height-272{height:272px!important;min-height:272px!important;max-height:272px!important}.w-272,.width-272{width:272px!important;min-width:272px!important;max-width:272px!important}.h-288,.height-288{height:288px!important;min-height:288px!important;max-height:288px!important}.w-288,.width-288{width:288px!important;min-width:288px!important;max-width:288px!important}.h-296,.height-296{height:296px!important;min-height:296px!important;max-height:296px!important}.w-296,.width-296{width:296px!important;min-width:296px!important;max-width:296px!important}.h-304,.height-304{height:304px!important;min-height:304px!important;max-height:304px!important}.w-304,.width-304{width:304px!important;min-width:304px!important;max-width:304px!important}.h-312,.height-312{height:312px!important;min-height:312px!important;max-height:312px!important}.w-312,.width-312{width:312px!important;min-width:312px!important;max-width:312px!important}.h-328,.height-328{height:328px!important;min-height:328px!important;max-height:328px!important}.w-328,.width-328{width:328px!important;min-width:328px!important;max-width:328px!important}.h-336,.height-336{height:336px!important;min-height:336px!important;max-height:336px!important}.w-336,.width-336{width:336px!important;min-width:336px!important;max-width:336px!important}.h-344,.height-344{height:344px!important;min-height:344px!important;max-height:344px!important}.w-344,.width-344{width:344px!important;min-width:344px!important;max-width:344px!important}.h-352,.height-352{height:352px!important;min-height:352px!important;max-height:352px!important}.w-352,.width-352{width:352px!important;min-width:352px!important;max-width:352px!important}.h-368,.height-368{height:368px!important;min-height:368px!important;max-height:368px!important}.w-368,.width-368{width:368px!important;min-width:368px!important;max-width:368px!important}.h-376,.height-376{height:376px!important;min-height:376px!important;max-height:376px!important}.w-376,.width-376{width:376px!important;min-width:376px!important;max-width:376px!important}.h-384,.height-384{height:384px!important;min-height:384px!important;max-height:384px!important}.w-384,.width-384{width:384px!important;min-width:384px!important;max-width:384px!important}.h-392,.height-392{height:392px!important;min-height:392px!important;max-height:392px!important}.w-392,.width-392{width:392px!important;min-width:392px!important;max-width:392px!important}.h-408,.height-408{height:408px!important;min-height:408px!important;max-height:408px!important}.w-408,.width-408{width:408px!important;min-width:408px!important;max-width:408px!important}.h-416,.height-416{height:416px!important;min-height:416px!important;max-height:416px!important}.w-416,.width-416{width:416px!important;min-width:416px!important;max-width:416px!important}.h-424,.height-424{height:424px!important;min-height:424px!important;max-height:424px!important}.w-424,.width-424{width:424px!important;min-width:424px!important;max-width:424px!important}.h-432,.height-432{height:432px!important;min-height:432px!important;max-height:432px!important}.w-432,.width-432{width:432px!important;min-width:432px!important;max-width:432px!important}.h-448,.height-448{height:448px!important;min-height:448px!important;max-height:448px!important}.w-448,.width-448{width:448px!important;min-width:448px!important;max-width:448px!important}.h-456,.height-456{height:456px!important;min-height:456px!important;max-height:456px!important}.w-456,.width-456{width:456px!important;min-width:456px!important;max-width:456px!important}.h-464,.height-464{height:464px!important;min-height:464px!important;max-height:464px!important}.w-464,.width-464{width:464px!important;min-width:464px!important;max-width:464px!important}.h-472,.height-472{height:472px!important;min-height:472px!important;max-height:472px!important}.w-472,.width-472{width:472px!important;min-width:472px!important;max-width:472px!important}.h-488,.height-488{height:488px!important;min-height:488px!important;max-height:488px!important}.w-488,.width-488{width:488px!important;min-width:488px!important;max-width:488px!important}.h-496,.height-496{height:496px!important;min-height:496px!important;max-height:496px!important}.w-496,.width-496{width:496px!important;min-width:496px!important;max-width:496px!important}.h-504,.height-504{height:504px!important;min-height:504px!important;max-height:504px!important}.w-504,.width-504{width:504px!important;min-width:504px!important;max-width:504px!important}.h-512,.height-512{height:512px!important;min-height:512px!important;max-height:512px!important}.w-512,.width-512{width:512px!important;min-width:512px!important;max-width:512px!important}.h-528,.height-528{height:528px!important;min-height:528px!important;max-height:528px!important}.w-528,.width-528{width:528px!important;min-width:528px!important;max-width:528px!important}.h-536,.height-536{height:536px!important;min-height:536px!important;max-height:536px!important}.w-536,.width-536{width:536px!important;min-width:536px!important;max-width:536px!important}.h-544,.height-544{height:544px!important;min-height:544px!important;max-height:544px!important}.w-544,.width-544{width:544px!important;min-width:544px!important;max-width:544px!important}.h-552,.height-552{height:552px!important;min-height:552px!important;max-height:552px!important}.w-552,.width-552{width:552px!important;min-width:552px!important;max-width:552px!important}.h-568,.height-568{height:568px!important;min-height:568px!important;max-height:568px!important}.w-568,.width-568{width:568px!important;min-width:568px!important;max-width:568px!important}.h-576,.height-576{height:576px!important;min-height:576px!important;max-height:576px!important}.w-576,.width-576{width:576px!important;min-width:576px!important;max-width:576px!important}.h-584,.height-584{height:584px!important;min-height:584px!important;max-height:584px!important}.w-584,.width-584{width:584px!important;min-width:584px!important;max-width:584px!important}.h-592,.height-592{height:592px!important;min-height:592px!important;max-height:592px!important}.w-592,.width-592{width:592px!important;min-width:592px!important;max-width:592px!important}.h-608,.height-608{height:608px!important;min-height:608px!important;max-height:608px!important}.w-608,.width-608{width:608px!important;min-width:608px!important;max-width:608px!important}.h-616,.height-616{height:616px!important;min-height:616px!important;max-height:616px!important}.w-616,.width-616{width:616px!important;min-width:616px!important;max-width:616px!important}.h-624,.height-624{height:624px!important;min-height:624px!important;max-height:624px!important}.w-624,.width-624{width:624px!important;min-width:624px!important;max-width:624px!important}.h-632,.height-632{height:632px!important;min-height:632px!important;max-height:632px!important}.w-632,.width-632{width:632px!important;min-width:632px!important;max-width:632px!important}.h-648,.height-648{height:648px!important;min-height:648px!important;max-height:648px!important}.w-648,.width-648{width:648px!important;min-width:648px!important;max-width:648px!important}.h-656,.height-656{height:656px!important;min-height:656px!important;max-height:656px!important}.w-656,.width-656{width:656px!important;min-width:656px!important;max-width:656px!important}.h-664,.height-664{height:664px!important;min-height:664px!important;max-height:664px!important}.w-664,.width-664{width:664px!important;min-width:664px!important;max-width:664px!important}.h-672,.height-672{height:672px!important;min-height:672px!important;max-height:672px!important}.w-672,.width-672{width:672px!important;min-width:672px!important;max-width:672px!important}.h-688,.height-688{height:688px!important;min-height:688px!important;max-height:688px!important}.w-688,.width-688{width:688px!important;min-width:688px!important;max-width:688px!important}.h-696,.height-696{height:696px!important;min-height:696px!important;max-height:696px!important}.w-696,.width-696{width:696px!important;min-width:696px!important;max-width:696px!important}.h-704,.height-704{height:704px!important;min-height:704px!important;max-height:704px!important}.w-704,.width-704{width:704px!important;min-width:704px!important;max-width:704px!important}.h-712,.height-712{height:712px!important;min-height:712px!important;max-height:712px!important}.w-712,.width-712{width:712px!important;min-width:712px!important;max-width:712px!important}.h-728,.height-728{height:728px!important;min-height:728px!important;max-height:728px!important}.w-728,.width-728{width:728px!important;min-width:728px!important;max-width:728px!important}.h-736,.height-736{height:736px!important;min-height:736px!important;max-height:736px!important}.w-736,.width-736{width:736px!important;min-width:736px!important;max-width:736px!important}.h-744,.height-744{height:744px!important;min-height:744px!important;max-height:744px!important}.w-744,.width-744{width:744px!important;min-width:744px!important;max-width:744px!important}.h-752,.height-752{height:752px!important;min-height:752px!important;max-height:752px!important}.w-752,.width-752{width:752px!important;min-width:752px!important;max-width:752px!important}.h-768,.height-768{height:768px!important;min-height:768px!important;max-height:768px!important}.w-768,.width-768{width:768px!important;min-width:768px!important;max-width:768px!important}.h-776,.height-776{height:776px!important;min-height:776px!important;max-height:776px!important}.w-776,.width-776{width:776px!important;min-width:776px!important;max-width:776px!important}.h-784,.height-784{height:784px!important;min-height:784px!important;max-height:784px!important}.w-784,.width-784{width:784px!important;min-width:784px!important;max-width:784px!important}.h-792,.height-792{height:792px!important;min-height:792px!important;max-height:792px!important}.w-792,.width-792{width:792px!important;min-width:792px!important;max-width:792px!important}.b,.border{border:1px solid rgba(0,0,0,.12)}.border-top,.bt{border-top:1px solid rgba(0,0,0,.12)}.border-right,.br{border-right:1px solid rgba(0,0,0,.12)}.bb,.border-bottom{border-bottom:1px solid rgba(0,0,0,.12)}.bl,.border-left{border-left:1px solid rgba(0,0,0,.12)}.bh,.border-horizontal{border-left:1px solid rgba(0,0,0,.12);border-right:1px solid rgba(0,0,0,.12)}.border-vertical,.bv{border-top:1px solid rgba(0,0,0,.12);border-bottom:1px solid rgba(0,0,0,.12)}.brad-1{border-radius:1px}.brad-2{border-radius:2px}.brad-3{border-radius:3px}.brad-4{border-radius:4px}.brad-5{border-radius:5px}.brad-6{border-radius:6px}.brad-7{border-radius:7px}.brad-8{border-radius:8px}.brad-9{border-radius:9px}.brad-10{border-radius:10px}.brad-11{border-radius:11px}.brad-12{border-radius:12px}@media all{.page-break{display:none}}@media print{.page-break{display:block;break-after:always;page-break-after:always}#main #vertical-navigation{display:none}#main #toolbar{display:none}#main #quick-panel{display:none}#main #content{position:relative!important;top:0!important;right:0!important;bottom:0!important;left:0!important;background:0 0!important}ms-theme-options{display:none}.ps-scrollbar-x-rail,.ps-scrollbar-y-rail{display:none!important}.printable{overflow:visible!important}.printable .template-layout{display:inline!important}}.advanced-search-container{border-bottom:1px rgba(0,0,0,.12) solid}.advanced-search-conditions{border-bottom:1px rgba(0,0,0,.12) solid;padding:4px 0}.advanced-search-conditions .errors{font-size:12px;color:#dd2c00;margin-top:10px}.advanced-search-conditions .advanced-search-chips md-chips-wrap{box-shadow:none}.advanced-search-conditions .advanced-search-chips md-chip{position:relative}.advanced-search-conditions .advanced-search-chips md-chip .md-chip-content md-chip-template span p.filter-text{display:inline-block;margin:0}.advanced-search-conditions .advanced-search-chips md-chip .md-chip-remove-container{position:absolute;right:4px;top:4px;margin-right:0;height:24px}.advanced-search-conditions .advanced-search-chips md-chip .md-chip-remove-container button.remove-filter{position:relative;height:24px;width:24px;line-height:30px;text-align:center;border-radius:50%;border:none;box-shadow:none;padding:0;margin:0;transition:background .15s linear;display:block}.advanced-search-conditions .advanced-search-chips md-chip .md-chip-remove-container button.remove-filter md-icon{position:absolute;top:50%;left:50%;transform:translate3d(-50%,-50%,0);color:#616161}.advanced-search-conditions .advanced-search-chips md-chip .md-chip-remove-container button.remove-filter md-icon:focus,.advanced-search-conditions .advanced-search-chips md-chip .md-chip-remove-container button.remove-filter md-icon:hover{color:rgba(255,0,0,.8)}.advanced-search-conditions .advanced-search-chips md-chips-wrap.md-removable md-chip md-chip-template{padding-right:5px}.advanced-search-bar{padding:10px 0}.advanced-search-bar md-input-container.no-errors{font-size:12px;transition:0s none;-webkit-transition:0s none;animation:0s none;-webkit-animation:0s none}.advanced-search-bar md-input-container.no-errors input{font-family:Arial Unicode MS,Arial,Helvetica}.advanced-search-bar md-input-container.no-errors .md-errors-spacer{min-height:0}md-option div div.operators-list{display:table}md-option div div.operators-list span{display:table-cell}md-option div div.operators-list span.operator-symbol{display:table-cell;font-size:14px;width:30px}.advanced-search-bar mdp-date-picker button{margin:0!important}.advanced-search-bar mdp-date-picker md-input-container{flex:1;margin:0}.advanced-search-bar mdp-date-picker md-input-container label{font-size:12px}.advanced-search-bar mdp-date-picker md-input-container .md-errors-spacer{min-height:0}.advanced-search-bar div md-date-range{font-size:12px;margin-left:10px}.advanced-search-bar div.autocomplete-input md-icon{margin:8px 8px 8px 0}.advanced-search-bar div.autocomplete-input md-autocomplete{font-size:12px!important}.advanced-search-bar div.autocomplete-input md-autocomplete md-autocomplete-wrap{height:0}.advanced-search-bar div.autocomplete-input md-autocomplete md-autocomplete-wrap md-input-container{margin:0}.advanced-search-bar div.autocomplete-input md-autocomplete md-autocomplete-wrap md-input-container input[type=search]{padding:0!important}.advanced-search-bar div.autocomplete-input md-autocomplete md-autocomplete-wrap md-input-container div.md-errors-spacer{min-height:0}md-toolbar.advanced-search-dialog-header{background-image:url(/assets/images/backgrounds/header-bg.png);background-position:top}.md-autocomplete-suggestions-container li .highlight,.md-autocomplete-suggestions-container.md-default-theme li .highlight{color:#ca1d1d;font-weight:700}.chip-disabled{opacity:.4}.ms-card{display:flex;flex-direction:row;padding:8px}.ms-card .ms-card-content-wrapper{position:relative;overflow:hidden;width:100%;max-width:400px;border-radius:2px;background:#fff;box-shadow:0 3px 1px -2px rgba(0,0,0,.14),0 2px 2px 0 rgba(0,0,0,.098),0 1px 5px 0 rgba(0,0,0,.084)}.ms-card .template-1 .media .image{width:100%;border-radius:2px 2px 0 0}.ms-card .template-10 .media{width:80px;min-width:80px;max-width:80px}.ms-card .template-2 .header .avatar .image{display:block;width:40px;height:40px;border-radius:20px}.ms-card .template-2 .media .image{width:100%}.ms-card .template-4 .info{position:absolute;right:0;bottom:0;left:0;z-index:2;background:rgba(0,0,0,.54)}.ms-card .template-4 .media{z-index:1}.ms-card .template-4 .media .image{width:100%}.ms-card .template-5 .media{width:80px;min-width:80px;max-width:80px}.ms-card .template-5 .info,.ms-card .template-5 .media{-ms-flex:0 1 auto}.ms-card .template-8 .media .image{width:100%;border-radius:2px 2px 0 0}.ms-card .template-9 .header .avatar .image{display:block;width:40px;height:40px;border-radius:20px}.ms-card .template-9 .media .image{width:100%}md-list-item .md-list-item-text p.ms-dual-multiselect-line-xs{font-size:10px!important;padding-top:5px}md-list-item md-icon.hidden{visibility:hidden}md-icon.add-disabled{cursor:default!important;opacity:.4}md-list-item.read-only-mode{cursor:none!important}.ms-form-wizard{background:#fff;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}.ms-form-wizard md-tabs md-tabs-wrapper{box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}.ms-form-wizard md-tabs md-tabs-wrapper md-tabs-canvas{height:72px}.ms-form-wizard md-tabs md-tabs-wrapper md-tabs-canvas md-pagination-wrapper{height:72px}.ms-form-wizard md-tabs md-tabs-wrapper md-tabs-canvas md-pagination-wrapper md-tab-item{opacity:1!important;padding:24px}.ms-form-wizard md-tabs md-tabs-wrapper md-tabs-canvas md-pagination-wrapper md-tab-item:before{content:'';display:block;position:absolute;top:50%;left:0;right:50%;border-bottom:1px solid rgba(0,0,0,.12);z-index:8}.ms-form-wizard md-tabs md-tabs-wrapper md-tabs-canvas md-pagination-wrapper md-tab-item:after{content:'';display:block;position:absolute;top:50%;left:50%;right:0;border-bottom:1px solid rgba(0,0,0,.12);z-index:8}.ms-form-wizard md-tabs md-tabs-wrapper md-tabs-canvas md-pagination-wrapper md-tab-item:first-of-type:before{display:none}.ms-form-wizard md-tabs md-tabs-wrapper md-tabs-canvas md-pagination-wrapper md-tab-item:last-of-type:after{display:none}.ms-form-wizard md-tabs md-tabs-wrapper md-tabs-canvas md-pagination-wrapper md-tab-item.md-disabled .ms-form-wizard-step-label .ms-form-wizard-step-number{background:rgba(0,0,0,.12)!important}.ms-form-wizard md-tabs md-tabs-wrapper md-tabs-canvas md-pagination-wrapper md-tab-item .md-ripple-container{z-index:11}.ms-form-wizard md-tabs md-tabs-wrapper md-tabs-canvas md-ink-bar{display:none!important}.ms-form-wizard .ms-form-wizard-step-label{display:inline-block;position:relative;background:#fff;z-index:10;padding:0 16px;line-height:24px}.ms-form-wizard .ms-form-wizard-step-label .ms-form-wizard-step-number{display:inline-block;vertical-align:middle;width:24px;height:24px;line-height:24px;font-size:14px;margin-right:12px;border-radius:50%;color:#fff!important}.ms-form-wizard .ms-form-wizard-step-label .ms-form-wizard-step-number i{line-height:24px!important}.ms-form-wizard .ms-form-wizard-step-label .ms-form-wizard-step-text{display:inline-block;vertical-align:middle;position:relative;line-height:24px}.ms-form-wizard .ms-form-wizard-form{padding:24px 16px}.ms-form-wizard .navigation{padding:16px}.ms-form-wizard .navigation .steps{display:flex;align-items:center;justify-content:center;padding:0 16px}.ms-form-wizard .navigation .steps span{width:5px;height:5px;margin:0 4px;border-radius:50%}.ms-form-wizard .navigation .steps span:not(.md-accent-bg){background:rgba(0,0,0,.12)}.ms-form-wizard .navigation .steps span.selected{width:8px;height:8px}ms-info-bar{display:block;position:relative;width:100%;height:44px;background-color:#e91e63;z-index:99998;box-shadow:0 1px 5px 0 rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12)}ms-info-bar #ms-info-bar-message{padding:8px 16px;line-height:28px;font-size:14px}ms-info-bar #ms-info-bar-message a{overflow:hidden;height:48px;color:#fff}ms-masonry{width:100%;display:block}ms-masonry [ms-masonry-item],ms-masonry ms-masonry-item{transition:transform .3s ease;position:absolute;transform:translate3d(50vw,100vh,0)}ms-material-color-picker md-menu .md-button{font-size:12px}md-menu-content.ms-material-color-picker-menu-content{width:208px;max-width:208px;min-width:208px;padding:0;overflow:hidden}md-menu-content.ms-material-color-picker-menu-content header{height:48px;text-transform:uppercase}md-menu-content.ms-material-color-picker-menu-content header .md-button{display:flex;margin:0}md-menu-content.ms-material-color-picker-menu-content header>span{line-height:13px}md-menu-content.ms-material-color-picker-menu-content .colors{position:relative;width:208px;min-height:258px;height:258px;padding:4px}md-menu-content.ms-material-color-picker-menu-content .colors .color{position:relative;width:46px;height:46px;margin:2px;border-radius:0;cursor:pointer}md-menu-content.ms-material-color-picker-menu-content .colors .color .label{padding:2px;font-size:10px}md-menu-content.ms-material-color-picker-menu-content .colors .color .icon-check{position:absolute;top:2px;right:2px;font-size:16px;opacity:.7}ms-nav{display:block;position:relative;color:rgba(255,255,255,.7);user-select:none;z-index:70}ms-nav ms-nav-item{display:block;position:relative;line-height:48px}ms-nav ms-nav-item.ms-nav-title{line-height:32px;font-size:12px;font-weight:500;margin-top:8px;padding:0 24px;width:100%;color:rgba(255,255,255,.3);text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}ms-nav ms-nav-item .ms-nav-button{display:flex;align-self:flex-start;align-items:center;position:relative;cursor:pointer;padding:0 48px 0 24px;color:rgba(255,255,255,.7);text-decoration:none}ms-nav ms-nav-item .ms-nav-button:not(.active):hover{background:rgba(0,0,0,.1);text-decoration:none}ms-nav ms-nav-item .ms-nav-button .ms-nav-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:opacity .2s ease-in-out .1s}ms-nav ms-nav-item .ms-nav-button .arrow{position:absolute;top:16px;right:24px;margin:0;transition:transform .3s ease-in-out,opacity .2s ease-in-out .1s}ms-nav ms-nav-item .ms-nav-button .ms-nav-badge{position:absolute;top:50%;right:24px;min-width:20px;height:20px;line-height:20px;padding:0 7px;font-size:11px;font-weight:700;border-radius:20px;transform:translateY(-50%);transition:opacity .2s ease-in-out .1s}ms-nav ms-nav-item .ms-nav-button.active{color:#fff!important}ms-nav ms-nav-item .ms-nav-button.active .ms-nav-badge{background:#fff!important;color:rgba(0,0,0,.87)!important}ms-nav ms-nav-item .ms-nav-button.active i{color:#fff}ms-nav ms-nav-item i{color:rgba(255,255,255,.7);margin:0 16px 0 0}ms-nav .ms-nav-toggle ms-nav-toggle-items{display:none;overflow:hidden}ms-nav .ms-nav-toggle ms-nav-toggle-items.expand-animation{transition:height .35s cubic-bezier(.25,.46,.45,.94)}ms-nav .ms-nav-toggle ms-nav-toggle-items.collapse-animation{transition:height .35s cubic-bezier(.25,.46,.45,.94)}ms-nav .ms-nav-toggle ms-nav-toggle-items ms-nav-item .ms-nav-button{padding-left:58px}ms-nav .ms-nav-toggle ms-nav-toggle-items ms-nav-item ms-nav-toggle-items ms-nav-item .ms-nav-button{padding-left:68px}ms-nav .ms-nav-toggle ms-nav-toggle-items ms-nav-item ms-nav-toggle-items ms-nav-item ms-nav-toggle-items ms-nav-item .ms-nav-button{padding-left:78px}ms-nav .ms-nav-toggle ms-nav-toggle-items ms-nav-item ms-nav-toggle-items ms-nav-item ms-nav-toggle-items ms-nav-item ms-nav-toggle-items ms-nav-item .ms-nav-button{padding-left:88px}ms-nav .ms-nav-toggle ms-nav-toggle-items ms-nav-item ms-nav-toggle-items ms-nav-item ms-nav-toggle-items ms-nav-item ms-nav-toggle-items ms-nav-item ms-nav-toggle-items ms-nav-item .ms-nav-button{padding-left:98px}ms-nav .ms-nav-toggle.active>.ms-nav-button{color:#fff}ms-nav .ms-nav-toggle.active>.ms-nav-button a,ms-nav .ms-nav-toggle.active>.ms-nav-button md-icon{color:#fff}ms-nav .ms-nav-toggle[collapsed=false]>.ms-nav-button>.arrow{transform:rotate(90deg)}ms-nav>.ms-nav-toggle[collapsed=false]{background-color:rgba(0,0,0,.12)}@media only screen and (min-width:1280px){.ms-nav-folded #ms-nav-fold-close-overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:0 0;z-index:998}.ms-nav-folded #ms-nav-fold-open-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:999}.ms-nav-folded:not(.ms-nav-folded-open) ms-nav ms-nav-item.ms-nav-title{height:32px}.ms-nav-folded:not(.ms-nav-folded-open) ms-nav ms-nav-item.ms-nav-title:before{content:'';display:block;position:relative;top:12px;width:16px;border-top:1px solid rgba(255,255,255,.12)}.ms-nav-folded:not(.ms-nav-folded-open) ms-nav ms-nav-item.ms-nav-title span{display:none}.ms-nav-folded:not(.ms-nav-folded-open) ms-nav ms-nav-item .ms-nav-button{height:48px}.ms-nav-folded:not(.ms-nav-folded-open) ms-nav ms-nav-item .ms-nav-button>.arrow,.ms-nav-folded:not(.ms-nav-folded-open) ms-nav ms-nav-item .ms-nav-button>.ms-nav-badge,.ms-nav-folded:not(.ms-nav-folded-open) ms-nav ms-nav-item .ms-nav-button>.ms-nav-label{opacity:0;visibility:hidden}}.ms-navigation{display:block;position:relative;color:rgba(255,255,255,.7);user-select:none}.ms-navigation li,.ms-navigation ul{padding:0;margin:0}.ms-navigation ul{display:block;overflow:hidden}.ms-navigation ul li{position:relative}.ms-navigation ul li.collapsed ul{display:none}.ms-navigation .animate-height{transition:height .25s cubic-bezier(.25,.46,.45,.94)}.ms-navigation .ms-navigation-node .ms-navigation-item{display:block;position:relative;cursor:pointer;color:rgba(255,255,255,.7)}.ms-navigation .ms-navigation-node .ms-navigation-item:hover{background:rgba(0,0,0,.1)}.ms-navigation .ms-navigation-node .ms-navigation-item>.ms-navigation-button{display:flex;position:relative;width:100%;height:48px;line-height:48px;flex-direction:row;justify-content:flex-start;align-items:center;padding-right:16px;color:rgba(255,255,255,.7);text-decoration:none;white-space:nowrap;overflow:hidden}.ms-navigation .ms-navigation-node .ms-navigation-item>.ms-navigation-button .icon{color:rgba(255,255,255,.7);margin:0 16px 0 0}.ms-navigation .ms-navigation-node .ms-navigation-item>.ms-navigation-button span{white-space:nowrap;overflow:hidden;opacity:1;transition:opacity .25s ease-in-out .1s}.ms-navigation .ms-navigation-node .ms-navigation-item>.ms-navigation-button a{white-space:nowrap;overflow:hidden;opacity:1;transition:opacity .25s ease-in-out .1s}.ms-navigation .ms-navigation-node .ms-navigation-item>.ms-navigation-button .arrow{margin:0;opacity:1;transition:transform .3s ease-in-out,opacity .25s ease-in-out .1s}.ms-navigation .ms-navigation-node .ms-navigation-item>.ms-navigation-button .badge{position:absolute;top:50%;right:16px;min-width:20px;height:20px;line-height:20px;padding:0 7px;font-size:11px;font-weight:700;border-radius:20px;transform:translateY(-50%);transition:opacity .2s ease-in-out .1s}.ms-navigation .ms-navigation-node .ms-navigation-item>.ms-navigation-button.active{color:#fff}.ms-navigation .ms-navigation-node .ms-navigation-item>.ms-navigation-button.active .icon{color:#fff}.ms-navigation .ms-navigation-node .ms-navigation-item>.ms-navigation-button.active .badge{background:#fff!important;color:rgba(0,0,0,.87)!important}.ms-navigation .ms-navigation-node:not(.collapsed)>.ms-navigation-item>.ms-navigation-button .arrow{transform:rotate(90deg)}.ms-navigation .ms-navigation-node.group>.ms-navigation-item{font-size:12px;font-weight:500;margin-top:8px;cursor:auto;background:0 0!important;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ms-navigation .ms-navigation-node.group>.ms-navigation-item>.ms-navigation-button{height:32px;line-height:32px;color:rgba(255,255,255,.3)}.ms-navigation .ms-navigation-node:not(.group).has-children:not(.collapsed){background-color:rgba(0,0,0,.12)}.ms-navigation .ms-navigation-node:not(.group).has-children.collapsing{background-color:rgba(0,0,0,.12)}.ms-navigation .ms-navigation-node:not(.group).has-children .has-children:not(.collapsed){background:0 0}.ms-navigation li .ms-navigation-button{padding-left:24px}.ms-navigation li li .ms-navigation-button{padding-left:56px}.ms-navigation li li li .ms-navigation-button{padding-left:72px}.ms-navigation li li li li .ms-navigation-button{padding-left:88px}.ms-navigation li li li li li .ms-navigation-button{padding-left:104px}.ms-navigation li.group .ms-navigation-button{padding-left:24px}.ms-navigation li.group li .ms-navigation-button{padding-left:24px}.ms-navigation li.group li li .ms-navigation-button{padding-left:56px}.ms-navigation li.group li li li .ms-navigation-button{padding-left:72px}.ms-navigation li.group li li li li .ms-navigation-button{padding-left:88px}#horizontal-navigation{height:64px;min-height:64px;max-height:64px;background:#fff;z-index:54}#horizontal-navigation .ms-navigation-horizontal{display:flex;position:relative;user-select:none}#horizontal-navigation .ms-navigation-horizontal li,#horizontal-navigation .ms-navigation-horizontal ul{padding:0;margin:0;list-style:none}#horizontal-navigation .ms-navigation-horizontal .horizontal{display:flex;flex:1}#horizontal-navigation .ms-navigation-horizontal .horizontal li{position:relative;cursor:pointer}#horizontal-navigation .ms-navigation-horizontal .horizontal li:not(.active):hover{background:rgba(0,0,0,.12)}#horizontal-navigation .ms-navigation-horizontal .horizontal>li>.ms-navigation-horizontal-item>.ms-navigation-horizontal-button{display:block;float:left;padding:12px 14px}#horizontal-navigation .ms-navigation-horizontal .horizontal>li>.ms-navigation-horizontal-item>.ms-navigation-horizontal-button .arrow{display:none}#horizontal-navigation .ms-navigation-horizontal .horizontal>li>.ms-navigation-horizontal-item>.ms-navigation-horizontal-button.active{background:0 0;border-bottom:2px solid}#horizontal-navigation .ms-navigation-horizontal .horizontal>li:last-child{margin-right:0}#horizontal-navigation .ms-navigation-horizontal .horizontal>li li .ms-navigation-horizontal-item .ms-navigation-horizontal-button.active{color:#fff!important}#horizontal-navigation .ms-navigation-horizontal .horizontal .has-children ul{display:none;position:absolute;background:#fff;z-index:999;min-width:200px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);top:0;left:100%}#horizontal-navigation .ms-navigation-horizontal .horizontal .has-children:hover>ul{display:block}#horizontal-navigation .ms-navigation-horizontal .horizontal>.has-children>ul{top:100%;left:0}#horizontal-navigation .ms-navigation-horizontal .horizontal .ms-navigation-horizontal-item .ms-navigation-horizontal-button{display:flex;align-items:center;width:100%;color:rgba(0,0,0,.87);white-space:nowrap;padding:14px 16px;text-decoration:none}#horizontal-navigation .ms-navigation-horizontal .horizontal .ms-navigation-horizontal-item .ms-navigation-horizontal-button .icon{color:rgba(0,0,0,.54);margin-right:8px}#horizontal-navigation .ms-navigation-horizontal .horizontal .ms-navigation-horizontal-item .ms-navigation-horizontal-button .badge{min-width:20px;height:20px;line-height:20px;padding:0 7px;font-size:11px;font-weight:700;border-radius:20px;transition:opacity .2s ease-in-out .1s}#horizontal-navigation .ms-navigation-horizontal .horizontal .ms-navigation-horizontal-item .ms-navigation-horizontal-button .arrow{margin-left:8px}#horizontal-navigation .ms-navigation-horizontal .horizontal .ms-navigation-horizontal-item .ms-navigation-horizontal-button.active .badge{background:#fff!important;color:rgba(0,0,0,.87)!important}#horizontal-navigation .ms-navigation-horizontal .horizontal .ms-navigation-horizontal-item .ms-navigation-horizontal-button.active .icon{color:#fff}@media only screen and (min-width:960px){body.ms-navigation-folded:not(.ms-navigation-folded-open) .ms-navigation .animate-height{transition:none}body.ms-navigation-folded:not(.ms-navigation-folded-open) .ms-navigation .ms-navigation-node .ms-navigation-item .ms-navigation-button .icon{margin:0}body.ms-navigation-folded:not(.ms-navigation-folded-open) .ms-navigation .ms-navigation-node .ms-navigation-item .ms-navigation-button .arrow,body.ms-navigation-folded:not(.ms-navigation-folded-open) .ms-navigation .ms-navigation-node .ms-navigation-item .ms-navigation-button .badge,body.ms-navigation-folded:not(.ms-navigation-folded-open) .ms-navigation .ms-navigation-node .ms-navigation-item .ms-navigation-button .title{opacity:0;visibility:hidden}body.ms-navigation-folded:not(.ms-navigation-folded-open) .ms-navigation .ms-navigation-node.group>.ms-navigation-item .ms-navigation-button:before{content:'';display:block;position:relative;width:16px;border-top:1px solid rgba(255,255,255,.12)}body.ms-navigation-folded:not(.ms-navigation-folded-open) #ms-navigation-fold-expander{position:absolute;top:0;right:0;bottom:0;left:0;z-index:999}body.ms-navigation-folded #ms-navigation-fold-collapser{position:absolute;top:0;right:0;bottom:0;left:0;z-index:59}}@media only screen and (max-width:960px){body.ms-navigation-horizontal-mobile-menu-active #horizontal-navigation .navigation-toggle{height:64px;margin-right:16px}body.ms-navigation-horizontal-mobile-menu-active #horizontal-navigation .navigation-toggle .md-button{margin:0;width:64px;height:64px}body.ms-navigation-horizontal-mobile-menu-active #horizontal-navigation .ms-navigation-horizontal{display:block!important;background:#fff}#horizontal-navigation{z-index:60}#horizontal-navigation .ms-navigation-horizontal{position:absolute;display:none;top:0;right:0;bottom:0;left:0;padding:0 0 16px 0;z-index:9998;overflow-x:hidden;overflow-y:scroll}#horizontal-navigation .ms-navigation-horizontal .horizontal{flex-direction:column;min-height:100%;width:100%}#horizontal-navigation .ms-navigation-horizontal .horizontal li:not(.active):hover{background:0 0}#horizontal-navigation .ms-navigation-horizontal .horizontal li:not(.active) .ms-navigation-horizontal-item{margin:4px}#horizontal-navigation .ms-navigation-horizontal .horizontal li:not(.active) .ms-navigation-horizontal-item:hover{background:rgba(0,0,0,.12)}#horizontal-navigation .ms-navigation-horizontal .horizontal>li{padding:0 12px}#horizontal-navigation .ms-navigation-horizontal .horizontal>li>.ms-navigation-horizontal-item>.ms-navigation-horizontal-button{display:flex;float:none}#horizontal-navigation .ms-navigation-horizontal .horizontal>li>.ms-navigation-horizontal-item>.ms-navigation-horizontal-button .arrow{display:block}#horizontal-navigation .ms-navigation-horizontal .horizontal .has-children ul{position:relative;top:0;left:0;box-shadow:none}#horizontal-navigation .ms-navigation-horizontal .horizontal .has-children:hover>ul{display:none}#horizontal-navigation .ms-navigation-horizontal .horizontal .has-children .expanded>.ms-navigation-horizontal-button .arrow{transform:rotate(90deg)}#horizontal-navigation .ms-navigation-horizontal .horizontal .has-children .expanded+ul{display:block;margin-left:16px}#horizontal-navigation .ms-navigation-horizontal .horizontal .ms-navigation-horizontal-item{min-height:48px;height:48px}}md-dialog.md-phonebar-dialog{max-width:720px;width:720px}md-dialog.md-phonebar-dialog md-dialog-content{display:block;position:relative;height:500px}md-dialog.md-phonebar-dialog md-toolbar .title{font-size:17px}md-dialog.md-phonebar-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.md-phonebar-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}md-dialog.md-phonebar-dialog md-tabs{position:static}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}.ms-phonebar{height:64px;font-size:13px}.ms-phonebar .phonebar-container{height:64px;padding:0}.ms-phonebar .phonebar-container .quantity-indicator{display:inline-block;vertical-align:middle;width:8px;height:8px;border-radius:4px;margin-right:5px;margin-left:5px}.ms-phonebar .phonebar-container .sessions{overflow-x:auto}.ms-phonebar .phonebar-container .session{border-radius:3px;border:1px solid #dcdcdc;margin-left:3px;cursor:pointer}.ms-phonebar .phonebar-container .session-info{padding-left:3px;padding-right:3px;color:grey}.ms-phonebar .phonebar-container .session-button{border:1px solid grey;margin:3px}.ms-phonebar .phonebar-container .button-bar{border:1px solid grey}.ms-phonebar .phonebar-container .num-pad{position:fixed;border-radius:3px;border:1px solid #9e9e9e;top:80px;left:80px}.ms-phonebar .phonebar-container .num-pad-logo{height:40px;width:42px}.ms-phonebar .phonebar-container p{margin:0;padding:0 0 10px 0;line-height:10px;font-size:10px}.ms-phonebar .phonebar-container .span4{width:50px;float:left;margin:8px}.ms-phonebar .phonebar-container .num{border:1px solid #9e9e9e;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;height:50px;background-color:#fff;color:#333;cursor:pointer}.ms-phonebar .phonebar-container .num:hover{background-color:#9e9e9e;color:#fff;transition-property:background-color .2s linear 0s;-moz-transition:background-color .2s linear 0s;-webkit-transition:background-color .2s linear 0s;-o-transition:background-color .2s linear 0s}.ms-phonebar .phonebar-container .txt{font-size:20px;text-align:center;margin-top:3px;font-family:Lato,sans-serif;color:#333}.ms-phonebar .phonebar-container .small{font-size:15px}.ms-phonebar .phonebar-container .angucomplete-dropdown{top:45px;overflow-y:auto;max-height:200px}.ms-phonebar .phonebar-container .highlight{color:red}.ms-phonebar .phonebar-container .input-number{margin-left:5px;padding:8px;border:1px solid #ccc;border-radius:3px;box-sizing:border-box}.ms-phonebar .phonebar-container .phonebar{position:relative}.ms-phonebar .phonebar-container .phonebar>div{height:64px;min-width:44px}.ms-phonebar .phonebar-container .phonebar>div.dragging{cursor:grabbing}.ms-phonebar .phonebar-container .phonebar>div.dragging .md-ripple-container{display:none}.ms-phonebar .phonebar-container .phonebar>div.ghost .shortcut{opacity:.27}.ms-phonebar .phonebar-container.mobile-bar-active{position:absolute;top:0;right:0;bottom:0;left:0;background:#fff;z-index:99;max-width:none!important}.ms-phonebar .phonebar-container.mobile-bar-active .phonebar,.ms-phonebar .phonebar-container.mobile-bar-active .toggle-mobile-menu{display:flex!important}.ms-phonebar .phonebar-container.mobile-bar-active .toggle-mobile-menu{margin-left:14px}.ms-phonebar .phonebar-container.mobile-bar-active>div{border-right:1px solid rgba(0,0,0,.12)}.quick-filter-container md-select .md-select-value.md-select-placeholder{color:inherit}.quick-filter-container md-select[multiple] md-select-value>:first-child{max-width:250px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}.ms-responsive-table-wrapper{overflow-x:auto;overflow-y:hidden}.ms-scroll{overflow:hidden!important}.ms-search-bar{height:64px;font-size:13px}.ms-search-bar .ms-search-bar-collapser,.ms-search-bar .ms-search-bar-expander{cursor:pointer;padding:0 20px;margin:0;width:64px!important;height:64px!important;line-height:64px!important}.ms-search-bar .ms-search-bar-loader{width:64px!important;height:64px!important;line-height:64px!important}.ms-search-bar .ms-search-button-expanded{pointer-events:none}.ms-search-bar .ms-search-bar-collapser{display:none}.ms-search-bar input{background-color:transparent;font-size:16px}.ms-search-bar .ms-search-bar-results{position:absolute;top:64px;left:0;right:0;overflow-x:hidden;overflow-y:scroll;background:#fff;max-height:300px;box-shadow:0 1px 8px 0 rgba(0,0,0,.2),0 3px 4px 0 rgba(0,0,0,.14),0 3px 3px -2px rgba(0,0,0,.12)}.ms-search-bar .ms-search-bar-results .no-results{font-size:18px;padding:16px;color:rgba(0,0,0,.54)}.ms-search-bar .ms-search-bar-results .result{position:relative;height:56px;min-height:56px;max-height:56px;padding:16px;cursor:pointer}.ms-search-bar .ms-search-bar-results .result.selected{background:rgba(0,0,0,.07)}.ms-search-bar .ms-search-bar-results .result .icon-container{min-width:32px;margin-right:8px}.ms-search-bar .ms-search-bar-results .result .icon-container .square{width:6px;height:6px}.ms-search-bar .ms-search-bar-results .result .title{font-size:16px}.ms-search-bar .ms-search-bar-results .result .description{padding-top:6px;font-size:14px}.ms-search-bar.expanded{position:absolute;top:0;right:0;bottom:0;left:0;background:#fff;z-index:10}.ms-search-bar.expanded #ms-search-bar-input{display:block}.ms-search-bar.expanded .ms-search-bar-collapser{display:block}.ms-search-bar.down{top:64px;border-bottom:1px rgba(0,0,0,.12) solid}.ms-search-bar[disabled] input{pointer-events:none}body.ms-search-bar-expanded #toolbar{z-index:999!important}@media screen and (max-width:960px){.ms-search-bar-label{padding:0 8px 0 12px}}.ms-shortcuts{height:64px;font-size:13px}.ms-shortcuts .shortcuts-container{height:64px;padding:0 8px;max-width:400px}.ms-shortcuts .shortcuts-container .shortcuts{position:relative;overflow-x:scroll}.ms-shortcuts .shortcuts-container .shortcuts>div{height:64px;min-width:44px}.ms-shortcuts .shortcuts-container .shortcuts>div.dragging{cursor:grabbing}.ms-shortcuts .shortcuts-container .shortcuts>div.dragging .md-ripple-container{display:none}.ms-shortcuts .shortcuts-container .shortcuts>div.ghost .shortcut{opacity:.27}.ms-shortcuts .shortcuts-container .shortcuts>div .shortcut{margin:2px}.ms-shortcuts .shortcuts-container .shortcuts>div .shortcut .first-letter{display:inline-block;vertical-align:middle;font-size:20px;text-transform:uppercase;color:rgba(0,0,0,.54)}.ms-shortcuts .shortcuts-container .shortcut-menu{margin:0}.ms-shortcuts .shortcuts-container.mobile-bar-active{position:absolute;top:0;right:0;bottom:0;left:0;background:#fff;z-index:99;max-width:none!important}.ms-shortcuts .shortcuts-container.mobile-bar-active .shortcut-menu,.ms-shortcuts .shortcuts-container.mobile-bar-active .shortcuts,.ms-shortcuts .shortcuts-container.mobile-bar-active .toggle-mobile-menu{display:flex!important}.ms-shortcuts .shortcuts-container.mobile-bar-active .toggle-mobile-menu{margin-left:14px}.ms-shortcuts .shortcuts-container.mobile-bar-active>div{border-right:1px solid rgba(0,0,0,.12)}#ms-shortcut-add-menu{position:relative;width:240px;min-width:240px;max-width:240px}#ms-shortcut-add-menu .add-shortcut-button{width:48px;height:48px;padding:0 12px;margin:0}#ms-shortcut-add-menu .shortcut-search{height:45px;padding:0 8px}#ms-shortcut-add-menu .shortcut-search .search-icon{width:40px;height:40px;line-height:48px}#ms-shortcut-add-menu .shortcut-search .shortcut-loader{padding:10px}#ms-shortcut-add-menu .shortcut-search input{padding:8px}#ms-shortcut-add-menu .results{position:relative;overflow-y:scroll;max-height:233px;margin-top:8px;padding-top:8px;border-top:1px solid rgba(0,0,0,.12)}#ms-shortcut-add-menu .results .no-results{font-size:18px;padding:16px;color:rgba(0,0,0,.54)}#ms-shortcut-add-menu .results .result{position:relative;min-height:56px;padding:16px;cursor:pointer}#ms-shortcut-add-menu .results .result.selected{background:rgba(0,0,0,.07)}#ms-shortcut-add-menu .results .result .icon-container{min-width:32px;margin-right:8px}#ms-shortcut-add-menu .results .result .icon-container .square{width:6px;height:6px}#ms-shortcut-add-menu .results .result .title{font-size:16px}#ms-shortcut-add-menu .results .result .description{padding-top:6px;font-size:14px}#splash-screen{display:block;position:absolute;top:0;left:0;right:0;bottom:0;background-color:#3c4252;z-index:99999}#splash-screen.ng-leave{opacity:1;transition:all linear .2s}#splash-screen.ng-leave-active{opacity:0}#splash-screen .center{display:block;width:100%;position:absolute;top:50%;transform:translateY(-50%)}#splash-screen .logo{width:96px;height:96px;line-height:96px;margin:0 auto;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:56px;text-align:center;border-radius:2px;background-color:#039be5;color:#fff;box-shadow:0 2px 14px 0 rgba(0,0,0,.22)}#splash-screen .spinner-wrapper{display:block;position:relative;width:100%;min-height:100px;height:100px}#splash-screen .spinner-wrapper .spinner{position:absolute;overflow:hidden;left:50%;margin-left:-50px;animation:outer-rotate 2.91667s linear infinite}#splash-screen .spinner-wrapper .spinner .inner{width:100px;height:100px;position:relative;animation:sporadic-rotate 5.25s cubic-bezier(.35,0,.25,1) infinite}#splash-screen .spinner-wrapper .spinner .inner .gap{position:absolute;left:49px;right:49px;top:0;bottom:0;border-top:10px solid;box-sizing:border-box}#splash-screen .spinner-wrapper .spinner .inner .left,#splash-screen .spinner-wrapper .spinner .inner .right{position:absolute;top:0;height:100px;width:50px;overflow:hidden}#splash-screen .spinner-wrapper .spinner .inner .left .half-circle,#splash-screen .spinner-wrapper .spinner .inner .right .half-circle{position:absolute;top:0;width:100px;height:100px;box-sizing:border-box;border:10px solid #4285f4;border-bottom-color:transparent;border-radius:50%}#splash-screen .spinner-wrapper .spinner .inner .left{left:0}#splash-screen .spinner-wrapper .spinner .inner .left .half-circle{left:0;border-right-color:transparent;animation:left-wobble 1.3125s cubic-bezier(.35,0,.25,1) infinite;-webkit-animation:left-wobble 1.3125s cubic-bezier(.35,0,.25,1) infinite}#splash-screen .spinner-wrapper .spinner .inner .right{right:0}#splash-screen .spinner-wrapper .spinner .inner .right .half-circle{right:0;border-left-color:transparent;animation:right-wobble 1.3125s cubic-bezier(.35,0,.25,1) infinite;-webkit-animation:right-wobble 1.3125s cubic-bezier(.35,0,.25,1) infinite}@keyframes outer-rotate{0%{transform:rotate(0) scale(.5)}100%{transform:rotate(360deg) scale(.5)}}@keyframes left-wobble{0%,100%{transform:rotate(130deg)}50%{transform:rotate(-5deg)}}@keyframes right-wobble{0%,100%{transform:rotate(-130deg)}50%{transform:rotate(5deg)}}@keyframes sporadic-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}.ms-stepper .ms-stepper-horizontal{background:#fff;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation{height:72px;min-height:72px;max-height:72px;background:#fff;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item{display:flex;flex-direction:row;align-items:center;position:relative;height:72px;min-height:72px;max-height:72px;line-height:24px;margin:0;padding:24px;border-radius:0;cursor:pointer;font-size:14px;text-transform:none}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item:after,.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item:before{content:'';display:block;position:absolute;top:50%;width:24px;border-bottom:1px solid rgba(0,0,0,.12)}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item:before{left:0}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item:after{right:0}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item:first-child:before{display:none}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item:last-child:after{display:none}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item.current .title{font-weight:600;color:rgba(0,0,0,.87)}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item.disabled{cursor:default}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item.disabled .step{background:rgba(0,0,0,.12)}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item.disabled .title{color:rgba(0,0,0,.27)}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item.disabled .subtitle{color:rgba(0,0,0,.27)}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item.optional{padding:16px 24px}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item .step{width:24px;min-width:24px;height:24px;border-radius:50%;margin:0 8px 0 16px;color:#fff}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item .step .icon{color:#fff;font-weight:700;line-height:24px!important}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item .title{padding-right:16px;color:rgba(0,0,0,.54)}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item .subtitle{font-size:12px;padding-right:16px;color:rgba(0,0,0,.54);line-height:1}.ms-stepper .ms-stepper-horizontal .ms-stepper-steps{padding:24px 16px}.ms-stepper .ms-stepper-horizontal .ms-stepper-controls{padding:0 16px 16px 16px}.ms-stepper .ms-stepper-horizontal .ms-stepper-controls .ms-stepper-dots{display:none;align-items:center;justify-content:center;padding:0 16px}.ms-stepper .ms-stepper-horizontal .ms-stepper-controls .ms-stepper-dots span{width:5px;height:5px;margin:0 4px;border-radius:50%}.ms-stepper .ms-stepper-horizontal .ms-stepper-controls .ms-stepper-dots span:not(.md-accent-bg){background:rgba(0,0,0,.12)}.ms-stepper .ms-stepper-horizontal .ms-stepper-controls .ms-stepper-dots span.selected{width:8px;height:8px}@media screen and (max-width:600px){.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation{display:none}.ms-stepper .ms-stepper-horizontal .ms-stepper-controls .ms-stepper-dots{display:flex}}.ms-stepper .ms-stepper-vertical{position:relative;background:#fff;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}.ms-stepper .ms-stepper-vertical .ms-stepper-vertical-line{display:block;position:absolute;width:1px;top:32px;bottom:32px;left:43px;border-left:1px solid rgba(0,0,0,.12)}.ms-stepper .ms-stepper-vertical .ms-stepper-steps{padding:8px 0}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step{display:block}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item{display:flex;flex-direction:row;align-items:center;position:relative;width:100%;height:72px;min-height:72px;max-height:72px;line-height:24px;margin:0;padding:0 24px;border-radius:0;cursor:pointer;font-size:14px;text-transform:none}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item:first-child:before{display:none}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item:last-child:after{display:none}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item:hover:not(.disabled) .step{background-color:#ececec;border-color:#ececec}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item.current .title{font-weight:600;color:rgba(0,0,0,.87)}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item.disabled{cursor:default}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item.disabled .title{color:rgba(0,0,0,.27)}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item.disabled .subtitle{color:rgba(0,0,0,.27)}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item.optional{padding:16px 24px}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item .step{width:40px;min-width:40px;height:40px;margin:0 16px 0 0;border-radius:50%;background:#fff;border:8px solid #fff;color:#fff;transition:border-color .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1)}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item .step .icon{font-weight:700;line-height:28px!important}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item .title{padding-right:16px;color:rgba(0,0,0,.54)}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item .subtitle{font-size:12px;padding-right:16px;color:rgba(0,0,0,.54);line-height:1}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-step-content{padding:0 24px 16px 64px}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-controls{padding:0 16px 16px 56px}.ms-tab-scroll .scroll-arrow{height:inherit;padding:0}.ms-tab-scroll .bar-container{overflow:hidden}.ms-tab-scroll .scroll-container{overflow-x:hidden;overflow-y:hidden;transition:transform .2s ease-in-out}.ms-timeline .ms-timeline-loader{position:relative;display:flex;align-items:center;justify-content:center;width:56px;height:56px;margin:0 auto;background:#fff;font-weight:500;opacity:0;z-index:11;border-radius:50%}.ms-timeline .ms-timeline-loader.show{opacity:1}.ms-timeline .ms-timeline-loader .spinner{width:24px;height:24px;border:3px solid rgba(255,255,255,.35);border-top-color:#fff;border-radius:50%}.ms-widget .ms-widget-front{box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}.ms-widget .ms-widget-back{box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}.ms-widget.sidenav-widget .ms-widget-back,.ms-widget.sidenav-widget .ms-widget-front{box-shadow:none}.ms-widget .flip-to-front{position:absolute;top:0;right:0}.ms-widget .c3{height:100%}.ms-widget .chart-fill-8{margin:0 -8px -8px -8px}.ms-widget .chart-fill-16{margin:0 -16px -16px -16px}.ms-widget .chart-fill-24{margin:0 -24px -24px -24px}.ms-widget .chart-fill-32{margin:0 -32px -32px -32px}.ms-widget .chart-fill-40{margin:0 -40px -40px -40px}.ms-widget .chart-fill-48{margin:0 -48px -48px -48px}.ms-widget .chart-fill-56{margin:0 -56px -56px -56px}.ms-widget .chart-fill-64{margin:0 -64px -64px -64px}.ms-widget .chart-fill-72{margin:0 -72px -72px -72px}.ms-widget .chart-fill-80{margin:0 -80px -80px -80px}.ms-widget{position:relative;font-size:1.3rem;perspective:3000px;padding:12px}.ms-widget .ms-widget-front{display:flex;flex-direction:column;flex:1 1 auto;position:relative;overflow:hidden;visibility:visible;width:100%;opacity:1;z-index:10;border-radius:2px;transition:transform .5s ease-out 0s,visibility 0s ease-in .2s,opacity 0s ease-in .2s;transform:rotateY(0);backface-visibility:hidden}.ms-widget .ms-widget-back{display:block;position:absolute;overflow:hidden;visibility:hidden;opacity:0;z-index:10;top:12px;right:12px;bottom:12px;left:12px;border-radius:2px;transition:transform .5s ease-out 0s,visibility 0s ease-in .2s,opacity 0s ease-in .2s;transform:rotateY(180deg);backface-visibility:hidden}.ms-widget .md-button{margin:0}.ms-widget .md-button.md-icon-button{margin:0}.ms-widget.flipped .ms-widget-front{visibility:hidden;opacity:0;transform:rotateY(180deg)}.ms-widget.flipped .ms-widget-back{display:block;visibility:visible;opacity:1;transform:rotateY(360deg)}.ms-widget.sidenav-widget{padding:0}.ms-widget.ar-2-1 .widget{padding:0;position:relative}.ms-widget.ar-2-1 .widget:before{display:block;content:'';width:100%;padding-top:50%}.ms-widget.ar-2-1 .widget>.widget{position:absolute;top:8px;left:8px;right:8px;bottom:8px}.ms-widget.ar-1-1 .widget{padding:0;position:relative}.ms-widget.ar-1-1 .widget:before{display:block;content:'';width:100%;padding-top:100%}.ms-widget.ar-1-1 .widget>.widget{position:absolute;top:8px;left:8px;right:8px;bottom:8px}.ms-theme-options .ms-theme-options-button{position:absolute;top:160px;right:0;z-index:50;box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12);width:48px;height:48px;line-height:48px;text-align:center;cursor:pointer;border-radius:0;margin:0;pointer-events:auto;opacity:.75}.ms-theme-options .ms-theme-options-button:hover{opacity:1}.ms-theme-options md-sidenav{width:384px;min-width:384px;max-width:384px}.ms-theme-options md-sidenav .ms-theme-options-list{background:#fff;z-index:12;pointer-events:auto}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option{padding:16px}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option.layout-options md-radio-button{width:160px;max-width:160px;margin:8px 8px 16px 8px}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option.layout-options md-radio-button.md-checked ._md-label img,.ms-theme-options md-sidenav .ms-theme-options-list .theme-option.layout-options md-radio-button:hover ._md-label img{opacity:1;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option.layout-options md-radio-button ._md-container{display:none}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option.layout-options md-radio-button ._md-label{margin-left:0}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option.layout-options md-radio-button ._md-label img{opacity:.8;margin-bottom:8px}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option.color-palettes md-menu-item{max-width:192px}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option.color-palettes .theme-button{border-bottom:16px solid;text-align:left;width:101px;height:88px;box-shadow:none;opacity:.8}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option.color-palettes .theme-button.active,.ms-theme-options md-sidenav .ms-theme-options-list .theme-option.color-palettes .theme-button:hover{opacity:1;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option md-radio-button{margin:8px}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option .option-title{font-size:14px;font-weight:500;padding:0 8px 12px 8px}#error-404 .content{width:90%;max-width:512px;margin-top:128px}#error-404 .content .error-code{font-size:112px;text-align:center;line-height:1;margin-bottom:16px;font-weight:500}#error-404 .content .message{font-size:24px;text-align:center;color:rgba(0,0,0,.54)}#error-404 .content .search{width:100%;height:56px;line-height:56px;margin:48px auto 16px auto;padding:16px;background:#fff}#error-404 .content .search input{padding:0 0 0 16px}#error-404 .content .back-link{font-size:15px;text-align:center}#error-500 .content{width:90%;max-width:512px;margin-top:128px}#error-500 .content .error-code{font-size:112px;line-height:1;text-align:center;margin-bottom:16px;font-weight:500}#error-500 .content .message{font-size:24px;text-align:center;color:rgba(0,0,0,.54)}#error-500 .content .sub-message{font-size:17px;text-align:center;color:rgba(0,0,0,.54);margin:16px auto 48px auto}#error-500 .content .report-link{text-align:center;font-size:15px}#forgot-password{height:100%;background:url(/assets/images/backgrounds/tech.png) no-repeat;background-size:cover}#forgot-password #forgot-password-form-wrapper{flex:1 0 auto;padding:32px}#forgot-password #forgot-password-form-wrapper #forgot-password-form{width:384px;max-width:384px;padding:32px;text-align:center;background:#fff}#forgot-password #forgot-password-form-wrapper #forgot-password-form .logo{width:128px;height:128px;line-height:128px;font-size:86px;font-weight:500;margin:32px auto;color:#fff;border-radius:2px}#forgot-password #forgot-password-form-wrapper #forgot-password-form .title{font-size:17px;margin:16px 0 32px 0}#forgot-password #forgot-password-form-wrapper #forgot-password-form .logo_login{max-height:200px}#forgot-password #forgot-password-form-wrapper #forgot-password-form form{width:100%;text-align:left}#forgot-password #forgot-password-form-wrapper #forgot-password-form form .submit-button{width:220px;margin:16px auto;display:block}#forgot-password #forgot-password-form-wrapper #forgot-password-form .login{margin:32px auto 24px auto;width:250px;font-weight:500}#forgot-password #forgot-password-form-wrapper #forgot-password-form .login .text{margin-right:8px}@media screen and (max-width:600px){#forgot-password #forgot-password-form-wrapper{padding:16px}#forgot-password #forgot-password-form-wrapper #forgot-password-form{padding:24px;width:100%}#forgot-password #forgot-password-form-wrapper #forgot-password-form form .md-button{width:90%}}#login{height:100%;background:url(/assets/images/backgrounds/tech.png) no-repeat;background-size:cover}#login #login-form-wrapper{flex:1 0 auto;padding:32px}#login #login-form-wrapper #login-form{width:384px;max-width:384px;padding:32px;background:#fff;text-align:center}#login #login-form-wrapper #login-form .logo{width:128px;height:128px;line-height:128px;font-size:86px;font-weight:500;margin:32px auto;color:#fff;border-radius:2px}#login #login-form-wrapper #login-form .title{font-size:17px;margin:16px 0 32px 0}#login #login-form-wrapper #login-form .logo_login{max-height:200px}#login #login-form-wrapper #login-form form{width:100%;text-align:left}#login #login-form-wrapper #login-form form md-checkbox{margin:0}#login #login-form-wrapper #login-form form .remember-forgot-password{font-size:13px;margin-top:8px}#login #login-form-wrapper #login-form form .remember-forgot-password .remember-me{margin-bottom:16px}#login #login-form-wrapper #login-form form .remember-forgot-password .forgot-password{font-size:13px;font-weight:500;margin-bottom:16px}#login #login-form-wrapper #login-form form .submit-button{width:220px;margin:16px auto;display:block}#login #login-form-wrapper #login-form .register{margin:32px auto 24px auto;width:250px;font-weight:500}#login #login-form-wrapper #login-form .register .text{margin-right:8px}#login #login-form-wrapper #login-form .separator{font-size:15px;font-weight:600;margin:24px auto 16px auto;position:relative;overflow:hidden;width:100px;color:rgba(0,0,0,.54)}#login #login-form-wrapper #login-form .separator .text{display:inline-block;vertical-align:baseline;position:relative;padding:0 8px;z-index:9999}#login #login-form-wrapper #login-form .separator .text:after,#login #login-form-wrapper #login-form .separator .text:before{content:'';display:block;width:30px;position:absolute;top:10px;border-top:1px solid rgba(0,0,0,.12)}#login #login-form-wrapper #login-form .separator .text:before{right:100%}#login #login-form-wrapper #login-form .separator .text:after{left:100%}#login #login-form-wrapper #login-form .md-button.facebook,#login #login-form-wrapper #login-form .md-button.google{width:192px;text-transform:none;color:#fff;font-size:13px}#login #login-form-wrapper #login-form .md-button.facebook md-icon,#login #login-form-wrapper #login-form .md-button.google md-icon{color:#fff;margin:0 8px 0 0}#login #login-form-wrapper #login-form .md-button.google{background-color:#d73d32}#login #login-form-wrapper #login-form .md-button.facebook{background-color:#3f5c9a}@media screen and (max-width:600px){#login #login-form-wrapper{padding:16px}#login #login-form-wrapper #login-form{padding:24px;width:100%}#login #login-form-wrapper #login-form form .md-button{width:90%}#login #login-form-wrapper #login-form .md-button.facebook,#login #login-form-wrapper #login-form .md-button.google{width:80%}}md-dialog.extractedReport-dialog{max-width:720px;width:720px}md-dialog.extractedReport-dialog md-dialog-content{display:block;position:relative}md-dialog.extractedReport-dialog md-toolbar .title{font-size:17px}md-dialog.extractedReport-dialog md-input-container textarea{min-height:150px}md-dialog.extractedReport-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.extractedReport-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.extractedReport-dialog .date-container{padding:16px 0 24px 0}md-dialog.extractedReport-dialog .error-list{font-size:13px}md-dialog.extractedReport-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.extractedReport-dialog .error-list .error .message{font-weight:500}md-dialog.extractedReport-dialog .error-list .error .md-button{margin:0}md-dialog.extractedReport-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.extractedReport-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#extractedReports{position:relative}#extractedReports>.header{height:76px;min-height:76px;max-height:76px}#extractedReports>.header .logo .logo-icon{margin:0 16px 0 0}#extractedReports>.header .logo .logo-text{font-size:24px}#extractedReports>.header md-icon{color:#fff}#extractedReports>.header .search-input-wrapper{position:relative}#extractedReports>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#extractedReports>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#extractedReports>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#extractedReports>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#extractedReports>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#extractedReports>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#extractedReports>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#extractedReports>.header.selected-bar .close-button-wrapper{width:244px}#extractedReports>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#extractedReports>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#extractedReports>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#extractedReports #add-extractedReport-button{position:fixed;bottom:8px;right:8px;padding:0}#extractedReports #upload-extractedReport-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.metric-dialog{max-width:720px;width:720px}md-dialog.metric-dialog md-dialog-content{display:block;position:relative}md-dialog.metric-dialog md-toolbar .title{font-size:17px}md-dialog.metric-dialog md-input-container textarea{min-height:150px}md-dialog.metric-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.metric-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.metric-dialog .date-container{padding:16px 0 24px 0}md-dialog.metric-dialog .error-list{font-size:13px}md-dialog.metric-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.metric-dialog .error-list .error .message{font-weight:500}md-dialog.metric-dialog .error-list .error .md-button{margin:0}md-dialog.metric-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.metric-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#metrics{position:relative}#metrics>.header{height:76px;min-height:76px;max-height:76px}#metrics>.header .logo .logo-icon{margin:0 16px 0 0}#metrics>.header .logo .logo-text{font-size:24px}#metrics>.header md-icon{color:#fff}#metrics>.header .search-input-wrapper{position:relative}#metrics>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#metrics>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#metrics>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#metrics>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#metrics>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#metrics>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#metrics>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#metrics>.header.selected-bar .close-button-wrapper{width:244px}#metrics>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#metrics>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#metrics>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#metrics #add-metric-button{position:fixed;bottom:8px;right:8px;padding:0}#metrics #upload-metric-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.report-dialog{max-width:720px;width:720px}md-dialog.report-dialog md-dialog-content{display:block;position:relative}md-dialog.report-dialog md-toolbar .title{font-size:17px}md-dialog.report-dialog md-input-container textarea{min-height:150px}md-dialog.report-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.report-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.report-dialog .date-container{padding:16px 0 24px 0}md-dialog.report-dialog .error-list{font-size:13px}md-dialog.report-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.report-dialog .error-list .error .message{font-weight:500}md-dialog.report-dialog .error-list .error .md-button{margin:0}md-dialog.report-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.report-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.report-dialog{max-width:720px;width:720px}md-dialog.report-dialog md-dialog-content{display:block;position:relative}md-dialog.report-dialog md-toolbar .title{font-size:17px}md-dialog.report-dialog md-input-container textarea{min-height:150px}md-dialog.report-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.report-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.report-dialog .date-container{padding:16px 0 24px 0}md-dialog.report-dialog .error-list{font-size:13px}md-dialog.report-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.report-dialog .error-list .error .message{font-weight:500}md-dialog.report-dialog .error-list .error .md-button{margin:0}md-dialog.report-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.report-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.reportField-dialog{max-width:720px;width:720px}md-dialog.reportField-dialog md-dialog-content{display:block;position:relative}md-dialog.reportField-dialog md-toolbar .title{font-size:17px}md-dialog.reportField-dialog md-input-container textarea{min-height:150px}md-dialog.reportField-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.reportField-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.reportField-dialog .date-container{padding:16px 0 24px 0}md-dialog.reportField-dialog .error-list{font-size:13px}md-dialog.reportField-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.reportField-dialog .error-list .error .message{font-weight:500}md-dialog.reportField-dialog .error-list .error .md-button{margin:0}md-dialog.reportField-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.reportField-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#analytics-report .header{height:76px;min-height:76px;max-height:76px}#analytics-report .header .goto-reports-button{margin-right:16px}#analytics-report .header .report-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#analytics-report .header .report-image img{height:100%;width:auto;max-width:none}#analytics-report .header .subtitle{margin:6px 0 0 0}#analytics-report .report-detail-form-container{padding:24px;margin-bottom:24px}#analytics-report .report-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#analytics-report .report-detail-form-container .handle{cursor:move}#analytics-report .report-detail-form-container md-input-container md-switch{margin:0!important}#analytics-report .report-detail-form-container #report-image-uploader{position:relative}#analytics-report .report-detail-form-container #report-image-uploader.dropping .drop-text{display:flex}#analytics-report .report-detail-form-container #report-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#analytics-report .report-detail-form-container #report-image-uploader .upload-button{margin-bottom:16px}#analytics-report .report-detail-form-container #report-image-uploader .report-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#analytics-report .report-detail-form-container #report-image-uploader .report-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#analytics-report .report-detail-form-container #report-image-uploader .report-image .media{max-height:100%}md-dialog.report-dialog{max-width:720px;width:720px}md-dialog.report-dialog md-dialog-content{display:block;position:relative}md-dialog.report-dialog md-toolbar .title{font-size:17px}md-dialog.report-dialog md-input-container textarea{min-height:150px}md-dialog.report-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.report-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.report-dialog .date-container{padding:16px 0 24px 0}md-dialog.report-dialog .error-list{font-size:13px}md-dialog.report-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.report-dialog .error-list .error .message{font-weight:500}md-dialog.report-dialog .error-list .error .md-button{margin:0}md-dialog.report-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.report-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#reports{position:relative}#reports>.header{height:76px;min-height:76px;max-height:76px}#reports>.header .logo .logo-icon{margin:0 16px 0 0}#reports>.header .logo .logo-text{font-size:24px}#reports>.header md-icon{color:#fff}#reports>.header .search-input-wrapper{position:relative}#reports>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#reports>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#reports>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#reports>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#reports>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#reports>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#reports>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#reports>.header.selected-bar .close-button-wrapper{width:244px}#reports>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#reports>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#reports>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}md-dialog.report-dialog{max-width:720px;width:720px}md-dialog.report-dialog md-dialog-content{display:block;position:relative}md-dialog.report-dialog md-toolbar .title{font-size:17px}md-dialog.report-dialog md-input-container textarea{min-height:150px}md-dialog.report-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.report-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.report-dialog .date-container{padding:16px 0 24px 0}md-dialog.report-dialog .error-list{font-size:13px}md-dialog.report-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.report-dialog .error-list .error .message{font-weight:500}md-dialog.report-dialog .error-list .error .md-button{margin:0}md-dialog.report-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.report-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.web-dialog md-dialog-content{display:block;position:relative}md-dialog.web-dialog md-toolbar .title{font-size:17px}md-dialog.web-dialog md-input-container textarea{min-height:150px}md-dialog.web-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.web-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.web-dialog .date-container{padding:16px 0 24px 0}md-dialog.web-dialog .error-list{font-size:13px}md-dialog.web-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.web-dialog .error-list .error .message{font-weight:500}md-dialog.web-dialog .error-list .error .md-button{margin:0}md-dialog.web-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.web-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.odbc-dialog{max-width:720px;width:720px}md-dialog.odbc-dialog md-dialog-content{display:block;position:relative}md-dialog.odbc-dialog md-toolbar .title{font-size:17px}md-dialog.odbc-dialog md-input-container textarea{min-height:150px}md-dialog.odbc-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.odbc-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.odbc-dialog .date-container{padding:16px 0 24px 0}md-dialog.odbc-dialog .error-list{font-size:13px}md-dialog.odbc-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.odbc-dialog .error-list .error .message{font-weight:500}md-dialog.odbc-dialog .error-list .error .md-button{margin:0}md-dialog.odbc-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.odbc-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#odbcs{position:relative}#odbcs>.header{height:76px;min-height:76px;max-height:76px}#odbcs>.header .logo .logo-icon{margin:0 16px 0 0}#odbcs>.header .logo .logo-text{font-size:24px}#odbcs>.header md-icon{color:#fff}#odbcs>.header .search-input-wrapper{position:relative}#odbcs>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#odbcs>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#odbcs>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#odbcs>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#odbcs>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#odbcs>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#odbcs>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#odbcs>.header.selected-bar .close-button-wrapper{width:244px}#odbcs>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#odbcs>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#odbcs>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#odbcs #add-odbc-button{position:fixed;bottom:8px;right:8px;padding:0}#odbcs #upload-odbc-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.project-dialog{max-width:720px;width:720px}md-dialog.project-dialog md-dialog-content{display:block;position:relative}md-dialog.project-dialog md-toolbar .title{font-size:17px}md-dialog.project-dialog md-input-container textarea{min-height:150px}md-dialog.project-dialog .date-container{padding:16px 0 24px 0}md-dialog.project-dialog .error-list{font-size:13px}md-dialog.project-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.project-dialog .error-list .error .message{font-weight:500}md-dialog.project-dialog .error-list .error .md-button{margin:0}md-dialog.project-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.project-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}md-dialog.project-dialog .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#callysquare-project .header{height:76px;min-height:76px;max-height:76px}#callysquare-project .header .goto-projects-button{margin-right:16px}#callysquare-project .header .project-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#callysquare-project .header .project-image img{height:100%;width:auto;max-width:none}#callysquare-project .header .subtitle{margin:6px 0 0 0}#callysquare-project .project-detail-form-container{padding:24px;margin-bottom:24px}#callysquare-project .project-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#callysquare-project .project-detail-form-container #project-image-uploader{position:relative}#callysquare-project .project-detail-form-container #project-image-uploader.dropping .drop-text{display:flex}#callysquare-project .project-detail-form-container #project-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#callysquare-project .project-detail-form-container #project-image-uploader .upload-button{margin-bottom:16px}#callysquare-project .project-detail-form-container #project-image-uploader .project-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#callysquare-project .project-detail-form-container #project-image-uploader .project-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#callysquare-project .project-detail-form-container #project-image-uploader .project-image .media{max-height:100%}#callysquare-project>.callysquare-content{position:absolute;top:76px;bottom:0;left:0;right:0}#projects{position:relative}#projects>.header{height:76px;min-height:76px;max-height:76px}#projects>.header .logo .logo-icon{margin:0 16px 0 0}#projects>.header .logo .logo-text{font-size:24px}#projects>.header md-icon{color:#fff}#projects>.header .search-input-wrapper{position:relative}#projects>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#projects>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#projects>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#projects>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#projects>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#projects>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#projects>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#projects>.header.selected-bar .close-button-wrapper{width:244px}#projects>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#projects>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#projects>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#projects #add-project-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.squareRecording-dialog{max-width:720px;width:720px}md-dialog.squareRecording-dialog md-dialog-content{display:block;position:relative}md-dialog.squareRecording-dialog md-toolbar .title{font-size:17px}md-dialog.squareRecording-dialog md-input-container textarea{min-height:150px}md-dialog.squareRecording-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.squareRecording-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.squareRecording-dialog .date-container{padding:16px 0 24px 0}md-dialog.squareRecording-dialog .error-list{font-size:13px}md-dialog.squareRecording-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.squareRecording-dialog .error-list .error .message{font-weight:500}md-dialog.squareRecording-dialog .error-list .error .md-button{margin:0}md-dialog.squareRecording-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.squareRecording-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#squareRecordings{position:relative}#squareRecordings>.header{height:76px;min-height:76px;max-height:76px}#squareRecordings>.header .logo .logo-icon{margin:0 16px 0 0}#squareRecordings>.header .logo .logo-text{font-size:24px}#squareRecordings>.header md-icon{color:#fff}#squareRecordings>.header .search-input-wrapper{position:relative}#squareRecordings>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#squareRecordings>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#squareRecordings>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#squareRecordings>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#squareRecordings>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#squareRecordings>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#squareRecordings>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#squareRecordings>.header.selected-bar .close-button-wrapper{width:244px}#squareRecordings>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#squareRecordings>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#squareRecordings>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#squareRecordings #add-squareRecording-button{position:fixed;bottom:8px;right:8px;padding:0}#squareRecordings #upload-squareRecording-button{position:fixed;bottom:8px;right:8px;padding:0}#chatQueues{position:relative}#chatQueues>.header{height:76px;min-height:76px;max-height:76px}#chatQueues>.header .logo .logo-icon{margin:0 16px 0 0}#chatQueues>.header .logo .logo-text{font-size:24px}#chatQueues>.header md-icon{color:#fff}#chatQueues>.header .search-input-wrapper{position:relative}#chatQueues>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#chatQueues>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#chatQueues>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#chatQueues>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#chatQueues>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#chatQueues>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#chatQueues>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#chatQueues>.header.selected-bar .close-button-wrapper{width:244px}#chatQueues>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#chatQueues>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#chatQueues>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#chatQueues #add-chatQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#chatQueues #upload-chatQueue-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.chatQueue-dialog{max-width:720px;width:720px}md-dialog.chatQueue-dialog md-dialog-content{display:block;position:relative}md-dialog.chatQueue-dialog md-toolbar .title{font-size:17px}md-dialog.chatQueue-dialog md-input-container textarea{min-height:150px}md-dialog.chatQueue-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.chatQueue-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.chatQueue-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatQueue-dialog .error-list{font-size:13px}md-dialog.chatQueue-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatQueue-dialog .error-list .error .message{font-weight:500}md-dialog.chatQueue-dialog .error-list .error .md-button{margin:0}md-dialog.chatQueue-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatQueue-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#chat-chatQueue .header{height:76px;min-height:76px;max-height:76px}#chat-chatQueue .header .goto-chatQueues-button{margin-right:16px}#chat-chatQueue .header .chatQueue-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#chat-chatQueue .header .chatQueue-image img{height:100%;width:auto;max-width:none}#chat-chatQueue .header .subtitle{margin:6px 0 0 0}#chat-chatQueue .chatQueue-detail-form-container{padding:24px;margin-bottom:24px}#chat-chatQueue .chatQueue-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#chat-chatQueue .chatQueue-detail-form-container .handle{cursor:move}#chat-chatQueue .chatQueue-detail-form-container md-input-container md-switch{margin:0!important}#chat-chatQueue .chatQueue-detail-form-container #chatQueue-image-uploader{position:relative}#chat-chatQueue .chatQueue-detail-form-container #chatQueue-image-uploader.dropping .drop-text{display:flex}#chat-chatQueue .chatQueue-detail-form-container #chatQueue-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#chat-chatQueue .chatQueue-detail-form-container #chatQueue-image-uploader .upload-button{margin-bottom:16px}#chat-chatQueue .chatQueue-detail-form-container #chatQueue-image-uploader .chatQueue-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#chat-chatQueue .chatQueue-detail-form-container #chatQueue-image-uploader .chatQueue-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#chat-chatQueue .chatQueue-detail-form-container #chatQueue-image-uploader .chatQueue-image .media{max-height:100%}#chat-chatQueue md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#chat-chatQueue md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#chat-chatQueue md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#chat-chatQueue md-table-container.font-size-12 td.md-cell{font-size:12px!important}#chatWebsites{position:relative}#chatWebsites>.header{height:76px;min-height:76px;max-height:76px}#chatWebsites>.header .logo .logo-icon{margin:0 16px 0 0}#chatWebsites>.header .logo .logo-text{font-size:24px}#chatWebsites>.header md-icon{color:#fff}#chatWebsites>.header .search-input-wrapper{position:relative}#chatWebsites>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#chatWebsites>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#chatWebsites>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#chatWebsites>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#chatWebsites>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#chatWebsites>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#chatWebsites>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#chatWebsites>.header.selected-bar .close-button-wrapper{width:244px}#chatWebsites>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#chatWebsites>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#chatWebsites>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#chatWebsites #add-chatWebsite-button{position:fixed;bottom:8px;right:8px;padding:0}#chatWebsites #upload-chatWebsite-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.chatWebsite-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatCannedAnswer-dialog{max-width:720px;width:720px}md-dialog.chatCannedAnswer-dialog md-dialog-content{display:block;position:relative}md-dialog.chatCannedAnswer-dialog md-toolbar .title{font-size:17px}md-dialog.chatCannedAnswer-dialog md-input-container textarea{min-height:150px}md-dialog.chatCannedAnswer-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.chatCannedAnswer-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.chatCannedAnswer-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatCannedAnswer-dialog .error-list{font-size:13px}md-dialog.chatCannedAnswer-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatCannedAnswer-dialog .error-list .error .message{font-weight:500}md-dialog.chatCannedAnswer-dialog .error-list .error .md-button{margin:0}md-dialog.chatCannedAnswer-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatCannedAnswer-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.offlineMessage-dialog{max-width:720px;width:720px}md-dialog.offlineMessage-dialog md-dialog-content{display:block;position:relative}md-dialog.offlineMessage-dialog md-toolbar .title{font-size:17px}md-dialog.offlineMessage-dialog md-input-container textarea{min-height:150px}md-dialog.offlineMessage-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.offlineMessage-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.offlineMessage-dialog .date-container{padding:16px 0 24px 0}md-dialog.offlineMessage-dialog .error-list{font-size:13px}md-dialog.offlineMessage-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.offlineMessage-dialog .error-list .error .message{font-weight:500}md-dialog.offlineMessage-dialog .error-list .error .md-button{margin:0}md-dialog.offlineMessage-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.offlineMessage-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatProactiveAction-dialog{max-width:720px;width:720px}md-dialog.chatProactiveAction-dialog md-dialog-content{display:block;position:relative}md-dialog.chatProactiveAction-dialog md-toolbar .title{font-size:17px}md-dialog.chatProactiveAction-dialog md-input-container textarea{min-height:150px}md-dialog.chatProactiveAction-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.chatProactiveAction-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.chatProactiveAction-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatProactiveAction-dialog .error-list{font-size:13px}md-dialog.chatProactiveAction-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatProactiveAction-dialog .error-list .error .message{font-weight:500}md-dialog.chatProactiveAction-dialog .error-list .error .md-button{margin:0}md-dialog.chatProactiveAction-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatProactiveAction-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#chat-chatWebsite .header{height:76px;min-height:76px;max-height:76px}#chat-chatWebsite .header .goto-chatWebsites-button{margin-right:16px}#chat-chatWebsite .header .chatWebsite-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#chat-chatWebsite .header .chatWebsite-image img{height:100%;width:auto;max-width:none}#chat-chatWebsite .header .subtitle{margin:6px 0 0 0}#chat-chatWebsite .chatWebsite-detail-form-container{padding:24px;margin-bottom:24px}#chat-chatWebsite .chatWebsite-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#chat-chatWebsite .chatWebsite-detail-form-container .handle{cursor:move}#chat-chatWebsite .chatWebsite-detail-form-container md-input-container md-switch{margin:0!important}#chat-chatWebsite .chatWebsite-detail-form-container #chatWebsite-image-uploader{position:relative}#chat-chatWebsite .chatWebsite-detail-form-container #chatWebsite-image-uploader.dropping .drop-text{display:flex}#chat-chatWebsite .chatWebsite-detail-form-container #chatWebsite-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#chat-chatWebsite .chatWebsite-detail-form-container #chatWebsite-image-uploader .upload-button{margin-bottom:16px}#chat-chatWebsite .chatWebsite-detail-form-container #chatWebsite-image-uploader .chatWebsite-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#chat-chatWebsite .chatWebsite-detail-form-container #chatWebsite-image-uploader .chatWebsite-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#chat-chatWebsite .chatWebsite-detail-form-container #chatWebsite-image-uploader .chatWebsite-image .media{max-height:100%}#chat-chatWebsite md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#chat-chatWebsite md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#chat-chatWebsite md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#chat-chatWebsite md-table-container.font-size-12 td.md-cell{font-size:12px!important}#realtime>.content .blink{animation:blinker 2s linear infinite}#realtime>.content .avatar-wrapper{position:relative}#realtime>.content .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .search-input-wrapper{position:relative;margin-left:20px}#realtime>.content .search-input-wrapper label{padding:6px;cursor:pointer}#realtime>.content .search-input-wrapper md-input-container{padding-top:20px}#realtime>.content .main .labels{padding:8px 16px}#realtime>.content .main .labels .label{margin:0 0 2px 4px;padding:2px 5px;font-size:11px;white-space:nowrap;border-radius:2px}#realtime>.content .main .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .main .avatar-wrapper{position:relative}#realtime>.content .main .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .custom-column{padding:0 24px!important}@keyframes blinker{50%{opacity:0}}#companies{position:relative}#companies>.header{height:76px;min-height:76px;max-height:76px}#companies>.header .logo .logo-icon{margin:0 16px 0 0}#companies>.header .logo .logo-text{font-size:24px}#companies>.header md-icon{color:#fff}#companies>.header .search-input-wrapper{position:relative}#companies>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#companies>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#companies>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#companies>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#companies>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#companies>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#companies>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#companies>.header.selected-bar .close-button-wrapper{width:244px}#companies>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#companies>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#companies>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#companies #add-company-button{position:fixed;bottom:8px;right:8px;padding:0}#companies #upload-company-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.company-dialog{max-width:720px;width:720px}md-dialog.company-dialog md-dialog-content{display:block;position:relative}md-dialog.company-dialog md-toolbar .title{font-size:17px}md-dialog.company-dialog md-input-container textarea{min-height:150px}md-dialog.company-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.company-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.company-dialog .date-container{padding:16px 0 24px 0}md-dialog.company-dialog .error-list{font-size:13px}md-dialog.company-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.company-dialog .error-list .error .message{font-weight:500}md-dialog.company-dialog .error-list .error .md-button{margin:0}md-dialog.company-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.company-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#contactmanager-company .header{height:76px;min-height:76px;max-height:76px}#contactmanager-company .header .goto-companies-button{margin-right:16px}#contactmanager-company .header .company-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#contactmanager-company .header .company-image img{height:100%;width:auto;max-width:none}#contactmanager-company .header .subtitle{margin:6px 0 0 0}#contactmanager-company .company-detail-form-container{padding:24px;margin-bottom:24px}#contactmanager-company .company-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#contactmanager-company .company-detail-form-container .handle{cursor:move}#contactmanager-company .company-detail-form-container md-input-container md-switch{margin:0!important}#contactmanager-company .company-detail-form-container #company-image-uploader{position:relative}#contactmanager-company .company-detail-form-container #company-image-uploader.dropping .drop-text{display:flex}#contactmanager-company .company-detail-form-container #company-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#contactmanager-company .company-detail-form-container #company-image-uploader .upload-button{margin-bottom:16px}#contactmanager-company .company-detail-form-container #company-image-uploader .company-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#contactmanager-company .company-detail-form-container #company-image-uploader .company-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#contactmanager-company .company-detail-form-container #company-image-uploader .company-image .media{max-height:100%}#contactmanager-company md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#contactmanager-company md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#contactmanager-company md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#contactmanager-company md-table-container.font-size-12 td.md-cell{font-size:12px!important}#contacts{position:relative}#contacts>.header{height:76px;min-height:76px;max-height:76px}#contacts>.header .logo .logo-icon{margin:0 16px 0 0}#contacts>.header .logo .logo-text{font-size:24px}#contacts>.header md-icon{color:#fff}#contacts>.header .search-input-wrapper{position:relative}#contacts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#contacts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#contacts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#contacts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#contacts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#contacts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#contacts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#contacts>.header.selected-bar .close-button-wrapper{width:244px}#contacts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#contacts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#contacts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#contacts #add-contact-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.cm-contact-dialog{max-width:720px;width:720px}md-dialog.cm-contact-dialog md-dialog-content{display:block;position:relative}md-dialog.cm-contact-dialog md-toolbar .title{font-size:17px}md-dialog.cm-contact-dialog md-input-container textarea{min-height:150px}md-dialog.cm-contact-dialog .date-container{padding:16px 0 24px 0}md-dialog.cm-contact-dialog .error-list{font-size:13px}md-dialog.cm-contact-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.cm-contact-dialog .error-list .error .message{font-weight:500}md-dialog.cm-contact-dialog .error-list .error .md-button{margin:0}md-dialog.cm-contact-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.cm-contact-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.cm-contact-dialog{max-width:720px;width:720px}md-dialog.cm-contact-dialog md-dialog-content{display:block;position:relative}md-dialog.cm-contact-dialog md-toolbar .title{font-size:17px}md-dialog.cm-contact-dialog md-input-container textarea{min-height:150px}md-dialog.cm-contact-dialog .date-container{padding:16px 0 24px 0}md-dialog.cm-contact-dialog .error-list{font-size:13px}md-dialog.cm-contact-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.cm-contact-dialog .error-list .error .message{font-weight:500}md-dialog.cm-contact-dialog .error-list .error .md-button{margin:0}md-dialog.cm-contact-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.cm-contact-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.hopper-dialog{max-width:720px;width:720px}md-dialog.hopper-dialog md-dialog-content{display:block;position:relative}md-dialog.hopper-dialog md-toolbar .title{font-size:17px}md-dialog.hopper-dialog md-input-container textarea{min-height:150px}md-dialog.hopper-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.hopper-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.hopper-dialog .date-container{padding:16px 0 24px 0}md-dialog.hopper-dialog .error-list{font-size:13px}md-dialog.hopper-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.hopper-dialog .error-list .error .message{font-weight:500}md-dialog.hopper-dialog .error-list .error .md-button{margin:0}md-dialog.hopper-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.hopper-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#cm-contact .pointer{cursor:pointer}#cm-contact .header{height:76px;min-height:76px;max-height:76px}#cm-contact .header .goto-contacts-button{margin-right:16px}#cm-contact .header .contact-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#cm-contact .header .contact-image img{height:100%;width:auto;max-width:none}#cm-contact .header .subtitle{margin:6px 0 0 0}#cm-contact .contact-detail-form-container{padding:24px;margin-bottom:24px}#cm-contact .contact-detail-form-container md-input-container:not(.md-input-invalid)>md-icon.email{color:green}#cm-contact .contact-detail-form-container md-input-container:not(.md-input-invalid)>md-icon.firstname{color:#1e90ff}#cm-contact .contact-detail-form-container md-input-container.md-input-invalid>md-icon.email,#cm-contact .contact-detail-form-container md-input-container.md-input-invalid>md-icon.firstname{color:red}#cm-contact .contact-detail-form-container .hint{position:absolute;left:2px;right:auto;bottom:7px;font-size:10px;line-height:14px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.import-dialog{max-width:720px;width:720px}md-dialog.import-dialog md-dialog-content{display:block;position:relative}md-dialog.import-dialog md-toolbar .title{font-size:17px}md-dialog.import-dialog md-input-container textarea{min-height:150px}md-dialog.import-dialog .date-container{padding:16px 0 24px 0}md-dialog.import-dialog .error-list{font-size:13px}md-dialog.import-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.import-dialog .error-list .error .message{font-weight:500}md-dialog.import-dialog .error-list .error .md-button{margin:0}md-dialog.import-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.import-dialog .error-list .info{background-color:rgba(24,160,135,.08);border:1px solid rgba(24,160,135,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.import-dialog .error-list .info .message{font-weight:500}md-dialog.import-dialog .error-list .info .md-button{margin:0}md-dialog.import-dialog .error-list .info:last-child{margin-bottom:30px}md-dialog.import-dialog .contact-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}md-dialog.import-dialog .contact-image img{height:100%;width:auto;max-width:none}md-dialog.import-dialog .contact-image .media{max-height:100%}md-dialog.import-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.cm-contact-dialog{max-width:720px;width:720px}md-dialog.cm-contact-dialog md-dialog-content{display:block;position:relative}md-dialog.cm-contact-dialog md-toolbar .title{font-size:17px}md-dialog.cm-contact-dialog md-input-container textarea{min-height:150px}md-dialog.cm-contact-dialog .date-container{padding:16px 0 24px 0}md-dialog.cm-contact-dialog .error-list{font-size:13px}md-dialog.cm-contact-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.cm-contact-dialog .error-list .error .message{font-weight:500}md-dialog.cm-contact-dialog .error-list .error .md-button{margin:0}md-dialog.cm-contact-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.cm-contact-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.globalCustomField-dialog{max-width:720px;width:720px}md-dialog.globalCustomField-dialog md-dialog-content{display:block;position:relative}md-dialog.globalCustomField-dialog md-toolbar .title{font-size:17px}md-dialog.globalCustomField-dialog md-input-container textarea{min-height:150px}md-dialog.globalCustomField-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.globalCustomField-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.globalCustomField-dialog .date-container{padding:16px 0 24px 0}md-dialog.globalCustomField-dialog .error-list{font-size:13px}md-dialog.globalCustomField-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.globalCustomField-dialog .error-list .error .message{font-weight:500}md-dialog.globalCustomField-dialog .error-list .error .md-button{margin:0}md-dialog.globalCustomField-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.globalCustomField-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#globalCustomFields{position:relative}#globalCustomFields>.header{height:76px;min-height:76px;max-height:76px}#globalCustomFields>.header .logo .logo-icon{margin:0 16px 0 0}#globalCustomFields>.header .logo .logo-text{font-size:24px}#globalCustomFields>.header md-icon{color:#fff}#globalCustomFields>.header .search-input-wrapper{position:relative}#globalCustomFields>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#globalCustomFields>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#globalCustomFields>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#globalCustomFields>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#globalCustomFields>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#globalCustomFields>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#globalCustomFields>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#globalCustomFields>.header.selected-bar .close-button-wrapper{width:244px}#globalCustomFields>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#globalCustomFields>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#globalCustomFields>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#globalCustomFields #add-globalCustomField-button{position:fixed;bottom:8px;right:8px;padding:0}#globalCustomFields #upload-globalCustomField-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.list-dialog{max-width:720px;width:720px}md-dialog.list-dialog md-dialog-content{display:block;position:relative}md-dialog.list-dialog md-toolbar .title{font-size:17px}md-dialog.list-dialog md-input-container textarea{min-height:150px}md-dialog.list-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.list-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.list-dialog .date-container{padding:16px 0 24px 0}md-dialog.list-dialog .error-list{font-size:13px}md-dialog.list-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.list-dialog .error-list .error .message{font-weight:500}md-dialog.list-dialog .error-list .error .md-button{margin:0}md-dialog.list-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.list-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.customField-dialog{max-width:720px;width:720px}md-dialog.customField-dialog md-dialog-content{display:block;position:relative}md-dialog.customField-dialog md-toolbar .title{font-size:17px}md-dialog.customField-dialog md-input-container textarea{min-height:150px}md-dialog.customField-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.customField-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.customField-dialog .date-container{padding:16px 0 24px 0}md-dialog.customField-dialog .error-list{font-size:13px}md-dialog.customField-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.customField-dialog .error-list .error .message{font-weight:500}md-dialog.customField-dialog .error-list .error .md-button{margin:0}md-dialog.customField-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.customField-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#contactmanager-list .header{height:76px;min-height:76px;max-height:76px}#contactmanager-list .header .goto-lists-button{margin-right:16px}#contactmanager-list .header .list-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#contactmanager-list .header .list-image img{height:100%;width:auto;max-width:none}#contactmanager-list .header .subtitle{margin:6px 0 0 0}#contactmanager-list .list-detail-form-container{padding:24px;margin-bottom:24px}#contactmanager-list .list-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#contactmanager-list .list-detail-form-container .handle{cursor:move}#contactmanager-list .list-detail-form-container md-input-container md-switch{margin:0!important}#contactmanager-list .list-detail-form-container #list-image-uploader{position:relative}#contactmanager-list .list-detail-form-container #list-image-uploader.dropping .drop-text{display:flex}#contactmanager-list .list-detail-form-container #list-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#contactmanager-list .list-detail-form-container #list-image-uploader .upload-button{margin-bottom:16px}#contactmanager-list .list-detail-form-container #list-image-uploader .list-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#contactmanager-list .list-detail-form-container #list-image-uploader .list-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#contactmanager-list .list-detail-form-container #list-image-uploader .list-image .media{max-height:100%}#contactmanager-list md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#contactmanager-list md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#contactmanager-list md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#contactmanager-list md-table-container.font-size-12 td.md-cell{font-size:12px!important}#lists{position:relative}#lists>.header{height:76px;min-height:76px;max-height:76px}#lists>.header .logo .logo-icon{margin:0 16px 0 0}#lists>.header .logo .logo-text{font-size:24px}#lists>.header md-icon{color:#fff}#lists>.header .search-input-wrapper{position:relative}#lists>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#lists>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#lists>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#lists>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#lists>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#lists>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#lists>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#lists>.header.selected-bar .close-button-wrapper{width:244px}#lists>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#lists>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#lists>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#lists #add-list-button{position:fixed;bottom:8px;right:8px;padding:0}#lists #upload-list-button{position:fixed;bottom:8px;right:8px;padding:0}#dashboard-custom .filter-header{background-image:url(/assets/images/backgrounds/header-bg.png);color:#fff}#agent-general{position:fixed;width:100%;height:100%}#agent-general .agent-content{position:fixed;top:36px;bottom:0;left:0;right:0}#agent-general .badge{min-width:20px;height:20px;line-height:20px;padding:0 7px;font-size:11px;font-weight:700;border-radius:20px;transition:opacity .2s ease-in-out .1s}#agent-general .table-header{background-image:url(/assets/images/backgrounds/header-bg.png);color:#fff}#agent-general .table-header .md-toolbar-tools div md-select .md-select-value.md-select-placeholder{color:#fff}#agent-general .table-header .md-toolbar-tools div md-select[disabled] .md-select-value.md-select-placeholder{color:#fff}#agent-general .table-header .md-toolbar-tools div md-select[disabled] .md-select-value.md-select-placeholder .md-select-icon{display:none}#agent-general .table-header ms-quick-filter .quick-filter-date-clear-button{color:#fff}#agent-general .tooltip-preview{position:relative;display:inline-block;text-decoration:underline}#agent-general .tooltip-preview .tooltip-preview-text{visibility:hidden;width:500px;position:fixed;white-space:pre-line;left:30%;top:-2%;z-index:9999}#agent-general .tooltip-preview:hover .tooltip-preview-text{visibility:visible}#agent-general .reload-list md-icon{color:#fff}#agent-general .advanced-search md-icon{color:#fff}#agent-general .create-new md-icon{color:#fff}#agent-general div.draft-manager-bar{background-color:#f5f5f5;position:sticky;height:34px;bottom:0;border-top:1px solid #e0e0e0}#agent-general div.draft-manager-bar ms-tab-scroll{overflow:hidden}#agent-general div.draft-manager-bar ms-tab-scroll div.draft-manager-tab{height:34px;border-right:1px solid #e0e0e0}#agent-general td.width-5,#agent-general th.width-5{width:5px!important;min-width:auto!important;max-width:none!important}#agent-general td.width-10,#agent-general th.width-10{width:10px!important;min-width:auto!important;max-width:none!important}#agent-general td.width-15,#agent-general th.width-15{width:15px!important;min-width:auto!important;max-width:none!important}#agent-general td.no-padding,#agent-general th.no-padding{padding:0!important}#agent-general span.contact-text{width:100px!important}#agent-general span.subject-text{width:300px!important}#agent-general span.no-margin-bottom{margin-bottom:0!important}#agent-general span.no-margin-top{margin-top:0!important}#agent-general md-table-container.interactions-list thead tr th:not(.no-padding):not(.id-header){padding:0 20px 0 0!important}#agent-general md-table-container.interactions-list tbody tr td:not(.no-padding):not(.actions-padding):not(.id){padding:0 20px 0 0!important}#agent-general td.actions-padding{padding:0 8px 0 0!important}#agent-general md-toolbar.md-table-toolbar[disabled]{pointer-events:none}#agent-general md-toolbar.md-table-toolbar[disabled] ms-search-bar{opacity:.7}#agent-general md-toolbar.md-table-toolbar[disabled] ms-quick-filter{opacity:.7}#agent-general md-toolbar.md-table-toolbar[disabled] button.advanced-search,#agent-general md-toolbar.md-table-toolbar[disabled] button.interaction-reload{opacity:.7}#agent-general md-card.call-info-card{min-width:200px}#agent-general md-card.call-info-card div.reload-container{position:relative}#agent-general md-card.call-info-card button.reload-button{position:absolute;right:-16px}@media screen and (max-width:1280px){#agent-general span.contact-text{width:100px!important}#agent-general span.subject-text{width:350px!important}}@media screen and (max-width:1920px){#agent-general span.contact-text{width:150px!important}#agent-general span.subject-text{width:500px!important}}#agent-general-dialog{position:fixed;width:100%;height:100%}#agent-general-dialog .agent-content{position:fixed;top:0;bottom:0;left:0;right:0}body .md-select-menu-container{z-index:110}.md-toolbar-tools{font-size:12px}div.toolbar-quick-filter[disabled]{pointer-events:none;opacity:.7}md-dialog.agent-dialog{max-width:720px;width:720px}md-dialog.agent-dialog md-dialog-content{display:block;position:relative}md-dialog.agent-dialog md-toolbar .title{font-size:17px}md-dialog.agent-dialog md-input-container textarea{min-height:150px}md-dialog.agent-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.agent-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.agent-dialog .date-container{padding:16px 0 24px 0}md-dialog.agent-dialog .error-list{font-size:13px}md-dialog.agent-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.agent-dialog .error-list .error .message{font-weight:500}md-dialog.agent-dialog .error-list .error .md-button{margin:0}md-dialog.agent-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.agent-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.agent-dialog{max-width:720px;width:720px}md-dialog.agent-dialog md-dialog-content{display:block;position:relative}md-dialog.agent-dialog md-toolbar .title{font-size:17px}md-dialog.agent-dialog md-input-container textarea{min-height:150px}md-dialog.agent-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.agent-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.agent-dialog .date-container{padding:16px 0 24px 0}md-dialog.agent-dialog .error-list{font-size:13px}md-dialog.agent-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.agent-dialog .error-list .error .message{font-weight:500}md-dialog.agent-dialog .error-list .error .md-button{margin:0}md-dialog.agent-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.agent-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.contact-trigger-dialog{max-width:720px;width:720px}md-dialog.contact-trigger-dialog md-dialog-content{display:block;position:relative;max-height:400px;height:400px}md-dialog.contact-trigger-dialog md-toolbar{background-image:url(/assets/images/backgrounds/header-bg.png);background-position:top}md-dialog.contact-trigger-dialog md-toolbar .title{font-size:17px}md-dialog.contact-trigger-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}md-dialog.contact-trigger-dialog md-dialog-actions button.select-button{position:absolute;right:0;margin-right:16px}md-dialog md-grid-list.one-row-layout{height:150px;max-height:150px}md-dialog md-grid-list.two-rows-layout{height:300px;max-height:300px}md-dialog md-card.contact-info:hover{background-color:#e9eef1ad}@media screen and (max-width:1280px){md-dialog.contact-trigger-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.contact-trigger-dialog{width:90%}}md-dialog.agent-dialog{max-width:720px;width:720px}md-dialog.agent-dialog md-dialog-content{display:block;position:relative}md-dialog.agent-dialog md-toolbar .title{font-size:17px}md-dialog.agent-dialog md-input-container textarea{min-height:150px}md-dialog.agent-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.agent-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.agent-dialog .date-container{padding:16px 0 24px 0}md-dialog.agent-dialog .error-list{font-size:13px}md-dialog.agent-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.agent-dialog .error-list .error .message{font-weight:500}md-dialog.agent-dialog .error-list .error .md-button{margin:0}md-dialog.agent-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.agent-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.details-dialog{max-width:500px;width:500px}md-dialog.details-dialog md-dialog-content{display:block;position:relative}md-dialog.details-dialog md-toolbar .title{font-size:17px}md-dialog.details-dialog md-input-container textarea{min-height:150px}md-dialog.details-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.details-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.details-dialog .date-container{padding:16px 0 24px 0}md-dialog.details-dialog .error-list{font-size:13px}md-dialog.details-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.details-dialog .error-list .error .message{font-weight:500}md-dialog.details-dialog .error-list .error .md-button{margin:0}md-dialog.details-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.details-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#interaction-app .tags{font-size:12px}#interaction-app .tags .tag{border-radius:2px;padding:3px 8px;background-color:rgba(0,0,0,.08)}#interaction-app .tags .tag .tag-color{width:8px;height:8px;margin-right:8px;border-radius:50%}#interaction-app .content-card{position:relative;height:100%}#interaction-app .content-card .interaction{background:linear-gradient(to bottom,rgba(255,255,255,.8) 0,rgba(255,255,255,.6) 20%,rgba(255,255,255,.8))}#interaction-app .content-card .interaction .avatar-small{width:30px;min-width:30px;height:30px;line-height:30px;margin:0 8px 0 0;border-radius:50%;font-size:17px;font-weight:500;text-align:center;color:#fff}#interaction-app .content-card .interaction .interaction-agents{min-height:40px;background-color:#f3f4f5;color:rgba(0,0,0,.87);border-bottom:1px solid rgba(0,0,0,.08)}#interaction-app .content-card .interaction .interaction-agents .responsive-interactions-button{padding:0}#interaction-app .content-card .interaction .interaction-agents .interaction-contact{cursor:pointer}#interaction-app .content-card .interaction .interaction-agents .interaction-contact .avatar{margin-right:16px}#interaction-app .content-card .interaction .interaction-toolbar{min-height:64px;background-color:#f3f4f5;color:rgba(0,0,0,.87);border-bottom:1px solid rgba(0,0,0,.08)}#interaction-app .content-card .interaction .interaction-toolbar md-icon{color:rgba(0,0,0,.87)}#interaction-app .content-card .interaction .interaction-toolbar .responsive-interactions-button{padding:0}#interaction-app .content-card .interaction .interaction-toolbar .interaction-contact{cursor:pointer}#interaction-app .content-card .interaction .interaction-toolbar .interaction-contact .avatar{margin-right:16px}#interaction-app .content-card .interaction .cannedarea{margin-right:7px;font-size:14px;border:1px solid #ccc;border-radius:3px;align-self:stretch}#interaction-app .content-card .interaction .cannedarea md-autocomplete-wrap{padding:0 1em}#interaction-app .content-card .interaction .emojionearea{margin-right:7px}#interaction-app .content-card .interaction #interaction-content{background:url(/assets/images/patterns/circles-light.png) repeat}#interaction-app .content-card .interaction #interaction-content .message-row .mail-content{padding:24px 0}#interaction-app .content-card .interaction #interaction-content .message-row .mail-content .subject{color:rgba(0,0,0,.54)}#interaction-app .content-card .interaction #interaction-content .message-row .mail-content .subject .subject-text{margin-right:4px;text-transform:lowercase}#interaction-app .content-card .interaction #interaction-content .message-row .mail-content .info{padding-bottom:16px}#interaction-app .content-card .interaction #interaction-content .message-row .mail-content .info .avatar{margin-right:16px}#interaction-app .content-card .interaction #interaction-content .message-row .mail-content .info .name{margin-right:8px;font-weight:500}#interaction-app .content-card .interaction #interaction-content .message-row .mail-content .info .toggle-details{padding-top:16px;cursor:pointer;font-weight:500}#interaction-app .content-card .interaction #interaction-content .message-row .mail-content .info .details{padding-top:8px}#interaction-app .content-card .interaction #interaction-content .message-row .mail-content .info .details .title{font-weight:500;margin-right:6px}#interaction-app .content-card .interaction #interaction-content .message-row .mail-content .info .details .detail{color:rgba(0,0,0,.54)}#interaction-app .content-card .interaction #interaction-content .message-row .bubble{position:relative;padding:6px 7px 8px 9px;background-color:#fff;border:1px solid #dcdfe1;border-radius:6px;word-break:break-word}#interaction-app .content-card .interaction #interaction-content .message-row .bubble:after,#interaction-app .content-card .interaction #interaction-content .message-row .bubble:before{content:' ';position:absolute;width:0;height:0}#interaction-app .content-card .interaction #interaction-content .message-row .bubble:after{left:-7px;right:auto;top:0;bottom:auto;border:11px solid;border-color:#fff transparent transparent transparent}#interaction-app .content-card .interaction #interaction-content .message-row .bubble:before{left:-9px;right:auto;top:-1px;bottom:auto;border:8px solid;border-color:#dcdfe1 transparent transparent transparent}#interaction-app .content-card .interaction #interaction-content .message-row .bubble .time{font-size:11px;margin-top:0;text-align:right}#interaction-app .content-card .interaction #interaction-content .message-row .bubble .message{white-space:pre-wrap}#interaction-app .content-card .interaction #interaction-content .message-row .bubble .message span{word-break:break-all}#interaction-app .content-card .interaction #interaction-content .message-row.in{padding:5px}#interaction-app .content-card .interaction #interaction-content .message-row.in .avatar{margin:0 16px 0 0}#interaction-app .content-card .interaction #interaction-content .message-row.in-right-aligned{padding:5px;align-items:flex-end}#interaction-app .content-card .interaction #interaction-content .message-row.in-right-aligned .avatar{order:2;margin:0 0 0 16px}#interaction-app .content-card .interaction #interaction-content .message-row.in-right-aligned .bubble{margin-left:auto;order:1}#interaction-app .content-card .interaction #interaction-content .message-row.in-right-aligned .bubble:after{right:-9px;left:auto;top:auto;bottom:0;border-color:transparent transparent #e8f5e9 transparent}#interaction-app .content-card .interaction #interaction-content .message-row.in-right-aligned .bubble:before{right:-11px;left:auto;-moz-transform:scaleX(-1);-o-transform:scaleX(-1);-webkit-transform:scaleX(-1);transform:scaleX(-1)}#interaction-app .content-card .interaction #interaction-content .message-row.out{padding:5px;align-items:flex-end}#interaction-app .content-card .interaction #interaction-content .message-row.out .avatar{order:2;margin:0 0 0 16px}#interaction-app .content-card .interaction #interaction-content .message-row.out .bubble{margin-left:auto;background-color:#e8f5e9;border:1px solid #dfebe0;order:1}#interaction-app .content-card .interaction #interaction-content .message-row.out .bubble:after{right:-7px;left:auto;top:auto;bottom:0;border-color:transparent transparent #e8f5e9 transparent}#interaction-app .content-card .interaction #interaction-content .message-row.out .bubble:before{right:-9px;left:auto;top:auto;bottom:-1px;border-color:transparent transparent #dfebe0 transparent}#interaction-app .content-card .interaction #interaction-content .message-row.out-left-aligned{padding:5px}#interaction-app .content-card .interaction #interaction-content .message-row.out-left-aligned .avatar{order:1;margin:0 16px 0 0}#interaction-app .content-card .interaction #interaction-content .message-row.out-left-aligned .bubble{background-color:#e8f5e9;border:1px solid #dfebe0;order:2}#interaction-app .content-card .interaction #interaction-content .message-row.out-left-aligned .bubble:after{right:-7px;left:auto;top:auto;bottom:0;border-color:transparent transparent #e8f5e9 transparent}#interaction-app .content-card .interaction #interaction-content .message-row.out-left-aligned .bubble:before{right:-9px;left:auto;top:auto;bottom:-1px;border-color:transparent transparent #dfebe0 transparent}#interaction-app .content-card .interaction .interaction-footer{min-height:64px;max-height:180px;background-color:#f3f4f5;color:rgba(0,0,0,.87);border-top:1px solid rgba(0,0,0,.08);padding:8px 8px 8px 16px}#interaction-app .content-card .interaction .interaction-footer .reply-form md-input-container{margin:0;padding-right:16px}#interaction-app .content-card .interaction .interaction-footer .reply-form md-input-container textarea{overflow:auto;max-height:80px;transition:height .2s ease}#interaction-app .content-card .interaction .interaction-footer .reply-form md-input-container textarea.grow{height:80px}#interaction-app .content-card .interaction .interaction-footer .reply-form md-input-container .md-errors-spacer{display:none}#interaction-app .content-card .interaction .interaction-footer .reply-form .md-button{margin:0}#interaction-app .content-card .info md-list-item{min-height:40px;height:52px}#interaction-app .content-card .start-point{background:linear-gradient(to bottom,rgba(255,255,255,.8) 0,rgba(255,255,255,.6) 20%,rgba(255,255,255,.8))}#interaction-app .content-card .start-point .big-circle{background:linear-gradient(to bottom,rgba(255,255,255,.8) 0,rgba(255,255,255,.6) 20%,rgba(255,255,255,.8));border-radius:50%;width:300px;height:300px;line-height:300px;text-align:center}#interaction-app .content-card .start-point .app-title{font-weight:500;font-size:32px;margin:12px 0}#interaction-app .content-card .start-point .secondary-text{font-size:16px}#interaction-app .content-card .sidenav md-toolbar{border-bottom:1px solid rgba(0,0,0,.08)}#interaction-app .content-card .sidenav md-toolbar .md-toolbar-tools-bottom .search{height:36px;line-height:36px;padding:8px;background:#fff;font-size:13px}#interaction-app .content-card .sidenav md-toolbar .md-toolbar-tools-bottom .search .icon{margin:0;color:rgba(0,0,0,.54)}#interaction-app .content-card .sidenav md-toolbar .md-toolbar-tools-bottom .search input{padding-left:12px;height:36px;color:rgba(0,0,0,.54)}#interaction-app .content-card .sidenav md-list.contact-list,#interaction-app .content-card .sidenav md-list.interaction-list{position:relative;transition:all .2s ease-out}#interaction-app .content-card .sidenav md-list.contact-list .subheader,#interaction-app .content-card .sidenav md-list.contact-list md-list-item,#interaction-app .content-card .sidenav md-list.interaction-list .subheader,#interaction-app .content-card .sidenav md-list.interaction-list md-list-item{position:absolute;right:0;left:0;width:100%;transition:transform .2s ease-out;background:#fff;will-change:transform}#interaction-app .content-card .sidenav md-list.contact-list .subheader.ng-leave,#interaction-app .content-card .sidenav md-list.contact-list md-list-item.ng-leave,#interaction-app .content-card .sidenav md-list.interaction-list .subheader.ng-leave,#interaction-app .content-card .sidenav md-list.interaction-list md-list-item.ng-leave{transform:translateY(0);display:none}#interaction-app .content-card .sidenav md-list.contact-list .subheader.ng-leave.ng-leave-active,#interaction-app .content-card .sidenav md-list.contact-list md-list-item.ng-leave.ng-leave-active,#interaction-app .content-card .sidenav md-list.interaction-list .subheader.ng-leave.ng-leave-active,#interaction-app .content-card .sidenav md-list.interaction-list md-list-item.ng-leave.ng-leave-active{transform:translateY(-100%)}#interaction-app .content-card .sidenav md-list.contact-list .subheader.ng-hide,#interaction-app .content-card .sidenav md-list.contact-list md-list-item.ng-hide,#interaction-app .content-card .sidenav md-list.interaction-list .subheader.ng-hide,#interaction-app .content-card .sidenav md-list.interaction-list md-list-item.ng-hide{display:none}#interaction-app .content-card .sidenav md-list.contact-list .subheader.ng-hide-add-active,#interaction-app .content-card .sidenav md-list.contact-list .subheader.ng-hide-remove-active,#interaction-app .content-card .sidenav md-list.contact-list md-list-item.ng-hide-add-active,#interaction-app .content-card .sidenav md-list.contact-list md-list-item.ng-hide-remove-active,#interaction-app .content-card .sidenav md-list.interaction-list .subheader.ng-hide-add-active,#interaction-app .content-card .sidenav md-list.interaction-list .subheader.ng-hide-remove-active,#interaction-app .content-card .sidenav md-list.interaction-list md-list-item.ng-hide-add-active,#interaction-app .content-card .sidenav md-list.interaction-list md-list-item.ng-hide-remove-active{display:block;transition-property:all}#interaction-app .content-card .sidenav md-list.contact-list .subheader,#interaction-app .content-card .sidenav md-list.interaction-list .subheader{padding-left:16px;font-size:20px;font-weight:300;height:88px;line-height:88px}#interaction-app .content-card .sidenav .no-results-message{position:absolute;width:100%;height:88px;padding:16px;background:#fff;font-size:15px;font-weight:400}#interaction-app .avatar-wrapper{position:relative}#interaction-app .avatar-wrapper .avatar{margin-top:0;margin-bottom:0}#interaction-app .status{position:absolute;top:28px;left:28px;border-radius:50%}#interaction-app .status.online{color:#4caf50}#interaction-app .status.online:before{content:'\e709'}#interaction-app .status.do-not-disturb{color:#f44336}#interaction-app .status.do-not-disturb:before{content:'\e912'}#interaction-app .status.away{background-color:#ffc107;color:#fff}#interaction-app .status.away:before{content:'\e727'}#interaction-app .status.offline{color:#4caf50;background-color:#fff}#interaction-app .status.offline:before{content:'\e704'}#interaction-app .editable-wrap{position:relative}#interaction-app .editable-wrap .editable-controls{display:flex;flex-direction:row;align-items:center;width:100%}#interaction-app .editable-wrap .editable-controls .editable-input{width:inherit;background-color:#fff;padding:8px;border:1px solid rgba(0,0,0,.12)}#interaction-app .editable-wrap .editable-controls .editable-buttons{display:inherit}#interaction-app .editable-wrap .editable-controls .editable-buttons .md-button{margin:0}#interaction-app .editable-wrap .editable-controls .editable-buttons .md-button:first-of-type{padding-right:0}#interaction-app .editable-wrap .editable-controls .editable-buttons .md-button .icon-cancel{color:rgba(0,0,0,.32)}#interaction-app .editable-click{cursor:pointer;text-decoration:none;color:inherit;border-bottom:none}#interaction-app .emoji-picker-icon{right:5px;cursor:pointer}#interaction-app .input-show-hide{transition:all linear .5s}#interaction-app .input-show-hide.ng-hide{opacity:0}#interaction-app div.interaction-reply-button-container{display:inline;padding-bottom:14px}#timeline{position:relative;height:auto;padding-bottom:30px}#timeline:before{display:block;position:absolute;z-index:10;content:'';width:2px;background:rgba(0,0,0,.08);top:0;left:50%;bottom:0;margin-left:-1px}#timeline .ms-timeline-item{overflow:hidden;position:relative;z-index:20;width:100%;margin:0 auto;max-width:1200px}#timeline .ms-timeline-item .timeline-card{order:1}#timeline .ms-timeline-item .timeline-card .interaction .header .avatar .image{display:block;width:40px;height:40px;border-radius:20px}#timeline .ms-timeline-item .timeline-card .interaction .media .image{width:100%}#timeline .ms-timeline-item .timeline-point{position:absolute;width:40px;height:40px;line-height:40px;text-align:center;border-radius:50%;left:50%;margin:16px 0 0 -28px;order:2}#timeline .ms-timeline-item .timeline-point md-icon{color:#fff}#timeline .ms-timeline-item .timeline-detail{flex:50% 0 0;padding-top:28px;order:3}#timeline .ms-timeline-item .timeline-detail .time{font-size:15px;padding-left:68px}#timeline .ms-timeline-item .timeline-detail .event{color:rgba(0,0,0,.54);padding-left:68px}#timeline .ms-timeline-item:nth-child(odd) .timeline-card{flex-direction:row-reverse}#timeline .ms-timeline-item:nth-child(even) .timeline-card{order:3;padding-right:0}#timeline .ms-timeline-item:nth-child(even) .timeline-card ms-card{padding-left:84px}#timeline .ms-timeline-item:nth-child(even) .timeline-detail{order:1;padding-left:0;text-align:right}#timeline .ms-timeline-item:nth-child(even) .timeline-detail .event,#timeline .ms-timeline-item:nth-child(even) .timeline-detail .time{padding-right:68px}#timeline .ms-timeline-item:first-child{padding-top:15px}#timeline .ms-timeline-item.animate .timeline-card{animation:slide-in-left .4s}#timeline .ms-timeline-item.animate .timeline-point{animation:slide-in-bottom .4s}#timeline .ms-timeline-item.animate .timeline-detail{animation:slide-in-right .4s}#timeline .ms-timeline-item:nth-child(even).animate .timeline-card{animation:slide-in-right .4s}#timeline .ms-timeline-item:nth-child(even).animate .timeline-detail{animation:slide-in-left .4s}#timeline.timeline-left .ms-timeline-item .timeline-card{order:1}#timeline.timeline-left .ms-timeline-item .timeline-card ms-card{padding-right:68px;padding-left:0;margin-left:auto}#timeline.timeline-left .ms-timeline-item .timeline-detail{order:3;text-align:left}#timeline.timeline-left .ms-timeline-item.animate .timeline-card{animation:slide-in-left .4s}#timeline.timeline-left .ms-timeline-item.animate .timeline-detail{animation:slide-in-right .4s}#timeline.timeline-right .ms-timeline-item .timeline-card{order:3}#timeline.timeline-right .ms-timeline-item .timeline-card ms-card{padding-left:68px;padding-right:0;margin-right:auto}#timeline.timeline-right .ms-timeline-item .timeline-detail{order:1;text-align:right}#timeline.timeline-right .ms-timeline-item .timeline-detail .event,#timeline.timeline-right .ms-timeline-item .timeline-detail .time{padding-right:68px;padding-left:0}#timeline.timeline-right .ms-timeline-item.animate .timeline-card{animation:slide-in-right .4s}#timeline.timeline-right .ms-timeline-item.animate .timeline-detail{animation:slide-in-left .4s}@media screen and (max-width:1280px){#timeline .ms-timeline-item,#timeline.timeline-left .ms-timeline-item,#timeline.timeline-right .ms-timeline-item{display:block}#timeline .ms-timeline-item .timeline-point,#timeline.timeline-left .ms-timeline-item .timeline-point,#timeline.timeline-right .ms-timeline-item .timeline-point{position:relative;left:auto;margin:0 auto 16px auto;padding:0}#timeline .ms-timeline-item .timeline-detail,#timeline.timeline-left .ms-timeline-item .timeline-detail,#timeline.timeline-right .ms-timeline-item .timeline-detail{padding:2px;margin-bottom:16px}#timeline .ms-timeline-item .timeline-detail .event,#timeline .ms-timeline-item .timeline-detail .time,#timeline.timeline-left .ms-timeline-item .timeline-detail .event,#timeline.timeline-left .ms-timeline-item .timeline-detail .time,#timeline.timeline-right .ms-timeline-item .timeline-detail .event,#timeline.timeline-right .ms-timeline-item .timeline-detail .time{padding-right:0;padding-left:0;text-align:center}#timeline .ms-timeline-item .timeline-card ms-card,#timeline.timeline-left .ms-timeline-item .timeline-card ms-card,#timeline.timeline-right .ms-timeline-item .timeline-card ms-card{margin:0 auto;padding:0}#timeline .ms-timeline-item:nth-child(even) .timeline-point,#timeline.timeline-left .ms-timeline-item:nth-child(even) .timeline-point,#timeline.timeline-right .ms-timeline-item:nth-child(even) .timeline-point{position:relative;left:auto;margin:0 auto 16px auto;padding:0}#timeline .ms-timeline-item:nth-child(even) .timeline-detail,#timeline.timeline-left .ms-timeline-item:nth-child(even) .timeline-detail,#timeline.timeline-right .ms-timeline-item:nth-child(even) .timeline-detail{padding:2px;margin-bottom:16px}#timeline .ms-timeline-item:nth-child(even) .timeline-detail .event,#timeline .ms-timeline-item:nth-child(even) .timeline-detail .time,#timeline.timeline-left .ms-timeline-item:nth-child(even) .timeline-detail .event,#timeline.timeline-left .ms-timeline-item:nth-child(even) .timeline-detail .time,#timeline.timeline-right .ms-timeline-item:nth-child(even) .timeline-detail .event,#timeline.timeline-right .ms-timeline-item:nth-child(even) .timeline-detail .time{padding-right:0;padding-left:0;text-align:center}#timeline .ms-timeline-item:nth-child(even) .timeline-card ms-card,#timeline.timeline-left .ms-timeline-item:nth-child(even) .timeline-card ms-card,#timeline.timeline-right .ms-timeline-item:nth-child(even) .timeline-card ms-card{margin:0 auto;padding:0}}md-dialog.compose-dialog{height:100%;width:100%;max-width:70%;max-height:80%}md-dialog.compose-dialog md-dialog-content{display:block;position:relative}md-dialog.compose-dialog md-toolbar .title{font-size:17px}md-dialog.compose-dialog md-chips md-chip{font-size:12px}md-dialog.compose-dialog md-chips .md-chip-input-container{width:100%}md-dialog.compose-dialog .to{position:relative}md-dialog.compose-dialog .error-list{font-size:13px}md-dialog.compose-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.compose-dialog .error-list .error .message{font-weight:500}md-dialog.compose-dialog .error-list .error .md-button{margin:0}md-dialog.compose-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.compose-dialog .emojionearea{min-height:250px}md-dialog.compose-dialog md-dialog-actions{position:relative;justify-content:space-between;border-top:1px solid rgba(0,0,0,.12);background-color:rgba(0,0,0,.03)}@media screen and (max-width:960px){md-dialog.compose-dialog{width:80%}}@media screen and (max-width:600px){md-dialog.compose-dialog{width:90%}}md-dialog.compose-dialog-fax{max-width:720px;width:720px;max-height:450px;height:450px}md-dialog.compose-dialog-fax md-dialog-content{display:block;position:relative}md-dialog.compose-dialog-fax md-toolbar .title{font-size:17px}md-dialog.compose-dialog-fax md-chips md-chip{font-size:12px}md-dialog.compose-dialog-fax md-chips .md-chip-input-container{width:100%}md-dialog.compose-dialog-fax .to{position:relative}md-dialog.compose-dialog-fax .attachment-list{font-size:13px}md-dialog.compose-dialog-fax .attachment-list .attachment{background-color:rgba(0,0,0,.08);border:1px solid rgba(0,0,0,.16);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.compose-dialog-fax .attachment-list .attachment .filename{font-weight:500}md-dialog.compose-dialog-fax .attachment-list .attachment .md-button{margin:0}md-dialog.compose-dialog-fax .attachment-list .attachment:last-child{margin-bottom:0}md-dialog.compose-dialog-fax .error-list{font-size:13px}md-dialog.compose-dialog-fax .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.compose-dialog-fax .error-list .error .message{font-weight:500}md-dialog.compose-dialog-fax .error-list .error .md-button{margin:0}md-dialog.compose-dialog-fax .error-list .error:last-child{margin-bottom:30px}md-dialog.compose-dialog-fax md-dialog-actions{position:relative;justify-content:space-between;border-top:1px solid rgba(0,0,0,.12);background-color:rgba(0,0,0,.03)}@media screen and (max-width:960px){md-dialog.compose-dialog{width:80%}}@media screen and (max-width:600px){md-dialog.compose-dialog{width:90%}}md-dialog.compose-dialog .vertical-divider{position:absolute;border-right-width:.5px;border-right-style:solid;height:100%}md-dialog.compose-dialog md-dialog-content{display:block;position:relative}md-dialog.compose-dialog md-toolbar .title{font-size:17px}md-dialog.compose-dialog md-chips md-chip{font-size:12px}md-dialog.compose-dialog md-chips .md-chip-input-container{width:100%}md-dialog.compose-dialog .to{position:relative}md-dialog.compose-dialog .to.hidden-cc input{padding-right:32px}md-dialog.compose-dialog .to.hidden-cc.hidden-bcc input{padding-right:56px}md-dialog.compose-dialog .to.hidden-bcc input{padding-right:32px}md-dialog.compose-dialog .to .cc-bcc{position:absolute;bottom:8px;right:0}md-dialog.compose-dialog .to .cc-bcc .show-bcc,md-dialog.compose-dialog .to .cc-bcc .show-cc{cursor:pointer;font-size:12px}md-dialog.compose-dialog .to .cc-bcc .show-bcc{margin-left:8px}md-dialog.compose-dialog .attachment-list{font-size:13px}md-dialog.compose-dialog .attachment-list .attachment{background-color:rgba(0,0,0,.08);border:1px solid rgba(0,0,0,.16);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.compose-dialog .attachment-list .attachment .filename{font-weight:500}md-dialog.compose-dialog .attachment-list .attachment .md-button{margin:0}md-dialog.compose-dialog .attachment-list .attachment:last-child{margin-bottom:0}md-dialog.compose-dialog .error-list{font-size:13px}md-dialog.compose-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.compose-dialog .error-list .error .message{font-weight:500}md-dialog.compose-dialog .error-list .error .md-button{margin:0}md-dialog.compose-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.compose-dialog md-dialog-actions{position:relative;justify-content:space-between;border-top:1px solid rgba(0,0,0,.12);background-color:rgba(0,0,0,.03)}@media screen and (max-width:960px){md-dialog.compose-dialog{width:80%}}@media screen and (max-width:600px){md-dialog.compose-dialog{width:90%}}md-dialog.compose-dialog{height:100%;width:100%;max-width:70%;max-height:80%}md-dialog.compose-dialog md-dialog-content{display:block;position:relative}md-dialog.compose-dialog md-toolbar .title{font-size:17px}md-dialog.compose-dialog md-chips md-chip{font-size:12px}md-dialog.compose-dialog md-chips .md-chip-input-container{width:100%}md-dialog.compose-dialog .to{position:relative}md-dialog.compose-dialog .error-list{font-size:13px}md-dialog.compose-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.compose-dialog .error-list .error .message{font-weight:500}md-dialog.compose-dialog .error-list .error .md-button{margin:0}md-dialog.compose-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.compose-dialog .emojionearea{min-height:250px}md-dialog.compose-dialog md-dialog-actions{position:relative;justify-content:space-between;border-top:1px solid rgba(0,0,0,.12);background-color:rgba(0,0,0,.03)}@media screen and (max-width:960px){md-dialog.compose-dialog{width:80%}}@media screen and (max-width:600px){md-dialog.compose-dialog{width:90%}}md-dialog.compose-dialog{height:100%;width:100%;max-width:70%;max-height:80%}md-dialog.compose-dialog md-dialog-content{display:block;position:relative}md-dialog.compose-dialog md-toolbar .title{font-size:17px}md-dialog.compose-dialog md-chips md-chip{font-size:12px}md-dialog.compose-dialog md-chips .md-chip-input-container{width:100%}md-dialog.compose-dialog .to{position:relative}md-dialog.compose-dialog .error-list{font-size:13px}md-dialog.compose-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.compose-dialog .error-list .error .message{font-weight:500}md-dialog.compose-dialog .error-list .error .md-button{margin:0}md-dialog.compose-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.compose-dialog .emojionearea{min-height:250px}md-dialog.compose-dialog md-dialog-actions{position:relative;justify-content:space-between;border-top:1px solid rgba(0,0,0,.12);background-color:rgba(0,0,0,.03)}@media screen and (max-width:960px){md-dialog.compose-dialog{width:80%}}@media screen and (max-width:600px){md-dialog.compose-dialog{width:90%}}md-dialog.compose-dialog{height:100%;width:100%;max-width:70%;max-height:80%}md-dialog.compose-dialog md-dialog-content{display:block;position:relative}md-dialog.compose-dialog md-toolbar .title{font-size:17px}md-dialog.compose-dialog md-chips md-chip{font-size:12px}md-dialog.compose-dialog md-chips .md-chip-input-container{width:100%}md-dialog.compose-dialog .to{position:relative}md-dialog.compose-dialog .error-list{font-size:13px}md-dialog.compose-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.compose-dialog .error-list .error .message{font-weight:500}md-dialog.compose-dialog .error-list .error .md-button{margin:0}md-dialog.compose-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.compose-dialog .emojionearea{min-height:250px}md-dialog.compose-dialog md-dialog-actions{position:relative;justify-content:space-between;border-top:1px solid rgba(0,0,0,.12);background-color:rgba(0,0,0,.03)}@media screen and (max-width:960px){md-dialog.compose-dialog{width:80%}}@media screen and (max-width:600px){md-dialog.compose-dialog{width:90%}}md-dialog.disposition-dialog{max-width:720px;width:720px}md-dialog.disposition-dialog md-dialog-content{display:block;position:relative}md-dialog.disposition-dialog md-toolbar .title{font-size:17px}md-dialog.disposition-dialog md-input-container textarea{min-height:150px}md-dialog.disposition-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.disposition-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.disposition-dialog .date-container{padding:16px 0 24px 0}md-dialog.disposition-dialog .error-list{font-size:13px}md-dialog.disposition-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.disposition-dialog .error-list .error .message{font-weight:500}md-dialog.disposition-dialog .error-list .error .md-button{margin:0}md-dialog.disposition-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.disposition-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.disposition-dialog{max-width:720px;width:720px}md-dialog.disposition-dialog md-dialog-content{display:block;position:relative}md-dialog.disposition-dialog md-toolbar .title{font-size:17px}md-dialog.disposition-dialog md-input-container textarea{min-height:150px}md-dialog.disposition-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.disposition-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.disposition-dialog .date-container{padding:16px 0 24px 0}md-dialog.disposition-dialog .error-list{font-size:13px}md-dialog.disposition-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.disposition-dialog .error-list .error .message{font-weight:500}md-dialog.disposition-dialog .error-list .error .md-button{margin:0}md-dialog.disposition-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.disposition-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.disposition-dialog{max-width:720px;width:720px}md-dialog.disposition-dialog md-dialog-content{display:block;position:relative}md-dialog.disposition-dialog md-toolbar .title{font-size:17px}md-dialog.disposition-dialog md-input-container textarea{min-height:150px}md-dialog.disposition-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.disposition-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.disposition-dialog .date-container{padding:16px 0 24px 0}md-dialog.disposition-dialog .error-list{font-size:13px}md-dialog.disposition-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.disposition-dialog .error-list .error .message{font-weight:500}md-dialog.disposition-dialog .error-list .error .md-button{margin:0}md-dialog.disposition-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.disposition-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#dashboard-general>.center>.header{height:160px;min-height:160px;max-height:160px;padding-bottom:0}#dashboard-general>.center>.header .selected-general{background:rgba(0,0,0,.12);color:#fff;padding:8px 16px;height:40px;line-height:24px;font-size:16px}#dashboard-general>.center>.header .general-selector{margin-left:1px;border-radius:0;background:rgba(0,0,0,.12)}#dashboard-general>.center>.header .general-selector md-icon{color:#fff}#dashboard-general>.center>.content{background:0 0;padding:0}#dashboard-general>.center>.content>md-tabs>md-tabs-wrapper{background:#fff;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);padding:0 24px}#dashboard-general>.center>.content>md-tabs>md-tabs-wrapper md-tabs-canvas{height:56px}#dashboard-general>.center>.content>md-tabs>md-tabs-wrapper md-tabs-canvas md-pagination-wrapper{height:56px}#dashboard-general>.center>.content>md-tabs>md-tabs-wrapper md-tabs-canvas .md-tab{padding:16px 24px;text-transform:none}#dashboard-general>.center>.content>md-tabs:not(.md-dynamic-height) md-tabs-content-wrapper{top:56px}#dashboard-general>.center>.content>md-tabs>md-tabs-content-wrapper md-tab-content{padding:12px}#dashboard-general>.sidenav{width:330px;min-width:330px;max-width:330px;padding:0;z-index:51;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}#dashboard-general>.sidenav.md-locked-open{width:250px;min-width:250px;max-width:250px;z-index:2;box-shadow:none;background:#eee}#dashboard-general .dashboard-container{padding:24px;margin-bottom:24px}#dashboard-general .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.faxAccount-dialog{max-width:720px;width:720px}md-dialog.faxAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.faxAccount-dialog md-toolbar .title{font-size:17px}md-dialog.faxAccount-dialog md-input-container textarea{min-height:150px}md-dialog.faxAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.faxAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.faxAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxAccount-dialog .error-list{font-size:13px}md-dialog.faxAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxAccount-dialog .error-list .error .message{font-weight:500}md-dialog.faxAccount-dialog .error-list .error .md-button{margin:0}md-dialog.faxAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.faxAccount-dialog{max-width:720px;width:720px}md-dialog.faxAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.faxAccount-dialog md-toolbar .title{font-size:17px}md-dialog.faxAccount-dialog md-input-container textarea{min-height:150px}md-dialog.faxAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxAccount-dialog .error-list{font-size:13px}md-dialog.faxAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxAccount-dialog .error-list .error .message{font-weight:500}md-dialog.faxAccount-dialog .error-list .error .md-button{margin:0}md-dialog.faxAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.faxAccount-dialog{max-width:720px;width:720px}md-dialog.faxAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.faxAccount-dialog md-toolbar .title{font-size:17px}md-dialog.faxAccount-dialog md-input-container textarea{min-height:150px}md-dialog.faxAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxAccount-dialog .error-list{font-size:13px}md-dialog.faxAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxAccount-dialog .error-list .error .message{font-weight:500}md-dialog.faxAccount-dialog .error-list .error .md-button{margin:0}md-dialog.faxAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.faxAccount-dialog{max-width:720px;width:720px}md-dialog.faxAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.faxAccount-dialog md-toolbar .title{font-size:17px}md-dialog.faxAccount-dialog md-input-container textarea{min-height:150px}md-dialog.faxAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxAccount-dialog .error-list{font-size:13px}md-dialog.faxAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxAccount-dialog .error-list .error .message{font-weight:500}md-dialog.faxAccount-dialog .error-list .error .md-button{margin:0}md-dialog.faxAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.faxAccount-dialog{max-width:720px;width:720px}md-dialog.faxAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.faxAccount-dialog md-toolbar .title{font-size:17px}md-dialog.faxAccount-dialog md-input-container textarea{min-height:150px}md-dialog.faxAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxAccount-dialog .error-list{font-size:13px}md-dialog.faxAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxAccount-dialog .error-list .error .message{font-weight:500}md-dialog.faxAccount-dialog .error-list .error .md-button{margin:0}md-dialog.faxAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.faxAccount-dialog{max-width:720px;width:720px}md-dialog.faxAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.faxAccount-dialog md-toolbar .title{font-size:17px}md-dialog.faxAccount-dialog md-input-container textarea{min-height:150px}md-dialog.faxAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxAccount-dialog .error-list{font-size:13px}md-dialog.faxAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxAccount-dialog .error-list .error .message{font-weight:500}md-dialog.faxAccount-dialog .error-list .error .md-button{margin:0}md-dialog.faxAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.faxAccount-dialog{max-width:720px;width:720px}md-dialog.faxAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.faxAccount-dialog md-toolbar .title{font-size:17px}md-dialog.faxAccount-dialog md-input-container textarea{min-height:150px}md-dialog.faxAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxAccount-dialog .error-list{font-size:13px}md-dialog.faxAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxAccount-dialog .error-list .error .message{font-weight:500}md-dialog.faxAccount-dialog .error-list .error .md-button{margin:0}md-dialog.faxAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.faxAccount-dialog{max-width:720px;width:720px}md-dialog.faxAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.faxAccount-dialog md-toolbar .title{font-size:17px}md-dialog.faxAccount-dialog md-input-container textarea{min-height:150px}md-dialog.faxAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxAccount-dialog .error-list{font-size:13px}md-dialog.faxAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxAccount-dialog .error-list .error .message{font-weight:500}md-dialog.faxAccount-dialog .error-list .error .md-button{margin:0}md-dialog.faxAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.faxAccount-dialog{max-width:720px;width:720px}md-dialog.faxAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.faxAccount-dialog md-toolbar .title{font-size:17px}md-dialog.faxAccount-dialog md-input-container textarea{min-height:150px}md-dialog.faxAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxAccount-dialog .error-list{font-size:13px}md-dialog.faxAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxAccount-dialog .error-list .error .message{font-weight:500}md-dialog.faxAccount-dialog .error-list .error .md-button{margin:0}md-dialog.faxAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.faxAccount-dialog{max-width:720px;width:720px}md-dialog.faxAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.faxAccount-dialog md-toolbar .title{font-size:17px}md-dialog.faxAccount-dialog md-input-container textarea{min-height:150px}md-dialog.faxAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxAccount-dialog .error-list{font-size:13px}md-dialog.faxAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxAccount-dialog .error-list .error .message{font-weight:500}md-dialog.faxAccount-dialog .error-list .error .md-button{margin:0}md-dialog.faxAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#fax-faxAccount .header{height:76px;min-height:76px;max-height:76px}#fax-faxAccount .header .goto-faxAccounts-button{margin-right:16px}#fax-faxAccount .header .faxAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#fax-faxAccount .header .faxAccount-image img{height:100%;width:auto;max-width:none}#fax-faxAccount .header .subtitle{margin:6px 0 0 0}#fax-faxAccount .faxAccount-detail-form-container{padding:24px;margin-bottom:24px}#fax-faxAccount .faxAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#fax-faxAccount .faxAccount-detail-form-container .handle{cursor:move}#fax-faxAccount .faxAccount-detail-form-container md-input-container md-switch{margin:0!important}#fax-faxAccount .faxAccount-detail-form-container #faxAccount-image-uploader{position:relative}#fax-faxAccount .faxAccount-detail-form-container #faxAccount-image-uploader.dropping .drop-text{display:flex}#fax-faxAccount .faxAccount-detail-form-container #faxAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#fax-faxAccount .faxAccount-detail-form-container #faxAccount-image-uploader .upload-button{margin-bottom:16px}#fax-faxAccount .faxAccount-detail-form-container #faxAccount-image-uploader .faxAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#fax-faxAccount .faxAccount-detail-form-container #faxAccount-image-uploader .faxAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#fax-faxAccount .faxAccount-detail-form-container #faxAccount-image-uploader .faxAccount-image .media{max-height:100%}#fax-faxAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#fax-faxAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#fax-faxAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#fax-faxAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}#faxAccounts{position:relative}#faxAccounts>.header{height:76px;min-height:76px;max-height:76px}#faxAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#faxAccounts>.header .logo .logo-text{font-size:24px}#faxAccounts>.header md-icon{color:#fff}#faxAccounts>.header .search-input-wrapper{position:relative}#faxAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#faxAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#faxAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#faxAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#faxAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#faxAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#faxAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#faxAccounts>.header.selected-bar .close-button-wrapper{width:244px}#faxAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#faxAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#faxAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#faxAccounts #add-faxAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#faxAccounts #upload-faxAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.faxQueue-dialog{max-width:720px;width:720px}md-dialog.faxQueue-dialog md-dialog-content{display:block;position:relative}md-dialog.faxQueue-dialog md-toolbar .title{font-size:17px}md-dialog.faxQueue-dialog md-input-container textarea{min-height:150px}md-dialog.faxQueue-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.faxQueue-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.faxQueue-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxQueue-dialog .error-list{font-size:13px}md-dialog.faxQueue-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxQueue-dialog .error-list .error .message{font-weight:500}md-dialog.faxQueue-dialog .error-list .error .md-button{margin:0}md-dialog.faxQueue-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxQueue-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#fax-faxQueue .header{height:76px;min-height:76px;max-height:76px}#fax-faxQueue .header .goto-faxQueues-button{margin-right:16px}#fax-faxQueue .header .faxQueue-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#fax-faxQueue .header .faxQueue-image img{height:100%;width:auto;max-width:none}#fax-faxQueue .header .subtitle{margin:6px 0 0 0}#fax-faxQueue .faxQueue-detail-form-container{padding:24px;margin-bottom:24px}#fax-faxQueue .faxQueue-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#fax-faxQueue .faxQueue-detail-form-container .handle{cursor:move}#fax-faxQueue .faxQueue-detail-form-container md-input-container md-switch{margin:0!important}#fax-faxQueue .faxQueue-detail-form-container #faxQueue-image-uploader{position:relative}#fax-faxQueue .faxQueue-detail-form-container #faxQueue-image-uploader.dropping .drop-text{display:flex}#fax-faxQueue .faxQueue-detail-form-container #faxQueue-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#fax-faxQueue .faxQueue-detail-form-container #faxQueue-image-uploader .upload-button{margin-bottom:16px}#fax-faxQueue .faxQueue-detail-form-container #faxQueue-image-uploader .faxQueue-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#fax-faxQueue .faxQueue-detail-form-container #faxQueue-image-uploader .faxQueue-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#fax-faxQueue .faxQueue-detail-form-container #faxQueue-image-uploader .faxQueue-image .media{max-height:100%}#fax-faxQueue md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#fax-faxQueue md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#fax-faxQueue md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#fax-faxQueue md-table-container.font-size-12 td.md-cell{font-size:12px!important}#faxQueues{position:relative}#faxQueues>.header{height:76px;min-height:76px;max-height:76px}#faxQueues>.header .logo .logo-icon{margin:0 16px 0 0}#faxQueues>.header .logo .logo-text{font-size:24px}#faxQueues>.header md-icon{color:#fff}#faxQueues>.header .search-input-wrapper{position:relative}#faxQueues>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#faxQueues>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#faxQueues>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#faxQueues>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#faxQueues>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#faxQueues>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#faxQueues>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#faxQueues>.header.selected-bar .close-button-wrapper{width:244px}#faxQueues>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#faxQueues>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#faxQueues>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#faxQueues #add-faxQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#faxQueues #upload-faxQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#realtime>.content .blink{animation:blinker 2s linear infinite}#realtime>.content .avatar-wrapper{position:relative}#realtime>.content .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .search-input-wrapper{position:relative;margin-left:20px}#realtime>.content .search-input-wrapper label{padding:6px;cursor:pointer}#realtime>.content .search-input-wrapper md-input-container{padding-top:20px}#realtime>.content .main .labels{padding:8px 16px}#realtime>.content .main .labels .label{margin:0 0 2px 4px;padding:2px 5px;font-size:11px;white-space:nowrap;border-radius:2px}#realtime>.content .main .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .main .avatar-wrapper{position:relative}#realtime>.content .main .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .custom-column{padding:0 24px!important}@keyframes blinker{50%{opacity:0}}#profile .about-tab{max-width:1200px}#profile .about-tab .about{padding:8px}#profile .about-tab .about .general .location md-icon{line-height:13px!important}#profile .about-tab .about .work .job .company{padding:0 16px 0 0;font-weight:500}#profile .about-tab .about .work .job .date{color:rgba(0,0,0,.54)}#profile .about-tab .about-sidebar{padding:8px 8px 8px 32px}#profile .about-tab .about-sidebar .friends .content .friend{padding:4px}#profile .about-tab .about-sidebar .groups .content .group{margin-bottom:16px}#profile .about-tab .about-sidebar .groups .content .group:last-child{margin-bottom:0}#profile .about-tab .about-sidebar .groups .content .group .logo{border:1px solid rgba(0,0,0,.12);margin-right:16px}#profile .about-tab .about-sidebar .groups .content .group .name{font-weight:500;font-size:15px}#profile .about-tab .about-sidebar .groups .content .group .category,#profile .about-tab .about-sidebar .groups .content .group .members{color:rgba(0,0,0,.54)}#profile .about-tab .about-sidebar .groups .content .group .members{margin-top:16px}@media screen and (max-width:960px){#profile .about-tab .about-sidebar{padding:8px}}#maintenance{height:100%;background:url(/assets/images/backgrounds/tech.png) no-repeat;background-size:cover}#maintenance #maintenance-form-wrapper{flex:1 0 auto;padding:32px}#maintenance #maintenance-form-wrapper #maintenance-form{max-width:384px;padding:32px;background:#fff;text-align:center}#maintenance #maintenance-form-wrapper #maintenance-form .logo{width:128px;height:128px;line-height:128px;font-size:86px;font-weight:500;margin:32px auto;color:#fff;border-radius:2px}#maintenance #maintenance-form-wrapper #maintenance-form .title{font-size:17px;margin-top:16px}#maintenance #maintenance-form-wrapper #maintenance-form .subtitle{margin:16px 0;max-width:300px;color:rgba(0,0,0,.54);font-size:15px}@media screen and (max-width:600px){#maintenance #maintenance-form-wrapper{padding:16px}#maintenance #maintenance-form-wrapper #maintenance-form{padding:24px;width:100%}}md-dialog.deskAccount-dialog{max-width:720px;width:720px}md-dialog.deskAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.deskAccount-dialog md-toolbar .title{font-size:17px}md-dialog.deskAccount-dialog md-input-container textarea{min-height:150px}md-dialog.deskAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.deskAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.deskAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.deskAccount-dialog .error-list{font-size:13px}md-dialog.deskAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.deskAccount-dialog .error-list .error .message{font-weight:500}md-dialog.deskAccount-dialog .error-list .error .md-button{margin:0}md-dialog.deskAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.deskAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#deskAccounts{position:relative}#deskAccounts>.header{height:76px;min-height:76px;max-height:76px}#deskAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#deskAccounts>.header .logo .logo-text{font-size:24px}#deskAccounts>.header md-icon{color:#fff}#deskAccounts>.header .search-input-wrapper{position:relative}#deskAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#deskAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#deskAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#deskAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#deskAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#deskAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#deskAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#deskAccounts>.header.selected-bar .close-button-wrapper{width:244px}#deskAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#deskAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#deskAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#deskAccounts #add-deskAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#deskAccounts #upload-deskAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.deskConfiguration-dialog{max-width:720px;width:720px}md-dialog.deskConfiguration-dialog md-dialog-content{display:block;position:relative}md-dialog.deskConfiguration-dialog md-toolbar .title{font-size:17px}md-dialog.deskConfiguration-dialog md-input-container textarea{min-height:150px}md-dialog.deskConfiguration-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.deskConfiguration-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.deskConfiguration-dialog .date-container{padding:16px 0 24px 0}md-dialog.deskConfiguration-dialog .error-list{font-size:13px}md-dialog.deskConfiguration-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.deskConfiguration-dialog .error-list .error .message{font-weight:500}md-dialog.deskConfiguration-dialog .error-list .error .md-button{margin:0}md-dialog.deskConfiguration-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.deskConfiguration-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.deskAccount-item-dialog{max-width:720px;width:720px}md-dialog.deskAccount-item-dialog md-dialog-content{display:block;position:relative}md-dialog.deskAccount-item-dialog md-toolbar .title{font-size:17px}md-dialog.deskAccount-item-dialog md-input-container textarea{min-height:150px}md-dialog.deskAccount-item-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.deskAccount-item-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.deskAccount-item-dialog .date-container{padding:16px 0 24px 0}md-dialog.deskAccount-item-dialog .error-list{font-size:13px}md-dialog.deskAccount-item-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.deskAccount-item-dialog .error-list .error .message{font-weight:500}md-dialog.deskAccount-item-dialog .error-list .error .md-button{margin:0}md-dialog.deskAccount-item-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.deskAccount-item-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#integrations-deskAccount .header{height:76px;min-height:76px;max-height:76px}#integrations-deskAccount .header .goto-deskAccounts-button{margin-right:16px}#integrations-deskAccount .header .deskAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#integrations-deskAccount .header .deskAccount-image img{height:100%;width:auto;max-width:none}#integrations-deskAccount .header .subtitle{margin:6px 0 0 0}#integrations-deskAccount .deskAccount-detail-form-container{padding:24px;margin-bottom:24px}#integrations-deskAccount .deskAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#integrations-deskAccount .deskAccount-detail-form-container .handle{cursor:move}#integrations-deskAccount .deskAccount-detail-form-container md-input-container md-switch{margin:0!important}#integrations-deskAccount .deskAccount-detail-form-container #deskAccount-image-uploader{position:relative}#integrations-deskAccount .deskAccount-detail-form-container #deskAccount-image-uploader.dropping .drop-text{display:flex}#integrations-deskAccount .deskAccount-detail-form-container #deskAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#integrations-deskAccount .deskAccount-detail-form-container #deskAccount-image-uploader .upload-button{margin-bottom:16px}#integrations-deskAccount .deskAccount-detail-form-container #deskAccount-image-uploader .deskAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#integrations-deskAccount .deskAccount-detail-form-container #deskAccount-image-uploader .deskAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#integrations-deskAccount .deskAccount-detail-form-container #deskAccount-image-uploader .deskAccount-image .media{max-height:100%}#integrations-deskAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#integrations-deskAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#integrations-deskAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#integrations-deskAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}md-dialog.dynamics365Account-dialog{max-width:720px;width:720px}md-dialog.dynamics365Account-dialog md-dialog-content{display:block;position:relative}md-dialog.dynamics365Account-dialog md-toolbar .title{font-size:17px}md-dialog.dynamics365Account-dialog md-input-container textarea{min-height:150px}md-dialog.dynamics365Account-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.dynamics365Account-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.dynamics365Account-dialog .date-container{padding:16px 0 24px 0}md-dialog.dynamics365Account-dialog .error-list{font-size:13px}md-dialog.dynamics365Account-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.dynamics365Account-dialog .error-list .error .message{font-weight:500}md-dialog.dynamics365Account-dialog .error-list .error .md-button{margin:0}md-dialog.dynamics365Account-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.dynamics365Account-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#dynamics365Accounts{position:relative}#dynamics365Accounts>.header{height:76px;min-height:76px;max-height:76px}#dynamics365Accounts>.header .logo .logo-icon{margin:0 16px 0 0}#dynamics365Accounts>.header .logo .logo-text{font-size:24px}#dynamics365Accounts>.header md-icon{color:#fff}#dynamics365Accounts>.header .search-input-wrapper{position:relative}#dynamics365Accounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#dynamics365Accounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#dynamics365Accounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#dynamics365Accounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#dynamics365Accounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#dynamics365Accounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#dynamics365Accounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#dynamics365Accounts>.header.selected-bar .close-button-wrapper{width:244px}#dynamics365Accounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#dynamics365Accounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#dynamics365Accounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#dynamics365Accounts #add-dynamics365Account-button{position:fixed;bottom:8px;right:8px;padding:0}#dynamics365Accounts #upload-dynamics365Account-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.dynamics365Configuration-dialog{max-width:720px;width:720px}md-dialog.dynamics365Configuration-dialog md-dialog-content{display:block;position:relative}md-dialog.dynamics365Configuration-dialog md-toolbar .title{font-size:17px}md-dialog.dynamics365Configuration-dialog md-input-container textarea{min-height:150px}md-dialog.dynamics365Configuration-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.dynamics365Configuration-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.dynamics365Configuration-dialog .date-container{padding:16px 0 24px 0}md-dialog.dynamics365Configuration-dialog .error-list{font-size:13px}md-dialog.dynamics365Configuration-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.dynamics365Configuration-dialog .error-list .error .message{font-weight:500}md-dialog.dynamics365Configuration-dialog .error-list .error .md-button{margin:0}md-dialog.dynamics365Configuration-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.dynamics365Configuration-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.dynamics365Account-item-dialog{max-width:720px;width:720px}md-dialog.dynamics365Account-item-dialog md-dialog-content{display:block;position:relative}md-dialog.dynamics365Account-item-dialog md-toolbar .title{font-size:17px}md-dialog.dynamics365Account-item-dialog md-input-container textarea{min-height:150px}md-dialog.dynamics365Account-item-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.dynamics365Account-item-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.dynamics365Account-item-dialog .date-container{padding:16px 0 24px 0}md-dialog.dynamics365Account-item-dialog .error-list{font-size:13px}md-dialog.dynamics365Account-item-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.dynamics365Account-item-dialog .error-list .error .message{font-weight:500}md-dialog.dynamics365Account-item-dialog .error-list .error .md-button{margin:0}md-dialog.dynamics365Account-item-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.dynamics365Account-item-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#integrations-dynamics365Account .header{height:76px;min-height:76px;max-height:76px}#integrations-dynamics365Account .header .goto-dynamics365Accounts-button{margin-right:16px}#integrations-dynamics365Account .header .dynamics365Account-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#integrations-dynamics365Account .header .dynamics365Account-image img{height:100%;width:auto;max-width:none}#integrations-dynamics365Account .header .subtitle{margin:6px 0 0 0}#integrations-dynamics365Account .dynamics365Account-detail-form-container{padding:24px;margin-bottom:24px}#integrations-dynamics365Account .dynamics365Account-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#integrations-dynamics365Account .dynamics365Account-detail-form-container .handle{cursor:move}#integrations-dynamics365Account .dynamics365Account-detail-form-container md-input-container md-switch{margin:0!important}#integrations-dynamics365Account .dynamics365Account-detail-form-container #dynamics365Account-image-uploader{position:relative}#integrations-dynamics365Account .dynamics365Account-detail-form-container #dynamics365Account-image-uploader.dropping .drop-text{display:flex}#integrations-dynamics365Account .dynamics365Account-detail-form-container #dynamics365Account-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#integrations-dynamics365Account .dynamics365Account-detail-form-container #dynamics365Account-image-uploader .upload-button{margin-bottom:16px}#integrations-dynamics365Account .dynamics365Account-detail-form-container #dynamics365Account-image-uploader .dynamics365Account-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#integrations-dynamics365Account .dynamics365Account-detail-form-container #dynamics365Account-image-uploader .dynamics365Account-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#integrations-dynamics365Account .dynamics365Account-detail-form-container #dynamics365Account-image-uploader .dynamics365Account-image .media{max-height:100%}#integrations-dynamics365Account md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#integrations-dynamics365Account md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#integrations-dynamics365Account md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#integrations-dynamics365Account md-table-container.font-size-12 td.md-cell{font-size:12px!important}md-dialog.freshdeskAccount-dialog{max-width:720px;width:720px}md-dialog.freshdeskAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.freshdeskAccount-dialog md-toolbar .title{font-size:17px}md-dialog.freshdeskAccount-dialog md-input-container textarea{min-height:150px}md-dialog.freshdeskAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.freshdeskAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.freshdeskAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.freshdeskAccount-dialog .error-list{font-size:13px}md-dialog.freshdeskAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.freshdeskAccount-dialog .error-list .error .message{font-weight:500}md-dialog.freshdeskAccount-dialog .error-list .error .md-button{margin:0}md-dialog.freshdeskAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.freshdeskAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.freshdeskConfiguration-dialog{max-width:720px;width:720px}md-dialog.freshdeskConfiguration-dialog md-dialog-content{display:block;position:relative}md-dialog.freshdeskConfiguration-dialog md-toolbar .title{font-size:17px}md-dialog.freshdeskConfiguration-dialog md-input-container textarea{min-height:150px}md-dialog.freshdeskConfiguration-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.freshdeskConfiguration-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.freshdeskConfiguration-dialog .date-container{padding:16px 0 24px 0}md-dialog.freshdeskConfiguration-dialog .error-list{font-size:13px}md-dialog.freshdeskConfiguration-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.freshdeskConfiguration-dialog .error-list .error .message{font-weight:500}md-dialog.freshdeskConfiguration-dialog .error-list .error .md-button{margin:0}md-dialog.freshdeskConfiguration-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.freshdeskConfiguration-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.freshdeskAccount-item-dialog{max-width:720px;width:720px}md-dialog.freshdeskAccount-item-dialog md-dialog-content{display:block;position:relative}md-dialog.freshdeskAccount-item-dialog md-toolbar .title{font-size:17px}md-dialog.freshdeskAccount-item-dialog md-input-container textarea{min-height:150px}md-dialog.freshdeskAccount-item-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.freshdeskAccount-item-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.freshdeskAccount-item-dialog .date-container{padding:16px 0 24px 0}md-dialog.freshdeskAccount-item-dialog .error-list{font-size:13px}md-dialog.freshdeskAccount-item-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.freshdeskAccount-item-dialog .error-list .error .message{font-weight:500}md-dialog.freshdeskAccount-item-dialog .error-list .error .md-button{margin:0}md-dialog.freshdeskAccount-item-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.freshdeskAccount-item-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#integrations-freshdeskAccount .header{height:76px;min-height:76px;max-height:76px}#integrations-freshdeskAccount .header .goto-freshdeskAccounts-button{margin-right:16px}#integrations-freshdeskAccount .header .freshdeskAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#integrations-freshdeskAccount .header .freshdeskAccount-image img{height:100%;width:auto;max-width:none}#integrations-freshdeskAccount .header .subtitle{margin:6px 0 0 0}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container{padding:24px;margin-bottom:24px}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container .handle{cursor:move}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container md-input-container md-switch{margin:0!important}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container #freshdeskAccount-image-uploader{position:relative}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container #freshdeskAccount-image-uploader.dropping .drop-text{display:flex}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container #freshdeskAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container #freshdeskAccount-image-uploader .upload-button{margin-bottom:16px}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container #freshdeskAccount-image-uploader .freshdeskAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container #freshdeskAccount-image-uploader .freshdeskAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container #freshdeskAccount-image-uploader .freshdeskAccount-image .media{max-height:100%}#integrations-freshdeskAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#integrations-freshdeskAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#integrations-freshdeskAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#integrations-freshdeskAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}#freshdeskAccounts{position:relative}#freshdeskAccounts>.header{height:76px;min-height:76px;max-height:76px}#freshdeskAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#freshdeskAccounts>.header .logo .logo-text{font-size:24px}#freshdeskAccounts>.header md-icon{color:#fff}#freshdeskAccounts>.header .search-input-wrapper{position:relative}#freshdeskAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#freshdeskAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#freshdeskAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#freshdeskAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#freshdeskAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#freshdeskAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#freshdeskAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#freshdeskAccounts>.header.selected-bar .close-button-wrapper{width:244px}#freshdeskAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#freshdeskAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#freshdeskAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#freshdeskAccounts #add-freshdeskAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#freshdeskAccounts #upload-freshdeskAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.freshsalesAccount-dialog{max-width:720px;width:720px}md-dialog.freshsalesAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.freshsalesAccount-dialog md-toolbar .title{font-size:17px}md-dialog.freshsalesAccount-dialog md-input-container textarea{min-height:150px}md-dialog.freshsalesAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.freshsalesAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.freshsalesAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.freshsalesAccount-dialog .error-list{font-size:13px}md-dialog.freshsalesAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.freshsalesAccount-dialog .error-list .error .message{font-weight:500}md-dialog.freshsalesAccount-dialog .error-list .error .md-button{margin:0}md-dialog.freshsalesAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.freshsalesAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.freshsalesConfiguration-dialog{max-width:720px;width:720px}md-dialog.freshsalesConfiguration-dialog md-dialog-content{display:block;position:relative}md-dialog.freshsalesConfiguration-dialog md-toolbar .title{font-size:17px}md-dialog.freshsalesConfiguration-dialog md-input-container textarea{min-height:150px}md-dialog.freshsalesConfiguration-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.freshsalesConfiguration-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.freshsalesConfiguration-dialog .date-container{padding:16px 0 24px 0}md-dialog.freshsalesConfiguration-dialog .error-list{font-size:13px}md-dialog.freshsalesConfiguration-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.freshsalesConfiguration-dialog .error-list .error .message{font-weight:500}md-dialog.freshsalesConfiguration-dialog .error-list .error .md-button{margin:0}md-dialog.freshsalesConfiguration-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.freshsalesConfiguration-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.freshsalesAccount-item-dialog{max-width:720px;width:720px}md-dialog.freshsalesAccount-item-dialog md-dialog-content{display:block;position:relative}md-dialog.freshsalesAccount-item-dialog md-toolbar .title{font-size:17px}md-dialog.freshsalesAccount-item-dialog md-input-container textarea{min-height:150px}md-dialog.freshsalesAccount-item-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.freshsalesAccount-item-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.freshsalesAccount-item-dialog .date-container{padding:16px 0 24px 0}md-dialog.freshsalesAccount-item-dialog .error-list{font-size:13px}md-dialog.freshsalesAccount-item-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.freshsalesAccount-item-dialog .error-list .error .message{font-weight:500}md-dialog.freshsalesAccount-item-dialog .error-list .error .md-button{margin:0}md-dialog.freshsalesAccount-item-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.freshsalesAccount-item-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#integrations-freshsalesAccount .header{height:76px;min-height:76px;max-height:76px}#integrations-freshsalesAccount .header .goto-freshsalesAccounts-button{margin-right:16px}#integrations-freshsalesAccount .header .freshsalesAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#integrations-freshsalesAccount .header .freshsalesAccount-image img{height:100%;width:auto;max-width:none}#integrations-freshsalesAccount .header .subtitle{margin:6px 0 0 0}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container{padding:24px;margin-bottom:24px}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container .handle{cursor:move}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container md-input-container md-switch{margin:0!important}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container #freshsalesAccount-image-uploader{position:relative}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container #freshsalesAccount-image-uploader.dropping .drop-text{display:flex}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container #freshsalesAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container #freshsalesAccount-image-uploader .upload-button{margin-bottom:16px}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container #freshsalesAccount-image-uploader .freshsalesAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container #freshsalesAccount-image-uploader .freshsalesAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container #freshsalesAccount-image-uploader .freshsalesAccount-image .media{max-height:100%}#integrations-freshsalesAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#integrations-freshsalesAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#integrations-freshsalesAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#integrations-freshsalesAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}#freshsalesAccounts{position:relative}#freshsalesAccounts>.header{height:76px;min-height:76px;max-height:76px}#freshsalesAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#freshsalesAccounts>.header .logo .logo-text{font-size:24px}#freshsalesAccounts>.header md-icon{color:#fff}#freshsalesAccounts>.header .search-input-wrapper{position:relative}#freshsalesAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#freshsalesAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#freshsalesAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#freshsalesAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#freshsalesAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#freshsalesAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#freshsalesAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#freshsalesAccounts>.header.selected-bar .close-button-wrapper{width:244px}#freshsalesAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#freshsalesAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#freshsalesAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#freshsalesAccounts #add-freshsalesAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#freshsalesAccounts #upload-freshsalesAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.salesforceAccount-dialog{max-width:720px;width:720px}md-dialog.salesforceAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.salesforceAccount-dialog md-toolbar .title{font-size:17px}md-dialog.salesforceAccount-dialog md-input-container textarea{min-height:150px}md-dialog.salesforceAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.salesforceAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.salesforceAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.salesforceAccount-dialog .error-list{font-size:13px}md-dialog.salesforceAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.salesforceAccount-dialog .error-list .error .message{font-weight:500}md-dialog.salesforceAccount-dialog .error-list .error .md-button{margin:0}md-dialog.salesforceAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.salesforceAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.salesforceConfiguration-dialog{max-width:720px;width:720px}md-dialog.salesforceConfiguration-dialog md-dialog-content{display:block;position:relative}md-dialog.salesforceConfiguration-dialog md-toolbar .title{font-size:17px}md-dialog.salesforceConfiguration-dialog md-input-container textarea{min-height:150px}md-dialog.salesforceConfiguration-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.salesforceConfiguration-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.salesforceConfiguration-dialog .date-container{padding:16px 0 24px 0}md-dialog.salesforceConfiguration-dialog .error-list{font-size:13px}md-dialog.salesforceConfiguration-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.salesforceConfiguration-dialog .error-list .error .message{font-weight:500}md-dialog.salesforceConfiguration-dialog .error-list .error .md-button{margin:0}md-dialog.salesforceConfiguration-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.salesforceConfiguration-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.salesforceAccount-item-dialog{max-width:720px;width:720px}md-dialog.salesforceAccount-item-dialog md-dialog-content{display:block;position:relative}md-dialog.salesforceAccount-item-dialog md-toolbar .title{font-size:17px}md-dialog.salesforceAccount-item-dialog md-input-container textarea{min-height:150px}md-dialog.salesforceAccount-item-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.salesforceAccount-item-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.salesforceAccount-item-dialog .date-container{padding:16px 0 24px 0}md-dialog.salesforceAccount-item-dialog .error-list{font-size:13px}md-dialog.salesforceAccount-item-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.salesforceAccount-item-dialog .error-list .error .message{font-weight:500}md-dialog.salesforceAccount-item-dialog .error-list .error .md-button{margin:0}md-dialog.salesforceAccount-item-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.salesforceAccount-item-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#integrations-salesforceAccount .header{height:76px;min-height:76px;max-height:76px}#integrations-salesforceAccount .header .goto-salesforceAccounts-button{margin-right:16px}#integrations-salesforceAccount .header .salesforceAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#integrations-salesforceAccount .header .salesforceAccount-image img{height:100%;width:auto;max-width:none}#integrations-salesforceAccount .header .subtitle{margin:6px 0 0 0}#integrations-salesforceAccount .salesforceAccount-detail-form-container{padding:24px;margin-bottom:24px}#integrations-salesforceAccount .salesforceAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#integrations-salesforceAccount .salesforceAccount-detail-form-container .handle{cursor:move}#integrations-salesforceAccount .salesforceAccount-detail-form-container md-input-container md-switch{margin:0!important}#integrations-salesforceAccount .salesforceAccount-detail-form-container #salesforceAccount-image-uploader{position:relative}#integrations-salesforceAccount .salesforceAccount-detail-form-container #salesforceAccount-image-uploader.dropping .drop-text{display:flex}#integrations-salesforceAccount .salesforceAccount-detail-form-container #salesforceAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#integrations-salesforceAccount .salesforceAccount-detail-form-container #salesforceAccount-image-uploader .upload-button{margin-bottom:16px}#integrations-salesforceAccount .salesforceAccount-detail-form-container #salesforceAccount-image-uploader .salesforceAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#integrations-salesforceAccount .salesforceAccount-detail-form-container #salesforceAccount-image-uploader .salesforceAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#integrations-salesforceAccount .salesforceAccount-detail-form-container #salesforceAccount-image-uploader .salesforceAccount-image .media{max-height:100%}#integrations-salesforceAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#integrations-salesforceAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#integrations-salesforceAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#integrations-salesforceAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}#salesforceAccounts{position:relative}#salesforceAccounts>.header{height:76px;min-height:76px;max-height:76px}#salesforceAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#salesforceAccounts>.header .logo .logo-text{font-size:24px}#salesforceAccounts>.header md-icon{color:#fff}#salesforceAccounts>.header .search-input-wrapper{position:relative}#salesforceAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#salesforceAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#salesforceAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#salesforceAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#salesforceAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#salesforceAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#salesforceAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#salesforceAccounts>.header.selected-bar .close-button-wrapper{width:244px}#salesforceAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#salesforceAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#salesforceAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#salesforceAccounts #add-salesforceAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#salesforceAccounts #upload-salesforceAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.servicenowAccount-dialog{max-width:720px;width:720px}md-dialog.servicenowAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.servicenowAccount-dialog md-toolbar .title{font-size:17px}md-dialog.servicenowAccount-dialog md-input-container textarea{min-height:150px}md-dialog.servicenowAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.servicenowAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.servicenowAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.servicenowAccount-dialog .error-list{font-size:13px}md-dialog.servicenowAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.servicenowAccount-dialog .error-list .error .message{font-weight:500}md-dialog.servicenowAccount-dialog .error-list .error .md-button{margin:0}md-dialog.servicenowAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.servicenowAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.servicenowConfiguration-dialog{max-width:720px;width:720px}md-dialog.servicenowConfiguration-dialog md-dialog-content{display:block;position:relative}md-dialog.servicenowConfiguration-dialog md-toolbar .title{font-size:17px}md-dialog.servicenowConfiguration-dialog md-input-container textarea{min-height:150px}md-dialog.servicenowConfiguration-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.servicenowConfiguration-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.servicenowConfiguration-dialog .date-container{padding:16px 0 24px 0}md-dialog.servicenowConfiguration-dialog .error-list{font-size:13px}md-dialog.servicenowConfiguration-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.servicenowConfiguration-dialog .error-list .error .message{font-weight:500}md-dialog.servicenowConfiguration-dialog .error-list .error .md-button{margin:0}md-dialog.servicenowConfiguration-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.servicenowConfiguration-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.servicenowAccount-item-dialog{max-width:720px;width:720px}md-dialog.servicenowAccount-item-dialog md-dialog-content{display:block;position:relative}md-dialog.servicenowAccount-item-dialog md-toolbar .title{font-size:17px}md-dialog.servicenowAccount-item-dialog md-input-container textarea{min-height:150px}md-dialog.servicenowAccount-item-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.servicenowAccount-item-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.servicenowAccount-item-dialog .date-container{padding:16px 0 24px 0}md-dialog.servicenowAccount-item-dialog .error-list{font-size:13px}md-dialog.servicenowAccount-item-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.servicenowAccount-item-dialog .error-list .error .message{font-weight:500}md-dialog.servicenowAccount-item-dialog .error-list .error .md-button{margin:0}md-dialog.servicenowAccount-item-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.servicenowAccount-item-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#integrations-servicenowAccount .header{height:76px;min-height:76px;max-height:76px}#integrations-servicenowAccount .header .goto-servicenowAccounts-button{margin-right:16px}#integrations-servicenowAccount .header .servicenowAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#integrations-servicenowAccount .header .servicenowAccount-image img{height:100%;width:auto;max-width:none}#integrations-servicenowAccount .header .subtitle{margin:6px 0 0 0}#integrations-servicenowAccount .servicenowAccount-detail-form-container{padding:24px;margin-bottom:24px}#integrations-servicenowAccount .servicenowAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#integrations-servicenowAccount .servicenowAccount-detail-form-container .handle{cursor:move}#integrations-servicenowAccount .servicenowAccount-detail-form-container md-input-container md-switch{margin:0!important}#integrations-servicenowAccount .servicenowAccount-detail-form-container #servicenowAccount-image-uploader{position:relative}#integrations-servicenowAccount .servicenowAccount-detail-form-container #servicenowAccount-image-uploader.dropping .drop-text{display:flex}#integrations-servicenowAccount .servicenowAccount-detail-form-container #servicenowAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#integrations-servicenowAccount .servicenowAccount-detail-form-container #servicenowAccount-image-uploader .upload-button{margin-bottom:16px}#integrations-servicenowAccount .servicenowAccount-detail-form-container #servicenowAccount-image-uploader .servicenowAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#integrations-servicenowAccount .servicenowAccount-detail-form-container #servicenowAccount-image-uploader .servicenowAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#integrations-servicenowAccount .servicenowAccount-detail-form-container #servicenowAccount-image-uploader .servicenowAccount-image .media{max-height:100%}#integrations-servicenowAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#integrations-servicenowAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#integrations-servicenowAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#integrations-servicenowAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}#servicenowAccounts{position:relative}#servicenowAccounts>.header{height:76px;min-height:76px;max-height:76px}#servicenowAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#servicenowAccounts>.header .logo .logo-text{font-size:24px}#servicenowAccounts>.header md-icon{color:#fff}#servicenowAccounts>.header .search-input-wrapper{position:relative}#servicenowAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#servicenowAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#servicenowAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#servicenowAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#servicenowAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#servicenowAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#servicenowAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#servicenowAccounts>.header.selected-bar .close-button-wrapper{width:244px}#servicenowAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#servicenowAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#servicenowAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#servicenowAccounts #add-servicenowAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#servicenowAccounts #upload-servicenowAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.sugarcrmAccount-dialog{max-width:720px;width:720px}md-dialog.sugarcrmAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.sugarcrmAccount-dialog md-toolbar .title{font-size:17px}md-dialog.sugarcrmAccount-dialog md-input-container textarea{min-height:150px}md-dialog.sugarcrmAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.sugarcrmAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.sugarcrmAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.sugarcrmAccount-dialog .error-list{font-size:13px}md-dialog.sugarcrmAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.sugarcrmAccount-dialog .error-list .error .message{font-weight:500}md-dialog.sugarcrmAccount-dialog .error-list .error .md-button{margin:0}md-dialog.sugarcrmAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.sugarcrmAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.sugarcrmConfiguration-dialog{max-width:720px;width:720px}md-dialog.sugarcrmConfiguration-dialog md-dialog-content{display:block;position:relative}md-dialog.sugarcrmConfiguration-dialog md-toolbar .title{font-size:17px}md-dialog.sugarcrmConfiguration-dialog md-input-container textarea{min-height:150px}md-dialog.sugarcrmConfiguration-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.sugarcrmConfiguration-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.sugarcrmConfiguration-dialog .date-container{padding:16px 0 24px 0}md-dialog.sugarcrmConfiguration-dialog .error-list{font-size:13px}md-dialog.sugarcrmConfiguration-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.sugarcrmConfiguration-dialog .error-list .error .message{font-weight:500}md-dialog.sugarcrmConfiguration-dialog .error-list .error .md-button{margin:0}md-dialog.sugarcrmConfiguration-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.sugarcrmConfiguration-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.sugarcrmAccount-item-dialog{max-width:720px;width:720px}md-dialog.sugarcrmAccount-item-dialog md-dialog-content{display:block;position:relative}md-dialog.sugarcrmAccount-item-dialog md-toolbar .title{font-size:17px}md-dialog.sugarcrmAccount-item-dialog md-input-container textarea{min-height:150px}md-dialog.sugarcrmAccount-item-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.sugarcrmAccount-item-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.sugarcrmAccount-item-dialog .date-container{padding:16px 0 24px 0}md-dialog.sugarcrmAccount-item-dialog .error-list{font-size:13px}md-dialog.sugarcrmAccount-item-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.sugarcrmAccount-item-dialog .error-list .error .message{font-weight:500}md-dialog.sugarcrmAccount-item-dialog .error-list .error .md-button{margin:0}md-dialog.sugarcrmAccount-item-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.sugarcrmAccount-item-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#integrations-sugarcrmAccount .header{height:76px;min-height:76px;max-height:76px}#integrations-sugarcrmAccount .header .goto-sugarcrmAccounts-button{margin-right:16px}#integrations-sugarcrmAccount .header .sugarcrmAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#integrations-sugarcrmAccount .header .sugarcrmAccount-image img{height:100%;width:auto;max-width:none}#integrations-sugarcrmAccount .header .subtitle{margin:6px 0 0 0}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container{padding:24px;margin-bottom:24px}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container .handle{cursor:move}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container md-input-container md-switch{margin:0!important}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container #sugarcrmAccount-image-uploader{position:relative}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container #sugarcrmAccount-image-uploader.dropping .drop-text{display:flex}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container #sugarcrmAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container #sugarcrmAccount-image-uploader .upload-button{margin-bottom:16px}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container #sugarcrmAccount-image-uploader .sugarcrmAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container #sugarcrmAccount-image-uploader .sugarcrmAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container #sugarcrmAccount-image-uploader .sugarcrmAccount-image .media{max-height:100%}#integrations-sugarcrmAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#integrations-sugarcrmAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#integrations-sugarcrmAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#integrations-sugarcrmAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}#sugarcrmAccounts{position:relative}#sugarcrmAccounts>.header{height:76px;min-height:76px;max-height:76px}#sugarcrmAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#sugarcrmAccounts>.header .logo .logo-text{font-size:24px}#sugarcrmAccounts>.header md-icon{color:#fff}#sugarcrmAccounts>.header .search-input-wrapper{position:relative}#sugarcrmAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#sugarcrmAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#sugarcrmAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#sugarcrmAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#sugarcrmAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#sugarcrmAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#sugarcrmAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#sugarcrmAccounts>.header.selected-bar .close-button-wrapper{width:244px}#sugarcrmAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#sugarcrmAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#sugarcrmAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#sugarcrmAccounts #add-sugarcrmAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#sugarcrmAccounts #upload-sugarcrmAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.vtigerAccount-dialog{max-width:720px;width:720px}md-dialog.vtigerAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.vtigerAccount-dialog md-toolbar .title{font-size:17px}md-dialog.vtigerAccount-dialog md-input-container textarea{min-height:150px}md-dialog.vtigerAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.vtigerAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.vtigerAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.vtigerAccount-dialog .error-list{font-size:13px}md-dialog.vtigerAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.vtigerAccount-dialog .error-list .error .message{font-weight:500}md-dialog.vtigerAccount-dialog .error-list .error .md-button{margin:0}md-dialog.vtigerAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.vtigerAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.vtigerConfiguration-dialog{max-width:720px;width:720px}md-dialog.vtigerConfiguration-dialog md-dialog-content{display:block;position:relative}md-dialog.vtigerConfiguration-dialog md-toolbar .title{font-size:17px}md-dialog.vtigerConfiguration-dialog md-input-container textarea{min-height:150px}md-dialog.vtigerConfiguration-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.vtigerConfiguration-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.vtigerConfiguration-dialog .date-container{padding:16px 0 24px 0}md-dialog.vtigerConfiguration-dialog .error-list{font-size:13px}md-dialog.vtigerConfiguration-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.vtigerConfiguration-dialog .error-list .error .message{font-weight:500}md-dialog.vtigerConfiguration-dialog .error-list .error .md-button{margin:0}md-dialog.vtigerConfiguration-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.vtigerConfiguration-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.vtigerAccount-item-dialog{max-width:720px;width:720px}md-dialog.vtigerAccount-item-dialog md-dialog-content{display:block;position:relative}md-dialog.vtigerAccount-item-dialog md-toolbar .title{font-size:17px}md-dialog.vtigerAccount-item-dialog md-input-container textarea{min-height:150px}md-dialog.vtigerAccount-item-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.vtigerAccount-item-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.vtigerAccount-item-dialog .date-container{padding:16px 0 24px 0}md-dialog.vtigerAccount-item-dialog .error-list{font-size:13px}md-dialog.vtigerAccount-item-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.vtigerAccount-item-dialog .error-list .error .message{font-weight:500}md-dialog.vtigerAccount-item-dialog .error-list .error .md-button{margin:0}md-dialog.vtigerAccount-item-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.vtigerAccount-item-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#integrations-vtigerAccount .header{height:76px;min-height:76px;max-height:76px}#integrations-vtigerAccount .header .goto-vtigerAccounts-button{margin-right:16px}#integrations-vtigerAccount .header .vtigerAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#integrations-vtigerAccount .header .vtigerAccount-image img{height:100%;width:auto;max-width:none}#integrations-vtigerAccount .header .subtitle{margin:6px 0 0 0}#integrations-vtigerAccount .vtigerAccount-detail-form-container{padding:24px;margin-bottom:24px}#integrations-vtigerAccount .vtigerAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#integrations-vtigerAccount .vtigerAccount-detail-form-container .handle{cursor:move}#integrations-vtigerAccount .vtigerAccount-detail-form-container md-input-container md-switch{margin:0!important}#integrations-vtigerAccount .vtigerAccount-detail-form-container #vtigerAccount-image-uploader{position:relative}#integrations-vtigerAccount .vtigerAccount-detail-form-container #vtigerAccount-image-uploader.dropping .drop-text{display:flex}#integrations-vtigerAccount .vtigerAccount-detail-form-container #vtigerAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#integrations-vtigerAccount .vtigerAccount-detail-form-container #vtigerAccount-image-uploader .upload-button{margin-bottom:16px}#integrations-vtigerAccount .vtigerAccount-detail-form-container #vtigerAccount-image-uploader .vtigerAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#integrations-vtigerAccount .vtigerAccount-detail-form-container #vtigerAccount-image-uploader .vtigerAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#integrations-vtigerAccount .vtigerAccount-detail-form-container #vtigerAccount-image-uploader .vtigerAccount-image .media{max-height:100%}#integrations-vtigerAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#integrations-vtigerAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#integrations-vtigerAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#integrations-vtigerAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}#vtigerAccounts{position:relative}#vtigerAccounts>.header{height:76px;min-height:76px;max-height:76px}#vtigerAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#vtigerAccounts>.header .logo .logo-text{font-size:24px}#vtigerAccounts>.header md-icon{color:#fff}#vtigerAccounts>.header .search-input-wrapper{position:relative}#vtigerAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#vtigerAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#vtigerAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#vtigerAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#vtigerAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#vtigerAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#vtigerAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#vtigerAccounts>.header.selected-bar .close-button-wrapper{width:244px}#vtigerAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#vtigerAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#vtigerAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#vtigerAccounts #add-vtigerAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#vtigerAccounts #upload-vtigerAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.zendeskAccount-dialog{max-width:720px;width:720px}md-dialog.zendeskAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.zendeskAccount-dialog md-toolbar .title{font-size:17px}md-dialog.zendeskAccount-dialog md-input-container textarea{min-height:150px}md-dialog.zendeskAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.zendeskAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.zendeskAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.zendeskAccount-dialog .error-list{font-size:13px}md-dialog.zendeskAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.zendeskAccount-dialog .error-list .error .message{font-weight:500}md-dialog.zendeskAccount-dialog .error-list .error .md-button{margin:0}md-dialog.zendeskAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.zendeskAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.zendeskAccount-item-dialog{max-width:720px;width:720px}md-dialog.zendeskAccount-item-dialog md-dialog-content{display:block;position:relative}md-dialog.zendeskAccount-item-dialog md-toolbar .title{font-size:17px}md-dialog.zendeskAccount-item-dialog md-input-container textarea{min-height:150px}md-dialog.zendeskAccount-item-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.zendeskAccount-item-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.zendeskAccount-item-dialog .date-container{padding:16px 0 24px 0}md-dialog.zendeskAccount-item-dialog .error-list{font-size:13px}md-dialog.zendeskAccount-item-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.zendeskAccount-item-dialog .error-list .error .message{font-weight:500}md-dialog.zendeskAccount-item-dialog .error-list .error .md-button{margin:0}md-dialog.zendeskAccount-item-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.zendeskAccount-item-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#integrations-zendeskAccount .header{height:76px;min-height:76px;max-height:76px}#integrations-zendeskAccount .header .goto-zendeskAccounts-button{margin-right:16px}#integrations-zendeskAccount .header .zendeskAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#integrations-zendeskAccount .header .zendeskAccount-image img{height:100%;width:auto;max-width:none}#integrations-zendeskAccount .header .subtitle{margin:6px 0 0 0}#integrations-zendeskAccount .zendeskAccount-detail-form-container{padding:24px;margin-bottom:24px}#integrations-zendeskAccount .zendeskAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#integrations-zendeskAccount .zendeskAccount-detail-form-container .handle{cursor:move}#integrations-zendeskAccount .zendeskAccount-detail-form-container md-input-container md-switch{margin:0!important}#integrations-zendeskAccount .zendeskAccount-detail-form-container #zendeskAccount-image-uploader{position:relative}#integrations-zendeskAccount .zendeskAccount-detail-form-container #zendeskAccount-image-uploader.dropping .drop-text{display:flex}#integrations-zendeskAccount .zendeskAccount-detail-form-container #zendeskAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#integrations-zendeskAccount .zendeskAccount-detail-form-container #zendeskAccount-image-uploader .upload-button{margin-bottom:16px}#integrations-zendeskAccount .zendeskAccount-detail-form-container #zendeskAccount-image-uploader .zendeskAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#integrations-zendeskAccount .zendeskAccount-detail-form-container #zendeskAccount-image-uploader .zendeskAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#integrations-zendeskAccount .zendeskAccount-detail-form-container #zendeskAccount-image-uploader .zendeskAccount-image .media{max-height:100%}#integrations-zendeskAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#integrations-zendeskAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#integrations-zendeskAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#integrations-zendeskAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}md-dialog.zendeskConfiguration-dialog{max-width:720px;width:720px}md-dialog.zendeskConfiguration-dialog md-dialog-content{display:block;position:relative}md-dialog.zendeskConfiguration-dialog md-toolbar .title{font-size:17px}md-dialog.zendeskConfiguration-dialog md-input-container textarea{min-height:150px}md-dialog.zendeskConfiguration-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.zendeskConfiguration-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.zendeskConfiguration-dialog .date-container{padding:16px 0 24px 0}md-dialog.zendeskConfiguration-dialog .error-list{font-size:13px}md-dialog.zendeskConfiguration-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.zendeskConfiguration-dialog .error-list .error .message{font-weight:500}md-dialog.zendeskConfiguration-dialog .error-list .error .md-button{margin:0}md-dialog.zendeskConfiguration-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.zendeskConfiguration-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#zendeskAccounts{position:relative}#zendeskAccounts>.header{height:76px;min-height:76px;max-height:76px}#zendeskAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#zendeskAccounts>.header .logo .logo-text{font-size:24px}#zendeskAccounts>.header md-icon{color:#fff}#zendeskAccounts>.header .search-input-wrapper{position:relative}#zendeskAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#zendeskAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#zendeskAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#zendeskAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#zendeskAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#zendeskAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#zendeskAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#zendeskAccounts>.header.selected-bar .close-button-wrapper{width:244px}#zendeskAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#zendeskAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#zendeskAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#zendeskAccounts #add-zendeskAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#zendeskAccounts #upload-zendeskAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.zohoAccount-dialog{max-width:720px;width:720px}md-dialog.zohoAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.zohoAccount-dialog md-toolbar .title{font-size:17px}md-dialog.zohoAccount-dialog md-input-container textarea{min-height:150px}md-dialog.zohoAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.zohoAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.zohoAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.zohoAccount-dialog .error-list{font-size:13px}md-dialog.zohoAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.zohoAccount-dialog .error-list .error .message{font-weight:500}md-dialog.zohoAccount-dialog .error-list .error .md-button{margin:0}md-dialog.zohoAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.zohoAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.zohoConfiguration-dialog{max-width:720px;width:720px}md-dialog.zohoConfiguration-dialog md-dialog-content{display:block;position:relative}md-dialog.zohoConfiguration-dialog md-toolbar .title{font-size:17px}md-dialog.zohoConfiguration-dialog md-input-container textarea{min-height:150px}md-dialog.zohoConfiguration-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.zohoConfiguration-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.zohoConfiguration-dialog .date-container{padding:16px 0 24px 0}md-dialog.zohoConfiguration-dialog .error-list{font-size:13px}md-dialog.zohoConfiguration-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.zohoConfiguration-dialog .error-list .error .message{font-weight:500}md-dialog.zohoConfiguration-dialog .error-list .error .md-button{margin:0}md-dialog.zohoConfiguration-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.zohoConfiguration-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.zohoAccount-item-dialog{max-width:720px;width:720px}md-dialog.zohoAccount-item-dialog md-dialog-content{display:block;position:relative}md-dialog.zohoAccount-item-dialog md-toolbar .title{font-size:17px}md-dialog.zohoAccount-item-dialog md-input-container textarea{min-height:150px}md-dialog.zohoAccount-item-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.zohoAccount-item-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.zohoAccount-item-dialog .date-container{padding:16px 0 24px 0}md-dialog.zohoAccount-item-dialog .error-list{font-size:13px}md-dialog.zohoAccount-item-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.zohoAccount-item-dialog .error-list .error .message{font-weight:500}md-dialog.zohoAccount-item-dialog .error-list .error .md-button{margin:0}md-dialog.zohoAccount-item-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.zohoAccount-item-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#integrations-zohoAccount .header{height:76px;min-height:76px;max-height:76px}#integrations-zohoAccount .header .goto-zohoAccounts-button{margin-right:16px}#integrations-zohoAccount .header .zohoAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#integrations-zohoAccount .header .zohoAccount-image img{height:100%;width:auto;max-width:none}#integrations-zohoAccount .header .subtitle{margin:6px 0 0 0}#integrations-zohoAccount .zohoAccount-detail-form-container{padding:24px;margin-bottom:24px}#integrations-zohoAccount .zohoAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#integrations-zohoAccount .zohoAccount-detail-form-container .handle{cursor:move}#integrations-zohoAccount .zohoAccount-detail-form-container md-input-container md-switch{margin:0!important}#integrations-zohoAccount .zohoAccount-detail-form-container #zohoAccount-image-uploader{position:relative}#integrations-zohoAccount .zohoAccount-detail-form-container #zohoAccount-image-uploader.dropping .drop-text{display:flex}#integrations-zohoAccount .zohoAccount-detail-form-container #zohoAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#integrations-zohoAccount .zohoAccount-detail-form-container #zohoAccount-image-uploader .upload-button{margin-bottom:16px}#integrations-zohoAccount .zohoAccount-detail-form-container #zohoAccount-image-uploader .zohoAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#integrations-zohoAccount .zohoAccount-detail-form-container #zohoAccount-image-uploader .zohoAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#integrations-zohoAccount .zohoAccount-detail-form-container #zohoAccount-image-uploader .zohoAccount-image .media{max-height:100%}#integrations-zohoAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#integrations-zohoAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#integrations-zohoAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#integrations-zohoAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}#zohoAccounts{position:relative}#zohoAccounts>.header{height:76px;min-height:76px;max-height:76px}#zohoAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#zohoAccounts>.header .logo .logo-text{font-size:24px}#zohoAccounts>.header md-icon{color:#fff}#zohoAccounts>.header .search-input-wrapper{position:relative}#zohoAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#zohoAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#zohoAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#zohoAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#zohoAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#zohoAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#zohoAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#zohoAccounts>.header.selected-bar .close-button-wrapper{width:244px}#zohoAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#zohoAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#zohoAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#zohoAccounts #add-zohoAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#zohoAccounts #upload-zohoAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.project-dialog{max-width:720px;width:720px}md-dialog.project-dialog md-dialog-content{display:block;position:relative}md-dialog.project-dialog md-toolbar .title{font-size:17px}md-dialog.project-dialog md-input-container textarea{min-height:150px}md-dialog.project-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.project-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.project-dialog .date-container{padding:16px 0 24px 0}md-dialog.project-dialog .error-list{font-size:13px}md-dialog.project-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.project-dialog .error-list .error .message{font-weight:500}md-dialog.project-dialog .error-list .error .md-button{margin:0}md-dialog.project-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.project-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.session-dialog{max-width:720px;width:720px}md-dialog.session-dialog md-dialog-content{display:block;position:relative}md-dialog.session-dialog md-toolbar .title{font-size:17px}md-dialog.session-dialog md-input-container textarea{min-height:150px}md-dialog.session-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.session-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.session-dialog .date-container{padding:16px 0 24px 0}md-dialog.session-dialog .error-list{font-size:13px}md-dialog.session-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.session-dialog .error-list .error .message{font-weight:500}md-dialog.session-dialog .error-list .error .md-button{margin:0}md-dialog.session-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.session-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#jscripty-project .header{height:76px;min-height:76px;max-height:76px}#jscripty-project .header .goto-projects-button{margin-right:16px}#jscripty-project .header .project-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#jscripty-project .header .project-image img{height:100%;width:auto;max-width:none}#jscripty-project .header .subtitle{margin:6px 0 0 0}#jscripty-project .project-detail-form-container{padding:24px;margin-bottom:24px}#jscripty-project .project-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#jscripty-project .project-detail-form-container .handle{cursor:move}#jscripty-project .project-detail-form-container md-input-container md-switch{margin:0!important}#jscripty-project .project-detail-form-container #project-image-uploader{position:relative}#jscripty-project .project-detail-form-container #project-image-uploader.dropping .drop-text{display:flex}#jscripty-project .project-detail-form-container #project-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#jscripty-project .project-detail-form-container #project-image-uploader .upload-button{margin-bottom:16px}#jscripty-project .project-detail-form-container #project-image-uploader .project-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#jscripty-project .project-detail-form-container #project-image-uploader .project-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#jscripty-project .project-detail-form-container #project-image-uploader .project-image .media{max-height:100%}#jscripty-project md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#jscripty-project md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#jscripty-project md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#jscripty-project md-table-container.font-size-12 td.md-cell{font-size:12px!important}#projects{position:relative}#projects>.header{height:76px;min-height:76px;max-height:76px}#projects>.header .logo .logo-icon{margin:0 16px 0 0}#projects>.header .logo .logo-text{font-size:24px}#projects>.header md-icon{color:#fff}#projects>.header .search-input-wrapper{position:relative}#projects>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#projects>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#projects>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#projects>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#projects>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#projects>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#projects>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#projects>.header.selected-bar .close-button-wrapper{width:244px}#projects>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#projects>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#projects>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#projects #add-project-button{position:fixed;bottom:8px;right:8px;padding:0}#projects #upload-project-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.mailAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailCannedAnswer-dialog{max-width:720px;width:720px}md-dialog.mailCannedAnswer-dialog md-dialog-content{display:block;position:relative}md-dialog.mailCannedAnswer-dialog md-toolbar .title{font-size:17px}md-dialog.mailCannedAnswer-dialog md-input-container textarea{min-height:150px}md-dialog.mailCannedAnswer-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.mailCannedAnswer-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.mailCannedAnswer-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailCannedAnswer-dialog .error-list{font-size:13px}md-dialog.mailCannedAnswer-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailCannedAnswer-dialog .error-list .error .message{font-weight:500}md-dialog.mailCannedAnswer-dialog .error-list .error .md-button{margin:0}md-dialog.mailCannedAnswer-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailCannedAnswer-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#mail-mailAccount .header{height:76px;min-height:76px;max-height:76px}#mail-mailAccount .header .goto-mailAccounts-button{margin-right:16px}#mail-mailAccount .header .mailAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#mail-mailAccount .header .mailAccount-image img{height:100%;width:auto;max-width:none}#mail-mailAccount .header .subtitle{margin:6px 0 0 0}#mail-mailAccount .mailAccount-detail-form-container{padding:24px;margin-bottom:24px}#mail-mailAccount .mailAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#mail-mailAccount .mailAccount-detail-form-container .handle{cursor:move}#mail-mailAccount .mailAccount-detail-form-container md-input-container md-switch{margin:0!important}#mail-mailAccount .mailAccount-detail-form-container #mailAccount-image-uploader{position:relative}#mail-mailAccount .mailAccount-detail-form-container #mailAccount-image-uploader.dropping .drop-text{display:flex}#mail-mailAccount .mailAccount-detail-form-container #mailAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#mail-mailAccount .mailAccount-detail-form-container #mailAccount-image-uploader .upload-button{margin-bottom:16px}#mail-mailAccount .mailAccount-detail-form-container #mailAccount-image-uploader .mailAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#mail-mailAccount .mailAccount-detail-form-container #mailAccount-image-uploader .mailAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#mail-mailAccount .mailAccount-detail-form-container #mailAccount-image-uploader .mailAccount-image .media{max-height:100%}#mail-mailAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#mail-mailAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#mail-mailAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#mail-mailAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}#mailAccounts{position:relative}#mailAccounts>.header{height:76px;min-height:76px;max-height:76px}#mailAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#mailAccounts>.header .logo .logo-text{font-size:24px}#mailAccounts>.header md-icon{color:#fff}#mailAccounts>.header .search-input-wrapper{position:relative}#mailAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#mailAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#mailAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#mailAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#mailAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#mailAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#mailAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#mailAccounts>.header.selected-bar .close-button-wrapper{width:244px}#mailAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#mailAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#mailAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#mailAccounts #add-mailAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#mailAccounts #upload-mailAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.mailQueue-dialog{max-width:720px;width:720px}md-dialog.mailQueue-dialog md-dialog-content{display:block;position:relative}md-dialog.mailQueue-dialog md-toolbar .title{font-size:17px}md-dialog.mailQueue-dialog md-input-container textarea{min-height:150px}md-dialog.mailQueue-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.mailQueue-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.mailQueue-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailQueue-dialog .error-list{font-size:13px}md-dialog.mailQueue-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailQueue-dialog .error-list .error .message{font-weight:500}md-dialog.mailQueue-dialog .error-list .error .md-button{margin:0}md-dialog.mailQueue-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailQueue-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#mail-mailQueue .header{height:76px;min-height:76px;max-height:76px}#mail-mailQueue .header .goto-mailQueues-button{margin-right:16px}#mail-mailQueue .header .mailQueue-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#mail-mailQueue .header .mailQueue-image img{height:100%;width:auto;max-width:none}#mail-mailQueue .header .subtitle{margin:6px 0 0 0}#mail-mailQueue .mailQueue-detail-form-container{padding:24px;margin-bottom:24px}#mail-mailQueue .mailQueue-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#mail-mailQueue .mailQueue-detail-form-container .handle{cursor:move}#mail-mailQueue .mailQueue-detail-form-container md-input-container md-switch{margin:0!important}#mail-mailQueue .mailQueue-detail-form-container #mailQueue-image-uploader{position:relative}#mail-mailQueue .mailQueue-detail-form-container #mailQueue-image-uploader.dropping .drop-text{display:flex}#mail-mailQueue .mailQueue-detail-form-container #mailQueue-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#mail-mailQueue .mailQueue-detail-form-container #mailQueue-image-uploader .upload-button{margin-bottom:16px}#mail-mailQueue .mailQueue-detail-form-container #mailQueue-image-uploader .mailQueue-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#mail-mailQueue .mailQueue-detail-form-container #mailQueue-image-uploader .mailQueue-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#mail-mailQueue .mailQueue-detail-form-container #mailQueue-image-uploader .mailQueue-image .media{max-height:100%}#mail-mailQueue md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#mail-mailQueue md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#mail-mailQueue md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#mail-mailQueue md-table-container.font-size-12 td.md-cell{font-size:12px!important}#mailQueues{position:relative}#mailQueues>.header{height:76px;min-height:76px;max-height:76px}#mailQueues>.header .logo .logo-icon{margin:0 16px 0 0}#mailQueues>.header .logo .logo-text{font-size:24px}#mailQueues>.header md-icon{color:#fff}#mailQueues>.header .search-input-wrapper{position:relative}#mailQueues>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#mailQueues>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#mailQueues>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#mailQueues>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#mailQueues>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#mailQueues>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#mailQueues>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#mailQueues>.header.selected-bar .close-button-wrapper{width:244px}#mailQueues>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#mailQueues>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#mailQueues>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#mailQueues #add-mailQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#mailQueues #upload-mailQueue-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.mailSubstatus-dialog{max-width:720px;width:720px}md-dialog.mailSubstatus-dialog md-dialog-content{display:block;position:relative}md-dialog.mailSubstatus-dialog md-toolbar .title{font-size:17px}md-dialog.mailSubstatus-dialog md-input-container textarea{min-height:150px}md-dialog.mailSubstatus-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.mailSubstatus-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.mailSubstatus-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailSubstatus-dialog .error-list{font-size:13px}md-dialog.mailSubstatus-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailSubstatus-dialog .error-list .error .message{font-weight:500}md-dialog.mailSubstatus-dialog .error-list .error .md-button{margin:0}md-dialog.mailSubstatus-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailSubstatus-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#mailSubtatuses{position:relative}#mailSubtatuses>.header{height:76px;min-height:76px;max-height:76px}#mailSubtatuses>.header .logo .logo-icon{margin:0 16px 0 0}#mailSubtatuses>.header .logo .logo-text{font-size:24px}#mailSubtatuses>.header md-icon{color:#fff}#mailSubtatuses>.header .search-input-wrapper{position:relative}#mailSubtatuses>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#mailSubtatuses>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#mailSubtatuses>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#mailSubtatuses>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#mailSubtatuses>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#mailSubtatuses>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#mailSubtatuses>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#mailSubtatuses>.header.selected-bar .close-button-wrapper{width:244px}#mailSubtatuses>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#mailSubtatuses>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#mailSubtatuses>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#mailSubtatuses #add-mailSubstatus-button{position:fixed;bottom:8px;right:8px;padding:0}#mailSubtatuses #upload-mailSubstatus-button{position:fixed;bottom:8px;right:8px;padding:0}#realtime>.content .blink{animation:blinker 2s linear infinite}#realtime>.content .avatar-wrapper{position:relative}#realtime>.content .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .search-input-wrapper{position:relative;margin-left:20px}#realtime>.content .search-input-wrapper label{padding:6px;cursor:pointer}#realtime>.content .search-input-wrapper md-input-container{padding-top:20px}#realtime>.content .main .labels{padding:8px 16px}#realtime>.content .main .labels .label{margin:0 0 2px 4px;padding:2px 5px;font-size:11px;white-space:nowrap;border-radius:2px}#realtime>.content .main .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .main .avatar-wrapper{position:relative}#realtime>.content .main .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .custom-column{padding:0 24px!important}@keyframes blinker{50%{opacity:0}}md-dialog.plugin-dialog{max-width:720px;width:720px}md-dialog.plugin-dialog md-dialog-content{display:block;position:relative}md-dialog.plugin-dialog md-toolbar .title{font-size:17px}md-dialog.plugin-dialog md-input-container textarea{min-height:150px}md-dialog.plugin-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.plugin-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.plugin-dialog .date-container{padding:16px 0 24px 0}md-dialog.plugin-dialog .error-list{font-size:13px}md-dialog.plugin-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.plugin-dialog .error-list .error .message{font-weight:500}md-dialog.plugin-dialog .error-list .error .md-button{margin:0}md-dialog.plugin-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.plugin-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#marketplace-plugin .header{height:76px;min-height:76px;max-height:76px}#marketplace-plugin .header .goto-plugins-button{margin-right:16px}#marketplace-plugin .header .plugin-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#marketplace-plugin .header .plugin-image img{height:100%;width:auto;max-width:none}#marketplace-plugin .header .subtitle{margin:6px 0 0 0}#marketplace-plugin .plugin-detail-form-container{padding:24px;margin-bottom:24px}#marketplace-plugin .plugin-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#marketplace-plugin .plugin-detail-form-container .handle{cursor:move}#marketplace-plugin .plugin-detail-form-container md-input-container md-switch{margin:0!important}#marketplace-plugin .plugin-detail-form-container #plugin-image-uploader{position:relative}#marketplace-plugin .plugin-detail-form-container #plugin-image-uploader.dropping .drop-text{display:flex}#marketplace-plugin .plugin-detail-form-container #plugin-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#marketplace-plugin .plugin-detail-form-container #plugin-image-uploader .upload-button{margin-bottom:16px}#marketplace-plugin .plugin-detail-form-container #plugin-image-uploader .plugin-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#marketplace-plugin .plugin-detail-form-container #plugin-image-uploader .plugin-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#marketplace-plugin .plugin-detail-form-container #plugin-image-uploader .plugin-image .media{max-height:100%}#marketplace-plugin md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#marketplace-plugin md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#marketplace-plugin md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#marketplace-plugin md-table-container.font-size-12 td.md-cell{font-size:12px!important}#plugins{position:relative}#plugins>.header{height:76px;min-height:76px;max-height:76px}#plugins>.header .logo .logo-icon{margin:0 16px 0 0}#plugins>.header .logo .logo-text{font-size:24px}#plugins>.header md-icon{color:#fff}#plugins>.header .search-input-wrapper{position:relative}#plugins>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#plugins>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#plugins>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#plugins>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#plugins>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#plugins>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#plugins>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#plugins>.header.selected-bar .close-button-wrapper{width:244px}#plugins>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#plugins>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#plugins>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#plugins #add-plugin-button{position:fixed;bottom:8px;right:8px;padding:0}#plugins #upload-plugin-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.upload-dialog{max-width:720px;width:720px}md-dialog.upload-dialog md-dialog-content{display:block;position:relative}md-dialog.upload-dialog md-toolbar .title{font-size:17px}md-dialog.upload-dialog md-input-container textarea{min-height:150px}md-dialog.upload-dialog md-progress-linear{padding-top:16px!important}md-dialog.upload-dialog .date-container{padding:16px 0 24px 0}md-dialog.upload-dialog .error-list{font-size:13px}md-dialog.upload-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.upload-dialog .error-list .error .message{font-weight:500}md-dialog.upload-dialog .error-list .error .md-button{margin:0}md-dialog.upload-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.upload-dialog .plugin-image{overflow:hidden;max-width:148px;margin-right:16px;border:3px solid rgba(0,0,0,.12);padding:10px}md-dialog.upload-dialog .plugin-image img{width:auto;max-width:none}md-dialog.upload-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.ivrCampaign-dialog{max-width:720px;width:720px}md-dialog.ivrCampaign-dialog md-dialog-content{display:block;position:relative}md-dialog.ivrCampaign-dialog md-toolbar .title{font-size:17px}md-dialog.ivrCampaign-dialog md-input-container textarea{min-height:150px}md-dialog.ivrCampaign-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.ivrCampaign-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.ivrCampaign-dialog .date-container{padding:16px 0 24px 0}md-dialog.ivrCampaign-dialog .error-list{font-size:13px}md-dialog.ivrCampaign-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.ivrCampaign-dialog .error-list .error .message{font-weight:500}md-dialog.ivrCampaign-dialog .error-list .error .md-button{margin:0}md-dialog.ivrCampaign-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.ivrCampaign-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.hopper-dialog{max-width:720px;width:720px}md-dialog.hopper-dialog md-dialog-content{display:block;position:relative}md-dialog.hopper-dialog md-toolbar .title{font-size:17px}md-dialog.hopper-dialog md-input-container textarea{min-height:150px}md-dialog.hopper-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.hopper-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.hopper-dialog .date-container{padding:16px 0 24px 0}md-dialog.hopper-dialog .error-list{font-size:13px}md-dialog.hopper-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.hopper-dialog .error-list .error .message{font-weight:500}md-dialog.hopper-dialog .error-list .error .md-button{margin:0}md-dialog.hopper-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.hopper-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#motiondialer-ivrCampaign .header{height:76px;min-height:76px;max-height:76px}#motiondialer-ivrCampaign .header .goto-ivrCampaigns-button{margin-right:16px}#motiondialer-ivrCampaign .header .ivrCampaign-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#motiondialer-ivrCampaign .header .ivrCampaign-image img{height:100%;width:auto;max-width:none}#motiondialer-ivrCampaign .header .subtitle{margin:6px 0 0 0}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container{padding:24px;margin-bottom:24px}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container .handle{cursor:move}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container md-input-container md-switch{margin:0!important}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container #ivrCampaign-image-uploader{position:relative}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container #ivrCampaign-image-uploader.dropping .drop-text{display:flex}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container #ivrCampaign-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container #ivrCampaign-image-uploader .upload-button{margin-bottom:16px}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container #ivrCampaign-image-uploader .ivrCampaign-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container #ivrCampaign-image-uploader .ivrCampaign-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container #ivrCampaign-image-uploader .ivrCampaign-image .media{max-height:100%}#motiondialer-ivrCampaign md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#motiondialer-ivrCampaign md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#motiondialer-ivrCampaign md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#motiondialer-ivrCampaign md-table-container.font-size-12 td.md-cell{font-size:12px!important}#ivrCampaigns{position:relative}#ivrCampaigns>.header{height:76px;min-height:76px;max-height:76px}#ivrCampaigns>.header .logo .logo-icon{margin:0 16px 0 0}#ivrCampaigns>.header .logo .logo-text{font-size:24px}#ivrCampaigns>.header md-icon{color:#fff}#ivrCampaigns>.header .search-input-wrapper{position:relative}#ivrCampaigns>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#ivrCampaigns>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#ivrCampaigns>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#ivrCampaigns>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#ivrCampaigns>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#ivrCampaigns>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#ivrCampaigns>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#ivrCampaigns>.header.selected-bar .close-button-wrapper{width:244px}#ivrCampaigns>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#ivrCampaigns>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#ivrCampaigns>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#ivrCampaigns #add-ivrCampaign-button{position:fixed;bottom:8px;right:8px;padding:0}#ivrCampaigns #upload-ivrCampaign-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.queueCampaign-dialog{max-width:720px;width:720px}md-dialog.queueCampaign-dialog md-dialog-content{display:block;position:relative}md-dialog.queueCampaign-dialog md-toolbar .title{font-size:17px}md-dialog.queueCampaign-dialog md-input-container textarea{min-height:150px}md-dialog.queueCampaign-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.queueCampaign-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.queueCampaign-dialog .date-container{padding:16px 0 24px 0}md-dialog.queueCampaign-dialog .error-list{font-size:13px}md-dialog.queueCampaign-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.queueCampaign-dialog .error-list .error .message{font-weight:500}md-dialog.queueCampaign-dialog .error-list .error .md-button{margin:0}md-dialog.queueCampaign-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.queueCampaign-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.hopper-dialog{max-width:720px;width:720px}md-dialog.hopper-dialog md-dialog-content{display:block;position:relative}md-dialog.hopper-dialog md-toolbar .title{font-size:17px}md-dialog.hopper-dialog md-input-container textarea{min-height:150px}md-dialog.hopper-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.hopper-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.hopper-dialog .date-container{padding:16px 0 24px 0}md-dialog.hopper-dialog .error-list{font-size:13px}md-dialog.hopper-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.hopper-dialog .error-list .error .message{font-weight:500}md-dialog.hopper-dialog .error-list .error .md-button{margin:0}md-dialog.hopper-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.hopper-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#motiondialer-queueCampaign .header{height:76px;min-height:76px;max-height:76px}#motiondialer-queueCampaign .header .goto-queueCampaigns-button{margin-right:16px}#motiondialer-queueCampaign .header .queueCampaign-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#motiondialer-queueCampaign .header .queueCampaign-image img{height:100%;width:auto;max-width:none}#motiondialer-queueCampaign .header .subtitle{margin:6px 0 0 0}#motiondialer-queueCampaign .queueCampaign-detail-form-container{padding:24px;margin-bottom:24px}#motiondialer-queueCampaign .queueCampaign-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#motiondialer-queueCampaign .queueCampaign-detail-form-container .handle{cursor:move}#motiondialer-queueCampaign .queueCampaign-detail-form-container md-input-container md-switch{margin:0!important}#motiondialer-queueCampaign .queueCampaign-detail-form-container #queueCampaign-image-uploader{position:relative}#motiondialer-queueCampaign .queueCampaign-detail-form-container #queueCampaign-image-uploader.dropping .drop-text{display:flex}#motiondialer-queueCampaign .queueCampaign-detail-form-container #queueCampaign-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#motiondialer-queueCampaign .queueCampaign-detail-form-container #queueCampaign-image-uploader .upload-button{margin-bottom:16px}#motiondialer-queueCampaign .queueCampaign-detail-form-container #queueCampaign-image-uploader .queueCampaign-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#motiondialer-queueCampaign .queueCampaign-detail-form-container #queueCampaign-image-uploader .queueCampaign-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#motiondialer-queueCampaign .queueCampaign-detail-form-container #queueCampaign-image-uploader .queueCampaign-image .media{max-height:100%}#motiondialer-queueCampaign md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#motiondialer-queueCampaign md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#motiondialer-queueCampaign md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#motiondialer-queueCampaign md-table-container.font-size-12 td.md-cell{font-size:12px!important}#queueCampaigns{position:relative}#queueCampaigns>.header{height:76px;min-height:76px;max-height:76px}#queueCampaigns>.header .logo .logo-icon{margin:0 16px 0 0}#queueCampaigns>.header .logo .logo-text{font-size:24px}#queueCampaigns>.header md-icon{color:#fff}#queueCampaigns>.header .search-input-wrapper{position:relative}#queueCampaigns>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#queueCampaigns>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#queueCampaigns>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#queueCampaigns>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#queueCampaigns>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#queueCampaigns>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#queueCampaigns>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#queueCampaigns>.header.selected-bar .close-button-wrapper{width:244px}#queueCampaigns>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#queueCampaigns>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#queueCampaigns>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#queueCampaigns #add-queueCampaign-button{position:fixed;bottom:8px;right:8px;padding:0}#queueCampaigns #upload-queueCampaign-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.predictive-dialog{max-width:720px;width:720px}md-dialog.predictive-dialog md-dialog-content{display:block;position:relative}md-dialog.predictive-dialog md-toolbar .title{font-size:17px}md-dialog.predictive-dialog md-input-container textarea{min-height:150px}md-dialog.predictive-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.predictive-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.predictive-dialog .date-container{padding:16px 0 24px 0}md-dialog.predictive-dialog .error-list{font-size:13px}md-dialog.predictive-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.predictive-dialog .error-list .error .message{font-weight:500}md-dialog.predictive-dialog .error-list .error .md-button{margin:0}md-dialog.predictive-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.predictive-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#realtime>.content .blink{animation:blinker 2s linear infinite}#realtime>.content .avatar-wrapper{position:relative}#realtime>.content .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .search-input-wrapper{position:relative;margin-left:20px}#realtime>.content .search-input-wrapper label{padding:6px;cursor:pointer}#realtime>.content .search-input-wrapper md-input-container{padding-top:20px}#realtime>.content .main .labels{padding:8px 16px}#realtime>.content .main .labels .label{margin:0 0 2px 4px;padding:2px 5px;font-size:11px;white-space:nowrap;border-radius:2px}#realtime>.content .main .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .main .avatar-wrapper{position:relative}#realtime>.content .main .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .custom-column{padding:0 24px!important}@keyframes blinker{50%{opacity:0}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.openchannelAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelCannedAnswer-dialog{max-width:720px;width:720px}md-dialog.openchannelCannedAnswer-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelCannedAnswer-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelCannedAnswer-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelCannedAnswer-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.openchannelCannedAnswer-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.openchannelCannedAnswer-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelCannedAnswer-dialog .error-list{font-size:13px}md-dialog.openchannelCannedAnswer-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelCannedAnswer-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelCannedAnswer-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelCannedAnswer-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelCannedAnswer-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#openchannel-openchannelAccount .header{height:76px;min-height:76px;max-height:76px}#openchannel-openchannelAccount .header .goto-openchannelAccounts-button{margin-right:16px}#openchannel-openchannelAccount .header .openchannelAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#openchannel-openchannelAccount .header .openchannelAccount-image img{height:100%;width:auto;max-width:none}#openchannel-openchannelAccount .header .subtitle{margin:6px 0 0 0}#openchannel-openchannelAccount .openchannelAccount-detail-form-container{padding:24px;margin-bottom:24px}#openchannel-openchannelAccount .openchannelAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#openchannel-openchannelAccount .openchannelAccount-detail-form-container .handle{cursor:move}#openchannel-openchannelAccount .openchannelAccount-detail-form-container md-input-container md-switch{margin:0!important}#openchannel-openchannelAccount .openchannelAccount-detail-form-container #openchannelAccount-image-uploader{position:relative}#openchannel-openchannelAccount .openchannelAccount-detail-form-container #openchannelAccount-image-uploader.dropping .drop-text{display:flex}#openchannel-openchannelAccount .openchannelAccount-detail-form-container #openchannelAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#openchannel-openchannelAccount .openchannelAccount-detail-form-container #openchannelAccount-image-uploader .upload-button{margin-bottom:16px}#openchannel-openchannelAccount .openchannelAccount-detail-form-container #openchannelAccount-image-uploader .openchannelAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#openchannel-openchannelAccount .openchannelAccount-detail-form-container #openchannelAccount-image-uploader .openchannelAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#openchannel-openchannelAccount .openchannelAccount-detail-form-container #openchannelAccount-image-uploader .openchannelAccount-image .media{max-height:100%}#openchannel-openchannelAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#openchannel-openchannelAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#openchannel-openchannelAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#openchannel-openchannelAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}#openchannelAccounts{position:relative}#openchannelAccounts>.header{height:76px;min-height:76px;max-height:76px}#openchannelAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#openchannelAccounts>.header .logo .logo-text{font-size:24px}#openchannelAccounts>.header md-icon{color:#fff}#openchannelAccounts>.header .search-input-wrapper{position:relative}#openchannelAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#openchannelAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#openchannelAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#openchannelAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#openchannelAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#openchannelAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#openchannelAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#openchannelAccounts>.header.selected-bar .close-button-wrapper{width:244px}#openchannelAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#openchannelAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#openchannelAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#openchannelAccounts #add-openchannelAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#openchannelAccounts #upload-openchannelAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.openchannelQueue-dialog{max-width:720px;width:720px}md-dialog.openchannelQueue-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelQueue-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelQueue-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelQueue-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.openchannelQueue-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.openchannelQueue-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelQueue-dialog .error-list{font-size:13px}md-dialog.openchannelQueue-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelQueue-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelQueue-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelQueue-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelQueue-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#openchannel-openchannelQueue .header{height:76px;min-height:76px;max-height:76px}#openchannel-openchannelQueue .header .goto-openchannelQueues-button{margin-right:16px}#openchannel-openchannelQueue .header .openchannelQueue-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#openchannel-openchannelQueue .header .openchannelQueue-image img{height:100%;width:auto;max-width:none}#openchannel-openchannelQueue .header .subtitle{margin:6px 0 0 0}#openchannel-openchannelQueue .openchannelQueue-detail-form-container{padding:24px;margin-bottom:24px}#openchannel-openchannelQueue .openchannelQueue-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#openchannel-openchannelQueue .openchannelQueue-detail-form-container .handle{cursor:move}#openchannel-openchannelQueue .openchannelQueue-detail-form-container md-input-container md-switch{margin:0!important}#openchannel-openchannelQueue .openchannelQueue-detail-form-container #openchannelQueue-image-uploader{position:relative}#openchannel-openchannelQueue .openchannelQueue-detail-form-container #openchannelQueue-image-uploader.dropping .drop-text{display:flex}#openchannel-openchannelQueue .openchannelQueue-detail-form-container #openchannelQueue-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#openchannel-openchannelQueue .openchannelQueue-detail-form-container #openchannelQueue-image-uploader .upload-button{margin-bottom:16px}#openchannel-openchannelQueue .openchannelQueue-detail-form-container #openchannelQueue-image-uploader .openchannelQueue-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#openchannel-openchannelQueue .openchannelQueue-detail-form-container #openchannelQueue-image-uploader .openchannelQueue-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#openchannel-openchannelQueue .openchannelQueue-detail-form-container #openchannelQueue-image-uploader .openchannelQueue-image .media{max-height:100%}#openchannel-openchannelQueue md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#openchannel-openchannelQueue md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#openchannel-openchannelQueue md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#openchannel-openchannelQueue md-table-container.font-size-12 td.md-cell{font-size:12px!important}#openchannelQueues{position:relative}#openchannelQueues>.header{height:76px;min-height:76px;max-height:76px}#openchannelQueues>.header .logo .logo-icon{margin:0 16px 0 0}#openchannelQueues>.header .logo .logo-text{font-size:24px}#openchannelQueues>.header md-icon{color:#fff}#openchannelQueues>.header .search-input-wrapper{position:relative}#openchannelQueues>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#openchannelQueues>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#openchannelQueues>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#openchannelQueues>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#openchannelQueues>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#openchannelQueues>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#openchannelQueues>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#openchannelQueues>.header.selected-bar .close-button-wrapper{width:244px}#openchannelQueues>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#openchannelQueues>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#openchannelQueues>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#openchannelQueues #add-openchannelQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#openchannelQueues #upload-openchannelQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#realtime>.content .blink{animation:blinker 2s linear infinite}#realtime>.content .avatar-wrapper{position:relative}#realtime>.content .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .search-input-wrapper{position:relative;margin-left:20px}#realtime>.content .search-input-wrapper label{padding:6px;cursor:pointer}#realtime>.content .search-input-wrapper md-input-container{padding-top:20px}#realtime>.content .main .labels{padding:8px 16px}#realtime>.content .main .labels .label{margin:0 0 2px 4px;padding:2px 5px;font-size:11px;white-space:nowrap;border-radius:2px}#realtime>.content .main .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .main .avatar-wrapper{position:relative}#realtime>.content .main .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .custom-column{padding:0 24px!important}@keyframes blinker{50%{opacity:0}}#plugin .filter-header{background-image:url(/assets/images/backgrounds/header-bg.png);color:#fff}#cloudProviders{position:relative}#cloudProviders>.header{height:76px;min-height:76px;max-height:76px}#cloudProviders>.header .logo .logo-icon{margin:0 16px 0 0}#cloudProviders>.header .logo .logo-text{font-size:24px}#cloudProviders>.header md-icon{color:#fff}#cloudProviders>.header .search-input-wrapper{position:relative}#cloudProviders>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#cloudProviders>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#cloudProviders>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#cloudProviders>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#cloudProviders>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#cloudProviders>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#cloudProviders>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#cloudProviders>.header.selected-bar .close-button-wrapper{width:244px}#cloudProviders>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#cloudProviders>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#cloudProviders>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#cloudProviders #add-cloudProvider-button{position:fixed;bottom:8px;right:8px;padding:0}#cloudProviders #upload-cloudProvider-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.cloudProvider-dialog{max-width:720px;width:720px}md-dialog.cloudProvider-dialog md-dialog-content{display:block;position:relative}md-dialog.cloudProvider-dialog md-toolbar .title{font-size:17px}md-dialog.cloudProvider-dialog md-input-container textarea{min-height:150px}md-dialog.cloudProvider-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.cloudProvider-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.cloudProvider-dialog .date-container{padding:16px 0 24px 0}md-dialog.cloudProvider-dialog .error-list{font-size:13px}md-dialog.cloudProvider-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.cloudProvider-dialog .error-list .error .message{font-weight:500}md-dialog.cloudProvider-dialog .error-list .error .md-button{margin:0}md-dialog.cloudProvider-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.cloudProvider-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.customization-dialog{max-width:720px;width:720px}md-dialog.customization-dialog md-dialog-content{display:block;position:relative}md-dialog.customization-dialog md-toolbar .title{font-size:17px}md-dialog.customization-dialog md-input-container textarea{min-height:150px}md-dialog.customization-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.customization-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.customization-dialog .date-container{padding:16px 0 24px 0}md-dialog.customization-dialog .error-list{font-size:13px}md-dialog.customization-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.customization-dialog .error-list .error .message{font-weight:500}md-dialog.customization-dialog .error-list .error .md-button{margin:0}md-dialog.customization-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.customization-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#customizations{position:relative}#customizations>.header{height:76px;min-height:76px;max-height:76px}#customizations>.header .logo .logo-icon{margin:0 16px 0 0}#customizations>.header .logo .logo-text{font-size:24px}#customizations>.header md-icon{color:#fff}#customizations>.header .search-input-wrapper{position:relative}#customizations>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#customizations>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#customizations>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#customizations>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#customizations>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#customizations>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#customizations>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#customizations>.header.selected-bar .close-button-wrapper{width:244px}#customizations>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#customizations>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#customizations>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#customizations>.content .customization-detail-form-container{padding:24px;margin-bottom:24px}#customizations>.content .customization-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#customizations>.content .customization-detail-form-container .handle{cursor:move}#customizations>.content .customization-detail-form-container md-input-container md-switch{margin:0!important}#customizations>.content .customization-detail-form-container #customization-image-uploader{position:relative}#customizations>.content .customization-detail-form-container #customization-image-uploader.dropping .drop-text{display:flex}#customizations>.content .customization-detail-form-container #customization-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#customizations>.content .customization-detail-form-container #customization-image-uploader .upload-button{margin-bottom:16px}#customizations>.content .customization-detail-form-container #customization-image-uploader .customization-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#customizations>.content .customization-detail-form-container #customization-image-uploader .customization-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#customizations>.content .customization-detail-form-container #customization-image-uploader .customization-image .media{max-height:100%}#customizations #add-customization-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.general-dialog{max-width:720px;width:720px}md-dialog.general-dialog md-dialog-content{display:block;position:relative}md-dialog.general-dialog md-toolbar .title{font-size:17px}md-dialog.general-dialog md-input-container textarea{min-height:150px}md-dialog.general-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.general-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.general-dialog .date-container{padding:16px 0 24px 0}md-dialog.general-dialog .error-list{font-size:13px}md-dialog.general-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.general-dialog .error-list .error .message{font-weight:500}md-dialog.general-dialog .error-list .error .md-button{margin:0}md-dialog.general-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.general-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#generals{position:relative}#generals>.header{height:76px;min-height:76px;max-height:76px}#generals>.header .logo .logo-icon{margin:0 16px 0 0}#generals>.header .logo .logo-text{font-size:24px}#generals>.header md-icon{color:#fff}#generals>.header .search-input-wrapper{position:relative}#generals>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#generals>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#generals>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#generals>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#generals>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#generals>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#generals>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#generals>.header.selected-bar .close-button-wrapper{width:244px}#generals>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#generals>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#generals>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#generals>.content .general-detail-form-container{padding:24px;margin-bottom:24px}#generals>.content .general-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#generals>.content .general-detail-form-container .handle{cursor:move}#generals>.content .general-detail-form-container md-input-container md-switch{margin:0!important}#generals>.content .general-detail-form-container #general-image-uploader{position:relative}#generals>.content .general-detail-form-container #general-image-uploader.dropping .drop-text{display:flex}#generals>.content .general-detail-form-container #general-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#generals>.content .general-detail-form-container #general-image-uploader .upload-button{margin-bottom:16px}#generals>.content .general-detail-form-container #general-image-uploader .general-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#generals>.content .general-detail-form-container #general-image-uploader .general-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#generals>.content .general-detail-form-container #general-image-uploader .general-image .media{max-height:100%}#generals #add-general-button{position:fixed;bottom:8px;right:8px;padding:0}#license{position:relative}#license .blink{animation:blinker 2s linear infinite}#license>.header{height:76px;min-height:76px;max-height:76px}#license>.header .logo .logo-icon{margin:0 16px 0 0}#license>.header .logo .logo-text{font-size:24px}#license>.header md-icon{color:#fff}#license>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#license>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#license>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#license>.content .badge{position:absolute;top:0;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);font-size:11px;font-weight:500;padding:6px 8px}md-dialog.request-dialog{max-width:720px;width:720px}md-dialog.request-dialog md-dialog-content{display:block;position:relative}md-dialog.request-dialog md-toolbar .title{font-size:17px}md-dialog.request-dialog md-input-container textarea{min-height:150px}md-dialog.request-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.request-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.request-dialog .date-container{padding:16px 0 24px 0}md-dialog.request-dialog .error-list{font-size:13px}md-dialog.request-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.request-dialog .error-list .error .message{font-weight:500}md-dialog.request-dialog .error-list .error .md-button{margin:0}md-dialog.request-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.request-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.update-dialog{max-width:720px;width:720px}md-dialog.update-dialog md-dialog-content{display:block;position:relative}md-dialog.update-dialog md-toolbar .title{font-size:17px}md-dialog.update-dialog md-input-container textarea{min-height:60px}md-dialog.update-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.update-dialog .error-list{font-size:13px}md-dialog.update-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.update-dialog .error-list .error .message{font-weight:500}md-dialog.update-dialog .error-list .error .md-button{margin:0}md-dialog.update-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.update-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.network-dialog{max-width:720px;width:720px}md-dialog.network-dialog md-dialog-content{display:block;position:relative}md-dialog.network-dialog md-toolbar .title{font-size:17px}md-dialog.network-dialog md-input-container textarea{min-height:150px}md-dialog.network-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.network-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.network-dialog .date-container{padding:16px 0 24px 0}md-dialog.network-dialog .error-list{font-size:13px}md-dialog.network-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.network-dialog .error-list .error .message{font-weight:500}md-dialog.network-dialog .error-list .error .md-button{margin:0}md-dialog.network-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.network-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#networks{position:relative}#networks>.header{height:76px;min-height:76px;max-height:76px}#networks>.header .logo .logo-icon{margin:0 16px 0 0}#networks>.header .logo .logo-text{font-size:24px}#networks>.header md-icon{color:#fff}#networks>.header .search-input-wrapper{position:relative}#networks>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#networks>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#networks>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#networks>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#networks>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#networks>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#networks>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#networks>.header.selected-bar .close-button-wrapper{width:244px}#networks>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#networks>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#networks>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#networks #add-network-button{position:fixed;bottom:8px;right:8px;padding:0}#networks #upload-network-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.smtp-dialog{max-width:720px;width:720px}md-dialog.smtp-dialog md-dialog-content{display:block;position:relative}md-dialog.smtp-dialog md-toolbar .title{font-size:17px}md-dialog.smtp-dialog md-input-container textarea{min-height:150px}md-dialog.smtp-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.smtp-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.smtp-dialog .date-container{padding:16px 0 24px 0}md-dialog.smtp-dialog .error-list{font-size:13px}md-dialog.smtp-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smtp-dialog .error-list .error .message{font-weight:500}md-dialog.smtp-dialog .error-list .error .md-button{margin:0}md-dialog.smtp-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smtp-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#smtps{position:relative}#smtps>.header{height:76px;min-height:76px;max-height:76px}#smtps>.header .logo .logo-icon{margin:0 16px 0 0}#smtps>.header .logo .logo-text{font-size:24px}#smtps>.header md-icon{color:#fff}#smtps>.header .search-input-wrapper{position:relative}#smtps>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#smtps>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#smtps>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#smtps>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#smtps>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#smtps>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#smtps>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#smtps>.header.selected-bar .close-button-wrapper{width:244px}#smtps>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#smtps>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#smtps>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#smtps>.content .smtp-detail-form-container{padding:24px;margin-bottom:24px}#smtps>.content .smtp-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#smtps>.content .smtp-detail-form-container .handle{cursor:move}#smtps>.content .smtp-detail-form-container md-input-container md-switch{margin:0!important}#smtps>.content .smtp-detail-form-container #smtp-image-uploader{position:relative}#smtps>.content .smtp-detail-form-container #smtp-image-uploader.dropping .drop-text{display:flex}#smtps>.content .smtp-detail-form-container #smtp-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#smtps>.content .smtp-detail-form-container #smtp-image-uploader .upload-button{margin-bottom:16px}#smtps>.content .smtp-detail-form-container #smtp-image-uploader .smtp-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#smtps>.content .smtp-detail-form-container #smtp-image-uploader .smtp-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#smtps>.content .smtp-detail-form-container #smtp-image-uploader .smtp-image .media{max-height:100%}#smtps #add-smtp-button{position:fixed;bottom:8px;right:8px;padding:0}#system>.header{height:76px;min-height:76px;max-height:76px}#system>.header .logo .logo-icon{margin:0 16px 0 0}#system>.header .logo .logo-text{font-size:24px}#system>.header md-icon{color:#fff}#system .system-detail-form-container{padding:24px;margin-bottom:24px}#system .system-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#system .system-detail-form-container .handle{cursor:move}#system .system-detail-form-container md-input-container md-switch{margin:0!important}#system .system-detail-form-container #system-image-uploader{position:relative}#system .system-detail-form-container #system-image-uploader.dropping .drop-text{display:flex}#system .system-detail-form-container #system-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#system .system-detail-form-container #system-image-uploader .upload-button{margin-bottom:16px}#system .system-detail-form-container #system-image-uploader .system-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#system .system-detail-form-container #system-image-uploader .system-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#system .system-detail-form-container #system-image-uploader .system-image .media{max-height:100%}#updates{position:relative}#updates>.header{height:76px;min-height:76px;max-height:76px}#updates>.header .logo .logo-icon{margin:0 16px 0 0}#updates>.header .logo .logo-text{font-size:24px}#updates>.header md-icon{color:#fff}#updates>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#updates>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#updates>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#realtime>.content .blink{animation:blinker 2s linear infinite}#realtime>.content .avatar-wrapper{position:relative}#realtime>.content .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .search-input-wrapper{position:relative;margin-left:20px}#realtime>.content .search-input-wrapper label{padding:6px;cursor:pointer}#realtime>.content .search-input-wrapper md-input-container{padding-top:20px}#realtime>.content .main .labels{padding:8px 16px}#realtime>.content .main .labels .label{margin:0 0 2px 4px;padding:2px 5px;font-size:11px;white-space:nowrap;border-radius:2px}#realtime>.content .main .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .main .avatar-wrapper{position:relative}#realtime>.content .main .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .custom-column{padding:0 24px!important}@keyframes blinker{50%{opacity:0}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.smsAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsCannedAnswer-dialog{max-width:720px;width:720px}md-dialog.smsCannedAnswer-dialog md-dialog-content{display:block;position:relative}md-dialog.smsCannedAnswer-dialog md-toolbar .title{font-size:17px}md-dialog.smsCannedAnswer-dialog md-input-container textarea{min-height:150px}md-dialog.smsCannedAnswer-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.smsCannedAnswer-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.smsCannedAnswer-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsCannedAnswer-dialog .error-list{font-size:13px}md-dialog.smsCannedAnswer-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsCannedAnswer-dialog .error-list .error .message{font-weight:500}md-dialog.smsCannedAnswer-dialog .error-list .error .md-button{margin:0}md-dialog.smsCannedAnswer-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsCannedAnswer-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#sms-smsAccount .header{height:76px;min-height:76px;max-height:76px}#sms-smsAccount .header .goto-smsAccounts-button{margin-right:16px}#sms-smsAccount .header .smsAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#sms-smsAccount .header .smsAccount-image img{height:100%;width:auto;max-width:none}#sms-smsAccount .header .subtitle{margin:6px 0 0 0}#sms-smsAccount .smsAccount-detail-form-container{padding:24px;margin-bottom:24px}#sms-smsAccount .smsAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#sms-smsAccount .smsAccount-detail-form-container .handle{cursor:move}#sms-smsAccount .smsAccount-detail-form-container md-input-container md-switch{margin:0!important}#sms-smsAccount .smsAccount-detail-form-container #smsAccount-image-uploader{position:relative}#sms-smsAccount .smsAccount-detail-form-container #smsAccount-image-uploader.dropping .drop-text{display:flex}#sms-smsAccount .smsAccount-detail-form-container #smsAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#sms-smsAccount .smsAccount-detail-form-container #smsAccount-image-uploader .upload-button{margin-bottom:16px}#sms-smsAccount .smsAccount-detail-form-container #smsAccount-image-uploader .smsAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#sms-smsAccount .smsAccount-detail-form-container #smsAccount-image-uploader .smsAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#sms-smsAccount .smsAccount-detail-form-container #smsAccount-image-uploader .smsAccount-image .media{max-height:100%}#sms-smsAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#sms-smsAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#sms-smsAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#sms-smsAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}#smsAccounts{position:relative}#smsAccounts>.header{height:76px;min-height:76px;max-height:76px}#smsAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#smsAccounts>.header .logo .logo-text{font-size:24px}#smsAccounts>.header md-icon{color:#fff}#smsAccounts>.header .search-input-wrapper{position:relative}#smsAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#smsAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#smsAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#smsAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#smsAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#smsAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#smsAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#smsAccounts>.header.selected-bar .close-button-wrapper{width:244px}#smsAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#smsAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#smsAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#smsAccounts #add-smsAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#smsAccounts #upload-smsAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.smsQueue-dialog{max-width:720px;width:720px}md-dialog.smsQueue-dialog md-dialog-content{display:block;position:relative}md-dialog.smsQueue-dialog md-toolbar .title{font-size:17px}md-dialog.smsQueue-dialog md-input-container textarea{min-height:150px}md-dialog.smsQueue-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.smsQueue-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.smsQueue-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsQueue-dialog .error-list{font-size:13px}md-dialog.smsQueue-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsQueue-dialog .error-list .error .message{font-weight:500}md-dialog.smsQueue-dialog .error-list .error .md-button{margin:0}md-dialog.smsQueue-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsQueue-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#sms-smsQueue .header{height:76px;min-height:76px;max-height:76px}#sms-smsQueue .header .goto-smsQueues-button{margin-right:16px}#sms-smsQueue .header .smsQueue-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#sms-smsQueue .header .smsQueue-image img{height:100%;width:auto;max-width:none}#sms-smsQueue .header .subtitle{margin:6px 0 0 0}#sms-smsQueue .smsQueue-detail-form-container{padding:24px;margin-bottom:24px}#sms-smsQueue .smsQueue-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#sms-smsQueue .smsQueue-detail-form-container .handle{cursor:move}#sms-smsQueue .smsQueue-detail-form-container md-input-container md-switch{margin:0!important}#sms-smsQueue .smsQueue-detail-form-container #smsQueue-image-uploader{position:relative}#sms-smsQueue .smsQueue-detail-form-container #smsQueue-image-uploader.dropping .drop-text{display:flex}#sms-smsQueue .smsQueue-detail-form-container #smsQueue-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#sms-smsQueue .smsQueue-detail-form-container #smsQueue-image-uploader .upload-button{margin-bottom:16px}#sms-smsQueue .smsQueue-detail-form-container #smsQueue-image-uploader .smsQueue-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#sms-smsQueue .smsQueue-detail-form-container #smsQueue-image-uploader .smsQueue-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#sms-smsQueue .smsQueue-detail-form-container #smsQueue-image-uploader .smsQueue-image .media{max-height:100%}#sms-smsQueue md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#sms-smsQueue md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#sms-smsQueue md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#sms-smsQueue md-table-container.font-size-12 td.md-cell{font-size:12px!important}#smsQueues{position:relative}#smsQueues>.header{height:76px;min-height:76px;max-height:76px}#smsQueues>.header .logo .logo-icon{margin:0 16px 0 0}#smsQueues>.header .logo .logo-text{font-size:24px}#smsQueues>.header md-icon{color:#fff}#smsQueues>.header .search-input-wrapper{position:relative}#smsQueues>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#smsQueues>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#smsQueues>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#smsQueues>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#smsQueues>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#smsQueues>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#smsQueues>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#smsQueues>.header.selected-bar .close-button-wrapper{width:244px}#smsQueues>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#smsQueues>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#smsQueues>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#smsQueues #add-smsQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#smsQueues #upload-smsQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#agents{position:relative}#agents>.header{height:76px;min-height:76px;max-height:76px}#agents>.header .logo .logo-icon{margin:0 16px 0 0}#agents>.header .logo .logo-text{font-size:24px}#agents>.header md-icon{color:#fff}#agents>.header .search-input-wrapper{position:relative}#agents>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#agents>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#agents>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#agents>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#agents>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#agents>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#agents>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#agents>.header.selected-bar .close-button-wrapper{width:244px}#agents>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#agents>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#agents>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#agents #add-agent-button{position:fixed;bottom:8px;right:8px;padding:0}#agents #upload-agent-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.agent-dialog{max-width:720px;width:720px}md-dialog.agent-dialog md-dialog-content{display:block;position:relative}md-dialog.agent-dialog md-toolbar .title{font-size:17px}md-dialog.agent-dialog md-input-container textarea{min-height:150px}md-dialog.agent-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.agent-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.agent-dialog .date-container{padding:16px 0 24px 0}md-dialog.agent-dialog .error-list{font-size:13px}md-dialog.agent-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.agent-dialog .error-list .error .message{font-weight:500}md-dialog.agent-dialog .error-list .error .md-button{margin:0}md-dialog.agent-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.agent-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#staff-agent .header{height:76px;min-height:76px;max-height:76px}#staff-agent .header .goto-agents-button{margin-right:16px}#staff-agent .header .agent-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#staff-agent .header .agent-image img{height:100%;width:auto;max-width:none}#staff-agent .header .subtitle{margin:6px 0 0 0}#staff-agent .agent-detail-form-container{padding:24px;margin-bottom:24px}#staff-agent .agent-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#staff-agent .agent-detail-form-container .handle{cursor:move}#staff-agent .agent-detail-form-container md-input-container md-switch{margin:0!important}#staff-agent .agent-detail-form-container #agent-image-uploader{position:relative}#staff-agent .agent-detail-form-container #agent-image-uploader.dropping .drop-text{display:flex}#staff-agent .agent-detail-form-container #agent-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#staff-agent .agent-detail-form-container #agent-image-uploader .upload-button{margin-bottom:16px}#staff-agent .agent-detail-form-container #agent-image-uploader .agent-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#staff-agent .agent-detail-form-container #agent-image-uploader .agent-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#staff-agent .agent-detail-form-container #agent-image-uploader .agent-image .media{max-height:100%}#staff-agent md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#staff-agent md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#staff-agent md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#staff-agent md-table-container.font-size-12 td.md-cell{font-size:12px!important}md-dialog.team-dialog{max-width:720px;width:720px}md-dialog.team-dialog md-dialog-content{display:block;position:relative}md-dialog.team-dialog md-toolbar .title{font-size:17px}md-dialog.team-dialog md-input-container textarea{min-height:150px}md-dialog.team-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.team-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.team-dialog .date-container{padding:16px 0 24px 0}md-dialog.team-dialog .error-list{font-size:13px}md-dialog.team-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.team-dialog .error-list .error .message{font-weight:500}md-dialog.team-dialog .error-list .error .md-button{margin:0}md-dialog.team-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.team-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#teams{position:relative}#teams>.header{height:76px;min-height:76px;max-height:76px}#teams>.header .logo .logo-icon{margin:0 16px 0 0}#teams>.header .logo .logo-text{font-size:24px}#teams>.header md-icon{color:#fff}#teams>.header .search-input-wrapper{position:relative}#teams>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#teams>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#teams>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#teams>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#teams>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#teams>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#teams>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#teams>.header.selected-bar .close-button-wrapper{width:244px}#teams>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#teams>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#teams>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#teams #add-team-button{position:fixed;bottom:8px;right:8px;padding:0}#teams #upload-team-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.telephone-dialog{max-width:720px;width:720px}md-dialog.telephone-dialog md-dialog-content{display:block;position:relative}md-dialog.telephone-dialog md-toolbar .title{font-size:17px}md-dialog.telephone-dialog md-input-container textarea{min-height:150px}md-dialog.telephone-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.telephone-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.telephone-dialog .date-container{padding:16px 0 24px 0}md-dialog.telephone-dialog .error-list{font-size:13px}md-dialog.telephone-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.telephone-dialog .error-list .error .message{font-weight:500}md-dialog.telephone-dialog .error-list .error .md-button{margin:0}md-dialog.telephone-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.telephone-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#staff-telephone .header{height:76px;min-height:76px;max-height:76px}#staff-telephone .header .goto-telephones-button{margin-right:16px}#staff-telephone .header .telephone-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#staff-telephone .header .telephone-image img{height:100%;width:auto;max-width:none}#staff-telephone .header .subtitle{margin:6px 0 0 0}#staff-telephone .telephone-detail-form-container{padding:24px;margin-bottom:24px}#staff-telephone .telephone-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#staff-telephone .telephone-detail-form-container .handle{cursor:move}#staff-telephone .telephone-detail-form-container md-input-container md-switch{margin:0!important}#staff-telephone .telephone-detail-form-container #telephone-image-uploader{position:relative}#staff-telephone .telephone-detail-form-container #telephone-image-uploader.dropping .drop-text{display:flex}#staff-telephone .telephone-detail-form-container #telephone-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#staff-telephone .telephone-detail-form-container #telephone-image-uploader .upload-button{margin-bottom:16px}#staff-telephone .telephone-detail-form-container #telephone-image-uploader .telephone-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#staff-telephone .telephone-detail-form-container #telephone-image-uploader .telephone-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#staff-telephone .telephone-detail-form-container #telephone-image-uploader .telephone-image .media{max-height:100%}#staff-telephone md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#staff-telephone md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#staff-telephone md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#staff-telephone md-table-container.font-size-12 td.md-cell{font-size:12px!important}#telephones{position:relative}#telephones>.header{height:76px;min-height:76px;max-height:76px}#telephones>.header .logo .logo-icon{margin:0 16px 0 0}#telephones>.header .logo .logo-text{font-size:24px}#telephones>.header md-icon{color:#fff}#telephones>.header .search-input-wrapper{position:relative}#telephones>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#telephones>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#telephones>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#telephones>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#telephones>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#telephones>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#telephones>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#telephones>.header.selected-bar .close-button-wrapper{width:244px}#telephones>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#telephones>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#telephones>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#telephones #add-telephone-button{position:fixed;bottom:8px;right:8px;padding:0}#telephones #upload-telephone-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.userProfile-dialog{max-width:720px;width:720px}md-dialog.userProfile-dialog md-dialog-content{display:block;position:relative}md-dialog.userProfile-dialog md-toolbar .title{font-size:17px}md-dialog.userProfile-dialog md-input-container textarea{min-height:150px}md-dialog.userProfile-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.userProfile-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.userProfile-dialog .date-container{padding:16px 0 24px 0}md-dialog.userProfile-dialog .error-list{font-size:13px}md-dialog.userProfile-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.userProfile-dialog .error-list .error .message{font-weight:500}md-dialog.userProfile-dialog .error-list .error .md-button{margin:0}md-dialog.userProfile-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.userProfile-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#staff-userProfile .header{height:76px;min-height:76px;max-height:76px}#staff-userProfile .header .goto-userProfiles-button{margin-right:16px}#staff-userProfile .header .userProfile-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#staff-userProfile .header .userProfile-image img{height:100%;width:auto;max-width:none}#staff-userProfile .header .subtitle{margin:6px 0 0 0}#staff-userProfile .userProfile-detail-form-container{padding:24px;margin-bottom:24px}#staff-userProfile .userProfile-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#staff-userProfile .userProfile-detail-form-container .handle{cursor:move}#staff-userProfile .userProfile-detail-form-container md-input-container md-switch{margin:0!important}#staff-userProfile .userProfile-detail-form-container #userProfile-image-uploader{position:relative}#staff-userProfile .userProfile-detail-form-container #userProfile-image-uploader.dropping .drop-text{display:flex}#staff-userProfile .userProfile-detail-form-container #userProfile-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#staff-userProfile .userProfile-detail-form-container #userProfile-image-uploader .upload-button{margin-bottom:16px}#staff-userProfile .userProfile-detail-form-container #userProfile-image-uploader .userProfile-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#staff-userProfile .userProfile-detail-form-container #userProfile-image-uploader .userProfile-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#staff-userProfile .userProfile-detail-form-container #userProfile-image-uploader .userProfile-image .media{max-height:100%}#staff-userProfile md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#staff-userProfile md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#staff-userProfile md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#staff-userProfile md-table-container.font-size-12 td.md-cell{font-size:12px!important}#userProfiles{position:relative}#userProfiles>.header{height:76px;min-height:76px;max-height:76px}#userProfiles>.header .logo .logo-icon{margin:0 16px 0 0}#userProfiles>.header .logo .logo-text{font-size:24px}#userProfiles>.header md-icon{color:#fff}#userProfiles>.header .search-input-wrapper{position:relative}#userProfiles>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#userProfiles>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#userProfiles>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#userProfiles>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#userProfiles>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#userProfiles>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#userProfiles>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#userProfiles>.header.selected-bar .close-button-wrapper{width:244px}#userProfiles>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#userProfiles>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#userProfiles>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#userProfiles #add-userProfile-button{position:fixed;bottom:8px;right:8px;padding:0}#userProfiles #upload-userProfile-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.user-dialog{max-width:720px;width:720px}md-dialog.user-dialog md-dialog-content{display:block;position:relative}md-dialog.user-dialog md-toolbar .title{font-size:17px}md-dialog.user-dialog md-input-container textarea{min-height:150px}md-dialog.user-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.user-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.user-dialog .date-container{padding:16px 0 24px 0}md-dialog.user-dialog .error-list{font-size:13px}md-dialog.user-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.user-dialog .error-list .error .message{font-weight:500}md-dialog.user-dialog .error-list .error .md-button{margin:0}md-dialog.user-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.user-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#staff-user .header{height:76px;min-height:76px;max-height:76px}#staff-user .header .goto-users-button{margin-right:16px}#staff-user .header .user-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#staff-user .header .user-image img{height:100%;width:auto;max-width:none}#staff-user .header .subtitle{margin:6px 0 0 0}#staff-user .user-detail-form-container{padding:24px;margin-bottom:24px}#staff-user .user-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#staff-user .user-detail-form-container .handle{cursor:move}#staff-user .user-detail-form-container md-input-container md-switch{margin:0!important}#staff-user .user-detail-form-container #user-image-uploader{position:relative}#staff-user .user-detail-form-container #user-image-uploader.dropping .drop-text{display:flex}#staff-user .user-detail-form-container #user-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#staff-user .user-detail-form-container #user-image-uploader .upload-button{margin-bottom:16px}#staff-user .user-detail-form-container #user-image-uploader .user-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#staff-user .user-detail-form-container #user-image-uploader .user-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#staff-user .user-detail-form-container #user-image-uploader .user-image .media{max-height:100%}#staff-user md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#staff-user md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#staff-user md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#staff-user md-table-container.font-size-12 td.md-cell{font-size:12px!important}#users{position:relative}#users>.header{height:76px;min-height:76px;max-height:76px}#users>.header .logo .logo-icon{margin:0 16px 0 0}#users>.header .logo .logo-text{font-size:24px}#users>.header md-icon{color:#fff}#users>.header .search-input-wrapper{position:relative}#users>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#users>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#users>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#users>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#users>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#users>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#users>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#users>.header.selected-bar .close-button-wrapper{width:244px}#users>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#users>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#users>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#users #add-user-button{position:fixed;bottom:8px;right:8px;padding:0}#users #upload-user-button{position:fixed;bottom:8px;right:8px;padding:0}#cannedAnswers{position:relative}#cannedAnswers>.header{height:76px;min-height:76px;max-height:76px}#cannedAnswers>.header .logo .logo-icon{margin:0 16px 0 0}#cannedAnswers>.header .logo .logo-text{font-size:24px}#cannedAnswers>.header md-icon{color:#fff}#cannedAnswers>.header .search-input-wrapper{position:relative}#cannedAnswers>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#cannedAnswers>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#cannedAnswers>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#cannedAnswers>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#cannedAnswers>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#cannedAnswers>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#cannedAnswers>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#cannedAnswers>.header.selected-bar .close-button-wrapper{width:244px}#cannedAnswers>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#cannedAnswers>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#cannedAnswers>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#cannedAnswers #add-cannedAnswer-button{position:fixed;bottom:8px;right:8px;padding:0}#cannedAnswers #upload-cannedAnswer-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.cannedAnswer-dialog{max-width:720px;width:720px}md-dialog.cannedAnswer-dialog md-dialog-content{display:block;position:relative}md-dialog.cannedAnswer-dialog md-toolbar .title{font-size:17px}md-dialog.cannedAnswer-dialog md-input-container textarea{min-height:150px}md-dialog.cannedAnswer-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.cannedAnswer-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.cannedAnswer-dialog .date-container{padding:16px 0 24px 0}md-dialog.cannedAnswer-dialog .error-list{font-size:13px}md-dialog.cannedAnswer-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.cannedAnswer-dialog .error-list .error .message{font-weight:500}md-dialog.cannedAnswer-dialog .error-list .error .md-button{margin:0}md-dialog.cannedAnswer-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.cannedAnswer-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.customDashboard-dialog{max-width:720px;width:720px}md-dialog.customDashboard-dialog md-dialog-content{display:block;position:relative}md-dialog.customDashboard-dialog md-toolbar .title{font-size:17px}md-dialog.customDashboard-dialog md-input-container textarea{min-height:150px}md-dialog.customDashboard-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.customDashboard-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.customDashboard-dialog .date-container{padding:16px 0 24px 0}md-dialog.customDashboard-dialog .error-list{font-size:13px}md-dialog.customDashboard-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.customDashboard-dialog .error-list .error .message{font-weight:500}md-dialog.customDashboard-dialog .error-list .error .md-button{margin:0}md-dialog.customDashboard-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.customDashboard-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#customDashboards{position:relative}#customDashboards>.header{height:76px;min-height:76px;max-height:76px}#customDashboards>.header .logo .logo-icon{margin:0 16px 0 0}#customDashboards>.header .logo .logo-text{font-size:24px}#customDashboards>.header md-icon{color:#fff}#customDashboards>.header .search-input-wrapper{position:relative}#customDashboards>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#customDashboards>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#customDashboards>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#customDashboards>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#customDashboards>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#customDashboards>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#customDashboards>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#customDashboards>.header.selected-bar .close-button-wrapper{width:244px}#customDashboards>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#customDashboards>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#customDashboards>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#customDashboards #add-customDashboard-button{position:fixed;bottom:8px;right:8px;padding:0}#customDashboards #upload-customDashboard-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.dashboarditem-dialog{max-width:720px;width:720px}md-dialog.dashboarditem-dialog md-dialog-content{display:block;position:relative}md-dialog.dashboarditem-dialog md-toolbar .title{font-size:17px}md-dialog.dashboarditem-dialog md-input-container textarea{min-height:150px}md-dialog.dashboarditem-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.dashboarditem-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.dashboarditem-dialog .date-container{padding:16px 0 24px 0}md-dialog.dashboarditem-dialog .error-list{font-size:13px}md-dialog.dashboarditem-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.dashboarditem-dialog .error-list .error .message{font-weight:500}md-dialog.dashboarditem-dialog .error-list .error .md-button{margin:0}md-dialog.dashboarditem-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.dashboarditem-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#tools-customDashboard .header{height:76px;min-height:76px;max-height:76px}#tools-customDashboard .header .goto-customDashboards-button{margin-right:16px}#tools-customDashboard .header .customDashboard-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#tools-customDashboard .header .customDashboard-image img{height:100%;width:auto;max-width:none}#tools-customDashboard .header .subtitle{margin:6px 0 0 0}#tools-customDashboard .customDashboard-detail-form-container{padding:24px;margin-bottom:24px}#tools-customDashboard .customDashboard-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#tools-customDashboard .customDashboard-detail-form-container .handle{cursor:move}#tools-customDashboard .customDashboard-detail-form-container md-input-container md-switch{margin:0!important}#tools-customDashboard .customDashboard-detail-form-container #customDashboard-image-uploader{position:relative}#tools-customDashboard .customDashboard-detail-form-container #customDashboard-image-uploader.dropping .drop-text{display:flex}#tools-customDashboard .customDashboard-detail-form-container #customDashboard-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#tools-customDashboard .customDashboard-detail-form-container #customDashboard-image-uploader .upload-button{margin-bottom:16px}#tools-customDashboard .customDashboard-detail-form-container #customDashboard-image-uploader .customDashboard-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#tools-customDashboard .customDashboard-detail-form-container #customDashboard-image-uploader .customDashboard-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#tools-customDashboard .customDashboard-detail-form-container #customDashboard-image-uploader .customDashboard-image .media{max-height:100%}#tools-customDashboard md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#tools-customDashboard md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#tools-customDashboard md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#tools-customDashboard md-table-container.font-size-12 td.md-cell{font-size:12px!important}md-dialog.disposition-dialog{max-width:720px;width:720px}md-dialog.disposition-dialog md-dialog-content{display:block;position:relative}md-dialog.disposition-dialog md-toolbar .title{font-size:17px}md-dialog.disposition-dialog md-input-container textarea{min-height:150px}md-dialog.disposition-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.disposition-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.disposition-dialog .date-container{padding:16px 0 24px 0}md-dialog.disposition-dialog .error-list{font-size:13px}md-dialog.disposition-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.disposition-dialog .error-list .error .message{font-weight:500}md-dialog.disposition-dialog .error-list .error .md-button{margin:0}md-dialog.disposition-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.disposition-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#dispositions{position:relative}#dispositions>.header{height:76px;min-height:76px;max-height:76px}#dispositions>.header .logo .logo-icon{margin:0 16px 0 0}#dispositions>.header .logo .logo-text{font-size:24px}#dispositions>.header md-icon{color:#fff}#dispositions>.header .search-input-wrapper{position:relative}#dispositions>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#dispositions>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#dispositions>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#dispositions>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#dispositions>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#dispositions>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#dispositions>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#dispositions>.header.selected-bar .close-button-wrapper{width:244px}#dispositions>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#dispositions>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#dispositions>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#dispositions #add-disposition-button{position:fixed;bottom:8px;right:8px;padding:0}#dispositions #upload-disposition-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.interval-dialog{max-width:720px;width:720px}md-dialog.interval-dialog md-dialog-content{display:block;position:relative}md-dialog.interval-dialog md-toolbar .title{font-size:17px}md-dialog.interval-dialog md-input-container textarea{min-height:150px}md-dialog.interval-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.interval-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.interval-dialog .date-container{padding:16px 0 24px 0}md-dialog.interval-dialog .error-list{font-size:13px}md-dialog.interval-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.interval-dialog .error-list .error .message{font-weight:500}md-dialog.interval-dialog .error-list .error .md-button{margin:0}md-dialog.interval-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.interval-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.interval-dialog{max-width:720px;width:720px}md-dialog.interval-dialog md-dialog-content{display:block;position:relative}md-dialog.interval-dialog md-toolbar .title{font-size:17px}md-dialog.interval-dialog md-input-container textarea{min-height:150px}md-dialog.interval-dialog .date-container{padding:16px 0 24px 0}md-dialog.interval-dialog .error-list{font-size:13px}md-dialog.interval-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.interval-dialog .error-list .error .message{font-weight:500}md-dialog.interval-dialog .error-list .error .md-button{margin:0}md-dialog.interval-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.interval-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.interval-dialog{max-width:720px;width:720px}md-dialog.interval-dialog md-dialog-content{display:block;position:relative}md-dialog.interval-dialog md-toolbar .title{font-size:17px}md-dialog.interval-dialog md-input-container textarea{min-height:150px}md-dialog.interval-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.interval-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.interval-dialog .date-container{padding:16px 0 24px 0}md-dialog.interval-dialog .error-list{font-size:13px}md-dialog.interval-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.interval-dialog .error-list .error .message{font-weight:500}md-dialog.interval-dialog .error-list .error .md-button{margin:0}md-dialog.interval-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.interval-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#tools-interval .header{height:76px;min-height:76px;max-height:76px}#tools-interval .header .goto-intervals-button{margin-right:16px}#tools-interval .header .interval-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#tools-interval .header .interval-image img{height:100%;width:auto;max-width:none}#tools-interval .header .subtitle{margin:6px 0 0 0}#tools-interval .interval-detail-form-container{padding:24px;margin-bottom:24px}#tools-interval .interval-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#tools-interval .interval-detail-form-container .handle{cursor:move}#tools-interval .interval-detail-form-container md-input-container md-switch{margin:0!important}#tools-interval .interval-detail-form-container #interval-image-uploader{position:relative}#tools-interval .interval-detail-form-container #interval-image-uploader.dropping .drop-text{display:flex}#tools-interval .interval-detail-form-container #interval-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#tools-interval .interval-detail-form-container #interval-image-uploader .upload-button{margin-bottom:16px}#tools-interval .interval-detail-form-container #interval-image-uploader .interval-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#tools-interval .interval-detail-form-container #interval-image-uploader .interval-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#tools-interval .interval-detail-form-container #interval-image-uploader .interval-image .media{max-height:100%}#tools-interval md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#tools-interval md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#tools-interval md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#tools-interval md-table-container.font-size-12 td.md-cell{font-size:12px!important}#intervals{position:relative}#intervals>.header{height:76px;min-height:76px;max-height:76px}#intervals>.header .logo .logo-icon{margin:0 16px 0 0}#intervals>.header .logo .logo-text{font-size:24px}#intervals>.header md-icon{color:#fff}#intervals>.header .search-input-wrapper{position:relative}#intervals>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#intervals>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#intervals>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#intervals>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#intervals>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#intervals>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#intervals>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#intervals>.header.selected-bar .close-button-wrapper{width:244px}#intervals>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#intervals>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#intervals>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#intervals #add-interval-button{position:fixed;bottom:8px;right:8px;padding:0}#intervals #upload-interval-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.pause-dialog{max-width:720px;width:720px}md-dialog.pause-dialog md-dialog-content{display:block;position:relative}md-dialog.pause-dialog md-toolbar .title{font-size:17px}md-dialog.pause-dialog md-input-container textarea{min-height:150px}md-dialog.pause-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.pause-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.pause-dialog .date-container{padding:16px 0 24px 0}md-dialog.pause-dialog .error-list{font-size:13px}md-dialog.pause-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.pause-dialog .error-list .error .message{font-weight:500}md-dialog.pause-dialog .error-list .error .md-button{margin:0}md-dialog.pause-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.pause-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#pauses{position:relative}#pauses>.header{height:76px;min-height:76px;max-height:76px}#pauses>.header .logo .logo-icon{margin:0 16px 0 0}#pauses>.header .logo .logo-text{font-size:24px}#pauses>.header md-icon{color:#fff}#pauses>.header .search-input-wrapper{position:relative}#pauses>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#pauses>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#pauses>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#pauses>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#pauses>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#pauses>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#pauses>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#pauses>.header.selected-bar .close-button-wrapper{width:244px}#pauses>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#pauses>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#pauses>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#pauses #add-pause-button{position:fixed;bottom:8px;right:8px;padding:0}#pauses #upload-pause-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.schedule-dialog{max-width:720px;width:720px}md-dialog.schedule-dialog md-dialog-content{display:block;position:relative}md-dialog.schedule-dialog md-toolbar .title{font-size:17px}md-dialog.schedule-dialog md-input-container textarea{min-height:150px}md-dialog.schedule-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.schedule-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.schedule-dialog .date-container{padding:16px 0 24px 0}md-dialog.schedule-dialog .error-list{font-size:13px}md-dialog.schedule-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.schedule-dialog .error-list .error .message{font-weight:500}md-dialog.schedule-dialog .error-list .error .md-button{margin:0}md-dialog.schedule-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.schedule-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#schedules{position:relative}#schedules>.header{height:76px;min-height:76px;max-height:76px}#schedules>.header .logo .logo-icon{margin:0 16px 0 0}#schedules>.header .logo .logo-text{font-size:24px}#schedules>.header md-icon{color:#fff}#schedules>.header .search-input-wrapper{position:relative}#schedules>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#schedules>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#schedules>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#schedules>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#schedules>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#schedules>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#schedules>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#schedules>.header.selected-bar .close-button-wrapper{width:244px}#schedules>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#schedules>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#schedules>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#schedules #add-schedule-button{position:fixed;bottom:8px;right:8px;padding:0}#schedules #upload-schedule-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.sound-dialog{max-width:720px;width:720px}md-dialog.sound-dialog md-dialog-content{display:block;position:relative}md-dialog.sound-dialog md-toolbar .title{font-size:17px}md-dialog.sound-dialog md-input-container textarea{min-height:150px}md-dialog.sound-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.sound-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.sound-dialog .date-container{padding:16px 0 24px 0}md-dialog.sound-dialog .error-list{font-size:13px}md-dialog.sound-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.sound-dialog .error-list .error .message{font-weight:500}md-dialog.sound-dialog .error-list .error .md-button{margin:0}md-dialog.sound-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.sound-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#sounds{position:relative}#sounds>.header{height:76px;min-height:76px;max-height:76px}#sounds>.header .logo .logo-icon{margin:0 16px 0 0}#sounds>.header .logo .logo-text{font-size:24px}#sounds>.header md-icon{color:#fff}#sounds>.header .search-input-wrapper{position:relative}#sounds>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#sounds>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#sounds>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#sounds>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#sounds>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#sounds>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#sounds>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#sounds>.header.selected-bar .close-button-wrapper{width:244px}#sounds>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#sounds>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#sounds>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#sounds #add-sound-button{position:fixed;bottom:8px;right:8px;padding:0}#sounds #upload-sound-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.upload-dialog{max-width:720px;width:720px}md-dialog.upload-dialog md-dialog-content{display:block;position:relative}md-dialog.upload-dialog md-toolbar .title{font-size:17px}md-dialog.upload-dialog md-input-container textarea{min-height:150px}md-dialog.upload-dialog md-progress-linear{padding-top:16px!important}md-dialog.upload-dialog .date-container{padding:16px 0 24px 0}md-dialog.upload-dialog .error-list{font-size:13px}md-dialog.upload-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.upload-dialog .error-list .error .message{font-weight:500}md-dialog.upload-dialog .error-list .error .md-button{margin:0}md-dialog.upload-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.upload-dialog .sound-image{overflow:hidden;max-width:148px;margin-right:16px;border:3px solid rgba(0,0,0,.12);padding:10px}md-dialog.upload-dialog .sound-image img{width:auto;max-width:none}md-dialog.upload-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.tag-dialog{max-width:720px;width:720px}md-dialog.tag-dialog md-dialog-content{display:block;position:relative}md-dialog.tag-dialog md-toolbar .title{font-size:17px}md-dialog.tag-dialog md-input-container textarea{min-height:150px}md-dialog.tag-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.tag-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.tag-dialog .date-container{padding:16px 0 24px 0}md-dialog.tag-dialog .error-list{font-size:13px}md-dialog.tag-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.tag-dialog .error-list .error .message{font-weight:500}md-dialog.tag-dialog .error-list .error .md-button{margin:0}md-dialog.tag-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.tag-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#tags{position:relative}#tags>.header{height:76px;min-height:76px;max-height:76px}#tags>.header .logo .logo-icon{margin:0 16px 0 0}#tags>.header .logo .logo-text{font-size:24px}#tags>.header md-icon{color:#fff}#tags>.header .search-input-wrapper{position:relative}#tags>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#tags>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#tags>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#tags>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#tags>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#tags>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#tags>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#tags>.header.selected-bar .close-button-wrapper{width:244px}#tags>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#tags>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#tags>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#tags #add-tag-button{position:fixed;bottom:8px;right:8px;padding:0}#tags #upload-tag-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.template-dialog{max-width:720px;width:720px}md-dialog.template-dialog md-dialog-content{display:block;position:relative}md-dialog.template-dialog md-toolbar .title{font-size:17px}md-dialog.template-dialog md-input-container textarea{min-height:150px}md-dialog.template-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.template-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.template-dialog .date-container{padding:16px 0 24px 0}md-dialog.template-dialog .error-list{font-size:13px}md-dialog.template-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.template-dialog .error-list .error .message{font-weight:500}md-dialog.template-dialog .error-list .error .md-button{margin:0}md-dialog.template-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.template-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#templates{position:relative}#templates>.header{height:76px;min-height:76px;max-height:76px}#templates>.header .logo .logo-icon{margin:0 16px 0 0}#templates>.header .logo .logo-text{font-size:24px}#templates>.header md-icon{color:#fff}#templates>.header .search-input-wrapper{position:relative}#templates>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#templates>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#templates>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#templates>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#templates>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#templates>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#templates>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#templates>.header.selected-bar .close-button-wrapper{width:244px}#templates>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#templates>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#templates>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#templates #add-template-button{position:fixed;bottom:8px;right:8px;padding:0}#templates #upload-template-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.trigger-dialog{max-width:720px;width:720px}md-dialog.trigger-dialog md-dialog-content{display:block;position:relative}md-dialog.trigger-dialog md-toolbar .title{font-size:17px}md-dialog.trigger-dialog md-input-container textarea{min-height:150px}md-dialog.trigger-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.trigger-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.trigger-dialog .date-container{padding:16px 0 24px 0}md-dialog.trigger-dialog .error-list{font-size:13px}md-dialog.trigger-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.trigger-dialog .error-list .error .message{font-weight:500}md-dialog.trigger-dialog .error-list .error .md-button{margin:0}md-dialog.trigger-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.trigger-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.action-dialog{max-width:720px;width:720px}md-dialog.action-dialog md-dialog-content{display:block;position:relative}md-dialog.action-dialog md-toolbar .title{font-size:17px}md-dialog.action-dialog md-input-container textarea{min-height:150px}md-dialog.action-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.action-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.action-dialog .date-container{padding:16px 0 24px 0}md-dialog.action-dialog .error-list{font-size:13px}md-dialog.action-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.action-dialog .error-list .error .message{font-weight:500}md-dialog.action-dialog .error-list .error .md-button{margin:0}md-dialog.action-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.action-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.allCondition-dialog{max-width:720px;width:720px}md-dialog.allCondition-dialog md-dialog-content{display:block;position:relative}md-dialog.allCondition-dialog md-toolbar .title{font-size:17px}md-dialog.allCondition-dialog md-input-container textarea{min-height:150px}md-dialog.allCondition-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.allCondition-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.allCondition-dialog .date-container{padding:16px 0 24px 0}md-dialog.allCondition-dialog .error-list{font-size:13px}md-dialog.allCondition-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.allCondition-dialog .error-list .error .message{font-weight:500}md-dialog.allCondition-dialog .error-list .error .md-button{margin:0}md-dialog.allCondition-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.allCondition-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.anyCondition-dialog{max-width:720px;width:720px}md-dialog.anyCondition-dialog md-dialog-content{display:block;position:relative}md-dialog.anyCondition-dialog md-toolbar .title{font-size:17px}md-dialog.anyCondition-dialog md-input-container textarea{min-height:150px}md-dialog.anyCondition-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.anyCondition-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.anyCondition-dialog .date-container{padding:16px 0 24px 0}md-dialog.anyCondition-dialog .error-list{font-size:13px}md-dialog.anyCondition-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.anyCondition-dialog .error-list .error .message{font-weight:500}md-dialog.anyCondition-dialog .error-list .error .md-button{margin:0}md-dialog.anyCondition-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.anyCondition-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#tools-trigger .header{height:76px;min-height:76px;max-height:76px}#tools-trigger .header .goto-triggers-button{margin-right:16px}#tools-trigger .header .trigger-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#tools-trigger .header .trigger-image img{height:100%;width:auto;max-width:none}#tools-trigger .header .subtitle{margin:6px 0 0 0}#tools-trigger .trigger-detail-form-container{padding:24px;margin-bottom:24px}#tools-trigger .trigger-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#tools-trigger .trigger-detail-form-container .handle{cursor:move}#tools-trigger .trigger-detail-form-container md-input-container md-switch{margin:0!important}#tools-trigger .trigger-detail-form-container #trigger-image-uploader{position:relative}#tools-trigger .trigger-detail-form-container #trigger-image-uploader.dropping .drop-text{display:flex}#tools-trigger .trigger-detail-form-container #trigger-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#tools-trigger .trigger-detail-form-container #trigger-image-uploader .upload-button{margin-bottom:16px}#tools-trigger .trigger-detail-form-container #trigger-image-uploader .trigger-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#tools-trigger .trigger-detail-form-container #trigger-image-uploader .trigger-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#tools-trigger .trigger-detail-form-container #trigger-image-uploader .trigger-image .media{max-height:100%}#tools-trigger md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#tools-trigger md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#tools-trigger md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#tools-trigger md-table-container.font-size-12 td.md-cell{font-size:12px!important}#triggers{position:relative}#triggers>.header{height:76px;min-height:76px;max-height:76px}#triggers>.header .logo .logo-icon{margin:0 16px 0 0}#triggers>.header .logo .logo-text{font-size:24px}#triggers>.header md-icon{color:#fff}#triggers>.header .search-input-wrapper{position:relative}#triggers>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#triggers>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#triggers>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#triggers>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#triggers>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#triggers>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#triggers>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#triggers>.header.selected-bar .close-button-wrapper{width:244px}#triggers>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#triggers>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#triggers>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#triggers #add-trigger-button{position:fixed;bottom:8px;right:8px;padding:0}#triggers #upload-trigger-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.trunk-dialog{max-width:720px;width:720px}md-dialog.trunk-dialog md-dialog-content{display:block;position:relative}md-dialog.trunk-dialog md-toolbar .title{font-size:17px}md-dialog.trunk-dialog md-input-container textarea{min-height:150px}md-dialog.trunk-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.trunk-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.trunk-dialog .date-container{padding:16px 0 24px 0}md-dialog.trunk-dialog .error-list{font-size:13px}md-dialog.trunk-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.trunk-dialog .error-list .error .message{font-weight:500}md-dialog.trunk-dialog .error-list .error .md-button{margin:0}md-dialog.trunk-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.trunk-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#tools-trunk .header{height:76px;min-height:76px;max-height:76px}#tools-trunk .header .goto-trunks-button{margin-right:16px}#tools-trunk .header .trunk-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#tools-trunk .header .trunk-image img{height:100%;width:auto;max-width:none}#tools-trunk .header .subtitle{margin:6px 0 0 0}#tools-trunk .trunk-detail-form-container{padding:24px;margin-bottom:24px}#tools-trunk .trunk-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#tools-trunk .trunk-detail-form-container .handle{cursor:move}#tools-trunk .trunk-detail-form-container md-input-container md-switch{margin:0!important}#tools-trunk .trunk-detail-form-container #trunk-image-uploader{position:relative}#tools-trunk .trunk-detail-form-container #trunk-image-uploader.dropping .drop-text{display:flex}#tools-trunk .trunk-detail-form-container #trunk-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#tools-trunk .trunk-detail-form-container #trunk-image-uploader .upload-button{margin-bottom:16px}#tools-trunk .trunk-detail-form-container #trunk-image-uploader .trunk-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#tools-trunk .trunk-detail-form-container #trunk-image-uploader .trunk-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#tools-trunk .trunk-detail-form-container #trunk-image-uploader .trunk-image .media{max-height:100%}#tools-trunk md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#tools-trunk md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#tools-trunk md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#tools-trunk md-table-container.font-size-12 td.md-cell{font-size:12px!important}#trunks{position:relative}#trunks>.header{height:76px;min-height:76px;max-height:76px}#trunks>.header .logo .logo-icon{margin:0 16px 0 0}#trunks>.header .logo .logo-text{font-size:24px}#trunks>.header md-icon{color:#fff}#trunks>.header .search-input-wrapper{position:relative}#trunks>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#trunks>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#trunks>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#trunks>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#trunks>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#trunks>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#trunks>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#trunks>.header.selected-bar .close-button-wrapper{width:244px}#trunks>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#trunks>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#trunks>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#trunks #add-trunk-button{position:fixed;bottom:8px;right:8px;padding:0}#trunks #upload-trunk-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.variable-dialog{max-width:720px;width:720px}md-dialog.variable-dialog md-dialog-content{display:block;position:relative}md-dialog.variable-dialog md-toolbar .title{font-size:17px}md-dialog.variable-dialog md-input-container textarea{min-height:150px}md-dialog.variable-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.variable-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.variable-dialog .date-container{padding:16px 0 24px 0}md-dialog.variable-dialog .error-list{font-size:13px}md-dialog.variable-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.variable-dialog .error-list .error .message{font-weight:500}md-dialog.variable-dialog .error-list .error .md-button{margin:0}md-dialog.variable-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.variable-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#variables{position:relative}#variables>.header{height:76px;min-height:76px;max-height:76px}#variables>.header .logo .logo-icon{margin:0 16px 0 0}#variables>.header .logo .logo-text{font-size:24px}#variables>.header md-icon{color:#fff}#variables>.header .search-input-wrapper{position:relative}#variables>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#variables>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#variables>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#variables>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#variables>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#variables>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#variables>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#variables>.header.selected-bar .close-button-wrapper{width:244px}#variables>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#variables>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#variables>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#variables #add-variable-button{position:fixed;bottom:8px;right:8px;padding:0}#variables #upload-variable-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.screenRecording-dialog{max-width:720px;width:720px}md-dialog.screenRecording-dialog md-dialog-content{display:block;position:relative}md-dialog.screenRecording-dialog md-toolbar .title{font-size:17px}md-dialog.screenRecording-dialog md-input-container textarea{min-height:150px}md-dialog.screenRecording-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.screenRecording-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.screenRecording-dialog .date-container{padding:16px 0 24px 0}md-dialog.screenRecording-dialog .error-list{font-size:13px}md-dialog.screenRecording-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.screenRecording-dialog .error-list .error .message{font-weight:500}md-dialog.screenRecording-dialog .error-list .error .md-button{margin:0}md-dialog.screenRecording-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.screenRecording-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#screenRecordings{position:relative}#screenRecordings>.header{height:76px;min-height:76px;max-height:76px}#screenRecordings>.header .logo .logo-icon{margin:0 16px 0 0}#screenRecordings>.header .logo .logo-text{font-size:24px}#screenRecordings>.header md-icon{color:#fff}#screenRecordings>.header .search-input-wrapper{position:relative}#screenRecordings>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#screenRecordings>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#screenRecordings>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#screenRecordings>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#screenRecordings>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#screenRecordings>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#screenRecordings>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#screenRecordings>.header.selected-bar .close-button-wrapper{width:244px}#screenRecordings>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#screenRecordings>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#screenRecordings>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#screenRecordings #add-screenRecording-button{position:fixed;bottom:8px;right:8px;padding:0}#screenRecordings #upload-screenRecording-button{position:fixed;bottom:8px;right:8px;padding:0}#chanSpies{position:relative}#chanSpies>.header{height:76px;min-height:76px;max-height:76px}#chanSpies>.header .logo .logo-icon{margin:0 16px 0 0}#chanSpies>.header .logo .logo-text{font-size:24px}#chanSpies>.header md-icon{color:#fff}#chanSpies>.header .search-input-wrapper{position:relative}#chanSpies>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#chanSpies>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#chanSpies>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#chanSpies>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#chanSpies>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#chanSpies>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#chanSpies>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#chanSpies>.header.selected-bar .close-button-wrapper{width:244px}#chanSpies>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#chanSpies>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#chanSpies>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#chanSpies #add-chanSpy-button{position:fixed;bottom:8px;right:8px;padding:0}#chanSpies #upload-chanSpy-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.chanSpy-dialog{max-width:720px;width:720px}md-dialog.chanSpy-dialog md-dialog-content{display:block;position:relative}md-dialog.chanSpy-dialog md-toolbar .title{font-size:17px}md-dialog.chanSpy-dialog md-input-container textarea{min-height:150px}md-dialog.chanSpy-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.chanSpy-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.chanSpy-dialog .date-container{padding:16px 0 24px 0}md-dialog.chanSpy-dialog .error-list{font-size:13px}md-dialog.chanSpy-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chanSpy-dialog .error-list .error .message{font-weight:500}md-dialog.chanSpy-dialog .error-list .error .md-button{margin:0}md-dialog.chanSpy-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chanSpy-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#contexts{position:relative}#contexts>.header{height:76px;min-height:76px;max-height:76px}#contexts>.header .logo .logo-icon{margin:0 16px 0 0}#contexts>.header .logo .logo-text{font-size:24px}#contexts>.header md-icon{color:#fff}#contexts>.header .search-input-wrapper{position:relative}#contexts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#contexts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#contexts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#contexts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#contexts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#contexts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#contexts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#contexts>.header.selected-bar .close-button-wrapper{width:244px}#contexts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#contexts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#contexts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#contexts #add-context-button{position:fixed;bottom:8px;right:8px;padding:0}#contexts #upload-context-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.context-dialog{max-width:720px;width:720px}md-dialog.context-dialog md-dialog-content{display:block;position:relative}md-dialog.context-dialog md-toolbar .title{font-size:17px}md-dialog.context-dialog md-input-container textarea{min-height:150px}md-dialog.context-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.context-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.context-dialog .date-container{padding:16px 0 24px 0}md-dialog.context-dialog .error-list{font-size:13px}md-dialog.context-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.context-dialog .error-list .error .message{font-weight:500}md-dialog.context-dialog .error-list .error .md-button{margin:0}md-dialog.context-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.context-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.inboundroute-dialog{max-width:720px;width:720px}md-dialog.inboundroute-dialog md-dialog-content{display:block;position:relative}md-dialog.inboundroute-dialog md-toolbar .title{font-size:17px}md-dialog.inboundroute-dialog md-input-container textarea{min-height:150px}md-dialog.inboundroute-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.inboundroute-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.inboundroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.inboundroute-dialog .error-list{font-size:13px}md-dialog.inboundroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.inboundroute-dialog .error-list .error .message{font-weight:500}md-dialog.inboundroute-dialog .error-list .error .md-button{margin:0}md-dialog.inboundroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.inboundroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.inboundroute-dialog{max-width:720px;width:720px}md-dialog.inboundroute-dialog md-dialog-content{display:block;position:relative}md-dialog.inboundroute-dialog md-toolbar .title{font-size:17px}md-dialog.inboundroute-dialog md-input-container textarea{min-height:150px}md-dialog.inboundroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.inboundroute-dialog .error-list{font-size:13px}md-dialog.inboundroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.inboundroute-dialog .error-list .error .message{font-weight:500}md-dialog.inboundroute-dialog .error-list .error .md-button{margin:0}md-dialog.inboundroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.inboundroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.inboundroute-dialog{max-width:720px;width:720px}md-dialog.inboundroute-dialog md-dialog-content{display:block;position:relative}md-dialog.inboundroute-dialog md-toolbar .title{font-size:17px}md-dialog.inboundroute-dialog md-input-container textarea{min-height:150px}md-dialog.inboundroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.inboundroute-dialog .error-list{font-size:13px}md-dialog.inboundroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.inboundroute-dialog .error-list .error .message{font-weight:500}md-dialog.inboundroute-dialog .error-list .error .md-button{margin:0}md-dialog.inboundroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.inboundroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.inboundroute-dialog{max-width:720px;width:720px}md-dialog.inboundroute-dialog md-dialog-content{display:block;position:relative}md-dialog.inboundroute-dialog md-toolbar .title{font-size:17px}md-dialog.inboundroute-dialog md-input-container textarea{min-height:150px}md-dialog.inboundroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.inboundroute-dialog .error-list{font-size:13px}md-dialog.inboundroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.inboundroute-dialog .error-list .error .message{font-weight:500}md-dialog.inboundroute-dialog .error-list .error .md-button{margin:0}md-dialog.inboundroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.inboundroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.inboundroute-dialog{max-width:720px;width:720px}md-dialog.inboundroute-dialog md-dialog-content{display:block;position:relative}md-dialog.inboundroute-dialog md-toolbar .title{font-size:17px}md-dialog.inboundroute-dialog md-input-container textarea{min-height:150px}md-dialog.inboundroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.inboundroute-dialog .error-list{font-size:13px}md-dialog.inboundroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.inboundroute-dialog .error-list .error .message{font-weight:500}md-dialog.inboundroute-dialog .error-list .error .md-button{margin:0}md-dialog.inboundroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.inboundroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.inboundroute-dialog{max-width:720px;width:720px}md-dialog.inboundroute-dialog md-dialog-content{display:block;position:relative}md-dialog.inboundroute-dialog md-toolbar .title{font-size:17px}md-dialog.inboundroute-dialog md-input-container textarea{min-height:150px}md-dialog.inboundroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.inboundroute-dialog .error-list{font-size:13px}md-dialog.inboundroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.inboundroute-dialog .error-list .error .message{font-weight:500}md-dialog.inboundroute-dialog .error-list .error .md-button{margin:0}md-dialog.inboundroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.inboundroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.inboundroute-dialog{max-width:720px;width:720px}md-dialog.inboundroute-dialog md-dialog-content{display:block;position:relative}md-dialog.inboundroute-dialog md-toolbar .title{font-size:17px}md-dialog.inboundroute-dialog md-input-container textarea{min-height:150px}md-dialog.inboundroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.inboundroute-dialog .error-list{font-size:13px}md-dialog.inboundroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.inboundroute-dialog .error-list .error .message{font-weight:500}md-dialog.inboundroute-dialog .error-list .error .md-button{margin:0}md-dialog.inboundroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.inboundroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.inboundroute-dialog{max-width:720px;width:720px}md-dialog.inboundroute-dialog md-dialog-content{display:block;position:relative}md-dialog.inboundroute-dialog md-toolbar .title{font-size:17px}md-dialog.inboundroute-dialog md-input-container textarea{min-height:150px}md-dialog.inboundroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.inboundroute-dialog .error-list{font-size:13px}md-dialog.inboundroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.inboundroute-dialog .error-list .error .message{font-weight:500}md-dialog.inboundroute-dialog .error-list .error .md-button{margin:0}md-dialog.inboundroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.inboundroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.inboundroute-dialog{max-width:720px;width:720px}md-dialog.inboundroute-dialog md-dialog-content{display:block;position:relative}md-dialog.inboundroute-dialog md-toolbar .title{font-size:17px}md-dialog.inboundroute-dialog md-input-container textarea{min-height:150px}md-dialog.inboundroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.inboundroute-dialog .error-list{font-size:13px}md-dialog.inboundroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.inboundroute-dialog .error-list .error .message{font-weight:500}md-dialog.inboundroute-dialog .error-list .error .md-button{margin:0}md-dialog.inboundroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.inboundroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.inboundroute-dialog{max-width:720px;width:720px}md-dialog.inboundroute-dialog md-dialog-content{display:block;position:relative}md-dialog.inboundroute-dialog md-toolbar .title{font-size:17px}md-dialog.inboundroute-dialog md-input-container textarea{min-height:150px}md-dialog.inboundroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.inboundroute-dialog .error-list{font-size:13px}md-dialog.inboundroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.inboundroute-dialog .error-list .error .message{font-weight:500}md-dialog.inboundroute-dialog .error-list .error .md-button{margin:0}md-dialog.inboundroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.inboundroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.inboundroute-dialog{max-width:720px;width:720px}md-dialog.inboundroute-dialog md-dialog-content{display:block;position:relative}md-dialog.inboundroute-dialog md-toolbar .title{font-size:17px}md-dialog.inboundroute-dialog md-input-container textarea{min-height:150px}md-dialog.inboundroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.inboundroute-dialog .error-list{font-size:13px}md-dialog.inboundroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.inboundroute-dialog .error-list .error .message{font-weight:500}md-dialog.inboundroute-dialog .error-list .error .md-button{margin:0}md-dialog.inboundroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.inboundroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.inboundroute-dialog{max-width:720px;width:720px}md-dialog.inboundroute-dialog md-dialog-content{display:block;position:relative}md-dialog.inboundroute-dialog md-toolbar .title{font-size:17px}md-dialog.inboundroute-dialog md-input-container textarea{min-height:150px}md-dialog.inboundroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.inboundroute-dialog .error-list{font-size:13px}md-dialog.inboundroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.inboundroute-dialog .error-list .error .message{font-weight:500}md-dialog.inboundroute-dialog .error-list .error .md-button{margin:0}md-dialog.inboundroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.inboundroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.inboundroute-dialog{max-width:720px;width:720px}md-dialog.inboundroute-dialog md-dialog-content{display:block;position:relative}md-dialog.inboundroute-dialog md-toolbar .title{font-size:17px}md-dialog.inboundroute-dialog md-input-container textarea{min-height:150px}md-dialog.inboundroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.inboundroute-dialog .error-list{font-size:13px}md-dialog.inboundroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.inboundroute-dialog .error-list .error .message{font-weight:500}md-dialog.inboundroute-dialog .error-list .error .md-button{margin:0}md-dialog.inboundroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.inboundroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.inboundroute-dialog{max-width:720px;width:720px}md-dialog.inboundroute-dialog md-dialog-content{display:block;position:relative}md-dialog.inboundroute-dialog md-toolbar .title{font-size:17px}md-dialog.inboundroute-dialog md-input-container textarea{min-height:150px}md-dialog.inboundroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.inboundroute-dialog .error-list{font-size:13px}md-dialog.inboundroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.inboundroute-dialog .error-list .error .message{font-weight:500}md-dialog.inboundroute-dialog .error-list .error .md-button{margin:0}md-dialog.inboundroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.inboundroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#voice-inboundroute .header{height:76px;min-height:76px;max-height:76px}#voice-inboundroute .header .goto-inboundroutes-button{margin-right:16px}#voice-inboundroute .header .inboundroute-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#voice-inboundroute .header .inboundroute-image img{height:100%;width:auto;max-width:none}#voice-inboundroute .header .subtitle{margin:6px 0 0 0}#voice-inboundroute .inboundroute-detail-form-container{padding:24px;margin-bottom:24px}#voice-inboundroute .inboundroute-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#voice-inboundroute .inboundroute-detail-form-container .handle{cursor:move}#voice-inboundroute .inboundroute-detail-form-container md-input-container md-switch{margin:0!important}#voice-inboundroute .inboundroute-detail-form-container #inboundroute-image-uploader{position:relative}#voice-inboundroute .inboundroute-detail-form-container #inboundroute-image-uploader.dropping .drop-text{display:flex}#voice-inboundroute .inboundroute-detail-form-container #inboundroute-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#voice-inboundroute .inboundroute-detail-form-container #inboundroute-image-uploader .upload-button{margin-bottom:16px}#voice-inboundroute .inboundroute-detail-form-container #inboundroute-image-uploader .inboundroute-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#voice-inboundroute .inboundroute-detail-form-container #inboundroute-image-uploader .inboundroute-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#voice-inboundroute .inboundroute-detail-form-container #inboundroute-image-uploader .inboundroute-image .media{max-height:100%}#voice-inboundroute md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#voice-inboundroute md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#voice-inboundroute md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#voice-inboundroute md-table-container.font-size-12 td.md-cell{font-size:12px!important}#inboundroutes{position:relative}#inboundroutes>.header{height:76px;min-height:76px;max-height:76px}#inboundroutes>.header .logo .logo-icon{margin:0 16px 0 0}#inboundroutes>.header .logo .logo-text{font-size:24px}#inboundroutes>.header md-icon{color:#fff}#inboundroutes>.header .search-input-wrapper{position:relative}#inboundroutes>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#inboundroutes>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#inboundroutes>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#inboundroutes>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#inboundroutes>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#inboundroutes>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#inboundroutes>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#inboundroutes>.header.selected-bar .close-button-wrapper{width:244px}#inboundroutes>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#inboundroutes>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#inboundroutes>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#inboundroutes #add-inboundroute-button{position:fixed;bottom:8px;right:8px;padding:0}#inboundroutes #upload-inboundroute-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.internalroute-dialog{max-width:720px;width:720px}md-dialog.internalroute-dialog md-dialog-content{display:block;position:relative}md-dialog.internalroute-dialog md-toolbar .title{font-size:17px}md-dialog.internalroute-dialog md-input-container textarea{min-height:150px}md-dialog.internalroute-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.internalroute-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.internalroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.internalroute-dialog .error-list{font-size:13px}md-dialog.internalroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.internalroute-dialog .error-list .error .message{font-weight:500}md-dialog.internalroute-dialog .error-list .error .md-button{margin:0}md-dialog.internalroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.internalroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.internalroute-dialog{max-width:720px;width:720px}md-dialog.internalroute-dialog md-dialog-content{display:block;position:relative}md-dialog.internalroute-dialog md-toolbar .title{font-size:17px}md-dialog.internalroute-dialog md-input-container textarea{min-height:150px}md-dialog.internalroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.internalroute-dialog .error-list{font-size:13px}md-dialog.internalroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.internalroute-dialog .error-list .error .message{font-weight:500}md-dialog.internalroute-dialog .error-list .error .md-button{margin:0}md-dialog.internalroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.internalroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.internalroute-dialog{max-width:720px;width:720px}md-dialog.internalroute-dialog md-dialog-content{display:block;position:relative}md-dialog.internalroute-dialog md-toolbar .title{font-size:17px}md-dialog.internalroute-dialog md-input-container textarea{min-height:150px}md-dialog.internalroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.internalroute-dialog .error-list{font-size:13px}md-dialog.internalroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.internalroute-dialog .error-list .error .message{font-weight:500}md-dialog.internalroute-dialog .error-list .error .md-button{margin:0}md-dialog.internalroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.internalroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.internalroute-dialog{max-width:720px;width:720px}md-dialog.internalroute-dialog md-dialog-content{display:block;position:relative}md-dialog.internalroute-dialog md-toolbar .title{font-size:17px}md-dialog.internalroute-dialog md-input-container textarea{min-height:150px}md-dialog.internalroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.internalroute-dialog .error-list{font-size:13px}md-dialog.internalroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.internalroute-dialog .error-list .error .message{font-weight:500}md-dialog.internalroute-dialog .error-list .error .md-button{margin:0}md-dialog.internalroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.internalroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.internalroute-dialog{max-width:720px;width:720px}md-dialog.internalroute-dialog md-dialog-content{display:block;position:relative}md-dialog.internalroute-dialog md-toolbar .title{font-size:17px}md-dialog.internalroute-dialog md-input-container textarea{min-height:150px}md-dialog.internalroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.internalroute-dialog .error-list{font-size:13px}md-dialog.internalroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.internalroute-dialog .error-list .error .message{font-weight:500}md-dialog.internalroute-dialog .error-list .error .md-button{margin:0}md-dialog.internalroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.internalroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.internalroute-dialog{max-width:720px;width:720px}md-dialog.internalroute-dialog md-dialog-content{display:block;position:relative}md-dialog.internalroute-dialog md-toolbar .title{font-size:17px}md-dialog.internalroute-dialog md-input-container textarea{min-height:150px}md-dialog.internalroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.internalroute-dialog .error-list{font-size:13px}md-dialog.internalroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.internalroute-dialog .error-list .error .message{font-weight:500}md-dialog.internalroute-dialog .error-list .error .md-button{margin:0}md-dialog.internalroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.internalroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.internalroute-dialog{max-width:720px;width:720px}md-dialog.internalroute-dialog md-dialog-content{display:block;position:relative}md-dialog.internalroute-dialog md-toolbar .title{font-size:17px}md-dialog.internalroute-dialog md-input-container textarea{min-height:150px}md-dialog.internalroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.internalroute-dialog .error-list{font-size:13px}md-dialog.internalroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.internalroute-dialog .error-list .error .message{font-weight:500}md-dialog.internalroute-dialog .error-list .error .md-button{margin:0}md-dialog.internalroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.internalroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.internalroute-dialog{max-width:720px;width:720px}md-dialog.internalroute-dialog md-dialog-content{display:block;position:relative}md-dialog.internalroute-dialog md-toolbar .title{font-size:17px}md-dialog.internalroute-dialog md-input-container textarea{min-height:150px}md-dialog.internalroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.internalroute-dialog .error-list{font-size:13px}md-dialog.internalroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.internalroute-dialog .error-list .error .message{font-weight:500}md-dialog.internalroute-dialog .error-list .error .md-button{margin:0}md-dialog.internalroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.internalroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.internalroute-dialog{max-width:720px;width:720px}md-dialog.internalroute-dialog md-dialog-content{display:block;position:relative}md-dialog.internalroute-dialog md-toolbar .title{font-size:17px}md-dialog.internalroute-dialog md-input-container textarea{min-height:150px}md-dialog.internalroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.internalroute-dialog .error-list{font-size:13px}md-dialog.internalroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.internalroute-dialog .error-list .error .message{font-weight:500}md-dialog.internalroute-dialog .error-list .error .md-button{margin:0}md-dialog.internalroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.internalroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.internalroute-dialog{max-width:720px;width:720px}md-dialog.internalroute-dialog md-dialog-content{display:block;position:relative}md-dialog.internalroute-dialog md-toolbar .title{font-size:17px}md-dialog.internalroute-dialog md-input-container textarea{min-height:150px}md-dialog.internalroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.internalroute-dialog .error-list{font-size:13px}md-dialog.internalroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.internalroute-dialog .error-list .error .message{font-weight:500}md-dialog.internalroute-dialog .error-list .error .md-button{margin:0}md-dialog.internalroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.internalroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.internalroute-dialog{max-width:720px;width:720px}md-dialog.internalroute-dialog md-dialog-content{display:block;position:relative}md-dialog.internalroute-dialog md-toolbar .title{font-size:17px}md-dialog.internalroute-dialog md-input-container textarea{min-height:150px}md-dialog.internalroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.internalroute-dialog .error-list{font-size:13px}md-dialog.internalroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.internalroute-dialog .error-list .error .message{font-weight:500}md-dialog.internalroute-dialog .error-list .error .md-button{margin:0}md-dialog.internalroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.internalroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.internalroute-dialog{max-width:720px;width:720px}md-dialog.internalroute-dialog md-dialog-content{display:block;position:relative}md-dialog.internalroute-dialog md-toolbar .title{font-size:17px}md-dialog.internalroute-dialog md-input-container textarea{min-height:150px}md-dialog.internalroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.internalroute-dialog .error-list{font-size:13px}md-dialog.internalroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.internalroute-dialog .error-list .error .message{font-weight:500}md-dialog.internalroute-dialog .error-list .error .md-button{margin:0}md-dialog.internalroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.internalroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.internalroute-dialog{max-width:720px;width:720px}md-dialog.internalroute-dialog md-dialog-content{display:block;position:relative}md-dialog.internalroute-dialog md-toolbar .title{font-size:17px}md-dialog.internalroute-dialog md-input-container textarea{min-height:150px}md-dialog.internalroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.internalroute-dialog .error-list{font-size:13px}md-dialog.internalroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.internalroute-dialog .error-list .error .message{font-weight:500}md-dialog.internalroute-dialog .error-list .error .md-button{margin:0}md-dialog.internalroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.internalroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.internalroute-dialog{max-width:720px;width:720px}md-dialog.internalroute-dialog md-dialog-content{display:block;position:relative}md-dialog.internalroute-dialog md-toolbar .title{font-size:17px}md-dialog.internalroute-dialog md-input-container textarea{min-height:150px}md-dialog.internalroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.internalroute-dialog .error-list{font-size:13px}md-dialog.internalroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.internalroute-dialog .error-list .error .message{font-weight:500}md-dialog.internalroute-dialog .error-list .error .md-button{margin:0}md-dialog.internalroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.internalroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#voice-internalroute .header{height:76px;min-height:76px;max-height:76px}#voice-internalroute .header .goto-internalroutes-button{margin-right:16px}#voice-internalroute .header .internalroute-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#voice-internalroute .header .internalroute-image img{height:100%;width:auto;max-width:none}#voice-internalroute .header .subtitle{margin:6px 0 0 0}#voice-internalroute .internalroute-detail-form-container{padding:24px;margin-bottom:24px}#voice-internalroute .internalroute-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#voice-internalroute .internalroute-detail-form-container .handle{cursor:move}#voice-internalroute .internalroute-detail-form-container md-input-container md-switch{margin:0!important}#voice-internalroute .internalroute-detail-form-container #internalroute-image-uploader{position:relative}#voice-internalroute .internalroute-detail-form-container #internalroute-image-uploader.dropping .drop-text{display:flex}#voice-internalroute .internalroute-detail-form-container #internalroute-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#voice-internalroute .internalroute-detail-form-container #internalroute-image-uploader .upload-button{margin-bottom:16px}#voice-internalroute .internalroute-detail-form-container #internalroute-image-uploader .internalroute-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#voice-internalroute .internalroute-detail-form-container #internalroute-image-uploader .internalroute-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#voice-internalroute .internalroute-detail-form-container #internalroute-image-uploader .internalroute-image .media{max-height:100%}#voice-internalroute md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#voice-internalroute md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#voice-internalroute md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#voice-internalroute md-table-container.font-size-12 td.md-cell{font-size:12px!important}#internalroutes{position:relative}#internalroutes>.header{height:76px;min-height:76px;max-height:76px}#internalroutes>.header .logo .logo-icon{margin:0 16px 0 0}#internalroutes>.header .logo .logo-text{font-size:24px}#internalroutes>.header md-icon{color:#fff}#internalroutes>.header .search-input-wrapper{position:relative}#internalroutes>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#internalroutes>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#internalroutes>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#internalroutes>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#internalroutes>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#internalroutes>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#internalroutes>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#internalroutes>.header.selected-bar .close-button-wrapper{width:244px}#internalroutes>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#internalroutes>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#internalroutes>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#internalroutes #add-internalroute-button{position:fixed;bottom:8px;right:8px;padding:0}#internalroutes #upload-internalroute-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.musiconhold-dialog{max-width:720px;width:720px}md-dialog.musiconhold-dialog md-dialog-content{display:block;position:relative}md-dialog.musiconhold-dialog md-toolbar .title{font-size:17px}md-dialog.musiconhold-dialog md-input-container textarea{min-height:150px}md-dialog.musiconhold-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.musiconhold-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.musiconhold-dialog .date-container{padding:16px 0 24px 0}md-dialog.musiconhold-dialog .error-list{font-size:13px}md-dialog.musiconhold-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.musiconhold-dialog .error-list .error .message{font-weight:500}md-dialog.musiconhold-dialog .error-list .error .md-button{margin:0}md-dialog.musiconhold-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.musiconhold-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mohSound-dialog{max-width:720px;width:720px}md-dialog.mohSound-dialog md-dialog-content{display:block;position:relative}md-dialog.mohSound-dialog md-toolbar .title{font-size:17px}md-dialog.mohSound-dialog md-input-container textarea{min-height:150px}md-dialog.mohSound-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.mohSound-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.mohSound-dialog .date-container{padding:16px 0 24px 0}md-dialog.mohSound-dialog .error-list{font-size:13px}md-dialog.mohSound-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mohSound-dialog .error-list .error .message{font-weight:500}md-dialog.mohSound-dialog .error-list .error .md-button{margin:0}md-dialog.mohSound-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mohSound-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#voice-musiconhold .header{height:76px;min-height:76px;max-height:76px}#voice-musiconhold .header .goto-musiconholds-button{margin-right:16px}#voice-musiconhold .header .musiconhold-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#voice-musiconhold .header .musiconhold-image img{height:100%;width:auto;max-width:none}#voice-musiconhold .header .subtitle{margin:6px 0 0 0}#voice-musiconhold .musiconhold-detail-form-container{padding:24px;margin-bottom:24px}#voice-musiconhold .musiconhold-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#voice-musiconhold .musiconhold-detail-form-container .handle{cursor:move}#voice-musiconhold .musiconhold-detail-form-container md-input-container md-switch{margin:0!important}#voice-musiconhold .musiconhold-detail-form-container #musiconhold-image-uploader{position:relative}#voice-musiconhold .musiconhold-detail-form-container #musiconhold-image-uploader.dropping .drop-text{display:flex}#voice-musiconhold .musiconhold-detail-form-container #musiconhold-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#voice-musiconhold .musiconhold-detail-form-container #musiconhold-image-uploader .upload-button{margin-bottom:16px}#voice-musiconhold .musiconhold-detail-form-container #musiconhold-image-uploader .musiconhold-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#voice-musiconhold .musiconhold-detail-form-container #musiconhold-image-uploader .musiconhold-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#voice-musiconhold .musiconhold-detail-form-container #musiconhold-image-uploader .musiconhold-image .media{max-height:100%}#voice-musiconhold md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#voice-musiconhold md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#voice-musiconhold md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#voice-musiconhold md-table-container.font-size-12 td.md-cell{font-size:12px!important}#musiconholds{position:relative}#musiconholds>.header{height:76px;min-height:76px;max-height:76px}#musiconholds>.header .logo .logo-icon{margin:0 16px 0 0}#musiconholds>.header .logo .logo-text{font-size:24px}#musiconholds>.header md-icon{color:#fff}#musiconholds>.header .search-input-wrapper{position:relative}#musiconholds>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#musiconholds>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#musiconholds>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#musiconholds>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#musiconholds>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#musiconholds>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#musiconholds>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#musiconholds>.header.selected-bar .close-button-wrapper{width:244px}#musiconholds>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#musiconholds>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#musiconholds>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#musiconholds #add-musiconhold-button{position:fixed;bottom:8px;right:8px;padding:0}#musiconholds #upload-musiconhold-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.outboundroute-dialog{max-width:720px;width:720px}md-dialog.outboundroute-dialog md-dialog-content{display:block;position:relative}md-dialog.outboundroute-dialog md-toolbar .title{font-size:17px}md-dialog.outboundroute-dialog md-input-container textarea{min-height:150px}md-dialog.outboundroute-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.outboundroute-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.outboundroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.outboundroute-dialog .error-list{font-size:13px}md-dialog.outboundroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.outboundroute-dialog .error-list .error .message{font-weight:500}md-dialog.outboundroute-dialog .error-list .error .md-button{margin:0}md-dialog.outboundroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.outboundroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.outboundroute-dialog{max-width:720px;width:720px}md-dialog.outboundroute-dialog md-dialog-content{display:block;position:relative}md-dialog.outboundroute-dialog md-toolbar .title{font-size:17px}md-dialog.outboundroute-dialog md-input-container textarea{min-height:150px}md-dialog.outboundroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.outboundroute-dialog .error-list{font-size:13px}md-dialog.outboundroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.outboundroute-dialog .error-list .error .message{font-weight:500}md-dialog.outboundroute-dialog .error-list .error .md-button{margin:0}md-dialog.outboundroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.outboundroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.outboundroute-dialog{max-width:720px;width:720px}md-dialog.outboundroute-dialog md-dialog-content{display:block;position:relative}md-dialog.outboundroute-dialog md-toolbar .title{font-size:17px}md-dialog.outboundroute-dialog md-input-container textarea{min-height:150px}md-dialog.outboundroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.outboundroute-dialog .error-list{font-size:13px}md-dialog.outboundroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.outboundroute-dialog .error-list .error .message{font-weight:500}md-dialog.outboundroute-dialog .error-list .error .md-button{margin:0}md-dialog.outboundroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.outboundroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.outboundroute-dialog{max-width:720px;width:720px}md-dialog.outboundroute-dialog md-dialog-content{display:block;position:relative}md-dialog.outboundroute-dialog md-toolbar .title{font-size:17px}md-dialog.outboundroute-dialog md-input-container textarea{min-height:150px}md-dialog.outboundroute-dialog .date-container{padding:16px 0 24px 0}md-dialog.outboundroute-dialog .error-list{font-size:13px}md-dialog.outboundroute-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.outboundroute-dialog .error-list .error .message{font-weight:500}md-dialog.outboundroute-dialog .error-list .error .md-button{margin:0}md-dialog.outboundroute-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.outboundroute-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#voice-outboundroute .header{height:76px;min-height:76px;max-height:76px}#voice-outboundroute .header .goto-outboundroutes-button{margin-right:16px}#voice-outboundroute .header .outboundroute-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#voice-outboundroute .header .outboundroute-image img{height:100%;width:auto;max-width:none}#voice-outboundroute .header .subtitle{margin:6px 0 0 0}#voice-outboundroute .outboundroute-detail-form-container{padding:24px;margin-bottom:24px}#voice-outboundroute .outboundroute-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#voice-outboundroute .outboundroute-detail-form-container .handle{cursor:move}#voice-outboundroute .outboundroute-detail-form-container md-input-container md-switch{margin:0!important}#voice-outboundroute .outboundroute-detail-form-container #outboundroute-image-uploader{position:relative}#voice-outboundroute .outboundroute-detail-form-container #outboundroute-image-uploader.dropping .drop-text{display:flex}#voice-outboundroute .outboundroute-detail-form-container #outboundroute-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#voice-outboundroute .outboundroute-detail-form-container #outboundroute-image-uploader .upload-button{margin-bottom:16px}#voice-outboundroute .outboundroute-detail-form-container #outboundroute-image-uploader .outboundroute-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#voice-outboundroute .outboundroute-detail-form-container #outboundroute-image-uploader .outboundroute-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#voice-outboundroute .outboundroute-detail-form-container #outboundroute-image-uploader .outboundroute-image .media{max-height:100%}#voice-outboundroute md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#voice-outboundroute md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#voice-outboundroute md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#voice-outboundroute md-table-container.font-size-12 td.md-cell{font-size:12px!important}#outboundroutes{position:relative}#outboundroutes>.header{height:76px;min-height:76px;max-height:76px}#outboundroutes>.header .logo .logo-icon{margin:0 16px 0 0}#outboundroutes>.header .logo .logo-text{font-size:24px}#outboundroutes>.header md-icon{color:#fff}#outboundroutes>.header .search-input-wrapper{position:relative}#outboundroutes>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#outboundroutes>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#outboundroutes>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#outboundroutes>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#outboundroutes>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#outboundroutes>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#outboundroutes>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#outboundroutes>.header.selected-bar .close-button-wrapper{width:244px}#outboundroutes>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#outboundroutes>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#outboundroutes>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#outboundroutes #add-outboundroute-button{position:fixed;bottom:8px;right:8px;padding:0}#outboundroutes #upload-outboundroute-button{position:fixed;bottom:8px;right:8px;padding:0}#realtime>.content .blink{animation:blinker 2s linear infinite}#realtime>.content .avatar-wrapper{position:relative}#realtime>.content .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .search-input-wrapper{position:relative;margin-left:20px}#realtime>.content .search-input-wrapper label{padding:6px;cursor:pointer}#realtime>.content .search-input-wrapper md-input-container{padding-top:20px}#realtime>.content .main .labels{padding:8px 16px}#realtime>.content .main .labels .label{margin:0 0 2px 4px;padding:2px 5px;font-size:11px;white-space:nowrap;border-radius:2px}#realtime>.content .main .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .main .avatar-wrapper{position:relative}#realtime>.content .main .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .custom-column{padding:0 24px!important}@keyframes blinker{50%{opacity:0}}md-dialog.voicemail-dialog{max-width:720px;width:720px}md-dialog.voicemail-dialog md-dialog-content{display:block;position:relative}md-dialog.voicemail-dialog md-toolbar .title{font-size:17px}md-dialog.voicemail-dialog md-input-container textarea{min-height:150px}md-dialog.voicemail-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.voicemail-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.voicemail-dialog .date-container{padding:16px 0 24px 0}md-dialog.voicemail-dialog .error-list{font-size:13px}md-dialog.voicemail-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.voicemail-dialog .error-list .error .message{font-weight:500}md-dialog.voicemail-dialog .error-list .error .md-button{margin:0}md-dialog.voicemail-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.voicemail-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#voice-voicemail .header{height:76px;min-height:76px;max-height:76px}#voice-voicemail .header .goto-voicemails-button{margin-right:16px}#voice-voicemail .header .voicemail-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#voice-voicemail .header .voicemail-image img{height:100%;width:auto;max-width:none}#voice-voicemail .header .subtitle{margin:6px 0 0 0}#voice-voicemail .voicemail-detail-form-container{padding:24px;margin-bottom:24px}#voice-voicemail .voicemail-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#voice-voicemail .voicemail-detail-form-container .handle{cursor:move}#voice-voicemail .voicemail-detail-form-container md-input-container md-switch{margin:0!important}#voice-voicemail .voicemail-detail-form-container #voicemail-image-uploader{position:relative}#voice-voicemail .voicemail-detail-form-container #voicemail-image-uploader.dropping .drop-text{display:flex}#voice-voicemail .voicemail-detail-form-container #voicemail-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#voice-voicemail .voicemail-detail-form-container #voicemail-image-uploader .upload-button{margin-bottom:16px}#voice-voicemail .voicemail-detail-form-container #voicemail-image-uploader .voicemail-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#voice-voicemail .voicemail-detail-form-container #voicemail-image-uploader .voicemail-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#voice-voicemail .voicemail-detail-form-container #voicemail-image-uploader .voicemail-image .media{max-height:100%}#voice-voicemail md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#voice-voicemail md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#voice-voicemail md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#voice-voicemail md-table-container.font-size-12 td.md-cell{font-size:12px!important}#voicemails{position:relative}#voicemails>.header{height:76px;min-height:76px;max-height:76px}#voicemails>.header .logo .logo-icon{margin:0 16px 0 0}#voicemails>.header .logo .logo-text{font-size:24px}#voicemails>.header md-icon{color:#fff}#voicemails>.header .search-input-wrapper{position:relative}#voicemails>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#voicemails>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#voicemails>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#voicemails>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#voicemails>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#voicemails>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#voicemails>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#voicemails>.header.selected-bar .close-button-wrapper{width:244px}#voicemails>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#voicemails>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#voicemails>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#voicemails #add-voicemail-button{position:fixed;bottom:8px;right:8px;padding:0}#voicemails #upload-voicemail-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.voicePrefix-dialog{max-width:720px;width:720px}md-dialog.voicePrefix-dialog md-dialog-content{display:block;position:relative}md-dialog.voicePrefix-dialog md-toolbar .title{font-size:17px}md-dialog.voicePrefix-dialog md-input-container textarea{min-height:150px}md-dialog.voicePrefix-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.voicePrefix-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.voicePrefix-dialog .date-container{padding:16px 0 24px 0}md-dialog.voicePrefix-dialog .error-list{font-size:13px}md-dialog.voicePrefix-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.voicePrefix-dialog .error-list .error .message{font-weight:500}md-dialog.voicePrefix-dialog .error-list .error .md-button{margin:0}md-dialog.voicePrefix-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.voicePrefix-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#voicePrefixes{position:relative}#voicePrefixes>.header{height:76px;min-height:76px;max-height:76px}#voicePrefixes>.header .logo .logo-icon{margin:0 16px 0 0}#voicePrefixes>.header .logo .logo-text{font-size:24px}#voicePrefixes>.header md-icon{color:#fff}#voicePrefixes>.header .search-input-wrapper{position:relative}#voicePrefixes>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#voicePrefixes>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#voicePrefixes>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#voicePrefixes>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#voicePrefixes>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#voicePrefixes>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#voicePrefixes>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#voicePrefixes>.header.selected-bar .close-button-wrapper{width:244px}#voicePrefixes>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#voicePrefixes>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#voicePrefixes>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#voicePrefixes #add-voicePrefix-button{position:fixed;bottom:8px;right:8px;padding:0}#voicePrefixes #upload-voicePrefix-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.voiceQueue-dialog{max-width:720px;width:720px}md-dialog.voiceQueue-dialog md-dialog-content{display:block;position:relative}md-dialog.voiceQueue-dialog md-toolbar .title{font-size:17px}md-dialog.voiceQueue-dialog md-input-container textarea{min-height:150px}md-dialog.voiceQueue-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.voiceQueue-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.voiceQueue-dialog .date-container{padding:16px 0 24px 0}md-dialog.voiceQueue-dialog .error-list{font-size:13px}md-dialog.voiceQueue-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.voiceQueue-dialog .error-list .error .message{font-weight:500}md-dialog.voiceQueue-dialog .error-list .error .md-button{margin:0}md-dialog.voiceQueue-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.voiceQueue-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#voice-voiceQueue .header{height:76px;min-height:76px;max-height:76px}#voice-voiceQueue .header .goto-voiceQueues-button{margin-right:16px}#voice-voiceQueue .header .voiceQueue-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#voice-voiceQueue .header .voiceQueue-image img{height:100%;width:auto;max-width:none}#voice-voiceQueue .header .subtitle{margin:6px 0 0 0}#voice-voiceQueue .voiceQueue-detail-form-container{padding:24px;margin-bottom:24px}#voice-voiceQueue .voiceQueue-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#voice-voiceQueue .voiceQueue-detail-form-container .handle{cursor:move}#voice-voiceQueue .voiceQueue-detail-form-container md-input-container md-switch{margin:0!important}#voice-voiceQueue .voiceQueue-detail-form-container #voiceQueue-image-uploader{position:relative}#voice-voiceQueue .voiceQueue-detail-form-container #voiceQueue-image-uploader.dropping .drop-text{display:flex}#voice-voiceQueue .voiceQueue-detail-form-container #voiceQueue-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#voice-voiceQueue .voiceQueue-detail-form-container #voiceQueue-image-uploader .upload-button{margin-bottom:16px}#voice-voiceQueue .voiceQueue-detail-form-container #voiceQueue-image-uploader .voiceQueue-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#voice-voiceQueue .voiceQueue-detail-form-container #voiceQueue-image-uploader .voiceQueue-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#voice-voiceQueue .voiceQueue-detail-form-container #voiceQueue-image-uploader .voiceQueue-image .media{max-height:100%}#voice-voiceQueue md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#voice-voiceQueue md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#voice-voiceQueue md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#voice-voiceQueue md-table-container.font-size-12 td.md-cell{font-size:12px!important}#voiceQueues{position:relative}#voiceQueues>.header{height:76px;min-height:76px;max-height:76px}#voiceQueues>.header .logo .logo-icon{margin:0 16px 0 0}#voiceQueues>.header .logo .logo-text{font-size:24px}#voiceQueues>.header md-icon{color:#fff}#voiceQueues>.header .search-input-wrapper{position:relative}#voiceQueues>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#voiceQueues>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#voiceQueues>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#voiceQueues>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#voiceQueues>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#voiceQueues>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#voiceQueues>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#voiceQueues>.header.selected-bar .close-button-wrapper{width:244px}#voiceQueues>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#voiceQueues>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#voiceQueues>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#voiceQueues #add-voiceQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#voiceQueues #upload-voiceQueue-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.voiceRecording-dialog{max-width:720px;width:720px}md-dialog.voiceRecording-dialog md-dialog-content{display:block;position:relative}md-dialog.voiceRecording-dialog md-toolbar .title{font-size:17px}md-dialog.voiceRecording-dialog md-input-container textarea{min-height:150px}md-dialog.voiceRecording-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.voiceRecording-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.voiceRecording-dialog .date-container{padding:16px 0 24px 0}md-dialog.voiceRecording-dialog .error-list{font-size:13px}md-dialog.voiceRecording-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.voiceRecording-dialog .error-list .error .message{font-weight:500}md-dialog.voiceRecording-dialog .error-list .error .md-button{margin:0}md-dialog.voiceRecording-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.voiceRecording-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#voice-voiceRecording .header{height:76px;min-height:76px;max-height:76px}#voice-voiceRecording .header .goto-voiceRecordings-button{margin-right:16px}#voice-voiceRecording .header .voiceRecording-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#voice-voiceRecording .header .voiceRecording-image img{height:100%;width:auto;max-width:none}#voice-voiceRecording .header .subtitle{margin:6px 0 0 0}#voice-voiceRecording .voiceRecording-detail-form-container{padding:24px;margin-bottom:24px}#voice-voiceRecording .voiceRecording-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#voice-voiceRecording .voiceRecording-detail-form-container .handle{cursor:move}#voice-voiceRecording .voiceRecording-detail-form-container md-input-container md-switch{margin:0!important}#voice-voiceRecording .voiceRecording-detail-form-container #voiceRecording-image-uploader{position:relative}#voice-voiceRecording .voiceRecording-detail-form-container #voiceRecording-image-uploader.dropping .drop-text{display:flex}#voice-voiceRecording .voiceRecording-detail-form-container #voiceRecording-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#voice-voiceRecording .voiceRecording-detail-form-container #voiceRecording-image-uploader .upload-button{margin-bottom:16px}#voice-voiceRecording .voiceRecording-detail-form-container #voiceRecording-image-uploader .voiceRecording-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#voice-voiceRecording .voiceRecording-detail-form-container #voiceRecording-image-uploader .voiceRecording-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#voice-voiceRecording .voiceRecording-detail-form-container #voiceRecording-image-uploader .voiceRecording-image .media{max-height:100%}#voice-voiceRecording md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#voice-voiceRecording md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#voice-voiceRecording md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#voice-voiceRecording md-table-container.font-size-12 td.md-cell{font-size:12px!important}#voice-voiceRecording .sentiment.POSITIVE{color:#4caf50;font-size:25px}#voice-voiceRecording .sentiment.NEGATIVE{color:#f40505;font-size:30px}#voice-voiceRecording .sentiment.NEUTRAL{color:#03a9f4;font-size:30px}#voice-voiceRecording .sentiment.MIXED{color:#9c27b0;font-size:30px}#voiceRecordings{position:relative}#voiceRecordings>.header{height:76px;min-height:76px;max-height:76px}#voiceRecordings>.header .logo .logo-icon{margin:0 16px 0 0}#voiceRecordings>.header .logo .logo-text{font-size:24px}#voiceRecordings>.header md-icon{color:#fff}#voiceRecordings>.header .search-input-wrapper{position:relative}#voiceRecordings>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#voiceRecordings>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#voiceRecordings>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#voiceRecordings>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#voiceRecordings>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#voiceRecordings>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#voiceRecordings>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#voiceRecordings>.header.selected-bar .close-button-wrapper{width:244px}#voiceRecordings>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#voiceRecordings>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#voiceRecordings>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#voiceRecordings #add-voiceRecording-button{position:fixed;bottom:8px;right:8px;padding:0}#voiceRecordings #upload-voiceRecording-button{position:fixed;bottom:8px;right:8px;padding:0}#realtime>.content .blink{animation:blinker 2s linear infinite}#realtime>.content .avatar-wrapper{position:relative}#realtime>.content .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .search-input-wrapper{position:relative;margin-left:20px}#realtime>.content .search-input-wrapper label{padding:6px;cursor:pointer}#realtime>.content .search-input-wrapper md-input-container{padding-top:20px}#realtime>.content .main .labels{padding:8px 16px}#realtime>.content .main .labels .label{margin:0 0 2px 4px;padding:2px 5px;font-size:11px;white-space:nowrap;border-radius:2px}#realtime>.content .main .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .main .avatar-wrapper{position:relative}#realtime>.content .main .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .custom-column{padding:0 24px!important}@keyframes blinker{50%{opacity:0}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.whatsappAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#whatsapp-whatsappAccount .header{height:76px;min-height:76px;max-height:76px}#whatsapp-whatsappAccount .header .goto-whatsappAccounts-button{margin-right:16px}#whatsapp-whatsappAccount .header .whatsappAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#whatsapp-whatsappAccount .header .whatsappAccount-image img{height:100%;width:auto;max-width:none}#whatsapp-whatsappAccount .header .subtitle{margin:6px 0 0 0}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container{padding:24px;margin-bottom:24px}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container .handle{cursor:move}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container md-input-container md-switch{margin:0!important}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container #whatsappAccount-image-uploader{position:relative}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container #whatsappAccount-image-uploader.dropping .drop-text{display:flex}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container #whatsappAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container #whatsappAccount-image-uploader .upload-button{margin-bottom:16px}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container #whatsappAccount-image-uploader .whatsappAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container #whatsappAccount-image-uploader .whatsappAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container #whatsappAccount-image-uploader .whatsappAccount-image .media{max-height:100%}#whatsapp-whatsappAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#whatsapp-whatsappAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#whatsapp-whatsappAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#whatsapp-whatsappAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}md-dialog.whatsappCannedAnswer-dialog{max-width:720px;width:720px}md-dialog.whatsappCannedAnswer-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappCannedAnswer-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappCannedAnswer-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappCannedAnswer-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.whatsappCannedAnswer-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.whatsappCannedAnswer-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappCannedAnswer-dialog .error-list{font-size:13px}md-dialog.whatsappCannedAnswer-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappCannedAnswer-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappCannedAnswer-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappCannedAnswer-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappCannedAnswer-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#whatsappAccounts{position:relative}#whatsappAccounts>.header{height:76px;min-height:76px;max-height:76px}#whatsappAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#whatsappAccounts>.header .logo .logo-text{font-size:24px}#whatsappAccounts>.header md-icon{color:#fff}#whatsappAccounts>.header .search-input-wrapper{position:relative}#whatsappAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#whatsappAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#whatsappAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#whatsappAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#whatsappAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#whatsappAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#whatsappAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#whatsappAccounts>.header.selected-bar .close-button-wrapper{width:244px}#whatsappAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#whatsappAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#whatsappAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#whatsappAccounts #add-whatsappAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#whatsappAccounts #upload-whatsappAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.whatsappQueue-dialog{max-width:720px;width:720px}md-dialog.whatsappQueue-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappQueue-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappQueue-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappQueue-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.whatsappQueue-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.whatsappQueue-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappQueue-dialog .error-list{font-size:13px}md-dialog.whatsappQueue-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappQueue-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappQueue-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappQueue-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappQueue-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#whatsapp-whatsappQueue .header{height:76px;min-height:76px;max-height:76px}#whatsapp-whatsappQueue .header .goto-whatsappQueues-button{margin-right:16px}#whatsapp-whatsappQueue .header .whatsappQueue-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#whatsapp-whatsappQueue .header .whatsappQueue-image img{height:100%;width:auto;max-width:none}#whatsapp-whatsappQueue .header .subtitle{margin:6px 0 0 0}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container{padding:24px;margin-bottom:24px}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container .handle{cursor:move}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container md-input-container md-switch{margin:0!important}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container #whatsappQueue-image-uploader{position:relative}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container #whatsappQueue-image-uploader.dropping .drop-text{display:flex}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container #whatsappQueue-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container #whatsappQueue-image-uploader .upload-button{margin-bottom:16px}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container #whatsappQueue-image-uploader .whatsappQueue-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container #whatsappQueue-image-uploader .whatsappQueue-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container #whatsappQueue-image-uploader .whatsappQueue-image .media{max-height:100%}#whatsapp-whatsappQueue md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#whatsapp-whatsappQueue md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#whatsapp-whatsappQueue md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#whatsapp-whatsappQueue md-table-container.font-size-12 td.md-cell{font-size:12px!important}#whatsappQueues{position:relative}#whatsappQueues>.header{height:76px;min-height:76px;max-height:76px}#whatsappQueues>.header .logo .logo-icon{margin:0 16px 0 0}#whatsappQueues>.header .logo .logo-text{font-size:24px}#whatsappQueues>.header md-icon{color:#fff}#whatsappQueues>.header .search-input-wrapper{position:relative}#whatsappQueues>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#whatsappQueues>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#whatsappQueues>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#whatsappQueues>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#whatsappQueues>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#whatsappQueues>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#whatsappQueues>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#whatsappQueues>.header.selected-bar .close-button-wrapper{width:244px}#whatsappQueues>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#whatsappQueues>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#whatsappQueues>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#whatsappQueues #add-whatsappQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#whatsappQueues #upload-whatsappQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#layout-vertical-navigation-fullwidth-toolbar-2 #vertical-navigation{width:240px;min-width:240px;max-width:240px;overflow-x:hidden;transition:all .3s cubic-bezier(.55,0,.55,.2),width .1s linear,min-width .1s linear,max-width .1s linear;box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12)}#layout-vertical-navigation-fullwidth-toolbar-2 #vertical-navigation .navigation-header{height:64px;min-height:64px;background-color:rgba(255,255,255,.05);padding:0 16px 0 24px}#layout-vertical-navigation-fullwidth-toolbar-2 #vertical-navigation:not(._md-locked-open){box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}@media only screen and (min-width:960px){.ms-navigation-folded #content-container{margin-left:64px}.ms-navigation-folded #layout-vertical-navigation-fullwidth-toolbar-2 #vertical-navigation{position:absolute}.ms-navigation-folded:not(.ms-navigation-folded-open) #layout-vertical-navigation-fullwidth-toolbar-2 #vertical-navigation{position:absolute;width:64px;min-width:64px;max-width:64px}.ms-navigation-folded:not(.ms-navigation-folded-open) #layout-vertical-navigation-fullwidth-toolbar-2 #vertical-navigation .navigation-header{padding:0 16px}.ms-navigation-folded:not(.ms-navigation-folded-open) #layout-vertical-navigation-fullwidth-toolbar-2 #vertical-navigation .navigation-header .logo-text{display:none}}#vertical-navigation{width:240px;min-width:240px;max-width:240px;overflow-x:hidden;transition:all .3s cubic-bezier(.55,0,.55,.2),width .1s linear,min-width .1s linear,max-width .1s linear;box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12)}#vertical-navigation .navigation-header{height:64px;min-height:64px;background-color:rgba(255,255,255,.05);padding:0 16px 0 24px}#vertical-navigation .navigation-header .logo .logo-image{display:block;width:32px;min-width:32px;height:32px;line-height:32px;text-align:center;font-size:16px;font-weight:500;color:#fff;border-radius:2px}#vertical-navigation .navigation-header .logo .logo-text{color:#fff;margin-left:16px;font-size:16px}#vertical-navigation .navigation-header .fold-toggle{transition:transform .3s ease-in-out .1s;transform:rotate(0);margin:0;padding:8px;width:34px!important;height:34px!important;cursor:pointer}#vertical-navigation:not(._md-locked-open){box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}@media only screen and (min-width:960px){.ms-navigation-folded #content-container{margin-left:64px}.ms-navigation-folded #vertical-navigation{position:absolute}.ms-navigation-folded #vertical-navigation .navigation-header .fold-toggle{transform:rotate(180deg);opacity:0}.ms-navigation-folded.ms-navigation-folded-open #vertical-navigation .navigation-header .fold-toggle{transition:transform .3s ease-in-out .1s,opacity .3s ease-in-out .2s;opacity:1}.ms-navigation-folded:not(.ms-navigation-folded-open) #vertical-navigation{position:absolute;width:64px;min-width:64px;max-width:64px}.ms-navigation-folded:not(.ms-navigation-folded-open) #vertical-navigation .navigation-header{padding:0 16px}.ms-navigation-folded:not(.ms-navigation-folded-open) #vertical-navigation .navigation-header .logo-text{display:none}}#quick-panel{width:330px;min-width:330px;max-width:330px;z-index:99}#quick-panel md-content{height:100%}#quick-panel md-content md-tabs{position:static;height:100%}#quick-panel md-content md-tabs md-tabs-wrapper{background-color:rgba(0,0,0,.03);border-bottom:1px solid rgba(0,0,0,.06)}#quick-panel md-content md-tabs md-tabs-wrapper .md-tab{max-width:none!important}#quick-panel md-content md-tabs md-tabs-content-wrapper md-tab-content{height:100%;overflow:hidden}#quick-panel md-content md-tabs md-tabs-content-wrapper md-tab-content>div{overflow:hidden;height:100%}.unread-message-count-chat{position:absolute;top:5px;left:10px;width:18px;height:18px;z-index:10;border-radius:50%;text-align:center;line-height:18px;font-size:10px}@media screen and (max-width:600px){#quick-panel{width:80%;min-width:80%;max-width:80%}}#quick-panel .activity-tab .friends .friend{position:relative}#quick-panel .activity-tab .friends .friend .status{position:absolute;top:8px;left:44px;width:18px;height:18px;z-index:10;border-radius:50%;border:3px solid #fff}#quick-panel .activity-tab .friends .friend .status.online{background-color:#00c853}#quick-panel .activity-tab .friends .friend .status.offline{background-color:#d50000}#quick-panel .activity-tab .friends .friend .status.away{background-color:#ff6d00}#quick-panel .activity-tab .friends .friend .unread-message-count{position:absolute;left:16px;bottom:16px;width:18px;height:18px;z-index:10;border-radius:50%;text-align:center;line-height:18px;font-size:11px}#quick-panel .activity-tab .servers .server .status{margin:24px 20px 28px 8px}#quick-panel .activity-tab .servers .server .status.normal{color:#00c853}#quick-panel .activity-tab .servers .server .status.warn{color:#d50000}#quick-panel .activity-tab .servers .server .status.error{color:#ff6d00}#quick-panel .activity-tab .stat md-progress-linear.normal .md-bar{background-color:#00c853}#quick-panel .activity-tab .stat md-progress-linear.normal .md-container{background-color:rgba(0,200,83,.3)}#quick-panel .activity-tab .stat md-progress-linear.warn .md-bar{background-color:#ff6d00}#quick-panel .activity-tab .stat md-progress-linear.warn .md-container{background-color:rgba(255,109,0,.3)}#quick-panel .activity-tab .stat md-progress-linear.alert .md-bar{background-color:#d50000}#quick-panel .activity-tab .stat md-progress-linear.alert .md-container{background-color:rgba(213,0,0,.3)}#quick-panel .chat-tab .chat,#quick-panel .chat-tab .main{position:absolute;width:100%;top:0;bottom:0}#quick-panel .chat-tab .main .contact{position:relative}#quick-panel .chat-tab .main .contact .status{position:absolute;top:8px;left:44px;width:18px;height:18px;border:3px solid #fff;border-radius:50%;z-index:10}#quick-panel .chat-tab .main .contact .status.online{background-color:#00c853}#quick-panel .chat-tab .main .contact .status.offline{background-color:#d50000}#quick-panel .chat-tab .main .contact .status.away{background-color:#ff6d00}#quick-panel .chat-tab .main .contact .unread-message-count{position:absolute;left:16px;bottom:16px;width:18px;height:18px;z-index:10;border-radius:50%;text-align:center;line-height:18px;font-size:11px}#quick-panel .chat-tab .main .recent .contact .status{top:18px}#quick-panel .chat-tab .chat{max-height:100%;overflow:hidden}#quick-panel .chat-tab .chat .message-row .bubble{position:relative;padding:8px;background-color:#eceff1;border:1px solid #dcdfe1}#quick-panel .chat-tab .chat .message-row .bubble:after,#quick-panel .chat-tab .chat .message-row .bubble:before{content:' ';position:absolute;width:0;height:0}#quick-panel .chat-tab .chat .message-row .bubble:after{left:-7px;right:auto;top:0;bottom:auto;border:11px solid;border-color:#eceff1 transparent transparent transparent}#quick-panel .chat-tab .chat .message-row .bubble:before{left:-9px;right:auto;top:-1px;bottom:auto;border:8px solid;border-color:#dcdfe1 transparent transparent transparent}#quick-panel .chat-tab .chat .message-row .bubble .time{font-size:11px;margin-top:8px}#quick-panel .chat-tab .chat .message-row .bubble .message{word-wrap:break-word}#quick-panel .chat-tab .chat .message-row.contact .avatar{margin:0 16px 0 0}#quick-panel .chat-tab .chat .message-row.user{align-items:flex-end}#quick-panel .chat-tab .chat .message-row.user .avatar{order:2;margin:0 0 0 16px}#quick-panel .chat-tab .chat .message-row.user .bubble{background-color:#e8f5e9;border:1px solid #dfebe0;order:1}#quick-panel .chat-tab .chat .message-row.user .bubble:after{right:-7px;left:auto;top:auto;bottom:0;border-color:transparent transparent #e8f5e9 transparent}#quick-panel .chat-tab .chat .message-row.user .bubble:before{right:-9px;left:auto;top:auto;bottom:-1px;border-color:transparent transparent #dfebe0 transparent}#quick-panel .chat-tab .chat .reply{border-top:1px solid rgba(0,0,0,.12)}#quick-panel .chat-tab .chat .reply textarea{margin:8px;resize:none;padding:8px 16px 8px 8px}md-dialog.group-dialog{max-width:720px;width:720px}md-dialog.group-dialog md-dialog-content{display:block;position:relative}md-dialog.group-dialog md-toolbar .title{font-size:17px}md-dialog.group-dialog md-input-container textarea{min-height:150px}md-dialog.group-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.group-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.group-dialog .date-container{padding:16px 0 24px 0}md-dialog.group-dialog .error-list{font-size:13px}md-dialog.group-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.group-dialog .error-list .error .message{font-weight:500}md-dialog.group-dialog .error-list .error .md-button{margin:0}md-dialog.group-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.group-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#quick-panel .group-tab .chat,#quick-panel .group-tab .main{position:absolute;width:100%;top:0;bottom:0}#quick-panel .group-tab .main .contact{position:relative}#quick-panel .group-tab .main .contact .status{position:absolute;top:8px;left:44px;width:18px;height:18px;border:3px solid #fff;border-radius:50%;z-index:10}#quick-panel .group-tab .main .contact .status.online{background-color:#00c853}#quick-panel .group-tab .main .contact .status.offline{background-color:#d50000}#quick-panel .group-tab .main .contact .status.away{background-color:#ff6d00}#quick-panel .group-tab .main .contact .unread-message-count{position:absolute;left:16px;bottom:16px;width:18px;height:18px;z-index:10;border-radius:50%;text-align:center;line-height:18px;font-size:11px}#quick-panel .group-tab .main .recent .contact .status{top:18px}#quick-panel .group-tab .chat{max-height:100%;overflow:hidden}#quick-panel .group-tab .chat .message-row{padding:8px}#quick-panel .group-tab .chat .message-row .bubble{position:relative;padding:8px;background-color:#eceff1;border:1px solid #dcdfe1}#quick-panel .group-tab .chat .message-row .bubble:after,#quick-panel .group-tab .chat .message-row .bubble:before{content:' ';position:absolute;width:0;height:0}#quick-panel .group-tab .chat .message-row .bubble:after{left:-7px;right:auto;top:0;bottom:auto;border:11px solid;border-color:#eceff1 transparent transparent transparent}#quick-panel .group-tab .chat .message-row .bubble:before{left:-9px;right:auto;top:-1px;bottom:auto;border:8px solid;border-color:#dcdfe1 transparent transparent transparent}#quick-panel .group-tab .chat .message-row .bubble .time{font-size:11px;margin-top:8px}#quick-panel .group-tab .chat .message-row .bubble .message{word-wrap:break-word}#quick-panel .group-tab .chat .message-row.contact .avatar{margin:0 16px 0 0}#quick-panel .group-tab .chat .message-row.user{align-items:flex-end}#quick-panel .group-tab .chat .message-row.user .avatar{order:2;margin:0 0 0 16px}#quick-panel .group-tab .chat .message-row.user .bubble{background-color:#e8f5e9;border:1px solid #dfebe0;order:1}#quick-panel .group-tab .chat .message-row.user .bubble:after{right:-7px;left:auto;top:auto;bottom:0;border-color:transparent transparent #e8f5e9 transparent}#quick-panel .group-tab .chat .message-row.user .bubble:before{right:-9px;left:auto;top:auto;bottom:-1px;border-color:transparent transparent #dfebe0 transparent}#quick-panel .group-tab .chat .reply{border-top:1px solid rgba(0,0,0,.12)}#quick-panel .group-tab .chat .reply textarea{margin:8px;resize:none;padding:8px 16px 8px 8px}md-dialog.group-dialog{max-width:720px;width:720px}md-dialog.group-dialog md-dialog-content{display:block;position:relative}md-dialog.group-dialog md-toolbar .title{font-size:17px}md-dialog.group-dialog md-input-container textarea{min-height:150px}md-dialog.group-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.group-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.group-dialog .date-container{padding:16px 0 24px 0}md-dialog.group-dialog .error-list{font-size:13px}md-dialog.group-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.group-dialog .error-list .error .message{font-weight:500}md-dialog.group-dialog .error-list .error .md-button{margin:0}md-dialog.group-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.group-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#reset-password{height:100%;background:url(/assets/images/backgrounds/tech.png) no-repeat;background-size:cover}#reset-password #reset-password-form-wrapper{flex:1 0 auto;padding:32px}#reset-password #reset-password-form-wrapper #reset-password-form{width:384px;max-width:384px;padding:32px;text-align:center;background:#fff}#reset-password #reset-password-form-wrapper #reset-password-form .logo{width:128px;height:128px;line-height:128px;font-size:86px;font-weight:500;margin:32px auto;color:#fff;border-radius:2px}#reset-password #reset-password-form-wrapper #reset-password-form .title{font-size:17px;margin:16px 0 32px 0}#reset-password #reset-password-form-wrapper #reset-password-form .logo_login{max-height:200px}#reset-password #reset-password-form-wrapper #reset-password-form form{width:100%;text-align:left}#reset-password #reset-password-form-wrapper #reset-password-form form .submit-button{width:220px;margin:16px auto;display:block}#reset-password #reset-password-form-wrapper #reset-password-form .login{margin:32px auto 24px auto;width:250px;font-weight:500}#reset-password #reset-password-form-wrapper #reset-password-form .login .text{margin-right:8px}@media screen and (max-width:600px){#reset-password #reset-password-form-wrapper{padding:16px}#reset-password #reset-password-form-wrapper #reset-password-form{padding:24px;width:100%}#reset-password #reset-password-form-wrapper #reset-password-form form .md-button{width:90%}}md-dialog.preview-dialog{max-width:1020px;width:1020px}md-dialog.preview-dialog md-dialog-content{display:block;position:relative;padding:0}md-dialog.preview-dialog md-toolbar .title{font-size:17px}md-dialog.preview-dialog md-input-container textarea{min-height:150px}md-dialog.preview-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.preview-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.preview-dialog .date-container{padding:16px 0 24px 0}md-dialog.preview-dialog .error-list{font-size:13px}md-dialog.preview-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.preview-dialog .error-list .error .message{font-weight:500}md-dialog.preview-dialog .error-list .error .md-button{margin:0}md-dialog.preview-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.preview-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#toolbar{height:64px;min-height:64px;max-height:64px;z-index:55!important}#toolbar .blink{animation:blinker 2s linear infinite}#toolbar #navigation-toggle{width:64px;min-width:64px;height:64px;margin:0;border-right:1px solid rgba(0,0,0,.12);border-radius:0}#toolbar .logo-image{display:block;width:32px;min-width:32px;height:32px;line-height:32px;text-align:center;font-size:16px;font-weight:500;color:#fff;border-radius:2px;margin-left:10px;margin-right:8px}#toolbar #user-menu{height:64px;padding:0}#toolbar #user-menu md-menu-item .md-button{font-size:15px}#toolbar #user-menu md-menu-item .md-button md-icon{margin:auto 16px auto 0}#toolbar #user-menu .user-button{margin:0;padding:0 16px;height:64px;text-transform:none}#toolbar #user-menu .user-button .avatar-wrapper{position:relative}#toolbar #user-menu .user-button .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#toolbar #user-menu .user-button .username{margin:0 12px 0 8px}#toolbar #language-menu{height:64px}#toolbar #language-menu .language-button{min-width:64px;height:64px;margin:0;padding:0 16px;border-radius:0}#toolbar #language-menu .language-button .iso{text-transform:uppercase}#toolbar #language-menu .language-button .flag{margin-right:8px}#toolbar #quick-panel-toggle{width:64px;height:64px;margin:0;border-radius:0}#toolbar #quick-panel-toggle .unread-message-count{position:absolute;top:8px;left:38px;width:18px;height:18px;z-index:10;border-radius:50%;text-align:center;line-height:18px;font-size:10px}#toolbar .toolbar-separator{height:64px;width:1px;background:rgba(0,0,0,.12)}#language-menu-content md-menu-item .flag{margin-right:16px}#language-message{min-height:88px;max-width:600px}#language-message .md-toast-content{height:90px}.open-contact-count{position:absolute;top:1px;left:25px;width:18px;height:18px;z-index:10;border-radius:50%;text-align:center;line-height:18px;font-size:10px}.md-button.preview-button{min-width:46px;min-height:50px}@media screen and (max-width:600px){#toolbar #user-menu .user-button{min-width:64px;padding:0 2px 0 10px}}.geEditor{font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;font-size:10pt;overflow:hidden;height:100%}.geMenubarContainer .geItem,.geSidebarContainer .geTitle,.geToolbar .geButton,.geToolbar .geLabel{cursor:pointer!important}.geContentEditable div,.geContentEditable table,.geContentEditable table td{border:1px dashed #d3d3d3}.geBackgroundPage{-webkit-box-shadow:0 0 3px 0 #d9d9d9;-moz-box-shadow:0 0 3px 0 #d9d9d9;box-shadow:0 0 3px 0 #d9d9d9}.geMenubarContainer a,.geSidebarContainer a,.geToolbar a{color:#000!important;text-decoration:none}.geDiagramContainer,.geFooterContainer,.geHsplit,.geMenubarContainer,.geOutlineContainer,.geSidebarContainer,.geToolbarContainer,.geVsplit{overflow:hidden;position:absolute;cursor:default}.geDiagramContainer,.geOutlineContainer{background-color:#fff;outline:0}.geMenubar,.geToolbar{white-space:nowrap;display:block;width:100%}.geMenubarContainer .geItem,.geSidebar,.geSidebar .geItem,.geSidebarContainer .geTitle,.geToolbar .geButton,.geToolbar .geLabel,.mxPopupMenuItem{-webkit-transition:all .1s ease-in-out;-moz-transition:all .1s ease-in-out;-o-transition:all .1s ease-in-out;-ms-transition:all .1s ease-in-out;transition:all .1s ease-in-out}.geHint{background-color:#fff;border:1px solid gray;padding:4px 16px 4px 16px;border-radius:3px;-webkit-box-shadow:1px 1px 2px 0 #ddd;-moz-box-shadow:1px 1px 2px 0 #ddd;box-shadow:1px 1px 2px 0 #ddd;opacity:.8}.geStatusAlert{white-space:nowrap;margin-top:-5px;font-size:12px;padding:4px 6px 4px 6px;background-color:#f2dede;border:1px solid #ebccd1;color:#a94442!important;border-radius:3px}.geStatusAlert:hover{background-color:#f1d8d8;border-color:#d6b2b8}.geStatusMessage{white-space:nowrap;margin-top:-5px;padding:4px 6px 4px 6px;font-size:12px;background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#c8e5bc));background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);background-repeat:repeat-x;border:1px solid #b2dba1;border-radius:3px;color:#3c763d!important}.geStatusMessage:hover{background:#c8e5bc;border-color:#b2dba1}.geAlert{position:absolute;white-space:nowrap;padding:14px;background-color:#f2dede;border:1px solid #ebccd1;color:#a94442;border-radius:3px;-webkit-box-shadow:2px 2px 3px 0 #ddd;-moz-box-shadow:2px 2px 3px 0 #ddd;box-shadow:2px 2px 3px 0 #ddd}.geBtn{background-color:#f5f5f5;border-radius:2px;border:1px solid #d8d8d8;color:#333;cursor:default;font-size:11px;font-weight:700;height:29px;line-height:27px;margin:0 0 0 8px;min-width:72px;outline:0;padding:0 8px;cursor:pointer}.geBtn:hover{-webkit-box-shadow:0 1px 1px rgba(0,0,0,.1);-moz-box-shadow:0 1px 1px rgba(0,0,0,.1);box-shadow:0 1px 1px rgba(0,0,0,.1);border:1px solid #c6c6c6;background-color:#f8f8f8;background-image:linear-gradient(#f8f8f8 0,#f1f1f1 100%);color:#111}.geBtn:disabled{opacity:.5}.geBtnUp{background-image:url(data:image/gif;base64,R0lGODlhCgAGAJECAGZmZtXV1f///wAAACH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo0QzM3ODJERjg4NUQxMUU0OTFEQ0E2MzRGQzcwNUY3NCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo0QzM3ODJFMDg4NUQxMUU0OTFEQ0E2MzRGQzcwNUY3NCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjRDMzc4MkREODg1RDExRTQ5MURDQTYzNEZDNzA1Rjc0IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjRDMzc4MkRFODg1RDExRTQ5MURDQTYzNEZDNzA1Rjc0Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAQAAAgAsAAAAAAoABgAAAg6UjwiQBhGYglCKhXFLBQA7);background-position:center center;background-repeat:no-repeat}.geBtnUp:active{background-color:#4d90fe;background-image:linear-gradient(#4d90fe 0,#357ae8 100%)}.geBtnDown{background-image:url(data:image/gif;base64,R0lGODlhCgAGAJECANXV1WZmZv///wAAACH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo0QzM3ODJEQjg4NUQxMUU0OTFEQ0E2MzRGQzcwNUY3NCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo0QzM3ODJEQzg4NUQxMUU0OTFEQ0E2MzRGQzcwNUY3NCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjRDMzc4MkQ5ODg1RDExRTQ5MURDQTYzNEZDNzA1Rjc0IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjRDMzc4MkRBODg1RDExRTQ5MURDQTYzNEZDNzA1Rjc0Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAQAAAgAsAAAAAAoABgAAAg6UjxLLewEiCAnOZBzeBQA7);background-position:center center;background-repeat:no-repeat}.geBtnDown:active{background-color:#4d90fe;background-image:linear-gradient(#4d90fe 0,#357ae8 100%)}.geColorBtn{background-color:#f5f5f5;background-image:linear-gradient(#f5f5f5 0,#e1e1e1 100%);border-radius:4px;border:1px solid rgba(0,0,0,.5);color:#333;cursor:default;margin:0;outline:0;padding:0;cursor:pointer}.geColorBtn:hover{-webkit-box-shadow:0 1px 1px rgba(0,0,0,.1);-moz-box-shadow:0 1px 1px rgba(0,0,0,.1);box-shadow:0 1px 1px rgba(0,0,0,.1);border:1px solid rgba(0,0,0,.7)}.geColorBtn:active{background-color:#4d90fe;background-image:linear-gradient(#4d90fe 0,#357ae8 100%);border:1px solid #2f5bb7;color:#fff}.geColorBtn:disabled{opacity:.5}.gePrimaryBtn{background-color:#4d90fe;background-image:linear-gradient(#4d90fe 0,#4787ed 100%);border:1px solid #3079ed;color:#fff}.gePrimaryBtn:hover{background-color:#357ae8;background-image:linear-gradient(#4d90fe 0,#357ae8 100%);border:1px solid #2f5bb7;color:#fff}.gePrimaryBtn:disabled{opacity:.5}.geAlertLink{color:#843534;font-weight:700;text-decoration:none}.geMenubarContainer{background-color:#fff}.geMenubar{padding:0 2px 0 2px;vertical-align:middle}.geMenubarContainer .geItem,.geToolbar .geItem{padding:6px 8px 6px 8px;cursor:default}.geMenubarContainer .geItem:hover,.geToolbarContainer .geItem:hover{background:#eee}.mxDisabled:hover{background:inherit!important}.geMenubar a.geStatus{color:#b3b3b3;padding-left:6px;display:inline-block;cursor:default!important}.geMenubar a.geStatus:hover{background:0 0}.geMenubarMenu{border:1px solid #d5d5d5!important}.geToolbarContainer{background:#f5f5f5;border-bottom:1px solid #e0e0e0}.geSidebarContainer .geToolbarContainer{background:0 0;border-bottom:none}.geSidebarContainer button{text-overflow:ellipsis;overflow:hidden}.geToolbar{padding:1px 0 0 6px;border-top:1px solid #e0e0e0;-webkit-box-shadow:inset 0 1px 0 0 #fff;-moz-box-shadow:inset 0 1px 0 0 #fff;box-shadow:inset 0 1px 0 0 #fff}.geToolbarContainer .geSeparator{float:left;width:1px;height:34px;background:#e5e5e5;margin-left:6px;margin-right:6px;margin-top:-2px}.geToolbarContainer .geButton{float:left;width:20px;height:20px;padding:0 2px 4px 2px;margin:2px;border:1px solid transparent;cursor:pointer;opacity:.6}.geToolbarContainer .geButton:hover{border:1px solid gray;border-radius:2px;opacity:1;filter:none!important}.geToolbarContainer .geButton:active{border:1px solid #000}div.mxWindow .geButton{margin:-1px 2px 2px 2px;padding:1px 2px 2px 1px}.geToolbarContainer .geLabel{float:left;margin:2px;cursor:pointer;padding:3px 5px 3px 5px;border:1px solid transparent;opacity:.6}.geToolbarContainer .geLabel:hover{border:1px solid gray;border-radius:2px;opacity:.9}.geToolbarContainer .geLabel:active{border:1px solid #000;opacity:1;filter:none!important}.geToolbarContainer .mxDisabled:hover{border:1px solid transparent!important;opacity:.2!important}.geToolbarMenu{border:3px solid #e0e0e0!important;-webkit-box-shadow:none!important;-moz-box-shadow:none!important;box-shadow:none!important;filter:none!important}.geDiagramBackdrop{background-color:#ebebeb;border-style:solid;border-color:#e5e5e5;border-width:1px 0 0 1px}.geSidebarContainer{background:#fff;overflow:hidden;position:absolute;border-top:1px solid #e5e5e5;overflow:auto}.geSidebar{background:#f5f5f5;border-bottom:1px solid #e5e5e5;padding:5px;padding-bottom:12px;overflow:hidden}.geSidebarContainer .geTitle{display:block;font-size:9pt;border-bottom:1px solid #e5e5e5;font-weight:400;padding:6px 0 6px 14px;margin:0;cursor:default;background:#eee;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.4em}.geSidebarContainer .geTitle:hover{background:#e5e5e5}.geTitle img{opacity:.5}.geTitle img:hover{opacity:1}.geSidebar .geItem{display:inline-block;background-repeat:no-repeat;background-position:50% 50%;border:1px solid transparent;border-radius:2px;cursor:move}.geSidebar .geItem:hover{border:1px solid gray!important}.geItem{vertical-align:top;display:inline-block}.geSidebarTooltip{position:absolute;background:#fff;overflow:hidden;border:1px solid gray;border-radius:8px;-webkit-box-shadow:0 0 2px 2px #d5d5d5;-moz-box-shadow:0 0 2px 2px #d5d5d5;box-shadow:0 0 2px 2px #d5d5d5}.geFooterContainer{background:#e5e5e5;border-top:1px solid silver}.geFooterContainer a{font-size:14px;color:#235695;font-weight:700;text-decoration:none}.geFooterContainer table{border-collapse:collapse;margin:0 auto}.geFooterContainer td{border-left:1px solid silver;border-right:1px solid silver}.geFooterContainer td:hover{background-color:#b3b3b3}.geFooterContainer a{display:block;box-sizing:border-box;width:100%;height:100%;padding:11px 42px 11px 42px;white-space:nowrap}.geHsplit{cursor:col-resize;background-color:#e5e5e5;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAHBAMAAADdS/HjAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAHUlEQVQImWMQEGAQFWUQFmYQF2cQEmIQE2MQEQEACy4BF67hpEwAAAAASUVORK5CYII=);background-repeat:no-repeat;background-position:center center}.geVsplit{font-size:1pt;cursor:row-resize;background-color:#e5e5e5;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAEBAMAAACw6DhOAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAFElEQVQImWNgNVdzYBAUFBRggLMAEzYBy29kEPgAAAAASUVORK5CYII=);background-repeat:no-repeat;background-position:center center}.geHsplit:hover,.geVsplit:hover{background-color:#d5d5d5}.geDialog{position:absolute;background:#fff;overflow:hidden;padding:30px;border:1px solid #acacac;-webkit-box-shadow:0 0 2px 2px #d5d5d5;-moz-box-shadow:0 0 2px 2px #d5d5d5;box-shadow:0 0 2px 2px #d5d5d5;z-index:2}.geDialogClose{position:absolute;width:9px;height:9px;opacity:.5;cursor:pointer}.geDialogClose:hover{opacity:1}.geDialogTitle{box-sizing:border-box;white-space:nowrap;background:#e5e5e5;border-bottom:1px solid silver;font-size:15px;font-weight:700;text-align:center;color:#235695}.geDialogFooter{background:#f5f5f5;white-space:nowrap;text-align:right;box-sizing:border-box;border-top:1px solid #e5e5e5;color:#a9a9a9}.geSprite{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAk/CAYAAACauMYVAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAAAsTAAALEwEAmpwYAAABWWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNS40LjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgpMwidZAAAWn0lEQVR4Ae2dW4gdxdbHO0aJYjzxTtR4EhSDSNB84kPEQOL9CB/Ex4igg8iAGCSgiIIQH1SOqJAnn4N4wBdvYBRBcYTIp0+OF0SDYoJRgyAmeA1e5lv/PrM6q6urqqu7a2/3ZP4NPVVdtda/Vv2qZ9Nrd++9i2IE2xJoHn/88XOq/ccff5RtepxSuv7HqxPE0GkNtC+lVH/YjiTSKoi+EaqA9T9OG3OW4xNdu3btHPZY9DGbRqRtYhiozaYhunfvXu95aoVCNjqzhqh2uGWbkLVPFrWRWgFfvSFqnW3dOtt2W7c2Zd2evI3OhAbr34g0wb/VZOGIjuRVagG+nrYuKQ1IgARIgARIgARIgARIoEbAm93BwmYb1mP58uXFoUOHgn6wTUok8K4Ddgj+9NNPxamnnhpNhpNENdL169eXVQj32jB93VUAEaJNxKORBtmEmGIAoNCBfGXS9C1TiLRF6huobNOp24g3b97cQBIU8HX4RJVp2+oH2dgI7aAp56m1Z50ESIAESIAESIAESIAESGCREtBMJXX6SclZqpjaUVRJ5CuPEabI623ii3rvXN/SVeFsgioO4SwRquDElNU7E3ZB+kTX9g5QH036kAAJkAAJkAAJkAAJkMDEEqiupBFh36vpsVxF1yJVnqkRjyVCDaoWaWqE6qzlWCKuRaojp0Y8lgg1qFqkqRGqs5ZjibgWqY6cGvFYItSgWJIACZAACZAACZAACZDAJBHwXknbAENX1bGr6IZoSMQO5KvbQUZyi9M36OC2xvRVMRWDnbb6jmT6FFW8+UoyzcdSlUbCVMVZkgAJkAAJkAAJkAAJTCqB1Pypc/yu8Jo1a6KfhE0eAMI7duyYS/04aJIwBCGsUeL507bPmbYKQwCCFsUgYQjaJ2MHC7uCvim1RVxLzSHY5YPUq1atKvbt21fTQBC9sxN8ltcnCNHGKCnR2g8HP/TQQ+U5/Mgjj1RajUjxiXc4hTYrCJtff/213K19pW4bUfdF7Aree++9tf+0p556qtRrRKribsSuoNr1KhEx9pAzonUjDtmynQRIgARIgARIgARIgASOGQLlNbrN6Hy3LNtm6/ovwC+qtVNom66v3/p7Ux4YuLsrZLNst686tiO5grZPHdCmbzCgzdp4I1VHX6kDou/AgQOFFW7Y25HU0ZauA/ps0mb9O0eq4uvWrWv9OrgaE3XsUmaJNDZgdPp29JiI2xcVdY1Tj72iOLE1SpRJJ7pvRBXRPpwuaLOnjfb5Ste/tPE1Rk9sR9n68/XUgcNDEiABEiABEiABEjgmCTTunMkl4Z65ublVbbM97rjj3v3999+3+uyqLFo7Ifjqq6+ulq1YsqQxJr6huXj77beLe+65Z5/6uGVDFAZysVtcdNFFXlGJrpDfPSp13nrrLczouauvvnpj2TD/x3vNjz5flOooUy8uvPDCDV9//fX/yb3ADc8///we7UMZFEXnn3/+WbzwwgvF559/XiBCbCeccEJx/fXXF4899tiyxx9/fNXpp5++VO4K19bAO/3SW/4goquuuqp4+OGHi08//bQ8vuyyy4rbb7+9ePTRR4svvvjioAyy9a+//jqiPt5y6dKl+z777DNZr6Pb+++/P3fHHXfMSd/cGWecMXf55Zcjc3lfBDZ4RdxGnyjkZ2Zm5q655ppSGOIiOuP66nGUKYx++eWX4pVXXilXfGpqqnjppZcKuZNbyDjrzzvvvJk33njjORXTMioqrIoPPvigPDdxmm3cuLG49tpri5tvvrm47bbbVkj/pp9//vlfL7744nYVRBldKBgsW7asEIbFWWedVZx00kkFBvrtt9/QVZ520r/ihx9+gOjOslH+REWx+hC0G04zWcjimWee2X/OOefsWrFiRfHtt98esjZeUTji39H3D4B29EvfPnkP5eErr7zS6pV1r+h7771XfPXVV0HRjz76qCFkGxqvGHIyPycru9Ia+eoS6az8l9UWyGfHNhIgARIgARIgARIgARLoQKBxfer6fvLJJ899/PHHZb506aWXvnvxxRdvdW3c48aV9O7du/eIUZUW3nXXXStvvPHGZbhUf/rpp1dK/z4VQUp5ySWXHJAHhuMJ75133rlKcqfVJ5988mpJJFYfPnx42ZNPPlk88cQTuPu4DG3og83999+/WjKTKgAdrJFHfffdd8Xs7OxWcd4sD//Ofvnll4UIlzvqDz74YCGPkIvJ7Nbvv/++TCpULFgijZTO1TK1nVI/hJTR3edTyNXnn3/+nIjDvrY1mGqvJAm7pP6iHjvlYee4dhgUffPNN9dLzrQG1sjyZJu56aabZlCZ31ZrxS2DoiI0Jcab4IDMT7bNr7/++gwqSMxuuOGGt1D3bY2F8hnNt22S/Goq0l91BSOtLI5W3paId0mEu+abuk8fGR1OeIlOme4Spip4dChPLRjpdddd1ztF7MLUE5O/aSSioek3/p89MZU2YO5uDVFZnAPyb/kf19B3LIL7pf2Ar49tJEACJEACJEACJEAC/Qh4c1O5sfWhXHz9MyK5Rx51/N9Qf+OqD4abNm36hxQrQk5XXHHFvyQz/PDss8++1GfjFf3xxx+RHm595513tp944ollBq3Octfs3YMHD+6US87/iPAeEd6ofVp6Rec7D956662N+6FHjhz5Hxl055lnnrlUbnduEFR75F5qTTgmWj5d/OyzzxYbNtSCXSaDrsSTx7fccstSYd+46o6KIuKVK1cWuIPeZWsVhZjcyC6++eYbPExcyLQLyZ6jYySJ4pamvFlQ3vPDImKXvCAo3CnlQSaCtzgQKcrQ1kkU2TQ+y3vKKafkiRR5KkSBAnxjWzDSBx54YEpuYJfLftpppxUXXHBBsWbNmkLOzZhe2ecVlYh2Crf9El352iBPG+BxhlIY4ueee24lLJxXvPbaaw9UDVLxrr68f7Lz7rvvxim0Wd548Z6k8q9a6sg7GKdKBaL/Lhvkj1dUOyXQ2fvuu08PG6Xc4C5PM7Hr+ZvkDUk2kAAJkAAJkAAJkAAJkAAJLFYC3vdQXBiS+jRvj4mR3AFO8nf1quPt27d3+qho5RirINpQxK6fN410jTZv3lxOH19Rlm3rEiUGbY1UMucySjzNnW3rGmVrpPqh4G3btnUK0nuehVZ58HnZKTQakwAJkAAJkAAJkAAJkAAJZCBQu+YPXeu3jTOWXKBXpGOJzMXTK1JXZCyR94p0LJG5OHpF6oqMJfJekY4lMhcHj0mABEiABEiABEiABEhgnkDXe1Ktd876kKVomJr9ZmFYYcF6f7uwHUaFswmqOISzRKiCE1NWGV/f9090JsdwFph99bOfp1ZQX/6yna8qqCvdVvKlr40Q+0mABEiABEiABEiABBY8gSqP8s2kLbcK5U4juZL2BTi4rTH9timHRrQoBk3fCtnBBomGZjVI1EZn69EPBsMwNMVQlPAZSaQQDm6xaGJ9I4m0lWksouAU2UECJEACJEACJEACJEACJEACWQnITzuVP5mLDEX3Qff4VCRUWnHYtM4GRvpZaDXGJ7j1B391IHusdt5SPwzs7ZRGDKaitgzZF4gm2Gk65JeuGsKmu55F4wemUjb50a+oWeM9lKi1dAKP/Fhawyz0vkDDkA0kQAIkQAIkQAIkQAIkQAILnkAtkUBe1GdGY0kiapG6UaZGPv5IUyNzZzT+SN0IUiMff6SpkbkzGn+kbgSpkY8lUjc4HpMACZAACZAACZAACZAACaQQaOSmqdf5Vty95h/vQ63u6DYyrYdmlSXS6enpOew6WBZRFdOSokoiXxl8Tjp0uqQMPZKFakRqT3p77qVEqDYjiVTFWZIACZAACZAACZAACZDARBKQa/0P5XeLD0lwbT8Z9E/Ywd6dSONKWn5XV38qO/yLyP9VQQa+Yt6+ptsQrfX2PFjkoo08SjHKyk7JzwtfrceeEovkaY5/2nhKnFb7vNAu+3ZfH9qCkaJTfjB9lxSHZcdT2ftl3yc7tk2YCSq+rXX15eTeKQIzUk75BHxtraI+p7a2hqgszgFx+lMd5Ri/Nr1fSvzrJm0NppJFb5Sp7pGFwI+aHZFfud4KJeFrBfEb8mCMH6FGENxIgARIgARIgARIgARIYHERQNJabnL17E+K1KCltPexWkwXWjc+WWw/XTw4foiBN/YswlYwqzCmqoKp025kfKmOMTuKxuj061s4TPvNj14kQAIkQAIkQAIkQAIkQAIBAqEsL9RuZRZOIsFI7bodra9ahdumRbFjx47qXSCta99R63qtegup3vzfI5w+vva2t4uiCwVnGxXqbYK+ILK0eacfmrY74t8WtRsIj0mABEiABEiABEiABEiABBYBAffWMb6lGd/dnTx1+63Xrpi+eWDLJGE4QBi7dcax+63Y+rXarcJWSOvuF4C7InZ2bl95rEJa4ru4vYZOozuLaMLb9l3cqu1+t3ctN0WEaqjl8uXLi0OHDtXstI8lCZAACZAACZAACZAACZAACTQIuFkfjhtGnoZg1uHLVNS/7Y6ZN49SwW3btpU3CiGCHcfYtF8HaS11yjaLW7t2bTVttEM0FUU5IBzcSKwojHw2NtoGUxXEdF0xOO7du3eJtbFiwbovClfcZ2MFGwu1bt26st8ytQ7arna2L1rXSFRAjXWRdPranlyqcKjstPp2VD29VFiFtF2Prc+g+tiFG6vfJfzZ2dklOAsk6i5utCUBEiABEiABEiABEiCBySGgl+DuNX9bhI2MTx0gpHW3nNws2kaqCVqndEf5WSG33mbT+H4pK+AmuuhDFm1tkuptUUCkzaaRR2l27Ca7GpG2q522t5YaiQqogy4S+rWtU6nCobLT6tuRQ/9R2t5b2A5i62MXbqy+jaatziy6jRD7SYAESIAESIAESOBYJtA9ffHQsDkAUsxoHmX9raNt13opNp9gJIvCOZToarKhAySXbZFaoUGX51bI1ilqaeSpk2kejlZlkTMtX6Xsi0Xolcgya6tXL336emgHaHMO9Zev/FYoR6ShwdhOAiRAAiRAAiRAAscYgZFk0dmupO2FXTZRe+WYbTWtaLZIbXQUtTTy1KvsxK5eHmlRySnK1c+2LJXQSJiOJDetIrWvh9U8elYq0Zznac9Y6EYCJEACJEACJEACC43AIsqid+/eXT41m+2qEYIQU+HBa0/BwQgLMiTDHgSynjZ4UdA924uDvmxp2WOSNRdm0TUcPCABEiABEiABEiCBTgQmK4vWa1m9Uhx870UF9VpWr211gE6s1BjOKqhtg0qNcpCI68woXSL9jnVxsq44F6ffYvi8Jo8lItIdEWc5hSAIMRVGOeScHMldcwTIjQRIgARIgARIgAQWAYHJyqJd4DaLru6duEZdj/VytKtf1N6KZovUjkhRSyNPnUzzcLQqi5wpPxdtTwbWSYAESIAESIAESOBYJTCSLLr6vGlXajYXhS+yaG0bdHkOIU3JVbBrcDX7mMigSGujmAOKGhiZqsHzNLa6vcceIsrV74096DgSpiPJoqtI7UvYkNMJTHgvOnhmsIMESIAESIAESIAESIAESCBEoPYW0tCsRDOc0GBsJwESIAESIAESIAESIAESIAESmFQCyAiHfGYyOC8Ij0RchbOLW2FXfLKy6FikwQWJdVjBLGeDCmYRQ+TugsRmwz4SIAESIAESIAESIAESIAESGD2B7GmPhnxsCE9WFj0yttkXa/IFlSVLEiABEiABEiABEiABEiABEuhEIHu6g9FVFGXWu5LZha2g1m3Ek5NFa3S2tJF2WnU1tmKoDxYc+epniVCnz5IESIAESIAESIAESIAESIAEJoMAUh2boA1OfVxBFbfCtYQ3hQNEQnb6Eebat4vFHEJCvvaRRFp9v5RvRF/byy+/7GsuQu1eY1+ju1h2kXz2bCMBEiABEiABEiABEiABEiCBBUYglh12zvgwdyuo+ahl0lnUCqqQK9xJ1CfoE66JxpzUOVZqxDXRmAP6YoOqIOw6iYaErWAvUVfYFUR/7y2GorcoHUmABEiABEiABEiABEiABEjg7yNg70IOvgNpxZA/2d0n3ppGpiZhNvOriaYKhBZAhWuiPuPUgVQQGq33omEcu8+MPivoCyzaZhfMt0BRZ3aSAAmQAAmQAAmQAAmQAAmQwGQTQKI2klQHwiMRV+Hs4iqoA1gstYQXBl1WVXNS9dPjLho121ikNcPUA52yCqf6Be1U0DIMGqd0ZIssZTDakAAJkAAJkAAJkAAJkAAJkEArgexpD0ZU0awpEMSseJZETUVDwr2zaJsx6yC2DQN22lQETqhjH4xARbMJ2uiyRKiMskaooixJgARIgARIgARIgARIgARIYDIIILvTtMeXS7U+fexOA4L6xDFyUew4HpRGIjJ3IBzb9pF8u5hv0GibjcgahtqtTbAOdtPT0zUEOB7EFKNBAJHpPlgwOAV2kAAJkAAJkAAJkAAJkAAJkMDfQmBQMuaLGIKaS/n6O7epIByzCFtBjaZVGE6xPZQutgprBL6yV6Q+IbfNCg+KMCSMAdy+QcfZBQdFQ2cSIAESIAESIAESIAESIAESyEIAqU5bulN7Tjo2qgrpt2Jt2bKlNO/1bDRutELQl+xqGunenK0Fp1NzS5+gOiYJq7GWfSL9e5hqxFoqGj1mSQIkQAIkQAIkQAIkQAIkQAILmIBmdFmmoGLImwYLWrHBgq7YEMEqNx0iAjzevD9npI01cMUbBkMarPgQHa+vins72UgCJEACJEACJEACJEACJEACIyWgGcnQLLAKcnEJji+LrgDnqGRfJA1q4Qlr5CxJgARIgARIgARIgARIgARIIIlA9rTHCmZJzV3BwaI+wb6i48uiEaHuSSsbM/IhiNkn97nCyY5thla4zZb9JEACJEACJEACJEACJEACJLBACNhUBxkfjgeF7gpqGtlHOCnh9T5YHZlCkmjEv+qyA9e++LuycCrWwenyHlbfe66fIXetQu2uXfDYXaw+ixQUZwcJkAAJkAAJkAAJkAAJkAAJTA4B5KZ9o6nSSCtgBbtme9BpiFpBHaircE3UJ9hHuBKNCapwrLSzqUThEBO2TjFx9NVE0eAT7iLoFXWFuwrCP7j5Ig4as4MESIAESIAESIAESIAESIAEFhYBe2dy8F1JK4Zcyu6p4rU0MjUha8sCK9FUwdAi2oEqURinClsB3yDVvWh0wjh27xl9bYK+Qao2u2CpC1Q5s0ICJEACJEACJEACJEACJEACC4OApj5ZolWx1CwwOqgVGyxoxbQeHT3SWSW8GpXmnnoc8a11qV+tUaODmNZrBkMOVBDiXaNtHdeKtxp3NVDxrn60JwESIAESIAESIAESIAESIIHhBDQjyZZHWcEsolYQ8x0s6goOEQ1m0V1FW7NoCGIbPH2IuAiyiLrC2URdYRxzIwESIAESIAESIAESIAESIIFjgIBNzpBD4bjPtKqnjyGgTxcjz8SO477CZTCh7C7UHptB0heBpQjbLDpJ1DrEImz0gd309HRtYXA8iClGgQCmqvtgwUbobCABEiABEiABEiABEiABEiCBiSCQkuV1ChSCmlN1cgwZqyD6swhbQR10kLBP0BWGTWhX20bpEx4UqY5ghbMIusIYQNuylNkFs0RFERIgARIgARIgARIgARIgARLIRgBpT5/Up3pO2kaiQvqtWFu2bCm7e92Uxc1XCCJ9tIOgrimle8PWtasdxwTVUIUViy3VplHGhFUwJdLRM3VD1+m57TwmgTCB/wdigVA7yGo0NAAAAABJRU5ErkJggg==) no-repeat top left;width:21px;height:21px}.geSprite-actualsize{background-position:0 0}.geSprite-bold{background-position:0 -46px}.geSprite-bottom{background-position:0 -92px}.geSprite-center{background-position:0 -138px}.geSprite-delete{background-position:0 -184px}.geSprite-fillcolor{background-position:0 -230px}.geSprite-fit{background-position:0 -276px}.geSprite-fontcolor{background-position:0 -322px}.geSprite-gradientcolor{background-position:0 -368px}.geSprite-image{background-position:0 -414px}.geSprite-italic{background-position:0 -460px}.geSprite-left{background-position:0 -506px}.geSprite-middle{background-position:0 -552px}.geSprite-print{background-position:0 -598px}.geSprite-redo{background-position:0 -644px}.geSprite-right{background-position:0 -690px}.geSprite-shadow{background-position:0 -736px}.geSprite-strokecolor{background-position:0 -782px}.geSprite-top{background-position:0 -828px}.geSprite-underline{background-position:0 -874px}.geSprite-undo{background-position:0 -920px}.geSprite-zoomin{background-position:0 -966px}.geSprite-zoomout{background-position:0 -1012px}.geSprite-helbow{background-position:0 -1058px}.geSprite-velbow{background-position:0 -1104px}.geSprite-straight{background-position:0 -1150px}.geSprite-entity{background-position:0 -1196px}.geSprite-segment{background-position:0 -1242px}.geSprite-orthogonal{background-position:0 -1288px}.geSprite-noarrow{background-position:0 -1334px}.geSprite-endclassic{background-position:0 -1380px}.geSprite-endopen{background-position:0 -1426px}.geSprite-endblock{background-position:0 -1472px}.geSprite-endoval{background-position:0 -1518px}.geSprite-enddiamond{background-position:0 -1564px}.geSprite-endthindiamond{background-position:0 -1610px}.geSprite-endclassictrans{background-position:0 -1656px}.geSprite-endblocktrans{background-position:0 -1702px}.geSprite-endovaltrans{background-position:0 -1748px}.geSprite-enddiamondtrans{background-position:0 -1794px}.geSprite-endthindiamondtrans{background-position:0 -1840px}.geSprite-startclassic{background-position:0 -1886px}.geSprite-startopen{background-position:0 -1932px}.geSprite-startblock{background-position:0 -1978px}.geSprite-startoval{background-position:0 -2024px}.geSprite-startdiamond{background-position:0 -2070px}.geSprite-startthindiamond{background-position:0 -2116px}.geSprite-startclassictrans{background-position:0 -2162px}.geSprite-startblocktrans{background-position:0 -2208px}.geSprite-startovaltrans{background-position:0 -2254px}.geSprite-startdiamondtrans{background-position:0 -2300px}.geSprite-startthindiamondtrans{background-position:0 -2346px}.geSprite-copy{background-position:0 -410px}.geSprite-cut{background-position:0 -320px}.geSprite-paste{background-position:0 -367px}.geSprite-duplicate{background-position:0 -736px}.geSprite-save{background-position:0 -782px}.geSprite-publish{background-position:0 -92px}.geBaseButton{padding:10px;border-radius:6px;border:1px solid silver;cursor:pointer;background-color:#ececec;background-image:linear-gradient(#ececec 0,#fcfcfc 100%)}.geBaseButton:hover{background:#ececec}.geBigButton{color:#fff;border:none;padding:10px;font-size:14pt;white-space:nowrap;border-radius:6px;text-shadow:#295989 0 1px 0;background-color:#428bca;background-image:linear-gradient(#4687ce 0,#3068a2 100%);-webkit-box-shadow:rgba(255,255,255,.0980392) 0 1px 0 0 inset,rgba(0,0,0,.2) 0 1px 1px 0;-moz-box-shadow:rgba(255,255,255,.0980392) 0 1px 0 0 inset,rgba(0,0,0,.2) 0 1px 1px 0;box-shadow:rgba(255,255,255,.0980392) 0 1px 0 0 inset,rgba(0,0,0,.2) 0 1px 1px 0}.geBigButton:hover{background-color:#2d6ca2;background-image:linear-gradient(#5a94d3 0,#3673b5 100%)}.geBigButton:active{background-color:#3673b5;background-image:none}@media print{div.geNoPrint{display:none!important}}html div.mxRubberband{border-color:#00d;background:#9cf}td.mxPopupMenuIcon div{width:16px;height:16px}html div.mxPopupMenu{-webkit-box-shadow:2px 2px 3px #d5d5d5;-moz-box-shadow:2px 2px 3px #d5d5d5;box-shadow:2px 2px 3px #d5d5d5;background:#fff;position:absolute;border:3px solid #e7e7e7;padding:3px}html table.mxPopupMenu{border-collapse:collapse;margin:0}html td.mxPopupMenuItem{padding:7px 30px 7px 30px;font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;font-size:10pt}html td.mxPopupMenuIcon{background-color:#fff;padding:0}td.mxPopupMenuIcon .geIcon{padding:2px;padding-bottom:4px;margin:2px;border:1px solid transparent;opacity:.5}td.mxPopupMenuIcon .geIcon:hover{border:1px solid gray;border-radius:2px;opacity:1}html tr.mxPopupMenuItemHover{background-color:#eee;color:#000}table.mxPopupMenu hr{color:#ccc;background-color:#ccc;border:none;height:1px}table.mxPopupMenu tr{font-size:4pt}html td.mxWindowTitle{font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;text-align:left;font-size:12px;color:#707070;padding:4px}div.mxTooltip{-webkit-box-shadow:3px 3px 12px silver;-moz-box-shadow:3px 3px 12px silver;box-shadow:3px 3px 12px silver;background:#ffc;border-style:solid;border-width:1px;border-color:#000;font-family:Arial;font-size:8pt;position:absolute;cursor:default;padding:4px;color:#000}body{font-family:Arial Unicode MS,Arial,Helvetica;font-size:10pt} \ No newline at end of file diff --git a/server/api/action/action.attributes.js b/server/api/action/action.attributes.js index c240f75..0a40fc5 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 _0xc4ff=['motionbar','jscripty','urlForward','browser','bot','script','Allowed\x20values:\x20contactManager,\x20integration,\x20motionbar,\x20jscripty,\x20urlForward,\x20browser,\x20bot,\x20script','integration[AccountId],\x20motionbar[TemplateId,URL,WinAppPath],\x20urlForward[URL]','motionbar[NULL,NULL,WinAppArguments]','TEXT','VIRTUAL','STRING','integration'];(function(_0x4095e3,_0x482a43){var _0x3f0d58=function(_0x2dc67e){while(--_0x2dc67e){_0x4095e3['push'](_0x4095e3['shift']());}};_0x3f0d58(++_0x482a43);}(_0xc4ff,0x19d));var _0xfc4f=function(_0x642f3e,_0x6278f){_0x642f3e=_0x642f3e-0x0;var _0x41b99e=_0xc4ff[_0x642f3e];return _0x41b99e;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0xfc4f('0x0')],'get':function(_0x2b9506){return this['getDataValue']('action');}},'action':{'type':Sequelize[_0xfc4f('0x1')],'allowNull':![],'validate':{'isIn':{'args':[['contactManager',_0xfc4f('0x2'),_0xfc4f('0x3'),_0xfc4f('0x4'),_0xfc4f('0x5'),_0xfc4f('0x6'),_0xfc4f('0x7'),_0xfc4f('0x8')]],'msg':_0xfc4f('0x9')}},'comment':_0xfc4f('0x9')},'data1':{'type':Sequelize[_0xfc4f('0x1')](0x1000),'comment':'contactManager[ListId],\x20integration[intName(zendesk)],\x20motionbar[Popup(0),URL(1),WinApp(2)],\x20urlForward[GET,POST],\x20browser[TemplateId(0),URL(1)]'},'data2':{'type':Sequelize[_0xfc4f('0x1')](0x1000),'comment':_0xfc4f('0xa')},'data3':{'type':Sequelize[_0xfc4f('0x1')](0x1000),'comment':_0xfc4f('0xb')},'data4':{'type':Sequelize[_0xfc4f('0x1')](0x1000)},'data5':{'type':Sequelize['STRING'](0x1000)},'data6':{'type':Sequelize['STRING']},'data7':{'type':Sequelize[_0xfc4f('0xc')]}}; \ No newline at end of file +var _0xb562=['TEXT','sequelize','exports','VIRTUAL','getDataValue','action','STRING','contactManager','integration','motionbar','urlForward','browser','bot','Allowed\x20values:\x20contactManager,\x20integration,\x20motionbar,\x20jscripty,\x20urlForward,\x20browser,\x20bot,\x20script','motionbar[NULL,NULL,WinAppArguments]'];(function(_0x24f31b,_0x44b8f3){var _0x488401=function(_0x204caf){while(--_0x204caf){_0x24f31b['push'](_0x24f31b['shift']());}};_0x488401(++_0x44b8f3);}(_0xb562,0x187));var _0x2b56=function(_0x2ddb3a,_0x2335e6){_0x2ddb3a=_0x2ddb3a-0x0;var _0x99f48c=_0xb562[_0x2ddb3a];return _0x99f48c;};'use strict';var Sequelize=require(_0x2b56('0x0'));module[_0x2b56('0x1')]={'name':{'type':Sequelize[_0x2b56('0x2')],'get':function(_0x23609b){return this[_0x2b56('0x3')](_0x2b56('0x4'));}},'action':{'type':Sequelize[_0x2b56('0x5')],'allowNull':![],'validate':{'isIn':{'args':[[_0x2b56('0x6'),_0x2b56('0x7'),_0x2b56('0x8'),'jscripty',_0x2b56('0x9'),_0x2b56('0xa'),_0x2b56('0xb'),'script']],'msg':_0x2b56('0xc')}},'comment':_0x2b56('0xc')},'data1':{'type':Sequelize[_0x2b56('0x5')](0x1000),'comment':'contactManager[ListId],\x20integration[intName(zendesk)],\x20motionbar[Popup(0),URL(1),WinApp(2)],\x20urlForward[GET,POST],\x20browser[TemplateId(0),URL(1)]'},'data2':{'type':Sequelize[_0x2b56('0x5')](0x1000),'comment':'integration[AccountId],\x20motionbar[TemplateId,URL,WinAppPath],\x20urlForward[URL]'},'data3':{'type':Sequelize['STRING'](0x1000),'comment':_0x2b56('0xd')},'data4':{'type':Sequelize[_0x2b56('0x5')](0x1000)},'data5':{'type':Sequelize[_0x2b56('0x5')](0x1000)},'data6':{'type':Sequelize[_0x2b56('0x5')]},'data7':{'type':Sequelize[_0x2b56('0xe')]}}; \ No newline at end of file diff --git a/server/api/action/action.controller.js b/server/api/action/action.controller.js index e26ea14..155b01c 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 _0xc8c7=['moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','papaparse','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','end','json','offset','undefined','limit','count','Content-Range','apply','reject','save','update','then','destroy','error','stack','name','send','body','Action','params','catch','eml-format','rimraf','zip-dir','fast-json-patch','request-promise'];(function(_0x8521ef,_0x3d6b3f){var _0x3d184a=function(_0x34e9cf){while(--_0x34e9cf){_0x8521ef['push'](_0x8521ef['shift']());}};_0x3d184a(++_0x3d6b3f);}(_0xc8c7,0xeb));var _0x7c8c=function(_0x2302a7,_0x7689fb){_0x2302a7=_0x2302a7-0x0;var _0x561f6c=_0xc8c7[_0x2302a7];return _0x561f6c;};'use strict';var emlformat=require(_0x7c8c('0x0'));var rimraf=require(_0x7c8c('0x1'));var zipdir=require(_0x7c8c('0x2'));var jsonpatch=require(_0x7c8c('0x3'));var rp=require(_0x7c8c('0x4'));var moment=require(_0x7c8c('0x5'));var BPromise=require(_0x7c8c('0x6'));var Mustache=require(_0x7c8c('0x7'));var util=require(_0x7c8c('0x8'));var path=require(_0x7c8c('0x9'));var sox=require(_0x7c8c('0xa'));var csv=require(_0x7c8c('0xb'));var ejs=require(_0x7c8c('0xc'));var fs=require('fs');var fs_extra=require(_0x7c8c('0xd'));var _=require(_0x7c8c('0xe'));var squel=require('squel');var crypto=require(_0x7c8c('0xf'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x7c8c('0xb'));var querystring=require('querystring');var Papa=require(_0x7c8c('0x10'));var Redis=require(_0x7c8c('0x11'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x7c8c('0x12'));var hardwareService=require(_0x7c8c('0x13'));var logger=require(_0x7c8c('0x14'))(_0x7c8c('0x15'));var utils=require(_0x7c8c('0x16'));var config=require(_0x7c8c('0x17'));var licenseUtil=require(_0x7c8c('0x18'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x51ec61,_0x11525f){_0x11525f=_0x11525f||0xcc;return function(_0x3d8e98){if(_0x3d8e98){return _0x51ec61[_0x7c8c('0x19')](_0x11525f);}return _0x51ec61[_0x7c8c('0x1a')](_0x11525f)[_0x7c8c('0x1b')]();};}function respondWithResult(_0x19a6a0,_0x16e0d){_0x16e0d=_0x16e0d||0xc8;return function(_0x2bc7a4){if(_0x2bc7a4){return _0x19a6a0[_0x7c8c('0x1a')](_0x16e0d)[_0x7c8c('0x1c')](_0x2bc7a4);}};}function respondWithFilteredResult(_0x3b6eba,_0x3e8adf){return function(_0x2d068e){if(_0x2d068e){var _0x3c521d=typeof _0x3e8adf[_0x7c8c('0x1d')]===_0x7c8c('0x1e')&&typeof _0x3e8adf[_0x7c8c('0x1f')]==='undefined';var _0x4d0f9d=_0x2d068e[_0x7c8c('0x20')];var _0x295126=_0x3c521d?0x0:_0x3e8adf[_0x7c8c('0x1d')];var _0x90fcef=_0x3c521d?_0x2d068e[_0x7c8c('0x20')]:_0x3e8adf[_0x7c8c('0x1d')]+_0x3e8adf[_0x7c8c('0x1f')];var _0x19a5e0;if(_0x90fcef>=_0x4d0f9d){_0x90fcef=_0x4d0f9d;_0x19a5e0=0xc8;}else{_0x19a5e0=0xce;}_0x3b6eba[_0x7c8c('0x1a')](_0x19a5e0);return _0x3b6eba['set'](_0x7c8c('0x21'),_0x295126+'-'+_0x90fcef+'/'+_0x4d0f9d)[_0x7c8c('0x1c')](_0x2d068e);}return null;};}function patchUpdates(_0x2f8d5f){return function(_0x367f64){try{jsonpatch[_0x7c8c('0x22')](_0x367f64,_0x2f8d5f,!![]);}catch(_0x214f91){return BPromise[_0x7c8c('0x23')](_0x214f91);}return _0x367f64[_0x7c8c('0x24')]();};}function saveUpdates(_0x534dfd,_0x27f4f5){return function(_0x5ebc57){if(_0x5ebc57){return _0x5ebc57[_0x7c8c('0x25')](_0x534dfd)[_0x7c8c('0x26')](function(_0x17377e){return _0x17377e;});}return null;};}function removeEntity(_0x6c4686,_0x1602f0){return function(_0x47556e){if(_0x47556e){return _0x47556e[_0x7c8c('0x27')]()[_0x7c8c('0x26')](function(){_0x6c4686[_0x7c8c('0x1a')](0xcc)[_0x7c8c('0x1b')]();});}};}function handleEntityNotFound(_0x27a210,_0x4c7c87){return function(_0x59c18a){if(!_0x59c18a){_0x27a210[_0x7c8c('0x19')](0x194);}return _0x59c18a;};}function handleError(_0x2da901,_0x3371ba){_0x3371ba=_0x3371ba||0x1f4;return function(_0x1c7511){logger[_0x7c8c('0x28')](_0x1c7511[_0x7c8c('0x29')]);if(_0x1c7511[_0x7c8c('0x2a')]){delete _0x1c7511[_0x7c8c('0x2a')];}_0x2da901[_0x7c8c('0x1a')](_0x3371ba)[_0x7c8c('0x2b')](_0x1c7511);};}exports[_0x7c8c('0x25')]=function(_0x53d38e,_0xe84d54){if(_0x53d38e[_0x7c8c('0x2c')]['id']){delete _0x53d38e[_0x7c8c('0x2c')]['id'];}return db[_0x7c8c('0x2d')]['find']({'where':{'id':_0x53d38e[_0x7c8c('0x2e')]['id']}})[_0x7c8c('0x26')](handleEntityNotFound(_0xe84d54,null))[_0x7c8c('0x26')](saveUpdates(_0x53d38e[_0x7c8c('0x2c')],null))['then'](respondWithResult(_0xe84d54,null))[_0x7c8c('0x2f')](handleError(_0xe84d54,null));};exports['destroy']=function(_0x463434,_0x349e16){return db[_0x7c8c('0x2d')]['find']({'where':{'id':_0x463434[_0x7c8c('0x2e')]['id']}})[_0x7c8c('0x26')](handleEntityNotFound(_0x349e16,null))[_0x7c8c('0x26')](removeEntity(_0x349e16,null))[_0x7c8c('0x2f')](handleError(_0x349e16,null));}; \ No newline at end of file +var _0xa600=['count','offset','set','Content-Range','reject','update','destroy','then','sendStatus','error','name','send','body','Action','find','params','catch','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','fs-extra','lodash','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','end','json','undefined','limit'];(function(_0x3c693f,_0x2d4853){var _0x38d237=function(_0x499c69){while(--_0x499c69){_0x3c693f['push'](_0x3c693f['shift']());}};_0x38d237(++_0x2d4853);}(_0xa600,0x161));var _0x0a60=function(_0x7729b1,_0x468322){_0x7729b1=_0x7729b1-0x0;var _0x349504=_0xa600[_0x7729b1];return _0x349504;};'use strict';var emlformat=require(_0x0a60('0x0'));var rimraf=require(_0x0a60('0x1'));var zipdir=require(_0x0a60('0x2'));var jsonpatch=require(_0x0a60('0x3'));var rp=require(_0x0a60('0x4'));var moment=require(_0x0a60('0x5'));var BPromise=require(_0x0a60('0x6'));var Mustache=require(_0x0a60('0x7'));var util=require(_0x0a60('0x8'));var path=require(_0x0a60('0x9'));var sox=require(_0x0a60('0xa'));var csv=require(_0x0a60('0xb'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x0a60('0xc'));var _=require(_0x0a60('0xd'));var squel=require('squel');var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x0a60('0xe'));var Papa=require(_0x0a60('0xf'));var Redis=require(_0x0a60('0x10'));var authService=require(_0x0a60('0x11'));var qs=require(_0x0a60('0x12'));var as=require(_0x0a60('0x13'));var hardwareService=require(_0x0a60('0x14'));var logger=require('../../config/logger')(_0x0a60('0x15'));var utils=require(_0x0a60('0x16'));var config=require(_0x0a60('0x17'));var licenseUtil=require(_0x0a60('0x18'));var db=require(_0x0a60('0x19'))['db'];function respondWithStatusCode(_0x425656,_0x4ece78){_0x4ece78=_0x4ece78||0xcc;return function(_0x1c5e06){if(_0x1c5e06){return _0x425656['sendStatus'](_0x4ece78);}return _0x425656[_0x0a60('0x1a')](_0x4ece78)[_0x0a60('0x1b')]();};}function respondWithResult(_0x14426c,_0x29bc3f){_0x29bc3f=_0x29bc3f||0xc8;return function(_0x4f0e5a){if(_0x4f0e5a){return _0x14426c[_0x0a60('0x1a')](_0x29bc3f)[_0x0a60('0x1c')](_0x4f0e5a);}};}function respondWithFilteredResult(_0xc046d9,_0x29bed9){return function(_0x23a76b){if(_0x23a76b){var _0x1162db=typeof _0x29bed9['offset']===_0x0a60('0x1d')&&typeof _0x29bed9[_0x0a60('0x1e')]===_0x0a60('0x1d');var _0x11b697=_0x23a76b[_0x0a60('0x1f')];var _0x18903a=_0x1162db?0x0:_0x29bed9[_0x0a60('0x20')];var _0x59ef2b=_0x1162db?_0x23a76b[_0x0a60('0x1f')]:_0x29bed9['offset']+_0x29bed9[_0x0a60('0x1e')];var _0x186664;if(_0x59ef2b>=_0x11b697){_0x59ef2b=_0x11b697;_0x186664=0xc8;}else{_0x186664=0xce;}_0xc046d9[_0x0a60('0x1a')](_0x186664);return _0xc046d9[_0x0a60('0x21')](_0x0a60('0x22'),_0x18903a+'-'+_0x59ef2b+'/'+_0x11b697)[_0x0a60('0x1c')](_0x23a76b);}return null;};}function patchUpdates(_0xce9362){return function(_0x1910df){try{jsonpatch['apply'](_0x1910df,_0xce9362,!![]);}catch(_0x4e945f){return BPromise[_0x0a60('0x23')](_0x4e945f);}return _0x1910df['save']();};}function saveUpdates(_0xe73db5,_0x3e593f){return function(_0x57d301){if(_0x57d301){return _0x57d301[_0x0a60('0x24')](_0xe73db5)['then'](function(_0x35a7a2){return _0x35a7a2;});}return null;};}function removeEntity(_0x547ace,_0x4beea0){return function(_0x412207){if(_0x412207){return _0x412207[_0x0a60('0x25')]()[_0x0a60('0x26')](function(){_0x547ace[_0x0a60('0x1a')](0xcc)[_0x0a60('0x1b')]();});}};}function handleEntityNotFound(_0xa49b68,_0x4e77f0){return function(_0x1e1ce6){if(!_0x1e1ce6){_0xa49b68[_0x0a60('0x27')](0x194);}return _0x1e1ce6;};}function handleError(_0x102171,_0x22ad8c){_0x22ad8c=_0x22ad8c||0x1f4;return function(_0xe97d27){logger[_0x0a60('0x28')](_0xe97d27['stack']);if(_0xe97d27[_0x0a60('0x29')]){delete _0xe97d27[_0x0a60('0x29')];}_0x102171[_0x0a60('0x1a')](_0x22ad8c)[_0x0a60('0x2a')](_0xe97d27);};}exports[_0x0a60('0x24')]=function(_0xa09e3e,_0x14127c){if(_0xa09e3e[_0x0a60('0x2b')]['id']){delete _0xa09e3e[_0x0a60('0x2b')]['id'];}return db[_0x0a60('0x2c')][_0x0a60('0x2d')]({'where':{'id':_0xa09e3e[_0x0a60('0x2e')]['id']}})[_0x0a60('0x26')](handleEntityNotFound(_0x14127c,null))[_0x0a60('0x26')](saveUpdates(_0xa09e3e[_0x0a60('0x2b')],null))['then'](respondWithResult(_0x14127c,null))['catch'](handleError(_0x14127c,null));};exports[_0x0a60('0x25')]=function(_0x473459,_0x3d57e8){return db[_0x0a60('0x2c')][_0x0a60('0x2d')]({'where':{'id':_0x473459[_0x0a60('0x2e')]['id']}})[_0x0a60('0x26')](handleEntityNotFound(_0x3d57e8,null))[_0x0a60('0x26')](removeEntity(_0x3d57e8,null))[_0x0a60('0x2f')](handleError(_0x3d57e8,null));}; \ No newline at end of file diff --git a/server/api/action/action.model.js b/server/api/action/action.model.js index f621cf3..2e45bb8 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 _0x90bc=['tools_actions','lodash','util','../../config/logger','api','moment','rimraf','./action.attributes','define','Action'];(function(_0x3b8f2e,_0x5a99a8){var _0x1433d5=function(_0x5e0353){while(--_0x5e0353){_0x3b8f2e['push'](_0x3b8f2e['shift']());}};_0x1433d5(++_0x5a99a8);}(_0x90bc,0x14b));var _0xc90b=function(_0x4c5467,_0x4bc655){_0x4c5467=_0x4c5467-0x0;var _0x5d9055=_0x90bc[_0x4c5467];return _0x5d9055;};'use strict';var _=require(_0xc90b('0x0'));var util=require(_0xc90b('0x1'));var logger=require(_0xc90b('0x2'))(_0xc90b('0x3'));var moment=require(_0xc90b('0x4'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xc90b('0x5'));var config=require('../../config/environment');var attributes=require(_0xc90b('0x6'));module['exports']=function(_0x944894,_0x2fdbf3){return _0x944894[_0xc90b('0x7')](_0xc90b('0x8'),attributes,{'tableName':_0xc90b('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xa244=['tools_actions','lodash','moment','bluebird','request-promise','path','rimraf','./action.attributes','exports','define','Action'];(function(_0x4a9fb1,_0x273043){var _0x348672=function(_0x142b69){while(--_0x142b69){_0x4a9fb1['push'](_0x4a9fb1['shift']());}};_0x348672(++_0x273043);}(_0xa244,0xd2));var _0x4a24=function(_0x593cbd,_0x141c5b){_0x593cbd=_0x593cbd-0x0;var _0x1ea4aa=_0xa244[_0x593cbd];return _0x1ea4aa;};'use strict';var _=require(_0x4a24('0x0'));var util=require('util');var logger=require('../../config/logger')('api');var moment=require(_0x4a24('0x1'));var BPromise=require(_0x4a24('0x2'));var rp=require(_0x4a24('0x3'));var fs=require('fs');var path=require(_0x4a24('0x4'));var rimraf=require(_0x4a24('0x5'));var config=require('../../config/environment');var attributes=require(_0x4a24('0x6'));module[_0x4a24('0x7')]=function(_0x4fd8e5,_0x45b9c0){return _0x4fd8e5[_0x4a24('0x8')](_0x4a24('0x9'),attributes,{'tableName':_0x4a24('0xa'),'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 a4bdeb2..f1ec352 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 _0x814b=['info','Action,\x20%s,\x20%s','request\x20sent','debug','Action,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then'];(function(_0x363ef8,_0x4ecb1a){var _0x148822=function(_0x232634){while(--_0x232634){_0x363ef8['push'](_0x363ef8['shift']());}};_0x148822(++_0x4ecb1a);}(_0x814b,0x1a2));var _0xb814=function(_0x54fbff,_0x53470e){_0x54fbff=_0x54fbff-0x0;var _0x5cf619=_0x814b[_0x54fbff];return _0x5cf619;};'use strict';var _=require(_0xb814('0x0'));var util=require(_0xb814('0x1'));var moment=require(_0xb814('0x2'));var BPromise=require(_0xb814('0x3'));var rs=require(_0xb814('0x4'));var fs=require('fs');var Redis=require(_0xb814('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xb814('0x6'));var logger=require(_0xb814('0x7'))(_0xb814('0x8'));var config=require(_0xb814('0x9'));var jayson=require(_0xb814('0xa'));var client=jayson[_0xb814('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x3b0829,_0x2e6272,_0x5c8539){return new BPromise(function(_0x271af9,_0x2913a6){return client[_0xb814('0xc')](_0x3b0829,_0x5c8539)[_0xb814('0xd')](function(_0x1fea33){logger[_0xb814('0xe')](_0xb814('0xf'),_0x2e6272,_0xb814('0x10'));logger[_0xb814('0x11')](_0xb814('0x12'),_0x2e6272,_0xb814('0x10'),JSON['stringify'](_0x1fea33));if(_0x1fea33[_0xb814('0x13')]){if(_0x1fea33['error'][_0xb814('0x14')]===0x1f4){logger[_0xb814('0x13')](_0xb814('0xf'),_0x2e6272,_0x1fea33[_0xb814('0x13')][_0xb814('0x15')]);return _0x2913a6(_0x1fea33[_0xb814('0x13')][_0xb814('0x15')]);}logger[_0xb814('0x13')](_0xb814('0xf'),_0x2e6272,_0x1fea33[_0xb814('0x13')][_0xb814('0x15')]);return _0x271af9(_0x1fea33[_0xb814('0x13')][_0xb814('0x15')]);}else{logger[_0xb814('0xe')](_0xb814('0xf'),_0x2e6272,_0xb814('0x10'));_0x271af9(_0x1fea33[_0xb814('0x16')][_0xb814('0x15')]);}})[_0xb814('0x17')](function(_0x21b73f){logger[_0xb814('0x13')]('Action,\x20%s,\x20%s',_0x2e6272,_0x21b73f);_0x2913a6(_0x21b73f);});});} \ No newline at end of file +var _0xc4aa=['moment','bluebird','randomstring','ioredis','rpc','../../config/environment','jayson/promise','client','http','request','then','Action,\x20%s,\x20%s','request\x20sent','debug','error','code','message','info','catch','lodash','util'];(function(_0x38cf9a,_0x5d0153){var _0x366de7=function(_0xfbc551){while(--_0xfbc551){_0x38cf9a['push'](_0x38cf9a['shift']());}};_0x366de7(++_0x5d0153);}(_0xc4aa,0x1b7));var _0xac4a=function(_0x4792c8,_0x5158a1){_0x4792c8=_0x4792c8-0x0;var _0x35edb1=_0xc4aa[_0x4792c8];return _0x35edb1;};'use strict';var _=require(_0xac4a('0x0'));var util=require(_0xac4a('0x1'));var moment=require(_0xac4a('0x2'));var BPromise=require(_0xac4a('0x3'));var rs=require(_0xac4a('0x4'));var fs=require('fs');var Redis=require(_0xac4a('0x5'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xac4a('0x6'));var config=require(_0xac4a('0x7'));var jayson=require(_0xac4a('0x8'));var client=jayson[_0xac4a('0x9')][_0xac4a('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x15cd34,_0x3ef77c,_0x10525b){return new BPromise(function(_0x5c6179,_0x5b8339){return client[_0xac4a('0xb')](_0x15cd34,_0x10525b)[_0xac4a('0xc')](function(_0x26ec84){logger['info'](_0xac4a('0xd'),_0x3ef77c,_0xac4a('0xe'));logger[_0xac4a('0xf')]('Action,\x20%s,\x20%s,\x20%s',_0x3ef77c,_0xac4a('0xe'),JSON['stringify'](_0x26ec84));if(_0x26ec84[_0xac4a('0x10')]){if(_0x26ec84['error'][_0xac4a('0x11')]===0x1f4){logger[_0xac4a('0x10')](_0xac4a('0xd'),_0x3ef77c,_0x26ec84['error'][_0xac4a('0x12')]);return _0x5b8339(_0x26ec84[_0xac4a('0x10')][_0xac4a('0x12')]);}logger[_0xac4a('0x10')](_0xac4a('0xd'),_0x3ef77c,_0x26ec84[_0xac4a('0x10')][_0xac4a('0x12')]);return _0x5c6179(_0x26ec84[_0xac4a('0x10')][_0xac4a('0x12')]);}else{logger[_0xac4a('0x13')](_0xac4a('0xd'),_0x3ef77c,_0xac4a('0xe'));_0x5c6179(_0x26ec84['result'][_0xac4a('0x12')]);}})[_0xac4a('0x14')](function(_0x23eb66){logger[_0xac4a('0x10')](_0xac4a('0xd'),_0x3ef77c,_0x23eb66);_0x5b8339(_0x23eb66);});});} \ No newline at end of file diff --git a/server/api/action/index.js b/server/api/action/index.js index 60ed17d..2edc85b 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 _0xcdd6=['connect-timeout','express','fs-extra','../../components/interaction/service','../../config/environment','./action.controller','put','/:id','update','isAuthenticated','destroy','exports','util','path'];(function(_0x185744,_0x57d943){var _0x5780c6=function(_0x17645c){while(--_0x17645c){_0x185744['push'](_0x185744['shift']());}};_0x5780c6(++_0x57d943);}(_0xcdd6,0x1be));var _0x6cdd=function(_0xe056e6,_0xaf0fe2){_0xe056e6=_0xe056e6-0x0;var _0x47ce1a=_0xcdd6[_0xe056e6];return _0x47ce1a;};'use strict';var multer=require('multer');var util=require(_0x6cdd('0x0'));var path=require(_0x6cdd('0x1'));var timeout=require(_0x6cdd('0x2'));var express=require(_0x6cdd('0x3'));var router=express['Router']();var fs_extra=require(_0x6cdd('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x6cdd('0x5'));var config=require(_0x6cdd('0x6'));var controller=require(_0x6cdd('0x7'));router[_0x6cdd('0x8')](_0x6cdd('0x9'),auth['isAuthenticated'](),controller[_0x6cdd('0xa')]);router['delete'](_0x6cdd('0x9'),auth[_0x6cdd('0xb')](),controller[_0x6cdd('0xc')]);module[_0x6cdd('0xd')]=router; \ No newline at end of file +var _0x4085=['express','Router','fs-extra','./action.controller','put','/:id','isAuthenticated','update','delete','destroy','multer','util','connect-timeout'];(function(_0x2af9a8,_0xb5f118){var _0x415971=function(_0x4b1248){while(--_0x4b1248){_0x2af9a8['push'](_0x2af9a8['shift']());}};_0x415971(++_0xb5f118);}(_0x4085,0x72));var _0x5408=function(_0xbbdbfd,_0x12f832){_0xbbdbfd=_0xbbdbfd-0x0;var _0x504018=_0x4085[_0xbbdbfd];return _0x504018;};'use strict';var multer=require(_0x5408('0x0'));var util=require(_0x5408('0x1'));var path=require('path');var timeout=require(_0x5408('0x2'));var express=require(_0x5408('0x3'));var router=express[_0x5408('0x4')]();var fs_extra=require(_0x5408('0x5'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x5408('0x6'));router[_0x5408('0x7')](_0x5408('0x8'),auth[_0x5408('0x9')](),controller[_0x5408('0xa')]);router[_0x5408('0xb')](_0x5408('0x8'),auth[_0x5408('0x9')](),controller[_0x5408('0xc')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/analyticCustomReport/analyticCustomReport.attributes.js b/server/api/analyticCustomReport/analyticCustomReport.attributes.js index 92e8c18..283a29f 100644 --- a/server/api/analyticCustomReport/analyticCustomReport.attributes.js +++ b/server/api/analyticCustomReport/analyticCustomReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x038b=['exports','STRING','TEXT'];(function(_0x4a747d,_0x3b747f){var _0x3a5b5c=function(_0x4b3e81){while(--_0x4b3e81){_0x4a747d['push'](_0x4a747d['shift']());}};_0x3a5b5c(++_0x3b747f);}(_0x038b,0x114));var _0xb038=function(_0x3c12e2,_0x3497a8){_0x3c12e2=_0x3c12e2-0x0;var _0x417791=_0x038b[_0x3c12e2];return _0x417791;};'use strict';var Sequelize=require('sequelize');module[_0xb038('0x0')]={'name':{'type':Sequelize[_0xb038('0x1')],'allowNull':![]},'description':{'type':Sequelize[_0xb038('0x1')]},'parent':{'type':Sequelize['STRING']},'table':{'type':Sequelize[_0xb038('0x1')]},'conditions':{'type':Sequelize['TEXT']},'joins':{'type':Sequelize[_0xb038('0x2')]}}; \ No newline at end of file +var _0xb138=['TEXT','sequelize','exports','STRING'];(function(_0x1c3439,_0x3a29db){var _0x3c6daa=function(_0x4987b5){while(--_0x4987b5){_0x1c3439['push'](_0x1c3439['shift']());}};_0x3c6daa(++_0x3a29db);}(_0xb138,0x1dd));var _0x8b13=function(_0x4f2320,_0x2d94f9){_0x4f2320=_0x4f2320-0x0;var _0x38f2b6=_0xb138[_0x4f2320];return _0x38f2b6;};'use strict';var Sequelize=require(_0x8b13('0x0'));module[_0x8b13('0x1')]={'name':{'type':Sequelize[_0x8b13('0x2')],'allowNull':![]},'description':{'type':Sequelize[_0x8b13('0x2')]},'parent':{'type':Sequelize[_0x8b13('0x2')]},'table':{'type':Sequelize[_0x8b13('0x2')]},'conditions':{'type':Sequelize[_0x8b13('0x3')]},'joins':{'type':Sequelize['TEXT']}}; \ No newline at end of file diff --git a/server/api/analyticCustomReport/analyticCustomReport.controller.js b/server/api/analyticCustomReport/analyticCustomReport.controller.js index 48d20ff..a12cbbd 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 _0x7760=['csv','AnalyticExtractedReport','cdr','.calldate\x20BETWEEN\x20?\x20AND\x20?','startDate','endDate','.createdAt\x20BETWEEN\x20?\x20AND\x20?','info','child_process','fork','../../files/reports','savename','countTable','COUNT(*)','run','runReport','MIN(%s)','GROUP_CONCAT(%s)','getFields','eml-format','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','ejs','fs-extra','lodash','crypto','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','status','undefined','limit','offset','Content-Range','json','apply','save','update','then','destroy','get','CustomReports','UserProfileResource','error','stack','name','send','map','AnalyticCustomReport','fieldName','type','key','model','keys','query','filters','intersection','attributes','length','hasOwnProperty','order','sort','pick','merge','where','VIRTUAL','options','count','include','findAll','rows','catch','rawAttributes','includeAll','find','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','Reports','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','params','preview','join','right_join','cross_join','SUM(%s)','COUNT(%s)','COUNT(DISTINCT\x20%s)','AVG(%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','Sequelize','ValidationErrorItem','Please\x20insert\x20at\x20least\x20one\x20field','keyBy','select','from','table','MetricId','metric','function','format','replace','groupBy','orderBy','DESC','alias','joins','parse','parentKey','foreignTable','%s.%s\x20=\x20%s.%s','foreignKey','conditions','clone','debug','Limited\x20Query:','toString','sequelize','QueryTypes','SELECT','left_join','MAX(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','ROUND(%s)','IS\x20NULL','IS\x20NOT\x20NULL','operator','AnalyticMetric','output','web','fullPath','%s-%s.%s','randomstring','generate'];(function(_0x181b83,_0x4c39cc){var _0x377c43=function(_0x5a1324){while(--_0x5a1324){_0x181b83['push'](_0x181b83['shift']());}};_0x377c43(++_0x4c39cc);}(_0x7760,0x15d));var _0x0776=function(_0x51020b,_0x38c2c7){_0x51020b=_0x51020b-0x0;var _0x371e47=_0x7760[_0x51020b];return _0x371e47;};'use strict';var emlformat=require(_0x0776('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x0776('0x1'));var jsonpatch=require(_0x0776('0x2'));var rp=require('request-promise');var moment=require(_0x0776('0x3'));var BPromise=require(_0x0776('0x4'));var Mustache=require(_0x0776('0x5'));var util=require(_0x0776('0x6'));var path=require(_0x0776('0x7'));var sox=require(_0x0776('0x8'));var csv=require('to-csv');var ejs=require(_0x0776('0x9'));var fs=require('fs');var fs_extra=require(_0x0776('0xa'));var _=require(_0x0776('0xb'));var squel=require('squel');var crypto=require(_0x0776('0xc'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x0776('0xd'));var querystring=require(_0x0776('0xe'));var Papa=require(_0x0776('0xf'));var Redis=require(_0x0776('0x10'));var authService=require(_0x0776('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0x0776('0x12'));var hardwareService=require(_0x0776('0x13'));var logger=require(_0x0776('0x14'))(_0x0776('0x15'));var utils=require(_0x0776('0x16'));var config=require(_0x0776('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0x0776('0x18'))['db'];var dbH=require(_0x0776('0x18'))['dbH'];function respondWithStatusCode(_0x129c22,_0x2b4e77){_0x2b4e77=_0x2b4e77||0xcc;return function(_0x48f0e4){if(_0x48f0e4){return _0x129c22['sendStatus'](_0x2b4e77);}return _0x129c22[_0x0776('0x19')](_0x2b4e77)['end']();};}function respondWithResult(_0x1b8d69,_0x18be65){_0x18be65=_0x18be65||0xc8;return function(_0x22570b){if(_0x22570b){return _0x1b8d69[_0x0776('0x19')](_0x18be65)['json'](_0x22570b);}};}function respondWithFilteredResult(_0x500d47,_0x25c151){return function(_0x2a44a9){if(_0x2a44a9){var _0x30b5ad=typeof _0x25c151['offset']===_0x0776('0x1a')&&typeof _0x25c151[_0x0776('0x1b')]==='undefined';var _0x877583=_0x2a44a9['count'];var _0x5cef92=_0x30b5ad?0x0:_0x25c151[_0x0776('0x1c')];var _0x34509c=_0x30b5ad?_0x2a44a9['count']:_0x25c151[_0x0776('0x1c')]+_0x25c151['limit'];var _0x88c7ec;if(_0x34509c>=_0x877583){_0x34509c=_0x877583;_0x88c7ec=0xc8;}else{_0x88c7ec=0xce;}_0x500d47['status'](_0x88c7ec);return _0x500d47['set'](_0x0776('0x1d'),_0x5cef92+'-'+_0x34509c+'/'+_0x877583)[_0x0776('0x1e')](_0x2a44a9);}return null;};}function patchUpdates(_0x33f2c7){return function(_0xa0c8bd){try{jsonpatch[_0x0776('0x1f')](_0xa0c8bd,_0x33f2c7,!![]);}catch(_0x2b02b1){return BPromise['reject'](_0x2b02b1);}return _0xa0c8bd[_0x0776('0x20')]();};}function saveUpdates(_0x43f271,_0x1e735d){return function(_0x36f321){if(_0x36f321){return _0x36f321[_0x0776('0x21')](_0x43f271)[_0x0776('0x22')](function(_0x3c81d4){return _0x3c81d4;});}return null;};}function removeEntity(_0x1c5d44,_0x5b10dd){return function(_0xc0b315){if(_0xc0b315){return _0xc0b315[_0x0776('0x23')]()[_0x0776('0x22')](function(){var _0x571cf3=_0xc0b315[_0x0776('0x24')]({'plain':!![]});var _0x4ab70c=_0x0776('0x25');return db[_0x0776('0x26')][_0x0776('0x23')]({'where':{'type':_0x4ab70c,'resourceId':_0x571cf3['id']}})[_0x0776('0x22')](function(){return _0xc0b315;});})[_0x0776('0x22')](function(){_0x1c5d44[_0x0776('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0x592249,_0x318c25){return function(_0x7cd878){if(!_0x7cd878){_0x592249['sendStatus'](0x194);}return _0x7cd878;};}function handleError(_0x52d5bb,_0x48f771){_0x48f771=_0x48f771||0x1f4;return function(_0x52c2b9){logger[_0x0776('0x27')](_0x52c2b9[_0x0776('0x28')]);if(_0x52c2b9[_0x0776('0x29')]){delete _0x52c2b9[_0x0776('0x29')];}_0x52d5bb['status'](_0x48f771)[_0x0776('0x2a')](_0x52c2b9);};}exports['index']=function(_0x68855c,_0x536e9d){var _0x3bd92d={},_0x2b15c2={},_0x84bdd0={'count':0x0,'rows':[]};var _0x1661ce=_[_0x0776('0x2b')](db[_0x0776('0x2c')]['rawAttributes'],function(_0x189b83){return{'name':_0x189b83[_0x0776('0x2d')],'type':_0x189b83[_0x0776('0x2e')][_0x0776('0x2f')]};});_0x2b15c2[_0x0776('0x30')]=_[_0x0776('0x2b')](_0x1661ce,_0x0776('0x29'));_0x2b15c2['query']=_[_0x0776('0x31')](_0x68855c[_0x0776('0x32')]);_0x2b15c2[_0x0776('0x33')]=_[_0x0776('0x34')](_0x2b15c2[_0x0776('0x30')],_0x2b15c2[_0x0776('0x32')]);_0x3bd92d['attributes']=_[_0x0776('0x34')](_0x2b15c2['model'],qs['fields'](_0x68855c['query']['fields']));_0x3bd92d[_0x0776('0x35')]=_0x3bd92d[_0x0776('0x35')][_0x0776('0x36')]?_0x3bd92d[_0x0776('0x35')]:_0x2b15c2[_0x0776('0x30')];if(!_0x68855c[_0x0776('0x32')][_0x0776('0x37')]('nolimit')){_0x3bd92d[_0x0776('0x1b')]=qs[_0x0776('0x1b')](_0x68855c[_0x0776('0x32')]['limit']);_0x3bd92d[_0x0776('0x1c')]=qs[_0x0776('0x1c')](_0x68855c['query'][_0x0776('0x1c')]);}_0x3bd92d[_0x0776('0x38')]=qs['sort'](_0x68855c[_0x0776('0x32')][_0x0776('0x39')]);_0x3bd92d['where']=qs[_0x0776('0x33')](_[_0x0776('0x3a')](_0x68855c['query'],_0x2b15c2[_0x0776('0x33')]),_0x1661ce);if(_0x68855c[_0x0776('0x32')]['filter']){_0x3bd92d['where']=_[_0x0776('0x3b')](_0x3bd92d[_0x0776('0x3c')],{'$or':_[_0x0776('0x2b')](_0x1661ce,function(_0x52fca4){if(_0x52fca4[_0x0776('0x2e')]!==_0x0776('0x3d')){var _0x5ad277={};_0x5ad277[_0x52fca4[_0x0776('0x29')]]={'$like':'%'+_0x68855c[_0x0776('0x32')]['filter']+'%'};return _0x5ad277;}})});}_0x3bd92d=_['merge']({},_0x3bd92d,_0x68855c[_0x0776('0x3e')]);var _0x57e07b={'where':_0x3bd92d[_0x0776('0x3c')]};return db[_0x0776('0x2c')][_0x0776('0x3f')](_0x57e07b)[_0x0776('0x22')](function(_0x1a40a4){_0x84bdd0[_0x0776('0x3f')]=_0x1a40a4;if(_0x68855c[_0x0776('0x32')]['includeAll']){_0x3bd92d[_0x0776('0x40')]=[{'all':!![]}];}return db[_0x0776('0x2c')][_0x0776('0x41')](_0x3bd92d);})[_0x0776('0x22')](function(_0x484a79){_0x84bdd0[_0x0776('0x42')]=_0x484a79;return _0x84bdd0;})[_0x0776('0x22')](respondWithFilteredResult(_0x536e9d,_0x3bd92d))[_0x0776('0x43')](handleError(_0x536e9d,null));};exports['show']=function(_0x13aec9,_0x4f509b){var _0x182de8={'raw':![],'where':{'id':_0x13aec9['params']['id']}},_0x2903cc={};_0x2903cc[_0x0776('0x30')]=_[_0x0776('0x31')](db[_0x0776('0x2c')][_0x0776('0x44')]);_0x2903cc[_0x0776('0x32')]=_[_0x0776('0x31')](_0x13aec9[_0x0776('0x32')]);_0x2903cc[_0x0776('0x33')]=_[_0x0776('0x34')](_0x2903cc[_0x0776('0x30')],_0x2903cc[_0x0776('0x32')]);_0x182de8['attributes']=_['intersection'](_0x2903cc['model'],qs['fields'](_0x13aec9[_0x0776('0x32')]['fields']));_0x182de8[_0x0776('0x35')]=_0x182de8[_0x0776('0x35')][_0x0776('0x36')]?_0x182de8[_0x0776('0x35')]:_0x2903cc[_0x0776('0x30')];if(_0x13aec9[_0x0776('0x32')][_0x0776('0x45')]){_0x182de8[_0x0776('0x40')]=[{'all':!![]}];}_0x182de8=_[_0x0776('0x3b')]({},_0x182de8,_0x13aec9[_0x0776('0x3e')]);return db[_0x0776('0x2c')][_0x0776('0x46')](_0x182de8)[_0x0776('0x22')](handleEntityNotFound(_0x4f509b,null))[_0x0776('0x22')](respondWithResult(_0x4f509b,null))['catch'](handleError(_0x4f509b,null));};exports[_0x0776('0x47')]=function(_0x3c675e,_0x4facf9){return db[_0x0776('0x2c')][_0x0776('0x47')](_0x3c675e['body'],{})[_0x0776('0x22')](function(_0x56c06d){var _0x7d4898=_0x3c675e[_0x0776('0x48')][_0x0776('0x24')]({'plain':!![]});if(!_0x7d4898)throw new Error(_0x0776('0x49'));if(_0x7d4898[_0x0776('0x4a')]===_0x0776('0x48')){var _0x4cf2a0=_0x56c06d['get']({'plain':!![]});var _0x58e9c7=_0x0776('0x4b');return db[_0x0776('0x4c')][_0x0776('0x46')]({'where':{'name':_0x58e9c7,'userProfileId':_0x7d4898['userProfileId']},'raw':!![]})[_0x0776('0x22')](function(_0x5e2e1b){if(_0x5e2e1b&&_0x5e2e1b[_0x0776('0x4d')]===0x0){return db[_0x0776('0x26')]['create']({'name':_0x4cf2a0[_0x0776('0x29')],'resourceId':_0x4cf2a0['id'],'type':_0x0776('0x25'),'sectionId':_0x5e2e1b['id']},{})['then'](function(){return _0x56c06d;});}else{return _0x56c06d;}})[_0x0776('0x43')](function(_0x532338){logger[_0x0776('0x27')](_0x0776('0x4e'),_0x532338);throw _0x532338;});}return _0x56c06d;})[_0x0776('0x22')](respondWithResult(_0x4facf9,0xc9))['catch'](handleError(_0x4facf9,null));};exports['update']=function(_0x534076,_0x7331a0){if(_0x534076[_0x0776('0x4f')]['id']){delete _0x534076[_0x0776('0x4f')]['id'];}return db[_0x0776('0x2c')]['find']({'where':{'id':_0x534076[_0x0776('0x50')]['id']}})[_0x0776('0x22')](handleEntityNotFound(_0x7331a0,null))[_0x0776('0x22')](saveUpdates(_0x534076[_0x0776('0x4f')],null))[_0x0776('0x22')](respondWithResult(_0x7331a0,null))[_0x0776('0x43')](handleError(_0x7331a0,null));};exports['destroy']=function(_0x57c65c,_0x8e3d60){return db[_0x0776('0x2c')][_0x0776('0x46')]({'where':{'id':_0x57c65c[_0x0776('0x50')]['id']}})[_0x0776('0x22')](handleEntityNotFound(_0x8e3d60,null))[_0x0776('0x22')](removeEntity(_0x8e3d60,null))[_0x0776('0x43')](handleError(_0x8e3d60,null));};exports[_0x0776('0x51')]=function(_0x5af86b,_0x56ece1){var _0x4724f4=0xa;var _0x263f6e=[_0x0776('0x52'),'left_join',_0x0776('0x53'),_0x0776('0x54')];var _0x3ddb99={'SUM':_0x0776('0x55'),'COUNT':_0x0776('0x56'),'COUNT DISTINCT':_0x0776('0x57'),'MAX':'MAX(%s)','MIN':'MIN(%s)','AVG':_0x0776('0x58'),'GROUP_CONCAT':'GROUP_CONCAT(%s)','GROUP_CONCAT ASC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT DESC':_0x0776('0x59')};var _0x38bb16={'SEC_TO_TIME':_0x0776('0x5a'),'DATE':_0x0776('0x5b'),'HOUR':_0x0776('0x5c'),'ROUND':'ROUND(%s)','UNIX_TIMESTAMP':_0x0776('0x5d')};var _0x3bccf4=function(_0xb814b0){return!_[_0x0776('0x5e')](['IS\x20NULL','IS\x20NOT\x20NULL',_0x0776('0x5f'),_0x0776('0x60')],_0xb814b0);};var _0x327ecf=function(_0x33d406){if(!_0x33d406||!_0x33d406[_0x0776('0x61')][_0x0776('0x36')]){return'';}for(var _0x9c64d5='(',_0x5b7225=0x0;_0x5b7225<_0x33d406['rules'][_0x0776('0x36')];_0x5b7225+=0x1){_0x5b7225>0x0&&(_0x9c64d5+='\x20'+_0x33d406['operator']+'\x20');_0x9c64d5+=_0x33d406['rules'][_0x5b7225][_0x0776('0x62')]?_0x327ecf(_0x33d406[_0x0776('0x61')][_0x5b7225][_0x0776('0x62')]):_0x33d406[_0x0776('0x61')][_0x5b7225][_0x0776('0x63')]+'\x20'+_0x33d406[_0x0776('0x61')][_0x5b7225][_0x0776('0x64')]+(_0x3bccf4(_0x33d406[_0x0776('0x61')][_0x5b7225]['condition'])?'\x20'+_0x33d406[_0x0776('0x61')][_0x5b7225][_0x0776('0x65')]:'');}return _0x9c64d5+')';};var _0x17e9ca={'where':{'id':_0x5af86b[_0x0776('0x50')]['id']}},_0x2991d6,_0x18d2cc,_0x193859,_0x7c5e1e,_0x10adc5;_0x17e9ca=_[_0x0776('0x3b')]({},_0x17e9ca,_0x5af86b[_0x0776('0x3e')]);return db[_0x0776('0x2c')][_0x0776('0x46')](_0x17e9ca)[_0x0776('0x22')](function(_0x2f536a){if(_0x2f536a){_0x2991d6=_0x2f536a;return _0x2f536a['getFields']();}return null;})[_0x0776('0x22')](function(_0x4a0112){if(_0x4a0112){if(!_0x4a0112[_0x0776('0x36')]){throw new db[(_0x0776('0x66'))][(_0x0776('0x67'))](_0x0776('0x68'),0x193);}_0x18d2cc=_0x4a0112;return db['AnalyticMetric'][_0x0776('0x41')]({'raw':!![]});}return null;})['then'](function(_0x3be64b){if(_0x3be64b){_0x193859=_[_0x0776('0x69')](_0x3be64b,'id');var _0x1ea92d;var _0x3da489=squel[_0x0776('0x6a')]();_0x3da489[_0x0776('0x6b')](_0x2991d6[_0x0776('0x6c')]);for(var _0x47b633=0x0;_0x47b633<_0x18d2cc['length'];_0x47b633+=0x1){_0x1ea92d=_0x18d2cc[_0x47b633][_0x0776('0x6d')]?_0x193859[_0x18d2cc[_0x47b633]['MetricId']][_0x0776('0x6e')]:_0x18d2cc[_0x47b633]['field'];_0x1ea92d=_0x18d2cc[_0x47b633][_0x0776('0x6f')]?_['replace'](_0x3ddb99[_0x18d2cc[_0x47b633][_0x0776('0x6f')]],'%s',_0x1ea92d):_0x1ea92d;_0x1ea92d=_0x18d2cc[_0x47b633][_0x0776('0x70')]?_[_0x0776('0x71')](_0x38bb16[_0x18d2cc[_0x47b633][_0x0776('0x70')]],'%s',_0x1ea92d):_0x1ea92d;if(_0x18d2cc[_0x47b633][_0x0776('0x72')]){_0x3da489[_0x0776('0x62')](_0x1ea92d);}_0x18d2cc[_0x47b633][_0x0776('0x73')]&&_0x3da489[_0x0776('0x38')](_0x1ea92d,_0x18d2cc[_0x47b633][_0x0776('0x73')]===_0x0776('0x74')?![]:!![]);_0x3da489[_0x0776('0x63')](_0x1ea92d,_0x18d2cc[_0x47b633][_0x0776('0x75')]||_0x1ea92d);}if(_0x2991d6['joins']){_0x2991d6[_0x0776('0x76')]=JSON[_0x0776('0x77')](_0x2991d6[_0x0776('0x76')]);for(var _0x2f9768=0x0;_0x2f9768<_0x2991d6['joins'][_0x0776('0x36')];_0x2f9768+=0x1){if(_0x2991d6[_0x0776('0x76')][_0x2f9768][_0x0776('0x2e')]&&_['includes'](_0x263f6e,_0x2991d6[_0x0776('0x76')][_0x2f9768][_0x0776('0x2e')])&&_0x2991d6[_0x0776('0x76')][_0x2f9768][_0x0776('0x78')]&&_0x2991d6[_0x0776('0x76')][_0x2f9768][_0x0776('0x79')]&&_0x2991d6[_0x0776('0x76')][_0x2f9768]['foreignKey']){_0x3da489[_0x2991d6[_0x0776('0x76')][_0x2f9768]['type']](_0x2991d6[_0x0776('0x76')][_0x2f9768][_0x0776('0x79')],null,util[_0x0776('0x70')](_0x0776('0x7a'),_0x2991d6[_0x0776('0x6c')],_0x2991d6['joins'][_0x2f9768][_0x0776('0x78')],_0x2991d6[_0x0776('0x76')][_0x2f9768][_0x0776('0x79')],_0x2991d6[_0x0776('0x76')][_0x2f9768][_0x0776('0x7b')]));}}}if(_0x2991d6[_0x0776('0x7c')]){_0x2991d6[_0x0776('0x7c')]=JSON['parse'](_0x2991d6[_0x0776('0x7c')]);_0x3da489[_0x0776('0x3c')](_0x327ecf(_0x2991d6[_0x0776('0x7c')][_0x0776('0x62')]));}_0x10adc5=_0x3da489[_0x0776('0x7d')]();_0x3da489['limit'](_0x4724f4);_0x3da489['offset'](0x0);logger[_0x0776('0x7e')](_0x0776('0x7f'),_0x3da489[_0x0776('0x80')]());return dbH[_0x0776('0x81')][_0x0776('0x32')](_0x3da489[_0x0776('0x80')](),{'type':dbH[_0x0776('0x81')][_0x0776('0x82')][_0x0776('0x83')]});}})[_0x0776('0x22')](respondWithResult(_0x56ece1,null))['catch'](handleError(_0x56ece1,null));};function runReport(_0x5d16ea,_0x2b6637,_0x14ded2){var _0x1623f5=_0x2b6637[_0x0776('0x29')];var _0x31b258=0xa;var _0x2be3d6=['join',_0x0776('0x84'),_0x0776('0x53'),_0x0776('0x54')];var _0xa14767={'SUM':_0x0776('0x55'),'COUNT':_0x0776('0x56'),'COUNT DISTINCT':_0x0776('0x57'),'MAX':_0x0776('0x85'),'MIN':'MIN(%s)','AVG':_0x0776('0x58'),'GROUP_CONCAT':'GROUP_CONCAT(%s)','GROUP_CONCAT ASC':_0x0776('0x86'),'GROUP_CONCAT DESC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)'};var _0x277d20={'SEC_TO_TIME':'SEC_TO_TIME(%s)','DATE':_0x0776('0x5b'),'HOUR':'HOUR(%s)','ROUND':_0x0776('0x87'),'UNIX_TIMESTAMP':_0x0776('0x5d')};var _0xc5918b=function(_0x34d3f2){return!_[_0x0776('0x5e')]([_0x0776('0x88'),_0x0776('0x89'),'IS\x20EMPTY',_0x0776('0x60')],_0x34d3f2);};var _0x201503=function(_0x3bfb5f){if(!_0x3bfb5f||!_0x3bfb5f['rules'][_0x0776('0x36')]){return'';}for(var _0x40e585='(',_0x5ddac4=0x0;_0x5ddac4<_0x3bfb5f[_0x0776('0x61')][_0x0776('0x36')];_0x5ddac4+=0x1){_0x5ddac4>0x0&&(_0x40e585+='\x20'+_0x3bfb5f[_0x0776('0x8a')]+'\x20');_0x40e585+=_0x3bfb5f['rules'][_0x5ddac4]['group']?_0x201503(_0x3bfb5f[_0x0776('0x61')][_0x5ddac4][_0x0776('0x62')]):_0x3bfb5f[_0x0776('0x61')][_0x5ddac4]['field']+'\x20'+_0x3bfb5f[_0x0776('0x61')][_0x5ddac4][_0x0776('0x64')]+(_0xc5918b(_0x3bfb5f[_0x0776('0x61')][_0x5ddac4]['condition'])?'\x20'+_0x3bfb5f['rules'][_0x5ddac4][_0x0776('0x65')]:'');}return _0x40e585+')';};var _0x26d599={'where':{'id':_0x5d16ea['id']}},_0x5ba98d,_0xb8536,_0x5e0c71,_0x3b92ff,_0x353e26;_0x26d599=_['merge']({},_0x26d599,_0x14ded2);return db[_0x0776('0x2c')][_0x0776('0x46')](_0x26d599)[_0x0776('0x22')](function(_0x24f9f9){if(_0x24f9f9){_0x5ba98d=_0x24f9f9;return _0x24f9f9['getFields']();}return null;})[_0x0776('0x22')](function(_0x202161){if(_0x202161){if(!_0x202161[_0x0776('0x36')]){throw new db[(_0x0776('0x66'))][(_0x0776('0x67'))](_0x0776('0x68'),0x193);}_0xb8536=_0x202161;return db[_0x0776('0x8b')][_0x0776('0x41')]({'raw':!![]});}return null;})[_0x0776('0x22')](function(_0x3099fe){if(_0x3099fe){_0x5e0c71=_['keyBy'](_0x3099fe,'id');var _0x2fd9d0;var _0xd2b3a=squel[_0x0776('0x6a')]();_0xd2b3a[_0x0776('0x6b')](_0x5ba98d[_0x0776('0x6c')]);for(var _0x175bb6=0x0;_0x175bb6<_0xb8536[_0x0776('0x36')];_0x175bb6+=0x1){_0x2fd9d0=_0xb8536[_0x175bb6][_0x0776('0x6d')]?_0x5e0c71[_0xb8536[_0x175bb6][_0x0776('0x6d')]][_0x0776('0x6e')]:_0xb8536[_0x175bb6][_0x0776('0x63')];_0x2fd9d0=_0xb8536[_0x175bb6][_0x0776('0x6f')]?_[_0x0776('0x71')](_0xa14767[_0xb8536[_0x175bb6][_0x0776('0x6f')]],'%s',_0x2fd9d0):_0x2fd9d0;_0x2fd9d0=_0xb8536[_0x175bb6][_0x0776('0x70')]?_['replace'](_0x277d20[_0xb8536[_0x175bb6][_0x0776('0x70')]],'%s',_0x2fd9d0):_0x2fd9d0;if(_0xb8536[_0x175bb6]['groupBy']){_0xd2b3a[_0x0776('0x62')](_0x2fd9d0);}_0xb8536[_0x175bb6]['orderBy']&&_0xd2b3a[_0x0776('0x38')](_0x2fd9d0,_0xb8536[_0x175bb6][_0x0776('0x73')]==='DESC'?![]:!![]);_0xd2b3a['field'](_0x2fd9d0,_0xb8536[_0x175bb6][_0x0776('0x75')]||_0x2fd9d0);}if(_0x5ba98d[_0x0776('0x76')]){_0x5ba98d[_0x0776('0x76')]=JSON[_0x0776('0x77')](_0x5ba98d[_0x0776('0x76')]);for(var _0x2453f4=0x0;_0x2453f4<_0x5ba98d[_0x0776('0x76')][_0x0776('0x36')];_0x2453f4+=0x1){if(_0x5ba98d[_0x0776('0x76')][_0x2453f4][_0x0776('0x2e')]&&_['includes'](_0x2be3d6,_0x5ba98d[_0x0776('0x76')][_0x2453f4][_0x0776('0x2e')])&&_0x5ba98d[_0x0776('0x76')][_0x2453f4][_0x0776('0x78')]&&_0x5ba98d[_0x0776('0x76')][_0x2453f4]['foreignTable']&&_0x5ba98d[_0x0776('0x76')][_0x2453f4][_0x0776('0x7b')]){_0xd2b3a[_0x5ba98d['joins'][_0x2453f4][_0x0776('0x2e')]](_0x5ba98d['joins'][_0x2453f4][_0x0776('0x79')],null,util['format'](_0x0776('0x7a'),_0x5ba98d[_0x0776('0x6c')],_0x5ba98d['joins'][_0x2453f4][_0x0776('0x78')],_0x5ba98d[_0x0776('0x76')][_0x2453f4]['foreignTable'],_0x5ba98d[_0x0776('0x76')][_0x2453f4][_0x0776('0x7b')]));}}}if(_0x5ba98d[_0x0776('0x7c')]){_0x5ba98d[_0x0776('0x7c')]=JSON[_0x0776('0x77')](_0x5ba98d[_0x0776('0x7c')]);_0xd2b3a[_0x0776('0x3c')](_0x201503(_0x5ba98d[_0x0776('0x7c')][_0x0776('0x62')]));}_0x353e26=_0xd2b3a['clone']();_0xd2b3a[_0x0776('0x1b')](_0x31b258);_0xd2b3a[_0x0776('0x1c')](0x0);return;}})['then'](function(){if(_0x2b6637[_0x0776('0x8c')]===_0x0776('0x8d')){return null;}var _0x265812=_[_0x0776('0x3b')](_0x2b6637,{'name':_0x2b6637[_0x0776('0x8e')]||_0x2b6637[_0x0776('0x29')]||_0x5ba98d['name'],'basename':_0x1623f5,'savename':util['format'](_0x0776('0x8f'),_0x2b6637[_0x0776('0x29')]||_0x5ba98d[_0x0776('0x29')],require(_0x0776('0x90'))[_0x0776('0x91')](0x4),_0x2b6637[_0x0776('0x8c')]||_0x0776('0x92')),'reportId':_0x5ba98d['id'],'reportType':'custom'});return db[_0x0776('0x93')][_0x0776('0x47')](_0x265812,{'raw':!![]});})[_0x0776('0x22')](function(_0x8800ee){if(_0x5ba98d[_0x0776('0x6c')]===_0x0776('0x94')){_0x353e26[_0x0776('0x3c')](_0x5ba98d['table']+_0x0776('0x95'),_0x2b6637[_0x0776('0x96')],_0x2b6637[_0x0776('0x97')]);}else{_0x353e26[_0x0776('0x3c')](_0x5ba98d[_0x0776('0x6c')]+_0x0776('0x98'),_0x2b6637[_0x0776('0x96')],_0x2b6637[_0x0776('0x97')]);}if(_0x8800ee){logger[_0x0776('0x99')]('Run\x20Query:',_0x353e26[_0x0776('0x80')]());require(_0x0776('0x9a'))[_0x0776('0x9b')](path['join'](__dirname,'../../components/export/',_0x8800ee['output']),[_0x8800ee['id'],_0x353e26['toString'](),path[_0x0776('0x52')](__dirname,_0x0776('0x9c'),_0x8800ee[_0x0776('0x9d')]),_0x1623f5]);return _0x8800ee;}else{var _0x50d879=squel['select']();_0x50d879[_0x0776('0x6b')]('('+_0x353e26[_0x0776('0x80')]()+')',_0x0776('0x9e'));_0x50d879[_0x0776('0x63')](_0x0776('0x9f'),_0x0776('0x3f'));_0x353e26[_0x0776('0x1b')](_0x2b6637['limit']||_0x31b258);_0x353e26[_0x0776('0x1c')](_0x2b6637[_0x0776('0x1c')]||0x0);return dbH[_0x0776('0x81')][_0x0776('0x32')](_0x50d879[_0x0776('0x80')](),{'type':dbH[_0x0776('0x81')][_0x0776('0x82')]['SELECT']})[_0x0776('0x22')](function(_0x20f513){if(!_0x20f513[_0x0776('0x36')]){_0x3b92ff=0x0;}else{_0x3b92ff=_0x20f513[0x0][_0x0776('0x3f')]||0x0;}return dbH[_0x0776('0x81')]['query'](_0x353e26[_0x0776('0x80')](),{'type':dbH[_0x0776('0x81')][_0x0776('0x82')][_0x0776('0x83')]});})['then'](function(_0x12d4f9){return{'rows':_0x12d4f9||[],'count':_0x3b92ff};});}});}exports[_0x0776('0xa0')]=function(_0x45b9a9,_0x16822b){return runReport(_0x45b9a9[_0x0776('0x50')],_0x45b9a9[_0x0776('0x32')],_0x45b9a9['options'])[_0x0776('0x22')](respondWithResult(_0x16822b,null))[_0x0776('0x43')](handleError(_0x16822b,null));};exports[_0x0776('0xa1')]=runReport;exports[_0x0776('0x32')]=function(_0x19d9a9,_0x11d85f){var _0x15c1f5=0xa;var _0x276da4=[_0x0776('0x52'),_0x0776('0x84'),'right_join',_0x0776('0x54')];var _0x310805={'SUM':'SUM(%s)','COUNT':'COUNT(%s)','COUNT DISTINCT':_0x0776('0x57'),'MAX':_0x0776('0x85'),'MIN':_0x0776('0xa2'),'AVG':_0x0776('0x58'),'GROUP_CONCAT':_0x0776('0xa3'),'GROUP_CONCAT ASC':_0x0776('0x86'),'GROUP_CONCAT DESC':_0x0776('0x59')};var _0x3b9beb={'SEC_TO_TIME':_0x0776('0x5a'),'DATE':'DATE(%s)','HOUR':_0x0776('0x5c'),'ROUND':'ROUND(%s)','UNIX_TIMESTAMP':_0x0776('0x5d')};var _0x56ac64=function(_0x186931){return!_[_0x0776('0x5e')](['IS\x20NULL',_0x0776('0x89'),'IS\x20EMPTY','IS\x20NOT\x20EMPTY'],_0x186931);};var _0x1e49d8=function(_0x1b6d35){if(!_0x1b6d35||!_0x1b6d35[_0x0776('0x61')][_0x0776('0x36')]){return'';}for(var _0x384485='(',_0x201369=0x0;_0x201369<_0x1b6d35['rules']['length'];_0x201369+=0x1){_0x201369>0x0&&(_0x384485+='\x20'+_0x1b6d35[_0x0776('0x8a')]+'\x20');_0x384485+=_0x1b6d35['rules'][_0x201369][_0x0776('0x62')]?_0x1e49d8(_0x1b6d35[_0x0776('0x61')][_0x201369][_0x0776('0x62')]):_0x1b6d35[_0x0776('0x61')][_0x201369][_0x0776('0x63')]+'\x20'+_0x1b6d35[_0x0776('0x61')][_0x201369][_0x0776('0x64')]+(_0x56ac64(_0x1b6d35[_0x0776('0x61')][_0x201369]['condition'])?'\x20'+_0x1b6d35[_0x0776('0x61')][_0x201369][_0x0776('0x65')]:'');}return _0x384485+')';};var _0x4aeb0c={'where':{'id':_0x19d9a9[_0x0776('0x50')]['id']}},_0x483e42,_0x31cb19,_0x877de0,_0x47e284,_0xb2d21;_0x4aeb0c=_['merge']({},_0x4aeb0c,_0x19d9a9[_0x0776('0x3e')]);return db[_0x0776('0x2c')]['find'](_0x4aeb0c)[_0x0776('0x22')](function(_0x46cf8c){if(_0x46cf8c){_0x483e42=_0x46cf8c;return _0x46cf8c[_0x0776('0xa4')]();}return null;})[_0x0776('0x22')](function(_0x191a9d){if(_0x191a9d){if(!_0x191a9d[_0x0776('0x36')]){throw new db[(_0x0776('0x66'))]['ValidationErrorItem'](_0x0776('0x68'),0x193);}_0x31cb19=_0x191a9d;return db['AnalyticMetric'][_0x0776('0x41')]({'raw':!![]});}return null;})[_0x0776('0x22')](function(_0x233403){if(_0x233403){_0x877de0=_['keyBy'](_0x233403,'id');var _0xf4c46a;var _0x201f7f=squel[_0x0776('0x6a')]();_0x201f7f[_0x0776('0x6b')](_0x483e42[_0x0776('0x6c')]);for(var _0x212b3a=0x0;_0x212b3a<_0x31cb19['length'];_0x212b3a+=0x1){_0xf4c46a=_0x31cb19[_0x212b3a][_0x0776('0x6d')]?_0x877de0[_0x31cb19[_0x212b3a]['MetricId']][_0x0776('0x6e')]:_0x31cb19[_0x212b3a][_0x0776('0x63')];_0xf4c46a=_0x31cb19[_0x212b3a][_0x0776('0x6f')]?_[_0x0776('0x71')](_0x310805[_0x31cb19[_0x212b3a][_0x0776('0x6f')]],'%s',_0xf4c46a):_0xf4c46a;_0xf4c46a=_0x31cb19[_0x212b3a][_0x0776('0x70')]?_['replace'](_0x3b9beb[_0x31cb19[_0x212b3a]['format']],'%s',_0xf4c46a):_0xf4c46a;if(_0x31cb19[_0x212b3a][_0x0776('0x72')]){_0x201f7f[_0x0776('0x62')](_0xf4c46a);}_0x31cb19[_0x212b3a][_0x0776('0x73')]&&_0x201f7f[_0x0776('0x38')](_0xf4c46a,_0x31cb19[_0x212b3a][_0x0776('0x73')]===_0x0776('0x74')?![]:!![]);_0x201f7f[_0x0776('0x63')](_0xf4c46a,_0x31cb19[_0x212b3a][_0x0776('0x75')]||_0xf4c46a);}if(_0x483e42[_0x0776('0x76')]){_0x483e42[_0x0776('0x76')]=JSON[_0x0776('0x77')](_0x483e42[_0x0776('0x76')]);for(var _0x235a3e=0x0;_0x235a3e<_0x483e42[_0x0776('0x76')][_0x0776('0x36')];_0x235a3e+=0x1){if(_0x483e42[_0x0776('0x76')][_0x235a3e][_0x0776('0x2e')]&&_[_0x0776('0x5e')](_0x276da4,_0x483e42[_0x0776('0x76')][_0x235a3e][_0x0776('0x2e')])&&_0x483e42[_0x0776('0x76')][_0x235a3e][_0x0776('0x78')]&&_0x483e42[_0x0776('0x76')][_0x235a3e]['foreignTable']&&_0x483e42[_0x0776('0x76')][_0x235a3e][_0x0776('0x7b')]){_0x201f7f[_0x483e42['joins'][_0x235a3e]['type']](_0x483e42[_0x0776('0x76')][_0x235a3e][_0x0776('0x79')],null,util[_0x0776('0x70')](_0x0776('0x7a'),_0x483e42[_0x0776('0x6c')],_0x483e42['joins'][_0x235a3e][_0x0776('0x78')],_0x483e42['joins'][_0x235a3e][_0x0776('0x79')],_0x483e42[_0x0776('0x76')][_0x235a3e][_0x0776('0x7b')]));}}}if(_0x483e42['conditions']){_0x483e42[_0x0776('0x7c')]=JSON[_0x0776('0x77')](_0x483e42[_0x0776('0x7c')]);_0x201f7f['where'](_0x1e49d8(_0x483e42['conditions'][_0x0776('0x62')]));}_0xb2d21=_0x201f7f[_0x0776('0x7d')]();_0x201f7f[_0x0776('0x1b')](_0x15c1f5);_0x201f7f[_0x0776('0x1c')](0x0);logger[_0x0776('0x7e')]('Limited\x20Query:',_0x201f7f[_0x0776('0x80')]());return dbH[_0x0776('0x81')][_0x0776('0x32')](_0x201f7f[_0x0776('0x80')](),{'type':dbH[_0x0776('0x81')][_0x0776('0x82')][_0x0776('0x83')]});}})[_0x0776('0x22')](function(){return{'sql':_0xb2d21[_0x0776('0x80')]()};})[_0x0776('0x22')](respondWithResult(_0x11d85f,null))[_0x0776('0x43')](handleError(_0x11d85f,null));}; \ No newline at end of file +var _0x7b77=['ValidationErrorItem','AnalyticMetric','keyBy','from','table','MetricId','replace','format','groupBy','orderBy','DESC','alias','parse','joins','foreignTable','%s.%s\x20=\x20%s.%s','foreignKey','conditions','debug','Limited\x20Query:','toString','sequelize','SUM(%s)','GROUP_CONCAT(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','HOUR(%s)','Please\x20insert\x20at\x20least\x20one\x20field','select','metric','function','parentKey','clone','output','fullPath','randomstring','generate','csv','custom','AnalyticExtractedReport','cdr','endDate','.createdAt\x20BETWEEN\x20?\x20AND\x20?','info','Run\x20Query:','fork','../../files/reports','savename','countTable','COUNT(*)','QueryTypes','SELECT','run','SEC_TO_TIME(%s)','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','end','status','json','offset','undefined','limit','count','set','save','update','then','destroy','get','CustomReports','UserProfileResource','sendStatus','error','stack','name','send','index','map','AnalyticCustomReport','fieldName','type','model','query','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','merge','VIRTUAL','options','include','findAll','rows','catch','params','keys','includeAll','find','create','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','Reports','UserProfileSection','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','join','left_join','right_join','cross_join','COUNT(%s)','COUNT(DISTINCT\x20%s)','MAX(%s)','MIN(%s)','AVG(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)','DATE(%s)','ROUND(%s)','UNIX_TIMESTAMP(%s)','includes','IS\x20NULL','IS\x20NOT\x20NULL','IS\x20EMPTY','IS\x20NOT\x20EMPTY','rules','operator','group','field','condition','value','getFields','Sequelize'];(function(_0x564d5c,_0x261813){var _0x2e9123=function(_0x580a49){while(--_0x580a49){_0x564d5c['push'](_0x564d5c['shift']());}};_0x2e9123(++_0x261813);}(_0x7b77,0x179));var _0x77b7=function(_0x459423,_0x3416a8){_0x459423=_0x459423-0x0;var _0x42ed14=_0x7b77[_0x459423];return _0x42ed14;};'use strict';var emlformat=require(_0x77b7('0x0'));var rimraf=require(_0x77b7('0x1'));var zipdir=require(_0x77b7('0x2'));var jsonpatch=require(_0x77b7('0x3'));var rp=require('request-promise');var moment=require(_0x77b7('0x4'));var BPromise=require(_0x77b7('0x5'));var Mustache=require(_0x77b7('0x6'));var util=require('util');var path=require(_0x77b7('0x7'));var sox=require(_0x77b7('0x8'));var csv=require(_0x77b7('0x9'));var ejs=require(_0x77b7('0xa'));var fs=require('fs');var fs_extra=require(_0x77b7('0xb'));var _=require(_0x77b7('0xc'));var squel=require('squel');var crypto=require(_0x77b7('0xd'));var jsforce=require(_0x77b7('0xe'));var deskjs=require(_0x77b7('0xf'));var toCsv=require('to-csv');var querystring=require(_0x77b7('0x10'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x77b7('0x11'));var as=require(_0x77b7('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x77b7('0x13'))(_0x77b7('0x14'));var utils=require(_0x77b7('0x15'));var config=require(_0x77b7('0x16'));var licenseUtil=require(_0x77b7('0x17'));var db=require(_0x77b7('0x18'))['db'];var dbH=require(_0x77b7('0x18'))['dbH'];function respondWithStatusCode(_0x304354,_0x47210c){_0x47210c=_0x47210c||0xcc;return function(_0x4a36c2){if(_0x4a36c2){return _0x304354['sendStatus'](_0x47210c);}return _0x304354['status'](_0x47210c)[_0x77b7('0x19')]();};}function respondWithResult(_0x3ff53e,_0x2ab6d7){_0x2ab6d7=_0x2ab6d7||0xc8;return function(_0x33b713){if(_0x33b713){return _0x3ff53e[_0x77b7('0x1a')](_0x2ab6d7)[_0x77b7('0x1b')](_0x33b713);}};}function respondWithFilteredResult(_0x4dbe04,_0x19d460){return function(_0x253543){if(_0x253543){var _0x3cb44b=typeof _0x19d460[_0x77b7('0x1c')]===_0x77b7('0x1d')&&typeof _0x19d460[_0x77b7('0x1e')]===_0x77b7('0x1d');var _0x12caf0=_0x253543[_0x77b7('0x1f')];var _0x4a0005=_0x3cb44b?0x0:_0x19d460['offset'];var _0x5f391d=_0x3cb44b?_0x253543[_0x77b7('0x1f')]:_0x19d460['offset']+_0x19d460['limit'];var _0x52983f;if(_0x5f391d>=_0x12caf0){_0x5f391d=_0x12caf0;_0x52983f=0xc8;}else{_0x52983f=0xce;}_0x4dbe04['status'](_0x52983f);return _0x4dbe04[_0x77b7('0x20')]('Content-Range',_0x4a0005+'-'+_0x5f391d+'/'+_0x12caf0)[_0x77b7('0x1b')](_0x253543);}return null;};}function patchUpdates(_0x57262c){return function(_0x2107d7){try{jsonpatch['apply'](_0x2107d7,_0x57262c,!![]);}catch(_0xd26fcd){return BPromise['reject'](_0xd26fcd);}return _0x2107d7[_0x77b7('0x21')]();};}function saveUpdates(_0x1bdcdf,_0xbe2efc){return function(_0x345f5b){if(_0x345f5b){return _0x345f5b[_0x77b7('0x22')](_0x1bdcdf)[_0x77b7('0x23')](function(_0x29a892){return _0x29a892;});}return null;};}function removeEntity(_0x69c147,_0x39d097){return function(_0x32551a){if(_0x32551a){return _0x32551a[_0x77b7('0x24')]()[_0x77b7('0x23')](function(){var _0x29c2aa=_0x32551a[_0x77b7('0x25')]({'plain':!![]});var _0x43ff37=_0x77b7('0x26');return db[_0x77b7('0x27')][_0x77b7('0x24')]({'where':{'type':_0x43ff37,'resourceId':_0x29c2aa['id']}})['then'](function(){return _0x32551a;});})['then'](function(){_0x69c147[_0x77b7('0x1a')](0xcc)[_0x77b7('0x19')]();});}};}function handleEntityNotFound(_0x3cae5a,_0x4c6f8d){return function(_0x1e10a0){if(!_0x1e10a0){_0x3cae5a[_0x77b7('0x28')](0x194);}return _0x1e10a0;};}function handleError(_0x20de87,_0x16b66a){_0x16b66a=_0x16b66a||0x1f4;return function(_0x114cf0){logger[_0x77b7('0x29')](_0x114cf0[_0x77b7('0x2a')]);if(_0x114cf0[_0x77b7('0x2b')]){delete _0x114cf0[_0x77b7('0x2b')];}_0x20de87['status'](_0x16b66a)[_0x77b7('0x2c')](_0x114cf0);};}exports[_0x77b7('0x2d')]=function(_0x23aa7e,_0x3f21dd){var _0x2e87e6={},_0x3f63a={},_0xbc95a2={'count':0x0,'rows':[]};var _0x38b381=_[_0x77b7('0x2e')](db[_0x77b7('0x2f')]['rawAttributes'],function(_0x243b7e){return{'name':_0x243b7e[_0x77b7('0x30')],'type':_0x243b7e[_0x77b7('0x31')]['key']};});_0x3f63a[_0x77b7('0x32')]=_['map'](_0x38b381,_0x77b7('0x2b'));_0x3f63a[_0x77b7('0x33')]=_['keys'](_0x23aa7e[_0x77b7('0x33')]);_0x3f63a['filters']=_[_0x77b7('0x34')](_0x3f63a[_0x77b7('0x32')],_0x3f63a[_0x77b7('0x33')]);_0x2e87e6['attributes']=_[_0x77b7('0x34')](_0x3f63a[_0x77b7('0x32')],qs[_0x77b7('0x35')](_0x23aa7e[_0x77b7('0x33')][_0x77b7('0x35')]));_0x2e87e6[_0x77b7('0x36')]=_0x2e87e6[_0x77b7('0x36')][_0x77b7('0x37')]?_0x2e87e6[_0x77b7('0x36')]:_0x3f63a[_0x77b7('0x32')];if(!_0x23aa7e[_0x77b7('0x33')][_0x77b7('0x38')](_0x77b7('0x39'))){_0x2e87e6['limit']=qs[_0x77b7('0x1e')](_0x23aa7e[_0x77b7('0x33')][_0x77b7('0x1e')]);_0x2e87e6['offset']=qs['offset'](_0x23aa7e[_0x77b7('0x33')][_0x77b7('0x1c')]);}_0x2e87e6[_0x77b7('0x3a')]=qs[_0x77b7('0x3b')](_0x23aa7e[_0x77b7('0x33')][_0x77b7('0x3b')]);_0x2e87e6[_0x77b7('0x3c')]=qs[_0x77b7('0x3d')](_[_0x77b7('0x3e')](_0x23aa7e[_0x77b7('0x33')],_0x3f63a[_0x77b7('0x3d')]),_0x38b381);if(_0x23aa7e[_0x77b7('0x33')][_0x77b7('0x3f')]){_0x2e87e6[_0x77b7('0x3c')]=_[_0x77b7('0x40')](_0x2e87e6[_0x77b7('0x3c')],{'$or':_[_0x77b7('0x2e')](_0x38b381,function(_0x1fd72a){if(_0x1fd72a[_0x77b7('0x31')]!==_0x77b7('0x41')){var _0x1608d9={};_0x1608d9[_0x1fd72a['name']]={'$like':'%'+_0x23aa7e[_0x77b7('0x33')][_0x77b7('0x3f')]+'%'};return _0x1608d9;}})});}_0x2e87e6=_['merge']({},_0x2e87e6,_0x23aa7e[_0x77b7('0x42')]);var _0x52a445={'where':_0x2e87e6[_0x77b7('0x3c')]};return db[_0x77b7('0x2f')]['count'](_0x52a445)[_0x77b7('0x23')](function(_0x51ffb4){_0xbc95a2['count']=_0x51ffb4;if(_0x23aa7e[_0x77b7('0x33')]['includeAll']){_0x2e87e6[_0x77b7('0x43')]=[{'all':!![]}];}return db['AnalyticCustomReport'][_0x77b7('0x44')](_0x2e87e6);})[_0x77b7('0x23')](function(_0x338cb2){_0xbc95a2[_0x77b7('0x45')]=_0x338cb2;return _0xbc95a2;})[_0x77b7('0x23')](respondWithFilteredResult(_0x3f21dd,_0x2e87e6))[_0x77b7('0x46')](handleError(_0x3f21dd,null));};exports['show']=function(_0x21ef70,_0x36407b){var _0x95c459={'raw':![],'where':{'id':_0x21ef70[_0x77b7('0x47')]['id']}},_0x219706={};_0x219706[_0x77b7('0x32')]=_[_0x77b7('0x48')](db[_0x77b7('0x2f')]['rawAttributes']);_0x219706[_0x77b7('0x33')]=_['keys'](_0x21ef70[_0x77b7('0x33')]);_0x219706['filters']=_[_0x77b7('0x34')](_0x219706[_0x77b7('0x32')],_0x219706[_0x77b7('0x33')]);_0x95c459[_0x77b7('0x36')]=_[_0x77b7('0x34')](_0x219706[_0x77b7('0x32')],qs[_0x77b7('0x35')](_0x21ef70['query'][_0x77b7('0x35')]));_0x95c459[_0x77b7('0x36')]=_0x95c459['attributes']['length']?_0x95c459[_0x77b7('0x36')]:_0x219706['model'];if(_0x21ef70[_0x77b7('0x33')][_0x77b7('0x49')]){_0x95c459[_0x77b7('0x43')]=[{'all':!![]}];}_0x95c459=_[_0x77b7('0x40')]({},_0x95c459,_0x21ef70[_0x77b7('0x42')]);return db[_0x77b7('0x2f')][_0x77b7('0x4a')](_0x95c459)[_0x77b7('0x23')](handleEntityNotFound(_0x36407b,null))[_0x77b7('0x23')](respondWithResult(_0x36407b,null))[_0x77b7('0x46')](handleError(_0x36407b,null));};exports[_0x77b7('0x4b')]=function(_0x263f0a,_0x272bfb){return db[_0x77b7('0x2f')][_0x77b7('0x4b')](_0x263f0a['body'],{})[_0x77b7('0x23')](function(_0x59a29d){var _0x2da729=_0x263f0a['user'][_0x77b7('0x25')]({'plain':!![]});if(!_0x2da729)throw new Error(_0x77b7('0x4c'));if(_0x2da729[_0x77b7('0x4d')]===_0x77b7('0x4e')){var _0x5a09b1=_0x59a29d[_0x77b7('0x25')]({'plain':!![]});var _0x4f88e8=_0x77b7('0x4f');return db[_0x77b7('0x50')]['find']({'where':{'name':_0x4f88e8,'userProfileId':_0x2da729['userProfileId']},'raw':!![]})['then'](function(_0x45ffec){if(_0x45ffec&&_0x45ffec['autoAssociation']===0x0){return db[_0x77b7('0x27')][_0x77b7('0x4b')]({'name':_0x5a09b1[_0x77b7('0x2b')],'resourceId':_0x5a09b1['id'],'type':_0x77b7('0x26'),'sectionId':_0x45ffec['id']},{})['then'](function(){return _0x59a29d;});}else{return _0x59a29d;}})[_0x77b7('0x46')](function(_0x45453e){logger[_0x77b7('0x29')](_0x77b7('0x51'),_0x45453e);throw _0x45453e;});}return _0x59a29d;})['then'](respondWithResult(_0x272bfb,0xc9))[_0x77b7('0x46')](handleError(_0x272bfb,null));};exports[_0x77b7('0x22')]=function(_0x55870a,_0x7a0214){if(_0x55870a[_0x77b7('0x52')]['id']){delete _0x55870a[_0x77b7('0x52')]['id'];}return db[_0x77b7('0x2f')][_0x77b7('0x4a')]({'where':{'id':_0x55870a[_0x77b7('0x47')]['id']}})[_0x77b7('0x23')](handleEntityNotFound(_0x7a0214,null))['then'](saveUpdates(_0x55870a[_0x77b7('0x52')],null))[_0x77b7('0x23')](respondWithResult(_0x7a0214,null))['catch'](handleError(_0x7a0214,null));};exports[_0x77b7('0x24')]=function(_0x42ce07,_0x102a52){return db[_0x77b7('0x2f')]['find']({'where':{'id':_0x42ce07['params']['id']}})[_0x77b7('0x23')](handleEntityNotFound(_0x102a52,null))[_0x77b7('0x23')](removeEntity(_0x102a52,null))['catch'](handleError(_0x102a52,null));};exports['preview']=function(_0x2f89ed,_0x97ff42){var _0x21a124=0xa;var _0x24849f=[_0x77b7('0x53'),_0x77b7('0x54'),_0x77b7('0x55'),_0x77b7('0x56')];var _0x58296f={'SUM':'SUM(%s)','COUNT':_0x77b7('0x57'),'COUNT DISTINCT':_0x77b7('0x58'),'MAX':_0x77b7('0x59'),'MIN':_0x77b7('0x5a'),'AVG':_0x77b7('0x5b'),'GROUP_CONCAT':'GROUP_CONCAT(%s)','GROUP_CONCAT ASC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT DESC':_0x77b7('0x5c')};var _0x1323fc={'SEC_TO_TIME':'SEC_TO_TIME(%s)','DATE':_0x77b7('0x5d'),'HOUR':'HOUR(%s)','ROUND':_0x77b7('0x5e'),'UNIX_TIMESTAMP':_0x77b7('0x5f')};var _0x11762c=function(_0x15ab66){return!_[_0x77b7('0x60')]([_0x77b7('0x61'),_0x77b7('0x62'),_0x77b7('0x63'),_0x77b7('0x64')],_0x15ab66);};var _0xb9b06d=function(_0x1be996){if(!_0x1be996||!_0x1be996['rules'][_0x77b7('0x37')]){return'';}for(var _0x3badae='(',_0x2c8edf=0x0;_0x2c8edf<_0x1be996[_0x77b7('0x65')][_0x77b7('0x37')];_0x2c8edf+=0x1){_0x2c8edf>0x0&&(_0x3badae+='\x20'+_0x1be996[_0x77b7('0x66')]+'\x20');_0x3badae+=_0x1be996[_0x77b7('0x65')][_0x2c8edf]['group']?_0xb9b06d(_0x1be996[_0x77b7('0x65')][_0x2c8edf][_0x77b7('0x67')]):_0x1be996[_0x77b7('0x65')][_0x2c8edf][_0x77b7('0x68')]+'\x20'+_0x1be996[_0x77b7('0x65')][_0x2c8edf][_0x77b7('0x69')]+(_0x11762c(_0x1be996[_0x77b7('0x65')][_0x2c8edf][_0x77b7('0x69')])?'\x20'+_0x1be996[_0x77b7('0x65')][_0x2c8edf][_0x77b7('0x6a')]:'');}return _0x3badae+')';};var _0x2cf5fe={'where':{'id':_0x2f89ed[_0x77b7('0x47')]['id']}},_0x1ef762,_0x1da758,_0xda7555,_0x1b82c5,_0x1dfc32;_0x2cf5fe=_[_0x77b7('0x40')]({},_0x2cf5fe,_0x2f89ed[_0x77b7('0x42')]);return db[_0x77b7('0x2f')]['find'](_0x2cf5fe)['then'](function(_0xca5e5c){if(_0xca5e5c){_0x1ef762=_0xca5e5c;return _0xca5e5c[_0x77b7('0x6b')]();}return null;})[_0x77b7('0x23')](function(_0x8b52b2){if(_0x8b52b2){if(!_0x8b52b2[_0x77b7('0x37')]){throw new db[(_0x77b7('0x6c'))][(_0x77b7('0x6d'))]('Please\x20insert\x20at\x20least\x20one\x20field',0x193);}_0x1da758=_0x8b52b2;return db[_0x77b7('0x6e')]['findAll']({'raw':!![]});}return null;})[_0x77b7('0x23')](function(_0xd55cb4){if(_0xd55cb4){_0xda7555=_[_0x77b7('0x6f')](_0xd55cb4,'id');var _0x2a301a;var _0x422ec1=squel['select']();_0x422ec1[_0x77b7('0x70')](_0x1ef762[_0x77b7('0x71')]);for(var _0x5e8eeb=0x0;_0x5e8eeb<_0x1da758[_0x77b7('0x37')];_0x5e8eeb+=0x1){_0x2a301a=_0x1da758[_0x5e8eeb][_0x77b7('0x72')]?_0xda7555[_0x1da758[_0x5e8eeb]['MetricId']]['metric']:_0x1da758[_0x5e8eeb][_0x77b7('0x68')];_0x2a301a=_0x1da758[_0x5e8eeb]['function']?_[_0x77b7('0x73')](_0x58296f[_0x1da758[_0x5e8eeb]['function']],'%s',_0x2a301a):_0x2a301a;_0x2a301a=_0x1da758[_0x5e8eeb]['format']?_[_0x77b7('0x73')](_0x1323fc[_0x1da758[_0x5e8eeb][_0x77b7('0x74')]],'%s',_0x2a301a):_0x2a301a;if(_0x1da758[_0x5e8eeb][_0x77b7('0x75')]){_0x422ec1['group'](_0x2a301a);}_0x1da758[_0x5e8eeb][_0x77b7('0x76')]&&_0x422ec1['order'](_0x2a301a,_0x1da758[_0x5e8eeb][_0x77b7('0x76')]===_0x77b7('0x77')?![]:!![]);_0x422ec1[_0x77b7('0x68')](_0x2a301a,_0x1da758[_0x5e8eeb][_0x77b7('0x78')]||_0x2a301a);}if(_0x1ef762['joins']){_0x1ef762['joins']=JSON[_0x77b7('0x79')](_0x1ef762[_0x77b7('0x7a')]);for(var _0x34e7b7=0x0;_0x34e7b7<_0x1ef762[_0x77b7('0x7a')][_0x77b7('0x37')];_0x34e7b7+=0x1){if(_0x1ef762[_0x77b7('0x7a')][_0x34e7b7][_0x77b7('0x31')]&&_[_0x77b7('0x60')](_0x24849f,_0x1ef762[_0x77b7('0x7a')][_0x34e7b7][_0x77b7('0x31')])&&_0x1ef762[_0x77b7('0x7a')][_0x34e7b7]['parentKey']&&_0x1ef762[_0x77b7('0x7a')][_0x34e7b7]['foreignTable']&&_0x1ef762['joins'][_0x34e7b7]['foreignKey']){_0x422ec1[_0x1ef762['joins'][_0x34e7b7][_0x77b7('0x31')]](_0x1ef762[_0x77b7('0x7a')][_0x34e7b7][_0x77b7('0x7b')],null,util[_0x77b7('0x74')](_0x77b7('0x7c'),_0x1ef762[_0x77b7('0x71')],_0x1ef762[_0x77b7('0x7a')][_0x34e7b7]['parentKey'],_0x1ef762['joins'][_0x34e7b7][_0x77b7('0x7b')],_0x1ef762[_0x77b7('0x7a')][_0x34e7b7][_0x77b7('0x7d')]));}}}if(_0x1ef762[_0x77b7('0x7e')]){_0x1ef762[_0x77b7('0x7e')]=JSON[_0x77b7('0x79')](_0x1ef762[_0x77b7('0x7e')]);_0x422ec1[_0x77b7('0x3c')](_0xb9b06d(_0x1ef762[_0x77b7('0x7e')][_0x77b7('0x67')]));}_0x1dfc32=_0x422ec1['clone']();_0x422ec1[_0x77b7('0x1e')](_0x21a124);_0x422ec1[_0x77b7('0x1c')](0x0);logger[_0x77b7('0x7f')](_0x77b7('0x80'),_0x422ec1[_0x77b7('0x81')]());return dbH['sequelize'][_0x77b7('0x33')](_0x422ec1[_0x77b7('0x81')](),{'type':dbH[_0x77b7('0x82')]['QueryTypes']['SELECT']});}})[_0x77b7('0x23')](respondWithResult(_0x97ff42,null))['catch'](handleError(_0x97ff42,null));};function runReport(_0x2ea612,_0x2b1ad5,_0x5473f1){var _0x513327=_0x2b1ad5['name'];var _0x55226c=0xa;var _0xf14dd9=[_0x77b7('0x53'),'left_join',_0x77b7('0x55'),'cross_join'];var _0x5d5827={'SUM':_0x77b7('0x83'),'COUNT':'COUNT(%s)','COUNT DISTINCT':_0x77b7('0x58'),'MAX':'MAX(%s)','MIN':'MIN(%s)','AVG':_0x77b7('0x5b'),'GROUP_CONCAT':_0x77b7('0x84'),'GROUP_CONCAT ASC':_0x77b7('0x85'),'GROUP_CONCAT DESC':_0x77b7('0x5c')};var _0x5bed22={'SEC_TO_TIME':'SEC_TO_TIME(%s)','DATE':'DATE(%s)','HOUR':_0x77b7('0x86'),'ROUND':_0x77b7('0x5e'),'UNIX_TIMESTAMP':_0x77b7('0x5f')};var _0x2b4cb2=function(_0xd99d44){return!_[_0x77b7('0x60')]([_0x77b7('0x61'),_0x77b7('0x62'),_0x77b7('0x63'),_0x77b7('0x64')],_0xd99d44);};var _0x5c3f2c=function(_0x501e17){if(!_0x501e17||!_0x501e17[_0x77b7('0x65')][_0x77b7('0x37')]){return'';}for(var _0x2b6133='(',_0x20be52=0x0;_0x20be52<_0x501e17[_0x77b7('0x65')][_0x77b7('0x37')];_0x20be52+=0x1){_0x20be52>0x0&&(_0x2b6133+='\x20'+_0x501e17[_0x77b7('0x66')]+'\x20');_0x2b6133+=_0x501e17[_0x77b7('0x65')][_0x20be52][_0x77b7('0x67')]?_0x5c3f2c(_0x501e17[_0x77b7('0x65')][_0x20be52]['group']):_0x501e17[_0x77b7('0x65')][_0x20be52][_0x77b7('0x68')]+'\x20'+_0x501e17['rules'][_0x20be52][_0x77b7('0x69')]+(_0x2b4cb2(_0x501e17[_0x77b7('0x65')][_0x20be52]['condition'])?'\x20'+_0x501e17[_0x77b7('0x65')][_0x20be52]['value']:'');}return _0x2b6133+')';};var _0x183514={'where':{'id':_0x2ea612['id']}},_0x3602b6,_0x22cdf4,_0x2fe679,_0x5ed358,_0x1ee556;_0x183514=_['merge']({},_0x183514,_0x5473f1);return db[_0x77b7('0x2f')][_0x77b7('0x4a')](_0x183514)[_0x77b7('0x23')](function(_0x135fde){if(_0x135fde){_0x3602b6=_0x135fde;return _0x135fde[_0x77b7('0x6b')]();}return null;})[_0x77b7('0x23')](function(_0x3f1540){if(_0x3f1540){if(!_0x3f1540[_0x77b7('0x37')]){throw new db[(_0x77b7('0x6c'))]['ValidationErrorItem'](_0x77b7('0x87'),0x193);}_0x22cdf4=_0x3f1540;return db[_0x77b7('0x6e')][_0x77b7('0x44')]({'raw':!![]});}return null;})[_0x77b7('0x23')](function(_0x1fb696){if(_0x1fb696){_0x2fe679=_[_0x77b7('0x6f')](_0x1fb696,'id');var _0x4e5883;var _0x58415f=squel[_0x77b7('0x88')]();_0x58415f[_0x77b7('0x70')](_0x3602b6[_0x77b7('0x71')]);for(var _0x5b8b74=0x0;_0x5b8b74<_0x22cdf4[_0x77b7('0x37')];_0x5b8b74+=0x1){_0x4e5883=_0x22cdf4[_0x5b8b74]['MetricId']?_0x2fe679[_0x22cdf4[_0x5b8b74][_0x77b7('0x72')]][_0x77b7('0x89')]:_0x22cdf4[_0x5b8b74][_0x77b7('0x68')];_0x4e5883=_0x22cdf4[_0x5b8b74][_0x77b7('0x8a')]?_[_0x77b7('0x73')](_0x5d5827[_0x22cdf4[_0x5b8b74]['function']],'%s',_0x4e5883):_0x4e5883;_0x4e5883=_0x22cdf4[_0x5b8b74][_0x77b7('0x74')]?_['replace'](_0x5bed22[_0x22cdf4[_0x5b8b74][_0x77b7('0x74')]],'%s',_0x4e5883):_0x4e5883;if(_0x22cdf4[_0x5b8b74][_0x77b7('0x75')]){_0x58415f[_0x77b7('0x67')](_0x4e5883);}_0x22cdf4[_0x5b8b74][_0x77b7('0x76')]&&_0x58415f[_0x77b7('0x3a')](_0x4e5883,_0x22cdf4[_0x5b8b74][_0x77b7('0x76')]==='DESC'?![]:!![]);_0x58415f[_0x77b7('0x68')](_0x4e5883,_0x22cdf4[_0x5b8b74]['alias']||_0x4e5883);}if(_0x3602b6[_0x77b7('0x7a')]){_0x3602b6['joins']=JSON[_0x77b7('0x79')](_0x3602b6['joins']);for(var _0x2798da=0x0;_0x2798da<_0x3602b6['joins'][_0x77b7('0x37')];_0x2798da+=0x1){if(_0x3602b6['joins'][_0x2798da][_0x77b7('0x31')]&&_[_0x77b7('0x60')](_0xf14dd9,_0x3602b6[_0x77b7('0x7a')][_0x2798da]['type'])&&_0x3602b6[_0x77b7('0x7a')][_0x2798da][_0x77b7('0x8b')]&&_0x3602b6[_0x77b7('0x7a')][_0x2798da][_0x77b7('0x7b')]&&_0x3602b6['joins'][_0x2798da][_0x77b7('0x7d')]){_0x58415f[_0x3602b6[_0x77b7('0x7a')][_0x2798da][_0x77b7('0x31')]](_0x3602b6['joins'][_0x2798da][_0x77b7('0x7b')],null,util[_0x77b7('0x74')](_0x77b7('0x7c'),_0x3602b6[_0x77b7('0x71')],_0x3602b6[_0x77b7('0x7a')][_0x2798da]['parentKey'],_0x3602b6[_0x77b7('0x7a')][_0x2798da][_0x77b7('0x7b')],_0x3602b6[_0x77b7('0x7a')][_0x2798da][_0x77b7('0x7d')]));}}}if(_0x3602b6[_0x77b7('0x7e')]){_0x3602b6[_0x77b7('0x7e')]=JSON['parse'](_0x3602b6[_0x77b7('0x7e')]);_0x58415f[_0x77b7('0x3c')](_0x5c3f2c(_0x3602b6[_0x77b7('0x7e')]['group']));}_0x1ee556=_0x58415f[_0x77b7('0x8c')]();_0x58415f['limit'](_0x55226c);_0x58415f[_0x77b7('0x1c')](0x0);return;}})[_0x77b7('0x23')](function(){if(_0x2b1ad5[_0x77b7('0x8d')]==='web'){return null;}var _0x3061be=_[_0x77b7('0x40')](_0x2b1ad5,{'name':_0x2b1ad5[_0x77b7('0x8e')]||_0x2b1ad5['name']||_0x3602b6[_0x77b7('0x2b')],'basename':_0x513327,'savename':util['format']('%s-%s.%s',_0x2b1ad5['name']||_0x3602b6['name'],require(_0x77b7('0x8f'))[_0x77b7('0x90')](0x4),_0x2b1ad5[_0x77b7('0x8d')]||_0x77b7('0x91')),'reportId':_0x3602b6['id'],'reportType':_0x77b7('0x92')});return db[_0x77b7('0x93')][_0x77b7('0x4b')](_0x3061be,{'raw':!![]});})['then'](function(_0x3848bb){if(_0x3602b6['table']===_0x77b7('0x94')){_0x1ee556[_0x77b7('0x3c')](_0x3602b6[_0x77b7('0x71')]+'.calldate\x20BETWEEN\x20?\x20AND\x20?',_0x2b1ad5['startDate'],_0x2b1ad5[_0x77b7('0x95')]);}else{_0x1ee556['where'](_0x3602b6['table']+_0x77b7('0x96'),_0x2b1ad5['startDate'],_0x2b1ad5['endDate']);}if(_0x3848bb){logger[_0x77b7('0x97')](_0x77b7('0x98'),_0x1ee556[_0x77b7('0x81')]());require('child_process')[_0x77b7('0x99')](path[_0x77b7('0x53')](__dirname,'../../components/export/',_0x3848bb[_0x77b7('0x8d')]),[_0x3848bb['id'],_0x1ee556[_0x77b7('0x81')](),path[_0x77b7('0x53')](__dirname,_0x77b7('0x9a'),_0x3848bb[_0x77b7('0x9b')]),_0x513327]);return _0x3848bb;}else{var _0x51dd0f=squel[_0x77b7('0x88')]();_0x51dd0f[_0x77b7('0x70')]('('+_0x1ee556['toString']()+')',_0x77b7('0x9c'));_0x51dd0f['field'](_0x77b7('0x9d'),_0x77b7('0x1f'));_0x1ee556[_0x77b7('0x1e')](_0x2b1ad5[_0x77b7('0x1e')]||_0x55226c);_0x1ee556[_0x77b7('0x1c')](_0x2b1ad5['offset']||0x0);return dbH[_0x77b7('0x82')]['query'](_0x51dd0f[_0x77b7('0x81')](),{'type':dbH[_0x77b7('0x82')][_0x77b7('0x9e')][_0x77b7('0x9f')]})[_0x77b7('0x23')](function(_0x3c543e){if(!_0x3c543e[_0x77b7('0x37')]){_0x5ed358=0x0;}else{_0x5ed358=_0x3c543e[0x0][_0x77b7('0x1f')]||0x0;}return dbH[_0x77b7('0x82')][_0x77b7('0x33')](_0x1ee556[_0x77b7('0x81')](),{'type':dbH['sequelize'][_0x77b7('0x9e')][_0x77b7('0x9f')]});})[_0x77b7('0x23')](function(_0x3da8d1){return{'rows':_0x3da8d1||[],'count':_0x5ed358};});}});}exports[_0x77b7('0xa0')]=function(_0x40a46e,_0x257ccb){return runReport(_0x40a46e[_0x77b7('0x47')],_0x40a46e[_0x77b7('0x33')],_0x40a46e[_0x77b7('0x42')])['then'](respondWithResult(_0x257ccb,null))[_0x77b7('0x46')](handleError(_0x257ccb,null));};exports['runReport']=runReport;exports[_0x77b7('0x33')]=function(_0x56d269,_0x1237a6){var _0x10b685=0xa;var _0x57908f=[_0x77b7('0x53'),_0x77b7('0x54'),_0x77b7('0x55'),'cross_join'];var _0x430b54={'SUM':_0x77b7('0x83'),'COUNT':_0x77b7('0x57'),'COUNT DISTINCT':_0x77b7('0x58'),'MAX':'MAX(%s)','MIN':_0x77b7('0x5a'),'AVG':_0x77b7('0x5b'),'GROUP_CONCAT':'GROUP_CONCAT(%s)','GROUP_CONCAT ASC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT DESC':_0x77b7('0x5c')};var _0x14c89={'SEC_TO_TIME':_0x77b7('0xa1'),'DATE':_0x77b7('0x5d'),'HOUR':_0x77b7('0x86'),'ROUND':_0x77b7('0x5e'),'UNIX_TIMESTAMP':_0x77b7('0x5f')};var _0x1b3064=function(_0x3c256e){return!_[_0x77b7('0x60')](['IS\x20NULL','IS\x20NOT\x20NULL',_0x77b7('0x63'),_0x77b7('0x64')],_0x3c256e);};var _0x16c98e=function(_0x4823bd){if(!_0x4823bd||!_0x4823bd[_0x77b7('0x65')][_0x77b7('0x37')]){return'';}for(var _0x21dd10='(',_0x3d82c8=0x0;_0x3d82c8<_0x4823bd[_0x77b7('0x65')]['length'];_0x3d82c8+=0x1){_0x3d82c8>0x0&&(_0x21dd10+='\x20'+_0x4823bd['operator']+'\x20');_0x21dd10+=_0x4823bd[_0x77b7('0x65')][_0x3d82c8][_0x77b7('0x67')]?_0x16c98e(_0x4823bd[_0x77b7('0x65')][_0x3d82c8]['group']):_0x4823bd['rules'][_0x3d82c8][_0x77b7('0x68')]+'\x20'+_0x4823bd['rules'][_0x3d82c8][_0x77b7('0x69')]+(_0x1b3064(_0x4823bd['rules'][_0x3d82c8]['condition'])?'\x20'+_0x4823bd['rules'][_0x3d82c8][_0x77b7('0x6a')]:'');}return _0x21dd10+')';};var _0x262bf7={'where':{'id':_0x56d269[_0x77b7('0x47')]['id']}},_0x4e70f9,_0x56edc0,_0x2df19a,_0x157672,_0x74710d;_0x262bf7=_['merge']({},_0x262bf7,_0x56d269[_0x77b7('0x42')]);return db[_0x77b7('0x2f')][_0x77b7('0x4a')](_0x262bf7)[_0x77b7('0x23')](function(_0x50a8c0){if(_0x50a8c0){_0x4e70f9=_0x50a8c0;return _0x50a8c0[_0x77b7('0x6b')]();}return null;})['then'](function(_0x15a22c){if(_0x15a22c){if(!_0x15a22c[_0x77b7('0x37')]){throw new db[(_0x77b7('0x6c'))][(_0x77b7('0x6d'))](_0x77b7('0x87'),0x193);}_0x56edc0=_0x15a22c;return db[_0x77b7('0x6e')]['findAll']({'raw':!![]});}return null;})['then'](function(_0x425218){if(_0x425218){_0x2df19a=_[_0x77b7('0x6f')](_0x425218,'id');var _0x1d9a41;var _0x7199c7=squel[_0x77b7('0x88')]();_0x7199c7[_0x77b7('0x70')](_0x4e70f9[_0x77b7('0x71')]);for(var _0x333f7f=0x0;_0x333f7f<_0x56edc0[_0x77b7('0x37')];_0x333f7f+=0x1){_0x1d9a41=_0x56edc0[_0x333f7f][_0x77b7('0x72')]?_0x2df19a[_0x56edc0[_0x333f7f][_0x77b7('0x72')]][_0x77b7('0x89')]:_0x56edc0[_0x333f7f][_0x77b7('0x68')];_0x1d9a41=_0x56edc0[_0x333f7f]['function']?_['replace'](_0x430b54[_0x56edc0[_0x333f7f]['function']],'%s',_0x1d9a41):_0x1d9a41;_0x1d9a41=_0x56edc0[_0x333f7f][_0x77b7('0x74')]?_[_0x77b7('0x73')](_0x14c89[_0x56edc0[_0x333f7f][_0x77b7('0x74')]],'%s',_0x1d9a41):_0x1d9a41;if(_0x56edc0[_0x333f7f][_0x77b7('0x75')]){_0x7199c7['group'](_0x1d9a41);}_0x56edc0[_0x333f7f][_0x77b7('0x76')]&&_0x7199c7[_0x77b7('0x3a')](_0x1d9a41,_0x56edc0[_0x333f7f][_0x77b7('0x76')]===_0x77b7('0x77')?![]:!![]);_0x7199c7[_0x77b7('0x68')](_0x1d9a41,_0x56edc0[_0x333f7f][_0x77b7('0x78')]||_0x1d9a41);}if(_0x4e70f9[_0x77b7('0x7a')]){_0x4e70f9[_0x77b7('0x7a')]=JSON[_0x77b7('0x79')](_0x4e70f9['joins']);for(var _0x2d09bd=0x0;_0x2d09bd<_0x4e70f9[_0x77b7('0x7a')][_0x77b7('0x37')];_0x2d09bd+=0x1){if(_0x4e70f9[_0x77b7('0x7a')][_0x2d09bd]['type']&&_['includes'](_0x57908f,_0x4e70f9['joins'][_0x2d09bd]['type'])&&_0x4e70f9['joins'][_0x2d09bd][_0x77b7('0x8b')]&&_0x4e70f9['joins'][_0x2d09bd][_0x77b7('0x7b')]&&_0x4e70f9[_0x77b7('0x7a')][_0x2d09bd][_0x77b7('0x7d')]){_0x7199c7[_0x4e70f9['joins'][_0x2d09bd][_0x77b7('0x31')]](_0x4e70f9[_0x77b7('0x7a')][_0x2d09bd][_0x77b7('0x7b')],null,util[_0x77b7('0x74')]('%s.%s\x20=\x20%s.%s',_0x4e70f9[_0x77b7('0x71')],_0x4e70f9[_0x77b7('0x7a')][_0x2d09bd][_0x77b7('0x8b')],_0x4e70f9[_0x77b7('0x7a')][_0x2d09bd]['foreignTable'],_0x4e70f9[_0x77b7('0x7a')][_0x2d09bd][_0x77b7('0x7d')]));}}}if(_0x4e70f9[_0x77b7('0x7e')]){_0x4e70f9[_0x77b7('0x7e')]=JSON[_0x77b7('0x79')](_0x4e70f9[_0x77b7('0x7e')]);_0x7199c7['where'](_0x16c98e(_0x4e70f9[_0x77b7('0x7e')]['group']));}_0x74710d=_0x7199c7[_0x77b7('0x8c')]();_0x7199c7[_0x77b7('0x1e')](_0x10b685);_0x7199c7[_0x77b7('0x1c')](0x0);logger[_0x77b7('0x7f')](_0x77b7('0x80'),_0x7199c7[_0x77b7('0x81')]());return dbH['sequelize'][_0x77b7('0x33')](_0x7199c7[_0x77b7('0x81')](),{'type':dbH[_0x77b7('0x82')][_0x77b7('0x9e')][_0x77b7('0x9f')]});}})[_0x77b7('0x23')](function(){return{'sql':_0x74710d[_0x77b7('0x81')]()};})[_0x77b7('0x23')](respondWithResult(_0x1237a6,null))[_0x77b7('0x46')](handleError(_0x1237a6,null));}; \ No newline at end of file diff --git a/server/api/analyticCustomReport/analyticCustomReport.model.js b/server/api/analyticCustomReport/analyticCustomReport.model.js index 56f6731..65f3101 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 _0x2d63=['AnalyticCustomReport','util','../../config/logger','moment','bluebird','request-promise','rimraf','../../config/environment','./analyticCustomReport.attributes','define'];(function(_0xa85dbd,_0x2838a5){var _0x3be7aa=function(_0x2573f8){while(--_0x2573f8){_0xa85dbd['push'](_0xa85dbd['shift']());}};_0x3be7aa(++_0x2838a5);}(_0x2d63,0x123));var _0x32d6=function(_0x30d98a,_0x423e0e){_0x30d98a=_0x30d98a-0x0;var _0x5086cb=_0x2d63[_0x30d98a];return _0x5086cb;};'use strict';var _=require('lodash');var util=require(_0x32d6('0x0'));var logger=require(_0x32d6('0x1'))('api');var moment=require(_0x32d6('0x2'));var BPromise=require(_0x32d6('0x3'));var rp=require(_0x32d6('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x32d6('0x5'));var config=require(_0x32d6('0x6'));var attributes=require(_0x32d6('0x7'));module['exports']=function(_0x38b3cf,_0x188793){return _0x38b3cf[_0x32d6('0x8')](_0x32d6('0x9'),attributes,{'tableName':'analytics_custom_reports','paranoid':!![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x4ac0=['bluebird','request-promise','rimraf','../../config/environment','./analyticCustomReport.attributes','exports','define','AnalyticCustomReport','analytics_custom_reports','util','api','moment'];(function(_0x11005e,_0x20c3d2){var _0x29338f=function(_0x3384e9){while(--_0x3384e9){_0x11005e['push'](_0x11005e['shift']());}};_0x29338f(++_0x20c3d2);}(_0x4ac0,0x141));var _0x04ac=function(_0x5ddb1c,_0x5ea4df){_0x5ddb1c=_0x5ddb1c-0x0;var _0x354adc=_0x4ac0[_0x5ddb1c];return _0x354adc;};'use strict';var _=require('lodash');var util=require(_0x04ac('0x0'));var logger=require('../../config/logger')(_0x04ac('0x1'));var moment=require(_0x04ac('0x2'));var BPromise=require(_0x04ac('0x3'));var rp=require(_0x04ac('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x04ac('0x5'));var config=require(_0x04ac('0x6'));var attributes=require(_0x04ac('0x7'));module[_0x04ac('0x8')]=function(_0xa6be36,_0x1d6622){return _0xa6be36[_0x04ac('0x9')](_0x04ac('0xa'),attributes,{'tableName':_0x04ac('0xb'),'paranoid':!![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/analyticCustomReport/analyticCustomReport.rpc.js b/server/api/analyticCustomReport/analyticCustomReport.rpc.js index 28fef7e..8475e45 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 _0xc221=['jayson/promise','http','request','then','info','AnalyticCustomReport,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x150723,_0x13a2b4){var _0x20ec6d=function(_0x39f28d){while(--_0x39f28d){_0x150723['push'](_0x150723['shift']());}};_0x20ec6d(++_0x13a2b4);}(_0xc221,0x1c4));var _0x1c22=function(_0x4fdd6a,_0x3305ef){_0x4fdd6a=_0x4fdd6a-0x0;var _0x3dfd28=_0xc221[_0x4fdd6a];return _0x3dfd28;};'use strict';var _=require(_0x1c22('0x0'));var util=require(_0x1c22('0x1'));var moment=require(_0x1c22('0x2'));var BPromise=require(_0x1c22('0x3'));var rs=require(_0x1c22('0x4'));var fs=require('fs');var Redis=require(_0x1c22('0x5'));var db=require(_0x1c22('0x6'))['db'];var utils=require(_0x1c22('0x7'));var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require(_0x1c22('0x8'));var client=jayson['client'][_0x1c22('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x35aaf8,_0x39de6c,_0x36d0de){return new BPromise(function(_0x9277b2,_0x2c7ddf){return client[_0x1c22('0xa')](_0x35aaf8,_0x36d0de)[_0x1c22('0xb')](function(_0x23e649){logger[_0x1c22('0xc')](_0x1c22('0xd'),_0x39de6c,_0x1c22('0xe'));logger[_0x1c22('0xf')]('AnalyticCustomReport,\x20%s,\x20%s,\x20%s',_0x39de6c,'request\x20sent',JSON[_0x1c22('0x10')](_0x23e649));if(_0x23e649['error']){if(_0x23e649[_0x1c22('0x11')]['code']===0x1f4){logger[_0x1c22('0x11')]('AnalyticCustomReport,\x20%s,\x20%s',_0x39de6c,_0x23e649[_0x1c22('0x11')]['message']);return _0x2c7ddf(_0x23e649[_0x1c22('0x11')][_0x1c22('0x12')]);}logger[_0x1c22('0x11')](_0x1c22('0xd'),_0x39de6c,_0x23e649[_0x1c22('0x11')][_0x1c22('0x12')]);return _0x9277b2(_0x23e649[_0x1c22('0x11')][_0x1c22('0x12')]);}else{logger[_0x1c22('0xc')](_0x1c22('0xd'),_0x39de6c,_0x1c22('0xe'));_0x9277b2(_0x23e649['result'][_0x1c22('0x12')]);}})[_0x1c22('0x13')](function(_0x4f507b){logger[_0x1c22('0x11')](_0x1c22('0xd'),_0x39de6c,_0x4f507b);_0x2c7ddf(_0x4f507b);});});} \ No newline at end of file +var _0x4b0d=['jayson/promise','client','http','request','then','info','AnalyticCustomReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticCustomReport,\x20%s,\x20%s,\x20%s','stringify','code','error','message','result','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment'];(function(_0xe0009,_0x547637){var _0x47c284=function(_0x3ab567){while(--_0x3ab567){_0xe0009['push'](_0xe0009['shift']());}};_0x47c284(++_0x547637);}(_0x4b0d,0x114));var _0xd4b0=function(_0x7aef09,_0x192202){_0x7aef09=_0x7aef09-0x0;var _0x224203=_0x4b0d[_0x7aef09];return _0x224203;};'use strict';var _=require('lodash');var util=require(_0xd4b0('0x0'));var moment=require(_0xd4b0('0x1'));var BPromise=require(_0xd4b0('0x2'));var rs=require(_0xd4b0('0x3'));var fs=require('fs');var Redis=require(_0xd4b0('0x4'));var db=require(_0xd4b0('0x5'))['db'];var utils=require(_0xd4b0('0x6'));var logger=require(_0xd4b0('0x7'))(_0xd4b0('0x8'));var config=require(_0xd4b0('0x9'));var jayson=require(_0xd4b0('0xa'));var client=jayson[_0xd4b0('0xb')][_0xd4b0('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x20bb29,_0x3930a1,_0x568226){return new BPromise(function(_0x41a3ce,_0x4467f9){return client[_0xd4b0('0xd')](_0x20bb29,_0x568226)[_0xd4b0('0xe')](function(_0x39872a){logger[_0xd4b0('0xf')](_0xd4b0('0x10'),_0x3930a1,_0xd4b0('0x11'));logger[_0xd4b0('0x12')](_0xd4b0('0x13'),_0x3930a1,_0xd4b0('0x11'),JSON[_0xd4b0('0x14')](_0x39872a));if(_0x39872a['error']){if(_0x39872a['error'][_0xd4b0('0x15')]===0x1f4){logger[_0xd4b0('0x16')](_0xd4b0('0x10'),_0x3930a1,_0x39872a[_0xd4b0('0x16')]['message']);return _0x4467f9(_0x39872a[_0xd4b0('0x16')][_0xd4b0('0x17')]);}logger['error']('AnalyticCustomReport,\x20%s,\x20%s',_0x3930a1,_0x39872a[_0xd4b0('0x16')][_0xd4b0('0x17')]);return _0x41a3ce(_0x39872a[_0xd4b0('0x16')][_0xd4b0('0x17')]);}else{logger[_0xd4b0('0xf')]('AnalyticCustomReport,\x20%s,\x20%s',_0x3930a1,_0xd4b0('0x11'));_0x41a3ce(_0x39872a[_0xd4b0('0x18')][_0xd4b0('0x17')]);}})[_0xd4b0('0x19')](function(_0x2512c9){logger[_0xd4b0('0x16')](_0xd4b0('0x10'),_0x3930a1,_0x2512c9);_0x4467f9(_0x2512c9);});});} \ No newline at end of file diff --git a/server/api/analyticCustomReport/index.js b/server/api/analyticCustomReport/index.js index afd1c36..ad880fb 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 _0x9dc3=['run','/:id/query','post','create','put','/:id','update','delete','destroy','exports','multer','util','path','connect-timeout','express','fs-extra','../../components/interaction/service','./analyticCustomReport.controller','get','isAuthenticated','index','show','/:id/preview','preview'];(function(_0x5b644e,_0x2e5e07){var _0x49c6bf=function(_0x3032d9){while(--_0x3032d9){_0x5b644e['push'](_0x5b644e['shift']());}};_0x49c6bf(++_0x2e5e07);}(_0x9dc3,0x1d2));var _0x39dc=function(_0x3d3548,_0x3ef6f3){_0x3d3548=_0x3d3548-0x0;var _0x3622d7=_0x9dc3[_0x3d3548];return _0x3622d7;};'use strict';var multer=require(_0x39dc('0x0'));var util=require(_0x39dc('0x1'));var path=require(_0x39dc('0x2'));var timeout=require(_0x39dc('0x3'));var express=require(_0x39dc('0x4'));var router=express['Router']();var fs_extra=require(_0x39dc('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x39dc('0x6'));var config=require('../../config/environment');var controller=require(_0x39dc('0x7'));router[_0x39dc('0x8')]('/',auth[_0x39dc('0x9')](),controller[_0x39dc('0xa')]);router[_0x39dc('0x8')]('/:id',auth[_0x39dc('0x9')](),controller[_0x39dc('0xb')]);router[_0x39dc('0x8')](_0x39dc('0xc'),auth[_0x39dc('0x9')](),controller[_0x39dc('0xd')]);router['get']('/:id/run',auth['isAuthenticated'](),controller[_0x39dc('0xe')]);router['get'](_0x39dc('0xf'),auth[_0x39dc('0x9')](),controller['query']);router[_0x39dc('0x10')]('/',auth[_0x39dc('0x9')](),controller[_0x39dc('0x11')]);router[_0x39dc('0x12')](_0x39dc('0x13'),auth[_0x39dc('0x9')](),controller[_0x39dc('0x14')]);router[_0x39dc('0x15')](_0x39dc('0x13'),auth[_0x39dc('0x9')](),controller[_0x39dc('0x16')]);module[_0x39dc('0x17')]=router; \ No newline at end of file +var _0xa818=['/:id/run','run','query','post','put','delete','destroy','multer','util','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./analyticCustomReport.controller','get','isAuthenticated','index','/:id','preview'];(function(_0x36b6b4,_0x48813c){var _0x44f801=function(_0x369a62){while(--_0x369a62){_0x36b6b4['push'](_0x36b6b4['shift']());}};_0x44f801(++_0x48813c);}(_0xa818,0x103));var _0x8a81=function(_0x191154,_0x56f74c){_0x191154=_0x191154-0x0;var _0x3dcd73=_0xa818[_0x191154];return _0x3dcd73;};'use strict';var multer=require(_0x8a81('0x0'));var util=require(_0x8a81('0x1'));var path=require(_0x8a81('0x2'));var timeout=require(_0x8a81('0x3'));var express=require(_0x8a81('0x4'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0x8a81('0x5'));var interaction=require(_0x8a81('0x6'));var config=require(_0x8a81('0x7'));var controller=require(_0x8a81('0x8'));router[_0x8a81('0x9')]('/',auth[_0x8a81('0xa')](),controller[_0x8a81('0xb')]);router['get'](_0x8a81('0xc'),auth[_0x8a81('0xa')](),controller['show']);router[_0x8a81('0x9')]('/:id/preview',auth['isAuthenticated'](),controller[_0x8a81('0xd')]);router[_0x8a81('0x9')](_0x8a81('0xe'),auth[_0x8a81('0xa')](),controller[_0x8a81('0xf')]);router[_0x8a81('0x9')]('/:id/query',auth[_0x8a81('0xa')](),controller[_0x8a81('0x10')]);router[_0x8a81('0x11')]('/',auth[_0x8a81('0xa')](),controller['create']);router[_0x8a81('0x12')](_0x8a81('0xc'),auth[_0x8a81('0xa')](),controller['update']);router[_0x8a81('0x13')](_0x8a81('0xc'),auth[_0x8a81('0xa')](),controller[_0x8a81('0x14')]);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 407c9c7..720aeac 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 _0x1883=['exports','STRING','TEXT','sequelize'];(function(_0x4d968d,_0x2c2fbc){var _0x1a74d0=function(_0x4966a2){while(--_0x4966a2){_0x4d968d['push'](_0x4d968d['shift']());}};_0x1a74d0(++_0x2c2fbc);}(_0x1883,0xab));var _0x3188=function(_0x37e3bc,_0x151a0e){_0x37e3bc=_0x37e3bc-0x0;var _0x50936a=_0x1883[_0x37e3bc];return _0x50936a;};'use strict';var Sequelize=require(_0x3188('0x0'));module[_0x3188('0x1')]={'name':{'type':Sequelize[_0x3188('0x2')],'allowNull':![]},'description':{'type':Sequelize[_0x3188('0x2')]},'parent':{'type':Sequelize[_0x3188('0x2')]},'table':{'type':Sequelize[_0x3188('0x2')]},'conditions':{'type':Sequelize[_0x3188('0x3')]},'joins':{'type':Sequelize[_0x3188('0x3')]}}; \ No newline at end of file +var _0x5d58=['TEXT','STRING'];(function(_0x2a6853,_0x1948b6){var _0x2ca207=function(_0x1c81c9){while(--_0x1c81c9){_0x2a6853['push'](_0x2a6853['shift']());}};_0x2ca207(++_0x1948b6);}(_0x5d58,0x187));var _0x85d5=function(_0x417084,_0x4c93dc){_0x417084=_0x417084-0x0;var _0x34bb00=_0x5d58[_0x417084];return _0x34bb00;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize['STRING'],'allowNull':![]},'description':{'type':Sequelize['STRING']},'parent':{'type':Sequelize['STRING']},'table':{'type':Sequelize[_0x85d5('0x0')]},'conditions':{'type':Sequelize[_0x85d5('0x1')]},'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 e6e6614..e3a857d 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 _0x4975=['set','Content-Range','save','update','then','destroy','get','DefaultReports','UserProfileResource','error','stack','name','index','AnalyticDefaultReport','rawAttributes','type','key','map','query','filters','intersection','model','fields','attributes','length','nolimit','order','sort','where','pick','filter','VIRTUAL','merge','options','includeAll','include','findAll','rows','catch','params','keys','find','body','role','user','Reports','UserProfileSection','create','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','preview','join','SUM(%s)','COUNT(%s)','MAX(%s)','GROUP_CONCAT(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)','SEC_TO_TIME(%s)','DATE(%s)','ROUND(%s)','UNIX_TIMESTAMP(%s)','IS\x20NULL','IS\x20NOT\x20NULL','IS\x20EMPTY','IS\x20NOT\x20EMPTY','rules','group','field','condition','value','Sequelize','ValidationErrorItem','AnalyticMetric','keyBy','select','from','table','MetricId','metric','function','format','groupBy','orderBy','DESC','joins','includes','parentKey','foreignKey','foreignTable','conditions','parse','debug','Limited\x20Query:','sequelize','QueryTypes','SELECT','left_join','COUNT(DISTINCT\x20%s)','MIN(%s)','AVG(%s)','HOUR(%s)','operator','Please\x20insert\x20at\x20least\x20one\x20field','alias','%s.%s\x20=\x20%s.%s','output','web','fullPath','%s-%s.%s','randomstring','generate','csv','AnalyticExtractedReport','cdr','.calldate\x20BETWEEN\x20?\x20AND\x20?','startDate','endDate','.createdAt\x20BETWEEN\x20?\x20AND\x20?','info','Run\x20Query:','toString','child_process','fork','../../components/export/','../../files/reports','savename','countTable','COUNT(*)','run','runReport','cross_join','getFields','replace','clone','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','fs-extra','squel','crypto','jsforce','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../mysqldb','dbH','sendStatus','status','end','json','offset','undefined','count','limit'];(function(_0x4326c7,_0x21ae83){var _0x82782c=function(_0x20f41c){while(--_0x20f41c){_0x4326c7['push'](_0x4326c7['shift']());}};_0x82782c(++_0x21ae83);}(_0x4975,0x86));var _0x5497=function(_0x53b510,_0x4ff3d6){_0x53b510=_0x53b510-0x0;var _0x2f21d3=_0x4975[_0x53b510];return _0x2f21d3;};'use strict';var emlformat=require(_0x5497('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x5497('0x1'));var jsonpatch=require(_0x5497('0x2'));var rp=require(_0x5497('0x3'));var moment=require(_0x5497('0x4'));var BPromise=require(_0x5497('0x5'));var Mustache=require(_0x5497('0x6'));var util=require(_0x5497('0x7'));var path=require(_0x5497('0x8'));var sox=require(_0x5497('0x9'));var csv=require(_0x5497('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x5497('0xb'));var _=require('lodash');var squel=require(_0x5497('0xc'));var crypto=require(_0x5497('0xd'));var jsforce=require(_0x5497('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x5497('0xa'));var querystring=require('querystring');var Papa=require(_0x5497('0xf'));var Redis=require(_0x5497('0x10'));var authService=require(_0x5497('0x11'));var qs=require(_0x5497('0x12'));var as=require(_0x5497('0x13'));var hardwareService=require(_0x5497('0x14'));var logger=require(_0x5497('0x15'))(_0x5497('0x16'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x5497('0x17'))['db'];var dbH=require(_0x5497('0x17'))[_0x5497('0x18')];function respondWithStatusCode(_0x984990,_0x747dc7){_0x747dc7=_0x747dc7||0xcc;return function(_0x365144){if(_0x365144){return _0x984990[_0x5497('0x19')](_0x747dc7);}return _0x984990[_0x5497('0x1a')](_0x747dc7)[_0x5497('0x1b')]();};}function respondWithResult(_0x1a4c74,_0x55f590){_0x55f590=_0x55f590||0xc8;return function(_0x11b0a9){if(_0x11b0a9){return _0x1a4c74['status'](_0x55f590)[_0x5497('0x1c')](_0x11b0a9);}};}function respondWithFilteredResult(_0x2bfd8a,_0x19e5f3){return function(_0x3ce50b){if(_0x3ce50b){var _0x37c18e=typeof _0x19e5f3[_0x5497('0x1d')]===_0x5497('0x1e')&&typeof _0x19e5f3['limit']==='undefined';var _0x3f4d20=_0x3ce50b[_0x5497('0x1f')];var _0x3a47fd=_0x37c18e?0x0:_0x19e5f3['offset'];var _0xbf1ba7=_0x37c18e?_0x3ce50b[_0x5497('0x1f')]:_0x19e5f3[_0x5497('0x1d')]+_0x19e5f3[_0x5497('0x20')];var _0x1b1b43;if(_0xbf1ba7>=_0x3f4d20){_0xbf1ba7=_0x3f4d20;_0x1b1b43=0xc8;}else{_0x1b1b43=0xce;}_0x2bfd8a[_0x5497('0x1a')](_0x1b1b43);return _0x2bfd8a[_0x5497('0x21')](_0x5497('0x22'),_0x3a47fd+'-'+_0xbf1ba7+'/'+_0x3f4d20)[_0x5497('0x1c')](_0x3ce50b);}return null;};}function patchUpdates(_0x3f54ef){return function(_0x186065){try{jsonpatch['apply'](_0x186065,_0x3f54ef,!![]);}catch(_0x720767){return BPromise['reject'](_0x720767);}return _0x186065[_0x5497('0x23')]();};}function saveUpdates(_0xd0868d,_0x44265c){return function(_0x2f587d){if(_0x2f587d){return _0x2f587d[_0x5497('0x24')](_0xd0868d)[_0x5497('0x25')](function(_0x5018fa){return _0x5018fa;});}return null;};}function removeEntity(_0x54043a,_0x1eefce){return function(_0x34b97f){if(_0x34b97f){return _0x34b97f[_0x5497('0x26')]()[_0x5497('0x25')](function(){var _0x5223b5=_0x34b97f[_0x5497('0x27')]({'plain':!![]});var _0x57268c=_0x5497('0x28');return db[_0x5497('0x29')][_0x5497('0x26')]({'where':{'type':_0x57268c,'resourceId':_0x5223b5['id']}})[_0x5497('0x25')](function(){return _0x34b97f;});})[_0x5497('0x25')](function(){_0x54043a[_0x5497('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x4af5f4,_0x5406e2){return function(_0x583d06){if(!_0x583d06){_0x4af5f4['sendStatus'](0x194);}return _0x583d06;};}function handleError(_0x39a2b7,_0x48d146){_0x48d146=_0x48d146||0x1f4;return function(_0x5e9356){logger[_0x5497('0x2a')](_0x5e9356[_0x5497('0x2b')]);if(_0x5e9356[_0x5497('0x2c')]){delete _0x5e9356['name'];}_0x39a2b7['status'](_0x48d146)['send'](_0x5e9356);};}exports[_0x5497('0x2d')]=function(_0x471e0b,_0xf4c117){var _0x5b8f79={},_0x489f71={},_0x594866={'count':0x0,'rows':[]};var _0xa28dd8=_['map'](db[_0x5497('0x2e')][_0x5497('0x2f')],function(_0x77c575){return{'name':_0x77c575['fieldName'],'type':_0x77c575[_0x5497('0x30')][_0x5497('0x31')]};});_0x489f71['model']=_[_0x5497('0x32')](_0xa28dd8,_0x5497('0x2c'));_0x489f71[_0x5497('0x33')]=_['keys'](_0x471e0b[_0x5497('0x33')]);_0x489f71[_0x5497('0x34')]=_[_0x5497('0x35')](_0x489f71[_0x5497('0x36')],_0x489f71[_0x5497('0x33')]);_0x5b8f79['attributes']=_[_0x5497('0x35')](_0x489f71[_0x5497('0x36')],qs['fields'](_0x471e0b[_0x5497('0x33')][_0x5497('0x37')]));_0x5b8f79[_0x5497('0x38')]=_0x5b8f79[_0x5497('0x38')][_0x5497('0x39')]?_0x5b8f79[_0x5497('0x38')]:_0x489f71['model'];if(!_0x471e0b[_0x5497('0x33')]['hasOwnProperty'](_0x5497('0x3a'))){_0x5b8f79[_0x5497('0x20')]=qs[_0x5497('0x20')](_0x471e0b['query']['limit']);_0x5b8f79[_0x5497('0x1d')]=qs[_0x5497('0x1d')](_0x471e0b[_0x5497('0x33')][_0x5497('0x1d')]);}_0x5b8f79[_0x5497('0x3b')]=qs[_0x5497('0x3c')](_0x471e0b['query'][_0x5497('0x3c')]);_0x5b8f79[_0x5497('0x3d')]=qs[_0x5497('0x34')](_[_0x5497('0x3e')](_0x471e0b[_0x5497('0x33')],_0x489f71[_0x5497('0x34')]),_0xa28dd8);if(_0x471e0b[_0x5497('0x33')][_0x5497('0x3f')]){_0x5b8f79[_0x5497('0x3d')]=_['merge'](_0x5b8f79[_0x5497('0x3d')],{'$or':_[_0x5497('0x32')](_0xa28dd8,function(_0x1e9616){if(_0x1e9616[_0x5497('0x30')]!==_0x5497('0x40')){var _0xa5ebe6={};_0xa5ebe6[_0x1e9616[_0x5497('0x2c')]]={'$like':'%'+_0x471e0b['query'][_0x5497('0x3f')]+'%'};return _0xa5ebe6;}})});}_0x5b8f79=_[_0x5497('0x41')]({},_0x5b8f79,_0x471e0b[_0x5497('0x42')]);var _0x35993c={'where':_0x5b8f79[_0x5497('0x3d')]};return db[_0x5497('0x2e')][_0x5497('0x1f')](_0x35993c)['then'](function(_0x2137bd){_0x594866[_0x5497('0x1f')]=_0x2137bd;if(_0x471e0b[_0x5497('0x33')][_0x5497('0x43')]){_0x5b8f79[_0x5497('0x44')]=[{'all':!![]}];}return db[_0x5497('0x2e')][_0x5497('0x45')](_0x5b8f79);})[_0x5497('0x25')](function(_0x2021ae){_0x594866[_0x5497('0x46')]=_0x2021ae;return _0x594866;})['then'](respondWithFilteredResult(_0xf4c117,_0x5b8f79))[_0x5497('0x47')](handleError(_0xf4c117,null));};exports['show']=function(_0x40822a,_0x9fc24){var _0x26ef01={'raw':!![],'where':{'id':_0x40822a[_0x5497('0x48')]['id']}},_0x3602ec={};_0x3602ec['model']=_[_0x5497('0x49')](db[_0x5497('0x2e')]['rawAttributes']);_0x3602ec[_0x5497('0x33')]=_['keys'](_0x40822a[_0x5497('0x33')]);_0x3602ec['filters']=_[_0x5497('0x35')](_0x3602ec[_0x5497('0x36')],_0x3602ec[_0x5497('0x33')]);_0x26ef01[_0x5497('0x38')]=_[_0x5497('0x35')](_0x3602ec['model'],qs['fields'](_0x40822a['query']['fields']));_0x26ef01[_0x5497('0x38')]=_0x26ef01[_0x5497('0x38')][_0x5497('0x39')]?_0x26ef01[_0x5497('0x38')]:_0x3602ec[_0x5497('0x36')];if(_0x40822a[_0x5497('0x33')][_0x5497('0x43')]){_0x26ef01[_0x5497('0x44')]=[{'all':!![]}];}_0x26ef01=_[_0x5497('0x41')]({},_0x26ef01,_0x40822a['options']);return db[_0x5497('0x2e')][_0x5497('0x4a')](_0x26ef01)[_0x5497('0x25')](handleEntityNotFound(_0x9fc24,null))['then'](respondWithResult(_0x9fc24,null))[_0x5497('0x47')](handleError(_0x9fc24,null));};exports['create']=function(_0x12ffbc,_0x31f1ba){return db[_0x5497('0x2e')]['create'](_0x12ffbc[_0x5497('0x4b')],{})[_0x5497('0x25')](function(_0x515c3e){var _0x3abc92=_0x12ffbc['user'][_0x5497('0x27')]({'plain':!![]});if(!_0x3abc92)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x3abc92[_0x5497('0x4c')]===_0x5497('0x4d')){var _0x26fd9f=_0x515c3e[_0x5497('0x27')]({'plain':!![]});var _0x25e80c=_0x5497('0x4e');return db[_0x5497('0x4f')][_0x5497('0x4a')]({'where':{'name':_0x25e80c,'userProfileId':_0x3abc92['userProfileId']},'raw':!![]})[_0x5497('0x25')](function(_0x5b2c22){if(_0x5b2c22&&_0x5b2c22['autoAssociation']===0x0){return db[_0x5497('0x29')][_0x5497('0x50')]({'name':_0x26fd9f['name'],'resourceId':_0x26fd9f['id'],'type':_0x5497('0x28'),'sectionId':_0x5b2c22['id']},{})[_0x5497('0x25')](function(){return _0x515c3e;});}else{return _0x515c3e;}})[_0x5497('0x47')](function(_0x3094c7){logger['error'](_0x5497('0x51'),_0x3094c7);throw _0x3094c7;});}return _0x515c3e;})['then'](respondWithResult(_0x31f1ba,0xc9))['catch'](handleError(_0x31f1ba,null));};exports[_0x5497('0x24')]=function(_0x33dd07,_0x2f7ec8){if(_0x33dd07['body']['id']){delete _0x33dd07['body']['id'];}return db[_0x5497('0x2e')]['find']({'where':{'id':_0x33dd07[_0x5497('0x48')]['id']}})['then'](handleEntityNotFound(_0x2f7ec8,null))[_0x5497('0x25')](saveUpdates(_0x33dd07['body'],null))[_0x5497('0x25')](respondWithResult(_0x2f7ec8,null))[_0x5497('0x47')](handleError(_0x2f7ec8,null));};exports['destroy']=function(_0x418f17,_0x5dccfb){return db['AnalyticDefaultReport'][_0x5497('0x4a')]({'where':{'id':_0x418f17[_0x5497('0x48')]['id']}})['then'](handleEntityNotFound(_0x5dccfb,null))[_0x5497('0x25')](removeEntity(_0x5dccfb,null))[_0x5497('0x47')](handleError(_0x5dccfb,null));};exports[_0x5497('0x52')]=function(_0x28b2a3,_0x3fca40){var _0x25c75e=0xa;var _0x590be7=[_0x5497('0x53'),'left_join','right_join','cross_join'];var _0x1f3965={'SUM':_0x5497('0x54'),'COUNT':_0x5497('0x55'),'COUNT DISTINCT':'COUNT(DISTINCT\x20%s)','MAX':_0x5497('0x56'),'MIN':'MIN(%s)','AVG':'AVG(%s)','GROUP_CONCAT':_0x5497('0x57'),'GROUP_CONCAT ASC':_0x5497('0x58'),'GROUP_CONCAT DESC':_0x5497('0x59')};var _0x25f349={'SEC_TO_TIME':_0x5497('0x5a'),'DATE':_0x5497('0x5b'),'HOUR':'HOUR(%s)','ROUND':_0x5497('0x5c'),'UNIX_TIMESTAMP':_0x5497('0x5d')};var _0x425995=function(_0xc783ce){return!_['includes']([_0x5497('0x5e'),_0x5497('0x5f'),_0x5497('0x60'),_0x5497('0x61')],_0xc783ce);};var _0x5823f6=function(_0x31271c){if(!_0x31271c||!_0x31271c[_0x5497('0x62')][_0x5497('0x39')]){return'';}for(var _0x542bcf='(',_0x1ab48f=0x0;_0x1ab48f<_0x31271c['rules']['length'];_0x1ab48f+=0x1){_0x1ab48f>0x0&&(_0x542bcf+='\x20'+_0x31271c['operator']+'\x20');_0x542bcf+=_0x31271c[_0x5497('0x62')][_0x1ab48f][_0x5497('0x63')]?_0x5823f6(_0x31271c[_0x5497('0x62')][_0x1ab48f]['group']):_0x31271c[_0x5497('0x62')][_0x1ab48f][_0x5497('0x64')]+'\x20'+_0x31271c[_0x5497('0x62')][_0x1ab48f][_0x5497('0x65')]+(_0x425995(_0x31271c['rules'][_0x1ab48f][_0x5497('0x65')])?'\x20'+_0x31271c[_0x5497('0x62')][_0x1ab48f][_0x5497('0x66')]:'');}return _0x542bcf+')';};var _0x49617c={'where':{'id':_0x28b2a3[_0x5497('0x48')]['id']}},_0x164de1,_0x465bed,_0xb3eec2,_0x4368e3,_0x1467c4;_0x49617c=_[_0x5497('0x41')]({},_0x49617c,_0x28b2a3['options']);return db[_0x5497('0x2e')][_0x5497('0x4a')](_0x49617c)[_0x5497('0x25')](function(_0x20efea){if(_0x20efea){_0x164de1=_0x20efea;return _0x20efea['getFields']();}return null;})['then'](function(_0x4a7360){if(_0x4a7360){if(!_0x4a7360[_0x5497('0x39')]){throw new db[(_0x5497('0x67'))][(_0x5497('0x68'))]('Please\x20insert\x20at\x20least\x20one\x20field',0x193);}_0x465bed=_0x4a7360;return db[_0x5497('0x69')][_0x5497('0x45')]({'raw':!![]});}return null;})[_0x5497('0x25')](function(_0x464df3){if(_0x464df3){_0xb3eec2=_[_0x5497('0x6a')](_0x464df3,'id');var _0x4338d4;var _0x3f38bf=squel[_0x5497('0x6b')]();_0x3f38bf[_0x5497('0x6c')](_0x164de1[_0x5497('0x6d')]);for(var _0x1fc6ad=0x0;_0x1fc6ad<_0x465bed['length'];_0x1fc6ad+=0x1){_0x4338d4=_0x465bed[_0x1fc6ad][_0x5497('0x6e')]?_0xb3eec2[_0x465bed[_0x1fc6ad][_0x5497('0x6e')]][_0x5497('0x6f')]:_0x465bed[_0x1fc6ad]['field'];_0x4338d4=_0x465bed[_0x1fc6ad][_0x5497('0x70')]?_['replace'](_0x1f3965[_0x465bed[_0x1fc6ad][_0x5497('0x70')]],'%s',_0x4338d4):_0x4338d4;_0x4338d4=_0x465bed[_0x1fc6ad][_0x5497('0x71')]?_['replace'](_0x25f349[_0x465bed[_0x1fc6ad][_0x5497('0x71')]],'%s',_0x4338d4):_0x4338d4;if(_0x465bed[_0x1fc6ad][_0x5497('0x72')]){_0x3f38bf[_0x5497('0x63')](_0x4338d4);}_0x465bed[_0x1fc6ad][_0x5497('0x73')]&&_0x3f38bf['order'](_0x4338d4,_0x465bed[_0x1fc6ad][_0x5497('0x73')]===_0x5497('0x74')?![]:!![]);_0x3f38bf[_0x5497('0x64')](_0x4338d4,_0x465bed[_0x1fc6ad]['alias']||_0x4338d4);}if(_0x164de1[_0x5497('0x75')]){_0x164de1[_0x5497('0x75')]=JSON['parse'](_0x164de1[_0x5497('0x75')]);for(var _0xebe694=0x0;_0xebe694<_0x164de1[_0x5497('0x75')]['length'];_0xebe694+=0x1){if(_0x164de1['joins'][_0xebe694][_0x5497('0x30')]&&_[_0x5497('0x76')](_0x590be7,_0x164de1[_0x5497('0x75')][_0xebe694][_0x5497('0x30')])&&_0x164de1[_0x5497('0x75')][_0xebe694][_0x5497('0x77')]&&_0x164de1[_0x5497('0x75')][_0xebe694]['foreignTable']&&_0x164de1['joins'][_0xebe694][_0x5497('0x78')]){_0x3f38bf[_0x164de1[_0x5497('0x75')][_0xebe694]['type']](_0x164de1[_0x5497('0x75')][_0xebe694][_0x5497('0x79')],null,util[_0x5497('0x71')]('%s.%s\x20=\x20%s.%s',_0x164de1[_0x5497('0x6d')],_0x164de1[_0x5497('0x75')][_0xebe694]['parentKey'],_0x164de1[_0x5497('0x75')][_0xebe694][_0x5497('0x79')],_0x164de1[_0x5497('0x75')][_0xebe694][_0x5497('0x78')]));}}}if(_0x164de1[_0x5497('0x7a')]){_0x164de1['conditions']=JSON[_0x5497('0x7b')](_0x164de1[_0x5497('0x7a')]);_0x3f38bf[_0x5497('0x3d')](_0x5823f6(_0x164de1[_0x5497('0x7a')][_0x5497('0x63')]));}_0x1467c4=_0x3f38bf['clone']();_0x3f38bf[_0x5497('0x20')](_0x25c75e);_0x3f38bf[_0x5497('0x1d')](0x0);logger[_0x5497('0x7c')](_0x5497('0x7d'),_0x3f38bf['toString']());return dbH[_0x5497('0x7e')][_0x5497('0x33')](_0x3f38bf['toString'](),{'type':dbH[_0x5497('0x7e')][_0x5497('0x7f')][_0x5497('0x80')]});}})[_0x5497('0x25')](respondWithResult(_0x3fca40,null))['catch'](handleError(_0x3fca40,null));};function runReport(_0x547de7,_0x4ff64f,_0x5343d5){var _0x594761=_0x4ff64f[_0x5497('0x2c')];var _0x2375cc=0xa;var _0x15d0da=[_0x5497('0x53'),_0x5497('0x81'),'right_join','cross_join'];var _0x392987={'SUM':_0x5497('0x54'),'COUNT':_0x5497('0x55'),'COUNT DISTINCT':_0x5497('0x82'),'MAX':_0x5497('0x56'),'MIN':_0x5497('0x83'),'AVG':_0x5497('0x84'),'GROUP_CONCAT':_0x5497('0x57'),'GROUP_CONCAT ASC':_0x5497('0x58'),'GROUP_CONCAT DESC':_0x5497('0x59')};var _0x4c41c4={'SEC_TO_TIME':_0x5497('0x5a'),'DATE':_0x5497('0x5b'),'HOUR':_0x5497('0x85'),'ROUND':_0x5497('0x5c'),'UNIX_TIMESTAMP':_0x5497('0x5d')};var _0x22b019=function(_0x4aa4ba){return!_[_0x5497('0x76')](['IS\x20NULL',_0x5497('0x5f'),_0x5497('0x60'),_0x5497('0x61')],_0x4aa4ba);};var _0x5b0f9d=function(_0x59960b){if(!_0x59960b||!_0x59960b[_0x5497('0x62')][_0x5497('0x39')]){return'';}for(var _0x953b31='(',_0xeb52c9=0x0;_0xeb52c9<_0x59960b[_0x5497('0x62')][_0x5497('0x39')];_0xeb52c9+=0x1){_0xeb52c9>0x0&&(_0x953b31+='\x20'+_0x59960b[_0x5497('0x86')]+'\x20');_0x953b31+=_0x59960b[_0x5497('0x62')][_0xeb52c9]['group']?_0x5b0f9d(_0x59960b['rules'][_0xeb52c9]['group']):_0x59960b[_0x5497('0x62')][_0xeb52c9][_0x5497('0x64')]+'\x20'+_0x59960b[_0x5497('0x62')][_0xeb52c9][_0x5497('0x65')]+(_0x22b019(_0x59960b['rules'][_0xeb52c9]['condition'])?'\x20'+_0x59960b[_0x5497('0x62')][_0xeb52c9][_0x5497('0x66')]:'');}return _0x953b31+')';};var _0x5dd9bc={'where':{'id':_0x547de7['id']}},_0x83b240,_0x2fc11a,_0x3ce2ee,_0x36c09f,_0x51e9fb;_0x5dd9bc=_['merge']({},_0x5dd9bc,_0x5343d5);return db['AnalyticDefaultReport']['find'](_0x5dd9bc)['then'](function(_0x497295){if(_0x497295){_0x83b240=_0x497295;return _0x497295['getFields']();}return null;})[_0x5497('0x25')](function(_0x5aa5e1){if(_0x5aa5e1){if(!_0x5aa5e1[_0x5497('0x39')]){throw new db[(_0x5497('0x67'))][(_0x5497('0x68'))](_0x5497('0x87'),0x193);}_0x2fc11a=_0x5aa5e1;return db[_0x5497('0x69')][_0x5497('0x45')]({'raw':!![]});}return null;})['then'](function(_0x77d52c){if(_0x77d52c){_0x3ce2ee=_['keyBy'](_0x77d52c,'id');var _0x15a67d;var _0x2721b2=squel[_0x5497('0x6b')]();_0x2721b2[_0x5497('0x6c')](_0x83b240[_0x5497('0x6d')]);for(var _0x38fa59=0x0;_0x38fa59<_0x2fc11a[_0x5497('0x39')];_0x38fa59+=0x1){_0x15a67d=_0x2fc11a[_0x38fa59][_0x5497('0x6e')]?_0x3ce2ee[_0x2fc11a[_0x38fa59][_0x5497('0x6e')]][_0x5497('0x6f')]:_0x2fc11a[_0x38fa59]['field'];_0x15a67d=_0x2fc11a[_0x38fa59][_0x5497('0x70')]?_['replace'](_0x392987[_0x2fc11a[_0x38fa59][_0x5497('0x70')]],'%s',_0x15a67d):_0x15a67d;_0x15a67d=_0x2fc11a[_0x38fa59][_0x5497('0x71')]?_['replace'](_0x4c41c4[_0x2fc11a[_0x38fa59][_0x5497('0x71')]],'%s',_0x15a67d):_0x15a67d;if(_0x2fc11a[_0x38fa59][_0x5497('0x72')]){_0x2721b2[_0x5497('0x63')](_0x15a67d);}_0x2fc11a[_0x38fa59][_0x5497('0x73')]&&_0x2721b2[_0x5497('0x3b')](_0x15a67d,_0x2fc11a[_0x38fa59][_0x5497('0x73')]===_0x5497('0x74')?![]:!![]);_0x2721b2[_0x5497('0x64')](_0x15a67d,_0x2fc11a[_0x38fa59][_0x5497('0x88')]||_0x15a67d);}if(_0x83b240[_0x5497('0x75')]){_0x83b240[_0x5497('0x75')]=JSON[_0x5497('0x7b')](_0x83b240[_0x5497('0x75')]);for(var _0x22426e=0x0;_0x22426e<_0x83b240['joins'][_0x5497('0x39')];_0x22426e+=0x1){if(_0x83b240[_0x5497('0x75')][_0x22426e][_0x5497('0x30')]&&_[_0x5497('0x76')](_0x15d0da,_0x83b240[_0x5497('0x75')][_0x22426e]['type'])&&_0x83b240[_0x5497('0x75')][_0x22426e][_0x5497('0x77')]&&_0x83b240['joins'][_0x22426e]['foreignTable']&&_0x83b240[_0x5497('0x75')][_0x22426e][_0x5497('0x78')]){_0x2721b2[_0x83b240[_0x5497('0x75')][_0x22426e][_0x5497('0x30')]](_0x83b240[_0x5497('0x75')][_0x22426e]['foreignTable'],null,util['format'](_0x5497('0x89'),_0x83b240['table'],_0x83b240[_0x5497('0x75')][_0x22426e][_0x5497('0x77')],_0x83b240[_0x5497('0x75')][_0x22426e][_0x5497('0x79')],_0x83b240[_0x5497('0x75')][_0x22426e][_0x5497('0x78')]));}}}if(_0x83b240['conditions']){_0x83b240['conditions']=JSON[_0x5497('0x7b')](_0x83b240[_0x5497('0x7a')]);_0x2721b2[_0x5497('0x3d')](_0x5b0f9d(_0x83b240['conditions'][_0x5497('0x63')]));}_0x51e9fb=_0x2721b2['clone']();_0x2721b2[_0x5497('0x20')](_0x2375cc);_0x2721b2['offset'](0x0);return;}})['then'](function(){if(_0x4ff64f[_0x5497('0x8a')]===_0x5497('0x8b')){return null;}var _0x4ce768=_[_0x5497('0x41')](_0x4ff64f,{'name':_0x4ff64f[_0x5497('0x8c')]||_0x4ff64f[_0x5497('0x2c')]||_0x83b240[_0x5497('0x2c')],'basename':_0x594761,'savename':util['format'](_0x5497('0x8d'),_0x4ff64f[_0x5497('0x2c')]||_0x83b240[_0x5497('0x2c')],require(_0x5497('0x8e'))[_0x5497('0x8f')](0x4),_0x4ff64f['output']||_0x5497('0x90')),'reportId':_0x83b240['id'],'reportType':'default'});return db[_0x5497('0x91')][_0x5497('0x50')](_0x4ce768,{'raw':!![]});})[_0x5497('0x25')](function(_0x314db4){if(_0x83b240[_0x5497('0x6d')]===_0x5497('0x92')){_0x51e9fb[_0x5497('0x3d')](_0x83b240[_0x5497('0x6d')]+_0x5497('0x93'),_0x4ff64f[_0x5497('0x94')],_0x4ff64f[_0x5497('0x95')]);}else{_0x51e9fb['where'](_0x83b240[_0x5497('0x6d')]+_0x5497('0x96'),_0x4ff64f[_0x5497('0x94')],_0x4ff64f[_0x5497('0x95')]);}if(_0x314db4){logger[_0x5497('0x97')](_0x5497('0x98'),_0x51e9fb[_0x5497('0x99')]());require(_0x5497('0x9a'))[_0x5497('0x9b')](path[_0x5497('0x53')](__dirname,_0x5497('0x9c'),_0x314db4['output']),[_0x314db4['id'],_0x51e9fb[_0x5497('0x99')](),path[_0x5497('0x53')](__dirname,_0x5497('0x9d'),_0x314db4[_0x5497('0x9e')]),_0x594761]);return _0x314db4;}else{var _0x46be08=squel[_0x5497('0x6b')]();_0x46be08[_0x5497('0x6c')]('('+_0x51e9fb[_0x5497('0x99')]()+')',_0x5497('0x9f'));_0x46be08[_0x5497('0x64')](_0x5497('0xa0'),_0x5497('0x1f'));_0x51e9fb[_0x5497('0x20')](_0x4ff64f[_0x5497('0x20')]||_0x2375cc);_0x51e9fb['offset'](_0x4ff64f['offset']||0x0);return dbH[_0x5497('0x7e')][_0x5497('0x33')](_0x46be08[_0x5497('0x99')](),{'type':dbH['sequelize'][_0x5497('0x7f')][_0x5497('0x80')]})[_0x5497('0x25')](function(_0x2bd48c){if(!_0x2bd48c[_0x5497('0x39')]){_0x36c09f=0x0;}else{_0x36c09f=_0x2bd48c[0x0][_0x5497('0x1f')]||0x0;}return dbH[_0x5497('0x7e')][_0x5497('0x33')](_0x51e9fb['toString'](),{'type':dbH['sequelize']['QueryTypes'][_0x5497('0x80')]});})[_0x5497('0x25')](function(_0x4dab6a){return{'rows':_0x4dab6a||[],'count':_0x36c09f};});}});}exports[_0x5497('0xa1')]=function(_0x27f42b,_0x1bef85){return runReport(_0x27f42b['params'],_0x27f42b[_0x5497('0x33')],_0x27f42b['options'])[_0x5497('0x25')](respondWithResult(_0x1bef85,null))[_0x5497('0x47')](handleError(_0x1bef85,null));};exports[_0x5497('0xa2')]=runReport;exports['query']=function(_0x1c3dad,_0xfba062){var _0x494cc3=0xa;var _0x401f04=[_0x5497('0x53'),_0x5497('0x81'),'right_join',_0x5497('0xa3')];var _0x1a5c32={'SUM':_0x5497('0x54'),'COUNT':_0x5497('0x55'),'COUNT DISTINCT':_0x5497('0x82'),'MAX':_0x5497('0x56'),'MIN':_0x5497('0x83'),'AVG':_0x5497('0x84'),'GROUP_CONCAT':_0x5497('0x57'),'GROUP_CONCAT ASC':_0x5497('0x58'),'GROUP_CONCAT DESC':_0x5497('0x59')};var _0x1dfb76={'SEC_TO_TIME':_0x5497('0x5a'),'DATE':_0x5497('0x5b'),'HOUR':_0x5497('0x85'),'ROUND':'ROUND(%s)','UNIX_TIMESTAMP':_0x5497('0x5d')};var _0x5c2517=function(_0x367929){return!_[_0x5497('0x76')](['IS\x20NULL','IS\x20NOT\x20NULL',_0x5497('0x60'),_0x5497('0x61')],_0x367929);};var _0x2fd2e3=function(_0x2fe770){if(!_0x2fe770||!_0x2fe770['rules'][_0x5497('0x39')]){return'';}for(var _0x1299cd='(',_0x4c2b14=0x0;_0x4c2b14<_0x2fe770['rules'][_0x5497('0x39')];_0x4c2b14+=0x1){_0x4c2b14>0x0&&(_0x1299cd+='\x20'+_0x2fe770[_0x5497('0x86')]+'\x20');_0x1299cd+=_0x2fe770[_0x5497('0x62')][_0x4c2b14][_0x5497('0x63')]?_0x2fd2e3(_0x2fe770[_0x5497('0x62')][_0x4c2b14]['group']):_0x2fe770['rules'][_0x4c2b14][_0x5497('0x64')]+'\x20'+_0x2fe770[_0x5497('0x62')][_0x4c2b14]['condition']+(_0x5c2517(_0x2fe770[_0x5497('0x62')][_0x4c2b14][_0x5497('0x65')])?'\x20'+_0x2fe770[_0x5497('0x62')][_0x4c2b14][_0x5497('0x66')]:'');}return _0x1299cd+')';};var _0x358ec5={'where':{'id':_0x1c3dad['params']['id']}},_0x5cddbc,_0x188d21,_0xf92129,_0x2d5cc1,_0x4f9228;_0x358ec5=_[_0x5497('0x41')]({},_0x358ec5,_0x1c3dad[_0x5497('0x42')]);return db[_0x5497('0x2e')]['find'](_0x358ec5)[_0x5497('0x25')](function(_0x30a248){if(_0x30a248){_0x5cddbc=_0x30a248;return _0x30a248[_0x5497('0xa4')]();}return null;})['then'](function(_0x1d4c76){if(_0x1d4c76){if(!_0x1d4c76[_0x5497('0x39')]){throw new db['Sequelize']['ValidationErrorItem'](_0x5497('0x87'),0x193);}_0x188d21=_0x1d4c76;return db[_0x5497('0x69')]['findAll']({'raw':!![]});}return null;})[_0x5497('0x25')](function(_0x5001d5){if(_0x5001d5){_0xf92129=_[_0x5497('0x6a')](_0x5001d5,'id');var _0x2c58e6;var _0x300f3e=squel[_0x5497('0x6b')]();_0x300f3e[_0x5497('0x6c')](_0x5cddbc[_0x5497('0x6d')]);for(var _0x23732d=0x0;_0x23732d<_0x188d21['length'];_0x23732d+=0x1){_0x2c58e6=_0x188d21[_0x23732d]['MetricId']?_0xf92129[_0x188d21[_0x23732d][_0x5497('0x6e')]][_0x5497('0x6f')]:_0x188d21[_0x23732d]['field'];_0x2c58e6=_0x188d21[_0x23732d]['function']?_[_0x5497('0xa5')](_0x1a5c32[_0x188d21[_0x23732d][_0x5497('0x70')]],'%s',_0x2c58e6):_0x2c58e6;_0x2c58e6=_0x188d21[_0x23732d][_0x5497('0x71')]?_[_0x5497('0xa5')](_0x1dfb76[_0x188d21[_0x23732d][_0x5497('0x71')]],'%s',_0x2c58e6):_0x2c58e6;if(_0x188d21[_0x23732d][_0x5497('0x72')]){_0x300f3e['group'](_0x2c58e6);}_0x188d21[_0x23732d][_0x5497('0x73')]&&_0x300f3e[_0x5497('0x3b')](_0x2c58e6,_0x188d21[_0x23732d][_0x5497('0x73')]===_0x5497('0x74')?![]:!![]);_0x300f3e[_0x5497('0x64')](_0x2c58e6,_0x188d21[_0x23732d][_0x5497('0x88')]||_0x2c58e6);}if(_0x5cddbc['joins']){_0x5cddbc[_0x5497('0x75')]=JSON['parse'](_0x5cddbc[_0x5497('0x75')]);for(var _0x261804=0x0;_0x261804<_0x5cddbc[_0x5497('0x75')]['length'];_0x261804+=0x1){if(_0x5cddbc[_0x5497('0x75')][_0x261804]['type']&&_['includes'](_0x401f04,_0x5cddbc[_0x5497('0x75')][_0x261804][_0x5497('0x30')])&&_0x5cddbc['joins'][_0x261804][_0x5497('0x77')]&&_0x5cddbc[_0x5497('0x75')][_0x261804][_0x5497('0x79')]&&_0x5cddbc[_0x5497('0x75')][_0x261804][_0x5497('0x78')]){_0x300f3e[_0x5cddbc[_0x5497('0x75')][_0x261804][_0x5497('0x30')]](_0x5cddbc[_0x5497('0x75')][_0x261804][_0x5497('0x79')],null,util['format'](_0x5497('0x89'),_0x5cddbc[_0x5497('0x6d')],_0x5cddbc[_0x5497('0x75')][_0x261804][_0x5497('0x77')],_0x5cddbc[_0x5497('0x75')][_0x261804][_0x5497('0x79')],_0x5cddbc[_0x5497('0x75')][_0x261804][_0x5497('0x78')]));}}}if(_0x5cddbc[_0x5497('0x7a')]){_0x5cddbc[_0x5497('0x7a')]=JSON[_0x5497('0x7b')](_0x5cddbc[_0x5497('0x7a')]);_0x300f3e[_0x5497('0x3d')](_0x2fd2e3(_0x5cddbc[_0x5497('0x7a')][_0x5497('0x63')]));}_0x4f9228=_0x300f3e[_0x5497('0xa6')]();_0x300f3e[_0x5497('0x20')](_0x494cc3);_0x300f3e[_0x5497('0x1d')](0x0);logger[_0x5497('0x7c')]('Limited\x20Query:',_0x300f3e[_0x5497('0x99')]());return dbH[_0x5497('0x7e')]['query'](_0x300f3e['toString'](),{'type':dbH[_0x5497('0x7e')]['QueryTypes'][_0x5497('0x80')]});}})[_0x5497('0x25')](function(){return{'sql':_0x4f9228[_0x5497('0x99')]()};})[_0x5497('0x25')](respondWithResult(_0xfba062,null))[_0x5497('0x47')](handleError(_0xfba062,null));}; \ No newline at end of file +var _0xabce=['where','findAll','show','includeAll','options','find','catch','create','body','user','role','Reports','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','preview','join','left_join','right_join','cross_join','SUM(%s)','COUNT(%s)','MIN(%s)','AVG(%s)','GROUP_CONCAT(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)','DATE(%s)','HOUR(%s)','ROUND(%s)','UNIX_TIMESTAMP(%s)','IS\x20NULL','IS\x20NOT\x20NULL','IS\x20EMPTY','IS\x20NOT\x20EMPTY','rules','operator','group','condition','value','getFields','Please\x20insert\x20at\x20least\x20one\x20field','table','MetricId','field','function','replace','format','groupBy','orderBy','joins','parse','includes','parentKey','foreignTable','%s.%s\x20=\x20%s.%s','conditions','debug','Limited\x20Query:','toString','SELECT','COUNT(DISTINCT\x20%s)','MAX(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','SEC_TO_TIME(%s)','ValidationErrorItem','AnalyticMetric','keyBy','select','metric','DESC','foreignKey','output','web','%s-%s.%s','default','cdr','startDate','endDate','.createdAt\x20BETWEEN\x20?\x20AND\x20?','info','Run\x20Query:','child_process','fork','../../components/export/','../../files/reports','savename','from','countTable','COUNT(*)','sequelize','QueryTypes','run','runReport','Sequelize','alias','clone','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','mustache','util','path','ejs','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','dbH','sendStatus','status','offset','limit','undefined','count','set','json','apply','save','update','then','get','DefaultReports','UserProfileResource','destroy','error','stack','name','send','index','map','AnalyticDefaultReport','rawAttributes','type','key','model','query','keys','filters','intersection','attributes','fields','length','nolimit','order','filter','merge'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xabce,0x103));var _0xeabc=function(_0x257642,_0x270a80){_0x257642=_0x257642-0x0;var _0x3d813b=_0xabce[_0x257642];return _0x3d813b;};'use strict';var emlformat=require(_0xeabc('0x0'));var rimraf=require(_0xeabc('0x1'));var zipdir=require(_0xeabc('0x2'));var jsonpatch=require(_0xeabc('0x3'));var rp=require(_0xeabc('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xeabc('0x5'));var util=require(_0xeabc('0x6'));var path=require(_0xeabc('0x7'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0xeabc('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xeabc('0x9'));var squel=require('squel');var crypto=require(_0xeabc('0xa'));var jsforce=require(_0xeabc('0xb'));var deskjs=require(_0xeabc('0xc'));var toCsv=require('to-csv');var querystring=require(_0xeabc('0xd'));var Papa=require(_0xeabc('0xe'));var Redis=require(_0xeabc('0xf'));var authService=require(_0xeabc('0x10'));var qs=require(_0xeabc('0x11'));var as=require(_0xeabc('0x12'));var hardwareService=require(_0xeabc('0x13'));var logger=require(_0xeabc('0x14'))(_0xeabc('0x15'));var utils=require(_0xeabc('0x16'));var config=require(_0xeabc('0x17'));var licenseUtil=require(_0xeabc('0x18'));var db=require(_0xeabc('0x19'))['db'];var dbH=require(_0xeabc('0x19'))[_0xeabc('0x1a')];function respondWithStatusCode(_0xcfbf06,_0x53df9c){_0x53df9c=_0x53df9c||0xcc;return function(_0x235c2d){if(_0x235c2d){return _0xcfbf06[_0xeabc('0x1b')](_0x53df9c);}return _0xcfbf06[_0xeabc('0x1c')](_0x53df9c)['end']();};}function respondWithResult(_0x5f4ee8,_0x3170ea){_0x3170ea=_0x3170ea||0xc8;return function(_0x3ae954){if(_0x3ae954){return _0x5f4ee8[_0xeabc('0x1c')](_0x3170ea)['json'](_0x3ae954);}};}function respondWithFilteredResult(_0xf913d7,_0x638976){return function(_0x49f2d8){if(_0x49f2d8){var _0x53fe28=typeof _0x638976[_0xeabc('0x1d')]==='undefined'&&typeof _0x638976[_0xeabc('0x1e')]===_0xeabc('0x1f');var _0x58a3c0=_0x49f2d8[_0xeabc('0x20')];var _0x31dd53=_0x53fe28?0x0:_0x638976[_0xeabc('0x1d')];var _0x384be5=_0x53fe28?_0x49f2d8[_0xeabc('0x20')]:_0x638976['offset']+_0x638976[_0xeabc('0x1e')];var _0x4d68ea;if(_0x384be5>=_0x58a3c0){_0x384be5=_0x58a3c0;_0x4d68ea=0xc8;}else{_0x4d68ea=0xce;}_0xf913d7[_0xeabc('0x1c')](_0x4d68ea);return _0xf913d7[_0xeabc('0x21')]('Content-Range',_0x31dd53+'-'+_0x384be5+'/'+_0x58a3c0)[_0xeabc('0x22')](_0x49f2d8);}return null;};}function patchUpdates(_0x41d67a){return function(_0x254590){try{jsonpatch[_0xeabc('0x23')](_0x254590,_0x41d67a,!![]);}catch(_0x3c9611){return BPromise['reject'](_0x3c9611);}return _0x254590[_0xeabc('0x24')]();};}function saveUpdates(_0x10c675,_0x91ab00){return function(_0x5bdd57){if(_0x5bdd57){return _0x5bdd57[_0xeabc('0x25')](_0x10c675)[_0xeabc('0x26')](function(_0x214953){return _0x214953;});}return null;};}function removeEntity(_0x319119,_0x5b8838){return function(_0x109e1d){if(_0x109e1d){return _0x109e1d['destroy']()[_0xeabc('0x26')](function(){var _0x4d4e29=_0x109e1d[_0xeabc('0x27')]({'plain':!![]});var _0x12acbd=_0xeabc('0x28');return db[_0xeabc('0x29')][_0xeabc('0x2a')]({'where':{'type':_0x12acbd,'resourceId':_0x4d4e29['id']}})[_0xeabc('0x26')](function(){return _0x109e1d;});})[_0xeabc('0x26')](function(){_0x319119['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x459c8a,_0x5bf8f2){return function(_0x3c1b5b){if(!_0x3c1b5b){_0x459c8a[_0xeabc('0x1b')](0x194);}return _0x3c1b5b;};}function handleError(_0x48fb52,_0x2163e6){_0x2163e6=_0x2163e6||0x1f4;return function(_0x38572d){logger[_0xeabc('0x2b')](_0x38572d[_0xeabc('0x2c')]);if(_0x38572d[_0xeabc('0x2d')]){delete _0x38572d[_0xeabc('0x2d')];}_0x48fb52[_0xeabc('0x1c')](_0x2163e6)[_0xeabc('0x2e')](_0x38572d);};}exports[_0xeabc('0x2f')]=function(_0x5ebb86,_0x5b34dd){var _0x5bb1f1={},_0x2f03e8={},_0x2d027e={'count':0x0,'rows':[]};var _0x98b445=_[_0xeabc('0x30')](db[_0xeabc('0x31')][_0xeabc('0x32')],function(_0x61c0af){return{'name':_0x61c0af['fieldName'],'type':_0x61c0af[_0xeabc('0x33')][_0xeabc('0x34')]};});_0x2f03e8[_0xeabc('0x35')]=_['map'](_0x98b445,_0xeabc('0x2d'));_0x2f03e8[_0xeabc('0x36')]=_[_0xeabc('0x37')](_0x5ebb86['query']);_0x2f03e8[_0xeabc('0x38')]=_[_0xeabc('0x39')](_0x2f03e8[_0xeabc('0x35')],_0x2f03e8['query']);_0x5bb1f1[_0xeabc('0x3a')]=_[_0xeabc('0x39')](_0x2f03e8['model'],qs['fields'](_0x5ebb86[_0xeabc('0x36')][_0xeabc('0x3b')]));_0x5bb1f1['attributes']=_0x5bb1f1[_0xeabc('0x3a')][_0xeabc('0x3c')]?_0x5bb1f1[_0xeabc('0x3a')]:_0x2f03e8[_0xeabc('0x35')];if(!_0x5ebb86[_0xeabc('0x36')]['hasOwnProperty'](_0xeabc('0x3d'))){_0x5bb1f1['limit']=qs[_0xeabc('0x1e')](_0x5ebb86[_0xeabc('0x36')][_0xeabc('0x1e')]);_0x5bb1f1['offset']=qs['offset'](_0x5ebb86[_0xeabc('0x36')]['offset']);}_0x5bb1f1[_0xeabc('0x3e')]=qs['sort'](_0x5ebb86['query']['sort']);_0x5bb1f1['where']=qs[_0xeabc('0x38')](_['pick'](_0x5ebb86[_0xeabc('0x36')],_0x2f03e8[_0xeabc('0x38')]),_0x98b445);if(_0x5ebb86['query'][_0xeabc('0x3f')]){_0x5bb1f1['where']=_[_0xeabc('0x40')](_0x5bb1f1['where'],{'$or':_[_0xeabc('0x30')](_0x98b445,function(_0xf1b7ef){if(_0xf1b7ef[_0xeabc('0x33')]!=='VIRTUAL'){var _0x5a00d0={};_0x5a00d0[_0xf1b7ef['name']]={'$like':'%'+_0x5ebb86[_0xeabc('0x36')][_0xeabc('0x3f')]+'%'};return _0x5a00d0;}})});}_0x5bb1f1=_[_0xeabc('0x40')]({},_0x5bb1f1,_0x5ebb86['options']);var _0x4f1897={'where':_0x5bb1f1[_0xeabc('0x41')]};return db[_0xeabc('0x31')]['count'](_0x4f1897)[_0xeabc('0x26')](function(_0x5e0b78){_0x2d027e[_0xeabc('0x20')]=_0x5e0b78;if(_0x5ebb86['query']['includeAll']){_0x5bb1f1['include']=[{'all':!![]}];}return db[_0xeabc('0x31')][_0xeabc('0x42')](_0x5bb1f1);})[_0xeabc('0x26')](function(_0x3eeeb5){_0x2d027e['rows']=_0x3eeeb5;return _0x2d027e;})[_0xeabc('0x26')](respondWithFilteredResult(_0x5b34dd,_0x5bb1f1))['catch'](handleError(_0x5b34dd,null));};exports[_0xeabc('0x43')]=function(_0x1a4bbe,_0x3a7807){var _0x17a0df={'raw':!![],'where':{'id':_0x1a4bbe['params']['id']}},_0xc849c9={};_0xc849c9['model']=_[_0xeabc('0x37')](db['AnalyticDefaultReport'][_0xeabc('0x32')]);_0xc849c9[_0xeabc('0x36')]=_['keys'](_0x1a4bbe[_0xeabc('0x36')]);_0xc849c9[_0xeabc('0x38')]=_[_0xeabc('0x39')](_0xc849c9[_0xeabc('0x35')],_0xc849c9[_0xeabc('0x36')]);_0x17a0df[_0xeabc('0x3a')]=_[_0xeabc('0x39')](_0xc849c9['model'],qs[_0xeabc('0x3b')](_0x1a4bbe[_0xeabc('0x36')][_0xeabc('0x3b')]));_0x17a0df[_0xeabc('0x3a')]=_0x17a0df[_0xeabc('0x3a')][_0xeabc('0x3c')]?_0x17a0df[_0xeabc('0x3a')]:_0xc849c9[_0xeabc('0x35')];if(_0x1a4bbe[_0xeabc('0x36')][_0xeabc('0x44')]){_0x17a0df['include']=[{'all':!![]}];}_0x17a0df=_[_0xeabc('0x40')]({},_0x17a0df,_0x1a4bbe[_0xeabc('0x45')]);return db[_0xeabc('0x31')][_0xeabc('0x46')](_0x17a0df)[_0xeabc('0x26')](handleEntityNotFound(_0x3a7807,null))[_0xeabc('0x26')](respondWithResult(_0x3a7807,null))[_0xeabc('0x47')](handleError(_0x3a7807,null));};exports['create']=function(_0x766743,_0x32e09b){return db[_0xeabc('0x31')][_0xeabc('0x48')](_0x766743[_0xeabc('0x49')],{})['then'](function(_0x305946){var _0x2b2b9c=_0x766743[_0xeabc('0x4a')][_0xeabc('0x27')]({'plain':!![]});if(!_0x2b2b9c)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x2b2b9c[_0xeabc('0x4b')]===_0xeabc('0x4a')){var _0x568847=_0x305946[_0xeabc('0x27')]({'plain':!![]});var _0x5a0d4d=_0xeabc('0x4c');return db['UserProfileSection'][_0xeabc('0x46')]({'where':{'name':_0x5a0d4d,'userProfileId':_0x2b2b9c[_0xeabc('0x4d')]},'raw':!![]})[_0xeabc('0x26')](function(_0x1524c3){if(_0x1524c3&&_0x1524c3[_0xeabc('0x4e')]===0x0){return db[_0xeabc('0x29')][_0xeabc('0x48')]({'name':_0x568847[_0xeabc('0x2d')],'resourceId':_0x568847['id'],'type':_0xeabc('0x28'),'sectionId':_0x1524c3['id']},{})[_0xeabc('0x26')](function(){return _0x305946;});}else{return _0x305946;}})['catch'](function(_0x180a14){logger[_0xeabc('0x2b')](_0xeabc('0x4f'),_0x180a14);throw _0x180a14;});}return _0x305946;})[_0xeabc('0x26')](respondWithResult(_0x32e09b,0xc9))['catch'](handleError(_0x32e09b,null));};exports[_0xeabc('0x25')]=function(_0x392913,_0x10d56f){if(_0x392913[_0xeabc('0x49')]['id']){delete _0x392913['body']['id'];}return db[_0xeabc('0x31')][_0xeabc('0x46')]({'where':{'id':_0x392913[_0xeabc('0x50')]['id']}})[_0xeabc('0x26')](handleEntityNotFound(_0x10d56f,null))[_0xeabc('0x26')](saveUpdates(_0x392913[_0xeabc('0x49')],null))[_0xeabc('0x26')](respondWithResult(_0x10d56f,null))[_0xeabc('0x47')](handleError(_0x10d56f,null));};exports[_0xeabc('0x2a')]=function(_0x58ab08,_0x4546c4){return db['AnalyticDefaultReport']['find']({'where':{'id':_0x58ab08['params']['id']}})[_0xeabc('0x26')](handleEntityNotFound(_0x4546c4,null))[_0xeabc('0x26')](removeEntity(_0x4546c4,null))[_0xeabc('0x47')](handleError(_0x4546c4,null));};exports[_0xeabc('0x51')]=function(_0xe89728,_0x2f78f3){var _0x4a2ad6=0xa;var _0x4358d7=[_0xeabc('0x52'),_0xeabc('0x53'),_0xeabc('0x54'),_0xeabc('0x55')];var _0x2c7b4e={'SUM':_0xeabc('0x56'),'COUNT':_0xeabc('0x57'),'COUNT DISTINCT':'COUNT(DISTINCT\x20%s)','MAX':'MAX(%s)','MIN':_0xeabc('0x58'),'AVG':_0xeabc('0x59'),'GROUP_CONCAT':_0xeabc('0x5a'),'GROUP_CONCAT ASC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT DESC':_0xeabc('0x5b')};var _0x536f42={'SEC_TO_TIME':'SEC_TO_TIME(%s)','DATE':_0xeabc('0x5c'),'HOUR':_0xeabc('0x5d'),'ROUND':_0xeabc('0x5e'),'UNIX_TIMESTAMP':_0xeabc('0x5f')};var _0x26c784=function(_0xc2ef0c){return!_['includes']([_0xeabc('0x60'),_0xeabc('0x61'),_0xeabc('0x62'),_0xeabc('0x63')],_0xc2ef0c);};var _0x11cc1f=function(_0x514787){if(!_0x514787||!_0x514787['rules'][_0xeabc('0x3c')]){return'';}for(var _0x7b659f='(',_0x1b6675=0x0;_0x1b6675<_0x514787[_0xeabc('0x64')][_0xeabc('0x3c')];_0x1b6675+=0x1){_0x1b6675>0x0&&(_0x7b659f+='\x20'+_0x514787[_0xeabc('0x65')]+'\x20');_0x7b659f+=_0x514787[_0xeabc('0x64')][_0x1b6675][_0xeabc('0x66')]?_0x11cc1f(_0x514787[_0xeabc('0x64')][_0x1b6675]['group']):_0x514787[_0xeabc('0x64')][_0x1b6675]['field']+'\x20'+_0x514787[_0xeabc('0x64')][_0x1b6675][_0xeabc('0x67')]+(_0x26c784(_0x514787[_0xeabc('0x64')][_0x1b6675][_0xeabc('0x67')])?'\x20'+_0x514787[_0xeabc('0x64')][_0x1b6675][_0xeabc('0x68')]:'');}return _0x7b659f+')';};var _0xf48062={'where':{'id':_0xe89728[_0xeabc('0x50')]['id']}},_0xb59a2a,_0x5d4bc2,_0x24d0e5,_0x5702cb,_0x3fa31b;_0xf48062=_[_0xeabc('0x40')]({},_0xf48062,_0xe89728[_0xeabc('0x45')]);return db['AnalyticDefaultReport'][_0xeabc('0x46')](_0xf48062)['then'](function(_0x54e7d6){if(_0x54e7d6){_0xb59a2a=_0x54e7d6;return _0x54e7d6[_0xeabc('0x69')]();}return null;})[_0xeabc('0x26')](function(_0x23270a){if(_0x23270a){if(!_0x23270a[_0xeabc('0x3c')]){throw new db['Sequelize']['ValidationErrorItem'](_0xeabc('0x6a'),0x193);}_0x5d4bc2=_0x23270a;return db['AnalyticMetric']['findAll']({'raw':!![]});}return null;})[_0xeabc('0x26')](function(_0x4f1a4f){if(_0x4f1a4f){_0x24d0e5=_['keyBy'](_0x4f1a4f,'id');var _0xa44f2d;var _0x1c84b5=squel['select']();_0x1c84b5['from'](_0xb59a2a[_0xeabc('0x6b')]);for(var _0x5d183a=0x0;_0x5d183a<_0x5d4bc2[_0xeabc('0x3c')];_0x5d183a+=0x1){_0xa44f2d=_0x5d4bc2[_0x5d183a][_0xeabc('0x6c')]?_0x24d0e5[_0x5d4bc2[_0x5d183a]['MetricId']]['metric']:_0x5d4bc2[_0x5d183a][_0xeabc('0x6d')];_0xa44f2d=_0x5d4bc2[_0x5d183a][_0xeabc('0x6e')]?_[_0xeabc('0x6f')](_0x2c7b4e[_0x5d4bc2[_0x5d183a][_0xeabc('0x6e')]],'%s',_0xa44f2d):_0xa44f2d;_0xa44f2d=_0x5d4bc2[_0x5d183a][_0xeabc('0x70')]?_['replace'](_0x536f42[_0x5d4bc2[_0x5d183a]['format']],'%s',_0xa44f2d):_0xa44f2d;if(_0x5d4bc2[_0x5d183a][_0xeabc('0x71')]){_0x1c84b5['group'](_0xa44f2d);}_0x5d4bc2[_0x5d183a][_0xeabc('0x72')]&&_0x1c84b5['order'](_0xa44f2d,_0x5d4bc2[_0x5d183a][_0xeabc('0x72')]==='DESC'?![]:!![]);_0x1c84b5[_0xeabc('0x6d')](_0xa44f2d,_0x5d4bc2[_0x5d183a]['alias']||_0xa44f2d);}if(_0xb59a2a[_0xeabc('0x73')]){_0xb59a2a[_0xeabc('0x73')]=JSON[_0xeabc('0x74')](_0xb59a2a[_0xeabc('0x73')]);for(var _0x5e121c=0x0;_0x5e121c<_0xb59a2a[_0xeabc('0x73')]['length'];_0x5e121c+=0x1){if(_0xb59a2a[_0xeabc('0x73')][_0x5e121c][_0xeabc('0x33')]&&_[_0xeabc('0x75')](_0x4358d7,_0xb59a2a[_0xeabc('0x73')][_0x5e121c][_0xeabc('0x33')])&&_0xb59a2a['joins'][_0x5e121c][_0xeabc('0x76')]&&_0xb59a2a[_0xeabc('0x73')][_0x5e121c][_0xeabc('0x77')]&&_0xb59a2a[_0xeabc('0x73')][_0x5e121c]['foreignKey']){_0x1c84b5[_0xb59a2a[_0xeabc('0x73')][_0x5e121c][_0xeabc('0x33')]](_0xb59a2a[_0xeabc('0x73')][_0x5e121c][_0xeabc('0x77')],null,util['format'](_0xeabc('0x78'),_0xb59a2a[_0xeabc('0x6b')],_0xb59a2a[_0xeabc('0x73')][_0x5e121c][_0xeabc('0x76')],_0xb59a2a['joins'][_0x5e121c]['foreignTable'],_0xb59a2a[_0xeabc('0x73')][_0x5e121c]['foreignKey']));}}}if(_0xb59a2a['conditions']){_0xb59a2a[_0xeabc('0x79')]=JSON[_0xeabc('0x74')](_0xb59a2a[_0xeabc('0x79')]);_0x1c84b5['where'](_0x11cc1f(_0xb59a2a[_0xeabc('0x79')][_0xeabc('0x66')]));}_0x3fa31b=_0x1c84b5['clone']();_0x1c84b5[_0xeabc('0x1e')](_0x4a2ad6);_0x1c84b5[_0xeabc('0x1d')](0x0);logger[_0xeabc('0x7a')](_0xeabc('0x7b'),_0x1c84b5[_0xeabc('0x7c')]());return dbH['sequelize'][_0xeabc('0x36')](_0x1c84b5['toString'](),{'type':dbH['sequelize']['QueryTypes'][_0xeabc('0x7d')]});}})[_0xeabc('0x26')](respondWithResult(_0x2f78f3,null))[_0xeabc('0x47')](handleError(_0x2f78f3,null));};function runReport(_0x4424ce,_0x33fa74,_0x51368f){var _0x39f961=_0x33fa74['name'];var _0x1795fe=0xa;var _0x2f95c7=['join',_0xeabc('0x53'),'right_join','cross_join'];var _0x952dc7={'SUM':_0xeabc('0x56'),'COUNT':_0xeabc('0x57'),'COUNT DISTINCT':_0xeabc('0x7e'),'MAX':_0xeabc('0x7f'),'MIN':'MIN(%s)','AVG':_0xeabc('0x59'),'GROUP_CONCAT':_0xeabc('0x5a'),'GROUP_CONCAT ASC':_0xeabc('0x80'),'GROUP_CONCAT DESC':_0xeabc('0x5b')};var _0x348064={'SEC_TO_TIME':_0xeabc('0x81'),'DATE':_0xeabc('0x5c'),'HOUR':_0xeabc('0x5d'),'ROUND':_0xeabc('0x5e'),'UNIX_TIMESTAMP':_0xeabc('0x5f')};var _0x522c6e=function(_0x436f8e){return!_[_0xeabc('0x75')]([_0xeabc('0x60'),'IS\x20NOT\x20NULL','IS\x20EMPTY',_0xeabc('0x63')],_0x436f8e);};var _0x273ca5=function(_0xe90200){if(!_0xe90200||!_0xe90200[_0xeabc('0x64')][_0xeabc('0x3c')]){return'';}for(var _0x5f5a47='(',_0x289f98=0x0;_0x289f98<_0xe90200['rules']['length'];_0x289f98+=0x1){_0x289f98>0x0&&(_0x5f5a47+='\x20'+_0xe90200[_0xeabc('0x65')]+'\x20');_0x5f5a47+=_0xe90200[_0xeabc('0x64')][_0x289f98]['group']?_0x273ca5(_0xe90200[_0xeabc('0x64')][_0x289f98][_0xeabc('0x66')]):_0xe90200[_0xeabc('0x64')][_0x289f98][_0xeabc('0x6d')]+'\x20'+_0xe90200[_0xeabc('0x64')][_0x289f98][_0xeabc('0x67')]+(_0x522c6e(_0xe90200[_0xeabc('0x64')][_0x289f98][_0xeabc('0x67')])?'\x20'+_0xe90200[_0xeabc('0x64')][_0x289f98][_0xeabc('0x68')]:'');}return _0x5f5a47+')';};var _0x1f8197={'where':{'id':_0x4424ce['id']}},_0x485c13,_0xb54c35,_0x5c9d6f,_0x1caaa7,_0x3e764a;_0x1f8197=_[_0xeabc('0x40')]({},_0x1f8197,_0x51368f);return db[_0xeabc('0x31')][_0xeabc('0x46')](_0x1f8197)[_0xeabc('0x26')](function(_0x40f51e){if(_0x40f51e){_0x485c13=_0x40f51e;return _0x40f51e[_0xeabc('0x69')]();}return null;})[_0xeabc('0x26')](function(_0x156e20){if(_0x156e20){if(!_0x156e20[_0xeabc('0x3c')]){throw new db['Sequelize'][(_0xeabc('0x82'))](_0xeabc('0x6a'),0x193);}_0xb54c35=_0x156e20;return db[_0xeabc('0x83')][_0xeabc('0x42')]({'raw':!![]});}return null;})['then'](function(_0x26c595){if(_0x26c595){_0x5c9d6f=_[_0xeabc('0x84')](_0x26c595,'id');var _0x580661;var _0x3de927=squel[_0xeabc('0x85')]();_0x3de927['from'](_0x485c13['table']);for(var _0x489b1d=0x0;_0x489b1d<_0xb54c35['length'];_0x489b1d+=0x1){_0x580661=_0xb54c35[_0x489b1d][_0xeabc('0x6c')]?_0x5c9d6f[_0xb54c35[_0x489b1d][_0xeabc('0x6c')]][_0xeabc('0x86')]:_0xb54c35[_0x489b1d][_0xeabc('0x6d')];_0x580661=_0xb54c35[_0x489b1d][_0xeabc('0x6e')]?_[_0xeabc('0x6f')](_0x952dc7[_0xb54c35[_0x489b1d][_0xeabc('0x6e')]],'%s',_0x580661):_0x580661;_0x580661=_0xb54c35[_0x489b1d][_0xeabc('0x70')]?_[_0xeabc('0x6f')](_0x348064[_0xb54c35[_0x489b1d][_0xeabc('0x70')]],'%s',_0x580661):_0x580661;if(_0xb54c35[_0x489b1d]['groupBy']){_0x3de927[_0xeabc('0x66')](_0x580661);}_0xb54c35[_0x489b1d][_0xeabc('0x72')]&&_0x3de927['order'](_0x580661,_0xb54c35[_0x489b1d][_0xeabc('0x72')]===_0xeabc('0x87')?![]:!![]);_0x3de927[_0xeabc('0x6d')](_0x580661,_0xb54c35[_0x489b1d]['alias']||_0x580661);}if(_0x485c13[_0xeabc('0x73')]){_0x485c13['joins']=JSON[_0xeabc('0x74')](_0x485c13[_0xeabc('0x73')]);for(var _0x1841f0=0x0;_0x1841f0<_0x485c13[_0xeabc('0x73')][_0xeabc('0x3c')];_0x1841f0+=0x1){if(_0x485c13['joins'][_0x1841f0]['type']&&_['includes'](_0x2f95c7,_0x485c13['joins'][_0x1841f0][_0xeabc('0x33')])&&_0x485c13[_0xeabc('0x73')][_0x1841f0][_0xeabc('0x76')]&&_0x485c13['joins'][_0x1841f0][_0xeabc('0x77')]&&_0x485c13[_0xeabc('0x73')][_0x1841f0][_0xeabc('0x88')]){_0x3de927[_0x485c13[_0xeabc('0x73')][_0x1841f0][_0xeabc('0x33')]](_0x485c13[_0xeabc('0x73')][_0x1841f0][_0xeabc('0x77')],null,util[_0xeabc('0x70')](_0xeabc('0x78'),_0x485c13[_0xeabc('0x6b')],_0x485c13[_0xeabc('0x73')][_0x1841f0][_0xeabc('0x76')],_0x485c13['joins'][_0x1841f0]['foreignTable'],_0x485c13[_0xeabc('0x73')][_0x1841f0]['foreignKey']));}}}if(_0x485c13[_0xeabc('0x79')]){_0x485c13[_0xeabc('0x79')]=JSON[_0xeabc('0x74')](_0x485c13['conditions']);_0x3de927[_0xeabc('0x41')](_0x273ca5(_0x485c13[_0xeabc('0x79')][_0xeabc('0x66')]));}_0x3e764a=_0x3de927['clone']();_0x3de927['limit'](_0x1795fe);_0x3de927[_0xeabc('0x1d')](0x0);return;}})[_0xeabc('0x26')](function(){if(_0x33fa74[_0xeabc('0x89')]===_0xeabc('0x8a')){return null;}var _0x2cc9b3=_[_0xeabc('0x40')](_0x33fa74,{'name':_0x33fa74['fullPath']||_0x33fa74['name']||_0x485c13[_0xeabc('0x2d')],'basename':_0x39f961,'savename':util[_0xeabc('0x70')](_0xeabc('0x8b'),_0x33fa74[_0xeabc('0x2d')]||_0x485c13['name'],require('randomstring')['generate'](0x4),_0x33fa74[_0xeabc('0x89')]||'csv'),'reportId':_0x485c13['id'],'reportType':_0xeabc('0x8c')});return db['AnalyticExtractedReport'][_0xeabc('0x48')](_0x2cc9b3,{'raw':!![]});})['then'](function(_0x6e6ab2){if(_0x485c13[_0xeabc('0x6b')]===_0xeabc('0x8d')){_0x3e764a[_0xeabc('0x41')](_0x485c13[_0xeabc('0x6b')]+'.calldate\x20BETWEEN\x20?\x20AND\x20?',_0x33fa74[_0xeabc('0x8e')],_0x33fa74[_0xeabc('0x8f')]);}else{_0x3e764a[_0xeabc('0x41')](_0x485c13['table']+_0xeabc('0x90'),_0x33fa74[_0xeabc('0x8e')],_0x33fa74[_0xeabc('0x8f')]);}if(_0x6e6ab2){logger[_0xeabc('0x91')](_0xeabc('0x92'),_0x3e764a['toString']());require(_0xeabc('0x93'))[_0xeabc('0x94')](path['join'](__dirname,_0xeabc('0x95'),_0x6e6ab2[_0xeabc('0x89')]),[_0x6e6ab2['id'],_0x3e764a['toString'](),path[_0xeabc('0x52')](__dirname,_0xeabc('0x96'),_0x6e6ab2[_0xeabc('0x97')]),_0x39f961]);return _0x6e6ab2;}else{var _0x307d26=squel[_0xeabc('0x85')]();_0x307d26[_0xeabc('0x98')]('('+_0x3e764a[_0xeabc('0x7c')]()+')',_0xeabc('0x99'));_0x307d26[_0xeabc('0x6d')](_0xeabc('0x9a'),_0xeabc('0x20'));_0x3e764a[_0xeabc('0x1e')](_0x33fa74[_0xeabc('0x1e')]||_0x1795fe);_0x3e764a['offset'](_0x33fa74['offset']||0x0);return dbH[_0xeabc('0x9b')][_0xeabc('0x36')](_0x307d26[_0xeabc('0x7c')](),{'type':dbH[_0xeabc('0x9b')]['QueryTypes'][_0xeabc('0x7d')]})['then'](function(_0x49fba2){if(!_0x49fba2['length']){_0x1caaa7=0x0;}else{_0x1caaa7=_0x49fba2[0x0]['count']||0x0;}return dbH['sequelize']['query'](_0x3e764a[_0xeabc('0x7c')](),{'type':dbH[_0xeabc('0x9b')][_0xeabc('0x9c')][_0xeabc('0x7d')]});})[_0xeabc('0x26')](function(_0xe27492){return{'rows':_0xe27492||[],'count':_0x1caaa7};});}});}exports[_0xeabc('0x9d')]=function(_0x3eaedf,_0x44dc85){return runReport(_0x3eaedf['params'],_0x3eaedf[_0xeabc('0x36')],_0x3eaedf[_0xeabc('0x45')])[_0xeabc('0x26')](respondWithResult(_0x44dc85,null))[_0xeabc('0x47')](handleError(_0x44dc85,null));};exports[_0xeabc('0x9e')]=runReport;exports[_0xeabc('0x36')]=function(_0x2a29d7,_0x5bb5d6){var _0x3513ce=0xa;var _0x58cb5d=[_0xeabc('0x52'),_0xeabc('0x53'),'right_join',_0xeabc('0x55')];var _0x4c8bf3={'SUM':_0xeabc('0x56'),'COUNT':_0xeabc('0x57'),'COUNT DISTINCT':_0xeabc('0x7e'),'MAX':_0xeabc('0x7f'),'MIN':_0xeabc('0x58'),'AVG':_0xeabc('0x59'),'GROUP_CONCAT':_0xeabc('0x5a'),'GROUP_CONCAT ASC':_0xeabc('0x80'),'GROUP_CONCAT DESC':_0xeabc('0x5b')};var _0x484c75={'SEC_TO_TIME':'SEC_TO_TIME(%s)','DATE':_0xeabc('0x5c'),'HOUR':_0xeabc('0x5d'),'ROUND':'ROUND(%s)','UNIX_TIMESTAMP':_0xeabc('0x5f')};var _0x580f72=function(_0x37907a){return!_[_0xeabc('0x75')]([_0xeabc('0x60'),_0xeabc('0x61'),_0xeabc('0x62'),_0xeabc('0x63')],_0x37907a);};var _0x57db6d=function(_0x13cc55){if(!_0x13cc55||!_0x13cc55['rules'][_0xeabc('0x3c')]){return'';}for(var _0x43b88e='(',_0x1fa464=0x0;_0x1fa464<_0x13cc55[_0xeabc('0x64')]['length'];_0x1fa464+=0x1){_0x1fa464>0x0&&(_0x43b88e+='\x20'+_0x13cc55[_0xeabc('0x65')]+'\x20');_0x43b88e+=_0x13cc55[_0xeabc('0x64')][_0x1fa464][_0xeabc('0x66')]?_0x57db6d(_0x13cc55['rules'][_0x1fa464][_0xeabc('0x66')]):_0x13cc55[_0xeabc('0x64')][_0x1fa464][_0xeabc('0x6d')]+'\x20'+_0x13cc55['rules'][_0x1fa464]['condition']+(_0x580f72(_0x13cc55['rules'][_0x1fa464]['condition'])?'\x20'+_0x13cc55[_0xeabc('0x64')][_0x1fa464][_0xeabc('0x68')]:'');}return _0x43b88e+')';};var _0x52e84f={'where':{'id':_0x2a29d7[_0xeabc('0x50')]['id']}},_0x12f024,_0x1d35da,_0x2695a4,_0x199251,_0x1899d6;_0x52e84f=_[_0xeabc('0x40')]({},_0x52e84f,_0x2a29d7[_0xeabc('0x45')]);return db[_0xeabc('0x31')]['find'](_0x52e84f)[_0xeabc('0x26')](function(_0x5bb015){if(_0x5bb015){_0x12f024=_0x5bb015;return _0x5bb015[_0xeabc('0x69')]();}return null;})[_0xeabc('0x26')](function(_0x438ce3){if(_0x438ce3){if(!_0x438ce3[_0xeabc('0x3c')]){throw new db[(_0xeabc('0x9f'))][(_0xeabc('0x82'))](_0xeabc('0x6a'),0x193);}_0x1d35da=_0x438ce3;return db['AnalyticMetric'][_0xeabc('0x42')]({'raw':!![]});}return null;})['then'](function(_0x475160){if(_0x475160){_0x2695a4=_['keyBy'](_0x475160,'id');var _0x10d66b;var _0x12a042=squel[_0xeabc('0x85')]();_0x12a042[_0xeabc('0x98')](_0x12f024[_0xeabc('0x6b')]);for(var _0x49bf0f=0x0;_0x49bf0f<_0x1d35da[_0xeabc('0x3c')];_0x49bf0f+=0x1){_0x10d66b=_0x1d35da[_0x49bf0f][_0xeabc('0x6c')]?_0x2695a4[_0x1d35da[_0x49bf0f][_0xeabc('0x6c')]][_0xeabc('0x86')]:_0x1d35da[_0x49bf0f][_0xeabc('0x6d')];_0x10d66b=_0x1d35da[_0x49bf0f]['function']?_[_0xeabc('0x6f')](_0x4c8bf3[_0x1d35da[_0x49bf0f][_0xeabc('0x6e')]],'%s',_0x10d66b):_0x10d66b;_0x10d66b=_0x1d35da[_0x49bf0f][_0xeabc('0x70')]?_[_0xeabc('0x6f')](_0x484c75[_0x1d35da[_0x49bf0f][_0xeabc('0x70')]],'%s',_0x10d66b):_0x10d66b;if(_0x1d35da[_0x49bf0f]['groupBy']){_0x12a042[_0xeabc('0x66')](_0x10d66b);}_0x1d35da[_0x49bf0f]['orderBy']&&_0x12a042[_0xeabc('0x3e')](_0x10d66b,_0x1d35da[_0x49bf0f][_0xeabc('0x72')]===_0xeabc('0x87')?![]:!![]);_0x12a042[_0xeabc('0x6d')](_0x10d66b,_0x1d35da[_0x49bf0f][_0xeabc('0xa0')]||_0x10d66b);}if(_0x12f024[_0xeabc('0x73')]){_0x12f024[_0xeabc('0x73')]=JSON[_0xeabc('0x74')](_0x12f024[_0xeabc('0x73')]);for(var _0x223a3=0x0;_0x223a3<_0x12f024['joins'][_0xeabc('0x3c')];_0x223a3+=0x1){if(_0x12f024[_0xeabc('0x73')][_0x223a3][_0xeabc('0x33')]&&_[_0xeabc('0x75')](_0x58cb5d,_0x12f024['joins'][_0x223a3][_0xeabc('0x33')])&&_0x12f024['joins'][_0x223a3]['parentKey']&&_0x12f024[_0xeabc('0x73')][_0x223a3][_0xeabc('0x77')]&&_0x12f024[_0xeabc('0x73')][_0x223a3]['foreignKey']){_0x12a042[_0x12f024[_0xeabc('0x73')][_0x223a3][_0xeabc('0x33')]](_0x12f024[_0xeabc('0x73')][_0x223a3][_0xeabc('0x77')],null,util[_0xeabc('0x70')]('%s.%s\x20=\x20%s.%s',_0x12f024[_0xeabc('0x6b')],_0x12f024[_0xeabc('0x73')][_0x223a3]['parentKey'],_0x12f024['joins'][_0x223a3][_0xeabc('0x77')],_0x12f024[_0xeabc('0x73')][_0x223a3][_0xeabc('0x88')]));}}}if(_0x12f024[_0xeabc('0x79')]){_0x12f024[_0xeabc('0x79')]=JSON[_0xeabc('0x74')](_0x12f024[_0xeabc('0x79')]);_0x12a042[_0xeabc('0x41')](_0x57db6d(_0x12f024[_0xeabc('0x79')]['group']));}_0x1899d6=_0x12a042[_0xeabc('0xa1')]();_0x12a042['limit'](_0x3513ce);_0x12a042[_0xeabc('0x1d')](0x0);logger['debug'](_0xeabc('0x7b'),_0x12a042[_0xeabc('0x7c')]());return dbH[_0xeabc('0x9b')][_0xeabc('0x36')](_0x12a042[_0xeabc('0x7c')](),{'type':dbH[_0xeabc('0x9b')][_0xeabc('0x9c')][_0xeabc('0x7d')]});}})[_0xeabc('0x26')](function(){return{'sql':_0x1899d6[_0xeabc('0x7c')]()};})['then'](respondWithResult(_0x5bb5d6,null))['catch'](handleError(_0x5bb5d6,null));}; \ No newline at end of file diff --git a/server/api/analyticDefaultReport/analyticDefaultReport.model.js b/server/api/analyticDefaultReport/analyticDefaultReport.model.js index bc20bae..04407e3 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 _0xdfe3=['analytics_default_reports','util','../../config/logger','moment','bluebird','rimraf','../../config/environment','./analyticDefaultReport.attributes','exports','define','AnalyticDefaultReport'];(function(_0x2b0a86,_0x2ecebd){var _0x955940=function(_0x1988f8){while(--_0x1988f8){_0x2b0a86['push'](_0x2b0a86['shift']());}};_0x955940(++_0x2ecebd);}(_0xdfe3,0x109));var _0x3dfe=function(_0x19b3f9,_0xade753){_0x19b3f9=_0x19b3f9-0x0;var _0x18c3f6=_0xdfe3[_0x19b3f9];return _0x18c3f6;};'use strict';var _=require('lodash');var util=require(_0x3dfe('0x0'));var logger=require(_0x3dfe('0x1'))('api');var moment=require(_0x3dfe('0x2'));var BPromise=require(_0x3dfe('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x3dfe('0x4'));var config=require(_0x3dfe('0x5'));var attributes=require(_0x3dfe('0x6'));module[_0x3dfe('0x7')]=function(_0x4b674f,_0x129b9d){return _0x4b674f[_0x3dfe('0x8')](_0x3dfe('0x9'),attributes,{'tableName':_0x3dfe('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x7f96=['util','../../config/logger','api','moment','request-promise','path','rimraf','./analyticDefaultReport.attributes','exports','define','AnalyticDefaultReport','analytics_default_reports','lodash'];(function(_0x69a451,_0x49fd37){var _0x3d6ef5=function(_0x27ebf4){while(--_0x27ebf4){_0x69a451['push'](_0x69a451['shift']());}};_0x3d6ef5(++_0x49fd37);}(_0x7f96,0xf6));var _0x67f9=function(_0x1b80bf,_0x58608b){_0x1b80bf=_0x1b80bf-0x0;var _0x2bd1d0=_0x7f96[_0x1b80bf];return _0x2bd1d0;};'use strict';var _=require(_0x67f9('0x0'));var util=require(_0x67f9('0x1'));var logger=require(_0x67f9('0x2'))(_0x67f9('0x3'));var moment=require(_0x67f9('0x4'));var BPromise=require('bluebird');var rp=require(_0x67f9('0x5'));var fs=require('fs');var path=require(_0x67f9('0x6'));var rimraf=require(_0x67f9('0x7'));var config=require('../../config/environment');var attributes=require(_0x67f9('0x8'));module[_0x67f9('0x9')]=function(_0x342cc3,_0x8bc3f6){return _0x342cc3[_0x67f9('0xa')](_0x67f9('0xb'),attributes,{'tableName':_0x67f9('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/analyticDefaultReport/analyticDefaultReport.rpc.js b/server/api/analyticDefaultReport/analyticDefaultReport.rpc.js index 937d99b..f914279 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 _0x4509=['jayson/promise','client','http','request','then','info','AnalyticDefaultReport,\x20%s,\x20%s','debug','AnalyticDefaultReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc'];(function(_0x4164f2,_0x38669f){var _0x2575c7=function(_0x24dca1){while(--_0x24dca1){_0x4164f2['push'](_0x4164f2['shift']());}};_0x2575c7(++_0x38669f);}(_0x4509,0x16e));var _0x9450=function(_0x7d0f6b,_0x375507){_0x7d0f6b=_0x7d0f6b-0x0;var _0xe9da3a=_0x4509[_0x7d0f6b];return _0xe9da3a;};'use strict';var _=require(_0x9450('0x0'));var util=require(_0x9450('0x1'));var moment=require('moment');var BPromise=require(_0x9450('0x2'));var rs=require(_0x9450('0x3'));var fs=require('fs');var Redis=require(_0x9450('0x4'));var db=require(_0x9450('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x9450('0x6'))(_0x9450('0x7'));var config=require('../../config/environment');var jayson=require(_0x9450('0x8'));var client=jayson[_0x9450('0x9')][_0x9450('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x525cea,_0x458ade,_0xb44d32){return new BPromise(function(_0x581632,_0x1cb5d4){return client[_0x9450('0xb')](_0x525cea,_0xb44d32)[_0x9450('0xc')](function(_0x16596e){logger[_0x9450('0xd')](_0x9450('0xe'),_0x458ade,'request\x20sent');logger[_0x9450('0xf')](_0x9450('0x10'),_0x458ade,_0x9450('0x11'),JSON[_0x9450('0x12')](_0x16596e));if(_0x16596e[_0x9450('0x13')]){if(_0x16596e[_0x9450('0x13')][_0x9450('0x14')]===0x1f4){logger[_0x9450('0x13')](_0x9450('0xe'),_0x458ade,_0x16596e[_0x9450('0x13')][_0x9450('0x15')]);return _0x1cb5d4(_0x16596e[_0x9450('0x13')]['message']);}logger[_0x9450('0x13')]('AnalyticDefaultReport,\x20%s,\x20%s',_0x458ade,_0x16596e[_0x9450('0x13')][_0x9450('0x15')]);return _0x581632(_0x16596e[_0x9450('0x13')][_0x9450('0x15')]);}else{logger['info'](_0x9450('0xe'),_0x458ade,_0x9450('0x11'));_0x581632(_0x16596e['result'][_0x9450('0x15')]);}})['catch'](function(_0x43a903){logger[_0x9450('0x13')]('AnalyticDefaultReport,\x20%s,\x20%s',_0x458ade,_0x43a903);_0x1cb5d4(_0x43a903);});});} \ No newline at end of file +var _0x6b30=['debug','AnalyticDefaultReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','AnalyticDefaultReport,\x20%s,\x20%s','info','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','jayson/promise','client','http','request','then','request\x20sent'];(function(_0x525c7b,_0x488fcc){var _0x27b33e=function(_0x56d43b){while(--_0x56d43b){_0x525c7b['push'](_0x525c7b['shift']());}};_0x27b33e(++_0x488fcc);}(_0x6b30,0x1d6));var _0x06b3=function(_0x229d7c,_0x2e8fd1){_0x229d7c=_0x229d7c-0x0;var _0x35c63b=_0x6b30[_0x229d7c];return _0x35c63b;};'use strict';var _=require(_0x06b3('0x0'));var util=require('util');var moment=require(_0x06b3('0x1'));var BPromise=require(_0x06b3('0x2'));var rs=require(_0x06b3('0x3'));var fs=require('fs');var Redis=require(_0x06b3('0x4'));var db=require(_0x06b3('0x5'))['db'];var utils=require(_0x06b3('0x6'));var logger=require('../../config/logger')(_0x06b3('0x7'));var config=require('../../config/environment');var jayson=require(_0x06b3('0x8'));var client=jayson[_0x06b3('0x9')][_0x06b3('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x1c3faf,_0x321752,_0xde82b3){return new BPromise(function(_0x8b7cf0,_0x56554f){return client[_0x06b3('0xb')](_0x1c3faf,_0xde82b3)[_0x06b3('0xc')](function(_0x4d6c37){logger['info']('AnalyticDefaultReport,\x20%s,\x20%s',_0x321752,_0x06b3('0xd'));logger[_0x06b3('0xe')](_0x06b3('0xf'),_0x321752,_0x06b3('0xd'),JSON[_0x06b3('0x10')](_0x4d6c37));if(_0x4d6c37[_0x06b3('0x11')]){if(_0x4d6c37['error'][_0x06b3('0x12')]===0x1f4){logger[_0x06b3('0x11')]('AnalyticDefaultReport,\x20%s,\x20%s',_0x321752,_0x4d6c37[_0x06b3('0x11')][_0x06b3('0x13')]);return _0x56554f(_0x4d6c37[_0x06b3('0x11')][_0x06b3('0x13')]);}logger[_0x06b3('0x11')](_0x06b3('0x14'),_0x321752,_0x4d6c37[_0x06b3('0x11')][_0x06b3('0x13')]);return _0x8b7cf0(_0x4d6c37[_0x06b3('0x11')][_0x06b3('0x13')]);}else{logger[_0x06b3('0x15')](_0x06b3('0x14'),_0x321752,_0x06b3('0xd'));_0x8b7cf0(_0x4d6c37['result'][_0x06b3('0x13')]);}})['catch'](function(_0x45c47e){logger[_0x06b3('0x11')]('AnalyticDefaultReport,\x20%s,\x20%s',_0x321752,_0x45c47e);_0x56554f(_0x45c47e);});});} \ No newline at end of file diff --git a/server/api/analyticDefaultReport/index.js b/server/api/analyticDefaultReport/index.js index 340d45e..d001b7c 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 _0x85b8=['put','update','delete','destroy','exports','util','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./analyticDefaultReport.controller','get','isAuthenticated','index','/:id','/:id/preview','preview','run','/:id/query','post','create'];(function(_0x1d211b,_0x475f3b){var _0x47c88b=function(_0x3126f5){while(--_0x3126f5){_0x1d211b['push'](_0x1d211b['shift']());}};_0x47c88b(++_0x475f3b);}(_0x85b8,0x9f));var _0x885b=function(_0x40348a,_0x5c0bb3){_0x40348a=_0x40348a-0x0;var _0x290d46=_0x85b8[_0x40348a];return _0x290d46;};'use strict';var multer=require('multer');var util=require(_0x885b('0x0'));var path=require('path');var timeout=require(_0x885b('0x1'));var express=require(_0x885b('0x2'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0x885b('0x3'));var interaction=require(_0x885b('0x4'));var config=require(_0x885b('0x5'));var controller=require(_0x885b('0x6'));router[_0x885b('0x7')]('/',auth[_0x885b('0x8')](),controller[_0x885b('0x9')]);router[_0x885b('0x7')](_0x885b('0xa'),auth['isAuthenticated'](),controller['show']);router[_0x885b('0x7')](_0x885b('0xb'),auth[_0x885b('0x8')](),controller[_0x885b('0xc')]);router[_0x885b('0x7')]('/:id/run',auth[_0x885b('0x8')](),controller[_0x885b('0xd')]);router['get'](_0x885b('0xe'),auth[_0x885b('0x8')](),controller['query']);router[_0x885b('0xf')]('/',auth[_0x885b('0x8')](),controller[_0x885b('0x10')]);router[_0x885b('0x11')](_0x885b('0xa'),auth[_0x885b('0x8')](),controller[_0x885b('0x12')]);router[_0x885b('0x13')]('/:id',auth[_0x885b('0x8')](),controller[_0x885b('0x14')]);module[_0x885b('0x15')]=router; \ No newline at end of file +var _0xbb61=['run','put','delete','destroy','exports','multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./analyticDefaultReport.controller','get','isAuthenticated','/:id','/:id/preview','preview','/:id/run'];(function(_0x4fa45e,_0x608357){var _0x2e90a8=function(_0x29a49b){while(--_0x29a49b){_0x4fa45e['push'](_0x4fa45e['shift']());}};_0x2e90a8(++_0x608357);}(_0xbb61,0x131));var _0x1bb6=function(_0x1992f1,_0x5c61f0){_0x1992f1=_0x1992f1-0x0;var _0x413dfe=_0xbb61[_0x1992f1];return _0x413dfe;};'use strict';var multer=require(_0x1bb6('0x0'));var util=require('util');var path=require(_0x1bb6('0x1'));var timeout=require(_0x1bb6('0x2'));var express=require(_0x1bb6('0x3'));var router=express[_0x1bb6('0x4')]();var fs_extra=require(_0x1bb6('0x5'));var auth=require(_0x1bb6('0x6'));var interaction=require(_0x1bb6('0x7'));var config=require('../../config/environment');var controller=require(_0x1bb6('0x8'));router[_0x1bb6('0x9')]('/',auth[_0x1bb6('0xa')](),controller['index']);router[_0x1bb6('0x9')](_0x1bb6('0xb'),auth[_0x1bb6('0xa')](),controller['show']);router[_0x1bb6('0x9')](_0x1bb6('0xc'),auth[_0x1bb6('0xa')](),controller[_0x1bb6('0xd')]);router[_0x1bb6('0x9')](_0x1bb6('0xe'),auth['isAuthenticated'](),controller[_0x1bb6('0xf')]);router[_0x1bb6('0x9')]('/:id/query',auth[_0x1bb6('0xa')](),controller['query']);router['post']('/',auth['isAuthenticated'](),controller['create']);router[_0x1bb6('0x10')](_0x1bb6('0xb'),auth['isAuthenticated'](),controller['update']);router[_0x1bb6('0x11')](_0x1bb6('0xb'),auth[_0x1bb6('0xa')](),controller[_0x1bb6('0x12')]);module[_0x1bb6('0x13')]=router; \ No newline at end of file diff --git a/server/api/analyticExtractedReport/analyticExtractedReport.attributes.js b/server/api/analyticExtractedReport/analyticExtractedReport.attributes.js index f13e112..b8d0973 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 _0xada6=['INTEGER','STRING','csv','xlsx','DATE','Loading','ENUM','manual','scheduled'];(function(_0x3c97ea,_0x553e28){var _0x4c09b3=function(_0x5f78f6){while(--_0x5f78f6){_0x3c97ea['push'](_0x3c97ea['shift']());}};_0x4c09b3(++_0x553e28);}(_0xada6,0x1d5));var _0x6ada=function(_0x4779be,_0x17e0e5){_0x4779be=_0x4779be-0x0;var _0x3b599c=_0xada6[_0x4779be];return _0x3b599c;};'use strict';var Sequelize=require('sequelize');var moment=require('moment');module['exports']={'name':{'type':Sequelize['STRING'],'allowNull':![]},'basename':{'type':Sequelize[_0x6ada('0x0')],'allowNull':![]},'output':{'type':Sequelize['ENUM'](_0x6ada('0x1'),'pdf',_0x6ada('0x2')),'allowNull':![],'defaultValue':_0x6ada('0x1')},'savename':{'type':Sequelize[_0x6ada('0x0')],'allowNull':![]},'startDate':{'type':Sequelize[_0x6ada('0x3')]},'endDate':{'type':Sequelize[_0x6ada('0x3')]},'status':{'type':Sequelize[_0x6ada('0x0')],'defaultValue':_0x6ada('0x4')},'type':{'type':Sequelize[_0x6ada('0x5')](_0x6ada('0x6'),_0x6ada('0x7')),'allowNull':![],'defaultValue':_0x6ada('0x6')},'reportId':{'type':Sequelize[_0x6ada('0x8')](0xb)['UNSIGNED']},'reportType':{'type':Sequelize[_0x6ada('0x0')]}}; \ No newline at end of file +var _0x3ad5=['UNSIGNED','moment','exports','STRING','ENUM','csv','xlsx','DATE','Loading','manual','scheduled','INTEGER'];(function(_0x4812f1,_0x115436){var _0x6fe492=function(_0x37939e){while(--_0x37939e){_0x4812f1['push'](_0x4812f1['shift']());}};_0x6fe492(++_0x115436);}(_0x3ad5,0x6d));var _0x53ad=function(_0xed6614,_0x28b3d3){_0xed6614=_0xed6614-0x0;var _0x4573db=_0x3ad5[_0xed6614];return _0x4573db;};'use strict';var Sequelize=require('sequelize');var moment=require(_0x53ad('0x0'));module[_0x53ad('0x1')]={'name':{'type':Sequelize[_0x53ad('0x2')],'allowNull':![]},'basename':{'type':Sequelize['STRING'],'allowNull':![]},'output':{'type':Sequelize[_0x53ad('0x3')](_0x53ad('0x4'),'pdf',_0x53ad('0x5')),'allowNull':![],'defaultValue':_0x53ad('0x4')},'savename':{'type':Sequelize[_0x53ad('0x2')],'allowNull':![]},'startDate':{'type':Sequelize[_0x53ad('0x6')]},'endDate':{'type':Sequelize[_0x53ad('0x6')]},'status':{'type':Sequelize[_0x53ad('0x2')],'defaultValue':_0x53ad('0x7')},'type':{'type':Sequelize[_0x53ad('0x3')](_0x53ad('0x8'),_0x53ad('0x9')),'allowNull':![],'defaultValue':_0x53ad('0x8')},'reportId':{'type':Sequelize[_0x53ad('0xa')](0xb)[_0x53ad('0xb')]},'reportType':{'type':Sequelize['STRING']}}; \ No newline at end of file diff --git a/server/api/analyticExtractedReport/analyticExtractedReport.controller.js b/server/api/analyticExtractedReport/analyticExtractedReport.controller.js index d26e528..da92367 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 _0x63f6=['ExtractedReports','UserProfileResource','stack','send','index','AnalyticExtractedReport','fieldName','type','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','sort','where','pick','merge','map','VIRTUAL','name','filter','options','includeAll','findAll','catch','params','rawAttributes','include','find','body','user','role','UserProfileSection','userProfileId','autoAssociation','create','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','basename','output','existsSync','root','server/files/reports','Sequelize','ValidationError','Report\x20not\x20found\x20or\x20empty','exists','join','format','%s.%s','toLowerCase','rimraf','moment','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','querystring','papaparse','ioredis','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','end','json','limit','undefined','count','offset','set','apply','reject','save','update','destroy','then','get'];(function(_0x4e88de,_0xa524e6){var _0x1e8c31=function(_0x249b88){while(--_0x249b88){_0x4e88de['push'](_0x4e88de['shift']());}};_0x1e8c31(++_0xa524e6);}(_0x63f6,0x142));var _0x663f=function(_0x21c69c,_0x1b7535){_0x21c69c=_0x21c69c-0x0;var _0x2acd03=_0x63f6[_0x21c69c];return _0x2acd03;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x663f('0x0'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x663f('0x1'));var BPromise=require(_0x663f('0x2'));var Mustache=require(_0x663f('0x3'));var util=require(_0x663f('0x4'));var path=require('path');var sox=require(_0x663f('0x5'));var csv=require(_0x663f('0x6'));var ejs=require(_0x663f('0x7'));var fs=require('fs');var fs_extra=require(_0x663f('0x8'));var _=require(_0x663f('0x9'));var squel=require('squel');var crypto=require(_0x663f('0xa'));var jsforce=require(_0x663f('0xb'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x663f('0xc'));var Papa=require(_0x663f('0xd'));var Redis=require(_0x663f('0xe'));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('../../config/logger')('api');var utils=require(_0x663f('0xf'));var config=require(_0x663f('0x10'));var licenseUtil=require(_0x663f('0x11'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x5141c0,_0x2efd9e){_0x2efd9e=_0x2efd9e||0xcc;return function(_0x3f47e1){if(_0x3f47e1){return _0x5141c0[_0x663f('0x12')](_0x2efd9e);}return _0x5141c0[_0x663f('0x13')](_0x2efd9e)[_0x663f('0x14')]();};}function respondWithResult(_0x44b11a,_0x14d130){_0x14d130=_0x14d130||0xc8;return function(_0x3d7818){if(_0x3d7818){return _0x44b11a[_0x663f('0x13')](_0x14d130)[_0x663f('0x15')](_0x3d7818);}};}function respondWithFilteredResult(_0x1dcfa9,_0x4e727b){return function(_0x347b78){if(_0x347b78){var _0x39b179=typeof _0x4e727b['offset']==='undefined'&&typeof _0x4e727b[_0x663f('0x16')]===_0x663f('0x17');var _0x1d0694=_0x347b78[_0x663f('0x18')];var _0x181a9e=_0x39b179?0x0:_0x4e727b[_0x663f('0x19')];var _0x491b72=_0x39b179?_0x347b78[_0x663f('0x18')]:_0x4e727b[_0x663f('0x19')]+_0x4e727b[_0x663f('0x16')];var _0x15d212;if(_0x491b72>=_0x1d0694){_0x491b72=_0x1d0694;_0x15d212=0xc8;}else{_0x15d212=0xce;}_0x1dcfa9[_0x663f('0x13')](_0x15d212);return _0x1dcfa9[_0x663f('0x1a')]('Content-Range',_0x181a9e+'-'+_0x491b72+'/'+_0x1d0694)[_0x663f('0x15')](_0x347b78);}return null;};}function patchUpdates(_0x416292){return function(_0x51d11a){try{jsonpatch[_0x663f('0x1b')](_0x51d11a,_0x416292,!![]);}catch(_0x5ad2fc){return BPromise[_0x663f('0x1c')](_0x5ad2fc);}return _0x51d11a[_0x663f('0x1d')]();};}function saveUpdates(_0x5a90d0,_0x260119){return function(_0x328415){if(_0x328415){return _0x328415[_0x663f('0x1e')](_0x5a90d0)['then'](function(_0x2af584){return _0x2af584;});}return null;};}function removeEntity(_0x3e0b79,_0x14cadc){return function(_0x132749){if(_0x132749){return _0x132749[_0x663f('0x1f')]()[_0x663f('0x20')](function(){var _0x5438ed=_0x132749[_0x663f('0x21')]({'plain':!![]});var _0x561a2d=_0x663f('0x22');return db[_0x663f('0x23')][_0x663f('0x1f')]({'where':{'type':_0x561a2d,'resourceId':_0x5438ed['id']}})[_0x663f('0x20')](function(){return _0x132749;});})[_0x663f('0x20')](function(){_0x3e0b79[_0x663f('0x13')](0xcc)['end']();});}};}function handleEntityNotFound(_0x47f692,_0x323073){return function(_0x66bf37){if(!_0x66bf37){_0x47f692[_0x663f('0x12')](0x194);}return _0x66bf37;};}function handleError(_0x2f5b35,_0x3f9885){_0x3f9885=_0x3f9885||0x1f4;return function(_0x2ff2aa){logger['error'](_0x2ff2aa[_0x663f('0x24')]);if(_0x2ff2aa['name']){delete _0x2ff2aa['name'];}_0x2f5b35[_0x663f('0x13')](_0x3f9885)[_0x663f('0x25')](_0x2ff2aa);};}exports[_0x663f('0x26')]=function(_0x45ef2f,_0x50b766){var _0x1502c3={},_0x84f713={},_0x2fb592={'count':0x0,'rows':[]};var _0x415280=_['map'](db[_0x663f('0x27')]['rawAttributes'],function(_0x4e7ed5){return{'name':_0x4e7ed5[_0x663f('0x28')],'type':_0x4e7ed5[_0x663f('0x29')][_0x663f('0x2a')]};});_0x84f713[_0x663f('0x2b')]=_['map'](_0x415280,'name');_0x84f713[_0x663f('0x2c')]=_[_0x663f('0x2d')](_0x45ef2f['query']);_0x84f713[_0x663f('0x2e')]=_[_0x663f('0x2f')](_0x84f713[_0x663f('0x2b')],_0x84f713[_0x663f('0x2c')]);_0x1502c3['attributes']=_[_0x663f('0x2f')](_0x84f713[_0x663f('0x2b')],qs[_0x663f('0x30')](_0x45ef2f[_0x663f('0x2c')][_0x663f('0x30')]));_0x1502c3[_0x663f('0x31')]=_0x1502c3[_0x663f('0x31')][_0x663f('0x32')]?_0x1502c3[_0x663f('0x31')]:_0x84f713['model'];if(!_0x45ef2f[_0x663f('0x2c')][_0x663f('0x33')]('nolimit')){_0x1502c3['limit']=qs[_0x663f('0x16')](_0x45ef2f[_0x663f('0x2c')]['limit']);_0x1502c3['offset']=qs['offset'](_0x45ef2f[_0x663f('0x2c')][_0x663f('0x19')]);}_0x1502c3['order']=qs[_0x663f('0x34')](_0x45ef2f[_0x663f('0x2c')][_0x663f('0x34')]);_0x1502c3[_0x663f('0x35')]=qs['filters'](_[_0x663f('0x36')](_0x45ef2f[_0x663f('0x2c')],_0x84f713['filters']),_0x415280);if(_0x45ef2f[_0x663f('0x2c')]['filter']){_0x1502c3['where']=_[_0x663f('0x37')](_0x1502c3[_0x663f('0x35')],{'$or':_[_0x663f('0x38')](_0x415280,function(_0x19adb7){if(_0x19adb7[_0x663f('0x29')]!==_0x663f('0x39')){var _0x4a72ba={};_0x4a72ba[_0x19adb7[_0x663f('0x3a')]]={'$like':'%'+_0x45ef2f['query'][_0x663f('0x3b')]+'%'};return _0x4a72ba;}})});}_0x1502c3=_[_0x663f('0x37')]({},_0x1502c3,_0x45ef2f[_0x663f('0x3c')]);var _0x65416={'where':_0x1502c3[_0x663f('0x35')]};return db[_0x663f('0x27')][_0x663f('0x18')](_0x65416)[_0x663f('0x20')](function(_0x18e3dd){_0x2fb592[_0x663f('0x18')]=_0x18e3dd;if(_0x45ef2f[_0x663f('0x2c')][_0x663f('0x3d')]){_0x1502c3['include']=[{'all':!![]}];}return db[_0x663f('0x27')][_0x663f('0x3e')](_0x1502c3);})[_0x663f('0x20')](function(_0x19f236){_0x2fb592['rows']=_0x19f236;return _0x2fb592;})[_0x663f('0x20')](respondWithFilteredResult(_0x50b766,_0x1502c3))[_0x663f('0x3f')](handleError(_0x50b766,null));};exports['show']=function(_0x2335d2,_0x45eeb3){var _0x84839f={'raw':!![],'where':{'id':_0x2335d2[_0x663f('0x40')]['id']}},_0x48653a={};_0x48653a[_0x663f('0x2b')]=_[_0x663f('0x2d')](db[_0x663f('0x27')][_0x663f('0x41')]);_0x48653a[_0x663f('0x2c')]=_[_0x663f('0x2d')](_0x2335d2[_0x663f('0x2c')]);_0x48653a[_0x663f('0x2e')]=_[_0x663f('0x2f')](_0x48653a['model'],_0x48653a[_0x663f('0x2c')]);_0x84839f['attributes']=_['intersection'](_0x48653a[_0x663f('0x2b')],qs['fields'](_0x2335d2['query'][_0x663f('0x30')]));_0x84839f[_0x663f('0x31')]=_0x84839f[_0x663f('0x31')]['length']?_0x84839f[_0x663f('0x31')]:_0x48653a[_0x663f('0x2b')];if(_0x2335d2[_0x663f('0x2c')]['includeAll']){_0x84839f[_0x663f('0x42')]=[{'all':!![]}];}_0x84839f=_[_0x663f('0x37')]({},_0x84839f,_0x2335d2['options']);return db[_0x663f('0x27')][_0x663f('0x43')](_0x84839f)[_0x663f('0x20')](handleEntityNotFound(_0x45eeb3,null))[_0x663f('0x20')](respondWithResult(_0x45eeb3,null))[_0x663f('0x3f')](handleError(_0x45eeb3,null));};exports['create']=function(_0x4c4733,_0x44657c){return db[_0x663f('0x27')]['create'](_0x4c4733[_0x663f('0x44')],{})[_0x663f('0x20')](function(_0x501840){var _0xe2f5b9=_0x4c4733[_0x663f('0x45')]['get']({'plain':!![]});if(!_0xe2f5b9)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0xe2f5b9[_0x663f('0x46')]===_0x663f('0x45')){var _0x1df824=_0x501840[_0x663f('0x21')]({'plain':!![]});var _0x11d6b1=_0x663f('0x22');return db[_0x663f('0x47')]['find']({'where':{'name':_0x11d6b1,'userProfileId':_0xe2f5b9[_0x663f('0x48')]},'raw':!![]})[_0x663f('0x20')](function(_0x4a1371){if(_0x4a1371&&_0x4a1371[_0x663f('0x49')]===0x0){return db['UserProfileResource'][_0x663f('0x4a')]({'name':_0x1df824['name'],'resourceId':_0x1df824['id'],'type':_0x4a1371[_0x663f('0x3a')],'sectionId':_0x4a1371['id']},{})[_0x663f('0x20')](function(){return _0x501840;});}else{return _0x501840;}})['catch'](function(_0x3d1bbb){logger['error'](_0x663f('0x4b'),_0x3d1bbb);throw _0x3d1bbb;});}return _0x501840;})[_0x663f('0x20')](respondWithResult(_0x44657c,0xc9))[_0x663f('0x3f')](handleError(_0x44657c,null));};exports[_0x663f('0x1e')]=function(_0x183703,_0x43760c){if(_0x183703[_0x663f('0x44')]['id']){delete _0x183703[_0x663f('0x44')]['id'];}return db['AnalyticExtractedReport'][_0x663f('0x43')]({'where':{'id':_0x183703[_0x663f('0x40')]['id']}})[_0x663f('0x20')](handleEntityNotFound(_0x43760c,null))['then'](saveUpdates(_0x183703['body'],null))[_0x663f('0x20')](respondWithResult(_0x43760c,null))['catch'](handleError(_0x43760c,null));};exports[_0x663f('0x1f')]=function(_0x3aabd6,_0x279b18){return db['AnalyticExtractedReport'][_0x663f('0x43')]({'where':{'id':_0x3aabd6[_0x663f('0x40')]['id']}})['then'](handleEntityNotFound(_0x279b18,null))[_0x663f('0x20')](removeEntity(_0x279b18,null))[_0x663f('0x3f')](handleError(_0x279b18,null));};exports['download']=function(_0x143905,_0x51981a,_0x30f9f0){return db[_0x663f('0x27')]['find']({'where':{'id':_0x143905[_0x663f('0x40')]['id']},'attributes':[_0x663f('0x3a'),_0x663f('0x4c'),'savename',_0x663f('0x4d')],'raw':!![]})[_0x663f('0x20')](handleEntityNotFound(_0x51981a,null))[_0x663f('0x20')](function(_0x58f124){if(_0x58f124){if(!fs[_0x663f('0x4e')](path['join'](config[_0x663f('0x4f')],_0x663f('0x50'),_0x58f124['savename']))){throw new db[(_0x663f('0x51'))][(_0x663f('0x52'))](_0x663f('0x53'));}if(_0x143905[_0x663f('0x2c')][_0x663f('0x54')]){return _0x51981a[_0x663f('0x12')](0xc8);}return _0x51981a['download'](path[_0x663f('0x55')](config[_0x663f('0x4f')],_0x663f('0x50'),_0x58f124['savename']),util[_0x663f('0x56')](_0x663f('0x57'),_0x58f124[_0x663f('0x4c')]||_0x58f124['name'],_0x58f124[_0x663f('0x4d')][_0x663f('0x58')]()));}})[_0x663f('0x3f')](handleError(_0x51981a,null));}; \ No newline at end of file +var _0xd28c=['options','includeAll','catch','show','params','find','user','get','role','ExtractedReports','autoAssociation','create','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','basename','savename','output','root','Sequelize','exists','download','join','format','toLowerCase','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','offset','undefined','limit','count','Content-Range','json','apply','update','then','destroy','UserProfileResource','end','sendStatus','error','stack','name','send','map','AnalyticExtractedReport','rawAttributes','type','key','model','query','keys','filters','intersection','fields','attributes','length','order','sort','where','pick','filter','VIRTUAL','merge'];(function(_0x799123,_0x4e7fbc){var _0x46d7bc=function(_0x2577c4){while(--_0x2577c4){_0x799123['push'](_0x799123['shift']());}};_0x46d7bc(++_0x4e7fbc);}(_0xd28c,0xca));var _0xcd28=function(_0x4a8478,_0x381efe){_0x4a8478=_0x4a8478-0x0;var _0x3fa2f9=_0xd28c[_0x4a8478];return _0x3fa2f9;};'use strict';var emlformat=require(_0xcd28('0x0'));var rimraf=require(_0xcd28('0x1'));var zipdir=require(_0xcd28('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xcd28('0x3'));var moment=require(_0xcd28('0x4'));var BPromise=require(_0xcd28('0x5'));var Mustache=require(_0xcd28('0x6'));var util=require(_0xcd28('0x7'));var path=require(_0xcd28('0x8'));var sox=require(_0xcd28('0x9'));var csv=require(_0xcd28('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xcd28('0xb'));var squel=require('squel');var crypto=require(_0xcd28('0xc'));var jsforce=require(_0xcd28('0xd'));var deskjs=require(_0xcd28('0xe'));var toCsv=require(_0xcd28('0xa'));var querystring=require(_0xcd28('0xf'));var Papa=require(_0xcd28('0x10'));var Redis=require(_0xcd28('0x11'));var authService=require(_0xcd28('0x12'));var qs=require(_0xcd28('0x13'));var as=require(_0xcd28('0x14'));var hardwareService=require(_0xcd28('0x15'));var logger=require(_0xcd28('0x16'))('api');var utils=require(_0xcd28('0x17'));var config=require(_0xcd28('0x18'));var licenseUtil=require(_0xcd28('0x19'));var db=require(_0xcd28('0x1a'))['db'];function respondWithStatusCode(_0x41084d,_0x390b6a){_0x390b6a=_0x390b6a||0xcc;return function(_0x27fd05){if(_0x27fd05){return _0x41084d['sendStatus'](_0x390b6a);}return _0x41084d[_0xcd28('0x1b')](_0x390b6a)['end']();};}function respondWithResult(_0x54a017,_0x564a6d){_0x564a6d=_0x564a6d||0xc8;return function(_0xe0b03a){if(_0xe0b03a){return _0x54a017[_0xcd28('0x1b')](_0x564a6d)['json'](_0xe0b03a);}};}function respondWithFilteredResult(_0x47a2f0,_0xd42b8e){return function(_0x104957){if(_0x104957){var _0x12ea5a=typeof _0xd42b8e[_0xcd28('0x1c')]===_0xcd28('0x1d')&&typeof _0xd42b8e[_0xcd28('0x1e')]==='undefined';var _0x51db3e=_0x104957[_0xcd28('0x1f')];var _0x1e7a0d=_0x12ea5a?0x0:_0xd42b8e['offset'];var _0x5d5c97=_0x12ea5a?_0x104957[_0xcd28('0x1f')]:_0xd42b8e['offset']+_0xd42b8e[_0xcd28('0x1e')];var _0x5d41aa;if(_0x5d5c97>=_0x51db3e){_0x5d5c97=_0x51db3e;_0x5d41aa=0xc8;}else{_0x5d41aa=0xce;}_0x47a2f0[_0xcd28('0x1b')](_0x5d41aa);return _0x47a2f0['set'](_0xcd28('0x20'),_0x1e7a0d+'-'+_0x5d5c97+'/'+_0x51db3e)[_0xcd28('0x21')](_0x104957);}return null;};}function patchUpdates(_0x52ffd9){return function(_0x16f9cf){try{jsonpatch[_0xcd28('0x22')](_0x16f9cf,_0x52ffd9,!![]);}catch(_0x4e4e0e){return BPromise['reject'](_0x4e4e0e);}return _0x16f9cf['save']();};}function saveUpdates(_0x78a7e6,_0x25d760){return function(_0x4dcbfa){if(_0x4dcbfa){return _0x4dcbfa[_0xcd28('0x23')](_0x78a7e6)[_0xcd28('0x24')](function(_0x23c293){return _0x23c293;});}return null;};}function removeEntity(_0x321c92,_0x1395c2){return function(_0x1f82a6){if(_0x1f82a6){return _0x1f82a6[_0xcd28('0x25')]()[_0xcd28('0x24')](function(){var _0x3d5e4e=_0x1f82a6['get']({'plain':!![]});var _0x3683de='ExtractedReports';return db[_0xcd28('0x26')][_0xcd28('0x25')]({'where':{'type':_0x3683de,'resourceId':_0x3d5e4e['id']}})['then'](function(){return _0x1f82a6;});})[_0xcd28('0x24')](function(){_0x321c92[_0xcd28('0x1b')](0xcc)[_0xcd28('0x27')]();});}};}function handleEntityNotFound(_0x434273,_0x57b81e){return function(_0x5eb12e){if(!_0x5eb12e){_0x434273[_0xcd28('0x28')](0x194);}return _0x5eb12e;};}function handleError(_0x31c890,_0x3c4d75){_0x3c4d75=_0x3c4d75||0x1f4;return function(_0x363219){logger[_0xcd28('0x29')](_0x363219[_0xcd28('0x2a')]);if(_0x363219['name']){delete _0x363219[_0xcd28('0x2b')];}_0x31c890[_0xcd28('0x1b')](_0x3c4d75)[_0xcd28('0x2c')](_0x363219);};}exports['index']=function(_0x1afcf4,_0x4dab90){var _0x407ef={},_0x201f41={},_0x5a2b7c={'count':0x0,'rows':[]};var _0x5be0c0=_[_0xcd28('0x2d')](db[_0xcd28('0x2e')][_0xcd28('0x2f')],function(_0x2d1c15){return{'name':_0x2d1c15['fieldName'],'type':_0x2d1c15[_0xcd28('0x30')][_0xcd28('0x31')]};});_0x201f41[_0xcd28('0x32')]=_['map'](_0x5be0c0,'name');_0x201f41[_0xcd28('0x33')]=_[_0xcd28('0x34')](_0x1afcf4['query']);_0x201f41[_0xcd28('0x35')]=_['intersection'](_0x201f41['model'],_0x201f41['query']);_0x407ef['attributes']=_[_0xcd28('0x36')](_0x201f41[_0xcd28('0x32')],qs[_0xcd28('0x37')](_0x1afcf4['query'][_0xcd28('0x37')]));_0x407ef[_0xcd28('0x38')]=_0x407ef['attributes'][_0xcd28('0x39')]?_0x407ef[_0xcd28('0x38')]:_0x201f41[_0xcd28('0x32')];if(!_0x1afcf4[_0xcd28('0x33')]['hasOwnProperty']('nolimit')){_0x407ef['limit']=qs[_0xcd28('0x1e')](_0x1afcf4[_0xcd28('0x33')][_0xcd28('0x1e')]);_0x407ef[_0xcd28('0x1c')]=qs[_0xcd28('0x1c')](_0x1afcf4[_0xcd28('0x33')][_0xcd28('0x1c')]);}_0x407ef[_0xcd28('0x3a')]=qs[_0xcd28('0x3b')](_0x1afcf4['query'][_0xcd28('0x3b')]);_0x407ef[_0xcd28('0x3c')]=qs[_0xcd28('0x35')](_[_0xcd28('0x3d')](_0x1afcf4['query'],_0x201f41[_0xcd28('0x35')]),_0x5be0c0);if(_0x1afcf4[_0xcd28('0x33')][_0xcd28('0x3e')]){_0x407ef[_0xcd28('0x3c')]=_['merge'](_0x407ef[_0xcd28('0x3c')],{'$or':_[_0xcd28('0x2d')](_0x5be0c0,function(_0x51b7d8){if(_0x51b7d8['type']!==_0xcd28('0x3f')){var _0x57faec={};_0x57faec[_0x51b7d8[_0xcd28('0x2b')]]={'$like':'%'+_0x1afcf4[_0xcd28('0x33')]['filter']+'%'};return _0x57faec;}})});}_0x407ef=_[_0xcd28('0x40')]({},_0x407ef,_0x1afcf4[_0xcd28('0x41')]);var _0xbf7565={'where':_0x407ef[_0xcd28('0x3c')]};return db[_0xcd28('0x2e')][_0xcd28('0x1f')](_0xbf7565)['then'](function(_0x11cc7a){_0x5a2b7c['count']=_0x11cc7a;if(_0x1afcf4[_0xcd28('0x33')][_0xcd28('0x42')]){_0x407ef['include']=[{'all':!![]}];}return db[_0xcd28('0x2e')]['findAll'](_0x407ef);})[_0xcd28('0x24')](function(_0x597579){_0x5a2b7c['rows']=_0x597579;return _0x5a2b7c;})[_0xcd28('0x24')](respondWithFilteredResult(_0x4dab90,_0x407ef))[_0xcd28('0x43')](handleError(_0x4dab90,null));};exports[_0xcd28('0x44')]=function(_0x2d984d,_0x16ee54){var _0x28c1fa={'raw':!![],'where':{'id':_0x2d984d[_0xcd28('0x45')]['id']}},_0x537ed5={};_0x537ed5[_0xcd28('0x32')]=_[_0xcd28('0x34')](db[_0xcd28('0x2e')][_0xcd28('0x2f')]);_0x537ed5[_0xcd28('0x33')]=_[_0xcd28('0x34')](_0x2d984d[_0xcd28('0x33')]);_0x537ed5[_0xcd28('0x35')]=_[_0xcd28('0x36')](_0x537ed5[_0xcd28('0x32')],_0x537ed5[_0xcd28('0x33')]);_0x28c1fa[_0xcd28('0x38')]=_[_0xcd28('0x36')](_0x537ed5[_0xcd28('0x32')],qs[_0xcd28('0x37')](_0x2d984d['query'][_0xcd28('0x37')]));_0x28c1fa[_0xcd28('0x38')]=_0x28c1fa[_0xcd28('0x38')][_0xcd28('0x39')]?_0x28c1fa[_0xcd28('0x38')]:_0x537ed5[_0xcd28('0x32')];if(_0x2d984d[_0xcd28('0x33')]['includeAll']){_0x28c1fa['include']=[{'all':!![]}];}_0x28c1fa=_['merge']({},_0x28c1fa,_0x2d984d[_0xcd28('0x41')]);return db['AnalyticExtractedReport'][_0xcd28('0x46')](_0x28c1fa)[_0xcd28('0x24')](handleEntityNotFound(_0x16ee54,null))[_0xcd28('0x24')](respondWithResult(_0x16ee54,null))[_0xcd28('0x43')](handleError(_0x16ee54,null));};exports['create']=function(_0x57c430,_0x51fb66){return db[_0xcd28('0x2e')]['create'](_0x57c430['body'],{})['then'](function(_0x32f26b){var _0x299eca=_0x57c430[_0xcd28('0x47')][_0xcd28('0x48')]({'plain':!![]});if(!_0x299eca)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x299eca[_0xcd28('0x49')]===_0xcd28('0x47')){var _0x4df460=_0x32f26b['get']({'plain':!![]});var _0x5a8041=_0xcd28('0x4a');return db['UserProfileSection'][_0xcd28('0x46')]({'where':{'name':_0x5a8041,'userProfileId':_0x299eca['userProfileId']},'raw':!![]})[_0xcd28('0x24')](function(_0x22b971){if(_0x22b971&&_0x22b971[_0xcd28('0x4b')]===0x0){return db[_0xcd28('0x26')][_0xcd28('0x4c')]({'name':_0x4df460[_0xcd28('0x2b')],'resourceId':_0x4df460['id'],'type':_0x22b971[_0xcd28('0x2b')],'sectionId':_0x22b971['id']},{})[_0xcd28('0x24')](function(){return _0x32f26b;});}else{return _0x32f26b;}})[_0xcd28('0x43')](function(_0x372a9f){logger[_0xcd28('0x29')](_0xcd28('0x4d'),_0x372a9f);throw _0x372a9f;});}return _0x32f26b;})[_0xcd28('0x24')](respondWithResult(_0x51fb66,0xc9))['catch'](handleError(_0x51fb66,null));};exports[_0xcd28('0x23')]=function(_0xced2bd,_0x52e08d){if(_0xced2bd[_0xcd28('0x4e')]['id']){delete _0xced2bd[_0xcd28('0x4e')]['id'];}return db[_0xcd28('0x2e')]['find']({'where':{'id':_0xced2bd[_0xcd28('0x45')]['id']}})[_0xcd28('0x24')](handleEntityNotFound(_0x52e08d,null))[_0xcd28('0x24')](saveUpdates(_0xced2bd['body'],null))[_0xcd28('0x24')](respondWithResult(_0x52e08d,null))[_0xcd28('0x43')](handleError(_0x52e08d,null));};exports[_0xcd28('0x25')]=function(_0x216924,_0xa6fc75){return db[_0xcd28('0x2e')][_0xcd28('0x46')]({'where':{'id':_0x216924[_0xcd28('0x45')]['id']}})[_0xcd28('0x24')](handleEntityNotFound(_0xa6fc75,null))[_0xcd28('0x24')](removeEntity(_0xa6fc75,null))[_0xcd28('0x43')](handleError(_0xa6fc75,null));};exports['download']=function(_0x56322d,_0x28371d,_0xcf675f){return db['AnalyticExtractedReport'][_0xcd28('0x46')]({'where':{'id':_0x56322d[_0xcd28('0x45')]['id']},'attributes':['name',_0xcd28('0x4f'),_0xcd28('0x50'),_0xcd28('0x51')],'raw':!![]})[_0xcd28('0x24')](handleEntityNotFound(_0x28371d,null))[_0xcd28('0x24')](function(_0x34136e){if(_0x34136e){if(!fs['existsSync'](path['join'](config[_0xcd28('0x52')],'server/files/reports',_0x34136e[_0xcd28('0x50')]))){throw new db[(_0xcd28('0x53'))]['ValidationError']('Report\x20not\x20found\x20or\x20empty');}if(_0x56322d[_0xcd28('0x33')][_0xcd28('0x54')]){return _0x28371d['sendStatus'](0xc8);}return _0x28371d[_0xcd28('0x55')](path[_0xcd28('0x56')](config[_0xcd28('0x52')],'server/files/reports',_0x34136e[_0xcd28('0x50')]),util[_0xcd28('0x57')]('%s.%s',_0x34136e[_0xcd28('0x4f')]||_0x34136e[_0xcd28('0x2b')],_0x34136e[_0xcd28('0x51')][_0xcd28('0x58')]()));}})[_0xcd28('0x43')](handleError(_0x28371d,null));}; \ No newline at end of file diff --git a/server/api/analyticExtractedReport/analyticExtractedReport.model.js b/server/api/analyticExtractedReport/analyticExtractedReport.model.js index 8901db0..b271442 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 _0x8559=['exports','define','AnalyticExtractedReport','lodash','../../config/logger','api','moment','path','rimraf','./analyticExtractedReport.attributes'];(function(_0x326c6d,_0x217ee6){var _0x4ab260=function(_0x368234){while(--_0x368234){_0x326c6d['push'](_0x326c6d['shift']());}};_0x4ab260(++_0x217ee6);}(_0x8559,0xdf));var _0x9855=function(_0x75b516,_0x67c3d4){_0x75b516=_0x75b516-0x0;var _0x94bfbb=_0x8559[_0x75b516];return _0x94bfbb;};'use strict';var _=require(_0x9855('0x0'));var util=require('util');var logger=require(_0x9855('0x1'))(_0x9855('0x2'));var moment=require(_0x9855('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x9855('0x4'));var rimraf=require(_0x9855('0x5'));var config=require('../../config/environment');var attributes=require(_0x9855('0x6'));module[_0x9855('0x7')]=function(_0x1fc83c,_0xd9afcd){return _0x1fc83c[_0x9855('0x8')](_0x9855('0x9'),attributes,{'tableName':'analytics_extracted_reports','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x31ee=['lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment','exports','define','AnalyticExtractedReport','analytics_extracted_reports'];(function(_0x313df3,_0x4fca45){var _0x241d59=function(_0x452786){while(--_0x452786){_0x313df3['push'](_0x313df3['shift']());}};_0x241d59(++_0x4fca45);}(_0x31ee,0xf7));var _0xe31e=function(_0xaca81c,_0x2df861){_0xaca81c=_0xaca81c-0x0;var _0x3b0001=_0x31ee[_0xaca81c];return _0x3b0001;};'use strict';var _=require(_0xe31e('0x0'));var util=require(_0xe31e('0x1'));var logger=require(_0xe31e('0x2'))(_0xe31e('0x3'));var moment=require(_0xe31e('0x4'));var BPromise=require(_0xe31e('0x5'));var rp=require(_0xe31e('0x6'));var fs=require('fs');var path=require(_0xe31e('0x7'));var rimraf=require('rimraf');var config=require(_0xe31e('0x8'));var attributes=require('./analyticExtractedReport.attributes');module[_0xe31e('0x9')]=function(_0x32995f,_0x3dd9d1){return _0x32995f[_0xe31e('0xa')](_0xe31e('0xb'),attributes,{'tableName':_0xe31e('0xc'),'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 37c401b..ae3ec80 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 _0xb88a=['../../config/utils','../../config/environment','client','http','request','then','info','debug','AnalyticExtractedReport,\x20%s,\x20%s,\x20%s','stringify','error','code','AnalyticExtractedReport,\x20%s,\x20%s','message','request\x20sent','result','catch','lodash','util','moment','bluebird','randomstring','../../mysqldb'];(function(_0x243210,_0x4873f6){var _0x521eef=function(_0x52699a){while(--_0x52699a){_0x243210['push'](_0x243210['shift']());}};_0x521eef(++_0x4873f6);}(_0xb88a,0xf7));var _0xab88=function(_0x200dcf,_0x280d3b){_0x200dcf=_0x200dcf-0x0;var _0x4523cd=_0xb88a[_0x200dcf];return _0x4523cd;};'use strict';var _=require(_0xab88('0x0'));var util=require(_0xab88('0x1'));var moment=require(_0xab88('0x2'));var BPromise=require(_0xab88('0x3'));var rs=require(_0xab88('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xab88('0x5'))['db'];var utils=require(_0xab88('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0xab88('0x7'));var jayson=require('jayson/promise');var client=jayson[_0xab88('0x8')][_0xab88('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x183ba8,_0x4a0f78,_0x2c525a){return new BPromise(function(_0xa516cf,_0x2e1b76){return client[_0xab88('0xa')](_0x183ba8,_0x2c525a)[_0xab88('0xb')](function(_0x1ef032){logger[_0xab88('0xc')]('AnalyticExtractedReport,\x20%s,\x20%s',_0x4a0f78,'request\x20sent');logger[_0xab88('0xd')](_0xab88('0xe'),_0x4a0f78,'request\x20sent',JSON[_0xab88('0xf')](_0x1ef032));if(_0x1ef032['error']){if(_0x1ef032[_0xab88('0x10')][_0xab88('0x11')]===0x1f4){logger['error']('AnalyticExtractedReport,\x20%s,\x20%s',_0x4a0f78,_0x1ef032[_0xab88('0x10')]['message']);return _0x2e1b76(_0x1ef032[_0xab88('0x10')]['message']);}logger[_0xab88('0x10')](_0xab88('0x12'),_0x4a0f78,_0x1ef032[_0xab88('0x10')][_0xab88('0x13')]);return _0xa516cf(_0x1ef032[_0xab88('0x10')][_0xab88('0x13')]);}else{logger[_0xab88('0xc')](_0xab88('0x12'),_0x4a0f78,_0xab88('0x14'));_0xa516cf(_0x1ef032[_0xab88('0x15')][_0xab88('0x13')]);}})[_0xab88('0x16')](function(_0x5402e7){logger[_0xab88('0x10')](_0xab88('0x12'),_0x4a0f78,_0x5402e7);_0x2e1b76(_0x5402e7);});});} \ No newline at end of file +var _0x42d5=['message','info','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','then','AnalyticExtractedReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticExtractedReport,\x20%s,\x20%s,\x20%s','error','code'];(function(_0x547bf7,_0x33ea66){var _0x509baa=function(_0x965fa2){while(--_0x965fa2){_0x547bf7['push'](_0x547bf7['shift']());}};_0x509baa(++_0x33ea66);}(_0x42d5,0xc9));var _0x542d=function(_0x4fd988,_0x41c04a){_0x4fd988=_0x4fd988-0x0;var _0xb889a7=_0x42d5[_0x4fd988];return _0xb889a7;};'use strict';var _=require(_0x542d('0x0'));var util=require(_0x542d('0x1'));var moment=require(_0x542d('0x2'));var BPromise=require(_0x542d('0x3'));var rs=require(_0x542d('0x4'));var fs=require('fs');var Redis=require(_0x542d('0x5'));var db=require(_0x542d('0x6'))['db'];var utils=require(_0x542d('0x7'));var logger=require(_0x542d('0x8'))(_0x542d('0x9'));var config=require(_0x542d('0xa'));var jayson=require(_0x542d('0xb'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x22d24f,_0x3b99af,_0x21ec94){return new BPromise(function(_0x49a8a4,_0x37bc55){return client['request'](_0x22d24f,_0x21ec94)[_0x542d('0xc')](function(_0x324067){logger['info'](_0x542d('0xd'),_0x3b99af,_0x542d('0xe'));logger[_0x542d('0xf')](_0x542d('0x10'),_0x3b99af,_0x542d('0xe'),JSON['stringify'](_0x324067));if(_0x324067['error']){if(_0x324067[_0x542d('0x11')][_0x542d('0x12')]===0x1f4){logger[_0x542d('0x11')]('AnalyticExtractedReport,\x20%s,\x20%s',_0x3b99af,_0x324067['error']['message']);return _0x37bc55(_0x324067[_0x542d('0x11')][_0x542d('0x13')]);}logger[_0x542d('0x11')](_0x542d('0xd'),_0x3b99af,_0x324067[_0x542d('0x11')][_0x542d('0x13')]);return _0x49a8a4(_0x324067[_0x542d('0x11')]['message']);}else{logger[_0x542d('0x14')](_0x542d('0xd'),_0x3b99af,'request\x20sent');_0x49a8a4(_0x324067['result']['message']);}})[_0x542d('0x15')](function(_0x47e0ca){logger[_0x542d('0x11')]('AnalyticExtractedReport,\x20%s,\x20%s',_0x3b99af,_0x47e0ca);_0x37bc55(_0x47e0ca);});});} \ No newline at end of file diff --git a/server/api/analyticExtractedReport/index.js b/server/api/analyticExtractedReport/index.js index a025836..f6c36f8 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 _0x0dad=['/:id/download','post','create','put','update','delete','exports','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','./analyticExtractedReport.controller','get','/:id','isAuthenticated','show'];(function(_0x29438d,_0x133fad){var _0x44f512=function(_0x58eeb0){while(--_0x58eeb0){_0x29438d['push'](_0x29438d['shift']());}};_0x44f512(++_0x133fad);}(_0x0dad,0xbb));var _0xd0da=function(_0x57cc22,_0x2d351f){_0x57cc22=_0x57cc22-0x0;var _0x6f7bdc=_0x0dad[_0x57cc22];return _0x6f7bdc;};'use strict';var multer=require(_0xd0da('0x0'));var util=require(_0xd0da('0x1'));var path=require(_0xd0da('0x2'));var timeout=require(_0xd0da('0x3'));var express=require(_0xd0da('0x4'));var router=express['Router']();var fs_extra=require(_0xd0da('0x5'));var auth=require(_0xd0da('0x6'));var interaction=require(_0xd0da('0x7'));var config=require('../../config/environment');var controller=require(_0xd0da('0x8'));router[_0xd0da('0x9')]('/',auth['isAuthenticated'](),controller['index']);router[_0xd0da('0x9')](_0xd0da('0xa'),auth[_0xd0da('0xb')](),controller[_0xd0da('0xc')]);router[_0xd0da('0x9')](_0xd0da('0xd'),auth[_0xd0da('0xb')](),controller['download']);router[_0xd0da('0xe')]('/',auth[_0xd0da('0xb')](),controller[_0xd0da('0xf')]);router[_0xd0da('0x10')]('/:id',auth[_0xd0da('0xb')](),controller[_0xd0da('0x11')]);router[_0xd0da('0x12')]('/:id',auth[_0xd0da('0xb')](),controller['destroy']);module[_0xd0da('0x13')]=router; \ No newline at end of file +var _0x89d4=['put','update','delete','destroy','exports','multer','util','path','express','Router','fs-extra','../../components/interaction/service','../../config/environment','get','index','/:id','isAuthenticated','show','download','post','create'];(function(_0x4fb6f0,_0x3b1deb){var _0x2a0b2a=function(_0x4335c8){while(--_0x4335c8){_0x4fb6f0['push'](_0x4fb6f0['shift']());}};_0x2a0b2a(++_0x3b1deb);}(_0x89d4,0x1be));var _0x489d=function(_0x2d0d9f,_0x22c0d8){_0x2d0d9f=_0x2d0d9f-0x0;var _0x30243d=_0x89d4[_0x2d0d9f];return _0x30243d;};'use strict';var multer=require(_0x489d('0x0'));var util=require(_0x489d('0x1'));var path=require(_0x489d('0x2'));var timeout=require('connect-timeout');var express=require(_0x489d('0x3'));var router=express[_0x489d('0x4')]();var fs_extra=require(_0x489d('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x489d('0x6'));var config=require(_0x489d('0x7'));var controller=require('./analyticExtractedReport.controller');router[_0x489d('0x8')]('/',auth['isAuthenticated'](),controller[_0x489d('0x9')]);router[_0x489d('0x8')](_0x489d('0xa'),auth[_0x489d('0xb')](),controller[_0x489d('0xc')]);router[_0x489d('0x8')]('/:id/download',auth['isAuthenticated'](),controller[_0x489d('0xd')]);router[_0x489d('0xe')]('/',auth[_0x489d('0xb')](),controller[_0x489d('0xf')]);router[_0x489d('0x10')](_0x489d('0xa'),auth[_0x489d('0xb')](),controller[_0x489d('0x11')]);router[_0x489d('0x12')]('/:id',auth[_0x489d('0xb')](),controller[_0x489d('0x13')]);module[_0x489d('0x14')]=router; \ No newline at end of file diff --git a/server/api/analyticFieldReport/analyticFieldReport.attributes.js b/server/api/analyticFieldReport/analyticFieldReport.attributes.js index a5c3616..f31bace 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 _0xac66=['TEXT','STRING','BOOLEAN','sequelize'];(function(_0x517845,_0x286435){var _0x26b15e=function(_0x9d63fb){while(--_0x9d63fb){_0x517845['push'](_0x517845['shift']());}};_0x26b15e(++_0x286435);}(_0xac66,0xfb));var _0x6ac6=function(_0x2e1654,_0x504fe0){_0x2e1654=_0x2e1654-0x0;var _0x48fa55=_0xac66[_0x2e1654];return _0x48fa55;};'use strict';var Sequelize=require(_0x6ac6('0x0'));module['exports']={'field':{'type':Sequelize[_0x6ac6('0x1')]},'alias':{'type':Sequelize['STRING']},'function':{'type':Sequelize[_0x6ac6('0x2')]},'format':{'type':Sequelize[_0x6ac6('0x2')]},'groupBy':{'type':Sequelize[_0x6ac6('0x3')],'defaultValue':![]},'orderBy':{'type':Sequelize[_0x6ac6('0x2')]},'custom':{'type':Sequelize['BOOLEAN'],'defaultValue':![]}}; \ No newline at end of file +var _0x2fdb=['sequelize','exports','TEXT','STRING','BOOLEAN'];(function(_0x15282b,_0x11778e){var _0x352f7b=function(_0x50aed3){while(--_0x50aed3){_0x15282b['push'](_0x15282b['shift']());}};_0x352f7b(++_0x11778e);}(_0x2fdb,0x1db));var _0xb2fd=function(_0x25e44f,_0x57fcb9){_0x25e44f=_0x25e44f-0x0;var _0x24e895=_0x2fdb[_0x25e44f];return _0x24e895;};'use strict';var Sequelize=require(_0xb2fd('0x0'));module[_0xb2fd('0x1')]={'field':{'type':Sequelize[_0xb2fd('0x2')]},'alias':{'type':Sequelize[_0xb2fd('0x3')]},'function':{'type':Sequelize[_0xb2fd('0x3')]},'format':{'type':Sequelize[_0xb2fd('0x3')]},'groupBy':{'type':Sequelize[_0xb2fd('0x4')],'defaultValue':![]},'orderBy':{'type':Sequelize[_0xb2fd('0x3')]},'custom':{'type':Sequelize[_0xb2fd('0x4')],'defaultValue':![]}}; \ No newline at end of file diff --git a/server/api/analyticFieldReport/analyticFieldReport.controller.js b/server/api/analyticFieldReport/analyticFieldReport.controller.js index 3ab1857..544d8ba 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 _0xbfec=['VIRTUAL','options','include','findAll','rows','catch','show','params','length','includeAll','create','body','bulkCreate','find','bulkDestroy','ids','AnalyticCustomReport','sequelize','transaction','CustomReportId','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','to-csv','ejs','fs-extra','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','offset','undefined','limit','count','Content-Range','apply','reject','save','update','then','destroy','end','error','stack','name','send','index','map','AnalyticFieldReport','rawAttributes','fieldName','type','key','model','keys','query','filters','intersection','attributes','fields','hasOwnProperty','sort','pick','filter','where','merge'];(function(_0x4ae625,_0xf396d0){var _0x31accf=function(_0x3ded6b){while(--_0x3ded6b){_0x4ae625['push'](_0x4ae625['shift']());}};_0x31accf(++_0xf396d0);}(_0xbfec,0x164));var _0xcbfe=function(_0x3c4b9f,_0x547897){_0x3c4b9f=_0x3c4b9f-0x0;var _0x585ec6=_0xbfec[_0x3c4b9f];return _0x585ec6;};'use strict';var emlformat=require(_0xcbfe('0x0'));var rimraf=require(_0xcbfe('0x1'));var zipdir=require(_0xcbfe('0x2'));var jsonpatch=require(_0xcbfe('0x3'));var rp=require(_0xcbfe('0x4'));var moment=require(_0xcbfe('0x5'));var BPromise=require(_0xcbfe('0x6'));var Mustache=require(_0xcbfe('0x7'));var util=require(_0xcbfe('0x8'));var path=require('path');var sox=require('sox');var csv=require(_0xcbfe('0x9'));var ejs=require(_0xcbfe('0xa'));var fs=require('fs');var fs_extra=require(_0xcbfe('0xb'));var _=require('lodash');var squel=require('squel');var crypto=require(_0xcbfe('0xc'));var jsforce=require(_0xcbfe('0xd'));var deskjs=require(_0xcbfe('0xe'));var toCsv=require(_0xcbfe('0x9'));var querystring=require(_0xcbfe('0xf'));var Papa=require(_0xcbfe('0x10'));var Redis=require(_0xcbfe('0x11'));var authService=require(_0xcbfe('0x12'));var qs=require(_0xcbfe('0x13'));var as=require(_0xcbfe('0x14'));var hardwareService=require(_0xcbfe('0x15'));var logger=require('../../config/logger')(_0xcbfe('0x16'));var utils=require(_0xcbfe('0x17'));var config=require(_0xcbfe('0x18'));var licenseUtil=require(_0xcbfe('0x19'));var db=require(_0xcbfe('0x1a'))['db'];function respondWithStatusCode(_0x4f6d52,_0x5853e3){_0x5853e3=_0x5853e3||0xcc;return function(_0x2f725e){if(_0x2f725e){return _0x4f6d52['sendStatus'](_0x5853e3);}return _0x4f6d52[_0xcbfe('0x1b')](_0x5853e3)['end']();};}function respondWithResult(_0x3233bb,_0x297f6c){_0x297f6c=_0x297f6c||0xc8;return function(_0x4dcfa0){if(_0x4dcfa0){return _0x3233bb[_0xcbfe('0x1b')](_0x297f6c)['json'](_0x4dcfa0);}};}function respondWithFilteredResult(_0x5cbeb0,_0x4e5837){return function(_0x2f722d){if(_0x2f722d){var _0x436acc=typeof _0x4e5837[_0xcbfe('0x1c')]===_0xcbfe('0x1d')&&typeof _0x4e5837[_0xcbfe('0x1e')]===_0xcbfe('0x1d');var _0x18ade8=_0x2f722d[_0xcbfe('0x1f')];var _0xee9ec2=_0x436acc?0x0:_0x4e5837[_0xcbfe('0x1c')];var _0x248c30=_0x436acc?_0x2f722d[_0xcbfe('0x1f')]:_0x4e5837[_0xcbfe('0x1c')]+_0x4e5837[_0xcbfe('0x1e')];var _0x273371;if(_0x248c30>=_0x18ade8){_0x248c30=_0x18ade8;_0x273371=0xc8;}else{_0x273371=0xce;}_0x5cbeb0[_0xcbfe('0x1b')](_0x273371);return _0x5cbeb0['set'](_0xcbfe('0x20'),_0xee9ec2+'-'+_0x248c30+'/'+_0x18ade8)['json'](_0x2f722d);}return null;};}function patchUpdates(_0x3f3a0e){return function(_0x49d512){try{jsonpatch[_0xcbfe('0x21')](_0x49d512,_0x3f3a0e,!![]);}catch(_0x5dfff7){return BPromise[_0xcbfe('0x22')](_0x5dfff7);}return _0x49d512[_0xcbfe('0x23')]();};}function saveUpdates(_0x204a15,_0x5155e0){return function(_0x32a134){if(_0x32a134){return _0x32a134[_0xcbfe('0x24')](_0x204a15)[_0xcbfe('0x25')](function(_0x2cb7b5){return _0x2cb7b5;});}return null;};}function removeEntity(_0x14c593,_0x2c4fec){return function(_0x3162b7){if(_0x3162b7){return _0x3162b7[_0xcbfe('0x26')]()[_0xcbfe('0x25')](function(){_0x14c593[_0xcbfe('0x1b')](0xcc)[_0xcbfe('0x27')]();});}};}function handleEntityNotFound(_0x40fd93,_0x5d1166){return function(_0xd628fc){if(!_0xd628fc){_0x40fd93['sendStatus'](0x194);}return _0xd628fc;};}function handleError(_0x22a7eb,_0x11c0c6){_0x11c0c6=_0x11c0c6||0x1f4;return function(_0x190a32){logger[_0xcbfe('0x28')](_0x190a32[_0xcbfe('0x29')]);if(_0x190a32[_0xcbfe('0x2a')]){delete _0x190a32[_0xcbfe('0x2a')];}_0x22a7eb['status'](_0x11c0c6)[_0xcbfe('0x2b')](_0x190a32);};}exports[_0xcbfe('0x2c')]=function(_0xf397c7,_0x558626){var _0x42ce5d={},_0x39f11c={},_0x4bd6b2={'count':0x0,'rows':[]};var _0x5ea3c1=_[_0xcbfe('0x2d')](db[_0xcbfe('0x2e')][_0xcbfe('0x2f')],function(_0x2090d9){return{'name':_0x2090d9[_0xcbfe('0x30')],'type':_0x2090d9[_0xcbfe('0x31')][_0xcbfe('0x32')]};});_0x39f11c[_0xcbfe('0x33')]=_['map'](_0x5ea3c1,_0xcbfe('0x2a'));_0x39f11c['query']=_[_0xcbfe('0x34')](_0xf397c7[_0xcbfe('0x35')]);_0x39f11c[_0xcbfe('0x36')]=_[_0xcbfe('0x37')](_0x39f11c['model'],_0x39f11c[_0xcbfe('0x35')]);_0x42ce5d[_0xcbfe('0x38')]=_[_0xcbfe('0x37')](_0x39f11c[_0xcbfe('0x33')],qs['fields'](_0xf397c7[_0xcbfe('0x35')][_0xcbfe('0x39')]));_0x42ce5d[_0xcbfe('0x38')]=_0x42ce5d[_0xcbfe('0x38')]['length']?_0x42ce5d[_0xcbfe('0x38')]:_0x39f11c[_0xcbfe('0x33')];if(!_0xf397c7[_0xcbfe('0x35')][_0xcbfe('0x3a')]('nolimit')){_0x42ce5d['limit']=qs[_0xcbfe('0x1e')](_0xf397c7[_0xcbfe('0x35')][_0xcbfe('0x1e')]);_0x42ce5d[_0xcbfe('0x1c')]=qs[_0xcbfe('0x1c')](_0xf397c7['query'][_0xcbfe('0x1c')]);}_0x42ce5d['order']=qs[_0xcbfe('0x3b')](_0xf397c7[_0xcbfe('0x35')][_0xcbfe('0x3b')]);_0x42ce5d['where']=qs[_0xcbfe('0x36')](_[_0xcbfe('0x3c')](_0xf397c7['query'],_0x39f11c[_0xcbfe('0x36')]),_0x5ea3c1);if(_0xf397c7[_0xcbfe('0x35')][_0xcbfe('0x3d')]){_0x42ce5d[_0xcbfe('0x3e')]=_[_0xcbfe('0x3f')](_0x42ce5d[_0xcbfe('0x3e')],{'$or':_[_0xcbfe('0x2d')](_0x5ea3c1,function(_0x2ee385){if(_0x2ee385['type']!==_0xcbfe('0x40')){var _0x3cede8={};_0x3cede8[_0x2ee385['name']]={'$like':'%'+_0xf397c7['query'][_0xcbfe('0x3d')]+'%'};return _0x3cede8;}})});}_0x42ce5d=_[_0xcbfe('0x3f')]({},_0x42ce5d,_0xf397c7[_0xcbfe('0x41')]);var _0x4c66c8={'where':_0x42ce5d[_0xcbfe('0x3e')]};return db[_0xcbfe('0x2e')][_0xcbfe('0x1f')](_0x4c66c8)[_0xcbfe('0x25')](function(_0x744392){_0x4bd6b2[_0xcbfe('0x1f')]=_0x744392;if(_0xf397c7['query']['includeAll']){_0x42ce5d[_0xcbfe('0x42')]=[{'all':!![]}];}return db[_0xcbfe('0x2e')][_0xcbfe('0x43')](_0x42ce5d);})['then'](function(_0xda3697){_0x4bd6b2[_0xcbfe('0x44')]=_0xda3697;return _0x4bd6b2;})[_0xcbfe('0x25')](respondWithFilteredResult(_0x558626,_0x42ce5d))[_0xcbfe('0x45')](handleError(_0x558626,null));};exports[_0xcbfe('0x46')]=function(_0x4480cb,_0x2fc769){var _0x37012c={'raw':![],'where':{'id':_0x4480cb[_0xcbfe('0x47')]['id']}},_0x559700={};_0x559700['model']=_['keys'](db['AnalyticFieldReport'][_0xcbfe('0x2f')]);_0x559700[_0xcbfe('0x35')]=_['keys'](_0x4480cb[_0xcbfe('0x35')]);_0x559700[_0xcbfe('0x36')]=_[_0xcbfe('0x37')](_0x559700[_0xcbfe('0x33')],_0x559700[_0xcbfe('0x35')]);_0x37012c[_0xcbfe('0x38')]=_[_0xcbfe('0x37')](_0x559700[_0xcbfe('0x33')],qs[_0xcbfe('0x39')](_0x4480cb['query']['fields']));_0x37012c[_0xcbfe('0x38')]=_0x37012c[_0xcbfe('0x38')][_0xcbfe('0x48')]?_0x37012c[_0xcbfe('0x38')]:_0x559700[_0xcbfe('0x33')];if(_0x4480cb[_0xcbfe('0x35')][_0xcbfe('0x49')]){_0x37012c[_0xcbfe('0x42')]=[{'all':!![]}];}_0x37012c=_[_0xcbfe('0x3f')]({},_0x37012c,_0x4480cb[_0xcbfe('0x41')]);return db[_0xcbfe('0x2e')]['find'](_0x37012c)[_0xcbfe('0x25')](handleEntityNotFound(_0x2fc769,null))[_0xcbfe('0x25')](respondWithResult(_0x2fc769,null))[_0xcbfe('0x45')](handleError(_0x2fc769,null));};exports[_0xcbfe('0x4a')]=function(_0x2091e3,_0x2f0110){return db['AnalyticFieldReport'][_0xcbfe('0x4a')](_0x2091e3[_0xcbfe('0x4b')],{})['then'](respondWithResult(_0x2f0110,0xc9))[_0xcbfe('0x45')](handleError(_0x2f0110,null));};exports[_0xcbfe('0x4c')]=function(_0x4362b3,_0x1fd9e7){return db[_0xcbfe('0x2e')][_0xcbfe('0x4c')](_0x4362b3[_0xcbfe('0x4b')],{'raw':![],'individualHooks':!![]})[_0xcbfe('0x25')](respondWithResult(_0x1fd9e7,0xc9))[_0xcbfe('0x45')](handleError(_0x1fd9e7,null));};exports[_0xcbfe('0x24')]=function(_0x49a496,_0x15dce9){if(_0x49a496[_0xcbfe('0x4b')]['id']){delete _0x49a496[_0xcbfe('0x4b')]['id'];}return db[_0xcbfe('0x2e')][_0xcbfe('0x4d')]({'where':{'id':_0x49a496['params']['id']}})[_0xcbfe('0x25')](handleEntityNotFound(_0x15dce9,null))[_0xcbfe('0x25')](saveUpdates(_0x49a496['body'],null))[_0xcbfe('0x25')](respondWithResult(_0x15dce9,null))[_0xcbfe('0x45')](handleError(_0x15dce9,null));};exports[_0xcbfe('0x26')]=function(_0x3ade77,_0x4a57a3){return db[_0xcbfe('0x2e')][_0xcbfe('0x4d')]({'where':{'id':_0x3ade77[_0xcbfe('0x47')]['id']}})['then'](handleEntityNotFound(_0x4a57a3,null))[_0xcbfe('0x25')](removeEntity(_0x4a57a3,null))['catch'](handleError(_0x4a57a3,null));};exports[_0xcbfe('0x4e')]=function(_0x2d775a,_0x4f235e){return db['AnalyticFieldReport']['destroy']({'where':{'id':_0x2d775a[_0xcbfe('0x35')][_0xcbfe('0x4f')]||[]},'raw':![],'individualHooks':!![]})[_0xcbfe('0x25')](respondWithResult(_0x4f235e,0xcc))['catch'](handleError(_0x4f235e,null));};exports['addFields']=function(_0x56e75d,_0x31e4f5,_0xbcc8fc){return db[_0xcbfe('0x50')]['findOne']({'where':{'id':_0x56e75d[_0xcbfe('0x47')]['id']}})[_0xcbfe('0x25')](handleEntityNotFound(_0x31e4f5,null))['then'](function(_0x3e4a21){if(_0x3e4a21){return db[_0xcbfe('0x51')][_0xcbfe('0x52')](function(_0x56a190){return db[_0xcbfe('0x2e')]['destroy']({'where':{'CustomReportId':_0x56e75d[_0xcbfe('0x47')]['id']},'transaction':_0x56a190})['then'](function(_0x3d46e6){var _0x977638=_[_0xcbfe('0x2d')](_0x56e75d['body'],function(_0x3b2a49){delete _0x3b2a49['id'];_0x3b2a49[_0xcbfe('0x53')]=_0x56e75d[_0xcbfe('0x47')]['id'];return _0x3b2a49;});return db['AnalyticFieldReport']['bulkCreate'](_0x977638,{'transaction':_0x56a190});});})[_0xcbfe('0x25')](function(){return db[_0xcbfe('0x2e')][_0xcbfe('0x43')]({'where':{'CustomReportId':_0x56e75d[_0xcbfe('0x47')]['id']}});});}})[_0xcbfe('0x25')](respondWithResult(_0x31e4f5,null))[_0xcbfe('0x45')](handleError(_0x31e4f5,null));}; \ No newline at end of file +var _0x6526=['AnalyticFieldReport','fieldName','type','model','query','keys','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','pick','filter','where','merge','VIRTUAL','options','include','findAll','catch','show','params','rawAttributes','includeAll','find','create','body','bulkCreate','bulkDestroy','addFields','findOne','sequelize','transaction','CustomReportId','eml-format','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','offset','limit','undefined','count','set','Content-Range','json','apply','reject','update','destroy','then','stack','name','index','map'];(function(_0x3e1891,_0x4ab57c){var _0x320576=function(_0x3bc537){while(--_0x3bc537){_0x3e1891['push'](_0x3e1891['shift']());}};_0x320576(++_0x4ab57c);}(_0x6526,0x172));var _0x6652=function(_0x2fee96,_0x2f735d){_0x2fee96=_0x2fee96-0x0;var _0x2e6ad1=_0x6526[_0x2fee96];return _0x2e6ad1;};'use strict';var emlformat=require(_0x6652('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x6652('0x1'));var jsonpatch=require(_0x6652('0x2'));var rp=require(_0x6652('0x3'));var moment=require(_0x6652('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x6652('0x5'));var util=require(_0x6652('0x6'));var path=require(_0x6652('0x7'));var sox=require(_0x6652('0x8'));var csv=require(_0x6652('0x9'));var ejs=require(_0x6652('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x6652('0xb'));var squel=require(_0x6652('0xc'));var crypto=require(_0x6652('0xd'));var jsforce=require(_0x6652('0xe'));var deskjs=require(_0x6652('0xf'));var toCsv=require(_0x6652('0x9'));var querystring=require(_0x6652('0x10'));var Papa=require('papaparse');var Redis=require(_0x6652('0x11'));var authService=require(_0x6652('0x12'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x6652('0x13'));var logger=require(_0x6652('0x14'))(_0x6652('0x15'));var utils=require(_0x6652('0x16'));var config=require(_0x6652('0x17'));var licenseUtil=require(_0x6652('0x18'));var db=require(_0x6652('0x19'))['db'];function respondWithStatusCode(_0x3fb487,_0x32c581){_0x32c581=_0x32c581||0xcc;return function(_0x3380b1){if(_0x3380b1){return _0x3fb487[_0x6652('0x1a')](_0x32c581);}return _0x3fb487[_0x6652('0x1b')](_0x32c581)[_0x6652('0x1c')]();};}function respondWithResult(_0x2b8ab8,_0x3c33f6){_0x3c33f6=_0x3c33f6||0xc8;return function(_0x193147){if(_0x193147){return _0x2b8ab8[_0x6652('0x1b')](_0x3c33f6)['json'](_0x193147);}};}function respondWithFilteredResult(_0x159a44,_0x42a6c6){return function(_0x4bd73e){if(_0x4bd73e){var _0x4f781a=typeof _0x42a6c6[_0x6652('0x1d')]==='undefined'&&typeof _0x42a6c6[_0x6652('0x1e')]===_0x6652('0x1f');var _0x464c77=_0x4bd73e['count'];var _0x557e07=_0x4f781a?0x0:_0x42a6c6[_0x6652('0x1d')];var _0x8190e9=_0x4f781a?_0x4bd73e[_0x6652('0x20')]:_0x42a6c6[_0x6652('0x1d')]+_0x42a6c6['limit'];var _0x363c97;if(_0x8190e9>=_0x464c77){_0x8190e9=_0x464c77;_0x363c97=0xc8;}else{_0x363c97=0xce;}_0x159a44[_0x6652('0x1b')](_0x363c97);return _0x159a44[_0x6652('0x21')](_0x6652('0x22'),_0x557e07+'-'+_0x8190e9+'/'+_0x464c77)[_0x6652('0x23')](_0x4bd73e);}return null;};}function patchUpdates(_0x4b82f5){return function(_0x5f0651){try{jsonpatch[_0x6652('0x24')](_0x5f0651,_0x4b82f5,!![]);}catch(_0x33bc1a){return BPromise[_0x6652('0x25')](_0x33bc1a);}return _0x5f0651['save']();};}function saveUpdates(_0x162ae5,_0x26cbd5){return function(_0x135586){if(_0x135586){return _0x135586[_0x6652('0x26')](_0x162ae5)['then'](function(_0x5d888e){return _0x5d888e;});}return null;};}function removeEntity(_0x1a3359,_0x5e80de){return function(_0x50cf80){if(_0x50cf80){return _0x50cf80[_0x6652('0x27')]()[_0x6652('0x28')](function(){_0x1a3359[_0x6652('0x1b')](0xcc)[_0x6652('0x1c')]();});}};}function handleEntityNotFound(_0x578d3b,_0x3be08c){return function(_0x3e52bb){if(!_0x3e52bb){_0x578d3b[_0x6652('0x1a')](0x194);}return _0x3e52bb;};}function handleError(_0x52b171,_0x3ed0b4){_0x3ed0b4=_0x3ed0b4||0x1f4;return function(_0x1f0cf8){logger['error'](_0x1f0cf8[_0x6652('0x29')]);if(_0x1f0cf8[_0x6652('0x2a')]){delete _0x1f0cf8[_0x6652('0x2a')];}_0x52b171['status'](_0x3ed0b4)['send'](_0x1f0cf8);};}exports[_0x6652('0x2b')]=function(_0x29e223,_0x277f56){var _0x1f2890={},_0x34b426={},_0x1d9fb9={'count':0x0,'rows':[]};var _0x2a4ba7=_[_0x6652('0x2c')](db[_0x6652('0x2d')]['rawAttributes'],function(_0x4d31c6){return{'name':_0x4d31c6[_0x6652('0x2e')],'type':_0x4d31c6[_0x6652('0x2f')]['key']};});_0x34b426[_0x6652('0x30')]=_[_0x6652('0x2c')](_0x2a4ba7,_0x6652('0x2a'));_0x34b426[_0x6652('0x31')]=_[_0x6652('0x32')](_0x29e223['query']);_0x34b426[_0x6652('0x33')]=_['intersection'](_0x34b426[_0x6652('0x30')],_0x34b426['query']);_0x1f2890[_0x6652('0x34')]=_[_0x6652('0x35')](_0x34b426[_0x6652('0x30')],qs[_0x6652('0x36')](_0x29e223[_0x6652('0x31')][_0x6652('0x36')]));_0x1f2890['attributes']=_0x1f2890['attributes'][_0x6652('0x37')]?_0x1f2890[_0x6652('0x34')]:_0x34b426[_0x6652('0x30')];if(!_0x29e223[_0x6652('0x31')][_0x6652('0x38')](_0x6652('0x39'))){_0x1f2890[_0x6652('0x1e')]=qs[_0x6652('0x1e')](_0x29e223['query'][_0x6652('0x1e')]);_0x1f2890[_0x6652('0x1d')]=qs[_0x6652('0x1d')](_0x29e223[_0x6652('0x31')][_0x6652('0x1d')]);}_0x1f2890[_0x6652('0x3a')]=qs[_0x6652('0x3b')](_0x29e223['query'][_0x6652('0x3b')]);_0x1f2890['where']=qs['filters'](_[_0x6652('0x3c')](_0x29e223[_0x6652('0x31')],_0x34b426['filters']),_0x2a4ba7);if(_0x29e223['query'][_0x6652('0x3d')]){_0x1f2890[_0x6652('0x3e')]=_[_0x6652('0x3f')](_0x1f2890[_0x6652('0x3e')],{'$or':_[_0x6652('0x2c')](_0x2a4ba7,function(_0x49b152){if(_0x49b152[_0x6652('0x2f')]!==_0x6652('0x40')){var _0x4ce446={};_0x4ce446[_0x49b152[_0x6652('0x2a')]]={'$like':'%'+_0x29e223['query']['filter']+'%'};return _0x4ce446;}})});}_0x1f2890=_[_0x6652('0x3f')]({},_0x1f2890,_0x29e223[_0x6652('0x41')]);var _0x378482={'where':_0x1f2890[_0x6652('0x3e')]};return db[_0x6652('0x2d')][_0x6652('0x20')](_0x378482)[_0x6652('0x28')](function(_0x5e621d){_0x1d9fb9[_0x6652('0x20')]=_0x5e621d;if(_0x29e223[_0x6652('0x31')]['includeAll']){_0x1f2890[_0x6652('0x42')]=[{'all':!![]}];}return db[_0x6652('0x2d')][_0x6652('0x43')](_0x1f2890);})[_0x6652('0x28')](function(_0x4f4972){_0x1d9fb9['rows']=_0x4f4972;return _0x1d9fb9;})['then'](respondWithFilteredResult(_0x277f56,_0x1f2890))[_0x6652('0x44')](handleError(_0x277f56,null));};exports[_0x6652('0x45')]=function(_0x1b347e,_0x210750){var _0x210875={'raw':![],'where':{'id':_0x1b347e[_0x6652('0x46')]['id']}},_0x32d723={};_0x32d723[_0x6652('0x30')]=_[_0x6652('0x32')](db[_0x6652('0x2d')][_0x6652('0x47')]);_0x32d723['query']=_[_0x6652('0x32')](_0x1b347e['query']);_0x32d723[_0x6652('0x33')]=_['intersection'](_0x32d723[_0x6652('0x30')],_0x32d723[_0x6652('0x31')]);_0x210875[_0x6652('0x34')]=_[_0x6652('0x35')](_0x32d723[_0x6652('0x30')],qs[_0x6652('0x36')](_0x1b347e['query']['fields']));_0x210875[_0x6652('0x34')]=_0x210875['attributes'][_0x6652('0x37')]?_0x210875[_0x6652('0x34')]:_0x32d723[_0x6652('0x30')];if(_0x1b347e[_0x6652('0x31')][_0x6652('0x48')]){_0x210875[_0x6652('0x42')]=[{'all':!![]}];}_0x210875=_[_0x6652('0x3f')]({},_0x210875,_0x1b347e['options']);return db[_0x6652('0x2d')][_0x6652('0x49')](_0x210875)[_0x6652('0x28')](handleEntityNotFound(_0x210750,null))[_0x6652('0x28')](respondWithResult(_0x210750,null))[_0x6652('0x44')](handleError(_0x210750,null));};exports[_0x6652('0x4a')]=function(_0x5667de,_0x391313){return db[_0x6652('0x2d')][_0x6652('0x4a')](_0x5667de[_0x6652('0x4b')],{})[_0x6652('0x28')](respondWithResult(_0x391313,0xc9))['catch'](handleError(_0x391313,null));};exports[_0x6652('0x4c')]=function(_0x39bde0,_0x17e3d5){return db[_0x6652('0x2d')][_0x6652('0x4c')](_0x39bde0[_0x6652('0x4b')],{'raw':![],'individualHooks':!![]})[_0x6652('0x28')](respondWithResult(_0x17e3d5,0xc9))[_0x6652('0x44')](handleError(_0x17e3d5,null));};exports[_0x6652('0x26')]=function(_0x382ea6,_0x342ce9){if(_0x382ea6[_0x6652('0x4b')]['id']){delete _0x382ea6['body']['id'];}return db[_0x6652('0x2d')][_0x6652('0x49')]({'where':{'id':_0x382ea6['params']['id']}})[_0x6652('0x28')](handleEntityNotFound(_0x342ce9,null))[_0x6652('0x28')](saveUpdates(_0x382ea6[_0x6652('0x4b')],null))[_0x6652('0x28')](respondWithResult(_0x342ce9,null))[_0x6652('0x44')](handleError(_0x342ce9,null));};exports[_0x6652('0x27')]=function(_0x117722,_0x197256){return db[_0x6652('0x2d')][_0x6652('0x49')]({'where':{'id':_0x117722['params']['id']}})[_0x6652('0x28')](handleEntityNotFound(_0x197256,null))['then'](removeEntity(_0x197256,null))['catch'](handleError(_0x197256,null));};exports[_0x6652('0x4d')]=function(_0x448d3d,_0x4ba85){return db['AnalyticFieldReport']['destroy']({'where':{'id':_0x448d3d['query']['ids']||[]},'raw':![],'individualHooks':!![]})[_0x6652('0x28')](respondWithResult(_0x4ba85,0xcc))['catch'](handleError(_0x4ba85,null));};exports[_0x6652('0x4e')]=function(_0x19c6ae,_0x452a0a,_0x5e33f5){return db['AnalyticCustomReport'][_0x6652('0x4f')]({'where':{'id':_0x19c6ae['params']['id']}})[_0x6652('0x28')](handleEntityNotFound(_0x452a0a,null))[_0x6652('0x28')](function(_0x222a70){if(_0x222a70){return db[_0x6652('0x50')][_0x6652('0x51')](function(_0x1834ca){return db[_0x6652('0x2d')][_0x6652('0x27')]({'where':{'CustomReportId':_0x19c6ae[_0x6652('0x46')]['id']},'transaction':_0x1834ca})['then'](function(_0x15f52e){var _0x150a77=_['map'](_0x19c6ae[_0x6652('0x4b')],function(_0x2c3a50){delete _0x2c3a50['id'];_0x2c3a50[_0x6652('0x52')]=_0x19c6ae[_0x6652('0x46')]['id'];return _0x2c3a50;});return db[_0x6652('0x2d')][_0x6652('0x4c')](_0x150a77,{'transaction':_0x1834ca});});})[_0x6652('0x28')](function(){return db[_0x6652('0x2d')]['findAll']({'where':{'CustomReportId':_0x19c6ae[_0x6652('0x46')]['id']}});});}})[_0x6652('0x28')](respondWithResult(_0x452a0a,null))[_0x6652('0x44')](handleError(_0x452a0a,null));}; \ No newline at end of file diff --git a/server/api/analyticFieldReport/analyticFieldReport.model.js b/server/api/analyticFieldReport/analyticFieldReport.model.js index c9b678d..8ae0deb 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 _0xb181=['exports','AnalyticFieldReport','analytics_report_fields','lodash','util','../../config/logger','moment','request-promise','path','../../config/environment','./analyticFieldReport.attributes'];(function(_0x2d740c,_0x7771fe){var _0x46d94f=function(_0x1334e1){while(--_0x1334e1){_0x2d740c['push'](_0x2d740c['shift']());}};_0x46d94f(++_0x7771fe);}(_0xb181,0x142));var _0x1b18=function(_0x234cb4,_0x128512){_0x234cb4=_0x234cb4-0x0;var _0x29e00d=_0xb181[_0x234cb4];return _0x29e00d;};'use strict';var _=require(_0x1b18('0x0'));var util=require(_0x1b18('0x1'));var logger=require(_0x1b18('0x2'))('api');var moment=require(_0x1b18('0x3'));var BPromise=require('bluebird');var rp=require(_0x1b18('0x4'));var fs=require('fs');var path=require(_0x1b18('0x5'));var rimraf=require('rimraf');var config=require(_0x1b18('0x6'));var attributes=require(_0x1b18('0x7'));module[_0x1b18('0x8')]=function(_0x349cb8,_0x435474){return _0x349cb8['define'](_0x1b18('0x9'),attributes,{'tableName':_0x1b18('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x1fdc=['define','analytics_report_fields','lodash','../../config/logger','moment','bluebird','request-promise','path','exports'];(function(_0x132997,_0x5ce08d){var _0x241cd7=function(_0x1ee8db){while(--_0x1ee8db){_0x132997['push'](_0x132997['shift']());}};_0x241cd7(++_0x5ce08d);}(_0x1fdc,0x89));var _0xc1fd=function(_0x320b8e,_0x1da3fe){_0x320b8e=_0x320b8e-0x0;var _0x55a10a=_0x1fdc[_0x320b8e];return _0x55a10a;};'use strict';var _=require(_0xc1fd('0x0'));var util=require('util');var logger=require(_0xc1fd('0x1'))('api');var moment=require(_0xc1fd('0x2'));var BPromise=require(_0xc1fd('0x3'));var rp=require(_0xc1fd('0x4'));var fs=require('fs');var path=require(_0xc1fd('0x5'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require('./analyticFieldReport.attributes');module[_0xc1fd('0x6')]=function(_0x46e7ef,_0x2fb674){return _0x46e7ef[_0xc1fd('0x7')]('AnalyticFieldReport',attributes,{'tableName':_0xc1fd('0x8'),'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 fc57dc2..e7d3204 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 _0x7240=['request\x20sent','stringify','error','code','message','AnalyticFieldReport,\x20%s,\x20%s','result','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/logger','jayson/promise','client','http','then','info','debug','AnalyticFieldReport,\x20%s,\x20%s,\x20%s'];(function(_0x3b197c,_0x1a05e7){var _0x314d77=function(_0x48840){while(--_0x48840){_0x3b197c['push'](_0x3b197c['shift']());}};_0x314d77(++_0x1a05e7);}(_0x7240,0xce));var _0x0724=function(_0x1477ef,_0x54a5d6){_0x1477ef=_0x1477ef-0x0;var _0x164acd=_0x7240[_0x1477ef];return _0x164acd;};'use strict';var _=require(_0x0724('0x0'));var util=require(_0x0724('0x1'));var moment=require(_0x0724('0x2'));var BPromise=require('bluebird');var rs=require(_0x0724('0x3'));var fs=require('fs');var Redis=require(_0x0724('0x4'));var db=require(_0x0724('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x0724('0x6'))('rpc');var config=require('../../config/environment');var jayson=require(_0x0724('0x7'));var client=jayson[_0x0724('0x8')][_0x0724('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x462801,_0x236fda,_0xea1daf){return new BPromise(function(_0x276eec,_0x9d1bb4){return client['request'](_0x462801,_0xea1daf)[_0x0724('0xa')](function(_0x47afb9){logger[_0x0724('0xb')]('AnalyticFieldReport,\x20%s,\x20%s',_0x236fda,'request\x20sent');logger[_0x0724('0xc')](_0x0724('0xd'),_0x236fda,_0x0724('0xe'),JSON[_0x0724('0xf')](_0x47afb9));if(_0x47afb9[_0x0724('0x10')]){if(_0x47afb9['error'][_0x0724('0x11')]===0x1f4){logger[_0x0724('0x10')]('AnalyticFieldReport,\x20%s,\x20%s',_0x236fda,_0x47afb9[_0x0724('0x10')][_0x0724('0x12')]);return _0x9d1bb4(_0x47afb9[_0x0724('0x10')][_0x0724('0x12')]);}logger[_0x0724('0x10')](_0x0724('0x13'),_0x236fda,_0x47afb9[_0x0724('0x10')][_0x0724('0x12')]);return _0x276eec(_0x47afb9[_0x0724('0x10')][_0x0724('0x12')]);}else{logger[_0x0724('0xb')]('AnalyticFieldReport,\x20%s,\x20%s',_0x236fda,_0x0724('0xe'));_0x276eec(_0x47afb9[_0x0724('0x14')]['message']);}})[_0x0724('0x15')](function(_0x43d30a){logger[_0x0724('0x10')]('AnalyticFieldReport,\x20%s,\x20%s',_0x236fda,_0x43d30a);_0x9d1bb4(_0x43d30a);});});} \ No newline at end of file +var _0xfaa9=['moment','bluebird','randomstring','rpc','../../config/environment','jayson/promise','client','request','AnalyticFieldReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticFieldReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','catch','util'];(function(_0x2bca28,_0x5a9935){var _0xe6faed=function(_0x1996a0){while(--_0x1996a0){_0x2bca28['push'](_0x2bca28['shift']());}};_0xe6faed(++_0x5a9935);}(_0xfaa9,0xd0));var _0x9faa=function(_0x27766c,_0x5b072c){_0x27766c=_0x27766c-0x0;var _0xe73d04=_0xfaa9[_0x27766c];return _0xe73d04;};'use strict';var _=require('lodash');var util=require(_0x9faa('0x0'));var moment=require(_0x9faa('0x1'));var BPromise=require(_0x9faa('0x2'));var rs=require(_0x9faa('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x9faa('0x4'));var config=require(_0x9faa('0x5'));var jayson=require(_0x9faa('0x6'));var client=jayson[_0x9faa('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0x110edf,_0x40c59d,_0x11c46b){return new BPromise(function(_0x1d8daa,_0x3ab646){return client[_0x9faa('0x8')](_0x110edf,_0x11c46b)['then'](function(_0x830936){logger['info'](_0x9faa('0x9'),_0x40c59d,_0x9faa('0xa'));logger[_0x9faa('0xb')](_0x9faa('0xc'),_0x40c59d,'request\x20sent',JSON[_0x9faa('0xd')](_0x830936));if(_0x830936['error']){if(_0x830936[_0x9faa('0xe')][_0x9faa('0xf')]===0x1f4){logger[_0x9faa('0xe')](_0x9faa('0x9'),_0x40c59d,_0x830936[_0x9faa('0xe')]['message']);return _0x3ab646(_0x830936[_0x9faa('0xe')]['message']);}logger[_0x9faa('0xe')](_0x9faa('0x9'),_0x40c59d,_0x830936['error']['message']);return _0x1d8daa(_0x830936[_0x9faa('0xe')][_0x9faa('0x10')]);}else{logger[_0x9faa('0x11')](_0x9faa('0x9'),_0x40c59d,_0x9faa('0xa'));_0x1d8daa(_0x830936['result']['message']);}})[_0x9faa('0x12')](function(_0x20b181){logger[_0x9faa('0xe')](_0x9faa('0x9'),_0x40c59d,_0x20b181);_0x3ab646(_0x20b181);});});} \ No newline at end of file diff --git a/server/api/analyticFieldReport/index.js b/server/api/analyticFieldReport/index.js index 8e72bf2..a3700d7 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(_0x340332,_0x5f02ac){var _0x4334fc=function(_0x3420cf){while(--_0x3420cf){_0x340332['push'](_0x340332['shift']());}};_0x4334fc(++_0x5f02ac);}(_0xa9e0,0x123));var _0x0a9e=function(_0x6131cd,_0x4c26a1){_0x6131cd=_0x6131cd-0x0;var _0x47e916=_0xa9e0[_0x6131cd];return _0x47e916;};'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(_0x6d2b4d,_0x4da582){var _0x4a6210=function(_0x4e60bc){while(--_0x4e60bc){_0x6d2b4d['push'](_0x6d2b4d['shift']());}};_0x4a6210(++_0x4da582);}(_0xa9e0,0x123));var _0x0a9e=function(_0x3e112d,_0x2bb132){_0x3e112d=_0x3e112d-0x0;var _0x531c31=_0xa9e0[_0x3e112d];return _0x531c31;};'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 58d2d77..a83d58e 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 _0x2d58=['sequelize','exports','STRING'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x2d58,0x186));var _0x82d5=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0x2d58[_0x122ef9];return _0x42fba0;};'use strict';var Sequelize=require(_0x82d5('0x0'));module[_0x82d5('0x1')]={'name':{'type':Sequelize[_0x82d5('0x2')],'allowNull':![],'unique':'name'},'table':{'type':Sequelize[_0x82d5('0x2')]},'metric':{'type':Sequelize['TEXT']},'description':{'type':Sequelize[_0x82d5('0x2')]}}; \ No newline at end of file +var _0x8164=['sequelize','exports','STRING','TEXT'];(function(_0x4d129c,_0x5f1fea){var _0x583e56=function(_0xc71d1d){while(--_0xc71d1d){_0x4d129c['push'](_0x4d129c['shift']());}};_0x583e56(++_0x5f1fea);}(_0x8164,0x170));var _0x4816=function(_0x36fe1e,_0x175199){_0x36fe1e=_0x36fe1e-0x0;var _0x3368ef=_0x8164[_0x36fe1e];return _0x3368ef;};'use strict';var Sequelize=require(_0x4816('0x0'));module[_0x4816('0x1')]={'name':{'type':Sequelize[_0x4816('0x2')],'allowNull':![],'unique':'name'},'table':{'type':Sequelize[_0x4816('0x2')]},'metric':{'type':Sequelize[_0x4816('0x3')]},'description':{'type':Sequelize['STRING']}}; \ No newline at end of file diff --git a/server/api/analyticMetric/analyticMetric.controller.js b/server/api/analyticMetric/analyticMetric.controller.js index 85c5e24..c38cba8 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 _0xd6d6=['includeAll','catch','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','find','userProfileId','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../mysqldb','sendStatus','status','end','json','undefined','limit','offset','count','set','Content-Range','apply','reject','save','update','then','destroy','get','Metrics','error','stack','name','send','index','map','rawAttributes','fieldName','type','key','model','keys','query','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','filters','filter','merge','where','VIRTUAL','options','include','AnalyticMetric','rows','show'];(function(_0xbbd9c1,_0x4461ba){var _0x49fd6d=function(_0x8d0f99){while(--_0x8d0f99){_0xbbd9c1['push'](_0xbbd9c1['shift']());}};_0x49fd6d(++_0x4461ba);}(_0xd6d6,0xbe));var _0x6d6d=function(_0x32c0c4,_0x476747){_0x32c0c4=_0x32c0c4-0x0;var _0x263b02=_0xd6d6[_0x32c0c4];return _0x263b02;};'use strict';var emlformat=require(_0x6d6d('0x0'));var rimraf=require(_0x6d6d('0x1'));var zipdir=require(_0x6d6d('0x2'));var jsonpatch=require(_0x6d6d('0x3'));var rp=require('request-promise');var moment=require(_0x6d6d('0x4'));var BPromise=require(_0x6d6d('0x5'));var Mustache=require(_0x6d6d('0x6'));var util=require(_0x6d6d('0x7'));var path=require(_0x6d6d('0x8'));var sox=require(_0x6d6d('0x9'));var csv=require(_0x6d6d('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x6d6d('0xb'));var _=require(_0x6d6d('0xc'));var squel=require(_0x6d6d('0xd'));var crypto=require(_0x6d6d('0xe'));var jsforce=require(_0x6d6d('0xf'));var deskjs=require(_0x6d6d('0x10'));var toCsv=require(_0x6d6d('0xa'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x6d6d('0x11'));var authService=require(_0x6d6d('0x12'));var qs=require(_0x6d6d('0x13'));var as=require(_0x6d6d('0x14'));var hardwareService=require(_0x6d6d('0x15'));var logger=require('../../config/logger')(_0x6d6d('0x16'));var utils=require(_0x6d6d('0x17'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x6d6d('0x18'))['db'];function respondWithStatusCode(_0x32146d,_0xe61c36){_0xe61c36=_0xe61c36||0xcc;return function(_0x3f8542){if(_0x3f8542){return _0x32146d[_0x6d6d('0x19')](_0xe61c36);}return _0x32146d[_0x6d6d('0x1a')](_0xe61c36)[_0x6d6d('0x1b')]();};}function respondWithResult(_0x2cb2dd,_0x5f4154){_0x5f4154=_0x5f4154||0xc8;return function(_0xd09ea7){if(_0xd09ea7){return _0x2cb2dd[_0x6d6d('0x1a')](_0x5f4154)[_0x6d6d('0x1c')](_0xd09ea7);}};}function respondWithFilteredResult(_0xa3b05d,_0x29cbd8){return function(_0x5d80c0){if(_0x5d80c0){var _0x2e6fdb=typeof _0x29cbd8['offset']===_0x6d6d('0x1d')&&typeof _0x29cbd8[_0x6d6d('0x1e')]===_0x6d6d('0x1d');var _0x4bb3d1=_0x5d80c0['count'];var _0x9e1e18=_0x2e6fdb?0x0:_0x29cbd8[_0x6d6d('0x1f')];var _0x2b59d4=_0x2e6fdb?_0x5d80c0[_0x6d6d('0x20')]:_0x29cbd8['offset']+_0x29cbd8['limit'];var _0x474873;if(_0x2b59d4>=_0x4bb3d1){_0x2b59d4=_0x4bb3d1;_0x474873=0xc8;}else{_0x474873=0xce;}_0xa3b05d['status'](_0x474873);return _0xa3b05d[_0x6d6d('0x21')](_0x6d6d('0x22'),_0x9e1e18+'-'+_0x2b59d4+'/'+_0x4bb3d1)[_0x6d6d('0x1c')](_0x5d80c0);}return null;};}function patchUpdates(_0x450352){return function(_0x40d35b){try{jsonpatch[_0x6d6d('0x23')](_0x40d35b,_0x450352,!![]);}catch(_0x164c67){return BPromise[_0x6d6d('0x24')](_0x164c67);}return _0x40d35b[_0x6d6d('0x25')]();};}function saveUpdates(_0x6f64e3,_0x24b10d){return function(_0x6e58e3){if(_0x6e58e3){return _0x6e58e3[_0x6d6d('0x26')](_0x6f64e3)[_0x6d6d('0x27')](function(_0x1f7f88){return _0x1f7f88;});}return null;};}function removeEntity(_0x25a02e,_0xced622){return function(_0x583b10){if(_0x583b10){return _0x583b10[_0x6d6d('0x28')]()[_0x6d6d('0x27')](function(){var _0x99f7d6=_0x583b10[_0x6d6d('0x29')]({'plain':!![]});var _0xf0df7f=_0x6d6d('0x2a');return db['UserProfileResource'][_0x6d6d('0x28')]({'where':{'type':_0xf0df7f,'resourceId':_0x99f7d6['id']}})[_0x6d6d('0x27')](function(){return _0x583b10;});})[_0x6d6d('0x27')](function(){_0x25a02e[_0x6d6d('0x1a')](0xcc)[_0x6d6d('0x1b')]();});}};}function handleEntityNotFound(_0x408f98,_0x3641fc){return function(_0x4a57a1){if(!_0x4a57a1){_0x408f98[_0x6d6d('0x19')](0x194);}return _0x4a57a1;};}function handleError(_0x9595d8,_0x51bd68){_0x51bd68=_0x51bd68||0x1f4;return function(_0x553645){logger[_0x6d6d('0x2b')](_0x553645[_0x6d6d('0x2c')]);if(_0x553645[_0x6d6d('0x2d')]){delete _0x553645['name'];}_0x9595d8[_0x6d6d('0x1a')](_0x51bd68)[_0x6d6d('0x2e')](_0x553645);};}exports[_0x6d6d('0x2f')]=function(_0x1c8340,_0x64d1f7){var _0x428c17={},_0xdda3f2={},_0x359cfd={'count':0x0,'rows':[]};var _0x6c4741=_[_0x6d6d('0x30')](db['AnalyticMetric'][_0x6d6d('0x31')],function(_0x4f1fc5){return{'name':_0x4f1fc5[_0x6d6d('0x32')],'type':_0x4f1fc5[_0x6d6d('0x33')][_0x6d6d('0x34')]};});_0xdda3f2[_0x6d6d('0x35')]=_['map'](_0x6c4741,_0x6d6d('0x2d'));_0xdda3f2['query']=_[_0x6d6d('0x36')](_0x1c8340[_0x6d6d('0x37')]);_0xdda3f2['filters']=_[_0x6d6d('0x38')](_0xdda3f2[_0x6d6d('0x35')],_0xdda3f2[_0x6d6d('0x37')]);_0x428c17[_0x6d6d('0x39')]=_[_0x6d6d('0x38')](_0xdda3f2[_0x6d6d('0x35')],qs[_0x6d6d('0x3a')](_0x1c8340[_0x6d6d('0x37')][_0x6d6d('0x3a')]));_0x428c17[_0x6d6d('0x39')]=_0x428c17[_0x6d6d('0x39')][_0x6d6d('0x3b')]?_0x428c17[_0x6d6d('0x39')]:_0xdda3f2[_0x6d6d('0x35')];if(!_0x1c8340['query'][_0x6d6d('0x3c')](_0x6d6d('0x3d'))){_0x428c17[_0x6d6d('0x1e')]=qs[_0x6d6d('0x1e')](_0x1c8340['query']['limit']);_0x428c17[_0x6d6d('0x1f')]=qs[_0x6d6d('0x1f')](_0x1c8340[_0x6d6d('0x37')]['offset']);}_0x428c17[_0x6d6d('0x3e')]=qs[_0x6d6d('0x3f')](_0x1c8340[_0x6d6d('0x37')][_0x6d6d('0x3f')]);_0x428c17['where']=qs['filters'](_['pick'](_0x1c8340[_0x6d6d('0x37')],_0xdda3f2[_0x6d6d('0x40')]),_0x6c4741);if(_0x1c8340[_0x6d6d('0x37')][_0x6d6d('0x41')]){_0x428c17['where']=_[_0x6d6d('0x42')](_0x428c17[_0x6d6d('0x43')],{'$or':_[_0x6d6d('0x30')](_0x6c4741,function(_0x3c6d23){if(_0x3c6d23[_0x6d6d('0x33')]!==_0x6d6d('0x44')){var _0x4b457d={};_0x4b457d[_0x3c6d23[_0x6d6d('0x2d')]]={'$like':'%'+_0x1c8340[_0x6d6d('0x37')][_0x6d6d('0x41')]+'%'};return _0x4b457d;}})});}_0x428c17=_[_0x6d6d('0x42')]({},_0x428c17,_0x1c8340[_0x6d6d('0x45')]);var _0x3e27b7={'where':_0x428c17[_0x6d6d('0x43')]};return db['AnalyticMetric'][_0x6d6d('0x20')](_0x3e27b7)[_0x6d6d('0x27')](function(_0x16e177){_0x359cfd[_0x6d6d('0x20')]=_0x16e177;if(_0x1c8340[_0x6d6d('0x37')]['includeAll']){_0x428c17[_0x6d6d('0x46')]=[{'all':!![]}];}return db[_0x6d6d('0x47')]['findAll'](_0x428c17);})[_0x6d6d('0x27')](function(_0x50dc17){_0x359cfd[_0x6d6d('0x48')]=_0x50dc17;return _0x359cfd;})[_0x6d6d('0x27')](respondWithFilteredResult(_0x64d1f7,_0x428c17))['catch'](handleError(_0x64d1f7,null));};exports[_0x6d6d('0x49')]=function(_0x3324ec,_0x252cbe){var _0x4041f3={'raw':!![],'where':{'id':_0x3324ec['params']['id']}},_0xf7ea0d={};_0xf7ea0d['model']=_[_0x6d6d('0x36')](db['AnalyticMetric']['rawAttributes']);_0xf7ea0d[_0x6d6d('0x37')]=_[_0x6d6d('0x36')](_0x3324ec[_0x6d6d('0x37')]);_0xf7ea0d['filters']=_[_0x6d6d('0x38')](_0xf7ea0d['model'],_0xf7ea0d[_0x6d6d('0x37')]);_0x4041f3[_0x6d6d('0x39')]=_[_0x6d6d('0x38')](_0xf7ea0d[_0x6d6d('0x35')],qs[_0x6d6d('0x3a')](_0x3324ec[_0x6d6d('0x37')][_0x6d6d('0x3a')]));_0x4041f3['attributes']=_0x4041f3[_0x6d6d('0x39')][_0x6d6d('0x3b')]?_0x4041f3[_0x6d6d('0x39')]:_0xf7ea0d[_0x6d6d('0x35')];if(_0x3324ec[_0x6d6d('0x37')][_0x6d6d('0x4a')]){_0x4041f3[_0x6d6d('0x46')]=[{'all':!![]}];}_0x4041f3=_[_0x6d6d('0x42')]({},_0x4041f3,_0x3324ec[_0x6d6d('0x45')]);return db['AnalyticMetric']['find'](_0x4041f3)[_0x6d6d('0x27')](handleEntityNotFound(_0x252cbe,null))[_0x6d6d('0x27')](respondWithResult(_0x252cbe,null))[_0x6d6d('0x4b')](handleError(_0x252cbe,null));};exports[_0x6d6d('0x4c')]=function(_0xe2a20e,_0x492834){return db[_0x6d6d('0x47')][_0x6d6d('0x4c')](_0xe2a20e[_0x6d6d('0x4d')],{})[_0x6d6d('0x27')](function(_0x2ee917){var _0x23c2db=_0xe2a20e[_0x6d6d('0x4e')][_0x6d6d('0x29')]({'plain':!![]});if(!_0x23c2db)throw new Error(_0x6d6d('0x4f'));if(_0x23c2db[_0x6d6d('0x50')]===_0x6d6d('0x4e')){var _0x175e26=_0x2ee917['get']({'plain':!![]});var _0x190786=_0x6d6d('0x2a');return db[_0x6d6d('0x51')][_0x6d6d('0x52')]({'where':{'name':_0x190786,'userProfileId':_0x23c2db[_0x6d6d('0x53')]},'raw':!![]})['then'](function(_0x38c307){if(_0x38c307&&_0x38c307[_0x6d6d('0x54')]===0x0){return db[_0x6d6d('0x55')]['create']({'name':_0x175e26['name'],'resourceId':_0x175e26['id'],'type':_0x38c307[_0x6d6d('0x2d')],'sectionId':_0x38c307['id']},{})['then'](function(){return _0x2ee917;});}else{return _0x2ee917;}})[_0x6d6d('0x4b')](function(_0x995fe2){logger[_0x6d6d('0x2b')](_0x6d6d('0x56'),_0x995fe2);throw _0x995fe2;});}return _0x2ee917;})[_0x6d6d('0x27')](respondWithResult(_0x492834,0xc9))[_0x6d6d('0x4b')](handleError(_0x492834,null));};exports[_0x6d6d('0x26')]=function(_0x26c23a,_0x1a8f33){if(_0x26c23a[_0x6d6d('0x4d')]['id']){delete _0x26c23a['body']['id'];}return db[_0x6d6d('0x47')][_0x6d6d('0x52')]({'where':{'id':_0x26c23a[_0x6d6d('0x57')]['id']}})[_0x6d6d('0x27')](handleEntityNotFound(_0x1a8f33,null))[_0x6d6d('0x27')](saveUpdates(_0x26c23a[_0x6d6d('0x4d')],null))[_0x6d6d('0x27')](respondWithResult(_0x1a8f33,null))['catch'](handleError(_0x1a8f33,null));};exports['destroy']=function(_0x3ad9b0,_0x122865){return db['AnalyticMetric'][_0x6d6d('0x52')]({'where':{'id':_0x3ad9b0[_0x6d6d('0x57')]['id']}})[_0x6d6d('0x27')](handleEntityNotFound(_0x122865,null))[_0x6d6d('0x27')](removeEntity(_0x122865,null))[_0x6d6d('0x4b')](handleError(_0x122865,null));}; \ No newline at end of file +var _0x7fbe=['util','path','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','desk.js','querystring','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','limit','count','Content-Range','apply','save','update','then','get','UserProfileResource','destroy','end','error','stack','name','send','index','AnalyticMetric','fieldName','type','key','map','query','keys','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','merge','VIRTUAL','options','rows','show','params','create','body','role','user','Metrics','find','autoAssociation','catch','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache'];(function(_0x4b0af1,_0x3ed29){var _0x16628e=function(_0x322f6d){while(--_0x322f6d){_0x4b0af1['push'](_0x4b0af1['shift']());}};_0x16628e(++_0x3ed29);}(_0x7fbe,0x1ec));var _0xe7fb=function(_0x22ada8,_0x23a7ea){_0x22ada8=_0x22ada8-0x0;var _0x506e36=_0x7fbe[_0x22ada8];return _0x506e36;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0xe7fb('0x0'));var jsonpatch=require(_0xe7fb('0x1'));var rp=require(_0xe7fb('0x2'));var moment=require(_0xe7fb('0x3'));var BPromise=require(_0xe7fb('0x4'));var Mustache=require(_0xe7fb('0x5'));var util=require(_0xe7fb('0x6'));var path=require(_0xe7fb('0x7'));var sox=require(_0xe7fb('0x8'));var csv=require(_0xe7fb('0x9'));var ejs=require(_0xe7fb('0xa'));var fs=require('fs');var fs_extra=require(_0xe7fb('0xb'));var _=require(_0xe7fb('0xc'));var squel=require(_0xe7fb('0xd'));var crypto=require('crypto');var jsforce=require(_0xe7fb('0xe'));var deskjs=require(_0xe7fb('0xf'));var toCsv=require(_0xe7fb('0x9'));var querystring=require(_0xe7fb('0x10'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0xe7fb('0x11'));var qs=require(_0xe7fb('0x12'));var as=require(_0xe7fb('0x13'));var hardwareService=require(_0xe7fb('0x14'));var logger=require(_0xe7fb('0x15'))(_0xe7fb('0x16'));var utils=require(_0xe7fb('0x17'));var config=require(_0xe7fb('0x18'));var licenseUtil=require(_0xe7fb('0x19'));var db=require(_0xe7fb('0x1a'))['db'];function respondWithStatusCode(_0x2437d4,_0x188e1d){_0x188e1d=_0x188e1d||0xcc;return function(_0xdf9760){if(_0xdf9760){return _0x2437d4[_0xe7fb('0x1b')](_0x188e1d);}return _0x2437d4[_0xe7fb('0x1c')](_0x188e1d)['end']();};}function respondWithResult(_0x278b75,_0x2225e5){_0x2225e5=_0x2225e5||0xc8;return function(_0x5573ab){if(_0x5573ab){return _0x278b75[_0xe7fb('0x1c')](_0x2225e5)[_0xe7fb('0x1d')](_0x5573ab);}};}function respondWithFilteredResult(_0x482f7d,_0xa76acf){return function(_0x559129){if(_0x559129){var _0x12fff6=typeof _0xa76acf[_0xe7fb('0x1e')]===_0xe7fb('0x1f')&&typeof _0xa76acf[_0xe7fb('0x20')]==='undefined';var _0x892b0f=_0x559129['count'];var _0x293a47=_0x12fff6?0x0:_0xa76acf['offset'];var _0x1e77fd=_0x12fff6?_0x559129[_0xe7fb('0x21')]:_0xa76acf[_0xe7fb('0x1e')]+_0xa76acf[_0xe7fb('0x20')];var _0x5df1a1;if(_0x1e77fd>=_0x892b0f){_0x1e77fd=_0x892b0f;_0x5df1a1=0xc8;}else{_0x5df1a1=0xce;}_0x482f7d[_0xe7fb('0x1c')](_0x5df1a1);return _0x482f7d['set'](_0xe7fb('0x22'),_0x293a47+'-'+_0x1e77fd+'/'+_0x892b0f)['json'](_0x559129);}return null;};}function patchUpdates(_0x15f7a4){return function(_0x4ea664){try{jsonpatch[_0xe7fb('0x23')](_0x4ea664,_0x15f7a4,!![]);}catch(_0x135624){return BPromise['reject'](_0x135624);}return _0x4ea664[_0xe7fb('0x24')]();};}function saveUpdates(_0x4742bd,_0x3ae8f1){return function(_0x4dcb4b){if(_0x4dcb4b){return _0x4dcb4b[_0xe7fb('0x25')](_0x4742bd)[_0xe7fb('0x26')](function(_0x5da3d9){return _0x5da3d9;});}return null;};}function removeEntity(_0x5bea27,_0x52f08b){return function(_0x35e4db){if(_0x35e4db){return _0x35e4db['destroy']()['then'](function(){var _0x4026b1=_0x35e4db[_0xe7fb('0x27')]({'plain':!![]});var _0x2996ae='Metrics';return db[_0xe7fb('0x28')][_0xe7fb('0x29')]({'where':{'type':_0x2996ae,'resourceId':_0x4026b1['id']}})[_0xe7fb('0x26')](function(){return _0x35e4db;});})[_0xe7fb('0x26')](function(){_0x5bea27[_0xe7fb('0x1c')](0xcc)[_0xe7fb('0x2a')]();});}};}function handleEntityNotFound(_0x380130,_0x59e015){return function(_0x5df9f2){if(!_0x5df9f2){_0x380130[_0xe7fb('0x1b')](0x194);}return _0x5df9f2;};}function handleError(_0x3bdee9,_0xead63){_0xead63=_0xead63||0x1f4;return function(_0x4fd290){logger[_0xe7fb('0x2b')](_0x4fd290[_0xe7fb('0x2c')]);if(_0x4fd290[_0xe7fb('0x2d')]){delete _0x4fd290[_0xe7fb('0x2d')];}_0x3bdee9[_0xe7fb('0x1c')](_0xead63)[_0xe7fb('0x2e')](_0x4fd290);};}exports[_0xe7fb('0x2f')]=function(_0x3dd0be,_0x4ce993){var _0x3d1fb5={},_0x1742f3={},_0x29d1ca={'count':0x0,'rows':[]};var _0x547a04=_['map'](db[_0xe7fb('0x30')]['rawAttributes'],function(_0xac56b4){return{'name':_0xac56b4[_0xe7fb('0x31')],'type':_0xac56b4[_0xe7fb('0x32')][_0xe7fb('0x33')]};});_0x1742f3['model']=_[_0xe7fb('0x34')](_0x547a04,_0xe7fb('0x2d'));_0x1742f3[_0xe7fb('0x35')]=_[_0xe7fb('0x36')](_0x3dd0be[_0xe7fb('0x35')]);_0x1742f3['filters']=_[_0xe7fb('0x37')](_0x1742f3[_0xe7fb('0x38')],_0x1742f3[_0xe7fb('0x35')]);_0x3d1fb5[_0xe7fb('0x39')]=_[_0xe7fb('0x37')](_0x1742f3[_0xe7fb('0x38')],qs[_0xe7fb('0x3a')](_0x3dd0be[_0xe7fb('0x35')][_0xe7fb('0x3a')]));_0x3d1fb5['attributes']=_0x3d1fb5[_0xe7fb('0x39')][_0xe7fb('0x3b')]?_0x3d1fb5[_0xe7fb('0x39')]:_0x1742f3['model'];if(!_0x3dd0be[_0xe7fb('0x35')][_0xe7fb('0x3c')](_0xe7fb('0x3d'))){_0x3d1fb5[_0xe7fb('0x20')]=qs[_0xe7fb('0x20')](_0x3dd0be[_0xe7fb('0x35')][_0xe7fb('0x20')]);_0x3d1fb5[_0xe7fb('0x1e')]=qs[_0xe7fb('0x1e')](_0x3dd0be[_0xe7fb('0x35')][_0xe7fb('0x1e')]);}_0x3d1fb5[_0xe7fb('0x3e')]=qs[_0xe7fb('0x3f')](_0x3dd0be[_0xe7fb('0x35')][_0xe7fb('0x3f')]);_0x3d1fb5[_0xe7fb('0x40')]=qs[_0xe7fb('0x41')](_[_0xe7fb('0x42')](_0x3dd0be[_0xe7fb('0x35')],_0x1742f3['filters']),_0x547a04);if(_0x3dd0be[_0xe7fb('0x35')][_0xe7fb('0x43')]){_0x3d1fb5[_0xe7fb('0x40')]=_[_0xe7fb('0x44')](_0x3d1fb5['where'],{'$or':_[_0xe7fb('0x34')](_0x547a04,function(_0x186418){if(_0x186418[_0xe7fb('0x32')]!==_0xe7fb('0x45')){var _0x49fe9d={};_0x49fe9d[_0x186418[_0xe7fb('0x2d')]]={'$like':'%'+_0x3dd0be[_0xe7fb('0x35')][_0xe7fb('0x43')]+'%'};return _0x49fe9d;}})});}_0x3d1fb5=_[_0xe7fb('0x44')]({},_0x3d1fb5,_0x3dd0be[_0xe7fb('0x46')]);var _0xb729fc={'where':_0x3d1fb5['where']};return db[_0xe7fb('0x30')][_0xe7fb('0x21')](_0xb729fc)[_0xe7fb('0x26')](function(_0x4b263d){_0x29d1ca[_0xe7fb('0x21')]=_0x4b263d;if(_0x3dd0be[_0xe7fb('0x35')]['includeAll']){_0x3d1fb5['include']=[{'all':!![]}];}return db['AnalyticMetric']['findAll'](_0x3d1fb5);})['then'](function(_0x900d67){_0x29d1ca[_0xe7fb('0x47')]=_0x900d67;return _0x29d1ca;})[_0xe7fb('0x26')](respondWithFilteredResult(_0x4ce993,_0x3d1fb5))['catch'](handleError(_0x4ce993,null));};exports[_0xe7fb('0x48')]=function(_0x58d743,_0x19277f){var _0x32cfa4={'raw':!![],'where':{'id':_0x58d743[_0xe7fb('0x49')]['id']}},_0x4d29d3={};_0x4d29d3[_0xe7fb('0x38')]=_[_0xe7fb('0x36')](db[_0xe7fb('0x30')]['rawAttributes']);_0x4d29d3[_0xe7fb('0x35')]=_[_0xe7fb('0x36')](_0x58d743[_0xe7fb('0x35')]);_0x4d29d3['filters']=_[_0xe7fb('0x37')](_0x4d29d3[_0xe7fb('0x38')],_0x4d29d3[_0xe7fb('0x35')]);_0x32cfa4[_0xe7fb('0x39')]=_[_0xe7fb('0x37')](_0x4d29d3['model'],qs[_0xe7fb('0x3a')](_0x58d743['query'][_0xe7fb('0x3a')]));_0x32cfa4[_0xe7fb('0x39')]=_0x32cfa4[_0xe7fb('0x39')][_0xe7fb('0x3b')]?_0x32cfa4[_0xe7fb('0x39')]:_0x4d29d3['model'];if(_0x58d743[_0xe7fb('0x35')]['includeAll']){_0x32cfa4['include']=[{'all':!![]}];}_0x32cfa4=_[_0xe7fb('0x44')]({},_0x32cfa4,_0x58d743[_0xe7fb('0x46')]);return db[_0xe7fb('0x30')]['find'](_0x32cfa4)[_0xe7fb('0x26')](handleEntityNotFound(_0x19277f,null))[_0xe7fb('0x26')](respondWithResult(_0x19277f,null))['catch'](handleError(_0x19277f,null));};exports['create']=function(_0x284bcb,_0x42270b){return db[_0xe7fb('0x30')][_0xe7fb('0x4a')](_0x284bcb[_0xe7fb('0x4b')],{})[_0xe7fb('0x26')](function(_0x18a590){var _0x347177=_0x284bcb['user'][_0xe7fb('0x27')]({'plain':!![]});if(!_0x347177)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x347177[_0xe7fb('0x4c')]===_0xe7fb('0x4d')){var _0x5cedfb=_0x18a590[_0xe7fb('0x27')]({'plain':!![]});var _0x5efd24=_0xe7fb('0x4e');return db['UserProfileSection'][_0xe7fb('0x4f')]({'where':{'name':_0x5efd24,'userProfileId':_0x347177['userProfileId']},'raw':!![]})[_0xe7fb('0x26')](function(_0x59158c){if(_0x59158c&&_0x59158c[_0xe7fb('0x50')]===0x0){return db[_0xe7fb('0x28')][_0xe7fb('0x4a')]({'name':_0x5cedfb[_0xe7fb('0x2d')],'resourceId':_0x5cedfb['id'],'type':_0x59158c[_0xe7fb('0x2d')],'sectionId':_0x59158c['id']},{})[_0xe7fb('0x26')](function(){return _0x18a590;});}else{return _0x18a590;}})[_0xe7fb('0x51')](function(_0x582a4a){logger['error'](_0xe7fb('0x52'),_0x582a4a);throw _0x582a4a;});}return _0x18a590;})['then'](respondWithResult(_0x42270b,0xc9))['catch'](handleError(_0x42270b,null));};exports['update']=function(_0x50b8df,_0x539252){if(_0x50b8df[_0xe7fb('0x4b')]['id']){delete _0x50b8df[_0xe7fb('0x4b')]['id'];}return db[_0xe7fb('0x30')][_0xe7fb('0x4f')]({'where':{'id':_0x50b8df['params']['id']}})[_0xe7fb('0x26')](handleEntityNotFound(_0x539252,null))[_0xe7fb('0x26')](saveUpdates(_0x50b8df[_0xe7fb('0x4b')],null))['then'](respondWithResult(_0x539252,null))['catch'](handleError(_0x539252,null));};exports[_0xe7fb('0x29')]=function(_0x377e5f,_0x300b8e){return db['AnalyticMetric'][_0xe7fb('0x4f')]({'where':{'id':_0x377e5f[_0xe7fb('0x49')]['id']}})[_0xe7fb('0x26')](handleEntityNotFound(_0x300b8e,null))[_0xe7fb('0x26')](removeEntity(_0x300b8e,null))['catch'](handleError(_0x300b8e,null));}; \ No newline at end of file diff --git a/server/api/analyticMetric/analyticMetric.model.js b/server/api/analyticMetric/analyticMetric.model.js index 197ba69..4a072af 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 _0xe14b=['bluebird','path','./analyticMetric.attributes','exports','define','AnalyticMetric','analytics_metrics','lodash','util','moment'];(function(_0x11820a,_0x23db63){var _0x3b56f3=function(_0x363c05){while(--_0x363c05){_0x11820a['push'](_0x11820a['shift']());}};_0x3b56f3(++_0x23db63);}(_0xe14b,0x93));var _0xbe14=function(_0x24a127,_0x485506){_0x24a127=_0x24a127-0x0;var _0x1c130=_0xe14b[_0x24a127];return _0x1c130;};'use strict';var _=require(_0xbe14('0x0'));var util=require(_0xbe14('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0xbe14('0x2'));var BPromise=require(_0xbe14('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xbe14('0x4'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0xbe14('0x5'));module[_0xbe14('0x6')]=function(_0x1fe204,_0x1ff100){return _0x1fe204[_0xbe14('0x7')](_0xbe14('0x8'),attributes,{'tableName':_0xbe14('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x88b0=['define','AnalyticMetric','analytics_metrics','lodash','util','moment','bluebird','request-promise','path','../../config/environment','./analyticMetric.attributes','exports'];(function(_0x128bef,_0xc7a0af){var _0x1ba862=function(_0x4858e8){while(--_0x4858e8){_0x128bef['push'](_0x128bef['shift']());}};_0x1ba862(++_0xc7a0af);}(_0x88b0,0x1cb));var _0x088b=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0x88b0[_0x2dafbe];return _0x58a45a;};'use strict';var _=require(_0x088b('0x0'));var util=require(_0x088b('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0x088b('0x2'));var BPromise=require(_0x088b('0x3'));var rp=require(_0x088b('0x4'));var fs=require('fs');var path=require(_0x088b('0x5'));var rimraf=require('rimraf');var config=require(_0x088b('0x6'));var attributes=require(_0x088b('0x7'));module[_0x088b('0x8')]=function(_0x5af8a4,_0x4a9986){return _0x5af8a4[_0x088b('0x9')](_0x088b('0xa'),attributes,{'tableName':_0x088b('0xb'),'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 ff219a6..1adbb20 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 _0xa7b1=['moment','randomstring','ioredis','../../config/utils','../../config/environment','jayson/promise','client','http','request','then','info','AnalyticMetric,\x20%s,\x20%s','request\x20sent','debug','AnalyticMetric,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','lodash','util'];(function(_0x154d8b,_0x18a02d){var _0x29324f=function(_0x3bacff){while(--_0x3bacff){_0x154d8b['push'](_0x154d8b['shift']());}};_0x29324f(++_0x18a02d);}(_0xa7b1,0x1cc));var _0x1a7b=function(_0x5e95e0,_0x105303){_0x5e95e0=_0x5e95e0-0x0;var _0x843818=_0xa7b1[_0x5e95e0];return _0x843818;};'use strict';var _=require(_0x1a7b('0x0'));var util=require(_0x1a7b('0x1'));var moment=require(_0x1a7b('0x2'));var BPromise=require('bluebird');var rs=require(_0x1a7b('0x3'));var fs=require('fs');var Redis=require(_0x1a7b('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x1a7b('0x5'));var logger=require('../../config/logger')('rpc');var config=require(_0x1a7b('0x6'));var jayson=require(_0x1a7b('0x7'));var client=jayson[_0x1a7b('0x8')][_0x1a7b('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x480aa6,_0x1f12cc,_0x61e99f){return new BPromise(function(_0x1f16fe,_0x1e60db){return client[_0x1a7b('0xa')](_0x480aa6,_0x61e99f)[_0x1a7b('0xb')](function(_0x183ce2){logger[_0x1a7b('0xc')](_0x1a7b('0xd'),_0x1f12cc,_0x1a7b('0xe'));logger[_0x1a7b('0xf')](_0x1a7b('0x10'),_0x1f12cc,'request\x20sent',JSON[_0x1a7b('0x11')](_0x183ce2));if(_0x183ce2[_0x1a7b('0x12')]){if(_0x183ce2['error'][_0x1a7b('0x13')]===0x1f4){logger['error'](_0x1a7b('0xd'),_0x1f12cc,_0x183ce2[_0x1a7b('0x12')][_0x1a7b('0x14')]);return _0x1e60db(_0x183ce2[_0x1a7b('0x12')][_0x1a7b('0x14')]);}logger[_0x1a7b('0x12')](_0x1a7b('0xd'),_0x1f12cc,_0x183ce2['error'][_0x1a7b('0x14')]);return _0x1f16fe(_0x183ce2[_0x1a7b('0x12')][_0x1a7b('0x14')]);}else{logger[_0x1a7b('0xc')](_0x1a7b('0xd'),_0x1f12cc,'request\x20sent');_0x1f16fe(_0x183ce2['result'][_0x1a7b('0x14')]);}})[_0x1a7b('0x15')](function(_0x580196){logger['error']('AnalyticMetric,\x20%s,\x20%s',_0x1f12cc,_0x580196);_0x1e60db(_0x580196);});});} \ No newline at end of file +var _0x0ded=['randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','AnalyticMetric,\x20%s,\x20%s','request\x20sent','debug','AnalyticMetric,\x20%s,\x20%s,\x20%s','error','code','message','info','catch','lodash','util','moment','bluebird'];(function(_0x14554b,_0x3696be){var _0x102d0f=function(_0xbc2d9a){while(--_0xbc2d9a){_0x14554b['push'](_0x14554b['shift']());}};_0x102d0f(++_0x3696be);}(_0x0ded,0x14c));var _0xd0de=function(_0x5df61d,_0x158640){_0x5df61d=_0x5df61d-0x0;var _0x24cc4c=_0x0ded[_0x5df61d];return _0x24cc4c;};'use strict';var _=require(_0xd0de('0x0'));var util=require(_0xd0de('0x1'));var moment=require(_0xd0de('0x2'));var BPromise=require(_0xd0de('0x3'));var rs=require(_0xd0de('0x4'));var fs=require('fs');var Redis=require(_0xd0de('0x5'));var db=require(_0xd0de('0x6'))['db'];var utils=require(_0xd0de('0x7'));var logger=require(_0xd0de('0x8'))(_0xd0de('0x9'));var config=require(_0xd0de('0xa'));var jayson=require(_0xd0de('0xb'));var client=jayson['client'][_0xd0de('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x1c1908,_0x467c1d,_0x2f275f){return new BPromise(function(_0x4f6be8,_0x32f232){return client[_0xd0de('0xd')](_0x1c1908,_0x2f275f)[_0xd0de('0xe')](function(_0x46adfe){logger['info'](_0xd0de('0xf'),_0x467c1d,_0xd0de('0x10'));logger[_0xd0de('0x11')](_0xd0de('0x12'),_0x467c1d,_0xd0de('0x10'),JSON['stringify'](_0x46adfe));if(_0x46adfe[_0xd0de('0x13')]){if(_0x46adfe['error'][_0xd0de('0x14')]===0x1f4){logger[_0xd0de('0x13')](_0xd0de('0xf'),_0x467c1d,_0x46adfe['error']['message']);return _0x32f232(_0x46adfe[_0xd0de('0x13')]['message']);}logger[_0xd0de('0x13')](_0xd0de('0xf'),_0x467c1d,_0x46adfe[_0xd0de('0x13')][_0xd0de('0x15')]);return _0x4f6be8(_0x46adfe[_0xd0de('0x13')][_0xd0de('0x15')]);}else{logger[_0xd0de('0x16')](_0xd0de('0xf'),_0x467c1d,_0xd0de('0x10'));_0x4f6be8(_0x46adfe['result']['message']);}})[_0xd0de('0x17')](function(_0x4a5fe5){logger[_0xd0de('0x13')](_0xd0de('0xf'),_0x467c1d,_0x4a5fe5);_0x32f232(_0x4a5fe5);});});} \ No newline at end of file diff --git a/server/api/analyticMetric/index.js b/server/api/analyticMetric/index.js index fa84063..569dde5 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 _0x14f5=['express','Router','../../components/auth/service','../../components/interaction/service','./analyticMetric.controller','get','isAuthenticated','index','/:id','post','create','put','update','delete','util','connect-timeout'];(function(_0x256465,_0x4cca46){var _0x3e09c4=function(_0x4c7e1b){while(--_0x4c7e1b){_0x256465['push'](_0x256465['shift']());}};_0x3e09c4(++_0x4cca46);}(_0x14f5,0xae));var _0x514f=function(_0x54f73d,_0x4c4079){_0x54f73d=_0x54f73d-0x0;var _0x147875=_0x14f5[_0x54f73d];return _0x147875;};'use strict';var multer=require('multer');var util=require(_0x514f('0x0'));var path=require('path');var timeout=require(_0x514f('0x1'));var express=require(_0x514f('0x2'));var router=express[_0x514f('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x514f('0x4'));var interaction=require(_0x514f('0x5'));var config=require('../../config/environment');var controller=require(_0x514f('0x6'));router[_0x514f('0x7')]('/',auth[_0x514f('0x8')](),controller[_0x514f('0x9')]);router[_0x514f('0x7')](_0x514f('0xa'),auth[_0x514f('0x8')](),controller['show']);router[_0x514f('0xb')]('/',auth['isAuthenticated'](),controller[_0x514f('0xc')]);router[_0x514f('0xd')](_0x514f('0xa'),auth[_0x514f('0x8')](),controller[_0x514f('0xe')]);router[_0x514f('0xf')](_0x514f('0xa'),auth['isAuthenticated'](),controller['destroy']);module['exports']=router; \ No newline at end of file +var _0xecb2=['show','post','put','delete','destroy','exports','multer','connect-timeout','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./analyticMetric.controller','get','/:id','isAuthenticated'];(function(_0x21d624,_0x9e727b){var _0x5ded81=function(_0x104eca){while(--_0x104eca){_0x21d624['push'](_0x21d624['shift']());}};_0x5ded81(++_0x9e727b);}(_0xecb2,0xf6));var _0x2ecb=function(_0x24d27d,_0x108f36){_0x24d27d=_0x24d27d-0x0;var _0x3f02a5=_0xecb2[_0x24d27d];return _0x3f02a5;};'use strict';var multer=require(_0x2ecb('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x2ecb('0x1'));var express=require('express');var router=express['Router']();var fs_extra=require(_0x2ecb('0x2'));var auth=require(_0x2ecb('0x3'));var interaction=require(_0x2ecb('0x4'));var config=require(_0x2ecb('0x5'));var controller=require(_0x2ecb('0x6'));router[_0x2ecb('0x7')]('/',auth['isAuthenticated'](),controller['index']);router['get'](_0x2ecb('0x8'),auth[_0x2ecb('0x9')](),controller[_0x2ecb('0xa')]);router[_0x2ecb('0xb')]('/',auth[_0x2ecb('0x9')](),controller['create']);router[_0x2ecb('0xc')](_0x2ecb('0x8'),auth[_0x2ecb('0x9')](),controller['update']);router[_0x2ecb('0xd')](_0x2ecb('0x8'),auth[_0x2ecb('0x9')](),controller[_0x2ecb('0xe')]);module[_0x2ecb('0xf')]=router; \ No newline at end of file diff --git a/server/api/analyticTreeReport/analyticTreeReport.attributes.js b/server/api/analyticTreeReport/analyticTreeReport.attributes.js index 9a8299c..85a0f00 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 _0x5498=['exports','TEXT','sequelize'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0x5498,0x10a));var _0x8549=function(_0x32a79e,_0x1464d7){_0x32a79e=_0x32a79e-0x0;var _0xc7309e=_0x5498[_0x32a79e];return _0xc7309e;};'use strict';var Sequelize=require(_0x8549('0x0'));module[_0x8549('0x1')]={'tree':{'type':Sequelize[_0x8549('0x2')],'allowNull':![]}}; \ No newline at end of file +var _0xb418=['TEXT','sequelize','exports'];(function(_0x4fcd21,_0x3b4148){var _0x3af7b8=function(_0x4a0f72){while(--_0x4a0f72){_0x4fcd21['push'](_0x4fcd21['shift']());}};_0x3af7b8(++_0x3b4148);}(_0xb418,0x1e4));var _0x8b41=function(_0x7e2eb0,_0x17cd58){_0x7e2eb0=_0x7e2eb0-0x0;var _0xd92de4=_0xb418[_0x7e2eb0];return _0xd92de4;};'use strict';var Sequelize=require(_0x8b41('0x0'));module[_0x8b41('0x1')]={'tree':{'type':Sequelize[_0x8b41('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 d00ba44..b728226 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 _0x5588=['length','hasOwnProperty','nolimit','order','sort','pick','where','merge','options','includeAll','include','AnalyticTreeReport','rows','catch','show','params','keys','create','body','find','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','sendStatus','status','end','json','undefined','count','offset','limit','set','apply','reject','save','update','then','destroy','error','stack','name','index','rawAttributes','type','key','map','query','filters','intersection','model','fields','attributes'];(function(_0x5493f7,_0x45340b){var _0x58e93c=function(_0x5606a4){while(--_0x5606a4){_0x5493f7['push'](_0x5493f7['shift']());}};_0x58e93c(++_0x45340b);}(_0x5588,0xa6));var _0x8558=function(_0x146839,_0x1d9a69){_0x146839=_0x146839-0x0;var _0x20132a=_0x5588[_0x146839];return _0x20132a;};'use strict';var emlformat=require(_0x8558('0x0'));var rimraf=require(_0x8558('0x1'));var zipdir=require(_0x8558('0x2'));var jsonpatch=require(_0x8558('0x3'));var rp=require('request-promise');var moment=require(_0x8558('0x4'));var BPromise=require(_0x8558('0x5'));var Mustache=require('mustache');var util=require('util');var path=require('path');var sox=require(_0x8558('0x6'));var csv=require(_0x8558('0x7'));var ejs=require(_0x8558('0x8'));var fs=require('fs');var fs_extra=require(_0x8558('0x9'));var _=require(_0x8558('0xa'));var squel=require(_0x8558('0xb'));var crypto=require(_0x8558('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x8558('0xd'));var toCsv=require(_0x8558('0x7'));var querystring=require(_0x8558('0xe'));var Papa=require(_0x8558('0xf'));var Redis=require('ioredis');var authService=require(_0x8558('0x10'));var qs=require(_0x8558('0x11'));var as=require(_0x8558('0x12'));var hardwareService=require(_0x8558('0x13'));var logger=require(_0x8558('0x14'))(_0x8558('0x15'));var utils=require(_0x8558('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0x8558('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x140b21,_0x408f75){_0x408f75=_0x408f75||0xcc;return function(_0x1d1b3f){if(_0x1d1b3f){return _0x140b21[_0x8558('0x18')](_0x408f75);}return _0x140b21[_0x8558('0x19')](_0x408f75)[_0x8558('0x1a')]();};}function respondWithResult(_0x1ce19e,_0x5e7270){_0x5e7270=_0x5e7270||0xc8;return function(_0x50d451){if(_0x50d451){return _0x1ce19e[_0x8558('0x19')](_0x5e7270)[_0x8558('0x1b')](_0x50d451);}};}function respondWithFilteredResult(_0x31e59e,_0x5eb43c){return function(_0x3be4ce){if(_0x3be4ce){var _0x5738cb=typeof _0x5eb43c['offset']==='undefined'&&typeof _0x5eb43c['limit']===_0x8558('0x1c');var _0x31b329=_0x3be4ce[_0x8558('0x1d')];var _0x56a5b3=_0x5738cb?0x0:_0x5eb43c[_0x8558('0x1e')];var _0x366173=_0x5738cb?_0x3be4ce['count']:_0x5eb43c[_0x8558('0x1e')]+_0x5eb43c[_0x8558('0x1f')];var _0xdaec6b;if(_0x366173>=_0x31b329){_0x366173=_0x31b329;_0xdaec6b=0xc8;}else{_0xdaec6b=0xce;}_0x31e59e[_0x8558('0x19')](_0xdaec6b);return _0x31e59e[_0x8558('0x20')]('Content-Range',_0x56a5b3+'-'+_0x366173+'/'+_0x31b329)[_0x8558('0x1b')](_0x3be4ce);}return null;};}function patchUpdates(_0x2d2143){return function(_0x3ec8f0){try{jsonpatch[_0x8558('0x21')](_0x3ec8f0,_0x2d2143,!![]);}catch(_0x59a33e){return BPromise[_0x8558('0x22')](_0x59a33e);}return _0x3ec8f0[_0x8558('0x23')]();};}function saveUpdates(_0x4cebc4,_0x359d62){return function(_0x2b2c49){if(_0x2b2c49){return _0x2b2c49[_0x8558('0x24')](_0x4cebc4)[_0x8558('0x25')](function(_0x39eadf){return _0x39eadf;});}return null;};}function removeEntity(_0x27be65,_0x197e67){return function(_0x28b8b2){if(_0x28b8b2){return _0x28b8b2[_0x8558('0x26')]()[_0x8558('0x25')](function(){_0x27be65['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x362c86,_0x248c58){return function(_0x5addff){if(!_0x5addff){_0x362c86[_0x8558('0x18')](0x194);}return _0x5addff;};}function handleError(_0x4515e5,_0x2702ad){_0x2702ad=_0x2702ad||0x1f4;return function(_0x214e58){logger[_0x8558('0x27')](_0x214e58[_0x8558('0x28')]);if(_0x214e58[_0x8558('0x29')]){delete _0x214e58[_0x8558('0x29')];}_0x4515e5['status'](_0x2702ad)['send'](_0x214e58);};}exports[_0x8558('0x2a')]=function(_0x5641cd,_0xc93b77){var _0x48d782={},_0x4a5349={},_0x2e4bb0={'count':0x0,'rows':[]};var _0x5d2b7e=_['map'](db['AnalyticTreeReport'][_0x8558('0x2b')],function(_0x16e22d){return{'name':_0x16e22d['fieldName'],'type':_0x16e22d[_0x8558('0x2c')][_0x8558('0x2d')]};});_0x4a5349['model']=_[_0x8558('0x2e')](_0x5d2b7e,'name');_0x4a5349[_0x8558('0x2f')]=_['keys'](_0x5641cd[_0x8558('0x2f')]);_0x4a5349[_0x8558('0x30')]=_['intersection'](_0x4a5349['model'],_0x4a5349[_0x8558('0x2f')]);_0x48d782['attributes']=_[_0x8558('0x31')](_0x4a5349[_0x8558('0x32')],qs[_0x8558('0x33')](_0x5641cd[_0x8558('0x2f')][_0x8558('0x33')]));_0x48d782['attributes']=_0x48d782[_0x8558('0x34')][_0x8558('0x35')]?_0x48d782[_0x8558('0x34')]:_0x4a5349[_0x8558('0x32')];if(!_0x5641cd[_0x8558('0x2f')][_0x8558('0x36')](_0x8558('0x37'))){_0x48d782[_0x8558('0x1f')]=qs[_0x8558('0x1f')](_0x5641cd[_0x8558('0x2f')][_0x8558('0x1f')]);_0x48d782[_0x8558('0x1e')]=qs[_0x8558('0x1e')](_0x5641cd[_0x8558('0x2f')][_0x8558('0x1e')]);}_0x48d782[_0x8558('0x38')]=qs[_0x8558('0x39')](_0x5641cd[_0x8558('0x2f')][_0x8558('0x39')]);_0x48d782['where']=qs[_0x8558('0x30')](_[_0x8558('0x3a')](_0x5641cd[_0x8558('0x2f')],_0x4a5349[_0x8558('0x30')]),_0x5d2b7e);if(_0x5641cd['query']['filter']){_0x48d782[_0x8558('0x3b')]=_[_0x8558('0x3c')](_0x48d782[_0x8558('0x3b')],{'$or':_[_0x8558('0x2e')](_0x5d2b7e,function(_0x49a4dd){if(_0x49a4dd['type']!=='VIRTUAL'){var _0x30a9ec={};_0x30a9ec[_0x49a4dd[_0x8558('0x29')]]={'$like':'%'+_0x5641cd[_0x8558('0x2f')]['filter']+'%'};return _0x30a9ec;}})});}_0x48d782=_['merge']({},_0x48d782,_0x5641cd[_0x8558('0x3d')]);var _0x31ddbe={'where':_0x48d782[_0x8558('0x3b')]};return db['AnalyticTreeReport'][_0x8558('0x1d')](_0x31ddbe)[_0x8558('0x25')](function(_0x5c5909){_0x2e4bb0[_0x8558('0x1d')]=_0x5c5909;if(_0x5641cd[_0x8558('0x2f')][_0x8558('0x3e')]){_0x48d782[_0x8558('0x3f')]=[{'all':!![]}];}return db[_0x8558('0x40')]['findAll'](_0x48d782);})[_0x8558('0x25')](function(_0x178acf){_0x2e4bb0[_0x8558('0x41')]=_0x178acf;return _0x2e4bb0;})['then'](respondWithFilteredResult(_0xc93b77,_0x48d782))[_0x8558('0x42')](handleError(_0xc93b77,null));};exports[_0x8558('0x43')]=function(_0x52d1cc,_0x500098){var _0x5eace3={'raw':!![],'where':{'id':_0x52d1cc[_0x8558('0x44')]['id']}},_0x1b805a={};_0x1b805a[_0x8558('0x32')]=_[_0x8558('0x45')](db['AnalyticTreeReport'][_0x8558('0x2b')]);_0x1b805a[_0x8558('0x2f')]=_[_0x8558('0x45')](_0x52d1cc[_0x8558('0x2f')]);_0x1b805a[_0x8558('0x30')]=_['intersection'](_0x1b805a[_0x8558('0x32')],_0x1b805a[_0x8558('0x2f')]);_0x5eace3[_0x8558('0x34')]=_[_0x8558('0x31')](_0x1b805a['model'],qs[_0x8558('0x33')](_0x52d1cc[_0x8558('0x2f')][_0x8558('0x33')]));_0x5eace3[_0x8558('0x34')]=_0x5eace3[_0x8558('0x34')][_0x8558('0x35')]?_0x5eace3['attributes']:_0x1b805a['model'];if(_0x52d1cc[_0x8558('0x2f')][_0x8558('0x3e')]){_0x5eace3['include']=[{'all':!![]}];}_0x5eace3=_[_0x8558('0x3c')]({},_0x5eace3,_0x52d1cc[_0x8558('0x3d')]);return db['AnalyticTreeReport']['find'](_0x5eace3)['then'](handleEntityNotFound(_0x500098,null))[_0x8558('0x25')](respondWithResult(_0x500098,null))[_0x8558('0x42')](handleError(_0x500098,null));};exports[_0x8558('0x46')]=function(_0x4f0e22,_0x5989f1){return db[_0x8558('0x40')][_0x8558('0x46')](_0x4f0e22[_0x8558('0x47')],{})['then'](respondWithResult(_0x5989f1,0xc9))[_0x8558('0x42')](handleError(_0x5989f1,null));};exports[_0x8558('0x24')]=function(_0x2fbb85,_0x2fe4ac){if(_0x2fbb85[_0x8558('0x47')]['id']){delete _0x2fbb85[_0x8558('0x47')]['id'];}return db['AnalyticTreeReport'][_0x8558('0x48')]({'where':{'id':_0x2fbb85['params']['id']}})[_0x8558('0x25')](handleEntityNotFound(_0x2fe4ac,null))[_0x8558('0x25')](saveUpdates(_0x2fbb85[_0x8558('0x47')],null))[_0x8558('0x25')](respondWithResult(_0x2fe4ac,null))['catch'](handleError(_0x2fe4ac,null));};exports[_0x8558('0x26')]=function(_0x47beae,_0xa259f7){return db[_0x8558('0x40')][_0x8558('0x48')]({'where':{'id':_0x47beae[_0x8558('0x44')]['id']}})[_0x8558('0x25')](handleEntityNotFound(_0xa259f7,null))[_0x8558('0x25')](removeEntity(_0xa259f7,null))[_0x8558('0x42')](handleError(_0xa259f7,null));}; \ No newline at end of file +var _0x1933=['lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../mysqldb','sendStatus','status','end','json','offset','undefined','count','limit','set','apply','reject','update','then','name','index','map','AnalyticTreeReport','rawAttributes','fieldName','type','key','model','keys','query','filters','attributes','fields','nolimit','order','sort','where','pick','filter','merge','options','includeAll','include','findAll','rows','show','params','intersection','length','find','catch','create','body','destroy','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','fs-extra'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x1933,0x11f));var _0x3193=function(_0x49418f,_0x17cdd9){_0x49418f=_0x49418f-0x0;var _0x122c1c=_0x1933[_0x49418f];return _0x122c1c;};'use strict';var emlformat=require(_0x3193('0x0'));var rimraf=require(_0x3193('0x1'));var zipdir=require(_0x3193('0x2'));var jsonpatch=require(_0x3193('0x3'));var rp=require(_0x3193('0x4'));var moment=require(_0x3193('0x5'));var BPromise=require(_0x3193('0x6'));var Mustache=require(_0x3193('0x7'));var util=require('util');var path=require(_0x3193('0x8'));var sox=require(_0x3193('0x9'));var csv=require(_0x3193('0xa'));var ejs=require(_0x3193('0xb'));var fs=require('fs');var fs_extra=require(_0x3193('0xc'));var _=require(_0x3193('0xd'));var squel=require(_0x3193('0xe'));var crypto=require(_0x3193('0xf'));var jsforce=require(_0x3193('0x10'));var deskjs=require(_0x3193('0x11'));var toCsv=require(_0x3193('0xa'));var querystring=require(_0x3193('0x12'));var Papa=require(_0x3193('0x13'));var Redis=require('ioredis');var authService=require(_0x3193('0x14'));var qs=require(_0x3193('0x15'));var as=require(_0x3193('0x16'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x3193('0x17'))(_0x3193('0x18'));var utils=require(_0x3193('0x19'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x3193('0x1a'))['db'];function respondWithStatusCode(_0x5dc289,_0x146285){_0x146285=_0x146285||0xcc;return function(_0x2a2f52){if(_0x2a2f52){return _0x5dc289[_0x3193('0x1b')](_0x146285);}return _0x5dc289[_0x3193('0x1c')](_0x146285)[_0x3193('0x1d')]();};}function respondWithResult(_0x4f741a,_0x4c4dae){_0x4c4dae=_0x4c4dae||0xc8;return function(_0x53000d){if(_0x53000d){return _0x4f741a[_0x3193('0x1c')](_0x4c4dae)[_0x3193('0x1e')](_0x53000d);}};}function respondWithFilteredResult(_0x1fb12c,_0x5aaf83){return function(_0x594445){if(_0x594445){var _0x1d56dc=typeof _0x5aaf83[_0x3193('0x1f')]===_0x3193('0x20')&&typeof _0x5aaf83['limit']===_0x3193('0x20');var _0x387df8=_0x594445[_0x3193('0x21')];var _0x46ba1c=_0x1d56dc?0x0:_0x5aaf83[_0x3193('0x1f')];var _0x294617=_0x1d56dc?_0x594445['count']:_0x5aaf83[_0x3193('0x1f')]+_0x5aaf83[_0x3193('0x22')];var _0x32dc02;if(_0x294617>=_0x387df8){_0x294617=_0x387df8;_0x32dc02=0xc8;}else{_0x32dc02=0xce;}_0x1fb12c[_0x3193('0x1c')](_0x32dc02);return _0x1fb12c[_0x3193('0x23')]('Content-Range',_0x46ba1c+'-'+_0x294617+'/'+_0x387df8)[_0x3193('0x1e')](_0x594445);}return null;};}function patchUpdates(_0x1bcdde){return function(_0x507f48){try{jsonpatch[_0x3193('0x24')](_0x507f48,_0x1bcdde,!![]);}catch(_0x3b9a79){return BPromise[_0x3193('0x25')](_0x3b9a79);}return _0x507f48['save']();};}function saveUpdates(_0x4a65cd,_0x4cf579){return function(_0xc42a4b){if(_0xc42a4b){return _0xc42a4b[_0x3193('0x26')](_0x4a65cd)[_0x3193('0x27')](function(_0x56813b){return _0x56813b;});}return null;};}function removeEntity(_0x56f8ab,_0x48bb98){return function(_0xa7faf){if(_0xa7faf){return _0xa7faf['destroy']()[_0x3193('0x27')](function(){_0x56f8ab[_0x3193('0x1c')](0xcc)[_0x3193('0x1d')]();});}};}function handleEntityNotFound(_0x2952c1,_0x4214c0){return function(_0x22d3f5){if(!_0x22d3f5){_0x2952c1[_0x3193('0x1b')](0x194);}return _0x22d3f5;};}function handleError(_0x265199,_0x48dd5c){_0x48dd5c=_0x48dd5c||0x1f4;return function(_0x19acde){logger['error'](_0x19acde['stack']);if(_0x19acde[_0x3193('0x28')]){delete _0x19acde['name'];}_0x265199[_0x3193('0x1c')](_0x48dd5c)['send'](_0x19acde);};}exports[_0x3193('0x29')]=function(_0x5154f0,_0x123692){var _0x4598d5={},_0x4a38b7={},_0x4b07f2={'count':0x0,'rows':[]};var _0x5142a2=_[_0x3193('0x2a')](db[_0x3193('0x2b')][_0x3193('0x2c')],function(_0x1a154e){return{'name':_0x1a154e[_0x3193('0x2d')],'type':_0x1a154e[_0x3193('0x2e')][_0x3193('0x2f')]};});_0x4a38b7[_0x3193('0x30')]=_['map'](_0x5142a2,_0x3193('0x28'));_0x4a38b7['query']=_[_0x3193('0x31')](_0x5154f0[_0x3193('0x32')]);_0x4a38b7[_0x3193('0x33')]=_['intersection'](_0x4a38b7[_0x3193('0x30')],_0x4a38b7[_0x3193('0x32')]);_0x4598d5[_0x3193('0x34')]=_['intersection'](_0x4a38b7[_0x3193('0x30')],qs[_0x3193('0x35')](_0x5154f0['query'][_0x3193('0x35')]));_0x4598d5[_0x3193('0x34')]=_0x4598d5[_0x3193('0x34')]['length']?_0x4598d5[_0x3193('0x34')]:_0x4a38b7['model'];if(!_0x5154f0[_0x3193('0x32')]['hasOwnProperty'](_0x3193('0x36'))){_0x4598d5[_0x3193('0x22')]=qs[_0x3193('0x22')](_0x5154f0[_0x3193('0x32')][_0x3193('0x22')]);_0x4598d5[_0x3193('0x1f')]=qs['offset'](_0x5154f0[_0x3193('0x32')][_0x3193('0x1f')]);}_0x4598d5[_0x3193('0x37')]=qs[_0x3193('0x38')](_0x5154f0[_0x3193('0x32')][_0x3193('0x38')]);_0x4598d5[_0x3193('0x39')]=qs[_0x3193('0x33')](_[_0x3193('0x3a')](_0x5154f0['query'],_0x4a38b7[_0x3193('0x33')]),_0x5142a2);if(_0x5154f0['query'][_0x3193('0x3b')]){_0x4598d5[_0x3193('0x39')]=_[_0x3193('0x3c')](_0x4598d5[_0x3193('0x39')],{'$or':_[_0x3193('0x2a')](_0x5142a2,function(_0x1e0d5d){if(_0x1e0d5d['type']!=='VIRTUAL'){var _0x45b357={};_0x45b357[_0x1e0d5d[_0x3193('0x28')]]={'$like':'%'+_0x5154f0['query']['filter']+'%'};return _0x45b357;}})});}_0x4598d5=_[_0x3193('0x3c')]({},_0x4598d5,_0x5154f0[_0x3193('0x3d')]);var _0x39380e={'where':_0x4598d5[_0x3193('0x39')]};return db[_0x3193('0x2b')][_0x3193('0x21')](_0x39380e)[_0x3193('0x27')](function(_0x4c1dee){_0x4b07f2[_0x3193('0x21')]=_0x4c1dee;if(_0x5154f0[_0x3193('0x32')][_0x3193('0x3e')]){_0x4598d5[_0x3193('0x3f')]=[{'all':!![]}];}return db[_0x3193('0x2b')][_0x3193('0x40')](_0x4598d5);})['then'](function(_0x2c9405){_0x4b07f2[_0x3193('0x41')]=_0x2c9405;return _0x4b07f2;})[_0x3193('0x27')](respondWithFilteredResult(_0x123692,_0x4598d5))['catch'](handleError(_0x123692,null));};exports[_0x3193('0x42')]=function(_0xe9c20d,_0x29e198){var _0x483593={'raw':!![],'where':{'id':_0xe9c20d[_0x3193('0x43')]['id']}},_0x2917ed={};_0x2917ed['model']=_[_0x3193('0x31')](db[_0x3193('0x2b')][_0x3193('0x2c')]);_0x2917ed[_0x3193('0x32')]=_[_0x3193('0x31')](_0xe9c20d[_0x3193('0x32')]);_0x2917ed[_0x3193('0x33')]=_[_0x3193('0x44')](_0x2917ed[_0x3193('0x30')],_0x2917ed[_0x3193('0x32')]);_0x483593[_0x3193('0x34')]=_[_0x3193('0x44')](_0x2917ed['model'],qs['fields'](_0xe9c20d['query'][_0x3193('0x35')]));_0x483593[_0x3193('0x34')]=_0x483593[_0x3193('0x34')][_0x3193('0x45')]?_0x483593[_0x3193('0x34')]:_0x2917ed[_0x3193('0x30')];if(_0xe9c20d[_0x3193('0x32')][_0x3193('0x3e')]){_0x483593[_0x3193('0x3f')]=[{'all':!![]}];}_0x483593=_[_0x3193('0x3c')]({},_0x483593,_0xe9c20d[_0x3193('0x3d')]);return db[_0x3193('0x2b')][_0x3193('0x46')](_0x483593)[_0x3193('0x27')](handleEntityNotFound(_0x29e198,null))['then'](respondWithResult(_0x29e198,null))[_0x3193('0x47')](handleError(_0x29e198,null));};exports[_0x3193('0x48')]=function(_0x239992,_0x142b7a){return db[_0x3193('0x2b')][_0x3193('0x48')](_0x239992[_0x3193('0x49')],{})[_0x3193('0x27')](respondWithResult(_0x142b7a,0xc9))[_0x3193('0x47')](handleError(_0x142b7a,null));};exports['update']=function(_0x40f0ea,_0xe1100e){if(_0x40f0ea['body']['id']){delete _0x40f0ea[_0x3193('0x49')]['id'];}return db[_0x3193('0x2b')][_0x3193('0x46')]({'where':{'id':_0x40f0ea[_0x3193('0x43')]['id']}})[_0x3193('0x27')](handleEntityNotFound(_0xe1100e,null))[_0x3193('0x27')](saveUpdates(_0x40f0ea[_0x3193('0x49')],null))['then'](respondWithResult(_0xe1100e,null))[_0x3193('0x47')](handleError(_0xe1100e,null));};exports[_0x3193('0x4a')]=function(_0x2ce277,_0x76b7ff){return db['AnalyticTreeReport']['find']({'where':{'id':_0x2ce277['params']['id']}})[_0x3193('0x27')](handleEntityNotFound(_0x76b7ff,null))[_0x3193('0x27')](removeEntity(_0x76b7ff,null))[_0x3193('0x47')](handleError(_0x76b7ff,null));}; \ No newline at end of file diff --git a/server/api/analyticTreeReport/analyticTreeReport.model.js b/server/api/analyticTreeReport/analyticTreeReport.model.js index 7fc1db8..31c7ec2 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 _0x8833=['analytics_report_trees','lodash','util','../../config/logger','moment','bluebird','request-promise','path','exports','define','AnalyticTreeReport'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x8833,0x1a3));var _0x3883=function(_0x3e732b,_0x2d3e5f){_0x3e732b=_0x3e732b-0x0;var _0x2c1d21=_0x8833[_0x3e732b];return _0x2c1d21;};'use strict';var _=require(_0x3883('0x0'));var util=require(_0x3883('0x1'));var logger=require(_0x3883('0x2'))('api');var moment=require(_0x3883('0x3'));var BPromise=require(_0x3883('0x4'));var rp=require(_0x3883('0x5'));var fs=require('fs');var path=require(_0x3883('0x6'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require('./analyticTreeReport.attributes');module[_0x3883('0x7')]=function(_0x4b55a8,_0x185fc2){return _0x4b55a8[_0x3883('0x8')](_0x3883('0x9'),attributes,{'tableName':_0x3883('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xcd14=['define','AnalyticTreeReport','analytics_report_trees','util','api','moment','bluebird','request-promise','path','./analyticTreeReport.attributes','exports'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0xcd14,0x7c));var _0x4cd1=function(_0xb2fe10,_0x1122e7){_0xb2fe10=_0xb2fe10-0x0;var _0x19ff8c=_0xcd14[_0xb2fe10];return _0x19ff8c;};'use strict';var _=require('lodash');var util=require(_0x4cd1('0x0'));var logger=require('../../config/logger')(_0x4cd1('0x1'));var moment=require(_0x4cd1('0x2'));var BPromise=require(_0x4cd1('0x3'));var rp=require(_0x4cd1('0x4'));var fs=require('fs');var path=require(_0x4cd1('0x5'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x4cd1('0x6'));module[_0x4cd1('0x7')]=function(_0x362fd7,_0x4a57ae){return _0x362fd7[_0x4cd1('0x8')](_0x4cd1('0x9'),attributes,{'tableName':_0x4cd1('0xa'),'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 2423b0e..fefa6ab 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 _0xadb5=['error','code','message','result','catch','util','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','info','AnalyticTreeReport,\x20%s,\x20%s','request\x20sent','stringify'];(function(_0x5713f2,_0x40ef5f){var _0x52232b=function(_0x3b30f1){while(--_0x3b30f1){_0x5713f2['push'](_0x5713f2['shift']());}};_0x52232b(++_0x40ef5f);}(_0xadb5,0xad));var _0x5adb=function(_0x47dcf7,_0x931744){_0x47dcf7=_0x47dcf7-0x0;var _0x98234c=_0xadb5[_0x47dcf7];return _0x98234c;};'use strict';var _=require('lodash');var util=require(_0x5adb('0x0'));var moment=require('moment');var BPromise=require(_0x5adb('0x1'));var rs=require(_0x5adb('0x2'));var fs=require('fs');var Redis=require(_0x5adb('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x5adb('0x4'));var logger=require(_0x5adb('0x5'))(_0x5adb('0x6'));var config=require('../../config/environment');var jayson=require(_0x5adb('0x7'));var client=jayson[_0x5adb('0x8')][_0x5adb('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x3213e8,_0xdf3776,_0x353885){return new BPromise(function(_0x47228a,_0x6d1b45){return client[_0x5adb('0xa')](_0x3213e8,_0x353885)[_0x5adb('0xb')](function(_0x34f59d){logger[_0x5adb('0xc')](_0x5adb('0xd'),_0xdf3776,_0x5adb('0xe'));logger['debug']('AnalyticTreeReport,\x20%s,\x20%s,\x20%s',_0xdf3776,_0x5adb('0xe'),JSON[_0x5adb('0xf')](_0x34f59d));if(_0x34f59d[_0x5adb('0x10')]){if(_0x34f59d['error'][_0x5adb('0x11')]===0x1f4){logger['error'](_0x5adb('0xd'),_0xdf3776,_0x34f59d['error'][_0x5adb('0x12')]);return _0x6d1b45(_0x34f59d[_0x5adb('0x10')][_0x5adb('0x12')]);}logger['error'](_0x5adb('0xd'),_0xdf3776,_0x34f59d[_0x5adb('0x10')][_0x5adb('0x12')]);return _0x47228a(_0x34f59d['error'][_0x5adb('0x12')]);}else{logger['info'](_0x5adb('0xd'),_0xdf3776,_0x5adb('0xe'));_0x47228a(_0x34f59d[_0x5adb('0x13')][_0x5adb('0x12')]);}})[_0x5adb('0x14')](function(_0x39d24d){logger[_0x5adb('0x10')](_0x5adb('0xd'),_0xdf3776,_0x39d24d);_0x6d1b45(_0x39d24d);});});} \ 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(_0x3b380d,_0x4bf247){var _0x54502b=function(_0x35d207){while(--_0x35d207){_0x3b380d['push'](_0x3b380d['shift']());}};_0x54502b(++_0x4bf247);}(_0x7a54,0x106));var _0x47a5=function(_0x5f564a,_0x332659){_0x5f564a=_0x5f564a-0x0;var _0x3aff26=_0x7a54[_0x5f564a];return _0x3aff26;};'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 b77b131..57e9e0c 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 _0xe2d4=['Router','fs-extra','../../config/environment','index','/:id','isAuthenticated','post','create','put','update','destroy','exports','multer','util','connect-timeout','express'];(function(_0x29fda2,_0x2a3d9f){var _0x2a1729=function(_0x3f5642){while(--_0x3f5642){_0x29fda2['push'](_0x29fda2['shift']());}};_0x2a1729(++_0x2a3d9f);}(_0xe2d4,0xcc));var _0x4e2d=function(_0x37e810,_0x2d554f){_0x37e810=_0x37e810-0x0;var _0x1c37ca=_0xe2d4[_0x37e810];return _0x1c37ca;};'use strict';var multer=require(_0x4e2d('0x0'));var util=require(_0x4e2d('0x1'));var path=require('path');var timeout=require(_0x4e2d('0x2'));var express=require(_0x4e2d('0x3'));var router=express[_0x4e2d('0x4')]();var fs_extra=require(_0x4e2d('0x5'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x4e2d('0x6'));var controller=require('./analyticTreeReport.controller');router['get']('/',auth['isAuthenticated'](),controller[_0x4e2d('0x7')]);router['get'](_0x4e2d('0x8'),auth[_0x4e2d('0x9')](),controller['show']);router[_0x4e2d('0xa')]('/',auth[_0x4e2d('0x9')](),controller[_0x4e2d('0xb')]);router[_0x4e2d('0xc')](_0x4e2d('0x8'),auth[_0x4e2d('0x9')](),controller[_0x4e2d('0xd')]);router['delete'](_0x4e2d('0x8'),auth[_0x4e2d('0x9')](),controller[_0x4e2d('0xe')]);module[_0x4e2d('0xf')]=router; \ No newline at end of file +var _0xf283=['exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./analyticTreeReport.controller','get','isAuthenticated','index','/:id','show','create','put','update','delete','destroy'];(function(_0x471d19,_0x54b2cb){var _0x41f295=function(_0x164c4c){while(--_0x164c4c){_0x471d19['push'](_0x471d19['shift']());}};_0x41f295(++_0x54b2cb);}(_0xf283,0xe8));var _0x3f28=function(_0x41c600,_0x3bf754){_0x41c600=_0x41c600-0x0;var _0x1fddfd=_0xf283[_0x41c600];return _0x1fddfd;};'use strict';var multer=require(_0x3f28('0x0'));var util=require(_0x3f28('0x1'));var path=require(_0x3f28('0x2'));var timeout=require(_0x3f28('0x3'));var express=require(_0x3f28('0x4'));var router=express[_0x3f28('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0x3f28('0x6'));var interaction=require(_0x3f28('0x7'));var config=require(_0x3f28('0x8'));var controller=require(_0x3f28('0x9'));router[_0x3f28('0xa')]('/',auth[_0x3f28('0xb')](),controller[_0x3f28('0xc')]);router[_0x3f28('0xa')](_0x3f28('0xd'),auth[_0x3f28('0xb')](),controller[_0x3f28('0xe')]);router['post']('/',auth[_0x3f28('0xb')](),controller[_0x3f28('0xf')]);router[_0x3f28('0x10')]('/:id',auth[_0x3f28('0xb')](),controller[_0x3f28('0x11')]);router[_0x3f28('0x12')](_0x3f28('0xd'),auth[_0x3f28('0xb')](),controller[_0x3f28('0x13')]);module[_0x3f28('0x14')]=router; \ No newline at end of file diff --git a/server/api/attachment/attachment.attributes.js b/server/api/attachment/attachment.attributes.js index e9ef45c..49aab06 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 _0xe739=['STRING','sequelize'];(function(_0x1e172a,_0x52102b){var _0x96338b=function(_0x307313){while(--_0x307313){_0x1e172a['push'](_0x1e172a['shift']());}};_0x96338b(++_0x52102b);}(_0xe739,0x105));var _0x9e73=function(_0x2e081b,_0x5d0536){_0x2e081b=_0x2e081b-0x0;var _0x39a603=_0xe739[_0x2e081b];return _0x39a603;};'use strict';var Sequelize=require(_0x9e73('0x0'));module['exports']={'name':{'type':Sequelize[_0x9e73('0x1')]},'basename':{'type':Sequelize[_0x9e73('0x1')]},'type':{'type':Sequelize[_0x9e73('0x1')]}}; \ No newline at end of file +var _0xa101=['sequelize','exports','STRING'];(function(_0x342baa,_0x4a110f){var _0x1208f3=function(_0x56a645){while(--_0x56a645){_0x342baa['push'](_0x342baa['shift']());}};_0x1208f3(++_0x4a110f);}(_0xa101,0x15f));var _0x1a10=function(_0xcfeda9,_0xd418ae){_0xcfeda9=_0xcfeda9-0x0;var _0x4826c7=_0xa101[_0xcfeda9];return _0x4826c7;};'use strict';var Sequelize=require(_0x1a10('0x0'));module[_0x1a10('0x1')]={'name':{'type':Sequelize['STRING']},'basename':{'type':Sequelize[_0x1a10('0x2')]},'type':{'type':Sequelize[_0x1a10('0x2')]}}; \ No newline at end of file diff --git a/server/api/attachment/attachment.controller.js b/server/api/attachment/attachment.controller.js index 1618cf4..ddaa586 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 _0x4dbb=['moment','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','squel','crypto','jsforce','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/environment','sendStatus','status','end','offset','undefined','limit','count','set','json','reject','save','update','destroy','then','error','name','send','index','Attachment','rawAttributes','fieldName','type','key','model','map','query','keys','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','merge','options','includeAll','include','findAll','rows','catch','show','params','find','clone','get','omit','createdAt','body','updatedAt','create','file','originalname','filename','mimetype','download','findOne','ChatOfflineMessageId','join','root','server/files/attachments/','offline-chat/','basename','eml-format','rimraf','zip-dir','fast-json-patch','request-promise'];(function(_0x15566d,_0x1074b1){var _0x48c71a=function(_0x4d3af3){while(--_0x4d3af3){_0x15566d['push'](_0x15566d['shift']());}};_0x48c71a(++_0x1074b1);}(_0x4dbb,0x1c7));var _0xb4db=function(_0x2d48fa,_0x103065){_0x2d48fa=_0x2d48fa-0x0;var _0x4645b7=_0x4dbb[_0x2d48fa];return _0x4645b7;};'use strict';var emlformat=require(_0xb4db('0x0'));var rimraf=require(_0xb4db('0x1'));var zipdir=require(_0xb4db('0x2'));var jsonpatch=require(_0xb4db('0x3'));var rp=require(_0xb4db('0x4'));var moment=require(_0xb4db('0x5'));var BPromise=require(_0xb4db('0x6'));var Mustache=require(_0xb4db('0x7'));var util=require('util');var path=require(_0xb4db('0x8'));var sox=require(_0xb4db('0x9'));var csv=require(_0xb4db('0xa'));var ejs=require(_0xb4db('0xb'));var fs=require('fs');var fs_extra=require(_0xb4db('0xc'));var _=require('lodash');var squel=require(_0xb4db('0xd'));var crypto=require(_0xb4db('0xe'));var jsforce=require(_0xb4db('0xf'));var deskjs=require('desk.js');var toCsv=require(_0xb4db('0xa'));var querystring=require(_0xb4db('0x10'));var Papa=require(_0xb4db('0x11'));var Redis=require('ioredis');var authService=require(_0xb4db('0x12'));var qs=require(_0xb4db('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0xb4db('0x14'))(_0xb4db('0x15'));var utils=require(_0xb4db('0x16'));var config=require(_0xb4db('0x17'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x2cd833,_0x5e2cd9){_0x5e2cd9=_0x5e2cd9||0xcc;return function(_0x4d2b7d){if(_0x4d2b7d){return _0x2cd833[_0xb4db('0x18')](_0x5e2cd9);}return _0x2cd833[_0xb4db('0x19')](_0x5e2cd9)[_0xb4db('0x1a')]();};}function respondWithResult(_0x27e541,_0xe479a0){_0xe479a0=_0xe479a0||0xc8;return function(_0x5f4b2e){if(_0x5f4b2e){return _0x27e541[_0xb4db('0x19')](_0xe479a0)['json'](_0x5f4b2e);}};}function respondWithFilteredResult(_0x3455ad,_0x5eae19){return function(_0x2f55b8){if(_0x2f55b8){var _0x286d23=typeof _0x5eae19[_0xb4db('0x1b')]===_0xb4db('0x1c')&&typeof _0x5eae19[_0xb4db('0x1d')]===_0xb4db('0x1c');var _0x19b146=_0x2f55b8[_0xb4db('0x1e')];var _0x26d2bb=_0x286d23?0x0:_0x5eae19[_0xb4db('0x1b')];var _0x499213=_0x286d23?_0x2f55b8[_0xb4db('0x1e')]:_0x5eae19[_0xb4db('0x1b')]+_0x5eae19[_0xb4db('0x1d')];var _0x1b9338;if(_0x499213>=_0x19b146){_0x499213=_0x19b146;_0x1b9338=0xc8;}else{_0x1b9338=0xce;}_0x3455ad[_0xb4db('0x19')](_0x1b9338);return _0x3455ad[_0xb4db('0x1f')]('Content-Range',_0x26d2bb+'-'+_0x499213+'/'+_0x19b146)[_0xb4db('0x20')](_0x2f55b8);}return null;};}function patchUpdates(_0x3214de){return function(_0x6e8872){try{jsonpatch['apply'](_0x6e8872,_0x3214de,!![]);}catch(_0x400c83){return BPromise[_0xb4db('0x21')](_0x400c83);}return _0x6e8872[_0xb4db('0x22')]();};}function saveUpdates(_0x4b926a,_0x5a8920){return function(_0x5910e7){if(_0x5910e7){return _0x5910e7[_0xb4db('0x23')](_0x4b926a)['then'](function(_0x251ced){return _0x251ced;});}return null;};}function removeEntity(_0x133738,_0x569451){return function(_0x5e44d1){if(_0x5e44d1){return _0x5e44d1[_0xb4db('0x24')]()[_0xb4db('0x25')](function(){_0x133738[_0xb4db('0x19')](0xcc)[_0xb4db('0x1a')]();});}};}function handleEntityNotFound(_0x132e94,_0x7af649){return function(_0x11a261){if(!_0x11a261){_0x132e94[_0xb4db('0x18')](0x194);}return _0x11a261;};}function handleError(_0x486575,_0x186e04){_0x186e04=_0x186e04||0x1f4;return function(_0x444e98){logger[_0xb4db('0x26')](_0x444e98['stack']);if(_0x444e98[_0xb4db('0x27')]){delete _0x444e98['name'];}_0x486575[_0xb4db('0x19')](_0x186e04)[_0xb4db('0x28')](_0x444e98);};}exports[_0xb4db('0x29')]=function(_0x30a0e5,_0xb6ab12){var _0x195723={},_0x3f9bf7={},_0x4edc9c={'count':0x0,'rows':[]};var _0x6541ce=_['map'](db[_0xb4db('0x2a')][_0xb4db('0x2b')],function(_0x2feece){return{'name':_0x2feece[_0xb4db('0x2c')],'type':_0x2feece[_0xb4db('0x2d')][_0xb4db('0x2e')]};});_0x3f9bf7[_0xb4db('0x2f')]=_[_0xb4db('0x30')](_0x6541ce,_0xb4db('0x27'));_0x3f9bf7[_0xb4db('0x31')]=_[_0xb4db('0x32')](_0x30a0e5[_0xb4db('0x31')]);_0x3f9bf7['filters']=_[_0xb4db('0x33')](_0x3f9bf7[_0xb4db('0x2f')],_0x3f9bf7[_0xb4db('0x31')]);_0x195723['attributes']=_[_0xb4db('0x33')](_0x3f9bf7[_0xb4db('0x2f')],qs['fields'](_0x30a0e5[_0xb4db('0x31')][_0xb4db('0x34')]));_0x195723[_0xb4db('0x35')]=_0x195723[_0xb4db('0x35')][_0xb4db('0x36')]?_0x195723[_0xb4db('0x35')]:_0x3f9bf7[_0xb4db('0x2f')];if(!_0x30a0e5[_0xb4db('0x31')][_0xb4db('0x37')](_0xb4db('0x38'))){_0x195723[_0xb4db('0x1d')]=qs[_0xb4db('0x1d')](_0x30a0e5[_0xb4db('0x31')][_0xb4db('0x1d')]);_0x195723[_0xb4db('0x1b')]=qs[_0xb4db('0x1b')](_0x30a0e5[_0xb4db('0x31')][_0xb4db('0x1b')]);}_0x195723[_0xb4db('0x39')]=qs[_0xb4db('0x3a')](_0x30a0e5[_0xb4db('0x31')][_0xb4db('0x3a')]);_0x195723[_0xb4db('0x3b')]=qs[_0xb4db('0x3c')](_[_0xb4db('0x3d')](_0x30a0e5[_0xb4db('0x31')],_0x3f9bf7[_0xb4db('0x3c')]),_0x6541ce);if(_0x30a0e5['query']['filter']){_0x195723[_0xb4db('0x3b')]=_['merge'](_0x195723['where'],{'$or':_['map'](_0x6541ce,function(_0x1894cf){if(_0x1894cf[_0xb4db('0x2d')]!=='VIRTUAL'){var _0x304a0e={};_0x304a0e[_0x1894cf['name']]={'$like':'%'+_0x30a0e5[_0xb4db('0x31')][_0xb4db('0x3e')]+'%'};return _0x304a0e;}})});}_0x195723=_[_0xb4db('0x3f')]({},_0x195723,_0x30a0e5[_0xb4db('0x40')]);var _0x57d93d={'where':_0x195723[_0xb4db('0x3b')]};return db[_0xb4db('0x2a')][_0xb4db('0x1e')](_0x57d93d)[_0xb4db('0x25')](function(_0x1b1bed){_0x4edc9c['count']=_0x1b1bed;if(_0x30a0e5['query'][_0xb4db('0x41')]){_0x195723[_0xb4db('0x42')]=[{'all':!![]}];}return db[_0xb4db('0x2a')][_0xb4db('0x43')](_0x195723);})['then'](function(_0x1ef0d9){_0x4edc9c[_0xb4db('0x44')]=_0x1ef0d9;return _0x4edc9c;})['then'](respondWithFilteredResult(_0xb6ab12,_0x195723))[_0xb4db('0x45')](handleError(_0xb6ab12,null));};exports[_0xb4db('0x46')]=function(_0x60a609,_0x43ba5c){var _0x3e94ae={'raw':!![],'where':{'id':_0x60a609[_0xb4db('0x47')]['id']}},_0x535e47={};_0x535e47['model']=_[_0xb4db('0x32')](db['Attachment'][_0xb4db('0x2b')]);_0x535e47['query']=_[_0xb4db('0x32')](_0x60a609[_0xb4db('0x31')]);_0x535e47['filters']=_[_0xb4db('0x33')](_0x535e47[_0xb4db('0x2f')],_0x535e47['query']);_0x3e94ae['attributes']=_['intersection'](_0x535e47[_0xb4db('0x2f')],qs['fields'](_0x60a609[_0xb4db('0x31')][_0xb4db('0x34')]));_0x3e94ae[_0xb4db('0x35')]=_0x3e94ae[_0xb4db('0x35')][_0xb4db('0x36')]?_0x3e94ae[_0xb4db('0x35')]:_0x535e47[_0xb4db('0x2f')];if(_0x60a609[_0xb4db('0x31')][_0xb4db('0x41')]){_0x3e94ae['include']=[{'all':!![]}];}_0x3e94ae=_[_0xb4db('0x3f')]({},_0x3e94ae,_0x60a609[_0xb4db('0x40')]);return db[_0xb4db('0x2a')][_0xb4db('0x48')](_0x3e94ae)['then'](handleEntityNotFound(_0x43ba5c,null))['then'](respondWithResult(_0x43ba5c,null))['catch'](handleError(_0x43ba5c,null));};exports[_0xb4db('0x49')]=function(_0x2ab13b,_0x196f1e){var _0x5f028a={'where':{'id':_0x2ab13b['params']['id']}},_0x42f7e7={};_0x42f7e7[_0xb4db('0x2f')]=_[_0xb4db('0x32')](db[_0xb4db('0x2a')][_0xb4db('0x2b')]);_0x5f028a[_0xb4db('0x35')]=_[_0xb4db('0x33')](_0x42f7e7[_0xb4db('0x2f')],qs[_0xb4db('0x34')](_0x2ab13b[_0xb4db('0x31')][_0xb4db('0x34')]));_0x5f028a[_0xb4db('0x35')]=_0x5f028a[_0xb4db('0x35')][_0xb4db('0x36')]?_0x5f028a['attributes']:_0x42f7e7[_0xb4db('0x2f')];if(_0x2ab13b[_0xb4db('0x31')][_0xb4db('0x41')]){_0x5f028a['include']=[{'all':!![]}];}_0x5f028a=_[_0xb4db('0x3f')]({},_0x5f028a,_0x2ab13b[_0xb4db('0x40')]);return db[_0xb4db('0x2a')][_0xb4db('0x48')](_0x5f028a)['then'](handleEntityNotFound(_0x196f1e,null))[_0xb4db('0x25')](function(_0x540c13){if(_0x540c13){var _0x27926e=_0x540c13[_0xb4db('0x4a')]({'plain':!![]});_0x27926e=qs[_0xb4db('0x4b')](_0x27926e,['id',_0xb4db('0x4c'),'updatedAt']);_0x2ab13b[_0xb4db('0x4d')]=_[_0xb4db('0x4b')](_0x2ab13b[_0xb4db('0x4d')],['id',_0xb4db('0x4c'),_0xb4db('0x4e')]);return db[_0xb4db('0x2a')][_0xb4db('0x4f')](_[_0xb4db('0x3f')](_0x27926e,_0x2ab13b['body']),{'include':_0x2ab13b[_0xb4db('0x31')]['includeAll']?[{'all':!![]}]:undefined});}})[_0xb4db('0x25')](respondWithResult(_0x196f1e,0xc9))['catch'](handleError(_0x196f1e,null));};exports[_0xb4db('0x23')]=function(_0x294616,_0x233032){if(_0x294616[_0xb4db('0x4d')]['id']){delete _0x294616[_0xb4db('0x4d')]['id'];}return db[_0xb4db('0x2a')]['find']({'where':{'id':_0x294616['params']['id']}})[_0xb4db('0x25')](handleEntityNotFound(_0x233032,null))['then'](saveUpdates(_0x294616['body'],null))[_0xb4db('0x25')](respondWithResult(_0x233032,null))[_0xb4db('0x45')](handleError(_0x233032,null));};exports[_0xb4db('0x24')]=function(_0x4874f1,_0x1ff9ff){return db['Attachment']['find']({'where':{'id':_0x4874f1[_0xb4db('0x47')]['id']}})['then'](handleEntityNotFound(_0x1ff9ff,null))[_0xb4db('0x25')](removeEntity(_0x1ff9ff,null))[_0xb4db('0x45')](handleError(_0x1ff9ff,null));};exports[_0xb4db('0x4f')]=function(_0x533dd3,_0x530742,_0x4ad895){_0x533dd3[_0xb4db('0x4d')][_0xb4db('0x27')]=_0x533dd3[_0xb4db('0x50')][_0xb4db('0x51')];_0x533dd3['body']['basename']=_0x533dd3['file'][_0xb4db('0x52')];_0x533dd3[_0xb4db('0x4d')][_0xb4db('0x2d')]=_0x533dd3[_0xb4db('0x50')][_0xb4db('0x53')];return db[_0xb4db('0x2a')][_0xb4db('0x4f')](_0x533dd3[_0xb4db('0x4d')])[_0xb4db('0x25')](respondWithResult(_0x530742,0xc9))[_0xb4db('0x45')](handleError(_0x530742,null));};exports[_0xb4db('0x54')]=function(_0x3fbb0f,_0x108d6a,_0x14de2b){return db[_0xb4db('0x2a')][_0xb4db('0x55')]({'where':{'id':_0x3fbb0f[_0xb4db('0x47')]['id']},'raw':!![]})[_0xb4db('0x25')](handleEntityNotFound(_0x108d6a,null))[_0xb4db('0x25')](function(_0x521d6c){if(_0x521d6c){var _0x1924ba=_0x521d6c[_0xb4db('0x56')]!==null;var _0x5ed203=path[_0xb4db('0x57')](config[_0xb4db('0x58')],_0xb4db('0x59'));if(_0x1924ba){_0x5ed203=path[_0xb4db('0x57')](_0x5ed203,_0xb4db('0x5a'));}var _0x3cada5=path[_0xb4db('0x57')](_0x5ed203,_0x521d6c[_0xb4db('0x5b')]);return _0x108d6a[_0xb4db('0x54')](_0x3cada5);}})[_0xb4db('0x45')](handleError(_0x108d6a,null));}; \ No newline at end of file +var _0x3d4b=['create','update','destroy','file','mimetype','download','findOne','ChatOfflineMessageId','join','root','server/files/attachments/','basename','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','lodash','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','end','json','offset','undefined','limit','count','status','set','Content-Range','apply','reject','then','error','name','index','map','Attachment','rawAttributes','type','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','pick','filter','where','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','params','find','clone','get','omit','createdAt','updatedAt','body'];(function(_0x1ca4c3,_0x554126){var _0x4426a6=function(_0x11e9b0){while(--_0x11e9b0){_0x1ca4c3['push'](_0x1ca4c3['shift']());}};_0x4426a6(++_0x554126);}(_0x3d4b,0x11d));var _0xb3d4=function(_0x5e0a3a,_0x5c5ec4){_0x5e0a3a=_0x5e0a3a-0x0;var _0x4327c9=_0x3d4b[_0x5e0a3a];return _0x4327c9;};'use strict';var emlformat=require(_0xb3d4('0x0'));var rimraf=require(_0xb3d4('0x1'));var zipdir=require(_0xb3d4('0x2'));var jsonpatch=require(_0xb3d4('0x3'));var rp=require(_0xb3d4('0x4'));var moment=require(_0xb3d4('0x5'));var BPromise=require(_0xb3d4('0x6'));var Mustache=require(_0xb3d4('0x7'));var util=require('util');var path=require(_0xb3d4('0x8'));var sox=require(_0xb3d4('0x9'));var csv=require(_0xb3d4('0xa'));var ejs=require(_0xb3d4('0xb'));var fs=require('fs');var fs_extra=require(_0xb3d4('0xc'));var _=require(_0xb3d4('0xd'));var squel=require('squel');var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0xb3d4('0xe'));var toCsv=require(_0xb3d4('0xa'));var querystring=require(_0xb3d4('0xf'));var Papa=require(_0xb3d4('0x10'));var Redis=require(_0xb3d4('0x11'));var authService=require(_0xb3d4('0x12'));var qs=require(_0xb3d4('0x13'));var as=require(_0xb3d4('0x14'));var hardwareService=require(_0xb3d4('0x15'));var logger=require(_0xb3d4('0x16'))(_0xb3d4('0x17'));var utils=require(_0xb3d4('0x18'));var config=require(_0xb3d4('0x19'));var licenseUtil=require(_0xb3d4('0x1a'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x4ebba3,_0x5652c6){_0x5652c6=_0x5652c6||0xcc;return function(_0x15dde4){if(_0x15dde4){return _0x4ebba3[_0xb3d4('0x1b')](_0x5652c6);}return _0x4ebba3['status'](_0x5652c6)[_0xb3d4('0x1c')]();};}function respondWithResult(_0x12aa1b,_0xb7ee9a){_0xb7ee9a=_0xb7ee9a||0xc8;return function(_0x127d12){if(_0x127d12){return _0x12aa1b['status'](_0xb7ee9a)[_0xb3d4('0x1d')](_0x127d12);}};}function respondWithFilteredResult(_0x3017d4,_0x3ecf77){return function(_0x130b25){if(_0x130b25){var _0x22dbe4=typeof _0x3ecf77[_0xb3d4('0x1e')]===_0xb3d4('0x1f')&&typeof _0x3ecf77[_0xb3d4('0x20')]===_0xb3d4('0x1f');var _0x538fc3=_0x130b25[_0xb3d4('0x21')];var _0x184fce=_0x22dbe4?0x0:_0x3ecf77[_0xb3d4('0x1e')];var _0x314fd3=_0x22dbe4?_0x130b25[_0xb3d4('0x21')]:_0x3ecf77[_0xb3d4('0x1e')]+_0x3ecf77[_0xb3d4('0x20')];var _0x24b1f1;if(_0x314fd3>=_0x538fc3){_0x314fd3=_0x538fc3;_0x24b1f1=0xc8;}else{_0x24b1f1=0xce;}_0x3017d4[_0xb3d4('0x22')](_0x24b1f1);return _0x3017d4[_0xb3d4('0x23')](_0xb3d4('0x24'),_0x184fce+'-'+_0x314fd3+'/'+_0x538fc3)[_0xb3d4('0x1d')](_0x130b25);}return null;};}function patchUpdates(_0x53f029){return function(_0x2c4e25){try{jsonpatch[_0xb3d4('0x25')](_0x2c4e25,_0x53f029,!![]);}catch(_0x231704){return BPromise[_0xb3d4('0x26')](_0x231704);}return _0x2c4e25['save']();};}function saveUpdates(_0x1c1a11,_0xec139c){return function(_0x5ce742){if(_0x5ce742){return _0x5ce742['update'](_0x1c1a11)[_0xb3d4('0x27')](function(_0x52f54b){return _0x52f54b;});}return null;};}function removeEntity(_0x325013,_0x54a7de){return function(_0x5bb5e6){if(_0x5bb5e6){return _0x5bb5e6['destroy']()[_0xb3d4('0x27')](function(){_0x325013['status'](0xcc)[_0xb3d4('0x1c')]();});}};}function handleEntityNotFound(_0x5a07f4,_0x403abb){return function(_0x4653bc){if(!_0x4653bc){_0x5a07f4[_0xb3d4('0x1b')](0x194);}return _0x4653bc;};}function handleError(_0x18a0e2,_0x525493){_0x525493=_0x525493||0x1f4;return function(_0x18dad9){logger[_0xb3d4('0x28')](_0x18dad9['stack']);if(_0x18dad9[_0xb3d4('0x29')]){delete _0x18dad9[_0xb3d4('0x29')];}_0x18a0e2[_0xb3d4('0x22')](_0x525493)['send'](_0x18dad9);};}exports[_0xb3d4('0x2a')]=function(_0x47d176,_0x2196b3){var _0x58b3bb={},_0x43d27d={},_0x2d374d={'count':0x0,'rows':[]};var _0x3bf295=_[_0xb3d4('0x2b')](db[_0xb3d4('0x2c')][_0xb3d4('0x2d')],function(_0x23357d){return{'name':_0x23357d['fieldName'],'type':_0x23357d[_0xb3d4('0x2e')][_0xb3d4('0x2f')]};});_0x43d27d[_0xb3d4('0x30')]=_[_0xb3d4('0x2b')](_0x3bf295,'name');_0x43d27d[_0xb3d4('0x31')]=_[_0xb3d4('0x32')](_0x47d176['query']);_0x43d27d[_0xb3d4('0x33')]=_[_0xb3d4('0x34')](_0x43d27d[_0xb3d4('0x30')],_0x43d27d[_0xb3d4('0x31')]);_0x58b3bb['attributes']=_['intersection'](_0x43d27d[_0xb3d4('0x30')],qs[_0xb3d4('0x35')](_0x47d176[_0xb3d4('0x31')][_0xb3d4('0x35')]));_0x58b3bb[_0xb3d4('0x36')]=_0x58b3bb[_0xb3d4('0x36')][_0xb3d4('0x37')]?_0x58b3bb[_0xb3d4('0x36')]:_0x43d27d[_0xb3d4('0x30')];if(!_0x47d176[_0xb3d4('0x31')][_0xb3d4('0x38')](_0xb3d4('0x39'))){_0x58b3bb[_0xb3d4('0x20')]=qs['limit'](_0x47d176[_0xb3d4('0x31')][_0xb3d4('0x20')]);_0x58b3bb['offset']=qs[_0xb3d4('0x1e')](_0x47d176[_0xb3d4('0x31')][_0xb3d4('0x1e')]);}_0x58b3bb[_0xb3d4('0x3a')]=qs[_0xb3d4('0x3b')](_0x47d176[_0xb3d4('0x31')]['sort']);_0x58b3bb['where']=qs[_0xb3d4('0x33')](_[_0xb3d4('0x3c')](_0x47d176[_0xb3d4('0x31')],_0x43d27d['filters']),_0x3bf295);if(_0x47d176['query'][_0xb3d4('0x3d')]){_0x58b3bb[_0xb3d4('0x3e')]=_[_0xb3d4('0x3f')](_0x58b3bb[_0xb3d4('0x3e')],{'$or':_[_0xb3d4('0x2b')](_0x3bf295,function(_0x15e500){if(_0x15e500[_0xb3d4('0x2e')]!==_0xb3d4('0x40')){var _0x290aca={};_0x290aca[_0x15e500[_0xb3d4('0x29')]]={'$like':'%'+_0x47d176[_0xb3d4('0x31')][_0xb3d4('0x3d')]+'%'};return _0x290aca;}})});}_0x58b3bb=_[_0xb3d4('0x3f')]({},_0x58b3bb,_0x47d176[_0xb3d4('0x41')]);var _0x95b2a1={'where':_0x58b3bb[_0xb3d4('0x3e')]};return db[_0xb3d4('0x2c')][_0xb3d4('0x21')](_0x95b2a1)[_0xb3d4('0x27')](function(_0x4efacf){_0x2d374d[_0xb3d4('0x21')]=_0x4efacf;if(_0x47d176[_0xb3d4('0x31')][_0xb3d4('0x42')]){_0x58b3bb[_0xb3d4('0x43')]=[{'all':!![]}];}return db[_0xb3d4('0x2c')][_0xb3d4('0x44')](_0x58b3bb);})['then'](function(_0xbc5f3f){_0x2d374d[_0xb3d4('0x45')]=_0xbc5f3f;return _0x2d374d;})[_0xb3d4('0x27')](respondWithFilteredResult(_0x2196b3,_0x58b3bb))[_0xb3d4('0x46')](handleError(_0x2196b3,null));};exports['show']=function(_0xef3d10,_0x4d0187){var _0xc9bee5={'raw':!![],'where':{'id':_0xef3d10[_0xb3d4('0x47')]['id']}},_0x23a8c7={};_0x23a8c7[_0xb3d4('0x30')]=_[_0xb3d4('0x32')](db[_0xb3d4('0x2c')]['rawAttributes']);_0x23a8c7[_0xb3d4('0x31')]=_[_0xb3d4('0x32')](_0xef3d10[_0xb3d4('0x31')]);_0x23a8c7['filters']=_[_0xb3d4('0x34')](_0x23a8c7[_0xb3d4('0x30')],_0x23a8c7[_0xb3d4('0x31')]);_0xc9bee5['attributes']=_[_0xb3d4('0x34')](_0x23a8c7['model'],qs[_0xb3d4('0x35')](_0xef3d10[_0xb3d4('0x31')][_0xb3d4('0x35')]));_0xc9bee5[_0xb3d4('0x36')]=_0xc9bee5['attributes'][_0xb3d4('0x37')]?_0xc9bee5['attributes']:_0x23a8c7[_0xb3d4('0x30')];if(_0xef3d10[_0xb3d4('0x31')]['includeAll']){_0xc9bee5['include']=[{'all':!![]}];}_0xc9bee5=_['merge']({},_0xc9bee5,_0xef3d10[_0xb3d4('0x41')]);return db['Attachment'][_0xb3d4('0x48')](_0xc9bee5)['then'](handleEntityNotFound(_0x4d0187,null))[_0xb3d4('0x27')](respondWithResult(_0x4d0187,null))[_0xb3d4('0x46')](handleError(_0x4d0187,null));};exports[_0xb3d4('0x49')]=function(_0x5bb157,_0x92186){var _0x34e78c={'where':{'id':_0x5bb157[_0xb3d4('0x47')]['id']}},_0x34e7ad={};_0x34e7ad[_0xb3d4('0x30')]=_[_0xb3d4('0x32')](db[_0xb3d4('0x2c')]['rawAttributes']);_0x34e78c[_0xb3d4('0x36')]=_['intersection'](_0x34e7ad[_0xb3d4('0x30')],qs['fields'](_0x5bb157['query'][_0xb3d4('0x35')]));_0x34e78c['attributes']=_0x34e78c[_0xb3d4('0x36')]['length']?_0x34e78c[_0xb3d4('0x36')]:_0x34e7ad[_0xb3d4('0x30')];if(_0x5bb157['query'][_0xb3d4('0x42')]){_0x34e78c['include']=[{'all':!![]}];}_0x34e78c=_[_0xb3d4('0x3f')]({},_0x34e78c,_0x5bb157[_0xb3d4('0x41')]);return db[_0xb3d4('0x2c')]['find'](_0x34e78c)[_0xb3d4('0x27')](handleEntityNotFound(_0x92186,null))[_0xb3d4('0x27')](function(_0x1abb4b){if(_0x1abb4b){var _0x363f85=_0x1abb4b[_0xb3d4('0x4a')]({'plain':!![]});_0x363f85=qs[_0xb3d4('0x4b')](_0x363f85,['id',_0xb3d4('0x4c'),_0xb3d4('0x4d')]);_0x5bb157[_0xb3d4('0x4e')]=_[_0xb3d4('0x4b')](_0x5bb157[_0xb3d4('0x4e')],['id',_0xb3d4('0x4c'),_0xb3d4('0x4d')]);return db['Attachment'][_0xb3d4('0x4f')](_[_0xb3d4('0x3f')](_0x363f85,_0x5bb157[_0xb3d4('0x4e')]),{'include':_0x5bb157[_0xb3d4('0x31')][_0xb3d4('0x42')]?[{'all':!![]}]:undefined});}})[_0xb3d4('0x27')](respondWithResult(_0x92186,0xc9))['catch'](handleError(_0x92186,null));};exports[_0xb3d4('0x50')]=function(_0x15a7b6,_0x83556e){if(_0x15a7b6[_0xb3d4('0x4e')]['id']){delete _0x15a7b6['body']['id'];}return db[_0xb3d4('0x2c')][_0xb3d4('0x48')]({'where':{'id':_0x15a7b6[_0xb3d4('0x47')]['id']}})[_0xb3d4('0x27')](handleEntityNotFound(_0x83556e,null))[_0xb3d4('0x27')](saveUpdates(_0x15a7b6['body'],null))[_0xb3d4('0x27')](respondWithResult(_0x83556e,null))[_0xb3d4('0x46')](handleError(_0x83556e,null));};exports[_0xb3d4('0x51')]=function(_0x269c64,_0x1ec7a8){return db['Attachment']['find']({'where':{'id':_0x269c64[_0xb3d4('0x47')]['id']}})[_0xb3d4('0x27')](handleEntityNotFound(_0x1ec7a8,null))['then'](removeEntity(_0x1ec7a8,null))[_0xb3d4('0x46')](handleError(_0x1ec7a8,null));};exports['create']=function(_0x134d30,_0x182a25,_0x4702e9){_0x134d30[_0xb3d4('0x4e')]['name']=_0x134d30[_0xb3d4('0x52')]['originalname'];_0x134d30['body']['basename']=_0x134d30['file']['filename'];_0x134d30[_0xb3d4('0x4e')][_0xb3d4('0x2e')]=_0x134d30['file'][_0xb3d4('0x53')];return db[_0xb3d4('0x2c')]['create'](_0x134d30[_0xb3d4('0x4e')])[_0xb3d4('0x27')](respondWithResult(_0x182a25,0xc9))[_0xb3d4('0x46')](handleError(_0x182a25,null));};exports[_0xb3d4('0x54')]=function(_0x3d5646,_0x50c1d9,_0x226154){return db['Attachment'][_0xb3d4('0x55')]({'where':{'id':_0x3d5646[_0xb3d4('0x47')]['id']},'raw':!![]})['then'](handleEntityNotFound(_0x50c1d9,null))[_0xb3d4('0x27')](function(_0x492d17){if(_0x492d17){var _0x1eb77d=_0x492d17[_0xb3d4('0x56')]!==null;var _0x379b1f=path[_0xb3d4('0x57')](config[_0xb3d4('0x58')],_0xb3d4('0x59'));if(_0x1eb77d){_0x379b1f=path[_0xb3d4('0x57')](_0x379b1f,'offline-chat/');}var _0x4e6276=path['join'](_0x379b1f,_0x492d17[_0xb3d4('0x5a')]);return _0x50c1d9[_0xb3d4('0x54')](_0x4e6276);}})[_0xb3d4('0x46')](handleError(_0x50c1d9,null));}; \ No newline at end of file diff --git a/server/api/attachment/attachment.model.js b/server/api/attachment/attachment.model.js index a5fdd68..ee38897 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 _0xd93e=['request-promise','path','rimraf','../../config/environment','./attachment.attributes','exports','define','Attachment','lodash','../../config/logger','api','bluebird'];(function(_0x429b64,_0x2c9204){var _0x2a42be=function(_0x148666){while(--_0x148666){_0x429b64['push'](_0x429b64['shift']());}};_0x2a42be(++_0x2c9204);}(_0xd93e,0x1ac));var _0xed93=function(_0x4ff09b,_0x53f67d){_0x4ff09b=_0x4ff09b-0x0;var _0x3f5c2e=_0xd93e[_0x4ff09b];return _0x3f5c2e;};'use strict';var _=require(_0xed93('0x0'));var util=require('util');var logger=require(_0xed93('0x1'))(_0xed93('0x2'));var moment=require('moment');var BPromise=require(_0xed93('0x3'));var rp=require(_0xed93('0x4'));var fs=require('fs');var path=require(_0xed93('0x5'));var rimraf=require(_0xed93('0x6'));var config=require(_0xed93('0x7'));var attributes=require(_0xed93('0x8'));module[_0xed93('0x9')]=function(_0xeaba25,_0xcaf7fb){return _0xeaba25[_0xed93('0xa')](_0xed93('0xb'),attributes,{'tableName':'attachments','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xabc3=['Attachment','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./attachment.attributes','exports','define'];(function(_0x1f4b18,_0x4e777c){var _0xde3957=function(_0x1dcbbc){while(--_0x1dcbbc){_0x1f4b18['push'](_0x1f4b18['shift']());}};_0xde3957(++_0x4e777c);}(_0xabc3,0x16d));var _0x3abc=function(_0x278a09,_0xfc646a){_0x278a09=_0x278a09-0x0;var _0x8cc792=_0xabc3[_0x278a09];return _0x8cc792;};'use strict';var _=require(_0x3abc('0x0'));var util=require(_0x3abc('0x1'));var logger=require(_0x3abc('0x2'))(_0x3abc('0x3'));var moment=require(_0x3abc('0x4'));var BPromise=require(_0x3abc('0x5'));var rp=require(_0x3abc('0x6'));var fs=require('fs');var path=require(_0x3abc('0x7'));var rimraf=require(_0x3abc('0x8'));var config=require(_0x3abc('0x9'));var attributes=require(_0x3abc('0xa'));module[_0x3abc('0xb')]=function(_0x425db7,_0x47389b){return _0x425db7[_0x3abc('0xc')](_0x3abc('0xd'),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 84ade8e..734d002 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 _0xa74f=['then','info','Attachment,\x20%s,\x20%s','debug','Attachment,\x20%s,\x20%s,\x20%s','stringify','error','code','message','request\x20sent','result','catch','CreateAttachment','Attachment','body','options','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','http'];(function(_0x599f41,_0x4db732){var _0x2e4d58=function(_0x14c882){while(--_0x14c882){_0x599f41['push'](_0x599f41['shift']());}};_0x2e4d58(++_0x4db732);}(_0xa74f,0x9a));var _0xfa74=function(_0x15797a,_0x16274f){_0x15797a=_0x15797a-0x0;var _0x3e2618=_0xa74f[_0x15797a];return _0x3e2618;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xfa74('0x0'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xfa74('0x1'));var db=require(_0xfa74('0x2'))['db'];var utils=require(_0xfa74('0x3'));var logger=require(_0xfa74('0x4'))('rpc');var config=require(_0xfa74('0x5'));var jayson=require('jayson/promise');var client=jayson['client'][_0xfa74('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x9ddbd2,_0x3ac32e,_0x2d9fa9){return new BPromise(function(_0x287921,_0x344e04){return client['request'](_0x9ddbd2,_0x2d9fa9)[_0xfa74('0x7')](function(_0x37d4d8){logger[_0xfa74('0x8')](_0xfa74('0x9'),_0x3ac32e,'request\x20sent');logger[_0xfa74('0xa')](_0xfa74('0xb'),_0x3ac32e,'request\x20sent',JSON[_0xfa74('0xc')](_0x37d4d8));if(_0x37d4d8[_0xfa74('0xd')]){if(_0x37d4d8[_0xfa74('0xd')][_0xfa74('0xe')]===0x1f4){logger['error'](_0xfa74('0x9'),_0x3ac32e,_0x37d4d8[_0xfa74('0xd')][_0xfa74('0xf')]);return _0x344e04(_0x37d4d8[_0xfa74('0xd')]['message']);}logger[_0xfa74('0xd')](_0xfa74('0x9'),_0x3ac32e,_0x37d4d8[_0xfa74('0xd')][_0xfa74('0xf')]);return _0x287921(_0x37d4d8[_0xfa74('0xd')]['message']);}else{logger[_0xfa74('0x8')](_0xfa74('0x9'),_0x3ac32e,_0xfa74('0x10'));_0x287921(_0x37d4d8[_0xfa74('0x11')][_0xfa74('0xf')]);}})[_0xfa74('0x12')](function(_0x3b9e32){logger['error'](_0xfa74('0x9'),_0x3ac32e,_0x3b9e32);_0x344e04(_0x3b9e32);});});}exports[_0xfa74('0x13')]=function(_0x51dda1){var _0x4928b6=this;return new Promise(function(_0x31d3c1,_0x25a36b){return db[_0xfa74('0x14')]['create'](_0x51dda1[_0xfa74('0x15')],{'raw':_0x51dda1[_0xfa74('0x16')]?_0x51dda1[_0xfa74('0x16')]['raw']===undefined?!![]:![]:!![]})[_0xfa74('0x7')](function(_0x302eb4){logger[_0xfa74('0x8')]('CreateAttachment',_0x51dda1);logger['debug'](_0xfa74('0x13'),_0x51dda1,JSON[_0xfa74('0xc')](_0x302eb4));_0x31d3c1(_0x302eb4);})[_0xfa74('0x12')](function(_0xeaaa19){logger[_0xfa74('0xd')]('CreateAttachment',_0xeaaa19['message'],_0x51dda1);_0x25a36b(_0x4928b6[_0xfa74('0xd')](0x1f4,_0xeaaa19['message']));});});}; \ No newline at end of file +var _0x5044=['CreateAttachment','Attachment','create','body','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then','info','request\x20sent','debug','Attachment,\x20%s,\x20%s,\x20%s','stringify','error','code','Attachment,\x20%s,\x20%s','message','result','catch'];(function(_0x44193d,_0x408dc1){var _0x20903e=function(_0x206bc4){while(--_0x206bc4){_0x44193d['push'](_0x44193d['shift']());}};_0x20903e(++_0x408dc1);}(_0x5044,0xc8));var _0x4504=function(_0x45d1c2,_0x345273){_0x45d1c2=_0x45d1c2-0x0;var _0x282cb8=_0x5044[_0x45d1c2];return _0x282cb8;};'use strict';var _=require('lodash');var util=require(_0x4504('0x0'));var moment=require('moment');var BPromise=require(_0x4504('0x1'));var rs=require(_0x4504('0x2'));var fs=require('fs');var Redis=require(_0x4504('0x3'));var db=require(_0x4504('0x4'))['db'];var utils=require(_0x4504('0x5'));var logger=require(_0x4504('0x6'))(_0x4504('0x7'));var config=require(_0x4504('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x4504('0x9')][_0x4504('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x282816,_0x6e2dbb,_0x3df37b){return new BPromise(function(_0xbce7c4,_0x2cd45a){return client[_0x4504('0xb')](_0x282816,_0x3df37b)[_0x4504('0xc')](function(_0x56961c){logger[_0x4504('0xd')]('Attachment,\x20%s,\x20%s',_0x6e2dbb,_0x4504('0xe'));logger[_0x4504('0xf')](_0x4504('0x10'),_0x6e2dbb,_0x4504('0xe'),JSON[_0x4504('0x11')](_0x56961c));if(_0x56961c[_0x4504('0x12')]){if(_0x56961c[_0x4504('0x12')][_0x4504('0x13')]===0x1f4){logger[_0x4504('0x12')](_0x4504('0x14'),_0x6e2dbb,_0x56961c[_0x4504('0x12')][_0x4504('0x15')]);return _0x2cd45a(_0x56961c[_0x4504('0x12')]['message']);}logger[_0x4504('0x12')](_0x4504('0x14'),_0x6e2dbb,_0x56961c['error'][_0x4504('0x15')]);return _0xbce7c4(_0x56961c[_0x4504('0x12')][_0x4504('0x15')]);}else{logger[_0x4504('0xd')]('Attachment,\x20%s,\x20%s',_0x6e2dbb,'request\x20sent');_0xbce7c4(_0x56961c[_0x4504('0x16')]['message']);}})[_0x4504('0x17')](function(_0x5ede87){logger[_0x4504('0x12')](_0x4504('0x14'),_0x6e2dbb,_0x5ede87);_0x2cd45a(_0x5ede87);});});}exports[_0x4504('0x18')]=function(_0x52f09e){var _0x35a355=this;return new Promise(function(_0x1bab8e,_0x2674e6){return db[_0x4504('0x19')][_0x4504('0x1a')](_0x52f09e[_0x4504('0x1b')],{'raw':_0x52f09e['options']?_0x52f09e['options']['raw']===undefined?!![]:![]:!![]})[_0x4504('0xc')](function(_0x431c81){logger[_0x4504('0xd')](_0x4504('0x18'),_0x52f09e);logger[_0x4504('0xf')]('CreateAttachment',_0x52f09e,JSON[_0x4504('0x11')](_0x431c81));_0x1bab8e(_0x431c81);})[_0x4504('0x17')](function(_0x366126){logger[_0x4504('0x12')](_0x4504('0x18'),_0x366126[_0x4504('0x15')],_0x52f09e);_0x2674e6(_0x35a355['error'](0x1f4,_0x366126[_0x4504('0x15')]));});});}; \ No newline at end of file diff --git a/server/api/attachment/index.js b/server/api/attachment/index.js index 3e56d12..48f6db2 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 _0xb10b=['originalname','replace','single','file','create','put','/:id','update','destroy','exports','multer','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./attachment.controller','get','index','isAuthenticated','show','/:id/download','download','post','/:id/clone','diskStorage','join','server/files/attachments/','format','%s-%s'];(function(_0x5e4ac0,_0x540b98){var _0x28fb8a=function(_0x4d80e9){while(--_0x4d80e9){_0x5e4ac0['push'](_0x5e4ac0['shift']());}};_0x28fb8a(++_0x540b98);}(_0xb10b,0x12a));var _0xbb10=function(_0x43997b,_0x17bd44){_0x43997b=_0x43997b-0x0;var _0x4ac8c1=_0xb10b[_0x43997b];return _0x4ac8c1;};'use strict';var multer=require(_0xbb10('0x0'));var util=require('util');var path=require(_0xbb10('0x1'));var timeout=require(_0xbb10('0x2'));var express=require(_0xbb10('0x3'));var router=express['Router']();var fs_extra=require(_0xbb10('0x4'));var auth=require(_0xbb10('0x5'));var interaction=require(_0xbb10('0x6'));var config=require(_0xbb10('0x7'));var controller=require(_0xbb10('0x8'));router[_0xbb10('0x9')]('/',auth['isAuthenticated'](),controller[_0xbb10('0xa')]);router[_0xbb10('0x9')]('/:id',auth[_0xbb10('0xb')](),controller[_0xbb10('0xc')]);router[_0xbb10('0x9')](_0xbb10('0xd'),auth[_0xbb10('0xb')](),controller[_0xbb10('0xe')]);router[_0xbb10('0xf')](_0xbb10('0x10'),auth['isAuthenticated'](),controller['clone']);var upload=multer({'storage':multer[_0xbb10('0x11')]({'destination':function(_0x118a74,_0xce64f3,_0x5e136d){_0x5e136d(null,path[_0xbb10('0x12')](config['root'],_0xbb10('0x13')));},'filename':function(_0x916a32,_0x285009,_0x193a27){_0x193a27(null,util[_0xbb10('0x14')](_0xbb10('0x15'),Date['now'](),_0x285009[_0xbb10('0x16')][_0xbb10('0x17')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0xbb10('0xf')]('/',upload[_0xbb10('0x18')](_0xbb10('0x19')),controller[_0xbb10('0x1a')]);router[_0xbb10('0x1b')](_0xbb10('0x1c'),auth[_0xbb10('0xb')](),controller[_0xbb10('0x1d')]);router['delete'](_0xbb10('0x1c'),auth[_0xbb10('0xb')](),controller[_0xbb10('0x1e')]);module[_0xbb10('0x1f')]=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(_0x3346c2,_0x2300d9){var _0x452516=function(_0x2f616e){while(--_0x2f616e){_0x3346c2['push'](_0x3346c2['shift']());}};_0x452516(++_0x2300d9);}(_0x2032,0xd9));var _0x2203=function(_0x33d9a8,_0x300c44){_0x33d9a8=_0x33d9a8-0x0;var _0x5ab803=_0x2032[_0x33d9a8];return _0x5ab803;};'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/authGoogle/authGoogle.controller.js b/server/api/authGoogle/authGoogle.controller.js index 20de415..5399f1d 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 _0x8ef2=['then','User','find','map','emails','value','admin','agent','disabled','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','blocked','blockedAt','add','minutes','clearBlockUser','getLicense','catch','passport','passport-google-oauth20','moment','../../config/environment','signToken','../../config/utils','login','authenticate','google','/login','profile','callback','clientID','clientSecret','callbackURL','Setting','blockDuration'];(function(_0x46060a,_0x4ed109){var _0x119e5e=function(_0x3d880d){while(--_0x3d880d){_0x46060a['push'](_0x46060a['shift']());}};_0x119e5e(++_0x4ed109);}(_0x8ef2,0x165));var _0x28ef=function(_0x5275b8,_0x51e5dd){_0x5275b8=_0x5275b8-0x0;var _0x568a9b=_0x8ef2[_0x5275b8];return _0x568a9b;};'use strict';var _=require('lodash');var passport=require(_0x28ef('0x0'));var GoogleStrategy=require(_0x28ef('0x1'))['Strategy'];var moment=require(_0x28ef('0x2'));var db=require('../../mysqldb')['db'];var config=require(_0x28ef('0x3'));var signToken=require('../../components/auth/service')[_0x28ef('0x4')];var utils=require(_0x28ef('0x5'));exports[_0x28ef('0x6')]=passport[_0x28ef('0x7')](_0x28ef('0x8'),{'failureRedirect':_0x28ef('0x9'),'scope':[_0x28ef('0xa'),'email'],'session':![]});exports[_0x28ef('0xb')]=passport[_0x28ef('0x7')]('google',{'failureRedirect':_0x28ef('0x9'),'session':![]});passport['use'](new GoogleStrategy({'clientID':config[_0x28ef('0x8')]?config[_0x28ef('0x8')][_0x28ef('0xc')]:'id','clientSecret':config['google']?config[_0x28ef('0x8')][_0x28ef('0xd')]:'secret','callbackURL':config['google']?config[_0x28ef('0x8')][_0x28ef('0xe')]:''},function(_0x41c242,_0x48e983,_0x38d8a8,_0x1ca488){var _0x48c345,_0x1b53fe;return db[_0x28ef('0xf')]['findOne']({'where':{'id':0x1},'attributes':['allowedLoginAttempts',_0x28ef('0x10')],'raw':!![]})[_0x28ef('0x11')](function(_0x255761){_0x48c345=_0x255761;return db[_0x28ef('0x12')][_0x28ef('0x13')]({'where':{'email':_[_0x28ef('0x14')](_0x38d8a8[_0x28ef('0x15')],_0x28ef('0x16')),'role':{'$or':[_0x28ef('0x17'),'user',_0x28ef('0x18')]}}});})[_0x28ef('0x11')](function(_0x1bdb7c){_0x1b53fe=_0x1bdb7c;if(_0x1b53fe){if(_0x1b53fe[_0x28ef('0x19')]){return _0x1ca488(_0x28ef('0x1a'));}else if(_0x48c345['blockDuration']>0x0){if(_0x1b53fe[_0x28ef('0x1b')]){if(moment(_0x1b53fe[_0x28ef('0x1c')])[_0x28ef('0x1d')](_0x48c345[_0x28ef('0x10')],_0x28ef('0x1e'))>moment()){return _0x1ca488(_0x28ef('0x1a'));}else{return utils[_0x28ef('0x1f')](_0x1b53fe,0x0,![],null)['then'](function(){return utils[_0x28ef('0x20')](_0x1b53fe);})['then'](function(){return _0x1ca488(null,_0x1b53fe);});}}else{return utils[_0x28ef('0x20')](_0x1b53fe)[_0x28ef('0x11')](function(){return _0x1ca488(null,_0x1b53fe);});}}else{return utils[_0x28ef('0x20')](_0x1b53fe)['then'](function(){return _0x1ca488(null,_0x1b53fe);});}}return _0x1ca488('Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.');})[_0x28ef('0x21')](function(_0x449217){_0x1ca488(_0x449217);});})); \ No newline at end of file +var _0x9596=['google','use','clientID','clientSecret','secret','Setting','findOne','then','User','find','map','emails','value','admin','user','agent','disabled','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','blockDuration','blocked','add','minutes','clearBlockUser','getLicense','catch','lodash','passport','passport-google-oauth20','Strategy','moment','../../mysqldb','../../config/environment','../../components/auth/service','signToken','authenticate','email','callback'];(function(_0x53128b,_0x46e298){var _0x1d9a32=function(_0x39391c){while(--_0x39391c){_0x53128b['push'](_0x53128b['shift']());}};_0x1d9a32(++_0x46e298);}(_0x9596,0xf7));var _0x6959=function(_0x1b7368,_0x3286ed){_0x1b7368=_0x1b7368-0x0;var _0x25d54c=_0x9596[_0x1b7368];return _0x25d54c;};'use strict';var _=require(_0x6959('0x0'));var passport=require(_0x6959('0x1'));var GoogleStrategy=require(_0x6959('0x2'))[_0x6959('0x3')];var moment=require(_0x6959('0x4'));var db=require(_0x6959('0x5'))['db'];var config=require(_0x6959('0x6'));var signToken=require(_0x6959('0x7'))[_0x6959('0x8')];var utils=require('../../config/utils');exports['login']=passport[_0x6959('0x9')]('google',{'failureRedirect':'/login','scope':['profile',_0x6959('0xa')],'session':![]});exports[_0x6959('0xb')]=passport[_0x6959('0x9')](_0x6959('0xc'),{'failureRedirect':'/login','session':![]});passport[_0x6959('0xd')](new GoogleStrategy({'clientID':config[_0x6959('0xc')]?config[_0x6959('0xc')][_0x6959('0xe')]:'id','clientSecret':config['google']?config['google'][_0x6959('0xf')]:_0x6959('0x10'),'callbackURL':config[_0x6959('0xc')]?config[_0x6959('0xc')]['callbackURL']:''},function(_0x4f06f2,_0x369eb5,_0x5bd79e,_0x5dc953){var _0x36040e,_0x1aa4fa;return db[_0x6959('0x11')][_0x6959('0x12')]({'where':{'id':0x1},'attributes':['allowedLoginAttempts','blockDuration'],'raw':!![]})[_0x6959('0x13')](function(_0x481214){_0x36040e=_0x481214;return db[_0x6959('0x14')][_0x6959('0x15')]({'where':{'email':_[_0x6959('0x16')](_0x5bd79e[_0x6959('0x17')],_0x6959('0x18')),'role':{'$or':[_0x6959('0x19'),_0x6959('0x1a'),_0x6959('0x1b')]}}});})[_0x6959('0x13')](function(_0x3c0771){_0x1aa4fa=_0x3c0771;if(_0x1aa4fa){if(_0x1aa4fa[_0x6959('0x1c')]){return _0x5dc953(_0x6959('0x1d'));}else if(_0x36040e[_0x6959('0x1e')]>0x0){if(_0x1aa4fa[_0x6959('0x1f')]){if(moment(_0x1aa4fa['blockedAt'])[_0x6959('0x20')](_0x36040e['blockDuration'],_0x6959('0x21'))>moment()){return _0x5dc953('Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.');}else{return utils[_0x6959('0x22')](_0x1aa4fa,0x0,![],null)[_0x6959('0x13')](function(){return utils['getLicense'](_0x1aa4fa);})[_0x6959('0x13')](function(){return _0x5dc953(null,_0x1aa4fa);});}}else{return utils[_0x6959('0x23')](_0x1aa4fa)[_0x6959('0x13')](function(){return _0x5dc953(null,_0x1aa4fa);});}}else{return utils['getLicense'](_0x1aa4fa)['then'](function(){return _0x5dc953(null,_0x1aa4fa);});}}return _0x5dc953(_0x6959('0x1d'));})[_0x6959('0x24')](function(_0x2bad72){_0x5dc953(_0x2bad72);});})); \ No newline at end of file diff --git a/server/api/authGoogle/index.js b/server/api/authGoogle/index.js index 6bfc70a..558bb51 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 _0x09f8=['setTokenCookie','exports','express','passport','./authGoogle.controller','../user/user.controller.js','login','get','callback','isMiddleware'];(function(_0x4a72d5,_0x5a22a6){var _0x4353a8=function(_0x409e5b){while(--_0x409e5b){_0x4a72d5['push'](_0x4a72d5['shift']());}};_0x4353a8(++_0x5a22a6);}(_0x09f8,0x8e));var _0x809f=function(_0x252c4c,_0x2d4940){_0x252c4c=_0x252c4c-0x0;var _0x3751ce=_0x09f8[_0x252c4c];return _0x3751ce;};'use strict';var express=require(_0x809f('0x0'));var passport=require(_0x809f('0x1'));var router=express['Router']();var controller=require(_0x809f('0x2'));var userController=require(_0x809f('0x3'));var authService=require('../../components/auth/service');router['get']('/',controller[_0x809f('0x4')]);router[_0x809f('0x5')]('/callback',controller[_0x809f('0x6')],authService[_0x809f('0x7')],userController[_0x809f('0x4')],authService[_0x809f('0x8')]);module[_0x809f('0x9')]=router; \ No newline at end of file +var _0x8fcd=['Router','./authGoogle.controller','../user/user.controller.js','../../components/auth/service','get','login','callback','setTokenCookie','exports','express','passport'];(function(_0x2d3253,_0x4cf193){var _0xf66d25=function(_0x2d423e){while(--_0x2d423e){_0x2d3253['push'](_0x2d3253['shift']());}};_0xf66d25(++_0x4cf193);}(_0x8fcd,0x13d));var _0xd8fc=function(_0x1f79e3,_0x145633){_0x1f79e3=_0x1f79e3-0x0;var _0x173b75=_0x8fcd[_0x1f79e3];return _0x173b75;};'use strict';var express=require(_0xd8fc('0x0'));var passport=require(_0xd8fc('0x1'));var router=express[_0xd8fc('0x2')]();var controller=require(_0xd8fc('0x3'));var userController=require(_0xd8fc('0x4'));var authService=require(_0xd8fc('0x5'));router[_0xd8fc('0x6')]('/',controller[_0xd8fc('0x7')]);router[_0xd8fc('0x6')]('/callback',controller[_0xd8fc('0x8')],authService['isMiddleware'],userController[_0xd8fc('0x7')],authService[_0xd8fc('0x9')]);module[_0xd8fc('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 f90b163..953320f 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 _0x8ec3=['disabled','blocked','blockedAt','loginAttempts','admin','agent','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','authenticate','allowedLoginAttempts','add','minutes','clearBlockUser','getLicense','catch','MailAccount','find','email','MailServerOut','service','host','Smtp','port','secure','authentication','auth','merge','\x22%s\x22\x20<%s>','user','format','SendMail\x20error:\x20%s.\x20Please\x20contact\x20your\x20Administrator!','error','message','stringify','status','send','login','local','Something\x20went\x20wrong,\x20please\x20try\x20again.','online','forgot','Email\x20parameter\x20is\x20missing','generate','body','trim','toLowerCase','User','This\x20email\x20is\x20not\x20registered.','The\x20user\x20is\x20disabled.\x20Please\x20contact\x20the\x20administrator.','The\x20user\x20is\x20blocked.\x20Please\x20contact\x20the\x20administrator.','resetPasswordToken','resetPasswordExpires','now','save','https://','headers','/reset/','If\x20you\x20did\x20not\x20request\x20this,\x20please\x20ignore\x20this\x20email\x20and\x20your\x20password\x20will\x20remain\x20unchanged.\x0a','Reset\x20Email\x20sent!','reset','params','token','Password\x20reset\x20token\x20is\x20invalid\x20or\x20has\x20expired.','securePassword','passwordHistoryLimit','validatePasswordPattern','previousPasswords','Password\x20reset!','use','util','passport-local','Strategy','jayson/promise','lodash','randomstring','moment','../../components/auth/service','client','http','Setting','findOne','blockDuration','then','name','password','salt','role'];(function(_0x10f849,_0x4275c1){var _0x2f15cf=function(_0x53c387){while(--_0x53c387){_0x10f849['push'](_0x10f849['shift']());}};_0x2f15cf(++_0x4275c1);}(_0x8ec3,0x19c));var _0x38ec=function(_0x1cece0,_0x1a7dae){_0x1cece0=_0x1cece0-0x0;var _0x4f6ae3=_0x8ec3[_0x1cece0];return _0x4f6ae3;};'use strict';var util=require(_0x38ec('0x0'));var passport=require('passport');var LocalStrategy=require(_0x38ec('0x1'))[_0x38ec('0x2')];var jayson=require(_0x38ec('0x3'));var _=require(_0x38ec('0x4'));var rs=require(_0x38ec('0x5'));var moment=require(_0x38ec('0x6'));var db=require('../../mysqldb')['db'];var authService=require(_0x38ec('0x7'));var utils=require('../../config/utils');var client=jayson[_0x38ec('0x8')][_0x38ec('0x9')]({'port':0x232b});function localAuthenticate(_0x314dc2,_0x24c713,_0x219bf2,_0x327d39){var _0x8ac564,_0xb7e8b;return db[_0x38ec('0xa')][_0x38ec('0xb')]({'where':{'id':0x1},'attributes':['allowedLoginAttempts',_0x38ec('0xc')],'raw':!![]})[_0x38ec('0xd')](function(_0x227b9c){_0x8ac564=_0x227b9c;return _0x314dc2[_0x38ec('0xb')]({'attributes':['id',_0x38ec('0xe'),_0x38ec('0xf'),_0x38ec('0x10'),_0x38ec('0x11'),_0x38ec('0x12'),_0x38ec('0x13'),_0x38ec('0x14'),_0x38ec('0x15')],'where':{'name':_0x24c713,'role':{'$or':[_0x38ec('0x16'),'user',_0x38ec('0x17')]}}});})[_0x38ec('0xd')](function(_0x38b258){if(!_0x38b258||_0x38b258&&_0x38b258[_0x38ec('0xe')]!==_0x24c713){throw new Error(_0x38ec('0x18'));}else{_0xb7e8b=_0x38b258;return _0xb7e8b;}})[_0x38ec('0xd')](function(){_0xb7e8b[_0x38ec('0x19')](_0x219bf2,function(_0x2ebc85,_0x4ca350){var _0x1b43e7=_0xb7e8b[_0x38ec('0x15')]+0x1;if(_0x2ebc85){return _0x327d39(_0x2ebc85);}else if(!_0x4ca350){if(_0xb7e8b[_0x38ec('0x12')]){return _0x327d39(null,![],{'message':_0x38ec('0x18')});}else if(_0x8ac564[_0x38ec('0x1a')]>0x0){if(_0xb7e8b[_0x38ec('0x13')]){if(_0x8ac564[_0x38ec('0xc')]>0x0){if(moment(_0xb7e8b[_0x38ec('0x14')])[_0x38ec('0x1b')](_0x8ac564[_0x38ec('0xc')],_0x38ec('0x1c'))>moment()){return _0x327d39(null,![],{'message':_0x38ec('0x18')});}else{return utils[_0x38ec('0x1d')](_0xb7e8b,_0x1b43e7,![],null)[_0x38ec('0xd')](function(){return _0x327d39(null,![],{'message':_0x38ec('0x18')});});}}else{return _0x327d39(null,![],{'message':_0x38ec('0x18')});}}else{if(_0x1b43e7>=_0x8ac564[_0x38ec('0x1a')]){return utils[_0x38ec('0x1d')](_0xb7e8b,0x0,!![],moment())[_0x38ec('0xd')](function(){return _0x327d39(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});});}else{return utils['clearBlockUser'](_0xb7e8b,_0x1b43e7,![],null)['then'](function(){return _0x327d39(null,![],{'message':_0x38ec('0x18')});});}}}else{return _0x327d39(null,![],{'message':_0x38ec('0x18')});}}else{if(_0xb7e8b[_0x38ec('0x12')]){return _0x327d39(null,![],{'message':_0x38ec('0x18')});}else if(_0x8ac564[_0x38ec('0x1a')]>0x0){if(_0xb7e8b[_0x38ec('0x13')]){if(_0x8ac564[_0x38ec('0xc')]>0x0){if(moment(_0xb7e8b['blockedAt'])[_0x38ec('0x1b')](_0x8ac564[_0x38ec('0xc')],_0x38ec('0x1c'))>moment()){return _0x327d39(null,![],{'message':_0x38ec('0x18')});}else{return utils['clearBlockUser'](_0xb7e8b,0x0,![],null)[_0x38ec('0xd')](function(){return utils[_0x38ec('0x1e')](_0xb7e8b);})['then'](function(){return _0x327d39(null,_0xb7e8b);});}}else{return _0x327d39(null,![],{'message':_0x38ec('0x18')});}}else{return utils[_0x38ec('0x1d')](_0xb7e8b,0x0,![],null)[_0x38ec('0xd')](function(){return utils[_0x38ec('0x1e')](_0xb7e8b);})[_0x38ec('0xd')](function(){return _0x327d39(null,_0xb7e8b);})[_0x38ec('0x1f')](function(_0x48e4a7){return _0x327d39(null,![],_0x48e4a7);});}}else{if(_0xb7e8b['blocked']){return _0x327d39(null,![],{'message':_0x38ec('0x18')});}else{return utils[_0x38ec('0x1e')](_0xb7e8b)[_0x38ec('0xd')](function(){return _0x327d39(null,_0xb7e8b);});}}}});})[_0x38ec('0x1f')](function(_0x546d2f){return _0x327d39(null,![],_0x546d2f);});}function sendServiceMail(_0x98489){return db[_0x38ec('0x20')][_0x38ec('0x21')]({'where':{'service':!![]},'attributes':['id',_0x38ec('0xe'),_0x38ec('0x22')],'include':[{'model':db[_0x38ec('0x23')],'as':'Smtp'}]})['then'](function(_0x3d38b9){if(!_0x3d38b9){throw new Error('Unable\x20to\x20find\x20a\x20configured\x20SMTP\x20service!');}var _0x372aa7={'tls':{'rejectUnauthorized':![]}};if(_0x3d38b9['Smtp'][_0x38ec('0x24')]){_0x372aa7[_0x38ec('0x24')]=_0x3d38b9['Smtp'][_0x38ec('0x24')];}else{_0x372aa7[_0x38ec('0x25')]=_0x3d38b9[_0x38ec('0x26')]['host'];_0x372aa7[_0x38ec('0x27')]=_0x3d38b9['Smtp']['port'];_0x372aa7[_0x38ec('0x28')]=_0x3d38b9[_0x38ec('0x26')][_0x38ec('0x28')];}if(_0x3d38b9[_0x38ec('0x26')][_0x38ec('0x29')]){_0x372aa7[_0x38ec('0x2a')]={'user':_0x3d38b9[_0x38ec('0x26')]['user'],'pass':_0x3d38b9[_0x38ec('0x26')]['pass']};}var _0x5984c5={'account':_0x372aa7,'message':_[_0x38ec('0x2b')]({'from':util['format'](_0x38ec('0x2c'),_0x3d38b9['name'],_0x3d38b9['email']||_0x3d38b9[_0x38ec('0x26')][_0x38ec('0x2d')])},_0x98489)};return client['request']('SendMail',_0x5984c5);})[_0x38ec('0xd')](function(_0x58c2c8){if(_0x58c2c8['error']){throw new Error(util[_0x38ec('0x2e')](_0x38ec('0x2f'),_0x58c2c8[_0x38ec('0x30')][_0x38ec('0x31')]||JSON[_0x38ec('0x32')](_0x58c2c8[_0x38ec('0x30')])));}return!![];});}function handleError(_0x465266,_0x32e093,_0x35fc1e){return _0x465266[_0x38ec('0x33')](_0x32e093||0x1f4)[_0x38ec('0x34')]({'message':_0x35fc1e?_0x35fc1e[_0x38ec('0x31')]||_0x35fc1e:''});}exports[_0x38ec('0x35')]=function(_0xa8eb6e,_0x4630e5,_0x17afd6){passport[_0x38ec('0x19')](_0x38ec('0x36'),function(_0x321b14,_0x44be31,_0x276ee6){var _0x424dd1=_0x321b14||_0x276ee6;if(_0x424dd1){return handleError(_0x4630e5,0x191,_0x424dd1);}if(!_0x44be31){return handleError(_0x4630e5,0x194,{'message':_0x38ec('0x37')});}else{var _0x5ed9b8={'payload':{'id':_0x44be31['id'],'role':_0x44be31['role']},'options':{'expiresIn':0x15180}};return authService['signToken'](_0x5ed9b8)[_0x38ec('0xd')](function(_0x168c59){_0x4630e5['json']({'id':_0x44be31['id'],'token':_0x168c59,'statusCall':'','isAlreadyLogged':_0x44be31[_0x38ec('0x38')]});});}})(_0xa8eb6e,_0x4630e5,_0x17afd6);};exports[_0x38ec('0x39')]=function(_0x29a781,_0x55dc16,_0x2a3de8){if(!_0x29a781['body'][_0x38ec('0x22')]){return handleError(_0x55dc16,0x1f4,{'message':_0x38ec('0x3a')});}var _0x561110=rs[_0x38ec('0x3b')]();_0x29a781[_0x38ec('0x3c')][_0x38ec('0x22')]=_0x29a781['body'][_0x38ec('0x22')][_0x38ec('0x3d')]()[_0x38ec('0x3e')]();var _0x228c8f;return db[_0x38ec('0xa')]['findOne']({'where':{'id':0x1},'attributes':[_0x38ec('0x1a'),'blockDuration'],'raw':!![]})[_0x38ec('0xd')](function(_0x13e4da){_0x228c8f=_0x13e4da;return db[_0x38ec('0x3f')][_0x38ec('0x21')]({'where':{'email':_0x29a781[_0x38ec('0x3c')]['email']}});})['then'](function(_0x145c5f){if(!_0x145c5f){throw new Error(_0x38ec('0x40'));}if(_0x145c5f[_0x38ec('0x12')]){throw new Error(_0x38ec('0x41'));}if(_0x145c5f[_0x38ec('0x13')]){if(moment(_0x145c5f[_0x38ec('0x14')])[_0x38ec('0x1b')](_0x228c8f[_0x38ec('0xc')],_0x38ec('0x1c'))>moment()){throw new Error(_0x38ec('0x42'));}else{_0x145c5f[_0x38ec('0x13')]=![];_0x145c5f[_0x38ec('0x14')]=null;}}_0x145c5f[_0x38ec('0x43')]=_0x561110;_0x145c5f[_0x38ec('0x44')]=Date[_0x38ec('0x45')]()+0x36ee80;return _0x145c5f[_0x38ec('0x46')]();})['then'](function(){return sendServiceMail({'to':_0x29a781[_0x38ec('0x3c')][_0x38ec('0x22')],'subject':'xCally\x20Motion\x20Password\x20Reset','text':'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'+_0x38ec('0x47')+_0x29a781[_0x38ec('0x48')][_0x38ec('0x25')]+_0x38ec('0x49')+_0x561110+'\x0a\x0a'+_0x38ec('0x4a')});})['then'](function(){_0x55dc16[_0x38ec('0x33')](0xc8)[_0x38ec('0x34')]({'message':_0x38ec('0x4b')});})[_0x38ec('0x1f')](function(_0x8d4b5e){return handleError(_0x55dc16,0x1f4,_0x8d4b5e);});};exports[_0x38ec('0x4c')]=function(_0x5028d2,_0x5a953a,_0x2081a6){return db[_0x38ec('0x3f')][_0x38ec('0x21')]({'where':{'resetPasswordToken':_0x5028d2[_0x38ec('0x4d')][_0x38ec('0x4e')],'resetPasswordExpires':{'$gt':Date[_0x38ec('0x45')]()}}})[_0x38ec('0xd')](function(_0x53317d){if(!_0x53317d){throw new Error(_0x38ec('0x4f'));}return db[_0x38ec('0xa')]['findOne']({'attributes':['id',_0x38ec('0x50'),'enforcePasswordHistory',_0x38ec('0x51')]})[_0x38ec('0xd')](function(_0xa76632){if(_0xa76632[_0x38ec('0x50')])authService[_0x38ec('0x52')](_0x5028d2[_0x38ec('0x3c')][_0x38ec('0xf')]);if(!_0xa76632['enforcePasswordHistory']||!_0x53317d[_0x38ec('0x53')])return _0x53317d;authService['validatePasswordHistory'](_0x5028d2[_0x38ec('0x3c')][_0x38ec('0xf')],_0x53317d[_0x38ec('0x53')],_0xa76632[_0x38ec('0x51')]);return _0x53317d;})[_0x38ec('0xd')](function(){_0x53317d[_0x38ec('0xf')]=_0x5028d2[_0x38ec('0x3c')]['password'];_0x53317d[_0x38ec('0x43')]=null;_0x53317d[_0x38ec('0x44')]=null;return _0x53317d[_0x38ec('0x46')]();});})[_0x38ec('0xd')](function(){_0x5a953a[_0x38ec('0x33')](0xc8)[_0x38ec('0x34')]({'message':_0x38ec('0x54')});})[_0x38ec('0x1f')](function(_0x3684de){return handleError(_0x5a953a,0x1f4,_0x3684de);});};passport[_0x38ec('0x55')](new LocalStrategy({'usernameField':_0x38ec('0xe'),'passwordField':_0x38ec('0xf')},function(_0x2b76b8,_0x5e5ee8,_0x397254){return localAuthenticate(db[_0x38ec('0x3f')],_0x2b76b8,_0x5e5ee8,_0x397254);})); \ No newline at end of file +var _0x575f=['params','token','securePassword','enforcePasswordHistory','passwordHistoryLimit','validatePasswordPattern','password','previousPasswords','use','passport','passport-local','Strategy','jayson/promise','lodash','randomstring','moment','../../components/auth/service','../../config/utils','http','Setting','findOne','allowedLoginAttempts','blockDuration','then','name','disabled','blocked','blockedAt','loginAttempts','admin','user','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','authenticate','minutes','clearBlockUser','add','getLicense','catch','MailAccount','MailServerOut','Smtp','service','host','port','secure','auth','pass','merge','\x22%s\x22\x20<%s>','request','SendMail','error','format','stringify','status','send','message','login','local','role','signToken','json','online','body','Email\x20parameter\x20is\x20missing','generate','email','trim','toLowerCase','User','find','This\x20email\x20is\x20not\x20registered.','The\x20user\x20is\x20disabled.\x20Please\x20contact\x20the\x20administrator.','The\x20user\x20is\x20blocked.\x20Please\x20contact\x20the\x20administrator.','resetPasswordToken','resetPasswordExpires','now','save','xCally\x20Motion\x20Password\x20Reset','You\x20are\x20receiving\x20this\x20because\x20you\x20(or\x20someone\x20else)\x20have\x20requested\x20the\x20reset\x20of\x20the\x20password\x20for\x20your\x20account.\x0a\x0a','https://','headers','Reset\x20Email\x20sent!','reset'];(function(_0xa20828,_0x1584ba){var _0x5193b0=function(_0x415637){while(--_0x415637){_0xa20828['push'](_0xa20828['shift']());}};_0x5193b0(++_0x1584ba);}(_0x575f,0xb1));var _0xf575=function(_0x4713f7,_0x2c7c9f){_0x4713f7=_0x4713f7-0x0;var _0x1d5e53=_0x575f[_0x4713f7];return _0x1d5e53;};'use strict';var util=require('util');var passport=require(_0xf575('0x0'));var LocalStrategy=require(_0xf575('0x1'))[_0xf575('0x2')];var jayson=require(_0xf575('0x3'));var _=require(_0xf575('0x4'));var rs=require(_0xf575('0x5'));var moment=require(_0xf575('0x6'));var db=require('../../mysqldb')['db'];var authService=require(_0xf575('0x7'));var utils=require(_0xf575('0x8'));var client=jayson['client'][_0xf575('0x9')]({'port':0x232b});function localAuthenticate(_0x3154ac,_0x26c00e,_0x5999f1,_0x14231d){var _0x39255f,_0x39f102;return db[_0xf575('0xa')][_0xf575('0xb')]({'where':{'id':0x1},'attributes':[_0xf575('0xc'),_0xf575('0xd')],'raw':!![]})[_0xf575('0xe')](function(_0x14a8cb){_0x39255f=_0x14a8cb;return _0x3154ac[_0xf575('0xb')]({'attributes':['id',_0xf575('0xf'),'password','salt','role',_0xf575('0x10'),_0xf575('0x11'),_0xf575('0x12'),_0xf575('0x13')],'where':{'name':_0x26c00e,'role':{'$or':[_0xf575('0x14'),_0xf575('0x15'),'agent']}}});})[_0xf575('0xe')](function(_0x22c988){if(!_0x22c988||_0x22c988&&_0x22c988['name']!==_0x26c00e){throw new Error(_0xf575('0x16'));}else{_0x39f102=_0x22c988;return _0x39f102;}})[_0xf575('0xe')](function(){_0x39f102[_0xf575('0x17')](_0x5999f1,function(_0x15436a,_0x31c152){var _0x35891f=_0x39f102[_0xf575('0x13')]+0x1;if(_0x15436a){return _0x14231d(_0x15436a);}else if(!_0x31c152){if(_0x39f102[_0xf575('0x10')]){return _0x14231d(null,![],{'message':_0xf575('0x16')});}else if(_0x39255f[_0xf575('0xc')]>0x0){if(_0x39f102[_0xf575('0x11')]){if(_0x39255f[_0xf575('0xd')]>0x0){if(moment(_0x39f102[_0xf575('0x12')])['add'](_0x39255f[_0xf575('0xd')],_0xf575('0x18'))>moment()){return _0x14231d(null,![],{'message':_0xf575('0x16')});}else{return utils[_0xf575('0x19')](_0x39f102,_0x35891f,![],null)[_0xf575('0xe')](function(){return _0x14231d(null,![],{'message':_0xf575('0x16')});});}}else{return _0x14231d(null,![],{'message':_0xf575('0x16')});}}else{if(_0x35891f>=_0x39255f[_0xf575('0xc')]){return utils[_0xf575('0x19')](_0x39f102,0x0,!![],moment())['then'](function(){return _0x14231d(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});});}else{return utils[_0xf575('0x19')](_0x39f102,_0x35891f,![],null)[_0xf575('0xe')](function(){return _0x14231d(null,![],{'message':_0xf575('0x16')});});}}}else{return _0x14231d(null,![],{'message':_0xf575('0x16')});}}else{if(_0x39f102['disabled']){return _0x14231d(null,![],{'message':_0xf575('0x16')});}else if(_0x39255f[_0xf575('0xc')]>0x0){if(_0x39f102[_0xf575('0x11')]){if(_0x39255f['blockDuration']>0x0){if(moment(_0x39f102[_0xf575('0x12')])[_0xf575('0x1a')](_0x39255f[_0xf575('0xd')],_0xf575('0x18'))>moment()){return _0x14231d(null,![],{'message':_0xf575('0x16')});}else{return utils['clearBlockUser'](_0x39f102,0x0,![],null)[_0xf575('0xe')](function(){return utils[_0xf575('0x1b')](_0x39f102);})['then'](function(){return _0x14231d(null,_0x39f102);});}}else{return _0x14231d(null,![],{'message':_0xf575('0x16')});}}else{return utils[_0xf575('0x19')](_0x39f102,0x0,![],null)[_0xf575('0xe')](function(){return utils[_0xf575('0x1b')](_0x39f102);})[_0xf575('0xe')](function(){return _0x14231d(null,_0x39f102);})[_0xf575('0x1c')](function(_0x2e7e25){return _0x14231d(null,![],_0x2e7e25);});}}else{if(_0x39f102[_0xf575('0x11')]){return _0x14231d(null,![],{'message':_0xf575('0x16')});}else{return utils['getLicense'](_0x39f102)[_0xf575('0xe')](function(){return _0x14231d(null,_0x39f102);});}}}});})['catch'](function(_0x30db72){return _0x14231d(null,![],_0x30db72);});}function sendServiceMail(_0x374843){return db[_0xf575('0x1d')]['find']({'where':{'service':!![]},'attributes':['id',_0xf575('0xf'),'email'],'include':[{'model':db[_0xf575('0x1e')],'as':_0xf575('0x1f')}]})['then'](function(_0x44e683){if(!_0x44e683){throw new Error('Unable\x20to\x20find\x20a\x20configured\x20SMTP\x20service!');}var _0x2d68c7={'tls':{'rejectUnauthorized':![]}};if(_0x44e683[_0xf575('0x1f')][_0xf575('0x20')]){_0x2d68c7[_0xf575('0x20')]=_0x44e683['Smtp'][_0xf575('0x20')];}else{_0x2d68c7[_0xf575('0x21')]=_0x44e683[_0xf575('0x1f')]['host'];_0x2d68c7['port']=_0x44e683['Smtp'][_0xf575('0x22')];_0x2d68c7[_0xf575('0x23')]=_0x44e683['Smtp'][_0xf575('0x23')];}if(_0x44e683[_0xf575('0x1f')]['authentication']){_0x2d68c7[_0xf575('0x24')]={'user':_0x44e683['Smtp'][_0xf575('0x15')],'pass':_0x44e683[_0xf575('0x1f')][_0xf575('0x25')]};}var _0x1040a0={'account':_0x2d68c7,'message':_[_0xf575('0x26')]({'from':util['format'](_0xf575('0x27'),_0x44e683['name'],_0x44e683['email']||_0x44e683[_0xf575('0x1f')]['user'])},_0x374843)};return client[_0xf575('0x28')](_0xf575('0x29'),_0x1040a0);})['then'](function(_0x4201c4){if(_0x4201c4[_0xf575('0x2a')]){throw new Error(util[_0xf575('0x2b')]('SendMail\x20error:\x20%s.\x20Please\x20contact\x20your\x20Administrator!',_0x4201c4[_0xf575('0x2a')]['message']||JSON[_0xf575('0x2c')](_0x4201c4[_0xf575('0x2a')])));}return!![];});}function handleError(_0xaec2ac,_0x29a725,_0x265816){return _0xaec2ac[_0xf575('0x2d')](_0x29a725||0x1f4)[_0xf575('0x2e')]({'message':_0x265816?_0x265816[_0xf575('0x2f')]||_0x265816:''});}exports[_0xf575('0x30')]=function(_0xd9590e,_0x369af0,_0x54594f){passport['authenticate'](_0xf575('0x31'),function(_0x54bb50,_0x4aeb0b,_0x1b8b07){var _0x10bd4b=_0x54bb50||_0x1b8b07;if(_0x10bd4b){return handleError(_0x369af0,0x191,_0x10bd4b);}if(!_0x4aeb0b){return handleError(_0x369af0,0x194,{'message':'Something\x20went\x20wrong,\x20please\x20try\x20again.'});}else{var _0x267592={'payload':{'id':_0x4aeb0b['id'],'role':_0x4aeb0b[_0xf575('0x32')]},'options':{'expiresIn':0x15180}};return authService[_0xf575('0x33')](_0x267592)[_0xf575('0xe')](function(_0x586bc9){_0x369af0[_0xf575('0x34')]({'id':_0x4aeb0b['id'],'token':_0x586bc9,'statusCall':'','isAlreadyLogged':_0x4aeb0b[_0xf575('0x35')]});});}})(_0xd9590e,_0x369af0,_0x54594f);};exports['forgot']=function(_0x509f9a,_0x58ce7a,_0x527603){if(!_0x509f9a[_0xf575('0x36')]['email']){return handleError(_0x58ce7a,0x1f4,{'message':_0xf575('0x37')});}var _0x454cd1=rs[_0xf575('0x38')]();_0x509f9a['body']['email']=_0x509f9a[_0xf575('0x36')][_0xf575('0x39')][_0xf575('0x3a')]()[_0xf575('0x3b')]();var _0x961c4a;return db[_0xf575('0xa')][_0xf575('0xb')]({'where':{'id':0x1},'attributes':['allowedLoginAttempts',_0xf575('0xd')],'raw':!![]})[_0xf575('0xe')](function(_0x9e22d9){_0x961c4a=_0x9e22d9;return db[_0xf575('0x3c')][_0xf575('0x3d')]({'where':{'email':_0x509f9a[_0xf575('0x36')][_0xf575('0x39')]}});})[_0xf575('0xe')](function(_0x1898d0){if(!_0x1898d0){throw new Error(_0xf575('0x3e'));}if(_0x1898d0[_0xf575('0x10')]){throw new Error(_0xf575('0x3f'));}if(_0x1898d0['blocked']){if(moment(_0x1898d0['blockedAt'])[_0xf575('0x1a')](_0x961c4a[_0xf575('0xd')],_0xf575('0x18'))>moment()){throw new Error(_0xf575('0x40'));}else{_0x1898d0[_0xf575('0x11')]=![];_0x1898d0[_0xf575('0x12')]=null;}}_0x1898d0[_0xf575('0x41')]=_0x454cd1;_0x1898d0[_0xf575('0x42')]=Date[_0xf575('0x43')]()+0x36ee80;return _0x1898d0[_0xf575('0x44')]();})['then'](function(){return sendServiceMail({'to':_0x509f9a['body'][_0xf575('0x39')],'subject':_0xf575('0x45'),'text':_0xf575('0x46')+'Please\x20click\x20on\x20the\x20following\x20link,\x20or\x20paste\x20this\x20into\x20your\x20browser\x20to\x20complete\x20the\x20process:\x0a\x0a'+_0xf575('0x47')+_0x509f9a[_0xf575('0x48')][_0xf575('0x21')]+'/reset/'+_0x454cd1+'\x0a\x0a'+'If\x20you\x20did\x20not\x20request\x20this,\x20please\x20ignore\x20this\x20email\x20and\x20your\x20password\x20will\x20remain\x20unchanged.\x0a'});})[_0xf575('0xe')](function(){_0x58ce7a['status'](0xc8)[_0xf575('0x2e')]({'message':_0xf575('0x49')});})[_0xf575('0x1c')](function(_0x3813d6){return handleError(_0x58ce7a,0x1f4,_0x3813d6);});};exports[_0xf575('0x4a')]=function(_0x551f46,_0x51ce4c,_0x2e06c3){return db[_0xf575('0x3c')][_0xf575('0x3d')]({'where':{'resetPasswordToken':_0x551f46[_0xf575('0x4b')][_0xf575('0x4c')],'resetPasswordExpires':{'$gt':Date['now']()}}})[_0xf575('0xe')](function(_0x353b45){if(!_0x353b45){throw new Error('Password\x20reset\x20token\x20is\x20invalid\x20or\x20has\x20expired.');}return db[_0xf575('0xa')][_0xf575('0xb')]({'attributes':['id',_0xf575('0x4d'),_0xf575('0x4e'),_0xf575('0x4f')]})[_0xf575('0xe')](function(_0x129d0c){if(_0x129d0c[_0xf575('0x4d')])authService[_0xf575('0x50')](_0x551f46['body'][_0xf575('0x51')]);if(!_0x129d0c[_0xf575('0x4e')]||!_0x353b45[_0xf575('0x52')])return _0x353b45;authService['validatePasswordHistory'](_0x551f46[_0xf575('0x36')][_0xf575('0x51')],_0x353b45[_0xf575('0x52')],_0x129d0c[_0xf575('0x4f')]);return _0x353b45;})['then'](function(){_0x353b45[_0xf575('0x51')]=_0x551f46[_0xf575('0x36')][_0xf575('0x51')];_0x353b45[_0xf575('0x41')]=null;_0x353b45['resetPasswordExpires']=null;return _0x353b45[_0xf575('0x44')]();});})[_0xf575('0xe')](function(){_0x51ce4c[_0xf575('0x2d')](0xc8)[_0xf575('0x2e')]({'message':'Password\x20reset!'});})[_0xf575('0x1c')](function(_0x4bfdea){return handleError(_0x51ce4c,0x1f4,_0x4bfdea);});};passport[_0xf575('0x53')](new LocalStrategy({'usernameField':'name','passwordField':'password'},function(_0x4f9a8e,_0x248082,_0x1c37a8){return localAuthenticate(db[_0xf575('0x3c')],_0x4f9a8e,_0x248082,_0x1c37a8);})); \ No newline at end of file diff --git a/server/api/authLocal/index.js b/server/api/authLocal/index.js index 36cf01d..07ee7bb 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 _0xd125=['reset','exports','express','Router','login','post','/forgot','forgot','/reset/:token'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xd125,0xb6));var _0x5d12=function(_0x339b10,_0x225898){_0x339b10=_0x339b10-0x0;var _0x57ffc1=_0xd125[_0x339b10];return _0x57ffc1;};'use strict';var express=require(_0x5d12('0x0'));var router=express[_0x5d12('0x1')]();var controller=require('./authLocal.controller');router['post']('/',controller[_0x5d12('0x2')]);router[_0x5d12('0x3')](_0x5d12('0x4'),controller[_0x5d12('0x5')]);router[_0x5d12('0x3')](_0x5d12('0x6'),controller[_0x5d12('0x7')]);module[_0x5d12('0x8')]=router; \ No newline at end of file +var _0xd4cd=['/reset/:token','reset','exports','Router','./authLocal.controller','post','login','/forgot'];(function(_0xbe402,_0x2f6a9a){var _0x118428=function(_0x5df33a){while(--_0x5df33a){_0xbe402['push'](_0xbe402['shift']());}};_0x118428(++_0x2f6a9a);}(_0xd4cd,0x11b));var _0xdd4c=function(_0x246115,_0x398123){_0x246115=_0x246115-0x0;var _0x385878=_0xd4cd[_0x246115];return _0x385878;};'use strict';var express=require('express');var router=express[_0xdd4c('0x0')]();var controller=require(_0xdd4c('0x1'));router[_0xdd4c('0x2')]('/',controller[_0xdd4c('0x3')]);router[_0xdd4c('0x2')](_0xdd4c('0x4'),controller['forgot']);router[_0xdd4c('0x2')](_0xdd4c('0x5'),controller[_0xdd4c('0x6')]);module[_0xdd4c('0x7')]=router; \ No newline at end of file diff --git a/server/api/automation/automation.attributes.js b/server/api/automation/automation.attributes.js index 7819d47..fef2092 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 _0x2af1=['STRING','BOOLEAN','INTEGER','sequelize','exports'];(function(_0x81684b,_0x35889e){var _0x4ae02e=function(_0x41530f){while(--_0x41530f){_0x81684b['push'](_0x81684b['shift']());}};_0x4ae02e(++_0x35889e);}(_0x2af1,0x94));var _0x12af=function(_0x22aa0c,_0x336232){_0x22aa0c=_0x22aa0c-0x0;var _0x5a6811=_0x2af1[_0x22aa0c];return _0x5a6811;};'use strict';var Sequelize=require(_0x12af('0x0'));module[_0x12af('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'channel':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x12af('0x2')]},'status':{'type':Sequelize[_0x12af('0x3')],'defaultValue':![]},'timeout':{'type':Sequelize[_0x12af('0x4')],'defaultValue':0xa}}; \ No newline at end of file +var _0xed5c=['sequelize','exports','STRING','BOOLEAN','INTEGER'];(function(_0x22c684,_0x753309){var _0x39fcbb=function(_0x38b631){while(--_0x38b631){_0x22c684['push'](_0x22c684['shift']());}};_0x39fcbb(++_0x753309);}(_0xed5c,0xa5));var _0xced5=function(_0xc76c87,_0x9001a2){_0xc76c87=_0xc76c87-0x0;var _0xe8d071=_0xed5c[_0xc76c87];return _0xe8d071;};'use strict';var Sequelize=require(_0xced5('0x0'));module[_0xced5('0x1')]={'name':{'type':Sequelize[_0xced5('0x2')],'allowNull':![]},'channel':{'type':Sequelize[_0xced5('0x2')]},'description':{'type':Sequelize[_0xced5('0x2')]},'status':{'type':Sequelize[_0xced5('0x3')],'defaultValue':![]},'timeout':{'type':Sequelize[_0xced5('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 ecd1e81..37f8d22 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 _0xb457=['undefined','limit','count','set','reject','save','update','then','destroy','stack','name','send','index','Automation','rawAttributes','fieldName','model','map','query','keys','filters','intersection','attributes','fields','length','nolimit','sort','where','type','VIRTUAL','filter','merge','options','includeAll','include','findAll','rows','catch','params','create','body','find','Condition','addConditions','ids','omit','getConditions','findOne','pick','hasOwnProperty','addActions','Action','getActions','order','zip-dir','moment','mustache','to-csv','fs-extra','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset'];(function(_0x11dabb,_0x58e2ef){var _0x2a4db7=function(_0x1387c0){while(--_0x1387c0){_0x11dabb['push'](_0x11dabb['shift']());}};_0x2a4db7(++_0x58e2ef);}(_0xb457,0xd2));var _0x7b45=function(_0x522ae8,_0x3b637e){_0x522ae8=_0x522ae8-0x0;var _0x3189b9=_0xb457[_0x522ae8];return _0x3189b9;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x7b45('0x0'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x7b45('0x1'));var BPromise=require('bluebird');var Mustache=require(_0x7b45('0x2'));var util=require('util');var path=require('path');var sox=require('sox');var csv=require(_0x7b45('0x3'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x7b45('0x4'));var _=require('lodash');var squel=require(_0x7b45('0x5'));var crypto=require(_0x7b45('0x6'));var jsforce=require(_0x7b45('0x7'));var deskjs=require(_0x7b45('0x8'));var toCsv=require(_0x7b45('0x3'));var querystring=require(_0x7b45('0x9'));var Papa=require(_0x7b45('0xa'));var Redis=require('ioredis');var authService=require(_0x7b45('0xb'));var qs=require(_0x7b45('0xc'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x7b45('0xd'));var logger=require(_0x7b45('0xe'))(_0x7b45('0xf'));var utils=require('../../config/utils');var config=require(_0x7b45('0x10'));var licenseUtil=require(_0x7b45('0x11'));var db=require(_0x7b45('0x12'))['db'];function respondWithStatusCode(_0x5d9907,_0x48c334){_0x48c334=_0x48c334||0xcc;return function(_0x4bb06d){if(_0x4bb06d){return _0x5d9907[_0x7b45('0x13')](_0x48c334);}return _0x5d9907[_0x7b45('0x14')](_0x48c334)[_0x7b45('0x15')]();};}function respondWithResult(_0xa11f7a,_0x12bc37){_0x12bc37=_0x12bc37||0xc8;return function(_0x538598){if(_0x538598){return _0xa11f7a['status'](_0x12bc37)[_0x7b45('0x16')](_0x538598);}};}function respondWithFilteredResult(_0x271294,_0x5d4e1e){return function(_0x5cbee6){if(_0x5cbee6){var _0x1f0be8=typeof _0x5d4e1e[_0x7b45('0x17')]===_0x7b45('0x18')&&typeof _0x5d4e1e[_0x7b45('0x19')]==='undefined';var _0x35ddd5=_0x5cbee6[_0x7b45('0x1a')];var _0x48b099=_0x1f0be8?0x0:_0x5d4e1e[_0x7b45('0x17')];var _0x242308=_0x1f0be8?_0x5cbee6['count']:_0x5d4e1e['offset']+_0x5d4e1e[_0x7b45('0x19')];var _0x14c616;if(_0x242308>=_0x35ddd5){_0x242308=_0x35ddd5;_0x14c616=0xc8;}else{_0x14c616=0xce;}_0x271294[_0x7b45('0x14')](_0x14c616);return _0x271294[_0x7b45('0x1b')]('Content-Range',_0x48b099+'-'+_0x242308+'/'+_0x35ddd5)[_0x7b45('0x16')](_0x5cbee6);}return null;};}function patchUpdates(_0x5c474c){return function(_0xfb908c){try{jsonpatch['apply'](_0xfb908c,_0x5c474c,!![]);}catch(_0x7d80e8){return BPromise[_0x7b45('0x1c')](_0x7d80e8);}return _0xfb908c[_0x7b45('0x1d')]();};}function saveUpdates(_0xae229f,_0x2fb894){return function(_0x11b05c){if(_0x11b05c){return _0x11b05c[_0x7b45('0x1e')](_0xae229f)[_0x7b45('0x1f')](function(_0x4c395b){return _0x4c395b;});}return null;};}function removeEntity(_0x164109,_0x46aa81){return function(_0x16967b){if(_0x16967b){return _0x16967b[_0x7b45('0x20')]()[_0x7b45('0x1f')](function(){_0x164109[_0x7b45('0x14')](0xcc)['end']();});}};}function handleEntityNotFound(_0x344d31,_0x45f32c){return function(_0x4f5067){if(!_0x4f5067){_0x344d31['sendStatus'](0x194);}return _0x4f5067;};}function handleError(_0x12c9c5,_0x1454de){_0x1454de=_0x1454de||0x1f4;return function(_0x1ddfd1){logger['error'](_0x1ddfd1[_0x7b45('0x21')]);if(_0x1ddfd1[_0x7b45('0x22')]){delete _0x1ddfd1[_0x7b45('0x22')];}_0x12c9c5[_0x7b45('0x14')](_0x1454de)[_0x7b45('0x23')](_0x1ddfd1);};}exports[_0x7b45('0x24')]=function(_0x40a79a,_0x52be2a){var _0xa9f82b={},_0x326d38={},_0x424e55={'count':0x0,'rows':[]};var _0x594eb3=_['map'](db[_0x7b45('0x25')][_0x7b45('0x26')],function(_0x59043a){return{'name':_0x59043a[_0x7b45('0x27')],'type':_0x59043a['type']['key']};});_0x326d38[_0x7b45('0x28')]=_[_0x7b45('0x29')](_0x594eb3,'name');_0x326d38[_0x7b45('0x2a')]=_[_0x7b45('0x2b')](_0x40a79a[_0x7b45('0x2a')]);_0x326d38[_0x7b45('0x2c')]=_[_0x7b45('0x2d')](_0x326d38[_0x7b45('0x28')],_0x326d38['query']);_0xa9f82b[_0x7b45('0x2e')]=_['intersection'](_0x326d38[_0x7b45('0x28')],qs[_0x7b45('0x2f')](_0x40a79a[_0x7b45('0x2a')][_0x7b45('0x2f')]));_0xa9f82b[_0x7b45('0x2e')]=_0xa9f82b[_0x7b45('0x2e')][_0x7b45('0x30')]?_0xa9f82b['attributes']:_0x326d38[_0x7b45('0x28')];if(!_0x40a79a['query']['hasOwnProperty'](_0x7b45('0x31'))){_0xa9f82b[_0x7b45('0x19')]=qs['limit'](_0x40a79a[_0x7b45('0x2a')]['limit']);_0xa9f82b['offset']=qs[_0x7b45('0x17')](_0x40a79a[_0x7b45('0x2a')]['offset']);}_0xa9f82b['order']=qs[_0x7b45('0x32')](_0x40a79a[_0x7b45('0x2a')]['sort']);_0xa9f82b[_0x7b45('0x33')]=qs[_0x7b45('0x2c')](_['pick'](_0x40a79a[_0x7b45('0x2a')],_0x326d38['filters']),_0x594eb3);if(_0x40a79a[_0x7b45('0x2a')]['filter']){_0xa9f82b[_0x7b45('0x33')]=_['merge'](_0xa9f82b[_0x7b45('0x33')],{'$or':_['map'](_0x594eb3,function(_0x5f0e83){if(_0x5f0e83[_0x7b45('0x34')]!==_0x7b45('0x35')){var _0x551b7f={};_0x551b7f[_0x5f0e83[_0x7b45('0x22')]]={'$like':'%'+_0x40a79a[_0x7b45('0x2a')][_0x7b45('0x36')]+'%'};return _0x551b7f;}})});}_0xa9f82b=_[_0x7b45('0x37')]({},_0xa9f82b,_0x40a79a[_0x7b45('0x38')]);var _0x3ef2cc={'where':_0xa9f82b[_0x7b45('0x33')]};return db[_0x7b45('0x25')][_0x7b45('0x1a')](_0x3ef2cc)[_0x7b45('0x1f')](function(_0x573119){_0x424e55[_0x7b45('0x1a')]=_0x573119;if(_0x40a79a[_0x7b45('0x2a')][_0x7b45('0x39')]){_0xa9f82b[_0x7b45('0x3a')]=[{'all':!![]}];}return db[_0x7b45('0x25')][_0x7b45('0x3b')](_0xa9f82b);})['then'](function(_0x31fb04){_0x424e55[_0x7b45('0x3c')]=_0x31fb04;return _0x424e55;})[_0x7b45('0x1f')](respondWithFilteredResult(_0x52be2a,_0xa9f82b))[_0x7b45('0x3d')](handleError(_0x52be2a,null));};exports['show']=function(_0x541e84,_0x4e7009){var _0x3df3c9={'raw':![],'where':{'id':_0x541e84[_0x7b45('0x3e')]['id']}},_0x458a63={};_0x458a63[_0x7b45('0x28')]=_['keys'](db['Automation'][_0x7b45('0x26')]);_0x458a63[_0x7b45('0x2a')]=_[_0x7b45('0x2b')](_0x541e84[_0x7b45('0x2a')]);_0x458a63[_0x7b45('0x2c')]=_[_0x7b45('0x2d')](_0x458a63[_0x7b45('0x28')],_0x458a63['query']);_0x3df3c9[_0x7b45('0x2e')]=_[_0x7b45('0x2d')](_0x458a63['model'],qs[_0x7b45('0x2f')](_0x541e84[_0x7b45('0x2a')][_0x7b45('0x2f')]));_0x3df3c9[_0x7b45('0x2e')]=_0x3df3c9['attributes'][_0x7b45('0x30')]?_0x3df3c9[_0x7b45('0x2e')]:_0x458a63[_0x7b45('0x28')];if(_0x541e84['query'][_0x7b45('0x39')]){_0x3df3c9['include']=[{'all':!![]}];}_0x3df3c9=_[_0x7b45('0x37')]({},_0x3df3c9,_0x541e84['options']);return db[_0x7b45('0x25')]['find'](_0x3df3c9)[_0x7b45('0x1f')](handleEntityNotFound(_0x4e7009,null))[_0x7b45('0x1f')](respondWithResult(_0x4e7009,null))[_0x7b45('0x3d')](handleError(_0x4e7009,null));};exports[_0x7b45('0x3f')]=function(_0x2ac7e7,_0x5834c3){return db[_0x7b45('0x25')][_0x7b45('0x3f')](_0x2ac7e7[_0x7b45('0x40')],{})[_0x7b45('0x1f')](respondWithResult(_0x5834c3,0xc9))[_0x7b45('0x3d')](handleError(_0x5834c3,null));};exports[_0x7b45('0x1e')]=function(_0x5a2ba4,_0x22821e){if(_0x5a2ba4[_0x7b45('0x40')]['id']){delete _0x5a2ba4[_0x7b45('0x40')]['id'];}return db[_0x7b45('0x25')]['find']({'where':{'id':_0x5a2ba4[_0x7b45('0x3e')]['id']}})[_0x7b45('0x1f')](handleEntityNotFound(_0x22821e,null))[_0x7b45('0x1f')](saveUpdates(_0x5a2ba4['body'],null))['then'](respondWithResult(_0x22821e,null))['catch'](handleError(_0x22821e,null));};exports[_0x7b45('0x20')]=function(_0x2a57a5,_0x1e08b9){return db['Automation'][_0x7b45('0x41')]({'where':{'id':_0x2a57a5[_0x7b45('0x3e')]['id']}})[_0x7b45('0x1f')](handleEntityNotFound(_0x1e08b9,null))[_0x7b45('0x1f')](removeEntity(_0x1e08b9,null))[_0x7b45('0x3d')](handleError(_0x1e08b9,null));};exports['addConditions']=function(_0x2da3f3,_0x2703cb,_0x12d5e0){return db[_0x7b45('0x42')][_0x7b45('0x41')]({'where':{'id':_0x2da3f3[_0x7b45('0x3e')]['id']}})[_0x7b45('0x1f')](handleEntityNotFound(_0x2703cb,null))[_0x7b45('0x1f')](function(_0x13f833){if(_0x13f833){return _0x13f833[_0x7b45('0x43')](_0x2da3f3['body'][_0x7b45('0x44')],_[_0x7b45('0x45')](_0x2da3f3['body'],['ids','id'])||{});}})[_0x7b45('0x1f')](respondWithResult(_0x2703cb,null))[_0x7b45('0x3d')](handleError(_0x2703cb,null));};exports[_0x7b45('0x46')]=function(_0x2056b7,_0x2c5bf5,_0x3fb487){var _0xba4e6f={};var _0x284432={};var _0x38be1f;var _0xc0a5f7;return db[_0x7b45('0x25')][_0x7b45('0x47')]({'where':{'id':_0x2056b7[_0x7b45('0x3e')]['id']}})[_0x7b45('0x1f')](handleEntityNotFound(_0x2c5bf5,null))[_0x7b45('0x1f')](function(_0x3c80e9){if(_0x3c80e9){_0x38be1f=_0x3c80e9;_0x284432['model']=_[_0x7b45('0x2b')](db[_0x7b45('0x42')]['rawAttributes']);_0x284432[_0x7b45('0x2a')]=_[_0x7b45('0x2b')](_0x2056b7[_0x7b45('0x2a')]);_0x284432[_0x7b45('0x2c')]=_[_0x7b45('0x2d')](_0x284432['model'],_0x284432[_0x7b45('0x2a')]);_0xba4e6f['attributes']=_[_0x7b45('0x2d')](_0x284432[_0x7b45('0x28')],qs[_0x7b45('0x2f')](_0x2056b7[_0x7b45('0x2a')][_0x7b45('0x2f')]));_0xba4e6f[_0x7b45('0x2e')]=_0xba4e6f['attributes'][_0x7b45('0x30')]?_0xba4e6f[_0x7b45('0x2e')]:_0x284432[_0x7b45('0x28')];_0xba4e6f['order']=qs[_0x7b45('0x32')](_0x2056b7[_0x7b45('0x2a')]['sort']);_0xba4e6f['where']=qs[_0x7b45('0x2c')](_[_0x7b45('0x48')](_0x2056b7[_0x7b45('0x2a')],_0x284432[_0x7b45('0x2c')]));if(_0x2056b7[_0x7b45('0x2a')]['filter']){_0xba4e6f[_0x7b45('0x33')]=_[_0x7b45('0x37')](_0xba4e6f[_0x7b45('0x33')],{'$or':_[_0x7b45('0x29')](_0xba4e6f['attributes'],function(_0x1c3e00){var _0x58b9b9={};_0x58b9b9[_0x1c3e00]={'$like':'%'+_0x2056b7[_0x7b45('0x2a')][_0x7b45('0x36')]+'%'};return _0x58b9b9;})});}_0xba4e6f=_['merge']({},_0xba4e6f,_0x2056b7['options']);return _0x38be1f[_0x7b45('0x46')](_0xba4e6f);}})[_0x7b45('0x1f')](function(_0x2535b8){if(_0x2535b8){_0xc0a5f7=_0x2535b8[_0x7b45('0x30')];if(!_0x2056b7['query'][_0x7b45('0x49')]('nolimit')){_0xba4e6f[_0x7b45('0x19')]=qs['limit'](_0x2056b7[_0x7b45('0x2a')][_0x7b45('0x19')]);_0xba4e6f[_0x7b45('0x17')]=qs[_0x7b45('0x17')](_0x2056b7[_0x7b45('0x2a')][_0x7b45('0x17')]);}return _0x38be1f[_0x7b45('0x46')](_0xba4e6f);}})[_0x7b45('0x1f')](function(_0x511527){if(_0x511527){return _0x511527?{'count':_0xc0a5f7,'rows':_0x511527}:null;}})[_0x7b45('0x1f')](respondWithResult(_0x2c5bf5,null))[_0x7b45('0x3d')](handleError(_0x2c5bf5,null));};exports[_0x7b45('0x4a')]=function(_0x5a5e30,_0x487951,_0x37999b){return db[_0x7b45('0x4b')][_0x7b45('0x41')]({'where':{'id':_0x5a5e30[_0x7b45('0x3e')]['id']}})[_0x7b45('0x1f')](handleEntityNotFound(_0x487951,null))[_0x7b45('0x1f')](function(_0x5a83c0){if(_0x5a83c0){return _0x5a83c0[_0x7b45('0x4a')](_0x5a5e30['body'][_0x7b45('0x44')],_['omit'](_0x5a5e30[_0x7b45('0x40')],['ids','id'])||{});}})['then'](respondWithResult(_0x487951,null))['catch'](handleError(_0x487951,null));};exports[_0x7b45('0x4c')]=function(_0x57b9ca,_0x17cc22,_0x31be2a){var _0x146f97={};var _0x569691={};var _0x12c8b8;var _0x24ec78;return db[_0x7b45('0x25')][_0x7b45('0x47')]({'where':{'id':_0x57b9ca[_0x7b45('0x3e')]['id']}})[_0x7b45('0x1f')](handleEntityNotFound(_0x17cc22,null))[_0x7b45('0x1f')](function(_0x1200ba){if(_0x1200ba){_0x12c8b8=_0x1200ba;_0x569691[_0x7b45('0x28')]=_[_0x7b45('0x2b')](db['Action']['rawAttributes']);_0x569691[_0x7b45('0x2a')]=_['keys'](_0x57b9ca[_0x7b45('0x2a')]);_0x569691['filters']=_[_0x7b45('0x2d')](_0x569691['model'],_0x569691[_0x7b45('0x2a')]);_0x146f97[_0x7b45('0x2e')]=_[_0x7b45('0x2d')](_0x569691[_0x7b45('0x28')],qs['fields'](_0x57b9ca[_0x7b45('0x2a')]['fields']));_0x146f97[_0x7b45('0x2e')]=_0x146f97[_0x7b45('0x2e')]['length']?_0x146f97[_0x7b45('0x2e')]:_0x569691['model'];_0x146f97[_0x7b45('0x4d')]=qs[_0x7b45('0x32')](_0x57b9ca[_0x7b45('0x2a')][_0x7b45('0x32')]);_0x146f97['where']=qs[_0x7b45('0x2c')](_[_0x7b45('0x48')](_0x57b9ca[_0x7b45('0x2a')],_0x569691[_0x7b45('0x2c')]));if(_0x57b9ca[_0x7b45('0x2a')][_0x7b45('0x36')]){_0x146f97[_0x7b45('0x33')]=_[_0x7b45('0x37')](_0x146f97[_0x7b45('0x33')],{'$or':_[_0x7b45('0x29')](_0x146f97[_0x7b45('0x2e')],function(_0xfc5d20){var _0x1ff9bb={};_0x1ff9bb[_0xfc5d20]={'$like':'%'+_0x57b9ca[_0x7b45('0x2a')][_0x7b45('0x36')]+'%'};return _0x1ff9bb;})});}_0x146f97=_[_0x7b45('0x37')]({},_0x146f97,_0x57b9ca[_0x7b45('0x38')]);return _0x12c8b8[_0x7b45('0x4c')](_0x146f97);}})[_0x7b45('0x1f')](function(_0x322362){if(_0x322362){_0x24ec78=_0x322362[_0x7b45('0x30')];if(!_0x57b9ca[_0x7b45('0x2a')][_0x7b45('0x49')](_0x7b45('0x31'))){_0x146f97['limit']=qs[_0x7b45('0x19')](_0x57b9ca[_0x7b45('0x2a')]['limit']);_0x146f97[_0x7b45('0x17')]=qs[_0x7b45('0x17')](_0x57b9ca[_0x7b45('0x2a')]['offset']);}return _0x12c8b8[_0x7b45('0x4c')](_0x146f97);}})[_0x7b45('0x1f')](function(_0x590eeb){if(_0x590eeb){return _0x590eeb?{'count':_0x24ec78,'rows':_0x590eeb}:null;}})[_0x7b45('0x1f')](respondWithResult(_0x17cc22,null))[_0x7b45('0x3d')](handleError(_0x17cc22,null));}; \ No newline at end of file +var _0x6e1e=['Action','getActions','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','destroy','then','stack','name','send','index','fieldName','type','key','map','query','keys','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','VIRTUAL','merge','options','Automation','include','findAll','catch','params','includeAll','create','body','find','addConditions','Condition','ids','getConditions','findOne','rawAttributes','addActions'];(function(_0x4e4a32,_0xe675f7){var _0x511b7a=function(_0x706eb3){while(--_0x706eb3){_0x4e4a32['push'](_0x4e4a32['shift']());}};_0x511b7a(++_0xe675f7);}(_0x6e1e,0x107));var _0xe6e1=function(_0x463213,_0x1c4255){_0x463213=_0x463213-0x0;var _0x27b0b9=_0x6e1e[_0x463213];return _0x27b0b9;};'use strict';var emlformat=require(_0xe6e1('0x0'));var rimraf=require(_0xe6e1('0x1'));var zipdir=require(_0xe6e1('0x2'));var jsonpatch=require(_0xe6e1('0x3'));var rp=require(_0xe6e1('0x4'));var moment=require(_0xe6e1('0x5'));var BPromise=require(_0xe6e1('0x6'));var Mustache=require(_0xe6e1('0x7'));var util=require('util');var path=require(_0xe6e1('0x8'));var sox=require(_0xe6e1('0x9'));var csv=require(_0xe6e1('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xe6e1('0xb'));var squel=require(_0xe6e1('0xc'));var crypto=require(_0xe6e1('0xd'));var jsforce=require(_0xe6e1('0xe'));var deskjs=require(_0xe6e1('0xf'));var toCsv=require(_0xe6e1('0xa'));var querystring=require(_0xe6e1('0x10'));var Papa=require(_0xe6e1('0x11'));var Redis=require(_0xe6e1('0x12'));var authService=require(_0xe6e1('0x13'));var qs=require(_0xe6e1('0x14'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xe6e1('0x15'));var logger=require(_0xe6e1('0x16'))(_0xe6e1('0x17'));var utils=require(_0xe6e1('0x18'));var config=require(_0xe6e1('0x19'));var licenseUtil=require('../../config/license/util');var db=require(_0xe6e1('0x1a'))['db'];function respondWithStatusCode(_0x35f5ed,_0x406c6b){_0x406c6b=_0x406c6b||0xcc;return function(_0x581719){if(_0x581719){return _0x35f5ed[_0xe6e1('0x1b')](_0x406c6b);}return _0x35f5ed[_0xe6e1('0x1c')](_0x406c6b)[_0xe6e1('0x1d')]();};}function respondWithResult(_0x3d1a4c,_0x4b7a33){_0x4b7a33=_0x4b7a33||0xc8;return function(_0x12657){if(_0x12657){return _0x3d1a4c[_0xe6e1('0x1c')](_0x4b7a33)[_0xe6e1('0x1e')](_0x12657);}};}function respondWithFilteredResult(_0x2a4973,_0x445cec){return function(_0x45e0b7){if(_0x45e0b7){var _0xb3bfc5=typeof _0x445cec[_0xe6e1('0x1f')]===_0xe6e1('0x20')&&typeof _0x445cec[_0xe6e1('0x21')]===_0xe6e1('0x20');var _0x581c06=_0x45e0b7[_0xe6e1('0x22')];var _0x10c7c8=_0xb3bfc5?0x0:_0x445cec[_0xe6e1('0x1f')];var _0x4ca08d=_0xb3bfc5?_0x45e0b7['count']:_0x445cec[_0xe6e1('0x1f')]+_0x445cec[_0xe6e1('0x21')];var _0x1390eb;if(_0x4ca08d>=_0x581c06){_0x4ca08d=_0x581c06;_0x1390eb=0xc8;}else{_0x1390eb=0xce;}_0x2a4973['status'](_0x1390eb);return _0x2a4973[_0xe6e1('0x23')](_0xe6e1('0x24'),_0x10c7c8+'-'+_0x4ca08d+'/'+_0x581c06)[_0xe6e1('0x1e')](_0x45e0b7);}return null;};}function patchUpdates(_0x169d7c){return function(_0x56851a){try{jsonpatch[_0xe6e1('0x25')](_0x56851a,_0x169d7c,!![]);}catch(_0x137b6d){return BPromise[_0xe6e1('0x26')](_0x137b6d);}return _0x56851a[_0xe6e1('0x27')]();};}function saveUpdates(_0x1afbaf,_0x1934ba){return function(_0x11152f){if(_0x11152f){return _0x11152f[_0xe6e1('0x28')](_0x1afbaf)['then'](function(_0x3e9e7c){return _0x3e9e7c;});}return null;};}function removeEntity(_0x453f72,_0x4bc169){return function(_0xa29f98){if(_0xa29f98){return _0xa29f98[_0xe6e1('0x29')]()[_0xe6e1('0x2a')](function(){_0x453f72[_0xe6e1('0x1c')](0xcc)[_0xe6e1('0x1d')]();});}};}function handleEntityNotFound(_0x231040,_0x5ab25b){return function(_0x158538){if(!_0x158538){_0x231040['sendStatus'](0x194);}return _0x158538;};}function handleError(_0x479d16,_0x429176){_0x429176=_0x429176||0x1f4;return function(_0x41c37c){logger['error'](_0x41c37c[_0xe6e1('0x2b')]);if(_0x41c37c[_0xe6e1('0x2c')]){delete _0x41c37c[_0xe6e1('0x2c')];}_0x479d16[_0xe6e1('0x1c')](_0x429176)[_0xe6e1('0x2d')](_0x41c37c);};}exports[_0xe6e1('0x2e')]=function(_0x32e6fd,_0x191f12){var _0x44fac0={},_0x2f5756={},_0x4ab520={'count':0x0,'rows':[]};var _0x3dfb32=_['map'](db['Automation']['rawAttributes'],function(_0x41947d){return{'name':_0x41947d[_0xe6e1('0x2f')],'type':_0x41947d[_0xe6e1('0x30')][_0xe6e1('0x31')]};});_0x2f5756['model']=_[_0xe6e1('0x32')](_0x3dfb32,_0xe6e1('0x2c'));_0x2f5756[_0xe6e1('0x33')]=_[_0xe6e1('0x34')](_0x32e6fd[_0xe6e1('0x33')]);_0x2f5756['filters']=_[_0xe6e1('0x35')](_0x2f5756[_0xe6e1('0x36')],_0x2f5756[_0xe6e1('0x33')]);_0x44fac0[_0xe6e1('0x37')]=_[_0xe6e1('0x35')](_0x2f5756[_0xe6e1('0x36')],qs['fields'](_0x32e6fd[_0xe6e1('0x33')][_0xe6e1('0x38')]));_0x44fac0['attributes']=_0x44fac0['attributes'][_0xe6e1('0x39')]?_0x44fac0[_0xe6e1('0x37')]:_0x2f5756[_0xe6e1('0x36')];if(!_0x32e6fd[_0xe6e1('0x33')][_0xe6e1('0x3a')](_0xe6e1('0x3b'))){_0x44fac0[_0xe6e1('0x21')]=qs[_0xe6e1('0x21')](_0x32e6fd[_0xe6e1('0x33')][_0xe6e1('0x21')]);_0x44fac0[_0xe6e1('0x1f')]=qs[_0xe6e1('0x1f')](_0x32e6fd[_0xe6e1('0x33')][_0xe6e1('0x1f')]);}_0x44fac0[_0xe6e1('0x3c')]=qs['sort'](_0x32e6fd[_0xe6e1('0x33')][_0xe6e1('0x3d')]);_0x44fac0[_0xe6e1('0x3e')]=qs[_0xe6e1('0x3f')](_[_0xe6e1('0x40')](_0x32e6fd[_0xe6e1('0x33')],_0x2f5756['filters']),_0x3dfb32);if(_0x32e6fd[_0xe6e1('0x33')][_0xe6e1('0x41')]){_0x44fac0[_0xe6e1('0x3e')]=_['merge'](_0x44fac0[_0xe6e1('0x3e')],{'$or':_[_0xe6e1('0x32')](_0x3dfb32,function(_0x2dbdfd){if(_0x2dbdfd[_0xe6e1('0x30')]!==_0xe6e1('0x42')){var _0x2daf6a={};_0x2daf6a[_0x2dbdfd['name']]={'$like':'%'+_0x32e6fd['query']['filter']+'%'};return _0x2daf6a;}})});}_0x44fac0=_[_0xe6e1('0x43')]({},_0x44fac0,_0x32e6fd[_0xe6e1('0x44')]);var _0xef6bec={'where':_0x44fac0[_0xe6e1('0x3e')]};return db[_0xe6e1('0x45')][_0xe6e1('0x22')](_0xef6bec)[_0xe6e1('0x2a')](function(_0x5d7707){_0x4ab520[_0xe6e1('0x22')]=_0x5d7707;if(_0x32e6fd[_0xe6e1('0x33')]['includeAll']){_0x44fac0[_0xe6e1('0x46')]=[{'all':!![]}];}return db[_0xe6e1('0x45')][_0xe6e1('0x47')](_0x44fac0);})[_0xe6e1('0x2a')](function(_0x181a27){_0x4ab520['rows']=_0x181a27;return _0x4ab520;})[_0xe6e1('0x2a')](respondWithFilteredResult(_0x191f12,_0x44fac0))[_0xe6e1('0x48')](handleError(_0x191f12,null));};exports['show']=function(_0x434de7,_0x5094fd){var _0x52c15d={'raw':![],'where':{'id':_0x434de7[_0xe6e1('0x49')]['id']}},_0x5f020e={};_0x5f020e[_0xe6e1('0x36')]=_[_0xe6e1('0x34')](db[_0xe6e1('0x45')]['rawAttributes']);_0x5f020e['query']=_['keys'](_0x434de7[_0xe6e1('0x33')]);_0x5f020e[_0xe6e1('0x3f')]=_['intersection'](_0x5f020e[_0xe6e1('0x36')],_0x5f020e[_0xe6e1('0x33')]);_0x52c15d[_0xe6e1('0x37')]=_['intersection'](_0x5f020e['model'],qs[_0xe6e1('0x38')](_0x434de7[_0xe6e1('0x33')][_0xe6e1('0x38')]));_0x52c15d[_0xe6e1('0x37')]=_0x52c15d[_0xe6e1('0x37')][_0xe6e1('0x39')]?_0x52c15d[_0xe6e1('0x37')]:_0x5f020e[_0xe6e1('0x36')];if(_0x434de7[_0xe6e1('0x33')][_0xe6e1('0x4a')]){_0x52c15d[_0xe6e1('0x46')]=[{'all':!![]}];}_0x52c15d=_[_0xe6e1('0x43')]({},_0x52c15d,_0x434de7['options']);return db[_0xe6e1('0x45')]['find'](_0x52c15d)[_0xe6e1('0x2a')](handleEntityNotFound(_0x5094fd,null))['then'](respondWithResult(_0x5094fd,null))[_0xe6e1('0x48')](handleError(_0x5094fd,null));};exports[_0xe6e1('0x4b')]=function(_0x190512,_0x1d5f78){return db[_0xe6e1('0x45')][_0xe6e1('0x4b')](_0x190512[_0xe6e1('0x4c')],{})[_0xe6e1('0x2a')](respondWithResult(_0x1d5f78,0xc9))[_0xe6e1('0x48')](handleError(_0x1d5f78,null));};exports[_0xe6e1('0x28')]=function(_0x26e38b,_0x2fe7fb){if(_0x26e38b['body']['id']){delete _0x26e38b[_0xe6e1('0x4c')]['id'];}return db[_0xe6e1('0x45')][_0xe6e1('0x4d')]({'where':{'id':_0x26e38b['params']['id']}})[_0xe6e1('0x2a')](handleEntityNotFound(_0x2fe7fb,null))[_0xe6e1('0x2a')](saveUpdates(_0x26e38b[_0xe6e1('0x4c')],null))['then'](respondWithResult(_0x2fe7fb,null))['catch'](handleError(_0x2fe7fb,null));};exports['destroy']=function(_0x543187,_0x43b87a){return db[_0xe6e1('0x45')]['find']({'where':{'id':_0x543187[_0xe6e1('0x49')]['id']}})[_0xe6e1('0x2a')](handleEntityNotFound(_0x43b87a,null))[_0xe6e1('0x2a')](removeEntity(_0x43b87a,null))[_0xe6e1('0x48')](handleError(_0x43b87a,null));};exports[_0xe6e1('0x4e')]=function(_0x33a744,_0xed9a13,_0x1f6577){return db[_0xe6e1('0x4f')][_0xe6e1('0x4d')]({'where':{'id':_0x33a744[_0xe6e1('0x49')]['id']}})[_0xe6e1('0x2a')](handleEntityNotFound(_0xed9a13,null))[_0xe6e1('0x2a')](function(_0x4040c9){if(_0x4040c9){return _0x4040c9[_0xe6e1('0x4e')](_0x33a744[_0xe6e1('0x4c')][_0xe6e1('0x50')],_['omit'](_0x33a744[_0xe6e1('0x4c')],[_0xe6e1('0x50'),'id'])||{});}})['then'](respondWithResult(_0xed9a13,null))[_0xe6e1('0x48')](handleError(_0xed9a13,null));};exports[_0xe6e1('0x51')]=function(_0x58681a,_0x312e35,_0x16aa5b){var _0x34791c={};var _0x414b61={};var _0x13d6ff;var _0x2ca1ea;return db[_0xe6e1('0x45')][_0xe6e1('0x52')]({'where':{'id':_0x58681a[_0xe6e1('0x49')]['id']}})['then'](handleEntityNotFound(_0x312e35,null))[_0xe6e1('0x2a')](function(_0x2c3ffa){if(_0x2c3ffa){_0x13d6ff=_0x2c3ffa;_0x414b61[_0xe6e1('0x36')]=_[_0xe6e1('0x34')](db[_0xe6e1('0x4f')][_0xe6e1('0x53')]);_0x414b61['query']=_['keys'](_0x58681a['query']);_0x414b61[_0xe6e1('0x3f')]=_[_0xe6e1('0x35')](_0x414b61[_0xe6e1('0x36')],_0x414b61['query']);_0x34791c[_0xe6e1('0x37')]=_['intersection'](_0x414b61[_0xe6e1('0x36')],qs[_0xe6e1('0x38')](_0x58681a[_0xe6e1('0x33')][_0xe6e1('0x38')]));_0x34791c[_0xe6e1('0x37')]=_0x34791c['attributes'][_0xe6e1('0x39')]?_0x34791c[_0xe6e1('0x37')]:_0x414b61['model'];_0x34791c[_0xe6e1('0x3c')]=qs['sort'](_0x58681a[_0xe6e1('0x33')][_0xe6e1('0x3d')]);_0x34791c[_0xe6e1('0x3e')]=qs[_0xe6e1('0x3f')](_['pick'](_0x58681a[_0xe6e1('0x33')],_0x414b61[_0xe6e1('0x3f')]));if(_0x58681a[_0xe6e1('0x33')][_0xe6e1('0x41')]){_0x34791c[_0xe6e1('0x3e')]=_['merge'](_0x34791c['where'],{'$or':_[_0xe6e1('0x32')](_0x34791c[_0xe6e1('0x37')],function(_0x49b89c){var _0x1d6e1d={};_0x1d6e1d[_0x49b89c]={'$like':'%'+_0x58681a[_0xe6e1('0x33')][_0xe6e1('0x41')]+'%'};return _0x1d6e1d;})});}_0x34791c=_['merge']({},_0x34791c,_0x58681a[_0xe6e1('0x44')]);return _0x13d6ff[_0xe6e1('0x51')](_0x34791c);}})['then'](function(_0x236e8e){if(_0x236e8e){_0x2ca1ea=_0x236e8e[_0xe6e1('0x39')];if(!_0x58681a[_0xe6e1('0x33')][_0xe6e1('0x3a')](_0xe6e1('0x3b'))){_0x34791c['limit']=qs['limit'](_0x58681a[_0xe6e1('0x33')]['limit']);_0x34791c[_0xe6e1('0x1f')]=qs[_0xe6e1('0x1f')](_0x58681a[_0xe6e1('0x33')]['offset']);}return _0x13d6ff['getConditions'](_0x34791c);}})[_0xe6e1('0x2a')](function(_0xd16238){if(_0xd16238){return _0xd16238?{'count':_0x2ca1ea,'rows':_0xd16238}:null;}})[_0xe6e1('0x2a')](respondWithResult(_0x312e35,null))[_0xe6e1('0x48')](handleError(_0x312e35,null));};exports[_0xe6e1('0x54')]=function(_0x48c5c8,_0x592fe9,_0x41d8d6){return db[_0xe6e1('0x55')][_0xe6e1('0x4d')]({'where':{'id':_0x48c5c8['params']['id']}})[_0xe6e1('0x2a')](handleEntityNotFound(_0x592fe9,null))[_0xe6e1('0x2a')](function(_0x24b063){if(_0x24b063){return _0x24b063[_0xe6e1('0x54')](_0x48c5c8[_0xe6e1('0x4c')][_0xe6e1('0x50')],_['omit'](_0x48c5c8['body'],[_0xe6e1('0x50'),'id'])||{});}})[_0xe6e1('0x2a')](respondWithResult(_0x592fe9,null))[_0xe6e1('0x48')](handleError(_0x592fe9,null));};exports['getActions']=function(_0x45b937,_0x4ac746,_0x4c5926){var _0x4c286b={};var _0xd478eb={};var _0x3d8589;var _0x119112;return db['Automation']['findOne']({'where':{'id':_0x45b937[_0xe6e1('0x49')]['id']}})[_0xe6e1('0x2a')](handleEntityNotFound(_0x4ac746,null))[_0xe6e1('0x2a')](function(_0x4cd805){if(_0x4cd805){_0x3d8589=_0x4cd805;_0xd478eb[_0xe6e1('0x36')]=_[_0xe6e1('0x34')](db['Action'][_0xe6e1('0x53')]);_0xd478eb[_0xe6e1('0x33')]=_[_0xe6e1('0x34')](_0x45b937[_0xe6e1('0x33')]);_0xd478eb[_0xe6e1('0x3f')]=_[_0xe6e1('0x35')](_0xd478eb[_0xe6e1('0x36')],_0xd478eb[_0xe6e1('0x33')]);_0x4c286b[_0xe6e1('0x37')]=_[_0xe6e1('0x35')](_0xd478eb[_0xe6e1('0x36')],qs[_0xe6e1('0x38')](_0x45b937[_0xe6e1('0x33')][_0xe6e1('0x38')]));_0x4c286b[_0xe6e1('0x37')]=_0x4c286b['attributes'][_0xe6e1('0x39')]?_0x4c286b[_0xe6e1('0x37')]:_0xd478eb[_0xe6e1('0x36')];_0x4c286b[_0xe6e1('0x3c')]=qs[_0xe6e1('0x3d')](_0x45b937[_0xe6e1('0x33')][_0xe6e1('0x3d')]);_0x4c286b[_0xe6e1('0x3e')]=qs['filters'](_[_0xe6e1('0x40')](_0x45b937[_0xe6e1('0x33')],_0xd478eb[_0xe6e1('0x3f')]));if(_0x45b937[_0xe6e1('0x33')]['filter']){_0x4c286b['where']=_[_0xe6e1('0x43')](_0x4c286b[_0xe6e1('0x3e')],{'$or':_[_0xe6e1('0x32')](_0x4c286b[_0xe6e1('0x37')],function(_0x5063ba){var _0x4ce6cc={};_0x4ce6cc[_0x5063ba]={'$like':'%'+_0x45b937[_0xe6e1('0x33')][_0xe6e1('0x41')]+'%'};return _0x4ce6cc;})});}_0x4c286b=_[_0xe6e1('0x43')]({},_0x4c286b,_0x45b937['options']);return _0x3d8589[_0xe6e1('0x56')](_0x4c286b);}})[_0xe6e1('0x2a')](function(_0x540f57){if(_0x540f57){_0x119112=_0x540f57['length'];if(!_0x45b937[_0xe6e1('0x33')][_0xe6e1('0x3a')](_0xe6e1('0x3b'))){_0x4c286b[_0xe6e1('0x21')]=qs['limit'](_0x45b937[_0xe6e1('0x33')][_0xe6e1('0x21')]);_0x4c286b[_0xe6e1('0x1f')]=qs['offset'](_0x45b937['query'][_0xe6e1('0x1f')]);}return _0x3d8589[_0xe6e1('0x56')](_0x4c286b);}})[_0xe6e1('0x2a')](function(_0x8eb040){if(_0x8eb040){return _0x8eb040?{'count':_0x119112,'rows':_0x8eb040}:null;}})[_0xe6e1('0x2a')](respondWithResult(_0x4ac746,null))['catch'](handleError(_0x4ac746,null));}; \ No newline at end of file diff --git a/server/api/automation/automation.model.js b/server/api/automation/automation.model.js index fcfe546..c2f1e59 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 _0xa305=['lodash','util','api','moment','path','rimraf','../../config/environment','./automation.attributes','exports','define','Automation','tools_automations'];(function(_0x55746b,_0x271d14){var _0x1cd3f2=function(_0x44b6d4){while(--_0x44b6d4){_0x55746b['push'](_0x55746b['shift']());}};_0x1cd3f2(++_0x271d14);}(_0xa305,0x144));var _0x5a30=function(_0x50b8f3,_0x518f72){_0x50b8f3=_0x50b8f3-0x0;var _0x265377=_0xa305[_0x50b8f3];return _0x265377;};'use strict';var _=require(_0x5a30('0x0'));var util=require(_0x5a30('0x1'));var logger=require('../../config/logger')(_0x5a30('0x2'));var moment=require(_0x5a30('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x5a30('0x4'));var rimraf=require(_0x5a30('0x5'));var config=require(_0x5a30('0x6'));var attributes=require(_0x5a30('0x7'));module[_0x5a30('0x8')]=function(_0x4945ad,_0x1b47b6){return _0x4945ad[_0x5a30('0x9')](_0x5a30('0xa'),attributes,{'tableName':_0x5a30('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x4dfc=['request-promise','path','rimraf','./automation.attributes','exports','Automation','tools_automations','util','../../config/logger','api','moment','bluebird'];(function(_0x22bb86,_0x502077){var _0x51b862=function(_0x40f039){while(--_0x40f039){_0x22bb86['push'](_0x22bb86['shift']());}};_0x51b862(++_0x502077);}(_0x4dfc,0x103));var _0xc4df=function(_0x5a9666,_0x30bc94){_0x5a9666=_0x5a9666-0x0;var _0x28601f=_0x4dfc[_0x5a9666];return _0x28601f;};'use strict';var _=require('lodash');var util=require(_0xc4df('0x0'));var logger=require(_0xc4df('0x1'))(_0xc4df('0x2'));var moment=require(_0xc4df('0x3'));var BPromise=require(_0xc4df('0x4'));var rp=require(_0xc4df('0x5'));var fs=require('fs');var path=require(_0xc4df('0x6'));var rimraf=require(_0xc4df('0x7'));var config=require('../../config/environment');var attributes=require(_0xc4df('0x8'));module[_0xc4df('0x9')]=function(_0x12f5fa,_0x43602b){return _0x12f5fa['define'](_0xc4df('0xa'),attributes,{'tableName':_0xc4df('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/automation/automation.rpc.js b/server/api/automation/automation.rpc.js index 40789a7..b048208 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 _0x28f2=['debug','Automation,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','then','info','Automation,\x20%s,\x20%s'];(function(_0x4057ca,_0xbe5390){var _0x20f2ea=function(_0x2f89ec){while(--_0x2f89ec){_0x4057ca['push'](_0x4057ca['shift']());}};_0x20f2ea(++_0xbe5390);}(_0x28f2,0x193));var _0x228f=function(_0x175980,_0x3663b4){_0x175980=_0x175980-0x0;var _0x30dfc5=_0x28f2[_0x175980];return _0x30dfc5;};'use strict';var _=require(_0x228f('0x0'));var util=require(_0x228f('0x1'));var moment=require(_0x228f('0x2'));var BPromise=require(_0x228f('0x3'));var rs=require(_0x228f('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x228f('0x5'))['db'];var utils=require(_0x228f('0x6'));var logger=require(_0x228f('0x7'))(_0x228f('0x8'));var config=require(_0x228f('0x9'));var jayson=require(_0x228f('0xa'));var client=jayson[_0x228f('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x10da58,_0x4a4a44,_0x3ca074){return new BPromise(function(_0x455eb6,_0xf4b011){return client['request'](_0x10da58,_0x3ca074)[_0x228f('0xc')](function(_0x4d0038){logger[_0x228f('0xd')](_0x228f('0xe'),_0x4a4a44,'request\x20sent');logger[_0x228f('0xf')](_0x228f('0x10'),_0x4a4a44,_0x228f('0x11'),JSON[_0x228f('0x12')](_0x4d0038));if(_0x4d0038[_0x228f('0x13')]){if(_0x4d0038['error'][_0x228f('0x14')]===0x1f4){logger[_0x228f('0x13')](_0x228f('0xe'),_0x4a4a44,_0x4d0038[_0x228f('0x13')][_0x228f('0x15')]);return _0xf4b011(_0x4d0038[_0x228f('0x13')][_0x228f('0x15')]);}logger[_0x228f('0x13')]('Automation,\x20%s,\x20%s',_0x4a4a44,_0x4d0038[_0x228f('0x13')][_0x228f('0x15')]);return _0x455eb6(_0x4d0038[_0x228f('0x13')][_0x228f('0x15')]);}else{logger[_0x228f('0xd')](_0x228f('0xe'),_0x4a4a44,_0x228f('0x11'));_0x455eb6(_0x4d0038['result'][_0x228f('0x15')]);}})['catch'](function(_0x20e687){logger[_0x228f('0x13')](_0x228f('0xe'),_0x4a4a44,_0x20e687);_0xf4b011(_0x20e687);});});} \ No newline at end of file +var _0xf960=['Automation,\x20%s,\x20%s','message','catch','lodash','moment','randomstring','ioredis','../../config/utils','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','Automation,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0x247064,_0x471718){var _0x287b72=function(_0x857a3e){while(--_0x857a3e){_0x247064['push'](_0x247064['shift']());}};_0x287b72(++_0x471718);}(_0xf960,0x193));var _0x0f96=function(_0x16b1a5,_0x318267){_0x16b1a5=_0x16b1a5-0x0;var _0x475e25=_0xf960[_0x16b1a5];return _0x475e25;};'use strict';var _=require(_0x0f96('0x0'));var util=require('util');var moment=require(_0x0f96('0x1'));var BPromise=require('bluebird');var rs=require(_0x0f96('0x2'));var fs=require('fs');var Redis=require(_0x0f96('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x0f96('0x4'));var logger=require('../../config/logger')('rpc');var config=require(_0x0f96('0x5'));var jayson=require(_0x0f96('0x6'));var client=jayson[_0x0f96('0x7')][_0x0f96('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x765dfe,_0x5c61f0,_0x48a12b){return new BPromise(function(_0x1c690a,_0x354642){return client[_0x0f96('0x9')](_0x765dfe,_0x48a12b)[_0x0f96('0xa')](function(_0x1eb762){logger[_0x0f96('0xb')]('Automation,\x20%s,\x20%s',_0x5c61f0,_0x0f96('0xc'));logger['debug'](_0x0f96('0xd'),_0x5c61f0,'request\x20sent',JSON[_0x0f96('0xe')](_0x1eb762));if(_0x1eb762[_0x0f96('0xf')]){if(_0x1eb762[_0x0f96('0xf')][_0x0f96('0x10')]===0x1f4){logger['error'](_0x0f96('0x11'),_0x5c61f0,_0x1eb762[_0x0f96('0xf')][_0x0f96('0x12')]);return _0x354642(_0x1eb762[_0x0f96('0xf')]['message']);}logger[_0x0f96('0xf')](_0x0f96('0x11'),_0x5c61f0,_0x1eb762[_0x0f96('0xf')][_0x0f96('0x12')]);return _0x1c690a(_0x1eb762[_0x0f96('0xf')][_0x0f96('0x12')]);}else{logger['info'](_0x0f96('0x11'),_0x5c61f0,'request\x20sent');_0x1c690a(_0x1eb762['result'][_0x0f96('0x12')]);}})[_0x0f96('0x13')](function(_0x183d93){logger[_0x0f96('0xf')](_0x0f96('0x11'),_0x5c61f0,_0x183d93);_0x354642(_0x183d93);});});} \ No newline at end of file diff --git a/server/api/automation/index.js b/server/api/automation/index.js index 3e72970..8f87fdd 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 _0x94dc=['post','addConditions','addActions','put','/:id','update','delete','destroy','exports','multer','path','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./automation.controller','get','isAuthenticated','index','show','/:id/conditions','/:id/actions','getActions'];(function(_0x39ed28,_0x45d68a){var _0x460c9b=function(_0x270065){while(--_0x270065){_0x39ed28['push'](_0x39ed28['shift']());}};_0x460c9b(++_0x45d68a);}(_0x94dc,0xb1));var _0xc94d=function(_0x4ac631,_0x1eee0a){_0x4ac631=_0x4ac631-0x0;var _0x5b1140=_0x94dc[_0x4ac631];return _0x5b1140;};'use strict';var multer=require(_0xc94d('0x0'));var util=require('util');var path=require(_0xc94d('0x1'));var timeout=require('connect-timeout');var express=require(_0xc94d('0x2'));var router=express[_0xc94d('0x3')]();var fs_extra=require(_0xc94d('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0xc94d('0x5'));var config=require(_0xc94d('0x6'));var controller=require(_0xc94d('0x7'));router[_0xc94d('0x8')]('/',auth[_0xc94d('0x9')](),controller[_0xc94d('0xa')]);router[_0xc94d('0x8')]('/:id',auth[_0xc94d('0x9')](),controller[_0xc94d('0xb')]);router[_0xc94d('0x8')](_0xc94d('0xc'),auth[_0xc94d('0x9')](),controller['getConditions']);router[_0xc94d('0x8')](_0xc94d('0xd'),auth[_0xc94d('0x9')](),controller[_0xc94d('0xe')]);router[_0xc94d('0xf')]('/',auth[_0xc94d('0x9')](),controller['create']);router[_0xc94d('0xf')](_0xc94d('0xc'),auth[_0xc94d('0x9')](),controller[_0xc94d('0x10')]);router['post']('/:id/actions',auth['isAuthenticated'](),controller[_0xc94d('0x11')]);router[_0xc94d('0x12')](_0xc94d('0x13'),auth[_0xc94d('0x9')](),controller[_0xc94d('0x14')]);router[_0xc94d('0x15')](_0xc94d('0x13'),auth[_0xc94d('0x9')](),controller[_0xc94d('0x16')]);module[_0xc94d('0x17')]=router; \ No newline at end of file +var _0xb717=['fs-extra','../../components/interaction/service','../../config/environment','./automation.controller','get','isAuthenticated','/:id','show','getConditions','/:id/actions','getActions','post','addConditions','put','update','destroy','multer','path','express','Router'];(function(_0x160c73,_0x2ee678){var _0xd9302=function(_0x169454){while(--_0x169454){_0x160c73['push'](_0x160c73['shift']());}};_0xd9302(++_0x2ee678);}(_0xb717,0x1b4));var _0x7b71=function(_0x30ef12,_0x2677f2){_0x30ef12=_0x30ef12-0x0;var _0x34d13f=_0xb717[_0x30ef12];return _0x34d13f;};'use strict';var multer=require(_0x7b71('0x0'));var util=require('util');var path=require(_0x7b71('0x1'));var timeout=require('connect-timeout');var express=require(_0x7b71('0x2'));var router=express[_0x7b71('0x3')]();var fs_extra=require(_0x7b71('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x7b71('0x5'));var config=require(_0x7b71('0x6'));var controller=require(_0x7b71('0x7'));router[_0x7b71('0x8')]('/',auth[_0x7b71('0x9')](),controller['index']);router[_0x7b71('0x8')](_0x7b71('0xa'),auth[_0x7b71('0x9')](),controller[_0x7b71('0xb')]);router[_0x7b71('0x8')]('/:id/conditions',auth[_0x7b71('0x9')](),controller[_0x7b71('0xc')]);router['get'](_0x7b71('0xd'),auth[_0x7b71('0x9')](),controller[_0x7b71('0xe')]);router['post']('/',auth[_0x7b71('0x9')](),controller['create']);router[_0x7b71('0xf')]('/:id/conditions',auth[_0x7b71('0x9')](),controller[_0x7b71('0x10')]);router[_0x7b71('0xf')](_0x7b71('0xd'),auth[_0x7b71('0x9')](),controller['addActions']);router[_0x7b71('0x11')]('/:id',auth[_0x7b71('0x9')](),controller[_0x7b71('0x12')]);router['delete'](_0x7b71('0xa'),auth[_0x7b71('0x9')](),controller[_0x7b71('0x13')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/campaign/campaign.attributes.js b/server/api/campaign/campaign.attributes.js index 6491c77..177d931 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 _0x6e78=['Congestion\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Busy\x20Retry\x20(min:1,\x20max:999)','Busy\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#NoAnswer\x20Retry\x20(min:1,\x20max:999)','NoAnswer\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','07:00-22:00,*,*,*','always','never','onlyIfOpen','Active/Disactive\x20AMD','#AMD\x20Greeting','#AMD\x20After\x20Greeting\x20Silence','#AMD\x20Total\x20Analysis\x20Time','#AMD\x20Maximum\x20Number\x20Of\x20Words','#AMD\x20Silence\x20Threshold\x20(min:0,\x20max:32767)','#AMD\x20Maximum\x20Word\x20Length','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\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Abandoned\x20Retry\x20(min:1,\x20max:999)','Abandoned\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Machine\x20Retry\x20(min:1,\x20max:999)','Machine\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#AgentReject\x20Retry\x20(min:1,\x20max:999)','AgentReject\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','sequelize','STRING','ENUM','ivr','BOOLEAN','INTEGER','UNSIGNED','Max\x20200\x20calls.','#Congestion\x20Retry\x20(min:1,\x20max:999)'];(function(_0x500c98,_0x37e93d){var _0x52fed1=function(_0x236284){while(--_0x236284){_0x500c98['push'](_0x500c98['shift']());}};_0x52fed1(++_0x37e93d);}(_0x6e78,0x169));var _0x86e7=function(_0x4d108b,_0x20fcfc){_0x4d108b=_0x4d108b-0x0;var _0x16c26c=_0x6e78[_0x4d108b];return _0x16c26c;};'use strict';var Sequelize=require(_0x86e7('0x0'));module['exports']={'name':{'type':Sequelize[_0x86e7('0x1')],'unique':'name','allowNull':![],'validate':{'is':/[A-Za-z0-9._\\+*!-]+/,'notEmpty':!![]}},'type':{'type':Sequelize[_0x86e7('0x2')](_0x86e7('0x3')),'allowNull':![],'defaultValue':_0x86e7('0x3')},'description':{'type':Sequelize['STRING']},'active':{'type':Sequelize[_0x86e7('0x4')],'defaultValue':0x0,'comment':'Active/Disactive\x20Campaign'},'limitCalls':{'type':Sequelize[_0x86e7('0x5')](0x4)[_0x86e7('0x6')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0xc8},'comment':_0x86e7('0x7')},'dialOriginateCallerIdName':{'type':Sequelize[_0x86e7('0x1')]},'dialOriginateCallerIdNumber':{'type':Sequelize['STRING']},'dialOriginateTimeout':{'type':Sequelize[_0x86e7('0x5')](0x3)[_0x86e7('0x6')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0x3e7},'comment':'Originate\x20Timeout\x20Seconds\x20(min:1,\x20max:999)'},'dialCongestionMaxRetry':{'type':Sequelize[_0x86e7('0x5')](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x86e7('0x8')},'dialCongestionRetryFrequency':{'type':Sequelize[_0x86e7('0x5')](0x5)[_0x86e7('0x6')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x86e7('0x9')},'dialBusyMaxRetry':{'type':Sequelize[_0x86e7('0x5')](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x86e7('0xa')},'dialBusyRetryFrequency':{'type':Sequelize[_0x86e7('0x5')](0x5)[_0x86e7('0x6')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x86e7('0xb')},'dialNoAnswerMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x86e7('0x6')],'defaultValue':0x3,'comment':_0x86e7('0xc')},'dialNoAnswerRetryFrequency':{'type':Sequelize[_0x86e7('0x5')](0x5)[_0x86e7('0x6')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x86e7('0xd')},'dialGlobalMaxRetry':{'type':Sequelize[_0x86e7('0x5')](0x3)[_0x86e7('0x6')],'validate':{'min':0x1,'max':0x3e7},'defaultValue':0x4,'comment':'#Global\x20Max\x20Retry\x20(min:1,\x20max:999)'},'dialTimezone':{'type':Sequelize[_0x86e7('0x1')],'defaultValue':null},'dialGlobalInterval':{'type':Sequelize[_0x86e7('0x1')],'defaultValue':_0x86e7('0xe')},'dialCheckDuplicateType':{'type':Sequelize[_0x86e7('0x2')](_0x86e7('0xf'),_0x86e7('0x10'),_0x86e7('0x11')),'defaultValue':_0x86e7('0xf')},'dialAMDActive':{'type':Sequelize[_0x86e7('0x4')],'defaultValue':0x0,'comment':_0x86e7('0x12')},'dialAMDInitialSilence':{'type':Sequelize[_0x86e7('0x5')](0x9)['UNSIGNED'],'defaultValue':0x9c4,'validate':{'min':0x0},'comment':'#AMD\x20Initial\x20Silence'},'dialAMDGreeting':{'type':Sequelize[_0x86e7('0x5')](0x9)[_0x86e7('0x6')],'defaultValue':0x5dc,'validate':{'min':0x0},'comment':_0x86e7('0x13')},'dialAMDAfterGreetingSilence':{'type':Sequelize[_0x86e7('0x5')](0x9)['UNSIGNED'],'defaultValue':0x320,'validate':{'min':0x0},'comment':_0x86e7('0x14')},'dialAMDTotalAnalysisTime':{'type':Sequelize[_0x86e7('0x5')](0x9)[_0x86e7('0x6')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0x86e7('0x15')},'dialAMDMinWordLength':{'type':Sequelize[_0x86e7('0x5')](0x9)['UNSIGNED'],'defaultValue':0x64,'validate':{'min':0x0},'comment':'#AMD\x20Min\x20Word\x20Length'},'dialAMDBetweenWordsSilence':{'type':Sequelize[_0x86e7('0x5')](0x9)['UNSIGNED'],'defaultValue':0x32,'validate':{'min':0x0},'comment':'#AMD\x20Between\x20Words\x20Silence'},'dialAMDMaximumNumberOfWords':{'type':Sequelize['INTEGER'](0x9)[_0x86e7('0x6')],'defaultValue':0x3,'validate':{'min':0x0},'comment':_0x86e7('0x16')},'dialAMDSilenceThreshold':{'type':Sequelize[_0x86e7('0x5')](0x5)[_0x86e7('0x6')],'validate':{'min':0x0,'max':0x7fff},'defaultValue':0x100,'comment':_0x86e7('0x17')},'dialAMDMaximumWordLength':{'type':Sequelize['INTEGER'](0x9)[_0x86e7('0x6')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0x86e7('0x18')},'dialOrderByScheduledAt':{'type':Sequelize['ENUM'](_0x86e7('0x19'),'ASC'),'defaultValue':_0x86e7('0x19')},'dialPrefix':{'type':Sequelize[_0x86e7('0x1')],'defaultValue':null},'dialRandomLastDigitCallerIdNumber':{'type':Sequelize['INTEGER'](0x3)[_0x86e7('0x6')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0x86e7('0x1a')},'dialCutDigit':{'type':Sequelize[_0x86e7('0x5')](0x3)[_0x86e7('0x6')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0x86e7('0x1b')},'dialNoSuchNumberMaxRetry':{'type':Sequelize[_0x86e7('0x5')](0x3)[_0x86e7('0x6')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x86e7('0x1c')},'dialNoSuchNumberRetryFrequency':{'type':Sequelize[_0x86e7('0x5')](0x5)[_0x86e7('0x6')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x86e7('0x1d')},'dialDropMaxRetry':{'type':Sequelize[_0x86e7('0x5')](0x3)[_0x86e7('0x6')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Drop\x20Retry\x20(min:1,\x20max:999)'},'dialDropRetryFrequency':{'type':Sequelize[_0x86e7('0x5')](0x5)[_0x86e7('0x6')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x86e7('0x1e')},'dialAbandonedMaxRetry':{'type':Sequelize[_0x86e7('0x5')](0x3)[_0x86e7('0x6')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x86e7('0x1f')},'dialAbandonedRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0x86e7('0x6')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x86e7('0x20')},'dialMachineMaxRetry':{'type':Sequelize[_0x86e7('0x5')](0x3)[_0x86e7('0x6')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x86e7('0x21')},'dialMachineRetryFrequency':{'type':Sequelize[_0x86e7('0x5')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x86e7('0x22')},'dialAgentRejectMaxRetry':{'type':Sequelize[_0x86e7('0x5')](0x3)[_0x86e7('0x6')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x86e7('0x23')},'dialAgentRejectRetryFrequency':{'type':Sequelize[_0x86e7('0x5')](0x5)[_0x86e7('0x6')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x86e7('0x24')}}; \ No newline at end of file +var _0x3fac=['Active/Disactive\x20Campaign','UNSIGNED','Max\x20200\x20calls.','INTEGER','Originate\x20Timeout\x20Seconds\x20(min:1,\x20max:999)','#Busy\x20Retry\x20(min:1,\x20max:999)','Busy\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','NoAnswer\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Global\x20Max\x20Retry\x20(min:1,\x20max:999)','07:00-22:00,*,*,*','always','onlyIfOpen','#AMD\x20Initial\x20Silence','#AMD\x20Min\x20Word\x20Length','#AMD\x20Maximum\x20Number\x20Of\x20Words','#AMD\x20Silence\x20Threshold\x20(min:0,\x20max:32767)','DESC','ASC','Cut\x20Digit\x20(min:1,\x20max:15)','NoSuchNumber\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Drop\x20Retry\x20(min:1,\x20max:999)','#Abandoned\x20Retry\x20(min:1,\x20max:999)','Abandoned\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','Machine\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#AgentReject\x20Retry\x20(min:1,\x20max:999)','AgentReject\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','sequelize','exports','name','ENUM','ivr','STRING','BOOLEAN'];(function(_0x5d9471,_0x45be46){var _0x3b4cc6=function(_0x5a16ca){while(--_0x5a16ca){_0x5d9471['push'](_0x5d9471['shift']());}};_0x3b4cc6(++_0x45be46);}(_0x3fac,0x1a6));var _0xc3fa=function(_0x2dd1ed,_0x5bf7d5){_0x2dd1ed=_0x2dd1ed-0x0;var _0x2e226f=_0x3fac[_0x2dd1ed];return _0x2e226f;};'use strict';var Sequelize=require(_0xc3fa('0x0'));module[_0xc3fa('0x1')]={'name':{'type':Sequelize['STRING'],'unique':_0xc3fa('0x2'),'allowNull':![],'validate':{'is':/[A-Za-z0-9._\\+*!-]+/,'notEmpty':!![]}},'type':{'type':Sequelize[_0xc3fa('0x3')](_0xc3fa('0x4')),'allowNull':![],'defaultValue':'ivr'},'description':{'type':Sequelize[_0xc3fa('0x5')]},'active':{'type':Sequelize[_0xc3fa('0x6')],'defaultValue':0x0,'comment':_0xc3fa('0x7')},'limitCalls':{'type':Sequelize['INTEGER'](0x4)[_0xc3fa('0x8')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0xc8},'comment':_0xc3fa('0x9')},'dialOriginateCallerIdName':{'type':Sequelize['STRING']},'dialOriginateCallerIdNumber':{'type':Sequelize[_0xc3fa('0x5')]},'dialOriginateTimeout':{'type':Sequelize[_0xc3fa('0xa')](0x3)[_0xc3fa('0x8')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0x3e7},'comment':_0xc3fa('0xb')},'dialCongestionMaxRetry':{'type':Sequelize[_0xc3fa('0xa')](0x3)[_0xc3fa('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Congestion\x20Retry\x20(min:1,\x20max:999)'},'dialCongestionRetryFrequency':{'type':Sequelize[_0xc3fa('0xa')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'Congestion\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialBusyMaxRetry':{'type':Sequelize[_0xc3fa('0xa')](0x3)[_0xc3fa('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xc3fa('0xc')},'dialBusyRetryFrequency':{'type':Sequelize['INTEGER'](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xc3fa('0xd')},'dialNoAnswerMaxRetry':{'type':Sequelize[_0xc3fa('0xa')](0x3)[_0xc3fa('0x8')],'defaultValue':0x3,'comment':'#NoAnswer\x20Retry\x20(min:1,\x20max:999)'},'dialNoAnswerRetryFrequency':{'type':Sequelize[_0xc3fa('0xa')](0x5)[_0xc3fa('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xc3fa('0xe')},'dialGlobalMaxRetry':{'type':Sequelize['INTEGER'](0x3)['UNSIGNED'],'validate':{'min':0x1,'max':0x3e7},'defaultValue':0x4,'comment':_0xc3fa('0xf')},'dialTimezone':{'type':Sequelize[_0xc3fa('0x5')],'defaultValue':null},'dialGlobalInterval':{'type':Sequelize[_0xc3fa('0x5')],'defaultValue':_0xc3fa('0x10')},'dialCheckDuplicateType':{'type':Sequelize['ENUM'](_0xc3fa('0x11'),'never',_0xc3fa('0x12')),'defaultValue':_0xc3fa('0x11')},'dialAMDActive':{'type':Sequelize[_0xc3fa('0x6')],'defaultValue':0x0,'comment':'Active/Disactive\x20AMD'},'dialAMDInitialSilence':{'type':Sequelize[_0xc3fa('0xa')](0x9)[_0xc3fa('0x8')],'defaultValue':0x9c4,'validate':{'min':0x0},'comment':_0xc3fa('0x13')},'dialAMDGreeting':{'type':Sequelize[_0xc3fa('0xa')](0x9)['UNSIGNED'],'defaultValue':0x5dc,'validate':{'min':0x0},'comment':'#AMD\x20Greeting'},'dialAMDAfterGreetingSilence':{'type':Sequelize['INTEGER'](0x9)[_0xc3fa('0x8')],'defaultValue':0x320,'validate':{'min':0x0},'comment':'#AMD\x20After\x20Greeting\x20Silence'},'dialAMDTotalAnalysisTime':{'type':Sequelize['INTEGER'](0x9)['UNSIGNED'],'defaultValue':0x1388,'validate':{'min':0x0},'comment':'#AMD\x20Total\x20Analysis\x20Time'},'dialAMDMinWordLength':{'type':Sequelize[_0xc3fa('0xa')](0x9)[_0xc3fa('0x8')],'defaultValue':0x64,'validate':{'min':0x0},'comment':_0xc3fa('0x14')},'dialAMDBetweenWordsSilence':{'type':Sequelize[_0xc3fa('0xa')](0x9)['UNSIGNED'],'defaultValue':0x32,'validate':{'min':0x0},'comment':'#AMD\x20Between\x20Words\x20Silence'},'dialAMDMaximumNumberOfWords':{'type':Sequelize[_0xc3fa('0xa')](0x9)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x0},'comment':_0xc3fa('0x15')},'dialAMDSilenceThreshold':{'type':Sequelize[_0xc3fa('0xa')](0x5)[_0xc3fa('0x8')],'validate':{'min':0x0,'max':0x7fff},'defaultValue':0x100,'comment':_0xc3fa('0x16')},'dialAMDMaximumWordLength':{'type':Sequelize[_0xc3fa('0xa')](0x9)['UNSIGNED'],'defaultValue':0x1388,'validate':{'min':0x0},'comment':'#AMD\x20Maximum\x20Word\x20Length'},'dialOrderByScheduledAt':{'type':Sequelize[_0xc3fa('0x3')](_0xc3fa('0x17'),_0xc3fa('0x18')),'defaultValue':_0xc3fa('0x17')},'dialPrefix':{'type':Sequelize[_0xc3fa('0x5')],'defaultValue':null},'dialRandomLastDigitCallerIdNumber':{'type':Sequelize[_0xc3fa('0xa')](0x3)[_0xc3fa('0x8')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':'Random\x20Last\x20Digit\x20(min:1,\x20max:15)'},'dialCutDigit':{'type':Sequelize['INTEGER'](0x3)[_0xc3fa('0x8')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0xc3fa('0x19')},'dialNoSuchNumberMaxRetry':{'type':Sequelize[_0xc3fa('0xa')](0x3)[_0xc3fa('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#NoSuchNumber\x20Retry\x20(min:1,\x20max:999)'},'dialNoSuchNumberRetryFrequency':{'type':Sequelize[_0xc3fa('0xa')](0x5)[_0xc3fa('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xc3fa('0x1a')},'dialDropMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0xc3fa('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xc3fa('0x1b')},'dialDropRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0xc3fa('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'Drop\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialAbandonedMaxRetry':{'type':Sequelize[_0xc3fa('0xa')](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xc3fa('0x1c')},'dialAbandonedRetryFrequency':{'type':Sequelize[_0xc3fa('0xa')](0x5)[_0xc3fa('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xc3fa('0x1d')},'dialMachineMaxRetry':{'type':Sequelize[_0xc3fa('0xa')](0x3)[_0xc3fa('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Machine\x20Retry\x20(min:1,\x20max:999)'},'dialMachineRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0xc3fa('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xc3fa('0x1e')},'dialAgentRejectMaxRetry':{'type':Sequelize[_0xc3fa('0xa')](0x3)[_0xc3fa('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xc3fa('0x1f')},'dialAgentRejectRetryFrequency':{'type':Sequelize['INTEGER'](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xc3fa('0x20')}}; \ No newline at end of file diff --git a/server/api/campaign/campaign.controller.js b/server/api/campaign/campaign.controller.js index e2237bb..64f494d 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 _0xd9f7=['fromQuery','push','all','removeLists','getBlackLists','addBlackLists','cm_hopper_black','removeBlackLists','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','end','status','json','limit','set','Content-Range','reject','update','destroy','then','get','IvrCampaigns','UserProfileResource','error','stack','name','index','map','Campaign','rawAttributes','fieldName','type','model','query','keys','filters','attributes','length','hasOwnProperty','nolimit','offset','order','sort','where','merge','filter','options','count','includeAll','include','rows','show','params','intersection','fields','find','create','body','user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','catch','clone','omit','updatedAt','createdAt','getHoppers','findOne','CmHopper','CampaignId','findAll','getHopperHistories','CmHopperHistory','getHopperFinals','CmHopperFinal','pick','getHopperBlacks','CmHopperBlack','getLists','CmList','ids','spread','dialCheckDuplicateType','into','phone','scheduledAt','ContactId','ListId','field','CmListId','toString','NOW()','from','cm_contacts','deletedAt\x20IS\x20NULL','ListId\x20=\x20?','phone\x20IS\x20NOT\x20NULL','phone\x20NOT\x20IN\x20(?)','COALESCE(calleridnum,\x27\x27)','select','COALESCE(phone,\x27\x27)','cm_hopper','onlyIfOpen','insert'];(function(_0x103ff9,_0x576a4d){var _0x40693e=function(_0xd67bce){while(--_0xd67bce){_0x103ff9['push'](_0x103ff9['shift']());}};_0x40693e(++_0x576a4d);}(_0xd9f7,0x8d));var _0x7d9f=function(_0x59db68,_0x1ae2bd){_0x59db68=_0x59db68-0x0;var _0x493ed3=_0xd9f7[_0x59db68];return _0x493ed3;};'use strict';var emlformat=require(_0x7d9f('0x0'));var rimraf=require(_0x7d9f('0x1'));var zipdir=require(_0x7d9f('0x2'));var jsonpatch=require(_0x7d9f('0x3'));var rp=require(_0x7d9f('0x4'));var moment=require(_0x7d9f('0x5'));var BPromise=require(_0x7d9f('0x6'));var Mustache=require(_0x7d9f('0x7'));var util=require(_0x7d9f('0x8'));var path=require(_0x7d9f('0x9'));var sox=require('sox');var csv=require(_0x7d9f('0xa'));var ejs=require(_0x7d9f('0xb'));var fs=require('fs');var fs_extra=require(_0x7d9f('0xc'));var _=require(_0x7d9f('0xd'));var squel=require(_0x7d9f('0xe'));var crypto=require(_0x7d9f('0xf'));var jsforce=require('jsforce');var deskjs=require(_0x7d9f('0x10'));var toCsv=require('to-csv');var querystring=require(_0x7d9f('0x11'));var Papa=require(_0x7d9f('0x12'));var Redis=require(_0x7d9f('0x13'));var authService=require(_0x7d9f('0x14'));var qs=require(_0x7d9f('0x15'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x7d9f('0x16'));var logger=require('../../config/logger')(_0x7d9f('0x17'));var utils=require(_0x7d9f('0x18'));var config=require(_0x7d9f('0x19'));var licenseUtil=require(_0x7d9f('0x1a'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x47012f,_0x2ba92a){_0x2ba92a=_0x2ba92a||0xcc;return function(_0x2feef4){if(_0x2feef4){return _0x47012f[_0x7d9f('0x1b')](_0x2ba92a);}return _0x47012f['status'](_0x2ba92a)[_0x7d9f('0x1c')]();};}function respondWithResult(_0x5ecef8,_0x1687a7){_0x1687a7=_0x1687a7||0xc8;return function(_0x32a521){if(_0x32a521){return _0x5ecef8[_0x7d9f('0x1d')](_0x1687a7)[_0x7d9f('0x1e')](_0x32a521);}};}function respondWithFilteredResult(_0x367216,_0x1e1156){return function(_0x40d576){if(_0x40d576){var _0x20bc45=typeof _0x1e1156['offset']==='undefined'&&typeof _0x1e1156[_0x7d9f('0x1f')]==='undefined';var _0x34bdc9=_0x40d576['count'];var _0x2c3226=_0x20bc45?0x0:_0x1e1156['offset'];var _0x2aa64d=_0x20bc45?_0x40d576['count']:_0x1e1156['offset']+_0x1e1156[_0x7d9f('0x1f')];var _0x2cc7b2;if(_0x2aa64d>=_0x34bdc9){_0x2aa64d=_0x34bdc9;_0x2cc7b2=0xc8;}else{_0x2cc7b2=0xce;}_0x367216[_0x7d9f('0x1d')](_0x2cc7b2);return _0x367216[_0x7d9f('0x20')](_0x7d9f('0x21'),_0x2c3226+'-'+_0x2aa64d+'/'+_0x34bdc9)[_0x7d9f('0x1e')](_0x40d576);}return null;};}function patchUpdates(_0x111d23){return function(_0x525fb8){try{jsonpatch['apply'](_0x525fb8,_0x111d23,!![]);}catch(_0x524879){return BPromise[_0x7d9f('0x22')](_0x524879);}return _0x525fb8['save']();};}function saveUpdates(_0x685e93,_0x4bc2b2){return function(_0x3b12fd){if(_0x3b12fd){return _0x3b12fd[_0x7d9f('0x23')](_0x685e93)['then'](function(_0x315d98){return _0x315d98;});}return null;};}function removeEntity(_0x2bb864,_0x383077){return function(_0x43bb81){if(_0x43bb81){return _0x43bb81[_0x7d9f('0x24')]()[_0x7d9f('0x25')](function(){var _0x5ece8f=_0x43bb81[_0x7d9f('0x26')]({'plain':!![]});var _0x2ca3a1=_0x7d9f('0x27');return db[_0x7d9f('0x28')][_0x7d9f('0x24')]({'where':{'type':_0x2ca3a1,'resourceId':_0x5ece8f['id']}})[_0x7d9f('0x25')](function(){return _0x43bb81;});})[_0x7d9f('0x25')](function(){_0x2bb864[_0x7d9f('0x1d')](0xcc)[_0x7d9f('0x1c')]();});}};}function handleEntityNotFound(_0x3dc659,_0x240a7a){return function(_0x2808a4){if(!_0x2808a4){_0x3dc659[_0x7d9f('0x1b')](0x194);}return _0x2808a4;};}function handleError(_0x567444,_0x11b890){_0x11b890=_0x11b890||0x1f4;return function(_0x4fd799){logger[_0x7d9f('0x29')](_0x4fd799[_0x7d9f('0x2a')]);if(_0x4fd799[_0x7d9f('0x2b')]){delete _0x4fd799['name'];}_0x567444[_0x7d9f('0x1d')](_0x11b890)['send'](_0x4fd799);};}exports[_0x7d9f('0x2c')]=function(_0x49135d,_0x21d489){var _0x24cd20={},_0x379008={},_0x9072f3={'count':0x0,'rows':[]};var _0x197021=_[_0x7d9f('0x2d')](db[_0x7d9f('0x2e')][_0x7d9f('0x2f')],function(_0x48ff39){return{'name':_0x48ff39[_0x7d9f('0x30')],'type':_0x48ff39[_0x7d9f('0x31')]['key']};});_0x379008[_0x7d9f('0x32')]=_[_0x7d9f('0x2d')](_0x197021,'name');_0x379008[_0x7d9f('0x33')]=_[_0x7d9f('0x34')](_0x49135d[_0x7d9f('0x33')]);_0x379008[_0x7d9f('0x35')]=_['intersection'](_0x379008[_0x7d9f('0x32')],_0x379008[_0x7d9f('0x33')]);_0x24cd20[_0x7d9f('0x36')]=_['intersection'](_0x379008[_0x7d9f('0x32')],qs['fields'](_0x49135d[_0x7d9f('0x33')]['fields']));_0x24cd20[_0x7d9f('0x36')]=_0x24cd20[_0x7d9f('0x36')][_0x7d9f('0x37')]?_0x24cd20[_0x7d9f('0x36')]:_0x379008[_0x7d9f('0x32')];if(!_0x49135d[_0x7d9f('0x33')][_0x7d9f('0x38')](_0x7d9f('0x39'))){_0x24cd20['limit']=qs['limit'](_0x49135d[_0x7d9f('0x33')][_0x7d9f('0x1f')]);_0x24cd20[_0x7d9f('0x3a')]=qs[_0x7d9f('0x3a')](_0x49135d[_0x7d9f('0x33')]['offset']);}_0x24cd20[_0x7d9f('0x3b')]=qs[_0x7d9f('0x3c')](_0x49135d['query'][_0x7d9f('0x3c')]);_0x24cd20[_0x7d9f('0x3d')]=qs['filters'](_['pick'](_0x49135d['query'],_0x379008['filters']),_0x197021);if(_0x49135d[_0x7d9f('0x33')]['filter']){_0x24cd20[_0x7d9f('0x3d')]=_[_0x7d9f('0x3e')](_0x24cd20[_0x7d9f('0x3d')],{'$or':_[_0x7d9f('0x2d')](_0x197021,function(_0x10fc13){if(_0x10fc13[_0x7d9f('0x31')]!=='VIRTUAL'){var _0x904957={};_0x904957[_0x10fc13[_0x7d9f('0x2b')]]={'$like':'%'+_0x49135d[_0x7d9f('0x33')][_0x7d9f('0x3f')]+'%'};return _0x904957;}})});}_0x24cd20=_[_0x7d9f('0x3e')]({},_0x24cd20,_0x49135d[_0x7d9f('0x40')]);var _0x2ba7e0={'where':_0x24cd20[_0x7d9f('0x3d')]};return db[_0x7d9f('0x2e')][_0x7d9f('0x41')](_0x2ba7e0)[_0x7d9f('0x25')](function(_0x1c46be){_0x9072f3['count']=_0x1c46be;if(_0x49135d['query'][_0x7d9f('0x42')]){_0x24cd20[_0x7d9f('0x43')]=[{'all':!![]}];}return db['Campaign']['findAll'](_0x24cd20);})['then'](function(_0x644991){_0x9072f3[_0x7d9f('0x44')]=_0x644991;return _0x9072f3;})[_0x7d9f('0x25')](respondWithFilteredResult(_0x21d489,_0x24cd20))['catch'](handleError(_0x21d489,null));};exports[_0x7d9f('0x45')]=function(_0x128645,_0x2c8071){var _0x24fbf3={'raw':![],'where':{'id':_0x128645[_0x7d9f('0x46')]['id']}},_0x3b1e98={};_0x3b1e98[_0x7d9f('0x32')]=_['keys'](db[_0x7d9f('0x2e')][_0x7d9f('0x2f')]);_0x3b1e98['query']=_['keys'](_0x128645[_0x7d9f('0x33')]);_0x3b1e98[_0x7d9f('0x35')]=_[_0x7d9f('0x47')](_0x3b1e98['model'],_0x3b1e98[_0x7d9f('0x33')]);_0x24fbf3['attributes']=_[_0x7d9f('0x47')](_0x3b1e98[_0x7d9f('0x32')],qs[_0x7d9f('0x48')](_0x128645[_0x7d9f('0x33')]['fields']));_0x24fbf3[_0x7d9f('0x36')]=_0x24fbf3[_0x7d9f('0x36')]['length']?_0x24fbf3['attributes']:_0x3b1e98[_0x7d9f('0x32')];if(_0x128645['query'][_0x7d9f('0x42')]){_0x24fbf3[_0x7d9f('0x43')]=[{'all':!![]}];}_0x24fbf3=_[_0x7d9f('0x3e')]({},_0x24fbf3,_0x128645[_0x7d9f('0x40')]);return db['Campaign'][_0x7d9f('0x49')](_0x24fbf3)['then'](handleEntityNotFound(_0x2c8071,null))[_0x7d9f('0x25')](respondWithResult(_0x2c8071,null))['catch'](handleError(_0x2c8071,null));};exports[_0x7d9f('0x4a')]=function(_0x49834c,_0x4e6d25){return db[_0x7d9f('0x2e')]['create'](_0x49834c[_0x7d9f('0x4b')],{})[_0x7d9f('0x25')](function(_0x134d6){var _0x281005=_0x49834c[_0x7d9f('0x4c')]['get']({'plain':!![]});if(!_0x281005)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x281005[_0x7d9f('0x4d')]===_0x7d9f('0x4c')){var _0x349e2b=_0x134d6[_0x7d9f('0x26')]({'plain':!![]});var _0x40a35e=_0x7d9f('0x27');return db[_0x7d9f('0x4e')][_0x7d9f('0x49')]({'where':{'name':_0x40a35e,'userProfileId':_0x281005[_0x7d9f('0x4f')]},'raw':!![]})[_0x7d9f('0x25')](function(_0x1ceca6){if(_0x1ceca6&&_0x1ceca6[_0x7d9f('0x50')]===0x0){return db[_0x7d9f('0x28')][_0x7d9f('0x4a')]({'name':_0x349e2b[_0x7d9f('0x2b')],'resourceId':_0x349e2b['id'],'type':_0x1ceca6[_0x7d9f('0x2b')],'sectionId':_0x1ceca6['id']},{})[_0x7d9f('0x25')](function(){return _0x134d6;});}else{return _0x134d6;}})['catch'](function(_0x3a0cc4){logger['error'](_0x7d9f('0x51'),_0x3a0cc4);throw _0x3a0cc4;});}return _0x134d6;})['then'](respondWithResult(_0x4e6d25,0xc9))[_0x7d9f('0x52')](handleError(_0x4e6d25,null));};exports[_0x7d9f('0x53')]=function(_0x55cf6a,_0x21dc26){var _0x2384c2={'where':{'id':_0x55cf6a[_0x7d9f('0x46')]['id']}},_0x233f90={};_0x233f90['model']=_['keys'](db[_0x7d9f('0x2e')]['rawAttributes']);_0x2384c2[_0x7d9f('0x36')]=_[_0x7d9f('0x47')](_0x233f90[_0x7d9f('0x32')],qs[_0x7d9f('0x48')](_0x55cf6a['query'][_0x7d9f('0x48')]));_0x2384c2['attributes']=_0x2384c2[_0x7d9f('0x36')][_0x7d9f('0x37')]?_0x2384c2[_0x7d9f('0x36')]:_0x233f90['model'];if(_0x55cf6a[_0x7d9f('0x33')][_0x7d9f('0x42')]){_0x2384c2[_0x7d9f('0x43')]=[{'all':!![]}];}_0x2384c2=_[_0x7d9f('0x3e')]({},_0x2384c2,_0x55cf6a[_0x7d9f('0x40')]);return db['Campaign'][_0x7d9f('0x49')](_0x2384c2)[_0x7d9f('0x25')](handleEntityNotFound(_0x21dc26,null))[_0x7d9f('0x25')](function(_0x5eb2bf){if(_0x5eb2bf){var _0x2f84d1=_0x5eb2bf[_0x7d9f('0x26')]({'plain':!![]});_0x2f84d1=qs[_0x7d9f('0x54')](_0x2f84d1,['id','createdAt',_0x7d9f('0x55')]);_0x55cf6a[_0x7d9f('0x4b')]=_[_0x7d9f('0x54')](_0x55cf6a[_0x7d9f('0x4b')],['id',_0x7d9f('0x56'),_0x7d9f('0x55')]);return db[_0x7d9f('0x2e')][_0x7d9f('0x4a')](_['merge'](_0x2f84d1,_0x55cf6a['body']),{'include':_0x55cf6a[_0x7d9f('0x33')][_0x7d9f('0x42')]?[{'all':!![]}]:undefined})[_0x7d9f('0x25')](function(_0x1c9224){var _0x545cbf=_0x55cf6a[_0x7d9f('0x4c')][_0x7d9f('0x26')]({'plain':!![]});if(!_0x545cbf)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x545cbf[_0x7d9f('0x4d')]===_0x7d9f('0x4c')){var _0xe24194=_0x1c9224[_0x7d9f('0x26')]({'plain':!![]});var _0x44709f=_0x7d9f('0x27');return db[_0x7d9f('0x4e')][_0x7d9f('0x49')]({'where':{'name':_0x44709f,'userProfileId':_0x545cbf[_0x7d9f('0x4f')]},'raw':!![]})[_0x7d9f('0x25')](function(_0x40641a){if(_0x40641a&&_0x40641a['autoAssociation']===0x0){return db[_0x7d9f('0x28')][_0x7d9f('0x4a')]({'name':_0xe24194[_0x7d9f('0x2b')],'resourceId':_0xe24194['id'],'type':_0x40641a['name'],'sectionId':_0x40641a['id']},{})[_0x7d9f('0x25')](function(){return _0x1c9224;});}else{return _0x1c9224;}})[_0x7d9f('0x52')](function(_0x22e770){logger[_0x7d9f('0x29')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x22e770);throw _0x22e770;});}return _0x1c9224;});}})[_0x7d9f('0x25')](respondWithResult(_0x21dc26,0xc9))[_0x7d9f('0x52')](handleError(_0x21dc26,null));};exports[_0x7d9f('0x23')]=function(_0x4a8a54,_0x7843a6){if(_0x4a8a54[_0x7d9f('0x4b')]['id']){delete _0x4a8a54[_0x7d9f('0x4b')]['id'];}return db[_0x7d9f('0x2e')]['find']({'where':{'id':_0x4a8a54[_0x7d9f('0x46')]['id']}})['then'](handleEntityNotFound(_0x7843a6,null))[_0x7d9f('0x25')](saveUpdates(_0x4a8a54[_0x7d9f('0x4b')],null))[_0x7d9f('0x25')](respondWithResult(_0x7843a6,null))[_0x7d9f('0x52')](handleError(_0x7843a6,null));};exports[_0x7d9f('0x24')]=function(_0x3a47a7,_0x1a504d){return db[_0x7d9f('0x2e')][_0x7d9f('0x49')]({'where':{'id':_0x3a47a7[_0x7d9f('0x46')]['id']}})[_0x7d9f('0x25')](handleEntityNotFound(_0x1a504d,null))[_0x7d9f('0x25')](removeEntity(_0x1a504d,null))[_0x7d9f('0x52')](handleError(_0x1a504d,null));};exports[_0x7d9f('0x57')]=function(_0x1d3d3b,_0x1b946b,_0x55ada5){var _0x3c4f4b={'raw':!![],'where':{}};var _0xe0ba4={};var _0x30b007={'count':0x0,'rows':[]};return db[_0x7d9f('0x2e')][_0x7d9f('0x58')]({'where':{'id':_0x1d3d3b['params']['id']}})[_0x7d9f('0x25')](handleEntityNotFound(_0x1b946b,null))[_0x7d9f('0x25')](function(_0x426559){if(_0x426559){_0xe0ba4['model']=_[_0x7d9f('0x34')](db[_0x7d9f('0x59')][_0x7d9f('0x2f')]);_0xe0ba4[_0x7d9f('0x33')]=_[_0x7d9f('0x34')](_0x1d3d3b[_0x7d9f('0x33')]);_0xe0ba4[_0x7d9f('0x35')]=_[_0x7d9f('0x47')](_0xe0ba4[_0x7d9f('0x32')],_0xe0ba4[_0x7d9f('0x33')]);_0x3c4f4b[_0x7d9f('0x36')]=_[_0x7d9f('0x47')](_0xe0ba4[_0x7d9f('0x32')],qs[_0x7d9f('0x48')](_0x1d3d3b[_0x7d9f('0x33')][_0x7d9f('0x48')]));_0x3c4f4b[_0x7d9f('0x36')]=_0x3c4f4b['attributes'][_0x7d9f('0x37')]?_0x3c4f4b[_0x7d9f('0x36')]:_0xe0ba4['model'];if(!_0x1d3d3b['query'][_0x7d9f('0x38')](_0x7d9f('0x39'))){_0x3c4f4b[_0x7d9f('0x1f')]=qs[_0x7d9f('0x1f')](_0x1d3d3b[_0x7d9f('0x33')]['limit']);_0x3c4f4b['offset']=qs[_0x7d9f('0x3a')](_0x1d3d3b[_0x7d9f('0x33')][_0x7d9f('0x3a')]);}_0x3c4f4b['order']=qs[_0x7d9f('0x3c')](_0x1d3d3b['query'][_0x7d9f('0x3c')]);_0x3c4f4b[_0x7d9f('0x3d')]=qs['filters'](_['pick'](_0x1d3d3b[_0x7d9f('0x33')],_0xe0ba4[_0x7d9f('0x35')]));_0x3c4f4b['where'][_0x7d9f('0x5a')]=_0x426559['id'];if(_0x1d3d3b[_0x7d9f('0x33')][_0x7d9f('0x3f')]){_0x3c4f4b[_0x7d9f('0x3d')]=_[_0x7d9f('0x3e')](_0x3c4f4b[_0x7d9f('0x3d')],{'$or':_['map'](_0x3c4f4b[_0x7d9f('0x36')],function(_0xd62cbf){var _0x57a3e3={};_0x57a3e3[_0xd62cbf]={'$like':'%'+_0x1d3d3b[_0x7d9f('0x33')]['filter']+'%'};return _0x57a3e3;})});}_0x3c4f4b=_[_0x7d9f('0x3e')]({},_0x3c4f4b,_0x1d3d3b[_0x7d9f('0x40')]);return db[_0x7d9f('0x59')][_0x7d9f('0x41')]({'where':_0x3c4f4b[_0x7d9f('0x3d')]})[_0x7d9f('0x25')](function(_0x2484b4){_0x30b007[_0x7d9f('0x41')]=_0x2484b4;if(_0x1d3d3b['query'][_0x7d9f('0x42')]){_0x3c4f4b[_0x7d9f('0x43')]=[{'all':!![]}];}return db[_0x7d9f('0x59')][_0x7d9f('0x5b')](_0x3c4f4b);})[_0x7d9f('0x25')](function(_0x433ffc){_0x30b007[_0x7d9f('0x44')]=_0x433ffc;return _0x30b007;});}})[_0x7d9f('0x25')](respondWithFilteredResult(_0x1b946b,_0x3c4f4b))[_0x7d9f('0x52')](handleError(_0x1b946b,null));};exports[_0x7d9f('0x5c')]=function(_0x2a922b,_0x52c4ee,_0x4a48df){var _0x392a04={'raw':!![],'where':{}};var _0x19d868={};var _0x2e1ddb={'count':0x0,'rows':[]};return db[_0x7d9f('0x2e')][_0x7d9f('0x58')]({'where':{'id':_0x2a922b[_0x7d9f('0x46')]['id']}})[_0x7d9f('0x25')](handleEntityNotFound(_0x52c4ee,null))['then'](function(_0x4b362a){if(_0x4b362a){_0x19d868[_0x7d9f('0x32')]=_[_0x7d9f('0x34')](db[_0x7d9f('0x5d')][_0x7d9f('0x2f')]);_0x19d868[_0x7d9f('0x33')]=_[_0x7d9f('0x34')](_0x2a922b[_0x7d9f('0x33')]);_0x19d868[_0x7d9f('0x35')]=_['intersection'](_0x19d868[_0x7d9f('0x32')],_0x19d868[_0x7d9f('0x33')]);_0x392a04[_0x7d9f('0x36')]=_[_0x7d9f('0x47')](_0x19d868[_0x7d9f('0x32')],qs['fields'](_0x2a922b[_0x7d9f('0x33')][_0x7d9f('0x48')]));_0x392a04['attributes']=_0x392a04[_0x7d9f('0x36')][_0x7d9f('0x37')]?_0x392a04[_0x7d9f('0x36')]:_0x19d868[_0x7d9f('0x32')];if(!_0x2a922b[_0x7d9f('0x33')][_0x7d9f('0x38')](_0x7d9f('0x39'))){_0x392a04[_0x7d9f('0x1f')]=qs['limit'](_0x2a922b[_0x7d9f('0x33')][_0x7d9f('0x1f')]);_0x392a04[_0x7d9f('0x3a')]=qs[_0x7d9f('0x3a')](_0x2a922b[_0x7d9f('0x33')][_0x7d9f('0x3a')]);}_0x392a04[_0x7d9f('0x3b')]=qs[_0x7d9f('0x3c')](_0x2a922b[_0x7d9f('0x33')]['sort']);_0x392a04[_0x7d9f('0x3d')]=qs['filters'](_['pick'](_0x2a922b[_0x7d9f('0x33')],_0x19d868[_0x7d9f('0x35')]));_0x392a04[_0x7d9f('0x3d')]['CampaignId']=_0x4b362a['id'];if(_0x2a922b[_0x7d9f('0x33')][_0x7d9f('0x3f')]){_0x392a04[_0x7d9f('0x3d')]=_[_0x7d9f('0x3e')](_0x392a04[_0x7d9f('0x3d')],{'$or':_[_0x7d9f('0x2d')](_0x392a04[_0x7d9f('0x36')],function(_0x2ab214){var _0x4c112c={};_0x4c112c[_0x2ab214]={'$like':'%'+_0x2a922b[_0x7d9f('0x33')]['filter']+'%'};return _0x4c112c;})});}_0x392a04=_['merge']({},_0x392a04,_0x2a922b['options']);return db[_0x7d9f('0x5d')][_0x7d9f('0x41')]({'where':_0x392a04[_0x7d9f('0x3d')]})[_0x7d9f('0x25')](function(_0xefb260){_0x2e1ddb[_0x7d9f('0x41')]=_0xefb260;if(_0x2a922b[_0x7d9f('0x33')][_0x7d9f('0x42')]){_0x392a04['include']=[{'all':!![]}];}return db[_0x7d9f('0x5d')]['findAll'](_0x392a04);})[_0x7d9f('0x25')](function(_0x524de3){_0x2e1ddb[_0x7d9f('0x44')]=_0x524de3;return _0x2e1ddb;});}})[_0x7d9f('0x25')](respondWithFilteredResult(_0x52c4ee,_0x392a04))['catch'](handleError(_0x52c4ee,null));};exports[_0x7d9f('0x5e')]=function(_0x528b8c,_0x3566ed,_0x3695c0){var _0x258008={'raw':!![],'where':{}};var _0x117ecf={};var _0x44cf38={'count':0x0,'rows':[]};return db[_0x7d9f('0x2e')][_0x7d9f('0x58')]({'where':{'id':_0x528b8c[_0x7d9f('0x46')]['id']}})[_0x7d9f('0x25')](handleEntityNotFound(_0x3566ed,null))['then'](function(_0x3890e7){if(_0x3890e7){_0x117ecf[_0x7d9f('0x32')]=_[_0x7d9f('0x34')](db[_0x7d9f('0x5f')][_0x7d9f('0x2f')]);_0x117ecf[_0x7d9f('0x33')]=_[_0x7d9f('0x34')](_0x528b8c['query']);_0x117ecf[_0x7d9f('0x35')]=_[_0x7d9f('0x47')](_0x117ecf[_0x7d9f('0x32')],_0x117ecf['query']);_0x258008['attributes']=_[_0x7d9f('0x47')](_0x117ecf[_0x7d9f('0x32')],qs[_0x7d9f('0x48')](_0x528b8c['query'][_0x7d9f('0x48')]));_0x258008[_0x7d9f('0x36')]=_0x258008['attributes'][_0x7d9f('0x37')]?_0x258008[_0x7d9f('0x36')]:_0x117ecf['model'];if(!_0x528b8c[_0x7d9f('0x33')][_0x7d9f('0x38')]('nolimit')){_0x258008['limit']=qs[_0x7d9f('0x1f')](_0x528b8c[_0x7d9f('0x33')]['limit']);_0x258008[_0x7d9f('0x3a')]=qs[_0x7d9f('0x3a')](_0x528b8c['query'][_0x7d9f('0x3a')]);}_0x258008[_0x7d9f('0x3b')]=qs[_0x7d9f('0x3c')](_0x528b8c['query']['sort']);_0x258008[_0x7d9f('0x3d')]=qs[_0x7d9f('0x35')](_[_0x7d9f('0x60')](_0x528b8c[_0x7d9f('0x33')],_0x117ecf[_0x7d9f('0x35')]));_0x258008[_0x7d9f('0x3d')][_0x7d9f('0x5a')]=_0x3890e7['id'];if(_0x528b8c[_0x7d9f('0x33')][_0x7d9f('0x3f')]){_0x258008[_0x7d9f('0x3d')]=_[_0x7d9f('0x3e')](_0x258008[_0x7d9f('0x3d')],{'$or':_['map'](_0x258008[_0x7d9f('0x36')],function(_0x189eac){var _0x1abb74={};_0x1abb74[_0x189eac]={'$like':'%'+_0x528b8c[_0x7d9f('0x33')][_0x7d9f('0x3f')]+'%'};return _0x1abb74;})});}_0x258008=_[_0x7d9f('0x3e')]({},_0x258008,_0x528b8c[_0x7d9f('0x40')]);return db[_0x7d9f('0x5f')][_0x7d9f('0x41')]({'where':_0x258008[_0x7d9f('0x3d')]})[_0x7d9f('0x25')](function(_0x29bb4c){_0x44cf38[_0x7d9f('0x41')]=_0x29bb4c;if(_0x528b8c['query'][_0x7d9f('0x42')]){_0x258008['include']=[{'all':!![]}];}return db[_0x7d9f('0x5f')][_0x7d9f('0x5b')](_0x258008);})['then'](function(_0x231b64){_0x44cf38[_0x7d9f('0x44')]=_0x231b64;return _0x44cf38;});}})[_0x7d9f('0x25')](respondWithFilteredResult(_0x3566ed,_0x258008))['catch'](handleError(_0x3566ed,null));};exports[_0x7d9f('0x61')]=function(_0x40cb7f,_0x1fba01,_0xd5f572){var _0x33a30e={'raw':!![],'where':{}};var _0x5d3b96={};var _0x3e12d3={'count':0x0,'rows':[]};return db[_0x7d9f('0x2e')][_0x7d9f('0x58')]({'where':{'id':_0x40cb7f[_0x7d9f('0x46')]['id']}})[_0x7d9f('0x25')](handleEntityNotFound(_0x1fba01,null))[_0x7d9f('0x25')](function(_0x9d08b8){if(_0x9d08b8){_0x5d3b96[_0x7d9f('0x32')]=_[_0x7d9f('0x34')](db[_0x7d9f('0x62')][_0x7d9f('0x2f')]);_0x5d3b96[_0x7d9f('0x33')]=_[_0x7d9f('0x34')](_0x40cb7f[_0x7d9f('0x33')]);_0x5d3b96['filters']=_[_0x7d9f('0x47')](_0x5d3b96[_0x7d9f('0x32')],_0x5d3b96[_0x7d9f('0x33')]);_0x33a30e[_0x7d9f('0x36')]=_['intersection'](_0x5d3b96[_0x7d9f('0x32')],qs[_0x7d9f('0x48')](_0x40cb7f[_0x7d9f('0x33')][_0x7d9f('0x48')]));_0x33a30e['attributes']=_0x33a30e[_0x7d9f('0x36')]['length']?_0x33a30e[_0x7d9f('0x36')]:_0x5d3b96[_0x7d9f('0x32')];if(!_0x40cb7f[_0x7d9f('0x33')][_0x7d9f('0x38')](_0x7d9f('0x39'))){_0x33a30e[_0x7d9f('0x1f')]=qs[_0x7d9f('0x1f')](_0x40cb7f[_0x7d9f('0x33')]['limit']);_0x33a30e[_0x7d9f('0x3a')]=qs[_0x7d9f('0x3a')](_0x40cb7f[_0x7d9f('0x33')][_0x7d9f('0x3a')]);}_0x33a30e[_0x7d9f('0x3b')]=qs[_0x7d9f('0x3c')](_0x40cb7f['query']['sort']);_0x33a30e[_0x7d9f('0x3d')]=qs[_0x7d9f('0x35')](_['pick'](_0x40cb7f['query'],_0x5d3b96[_0x7d9f('0x35')]));_0x33a30e['where']['CampaignId']=_0x9d08b8['id'];if(_0x40cb7f[_0x7d9f('0x33')]['filter']){_0x33a30e['where']=_[_0x7d9f('0x3e')](_0x33a30e['where'],{'$or':_[_0x7d9f('0x2d')](_0x33a30e[_0x7d9f('0x36')],function(_0x4fe060){var _0x136765={};_0x136765[_0x4fe060]={'$like':'%'+_0x40cb7f[_0x7d9f('0x33')]['filter']+'%'};return _0x136765;})});}_0x33a30e=_[_0x7d9f('0x3e')]({},_0x33a30e,_0x40cb7f[_0x7d9f('0x40')]);return db[_0x7d9f('0x62')][_0x7d9f('0x41')]({'where':_0x33a30e['where']})[_0x7d9f('0x25')](function(_0x2433ba){_0x3e12d3[_0x7d9f('0x41')]=_0x2433ba;if(_0x40cb7f['query'][_0x7d9f('0x42')]){_0x33a30e['include']=[{'all':!![]}];}return db[_0x7d9f('0x62')][_0x7d9f('0x5b')](_0x33a30e);})[_0x7d9f('0x25')](function(_0x43f71d){_0x3e12d3[_0x7d9f('0x44')]=_0x43f71d;return _0x3e12d3;});}})['then'](respondWithFilteredResult(_0x1fba01,_0x33a30e))[_0x7d9f('0x52')](handleError(_0x1fba01,null));};exports[_0x7d9f('0x63')]=function(_0x44dfe3,_0xca37fd,_0x1c6a1c){var _0x2bbdc5={};var _0x3e7edd={};var _0xc034f1;var _0x113c2d;return db[_0x7d9f('0x2e')][_0x7d9f('0x58')]({'where':{'id':_0x44dfe3[_0x7d9f('0x46')]['id']}})['then'](handleEntityNotFound(_0xca37fd,null))[_0x7d9f('0x25')](function(_0x489c3b){if(_0x489c3b){_0xc034f1=_0x489c3b;_0x3e7edd['model']=_[_0x7d9f('0x34')](db[_0x7d9f('0x64')][_0x7d9f('0x2f')]);_0x3e7edd['query']=_[_0x7d9f('0x34')](_0x44dfe3[_0x7d9f('0x33')]);_0x3e7edd[_0x7d9f('0x35')]=_[_0x7d9f('0x47')](_0x3e7edd[_0x7d9f('0x32')],_0x3e7edd[_0x7d9f('0x33')]);_0x2bbdc5['attributes']=_['intersection'](_0x3e7edd[_0x7d9f('0x32')],qs[_0x7d9f('0x48')](_0x44dfe3[_0x7d9f('0x33')]['fields']));_0x2bbdc5[_0x7d9f('0x36')]=_0x2bbdc5['attributes']['length']?_0x2bbdc5[_0x7d9f('0x36')]:_0x3e7edd['model'];_0x2bbdc5[_0x7d9f('0x3b')]=qs[_0x7d9f('0x3c')](_0x44dfe3[_0x7d9f('0x33')][_0x7d9f('0x3c')]);_0x2bbdc5[_0x7d9f('0x3d')]=qs[_0x7d9f('0x35')](_[_0x7d9f('0x60')](_0x44dfe3[_0x7d9f('0x33')],_0x3e7edd[_0x7d9f('0x35')]));if(_0x44dfe3[_0x7d9f('0x33')]['filter']){_0x2bbdc5[_0x7d9f('0x3d')]=_['merge'](_0x2bbdc5['where'],{'$or':_[_0x7d9f('0x2d')](_0x2bbdc5['attributes'],function(_0x460607){var _0x2bb5b3={};_0x2bb5b3[_0x460607]={'$like':'%'+_0x44dfe3[_0x7d9f('0x33')]['filter']+'%'};return _0x2bb5b3;})});}_0x2bbdc5=_[_0x7d9f('0x3e')]({},_0x2bbdc5,_0x44dfe3[_0x7d9f('0x40')]);return _0xc034f1[_0x7d9f('0x63')](_0x2bbdc5);}})['then'](function(_0x3fd394){if(_0x3fd394){_0x113c2d=_0x3fd394[_0x7d9f('0x37')];if(!_0x44dfe3[_0x7d9f('0x33')][_0x7d9f('0x38')](_0x7d9f('0x39'))){_0x2bbdc5[_0x7d9f('0x1f')]=qs[_0x7d9f('0x1f')](_0x44dfe3[_0x7d9f('0x33')][_0x7d9f('0x1f')]);_0x2bbdc5[_0x7d9f('0x3a')]=qs[_0x7d9f('0x3a')](_0x44dfe3[_0x7d9f('0x33')][_0x7d9f('0x3a')]);}return _0xc034f1['getLists'](_0x2bbdc5);}})[_0x7d9f('0x25')](function(_0x130977){if(_0x130977){return _0x130977?{'count':_0x113c2d,'rows':_0x130977}:null;}})[_0x7d9f('0x25')](respondWithResult(_0xca37fd,null))['catch'](handleError(_0xca37fd,null));};exports['addLists']=function(_0x5c32a4,_0x3c4c8b,_0x120b75){var _0x311f6f,_0x311123;return db[_0x7d9f('0x2e')][_0x7d9f('0x49')]({'where':{'id':_0x5c32a4[_0x7d9f('0x46')]['id']}})[_0x7d9f('0x25')](handleEntityNotFound(_0x3c4c8b,null))[_0x7d9f('0x25')](function(_0x473797){if(_0x473797){_0x311123=_0x473797;return _0x473797['addLists'](_0x5c32a4[_0x7d9f('0x4b')][_0x7d9f('0x65')],_[_0x7d9f('0x54')](_0x5c32a4[_0x7d9f('0x4b')],[_0x7d9f('0x65'),'id'])||{});}return null;})[_0x7d9f('0x66')](function(_0x56f7c6){var _0x1cfc74;_0x311f6f=_0x56f7c6||[];var _0x443087=[];if(_0x56f7c6){for(var _0x4d0896=0x0;_0x4d0896<_0x56f7c6[_0x7d9f('0x37')];_0x4d0896+=0x1){var _0x1087f1=_0x56f7c6[_0x4d0896][_0x7d9f('0x26')]({'plain':!![]});_0x311123[_0x7d9f('0x67')]=_0x5c32a4[_0x7d9f('0x4b')][_0x7d9f('0x67')]?_0x5c32a4[_0x7d9f('0x4b')][_0x7d9f('0x67')]:_0x311123[_0x7d9f('0x67')];switch(_0x311123[_0x7d9f('0x67')]){case'always':_0x1cfc74=squel['insert']()[_0x7d9f('0x68')]('cm_hopper')['fromQuery']([_0x7d9f('0x69'),_0x7d9f('0x6a'),_0x7d9f('0x6b'),_0x7d9f('0x6c'),_0x7d9f('0x5a'),_0x7d9f('0x56'),'updatedAt'],squel['select']()[_0x7d9f('0x6d')](_0x7d9f('0x69'),_0x7d9f('0x69'))[_0x7d9f('0x6d')]('NOW()','scheduledAt')['field']('id',_0x7d9f('0x6b'))[_0x7d9f('0x6d')](_0x1087f1[_0x7d9f('0x6e')][_0x7d9f('0x6f')](),_0x7d9f('0x6c'))[_0x7d9f('0x6d')](_0x5c32a4['params']['id']['toString'](),_0x7d9f('0x5a'))['field'](_0x7d9f('0x70'),_0x7d9f('0x56'))[_0x7d9f('0x6d')](_0x7d9f('0x70'),_0x7d9f('0x55'))[_0x7d9f('0x71')](_0x7d9f('0x72'))[_0x7d9f('0x3d')](_0x7d9f('0x73'))[_0x7d9f('0x3d')](_0x7d9f('0x74'),_0x1087f1[_0x7d9f('0x6e')][_0x7d9f('0x6f')]())[_0x7d9f('0x3d')](_0x7d9f('0x75'))['where'](_0x7d9f('0x76'),squel['select']()[_0x7d9f('0x6d')](_0x7d9f('0x77'))[_0x7d9f('0x71')]('cm_hopper_final')['where']('CampaignId\x20=\x20?',_0x5c32a4[_0x7d9f('0x46')]['id'][_0x7d9f('0x6f')]()))[_0x7d9f('0x3d')](_0x7d9f('0x76'),squel[_0x7d9f('0x78')]()[_0x7d9f('0x6d')](_0x7d9f('0x79'))[_0x7d9f('0x71')](_0x7d9f('0x7a'))['where']('CampaignId\x20=\x20?',_0x5c32a4['params']['id'][_0x7d9f('0x6f')]())))['toString']();break;case _0x7d9f('0x7b'):_0x1cfc74=squel[_0x7d9f('0x7c')]()[_0x7d9f('0x68')](_0x7d9f('0x7a'))[_0x7d9f('0x7d')]([_0x7d9f('0x69'),_0x7d9f('0x6a'),_0x7d9f('0x6b'),_0x7d9f('0x6c'),_0x7d9f('0x5a'),'createdAt',_0x7d9f('0x55')],squel[_0x7d9f('0x78')]()[_0x7d9f('0x6d')](_0x7d9f('0x69'),_0x7d9f('0x69'))[_0x7d9f('0x6d')](_0x7d9f('0x70'),_0x7d9f('0x6a'))['field']('id','ContactId')[_0x7d9f('0x6d')](_0x1087f1['CmListId'][_0x7d9f('0x6f')](),_0x7d9f('0x6c'))['field'](_0x5c32a4['params']['id'][_0x7d9f('0x6f')](),_0x7d9f('0x5a'))['field'](_0x7d9f('0x70'),'createdAt')['field']('NOW()','updatedAt')[_0x7d9f('0x71')]('cm_contacts')[_0x7d9f('0x3d')](_0x7d9f('0x73'))[_0x7d9f('0x3d')](_0x7d9f('0x74'),_0x1087f1[_0x7d9f('0x6e')][_0x7d9f('0x6f')]())[_0x7d9f('0x3d')](_0x7d9f('0x75'))[_0x7d9f('0x3d')]('phone\x20NOT\x20IN\x20(?)',squel[_0x7d9f('0x78')]()[_0x7d9f('0x6d')]('COALESCE(phone,\x27\x27)')[_0x7d9f('0x71')](_0x7d9f('0x7a'))[_0x7d9f('0x3d')]('CampaignId\x20=\x20?',_0x5c32a4[_0x7d9f('0x46')]['id']['toString']())))[_0x7d9f('0x6f')]();break;default:_0x1cfc74=squel[_0x7d9f('0x7c')]()[_0x7d9f('0x68')](_0x7d9f('0x7a'))[_0x7d9f('0x7d')]([_0x7d9f('0x69'),'scheduledAt',_0x7d9f('0x6b'),_0x7d9f('0x6c'),_0x7d9f('0x5a'),_0x7d9f('0x56'),_0x7d9f('0x55')],squel[_0x7d9f('0x78')]()['field']('phone',_0x7d9f('0x69'))[_0x7d9f('0x6d')](_0x7d9f('0x70'),_0x7d9f('0x6a'))['field']('id',_0x7d9f('0x6b'))[_0x7d9f('0x6d')](_0x1087f1[_0x7d9f('0x6e')][_0x7d9f('0x6f')](),'ListId')[_0x7d9f('0x6d')](_0x5c32a4[_0x7d9f('0x46')]['id'][_0x7d9f('0x6f')](),_0x7d9f('0x5a'))[_0x7d9f('0x6d')](_0x7d9f('0x70'),'createdAt')[_0x7d9f('0x6d')](_0x7d9f('0x70'),_0x7d9f('0x55'))[_0x7d9f('0x71')](_0x7d9f('0x72'))[_0x7d9f('0x3d')]('deletedAt\x20IS\x20NULL')[_0x7d9f('0x3d')](_0x7d9f('0x74'),_0x1087f1[_0x7d9f('0x6e')][_0x7d9f('0x6f')]())[_0x7d9f('0x3d')](_0x7d9f('0x75')))['toString']();}_0x443087[_0x7d9f('0x7e')](db['sequelize'][_0x7d9f('0x33')](_0x1cfc74));}return BPromise[_0x7d9f('0x7f')](_0x443087);}})[_0x7d9f('0x25')](function(){return _0x311f6f;})[_0x7d9f('0x25')](respondWithResult(_0x3c4c8b,null))[_0x7d9f('0x52')](handleError(_0x3c4c8b,null));};exports[_0x7d9f('0x80')]=function(_0x46823d,_0x35f915,_0x15a200){return db['Campaign'][_0x7d9f('0x49')]({'where':{'id':_0x46823d[_0x7d9f('0x46')]['id']}})[_0x7d9f('0x25')](handleEntityNotFound(_0x35f915,null))[_0x7d9f('0x25')](function(_0x3869cb){if(_0x3869cb){return _0x3869cb['removeLists'](_0x46823d[_0x7d9f('0x33')]['ids']);}})[_0x7d9f('0x25')](function(_0x5f18e9){if(_0x5f18e9){return db[_0x7d9f('0x59')][_0x7d9f('0x24')]({'where':{'ListId':_0x46823d['query'][_0x7d9f('0x65')],'CampaignId':_0x46823d[_0x7d9f('0x46')]['id']}})[_0x7d9f('0x25')](function(){return _0x5f18e9;});}})[_0x7d9f('0x25')](respondWithStatusCode(_0x35f915,null))[_0x7d9f('0x52')](handleError(_0x35f915,null));};exports[_0x7d9f('0x81')]=function(_0xa236d7,_0xf65f3d,_0xca1316){var _0x21a914={};var _0x1bc698={};var _0x3daf25;var _0x14ac16;return db[_0x7d9f('0x2e')]['findOne']({'where':{'id':_0xa236d7[_0x7d9f('0x46')]['id']}})[_0x7d9f('0x25')](handleEntityNotFound(_0xf65f3d,null))['then'](function(_0x3a78a7){if(_0x3a78a7){_0x3daf25=_0x3a78a7;_0x1bc698['model']=_[_0x7d9f('0x34')](db['CmList'][_0x7d9f('0x2f')]);_0x1bc698[_0x7d9f('0x33')]=_['keys'](_0xa236d7['query']);_0x1bc698[_0x7d9f('0x35')]=_[_0x7d9f('0x47')](_0x1bc698[_0x7d9f('0x32')],_0x1bc698[_0x7d9f('0x33')]);_0x21a914['attributes']=_['intersection'](_0x1bc698[_0x7d9f('0x32')],qs[_0x7d9f('0x48')](_0xa236d7[_0x7d9f('0x33')][_0x7d9f('0x48')]));_0x21a914['attributes']=_0x21a914['attributes']['length']?_0x21a914[_0x7d9f('0x36')]:_0x1bc698[_0x7d9f('0x32')];_0x21a914[_0x7d9f('0x3b')]=qs[_0x7d9f('0x3c')](_0xa236d7[_0x7d9f('0x33')]['sort']);_0x21a914[_0x7d9f('0x3d')]=qs['filters'](_[_0x7d9f('0x60')](_0xa236d7[_0x7d9f('0x33')],_0x1bc698[_0x7d9f('0x35')]));if(_0xa236d7[_0x7d9f('0x33')][_0x7d9f('0x3f')]){_0x21a914[_0x7d9f('0x3d')]=_[_0x7d9f('0x3e')](_0x21a914['where'],{'$or':_[_0x7d9f('0x2d')](_0x21a914[_0x7d9f('0x36')],function(_0x38fde0){var _0x3d0f7a={};_0x3d0f7a[_0x38fde0]={'$like':'%'+_0xa236d7[_0x7d9f('0x33')]['filter']+'%'};return _0x3d0f7a;})});}_0x21a914=_[_0x7d9f('0x3e')]({},_0x21a914,_0xa236d7['options']);return _0x3daf25['getBlackLists'](_0x21a914);}})['then'](function(_0x20b05d){if(_0x20b05d){_0x14ac16=_0x20b05d[_0x7d9f('0x37')];if(!_0xa236d7[_0x7d9f('0x33')]['hasOwnProperty']('nolimit')){_0x21a914[_0x7d9f('0x1f')]=qs[_0x7d9f('0x1f')](_0xa236d7[_0x7d9f('0x33')][_0x7d9f('0x1f')]);_0x21a914[_0x7d9f('0x3a')]=qs[_0x7d9f('0x3a')](_0xa236d7[_0x7d9f('0x33')][_0x7d9f('0x3a')]);}return _0x3daf25['getBlackLists'](_0x21a914);}})['then'](function(_0x277dc9){if(_0x277dc9){return _0x277dc9?{'count':_0x14ac16,'rows':_0x277dc9}:null;}})[_0x7d9f('0x25')](respondWithResult(_0xf65f3d,null))[_0x7d9f('0x52')](handleError(_0xf65f3d,null));};exports['addBlackLists']=function(_0x1496d6,_0x548cc4,_0x1d8a8a){var _0x5a5294,_0x3d5154;return db['Campaign'][_0x7d9f('0x49')]({'where':{'id':_0x1496d6[_0x7d9f('0x46')]['id']}})['then'](handleEntityNotFound(_0x548cc4,null))[_0x7d9f('0x25')](function(_0x114f9e){if(_0x114f9e){_0x3d5154=_0x114f9e;return _0x114f9e[_0x7d9f('0x82')](_0x1496d6[_0x7d9f('0x4b')][_0x7d9f('0x65')],_[_0x7d9f('0x54')](_0x1496d6[_0x7d9f('0x4b')],[_0x7d9f('0x65'),'id'])||{});}return null;})[_0x7d9f('0x66')](function(_0xaea1be){var _0x149739;_0x5a5294=_0xaea1be||[];var _0x538bdb=[];if(_0xaea1be){for(var _0x2e67cf=0x0;_0x2e67cf<_0xaea1be[_0x7d9f('0x37')];_0x2e67cf+=0x1){var _0x95a75f=_0xaea1be[_0x2e67cf]['get']({'plain':!![]});_0x149739=squel[_0x7d9f('0x7c')]()[_0x7d9f('0x68')](_0x7d9f('0x83'))[_0x7d9f('0x7d')]([_0x7d9f('0x69'),_0x7d9f('0x6b'),_0x7d9f('0x6c'),_0x7d9f('0x5a'),'createdAt',_0x7d9f('0x55')],squel[_0x7d9f('0x78')]()['field']('phone','phone')[_0x7d9f('0x6d')]('id','ContactId')[_0x7d9f('0x6d')](_0x95a75f['CmListId'][_0x7d9f('0x6f')](),'ListId')[_0x7d9f('0x6d')](_0x1496d6['params']['id'][_0x7d9f('0x6f')](),_0x7d9f('0x5a'))[_0x7d9f('0x6d')](_0x7d9f('0x70'),_0x7d9f('0x56'))[_0x7d9f('0x6d')](_0x7d9f('0x70'),_0x7d9f('0x55'))[_0x7d9f('0x71')](_0x7d9f('0x72'))['where'](_0x7d9f('0x73'))[_0x7d9f('0x3d')](_0x7d9f('0x74'),_0x95a75f[_0x7d9f('0x6e')][_0x7d9f('0x6f')]())[_0x7d9f('0x3d')](_0x7d9f('0x75')))['toString']();_0x538bdb[_0x7d9f('0x7e')](db['sequelize'][_0x7d9f('0x33')](_0x149739));}return BPromise[_0x7d9f('0x7f')](_0x538bdb);}})[_0x7d9f('0x25')](function(){return _0x5a5294;})[_0x7d9f('0x25')](respondWithResult(_0x548cc4,null))[_0x7d9f('0x52')](handleError(_0x548cc4,null));};exports['removeBlackLists']=function(_0x2f6b4e,_0x3d6ceb,_0x1e682c){return db[_0x7d9f('0x2e')][_0x7d9f('0x49')]({'where':{'id':_0x2f6b4e['params']['id']}})['then'](handleEntityNotFound(_0x3d6ceb,null))[_0x7d9f('0x25')](function(_0x210daf){if(_0x210daf){return _0x210daf[_0x7d9f('0x84')](_0x2f6b4e[_0x7d9f('0x33')]['ids']);}})[_0x7d9f('0x25')](function(_0x549bcb){if(_0x549bcb){return db[_0x7d9f('0x62')][_0x7d9f('0x24')]({'where':{'ListId':_0x2f6b4e['query'][_0x7d9f('0x65')],'CampaignId':_0x2f6b4e[_0x7d9f('0x46')]['id']}})[_0x7d9f('0x25')](function(){return _0x549bcb;});}})[_0x7d9f('0x25')](respondWithStatusCode(_0x3d6ceb,null))[_0x7d9f('0x52')](handleError(_0x3d6ceb,null));}; \ No newline at end of file +var _0x7152=['index','map','Campaign','fieldName','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','offset','order','sort','where','filter','type','merge','options','includeAll','catch','show','params','find','create','body','user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','clone','rawAttributes','include','get','omit','updatedAt','createdAt','Unable\x20to\x20retrieve\x20the\x20current\x20user','update','findOne','CmHopper','pick','CampaignId','findAll','rows','getHopperHistories','CmHopperHistory','CmHopperFinal','getHopperBlacks','CmHopperBlack','getLists','CmList','addLists','ids','spread','dialCheckDuplicateType','always','insert','into','fromQuery','phone','scheduledAt','ContactId','ListId','select','field','NOW()','CmListId','toString','from','cm_contacts','deletedAt\x20IS\x20NULL','phone\x20IS\x20NOT\x20NULL','COALESCE(calleridnum,\x27\x27)','CampaignId\x20=\x20?','phone\x20NOT\x20IN\x20(?)','COALESCE(phone,\x27\x27)','cm_hopper','ListId\x20=\x20?','sequelize','removeLists','getBlackLists','addBlackLists','push','all','removeBlackLists','rimraf','zip-dir','fast-json-patch','bluebird','util','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','count','limit','Content-Range','json','reject','save','destroy','then','IvrCampaigns','UserProfileResource','end','error','stack','name','send'];(function(_0xd3625f,_0x1f1bd1){var _0x356c48=function(_0x244f74){while(--_0x244f74){_0xd3625f['push'](_0xd3625f['shift']());}};_0x356c48(++_0x1f1bd1);}(_0x7152,0xe1));var _0x2715=function(_0x538230,_0x522250){_0x538230=_0x538230-0x0;var _0x30f32b=_0x7152[_0x538230];return _0x30f32b;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x2715('0x0'));var zipdir=require(_0x2715('0x1'));var jsonpatch=require(_0x2715('0x2'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x2715('0x3'));var Mustache=require('mustache');var util=require(_0x2715('0x4'));var path=require('path');var sox=require(_0x2715('0x5'));var csv=require(_0x2715('0x6'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x2715('0x7'));var _=require(_0x2715('0x8'));var squel=require(_0x2715('0x9'));var crypto=require(_0x2715('0xa'));var jsforce=require(_0x2715('0xb'));var deskjs=require(_0x2715('0xc'));var toCsv=require(_0x2715('0x6'));var querystring=require(_0x2715('0xd'));var Papa=require(_0x2715('0xe'));var Redis=require(_0x2715('0xf'));var authService=require(_0x2715('0x10'));var qs=require(_0x2715('0x11'));var as=require(_0x2715('0x12'));var hardwareService=require(_0x2715('0x13'));var logger=require(_0x2715('0x14'))('api');var utils=require(_0x2715('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0x2715('0x16'));var db=require(_0x2715('0x17'))['db'];function respondWithStatusCode(_0x2d6c7d,_0x4cbbec){_0x4cbbec=_0x4cbbec||0xcc;return function(_0x59a2e5){if(_0x59a2e5){return _0x2d6c7d[_0x2715('0x18')](_0x4cbbec);}return _0x2d6c7d[_0x2715('0x19')](_0x4cbbec)['end']();};}function respondWithResult(_0x295ddc,_0x293156){_0x293156=_0x293156||0xc8;return function(_0x5e6f98){if(_0x5e6f98){return _0x295ddc[_0x2715('0x19')](_0x293156)['json'](_0x5e6f98);}};}function respondWithFilteredResult(_0xe29e23,_0x2d1071){return function(_0x197f67){if(_0x197f67){var _0x3a95dd=typeof _0x2d1071['offset']==='undefined'&&typeof _0x2d1071['limit']==='undefined';var _0x2b9742=_0x197f67[_0x2715('0x1a')];var _0x37ce39=_0x3a95dd?0x0:_0x2d1071['offset'];var _0x16ed80=_0x3a95dd?_0x197f67[_0x2715('0x1a')]:_0x2d1071['offset']+_0x2d1071[_0x2715('0x1b')];var _0x2761ad;if(_0x16ed80>=_0x2b9742){_0x16ed80=_0x2b9742;_0x2761ad=0xc8;}else{_0x2761ad=0xce;}_0xe29e23[_0x2715('0x19')](_0x2761ad);return _0xe29e23['set'](_0x2715('0x1c'),_0x37ce39+'-'+_0x16ed80+'/'+_0x2b9742)[_0x2715('0x1d')](_0x197f67);}return null;};}function patchUpdates(_0x5f3bf7){return function(_0x5c2a00){try{jsonpatch['apply'](_0x5c2a00,_0x5f3bf7,!![]);}catch(_0x1ad0e8){return BPromise[_0x2715('0x1e')](_0x1ad0e8);}return _0x5c2a00[_0x2715('0x1f')]();};}function saveUpdates(_0x1566ff,_0xa41988){return function(_0x477772){if(_0x477772){return _0x477772['update'](_0x1566ff)['then'](function(_0x4a8c1e){return _0x4a8c1e;});}return null;};}function removeEntity(_0x4f3bb8,_0x88a746){return function(_0x3f47bd){if(_0x3f47bd){return _0x3f47bd[_0x2715('0x20')]()[_0x2715('0x21')](function(){var _0x387328=_0x3f47bd['get']({'plain':!![]});var _0x32b950=_0x2715('0x22');return db[_0x2715('0x23')]['destroy']({'where':{'type':_0x32b950,'resourceId':_0x387328['id']}})[_0x2715('0x21')](function(){return _0x3f47bd;});})[_0x2715('0x21')](function(){_0x4f3bb8[_0x2715('0x19')](0xcc)[_0x2715('0x24')]();});}};}function handleEntityNotFound(_0x453587,_0x28f879){return function(_0x27dd6e){if(!_0x27dd6e){_0x453587['sendStatus'](0x194);}return _0x27dd6e;};}function handleError(_0x2b538f,_0x517bb1){_0x517bb1=_0x517bb1||0x1f4;return function(_0x12918c){logger[_0x2715('0x25')](_0x12918c[_0x2715('0x26')]);if(_0x12918c[_0x2715('0x27')]){delete _0x12918c[_0x2715('0x27')];}_0x2b538f['status'](_0x517bb1)[_0x2715('0x28')](_0x12918c);};}exports[_0x2715('0x29')]=function(_0x34361d,_0x9f27ed){var _0x5ad97b={},_0x16287f={},_0x52b839={'count':0x0,'rows':[]};var _0x3cf8c3=_[_0x2715('0x2a')](db[_0x2715('0x2b')]['rawAttributes'],function(_0x4059d2){return{'name':_0x4059d2[_0x2715('0x2c')],'type':_0x4059d2['type'][_0x2715('0x2d')]};});_0x16287f[_0x2715('0x2e')]=_[_0x2715('0x2a')](_0x3cf8c3,_0x2715('0x27'));_0x16287f[_0x2715('0x2f')]=_[_0x2715('0x30')](_0x34361d['query']);_0x16287f[_0x2715('0x31')]=_[_0x2715('0x32')](_0x16287f[_0x2715('0x2e')],_0x16287f[_0x2715('0x2f')]);_0x5ad97b[_0x2715('0x33')]=_[_0x2715('0x32')](_0x16287f['model'],qs[_0x2715('0x34')](_0x34361d[_0x2715('0x2f')][_0x2715('0x34')]));_0x5ad97b['attributes']=_0x5ad97b['attributes'][_0x2715('0x35')]?_0x5ad97b[_0x2715('0x33')]:_0x16287f['model'];if(!_0x34361d[_0x2715('0x2f')][_0x2715('0x36')](_0x2715('0x37'))){_0x5ad97b[_0x2715('0x1b')]=qs[_0x2715('0x1b')](_0x34361d[_0x2715('0x2f')]['limit']);_0x5ad97b[_0x2715('0x38')]=qs['offset'](_0x34361d[_0x2715('0x2f')][_0x2715('0x38')]);}_0x5ad97b[_0x2715('0x39')]=qs[_0x2715('0x3a')](_0x34361d[_0x2715('0x2f')]['sort']);_0x5ad97b[_0x2715('0x3b')]=qs[_0x2715('0x31')](_['pick'](_0x34361d[_0x2715('0x2f')],_0x16287f[_0x2715('0x31')]),_0x3cf8c3);if(_0x34361d[_0x2715('0x2f')][_0x2715('0x3c')]){_0x5ad97b[_0x2715('0x3b')]=_['merge'](_0x5ad97b[_0x2715('0x3b')],{'$or':_[_0x2715('0x2a')](_0x3cf8c3,function(_0x24fbf3){if(_0x24fbf3[_0x2715('0x3d')]!=='VIRTUAL'){var _0x3a46fb={};_0x3a46fb[_0x24fbf3[_0x2715('0x27')]]={'$like':'%'+_0x34361d[_0x2715('0x2f')][_0x2715('0x3c')]+'%'};return _0x3a46fb;}})});}_0x5ad97b=_[_0x2715('0x3e')]({},_0x5ad97b,_0x34361d[_0x2715('0x3f')]);var _0x3cf76a={'where':_0x5ad97b['where']};return db[_0x2715('0x2b')]['count'](_0x3cf76a)[_0x2715('0x21')](function(_0x5422be){_0x52b839[_0x2715('0x1a')]=_0x5422be;if(_0x34361d[_0x2715('0x2f')][_0x2715('0x40')]){_0x5ad97b['include']=[{'all':!![]}];}return db[_0x2715('0x2b')]['findAll'](_0x5ad97b);})[_0x2715('0x21')](function(_0x5752bc){_0x52b839['rows']=_0x5752bc;return _0x52b839;})[_0x2715('0x21')](respondWithFilteredResult(_0x9f27ed,_0x5ad97b))[_0x2715('0x41')](handleError(_0x9f27ed,null));};exports[_0x2715('0x42')]=function(_0xb0c21b,_0x4252e5){var _0x5225a2={'raw':![],'where':{'id':_0xb0c21b[_0x2715('0x43')]['id']}},_0xbb85c4={};_0xbb85c4[_0x2715('0x2e')]=_[_0x2715('0x30')](db[_0x2715('0x2b')]['rawAttributes']);_0xbb85c4[_0x2715('0x2f')]=_['keys'](_0xb0c21b['query']);_0xbb85c4[_0x2715('0x31')]=_[_0x2715('0x32')](_0xbb85c4[_0x2715('0x2e')],_0xbb85c4[_0x2715('0x2f')]);_0x5225a2['attributes']=_[_0x2715('0x32')](_0xbb85c4[_0x2715('0x2e')],qs[_0x2715('0x34')](_0xb0c21b[_0x2715('0x2f')]['fields']));_0x5225a2['attributes']=_0x5225a2[_0x2715('0x33')]['length']?_0x5225a2[_0x2715('0x33')]:_0xbb85c4[_0x2715('0x2e')];if(_0xb0c21b[_0x2715('0x2f')][_0x2715('0x40')]){_0x5225a2['include']=[{'all':!![]}];}_0x5225a2=_['merge']({},_0x5225a2,_0xb0c21b['options']);return db[_0x2715('0x2b')][_0x2715('0x44')](_0x5225a2)[_0x2715('0x21')](handleEntityNotFound(_0x4252e5,null))[_0x2715('0x21')](respondWithResult(_0x4252e5,null))[_0x2715('0x41')](handleError(_0x4252e5,null));};exports[_0x2715('0x45')]=function(_0x341fc7,_0xea25a1){return db[_0x2715('0x2b')]['create'](_0x341fc7[_0x2715('0x46')],{})['then'](function(_0x53ee79){var _0xc4099d=_0x341fc7[_0x2715('0x47')]['get']({'plain':!![]});if(!_0xc4099d)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0xc4099d[_0x2715('0x48')]===_0x2715('0x47')){var _0x50beab=_0x53ee79['get']({'plain':!![]});var _0x30a3df=_0x2715('0x22');return db[_0x2715('0x49')][_0x2715('0x44')]({'where':{'name':_0x30a3df,'userProfileId':_0xc4099d[_0x2715('0x4a')]},'raw':!![]})[_0x2715('0x21')](function(_0x451dfd){if(_0x451dfd&&_0x451dfd[_0x2715('0x4b')]===0x0){return db[_0x2715('0x23')][_0x2715('0x45')]({'name':_0x50beab[_0x2715('0x27')],'resourceId':_0x50beab['id'],'type':_0x451dfd[_0x2715('0x27')],'sectionId':_0x451dfd['id']},{})['then'](function(){return _0x53ee79;});}else{return _0x53ee79;}})[_0x2715('0x41')](function(_0x3f3477){logger[_0x2715('0x25')](_0x2715('0x4c'),_0x3f3477);throw _0x3f3477;});}return _0x53ee79;})[_0x2715('0x21')](respondWithResult(_0xea25a1,0xc9))[_0x2715('0x41')](handleError(_0xea25a1,null));};exports[_0x2715('0x4d')]=function(_0x1ca43a,_0x1a316b){var _0x368f47={'where':{'id':_0x1ca43a['params']['id']}},_0x2411e1={};_0x2411e1[_0x2715('0x2e')]=_[_0x2715('0x30')](db[_0x2715('0x2b')][_0x2715('0x4e')]);_0x368f47[_0x2715('0x33')]=_[_0x2715('0x32')](_0x2411e1[_0x2715('0x2e')],qs[_0x2715('0x34')](_0x1ca43a[_0x2715('0x2f')][_0x2715('0x34')]));_0x368f47[_0x2715('0x33')]=_0x368f47['attributes'][_0x2715('0x35')]?_0x368f47[_0x2715('0x33')]:_0x2411e1[_0x2715('0x2e')];if(_0x1ca43a[_0x2715('0x2f')][_0x2715('0x40')]){_0x368f47[_0x2715('0x4f')]=[{'all':!![]}];}_0x368f47=_[_0x2715('0x3e')]({},_0x368f47,_0x1ca43a[_0x2715('0x3f')]);return db[_0x2715('0x2b')][_0x2715('0x44')](_0x368f47)[_0x2715('0x21')](handleEntityNotFound(_0x1a316b,null))[_0x2715('0x21')](function(_0x2d7900){if(_0x2d7900){var _0x397de7=_0x2d7900[_0x2715('0x50')]({'plain':!![]});_0x397de7=qs[_0x2715('0x51')](_0x397de7,['id','createdAt',_0x2715('0x52')]);_0x1ca43a['body']=_[_0x2715('0x51')](_0x1ca43a[_0x2715('0x46')],['id',_0x2715('0x53'),_0x2715('0x52')]);return db[_0x2715('0x2b')][_0x2715('0x45')](_[_0x2715('0x3e')](_0x397de7,_0x1ca43a[_0x2715('0x46')]),{'include':_0x1ca43a[_0x2715('0x2f')][_0x2715('0x40')]?[{'all':!![]}]:undefined})[_0x2715('0x21')](function(_0x1987fd){var _0x21d3b3=_0x1ca43a[_0x2715('0x47')][_0x2715('0x50')]({'plain':!![]});if(!_0x21d3b3)throw new Error(_0x2715('0x54'));if(_0x21d3b3[_0x2715('0x48')]===_0x2715('0x47')){var _0x17d7db=_0x1987fd['get']({'plain':!![]});var _0x3df07a=_0x2715('0x22');return db[_0x2715('0x49')][_0x2715('0x44')]({'where':{'name':_0x3df07a,'userProfileId':_0x21d3b3[_0x2715('0x4a')]},'raw':!![]})[_0x2715('0x21')](function(_0x116cde){if(_0x116cde&&_0x116cde['autoAssociation']===0x0){return db[_0x2715('0x23')]['create']({'name':_0x17d7db['name'],'resourceId':_0x17d7db['id'],'type':_0x116cde[_0x2715('0x27')],'sectionId':_0x116cde['id']},{})[_0x2715('0x21')](function(){return _0x1987fd;});}else{return _0x1987fd;}})[_0x2715('0x41')](function(_0x697025){logger[_0x2715('0x25')](_0x2715('0x4c'),_0x697025);throw _0x697025;});}return _0x1987fd;});}})[_0x2715('0x21')](respondWithResult(_0x1a316b,0xc9))[_0x2715('0x41')](handleError(_0x1a316b,null));};exports[_0x2715('0x55')]=function(_0x3f0f35,_0x37f623){if(_0x3f0f35['body']['id']){delete _0x3f0f35[_0x2715('0x46')]['id'];}return db['Campaign'][_0x2715('0x44')]({'where':{'id':_0x3f0f35[_0x2715('0x43')]['id']}})[_0x2715('0x21')](handleEntityNotFound(_0x37f623,null))[_0x2715('0x21')](saveUpdates(_0x3f0f35[_0x2715('0x46')],null))[_0x2715('0x21')](respondWithResult(_0x37f623,null))[_0x2715('0x41')](handleError(_0x37f623,null));};exports[_0x2715('0x20')]=function(_0x104a38,_0x320121){return db[_0x2715('0x2b')][_0x2715('0x44')]({'where':{'id':_0x104a38['params']['id']}})[_0x2715('0x21')](handleEntityNotFound(_0x320121,null))['then'](removeEntity(_0x320121,null))[_0x2715('0x41')](handleError(_0x320121,null));};exports['getHoppers']=function(_0x3d0951,_0x21f123,_0xebed41){var _0x3453f0={'raw':!![],'where':{}};var _0x4b43d8={};var _0x59871d={'count':0x0,'rows':[]};return db['Campaign'][_0x2715('0x56')]({'where':{'id':_0x3d0951[_0x2715('0x43')]['id']}})['then'](handleEntityNotFound(_0x21f123,null))[_0x2715('0x21')](function(_0x31ed7b){if(_0x31ed7b){_0x4b43d8[_0x2715('0x2e')]=_[_0x2715('0x30')](db[_0x2715('0x57')][_0x2715('0x4e')]);_0x4b43d8[_0x2715('0x2f')]=_['keys'](_0x3d0951[_0x2715('0x2f')]);_0x4b43d8[_0x2715('0x31')]=_[_0x2715('0x32')](_0x4b43d8[_0x2715('0x2e')],_0x4b43d8['query']);_0x3453f0[_0x2715('0x33')]=_[_0x2715('0x32')](_0x4b43d8[_0x2715('0x2e')],qs[_0x2715('0x34')](_0x3d0951['query'][_0x2715('0x34')]));_0x3453f0['attributes']=_0x3453f0[_0x2715('0x33')][_0x2715('0x35')]?_0x3453f0['attributes']:_0x4b43d8[_0x2715('0x2e')];if(!_0x3d0951[_0x2715('0x2f')][_0x2715('0x36')]('nolimit')){_0x3453f0[_0x2715('0x1b')]=qs[_0x2715('0x1b')](_0x3d0951[_0x2715('0x2f')][_0x2715('0x1b')]);_0x3453f0['offset']=qs[_0x2715('0x38')](_0x3d0951[_0x2715('0x2f')][_0x2715('0x38')]);}_0x3453f0[_0x2715('0x39')]=qs[_0x2715('0x3a')](_0x3d0951[_0x2715('0x2f')][_0x2715('0x3a')]);_0x3453f0[_0x2715('0x3b')]=qs[_0x2715('0x31')](_[_0x2715('0x58')](_0x3d0951[_0x2715('0x2f')],_0x4b43d8[_0x2715('0x31')]));_0x3453f0[_0x2715('0x3b')][_0x2715('0x59')]=_0x31ed7b['id'];if(_0x3d0951[_0x2715('0x2f')]['filter']){_0x3453f0[_0x2715('0x3b')]=_[_0x2715('0x3e')](_0x3453f0['where'],{'$or':_[_0x2715('0x2a')](_0x3453f0['attributes'],function(_0x49bc22){var _0x299af6={};_0x299af6[_0x49bc22]={'$like':'%'+_0x3d0951[_0x2715('0x2f')][_0x2715('0x3c')]+'%'};return _0x299af6;})});}_0x3453f0=_[_0x2715('0x3e')]({},_0x3453f0,_0x3d0951[_0x2715('0x3f')]);return db[_0x2715('0x57')][_0x2715('0x1a')]({'where':_0x3453f0[_0x2715('0x3b')]})[_0x2715('0x21')](function(_0x338e0f){_0x59871d[_0x2715('0x1a')]=_0x338e0f;if(_0x3d0951[_0x2715('0x2f')][_0x2715('0x40')]){_0x3453f0[_0x2715('0x4f')]=[{'all':!![]}];}return db[_0x2715('0x57')][_0x2715('0x5a')](_0x3453f0);})[_0x2715('0x21')](function(_0x5a3963){_0x59871d[_0x2715('0x5b')]=_0x5a3963;return _0x59871d;});}})[_0x2715('0x21')](respondWithFilteredResult(_0x21f123,_0x3453f0))[_0x2715('0x41')](handleError(_0x21f123,null));};exports[_0x2715('0x5c')]=function(_0x581bf8,_0x440193,_0x3e4438){var _0x33c6f8={'raw':!![],'where':{}};var _0x1b4f85={};var _0x339791={'count':0x0,'rows':[]};return db[_0x2715('0x2b')][_0x2715('0x56')]({'where':{'id':_0x581bf8[_0x2715('0x43')]['id']}})[_0x2715('0x21')](handleEntityNotFound(_0x440193,null))['then'](function(_0xee2f43){if(_0xee2f43){_0x1b4f85['model']=_[_0x2715('0x30')](db[_0x2715('0x5d')][_0x2715('0x4e')]);_0x1b4f85[_0x2715('0x2f')]=_['keys'](_0x581bf8[_0x2715('0x2f')]);_0x1b4f85[_0x2715('0x31')]=_['intersection'](_0x1b4f85[_0x2715('0x2e')],_0x1b4f85[_0x2715('0x2f')]);_0x33c6f8[_0x2715('0x33')]=_['intersection'](_0x1b4f85[_0x2715('0x2e')],qs[_0x2715('0x34')](_0x581bf8[_0x2715('0x2f')]['fields']));_0x33c6f8[_0x2715('0x33')]=_0x33c6f8[_0x2715('0x33')][_0x2715('0x35')]?_0x33c6f8[_0x2715('0x33')]:_0x1b4f85['model'];if(!_0x581bf8[_0x2715('0x2f')][_0x2715('0x36')](_0x2715('0x37'))){_0x33c6f8[_0x2715('0x1b')]=qs[_0x2715('0x1b')](_0x581bf8['query'][_0x2715('0x1b')]);_0x33c6f8[_0x2715('0x38')]=qs[_0x2715('0x38')](_0x581bf8[_0x2715('0x2f')]['offset']);}_0x33c6f8[_0x2715('0x39')]=qs[_0x2715('0x3a')](_0x581bf8[_0x2715('0x2f')][_0x2715('0x3a')]);_0x33c6f8['where']=qs[_0x2715('0x31')](_[_0x2715('0x58')](_0x581bf8[_0x2715('0x2f')],_0x1b4f85[_0x2715('0x31')]));_0x33c6f8[_0x2715('0x3b')][_0x2715('0x59')]=_0xee2f43['id'];if(_0x581bf8[_0x2715('0x2f')][_0x2715('0x3c')]){_0x33c6f8[_0x2715('0x3b')]=_[_0x2715('0x3e')](_0x33c6f8['where'],{'$or':_[_0x2715('0x2a')](_0x33c6f8['attributes'],function(_0x16425e){var _0x9dc82e={};_0x9dc82e[_0x16425e]={'$like':'%'+_0x581bf8[_0x2715('0x2f')]['filter']+'%'};return _0x9dc82e;})});}_0x33c6f8=_['merge']({},_0x33c6f8,_0x581bf8[_0x2715('0x3f')]);return db[_0x2715('0x5d')][_0x2715('0x1a')]({'where':_0x33c6f8['where']})[_0x2715('0x21')](function(_0x55060c){_0x339791[_0x2715('0x1a')]=_0x55060c;if(_0x581bf8[_0x2715('0x2f')][_0x2715('0x40')]){_0x33c6f8[_0x2715('0x4f')]=[{'all':!![]}];}return db[_0x2715('0x5d')]['findAll'](_0x33c6f8);})[_0x2715('0x21')](function(_0x44b6d9){_0x339791['rows']=_0x44b6d9;return _0x339791;});}})[_0x2715('0x21')](respondWithFilteredResult(_0x440193,_0x33c6f8))[_0x2715('0x41')](handleError(_0x440193,null));};exports['getHopperFinals']=function(_0x282e0b,_0x17ea9f,_0x277ad8){var _0x268f80={'raw':!![],'where':{}};var _0x4f2f45={};var _0x527adb={'count':0x0,'rows':[]};return db[_0x2715('0x2b')][_0x2715('0x56')]({'where':{'id':_0x282e0b[_0x2715('0x43')]['id']}})[_0x2715('0x21')](handleEntityNotFound(_0x17ea9f,null))[_0x2715('0x21')](function(_0x48aa1f){if(_0x48aa1f){_0x4f2f45[_0x2715('0x2e')]=_['keys'](db[_0x2715('0x5e')][_0x2715('0x4e')]);_0x4f2f45['query']=_[_0x2715('0x30')](_0x282e0b[_0x2715('0x2f')]);_0x4f2f45[_0x2715('0x31')]=_[_0x2715('0x32')](_0x4f2f45[_0x2715('0x2e')],_0x4f2f45[_0x2715('0x2f')]);_0x268f80['attributes']=_[_0x2715('0x32')](_0x4f2f45[_0x2715('0x2e')],qs['fields'](_0x282e0b['query'][_0x2715('0x34')]));_0x268f80['attributes']=_0x268f80[_0x2715('0x33')][_0x2715('0x35')]?_0x268f80['attributes']:_0x4f2f45['model'];if(!_0x282e0b[_0x2715('0x2f')][_0x2715('0x36')](_0x2715('0x37'))){_0x268f80[_0x2715('0x1b')]=qs['limit'](_0x282e0b[_0x2715('0x2f')][_0x2715('0x1b')]);_0x268f80[_0x2715('0x38')]=qs[_0x2715('0x38')](_0x282e0b[_0x2715('0x2f')]['offset']);}_0x268f80[_0x2715('0x39')]=qs[_0x2715('0x3a')](_0x282e0b[_0x2715('0x2f')][_0x2715('0x3a')]);_0x268f80['where']=qs[_0x2715('0x31')](_[_0x2715('0x58')](_0x282e0b[_0x2715('0x2f')],_0x4f2f45[_0x2715('0x31')]));_0x268f80['where'][_0x2715('0x59')]=_0x48aa1f['id'];if(_0x282e0b[_0x2715('0x2f')]['filter']){_0x268f80[_0x2715('0x3b')]=_[_0x2715('0x3e')](_0x268f80[_0x2715('0x3b')],{'$or':_[_0x2715('0x2a')](_0x268f80[_0x2715('0x33')],function(_0x5877d7){var _0x552fef={};_0x552fef[_0x5877d7]={'$like':'%'+_0x282e0b[_0x2715('0x2f')][_0x2715('0x3c')]+'%'};return _0x552fef;})});}_0x268f80=_[_0x2715('0x3e')]({},_0x268f80,_0x282e0b[_0x2715('0x3f')]);return db[_0x2715('0x5e')][_0x2715('0x1a')]({'where':_0x268f80[_0x2715('0x3b')]})[_0x2715('0x21')](function(_0x3e98ac){_0x527adb['count']=_0x3e98ac;if(_0x282e0b[_0x2715('0x2f')][_0x2715('0x40')]){_0x268f80['include']=[{'all':!![]}];}return db['CmHopperFinal'][_0x2715('0x5a')](_0x268f80);})[_0x2715('0x21')](function(_0x38b0a8){_0x527adb[_0x2715('0x5b')]=_0x38b0a8;return _0x527adb;});}})[_0x2715('0x21')](respondWithFilteredResult(_0x17ea9f,_0x268f80))['catch'](handleError(_0x17ea9f,null));};exports[_0x2715('0x5f')]=function(_0x389614,_0x106148,_0x2d3ddb){var _0x50dfe2={'raw':!![],'where':{}};var _0x37365e={};var _0x8be8ac={'count':0x0,'rows':[]};return db[_0x2715('0x2b')][_0x2715('0x56')]({'where':{'id':_0x389614[_0x2715('0x43')]['id']}})[_0x2715('0x21')](handleEntityNotFound(_0x106148,null))[_0x2715('0x21')](function(_0x4c01c2){if(_0x4c01c2){_0x37365e[_0x2715('0x2e')]=_[_0x2715('0x30')](db[_0x2715('0x60')]['rawAttributes']);_0x37365e[_0x2715('0x2f')]=_[_0x2715('0x30')](_0x389614[_0x2715('0x2f')]);_0x37365e['filters']=_[_0x2715('0x32')](_0x37365e[_0x2715('0x2e')],_0x37365e[_0x2715('0x2f')]);_0x50dfe2[_0x2715('0x33')]=_['intersection'](_0x37365e[_0x2715('0x2e')],qs[_0x2715('0x34')](_0x389614[_0x2715('0x2f')][_0x2715('0x34')]));_0x50dfe2[_0x2715('0x33')]=_0x50dfe2[_0x2715('0x33')]['length']?_0x50dfe2[_0x2715('0x33')]:_0x37365e['model'];if(!_0x389614[_0x2715('0x2f')]['hasOwnProperty']('nolimit')){_0x50dfe2['limit']=qs['limit'](_0x389614[_0x2715('0x2f')][_0x2715('0x1b')]);_0x50dfe2['offset']=qs[_0x2715('0x38')](_0x389614[_0x2715('0x2f')][_0x2715('0x38')]);}_0x50dfe2['order']=qs['sort'](_0x389614['query'][_0x2715('0x3a')]);_0x50dfe2['where']=qs[_0x2715('0x31')](_[_0x2715('0x58')](_0x389614[_0x2715('0x2f')],_0x37365e[_0x2715('0x31')]));_0x50dfe2['where'][_0x2715('0x59')]=_0x4c01c2['id'];if(_0x389614[_0x2715('0x2f')][_0x2715('0x3c')]){_0x50dfe2[_0x2715('0x3b')]=_[_0x2715('0x3e')](_0x50dfe2[_0x2715('0x3b')],{'$or':_['map'](_0x50dfe2[_0x2715('0x33')],function(_0x468d90){var _0x4eabb3={};_0x4eabb3[_0x468d90]={'$like':'%'+_0x389614[_0x2715('0x2f')]['filter']+'%'};return _0x4eabb3;})});}_0x50dfe2=_['merge']({},_0x50dfe2,_0x389614['options']);return db[_0x2715('0x60')][_0x2715('0x1a')]({'where':_0x50dfe2[_0x2715('0x3b')]})[_0x2715('0x21')](function(_0x181990){_0x8be8ac[_0x2715('0x1a')]=_0x181990;if(_0x389614[_0x2715('0x2f')][_0x2715('0x40')]){_0x50dfe2[_0x2715('0x4f')]=[{'all':!![]}];}return db[_0x2715('0x60')][_0x2715('0x5a')](_0x50dfe2);})['then'](function(_0xf5992c){_0x8be8ac['rows']=_0xf5992c;return _0x8be8ac;});}})[_0x2715('0x21')](respondWithFilteredResult(_0x106148,_0x50dfe2))[_0x2715('0x41')](handleError(_0x106148,null));};exports[_0x2715('0x61')]=function(_0x3288b7,_0x876d46,_0x1107f7){var _0x13a746={};var _0x2a3afa={};var _0x45cee3;var _0x2766b6;return db[_0x2715('0x2b')]['findOne']({'where':{'id':_0x3288b7['params']['id']}})[_0x2715('0x21')](handleEntityNotFound(_0x876d46,null))[_0x2715('0x21')](function(_0x198134){if(_0x198134){_0x45cee3=_0x198134;_0x2a3afa[_0x2715('0x2e')]=_[_0x2715('0x30')](db[_0x2715('0x62')][_0x2715('0x4e')]);_0x2a3afa[_0x2715('0x2f')]=_[_0x2715('0x30')](_0x3288b7[_0x2715('0x2f')]);_0x2a3afa['filters']=_['intersection'](_0x2a3afa[_0x2715('0x2e')],_0x2a3afa[_0x2715('0x2f')]);_0x13a746['attributes']=_[_0x2715('0x32')](_0x2a3afa['model'],qs[_0x2715('0x34')](_0x3288b7[_0x2715('0x2f')]['fields']));_0x13a746[_0x2715('0x33')]=_0x13a746[_0x2715('0x33')][_0x2715('0x35')]?_0x13a746['attributes']:_0x2a3afa[_0x2715('0x2e')];_0x13a746[_0x2715('0x39')]=qs[_0x2715('0x3a')](_0x3288b7[_0x2715('0x2f')][_0x2715('0x3a')]);_0x13a746['where']=qs[_0x2715('0x31')](_[_0x2715('0x58')](_0x3288b7[_0x2715('0x2f')],_0x2a3afa[_0x2715('0x31')]));if(_0x3288b7['query']['filter']){_0x13a746[_0x2715('0x3b')]=_[_0x2715('0x3e')](_0x13a746[_0x2715('0x3b')],{'$or':_[_0x2715('0x2a')](_0x13a746[_0x2715('0x33')],function(_0x59d311){var _0x3fc9d6={};_0x3fc9d6[_0x59d311]={'$like':'%'+_0x3288b7[_0x2715('0x2f')][_0x2715('0x3c')]+'%'};return _0x3fc9d6;})});}_0x13a746=_[_0x2715('0x3e')]({},_0x13a746,_0x3288b7['options']);return _0x45cee3[_0x2715('0x61')](_0x13a746);}})['then'](function(_0x3da4dd){if(_0x3da4dd){_0x2766b6=_0x3da4dd[_0x2715('0x35')];if(!_0x3288b7['query'][_0x2715('0x36')](_0x2715('0x37'))){_0x13a746[_0x2715('0x1b')]=qs['limit'](_0x3288b7[_0x2715('0x2f')]['limit']);_0x13a746[_0x2715('0x38')]=qs['offset'](_0x3288b7[_0x2715('0x2f')][_0x2715('0x38')]);}return _0x45cee3['getLists'](_0x13a746);}})[_0x2715('0x21')](function(_0x5be7b0){if(_0x5be7b0){return _0x5be7b0?{'count':_0x2766b6,'rows':_0x5be7b0}:null;}})[_0x2715('0x21')](respondWithResult(_0x876d46,null))[_0x2715('0x41')](handleError(_0x876d46,null));};exports[_0x2715('0x63')]=function(_0x5d881f,_0x4f2a31,_0x149a59){var _0x26d04f,_0x182c96;return db['Campaign'][_0x2715('0x44')]({'where':{'id':_0x5d881f[_0x2715('0x43')]['id']}})[_0x2715('0x21')](handleEntityNotFound(_0x4f2a31,null))['then'](function(_0xf752c7){if(_0xf752c7){_0x182c96=_0xf752c7;return _0xf752c7['addLists'](_0x5d881f[_0x2715('0x46')][_0x2715('0x64')],_['omit'](_0x5d881f['body'],[_0x2715('0x64'),'id'])||{});}return null;})[_0x2715('0x65')](function(_0x55190){var _0x360244;_0x26d04f=_0x55190||[];var _0x2c08fe=[];if(_0x55190){for(var _0x2da735=0x0;_0x2da735<_0x55190['length'];_0x2da735+=0x1){var _0x17c881=_0x55190[_0x2da735][_0x2715('0x50')]({'plain':!![]});_0x182c96[_0x2715('0x66')]=_0x5d881f[_0x2715('0x46')][_0x2715('0x66')]?_0x5d881f['body']['dialCheckDuplicateType']:_0x182c96['dialCheckDuplicateType'];switch(_0x182c96[_0x2715('0x66')]){case _0x2715('0x67'):_0x360244=squel[_0x2715('0x68')]()[_0x2715('0x69')]('cm_hopper')[_0x2715('0x6a')]([_0x2715('0x6b'),_0x2715('0x6c'),_0x2715('0x6d'),_0x2715('0x6e'),_0x2715('0x59'),_0x2715('0x53'),_0x2715('0x52')],squel[_0x2715('0x6f')]()['field'](_0x2715('0x6b'),_0x2715('0x6b'))[_0x2715('0x70')](_0x2715('0x71'),_0x2715('0x6c'))[_0x2715('0x70')]('id',_0x2715('0x6d'))[_0x2715('0x70')](_0x17c881[_0x2715('0x72')][_0x2715('0x73')](),'ListId')[_0x2715('0x70')](_0x5d881f[_0x2715('0x43')]['id'][_0x2715('0x73')](),_0x2715('0x59'))['field'](_0x2715('0x71'),_0x2715('0x53'))['field'](_0x2715('0x71'),_0x2715('0x52'))[_0x2715('0x74')](_0x2715('0x75'))[_0x2715('0x3b')](_0x2715('0x76'))['where']('ListId\x20=\x20?',_0x17c881[_0x2715('0x72')][_0x2715('0x73')]())[_0x2715('0x3b')](_0x2715('0x77'))[_0x2715('0x3b')]('phone\x20NOT\x20IN\x20(?)',squel[_0x2715('0x6f')]()['field'](_0x2715('0x78'))[_0x2715('0x74')]('cm_hopper_final')[_0x2715('0x3b')](_0x2715('0x79'),_0x5d881f['params']['id'][_0x2715('0x73')]()))[_0x2715('0x3b')](_0x2715('0x7a'),squel['select']()[_0x2715('0x70')](_0x2715('0x7b'))[_0x2715('0x74')](_0x2715('0x7c'))['where'](_0x2715('0x79'),_0x5d881f[_0x2715('0x43')]['id'][_0x2715('0x73')]())))[_0x2715('0x73')]();break;case'onlyIfOpen':_0x360244=squel[_0x2715('0x68')]()[_0x2715('0x69')](_0x2715('0x7c'))['fromQuery']([_0x2715('0x6b'),_0x2715('0x6c'),_0x2715('0x6d'),'ListId',_0x2715('0x59'),_0x2715('0x53'),'updatedAt'],squel['select']()[_0x2715('0x70')](_0x2715('0x6b'),'phone')[_0x2715('0x70')](_0x2715('0x71'),'scheduledAt')[_0x2715('0x70')]('id',_0x2715('0x6d'))[_0x2715('0x70')](_0x17c881[_0x2715('0x72')][_0x2715('0x73')](),'ListId')['field'](_0x5d881f['params']['id'][_0x2715('0x73')](),'CampaignId')[_0x2715('0x70')](_0x2715('0x71'),_0x2715('0x53'))[_0x2715('0x70')](_0x2715('0x71'),_0x2715('0x52'))['from'](_0x2715('0x75'))[_0x2715('0x3b')](_0x2715('0x76'))['where'](_0x2715('0x7d'),_0x17c881[_0x2715('0x72')][_0x2715('0x73')]())[_0x2715('0x3b')](_0x2715('0x77'))['where']('phone\x20NOT\x20IN\x20(?)',squel[_0x2715('0x6f')]()[_0x2715('0x70')]('COALESCE(phone,\x27\x27)')[_0x2715('0x74')](_0x2715('0x7c'))[_0x2715('0x3b')]('CampaignId\x20=\x20?',_0x5d881f[_0x2715('0x43')]['id'][_0x2715('0x73')]())))[_0x2715('0x73')]();break;default:_0x360244=squel[_0x2715('0x68')]()['into']('cm_hopper')[_0x2715('0x6a')]([_0x2715('0x6b'),_0x2715('0x6c'),_0x2715('0x6d'),'ListId',_0x2715('0x59'),_0x2715('0x53'),_0x2715('0x52')],squel[_0x2715('0x6f')]()[_0x2715('0x70')](_0x2715('0x6b'),_0x2715('0x6b'))[_0x2715('0x70')]('NOW()',_0x2715('0x6c'))[_0x2715('0x70')]('id',_0x2715('0x6d'))['field'](_0x17c881['CmListId'][_0x2715('0x73')](),_0x2715('0x6e'))[_0x2715('0x70')](_0x5d881f[_0x2715('0x43')]['id'][_0x2715('0x73')](),_0x2715('0x59'))[_0x2715('0x70')]('NOW()',_0x2715('0x53'))[_0x2715('0x70')](_0x2715('0x71'),_0x2715('0x52'))[_0x2715('0x74')](_0x2715('0x75'))[_0x2715('0x3b')]('deletedAt\x20IS\x20NULL')[_0x2715('0x3b')](_0x2715('0x7d'),_0x17c881[_0x2715('0x72')][_0x2715('0x73')]())['where']('phone\x20IS\x20NOT\x20NULL'))[_0x2715('0x73')]();}_0x2c08fe['push'](db[_0x2715('0x7e')][_0x2715('0x2f')](_0x360244));}return BPromise['all'](_0x2c08fe);}})[_0x2715('0x21')](function(){return _0x26d04f;})[_0x2715('0x21')](respondWithResult(_0x4f2a31,null))[_0x2715('0x41')](handleError(_0x4f2a31,null));};exports[_0x2715('0x7f')]=function(_0x37bfe5,_0x9f3880,_0x476828){return db[_0x2715('0x2b')][_0x2715('0x44')]({'where':{'id':_0x37bfe5['params']['id']}})[_0x2715('0x21')](handleEntityNotFound(_0x9f3880,null))[_0x2715('0x21')](function(_0xb53bd){if(_0xb53bd){return _0xb53bd['removeLists'](_0x37bfe5['query'][_0x2715('0x64')]);}})[_0x2715('0x21')](function(_0x30b121){if(_0x30b121){return db['CmHopper'][_0x2715('0x20')]({'where':{'ListId':_0x37bfe5[_0x2715('0x2f')]['ids'],'CampaignId':_0x37bfe5[_0x2715('0x43')]['id']}})[_0x2715('0x21')](function(){return _0x30b121;});}})[_0x2715('0x21')](respondWithStatusCode(_0x9f3880,null))[_0x2715('0x41')](handleError(_0x9f3880,null));};exports[_0x2715('0x80')]=function(_0x2f536d,_0x4965c3,_0x20218a){var _0x10fb64={};var _0x419411={};var _0x425cf3;var _0x2bc6a3;return db[_0x2715('0x2b')][_0x2715('0x56')]({'where':{'id':_0x2f536d['params']['id']}})['then'](handleEntityNotFound(_0x4965c3,null))[_0x2715('0x21')](function(_0xe12ed3){if(_0xe12ed3){_0x425cf3=_0xe12ed3;_0x419411[_0x2715('0x2e')]=_[_0x2715('0x30')](db[_0x2715('0x62')]['rawAttributes']);_0x419411[_0x2715('0x2f')]=_[_0x2715('0x30')](_0x2f536d[_0x2715('0x2f')]);_0x419411[_0x2715('0x31')]=_[_0x2715('0x32')](_0x419411[_0x2715('0x2e')],_0x419411[_0x2715('0x2f')]);_0x10fb64[_0x2715('0x33')]=_[_0x2715('0x32')](_0x419411[_0x2715('0x2e')],qs['fields'](_0x2f536d[_0x2715('0x2f')][_0x2715('0x34')]));_0x10fb64['attributes']=_0x10fb64['attributes'][_0x2715('0x35')]?_0x10fb64[_0x2715('0x33')]:_0x419411[_0x2715('0x2e')];_0x10fb64[_0x2715('0x39')]=qs['sort'](_0x2f536d[_0x2715('0x2f')][_0x2715('0x3a')]);_0x10fb64[_0x2715('0x3b')]=qs[_0x2715('0x31')](_[_0x2715('0x58')](_0x2f536d[_0x2715('0x2f')],_0x419411[_0x2715('0x31')]));if(_0x2f536d['query'][_0x2715('0x3c')]){_0x10fb64[_0x2715('0x3b')]=_[_0x2715('0x3e')](_0x10fb64['where'],{'$or':_[_0x2715('0x2a')](_0x10fb64[_0x2715('0x33')],function(_0x205836){var _0x5b72f1={};_0x5b72f1[_0x205836]={'$like':'%'+_0x2f536d[_0x2715('0x2f')][_0x2715('0x3c')]+'%'};return _0x5b72f1;})});}_0x10fb64=_[_0x2715('0x3e')]({},_0x10fb64,_0x2f536d['options']);return _0x425cf3['getBlackLists'](_0x10fb64);}})[_0x2715('0x21')](function(_0x135c4c){if(_0x135c4c){_0x2bc6a3=_0x135c4c['length'];if(!_0x2f536d[_0x2715('0x2f')][_0x2715('0x36')](_0x2715('0x37'))){_0x10fb64[_0x2715('0x1b')]=qs[_0x2715('0x1b')](_0x2f536d['query'][_0x2715('0x1b')]);_0x10fb64[_0x2715('0x38')]=qs[_0x2715('0x38')](_0x2f536d['query'][_0x2715('0x38')]);}return _0x425cf3[_0x2715('0x80')](_0x10fb64);}})[_0x2715('0x21')](function(_0x370cb6){if(_0x370cb6){return _0x370cb6?{'count':_0x2bc6a3,'rows':_0x370cb6}:null;}})[_0x2715('0x21')](respondWithResult(_0x4965c3,null))[_0x2715('0x41')](handleError(_0x4965c3,null));};exports['addBlackLists']=function(_0x2707c5,_0x20e1bc,_0x2e0aa7){var _0x5263c7,_0x304bb7;return db[_0x2715('0x2b')][_0x2715('0x44')]({'where':{'id':_0x2707c5[_0x2715('0x43')]['id']}})[_0x2715('0x21')](handleEntityNotFound(_0x20e1bc,null))[_0x2715('0x21')](function(_0x5870ed){if(_0x5870ed){_0x304bb7=_0x5870ed;return _0x5870ed[_0x2715('0x81')](_0x2707c5[_0x2715('0x46')]['ids'],_[_0x2715('0x51')](_0x2707c5[_0x2715('0x46')],['ids','id'])||{});}return null;})['spread'](function(_0x48af92){var _0x38d625;_0x5263c7=_0x48af92||[];var _0x18e5fa=[];if(_0x48af92){for(var _0x433067=0x0;_0x433067<_0x48af92[_0x2715('0x35')];_0x433067+=0x1){var _0xf84a2b=_0x48af92[_0x433067]['get']({'plain':!![]});_0x38d625=squel[_0x2715('0x68')]()['into']('cm_hopper_black')[_0x2715('0x6a')](['phone',_0x2715('0x6d'),_0x2715('0x6e'),_0x2715('0x59'),_0x2715('0x53'),_0x2715('0x52')],squel[_0x2715('0x6f')]()['field'](_0x2715('0x6b'),_0x2715('0x6b'))['field']('id',_0x2715('0x6d'))[_0x2715('0x70')](_0xf84a2b[_0x2715('0x72')][_0x2715('0x73')](),_0x2715('0x6e'))[_0x2715('0x70')](_0x2707c5['params']['id'][_0x2715('0x73')](),'CampaignId')['field'](_0x2715('0x71'),_0x2715('0x53'))['field']('NOW()',_0x2715('0x52'))[_0x2715('0x74')](_0x2715('0x75'))['where']('deletedAt\x20IS\x20NULL')['where'](_0x2715('0x7d'),_0xf84a2b[_0x2715('0x72')]['toString']())['where'](_0x2715('0x77')))['toString']();_0x18e5fa[_0x2715('0x82')](db[_0x2715('0x7e')][_0x2715('0x2f')](_0x38d625));}return BPromise[_0x2715('0x83')](_0x18e5fa);}})[_0x2715('0x21')](function(){return _0x5263c7;})[_0x2715('0x21')](respondWithResult(_0x20e1bc,null))[_0x2715('0x41')](handleError(_0x20e1bc,null));};exports[_0x2715('0x84')]=function(_0x5822e2,_0x53e285,_0x1c330c){return db[_0x2715('0x2b')][_0x2715('0x44')]({'where':{'id':_0x5822e2[_0x2715('0x43')]['id']}})[_0x2715('0x21')](handleEntityNotFound(_0x53e285,null))[_0x2715('0x21')](function(_0x2edb0c){if(_0x2edb0c){return _0x2edb0c['removeBlackLists'](_0x5822e2[_0x2715('0x2f')][_0x2715('0x64')]);}})[_0x2715('0x21')](function(_0x581bbf){if(_0x581bbf){return db[_0x2715('0x60')]['destroy']({'where':{'ListId':_0x5822e2['query'][_0x2715('0x64')],'CampaignId':_0x5822e2[_0x2715('0x43')]['id']}})['then'](function(){return _0x581bbf;});}})[_0x2715('0x21')](respondWithStatusCode(_0x53e285,null))[_0x2715('0x41')](handleError(_0x53e285,null));}; \ No newline at end of file diff --git a/server/api/campaign/campaign.model.js b/server/api/campaign/campaign.model.js index 75c276c..d744a6c 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 _0x7a54=['../../config/logger','moment','bluebird','path','rimraf','../../config/environment','./campaign.attributes','exports','Campaign','campaigns','lodash','util'];(function(_0x5c5f3b,_0x5b9190){var _0x8a59e4=function(_0x50637c){while(--_0x50637c){_0x5c5f3b['push'](_0x5c5f3b['shift']());}};_0x8a59e4(++_0x5b9190);}(_0x7a54,0x106));var _0x47a5=function(_0xb0c01e,_0x1f15e2){_0xb0c01e=_0xb0c01e-0x0;var _0x5e5966=_0x7a54[_0xb0c01e];return _0x5e5966;};'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':[],'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(_0x5a3cf0,_0x160a68){var _0x5a64ee=function(_0x34cd1d){while(--_0x34cd1d){_0x5a3cf0['push'](_0x5a3cf0['shift']());}};_0x5a64ee(++_0x160a68);}(_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 9427447..31bad7f 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 _0x0dba=['Campaign,\x20%s,\x20%s','message','result','catch','GetCampaign','Campaign','findAll','options','raw','attributes','include','map','model','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','request','then','info','request\x20sent','debug','stringify','error','code'];(function(_0x528364,_0x1a8f14){var _0x585865=function(_0x3006ff){while(--_0x3006ff){_0x528364['push'](_0x528364['shift']());}};_0x585865(++_0x1a8f14);}(_0x0dba,0x136));var _0xa0db=function(_0xfc957f,_0x2e353b){_0xfc957f=_0xfc957f-0x0;var _0x10a878=_0x0dba[_0xfc957f];return _0x10a878;};'use strict';var _=require(_0xa0db('0x0'));var util=require(_0xa0db('0x1'));var moment=require(_0xa0db('0x2'));var BPromise=require(_0xa0db('0x3'));var rs=require(_0xa0db('0x4'));var fs=require('fs');var Redis=require(_0xa0db('0x5'));var db=require(_0xa0db('0x6'))['db'];var utils=require(_0xa0db('0x7'));var logger=require(_0xa0db('0x8'))(_0xa0db('0x9'));var config=require(_0xa0db('0xa'));var jayson=require(_0xa0db('0xb'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x5b77ce,_0x5a8cb2,_0x45fb6d){return new BPromise(function(_0x1fd7ed,_0x483ddf){return client[_0xa0db('0xc')](_0x5b77ce,_0x45fb6d)[_0xa0db('0xd')](function(_0x35445a){logger[_0xa0db('0xe')]('Campaign,\x20%s,\x20%s',_0x5a8cb2,_0xa0db('0xf'));logger[_0xa0db('0x10')]('Campaign,\x20%s,\x20%s,\x20%s',_0x5a8cb2,'request\x20sent',JSON[_0xa0db('0x11')](_0x35445a));if(_0x35445a[_0xa0db('0x12')]){if(_0x35445a[_0xa0db('0x12')][_0xa0db('0x13')]===0x1f4){logger['error'](_0xa0db('0x14'),_0x5a8cb2,_0x35445a[_0xa0db('0x12')][_0xa0db('0x15')]);return _0x483ddf(_0x35445a[_0xa0db('0x12')][_0xa0db('0x15')]);}logger[_0xa0db('0x12')](_0xa0db('0x14'),_0x5a8cb2,_0x35445a[_0xa0db('0x12')][_0xa0db('0x15')]);return _0x1fd7ed(_0x35445a['error'][_0xa0db('0x15')]);}else{logger[_0xa0db('0xe')](_0xa0db('0x14'),_0x5a8cb2,_0xa0db('0xf'));_0x1fd7ed(_0x35445a[_0xa0db('0x16')][_0xa0db('0x15')]);}})[_0xa0db('0x17')](function(_0x12a3e8){logger[_0xa0db('0x12')]('Campaign,\x20%s,\x20%s',_0x5a8cb2,_0x12a3e8);_0x483ddf(_0x12a3e8);});});}exports[_0xa0db('0x18')]=function(_0x215658){var _0x4be2e2=this;return new Promise(function(_0x12766f,_0x2786ae){return db[_0xa0db('0x19')][_0xa0db('0x1a')]({'raw':_0x215658[_0xa0db('0x1b')]?_0x215658[_0xa0db('0x1b')][_0xa0db('0x1c')]===undefined?!![]:![]:!![],'where':_0x215658['options']?_0x215658['options']['where']||null:null,'attributes':_0x215658['options']?_0x215658[_0xa0db('0x1b')][_0xa0db('0x1d')]||null:null,'limit':_0x215658[_0xa0db('0x1b')]?_0x215658['options']['limit']||null:null,'include':_0x215658[_0xa0db('0x1b')]?_0x215658['options'][_0xa0db('0x1e')]?_[_0xa0db('0x1f')](_0x215658[_0xa0db('0x1b')][_0xa0db('0x1e')],function(_0x4e9a22){return{'model':db[_0x4e9a22[_0xa0db('0x20')]],'as':_0x4e9a22['as'],'attributes':_0x4e9a22[_0xa0db('0x1d')],'include':_0x4e9a22[_0xa0db('0x1e')]?_[_0xa0db('0x1f')](_0x4e9a22[_0xa0db('0x1e')],function(_0x362c30){return{'model':db[_0x362c30[_0xa0db('0x20')]],'as':_0x362c30['as'],'attributes':_0x362c30[_0xa0db('0x1d')],'include':_0x362c30[_0xa0db('0x1e')]?_[_0xa0db('0x1f')](_0x362c30['include'],function(_0x3652a1){return{'model':db[_0x3652a1[_0xa0db('0x20')]],'as':_0x3652a1['as'],'attributes':_0x3652a1[_0xa0db('0x1d')]};}):[]};}):[]};}):[]:[]})[_0xa0db('0xd')](function(_0xe3372c){logger[_0xa0db('0xe')](_0xa0db('0x18'),_0x215658);logger[_0xa0db('0x10')](_0xa0db('0x18'),_0x215658,JSON[_0xa0db('0x11')](_0xe3372c));_0x12766f(_0xe3372c);})[_0xa0db('0x17')](function(_0x3a3dba){logger[_0xa0db('0x12')](_0xa0db('0x18'),_0x3a3dba[_0xa0db('0x15')],_0x215658);_0x2786ae(_0x4be2e2[_0xa0db('0x12')](0x1f4,_0x3a3dba[_0xa0db('0x15')]));});});}; \ No newline at end of file +var _0x9234=['randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','then','info','request\x20sent','debug','Campaign,\x20%s,\x20%s,\x20%s','stringify','error','code','Campaign,\x20%s,\x20%s','message','result','catch','GetCampaign','findAll','options','raw','where','attributes','map','include','model','lodash','moment','bluebird'];(function(_0x44ed4f,_0xbeef66){var _0x30d2e0=function(_0x816a0e){while(--_0x816a0e){_0x44ed4f['push'](_0x44ed4f['shift']());}};_0x30d2e0(++_0xbeef66);}(_0x9234,0x1bd));var _0x4923=function(_0x1c0991,_0x4f22d2){_0x1c0991=_0x1c0991-0x0;var _0x5034de=_0x9234[_0x1c0991];return _0x5034de;};'use strict';var _=require(_0x4923('0x0'));var util=require('util');var moment=require(_0x4923('0x1'));var BPromise=require(_0x4923('0x2'));var rs=require(_0x4923('0x3'));var fs=require('fs');var Redis=require(_0x4923('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x4923('0x5'));var logger=require(_0x4923('0x6'))('rpc');var config=require(_0x4923('0x7'));var jayson=require(_0x4923('0x8'));var client=jayson[_0x4923('0x9')][_0x4923('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x17b854,_0x133b0d,_0x2de396){return new BPromise(function(_0x548676,_0x1fffc2){return client['request'](_0x17b854,_0x2de396)[_0x4923('0xb')](function(_0x2c4057){logger[_0x4923('0xc')]('Campaign,\x20%s,\x20%s',_0x133b0d,_0x4923('0xd'));logger[_0x4923('0xe')](_0x4923('0xf'),_0x133b0d,_0x4923('0xd'),JSON[_0x4923('0x10')](_0x2c4057));if(_0x2c4057[_0x4923('0x11')]){if(_0x2c4057[_0x4923('0x11')][_0x4923('0x12')]===0x1f4){logger[_0x4923('0x11')](_0x4923('0x13'),_0x133b0d,_0x2c4057['error']['message']);return _0x1fffc2(_0x2c4057[_0x4923('0x11')][_0x4923('0x14')]);}logger[_0x4923('0x11')]('Campaign,\x20%s,\x20%s',_0x133b0d,_0x2c4057[_0x4923('0x11')][_0x4923('0x14')]);return _0x548676(_0x2c4057[_0x4923('0x11')][_0x4923('0x14')]);}else{logger[_0x4923('0xc')](_0x4923('0x13'),_0x133b0d,_0x4923('0xd'));_0x548676(_0x2c4057[_0x4923('0x15')][_0x4923('0x14')]);}})[_0x4923('0x16')](function(_0x559e4a){logger[_0x4923('0x11')](_0x4923('0x13'),_0x133b0d,_0x559e4a);_0x1fffc2(_0x559e4a);});});}exports[_0x4923('0x17')]=function(_0x1be04d){var _0x517b95=this;return new Promise(function(_0x50fd18,_0x16955b){return db['Campaign'][_0x4923('0x18')]({'raw':_0x1be04d[_0x4923('0x19')]?_0x1be04d['options'][_0x4923('0x1a')]===undefined?!![]:![]:!![],'where':_0x1be04d[_0x4923('0x19')]?_0x1be04d[_0x4923('0x19')][_0x4923('0x1b')]||null:null,'attributes':_0x1be04d['options']?_0x1be04d[_0x4923('0x19')][_0x4923('0x1c')]||null:null,'limit':_0x1be04d['options']?_0x1be04d[_0x4923('0x19')]['limit']||null:null,'include':_0x1be04d[_0x4923('0x19')]?_0x1be04d[_0x4923('0x19')]['include']?_[_0x4923('0x1d')](_0x1be04d[_0x4923('0x19')][_0x4923('0x1e')],function(_0x161cf9){return{'model':db[_0x161cf9[_0x4923('0x1f')]],'as':_0x161cf9['as'],'attributes':_0x161cf9[_0x4923('0x1c')],'include':_0x161cf9[_0x4923('0x1e')]?_['map'](_0x161cf9['include'],function(_0x23ec97){return{'model':db[_0x23ec97[_0x4923('0x1f')]],'as':_0x23ec97['as'],'attributes':_0x23ec97[_0x4923('0x1c')],'include':_0x23ec97[_0x4923('0x1e')]?_[_0x4923('0x1d')](_0x23ec97[_0x4923('0x1e')],function(_0x13681b){return{'model':db[_0x13681b[_0x4923('0x1f')]],'as':_0x13681b['as'],'attributes':_0x13681b[_0x4923('0x1c')]};}):[]};}):[]};}):[]:[]})[_0x4923('0xb')](function(_0x3a7852){logger['info'](_0x4923('0x17'),_0x1be04d);logger[_0x4923('0xe')](_0x4923('0x17'),_0x1be04d,JSON[_0x4923('0x10')](_0x3a7852));_0x50fd18(_0x3a7852);})[_0x4923('0x16')](function(_0x47158c){logger[_0x4923('0x11')](_0x4923('0x17'),_0x47158c[_0x4923('0x14')],_0x1be04d);_0x16955b(_0x517b95[_0x4923('0x11')](0x1f4,_0x47158c[_0x4923('0x14')]));});});}; \ No newline at end of file diff --git a/server/api/campaign/index.js b/server/api/campaign/index.js index c6bc937..5591160 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 _0x397a=['show','/:id/hoppers','getHoppers','/:id/hopper_histories','/:id/hopper_finals','getHopperFinals','/:id/hopper_black','getHopperBlacks','/:id/lists','post','/:id/clone','clone','/:id/blacklists','addBlackLists','put','update','delete','destroy','removeLists','removeBlackLists','exports','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','index','/:id','isAuthenticated'];(function(_0x320873,_0xd3cc15){var _0x45ef1b=function(_0x335a0c){while(--_0x335a0c){_0x320873['push'](_0x320873['shift']());}};_0x45ef1b(++_0xd3cc15);}(_0x397a,0x9d));var _0xa397=function(_0x244bc4,_0x2b463d){_0x244bc4=_0x244bc4-0x0;var _0x33a9a6=_0x397a[_0x244bc4];return _0x33a9a6;};'use strict';var multer=require(_0xa397('0x0'));var util=require(_0xa397('0x1'));var path=require(_0xa397('0x2'));var timeout=require(_0xa397('0x3'));var express=require('express');var router=express[_0xa397('0x4')]();var fs_extra=require(_0xa397('0x5'));var auth=require(_0xa397('0x6'));var interaction=require(_0xa397('0x7'));var config=require(_0xa397('0x8'));var controller=require('./campaign.controller');router[_0xa397('0x9')]('/',auth['isAuthenticated'](),controller[_0xa397('0xa')]);router[_0xa397('0x9')](_0xa397('0xb'),auth[_0xa397('0xc')](),controller[_0xa397('0xd')]);router[_0xa397('0x9')](_0xa397('0xe'),auth[_0xa397('0xc')](),controller[_0xa397('0xf')]);router[_0xa397('0x9')](_0xa397('0x10'),auth[_0xa397('0xc')](),controller['getHopperHistories']);router[_0xa397('0x9')](_0xa397('0x11'),auth[_0xa397('0xc')](),controller[_0xa397('0x12')]);router['get'](_0xa397('0x13'),auth[_0xa397('0xc')](),controller[_0xa397('0x14')]);router['get'](_0xa397('0x15'),auth[_0xa397('0xc')](),controller['getLists']);router[_0xa397('0x9')]('/:id/blacklists',auth[_0xa397('0xc')](),controller['getBlackLists']);router['post']('/',auth[_0xa397('0xc')](),controller['create']);router[_0xa397('0x16')](_0xa397('0x17'),auth[_0xa397('0xc')](),controller[_0xa397('0x18')]);router['post'](_0xa397('0x15'),auth['isAuthenticated'](),controller['addLists']);router[_0xa397('0x16')](_0xa397('0x19'),auth[_0xa397('0xc')](),controller[_0xa397('0x1a')]);router[_0xa397('0x1b')](_0xa397('0xb'),auth[_0xa397('0xc')](),controller[_0xa397('0x1c')]);router[_0xa397('0x1d')](_0xa397('0xb'),auth['isAuthenticated'](),controller[_0xa397('0x1e')]);router[_0xa397('0x1d')](_0xa397('0x15'),auth[_0xa397('0xc')](),controller[_0xa397('0x1f')]);router[_0xa397('0x1d')]('/:id/blacklists',auth[_0xa397('0xc')](),controller[_0xa397('0x20')]);module[_0xa397('0x21')]=router; \ No newline at end of file +var _0x970a=['/:id/hopper_black','getHopperBlacks','/:id/lists','post','create','clone','addLists','/:id/blacklists','addBlackLists','put','update','delete','destroy','removeLists','removeBlackLists','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./campaign.controller','get','isAuthenticated','index','/:id','show','getHoppers','/:id/hopper_histories','getHopperHistories','/:id/hopper_finals','getHopperFinals'];(function(_0x491755,_0x3eae25){var _0x21650e=function(_0x4dcc72){while(--_0x4dcc72){_0x491755['push'](_0x491755['shift']());}};_0x21650e(++_0x3eae25);}(_0x970a,0xee));var _0xa970=function(_0x342700,_0x569f75){_0x342700=_0x342700-0x0;var _0x53406f=_0x970a[_0x342700];return _0x53406f;};'use strict';var multer=require(_0xa970('0x0'));var util=require(_0xa970('0x1'));var path=require(_0xa970('0x2'));var timeout=require(_0xa970('0x3'));var express=require(_0xa970('0x4'));var router=express[_0xa970('0x5')]();var fs_extra=require(_0xa970('0x6'));var auth=require(_0xa970('0x7'));var interaction=require(_0xa970('0x8'));var config=require(_0xa970('0x9'));var controller=require(_0xa970('0xa'));router[_0xa970('0xb')]('/',auth[_0xa970('0xc')](),controller[_0xa970('0xd')]);router[_0xa970('0xb')](_0xa970('0xe'),auth['isAuthenticated'](),controller[_0xa970('0xf')]);router[_0xa970('0xb')]('/:id/hoppers',auth['isAuthenticated'](),controller[_0xa970('0x10')]);router[_0xa970('0xb')](_0xa970('0x11'),auth[_0xa970('0xc')](),controller[_0xa970('0x12')]);router[_0xa970('0xb')](_0xa970('0x13'),auth[_0xa970('0xc')](),controller[_0xa970('0x14')]);router[_0xa970('0xb')](_0xa970('0x15'),auth[_0xa970('0xc')](),controller[_0xa970('0x16')]);router['get'](_0xa970('0x17'),auth[_0xa970('0xc')](),controller['getLists']);router[_0xa970('0xb')]('/:id/blacklists',auth[_0xa970('0xc')](),controller['getBlackLists']);router[_0xa970('0x18')]('/',auth[_0xa970('0xc')](),controller[_0xa970('0x19')]);router[_0xa970('0x18')]('/:id/clone',auth[_0xa970('0xc')](),controller[_0xa970('0x1a')]);router[_0xa970('0x18')](_0xa970('0x17'),auth[_0xa970('0xc')](),controller[_0xa970('0x1b')]);router[_0xa970('0x18')](_0xa970('0x1c'),auth['isAuthenticated'](),controller[_0xa970('0x1d')]);router[_0xa970('0x1e')](_0xa970('0xe'),auth[_0xa970('0xc')](),controller[_0xa970('0x1f')]);router[_0xa970('0x20')](_0xa970('0xe'),auth['isAuthenticated'](),controller[_0xa970('0x21')]);router[_0xa970('0x20')](_0xa970('0x17'),auth[_0xa970('0xc')](),controller[_0xa970('0x22')]);router['delete']('/:id/blacklists',auth[_0xa970('0xc')](),controller[_0xa970('0x23')]);module[_0xa970('0x24')]=router; \ No newline at end of file diff --git a/server/api/cannedAnswer/cannedAnswer.attributes.js b/server/api/cannedAnswer/cannedAnswer.attributes.js index 010aa06..16d1dcb 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 _0xe83c=['getDataValue','key','sequelize','exports','STRING','VIRTUAL'];(function(_0x5f2f38,_0xdd5a01){var _0x72c1c7=function(_0x32ace1){while(--_0x32ace1){_0x5f2f38['push'](_0x5f2f38['shift']());}};_0x72c1c7(++_0xdd5a01);}(_0xe83c,0xe0));var _0xce83=function(_0x27638d,_0x4094db){_0x27638d=_0x27638d-0x0;var _0x35da35=_0xe83c[_0x27638d];return _0x35da35;};'use strict';var Sequelize=require(_0xce83('0x0'));module[_0xce83('0x1')]={'key':{'type':Sequelize[_0xce83('0x2')],'allowNull':![]},'value':{'type':Sequelize['TEXT'],'allowNull':![]},'description':{'type':Sequelize[_0xce83('0x2')]},'name':{'type':Sequelize[_0xce83('0x3')],'get':function(){return this[_0xce83('0x4')](_0xce83('0x5'));}}}; \ No newline at end of file +var _0xe389=['getDataValue','sequelize','TEXT','VIRTUAL'];(function(_0x1ca705,_0x2d3c9d){var _0x339a9d=function(_0x4b44b3){while(--_0x4b44b3){_0x1ca705['push'](_0x1ca705['shift']());}};_0x339a9d(++_0x2d3c9d);}(_0xe389,0x91));var _0x9e38=function(_0x288447,_0x42347b){_0x288447=_0x288447-0x0;var _0x2106e6=_0xe389[_0x288447];return _0x2106e6;};'use strict';var Sequelize=require(_0x9e38('0x0'));module['exports']={'key':{'type':Sequelize['STRING'],'allowNull':![]},'value':{'type':Sequelize[_0x9e38('0x1')],'allowNull':![]},'description':{'type':Sequelize['STRING']},'name':{'type':Sequelize[_0x9e38('0x2')],'get':function(){return this[_0x9e38('0x3')]('key');}}}; \ No newline at end of file diff --git a/server/api/cannedAnswer/cannedAnswer.controller.js b/server/api/cannedAnswer/cannedAnswer.controller.js index 4846081..3d44e56 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 _0x81c4=['model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','includeAll','include','findAll','rows','catch','show','params','find','body','destroy','create','MailAccountId','SmsAccountId','OpenchannelAccountId','ChatWebsiteId','Sequelize','ValidationError','The\x20inserted\x20key\x20already\x20exists.','user','get','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','eml-format','rimraf','request-promise','bluebird','util','sox','ejs','fs-extra','lodash','squel','crypto','desk.js','to-csv','querystring','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','offset','undefined','limit','count','set','Content-Range','json','apply','reject','save','update','then','CannedAnswers','UserProfileResource','error','stack','name','send','index','map','CannedAnswer','rawAttributes','type','key'];(function(_0x1f5520,_0x570d15){var _0x5b5836=function(_0x209e36){while(--_0x209e36){_0x1f5520['push'](_0x1f5520['shift']());}};_0x5b5836(++_0x570d15);}(_0x81c4,0x136));var _0x481c=function(_0x3947c9,_0x4d6c97){_0x3947c9=_0x3947c9-0x0;var _0x2e7871=_0x81c4[_0x3947c9];return _0x2e7871;};'use strict';var emlformat=require(_0x481c('0x0'));var rimraf=require(_0x481c('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x481c('0x2'));var moment=require('moment');var BPromise=require(_0x481c('0x3'));var Mustache=require('mustache');var util=require(_0x481c('0x4'));var path=require('path');var sox=require(_0x481c('0x5'));var csv=require('to-csv');var ejs=require(_0x481c('0x6'));var fs=require('fs');var fs_extra=require(_0x481c('0x7'));var _=require(_0x481c('0x8'));var squel=require(_0x481c('0x9'));var crypto=require(_0x481c('0xa'));var jsforce=require('jsforce');var deskjs=require(_0x481c('0xb'));var toCsv=require(_0x481c('0xc'));var querystring=require(_0x481c('0xd'));var Papa=require('papaparse');var Redis=require(_0x481c('0xe'));var authService=require('../../components/auth/service');var qs=require(_0x481c('0xf'));var as=require(_0x481c('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x481c('0x11'))(_0x481c('0x12'));var utils=require(_0x481c('0x13'));var config=require(_0x481c('0x14'));var licenseUtil=require(_0x481c('0x15'));var db=require(_0x481c('0x16'))['db'];function respondWithStatusCode(_0x39e142,_0x51ddd5){_0x51ddd5=_0x51ddd5||0xcc;return function(_0x272d24){if(_0x272d24){return _0x39e142[_0x481c('0x17')](_0x51ddd5);}return _0x39e142[_0x481c('0x18')](_0x51ddd5)[_0x481c('0x19')]();};}function respondWithResult(_0x4a5f24,_0x204175){_0x204175=_0x204175||0xc8;return function(_0x23199e){if(_0x23199e){return _0x4a5f24[_0x481c('0x18')](_0x204175)['json'](_0x23199e);}};}function respondWithFilteredResult(_0x4606bd,_0x14852f){return function(_0x1dcdfc){if(_0x1dcdfc){var _0x20f533=typeof _0x14852f[_0x481c('0x1a')]===_0x481c('0x1b')&&typeof _0x14852f[_0x481c('0x1c')]==='undefined';var _0x538344=_0x1dcdfc[_0x481c('0x1d')];var _0xc640b5=_0x20f533?0x0:_0x14852f['offset'];var _0x4fb751=_0x20f533?_0x1dcdfc[_0x481c('0x1d')]:_0x14852f['offset']+_0x14852f[_0x481c('0x1c')];var _0x16148d;if(_0x4fb751>=_0x538344){_0x4fb751=_0x538344;_0x16148d=0xc8;}else{_0x16148d=0xce;}_0x4606bd[_0x481c('0x18')](_0x16148d);return _0x4606bd[_0x481c('0x1e')](_0x481c('0x1f'),_0xc640b5+'-'+_0x4fb751+'/'+_0x538344)[_0x481c('0x20')](_0x1dcdfc);}return null;};}function patchUpdates(_0x15b43d){return function(_0x2fa534){try{jsonpatch[_0x481c('0x21')](_0x2fa534,_0x15b43d,!![]);}catch(_0x3deb8b){return BPromise[_0x481c('0x22')](_0x3deb8b);}return _0x2fa534[_0x481c('0x23')]();};}function saveUpdates(_0x360556,_0x5e4c75){return function(_0x4d360d){if(_0x4d360d){return _0x4d360d[_0x481c('0x24')](_0x360556)['then'](function(_0x7c98b0){return _0x7c98b0;});}return null;};}function removeEntity(_0x3e30f9,_0x9f483d){return function(_0x1b7c91){if(_0x1b7c91){return _0x1b7c91['destroy']()[_0x481c('0x25')](function(){var _0x50c5dc=_0x1b7c91['get']({'plain':!![]});var _0x10b0ff=_0x481c('0x26');return db[_0x481c('0x27')]['destroy']({'where':{'type':_0x10b0ff,'resourceId':_0x50c5dc['id']}})['then'](function(){return _0x1b7c91;});})[_0x481c('0x25')](function(){_0x3e30f9[_0x481c('0x18')](0xcc)[_0x481c('0x19')]();});}};}function handleEntityNotFound(_0xbfc10c,_0x28c621){return function(_0x242d64){if(!_0x242d64){_0xbfc10c[_0x481c('0x17')](0x194);}return _0x242d64;};}function handleError(_0x26e14e,_0x8af340){_0x8af340=_0x8af340||0x1f4;return function(_0x1dc655){logger[_0x481c('0x28')](_0x1dc655[_0x481c('0x29')]);if(_0x1dc655[_0x481c('0x2a')]){delete _0x1dc655[_0x481c('0x2a')];}_0x26e14e['status'](_0x8af340)[_0x481c('0x2b')](_0x1dc655);};}exports[_0x481c('0x2c')]=function(_0x272a4f,_0x46efef){var _0x70e55a={},_0x2d7f86={},_0x3f6842={'count':0x0,'rows':[]};var _0x2aac76=_[_0x481c('0x2d')](db[_0x481c('0x2e')][_0x481c('0x2f')],function(_0x7c572){return{'name':_0x7c572['fieldName'],'type':_0x7c572[_0x481c('0x30')][_0x481c('0x31')]};});_0x2d7f86[_0x481c('0x32')]=_[_0x481c('0x2d')](_0x2aac76,'name');_0x2d7f86[_0x481c('0x33')]=_[_0x481c('0x34')](_0x272a4f[_0x481c('0x33')]);_0x2d7f86[_0x481c('0x35')]=_[_0x481c('0x36')](_0x2d7f86[_0x481c('0x32')],_0x2d7f86[_0x481c('0x33')]);_0x70e55a[_0x481c('0x37')]=_[_0x481c('0x36')](_0x2d7f86[_0x481c('0x32')],qs[_0x481c('0x38')](_0x272a4f[_0x481c('0x33')][_0x481c('0x38')]));_0x70e55a['attributes']=_0x70e55a[_0x481c('0x37')][_0x481c('0x39')]?_0x70e55a[_0x481c('0x37')]:_0x2d7f86[_0x481c('0x32')];if(!_0x272a4f[_0x481c('0x33')][_0x481c('0x3a')](_0x481c('0x3b'))){_0x70e55a[_0x481c('0x1c')]=qs[_0x481c('0x1c')](_0x272a4f[_0x481c('0x33')][_0x481c('0x1c')]);_0x70e55a[_0x481c('0x1a')]=qs[_0x481c('0x1a')](_0x272a4f[_0x481c('0x33')][_0x481c('0x1a')]);}_0x70e55a[_0x481c('0x3c')]=qs[_0x481c('0x3d')](_0x272a4f[_0x481c('0x33')]['sort']);_0x70e55a[_0x481c('0x3e')]=qs['filters'](_[_0x481c('0x3f')](_0x272a4f[_0x481c('0x33')],_0x2d7f86[_0x481c('0x35')]),_0x2aac76);if(_0x272a4f[_0x481c('0x33')][_0x481c('0x40')]){_0x70e55a[_0x481c('0x3e')]=_[_0x481c('0x41')](_0x70e55a['where'],{'$or':[{'key':{'$like':'%'+_0x272a4f[_0x481c('0x33')][_0x481c('0x40')]+'%'}},{'value':{'$like':'%'+_0x272a4f['query'][_0x481c('0x40')]+'%'}}]});}_0x70e55a=_[_0x481c('0x41')]({},_0x70e55a,_0x272a4f['options']);var _0xa1e7cb={'where':_0x70e55a[_0x481c('0x3e')]};return db['CannedAnswer'][_0x481c('0x1d')](_0xa1e7cb)[_0x481c('0x25')](function(_0x59184d){_0x3f6842['count']=_0x59184d;if(_0x272a4f[_0x481c('0x33')][_0x481c('0x42')]){_0x70e55a[_0x481c('0x43')]=[{'all':!![]}];}return db[_0x481c('0x2e')][_0x481c('0x44')](_0x70e55a);})[_0x481c('0x25')](function(_0x347c98){_0x3f6842[_0x481c('0x45')]=_0x347c98;return _0x3f6842;})[_0x481c('0x25')](respondWithFilteredResult(_0x46efef,_0x70e55a))[_0x481c('0x46')](handleError(_0x46efef,null));};exports[_0x481c('0x47')]=function(_0x2e0c24,_0x43f659){var _0x503eed={'raw':!![],'where':{'id':_0x2e0c24[_0x481c('0x48')]['id']}},_0x4a4b9a={};_0x4a4b9a[_0x481c('0x32')]=_[_0x481c('0x34')](db['CannedAnswer'][_0x481c('0x2f')]);_0x4a4b9a[_0x481c('0x33')]=_[_0x481c('0x34')](_0x2e0c24['query']);_0x4a4b9a[_0x481c('0x35')]=_[_0x481c('0x36')](_0x4a4b9a[_0x481c('0x32')],_0x4a4b9a[_0x481c('0x33')]);_0x503eed['attributes']=_[_0x481c('0x36')](_0x4a4b9a[_0x481c('0x32')],qs[_0x481c('0x38')](_0x2e0c24[_0x481c('0x33')][_0x481c('0x38')]));_0x503eed[_0x481c('0x37')]=_0x503eed[_0x481c('0x37')][_0x481c('0x39')]?_0x503eed[_0x481c('0x37')]:_0x4a4b9a['model'];if(_0x2e0c24[_0x481c('0x33')][_0x481c('0x42')]){_0x503eed[_0x481c('0x43')]=[{'all':!![]}];}_0x503eed=_[_0x481c('0x41')]({},_0x503eed,_0x2e0c24['options']);return db[_0x481c('0x2e')][_0x481c('0x49')](_0x503eed)['then'](handleEntityNotFound(_0x43f659,null))['then'](respondWithResult(_0x43f659,null))[_0x481c('0x46')](handleError(_0x43f659,null));};exports[_0x481c('0x24')]=function(_0x2c414e,_0xe009fd){if(_0x2c414e['body']['id']){delete _0x2c414e[_0x481c('0x4a')]['id'];}return db[_0x481c('0x2e')][_0x481c('0x49')]({'where':{'id':_0x2c414e[_0x481c('0x48')]['id']}})[_0x481c('0x25')](handleEntityNotFound(_0xe009fd,null))['then'](saveUpdates(_0x2c414e[_0x481c('0x4a')],null))['then'](respondWithResult(_0xe009fd,null))['catch'](handleError(_0xe009fd,null));};exports[_0x481c('0x4b')]=function(_0x396b97,_0x1885bd){return db[_0x481c('0x2e')][_0x481c('0x49')]({'where':{'id':_0x396b97['params']['id']}})[_0x481c('0x25')](handleEntityNotFound(_0x1885bd,null))['then'](removeEntity(_0x1885bd,null))['catch'](handleError(_0x1885bd,null));};exports[_0x481c('0x4c')]=function(_0x5d1938,_0x4e1b36){var _0xc13ddf={'key':_0x5d1938[_0x481c('0x4a')][_0x481c('0x31')]};if(_0x5d1938['body'][_0x481c('0x4d')]){_0xc13ddf['MailAccountId']=_0x5d1938[_0x481c('0x4a')]['MailAccountId'];}else if(_0x5d1938[_0x481c('0x4a')][_0x481c('0x4e')]){_0xc13ddf[_0x481c('0x4e')]=_0x5d1938['body'][_0x481c('0x4e')];}else if(_0x5d1938[_0x481c('0x4a')][_0x481c('0x4f')]){_0xc13ddf[_0x481c('0x4f')]=_0x5d1938['body'][_0x481c('0x4f')];}else if(_0x5d1938['body'][_0x481c('0x50')]){_0xc13ddf[_0x481c('0x50')]=_0x5d1938[_0x481c('0x4a')][_0x481c('0x50')];}return db[_0x481c('0x2e')]['find']({'where':_0xc13ddf})[_0x481c('0x25')](function(_0x3548fa){if(_0x3548fa){throw new db[(_0x481c('0x51'))][(_0x481c('0x52'))](_0x481c('0x53'));}return db[_0x481c('0x2e')][_0x481c('0x4c')](_0x5d1938[_0x481c('0x4a')]);})['then'](function(_0x333cac){var _0x4c9fba=_0x5d1938[_0x481c('0x54')][_0x481c('0x55')]({'plain':!![]});if(!_0x4c9fba)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x4c9fba['role']===_0x481c('0x54')){var _0x470e56=_0x333cac[_0x481c('0x55')]({'plain':!![]});return db[_0x481c('0x56')][_0x481c('0x49')]({'where':{'name':'CannedAnswers','userProfileId':_0x4c9fba[_0x481c('0x57')]},'raw':!![]})['then'](function(_0x509922){if(_0x509922&&_0x509922[_0x481c('0x58')]===0x0){return db[_0x481c('0x27')][_0x481c('0x4c')]({'name':_0x470e56[_0x481c('0x2a')],'resourceId':_0x470e56['id'],'type':_0x509922[_0x481c('0x2a')],'sectionId':_0x509922['id']},{})[_0x481c('0x25')](function(){return _0x333cac;});}else{return _0x333cac;}})[_0x481c('0x46')](function(_0x3e26fd){logger[_0x481c('0x28')](_0x481c('0x59'),_0x3e26fd);throw _0x3e26fd;});}return _0x333cac;})[_0x481c('0x25')](respondWithResult(_0x4e1b36,0xc9))[_0x481c('0x46')](handleError(_0x4e1b36,null));}; \ No newline at end of file +var _0x4a88=['../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','then','destroy','get','CannedAnswers','UserProfileResource','error','stack','name','send','rawAttributes','fieldName','type','key','model','map','query','keys','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','merge','options','CannedAnswer','includeAll','include','findAll','rows','catch','show','params','length','find','update','body','create','MailAccountId','SmsAccountId','OpenchannelAccountId','ChatWebsiteId','Sequelize','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger'];(function(_0x437652,_0x4bd3a2){var _0x386db0=function(_0x41568f){while(--_0x41568f){_0x437652['push'](_0x437652['shift']());}};_0x386db0(++_0x4bd3a2);}(_0x4a88,0x1ad));var _0x84a8=function(_0xff1e06,_0xdeec29){_0xff1e06=_0xff1e06-0x0;var _0x3590ce=_0x4a88[_0xff1e06];return _0x3590ce;};'use strict';var emlformat=require(_0x84a8('0x0'));var rimraf=require(_0x84a8('0x1'));var zipdir=require(_0x84a8('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x84a8('0x3'));var moment=require(_0x84a8('0x4'));var BPromise=require(_0x84a8('0x5'));var Mustache=require(_0x84a8('0x6'));var util=require(_0x84a8('0x7'));var path=require('path');var sox=require('sox');var csv=require(_0x84a8('0x8'));var ejs=require(_0x84a8('0x9'));var fs=require('fs');var fs_extra=require(_0x84a8('0xa'));var _=require(_0x84a8('0xb'));var squel=require(_0x84a8('0xc'));var crypto=require(_0x84a8('0xd'));var jsforce=require('jsforce');var deskjs=require(_0x84a8('0xe'));var toCsv=require(_0x84a8('0x8'));var querystring=require(_0x84a8('0xf'));var Papa=require(_0x84a8('0x10'));var Redis=require(_0x84a8('0x11'));var authService=require('../../components/auth/service');var qs=require(_0x84a8('0x12'));var as=require(_0x84a8('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x84a8('0x14'))('api');var utils=require(_0x84a8('0x15'));var config=require(_0x84a8('0x16'));var licenseUtil=require(_0x84a8('0x17'));var db=require(_0x84a8('0x18'))['db'];function respondWithStatusCode(_0x1c2f81,_0x4f4576){_0x4f4576=_0x4f4576||0xcc;return function(_0x292aec){if(_0x292aec){return _0x1c2f81[_0x84a8('0x19')](_0x4f4576);}return _0x1c2f81[_0x84a8('0x1a')](_0x4f4576)[_0x84a8('0x1b')]();};}function respondWithResult(_0x34367e,_0x1c0467){_0x1c0467=_0x1c0467||0xc8;return function(_0x50fc59){if(_0x50fc59){return _0x34367e[_0x84a8('0x1a')](_0x1c0467)[_0x84a8('0x1c')](_0x50fc59);}};}function respondWithFilteredResult(_0x28dca6,_0x40d01f){return function(_0x3bea38){if(_0x3bea38){var _0x2b419a=typeof _0x40d01f[_0x84a8('0x1d')]===_0x84a8('0x1e')&&typeof _0x40d01f[_0x84a8('0x1f')]==='undefined';var _0xd6c27a=_0x3bea38[_0x84a8('0x20')];var _0x15f8a1=_0x2b419a?0x0:_0x40d01f[_0x84a8('0x1d')];var _0x220fb2=_0x2b419a?_0x3bea38[_0x84a8('0x20')]:_0x40d01f[_0x84a8('0x1d')]+_0x40d01f[_0x84a8('0x1f')];var _0x1eaace;if(_0x220fb2>=_0xd6c27a){_0x220fb2=_0xd6c27a;_0x1eaace=0xc8;}else{_0x1eaace=0xce;}_0x28dca6[_0x84a8('0x1a')](_0x1eaace);return _0x28dca6[_0x84a8('0x21')](_0x84a8('0x22'),_0x15f8a1+'-'+_0x220fb2+'/'+_0xd6c27a)[_0x84a8('0x1c')](_0x3bea38);}return null;};}function patchUpdates(_0x267ca3){return function(_0x2edd87){try{jsonpatch[_0x84a8('0x23')](_0x2edd87,_0x267ca3,!![]);}catch(_0x2ef40b){return BPromise['reject'](_0x2ef40b);}return _0x2edd87['save']();};}function saveUpdates(_0x3c617c,_0x11ac4e){return function(_0x42dca3){if(_0x42dca3){return _0x42dca3['update'](_0x3c617c)[_0x84a8('0x24')](function(_0x4a8b50){return _0x4a8b50;});}return null;};}function removeEntity(_0x1f1b83,_0x1bc095){return function(_0x2e2443){if(_0x2e2443){return _0x2e2443[_0x84a8('0x25')]()[_0x84a8('0x24')](function(){var _0x10608e=_0x2e2443[_0x84a8('0x26')]({'plain':!![]});var _0x1393b5=_0x84a8('0x27');return db[_0x84a8('0x28')]['destroy']({'where':{'type':_0x1393b5,'resourceId':_0x10608e['id']}})[_0x84a8('0x24')](function(){return _0x2e2443;});})[_0x84a8('0x24')](function(){_0x1f1b83[_0x84a8('0x1a')](0xcc)[_0x84a8('0x1b')]();});}};}function handleEntityNotFound(_0x2b111d,_0x394f68){return function(_0x514509){if(!_0x514509){_0x2b111d[_0x84a8('0x19')](0x194);}return _0x514509;};}function handleError(_0x468356,_0x46cba6){_0x46cba6=_0x46cba6||0x1f4;return function(_0x4528b9){logger[_0x84a8('0x29')](_0x4528b9[_0x84a8('0x2a')]);if(_0x4528b9[_0x84a8('0x2b')]){delete _0x4528b9[_0x84a8('0x2b')];}_0x468356[_0x84a8('0x1a')](_0x46cba6)[_0x84a8('0x2c')](_0x4528b9);};}exports['index']=function(_0x568704,_0x69d57){var _0x317585={},_0x35b1cb={},_0x4703ed={'count':0x0,'rows':[]};var _0x452d7f=_['map'](db['CannedAnswer'][_0x84a8('0x2d')],function(_0xa97fec){return{'name':_0xa97fec[_0x84a8('0x2e')],'type':_0xa97fec[_0x84a8('0x2f')][_0x84a8('0x30')]};});_0x35b1cb[_0x84a8('0x31')]=_[_0x84a8('0x32')](_0x452d7f,_0x84a8('0x2b'));_0x35b1cb[_0x84a8('0x33')]=_[_0x84a8('0x34')](_0x568704[_0x84a8('0x33')]);_0x35b1cb['filters']=_[_0x84a8('0x35')](_0x35b1cb[_0x84a8('0x31')],_0x35b1cb[_0x84a8('0x33')]);_0x317585[_0x84a8('0x36')]=_['intersection'](_0x35b1cb[_0x84a8('0x31')],qs[_0x84a8('0x37')](_0x568704[_0x84a8('0x33')][_0x84a8('0x37')]));_0x317585[_0x84a8('0x36')]=_0x317585[_0x84a8('0x36')]['length']?_0x317585['attributes']:_0x35b1cb[_0x84a8('0x31')];if(!_0x568704[_0x84a8('0x33')][_0x84a8('0x38')](_0x84a8('0x39'))){_0x317585['limit']=qs[_0x84a8('0x1f')](_0x568704[_0x84a8('0x33')][_0x84a8('0x1f')]);_0x317585['offset']=qs[_0x84a8('0x1d')](_0x568704[_0x84a8('0x33')]['offset']);}_0x317585[_0x84a8('0x3a')]=qs[_0x84a8('0x3b')](_0x568704['query'][_0x84a8('0x3b')]);_0x317585[_0x84a8('0x3c')]=qs[_0x84a8('0x3d')](_[_0x84a8('0x3e')](_0x568704['query'],_0x35b1cb[_0x84a8('0x3d')]),_0x452d7f);if(_0x568704[_0x84a8('0x33')][_0x84a8('0x3f')]){_0x317585[_0x84a8('0x3c')]=_[_0x84a8('0x40')](_0x317585['where'],{'$or':[{'key':{'$like':'%'+_0x568704['query']['filter']+'%'}},{'value':{'$like':'%'+_0x568704[_0x84a8('0x33')][_0x84a8('0x3f')]+'%'}}]});}_0x317585=_[_0x84a8('0x40')]({},_0x317585,_0x568704[_0x84a8('0x41')]);var _0x9180bc={'where':_0x317585[_0x84a8('0x3c')]};return db[_0x84a8('0x42')][_0x84a8('0x20')](_0x9180bc)[_0x84a8('0x24')](function(_0x2d978f){_0x4703ed[_0x84a8('0x20')]=_0x2d978f;if(_0x568704['query'][_0x84a8('0x43')]){_0x317585[_0x84a8('0x44')]=[{'all':!![]}];}return db['CannedAnswer'][_0x84a8('0x45')](_0x317585);})['then'](function(_0x2df82d){_0x4703ed[_0x84a8('0x46')]=_0x2df82d;return _0x4703ed;})[_0x84a8('0x24')](respondWithFilteredResult(_0x69d57,_0x317585))[_0x84a8('0x47')](handleError(_0x69d57,null));};exports[_0x84a8('0x48')]=function(_0x2b5f1e,_0x321117){var _0x140e1e={'raw':!![],'where':{'id':_0x2b5f1e[_0x84a8('0x49')]['id']}},_0x36a918={};_0x36a918[_0x84a8('0x31')]=_[_0x84a8('0x34')](db[_0x84a8('0x42')][_0x84a8('0x2d')]);_0x36a918[_0x84a8('0x33')]=_['keys'](_0x2b5f1e[_0x84a8('0x33')]);_0x36a918[_0x84a8('0x3d')]=_[_0x84a8('0x35')](_0x36a918[_0x84a8('0x31')],_0x36a918['query']);_0x140e1e[_0x84a8('0x36')]=_['intersection'](_0x36a918[_0x84a8('0x31')],qs[_0x84a8('0x37')](_0x2b5f1e['query'][_0x84a8('0x37')]));_0x140e1e[_0x84a8('0x36')]=_0x140e1e[_0x84a8('0x36')][_0x84a8('0x4a')]?_0x140e1e[_0x84a8('0x36')]:_0x36a918['model'];if(_0x2b5f1e[_0x84a8('0x33')][_0x84a8('0x43')]){_0x140e1e[_0x84a8('0x44')]=[{'all':!![]}];}_0x140e1e=_[_0x84a8('0x40')]({},_0x140e1e,_0x2b5f1e[_0x84a8('0x41')]);return db[_0x84a8('0x42')][_0x84a8('0x4b')](_0x140e1e)[_0x84a8('0x24')](handleEntityNotFound(_0x321117,null))['then'](respondWithResult(_0x321117,null))[_0x84a8('0x47')](handleError(_0x321117,null));};exports[_0x84a8('0x4c')]=function(_0x1ce58f,_0x46aebe){if(_0x1ce58f[_0x84a8('0x4d')]['id']){delete _0x1ce58f[_0x84a8('0x4d')]['id'];}return db['CannedAnswer']['find']({'where':{'id':_0x1ce58f[_0x84a8('0x49')]['id']}})['then'](handleEntityNotFound(_0x46aebe,null))[_0x84a8('0x24')](saveUpdates(_0x1ce58f['body'],null))[_0x84a8('0x24')](respondWithResult(_0x46aebe,null))[_0x84a8('0x47')](handleError(_0x46aebe,null));};exports[_0x84a8('0x25')]=function(_0x4da48d,_0x4c60f3){return db['CannedAnswer']['find']({'where':{'id':_0x4da48d[_0x84a8('0x49')]['id']}})[_0x84a8('0x24')](handleEntityNotFound(_0x4c60f3,null))[_0x84a8('0x24')](removeEntity(_0x4c60f3,null))[_0x84a8('0x47')](handleError(_0x4c60f3,null));};exports[_0x84a8('0x4e')]=function(_0xf4cefd,_0x3ac4ee){var _0x593353={'key':_0xf4cefd[_0x84a8('0x4d')][_0x84a8('0x30')]};if(_0xf4cefd[_0x84a8('0x4d')][_0x84a8('0x4f')]){_0x593353[_0x84a8('0x4f')]=_0xf4cefd['body'][_0x84a8('0x4f')];}else if(_0xf4cefd['body'][_0x84a8('0x50')]){_0x593353['SmsAccountId']=_0xf4cefd[_0x84a8('0x4d')][_0x84a8('0x50')];}else if(_0xf4cefd[_0x84a8('0x4d')][_0x84a8('0x51')]){_0x593353['OpenchannelAccountId']=_0xf4cefd[_0x84a8('0x4d')][_0x84a8('0x51')];}else if(_0xf4cefd[_0x84a8('0x4d')]['ChatWebsiteId']){_0x593353[_0x84a8('0x52')]=_0xf4cefd[_0x84a8('0x4d')][_0x84a8('0x52')];}return db[_0x84a8('0x42')][_0x84a8('0x4b')]({'where':_0x593353})[_0x84a8('0x24')](function(_0x3c509a){if(_0x3c509a){throw new db[(_0x84a8('0x53'))]['ValidationError']('The\x20inserted\x20key\x20already\x20exists.');}return db[_0x84a8('0x42')]['create'](_0xf4cefd['body']);})[_0x84a8('0x24')](function(_0x10226c){var _0xd2f2be=_0xf4cefd[_0x84a8('0x54')][_0x84a8('0x26')]({'plain':!![]});if(!_0xd2f2be)throw new Error(_0x84a8('0x55'));if(_0xd2f2be[_0x84a8('0x56')]==='user'){var _0x3779b9=_0x10226c['get']({'plain':!![]});return db['UserProfileSection'][_0x84a8('0x4b')]({'where':{'name':_0x84a8('0x27'),'userProfileId':_0xd2f2be[_0x84a8('0x57')]},'raw':!![]})['then'](function(_0x26b2fa){if(_0x26b2fa&&_0x26b2fa[_0x84a8('0x58')]===0x0){return db[_0x84a8('0x28')][_0x84a8('0x4e')]({'name':_0x3779b9[_0x84a8('0x2b')],'resourceId':_0x3779b9['id'],'type':_0x26b2fa['name'],'sectionId':_0x26b2fa['id']},{})[_0x84a8('0x24')](function(){return _0x10226c;});}else{return _0x10226c;}})[_0x84a8('0x47')](function(_0x3a9964){logger[_0x84a8('0x29')](_0x84a8('0x59'),_0x3a9964);throw _0x3a9964;});}return _0x10226c;})['then'](respondWithResult(_0x3ac4ee,0xc9))[_0x84a8('0x47')](handleError(_0x3ac4ee,null));}; \ No newline at end of file diff --git a/server/api/cannedAnswer/cannedAnswer.model.js b/server/api/cannedAnswer/cannedAnswer.model.js index 46caccf..f0f3762 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 _0x1a0f=['utf8mb4','utf8mb4_unicode_ci','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','./cannedAnswer.attributes','exports','define','CannedAnswer','tools_canned_answers'];(function(_0x3e715e,_0x3a7e25){var _0x2df362=function(_0x1e890d){while(--_0x1e890d){_0x3e715e['push'](_0x3e715e['shift']());}};_0x2df362(++_0x3a7e25);}(_0x1a0f,0xc6));var _0xf1a0=function(_0x3ca349,_0x203ed0){_0x3ca349=_0x3ca349-0x0;var _0xeac360=_0x1a0f[_0x3ca349];return _0xeac360;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xf1a0('0x0'))('api');var moment=require(_0xf1a0('0x1'));var BPromise=require(_0xf1a0('0x2'));var rp=require(_0xf1a0('0x3'));var fs=require('fs');var path=require(_0xf1a0('0x4'));var rimraf=require(_0xf1a0('0x5'));var config=require(_0xf1a0('0x6'));var attributes=require(_0xf1a0('0x7'));module[_0xf1a0('0x8')]=function(_0x3e027d,_0x113b86){return _0x3e027d[_0xf1a0('0x9')](_0xf1a0('0xa'),attributes,{'tableName':_0xf1a0('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xf1a0('0xc'),'collate':_0xf1a0('0xd')});}; \ No newline at end of file +var _0x3c42=['moment','path','rimraf','./cannedAnswer.attributes','exports','define','tools_canned_answers','utf8mb4_unicode_ci','../../config/logger'];(function(_0x466af7,_0x2f7551){var _0x348c96=function(_0x2d7477){while(--_0x2d7477){_0x466af7['push'](_0x466af7['shift']());}};_0x348c96(++_0x2f7551);}(_0x3c42,0x1ee));var _0x23c4=function(_0x5ed1a4,_0x2a7742){_0x5ed1a4=_0x5ed1a4-0x0;var _0x4f2270=_0x3c42[_0x5ed1a4];return _0x4f2270;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x23c4('0x0'))('api');var moment=require(_0x23c4('0x1'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x23c4('0x2'));var rimraf=require(_0x23c4('0x3'));var config=require('../../config/environment');var attributes=require(_0x23c4('0x4'));module[_0x23c4('0x5')]=function(_0x40222c,_0x5281a1){return _0x40222c[_0x23c4('0x6')]('CannedAnswer',attributes,{'tableName':_0x23c4('0x7'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':_0x23c4('0x8')});}; \ No newline at end of file diff --git a/server/api/cannedAnswer/cannedAnswer.rpc.js b/server/api/cannedAnswer/cannedAnswer.rpc.js index efa7201..fcb0092 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(_0x1d22d4,_0xc75825){var _0xcb38=function(_0x83ab16){while(--_0x83ab16){_0x1d22d4['push'](_0x1d22d4['shift']());}};_0xcb38(++_0xc75825);}(_0xa9e0,0x123));var _0x0a9e=function(_0x2bf141,_0x31eac7){_0x2bf141=_0x2bf141-0x0;var _0x48277b=_0xa9e0[_0x2bf141];return _0x48277b;};'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(_0x5cee97,_0x4b248c){var _0x10f057=function(_0x14e387){while(--_0x14e387){_0x5cee97['push'](_0x5cee97['shift']());}};_0x10f057(++_0x4b248c);}(_0xa9e0,0x123));var _0x0a9e=function(_0x2b4411,_0x2625ed){_0x2b4411=_0x2b4411-0x0;var _0x8e41ef=_0xa9e0[_0x2b4411];return _0x8e41ef;};'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 3593acb..cb34a83 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 _0x9e0e=['multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./cannedAnswer.controller','get','index','isAuthenticated','show','post','create','put','/:id','destroy','exports'];(function(_0xc54d09,_0x1964b0){var _0x53ae5a=function(_0x445577){while(--_0x445577){_0xc54d09['push'](_0xc54d09['shift']());}};_0x53ae5a(++_0x1964b0);}(_0x9e0e,0xa0));var _0xe9e0=function(_0x44ba63,_0x5e6673){_0x44ba63=_0x44ba63-0x0;var _0x4e75f2=_0x9e0e[_0x44ba63];return _0x4e75f2;};'use strict';var multer=require(_0xe9e0('0x0'));var util=require('util');var path=require(_0xe9e0('0x1'));var timeout=require(_0xe9e0('0x2'));var express=require(_0xe9e0('0x3'));var router=express[_0xe9e0('0x4')]();var fs_extra=require(_0xe9e0('0x5'));var auth=require(_0xe9e0('0x6'));var interaction=require(_0xe9e0('0x7'));var config=require(_0xe9e0('0x8'));var controller=require(_0xe9e0('0x9'));router[_0xe9e0('0xa')]('/',auth['isAuthenticated'](),controller[_0xe9e0('0xb')]);router[_0xe9e0('0xa')]('/:id',auth[_0xe9e0('0xc')](),controller[_0xe9e0('0xd')]);router[_0xe9e0('0xe')]('/',auth[_0xe9e0('0xc')](),controller[_0xe9e0('0xf')]);router[_0xe9e0('0x10')](_0xe9e0('0x11'),auth[_0xe9e0('0xc')](),controller['update']);router['delete'](_0xe9e0('0x11'),auth[_0xe9e0('0xc')](),controller[_0xe9e0('0x12')]);module[_0xe9e0('0x13')]=router; \ No newline at end of file +var _0xc057=['delete','destroy','exports','multer','util','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./cannedAnswer.controller','get','isAuthenticated','index','/:id','show','post','create','put','update'];(function(_0xfae23b,_0x2be4ba){var _0x200640=function(_0x4ae258){while(--_0x4ae258){_0xfae23b['push'](_0xfae23b['shift']());}};_0x200640(++_0x2be4ba);}(_0xc057,0x1a7));var _0x7c05=function(_0x570884,_0x2794bb){_0x570884=_0x570884-0x0;var _0x32670=_0xc057[_0x570884];return _0x32670;};'use strict';var multer=require(_0x7c05('0x0'));var util=require(_0x7c05('0x1'));var path=require('path');var timeout=require(_0x7c05('0x2'));var express=require(_0x7c05('0x3'));var router=express['Router']();var fs_extra=require(_0x7c05('0x4'));var auth=require(_0x7c05('0x5'));var interaction=require(_0x7c05('0x6'));var config=require(_0x7c05('0x7'));var controller=require(_0x7c05('0x8'));router[_0x7c05('0x9')]('/',auth[_0x7c05('0xa')](),controller[_0x7c05('0xb')]);router[_0x7c05('0x9')](_0x7c05('0xc'),auth[_0x7c05('0xa')](),controller[_0x7c05('0xd')]);router[_0x7c05('0xe')]('/',auth[_0x7c05('0xa')](),controller[_0x7c05('0xf')]);router[_0x7c05('0x10')](_0x7c05('0xc'),auth[_0x7c05('0xa')](),controller[_0x7c05('0x11')]);router[_0x7c05('0x12')](_0x7c05('0xc'),auth[_0x7c05('0xa')](),controller[_0x7c05('0x13')]);module[_0x7c05('0x14')]=router; \ No newline at end of file diff --git a/server/api/cdr/cdr.attributes.js b/server/api/cdr/cdr.attributes.js index 33d45ef..0a322a5 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 _0x0cfa=['1970-01-01\x2000:00:01','STRING','INTEGER','sequelize','exports','DATE'];(function(_0xc7348b,_0x145880){var _0x307cec=function(_0x4f1554){while(--_0x4f1554){_0xc7348b['push'](_0xc7348b['shift']());}};_0x307cec(++_0x145880);}(_0x0cfa,0x18f));var _0xa0cf=function(_0x2d95b5,_0x2d1f8b){_0x2d95b5=_0x2d95b5-0x0;var _0x1ee1fc=_0x0cfa[_0x2d95b5];return _0x1ee1fc;};'use strict';var Sequelize=require(_0xa0cf('0x0'));module[_0xa0cf('0x1')]={'calldate':{'type':Sequelize[_0xa0cf('0x2')],'allowNull':![],'defaultValue':_0xa0cf('0x3')},'clid':{'type':Sequelize['STRING']},'src':{'type':Sequelize['STRING']},'dst':{'type':Sequelize['STRING']},'dcontext':{'type':Sequelize[_0xa0cf('0x4')]},'channel':{'type':Sequelize['STRING']},'dstchannel':{'type':Sequelize[_0xa0cf('0x4')]},'lastapp':{'type':Sequelize[_0xa0cf('0x4')]},'lastdata':{'type':Sequelize[_0xa0cf('0x4')]},'duration':{'type':Sequelize[_0xa0cf('0x5')],'allowNull':![],'defaultValue':0x0},'billsec':{'type':Sequelize['INTEGER'],'allowNull':![],'defaultValue':0x0},'disposition':{'type':Sequelize[_0xa0cf('0x4')]},'amaflags':{'type':Sequelize['INTEGER'],'allowNull':![],'defaultValue':0x0},'accountcode':{'type':Sequelize[_0xa0cf('0x4')]},'userfield':{'type':Sequelize['STRING']},'uniqueid':{'type':Sequelize[_0xa0cf('0x4')]},'linkedid':{'type':Sequelize['STRING']},'sequence':{'type':Sequelize[_0xa0cf('0x4')]},'peeraccount':{'type':Sequelize[_0xa0cf('0x4')]},'type':{'type':Sequelize[_0xa0cf('0x4')]},'tag':{'type':Sequelize['STRING']}}; \ No newline at end of file +var _0xd691=['sequelize','exports','DATE','STRING','INTEGER'];(function(_0x5a4400,_0xfae3b6){var _0xf9b532=function(_0x39804e){while(--_0x39804e){_0x5a4400['push'](_0x5a4400['shift']());}};_0xf9b532(++_0xfae3b6);}(_0xd691,0xe6));var _0x1d69=function(_0xe80e5c,_0x38e90a){_0xe80e5c=_0xe80e5c-0x0;var _0x2bff61=_0xd691[_0xe80e5c];return _0x2bff61;};'use strict';var Sequelize=require(_0x1d69('0x0'));module[_0x1d69('0x1')]={'calldate':{'type':Sequelize[_0x1d69('0x2')],'allowNull':![],'defaultValue':'1970-01-01\x2000:00:01'},'clid':{'type':Sequelize[_0x1d69('0x3')]},'src':{'type':Sequelize[_0x1d69('0x3')]},'dst':{'type':Sequelize[_0x1d69('0x3')]},'dcontext':{'type':Sequelize[_0x1d69('0x3')]},'channel':{'type':Sequelize[_0x1d69('0x3')]},'dstchannel':{'type':Sequelize[_0x1d69('0x3')]},'lastapp':{'type':Sequelize[_0x1d69('0x3')]},'lastdata':{'type':Sequelize[_0x1d69('0x3')]},'duration':{'type':Sequelize[_0x1d69('0x4')],'allowNull':![],'defaultValue':0x0},'billsec':{'type':Sequelize[_0x1d69('0x4')],'allowNull':![],'defaultValue':0x0},'disposition':{'type':Sequelize['STRING']},'amaflags':{'type':Sequelize['INTEGER'],'allowNull':![],'defaultValue':0x0},'accountcode':{'type':Sequelize[_0x1d69('0x3')]},'userfield':{'type':Sequelize['STRING']},'uniqueid':{'type':Sequelize[_0x1d69('0x3')]},'linkedid':{'type':Sequelize[_0x1d69('0x3')]},'sequence':{'type':Sequelize[_0x1d69('0x3')]},'peeraccount':{'type':Sequelize[_0x1d69('0x3')]},'type':{'type':Sequelize['STRING']},'tag':{'type':Sequelize[_0x1d69('0x3')]}}; \ No newline at end of file diff --git a/server/api/cdr/cdr.controller.js b/server/api/cdr/cdr.controller.js index 9792fc3..a698ed1 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 _0x41fe=['fs-extra','lodash','squel','crypto','desk.js','papaparse','../../components/parsers/advancedSearch','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','count','limit','Content-Range','apply','save','update','then','error','stack','name','send','index','map','Cdr','rawAttributes','fieldName','key','model','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','sort','where','pick','filter','merge','type','options','includeAll','include','findAll','catch','show','keys','create','body','find','params','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs'];(function(_0x566eef,_0x227cac){var _0x412400=function(_0x422cb5){while(--_0x422cb5){_0x566eef['push'](_0x566eef['shift']());}};_0x412400(++_0x227cac);}(_0x41fe,0xd1));var _0xe41f=function(_0xaa0309,_0x1c8008){_0xaa0309=_0xaa0309-0x0;var _0x5de7ce=_0x41fe[_0xaa0309];return _0x5de7ce;};'use strict';var emlformat=require(_0xe41f('0x0'));var rimraf=require(_0xe41f('0x1'));var zipdir=require(_0xe41f('0x2'));var jsonpatch=require(_0xe41f('0x3'));var rp=require(_0xe41f('0x4'));var moment=require(_0xe41f('0x5'));var BPromise=require(_0xe41f('0x6'));var Mustache=require(_0xe41f('0x7'));var util=require(_0xe41f('0x8'));var path=require(_0xe41f('0x9'));var sox=require(_0xe41f('0xa'));var csv=require(_0xe41f('0xb'));var ejs=require(_0xe41f('0xc'));var fs=require('fs');var fs_extra=require(_0xe41f('0xd'));var _=require(_0xe41f('0xe'));var squel=require(_0xe41f('0xf'));var crypto=require(_0xe41f('0x10'));var jsforce=require('jsforce');var deskjs=require(_0xe41f('0x11'));var toCsv=require(_0xe41f('0xb'));var querystring=require('querystring');var Papa=require(_0xe41f('0x12'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0xe41f('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')('api');var utils=require(_0xe41f('0x14'));var config=require(_0xe41f('0x15'));var licenseUtil=require(_0xe41f('0x16'));var db=require(_0xe41f('0x17'))['db'];function respondWithStatusCode(_0x2ed268,_0x139162){_0x139162=_0x139162||0xcc;return function(_0x34ae3a){if(_0x34ae3a){return _0x2ed268[_0xe41f('0x18')](_0x139162);}return _0x2ed268[_0xe41f('0x19')](_0x139162)[_0xe41f('0x1a')]();};}function respondWithResult(_0x53e2f6,_0x445e1c){_0x445e1c=_0x445e1c||0xc8;return function(_0x13a2dd){if(_0x13a2dd){return _0x53e2f6['status'](_0x445e1c)[_0xe41f('0x1b')](_0x13a2dd);}};}function respondWithFilteredResult(_0x9cb27c,_0x3b5992){return function(_0x1fb373){if(_0x1fb373){var _0x194653=typeof _0x3b5992[_0xe41f('0x1c')]===_0xe41f('0x1d')&&typeof _0x3b5992['limit']==='undefined';var _0x2b5688=_0x1fb373['count'];var _0x5b5dd7=_0x194653?0x0:_0x3b5992[_0xe41f('0x1c')];var _0x15f6c1=_0x194653?_0x1fb373[_0xe41f('0x1e')]:_0x3b5992[_0xe41f('0x1c')]+_0x3b5992[_0xe41f('0x1f')];var _0x5bd220;if(_0x15f6c1>=_0x2b5688){_0x15f6c1=_0x2b5688;_0x5bd220=0xc8;}else{_0x5bd220=0xce;}_0x9cb27c[_0xe41f('0x19')](_0x5bd220);return _0x9cb27c['set'](_0xe41f('0x20'),_0x5b5dd7+'-'+_0x15f6c1+'/'+_0x2b5688)[_0xe41f('0x1b')](_0x1fb373);}return null;};}function patchUpdates(_0x4dcb21){return function(_0x3ce4d8){try{jsonpatch[_0xe41f('0x21')](_0x3ce4d8,_0x4dcb21,!![]);}catch(_0x171851){return BPromise['reject'](_0x171851);}return _0x3ce4d8[_0xe41f('0x22')]();};}function saveUpdates(_0x3666c3,_0x37fce9){return function(_0x10ee63){if(_0x10ee63){return _0x10ee63[_0xe41f('0x23')](_0x3666c3)[_0xe41f('0x24')](function(_0x9c0c33){return _0x9c0c33;});}return null;};}function removeEntity(_0x520136,_0x18c6ba){return function(_0x5a443f){if(_0x5a443f){return _0x5a443f['destroy']()[_0xe41f('0x24')](function(){_0x520136[_0xe41f('0x19')](0xcc)[_0xe41f('0x1a')]();});}};}function handleEntityNotFound(_0x4f7965,_0x1ac25a){return function(_0x573b3){if(!_0x573b3){_0x4f7965[_0xe41f('0x18')](0x194);}return _0x573b3;};}function handleError(_0x479387,_0x15ccae){_0x15ccae=_0x15ccae||0x1f4;return function(_0x5790ae){logger[_0xe41f('0x25')](_0x5790ae[_0xe41f('0x26')]);if(_0x5790ae['name']){delete _0x5790ae[_0xe41f('0x27')];}_0x479387[_0xe41f('0x19')](_0x15ccae)[_0xe41f('0x28')](_0x5790ae);};}exports[_0xe41f('0x29')]=function(_0x348531,_0x2a7bf4){var _0x1a182b={},_0x4438cf={},_0x6ec664={'count':0x0,'rows':[]};var _0x1c3c38=_[_0xe41f('0x2a')](db[_0xe41f('0x2b')][_0xe41f('0x2c')],function(_0xbca5b0){return{'name':_0xbca5b0[_0xe41f('0x2d')],'type':_0xbca5b0['type'][_0xe41f('0x2e')]};});_0x4438cf[_0xe41f('0x2f')]=_[_0xe41f('0x2a')](_0x1c3c38,_0xe41f('0x27'));_0x4438cf[_0xe41f('0x30')]=_['keys'](_0x348531[_0xe41f('0x30')]);_0x4438cf[_0xe41f('0x31')]=_[_0xe41f('0x32')](_0x4438cf[_0xe41f('0x2f')],_0x4438cf['query']);_0x1a182b['attributes']=_['intersection'](_0x4438cf[_0xe41f('0x2f')],qs[_0xe41f('0x33')](_0x348531[_0xe41f('0x30')]['fields']));_0x1a182b[_0xe41f('0x34')]=_0x1a182b[_0xe41f('0x34')][_0xe41f('0x35')]?_0x1a182b[_0xe41f('0x34')]:_0x4438cf[_0xe41f('0x2f')];if(!_0x348531[_0xe41f('0x30')][_0xe41f('0x36')](_0xe41f('0x37'))){_0x1a182b[_0xe41f('0x1f')]=qs[_0xe41f('0x1f')](_0x348531[_0xe41f('0x30')][_0xe41f('0x1f')]);_0x1a182b['offset']=qs[_0xe41f('0x1c')](_0x348531['query'][_0xe41f('0x1c')]);}_0x1a182b['order']=qs[_0xe41f('0x38')](_0x348531['query']['sort']);_0x1a182b[_0xe41f('0x39')]=qs[_0xe41f('0x31')](_[_0xe41f('0x3a')](_0x348531[_0xe41f('0x30')],_0x4438cf[_0xe41f('0x31')]),_0x1c3c38);if(_0x348531['query'][_0xe41f('0x3b')]){_0x1a182b[_0xe41f('0x39')]=_[_0xe41f('0x3c')](_0x1a182b[_0xe41f('0x39')],{'$or':_[_0xe41f('0x2a')](_0x1c3c38,function(_0x10083c){if(_0x10083c[_0xe41f('0x3d')]!=='VIRTUAL'){var _0x438ead={};_0x438ead[_0x10083c[_0xe41f('0x27')]]={'$like':'%'+_0x348531[_0xe41f('0x30')][_0xe41f('0x3b')]+'%'};return _0x438ead;}})});}_0x1a182b=_[_0xe41f('0x3c')]({},_0x1a182b,_0x348531[_0xe41f('0x3e')]);var _0x2d0cf7={'where':_0x1a182b[_0xe41f('0x39')]};return db[_0xe41f('0x2b')]['count'](_0x2d0cf7)['then'](function(_0x537fbf){_0x6ec664['count']=_0x537fbf;if(_0x348531[_0xe41f('0x30')][_0xe41f('0x3f')]){_0x1a182b[_0xe41f('0x40')]=[{'all':!![]}];}return db['Cdr'][_0xe41f('0x41')](_0x1a182b);})[_0xe41f('0x24')](function(_0x55bf6f){_0x6ec664['rows']=_0x55bf6f;return _0x6ec664;})[_0xe41f('0x24')](respondWithFilteredResult(_0x2a7bf4,_0x1a182b))[_0xe41f('0x42')](handleError(_0x2a7bf4,null));};exports[_0xe41f('0x43')]=function(_0x384001,_0x27bdee){var _0x56e180={'raw':!![],'where':{'id':_0x384001['params']['id']}},_0x82727b={};_0x82727b[_0xe41f('0x2f')]=_[_0xe41f('0x44')](db['Cdr'][_0xe41f('0x2c')]);_0x82727b['query']=_[_0xe41f('0x44')](_0x384001[_0xe41f('0x30')]);_0x82727b[_0xe41f('0x31')]=_['intersection'](_0x82727b[_0xe41f('0x2f')],_0x82727b['query']);_0x56e180[_0xe41f('0x34')]=_[_0xe41f('0x32')](_0x82727b[_0xe41f('0x2f')],qs[_0xe41f('0x33')](_0x384001[_0xe41f('0x30')][_0xe41f('0x33')]));_0x56e180[_0xe41f('0x34')]=_0x56e180[_0xe41f('0x34')]['length']?_0x56e180[_0xe41f('0x34')]:_0x82727b['model'];if(_0x384001[_0xe41f('0x30')]['includeAll']){_0x56e180[_0xe41f('0x40')]=[{'all':!![]}];}_0x56e180=_[_0xe41f('0x3c')]({},_0x56e180,_0x384001[_0xe41f('0x3e')]);return db[_0xe41f('0x2b')]['find'](_0x56e180)[_0xe41f('0x24')](handleEntityNotFound(_0x27bdee,null))['then'](respondWithResult(_0x27bdee,null))[_0xe41f('0x42')](handleError(_0x27bdee,null));};exports[_0xe41f('0x45')]=function(_0x6154a,_0x3a5974){return db['Cdr'][_0xe41f('0x45')](_0x6154a['body'],{})['then'](respondWithResult(_0x3a5974,0xc9))['catch'](handleError(_0x3a5974,null));};exports[_0xe41f('0x23')]=function(_0x25b374,_0x59ef57){if(_0x25b374[_0xe41f('0x46')]['id']){delete _0x25b374[_0xe41f('0x46')]['id'];}return db[_0xe41f('0x2b')][_0xe41f('0x47')]({'where':{'id':_0x25b374[_0xe41f('0x48')]['id']}})[_0xe41f('0x24')](handleEntityNotFound(_0x59ef57,null))[_0xe41f('0x24')](saveUpdates(_0x25b374[_0xe41f('0x46')],null))[_0xe41f('0x24')](respondWithResult(_0x59ef57,null))[_0xe41f('0x42')](handleError(_0x59ef57,null));};exports['destroy']=function(_0x119e32,_0x97c6c6){return db[_0xe41f('0x2b')]['find']({'where':{'id':_0x119e32[_0xe41f('0x48')]['id']}})[_0xe41f('0x24')](handleEntityNotFound(_0x97c6c6,null))[_0xe41f('0x24')](removeEntity(_0x97c6c6,null))[_0xe41f('0x42')](handleError(_0x97c6c6,null));};exports[_0xe41f('0x49')]=function(_0x4f8f47,_0x23cb73){return db[_0xe41f('0x2b')]['describe']()['then'](respondWithResult(_0x23cb73,null))['catch'](handleError(_0x23cb73,null));}; \ No newline at end of file +var _0x99c9=['merge','options','include','rows','catch','show','length','find','create','body','params','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','offset','limit','undefined','count','set','Content-Range','json','apply','reject','save','update','then','end','stack','name','map','Cdr','rawAttributes','type','key','model','query','keys','attributes','intersection','fields','hasOwnProperty','nolimit','sort','where','filters','VIRTUAL','filter'];(function(_0x451c11,_0x2c3613){var _0x21e2fe=function(_0x48b570){while(--_0x48b570){_0x451c11['push'](_0x451c11['shift']());}};_0x21e2fe(++_0x2c3613);}(_0x99c9,0x13c));var _0x999c=function(_0x178e48,_0x3c9509){_0x178e48=_0x178e48-0x0;var _0x440d7e=_0x99c9[_0x178e48];return _0x440d7e;};'use strict';var emlformat=require(_0x999c('0x0'));var rimraf=require(_0x999c('0x1'));var zipdir=require(_0x999c('0x2'));var jsonpatch=require(_0x999c('0x3'));var rp=require(_0x999c('0x4'));var moment=require(_0x999c('0x5'));var BPromise=require(_0x999c('0x6'));var Mustache=require('mustache');var util=require(_0x999c('0x7'));var path=require(_0x999c('0x8'));var sox=require(_0x999c('0x9'));var csv=require(_0x999c('0xa'));var ejs=require(_0x999c('0xb'));var fs=require('fs');var fs_extra=require(_0x999c('0xc'));var _=require(_0x999c('0xd'));var squel=require(_0x999c('0xe'));var crypto=require(_0x999c('0xf'));var jsforce=require(_0x999c('0x10'));var deskjs=require(_0x999c('0x11'));var toCsv=require(_0x999c('0xa'));var querystring=require(_0x999c('0x12'));var Papa=require(_0x999c('0x13'));var Redis=require('ioredis');var authService=require(_0x999c('0x14'));var qs=require(_0x999c('0x15'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x999c('0x16'));var logger=require(_0x999c('0x17'))(_0x999c('0x18'));var utils=require(_0x999c('0x19'));var config=require(_0x999c('0x1a'));var licenseUtil=require(_0x999c('0x1b'));var db=require(_0x999c('0x1c'))['db'];function respondWithStatusCode(_0x3d7c6d,_0x2e5f7e){_0x2e5f7e=_0x2e5f7e||0xcc;return function(_0x44a5bc){if(_0x44a5bc){return _0x3d7c6d[_0x999c('0x1d')](_0x2e5f7e);}return _0x3d7c6d[_0x999c('0x1e')](_0x2e5f7e)['end']();};}function respondWithResult(_0x15f812,_0xd14862){_0xd14862=_0xd14862||0xc8;return function(_0x4f2916){if(_0x4f2916){return _0x15f812['status'](_0xd14862)['json'](_0x4f2916);}};}function respondWithFilteredResult(_0x161434,_0xb3e981){return function(_0x203a73){if(_0x203a73){var _0x116f08=typeof _0xb3e981[_0x999c('0x1f')]==='undefined'&&typeof _0xb3e981[_0x999c('0x20')]===_0x999c('0x21');var _0x2b6126=_0x203a73[_0x999c('0x22')];var _0x110486=_0x116f08?0x0:_0xb3e981['offset'];var _0x1b327f=_0x116f08?_0x203a73[_0x999c('0x22')]:_0xb3e981[_0x999c('0x1f')]+_0xb3e981[_0x999c('0x20')];var _0x32c66c;if(_0x1b327f>=_0x2b6126){_0x1b327f=_0x2b6126;_0x32c66c=0xc8;}else{_0x32c66c=0xce;}_0x161434['status'](_0x32c66c);return _0x161434[_0x999c('0x23')](_0x999c('0x24'),_0x110486+'-'+_0x1b327f+'/'+_0x2b6126)[_0x999c('0x25')](_0x203a73);}return null;};}function patchUpdates(_0x1ec406){return function(_0xceb421){try{jsonpatch[_0x999c('0x26')](_0xceb421,_0x1ec406,!![]);}catch(_0x4a2865){return BPromise[_0x999c('0x27')](_0x4a2865);}return _0xceb421[_0x999c('0x28')]();};}function saveUpdates(_0x24f637,_0x2bcfc9){return function(_0x1c6e55){if(_0x1c6e55){return _0x1c6e55[_0x999c('0x29')](_0x24f637)[_0x999c('0x2a')](function(_0x2a7986){return _0x2a7986;});}return null;};}function removeEntity(_0x4002d2,_0x281720){return function(_0x2cfd83){if(_0x2cfd83){return _0x2cfd83['destroy']()[_0x999c('0x2a')](function(){_0x4002d2[_0x999c('0x1e')](0xcc)[_0x999c('0x2b')]();});}};}function handleEntityNotFound(_0x2e9d58,_0x2256fd){return function(_0x15d102){if(!_0x15d102){_0x2e9d58['sendStatus'](0x194);}return _0x15d102;};}function handleError(_0x4755c2,_0x43293f){_0x43293f=_0x43293f||0x1f4;return function(_0x1c866f){logger['error'](_0x1c866f[_0x999c('0x2c')]);if(_0x1c866f[_0x999c('0x2d')]){delete _0x1c866f['name'];}_0x4755c2[_0x999c('0x1e')](_0x43293f)['send'](_0x1c866f);};}exports['index']=function(_0xedf57d,_0x42cb25){var _0x457df3={},_0x2de6d5={},_0x3737e9={'count':0x0,'rows':[]};var _0x42c2e8=_[_0x999c('0x2e')](db[_0x999c('0x2f')][_0x999c('0x30')],function(_0x3b836a){return{'name':_0x3b836a['fieldName'],'type':_0x3b836a[_0x999c('0x31')][_0x999c('0x32')]};});_0x2de6d5[_0x999c('0x33')]=_[_0x999c('0x2e')](_0x42c2e8,_0x999c('0x2d'));_0x2de6d5[_0x999c('0x34')]=_[_0x999c('0x35')](_0xedf57d[_0x999c('0x34')]);_0x2de6d5['filters']=_['intersection'](_0x2de6d5[_0x999c('0x33')],_0x2de6d5[_0x999c('0x34')]);_0x457df3[_0x999c('0x36')]=_[_0x999c('0x37')](_0x2de6d5['model'],qs[_0x999c('0x38')](_0xedf57d[_0x999c('0x34')][_0x999c('0x38')]));_0x457df3[_0x999c('0x36')]=_0x457df3['attributes']['length']?_0x457df3[_0x999c('0x36')]:_0x2de6d5[_0x999c('0x33')];if(!_0xedf57d[_0x999c('0x34')][_0x999c('0x39')](_0x999c('0x3a'))){_0x457df3[_0x999c('0x20')]=qs[_0x999c('0x20')](_0xedf57d['query']['limit']);_0x457df3['offset']=qs[_0x999c('0x1f')](_0xedf57d[_0x999c('0x34')]['offset']);}_0x457df3['order']=qs['sort'](_0xedf57d[_0x999c('0x34')][_0x999c('0x3b')]);_0x457df3[_0x999c('0x3c')]=qs[_0x999c('0x3d')](_['pick'](_0xedf57d[_0x999c('0x34')],_0x2de6d5[_0x999c('0x3d')]),_0x42c2e8);if(_0xedf57d['query']['filter']){_0x457df3[_0x999c('0x3c')]=_['merge'](_0x457df3[_0x999c('0x3c')],{'$or':_['map'](_0x42c2e8,function(_0x3605a3){if(_0x3605a3[_0x999c('0x31')]!==_0x999c('0x3e')){var _0xcd729={};_0xcd729[_0x3605a3['name']]={'$like':'%'+_0xedf57d['query'][_0x999c('0x3f')]+'%'};return _0xcd729;}})});}_0x457df3=_[_0x999c('0x40')]({},_0x457df3,_0xedf57d[_0x999c('0x41')]);var _0xf26ba3={'where':_0x457df3['where']};return db[_0x999c('0x2f')][_0x999c('0x22')](_0xf26ba3)[_0x999c('0x2a')](function(_0x5fa1de){_0x3737e9['count']=_0x5fa1de;if(_0xedf57d[_0x999c('0x34')]['includeAll']){_0x457df3[_0x999c('0x42')]=[{'all':!![]}];}return db[_0x999c('0x2f')]['findAll'](_0x457df3);})[_0x999c('0x2a')](function(_0x357915){_0x3737e9[_0x999c('0x43')]=_0x357915;return _0x3737e9;})[_0x999c('0x2a')](respondWithFilteredResult(_0x42cb25,_0x457df3))[_0x999c('0x44')](handleError(_0x42cb25,null));};exports[_0x999c('0x45')]=function(_0xa6b0f1,_0x3edf69){var _0x4ef478={'raw':!![],'where':{'id':_0xa6b0f1['params']['id']}},_0x563e11={};_0x563e11['model']=_[_0x999c('0x35')](db[_0x999c('0x2f')][_0x999c('0x30')]);_0x563e11[_0x999c('0x34')]=_[_0x999c('0x35')](_0xa6b0f1['query']);_0x563e11[_0x999c('0x3d')]=_[_0x999c('0x37')](_0x563e11[_0x999c('0x33')],_0x563e11[_0x999c('0x34')]);_0x4ef478[_0x999c('0x36')]=_['intersection'](_0x563e11[_0x999c('0x33')],qs[_0x999c('0x38')](_0xa6b0f1[_0x999c('0x34')][_0x999c('0x38')]));_0x4ef478[_0x999c('0x36')]=_0x4ef478[_0x999c('0x36')][_0x999c('0x46')]?_0x4ef478[_0x999c('0x36')]:_0x563e11[_0x999c('0x33')];if(_0xa6b0f1['query']['includeAll']){_0x4ef478[_0x999c('0x42')]=[{'all':!![]}];}_0x4ef478=_[_0x999c('0x40')]({},_0x4ef478,_0xa6b0f1[_0x999c('0x41')]);return db[_0x999c('0x2f')][_0x999c('0x47')](_0x4ef478)[_0x999c('0x2a')](handleEntityNotFound(_0x3edf69,null))[_0x999c('0x2a')](respondWithResult(_0x3edf69,null))[_0x999c('0x44')](handleError(_0x3edf69,null));};exports[_0x999c('0x48')]=function(_0x26ebd7,_0x3457d6){return db['Cdr'][_0x999c('0x48')](_0x26ebd7[_0x999c('0x49')],{})[_0x999c('0x2a')](respondWithResult(_0x3457d6,0xc9))[_0x999c('0x44')](handleError(_0x3457d6,null));};exports[_0x999c('0x29')]=function(_0x386be6,_0x11f3bf){if(_0x386be6[_0x999c('0x49')]['id']){delete _0x386be6['body']['id'];}return db[_0x999c('0x2f')][_0x999c('0x47')]({'where':{'id':_0x386be6[_0x999c('0x4a')]['id']}})[_0x999c('0x2a')](handleEntityNotFound(_0x11f3bf,null))[_0x999c('0x2a')](saveUpdates(_0x386be6[_0x999c('0x49')],null))[_0x999c('0x2a')](respondWithResult(_0x11f3bf,null))['catch'](handleError(_0x11f3bf,null));};exports['destroy']=function(_0x1139f6,_0x3f134a){return db[_0x999c('0x2f')][_0x999c('0x47')]({'where':{'id':_0x1139f6[_0x999c('0x4a')]['id']}})['then'](handleEntityNotFound(_0x3f134a,null))[_0x999c('0x2a')](removeEntity(_0x3f134a,null))[_0x999c('0x44')](handleError(_0x3f134a,null));};exports[_0x999c('0x4b')]=function(_0x11cc72,_0x5c066e){return db[_0x999c('0x2f')]['describe']()[_0x999c('0x2a')](respondWithResult(_0x5c066e,null))[_0x999c('0x44')](handleError(_0x5c066e,null));}; \ No newline at end of file diff --git a/server/api/cdr/cdr.model.js b/server/api/cdr/cdr.model.js index 46d72a5..cb6168d 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(_0x32c166,_0x849115){var _0xefe796=function(_0x5d4d63){while(--_0x5d4d63){_0x32c166['push'](_0x32c166['shift']());}};_0xefe796(++_0x849115);}(_0x7a54,0x106));var _0x47a5=function(_0x5203e8,_0xa60d8){_0x5203e8=_0x5203e8-0x0;var _0x14af5c=_0x7a54[_0x5203e8];return _0x14af5c;};'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 _0x9957=['dst','src','uniqueid','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','./cdr.attributes','exports','define','Cdr','accountcode','calldate','disposition'];(function(_0x47bf02,_0x1db47a){var _0x571f0c=function(_0x2cdbc8){while(--_0x2cdbc8){_0x47bf02['push'](_0x47bf02['shift']());}};_0x571f0c(++_0x1db47a);}(_0x9957,0x93));var _0x7995=function(_0x5b644e,_0x2e5e07){_0x5b644e=_0x5b644e-0x0;var _0x49c6bf=_0x9957[_0x5b644e];return _0x49c6bf;};'use strict';var _=require(_0x7995('0x0'));var util=require(_0x7995('0x1'));var logger=require(_0x7995('0x2'))(_0x7995('0x3'));var moment=require('moment');var BPromise=require(_0x7995('0x4'));var rp=require(_0x7995('0x5'));var fs=require('fs');var path=require(_0x7995('0x6'));var rimraf=require(_0x7995('0x7'));var config=require('../../config/environment');var attributes=require(_0x7995('0x8'));module[_0x7995('0x9')]=function(_0x137b6b,_0x219534){return _0x137b6b[_0x7995('0xa')](_0x7995('0xb'),attributes,{'tableName':'cdr','paranoid':![],'indexes':[{'name':_0x7995('0xc'),'fields':[_0x7995('0xc')]},{'name':'calldate','fields':[_0x7995('0xd')]},{'name':_0x7995('0xe'),'fields':[_0x7995('0xe')]},{'name':_0x7995('0xf'),'fields':[_0x7995('0xf')]},{'name':_0x7995('0x10'),'fields':[_0x7995('0x10')]},{'name':'uniqueid','fields':[_0x7995('0x11')]}],'timestamps':![]});}; \ No newline at end of file diff --git a/server/api/cdr/cdr.rpc.js b/server/api/cdr/cdr.rpc.js index 052af34..f95555a 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 _0x0c1c=['Cdr,\x20%s,\x20%s,\x20%s','stringify','code','error','Cdr,\x20%s,\x20%s','message','catch','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','http','request','then','info','request\x20sent','debug'];(function(_0x32b122,_0x1ad490){var _0x4ad25a=function(_0x590ee6){while(--_0x590ee6){_0x32b122['push'](_0x32b122['shift']());}};_0x4ad25a(++_0x1ad490);}(_0x0c1c,0xaf));var _0xc0c1=function(_0x4c06a3,_0x1e6b6f){_0x4c06a3=_0x4c06a3-0x0;var _0x7ff53c=_0x0c1c[_0x4c06a3];return _0x7ff53c;};'use strict';var _=require('lodash');var util=require(_0xc0c1('0x0'));var moment=require(_0xc0c1('0x1'));var BPromise=require(_0xc0c1('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xc0c1('0x3'));var db=require(_0xc0c1('0x4'))['db'];var utils=require(_0xc0c1('0x5'));var logger=require(_0xc0c1('0x6'))('rpc');var config=require(_0xc0c1('0x7'));var jayson=require('jayson/promise');var client=jayson['client'][_0xc0c1('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x50367b,_0x441972,_0x3ad94e){return new BPromise(function(_0x3f322b,_0xa3fa34){return client[_0xc0c1('0x9')](_0x50367b,_0x3ad94e)[_0xc0c1('0xa')](function(_0x2a82db){logger[_0xc0c1('0xb')]('Cdr,\x20%s,\x20%s',_0x441972,_0xc0c1('0xc'));logger[_0xc0c1('0xd')](_0xc0c1('0xe'),_0x441972,_0xc0c1('0xc'),JSON[_0xc0c1('0xf')](_0x2a82db));if(_0x2a82db['error']){if(_0x2a82db['error'][_0xc0c1('0x10')]===0x1f4){logger[_0xc0c1('0x11')](_0xc0c1('0x12'),_0x441972,_0x2a82db[_0xc0c1('0x11')][_0xc0c1('0x13')]);return _0xa3fa34(_0x2a82db[_0xc0c1('0x11')][_0xc0c1('0x13')]);}logger['error']('Cdr,\x20%s,\x20%s',_0x441972,_0x2a82db[_0xc0c1('0x11')][_0xc0c1('0x13')]);return _0x3f322b(_0x2a82db[_0xc0c1('0x11')][_0xc0c1('0x13')]);}else{logger[_0xc0c1('0xb')](_0xc0c1('0x12'),_0x441972,_0xc0c1('0xc'));_0x3f322b(_0x2a82db['result']['message']);}})[_0xc0c1('0x14')](function(_0x4ab918){logger[_0xc0c1('0x11')](_0xc0c1('0x12'),_0x441972,_0x4ab918);_0xa3fa34(_0x4ab918);});});} \ No newline at end of file +var _0xc6bb=['../../mysqldb','../../config/utils','../../config/logger','../../config/environment','request','then','info','Cdr,\x20%s,\x20%s','request\x20sent','debug','Cdr,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','randomstring','ioredis'];(function(_0x197f03,_0xd707ed){var _0xfd3146=function(_0x18972e){while(--_0x18972e){_0x197f03['push'](_0x197f03['shift']());}};_0xfd3146(++_0xd707ed);}(_0xc6bb,0x161));var _0xbc6b=function(_0x55936c,_0x32282e){_0x55936c=_0x55936c-0x0;var _0x59bbd9=_0xc6bb[_0x55936c];return _0x59bbd9;};'use strict';var _=require(_0xbc6b('0x0'));var util=require(_0xbc6b('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xbc6b('0x2'));var fs=require('fs');var Redis=require(_0xbc6b('0x3'));var db=require(_0xbc6b('0x4'))['db'];var utils=require(_0xbc6b('0x5'));var logger=require(_0xbc6b('0x6'))('rpc');var config=require(_0xbc6b('0x7'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x53f8d5,_0x338948,_0x2d3b6d){return new BPromise(function(_0x3e112c,_0x34495f){return client[_0xbc6b('0x8')](_0x53f8d5,_0x2d3b6d)[_0xbc6b('0x9')](function(_0x4ed5f0){logger[_0xbc6b('0xa')](_0xbc6b('0xb'),_0x338948,_0xbc6b('0xc'));logger[_0xbc6b('0xd')](_0xbc6b('0xe'),_0x338948,_0xbc6b('0xc'),JSON[_0xbc6b('0xf')](_0x4ed5f0));if(_0x4ed5f0[_0xbc6b('0x10')]){if(_0x4ed5f0[_0xbc6b('0x10')][_0xbc6b('0x11')]===0x1f4){logger[_0xbc6b('0x10')]('Cdr,\x20%s,\x20%s',_0x338948,_0x4ed5f0[_0xbc6b('0x10')][_0xbc6b('0x12')]);return _0x34495f(_0x4ed5f0['error'][_0xbc6b('0x12')]);}logger[_0xbc6b('0x10')](_0xbc6b('0xb'),_0x338948,_0x4ed5f0[_0xbc6b('0x10')][_0xbc6b('0x12')]);return _0x3e112c(_0x4ed5f0['error']['message']);}else{logger[_0xbc6b('0xa')](_0xbc6b('0xb'),_0x338948,_0xbc6b('0xc'));_0x3e112c(_0x4ed5f0[_0xbc6b('0x13')][_0xbc6b('0x12')]);}})[_0xbc6b('0x14')](function(_0x15ab0b){logger[_0xbc6b('0x10')]('Cdr,\x20%s,\x20%s',_0x338948,_0x15ab0b);_0x34495f(_0x15ab0b);});});} \ No newline at end of file diff --git a/server/api/cdr/index.js b/server/api/cdr/index.js index 573b2fd..df7ab54 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(_0x3a0f3e,_0x52601f){var _0x300e5a=function(_0x333e1f){while(--_0x333e1f){_0x3a0f3e['push'](_0x3a0f3e['shift']());}};_0x300e5a(++_0x52601f);}(_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(_0x121195,_0x2cd8b8){var _0x363aea=function(_0xa148f9){while(--_0xa148f9){_0x121195['push'](_0x121195['shift']());}};_0x363aea(++_0x2cd8b8);}(_0xd8b0,0xad));var _0x0d8b=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0xd8b0[_0xa464c9];return _0x3d73c4;};'use strict';var multer=require(_0x0d8b('0x0'));var util=require(_0x0d8b('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0d8b('0x2')]();var fs_extra=require(_0x0d8b('0x3'));var auth=require(_0x0d8b('0x4'));var interaction=require(_0x0d8b('0x5'));var config=require(_0x0d8b('0x6'));var controller=require('./cdr.controller');router['get']('/',auth[_0x0d8b('0x7')](),controller[_0x0d8b('0x8')]);router[_0x0d8b('0x9')]('/describe',auth[_0x0d8b('0x7')](),controller[_0x0d8b('0xa')]);router['get'](_0x0d8b('0xb'),auth[_0x0d8b('0x7')](),controller[_0x0d8b('0xc')]);router[_0x0d8b('0xd')]('/',auth[_0x0d8b('0x7')](),controller[_0x0d8b('0xe')]);router[_0x0d8b('0xf')](_0x0d8b('0xb'),auth['isAuthenticated'](),controller[_0x0d8b('0x10')]);router['delete'](_0x0d8b('0xb'),auth[_0x0d8b('0x7')](),controller[_0x0d8b('0x11')]);module[_0x0d8b('0x12')]=router; \ No newline at end of file diff --git a/server/api/chatApplication/chatApplication.attributes.js b/server/api/chatApplication/chatApplication.attributes.js index 6007e7d..77b34b0 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 _0x1acf=['*,*,*,*','INTEGER','STRING','noop'];(function(_0x2a14c2,_0x4f989e){var _0x16e008=function(_0x4d88ca){while(--_0x4d88ca){_0x2a14c2['push'](_0x2a14c2['shift']());}};_0x16e008(++_0x4f989e);}(_0x1acf,0x1ed));var _0xf1ac=function(_0x5d0d4b,_0x475028){_0x5d0d4b=_0x5d0d4b-0x0;var _0x6feb2e=_0x1acf[_0x5d0d4b];return _0x6feb2e;};'use strict';var Sequelize=require('sequelize');module['exports']={'priority':{'type':Sequelize[_0xf1ac('0x0')],'allowNull':![]},'app':{'type':Sequelize[_0xf1ac('0x1')],'allowNull':![],'defaultValue':_0xf1ac('0x2')},'appdata':{'type':Sequelize['TEXT']()},'description':{'type':Sequelize[_0xf1ac('0x1')]},'interval':{'type':Sequelize[_0xf1ac('0x1')],'defaultValue':_0xf1ac('0x3')}}; \ No newline at end of file +var _0xcbc7=['*,*,*,*','sequelize','exports','noop','STRING'];(function(_0x11a88d,_0x34e0d3){var _0xeb351b=function(_0x5b59c4){while(--_0x5b59c4){_0x11a88d['push'](_0x11a88d['shift']());}};_0xeb351b(++_0x34e0d3);}(_0xcbc7,0x191));var _0x7cbc=function(_0x2aeba4,_0x47184c){_0x2aeba4=_0x2aeba4-0x0;var _0x3db727=_0xcbc7[_0x2aeba4];return _0x3db727;};'use strict';var Sequelize=require(_0x7cbc('0x0'));module[_0x7cbc('0x1')]={'priority':{'type':Sequelize['INTEGER'],'allowNull':![]},'app':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x7cbc('0x2')},'appdata':{'type':Sequelize['TEXT']()},'description':{'type':Sequelize[_0x7cbc('0x3')]},'interval':{'type':Sequelize[_0x7cbc('0x3')],'defaultValue':_0x7cbc('0x4')}}; \ No newline at end of file diff --git a/server/api/chatApplication/chatApplication.controller.js b/server/api/chatApplication/chatApplication.controller.js index 4237422..1a00e46 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 _0xc343=['update','then','destroy','end','error','name','show','ChatApplication','rawAttributes','query','filters','intersection','model','attributes','fields','length','includeAll','include','options','find','catch','body','params','eml-format','zip-dir','fast-json-patch','request-promise','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','sendStatus','status','json','offset','undefined','limit','count','set','apply','reject','save'];(function(_0x49c6b3,_0x346ff0){var _0xf94ac=function(_0x3a717c){while(--_0x3a717c){_0x49c6b3['push'](_0x49c6b3['shift']());}};_0xf94ac(++_0x346ff0);}(_0xc343,0x173));var _0x3c34=function(_0x4462bc,_0x1c9e72){_0x4462bc=_0x4462bc-0x0;var _0x567a26=_0xc343[_0x4462bc];return _0x567a26;};'use strict';var emlformat=require(_0x3c34('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x3c34('0x1'));var jsonpatch=require(_0x3c34('0x2'));var rp=require(_0x3c34('0x3'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x3c34('0x4'));var util=require(_0x3c34('0x5'));var path=require(_0x3c34('0x6'));var sox=require(_0x3c34('0x7'));var csv=require(_0x3c34('0x8'));var ejs=require(_0x3c34('0x9'));var fs=require('fs');var fs_extra=require(_0x3c34('0xa'));var _=require(_0x3c34('0xb'));var squel=require(_0x3c34('0xc'));var crypto=require(_0x3c34('0xd'));var jsforce=require(_0x3c34('0xe'));var deskjs=require(_0x3c34('0xf'));var toCsv=require(_0x3c34('0x8'));var querystring=require(_0x3c34('0x10'));var Papa=require(_0x3c34('0x11'));var Redis=require('ioredis');var authService=require(_0x3c34('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0x3c34('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x3c34('0x14'))(_0x3c34('0x15'));var utils=require(_0x3c34('0x16'));var config=require(_0x3c34('0x17'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0xaf9a20,_0x14efad){_0x14efad=_0x14efad||0xcc;return function(_0x4bf215){if(_0x4bf215){return _0xaf9a20[_0x3c34('0x18')](_0x14efad);}return _0xaf9a20[_0x3c34('0x19')](_0x14efad)['end']();};}function respondWithResult(_0x2d1b11,_0x30200b){_0x30200b=_0x30200b||0xc8;return function(_0x1c253b){if(_0x1c253b){return _0x2d1b11[_0x3c34('0x19')](_0x30200b)[_0x3c34('0x1a')](_0x1c253b);}};}function respondWithFilteredResult(_0x277539,_0x1ab6d9){return function(_0x4df442){if(_0x4df442){var _0x429029=typeof _0x1ab6d9[_0x3c34('0x1b')]===_0x3c34('0x1c')&&typeof _0x1ab6d9[_0x3c34('0x1d')]==='undefined';var _0x33c473=_0x4df442[_0x3c34('0x1e')];var _0x1f3014=_0x429029?0x0:_0x1ab6d9[_0x3c34('0x1b')];var _0x28849e=_0x429029?_0x4df442[_0x3c34('0x1e')]:_0x1ab6d9[_0x3c34('0x1b')]+_0x1ab6d9['limit'];var _0x43c715;if(_0x28849e>=_0x33c473){_0x28849e=_0x33c473;_0x43c715=0xc8;}else{_0x43c715=0xce;}_0x277539[_0x3c34('0x19')](_0x43c715);return _0x277539[_0x3c34('0x1f')]('Content-Range',_0x1f3014+'-'+_0x28849e+'/'+_0x33c473)[_0x3c34('0x1a')](_0x4df442);}return null;};}function patchUpdates(_0xcdffe7){return function(_0x31079c){try{jsonpatch[_0x3c34('0x20')](_0x31079c,_0xcdffe7,!![]);}catch(_0x123f9){return BPromise[_0x3c34('0x21')](_0x123f9);}return _0x31079c[_0x3c34('0x22')]();};}function saveUpdates(_0x29f9ed,_0x8ea2aa){return function(_0x4323a8){if(_0x4323a8){return _0x4323a8[_0x3c34('0x23')](_0x29f9ed)[_0x3c34('0x24')](function(_0x55c08b){return _0x55c08b;});}return null;};}function removeEntity(_0x461492,_0x5370d2){return function(_0x45d8f5){if(_0x45d8f5){return _0x45d8f5[_0x3c34('0x25')]()[_0x3c34('0x24')](function(){_0x461492[_0x3c34('0x19')](0xcc)[_0x3c34('0x26')]();});}};}function handleEntityNotFound(_0x262809,_0x15046c){return function(_0x2ff31e){if(!_0x2ff31e){_0x262809['sendStatus'](0x194);}return _0x2ff31e;};}function handleError(_0x18b0bd,_0x1e3764){_0x1e3764=_0x1e3764||0x1f4;return function(_0x258098){logger[_0x3c34('0x27')](_0x258098['stack']);if(_0x258098[_0x3c34('0x28')]){delete _0x258098['name'];}_0x18b0bd['status'](_0x1e3764)['send'](_0x258098);};}exports[_0x3c34('0x29')]=function(_0x56bb48,_0x5c3ca0){var _0xc3f80f={'raw':!![],'where':{'id':_0x56bb48['params']['id']}},_0x5d4302={};_0x5d4302['model']=_['keys'](db[_0x3c34('0x2a')][_0x3c34('0x2b')]);_0x5d4302[_0x3c34('0x2c')]=_['keys'](_0x56bb48[_0x3c34('0x2c')]);_0x5d4302[_0x3c34('0x2d')]=_[_0x3c34('0x2e')](_0x5d4302[_0x3c34('0x2f')],_0x5d4302['query']);_0xc3f80f[_0x3c34('0x30')]=_[_0x3c34('0x2e')](_0x5d4302['model'],qs['fields'](_0x56bb48[_0x3c34('0x2c')][_0x3c34('0x31')]));_0xc3f80f[_0x3c34('0x30')]=_0xc3f80f[_0x3c34('0x30')][_0x3c34('0x32')]?_0xc3f80f[_0x3c34('0x30')]:_0x5d4302[_0x3c34('0x2f')];if(_0x56bb48[_0x3c34('0x2c')][_0x3c34('0x33')]){_0xc3f80f[_0x3c34('0x34')]=[{'all':!![]}];}_0xc3f80f=_['merge']({},_0xc3f80f,_0x56bb48[_0x3c34('0x35')]);return db[_0x3c34('0x2a')][_0x3c34('0x36')](_0xc3f80f)[_0x3c34('0x24')](handleEntityNotFound(_0x5c3ca0,null))[_0x3c34('0x24')](respondWithResult(_0x5c3ca0,null))[_0x3c34('0x37')](handleError(_0x5c3ca0,null));};exports[_0x3c34('0x23')]=function(_0x485794,_0xa1ecda){if(_0x485794['body']['id']){delete _0x485794[_0x3c34('0x38')]['id'];}return db['ChatApplication'][_0x3c34('0x36')]({'where':{'id':_0x485794['params']['id']}})[_0x3c34('0x24')](handleEntityNotFound(_0xa1ecda,null))[_0x3c34('0x24')](saveUpdates(_0x485794[_0x3c34('0x38')],null))[_0x3c34('0x24')](respondWithResult(_0xa1ecda,null))['catch'](handleError(_0xa1ecda,null));};exports[_0x3c34('0x25')]=function(_0x517ed5,_0x57aa6d){return db[_0x3c34('0x2a')]['find']({'where':{'id':_0x517ed5[_0x3c34('0x39')]['id']}})[_0x3c34('0x24')](handleEntityNotFound(_0x57aa6d,null))[_0x3c34('0x24')](removeEntity(_0x57aa6d,null))[_0x3c34('0x37')](handleError(_0x57aa6d,null));}; \ No newline at end of file +var _0x4dd2=['body','rimraf','zip-dir','fast-json-patch','moment','mustache','path','sox','to-csv','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','save','destroy','sendStatus','name','send','params','model','keys','rawAttributes','query','filters','intersection','fields','attributes','length','includeAll','include','merge','options','ChatApplication','find','then','catch','update'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0x4dd2,0xf1));var _0x24dd=function(_0x1a3cc7,_0x2900e3){_0x1a3cc7=_0x1a3cc7-0x0;var _0x338438=_0x4dd2[_0x1a3cc7];return _0x338438;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x24dd('0x0'));var zipdir=require(_0x24dd('0x1'));var jsonpatch=require(_0x24dd('0x2'));var rp=require('request-promise');var moment=require(_0x24dd('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x24dd('0x4'));var util=require('util');var path=require(_0x24dd('0x5'));var sox=require(_0x24dd('0x6'));var csv=require(_0x24dd('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x24dd('0x8'));var squel=require(_0x24dd('0x9'));var crypto=require(_0x24dd('0xa'));var jsforce=require(_0x24dd('0xb'));var deskjs=require(_0x24dd('0xc'));var toCsv=require('to-csv');var querystring=require(_0x24dd('0xd'));var Papa=require(_0x24dd('0xe'));var Redis=require(_0x24dd('0xf'));var authService=require(_0x24dd('0x10'));var qs=require(_0x24dd('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x24dd('0x12'));var logger=require(_0x24dd('0x13'))(_0x24dd('0x14'));var utils=require(_0x24dd('0x15'));var config=require(_0x24dd('0x16'));var licenseUtil=require(_0x24dd('0x17'));var db=require(_0x24dd('0x18'))['db'];function respondWithStatusCode(_0x167581,_0x4d8c55){_0x4d8c55=_0x4d8c55||0xcc;return function(_0x46b06c){if(_0x46b06c){return _0x167581['sendStatus'](_0x4d8c55);}return _0x167581[_0x24dd('0x19')](_0x4d8c55)[_0x24dd('0x1a')]();};}function respondWithResult(_0x4b3f0d,_0x5498a6){_0x5498a6=_0x5498a6||0xc8;return function(_0x45da78){if(_0x45da78){return _0x4b3f0d[_0x24dd('0x19')](_0x5498a6)[_0x24dd('0x1b')](_0x45da78);}};}function respondWithFilteredResult(_0x4c5ced,_0xa40b5c){return function(_0x5a4a2c){if(_0x5a4a2c){var _0x397e7e=typeof _0xa40b5c[_0x24dd('0x1c')]===_0x24dd('0x1d')&&typeof _0xa40b5c[_0x24dd('0x1e')]==='undefined';var _0x1fbef8=_0x5a4a2c[_0x24dd('0x1f')];var _0x593c8c=_0x397e7e?0x0:_0xa40b5c['offset'];var _0x2962d0=_0x397e7e?_0x5a4a2c['count']:_0xa40b5c[_0x24dd('0x1c')]+_0xa40b5c[_0x24dd('0x1e')];var _0x362d37;if(_0x2962d0>=_0x1fbef8){_0x2962d0=_0x1fbef8;_0x362d37=0xc8;}else{_0x362d37=0xce;}_0x4c5ced[_0x24dd('0x19')](_0x362d37);return _0x4c5ced[_0x24dd('0x20')](_0x24dd('0x21'),_0x593c8c+'-'+_0x2962d0+'/'+_0x1fbef8)['json'](_0x5a4a2c);}return null;};}function patchUpdates(_0x54a753){return function(_0x1e2ea9){try{jsonpatch[_0x24dd('0x22')](_0x1e2ea9,_0x54a753,!![]);}catch(_0x4bafcf){return BPromise['reject'](_0x4bafcf);}return _0x1e2ea9[_0x24dd('0x23')]();};}function saveUpdates(_0x57f7b0,_0x13fda2){return function(_0x22f177){if(_0x22f177){return _0x22f177['update'](_0x57f7b0)['then'](function(_0x44c71e){return _0x44c71e;});}return null;};}function removeEntity(_0x41a654,_0x930681){return function(_0xa3262){if(_0xa3262){return _0xa3262[_0x24dd('0x24')]()['then'](function(){_0x41a654[_0x24dd('0x19')](0xcc)[_0x24dd('0x1a')]();});}};}function handleEntityNotFound(_0xab4def,_0x57ef48){return function(_0x1d3a8f){if(!_0x1d3a8f){_0xab4def[_0x24dd('0x25')](0x194);}return _0x1d3a8f;};}function handleError(_0x9fdaab,_0xd2109e){_0xd2109e=_0xd2109e||0x1f4;return function(_0xaf9b90){logger['error'](_0xaf9b90['stack']);if(_0xaf9b90['name']){delete _0xaf9b90[_0x24dd('0x26')];}_0x9fdaab[_0x24dd('0x19')](_0xd2109e)[_0x24dd('0x27')](_0xaf9b90);};}exports['show']=function(_0x48b1c8,_0x52dc35){var _0x3329a6={'raw':!![],'where':{'id':_0x48b1c8[_0x24dd('0x28')]['id']}},_0x18e21a={};_0x18e21a[_0x24dd('0x29')]=_[_0x24dd('0x2a')](db['ChatApplication'][_0x24dd('0x2b')]);_0x18e21a['query']=_[_0x24dd('0x2a')](_0x48b1c8[_0x24dd('0x2c')]);_0x18e21a[_0x24dd('0x2d')]=_['intersection'](_0x18e21a[_0x24dd('0x29')],_0x18e21a[_0x24dd('0x2c')]);_0x3329a6['attributes']=_[_0x24dd('0x2e')](_0x18e21a['model'],qs[_0x24dd('0x2f')](_0x48b1c8[_0x24dd('0x2c')]['fields']));_0x3329a6['attributes']=_0x3329a6[_0x24dd('0x30')][_0x24dd('0x31')]?_0x3329a6[_0x24dd('0x30')]:_0x18e21a[_0x24dd('0x29')];if(_0x48b1c8[_0x24dd('0x2c')][_0x24dd('0x32')]){_0x3329a6[_0x24dd('0x33')]=[{'all':!![]}];}_0x3329a6=_[_0x24dd('0x34')]({},_0x3329a6,_0x48b1c8[_0x24dd('0x35')]);return db[_0x24dd('0x36')][_0x24dd('0x37')](_0x3329a6)[_0x24dd('0x38')](handleEntityNotFound(_0x52dc35,null))['then'](respondWithResult(_0x52dc35,null))[_0x24dd('0x39')](handleError(_0x52dc35,null));};exports[_0x24dd('0x3a')]=function(_0x50251d,_0x27d261){if(_0x50251d['body']['id']){delete _0x50251d['body']['id'];}return db[_0x24dd('0x36')][_0x24dd('0x37')]({'where':{'id':_0x50251d['params']['id']}})[_0x24dd('0x38')](handleEntityNotFound(_0x27d261,null))['then'](saveUpdates(_0x50251d[_0x24dd('0x3b')],null))[_0x24dd('0x38')](respondWithResult(_0x27d261,null))[_0x24dd('0x39')](handleError(_0x27d261,null));};exports[_0x24dd('0x24')]=function(_0x23ced3,_0x47ce28){return db[_0x24dd('0x36')][_0x24dd('0x37')]({'where':{'id':_0x23ced3[_0x24dd('0x28')]['id']}})[_0x24dd('0x38')](handleEntityNotFound(_0x47ce28,null))[_0x24dd('0x38')](removeEntity(_0x47ce28,null))[_0x24dd('0x39')](handleError(_0x47ce28,null));}; \ No newline at end of file diff --git a/server/api/chatApplication/chatApplication.model.js b/server/api/chatApplication/chatApplication.model.js index 0f31fd4..b580b93 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 _0x12b7=['request-promise','path','rimraf','../../config/environment','./chatApplication.attributes','exports','ChatApplication','chat_applications','utf8mb4_unicode_ci','../../config/logger','api','moment','bluebird'];(function(_0x4998d5,_0x5aee77){var _0xc09e7b=function(_0x47af67){while(--_0x47af67){_0x4998d5['push'](_0x4998d5['shift']());}};_0xc09e7b(++_0x5aee77);}(_0x12b7,0x182));var _0x712b=function(_0xbac247,_0x20c23d){_0xbac247=_0xbac247-0x0;var _0x585c39=_0x12b7[_0xbac247];return _0x585c39;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x712b('0x0'))(_0x712b('0x1'));var moment=require(_0x712b('0x2'));var BPromise=require(_0x712b('0x3'));var rp=require(_0x712b('0x4'));var fs=require('fs');var path=require(_0x712b('0x5'));var rimraf=require(_0x712b('0x6'));var config=require(_0x712b('0x7'));var attributes=require(_0x712b('0x8'));module[_0x712b('0x9')]=function(_0x1395ce,_0x245d3f){return _0x1395ce['define'](_0x712b('0xa'),attributes,{'tableName':_0x712b('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':_0x712b('0xc')});}; \ No newline at end of file +var _0x22d5=['exports','define','ChatApplication','chat_applications','utf8mb4_unicode_ci','lodash','util','api','bluebird','request-promise','path','../../config/environment'];(function(_0x1f36bb,_0x8af718){var _0xaf97fa=function(_0xeca489){while(--_0xeca489){_0x1f36bb['push'](_0x1f36bb['shift']());}};_0xaf97fa(++_0x8af718);}(_0x22d5,0xc5));var _0x522d=function(_0x3c4d2a,_0x1e5816){_0x3c4d2a=_0x3c4d2a-0x0;var _0x596a0b=_0x22d5[_0x3c4d2a];return _0x596a0b;};'use strict';var _=require(_0x522d('0x0'));var util=require(_0x522d('0x1'));var logger=require('../../config/logger')(_0x522d('0x2'));var moment=require('moment');var BPromise=require(_0x522d('0x3'));var rp=require(_0x522d('0x4'));var fs=require('fs');var path=require(_0x522d('0x5'));var rimraf=require('rimraf');var config=require(_0x522d('0x6'));var attributes=require('./chatApplication.attributes');module[_0x522d('0x7')]=function(_0x9cc76c,_0x427d43){return _0x9cc76c[_0x522d('0x8')](_0x522d('0x9'),attributes,{'tableName':_0x522d('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':_0x522d('0xb')});}; \ No newline at end of file diff --git a/server/api/chatApplication/chatApplication.rpc.js b/server/api/chatApplication/chatApplication.rpc.js index 4e4cb14..e4aa3d7 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 _0x615a=['debug','ChatApplication,\x20%s,\x20%s,\x20%s','stringify','code','error','message','catch','util','ioredis','../../config/logger','rpc','jayson/promise','client','http','request','then','info','ChatApplication,\x20%s,\x20%s','request\x20sent'];(function(_0xb8cfbe,_0x2e81b6){var _0x227d51=function(_0x5cb1ff){while(--_0x5cb1ff){_0xb8cfbe['push'](_0xb8cfbe['shift']());}};_0x227d51(++_0x2e81b6);}(_0x615a,0x137));var _0xa615=function(_0x55d58f,_0x2bea83){_0x55d58f=_0x55d58f-0x0;var _0x1ad6e6=_0x615a[_0x55d58f];return _0x1ad6e6;};'use strict';var _=require('lodash');var util=require(_0xa615('0x0'));var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xa615('0x1'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0xa615('0x2'))(_0xa615('0x3'));var config=require('../../config/environment');var jayson=require(_0xa615('0x4'));var client=jayson[_0xa615('0x5')][_0xa615('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x2d2f04,_0x240e0f,_0x244554){return new BPromise(function(_0x69044c,_0x5bfd56){return client[_0xa615('0x7')](_0x2d2f04,_0x244554)[_0xa615('0x8')](function(_0xf8d47c){logger[_0xa615('0x9')](_0xa615('0xa'),_0x240e0f,_0xa615('0xb'));logger[_0xa615('0xc')](_0xa615('0xd'),_0x240e0f,_0xa615('0xb'),JSON[_0xa615('0xe')](_0xf8d47c));if(_0xf8d47c['error']){if(_0xf8d47c['error'][_0xa615('0xf')]===0x1f4){logger[_0xa615('0x10')]('ChatApplication,\x20%s,\x20%s',_0x240e0f,_0xf8d47c[_0xa615('0x10')][_0xa615('0x11')]);return _0x5bfd56(_0xf8d47c['error']['message']);}logger[_0xa615('0x10')](_0xa615('0xa'),_0x240e0f,_0xf8d47c['error']['message']);return _0x69044c(_0xf8d47c[_0xa615('0x10')][_0xa615('0x11')]);}else{logger[_0xa615('0x9')](_0xa615('0xa'),_0x240e0f,_0xa615('0xb'));_0x69044c(_0xf8d47c['result'][_0xa615('0x11')]);}})[_0xa615('0x12')](function(_0x548bfd){logger['error']('ChatApplication,\x20%s,\x20%s',_0x240e0f,_0x548bfd);_0x5bfd56(_0x548bfd);});});} \ No newline at end of file +var _0x2ca7=['info','ChatApplication,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','result','catch','lodash','moment','bluebird','ioredis','../../config/logger','rpc','../../config/environment','jayson/promise','http','then'];(function(_0xa8883,_0x1f107f){var _0x479426=function(_0x4e56b9){while(--_0x4e56b9){_0xa8883['push'](_0xa8883['shift']());}};_0x479426(++_0x1f107f);}(_0x2ca7,0xda));var _0x72ca=function(_0x547f01,_0x53ed31){_0x547f01=_0x547f01-0x0;var _0x36ad2e=_0x2ca7[_0x547f01];return _0x36ad2e;};'use strict';var _=require(_0x72ca('0x0'));var util=require('util');var moment=require(_0x72ca('0x1'));var BPromise=require(_0x72ca('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x72ca('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x72ca('0x4'))(_0x72ca('0x5'));var config=require(_0x72ca('0x6'));var jayson=require(_0x72ca('0x7'));var client=jayson['client'][_0x72ca('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x4a4775,_0x28df60,_0xe4f3c){return new BPromise(function(_0x27f9fa,_0x617642){return client['request'](_0x4a4775,_0xe4f3c)[_0x72ca('0x9')](function(_0x3af64f){logger[_0x72ca('0xa')](_0x72ca('0xb'),_0x28df60,_0x72ca('0xc'));logger[_0x72ca('0xd')]('ChatApplication,\x20%s,\x20%s,\x20%s',_0x28df60,'request\x20sent',JSON[_0x72ca('0xe')](_0x3af64f));if(_0x3af64f[_0x72ca('0xf')]){if(_0x3af64f[_0x72ca('0xf')]['code']===0x1f4){logger[_0x72ca('0xf')](_0x72ca('0xb'),_0x28df60,_0x3af64f[_0x72ca('0xf')][_0x72ca('0x10')]);return _0x617642(_0x3af64f[_0x72ca('0xf')][_0x72ca('0x10')]);}logger[_0x72ca('0xf')](_0x72ca('0xb'),_0x28df60,_0x3af64f[_0x72ca('0xf')]['message']);return _0x27f9fa(_0x3af64f[_0x72ca('0xf')][_0x72ca('0x10')]);}else{logger[_0x72ca('0xa')](_0x72ca('0xb'),_0x28df60,_0x72ca('0xc'));_0x27f9fa(_0x3af64f[_0x72ca('0x11')][_0x72ca('0x10')]);}})[_0x72ca('0x12')](function(_0x25a737){logger['error'](_0x72ca('0xb'),_0x28df60,_0x25a737);_0x617642(_0x25a737);});});} \ No newline at end of file diff --git a/server/api/chatApplication/index.js b/server/api/chatApplication/index.js index 6e740e5..9d0d997 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 _0x4668=['get','/:id','isAuthenticated','delete','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatApplication.controller'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x4668,0x1c6));var _0x8466=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0x4668[_0x122ef9];return _0x42fba0;};'use strict';var multer=require(_0x8466('0x0'));var util=require(_0x8466('0x1'));var path=require(_0x8466('0x2'));var timeout=require(_0x8466('0x3'));var express=require(_0x8466('0x4'));var router=express[_0x8466('0x5')]();var fs_extra=require(_0x8466('0x6'));var auth=require(_0x8466('0x7'));var interaction=require(_0x8466('0x8'));var config=require(_0x8466('0x9'));var controller=require(_0x8466('0xa'));router[_0x8466('0xb')](_0x8466('0xc'),auth['isAuthenticated'](),controller['show']);router['put'](_0x8466('0xc'),auth[_0x8466('0xd')](),controller['update']);router[_0x8466('0xe')](_0x8466('0xc'),auth[_0x8466('0xd')](),controller['destroy']);module['exports']=router; \ No newline at end of file +var _0xbfad=['multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatApplication.controller','/:id','isAuthenticated','show','put','update','delete','exports'];(function(_0x3edc47,_0x35429f){var _0x51d859=function(_0x36bd41){while(--_0x36bd41){_0x3edc47['push'](_0x3edc47['shift']());}};_0x51d859(++_0x35429f);}(_0xbfad,0x176));var _0xdbfa=function(_0x3facf0,_0x4e670e){_0x3facf0=_0x3facf0-0x0;var _0x566ed6=_0xbfad[_0x3facf0];return _0x566ed6;};'use strict';var multer=require(_0xdbfa('0x0'));var util=require('util');var path=require(_0xdbfa('0x1'));var timeout=require(_0xdbfa('0x2'));var express=require(_0xdbfa('0x3'));var router=express[_0xdbfa('0x4')]();var fs_extra=require(_0xdbfa('0x5'));var auth=require(_0xdbfa('0x6'));var interaction=require(_0xdbfa('0x7'));var config=require(_0xdbfa('0x8'));var controller=require(_0xdbfa('0x9'));router['get'](_0xdbfa('0xa'),auth[_0xdbfa('0xb')](),controller[_0xdbfa('0xc')]);router[_0xdbfa('0xd')](_0xdbfa('0xa'),auth[_0xdbfa('0xb')](),controller[_0xdbfa('0xe')]);router[_0xdbfa('0xf')](_0xdbfa('0xa'),auth[_0xdbfa('0xb')](),controller['destroy']);module[_0xdbfa('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 ae9f08d..61711da 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 _0x7ebb=['BOOLEAN','sequelize','exports','STRING'];(function(_0x4f4e83,_0x49622a){var _0x2c7ddf=function(_0x27e510){while(--_0x27e510){_0x4f4e83['push'](_0x4f4e83['shift']());}};_0x2c7ddf(++_0x49622a);}(_0x7ebb,0x161));var _0xb7eb=function(_0x3396cd,_0x4047f0){_0x3396cd=_0x3396cd-0x0;var _0x2d6b4a=_0x7ebb[_0x3396cd];return _0x2d6b4a;};'use strict';var Sequelize=require(_0xb7eb('0x0'));module[_0xb7eb('0x1')]={'name':{'type':Sequelize[_0xb7eb('0x2')],'allowNull':![]},'description':{'type':Sequelize[_0xb7eb('0x2')]},'write':{'type':Sequelize[_0xb7eb('0x3')],'defaultValue':!![]}}; \ No newline at end of file +var _0xd0d8=['STRING','BOOLEAN','sequelize'];(function(_0x33504d,_0xf81588){var _0x5ee631=function(_0x43273a){while(--_0x43273a){_0x33504d['push'](_0x33504d['shift']());}};_0x5ee631(++_0xf81588);}(_0xd0d8,0xa7));var _0x8d0d=function(_0x27d11f,_0x2c59a8){_0x27d11f=_0x27d11f-0x0;var _0x36c1a5=_0xd0d8[_0x27d11f];return _0x36c1a5;};'use strict';var Sequelize=require(_0x8d0d('0x0'));module['exports']={'name':{'type':Sequelize['STRING'],'allowNull':![]},'description':{'type':Sequelize[_0x8d0d('0x1')]},'write':{'type':Sequelize[_0x8d0d('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 3e729b4..856c508 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 _0xa9e0=['../../config/license/hardware','../../config/license/util','../../mysqldb','redis','defaults','localhost','./chatGroup.socket','register','jayson/promise','client','http','then','info','ChatGroup,\x20%s,\x20%s','request\x20sent','debug','ChatGroup,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','sendStatus','status','end','offset','undefined','limit','count','set','Content-Range','json','save','update','destroy','stack','name','ChatGroup','rawAttributes','type','key','model','query','keys','filters','intersection','fields','attributes','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','map','VIRTUAL','options','includeAll','include','findAll','rows','show','params','length','create','body','find','describe','getUnread','ChatInternalMessage','toInteger','addMembers','ids','getMembers','findOne','User','removeMembers','getMessages','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','eml-format','rimraf','zip-dir','moment','mustache','util','path','sox','to-csv','fs-extra','lodash','squel','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch'];(function(_0x41fb98,_0x470189){var _0x4b0044=function(_0xf8b2ec){while(--_0xf8b2ec){_0x41fb98['push'](_0x41fb98['shift']());}};_0x4b0044(++_0x470189);}(_0xa9e0,0x123));var _0x0a9e=function(_0x3899d1,_0x4aa04c){_0x3899d1=_0x3899d1-0x0;var _0xeb4a7d=_0xa9e0[_0x3899d1];return _0xeb4a7d;};'use strict';var emlformat=require(_0x0a9e('0x0'));var rimraf=require(_0x0a9e('0x1'));var zipdir=require(_0x0a9e('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x0a9e('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x0a9e('0x4'));var util=require(_0x0a9e('0x5'));var path=require(_0x0a9e('0x6'));var sox=require(_0x0a9e('0x7'));var csv=require(_0x0a9e('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x0a9e('0x9'));var _=require(_0x0a9e('0xa'));var squel=require(_0x0a9e('0xb'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x0a9e('0xc'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x0a9e('0xd'));var Redis=require(_0x0a9e('0xe'));var authService=require(_0x0a9e('0xf'));var qs=require(_0x0a9e('0x10'));var as=require(_0x0a9e('0x11'));var hardwareService=require(_0x0a9e('0x12'));var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x0a9e('0x13'));var db=require(_0x0a9e('0x14'))['db'];config[_0x0a9e('0x15')]=_[_0x0a9e('0x16')](config[_0x0a9e('0x15')],{'host':_0x0a9e('0x17'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x0a9e('0x15')]));require(_0x0a9e('0x18'))[_0x0a9e('0x19')](socket);var jayson=require(_0x0a9e('0x1a'));var client=jayson[_0x0a9e('0x1b')][_0x0a9e('0x1c')]({'port':0x232a});function respondWithRpcPromise(_0x52a03d,_0x22dccb,_0x5d0880,_0x1985b6){return new BPromise(function(_0x519dfd,_0x16033c){var _0x12066b=_0x1985b6||client;return _0x12066b['request'](_0x52a03d,_0x5d0880)[_0x0a9e('0x1d')](function(_0x5a0a06){logger[_0x0a9e('0x1e')](_0x0a9e('0x1f'),_0x22dccb,_0x0a9e('0x20'));logger[_0x0a9e('0x21')](_0x0a9e('0x22'),_0x22dccb,_0x0a9e('0x20'),JSON[_0x0a9e('0x23')](_0x5a0a06));if(_0x5a0a06[_0x0a9e('0x24')]){if(_0x5a0a06[_0x0a9e('0x24')][_0x0a9e('0x25')]===0x1f4){logger[_0x0a9e('0x24')](_0x0a9e('0x1f'),_0x22dccb,_0x5a0a06['error'][_0x0a9e('0x26')]);return _0x16033c(_0x5a0a06[_0x0a9e('0x24')]['message']);}logger[_0x0a9e('0x24')]('ChatGroup,\x20%s,\x20%s',_0x22dccb,_0x5a0a06['error'][_0x0a9e('0x26')]);return _0x519dfd(_0x5a0a06[_0x0a9e('0x24')][_0x0a9e('0x26')]);}else{logger[_0x0a9e('0x1e')]('ChatGroup,\x20%s,\x20%s',_0x22dccb,_0x0a9e('0x20'));_0x519dfd(_0x5a0a06[_0x0a9e('0x27')][_0x0a9e('0x26')]);}})[_0x0a9e('0x28')](function(_0x370d86){logger[_0x0a9e('0x24')](_0x0a9e('0x1f'),_0x22dccb,_0x370d86);_0x16033c(_0x370d86);});});}function respondWithStatusCode(_0x5ea472,_0x59181e){_0x59181e=_0x59181e||0xcc;return function(_0x197ec0){if(_0x197ec0){return _0x5ea472[_0x0a9e('0x29')](_0x59181e);}return _0x5ea472[_0x0a9e('0x2a')](_0x59181e)[_0x0a9e('0x2b')]();};}function respondWithResult(_0x526cf3,_0x384319){_0x384319=_0x384319||0xc8;return function(_0x479bc4){if(_0x479bc4){return _0x526cf3[_0x0a9e('0x2a')](_0x384319)['json'](_0x479bc4);}};}function respondWithFilteredResult(_0x1dc186,_0x34dc65){return function(_0x25fba9){if(_0x25fba9){var _0x14433c=typeof _0x34dc65[_0x0a9e('0x2c')]===_0x0a9e('0x2d')&&typeof _0x34dc65[_0x0a9e('0x2e')]===_0x0a9e('0x2d');var _0x5a101a=_0x25fba9[_0x0a9e('0x2f')];var _0x468813=_0x14433c?0x0:_0x34dc65[_0x0a9e('0x2c')];var _0x2ec755=_0x14433c?_0x25fba9['count']:_0x34dc65[_0x0a9e('0x2c')]+_0x34dc65[_0x0a9e('0x2e')];var _0x1843b2;if(_0x2ec755>=_0x5a101a){_0x2ec755=_0x5a101a;_0x1843b2=0xc8;}else{_0x1843b2=0xce;}_0x1dc186[_0x0a9e('0x2a')](_0x1843b2);return _0x1dc186[_0x0a9e('0x30')](_0x0a9e('0x31'),_0x468813+'-'+_0x2ec755+'/'+_0x5a101a)[_0x0a9e('0x32')](_0x25fba9);}return null;};}function patchUpdates(_0x2e8759){return function(_0x1dbde2){try{jsonpatch['apply'](_0x1dbde2,_0x2e8759,!![]);}catch(_0x426950){return BPromise['reject'](_0x426950);}return _0x1dbde2[_0x0a9e('0x33')]();};}function saveUpdates(_0x3ae878,_0x1122db){return function(_0x33bdb7){if(_0x33bdb7){return _0x33bdb7[_0x0a9e('0x34')](_0x3ae878)['then'](function(_0x66c1d2){return _0x66c1d2;});}return null;};}function removeEntity(_0x46f0a5,_0x40cb85){return function(_0x2da5c0){if(_0x2da5c0){return _0x2da5c0[_0x0a9e('0x35')]()[_0x0a9e('0x1d')](function(){_0x46f0a5[_0x0a9e('0x2a')](0xcc)[_0x0a9e('0x2b')]();});}};}function handleEntityNotFound(_0x5583a4,_0x44295a){return function(_0x5e7238){if(!_0x5e7238){_0x5583a4[_0x0a9e('0x29')](0x194);}return _0x5e7238;};}function handleError(_0x14b13f,_0x2b7e7f){_0x2b7e7f=_0x2b7e7f||0x1f4;return function(_0x3f3d41){logger['error'](_0x3f3d41[_0x0a9e('0x36')]);if(_0x3f3d41[_0x0a9e('0x37')]){delete _0x3f3d41[_0x0a9e('0x37')];}_0x14b13f[_0x0a9e('0x2a')](_0x2b7e7f)['send'](_0x3f3d41);};}exports['index']=function(_0x1e8694,_0x5640eb){var _0x24936a={},_0x3d9717={},_0x381c37={'count':0x0,'rows':[]};var _0x1ef87a=_['map'](db[_0x0a9e('0x38')][_0x0a9e('0x39')],function(_0x3cae){return{'name':_0x3cae['fieldName'],'type':_0x3cae[_0x0a9e('0x3a')][_0x0a9e('0x3b')]};});_0x3d9717[_0x0a9e('0x3c')]=_['map'](_0x1ef87a,'name');_0x3d9717[_0x0a9e('0x3d')]=_[_0x0a9e('0x3e')](_0x1e8694['query']);_0x3d9717[_0x0a9e('0x3f')]=_[_0x0a9e('0x40')](_0x3d9717[_0x0a9e('0x3c')],_0x3d9717[_0x0a9e('0x3d')]);_0x24936a['attributes']=_['intersection'](_0x3d9717[_0x0a9e('0x3c')],qs[_0x0a9e('0x41')](_0x1e8694['query'][_0x0a9e('0x41')]));_0x24936a[_0x0a9e('0x42')]=_0x24936a[_0x0a9e('0x42')]['length']?_0x24936a[_0x0a9e('0x42')]:_0x3d9717[_0x0a9e('0x3c')];if(!_0x1e8694[_0x0a9e('0x3d')][_0x0a9e('0x43')](_0x0a9e('0x44'))){_0x24936a[_0x0a9e('0x2e')]=qs[_0x0a9e('0x2e')](_0x1e8694[_0x0a9e('0x3d')][_0x0a9e('0x2e')]);_0x24936a[_0x0a9e('0x2c')]=qs[_0x0a9e('0x2c')](_0x1e8694[_0x0a9e('0x3d')][_0x0a9e('0x2c')]);}_0x24936a[_0x0a9e('0x45')]=qs[_0x0a9e('0x46')](_0x1e8694['query']['sort']);_0x24936a[_0x0a9e('0x47')]=qs[_0x0a9e('0x3f')](_[_0x0a9e('0x48')](_0x1e8694[_0x0a9e('0x3d')],_0x3d9717[_0x0a9e('0x3f')]),_0x1ef87a);if(_0x1e8694[_0x0a9e('0x3d')][_0x0a9e('0x49')]){_0x24936a[_0x0a9e('0x47')]=_[_0x0a9e('0x4a')](_0x24936a[_0x0a9e('0x47')],{'$or':_[_0x0a9e('0x4b')](_0x1ef87a,function(_0x35ed4a){if(_0x35ed4a['type']!==_0x0a9e('0x4c')){var _0x138b8b={};_0x138b8b[_0x35ed4a[_0x0a9e('0x37')]]={'$like':'%'+_0x1e8694[_0x0a9e('0x3d')][_0x0a9e('0x49')]+'%'};return _0x138b8b;}})});}_0x24936a=_[_0x0a9e('0x4a')]({},_0x24936a,_0x1e8694[_0x0a9e('0x4d')]);var _0x44dd99={'where':_0x24936a['where']};return db[_0x0a9e('0x38')]['count'](_0x44dd99)[_0x0a9e('0x1d')](function(_0x476688){_0x381c37[_0x0a9e('0x2f')]=_0x476688;if(_0x1e8694['query'][_0x0a9e('0x4e')]){_0x24936a[_0x0a9e('0x4f')]=[{'all':!![]}];}return db[_0x0a9e('0x38')][_0x0a9e('0x50')](_0x24936a);})[_0x0a9e('0x1d')](function(_0x37be73){_0x381c37[_0x0a9e('0x51')]=_0x37be73;return _0x381c37;})['then'](respondWithFilteredResult(_0x5640eb,_0x24936a))[_0x0a9e('0x28')](handleError(_0x5640eb,null));};exports[_0x0a9e('0x52')]=function(_0x1b5e80,_0x16f976){var _0x409789={'raw':!![],'where':{'id':_0x1b5e80[_0x0a9e('0x53')]['id']}},_0x992c77={};_0x992c77[_0x0a9e('0x3c')]=_[_0x0a9e('0x3e')](db['ChatGroup'][_0x0a9e('0x39')]);_0x992c77[_0x0a9e('0x3d')]=_['keys'](_0x1b5e80['query']);_0x992c77['filters']=_[_0x0a9e('0x40')](_0x992c77[_0x0a9e('0x3c')],_0x992c77[_0x0a9e('0x3d')]);_0x409789[_0x0a9e('0x42')]=_[_0x0a9e('0x40')](_0x992c77[_0x0a9e('0x3c')],qs[_0x0a9e('0x41')](_0x1b5e80[_0x0a9e('0x3d')]['fields']));_0x409789['attributes']=_0x409789['attributes'][_0x0a9e('0x54')]?_0x409789[_0x0a9e('0x42')]:_0x992c77[_0x0a9e('0x3c')];if(_0x1b5e80['query'][_0x0a9e('0x4e')]){_0x409789[_0x0a9e('0x4f')]=[{'all':!![]}];}_0x409789=_['merge']({},_0x409789,_0x1b5e80['options']);return db[_0x0a9e('0x38')]['find'](_0x409789)[_0x0a9e('0x1d')](handleEntityNotFound(_0x16f976,null))['then'](respondWithResult(_0x16f976,null))[_0x0a9e('0x28')](handleError(_0x16f976,null));};exports[_0x0a9e('0x55')]=function(_0x439340,_0x53613a){return db[_0x0a9e('0x38')][_0x0a9e('0x55')](_0x439340['body'],{})['then'](respondWithResult(_0x53613a,0xc9))[_0x0a9e('0x28')](handleError(_0x53613a,null));};exports[_0x0a9e('0x34')]=function(_0x49c095,_0x145931){if(_0x49c095['body']['id']){delete _0x49c095[_0x0a9e('0x56')]['id'];}return db['ChatGroup'][_0x0a9e('0x57')]({'where':{'id':_0x49c095['params']['id']}})['then'](handleEntityNotFound(_0x145931,null))['then'](saveUpdates(_0x49c095[_0x0a9e('0x56')],null))['then'](respondWithResult(_0x145931,null))[_0x0a9e('0x28')](handleError(_0x145931,null));};exports[_0x0a9e('0x35')]=function(_0x3cfd00,_0x19b4df){return db[_0x0a9e('0x38')][_0x0a9e('0x57')]({'where':{'id':_0x3cfd00[_0x0a9e('0x53')]['id']}})[_0x0a9e('0x1d')](handleEntityNotFound(_0x19b4df,null))['then'](removeEntity(_0x19b4df,null))[_0x0a9e('0x28')](handleError(_0x19b4df,null));};exports[_0x0a9e('0x58')]=function(_0x2642bb,_0x30c491){return db[_0x0a9e('0x38')][_0x0a9e('0x58')]()['then'](respondWithResult(_0x30c491,null))[_0x0a9e('0x28')](handleError(_0x30c491,null));};exports[_0x0a9e('0x59')]=function(_0x5239ef,_0x3649cc,_0x5cc8fb){return db[_0x0a9e('0x5a')]['count']({'where':{'ChatGroupId':_0x5239ef['params']['id'],'ToId':_0x5239ef['user']['id'],'read':![]}})[_0x0a9e('0x1d')](function(_0x49d231){return{'id':_[_0x0a9e('0x5b')](_0x5239ef[_0x0a9e('0x53')]['id']),'count':_0x49d231};})[_0x0a9e('0x1d')](respondWithResult(_0x3649cc,null))[_0x0a9e('0x28')](handleError(_0x3649cc,null));};exports[_0x0a9e('0x5c')]=function(_0x26d7db,_0x49eed0,_0x1627a7){return db['ChatGroup'][_0x0a9e('0x57')]({'where':{'id':_0x26d7db[_0x0a9e('0x53')]['id']}})[_0x0a9e('0x1d')](handleEntityNotFound(_0x49eed0,null))['then'](function(_0x453360){if(_0x453360){return _0x453360[_0x0a9e('0x5c')](_0x26d7db[_0x0a9e('0x56')][_0x0a9e('0x5d')],_['omit'](_0x26d7db[_0x0a9e('0x56')],[_0x0a9e('0x5d'),'id'])||{});}})['then'](respondWithResult(_0x49eed0,null))[_0x0a9e('0x28')](handleError(_0x49eed0,null));};exports[_0x0a9e('0x5e')]=function(_0x88dcbf,_0x409b29,_0x401837){var _0x4d4a35={};var _0x176840={};var _0x2937e0;var _0x281c7d;return db['ChatGroup'][_0x0a9e('0x5f')]({'where':{'id':_0x88dcbf['params']['id']}})['then'](handleEntityNotFound(_0x409b29,null))[_0x0a9e('0x1d')](function(_0x4556c5){if(_0x4556c5){_0x2937e0=_0x4556c5;_0x176840[_0x0a9e('0x3c')]=_[_0x0a9e('0x3e')](db[_0x0a9e('0x60')][_0x0a9e('0x39')]);_0x176840[_0x0a9e('0x3d')]=_[_0x0a9e('0x3e')](_0x88dcbf[_0x0a9e('0x3d')]);_0x176840[_0x0a9e('0x3f')]=_[_0x0a9e('0x40')](_0x176840[_0x0a9e('0x3c')],_0x176840[_0x0a9e('0x3d')]);_0x4d4a35[_0x0a9e('0x42')]=_[_0x0a9e('0x40')](_0x176840[_0x0a9e('0x3c')],qs[_0x0a9e('0x41')](_0x88dcbf[_0x0a9e('0x3d')]['fields']));_0x4d4a35[_0x0a9e('0x42')]=_0x4d4a35[_0x0a9e('0x42')][_0x0a9e('0x54')]?_0x4d4a35['attributes']:_0x176840[_0x0a9e('0x3c')];_0x4d4a35[_0x0a9e('0x45')]=qs['sort'](_0x88dcbf[_0x0a9e('0x3d')][_0x0a9e('0x46')]);_0x4d4a35[_0x0a9e('0x47')]=qs[_0x0a9e('0x3f')](_[_0x0a9e('0x48')](_0x88dcbf['query'],_0x176840['filters']));if(_0x88dcbf['query'][_0x0a9e('0x49')]){_0x4d4a35[_0x0a9e('0x47')]=_[_0x0a9e('0x4a')](_0x4d4a35[_0x0a9e('0x47')],{'$or':_[_0x0a9e('0x4b')](_0x4d4a35[_0x0a9e('0x42')],function(_0xeef20){var _0x1a0677={};_0x1a0677[_0xeef20]={'$like':'%'+_0x88dcbf['query'][_0x0a9e('0x49')]+'%'};return _0x1a0677;})});}_0x4d4a35=_[_0x0a9e('0x4a')]({},_0x4d4a35,_0x88dcbf[_0x0a9e('0x4d')]);return _0x2937e0['getMembers'](_0x4d4a35);}})[_0x0a9e('0x1d')](function(_0x583b2e){if(_0x583b2e){_0x281c7d=_0x583b2e[_0x0a9e('0x54')];if(!_0x88dcbf[_0x0a9e('0x3d')]['hasOwnProperty'](_0x0a9e('0x44'))){_0x4d4a35[_0x0a9e('0x2e')]=qs[_0x0a9e('0x2e')](_0x88dcbf[_0x0a9e('0x3d')]['limit']);_0x4d4a35[_0x0a9e('0x2c')]=qs[_0x0a9e('0x2c')](_0x88dcbf[_0x0a9e('0x3d')][_0x0a9e('0x2c')]);}return _0x2937e0['getMembers'](_0x4d4a35);}})[_0x0a9e('0x1d')](function(_0x3d91db){if(_0x3d91db){return _0x3d91db?{'count':_0x281c7d,'rows':_0x3d91db}:null;}})[_0x0a9e('0x1d')](respondWithResult(_0x409b29,null))[_0x0a9e('0x28')](handleError(_0x409b29,null));};exports['removeMembers']=function(_0x290d43,_0x3511c9,_0x30a4c7){return db[_0x0a9e('0x38')][_0x0a9e('0x57')]({'where':{'id':_0x290d43[_0x0a9e('0x53')]['id']}})[_0x0a9e('0x1d')](handleEntityNotFound(_0x3511c9,null))[_0x0a9e('0x1d')](function(_0x1a7b03){if(_0x1a7b03){return _0x1a7b03[_0x0a9e('0x61')](_0x290d43[_0x0a9e('0x3d')][_0x0a9e('0x5d')]);}})[_0x0a9e('0x1d')](respondWithStatusCode(_0x3511c9,null))[_0x0a9e('0x28')](handleError(_0x3511c9,null));};exports['addMessage']=function(_0xf4120f,_0x11da9c,_0xc599b3){if(_0xf4120f['body']['id']){delete _0xf4120f[_0x0a9e('0x56')]['id'];}return db[_0x0a9e('0x38')][_0x0a9e('0x57')]({'where':{'id':_0xf4120f[_0x0a9e('0x53')]['id']}})['then'](handleEntityNotFound(_0x11da9c,null))['then'](function(_0x7ebea8){if(_0x7ebea8){_0xf4120f[_0x0a9e('0x56')]['ChatGroupId']=_0x7ebea8['id'];return db[_0x0a9e('0x5a')]['create'](_0xf4120f[_0x0a9e('0x56')]);}})[_0x0a9e('0x1d')](respondWithResult(_0x11da9c,null))['catch'](handleError(_0x11da9c,null));};exports[_0x0a9e('0x62')]=function(_0x41cf12,_0x2d2286,_0x42b959){var _0x3755fe={};var _0x1f42a0={};var _0x444f1f;var _0x482ca2;return db[_0x0a9e('0x38')][_0x0a9e('0x5f')]({'where':{'id':_0x41cf12[_0x0a9e('0x53')]['id']}})[_0x0a9e('0x1d')](handleEntityNotFound(_0x2d2286,null))['then'](function(_0xf51744){if(_0xf51744){_0x444f1f=_0xf51744;_0x1f42a0[_0x0a9e('0x3c')]=_['keys'](db[_0x0a9e('0x5a')]['rawAttributes']);_0x1f42a0[_0x0a9e('0x3d')]=_[_0x0a9e('0x3e')](_0x41cf12[_0x0a9e('0x3d')]);_0x1f42a0[_0x0a9e('0x3f')]=_['intersection'](_0x1f42a0['model'],_0x1f42a0[_0x0a9e('0x3d')]);_0x3755fe[_0x0a9e('0x42')]=_[_0x0a9e('0x40')](_0x1f42a0['model'],qs[_0x0a9e('0x41')](_0x41cf12[_0x0a9e('0x3d')]['fields']));_0x3755fe['attributes']=_0x3755fe[_0x0a9e('0x42')]['length']?_0x3755fe['attributes']:_0x1f42a0['model'];_0x3755fe[_0x0a9e('0x45')]=qs[_0x0a9e('0x46')](_0x41cf12[_0x0a9e('0x3d')][_0x0a9e('0x46')]);_0x3755fe[_0x0a9e('0x47')]=qs[_0x0a9e('0x3f')](_['pick'](_0x41cf12[_0x0a9e('0x3d')],_0x1f42a0['filters']));if(_0x41cf12[_0x0a9e('0x3d')][_0x0a9e('0x49')]){_0x3755fe[_0x0a9e('0x47')]=_[_0x0a9e('0x4a')](_0x3755fe['where'],{'$or':_[_0x0a9e('0x4b')](_0x3755fe[_0x0a9e('0x42')],function(_0x1d4877){var _0x5b74c3={};_0x5b74c3[_0x1d4877]={'$like':'%'+_0x41cf12[_0x0a9e('0x3d')][_0x0a9e('0x49')]+'%'};return _0x5b74c3;})});}if(_0x41cf12[_0x0a9e('0x3d')][_0x0a9e('0x63')]){var _0x255e49=_0x41cf12[_0x0a9e('0x3d')][_0x0a9e('0x63')][_0x0a9e('0x64')](',');var _0x509efe={};_0x509efe[_0x255e49[0x0]]={'$gte':moment(_0x255e49[0x1])[_0x0a9e('0x65')](_0x0a9e('0x66'))};_0x3755fe['where']=_[_0x0a9e('0x4a')](_0x3755fe[_0x0a9e('0x47')],_0x509efe);}_0x3755fe=_[_0x0a9e('0x4a')]({},_0x3755fe,_0x41cf12['options']);return _0x444f1f[_0x0a9e('0x62')](_0x3755fe);}})['then'](function(_0x8c8fbe){if(_0x8c8fbe){_0x482ca2=_0x8c8fbe[_0x0a9e('0x54')];if(!_0x41cf12[_0x0a9e('0x3d')][_0x0a9e('0x43')](_0x0a9e('0x44'))){_0x3755fe[_0x0a9e('0x2e')]=qs[_0x0a9e('0x2e')](_0x41cf12[_0x0a9e('0x3d')]['limit']);_0x3755fe[_0x0a9e('0x2c')]=qs[_0x0a9e('0x2c')](_0x41cf12[_0x0a9e('0x3d')][_0x0a9e('0x2c')]);}return _0x444f1f[_0x0a9e('0x62')](_0x3755fe);}})[_0x0a9e('0x1d')](function(_0x6803d6){if(_0x6803d6){return _0x6803d6?{'count':_0x482ca2,'rows':_0x6803d6}:null;}})[_0x0a9e('0x1d')](respondWithResult(_0x2d2286,null))[_0x0a9e('0x28')](handleError(_0x2d2286,null));}; \ No newline at end of file +var _0xa9e0=['../../config/license/hardware','../../config/license/util','../../mysqldb','redis','defaults','localhost','./chatGroup.socket','register','jayson/promise','client','http','then','info','ChatGroup,\x20%s,\x20%s','request\x20sent','debug','ChatGroup,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','sendStatus','status','end','offset','undefined','limit','count','set','Content-Range','json','save','update','destroy','stack','name','ChatGroup','rawAttributes','type','key','model','query','keys','filters','intersection','fields','attributes','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','map','VIRTUAL','options','includeAll','include','findAll','rows','show','params','length','create','body','find','describe','getUnread','ChatInternalMessage','toInteger','addMembers','ids','getMembers','findOne','User','removeMembers','getMessages','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','eml-format','rimraf','zip-dir','moment','mustache','util','path','sox','to-csv','fs-extra','lodash','squel','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch'];(function(_0x2a6809,_0x44edde){var _0x11c371=function(_0x1a4888){while(--_0x1a4888){_0x2a6809['push'](_0x2a6809['shift']());}};_0x11c371(++_0x44edde);}(_0xa9e0,0x123));var _0x0a9e=function(_0x5e3b04,_0xbb6795){_0x5e3b04=_0x5e3b04-0x0;var _0x1fc44d=_0xa9e0[_0x5e3b04];return _0x1fc44d;};'use strict';var emlformat=require(_0x0a9e('0x0'));var rimraf=require(_0x0a9e('0x1'));var zipdir=require(_0x0a9e('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x0a9e('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x0a9e('0x4'));var util=require(_0x0a9e('0x5'));var path=require(_0x0a9e('0x6'));var sox=require(_0x0a9e('0x7'));var csv=require(_0x0a9e('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x0a9e('0x9'));var _=require(_0x0a9e('0xa'));var squel=require(_0x0a9e('0xb'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x0a9e('0xc'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x0a9e('0xd'));var Redis=require(_0x0a9e('0xe'));var authService=require(_0x0a9e('0xf'));var qs=require(_0x0a9e('0x10'));var as=require(_0x0a9e('0x11'));var hardwareService=require(_0x0a9e('0x12'));var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x0a9e('0x13'));var db=require(_0x0a9e('0x14'))['db'];config[_0x0a9e('0x15')]=_[_0x0a9e('0x16')](config[_0x0a9e('0x15')],{'host':_0x0a9e('0x17'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x0a9e('0x15')]));require(_0x0a9e('0x18'))[_0x0a9e('0x19')](socket);var jayson=require(_0x0a9e('0x1a'));var client=jayson[_0x0a9e('0x1b')][_0x0a9e('0x1c')]({'port':0x232a});function respondWithRpcPromise(_0x52a03d,_0x22dccb,_0x5d0880,_0x1985b6){return new BPromise(function(_0x519dfd,_0x16033c){var _0x12066b=_0x1985b6||client;return _0x12066b['request'](_0x52a03d,_0x5d0880)[_0x0a9e('0x1d')](function(_0x5a0a06){logger[_0x0a9e('0x1e')](_0x0a9e('0x1f'),_0x22dccb,_0x0a9e('0x20'));logger[_0x0a9e('0x21')](_0x0a9e('0x22'),_0x22dccb,_0x0a9e('0x20'),JSON[_0x0a9e('0x23')](_0x5a0a06));if(_0x5a0a06[_0x0a9e('0x24')]){if(_0x5a0a06[_0x0a9e('0x24')][_0x0a9e('0x25')]===0x1f4){logger[_0x0a9e('0x24')](_0x0a9e('0x1f'),_0x22dccb,_0x5a0a06['error'][_0x0a9e('0x26')]);return _0x16033c(_0x5a0a06[_0x0a9e('0x24')]['message']);}logger[_0x0a9e('0x24')]('ChatGroup,\x20%s,\x20%s',_0x22dccb,_0x5a0a06['error'][_0x0a9e('0x26')]);return _0x519dfd(_0x5a0a06[_0x0a9e('0x24')][_0x0a9e('0x26')]);}else{logger[_0x0a9e('0x1e')]('ChatGroup,\x20%s,\x20%s',_0x22dccb,_0x0a9e('0x20'));_0x519dfd(_0x5a0a06[_0x0a9e('0x27')][_0x0a9e('0x26')]);}})[_0x0a9e('0x28')](function(_0x370d86){logger[_0x0a9e('0x24')](_0x0a9e('0x1f'),_0x22dccb,_0x370d86);_0x16033c(_0x370d86);});});}function respondWithStatusCode(_0x5ea472,_0x59181e){_0x59181e=_0x59181e||0xcc;return function(_0x197ec0){if(_0x197ec0){return _0x5ea472[_0x0a9e('0x29')](_0x59181e);}return _0x5ea472[_0x0a9e('0x2a')](_0x59181e)[_0x0a9e('0x2b')]();};}function respondWithResult(_0x526cf3,_0x384319){_0x384319=_0x384319||0xc8;return function(_0x479bc4){if(_0x479bc4){return _0x526cf3[_0x0a9e('0x2a')](_0x384319)['json'](_0x479bc4);}};}function respondWithFilteredResult(_0x1dc186,_0x34dc65){return function(_0x25fba9){if(_0x25fba9){var _0x14433c=typeof _0x34dc65[_0x0a9e('0x2c')]===_0x0a9e('0x2d')&&typeof _0x34dc65[_0x0a9e('0x2e')]===_0x0a9e('0x2d');var _0x5a101a=_0x25fba9[_0x0a9e('0x2f')];var _0x468813=_0x14433c?0x0:_0x34dc65[_0x0a9e('0x2c')];var _0x2ec755=_0x14433c?_0x25fba9['count']:_0x34dc65[_0x0a9e('0x2c')]+_0x34dc65[_0x0a9e('0x2e')];var _0x1843b2;if(_0x2ec755>=_0x5a101a){_0x2ec755=_0x5a101a;_0x1843b2=0xc8;}else{_0x1843b2=0xce;}_0x1dc186[_0x0a9e('0x2a')](_0x1843b2);return _0x1dc186[_0x0a9e('0x30')](_0x0a9e('0x31'),_0x468813+'-'+_0x2ec755+'/'+_0x5a101a)[_0x0a9e('0x32')](_0x25fba9);}return null;};}function patchUpdates(_0x2e8759){return function(_0x1dbde2){try{jsonpatch['apply'](_0x1dbde2,_0x2e8759,!![]);}catch(_0x426950){return BPromise['reject'](_0x426950);}return _0x1dbde2[_0x0a9e('0x33')]();};}function saveUpdates(_0x3ae878,_0x1122db){return function(_0x33bdb7){if(_0x33bdb7){return _0x33bdb7[_0x0a9e('0x34')](_0x3ae878)['then'](function(_0x66c1d2){return _0x66c1d2;});}return null;};}function removeEntity(_0x46f0a5,_0x40cb85){return function(_0x2da5c0){if(_0x2da5c0){return _0x2da5c0[_0x0a9e('0x35')]()[_0x0a9e('0x1d')](function(){_0x46f0a5[_0x0a9e('0x2a')](0xcc)[_0x0a9e('0x2b')]();});}};}function handleEntityNotFound(_0x5583a4,_0x44295a){return function(_0x5e7238){if(!_0x5e7238){_0x5583a4[_0x0a9e('0x29')](0x194);}return _0x5e7238;};}function handleError(_0x14b13f,_0x2b7e7f){_0x2b7e7f=_0x2b7e7f||0x1f4;return function(_0x3f3d41){logger['error'](_0x3f3d41[_0x0a9e('0x36')]);if(_0x3f3d41[_0x0a9e('0x37')]){delete _0x3f3d41[_0x0a9e('0x37')];}_0x14b13f[_0x0a9e('0x2a')](_0x2b7e7f)['send'](_0x3f3d41);};}exports['index']=function(_0x1e8694,_0x5640eb){var _0x24936a={},_0x3d9717={},_0x381c37={'count':0x0,'rows':[]};var _0x1ef87a=_['map'](db[_0x0a9e('0x38')][_0x0a9e('0x39')],function(_0x3cae){return{'name':_0x3cae['fieldName'],'type':_0x3cae[_0x0a9e('0x3a')][_0x0a9e('0x3b')]};});_0x3d9717[_0x0a9e('0x3c')]=_['map'](_0x1ef87a,'name');_0x3d9717[_0x0a9e('0x3d')]=_[_0x0a9e('0x3e')](_0x1e8694['query']);_0x3d9717[_0x0a9e('0x3f')]=_[_0x0a9e('0x40')](_0x3d9717[_0x0a9e('0x3c')],_0x3d9717[_0x0a9e('0x3d')]);_0x24936a['attributes']=_['intersection'](_0x3d9717[_0x0a9e('0x3c')],qs[_0x0a9e('0x41')](_0x1e8694['query'][_0x0a9e('0x41')]));_0x24936a[_0x0a9e('0x42')]=_0x24936a[_0x0a9e('0x42')]['length']?_0x24936a[_0x0a9e('0x42')]:_0x3d9717[_0x0a9e('0x3c')];if(!_0x1e8694[_0x0a9e('0x3d')][_0x0a9e('0x43')](_0x0a9e('0x44'))){_0x24936a[_0x0a9e('0x2e')]=qs[_0x0a9e('0x2e')](_0x1e8694[_0x0a9e('0x3d')][_0x0a9e('0x2e')]);_0x24936a[_0x0a9e('0x2c')]=qs[_0x0a9e('0x2c')](_0x1e8694[_0x0a9e('0x3d')][_0x0a9e('0x2c')]);}_0x24936a[_0x0a9e('0x45')]=qs[_0x0a9e('0x46')](_0x1e8694['query']['sort']);_0x24936a[_0x0a9e('0x47')]=qs[_0x0a9e('0x3f')](_[_0x0a9e('0x48')](_0x1e8694[_0x0a9e('0x3d')],_0x3d9717[_0x0a9e('0x3f')]),_0x1ef87a);if(_0x1e8694[_0x0a9e('0x3d')][_0x0a9e('0x49')]){_0x24936a[_0x0a9e('0x47')]=_[_0x0a9e('0x4a')](_0x24936a[_0x0a9e('0x47')],{'$or':_[_0x0a9e('0x4b')](_0x1ef87a,function(_0x35ed4a){if(_0x35ed4a['type']!==_0x0a9e('0x4c')){var _0x138b8b={};_0x138b8b[_0x35ed4a[_0x0a9e('0x37')]]={'$like':'%'+_0x1e8694[_0x0a9e('0x3d')][_0x0a9e('0x49')]+'%'};return _0x138b8b;}})});}_0x24936a=_[_0x0a9e('0x4a')]({},_0x24936a,_0x1e8694[_0x0a9e('0x4d')]);var _0x44dd99={'where':_0x24936a['where']};return db[_0x0a9e('0x38')]['count'](_0x44dd99)[_0x0a9e('0x1d')](function(_0x476688){_0x381c37[_0x0a9e('0x2f')]=_0x476688;if(_0x1e8694['query'][_0x0a9e('0x4e')]){_0x24936a[_0x0a9e('0x4f')]=[{'all':!![]}];}return db[_0x0a9e('0x38')][_0x0a9e('0x50')](_0x24936a);})[_0x0a9e('0x1d')](function(_0x37be73){_0x381c37[_0x0a9e('0x51')]=_0x37be73;return _0x381c37;})['then'](respondWithFilteredResult(_0x5640eb,_0x24936a))[_0x0a9e('0x28')](handleError(_0x5640eb,null));};exports[_0x0a9e('0x52')]=function(_0x1b5e80,_0x16f976){var _0x409789={'raw':!![],'where':{'id':_0x1b5e80[_0x0a9e('0x53')]['id']}},_0x992c77={};_0x992c77[_0x0a9e('0x3c')]=_[_0x0a9e('0x3e')](db['ChatGroup'][_0x0a9e('0x39')]);_0x992c77[_0x0a9e('0x3d')]=_['keys'](_0x1b5e80['query']);_0x992c77['filters']=_[_0x0a9e('0x40')](_0x992c77[_0x0a9e('0x3c')],_0x992c77[_0x0a9e('0x3d')]);_0x409789[_0x0a9e('0x42')]=_[_0x0a9e('0x40')](_0x992c77[_0x0a9e('0x3c')],qs[_0x0a9e('0x41')](_0x1b5e80[_0x0a9e('0x3d')]['fields']));_0x409789['attributes']=_0x409789['attributes'][_0x0a9e('0x54')]?_0x409789[_0x0a9e('0x42')]:_0x992c77[_0x0a9e('0x3c')];if(_0x1b5e80['query'][_0x0a9e('0x4e')]){_0x409789[_0x0a9e('0x4f')]=[{'all':!![]}];}_0x409789=_['merge']({},_0x409789,_0x1b5e80['options']);return db[_0x0a9e('0x38')]['find'](_0x409789)[_0x0a9e('0x1d')](handleEntityNotFound(_0x16f976,null))['then'](respondWithResult(_0x16f976,null))[_0x0a9e('0x28')](handleError(_0x16f976,null));};exports[_0x0a9e('0x55')]=function(_0x439340,_0x53613a){return db[_0x0a9e('0x38')][_0x0a9e('0x55')](_0x439340['body'],{})['then'](respondWithResult(_0x53613a,0xc9))[_0x0a9e('0x28')](handleError(_0x53613a,null));};exports[_0x0a9e('0x34')]=function(_0x49c095,_0x145931){if(_0x49c095['body']['id']){delete _0x49c095[_0x0a9e('0x56')]['id'];}return db['ChatGroup'][_0x0a9e('0x57')]({'where':{'id':_0x49c095['params']['id']}})['then'](handleEntityNotFound(_0x145931,null))['then'](saveUpdates(_0x49c095[_0x0a9e('0x56')],null))['then'](respondWithResult(_0x145931,null))[_0x0a9e('0x28')](handleError(_0x145931,null));};exports[_0x0a9e('0x35')]=function(_0x3cfd00,_0x19b4df){return db[_0x0a9e('0x38')][_0x0a9e('0x57')]({'where':{'id':_0x3cfd00[_0x0a9e('0x53')]['id']}})[_0x0a9e('0x1d')](handleEntityNotFound(_0x19b4df,null))['then'](removeEntity(_0x19b4df,null))[_0x0a9e('0x28')](handleError(_0x19b4df,null));};exports[_0x0a9e('0x58')]=function(_0x2642bb,_0x30c491){return db[_0x0a9e('0x38')][_0x0a9e('0x58')]()['then'](respondWithResult(_0x30c491,null))[_0x0a9e('0x28')](handleError(_0x30c491,null));};exports[_0x0a9e('0x59')]=function(_0x5239ef,_0x3649cc,_0x5cc8fb){return db[_0x0a9e('0x5a')]['count']({'where':{'ChatGroupId':_0x5239ef['params']['id'],'ToId':_0x5239ef['user']['id'],'read':![]}})[_0x0a9e('0x1d')](function(_0x49d231){return{'id':_[_0x0a9e('0x5b')](_0x5239ef[_0x0a9e('0x53')]['id']),'count':_0x49d231};})[_0x0a9e('0x1d')](respondWithResult(_0x3649cc,null))[_0x0a9e('0x28')](handleError(_0x3649cc,null));};exports[_0x0a9e('0x5c')]=function(_0x26d7db,_0x49eed0,_0x1627a7){return db['ChatGroup'][_0x0a9e('0x57')]({'where':{'id':_0x26d7db[_0x0a9e('0x53')]['id']}})[_0x0a9e('0x1d')](handleEntityNotFound(_0x49eed0,null))['then'](function(_0x453360){if(_0x453360){return _0x453360[_0x0a9e('0x5c')](_0x26d7db[_0x0a9e('0x56')][_0x0a9e('0x5d')],_['omit'](_0x26d7db[_0x0a9e('0x56')],[_0x0a9e('0x5d'),'id'])||{});}})['then'](respondWithResult(_0x49eed0,null))[_0x0a9e('0x28')](handleError(_0x49eed0,null));};exports[_0x0a9e('0x5e')]=function(_0x88dcbf,_0x409b29,_0x401837){var _0x4d4a35={};var _0x176840={};var _0x2937e0;var _0x281c7d;return db['ChatGroup'][_0x0a9e('0x5f')]({'where':{'id':_0x88dcbf['params']['id']}})['then'](handleEntityNotFound(_0x409b29,null))[_0x0a9e('0x1d')](function(_0x4556c5){if(_0x4556c5){_0x2937e0=_0x4556c5;_0x176840[_0x0a9e('0x3c')]=_[_0x0a9e('0x3e')](db[_0x0a9e('0x60')][_0x0a9e('0x39')]);_0x176840[_0x0a9e('0x3d')]=_[_0x0a9e('0x3e')](_0x88dcbf[_0x0a9e('0x3d')]);_0x176840[_0x0a9e('0x3f')]=_[_0x0a9e('0x40')](_0x176840[_0x0a9e('0x3c')],_0x176840[_0x0a9e('0x3d')]);_0x4d4a35[_0x0a9e('0x42')]=_[_0x0a9e('0x40')](_0x176840[_0x0a9e('0x3c')],qs[_0x0a9e('0x41')](_0x88dcbf[_0x0a9e('0x3d')]['fields']));_0x4d4a35[_0x0a9e('0x42')]=_0x4d4a35[_0x0a9e('0x42')][_0x0a9e('0x54')]?_0x4d4a35['attributes']:_0x176840[_0x0a9e('0x3c')];_0x4d4a35[_0x0a9e('0x45')]=qs['sort'](_0x88dcbf[_0x0a9e('0x3d')][_0x0a9e('0x46')]);_0x4d4a35[_0x0a9e('0x47')]=qs[_0x0a9e('0x3f')](_[_0x0a9e('0x48')](_0x88dcbf['query'],_0x176840['filters']));if(_0x88dcbf['query'][_0x0a9e('0x49')]){_0x4d4a35[_0x0a9e('0x47')]=_[_0x0a9e('0x4a')](_0x4d4a35[_0x0a9e('0x47')],{'$or':_[_0x0a9e('0x4b')](_0x4d4a35[_0x0a9e('0x42')],function(_0xeef20){var _0x1a0677={};_0x1a0677[_0xeef20]={'$like':'%'+_0x88dcbf['query'][_0x0a9e('0x49')]+'%'};return _0x1a0677;})});}_0x4d4a35=_[_0x0a9e('0x4a')]({},_0x4d4a35,_0x88dcbf[_0x0a9e('0x4d')]);return _0x2937e0['getMembers'](_0x4d4a35);}})[_0x0a9e('0x1d')](function(_0x583b2e){if(_0x583b2e){_0x281c7d=_0x583b2e[_0x0a9e('0x54')];if(!_0x88dcbf[_0x0a9e('0x3d')]['hasOwnProperty'](_0x0a9e('0x44'))){_0x4d4a35[_0x0a9e('0x2e')]=qs[_0x0a9e('0x2e')](_0x88dcbf[_0x0a9e('0x3d')]['limit']);_0x4d4a35[_0x0a9e('0x2c')]=qs[_0x0a9e('0x2c')](_0x88dcbf[_0x0a9e('0x3d')][_0x0a9e('0x2c')]);}return _0x2937e0['getMembers'](_0x4d4a35);}})[_0x0a9e('0x1d')](function(_0x3d91db){if(_0x3d91db){return _0x3d91db?{'count':_0x281c7d,'rows':_0x3d91db}:null;}})[_0x0a9e('0x1d')](respondWithResult(_0x409b29,null))[_0x0a9e('0x28')](handleError(_0x409b29,null));};exports['removeMembers']=function(_0x290d43,_0x3511c9,_0x30a4c7){return db[_0x0a9e('0x38')][_0x0a9e('0x57')]({'where':{'id':_0x290d43[_0x0a9e('0x53')]['id']}})[_0x0a9e('0x1d')](handleEntityNotFound(_0x3511c9,null))[_0x0a9e('0x1d')](function(_0x1a7b03){if(_0x1a7b03){return _0x1a7b03[_0x0a9e('0x61')](_0x290d43[_0x0a9e('0x3d')][_0x0a9e('0x5d')]);}})[_0x0a9e('0x1d')](respondWithStatusCode(_0x3511c9,null))[_0x0a9e('0x28')](handleError(_0x3511c9,null));};exports['addMessage']=function(_0xf4120f,_0x11da9c,_0xc599b3){if(_0xf4120f['body']['id']){delete _0xf4120f[_0x0a9e('0x56')]['id'];}return db[_0x0a9e('0x38')][_0x0a9e('0x57')]({'where':{'id':_0xf4120f[_0x0a9e('0x53')]['id']}})['then'](handleEntityNotFound(_0x11da9c,null))['then'](function(_0x7ebea8){if(_0x7ebea8){_0xf4120f[_0x0a9e('0x56')]['ChatGroupId']=_0x7ebea8['id'];return db[_0x0a9e('0x5a')]['create'](_0xf4120f[_0x0a9e('0x56')]);}})[_0x0a9e('0x1d')](respondWithResult(_0x11da9c,null))['catch'](handleError(_0x11da9c,null));};exports[_0x0a9e('0x62')]=function(_0x41cf12,_0x2d2286,_0x42b959){var _0x3755fe={};var _0x1f42a0={};var _0x444f1f;var _0x482ca2;return db[_0x0a9e('0x38')][_0x0a9e('0x5f')]({'where':{'id':_0x41cf12[_0x0a9e('0x53')]['id']}})[_0x0a9e('0x1d')](handleEntityNotFound(_0x2d2286,null))['then'](function(_0xf51744){if(_0xf51744){_0x444f1f=_0xf51744;_0x1f42a0[_0x0a9e('0x3c')]=_['keys'](db[_0x0a9e('0x5a')]['rawAttributes']);_0x1f42a0[_0x0a9e('0x3d')]=_[_0x0a9e('0x3e')](_0x41cf12[_0x0a9e('0x3d')]);_0x1f42a0[_0x0a9e('0x3f')]=_['intersection'](_0x1f42a0['model'],_0x1f42a0[_0x0a9e('0x3d')]);_0x3755fe[_0x0a9e('0x42')]=_[_0x0a9e('0x40')](_0x1f42a0['model'],qs[_0x0a9e('0x41')](_0x41cf12[_0x0a9e('0x3d')]['fields']));_0x3755fe['attributes']=_0x3755fe[_0x0a9e('0x42')]['length']?_0x3755fe['attributes']:_0x1f42a0['model'];_0x3755fe[_0x0a9e('0x45')]=qs[_0x0a9e('0x46')](_0x41cf12[_0x0a9e('0x3d')][_0x0a9e('0x46')]);_0x3755fe[_0x0a9e('0x47')]=qs[_0x0a9e('0x3f')](_['pick'](_0x41cf12[_0x0a9e('0x3d')],_0x1f42a0['filters']));if(_0x41cf12[_0x0a9e('0x3d')][_0x0a9e('0x49')]){_0x3755fe[_0x0a9e('0x47')]=_[_0x0a9e('0x4a')](_0x3755fe['where'],{'$or':_[_0x0a9e('0x4b')](_0x3755fe[_0x0a9e('0x42')],function(_0x1d4877){var _0x5b74c3={};_0x5b74c3[_0x1d4877]={'$like':'%'+_0x41cf12[_0x0a9e('0x3d')][_0x0a9e('0x49')]+'%'};return _0x5b74c3;})});}if(_0x41cf12[_0x0a9e('0x3d')][_0x0a9e('0x63')]){var _0x255e49=_0x41cf12[_0x0a9e('0x3d')][_0x0a9e('0x63')][_0x0a9e('0x64')](',');var _0x509efe={};_0x509efe[_0x255e49[0x0]]={'$gte':moment(_0x255e49[0x1])[_0x0a9e('0x65')](_0x0a9e('0x66'))};_0x3755fe['where']=_[_0x0a9e('0x4a')](_0x3755fe[_0x0a9e('0x47')],_0x509efe);}_0x3755fe=_[_0x0a9e('0x4a')]({},_0x3755fe,_0x41cf12['options']);return _0x444f1f[_0x0a9e('0x62')](_0x3755fe);}})['then'](function(_0x8c8fbe){if(_0x8c8fbe){_0x482ca2=_0x8c8fbe[_0x0a9e('0x54')];if(!_0x41cf12[_0x0a9e('0x3d')][_0x0a9e('0x43')](_0x0a9e('0x44'))){_0x3755fe[_0x0a9e('0x2e')]=qs[_0x0a9e('0x2e')](_0x41cf12[_0x0a9e('0x3d')]['limit']);_0x3755fe[_0x0a9e('0x2c')]=qs[_0x0a9e('0x2c')](_0x41cf12[_0x0a9e('0x3d')][_0x0a9e('0x2c')]);}return _0x444f1f[_0x0a9e('0x62')](_0x3755fe);}})[_0x0a9e('0x1d')](function(_0x6803d6){if(_0x6803d6){return _0x6803d6?{'count':_0x482ca2,'rows':_0x6803d6}:null;}})[_0x0a9e('0x1d')](respondWithResult(_0x2d2286,null))[_0x0a9e('0x28')](handleError(_0x2d2286,null));}; \ No newline at end of file diff --git a/server/api/chatGroup/chatGroup.events.js b/server/api/chatGroup/chatGroup.events.js index 727a82d..df840cf 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 _0x2cf3=['events','../../mysqldb','ChatGroup','save','remove','emit','hasOwnProperty'];(function(_0x24d7cb,_0x4177a4){var _0x4ba4a3=function(_0x332163){while(--_0x332163){_0x24d7cb['push'](_0x24d7cb['shift']());}};_0x4ba4a3(++_0x4177a4);}(_0x2cf3,0x111));var _0x32cf=function(_0x5db569,_0x3388e4){_0x5db569=_0x5db569-0x0;var _0x48bd4c=_0x2cf3[_0x5db569];return _0x48bd4c;};'use strict';var EventEmitter=require(_0x32cf('0x0'));var ChatGroup=require(_0x32cf('0x1'))['db'][_0x32cf('0x2')];var ChatGroupEvents=new EventEmitter();ChatGroupEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x32cf('0x3'),'afterUpdate':'update','afterDestroy':_0x32cf('0x4')};function emitEvent(_0x3aab42){return function(_0x3fe9ea,_0x384617,_0x35e1fa){ChatGroupEvents[_0x32cf('0x5')](_0x3aab42+':'+_0x3fe9ea['id'],_0x3fe9ea);ChatGroupEvents[_0x32cf('0x5')](_0x3aab42,_0x3fe9ea);_0x35e1fa(null);};}for(var e in events){if(events[_0x32cf('0x6')](e)){var event=events[e];ChatGroup['hook'](e,emitEvent(event));}}module['exports']=ChatGroupEvents; \ No newline at end of file +var _0x58ea=['ChatGroup','update','remove','emit','hasOwnProperty','hook','exports','events'];(function(_0x255fd9,_0x2157ad){var _0x5ec468=function(_0x2ecd19){while(--_0x2ecd19){_0x255fd9['push'](_0x255fd9['shift']());}};_0x5ec468(++_0x2157ad);}(_0x58ea,0xe7));var _0xa58e=function(_0x8d889e,_0x2b49cd){_0x8d889e=_0x8d889e-0x0;var _0x2c7edd=_0x58ea[_0x8d889e];return _0x2c7edd;};'use strict';var EventEmitter=require(_0xa58e('0x0'));var ChatGroup=require('../../mysqldb')['db'][_0xa58e('0x1')];var ChatGroupEvents=new EventEmitter();ChatGroupEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0xa58e('0x2'),'afterDestroy':_0xa58e('0x3')};function emitEvent(_0x4be1d8){return function(_0x223b5a,_0x54be28,_0x5a3685){ChatGroupEvents[_0xa58e('0x4')](_0x4be1d8+':'+_0x223b5a['id'],_0x223b5a);ChatGroupEvents['emit'](_0x4be1d8,_0x223b5a);_0x5a3685(null);};}for(var e in events){if(events[_0xa58e('0x5')](e)){var event=events[e];ChatGroup[_0xa58e('0x6')](e,emitEvent(event));}}module[_0xa58e('0x7')]=ChatGroupEvents; \ No newline at end of file diff --git a/server/api/chatGroup/chatGroup.model.js b/server/api/chatGroup/chatGroup.model.js index 4951093..ba8fbb7 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 _0x8381=['../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','exports','define','ChatGroup','chat_groups','lodash','util'];(function(_0x3d03cf,_0x4b8f22){var _0x31ca3a=function(_0x3866e4){while(--_0x3866e4){_0x3d03cf['push'](_0x3d03cf['shift']());}};_0x31ca3a(++_0x4b8f22);}(_0x8381,0x132));var _0x1838=function(_0x3a752a,_0x3f0265){_0x3a752a=_0x3a752a-0x0;var _0x38e0ae=_0x8381[_0x3a752a];return _0x38e0ae;};'use strict';var _=require(_0x1838('0x0'));var util=require(_0x1838('0x1'));var logger=require(_0x1838('0x2'))(_0x1838('0x3'));var moment=require(_0x1838('0x4'));var BPromise=require(_0x1838('0x5'));var rp=require(_0x1838('0x6'));var fs=require('fs');var path=require(_0x1838('0x7'));var rimraf=require(_0x1838('0x8'));var config=require(_0x1838('0x9'));var attributes=require('./chatGroup.attributes');module[_0x1838('0xa')]=function(_0x7860ce,_0x149a96){return _0x7860ce[_0x1838('0xb')](_0x1838('0xc'),attributes,{'tableName':_0x1838('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xcc4a=['request-promise','path','rimraf','../../config/environment','exports','define','lodash','util','api','moment','bluebird'];(function(_0x14036d,_0x48c19c){var _0x280c6b=function(_0x1cc62d){while(--_0x1cc62d){_0x14036d['push'](_0x14036d['shift']());}};_0x280c6b(++_0x48c19c);}(_0xcc4a,0xf8));var _0xacc4=function(_0xe4c079,_0x5a9a93){_0xe4c079=_0xe4c079-0x0;var _0x554bc6=_0xcc4a[_0xe4c079];return _0x554bc6;};'use strict';var _=require(_0xacc4('0x0'));var util=require(_0xacc4('0x1'));var logger=require('../../config/logger')(_0xacc4('0x2'));var moment=require(_0xacc4('0x3'));var BPromise=require(_0xacc4('0x4'));var rp=require(_0xacc4('0x5'));var fs=require('fs');var path=require(_0xacc4('0x6'));var rimraf=require(_0xacc4('0x7'));var config=require(_0xacc4('0x8'));var attributes=require('./chatGroup.attributes');module[_0xacc4('0x9')]=function(_0x595a1b,_0x4cdace){return _0x595a1b[_0xacc4('0xa')]('ChatGroup',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 594ab85..59e626d 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 _0xdace=['http','redis','defaults','socket.io-emitter','./chatGroup.socket','register','request','then','info','ChatGroup,\x20%s,\x20%s','request\x20sent','debug','ChatGroup,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','util','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client'];(function(_0x517774,_0x2f836f){var _0x422823=function(_0xbd734b){while(--_0xbd734b){_0x517774['push'](_0x517774['shift']());}};_0x422823(++_0x2f836f);}(_0xdace,0xc1));var _0xedac=function(_0x4715d2,_0x3371b2){_0x4715d2=_0x4715d2-0x0;var _0x141811=_0xdace[_0x4715d2];return _0x141811;};'use strict';var _=require('lodash');var util=require(_0xedac('0x0'));var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xedac('0x1'))['db'];var utils=require(_0xedac('0x2'));var logger=require(_0xedac('0x3'))('rpc');var config=require(_0xedac('0x4'));var jayson=require(_0xedac('0x5'));var client=jayson[_0xedac('0x6')][_0xedac('0x7')]({'port':0x232a});config[_0xedac('0x8')]=_[_0xedac('0x9')](config[_0xedac('0x8')],{'host':'localhost','port':0x18eb});var socket=require(_0xedac('0xa'))(new Redis(config[_0xedac('0x8')]));require(_0xedac('0xb'))[_0xedac('0xc')](socket);function respondWithRpcPromise(_0xff186d,_0x439df2,_0x44babb){return new BPromise(function(_0x3d706b,_0x360858){return client[_0xedac('0xd')](_0xff186d,_0x44babb)[_0xedac('0xe')](function(_0x2eb2f2){logger[_0xedac('0xf')](_0xedac('0x10'),_0x439df2,_0xedac('0x11'));logger[_0xedac('0x12')](_0xedac('0x13'),_0x439df2,_0xedac('0x11'),JSON['stringify'](_0x2eb2f2));if(_0x2eb2f2['error']){if(_0x2eb2f2[_0xedac('0x14')][_0xedac('0x15')]===0x1f4){logger[_0xedac('0x14')]('ChatGroup,\x20%s,\x20%s',_0x439df2,_0x2eb2f2[_0xedac('0x14')][_0xedac('0x16')]);return _0x360858(_0x2eb2f2[_0xedac('0x14')][_0xedac('0x16')]);}logger[_0xedac('0x14')]('ChatGroup,\x20%s,\x20%s',_0x439df2,_0x2eb2f2[_0xedac('0x14')][_0xedac('0x16')]);return _0x3d706b(_0x2eb2f2['error'][_0xedac('0x16')]);}else{logger['info'](_0xedac('0x10'),_0x439df2,_0xedac('0x11'));_0x3d706b(_0x2eb2f2[_0xedac('0x17')]['message']);}})[_0xedac('0x18')](function(_0x443ff6){logger[_0xedac('0x14')](_0xedac('0x10'),_0x439df2,_0x443ff6);_0x360858(_0x443ff6);});});} \ No newline at end of file +var _0x7b27=['then','ChatGroup,\x20%s,\x20%s','debug','ChatGroup,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','request\x20sent','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','redis','defaults','localhost','./chatGroup.socket','register'];(function(_0x2dbdce,_0x13503c){var _0x58f16c=function(_0x231d31){while(--_0x231d31){_0x2dbdce['push'](_0x2dbdce['shift']());}};_0x58f16c(++_0x13503c);}(_0x7b27,0x186));var _0x77b2=function(_0x267813,_0x38fabf){_0x267813=_0x267813-0x0;var _0x3875d6=_0x7b27[_0x267813];return _0x3875d6;};'use strict';var _=require(_0x77b2('0x0'));var util=require('util');var moment=require(_0x77b2('0x1'));var BPromise=require(_0x77b2('0x2'));var rs=require(_0x77b2('0x3'));var fs=require('fs');var Redis=require(_0x77b2('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x77b2('0x5'));var logger=require(_0x77b2('0x6'))('rpc');var config=require(_0x77b2('0x7'));var jayson=require(_0x77b2('0x8'));var client=jayson[_0x77b2('0x9')]['http']({'port':0x232a});config[_0x77b2('0xa')]=_[_0x77b2('0xb')](config[_0x77b2('0xa')],{'host':_0x77b2('0xc'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x77b2('0xa')]));require(_0x77b2('0xd'))[_0x77b2('0xe')](socket);function respondWithRpcPromise(_0x3611c3,_0x1a6cc9,_0x3abfbc){return new BPromise(function(_0x3b7641,_0x2dc1db){return client['request'](_0x3611c3,_0x3abfbc)[_0x77b2('0xf')](function(_0x1f5006){logger['info'](_0x77b2('0x10'),_0x1a6cc9,'request\x20sent');logger[_0x77b2('0x11')](_0x77b2('0x12'),_0x1a6cc9,'request\x20sent',JSON[_0x77b2('0x13')](_0x1f5006));if(_0x1f5006['error']){if(_0x1f5006[_0x77b2('0x14')][_0x77b2('0x15')]===0x1f4){logger[_0x77b2('0x14')](_0x77b2('0x10'),_0x1a6cc9,_0x1f5006[_0x77b2('0x14')][_0x77b2('0x16')]);return _0x2dc1db(_0x1f5006[_0x77b2('0x14')][_0x77b2('0x16')]);}logger[_0x77b2('0x14')]('ChatGroup,\x20%s,\x20%s',_0x1a6cc9,_0x1f5006['error'][_0x77b2('0x16')]);return _0x3b7641(_0x1f5006[_0x77b2('0x14')][_0x77b2('0x16')]);}else{logger[_0x77b2('0x17')](_0x77b2('0x10'),_0x1a6cc9,_0x77b2('0x18'));_0x3b7641(_0x1f5006[_0x77b2('0x19')]['message']);}})[_0x77b2('0x1a')](function(_0x818d98){logger[_0x77b2('0x14')](_0x77b2('0x10'),_0x1a6cc9,_0x818d98);_0x2dc1db(_0x818d98);});});} \ No newline at end of file diff --git a/server/api/chatGroup/chatGroup.socket.js b/server/api/chatGroup/chatGroup.socket.js index 4926966..5cc19cb 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 _0x0496=['update','emit','removeListener','register','length','chatGroup:'];(function(_0x24502c,_0x2a09e4){var _0x9a899d=function(_0x19d96c){while(--_0x19d96c){_0x24502c['push'](_0x24502c['shift']());}};_0x9a899d(++_0x2a09e4);}(_0x0496,0x78));var _0x6049=function(_0x48ddc1,_0x2076c1){_0x48ddc1=_0x48ddc1-0x0;var _0x295446=_0x0496[_0x48ddc1];return _0x295446;};'use strict';var ChatGroupEvents=require('./chatGroup.events');var events=['save','remove',_0x6049('0x0')];function createListener(_0x1caa31,_0x3ec475){return function(_0x38099a){_0x3ec475[_0x6049('0x1')](_0x1caa31,_0x38099a);};}function removeListener(_0x3a1e68,_0x2af2e9){return function(){ChatGroupEvents[_0x6049('0x2')](_0x3a1e68,_0x2af2e9);};}exports[_0x6049('0x3')]=function(_0x34962f){for(var _0x44c5bd=0x0,_0xc2304=events[_0x6049('0x4')];_0x44c5bd<_0xc2304;_0x44c5bd++){var _0x5eb2f1=events[_0x44c5bd];var _0x5f2df5=createListener(_0x6049('0x5')+_0x5eb2f1,_0x34962f);ChatGroupEvents['on'](_0x5eb2f1,_0x5f2df5);}}; \ No newline at end of file +var _0xd132=['chatGroup:','./chatGroup.events','save','update','emit','removeListener','register','length'];(function(_0x6c0123,_0x4c8d3b){var _0x5a87d2=function(_0x1ff614){while(--_0x1ff614){_0x6c0123['push'](_0x6c0123['shift']());}};_0x5a87d2(++_0x4c8d3b);}(_0xd132,0x109));var _0x2d13=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xd132[_0x321bb2];return _0x9c12ed;};'use strict';var ChatGroupEvents=require(_0x2d13('0x0'));var events=[_0x2d13('0x1'),'remove',_0x2d13('0x2')];function createListener(_0x28d541,_0x5d3b85){return function(_0x10ef63){_0x5d3b85[_0x2d13('0x3')](_0x28d541,_0x10ef63);};}function removeListener(_0x20bd3b,_0x403d25){return function(){ChatGroupEvents[_0x2d13('0x4')](_0x20bd3b,_0x403d25);};}exports[_0x2d13('0x5')]=function(_0x48cfaf){for(var _0x249d4b=0x0,_0x585b0c=events[_0x2d13('0x6')];_0x249d4b<_0x585b0c;_0x249d4b++){var _0x263c2a=events[_0x249d4b];var _0x1cb4e7=createListener(_0x2d13('0x7')+_0x263c2a,_0x48cfaf);ChatGroupEvents['on'](_0x263c2a,_0x1cb4e7);}}; \ No newline at end of file diff --git a/server/api/chatGroup/index.js b/server/api/chatGroup/index.js index a90164d..a0783d8 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 _0x2458=['/:id/members','getMembers','/:id/messages','getMessages','post','create','addMembers','addMessage','put','/:id','update','delete','destroy','removeMembers','multer','util','path','express','Router','fs-extra','../../config/environment','./chatGroup.controller','isAuthenticated','index','get','/describe','show','/:id/unread','getUnread'];(function(_0x286bfb,_0x26ad05){var _0x6b9f5=function(_0x25cc6a){while(--_0x25cc6a){_0x286bfb['push'](_0x286bfb['shift']());}};_0x6b9f5(++_0x26ad05);}(_0x2458,0xbc));var _0x8245=function(_0x4e676e,_0x2a7c6d){_0x4e676e=_0x4e676e-0x0;var _0x336a3c=_0x2458[_0x4e676e];return _0x336a3c;};'use strict';var multer=require(_0x8245('0x0'));var util=require(_0x8245('0x1'));var path=require(_0x8245('0x2'));var timeout=require('connect-timeout');var express=require(_0x8245('0x3'));var router=express[_0x8245('0x4')]();var fs_extra=require(_0x8245('0x5'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x8245('0x6'));var controller=require(_0x8245('0x7'));router['get']('/',auth[_0x8245('0x8')](),controller[_0x8245('0x9')]);router[_0x8245('0xa')](_0x8245('0xb'),auth[_0x8245('0x8')](),controller['describe']);router['get']('/:id',auth[_0x8245('0x8')](),controller[_0x8245('0xc')]);router[_0x8245('0xa')](_0x8245('0xd'),auth[_0x8245('0x8')](),controller[_0x8245('0xe')]);router[_0x8245('0xa')](_0x8245('0xf'),auth[_0x8245('0x8')](),controller[_0x8245('0x10')]);router[_0x8245('0xa')](_0x8245('0x11'),auth['isAuthenticated'](),controller[_0x8245('0x12')]);router[_0x8245('0x13')]('/',auth['isAuthenticated'](),controller[_0x8245('0x14')]);router['post'](_0x8245('0xf'),auth[_0x8245('0x8')](),controller[_0x8245('0x15')]);router['post']('/:id/messages',auth[_0x8245('0x8')](),controller[_0x8245('0x16')]);router[_0x8245('0x17')](_0x8245('0x18'),auth[_0x8245('0x8')](),controller[_0x8245('0x19')]);router[_0x8245('0x1a')](_0x8245('0x18'),auth[_0x8245('0x8')](),controller[_0x8245('0x1b')]);router['delete'](_0x8245('0xf'),auth[_0x8245('0x8')](),controller[_0x8245('0x1c')]);module['exports']=router; \ No newline at end of file +var _0x5652=['describe','/:id','show','getMembers','/:id/messages','getMessages','create','post','/:id/members','addMessage','update','delete','destroy','removeMembers','exports','multer','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./chatGroup.controller','get','isAuthenticated','index','/describe'];(function(_0x56ce42,_0x40d77e){var _0x12f93f=function(_0x1899e2){while(--_0x1899e2){_0x56ce42['push'](_0x56ce42['shift']());}};_0x12f93f(++_0x40d77e);}(_0x5652,0x96));var _0x2565=function(_0x44268d,_0xad8443){_0x44268d=_0x44268d-0x0;var _0x4be92d=_0x5652[_0x44268d];return _0x4be92d;};'use strict';var multer=require(_0x2565('0x0'));var util=require('util');var path=require(_0x2565('0x1'));var timeout=require(_0x2565('0x2'));var express=require('express');var router=express[_0x2565('0x3')]();var fs_extra=require(_0x2565('0x4'));var auth=require(_0x2565('0x5'));var interaction=require(_0x2565('0x6'));var config=require('../../config/environment');var controller=require(_0x2565('0x7'));router[_0x2565('0x8')]('/',auth[_0x2565('0x9')](),controller[_0x2565('0xa')]);router[_0x2565('0x8')](_0x2565('0xb'),auth[_0x2565('0x9')](),controller[_0x2565('0xc')]);router[_0x2565('0x8')](_0x2565('0xd'),auth['isAuthenticated'](),controller[_0x2565('0xe')]);router['get']('/:id/unread',auth[_0x2565('0x9')](),controller['getUnread']);router[_0x2565('0x8')]('/:id/members',auth['isAuthenticated'](),controller[_0x2565('0xf')]);router[_0x2565('0x8')](_0x2565('0x10'),auth[_0x2565('0x9')](),controller[_0x2565('0x11')]);router['post']('/',auth['isAuthenticated'](),controller[_0x2565('0x12')]);router[_0x2565('0x13')](_0x2565('0x14'),auth['isAuthenticated'](),controller['addMembers']);router[_0x2565('0x13')](_0x2565('0x10'),auth[_0x2565('0x9')](),controller[_0x2565('0x15')]);router['put'](_0x2565('0xd'),auth[_0x2565('0x9')](),controller[_0x2565('0x16')]);router[_0x2565('0x17')](_0x2565('0xd'),auth[_0x2565('0x9')](),controller[_0x2565('0x18')]);router[_0x2565('0x17')](_0x2565('0x14'),auth[_0x2565('0x9')](),controller[_0x2565('0x19')]);module[_0x2565('0x1a')]=router; \ No newline at end of file diff --git a/server/api/chatInteraction/chatInteraction.attributes.js b/server/api/chatInteraction/chatInteraction.attributes.js index 86dbca9..6d2a72c 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 _0x065e=['sequelize','ENUM','star','thumb','TEXT','STRING','long','DATE','BOOLEAN'];(function(_0x37fb9e,_0x3ce746){var _0x38a526=function(_0x327a02){while(--_0x327a02){_0x37fb9e['push'](_0x37fb9e['shift']());}};_0x38a526(++_0x3ce746);}(_0x065e,0x1a7));var _0xe065=function(_0x15f0bf,_0x426976){_0x15f0bf=_0x15f0bf-0x0;var _0x5c303f=_0x065e[_0x15f0bf];return _0x5c303f;};'use strict';var Sequelize=require(_0xe065('0x0'));module['exports']={'closed':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'ratingValue':{'type':Sequelize['INTEGER']},'ratingType':{'type':Sequelize[_0xe065('0x1')](_0xe065('0x2'),_0xe065('0x3')),'defaultValue':'star'},'ratingMessage':{'type':Sequelize['TEXT']},'pathTranscript':{'type':Sequelize[_0xe065('0x4')]},'mailTranscript':{'type':Sequelize[_0xe065('0x5')],'validate':{'isEmail':!![]}},'closedAt':{'type':Sequelize['DATE']},'disposition':{'type':Sequelize[_0xe065('0x5')]},'secondDisposition':{'type':Sequelize[_0xe065('0x5')]},'thirdDisposition':{'type':Sequelize[_0xe065('0x5')]},'note':{'type':Sequelize['STRING']},'browserName':{'type':Sequelize[_0xe065('0x5')]},'browserVersion':{'type':Sequelize['STRING']},'osName':{'type':Sequelize[_0xe065('0x5')]},'osVersion':{'type':Sequelize[_0xe065('0x5')]},'deviceModel':{'type':Sequelize[_0xe065('0x5')]},'deviceVendor':{'type':Sequelize[_0xe065('0x5')]},'deviceType':{'type':Sequelize[_0xe065('0x5')]},'referer':{'type':Sequelize['TEXT']},'customerIp':{'type':Sequelize[_0xe065('0x5')]},'formData':{'type':Sequelize[_0xe065('0x4')](_0xe065('0x6'))},'read1stAt':{'type':Sequelize[_0xe065('0x7')]},'lastMsgAt':{'type':Sequelize[_0xe065('0x7')]},'lastMsgDirection':{'type':Sequelize[_0xe065('0x1')]('in','out'),'defaultValue':'in','allowNull':![]},'closeReason':{'type':Sequelize['STRING']},'customerPort':{'type':Sequelize[_0xe065('0x5')]},'vidaooSessionId':{'type':Sequelize[_0xe065('0x4')]},'autoreplyExecuted':{'type':Sequelize[_0xe065('0x8')],'defaultValue':![]}}; \ No newline at end of file +var _0xa902=['BOOLEAN','INTEGER','ENUM','thumb','TEXT','STRING','DATE','long','out','sequelize','exports'];(function(_0x77da58,_0x198eb3){var _0x1ff75f=function(_0x4682ef){while(--_0x4682ef){_0x77da58['push'](_0x77da58['shift']());}};_0x1ff75f(++_0x198eb3);}(_0xa902,0x8d));var _0x2a90=function(_0x1ef618,_0x5e68a4){_0x1ef618=_0x1ef618-0x0;var _0x4e6045=_0xa902[_0x1ef618];return _0x4e6045;};'use strict';var Sequelize=require(_0x2a90('0x0'));module[_0x2a90('0x1')]={'closed':{'type':Sequelize[_0x2a90('0x2')],'defaultValue':![]},'ratingValue':{'type':Sequelize[_0x2a90('0x3')]},'ratingType':{'type':Sequelize[_0x2a90('0x4')]('star',_0x2a90('0x5')),'defaultValue':'star'},'ratingMessage':{'type':Sequelize['TEXT']},'pathTranscript':{'type':Sequelize[_0x2a90('0x6')]},'mailTranscript':{'type':Sequelize[_0x2a90('0x7')],'validate':{'isEmail':!![]}},'closedAt':{'type':Sequelize[_0x2a90('0x8')]},'disposition':{'type':Sequelize[_0x2a90('0x7')]},'secondDisposition':{'type':Sequelize[_0x2a90('0x7')]},'thirdDisposition':{'type':Sequelize[_0x2a90('0x7')]},'note':{'type':Sequelize['STRING']},'browserName':{'type':Sequelize[_0x2a90('0x7')]},'browserVersion':{'type':Sequelize['STRING']},'osName':{'type':Sequelize['STRING']},'osVersion':{'type':Sequelize[_0x2a90('0x7')]},'deviceModel':{'type':Sequelize[_0x2a90('0x7')]},'deviceVendor':{'type':Sequelize[_0x2a90('0x7')]},'deviceType':{'type':Sequelize[_0x2a90('0x7')]},'referer':{'type':Sequelize[_0x2a90('0x6')]},'customerIp':{'type':Sequelize['STRING']},'formData':{'type':Sequelize[_0x2a90('0x6')](_0x2a90('0x9'))},'read1stAt':{'type':Sequelize[_0x2a90('0x8')]},'lastMsgAt':{'type':Sequelize[_0x2a90('0x8')]},'lastMsgDirection':{'type':Sequelize['ENUM']('in',_0x2a90('0xa')),'defaultValue':'in','allowNull':![]},'closeReason':{'type':Sequelize['STRING']},'customerPort':{'type':Sequelize[_0x2a90('0x7')]},'vidaooSessionId':{'type':Sequelize['TEXT']},'autoreplyExecuted':{'type':Sequelize[_0x2a90('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 407101d..552f73f 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 _0x9f0e=['error','code','message','result','catch','sendStatus','end','status','offset','undefined','limit','count','set','Content-Range','json','apply','update','destroy','stack','name','send','render','merge','contact','interaction','fullname','TagIds','Tags','split','forEach','index','rawAttributes','type','key','model','map','query','keys','filters','attributes','fields','length','hasOwnProperty','nolimit','order','where','pick','field','from','tools_tags','select','u.id','u.fullname','ui.ChatInteractionId','user_has_chat_interactions','left_join','users','u.id\x20=\x20ui.UserId','chat_interactions','cm_contacts','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL','o.id\x20=\x20i.UserId','chat_websites','chat_messages','chat_interaction_has_tags','it.ChatInteractionId\x20=\x20i.id','t.id\x20=\x20it.TagId','expr','search','sqlOperator','conditions','find','`\x20=\x200','operator','$substring','value','MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','c.firstName\x20LIKE\x20?\x20OR\x20c.lastName\x20LIKE\x20?\x20OR\x20c.email\x20LIKE\x20?','ContactId','buildExpression','text','start','Tag','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','union','User','CONCAT_WS(\x27\x20\x27,\x20o.name,\x20o.fullname)\x20LIKE\x20?','UserId','body','some','compact','isEmpty','ChatWebsiteId','i.ChatWebsiteId\x20IN\x20?','concat','createdAt','$gte','parse','$lte','i.createdAt\x20BETWEEN\x20?\x20AND\x20?','\x20IS\x20NULL','\x20=\x20?','read','having','`unreadMessages`\x20>\x200','tag','isArray','filter','replace','i.id\x20LIKE\x20?','MATCH\x20(me.body)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','group','i.id','Sequelize','SELECT','clone','SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)','contactName','DESC','t.id\x20IN\x20?','resolve','i.ChatWebsiteId\x20IS\x20NOT\x20NULL','user','role','agent','getChatWebsites','i.ChatWebsiteId\x20IS\x20NULL','toString','sequelize','keyBy','ChatInteraction','a.key','Account.key','a.mandatoryDisposition','i.*','c.firstName','Contact.firstName','c.lastName','c.email','Contact.email','c.phone','Contact.phone','c.mobile','Contact.mobile','c.fax','Contact.fax','o.fullname','Owner.fullname','o.internal','Owner.internal','GROUP_CONCAT(DISTINCT\x20t.id)','ui.ChatInteractionId\x20IN\x20?','groupBy','ChatInteractionId','push','show','includeAll','include','options','create','params','describe','createVidaooSession','ChatWebsite','vidaooEscalation','vidaooTopic','vidaooMetadata','vidaooApiKey','email','account','https://api-vidaoo.xcally.com/api/v1/meetings','isNull','vidaooNote','ValidationError','Error\x20in\x20Vidaoo\x20configuration','join_url','out','Unable\x20to\x20create\x20Vidaoo\x20session','updateAttributes','customUpdate','CmContact','abandon','abandonInteraction,\x20%s,\x20%s,\x20%s','entity\x20not\x20found','Interaction\x20already\x20assigned','closed','disposition','AbandonInteraction','file','originalname','filename','mimetype','Attachment','attachmentDownload','findOne','Unauthorized','attachId','ChatOfflineMessageId','join','root','server/files/attachments/','offline-chat/','basename','download','close','server/files/chat/upload/','format','now','pathTranscript','ChatMessage','Messages','agentAlias','System','%s%d','Visitor','agentIdentifier','website_alias','agent_alias','agent_fullname','MM/DD/YYYY\x20HH:mm:ss','direction','secret','appendFileSync','MailAccount','MailServerOut','Smtp','service','host','port','secure','authentication','auth','SendMail','sendMail','\x22%s\x22\x20<%s>','mailTranscript','Mail\x20Transcript','addMessage','ids','omit','getMessages','intersection','sort','YYYY-MM-DD\x20HH:mm:ss','findAll','includeAgent','alias','rows','addTags','spread','emit','removeTags','server','tmp','files','attachments','transcript-%d-%s.zip','Contact','firstName','Account','Owner','mkdirSync','closedAt','browserName','referer','customerIp','customerPort','N.A.','tail','existsSync','pipe','createWriteStream','lastName','downloadInteraction.ejs','transcript-','Chat','createPdfFromHTML','err','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','mustache','util','path','sox','to-csv','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../components/export/pdf','../../config/logger','api','../../config/utils','../../config/license/util','redis','defaults','localhost','register','jayson/promise','client','http','request','then','info','ChatInteraction,\x20%s,\x20%s','request\x20sent','ChatInteraction,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x4ee3c3,_0x2100e3){var _0x1cdd60=function(_0x15539c){while(--_0x15539c){_0x4ee3c3['push'](_0x4ee3c3['shift']());}};_0x1cdd60(++_0x2100e3);}(_0x9f0e,0x116));var _0xe9f0=function(_0x3b4ecc,_0x429376){_0x3b4ecc=_0x3b4ecc-0x0;var _0x164749=_0x9f0e[_0x3b4ecc];return _0x164749;};'use strict';var emlformat=require(_0xe9f0('0x0'));var rimraf=require(_0xe9f0('0x1'));var zipdir=require(_0xe9f0('0x2'));var jsonpatch=require(_0xe9f0('0x3'));var rp=require(_0xe9f0('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xe9f0('0x5'));var util=require(_0xe9f0('0x6'));var path=require(_0xe9f0('0x7'));var sox=require(_0xe9f0('0x8'));var csv=require(_0xe9f0('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xe9f0('0xa'));var squel=require(_0xe9f0('0xb'));var crypto=require(_0xe9f0('0xc'));var jsforce=require('jsforce');var deskjs=require(_0xe9f0('0xd'));var toCsv=require(_0xe9f0('0x9'));var querystring=require(_0xe9f0('0xe'));var Papa=require(_0xe9f0('0xf'));var Redis=require(_0xe9f0('0x10'));var authService=require(_0xe9f0('0x11'));var qs=require(_0xe9f0('0x12'));var as=require(_0xe9f0('0x13'));var pdf=require(_0xe9f0('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xe9f0('0x15'))(_0xe9f0('0x16'));var utils=require(_0xe9f0('0x17'));var config=require('../../config/environment');var licenseUtil=require(_0xe9f0('0x18'));var db=require('../../mysqldb')['db'];config[_0xe9f0('0x19')]=_[_0xe9f0('0x1a')](config[_0xe9f0('0x19')],{'host':_0xe9f0('0x1b'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xe9f0('0x19')]));require('./chatInteraction.socket')[_0xe9f0('0x1c')](socket);var jayson=require(_0xe9f0('0x1d'));var client=jayson[_0xe9f0('0x1e')]['http']({'port':0x232b});var client9004=jayson[_0xe9f0('0x1e')][_0xe9f0('0x1f')]({'port':0x232c});function respondWithRpcPromise(_0x2e68ef,_0x598eee,_0xaa7aa6,_0x1e16e0){return new BPromise(function(_0xcd2042,_0xd71ac8){var _0x3ed69a=_0x1e16e0||client;return _0x3ed69a[_0xe9f0('0x20')](_0x2e68ef,_0xaa7aa6)[_0xe9f0('0x21')](function(_0x59bf5a){logger[_0xe9f0('0x22')](_0xe9f0('0x23'),_0x598eee,_0xe9f0('0x24'));logger['debug'](_0xe9f0('0x25'),_0x598eee,_0xe9f0('0x24'),JSON[_0xe9f0('0x26')](_0x59bf5a));if(_0x59bf5a[_0xe9f0('0x27')]){if(_0x59bf5a['error'][_0xe9f0('0x28')]===0x1f4){logger[_0xe9f0('0x27')]('ChatInteraction,\x20%s,\x20%s',_0x598eee,_0x59bf5a['error']['message']);return _0xd71ac8(_0x59bf5a[_0xe9f0('0x27')][_0xe9f0('0x29')]);}logger[_0xe9f0('0x27')](_0xe9f0('0x23'),_0x598eee,_0x59bf5a[_0xe9f0('0x27')]['message']);return _0xcd2042(_0x59bf5a[_0xe9f0('0x27')][_0xe9f0('0x29')]);}else{logger[_0xe9f0('0x22')](_0xe9f0('0x23'),_0x598eee,_0xe9f0('0x24'));_0xcd2042(_0x59bf5a[_0xe9f0('0x2a')][_0xe9f0('0x29')]);}})[_0xe9f0('0x2b')](function(_0x3c4ba9){logger[_0xe9f0('0x27')]('ChatInteraction,\x20%s,\x20%s',_0x598eee,_0x3c4ba9);_0xd71ac8(_0x3c4ba9);});});}function respondWithStatusCode(_0x371095,_0x27541f){_0x27541f=_0x27541f||0xcc;return function(_0x2ddfba){if(_0x2ddfba){return _0x371095[_0xe9f0('0x2c')](_0x27541f);}return _0x371095['status'](_0x27541f)[_0xe9f0('0x2d')]();};}function respondWithResult(_0x2613fd,_0x856ac8){_0x856ac8=_0x856ac8||0xc8;return function(_0x1f98a7){if(_0x1f98a7){return _0x2613fd[_0xe9f0('0x2e')](_0x856ac8)['json'](_0x1f98a7);}};}function respondWithFilteredResult(_0x130f96,_0xdc16bc){return function(_0x44fb5b){if(_0x44fb5b){var _0xab3d81=typeof _0xdc16bc[_0xe9f0('0x2f')]===_0xe9f0('0x30')&&typeof _0xdc16bc[_0xe9f0('0x31')]===_0xe9f0('0x30');var _0x2b6503=_0x44fb5b[_0xe9f0('0x32')];var _0x22806c=_0xab3d81?0x0:_0xdc16bc[_0xe9f0('0x2f')];var _0x445ad0=_0xab3d81?_0x44fb5b[_0xe9f0('0x32')]:_0xdc16bc[_0xe9f0('0x2f')]+_0xdc16bc[_0xe9f0('0x31')];var _0x80e3ac;if(_0x445ad0>=_0x2b6503){_0x445ad0=_0x2b6503;_0x80e3ac=0xc8;}else{_0x80e3ac=0xce;}_0x130f96[_0xe9f0('0x2e')](_0x80e3ac);return _0x130f96[_0xe9f0('0x33')](_0xe9f0('0x34'),_0x22806c+'-'+_0x445ad0+'/'+_0x2b6503)[_0xe9f0('0x35')](_0x44fb5b);}return null;};}function patchUpdates(_0x589803){return function(_0x1c394){try{jsonpatch[_0xe9f0('0x36')](_0x1c394,_0x589803,!![]);}catch(_0x5480ce){return BPromise['reject'](_0x5480ce);}return _0x1c394['save']();};}function saveUpdates(_0x191a39,_0x585742){return function(_0x9bf61d){if(_0x9bf61d){return _0x9bf61d[_0xe9f0('0x37')](_0x191a39)['then'](function(_0x285457){return _0x285457;});}return null;};}function removeEntity(_0x4c181d,_0x576a7a){return function(_0x59024e){if(_0x59024e){return _0x59024e[_0xe9f0('0x38')]()[_0xe9f0('0x21')](function(){_0x4c181d['status'](0xcc)[_0xe9f0('0x2d')]();});}};}function handleEntityNotFound(_0xb0cfc,_0x1d4748){return function(_0x4d4186){if(!_0x4d4186){_0xb0cfc['sendStatus'](0x194);}return _0x4d4186;};}function handleError(_0x3fb04e,_0x3ff42d){_0x3ff42d=_0x3ff42d||0x1f4;return function(_0x1917c8){logger['error'](_0x1917c8[_0xe9f0('0x39')]);if(_0x1917c8[_0xe9f0('0x3a')]){delete _0x1917c8[_0xe9f0('0x3a')];}_0x3fb04e[_0xe9f0('0x2e')](_0x3ff42d)[_0xe9f0('0x3b')](_0x1917c8);};}function getMustacheRender(_0x552ec2,_0x2ab492){return Mustache[_0xe9f0('0x3c')](_0x552ec2,_[_0xe9f0('0x3d')](_0x2ab492['body'],{'contact':_0x2ab492[_0xe9f0('0x3e')],'message':_0x2ab492[_0xe9f0('0x29')],'agent':_0x2ab492['agent'],'interaction':_0x2ab492[_0xe9f0('0x3f')],'account':_0x2ab492['account']}))||'';}function getInteractionUsers(_0x56c03e,_0x55c0bd){return new BPromise(function(_0x5dcbeb,_0x51eda3){try{if(_0x55c0bd[_0x56c03e['id']]){_0x56c03e['Users']=_['map'](_0x55c0bd[_0x56c03e['id']],function(_0x35062f){return{'id':_0x35062f['id'],'fullname':_0x35062f[_0xe9f0('0x40')]};});}}catch(_0x2d8f93){_0x51eda3(_0x2d8f93);}_0x5dcbeb(_0x56c03e);});}function getInteractionTags(_0x40c2c6,_0x2560c6){return new BPromise(function(_0xd9b61b,_0x3d4eb7){try{if(_0x40c2c6[_0xe9f0('0x41')]){_0x40c2c6[_0xe9f0('0x42')]=[];_0x40c2c6['TagIds'][_0xe9f0('0x43')](',')[_0xe9f0('0x44')](function(_0x36b00a){_0x40c2c6['Tags']['push'](_0x2560c6[_0x36b00a]);});}delete _0x40c2c6[_0xe9f0('0x41')];}catch(_0x515fa6){_0x3d4eb7(_0x515fa6);}_0xd9b61b(_0x40c2c6);});}function updateChatInteraction(_0x297689,_0x52613a,_0x314f0e){return new BPromise(function(_0x42d9d2,_0x4f1663){return getInteractionUsers(_0x297689,_0x314f0e)[_0xe9f0('0x21')](function(_0x3f5255){return getInteractionTags(_0x3f5255,_0x52613a);})[_0xe9f0('0x21')](function(_0x18faaf){_0x42d9d2(_0x18faaf);})[_0xe9f0('0x2b')](function(_0x59378a){_0x4f1663(_0x59378a);});});}exports[_0xe9f0('0x45')]=function(_0x2941a0,_0x30141e){var _0x319380={},_0xf75ffb={},_0x4ffc17={'count':0x0,'rows':[]};var _0x3a8d1d=_['map'](db['ChatInteraction'][_0xe9f0('0x46')],function(_0x17b832){return{'name':_0x17b832['fieldName'],'type':_0x17b832[_0xe9f0('0x47')][_0xe9f0('0x48')]};});_0xf75ffb[_0xe9f0('0x49')]=_[_0xe9f0('0x4a')](_0x3a8d1d,_0xe9f0('0x3a'));_0xf75ffb[_0xe9f0('0x4b')]=_[_0xe9f0('0x4c')](_0x2941a0['query']);_0xf75ffb[_0xe9f0('0x4d')]=_['intersection'](_0xf75ffb[_0xe9f0('0x49')],_0xf75ffb['query']);_0x319380[_0xe9f0('0x4e')]=_['intersection'](_0xf75ffb[_0xe9f0('0x49')],qs[_0xe9f0('0x4f')](_0x2941a0[_0xe9f0('0x4b')]['fields']));_0x319380[_0xe9f0('0x4e')]=_0x319380[_0xe9f0('0x4e')][_0xe9f0('0x50')]?_0x319380[_0xe9f0('0x4e')]:_0xf75ffb[_0xe9f0('0x49')];if(!_0x2941a0[_0xe9f0('0x4b')][_0xe9f0('0x51')](_0xe9f0('0x52'))){_0x319380[_0xe9f0('0x31')]=qs[_0xe9f0('0x31')](_0x2941a0[_0xe9f0('0x4b')][_0xe9f0('0x31')]);_0x319380['offset']=qs['offset'](_0x2941a0[_0xe9f0('0x4b')][_0xe9f0('0x2f')]);}_0x319380[_0xe9f0('0x53')]=qs['sort'](_0x2941a0[_0xe9f0('0x4b')]['sort']);_0x319380[_0xe9f0('0x54')]=qs[_0xe9f0('0x4d')](_[_0xe9f0('0x55')](_0x2941a0[_0xe9f0('0x4b')],_0xf75ffb['filters']),_0x3a8d1d);var _0xb18f13=[];var _0x3fa271=squel['select']()[_0xe9f0('0x56')]('id')[_0xe9f0('0x56')](_0xe9f0('0x3a'))[_0xe9f0('0x56')]('color')[_0xe9f0('0x57')](_0xe9f0('0x58'));var _0x3dd40d=squel[_0xe9f0('0x59')]()[_0xe9f0('0x56')](_0xe9f0('0x5a'))[_0xe9f0('0x56')](_0xe9f0('0x5b'))['field'](_0xe9f0('0x5c'))[_0xe9f0('0x57')](_0xe9f0('0x5d'),'ui')[_0xe9f0('0x5e')](_0xe9f0('0x5f'),'u',_0xe9f0('0x60'));var _0x28fe47=squel[_0xe9f0('0x59')]()[_0xe9f0('0x57')](_0xe9f0('0x61'),'i')[_0xe9f0('0x5e')](_0xe9f0('0x62'),'c',_0xe9f0('0x63'))[_0xe9f0('0x5e')]('users','o',_0xe9f0('0x64'))[_0xe9f0('0x5e')](_0xe9f0('0x65'),'a','a.id\x20=\x20i.ChatWebsiteId')['left_join'](_0xe9f0('0x66'),'me','me.ChatInteractionId\x20=\x20i.id')[_0xe9f0('0x5e')](_0xe9f0('0x67'),'it',_0xe9f0('0x68'))['left_join'](_0xe9f0('0x58'),'t',_0xe9f0('0x69'));var _0x954616=squel[_0xe9f0('0x6a')]();var _0x4bb39d=[];var _0x392eae=squel[_0xe9f0('0x6a')]();var _0x28a66e;if(_0x2941a0[_0xe9f0('0x4b')]['search']){_0x28a66e=as['parseSearch'](_0x2941a0[_0xe9f0('0x4b')][_0xe9f0('0x6b')]);var _0x29286b=_0x28a66e[_0xe9f0('0x6c')];for(var _0x7cbe71=0x0;_0x7cbe71<_0x28a66e['conditions'][_0xe9f0('0x50')];_0x7cbe71++){var _0x55ce2d=_0x28a66e[_0xe9f0('0x6d')][_0x7cbe71];var _0x5858a9='i';var _0x7c05aa=_[_0xe9f0('0x6e')](_0x3a8d1d,[_0xe9f0('0x3a'),_0x55ce2d[_0xe9f0('0x56')]]);if(!_0x7c05aa){switch(_0x55ce2d[_0xe9f0('0x56')]){case'unreadMessages':if(_0x55ce2d['value']==0x1){_0x28fe47['having']('`'+_0x55ce2d[_0xe9f0('0x56')]+_0xe9f0('0x6f'));}else{_0x28fe47['having']('`'+_0x55ce2d[_0xe9f0('0x56')]+'`\x20>\x200');}break;case'Contact':if(_0x55ce2d[_0xe9f0('0x70')]===_0xe9f0('0x71')){if(_0x55ce2d[_0xe9f0('0x72')][_0xe9f0('0x43')]('\x20')[_0xe9f0('0x50')]>0x1){_0x954616[_0x29286b](_0xe9f0('0x73'),qs['getFullTextValue'](_0x55ce2d['value']),null);}else{var _0x1255e6='%'+_0x55ce2d[_0xe9f0('0x72')]+'%';_0x954616[_0x29286b](_0xe9f0('0x74'),_0x1255e6,_0x1255e6,_0x1255e6);}}else{_0x7c05aa=_[_0xe9f0('0x6e')](_0x3a8d1d,['name',_0xe9f0('0x75')]);_0x55ce2d[_0xe9f0('0x56')]=_0xe9f0('0x75');_0x2cd0c1=as[_0xe9f0('0x76')](_0x5858a9,_0x7c05aa[_0xe9f0('0x47')],_0x55ce2d);_0x954616[_0x29286b](_0x2cd0c1[_0xe9f0('0x77')],_0x2cd0c1['value'][_0xe9f0('0x78')],_0x2cd0c1[_0xe9f0('0x72')][_0xe9f0('0x2d')]);}break;case _0xe9f0('0x79'):var _0xb6e75d=_0x55ce2d['value'][_0xe9f0('0x43')](',')[_0xe9f0('0x4a')](function(_0x388091){return Number(_0x388091);});_0xb6e75d[_0xe9f0('0x44')](function(_0x214ac0){_0x392eae['or'](_0xe9f0('0x7a'),'%,'+_0x214ac0+',%');});_0x4bb39d=_[_0xe9f0('0x7b')](_0x4bb39d,_0xb6e75d);break;case _0xe9f0('0x7c'):if(_0x55ce2d[_0xe9f0('0x70')]===_0xe9f0('0x71')){_0x954616[_0x29286b](_0xe9f0('0x7d'),'%'+_0x55ce2d[_0xe9f0('0x72')]+'%',null);}else{_0x7c05aa=_['find'](_0x3a8d1d,[_0xe9f0('0x3a'),_0xe9f0('0x7e')]);_0x55ce2d[_0xe9f0('0x56')]=_0xe9f0('0x7e');_0x2cd0c1=as[_0xe9f0('0x76')](_0x5858a9,_0x7c05aa[_0xe9f0('0x47')],_0x55ce2d);_0x954616[_0x29286b](_0x2cd0c1[_0xe9f0('0x77')],_0x2cd0c1['value'][_0xe9f0('0x78')],_0x2cd0c1[_0xe9f0('0x72')]['end']);}break;case _0xe9f0('0x7f'):_0x2cd0c1=as[_0xe9f0('0x76')]('me',null,_0x55ce2d);_0x954616[_0x29286b](_0x2cd0c1[_0xe9f0('0x77')],_0x2cd0c1['value'][_0xe9f0('0x78')],_0x2cd0c1[_0xe9f0('0x72')]['end']);break;}}else{var _0x2cd0c1=as[_0xe9f0('0x76')](_0x5858a9,_0x7c05aa['type'],_0x55ce2d);_0x954616[_0x29286b](_0x2cd0c1['text'],_0x2cd0c1[_0xe9f0('0x72')]['start'],_0x2cd0c1[_0xe9f0('0x72')][_0xe9f0('0x2d')]);}}}else{var _0x56d052=_(_0x2941a0[_0xe9f0('0x4b')])[_0xe9f0('0x4c')]()[_0xe9f0('0x4a')](function(_0x300fae){return _[_0xe9f0('0x80')](_0x3a8d1d,[_0xe9f0('0x3a'),_0x300fae])?_0x300fae:undefined;})[_0xe9f0('0x81')]()[_0xe9f0('0x72')]();if(!_[_0xe9f0('0x82')](_0x56d052)){_0x56d052['forEach'](function(_0x2e15f9){if(_0x2e15f9===_0xe9f0('0x83')){_0x28fe47[_0xe9f0('0x54')](_0xe9f0('0x84'),[][_0xe9f0('0x85')](_0x2941a0[_0xe9f0('0x4b')][_0x2e15f9]));}else if(_0x2e15f9===_0xe9f0('0x86')){var _0x114033=JSON['parse'](_0x2941a0[_0xe9f0('0x4b')][_0x2e15f9])[_0xe9f0('0x87')];var _0x2ce60c=JSON[_0xe9f0('0x88')](_0x2941a0[_0xe9f0('0x4b')][_0x2e15f9])[_0xe9f0('0x89')];_0x28fe47['where'](_0xe9f0('0x8a'),_0x114033,_0x2ce60c);}else{if(_0x2941a0['query'][_0x2e15f9]==='null'){_0x28fe47['where']('i.'+_0x2e15f9+_0xe9f0('0x8b'));}else{_0x28fe47[_0xe9f0('0x54')]('i.'+_0x2e15f9+_0xe9f0('0x8c'),_0x2941a0[_0xe9f0('0x4b')][_0x2e15f9]);}}});}if(_0x2941a0[_0xe9f0('0x4b')][_0xe9f0('0x8d')]){if(_0x2941a0[_0xe9f0('0x4b')][_0xe9f0('0x8d')]==0x1){_0x28fe47[_0xe9f0('0x8e')]('`unreadMessages`\x20=\x200');}else{_0x28fe47[_0xe9f0('0x8e')](_0xe9f0('0x8f'));}}if(_0x2941a0[_0xe9f0('0x4b')][_0xe9f0('0x90')]){_0x4bb39d=_[_0xe9f0('0x91')](_0x2941a0[_0xe9f0('0x4b')][_0xe9f0('0x90')])?_0x2941a0[_0xe9f0('0x4b')][_0xe9f0('0x90')]:new Array(_0x2941a0[_0xe9f0('0x4b')]['tag']);_0x4bb39d['forEach'](function(_0x23c9e8){_0x392eae['or'](_0xe9f0('0x7a'),'%,'+_0x23c9e8+',%');});}if(_0x2941a0[_0xe9f0('0x4b')][_0xe9f0('0x92')]){var _0xdaf9e3=_0x2941a0[_0xe9f0('0x4b')][_0xe9f0('0x92')][_0xe9f0('0x93')]('\x5c','\x5c\x5c')['replace'](/'/g,'\x27\x27');if(qs['isNumeric'](_0xdaf9e3)){_0x954616['or'](_0xe9f0('0x94'),_0xdaf9e3+'%');}else{_0x954616['or'](_0xe9f0('0x95'),qs['getFullTextValue'](_0xdaf9e3))['or']('CONCAT(c.firstName,\x20\x27\x20\x27,\x20c.lastName)\x20LIKE\x20?',_0xdaf9e3+'%');}}}_0x28fe47[_0xe9f0('0x54')](_0x954616);_0x28fe47[_0xe9f0('0x96')](_0xe9f0('0x97'));var _0xab92b={'type':db[_0xe9f0('0x98')]['QueryTypes'][_0xe9f0('0x99')],'raw':!![]};var _0x21eba3=_0x28fe47[_0xe9f0('0x9a')]();_0x21eba3[_0xe9f0('0x56')](_0xe9f0('0x97'));_0x21eba3[_0xe9f0('0x56')](_0xe9f0('0x9b'),'unreadMessages');if(_0x319380['order']){_0x319380['order'][_0xe9f0('0x44')](function(_0x3c95f4){var _0x245458=_0x3c95f4[0x0]===_0xe9f0('0x9c')?_0x3c95f4[0x0]:'i.'+_0x3c95f4[0x0];_0x28fe47['order'](_0x245458,_0x3c95f4[0x1]===_0xe9f0('0x9d')?![]:!![]);});}if(!_['isEmpty'](_0x4bb39d)){_0x28fe47[_0xe9f0('0x8e')](_0x392eae);_0x21eba3['where'](_0xe9f0('0x9e'),_0x4bb39d);}BPromise[_0xe9f0('0x9f')]()[_0xe9f0('0x21')](function(){if(!_0x28a66e){if(_0x2941a0[_0xe9f0('0x4b')][_0xe9f0('0x83')])return;_0x21eba3[_0xe9f0('0x54')]('i.ChatWebsiteId\x20IS\x20NOT\x20NULL');_0x28fe47[_0xe9f0('0x54')](_0xe9f0('0xa0'));return;}if(_0x2941a0[_0xe9f0('0xa1')][_0xe9f0('0xa2')]!==_0xe9f0('0xa3'))return;return _0x2941a0['user'][_0xe9f0('0xa4')]({'attributes':['id'],'raw':!![]})[_0xe9f0('0x21')](function(_0x4c9808){if(_[_0xe9f0('0x82')](_0x4c9808)){_0x21eba3['where'](_0xe9f0('0xa5'));_0x28fe47[_0xe9f0('0x54')](_0xe9f0('0xa5'));}else{_0x21eba3['where'](_0xe9f0('0x84'),_[_0xe9f0('0x4a')](_0x4c9808,'id'));_0x28fe47[_0xe9f0('0x54')]('i.ChatWebsiteId\x20IN\x20?',_[_0xe9f0('0x4a')](_0x4c9808,'id'));}});})[_0xe9f0('0x21')](function(){if(_0x2941a0[_0xe9f0('0xa1')][_0xe9f0('0xa2')]===_0xe9f0('0xa3')&&!_0x28a66e&&!_0x2941a0[_0xe9f0('0x4b')][_0xe9f0('0x83')])return[];return db['sequelize']['query'](_0x21eba3[_0xe9f0('0xa6')](),_0xab92b);})[_0xe9f0('0x21')](function(_0x1a7549){_0x4ffc17['count']=_0x1a7549[_0xe9f0('0x50')];if(_0x4ffc17[_0xe9f0('0x32')]===0x0)return[];return db[_0xe9f0('0xa7')][_0xe9f0('0x4b')](_0x3fa271['toString'](),_0xab92b)['then'](function(_0x20436f){_0xb18f13=_[_0xe9f0('0xa8')](_0x20436f,'id');_0xab92b=_['merge'](_0xab92b,{'model':db[_0xe9f0('0xa9')],'mapToModel':!![],'raw':!![],'nest':!![]});if(_0x2941a0['query']['fields']){_0x319380[_0xe9f0('0x4e')][_0xe9f0('0x44')](function(_0x77b59d){_0x28fe47[_0xe9f0('0x56')]('i.'+_0x77b59d);});}else{_0x28fe47[_0xe9f0('0x56')]('SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)','unreadMessages');_0x28fe47[_0xe9f0('0x56')](_0xe9f0('0xaa'),_0xe9f0('0xab'));_0x28fe47[_0xe9f0('0x56')](_0xe9f0('0xac'),'Account.mandatoryDisposition');_0x28fe47['field']('CASE\x20WHEN\x20(c.firstName\x20IS\x20NOT\x20NULL\x20AND\x20c.firstName\x20<>\x20\x27\x27)\x20OR\x20(c.lastName\x20IS\x20NOT\x20NULL\x20AND\x20c.lastName\x20<>\x20\x27\x27)\x20THEN\x20CONCAT(IFNULL(c.firstName,\x20\x27\x27),\x20\x27\x20\x27,\x20IFNULL(c.lastName,\x20\x27\x27))\x20ELSE\x20\x27Unknown\x27\x20END',_0xe9f0('0x9c'));_0x28fe47['field'](_0xe9f0('0xad'));_0x28fe47[_0xe9f0('0x56')](_0xe9f0('0xae'),_0xe9f0('0xaf'));_0x28fe47[_0xe9f0('0x56')](_0xe9f0('0xb0'),'Contact.lastName');_0x28fe47['field'](_0xe9f0('0xb1'),_0xe9f0('0xb2'));_0x28fe47[_0xe9f0('0x56')](_0xe9f0('0xb3'),_0xe9f0('0xb4'));_0x28fe47[_0xe9f0('0x56')](_0xe9f0('0xb5'),_0xe9f0('0xb6'));_0x28fe47[_0xe9f0('0x56')](_0xe9f0('0xb7'),_0xe9f0('0xb8'));_0x28fe47[_0xe9f0('0x56')](_0xe9f0('0xb9'),_0xe9f0('0xba'));_0x28fe47['field'](_0xe9f0('0xbb'),_0xe9f0('0xbc'));_0x28fe47[_0xe9f0('0x56')](_0xe9f0('0xbd'),_0xe9f0('0x41'));}if(_0x319380[_0xe9f0('0x31')])_0x28fe47[_0xe9f0('0x31')](_0x319380[_0xe9f0('0x31')]);if(_0x319380[_0xe9f0('0x2f')])_0x28fe47[_0xe9f0('0x2f')](_0x319380[_0xe9f0('0x2f')]);return db['sequelize'][_0xe9f0('0x4b')](_0x28fe47[_0xe9f0('0xa6')](),_0xab92b);})[_0xe9f0('0x21')](function(_0x2af661){if(_0x2af661[_0xe9f0('0x50')]>0x0)_0x3dd40d[_0xe9f0('0x54')](_0xe9f0('0xbe'),_[_0xe9f0('0x4a')](_0x2af661,'id'));return db['sequelize']['query'](_0x3dd40d[_0xe9f0('0xa6')](),_0xab92b)[_0xe9f0('0x21')](function(_0x4e7f22){var _0x583c4c=_[_0xe9f0('0xbf')](_0x4e7f22,_0xe9f0('0xc0'));var _0x37a080=[];_0x2af661[_0xe9f0('0x44')](function(_0x21d159){_0x37a080[_0xe9f0('0xc1')](updateChatInteraction(_0x21d159,_0xb18f13,_0x583c4c));});return BPromise['all'](_0x37a080);});});})[_0xe9f0('0x21')](function(_0x2f1584){_0x4ffc17['rows']=_0x2f1584;return _0x4ffc17;})['then'](respondWithFilteredResult(_0x30141e,_0x319380))[_0xe9f0('0x2b')](handleError(_0x30141e,null));};exports[_0xe9f0('0xc2')]=function(_0x4b668a,_0x17013a){var _0x63e374={'raw':![],'where':{'id':_0x4b668a['params']['id']}},_0x34eda8={};_0x34eda8[_0xe9f0('0x49')]=_[_0xe9f0('0x4c')](db[_0xe9f0('0xa9')][_0xe9f0('0x46')]);_0x34eda8['query']=_[_0xe9f0('0x4c')](_0x4b668a[_0xe9f0('0x4b')]);_0x34eda8[_0xe9f0('0x4d')]=_['intersection'](_0x34eda8['model'],_0x34eda8['query']);_0x63e374[_0xe9f0('0x4e')]=_['intersection'](_0x34eda8['model'],qs[_0xe9f0('0x4f')](_0x4b668a['query'][_0xe9f0('0x4f')]));_0x63e374[_0xe9f0('0x4e')]=_0x63e374[_0xe9f0('0x4e')][_0xe9f0('0x50')]?_0x63e374['attributes']:_0x34eda8[_0xe9f0('0x49')];if(_0x4b668a[_0xe9f0('0x4b')][_0xe9f0('0xc3')]){_0x63e374[_0xe9f0('0xc4')]=[{'all':!![]}];}_0x63e374=_[_0xe9f0('0x3d')]({},_0x63e374,_0x4b668a[_0xe9f0('0xc5')]);return db[_0xe9f0('0xa9')][_0xe9f0('0x6e')](_0x63e374)[_0xe9f0('0x21')](handleEntityNotFound(_0x17013a,null))[_0xe9f0('0x21')](respondWithResult(_0x17013a,null))[_0xe9f0('0x2b')](handleError(_0x17013a,null));};exports[_0xe9f0('0xc6')]=function(_0x27c9f5,_0x56b64b){return db[_0xe9f0('0xa9')][_0xe9f0('0xc6')](_0x27c9f5['body'],{})['then'](respondWithResult(_0x56b64b,0xc9))[_0xe9f0('0x2b')](handleError(_0x56b64b,null));};exports[_0xe9f0('0x37')]=function(_0xef63f8,_0x1c0db4){if(_0xef63f8['body']['id']){delete _0xef63f8[_0xe9f0('0x7f')]['id'];}return db[_0xe9f0('0xa9')][_0xe9f0('0x6e')]({'where':{'id':_0xef63f8['params']['id']}})[_0xe9f0('0x21')](handleEntityNotFound(_0x1c0db4,null))[_0xe9f0('0x21')](saveUpdates(_0xef63f8[_0xe9f0('0x7f')],null))[_0xe9f0('0x21')](respondWithResult(_0x1c0db4,null))[_0xe9f0('0x2b')](handleError(_0x1c0db4,null));};exports['destroy']=function(_0x5cbea8,_0x19f96b){return db[_0xe9f0('0xa9')][_0xe9f0('0x6e')]({'where':{'id':_0x5cbea8[_0xe9f0('0xc7')]['id']}})[_0xe9f0('0x21')](handleEntityNotFound(_0x19f96b,null))[_0xe9f0('0x21')](removeEntity(_0x19f96b,null))[_0xe9f0('0x2b')](handleError(_0x19f96b,null));};exports[_0xe9f0('0xc8')]=function(_0x5ae9f1,_0x1aacfa){return db['ChatInteraction']['describe']()[_0xe9f0('0x21')](respondWithResult(_0x1aacfa,null))[_0xe9f0('0x2b')](handleError(_0x1aacfa,null));};exports[_0xe9f0('0xc9')]=function(_0x59396b,_0x564755){var _0x174e49=_0x59396b['params']['id'];var _0x3f2f29;var _0x18abe2;var _0x14e369;return db[_0xe9f0('0xa9')]['findOne']({'where':{'id':_0x174e49}})[_0xe9f0('0x21')](function(_0x5108d3){_0x3f2f29=_0x5108d3;return db[_0xe9f0('0xca')]['findOne']({'where':{'id':_0x5108d3['ChatWebsiteId']},'attributes':['id','vidaooApiKey',_0xe9f0('0xcb'),_0xe9f0('0xcc'),'vidaooNote',_0xe9f0('0xcd')],'raw':!![]});})[_0xe9f0('0x21')](function(_0x250bfe){if(_0x250bfe&&_0x250bfe[_0xe9f0('0xce')]&&_0x250bfe[_0xe9f0('0xcb')]){_0x18abe2=_0x250bfe;var _0x40306a={'interaction':{'id':_0x174e49},'agent':{'id':_0x59396b[_0xe9f0('0xa1')]['id'],'name':_0x59396b['user'][_0xe9f0('0x3a')],'fullname':_0x59396b[_0xe9f0('0xa1')][_0xe9f0('0x40')],'email':_0x59396b['user'][_0xe9f0('0xcf')]},'contact':_0x59396b[_0xe9f0('0x7f')][_0xe9f0('0x3e')],'account':_0x59396b['body'][_0xe9f0('0xd0')]};var _0x35456b={'rejectUnauthorized':![],'method':'POST','url':_0xe9f0('0xd1'),'headers':{'X-APIKEY':_0x250bfe['vidaooApiKey']},'body':{'duration':null,'scheduledAt':null,'participants':[_0x59396b[_0xe9f0('0xa1')][_0xe9f0('0xcf')]],'buttons':null,'topic':_0x18abe2[_0xe9f0('0xcc')],'note':_[_0xe9f0('0xd2')](_0x18abe2[_0xe9f0('0xd3')])?null:getMustacheRender(_0x18abe2[_0xe9f0('0xd3')],_0x40306a),'metadata':null},'redirect':'follow','json':!![]};try{if(!_[_0xe9f0('0xd2')](_0x18abe2[_0xe9f0('0xcd')])){var _0xfe329a=getMustacheRender(_0x18abe2[_0xe9f0('0xcd')],_0x40306a);var _0x358cda=JSON[_0xe9f0('0x88')](_0xfe329a);_0x35456b[_0xe9f0('0x7f')]['metadata']=_0x358cda;}}catch(_0x5b9074){throw new db[(_0xe9f0('0x98'))][(_0xe9f0('0xd4'))]('Error\x20in\x20conversion\x20vidaooMetadata');}return rp(_0x35456b);}else{throw new db[(_0xe9f0('0x98'))]['ValidationError'](_0xe9f0('0xd5'));}})[_0xe9f0('0x21')](function(_0x557b90){_0x14e369=_0x557b90;if(_0x14e369['id']){var _0x4aa320={'body':_0x14e369[_0xe9f0('0xd6')],'ChatWebsiteId':_0x18abe2['id'],'ChatInteractionId':_0x3f2f29['id'],'direction':_0xe9f0('0xd7'),'UserId':_0x59396b[_0xe9f0('0xa1')]['id']};return db['ChatMessage']['create'](_0x4aa320,{});}else{throw new db[(_0xe9f0('0x98'))][(_0xe9f0('0xd4'))](_0xe9f0('0xd8'));}})[_0xe9f0('0x21')](function(){return _0x3f2f29[_0xe9f0('0xd9')]({'vidaooSessionId':_0x14e369['id']});})[_0xe9f0('0x21')](respondWithResult(_0x564755,null))[_0xe9f0('0x2b')](handleError(_0x564755,null));};exports[_0xe9f0('0xda')]=function(_0x2f65a6,_0x45edd9){if(_0x2f65a6[_0xe9f0('0x7f')]['id']){delete _0x2f65a6[_0xe9f0('0x7f')]['id'];}return db[_0xe9f0('0xa9')][_0xe9f0('0x6e')]({'where':{'id':_0x2f65a6['params']['id']},'include':[{'model':db[_0xe9f0('0xdb')],'as':'Contact'}]})[_0xe9f0('0x21')](handleEntityNotFound(_0x45edd9,null))[_0xe9f0('0x21')](saveUpdates(_0x2f65a6[_0xe9f0('0x7f')],null))[_0xe9f0('0x21')](respondWithResult(_0x45edd9,null))[_0xe9f0('0x2b')](handleError(_0x45edd9,null));};exports[_0xe9f0('0xdc')]=function(_0x297e2b,_0x114c65,_0x5df944){if(_0x297e2b[_0xe9f0('0x7f')]['id']){delete _0x297e2b[_0xe9f0('0x7f')]['id'];}return db[_0xe9f0('0xa9')][_0xe9f0('0x6e')]({'where':{'id':_0x297e2b[_0xe9f0('0xc7')]['id']}})[_0xe9f0('0x21')](function(_0x1095d8){if(!_0x1095d8){logger[_0xe9f0('0x27')](_0xe9f0('0xdd'),_0xe9f0('0xdc'),0x194,_0xe9f0('0xde'));_0x114c65[_0xe9f0('0x2c')](0x194);}else{if(_0x1095d8[_0xe9f0('0x7e')]){throw new db[(_0xe9f0('0x98'))][(_0xe9f0('0xd4'))](_0xe9f0('0xdf'));}}return _0x1095d8;})['then'](function(_0x430b27){if(_0x430b27){return _0x430b27[_0xe9f0('0x37')]({'closed':_0x297e2b['body'][_0xe9f0('0xe0')],'disposition':_0x297e2b[_0xe9f0('0x7f')][_0xe9f0('0xe1')]})[_0xe9f0('0x21')](function(_0x5c34fa){return _0x5c34fa;});}})[_0xe9f0('0x21')](function(_0x3c80a4){return respondWithRpcPromise(_0xe9f0('0xe2'),_0xe9f0('0xdc'),_0x297e2b['body'],client9004);})[_0xe9f0('0x21')](respondWithResult(_0x114c65,null))['catch'](handleError(_0x114c65,null));};exports['attachmentUpload']=function(_0x14cad3,_0x4a98e8,_0x5cba30){_0x14cad3[_0xe9f0('0x7f')][_0xe9f0('0x3a')]=_0x14cad3[_0xe9f0('0xe3')][_0xe9f0('0xe4')];_0x14cad3[_0xe9f0('0x7f')]['basename']=_0x14cad3[_0xe9f0('0xe3')][_0xe9f0('0xe5')];_0x14cad3['body'][_0xe9f0('0x47')]=_0x14cad3[_0xe9f0('0xe3')][_0xe9f0('0xe6')];return db[_0xe9f0('0xe7')][_0xe9f0('0xc6')](_0x14cad3[_0xe9f0('0x7f')])[_0xe9f0('0x21')](respondWithResult(_0x4a98e8,0xc9))[_0xe9f0('0x2b')](handleError(_0x4a98e8,null));};exports[_0xe9f0('0xe8')]=function(_0x5b2c15,_0x2446b3,_0x3a3c7c){return db['ChatInteraction'][_0xe9f0('0xe9')]({'where':{'id':_0x5b2c15[_0xe9f0('0xc7')]['id']},'raw':!![]})[_0xe9f0('0x21')](handleEntityNotFound(_0x2446b3,null))[_0xe9f0('0x21')](function(_0x327d68){if(_0x327d68){if(_0x327d68['closed']){return _0x2446b3['status'](0x193)[_0xe9f0('0x35')]({'status':0x193,'message':_0xe9f0('0xea')});}return db[_0xe9f0('0xe7')]['findOne']({'where':{'id':_0x5b2c15[_0xe9f0('0x4b')][_0xe9f0('0xeb')]},'raw':!![]})[_0xe9f0('0x21')](handleEntityNotFound(_0x2446b3,null));}})[_0xe9f0('0x21')](function(_0x48ba5a){if(_0x48ba5a){var _0xac14ad=_0x48ba5a[_0xe9f0('0xec')]!==null;var _0x123951=path[_0xe9f0('0xed')](config[_0xe9f0('0xee')],_0xe9f0('0xef'));if(_0xac14ad){_0x123951=path[_0xe9f0('0xed')](_0x123951,_0xe9f0('0xf0'));}var _0x302279=path[_0xe9f0('0xed')](_0x123951,_0x48ba5a[_0xe9f0('0xf1')]);return _0x2446b3[_0xe9f0('0xf2')](_0x302279);}})['catch'](handleError(_0x2446b3,null));};exports[_0xe9f0('0xf3')]=function(_0x473602,_0x3cadbd){var _0x58fe38=null;var _0x1b37f7=null;var _0x4a3765=null;var _0x5964af=null;if(_0x473602[_0xe9f0('0x7f')]['id']){delete _0x473602['body']['id'];}if(_0x473602[_0xe9f0('0x7f')]['mailTranscript']){_0x5964af=path['join'](config[_0xe9f0('0xee')],_0xe9f0('0xf4'),util[_0xe9f0('0xf5')]('transcript-%s.txt',Date[_0xe9f0('0xf6')]()));_0x473602[_0xe9f0('0x7f')][_0xe9f0('0xf7')]=_0x5964af;}return db[_0xe9f0('0xa9')][_0xe9f0('0x6e')]({'where':{'id':_0x473602[_0xe9f0('0xc7')]['id']},'include':[{'model':db[_0xe9f0('0xf8')],'as':_0xe9f0('0xf9'),'include':[{'model':db[_0xe9f0('0x7c')],'as':_0xe9f0('0x7c')}]}]})[_0xe9f0('0x21')](handleEntityNotFound(_0x3cadbd,null))[_0xe9f0('0x21')](saveUpdates(_0x473602[_0xe9f0('0x7f')],null))[_0xe9f0('0x21')](function(_0x56a50c){if(_0x56a50c){_0x58fe38=_0x56a50c;return db[_0xe9f0('0xca')][_0xe9f0('0x6e')]({'where':{'id':_0x58fe38[_0xe9f0('0x83')]}});}})[_0xe9f0('0x21')](function(_0x2136dc){if(_0x2136dc){_0x4a3765=_0x2136dc;return db[_0xe9f0('0xdb')][_0xe9f0('0x6e')]({'where':{'id':_0x58fe38[_0xe9f0('0x75')]}});}})['then'](function(_0x296efe){if(_0x296efe){_0x1b37f7=_0x296efe;if(_0x5964af){var _0x504875=null;for(var _0x46e2fe=0x1;_0x46e2fe<_0x58fe38[_0xe9f0('0xf9')][_0xe9f0('0x50')];++_0x46e2fe){_0x504875=_0x58fe38[_0xe9f0('0xf9')][_0x46e2fe];var _0x329aa8=_0x504875[_0xe9f0('0x7e')]?util[_0xe9f0('0xf5')]('%s%d',_0x4a3765[_0xe9f0('0xfa')],_0x504875['UserId']):_0xe9f0('0xfb');var _0x419fdf=_0x473602['body']['customer']||util[_0xe9f0('0xf5')](_0xe9f0('0xfc'),_0xe9f0('0xfd'),_0x504875[_0xe9f0('0x75')]);switch(_0x4a3765[_0xe9f0('0xfe')]){case _0xe9f0('0xff'):_0x329aa8=_0x504875[_0xe9f0('0x7e')]?util[_0xe9f0('0xf5')](_0xe9f0('0xfc'),_0x4a3765[_0xe9f0('0xfa')],_0x504875[_0xe9f0('0x7e')]):_0xe9f0('0xfb');break;case _0xe9f0('0x100'):_0x329aa8=_0x504875['UserId']?_0x504875[_0xe9f0('0x7c')]['alias']||_0x504875['User'][_0xe9f0('0x40')]:_0xe9f0('0xfb');break;case _0xe9f0('0x101'):_0x329aa8=_0x504875[_0xe9f0('0x7e')]?_0x504875['User'][_0xe9f0('0x40')]:_0xe9f0('0xfb');break;default:_0x329aa8=_0x504875[_0xe9f0('0x7e')]?util[_0xe9f0('0xf5')](_0xe9f0('0xfc'),_0x4a3765['agentAlias'],_0x504875[_0xe9f0('0x7e')]):_0xe9f0('0xfb');}var _0x5293e4=util[_0xe9f0('0xf5')]('[%s]\x20%s:\x20%s\x0a',moment(_0x504875[_0xe9f0('0x86')])[_0xe9f0('0xf5')](_0xe9f0('0x102')),_0x504875[_0xe9f0('0x103')]==='in'?_0x419fdf:_0x329aa8,_0x504875[_0xe9f0('0x7f')]);if(!_0x504875[_0xe9f0('0x104')]){fs[_0xe9f0('0x105')](_0x5964af,_0x5293e4);}}return db[_0xe9f0('0x106')][_0xe9f0('0xe9')]({'where':{'service':!![]},'include':[{'model':db[_0xe9f0('0x107')],'as':'Smtp','raw':!![]}]});}}})[_0xe9f0('0x21')](function(_0x52919a){if(_0x52919a&&_0x52919a[_0xe9f0('0x108')]&&_0x473602[_0xe9f0('0x7f')]){var _0x509bb7={'tls':{'rejectUnauthorized':![]}};if(_0x52919a['Smtp']['service']){_0x509bb7[_0xe9f0('0x109')]=_0x52919a[_0xe9f0('0x108')][_0xe9f0('0x109')];}else{_0x509bb7[_0xe9f0('0x10a')]=_0x52919a[_0xe9f0('0x108')][_0xe9f0('0x10a')];_0x509bb7[_0xe9f0('0x10b')]=_0x52919a[_0xe9f0('0x108')][_0xe9f0('0x10b')];_0x509bb7['secure']=_0x52919a['Smtp'][_0xe9f0('0x10c')];}if(_0x52919a['Smtp'][_0xe9f0('0x10d')]){_0x509bb7[_0xe9f0('0x10e')]={'user':_0x52919a[_0xe9f0('0x108')][_0xe9f0('0xa1')],'pass':_0x52919a[_0xe9f0('0x108')]['pass']};}return respondWithRpcPromise(_0xe9f0('0x10f'),_0xe9f0('0x110'),{'account':_0x509bb7,'message':{'from':util[_0xe9f0('0xf5')](_0xe9f0('0x111'),_0x52919a[_0xe9f0('0x3a')],_0x52919a['email']||_0x52919a[_0xe9f0('0x108')][_0xe9f0('0xa1')]),'to':_0x473602['body'][_0xe9f0('0x112')],'subject':_0xe9f0('0x113'),'text':util[_0xe9f0('0xf5')]('Hi\x20%s,\x20attached\x20you\x20can\x20find\x20your\x20transcript\x20file.\x20\x0a\x0aRegards.\x20\x0a\x0a',_0x473602['body'][_0xe9f0('0x112')]),'attachments':[{'path':_0x5964af}]}})[_0xe9f0('0x21')](function(){return _0x58fe38;})[_0xe9f0('0x2b')](function(_0x4e4045){console['error'](_0x4e4045);});}else{return _0x58fe38;}})[_0xe9f0('0x21')](respondWithStatusCode(_0x3cadbd,0xc8))[_0xe9f0('0x2b')](handleError(_0x3cadbd,null));};exports[_0xe9f0('0x114')]=function(_0x4ee4f9,_0x3d4e42,_0x108042){return db[_0xe9f0('0xf8')][_0xe9f0('0x6e')]({'where':{'id':_0x4ee4f9[_0xe9f0('0xc7')]['id']}})[_0xe9f0('0x21')](handleEntityNotFound(_0x3d4e42,null))['then'](function(_0x218ee5){if(_0x218ee5){return _0x218ee5[_0xe9f0('0x114')](_0x4ee4f9[_0xe9f0('0x7f')][_0xe9f0('0x115')],_[_0xe9f0('0x116')](_0x4ee4f9[_0xe9f0('0x7f')],[_0xe9f0('0x115'),'id'])||{});}})[_0xe9f0('0x21')](respondWithResult(_0x3d4e42,null))[_0xe9f0('0x2b')](handleError(_0x3d4e42,null));};exports[_0xe9f0('0x117')]=function(_0x302ea1,_0x267c6d,_0x6f6f84){var _0xa4fd68={'raw':![],'where':{}};var _0x444df7={};var _0xd6a343={'count':0x0,'rows':[]};return db[_0xe9f0('0xa9')]['findOne']({'where':{'id':_0x302ea1['params']['id']}})['then'](handleEntityNotFound(_0x267c6d,null))[_0xe9f0('0x21')](function(_0xfa1b2){if(_0xfa1b2){_0x444df7['model']=_[_0xe9f0('0x4c')](db['ChatMessage'][_0xe9f0('0x46')]);_0x444df7[_0xe9f0('0x4b')]=_['keys'](_0x302ea1[_0xe9f0('0x4b')]);_0x444df7['filters']=_[_0xe9f0('0x118')](_0x444df7['model'],_0x444df7['query']);_0xa4fd68[_0xe9f0('0x4e')]=_[_0xe9f0('0x118')](_0x444df7['model'],qs[_0xe9f0('0x4f')](_0x302ea1[_0xe9f0('0x4b')][_0xe9f0('0x4f')]));_0xa4fd68[_0xe9f0('0x4e')]=_0xa4fd68[_0xe9f0('0x4e')][_0xe9f0('0x50')]?_0xa4fd68['attributes']:_0x444df7[_0xe9f0('0x49')];if(!_0x302ea1[_0xe9f0('0x4b')][_0xe9f0('0x51')](_0xe9f0('0x52'))){_0xa4fd68['limit']=qs[_0xe9f0('0x31')](_0x302ea1[_0xe9f0('0x4b')][_0xe9f0('0x31')]);_0xa4fd68[_0xe9f0('0x2f')]=qs[_0xe9f0('0x2f')](_0x302ea1[_0xe9f0('0x4b')][_0xe9f0('0x2f')]);}_0xa4fd68[_0xe9f0('0x53')]=qs[_0xe9f0('0x119')](_0x302ea1[_0xe9f0('0x4b')][_0xe9f0('0x119')]);_0xa4fd68[_0xe9f0('0x54')]=qs['filters'](_[_0xe9f0('0x55')](_0x302ea1[_0xe9f0('0x4b')],_0x444df7[_0xe9f0('0x4d')]));_0xa4fd68['where'][_0xe9f0('0xc0')]=_0xfa1b2['id'];if(_0x302ea1[_0xe9f0('0x4b')]['filter']){_0xa4fd68[_0xe9f0('0x54')]=_[_0xe9f0('0x3d')](_0xa4fd68[_0xe9f0('0x54')],{'$or':_[_0xe9f0('0x4a')](_0xa4fd68[_0xe9f0('0x4e')],function(_0x40b24c){var _0x71ea35={};_0x71ea35[_0x40b24c]={'$like':'%'+_0x302ea1['query']['filter']+'%'};return _0x71ea35;})});}if(_0x302ea1[_0xe9f0('0x4b')][_0xe9f0('0x87')]){var _0x2ecef9=_0x302ea1['query'][_0xe9f0('0x87')]['split'](',');var _0x52a628={};_0x52a628[_0x2ecef9[0x0]]={'$gte':moment(_0x2ecef9[0x1])[_0xe9f0('0xf5')](_0xe9f0('0x11a'))};_0xa4fd68['where']=_[_0xe9f0('0x3d')](_0xa4fd68[_0xe9f0('0x54')],_0x52a628);}_0xa4fd68=_[_0xe9f0('0x3d')]({},_0xa4fd68,_0x302ea1[_0xe9f0('0xc5')]);return db[_0xe9f0('0xf8')][_0xe9f0('0x32')]({'where':_0xa4fd68[_0xe9f0('0x54')]})[_0xe9f0('0x21')](function(_0x90b257){_0xd6a343[_0xe9f0('0x32')]=_0x90b257;if(_0x302ea1[_0xe9f0('0x4b')][_0xe9f0('0xc3')]){_0xa4fd68[_0xe9f0('0xc4')]=[{'all':!![]}];}return db[_0xe9f0('0xf8')][_0xe9f0('0x11b')](_0xa4fd68);})[_0xe9f0('0x21')](function(_0x48e968){_0xd6a343['rows']=_0x48e968;return _0xd6a343;});}})[_0xe9f0('0x21')](respondWithFilteredResult(_0x267c6d,_0xa4fd68))[_0xe9f0('0x2b')](handleError(_0x267c6d,null));};exports['getMyMessages']=function(_0xc39799,_0x5efe58,_0x216fe9){var _0x7cc418={'where':{}},_0x32805e={},_0x4a3225={'count':0x0,'rows':[]};return db[_0xe9f0('0xa9')]['findOne']({'where':{'id':_0xc39799[_0xe9f0('0xc7')]['id']}})[_0xe9f0('0x21')](handleEntityNotFound(_0x5efe58,null))[_0xe9f0('0x21')](function(_0x2391b7){if(_0x2391b7){_0x32805e[_0xe9f0('0x49')]=_[_0xe9f0('0x4c')](db[_0xe9f0('0xf8')]['rawAttributes']);_0x32805e['query']=_[_0xe9f0('0x4c')](_0xc39799[_0xe9f0('0x4b')]);_0x32805e['filters']=_[_0xe9f0('0x118')](_0x32805e['model'],_0x32805e[_0xe9f0('0x4b')]);_0x7cc418[_0xe9f0('0x4e')]=_[_0xe9f0('0x118')](_0x32805e[_0xe9f0('0x49')],qs['fields'](_0xc39799[_0xe9f0('0x4b')][_0xe9f0('0x4f')]));_0x7cc418[_0xe9f0('0x4e')]=_0x7cc418[_0xe9f0('0x4e')][_0xe9f0('0x50')]?_0x7cc418[_0xe9f0('0x4e')]:_0x32805e[_0xe9f0('0x49')];if(!_0xc39799[_0xe9f0('0x4b')]['hasOwnProperty']('nolimit')){_0x7cc418[_0xe9f0('0x31')]=qs[_0xe9f0('0x31')](_0xc39799[_0xe9f0('0x4b')][_0xe9f0('0x31')]);_0x7cc418['offset']=qs[_0xe9f0('0x2f')](_0xc39799[_0xe9f0('0x4b')][_0xe9f0('0x2f')]);}_0x7cc418['order']=qs[_0xe9f0('0x119')](_0xc39799[_0xe9f0('0x4b')]['sort']);_0x7cc418[_0xe9f0('0x54')]=qs[_0xe9f0('0x4d')](_[_0xe9f0('0x55')](_0xc39799[_0xe9f0('0x4b')],_0x32805e[_0xe9f0('0x4d')]));_0x7cc418[_0xe9f0('0x54')]['ChatInteractionId']=_0x2391b7['id'];if(_0xc39799[_0xe9f0('0x4b')][_0xe9f0('0x92')]){_0x7cc418[_0xe9f0('0x54')]=_[_0xe9f0('0x3d')](_0x7cc418['where'],{'$or':_[_0xe9f0('0x4a')](_0x7cc418['attributes'],function(_0x1ad83c){var _0x388dad={};_0x388dad[_0x1ad83c]={'$like':'%'+_0xc39799[_0xe9f0('0x4b')][_0xe9f0('0x92')]+'%'};return _0x388dad;})});}_0x7cc418[_0xe9f0('0x54')][_0xe9f0('0x104')]=![];if(_0xc39799[_0xe9f0('0x4b')]['id']){_0x7cc418[_0xe9f0('0x54')]['id']={'$gt':_0xc39799['query']['id']};}_0x7cc418=_[_0xe9f0('0x3d')]({},_0x7cc418,_0xc39799[_0xe9f0('0xc5')]);return db[_0xe9f0('0xf8')][_0xe9f0('0x32')]({'where':_0x7cc418[_0xe9f0('0x54')]})['then'](function(_0x198900){_0x4a3225[_0xe9f0('0x32')]=_0x198900;_0x7cc418['include']=[];if(_0xc39799[_0xe9f0('0x4b')][_0xe9f0('0x11c')]){_0x7cc418['include'][_0xe9f0('0xc1')]({'model':db[_0xe9f0('0x7c')],'as':'User','attributes':['id',_0xe9f0('0x40'),_0xe9f0('0x11d')]});}if(_0xc39799['query']['includeAll']){_0x7cc418['include']=[{'all':!![]}];}return db['ChatMessage']['findAll'](_0x7cc418);})[_0xe9f0('0x21')](function(_0x266c0f){_0x4a3225[_0xe9f0('0x11e')]=_0x266c0f;return _0x4a3225;});}})['then'](respondWithFilteredResult(_0x5efe58,_0x7cc418))[_0xe9f0('0x2b')](handleError(_0x5efe58,null));};exports[_0xe9f0('0x11f')]=function(_0x548542,_0xdd7ded,_0x16b798){return db[_0xe9f0('0xa9')][_0xe9f0('0x6e')]({'where':{'id':_0x548542['params']['id']}})['then'](handleEntityNotFound(_0xdd7ded,null))['then'](function(_0x2ebe48){if(_0x2ebe48){return _0x2ebe48['setTags'](_0x548542[_0xe9f0('0x7f')]['ids'],_['omit'](_0x548542[_0xe9f0('0x7f')],['ids','id'])||{})[_0xe9f0('0x120')](function(){return db[_0xe9f0('0x79')][_0xe9f0('0x11b')]({'attributes':['id',_0xe9f0('0x3a'),'color'],'where':{'id':_0x548542[_0xe9f0('0x7f')]['ids']}});})[_0xe9f0('0x21')](function(_0x107363){socket[_0xe9f0('0x121')]('chatInteractionTags:save',{'id':Number(_0x548542[_0xe9f0('0xc7')]['id']),'tags':_0x107363||[]});return{'id':Number(_0x548542[_0xe9f0('0xc7')]['id']),'tags':_0x107363||[]};});}})[_0xe9f0('0x21')](respondWithResult(_0xdd7ded,null))['catch'](handleError(_0xdd7ded,null));};exports['removeTags']=function(_0x257fc2,_0x58c366,_0x306620){return db['ChatInteraction'][_0xe9f0('0x6e')]({'where':{'id':_0x257fc2[_0xe9f0('0xc7')]['id']}})[_0xe9f0('0x21')](handleEntityNotFound(_0x58c366,null))[_0xe9f0('0x21')](function(_0x13e1bd){if(_0x13e1bd){return _0x13e1bd[_0xe9f0('0x122')](_0x257fc2[_0xe9f0('0x4b')]['ids']);}})[_0xe9f0('0x21')](respondWithStatusCode(_0x58c366,null))['catch'](handleError(_0x58c366,null));};exports[_0xe9f0('0xf2')]=function(_0x37d384,_0x35de8c){var _0x1da405=moment()['unix']()[_0xe9f0('0xa6')]();var _0x1e3715=path[_0xe9f0('0xed')](config[_0xe9f0('0xee')],_0xe9f0('0x123'),'files',_0xe9f0('0x124'));var _0x31a744=path[_0xe9f0('0xed')](config[_0xe9f0('0xee')],'server',_0xe9f0('0x125'),_0xe9f0('0x126'));var _0x1cc3b2=path[_0xe9f0('0xed')](_0x1e3715,_0x1da405);var _0x450684=util[_0xe9f0('0xf5')](_0xe9f0('0x127'),_0x37d384['params']['id'],_0x1da405);var _0x2163d8=path[_0xe9f0('0xed')](_0x1e3715,_0x450684);var _0x2dd6d1=[];_0x2dd6d1[_0xe9f0('0xc1')]({'model':db[_0xe9f0('0x7c')],'as':_0xe9f0('0x7c'),'attributes':['id',_0xe9f0('0x40')],'raw':!![]});_0x2dd6d1[_0xe9f0('0xc1')]({'model':db['CmContact'],'as':_0xe9f0('0x128'),'attributes':['id',_0xe9f0('0x129'),'lastName'],'raw':!![]});if(_0x37d384[_0xe9f0('0x4b')][_0xe9f0('0x126')]){_0x2dd6d1[_0xe9f0('0xc1')]({'model':db['Attachment'],'as':'Attachment','raw':!![]});}var _0x36e6b0=[{'model':db['ChatMessage'],'as':_0xe9f0('0xf9'),'attributes':['id',_0xe9f0('0x7f'),_0xe9f0('0x86'),_0xe9f0('0x103'),'secret',_0xe9f0('0x8d')],'include':_0x2dd6d1}];_0x36e6b0['push']({'model':db['ChatWebsite'],'as':_0xe9f0('0x12a'),'attributes':['id',_0xe9f0('0x3a')]});_0x36e6b0[_0xe9f0('0xc1')]({'model':db[_0xe9f0('0x7c')],'as':_0xe9f0('0x12b'),'attributes':['id',_0xe9f0('0x40')]});return db['ChatInteraction'][_0xe9f0('0x6e')]({'where':{'id':_0x37d384['params']['id']},'include':_0x36e6b0})[_0xe9f0('0x21')](handleEntityNotFound(_0x35de8c,null))[_0xe9f0('0x21')](function(_0x193cb2){if(_0x193cb2){var _0x3cb18a=_0x193cb2['get']({'plain':!![]});fs[_0xe9f0('0x12c')](_0x1cc3b2);var _0x3e49a0={'channel':'Chat','account':_0x3cb18a[_0xe9f0('0x12a')][_0xe9f0('0x3a')],'agent':_0x3cb18a[_0xe9f0('0x12b')]?_0x3cb18a['Owner']['fullname']:'N.A.','createdAt':moment(_0x3cb18a[_0xe9f0('0x86')])[_0xe9f0('0xf5')]('YYYY-MM-DD\x20HH:mm:ss')[_0xe9f0('0xa6')](),'closedAt':_0x3cb18a[_0xe9f0('0xe0')]?moment(_0x3cb18a[_0xe9f0('0x12d')])[_0xe9f0('0xf5')](_0xe9f0('0x11a'))[_0xe9f0('0xa6')]():'','disposition':_0x3cb18a[_0xe9f0('0xe1')],'chatInfo':{'browser':_0x3cb18a[_0xe9f0('0x12e')],'os':_0x3cb18a['osName'],'referer':_0x3cb18a[_0xe9f0('0x12f')],'customerIp':_0x3cb18a[_0xe9f0('0x130')],'customerPort':_0x3cb18a[_0xe9f0('0x131')]?_0x3cb18a[_0xe9f0('0x131')]:_0xe9f0('0x132')},'messages':_(_0x3cb18a['Messages'])[_0xe9f0('0x133')]()['filter']({'secret':![]})[_0xe9f0('0x4a')](function(_0xa78163){if(_0xa78163[_0xe9f0('0xe7')]){var _0x3b422c=path[_0xe9f0('0xed')](_0x31a744,_0xa78163['Attachment'][_0xe9f0('0xf1')]);if(fs[_0xe9f0('0x134')](_0x3b422c)){fs['createReadStream'](_0x3b422c)[_0xe9f0('0x135')](fs[_0xe9f0('0x136')](path['join'](_0x1cc3b2,_0xa78163[_0xe9f0('0xe7')][_0xe9f0('0xf1')])));}}return{'date':moment(_0xa78163[_0xe9f0('0x86')])[_0xe9f0('0xf5')](_0xe9f0('0x11a'))[_0xe9f0('0xa6')](),'sender':_0xa78163[_0xe9f0('0x103')]===_0xe9f0('0xd7')?_0xa78163[_0xe9f0('0x7c')]?_0xa78163['User'][_0xe9f0('0x40')]:_0xe9f0('0xfb'):_0xa78163[_0xe9f0('0x128')]['firstName']+(_0xa78163['Contact'][_0xe9f0('0x137')]?'\x20'+_0xa78163[_0xe9f0('0x128')]['lastName']:''),'body':_0xa78163[_0xe9f0('0xe7')]?_0xa78163['Attachment']['basename']:_0xa78163['body'],'direction':_0xa78163['direction']===_0xe9f0('0xd7')?'A':'C','secret':_0xa78163[_0xe9f0('0x104')],'read':_0xa78163['read'],'attachment':_0xa78163[_0xe9f0('0xe7')]};})[_0xe9f0('0x72')]()};return ejs['renderFile'](path[_0xe9f0('0xed')](config[_0xe9f0('0xee')],'server','views',_0xe9f0('0x138')),{'interaction':_0x3e49a0})['then'](function(_0x27f0d9){var _0x296c10=path[_0xe9f0('0xed')](_0x1cc3b2,_0xe9f0('0x139')+_0x3cb18a['id']+'-'+_0x1da405+'.pdf');var _0x484e2d={'path':_0x296c10,'channel':_0xe9f0('0x13a'),'interactionId':_0x3cb18a['id']};return pdf[_0xe9f0('0x13b')](_0x27f0d9,_0x484e2d);})[_0xe9f0('0x21')](function(){return new BPromise(function(_0x1cf653,_0x571169){zipdir(_0x1cc3b2,{'saveTo':_0x2163d8},function(_0x1f25ea,_0x524711){if(_0x1f25ea)return _0x571169(_0x1f25ea);return _0x1cf653(_0x524711);});})[_0xe9f0('0x21')](function(){return new BPromise(function(_0xbb7e33,_0x2e2fb9){rimraf(_0x1cc3b2,function(_0x51d788){if(_0x51d788)_0x2e2fb9(_0x51d788);return _0xbb7e33();});});})[_0xe9f0('0x21')](function(){return _0x35de8c[_0xe9f0('0xf2')](_0x2163d8,_0x450684,function(_0x4da74e){if(_0x4da74e){console['log'](_0xe9f0('0x13c'),_0x4da74e);}else{fs['unlinkSync'](_0x2163d8);}});});});}else{return _0x35de8c['sendStatus'](0xc8);}})[_0xe9f0('0x2b')](handleError(_0x35de8c,null));}; \ No newline at end of file +var _0x4024=['ChatInteractionId','push','all','rows','show','params','include','options','create','createVidaooSession','findOne','ChatWebsite','vidaooApiKey','vidaooTopic','vidaooNote','fullname','email','contact','POST','https://api-vidaoo.xcally.com/api/v1/meetings','isNull','follow','vidaooMetadata','metadata','Sequelize','ValidationError','Error\x20in\x20conversion\x20vidaooMetadata','join_url','out','Unable\x20to\x20create\x20Vidaoo\x20session','updateAttributes','customUpdate','CmContact','abandon','abandonInteraction,\x20%s,\x20%s,\x20%s','entity\x20not\x20found','AbandonInteraction','attachmentUpload','file','originalname','basename','filename','mimetype','Attachment','attachmentDownload','Unauthorized','ChatOfflineMessageId','join','root','server/files/attachments/','offline-chat/','download','close','mailTranscript','server/files/chat/upload/','format','transcript-%s.txt','pathTranscript','ChatMessage','Messages','ContactId','%s%d','agentAlias','System','Visitor','agentIdentifier','website_alias','agent_alias','alias','agent_fullname','[%s]\x20%s:\x20%s\x0a','MM/DD/YYYY\x20HH:mm:ss','direction','secret','appendFileSync','MailServerOut','Smtp','service','host','port','secure','authentication','auth','pass','SendMail','sendMail','\x22%s\x22\x20<%s>','Mail\x20Transcript','Hi\x20%s,\x20attached\x20you\x20can\x20find\x20your\x20transcript\x20file.\x20\x0a\x0aRegards.\x20\x0a\x0a','addMessage','omit','getMessages','hasOwnProperty','sort','$gte','YYYY-MM-DD\x20HH:mm:ss','includeAll','findAll','getMyMessages','includeAgent','addTags','setTags','ids','spread','color','emit','chatInteractionTags:save','removeTags','unix','server','files','tmp','attachments','transcript-%d-%s.zip','firstName','Account','get','mkdirSync','Chat','Owner','N.A.','closed','browserName','referer','customerIp','customerPort','tail','existsSync','createReadStream','pipe','createWriteStream','lastName','renderFile','.pdf','createPdfFromHTML','err','unlinkSync','eml-format','rimraf','fast-json-patch','request-promise','bluebird','util','path','ejs','fs-extra','lodash','crypto','to-csv','ioredis','../../components/parsers/qs','../../components/export/pdf','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','defaults','redis','localhost','socket.io-emitter','./chatInteraction.socket','register','jayson/promise','client','http','request','info','ChatInteraction,\x20%s,\x20%s','debug','ChatInteraction,\x20%s,\x20%s,\x20%s','stringify','code','error','message','request\x20sent','end','status','offset','limit','undefined','count','set','json','apply','reject','save','update','destroy','then','sendStatus','name','render','merge','agent','interaction','account','Users','TagIds','Tags','split','forEach','catch','map','ChatInteraction','rawAttributes','fieldName','key','model','query','keys','filters','intersection','fields','attributes','length','nolimit','where','pick','select','field','from','tools_tags','u.id','u.fullname','ui.ChatInteractionId','user_has_chat_interactions','left_join','users','chat_interactions','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL','o.id\x20=\x20i.UserId','chat_websites','a.id\x20=\x20i.ChatWebsiteId','chat_messages','me.ChatInteractionId\x20=\x20i.id','chat_interaction_has_tags','it.ChatInteractionId\x20=\x20i.id','expr','search','sqlOperator','conditions','find','unreadMessages','value','`\x20=\x200','`\x20>\x200','Contact','operator','getFullTextValue','c.firstName\x20LIKE\x20?\x20OR\x20c.lastName\x20LIKE\x20?\x20OR\x20c.email\x20LIKE\x20?','buildExpression','type','start','Tag','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','User','UserId','text','body','compact','ChatWebsiteId','i.ChatWebsiteId\x20IN\x20?','concat','createdAt','parse','$lte','i.createdAt\x20BETWEEN\x20?\x20AND\x20?','null','\x20=\x20?','read','`unreadMessages`\x20=\x200','having','isArray','tag','filter','replace','isNumeric','i.id\x20LIKE\x20?','MATCH\x20(me.body)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','CONCAT(c.firstName,\x20\x27\x20\x27,\x20c.lastName)\x20LIKE\x20?','i.id','QueryTypes','clone','SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)','order','DESC','isEmpty','t.id\x20IN\x20?','resolve','i.ChatWebsiteId\x20IS\x20NOT\x20NULL','user','role','i.ChatWebsiteId\x20IS\x20NULL','sequelize','toString','keyBy','a.key','a.mandatoryDisposition','c.firstName','Contact.firstName','c.lastName','c.email','Contact.email','c.phone','Contact.phone','c.mobile','Contact.mobile','o.fullname','Owner.fullname','o.internal','Owner.internal','GROUP_CONCAT(DISTINCT\x20t.id)','groupBy'];(function(_0x14347b,_0x4909d0){var _0x35f35c=function(_0x438f07){while(--_0x438f07){_0x14347b['push'](_0x14347b['shift']());}};_0x35f35c(++_0x4909d0);}(_0x4024,0x89));var _0x4402=function(_0x18d645,_0x152c7a){_0x18d645=_0x18d645-0x0;var _0x237eb7=_0x4024[_0x18d645];return _0x237eb7;};'use strict';var emlformat=require(_0x4402('0x0'));var rimraf=require(_0x4402('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x4402('0x2'));var rp=require(_0x4402('0x3'));var moment=require('moment');var BPromise=require(_0x4402('0x4'));var Mustache=require('mustache');var util=require(_0x4402('0x5'));var path=require(_0x4402('0x6'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x4402('0x7'));var fs=require('fs');var fs_extra=require(_0x4402('0x8'));var _=require(_0x4402('0x9'));var squel=require('squel');var crypto=require(_0x4402('0xa'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x4402('0xb'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x4402('0xc'));var authService=require('../../components/auth/service');var qs=require(_0x4402('0xd'));var as=require('../../components/parsers/advancedSearch');var pdf=require(_0x4402('0xe'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x4402('0xf'))(_0x4402('0x10'));var utils=require('../../config/utils');var config=require(_0x4402('0x11'));var licenseUtil=require(_0x4402('0x12'));var db=require(_0x4402('0x13'))['db'];config['redis']=_[_0x4402('0x14')](config[_0x4402('0x15')],{'host':_0x4402('0x16'),'port':0x18eb});var socket=require(_0x4402('0x17'))(new Redis(config[_0x4402('0x15')]));require(_0x4402('0x18'))[_0x4402('0x19')](socket);var jayson=require(_0x4402('0x1a'));var client=jayson[_0x4402('0x1b')][_0x4402('0x1c')]({'port':0x232b});var client9004=jayson[_0x4402('0x1b')][_0x4402('0x1c')]({'port':0x232c});function respondWithRpcPromise(_0x2a2ce8,_0x19fe7b,_0xfd9853,_0x30c390){return new BPromise(function(_0x399c24,_0x25e88b){var _0x186c22=_0x30c390||client;return _0x186c22[_0x4402('0x1d')](_0x2a2ce8,_0xfd9853)['then'](function(_0x494389){logger[_0x4402('0x1e')](_0x4402('0x1f'),_0x19fe7b,'request\x20sent');logger[_0x4402('0x20')](_0x4402('0x21'),_0x19fe7b,'request\x20sent',JSON[_0x4402('0x22')](_0x494389));if(_0x494389['error']){if(_0x494389['error'][_0x4402('0x23')]===0x1f4){logger[_0x4402('0x24')](_0x4402('0x1f'),_0x19fe7b,_0x494389['error'][_0x4402('0x25')]);return _0x25e88b(_0x494389['error']['message']);}logger[_0x4402('0x24')](_0x4402('0x1f'),_0x19fe7b,_0x494389[_0x4402('0x24')][_0x4402('0x25')]);return _0x399c24(_0x494389[_0x4402('0x24')][_0x4402('0x25')]);}else{logger[_0x4402('0x1e')](_0x4402('0x1f'),_0x19fe7b,_0x4402('0x26'));_0x399c24(_0x494389['result'][_0x4402('0x25')]);}})['catch'](function(_0x3733cd){logger[_0x4402('0x24')](_0x4402('0x1f'),_0x19fe7b,_0x3733cd);_0x25e88b(_0x3733cd);});});}function respondWithStatusCode(_0x211424,_0x5a43d0){_0x5a43d0=_0x5a43d0||0xcc;return function(_0x15c19f){if(_0x15c19f){return _0x211424['sendStatus'](_0x5a43d0);}return _0x211424['status'](_0x5a43d0)[_0x4402('0x27')]();};}function respondWithResult(_0x395e49,_0x327d60){_0x327d60=_0x327d60||0xc8;return function(_0xabf61b){if(_0xabf61b){return _0x395e49[_0x4402('0x28')](_0x327d60)['json'](_0xabf61b);}};}function respondWithFilteredResult(_0x41de44,_0x52e625){return function(_0x71da2f){if(_0x71da2f){var _0x1e2340=typeof _0x52e625[_0x4402('0x29')]==='undefined'&&typeof _0x52e625[_0x4402('0x2a')]===_0x4402('0x2b');var _0x316239=_0x71da2f[_0x4402('0x2c')];var _0x2526d1=_0x1e2340?0x0:_0x52e625[_0x4402('0x29')];var _0x1189b8=_0x1e2340?_0x71da2f[_0x4402('0x2c')]:_0x52e625[_0x4402('0x29')]+_0x52e625[_0x4402('0x2a')];var _0xcea26b;if(_0x1189b8>=_0x316239){_0x1189b8=_0x316239;_0xcea26b=0xc8;}else{_0xcea26b=0xce;}_0x41de44['status'](_0xcea26b);return _0x41de44[_0x4402('0x2d')]('Content-Range',_0x2526d1+'-'+_0x1189b8+'/'+_0x316239)[_0x4402('0x2e')](_0x71da2f);}return null;};}function patchUpdates(_0x554096){return function(_0x2dea0f){try{jsonpatch[_0x4402('0x2f')](_0x2dea0f,_0x554096,!![]);}catch(_0x145003){return BPromise[_0x4402('0x30')](_0x145003);}return _0x2dea0f[_0x4402('0x31')]();};}function saveUpdates(_0x480781,_0x3a60af){return function(_0x3fa7ae){if(_0x3fa7ae){return _0x3fa7ae[_0x4402('0x32')](_0x480781)['then'](function(_0x331c75){return _0x331c75;});}return null;};}function removeEntity(_0x3383e3,_0x535e1d){return function(_0x2db1fe){if(_0x2db1fe){return _0x2db1fe[_0x4402('0x33')]()[_0x4402('0x34')](function(){_0x3383e3[_0x4402('0x28')](0xcc)[_0x4402('0x27')]();});}};}function handleEntityNotFound(_0x235f30,_0x1e67ac){return function(_0x6e9fb7){if(!_0x6e9fb7){_0x235f30[_0x4402('0x35')](0x194);}return _0x6e9fb7;};}function handleError(_0x5c819a,_0x2995b6){_0x2995b6=_0x2995b6||0x1f4;return function(_0x28fee8){logger[_0x4402('0x24')](_0x28fee8['stack']);if(_0x28fee8[_0x4402('0x36')]){delete _0x28fee8[_0x4402('0x36')];}_0x5c819a['status'](_0x2995b6)['send'](_0x28fee8);};}function getMustacheRender(_0x2b9d51,_0x5b7c2e){return Mustache[_0x4402('0x37')](_0x2b9d51,_[_0x4402('0x38')](_0x5b7c2e['body'],{'contact':_0x5b7c2e['contact'],'message':_0x5b7c2e['message'],'agent':_0x5b7c2e[_0x4402('0x39')],'interaction':_0x5b7c2e[_0x4402('0x3a')],'account':_0x5b7c2e[_0x4402('0x3b')]}))||'';}function getInteractionUsers(_0x3fd8ce,_0x52af0d){return new BPromise(function(_0x20579c,_0x7d5f2a){try{if(_0x52af0d[_0x3fd8ce['id']]){_0x3fd8ce[_0x4402('0x3c')]=_['map'](_0x52af0d[_0x3fd8ce['id']],function(_0x2b92b7){return{'id':_0x2b92b7['id'],'fullname':_0x2b92b7['fullname']};});}}catch(_0x6e328a){_0x7d5f2a(_0x6e328a);}_0x20579c(_0x3fd8ce);});}function getInteractionTags(_0x3ef31d,_0x5c74b1){return new BPromise(function(_0x16ef2e,_0x529526){try{if(_0x3ef31d[_0x4402('0x3d')]){_0x3ef31d[_0x4402('0x3e')]=[];_0x3ef31d['TagIds'][_0x4402('0x3f')](',')[_0x4402('0x40')](function(_0x250f09){_0x3ef31d[_0x4402('0x3e')]['push'](_0x5c74b1[_0x250f09]);});}delete _0x3ef31d['TagIds'];}catch(_0x2cda0a){_0x529526(_0x2cda0a);}_0x16ef2e(_0x3ef31d);});}function updateChatInteraction(_0x47a3a3,_0x3a589b,_0x2a6d78){return new BPromise(function(_0xb9cf85,_0x2e2391){return getInteractionUsers(_0x47a3a3,_0x2a6d78)[_0x4402('0x34')](function(_0x455a62){return getInteractionTags(_0x455a62,_0x3a589b);})[_0x4402('0x34')](function(_0x390169){_0xb9cf85(_0x390169);})[_0x4402('0x41')](function(_0x42812b){_0x2e2391(_0x42812b);});});}exports['index']=function(_0x14b94b,_0x3236fc){var _0x5e7872={},_0x214eec={},_0x370878={'count':0x0,'rows':[]};var _0x50552a=_[_0x4402('0x42')](db[_0x4402('0x43')][_0x4402('0x44')],function(_0x3278fc){return{'name':_0x3278fc[_0x4402('0x45')],'type':_0x3278fc['type'][_0x4402('0x46')]};});_0x214eec[_0x4402('0x47')]=_[_0x4402('0x42')](_0x50552a,_0x4402('0x36'));_0x214eec[_0x4402('0x48')]=_[_0x4402('0x49')](_0x14b94b[_0x4402('0x48')]);_0x214eec[_0x4402('0x4a')]=_[_0x4402('0x4b')](_0x214eec[_0x4402('0x47')],_0x214eec[_0x4402('0x48')]);_0x5e7872['attributes']=_[_0x4402('0x4b')](_0x214eec['model'],qs[_0x4402('0x4c')](_0x14b94b[_0x4402('0x48')]['fields']));_0x5e7872[_0x4402('0x4d')]=_0x5e7872[_0x4402('0x4d')][_0x4402('0x4e')]?_0x5e7872[_0x4402('0x4d')]:_0x214eec[_0x4402('0x47')];if(!_0x14b94b[_0x4402('0x48')]['hasOwnProperty'](_0x4402('0x4f'))){_0x5e7872[_0x4402('0x2a')]=qs[_0x4402('0x2a')](_0x14b94b[_0x4402('0x48')][_0x4402('0x2a')]);_0x5e7872[_0x4402('0x29')]=qs[_0x4402('0x29')](_0x14b94b[_0x4402('0x48')][_0x4402('0x29')]);}_0x5e7872['order']=qs['sort'](_0x14b94b['query']['sort']);_0x5e7872[_0x4402('0x50')]=qs[_0x4402('0x4a')](_[_0x4402('0x51')](_0x14b94b[_0x4402('0x48')],_0x214eec['filters']),_0x50552a);var _0x169bb2=[];var _0x12d6de=squel[_0x4402('0x52')]()[_0x4402('0x53')]('id')[_0x4402('0x53')](_0x4402('0x36'))[_0x4402('0x53')]('color')[_0x4402('0x54')](_0x4402('0x55'));var _0x38e6d1=squel[_0x4402('0x52')]()[_0x4402('0x53')](_0x4402('0x56'))['field'](_0x4402('0x57'))[_0x4402('0x53')](_0x4402('0x58'))[_0x4402('0x54')](_0x4402('0x59'),'ui')[_0x4402('0x5a')](_0x4402('0x5b'),'u','u.id\x20=\x20ui.UserId');var _0x48e138=squel[_0x4402('0x52')]()[_0x4402('0x54')](_0x4402('0x5c'),'i')['left_join']('cm_contacts','c',_0x4402('0x5d'))[_0x4402('0x5a')](_0x4402('0x5b'),'o',_0x4402('0x5e'))[_0x4402('0x5a')](_0x4402('0x5f'),'a',_0x4402('0x60'))[_0x4402('0x5a')](_0x4402('0x61'),'me',_0x4402('0x62'))[_0x4402('0x5a')](_0x4402('0x63'),'it',_0x4402('0x64'))['left_join'](_0x4402('0x55'),'t','t.id\x20=\x20it.TagId');var _0xe4530a=squel['expr']();var _0x3fb9f0=[];var _0x1e5891=squel[_0x4402('0x65')]();var _0x31e36c;if(_0x14b94b[_0x4402('0x48')][_0x4402('0x66')]){_0x31e36c=as['parseSearch'](_0x14b94b[_0x4402('0x48')][_0x4402('0x66')]);var _0xa390ce=_0x31e36c[_0x4402('0x67')];for(var _0xb341ab=0x0;_0xb341ab<_0x31e36c['conditions'][_0x4402('0x4e')];_0xb341ab++){var _0x31d993=_0x31e36c[_0x4402('0x68')][_0xb341ab];var _0xc15c0b='i';var _0x309077=_[_0x4402('0x69')](_0x50552a,[_0x4402('0x36'),_0x31d993[_0x4402('0x53')]]);if(!_0x309077){switch(_0x31d993['field']){case _0x4402('0x6a'):if(_0x31d993[_0x4402('0x6b')]==0x1){_0x48e138['having']('`'+_0x31d993[_0x4402('0x53')]+_0x4402('0x6c'));}else{_0x48e138['having']('`'+_0x31d993['field']+_0x4402('0x6d'));}break;case _0x4402('0x6e'):if(_0x31d993[_0x4402('0x6f')]==='$substring'){if(_0x31d993[_0x4402('0x6b')][_0x4402('0x3f')]('\x20')[_0x4402('0x4e')]>0x1){_0xe4530a[_0xa390ce]('MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)',qs[_0x4402('0x70')](_0x31d993[_0x4402('0x6b')]),null);}else{var _0xdde09f='%'+_0x31d993['value']+'%';_0xe4530a[_0xa390ce](_0x4402('0x71'),_0xdde09f,_0xdde09f,_0xdde09f);}}else{_0x309077=_[_0x4402('0x69')](_0x50552a,['name','ContactId']);_0x31d993[_0x4402('0x53')]='ContactId';_0x53e553=as[_0x4402('0x72')](_0xc15c0b,_0x309077[_0x4402('0x73')],_0x31d993);_0xe4530a[_0xa390ce](_0x53e553['text'],_0x53e553['value'][_0x4402('0x74')],_0x53e553[_0x4402('0x6b')][_0x4402('0x27')]);}break;case _0x4402('0x75'):var _0x4ac95e=_0x31d993[_0x4402('0x6b')][_0x4402('0x3f')](',')[_0x4402('0x42')](function(_0x168095){return Number(_0x168095);});_0x4ac95e[_0x4402('0x40')](function(_0x26b1ad){_0x1e5891['or'](_0x4402('0x76'),'%,'+_0x26b1ad+',%');});_0x3fb9f0=_['union'](_0x3fb9f0,_0x4ac95e);break;case _0x4402('0x77'):if(_0x31d993[_0x4402('0x6f')]==='$substring'){_0xe4530a[_0xa390ce]('CONCAT_WS(\x27\x20\x27,\x20o.name,\x20o.fullname)\x20LIKE\x20?','%'+_0x31d993[_0x4402('0x6b')]+'%',null);}else{_0x309077=_['find'](_0x50552a,[_0x4402('0x36'),'UserId']);_0x31d993[_0x4402('0x53')]=_0x4402('0x78');_0x53e553=as[_0x4402('0x72')](_0xc15c0b,_0x309077[_0x4402('0x73')],_0x31d993);_0xe4530a[_0xa390ce](_0x53e553[_0x4402('0x79')],_0x53e553[_0x4402('0x6b')][_0x4402('0x74')],_0x53e553[_0x4402('0x6b')][_0x4402('0x27')]);}break;case _0x4402('0x7a'):_0x53e553=as[_0x4402('0x72')]('me',null,_0x31d993);_0xe4530a[_0xa390ce](_0x53e553[_0x4402('0x79')],_0x53e553[_0x4402('0x6b')][_0x4402('0x74')],_0x53e553[_0x4402('0x6b')][_0x4402('0x27')]);break;}}else{var _0x53e553=as[_0x4402('0x72')](_0xc15c0b,_0x309077[_0x4402('0x73')],_0x31d993);_0xe4530a[_0xa390ce](_0x53e553[_0x4402('0x79')],_0x53e553['value'][_0x4402('0x74')],_0x53e553['value'][_0x4402('0x27')]);}}}else{var _0x1b1147=_(_0x14b94b[_0x4402('0x48')])[_0x4402('0x49')]()['map'](function(_0xac8513){return _['some'](_0x50552a,[_0x4402('0x36'),_0xac8513])?_0xac8513:undefined;})[_0x4402('0x7b')]()[_0x4402('0x6b')]();if(!_['isEmpty'](_0x1b1147)){_0x1b1147[_0x4402('0x40')](function(_0x4c98eb){if(_0x4c98eb===_0x4402('0x7c')){_0x48e138[_0x4402('0x50')](_0x4402('0x7d'),[][_0x4402('0x7e')](_0x14b94b[_0x4402('0x48')][_0x4c98eb]));}else if(_0x4c98eb===_0x4402('0x7f')){var _0x19b427=JSON[_0x4402('0x80')](_0x14b94b[_0x4402('0x48')][_0x4c98eb])['$gte'];var _0x44d806=JSON[_0x4402('0x80')](_0x14b94b[_0x4402('0x48')][_0x4c98eb])[_0x4402('0x81')];_0x48e138[_0x4402('0x50')](_0x4402('0x82'),_0x19b427,_0x44d806);}else{if(_0x14b94b[_0x4402('0x48')][_0x4c98eb]===_0x4402('0x83')){_0x48e138[_0x4402('0x50')]('i.'+_0x4c98eb+'\x20IS\x20NULL');}else{_0x48e138[_0x4402('0x50')]('i.'+_0x4c98eb+_0x4402('0x84'),_0x14b94b[_0x4402('0x48')][_0x4c98eb]);}}});}if(_0x14b94b['query'][_0x4402('0x85')]){if(_0x14b94b['query'][_0x4402('0x85')]==0x1){_0x48e138['having'](_0x4402('0x86'));}else{_0x48e138[_0x4402('0x87')]('`unreadMessages`\x20>\x200');}}if(_0x14b94b[_0x4402('0x48')]['tag']){_0x3fb9f0=_[_0x4402('0x88')](_0x14b94b[_0x4402('0x48')]['tag'])?_0x14b94b[_0x4402('0x48')][_0x4402('0x89')]:new Array(_0x14b94b['query'][_0x4402('0x89')]);_0x3fb9f0[_0x4402('0x40')](function(_0x4f0915){_0x1e5891['or'](_0x4402('0x76'),'%,'+_0x4f0915+',%');});}if(_0x14b94b[_0x4402('0x48')][_0x4402('0x8a')]){var _0x12b834=_0x14b94b[_0x4402('0x48')][_0x4402('0x8a')][_0x4402('0x8b')]('\x5c','\x5c\x5c')[_0x4402('0x8b')](/'/g,'\x27\x27');if(qs[_0x4402('0x8c')](_0x12b834)){_0xe4530a['or'](_0x4402('0x8d'),_0x12b834+'%');}else{_0xe4530a['or'](_0x4402('0x8e'),qs[_0x4402('0x70')](_0x12b834))['or'](_0x4402('0x8f'),_0x12b834+'%');}}}_0x48e138[_0x4402('0x50')](_0xe4530a);_0x48e138['group'](_0x4402('0x90'));var _0xc3914e={'type':db['Sequelize'][_0x4402('0x91')]['SELECT'],'raw':!![]};var _0x2c7ff5=_0x48e138[_0x4402('0x92')]();_0x2c7ff5[_0x4402('0x53')]('i.id');_0x2c7ff5[_0x4402('0x53')](_0x4402('0x93'),_0x4402('0x6a'));if(_0x5e7872['order']){_0x5e7872[_0x4402('0x94')][_0x4402('0x40')](function(_0x179eb4){var _0x1a0a6f=_0x179eb4[0x0]==='contactName'?_0x179eb4[0x0]:'i.'+_0x179eb4[0x0];_0x48e138[_0x4402('0x94')](_0x1a0a6f,_0x179eb4[0x1]===_0x4402('0x95')?![]:!![]);});}if(!_[_0x4402('0x96')](_0x3fb9f0)){_0x48e138[_0x4402('0x87')](_0x1e5891);_0x2c7ff5[_0x4402('0x50')](_0x4402('0x97'),_0x3fb9f0);}BPromise[_0x4402('0x98')]()[_0x4402('0x34')](function(){if(!_0x31e36c){if(_0x14b94b[_0x4402('0x48')][_0x4402('0x7c')])return;_0x2c7ff5[_0x4402('0x50')](_0x4402('0x99'));_0x48e138[_0x4402('0x50')]('i.ChatWebsiteId\x20IS\x20NOT\x20NULL');return;}if(_0x14b94b[_0x4402('0x9a')][_0x4402('0x9b')]!==_0x4402('0x39'))return;return _0x14b94b[_0x4402('0x9a')]['getChatWebsites']({'attributes':['id'],'raw':!![]})['then'](function(_0x284b52){if(_[_0x4402('0x96')](_0x284b52)){_0x2c7ff5[_0x4402('0x50')](_0x4402('0x9c'));_0x48e138['where'](_0x4402('0x9c'));}else{_0x2c7ff5[_0x4402('0x50')]('i.ChatWebsiteId\x20IN\x20?',_[_0x4402('0x42')](_0x284b52,'id'));_0x48e138[_0x4402('0x50')](_0x4402('0x7d'),_[_0x4402('0x42')](_0x284b52,'id'));}});})[_0x4402('0x34')](function(){if(_0x14b94b['user'][_0x4402('0x9b')]===_0x4402('0x39')&&!_0x31e36c&&!_0x14b94b[_0x4402('0x48')][_0x4402('0x7c')])return[];return db[_0x4402('0x9d')][_0x4402('0x48')](_0x2c7ff5[_0x4402('0x9e')](),_0xc3914e);})['then'](function(_0x218640){_0x370878[_0x4402('0x2c')]=_0x218640[_0x4402('0x4e')];if(_0x370878[_0x4402('0x2c')]===0x0)return[];return db[_0x4402('0x9d')]['query'](_0x12d6de[_0x4402('0x9e')](),_0xc3914e)[_0x4402('0x34')](function(_0x572e21){_0x169bb2=_[_0x4402('0x9f')](_0x572e21,'id');_0xc3914e=_['merge'](_0xc3914e,{'model':db['ChatInteraction'],'mapToModel':!![],'raw':!![],'nest':!![]});if(_0x14b94b[_0x4402('0x48')]['fields']){_0x5e7872[_0x4402('0x4d')]['forEach'](function(_0x51e85d){_0x48e138[_0x4402('0x53')]('i.'+_0x51e85d);});}else{_0x48e138[_0x4402('0x53')](_0x4402('0x93'),_0x4402('0x6a'));_0x48e138[_0x4402('0x53')](_0x4402('0xa0'),'Account.key');_0x48e138[_0x4402('0x53')](_0x4402('0xa1'),'Account.mandatoryDisposition');_0x48e138[_0x4402('0x53')]('CASE\x20WHEN\x20(c.firstName\x20IS\x20NOT\x20NULL\x20AND\x20c.firstName\x20<>\x20\x27\x27)\x20OR\x20(c.lastName\x20IS\x20NOT\x20NULL\x20AND\x20c.lastName\x20<>\x20\x27\x27)\x20THEN\x20CONCAT(IFNULL(c.firstName,\x20\x27\x27),\x20\x27\x20\x27,\x20IFNULL(c.lastName,\x20\x27\x27))\x20ELSE\x20\x27Unknown\x27\x20END','contactName');_0x48e138[_0x4402('0x53')]('i.*');_0x48e138[_0x4402('0x53')](_0x4402('0xa2'),_0x4402('0xa3'));_0x48e138[_0x4402('0x53')](_0x4402('0xa4'),'Contact.lastName');_0x48e138['field'](_0x4402('0xa5'),_0x4402('0xa6'));_0x48e138['field'](_0x4402('0xa7'),_0x4402('0xa8'));_0x48e138[_0x4402('0x53')](_0x4402('0xa9'),_0x4402('0xaa'));_0x48e138[_0x4402('0x53')]('c.fax','Contact.fax');_0x48e138[_0x4402('0x53')](_0x4402('0xab'),_0x4402('0xac'));_0x48e138[_0x4402('0x53')](_0x4402('0xad'),_0x4402('0xae'));_0x48e138['field'](_0x4402('0xaf'),_0x4402('0x3d'));}if(_0x5e7872[_0x4402('0x2a')])_0x48e138[_0x4402('0x2a')](_0x5e7872[_0x4402('0x2a')]);if(_0x5e7872['offset'])_0x48e138[_0x4402('0x29')](_0x5e7872[_0x4402('0x29')]);return db[_0x4402('0x9d')][_0x4402('0x48')](_0x48e138[_0x4402('0x9e')](),_0xc3914e);})[_0x4402('0x34')](function(_0x518b0b){if(_0x518b0b['length']>0x0)_0x38e6d1[_0x4402('0x50')]('ui.ChatInteractionId\x20IN\x20?',_[_0x4402('0x42')](_0x518b0b,'id'));return db[_0x4402('0x9d')][_0x4402('0x48')](_0x38e6d1[_0x4402('0x9e')](),_0xc3914e)[_0x4402('0x34')](function(_0x25b3ee){var _0x70bdbd=_[_0x4402('0xb0')](_0x25b3ee,_0x4402('0xb1'));var _0x23306f=[];_0x518b0b[_0x4402('0x40')](function(_0x425a1b){_0x23306f[_0x4402('0xb2')](updateChatInteraction(_0x425a1b,_0x169bb2,_0x70bdbd));});return BPromise[_0x4402('0xb3')](_0x23306f);});});})[_0x4402('0x34')](function(_0x1ba5a1){_0x370878[_0x4402('0xb4')]=_0x1ba5a1;return _0x370878;})[_0x4402('0x34')](respondWithFilteredResult(_0x3236fc,_0x5e7872))[_0x4402('0x41')](handleError(_0x3236fc,null));};exports[_0x4402('0xb5')]=function(_0xe37b11,_0x385b8e){var _0x418070={'raw':![],'where':{'id':_0xe37b11[_0x4402('0xb6')]['id']}},_0x47a76a={};_0x47a76a[_0x4402('0x47')]=_[_0x4402('0x49')](db[_0x4402('0x43')][_0x4402('0x44')]);_0x47a76a[_0x4402('0x48')]=_['keys'](_0xe37b11['query']);_0x47a76a[_0x4402('0x4a')]=_[_0x4402('0x4b')](_0x47a76a[_0x4402('0x47')],_0x47a76a['query']);_0x418070['attributes']=_['intersection'](_0x47a76a['model'],qs[_0x4402('0x4c')](_0xe37b11[_0x4402('0x48')][_0x4402('0x4c')]));_0x418070['attributes']=_0x418070[_0x4402('0x4d')][_0x4402('0x4e')]?_0x418070[_0x4402('0x4d')]:_0x47a76a['model'];if(_0xe37b11[_0x4402('0x48')]['includeAll']){_0x418070[_0x4402('0xb7')]=[{'all':!![]}];}_0x418070=_[_0x4402('0x38')]({},_0x418070,_0xe37b11[_0x4402('0xb8')]);return db[_0x4402('0x43')][_0x4402('0x69')](_0x418070)[_0x4402('0x34')](handleEntityNotFound(_0x385b8e,null))['then'](respondWithResult(_0x385b8e,null))[_0x4402('0x41')](handleError(_0x385b8e,null));};exports[_0x4402('0xb9')]=function(_0x3ac6b9,_0x55c3fd){return db[_0x4402('0x43')]['create'](_0x3ac6b9[_0x4402('0x7a')],{})[_0x4402('0x34')](respondWithResult(_0x55c3fd,0xc9))[_0x4402('0x41')](handleError(_0x55c3fd,null));};exports[_0x4402('0x32')]=function(_0x54d6dc,_0x91c49){if(_0x54d6dc[_0x4402('0x7a')]['id']){delete _0x54d6dc[_0x4402('0x7a')]['id'];}return db[_0x4402('0x43')][_0x4402('0x69')]({'where':{'id':_0x54d6dc['params']['id']}})[_0x4402('0x34')](handleEntityNotFound(_0x91c49,null))[_0x4402('0x34')](saveUpdates(_0x54d6dc['body'],null))['then'](respondWithResult(_0x91c49,null))['catch'](handleError(_0x91c49,null));};exports[_0x4402('0x33')]=function(_0x42b774,_0x246ff2){return db[_0x4402('0x43')]['find']({'where':{'id':_0x42b774[_0x4402('0xb6')]['id']}})[_0x4402('0x34')](handleEntityNotFound(_0x246ff2,null))[_0x4402('0x34')](removeEntity(_0x246ff2,null))[_0x4402('0x41')](handleError(_0x246ff2,null));};exports['describe']=function(_0x2a3361,_0x2949ce){return db[_0x4402('0x43')]['describe']()['then'](respondWithResult(_0x2949ce,null))['catch'](handleError(_0x2949ce,null));};exports[_0x4402('0xba')]=function(_0x48bf30,_0x17c5c2){var _0x35c16f=_0x48bf30[_0x4402('0xb6')]['id'];var _0x117911;var _0x87ae2a;var _0xd604a5;return db[_0x4402('0x43')][_0x4402('0xbb')]({'where':{'id':_0x35c16f}})[_0x4402('0x34')](function(_0x423f83){_0x117911=_0x423f83;return db[_0x4402('0xbc')][_0x4402('0xbb')]({'where':{'id':_0x423f83[_0x4402('0x7c')]},'attributes':['id',_0x4402('0xbd'),'vidaooEscalation',_0x4402('0xbe'),_0x4402('0xbf'),'vidaooMetadata'],'raw':!![]});})['then'](function(_0x57fd83){if(_0x57fd83&&_0x57fd83[_0x4402('0xbd')]&&_0x57fd83['vidaooEscalation']){_0x87ae2a=_0x57fd83;var _0x47aa8b={'interaction':{'id':_0x35c16f},'agent':{'id':_0x48bf30[_0x4402('0x9a')]['id'],'name':_0x48bf30[_0x4402('0x9a')]['name'],'fullname':_0x48bf30[_0x4402('0x9a')][_0x4402('0xc0')],'email':_0x48bf30[_0x4402('0x9a')][_0x4402('0xc1')]},'contact':_0x48bf30['body'][_0x4402('0xc2')],'account':_0x48bf30[_0x4402('0x7a')][_0x4402('0x3b')]};var _0x286500={'rejectUnauthorized':![],'method':_0x4402('0xc3'),'url':_0x4402('0xc4'),'headers':{'X-APIKEY':_0x57fd83[_0x4402('0xbd')]},'body':{'duration':null,'scheduledAt':null,'participants':[_0x48bf30[_0x4402('0x9a')][_0x4402('0xc1')]],'buttons':null,'topic':_0x87ae2a['vidaooTopic'],'note':_[_0x4402('0xc5')](_0x87ae2a[_0x4402('0xbf')])?null:getMustacheRender(_0x87ae2a[_0x4402('0xbf')],_0x47aa8b),'metadata':null},'redirect':_0x4402('0xc6'),'json':!![]};try{if(!_['isNull'](_0x87ae2a[_0x4402('0xc7')])){var _0x4bf0ff=getMustacheRender(_0x87ae2a[_0x4402('0xc7')],_0x47aa8b);var _0x29ffd4=JSON['parse'](_0x4bf0ff);_0x286500['body'][_0x4402('0xc8')]=_0x29ffd4;}}catch(_0x173f64){throw new db[(_0x4402('0xc9'))][(_0x4402('0xca'))](_0x4402('0xcb'));}return rp(_0x286500);}else{throw new db[(_0x4402('0xc9'))]['ValidationError']('Error\x20in\x20Vidaoo\x20configuration');}})[_0x4402('0x34')](function(_0x54e61e){_0xd604a5=_0x54e61e;if(_0xd604a5['id']){var _0xc47081={'body':_0xd604a5[_0x4402('0xcc')],'ChatWebsiteId':_0x87ae2a['id'],'ChatInteractionId':_0x117911['id'],'direction':_0x4402('0xcd'),'UserId':_0x48bf30[_0x4402('0x9a')]['id']};return db['ChatMessage'][_0x4402('0xb9')](_0xc47081,{});}else{throw new db[(_0x4402('0xc9'))][(_0x4402('0xca'))](_0x4402('0xce'));}})[_0x4402('0x34')](function(){return _0x117911[_0x4402('0xcf')]({'vidaooSessionId':_0xd604a5['id']});})['then'](respondWithResult(_0x17c5c2,null))['catch'](handleError(_0x17c5c2,null));};exports[_0x4402('0xd0')]=function(_0x5a768b,_0x38d7b5){if(_0x5a768b[_0x4402('0x7a')]['id']){delete _0x5a768b['body']['id'];}return db[_0x4402('0x43')]['find']({'where':{'id':_0x5a768b[_0x4402('0xb6')]['id']},'include':[{'model':db[_0x4402('0xd1')],'as':_0x4402('0x6e')}]})['then'](handleEntityNotFound(_0x38d7b5,null))[_0x4402('0x34')](saveUpdates(_0x5a768b['body'],null))[_0x4402('0x34')](respondWithResult(_0x38d7b5,null))[_0x4402('0x41')](handleError(_0x38d7b5,null));};exports[_0x4402('0xd2')]=function(_0x1fc790,_0xaaf390,_0x53be9e){if(_0x1fc790['body']['id']){delete _0x1fc790[_0x4402('0x7a')]['id'];}return db['ChatInteraction'][_0x4402('0x69')]({'where':{'id':_0x1fc790[_0x4402('0xb6')]['id']}})['then'](function(_0x50d453){if(!_0x50d453){logger[_0x4402('0x24')](_0x4402('0xd3'),_0x4402('0xd2'),0x194,_0x4402('0xd4'));_0xaaf390[_0x4402('0x35')](0x194);}else{if(_0x50d453[_0x4402('0x78')]){throw new db[(_0x4402('0xc9'))][(_0x4402('0xca'))]('Interaction\x20already\x20assigned');}}return _0x50d453;})['then'](function(_0xf3be9){if(_0xf3be9){return _0xf3be9[_0x4402('0x32')]({'closed':_0x1fc790[_0x4402('0x7a')]['closed'],'disposition':_0x1fc790[_0x4402('0x7a')]['disposition']})[_0x4402('0x34')](function(_0x1237a3){return _0x1237a3;});}})[_0x4402('0x34')](function(_0x4a0fd9){return respondWithRpcPromise(_0x4402('0xd5'),_0x4402('0xd2'),_0x1fc790['body'],client9004);})[_0x4402('0x34')](respondWithResult(_0xaaf390,null))[_0x4402('0x41')](handleError(_0xaaf390,null));};exports[_0x4402('0xd6')]=function(_0x8c436d,_0x15e9d3,_0xa0d1ee){_0x8c436d[_0x4402('0x7a')][_0x4402('0x36')]=_0x8c436d[_0x4402('0xd7')][_0x4402('0xd8')];_0x8c436d[_0x4402('0x7a')][_0x4402('0xd9')]=_0x8c436d['file'][_0x4402('0xda')];_0x8c436d[_0x4402('0x7a')][_0x4402('0x73')]=_0x8c436d[_0x4402('0xd7')][_0x4402('0xdb')];return db[_0x4402('0xdc')][_0x4402('0xb9')](_0x8c436d[_0x4402('0x7a')])[_0x4402('0x34')](respondWithResult(_0x15e9d3,0xc9))['catch'](handleError(_0x15e9d3,null));};exports[_0x4402('0xdd')]=function(_0x113451,_0x338e97,_0x4c6d4e){return db[_0x4402('0x43')][_0x4402('0xbb')]({'where':{'id':_0x113451['params']['id']},'raw':!![]})[_0x4402('0x34')](handleEntityNotFound(_0x338e97,null))[_0x4402('0x34')](function(_0x491a8e){if(_0x491a8e){if(_0x491a8e['closed']){return _0x338e97[_0x4402('0x28')](0x193)[_0x4402('0x2e')]({'status':0x193,'message':_0x4402('0xde')});}return db[_0x4402('0xdc')]['findOne']({'where':{'id':_0x113451[_0x4402('0x48')]['attachId']},'raw':!![]})[_0x4402('0x34')](handleEntityNotFound(_0x338e97,null));}})[_0x4402('0x34')](function(_0x171672){if(_0x171672){var _0xdbd1c8=_0x171672[_0x4402('0xdf')]!==null;var _0x5d190e=path[_0x4402('0xe0')](config[_0x4402('0xe1')],_0x4402('0xe2'));if(_0xdbd1c8){_0x5d190e=path[_0x4402('0xe0')](_0x5d190e,_0x4402('0xe3'));}var _0x23de88=path[_0x4402('0xe0')](_0x5d190e,_0x171672[_0x4402('0xd9')]);return _0x338e97[_0x4402('0xe4')](_0x23de88);}})[_0x4402('0x41')](handleError(_0x338e97,null));};exports[_0x4402('0xe5')]=function(_0x55274b,_0x2afc41){var _0x1c5cad=null;var _0x3b8f77=null;var _0x2b3b75=null;var _0x1ba411=null;if(_0x55274b[_0x4402('0x7a')]['id']){delete _0x55274b[_0x4402('0x7a')]['id'];}if(_0x55274b[_0x4402('0x7a')][_0x4402('0xe6')]){_0x1ba411=path[_0x4402('0xe0')](config['root'],_0x4402('0xe7'),util[_0x4402('0xe8')](_0x4402('0xe9'),Date['now']()));_0x55274b[_0x4402('0x7a')][_0x4402('0xea')]=_0x1ba411;}return db['ChatInteraction'][_0x4402('0x69')]({'where':{'id':_0x55274b[_0x4402('0xb6')]['id']},'include':[{'model':db[_0x4402('0xeb')],'as':_0x4402('0xec'),'include':[{'model':db[_0x4402('0x77')],'as':_0x4402('0x77')}]}]})[_0x4402('0x34')](handleEntityNotFound(_0x2afc41,null))[_0x4402('0x34')](saveUpdates(_0x55274b[_0x4402('0x7a')],null))[_0x4402('0x34')](function(_0x2d86c7){if(_0x2d86c7){_0x1c5cad=_0x2d86c7;return db['ChatWebsite'][_0x4402('0x69')]({'where':{'id':_0x1c5cad[_0x4402('0x7c')]}});}})[_0x4402('0x34')](function(_0x47837e){if(_0x47837e){_0x2b3b75=_0x47837e;return db[_0x4402('0xd1')][_0x4402('0x69')]({'where':{'id':_0x1c5cad[_0x4402('0xed')]}});}})[_0x4402('0x34')](function(_0x259c23){if(_0x259c23){_0x3b8f77=_0x259c23;if(_0x1ba411){var _0x535d83=null;for(var _0x2f3d6e=0x1;_0x2f3d6e<_0x1c5cad['Messages'][_0x4402('0x4e')];++_0x2f3d6e){_0x535d83=_0x1c5cad[_0x4402('0xec')][_0x2f3d6e];var _0x395d17=_0x535d83[_0x4402('0x78')]?util[_0x4402('0xe8')](_0x4402('0xee'),_0x2b3b75[_0x4402('0xef')],_0x535d83[_0x4402('0x78')]):_0x4402('0xf0');var _0x51bdf7=_0x55274b[_0x4402('0x7a')]['customer']||util[_0x4402('0xe8')](_0x4402('0xee'),_0x4402('0xf1'),_0x535d83[_0x4402('0xed')]);switch(_0x2b3b75[_0x4402('0xf2')]){case _0x4402('0xf3'):_0x395d17=_0x535d83['UserId']?util[_0x4402('0xe8')]('%s%d',_0x2b3b75[_0x4402('0xef')],_0x535d83['UserId']):_0x4402('0xf0');break;case _0x4402('0xf4'):_0x395d17=_0x535d83[_0x4402('0x78')]?_0x535d83[_0x4402('0x77')][_0x4402('0xf5')]||_0x535d83[_0x4402('0x77')][_0x4402('0xc0')]:_0x4402('0xf0');break;case _0x4402('0xf6'):_0x395d17=_0x535d83['UserId']?_0x535d83[_0x4402('0x77')]['fullname']:'System';break;default:_0x395d17=_0x535d83['UserId']?util[_0x4402('0xe8')](_0x4402('0xee'),_0x2b3b75[_0x4402('0xef')],_0x535d83['UserId']):_0x4402('0xf0');}var _0x1accec=util[_0x4402('0xe8')](_0x4402('0xf7'),moment(_0x535d83[_0x4402('0x7f')])[_0x4402('0xe8')](_0x4402('0xf8')),_0x535d83[_0x4402('0xf9')]==='in'?_0x51bdf7:_0x395d17,_0x535d83[_0x4402('0x7a')]);if(!_0x535d83[_0x4402('0xfa')]){fs[_0x4402('0xfb')](_0x1ba411,_0x1accec);}}return db['MailAccount']['findOne']({'where':{'service':!![]},'include':[{'model':db[_0x4402('0xfc')],'as':_0x4402('0xfd'),'raw':!![]}]});}}})[_0x4402('0x34')](function(_0x23dbb4){if(_0x23dbb4&&_0x23dbb4[_0x4402('0xfd')]&&_0x55274b['body']){var _0x494b72={'tls':{'rejectUnauthorized':![]}};if(_0x23dbb4[_0x4402('0xfd')][_0x4402('0xfe')]){_0x494b72[_0x4402('0xfe')]=_0x23dbb4[_0x4402('0xfd')][_0x4402('0xfe')];}else{_0x494b72[_0x4402('0xff')]=_0x23dbb4[_0x4402('0xfd')][_0x4402('0xff')];_0x494b72[_0x4402('0x100')]=_0x23dbb4[_0x4402('0xfd')][_0x4402('0x100')];_0x494b72[_0x4402('0x101')]=_0x23dbb4[_0x4402('0xfd')][_0x4402('0x101')];}if(_0x23dbb4[_0x4402('0xfd')][_0x4402('0x102')]){_0x494b72[_0x4402('0x103')]={'user':_0x23dbb4[_0x4402('0xfd')][_0x4402('0x9a')],'pass':_0x23dbb4[_0x4402('0xfd')][_0x4402('0x104')]};}return respondWithRpcPromise(_0x4402('0x105'),_0x4402('0x106'),{'account':_0x494b72,'message':{'from':util[_0x4402('0xe8')](_0x4402('0x107'),_0x23dbb4[_0x4402('0x36')],_0x23dbb4['email']||_0x23dbb4[_0x4402('0xfd')][_0x4402('0x9a')]),'to':_0x55274b[_0x4402('0x7a')][_0x4402('0xe6')],'subject':_0x4402('0x108'),'text':util[_0x4402('0xe8')](_0x4402('0x109'),_0x55274b[_0x4402('0x7a')][_0x4402('0xe6')]),'attachments':[{'path':_0x1ba411}]}})['then'](function(){return _0x1c5cad;})[_0x4402('0x41')](function(_0x3ba561){console[_0x4402('0x24')](_0x3ba561);});}else{return _0x1c5cad;}})[_0x4402('0x34')](respondWithStatusCode(_0x2afc41,0xc8))[_0x4402('0x41')](handleError(_0x2afc41,null));};exports[_0x4402('0x10a')]=function(_0x10f917,_0x1155d1,_0x17c1ee){return db['ChatMessage'][_0x4402('0x69')]({'where':{'id':_0x10f917[_0x4402('0xb6')]['id']}})[_0x4402('0x34')](handleEntityNotFound(_0x1155d1,null))[_0x4402('0x34')](function(_0x37ea8d){if(_0x37ea8d){return _0x37ea8d[_0x4402('0x10a')](_0x10f917[_0x4402('0x7a')]['ids'],_[_0x4402('0x10b')](_0x10f917[_0x4402('0x7a')],['ids','id'])||{});}})[_0x4402('0x34')](respondWithResult(_0x1155d1,null))[_0x4402('0x41')](handleError(_0x1155d1,null));};exports[_0x4402('0x10c')]=function(_0x3e78da,_0x1bf636,_0x44b095){var _0x2433a1={'raw':![],'where':{}};var _0x4069cf={};var _0x7be513={'count':0x0,'rows':[]};return db[_0x4402('0x43')][_0x4402('0xbb')]({'where':{'id':_0x3e78da[_0x4402('0xb6')]['id']}})[_0x4402('0x34')](handleEntityNotFound(_0x1bf636,null))[_0x4402('0x34')](function(_0x1f2219){if(_0x1f2219){_0x4069cf[_0x4402('0x47')]=_[_0x4402('0x49')](db[_0x4402('0xeb')][_0x4402('0x44')]);_0x4069cf[_0x4402('0x48')]=_[_0x4402('0x49')](_0x3e78da[_0x4402('0x48')]);_0x4069cf[_0x4402('0x4a')]=_[_0x4402('0x4b')](_0x4069cf[_0x4402('0x47')],_0x4069cf[_0x4402('0x48')]);_0x2433a1[_0x4402('0x4d')]=_[_0x4402('0x4b')](_0x4069cf[_0x4402('0x47')],qs[_0x4402('0x4c')](_0x3e78da[_0x4402('0x48')]['fields']));_0x2433a1[_0x4402('0x4d')]=_0x2433a1['attributes']['length']?_0x2433a1[_0x4402('0x4d')]:_0x4069cf[_0x4402('0x47')];if(!_0x3e78da[_0x4402('0x48')][_0x4402('0x10d')](_0x4402('0x4f'))){_0x2433a1['limit']=qs[_0x4402('0x2a')](_0x3e78da[_0x4402('0x48')][_0x4402('0x2a')]);_0x2433a1['offset']=qs[_0x4402('0x29')](_0x3e78da[_0x4402('0x48')][_0x4402('0x29')]);}_0x2433a1[_0x4402('0x94')]=qs['sort'](_0x3e78da[_0x4402('0x48')][_0x4402('0x10e')]);_0x2433a1['where']=qs['filters'](_['pick'](_0x3e78da['query'],_0x4069cf[_0x4402('0x4a')]));_0x2433a1[_0x4402('0x50')][_0x4402('0xb1')]=_0x1f2219['id'];if(_0x3e78da['query'][_0x4402('0x8a')]){_0x2433a1[_0x4402('0x50')]=_[_0x4402('0x38')](_0x2433a1['where'],{'$or':_[_0x4402('0x42')](_0x2433a1[_0x4402('0x4d')],function(_0x2466a1){var _0x55ed20={};_0x55ed20[_0x2466a1]={'$like':'%'+_0x3e78da[_0x4402('0x48')][_0x4402('0x8a')]+'%'};return _0x55ed20;})});}if(_0x3e78da['query'][_0x4402('0x10f')]){var _0x335d93=_0x3e78da[_0x4402('0x48')][_0x4402('0x10f')]['split'](',');var _0x3aebf6={};_0x3aebf6[_0x335d93[0x0]]={'$gte':moment(_0x335d93[0x1])['format'](_0x4402('0x110'))};_0x2433a1['where']=_['merge'](_0x2433a1[_0x4402('0x50')],_0x3aebf6);}_0x2433a1=_[_0x4402('0x38')]({},_0x2433a1,_0x3e78da[_0x4402('0xb8')]);return db[_0x4402('0xeb')][_0x4402('0x2c')]({'where':_0x2433a1[_0x4402('0x50')]})[_0x4402('0x34')](function(_0x87e1c){_0x7be513['count']=_0x87e1c;if(_0x3e78da[_0x4402('0x48')][_0x4402('0x111')]){_0x2433a1[_0x4402('0xb7')]=[{'all':!![]}];}return db[_0x4402('0xeb')][_0x4402('0x112')](_0x2433a1);})['then'](function(_0x20b540){_0x7be513['rows']=_0x20b540;return _0x7be513;});}})[_0x4402('0x34')](respondWithFilteredResult(_0x1bf636,_0x2433a1))[_0x4402('0x41')](handleError(_0x1bf636,null));};exports[_0x4402('0x113')]=function(_0x516583,_0x182827,_0x284292){var _0x579bab={'where':{}},_0x30cdd6={},_0x1ac943={'count':0x0,'rows':[]};return db[_0x4402('0x43')][_0x4402('0xbb')]({'where':{'id':_0x516583[_0x4402('0xb6')]['id']}})[_0x4402('0x34')](handleEntityNotFound(_0x182827,null))[_0x4402('0x34')](function(_0xe8f398){if(_0xe8f398){_0x30cdd6[_0x4402('0x47')]=_[_0x4402('0x49')](db[_0x4402('0xeb')][_0x4402('0x44')]);_0x30cdd6[_0x4402('0x48')]=_[_0x4402('0x49')](_0x516583['query']);_0x30cdd6[_0x4402('0x4a')]=_[_0x4402('0x4b')](_0x30cdd6[_0x4402('0x47')],_0x30cdd6[_0x4402('0x48')]);_0x579bab[_0x4402('0x4d')]=_[_0x4402('0x4b')](_0x30cdd6[_0x4402('0x47')],qs[_0x4402('0x4c')](_0x516583['query'][_0x4402('0x4c')]));_0x579bab[_0x4402('0x4d')]=_0x579bab[_0x4402('0x4d')]['length']?_0x579bab[_0x4402('0x4d')]:_0x30cdd6[_0x4402('0x47')];if(!_0x516583[_0x4402('0x48')][_0x4402('0x10d')](_0x4402('0x4f'))){_0x579bab[_0x4402('0x2a')]=qs[_0x4402('0x2a')](_0x516583['query']['limit']);_0x579bab[_0x4402('0x29')]=qs[_0x4402('0x29')](_0x516583[_0x4402('0x48')][_0x4402('0x29')]);}_0x579bab[_0x4402('0x94')]=qs['sort'](_0x516583[_0x4402('0x48')][_0x4402('0x10e')]);_0x579bab[_0x4402('0x50')]=qs['filters'](_[_0x4402('0x51')](_0x516583['query'],_0x30cdd6[_0x4402('0x4a')]));_0x579bab[_0x4402('0x50')][_0x4402('0xb1')]=_0xe8f398['id'];if(_0x516583[_0x4402('0x48')]['filter']){_0x579bab[_0x4402('0x50')]=_[_0x4402('0x38')](_0x579bab[_0x4402('0x50')],{'$or':_[_0x4402('0x42')](_0x579bab[_0x4402('0x4d')],function(_0x3adad4){var _0x207b70={};_0x207b70[_0x3adad4]={'$like':'%'+_0x516583['query']['filter']+'%'};return _0x207b70;})});}_0x579bab[_0x4402('0x50')][_0x4402('0xfa')]=![];if(_0x516583[_0x4402('0x48')]['id']){_0x579bab['where']['id']={'$gt':_0x516583[_0x4402('0x48')]['id']};}_0x579bab=_[_0x4402('0x38')]({},_0x579bab,_0x516583[_0x4402('0xb8')]);return db['ChatMessage'][_0x4402('0x2c')]({'where':_0x579bab['where']})[_0x4402('0x34')](function(_0x2903fd){_0x1ac943[_0x4402('0x2c')]=_0x2903fd;_0x579bab['include']=[];if(_0x516583[_0x4402('0x48')][_0x4402('0x114')]){_0x579bab['include']['push']({'model':db['User'],'as':'User','attributes':['id',_0x4402('0xc0'),'alias']});}if(_0x516583['query'][_0x4402('0x111')]){_0x579bab['include']=[{'all':!![]}];}return db[_0x4402('0xeb')][_0x4402('0x112')](_0x579bab);})['then'](function(_0x230904){_0x1ac943[_0x4402('0xb4')]=_0x230904;return _0x1ac943;});}})[_0x4402('0x34')](respondWithFilteredResult(_0x182827,_0x579bab))['catch'](handleError(_0x182827,null));};exports[_0x4402('0x115')]=function(_0x5f42bc,_0x50999c,_0xc4375e){return db['ChatInteraction'][_0x4402('0x69')]({'where':{'id':_0x5f42bc['params']['id']}})[_0x4402('0x34')](handleEntityNotFound(_0x50999c,null))[_0x4402('0x34')](function(_0x21a6d2){if(_0x21a6d2){return _0x21a6d2[_0x4402('0x116')](_0x5f42bc[_0x4402('0x7a')][_0x4402('0x117')],_[_0x4402('0x10b')](_0x5f42bc[_0x4402('0x7a')],[_0x4402('0x117'),'id'])||{})[_0x4402('0x118')](function(){return db[_0x4402('0x75')][_0x4402('0x112')]({'attributes':['id',_0x4402('0x36'),_0x4402('0x119')],'where':{'id':_0x5f42bc[_0x4402('0x7a')]['ids']}});})[_0x4402('0x34')](function(_0x132621){socket[_0x4402('0x11a')](_0x4402('0x11b'),{'id':Number(_0x5f42bc[_0x4402('0xb6')]['id']),'tags':_0x132621||[]});return{'id':Number(_0x5f42bc[_0x4402('0xb6')]['id']),'tags':_0x132621||[]};});}})[_0x4402('0x34')](respondWithResult(_0x50999c,null))[_0x4402('0x41')](handleError(_0x50999c,null));};exports[_0x4402('0x11c')]=function(_0x4e0ae2,_0x21e2c8,_0x1845d8){return db[_0x4402('0x43')]['find']({'where':{'id':_0x4e0ae2[_0x4402('0xb6')]['id']}})['then'](handleEntityNotFound(_0x21e2c8,null))[_0x4402('0x34')](function(_0x424e93){if(_0x424e93){return _0x424e93[_0x4402('0x11c')](_0x4e0ae2[_0x4402('0x48')]['ids']);}})[_0x4402('0x34')](respondWithStatusCode(_0x21e2c8,null))['catch'](handleError(_0x21e2c8,null));};exports[_0x4402('0xe4')]=function(_0x4cb0bf,_0x2a586e){var _0x5325a7=moment()[_0x4402('0x11d')]()['toString']();var _0x157060=path[_0x4402('0xe0')](config[_0x4402('0xe1')],_0x4402('0x11e'),_0x4402('0x11f'),_0x4402('0x120'));var _0x2ead56=path[_0x4402('0xe0')](config['root'],_0x4402('0x11e'),_0x4402('0x11f'),_0x4402('0x121'));var _0x31d19c=path[_0x4402('0xe0')](_0x157060,_0x5325a7);var _0x1675b2=util[_0x4402('0xe8')](_0x4402('0x122'),_0x4cb0bf['params']['id'],_0x5325a7);var _0xe5e2f3=path[_0x4402('0xe0')](_0x157060,_0x1675b2);var _0x22c8a1=[];_0x22c8a1[_0x4402('0xb2')]({'model':db[_0x4402('0x77')],'as':_0x4402('0x77'),'attributes':['id',_0x4402('0xc0')],'raw':!![]});_0x22c8a1[_0x4402('0xb2')]({'model':db[_0x4402('0xd1')],'as':_0x4402('0x6e'),'attributes':['id',_0x4402('0x123'),'lastName'],'raw':!![]});if(_0x4cb0bf[_0x4402('0x48')]['attachments']){_0x22c8a1[_0x4402('0xb2')]({'model':db[_0x4402('0xdc')],'as':_0x4402('0xdc'),'raw':!![]});}var _0x177297=[{'model':db['ChatMessage'],'as':_0x4402('0xec'),'attributes':['id','body',_0x4402('0x7f'),'direction',_0x4402('0xfa'),_0x4402('0x85')],'include':_0x22c8a1}];_0x177297[_0x4402('0xb2')]({'model':db[_0x4402('0xbc')],'as':_0x4402('0x124'),'attributes':['id',_0x4402('0x36')]});_0x177297[_0x4402('0xb2')]({'model':db[_0x4402('0x77')],'as':'Owner','attributes':['id',_0x4402('0xc0')]});return db[_0x4402('0x43')][_0x4402('0x69')]({'where':{'id':_0x4cb0bf[_0x4402('0xb6')]['id']},'include':_0x177297})[_0x4402('0x34')](handleEntityNotFound(_0x2a586e,null))[_0x4402('0x34')](function(_0x140207){if(_0x140207){var _0x1d2478=_0x140207[_0x4402('0x125')]({'plain':!![]});fs[_0x4402('0x126')](_0x31d19c);var _0x286a77={'channel':_0x4402('0x127'),'account':_0x1d2478[_0x4402('0x124')][_0x4402('0x36')],'agent':_0x1d2478['Owner']?_0x1d2478[_0x4402('0x128')][_0x4402('0xc0')]:_0x4402('0x129'),'createdAt':moment(_0x1d2478[_0x4402('0x7f')])[_0x4402('0xe8')](_0x4402('0x110'))[_0x4402('0x9e')](),'closedAt':_0x1d2478[_0x4402('0x12a')]?moment(_0x1d2478['closedAt'])['format']('YYYY-MM-DD\x20HH:mm:ss')[_0x4402('0x9e')]():'','disposition':_0x1d2478['disposition'],'chatInfo':{'browser':_0x1d2478[_0x4402('0x12b')],'os':_0x1d2478['osName'],'referer':_0x1d2478[_0x4402('0x12c')],'customerIp':_0x1d2478[_0x4402('0x12d')],'customerPort':_0x1d2478[_0x4402('0x12e')]?_0x1d2478['customerPort']:_0x4402('0x129')},'messages':_(_0x1d2478[_0x4402('0xec')])[_0x4402('0x12f')]()[_0x4402('0x8a')]({'secret':![]})['map'](function(_0x633496){if(_0x633496[_0x4402('0xdc')]){var _0x5862a7=path[_0x4402('0xe0')](_0x2ead56,_0x633496['Attachment'][_0x4402('0xd9')]);if(fs[_0x4402('0x130')](_0x5862a7)){fs[_0x4402('0x131')](_0x5862a7)[_0x4402('0x132')](fs[_0x4402('0x133')](path[_0x4402('0xe0')](_0x31d19c,_0x633496[_0x4402('0xdc')][_0x4402('0xd9')])));}}return{'date':moment(_0x633496[_0x4402('0x7f')])[_0x4402('0xe8')](_0x4402('0x110'))[_0x4402('0x9e')](),'sender':_0x633496['direction']===_0x4402('0xcd')?_0x633496[_0x4402('0x77')]?_0x633496[_0x4402('0x77')][_0x4402('0xc0')]:_0x4402('0xf0'):_0x633496['Contact'][_0x4402('0x123')]+(_0x633496[_0x4402('0x6e')][_0x4402('0x134')]?'\x20'+_0x633496[_0x4402('0x6e')][_0x4402('0x134')]:''),'body':_0x633496[_0x4402('0xdc')]?_0x633496[_0x4402('0xdc')]['basename']:_0x633496[_0x4402('0x7a')],'direction':_0x633496['direction']===_0x4402('0xcd')?'A':'C','secret':_0x633496[_0x4402('0xfa')],'read':_0x633496[_0x4402('0x85')],'attachment':_0x633496['Attachment']};})[_0x4402('0x6b')]()};return ejs[_0x4402('0x135')](path[_0x4402('0xe0')](config[_0x4402('0xe1')],_0x4402('0x11e'),'views','downloadInteraction.ejs'),{'interaction':_0x286a77})['then'](function(_0x5b8cd8){var _0x3fc6b3=path[_0x4402('0xe0')](_0x31d19c,'transcript-'+_0x1d2478['id']+'-'+_0x5325a7+_0x4402('0x136'));var _0x15bbe1={'path':_0x3fc6b3,'channel':_0x4402('0x127'),'interactionId':_0x1d2478['id']};return pdf[_0x4402('0x137')](_0x5b8cd8,_0x15bbe1);})[_0x4402('0x34')](function(){return new BPromise(function(_0x303680,_0x281eaa){zipdir(_0x31d19c,{'saveTo':_0xe5e2f3},function(_0x1baf42,_0x3d743e){if(_0x1baf42)return _0x281eaa(_0x1baf42);return _0x303680(_0x3d743e);});})[_0x4402('0x34')](function(){return new BPromise(function(_0x5ad41f,_0xbeb577){rimraf(_0x31d19c,function(_0x8c8f01){if(_0x8c8f01)_0xbeb577(_0x8c8f01);return _0x5ad41f();});});})[_0x4402('0x34')](function(){return _0x2a586e[_0x4402('0xe4')](_0xe5e2f3,_0x1675b2,function(_0xc36aed){if(_0xc36aed){console['log'](_0x4402('0x138'),_0xc36aed);}else{fs[_0x4402('0x139')](_0xe5e2f3);}});});});}else{return _0x2a586e[_0x4402('0x35')](0xc8);}})[_0x4402('0x41')](handleError(_0x2a586e,null));}; \ No newline at end of file diff --git a/server/api/chatInteraction/chatInteraction.events.js b/server/api/chatInteraction/chatInteraction.events.js index 9615309..70f1ecf 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 _0x6c1a=['Users','map','findAll','emit','catch','hasOwnProperty','hook','exports','events','../../mysqldb','ChatInteraction','save','update','remove','getUsers','then','setDataValue'];(function(_0x37b383,_0x5c3135){var _0x334700=function(_0x5ccb5d){while(--_0x5ccb5d){_0x37b383['push'](_0x37b383['shift']());}};_0x334700(++_0x5c3135);}(_0x6c1a,0xc3));var _0xa6c1=function(_0x2ba2bf,_0x53381a){_0x2ba2bf=_0x2ba2bf-0x0;var _0x48801b=_0x6c1a[_0x2ba2bf];return _0x48801b;};'use strict';var EventEmitter=require(_0xa6c1('0x0'));var ChatInteraction=require(_0xa6c1('0x1'))['db'][_0xa6c1('0x2')];var ChatMessage=require('../../mysqldb')['db']['ChatMessage'];var ChatInteractionEvents=new EventEmitter();ChatInteractionEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xa6c1('0x3'),'afterUpdate':_0xa6c1('0x4'),'afterDestroy':_0xa6c1('0x5')};function emitEvent(_0x44ce23){return function(_0x16e295,_0x19e908,_0x2a8112){_0x16e295[_0xa6c1('0x6')]({'attributes':['id'],'raw':!![]})[_0xa6c1('0x7')](function(_0x1e1534){_0x16e295[_0xa6c1('0x8')](_0xa6c1('0x9'),_0x1e1534[_0xa6c1('0xa')](function(_0x4b9d60){return{'id':_0x4b9d60['id']};}));return ChatMessage[_0xa6c1('0xb')]({'where':{'ChatInteractionId':_0x16e295['id'],'direction':'in','read':![]},'raw':!![]});})['then'](function(_0x57186e){_0x16e295['setDataValue']('unreadMessages',_0x57186e['length']);ChatInteractionEvents[_0xa6c1('0xc')](_0x44ce23+':'+_0x16e295['id'],_0x16e295);ChatInteractionEvents['emit'](_0x44ce23,_0x16e295);_0x2a8112(null);})[_0xa6c1('0xd')](_0x2a8112(null));};}for(var e in events){if(events[_0xa6c1('0xe')](e)){var event=events[e];ChatInteraction[_0xa6c1('0xf')](e,emitEvent(event));}}module[_0xa6c1('0x10')]=ChatInteractionEvents; \ No newline at end of file +var _0x2d35=['events','ChatInteraction','../../mysqldb','update','then','setDataValue','map','findAll','unreadMessages','length','emit','catch','hasOwnProperty','hook','exports'];(function(_0x476bc2,_0x3d8c67){var _0x534e91=function(_0x2eedae){while(--_0x2eedae){_0x476bc2['push'](_0x476bc2['shift']());}};_0x534e91(++_0x3d8c67);}(_0x2d35,0x1ef));var _0x52d3=function(_0x5f05d1,_0x1bdca9){_0x5f05d1=_0x5f05d1-0x0;var _0x5e5c4d=_0x2d35[_0x5f05d1];return _0x5e5c4d;};'use strict';var EventEmitter=require(_0x52d3('0x0'));var ChatInteraction=require('../../mysqldb')['db'][_0x52d3('0x1')];var ChatMessage=require(_0x52d3('0x2'))['db']['ChatMessage'];var ChatInteractionEvents=new EventEmitter();ChatInteractionEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0x52d3('0x3'),'afterDestroy':'remove'};function emitEvent(_0x2d8f9d){return function(_0x13af76,_0x558bce,_0x29d30b){_0x13af76['getUsers']({'attributes':['id'],'raw':!![]})[_0x52d3('0x4')](function(_0x3f958a){_0x13af76[_0x52d3('0x5')]('Users',_0x3f958a[_0x52d3('0x6')](function(_0x2bb2f6){return{'id':_0x2bb2f6['id']};}));return ChatMessage[_0x52d3('0x7')]({'where':{'ChatInteractionId':_0x13af76['id'],'direction':'in','read':![]},'raw':!![]});})[_0x52d3('0x4')](function(_0x2f299a){_0x13af76[_0x52d3('0x5')](_0x52d3('0x8'),_0x2f299a[_0x52d3('0x9')]);ChatInteractionEvents[_0x52d3('0xa')](_0x2d8f9d+':'+_0x13af76['id'],_0x13af76);ChatInteractionEvents[_0x52d3('0xa')](_0x2d8f9d,_0x13af76);_0x29d30b(null);})[_0x52d3('0xb')](_0x29d30b(null));};}for(var e in events){if(events[_0x52d3('0xc')](e)){var event=events[e];ChatInteraction[_0x52d3('0xd')](e,emitEvent(event));}}module[_0x52d3('0xe')]=ChatInteractionEvents; \ No newline at end of file diff --git a/server/api/chatInteraction/chatInteraction.model.js b/server/api/chatInteraction/chatInteraction.model.js index cea5007..b8f8444 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 _0xf2ab=['../../config/environment','./chatInteraction.attributes','ChatInteraction','chat_interactions','closed','closedAt','YYYY-MM-DD\x20HH:mm:ss','utf8mb4_unicode_ci','lodash','../../config/logger','api','moment','bluebird','path'];(function(_0x38ba40,_0x518c4d){var _0x28429c=function(_0x8e3839){while(--_0x8e3839){_0x38ba40['push'](_0x38ba40['shift']());}};_0x28429c(++_0x518c4d);}(_0xf2ab,0x1e4));var _0xbf2a=function(_0x10a371,_0x506f7b){_0x10a371=_0x10a371-0x0;var _0x496cef=_0xf2ab[_0x10a371];return _0x496cef;};'use strict';var _=require(_0xbf2a('0x0'));var util=require('util');var logger=require(_0xbf2a('0x1'))(_0xbf2a('0x2'));var moment=require(_0xbf2a('0x3'));var BPromise=require(_0xbf2a('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xbf2a('0x5'));var rimraf=require('rimraf');var config=require(_0xbf2a('0x6'));var attributes=require(_0xbf2a('0x7'));module['exports']=function(_0x3d6421,_0x4f220b){return _0x3d6421['define'](_0xbf2a('0x8'),attributes,{'tableName':_0xbf2a('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x2e830d,_0xef6629,_0x3e333e){if(_0x2e830d['changed'](_0xbf2a('0xa'))){_0x2e830d[_0xbf2a('0xb')]=moment()['format'](_0xbf2a('0xc'));}_0x3e333e(null,_0x2e830d);}},'charset':'utf8mb4','collate':_0xbf2a('0xd')});}; \ No newline at end of file +var _0x9470=['closedAt','lodash','util','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','./chatInteraction.attributes','exports','ChatInteraction','chat_interactions','changed','closed'];(function(_0x540dcb,_0x4eacb6){var _0x49353c=function(_0x449bb1){while(--_0x449bb1){_0x540dcb['push'](_0x540dcb['shift']());}};_0x49353c(++_0x4eacb6);}(_0x9470,0xc1));var _0x0947=function(_0x5cc8,_0x1faa02){_0x5cc8=_0x5cc8-0x0;var _0x450661=_0x9470[_0x5cc8];return _0x450661;};'use strict';var _=require(_0x0947('0x0'));var util=require(_0x0947('0x1'));var logger=require(_0x0947('0x2'))('api');var moment=require(_0x0947('0x3'));var BPromise=require(_0x0947('0x4'));var rp=require(_0x0947('0x5'));var fs=require('fs');var path=require(_0x0947('0x6'));var rimraf=require(_0x0947('0x7'));var config=require(_0x0947('0x8'));var attributes=require(_0x0947('0x9'));module[_0x0947('0xa')]=function(_0x5ccc11,_0x1a76bb){return _0x5ccc11['define'](_0x0947('0xb'),attributes,{'tableName':_0x0947('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0xba675,_0xfc97f7,_0x4b2f87){if(_0xba675[_0x0947('0xd')](_0x0947('0xe'))){_0xba675[_0x0947('0xf')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');}_0x4b2f87(null,_0xba675);}},'charset':'utf8mb4','collate':'utf8mb4_unicode_ci'});}; \ No newline at end of file diff --git a/server/api/chatInteraction/chatInteraction.rpc.js b/server/api/chatInteraction/chatInteraction.rpc.js index 7a36185..263a07e 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 _0x3a49=['then','ChatInteraction,\x20%s,\x20%s','request\x20sent','debug','ChatInteraction,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','catch','ChatInteraction','update','options','raw','where','limit','UpdateChatInteraction','AddTagsToChatInteraction','find','addTags','body','ids','AddTags','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/logger','rpc','../../config/environment','client','defaults','redis','localhost','socket.io-emitter','./chatInteraction.socket','register'];(function(_0x554e28,_0x4775da){var _0x27da90=function(_0x46901d){while(--_0x46901d){_0x554e28['push'](_0x554e28['shift']());}};_0x27da90(++_0x4775da);}(_0x3a49,0x158));var _0x93a4=function(_0x491b84,_0x5dd817){_0x491b84=_0x491b84-0x0;var _0x20f81c=_0x3a49[_0x491b84];return _0x20f81c;};'use strict';var _=require(_0x93a4('0x0'));var util=require(_0x93a4('0x1'));var moment=require(_0x93a4('0x2'));var BPromise=require(_0x93a4('0x3'));var rs=require(_0x93a4('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x93a4('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x93a4('0x6'))(_0x93a4('0x7'));var config=require(_0x93a4('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x93a4('0x9')]['http']({'port':0x232a});config['redis']=_[_0x93a4('0xa')](config[_0x93a4('0xb')],{'host':_0x93a4('0xc'),'port':0x18eb});var socket=require(_0x93a4('0xd'))(new Redis(config[_0x93a4('0xb')]));require(_0x93a4('0xe'))[_0x93a4('0xf')](socket);function respondWithRpcPromise(_0x31bd37,_0x3c6a27,_0x40fd54){return new BPromise(function(_0x1becdb,_0x5e2d9){return client['request'](_0x31bd37,_0x40fd54)[_0x93a4('0x10')](function(_0xa9750c){logger['info'](_0x93a4('0x11'),_0x3c6a27,_0x93a4('0x12'));logger[_0x93a4('0x13')](_0x93a4('0x14'),_0x3c6a27,_0x93a4('0x12'),JSON[_0x93a4('0x15')](_0xa9750c));if(_0xa9750c[_0x93a4('0x16')]){if(_0xa9750c[_0x93a4('0x16')][_0x93a4('0x17')]===0x1f4){logger[_0x93a4('0x16')]('ChatInteraction,\x20%s,\x20%s',_0x3c6a27,_0xa9750c[_0x93a4('0x16')][_0x93a4('0x18')]);return _0x5e2d9(_0xa9750c['error'][_0x93a4('0x18')]);}logger[_0x93a4('0x16')](_0x93a4('0x11'),_0x3c6a27,_0xa9750c[_0x93a4('0x16')]['message']);return _0x1becdb(_0xa9750c[_0x93a4('0x16')][_0x93a4('0x18')]);}else{logger[_0x93a4('0x19')]('ChatInteraction,\x20%s,\x20%s',_0x3c6a27,_0x93a4('0x12'));_0x1becdb(_0xa9750c['result']['message']);}})[_0x93a4('0x1a')](function(_0x12da19){logger['error']('ChatInteraction,\x20%s,\x20%s',_0x3c6a27,_0x12da19);_0x5e2d9(_0x12da19);});});}exports['UpdateChatInteraction']=function(_0xfcc8d0){var _0x5678e1=this;return new Promise(function(_0x4ebe00,_0x5c1765){return db[_0x93a4('0x1b')][_0x93a4('0x1c')](_0xfcc8d0['body'],{'raw':_0xfcc8d0[_0x93a4('0x1d')]?_0xfcc8d0['options'][_0x93a4('0x1e')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0xfcc8d0[_0x93a4('0x1d')]?_0xfcc8d0[_0x93a4('0x1d')][_0x93a4('0x1f')]||null:null,'attributes':_0xfcc8d0[_0x93a4('0x1d')]?_0xfcc8d0[_0x93a4('0x1d')]['attributes']||null:null,'limit':_0xfcc8d0['options']?_0xfcc8d0[_0x93a4('0x1d')][_0x93a4('0x20')]||null:null})[_0x93a4('0x10')](function(_0x33a4ab){logger[_0x93a4('0x19')]('UpdateChatInteraction',_0xfcc8d0);logger[_0x93a4('0x13')](_0x93a4('0x21'),_0xfcc8d0,JSON[_0x93a4('0x15')](_0x33a4ab));_0x4ebe00(_0x33a4ab);})[_0x93a4('0x1a')](function(_0x128d20){logger[_0x93a4('0x16')]('UpdateChatInteraction',_0x128d20[_0x93a4('0x18')],_0xfcc8d0);_0x5c1765(_0x5678e1[_0x93a4('0x16')](0x1f4,_0x128d20[_0x93a4('0x18')]));});});};exports[_0x93a4('0x22')]=function(_0x25e090){return new Promise(function(_0x12c685,_0x2f0e1b){return db['ChatInteraction'][_0x93a4('0x23')]({'where':_0x25e090[_0x93a4('0x1d')]?_0x25e090['options'][_0x93a4('0x1f')]||null:null})[_0x93a4('0x10')](function(_0x469e31){if(_0x469e31){return _0x469e31[_0x93a4('0x24')](_0x25e090['body']['ids'],_['omit'](_0x25e090[_0x93a4('0x25')],[_0x93a4('0x26'),'id'])||{});}})['spread'](function(_0x1ad904){logger[_0x93a4('0x19')](_0x93a4('0x27'),_0x25e090);logger[_0x93a4('0x13')]('AddTags',_0x25e090,JSON['stringify'](_0x1ad904));_0x12c685(_0x1ad904);})[_0x93a4('0x1a')](function(_0x19af59){logger[_0x93a4('0x16')](_0x93a4('0x27'),_0x19af59['message'],_0x25e090);_0x2f0e1b(_this[_0x93a4('0x16')](0x1f4,_0x19af59[_0x93a4('0x18')]));});});}; \ No newline at end of file +var _0x83e6=['http','redis','defaults','localhost','./chatInteraction.socket','register','then','info','request\x20sent','debug','ChatInteraction,\x20%s,\x20%s,\x20%s','code','error','ChatInteraction,\x20%s,\x20%s','message','result','catch','UpdateChatInteraction','ChatInteraction','update','body','options','raw','where','attributes','limit','stringify','AddTagsToChatInteraction','find','addTags','ids','omit','spread','AddTags','lodash','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc'];(function(_0x4b73a2,_0x40b5fe){var _0x383c66=function(_0x3917ae){while(--_0x3917ae){_0x4b73a2['push'](_0x4b73a2['shift']());}};_0x383c66(++_0x40b5fe);}(_0x83e6,0x76));var _0x683e=function(_0x33d1ba,_0x26311b){_0x33d1ba=_0x33d1ba-0x0;var _0x2b0123=_0x83e6[_0x33d1ba];return _0x2b0123;};'use strict';var _=require(_0x683e('0x0'));var util=require('util');var moment=require(_0x683e('0x1'));var BPromise=require('bluebird');var rs=require(_0x683e('0x2'));var fs=require('fs');var Redis=require(_0x683e('0x3'));var db=require(_0x683e('0x4'))['db'];var utils=require(_0x683e('0x5'));var logger=require(_0x683e('0x6'))(_0x683e('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client'][_0x683e('0x8')]({'port':0x232a});config[_0x683e('0x9')]=_[_0x683e('0xa')](config[_0x683e('0x9')],{'host':_0x683e('0xb'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x683e('0x9')]));require(_0x683e('0xc'))[_0x683e('0xd')](socket);function respondWithRpcPromise(_0x536e8c,_0x1f17ea,_0xbbb008){return new BPromise(function(_0x1cc8b0,_0x553f8b){return client['request'](_0x536e8c,_0xbbb008)[_0x683e('0xe')](function(_0xae47d){logger[_0x683e('0xf')]('ChatInteraction,\x20%s,\x20%s',_0x1f17ea,_0x683e('0x10'));logger[_0x683e('0x11')](_0x683e('0x12'),_0x1f17ea,_0x683e('0x10'),JSON['stringify'](_0xae47d));if(_0xae47d['error']){if(_0xae47d['error'][_0x683e('0x13')]===0x1f4){logger[_0x683e('0x14')](_0x683e('0x15'),_0x1f17ea,_0xae47d[_0x683e('0x14')][_0x683e('0x16')]);return _0x553f8b(_0xae47d[_0x683e('0x14')][_0x683e('0x16')]);}logger['error'](_0x683e('0x15'),_0x1f17ea,_0xae47d[_0x683e('0x14')][_0x683e('0x16')]);return _0x1cc8b0(_0xae47d['error'][_0x683e('0x16')]);}else{logger[_0x683e('0xf')]('ChatInteraction,\x20%s,\x20%s',_0x1f17ea,_0x683e('0x10'));_0x1cc8b0(_0xae47d[_0x683e('0x17')][_0x683e('0x16')]);}})[_0x683e('0x18')](function(_0x4b0221){logger[_0x683e('0x14')](_0x683e('0x15'),_0x1f17ea,_0x4b0221);_0x553f8b(_0x4b0221);});});}exports[_0x683e('0x19')]=function(_0x270a6f){var _0x4bc35a=this;return new Promise(function(_0x38196a,_0x9d0b03){return db[_0x683e('0x1a')][_0x683e('0x1b')](_0x270a6f[_0x683e('0x1c')],{'raw':_0x270a6f['options']?_0x270a6f[_0x683e('0x1d')][_0x683e('0x1e')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x270a6f[_0x683e('0x1d')]?_0x270a6f[_0x683e('0x1d')][_0x683e('0x1f')]||null:null,'attributes':_0x270a6f[_0x683e('0x1d')]?_0x270a6f[_0x683e('0x1d')][_0x683e('0x20')]||null:null,'limit':_0x270a6f[_0x683e('0x1d')]?_0x270a6f[_0x683e('0x1d')][_0x683e('0x21')]||null:null})[_0x683e('0xe')](function(_0x22965f){logger['info'](_0x683e('0x19'),_0x270a6f);logger[_0x683e('0x11')](_0x683e('0x19'),_0x270a6f,JSON[_0x683e('0x22')](_0x22965f));_0x38196a(_0x22965f);})[_0x683e('0x18')](function(_0x47aa86){logger[_0x683e('0x14')](_0x683e('0x19'),_0x47aa86[_0x683e('0x16')],_0x270a6f);_0x9d0b03(_0x4bc35a[_0x683e('0x14')](0x1f4,_0x47aa86[_0x683e('0x16')]));});});};exports[_0x683e('0x23')]=function(_0x1ed072){return new Promise(function(_0xd6722e,_0x27c6ab){return db[_0x683e('0x1a')][_0x683e('0x24')]({'where':_0x1ed072['options']?_0x1ed072[_0x683e('0x1d')][_0x683e('0x1f')]||null:null})[_0x683e('0xe')](function(_0x50f044){if(_0x50f044){return _0x50f044[_0x683e('0x25')](_0x1ed072[_0x683e('0x1c')][_0x683e('0x26')],_[_0x683e('0x27')](_0x1ed072[_0x683e('0x1c')],[_0x683e('0x26'),'id'])||{});}})[_0x683e('0x28')](function(_0x5e61dc){logger[_0x683e('0xf')]('AddTags',_0x1ed072);logger[_0x683e('0x11')](_0x683e('0x29'),_0x1ed072,JSON[_0x683e('0x22')](_0x5e61dc));_0xd6722e(_0x5e61dc);})['catch'](function(_0xbb5328){logger[_0x683e('0x14')]('AddTags',_0xbb5328[_0x683e('0x16')],_0x1ed072);_0x27c6ab(_this[_0x683e('0x14')](0x1f4,_0xbb5328[_0x683e('0x16')]));});});}; \ No newline at end of file diff --git a/server/api/chatInteraction/chatInteraction.socket.js b/server/api/chatInteraction/chatInteraction.socket.js index e05042b..61d3a2d 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 _0xcbf9=['chatInteraction:','./chatInteraction.events','save','remove','update','emit','removeListener','register','length'];(function(_0x5082a0,_0x48adc0){var _0x3dd846=function(_0x31fd9f){while(--_0x31fd9f){_0x5082a0['push'](_0x5082a0['shift']());}};_0x3dd846(++_0x48adc0);}(_0xcbf9,0x1e7));var _0x9cbf=function(_0x30066f,_0x5891c9){_0x30066f=_0x30066f-0x0;var _0x1ad673=_0xcbf9[_0x30066f];return _0x1ad673;};'use strict';var ChatInteractionEvents=require(_0x9cbf('0x0'));var events=[_0x9cbf('0x1'),_0x9cbf('0x2'),_0x9cbf('0x3')];function createListener(_0x383985,_0x2c626d){return function(_0xc1f336){_0x2c626d[_0x9cbf('0x4')](_0x383985,_0xc1f336);};}function removeListener(_0x5320a3,_0x5bd55e){return function(){ChatInteractionEvents[_0x9cbf('0x5')](_0x5320a3,_0x5bd55e);};}exports[_0x9cbf('0x6')]=function(_0x59302f){for(var _0x5bba1f=0x0,_0x2efc5a=events[_0x9cbf('0x7')];_0x5bba1f<_0x2efc5a;_0x5bba1f++){var _0x2c9b69=events[_0x5bba1f];var _0x5e3a4b=createListener(_0x9cbf('0x8')+_0x2c9b69,_0x59302f);ChatInteractionEvents['on'](_0x2c9b69,_0x5e3a4b);}}; \ No newline at end of file +var _0xcee8=['removeListener','chatInteraction:','./chatInteraction.events','save','remove','update','emit'];(function(_0x4aee3d,_0xa8da3c){var _0x382510=function(_0x521e01){while(--_0x521e01){_0x4aee3d['push'](_0x4aee3d['shift']());}};_0x382510(++_0xa8da3c);}(_0xcee8,0xb1));var _0x8cee=function(_0x2c1b7f,_0x10e904){_0x2c1b7f=_0x2c1b7f-0x0;var _0x4e2203=_0xcee8[_0x2c1b7f];return _0x4e2203;};'use strict';var ChatInteractionEvents=require(_0x8cee('0x0'));var events=[_0x8cee('0x1'),_0x8cee('0x2'),_0x8cee('0x3')];function createListener(_0x1c570c,_0x6608db){return function(_0x5b82bd){_0x6608db[_0x8cee('0x4')](_0x1c570c,_0x5b82bd);};}function removeListener(_0x4e4143,_0xffd42d){return function(){ChatInteractionEvents[_0x8cee('0x5')](_0x4e4143,_0xffd42d);};}exports['register']=function(_0x295471){for(var _0xfea4e3=0x0,_0x4f57f1=events['length'];_0xfea4e3<_0x4f57f1;_0xfea4e3++){var _0x341c63=events[_0xfea4e3];var _0x49a070=createListener(_0x8cee('0x6')+_0x341c63,_0x295471);ChatInteractionEvents['on'](_0x341c63,_0x49a070);}}; \ No newline at end of file diff --git a/server/api/chatInteraction/index.js b/server/api/chatInteraction/index.js index fd6a361..8878809 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 _0x83e5=['show','/:id/attachment_download','attachmentDownload','/:id/my_messages','getMyMessages','/:id/download','download','post','create','/:id/vidaoo','createVidaooSession','diskStorage','join','root','server/files/attachments/','format','%s-%s','now','originalname','replace','/:id/attachment_upload','single','file','attachmentUpload','/:id/messages','addMessage','/:id/tags','tracked','chatinteraction:addtags','addTags','put','/:id','chat','chatinteraction:update','update','customUpdate','/:id/abandon','abandon','close','delete','chatinteraction:destroy','removeTags','exports','multer','connect-timeout','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatInteraction.controller','get','isAuthenticated','/describe','describe','isChatInteractionAuthorized'];(function(_0x54356c,_0x59c955){var _0x23bc15=function(_0x217926){while(--_0x217926){_0x54356c['push'](_0x54356c['shift']());}};_0x23bc15(++_0x59c955);}(_0x83e5,0xcd));var _0x583e=function(_0xe8129c,_0x2fb03c){_0xe8129c=_0xe8129c-0x0;var _0x709fc5=_0x83e5[_0xe8129c];return _0x709fc5;};'use strict';var multer=require(_0x583e('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x583e('0x1'));var express=require('express');var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0x583e('0x2'));var interaction=require(_0x583e('0x3'));var config=require(_0x583e('0x4'));var controller=require(_0x583e('0x5'));router[_0x583e('0x6')]('/',auth[_0x583e('0x7')](),controller['index']);router['get'](_0x583e('0x8'),auth[_0x583e('0x7')](),controller[_0x583e('0x9')]);router[_0x583e('0x6')]('/:id',auth[_0x583e('0xa')](),controller[_0x583e('0xb')]);router[_0x583e('0x6')](_0x583e('0xc'),auth[_0x583e('0xa')](),controller[_0x583e('0xd')]);router['get']('/:id/messages',auth['isAuthenticated'](),controller['getMessages']);router[_0x583e('0x6')](_0x583e('0xe'),auth[_0x583e('0xa')](),controller[_0x583e('0xf')]);router[_0x583e('0x6')](_0x583e('0x10'),auth[_0x583e('0x7')](),controller[_0x583e('0x11')]);router[_0x583e('0x12')]('/',auth[_0x583e('0x7')](),controller[_0x583e('0x13')]);router[_0x583e('0x12')](_0x583e('0x14'),auth[_0x583e('0x7')](),controller[_0x583e('0x15')]);var upload=multer({'storage':multer[_0x583e('0x16')]({'destination':function(_0x31803d,_0x5ef130,_0x5bb990){_0x5bb990(null,path[_0x583e('0x17')](config[_0x583e('0x18')],_0x583e('0x19')));},'filename':function(_0x4f0d9d,_0x108969,_0xbade8c){_0xbade8c(null,util[_0x583e('0x1a')](_0x583e('0x1b'),Date[_0x583e('0x1c')](),_0x108969[_0x583e('0x1d')][_0x583e('0x1e')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router['post'](_0x583e('0x1f'),upload[_0x583e('0x20')](_0x583e('0x21')),controller[_0x583e('0x22')]);router[_0x583e('0x12')](_0x583e('0x23'),auth[_0x583e('0xa')](),controller[_0x583e('0x24')]);router[_0x583e('0x12')](_0x583e('0x25'),auth[_0x583e('0x7')](),interaction[_0x583e('0x26')]('chat',_0x583e('0x27')),controller[_0x583e('0x28')]);router[_0x583e('0x29')](_0x583e('0x2a'),auth[_0x583e('0x7')](),interaction[_0x583e('0x26')](_0x583e('0x2b'),_0x583e('0x2c')),controller[_0x583e('0x2d')]);router[_0x583e('0x29')]('/:id/custom_update',controller[_0x583e('0x2e')]);router[_0x583e('0x29')](_0x583e('0x2f'),auth[_0x583e('0xa')](),controller[_0x583e('0x30')]);router['put']('/:id/close',controller[_0x583e('0x31')]);router[_0x583e('0x32')](_0x583e('0x2a'),auth[_0x583e('0x7')](),interaction[_0x583e('0x26')]('chat',_0x583e('0x33')),controller['destroy']);router[_0x583e('0x32')]('/:id/tags',auth[_0x583e('0x7')](),controller[_0x583e('0x34')]);module[_0x583e('0x35')]=router; \ No newline at end of file +var _0x892b=['multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatInteraction.controller','isAuthenticated','index','get','/describe','describe','/:id','isChatInteractionAuthorized','/:id/attachment_download','/:id/messages','getMessages','/:id/my_messages','getMyMessages','download','post','create','join','root','server/files/attachments/','format','%s-%s','now','originalname','/:id/attachment_upload','single','file','addMessage','tracked','chat','chatinteraction:addtags','addTags','put','chatinteraction:update','update','/:id/custom_update','customUpdate','/:id/abandon','abandon','/:id/close','delete','chatinteraction:destroy','destroy','/:id/tags'];(function(_0x453c23,_0x37b8e5){var _0xa187b=function(_0x4a642b){while(--_0x4a642b){_0x453c23['push'](_0x453c23['shift']());}};_0xa187b(++_0x37b8e5);}(_0x892b,0x6a));var _0xb892=function(_0x51b822,_0x515fb5){_0x51b822=_0x51b822-0x0;var _0x18b3cb=_0x892b[_0x51b822];return _0x18b3cb;};'use strict';var multer=require(_0xb892('0x0'));var util=require(_0xb892('0x1'));var path=require(_0xb892('0x2'));var timeout=require(_0xb892('0x3'));var express=require(_0xb892('0x4'));var router=express[_0xb892('0x5')]();var fs_extra=require(_0xb892('0x6'));var auth=require(_0xb892('0x7'));var interaction=require(_0xb892('0x8'));var config=require(_0xb892('0x9'));var controller=require(_0xb892('0xa'));router['get']('/',auth[_0xb892('0xb')](),controller[_0xb892('0xc')]);router[_0xb892('0xd')](_0xb892('0xe'),auth[_0xb892('0xb')](),controller[_0xb892('0xf')]);router[_0xb892('0xd')](_0xb892('0x10'),auth[_0xb892('0x11')](),controller['show']);router[_0xb892('0xd')](_0xb892('0x12'),auth[_0xb892('0x11')](),controller['attachmentDownload']);router[_0xb892('0xd')](_0xb892('0x13'),auth[_0xb892('0xb')](),controller[_0xb892('0x14')]);router[_0xb892('0xd')](_0xb892('0x15'),auth[_0xb892('0x11')](),controller[_0xb892('0x16')]);router[_0xb892('0xd')]('/:id/download',auth[_0xb892('0xb')](),controller[_0xb892('0x17')]);router[_0xb892('0x18')]('/',auth['isAuthenticated'](),controller[_0xb892('0x19')]);router[_0xb892('0x18')]('/:id/vidaoo',auth[_0xb892('0xb')](),controller['createVidaooSession']);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x35ebd5,_0x9ad335,_0x7eb39c){_0x7eb39c(null,path[_0xb892('0x1a')](config[_0xb892('0x1b')],_0xb892('0x1c')));},'filename':function(_0x463199,_0xc07907,_0x4ccd98){_0x4ccd98(null,util[_0xb892('0x1d')](_0xb892('0x1e'),Date[_0xb892('0x1f')](),_0xc07907[_0xb892('0x20')]['replace'](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router['post'](_0xb892('0x21'),upload[_0xb892('0x22')](_0xb892('0x23')),controller['attachmentUpload']);router[_0xb892('0x18')](_0xb892('0x13'),auth[_0xb892('0x11')](),controller[_0xb892('0x24')]);router['post']('/:id/tags',auth[_0xb892('0xb')](),interaction[_0xb892('0x25')](_0xb892('0x26'),_0xb892('0x27')),controller[_0xb892('0x28')]);router[_0xb892('0x29')](_0xb892('0x10'),auth[_0xb892('0xb')](),interaction[_0xb892('0x25')](_0xb892('0x26'),_0xb892('0x2a')),controller[_0xb892('0x2b')]);router[_0xb892('0x29')](_0xb892('0x2c'),controller[_0xb892('0x2d')]);router[_0xb892('0x29')](_0xb892('0x2e'),auth[_0xb892('0x11')](),controller[_0xb892('0x2f')]);router[_0xb892('0x29')](_0xb892('0x30'),controller['close']);router[_0xb892('0x31')]('/:id',auth['isAuthenticated'](),interaction[_0xb892('0x25')](_0xb892('0x26'),_0xb892('0x32')),controller[_0xb892('0x33')]);router[_0xb892('0x31')](_0xb892('0x34'),auth[_0xb892('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 94bec02..70a1873 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 _0xdf17=['exports','TEXT','medium','BOOLEAN','INTEGER','sequelize'];(function(_0x48b402,_0x4ac463){var _0x4435d3=function(_0x1f03ac){while(--_0x1f03ac){_0x48b402['push'](_0x48b402['shift']());}};_0x4435d3(++_0x4ac463);}(_0xdf17,0x179));var _0x7df1=function(_0x2bf141,_0x31eac7){_0x2bf141=_0x2bf141-0x0;var _0x48277b=_0xdf17[_0x2bf141];return _0x48277b;};'use strict';var Sequelize=require(_0x7df1('0x0'));module[_0x7df1('0x1')]={'body':{'type':Sequelize[_0x7df1('0x2')](_0x7df1('0x3')),'allowNull':![]},'read':{'type':Sequelize[_0x7df1('0x4')],'defaultValue':![]},'ChatInternalMessageId':{'type':Sequelize[_0x7df1('0x5')]}}; \ No newline at end of file +var _0xc822=['TEXT','medium','BOOLEAN','INTEGER','sequelize'];(function(_0x11b7ad,_0x5e4340){var _0x191a82=function(_0x4c2ea7){while(--_0x4c2ea7){_0x11b7ad['push'](_0x11b7ad['shift']());}};_0x191a82(++_0x5e4340);}(_0xc822,0x10d));var _0x2c82=function(_0x574617,_0x42eccc){_0x574617=_0x574617-0x0;var _0x29de90=_0xc822[_0x574617];return _0x29de90;};'use strict';var Sequelize=require(_0x2c82('0x0'));module['exports']={'body':{'type':Sequelize[_0x2c82('0x1')](_0x2c82('0x2')),'allowNull':![]},'read':{'type':Sequelize[_0x2c82('0x3')],'defaultValue':![]},'ChatInternalMessageId':{'type':Sequelize[_0x2c82('0x4')]}}; \ No newline at end of file diff --git a/server/api/chatInternalMessage/chatInternalMessage.controller.js b/server/api/chatInternalMessage/chatInternalMessage.controller.js index 703f0d4..90c0844 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 _0x0dc1=['register','status','end','json','offset','undefined','count','limit','set','Content-Range','apply','reject','update','then','destroy','sendStatus','error','stack','send','index','map','ChatInternalMessage','rawAttributes','fieldName','type','key','model','name','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','show','params','find','catch','create','body','describe','get','messages','createdAt','format','YYYY-MM-DD\x20HH:mm:ss','user','fullname','role','allowmessenger','-online','VoiceQueue','VoiceQueues','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','Agents','userProfileId','UserProfileResource','isEmpty','agent','resourceId','push','FromId','ToId','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','localhost','./chatInternalMessage.socket'];(function(_0x2edb66,_0x4cf1f1){var _0x191149=function(_0x43cc73){while(--_0x43cc73){_0x2edb66['push'](_0x2edb66['shift']());}};_0x191149(++_0x4cf1f1);}(_0x0dc1,0x129));var _0x10dc=function(_0x3fcda2,_0xc3a88e){_0x3fcda2=_0x3fcda2-0x0;var _0x31edb8=_0x0dc1[_0x3fcda2];return _0x31edb8;};'use strict';var emlformat=require(_0x10dc('0x0'));var rimraf=require(_0x10dc('0x1'));var zipdir=require(_0x10dc('0x2'));var jsonpatch=require(_0x10dc('0x3'));var rp=require(_0x10dc('0x4'));var moment=require(_0x10dc('0x5'));var BPromise=require(_0x10dc('0x6'));var Mustache=require(_0x10dc('0x7'));var util=require(_0x10dc('0x8'));var path=require(_0x10dc('0x9'));var sox=require(_0x10dc('0xa'));var csv=require('to-csv');var ejs=require(_0x10dc('0xb'));var fs=require('fs');var fs_extra=require(_0x10dc('0xc'));var _=require(_0x10dc('0xd'));var squel=require(_0x10dc('0xe'));var crypto=require(_0x10dc('0xf'));var jsforce=require(_0x10dc('0x10'));var deskjs=require(_0x10dc('0x11'));var toCsv=require('to-csv');var querystring=require(_0x10dc('0x12'));var Papa=require(_0x10dc('0x13'));var Redis=require(_0x10dc('0x14'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x10dc('0x15'));var logger=require(_0x10dc('0x16'))('api');var utils=require(_0x10dc('0x17'));var config=require(_0x10dc('0x18'));var licenseUtil=require('../../config/license/util');var db=require(_0x10dc('0x19'))['db'];config[_0x10dc('0x1a')]=_[_0x10dc('0x1b')](config['redis'],{'host':_0x10dc('0x1c'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0x10dc('0x1d'))[_0x10dc('0x1e')](socket);function respondWithStatusCode(_0x39e2e6,_0x2f8876){_0x2f8876=_0x2f8876||0xcc;return function(_0x53ba27){if(_0x53ba27){return _0x39e2e6['sendStatus'](_0x2f8876);}return _0x39e2e6[_0x10dc('0x1f')](_0x2f8876)[_0x10dc('0x20')]();};}function respondWithResult(_0x5211c9,_0xa90d70){_0xa90d70=_0xa90d70||0xc8;return function(_0x5f4ee7){if(_0x5f4ee7){return _0x5211c9[_0x10dc('0x1f')](_0xa90d70)[_0x10dc('0x21')](_0x5f4ee7);}};}function respondWithFilteredResult(_0x3dc802,_0x14c0ea){return function(_0x43e45f){if(_0x43e45f){var _0x5770c5=typeof _0x14c0ea[_0x10dc('0x22')]===_0x10dc('0x23')&&typeof _0x14c0ea['limit']===_0x10dc('0x23');var _0xd61c34=_0x43e45f[_0x10dc('0x24')];var _0x2ccf4f=_0x5770c5?0x0:_0x14c0ea[_0x10dc('0x22')];var _0x2d3106=_0x5770c5?_0x43e45f[_0x10dc('0x24')]:_0x14c0ea['offset']+_0x14c0ea[_0x10dc('0x25')];var _0x123e09;if(_0x2d3106>=_0xd61c34){_0x2d3106=_0xd61c34;_0x123e09=0xc8;}else{_0x123e09=0xce;}_0x3dc802['status'](_0x123e09);return _0x3dc802[_0x10dc('0x26')](_0x10dc('0x27'),_0x2ccf4f+'-'+_0x2d3106+'/'+_0xd61c34)[_0x10dc('0x21')](_0x43e45f);}return null;};}function patchUpdates(_0x508be4){return function(_0x440441){try{jsonpatch[_0x10dc('0x28')](_0x440441,_0x508be4,!![]);}catch(_0x484cfb){return BPromise[_0x10dc('0x29')](_0x484cfb);}return _0x440441['save']();};}function saveUpdates(_0x39fd02,_0x682001){return function(_0x28e8f6){if(_0x28e8f6){return _0x28e8f6[_0x10dc('0x2a')](_0x39fd02)[_0x10dc('0x2b')](function(_0x5ddb6c){return _0x5ddb6c;});}return null;};}function removeEntity(_0x4ca30a,_0x42586a){return function(_0x32757e){if(_0x32757e){return _0x32757e[_0x10dc('0x2c')]()[_0x10dc('0x2b')](function(){_0x4ca30a[_0x10dc('0x1f')](0xcc)[_0x10dc('0x20')]();});}};}function handleEntityNotFound(_0x45f5c2,_0x33ff3a){return function(_0x4fc9dc){if(!_0x4fc9dc){_0x45f5c2[_0x10dc('0x2d')](0x194);}return _0x4fc9dc;};}function handleError(_0x4014f8,_0x261e7f){_0x261e7f=_0x261e7f||0x1f4;return function(_0x1f7aca){logger[_0x10dc('0x2e')](_0x1f7aca[_0x10dc('0x2f')]);if(_0x1f7aca['name']){delete _0x1f7aca['name'];}_0x4014f8[_0x10dc('0x1f')](_0x261e7f)[_0x10dc('0x30')](_0x1f7aca);};}exports[_0x10dc('0x31')]=function(_0xebd577,_0x2135a2){var _0x2978e1={},_0x5c0eb9={},_0x12952e={'count':0x0,'rows':[]};var _0x45b7c1=_[_0x10dc('0x32')](db[_0x10dc('0x33')][_0x10dc('0x34')],function(_0x589e9b){return{'name':_0x589e9b[_0x10dc('0x35')],'type':_0x589e9b[_0x10dc('0x36')][_0x10dc('0x37')]};});_0x5c0eb9[_0x10dc('0x38')]=_['map'](_0x45b7c1,_0x10dc('0x39'));_0x5c0eb9[_0x10dc('0x3a')]=_[_0x10dc('0x3b')](_0xebd577[_0x10dc('0x3a')]);_0x5c0eb9[_0x10dc('0x3c')]=_[_0x10dc('0x3d')](_0x5c0eb9[_0x10dc('0x38')],_0x5c0eb9[_0x10dc('0x3a')]);_0x2978e1[_0x10dc('0x3e')]=_['intersection'](_0x5c0eb9['model'],qs['fields'](_0xebd577['query'][_0x10dc('0x3f')]));_0x2978e1[_0x10dc('0x3e')]=_0x2978e1['attributes'][_0x10dc('0x40')]?_0x2978e1[_0x10dc('0x3e')]:_0x5c0eb9[_0x10dc('0x38')];if(!_0xebd577['query'][_0x10dc('0x41')](_0x10dc('0x42'))){_0x2978e1[_0x10dc('0x25')]=qs[_0x10dc('0x25')](_0xebd577[_0x10dc('0x3a')][_0x10dc('0x25')]);_0x2978e1[_0x10dc('0x22')]=qs[_0x10dc('0x22')](_0xebd577[_0x10dc('0x3a')][_0x10dc('0x22')]);}_0x2978e1[_0x10dc('0x43')]=qs[_0x10dc('0x44')](_0xebd577[_0x10dc('0x3a')][_0x10dc('0x44')]);_0x2978e1[_0x10dc('0x45')]=qs['filters'](_[_0x10dc('0x46')](_0xebd577['query'],_0x5c0eb9[_0x10dc('0x3c')]),_0x45b7c1);if(_0xebd577['query'][_0x10dc('0x47')]){_0x2978e1[_0x10dc('0x45')]=_[_0x10dc('0x48')](_0x2978e1[_0x10dc('0x45')],{'$or':_[_0x10dc('0x32')](_0x45b7c1,function(_0x996393){if(_0x996393[_0x10dc('0x36')]!==_0x10dc('0x49')){var _0x4ea383={};_0x4ea383[_0x996393['name']]={'$like':'%'+_0xebd577[_0x10dc('0x3a')][_0x10dc('0x47')]+'%'};return _0x4ea383;}})});}_0x2978e1=_[_0x10dc('0x48')]({},_0x2978e1,_0xebd577[_0x10dc('0x4a')]);var _0x4bb3ff={'where':_0x2978e1['where']};return db['ChatInternalMessage'][_0x10dc('0x24')](_0x4bb3ff)['then'](function(_0x5c0faa){_0x12952e[_0x10dc('0x24')]=_0x5c0faa;if(_0xebd577[_0x10dc('0x3a')][_0x10dc('0x4b')]){_0x2978e1[_0x10dc('0x4c')]=[{'all':!![]}];}return db[_0x10dc('0x33')][_0x10dc('0x4d')](_0x2978e1);})[_0x10dc('0x2b')](function(_0x5cfd15){_0x12952e[_0x10dc('0x4e')]=_0x5cfd15;return _0x12952e;})[_0x10dc('0x2b')](respondWithFilteredResult(_0x2135a2,_0x2978e1))['catch'](handleError(_0x2135a2,null));};exports[_0x10dc('0x4f')]=function(_0x2960f7,_0x599d81){var _0x842278={'raw':!![],'where':{'id':_0x2960f7[_0x10dc('0x50')]['id']}},_0x37ab73={};_0x37ab73[_0x10dc('0x38')]=_[_0x10dc('0x3b')](db['ChatInternalMessage'][_0x10dc('0x34')]);_0x37ab73[_0x10dc('0x3a')]=_[_0x10dc('0x3b')](_0x2960f7[_0x10dc('0x3a')]);_0x37ab73['filters']=_[_0x10dc('0x3d')](_0x37ab73[_0x10dc('0x38')],_0x37ab73['query']);_0x842278[_0x10dc('0x3e')]=_[_0x10dc('0x3d')](_0x37ab73[_0x10dc('0x38')],qs[_0x10dc('0x3f')](_0x2960f7[_0x10dc('0x3a')][_0x10dc('0x3f')]));_0x842278['attributes']=_0x842278[_0x10dc('0x3e')][_0x10dc('0x40')]?_0x842278[_0x10dc('0x3e')]:_0x37ab73[_0x10dc('0x38')];if(_0x2960f7[_0x10dc('0x3a')][_0x10dc('0x4b')]){_0x842278[_0x10dc('0x4c')]=[{'all':!![]}];}_0x842278=_[_0x10dc('0x48')]({},_0x842278,_0x2960f7[_0x10dc('0x4a')]);return db['ChatInternalMessage'][_0x10dc('0x51')](_0x842278)['then'](handleEntityNotFound(_0x599d81,null))[_0x10dc('0x2b')](respondWithResult(_0x599d81,null))[_0x10dc('0x52')](handleError(_0x599d81,null));};exports['create']=function(_0x5b7d59,_0x5c0c7f){return db['ChatInternalMessage'][_0x10dc('0x53')](_0x5b7d59[_0x10dc('0x54')],{})['then'](respondWithResult(_0x5c0c7f,0xc9))[_0x10dc('0x52')](handleError(_0x5c0c7f,null));};exports[_0x10dc('0x2a')]=function(_0x1d450c,_0x471d0b){if(_0x1d450c['body']['id']){delete _0x1d450c['body']['id'];}return db[_0x10dc('0x33')][_0x10dc('0x51')]({'where':{'id':_0x1d450c['params']['id']}})['then'](handleEntityNotFound(_0x471d0b,null))['then'](saveUpdates(_0x1d450c[_0x10dc('0x54')],null))[_0x10dc('0x2b')](respondWithResult(_0x471d0b,null))[_0x10dc('0x52')](handleError(_0x471d0b,null));};exports[_0x10dc('0x2c')]=function(_0x16c7a5,_0x429418){return db['ChatInternalMessage'][_0x10dc('0x51')]({'where':{'id':_0x16c7a5[_0x10dc('0x50')]['id']}})['then'](handleEntityNotFound(_0x429418,null))[_0x10dc('0x2b')](removeEntity(_0x429418,null))[_0x10dc('0x52')](handleError(_0x429418,null));};exports[_0x10dc('0x55')]=function(_0xea22f3,_0x4ab121){return db[_0x10dc('0x33')][_0x10dc('0x55')]()['then'](respondWithResult(_0x4ab121,null))[_0x10dc('0x52')](handleError(_0x4ab121,null));};function wrapUser(_0x24a96f){return function(_0x5020c0){var _0xfbc46e=_0x24a96f[_0x10dc('0x56')]({'plain':!![]});_0xfbc46e[_0x10dc('0x57')]=[];if(_0x5020c0){_0xfbc46e['lastMessageAt']=_0x5020c0[_0x10dc('0x58')];_0xfbc46e['lastMessage']=_0x5020c0;}else{_0xfbc46e['lastMessageAt']=moment(0x0)[_0x10dc('0x59')](_0x10dc('0x5a'));_0xfbc46e['lastMessage']={};}return _0xfbc46e;};}exports['getUsers']=function(_0x7a60de,_0x10e720,_0x335032){var _0x58b812=[];return db['User'][_0x10dc('0x4d')]({'where':{'role':['agent','admin',_0x10dc('0x5b')]},'attributes':['id',_0x10dc('0x5c'),'name',_0x10dc('0x5d'),'userpic','internal','online','lastLoginAt',_0x10dc('0x5e'),'showWebBar'],'order':qs[_0x10dc('0x44')](_0x10dc('0x5f')),'include':[{'model':db[_0x10dc('0x60')],'as':_0x10dc('0x61'),'attributes':['id',_0x10dc('0x39'),_0x10dc('0x36')],'through':{'attributes':[]}}]})['then'](function(_0x679c99){if(_0x679c99){var _0x41d1e0=_0x7a60de[_0x10dc('0x5b')]['get']({'plain':!![]});if(!_0x41d1e0)throw new Error(_0x10dc('0x62'));if(_0x41d1e0[_0x10dc('0x5d')]===_0x10dc('0x5b')){return db[_0x10dc('0x63')][_0x10dc('0x51')]({'where':{'name':_0x10dc('0x64'),'userProfileId':_0x41d1e0[_0x10dc('0x65')]},'raw':!![]})[_0x10dc('0x2b')](function(_0x3f51c6){if(_0x3f51c6){if(_0x3f51c6['autoAssociation']===0x0){return db[_0x10dc('0x66')]['findAll']({'where':{'sectionId':_0x3f51c6['id']},'raw':!![]})[_0x10dc('0x2b')](function(_0x3a66a5){var _0x277147=[];if(_[_0x10dc('0x67')](_0x3a66a5)){_0x277147=_[_0x10dc('0x47')](_0x679c99,function(_0x2f4d28){if(_0x2f4d28[_0x10dc('0x5d')]!==_0x10dc('0x68')){return _0x2f4d28;}});return _0x277147;}else{for(var _0x3acd3a=0x0;_0x3acd3a<_0x679c99['length'];_0x3acd3a++){var _0xcaa25=_0x679c99[_0x3acd3a];if(_0xcaa25[_0x10dc('0x5d')]===_0x10dc('0x68')){var _0x5a6853=_[_0x10dc('0x51')](_0x3a66a5,function(_0x3440b7){return _0x3440b7[_0x10dc('0x69')]===_0xcaa25['id'];});if(_0x5a6853)_0x277147[_0x10dc('0x6a')](_0xcaa25);}else{_0x277147['push'](_0xcaa25);}}return _0x277147;}});}else{return _0x679c99;}}else{var _0x2daf52=_[_0x10dc('0x47')](_0x679c99,function(_0x131f23){if(_0x131f23['role']!==_0x10dc('0x68')){return _0x131f23;}});return _0x2daf52;}});}else{return _0x679c99;}}})[_0x10dc('0x2b')](function(_0x572925){var _0x382375=[];if(_0x572925){_0x58b812=_0x572925;for(var _0x801308=0x0;_0x801308<_0x572925['length'];_0x801308+=0x1){_0x58b812[_0x801308][_0x10dc('0x57')]=[];_0x382375[_0x10dc('0x6a')](db[_0x10dc('0x33')][_0x10dc('0x51')]({'where':{'FromId':[_0x7a60de[_0x10dc('0x5b')]['id'],_0x572925[_0x801308]['id']],'ToId':[_0x7a60de[_0x10dc('0x5b')]['id'],_0x572925[_0x801308]['id']],'ChatGroupId':null},'attributes':['id','createdAt',_0x10dc('0x6b'),_0x10dc('0x6c'),'read',_0x10dc('0x54')],'order':qs[_0x10dc('0x44')]('-createdAt'),'limit':0x1,'offset':0x0,'raw':!![]})['then'](wrapUser(_0x572925[_0x801308])));}return BPromise['all'](_0x382375);}return[];})[_0x10dc('0x2b')](function(_0x38c806){return{'rows':_0x38c806,'count':_0x38c806[_0x10dc('0x40')]};})[_0x10dc('0x2b')](respondWithResult(_0x10e720,null))[_0x10dc('0x52')](handleError(_0x10e720,null));}; \ No newline at end of file +var _0x7f4e=['describe','get','messages','lastMessageAt','createdAt','lastMessage','format','YYYY-MM-DD\x20HH:mm:ss','getUsers','agent','admin','user','fullname','userpic','online','lastLoginAt','allowmessenger','showWebBar','-online','VoiceQueues','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','find','Agents','userProfileId','UserProfileResource','isEmpty','resourceId','push','FromId','ToId','read','-createdAt','all','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','ejs','fs-extra','squel','crypto','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','localhost','socket.io-emitter','./chatInternalMessage.socket','register','status','json','offset','undefined','limit','count','Content-Range','apply','reject','save','update','then','end','error','stack','name','send','index','map','ChatInternalMessage','rawAttributes','fieldName','key','model','query','keys','filters','intersection','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','type','VIRTUAL','merge','options','includeAll','include','show','params','fields','catch','create','body','destroy'];(function(_0x16946c,_0x1493bc){var _0x806686=function(_0x53af34){while(--_0x53af34){_0x16946c['push'](_0x16946c['shift']());}};_0x806686(++_0x1493bc);}(_0x7f4e,0x104));var _0xe7f4=function(_0x5299b5,_0x8ecf83){_0x5299b5=_0x5299b5-0x0;var _0x106edf=_0x7f4e[_0x5299b5];return _0x106edf;};'use strict';var emlformat=require(_0xe7f4('0x0'));var rimraf=require(_0xe7f4('0x1'));var zipdir=require(_0xe7f4('0x2'));var jsonpatch=require(_0xe7f4('0x3'));var rp=require(_0xe7f4('0x4'));var moment=require(_0xe7f4('0x5'));var BPromise=require('bluebird');var Mustache=require(_0xe7f4('0x6'));var util=require(_0xe7f4('0x7'));var path=require(_0xe7f4('0x8'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0xe7f4('0x9'));var fs=require('fs');var fs_extra=require(_0xe7f4('0xa'));var _=require('lodash');var squel=require(_0xe7f4('0xb'));var crypto=require(_0xe7f4('0xc'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xe7f4('0xd'));var Redis=require(_0xe7f4('0xe'));var authService=require(_0xe7f4('0xf'));var qs=require('../../components/parsers/qs');var as=require(_0xe7f4('0x10'));var hardwareService=require(_0xe7f4('0x11'));var logger=require(_0xe7f4('0x12'))(_0xe7f4('0x13'));var utils=require(_0xe7f4('0x14'));var config=require(_0xe7f4('0x15'));var licenseUtil=require(_0xe7f4('0x16'));var db=require(_0xe7f4('0x17'))['db'];config[_0xe7f4('0x18')]=_['defaults'](config[_0xe7f4('0x18')],{'host':_0xe7f4('0x19'),'port':0x18eb});var socket=require(_0xe7f4('0x1a'))(new Redis(config[_0xe7f4('0x18')]));require(_0xe7f4('0x1b'))[_0xe7f4('0x1c')](socket);function respondWithStatusCode(_0x3dfce0,_0x547aca){_0x547aca=_0x547aca||0xcc;return function(_0x1feff7){if(_0x1feff7){return _0x3dfce0['sendStatus'](_0x547aca);}return _0x3dfce0[_0xe7f4('0x1d')](_0x547aca)['end']();};}function respondWithResult(_0x22dcad,_0x200f88){_0x200f88=_0x200f88||0xc8;return function(_0x3c1d49){if(_0x3c1d49){return _0x22dcad[_0xe7f4('0x1d')](_0x200f88)[_0xe7f4('0x1e')](_0x3c1d49);}};}function respondWithFilteredResult(_0x331c99,_0x136a9a){return function(_0x3aad05){if(_0x3aad05){var _0x13351c=typeof _0x136a9a[_0xe7f4('0x1f')]===_0xe7f4('0x20')&&typeof _0x136a9a[_0xe7f4('0x21')]==='undefined';var _0x1a7a91=_0x3aad05['count'];var _0x3f3f8a=_0x13351c?0x0:_0x136a9a[_0xe7f4('0x1f')];var _0x2209aa=_0x13351c?_0x3aad05[_0xe7f4('0x22')]:_0x136a9a[_0xe7f4('0x1f')]+_0x136a9a[_0xe7f4('0x21')];var _0x16d5ca;if(_0x2209aa>=_0x1a7a91){_0x2209aa=_0x1a7a91;_0x16d5ca=0xc8;}else{_0x16d5ca=0xce;}_0x331c99[_0xe7f4('0x1d')](_0x16d5ca);return _0x331c99['set'](_0xe7f4('0x23'),_0x3f3f8a+'-'+_0x2209aa+'/'+_0x1a7a91)['json'](_0x3aad05);}return null;};}function patchUpdates(_0xc28014){return function(_0x2fd064){try{jsonpatch[_0xe7f4('0x24')](_0x2fd064,_0xc28014,!![]);}catch(_0x137fee){return BPromise[_0xe7f4('0x25')](_0x137fee);}return _0x2fd064[_0xe7f4('0x26')]();};}function saveUpdates(_0x357aca,_0x5b3b2c){return function(_0x236beb){if(_0x236beb){return _0x236beb[_0xe7f4('0x27')](_0x357aca)[_0xe7f4('0x28')](function(_0x2cd106){return _0x2cd106;});}return null;};}function removeEntity(_0x218062,_0x2445c6){return function(_0x12ea01){if(_0x12ea01){return _0x12ea01['destroy']()[_0xe7f4('0x28')](function(){_0x218062['status'](0xcc)[_0xe7f4('0x29')]();});}};}function handleEntityNotFound(_0x46054a,_0x47a1db){return function(_0x2b3c59){if(!_0x2b3c59){_0x46054a['sendStatus'](0x194);}return _0x2b3c59;};}function handleError(_0x248334,_0x4b0008){_0x4b0008=_0x4b0008||0x1f4;return function(_0xb723c9){logger[_0xe7f4('0x2a')](_0xb723c9[_0xe7f4('0x2b')]);if(_0xb723c9[_0xe7f4('0x2c')]){delete _0xb723c9[_0xe7f4('0x2c')];}_0x248334[_0xe7f4('0x1d')](_0x4b0008)[_0xe7f4('0x2d')](_0xb723c9);};}exports[_0xe7f4('0x2e')]=function(_0x1865ba,_0x64abf8){var _0x50d651={},_0x1faf0d={},_0x1fc26d={'count':0x0,'rows':[]};var _0x25031a=_[_0xe7f4('0x2f')](db[_0xe7f4('0x30')][_0xe7f4('0x31')],function(_0x8f5d84){return{'name':_0x8f5d84[_0xe7f4('0x32')],'type':_0x8f5d84['type'][_0xe7f4('0x33')]};});_0x1faf0d[_0xe7f4('0x34')]=_[_0xe7f4('0x2f')](_0x25031a,'name');_0x1faf0d[_0xe7f4('0x35')]=_[_0xe7f4('0x36')](_0x1865ba[_0xe7f4('0x35')]);_0x1faf0d[_0xe7f4('0x37')]=_[_0xe7f4('0x38')](_0x1faf0d[_0xe7f4('0x34')],_0x1faf0d[_0xe7f4('0x35')]);_0x50d651['attributes']=_[_0xe7f4('0x38')](_0x1faf0d['model'],qs['fields'](_0x1865ba[_0xe7f4('0x35')]['fields']));_0x50d651[_0xe7f4('0x39')]=_0x50d651[_0xe7f4('0x39')][_0xe7f4('0x3a')]?_0x50d651[_0xe7f4('0x39')]:_0x1faf0d[_0xe7f4('0x34')];if(!_0x1865ba['query'][_0xe7f4('0x3b')](_0xe7f4('0x3c'))){_0x50d651[_0xe7f4('0x21')]=qs[_0xe7f4('0x21')](_0x1865ba[_0xe7f4('0x35')][_0xe7f4('0x21')]);_0x50d651['offset']=qs[_0xe7f4('0x1f')](_0x1865ba['query'][_0xe7f4('0x1f')]);}_0x50d651[_0xe7f4('0x3d')]=qs[_0xe7f4('0x3e')](_0x1865ba['query'][_0xe7f4('0x3e')]);_0x50d651[_0xe7f4('0x3f')]=qs[_0xe7f4('0x37')](_[_0xe7f4('0x40')](_0x1865ba[_0xe7f4('0x35')],_0x1faf0d[_0xe7f4('0x37')]),_0x25031a);if(_0x1865ba[_0xe7f4('0x35')][_0xe7f4('0x41')]){_0x50d651[_0xe7f4('0x3f')]=_['merge'](_0x50d651[_0xe7f4('0x3f')],{'$or':_[_0xe7f4('0x2f')](_0x25031a,function(_0x2c6440){if(_0x2c6440[_0xe7f4('0x42')]!==_0xe7f4('0x43')){var _0x29c95a={};_0x29c95a[_0x2c6440[_0xe7f4('0x2c')]]={'$like':'%'+_0x1865ba[_0xe7f4('0x35')]['filter']+'%'};return _0x29c95a;}})});}_0x50d651=_[_0xe7f4('0x44')]({},_0x50d651,_0x1865ba[_0xe7f4('0x45')]);var _0x6582c7={'where':_0x50d651[_0xe7f4('0x3f')]};return db['ChatInternalMessage'][_0xe7f4('0x22')](_0x6582c7)[_0xe7f4('0x28')](function(_0x16fb70){_0x1fc26d[_0xe7f4('0x22')]=_0x16fb70;if(_0x1865ba[_0xe7f4('0x35')][_0xe7f4('0x46')]){_0x50d651[_0xe7f4('0x47')]=[{'all':!![]}];}return db['ChatInternalMessage']['findAll'](_0x50d651);})['then'](function(_0x18aba6){_0x1fc26d['rows']=_0x18aba6;return _0x1fc26d;})[_0xe7f4('0x28')](respondWithFilteredResult(_0x64abf8,_0x50d651))['catch'](handleError(_0x64abf8,null));};exports[_0xe7f4('0x48')]=function(_0xf86cb3,_0x7d3900){var _0x530248={'raw':!![],'where':{'id':_0xf86cb3[_0xe7f4('0x49')]['id']}},_0x3437b1={};_0x3437b1[_0xe7f4('0x34')]=_[_0xe7f4('0x36')](db['ChatInternalMessage'][_0xe7f4('0x31')]);_0x3437b1[_0xe7f4('0x35')]=_[_0xe7f4('0x36')](_0xf86cb3[_0xe7f4('0x35')]);_0x3437b1[_0xe7f4('0x37')]=_[_0xe7f4('0x38')](_0x3437b1[_0xe7f4('0x34')],_0x3437b1[_0xe7f4('0x35')]);_0x530248[_0xe7f4('0x39')]=_[_0xe7f4('0x38')](_0x3437b1['model'],qs[_0xe7f4('0x4a')](_0xf86cb3[_0xe7f4('0x35')][_0xe7f4('0x4a')]));_0x530248[_0xe7f4('0x39')]=_0x530248[_0xe7f4('0x39')][_0xe7f4('0x3a')]?_0x530248[_0xe7f4('0x39')]:_0x3437b1['model'];if(_0xf86cb3[_0xe7f4('0x35')][_0xe7f4('0x46')]){_0x530248['include']=[{'all':!![]}];}_0x530248=_[_0xe7f4('0x44')]({},_0x530248,_0xf86cb3[_0xe7f4('0x45')]);return db[_0xe7f4('0x30')]['find'](_0x530248)[_0xe7f4('0x28')](handleEntityNotFound(_0x7d3900,null))['then'](respondWithResult(_0x7d3900,null))[_0xe7f4('0x4b')](handleError(_0x7d3900,null));};exports['create']=function(_0x2443c0,_0x5a88a5){return db[_0xe7f4('0x30')][_0xe7f4('0x4c')](_0x2443c0[_0xe7f4('0x4d')],{})[_0xe7f4('0x28')](respondWithResult(_0x5a88a5,0xc9))[_0xe7f4('0x4b')](handleError(_0x5a88a5,null));};exports[_0xe7f4('0x27')]=function(_0x120e6e,_0x903b15){if(_0x120e6e[_0xe7f4('0x4d')]['id']){delete _0x120e6e['body']['id'];}return db[_0xe7f4('0x30')]['find']({'where':{'id':_0x120e6e[_0xe7f4('0x49')]['id']}})[_0xe7f4('0x28')](handleEntityNotFound(_0x903b15,null))['then'](saveUpdates(_0x120e6e[_0xe7f4('0x4d')],null))[_0xe7f4('0x28')](respondWithResult(_0x903b15,null))[_0xe7f4('0x4b')](handleError(_0x903b15,null));};exports[_0xe7f4('0x4e')]=function(_0x2a5a1d,_0x3de60d){return db[_0xe7f4('0x30')]['find']({'where':{'id':_0x2a5a1d['params']['id']}})['then'](handleEntityNotFound(_0x3de60d,null))[_0xe7f4('0x28')](removeEntity(_0x3de60d,null))[_0xe7f4('0x4b')](handleError(_0x3de60d,null));};exports[_0xe7f4('0x4f')]=function(_0x4a52f6,_0x3c8ae7){return db[_0xe7f4('0x30')][_0xe7f4('0x4f')]()[_0xe7f4('0x28')](respondWithResult(_0x3c8ae7,null))[_0xe7f4('0x4b')](handleError(_0x3c8ae7,null));};function wrapUser(_0x77b063){return function(_0x1bb6ae){var _0x495c1d=_0x77b063[_0xe7f4('0x50')]({'plain':!![]});_0x495c1d[_0xe7f4('0x51')]=[];if(_0x1bb6ae){_0x495c1d[_0xe7f4('0x52')]=_0x1bb6ae[_0xe7f4('0x53')];_0x495c1d[_0xe7f4('0x54')]=_0x1bb6ae;}else{_0x495c1d[_0xe7f4('0x52')]=moment(0x0)[_0xe7f4('0x55')](_0xe7f4('0x56'));_0x495c1d[_0xe7f4('0x54')]={};}return _0x495c1d;};}exports[_0xe7f4('0x57')]=function(_0x99a7e9,_0x43f969,_0x2baee4){var _0x16ebbb=[];return db['User']['findAll']({'where':{'role':[_0xe7f4('0x58'),_0xe7f4('0x59'),_0xe7f4('0x5a')]},'attributes':['id',_0xe7f4('0x5b'),_0xe7f4('0x2c'),'role',_0xe7f4('0x5c'),'internal',_0xe7f4('0x5d'),_0xe7f4('0x5e'),_0xe7f4('0x5f'),_0xe7f4('0x60')],'order':qs['sort'](_0xe7f4('0x61')),'include':[{'model':db['VoiceQueue'],'as':_0xe7f4('0x62'),'attributes':['id',_0xe7f4('0x2c'),_0xe7f4('0x42')],'through':{'attributes':[]}}]})[_0xe7f4('0x28')](function(_0x4b0f71){if(_0x4b0f71){var _0x2c9557=_0x99a7e9[_0xe7f4('0x5a')][_0xe7f4('0x50')]({'plain':!![]});if(!_0x2c9557)throw new Error(_0xe7f4('0x63'));if(_0x2c9557[_0xe7f4('0x64')]===_0xe7f4('0x5a')){return db['UserProfileSection'][_0xe7f4('0x65')]({'where':{'name':_0xe7f4('0x66'),'userProfileId':_0x2c9557[_0xe7f4('0x67')]},'raw':!![]})[_0xe7f4('0x28')](function(_0x3c1a7c){if(_0x3c1a7c){if(_0x3c1a7c['autoAssociation']===0x0){return db[_0xe7f4('0x68')]['findAll']({'where':{'sectionId':_0x3c1a7c['id']},'raw':!![]})[_0xe7f4('0x28')](function(_0x57f312){var _0x1d3509=[];if(_[_0xe7f4('0x69')](_0x57f312)){_0x1d3509=_[_0xe7f4('0x41')](_0x4b0f71,function(_0x164a7f){if(_0x164a7f[_0xe7f4('0x64')]!==_0xe7f4('0x58')){return _0x164a7f;}});return _0x1d3509;}else{for(var _0x45ffb4=0x0;_0x45ffb4<_0x4b0f71['length'];_0x45ffb4++){var _0x94c1a7=_0x4b0f71[_0x45ffb4];if(_0x94c1a7[_0xe7f4('0x64')]===_0xe7f4('0x58')){var _0x2a2a94=_[_0xe7f4('0x65')](_0x57f312,function(_0x387eb0){return _0x387eb0[_0xe7f4('0x6a')]===_0x94c1a7['id'];});if(_0x2a2a94)_0x1d3509['push'](_0x94c1a7);}else{_0x1d3509[_0xe7f4('0x6b')](_0x94c1a7);}}return _0x1d3509;}});}else{return _0x4b0f71;}}else{var _0x7a7343=_['filter'](_0x4b0f71,function(_0x6de1e0){if(_0x6de1e0['role']!==_0xe7f4('0x58')){return _0x6de1e0;}});return _0x7a7343;}});}else{return _0x4b0f71;}}})['then'](function(_0x4ac985){var _0x571625=[];if(_0x4ac985){_0x16ebbb=_0x4ac985;for(var _0x10b1e4=0x0;_0x10b1e4<_0x4ac985[_0xe7f4('0x3a')];_0x10b1e4+=0x1){_0x16ebbb[_0x10b1e4][_0xe7f4('0x51')]=[];_0x571625['push'](db[_0xe7f4('0x30')]['find']({'where':{'FromId':[_0x99a7e9[_0xe7f4('0x5a')]['id'],_0x4ac985[_0x10b1e4]['id']],'ToId':[_0x99a7e9[_0xe7f4('0x5a')]['id'],_0x4ac985[_0x10b1e4]['id']],'ChatGroupId':null},'attributes':['id',_0xe7f4('0x53'),_0xe7f4('0x6c'),_0xe7f4('0x6d'),_0xe7f4('0x6e'),_0xe7f4('0x4d')],'order':qs[_0xe7f4('0x3e')](_0xe7f4('0x6f')),'limit':0x1,'offset':0x0,'raw':!![]})['then'](wrapUser(_0x4ac985[_0x10b1e4])));}return BPromise[_0xe7f4('0x70')](_0x571625);}return[];})['then'](function(_0x2fa4d7){return{'rows':_0x2fa4d7,'count':_0x2fa4d7['length']};})[_0xe7f4('0x28')](respondWithResult(_0x43f969,null))[_0xe7f4('0x4b')](handleError(_0x43f969,null));}; \ No newline at end of file diff --git a/server/api/chatInternalMessage/chatInternalMessage.events.js b/server/api/chatInternalMessage/chatInternalMessage.events.js index b33999f..85fc1c2 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 _0xe16d=['remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','setMaxListeners','save','update'];(function(_0x40a045,_0x516f0e){var _0x1a687c=function(_0x48c9fe){while(--_0x48c9fe){_0x40a045['push'](_0x40a045['shift']());}};_0x1a687c(++_0x516f0e);}(_0xe16d,0x11d));var _0xde16=function(_0x1d42aa,_0x271cf7){_0x1d42aa=_0x1d42aa-0x0;var _0x4e7c53=_0xe16d[_0x1d42aa];return _0x4e7c53;};'use strict';var EventEmitter=require(_0xde16('0x0'));var ChatInternalMessage=require(_0xde16('0x1'))['db']['ChatInternalMessage'];var ChatInternalMessageEvents=new EventEmitter();ChatInternalMessageEvents[_0xde16('0x2')](0x0);var events={'afterCreate':_0xde16('0x3'),'afterUpdate':_0xde16('0x4'),'afterDestroy':_0xde16('0x5')};function emitEvent(_0x3653f3){return function(_0x25c550,_0x1b521d,_0x1df1bf){ChatInternalMessageEvents['emit'](_0x3653f3+':'+_0x25c550['id'],_0x25c550);ChatInternalMessageEvents[_0xde16('0x6')](_0x3653f3,_0x25c550);_0x1df1bf(null);};}for(var e in events){if(events[_0xde16('0x7')](e)){var event=events[e];ChatInternalMessage[_0xde16('0x8')](e,emitEvent(event));}}module[_0xde16('0x9')]=ChatInternalMessageEvents; \ No newline at end of file +var _0xb2ee=['hook','exports','events','../../mysqldb','setMaxListeners','save','update','remove','emit','hasOwnProperty'];(function(_0xdda617,_0x54ca1b){var _0x3b8bd9=function(_0x2fad0e){while(--_0x2fad0e){_0xdda617['push'](_0xdda617['shift']());}};_0x3b8bd9(++_0x54ca1b);}(_0xb2ee,0xa2));var _0xeb2e=function(_0x4de1b4,_0x40501a){_0x4de1b4=_0x4de1b4-0x0;var _0x11a97c=_0xb2ee[_0x4de1b4];return _0x11a97c;};'use strict';var EventEmitter=require(_0xeb2e('0x0'));var ChatInternalMessage=require(_0xeb2e('0x1'))['db']['ChatInternalMessage'];var ChatInternalMessageEvents=new EventEmitter();ChatInternalMessageEvents[_0xeb2e('0x2')](0x0);var events={'afterCreate':_0xeb2e('0x3'),'afterUpdate':_0xeb2e('0x4'),'afterDestroy':_0xeb2e('0x5')};function emitEvent(_0x550176){return function(_0x221f23,_0x5d16b9,_0x51cb67){ChatInternalMessageEvents['emit'](_0x550176+':'+_0x221f23['id'],_0x221f23);ChatInternalMessageEvents[_0xeb2e('0x6')](_0x550176,_0x221f23);_0x51cb67(null);};}for(var e in events){if(events[_0xeb2e('0x7')](e)){var event=events[e];ChatInternalMessage[_0xeb2e('0x8')](e,emitEvent(event));}}module[_0xeb2e('0x9')]=ChatInternalMessageEvents; \ No newline at end of file diff --git a/server/api/chatInternalMessage/chatInternalMessage.model.js b/server/api/chatInternalMessage/chatInternalMessage.model.js index 224abe9..5b76140 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 _0x9bfc=['ChatInternalMessage','chat_internal_messages','utf8mb4','utf8mb4_unicode_ci','util','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','exports','define'];(function(_0x52085a,_0x3717ca){var _0x5afc1a=function(_0x2aa175){while(--_0x2aa175){_0x52085a['push'](_0x52085a['shift']());}};_0x5afc1a(++_0x3717ca);}(_0x9bfc,0x9e));var _0xc9bf=function(_0x2c5e0d,_0x3b613d){_0x2c5e0d=_0x2c5e0d-0x0;var _0x1ce17d=_0x9bfc[_0x2c5e0d];return _0x1ce17d;};'use strict';var _=require('lodash');var util=require(_0xc9bf('0x0'));var logger=require('../../config/logger')(_0xc9bf('0x1'));var moment=require(_0xc9bf('0x2'));var BPromise=require(_0xc9bf('0x3'));var rp=require(_0xc9bf('0x4'));var fs=require('fs');var path=require(_0xc9bf('0x5'));var rimraf=require(_0xc9bf('0x6'));var config=require(_0xc9bf('0x7'));var attributes=require('./chatInternalMessage.attributes');module[_0xc9bf('0x8')]=function(_0x3cfe22,_0x1d4651){return _0x3cfe22[_0xc9bf('0x9')](_0xc9bf('0xa'),attributes,{'tableName':_0xc9bf('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xc9bf('0xc'),'collate':_0xc9bf('0xd')});}; \ No newline at end of file +var _0xab1b=['../../config/environment','exports','define','ChatInternalMessage','chat_internal_messages','lodash','util','../../config/logger','api','request-promise','path','rimraf'];(function(_0x15baaf,_0x518b72){var _0xd1c6d5=function(_0x100e4b){while(--_0x100e4b){_0x15baaf['push'](_0x15baaf['shift']());}};_0xd1c6d5(++_0x518b72);}(_0xab1b,0x1e5));var _0xbab1=function(_0x4c5ebe,_0x309f6b){_0x4c5ebe=_0x4c5ebe-0x0;var _0x4f8258=_0xab1b[_0x4c5ebe];return _0x4f8258;};'use strict';var _=require(_0xbab1('0x0'));var util=require(_0xbab1('0x1'));var logger=require(_0xbab1('0x2'))(_0xbab1('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xbab1('0x4'));var fs=require('fs');var path=require(_0xbab1('0x5'));var rimraf=require(_0xbab1('0x6'));var config=require(_0xbab1('0x7'));var attributes=require('./chatInternalMessage.attributes');module[_0xbab1('0x8')]=function(_0x34c96d,_0x45a70d){return _0x34c96d[_0xbab1('0x9')](_0xbab1('0xa'),attributes,{'tableName':_0xbab1('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':'utf8mb4_unicode_ci'});}; \ No newline at end of file diff --git a/server/api/chatInternalMessage/chatInternalMessage.rpc.js b/server/api/chatInternalMessage/chatInternalMessage.rpc.js index c15dd94..9d5a8d6 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 _0xbe44=['stringify','error','code','message','result','catch','lodash','moment','bluebird','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./chatInternalMessage.socket','register','request','then','info','ChatInternalMessage,\x20%s,\x20%s','request\x20sent','ChatInternalMessage,\x20%s,\x20%s,\x20%s'];(function(_0x54ac63,_0x33243c){var _0x5ed54e=function(_0x4a61bd){while(--_0x4a61bd){_0x54ac63['push'](_0x54ac63['shift']());}};_0x5ed54e(++_0x33243c);}(_0xbe44,0x13a));var _0x4be4=function(_0x22a8c4,_0x51c09a){_0x22a8c4=_0x22a8c4-0x0;var _0x104c6d=_0xbe44[_0x22a8c4];return _0x104c6d;};'use strict';var _=require(_0x4be4('0x0'));var util=require('util');var moment=require(_0x4be4('0x1'));var BPromise=require(_0x4be4('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x4be4('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x4be4('0x4'));var logger=require(_0x4be4('0x5'))('rpc');var config=require(_0x4be4('0x6'));var jayson=require(_0x4be4('0x7'));var client=jayson[_0x4be4('0x8')][_0x4be4('0x9')]({'port':0x232a});config[_0x4be4('0xa')]=_[_0x4be4('0xb')](config[_0x4be4('0xa')],{'host':_0x4be4('0xc'),'port':0x18eb});var socket=require(_0x4be4('0xd'))(new Redis(config['redis']));require(_0x4be4('0xe'))[_0x4be4('0xf')](socket);function respondWithRpcPromise(_0x2d02c9,_0x2ac701,_0x561be7){return new BPromise(function(_0x43c279,_0x79036f){return client[_0x4be4('0x10')](_0x2d02c9,_0x561be7)[_0x4be4('0x11')](function(_0x3cc48c){logger[_0x4be4('0x12')](_0x4be4('0x13'),_0x2ac701,_0x4be4('0x14'));logger['debug'](_0x4be4('0x15'),_0x2ac701,_0x4be4('0x14'),JSON[_0x4be4('0x16')](_0x3cc48c));if(_0x3cc48c[_0x4be4('0x17')]){if(_0x3cc48c['error'][_0x4be4('0x18')]===0x1f4){logger[_0x4be4('0x17')]('ChatInternalMessage,\x20%s,\x20%s',_0x2ac701,_0x3cc48c['error'][_0x4be4('0x19')]);return _0x79036f(_0x3cc48c[_0x4be4('0x17')][_0x4be4('0x19')]);}logger['error'](_0x4be4('0x13'),_0x2ac701,_0x3cc48c[_0x4be4('0x17')][_0x4be4('0x19')]);return _0x43c279(_0x3cc48c[_0x4be4('0x17')][_0x4be4('0x19')]);}else{logger['info'](_0x4be4('0x13'),_0x2ac701,_0x4be4('0x14'));_0x43c279(_0x3cc48c[_0x4be4('0x1a')]['message']);}})[_0x4be4('0x1b')](function(_0x3aab46){logger[_0x4be4('0x17')](_0x4be4('0x13'),_0x2ac701,_0x3aab46);_0x79036f(_0x3aab46);});});} \ No newline at end of file +var _0x87e7=['lodash','moment','bluebird','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','socket.io-emitter','./chatInternalMessage.socket','register','request','then','ChatInternalMessage,\x20%s,\x20%s','request\x20sent','debug','ChatInternalMessage,\x20%s,\x20%s,\x20%s','error','message','info','catch'];(function(_0x2df7e9,_0x433bb5){var _0xac7e7e=function(_0x476007){while(--_0x476007){_0x2df7e9['push'](_0x2df7e9['shift']());}};_0xac7e7e(++_0x433bb5);}(_0x87e7,0x11e));var _0x787e=function(_0x466f2e,_0x5e2a7f){_0x466f2e=_0x466f2e-0x0;var _0x22dfbb=_0x87e7[_0x466f2e];return _0x22dfbb;};'use strict';var _=require(_0x787e('0x0'));var util=require('util');var moment=require(_0x787e('0x1'));var BPromise=require(_0x787e('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x787e('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x787e('0x4'));var logger=require(_0x787e('0x5'))(_0x787e('0x6'));var config=require(_0x787e('0x7'));var jayson=require(_0x787e('0x8'));var client=jayson[_0x787e('0x9')][_0x787e('0xa')]({'port':0x232a});config[_0x787e('0xb')]=_[_0x787e('0xc')](config[_0x787e('0xb')],{'host':'localhost','port':0x18eb});var socket=require(_0x787e('0xd'))(new Redis(config['redis']));require(_0x787e('0xe'))[_0x787e('0xf')](socket);function respondWithRpcPromise(_0x323de6,_0x4fbe0b,_0x43ea22){return new BPromise(function(_0x3f3c11,_0x48ea4a){return client[_0x787e('0x10')](_0x323de6,_0x43ea22)[_0x787e('0x11')](function(_0x509480){logger['info'](_0x787e('0x12'),_0x4fbe0b,_0x787e('0x13'));logger[_0x787e('0x14')](_0x787e('0x15'),_0x4fbe0b,'request\x20sent',JSON['stringify'](_0x509480));if(_0x509480[_0x787e('0x16')]){if(_0x509480[_0x787e('0x16')]['code']===0x1f4){logger['error'](_0x787e('0x12'),_0x4fbe0b,_0x509480[_0x787e('0x16')][_0x787e('0x17')]);return _0x48ea4a(_0x509480['error']['message']);}logger[_0x787e('0x16')](_0x787e('0x12'),_0x4fbe0b,_0x509480[_0x787e('0x16')][_0x787e('0x17')]);return _0x3f3c11(_0x509480[_0x787e('0x16')][_0x787e('0x17')]);}else{logger[_0x787e('0x18')](_0x787e('0x12'),_0x4fbe0b,_0x787e('0x13'));_0x3f3c11(_0x509480['result'][_0x787e('0x17')]);}})[_0x787e('0x19')](function(_0x3087b0){logger[_0x787e('0x16')]('ChatInternalMessage,\x20%s,\x20%s',_0x4fbe0b,_0x3087b0);_0x48ea4a(_0x3087b0);});});} \ No newline at end of file diff --git a/server/api/chatInternalMessage/chatInternalMessage.socket.js b/server/api/chatInternalMessage/chatInternalMessage.socket.js index 34444d5..da97c47 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 _0x0b62=['remove','update','emit','register','length','chatInternalMessage:','./chatInternalMessage.events','save'];(function(_0x46e94c,_0x461216){var _0x597221=function(_0x17b6d9){while(--_0x17b6d9){_0x46e94c['push'](_0x46e94c['shift']());}};_0x597221(++_0x461216);}(_0x0b62,0x86));var _0x20b6=function(_0x30aecc,_0x5511d4){_0x30aecc=_0x30aecc-0x0;var _0x541474=_0x0b62[_0x30aecc];return _0x541474;};'use strict';var ChatInternalMessageEvents=require(_0x20b6('0x0'));var events=[_0x20b6('0x1'),_0x20b6('0x2'),_0x20b6('0x3')];function createListener(_0x4ec436,_0x2f4992){return function(_0x53ec32){_0x2f4992[_0x20b6('0x4')](_0x4ec436,_0x53ec32);};}function removeListener(_0x4a20a0,_0x4fe529){return function(){ChatInternalMessageEvents['removeListener'](_0x4a20a0,_0x4fe529);};}exports[_0x20b6('0x5')]=function(_0xd44a96){for(var _0x1b1b2e=0x0,_0x5cb520=events[_0x20b6('0x6')];_0x1b1b2e<_0x5cb520;_0x1b1b2e++){var _0x192a80=events[_0x1b1b2e];var _0x50bce7=createListener(_0x20b6('0x7')+_0x192a80,_0xd44a96);ChatInternalMessageEvents['on'](_0x192a80,_0x50bce7);}}; \ No newline at end of file +var _0x7e02=['remove','update','emit','removeListener','register','chatInternalMessage:'];(function(_0x2bf3ef,_0x1f97a8){var _0x2315ce=function(_0x54e2c0){while(--_0x54e2c0){_0x2bf3ef['push'](_0x2bf3ef['shift']());}};_0x2315ce(++_0x1f97a8);}(_0x7e02,0xde));var _0x27e0=function(_0x538fd8,_0x24ed11){_0x538fd8=_0x538fd8-0x0;var _0x279fb4=_0x7e02[_0x538fd8];return _0x279fb4;};'use strict';var ChatInternalMessageEvents=require('./chatInternalMessage.events');var events=['save',_0x27e0('0x0'),_0x27e0('0x1')];function createListener(_0x10f7a0,_0x525a11){return function(_0x19753f){_0x525a11[_0x27e0('0x2')](_0x10f7a0,_0x19753f);};}function removeListener(_0x3a2c88,_0x933cdb){return function(){ChatInternalMessageEvents[_0x27e0('0x3')](_0x3a2c88,_0x933cdb);};}exports[_0x27e0('0x4')]=function(_0x4ec3f5){for(var _0x151fee=0x0,_0x576da8=events['length'];_0x151fee<_0x576da8;_0x151fee++){var _0x1eb746=events[_0x151fee];var _0x3045d0=createListener(_0x27e0('0x5')+_0x1eb746,_0x4ec3f5);ChatInternalMessageEvents['on'](_0x1eb746,_0x3045d0);}}; \ No newline at end of file diff --git a/server/api/chatInternalMessage/index.js b/server/api/chatInternalMessage/index.js index 1ca74fd..7084afd 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 _0xf246=['put','update','destroy','exports','multer','path','express','Router','fs-extra','../../components/auth/service','./chatInternalMessage.controller','get','/describe','describe','/users','getUsers','/:id','isAuthenticated','show','create'];(function(_0x222688,_0x46c5eb){var _0x437433=function(_0x29958c){while(--_0x29958c){_0x222688['push'](_0x222688['shift']());}};_0x437433(++_0x46c5eb);}(_0xf246,0xcc));var _0x6f24=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xf246[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require(_0x6f24('0x0'));var util=require('util');var path=require(_0x6f24('0x1'));var timeout=require('connect-timeout');var express=require(_0x6f24('0x2'));var router=express[_0x6f24('0x3')]();var fs_extra=require(_0x6f24('0x4'));var auth=require(_0x6f24('0x5'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x6f24('0x6'));router[_0x6f24('0x7')]('/',auth['isAuthenticated'](),controller['index']);router[_0x6f24('0x7')](_0x6f24('0x8'),auth['isAuthenticated'](),controller[_0x6f24('0x9')]);router[_0x6f24('0x7')](_0x6f24('0xa'),auth['isAuthenticated'](),controller[_0x6f24('0xb')]);router[_0x6f24('0x7')](_0x6f24('0xc'),auth[_0x6f24('0xd')](),controller[_0x6f24('0xe')]);router['post']('/',auth[_0x6f24('0xd')](),controller[_0x6f24('0xf')]);router[_0x6f24('0x10')](_0x6f24('0xc'),controller[_0x6f24('0x11')]);router['delete'](_0x6f24('0xc'),auth['isAuthenticated'](),controller[_0x6f24('0x12')]);module[_0x6f24('0x13')]=router; \ No newline at end of file +var _0x5eca=['show','post','create','put','delete','destroy','exports','util','path','express','fs-extra','../../components/interaction/service','../../config/environment','./chatInternalMessage.controller','get','isAuthenticated','index','/describe','describe','/users','getUsers','/:id'];(function(_0x336264,_0x32e1d9){var _0x53cf91=function(_0x21026c){while(--_0x21026c){_0x336264['push'](_0x336264['shift']());}};_0x53cf91(++_0x32e1d9);}(_0x5eca,0xe3));var _0xa5ec=function(_0x42cae2,_0x284ef8){_0x42cae2=_0x42cae2-0x0;var _0x5f256f=_0x5eca[_0x42cae2];return _0x5f256f;};'use strict';var multer=require('multer');var util=require(_0xa5ec('0x0'));var path=require(_0xa5ec('0x1'));var timeout=require('connect-timeout');var express=require(_0xa5ec('0x2'));var router=express['Router']();var fs_extra=require(_0xa5ec('0x3'));var auth=require('../../components/auth/service');var interaction=require(_0xa5ec('0x4'));var config=require(_0xa5ec('0x5'));var controller=require(_0xa5ec('0x6'));router[_0xa5ec('0x7')]('/',auth[_0xa5ec('0x8')](),controller[_0xa5ec('0x9')]);router[_0xa5ec('0x7')](_0xa5ec('0xa'),auth[_0xa5ec('0x8')](),controller[_0xa5ec('0xb')]);router[_0xa5ec('0x7')](_0xa5ec('0xc'),auth['isAuthenticated'](),controller[_0xa5ec('0xd')]);router[_0xa5ec('0x7')](_0xa5ec('0xe'),auth['isAuthenticated'](),controller[_0xa5ec('0xf')]);router[_0xa5ec('0x10')]('/',auth[_0xa5ec('0x8')](),controller[_0xa5ec('0x11')]);router[_0xa5ec('0x12')](_0xa5ec('0xe'),controller['update']);router[_0xa5ec('0x13')]('/:id',auth[_0xa5ec('0x8')](),controller[_0xa5ec('0x14')]);module[_0xa5ec('0x15')]=router; \ No newline at end of file diff --git a/server/api/chatMessage/chatMessage.attributes.js b/server/api/chatMessage/chatMessage.attributes.js index 0a1655b..f613a02 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 _0xd3f5=['exports','medium','BOOLEAN','ENUM','out','DATE','STRING','sequelize'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xd3f5,0x147));var _0x5d3f=function(_0x1035c1,_0x2d8583){_0x1035c1=_0x1035c1-0x0;var _0x308d67=_0xd3f5[_0x1035c1];return _0x308d67;};'use strict';var Sequelize=require(_0x5d3f('0x0'));module[_0x5d3f('0x1')]={'body':{'type':Sequelize['TEXT'](_0x5d3f('0x2')),'allowNull':![]},'read':{'type':Sequelize[_0x5d3f('0x3')],'defaultValue':![]},'secret':{'type':Sequelize[_0x5d3f('0x3')],'defaultValue':![]},'direction':{'type':Sequelize[_0x5d3f('0x4')]('in',_0x5d3f('0x5')),'defaultValue':_0x5d3f('0x5'),'allowNull':![]},'readAt':{'type':Sequelize[_0x5d3f('0x6')]},'providerName':{'type':Sequelize[_0x5d3f('0x7')]},'providerResponse':{'type':Sequelize['TEXT']}}; \ No newline at end of file +var _0x47d6=['ENUM','out','DATE','STRING','sequelize','exports','TEXT','medium','BOOLEAN'];(function(_0x2f6e8e,_0x25ef69){var _0x3b4332=function(_0x144100){while(--_0x144100){_0x2f6e8e['push'](_0x2f6e8e['shift']());}};_0x3b4332(++_0x25ef69);}(_0x47d6,0x13f));var _0x647d=function(_0x82e44e,_0x339ed1){_0x82e44e=_0x82e44e-0x0;var _0x2f6027=_0x47d6[_0x82e44e];return _0x2f6027;};'use strict';var Sequelize=require(_0x647d('0x0'));module[_0x647d('0x1')]={'body':{'type':Sequelize[_0x647d('0x2')](_0x647d('0x3')),'allowNull':![]},'read':{'type':Sequelize[_0x647d('0x4')],'defaultValue':![]},'secret':{'type':Sequelize[_0x647d('0x4')],'defaultValue':![]},'direction':{'type':Sequelize[_0x647d('0x5')]('in',_0x647d('0x6')),'defaultValue':_0x647d('0x6'),'allowNull':![]},'readAt':{'type':Sequelize[_0x647d('0x7')]},'providerName':{'type':Sequelize[_0x647d('0x8')]},'providerResponse':{'type':Sequelize[_0x647d('0x2')]}}; \ No newline at end of file diff --git a/server/api/chatMessage/chatMessage.controller.js b/server/api/chatMessage/chatMessage.controller.js index 2a8014d..b467621 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 _0x2dc8=['isNil','read1stAt','format','interaction','[CHATMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','stringify','acceptMessage','startsWith','cf_','push','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','sequelize','Sequelize','SELECT','manual','SIP/%s','channel','event','EventManager','parse','formData','agent','null','RejectMessage','rejectMessage','ContactId','QueryTypes','contact','interface','rejectmessage','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','querystring','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','register','jayson/promise','client','http','request','info','ChatMessage,\x20%s,\x20%s','request\x20sent','debug','ChatMessage,\x20%s,\x20%s,\x20%s','error','code','message','result','sendStatus','status','end','json','limit','undefined','offset','Content-Range','apply','reject','save','update','then','destroy','stack','name','send','map','rawAttributes','fieldName','type','key','model','keys','filters','intersection','query','fields','attributes','length','hasOwnProperty','nolimit','order','sort','pick','filter','where','VIRTUAL','options','ChatMessage','count','includeAll','include','findAll','rows','catch','params','merge','find','create','body','describe','chat-interactions','accept','chat','readAt','YYYY-MM-DD\x20HH:mm:ss','UserId','user','CmContact','Contact','get','ChatInteraction','ChatInteractionId'];(function(_0x45b41f,_0x2975b7){var _0x4798e4=function(_0x127990){while(--_0x127990){_0x45b41f['push'](_0x45b41f['shift']());}};_0x4798e4(++_0x2975b7);}(_0x2dc8,0xaa));var _0x82dc=function(_0x3425f9,_0x2358ca){_0x3425f9=_0x3425f9-0x0;var _0x814f39=_0x2dc8[_0x3425f9];return _0x814f39;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x82dc('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0x82dc('0x1'));var rp=require(_0x82dc('0x2'));var moment=require(_0x82dc('0x3'));var BPromise=require(_0x82dc('0x4'));var Mustache=require(_0x82dc('0x5'));var util=require(_0x82dc('0x6'));var path=require(_0x82dc('0x7'));var sox=require(_0x82dc('0x8'));var csv=require(_0x82dc('0x9'));var ejs=require(_0x82dc('0xa'));var fs=require('fs');var fs_extra=require(_0x82dc('0xb'));var _=require(_0x82dc('0xc'));var squel=require(_0x82dc('0xd'));var crypto=require(_0x82dc('0xe'));var jsforce=require(_0x82dc('0xf'));var deskjs=require('desk.js');var toCsv=require(_0x82dc('0x9'));var querystring=require(_0x82dc('0x10'));var Papa=require('papaparse');var Redis=require(_0x82dc('0x11'));var authService=require('../../components/auth/service');var qs=require(_0x82dc('0x12'));var as=require(_0x82dc('0x13'));var hardwareService=require(_0x82dc('0x14'));var logger=require(_0x82dc('0x15'))(_0x82dc('0x16'));var utils=require(_0x82dc('0x17'));var config=require(_0x82dc('0x18'));var licenseUtil=require('../../config/license/util');var db=require(_0x82dc('0x19'))['db'];config[_0x82dc('0x1a')]=_[_0x82dc('0x1b')](config['redis'],{'host':_0x82dc('0x1c'),'port':0x18eb});var socket=require(_0x82dc('0x1d'))(new Redis(config[_0x82dc('0x1a')]));require('./chatMessage.socket')[_0x82dc('0x1e')](socket);var jayson=require(_0x82dc('0x1f'));var client=jayson[_0x82dc('0x20')][_0x82dc('0x21')]({'port':0x232c});var client9002=jayson[_0x82dc('0x20')][_0x82dc('0x21')]({'port':0x232a});function respondWithRpcPromise(_0x5a9da6,_0x1936cb,_0x2a9c67,_0x4600ea){return new BPromise(function(_0x4a5f1d,_0x53f878){var _0x38d70b=_0x4600ea||client;return _0x38d70b[_0x82dc('0x22')](_0x5a9da6,_0x2a9c67)['then'](function(_0x23171e){logger[_0x82dc('0x23')](_0x82dc('0x24'),_0x1936cb,_0x82dc('0x25'));logger[_0x82dc('0x26')](_0x82dc('0x27'),_0x1936cb,_0x82dc('0x25'),JSON['stringify'](_0x23171e));if(_0x23171e[_0x82dc('0x28')]){if(_0x23171e[_0x82dc('0x28')][_0x82dc('0x29')]===0x1f4){logger[_0x82dc('0x28')](_0x82dc('0x24'),_0x1936cb,_0x23171e[_0x82dc('0x28')]['message']);return _0x53f878(_0x23171e[_0x82dc('0x28')][_0x82dc('0x2a')]);}logger[_0x82dc('0x28')](_0x82dc('0x24'),_0x1936cb,_0x23171e[_0x82dc('0x28')][_0x82dc('0x2a')]);return _0x4a5f1d(_0x23171e[_0x82dc('0x28')][_0x82dc('0x2a')]);}else{logger['info'](_0x82dc('0x24'),_0x1936cb,_0x82dc('0x25'));_0x4a5f1d(_0x23171e[_0x82dc('0x2b')][_0x82dc('0x2a')]);}})['catch'](function(_0x3aee0c){logger[_0x82dc('0x28')](_0x82dc('0x24'),_0x1936cb,_0x3aee0c);_0x53f878(_0x3aee0c);});});}function respondWithStatusCode(_0x25342a,_0x561579){_0x561579=_0x561579||0xcc;return function(_0x1459d7){if(_0x1459d7){return _0x25342a[_0x82dc('0x2c')](_0x561579);}return _0x25342a[_0x82dc('0x2d')](_0x561579)[_0x82dc('0x2e')]();};}function respondWithResult(_0x46b31b,_0x6922b8){_0x6922b8=_0x6922b8||0xc8;return function(_0x2bcdf4){if(_0x2bcdf4){return _0x46b31b[_0x82dc('0x2d')](_0x6922b8)[_0x82dc('0x2f')](_0x2bcdf4);}};}function respondWithFilteredResult(_0xfa9525,_0x18bbae){return function(_0x5868f4){if(_0x5868f4){var _0xbc0a9=typeof _0x18bbae['offset']==='undefined'&&typeof _0x18bbae[_0x82dc('0x30')]===_0x82dc('0x31');var _0x2cb4f1=_0x5868f4['count'];var _0x485e26=_0xbc0a9?0x0:_0x18bbae[_0x82dc('0x32')];var _0x11f175=_0xbc0a9?_0x5868f4['count']:_0x18bbae[_0x82dc('0x32')]+_0x18bbae[_0x82dc('0x30')];var _0x7145b0;if(_0x11f175>=_0x2cb4f1){_0x11f175=_0x2cb4f1;_0x7145b0=0xc8;}else{_0x7145b0=0xce;}_0xfa9525[_0x82dc('0x2d')](_0x7145b0);return _0xfa9525['set'](_0x82dc('0x33'),_0x485e26+'-'+_0x11f175+'/'+_0x2cb4f1)[_0x82dc('0x2f')](_0x5868f4);}return null;};}function patchUpdates(_0x249d60){return function(_0x20a137){try{jsonpatch[_0x82dc('0x34')](_0x20a137,_0x249d60,!![]);}catch(_0x227dae){return BPromise[_0x82dc('0x35')](_0x227dae);}return _0x20a137[_0x82dc('0x36')]();};}function saveUpdates(_0x96defb,_0x3ac949){return function(_0x5eb018){if(_0x5eb018){return _0x5eb018[_0x82dc('0x37')](_0x96defb)[_0x82dc('0x38')](function(_0x23af79){return _0x23af79;});}return null;};}function removeEntity(_0x19b45e,_0x704ce3){return function(_0xf3aa6){if(_0xf3aa6){return _0xf3aa6[_0x82dc('0x39')]()[_0x82dc('0x38')](function(){_0x19b45e['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x4b325d,_0xb4b029){return function(_0x260226){if(!_0x260226){_0x4b325d[_0x82dc('0x2c')](0x194);}return _0x260226;};}function handleError(_0x494c0b,_0x3d963e){_0x3d963e=_0x3d963e||0x1f4;return function(_0x472d18){logger['error'](_0x472d18[_0x82dc('0x3a')]);if(_0x472d18[_0x82dc('0x3b')]){delete _0x472d18['name'];}_0x494c0b[_0x82dc('0x2d')](_0x3d963e)[_0x82dc('0x3c')](_0x472d18);};}exports['index']=function(_0x4b9882,_0x46bf65){var _0xf77309={},_0x4f7c44={},_0x53fb6d={'count':0x0,'rows':[]};var _0x5bb120=_[_0x82dc('0x3d')](db['ChatMessage'][_0x82dc('0x3e')],function(_0x43d52e){return{'name':_0x43d52e[_0x82dc('0x3f')],'type':_0x43d52e[_0x82dc('0x40')][_0x82dc('0x41')]};});_0x4f7c44[_0x82dc('0x42')]=_['map'](_0x5bb120,_0x82dc('0x3b'));_0x4f7c44['query']=_[_0x82dc('0x43')](_0x4b9882['query']);_0x4f7c44[_0x82dc('0x44')]=_[_0x82dc('0x45')](_0x4f7c44[_0x82dc('0x42')],_0x4f7c44[_0x82dc('0x46')]);_0xf77309['attributes']=_[_0x82dc('0x45')](_0x4f7c44[_0x82dc('0x42')],qs[_0x82dc('0x47')](_0x4b9882[_0x82dc('0x46')][_0x82dc('0x47')]));_0xf77309[_0x82dc('0x48')]=_0xf77309['attributes'][_0x82dc('0x49')]?_0xf77309['attributes']:_0x4f7c44[_0x82dc('0x42')];if(!_0x4b9882[_0x82dc('0x46')][_0x82dc('0x4a')](_0x82dc('0x4b'))){_0xf77309[_0x82dc('0x30')]=qs['limit'](_0x4b9882['query'][_0x82dc('0x30')]);_0xf77309[_0x82dc('0x32')]=qs[_0x82dc('0x32')](_0x4b9882[_0x82dc('0x46')][_0x82dc('0x32')]);}_0xf77309[_0x82dc('0x4c')]=qs[_0x82dc('0x4d')](_0x4b9882[_0x82dc('0x46')]['sort']);_0xf77309['where']=qs[_0x82dc('0x44')](_[_0x82dc('0x4e')](_0x4b9882[_0x82dc('0x46')],_0x4f7c44[_0x82dc('0x44')]),_0x5bb120);if(_0x4b9882[_0x82dc('0x46')][_0x82dc('0x4f')]){_0xf77309[_0x82dc('0x50')]=_['merge'](_0xf77309[_0x82dc('0x50')],{'$or':_['map'](_0x5bb120,function(_0x3c2d9e){if(_0x3c2d9e[_0x82dc('0x40')]!==_0x82dc('0x51')){var _0x3bd6b7={};_0x3bd6b7[_0x3c2d9e[_0x82dc('0x3b')]]={'$like':'%'+_0x4b9882[_0x82dc('0x46')][_0x82dc('0x4f')]+'%'};return _0x3bd6b7;}})});}_0xf77309=_['merge']({},_0xf77309,_0x4b9882[_0x82dc('0x52')]);var _0x548314={'where':_0xf77309['where']};return db[_0x82dc('0x53')][_0x82dc('0x54')](_0x548314)[_0x82dc('0x38')](function(_0x5581bd){_0x53fb6d['count']=_0x5581bd;if(_0x4b9882['query'][_0x82dc('0x55')]){_0xf77309[_0x82dc('0x56')]=[{'all':!![]}];}return db[_0x82dc('0x53')][_0x82dc('0x57')](_0xf77309);})['then'](function(_0x4772f7){_0x53fb6d[_0x82dc('0x58')]=_0x4772f7;return _0x53fb6d;})[_0x82dc('0x38')](respondWithFilteredResult(_0x46bf65,_0xf77309))[_0x82dc('0x59')](handleError(_0x46bf65,null));};exports['show']=function(_0x5a1267,_0x54d08a){var _0xd4a3c9={'raw':!![],'where':{'id':_0x5a1267[_0x82dc('0x5a')]['id']}},_0x4c664b={};_0x4c664b[_0x82dc('0x42')]=_[_0x82dc('0x43')](db[_0x82dc('0x53')][_0x82dc('0x3e')]);_0x4c664b['query']=_[_0x82dc('0x43')](_0x5a1267[_0x82dc('0x46')]);_0x4c664b['filters']=_[_0x82dc('0x45')](_0x4c664b[_0x82dc('0x42')],_0x4c664b[_0x82dc('0x46')]);_0xd4a3c9[_0x82dc('0x48')]=_[_0x82dc('0x45')](_0x4c664b[_0x82dc('0x42')],qs[_0x82dc('0x47')](_0x5a1267[_0x82dc('0x46')][_0x82dc('0x47')]));_0xd4a3c9[_0x82dc('0x48')]=_0xd4a3c9[_0x82dc('0x48')][_0x82dc('0x49')]?_0xd4a3c9[_0x82dc('0x48')]:_0x4c664b[_0x82dc('0x42')];if(_0x5a1267[_0x82dc('0x46')][_0x82dc('0x55')]){_0xd4a3c9[_0x82dc('0x56')]=[{'all':!![]}];}_0xd4a3c9=_[_0x82dc('0x5b')]({},_0xd4a3c9,_0x5a1267[_0x82dc('0x52')]);return db[_0x82dc('0x53')][_0x82dc('0x5c')](_0xd4a3c9)['then'](handleEntityNotFound(_0x54d08a,null))[_0x82dc('0x38')](respondWithResult(_0x54d08a,null))[_0x82dc('0x59')](handleError(_0x54d08a,null));};exports['create']=function(_0x356c37,_0x49f181){return db[_0x82dc('0x53')][_0x82dc('0x5d')](_0x356c37['body'],{})[_0x82dc('0x38')](respondWithResult(_0x49f181,0xc9))[_0x82dc('0x59')](handleError(_0x49f181,null));};exports[_0x82dc('0x37')]=function(_0x2c319a,_0x1ee440){if(_0x2c319a[_0x82dc('0x5e')]['id']){delete _0x2c319a['body']['id'];}return db['ChatMessage']['find']({'where':{'id':_0x2c319a[_0x82dc('0x5a')]['id']}})[_0x82dc('0x38')](handleEntityNotFound(_0x1ee440,null))['then'](saveUpdates(_0x2c319a[_0x82dc('0x5e')],null))[_0x82dc('0x38')](respondWithResult(_0x1ee440,null))[_0x82dc('0x59')](handleError(_0x1ee440,null));};exports[_0x82dc('0x39')]=function(_0x5a73a4,_0x52d46a){return db[_0x82dc('0x53')]['find']({'where':{'id':_0x5a73a4['params']['id']}})[_0x82dc('0x38')](handleEntityNotFound(_0x52d46a,null))[_0x82dc('0x38')](removeEntity(_0x52d46a,null))[_0x82dc('0x59')](handleError(_0x52d46a,null));};exports[_0x82dc('0x5f')]=function(_0x5e8f0b,_0x99ba59){return db[_0x82dc('0x53')][_0x82dc('0x5f')]()[_0x82dc('0x38')](respondWithResult(_0x99ba59,null))['catch'](handleError(_0x99ba59,null));};var interaction_log=require(_0x82dc('0x15'))(_0x82dc('0x60'));exports[_0x82dc('0x61')]=function(_0x287982,_0x1f879b,_0x43791f){var _0xb8d3e5={'agent':{},'channel':_0x82dc('0x62')};if(_0x287982['body']['id']){delete _0x287982[_0x82dc('0x5e')]['id'];}_0x287982[_0x82dc('0x5e')]['read']=!![];_0x287982[_0x82dc('0x5e')][_0x82dc('0x63')]=moment()['format'](_0x82dc('0x64'));_0x287982[_0x82dc('0x5e')][_0x82dc('0x65')]=_0x287982['body'][_0x82dc('0x65')]||_0x287982[_0x82dc('0x66')]['id'];_0xb8d3e5['agent']['id']=_0x287982['body']['UserId'];return db[_0x82dc('0x53')]['find']({'where':{'id':_0x287982[_0x82dc('0x5a')]['id'],'UserId':null},'include':[{'model':db[_0x82dc('0x67')],'as':_0x82dc('0x68')}]})[_0x82dc('0x38')](handleEntityNotFound(_0x1f879b,null))['then'](saveUpdates(_0x287982[_0x82dc('0x5e')],null))[_0x82dc('0x38')](function(_0x165bfb){if(_0x165bfb){_0xb8d3e5[_0x82dc('0x2a')]=_0x165bfb[_0x82dc('0x69')]({'plain':!![]});return db[_0x82dc('0x6a')][_0x82dc('0x5c')]({'where':{'id':_0x165bfb[_0x82dc('0x6b')]}});}return null;})[_0x82dc('0x38')](handleEntityNotFound(_0x1f879b,null))[_0x82dc('0x38')](function(_0x39a196){if(_0x39a196){return _0x39a196['update']({'UserId':_0x287982[_0x82dc('0x5e')][_0x82dc('0x65')],'read1stAt':_[_0x82dc('0x6c')](_0x39a196[_0x82dc('0x6d')])?moment()[_0x82dc('0x6e')]('YYYY-MM-DD\x20HH:mm:ss'):undefined});}return null;})[_0x82dc('0x38')](function(_0x4bb07c){if(_0x4bb07c){_0xb8d3e5[_0x82dc('0x6f')]=_0x4bb07c[_0x82dc('0x69')]({'plain':!![]});interaction_log['info'](_0x82dc('0x70'),_0x287982[_0x82dc('0x66')]['id'],_0x287982['user'][_0x82dc('0x3b')],_0x287982[_0x82dc('0x66')][_0x82dc('0x71')],_0xb8d3e5[_0x82dc('0x6f')]['id'],_0x287982[_0x82dc('0x5e')]?JSON[_0x82dc('0x72')](_0x287982[_0x82dc('0x5e')]):'null');return respondWithRpcPromise('AcceptMessage',_0x82dc('0x73'),_0xb8d3e5);}return null;})[_0x82dc('0x38')](function(_0x4a04cf){return db[_0x82dc('0x67')][_0x82dc('0x5f')]()[_0x82dc('0x38')](function(_0x161594){var _0x42fb94=[];for(var _0x3e598d=0x0;_0x3e598d=_0x145fcd){_0x581bf2=_0x145fcd;_0xbf313a=0xc8;}else{_0xbf313a=0xce;}_0x5883b1['status'](_0xbf313a);return _0x5883b1[_0x4eb8('0x2d')](_0x4eb8('0x2e'),_0x4843e6+'-'+_0x581bf2+'/'+_0x145fcd)[_0x4eb8('0x29')](_0xd7203a);}return null;};}function patchUpdates(_0x1b4e3d){return function(_0x3d12fb){try{jsonpatch[_0x4eb8('0x2f')](_0x3d12fb,_0x1b4e3d,!![]);}catch(_0x4700a2){return BPromise['reject'](_0x4700a2);}return _0x3d12fb[_0x4eb8('0x30')]();};}function saveUpdates(_0x3c3866,_0x24e4fe){return function(_0x2eb29b){if(_0x2eb29b){return _0x2eb29b[_0x4eb8('0x31')](_0x3c3866)[_0x4eb8('0x32')](function(_0x162a76){return _0x162a76;});}return null;};}function removeEntity(_0x3f8739,_0x164be1){return function(_0x587651){if(_0x587651){return _0x587651[_0x4eb8('0x33')]()[_0x4eb8('0x32')](function(){_0x3f8739[_0x4eb8('0x28')](0xcc)[_0x4eb8('0x34')]();});}};}function handleEntityNotFound(_0x5ab2c0,_0x5b0f69){return function(_0x3b8d9c){if(!_0x3b8d9c){_0x5ab2c0['sendStatus'](0x194);}return _0x3b8d9c;};}function handleError(_0x517664,_0x5a6f22){_0x5a6f22=_0x5a6f22||0x1f4;return function(_0x55267c){logger[_0x4eb8('0x24')](_0x55267c[_0x4eb8('0x35')]);if(_0x55267c['name']){delete _0x55267c[_0x4eb8('0x36')];}_0x517664[_0x4eb8('0x28')](_0x5a6f22)[_0x4eb8('0x37')](_0x55267c);};}exports[_0x4eb8('0x38')]=function(_0x34fd66,_0x3fb5a7){var _0xdb4f51={},_0x5d751d={},_0x42bfdb={'count':0x0,'rows':[]};var _0x4f9af6=_[_0x4eb8('0x39')](db[_0x4eb8('0x3a')][_0x4eb8('0x3b')],function(_0x3a747f){return{'name':_0x3a747f[_0x4eb8('0x3c')],'type':_0x3a747f['type'][_0x4eb8('0x3d')]};});_0x5d751d['model']=_[_0x4eb8('0x39')](_0x4f9af6,_0x4eb8('0x36'));_0x5d751d[_0x4eb8('0x3e')]=_[_0x4eb8('0x3f')](_0x34fd66[_0x4eb8('0x3e')]);_0x5d751d[_0x4eb8('0x40')]=_[_0x4eb8('0x41')](_0x5d751d[_0x4eb8('0x42')],_0x5d751d['query']);_0xdb4f51[_0x4eb8('0x43')]=_['intersection'](_0x5d751d[_0x4eb8('0x42')],qs[_0x4eb8('0x44')](_0x34fd66[_0x4eb8('0x3e')][_0x4eb8('0x44')]));_0xdb4f51[_0x4eb8('0x43')]=_0xdb4f51[_0x4eb8('0x43')][_0x4eb8('0x45')]?_0xdb4f51[_0x4eb8('0x43')]:_0x5d751d[_0x4eb8('0x42')];if(!_0x34fd66[_0x4eb8('0x3e')]['hasOwnProperty'](_0x4eb8('0x46'))){_0xdb4f51[_0x4eb8('0x2a')]=qs[_0x4eb8('0x2a')](_0x34fd66[_0x4eb8('0x3e')]['limit']);_0xdb4f51[_0x4eb8('0x2c')]=qs[_0x4eb8('0x2c')](_0x34fd66[_0x4eb8('0x3e')]['offset']);}_0xdb4f51[_0x4eb8('0x47')]=qs[_0x4eb8('0x48')](_0x34fd66['query'][_0x4eb8('0x48')]);_0xdb4f51['where']=qs[_0x4eb8('0x40')](_[_0x4eb8('0x49')](_0x34fd66[_0x4eb8('0x3e')],_0x5d751d[_0x4eb8('0x40')]),_0x4f9af6);if(_0x34fd66['query'][_0x4eb8('0x4a')]){_0xdb4f51['where']=_[_0x4eb8('0x4b')](_0xdb4f51['where'],{'$or':_[_0x4eb8('0x39')](_0x4f9af6,function(_0x3eb952){if(_0x3eb952[_0x4eb8('0x4c')]!==_0x4eb8('0x4d')){var _0x66a94d={};_0x66a94d[_0x3eb952[_0x4eb8('0x36')]]={'$like':'%'+_0x34fd66[_0x4eb8('0x3e')]['filter']+'%'};return _0x66a94d;}})});}_0xdb4f51=_['merge']({},_0xdb4f51,_0x34fd66['options']);var _0x44e436={'where':_0xdb4f51['where']};return db['ChatMessage'][_0x4eb8('0x2b')](_0x44e436)[_0x4eb8('0x32')](function(_0x596176){_0x42bfdb[_0x4eb8('0x2b')]=_0x596176;if(_0x34fd66[_0x4eb8('0x3e')][_0x4eb8('0x4e')]){_0xdb4f51[_0x4eb8('0x4f')]=[{'all':!![]}];}return db[_0x4eb8('0x3a')][_0x4eb8('0x50')](_0xdb4f51);})[_0x4eb8('0x32')](function(_0x367577){_0x42bfdb[_0x4eb8('0x51')]=_0x367577;return _0x42bfdb;})[_0x4eb8('0x32')](respondWithFilteredResult(_0x3fb5a7,_0xdb4f51))[_0x4eb8('0x52')](handleError(_0x3fb5a7,null));};exports['show']=function(_0x51edc5,_0xc967fc){var _0x5c7669={'raw':!![],'where':{'id':_0x51edc5[_0x4eb8('0x53')]['id']}},_0x53e984={};_0x53e984[_0x4eb8('0x42')]=_['keys'](db['ChatMessage'][_0x4eb8('0x3b')]);_0x53e984['query']=_[_0x4eb8('0x3f')](_0x51edc5['query']);_0x53e984[_0x4eb8('0x40')]=_[_0x4eb8('0x41')](_0x53e984[_0x4eb8('0x42')],_0x53e984['query']);_0x5c7669['attributes']=_['intersection'](_0x53e984[_0x4eb8('0x42')],qs['fields'](_0x51edc5[_0x4eb8('0x3e')][_0x4eb8('0x44')]));_0x5c7669['attributes']=_0x5c7669[_0x4eb8('0x43')][_0x4eb8('0x45')]?_0x5c7669[_0x4eb8('0x43')]:_0x53e984[_0x4eb8('0x42')];if(_0x51edc5[_0x4eb8('0x3e')][_0x4eb8('0x4e')]){_0x5c7669[_0x4eb8('0x4f')]=[{'all':!![]}];}_0x5c7669=_[_0x4eb8('0x4b')]({},_0x5c7669,_0x51edc5[_0x4eb8('0x54')]);return db[_0x4eb8('0x3a')][_0x4eb8('0x55')](_0x5c7669)[_0x4eb8('0x32')](handleEntityNotFound(_0xc967fc,null))[_0x4eb8('0x32')](respondWithResult(_0xc967fc,null))[_0x4eb8('0x52')](handleError(_0xc967fc,null));};exports[_0x4eb8('0x56')]=function(_0x3015e1,_0xd12907){return db[_0x4eb8('0x3a')][_0x4eb8('0x56')](_0x3015e1[_0x4eb8('0x57')],{})[_0x4eb8('0x32')](respondWithResult(_0xd12907,0xc9))[_0x4eb8('0x52')](handleError(_0xd12907,null));};exports[_0x4eb8('0x31')]=function(_0x36d51b,_0x34ebb7){if(_0x36d51b['body']['id']){delete _0x36d51b['body']['id'];}return db[_0x4eb8('0x3a')][_0x4eb8('0x55')]({'where':{'id':_0x36d51b['params']['id']}})['then'](handleEntityNotFound(_0x34ebb7,null))[_0x4eb8('0x32')](saveUpdates(_0x36d51b[_0x4eb8('0x57')],null))[_0x4eb8('0x32')](respondWithResult(_0x34ebb7,null))[_0x4eb8('0x52')](handleError(_0x34ebb7,null));};exports['destroy']=function(_0xdb8fc8,_0x1d2bcc){return db[_0x4eb8('0x3a')]['find']({'where':{'id':_0xdb8fc8[_0x4eb8('0x53')]['id']}})[_0x4eb8('0x32')](handleEntityNotFound(_0x1d2bcc,null))[_0x4eb8('0x32')](removeEntity(_0x1d2bcc,null))[_0x4eb8('0x52')](handleError(_0x1d2bcc,null));};exports[_0x4eb8('0x58')]=function(_0x57bc96,_0x3056f1){return db[_0x4eb8('0x3a')]['describe']()[_0x4eb8('0x32')](respondWithResult(_0x3056f1,null))['catch'](handleError(_0x3056f1,null));};var interaction_log=require(_0x4eb8('0x14'))(_0x4eb8('0x59'));exports['accept']=function(_0x4c2776,_0x162665,_0x36ddc7){var _0x2e6c29={'agent':{},'channel':'chat'};if(_0x4c2776['body']['id']){delete _0x4c2776[_0x4eb8('0x57')]['id'];}_0x4c2776[_0x4eb8('0x57')]['read']=!![];_0x4c2776[_0x4eb8('0x57')][_0x4eb8('0x5a')]=moment()[_0x4eb8('0x5b')](_0x4eb8('0x5c'));_0x4c2776['body'][_0x4eb8('0x5d')]=_0x4c2776['body'][_0x4eb8('0x5d')]||_0x4c2776['user']['id'];_0x2e6c29[_0x4eb8('0x5e')]['id']=_0x4c2776[_0x4eb8('0x57')][_0x4eb8('0x5d')];return db[_0x4eb8('0x3a')][_0x4eb8('0x55')]({'where':{'id':_0x4c2776[_0x4eb8('0x53')]['id'],'UserId':null},'include':[{'model':db['CmContact'],'as':_0x4eb8('0x5f')}]})[_0x4eb8('0x32')](handleEntityNotFound(_0x162665,null))[_0x4eb8('0x32')](saveUpdates(_0x4c2776[_0x4eb8('0x57')],null))['then'](function(_0x765d58){if(_0x765d58){_0x2e6c29['message']=_0x765d58[_0x4eb8('0x60')]({'plain':!![]});return db['ChatInteraction']['find']({'where':{'id':_0x765d58[_0x4eb8('0x61')]}});}return null;})[_0x4eb8('0x32')](handleEntityNotFound(_0x162665,null))['then'](function(_0x4fe56b){if(_0x4fe56b){return _0x4fe56b[_0x4eb8('0x31')]({'UserId':_0x4c2776[_0x4eb8('0x57')][_0x4eb8('0x5d')],'read1stAt':_[_0x4eb8('0x62')](_0x4fe56b['read1stAt'])?moment()['format'](_0x4eb8('0x5c')):undefined});}return null;})[_0x4eb8('0x32')](function(_0x4de527){if(_0x4de527){_0x2e6c29['interaction']=_0x4de527[_0x4eb8('0x60')]({'plain':!![]});interaction_log[_0x4eb8('0x1f')]('[CHATMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x4c2776['user']['id'],_0x4c2776[_0x4eb8('0x63')]['name'],_0x4c2776[_0x4eb8('0x63')][_0x4eb8('0x64')],_0x2e6c29['interaction']['id'],_0x4c2776[_0x4eb8('0x57')]?JSON['stringify'](_0x4c2776[_0x4eb8('0x57')]):_0x4eb8('0x65'));return respondWithRpcPromise(_0x4eb8('0x66'),'acceptMessage',_0x2e6c29);}return null;})['then'](function(_0x3dbbba){return db[_0x4eb8('0x67')][_0x4eb8('0x58')]()['then'](function(_0x4c0b6b){var _0x1c32f4=[];for(var _0x53a6a1=0x0;_0x53a6a1=_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(_0xbb1df8,_0x576e28){var _0x3a2b06=function(_0xaa9ac8){while(--_0xaa9ac8){_0xbb1df8['push'](_0xbb1df8['shift']());}};_0x3a2b06(++_0x576e28);}(_0x9957,0x93));var _0x7995=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0x9957[_0x2dafbe];return _0x58a45a;};'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.model.js b/server/api/chatOfflineMessage/chatOfflineMessage.model.js index 94c0567..581cc2f 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 _0xacb1=['chat_offline_messages','utf8mb4','utf8mb4_unicode_ci','lodash','api','moment','request-promise','../../config/environment','ChatOfflineMessage'];(function(_0xe8cff9,_0x315da4){var _0x52b551=function(_0x24f495){while(--_0x24f495){_0xe8cff9['push'](_0xe8cff9['shift']());}};_0x52b551(++_0x315da4);}(_0xacb1,0x108));var _0x1acb=function(_0x3c0af0,_0x4da75f){_0x3c0af0=_0x3c0af0-0x0;var _0xeaa59f=_0xacb1[_0x3c0af0];return _0xeaa59f;};'use strict';var _=require(_0x1acb('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x1acb('0x1'));var moment=require(_0x1acb('0x2'));var BPromise=require('bluebird');var rp=require(_0x1acb('0x3'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x1acb('0x4'));var attributes=require('./chatOfflineMessage.attributes');module['exports']=function(_0x401cc1,_0x3000b4){return _0x401cc1['define'](_0x1acb('0x5'),attributes,{'tableName':_0x1acb('0x6'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x1acb('0x7'),'collate':_0x1acb('0x8')});}; \ No newline at end of file +var _0x87d2=['chat_offline_messages','utf8mb4','utf8mb4_unicode_ci','lodash','../../config/logger','moment','request-promise','path','../../config/environment','./chatOfflineMessage.attributes','exports'];(function(_0x31071c,_0x14e192){var _0x39693a=function(_0x14f2da){while(--_0x14f2da){_0x31071c['push'](_0x31071c['shift']());}};_0x39693a(++_0x14e192);}(_0x87d2,0x1e7));var _0x287d=function(_0x326610,_0x5d079a){_0x326610=_0x326610-0x0;var _0x4347b3=_0x87d2[_0x326610];return _0x4347b3;};'use strict';var _=require(_0x287d('0x0'));var util=require('util');var logger=require(_0x287d('0x1'))('api');var moment=require(_0x287d('0x2'));var BPromise=require('bluebird');var rp=require(_0x287d('0x3'));var fs=require('fs');var path=require(_0x287d('0x4'));var rimraf=require('rimraf');var config=require(_0x287d('0x5'));var attributes=require(_0x287d('0x6'));module[_0x287d('0x7')]=function(_0x538dec,_0x59afd5){return _0x538dec['define']('ChatOfflineMessage',attributes,{'tableName':_0x287d('0x8'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x287d('0x9'),'collate':_0x287d('0xa')});}; \ No newline at end of file diff --git a/server/api/chatOfflineMessage/chatOfflineMessage.rpc.js b/server/api/chatOfflineMessage/chatOfflineMessage.rpc.js index d9c2b71..84a7cd9 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 _0xceb1=['result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','info','ChatOfflineMessage,\x20%s,\x20%s','ChatOfflineMessage,\x20%s,\x20%s,\x20%s','error','message','request\x20sent'];(function(_0x59162a,_0x10e547){var _0x35e50d=function(_0x578425){while(--_0x578425){_0x59162a['push'](_0x59162a['shift']());}};_0x35e50d(++_0x10e547);}(_0xceb1,0x10a));var _0x1ceb=function(_0x26a196,_0x30eda2){_0x26a196=_0x26a196-0x0;var _0x396e65=_0xceb1[_0x26a196];return _0x396e65;};'use strict';var _=require(_0x1ceb('0x0'));var util=require(_0x1ceb('0x1'));var moment=require(_0x1ceb('0x2'));var BPromise=require(_0x1ceb('0x3'));var rs=require(_0x1ceb('0x4'));var fs=require('fs');var Redis=require(_0x1ceb('0x5'));var db=require(_0x1ceb('0x6'))['db'];var utils=require(_0x1ceb('0x7'));var logger=require(_0x1ceb('0x8'))(_0x1ceb('0x9'));var config=require(_0x1ceb('0xa'));var jayson=require(_0x1ceb('0xb'));var client=jayson[_0x1ceb('0xc')][_0x1ceb('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x2c60e1,_0x326a2d,_0x3b18e3){return new BPromise(function(_0x209bd0,_0x540cf3){return client['request'](_0x2c60e1,_0x3b18e3)['then'](function(_0x3ea233){logger[_0x1ceb('0xe')](_0x1ceb('0xf'),_0x326a2d,'request\x20sent');logger['debug'](_0x1ceb('0x10'),_0x326a2d,'request\x20sent',JSON['stringify'](_0x3ea233));if(_0x3ea233[_0x1ceb('0x11')]){if(_0x3ea233['error']['code']===0x1f4){logger[_0x1ceb('0x11')](_0x1ceb('0xf'),_0x326a2d,_0x3ea233[_0x1ceb('0x11')][_0x1ceb('0x12')]);return _0x540cf3(_0x3ea233[_0x1ceb('0x11')][_0x1ceb('0x12')]);}logger[_0x1ceb('0x11')]('ChatOfflineMessage,\x20%s,\x20%s',_0x326a2d,_0x3ea233[_0x1ceb('0x11')][_0x1ceb('0x12')]);return _0x209bd0(_0x3ea233[_0x1ceb('0x11')][_0x1ceb('0x12')]);}else{logger[_0x1ceb('0xe')]('ChatOfflineMessage,\x20%s,\x20%s',_0x326a2d,_0x1ceb('0x13'));_0x209bd0(_0x3ea233[_0x1ceb('0x14')]['message']);}})[_0x1ceb('0x15')](function(_0x1236f4){logger[_0x1ceb('0x11')]('ChatOfflineMessage,\x20%s,\x20%s',_0x326a2d,_0x1236f4);_0x540cf3(_0x1236f4);});});} \ No newline at end of file +var _0x3568=['stringify','error','message','result','catch','lodash','util','bluebird','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment','client','http','request','info','ChatOfflineMessage,\x20%s,\x20%s','request\x20sent','debug','ChatOfflineMessage,\x20%s,\x20%s,\x20%s'];(function(_0x2b34f5,_0x2ff401){var _0x31a5b6=function(_0x37727b){while(--_0x37727b){_0x2b34f5['push'](_0x2b34f5['shift']());}};_0x31a5b6(++_0x2ff401);}(_0x3568,0xc2));var _0x8356=function(_0x140374,_0x1912fc){_0x140374=_0x140374-0x0;var _0x2d605a=_0x3568[_0x140374];return _0x2d605a;};'use strict';var _=require(_0x8356('0x0'));var util=require(_0x8356('0x1'));var moment=require('moment');var BPromise=require(_0x8356('0x2'));var rs=require(_0x8356('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x8356('0x4'))['db'];var utils=require(_0x8356('0x5'));var logger=require('../../config/logger')(_0x8356('0x6'));var config=require(_0x8356('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x8356('0x8')][_0x8356('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x40b996,_0x5173db,_0x24494c){return new BPromise(function(_0x4ec2f1,_0x30fa9c){return client[_0x8356('0xa')](_0x40b996,_0x24494c)['then'](function(_0x48ba0a){logger[_0x8356('0xb')](_0x8356('0xc'),_0x5173db,_0x8356('0xd'));logger[_0x8356('0xe')](_0x8356('0xf'),_0x5173db,_0x8356('0xd'),JSON[_0x8356('0x10')](_0x48ba0a));if(_0x48ba0a[_0x8356('0x11')]){if(_0x48ba0a['error']['code']===0x1f4){logger[_0x8356('0x11')](_0x8356('0xc'),_0x5173db,_0x48ba0a['error']['message']);return _0x30fa9c(_0x48ba0a[_0x8356('0x11')][_0x8356('0x12')]);}logger[_0x8356('0x11')]('ChatOfflineMessage,\x20%s,\x20%s',_0x5173db,_0x48ba0a[_0x8356('0x11')]['message']);return _0x4ec2f1(_0x48ba0a['error']['message']);}else{logger[_0x8356('0xb')]('ChatOfflineMessage,\x20%s,\x20%s',_0x5173db,_0x8356('0xd'));_0x4ec2f1(_0x48ba0a[_0x8356('0x13')][_0x8356('0x12')]);}})[_0x8356('0x14')](function(_0x9b47ad){logger[_0x8356('0x11')](_0x8356('0xc'),_0x5173db,_0x9b47ad);_0x30fa9c(_0x9b47ad);});});} \ No newline at end of file diff --git a/server/api/chatOfflineMessage/index.js b/server/api/chatOfflineMessage/index.js index 70c957d..e7470fc 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 _0x6e97=['fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','describe','/:id','post','create','put','update','delete','destroy','exports','multer','path','connect-timeout','express'];(function(_0x351fe2,_0x1afed8){var _0x19d900=function(_0x6523aa){while(--_0x6523aa){_0x351fe2['push'](_0x351fe2['shift']());}};_0x19d900(++_0x1afed8);}(_0x6e97,0x178));var _0x76e9=function(_0xd584f6,_0x34cfe6){_0xd584f6=_0xd584f6-0x0;var _0x5ec250=_0x6e97[_0xd584f6];return _0x5ec250;};'use strict';var multer=require(_0x76e9('0x0'));var util=require('util');var path=require(_0x76e9('0x1'));var timeout=require(_0x76e9('0x2'));var express=require(_0x76e9('0x3'));var router=express['Router']();var fs_extra=require(_0x76e9('0x4'));var auth=require(_0x76e9('0x5'));var interaction=require(_0x76e9('0x6'));var config=require(_0x76e9('0x7'));var controller=require('./chatOfflineMessage.controller');router[_0x76e9('0x8')]('/',auth[_0x76e9('0x9')](),controller[_0x76e9('0xa')]);router['get']('/describe',auth[_0x76e9('0x9')](),controller[_0x76e9('0xb')]);router[_0x76e9('0x8')](_0x76e9('0xc'),auth[_0x76e9('0x9')](),controller['show']);router[_0x76e9('0xd')]('/',auth['isAuthenticated'](),controller[_0x76e9('0xe')]);router[_0x76e9('0xf')](_0x76e9('0xc'),auth[_0x76e9('0x9')](),controller[_0x76e9('0x10')]);router[_0x76e9('0x11')](_0x76e9('0xc'),auth['isAuthenticated'](),controller[_0x76e9('0x12')]);module[_0x76e9('0x13')]=router; \ No newline at end of file +var _0xae79=['describe','/:id','show','post','create','update','delete','destroy','exports','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','get','/describe','isAuthenticated'];(function(_0x19c757,_0x240152){var _0x2153c0=function(_0x1dd73e){while(--_0x1dd73e){_0x19c757['push'](_0x19c757['shift']());}};_0x2153c0(++_0x240152);}(_0xae79,0xc7));var _0x9ae7=function(_0x5c8d10,_0x1ab90a){_0x5c8d10=_0x5c8d10-0x0;var _0x447d4f=_0xae79[_0x5c8d10];return _0x447d4f;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x9ae7('0x0'));var timeout=require(_0x9ae7('0x1'));var express=require(_0x9ae7('0x2'));var router=express[_0x9ae7('0x3')]();var fs_extra=require(_0x9ae7('0x4'));var auth=require(_0x9ae7('0x5'));var interaction=require(_0x9ae7('0x6'));var config=require('../../config/environment');var controller=require('./chatOfflineMessage.controller');router[_0x9ae7('0x7')]('/',auth['isAuthenticated'](),controller['index']);router['get'](_0x9ae7('0x8'),auth[_0x9ae7('0x9')](),controller[_0x9ae7('0xa')]);router[_0x9ae7('0x7')](_0x9ae7('0xb'),auth['isAuthenticated'](),controller[_0x9ae7('0xc')]);router[_0x9ae7('0xd')]('/',auth[_0x9ae7('0x9')](),controller[_0x9ae7('0xe')]);router['put'](_0x9ae7('0xb'),auth[_0x9ae7('0x9')](),controller[_0x9ae7('0xf')]);router[_0x9ae7('0x10')](_0x9ae7('0xb'),auth[_0x9ae7('0x9')](),controller[_0x9ae7('0x11')]);module[_0x9ae7('0x12')]=router; \ No newline at end of file diff --git a/server/api/chatProactiveAction/chatProactiveAction.attributes.js b/server/api/chatProactiveAction/chatProactiveAction.attributes.js index 758f197..f5f4f36 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 _0x0294=['mouseOver','INTEGER','exports','STRING','ENUM'];(function(_0x3e5086,_0x48f4a2){var _0xfeb102=function(_0x5a945f){while(--_0x5a945f){_0x3e5086['push'](_0x3e5086['shift']());}};_0xfeb102(++_0x48f4a2);}(_0x0294,0x1b0));var _0x4029=function(_0x149902,_0x544173){_0x149902=_0x149902-0x0;var _0x5a41a0=_0x0294[_0x149902];return _0x5a41a0;};'use strict';var Sequelize=require('sequelize');module[_0x4029('0x0')]={'name':{'type':Sequelize[_0x4029('0x1')],'allowNull':![]},'type':{'type':Sequelize[_0x4029('0x2')](_0x4029('0x3'),'timeout'),'defaultValue':'mouseOver'},'selector':{'type':Sequelize['STRING']},'timeout':{'type':Sequelize[_0x4029('0x4')]}}; \ No newline at end of file +var _0x6835=['exports','STRING','mouseOver','timeout','INTEGER','sequelize'];(function(_0x10a210,_0x1d317){var _0x450c5f=function(_0xf41f8c){while(--_0xf41f8c){_0x10a210['push'](_0x10a210['shift']());}};_0x450c5f(++_0x1d317);}(_0x6835,0x1eb));var _0x5683=function(_0x3ffa76,_0x23bdc0){_0x3ffa76=_0x3ffa76-0x0;var _0x4d88e6=_0x6835[_0x3ffa76];return _0x4d88e6;};'use strict';var Sequelize=require(_0x5683('0x0'));module[_0x5683('0x1')]={'name':{'type':Sequelize[_0x5683('0x2')],'allowNull':![]},'type':{'type':Sequelize['ENUM'](_0x5683('0x3'),_0x5683('0x4')),'defaultValue':_0x5683('0x3')},'selector':{'type':Sequelize[_0x5683('0x2')]},'timeout':{'type':Sequelize[_0x5683('0x5')]}}; \ No newline at end of file diff --git a/server/api/chatProactiveAction/chatProactiveAction.controller.js b/server/api/chatProactiveAction/chatProactiveAction.controller.js index b2e5150..76bb2bf 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 _0xf8de=['../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','then','destroy','end','error','name','send','show','params','keys','ChatProactiveAction','rawAttributes','query','filters','intersection','attributes','model','fields','length','include','options','find','catch','create','body','update','rimraf','zip-dir','request-promise','bluebird','mustache','util','sox','to-csv','fs-extra','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api'];(function(_0x385696,_0x417af1){var _0x477656=function(_0x1d3006){while(--_0x1d3006){_0x385696['push'](_0x385696['shift']());}};_0x477656(++_0x417af1);}(_0xf8de,0x1d4));var _0xef8d=function(_0x3cffaa,_0x5b68ae){_0x3cffaa=_0x3cffaa-0x0;var _0x218cd5=_0xf8de[_0x3cffaa];return _0x218cd5;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xef8d('0x0'));var zipdir=require(_0xef8d('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0xef8d('0x2'));var moment=require('moment');var BPromise=require(_0xef8d('0x3'));var Mustache=require(_0xef8d('0x4'));var util=require(_0xef8d('0x5'));var path=require('path');var sox=require(_0xef8d('0x6'));var csv=require(_0xef8d('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xef8d('0x8'));var _=require('lodash');var squel=require('squel');var crypto=require(_0xef8d('0x9'));var jsforce=require(_0xef8d('0xa'));var deskjs=require(_0xef8d('0xb'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xef8d('0xc'));var Redis=require(_0xef8d('0xd'));var authService=require(_0xef8d('0xe'));var qs=require(_0xef8d('0xf'));var as=require(_0xef8d('0x10'));var hardwareService=require(_0xef8d('0x11'));var logger=require(_0xef8d('0x12'))(_0xef8d('0x13'));var utils=require(_0xef8d('0x14'));var config=require(_0xef8d('0x15'));var licenseUtil=require(_0xef8d('0x16'));var db=require(_0xef8d('0x17'))['db'];function respondWithStatusCode(_0xf48324,_0x241e49){_0x241e49=_0x241e49||0xcc;return function(_0x1ec029){if(_0x1ec029){return _0xf48324[_0xef8d('0x18')](_0x241e49);}return _0xf48324['status'](_0x241e49)['end']();};}function respondWithResult(_0x3d306f,_0x58879c){_0x58879c=_0x58879c||0xc8;return function(_0x309135){if(_0x309135){return _0x3d306f[_0xef8d('0x19')](_0x58879c)[_0xef8d('0x1a')](_0x309135);}};}function respondWithFilteredResult(_0xc42005,_0x54ee0e){return function(_0x594012){if(_0x594012){var _0x40fd5a=typeof _0x54ee0e[_0xef8d('0x1b')]===_0xef8d('0x1c')&&typeof _0x54ee0e[_0xef8d('0x1d')]===_0xef8d('0x1c');var _0x595fe8=_0x594012[_0xef8d('0x1e')];var _0x3b68b9=_0x40fd5a?0x0:_0x54ee0e[_0xef8d('0x1b')];var _0x3c8d1f=_0x40fd5a?_0x594012[_0xef8d('0x1e')]:_0x54ee0e[_0xef8d('0x1b')]+_0x54ee0e['limit'];var _0xff325b;if(_0x3c8d1f>=_0x595fe8){_0x3c8d1f=_0x595fe8;_0xff325b=0xc8;}else{_0xff325b=0xce;}_0xc42005[_0xef8d('0x19')](_0xff325b);return _0xc42005[_0xef8d('0x1f')](_0xef8d('0x20'),_0x3b68b9+'-'+_0x3c8d1f+'/'+_0x595fe8)[_0xef8d('0x1a')](_0x594012);}return null;};}function patchUpdates(_0x586168){return function(_0x2deb31){try{jsonpatch[_0xef8d('0x21')](_0x2deb31,_0x586168,!![]);}catch(_0x369c3e){return BPromise[_0xef8d('0x22')](_0x369c3e);}return _0x2deb31[_0xef8d('0x23')]();};}function saveUpdates(_0x59c271,_0x18de6d){return function(_0x5629e8){if(_0x5629e8){return _0x5629e8['update'](_0x59c271)[_0xef8d('0x24')](function(_0x526ba9){return _0x526ba9;});}return null;};}function removeEntity(_0x43cf28,_0xe77713){return function(_0x330c0e){if(_0x330c0e){return _0x330c0e[_0xef8d('0x25')]()[_0xef8d('0x24')](function(){_0x43cf28['status'](0xcc)[_0xef8d('0x26')]();});}};}function handleEntityNotFound(_0x547f5f,_0x3be995){return function(_0x221488){if(!_0x221488){_0x547f5f[_0xef8d('0x18')](0x194);}return _0x221488;};}function handleError(_0x7393ce,_0x2941fc){_0x2941fc=_0x2941fc||0x1f4;return function(_0x598521){logger[_0xef8d('0x27')](_0x598521['stack']);if(_0x598521[_0xef8d('0x28')]){delete _0x598521[_0xef8d('0x28')];}_0x7393ce[_0xef8d('0x19')](_0x2941fc)[_0xef8d('0x29')](_0x598521);};}exports[_0xef8d('0x2a')]=function(_0xda8b25,_0x355dc1){var _0x408c3a={'raw':!![],'where':{'id':_0xda8b25[_0xef8d('0x2b')]['id']}},_0x27e1c9={};_0x27e1c9['model']=_[_0xef8d('0x2c')](db[_0xef8d('0x2d')][_0xef8d('0x2e')]);_0x27e1c9[_0xef8d('0x2f')]=_[_0xef8d('0x2c')](_0xda8b25['query']);_0x27e1c9[_0xef8d('0x30')]=_[_0xef8d('0x31')](_0x27e1c9['model'],_0x27e1c9[_0xef8d('0x2f')]);_0x408c3a[_0xef8d('0x32')]=_['intersection'](_0x27e1c9[_0xef8d('0x33')],qs[_0xef8d('0x34')](_0xda8b25['query']['fields']));_0x408c3a[_0xef8d('0x32')]=_0x408c3a[_0xef8d('0x32')][_0xef8d('0x35')]?_0x408c3a[_0xef8d('0x32')]:_0x27e1c9['model'];if(_0xda8b25['query']['includeAll']){_0x408c3a[_0xef8d('0x36')]=[{'all':!![]}];}_0x408c3a=_['merge']({},_0x408c3a,_0xda8b25[_0xef8d('0x37')]);return db['ChatProactiveAction'][_0xef8d('0x38')](_0x408c3a)[_0xef8d('0x24')](handleEntityNotFound(_0x355dc1,null))[_0xef8d('0x24')](respondWithResult(_0x355dc1,null))[_0xef8d('0x39')](handleError(_0x355dc1,null));};exports[_0xef8d('0x3a')]=function(_0x55d441,_0x246878){return db[_0xef8d('0x2d')]['create'](_0x55d441[_0xef8d('0x3b')],{})[_0xef8d('0x24')](respondWithResult(_0x246878,0xc9))[_0xef8d('0x39')](handleError(_0x246878,null));};exports[_0xef8d('0x3c')]=function(_0xd49425,_0x39b36a){if(_0xd49425[_0xef8d('0x3b')]['id']){delete _0xd49425[_0xef8d('0x3b')]['id'];}return db[_0xef8d('0x2d')]['find']({'where':{'id':_0xd49425[_0xef8d('0x2b')]['id']}})[_0xef8d('0x24')](handleEntityNotFound(_0x39b36a,null))[_0xef8d('0x24')](saveUpdates(_0xd49425[_0xef8d('0x3b')],null))[_0xef8d('0x24')](respondWithResult(_0x39b36a,null))['catch'](handleError(_0x39b36a,null));};exports[_0xef8d('0x25')]=function(_0x17271d,_0x3bf4fd){return db[_0xef8d('0x2d')][_0xef8d('0x38')]({'where':{'id':_0x17271d[_0xef8d('0x2b')]['id']}})[_0xef8d('0x24')](handleEntityNotFound(_0x3bf4fd,null))[_0xef8d('0x24')](removeEntity(_0x3bf4fd,null))[_0xef8d('0x39')](handleError(_0x3bf4fd,null));}; \ No newline at end of file +var _0x6bff=['../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/license/util','../../mysqldb','sendStatus','end','status','offset','undefined','count','limit','set','Content-Range','json','apply','reject','save','destroy','then','error','name','send','show','keys','ChatProactiveAction','rawAttributes','query','filters','intersection','model','attributes','fields','length','includeAll','merge','options','find','catch','create','body','params','eml-format','rimraf','fast-json-patch','moment','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','papaparse','ioredis'];(function(_0x367995,_0x129ae2){var _0x22daa8=function(_0x4a2ceb){while(--_0x4a2ceb){_0x367995['push'](_0x367995['shift']());}};_0x22daa8(++_0x129ae2);}(_0x6bff,0xa6));var _0xf6bf=function(_0x2fde7f,_0x2b6229){_0x2fde7f=_0x2fde7f-0x0;var _0x49081a=_0x6bff[_0x2fde7f];return _0x49081a;};'use strict';var emlformat=require(_0xf6bf('0x0'));var rimraf=require(_0xf6bf('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xf6bf('0x2'));var rp=require('request-promise');var moment=require(_0xf6bf('0x3'));var BPromise=require(_0xf6bf('0x4'));var Mustache=require(_0xf6bf('0x5'));var util=require(_0xf6bf('0x6'));var path=require('path');var sox=require(_0xf6bf('0x7'));var csv=require(_0xf6bf('0x8'));var ejs=require(_0xf6bf('0x9'));var fs=require('fs');var fs_extra=require(_0xf6bf('0xa'));var _=require(_0xf6bf('0xb'));var squel=require(_0xf6bf('0xc'));var crypto=require(_0xf6bf('0xd'));var jsforce=require(_0xf6bf('0xe'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xf6bf('0xf'));var Redis=require(_0xf6bf('0x10'));var authService=require(_0xf6bf('0x11'));var qs=require(_0xf6bf('0x12'));var as=require(_0xf6bf('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xf6bf('0x14'))(_0xf6bf('0x15'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0xf6bf('0x16'));var db=require(_0xf6bf('0x17'))['db'];function respondWithStatusCode(_0x4cc0bb,_0xd70950){_0xd70950=_0xd70950||0xcc;return function(_0x5912c1){if(_0x5912c1){return _0x4cc0bb[_0xf6bf('0x18')](_0xd70950);}return _0x4cc0bb['status'](_0xd70950)[_0xf6bf('0x19')]();};}function respondWithResult(_0xe60979,_0x4aad38){_0x4aad38=_0x4aad38||0xc8;return function(_0x48c90b){if(_0x48c90b){return _0xe60979[_0xf6bf('0x1a')](_0x4aad38)['json'](_0x48c90b);}};}function respondWithFilteredResult(_0xe55dd5,_0x18c11c){return function(_0xdc115f){if(_0xdc115f){var _0x436341=typeof _0x18c11c[_0xf6bf('0x1b')]===_0xf6bf('0x1c')&&typeof _0x18c11c['limit']===_0xf6bf('0x1c');var _0x3608bf=_0xdc115f[_0xf6bf('0x1d')];var _0x31db87=_0x436341?0x0:_0x18c11c['offset'];var _0x377b96=_0x436341?_0xdc115f[_0xf6bf('0x1d')]:_0x18c11c[_0xf6bf('0x1b')]+_0x18c11c[_0xf6bf('0x1e')];var _0x2595a7;if(_0x377b96>=_0x3608bf){_0x377b96=_0x3608bf;_0x2595a7=0xc8;}else{_0x2595a7=0xce;}_0xe55dd5['status'](_0x2595a7);return _0xe55dd5[_0xf6bf('0x1f')](_0xf6bf('0x20'),_0x31db87+'-'+_0x377b96+'/'+_0x3608bf)[_0xf6bf('0x21')](_0xdc115f);}return null;};}function patchUpdates(_0xf7da6a){return function(_0x2b41b1){try{jsonpatch[_0xf6bf('0x22')](_0x2b41b1,_0xf7da6a,!![]);}catch(_0x3b4a5d){return BPromise[_0xf6bf('0x23')](_0x3b4a5d);}return _0x2b41b1[_0xf6bf('0x24')]();};}function saveUpdates(_0x2c8041,_0x34fbf4){return function(_0x1fa630){if(_0x1fa630){return _0x1fa630['update'](_0x2c8041)['then'](function(_0x21113e){return _0x21113e;});}return null;};}function removeEntity(_0x40475f,_0x5c35bf){return function(_0x29efc5){if(_0x29efc5){return _0x29efc5[_0xf6bf('0x25')]()[_0xf6bf('0x26')](function(){_0x40475f['status'](0xcc)[_0xf6bf('0x19')]();});}};}function handleEntityNotFound(_0x1272f3,_0x1a6d2c){return function(_0x751b31){if(!_0x751b31){_0x1272f3[_0xf6bf('0x18')](0x194);}return _0x751b31;};}function handleError(_0x13e905,_0xa35136){_0xa35136=_0xa35136||0x1f4;return function(_0x5c9a70){logger[_0xf6bf('0x27')](_0x5c9a70['stack']);if(_0x5c9a70[_0xf6bf('0x28')]){delete _0x5c9a70[_0xf6bf('0x28')];}_0x13e905[_0xf6bf('0x1a')](_0xa35136)[_0xf6bf('0x29')](_0x5c9a70);};}exports[_0xf6bf('0x2a')]=function(_0x53d3c7,_0xe3ffb1){var _0x3efe8c={'raw':!![],'where':{'id':_0x53d3c7['params']['id']}},_0x2b3600={};_0x2b3600['model']=_[_0xf6bf('0x2b')](db[_0xf6bf('0x2c')][_0xf6bf('0x2d')]);_0x2b3600[_0xf6bf('0x2e')]=_[_0xf6bf('0x2b')](_0x53d3c7[_0xf6bf('0x2e')]);_0x2b3600[_0xf6bf('0x2f')]=_[_0xf6bf('0x30')](_0x2b3600[_0xf6bf('0x31')],_0x2b3600[_0xf6bf('0x2e')]);_0x3efe8c[_0xf6bf('0x32')]=_[_0xf6bf('0x30')](_0x2b3600[_0xf6bf('0x31')],qs[_0xf6bf('0x33')](_0x53d3c7[_0xf6bf('0x2e')][_0xf6bf('0x33')]));_0x3efe8c['attributes']=_0x3efe8c[_0xf6bf('0x32')][_0xf6bf('0x34')]?_0x3efe8c['attributes']:_0x2b3600['model'];if(_0x53d3c7[_0xf6bf('0x2e')][_0xf6bf('0x35')]){_0x3efe8c['include']=[{'all':!![]}];}_0x3efe8c=_[_0xf6bf('0x36')]({},_0x3efe8c,_0x53d3c7[_0xf6bf('0x37')]);return db[_0xf6bf('0x2c')][_0xf6bf('0x38')](_0x3efe8c)[_0xf6bf('0x26')](handleEntityNotFound(_0xe3ffb1,null))[_0xf6bf('0x26')](respondWithResult(_0xe3ffb1,null))[_0xf6bf('0x39')](handleError(_0xe3ffb1,null));};exports[_0xf6bf('0x3a')]=function(_0x238c8c,_0x2d6531){return db[_0xf6bf('0x2c')][_0xf6bf('0x3a')](_0x238c8c['body'],{})['then'](respondWithResult(_0x2d6531,0xc9))['catch'](handleError(_0x2d6531,null));};exports['update']=function(_0x554f4b,_0x3b5238){if(_0x554f4b[_0xf6bf('0x3b')]['id']){delete _0x554f4b[_0xf6bf('0x3b')]['id'];}return db['ChatProactiveAction'][_0xf6bf('0x38')]({'where':{'id':_0x554f4b[_0xf6bf('0x3c')]['id']}})[_0xf6bf('0x26')](handleEntityNotFound(_0x3b5238,null))['then'](saveUpdates(_0x554f4b[_0xf6bf('0x3b')],null))[_0xf6bf('0x26')](respondWithResult(_0x3b5238,null))[_0xf6bf('0x39')](handleError(_0x3b5238,null));};exports[_0xf6bf('0x25')]=function(_0x433280,_0x5cc392){return db[_0xf6bf('0x2c')][_0xf6bf('0x38')]({'where':{'id':_0x433280['params']['id']}})[_0xf6bf('0x26')](handleEntityNotFound(_0x5cc392,null))[_0xf6bf('0x26')](removeEntity(_0x5cc392,null))[_0xf6bf('0x39')](handleError(_0x5cc392,null));}; \ No newline at end of file diff --git a/server/api/chatProactiveAction/chatProactiveAction.model.js b/server/api/chatProactiveAction/chatProactiveAction.model.js index d18f421..640775e 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 _0x362d=['../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','./chatProactiveAction.attributes','exports','ChatProactiveAction','lodash','util'];(function(_0x3efa4d,_0xb6beb8){var _0x18b2d6=function(_0x36b9c7){while(--_0x36b9c7){_0x3efa4d['push'](_0x3efa4d['shift']());}};_0x18b2d6(++_0xb6beb8);}(_0x362d,0x14e));var _0xd362=function(_0x48188f,_0x2169e0){_0x48188f=_0x48188f-0x0;var _0x4cd507=_0x362d[_0x48188f];return _0x4cd507;};'use strict';var _=require(_0xd362('0x0'));var util=require(_0xd362('0x1'));var logger=require(_0xd362('0x2'))(_0xd362('0x3'));var moment=require(_0xd362('0x4'));var BPromise=require(_0xd362('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xd362('0x6'));var rimraf=require(_0xd362('0x7'));var config=require(_0xd362('0x8'));var attributes=require(_0xd362('0x9'));module[_0xd362('0xa')]=function(_0xd4e064,_0x1ec67c){return _0xd4e064['define'](_0xd362('0xb'),attributes,{'tableName':'chat_proactive_actions','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xba02=['util','../../config/logger','api','request-promise','path','rimraf','../../config/environment','./chatProactiveAction.attributes','define','ChatProactiveAction','chat_proactive_actions','lodash'];(function(_0x3c4737,_0x2329ec){var _0x2bb926=function(_0x3b9605){while(--_0x3b9605){_0x3c4737['push'](_0x3c4737['shift']());}};_0x2bb926(++_0x2329ec);}(_0xba02,0x197));var _0x2ba0=function(_0x2f45ea,_0x15c656){_0x2f45ea=_0x2f45ea-0x0;var _0x485a84=_0xba02[_0x2f45ea];return _0x485a84;};'use strict';var _=require(_0x2ba0('0x0'));var util=require(_0x2ba0('0x1'));var logger=require(_0x2ba0('0x2'))(_0x2ba0('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x2ba0('0x4'));var fs=require('fs');var path=require(_0x2ba0('0x5'));var rimraf=require(_0x2ba0('0x6'));var config=require(_0x2ba0('0x7'));var attributes=require(_0x2ba0('0x8'));module['exports']=function(_0x4e6eea,_0x3f3b38){return _0x4e6eea[_0x2ba0('0x9')](_0x2ba0('0xa'),attributes,{'tableName':_0x2ba0('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 6585289..2c3a2e5 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 _0x597c=['request\x20sent','debug','ChatProactiveAction,\x20%s,\x20%s,\x20%s','stringify','error','code','message','ChatProactiveAction,\x20%s,\x20%s','info','result','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','jayson/promise','client','request','then'];(function(_0x307086,_0x3bfe4e){var _0x699043=function(_0x1a7677){while(--_0x1a7677){_0x307086['push'](_0x307086['shift']());}};_0x699043(++_0x3bfe4e);}(_0x597c,0x95));var _0xc597=function(_0x5d0a23,_0xafa501){_0x5d0a23=_0x5d0a23-0x0;var _0x17cba6=_0x597c[_0x5d0a23];return _0x17cba6;};'use strict';var _=require(_0xc597('0x0'));var util=require(_0xc597('0x1'));var moment=require('moment');var BPromise=require(_0xc597('0x2'));var rs=require(_0xc597('0x3'));var fs=require('fs');var Redis=require(_0xc597('0x4'));var db=require(_0xc597('0x5'))['db'];var utils=require(_0xc597('0x6'));var logger=require('../../config/logger')(_0xc597('0x7'));var config=require('../../config/environment');var jayson=require(_0xc597('0x8'));var client=jayson[_0xc597('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x2f4316,_0x38bd09,_0x27f9e2){return new BPromise(function(_0x4b7a9c,_0x35dc40){return client[_0xc597('0xa')](_0x2f4316,_0x27f9e2)[_0xc597('0xb')](function(_0x3d70c2){logger['info']('ChatProactiveAction,\x20%s,\x20%s',_0x38bd09,_0xc597('0xc'));logger[_0xc597('0xd')](_0xc597('0xe'),_0x38bd09,_0xc597('0xc'),JSON[_0xc597('0xf')](_0x3d70c2));if(_0x3d70c2['error']){if(_0x3d70c2[_0xc597('0x10')][_0xc597('0x11')]===0x1f4){logger[_0xc597('0x10')]('ChatProactiveAction,\x20%s,\x20%s',_0x38bd09,_0x3d70c2[_0xc597('0x10')][_0xc597('0x12')]);return _0x35dc40(_0x3d70c2['error'][_0xc597('0x12')]);}logger[_0xc597('0x10')](_0xc597('0x13'),_0x38bd09,_0x3d70c2['error'][_0xc597('0x12')]);return _0x4b7a9c(_0x3d70c2[_0xc597('0x10')][_0xc597('0x12')]);}else{logger[_0xc597('0x14')]('ChatProactiveAction,\x20%s,\x20%s',_0x38bd09,_0xc597('0xc'));_0x4b7a9c(_0x3d70c2[_0xc597('0x15')][_0xc597('0x12')]);}})[_0xc597('0x16')](function(_0x5a3e2e){logger['error'](_0xc597('0x13'),_0x38bd09,_0x5a3e2e);_0x35dc40(_0x5a3e2e);});});} \ No newline at end of file +var _0xdf09=['http','request','info','request\x20sent','ChatProactiveAction,\x20%s,\x20%s,\x20%s','stringify','error','message','ChatProactiveAction,\x20%s,\x20%s','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise'];(function(_0x48c560,_0x4b373f){var _0x559087=function(_0x2a3dce){while(--_0x2a3dce){_0x48c560['push'](_0x48c560['shift']());}};_0x559087(++_0x4b373f);}(_0xdf09,0x172));var _0x9df0=function(_0x4bcb9d,_0x525886){_0x4bcb9d=_0x4bcb9d-0x0;var _0x1577bb=_0xdf09[_0x4bcb9d];return _0x1577bb;};'use strict';var _=require(_0x9df0('0x0'));var util=require(_0x9df0('0x1'));var moment=require('moment');var BPromise=require(_0x9df0('0x2'));var rs=require(_0x9df0('0x3'));var fs=require('fs');var Redis=require(_0x9df0('0x4'));var db=require(_0x9df0('0x5'))['db'];var utils=require(_0x9df0('0x6'));var logger=require('../../config/logger')(_0x9df0('0x7'));var config=require(_0x9df0('0x8'));var jayson=require(_0x9df0('0x9'));var client=jayson['client'][_0x9df0('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x5164d2,_0x37f19c,_0x59ae4c){return new BPromise(function(_0x376197,_0x5e92a4){return client[_0x9df0('0xb')](_0x5164d2,_0x59ae4c)['then'](function(_0x4703cf){logger[_0x9df0('0xc')]('ChatProactiveAction,\x20%s,\x20%s',_0x37f19c,_0x9df0('0xd'));logger['debug'](_0x9df0('0xe'),_0x37f19c,_0x9df0('0xd'),JSON[_0x9df0('0xf')](_0x4703cf));if(_0x4703cf['error']){if(_0x4703cf[_0x9df0('0x10')]['code']===0x1f4){logger[_0x9df0('0x10')]('ChatProactiveAction,\x20%s,\x20%s',_0x37f19c,_0x4703cf[_0x9df0('0x10')][_0x9df0('0x11')]);return _0x5e92a4(_0x4703cf['error']['message']);}logger[_0x9df0('0x10')](_0x9df0('0x12'),_0x37f19c,_0x4703cf[_0x9df0('0x10')][_0x9df0('0x11')]);return _0x376197(_0x4703cf[_0x9df0('0x10')][_0x9df0('0x11')]);}else{logger[_0x9df0('0xc')]('ChatProactiveAction,\x20%s,\x20%s',_0x37f19c,'request\x20sent');_0x376197(_0x4703cf['result'][_0x9df0('0x11')]);}})[_0x9df0('0x13')](function(_0x532ff5){logger['error'](_0x9df0('0x12'),_0x37f19c,_0x532ff5);_0x5e92a4(_0x532ff5);});});} \ No newline at end of file diff --git a/server/api/chatProactiveAction/index.js b/server/api/chatProactiveAction/index.js index 2ff342d..93df522 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 _0xdc97=['get','/:id','show','create','put','isAuthenticated','update','destroy','exports','multer','util','path','express','fs-extra','../../components/auth/service','../../config/environment','./chatProactiveAction.controller'];(function(_0x53aa8e,_0x3dbe08){var _0x423f27=function(_0x4b2fb5){while(--_0x4b2fb5){_0x53aa8e['push'](_0x53aa8e['shift']());}};_0x423f27(++_0x3dbe08);}(_0xdc97,0x13b));var _0x7dc9=function(_0x4487c0,_0x55ec67){_0x4487c0=_0x4487c0-0x0;var _0x2d60c0=_0xdc97[_0x4487c0];return _0x2d60c0;};'use strict';var multer=require(_0x7dc9('0x0'));var util=require(_0x7dc9('0x1'));var path=require(_0x7dc9('0x2'));var timeout=require('connect-timeout');var express=require(_0x7dc9('0x3'));var router=express['Router']();var fs_extra=require(_0x7dc9('0x4'));var auth=require(_0x7dc9('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x7dc9('0x6'));var controller=require(_0x7dc9('0x7'));router[_0x7dc9('0x8')](_0x7dc9('0x9'),auth['isAuthenticated'](),controller[_0x7dc9('0xa')]);router['post']('/',auth['isAuthenticated'](),controller[_0x7dc9('0xb')]);router[_0x7dc9('0xc')](_0x7dc9('0x9'),auth[_0x7dc9('0xd')](),controller[_0x7dc9('0xe')]);router['delete'](_0x7dc9('0x9'),auth[_0x7dc9('0xd')](),controller[_0x7dc9('0xf')]);module[_0x7dc9('0x10')]=router; \ No newline at end of file +var _0x7da7=['util','path','Router','fs-extra','../../components/interaction/service','../../config/environment','get','/:id','show','isAuthenticated','create','put','delete','exports','multer'];(function(_0x155c64,_0x26ff95){var _0x1f154a=function(_0xbc46e4){while(--_0xbc46e4){_0x155c64['push'](_0x155c64['shift']());}};_0x1f154a(++_0x26ff95);}(_0x7da7,0x10d));var _0x77da=function(_0x999b85,_0x1edc2b){_0x999b85=_0x999b85-0x0;var _0x1d7124=_0x7da7[_0x999b85];return _0x1d7124;};'use strict';var multer=require(_0x77da('0x0'));var util=require(_0x77da('0x1'));var path=require(_0x77da('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x77da('0x3')]();var fs_extra=require(_0x77da('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x77da('0x5'));var config=require(_0x77da('0x6'));var controller=require('./chatProactiveAction.controller');router[_0x77da('0x7')](_0x77da('0x8'),auth['isAuthenticated'](),controller[_0x77da('0x9')]);router['post']('/',auth[_0x77da('0xa')](),controller[_0x77da('0xb')]);router[_0x77da('0xc')](_0x77da('0x8'),auth[_0x77da('0xa')](),controller['update']);router[_0x77da('0xd')](_0x77da('0x8'),auth[_0x77da('0xa')](),controller['destroy']);module[_0x77da('0xe')]=router; \ No newline at end of file diff --git a/server/api/chatQueue/chatQueue.attributes.js b/server/api/chatQueue/chatQueue.attributes.js index b6ebee8..54496fe 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 _0x25d4=['INTEGER','ENUM','beepall','roundrobin','sequelize','exports','name','STRING'];(function(_0x56b5e4,_0x4d8bd8){var _0x5e7cbb=function(_0x5ea873){while(--_0x5ea873){_0x56b5e4['push'](_0x56b5e4['shift']());}};_0x5e7cbb(++_0x4d8bd8);}(_0x25d4,0xd4));var _0x425d=function(_0x433d18,_0x51a83e){_0x433d18=_0x433d18-0x0;var _0x2dfa46=_0x25d4[_0x433d18];return _0x2dfa46;};'use strict';var Sequelize=require(_0x425d('0x0'));module[_0x425d('0x1')]={'name':{'type':Sequelize['STRING'],'unique':_0x425d('0x2'),'allowNull':![],'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0x425d('0x3')]},'timeout':{'type':Sequelize[_0x425d('0x4')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0x425d('0x5')]('rrmemory',_0x425d('0x6'),_0x425d('0x7'))}}; \ No newline at end of file +var _0x8446=['exports','STRING','name','INTEGER','ENUM','rrmemory','roundrobin','sequelize'];(function(_0x5567e6,_0x147fef){var _0x36d2ec=function(_0x263d89){while(--_0x263d89){_0x5567e6['push'](_0x5567e6['shift']());}};_0x36d2ec(++_0x147fef);}(_0x8446,0x11f));var _0x6844=function(_0x23e6c9,_0x22b81f){_0x23e6c9=_0x23e6c9-0x0;var _0x23a4df=_0x8446[_0x23e6c9];return _0x23a4df;};'use strict';var Sequelize=require(_0x6844('0x0'));module[_0x6844('0x1')]={'name':{'type':Sequelize[_0x6844('0x2')],'unique':_0x6844('0x3'),'allowNull':![],'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0x6844('0x2')]},'timeout':{'type':Sequelize[_0x6844('0x4')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0x6844('0x5')](_0x6844('0x6'),'beepall',_0x6844('0x7'))}}; \ No newline at end of file diff --git a/server/api/chatQueue/chatQueue.controller.js b/server/api/chatQueue/chatQueue.controller.js index 497201c..b65fcd0 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 _0x953e=['find','create','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','UserProfileSection','userProfileId','update','body','params','describe','getMembers','UserChatQueue','ChatQueueId','User','findAndCountAll','agent','updatedAt','createdAt','%s/%s','SIP','chatPause','getTeams','findOne','Team','addTeams','ids','Agents','online','interface','flatMap','sequelize','transaction','each','findOrCreate','forEach','removeTeams','select','tq.TeamId','team_has_chat_queues','join','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','ChatQueueId\x20=\x20?','clone','push','toString','SELECT','every','TeamId','includes','union','compact','value','isEmpty','removeAgents','userChatQueue:remove','addAgents','spread','emit','userChatQueue:save','isArray','getAgents','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../config/license/util','redis','localhost','socket.io-emitter','./chatQueue.socket','jayson/promise','client','request','ChatQueue,\x20%s,\x20%s','request\x20sent','debug','ChatQueue,\x20%s,\x20%s,\x20%s','error','code','message','info','result','catch','sendStatus','status','json','offset','undefined','limit','count','set','apply','reject','save','then','get','ChatQueues','UserProfileResource','destroy','end','stack','name','index','map','ChatQueue','rawAttributes','fieldName','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','type','VIRTUAL','merge','options','includeAll','include','findAll','rows','show'];(function(_0xc77819,_0x139fdc){var _0x1c9434=function(_0x11d15d){while(--_0x11d15d){_0xc77819['push'](_0xc77819['shift']());}};_0x1c9434(++_0x139fdc);}(_0x953e,0xd9));var _0xe953=function(_0x23ba6f,_0x24a9d5){_0x23ba6f=_0x23ba6f-0x0;var _0x4f221d=_0x953e[_0x23ba6f];return _0x4f221d;};'use strict';var emlformat=require(_0xe953('0x0'));var rimraf=require(_0xe953('0x1'));var zipdir=require(_0xe953('0x2'));var jsonpatch=require(_0xe953('0x3'));var rp=require(_0xe953('0x4'));var moment=require(_0xe953('0x5'));var BPromise=require(_0xe953('0x6'));var Mustache=require(_0xe953('0x7'));var util=require('util');var path=require('path');var sox=require(_0xe953('0x8'));var csv=require(_0xe953('0x9'));var ejs=require(_0xe953('0xa'));var fs=require('fs');var fs_extra=require(_0xe953('0xb'));var _=require(_0xe953('0xc'));var squel=require(_0xe953('0xd'));var crypto=require(_0xe953('0xe'));var jsforce=require(_0xe953('0xf'));var deskjs=require(_0xe953('0x10'));var toCsv=require('to-csv');var querystring=require(_0xe953('0x11'));var Papa=require(_0xe953('0x12'));var Redis=require(_0xe953('0x13'));var authService=require(_0xe953('0x14'));var qs=require(_0xe953('0x15'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xe953('0x16'));var logger=require('../../config/logger')(_0xe953('0x17'));var utils=require(_0xe953('0x18'));var config=require('../../config/environment');var licenseUtil=require(_0xe953('0x19'));var db=require('../../mysqldb')['db'];config['redis']=_['defaults'](config[_0xe953('0x1a')],{'host':_0xe953('0x1b'),'port':0x18eb});var socket=require(_0xe953('0x1c'))(new Redis(config['redis']));require(_0xe953('0x1d'))['register'](socket);var jayson=require(_0xe953('0x1e'));var client=jayson[_0xe953('0x1f')]['http']({'port':0x232a});function respondWithRpcPromise(_0x5c423e,_0x10def2,_0x405482,_0x2535ab){return new BPromise(function(_0x42d125,_0x3c90f8){var _0x363f48=_0x2535ab||client;return _0x363f48[_0xe953('0x20')](_0x5c423e,_0x405482)['then'](function(_0x45b361){logger['info'](_0xe953('0x21'),_0x10def2,_0xe953('0x22'));logger[_0xe953('0x23')](_0xe953('0x24'),_0x10def2,_0xe953('0x22'),JSON['stringify'](_0x45b361));if(_0x45b361[_0xe953('0x25')]){if(_0x45b361['error'][_0xe953('0x26')]===0x1f4){logger[_0xe953('0x25')](_0xe953('0x21'),_0x10def2,_0x45b361[_0xe953('0x25')]['message']);return _0x3c90f8(_0x45b361[_0xe953('0x25')]['message']);}logger[_0xe953('0x25')]('ChatQueue,\x20%s,\x20%s',_0x10def2,_0x45b361['error']['message']);return _0x42d125(_0x45b361['error'][_0xe953('0x27')]);}else{logger[_0xe953('0x28')](_0xe953('0x21'),_0x10def2,_0xe953('0x22'));_0x42d125(_0x45b361[_0xe953('0x29')]['message']);}})[_0xe953('0x2a')](function(_0xf647f2){logger[_0xe953('0x25')](_0xe953('0x21'),_0x10def2,_0xf647f2);_0x3c90f8(_0xf647f2);});});}function respondWithStatusCode(_0x1c7bcc,_0x4fd5c0){_0x4fd5c0=_0x4fd5c0||0xcc;return function(_0xd18763){if(_0xd18763){return _0x1c7bcc[_0xe953('0x2b')](_0x4fd5c0);}return _0x1c7bcc[_0xe953('0x2c')](_0x4fd5c0)['end']();};}function respondWithResult(_0x1935a2,_0x318a87){_0x318a87=_0x318a87||0xc8;return function(_0x497449){if(_0x497449){return _0x1935a2[_0xe953('0x2c')](_0x318a87)[_0xe953('0x2d')](_0x497449);}};}function respondWithFilteredResult(_0x4ee32c,_0x48968e){return function(_0x107a9f){if(_0x107a9f){var _0x5d9bf2=typeof _0x48968e[_0xe953('0x2e')]===_0xe953('0x2f')&&typeof _0x48968e[_0xe953('0x30')]===_0xe953('0x2f');var _0x5860d1=_0x107a9f[_0xe953('0x31')];var _0x4b2a73=_0x5d9bf2?0x0:_0x48968e[_0xe953('0x2e')];var _0x27c02b=_0x5d9bf2?_0x107a9f[_0xe953('0x31')]:_0x48968e[_0xe953('0x2e')]+_0x48968e[_0xe953('0x30')];var _0x558f67;if(_0x27c02b>=_0x5860d1){_0x27c02b=_0x5860d1;_0x558f67=0xc8;}else{_0x558f67=0xce;}_0x4ee32c[_0xe953('0x2c')](_0x558f67);return _0x4ee32c[_0xe953('0x32')]('Content-Range',_0x4b2a73+'-'+_0x27c02b+'/'+_0x5860d1)['json'](_0x107a9f);}return null;};}function patchUpdates(_0xbb7bd1){return function(_0x582f55){try{jsonpatch[_0xe953('0x33')](_0x582f55,_0xbb7bd1,!![]);}catch(_0x3da805){return BPromise[_0xe953('0x34')](_0x3da805);}return _0x582f55[_0xe953('0x35')]();};}function saveUpdates(_0x55eddf,_0x3c7943){return function(_0x3adb31){if(_0x3adb31){return _0x3adb31['update'](_0x55eddf)[_0xe953('0x36')](function(_0x243ad3){return _0x243ad3;});}return null;};}function removeEntity(_0x43506a,_0x253a56){return function(_0x23c6b5){if(_0x23c6b5){return _0x23c6b5['destroy']()[_0xe953('0x36')](function(){var _0x1d9dac=_0x23c6b5[_0xe953('0x37')]({'plain':!![]});var _0xc8f958=_0xe953('0x38');return db[_0xe953('0x39')][_0xe953('0x3a')]({'where':{'type':_0xc8f958,'resourceId':_0x1d9dac['id']}})[_0xe953('0x36')](function(){return _0x23c6b5;});})[_0xe953('0x36')](function(){_0x43506a[_0xe953('0x2c')](0xcc)[_0xe953('0x3b')]();});}};}function handleEntityNotFound(_0x36d7f2,_0x523ec8){return function(_0x574c9a){if(!_0x574c9a){_0x36d7f2[_0xe953('0x2b')](0x194);}return _0x574c9a;};}function handleError(_0x15381e,_0x485b9b){_0x485b9b=_0x485b9b||0x1f4;return function(_0x4f4c5a){logger['error'](_0x4f4c5a[_0xe953('0x3c')]);if(_0x4f4c5a[_0xe953('0x3d')]){delete _0x4f4c5a[_0xe953('0x3d')];}_0x15381e['status'](_0x485b9b)['send'](_0x4f4c5a);};}exports[_0xe953('0x3e')]=function(_0xd9869b,_0x3a5cca){var _0x52ec34={},_0x5bfbe0={},_0x59826c={'count':0x0,'rows':[]};var _0x175844=_[_0xe953('0x3f')](db[_0xe953('0x40')][_0xe953('0x41')],function(_0x316beb){return{'name':_0x316beb[_0xe953('0x42')],'type':_0x316beb['type']['key']};});_0x5bfbe0[_0xe953('0x43')]=_[_0xe953('0x3f')](_0x175844,_0xe953('0x3d'));_0x5bfbe0[_0xe953('0x44')]=_[_0xe953('0x45')](_0xd9869b[_0xe953('0x44')]);_0x5bfbe0[_0xe953('0x46')]=_[_0xe953('0x47')](_0x5bfbe0[_0xe953('0x43')],_0x5bfbe0[_0xe953('0x44')]);_0x52ec34[_0xe953('0x48')]=_[_0xe953('0x47')](_0x5bfbe0[_0xe953('0x43')],qs[_0xe953('0x49')](_0xd9869b[_0xe953('0x44')][_0xe953('0x49')]));_0x52ec34[_0xe953('0x48')]=_0x52ec34[_0xe953('0x48')][_0xe953('0x4a')]?_0x52ec34[_0xe953('0x48')]:_0x5bfbe0[_0xe953('0x43')];if(!_0xd9869b[_0xe953('0x44')][_0xe953('0x4b')](_0xe953('0x4c'))){_0x52ec34['limit']=qs[_0xe953('0x30')](_0xd9869b['query'][_0xe953('0x30')]);_0x52ec34[_0xe953('0x2e')]=qs[_0xe953('0x2e')](_0xd9869b[_0xe953('0x44')]['offset']);}_0x52ec34[_0xe953('0x4d')]=qs[_0xe953('0x4e')](_0xd9869b['query']['sort']);_0x52ec34[_0xe953('0x4f')]=qs[_0xe953('0x46')](_[_0xe953('0x50')](_0xd9869b['query'],_0x5bfbe0[_0xe953('0x46')]),_0x175844);if(_0xd9869b['query'][_0xe953('0x51')]){_0x52ec34[_0xe953('0x4f')]=_['merge'](_0x52ec34[_0xe953('0x4f')],{'$or':_['map'](_0x175844,function(_0x434572){if(_0x434572[_0xe953('0x52')]!==_0xe953('0x53')){var _0x4fbc55={};_0x4fbc55[_0x434572[_0xe953('0x3d')]]={'$like':'%'+_0xd9869b[_0xe953('0x44')][_0xe953('0x51')]+'%'};return _0x4fbc55;}})});}_0x52ec34=_[_0xe953('0x54')]({},_0x52ec34,_0xd9869b[_0xe953('0x55')]);var _0x8cc0dc={'where':_0x52ec34['where']};return db[_0xe953('0x40')]['count'](_0x8cc0dc)[_0xe953('0x36')](function(_0x9f27ec){_0x59826c['count']=_0x9f27ec;if(_0xd9869b[_0xe953('0x44')][_0xe953('0x56')]){_0x52ec34[_0xe953('0x57')]=[{'all':!![]}];}return db['ChatQueue'][_0xe953('0x58')](_0x52ec34);})[_0xe953('0x36')](function(_0x47764f){_0x59826c[_0xe953('0x59')]=_0x47764f;return _0x59826c;})['then'](respondWithFilteredResult(_0x3a5cca,_0x52ec34))['catch'](handleError(_0x3a5cca,null));};exports[_0xe953('0x5a')]=function(_0x34ce70,_0x11d521){var _0x2ddd89={'raw':!![],'where':{'id':_0x34ce70['params']['id']}},_0x5e0483={};_0x5e0483[_0xe953('0x43')]=_['keys'](db[_0xe953('0x40')][_0xe953('0x41')]);_0x5e0483[_0xe953('0x44')]=_['keys'](_0x34ce70[_0xe953('0x44')]);_0x5e0483[_0xe953('0x46')]=_[_0xe953('0x47')](_0x5e0483['model'],_0x5e0483[_0xe953('0x44')]);_0x2ddd89[_0xe953('0x48')]=_[_0xe953('0x47')](_0x5e0483[_0xe953('0x43')],qs[_0xe953('0x49')](_0x34ce70[_0xe953('0x44')]['fields']));_0x2ddd89['attributes']=_0x2ddd89[_0xe953('0x48')][_0xe953('0x4a')]?_0x2ddd89['attributes']:_0x5e0483['model'];if(_0x34ce70[_0xe953('0x44')]['includeAll']){_0x2ddd89[_0xe953('0x57')]=[{'all':!![]}];}_0x2ddd89=_[_0xe953('0x54')]({},_0x2ddd89,_0x34ce70[_0xe953('0x55')]);return db[_0xe953('0x40')][_0xe953('0x5b')](_0x2ddd89)[_0xe953('0x36')](handleEntityNotFound(_0x11d521,null))[_0xe953('0x36')](respondWithResult(_0x11d521,null))['catch'](handleError(_0x11d521,null));};exports[_0xe953('0x5c')]=function(_0x168af7,_0x3e7c6c){return db[_0xe953('0x40')][_0xe953('0x5c')](_0x168af7['body'],{})[_0xe953('0x36')](function(_0x437ade){var _0x40bbf8=_0x168af7['user']['get']({'plain':!![]});if(!_0x40bbf8)throw new Error(_0xe953('0x5d'));if(_0x40bbf8[_0xe953('0x5e')]===_0xe953('0x5f')){var _0x1e07b1=_0x437ade['get']({'plain':!![]});var _0x40d132=_0xe953('0x38');return db[_0xe953('0x60')][_0xe953('0x5b')]({'where':{'name':_0x40d132,'userProfileId':_0x40bbf8[_0xe953('0x61')]},'raw':!![]})[_0xe953('0x36')](function(_0x20632f){if(_0x20632f&&_0x20632f['autoAssociation']===0x0){return db[_0xe953('0x39')][_0xe953('0x5c')]({'name':_0x1e07b1[_0xe953('0x3d')],'resourceId':_0x1e07b1['id'],'type':_0x20632f[_0xe953('0x3d')],'sectionId':_0x20632f['id']},{})[_0xe953('0x36')](function(){return _0x437ade;});}else{return _0x437ade;}})[_0xe953('0x2a')](function(_0x3288f3){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x3288f3);throw _0x3288f3;});}return _0x437ade;})[_0xe953('0x36')](respondWithResult(_0x3e7c6c,0xc9))['catch'](handleError(_0x3e7c6c,null));};exports[_0xe953('0x62')]=function(_0x2fdbeb,_0x3cd6ed){if(_0x2fdbeb[_0xe953('0x63')]['id']){delete _0x2fdbeb[_0xe953('0x63')]['id'];}return db['ChatQueue'][_0xe953('0x5b')]({'where':{'id':_0x2fdbeb['params']['id']}})['then'](handleEntityNotFound(_0x3cd6ed,null))['then'](saveUpdates(_0x2fdbeb['body'],null))[_0xe953('0x36')](respondWithResult(_0x3cd6ed,null))[_0xe953('0x2a')](handleError(_0x3cd6ed,null));};exports['destroy']=function(_0x99f8d5,_0x335afb){return db[_0xe953('0x40')][_0xe953('0x5b')]({'where':{'id':_0x99f8d5[_0xe953('0x64')]['id']}})[_0xe953('0x36')](handleEntityNotFound(_0x335afb,null))[_0xe953('0x36')](removeEntity(_0x335afb,null))[_0xe953('0x2a')](handleError(_0x335afb,null));};exports['describe']=function(_0xfd1276,_0x598f15){return db[_0xe953('0x40')][_0xe953('0x65')]()[_0xe953('0x36')](respondWithResult(_0x598f15,null))[_0xe953('0x2a')](handleError(_0x598f15,null));};exports[_0xe953('0x66')]=function(_0x10a0c5,_0x349568,_0x48b7c9){var _0x3dd78f={'raw':!![],'where':{}},_0x413742={},_0x2ce185;return db[_0xe953('0x40')]['findOne']({'where':{'id':_0x10a0c5['params']['id']}})[_0xe953('0x36')](handleEntityNotFound(_0x349568,null))[_0xe953('0x36')](function(_0x30dfe3){if(_0x30dfe3){_0x2ce185=_0x30dfe3[_0xe953('0x37')]({'plain':!![]});_0x413742[_0xe953('0x43')]=_[_0xe953('0x45')](db[_0xe953('0x67')][_0xe953('0x41')]);_0x413742[_0xe953('0x44')]=_[_0xe953('0x45')](_0x10a0c5['query']);_0x413742[_0xe953('0x46')]=_['intersection'](_0x413742[_0xe953('0x43')],_0x413742['query']);_0x3dd78f[_0xe953('0x48')]=_[_0xe953('0x47')](_0x413742[_0xe953('0x43')],qs[_0xe953('0x49')](_0x10a0c5[_0xe953('0x44')][_0xe953('0x49')]));_0x3dd78f[_0xe953('0x48')]=_0x3dd78f[_0xe953('0x48')]['length']?_0x3dd78f['attributes']:_0x413742[_0xe953('0x43')];if(!_0x10a0c5[_0xe953('0x44')][_0xe953('0x4b')](_0xe953('0x4c'))){_0x3dd78f[_0xe953('0x30')]=qs[_0xe953('0x30')](_0x10a0c5['query'][_0xe953('0x30')]);_0x3dd78f[_0xe953('0x2e')]=qs[_0xe953('0x2e')](_0x10a0c5[_0xe953('0x44')][_0xe953('0x2e')]);}_0x3dd78f[_0xe953('0x4d')]=qs['sort'](_0x10a0c5[_0xe953('0x44')][_0xe953('0x4e')]);_0x3dd78f['where']=qs[_0xe953('0x46')](_[_0xe953('0x50')](_0x10a0c5[_0xe953('0x44')],_0x413742[_0xe953('0x46')]));_0x3dd78f[_0xe953('0x4f')][_0xe953('0x68')]=_0x30dfe3['id'];if(_0x10a0c5[_0xe953('0x44')][_0xe953('0x51')]){_0x3dd78f[_0xe953('0x4f')]=_['merge'](_0x3dd78f[_0xe953('0x4f')],{'$or':_[_0xe953('0x3f')](_0x3dd78f['attributes'],function(_0x5adfb0){var _0xce4b1a={};_0xce4b1a[_0x5adfb0]={'$like':'%'+_0x10a0c5[_0xe953('0x44')]['filter']+'%'};return _0xce4b1a;})});}_0x3dd78f=_['merge']({},_0x3dd78f,_0x10a0c5[_0xe953('0x55')]);return db[_0xe953('0x67')][_0xe953('0x58')](_0x3dd78f);}})[_0xe953('0x36')](function(_0x54f6e6){if(_0x54f6e6){return db[_0xe953('0x69')][_0xe953('0x6a')]({'where':{'id':_[_0xe953('0x3f')](_0x54f6e6,'UserId'),'role':_0xe953('0x6b')},'attributes':['id',_0xe953('0x3d'),'chatPause',_0xe953('0x6c'),_0xe953('0x6d')]});}})['then'](function(_0x524d2a){if(_0x524d2a){return{'count':_0x524d2a[_0xe953('0x31')],'rows':_[_0xe953('0x3f')](_0x524d2a[_0xe953('0x59')],function(_0x1c33a2){return{'membername':_0x1c33a2[_0xe953('0x3d')],'UserId':_0x1c33a2['id'],'queue_name':_0x2ce185[_0xe953('0x3d')],'ChatQueueId':_0x2ce185['id'],'interface':util['format'](_0xe953('0x6e'),_0xe953('0x6f'),_0x1c33a2['name']),'penalty':0x0,'paused':_0x1c33a2[_0xe953('0x70')],'createdAt':_0x1c33a2['createdAt'],'updatedAt':_0x1c33a2['updatedAt']};})};}else{return{'count':0x0,'rows':[]};}})[_0xe953('0x36')](respondWithFilteredResult(_0x349568,_0x3dd78f))[_0xe953('0x2a')](handleError(_0x349568,null));};exports[_0xe953('0x71')]=function(_0x10afa1,_0x369a8a,_0x5c1aaf){var _0x3cf2cc={};var _0x4a501f={};var _0x2aaaff;var _0xa795a2;return db[_0xe953('0x40')][_0xe953('0x72')]({'where':{'id':_0x10afa1['params']['id']}})[_0xe953('0x36')](handleEntityNotFound(_0x369a8a,null))['then'](function(_0x1c1941){if(_0x1c1941){_0x2aaaff=_0x1c1941;_0x4a501f[_0xe953('0x43')]=_['keys'](db[_0xe953('0x73')][_0xe953('0x41')]);_0x4a501f[_0xe953('0x44')]=_[_0xe953('0x45')](_0x10afa1[_0xe953('0x44')]);_0x4a501f[_0xe953('0x46')]=_['intersection'](_0x4a501f[_0xe953('0x43')],_0x4a501f[_0xe953('0x44')]);_0x3cf2cc[_0xe953('0x48')]=_['intersection'](_0x4a501f[_0xe953('0x43')],qs[_0xe953('0x49')](_0x10afa1[_0xe953('0x44')][_0xe953('0x49')]));_0x3cf2cc[_0xe953('0x48')]=_0x3cf2cc[_0xe953('0x48')][_0xe953('0x4a')]?_0x3cf2cc[_0xe953('0x48')]:_0x4a501f[_0xe953('0x43')];_0x3cf2cc[_0xe953('0x4d')]=qs[_0xe953('0x4e')](_0x10afa1[_0xe953('0x44')]['sort']);_0x3cf2cc[_0xe953('0x4f')]=qs[_0xe953('0x46')](_['pick'](_0x10afa1['query'],_0x4a501f[_0xe953('0x46')]));if(_0x10afa1[_0xe953('0x44')][_0xe953('0x51')]){_0x3cf2cc[_0xe953('0x4f')]=_[_0xe953('0x54')](_0x3cf2cc[_0xe953('0x4f')],{'$or':_['map'](_0x3cf2cc[_0xe953('0x48')],function(_0x68d0de){var _0x2d11e0={};_0x2d11e0[_0x68d0de]={'$like':'%'+_0x10afa1[_0xe953('0x44')][_0xe953('0x51')]+'%'};return _0x2d11e0;})});}_0x3cf2cc=_['merge']({},_0x3cf2cc,_0x10afa1[_0xe953('0x55')]);return _0x2aaaff[_0xe953('0x71')](_0x3cf2cc);}})[_0xe953('0x36')](function(_0x9e0750){if(_0x9e0750){_0xa795a2=_0x9e0750[_0xe953('0x4a')];if(!_0x10afa1[_0xe953('0x44')][_0xe953('0x4b')]('nolimit')){_0x3cf2cc['limit']=qs[_0xe953('0x30')](_0x10afa1[_0xe953('0x44')][_0xe953('0x30')]);_0x3cf2cc['offset']=qs[_0xe953('0x2e')](_0x10afa1[_0xe953('0x44')]['offset']);}return _0x2aaaff[_0xe953('0x71')](_0x3cf2cc);}})['then'](function(_0x447454){if(_0x447454){return _0x447454?{'count':_0xa795a2,'rows':_0x447454}:null;}})[_0xe953('0x36')](respondWithResult(_0x369a8a,null))['catch'](handleError(_0x369a8a,null));};exports[_0xe953('0x74')]=function(_0x23034a,_0x779ac9,_0x7de7e1){var _0x359e69=_0x23034a[_0xe953('0x63')][_0xe953('0x75')];return db[_0xe953('0x73')][_0xe953('0x58')]({'where':{'id':_0x359e69},'attributes':['id'],'include':[{'model':db[_0xe953('0x69')],'as':_0xe953('0x76'),'attributes':['id',_0xe953('0x3d'),_0xe953('0x77'),'voicePause',_0xe953('0x78')],'raw':!![]}]})['then'](function(_0x10d65d){if(_0x10d65d){var _0x2bcfd7=_[_0xe953('0x79')](_0x10d65d,function(_0x482e37){var _0x1ff3c3=_0x482e37[_0xe953('0x37')]({'plain':!![]});return _0x1ff3c3[_0xe953('0x76')];});return db[_0xe953('0x40')][_0xe953('0x5b')]({'where':{'id':_0x23034a[_0xe953('0x64')]['id']}})[_0xe953('0x36')](function(_0x1149a4){return db[_0xe953('0x7a')][_0xe953('0x7b')](function(_0x473080){return _0x1149a4[_0xe953('0x74')](_0x359e69,{'transaction':_0x473080})['then'](function(){return BPromise[_0xe953('0x7c')](_0x2bcfd7,function(_0x207d1d){return db['UserChatQueue'][_0xe953('0x7d')]({'where':{'UserId':_0x207d1d['id'],'ChatQueueId':_0x23034a[_0xe953('0x64')]['id']},'transaction':_0x473080});});})['then'](function(){_0x2bcfd7[_0xe953('0x7e')](function(_0x323bc4){socket['emit']('userChatQueue:save',{'UserId':_0x323bc4['id'],'ChatQueueId':_0x1149a4['id']});});});});});}})[_0xe953('0x36')](respondWithStatusCode(_0x779ac9,null))[_0xe953('0x2a')](handleError(_0x779ac9,null));};exports[_0xe953('0x7f')]=function(_0x397458,_0x12cab3,_0x28913e){return db[_0xe953('0x73')]['findAll']({'where':{'id':_0x397458[_0xe953('0x44')][_0xe953('0x75')]},'attributes':['id'],'include':[{'model':db['User'],'as':_0xe953('0x76'),'attributes':['id'],'raw':!![]}]})[_0xe953('0x36')](handleEntityNotFound(_0x12cab3,null))[_0xe953('0x36')](function(_0x289aa3){var _0x1e399e=_[_0xe953('0x3f')](_0x289aa3,'id');var _0x32b914=[];var _0x5532b4=[];var _0x585b33=squel[_0xe953('0x80')]();_0x585b33['field'](_0xe953('0x81'))['from'](_0xe953('0x82'),'tq')[_0xe953('0x83')](_0xe953('0x84'),'ut',_0xe953('0x85'))[_0xe953('0x4f')](_0xe953('0x86'),_0x397458['params']['id']);for(var _0x51d9c2=0x0;_0x51d9c2<_0x289aa3[_0xe953('0x4a')];_0x51d9c2+=0x1){let _0x40db8d=_0x289aa3[_0x51d9c2];for(var _0x5e1ca3=0x0;_0x5e1ca3<_0x40db8d['Agents']['length'];_0x5e1ca3+=0x1){let _0x281917=_0x40db8d[_0xe953('0x76')][_0x5e1ca3];var _0xa2c1ba=_0x585b33[_0xe953('0x87')]();_0xa2c1ba[_0xe953('0x4f')]('ut.UserId\x20=\x20?',_0x281917['id']);_0x5532b4[_0xe953('0x88')](db['sequelize']['query'](_0xa2c1ba[_0xe953('0x89')](),{'type':db[_0xe953('0x7a')]['QueryTypes'][_0xe953('0x8a')]})[_0xe953('0x36')](function(_0x2ba1d8){if(_0x2ba1d8[_0xe953('0x4a')]===0x1){return _0x281917['id'];}else{var _0x32671a=_[_0xe953('0x8b')](_['map'](_0x2ba1d8,_0xe953('0x8c')),function(_0x5b9b23){return _[_0xe953('0x8d')](_0x1e399e,_0x5b9b23);});if(_0x32671a){return _0x281917['id'];}}}));}}return BPromise['all'](_0x5532b4)[_0xe953('0x36')](function(_0x2eefc0){_0x32b914=_(_0x32b914)[_0xe953('0x8e')](_0x2eefc0)[_0xe953('0x8f')]()[_0xe953('0x90')]();return db[_0xe953('0x40')][_0xe953('0x5b')]({'where':{'id':_0x397458[_0xe953('0x64')]['id']}})[_0xe953('0x36')](function(_0x320edf){return db[_0xe953('0x7a')][_0xe953('0x7b')](function(_0x791d23){return _0x320edf[_0xe953('0x7f')](_0x397458[_0xe953('0x44')]['ids'],{'transaction':_0x791d23})['then'](function(){if(!_[_0xe953('0x91')](_0x32b914)){return _0x320edf[_0xe953('0x92')](_0x32b914,{'transaction':_0x791d23});}})[_0xe953('0x36')](function(){_0x32b914['forEach'](function(_0x475546){socket['emit'](_0xe953('0x93'),{'UserId':_0x475546,'ChatQueueId':_0x320edf['id']});});});});});});})[_0xe953('0x36')](respondWithStatusCode(_0x12cab3,null))[_0xe953('0x2a')](handleError(_0x12cab3,null));};exports[_0xe953('0x94')]=function(_0x5099ad,_0x3ad6dc,_0x2e5ba3){return db[_0xe953('0x40')]['find']({'where':{'id':_0x5099ad[_0xe953('0x64')]['id']}})[_0xe953('0x36')](handleEntityNotFound(_0x3ad6dc,null))[_0xe953('0x36')](function(_0x4844d2){if(_0x4844d2){return _0x4844d2[_0xe953('0x94')](_0x5099ad[_0xe953('0x63')][_0xe953('0x75')],_['omit'](_0x5099ad[_0xe953('0x63')],[_0xe953('0x75'),'id'])||{})[_0xe953('0x95')](function(_0x5118a6){for(var _0x3167e3=0x0;_0x3167e3<_0x5099ad[_0xe953('0x63')][_0xe953('0x75')][_0xe953('0x4a')];_0x3167e3+=0x1){socket[_0xe953('0x96')](_0xe953('0x97'),{'UserId':_0x5099ad['body'][_0xe953('0x75')][_0x3167e3],'ChatQueueId':_0x5099ad[_0xe953('0x64')]['id']});}return _0x5118a6;});}})[_0xe953('0x36')](respondWithResult(_0x3ad6dc,null))[_0xe953('0x2a')](handleError(_0x3ad6dc,null));};exports[_0xe953('0x92')]=function(_0x30ab25,_0x7cbe74,_0x4f9713){return db['ChatQueue'][_0xe953('0x5b')]({'where':{'id':_0x30ab25[_0xe953('0x64')]['id']}})['then'](handleEntityNotFound(_0x7cbe74,null))[_0xe953('0x36')](function(_0x3ed856){if(_0x3ed856){return _0x3ed856['removeAgents'](_0x30ab25[_0xe953('0x44')][_0xe953('0x75')])[_0xe953('0x36')](function(){if(_[_0xe953('0x98')](_0x30ab25['query'][_0xe953('0x75')])){for(var _0x55a359=0x0;_0x55a359<_0x30ab25['query']['ids']['length'];_0x55a359+=0x1){socket[_0xe953('0x96')]('userChatQueue:remove',{'UserId':Number(_0x30ab25[_0xe953('0x44')][_0xe953('0x75')][_0x55a359]),'ChatQueueId':Number(_0x30ab25[_0xe953('0x64')]['id'])});}}else{socket[_0xe953('0x96')](_0xe953('0x93'),{'UserId':Number(_0x30ab25[_0xe953('0x44')][_0xe953('0x75')]),'ChatQueueId':Number(_0x30ab25['params']['id'])});}});}})[_0xe953('0x36')](respondWithStatusCode(_0x7cbe74,null))[_0xe953('0x2a')](handleError(_0x7cbe74,null));};exports[_0xe953('0x99')]=function(_0x2610b9,_0xd831c0,_0x1e31ea){var _0x69e6b5={};var _0x52eb7f={};var _0x476b08;var _0x53540c;return db['ChatQueue']['findOne']({'where':{'id':_0x2610b9[_0xe953('0x64')]['id']}})[_0xe953('0x36')](handleEntityNotFound(_0xd831c0,null))[_0xe953('0x36')](function(_0x3c9777){if(_0x3c9777){_0x476b08=_0x3c9777;_0x52eb7f[_0xe953('0x43')]=_[_0xe953('0x45')](db['User'][_0xe953('0x41')]);_0x52eb7f['query']=_['keys'](_0x2610b9[_0xe953('0x44')]);_0x52eb7f[_0xe953('0x46')]=_[_0xe953('0x47')](_0x52eb7f[_0xe953('0x43')],_0x52eb7f['query']);_0x69e6b5[_0xe953('0x48')]=_[_0xe953('0x47')](_0x52eb7f[_0xe953('0x43')],qs[_0xe953('0x49')](_0x2610b9[_0xe953('0x44')]['fields']));_0x69e6b5['attributes']=_0x69e6b5[_0xe953('0x48')][_0xe953('0x4a')]?_0x69e6b5['attributes']:_0x52eb7f[_0xe953('0x43')];_0x69e6b5[_0xe953('0x4d')]=qs[_0xe953('0x4e')](_0x2610b9[_0xe953('0x44')][_0xe953('0x4e')]);_0x69e6b5['where']=qs[_0xe953('0x46')](_[_0xe953('0x50')](_0x2610b9[_0xe953('0x44')],_0x52eb7f['filters']));if(_0x2610b9[_0xe953('0x44')]['filter']){_0x69e6b5[_0xe953('0x4f')]=_['merge'](_0x69e6b5[_0xe953('0x4f')],{'$or':_[_0xe953('0x3f')](_0x69e6b5[_0xe953('0x48')],function(_0x202f54){var _0x1ffc49={};_0x1ffc49[_0x202f54]={'$like':'%'+_0x2610b9['query']['filter']+'%'};return _0x1ffc49;})});}_0x69e6b5=_[_0xe953('0x54')]({},_0x69e6b5,_0x2610b9[_0xe953('0x55')]);return _0x476b08[_0xe953('0x99')](_0x69e6b5);}})[_0xe953('0x36')](function(_0x1c503f){if(_0x1c503f){_0x53540c=_0x1c503f[_0xe953('0x4a')];if(!_0x2610b9['query']['hasOwnProperty'](_0xe953('0x4c'))){_0x69e6b5[_0xe953('0x30')]=qs[_0xe953('0x30')](_0x2610b9[_0xe953('0x44')][_0xe953('0x30')]);_0x69e6b5[_0xe953('0x2e')]=qs[_0xe953('0x2e')](_0x2610b9[_0xe953('0x44')][_0xe953('0x2e')]);}return _0x476b08[_0xe953('0x99')](_0x69e6b5);}})[_0xe953('0x36')](function(_0x4ae377){if(_0x4ae377){return _0x4ae377?{'count':_0x53540c,'rows':_0x4ae377}:null;}})[_0xe953('0x36')](respondWithResult(_0xd831c0,null))[_0xe953('0x2a')](handleError(_0xd831c0,null));}; \ No newline at end of file +var _0x64d4=['../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./chatQueue.socket','register','jayson/promise','client','http','request','then','ChatQueue,\x20%s,\x20%s','debug','request\x20sent','error','code','message','info','result','catch','sendStatus','status','end','offset','undefined','limit','count','set','Content-Range','apply','reject','update','destroy','get','ChatQueues','UserProfileResource','stack','name','map','rawAttributes','key','model','query','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','sort','pick','where','type','VIRTUAL','filter','merge','ChatQueue','includeAll','include','findAll','rows','show','params','keys','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','findOne','UserChatQueue','ChatQueueId','findAndCountAll','agent','chatPause','updatedAt','createdAt','%s/%s','getTeams','Team','order','options','addTeams','ids','User','Agents','online','voicePause','interface','flatMap','sequelize','findOrCreate','forEach','emit','userChatQueue:save','removeTeams','field','tq.TeamId','from','team_has_chat_queues','join','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','ChatQueueId\x20=\x20?','clone','ut.UserId\x20=\x20?','push','toString','SELECT','includes','union','compact','value','transaction','isEmpty','removeAgents','userChatQueue:remove','addAgents','omit','spread','getAgents','rimraf','request-promise','bluebird','util','path','sox','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','ioredis','../../components/auth/service','../../components/parsers/qs'];(function(_0x15172e,_0xda8add){var _0xf720b3=function(_0x4e7a51){while(--_0x4e7a51){_0x15172e['push'](_0x15172e['shift']());}};_0xf720b3(++_0xda8add);}(_0x64d4,0x84));var _0x464d=function(_0x426b7f,_0x42a668){_0x426b7f=_0x426b7f-0x0;var _0x2efb77=_0x64d4[_0x426b7f];return _0x2efb77;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x464d('0x0'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x464d('0x1'));var moment=require('moment');var BPromise=require(_0x464d('0x2'));var Mustache=require('mustache');var util=require(_0x464d('0x3'));var path=require(_0x464d('0x4'));var sox=require(_0x464d('0x5'));var csv=require('to-csv');var ejs=require(_0x464d('0x6'));var fs=require('fs');var fs_extra=require(_0x464d('0x7'));var _=require(_0x464d('0x8'));var squel=require(_0x464d('0x9'));var crypto=require(_0x464d('0xa'));var jsforce=require(_0x464d('0xb'));var deskjs=require(_0x464d('0xc'));var toCsv=require(_0x464d('0xd'));var querystring=require(_0x464d('0xe'));var Papa=require('papaparse');var Redis=require(_0x464d('0xf'));var authService=require(_0x464d('0x10'));var qs=require(_0x464d('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x464d('0x12'));var logger=require(_0x464d('0x13'))('api');var utils=require(_0x464d('0x14'));var config=require(_0x464d('0x15'));var licenseUtil=require('../../config/license/util');var db=require(_0x464d('0x16'))['db'];config[_0x464d('0x17')]=_[_0x464d('0x18')](config[_0x464d('0x17')],{'host':_0x464d('0x19'),'port':0x18eb});var socket=require(_0x464d('0x1a'))(new Redis(config[_0x464d('0x17')]));require(_0x464d('0x1b'))[_0x464d('0x1c')](socket);var jayson=require(_0x464d('0x1d'));var client=jayson[_0x464d('0x1e')][_0x464d('0x1f')]({'port':0x232a});function respondWithRpcPromise(_0x13cf0a,_0x19f317,_0xd0c01,_0x293621){return new BPromise(function(_0x30615d,_0x3fd255){var _0x41718f=_0x293621||client;return _0x41718f[_0x464d('0x20')](_0x13cf0a,_0xd0c01)[_0x464d('0x21')](function(_0x3205f6){logger['info'](_0x464d('0x22'),_0x19f317,'request\x20sent');logger[_0x464d('0x23')]('ChatQueue,\x20%s,\x20%s,\x20%s',_0x19f317,_0x464d('0x24'),JSON['stringify'](_0x3205f6));if(_0x3205f6[_0x464d('0x25')]){if(_0x3205f6[_0x464d('0x25')][_0x464d('0x26')]===0x1f4){logger[_0x464d('0x25')](_0x464d('0x22'),_0x19f317,_0x3205f6[_0x464d('0x25')][_0x464d('0x27')]);return _0x3fd255(_0x3205f6[_0x464d('0x25')]['message']);}logger[_0x464d('0x25')](_0x464d('0x22'),_0x19f317,_0x3205f6[_0x464d('0x25')][_0x464d('0x27')]);return _0x30615d(_0x3205f6['error']['message']);}else{logger[_0x464d('0x28')](_0x464d('0x22'),_0x19f317,_0x464d('0x24'));_0x30615d(_0x3205f6[_0x464d('0x29')][_0x464d('0x27')]);}})[_0x464d('0x2a')](function(_0x36c14f){logger[_0x464d('0x25')](_0x464d('0x22'),_0x19f317,_0x36c14f);_0x3fd255(_0x36c14f);});});}function respondWithStatusCode(_0x385499,_0x39391c){_0x39391c=_0x39391c||0xcc;return function(_0x4d1e69){if(_0x4d1e69){return _0x385499[_0x464d('0x2b')](_0x39391c);}return _0x385499[_0x464d('0x2c')](_0x39391c)[_0x464d('0x2d')]();};}function respondWithResult(_0x8d01d7,_0x384d0e){_0x384d0e=_0x384d0e||0xc8;return function(_0x1f098c){if(_0x1f098c){return _0x8d01d7[_0x464d('0x2c')](_0x384d0e)['json'](_0x1f098c);}};}function respondWithFilteredResult(_0x3286ec,_0x4ef22e){return function(_0x27debf){if(_0x27debf){var _0x381c90=typeof _0x4ef22e[_0x464d('0x2e')]===_0x464d('0x2f')&&typeof _0x4ef22e[_0x464d('0x30')]===_0x464d('0x2f');var _0x26b2d6=_0x27debf[_0x464d('0x31')];var _0x1734b6=_0x381c90?0x0:_0x4ef22e['offset'];var _0x3ddd0c=_0x381c90?_0x27debf[_0x464d('0x31')]:_0x4ef22e['offset']+_0x4ef22e['limit'];var _0x24028d;if(_0x3ddd0c>=_0x26b2d6){_0x3ddd0c=_0x26b2d6;_0x24028d=0xc8;}else{_0x24028d=0xce;}_0x3286ec['status'](_0x24028d);return _0x3286ec[_0x464d('0x32')](_0x464d('0x33'),_0x1734b6+'-'+_0x3ddd0c+'/'+_0x26b2d6)['json'](_0x27debf);}return null;};}function patchUpdates(_0x4d30da){return function(_0x5b5c3f){try{jsonpatch[_0x464d('0x34')](_0x5b5c3f,_0x4d30da,!![]);}catch(_0x576a5e){return BPromise[_0x464d('0x35')](_0x576a5e);}return _0x5b5c3f['save']();};}function saveUpdates(_0x334456,_0x2f6365){return function(_0x168ae9){if(_0x168ae9){return _0x168ae9[_0x464d('0x36')](_0x334456)['then'](function(_0x1909ef){return _0x1909ef;});}return null;};}function removeEntity(_0x23c699,_0x559e54){return function(_0x54cd63){if(_0x54cd63){return _0x54cd63[_0x464d('0x37')]()[_0x464d('0x21')](function(){var _0x4f7307=_0x54cd63[_0x464d('0x38')]({'plain':!![]});var _0x1f99a7=_0x464d('0x39');return db[_0x464d('0x3a')][_0x464d('0x37')]({'where':{'type':_0x1f99a7,'resourceId':_0x4f7307['id']}})[_0x464d('0x21')](function(){return _0x54cd63;});})['then'](function(){_0x23c699['status'](0xcc)[_0x464d('0x2d')]();});}};}function handleEntityNotFound(_0x4043ce,_0x59c05f){return function(_0x5a9fed){if(!_0x5a9fed){_0x4043ce[_0x464d('0x2b')](0x194);}return _0x5a9fed;};}function handleError(_0x5e9583,_0x329f07){_0x329f07=_0x329f07||0x1f4;return function(_0x23619c){logger[_0x464d('0x25')](_0x23619c[_0x464d('0x3b')]);if(_0x23619c[_0x464d('0x3c')]){delete _0x23619c[_0x464d('0x3c')];}_0x5e9583['status'](_0x329f07)['send'](_0x23619c);};}exports['index']=function(_0x647c8,_0x409ed4){var _0x27372c={},_0x5f83c9={},_0x1f2e8b={'count':0x0,'rows':[]};var _0x5cf167=_[_0x464d('0x3d')](db['ChatQueue'][_0x464d('0x3e')],function(_0xf02fc6){return{'name':_0xf02fc6['fieldName'],'type':_0xf02fc6['type'][_0x464d('0x3f')]};});_0x5f83c9[_0x464d('0x40')]=_['map'](_0x5cf167,_0x464d('0x3c'));_0x5f83c9[_0x464d('0x41')]=_['keys'](_0x647c8['query']);_0x5f83c9[_0x464d('0x42')]=_['intersection'](_0x5f83c9[_0x464d('0x40')],_0x5f83c9['query']);_0x27372c[_0x464d('0x43')]=_[_0x464d('0x44')](_0x5f83c9[_0x464d('0x40')],qs[_0x464d('0x45')](_0x647c8[_0x464d('0x41')][_0x464d('0x45')]));_0x27372c[_0x464d('0x43')]=_0x27372c['attributes'][_0x464d('0x46')]?_0x27372c[_0x464d('0x43')]:_0x5f83c9[_0x464d('0x40')];if(!_0x647c8['query'][_0x464d('0x47')](_0x464d('0x48'))){_0x27372c[_0x464d('0x30')]=qs['limit'](_0x647c8[_0x464d('0x41')][_0x464d('0x30')]);_0x27372c['offset']=qs[_0x464d('0x2e')](_0x647c8[_0x464d('0x41')][_0x464d('0x2e')]);}_0x27372c['order']=qs[_0x464d('0x49')](_0x647c8[_0x464d('0x41')][_0x464d('0x49')]);_0x27372c['where']=qs[_0x464d('0x42')](_[_0x464d('0x4a')](_0x647c8['query'],_0x5f83c9[_0x464d('0x42')]),_0x5cf167);if(_0x647c8[_0x464d('0x41')]['filter']){_0x27372c['where']=_['merge'](_0x27372c[_0x464d('0x4b')],{'$or':_[_0x464d('0x3d')](_0x5cf167,function(_0x32110a){if(_0x32110a[_0x464d('0x4c')]!==_0x464d('0x4d')){var _0x5cecc2={};_0x5cecc2[_0x32110a[_0x464d('0x3c')]]={'$like':'%'+_0x647c8[_0x464d('0x41')][_0x464d('0x4e')]+'%'};return _0x5cecc2;}})});}_0x27372c=_[_0x464d('0x4f')]({},_0x27372c,_0x647c8['options']);var _0x962c2f={'where':_0x27372c['where']};return db[_0x464d('0x50')][_0x464d('0x31')](_0x962c2f)['then'](function(_0x413850){_0x1f2e8b[_0x464d('0x31')]=_0x413850;if(_0x647c8[_0x464d('0x41')][_0x464d('0x51')]){_0x27372c[_0x464d('0x52')]=[{'all':!![]}];}return db[_0x464d('0x50')][_0x464d('0x53')](_0x27372c);})[_0x464d('0x21')](function(_0x1b6e21){_0x1f2e8b[_0x464d('0x54')]=_0x1b6e21;return _0x1f2e8b;})['then'](respondWithFilteredResult(_0x409ed4,_0x27372c))[_0x464d('0x2a')](handleError(_0x409ed4,null));};exports[_0x464d('0x55')]=function(_0x4531e0,_0x1749f4){var _0x325394={'raw':!![],'where':{'id':_0x4531e0[_0x464d('0x56')]['id']}},_0x9a02ec={};_0x9a02ec[_0x464d('0x40')]=_[_0x464d('0x57')](db[_0x464d('0x50')][_0x464d('0x3e')]);_0x9a02ec[_0x464d('0x41')]=_['keys'](_0x4531e0['query']);_0x9a02ec[_0x464d('0x42')]=_[_0x464d('0x44')](_0x9a02ec[_0x464d('0x40')],_0x9a02ec[_0x464d('0x41')]);_0x325394[_0x464d('0x43')]=_['intersection'](_0x9a02ec[_0x464d('0x40')],qs[_0x464d('0x45')](_0x4531e0[_0x464d('0x41')][_0x464d('0x45')]));_0x325394[_0x464d('0x43')]=_0x325394[_0x464d('0x43')][_0x464d('0x46')]?_0x325394['attributes']:_0x9a02ec[_0x464d('0x40')];if(_0x4531e0[_0x464d('0x41')]['includeAll']){_0x325394['include']=[{'all':!![]}];}_0x325394=_[_0x464d('0x4f')]({},_0x325394,_0x4531e0['options']);return db['ChatQueue'][_0x464d('0x58')](_0x325394)[_0x464d('0x21')](handleEntityNotFound(_0x1749f4,null))[_0x464d('0x21')](respondWithResult(_0x1749f4,null))[_0x464d('0x2a')](handleError(_0x1749f4,null));};exports[_0x464d('0x59')]=function(_0x83d89c,_0x3b8825){return db[_0x464d('0x50')][_0x464d('0x59')](_0x83d89c[_0x464d('0x5a')],{})[_0x464d('0x21')](function(_0x4b8ccb){var _0x2d0d9e=_0x83d89c[_0x464d('0x5b')][_0x464d('0x38')]({'plain':!![]});if(!_0x2d0d9e)throw new Error(_0x464d('0x5c'));if(_0x2d0d9e[_0x464d('0x5d')]===_0x464d('0x5b')){var _0xe5dfe7=_0x4b8ccb[_0x464d('0x38')]({'plain':!![]});var _0x3111bc=_0x464d('0x39');return db[_0x464d('0x5e')]['find']({'where':{'name':_0x3111bc,'userProfileId':_0x2d0d9e[_0x464d('0x5f')]},'raw':!![]})[_0x464d('0x21')](function(_0x471070){if(_0x471070&&_0x471070['autoAssociation']===0x0){return db[_0x464d('0x3a')]['create']({'name':_0xe5dfe7[_0x464d('0x3c')],'resourceId':_0xe5dfe7['id'],'type':_0x471070[_0x464d('0x3c')],'sectionId':_0x471070['id']},{})['then'](function(){return _0x4b8ccb;});}else{return _0x4b8ccb;}})[_0x464d('0x2a')](function(_0x32944c){logger[_0x464d('0x25')](_0x464d('0x60'),_0x32944c);throw _0x32944c;});}return _0x4b8ccb;})[_0x464d('0x21')](respondWithResult(_0x3b8825,0xc9))[_0x464d('0x2a')](handleError(_0x3b8825,null));};exports['update']=function(_0x2f9e9d,_0x2285d9){if(_0x2f9e9d[_0x464d('0x5a')]['id']){delete _0x2f9e9d[_0x464d('0x5a')]['id'];}return db[_0x464d('0x50')][_0x464d('0x58')]({'where':{'id':_0x2f9e9d[_0x464d('0x56')]['id']}})['then'](handleEntityNotFound(_0x2285d9,null))['then'](saveUpdates(_0x2f9e9d[_0x464d('0x5a')],null))[_0x464d('0x21')](respondWithResult(_0x2285d9,null))['catch'](handleError(_0x2285d9,null));};exports['destroy']=function(_0x2795cd,_0xca5fba){return db['ChatQueue'][_0x464d('0x58')]({'where':{'id':_0x2795cd[_0x464d('0x56')]['id']}})['then'](handleEntityNotFound(_0xca5fba,null))[_0x464d('0x21')](removeEntity(_0xca5fba,null))[_0x464d('0x2a')](handleError(_0xca5fba,null));};exports['describe']=function(_0x54ebab,_0x3993ba){return db[_0x464d('0x50')][_0x464d('0x61')]()[_0x464d('0x21')](respondWithResult(_0x3993ba,null))['catch'](handleError(_0x3993ba,null));};exports['getMembers']=function(_0x15748b,_0x793c88,_0x1efb2c){var _0x3c0691={'raw':!![],'where':{}},_0x3ae2b7={},_0x5c9796;return db[_0x464d('0x50')][_0x464d('0x62')]({'where':{'id':_0x15748b['params']['id']}})[_0x464d('0x21')](handleEntityNotFound(_0x793c88,null))[_0x464d('0x21')](function(_0x35960f){if(_0x35960f){_0x5c9796=_0x35960f[_0x464d('0x38')]({'plain':!![]});_0x3ae2b7[_0x464d('0x40')]=_[_0x464d('0x57')](db[_0x464d('0x63')][_0x464d('0x3e')]);_0x3ae2b7['query']=_['keys'](_0x15748b[_0x464d('0x41')]);_0x3ae2b7['filters']=_[_0x464d('0x44')](_0x3ae2b7[_0x464d('0x40')],_0x3ae2b7[_0x464d('0x41')]);_0x3c0691[_0x464d('0x43')]=_[_0x464d('0x44')](_0x3ae2b7['model'],qs[_0x464d('0x45')](_0x15748b[_0x464d('0x41')][_0x464d('0x45')]));_0x3c0691[_0x464d('0x43')]=_0x3c0691['attributes']['length']?_0x3c0691['attributes']:_0x3ae2b7[_0x464d('0x40')];if(!_0x15748b[_0x464d('0x41')]['hasOwnProperty'](_0x464d('0x48'))){_0x3c0691[_0x464d('0x30')]=qs[_0x464d('0x30')](_0x15748b[_0x464d('0x41')][_0x464d('0x30')]);_0x3c0691[_0x464d('0x2e')]=qs[_0x464d('0x2e')](_0x15748b['query']['offset']);}_0x3c0691['order']=qs[_0x464d('0x49')](_0x15748b[_0x464d('0x41')][_0x464d('0x49')]);_0x3c0691['where']=qs[_0x464d('0x42')](_[_0x464d('0x4a')](_0x15748b[_0x464d('0x41')],_0x3ae2b7[_0x464d('0x42')]));_0x3c0691[_0x464d('0x4b')][_0x464d('0x64')]=_0x35960f['id'];if(_0x15748b[_0x464d('0x41')]['filter']){_0x3c0691[_0x464d('0x4b')]=_['merge'](_0x3c0691[_0x464d('0x4b')],{'$or':_[_0x464d('0x3d')](_0x3c0691[_0x464d('0x43')],function(_0x34bbcf){var _0x5e75f9={};_0x5e75f9[_0x34bbcf]={'$like':'%'+_0x15748b[_0x464d('0x41')][_0x464d('0x4e')]+'%'};return _0x5e75f9;})});}_0x3c0691=_['merge']({},_0x3c0691,_0x15748b['options']);return db[_0x464d('0x63')][_0x464d('0x53')](_0x3c0691);}})['then'](function(_0x343509){if(_0x343509){return db['User'][_0x464d('0x65')]({'where':{'id':_[_0x464d('0x3d')](_0x343509,'UserId'),'role':_0x464d('0x66')},'attributes':['id',_0x464d('0x3c'),_0x464d('0x67'),_0x464d('0x68'),_0x464d('0x69')]});}})[_0x464d('0x21')](function(_0x555c8a){if(_0x555c8a){return{'count':_0x555c8a['count'],'rows':_[_0x464d('0x3d')](_0x555c8a[_0x464d('0x54')],function(_0x342d75){return{'membername':_0x342d75[_0x464d('0x3c')],'UserId':_0x342d75['id'],'queue_name':_0x5c9796['name'],'ChatQueueId':_0x5c9796['id'],'interface':util['format'](_0x464d('0x6a'),'SIP',_0x342d75['name']),'penalty':0x0,'paused':_0x342d75[_0x464d('0x67')],'createdAt':_0x342d75[_0x464d('0x69')],'updatedAt':_0x342d75[_0x464d('0x68')]};})};}else{return{'count':0x0,'rows':[]};}})[_0x464d('0x21')](respondWithFilteredResult(_0x793c88,_0x3c0691))[_0x464d('0x2a')](handleError(_0x793c88,null));};exports[_0x464d('0x6b')]=function(_0x3089cf,_0x408ea5,_0x4f1ee1){var _0x281107={};var _0x3d9f9a={};var _0x2ccac4;var _0x4d6027;return db[_0x464d('0x50')][_0x464d('0x62')]({'where':{'id':_0x3089cf[_0x464d('0x56')]['id']}})[_0x464d('0x21')](handleEntityNotFound(_0x408ea5,null))['then'](function(_0x52c7ef){if(_0x52c7ef){_0x2ccac4=_0x52c7ef;_0x3d9f9a[_0x464d('0x40')]=_[_0x464d('0x57')](db[_0x464d('0x6c')]['rawAttributes']);_0x3d9f9a['query']=_['keys'](_0x3089cf[_0x464d('0x41')]);_0x3d9f9a['filters']=_[_0x464d('0x44')](_0x3d9f9a[_0x464d('0x40')],_0x3d9f9a['query']);_0x281107[_0x464d('0x43')]=_['intersection'](_0x3d9f9a[_0x464d('0x40')],qs['fields'](_0x3089cf[_0x464d('0x41')][_0x464d('0x45')]));_0x281107[_0x464d('0x43')]=_0x281107[_0x464d('0x43')][_0x464d('0x46')]?_0x281107[_0x464d('0x43')]:_0x3d9f9a[_0x464d('0x40')];_0x281107[_0x464d('0x6d')]=qs[_0x464d('0x49')](_0x3089cf['query'][_0x464d('0x49')]);_0x281107['where']=qs[_0x464d('0x42')](_[_0x464d('0x4a')](_0x3089cf[_0x464d('0x41')],_0x3d9f9a['filters']));if(_0x3089cf[_0x464d('0x41')][_0x464d('0x4e')]){_0x281107[_0x464d('0x4b')]=_[_0x464d('0x4f')](_0x281107['where'],{'$or':_[_0x464d('0x3d')](_0x281107[_0x464d('0x43')],function(_0x3a4093){var _0xb36406={};_0xb36406[_0x3a4093]={'$like':'%'+_0x3089cf[_0x464d('0x41')]['filter']+'%'};return _0xb36406;})});}_0x281107=_['merge']({},_0x281107,_0x3089cf[_0x464d('0x6e')]);return _0x2ccac4['getTeams'](_0x281107);}})[_0x464d('0x21')](function(_0x5afd80){if(_0x5afd80){_0x4d6027=_0x5afd80[_0x464d('0x46')];if(!_0x3089cf[_0x464d('0x41')]['hasOwnProperty'](_0x464d('0x48'))){_0x281107[_0x464d('0x30')]=qs[_0x464d('0x30')](_0x3089cf['query'][_0x464d('0x30')]);_0x281107[_0x464d('0x2e')]=qs['offset'](_0x3089cf[_0x464d('0x41')][_0x464d('0x2e')]);}return _0x2ccac4[_0x464d('0x6b')](_0x281107);}})[_0x464d('0x21')](function(_0x294cd6){if(_0x294cd6){return _0x294cd6?{'count':_0x4d6027,'rows':_0x294cd6}:null;}})[_0x464d('0x21')](respondWithResult(_0x408ea5,null))[_0x464d('0x2a')](handleError(_0x408ea5,null));};exports[_0x464d('0x6f')]=function(_0x3267fc,_0x111fb2,_0x38a819){var _0x528d2b=_0x3267fc[_0x464d('0x5a')][_0x464d('0x70')];return db[_0x464d('0x6c')]['findAll']({'where':{'id':_0x528d2b},'attributes':['id'],'include':[{'model':db[_0x464d('0x71')],'as':_0x464d('0x72'),'attributes':['id',_0x464d('0x3c'),_0x464d('0x73'),_0x464d('0x74'),_0x464d('0x75')],'raw':!![]}]})[_0x464d('0x21')](function(_0x514292){if(_0x514292){var _0x3cb9bc=_[_0x464d('0x76')](_0x514292,function(_0x250e2e){var _0x424c2d=_0x250e2e['get']({'plain':!![]});return _0x424c2d[_0x464d('0x72')];});return db[_0x464d('0x50')][_0x464d('0x58')]({'where':{'id':_0x3267fc[_0x464d('0x56')]['id']}})[_0x464d('0x21')](function(_0x2aa074){return db[_0x464d('0x77')]['transaction'](function(_0x390ebe){return _0x2aa074[_0x464d('0x6f')](_0x528d2b,{'transaction':_0x390ebe})[_0x464d('0x21')](function(){return BPromise['each'](_0x3cb9bc,function(_0x302a42){return db['UserChatQueue'][_0x464d('0x78')]({'where':{'UserId':_0x302a42['id'],'ChatQueueId':_0x3267fc[_0x464d('0x56')]['id']},'transaction':_0x390ebe});});})[_0x464d('0x21')](function(){_0x3cb9bc[_0x464d('0x79')](function(_0x557fa5){socket[_0x464d('0x7a')](_0x464d('0x7b'),{'UserId':_0x557fa5['id'],'ChatQueueId':_0x2aa074['id']});});});});});}})[_0x464d('0x21')](respondWithStatusCode(_0x111fb2,null))['catch'](handleError(_0x111fb2,null));};exports[_0x464d('0x7c')]=function(_0x167c96,_0x4dc05,_0x56292c){return db['Team'][_0x464d('0x53')]({'where':{'id':_0x167c96['query'][_0x464d('0x70')]},'attributes':['id'],'include':[{'model':db[_0x464d('0x71')],'as':_0x464d('0x72'),'attributes':['id'],'raw':!![]}]})[_0x464d('0x21')](handleEntityNotFound(_0x4dc05,null))['then'](function(_0x423b6a){var _0x244a51=_[_0x464d('0x3d')](_0x423b6a,'id');var _0xa85726=[];var _0x5ac33e=[];var _0x56f877=squel['select']();_0x56f877[_0x464d('0x7d')](_0x464d('0x7e'))[_0x464d('0x7f')](_0x464d('0x80'),'tq')[_0x464d('0x81')](_0x464d('0x82'),'ut',_0x464d('0x83'))[_0x464d('0x4b')](_0x464d('0x84'),_0x167c96['params']['id']);for(var _0x467895=0x0;_0x467895<_0x423b6a[_0x464d('0x46')];_0x467895+=0x1){let _0x1255a0=_0x423b6a[_0x467895];for(var _0x126434=0x0;_0x126434<_0x1255a0[_0x464d('0x72')]['length'];_0x126434+=0x1){let _0x4ff71f=_0x1255a0[_0x464d('0x72')][_0x126434];var _0xd54a45=_0x56f877[_0x464d('0x85')]();_0xd54a45[_0x464d('0x4b')](_0x464d('0x86'),_0x4ff71f['id']);_0x5ac33e[_0x464d('0x87')](db[_0x464d('0x77')][_0x464d('0x41')](_0xd54a45[_0x464d('0x88')](),{'type':db[_0x464d('0x77')]['QueryTypes'][_0x464d('0x89')]})[_0x464d('0x21')](function(_0x261c2d){if(_0x261c2d[_0x464d('0x46')]===0x1){return _0x4ff71f['id'];}else{var _0x9903a7=_['every'](_[_0x464d('0x3d')](_0x261c2d,'TeamId'),function(_0x2d0c66){return _[_0x464d('0x8a')](_0x244a51,_0x2d0c66);});if(_0x9903a7){return _0x4ff71f['id'];}}}));}}return BPromise['all'](_0x5ac33e)['then'](function(_0x48c5b1){_0xa85726=_(_0xa85726)[_0x464d('0x8b')](_0x48c5b1)[_0x464d('0x8c')]()[_0x464d('0x8d')]();return db[_0x464d('0x50')]['find']({'where':{'id':_0x167c96['params']['id']}})[_0x464d('0x21')](function(_0x179883){return db[_0x464d('0x77')][_0x464d('0x8e')](function(_0x32cbf5){return _0x179883[_0x464d('0x7c')](_0x167c96[_0x464d('0x41')][_0x464d('0x70')],{'transaction':_0x32cbf5})['then'](function(){if(!_[_0x464d('0x8f')](_0xa85726)){return _0x179883[_0x464d('0x90')](_0xa85726,{'transaction':_0x32cbf5});}})[_0x464d('0x21')](function(){_0xa85726[_0x464d('0x79')](function(_0x186d67){socket['emit'](_0x464d('0x91'),{'UserId':_0x186d67,'ChatQueueId':_0x179883['id']});});});});});});})['then'](respondWithStatusCode(_0x4dc05,null))[_0x464d('0x2a')](handleError(_0x4dc05,null));};exports['addAgents']=function(_0x5bee27,_0x3f6028,_0x41fad3){return db[_0x464d('0x50')][_0x464d('0x58')]({'where':{'id':_0x5bee27[_0x464d('0x56')]['id']}})[_0x464d('0x21')](handleEntityNotFound(_0x3f6028,null))[_0x464d('0x21')](function(_0x11b7c2){if(_0x11b7c2){return _0x11b7c2[_0x464d('0x92')](_0x5bee27[_0x464d('0x5a')][_0x464d('0x70')],_[_0x464d('0x93')](_0x5bee27[_0x464d('0x5a')],[_0x464d('0x70'),'id'])||{})[_0x464d('0x94')](function(_0x7b171c){for(var _0xf51633=0x0;_0xf51633<_0x5bee27['body']['ids'][_0x464d('0x46')];_0xf51633+=0x1){socket[_0x464d('0x7a')]('userChatQueue:save',{'UserId':_0x5bee27[_0x464d('0x5a')]['ids'][_0xf51633],'ChatQueueId':_0x5bee27[_0x464d('0x56')]['id']});}return _0x7b171c;});}})[_0x464d('0x21')](respondWithResult(_0x3f6028,null))[_0x464d('0x2a')](handleError(_0x3f6028,null));};exports['removeAgents']=function(_0x413006,_0x22332b,_0x15899b){return db['ChatQueue'][_0x464d('0x58')]({'where':{'id':_0x413006[_0x464d('0x56')]['id']}})['then'](handleEntityNotFound(_0x22332b,null))[_0x464d('0x21')](function(_0x4b7ed3){if(_0x4b7ed3){return _0x4b7ed3[_0x464d('0x90')](_0x413006[_0x464d('0x41')][_0x464d('0x70')])[_0x464d('0x21')](function(){if(_['isArray'](_0x413006[_0x464d('0x41')]['ids'])){for(var _0xfeed05=0x0;_0xfeed05<_0x413006[_0x464d('0x41')][_0x464d('0x70')]['length'];_0xfeed05+=0x1){socket[_0x464d('0x7a')]('userChatQueue:remove',{'UserId':Number(_0x413006[_0x464d('0x41')][_0x464d('0x70')][_0xfeed05]),'ChatQueueId':Number(_0x413006[_0x464d('0x56')]['id'])});}}else{socket['emit'](_0x464d('0x91'),{'UserId':Number(_0x413006[_0x464d('0x41')][_0x464d('0x70')]),'ChatQueueId':Number(_0x413006[_0x464d('0x56')]['id'])});}});}})['then'](respondWithStatusCode(_0x22332b,null))[_0x464d('0x2a')](handleError(_0x22332b,null));};exports[_0x464d('0x95')]=function(_0x2463cf,_0x2943bb,_0x5d938b){var _0x4d853e={};var _0x4dff3b={};var _0xac575c;var _0x514588;return db[_0x464d('0x50')]['findOne']({'where':{'id':_0x2463cf[_0x464d('0x56')]['id']}})[_0x464d('0x21')](handleEntityNotFound(_0x2943bb,null))[_0x464d('0x21')](function(_0x39375e){if(_0x39375e){_0xac575c=_0x39375e;_0x4dff3b[_0x464d('0x40')]=_['keys'](db['User']['rawAttributes']);_0x4dff3b[_0x464d('0x41')]=_['keys'](_0x2463cf[_0x464d('0x41')]);_0x4dff3b[_0x464d('0x42')]=_[_0x464d('0x44')](_0x4dff3b['model'],_0x4dff3b['query']);_0x4d853e[_0x464d('0x43')]=_['intersection'](_0x4dff3b[_0x464d('0x40')],qs[_0x464d('0x45')](_0x2463cf[_0x464d('0x41')][_0x464d('0x45')]));_0x4d853e['attributes']=_0x4d853e[_0x464d('0x43')][_0x464d('0x46')]?_0x4d853e['attributes']:_0x4dff3b[_0x464d('0x40')];_0x4d853e[_0x464d('0x6d')]=qs[_0x464d('0x49')](_0x2463cf[_0x464d('0x41')][_0x464d('0x49')]);_0x4d853e['where']=qs[_0x464d('0x42')](_[_0x464d('0x4a')](_0x2463cf[_0x464d('0x41')],_0x4dff3b['filters']));if(_0x2463cf[_0x464d('0x41')][_0x464d('0x4e')]){_0x4d853e[_0x464d('0x4b')]=_[_0x464d('0x4f')](_0x4d853e['where'],{'$or':_['map'](_0x4d853e[_0x464d('0x43')],function(_0x463a26){var _0x446f00={};_0x446f00[_0x463a26]={'$like':'%'+_0x2463cf[_0x464d('0x41')][_0x464d('0x4e')]+'%'};return _0x446f00;})});}_0x4d853e=_[_0x464d('0x4f')]({},_0x4d853e,_0x2463cf[_0x464d('0x6e')]);return _0xac575c[_0x464d('0x95')](_0x4d853e);}})[_0x464d('0x21')](function(_0xe983a1){if(_0xe983a1){_0x514588=_0xe983a1[_0x464d('0x46')];if(!_0x2463cf['query']['hasOwnProperty']('nolimit')){_0x4d853e[_0x464d('0x30')]=qs[_0x464d('0x30')](_0x2463cf[_0x464d('0x41')][_0x464d('0x30')]);_0x4d853e['offset']=qs['offset'](_0x2463cf[_0x464d('0x41')][_0x464d('0x2e')]);}return _0xac575c['getAgents'](_0x4d853e);}})[_0x464d('0x21')](function(_0x235d1e){if(_0x235d1e){return _0x235d1e?{'count':_0x514588,'rows':_0x235d1e}:null;}})[_0x464d('0x21')](respondWithResult(_0x2943bb,null))['catch'](handleError(_0x2943bb,null));}; \ No newline at end of file diff --git a/server/api/chatQueue/chatQueue.events.js b/server/api/chatQueue/chatQueue.events.js index a6379fe..93011a4 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 _0x6925=['../../mysqldb','ChatQueue','save','update','remove','hasOwnProperty','exports','events'];(function(_0x4b1749,_0x566e84){var _0x103406=function(_0x1f054b){while(--_0x1f054b){_0x4b1749['push'](_0x4b1749['shift']());}};_0x103406(++_0x566e84);}(_0x6925,0x6f));var _0x5692=function(_0x331f50,_0x5b8cdc){_0x331f50=_0x331f50-0x0;var _0x5f046c=_0x6925[_0x331f50];return _0x5f046c;};'use strict';var EventEmitter=require(_0x5692('0x0'));var ChatQueue=require(_0x5692('0x1'))['db'][_0x5692('0x2')];var ChatQueueEvents=new EventEmitter();ChatQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x5692('0x3'),'afterUpdate':_0x5692('0x4'),'afterDestroy':_0x5692('0x5')};function emitEvent(_0x30c024){return function(_0x58a2d5,_0x5f4558,_0x54d21b){ChatQueueEvents['emit'](_0x30c024+':'+_0x58a2d5['id'],_0x58a2d5);ChatQueueEvents['emit'](_0x30c024,_0x58a2d5);_0x54d21b(null);};}for(var e in events){if(events[_0x5692('0x6')](e)){var event=events[e];ChatQueue['hook'](e,emitEvent(event));}}module[_0x5692('0x7')]=ChatQueueEvents; \ No newline at end of file +var _0x8ab6=['events','../../mysqldb','ChatQueue','setMaxListeners','save','update','remove','emit','hasOwnProperty','exports'];(function(_0x2a5ea7,_0x48aa61){var _0x38b6e0=function(_0x37ff0a){while(--_0x37ff0a){_0x2a5ea7['push'](_0x2a5ea7['shift']());}};_0x38b6e0(++_0x48aa61);}(_0x8ab6,0x8c));var _0x68ab=function(_0x5e8d57,_0x51b92c){_0x5e8d57=_0x5e8d57-0x0;var _0x329bb3=_0x8ab6[_0x5e8d57];return _0x329bb3;};'use strict';var EventEmitter=require(_0x68ab('0x0'));var ChatQueue=require(_0x68ab('0x1'))['db'][_0x68ab('0x2')];var ChatQueueEvents=new EventEmitter();ChatQueueEvents[_0x68ab('0x3')](0x0);var events={'afterCreate':_0x68ab('0x4'),'afterUpdate':_0x68ab('0x5'),'afterDestroy':_0x68ab('0x6')};function emitEvent(_0x3c31ba){return function(_0x2f4228,_0x4bc888,_0x5106d3){ChatQueueEvents['emit'](_0x3c31ba+':'+_0x2f4228['id'],_0x2f4228);ChatQueueEvents[_0x68ab('0x7')](_0x3c31ba,_0x2f4228);_0x5106d3(null);};}for(var e in events){if(events[_0x68ab('0x8')](e)){var event=events[e];ChatQueue['hook'](e,emitEvent(event));}}module[_0x68ab('0x9')]=ChatQueueEvents; \ No newline at end of file diff --git a/server/api/chatQueue/chatQueue.model.js b/server/api/chatQueue/chatQueue.model.js index 466f435..bde8bc5 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 _0x9ec0=['../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','./chatQueue.attributes','define','chat_queues','lodash','util'];(function(_0xd22792,_0x3deea5){var _0x20563a=function(_0x27a095){while(--_0x27a095){_0xd22792['push'](_0xd22792['shift']());}};_0x20563a(++_0x3deea5);}(_0x9ec0,0x15a));var _0x09ec=function(_0x4a3885,_0x52b8e4){_0x4a3885=_0x4a3885-0x0;var _0x5e4687=_0x9ec0[_0x4a3885];return _0x5e4687;};'use strict';var _=require(_0x09ec('0x0'));var util=require(_0x09ec('0x1'));var logger=require(_0x09ec('0x2'))(_0x09ec('0x3'));var moment=require(_0x09ec('0x4'));var BPromise=require(_0x09ec('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x09ec('0x6'));var rimraf=require(_0x09ec('0x7'));var config=require(_0x09ec('0x8'));var attributes=require(_0x09ec('0x9'));module['exports']=function(_0x1d76c1,_0x40742f){return _0x1d76c1[_0x09ec('0xa')]('ChatQueue',attributes,{'tableName':_0x09ec('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xf70f=['api','bluebird','path','rimraf','ChatQueue','chat_queues','util','../../config/logger'];(function(_0x5b8726,_0x596855){var _0x2c81ab=function(_0x1546e4){while(--_0x1546e4){_0x5b8726['push'](_0x5b8726['shift']());}};_0x2c81ab(++_0x596855);}(_0xf70f,0xee));var _0xff70=function(_0x352d28,_0x444033){_0x352d28=_0x352d28-0x0;var _0x387d7e=_0xf70f[_0x352d28];return _0x387d7e;};'use strict';var _=require('lodash');var util=require(_0xff70('0x0'));var logger=require(_0xff70('0x1'))(_0xff70('0x2'));var moment=require('moment');var BPromise=require(_0xff70('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xff70('0x4'));var rimraf=require(_0xff70('0x5'));var config=require('../../config/environment');var attributes=require('./chatQueue.attributes');module['exports']=function(_0x5e57cd,_0x5279e7){return _0x5e57cd['define'](_0xff70('0x6'),attributes,{'tableName':_0xff70('0x7'),'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 4732582..084a15d 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 _0x19e1=['then','info','request\x20sent','debug','ChatQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','ChatQueue,\x20%s,\x20%s','message','result','catch','GetChatQueue','findAll','options','where','attributes','limit','include','model','map','ShowChatQueue','lodash','util','moment','bluebird','../../mysqldb','../../config/utils','rpc','../../config/environment','client','redis','defaults','localhost','./chatQueue.socket','register','request'];(function(_0x3101ff,_0x3be738){var _0x149962=function(_0x43ea4c){while(--_0x43ea4c){_0x3101ff['push'](_0x3101ff['shift']());}};_0x149962(++_0x3be738);}(_0x19e1,0x163));var _0x119e=function(_0x18ab2a,_0x4debcd){_0x18ab2a=_0x18ab2a-0x0;var _0x16dcee=_0x19e1[_0x18ab2a];return _0x16dcee;};'use strict';var _=require(_0x119e('0x0'));var util=require(_0x119e('0x1'));var moment=require(_0x119e('0x2'));var BPromise=require(_0x119e('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x119e('0x4'))['db'];var utils=require(_0x119e('0x5'));var logger=require('../../config/logger')(_0x119e('0x6'));var config=require(_0x119e('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x119e('0x8')]['http']({'port':0x232a});config[_0x119e('0x9')]=_[_0x119e('0xa')](config[_0x119e('0x9')],{'host':_0x119e('0xb'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x119e('0x9')]));require(_0x119e('0xc'))[_0x119e('0xd')](socket);function respondWithRpcPromise(_0x4999f4,_0x4ee06c,_0x391163){return new BPromise(function(_0xc2c4a7,_0x3199b1){return client[_0x119e('0xe')](_0x4999f4,_0x391163)[_0x119e('0xf')](function(_0x24a27b){logger[_0x119e('0x10')]('ChatQueue,\x20%s,\x20%s',_0x4ee06c,_0x119e('0x11'));logger[_0x119e('0x12')](_0x119e('0x13'),_0x4ee06c,_0x119e('0x11'),JSON[_0x119e('0x14')](_0x24a27b));if(_0x24a27b[_0x119e('0x15')]){if(_0x24a27b['error'][_0x119e('0x16')]===0x1f4){logger[_0x119e('0x15')](_0x119e('0x17'),_0x4ee06c,_0x24a27b[_0x119e('0x15')][_0x119e('0x18')]);return _0x3199b1(_0x24a27b[_0x119e('0x15')][_0x119e('0x18')]);}logger[_0x119e('0x15')](_0x119e('0x17'),_0x4ee06c,_0x24a27b[_0x119e('0x15')][_0x119e('0x18')]);return _0xc2c4a7(_0x24a27b['error'][_0x119e('0x18')]);}else{logger[_0x119e('0x10')](_0x119e('0x17'),_0x4ee06c,_0x119e('0x11'));_0xc2c4a7(_0x24a27b[_0x119e('0x19')][_0x119e('0x18')]);}})[_0x119e('0x1a')](function(_0x35d22c){logger[_0x119e('0x15')](_0x119e('0x17'),_0x4ee06c,_0x35d22c);_0x3199b1(_0x35d22c);});});}exports[_0x119e('0x1b')]=function(_0x485004){var _0x9ef059=this;return new Promise(function(_0x5ef280,_0xd4c2d5){return db['ChatQueue'][_0x119e('0x1c')]({'raw':_0x485004[_0x119e('0x1d')]?_0x485004['options']['raw']===undefined?!![]:![]:!![],'where':_0x485004[_0x119e('0x1d')]?_0x485004[_0x119e('0x1d')][_0x119e('0x1e')]||null:null,'attributes':_0x485004['options']?_0x485004['options'][_0x119e('0x1f')]||null:null,'limit':_0x485004['options']?_0x485004[_0x119e('0x1d')][_0x119e('0x20')]||null:null,'include':_0x485004[_0x119e('0x1d')]?_0x485004['options'][_0x119e('0x21')]?_['map'](_0x485004[_0x119e('0x1d')]['include'],function(_0x5c57a2){return{'model':db[_0x5c57a2[_0x119e('0x22')]],'as':_0x5c57a2['as'],'attributes':_0x5c57a2[_0x119e('0x1f')],'include':_0x5c57a2[_0x119e('0x21')]?_[_0x119e('0x23')](_0x5c57a2[_0x119e('0x21')],function(_0x3a9588){return{'model':db[_0x3a9588['model']],'as':_0x3a9588['as'],'attributes':_0x3a9588[_0x119e('0x1f')],'include':_0x3a9588[_0x119e('0x21')]?_['map'](_0x3a9588[_0x119e('0x21')],function(_0x1ca670){return{'model':db[_0x1ca670['model']],'as':_0x1ca670['as'],'attributes':_0x1ca670[_0x119e('0x1f')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x12d101){logger[_0x119e('0x10')](_0x119e('0x1b'),_0x485004);logger[_0x119e('0x12')](_0x119e('0x1b'),_0x485004,JSON['stringify'](_0x12d101));_0x5ef280(_0x12d101);})[_0x119e('0x1a')](function(_0x51f157){logger[_0x119e('0x15')](_0x119e('0x1b'),_0x51f157[_0x119e('0x18')],_0x485004);_0xd4c2d5(_0x9ef059[_0x119e('0x15')](0x1f4,_0x51f157['message']));});});};exports['ShowChatQueue']=function(_0x4dcf5f){var _0x51b910=this;return new Promise(function(_0x3beec1,_0x58a8e3){return db['ChatQueue']['find']({'raw':_0x4dcf5f[_0x119e('0x1d')]?_0x4dcf5f[_0x119e('0x1d')]['raw']===undefined?!![]:![]:!![],'where':_0x4dcf5f[_0x119e('0x1d')]?_0x4dcf5f[_0x119e('0x1d')]['where']||null:null,'attributes':_0x4dcf5f[_0x119e('0x1d')]?_0x4dcf5f[_0x119e('0x1d')][_0x119e('0x1f')]||null:null,'include':_0x4dcf5f[_0x119e('0x1d')]?_0x4dcf5f[_0x119e('0x1d')][_0x119e('0x21')]?_[_0x119e('0x23')](_0x4dcf5f[_0x119e('0x1d')][_0x119e('0x21')],function(_0xf4755){return{'model':db[_0xf4755[_0x119e('0x22')]],'as':_0xf4755['as'],'attributes':_0xf4755[_0x119e('0x1f')],'include':_0xf4755[_0x119e('0x21')]?_[_0x119e('0x23')](_0xf4755[_0x119e('0x21')],function(_0x4d6674){return{'model':db[_0x4d6674[_0x119e('0x22')]],'as':_0x4d6674['as'],'attributes':_0x4d6674[_0x119e('0x1f')],'include':_0x4d6674[_0x119e('0x21')]?_['map'](_0x4d6674[_0x119e('0x21')],function(_0x26499e){return{'model':db[_0x26499e[_0x119e('0x22')]],'as':_0x26499e['as'],'attributes':_0x26499e[_0x119e('0x1f')]};}):[]};}):[]};}):[]:[]})[_0x119e('0xf')](function(_0x47b2ac){logger['info'](_0x119e('0x24'),_0x4dcf5f);logger[_0x119e('0x12')](_0x119e('0x24'),_0x4dcf5f,JSON[_0x119e('0x14')](_0x47b2ac));_0x3beec1(_0x47b2ac);})[_0x119e('0x1a')](function(_0x16712c){logger[_0x119e('0x15')]('ShowChatQueue',_0x16712c['message'],_0x4dcf5f);_0x58a8e3(_0x51b910[_0x119e('0x15')](0x1f4,_0x16712c['message']));});});}; \ No newline at end of file +var _0x0993=['then','info','ChatQueue,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','catch','GetChatQueue','findAll','options','raw','attributes','limit','include','ShowChatQueue','find','where','map','model','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/logger','jayson/promise','client','http','redis','defaults','socket.io-emitter','./chatQueue.socket','request'];(function(_0x1eccbd,_0x46478d){var _0x50d8d5=function(_0x31497f){while(--_0x31497f){_0x1eccbd['push'](_0x1eccbd['shift']());}};_0x50d8d5(++_0x46478d);}(_0x0993,0x81));var _0x3099=function(_0x11a6e0,_0x5c806a){_0x11a6e0=_0x11a6e0-0x0;var _0x50fcb6=_0x0993[_0x11a6e0];return _0x50fcb6;};'use strict';var _=require(_0x3099('0x0'));var util=require(_0x3099('0x1'));var moment=require(_0x3099('0x2'));var BPromise=require(_0x3099('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x3099('0x4'));var db=require(_0x3099('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x3099('0x6'))('rpc');var config=require('../../config/environment');var jayson=require(_0x3099('0x7'));var client=jayson[_0x3099('0x8')][_0x3099('0x9')]({'port':0x232a});config[_0x3099('0xa')]=_[_0x3099('0xb')](config[_0x3099('0xa')],{'host':'localhost','port':0x18eb});var socket=require(_0x3099('0xc'))(new Redis(config[_0x3099('0xa')]));require(_0x3099('0xd'))['register'](socket);function respondWithRpcPromise(_0x42541f,_0x1851ac,_0x119a10){return new BPromise(function(_0x19e29f,_0x151257){return client[_0x3099('0xe')](_0x42541f,_0x119a10)[_0x3099('0xf')](function(_0xd89d1f){logger[_0x3099('0x10')](_0x3099('0x11'),_0x1851ac,_0x3099('0x12'));logger[_0x3099('0x13')]('ChatQueue,\x20%s,\x20%s,\x20%s',_0x1851ac,_0x3099('0x12'),JSON[_0x3099('0x14')](_0xd89d1f));if(_0xd89d1f[_0x3099('0x15')]){if(_0xd89d1f[_0x3099('0x15')]['code']===0x1f4){logger[_0x3099('0x15')](_0x3099('0x11'),_0x1851ac,_0xd89d1f[_0x3099('0x15')][_0x3099('0x16')]);return _0x151257(_0xd89d1f[_0x3099('0x15')][_0x3099('0x16')]);}logger['error'](_0x3099('0x11'),_0x1851ac,_0xd89d1f['error'][_0x3099('0x16')]);return _0x19e29f(_0xd89d1f['error']['message']);}else{logger[_0x3099('0x10')]('ChatQueue,\x20%s,\x20%s',_0x1851ac,_0x3099('0x12'));_0x19e29f(_0xd89d1f['result'][_0x3099('0x16')]);}})[_0x3099('0x17')](function(_0xb44433){logger[_0x3099('0x15')](_0x3099('0x11'),_0x1851ac,_0xb44433);_0x151257(_0xb44433);});});}exports[_0x3099('0x18')]=function(_0x2632bd){var _0xeddbf=this;return new Promise(function(_0x5a2150,_0x2224a5){return db['ChatQueue'][_0x3099('0x19')]({'raw':_0x2632bd[_0x3099('0x1a')]?_0x2632bd[_0x3099('0x1a')][_0x3099('0x1b')]===undefined?!![]:![]:!![],'where':_0x2632bd[_0x3099('0x1a')]?_0x2632bd[_0x3099('0x1a')]['where']||null:null,'attributes':_0x2632bd[_0x3099('0x1a')]?_0x2632bd[_0x3099('0x1a')][_0x3099('0x1c')]||null:null,'limit':_0x2632bd[_0x3099('0x1a')]?_0x2632bd[_0x3099('0x1a')][_0x3099('0x1d')]||null:null,'include':_0x2632bd[_0x3099('0x1a')]?_0x2632bd[_0x3099('0x1a')][_0x3099('0x1e')]?_['map'](_0x2632bd['options']['include'],function(_0x1b5c53){return{'model':db[_0x1b5c53['model']],'as':_0x1b5c53['as'],'attributes':_0x1b5c53['attributes'],'include':_0x1b5c53[_0x3099('0x1e')]?_['map'](_0x1b5c53[_0x3099('0x1e')],function(_0x4154b8){return{'model':db[_0x4154b8['model']],'as':_0x4154b8['as'],'attributes':_0x4154b8[_0x3099('0x1c')],'include':_0x4154b8[_0x3099('0x1e')]?_['map'](_0x4154b8[_0x3099('0x1e')],function(_0x4f3678){return{'model':db[_0x4f3678['model']],'as':_0x4f3678['as'],'attributes':_0x4f3678[_0x3099('0x1c')]};}):[]};}):[]};}):[]:[]})[_0x3099('0xf')](function(_0x1d77ed){logger[_0x3099('0x10')]('GetChatQueue',_0x2632bd);logger[_0x3099('0x13')](_0x3099('0x18'),_0x2632bd,JSON[_0x3099('0x14')](_0x1d77ed));_0x5a2150(_0x1d77ed);})[_0x3099('0x17')](function(_0x5a8912){logger[_0x3099('0x15')]('GetChatQueue',_0x5a8912[_0x3099('0x16')],_0x2632bd);_0x2224a5(_0xeddbf[_0x3099('0x15')](0x1f4,_0x5a8912[_0x3099('0x16')]));});});};exports[_0x3099('0x1f')]=function(_0x4c98c5){var _0x2786ac=this;return new Promise(function(_0x4d6563,_0x44e36e){return db['ChatQueue'][_0x3099('0x20')]({'raw':_0x4c98c5[_0x3099('0x1a')]?_0x4c98c5[_0x3099('0x1a')][_0x3099('0x1b')]===undefined?!![]:![]:!![],'where':_0x4c98c5['options']?_0x4c98c5[_0x3099('0x1a')][_0x3099('0x21')]||null:null,'attributes':_0x4c98c5[_0x3099('0x1a')]?_0x4c98c5[_0x3099('0x1a')][_0x3099('0x1c')]||null:null,'include':_0x4c98c5[_0x3099('0x1a')]?_0x4c98c5[_0x3099('0x1a')][_0x3099('0x1e')]?_[_0x3099('0x22')](_0x4c98c5[_0x3099('0x1a')][_0x3099('0x1e')],function(_0x522284){return{'model':db[_0x522284[_0x3099('0x23')]],'as':_0x522284['as'],'attributes':_0x522284['attributes'],'include':_0x522284[_0x3099('0x1e')]?_[_0x3099('0x22')](_0x522284[_0x3099('0x1e')],function(_0x1dd4f1){return{'model':db[_0x1dd4f1[_0x3099('0x23')]],'as':_0x1dd4f1['as'],'attributes':_0x1dd4f1[_0x3099('0x1c')],'include':_0x1dd4f1[_0x3099('0x1e')]?_[_0x3099('0x22')](_0x1dd4f1['include'],function(_0x29594d){return{'model':db[_0x29594d[_0x3099('0x23')]],'as':_0x29594d['as'],'attributes':_0x29594d[_0x3099('0x1c')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x33f270){logger[_0x3099('0x10')](_0x3099('0x1f'),_0x4c98c5);logger[_0x3099('0x13')](_0x3099('0x1f'),_0x4c98c5,JSON['stringify'](_0x33f270));_0x4d6563(_0x33f270);})['catch'](function(_0x3035be){logger[_0x3099('0x15')]('ShowChatQueue',_0x3035be['message'],_0x4c98c5);_0x44e36e(_0x2786ac[_0x3099('0x15')](0x1f4,_0x3035be['message']));});});}; \ No newline at end of file diff --git a/server/api/chatQueue/chatQueue.socket.js b/server/api/chatQueue/chatQueue.socket.js index 67fc6ca..49e9ca9 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 _0x4bc3=['register','chatQueue:','./chatQueue.events','save','update','emit','removeListener'];(function(_0x449fb0,_0xf691a2){var _0x10bb91=function(_0x86e613){while(--_0x86e613){_0x449fb0['push'](_0x449fb0['shift']());}};_0x10bb91(++_0xf691a2);}(_0x4bc3,0x16e));var _0x34bc=function(_0x2070da,_0x45e586){_0x2070da=_0x2070da-0x0;var _0x4f9fe1=_0x4bc3[_0x2070da];return _0x4f9fe1;};'use strict';var ChatQueueEvents=require(_0x34bc('0x0'));var events=[_0x34bc('0x1'),'remove',_0x34bc('0x2')];function createListener(_0x2c0897,_0x5b45c7){return function(_0x178fc0){_0x5b45c7[_0x34bc('0x3')](_0x2c0897,_0x178fc0);};}function removeListener(_0x3ce1c3,_0x2e043e){return function(){ChatQueueEvents[_0x34bc('0x4')](_0x3ce1c3,_0x2e043e);};}exports[_0x34bc('0x5')]=function(_0x2cc9c2){for(var _0x4c63a1=0x0,_0x21451b=events['length'];_0x4c63a1<_0x21451b;_0x4c63a1++){var _0x502087=events[_0x4c63a1];var _0x18a01c=createListener(_0x34bc('0x6')+_0x502087,_0x2cc9c2);ChatQueueEvents['on'](_0x502087,_0x18a01c);}}; \ No newline at end of file +var _0xb469=['./chatQueue.events','save','remove','update','register'];(function(_0x363b6c,_0x49732c){var _0x3e8764=function(_0x8e4713){while(--_0x8e4713){_0x363b6c['push'](_0x363b6c['shift']());}};_0x3e8764(++_0x49732c);}(_0xb469,0x13b));var _0x9b46=function(_0xa3edb0,_0x2c2204){_0xa3edb0=_0xa3edb0-0x0;var _0x44a940=_0xb469[_0xa3edb0];return _0x44a940;};'use strict';var ChatQueueEvents=require(_0x9b46('0x0'));var events=[_0x9b46('0x1'),_0x9b46('0x2'),_0x9b46('0x3')];function createListener(_0x1a41e8,_0x895347){return function(_0x9212ae){_0x895347['emit'](_0x1a41e8,_0x9212ae);};}function removeListener(_0x31f853,_0x45322f){return function(){ChatQueueEvents['removeListener'](_0x31f853,_0x45322f);};}exports[_0x9b46('0x4')]=function(_0x405d1c){for(var _0x50b49e=0x0,_0x1b2dd3=events['length'];_0x50b49e<_0x1b2dd3;_0x50b49e++){var _0x4c1ed9=events[_0x50b49e];var _0x34c0de=createListener('chatQueue:'+_0x4c1ed9,_0x405d1c);ChatQueueEvents['on'](_0x4c1ed9,_0x34c0de);}}; \ No newline at end of file diff --git a/server/api/chatQueue/index.js b/server/api/chatQueue/index.js index daa8248..e451a89 100644 --- a/server/api/chatQueue/index.js +++ b/server/api/chatQueue/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x55ca=['post','addAgents','update','delete','destroy','removeTeams','removeAgents','exports','multer','util','Router','fs-extra','../../components/interaction/service','../../config/environment','./chatQueue.controller','get','isAuthenticated','index','describe','/:id','/:id/members','getMembers','/:id/teams','getTeams','/:id/users','addTeams'];(function(_0x28849c,_0xf17ed2){var _0x5444ed=function(_0x278dbc){while(--_0x278dbc){_0x28849c['push'](_0x28849c['shift']());}};_0x5444ed(++_0xf17ed2);}(_0x55ca,0x126));var _0xa55c=function(_0x525c7b,_0x488fcc){_0x525c7b=_0x525c7b-0x0;var _0x27b33e=_0x55ca[_0x525c7b];return _0x27b33e;};'use strict';var multer=require(_0xa55c('0x0'));var util=require(_0xa55c('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0xa55c('0x2')]();var fs_extra=require(_0xa55c('0x3'));var auth=require('../../components/auth/service');var interaction=require(_0xa55c('0x4'));var config=require(_0xa55c('0x5'));var controller=require(_0xa55c('0x6'));router[_0xa55c('0x7')]('/',auth[_0xa55c('0x8')](),controller[_0xa55c('0x9')]);router[_0xa55c('0x7')]('/describe',auth[_0xa55c('0x8')](),controller[_0xa55c('0xa')]);router['get'](_0xa55c('0xb'),auth[_0xa55c('0x8')](),controller['show']);router['get'](_0xa55c('0xc'),auth[_0xa55c('0x8')](),controller[_0xa55c('0xd')]);router[_0xa55c('0x7')](_0xa55c('0xe'),auth[_0xa55c('0x8')](),controller[_0xa55c('0xf')]);router[_0xa55c('0x7')](_0xa55c('0x10'),auth[_0xa55c('0x8')](),controller['getAgents']);router['post']('/',auth[_0xa55c('0x8')](),controller['create']);router['post']('/:id/teams',auth[_0xa55c('0x8')](),controller[_0xa55c('0x11')]);router[_0xa55c('0x12')](_0xa55c('0x10'),auth[_0xa55c('0x8')](),controller[_0xa55c('0x13')]);router['put'](_0xa55c('0xb'),auth[_0xa55c('0x8')](),controller[_0xa55c('0x14')]);router[_0xa55c('0x15')](_0xa55c('0xb'),auth[_0xa55c('0x8')](),controller[_0xa55c('0x16')]);router[_0xa55c('0x15')](_0xa55c('0xe'),auth['isAuthenticated'](),controller[_0xa55c('0x17')]);router[_0xa55c('0x15')](_0xa55c('0x10'),auth[_0xa55c('0x8')](),controller[_0xa55c('0x18')]);module[_0xa55c('0x19')]=router; \ No newline at end of file +var _0x814b=['/:id/members','getMembers','/:id/teams','getTeams','/:id/users','getAgents','post','create','addTeams','addAgents','put','update','delete','removeTeams','removeAgents','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatQueue.controller','get','isAuthenticated','/describe','describe','/:id','show'];(function(_0x281334,_0x4d8013){var _0x115f37=function(_0x3f55e6){while(--_0x3f55e6){_0x281334['push'](_0x281334['shift']());}};_0x115f37(++_0x4d8013);}(_0x814b,0x1a2));var _0xb814=function(_0x5338fe,_0x5e71d1){_0x5338fe=_0x5338fe-0x0;var _0xf0a1be=_0x814b[_0x5338fe];return _0xf0a1be;};'use strict';var multer=require(_0xb814('0x0'));var util=require(_0xb814('0x1'));var path=require(_0xb814('0x2'));var timeout=require(_0xb814('0x3'));var express=require(_0xb814('0x4'));var router=express[_0xb814('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0xb814('0x6'));var interaction=require(_0xb814('0x7'));var config=require(_0xb814('0x8'));var controller=require(_0xb814('0x9'));router[_0xb814('0xa')]('/',auth[_0xb814('0xb')](),controller['index']);router[_0xb814('0xa')](_0xb814('0xc'),auth['isAuthenticated'](),controller[_0xb814('0xd')]);router[_0xb814('0xa')](_0xb814('0xe'),auth[_0xb814('0xb')](),controller[_0xb814('0xf')]);router[_0xb814('0xa')](_0xb814('0x10'),auth[_0xb814('0xb')](),controller[_0xb814('0x11')]);router[_0xb814('0xa')](_0xb814('0x12'),auth['isAuthenticated'](),controller[_0xb814('0x13')]);router['get'](_0xb814('0x14'),auth[_0xb814('0xb')](),controller[_0xb814('0x15')]);router[_0xb814('0x16')]('/',auth[_0xb814('0xb')](),controller[_0xb814('0x17')]);router[_0xb814('0x16')](_0xb814('0x12'),auth[_0xb814('0xb')](),controller[_0xb814('0x18')]);router[_0xb814('0x16')](_0xb814('0x14'),auth[_0xb814('0xb')](),controller[_0xb814('0x19')]);router[_0xb814('0x1a')](_0xb814('0xe'),auth[_0xb814('0xb')](),controller[_0xb814('0x1b')]);router[_0xb814('0x1c')](_0xb814('0xe'),auth[_0xb814('0xb')](),controller['destroy']);router[_0xb814('0x1c')]('/:id/teams',auth[_0xb814('0xb')](),controller[_0xb814('0x1d')]);router['delete']('/:id/users',auth['isAuthenticated'](),controller[_0xb814('0x1e')]);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 1e21240..41893e7 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 _0xa82a=['exports','STRING','DATE','sequelize'];(function(_0x10b1d3,_0x10b944){var _0x55a442=function(_0x16cbec){while(--_0x16cbec){_0x10b1d3['push'](_0x10b1d3['shift']());}};_0x55a442(++_0x10b944);}(_0xa82a,0x19f));var _0xaa82=function(_0x16b0cd,_0xeedf92){_0x16b0cd=_0x16b0cd-0x0;var _0x59d7dd=_0xa82a[_0x16b0cd];return _0x59d7dd;};'use strict';var moment=require('moment');var Sequelize=require(_0xaa82('0x0'));module[_0xaa82('0x1')]={'uniqueid':{'type':Sequelize[_0xaa82('0x2')],'allowNull':![]},'from':{'type':Sequelize['STRING']},'joinAt':{'type':Sequelize[_0xaa82('0x3')]},'leaveAt':{'type':Sequelize[_0xaa82('0x3')]},'acceptAt':{'type':Sequelize[_0xaa82('0x3')]},'exitAt':{'type':Sequelize[_0xaa82('0x3')]},'reason':{'type':Sequelize[_0xaa82('0x2')]}}; \ No newline at end of file +var _0xbd5f=['moment','sequelize','exports','STRING','DATE'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xbd5f,0x1db));var _0xfbd5=function(_0x39775f,_0x58517d){_0x39775f=_0x39775f-0x0;var _0x208789=_0xbd5f[_0x39775f];return _0x208789;};'use strict';var moment=require(_0xfbd5('0x0'));var Sequelize=require(_0xfbd5('0x1'));module[_0xfbd5('0x2')]={'uniqueid':{'type':Sequelize[_0xfbd5('0x3')],'allowNull':![]},'from':{'type':Sequelize[_0xfbd5('0x3')]},'joinAt':{'type':Sequelize['DATE']},'leaveAt':{'type':Sequelize['DATE']},'acceptAt':{'type':Sequelize[_0xfbd5('0x4')]},'exitAt':{'type':Sequelize[_0xfbd5('0x4')]},'reason':{'type':Sequelize[_0xfbd5('0x3')]}}; \ No newline at end of file diff --git a/server/api/chatQueueReport/chatQueueReport.controller.js b/server/api/chatQueueReport/chatQueueReport.controller.js index a4053ae..ac3bb87 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 _0x8be8=['attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','VIRTUAL','merge','options','includeAll','include','rows','catch','show','params','find','create','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','ejs','lodash','squel','crypto','jsforce','desk.js','to-csv','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/license/util','sendStatus','status','end','json','undefined','limit','count','offset','Content-Range','apply','save','update','then','destroy','error','stack','name','index','map','ChatQueueReport','rawAttributes','fieldName','type','model','query','keys','filters','intersection','fields'];(function(_0x5f51d2,_0x4f0133){var _0x24bf08=function(_0x25e6b5){while(--_0x25e6b5){_0x5f51d2['push'](_0x5f51d2['shift']());}};_0x24bf08(++_0x4f0133);}(_0x8be8,0xf6));var _0x88be=function(_0x3c662a,_0x7de22a){_0x3c662a=_0x3c662a-0x0;var _0x1165e1=_0x8be8[_0x3c662a];return _0x1165e1;};'use strict';var emlformat=require(_0x88be('0x0'));var rimraf=require(_0x88be('0x1'));var zipdir=require(_0x88be('0x2'));var jsonpatch=require(_0x88be('0x3'));var rp=require(_0x88be('0x4'));var moment=require(_0x88be('0x5'));var BPromise=require(_0x88be('0x6'));var Mustache=require(_0x88be('0x7'));var util=require(_0x88be('0x8'));var path=require('path');var sox=require(_0x88be('0x9'));var csv=require('to-csv');var ejs=require(_0x88be('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x88be('0xb'));var squel=require(_0x88be('0xc'));var crypto=require(_0x88be('0xd'));var jsforce=require(_0x88be('0xe'));var deskjs=require(_0x88be('0xf'));var toCsv=require(_0x88be('0x10'));var querystring=require('querystring');var Papa=require(_0x88be('0x11'));var Redis=require('ioredis');var authService=require(_0x88be('0x12'));var qs=require(_0x88be('0x13'));var as=require(_0x88be('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x88be('0x15'))(_0x88be('0x16'));var utils=require(_0x88be('0x17'));var config=require('../../config/environment');var licenseUtil=require(_0x88be('0x18'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x321775,_0x484d78){_0x484d78=_0x484d78||0xcc;return function(_0x51ee23){if(_0x51ee23){return _0x321775[_0x88be('0x19')](_0x484d78);}return _0x321775[_0x88be('0x1a')](_0x484d78)[_0x88be('0x1b')]();};}function respondWithResult(_0x220d9f,_0x1f6f57){_0x1f6f57=_0x1f6f57||0xc8;return function(_0x209623){if(_0x209623){return _0x220d9f[_0x88be('0x1a')](_0x1f6f57)[_0x88be('0x1c')](_0x209623);}};}function respondWithFilteredResult(_0x4ec7cc,_0xefc67){return function(_0x94737d){if(_0x94737d){var _0x44a12f=typeof _0xefc67['offset']===_0x88be('0x1d')&&typeof _0xefc67[_0x88be('0x1e')]==='undefined';var _0x3566e7=_0x94737d[_0x88be('0x1f')];var _0xf43785=_0x44a12f?0x0:_0xefc67[_0x88be('0x20')];var _0x152918=_0x44a12f?_0x94737d[_0x88be('0x1f')]:_0xefc67[_0x88be('0x20')]+_0xefc67[_0x88be('0x1e')];var _0x53fb85;if(_0x152918>=_0x3566e7){_0x152918=_0x3566e7;_0x53fb85=0xc8;}else{_0x53fb85=0xce;}_0x4ec7cc[_0x88be('0x1a')](_0x53fb85);return _0x4ec7cc['set'](_0x88be('0x21'),_0xf43785+'-'+_0x152918+'/'+_0x3566e7)['json'](_0x94737d);}return null;};}function patchUpdates(_0x51c0e4){return function(_0x2fd77d){try{jsonpatch[_0x88be('0x22')](_0x2fd77d,_0x51c0e4,!![]);}catch(_0x4079f7){return BPromise['reject'](_0x4079f7);}return _0x2fd77d[_0x88be('0x23')]();};}function saveUpdates(_0x332e50,_0x1d0414){return function(_0x213580){if(_0x213580){return _0x213580[_0x88be('0x24')](_0x332e50)[_0x88be('0x25')](function(_0x466b19){return _0x466b19;});}return null;};}function removeEntity(_0x344c20,_0xdd27c1){return function(_0x215024){if(_0x215024){return _0x215024[_0x88be('0x26')]()[_0x88be('0x25')](function(){_0x344c20[_0x88be('0x1a')](0xcc)[_0x88be('0x1b')]();});}};}function handleEntityNotFound(_0x1c3e45,_0x2be310){return function(_0x5c1671){if(!_0x5c1671){_0x1c3e45[_0x88be('0x19')](0x194);}return _0x5c1671;};}function handleError(_0x1c9be2,_0x20c9de){_0x20c9de=_0x20c9de||0x1f4;return function(_0x58b671){logger[_0x88be('0x27')](_0x58b671[_0x88be('0x28')]);if(_0x58b671[_0x88be('0x29')]){delete _0x58b671[_0x88be('0x29')];}_0x1c9be2[_0x88be('0x1a')](_0x20c9de)['send'](_0x58b671);};}exports[_0x88be('0x2a')]=function(_0x48f6a0,_0x3dc88a){var _0x537c0b={},_0x3a08fa={},_0x2fe023={'count':0x0,'rows':[]};var _0x1af670=_[_0x88be('0x2b')](db[_0x88be('0x2c')][_0x88be('0x2d')],function(_0x3180a5){return{'name':_0x3180a5[_0x88be('0x2e')],'type':_0x3180a5[_0x88be('0x2f')]['key']};});_0x3a08fa[_0x88be('0x30')]=_[_0x88be('0x2b')](_0x1af670,_0x88be('0x29'));_0x3a08fa[_0x88be('0x31')]=_[_0x88be('0x32')](_0x48f6a0[_0x88be('0x31')]);_0x3a08fa[_0x88be('0x33')]=_[_0x88be('0x34')](_0x3a08fa[_0x88be('0x30')],_0x3a08fa['query']);_0x537c0b['attributes']=_[_0x88be('0x34')](_0x3a08fa[_0x88be('0x30')],qs[_0x88be('0x35')](_0x48f6a0['query']['fields']));_0x537c0b[_0x88be('0x36')]=_0x537c0b['attributes'][_0x88be('0x37')]?_0x537c0b['attributes']:_0x3a08fa[_0x88be('0x30')];if(!_0x48f6a0[_0x88be('0x31')][_0x88be('0x38')](_0x88be('0x39'))){_0x537c0b[_0x88be('0x1e')]=qs[_0x88be('0x1e')](_0x48f6a0[_0x88be('0x31')][_0x88be('0x1e')]);_0x537c0b[_0x88be('0x20')]=qs[_0x88be('0x20')](_0x48f6a0[_0x88be('0x31')][_0x88be('0x20')]);}_0x537c0b[_0x88be('0x3a')]=qs[_0x88be('0x3b')](_0x48f6a0[_0x88be('0x31')][_0x88be('0x3b')]);_0x537c0b[_0x88be('0x3c')]=qs[_0x88be('0x33')](_[_0x88be('0x3d')](_0x48f6a0[_0x88be('0x31')],_0x3a08fa[_0x88be('0x33')]),_0x1af670);if(_0x48f6a0[_0x88be('0x31')][_0x88be('0x3e')]){_0x537c0b[_0x88be('0x3c')]=_['merge'](_0x537c0b['where'],{'$or':_['map'](_0x1af670,function(_0x32d763){if(_0x32d763['type']!==_0x88be('0x3f')){var _0x3e7fdf={};_0x3e7fdf[_0x32d763[_0x88be('0x29')]]={'$like':'%'+_0x48f6a0[_0x88be('0x31')][_0x88be('0x3e')]+'%'};return _0x3e7fdf;}})});}_0x537c0b=_[_0x88be('0x40')]({},_0x537c0b,_0x48f6a0[_0x88be('0x41')]);var _0x4bec59={'where':_0x537c0b['where']};return db[_0x88be('0x2c')][_0x88be('0x1f')](_0x4bec59)[_0x88be('0x25')](function(_0x63b253){_0x2fe023['count']=_0x63b253;if(_0x48f6a0[_0x88be('0x31')][_0x88be('0x42')]){_0x537c0b[_0x88be('0x43')]=[{'all':!![]}];}return db[_0x88be('0x2c')]['findAll'](_0x537c0b);})[_0x88be('0x25')](function(_0x429f7b){_0x2fe023[_0x88be('0x44')]=_0x429f7b;return _0x2fe023;})[_0x88be('0x25')](respondWithFilteredResult(_0x3dc88a,_0x537c0b))[_0x88be('0x45')](handleError(_0x3dc88a,null));};exports[_0x88be('0x46')]=function(_0x6da13f,_0x1514d2){var _0x1dc5b4={'raw':!![],'where':{'id':_0x6da13f[_0x88be('0x47')]['id']}},_0x5261d7={};_0x5261d7['model']=_['keys'](db[_0x88be('0x2c')][_0x88be('0x2d')]);_0x5261d7[_0x88be('0x31')]=_[_0x88be('0x32')](_0x6da13f['query']);_0x5261d7[_0x88be('0x33')]=_[_0x88be('0x34')](_0x5261d7[_0x88be('0x30')],_0x5261d7[_0x88be('0x31')]);_0x1dc5b4[_0x88be('0x36')]=_['intersection'](_0x5261d7[_0x88be('0x30')],qs[_0x88be('0x35')](_0x6da13f['query'][_0x88be('0x35')]));_0x1dc5b4['attributes']=_0x1dc5b4[_0x88be('0x36')]['length']?_0x1dc5b4[_0x88be('0x36')]:_0x5261d7[_0x88be('0x30')];if(_0x6da13f['query'][_0x88be('0x42')]){_0x1dc5b4[_0x88be('0x43')]=[{'all':!![]}];}_0x1dc5b4=_[_0x88be('0x40')]({},_0x1dc5b4,_0x6da13f[_0x88be('0x41')]);return db[_0x88be('0x2c')][_0x88be('0x48')](_0x1dc5b4)['then'](handleEntityNotFound(_0x1514d2,null))['then'](respondWithResult(_0x1514d2,null))[_0x88be('0x45')](handleError(_0x1514d2,null));};exports[_0x88be('0x49')]=function(_0x1c6c8f,_0x18d1db){return db[_0x88be('0x2c')][_0x88be('0x49')](_0x1c6c8f['body'],{})['then'](respondWithResult(_0x18d1db,0xc9))[_0x88be('0x45')](handleError(_0x18d1db,null));};exports[_0x88be('0x24')]=function(_0xf60d87,_0x174488){if(_0xf60d87['body']['id']){delete _0xf60d87['body']['id'];}return db[_0x88be('0x2c')]['find']({'where':{'id':_0xf60d87[_0x88be('0x47')]['id']}})[_0x88be('0x25')](handleEntityNotFound(_0x174488,null))[_0x88be('0x25')](saveUpdates(_0xf60d87['body'],null))[_0x88be('0x25')](respondWithResult(_0x174488,null))[_0x88be('0x45')](handleError(_0x174488,null));};exports['destroy']=function(_0x3dc85b,_0x582efa){return db[_0x88be('0x2c')]['find']({'where':{'id':_0x3dc85b[_0x88be('0x47')]['id']}})[_0x88be('0x25')](handleEntityNotFound(_0x582efa,null))[_0x88be('0x25')](removeEntity(_0x582efa,null))[_0x88be('0x45')](handleError(_0x582efa,null));};exports[_0x88be('0x4a')]=function(_0x44577f,_0x33d797){return db[_0x88be('0x2c')]['describe']()[_0x88be('0x25')](respondWithResult(_0x33d797,null))[_0x88be('0x45')](handleError(_0x33d797,null));}; \ No newline at end of file +var _0xaf1b=['undefined','limit','count','set','Content-Range','apply','reject','save','update','then','error','stack','name','index','ChatQueueReport','rawAttributes','fieldName','type','key','model','map','query','keys','filters','attributes','fields','length','hasOwnProperty','nolimit','sort','where','pick','filter','merge','options','findAll','rows','catch','show','params','intersection','includeAll','include','create','body','find','destroy','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','squel','jsforce','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','offset'];(function(_0x1dda6b,_0x3fbfdd){var _0x36fa02=function(_0x812fe9){while(--_0x812fe9){_0x1dda6b['push'](_0x1dda6b['shift']());}};_0x36fa02(++_0x3fbfdd);}(_0xaf1b,0x11a));var _0xbaf1=function(_0x394aaf,_0x3b7cf8){_0x394aaf=_0x394aaf-0x0;var _0x32fe8c=_0xaf1b[_0x394aaf];return _0x32fe8c;};'use strict';var emlformat=require(_0xbaf1('0x0'));var rimraf=require(_0xbaf1('0x1'));var zipdir=require(_0xbaf1('0x2'));var jsonpatch=require(_0xbaf1('0x3'));var rp=require(_0xbaf1('0x4'));var moment=require(_0xbaf1('0x5'));var BPromise=require(_0xbaf1('0x6'));var Mustache=require(_0xbaf1('0x7'));var util=require(_0xbaf1('0x8'));var path=require(_0xbaf1('0x9'));var sox=require(_0xbaf1('0xa'));var csv=require(_0xbaf1('0xb'));var ejs=require(_0xbaf1('0xc'));var fs=require('fs');var fs_extra=require(_0xbaf1('0xd'));var _=require('lodash');var squel=require(_0xbaf1('0xe'));var crypto=require('crypto');var jsforce=require(_0xbaf1('0xf'));var deskjs=require('desk.js');var toCsv=require(_0xbaf1('0xb'));var querystring=require(_0xbaf1('0x10'));var Papa=require(_0xbaf1('0x11'));var Redis=require('ioredis');var authService=require(_0xbaf1('0x12'));var qs=require(_0xbaf1('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xbaf1('0x14'));var logger=require('../../config/logger')(_0xbaf1('0x15'));var utils=require(_0xbaf1('0x16'));var config=require(_0xbaf1('0x17'));var licenseUtil=require(_0xbaf1('0x18'));var db=require(_0xbaf1('0x19'))['db'];function respondWithStatusCode(_0x36ec1c,_0x50de02){_0x50de02=_0x50de02||0xcc;return function(_0x493f3f){if(_0x493f3f){return _0x36ec1c[_0xbaf1('0x1a')](_0x50de02);}return _0x36ec1c[_0xbaf1('0x1b')](_0x50de02)[_0xbaf1('0x1c')]();};}function respondWithResult(_0xb6f7d8,_0x1d94da){_0x1d94da=_0x1d94da||0xc8;return function(_0x1097d6){if(_0x1097d6){return _0xb6f7d8[_0xbaf1('0x1b')](_0x1d94da)['json'](_0x1097d6);}};}function respondWithFilteredResult(_0x32981b,_0x173cb6){return function(_0xb9ac72){if(_0xb9ac72){var _0x342c11=typeof _0x173cb6[_0xbaf1('0x1d')]===_0xbaf1('0x1e')&&typeof _0x173cb6[_0xbaf1('0x1f')]===_0xbaf1('0x1e');var _0x58d217=_0xb9ac72[_0xbaf1('0x20')];var _0x4f4527=_0x342c11?0x0:_0x173cb6[_0xbaf1('0x1d')];var _0x3b13b2=_0x342c11?_0xb9ac72[_0xbaf1('0x20')]:_0x173cb6[_0xbaf1('0x1d')]+_0x173cb6['limit'];var _0x43291c;if(_0x3b13b2>=_0x58d217){_0x3b13b2=_0x58d217;_0x43291c=0xc8;}else{_0x43291c=0xce;}_0x32981b['status'](_0x43291c);return _0x32981b[_0xbaf1('0x21')](_0xbaf1('0x22'),_0x4f4527+'-'+_0x3b13b2+'/'+_0x58d217)['json'](_0xb9ac72);}return null;};}function patchUpdates(_0xd579de){return function(_0x33c524){try{jsonpatch[_0xbaf1('0x23')](_0x33c524,_0xd579de,!![]);}catch(_0x19f4d8){return BPromise[_0xbaf1('0x24')](_0x19f4d8);}return _0x33c524[_0xbaf1('0x25')]();};}function saveUpdates(_0x5b9f50,_0x487d25){return function(_0x3cb56b){if(_0x3cb56b){return _0x3cb56b[_0xbaf1('0x26')](_0x5b9f50)[_0xbaf1('0x27')](function(_0x496344){return _0x496344;});}return null;};}function removeEntity(_0x2e71ce,_0xefc243){return function(_0x40a0fa){if(_0x40a0fa){return _0x40a0fa['destroy']()[_0xbaf1('0x27')](function(){_0x2e71ce['status'](0xcc)[_0xbaf1('0x1c')]();});}};}function handleEntityNotFound(_0x181c9d,_0xae3b42){return function(_0x2afb55){if(!_0x2afb55){_0x181c9d[_0xbaf1('0x1a')](0x194);}return _0x2afb55;};}function handleError(_0x480835,_0x5d13d4){_0x5d13d4=_0x5d13d4||0x1f4;return function(_0x1cfbcd){logger[_0xbaf1('0x28')](_0x1cfbcd[_0xbaf1('0x29')]);if(_0x1cfbcd[_0xbaf1('0x2a')]){delete _0x1cfbcd['name'];}_0x480835[_0xbaf1('0x1b')](_0x5d13d4)['send'](_0x1cfbcd);};}exports[_0xbaf1('0x2b')]=function(_0x23d96a,_0x35fdc){var _0x17f2ea={},_0x2ccd80={},_0x3abb17={'count':0x0,'rows':[]};var _0x32bb6f=_['map'](db[_0xbaf1('0x2c')][_0xbaf1('0x2d')],function(_0x1a523d){return{'name':_0x1a523d[_0xbaf1('0x2e')],'type':_0x1a523d[_0xbaf1('0x2f')][_0xbaf1('0x30')]};});_0x2ccd80[_0xbaf1('0x31')]=_[_0xbaf1('0x32')](_0x32bb6f,'name');_0x2ccd80[_0xbaf1('0x33')]=_[_0xbaf1('0x34')](_0x23d96a[_0xbaf1('0x33')]);_0x2ccd80[_0xbaf1('0x35')]=_['intersection'](_0x2ccd80[_0xbaf1('0x31')],_0x2ccd80['query']);_0x17f2ea[_0xbaf1('0x36')]=_['intersection'](_0x2ccd80[_0xbaf1('0x31')],qs[_0xbaf1('0x37')](_0x23d96a[_0xbaf1('0x33')][_0xbaf1('0x37')]));_0x17f2ea['attributes']=_0x17f2ea[_0xbaf1('0x36')][_0xbaf1('0x38')]?_0x17f2ea[_0xbaf1('0x36')]:_0x2ccd80[_0xbaf1('0x31')];if(!_0x23d96a[_0xbaf1('0x33')][_0xbaf1('0x39')](_0xbaf1('0x3a'))){_0x17f2ea['limit']=qs[_0xbaf1('0x1f')](_0x23d96a[_0xbaf1('0x33')][_0xbaf1('0x1f')]);_0x17f2ea[_0xbaf1('0x1d')]=qs[_0xbaf1('0x1d')](_0x23d96a[_0xbaf1('0x33')][_0xbaf1('0x1d')]);}_0x17f2ea['order']=qs[_0xbaf1('0x3b')](_0x23d96a['query'][_0xbaf1('0x3b')]);_0x17f2ea[_0xbaf1('0x3c')]=qs[_0xbaf1('0x35')](_[_0xbaf1('0x3d')](_0x23d96a[_0xbaf1('0x33')],_0x2ccd80[_0xbaf1('0x35')]),_0x32bb6f);if(_0x23d96a[_0xbaf1('0x33')][_0xbaf1('0x3e')]){_0x17f2ea[_0xbaf1('0x3c')]=_['merge'](_0x17f2ea['where'],{'$or':_['map'](_0x32bb6f,function(_0x3e45aa){if(_0x3e45aa[_0xbaf1('0x2f')]!=='VIRTUAL'){var _0x2adc26={};_0x2adc26[_0x3e45aa[_0xbaf1('0x2a')]]={'$like':'%'+_0x23d96a[_0xbaf1('0x33')]['filter']+'%'};return _0x2adc26;}})});}_0x17f2ea=_[_0xbaf1('0x3f')]({},_0x17f2ea,_0x23d96a[_0xbaf1('0x40')]);var _0x3d2302={'where':_0x17f2ea['where']};return db[_0xbaf1('0x2c')][_0xbaf1('0x20')](_0x3d2302)['then'](function(_0x520ae2){_0x3abb17[_0xbaf1('0x20')]=_0x520ae2;if(_0x23d96a['query']['includeAll']){_0x17f2ea['include']=[{'all':!![]}];}return db[_0xbaf1('0x2c')][_0xbaf1('0x41')](_0x17f2ea);})[_0xbaf1('0x27')](function(_0x27c821){_0x3abb17[_0xbaf1('0x42')]=_0x27c821;return _0x3abb17;})[_0xbaf1('0x27')](respondWithFilteredResult(_0x35fdc,_0x17f2ea))[_0xbaf1('0x43')](handleError(_0x35fdc,null));};exports[_0xbaf1('0x44')]=function(_0x481722,_0x45f0b5){var _0x3d2785={'raw':!![],'where':{'id':_0x481722[_0xbaf1('0x45')]['id']}},_0x3d0793={};_0x3d0793['model']=_[_0xbaf1('0x34')](db['ChatQueueReport'][_0xbaf1('0x2d')]);_0x3d0793[_0xbaf1('0x33')]=_[_0xbaf1('0x34')](_0x481722['query']);_0x3d0793[_0xbaf1('0x35')]=_[_0xbaf1('0x46')](_0x3d0793[_0xbaf1('0x31')],_0x3d0793['query']);_0x3d2785[_0xbaf1('0x36')]=_['intersection'](_0x3d0793['model'],qs['fields'](_0x481722[_0xbaf1('0x33')][_0xbaf1('0x37')]));_0x3d2785[_0xbaf1('0x36')]=_0x3d2785[_0xbaf1('0x36')][_0xbaf1('0x38')]?_0x3d2785[_0xbaf1('0x36')]:_0x3d0793['model'];if(_0x481722[_0xbaf1('0x33')][_0xbaf1('0x47')]){_0x3d2785[_0xbaf1('0x48')]=[{'all':!![]}];}_0x3d2785=_[_0xbaf1('0x3f')]({},_0x3d2785,_0x481722[_0xbaf1('0x40')]);return db[_0xbaf1('0x2c')]['find'](_0x3d2785)[_0xbaf1('0x27')](handleEntityNotFound(_0x45f0b5,null))['then'](respondWithResult(_0x45f0b5,null))['catch'](handleError(_0x45f0b5,null));};exports[_0xbaf1('0x49')]=function(_0x12a9a1,_0x20328e){return db[_0xbaf1('0x2c')][_0xbaf1('0x49')](_0x12a9a1['body'],{})[_0xbaf1('0x27')](respondWithResult(_0x20328e,0xc9))['catch'](handleError(_0x20328e,null));};exports[_0xbaf1('0x26')]=function(_0x3f3b0d,_0xce46bc){if(_0x3f3b0d[_0xbaf1('0x4a')]['id']){delete _0x3f3b0d[_0xbaf1('0x4a')]['id'];}return db[_0xbaf1('0x2c')][_0xbaf1('0x4b')]({'where':{'id':_0x3f3b0d[_0xbaf1('0x45')]['id']}})[_0xbaf1('0x27')](handleEntityNotFound(_0xce46bc,null))[_0xbaf1('0x27')](saveUpdates(_0x3f3b0d[_0xbaf1('0x4a')],null))[_0xbaf1('0x27')](respondWithResult(_0xce46bc,null))[_0xbaf1('0x43')](handleError(_0xce46bc,null));};exports[_0xbaf1('0x4c')]=function(_0x364309,_0xad3fd3){return db['ChatQueueReport'][_0xbaf1('0x4b')]({'where':{'id':_0x364309[_0xbaf1('0x45')]['id']}})[_0xbaf1('0x27')](handleEntityNotFound(_0xad3fd3,null))[_0xbaf1('0x27')](removeEntity(_0xad3fd3,null))[_0xbaf1('0x43')](handleError(_0xad3fd3,null));};exports[_0xbaf1('0x4d')]=function(_0x3962b5,_0x312fd0){return db[_0xbaf1('0x2c')][_0xbaf1('0x4d')]()[_0xbaf1('0x27')](respondWithResult(_0x312fd0,null))['catch'](handleError(_0x312fd0,null));}; \ No newline at end of file diff --git a/server/api/chatQueueReport/chatQueueReport.model.js b/server/api/chatQueueReport/chatQueueReport.model.js index 41fee94..76ca9ea 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 _0x0713=['../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment','./chatQueueReport.attributes','exports','define','ChatQueueReport','report_chat_queue','uniqueid'];(function(_0x211632,_0x378e2e){var _0x5a1da1=function(_0x44aff2){while(--_0x44aff2){_0x211632['push'](_0x211632['shift']());}};_0x5a1da1(++_0x378e2e);}(_0x0713,0x1ba));var _0x3071=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0713[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x3071('0x0'))(_0x3071('0x1'));var moment=require(_0x3071('0x2'));var BPromise=require(_0x3071('0x3'));var rp=require(_0x3071('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x3071('0x5'));var config=require(_0x3071('0x6'));var attributes=require(_0x3071('0x7'));module[_0x3071('0x8')]=function(_0xabd7b6,_0x41cf76){return _0xabd7b6[_0x3071('0x9')](_0x3071('0xa'),attributes,{'tableName':_0x3071('0xb'),'paranoid':![],'indexes':[{'name':_0x3071('0xc'),'fields':[_0x3071('0xc')]}],'timestamps':!![]});}; \ No newline at end of file +var _0xd8b0=['define','report_chat_queue','uniqueid','lodash','util','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x3476f3,_0x25e9d1){var _0x4bd1fe=function(_0x34728f){while(--_0x34728f){_0x3476f3['push'](_0x3476f3['shift']());}};_0x4bd1fe(++_0x25e9d1);}(_0xd8b0,0xad));var _0x0d8b=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0xd8b0[_0xa464c9];return _0x3d73c4;};'use strict';var _=require(_0x0d8b('0x0'));var util=require(_0x0d8b('0x1'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0x0d8b('0x2'));var rp=require(_0x0d8b('0x3'));var fs=require('fs');var path=require(_0x0d8b('0x4'));var rimraf=require(_0x0d8b('0x5'));var config=require(_0x0d8b('0x6'));var attributes=require('./chatQueueReport.attributes');module['exports']=function(_0x3f8b6f,_0x227c63){return _0x3f8b6f[_0x0d8b('0x7')]('ChatQueueReport',attributes,{'tableName':_0x0d8b('0x8'),'paranoid':![],'indexes':[{'name':_0x0d8b('0x9'),'fields':['uniqueid']}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/chatQueueReport/chatQueueReport.rpc.js b/server/api/chatQueueReport/chatQueueReport.rpc.js index 1dae7c4..2f2f9e9 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 _0xe3ad=['catch','CreateChatQueueReport','ChatQueueReport','body','raw','update','options','attributes','limit','UpdateChatQueueReport','debug','lodash','moment','bluebird','randomstring','ioredis','rpc','../../config/environment','client','request','then','ChatQueueReport,\x20%s,\x20%s','ChatQueueReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result'];(function(_0x18a2b7,_0x23a719){var _0x2c2d2a=function(_0xe76bb1){while(--_0xe76bb1){_0x18a2b7['push'](_0x18a2b7['shift']());}};_0x2c2d2a(++_0x23a719);}(_0xe3ad,0x1cd));var _0xde3a=function(_0x240547,_0x38194e){_0x240547=_0x240547-0x0;var _0x4380f2=_0xe3ad[_0x240547];return _0x4380f2;};'use strict';var _=require(_0xde3a('0x0'));var util=require('util');var moment=require(_0xde3a('0x1'));var BPromise=require(_0xde3a('0x2'));var rs=require(_0xde3a('0x3'));var fs=require('fs');var Redis=require(_0xde3a('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xde3a('0x5'));var config=require(_0xde3a('0x6'));var jayson=require('jayson/promise');var client=jayson[_0xde3a('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1178f3,_0x27aff3,_0xa53db2){return new BPromise(function(_0x4adcec,_0xa048fe){return client[_0xde3a('0x8')](_0x1178f3,_0xa53db2)[_0xde3a('0x9')](function(_0x4815cc){logger['info'](_0xde3a('0xa'),_0x27aff3,'request\x20sent');logger['debug'](_0xde3a('0xb'),_0x27aff3,_0xde3a('0xc'),JSON[_0xde3a('0xd')](_0x4815cc));if(_0x4815cc[_0xde3a('0xe')]){if(_0x4815cc['error'][_0xde3a('0xf')]===0x1f4){logger[_0xde3a('0xe')](_0xde3a('0xa'),_0x27aff3,_0x4815cc[_0xde3a('0xe')][_0xde3a('0x10')]);return _0xa048fe(_0x4815cc[_0xde3a('0xe')]['message']);}logger[_0xde3a('0xe')](_0xde3a('0xa'),_0x27aff3,_0x4815cc[_0xde3a('0xe')][_0xde3a('0x10')]);return _0x4adcec(_0x4815cc['error'][_0xde3a('0x10')]);}else{logger[_0xde3a('0x11')](_0xde3a('0xa'),_0x27aff3,_0xde3a('0xc'));_0x4adcec(_0x4815cc[_0xde3a('0x12')][_0xde3a('0x10')]);}})[_0xde3a('0x13')](function(_0x2dc64f){logger[_0xde3a('0xe')](_0xde3a('0xa'),_0x27aff3,_0x2dc64f);_0xa048fe(_0x2dc64f);});});}exports[_0xde3a('0x14')]=function(_0x92f272){var _0x2656ec=this;return new Promise(function(_0x4a513c,_0x5c1ca7){return db[_0xde3a('0x15')]['create'](_0x92f272[_0xde3a('0x16')],{'raw':_0x92f272['options']?_0x92f272['options'][_0xde3a('0x17')]===undefined?!![]:![]:!![]})[_0xde3a('0x9')](function(_0x2741e9){logger['info'](_0xde3a('0x14'),_0x92f272);logger['debug'](_0xde3a('0x14'),_0x92f272,JSON[_0xde3a('0xd')](_0x2741e9));_0x4a513c(_0x2741e9);})[_0xde3a('0x13')](function(_0x5955b0){logger[_0xde3a('0xe')]('CreateChatQueueReport',_0x5955b0[_0xde3a('0x10')],_0x92f272);_0x5c1ca7(_0x2656ec[_0xde3a('0xe')](0x1f4,_0x5955b0['message']));});});};exports['UpdateChatQueueReport']=function(_0x54f592){var _0x5b25b7=this;return new Promise(function(_0x2342f5,_0x3330b4){return db[_0xde3a('0x15')][_0xde3a('0x18')](_0x54f592[_0xde3a('0x16')],{'raw':_0x54f592[_0xde3a('0x19')]?_0x54f592[_0xde3a('0x19')][_0xde3a('0x17')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x54f592['options']?_0x54f592[_0xde3a('0x19')]['where']||null:null,'attributes':_0x54f592[_0xde3a('0x19')]?_0x54f592['options'][_0xde3a('0x1a')]||null:null,'limit':_0x54f592[_0xde3a('0x19')]?_0x54f592[_0xde3a('0x19')][_0xde3a('0x1b')]||null:null})[_0xde3a('0x9')](function(_0x502e0c){logger[_0xde3a('0x11')](_0xde3a('0x1c'),_0x54f592);logger[_0xde3a('0x1d')]('UpdateChatQueueReport',_0x54f592,JSON['stringify'](_0x502e0c));_0x2342f5(_0x502e0c);})[_0xde3a('0x13')](function(_0x571f39){logger[_0xde3a('0xe')](_0xde3a('0x1c'),_0x571f39['message'],_0x54f592);_0x3330b4(_0x5b25b7['error'](0x1f4,_0x571f39[_0xde3a('0x10')]));});});}; \ No newline at end of file +var _0x011f=['request','ChatQueueReport,\x20%s,\x20%s','request\x20sent','ChatQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','message','info','CreateChatQueueReport','ChatQueueReport','create','options','raw','then','catch','UpdateChatQueueReport','body','where','attributes','limit','debug','lodash','util','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','client','http'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x011f,0x91));var _0xf011=function(_0xcfe8cc,_0xb83aeb){_0xcfe8cc=_0xcfe8cc-0x0;var _0x55ac53=_0x011f[_0xcfe8cc];return _0x55ac53;};'use strict';var _=require(_0xf011('0x0'));var util=require(_0xf011('0x1'));var moment=require('moment');var BPromise=require(_0xf011('0x2'));var rs=require(_0xf011('0x3'));var fs=require('fs');var Redis=require(_0xf011('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xf011('0x5'));var logger=require(_0xf011('0x6'))(_0xf011('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xf011('0x8')][_0xf011('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x18de3b,_0x4b2077,_0x225f5e){return new BPromise(function(_0x454e71,_0xb29264){return client[_0xf011('0xa')](_0x18de3b,_0x225f5e)['then'](function(_0x5bfc73){logger['info'](_0xf011('0xb'),_0x4b2077,_0xf011('0xc'));logger['debug'](_0xf011('0xd'),_0x4b2077,'request\x20sent',JSON[_0xf011('0xe')](_0x5bfc73));if(_0x5bfc73[_0xf011('0xf')]){if(_0x5bfc73[_0xf011('0xf')]['code']===0x1f4){logger['error']('ChatQueueReport,\x20%s,\x20%s',_0x4b2077,_0x5bfc73[_0xf011('0xf')][_0xf011('0x10')]);return _0xb29264(_0x5bfc73[_0xf011('0xf')][_0xf011('0x10')]);}logger[_0xf011('0xf')](_0xf011('0xb'),_0x4b2077,_0x5bfc73['error'][_0xf011('0x10')]);return _0x454e71(_0x5bfc73[_0xf011('0xf')][_0xf011('0x10')]);}else{logger[_0xf011('0x11')]('ChatQueueReport,\x20%s,\x20%s',_0x4b2077,_0xf011('0xc'));_0x454e71(_0x5bfc73['result']['message']);}})['catch'](function(_0x30da54){logger[_0xf011('0xf')]('ChatQueueReport,\x20%s,\x20%s',_0x4b2077,_0x30da54);_0xb29264(_0x30da54);});});}exports[_0xf011('0x12')]=function(_0x4e16cf){var _0x362935=this;return new Promise(function(_0x3f0bc0,_0x2fd9f5){return db[_0xf011('0x13')][_0xf011('0x14')](_0x4e16cf['body'],{'raw':_0x4e16cf[_0xf011('0x15')]?_0x4e16cf[_0xf011('0x15')][_0xf011('0x16')]===undefined?!![]:![]:!![]})[_0xf011('0x17')](function(_0x149c93){logger['info'](_0xf011('0x12'),_0x4e16cf);logger['debug'](_0xf011('0x12'),_0x4e16cf,JSON[_0xf011('0xe')](_0x149c93));_0x3f0bc0(_0x149c93);})[_0xf011('0x18')](function(_0x18df21){logger[_0xf011('0xf')]('CreateChatQueueReport',_0x18df21['message'],_0x4e16cf);_0x2fd9f5(_0x362935[_0xf011('0xf')](0x1f4,_0x18df21[_0xf011('0x10')]));});});};exports[_0xf011('0x19')]=function(_0x4274a9){var _0x3a6791=this;return new Promise(function(_0x722366,_0x38a26b){return db[_0xf011('0x13')]['update'](_0x4274a9[_0xf011('0x1a')],{'raw':_0x4274a9[_0xf011('0x15')]?_0x4274a9['options'][_0xf011('0x16')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x4274a9[_0xf011('0x15')]?_0x4274a9['options'][_0xf011('0x1b')]||null:null,'attributes':_0x4274a9[_0xf011('0x15')]?_0x4274a9[_0xf011('0x15')][_0xf011('0x1c')]||null:null,'limit':_0x4274a9[_0xf011('0x15')]?_0x4274a9[_0xf011('0x15')][_0xf011('0x1d')]||null:null})[_0xf011('0x17')](function(_0x41c206){logger['info'](_0xf011('0x19'),_0x4274a9);logger[_0xf011('0x1e')](_0xf011('0x19'),_0x4274a9,JSON['stringify'](_0x41c206));_0x722366(_0x41c206);})[_0xf011('0x18')](function(_0x5cda0c){logger[_0xf011('0xf')](_0xf011('0x19'),_0x5cda0c[_0xf011('0x10')],_0x4274a9);_0x38a26b(_0x3a6791[_0xf011('0xf')](0x1f4,_0x5cda0c[_0xf011('0x10')]));});});}; \ No newline at end of file diff --git a/server/api/chatQueueReport/index.js b/server/api/chatQueueReport/index.js index 7d09cfe..e94f90c 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 _0x869d=['post','put','update','exports','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatQueueReport.controller','get','isAuthenticated','index','/describe','describe','/:id','show'];(function(_0x4f7a26,_0x26cc12){var _0x3253f4=function(_0x3becd4){while(--_0x3becd4){_0x4f7a26['push'](_0x4f7a26['shift']());}};_0x3253f4(++_0x26cc12);}(_0x869d,0xf4));var _0xd869=function(_0x48e697,_0x3d43d3){_0x48e697=_0x48e697-0x0;var _0x3a6f5f=_0x869d[_0x48e697];return _0x3a6f5f;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0xd869('0x0'));var timeout=require(_0xd869('0x1'));var express=require(_0xd869('0x2'));var router=express[_0xd869('0x3')]();var fs_extra=require(_0xd869('0x4'));var auth=require(_0xd869('0x5'));var interaction=require(_0xd869('0x6'));var config=require(_0xd869('0x7'));var controller=require(_0xd869('0x8'));router[_0xd869('0x9')]('/',auth[_0xd869('0xa')](),controller[_0xd869('0xb')]);router[_0xd869('0x9')](_0xd869('0xc'),auth[_0xd869('0xa')](),controller[_0xd869('0xd')]);router[_0xd869('0x9')](_0xd869('0xe'),auth['isAuthenticated'](),controller[_0xd869('0xf')]);router[_0xd869('0x10')]('/',auth[_0xd869('0xa')](),controller['create']);router[_0xd869('0x11')](_0xd869('0xe'),auth[_0xd869('0xa')](),controller[_0xd869('0x12')]);router['delete'](_0xd869('0xe'),auth[_0xd869('0xa')](),controller['destroy']);module[_0xd869('0x13')]=router; \ No newline at end of file +var _0x94d5=['get','index','describe','/:id','isAuthenticated','show','create','put','update','delete','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','./chatQueueReport.controller'];(function(_0x35ab30,_0x903197){var _0x599db4=function(_0x370bb3){while(--_0x370bb3){_0x35ab30['push'](_0x35ab30['shift']());}};_0x599db4(++_0x903197);}(_0x94d5,0x83));var _0x594d=function(_0xeb066f,_0x519022){_0xeb066f=_0xeb066f-0x0;var _0x34e78d=_0x94d5[_0xeb066f];return _0x34e78d;};'use strict';var multer=require(_0x594d('0x0'));var util=require(_0x594d('0x1'));var path=require(_0x594d('0x2'));var timeout=require(_0x594d('0x3'));var express=require(_0x594d('0x4'));var router=express[_0x594d('0x5')]();var fs_extra=require(_0x594d('0x6'));var auth=require(_0x594d('0x7'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x594d('0x8'));router[_0x594d('0x9')]('/',auth['isAuthenticated'](),controller[_0x594d('0xa')]);router['get']('/describe',auth['isAuthenticated'](),controller[_0x594d('0xb')]);router[_0x594d('0x9')](_0x594d('0xc'),auth[_0x594d('0xd')](),controller[_0x594d('0xe')]);router['post']('/',auth[_0x594d('0xd')](),controller[_0x594d('0xf')]);router[_0x594d('0x10')](_0x594d('0xc'),auth['isAuthenticated'](),controller[_0x594d('0x11')]);router[_0x594d('0x12')]('/:id',auth[_0x594d('0xd')](),controller['destroy']);module[_0x594d('0x13')]=router; \ No newline at end of file diff --git a/server/api/chatTransferReport/chatTransferReport.attributes.js b/server/api/chatTransferReport/chatTransferReport.attributes.js index b8ad2ad..346f067 100644 --- a/server/api/chatTransferReport/chatTransferReport.attributes.js +++ b/server/api/chatTransferReport/chatTransferReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf3cd=['exports','STRING','ENUM','account','queue','DATE','moment','sequelize'];(function(_0x305f34,_0x21c76f){var _0x17dc3e=function(_0x565f6d){while(--_0x565f6d){_0x305f34['push'](_0x305f34['shift']());}};_0x17dc3e(++_0x21c76f);}(_0xf3cd,0xfe));var _0xdf3c=function(_0x1a268f,_0x2f4759){_0x1a268f=_0x1a268f-0x0;var _0x63fe77=_0xf3cd[_0x1a268f];return _0x63fe77;};'use strict';var moment=require(_0xdf3c('0x0'));var Sequelize=require(_0xdf3c('0x1'));module[_0xdf3c('0x2')]={'uniqueid':{'type':Sequelize[_0xdf3c('0x3')],'allowNull':![]},'type':{'type':Sequelize[_0xdf3c('0x4')](_0xdf3c('0x5'),'agent',_0xdf3c('0x6')),'allowNull':![],'defaultValue':_0xdf3c('0x6')},'transferredAt':{'type':Sequelize[_0xdf3c('0x7')],'allowNull':![],'defaultValue':Sequelize['NOW']}}; \ No newline at end of file +var _0xedd9=['account','agent','queue','NOW','sequelize','exports','STRING','ENUM'];(function(_0x43e108,_0x965e84){var _0x3263b7=function(_0x22db67){while(--_0x22db67){_0x43e108['push'](_0x43e108['shift']());}};_0x3263b7(++_0x965e84);}(_0xedd9,0xfc));var _0x9edd=function(_0x25dccb,_0x11c5b2){_0x25dccb=_0x25dccb-0x0;var _0xebc436=_0xedd9[_0x25dccb];return _0xebc436;};'use strict';var moment=require('moment');var Sequelize=require(_0x9edd('0x0'));module[_0x9edd('0x1')]={'uniqueid':{'type':Sequelize[_0x9edd('0x2')],'allowNull':![]},'type':{'type':Sequelize[_0x9edd('0x3')](_0x9edd('0x4'),_0x9edd('0x5'),_0x9edd('0x6')),'allowNull':![],'defaultValue':_0x9edd('0x6')},'transferredAt':{'type':Sequelize['DATE'],'allowNull':![],'defaultValue':Sequelize[_0x9edd('0x7')]}}; \ No newline at end of file diff --git a/server/api/chatTransferReport/chatTransferReport.controller.js b/server/api/chatTransferReport/chatTransferReport.controller.js index c7e3240..8f50047 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 _0x719e=['zip-dir','fast-json-patch','request-promise','mustache','util','path','sox','to-csv','ejs','fs-extra','crypto','jsforce','desk.js','querystring','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','offset','undefined','limit','count','set','apply','reject','save','destroy','stack','name','send','index','map','ChatTransferReport','rawAttributes','fieldName','type','key','model','keys','query','filters','intersection','attributes','hasOwnProperty','order','sort','where','pick','filter','VIRTUAL','merge','then','includeAll','include','findAll','rows','catch','show','params','fields','length','options','create','update','body','find','describe','eml-format','rimraf'];(function(_0x3abf76,_0x4d6a4a){var _0x3d1bf9=function(_0x3cc74d){while(--_0x3cc74d){_0x3abf76['push'](_0x3abf76['shift']());}};_0x3d1bf9(++_0x4d6a4a);}(_0x719e,0x98));var _0xe719=function(_0x4e8efd,_0x46bc20){_0x4e8efd=_0x4e8efd-0x0;var _0x31e442=_0x719e[_0x4e8efd];return _0x31e442;};'use strict';var emlformat=require(_0xe719('0x0'));var rimraf=require(_0xe719('0x1'));var zipdir=require(_0xe719('0x2'));var jsonpatch=require(_0xe719('0x3'));var rp=require(_0xe719('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xe719('0x5'));var util=require(_0xe719('0x6'));var path=require(_0xe719('0x7'));var sox=require(_0xe719('0x8'));var csv=require(_0xe719('0x9'));var ejs=require(_0xe719('0xa'));var fs=require('fs');var fs_extra=require(_0xe719('0xb'));var _=require('lodash');var squel=require('squel');var crypto=require(_0xe719('0xc'));var jsforce=require(_0xe719('0xd'));var deskjs=require(_0xe719('0xe'));var toCsv=require('to-csv');var querystring=require(_0xe719('0xf'));var Papa=require(_0xe719('0x10'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0xe719('0x11'));var as=require(_0xe719('0x12'));var hardwareService=require(_0xe719('0x13'));var logger=require('../../config/logger')(_0xe719('0x14'));var utils=require(_0xe719('0x15'));var config=require(_0xe719('0x16'));var licenseUtil=require(_0xe719('0x17'));var db=require(_0xe719('0x18'))['db'];function respondWithStatusCode(_0x35355d,_0x153258){_0x153258=_0x153258||0xcc;return function(_0x4ffd86){if(_0x4ffd86){return _0x35355d[_0xe719('0x19')](_0x153258);}return _0x35355d[_0xe719('0x1a')](_0x153258)[_0xe719('0x1b')]();};}function respondWithResult(_0x2f637e,_0x9c2ff5){_0x9c2ff5=_0x9c2ff5||0xc8;return function(_0x43c492){if(_0x43c492){return _0x2f637e[_0xe719('0x1a')](_0x9c2ff5)['json'](_0x43c492);}};}function respondWithFilteredResult(_0xf2dff7,_0x1e9a7c){return function(_0x3600bd){if(_0x3600bd){var _0x306561=typeof _0x1e9a7c[_0xe719('0x1c')]===_0xe719('0x1d')&&typeof _0x1e9a7c[_0xe719('0x1e')]==='undefined';var _0x303f91=_0x3600bd['count'];var _0x2bb8f6=_0x306561?0x0:_0x1e9a7c['offset'];var _0x3c49d7=_0x306561?_0x3600bd[_0xe719('0x1f')]:_0x1e9a7c[_0xe719('0x1c')]+_0x1e9a7c[_0xe719('0x1e')];var _0x3b6f0f;if(_0x3c49d7>=_0x303f91){_0x3c49d7=_0x303f91;_0x3b6f0f=0xc8;}else{_0x3b6f0f=0xce;}_0xf2dff7['status'](_0x3b6f0f);return _0xf2dff7[_0xe719('0x20')]('Content-Range',_0x2bb8f6+'-'+_0x3c49d7+'/'+_0x303f91)['json'](_0x3600bd);}return null;};}function patchUpdates(_0x3dc764){return function(_0x45de6e){try{jsonpatch[_0xe719('0x21')](_0x45de6e,_0x3dc764,!![]);}catch(_0xe97fe4){return BPromise[_0xe719('0x22')](_0xe97fe4);}return _0x45de6e[_0xe719('0x23')]();};}function saveUpdates(_0x3228fc,_0x5d206d){return function(_0x49be1f){if(_0x49be1f){return _0x49be1f['update'](_0x3228fc)['then'](function(_0x41e019){return _0x41e019;});}return null;};}function removeEntity(_0x68a955,_0x4228ac){return function(_0x17821a){if(_0x17821a){return _0x17821a[_0xe719('0x24')]()['then'](function(){_0x68a955[_0xe719('0x1a')](0xcc)[_0xe719('0x1b')]();});}};}function handleEntityNotFound(_0x3739d2,_0x420942){return function(_0x24dcee){if(!_0x24dcee){_0x3739d2[_0xe719('0x19')](0x194);}return _0x24dcee;};}function handleError(_0x9de67b,_0x392f35){_0x392f35=_0x392f35||0x1f4;return function(_0x1522e3){logger['error'](_0x1522e3[_0xe719('0x25')]);if(_0x1522e3[_0xe719('0x26')]){delete _0x1522e3['name'];}_0x9de67b[_0xe719('0x1a')](_0x392f35)[_0xe719('0x27')](_0x1522e3);};}exports[_0xe719('0x28')]=function(_0x3a86e6,_0x5c2e50){var _0x36edbe={},_0xf9826e={},_0x5a7e92={'count':0x0,'rows':[]};var _0x9eaa23=_[_0xe719('0x29')](db[_0xe719('0x2a')][_0xe719('0x2b')],function(_0x45b17b){return{'name':_0x45b17b[_0xe719('0x2c')],'type':_0x45b17b[_0xe719('0x2d')][_0xe719('0x2e')]};});_0xf9826e[_0xe719('0x2f')]=_[_0xe719('0x29')](_0x9eaa23,_0xe719('0x26'));_0xf9826e['query']=_[_0xe719('0x30')](_0x3a86e6[_0xe719('0x31')]);_0xf9826e[_0xe719('0x32')]=_[_0xe719('0x33')](_0xf9826e[_0xe719('0x2f')],_0xf9826e['query']);_0x36edbe[_0xe719('0x34')]=_[_0xe719('0x33')](_0xf9826e[_0xe719('0x2f')],qs['fields'](_0x3a86e6[_0xe719('0x31')]['fields']));_0x36edbe[_0xe719('0x34')]=_0x36edbe[_0xe719('0x34')]['length']?_0x36edbe[_0xe719('0x34')]:_0xf9826e[_0xe719('0x2f')];if(!_0x3a86e6[_0xe719('0x31')][_0xe719('0x35')]('nolimit')){_0x36edbe[_0xe719('0x1e')]=qs[_0xe719('0x1e')](_0x3a86e6[_0xe719('0x31')]['limit']);_0x36edbe[_0xe719('0x1c')]=qs[_0xe719('0x1c')](_0x3a86e6[_0xe719('0x31')][_0xe719('0x1c')]);}_0x36edbe[_0xe719('0x36')]=qs[_0xe719('0x37')](_0x3a86e6[_0xe719('0x31')]['sort']);_0x36edbe[_0xe719('0x38')]=qs[_0xe719('0x32')](_[_0xe719('0x39')](_0x3a86e6[_0xe719('0x31')],_0xf9826e[_0xe719('0x32')]),_0x9eaa23);if(_0x3a86e6[_0xe719('0x31')][_0xe719('0x3a')]){_0x36edbe[_0xe719('0x38')]=_['merge'](_0x36edbe[_0xe719('0x38')],{'$or':_[_0xe719('0x29')](_0x9eaa23,function(_0x3f4794){if(_0x3f4794[_0xe719('0x2d')]!==_0xe719('0x3b')){var _0x4ef95c={};_0x4ef95c[_0x3f4794[_0xe719('0x26')]]={'$like':'%'+_0x3a86e6[_0xe719('0x31')][_0xe719('0x3a')]+'%'};return _0x4ef95c;}})});}_0x36edbe=_[_0xe719('0x3c')]({},_0x36edbe,_0x3a86e6['options']);var _0x4dc7da={'where':_0x36edbe['where']};return db[_0xe719('0x2a')][_0xe719('0x1f')](_0x4dc7da)[_0xe719('0x3d')](function(_0x479290){_0x5a7e92[_0xe719('0x1f')]=_0x479290;if(_0x3a86e6[_0xe719('0x31')][_0xe719('0x3e')]){_0x36edbe[_0xe719('0x3f')]=[{'all':!![]}];}return db[_0xe719('0x2a')][_0xe719('0x40')](_0x36edbe);})[_0xe719('0x3d')](function(_0x5b36b6){_0x5a7e92[_0xe719('0x41')]=_0x5b36b6;return _0x5a7e92;})[_0xe719('0x3d')](respondWithFilteredResult(_0x5c2e50,_0x36edbe))[_0xe719('0x42')](handleError(_0x5c2e50,null));};exports[_0xe719('0x43')]=function(_0xc7a8ac,_0x39b669){var _0x453962={'raw':!![],'where':{'id':_0xc7a8ac[_0xe719('0x44')]['id']}},_0x29c2e7={};_0x29c2e7[_0xe719('0x2f')]=_[_0xe719('0x30')](db[_0xe719('0x2a')]['rawAttributes']);_0x29c2e7[_0xe719('0x31')]=_[_0xe719('0x30')](_0xc7a8ac[_0xe719('0x31')]);_0x29c2e7[_0xe719('0x32')]=_['intersection'](_0x29c2e7[_0xe719('0x2f')],_0x29c2e7[_0xe719('0x31')]);_0x453962[_0xe719('0x34')]=_[_0xe719('0x33')](_0x29c2e7[_0xe719('0x2f')],qs['fields'](_0xc7a8ac['query'][_0xe719('0x45')]));_0x453962['attributes']=_0x453962[_0xe719('0x34')][_0xe719('0x46')]?_0x453962[_0xe719('0x34')]:_0x29c2e7[_0xe719('0x2f')];if(_0xc7a8ac[_0xe719('0x31')][_0xe719('0x3e')]){_0x453962['include']=[{'all':!![]}];}_0x453962=_[_0xe719('0x3c')]({},_0x453962,_0xc7a8ac[_0xe719('0x47')]);return db[_0xe719('0x2a')]['find'](_0x453962)['then'](handleEntityNotFound(_0x39b669,null))[_0xe719('0x3d')](respondWithResult(_0x39b669,null))[_0xe719('0x42')](handleError(_0x39b669,null));};exports['create']=function(_0x53924a,_0x4a165c){return db[_0xe719('0x2a')][_0xe719('0x48')](_0x53924a['body'],{})['then'](respondWithResult(_0x4a165c,0xc9))[_0xe719('0x42')](handleError(_0x4a165c,null));};exports[_0xe719('0x49')]=function(_0x18fd5d,_0x5aeed8){if(_0x18fd5d[_0xe719('0x4a')]['id']){delete _0x18fd5d['body']['id'];}return db[_0xe719('0x2a')]['find']({'where':{'id':_0x18fd5d[_0xe719('0x44')]['id']}})['then'](handleEntityNotFound(_0x5aeed8,null))[_0xe719('0x3d')](saveUpdates(_0x18fd5d[_0xe719('0x4a')],null))[_0xe719('0x3d')](respondWithResult(_0x5aeed8,null))['catch'](handleError(_0x5aeed8,null));};exports[_0xe719('0x24')]=function(_0x4d143c,_0xa5f4b6){return db[_0xe719('0x2a')][_0xe719('0x4b')]({'where':{'id':_0x4d143c[_0xe719('0x44')]['id']}})[_0xe719('0x3d')](handleEntityNotFound(_0xa5f4b6,null))[_0xe719('0x3d')](removeEntity(_0xa5f4b6,null))['catch'](handleError(_0xa5f4b6,null));};exports[_0xe719('0x4c')]=function(_0x5b4d6d,_0x79d446){return db[_0xe719('0x2a')][_0xe719('0x4c')]()[_0xe719('0x3d')](respondWithResult(_0x79d446,null))[_0xe719('0x42')](handleError(_0x79d446,null));}; \ No newline at end of file +var _0x566f=['filter','where','merge','VIRTUAL','options','ChatTransferReport','includeAll','include','findAll','rows','catch','show','params','keys','length','find','create','body','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','mustache','util','path','to-csv','ejs','fs-extra','squel','crypto','jsforce','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','limit','undefined','count','Content-Range','apply','update','then','destroy','error','name','rawAttributes','type','key','model','map','query','filters','intersection','fields','attributes','hasOwnProperty','order','sort','pick'];(function(_0x41b733,_0x130419){var _0x180567=function(_0x574795){while(--_0x574795){_0x41b733['push'](_0x41b733['shift']());}};_0x180567(++_0x130419);}(_0x566f,0xa3));var _0xf566=function(_0x18486c,_0x2d14d2){_0x18486c=_0x18486c-0x0;var _0x28e891=_0x566f[_0x18486c];return _0x28e891;};'use strict';var emlformat=require(_0xf566('0x0'));var rimraf=require(_0xf566('0x1'));var zipdir=require(_0xf566('0x2'));var jsonpatch=require(_0xf566('0x3'));var rp=require(_0xf566('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xf566('0x5'));var util=require(_0xf566('0x6'));var path=require(_0xf566('0x7'));var sox=require('sox');var csv=require(_0xf566('0x8'));var ejs=require(_0xf566('0x9'));var fs=require('fs');var fs_extra=require(_0xf566('0xa'));var _=require('lodash');var squel=require(_0xf566('0xb'));var crypto=require(_0xf566('0xc'));var jsforce=require(_0xf566('0xd'));var deskjs=require('desk.js');var toCsv=require(_0xf566('0x8'));var querystring=require('querystring');var Papa=require(_0xf566('0xe'));var Redis=require(_0xf566('0xf'));var authService=require(_0xf566('0x10'));var qs=require(_0xf566('0x11'));var as=require(_0xf566('0x12'));var hardwareService=require(_0xf566('0x13'));var logger=require('../../config/logger')(_0xf566('0x14'));var utils=require('../../config/utils');var config=require(_0xf566('0x15'));var licenseUtil=require(_0xf566('0x16'));var db=require(_0xf566('0x17'))['db'];function respondWithStatusCode(_0x49d487,_0x494610){_0x494610=_0x494610||0xcc;return function(_0xec8dd5){if(_0xec8dd5){return _0x49d487[_0xf566('0x18')](_0x494610);}return _0x49d487[_0xf566('0x19')](_0x494610)[_0xf566('0x1a')]();};}function respondWithResult(_0x140abe,_0x352ba6){_0x352ba6=_0x352ba6||0xc8;return function(_0x2c97d4){if(_0x2c97d4){return _0x140abe[_0xf566('0x19')](_0x352ba6)[_0xf566('0x1b')](_0x2c97d4);}};}function respondWithFilteredResult(_0x529071,_0x525425){return function(_0x5b96cd){if(_0x5b96cd){var _0x3bb0ff=typeof _0x525425[_0xf566('0x1c')]==='undefined'&&typeof _0x525425[_0xf566('0x1d')]===_0xf566('0x1e');var _0x3d83b4=_0x5b96cd[_0xf566('0x1f')];var _0x32ffea=_0x3bb0ff?0x0:_0x525425[_0xf566('0x1c')];var _0x9f5b14=_0x3bb0ff?_0x5b96cd['count']:_0x525425[_0xf566('0x1c')]+_0x525425[_0xf566('0x1d')];var _0x46d9dc;if(_0x9f5b14>=_0x3d83b4){_0x9f5b14=_0x3d83b4;_0x46d9dc=0xc8;}else{_0x46d9dc=0xce;}_0x529071[_0xf566('0x19')](_0x46d9dc);return _0x529071['set'](_0xf566('0x20'),_0x32ffea+'-'+_0x9f5b14+'/'+_0x3d83b4)['json'](_0x5b96cd);}return null;};}function patchUpdates(_0x3359fe){return function(_0x5697b6){try{jsonpatch[_0xf566('0x21')](_0x5697b6,_0x3359fe,!![]);}catch(_0x3ed661){return BPromise['reject'](_0x3ed661);}return _0x5697b6['save']();};}function saveUpdates(_0x450247,_0x3fd920){return function(_0x2bd09f){if(_0x2bd09f){return _0x2bd09f[_0xf566('0x22')](_0x450247)[_0xf566('0x23')](function(_0x2bd9f9){return _0x2bd9f9;});}return null;};}function removeEntity(_0x1be9bc,_0x5b21dd){return function(_0x3876b6){if(_0x3876b6){return _0x3876b6[_0xf566('0x24')]()['then'](function(){_0x1be9bc[_0xf566('0x19')](0xcc)[_0xf566('0x1a')]();});}};}function handleEntityNotFound(_0x3325ba,_0x48a1c6){return function(_0x2f0e00){if(!_0x2f0e00){_0x3325ba['sendStatus'](0x194);}return _0x2f0e00;};}function handleError(_0x3df455,_0x5b95ad){_0x5b95ad=_0x5b95ad||0x1f4;return function(_0x46ac08){logger[_0xf566('0x25')](_0x46ac08['stack']);if(_0x46ac08[_0xf566('0x26')]){delete _0x46ac08[_0xf566('0x26')];}_0x3df455[_0xf566('0x19')](_0x5b95ad)['send'](_0x46ac08);};}exports['index']=function(_0x29663d,_0x574592){var _0x2fc86d={},_0x5c115a={},_0x5ef96c={'count':0x0,'rows':[]};var _0x440268=_['map'](db['ChatTransferReport'][_0xf566('0x27')],function(_0x4326d8){return{'name':_0x4326d8['fieldName'],'type':_0x4326d8[_0xf566('0x28')][_0xf566('0x29')]};});_0x5c115a[_0xf566('0x2a')]=_[_0xf566('0x2b')](_0x440268,_0xf566('0x26'));_0x5c115a['query']=_['keys'](_0x29663d[_0xf566('0x2c')]);_0x5c115a[_0xf566('0x2d')]=_[_0xf566('0x2e')](_0x5c115a[_0xf566('0x2a')],_0x5c115a[_0xf566('0x2c')]);_0x2fc86d['attributes']=_['intersection'](_0x5c115a['model'],qs['fields'](_0x29663d[_0xf566('0x2c')][_0xf566('0x2f')]));_0x2fc86d[_0xf566('0x30')]=_0x2fc86d[_0xf566('0x30')]['length']?_0x2fc86d[_0xf566('0x30')]:_0x5c115a['model'];if(!_0x29663d[_0xf566('0x2c')][_0xf566('0x31')]('nolimit')){_0x2fc86d[_0xf566('0x1d')]=qs[_0xf566('0x1d')](_0x29663d['query'][_0xf566('0x1d')]);_0x2fc86d[_0xf566('0x1c')]=qs[_0xf566('0x1c')](_0x29663d[_0xf566('0x2c')][_0xf566('0x1c')]);}_0x2fc86d[_0xf566('0x32')]=qs[_0xf566('0x33')](_0x29663d['query'][_0xf566('0x33')]);_0x2fc86d['where']=qs[_0xf566('0x2d')](_[_0xf566('0x34')](_0x29663d[_0xf566('0x2c')],_0x5c115a[_0xf566('0x2d')]),_0x440268);if(_0x29663d[_0xf566('0x2c')][_0xf566('0x35')]){_0x2fc86d[_0xf566('0x36')]=_[_0xf566('0x37')](_0x2fc86d['where'],{'$or':_['map'](_0x440268,function(_0x46ff33){if(_0x46ff33[_0xf566('0x28')]!==_0xf566('0x38')){var _0x269b17={};_0x269b17[_0x46ff33[_0xf566('0x26')]]={'$like':'%'+_0x29663d[_0xf566('0x2c')][_0xf566('0x35')]+'%'};return _0x269b17;}})});}_0x2fc86d=_['merge']({},_0x2fc86d,_0x29663d[_0xf566('0x39')]);var _0x4743c6={'where':_0x2fc86d[_0xf566('0x36')]};return db[_0xf566('0x3a')][_0xf566('0x1f')](_0x4743c6)[_0xf566('0x23')](function(_0x220f2d){_0x5ef96c[_0xf566('0x1f')]=_0x220f2d;if(_0x29663d[_0xf566('0x2c')][_0xf566('0x3b')]){_0x2fc86d[_0xf566('0x3c')]=[{'all':!![]}];}return db[_0xf566('0x3a')][_0xf566('0x3d')](_0x2fc86d);})[_0xf566('0x23')](function(_0x46c326){_0x5ef96c[_0xf566('0x3e')]=_0x46c326;return _0x5ef96c;})[_0xf566('0x23')](respondWithFilteredResult(_0x574592,_0x2fc86d))[_0xf566('0x3f')](handleError(_0x574592,null));};exports[_0xf566('0x40')]=function(_0x58f97c,_0x1eb5f5){var _0x610168={'raw':!![],'where':{'id':_0x58f97c[_0xf566('0x41')]['id']}},_0x1e34d9={};_0x1e34d9[_0xf566('0x2a')]=_['keys'](db[_0xf566('0x3a')][_0xf566('0x27')]);_0x1e34d9['query']=_[_0xf566('0x42')](_0x58f97c[_0xf566('0x2c')]);_0x1e34d9[_0xf566('0x2d')]=_[_0xf566('0x2e')](_0x1e34d9[_0xf566('0x2a')],_0x1e34d9[_0xf566('0x2c')]);_0x610168['attributes']=_['intersection'](_0x1e34d9['model'],qs[_0xf566('0x2f')](_0x58f97c[_0xf566('0x2c')][_0xf566('0x2f')]));_0x610168[_0xf566('0x30')]=_0x610168['attributes'][_0xf566('0x43')]?_0x610168[_0xf566('0x30')]:_0x1e34d9[_0xf566('0x2a')];if(_0x58f97c[_0xf566('0x2c')][_0xf566('0x3b')]){_0x610168[_0xf566('0x3c')]=[{'all':!![]}];}_0x610168=_['merge']({},_0x610168,_0x58f97c[_0xf566('0x39')]);return db['ChatTransferReport'][_0xf566('0x44')](_0x610168)['then'](handleEntityNotFound(_0x1eb5f5,null))['then'](respondWithResult(_0x1eb5f5,null))['catch'](handleError(_0x1eb5f5,null));};exports['create']=function(_0x496b36,_0x1b7715){return db[_0xf566('0x3a')][_0xf566('0x45')](_0x496b36[_0xf566('0x46')],{})['then'](respondWithResult(_0x1b7715,0xc9))['catch'](handleError(_0x1b7715,null));};exports[_0xf566('0x22')]=function(_0x21d874,_0x3d0def){if(_0x21d874[_0xf566('0x46')]['id']){delete _0x21d874[_0xf566('0x46')]['id'];}return db[_0xf566('0x3a')][_0xf566('0x44')]({'where':{'id':_0x21d874['params']['id']}})[_0xf566('0x23')](handleEntityNotFound(_0x3d0def,null))['then'](saveUpdates(_0x21d874[_0xf566('0x46')],null))[_0xf566('0x23')](respondWithResult(_0x3d0def,null))[_0xf566('0x3f')](handleError(_0x3d0def,null));};exports[_0xf566('0x24')]=function(_0x299694,_0x49109c){return db['ChatTransferReport'][_0xf566('0x44')]({'where':{'id':_0x299694[_0xf566('0x41')]['id']}})['then'](handleEntityNotFound(_0x49109c,null))[_0xf566('0x23')](removeEntity(_0x49109c,null))[_0xf566('0x3f')](handleError(_0x49109c,null));};exports[_0xf566('0x47')]=function(_0x153a80,_0x43f899){return db[_0xf566('0x3a')]['describe']()[_0xf566('0x23')](respondWithResult(_0x43f899,null))[_0xf566('0x3f')](handleError(_0x43f899,null));}; \ No newline at end of file diff --git a/server/api/chatTransferReport/chatTransferReport.model.js b/server/api/chatTransferReport/chatTransferReport.model.js index df9e833..3d7e2d9 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 _0x3ee9=['ChatTransferReport','report_chat_transfer','uniqueid','util','../../config/logger','moment','path','rimraf','../../config/environment','./chatTransferReport.attributes','exports'];(function(_0x4457f9,_0xae5caf){var _0x2aea22=function(_0x1ffe47){while(--_0x1ffe47){_0x4457f9['push'](_0x4457f9['shift']());}};_0x2aea22(++_0xae5caf);}(_0x3ee9,0x19a));var _0x93ee=function(_0xdb01a,_0x54a83a){_0xdb01a=_0xdb01a-0x0;var _0x107ede=_0x3ee9[_0xdb01a];return _0x107ede;};'use strict';var _=require('lodash');var util=require(_0x93ee('0x0'));var logger=require(_0x93ee('0x1'))('api');var moment=require(_0x93ee('0x2'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x93ee('0x3'));var rimraf=require(_0x93ee('0x4'));var config=require(_0x93ee('0x5'));var attributes=require(_0x93ee('0x6'));module[_0x93ee('0x7')]=function(_0x59cd53,_0x1edca9){return _0x59cd53['define'](_0x93ee('0x8'),attributes,{'tableName':_0x93ee('0x9'),'paranoid':![],'indexes':[{'name':'uniqueid','fields':[_0x93ee('0xa')]}],'timestamps':!![]});}; \ No newline at end of file +var _0xe79e=['request-promise','rimraf','./chatTransferReport.attributes','exports','define','uniqueid','lodash','util','api','moment'];(function(_0x919445,_0x5467dc){var _0x511b3e=function(_0xde10f3){while(--_0xde10f3){_0x919445['push'](_0x919445['shift']());}};_0x511b3e(++_0x5467dc);}(_0xe79e,0x182));var _0xee79=function(_0x52214c,_0x3e4ae3){_0x52214c=_0x52214c-0x0;var _0x270460=_0xe79e[_0x52214c];return _0x270460;};'use strict';var _=require(_0xee79('0x0'));var util=require(_0xee79('0x1'));var logger=require('../../config/logger')(_0xee79('0x2'));var moment=require(_0xee79('0x3'));var BPromise=require('bluebird');var rp=require(_0xee79('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xee79('0x5'));var config=require('../../config/environment');var attributes=require(_0xee79('0x6'));module[_0xee79('0x7')]=function(_0x516984,_0x47aa19){return _0x516984[_0xee79('0x8')]('ChatTransferReport',attributes,{'tableName':'report_chat_transfer','paranoid':![],'indexes':[{'name':_0xee79('0x9'),'fields':[_0xee79('0x9')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/chatTransferReport/chatTransferReport.rpc.js b/server/api/chatTransferReport/chatTransferReport.rpc.js index 052f72d..2973577 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 _0x8408=['ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','then','info','request\x20sent','ChatTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','ChatTransferReport,\x20%s,\x20%s','message','result','catch','util','moment','bluebird','randomstring'];(function(_0x2bf258,_0x5e0bb2){var _0x3b43af=function(_0x2c40af){while(--_0x2c40af){_0x2bf258['push'](_0x2bf258['shift']());}};_0x3b43af(++_0x5e0bb2);}(_0x8408,0x1df));var _0x8840=function(_0x5f5497,_0x50803a){_0x5f5497=_0x5f5497-0x0;var _0x10e943=_0x8408[_0x5f5497];return _0x10e943;};'use strict';var _=require('lodash');var util=require(_0x8840('0x0'));var moment=require(_0x8840('0x1'));var BPromise=require(_0x8840('0x2'));var rs=require(_0x8840('0x3'));var fs=require('fs');var Redis=require(_0x8840('0x4'));var db=require(_0x8840('0x5'))['db'];var utils=require(_0x8840('0x6'));var logger=require(_0x8840('0x7'))(_0x8840('0x8'));var config=require(_0x8840('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x8840('0xa')][_0x8840('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x225997,_0x2a46ed,_0x3c007a){return new BPromise(function(_0x2b75f9,_0x15db47){return client['request'](_0x225997,_0x3c007a)[_0x8840('0xc')](function(_0x291689){logger[_0x8840('0xd')]('ChatTransferReport,\x20%s,\x20%s',_0x2a46ed,_0x8840('0xe'));logger['debug'](_0x8840('0xf'),_0x2a46ed,_0x8840('0xe'),JSON[_0x8840('0x10')](_0x291689));if(_0x291689['error']){if(_0x291689[_0x8840('0x11')][_0x8840('0x12')]===0x1f4){logger[_0x8840('0x11')](_0x8840('0x13'),_0x2a46ed,_0x291689['error'][_0x8840('0x14')]);return _0x15db47(_0x291689[_0x8840('0x11')]['message']);}logger[_0x8840('0x11')](_0x8840('0x13'),_0x2a46ed,_0x291689[_0x8840('0x11')][_0x8840('0x14')]);return _0x2b75f9(_0x291689[_0x8840('0x11')][_0x8840('0x14')]);}else{logger[_0x8840('0xd')](_0x8840('0x13'),_0x2a46ed,_0x8840('0xe'));_0x2b75f9(_0x291689[_0x8840('0x15')][_0x8840('0x14')]);}})[_0x8840('0x16')](function(_0x197bb9){logger['error'](_0x8840('0x13'),_0x2a46ed,_0x197bb9);_0x15db47(_0x197bb9);});});} \ No newline at end of file +var _0x06d3=['debug','ChatTransferReport,\x20%s,\x20%s,\x20%s','error','code','ChatTransferReport,\x20%s,\x20%s','message','result','util','moment','bluebird','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','http','request','info','request\x20sent'];(function(_0x5401ae,_0x5e58ac){var _0x286068=function(_0x2cac88){while(--_0x2cac88){_0x5401ae['push'](_0x5401ae['shift']());}};_0x286068(++_0x5e58ac);}(_0x06d3,0x1bf));var _0x306d=function(_0x85b405,_0x4ead7f){_0x85b405=_0x85b405-0x0;var _0x1ceca7=_0x06d3[_0x85b405];return _0x1ceca7;};'use strict';var _=require('lodash');var util=require(_0x306d('0x0'));var moment=require(_0x306d('0x1'));var BPromise=require(_0x306d('0x2'));var rs=require(_0x306d('0x3'));var fs=require('fs');var Redis=require(_0x306d('0x4'));var db=require(_0x306d('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x306d('0x6'));var config=require(_0x306d('0x7'));var jayson=require(_0x306d('0x8'));var client=jayson['client'][_0x306d('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2687a3,_0x5d6f22,_0x2baee6){return new BPromise(function(_0x456da2,_0x5dbbbc){return client[_0x306d('0xa')](_0x2687a3,_0x2baee6)['then'](function(_0x35999b){logger[_0x306d('0xb')]('ChatTransferReport,\x20%s,\x20%s',_0x5d6f22,_0x306d('0xc'));logger[_0x306d('0xd')](_0x306d('0xe'),_0x5d6f22,_0x306d('0xc'),JSON['stringify'](_0x35999b));if(_0x35999b[_0x306d('0xf')]){if(_0x35999b[_0x306d('0xf')][_0x306d('0x10')]===0x1f4){logger[_0x306d('0xf')](_0x306d('0x11'),_0x5d6f22,_0x35999b[_0x306d('0xf')][_0x306d('0x12')]);return _0x5dbbbc(_0x35999b['error'][_0x306d('0x12')]);}logger[_0x306d('0xf')]('ChatTransferReport,\x20%s,\x20%s',_0x5d6f22,_0x35999b[_0x306d('0xf')]['message']);return _0x456da2(_0x35999b[_0x306d('0xf')][_0x306d('0x12')]);}else{logger[_0x306d('0xb')](_0x306d('0x11'),_0x5d6f22,_0x306d('0xc'));_0x456da2(_0x35999b[_0x306d('0x13')]['message']);}})['catch'](function(_0x116332){logger[_0x306d('0xf')](_0x306d('0x11'),_0x5d6f22,_0x116332);_0x5dbbbc(_0x116332);});});} \ No newline at end of file diff --git a/server/api/chatTransferReport/index.js b/server/api/chatTransferReport/index.js index 4c5ac25..5349fc0 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 _0x4e97=['/:id','show','post','create','update','delete','destroy','exports','util','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','get','index','/describe','isAuthenticated','describe'];(function(_0x52666e,_0x5b3776){var _0x515330=function(_0x29cd4f){while(--_0x29cd4f){_0x52666e['push'](_0x52666e['shift']());}};_0x515330(++_0x5b3776);}(_0x4e97,0x197));var _0x74e9=function(_0x1090fa,_0x145124){_0x1090fa=_0x1090fa-0x0;var _0x113a54=_0x4e97[_0x1090fa];return _0x113a54;};'use strict';var multer=require('multer');var util=require(_0x74e9('0x0'));var path=require('path');var timeout=require(_0x74e9('0x1'));var express=require(_0x74e9('0x2'));var router=express['Router']();var fs_extra=require(_0x74e9('0x3'));var auth=require(_0x74e9('0x4'));var interaction=require(_0x74e9('0x5'));var config=require('../../config/environment');var controller=require('./chatTransferReport.controller');router[_0x74e9('0x6')]('/',auth['isAuthenticated'](),controller[_0x74e9('0x7')]);router[_0x74e9('0x6')](_0x74e9('0x8'),auth[_0x74e9('0x9')](),controller[_0x74e9('0xa')]);router['get'](_0x74e9('0xb'),auth[_0x74e9('0x9')](),controller[_0x74e9('0xc')]);router[_0x74e9('0xd')]('/',auth[_0x74e9('0x9')](),controller[_0x74e9('0xe')]);router['put'](_0x74e9('0xb'),auth['isAuthenticated'](),controller[_0x74e9('0xf')]);router[_0x74e9('0x10')]('/:id',auth[_0x74e9('0x9')](),controller[_0x74e9('0x11')]);module[_0x74e9('0x12')]=router; \ No newline at end of file +var _0x5967=['Router','../../components/auth/service','../../config/environment','./chatTransferReport.controller','get','isAuthenticated','describe','/:id','show','create','put','update','delete','destroy','exports','util','connect-timeout','express'];(function(_0xe1b5f6,_0x210c09){var _0x44636e=function(_0x3a3212){while(--_0x3a3212){_0xe1b5f6['push'](_0xe1b5f6['shift']());}};_0x44636e(++_0x210c09);}(_0x5967,0xc3));var _0x7596=function(_0x47f949,_0x433be7){_0x47f949=_0x47f949-0x0;var _0x57d40e=_0x5967[_0x47f949];return _0x57d40e;};'use strict';var multer=require('multer');var util=require(_0x7596('0x0'));var path=require('path');var timeout=require(_0x7596('0x1'));var express=require(_0x7596('0x2'));var router=express[_0x7596('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x7596('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x7596('0x5'));var controller=require(_0x7596('0x6'));router[_0x7596('0x7')]('/',auth['isAuthenticated'](),controller['index']);router[_0x7596('0x7')]('/describe',auth[_0x7596('0x8')](),controller[_0x7596('0x9')]);router[_0x7596('0x7')](_0x7596('0xa'),auth[_0x7596('0x8')](),controller[_0x7596('0xb')]);router['post']('/',auth[_0x7596('0x8')](),controller[_0x7596('0xc')]);router[_0x7596('0xd')](_0x7596('0xa'),auth[_0x7596('0x8')](),controller[_0x7596('0xe')]);router[_0x7596('0xf')]('/:id',auth[_0x7596('0x8')](),controller[_0x7596('0x10')]);module[_0x7596('0x11')]=router; \ No newline at end of file diff --git a/server/api/chatWebsite/chatWebsite.attributes.js b/server/api/chatWebsite/chatWebsite.attributes.js index 54ec809..8203112 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 _0x4fb9=['STRING','email','Agent','#011F6A','#ffffff','INTEGER','BOOLEAN','rounded','squared','We\x20are\x20here!','Send','Contact\x20us','Powered\x20by\x20xCALLY','TEXT','Form\x20submission\x20error','Note','Type\x20a\x20message','Thanks\x20you\x20for\x20your\x20time!','Skip','Feedback','ENUM','thumb','star','stringify','input','name','text','getDataValue','onlineForm','parse','setDataValue','textarea','Comments','Leave\x20your\x20comments','offlineForm','generate','All\x20of\x20our\x20agents\x20are\x20busy\x20at\x20this\x20time.\x20Your\x20chat\x20is\x20very\x20important\x20to\x20us.','Please\x20hold\x20and\x20we\x20will\x20answer\x20your\x20request\x20as\x20soon\x20as\x20possible.','New\x20offline\x20message\x20from\x20websiteName','Your\x20request\x20has\x20not\x20been\x20processed.','Account:\x20{{account.name}}
{{#queue}}Queue:\x20{{queue.name}}
{{/queue}}From\x20:\x20{{from}}','website_alias','alternate','#fafafa','System','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','mandatoryDisposition','Meeting\x20generated\x20for\x20interaction\x20#{{interaction.id}}\x20by\x20{{agent.name}}','sequelize','randomstring'];(function(_0x31b33f,_0x537282){var _0x319946=function(_0x5af6d7){while(--_0x5af6d7){_0x31b33f['push'](_0x31b33f['shift']());}};_0x319946(++_0x537282);}(_0x4fb9,0x130));var _0x94fb=function(_0x52b3e0,_0x2a8019){_0x52b3e0=_0x52b3e0-0x0;var _0x5d87bb=_0x4fb9[_0x52b3e0];return _0x5d87bb;};'use strict';var Sequelize=require(_0x94fb('0x0'));var rs=require(_0x94fb('0x1'));module['exports']={'name':{'type':Sequelize[_0x94fb('0x2')],'allowNull':![]},'address':{'type':Sequelize['STRING'],'allowNull':![],'unique':'address'},'description':{'type':Sequelize[_0x94fb('0x2')]},'mapKey':{'type':Sequelize[_0x94fb('0x2')],'defaultValue':_0x94fb('0x3')},'mapKeyOffline':{'type':Sequelize[_0x94fb('0x2')],'defaultValue':_0x94fb('0x3')},'key':{'type':Sequelize[_0x94fb('0x2')],'allowNull':![]},'agentAlias':{'type':Sequelize[_0x94fb('0x2')],'defaultValue':_0x94fb('0x4')},'customerAlias':{'type':Sequelize[_0x94fb('0x2')],'defaultValue':'Me'},'color':{'type':Sequelize[_0x94fb('0x2')],'allowNull':![],'defaultValue':_0x94fb('0x5'),'validate':{'notEmpty':!![]}},'color_button':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':'#011F6A','validate':{'notEmpty':!![]}},'textColor':{'type':Sequelize[_0x94fb('0x2')],'allowNull':![],'defaultValue':_0x94fb('0x6'),'validate':{'notEmpty':!![]}},'fontSize':{'type':Sequelize[_0x94fb('0x7')],'defaultValue':0xf},'remote':{'type':Sequelize[_0x94fb('0x2')]},'animation':{'type':Sequelize[_0x94fb('0x8')],'defaultValue':!![]},'header_shape':{'type':Sequelize['ENUM'](_0x94fb('0x9'),_0x94fb('0xa')),'defaultValue':_0x94fb('0x9')},'header_online':{'type':Sequelize[_0x94fb('0x2')],'defaultValue':_0x94fb('0xb')},'start_chat_button':{'type':Sequelize['STRING'],'defaultValue':'Chat'},'offline_chat_button':{'type':Sequelize[_0x94fb('0x2')],'defaultValue':_0x94fb('0xc')},'header_offline':{'type':Sequelize[_0x94fb('0x2')],'defaultValue':_0x94fb('0xd')},'download_transcript':{'type':Sequelize[_0x94fb('0x8')],'defaultValue':!![]},'timeout':{'type':Sequelize[_0x94fb('0x7')],'defaultValue':0x0},'whiteLabel':{'type':Sequelize[_0x94fb('0x2')],'defaultValue':_0x94fb('0xe')},'defaultWhiteLabel':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'sitepic':{'type':Sequelize[_0x94fb('0xf')]},'closingQuestion':{'type':Sequelize['STRING'],'defaultValue':'Do\x20you\x20want\x20to\x20close\x20the\x20interaction?'},'formSubmitSuccessMessage':{'type':Sequelize[_0x94fb('0x2')],'defaultValue':'Form\x20properly\x20submitted'},'formSubmitFailureMessage':{'type':Sequelize['STRING'],'defaultValue':_0x94fb('0x10')},'noteTitle':{'type':Sequelize[_0x94fb('0x2')],'defaultValue':_0x94fb('0x11')},'placeholderMessage':{'type':Sequelize[_0x94fb('0x2')],'defaultValue':_0x94fb('0x12')},'closingMessage':{'type':Sequelize[_0x94fb('0x2')],'defaultValue':_0x94fb('0x13')},'closingMessageButton':{'type':Sequelize[_0x94fb('0x2')],'defaultValue':'Send'},'skipMessageButton':{'type':Sequelize['STRING'],'defaultValue':_0x94fb('0x14')},'conditionAgreement':{'type':Sequelize[_0x94fb('0x8')],'defaultValue':![]},'enableRating':{'type':Sequelize[_0x94fb('0x8')],'defaultValue':![]},'enableFeedback':{'type':Sequelize[_0x94fb('0x8')],'defaultValue':![]},'enableSendButton':{'type':Sequelize[_0x94fb('0x8')],'defaultValue':![]},'feedbackTitle':{'type':Sequelize[_0x94fb('0x2')],'defaultValue':_0x94fb('0x15')},'ratingType':{'type':Sequelize[_0x94fb('0x16')]('star',_0x94fb('0x17')),'defaultValue':_0x94fb('0x18')},'ratingStarsNumber':{'type':Sequelize[_0x94fb('0x7')],'defaultValue':0x5},'onlineForm':{'type':Sequelize[_0x94fb('0xf')],'defaultValue':function(){return JSON[_0x94fb('0x19')]({'items':[{'type':_0x94fb('0x1a'),'variable':null,'config':{'placeholder':_0x94fb('0x1b'),'type':_0x94fb('0x1c'),'required':!![]},'props':{'title':_0x94fb('0x1b'),'helpText':''}},{'type':_0x94fb('0x1a'),'props':{'title':_0x94fb('0x3'),'helpText':''},'config':{'required':!![],'placeholder':_0x94fb('0x3'),'type':_0x94fb('0x3')},'variable':null}],'fromKey':0x1});},'get':function(){return this[_0x94fb('0x1d')](_0x94fb('0x1e'))?JSON[_0x94fb('0x1f')](this[_0x94fb('0x1d')](_0x94fb('0x1e'))):{};},'set':function(_0x2b1f58){return this[_0x94fb('0x20')](_0x94fb('0x1e'),JSON['stringify'](_0x2b1f58));}},'offlineForm':{'type':Sequelize[_0x94fb('0xf')],'defaultValue':function(){return JSON[_0x94fb('0x19')]({'items':[{'type':'input','props':{'title':_0x94fb('0x3'),'helpText':''},'config':{'required':!![],'placeholder':_0x94fb('0x3'),'type':'email'},'variable':null},{'type':_0x94fb('0x21'),'config':{'placeholder':_0x94fb('0x22')},'props':{'title':_0x94fb('0x22'),'helpText':_0x94fb('0x23')}}],'fromKey':0x0});},'get':function(){return this[_0x94fb('0x1d')]('offlineForm')?JSON['parse'](this['getDataValue'](_0x94fb('0x24'))):{};},'set':function(_0x3b55af){return this['setDataValue'](_0x94fb('0x24'),JSON[_0x94fb('0x19')](_0x3b55af));}},'token':{'type':Sequelize[_0x94fb('0x2')],'defaultValue':function(){return rs[_0x94fb('0x25')]();}},'autoclose':{'type':Sequelize[_0x94fb('0x8')],'defaultValue':!![]},'enableCustomerWriting':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'forwardTranscript':{'type':Sequelize[_0x94fb('0x8')],'defaultValue':![]},'forwardTranscriptMessage':{'type':Sequelize[_0x94fb('0x2')]},'forwardOffline':{'type':Sequelize[_0x94fb('0x8')],'defaultValue':![]},'forwardOfflineAddress':{'type':Sequelize[_0x94fb('0x2')]},'waitingTitle':{'type':Sequelize[_0x94fb('0x2')],'defaultValue':_0x94fb('0x26')},'waitingMessage':{'type':Sequelize['STRING'],'defaultValue':_0x94fb('0x27')},'offlineMessageSubject':{'type':Sequelize[_0x94fb('0x2')],'defaultValue':_0x94fb('0x28')},'offlineMessageBody':{'type':Sequelize['STRING'],'defaultValue':'You\x20received\x20a\x20new\x20offline\x20message\x20from\x20websiteName.\x20Here\x20you\x20can\x20find\x20the\x20details\x20of\x20the\x20request:'},'enableUnmanagedNote':{'type':Sequelize[_0x94fb('0x8')],'defaultValue':!![]},'unmanagedMessage':{'type':Sequelize[_0x94fb('0x2')],'defaultValue':_0x94fb('0x29')},'skipUnmanaged':{'type':Sequelize[_0x94fb('0x2')],'defaultValue':'Skip'},'sendUnmanaged':{'type':Sequelize[_0x94fb('0x2')],'defaultValue':'Send'},'enableCustomerAttachment':{'type':Sequelize[_0x94fb('0x8')],'defaultValue':![]},'enableCustomerCheckmarks':{'type':Sequelize[_0x94fb('0x8')],'defaultValue':![]},'agentAvatar':{'type':Sequelize[_0x94fb('0xf')]},'showAgentAvatar':{'type':Sequelize[_0x94fb('0x8')],'defaultValue':![]},'timezone':{'type':Sequelize[_0x94fb('0x2')]},'notificationTemplate':{'type':Sequelize[_0x94fb('0xf')],'defaultValue':function(){return _0x94fb('0x2a');}},'notificationSound':{'type':Sequelize[_0x94fb('0x8')],'defaultValue':!![]},'notificationShake':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'hideWhenOffline':{'type':Sequelize[_0x94fb('0x8')],'defaultValue':![]},'agentIdentifier':{'type':Sequelize[_0x94fb('0x2')],'defaultValue':_0x94fb('0x2b')},'waitForTheAssignedAgent':{'type':Sequelize[_0x94fb('0x7')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'alignment':{'type':Sequelize[_0x94fb('0x2')],'defaultValue':'bottom_right'},'verticalAlignment':{'type':Sequelize[_0x94fb('0x7')],'defaultValue':0x1e},'messagesAlignment':{'type':Sequelize[_0x94fb('0x2')],'defaultValue':_0x94fb('0x2c')},'defaultTitle':{'type':Sequelize[_0x94fb('0x2')]},'customerAvatar':{'type':Sequelize[_0x94fb('0xf')]},'showCustomerAvatar':{'type':Sequelize[_0x94fb('0x8')],'defaultValue':![]},'messageFontSize':{'type':Sequelize[_0x94fb('0x7')],'defaultValue':0xc},'backgroundColor':{'type':Sequelize[_0x94fb('0x2')],'allowNull':![],'defaultValue':_0x94fb('0x2d'),'validate':{'notEmpty':!![]}},'queueTransfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x94fb('0x7')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x94fb('0x8')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x94fb('0x7')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'systemAlias':{'type':Sequelize['STRING'],'defaultValue':_0x94fb('0x2e')},'systemAvatar':{'type':Sequelize[_0x94fb('0xf')]},'mandatoryDispositionPauseId':{'type':Sequelize[_0x94fb('0x7')],'comment':_0x94fb('0x2f')},'mandatoryDisposition':{'type':Sequelize[_0x94fb('0x8')],'defaultValue':![],'comment':_0x94fb('0x30'),'set':function(_0x4bcacc){if(!_0x4bcacc)this[_0x94fb('0x20')]('mandatoryDispositionPauseId',null);this[_0x94fb('0x20')](_0x94fb('0x31'),_0x4bcacc);}},'vidaooEscalation':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'vidaooApiKey':{'type':Sequelize['STRING']},'vidaooTopic':{'type':Sequelize[_0x94fb('0x2')],'allowNull':![],'defaultValue':'Generated\x20by\x20XCALLY\x20Motion'},'vidaooNote':{'type':Sequelize[_0x94fb('0x2')],'defaultValue':function(){return _0x94fb('0x32');}},'vidaooMetadata':{'type':Sequelize[_0x94fb('0xf')],'defaultValue':null},'openNewInteraction':{'type':Sequelize['BOOLEAN'],'defaultValue':![],'allowNull':!![]},'subjectOffline':{'type':Sequelize[_0x94fb('0xf')]}}; \ No newline at end of file +var _0xed3c=['parse','generate','All\x20of\x20our\x20agents\x20are\x20busy\x20at\x20this\x20time.\x20Your\x20chat\x20is\x20very\x20important\x20to\x20us.','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}}','alternate','#fafafa','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','mandatoryDisposition','randomstring','exports','STRING','email','Agent','#011F6A','#ffffff','INTEGER','BOOLEAN','ENUM','rounded','squared','Chat','Send','Contact\x20us','Powered\x20by\x20xCALLY','Do\x20you\x20want\x20to\x20close\x20the\x20interaction?','Form\x20properly\x20submitted','Form\x20submission\x20error','Note','thumb','star','TEXT','stringify','input','text','getDataValue','onlineForm','setDataValue','textarea','Comments','Leave\x20your\x20comments','offlineForm'];(function(_0x1f23c4,_0x59faf8){var _0x4376b8=function(_0x18599c){while(--_0x18599c){_0x1f23c4['push'](_0x1f23c4['shift']());}};_0x4376b8(++_0x59faf8);}(_0xed3c,0x8f));var _0xced3=function(_0x2cfb58,_0x3d9412){_0x2cfb58=_0x2cfb58-0x0;var _0xd99951=_0xed3c[_0x2cfb58];return _0xd99951;};'use strict';var Sequelize=require('sequelize');var rs=require(_0xced3('0x0'));module[_0xced3('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'address':{'type':Sequelize[_0xced3('0x2')],'allowNull':![],'unique':'address'},'description':{'type':Sequelize['STRING']},'mapKey':{'type':Sequelize[_0xced3('0x2')],'defaultValue':_0xced3('0x3')},'mapKeyOffline':{'type':Sequelize['STRING'],'defaultValue':_0xced3('0x3')},'key':{'type':Sequelize['STRING'],'allowNull':![]},'agentAlias':{'type':Sequelize[_0xced3('0x2')],'defaultValue':_0xced3('0x4')},'customerAlias':{'type':Sequelize[_0xced3('0x2')],'defaultValue':'Me'},'color':{'type':Sequelize[_0xced3('0x2')],'allowNull':![],'defaultValue':_0xced3('0x5'),'validate':{'notEmpty':!![]}},'color_button':{'type':Sequelize[_0xced3('0x2')],'allowNull':![],'defaultValue':_0xced3('0x5'),'validate':{'notEmpty':!![]}},'textColor':{'type':Sequelize[_0xced3('0x2')],'allowNull':![],'defaultValue':_0xced3('0x6'),'validate':{'notEmpty':!![]}},'fontSize':{'type':Sequelize[_0xced3('0x7')],'defaultValue':0xf},'remote':{'type':Sequelize[_0xced3('0x2')]},'animation':{'type':Sequelize[_0xced3('0x8')],'defaultValue':!![]},'header_shape':{'type':Sequelize[_0xced3('0x9')](_0xced3('0xa'),_0xced3('0xb')),'defaultValue':_0xced3('0xa')},'header_online':{'type':Sequelize[_0xced3('0x2')],'defaultValue':'We\x20are\x20here!'},'start_chat_button':{'type':Sequelize[_0xced3('0x2')],'defaultValue':_0xced3('0xc')},'offline_chat_button':{'type':Sequelize[_0xced3('0x2')],'defaultValue':_0xced3('0xd')},'header_offline':{'type':Sequelize['STRING'],'defaultValue':_0xced3('0xe')},'download_transcript':{'type':Sequelize[_0xced3('0x8')],'defaultValue':!![]},'timeout':{'type':Sequelize[_0xced3('0x7')],'defaultValue':0x0},'whiteLabel':{'type':Sequelize[_0xced3('0x2')],'defaultValue':_0xced3('0xf')},'defaultWhiteLabel':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'sitepic':{'type':Sequelize['TEXT']},'closingQuestion':{'type':Sequelize[_0xced3('0x2')],'defaultValue':_0xced3('0x10')},'formSubmitSuccessMessage':{'type':Sequelize[_0xced3('0x2')],'defaultValue':_0xced3('0x11')},'formSubmitFailureMessage':{'type':Sequelize[_0xced3('0x2')],'defaultValue':_0xced3('0x12')},'noteTitle':{'type':Sequelize['STRING'],'defaultValue':_0xced3('0x13')},'placeholderMessage':{'type':Sequelize[_0xced3('0x2')],'defaultValue':'Type\x20a\x20message'},'closingMessage':{'type':Sequelize[_0xced3('0x2')],'defaultValue':'Thanks\x20you\x20for\x20your\x20time!'},'closingMessageButton':{'type':Sequelize['STRING'],'defaultValue':_0xced3('0xd')},'skipMessageButton':{'type':Sequelize[_0xced3('0x2')],'defaultValue':'Skip'},'conditionAgreement':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'enableRating':{'type':Sequelize[_0xced3('0x8')],'defaultValue':![]},'enableFeedback':{'type':Sequelize[_0xced3('0x8')],'defaultValue':![]},'enableSendButton':{'type':Sequelize[_0xced3('0x8')],'defaultValue':![]},'feedbackTitle':{'type':Sequelize[_0xced3('0x2')],'defaultValue':'Feedback'},'ratingType':{'type':Sequelize[_0xced3('0x9')]('star',_0xced3('0x14')),'defaultValue':_0xced3('0x15')},'ratingStarsNumber':{'type':Sequelize[_0xced3('0x7')],'defaultValue':0x5},'onlineForm':{'type':Sequelize[_0xced3('0x16')],'defaultValue':function(){return JSON[_0xced3('0x17')]({'items':[{'type':_0xced3('0x18'),'variable':null,'config':{'placeholder':'name','type':_0xced3('0x19'),'required':!![]},'props':{'title':'name','helpText':''}},{'type':_0xced3('0x18'),'props':{'title':_0xced3('0x3'),'helpText':''},'config':{'required':!![],'placeholder':_0xced3('0x3'),'type':'email'},'variable':null}],'fromKey':0x1});},'get':function(){return this[_0xced3('0x1a')](_0xced3('0x1b'))?JSON['parse'](this['getDataValue'](_0xced3('0x1b'))):{};},'set':function(_0x33b075){return this[_0xced3('0x1c')](_0xced3('0x1b'),JSON[_0xced3('0x17')](_0x33b075));}},'offlineForm':{'type':Sequelize[_0xced3('0x16')],'defaultValue':function(){return JSON[_0xced3('0x17')]({'items':[{'type':_0xced3('0x18'),'props':{'title':_0xced3('0x3'),'helpText':''},'config':{'required':!![],'placeholder':_0xced3('0x3'),'type':_0xced3('0x3')},'variable':null},{'type':_0xced3('0x1d'),'config':{'placeholder':_0xced3('0x1e')},'props':{'title':_0xced3('0x1e'),'helpText':_0xced3('0x1f')}}],'fromKey':0x0});},'get':function(){return this['getDataValue'](_0xced3('0x20'))?JSON[_0xced3('0x21')](this[_0xced3('0x1a')]('offlineForm')):{};},'set':function(_0x2077c8){return this[_0xced3('0x1c')](_0xced3('0x20'),JSON['stringify'](_0x2077c8));}},'token':{'type':Sequelize[_0xced3('0x2')],'defaultValue':function(){return rs[_0xced3('0x22')]();}},'autoclose':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'enableCustomerWriting':{'type':Sequelize[_0xced3('0x8')],'defaultValue':![]},'forwardTranscript':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'forwardTranscriptMessage':{'type':Sequelize[_0xced3('0x2')]},'forwardOffline':{'type':Sequelize[_0xced3('0x8')],'defaultValue':![]},'forwardOfflineAddress':{'type':Sequelize[_0xced3('0x2')]},'waitingTitle':{'type':Sequelize[_0xced3('0x2')],'defaultValue':_0xced3('0x23')},'waitingMessage':{'type':Sequelize['STRING'],'defaultValue':'Please\x20hold\x20and\x20we\x20will\x20answer\x20your\x20request\x20as\x20soon\x20as\x20possible.'},'offlineMessageSubject':{'type':Sequelize[_0xced3('0x2')],'defaultValue':'New\x20offline\x20message\x20from\x20websiteName'},'offlineMessageBody':{'type':Sequelize['STRING'],'defaultValue':_0xced3('0x24')},'enableUnmanagedNote':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'unmanagedMessage':{'type':Sequelize[_0xced3('0x2')],'defaultValue':_0xced3('0x25')},'skipUnmanaged':{'type':Sequelize[_0xced3('0x2')],'defaultValue':'Skip'},'sendUnmanaged':{'type':Sequelize[_0xced3('0x2')],'defaultValue':_0xced3('0xd')},'enableCustomerAttachment':{'type':Sequelize[_0xced3('0x8')],'defaultValue':![]},'enableCustomerCheckmarks':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentAvatar':{'type':Sequelize['TEXT']},'showAgentAvatar':{'type':Sequelize[_0xced3('0x8')],'defaultValue':![]},'timezone':{'type':Sequelize[_0xced3('0x2')]},'notificationTemplate':{'type':Sequelize[_0xced3('0x16')],'defaultValue':function(){return _0xced3('0x26');}},'notificationSound':{'type':Sequelize[_0xced3('0x8')],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0xced3('0x8')],'defaultValue':![]},'hideWhenOffline':{'type':Sequelize[_0xced3('0x8')],'defaultValue':![]},'agentIdentifier':{'type':Sequelize[_0xced3('0x2')],'defaultValue':'website_alias'},'waitForTheAssignedAgent':{'type':Sequelize[_0xced3('0x7')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'alignment':{'type':Sequelize[_0xced3('0x2')],'defaultValue':'bottom_right'},'verticalAlignment':{'type':Sequelize[_0xced3('0x7')],'defaultValue':0x1e},'messagesAlignment':{'type':Sequelize[_0xced3('0x2')],'defaultValue':_0xced3('0x27')},'defaultTitle':{'type':Sequelize[_0xced3('0x2')]},'customerAvatar':{'type':Sequelize[_0xced3('0x16')]},'showCustomerAvatar':{'type':Sequelize[_0xced3('0x8')],'defaultValue':![]},'messageFontSize':{'type':Sequelize['INTEGER'],'defaultValue':0xc},'backgroundColor':{'type':Sequelize[_0xced3('0x2')],'allowNull':![],'defaultValue':_0xced3('0x28'),'validate':{'notEmpty':!![]}},'queueTransfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0xced3('0x7')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0xced3('0x8')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0xced3('0x7')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'systemAlias':{'type':Sequelize[_0xced3('0x2')],'defaultValue':'System'},'systemAvatar':{'type':Sequelize[_0xced3('0x16')]},'mandatoryDispositionPauseId':{'type':Sequelize[_0xced3('0x7')],'comment':_0xced3('0x29')},'mandatoryDisposition':{'type':Sequelize[_0xced3('0x8')],'defaultValue':![],'comment':_0xced3('0x2a'),'set':function(_0x13613d){if(!_0x13613d)this[_0xced3('0x1c')]('mandatoryDispositionPauseId',null);this[_0xced3('0x1c')](_0xced3('0x2b'),_0x13613d);}},'vidaooEscalation':{'type':Sequelize[_0xced3('0x8')],'defaultValue':![]},'vidaooApiKey':{'type':Sequelize[_0xced3('0x2')]},'vidaooTopic':{'type':Sequelize[_0xced3('0x2')],'allowNull':![],'defaultValue':'Generated\x20by\x20XCALLY\x20Motion'},'vidaooNote':{'type':Sequelize[_0xced3('0x2')],'defaultValue':function(){return'Meeting\x20generated\x20for\x20interaction\x20#{{interaction.id}}\x20by\x20{{agent.name}}';}},'vidaooMetadata':{'type':Sequelize[_0xced3('0x16')],'defaultValue':null},'openNewInteraction':{'type':Sequelize[_0xced3('0x8')],'defaultValue':![],'allowNull':!![]},'subjectOffline':{'type':Sequelize['TEXT']}}; \ No newline at end of file diff --git a/server/api/chatWebsite/chatWebsite.controller.js b/server/api/chatWebsite/chatWebsite.controller.js index b9d0379..9c1c8a7 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 _0xe418=['removeAnswers','sitepic','file','filename','customerAvatar','systemAvatar','getLogo','join','server/files/images/logos/default_logo.svg','getLicense','custom','isNil','existsSync','server/files/images/logos/','download','server/files/images/avatars/default_avatar.png','agentAvatar','root','server/files/images/avatars/','getCustomerAvatar','showCustomerAvatar','getSystemAvatar','notify','user-agent-parser','setUA','headers','getResult','chat','Sequelize','ValidationError','no\x20available\x20attributes','createdAt','updatedAt','difference','CompanyId','ListId','from','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','CmList','List','Contacts','ChatApplication','Applications','account','applications','priority','asc','CmContact','contact','customerIp','cf-connecting-ip','x-forwarded-for','first','split','firstName','x-real-port','referer','browser','%s\x20%s','version','unknown','device','vendor','format','%s\x20%s\x20%s','threadId','externalUrl','ChatInteraction','ContactId','interaction','spread','messageId','created','close','unmanaged','*,*,*,*','AttachmentId','User','UserId','unshift','forcedOwnership','Start','startRouting','EventManager','offline','files','send','mapKeyOffline','mapKeyOffline\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','mapKeyOffline\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','MailAccount','findOrCreate','server/files/templates/chatOfflineMessage.ejs','utf8','render','toPairs','offlineMessageBody','ChatOfflineMessage','mimetype','server','attachments','basename','Smtp','forwardOffline','forwardOfflineAddress','service','host','port','secure','authentication','auth','SendMail','sendMail','\x22%s\x22\x20<%s>','email','offlineMessageSubject','openNewInteraction','MailAccountId','originalname','subjectOffline','toPairsIn','mapValues','lastName','Chat','NotifyMailAccount','notifyMail','offline-chat','remove','addInteraction','omit','Contact','Owner','fullname','internal','Tags','color','tag','Command','getSnippet','timezone','iftime\x20%s,%s','interval','iftime\x20%s','[%s][INTERVAL][%s]\x20%s\x20%s\x20(%s)','OFFLINE','inspect','No\x20timezone','Interval','getProactiveActions','virtual','License','increment','Intervals','all','some','server/files/chat/iframe.ejs','remote','x-real-ip','connection','remoteAddress','replace','alignment','verticalAlignment','textColor','backgroundColor','addApplications','sequelize','transaction','bulkCreate','findAndCountAll','getApplications','addProactiveActions','chatProactiveAction','ChatProactiveAction','getFields','online','false','offlineForm','onlineForm','items','fromKey','getOfflineMessages','Attachments','addAgents','emit','userChatWebsite:save','removeAgents','userChatWebsite:remove','getAgents','eml-format','rimraf','request-promise','moment','mustache','path','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','./chatWebsite.socket','register','jayson/promise','http','client','request','ChatWebsite,\x20%s,\x20%s','request\x20sent','debug','ChatWebsite,\x20%s,\x20%s,\x20%s','error','code','message','result','status','end','json','offset','limit','undefined','count','Content-Range','apply','reject','save','update','then','destroy','get','UserProfileResource','sendStatus','stack','name','index','mandatoryDispositionPause','map','ChatWebsite','fieldName','key','query','keys','filters','intersection','model','fields','attributes','length','hasOwnProperty','nolimit','order','sort','pick','filter','merge','where','type','options','includeAll','include','rows','catch','show','Pause','rawAttributes','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','ChatWebsites','UserProfileSection','userProfileId','autoAssociation','params','describe','addDisposition','ChatWebsiteId','getDispositions','Disposition','findAll','removeDispositions','ids','addAnswer','CannedAnswer','getAnswers','findOne'];(function(_0x4dbba7,_0x34d6d1){var _0x43ef83=function(_0x27acf1){while(--_0x27acf1){_0x4dbba7['push'](_0x4dbba7['shift']());}};_0x43ef83(++_0x34d6d1);}(_0xe418,0x1f3));var _0x8e41=function(_0x2646f3,_0x812a2f){_0x2646f3=_0x2646f3-0x0;var _0x1267d7=_0xe418[_0x2646f3];return _0x1267d7;};'use strict';var emlformat=require(_0x8e41('0x0'));var rimraf=require(_0x8e41('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x8e41('0x2'));var moment=require(_0x8e41('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x8e41('0x4'));var util=require('util');var path=require(_0x8e41('0x5'));var sox=require(_0x8e41('0x6'));var csv=require(_0x8e41('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x8e41('0x8'));var _=require(_0x8e41('0x9'));var squel=require(_0x8e41('0xa'));var crypto=require(_0x8e41('0xb'));var jsforce=require(_0x8e41('0xc'));var deskjs=require(_0x8e41('0xd'));var toCsv=require(_0x8e41('0x7'));var querystring=require(_0x8e41('0xe'));var Papa=require(_0x8e41('0xf'));var Redis=require(_0x8e41('0x10'));var authService=require(_0x8e41('0x11'));var qs=require(_0x8e41('0x12'));var as=require(_0x8e41('0x13'));var hardwareService=require(_0x8e41('0x14'));var logger=require('../../config/logger')('api');var utils=require(_0x8e41('0x15'));var config=require(_0x8e41('0x16'));var licenseUtil=require(_0x8e41('0x17'));var db=require(_0x8e41('0x18'))['db'];config[_0x8e41('0x19')]=_[_0x8e41('0x1a')](config['redis'],{'host':_0x8e41('0x1b'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x8e41('0x19')]));require(_0x8e41('0x1c'))[_0x8e41('0x1d')](socket);var jayson=require(_0x8e41('0x1e'));var client=jayson['client'][_0x8e41('0x1f')]({'port':0x232c});var client9002=jayson[_0x8e41('0x20')][_0x8e41('0x1f')]({'port':0x232a});var client9003=jayson[_0x8e41('0x20')][_0x8e41('0x1f')]({'port':0x232b});var client9001=jayson[_0x8e41('0x20')][_0x8e41('0x1f')]({'port':0x2329});function respondWithRpcPromise(_0x117491,_0x443652,_0x369a9a,_0x3c3420){return new BPromise(function(_0x8063e8,_0x4fa753){var _0x2fd115=_0x3c3420||client;return _0x2fd115[_0x8e41('0x21')](_0x117491,_0x369a9a)['then'](function(_0xc469a5){logger['info'](_0x8e41('0x22'),_0x443652,_0x8e41('0x23'));logger[_0x8e41('0x24')](_0x8e41('0x25'),_0x443652,_0x8e41('0x23'),JSON['stringify'](_0xc469a5));if(_0xc469a5[_0x8e41('0x26')]){if(_0xc469a5[_0x8e41('0x26')][_0x8e41('0x27')]===0x1f4){logger[_0x8e41('0x26')](_0x8e41('0x22'),_0x443652,_0xc469a5[_0x8e41('0x26')][_0x8e41('0x28')]);return _0x4fa753(_0xc469a5[_0x8e41('0x26')][_0x8e41('0x28')]);}logger[_0x8e41('0x26')](_0x8e41('0x22'),_0x443652,_0xc469a5[_0x8e41('0x26')][_0x8e41('0x28')]);return _0x8063e8(_0xc469a5['error'][_0x8e41('0x28')]);}else{logger['info'](_0x8e41('0x22'),_0x443652,_0x8e41('0x23'));_0x8063e8(_0xc469a5[_0x8e41('0x29')]['message']);}})['catch'](function(_0x4a43ed){logger['error'](_0x8e41('0x22'),_0x443652,_0x4a43ed);_0x4fa753(_0x4a43ed);});});}function respondWithStatusCode(_0x17bacc,_0xb9f86f){_0xb9f86f=_0xb9f86f||0xcc;return function(_0x2e1b8){if(_0x2e1b8){return _0x17bacc['sendStatus'](_0xb9f86f);}return _0x17bacc[_0x8e41('0x2a')](_0xb9f86f)[_0x8e41('0x2b')]();};}function respondWithResult(_0x56b817,_0xbdaef1){_0xbdaef1=_0xbdaef1||0xc8;return function(_0x2298f7){if(_0x2298f7){return _0x56b817[_0x8e41('0x2a')](_0xbdaef1)[_0x8e41('0x2c')](_0x2298f7);}};}function respondWithFilteredResult(_0x23257b,_0x215992){return function(_0x406351){if(_0x406351){var _0x50c3b3=typeof _0x215992[_0x8e41('0x2d')]==='undefined'&&typeof _0x215992[_0x8e41('0x2e')]===_0x8e41('0x2f');var _0x117ccf=_0x406351[_0x8e41('0x30')];var _0x356402=_0x50c3b3?0x0:_0x215992[_0x8e41('0x2d')];var _0x290969=_0x50c3b3?_0x406351[_0x8e41('0x30')]:_0x215992[_0x8e41('0x2d')]+_0x215992[_0x8e41('0x2e')];var _0x401c8d;if(_0x290969>=_0x117ccf){_0x290969=_0x117ccf;_0x401c8d=0xc8;}else{_0x401c8d=0xce;}_0x23257b[_0x8e41('0x2a')](_0x401c8d);return _0x23257b['set'](_0x8e41('0x31'),_0x356402+'-'+_0x290969+'/'+_0x117ccf)['json'](_0x406351);}return null;};}function patchUpdates(_0x2bfcf5){return function(_0x56793f){try{jsonpatch[_0x8e41('0x32')](_0x56793f,_0x2bfcf5,!![]);}catch(_0x5a38be){return BPromise[_0x8e41('0x33')](_0x5a38be);}return _0x56793f[_0x8e41('0x34')]();};}function saveUpdates(_0xb78d1e,_0x14df30){return function(_0x151a8d){if(_0x151a8d){return _0x151a8d[_0x8e41('0x35')](_0xb78d1e)[_0x8e41('0x36')](function(_0x5d1fe9){return _0x5d1fe9;});}return null;};}function removeEntity(_0x4d4c03,_0x1b940b){return function(_0x85e6ea){if(_0x85e6ea){return _0x85e6ea[_0x8e41('0x37')]()[_0x8e41('0x36')](function(){var _0x420b0f=_0x85e6ea[_0x8e41('0x38')]({'plain':!![]});var _0x7e5ced='ChatWebsites';return db[_0x8e41('0x39')][_0x8e41('0x37')]({'where':{'type':_0x7e5ced,'resourceId':_0x420b0f['id']}})[_0x8e41('0x36')](function(){return _0x85e6ea;});})['then'](function(){_0x4d4c03[_0x8e41('0x2a')](0xcc)[_0x8e41('0x2b')]();});}};}function handleEntityNotFound(_0x15a00d,_0x4e6250){return function(_0x57d055){if(!_0x57d055){_0x15a00d[_0x8e41('0x3a')](0x194);}return _0x57d055;};}function handleError(_0x11bfca,_0x3fee94){_0x3fee94=_0x3fee94||0x1f4;return function(_0x14d57f){logger[_0x8e41('0x26')](_0x14d57f[_0x8e41('0x3b')]);if(_0x14d57f[_0x8e41('0x3c')]){delete _0x14d57f['name'];}_0x11bfca['status'](_0x3fee94)['send'](_0x14d57f);};}exports[_0x8e41('0x3d')]=function(_0x27092a,_0x3ef04a){var _0x15c4c4={'include':[{'model':db['Pause'],'as':_0x8e41('0x3e')}]},_0x4fd945={},_0x5aae34={'count':0x0,'rows':[]};var _0x522c3a=_[_0x8e41('0x3f')](db[_0x8e41('0x40')]['rawAttributes'],function(_0x3bb814){return{'name':_0x3bb814[_0x8e41('0x41')],'type':_0x3bb814['type'][_0x8e41('0x42')]};});_0x4fd945['model']=_[_0x8e41('0x3f')](_0x522c3a,_0x8e41('0x3c'));_0x4fd945[_0x8e41('0x43')]=_[_0x8e41('0x44')](_0x27092a[_0x8e41('0x43')]);_0x4fd945[_0x8e41('0x45')]=_[_0x8e41('0x46')](_0x4fd945[_0x8e41('0x47')],_0x4fd945[_0x8e41('0x43')]);_0x15c4c4['attributes']=_[_0x8e41('0x46')](_0x4fd945[_0x8e41('0x47')],qs[_0x8e41('0x48')](_0x27092a['query'][_0x8e41('0x48')]));_0x15c4c4['attributes']=_0x15c4c4[_0x8e41('0x49')][_0x8e41('0x4a')]?_0x15c4c4[_0x8e41('0x49')]:_0x4fd945[_0x8e41('0x47')];if(!_0x27092a[_0x8e41('0x43')][_0x8e41('0x4b')](_0x8e41('0x4c'))){_0x15c4c4[_0x8e41('0x2e')]=qs['limit'](_0x27092a[_0x8e41('0x43')]['limit']);_0x15c4c4['offset']=qs['offset'](_0x27092a['query']['offset']);}_0x15c4c4[_0x8e41('0x4d')]=qs['sort'](_0x27092a[_0x8e41('0x43')][_0x8e41('0x4e')]);_0x15c4c4['where']=qs[_0x8e41('0x45')](_[_0x8e41('0x4f')](_0x27092a[_0x8e41('0x43')],_0x4fd945['filters']),_0x522c3a);if(_0x27092a[_0x8e41('0x43')][_0x8e41('0x50')]){_0x15c4c4['where']=_[_0x8e41('0x51')](_0x15c4c4[_0x8e41('0x52')],{'$or':_[_0x8e41('0x3f')](_0x522c3a,function(_0x2c340d){if(_0x2c340d[_0x8e41('0x53')]!=='VIRTUAL'){var _0x56e4c0={};_0x56e4c0[_0x2c340d[_0x8e41('0x3c')]]={'$like':'%'+_0x27092a[_0x8e41('0x43')][_0x8e41('0x50')]+'%'};return _0x56e4c0;}})});}_0x15c4c4=_[_0x8e41('0x51')]({},_0x15c4c4,_0x27092a[_0x8e41('0x54')]);var _0x30ebe3={'where':_0x15c4c4[_0x8e41('0x52')]};return db[_0x8e41('0x40')][_0x8e41('0x30')](_0x30ebe3)[_0x8e41('0x36')](function(_0x5ac1cd){_0x5aae34[_0x8e41('0x30')]=_0x5ac1cd;if(_0x27092a[_0x8e41('0x43')][_0x8e41('0x55')]){_0x15c4c4[_0x8e41('0x56')]=[{'all':!![]}];}return db[_0x8e41('0x40')]['findAll'](_0x15c4c4);})[_0x8e41('0x36')](function(_0x2f0866){_0x5aae34[_0x8e41('0x57')]=_0x2f0866;return _0x5aae34;})[_0x8e41('0x36')](respondWithFilteredResult(_0x3ef04a,_0x15c4c4))[_0x8e41('0x58')](handleError(_0x3ef04a,null));};exports[_0x8e41('0x59')]=function(_0x5c5d13,_0xf8820f){var _0x2e617e={'raw':![],'where':{'id':_0x5c5d13['params']['id']},'include':[{'model':db[_0x8e41('0x5a')],'as':_0x8e41('0x3e')}]},_0x3b9927={};_0x3b9927[_0x8e41('0x47')]=_[_0x8e41('0x44')](db[_0x8e41('0x40')][_0x8e41('0x5b')]);_0x3b9927['query']=_[_0x8e41('0x44')](_0x5c5d13[_0x8e41('0x43')]);_0x3b9927[_0x8e41('0x45')]=_[_0x8e41('0x46')](_0x3b9927[_0x8e41('0x47')],_0x3b9927[_0x8e41('0x43')]);_0x2e617e['attributes']=_[_0x8e41('0x46')](_0x3b9927['model'],qs[_0x8e41('0x48')](_0x5c5d13[_0x8e41('0x43')][_0x8e41('0x48')]));_0x2e617e[_0x8e41('0x49')]=_0x2e617e[_0x8e41('0x49')][_0x8e41('0x4a')]?_0x2e617e['attributes']:_0x3b9927[_0x8e41('0x47')];if(_0x5c5d13[_0x8e41('0x43')]['includeAll']){_0x2e617e[_0x8e41('0x56')]=[{'all':!![]}];}_0x2e617e=_[_0x8e41('0x51')]({},_0x2e617e,_0x5c5d13[_0x8e41('0x54')]);return db[_0x8e41('0x40')][_0x8e41('0x5c')](_0x2e617e)[_0x8e41('0x36')](handleEntityNotFound(_0xf8820f,null))[_0x8e41('0x36')](respondWithResult(_0xf8820f,null))[_0x8e41('0x58')](handleError(_0xf8820f,null));};exports[_0x8e41('0x5d')]=function(_0x4a0544,_0x520742){return db[_0x8e41('0x40')][_0x8e41('0x5d')](_0x4a0544[_0x8e41('0x5e')],{})[_0x8e41('0x36')](function(_0x114d93){var _0xead3c2=_0x4a0544[_0x8e41('0x5f')][_0x8e41('0x38')]({'plain':!![]});if(!_0xead3c2)throw new Error(_0x8e41('0x60'));if(_0xead3c2[_0x8e41('0x61')]===_0x8e41('0x5f')){var _0x4916ea=_0x114d93[_0x8e41('0x38')]({'plain':!![]});var _0x16086e=_0x8e41('0x62');return db[_0x8e41('0x63')][_0x8e41('0x5c')]({'where':{'name':_0x16086e,'userProfileId':_0xead3c2[_0x8e41('0x64')]},'raw':!![]})[_0x8e41('0x36')](function(_0x191731){if(_0x191731&&_0x191731[_0x8e41('0x65')]===0x0){return db[_0x8e41('0x39')][_0x8e41('0x5d')]({'name':_0x4916ea[_0x8e41('0x3c')],'resourceId':_0x4916ea['id'],'type':_0x191731[_0x8e41('0x3c')],'sectionId':_0x191731['id']},{})['then'](function(){return _0x114d93;});}else{return _0x114d93;}})['catch'](function(_0x5129bc){logger[_0x8e41('0x26')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x5129bc);throw _0x5129bc;});}return _0x114d93;})[_0x8e41('0x36')](respondWithResult(_0x520742,0xc9))['catch'](handleError(_0x520742,null));};exports[_0x8e41('0x35')]=function(_0x724936,_0x2470d7){if(_0x724936[_0x8e41('0x5e')]['id']){delete _0x724936[_0x8e41('0x5e')]['id'];}return db[_0x8e41('0x40')][_0x8e41('0x5c')]({'where':{'id':_0x724936[_0x8e41('0x66')]['id']},'include':[{'model':db[_0x8e41('0x5a')],'as':_0x8e41('0x3e')}]})[_0x8e41('0x36')](handleEntityNotFound(_0x2470d7,null))[_0x8e41('0x36')](saveUpdates(_0x724936[_0x8e41('0x5e')],null))[_0x8e41('0x36')](respondWithResult(_0x2470d7,null))[_0x8e41('0x58')](handleError(_0x2470d7,null));};exports[_0x8e41('0x37')]=function(_0x54ec97,_0x56a4af){return db[_0x8e41('0x40')][_0x8e41('0x5c')]({'where':{'id':_0x54ec97[_0x8e41('0x66')]['id']}})[_0x8e41('0x36')](handleEntityNotFound(_0x56a4af,null))[_0x8e41('0x36')](removeEntity(_0x56a4af,null))[_0x8e41('0x58')](handleError(_0x56a4af,null));};exports[_0x8e41('0x67')]=function(_0x206248,_0x1e680d){return db[_0x8e41('0x40')][_0x8e41('0x67')]()[_0x8e41('0x36')](respondWithResult(_0x1e680d,null))[_0x8e41('0x58')](handleError(_0x1e680d,null));};exports[_0x8e41('0x68')]=function(_0x19fea4,_0x32a8e2,_0x1364ea){if(_0x19fea4[_0x8e41('0x5e')]['id']){delete _0x19fea4[_0x8e41('0x5e')]['id'];}return db[_0x8e41('0x40')]['find']({'where':{'id':_0x19fea4[_0x8e41('0x66')]['id']}})[_0x8e41('0x36')](handleEntityNotFound(_0x32a8e2,null))[_0x8e41('0x36')](function(_0x4ee32c){if(_0x4ee32c){_0x19fea4['body'][_0x8e41('0x69')]=_0x4ee32c['id'];return db['Disposition'][_0x8e41('0x5d')](_0x19fea4['body']);}})[_0x8e41('0x36')](respondWithResult(_0x32a8e2,null))[_0x8e41('0x58')](handleError(_0x32a8e2,null));};exports[_0x8e41('0x6a')]=function(_0x38ddbf,_0x520d5a,_0x484bf9){var _0xf40b3={'raw':![],'where':{}};var _0xfec4c={};var _0x3d66c2={'count':0x0,'rows':[]};return db['ChatWebsite']['findOne']({'where':{'id':_0x38ddbf[_0x8e41('0x66')]['id']}})[_0x8e41('0x36')](handleEntityNotFound(_0x520d5a,null))[_0x8e41('0x36')](function(_0x5336d3){if(_0x5336d3){_0xfec4c['model']=_[_0x8e41('0x44')](db['Disposition'][_0x8e41('0x5b')]);_0xfec4c[_0x8e41('0x43')]=_[_0x8e41('0x44')](_0x38ddbf[_0x8e41('0x43')]);_0xfec4c[_0x8e41('0x45')]=_['intersection'](_0xfec4c['model'],_0xfec4c['query']);_0xf40b3[_0x8e41('0x49')]=_[_0x8e41('0x46')](_0xfec4c[_0x8e41('0x47')],qs[_0x8e41('0x48')](_0x38ddbf[_0x8e41('0x43')][_0x8e41('0x48')]));_0xf40b3[_0x8e41('0x49')]=_0xf40b3[_0x8e41('0x49')][_0x8e41('0x4a')]?_0xf40b3[_0x8e41('0x49')]:_0xfec4c[_0x8e41('0x47')];if(!_0x38ddbf[_0x8e41('0x43')]['hasOwnProperty'](_0x8e41('0x4c'))){_0xf40b3[_0x8e41('0x2e')]=qs[_0x8e41('0x2e')](_0x38ddbf[_0x8e41('0x43')]['limit']);_0xf40b3[_0x8e41('0x2d')]=qs['offset'](_0x38ddbf[_0x8e41('0x43')][_0x8e41('0x2d')]);}_0xf40b3[_0x8e41('0x4d')]=qs['sort'](_0x38ddbf['query']['sort']);_0xf40b3[_0x8e41('0x52')]=qs[_0x8e41('0x45')](_[_0x8e41('0x4f')](_0x38ddbf[_0x8e41('0x43')],_0xfec4c['filters']));_0xf40b3[_0x8e41('0x52')]['ChatWebsiteId']=_0x5336d3['id'];if(_0x38ddbf[_0x8e41('0x43')][_0x8e41('0x50')]){_0xf40b3['where']=_[_0x8e41('0x51')](_0xf40b3[_0x8e41('0x52')],{'$or':_[_0x8e41('0x3f')](_0xf40b3[_0x8e41('0x49')],function(_0x45ff53){var _0x382fbf={};_0x382fbf[_0x45ff53]={'$like':'%'+_0x38ddbf[_0x8e41('0x43')][_0x8e41('0x50')]+'%'};return _0x382fbf;})});}_0xf40b3=_[_0x8e41('0x51')]({},_0xf40b3,_0x38ddbf[_0x8e41('0x54')]);return db[_0x8e41('0x6b')][_0x8e41('0x30')]({'where':_0xf40b3[_0x8e41('0x52')]})['then'](function(_0x48b84f){_0x3d66c2[_0x8e41('0x30')]=_0x48b84f;if(_0x38ddbf['query'][_0x8e41('0x55')]){_0xf40b3[_0x8e41('0x56')]=[{'all':!![]}];}return db[_0x8e41('0x6b')][_0x8e41('0x6c')](_0xf40b3);})[_0x8e41('0x36')](function(_0x24b029){_0x3d66c2['rows']=_0x24b029;return _0x3d66c2;});}})[_0x8e41('0x36')](respondWithFilteredResult(_0x520d5a,_0xf40b3))[_0x8e41('0x58')](handleError(_0x520d5a,null));};exports[_0x8e41('0x6d')]=function(_0x23e981,_0x5c00d7,_0x4c356e){return db[_0x8e41('0x40')][_0x8e41('0x5c')]({'where':{'id':_0x23e981['params']['id']}})[_0x8e41('0x36')](handleEntityNotFound(_0x5c00d7,null))['then'](function(_0x464666){if(_0x464666){return _0x464666[_0x8e41('0x6d')](_0x23e981['query'][_0x8e41('0x6e')]);}})[_0x8e41('0x36')](respondWithStatusCode(_0x5c00d7,null))['catch'](handleError(_0x5c00d7,null));};exports[_0x8e41('0x6f')]=function(_0x381736,_0x8d7bd,_0x438175){if(_0x381736[_0x8e41('0x5e')]['id']){delete _0x381736[_0x8e41('0x5e')]['id'];}return db[_0x8e41('0x40')][_0x8e41('0x5c')]({'where':{'id':_0x381736[_0x8e41('0x66')]['id']}})[_0x8e41('0x36')](handleEntityNotFound(_0x8d7bd,null))['then'](function(_0x461d1d){if(_0x461d1d){_0x381736[_0x8e41('0x5e')][_0x8e41('0x69')]=_0x461d1d['id'];return db[_0x8e41('0x70')][_0x8e41('0x5d')](_0x381736[_0x8e41('0x5e')]);}})['then'](respondWithResult(_0x8d7bd,null))[_0x8e41('0x58')](handleError(_0x8d7bd,null));};exports[_0x8e41('0x71')]=function(_0x5d4373,_0x5c85e9,_0x3657ad){var _0x17d6ac={'raw':![],'where':{}};var _0x4c95d9={};var _0x57397d={'count':0x0,'rows':[]};return db[_0x8e41('0x40')][_0x8e41('0x72')]({'where':{'id':_0x5d4373['params']['id']}})[_0x8e41('0x36')](handleEntityNotFound(_0x5c85e9,null))[_0x8e41('0x36')](function(_0x2eb4bb){if(_0x2eb4bb){_0x4c95d9['model']=_[_0x8e41('0x44')](db[_0x8e41('0x70')][_0x8e41('0x5b')]);_0x4c95d9['query']=_[_0x8e41('0x44')](_0x5d4373[_0x8e41('0x43')]);_0x4c95d9[_0x8e41('0x45')]=_[_0x8e41('0x46')](_0x4c95d9[_0x8e41('0x47')],_0x4c95d9[_0x8e41('0x43')]);_0x17d6ac[_0x8e41('0x49')]=_[_0x8e41('0x46')](_0x4c95d9[_0x8e41('0x47')],qs['fields'](_0x5d4373[_0x8e41('0x43')][_0x8e41('0x48')]));_0x17d6ac[_0x8e41('0x49')]=_0x17d6ac[_0x8e41('0x49')][_0x8e41('0x4a')]?_0x17d6ac[_0x8e41('0x49')]:_0x4c95d9[_0x8e41('0x47')];if(!_0x5d4373['query'][_0x8e41('0x4b')](_0x8e41('0x4c'))){_0x17d6ac[_0x8e41('0x2e')]=qs[_0x8e41('0x2e')](_0x5d4373['query'][_0x8e41('0x2e')]);_0x17d6ac[_0x8e41('0x2d')]=qs[_0x8e41('0x2d')](_0x5d4373[_0x8e41('0x43')][_0x8e41('0x2d')]);}_0x17d6ac[_0x8e41('0x4d')]=qs['sort'](_0x5d4373['query']['sort']);_0x17d6ac[_0x8e41('0x52')]=qs['filters'](_['pick'](_0x5d4373[_0x8e41('0x43')],_0x4c95d9['filters']));_0x17d6ac[_0x8e41('0x52')][_0x8e41('0x69')]=_0x2eb4bb['id'];if(_0x5d4373[_0x8e41('0x43')][_0x8e41('0x50')]){_0x17d6ac['where']=_[_0x8e41('0x51')](_0x17d6ac['where'],{'$or':_[_0x8e41('0x3f')](_0x17d6ac['attributes'],function(_0x5cf359){var _0x26629e={};_0x26629e[_0x5cf359]={'$like':'%'+_0x5d4373['query'][_0x8e41('0x50')]+'%'};return _0x26629e;})});}_0x17d6ac=_[_0x8e41('0x51')]({},_0x17d6ac,_0x5d4373[_0x8e41('0x54')]);return db[_0x8e41('0x70')][_0x8e41('0x30')]({'where':_0x17d6ac[_0x8e41('0x52')]})[_0x8e41('0x36')](function(_0x1a5cb2){_0x57397d[_0x8e41('0x30')]=_0x1a5cb2;if(_0x5d4373[_0x8e41('0x43')]['includeAll']){_0x17d6ac[_0x8e41('0x56')]=[{'all':!![]}];}return db[_0x8e41('0x70')][_0x8e41('0x6c')](_0x17d6ac);})[_0x8e41('0x36')](function(_0xe115b7){_0x57397d[_0x8e41('0x57')]=_0xe115b7;return _0x57397d;});}})['then'](respondWithFilteredResult(_0x5c85e9,_0x17d6ac))[_0x8e41('0x58')](handleError(_0x5c85e9,null));};exports[_0x8e41('0x73')]=function(_0x1cdbfa,_0x3e5b6b,_0x7d19a0){return db[_0x8e41('0x40')][_0x8e41('0x5c')]({'where':{'id':_0x1cdbfa[_0x8e41('0x66')]['id']}})[_0x8e41('0x36')](handleEntityNotFound(_0x3e5b6b,null))[_0x8e41('0x36')](function(_0x4c1315){if(_0x4c1315){return _0x4c1315['removeAnswers'](_0x1cdbfa[_0x8e41('0x43')][_0x8e41('0x6e')]);}})['then'](respondWithStatusCode(_0x3e5b6b,null))[_0x8e41('0x58')](handleError(_0x3e5b6b,null));};exports['addLogo']=function(_0x5d6403,_0x3263c1,_0x35836b){_0x5d6403[_0x8e41('0x5e')][_0x8e41('0x74')]=_0x5d6403[_0x8e41('0x75')][_0x8e41('0x76')];return db[_0x8e41('0x40')][_0x8e41('0x5c')]({'where':{'id':_0x5d6403[_0x8e41('0x66')]['id']}})[_0x8e41('0x36')](handleEntityNotFound(_0x3263c1,null))[_0x8e41('0x36')](saveUpdates(_0x5d6403[_0x8e41('0x5e')],null))[_0x8e41('0x36')](respondWithResult(_0x3263c1,null))['catch'](handleError(_0x3263c1,null));};exports['addAvatar']=function(_0x591e53,_0x516ae0,_0x397c41){_0x591e53['body']['agentAvatar']=_0x591e53[_0x8e41('0x75')][_0x8e41('0x76')];return db[_0x8e41('0x40')][_0x8e41('0x5c')]({'where':{'id':_0x591e53['params']['id']}})[_0x8e41('0x36')](handleEntityNotFound(_0x516ae0,null))[_0x8e41('0x36')](saveUpdates(_0x591e53[_0x8e41('0x5e')],null))[_0x8e41('0x36')](respondWithResult(_0x516ae0,null))['catch'](handleError(_0x516ae0,null));};exports['addCustomerAvatar']=function(_0x623966,_0x1366d2,_0x457bf0){_0x623966['body'][_0x8e41('0x77')]=_0x623966[_0x8e41('0x75')][_0x8e41('0x76')];return db[_0x8e41('0x40')][_0x8e41('0x5c')]({'where':{'id':_0x623966[_0x8e41('0x66')]['id']}})[_0x8e41('0x36')](handleEntityNotFound(_0x1366d2,null))['then'](saveUpdates(_0x623966[_0x8e41('0x5e')],null))[_0x8e41('0x36')](respondWithResult(_0x1366d2,null))['catch'](handleError(_0x1366d2,null));};exports['addSystemAvatar']=function(_0x36a2dc,_0xba068,_0x2f3636){_0x36a2dc[_0x8e41('0x5e')][_0x8e41('0x78')]=_0x36a2dc[_0x8e41('0x75')][_0x8e41('0x76')];return db[_0x8e41('0x40')]['find']({'where':{'id':_0x36a2dc[_0x8e41('0x66')]['id']}})['then'](handleEntityNotFound(_0xba068,null))[_0x8e41('0x36')](saveUpdates(_0x36a2dc[_0x8e41('0x5e')],null))[_0x8e41('0x36')](respondWithResult(_0xba068,null))[_0x8e41('0x58')](handleError(_0xba068,null));};exports[_0x8e41('0x79')]=function(_0xb511cc,_0x2eade1,_0xfdfa79){var _0x1333c9=path[_0x8e41('0x7a')](config['root'],_0x8e41('0x7b'));var _0x5924cb={'where':{'id':_0xb511cc[_0x8e41('0x66')]['id']},'attributes':['id',_0x8e41('0x74')],'raw':!![]};var _0x4a71a4=![];return require(_0x8e41('0x17'))[_0x8e41('0x7c')]()[_0x8e41('0x36')](function(_0x455b83){if(_0x455b83){_0x4a71a4=_0x455b83[_0x8e41('0x7d')];}})[_0x8e41('0x36')](function(){return db[_0x8e41('0x40')][_0x8e41('0x5c')](_0x5924cb);})[_0x8e41('0x36')](handleEntityNotFound(_0x2eade1,null))[_0x8e41('0x36')](function(_0x381eb2){if(_0x381eb2){if(!_[_0x8e41('0x7e')](_0x381eb2[_0x8e41('0x74')])){if(fs[_0x8e41('0x7f')](path[_0x8e41('0x7a')](config['root'],'server/files/images/logos/',_0x381eb2[_0x8e41('0x74')]))&&_0x4a71a4){_0x1333c9=path[_0x8e41('0x7a')](config['root'],_0x8e41('0x80'),_0x381eb2[_0x8e41('0x74')]);}}return _0x2eade1[_0x8e41('0x81')](_0x1333c9);}})[_0x8e41('0x58')](handleError(_0x2eade1,null));};exports['getAvatar']=function(_0x19c583,_0x13df40,_0x478b71){var _0x36b71a=path[_0x8e41('0x7a')](config['root'],_0x8e41('0x82'));var _0x44ecab={'where':{'id':_0x19c583['params']['id']},'attributes':['id',_0x8e41('0x83')],'raw':!![]};return db['ChatWebsite']['find'](_0x44ecab)[_0x8e41('0x36')](handleEntityNotFound(_0x13df40,null))['then'](function(_0x4e4828){if(_0x4e4828){if(!_[_0x8e41('0x7e')](_0x4e4828[_0x8e41('0x83')])){if(fs[_0x8e41('0x7f')](path['join'](config['root'],'server/files/images/avatars/',_0x4e4828['agentAvatar']))){_0x36b71a=path['join'](config[_0x8e41('0x84')],_0x8e41('0x85'),_0x4e4828['agentAvatar']);}}return _0x13df40['download'](_0x36b71a);}})[_0x8e41('0x58')](handleError(_0x13df40,null));};exports[_0x8e41('0x86')]=function(_0x235909,_0x1da6f3,_0x3503dc){var _0x586577=path[_0x8e41('0x7a')](config[_0x8e41('0x84')],'server/files/images/avatars/customer_avatar.png');var _0x131f52={'where':{'id':_0x235909[_0x8e41('0x66')]['id']},'attributes':['id',_0x8e41('0x77'),_0x8e41('0x87')],'raw':!![]};return db[_0x8e41('0x40')]['find'](_0x131f52)[_0x8e41('0x36')](handleEntityNotFound(_0x1da6f3,null))[_0x8e41('0x36')](function(_0x3617af){if(_0x3617af){if(!_[_0x8e41('0x7e')](_0x3617af[_0x8e41('0x77')])){if(fs[_0x8e41('0x7f')](path[_0x8e41('0x7a')](config['root'],_0x8e41('0x85'),_0x3617af['customerAvatar']))&&_0x3617af['showCustomerAvatar']){_0x586577=path[_0x8e41('0x7a')](config['root'],_0x8e41('0x85'),_0x3617af['customerAvatar']);}}return _0x1da6f3[_0x8e41('0x81')](_0x586577);}})['catch'](handleError(_0x1da6f3,null));};exports[_0x8e41('0x88')]=function(_0x2edd6b,_0x1e1131,_0x160548){var _0x5912e9=path['join'](config[_0x8e41('0x84')],'server/files/images/avatars/system_avatar.png');var _0x278cf3={'where':{'id':_0x2edd6b[_0x8e41('0x66')]['id']},'attributes':['id','systemAvatar'],'raw':!![]};return db['ChatWebsite'][_0x8e41('0x5c')](_0x278cf3)[_0x8e41('0x36')](handleEntityNotFound(_0x1e1131,null))[_0x8e41('0x36')](function(_0x1cff34){if(_0x1cff34){if(!_[_0x8e41('0x7e')](_0x1cff34['systemAvatar'])){if(fs[_0x8e41('0x7f')](path[_0x8e41('0x7a')](config['root'],_0x8e41('0x85'),_0x1cff34[_0x8e41('0x78')]))){_0x5912e9=path[_0x8e41('0x7a')](config[_0x8e41('0x84')],_0x8e41('0x85'),_0x1cff34['systemAvatar']);}}return _0x1e1131[_0x8e41('0x81')](_0x5912e9);}})[_0x8e41('0x58')](handleError(_0x1e1131,null));};exports[_0x8e41('0x89')]=function(_0x4a123d,_0xe4522f,_0x2fdcde){var _0x234c72=require(_0x8e41('0x8a'));var _0x5889c2=new _0x234c72();var _0x49b3f0=_0x5889c2[_0x8e41('0x8b')](_0x4a123d[_0x8e41('0x8c')]['user-agent'])[_0x8e41('0x8d')]();var _0x4cf39a={'body':_0x4a123d[_0x8e41('0x5e')],'channel':_0x8e41('0x8e')};var _0x285b78=[];var _0x4052ae=[];var _0x1939f0={};var _0x4943f0=![];return db['CmContact'][_0x8e41('0x67')]()[_0x8e41('0x36')](function(_0x17a87b){if(!_0x17a87b){throw new db[(_0x8e41('0x8f'))][(_0x8e41('0x90'))](_0x8e41('0x91'));}_0x285b78=_['difference'](_[_0x8e41('0x44')](_0x17a87b),[_0x8e41('0x92'),_0x8e41('0x93')]);_0x4052ae=_[_0x8e41('0x94')](_['keys'](_0x17a87b),[_0x8e41('0x92'),_0x8e41('0x93'),_0x8e41('0x95'),_0x8e41('0x96')]);if(_0x4a123d['body']['id']){delete _0x4a123d[_0x8e41('0x5e')]['id'];}if(_[_0x8e41('0x7e')](_0x4a123d[_0x8e41('0x5e')][_0x8e41('0x97')])){throw new db[(_0x8e41('0x8f'))]['ValidationError']('from\x20is\x20mandatory');}if(_[_0x8e41('0x7e')](_0x4a123d['body']['body'])||_0x4a123d['body'][_0x8e41('0x5e')]===''){throw new db['Sequelize']['ValidationError'](_0x8e41('0x98'));}if(_[_0x8e41('0x7e')](_0x4a123d[_0x8e41('0x5e')][_0x8e41('0x99')])){throw new db[(_0x8e41('0x8f'))]['ValidationError'](_0x8e41('0x9a')+_0x4052ae);}if(!_['includes'](_0x4052ae,_0x4a123d[_0x8e41('0x5e')][_0x8e41('0x99')])){throw new db['Sequelize'][(_0x8e41('0x90'))]('mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x4052ae);}_0x1939f0[_0x4a123d[_0x8e41('0x5e')]['mapKey']]=_0x4a123d[_0x8e41('0x5e')][_0x8e41('0x97')];})[_0x8e41('0x36')](function(){return db[_0x8e41('0x40')][_0x8e41('0x5c')]({'where':{'id':_0x4a123d[_0x8e41('0x66')]['id']},'include':[{'model':db[_0x8e41('0x9b')],'as':_0x8e41('0x9c'),'include':[{'model':db['CmContact'],'as':_0x8e41('0x9d'),'where':_0x1939f0,'limit':0x1,'order':[[_0x8e41('0x93'),'DESC']]}]},{'model':db[_0x8e41('0x9e')],'as':_0x8e41('0x9f')}]});})[_0x8e41('0x36')](handleEntityNotFound(_0xe4522f,null))[_0x8e41('0x36')](function(_0x54d5fb){if(_0x54d5fb&&_0x54d5fb[_0x8e41('0x9c')]){_0x4cf39a[_0x8e41('0xa0')]=_0x54d5fb;_0x4cf39a[_0x8e41('0xa1')]=_0x54d5fb[_0x8e41('0x9f')];_0x4cf39a['list']=_0x54d5fb[_0x8e41('0x9c')];_0x4cf39a['applications']=_['orderBy'](_0x4cf39a[_0x8e41('0xa1')],[_0x8e41('0xa2')],[_0x8e41('0xa3')]);if(_0x4cf39a['account'][_0x8e41('0x9f')]){delete _0x4cf39a[_0x8e41('0xa0')][_0x8e41('0x9f')];}if(_0x4cf39a[_0x8e41('0xa0')][_0x8e41('0x9c')]&&_0x4cf39a['account'][_0x8e41('0x9c')][_0x8e41('0x9d')][_0x8e41('0x4a')]){return _0x4cf39a['account'][_0x8e41('0x9c')][_0x8e41('0x9d')][0x0];}var _0x2a74d4=_['defaults'](_0x4a123d[_0x8e41('0x5e')],{'firstName':_0x4a123d['body'][_0x8e41('0x97')],'ListId':_0x54d5fb[_0x8e41('0x96')]});_0x2a74d4[_0x4a123d[_0x8e41('0x5e')][_0x8e41('0x99')]]=_0x4a123d[_0x8e41('0x5e')][_0x8e41('0x97')];return db[_0x8e41('0xa4')][_0x8e41('0x5d')](_0x2a74d4,{'fields':_0x285b78,'raw':!![]});}})[_0x8e41('0x36')](handleEntityNotFound(_0xe4522f,null))[_0x8e41('0x36')](function(_0x51b3a3){_0x4cf39a[_0x8e41('0xa5')]=_0x51b3a3;var _0x582adf=_0x4a123d[_0x8e41('0x5e')][_0x8e41('0xa6')];if(_0x4a123d[_0x8e41('0x8c')][_0x8e41('0xa7')]){_0x582adf=_0x4a123d['headers'][_0x8e41('0xa7')];}else if(_0x4a123d['headers'][_0x8e41('0xa8')]){_0x582adf=_[_0x8e41('0xa9')](_0x4a123d['headers'][_0x8e41('0xa8')][_0x8e41('0xaa')](','));}if(_0x51b3a3){var _0x879cb3={'ContactId':_0x51b3a3['id'],'ChatWebsiteId':_0x4a123d[_0x8e41('0x66')]['id'],'from':(_0x51b3a3[_0x8e41('0xab')]||'')+'\x20'+(_0x51b3a3['lastName']||''),'customerIp':_0x582adf,'customerPort':_0x4a123d[_0x8e41('0x8c')][_0x8e41('0xac')]?_0x4a123d['headers']['x-real-port']:null,'referer':_0x4a123d['body'][_0x8e41('0xad')],'browserName':_0x49b3f0[_0x8e41('0xae')][_0x8e41('0x3c')]&&_0x49b3f0[_0x8e41('0xae')]['version']?util['format'](_0x8e41('0xaf'),_0x49b3f0[_0x8e41('0xae')][_0x8e41('0x3c')],_0x49b3f0['browser'][_0x8e41('0xb0')]):_0x8e41('0xb1'),'browserVersion':_0x49b3f0['browser'][_0x8e41('0xb0')]||_0x8e41('0xb1'),'osName':util['format'](_0x8e41('0xaf'),_0x49b3f0['os'][_0x8e41('0x3c')],_0x49b3f0['os'][_0x8e41('0xb0')]),'osVersion':_0x49b3f0['os'][_0x8e41('0xb0')],'deviceModel':_0x49b3f0[_0x8e41('0xb2')][_0x8e41('0x47')]&&_0x49b3f0[_0x8e41('0xb2')][_0x8e41('0xb3')]?util[_0x8e41('0xb4')](_0x8e41('0xb5'),_0x49b3f0[_0x8e41('0xb2')][_0x8e41('0x47')],_0x49b3f0[_0x8e41('0xb2')]['vendor'],_0x49b3f0[_0x8e41('0xb2')][_0x8e41('0x53')]):null,'deviceVendor':_0x49b3f0[_0x8e41('0xb2')][_0x8e41('0xb3')],'deviceType':_0x49b3f0[_0x8e41('0xb2')]['type'],'formData':JSON['stringify'](_0x4a123d[_0x8e41('0x5e')])};var _0x3e7b30={'ChatWebsiteId':_0x4a123d['params']['id'],'closed':![]};if(_0x4a123d[_0x8e41('0x5e')][_0x8e41('0xb6')]){_0x3e7b30['threadId']=_0x4a123d['body'][_0x8e41('0xb6')];return db['ChatInteraction'][_0x8e41('0x5c')]({'where':_0x3e7b30})[_0x8e41('0x36')](function(_0x4ac576){if(_0x4ac576){return[_0x4ac576,![]];}_0x879cb3[_0x8e41('0xb6')]=_0x4a123d[_0x8e41('0x5e')][_0x8e41('0xb6')];_0x879cb3['externalUrl']=_0x4a123d[_0x8e41('0x5e')][_0x8e41('0xb7')];return db[_0x8e41('0xb8')][_0x8e41('0x5d')](_0x879cb3)[_0x8e41('0x36')](function(_0x56aeb4){return[_0x56aeb4,!![]];});});}_0x3e7b30[_0x8e41('0xb9')]=_0x51b3a3['id'];if(_0x4a123d[_0x8e41('0x5e')][_0x8e41('0xba')]&&_0x4a123d[_0x8e41('0x5e')][_0x8e41('0xba')]['id']){_0x3e7b30['id']=_0x4a123d[_0x8e41('0x5e')]['interaction']['id'];return db[_0x8e41('0xb8')][_0x8e41('0x5c')]({'where':_0x3e7b30})['then'](function(_0x4947c7){if(_0x4947c7){return[_0x4947c7,![]];}return db[_0x8e41('0xb8')][_0x8e41('0x5d')](_0x879cb3)[_0x8e41('0x36')](function(_0x221e77){return[_0x221e77,!![]];});});}return db[_0x8e41('0xb8')][_0x8e41('0x5d')](_0x879cb3)['then'](function(_0x1329fa){return[_0x1329fa,!![]];});}})[_0x8e41('0xbb')](function(_0x4b5e05,_0x1190b3){if(_0x4b5e05){_0x4943f0=_0x1190b3;if(!_0x1190b3){var _0x32b2a1={'from':(_0x4cf39a['contact'][_0x8e41('0xab')]||'')+'\x20'+(_0x4cf39a[_0x8e41('0xa5')]['lastName']||'')};if(_0x4a123d[_0x8e41('0x5e')]['threadId']&&_0x4a123d[_0x8e41('0x5e')][_0x8e41('0xbc')]&&_0x4a123d[_0x8e41('0x5e')][_0x8e41('0xb6')]!=_0x4a123d['body']['messageId']){_0x32b2a1[_0x8e41('0xb6')]=_0x4a123d[_0x8e41('0x5e')]['messageId'];}return _0x4b5e05[_0x8e41('0x35')](_0x32b2a1);}else{return _0x4b5e05;}}})['then'](function(_0x55e57c){_0x4cf39a[_0x8e41('0xba')]=_0x55e57c[_0x8e41('0x38')]({'plain':!![]});_0x4cf39a[_0x8e41('0xba')]['created']=_0x4943f0;if(_0x4cf39a[_0x8e41('0xba')][_0x8e41('0xbd')]){if(_0x4cf39a[_0x8e41('0xa0')]['autoclose']){_0x4cf39a[_0x8e41('0xa1')]['push']({'id':0x0,'priority':_0x4cf39a['applications']['length']+0x1,'app':_0x8e41('0xbe'),'appdata':_0x8e41('0xbf'),'interval':_0x8e41('0xc0')});}}return db['ChatMessage'][_0x8e41('0x5d')]({'body':_0x4a123d[_0x8e41('0x5e')][_0x8e41('0x5e')],'ChatWebsiteId':_0x4a123d[_0x8e41('0x66')]['id'],'ChatInteractionId':_0x55e57c['id'],'direction':'in','ContactId':_0x4cf39a[_0x8e41('0xa5')]['id'],'AttachmentId':_0x4a123d[_0x8e41('0x5e')][_0x8e41('0xc1')]});})[_0x8e41('0x36')](function(_0x285164){_0x4cf39a['message']=_0x285164;if(_0x4cf39a[_0x8e41('0xba')]['UserId']){return db[_0x8e41('0xc2')][_0x8e41('0x5c')]({'attributes':['id',_0x8e41('0x3c')],'where':{'id':_0x4cf39a[_0x8e41('0xba')][_0x8e41('0xc3')]}})['then'](function(_0x158b54){if(_0x158b54){_0x4cf39a[_0x8e41('0xa1')][_0x8e41('0xc4')]({'id':0x0,'priority':0x0,'app':'agent','appdata':_0x158b54[_0x8e41('0x3c')]+','+(_0x4cf39a[_0x8e41('0xa0')]['waitForTheAssignedAgent']||0xa),'interval':'*,*,*,*'});_0x4cf39a[_0x8e41('0xc5')]=!![];}return respondWithRpcPromise(_0x8e41('0xc6'),_0x8e41('0xc7'),_0x4cf39a);});}return respondWithRpcPromise('Start',_0x8e41('0xc7'),_0x4cf39a);})['then'](function(_0x129591){respondWithRpcPromise(_0x8e41('0xc8'),'EventManager',{'event':_0x8e41('0x89'),'message':_0x129591},client9002);return _0x129591;})[_0x8e41('0x36')](respondWithResult(_0xe4522f,null))[_0x8e41('0x58')](handleError(_0xe4522f,null));};exports[_0x8e41('0xc9')]=function(_0x1e575c,_0x24d07b,_0x2d3bb1){var _0x54a311,_0x413813,_0x3bd2e5;var _0x2be4f3=[];var _0x168891=[];var _0x2539a0={};var _0x138376=_0x1e575c[_0x8e41('0xca')]||[];var _0x39f3a2=[];var _0x251044;return db[_0x8e41('0xa4')][_0x8e41('0x67')]()[_0x8e41('0x36')](function(_0x571a43){if(!_0x571a43){throw new db[(_0x8e41('0x8f'))][(_0x8e41('0x90'))]('no\x20available\x20attributes');}_0x168891=_[_0x8e41('0x94')](_[_0x8e41('0x44')](_0x571a43),[_0x8e41('0x92'),_0x8e41('0x93')]);_0x2be4f3=_[_0x8e41('0x94')](_[_0x8e41('0x44')](_0x571a43),[_0x8e41('0x92'),_0x8e41('0x93'),_0x8e41('0x95'),_0x8e41('0x96')]);if(_0x1e575c['body']['id']){delete _0x1e575c['body']['id'];}if(_[_0x8e41('0x7e')](_0x1e575c[_0x8e41('0x5e')][_0x8e41('0x97')])){throw _0x24d07b[_0x8e41('0x2a')](0x1f4)['send'](new db[(_0x8e41('0x8f'))][(_0x8e41('0x90'))]('from\x20is\x20mandatory'));}if(_[_0x8e41('0x7e')](_0x1e575c[_0x8e41('0x5e')][_0x8e41('0x5e')])||_0x1e575c[_0x8e41('0x5e')]['body']===''){throw _0x24d07b[_0x8e41('0x2a')](0x1f4)[_0x8e41('0xcb')](new db[(_0x8e41('0x8f'))][(_0x8e41('0x90'))](_0x8e41('0x98')));}if(_[_0x8e41('0x7e')](_0x1e575c['body'][_0x8e41('0xcc')])){throw _0x24d07b['status'](0x1f4)[_0x8e41('0xcb')](new db[(_0x8e41('0x8f'))][(_0x8e41('0x90'))](_0x8e41('0xcd')+_0x2be4f3));}if(!_[_0x8e41('0xce')](_0x2be4f3,_0x1e575c[_0x8e41('0x5e')][_0x8e41('0xcc')])){throw _0x24d07b[_0x8e41('0x2a')](0x1f4)[_0x8e41('0xcb')](new db['Sequelize']['ValidationError'](_0x8e41('0xcf')+_0x2be4f3));}_0x2539a0[_0x1e575c['body'][_0x8e41('0xcc')]]=_0x1e575c[_0x8e41('0x5e')][_0x8e41('0x97')];})[_0x8e41('0x36')](function(){return db['ChatWebsite'][_0x8e41('0x5c')]({'where':{'id':_0x1e575c[_0x8e41('0x66')]['id']},'include':[{'model':db[_0x8e41('0x9b')],'as':_0x8e41('0x9c')},{'model':db[_0x8e41('0xd0')],'as':'MailAccount'}]});})['then'](handleEntityNotFound(_0x24d07b,null))['then'](function(_0x48fec9){if(_0x48fec9&&_0x48fec9['List']){_0x413813=_0x48fec9;var _0x40cb6a=_['defaults'](_0x1e575c[_0x8e41('0x5e')],{'firstName':_0x1e575c[_0x8e41('0x5e')]['from'],'phone':_0x1e575c[_0x8e41('0x5e')][_0x8e41('0x97')],'ListId':_0x48fec9[_0x8e41('0x96')]});_0x40cb6a[_0x1e575c[_0x8e41('0x5e')][_0x8e41('0xcc')]]=_0x1e575c['body']['from'];return db[_0x8e41('0xa4')][_0x8e41('0xd1')]({'where':_0x2539a0,'defaults':_0x40cb6a});}})[_0x8e41('0xbb')](function(_0x5a9d00){if(_0x5a9d00){_0x3bd2e5=_0x5a9d00;var _0x294e4f=fs['readFileSync'](path[_0x8e41('0x7a')](config[_0x8e41('0x84')],_0x8e41('0xd2')),_0x8e41('0xd3'));var _0x2ec6e9=ejs[_0x8e41('0xd4')](_0x294e4f,{'body':_[_0x8e41('0xd5')](_0x1e575c[_0x8e41('0x5e')][_0x8e41('0x5e')]),'bodyTitle':_0x413813[_0x8e41('0xd6')]});return db[_0x8e41('0xd7')][_0x8e41('0x5d')]({'body':_0x2ec6e9,'ContactId':_0x5a9d00['id'],'ChatWebsiteId':_0x413813['id']});}})[_0x8e41('0x36')](function(_0xe5a81a){_0x251044=_0xe5a81a;if(_0x138376[_0x8e41('0x4a')]){var _0x990863=_0x138376['map'](function(_0x3f9698){return{'name':_0x3f9698['originalname'],'basename':_0x3f9698['filename'],'type':_0x3f9698[_0x8e41('0xd8')],'ChatOfflineMessageId':_0xe5a81a['id']};});_0x39f3a2=_0x990863[_0x8e41('0x3f')](_0x356f47=>{var _0x26d71a={'filename':_0x356f47[_0x8e41('0x3c')],'path':path[_0x8e41('0x7a')](config[_0x8e41('0x84')],_0x8e41('0xd9'),'files',_0x8e41('0xda'),'offline-chat',_0x356f47[_0x8e41('0xdb')])};return _0x26d71a;});if(!_0x413813['openNewInteraction']){return db['sequelize']['transaction'](function(_0x2771e6){return db['Attachment']['bulkCreate'](_0x990863,{'transaction':_0x2771e6});});}}})[_0x8e41('0x36')](function(){if(_0x251044){_0x54a311=_0x251044;return db[_0x8e41('0xd0')]['findOne']({'where':{'active':!![]},'include':[{'model':db['MailServerOut'],'as':_0x8e41('0xdc'),'raw':!![]}]});}})[_0x8e41('0x36')](function(_0x2ecd30){if(_0x2ecd30&&_0x2ecd30[_0x8e41('0xdc')]&&_0x413813[_0x8e41('0xdd')]&&_0x413813[_0x8e41('0xde')]){var _0x8dd065={'tls':{'rejectUnauthorized':![]}};if(_0x2ecd30[_0x8e41('0xdc')]['service']){_0x8dd065[_0x8e41('0xdf')]=_0x2ecd30[_0x8e41('0xdc')][_0x8e41('0xdf')];}else{_0x8dd065[_0x8e41('0xe0')]=_0x2ecd30[_0x8e41('0xdc')]['host'];_0x8dd065['port']=_0x2ecd30[_0x8e41('0xdc')][_0x8e41('0xe1')];_0x8dd065[_0x8e41('0xe2')]=_0x2ecd30[_0x8e41('0xdc')][_0x8e41('0xe2')];}if(_0x2ecd30[_0x8e41('0xdc')][_0x8e41('0xe3')]){_0x8dd065[_0x8e41('0xe4')]={'user':_0x2ecd30['Smtp'][_0x8e41('0x5f')],'pass':_0x2ecd30['Smtp']['pass']};}return respondWithRpcPromise(_0x8e41('0xe5'),_0x8e41('0xe6'),{'account':_0x8dd065,'message':{'from':util['format'](_0x8e41('0xe7'),_0x2ecd30['name'],_0x2ecd30[_0x8e41('0xe8')]||_0x2ecd30[_0x8e41('0xdc')][_0x8e41('0x5f')]),'to':_0x413813['forwardOfflineAddress'],'subject':_0x413813[_0x8e41('0xe9')],'html':_0x54a311['body'],'attachments':_0x39f3a2}},client9003)['then'](function(){return _0x54a311;})[_0x8e41('0x58')](function(_0x43be60){console[_0x8e41('0x26')](_0x43be60);});}})[_0x8e41('0x36')](function(){if(_0x413813&&_0x413813[_0x8e41('0xea')]&&_0x413813[_0x8e41('0xeb')]){var _0x17e3e7=[];if(_0x138376[_0x8e41('0x4a')]){_0x17e3e7=_0x138376[_0x8e41('0x3f')](function(_0x5dd924){return{'name':_0x5dd924[_0x8e41('0xec')],'basename':_0x5dd924[_0x8e41('0x76')],'type':_0x5dd924[_0x8e41('0xd8')],'ChatOfflineMessageId':_0x251044['id']};});}var _0x2dd688;if(!_[_0x8e41('0x7e')](_0x413813[_0x8e41('0xed')])){var _0x1c3d2b=_[_0x8e41('0x3f')](_0x1e575c[_0x8e41('0x5e')],function(_0x3270b4){return _0x3270b4;});var _0x1c33f8=_[_0x8e41('0xee')](_0x1c3d2b)[0x0];var _0x301e19=_[_0x8e41('0xef')](_0x1c33f8,function(_0x3e506f){return _0x3e506f;});_0x2dd688=_0x301e19[0x1][_0x413813[_0x8e41('0xed')]];}var _0xd69382={'from':_0x3bd2e5[_0x8e41('0xe8')],'firstName':_0x3bd2e5[_0x8e41('0xab')],'lastName':_0x3bd2e5[_0x8e41('0xf0')],'mapKey':_0x8e41('0xe8'),'message':{'from':_0x3bd2e5[_0x8e41('0xe8')],'to':_0x413813[_0x8e41('0xd0')][_0x8e41('0xe8')],'cc':'','subject':_['isNil'](_0x2dd688)?_0x413813['offlineMessageSubject']:_0x2dd688,'messageId':'','sentAt':new Date(),'attach':_0x17e3e7[_0x8e41('0x4a')],'attachments':_0x17e3e7,'originChannel':_0x8e41('0xf1'),'ChatWebsiteId':_0x413813['id'],'ChatOfflineMessageId':_0x54a311['id'],'originTo':_0x413813['MailAccount'][_0x8e41('0xe8')]},'body':_0x54a311[_0x8e41('0x5e')]};var _0x878810={'account':{'id':_0x413813[_0x8e41('0xeb')]},'body':_0xd69382,'log':_0x8e41('0xf2')};return respondWithRpcPromise(_0x8e41('0xf2'),_0x8e41('0xf3'),_0x878810,client9001)[_0x8e41('0x36')](function(){return _0x54a311;})[_0x8e41('0x58')](function(_0xfc12d5){console['error'](_0xfc12d5);});}return;})['then'](function(){if(_0x54a311){return _0x54a311;}})['then'](respondWithResult(_0x24d07b,null))[_0x8e41('0x58')](function(_0x386569){console[_0x8e41('0x26')](_0x8e41('0x58'),_0x386569);for(var _0x1c2e4d of _0x138376){var _0x511944=path[_0x8e41('0x7a')](config[_0x8e41('0x84')],'server','files',_0x8e41('0xda'),_0x8e41('0xf4'),_0x1c2e4d[_0x8e41('0x76')]);fs_extra[_0x8e41('0xf5')](_0x511944)[_0x8e41('0x58')](function(_0x1fadc6){console['error']('Could\x20not\x20remove\x20attachment\x20file',_0x511944,_0x1fadc6);});}});};exports['addInteraction']=function(_0x3f5797,_0x187a51,_0x2b9cf6){return db['ChatInteraction'][_0x8e41('0x5c')]({'where':{'id':_0x3f5797[_0x8e41('0x66')]['id']}})[_0x8e41('0x36')](handleEntityNotFound(_0x187a51,null))['then'](function(_0x371219){if(_0x371219){return _0x371219[_0x8e41('0xf6')](_0x3f5797[_0x8e41('0x5e')][_0x8e41('0x6e')],_[_0x8e41('0xf7')](_0x3f5797[_0x8e41('0x5e')],[_0x8e41('0x6e'),'id'])||{});}})['then'](respondWithResult(_0x187a51,null))['catch'](handleError(_0x187a51,null));};exports['getInteractions']=function(_0x1eed7d,_0x40ae46,_0x2d9556){var _0x4a9e0e={'raw':![],'where':{}};var _0x4e119c={};var _0x399798={'count':0x0,'rows':[]};return db[_0x8e41('0x40')][_0x8e41('0x72')]({'where':{'id':_0x1eed7d[_0x8e41('0x66')]['id']}})[_0x8e41('0x36')](handleEntityNotFound(_0x40ae46,null))[_0x8e41('0x36')](function(_0x5a4499){if(_0x5a4499){_0x4e119c['model']=_[_0x8e41('0x44')](db[_0x8e41('0xb8')][_0x8e41('0x5b')]);_0x4e119c['query']=_['keys'](_0x1eed7d['query']);_0x4e119c['filters']=_[_0x8e41('0x46')](_0x4e119c['model'],_0x4e119c[_0x8e41('0x43')]);_0x4a9e0e[_0x8e41('0x49')]=_[_0x8e41('0x46')](_0x4e119c[_0x8e41('0x47')],qs[_0x8e41('0x48')](_0x1eed7d['query'][_0x8e41('0x48')]));_0x4a9e0e['attributes']=_0x4a9e0e[_0x8e41('0x49')]['length']?_0x4a9e0e[_0x8e41('0x49')]:_0x4e119c[_0x8e41('0x47')];if(!_0x1eed7d[_0x8e41('0x43')][_0x8e41('0x4b')]('nolimit')){_0x4a9e0e['limit']=qs['limit'](_0x1eed7d[_0x8e41('0x43')][_0x8e41('0x2e')]);_0x4a9e0e[_0x8e41('0x2d')]=qs[_0x8e41('0x2d')](_0x1eed7d[_0x8e41('0x43')][_0x8e41('0x2d')]);}_0x4a9e0e[_0x8e41('0x4d')]=qs[_0x8e41('0x4e')](_0x1eed7d[_0x8e41('0x43')]['sort']);_0x4a9e0e[_0x8e41('0x52')]=qs['filters'](_[_0x8e41('0x4f')](_0x1eed7d[_0x8e41('0x43')],_0x4e119c[_0x8e41('0x45')]));_0x4a9e0e['where']['ChatWebsiteId']=_0x5a4499['id'];if(_0x1eed7d['query'][_0x8e41('0x50')]){_0x4a9e0e[_0x8e41('0x52')]=_[_0x8e41('0x51')](_0x4a9e0e[_0x8e41('0x52')],{'$or':_[_0x8e41('0x3f')](_0x4a9e0e[_0x8e41('0x49')],function(_0x3e853f){var _0x384cac={};_0x384cac[_0x3e853f]={'$like':'%'+_0x1eed7d['query'][_0x8e41('0x50')]+'%'};return _0x384cac;})});}_0x4a9e0e=_['merge']({},_0x4a9e0e,_0x1eed7d[_0x8e41('0x54')]);return db[_0x8e41('0xb8')][_0x8e41('0x30')]({'where':_0x4a9e0e[_0x8e41('0x52')]})[_0x8e41('0x36')](function(_0x5dd2af){_0x399798['count']=_0x5dd2af;if(_0x1eed7d[_0x8e41('0x43')][_0x8e41('0x55')]){_0x4a9e0e[_0x8e41('0x56')]=[{'model':db['CmContact'],'as':_0x8e41('0xf8'),'required':![]},{'model':db['User'],'as':_0x8e41('0xf9'),'attributes':['name',_0x8e41('0xfa'),_0x8e41('0xfb')],'required':![]},{'model':db['Tag'],'as':_0x8e41('0xfc'),'attributes':['id',_0x8e41('0x3c'),_0x8e41('0xfd')],'where':_0x1eed7d[_0x8e41('0x43')][_0x8e41('0xfe')]?{'id':_0x1eed7d[_0x8e41('0x43')][_0x8e41('0xfe')]}:undefined,'required':_0x1eed7d['query'][_0x8e41('0xfe')]?!![]:![]}];}return db[_0x8e41('0xb8')][_0x8e41('0x6c')](_0x4a9e0e);})[_0x8e41('0x36')](function(_0x3444cb){_0x399798[_0x8e41('0x57')]=_0x3444cb;return _0x399798;});}})[_0x8e41('0x36')](respondWithFilteredResult(_0x40ae46,_0x4a9e0e))[_0x8e41('0x58')](handleError(_0x40ae46,null));};function iftimePromise(_0x2844dd,_0x149c4b){return respondWithRpcPromise(_0x8e41('0xff'),_0x8e41('0x100'),{'command':_0x149c4b[_0x8e41('0x101')]?util[_0x8e41('0xb4')](_0x8e41('0x102'),_0x2844dd[_0x8e41('0x103')],_0x149c4b['timezone']):util[_0x8e41('0xb4')](_0x8e41('0x104'),_0x2844dd['interval'])},client9002)[_0x8e41('0x36')](function(_0xf24241){var _0x576296=_0xf24241&&_0xf24241['indexOf']('true')>=0x0?!![]:![];logger['info'](_0x8e41('0x105'),_0x149c4b['id'],_0x2844dd['id'],_0x2844dd[_0x8e41('0x103')],_0x576296?'ONLINE':_0x8e41('0x106'),_0x149c4b[_0x8e41('0x101')]?_0x149c4b[_0x8e41('0x101')]:'No\x20timezone');return _0x576296;})[_0x8e41('0x58')](function(_0x1cbd5d){logger[_0x8e41('0x26')](_0x8e41('0x105'),_0x149c4b['id'],_0x2844dd['id'],_0x2844dd[_0x8e41('0x103')],util[_0x8e41('0x107')](_0x1cbd5d,{'showHidden':![],'depth':null}),_0x149c4b['timezone']?_0x149c4b[_0x8e41('0x101')]:_0x8e41('0x108'));return![];});}exports[_0x8e41('0x100')]=function(_0x472e85,_0x285a69,_0x58c21e){var _0xe86005=0x0;var _0x258fea=0x0;var _0x428336=![];var _0x3de899;var _0x12b060;return db[_0x8e41('0x40')]['find']({'where':{'id':_0x472e85['params']['id']},'include':[{'model':db[_0x8e41('0x109')],'as':_0x8e41('0x109'),'include':[{'model':db[_0x8e41('0x109')],'as':'Intervals','attributes':['id',_0x8e41('0x103')],'raw':!![]}]}]})['then'](handleEntityNotFound(_0x285a69,null))[_0x8e41('0x36')](function(_0x370883){if(_0x370883){_0x3de899=_0x370883;return _0x370883[_0x8e41('0x10a')]({'raw':!![]});}})[_0x8e41('0x36')](function(_0x5fc517){if(_0x3de899){if(_0x5fc517){_0x12b060=_0x5fc517;}}return require(_0x8e41('0x17'))[_0x8e41('0x7c')]();})[_0x8e41('0x36')](function(_0x1551cc){if(_0x1551cc){_0x258fea=_0x1551cc[_0x8e41('0x10b')];_0x428336=_0x1551cc['custom'];}})['then'](function(){return db[_0x8e41('0xb8')]['count']({'where':{'closed':![]}});})[_0x8e41('0x36')](function(_0x199c2f){_0xe86005=_0x199c2f;if(_0x258fea&&_0x199c2f>_0x258fea){return db[_0x8e41('0x10c')][_0x8e41('0x72')]({'where':{'id':0x1}})[_0x8e41('0x36')](function(_0x11cf6a){if(_0x11cf6a){_0x11cf6a[_0x8e41('0x10d')]('chatLicenseExceeded');}});}})[_0x8e41('0x36')](function(){if(_0x3de899[_0x8e41('0x109')]&&_0x3de899[_0x8e41('0x109')][_0x8e41('0x10e')]){var _0x441447=[];for(var _0x1a6ab0=0x0;_0x1a6ab0<_0x3de899[_0x8e41('0x109')][_0x8e41('0x10e')][_0x8e41('0x4a')];_0x1a6ab0++){var _0x388400=_0x3de899[_0x8e41('0x109')][_0x8e41('0x10e')][_0x1a6ab0][_0x8e41('0x38')]({'plain':!![]});_0x441447['push'](iftimePromise(_0x388400,_0x3de899));}return BPromise[_0x8e41('0x10f')](_0x441447)[_0x8e41('0x36')](function(_0x5d65f7){return _[_0x8e41('0x110')](_0x5d65f7);});}else{return!![];}})[_0x8e41('0x36')](function(_0x444285){var _0x479282=fs['readFileSync'](path['join'](config[_0x8e41('0x84')],_0x8e41('0x111')),_0x8e41('0xd3'));var _0x19b721={'remote':_0x3de899[_0x8e41('0x112')],'query':querystring['stringify'](_[_0x8e41('0x51')](_0x3de899[_0x8e41('0x38')]({'plain':!![]}),{'customerIp':_0x472e85['headers'][_0x8e41('0xa8')]||_0x472e85['headers'][_0x8e41('0x113')]||_0x472e85[_0x8e41('0x114')][_0x8e41('0x115')]||_0x472e85['ip'],'referer':_0x472e85[_0x8e41('0x8c')]['referer'],'openedInteractions':_0xe86005,'maxInteractions':_0x258fea,'virtual':_0x428336[_0x8e41('0x10b')],'online':_0x444285,'custom':_0x428336}))[_0x8e41('0x116')](/'/g,'\x5c\x27')};_0x285a69[_0x8e41('0xcb')](ejs[_0x8e41('0xd4')](Mustache[_0x8e41('0xd4')](_0x479282,_0x19b721),{'proactiveActions':_0x12b060,'alignment':_0x3de899[_0x8e41('0x117')],'verticalAlignment':_0x3de899[_0x8e41('0x118')],'div_color':_0x3de899[_0x8e41('0xfd')],'text_color':_0x3de899[_0x8e41('0x119')],'button_color':_0x3de899['color_button'],'background_color':_0x3de899[_0x8e41('0x11a')]}));})[_0x8e41('0x58')](handleError(_0x285a69,null));};exports[_0x8e41('0x11b')]=function(_0x90c200,_0x2617b9,_0x20b4c8){return db[_0x8e41('0x40')]['findOne']({'where':{'id':_0x90c200['params']['id']}})[_0x8e41('0x36')](handleEntityNotFound(_0x2617b9,null))['then'](function(_0x4d8e94){if(_0x4d8e94){return db[_0x8e41('0x11c')][_0x8e41('0x11d')](function(_0x2a4b67){return db['ChatApplication'][_0x8e41('0x37')]({'where':{'ChatWebsiteId':_0x90c200[_0x8e41('0x66')]['id']},'transaction':_0x2a4b67})[_0x8e41('0x36')](function(_0x3f8159){var _0x7a2660=_[_0x8e41('0x3f')](_0x90c200['body'],function(_0x38356d){_0x38356d[_0x8e41('0x69')]=_0x90c200[_0x8e41('0x66')]['id'];return _0x38356d;});return db[_0x8e41('0x9e')][_0x8e41('0x11e')](_0x7a2660,{'transaction':_0x2a4b67});});})[_0x8e41('0x36')](function(){return db['ChatApplication'][_0x8e41('0x11f')]({'where':{'ChatWebsiteId':_0x90c200[_0x8e41('0x66')]['id']},'order':'priority'});});}})[_0x8e41('0x36')](respondWithResult(_0x2617b9,null))[_0x8e41('0x58')](handleError(_0x2617b9,null));};exports[_0x8e41('0x120')]=function(_0x1f3e61,_0x26e98a,_0x581171){var _0xf52171={};var _0x5f1abf={};var _0x213fe6;var _0x48d661;return db[_0x8e41('0x40')]['findOne']({'where':{'id':_0x1f3e61[_0x8e41('0x66')]['id']}})['then'](handleEntityNotFound(_0x26e98a,null))[_0x8e41('0x36')](function(_0x231394){if(_0x231394){_0x213fe6=_0x231394;_0x5f1abf[_0x8e41('0x47')]=_[_0x8e41('0x44')](db[_0x8e41('0x9e')]['rawAttributes']);_0x5f1abf[_0x8e41('0x43')]=_[_0x8e41('0x44')](_0x1f3e61[_0x8e41('0x43')]);_0x5f1abf[_0x8e41('0x45')]=_[_0x8e41('0x46')](_0x5f1abf[_0x8e41('0x47')],_0x5f1abf[_0x8e41('0x43')]);_0xf52171[_0x8e41('0x49')]=_[_0x8e41('0x46')](_0x5f1abf[_0x8e41('0x47')],qs[_0x8e41('0x48')](_0x1f3e61[_0x8e41('0x43')][_0x8e41('0x48')]));_0xf52171[_0x8e41('0x49')]=_0xf52171['attributes'][_0x8e41('0x4a')]?_0xf52171[_0x8e41('0x49')]:_0x5f1abf[_0x8e41('0x47')];_0xf52171[_0x8e41('0x4d')]=qs[_0x8e41('0x4e')](_0x1f3e61[_0x8e41('0x43')][_0x8e41('0x4e')]);_0xf52171[_0x8e41('0x52')]=qs[_0x8e41('0x45')](_[_0x8e41('0x4f')](_0x1f3e61[_0x8e41('0x43')],_0x5f1abf[_0x8e41('0x45')]));if(_0x1f3e61[_0x8e41('0x43')]['filter']){_0xf52171['where']=_[_0x8e41('0x51')](_0xf52171['where'],{'$or':_[_0x8e41('0x3f')](_0xf52171['attributes'],function(_0x5a70ec){var _0x4652cc={};_0x4652cc[_0x5a70ec]={'$like':'%'+_0x1f3e61[_0x8e41('0x43')][_0x8e41('0x50')]+'%'};return _0x4652cc;})});}_0xf52171=_['merge']({},_0xf52171,_0x1f3e61['options']);return _0x213fe6['getApplications'](_0xf52171);}})['then'](function(_0x4e99a5){if(_0x4e99a5){_0x48d661=_0x4e99a5[_0x8e41('0x4a')];if(!_0x1f3e61[_0x8e41('0x43')][_0x8e41('0x4b')](_0x8e41('0x4c'))){_0xf52171[_0x8e41('0x2e')]=qs[_0x8e41('0x2e')](_0x1f3e61[_0x8e41('0x43')][_0x8e41('0x2e')]);_0xf52171[_0x8e41('0x2d')]=qs[_0x8e41('0x2d')](_0x1f3e61[_0x8e41('0x43')][_0x8e41('0x2d')]);}return _0x213fe6[_0x8e41('0x120')](_0xf52171);}})[_0x8e41('0x36')](function(_0x390b2d){if(_0x390b2d){return _0x390b2d?{'count':_0x48d661,'rows':_0x390b2d}:null;}})[_0x8e41('0x36')](respondWithResult(_0x26e98a,null))[_0x8e41('0x58')](handleError(_0x26e98a,null));};exports[_0x8e41('0x121')]=function(_0x5dfa8a,_0x1ee1b5,_0x423e19){return db[_0x8e41('0x122')][_0x8e41('0x5c')]({'where':{'id':_0x5dfa8a[_0x8e41('0x66')]['id']}})[_0x8e41('0x36')](handleEntityNotFound(_0x1ee1b5,null))[_0x8e41('0x36')](function(_0x2c6c18){if(_0x2c6c18){return _0x2c6c18[_0x8e41('0x121')](_0x5dfa8a[_0x8e41('0x5e')]['ids'],_[_0x8e41('0xf7')](_0x5dfa8a[_0x8e41('0x5e')],[_0x8e41('0x6e'),'id'])||{});}})['then'](respondWithResult(_0x1ee1b5,null))[_0x8e41('0x58')](handleError(_0x1ee1b5,null));};exports['getProactiveActions']=function(_0xa6a120,_0x2924f8,_0x2365c7){var _0x349e56={};var _0xe80c7b={};var _0x534f6f;var _0x48a003;return db[_0x8e41('0x40')][_0x8e41('0x72')]({'where':{'id':_0xa6a120[_0x8e41('0x66')]['id']}})[_0x8e41('0x36')](handleEntityNotFound(_0x2924f8,null))[_0x8e41('0x36')](function(_0x2fd401){if(_0x2fd401){_0x534f6f=_0x2fd401;_0xe80c7b['model']=_['keys'](db[_0x8e41('0x123')][_0x8e41('0x5b')]);_0xe80c7b[_0x8e41('0x43')]=_[_0x8e41('0x44')](_0xa6a120[_0x8e41('0x43')]);_0xe80c7b['filters']=_['intersection'](_0xe80c7b['model'],_0xe80c7b[_0x8e41('0x43')]);_0x349e56[_0x8e41('0x49')]=_['intersection'](_0xe80c7b[_0x8e41('0x47')],qs['fields'](_0xa6a120['query']['fields']));_0x349e56[_0x8e41('0x49')]=_0x349e56[_0x8e41('0x49')]['length']?_0x349e56[_0x8e41('0x49')]:_0xe80c7b[_0x8e41('0x47')];_0x349e56[_0x8e41('0x4d')]=qs[_0x8e41('0x4e')](_0xa6a120[_0x8e41('0x43')]['sort']);_0x349e56[_0x8e41('0x52')]=qs[_0x8e41('0x45')](_[_0x8e41('0x4f')](_0xa6a120['query'],_0xe80c7b[_0x8e41('0x45')]));if(_0xa6a120[_0x8e41('0x43')]['filter']){_0x349e56[_0x8e41('0x52')]=_[_0x8e41('0x51')](_0x349e56[_0x8e41('0x52')],{'$or':_[_0x8e41('0x3f')](_0x349e56[_0x8e41('0x49')],function(_0x29140a){var _0x9953a3={};_0x9953a3[_0x29140a]={'$like':'%'+_0xa6a120[_0x8e41('0x43')]['filter']+'%'};return _0x9953a3;})});}_0x349e56=_[_0x8e41('0x51')]({},_0x349e56,_0xa6a120[_0x8e41('0x54')]);return _0x534f6f[_0x8e41('0x10a')](_0x349e56);}})[_0x8e41('0x36')](function(_0x3e2e6d){if(_0x3e2e6d){_0x48a003=_0x3e2e6d[_0x8e41('0x4a')];if(!_0xa6a120['query']['hasOwnProperty'](_0x8e41('0x4c'))){_0x349e56[_0x8e41('0x2e')]=qs[_0x8e41('0x2e')](_0xa6a120[_0x8e41('0x43')][_0x8e41('0x2e')]);_0x349e56[_0x8e41('0x2d')]=qs[_0x8e41('0x2d')](_0xa6a120[_0x8e41('0x43')][_0x8e41('0x2d')]);}return _0x534f6f['getProactiveActions'](_0x349e56);}})['then'](function(_0x3173ad){if(_0x3173ad){return _0x3173ad?{'count':_0x48a003,'rows':_0x3173ad}:null;}})['then'](respondWithResult(_0x2924f8,null))['catch'](handleError(_0x2924f8,null));};exports[_0x8e41('0x124')]=function(_0x4a6e88,_0x1bd76d,_0x3ffeac){var _0x111d88=_0x4a6e88[_0x8e41('0x43')][_0x8e41('0x125')]===_0x8e41('0x126')?_0x8e41('0x127'):_0x8e41('0x128');return db[_0x8e41('0x40')][_0x8e41('0x5c')]({'attributes':['id',_0x111d88],'where':{'id':_0x4a6e88['params']['id']}})['then'](handleEntityNotFound(_0x1bd76d,null))[_0x8e41('0x36')](function(_0x1fb0ff){if(_0x1fb0ff){var _0x279ad3=_0x1fb0ff[_0x111d88];var _0x5bac12=_0x279ad3&&_0x279ad3[_0x8e41('0x129')]?_0x279ad3[_0x8e41('0x129')]:[];_0x1bd76d[_0x8e41('0xcb')]({'fromKey':_[_0x8e41('0x7e')](_0x279ad3[_0x8e41('0x12a')])?undefined:_0x279ad3[_0x8e41('0x12a')],'count':_0x5bac12[_0x8e41('0x4a')],'rows':_0x5bac12});}})[_0x8e41('0x58')](handleError(_0x1bd76d,null));};exports[_0x8e41('0x12b')]=function(_0x33f944,_0x7758,_0x59feaa){var _0x48d643={'raw':![],'where':{}};var _0xa58477={};var _0x4d699c={'count':0x0,'rows':[]};return db[_0x8e41('0x40')][_0x8e41('0x72')]({'where':{'id':_0x33f944[_0x8e41('0x66')]['id']}})[_0x8e41('0x36')](handleEntityNotFound(_0x7758,null))[_0x8e41('0x36')](function(_0x3e1ee3){if(_0x3e1ee3){_0xa58477[_0x8e41('0x47')]=_[_0x8e41('0x44')](db[_0x8e41('0xd7')][_0x8e41('0x5b')]);_0xa58477['query']=_[_0x8e41('0x44')](_0x33f944[_0x8e41('0x43')]);_0xa58477[_0x8e41('0x45')]=_['intersection'](_0xa58477[_0x8e41('0x47')],_0xa58477[_0x8e41('0x43')]);_0x48d643[_0x8e41('0x49')]=_[_0x8e41('0x46')](_0xa58477[_0x8e41('0x47')],qs[_0x8e41('0x48')](_0x33f944[_0x8e41('0x43')][_0x8e41('0x48')]));_0x48d643[_0x8e41('0x49')]=_0x48d643[_0x8e41('0x49')][_0x8e41('0x4a')]?_0x48d643['attributes']:_0xa58477[_0x8e41('0x47')];if(!_0x33f944[_0x8e41('0x43')][_0x8e41('0x4b')](_0x8e41('0x4c'))){_0x48d643[_0x8e41('0x2e')]=qs[_0x8e41('0x2e')](_0x33f944[_0x8e41('0x43')][_0x8e41('0x2e')]);_0x48d643[_0x8e41('0x2d')]=qs['offset'](_0x33f944[_0x8e41('0x43')][_0x8e41('0x2d')]);}_0x48d643['order']=qs[_0x8e41('0x4e')](_0x33f944[_0x8e41('0x43')][_0x8e41('0x4e')]);_0x48d643[_0x8e41('0x52')]=qs[_0x8e41('0x45')](_[_0x8e41('0x4f')](_0x33f944[_0x8e41('0x43')],_0xa58477[_0x8e41('0x45')]));_0x48d643[_0x8e41('0x52')][_0x8e41('0x69')]=_0x3e1ee3['id'];if(_0x33f944[_0x8e41('0x43')]['filter']){_0x48d643['where']=_[_0x8e41('0x51')](_0x48d643[_0x8e41('0x52')],{'$or':_[_0x8e41('0x3f')](_0x48d643[_0x8e41('0x49')],function(_0x7da175){var _0x573580={};_0x573580[_0x7da175]={'$like':'%'+_0x33f944[_0x8e41('0x43')][_0x8e41('0x50')]+'%'};return _0x573580;})});}_0x48d643=_[_0x8e41('0x51')]({},_0x48d643,_0x33f944[_0x8e41('0x54')]);return db['ChatOfflineMessage'][_0x8e41('0x30')]({'where':_0x48d643[_0x8e41('0x52')]})[_0x8e41('0x36')](function(_0x4e0b32){_0x4d699c[_0x8e41('0x30')]=_0x4e0b32;if(_0x33f944[_0x8e41('0x43')]['includeAll']){_0x48d643[_0x8e41('0x56')]=[{'all':!![]}];}else{_0x48d643[_0x8e41('0x56')]=[{'model':db[_0x8e41('0xa4')],'as':_0x8e41('0xf8'),'required':![]},{'model':db['Attachment'],'as':_0x8e41('0x12c'),'required':![]}];}return db[_0x8e41('0xd7')][_0x8e41('0x6c')](_0x48d643);})[_0x8e41('0x36')](function(_0x15a343){_0x4d699c[_0x8e41('0x57')]=_0x15a343;return _0x4d699c;});}})[_0x8e41('0x36')](respondWithFilteredResult(_0x7758,_0x48d643))['catch'](handleError(_0x7758,null));};exports[_0x8e41('0x12d')]=function(_0x595aa9,_0x2c3629,_0x1060d8){return db[_0x8e41('0x40')]['find']({'where':{'id':_0x595aa9[_0x8e41('0x66')]['id']}})['then'](handleEntityNotFound(_0x2c3629,null))[_0x8e41('0x36')](function(_0x40ec52){if(_0x40ec52){return _0x40ec52['addAgents'](_0x595aa9[_0x8e41('0x5e')]['ids'],_[_0x8e41('0xf7')](_0x595aa9[_0x8e41('0x5e')],[_0x8e41('0x6e'),'id'])||{})[_0x8e41('0xbb')](function(_0x14ca0b){for(var _0x3a6344=0x0;_0x3a6344<_0x595aa9['body'][_0x8e41('0x6e')][_0x8e41('0x4a')];_0x3a6344+=0x1){socket[_0x8e41('0x12e')](_0x8e41('0x12f'),{'UserId':_0x595aa9[_0x8e41('0x5e')][_0x8e41('0x6e')][_0x3a6344],'ChatWebsiteId':_0x595aa9[_0x8e41('0x66')]['id']});}return _0x14ca0b;});}})[_0x8e41('0x36')](respondWithResult(_0x2c3629,null))[_0x8e41('0x58')](handleError(_0x2c3629,null));};exports['removeAgents']=function(_0x16a088,_0x315f07,_0x5f4dc3){return db[_0x8e41('0x40')][_0x8e41('0x5c')]({'where':{'id':_0x16a088[_0x8e41('0x66')]['id']}})[_0x8e41('0x36')](handleEntityNotFound(_0x315f07,null))[_0x8e41('0x36')](function(_0x314b88){if(_0x314b88){return _0x314b88[_0x8e41('0x130')](_0x16a088[_0x8e41('0x43')][_0x8e41('0x6e')])[_0x8e41('0x36')](function(){if(_['isArray'](_0x16a088[_0x8e41('0x43')][_0x8e41('0x6e')])){for(var _0x3f217a=0x0;_0x3f217a<_0x16a088[_0x8e41('0x43')]['ids']['length'];_0x3f217a+=0x1){socket['emit'](_0x8e41('0x131'),{'UserId':Number(_0x16a088['query'][_0x8e41('0x6e')][_0x3f217a]),'ChatWebsiteId':Number(_0x16a088[_0x8e41('0x66')]['id'])});}}else{socket[_0x8e41('0x12e')](_0x8e41('0x131'),{'UserId':Number(_0x16a088[_0x8e41('0x43')][_0x8e41('0x6e')]),'ChatWebsiteId':Number(_0x16a088[_0x8e41('0x66')]['id'])});}});}})[_0x8e41('0x36')](respondWithStatusCode(_0x315f07,null))[_0x8e41('0x58')](handleError(_0x315f07,null));};exports[_0x8e41('0x132')]=function(_0x208eaf,_0xa5c856,_0x1a4614){var _0x4e2a96={};var _0x673688={};var _0x39469f;var _0x4f10ee;return db[_0x8e41('0x40')][_0x8e41('0x72')]({'where':{'id':_0x208eaf[_0x8e41('0x66')]['id']}})[_0x8e41('0x36')](handleEntityNotFound(_0xa5c856,null))['then'](function(_0x4d6152){if(_0x4d6152){_0x39469f=_0x4d6152;_0x673688[_0x8e41('0x47')]=_['keys'](db[_0x8e41('0xc2')][_0x8e41('0x5b')]);_0x673688[_0x8e41('0x43')]=_[_0x8e41('0x44')](_0x208eaf[_0x8e41('0x43')]);_0x673688['filters']=_[_0x8e41('0x46')](_0x673688[_0x8e41('0x47')],_0x673688[_0x8e41('0x43')]);_0x4e2a96[_0x8e41('0x49')]=_[_0x8e41('0x46')](_0x673688[_0x8e41('0x47')],qs[_0x8e41('0x48')](_0x208eaf[_0x8e41('0x43')]['fields']));_0x4e2a96[_0x8e41('0x49')]=_0x4e2a96['attributes'][_0x8e41('0x4a')]?_0x4e2a96['attributes']:_0x673688['model'];_0x4e2a96[_0x8e41('0x4d')]=qs[_0x8e41('0x4e')](_0x208eaf['query']['sort']);_0x4e2a96[_0x8e41('0x52')]=qs[_0x8e41('0x45')](_['pick'](_0x208eaf[_0x8e41('0x43')],_0x673688[_0x8e41('0x45')]));if(_0x208eaf[_0x8e41('0x43')][_0x8e41('0x50')]){_0x4e2a96[_0x8e41('0x52')]=_[_0x8e41('0x51')](_0x4e2a96[_0x8e41('0x52')],{'$or':_[_0x8e41('0x3f')](_0x4e2a96[_0x8e41('0x49')],function(_0xe11fbe){var _0x5e322a={};_0x5e322a[_0xe11fbe]={'$like':'%'+_0x208eaf[_0x8e41('0x43')][_0x8e41('0x50')]+'%'};return _0x5e322a;})});}_0x4e2a96=_[_0x8e41('0x51')]({},_0x4e2a96,_0x208eaf[_0x8e41('0x54')]);return _0x39469f['getAgents'](_0x4e2a96);}})[_0x8e41('0x36')](function(_0x5b0a98){if(_0x5b0a98){_0x4f10ee=_0x5b0a98[_0x8e41('0x4a')];if(!_0x208eaf[_0x8e41('0x43')][_0x8e41('0x4b')](_0x8e41('0x4c'))){_0x4e2a96['limit']=qs['limit'](_0x208eaf[_0x8e41('0x43')][_0x8e41('0x2e')]);_0x4e2a96[_0x8e41('0x2d')]=qs[_0x8e41('0x2d')](_0x208eaf[_0x8e41('0x43')][_0x8e41('0x2d')]);}return _0x39469f['getAgents'](_0x4e2a96);}})[_0x8e41('0x36')](function(_0x2b04a3){if(_0x2b04a3){return _0x2b04a3?{'count':_0x4f10ee,'rows':_0x2b04a3}:null;}})[_0x8e41('0x36')](respondWithResult(_0xa5c856,null))[_0x8e41('0x58')](handleError(_0xa5c856,null));}; \ No newline at end of file +var _0xd705=['pass','SendMail','\x22%s\x22\x20<%s>','email','offlineMessageSubject','mimetype','subjectOffline','toPairsIn','mapValues','MailAccountId','NotifyMailAccount','notifyMail','attachments','offline-chat','addInteraction','omit','getInteractions','fullname','internal','Tag','Tags','color','tag','Command','getSnippet','timezone','iftime\x20%s,%s','iftime\x20%s','interval','true','ONLINE','OFFLINE','[%s][INTERVAL][%s]\x20%s\x20%s\x20(%s)','inspect','No\x20timezone','Interval','getProactiveActions','getLicense','virtual','License','chatLicenseExceeded','Intervals','all','some','server/files/chat/iframe.ejs','remote','x-real-ip','connection','remoteAddress','alignment','verticalAlignment','backgroundColor','addApplications','transaction','ChatApplication','findAndCountAll','getApplications','addProactiveActions','chatProactiveAction','getFields','online','false','onlineForm','items','fromKey','ChatOfflineMessage','Contact','addAgents','emit','userChatWebsite:save','removeAgents','isArray','userChatWebsite:remove','getAgents','eml-format','zip-dir','request-promise','bluebird','mustache','util','path','sox','to-csv','fs-extra','squel','crypto','jsforce','querystring','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','defaults','redis','localhost','socket.io-emitter','./chatWebsite.socket','jayson/promise','client','http','request','ChatWebsite,\x20%s,\x20%s','request\x20sent','stringify','error','message','info','result','catch','sendStatus','status','json','offset','undefined','limit','count','set','apply','reject','save','destroy','then','get','ChatWebsites','UserProfileResource','end','stack','name','send','index','Pause','mandatoryDispositionPause','map','rawAttributes','fieldName','key','model','query','keys','attributes','fields','length','hasOwnProperty','sort','where','filters','pick','filter','merge','VIRTUAL','options','ChatWebsite','includeAll','include','findAll','rows','show','params','intersection','find','create','role','user','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','body','describe','addDisposition','ChatWebsiteId','getDispositions','findOne','Disposition','nolimit','order','removeDispositions','addAnswer','CannedAnswer','getAnswers','removeAnswers','ids','addLogo','file','addAvatar','agentAvatar','filename','customerAvatar','addSystemAvatar','systemAvatar','getLogo','join','server/files/images/logos/default_logo.svg','sitepic','isNil','existsSync','getAvatar','root','server/files/images/avatars/default_avatar.png','server/files/images/avatars/','download','getCustomerAvatar','server/files/images/avatars/customer_avatar.png','showCustomerAvatar','getSystemAvatar','notify','user-agent-parser','setUA','user-agent','getResult','CmContact','Sequelize','ValidationError','no\x20available\x20attributes','updatedAt','difference','createdAt','CompanyId','from','from\x20is\x20mandatory','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','CmList','Contacts','DESC','Applications','List','account','applications','orderBy','priority','asc','ListId','contact','cf-connecting-ip','headers','x-forwarded-for','first','split','firstName','lastName','x-real-port','referer','browser','format','version','unknown','%s\x20%s','device','vendor','%s\x20%s\x20%s','type','threadId','ChatInteraction','externalUrl','ContactId','interaction','spread','messageId','created','autoclose','push','*,*,*,*','ChatMessage','UserId','User','unshift','waitForTheAssignedAgent','forcedOwnership','Start','startRouting','EventManager','offline','files','mapKeyOffline\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','mapKeyOffline','mapKeyOffline\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','MailAccount','findOrCreate','readFileSync','utf8','render','offlineMessageBody','originalname','server','openNewInteraction','sequelize','Attachment','bulkCreate','MailServerOut','Smtp','forwardOfflineAddress','service','host','secure','authentication'];(function(_0x4b2436,_0x452299){var _0x4f5ab2=function(_0x5c6679){while(--_0x5c6679){_0x4b2436['push'](_0x4b2436['shift']());}};_0x4f5ab2(++_0x452299);}(_0xd705,0x17a));var _0x5d70=function(_0x4c85cc,_0x28d033){_0x4c85cc=_0x4c85cc-0x0;var _0x5821e4=_0xd705[_0x4c85cc];return _0x5821e4;};'use strict';var emlformat=require(_0x5d70('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x5d70('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x5d70('0x2'));var moment=require('moment');var BPromise=require(_0x5d70('0x3'));var Mustache=require(_0x5d70('0x4'));var util=require(_0x5d70('0x5'));var path=require(_0x5d70('0x6'));var sox=require(_0x5d70('0x7'));var csv=require(_0x5d70('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x5d70('0x9'));var _=require('lodash');var squel=require(_0x5d70('0xa'));var crypto=require(_0x5d70('0xb'));var jsforce=require(_0x5d70('0xc'));var deskjs=require('desk.js');var toCsv=require(_0x5d70('0x8'));var querystring=require(_0x5d70('0xd'));var Papa=require(_0x5d70('0xe'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x5d70('0xf'));var as=require(_0x5d70('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x5d70('0x11'))(_0x5d70('0x12'));var utils=require(_0x5d70('0x13'));var config=require(_0x5d70('0x14'));var licenseUtil=require(_0x5d70('0x15'));var db=require(_0x5d70('0x16'))['db'];config['redis']=_[_0x5d70('0x17')](config[_0x5d70('0x18')],{'host':_0x5d70('0x19'),'port':0x18eb});var socket=require(_0x5d70('0x1a'))(new Redis(config[_0x5d70('0x18')]));require(_0x5d70('0x1b'))['register'](socket);var jayson=require(_0x5d70('0x1c'));var client=jayson[_0x5d70('0x1d')]['http']({'port':0x232c});var client9002=jayson[_0x5d70('0x1d')]['http']({'port':0x232a});var client9003=jayson[_0x5d70('0x1d')][_0x5d70('0x1e')]({'port':0x232b});var client9001=jayson[_0x5d70('0x1d')][_0x5d70('0x1e')]({'port':0x2329});function respondWithRpcPromise(_0x324e62,_0x50c8cd,_0x450718,_0x5a8a90){return new BPromise(function(_0x4315fd,_0xdb5ba2){var _0x1869ef=_0x5a8a90||client;return _0x1869ef[_0x5d70('0x1f')](_0x324e62,_0x450718)['then'](function(_0x549852){logger['info'](_0x5d70('0x20'),_0x50c8cd,'request\x20sent');logger['debug']('ChatWebsite,\x20%s,\x20%s,\x20%s',_0x50c8cd,_0x5d70('0x21'),JSON[_0x5d70('0x22')](_0x549852));if(_0x549852[_0x5d70('0x23')]){if(_0x549852[_0x5d70('0x23')]['code']===0x1f4){logger[_0x5d70('0x23')](_0x5d70('0x20'),_0x50c8cd,_0x549852[_0x5d70('0x23')][_0x5d70('0x24')]);return _0xdb5ba2(_0x549852[_0x5d70('0x23')][_0x5d70('0x24')]);}logger[_0x5d70('0x23')](_0x5d70('0x20'),_0x50c8cd,_0x549852[_0x5d70('0x23')][_0x5d70('0x24')]);return _0x4315fd(_0x549852[_0x5d70('0x23')][_0x5d70('0x24')]);}else{logger[_0x5d70('0x25')]('ChatWebsite,\x20%s,\x20%s',_0x50c8cd,_0x5d70('0x21'));_0x4315fd(_0x549852[_0x5d70('0x26')][_0x5d70('0x24')]);}})[_0x5d70('0x27')](function(_0x3ff2ce){logger[_0x5d70('0x23')]('ChatWebsite,\x20%s,\x20%s',_0x50c8cd,_0x3ff2ce);_0xdb5ba2(_0x3ff2ce);});});}function respondWithStatusCode(_0x27fd83,_0x5951da){_0x5951da=_0x5951da||0xcc;return function(_0x714d46){if(_0x714d46){return _0x27fd83[_0x5d70('0x28')](_0x5951da);}return _0x27fd83[_0x5d70('0x29')](_0x5951da)['end']();};}function respondWithResult(_0x26a8f9,_0x87e3c8){_0x87e3c8=_0x87e3c8||0xc8;return function(_0x56dfe3){if(_0x56dfe3){return _0x26a8f9[_0x5d70('0x29')](_0x87e3c8)[_0x5d70('0x2a')](_0x56dfe3);}};}function respondWithFilteredResult(_0x263c78,_0x46ffd1){return function(_0x4d701e){if(_0x4d701e){var _0x13c899=typeof _0x46ffd1[_0x5d70('0x2b')]===_0x5d70('0x2c')&&typeof _0x46ffd1[_0x5d70('0x2d')]===_0x5d70('0x2c');var _0xab29e6=_0x4d701e[_0x5d70('0x2e')];var _0x56ee60=_0x13c899?0x0:_0x46ffd1['offset'];var _0x2f2800=_0x13c899?_0x4d701e[_0x5d70('0x2e')]:_0x46ffd1[_0x5d70('0x2b')]+_0x46ffd1[_0x5d70('0x2d')];var _0x14b575;if(_0x2f2800>=_0xab29e6){_0x2f2800=_0xab29e6;_0x14b575=0xc8;}else{_0x14b575=0xce;}_0x263c78['status'](_0x14b575);return _0x263c78[_0x5d70('0x2f')]('Content-Range',_0x56ee60+'-'+_0x2f2800+'/'+_0xab29e6)[_0x5d70('0x2a')](_0x4d701e);}return null;};}function patchUpdates(_0x3c04b1){return function(_0x16369a){try{jsonpatch[_0x5d70('0x30')](_0x16369a,_0x3c04b1,!![]);}catch(_0x9d0a61){return BPromise[_0x5d70('0x31')](_0x9d0a61);}return _0x16369a[_0x5d70('0x32')]();};}function saveUpdates(_0x4f9765,_0x3cebbf){return function(_0x590f44){if(_0x590f44){return _0x590f44['update'](_0x4f9765)['then'](function(_0x544d6f){return _0x544d6f;});}return null;};}function removeEntity(_0x25cab8,_0x2df2b6){return function(_0x48814e){if(_0x48814e){return _0x48814e[_0x5d70('0x33')]()[_0x5d70('0x34')](function(){var _0x530e74=_0x48814e[_0x5d70('0x35')]({'plain':!![]});var _0x3d4413=_0x5d70('0x36');return db[_0x5d70('0x37')][_0x5d70('0x33')]({'where':{'type':_0x3d4413,'resourceId':_0x530e74['id']}})['then'](function(){return _0x48814e;});})[_0x5d70('0x34')](function(){_0x25cab8[_0x5d70('0x29')](0xcc)[_0x5d70('0x38')]();});}};}function handleEntityNotFound(_0x2f957d,_0xb8f4da){return function(_0x33a630){if(!_0x33a630){_0x2f957d[_0x5d70('0x28')](0x194);}return _0x33a630;};}function handleError(_0x57b1ad,_0x9e844e){_0x9e844e=_0x9e844e||0x1f4;return function(_0x2d3afc){logger[_0x5d70('0x23')](_0x2d3afc[_0x5d70('0x39')]);if(_0x2d3afc[_0x5d70('0x3a')]){delete _0x2d3afc[_0x5d70('0x3a')];}_0x57b1ad['status'](_0x9e844e)[_0x5d70('0x3b')](_0x2d3afc);};}exports[_0x5d70('0x3c')]=function(_0x2d3352,_0xd06699){var _0x207299={'include':[{'model':db[_0x5d70('0x3d')],'as':_0x5d70('0x3e')}]},_0x4ecd83={},_0x3fd97f={'count':0x0,'rows':[]};var _0x9cfc95=_[_0x5d70('0x3f')](db['ChatWebsite'][_0x5d70('0x40')],function(_0x4df90f){return{'name':_0x4df90f[_0x5d70('0x41')],'type':_0x4df90f['type'][_0x5d70('0x42')]};});_0x4ecd83[_0x5d70('0x43')]=_[_0x5d70('0x3f')](_0x9cfc95,'name');_0x4ecd83[_0x5d70('0x44')]=_[_0x5d70('0x45')](_0x2d3352[_0x5d70('0x44')]);_0x4ecd83['filters']=_['intersection'](_0x4ecd83['model'],_0x4ecd83[_0x5d70('0x44')]);_0x207299[_0x5d70('0x46')]=_['intersection'](_0x4ecd83['model'],qs[_0x5d70('0x47')](_0x2d3352[_0x5d70('0x44')]['fields']));_0x207299['attributes']=_0x207299[_0x5d70('0x46')][_0x5d70('0x48')]?_0x207299['attributes']:_0x4ecd83['model'];if(!_0x2d3352[_0x5d70('0x44')][_0x5d70('0x49')]('nolimit')){_0x207299[_0x5d70('0x2d')]=qs['limit'](_0x2d3352[_0x5d70('0x44')]['limit']);_0x207299[_0x5d70('0x2b')]=qs['offset'](_0x2d3352[_0x5d70('0x44')][_0x5d70('0x2b')]);}_0x207299['order']=qs[_0x5d70('0x4a')](_0x2d3352[_0x5d70('0x44')][_0x5d70('0x4a')]);_0x207299[_0x5d70('0x4b')]=qs[_0x5d70('0x4c')](_[_0x5d70('0x4d')](_0x2d3352[_0x5d70('0x44')],_0x4ecd83[_0x5d70('0x4c')]),_0x9cfc95);if(_0x2d3352[_0x5d70('0x44')][_0x5d70('0x4e')]){_0x207299[_0x5d70('0x4b')]=_[_0x5d70('0x4f')](_0x207299[_0x5d70('0x4b')],{'$or':_[_0x5d70('0x3f')](_0x9cfc95,function(_0x6e4263){if(_0x6e4263['type']!==_0x5d70('0x50')){var _0x55907f={};_0x55907f[_0x6e4263[_0x5d70('0x3a')]]={'$like':'%'+_0x2d3352[_0x5d70('0x44')][_0x5d70('0x4e')]+'%'};return _0x55907f;}})});}_0x207299=_[_0x5d70('0x4f')]({},_0x207299,_0x2d3352[_0x5d70('0x51')]);var _0x2c94e5={'where':_0x207299[_0x5d70('0x4b')]};return db[_0x5d70('0x52')]['count'](_0x2c94e5)[_0x5d70('0x34')](function(_0x52c9e8){_0x3fd97f[_0x5d70('0x2e')]=_0x52c9e8;if(_0x2d3352[_0x5d70('0x44')][_0x5d70('0x53')]){_0x207299[_0x5d70('0x54')]=[{'all':!![]}];}return db[_0x5d70('0x52')][_0x5d70('0x55')](_0x207299);})[_0x5d70('0x34')](function(_0x559153){_0x3fd97f[_0x5d70('0x56')]=_0x559153;return _0x3fd97f;})[_0x5d70('0x34')](respondWithFilteredResult(_0xd06699,_0x207299))[_0x5d70('0x27')](handleError(_0xd06699,null));};exports[_0x5d70('0x57')]=function(_0x103df3,_0x3b7cab){var _0x17b10d={'raw':![],'where':{'id':_0x103df3[_0x5d70('0x58')]['id']},'include':[{'model':db['Pause'],'as':_0x5d70('0x3e')}]},_0x28eeef={};_0x28eeef[_0x5d70('0x43')]=_[_0x5d70('0x45')](db[_0x5d70('0x52')][_0x5d70('0x40')]);_0x28eeef['query']=_[_0x5d70('0x45')](_0x103df3[_0x5d70('0x44')]);_0x28eeef[_0x5d70('0x4c')]=_[_0x5d70('0x59')](_0x28eeef['model'],_0x28eeef[_0x5d70('0x44')]);_0x17b10d[_0x5d70('0x46')]=_[_0x5d70('0x59')](_0x28eeef['model'],qs[_0x5d70('0x47')](_0x103df3[_0x5d70('0x44')]['fields']));_0x17b10d['attributes']=_0x17b10d[_0x5d70('0x46')][_0x5d70('0x48')]?_0x17b10d[_0x5d70('0x46')]:_0x28eeef[_0x5d70('0x43')];if(_0x103df3[_0x5d70('0x44')]['includeAll']){_0x17b10d[_0x5d70('0x54')]=[{'all':!![]}];}_0x17b10d=_[_0x5d70('0x4f')]({},_0x17b10d,_0x103df3[_0x5d70('0x51')]);return db[_0x5d70('0x52')][_0x5d70('0x5a')](_0x17b10d)[_0x5d70('0x34')](handleEntityNotFound(_0x3b7cab,null))[_0x5d70('0x34')](respondWithResult(_0x3b7cab,null))[_0x5d70('0x27')](handleError(_0x3b7cab,null));};exports[_0x5d70('0x5b')]=function(_0x3937d0,_0x122d38){return db['ChatWebsite'][_0x5d70('0x5b')](_0x3937d0['body'],{})[_0x5d70('0x34')](function(_0x5cc000){var _0x4abc6a=_0x3937d0['user']['get']({'plain':!![]});if(!_0x4abc6a)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x4abc6a[_0x5d70('0x5c')]===_0x5d70('0x5d')){var _0x44fe69=_0x5cc000['get']({'plain':!![]});var _0x5ba93b=_0x5d70('0x36');return db[_0x5d70('0x5e')][_0x5d70('0x5a')]({'where':{'name':_0x5ba93b,'userProfileId':_0x4abc6a[_0x5d70('0x5f')]},'raw':!![]})[_0x5d70('0x34')](function(_0x393b75){if(_0x393b75&&_0x393b75[_0x5d70('0x60')]===0x0){return db['UserProfileResource'][_0x5d70('0x5b')]({'name':_0x44fe69[_0x5d70('0x3a')],'resourceId':_0x44fe69['id'],'type':_0x393b75['name'],'sectionId':_0x393b75['id']},{})[_0x5d70('0x34')](function(){return _0x5cc000;});}else{return _0x5cc000;}})[_0x5d70('0x27')](function(_0x1e7400){logger[_0x5d70('0x23')](_0x5d70('0x61'),_0x1e7400);throw _0x1e7400;});}return _0x5cc000;})[_0x5d70('0x34')](respondWithResult(_0x122d38,0xc9))[_0x5d70('0x27')](handleError(_0x122d38,null));};exports[_0x5d70('0x62')]=function(_0x31d296,_0x30189e){if(_0x31d296['body']['id']){delete _0x31d296['body']['id'];}return db[_0x5d70('0x52')][_0x5d70('0x5a')]({'where':{'id':_0x31d296[_0x5d70('0x58')]['id']},'include':[{'model':db[_0x5d70('0x3d')],'as':_0x5d70('0x3e')}]})[_0x5d70('0x34')](handleEntityNotFound(_0x30189e,null))[_0x5d70('0x34')](saveUpdates(_0x31d296[_0x5d70('0x63')],null))[_0x5d70('0x34')](respondWithResult(_0x30189e,null))[_0x5d70('0x27')](handleError(_0x30189e,null));};exports[_0x5d70('0x33')]=function(_0x182c94,_0x33eba7){return db[_0x5d70('0x52')]['find']({'where':{'id':_0x182c94[_0x5d70('0x58')]['id']}})[_0x5d70('0x34')](handleEntityNotFound(_0x33eba7,null))[_0x5d70('0x34')](removeEntity(_0x33eba7,null))['catch'](handleError(_0x33eba7,null));};exports[_0x5d70('0x64')]=function(_0x42d7fb,_0x36b80a){return db[_0x5d70('0x52')][_0x5d70('0x64')]()[_0x5d70('0x34')](respondWithResult(_0x36b80a,null))[_0x5d70('0x27')](handleError(_0x36b80a,null));};exports[_0x5d70('0x65')]=function(_0x2d154a,_0x382ba9,_0x28d278){if(_0x2d154a[_0x5d70('0x63')]['id']){delete _0x2d154a[_0x5d70('0x63')]['id'];}return db['ChatWebsite'][_0x5d70('0x5a')]({'where':{'id':_0x2d154a[_0x5d70('0x58')]['id']}})[_0x5d70('0x34')](handleEntityNotFound(_0x382ba9,null))[_0x5d70('0x34')](function(_0x427cd5){if(_0x427cd5){_0x2d154a['body'][_0x5d70('0x66')]=_0x427cd5['id'];return db['Disposition']['create'](_0x2d154a[_0x5d70('0x63')]);}})['then'](respondWithResult(_0x382ba9,null))[_0x5d70('0x27')](handleError(_0x382ba9,null));};exports[_0x5d70('0x67')]=function(_0x3abe3e,_0x191046,_0x28fb1c){var _0x90b9f8={'raw':![],'where':{}};var _0xb52e4b={};var _0x6650f2={'count':0x0,'rows':[]};return db['ChatWebsite'][_0x5d70('0x68')]({'where':{'id':_0x3abe3e[_0x5d70('0x58')]['id']}})[_0x5d70('0x34')](handleEntityNotFound(_0x191046,null))['then'](function(_0x122af1){if(_0x122af1){_0xb52e4b[_0x5d70('0x43')]=_[_0x5d70('0x45')](db[_0x5d70('0x69')]['rawAttributes']);_0xb52e4b[_0x5d70('0x44')]=_[_0x5d70('0x45')](_0x3abe3e[_0x5d70('0x44')]);_0xb52e4b[_0x5d70('0x4c')]=_[_0x5d70('0x59')](_0xb52e4b[_0x5d70('0x43')],_0xb52e4b[_0x5d70('0x44')]);_0x90b9f8['attributes']=_[_0x5d70('0x59')](_0xb52e4b[_0x5d70('0x43')],qs['fields'](_0x3abe3e[_0x5d70('0x44')]['fields']));_0x90b9f8[_0x5d70('0x46')]=_0x90b9f8[_0x5d70('0x46')][_0x5d70('0x48')]?_0x90b9f8[_0x5d70('0x46')]:_0xb52e4b[_0x5d70('0x43')];if(!_0x3abe3e['query'][_0x5d70('0x49')](_0x5d70('0x6a'))){_0x90b9f8['limit']=qs[_0x5d70('0x2d')](_0x3abe3e['query'][_0x5d70('0x2d')]);_0x90b9f8['offset']=qs[_0x5d70('0x2b')](_0x3abe3e[_0x5d70('0x44')]['offset']);}_0x90b9f8[_0x5d70('0x6b')]=qs[_0x5d70('0x4a')](_0x3abe3e[_0x5d70('0x44')][_0x5d70('0x4a')]);_0x90b9f8[_0x5d70('0x4b')]=qs[_0x5d70('0x4c')](_[_0x5d70('0x4d')](_0x3abe3e[_0x5d70('0x44')],_0xb52e4b['filters']));_0x90b9f8[_0x5d70('0x4b')][_0x5d70('0x66')]=_0x122af1['id'];if(_0x3abe3e[_0x5d70('0x44')][_0x5d70('0x4e')]){_0x90b9f8[_0x5d70('0x4b')]=_['merge'](_0x90b9f8[_0x5d70('0x4b')],{'$or':_['map'](_0x90b9f8['attributes'],function(_0x37169a){var _0x1c200e={};_0x1c200e[_0x37169a]={'$like':'%'+_0x3abe3e[_0x5d70('0x44')][_0x5d70('0x4e')]+'%'};return _0x1c200e;})});}_0x90b9f8=_[_0x5d70('0x4f')]({},_0x90b9f8,_0x3abe3e[_0x5d70('0x51')]);return db[_0x5d70('0x69')][_0x5d70('0x2e')]({'where':_0x90b9f8[_0x5d70('0x4b')]})[_0x5d70('0x34')](function(_0x1928da){_0x6650f2[_0x5d70('0x2e')]=_0x1928da;if(_0x3abe3e[_0x5d70('0x44')][_0x5d70('0x53')]){_0x90b9f8[_0x5d70('0x54')]=[{'all':!![]}];}return db['Disposition']['findAll'](_0x90b9f8);})[_0x5d70('0x34')](function(_0x1bbfab){_0x6650f2[_0x5d70('0x56')]=_0x1bbfab;return _0x6650f2;});}})[_0x5d70('0x34')](respondWithFilteredResult(_0x191046,_0x90b9f8))['catch'](handleError(_0x191046,null));};exports[_0x5d70('0x6c')]=function(_0x4b193b,_0x2e6ff3,_0x2a2313){return db['ChatWebsite'][_0x5d70('0x5a')]({'where':{'id':_0x4b193b[_0x5d70('0x58')]['id']}})[_0x5d70('0x34')](handleEntityNotFound(_0x2e6ff3,null))[_0x5d70('0x34')](function(_0xd0330a){if(_0xd0330a){return _0xd0330a['removeDispositions'](_0x4b193b[_0x5d70('0x44')]['ids']);}})[_0x5d70('0x34')](respondWithStatusCode(_0x2e6ff3,null))[_0x5d70('0x27')](handleError(_0x2e6ff3,null));};exports[_0x5d70('0x6d')]=function(_0x265f66,_0x475e65,_0x439d9c){if(_0x265f66[_0x5d70('0x63')]['id']){delete _0x265f66['body']['id'];}return db[_0x5d70('0x52')]['find']({'where':{'id':_0x265f66[_0x5d70('0x58')]['id']}})[_0x5d70('0x34')](handleEntityNotFound(_0x475e65,null))[_0x5d70('0x34')](function(_0xef309c){if(_0xef309c){_0x265f66[_0x5d70('0x63')][_0x5d70('0x66')]=_0xef309c['id'];return db[_0x5d70('0x6e')][_0x5d70('0x5b')](_0x265f66['body']);}})[_0x5d70('0x34')](respondWithResult(_0x475e65,null))['catch'](handleError(_0x475e65,null));};exports[_0x5d70('0x6f')]=function(_0x44851d,_0x1d4fe5,_0x419511){var _0x5d52f8={'raw':![],'where':{}};var _0x4943a9={};var _0x137c0e={'count':0x0,'rows':[]};return db[_0x5d70('0x52')][_0x5d70('0x68')]({'where':{'id':_0x44851d[_0x5d70('0x58')]['id']}})[_0x5d70('0x34')](handleEntityNotFound(_0x1d4fe5,null))[_0x5d70('0x34')](function(_0x412f19){if(_0x412f19){_0x4943a9[_0x5d70('0x43')]=_[_0x5d70('0x45')](db[_0x5d70('0x6e')][_0x5d70('0x40')]);_0x4943a9[_0x5d70('0x44')]=_[_0x5d70('0x45')](_0x44851d[_0x5d70('0x44')]);_0x4943a9[_0x5d70('0x4c')]=_[_0x5d70('0x59')](_0x4943a9[_0x5d70('0x43')],_0x4943a9['query']);_0x5d52f8[_0x5d70('0x46')]=_[_0x5d70('0x59')](_0x4943a9[_0x5d70('0x43')],qs[_0x5d70('0x47')](_0x44851d['query'][_0x5d70('0x47')]));_0x5d52f8['attributes']=_0x5d52f8[_0x5d70('0x46')][_0x5d70('0x48')]?_0x5d52f8[_0x5d70('0x46')]:_0x4943a9['model'];if(!_0x44851d['query']['hasOwnProperty'](_0x5d70('0x6a'))){_0x5d52f8[_0x5d70('0x2d')]=qs[_0x5d70('0x2d')](_0x44851d['query']['limit']);_0x5d52f8[_0x5d70('0x2b')]=qs[_0x5d70('0x2b')](_0x44851d[_0x5d70('0x44')]['offset']);}_0x5d52f8['order']=qs['sort'](_0x44851d['query'][_0x5d70('0x4a')]);_0x5d52f8[_0x5d70('0x4b')]=qs[_0x5d70('0x4c')](_[_0x5d70('0x4d')](_0x44851d[_0x5d70('0x44')],_0x4943a9[_0x5d70('0x4c')]));_0x5d52f8[_0x5d70('0x4b')][_0x5d70('0x66')]=_0x412f19['id'];if(_0x44851d[_0x5d70('0x44')][_0x5d70('0x4e')]){_0x5d52f8[_0x5d70('0x4b')]=_[_0x5d70('0x4f')](_0x5d52f8[_0x5d70('0x4b')],{'$or':_['map'](_0x5d52f8[_0x5d70('0x46')],function(_0x51d626){var _0x97600e={};_0x97600e[_0x51d626]={'$like':'%'+_0x44851d['query'][_0x5d70('0x4e')]+'%'};return _0x97600e;})});}_0x5d52f8=_[_0x5d70('0x4f')]({},_0x5d52f8,_0x44851d[_0x5d70('0x51')]);return db['CannedAnswer'][_0x5d70('0x2e')]({'where':_0x5d52f8[_0x5d70('0x4b')]})[_0x5d70('0x34')](function(_0x12a6e8){_0x137c0e['count']=_0x12a6e8;if(_0x44851d[_0x5d70('0x44')]['includeAll']){_0x5d52f8['include']=[{'all':!![]}];}return db[_0x5d70('0x6e')][_0x5d70('0x55')](_0x5d52f8);})['then'](function(_0x3ee344){_0x137c0e[_0x5d70('0x56')]=_0x3ee344;return _0x137c0e;});}})['then'](respondWithFilteredResult(_0x1d4fe5,_0x5d52f8))[_0x5d70('0x27')](handleError(_0x1d4fe5,null));};exports['removeAnswers']=function(_0x1c53f8,_0x275957,_0x5e872f){return db[_0x5d70('0x52')][_0x5d70('0x5a')]({'where':{'id':_0x1c53f8[_0x5d70('0x58')]['id']}})[_0x5d70('0x34')](handleEntityNotFound(_0x275957,null))['then'](function(_0x300182){if(_0x300182){return _0x300182[_0x5d70('0x70')](_0x1c53f8[_0x5d70('0x44')][_0x5d70('0x71')]);}})[_0x5d70('0x34')](respondWithStatusCode(_0x275957,null))[_0x5d70('0x27')](handleError(_0x275957,null));};exports[_0x5d70('0x72')]=function(_0x2c3d77,_0x2bccd6,_0xe161fe){_0x2c3d77[_0x5d70('0x63')]['sitepic']=_0x2c3d77[_0x5d70('0x73')]['filename'];return db['ChatWebsite'][_0x5d70('0x5a')]({'where':{'id':_0x2c3d77[_0x5d70('0x58')]['id']}})[_0x5d70('0x34')](handleEntityNotFound(_0x2bccd6,null))[_0x5d70('0x34')](saveUpdates(_0x2c3d77[_0x5d70('0x63')],null))['then'](respondWithResult(_0x2bccd6,null))['catch'](handleError(_0x2bccd6,null));};exports[_0x5d70('0x74')]=function(_0x11421f,_0x2c1b9f,_0x1a21aa){_0x11421f['body'][_0x5d70('0x75')]=_0x11421f[_0x5d70('0x73')][_0x5d70('0x76')];return db[_0x5d70('0x52')]['find']({'where':{'id':_0x11421f[_0x5d70('0x58')]['id']}})[_0x5d70('0x34')](handleEntityNotFound(_0x2c1b9f,null))[_0x5d70('0x34')](saveUpdates(_0x11421f['body'],null))[_0x5d70('0x34')](respondWithResult(_0x2c1b9f,null))[_0x5d70('0x27')](handleError(_0x2c1b9f,null));};exports['addCustomerAvatar']=function(_0x5b2f62,_0xbffc61,_0x455036){_0x5b2f62[_0x5d70('0x63')][_0x5d70('0x77')]=_0x5b2f62['file'][_0x5d70('0x76')];return db[_0x5d70('0x52')]['find']({'where':{'id':_0x5b2f62[_0x5d70('0x58')]['id']}})[_0x5d70('0x34')](handleEntityNotFound(_0xbffc61,null))[_0x5d70('0x34')](saveUpdates(_0x5b2f62[_0x5d70('0x63')],null))[_0x5d70('0x34')](respondWithResult(_0xbffc61,null))[_0x5d70('0x27')](handleError(_0xbffc61,null));};exports[_0x5d70('0x78')]=function(_0x20e2e3,_0x1366e4,_0xb00a39){_0x20e2e3[_0x5d70('0x63')][_0x5d70('0x79')]=_0x20e2e3[_0x5d70('0x73')][_0x5d70('0x76')];return db[_0x5d70('0x52')]['find']({'where':{'id':_0x20e2e3[_0x5d70('0x58')]['id']}})[_0x5d70('0x34')](handleEntityNotFound(_0x1366e4,null))[_0x5d70('0x34')](saveUpdates(_0x20e2e3['body'],null))[_0x5d70('0x34')](respondWithResult(_0x1366e4,null))[_0x5d70('0x27')](handleError(_0x1366e4,null));};exports[_0x5d70('0x7a')]=function(_0x576bd8,_0x2c806a,_0x437032){var _0x24c54c=path[_0x5d70('0x7b')](config['root'],_0x5d70('0x7c'));var _0xfbf8ef={'where':{'id':_0x576bd8['params']['id']},'attributes':['id',_0x5d70('0x7d')],'raw':!![]};var _0x56f3c6=![];return require(_0x5d70('0x15'))['getLicense']()['then'](function(_0x28c682){if(_0x28c682){_0x56f3c6=_0x28c682['custom'];}})[_0x5d70('0x34')](function(){return db[_0x5d70('0x52')][_0x5d70('0x5a')](_0xfbf8ef);})[_0x5d70('0x34')](handleEntityNotFound(_0x2c806a,null))['then'](function(_0x291eb8){if(_0x291eb8){if(!_[_0x5d70('0x7e')](_0x291eb8[_0x5d70('0x7d')])){if(fs[_0x5d70('0x7f')](path['join'](config['root'],'server/files/images/logos/',_0x291eb8[_0x5d70('0x7d')]))&&_0x56f3c6){_0x24c54c=path[_0x5d70('0x7b')](config['root'],'server/files/images/logos/',_0x291eb8[_0x5d70('0x7d')]);}}return _0x2c806a['download'](_0x24c54c);}})[_0x5d70('0x27')](handleError(_0x2c806a,null));};exports[_0x5d70('0x80')]=function(_0x4fa69b,_0x460fea,_0x309324){var _0x5e00cd=path[_0x5d70('0x7b')](config[_0x5d70('0x81')],_0x5d70('0x82'));var _0x1d6b3f={'where':{'id':_0x4fa69b[_0x5d70('0x58')]['id']},'attributes':['id',_0x5d70('0x75')],'raw':!![]};return db[_0x5d70('0x52')]['find'](_0x1d6b3f)[_0x5d70('0x34')](handleEntityNotFound(_0x460fea,null))[_0x5d70('0x34')](function(_0x3832cb){if(_0x3832cb){if(!_[_0x5d70('0x7e')](_0x3832cb['agentAvatar'])){if(fs[_0x5d70('0x7f')](path[_0x5d70('0x7b')](config[_0x5d70('0x81')],_0x5d70('0x83'),_0x3832cb[_0x5d70('0x75')]))){_0x5e00cd=path[_0x5d70('0x7b')](config[_0x5d70('0x81')],_0x5d70('0x83'),_0x3832cb['agentAvatar']);}}return _0x460fea[_0x5d70('0x84')](_0x5e00cd);}})[_0x5d70('0x27')](handleError(_0x460fea,null));};exports[_0x5d70('0x85')]=function(_0x108902,_0x24ab94,_0x2eb733){var _0x2ba968=path[_0x5d70('0x7b')](config[_0x5d70('0x81')],_0x5d70('0x86'));var _0x4fe8ae={'where':{'id':_0x108902['params']['id']},'attributes':['id','customerAvatar',_0x5d70('0x87')],'raw':!![]};return db[_0x5d70('0x52')][_0x5d70('0x5a')](_0x4fe8ae)[_0x5d70('0x34')](handleEntityNotFound(_0x24ab94,null))[_0x5d70('0x34')](function(_0x3a5591){if(_0x3a5591){if(!_[_0x5d70('0x7e')](_0x3a5591[_0x5d70('0x77')])){if(fs[_0x5d70('0x7f')](path[_0x5d70('0x7b')](config[_0x5d70('0x81')],'server/files/images/avatars/',_0x3a5591['customerAvatar']))&&_0x3a5591['showCustomerAvatar']){_0x2ba968=path[_0x5d70('0x7b')](config[_0x5d70('0x81')],_0x5d70('0x83'),_0x3a5591['customerAvatar']);}}return _0x24ab94[_0x5d70('0x84')](_0x2ba968);}})[_0x5d70('0x27')](handleError(_0x24ab94,null));};exports[_0x5d70('0x88')]=function(_0x49106b,_0x2b5306,_0x24fdbd){var _0x342666=path[_0x5d70('0x7b')](config[_0x5d70('0x81')],'server/files/images/avatars/system_avatar.png');var _0x276006={'where':{'id':_0x49106b[_0x5d70('0x58')]['id']},'attributes':['id',_0x5d70('0x79')],'raw':!![]};return db['ChatWebsite'][_0x5d70('0x5a')](_0x276006)['then'](handleEntityNotFound(_0x2b5306,null))[_0x5d70('0x34')](function(_0x11e87d){if(_0x11e87d){if(!_[_0x5d70('0x7e')](_0x11e87d[_0x5d70('0x79')])){if(fs[_0x5d70('0x7f')](path['join'](config[_0x5d70('0x81')],'server/files/images/avatars/',_0x11e87d['systemAvatar']))){_0x342666=path[_0x5d70('0x7b')](config[_0x5d70('0x81')],'server/files/images/avatars/',_0x11e87d['systemAvatar']);}}return _0x2b5306['download'](_0x342666);}})['catch'](handleError(_0x2b5306,null));};exports[_0x5d70('0x89')]=function(_0x5f652c,_0x226148,_0x5d240c){var _0x559f02=require(_0x5d70('0x8a'));var _0x2780e6=new _0x559f02();var _0x80603c=_0x2780e6[_0x5d70('0x8b')](_0x5f652c['headers'][_0x5d70('0x8c')])[_0x5d70('0x8d')]();var _0x2e27a6={'body':_0x5f652c[_0x5d70('0x63')],'channel':'chat'};var _0x306295=[];var _0x36b201=[];var _0x4031b6={};var _0x56ca9a=![];return db[_0x5d70('0x8e')][_0x5d70('0x64')]()['then'](function(_0x21862d){if(!_0x21862d){throw new db[(_0x5d70('0x8f'))][(_0x5d70('0x90'))](_0x5d70('0x91'));}_0x306295=_['difference'](_['keys'](_0x21862d),['createdAt',_0x5d70('0x92')]);_0x36b201=_[_0x5d70('0x93')](_['keys'](_0x21862d),[_0x5d70('0x94'),'updatedAt',_0x5d70('0x95'),'ListId']);if(_0x5f652c['body']['id']){delete _0x5f652c[_0x5d70('0x63')]['id'];}if(_[_0x5d70('0x7e')](_0x5f652c['body'][_0x5d70('0x96')])){throw new db[(_0x5d70('0x8f'))][(_0x5d70('0x90'))](_0x5d70('0x97'));}if(_[_0x5d70('0x7e')](_0x5f652c[_0x5d70('0x63')][_0x5d70('0x63')])||_0x5f652c[_0x5d70('0x63')][_0x5d70('0x63')]===''){throw new db['Sequelize'][(_0x5d70('0x90'))](_0x5d70('0x98'));}if(_[_0x5d70('0x7e')](_0x5f652c[_0x5d70('0x63')][_0x5d70('0x99')])){throw new db[(_0x5d70('0x8f'))]['ValidationError']('mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x36b201);}if(!_['includes'](_0x36b201,_0x5f652c[_0x5d70('0x63')][_0x5d70('0x99')])){throw new db[(_0x5d70('0x8f'))][(_0x5d70('0x90'))](_0x5d70('0x9a')+_0x36b201);}_0x4031b6[_0x5f652c['body'][_0x5d70('0x99')]]=_0x5f652c['body'][_0x5d70('0x96')];})['then'](function(){return db[_0x5d70('0x52')][_0x5d70('0x5a')]({'where':{'id':_0x5f652c[_0x5d70('0x58')]['id']},'include':[{'model':db[_0x5d70('0x9b')],'as':'List','include':[{'model':db[_0x5d70('0x8e')],'as':_0x5d70('0x9c'),'where':_0x4031b6,'limit':0x1,'order':[[_0x5d70('0x92'),_0x5d70('0x9d')]]}]},{'model':db['ChatApplication'],'as':_0x5d70('0x9e')}]});})[_0x5d70('0x34')](handleEntityNotFound(_0x226148,null))['then'](function(_0x3c6098){if(_0x3c6098&&_0x3c6098[_0x5d70('0x9f')]){_0x2e27a6[_0x5d70('0xa0')]=_0x3c6098;_0x2e27a6[_0x5d70('0xa1')]=_0x3c6098[_0x5d70('0x9e')];_0x2e27a6['list']=_0x3c6098[_0x5d70('0x9f')];_0x2e27a6['applications']=_[_0x5d70('0xa2')](_0x2e27a6[_0x5d70('0xa1')],[_0x5d70('0xa3')],[_0x5d70('0xa4')]);if(_0x2e27a6[_0x5d70('0xa0')][_0x5d70('0x9e')]){delete _0x2e27a6[_0x5d70('0xa0')][_0x5d70('0x9e')];}if(_0x2e27a6[_0x5d70('0xa0')][_0x5d70('0x9f')]&&_0x2e27a6[_0x5d70('0xa0')][_0x5d70('0x9f')][_0x5d70('0x9c')][_0x5d70('0x48')]){return _0x2e27a6[_0x5d70('0xa0')][_0x5d70('0x9f')][_0x5d70('0x9c')][0x0];}var _0x530d48=_[_0x5d70('0x17')](_0x5f652c['body'],{'firstName':_0x5f652c[_0x5d70('0x63')]['from'],'ListId':_0x3c6098[_0x5d70('0xa5')]});_0x530d48[_0x5f652c[_0x5d70('0x63')][_0x5d70('0x99')]]=_0x5f652c[_0x5d70('0x63')][_0x5d70('0x96')];return db[_0x5d70('0x8e')][_0x5d70('0x5b')](_0x530d48,{'fields':_0x306295,'raw':!![]});}})[_0x5d70('0x34')](handleEntityNotFound(_0x226148,null))[_0x5d70('0x34')](function(_0x3d02ac){_0x2e27a6[_0x5d70('0xa6')]=_0x3d02ac;var _0x165b54=_0x5f652c[_0x5d70('0x63')]['customerIp'];if(_0x5f652c['headers'][_0x5d70('0xa7')]){_0x165b54=_0x5f652c[_0x5d70('0xa8')][_0x5d70('0xa7')];}else if(_0x5f652c[_0x5d70('0xa8')][_0x5d70('0xa9')]){_0x165b54=_[_0x5d70('0xaa')](_0x5f652c[_0x5d70('0xa8')]['x-forwarded-for'][_0x5d70('0xab')](','));}if(_0x3d02ac){var _0x11523c={'ContactId':_0x3d02ac['id'],'ChatWebsiteId':_0x5f652c[_0x5d70('0x58')]['id'],'from':(_0x3d02ac[_0x5d70('0xac')]||'')+'\x20'+(_0x3d02ac[_0x5d70('0xad')]||''),'customerIp':_0x165b54,'customerPort':_0x5f652c['headers'][_0x5d70('0xae')]?_0x5f652c[_0x5d70('0xa8')][_0x5d70('0xae')]:null,'referer':_0x5f652c[_0x5d70('0x63')][_0x5d70('0xaf')],'browserName':_0x80603c[_0x5d70('0xb0')][_0x5d70('0x3a')]&&_0x80603c[_0x5d70('0xb0')]['version']?util[_0x5d70('0xb1')]('%s\x20%s',_0x80603c['browser'][_0x5d70('0x3a')],_0x80603c[_0x5d70('0xb0')][_0x5d70('0xb2')]):_0x5d70('0xb3'),'browserVersion':_0x80603c[_0x5d70('0xb0')]['version']||_0x5d70('0xb3'),'osName':util[_0x5d70('0xb1')](_0x5d70('0xb4'),_0x80603c['os'][_0x5d70('0x3a')],_0x80603c['os'][_0x5d70('0xb2')]),'osVersion':_0x80603c['os'][_0x5d70('0xb2')],'deviceModel':_0x80603c['device'][_0x5d70('0x43')]&&_0x80603c[_0x5d70('0xb5')][_0x5d70('0xb6')]?util[_0x5d70('0xb1')](_0x5d70('0xb7'),_0x80603c['device']['model'],_0x80603c[_0x5d70('0xb5')][_0x5d70('0xb6')],_0x80603c['device'][_0x5d70('0xb8')]):null,'deviceVendor':_0x80603c[_0x5d70('0xb5')][_0x5d70('0xb6')],'deviceType':_0x80603c[_0x5d70('0xb5')][_0x5d70('0xb8')],'formData':JSON[_0x5d70('0x22')](_0x5f652c[_0x5d70('0x63')])};var _0x3c5fab={'ChatWebsiteId':_0x5f652c[_0x5d70('0x58')]['id'],'closed':![]};if(_0x5f652c[_0x5d70('0x63')][_0x5d70('0xb9')]){_0x3c5fab[_0x5d70('0xb9')]=_0x5f652c[_0x5d70('0x63')][_0x5d70('0xb9')];return db[_0x5d70('0xba')][_0x5d70('0x5a')]({'where':_0x3c5fab})['then'](function(_0x157da2){if(_0x157da2){return[_0x157da2,![]];}_0x11523c[_0x5d70('0xb9')]=_0x5f652c['body']['threadId'];_0x11523c[_0x5d70('0xbb')]=_0x5f652c['body'][_0x5d70('0xbb')];return db[_0x5d70('0xba')]['create'](_0x11523c)[_0x5d70('0x34')](function(_0x5d0367){return[_0x5d0367,!![]];});});}_0x3c5fab[_0x5d70('0xbc')]=_0x3d02ac['id'];if(_0x5f652c['body'][_0x5d70('0xbd')]&&_0x5f652c['body'][_0x5d70('0xbd')]['id']){_0x3c5fab['id']=_0x5f652c[_0x5d70('0x63')][_0x5d70('0xbd')]['id'];return db[_0x5d70('0xba')]['find']({'where':_0x3c5fab})[_0x5d70('0x34')](function(_0x57ec45){if(_0x57ec45){return[_0x57ec45,![]];}return db['ChatInteraction']['create'](_0x11523c)[_0x5d70('0x34')](function(_0x5a50c1){return[_0x5a50c1,!![]];});});}return db[_0x5d70('0xba')][_0x5d70('0x5b')](_0x11523c)[_0x5d70('0x34')](function(_0x515358){return[_0x515358,!![]];});}})[_0x5d70('0xbe')](function(_0x5441a5,_0x5137a2){if(_0x5441a5){_0x56ca9a=_0x5137a2;if(!_0x5137a2){var _0x1bb7a1={'from':(_0x2e27a6[_0x5d70('0xa6')][_0x5d70('0xac')]||'')+'\x20'+(_0x2e27a6[_0x5d70('0xa6')][_0x5d70('0xad')]||'')};if(_0x5f652c['body']['threadId']&&_0x5f652c[_0x5d70('0x63')]['messageId']&&_0x5f652c['body']['threadId']!=_0x5f652c[_0x5d70('0x63')][_0x5d70('0xbf')]){_0x1bb7a1[_0x5d70('0xb9')]=_0x5f652c[_0x5d70('0x63')][_0x5d70('0xbf')];}return _0x5441a5[_0x5d70('0x62')](_0x1bb7a1);}else{return _0x5441a5;}}})[_0x5d70('0x34')](function(_0x18d942){_0x2e27a6[_0x5d70('0xbd')]=_0x18d942[_0x5d70('0x35')]({'plain':!![]});_0x2e27a6['interaction'][_0x5d70('0xc0')]=_0x56ca9a;if(_0x2e27a6[_0x5d70('0xbd')]['created']){if(_0x2e27a6['account'][_0x5d70('0xc1')]){_0x2e27a6[_0x5d70('0xa1')][_0x5d70('0xc2')]({'id':0x0,'priority':_0x2e27a6[_0x5d70('0xa1')]['length']+0x1,'app':'close','appdata':'unmanaged','interval':_0x5d70('0xc3')});}}return db[_0x5d70('0xc4')]['create']({'body':_0x5f652c['body'][_0x5d70('0x63')],'ChatWebsiteId':_0x5f652c[_0x5d70('0x58')]['id'],'ChatInteractionId':_0x18d942['id'],'direction':'in','ContactId':_0x2e27a6[_0x5d70('0xa6')]['id'],'AttachmentId':_0x5f652c[_0x5d70('0x63')]['AttachmentId']});})[_0x5d70('0x34')](function(_0x32ce77){_0x2e27a6[_0x5d70('0x24')]=_0x32ce77;if(_0x2e27a6['interaction'][_0x5d70('0xc5')]){return db[_0x5d70('0xc6')][_0x5d70('0x5a')]({'attributes':['id','name'],'where':{'id':_0x2e27a6['interaction'][_0x5d70('0xc5')]}})['then'](function(_0x5ddfae){if(_0x5ddfae){_0x2e27a6[_0x5d70('0xa1')][_0x5d70('0xc7')]({'id':0x0,'priority':0x0,'app':'agent','appdata':_0x5ddfae[_0x5d70('0x3a')]+','+(_0x2e27a6[_0x5d70('0xa0')][_0x5d70('0xc8')]||0xa),'interval':_0x5d70('0xc3')});_0x2e27a6[_0x5d70('0xc9')]=!![];}return respondWithRpcPromise(_0x5d70('0xca'),_0x5d70('0xcb'),_0x2e27a6);});}return respondWithRpcPromise(_0x5d70('0xca'),'startRouting',_0x2e27a6);})[_0x5d70('0x34')](function(_0x55c0ad){respondWithRpcPromise('EventManager',_0x5d70('0xcc'),{'event':_0x5d70('0x89'),'message':_0x55c0ad},client9002);return _0x55c0ad;})['then'](respondWithResult(_0x226148,null))['catch'](handleError(_0x226148,null));};exports[_0x5d70('0xcd')]=function(_0x26255f,_0x4c927c,_0x6b660e){var _0x57aa7b,_0x296366,_0x5428e8;var _0x2aaf80=[];var _0x285f2f=[];var _0x2e43e5={};var _0x42b5a0=_0x26255f[_0x5d70('0xce')]||[];var _0x5a1e40=[];var _0x3e941a;return db[_0x5d70('0x8e')][_0x5d70('0x64')]()[_0x5d70('0x34')](function(_0x4b6a15){if(!_0x4b6a15){throw new db[(_0x5d70('0x8f'))][(_0x5d70('0x90'))](_0x5d70('0x91'));}_0x285f2f=_[_0x5d70('0x93')](_[_0x5d70('0x45')](_0x4b6a15),[_0x5d70('0x94'),_0x5d70('0x92')]);_0x2aaf80=_[_0x5d70('0x93')](_[_0x5d70('0x45')](_0x4b6a15),[_0x5d70('0x94'),'updatedAt','CompanyId',_0x5d70('0xa5')]);if(_0x26255f[_0x5d70('0x63')]['id']){delete _0x26255f[_0x5d70('0x63')]['id'];}if(_[_0x5d70('0x7e')](_0x26255f[_0x5d70('0x63')][_0x5d70('0x96')])){throw _0x4c927c['status'](0x1f4)[_0x5d70('0x3b')](new db[(_0x5d70('0x8f'))][(_0x5d70('0x90'))]('from\x20is\x20mandatory'));}if(_[_0x5d70('0x7e')](_0x26255f[_0x5d70('0x63')]['body'])||_0x26255f[_0x5d70('0x63')][_0x5d70('0x63')]===''){throw _0x4c927c['status'](0x1f4)[_0x5d70('0x3b')](new db['Sequelize']['ValidationError'](_0x5d70('0x98')));}if(_[_0x5d70('0x7e')](_0x26255f['body']['mapKeyOffline'])){throw _0x4c927c[_0x5d70('0x29')](0x1f4)[_0x5d70('0x3b')](new db[(_0x5d70('0x8f'))][(_0x5d70('0x90'))](_0x5d70('0xcf')+_0x2aaf80));}if(!_[_0x5d70('0xd0')](_0x2aaf80,_0x26255f['body'][_0x5d70('0xd1')])){throw _0x4c927c['status'](0x1f4)['send'](new db[(_0x5d70('0x8f'))][(_0x5d70('0x90'))](_0x5d70('0xd2')+_0x2aaf80));}_0x2e43e5[_0x26255f[_0x5d70('0x63')]['mapKeyOffline']]=_0x26255f[_0x5d70('0x63')][_0x5d70('0x96')];})['then'](function(){return db[_0x5d70('0x52')][_0x5d70('0x5a')]({'where':{'id':_0x26255f[_0x5d70('0x58')]['id']},'include':[{'model':db[_0x5d70('0x9b')],'as':_0x5d70('0x9f')},{'model':db[_0x5d70('0xd3')],'as':'MailAccount'}]});})[_0x5d70('0x34')](handleEntityNotFound(_0x4c927c,null))['then'](function(_0x104e03){if(_0x104e03&&_0x104e03[_0x5d70('0x9f')]){_0x296366=_0x104e03;var _0x57f6f8=_['defaults'](_0x26255f[_0x5d70('0x63')],{'firstName':_0x26255f[_0x5d70('0x63')][_0x5d70('0x96')],'phone':_0x26255f[_0x5d70('0x63')][_0x5d70('0x96')],'ListId':_0x104e03[_0x5d70('0xa5')]});_0x57f6f8[_0x26255f[_0x5d70('0x63')][_0x5d70('0xd1')]]=_0x26255f[_0x5d70('0x63')]['from'];return db[_0x5d70('0x8e')][_0x5d70('0xd4')]({'where':_0x2e43e5,'defaults':_0x57f6f8});}})[_0x5d70('0xbe')](function(_0x15cf93){if(_0x15cf93){_0x5428e8=_0x15cf93;var _0x1268ec=fs[_0x5d70('0xd5')](path[_0x5d70('0x7b')](config[_0x5d70('0x81')],'server/files/templates/chatOfflineMessage.ejs'),_0x5d70('0xd6'));var _0x299452=ejs[_0x5d70('0xd7')](_0x1268ec,{'body':_['toPairs'](_0x26255f[_0x5d70('0x63')][_0x5d70('0x63')]),'bodyTitle':_0x296366[_0x5d70('0xd8')]});return db['ChatOfflineMessage'][_0x5d70('0x5b')]({'body':_0x299452,'ContactId':_0x15cf93['id'],'ChatWebsiteId':_0x296366['id']});}})[_0x5d70('0x34')](function(_0x20df12){_0x3e941a=_0x20df12;if(_0x42b5a0[_0x5d70('0x48')]){var _0x22a485=_0x42b5a0[_0x5d70('0x3f')](function(_0x1a47ef){return{'name':_0x1a47ef[_0x5d70('0xd9')],'basename':_0x1a47ef[_0x5d70('0x76')],'type':_0x1a47ef['mimetype'],'ChatOfflineMessageId':_0x20df12['id']};});_0x5a1e40=_0x22a485[_0x5d70('0x3f')](_0x19c48c=>{var _0x410c7f={'filename':_0x19c48c[_0x5d70('0x3a')],'path':path[_0x5d70('0x7b')](config[_0x5d70('0x81')],_0x5d70('0xda'),_0x5d70('0xce'),'attachments','offline-chat',_0x19c48c['basename'])};return _0x410c7f;});if(!_0x296366[_0x5d70('0xdb')]){return db[_0x5d70('0xdc')]['transaction'](function(_0xb2d8cc){return db[_0x5d70('0xdd')][_0x5d70('0xde')](_0x22a485,{'transaction':_0xb2d8cc});});}}})[_0x5d70('0x34')](function(){if(_0x3e941a){_0x57aa7b=_0x3e941a;return db[_0x5d70('0xd3')][_0x5d70('0x68')]({'where':{'active':!![]},'include':[{'model':db[_0x5d70('0xdf')],'as':_0x5d70('0xe0'),'raw':!![]}]});}})['then'](function(_0x12e52f){if(_0x12e52f&&_0x12e52f[_0x5d70('0xe0')]&&_0x296366['forwardOffline']&&_0x296366[_0x5d70('0xe1')]){var _0x2ce3d7={'tls':{'rejectUnauthorized':![]}};if(_0x12e52f[_0x5d70('0xe0')][_0x5d70('0xe2')]){_0x2ce3d7[_0x5d70('0xe2')]=_0x12e52f[_0x5d70('0xe0')]['service'];}else{_0x2ce3d7[_0x5d70('0xe3')]=_0x12e52f[_0x5d70('0xe0')][_0x5d70('0xe3')];_0x2ce3d7['port']=_0x12e52f[_0x5d70('0xe0')]['port'];_0x2ce3d7[_0x5d70('0xe4')]=_0x12e52f[_0x5d70('0xe0')][_0x5d70('0xe4')];}if(_0x12e52f[_0x5d70('0xe0')][_0x5d70('0xe5')]){_0x2ce3d7['auth']={'user':_0x12e52f['Smtp'][_0x5d70('0x5d')],'pass':_0x12e52f[_0x5d70('0xe0')][_0x5d70('0xe6')]};}return respondWithRpcPromise(_0x5d70('0xe7'),'sendMail',{'account':_0x2ce3d7,'message':{'from':util[_0x5d70('0xb1')](_0x5d70('0xe8'),_0x12e52f['name'],_0x12e52f[_0x5d70('0xe9')]||_0x12e52f['Smtp']['user']),'to':_0x296366[_0x5d70('0xe1')],'subject':_0x296366[_0x5d70('0xea')],'html':_0x57aa7b[_0x5d70('0x63')],'attachments':_0x5a1e40}},client9003)[_0x5d70('0x34')](function(){return _0x57aa7b;})[_0x5d70('0x27')](function(_0x2ee66d){console[_0x5d70('0x23')](_0x2ee66d);});}})[_0x5d70('0x34')](function(){if(_0x296366&&_0x296366[_0x5d70('0xdb')]&&_0x296366['MailAccountId']){var _0x36d560=[];if(_0x42b5a0[_0x5d70('0x48')]){_0x36d560=_0x42b5a0[_0x5d70('0x3f')](function(_0x426093){return{'name':_0x426093['originalname'],'basename':_0x426093[_0x5d70('0x76')],'type':_0x426093[_0x5d70('0xeb')],'ChatOfflineMessageId':_0x3e941a['id']};});}var _0x579cbf;if(!_[_0x5d70('0x7e')](_0x296366[_0x5d70('0xec')])){var _0x17c7e1=_[_0x5d70('0x3f')](_0x26255f['body'],function(_0xf6b5e4){return _0xf6b5e4;});var _0x12a5eb=_[_0x5d70('0xed')](_0x17c7e1)[0x0];var _0x43b6cc=_[_0x5d70('0xee')](_0x12a5eb,function(_0x1556fe){return _0x1556fe;});_0x579cbf=_0x43b6cc[0x1][_0x296366['subjectOffline']];}var _0x5c5364={'from':_0x5428e8[_0x5d70('0xe9')],'firstName':_0x5428e8[_0x5d70('0xac')],'lastName':_0x5428e8['lastName'],'mapKey':'email','message':{'from':_0x5428e8[_0x5d70('0xe9')],'to':_0x296366[_0x5d70('0xd3')][_0x5d70('0xe9')],'cc':'','subject':_[_0x5d70('0x7e')](_0x579cbf)?_0x296366[_0x5d70('0xea')]:_0x579cbf,'messageId':'','sentAt':new Date(),'attach':_0x36d560[_0x5d70('0x48')],'attachments':_0x36d560,'originChannel':'Chat','ChatWebsiteId':_0x296366['id'],'ChatOfflineMessageId':_0x57aa7b['id'],'originTo':_0x296366[_0x5d70('0xd3')][_0x5d70('0xe9')]},'body':_0x57aa7b[_0x5d70('0x63')]};var _0x465405={'account':{'id':_0x296366[_0x5d70('0xef')]},'body':_0x5c5364,'log':'NotifyMailAccount'};return respondWithRpcPromise(_0x5d70('0xf0'),_0x5d70('0xf1'),_0x465405,client9001)[_0x5d70('0x34')](function(){return _0x57aa7b;})[_0x5d70('0x27')](function(_0x452be9){console[_0x5d70('0x23')](_0x452be9);});}return;})['then'](function(){if(_0x57aa7b){return _0x57aa7b;}})[_0x5d70('0x34')](respondWithResult(_0x4c927c,null))['catch'](function(_0x486d3f){console['error'](_0x5d70('0x27'),_0x486d3f);for(var _0x380844 of _0x42b5a0){var _0x2efb90=path[_0x5d70('0x7b')](config[_0x5d70('0x81')],_0x5d70('0xda'),_0x5d70('0xce'),_0x5d70('0xf2'),_0x5d70('0xf3'),_0x380844[_0x5d70('0x76')]);fs_extra['remove'](_0x2efb90)[_0x5d70('0x27')](function(_0x4147ac){console[_0x5d70('0x23')]('Could\x20not\x20remove\x20attachment\x20file',_0x2efb90,_0x4147ac);});}});};exports[_0x5d70('0xf4')]=function(_0xba810e,_0x3842dd,_0x579c71){return db[_0x5d70('0xba')][_0x5d70('0x5a')]({'where':{'id':_0xba810e[_0x5d70('0x58')]['id']}})[_0x5d70('0x34')](handleEntityNotFound(_0x3842dd,null))[_0x5d70('0x34')](function(_0x175da2){if(_0x175da2){return _0x175da2[_0x5d70('0xf4')](_0xba810e[_0x5d70('0x63')][_0x5d70('0x71')],_[_0x5d70('0xf5')](_0xba810e[_0x5d70('0x63')],[_0x5d70('0x71'),'id'])||{});}})[_0x5d70('0x34')](respondWithResult(_0x3842dd,null))[_0x5d70('0x27')](handleError(_0x3842dd,null));};exports[_0x5d70('0xf6')]=function(_0x48bf42,_0x42ffdd,_0x5f4a67){var _0x42d809={'raw':![],'where':{}};var _0x18a013={};var _0x4515e3={'count':0x0,'rows':[]};return db[_0x5d70('0x52')][_0x5d70('0x68')]({'where':{'id':_0x48bf42[_0x5d70('0x58')]['id']}})[_0x5d70('0x34')](handleEntityNotFound(_0x42ffdd,null))[_0x5d70('0x34')](function(_0x13d190){if(_0x13d190){_0x18a013['model']=_[_0x5d70('0x45')](db['ChatInteraction']['rawAttributes']);_0x18a013['query']=_[_0x5d70('0x45')](_0x48bf42[_0x5d70('0x44')]);_0x18a013[_0x5d70('0x4c')]=_['intersection'](_0x18a013[_0x5d70('0x43')],_0x18a013[_0x5d70('0x44')]);_0x42d809[_0x5d70('0x46')]=_[_0x5d70('0x59')](_0x18a013[_0x5d70('0x43')],qs['fields'](_0x48bf42[_0x5d70('0x44')][_0x5d70('0x47')]));_0x42d809['attributes']=_0x42d809[_0x5d70('0x46')]['length']?_0x42d809[_0x5d70('0x46')]:_0x18a013[_0x5d70('0x43')];if(!_0x48bf42[_0x5d70('0x44')][_0x5d70('0x49')]('nolimit')){_0x42d809[_0x5d70('0x2d')]=qs[_0x5d70('0x2d')](_0x48bf42[_0x5d70('0x44')][_0x5d70('0x2d')]);_0x42d809[_0x5d70('0x2b')]=qs[_0x5d70('0x2b')](_0x48bf42['query']['offset']);}_0x42d809[_0x5d70('0x6b')]=qs[_0x5d70('0x4a')](_0x48bf42[_0x5d70('0x44')][_0x5d70('0x4a')]);_0x42d809[_0x5d70('0x4b')]=qs[_0x5d70('0x4c')](_[_0x5d70('0x4d')](_0x48bf42[_0x5d70('0x44')],_0x18a013[_0x5d70('0x4c')]));_0x42d809['where'][_0x5d70('0x66')]=_0x13d190['id'];if(_0x48bf42[_0x5d70('0x44')][_0x5d70('0x4e')]){_0x42d809['where']=_[_0x5d70('0x4f')](_0x42d809[_0x5d70('0x4b')],{'$or':_['map'](_0x42d809['attributes'],function(_0x1667e3){var _0x247af8={};_0x247af8[_0x1667e3]={'$like':'%'+_0x48bf42[_0x5d70('0x44')][_0x5d70('0x4e')]+'%'};return _0x247af8;})});}_0x42d809=_[_0x5d70('0x4f')]({},_0x42d809,_0x48bf42[_0x5d70('0x51')]);return db['ChatInteraction']['count']({'where':_0x42d809[_0x5d70('0x4b')]})[_0x5d70('0x34')](function(_0x4b1913){_0x4515e3[_0x5d70('0x2e')]=_0x4b1913;if(_0x48bf42['query'][_0x5d70('0x53')]){_0x42d809[_0x5d70('0x54')]=[{'model':db[_0x5d70('0x8e')],'as':'Contact','required':![]},{'model':db[_0x5d70('0xc6')],'as':'Owner','attributes':[_0x5d70('0x3a'),_0x5d70('0xf7'),_0x5d70('0xf8')],'required':![]},{'model':db[_0x5d70('0xf9')],'as':_0x5d70('0xfa'),'attributes':['id',_0x5d70('0x3a'),_0x5d70('0xfb')],'where':_0x48bf42[_0x5d70('0x44')][_0x5d70('0xfc')]?{'id':_0x48bf42[_0x5d70('0x44')][_0x5d70('0xfc')]}:undefined,'required':_0x48bf42[_0x5d70('0x44')]['tag']?!![]:![]}];}return db[_0x5d70('0xba')][_0x5d70('0x55')](_0x42d809);})[_0x5d70('0x34')](function(_0x4a6c36){_0x4515e3['rows']=_0x4a6c36;return _0x4515e3;});}})[_0x5d70('0x34')](respondWithFilteredResult(_0x42ffdd,_0x42d809))['catch'](handleError(_0x42ffdd,null));};function iftimePromise(_0x5ae206,_0x78c3d4){return respondWithRpcPromise(_0x5d70('0xfd'),_0x5d70('0xfe'),{'command':_0x78c3d4[_0x5d70('0xff')]?util[_0x5d70('0xb1')](_0x5d70('0x100'),_0x5ae206['interval'],_0x78c3d4[_0x5d70('0xff')]):util[_0x5d70('0xb1')](_0x5d70('0x101'),_0x5ae206[_0x5d70('0x102')])},client9002)[_0x5d70('0x34')](function(_0x22d827){var _0x3292a9=_0x22d827&&_0x22d827['indexOf'](_0x5d70('0x103'))>=0x0?!![]:![];logger[_0x5d70('0x25')]('[%s][INTERVAL][%s]\x20%s\x20%s\x20(%s)',_0x78c3d4['id'],_0x5ae206['id'],_0x5ae206['interval'],_0x3292a9?_0x5d70('0x104'):_0x5d70('0x105'),_0x78c3d4['timezone']?_0x78c3d4[_0x5d70('0xff')]:'No\x20timezone');return _0x3292a9;})['catch'](function(_0x3e43d3){logger[_0x5d70('0x23')](_0x5d70('0x106'),_0x78c3d4['id'],_0x5ae206['id'],_0x5ae206[_0x5d70('0x102')],util[_0x5d70('0x107')](_0x3e43d3,{'showHidden':![],'depth':null}),_0x78c3d4[_0x5d70('0xff')]?_0x78c3d4['timezone']:_0x5d70('0x108'));return![];});}exports[_0x5d70('0xfe')]=function(_0x4088c2,_0x4ba30d,_0x3dc8e0){var _0x1e6124=0x0;var _0x3aeece=0x0;var _0x506fcf=![];var _0x391bdb;var _0x20c595;return db[_0x5d70('0x52')]['find']({'where':{'id':_0x4088c2[_0x5d70('0x58')]['id']},'include':[{'model':db['Interval'],'as':_0x5d70('0x109'),'include':[{'model':db['Interval'],'as':'Intervals','attributes':['id',_0x5d70('0x102')],'raw':!![]}]}]})[_0x5d70('0x34')](handleEntityNotFound(_0x4ba30d,null))[_0x5d70('0x34')](function(_0x29fc1c){if(_0x29fc1c){_0x391bdb=_0x29fc1c;return _0x29fc1c[_0x5d70('0x10a')]({'raw':!![]});}})[_0x5d70('0x34')](function(_0x4e35cd){if(_0x391bdb){if(_0x4e35cd){_0x20c595=_0x4e35cd;}}return require(_0x5d70('0x15'))[_0x5d70('0x10b')]();})['then'](function(_0x566e9c){if(_0x566e9c){_0x3aeece=_0x566e9c[_0x5d70('0x10c')];_0x506fcf=_0x566e9c['custom'];}})[_0x5d70('0x34')](function(){return db[_0x5d70('0xba')][_0x5d70('0x2e')]({'where':{'closed':![]}});})['then'](function(_0x2b8e12){_0x1e6124=_0x2b8e12;if(_0x3aeece&&_0x2b8e12>_0x3aeece){return db[_0x5d70('0x10d')][_0x5d70('0x68')]({'where':{'id':0x1}})['then'](function(_0xa7af30){if(_0xa7af30){_0xa7af30['increment'](_0x5d70('0x10e'));}});}})[_0x5d70('0x34')](function(){if(_0x391bdb['Interval']&&_0x391bdb[_0x5d70('0x109')][_0x5d70('0x10f')]){var _0xf6efd6=[];for(var _0x2c99ad=0x0;_0x2c99ad<_0x391bdb['Interval']['Intervals'][_0x5d70('0x48')];_0x2c99ad++){var _0x33359a=_0x391bdb[_0x5d70('0x109')][_0x5d70('0x10f')][_0x2c99ad][_0x5d70('0x35')]({'plain':!![]});_0xf6efd6['push'](iftimePromise(_0x33359a,_0x391bdb));}return BPromise[_0x5d70('0x110')](_0xf6efd6)[_0x5d70('0x34')](function(_0x385361){return _[_0x5d70('0x111')](_0x385361);});}else{return!![];}})[_0x5d70('0x34')](function(_0x34a33e){var _0x1640e9=fs[_0x5d70('0xd5')](path[_0x5d70('0x7b')](config[_0x5d70('0x81')],_0x5d70('0x112')),'utf8');var _0x1acd8e={'remote':_0x391bdb[_0x5d70('0x113')],'query':querystring[_0x5d70('0x22')](_[_0x5d70('0x4f')](_0x391bdb[_0x5d70('0x35')]({'plain':!![]}),{'customerIp':_0x4088c2[_0x5d70('0xa8')][_0x5d70('0xa9')]||_0x4088c2[_0x5d70('0xa8')][_0x5d70('0x114')]||_0x4088c2[_0x5d70('0x115')][_0x5d70('0x116')]||_0x4088c2['ip'],'referer':_0x4088c2[_0x5d70('0xa8')][_0x5d70('0xaf')],'openedInteractions':_0x1e6124,'maxInteractions':_0x3aeece,'virtual':_0x506fcf[_0x5d70('0x10c')],'online':_0x34a33e,'custom':_0x506fcf}))['replace'](/'/g,'\x5c\x27')};_0x4ba30d[_0x5d70('0x3b')](ejs[_0x5d70('0xd7')](Mustache[_0x5d70('0xd7')](_0x1640e9,_0x1acd8e),{'proactiveActions':_0x20c595,'alignment':_0x391bdb[_0x5d70('0x117')],'verticalAlignment':_0x391bdb[_0x5d70('0x118')],'div_color':_0x391bdb[_0x5d70('0xfb')],'text_color':_0x391bdb['textColor'],'button_color':_0x391bdb['color_button'],'background_color':_0x391bdb[_0x5d70('0x119')]}));})[_0x5d70('0x27')](handleError(_0x4ba30d,null));};exports[_0x5d70('0x11a')]=function(_0x5761f3,_0x20d542,_0x244a68){return db[_0x5d70('0x52')][_0x5d70('0x68')]({'where':{'id':_0x5761f3[_0x5d70('0x58')]['id']}})[_0x5d70('0x34')](handleEntityNotFound(_0x20d542,null))[_0x5d70('0x34')](function(_0x3d4113){if(_0x3d4113){return db[_0x5d70('0xdc')][_0x5d70('0x11b')](function(_0x977de4){return db['ChatApplication'][_0x5d70('0x33')]({'where':{'ChatWebsiteId':_0x5761f3[_0x5d70('0x58')]['id']},'transaction':_0x977de4})[_0x5d70('0x34')](function(_0x4774ed){var _0xa94899=_[_0x5d70('0x3f')](_0x5761f3[_0x5d70('0x63')],function(_0x56414b){_0x56414b['ChatWebsiteId']=_0x5761f3[_0x5d70('0x58')]['id'];return _0x56414b;});return db['ChatApplication'][_0x5d70('0xde')](_0xa94899,{'transaction':_0x977de4});});})[_0x5d70('0x34')](function(){return db[_0x5d70('0x11c')][_0x5d70('0x11d')]({'where':{'ChatWebsiteId':_0x5761f3[_0x5d70('0x58')]['id']},'order':_0x5d70('0xa3')});});}})[_0x5d70('0x34')](respondWithResult(_0x20d542,null))[_0x5d70('0x27')](handleError(_0x20d542,null));};exports[_0x5d70('0x11e')]=function(_0x2b5d82,_0x29f070,_0x371c9e){var _0x578350={};var _0x2c8860={};var _0x1886ec;var _0x3f6d3e;return db[_0x5d70('0x52')][_0x5d70('0x68')]({'where':{'id':_0x2b5d82['params']['id']}})[_0x5d70('0x34')](handleEntityNotFound(_0x29f070,null))['then'](function(_0x31f08b){if(_0x31f08b){_0x1886ec=_0x31f08b;_0x2c8860[_0x5d70('0x43')]=_[_0x5d70('0x45')](db[_0x5d70('0x11c')]['rawAttributes']);_0x2c8860[_0x5d70('0x44')]=_[_0x5d70('0x45')](_0x2b5d82[_0x5d70('0x44')]);_0x2c8860[_0x5d70('0x4c')]=_[_0x5d70('0x59')](_0x2c8860['model'],_0x2c8860['query']);_0x578350[_0x5d70('0x46')]=_[_0x5d70('0x59')](_0x2c8860['model'],qs[_0x5d70('0x47')](_0x2b5d82[_0x5d70('0x44')]['fields']));_0x578350[_0x5d70('0x46')]=_0x578350[_0x5d70('0x46')]['length']?_0x578350[_0x5d70('0x46')]:_0x2c8860['model'];_0x578350[_0x5d70('0x6b')]=qs[_0x5d70('0x4a')](_0x2b5d82[_0x5d70('0x44')]['sort']);_0x578350[_0x5d70('0x4b')]=qs['filters'](_[_0x5d70('0x4d')](_0x2b5d82['query'],_0x2c8860[_0x5d70('0x4c')]));if(_0x2b5d82['query']['filter']){_0x578350['where']=_[_0x5d70('0x4f')](_0x578350[_0x5d70('0x4b')],{'$or':_['map'](_0x578350[_0x5d70('0x46')],function(_0x2a24e2){var _0x59eb0c={};_0x59eb0c[_0x2a24e2]={'$like':'%'+_0x2b5d82['query'][_0x5d70('0x4e')]+'%'};return _0x59eb0c;})});}_0x578350=_[_0x5d70('0x4f')]({},_0x578350,_0x2b5d82[_0x5d70('0x51')]);return _0x1886ec[_0x5d70('0x11e')](_0x578350);}})[_0x5d70('0x34')](function(_0x398b9a){if(_0x398b9a){_0x3f6d3e=_0x398b9a['length'];if(!_0x2b5d82[_0x5d70('0x44')][_0x5d70('0x49')]('nolimit')){_0x578350[_0x5d70('0x2d')]=qs[_0x5d70('0x2d')](_0x2b5d82['query'][_0x5d70('0x2d')]);_0x578350[_0x5d70('0x2b')]=qs[_0x5d70('0x2b')](_0x2b5d82[_0x5d70('0x44')][_0x5d70('0x2b')]);}return _0x1886ec[_0x5d70('0x11e')](_0x578350);}})[_0x5d70('0x34')](function(_0x260590){if(_0x260590){return _0x260590?{'count':_0x3f6d3e,'rows':_0x260590}:null;}})[_0x5d70('0x34')](respondWithResult(_0x29f070,null))[_0x5d70('0x27')](handleError(_0x29f070,null));};exports[_0x5d70('0x11f')]=function(_0x3690fe,_0x174efd,_0x2deadb){return db[_0x5d70('0x120')][_0x5d70('0x5a')]({'where':{'id':_0x3690fe[_0x5d70('0x58')]['id']}})['then'](handleEntityNotFound(_0x174efd,null))[_0x5d70('0x34')](function(_0x3e1711){if(_0x3e1711){return _0x3e1711[_0x5d70('0x11f')](_0x3690fe[_0x5d70('0x63')][_0x5d70('0x71')],_[_0x5d70('0xf5')](_0x3690fe['body'],[_0x5d70('0x71'),'id'])||{});}})['then'](respondWithResult(_0x174efd,null))[_0x5d70('0x27')](handleError(_0x174efd,null));};exports['getProactiveActions']=function(_0x36e825,_0x506631,_0x4f2f78){var _0x502461={};var _0x577e4b={};var _0x1fa1fb;var _0x554a43;return db['ChatWebsite']['findOne']({'where':{'id':_0x36e825['params']['id']}})[_0x5d70('0x34')](handleEntityNotFound(_0x506631,null))['then'](function(_0x485678){if(_0x485678){_0x1fa1fb=_0x485678;_0x577e4b[_0x5d70('0x43')]=_[_0x5d70('0x45')](db['ChatProactiveAction'][_0x5d70('0x40')]);_0x577e4b[_0x5d70('0x44')]=_[_0x5d70('0x45')](_0x36e825[_0x5d70('0x44')]);_0x577e4b['filters']=_[_0x5d70('0x59')](_0x577e4b[_0x5d70('0x43')],_0x577e4b['query']);_0x502461['attributes']=_[_0x5d70('0x59')](_0x577e4b[_0x5d70('0x43')],qs['fields'](_0x36e825[_0x5d70('0x44')][_0x5d70('0x47')]));_0x502461[_0x5d70('0x46')]=_0x502461[_0x5d70('0x46')][_0x5d70('0x48')]?_0x502461[_0x5d70('0x46')]:_0x577e4b[_0x5d70('0x43')];_0x502461[_0x5d70('0x6b')]=qs[_0x5d70('0x4a')](_0x36e825[_0x5d70('0x44')][_0x5d70('0x4a')]);_0x502461[_0x5d70('0x4b')]=qs[_0x5d70('0x4c')](_[_0x5d70('0x4d')](_0x36e825[_0x5d70('0x44')],_0x577e4b[_0x5d70('0x4c')]));if(_0x36e825[_0x5d70('0x44')][_0x5d70('0x4e')]){_0x502461[_0x5d70('0x4b')]=_[_0x5d70('0x4f')](_0x502461[_0x5d70('0x4b')],{'$or':_['map'](_0x502461['attributes'],function(_0x30072e){var _0x2ff379={};_0x2ff379[_0x30072e]={'$like':'%'+_0x36e825[_0x5d70('0x44')][_0x5d70('0x4e')]+'%'};return _0x2ff379;})});}_0x502461=_[_0x5d70('0x4f')]({},_0x502461,_0x36e825[_0x5d70('0x51')]);return _0x1fa1fb[_0x5d70('0x10a')](_0x502461);}})[_0x5d70('0x34')](function(_0x511c13){if(_0x511c13){_0x554a43=_0x511c13[_0x5d70('0x48')];if(!_0x36e825[_0x5d70('0x44')][_0x5d70('0x49')](_0x5d70('0x6a'))){_0x502461['limit']=qs[_0x5d70('0x2d')](_0x36e825['query']['limit']);_0x502461['offset']=qs[_0x5d70('0x2b')](_0x36e825[_0x5d70('0x44')][_0x5d70('0x2b')]);}return _0x1fa1fb[_0x5d70('0x10a')](_0x502461);}})[_0x5d70('0x34')](function(_0x3de9a2){if(_0x3de9a2){return _0x3de9a2?{'count':_0x554a43,'rows':_0x3de9a2}:null;}})[_0x5d70('0x34')](respondWithResult(_0x506631,null))[_0x5d70('0x27')](handleError(_0x506631,null));};exports[_0x5d70('0x121')]=function(_0x226bc8,_0x15be46,_0xe51267){var _0x265a2c=_0x226bc8[_0x5d70('0x44')][_0x5d70('0x122')]===_0x5d70('0x123')?'offlineForm':_0x5d70('0x124');return db[_0x5d70('0x52')][_0x5d70('0x5a')]({'attributes':['id',_0x265a2c],'where':{'id':_0x226bc8[_0x5d70('0x58')]['id']}})[_0x5d70('0x34')](handleEntityNotFound(_0x15be46,null))[_0x5d70('0x34')](function(_0x317697){if(_0x317697){var _0x5d83bf=_0x317697[_0x265a2c];var _0x5af9ad=_0x5d83bf&&_0x5d83bf[_0x5d70('0x125')]?_0x5d83bf[_0x5d70('0x125')]:[];_0x15be46[_0x5d70('0x3b')]({'fromKey':_[_0x5d70('0x7e')](_0x5d83bf[_0x5d70('0x126')])?undefined:_0x5d83bf['fromKey'],'count':_0x5af9ad['length'],'rows':_0x5af9ad});}})[_0x5d70('0x27')](handleError(_0x15be46,null));};exports['getOfflineMessages']=function(_0x4ff0ae,_0x19b2e1,_0x11e7c6){var _0x5a8b26={'raw':![],'where':{}};var _0x558fea={};var _0x4f91fc={'count':0x0,'rows':[]};return db[_0x5d70('0x52')][_0x5d70('0x68')]({'where':{'id':_0x4ff0ae[_0x5d70('0x58')]['id']}})[_0x5d70('0x34')](handleEntityNotFound(_0x19b2e1,null))[_0x5d70('0x34')](function(_0x32cb15){if(_0x32cb15){_0x558fea[_0x5d70('0x43')]=_[_0x5d70('0x45')](db[_0x5d70('0x127')][_0x5d70('0x40')]);_0x558fea[_0x5d70('0x44')]=_[_0x5d70('0x45')](_0x4ff0ae[_0x5d70('0x44')]);_0x558fea[_0x5d70('0x4c')]=_[_0x5d70('0x59')](_0x558fea[_0x5d70('0x43')],_0x558fea[_0x5d70('0x44')]);_0x5a8b26[_0x5d70('0x46')]=_[_0x5d70('0x59')](_0x558fea[_0x5d70('0x43')],qs[_0x5d70('0x47')](_0x4ff0ae[_0x5d70('0x44')][_0x5d70('0x47')]));_0x5a8b26[_0x5d70('0x46')]=_0x5a8b26[_0x5d70('0x46')][_0x5d70('0x48')]?_0x5a8b26['attributes']:_0x558fea[_0x5d70('0x43')];if(!_0x4ff0ae[_0x5d70('0x44')][_0x5d70('0x49')](_0x5d70('0x6a'))){_0x5a8b26[_0x5d70('0x2d')]=qs['limit'](_0x4ff0ae[_0x5d70('0x44')][_0x5d70('0x2d')]);_0x5a8b26[_0x5d70('0x2b')]=qs[_0x5d70('0x2b')](_0x4ff0ae[_0x5d70('0x44')][_0x5d70('0x2b')]);}_0x5a8b26[_0x5d70('0x6b')]=qs[_0x5d70('0x4a')](_0x4ff0ae[_0x5d70('0x44')]['sort']);_0x5a8b26[_0x5d70('0x4b')]=qs[_0x5d70('0x4c')](_[_0x5d70('0x4d')](_0x4ff0ae[_0x5d70('0x44')],_0x558fea['filters']));_0x5a8b26[_0x5d70('0x4b')][_0x5d70('0x66')]=_0x32cb15['id'];if(_0x4ff0ae[_0x5d70('0x44')][_0x5d70('0x4e')]){_0x5a8b26[_0x5d70('0x4b')]=_[_0x5d70('0x4f')](_0x5a8b26['where'],{'$or':_[_0x5d70('0x3f')](_0x5a8b26[_0x5d70('0x46')],function(_0x51232c){var _0x3728b4={};_0x3728b4[_0x51232c]={'$like':'%'+_0x4ff0ae[_0x5d70('0x44')]['filter']+'%'};return _0x3728b4;})});}_0x5a8b26=_[_0x5d70('0x4f')]({},_0x5a8b26,_0x4ff0ae[_0x5d70('0x51')]);return db[_0x5d70('0x127')][_0x5d70('0x2e')]({'where':_0x5a8b26[_0x5d70('0x4b')]})[_0x5d70('0x34')](function(_0x38c088){_0x4f91fc[_0x5d70('0x2e')]=_0x38c088;if(_0x4ff0ae[_0x5d70('0x44')][_0x5d70('0x53')]){_0x5a8b26['include']=[{'all':!![]}];}else{_0x5a8b26[_0x5d70('0x54')]=[{'model':db[_0x5d70('0x8e')],'as':_0x5d70('0x128'),'required':![]},{'model':db[_0x5d70('0xdd')],'as':'Attachments','required':![]}];}return db[_0x5d70('0x127')][_0x5d70('0x55')](_0x5a8b26);})[_0x5d70('0x34')](function(_0x244851){_0x4f91fc[_0x5d70('0x56')]=_0x244851;return _0x4f91fc;});}})[_0x5d70('0x34')](respondWithFilteredResult(_0x19b2e1,_0x5a8b26))['catch'](handleError(_0x19b2e1,null));};exports[_0x5d70('0x129')]=function(_0x86eb35,_0x1c731f,_0x5a1df1){return db[_0x5d70('0x52')][_0x5d70('0x5a')]({'where':{'id':_0x86eb35['params']['id']}})[_0x5d70('0x34')](handleEntityNotFound(_0x1c731f,null))[_0x5d70('0x34')](function(_0x138a5c){if(_0x138a5c){return _0x138a5c['addAgents'](_0x86eb35[_0x5d70('0x63')][_0x5d70('0x71')],_[_0x5d70('0xf5')](_0x86eb35[_0x5d70('0x63')],['ids','id'])||{})['spread'](function(_0x221a59){for(var _0x455b0f=0x0;_0x455b0f<_0x86eb35[_0x5d70('0x63')][_0x5d70('0x71')][_0x5d70('0x48')];_0x455b0f+=0x1){socket[_0x5d70('0x12a')](_0x5d70('0x12b'),{'UserId':_0x86eb35[_0x5d70('0x63')]['ids'][_0x455b0f],'ChatWebsiteId':_0x86eb35[_0x5d70('0x58')]['id']});}return _0x221a59;});}})[_0x5d70('0x34')](respondWithResult(_0x1c731f,null))['catch'](handleError(_0x1c731f,null));};exports[_0x5d70('0x12c')]=function(_0xeadf29,_0x226a94,_0x285c31){return db[_0x5d70('0x52')][_0x5d70('0x5a')]({'where':{'id':_0xeadf29[_0x5d70('0x58')]['id']}})[_0x5d70('0x34')](handleEntityNotFound(_0x226a94,null))[_0x5d70('0x34')](function(_0x2b179a){if(_0x2b179a){return _0x2b179a['removeAgents'](_0xeadf29[_0x5d70('0x44')][_0x5d70('0x71')])[_0x5d70('0x34')](function(){if(_[_0x5d70('0x12d')](_0xeadf29[_0x5d70('0x44')][_0x5d70('0x71')])){for(var _0x4d1db8=0x0;_0x4d1db8<_0xeadf29[_0x5d70('0x44')][_0x5d70('0x71')]['length'];_0x4d1db8+=0x1){socket[_0x5d70('0x12a')]('userChatWebsite:remove',{'UserId':Number(_0xeadf29[_0x5d70('0x44')][_0x5d70('0x71')][_0x4d1db8]),'ChatWebsiteId':Number(_0xeadf29[_0x5d70('0x58')]['id'])});}}else{socket[_0x5d70('0x12a')](_0x5d70('0x12e'),{'UserId':Number(_0xeadf29['query'][_0x5d70('0x71')]),'ChatWebsiteId':Number(_0xeadf29['params']['id'])});}});}})[_0x5d70('0x34')](respondWithStatusCode(_0x226a94,null))[_0x5d70('0x27')](handleError(_0x226a94,null));};exports['getAgents']=function(_0x312e2c,_0x1b470b,_0x28affd){var _0x5f2a71={};var _0x358881={};var _0x36706c;var _0x138f1f;return db[_0x5d70('0x52')][_0x5d70('0x68')]({'where':{'id':_0x312e2c['params']['id']}})[_0x5d70('0x34')](handleEntityNotFound(_0x1b470b,null))['then'](function(_0x440ac9){if(_0x440ac9){_0x36706c=_0x440ac9;_0x358881[_0x5d70('0x43')]=_[_0x5d70('0x45')](db['User']['rawAttributes']);_0x358881[_0x5d70('0x44')]=_[_0x5d70('0x45')](_0x312e2c[_0x5d70('0x44')]);_0x358881[_0x5d70('0x4c')]=_[_0x5d70('0x59')](_0x358881[_0x5d70('0x43')],_0x358881[_0x5d70('0x44')]);_0x5f2a71[_0x5d70('0x46')]=_[_0x5d70('0x59')](_0x358881[_0x5d70('0x43')],qs['fields'](_0x312e2c[_0x5d70('0x44')][_0x5d70('0x47')]));_0x5f2a71[_0x5d70('0x46')]=_0x5f2a71['attributes'][_0x5d70('0x48')]?_0x5f2a71[_0x5d70('0x46')]:_0x358881[_0x5d70('0x43')];_0x5f2a71['order']=qs[_0x5d70('0x4a')](_0x312e2c[_0x5d70('0x44')][_0x5d70('0x4a')]);_0x5f2a71[_0x5d70('0x4b')]=qs[_0x5d70('0x4c')](_[_0x5d70('0x4d')](_0x312e2c['query'],_0x358881['filters']));if(_0x312e2c[_0x5d70('0x44')][_0x5d70('0x4e')]){_0x5f2a71[_0x5d70('0x4b')]=_['merge'](_0x5f2a71[_0x5d70('0x4b')],{'$or':_[_0x5d70('0x3f')](_0x5f2a71[_0x5d70('0x46')],function(_0x2f19b1){var _0x5c80fa={};_0x5c80fa[_0x2f19b1]={'$like':'%'+_0x312e2c['query'][_0x5d70('0x4e')]+'%'};return _0x5c80fa;})});}_0x5f2a71=_[_0x5d70('0x4f')]({},_0x5f2a71,_0x312e2c[_0x5d70('0x51')]);return _0x36706c['getAgents'](_0x5f2a71);}})['then'](function(_0x3d4609){if(_0x3d4609){_0x138f1f=_0x3d4609[_0x5d70('0x48')];if(!_0x312e2c[_0x5d70('0x44')]['hasOwnProperty']('nolimit')){_0x5f2a71[_0x5d70('0x2d')]=qs[_0x5d70('0x2d')](_0x312e2c[_0x5d70('0x44')][_0x5d70('0x2d')]);_0x5f2a71['offset']=qs['offset'](_0x312e2c[_0x5d70('0x44')][_0x5d70('0x2b')]);}return _0x36706c[_0x5d70('0x12f')](_0x5f2a71);}})[_0x5d70('0x34')](function(_0x5dbfa7){if(_0x5dbfa7){return _0x5dbfa7?{'count':_0x138f1f,'rows':_0x5dbfa7}:null;}})[_0x5d70('0x34')](respondWithResult(_0x1b470b,null))['catch'](handleError(_0x1b470b,null));}; \ No newline at end of file diff --git a/server/api/chatWebsite/chatWebsite.events.js b/server/api/chatWebsite/chatWebsite.events.js index 7d6a9ec..0b19296 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 _0x946e=['hook','exports','events','ChatWebsite','save','emit','hasOwnProperty'];(function(_0x156098,_0x3bf5e4){var _0x146fae=function(_0x17408d){while(--_0x17408d){_0x156098['push'](_0x156098['shift']());}};_0x146fae(++_0x3bf5e4);}(_0x946e,0x1d0));var _0xe946=function(_0x217195,_0x2b7eb6){_0x217195=_0x217195-0x0;var _0x1d0401=_0x946e[_0x217195];return _0x1d0401;};'use strict';var EventEmitter=require(_0xe946('0x0'));var ChatWebsite=require('../../mysqldb')['db'][_0xe946('0x1')];var ChatWebsiteEvents=new EventEmitter();ChatWebsiteEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xe946('0x2'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x31cade){return function(_0xb981db,_0x2b42cd,_0x145058){ChatWebsiteEvents[_0xe946('0x3')](_0x31cade+':'+_0xb981db['id'],_0xb981db);ChatWebsiteEvents['emit'](_0x31cade,_0xb981db);_0x145058(null);};}for(var e in events){if(events[_0xe946('0x4')](e)){var event=events[e];ChatWebsite[_0xe946('0x5')](e,emitEvent(event));}}module[_0xe946('0x6')]=ChatWebsiteEvents; \ No newline at end of file +var _0xea03=['hook','events','ChatWebsite','setMaxListeners','save','update','remove','emit','hasOwnProperty'];(function(_0x43f890,_0x16f30c){var _0x485ce9=function(_0x4c1f0b){while(--_0x4c1f0b){_0x43f890['push'](_0x43f890['shift']());}};_0x485ce9(++_0x16f30c);}(_0xea03,0x1ba));var _0x3ea0=function(_0x5a5ffb,_0x3aaf44){_0x5a5ffb=_0x5a5ffb-0x0;var _0x12d821=_0xea03[_0x5a5ffb];return _0x12d821;};'use strict';var EventEmitter=require(_0x3ea0('0x0'));var ChatWebsite=require('../../mysqldb')['db'][_0x3ea0('0x1')];var ChatWebsiteEvents=new EventEmitter();ChatWebsiteEvents[_0x3ea0('0x2')](0x0);var events={'afterCreate':_0x3ea0('0x3'),'afterUpdate':_0x3ea0('0x4'),'afterDestroy':_0x3ea0('0x5')};function emitEvent(_0x5d24b9){return function(_0x4d62ed,_0x531f4a,_0x13133a){ChatWebsiteEvents[_0x3ea0('0x6')](_0x5d24b9+':'+_0x4d62ed['id'],_0x4d62ed);ChatWebsiteEvents[_0x3ea0('0x6')](_0x5d24b9,_0x4d62ed);_0x13133a(null);};}for(var e in events){if(events[_0x3ea0('0x7')](e)){var event=events[e];ChatWebsite[_0x3ea0('0x8')](e,emitEvent(event));}}module['exports']=ChatWebsiteEvents; \ No newline at end of file diff --git a/server/api/chatWebsite/chatWebsite.model.js b/server/api/chatWebsite/chatWebsite.model.js index 2fa9211..306ad33 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 _0x757a=['../../config/environment','./chatWebsite.attributes','exports','define','ChatWebsite','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf'];(function(_0x254081,_0x20731a){var _0x5d1e2a=function(_0x597854){while(--_0x597854){_0x254081['push'](_0x254081['shift']());}};_0x5d1e2a(++_0x20731a);}(_0x757a,0x163));var _0xa757=function(_0x36746d,_0x2eef59){_0x36746d=_0x36746d-0x0;var _0x49621d=_0x757a[_0x36746d];return _0x49621d;};'use strict';var _=require(_0xa757('0x0'));var util=require(_0xa757('0x1'));var logger=require(_0xa757('0x2'))(_0xa757('0x3'));var moment=require(_0xa757('0x4'));var BPromise=require(_0xa757('0x5'));var rp=require(_0xa757('0x6'));var fs=require('fs');var path=require(_0xa757('0x7'));var rimraf=require(_0xa757('0x8'));var config=require(_0xa757('0x9'));var attributes=require(_0xa757('0xa'));module[_0xa757('0xb')]=function(_0x13ea51,_0x3c4af1){return _0x13ea51[_0xa757('0xc')](_0xa757('0xd'),attributes,{'tableName':'chat_websites','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x2f97=['exports','define','ChatWebsite','chat_websites','lodash','util','bluebird','path','rimraf','./chatWebsite.attributes'];(function(_0x433b73,_0x2c5b9c){var _0x398401=function(_0x1ff683){while(--_0x1ff683){_0x433b73['push'](_0x433b73['shift']());}};_0x398401(++_0x2c5b9c);}(_0x2f97,0xcc));var _0x72f9=function(_0x1b5da9,_0x470164){_0x1b5da9=_0x1b5da9-0x0;var _0x4c5cec=_0x2f97[_0x1b5da9];return _0x4c5cec;};'use strict';var _=require(_0x72f9('0x0'));var util=require(_0x72f9('0x1'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0x72f9('0x2'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x72f9('0x3'));var rimraf=require(_0x72f9('0x4'));var config=require('../../config/environment');var attributes=require(_0x72f9('0x5'));module[_0x72f9('0x6')]=function(_0x26a91a,_0x4a30c1){return _0x26a91a[_0x72f9('0x7')](_0x72f9('0x8'),attributes,{'tableName':_0x72f9('0x9'),'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 0c33aea..df9599b 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 _0xae3f=['lodash','util','moment','randomstring','../../config/utils','../../config/logger','jayson/promise','client','http','redis','socket.io-emitter','./chatWebsite.socket','register','request','info','request\x20sent','debug','ChatWebsite,\x20%s,\x20%s,\x20%s','stringify','error','code','message','ChatWebsite,\x20%s,\x20%s','catch'];(function(_0x1bff08,_0x5232d8){var _0x33800e=function(_0x545363){while(--_0x545363){_0x1bff08['push'](_0x1bff08['shift']());}};_0x33800e(++_0x5232d8);}(_0xae3f,0x198));var _0xfae3=function(_0x40220a,_0x22feb1){_0x40220a=_0x40220a-0x0;var _0x3903cc=_0xae3f[_0x40220a];return _0x3903cc;};'use strict';var _=require(_0xfae3('0x0'));var util=require(_0xfae3('0x1'));var moment=require(_0xfae3('0x2'));var BPromise=require('bluebird');var rs=require(_0xfae3('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xfae3('0x4'));var logger=require(_0xfae3('0x5'))('rpc');var config=require('../../config/environment');var jayson=require(_0xfae3('0x6'));var client=jayson[_0xfae3('0x7')][_0xfae3('0x8')]({'port':0x232a});config[_0xfae3('0x9')]=_['defaults'](config[_0xfae3('0x9')],{'host':'localhost','port':0x18eb});var socket=require(_0xfae3('0xa'))(new Redis(config[_0xfae3('0x9')]));require(_0xfae3('0xb'))[_0xfae3('0xc')](socket);function respondWithRpcPromise(_0x310cce,_0x506a66,_0x38ee6f){return new BPromise(function(_0x2846d4,_0xe640b1){return client[_0xfae3('0xd')](_0x310cce,_0x38ee6f)['then'](function(_0x478729){logger[_0xfae3('0xe')]('ChatWebsite,\x20%s,\x20%s',_0x506a66,_0xfae3('0xf'));logger[_0xfae3('0x10')](_0xfae3('0x11'),_0x506a66,_0xfae3('0xf'),JSON[_0xfae3('0x12')](_0x478729));if(_0x478729[_0xfae3('0x13')]){if(_0x478729['error'][_0xfae3('0x14')]===0x1f4){logger[_0xfae3('0x13')]('ChatWebsite,\x20%s,\x20%s',_0x506a66,_0x478729[_0xfae3('0x13')][_0xfae3('0x15')]);return _0xe640b1(_0x478729['error'][_0xfae3('0x15')]);}logger[_0xfae3('0x13')](_0xfae3('0x16'),_0x506a66,_0x478729[_0xfae3('0x13')][_0xfae3('0x15')]);return _0x2846d4(_0x478729[_0xfae3('0x13')][_0xfae3('0x15')]);}else{logger[_0xfae3('0xe')](_0xfae3('0x16'),_0x506a66,'request\x20sent');_0x2846d4(_0x478729['result']['message']);}})[_0xfae3('0x17')](function(_0x519555){logger[_0xfae3('0x13')](_0xfae3('0x16'),_0x506a66,_0x519555);_0xe640b1(_0x519555);});});} \ No newline at end of file +var _0x52ef=['jayson/promise','defaults','localhost','socket.io-emitter','register','request','then','info','ChatWebsite,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc'];(function(_0x5780ee,_0x25b42b){var _0x3b0c2f=function(_0x488d54){while(--_0x488d54){_0x5780ee['push'](_0x5780ee['shift']());}};_0x3b0c2f(++_0x25b42b);}(_0x52ef,0xd9));var _0xf52e=function(_0x2e3533,_0xdd8d83){_0x2e3533=_0x2e3533-0x0;var _0x45d13b=_0x52ef[_0x2e3533];return _0x45d13b;};'use strict';var _=require(_0xf52e('0x0'));var util=require('util');var moment=require(_0xf52e('0x1'));var BPromise=require(_0xf52e('0x2'));var rs=require(_0xf52e('0x3'));var fs=require('fs');var Redis=require(_0xf52e('0x4'));var db=require(_0xf52e('0x5'))['db'];var utils=require(_0xf52e('0x6'));var logger=require('../../config/logger')(_0xf52e('0x7'));var config=require('../../config/environment');var jayson=require(_0xf52e('0x8'));var client=jayson['client']['http']({'port':0x232a});config['redis']=_[_0xf52e('0x9')](config['redis'],{'host':_0xf52e('0xa'),'port':0x18eb});var socket=require(_0xf52e('0xb'))(new Redis(config['redis']));require('./chatWebsite.socket')[_0xf52e('0xc')](socket);function respondWithRpcPromise(_0x4ebd79,_0x2373fd,_0x222b55){return new BPromise(function(_0x5f2fdb,_0x308b2b){return client[_0xf52e('0xd')](_0x4ebd79,_0x222b55)[_0xf52e('0xe')](function(_0xf77bf4){logger[_0xf52e('0xf')](_0xf52e('0x10'),_0x2373fd,_0xf52e('0x11'));logger[_0xf52e('0x12')]('ChatWebsite,\x20%s,\x20%s,\x20%s',_0x2373fd,_0xf52e('0x11'),JSON[_0xf52e('0x13')](_0xf77bf4));if(_0xf77bf4[_0xf52e('0x14')]){if(_0xf77bf4[_0xf52e('0x14')][_0xf52e('0x15')]===0x1f4){logger['error']('ChatWebsite,\x20%s,\x20%s',_0x2373fd,_0xf77bf4[_0xf52e('0x14')][_0xf52e('0x16')]);return _0x308b2b(_0xf77bf4[_0xf52e('0x14')][_0xf52e('0x16')]);}logger[_0xf52e('0x14')]('ChatWebsite,\x20%s,\x20%s',_0x2373fd,_0xf77bf4[_0xf52e('0x14')][_0xf52e('0x16')]);return _0x5f2fdb(_0xf77bf4[_0xf52e('0x14')][_0xf52e('0x16')]);}else{logger['info'](_0xf52e('0x10'),_0x2373fd,_0xf52e('0x11'));_0x5f2fdb(_0xf77bf4[_0xf52e('0x17')]['message']);}})[_0xf52e('0x18')](function(_0x21c383){logger[_0xf52e('0x14')]('ChatWebsite,\x20%s,\x20%s',_0x2373fd,_0x21c383);_0x308b2b(_0x21c383);});});} \ No newline at end of file diff --git a/server/api/chatWebsite/chatWebsite.socket.js b/server/api/chatWebsite/chatWebsite.socket.js index 1897050..1acc975 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 _0x185b=['update','register','length','chatWebsite:','./chatWebsite.events','save','remove'];(function(_0x168ad0,_0x45e98b){var _0x3596fc=function(_0x388510){while(--_0x388510){_0x168ad0['push'](_0x168ad0['shift']());}};_0x3596fc(++_0x45e98b);}(_0x185b,0x9e));var _0xb185=function(_0x19950b,_0x53d0d7){_0x19950b=_0x19950b-0x0;var _0x3c6b41=_0x185b[_0x19950b];return _0x3c6b41;};'use strict';var ChatWebsiteEvents=require(_0xb185('0x0'));var events=[_0xb185('0x1'),_0xb185('0x2'),_0xb185('0x3')];function createListener(_0x194cee,_0x71b822){return function(_0x2eb573){_0x71b822['emit'](_0x194cee,_0x2eb573);};}function removeListener(_0x4647e2,_0x3b0eb1){return function(){ChatWebsiteEvents['removeListener'](_0x4647e2,_0x3b0eb1);};}exports[_0xb185('0x4')]=function(_0xc23231){for(var _0x223d1e=0x0,_0x284140=events[_0xb185('0x5')];_0x223d1e<_0x284140;_0x223d1e++){var _0x4b8e8c=events[_0x223d1e];var _0x2085fe=createListener(_0xb185('0x6')+_0x4b8e8c,_0xc23231);ChatWebsiteEvents['on'](_0x4b8e8c,_0x2085fe);}}; \ No newline at end of file +var _0x42c3=['update','emit','removeListener','register','chatWebsite:','remove'];(function(_0x553eac,_0x22fca7){var _0x46cb29=function(_0x1a4f48){while(--_0x1a4f48){_0x553eac['push'](_0x553eac['shift']());}};_0x46cb29(++_0x22fca7);}(_0x42c3,0x71));var _0x342c=function(_0x8dac14,_0x20f85c){_0x8dac14=_0x8dac14-0x0;var _0xb2c9a=_0x42c3[_0x8dac14];return _0xb2c9a;};'use strict';var ChatWebsiteEvents=require('./chatWebsite.events');var events=['save',_0x342c('0x0'),_0x342c('0x1')];function createListener(_0x19754f,_0x456cc4){return function(_0x59a377){_0x456cc4[_0x342c('0x2')](_0x19754f,_0x59a377);};}function removeListener(_0x587990,_0x349919){return function(){ChatWebsiteEvents[_0x342c('0x3')](_0x587990,_0x349919);};}exports[_0x342c('0x4')]=function(_0x48674f){for(var _0x37d271=0x0,_0x3637c0=events['length'];_0x37d271<_0x3637c0;_0x37d271++){var _0x5866a4=events[_0x37d271];var _0x5dd36e=createListener(_0x342c('0x5')+_0x5866a4,_0x48674f);ChatWebsiteEvents['on'](_0x5866a4,_0x5dd36e);}}; \ No newline at end of file diff --git a/server/api/chatWebsite/index.js b/server/api/chatWebsite/index.js index 5be1b7a..b313ff1 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 _0x2e9f=['post','create','addDisposition','addAnswer','diskStorage','join','root','server/files/images/logos/','%s-%s','originalname','/:id/logo','single','addLogo','server/files/images/avatars/','format','now','/:id/avatar','file','addAvatar','addSystemAvatar','/:id/notify','notify','ensureDir','replace','extname','/:id/offline','any','offline','addInteraction','addApplications','addProactiveActions','addAgents','put','update','delete','destroy','removeAnswers','/:id/users','exports','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/describe','describe','/:id','show','/:id/dispositions','getDispositions','/:id/canned_answers','getAnswers','getLogo','getAvatar','/:id/customer_avatar','getCustomerAvatar','/:id/system_avatar','getSystemAvatar','/:id/interactions','getInteractions','/:id/snippet','getSnippet','/:id/applications','getApplications','/:id/proactive_actions','/:id/fields','getFields','/:id/offline_messages','getOfflineMessages','getAgents'];(function(_0x503a7e,_0x564749){var _0x30c68c=function(_0x4a78f9){while(--_0x4a78f9){_0x503a7e['push'](_0x503a7e['shift']());}};_0x30c68c(++_0x564749);}(_0x2e9f,0x15b));var _0xf2e9=function(_0x5d2803,_0xf375bd){_0x5d2803=_0x5d2803-0x0;var _0xdcad2c=_0x2e9f[_0x5d2803];return _0xdcad2c;};'use strict';var multer=require(_0xf2e9('0x0'));var util=require(_0xf2e9('0x1'));var path=require(_0xf2e9('0x2'));var timeout=require(_0xf2e9('0x3'));var express=require('express');var router=express[_0xf2e9('0x4')]();var fs_extra=require(_0xf2e9('0x5'));var auth=require(_0xf2e9('0x6'));var interaction=require(_0xf2e9('0x7'));var config=require(_0xf2e9('0x8'));var controller=require('./chatWebsite.controller');router[_0xf2e9('0x9')]('/',auth[_0xf2e9('0xa')](),controller[_0xf2e9('0xb')]);router['get'](_0xf2e9('0xc'),auth[_0xf2e9('0xa')](),controller[_0xf2e9('0xd')]);router[_0xf2e9('0x9')](_0xf2e9('0xe'),auth[_0xf2e9('0xa')](),controller[_0xf2e9('0xf')]);router[_0xf2e9('0x9')](_0xf2e9('0x10'),auth[_0xf2e9('0xa')](),controller[_0xf2e9('0x11')]);router[_0xf2e9('0x9')](_0xf2e9('0x12'),auth[_0xf2e9('0xa')](),controller[_0xf2e9('0x13')]);router[_0xf2e9('0x9')]('/:id/logo',controller[_0xf2e9('0x14')]);router[_0xf2e9('0x9')]('/:id/avatar',controller[_0xf2e9('0x15')]);router['get'](_0xf2e9('0x16'),controller[_0xf2e9('0x17')]);router[_0xf2e9('0x9')](_0xf2e9('0x18'),controller[_0xf2e9('0x19')]);router[_0xf2e9('0x9')](_0xf2e9('0x1a'),auth[_0xf2e9('0xa')](),controller[_0xf2e9('0x1b')]);router['get'](_0xf2e9('0x1c'),controller[_0xf2e9('0x1d')]);router['get'](_0xf2e9('0x1e'),auth[_0xf2e9('0xa')](),controller[_0xf2e9('0x1f')]);router['get'](_0xf2e9('0x20'),auth[_0xf2e9('0xa')](),controller['getProactiveActions']);router[_0xf2e9('0x9')](_0xf2e9('0x21'),controller[_0xf2e9('0x22')]);router['get'](_0xf2e9('0x23'),auth[_0xf2e9('0xa')](),controller[_0xf2e9('0x24')]);router['get']('/:id/users',auth[_0xf2e9('0xa')](),controller[_0xf2e9('0x25')]);router[_0xf2e9('0x26')]('/',auth[_0xf2e9('0xa')](),controller[_0xf2e9('0x27')]);router['post'](_0xf2e9('0x10'),auth[_0xf2e9('0xa')](),controller[_0xf2e9('0x28')]);router['post'](_0xf2e9('0x12'),auth[_0xf2e9('0xa')](),controller[_0xf2e9('0x29')]);var upload=multer({'storage':multer[_0xf2e9('0x2a')]({'destination':function(_0x19db6d,_0x16c85b,_0x5af8bb){_0x5af8bb(null,path[_0xf2e9('0x2b')](config[_0xf2e9('0x2c')],_0xf2e9('0x2d')));},'filename':function(_0x3567cb,_0x46657c,_0x4118d6){_0x4118d6(null,util['format'](_0xf2e9('0x2e'),Date['now'](),_0x46657c[_0xf2e9('0x2f')]));}})});router['post'](_0xf2e9('0x30'),upload[_0xf2e9('0x31')]('file'),controller[_0xf2e9('0x32')]);var upload=multer({'storage':multer[_0xf2e9('0x2a')]({'destination':function(_0x26f424,_0x4091fe,_0xb48a5e){_0xb48a5e(null,path[_0xf2e9('0x2b')](config[_0xf2e9('0x2c')],_0xf2e9('0x33')));},'filename':function(_0x48c6ca,_0x1ac7f4,_0x2f1ec0){_0x2f1ec0(null,util[_0xf2e9('0x34')](_0xf2e9('0x2e'),Date[_0xf2e9('0x35')](),_0x1ac7f4[_0xf2e9('0x2f')]));}})});router[_0xf2e9('0x26')](_0xf2e9('0x36'),upload[_0xf2e9('0x31')](_0xf2e9('0x37')),controller[_0xf2e9('0x38')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x2552f7,_0x1d3259,_0x541446){_0x541446(null,path[_0xf2e9('0x2b')](config[_0xf2e9('0x2c')],_0xf2e9('0x33')));},'filename':function(_0x4c774f,_0x20fb66,_0xd29e10){_0xd29e10(null,util[_0xf2e9('0x34')](_0xf2e9('0x2e'),Date[_0xf2e9('0x35')](),_0x20fb66[_0xf2e9('0x2f')]));}})});router[_0xf2e9('0x26')](_0xf2e9('0x16'),upload[_0xf2e9('0x31')](_0xf2e9('0x37')),controller['addCustomerAvatar']);var upload=multer({'storage':multer[_0xf2e9('0x2a')]({'destination':function(_0x1cae39,_0x58d5ae,_0x28f781){_0x28f781(null,path[_0xf2e9('0x2b')](config[_0xf2e9('0x2c')],'server/files/images/avatars/'));},'filename':function(_0x192d8a,_0x559655,_0x28b7ed){_0x28b7ed(null,util[_0xf2e9('0x34')]('%s-%s',Date[_0xf2e9('0x35')](),_0x559655[_0xf2e9('0x2f')]));}})});router['post'](_0xf2e9('0x18'),upload[_0xf2e9('0x31')]('file'),controller[_0xf2e9('0x39')]);router['post'](_0xf2e9('0x3a'),controller[_0xf2e9('0x3b')]);const offlineUploadMulter=multer({'storage':multer[_0xf2e9('0x2a')]({'destination':function(_0x5699b1,_0x19282d,_0x6556da){const _0x21e5a2=path[_0xf2e9('0x2b')](config[_0xf2e9('0x2c')],'server/files','attachments','offline-chat');fs_extra[_0xf2e9('0x3c')](_0x21e5a2,function(){_0x6556da(null,_0x21e5a2);});},'filename':function(_0x82e6fa,_0x25bbd7,_0x427875){const _0x5e15d1=_0x25bbd7[_0xf2e9('0x2f')][_0xf2e9('0x3d')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');const _0x41e89a=path[_0xf2e9('0x3e')](_0x5e15d1);const _0x197456=Date[_0xf2e9('0x35')]()+'-'+_0x5e15d1[_0xf2e9('0x3d')](_0x41e89a,'')+_0x41e89a;_0x427875(null,_0x197456);}})});router[_0xf2e9('0x26')](_0xf2e9('0x3f'),offlineUploadMulter[_0xf2e9('0x40')](),controller[_0xf2e9('0x41')]);router[_0xf2e9('0x26')](_0xf2e9('0x1a'),auth['isAuthenticated'](),controller[_0xf2e9('0x42')]);router[_0xf2e9('0x26')](_0xf2e9('0x1e'),auth[_0xf2e9('0xa')](),controller[_0xf2e9('0x43')]);router[_0xf2e9('0x26')](_0xf2e9('0x20'),auth['isAuthenticated'](),controller[_0xf2e9('0x44')]);router['post']('/:id/users',auth[_0xf2e9('0xa')](),controller[_0xf2e9('0x45')]);router[_0xf2e9('0x46')]('/:id',auth[_0xf2e9('0xa')](),controller[_0xf2e9('0x47')]);router[_0xf2e9('0x48')]('/:id',auth[_0xf2e9('0xa')](),controller[_0xf2e9('0x49')]);router[_0xf2e9('0x48')]('/:id/dispositions',auth[_0xf2e9('0xa')](),controller['removeDispositions']);router['delete']('/:id/canned_answers',auth['isAuthenticated'](),controller[_0xf2e9('0x4a')]);router[_0xf2e9('0x48')](_0xf2e9('0x4b'),auth[_0xf2e9('0xa')](),controller['removeAgents']);module[_0xf2e9('0x4c')]=router; \ No newline at end of file +var _0xb4ee=['getFields','/:id/offline_messages','getOfflineMessages','/:id/users','getAgents','post','/:id/dispositions','addDisposition','addAnswer','root','format','now','single','file','addLogo','diskStorage','join','server/files/images/avatars/','/:id/avatar','addAvatar','%s-%s','originalname','/:id/customer_avatar','addCustomerAvatar','/:id/system_avatar','addSystemAvatar','server/files','attachments','offline-chat','replace','extname','/:id/offline','any','offline','/:id/interactions','addInteraction','addAgents','update','delete','destroy','removeAgents','exports','multer','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','./chatWebsite.controller','get','isAuthenticated','index','/describe','describe','/:id','getDispositions','/:id/canned_answers','getAnswers','/:id/logo','getLogo','getAvatar','getCustomerAvatar','getSystemAvatar','getInteractions','/:id/snippet','getSnippet','/:id/applications','/:id/proactive_actions','getProactiveActions','/:id/fields'];(function(_0x18c8a3,_0x2b2c86){var _0x2fe683=function(_0x4198fc){while(--_0x4198fc){_0x18c8a3['push'](_0x18c8a3['shift']());}};_0x2fe683(++_0x2b2c86);}(_0xb4ee,0x1da));var _0xeb4e=function(_0x6bb8ca,_0x1b4019){_0x6bb8ca=_0x6bb8ca-0x0;var _0x5f4bf5=_0xb4ee[_0x6bb8ca];return _0x5f4bf5;};'use strict';var multer=require(_0xeb4e('0x0'));var util=require(_0xeb4e('0x1'));var path=require('path');var timeout=require(_0xeb4e('0x2'));var express=require(_0xeb4e('0x3'));var router=express[_0xeb4e('0x4')]();var fs_extra=require(_0xeb4e('0x5'));var auth=require(_0xeb4e('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0xeb4e('0x7'));var controller=require(_0xeb4e('0x8'));router[_0xeb4e('0x9')]('/',auth[_0xeb4e('0xa')](),controller[_0xeb4e('0xb')]);router[_0xeb4e('0x9')](_0xeb4e('0xc'),auth['isAuthenticated'](),controller[_0xeb4e('0xd')]);router['get'](_0xeb4e('0xe'),auth[_0xeb4e('0xa')](),controller['show']);router[_0xeb4e('0x9')]('/:id/dispositions',auth[_0xeb4e('0xa')](),controller[_0xeb4e('0xf')]);router[_0xeb4e('0x9')](_0xeb4e('0x10'),auth[_0xeb4e('0xa')](),controller[_0xeb4e('0x11')]);router[_0xeb4e('0x9')](_0xeb4e('0x12'),controller[_0xeb4e('0x13')]);router[_0xeb4e('0x9')]('/:id/avatar',controller[_0xeb4e('0x14')]);router['get']('/:id/customer_avatar',controller[_0xeb4e('0x15')]);router[_0xeb4e('0x9')]('/:id/system_avatar',controller[_0xeb4e('0x16')]);router[_0xeb4e('0x9')]('/:id/interactions',auth[_0xeb4e('0xa')](),controller[_0xeb4e('0x17')]);router['get'](_0xeb4e('0x18'),controller[_0xeb4e('0x19')]);router[_0xeb4e('0x9')](_0xeb4e('0x1a'),auth[_0xeb4e('0xa')](),controller['getApplications']);router['get'](_0xeb4e('0x1b'),auth[_0xeb4e('0xa')](),controller[_0xeb4e('0x1c')]);router[_0xeb4e('0x9')](_0xeb4e('0x1d'),controller[_0xeb4e('0x1e')]);router[_0xeb4e('0x9')](_0xeb4e('0x1f'),auth[_0xeb4e('0xa')](),controller[_0xeb4e('0x20')]);router[_0xeb4e('0x9')](_0xeb4e('0x21'),auth[_0xeb4e('0xa')](),controller[_0xeb4e('0x22')]);router['post']('/',auth[_0xeb4e('0xa')](),controller['create']);router[_0xeb4e('0x23')](_0xeb4e('0x24'),auth[_0xeb4e('0xa')](),controller[_0xeb4e('0x25')]);router[_0xeb4e('0x23')](_0xeb4e('0x10'),auth['isAuthenticated'](),controller[_0xeb4e('0x26')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x33b830,_0x43e1ed,_0x55381c){_0x55381c(null,path['join'](config[_0xeb4e('0x27')],'server/files/images/logos/'));},'filename':function(_0x706784,_0xccb8f2,_0x187d56){_0x187d56(null,util[_0xeb4e('0x28')]('%s-%s',Date[_0xeb4e('0x29')](),_0xccb8f2['originalname']));}})});router['post'](_0xeb4e('0x12'),upload[_0xeb4e('0x2a')](_0xeb4e('0x2b')),controller[_0xeb4e('0x2c')]);var upload=multer({'storage':multer[_0xeb4e('0x2d')]({'destination':function(_0x1bdf52,_0x147aab,_0x5a66f3){_0x5a66f3(null,path[_0xeb4e('0x2e')](config['root'],_0xeb4e('0x2f')));},'filename':function(_0x5ec119,_0x57fe71,_0xd9ffbb){_0xd9ffbb(null,util[_0xeb4e('0x28')]('%s-%s',Date[_0xeb4e('0x29')](),_0x57fe71['originalname']));}})});router[_0xeb4e('0x23')](_0xeb4e('0x30'),upload[_0xeb4e('0x2a')](_0xeb4e('0x2b')),controller[_0xeb4e('0x31')]);var upload=multer({'storage':multer[_0xeb4e('0x2d')]({'destination':function(_0x3ccbcd,_0x7fc94c,_0x8a1e72){_0x8a1e72(null,path[_0xeb4e('0x2e')](config[_0xeb4e('0x27')],_0xeb4e('0x2f')));},'filename':function(_0x41630a,_0x1d967f,_0x18aff0){_0x18aff0(null,util[_0xeb4e('0x28')](_0xeb4e('0x32'),Date['now'](),_0x1d967f[_0xeb4e('0x33')]));}})});router[_0xeb4e('0x23')](_0xeb4e('0x34'),upload['single'](_0xeb4e('0x2b')),controller[_0xeb4e('0x35')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x346a2c,_0xd8f7fb,_0x580241){_0x580241(null,path[_0xeb4e('0x2e')](config[_0xeb4e('0x27')],'server/files/images/avatars/'));},'filename':function(_0x34e68a,_0x3cd65b,_0x579dd6){_0x579dd6(null,util[_0xeb4e('0x28')](_0xeb4e('0x32'),Date[_0xeb4e('0x29')](),_0x3cd65b[_0xeb4e('0x33')]));}})});router[_0xeb4e('0x23')](_0xeb4e('0x36'),upload['single']('file'),controller[_0xeb4e('0x37')]);router['post']('/:id/notify',controller['notify']);const offlineUploadMulter=multer({'storage':multer[_0xeb4e('0x2d')]({'destination':function(_0x215a89,_0x8e8e13,_0x3cda39){const _0x11dc0c=path['join'](config[_0xeb4e('0x27')],_0xeb4e('0x38'),_0xeb4e('0x39'),_0xeb4e('0x3a'));fs_extra['ensureDir'](_0x11dc0c,function(){_0x3cda39(null,_0x11dc0c);});},'filename':function(_0x59271b,_0x348526,_0x16b0a6){const _0xc1ca01=_0x348526[_0xeb4e('0x33')][_0xeb4e('0x3b')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');const _0x250493=path[_0xeb4e('0x3c')](_0xc1ca01);const _0x3419aa=Date[_0xeb4e('0x29')]()+'-'+_0xc1ca01[_0xeb4e('0x3b')](_0x250493,'')+_0x250493;_0x16b0a6(null,_0x3419aa);}})});router['post'](_0xeb4e('0x3d'),offlineUploadMulter[_0xeb4e('0x3e')](),controller[_0xeb4e('0x3f')]);router[_0xeb4e('0x23')](_0xeb4e('0x40'),auth[_0xeb4e('0xa')](),controller[_0xeb4e('0x41')]);router[_0xeb4e('0x23')](_0xeb4e('0x1a'),auth[_0xeb4e('0xa')](),controller['addApplications']);router['post']('/:id/proactive_actions',auth['isAuthenticated'](),controller['addProactiveActions']);router['post'](_0xeb4e('0x21'),auth[_0xeb4e('0xa')](),controller[_0xeb4e('0x42')]);router['put'](_0xeb4e('0xe'),auth['isAuthenticated'](),controller[_0xeb4e('0x43')]);router[_0xeb4e('0x44')](_0xeb4e('0xe'),auth[_0xeb4e('0xa')](),controller[_0xeb4e('0x45')]);router['delete'](_0xeb4e('0x24'),auth[_0xeb4e('0xa')](),controller['removeDispositions']);router[_0xeb4e('0x44')](_0xeb4e('0x10'),auth[_0xeb4e('0xa')](),controller['removeAnswers']);router[_0xeb4e('0x44')](_0xeb4e('0x21'),auth[_0xeb4e('0xa')](),controller[_0xeb4e('0x46')]);module[_0xeb4e('0x47')]=router; \ No newline at end of file diff --git a/server/api/cloudProvider/cloudProvider.attributes.js b/server/api/cloudProvider/cloudProvider.attributes.js index 28f1fce..b440560 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 _0xeda8=['Google','STRING','sequelize','exports','ENUM','AmazonAWS'];(function(_0x18dc26,_0x489662){var _0x210f4b=function(_0x7b7e1f){while(--_0x7b7e1f){_0x18dc26['push'](_0x18dc26['shift']());}};_0x210f4b(++_0x489662);}(_0xeda8,0x104));var _0x8eda=function(_0x20a308,_0x23c82e){_0x20a308=_0x20a308-0x0;var _0x23e3ec=_0xeda8[_0x20a308];return _0x23e3ec;};'use strict';var Sequelize=require(_0x8eda('0x0'));module[_0x8eda('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![],'validate':{'notEmpty':!![]}},'service':{'type':Sequelize[_0x8eda('0x2')](_0x8eda('0x3'),_0x8eda('0x4')),'allowNull':![],'validate':{'notEmpty':!![]}},'data1':{'type':Sequelize[_0x8eda('0x5')]},'data2':{'type':Sequelize[_0x8eda('0x5')]}}; \ No newline at end of file +var _0xf417=['STRING','ENUM','Google','exports'];(function(_0xac151d,_0x4ea1d2){var _0x111dba=function(_0x13d7f4){while(--_0x13d7f4){_0xac151d['push'](_0xac151d['shift']());}};_0x111dba(++_0x4ea1d2);}(_0xf417,0x8f));var _0x7f41=function(_0x564a24,_0x51212d){_0x564a24=_0x564a24-0x0;var _0x1f1cc0=_0xf417[_0x564a24];return _0x1f1cc0;};'use strict';var Sequelize=require('sequelize');module[_0x7f41('0x0')]={'name':{'type':Sequelize[_0x7f41('0x1')],'allowNull':![],'validate':{'notEmpty':!![]}},'service':{'type':Sequelize[_0x7f41('0x2')]('AmazonAWS',_0x7f41('0x3')),'allowNull':![],'validate':{'notEmpty':!![]}},'data1':{'type':Sequelize['STRING']},'data2':{'type':Sequelize['STRING']}}; \ No newline at end of file diff --git a/server/api/cloudProvider/cloudProvider.controller.js b/server/api/cloudProvider/cloudProvider.controller.js index 423c856..118809d 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 _0xdb28=['error','stack','name','send','index','CloudProvider','fieldName','type','key','map','query','keys','model','fields','attributes','length','nolimit','order','sort','filters','filter','where','VIRTUAL','merge','options','includeAll','findAll','rows','catch','show','params','rawAttributes','intersection','include','find','create','body','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','to-csv','ejs','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','status','end','json','offset','undefined','count','limit','set','apply','save','update','then','sendStatus'];(function(_0x4dfb69,_0x56703e){var _0xbd835c=function(_0x30130e){while(--_0x30130e){_0x4dfb69['push'](_0x4dfb69['shift']());}};_0xbd835c(++_0x56703e);}(_0xdb28,0x106));var _0x8db2=function(_0x5cc780,_0x3e39b4){_0x5cc780=_0x5cc780-0x0;var _0x1f8bba=_0xdb28[_0x5cc780];return _0x1f8bba;};'use strict';var emlformat=require(_0x8db2('0x0'));var rimraf=require(_0x8db2('0x1'));var zipdir=require(_0x8db2('0x2'));var jsonpatch=require(_0x8db2('0x3'));var rp=require('request-promise');var moment=require(_0x8db2('0x4'));var BPromise=require(_0x8db2('0x5'));var Mustache=require(_0x8db2('0x6'));var util=require(_0x8db2('0x7'));var path=require(_0x8db2('0x8'));var sox=require('sox');var csv=require(_0x8db2('0x9'));var ejs=require(_0x8db2('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x8db2('0xb'));var crypto=require(_0x8db2('0xc'));var jsforce=require(_0x8db2('0xd'));var deskjs=require(_0x8db2('0xe'));var toCsv=require(_0x8db2('0x9'));var querystring=require(_0x8db2('0xf'));var Papa=require(_0x8db2('0x10'));var Redis=require('ioredis');var authService=require(_0x8db2('0x11'));var qs=require(_0x8db2('0x12'));var as=require(_0x8db2('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x8db2('0x14'))(_0x8db2('0x15'));var utils=require('../../config/utils');var config=require(_0x8db2('0x16'));var licenseUtil=require(_0x8db2('0x17'));var db=require(_0x8db2('0x18'))['db'];function respondWithStatusCode(_0x204f49,_0x37d017){_0x37d017=_0x37d017||0xcc;return function(_0x559fb1){if(_0x559fb1){return _0x204f49['sendStatus'](_0x37d017);}return _0x204f49[_0x8db2('0x19')](_0x37d017)[_0x8db2('0x1a')]();};}function respondWithResult(_0x350d61,_0x1d6a15){_0x1d6a15=_0x1d6a15||0xc8;return function(_0x227355){if(_0x227355){return _0x350d61[_0x8db2('0x19')](_0x1d6a15)[_0x8db2('0x1b')](_0x227355);}};}function respondWithFilteredResult(_0x3c96a7,_0x131252){return function(_0x16c8c2){if(_0x16c8c2){var _0x5489a9=typeof _0x131252[_0x8db2('0x1c')]===_0x8db2('0x1d')&&typeof _0x131252['limit']===_0x8db2('0x1d');var _0x44957d=_0x16c8c2[_0x8db2('0x1e')];var _0x3fddc2=_0x5489a9?0x0:_0x131252[_0x8db2('0x1c')];var _0x46ce14=_0x5489a9?_0x16c8c2['count']:_0x131252['offset']+_0x131252[_0x8db2('0x1f')];var _0x104e33;if(_0x46ce14>=_0x44957d){_0x46ce14=_0x44957d;_0x104e33=0xc8;}else{_0x104e33=0xce;}_0x3c96a7[_0x8db2('0x19')](_0x104e33);return _0x3c96a7[_0x8db2('0x20')]('Content-Range',_0x3fddc2+'-'+_0x46ce14+'/'+_0x44957d)[_0x8db2('0x1b')](_0x16c8c2);}return null;};}function patchUpdates(_0x36a9ff){return function(_0x260940){try{jsonpatch[_0x8db2('0x21')](_0x260940,_0x36a9ff,!![]);}catch(_0x3dbe8e){return BPromise['reject'](_0x3dbe8e);}return _0x260940[_0x8db2('0x22')]();};}function saveUpdates(_0x3e30e6,_0x18f69c){return function(_0x125be2){if(_0x125be2){return _0x125be2[_0x8db2('0x23')](_0x3e30e6)[_0x8db2('0x24')](function(_0x796ec1){return _0x796ec1;});}return null;};}function removeEntity(_0x5c6614,_0x256202){return function(_0x4f6516){if(_0x4f6516){return _0x4f6516['destroy']()['then'](function(){_0x5c6614['status'](0xcc)[_0x8db2('0x1a')]();});}};}function handleEntityNotFound(_0x29b5cd,_0x3be281){return function(_0x2baed0){if(!_0x2baed0){_0x29b5cd[_0x8db2('0x25')](0x194);}return _0x2baed0;};}function handleError(_0x8d4f54,_0x58cd9d){_0x58cd9d=_0x58cd9d||0x1f4;return function(_0x3544ba){logger[_0x8db2('0x26')](_0x3544ba[_0x8db2('0x27')]);if(_0x3544ba[_0x8db2('0x28')]){delete _0x3544ba['name'];}_0x8d4f54[_0x8db2('0x19')](_0x58cd9d)[_0x8db2('0x29')](_0x3544ba);};}exports[_0x8db2('0x2a')]=function(_0x1687ed,_0xbe5ece){var _0x21bae5={},_0xa54ea3={},_0x3124d5={'count':0x0,'rows':[]};var _0xbc5366=_['map'](db[_0x8db2('0x2b')]['rawAttributes'],function(_0x59cb77){return{'name':_0x59cb77[_0x8db2('0x2c')],'type':_0x59cb77[_0x8db2('0x2d')][_0x8db2('0x2e')]};});_0xa54ea3['model']=_[_0x8db2('0x2f')](_0xbc5366,'name');_0xa54ea3[_0x8db2('0x30')]=_[_0x8db2('0x31')](_0x1687ed[_0x8db2('0x30')]);_0xa54ea3['filters']=_['intersection'](_0xa54ea3[_0x8db2('0x32')],_0xa54ea3[_0x8db2('0x30')]);_0x21bae5['attributes']=_['intersection'](_0xa54ea3[_0x8db2('0x32')],qs[_0x8db2('0x33')](_0x1687ed[_0x8db2('0x30')][_0x8db2('0x33')]));_0x21bae5[_0x8db2('0x34')]=_0x21bae5[_0x8db2('0x34')][_0x8db2('0x35')]?_0x21bae5[_0x8db2('0x34')]:_0xa54ea3[_0x8db2('0x32')];if(!_0x1687ed[_0x8db2('0x30')]['hasOwnProperty'](_0x8db2('0x36'))){_0x21bae5[_0x8db2('0x1f')]=qs['limit'](_0x1687ed[_0x8db2('0x30')][_0x8db2('0x1f')]);_0x21bae5['offset']=qs['offset'](_0x1687ed[_0x8db2('0x30')]['offset']);}_0x21bae5[_0x8db2('0x37')]=qs[_0x8db2('0x38')](_0x1687ed[_0x8db2('0x30')][_0x8db2('0x38')]);_0x21bae5['where']=qs[_0x8db2('0x39')](_['pick'](_0x1687ed[_0x8db2('0x30')],_0xa54ea3[_0x8db2('0x39')]),_0xbc5366);if(_0x1687ed[_0x8db2('0x30')][_0x8db2('0x3a')]){_0x21bae5['where']=_['merge'](_0x21bae5[_0x8db2('0x3b')],{'$or':_[_0x8db2('0x2f')](_0xbc5366,function(_0x5dc2b4){if(_0x5dc2b4[_0x8db2('0x2d')]!==_0x8db2('0x3c')){var _0x656dd2={};_0x656dd2[_0x5dc2b4['name']]={'$like':'%'+_0x1687ed[_0x8db2('0x30')][_0x8db2('0x3a')]+'%'};return _0x656dd2;}})});}_0x21bae5=_[_0x8db2('0x3d')]({},_0x21bae5,_0x1687ed[_0x8db2('0x3e')]);var _0x2e6f0c={'where':_0x21bae5[_0x8db2('0x3b')]};return db[_0x8db2('0x2b')][_0x8db2('0x1e')](_0x2e6f0c)[_0x8db2('0x24')](function(_0x63c561){_0x3124d5[_0x8db2('0x1e')]=_0x63c561;if(_0x1687ed[_0x8db2('0x30')][_0x8db2('0x3f')]){_0x21bae5['include']=[{'all':!![]}];}return db[_0x8db2('0x2b')][_0x8db2('0x40')](_0x21bae5);})['then'](function(_0x49a7ae){_0x3124d5[_0x8db2('0x41')]=_0x49a7ae;return _0x3124d5;})['then'](respondWithFilteredResult(_0xbe5ece,_0x21bae5))[_0x8db2('0x42')](handleError(_0xbe5ece,null));};exports[_0x8db2('0x43')]=function(_0x313130,_0x307783){var _0xb4fe2c={'raw':!![],'where':{'id':_0x313130[_0x8db2('0x44')]['id']}},_0x30d606={};_0x30d606['model']=_[_0x8db2('0x31')](db[_0x8db2('0x2b')][_0x8db2('0x45')]);_0x30d606[_0x8db2('0x30')]=_['keys'](_0x313130[_0x8db2('0x30')]);_0x30d606[_0x8db2('0x39')]=_[_0x8db2('0x46')](_0x30d606[_0x8db2('0x32')],_0x30d606['query']);_0xb4fe2c[_0x8db2('0x34')]=_['intersection'](_0x30d606[_0x8db2('0x32')],qs[_0x8db2('0x33')](_0x313130[_0x8db2('0x30')]['fields']));_0xb4fe2c['attributes']=_0xb4fe2c[_0x8db2('0x34')]['length']?_0xb4fe2c[_0x8db2('0x34')]:_0x30d606[_0x8db2('0x32')];if(_0x313130[_0x8db2('0x30')][_0x8db2('0x3f')]){_0xb4fe2c[_0x8db2('0x47')]=[{'all':!![]}];}_0xb4fe2c=_[_0x8db2('0x3d')]({},_0xb4fe2c,_0x313130[_0x8db2('0x3e')]);return db[_0x8db2('0x2b')][_0x8db2('0x48')](_0xb4fe2c)[_0x8db2('0x24')](handleEntityNotFound(_0x307783,null))[_0x8db2('0x24')](respondWithResult(_0x307783,null))[_0x8db2('0x42')](handleError(_0x307783,null));};exports['create']=function(_0x449109,_0x2ada52){return db[_0x8db2('0x2b')][_0x8db2('0x49')](_0x449109['body'],{})['then'](respondWithResult(_0x2ada52,0xc9))[_0x8db2('0x42')](handleError(_0x2ada52,null));};exports[_0x8db2('0x23')]=function(_0x164020,_0x4c66e5){if(_0x164020['body']['id']){delete _0x164020['body']['id'];}return db[_0x8db2('0x2b')][_0x8db2('0x48')]({'where':{'id':_0x164020[_0x8db2('0x44')]['id']}})[_0x8db2('0x24')](handleEntityNotFound(_0x4c66e5,null))[_0x8db2('0x24')](saveUpdates(_0x164020[_0x8db2('0x4a')],null))[_0x8db2('0x24')](respondWithResult(_0x4c66e5,null))['catch'](handleError(_0x4c66e5,null));};exports['destroy']=function(_0x3d29bc,_0x18c6ef){return db[_0x8db2('0x2b')][_0x8db2('0x48')]({'where':{'id':_0x3d29bc[_0x8db2('0x44')]['id']}})[_0x8db2('0x24')](handleEntityNotFound(_0x18c6ef,null))[_0x8db2('0x24')](removeEntity(_0x18c6ef,null))[_0x8db2('0x42')](handleError(_0x18c6ef,null));}; \ No newline at end of file +var _0x2ef3=['update','error','stack','name','send','map','rawAttributes','fieldName','type','key','model','query','filters','attributes','intersection','fields','length','hasOwnProperty','order','sort','where','pick','filter','merge','options','CloudProvider','then','includeAll','include','findAll','catch','show','params','keys','create','body','find','destroy','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','sox','to-csv','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save'];(function(_0x6923ea,_0x4b5785){var _0x37b5d1=function(_0x3dd161){while(--_0x3dd161){_0x6923ea['push'](_0x6923ea['shift']());}};_0x37b5d1(++_0x4b5785);}(_0x2ef3,0xba));var _0x32ef=function(_0x411d08,_0x6e4d25){_0x411d08=_0x411d08-0x0;var _0x4125ce=_0x2ef3[_0x411d08];return _0x4125ce;};'use strict';var emlformat=require(_0x32ef('0x0'));var rimraf=require(_0x32ef('0x1'));var zipdir=require(_0x32ef('0x2'));var jsonpatch=require(_0x32ef('0x3'));var rp=require(_0x32ef('0x4'));var moment=require(_0x32ef('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x32ef('0x6'));var util=require(_0x32ef('0x7'));var path=require('path');var sox=require(_0x32ef('0x8'));var csv=require(_0x32ef('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x32ef('0xa'));var squel=require(_0x32ef('0xb'));var crypto=require(_0x32ef('0xc'));var jsforce=require(_0x32ef('0xd'));var deskjs=require(_0x32ef('0xe'));var toCsv=require(_0x32ef('0x9'));var querystring=require(_0x32ef('0xf'));var Papa=require(_0x32ef('0x10'));var Redis=require(_0x32ef('0x11'));var authService=require(_0x32ef('0x12'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x32ef('0x13'));var logger=require(_0x32ef('0x14'))(_0x32ef('0x15'));var utils=require(_0x32ef('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0x32ef('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x1a5106,_0x49d590){_0x49d590=_0x49d590||0xcc;return function(_0x3e98df){if(_0x3e98df){return _0x1a5106[_0x32ef('0x18')](_0x49d590);}return _0x1a5106['status'](_0x49d590)['end']();};}function respondWithResult(_0x19ce1,_0x4d8009){_0x4d8009=_0x4d8009||0xc8;return function(_0x326fce){if(_0x326fce){return _0x19ce1[_0x32ef('0x19')](_0x4d8009)[_0x32ef('0x1a')](_0x326fce);}};}function respondWithFilteredResult(_0x54c7f5,_0x57aff1){return function(_0x55bf0b){if(_0x55bf0b){var _0x531e30=typeof _0x57aff1[_0x32ef('0x1b')]===_0x32ef('0x1c')&&typeof _0x57aff1[_0x32ef('0x1d')]==='undefined';var _0x5d559b=_0x55bf0b[_0x32ef('0x1e')];var _0x1a9476=_0x531e30?0x0:_0x57aff1[_0x32ef('0x1b')];var _0x57863c=_0x531e30?_0x55bf0b[_0x32ef('0x1e')]:_0x57aff1[_0x32ef('0x1b')]+_0x57aff1['limit'];var _0x304505;if(_0x57863c>=_0x5d559b){_0x57863c=_0x5d559b;_0x304505=0xc8;}else{_0x304505=0xce;}_0x54c7f5[_0x32ef('0x19')](_0x304505);return _0x54c7f5[_0x32ef('0x1f')](_0x32ef('0x20'),_0x1a9476+'-'+_0x57863c+'/'+_0x5d559b)[_0x32ef('0x1a')](_0x55bf0b);}return null;};}function patchUpdates(_0x3aec05){return function(_0x4de441){try{jsonpatch[_0x32ef('0x21')](_0x4de441,_0x3aec05,!![]);}catch(_0x5cc3ef){return BPromise[_0x32ef('0x22')](_0x5cc3ef);}return _0x4de441[_0x32ef('0x23')]();};}function saveUpdates(_0x49f2d8,_0x1af371){return function(_0x97780){if(_0x97780){return _0x97780[_0x32ef('0x24')](_0x49f2d8)['then'](function(_0x57f5e5){return _0x57f5e5;});}return null;};}function removeEntity(_0x22f2d7,_0xb30fab){return function(_0x225feb){if(_0x225feb){return _0x225feb['destroy']()['then'](function(){_0x22f2d7[_0x32ef('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0x51a412,_0x278495){return function(_0x14d4b3){if(!_0x14d4b3){_0x51a412[_0x32ef('0x18')](0x194);}return _0x14d4b3;};}function handleError(_0x1dbe98,_0x15ce54){_0x15ce54=_0x15ce54||0x1f4;return function(_0x234175){logger[_0x32ef('0x25')](_0x234175[_0x32ef('0x26')]);if(_0x234175[_0x32ef('0x27')]){delete _0x234175[_0x32ef('0x27')];}_0x1dbe98[_0x32ef('0x19')](_0x15ce54)[_0x32ef('0x28')](_0x234175);};}exports['index']=function(_0xd65fde,_0x2f5d06){var _0x5a04cd={},_0x12de1a={},_0x3c569d={'count':0x0,'rows':[]};var _0x30b250=_[_0x32ef('0x29')](db['CloudProvider'][_0x32ef('0x2a')],function(_0x22bf86){return{'name':_0x22bf86[_0x32ef('0x2b')],'type':_0x22bf86[_0x32ef('0x2c')][_0x32ef('0x2d')]};});_0x12de1a[_0x32ef('0x2e')]=_[_0x32ef('0x29')](_0x30b250,'name');_0x12de1a[_0x32ef('0x2f')]=_['keys'](_0xd65fde[_0x32ef('0x2f')]);_0x12de1a[_0x32ef('0x30')]=_['intersection'](_0x12de1a[_0x32ef('0x2e')],_0x12de1a[_0x32ef('0x2f')]);_0x5a04cd[_0x32ef('0x31')]=_[_0x32ef('0x32')](_0x12de1a[_0x32ef('0x2e')],qs['fields'](_0xd65fde['query'][_0x32ef('0x33')]));_0x5a04cd['attributes']=_0x5a04cd[_0x32ef('0x31')][_0x32ef('0x34')]?_0x5a04cd[_0x32ef('0x31')]:_0x12de1a[_0x32ef('0x2e')];if(!_0xd65fde[_0x32ef('0x2f')][_0x32ef('0x35')]('nolimit')){_0x5a04cd['limit']=qs['limit'](_0xd65fde[_0x32ef('0x2f')][_0x32ef('0x1d')]);_0x5a04cd[_0x32ef('0x1b')]=qs['offset'](_0xd65fde['query'][_0x32ef('0x1b')]);}_0x5a04cd[_0x32ef('0x36')]=qs[_0x32ef('0x37')](_0xd65fde['query']['sort']);_0x5a04cd[_0x32ef('0x38')]=qs[_0x32ef('0x30')](_[_0x32ef('0x39')](_0xd65fde[_0x32ef('0x2f')],_0x12de1a[_0x32ef('0x30')]),_0x30b250);if(_0xd65fde[_0x32ef('0x2f')][_0x32ef('0x3a')]){_0x5a04cd[_0x32ef('0x38')]=_[_0x32ef('0x3b')](_0x5a04cd['where'],{'$or':_[_0x32ef('0x29')](_0x30b250,function(_0x36e374){if(_0x36e374[_0x32ef('0x2c')]!=='VIRTUAL'){var _0x365125={};_0x365125[_0x36e374[_0x32ef('0x27')]]={'$like':'%'+_0xd65fde[_0x32ef('0x2f')][_0x32ef('0x3a')]+'%'};return _0x365125;}})});}_0x5a04cd=_[_0x32ef('0x3b')]({},_0x5a04cd,_0xd65fde[_0x32ef('0x3c')]);var _0x256c40={'where':_0x5a04cd[_0x32ef('0x38')]};return db[_0x32ef('0x3d')][_0x32ef('0x1e')](_0x256c40)[_0x32ef('0x3e')](function(_0x4615b4){_0x3c569d['count']=_0x4615b4;if(_0xd65fde[_0x32ef('0x2f')][_0x32ef('0x3f')]){_0x5a04cd[_0x32ef('0x40')]=[{'all':!![]}];}return db[_0x32ef('0x3d')][_0x32ef('0x41')](_0x5a04cd);})[_0x32ef('0x3e')](function(_0x3c0e44){_0x3c569d['rows']=_0x3c0e44;return _0x3c569d;})['then'](respondWithFilteredResult(_0x2f5d06,_0x5a04cd))[_0x32ef('0x42')](handleError(_0x2f5d06,null));};exports[_0x32ef('0x43')]=function(_0x2a33dd,_0x765c63){var _0x5dca14={'raw':!![],'where':{'id':_0x2a33dd[_0x32ef('0x44')]['id']}},_0x2901a1={};_0x2901a1['model']=_[_0x32ef('0x45')](db['CloudProvider'][_0x32ef('0x2a')]);_0x2901a1[_0x32ef('0x2f')]=_[_0x32ef('0x45')](_0x2a33dd[_0x32ef('0x2f')]);_0x2901a1[_0x32ef('0x30')]=_[_0x32ef('0x32')](_0x2901a1[_0x32ef('0x2e')],_0x2901a1[_0x32ef('0x2f')]);_0x5dca14[_0x32ef('0x31')]=_[_0x32ef('0x32')](_0x2901a1['model'],qs[_0x32ef('0x33')](_0x2a33dd['query'][_0x32ef('0x33')]));_0x5dca14[_0x32ef('0x31')]=_0x5dca14[_0x32ef('0x31')]['length']?_0x5dca14[_0x32ef('0x31')]:_0x2901a1[_0x32ef('0x2e')];if(_0x2a33dd[_0x32ef('0x2f')][_0x32ef('0x3f')]){_0x5dca14[_0x32ef('0x40')]=[{'all':!![]}];}_0x5dca14=_[_0x32ef('0x3b')]({},_0x5dca14,_0x2a33dd[_0x32ef('0x3c')]);return db['CloudProvider']['find'](_0x5dca14)[_0x32ef('0x3e')](handleEntityNotFound(_0x765c63,null))[_0x32ef('0x3e')](respondWithResult(_0x765c63,null))[_0x32ef('0x42')](handleError(_0x765c63,null));};exports[_0x32ef('0x46')]=function(_0x209361,_0xd67dc9){return db[_0x32ef('0x3d')][_0x32ef('0x46')](_0x209361[_0x32ef('0x47')],{})[_0x32ef('0x3e')](respondWithResult(_0xd67dc9,0xc9))[_0x32ef('0x42')](handleError(_0xd67dc9,null));};exports[_0x32ef('0x24')]=function(_0x36a65c,_0x4c2534){if(_0x36a65c[_0x32ef('0x47')]['id']){delete _0x36a65c[_0x32ef('0x47')]['id'];}return db[_0x32ef('0x3d')][_0x32ef('0x48')]({'where':{'id':_0x36a65c[_0x32ef('0x44')]['id']}})[_0x32ef('0x3e')](handleEntityNotFound(_0x4c2534,null))[_0x32ef('0x3e')](saveUpdates(_0x36a65c[_0x32ef('0x47')],null))[_0x32ef('0x3e')](respondWithResult(_0x4c2534,null))[_0x32ef('0x42')](handleError(_0x4c2534,null));};exports[_0x32ef('0x49')]=function(_0x29d456,_0x272377){return db[_0x32ef('0x3d')][_0x32ef('0x48')]({'where':{'id':_0x29d456[_0x32ef('0x44')]['id']}})[_0x32ef('0x3e')](handleEntityNotFound(_0x272377,null))[_0x32ef('0x3e')](removeEntity(_0x272377,null))['catch'](handleError(_0x272377,null));}; \ No newline at end of file diff --git a/server/api/cloudProvider/cloudProvider.model.js b/server/api/cloudProvider/cloudProvider.model.js index 28ecf9e..0f5530a 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 _0x8a2e=['../../config/logger','api','moment','request-promise','path','../../config/environment','./cloudProvider.attributes','exports','cloud_providers','lodash','util'];(function(_0x1ebe90,_0x5d29fc){var _0x447c82=function(_0x1c2646){while(--_0x1c2646){_0x1ebe90['push'](_0x1ebe90['shift']());}};_0x447c82(++_0x5d29fc);}(_0x8a2e,0x98));var _0xe8a2=function(_0x1b637d,_0x32a4bd){_0x1b637d=_0x1b637d-0x0;var _0x136015=_0x8a2e[_0x1b637d];return _0x136015;};'use strict';var _=require(_0xe8a2('0x0'));var util=require(_0xe8a2('0x1'));var logger=require(_0xe8a2('0x2'))(_0xe8a2('0x3'));var moment=require(_0xe8a2('0x4'));var BPromise=require('bluebird');var rp=require(_0xe8a2('0x5'));var fs=require('fs');var path=require(_0xe8a2('0x6'));var rimraf=require('rimraf');var config=require(_0xe8a2('0x7'));var attributes=require(_0xe8a2('0x8'));module[_0xe8a2('0x9')]=function(_0x5622a8,_0x360209){return _0x5622a8['define']('CloudProvider',attributes,{'tableName':_0xe8a2('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x4a70=['path','rimraf','exports','define','CloudProvider','cloud_providers','lodash','util','../../config/logger','moment','bluebird','request-promise'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x4a70,0x19e));var _0x04a7=function(_0x2261ce,_0x9ed8b6){_0x2261ce=_0x2261ce-0x0;var _0x524640=_0x4a70[_0x2261ce];return _0x524640;};'use strict';var _=require(_0x04a7('0x0'));var util=require(_0x04a7('0x1'));var logger=require(_0x04a7('0x2'))('api');var moment=require(_0x04a7('0x3'));var BPromise=require(_0x04a7('0x4'));var rp=require(_0x04a7('0x5'));var fs=require('fs');var path=require(_0x04a7('0x6'));var rimraf=require(_0x04a7('0x7'));var config=require('../../config/environment');var attributes=require('./cloudProvider.attributes');module[_0x04a7('0x8')]=function(_0x1f9823,_0x1e57d4){return _0x1f9823[_0x04a7('0x9')](_0x04a7('0xa'),attributes,{'tableName':_0x04a7('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/cloudProvider/cloudProvider.rpc.js b/server/api/cloudProvider/cloudProvider.rpc.js index 04bd3b4..3530e57 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 _0x86dc=['randomstring','ioredis','../../mysqldb','../../config/logger','../../config/environment','client','http','request','info','CloudProvider,\x20%s,\x20%s','debug','CloudProvider,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','catch','lodash','bluebird'];(function(_0x4733d3,_0x454290){var _0x1b9a44=function(_0x1a93bb){while(--_0x1a93bb){_0x4733d3['push'](_0x4733d3['shift']());}};_0x1b9a44(++_0x454290);}(_0x86dc,0x13e));var _0xc86d=function(_0x2494cc,_0x342c82){_0x2494cc=_0x2494cc-0x0;var _0x58e9ff=_0x86dc[_0x2494cc];return _0x58e9ff;};'use strict';var _=require(_0xc86d('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xc86d('0x1'));var rs=require(_0xc86d('0x2'));var fs=require('fs');var Redis=require(_0xc86d('0x3'));var db=require(_0xc86d('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xc86d('0x5'))('rpc');var config=require(_0xc86d('0x6'));var jayson=require('jayson/promise');var client=jayson[_0xc86d('0x7')][_0xc86d('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x21114c,_0x56ac0e,_0x17a2b6){return new BPromise(function(_0x59c9a9,_0x20ae2c){return client[_0xc86d('0x9')](_0x21114c,_0x17a2b6)['then'](function(_0x5078d8){logger[_0xc86d('0xa')](_0xc86d('0xb'),_0x56ac0e,'request\x20sent');logger[_0xc86d('0xc')](_0xc86d('0xd'),_0x56ac0e,_0xc86d('0xe'),JSON[_0xc86d('0xf')](_0x5078d8));if(_0x5078d8[_0xc86d('0x10')]){if(_0x5078d8[_0xc86d('0x10')][_0xc86d('0x11')]===0x1f4){logger[_0xc86d('0x10')](_0xc86d('0xb'),_0x56ac0e,_0x5078d8[_0xc86d('0x10')][_0xc86d('0x12')]);return _0x20ae2c(_0x5078d8[_0xc86d('0x10')][_0xc86d('0x12')]);}logger[_0xc86d('0x10')](_0xc86d('0xb'),_0x56ac0e,_0x5078d8[_0xc86d('0x10')][_0xc86d('0x12')]);return _0x59c9a9(_0x5078d8[_0xc86d('0x10')][_0xc86d('0x12')]);}else{logger[_0xc86d('0xa')](_0xc86d('0xb'),_0x56ac0e,'request\x20sent');_0x59c9a9(_0x5078d8['result']['message']);}})[_0xc86d('0x13')](function(_0x376a90){logger[_0xc86d('0x10')](_0xc86d('0xb'),_0x56ac0e,_0x376a90);_0x20ae2c(_0x376a90);});});} \ No newline at end of file +var _0xd290=['error','code','message','request\x20sent','catch','lodash','util','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then','info','CloudProvider,\x20%s,\x20%s','debug','CloudProvider,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x58425b,_0x25ce1d){var _0x3207dc=function(_0x511563){while(--_0x511563){_0x58425b['push'](_0x58425b['shift']());}};_0x3207dc(++_0x25ce1d);}(_0xd290,0x165));var _0x0d29=function(_0x5c51d5,_0x17d7fc){_0x5c51d5=_0x5c51d5-0x0;var _0x152ac9=_0xd290[_0x5c51d5];return _0x152ac9;};'use strict';var _=require(_0x0d29('0x0'));var util=require(_0x0d29('0x1'));var moment=require('moment');var BPromise=require(_0x0d29('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x0d29('0x3'))['db'];var utils=require(_0x0d29('0x4'));var logger=require(_0x0d29('0x5'))(_0x0d29('0x6'));var config=require(_0x0d29('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x0d29('0x8')][_0x0d29('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x151d32,_0x376d19,_0x276aeb){return new BPromise(function(_0x4edfcd,_0x3ee63c){return client[_0x0d29('0xa')](_0x151d32,_0x276aeb)[_0x0d29('0xb')](function(_0x4b876e){logger[_0x0d29('0xc')](_0x0d29('0xd'),_0x376d19,'request\x20sent');logger[_0x0d29('0xe')](_0x0d29('0xf'),_0x376d19,'request\x20sent',JSON[_0x0d29('0x10')](_0x4b876e));if(_0x4b876e['error']){if(_0x4b876e[_0x0d29('0x11')][_0x0d29('0x12')]===0x1f4){logger[_0x0d29('0x11')](_0x0d29('0xd'),_0x376d19,_0x4b876e[_0x0d29('0x11')]['message']);return _0x3ee63c(_0x4b876e[_0x0d29('0x11')][_0x0d29('0x13')]);}logger[_0x0d29('0x11')](_0x0d29('0xd'),_0x376d19,_0x4b876e[_0x0d29('0x11')]['message']);return _0x4edfcd(_0x4b876e['error']['message']);}else{logger[_0x0d29('0xc')]('CloudProvider,\x20%s,\x20%s',_0x376d19,_0x0d29('0x14'));_0x4edfcd(_0x4b876e['result'][_0x0d29('0x13')]);}})[_0x0d29('0x15')](function(_0x2a04d6){logger[_0x0d29('0x11')](_0x0d29('0xd'),_0x376d19,_0x2a04d6);_0x3ee63c(_0x2a04d6);});});} \ No newline at end of file diff --git a/server/api/cloudProvider/index.js b/server/api/cloudProvider/index.js index e638911..cafb73b 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 _0xada4=['isAuthenticated','create','put','/:id','update','delete','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','./cloudProvider.controller','get','index','show'];(function(_0x57b54c,_0x54ce0d){var _0x59cc19=function(_0xa33bc6){while(--_0xa33bc6){_0x57b54c['push'](_0x57b54c['shift']());}};_0x59cc19(++_0x54ce0d);}(_0xada4,0x1bc));var _0x4ada=function(_0x132487,_0x7a979e){_0x132487=_0x132487-0x0;var _0x4e995f=_0xada4[_0x132487];return _0x4e995f;};'use strict';var multer=require('multer');var util=require(_0x4ada('0x0'));var path=require(_0x4ada('0x1'));var timeout=require(_0x4ada('0x2'));var express=require(_0x4ada('0x3'));var router=express[_0x4ada('0x4')]();var fs_extra=require(_0x4ada('0x5'));var auth=require(_0x4ada('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x4ada('0x7'));var controller=require(_0x4ada('0x8'));router[_0x4ada('0x9')]('/',auth['isAuthenticated'](),controller[_0x4ada('0xa')]);router[_0x4ada('0x9')]('/:id',auth['isAuthenticated'](),controller[_0x4ada('0xb')]);router['post']('/',auth[_0x4ada('0xc')](),controller[_0x4ada('0xd')]);router[_0x4ada('0xe')](_0x4ada('0xf'),auth[_0x4ada('0xc')](),controller[_0x4ada('0x10')]);router[_0x4ada('0x11')]('/:id',auth[_0x4ada('0xc')](),controller['destroy']);module[_0x4ada('0x12')]=router; \ No newline at end of file +var _0xd86f=['get','isAuthenticated','index','create','put','/:id','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service'];(function(_0x5e24c7,_0x2caa23){var _0x59cc88=function(_0x133840){while(--_0x133840){_0x5e24c7['push'](_0x5e24c7['shift']());}};_0x59cc88(++_0x2caa23);}(_0xd86f,0x180));var _0xfd86=function(_0x209941,_0x5c9988){_0x209941=_0x209941-0x0;var _0x1e8729=_0xd86f[_0x209941];return _0x1e8729;};'use strict';var multer=require(_0xfd86('0x0'));var util=require(_0xfd86('0x1'));var path=require(_0xfd86('0x2'));var timeout=require(_0xfd86('0x3'));var express=require(_0xfd86('0x4'));var router=express[_0xfd86('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0xfd86('0x6'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require('./cloudProvider.controller');router[_0xfd86('0x7')]('/',auth[_0xfd86('0x8')](),controller[_0xfd86('0x9')]);router[_0xfd86('0x7')]('/:id',auth[_0xfd86('0x8')](),controller['show']);router['post']('/',auth[_0xfd86('0x8')](),controller[_0xfd86('0xa')]);router[_0xfd86('0xb')](_0xfd86('0xc'),auth['isAuthenticated'](),controller[_0xfd86('0xd')]);router[_0xfd86('0xe')]('/:id',auth[_0xfd86('0x8')](),controller[_0xfd86('0xf')]);module[_0xfd86('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 213620a..26b9bb7 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 _0x515e=['exports','STRING','name','sequelize'];(function(_0x3820bb,_0x3d03b5){var _0x5c7ec3=function(_0x24db00){while(--_0x24db00){_0x3820bb['push'](_0x3820bb['shift']());}};_0x5c7ec3(++_0x3d03b5);}(_0x515e,0xd3));var _0xe515=function(_0x312835,_0xff273e){_0x312835=_0x312835-0x0;var _0x1da8b9=_0x515e[_0x312835];return _0x1da8b9;};'use strict';var Sequelize=require(_0xe515('0x0'));module[_0xe515('0x1')]={'name':{'type':Sequelize[_0xe515('0x2')],'unique':_0xe515('0x3'),'allowNull':![],'validate':{'notEmpty':!![]}},'vat':{'type':Sequelize[_0xe515('0x2')]},'companyId':{'type':Sequelize[_0xe515('0x2')]},'website':{'type':Sequelize['STRING']},'phone':{'type':Sequelize[_0xe515('0x2')]},'fax':{'type':Sequelize[_0xe515('0x2')]},'type':{'type':Sequelize[_0xe515('0x2')]},'street':{'type':Sequelize[_0xe515('0x2')]},'postalCode':{'type':Sequelize[_0xe515('0x2')]},'city':{'type':Sequelize[_0xe515('0x2')]},'country':{'type':Sequelize[_0xe515('0x2')]},'email':{'type':Sequelize[_0xe515('0x2')],'validate':{'isEmail':!![]}},'emailDomain':{'type':Sequelize[_0xe515('0x2')]},'sStreet':{'type':Sequelize['STRING']},'sPostalCode':{'type':Sequelize[_0xe515('0x2')]},'sCity':{'type':Sequelize[_0xe515('0x2')]},'sCountry':{'type':Sequelize[_0xe515('0x2')]},'description':{'type':Sequelize[_0xe515('0x2')]}}; \ No newline at end of file +var _0x560e=['sequelize','exports','STRING','name'];(function(_0x5e69f0,_0x4d28f1){var _0x3e83a7=function(_0x4ca0cc){while(--_0x4ca0cc){_0x5e69f0['push'](_0x5e69f0['shift']());}};_0x3e83a7(++_0x4d28f1);}(_0x560e,0x1cc));var _0xe560=function(_0x2ec42,_0x4b0f37){_0x2ec42=_0x2ec42-0x0;var _0x5497ca=_0x560e[_0x2ec42];return _0x5497ca;};'use strict';var Sequelize=require(_0xe560('0x0'));module[_0xe560('0x1')]={'name':{'type':Sequelize[_0xe560('0x2')],'unique':_0xe560('0x3'),'allowNull':![],'validate':{'notEmpty':!![]}},'vat':{'type':Sequelize[_0xe560('0x2')]},'companyId':{'type':Sequelize[_0xe560('0x2')]},'website':{'type':Sequelize[_0xe560('0x2')]},'phone':{'type':Sequelize[_0xe560('0x2')]},'fax':{'type':Sequelize[_0xe560('0x2')]},'type':{'type':Sequelize['STRING']},'street':{'type':Sequelize[_0xe560('0x2')]},'postalCode':{'type':Sequelize[_0xe560('0x2')]},'city':{'type':Sequelize[_0xe560('0x2')]},'country':{'type':Sequelize['STRING']},'email':{'type':Sequelize[_0xe560('0x2')],'validate':{'isEmail':!![]}},'emailDomain':{'type':Sequelize[_0xe560('0x2')]},'sStreet':{'type':Sequelize['STRING']},'sPostalCode':{'type':Sequelize[_0xe560('0x2')]},'sCity':{'type':Sequelize[_0xe560('0x2')]},'sCountry':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0xe560('0x2')]}}; \ No newline at end of file diff --git a/server/api/cmCompany/cmCompany.controller.js b/server/api/cmCompany/cmCompany.controller.js index 2f16e3e..03f2b28 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 _0x17e5=['order','sort','where','filters','merge','map','filter','options','CmCompany','include','catch','show','params','rawAttributes','includeAll','find','create','body','role','user','UserProfileSection','autoAssociation','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','CmContact','addContacts','ids','omit','getContacts','findOne','hasOwnProperty','rimraf','fast-json-patch','request-promise','bluebird','mustache','util','fs-extra','lodash','squel','crypto','querystring','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','end','offset','undefined','limit','count','set','json','apply','reject','save','update','then','destroy','get','Companies','UserProfileResource','stack','name','index','describe','model','keys','query','attributes','intersection','fields','length','nolimit'];(function(_0x512558,_0xfb7e4f){var _0x4791f2=function(_0x174dad){while(--_0x174dad){_0x512558['push'](_0x512558['shift']());}};_0x4791f2(++_0xfb7e4f);}(_0x17e5,0x163));var _0x517e=function(_0x59cf92,_0x516e8f){_0x59cf92=_0x59cf92-0x0;var _0x57b0bd=_0x17e5[_0x59cf92];return _0x57b0bd;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x517e('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0x517e('0x1'));var rp=require(_0x517e('0x2'));var moment=require('moment');var BPromise=require(_0x517e('0x3'));var Mustache=require(_0x517e('0x4'));var util=require(_0x517e('0x5'));var path=require('path');var sox=require('sox');var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x517e('0x6'));var _=require(_0x517e('0x7'));var squel=require(_0x517e('0x8'));var crypto=require(_0x517e('0x9'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x517e('0xa'));var Papa=require(_0x517e('0xb'));var Redis=require('ioredis');var authService=require(_0x517e('0xc'));var qs=require('../../components/parsers/qs');var as=require(_0x517e('0xd'));var hardwareService=require(_0x517e('0xe'));var logger=require(_0x517e('0xf'))(_0x517e('0x10'));var utils=require(_0x517e('0x11'));var config=require(_0x517e('0x12'));var licenseUtil=require(_0x517e('0x13'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x57b742,_0x142efe){_0x142efe=_0x142efe||0xcc;return function(_0x131bf9){if(_0x131bf9){return _0x57b742[_0x517e('0x14')](_0x142efe);}return _0x57b742[_0x517e('0x15')](_0x142efe)[_0x517e('0x16')]();};}function respondWithResult(_0x489eb0,_0x4d8300){_0x4d8300=_0x4d8300||0xc8;return function(_0x577b7d){if(_0x577b7d){return _0x489eb0[_0x517e('0x15')](_0x4d8300)['json'](_0x577b7d);}};}function respondWithFilteredResult(_0x23ab06,_0x2b28b7){return function(_0x283e0c){if(_0x283e0c){var _0x1f66f8=typeof _0x2b28b7[_0x517e('0x17')]===_0x517e('0x18')&&typeof _0x2b28b7[_0x517e('0x19')]===_0x517e('0x18');var _0xfa5a1f=_0x283e0c[_0x517e('0x1a')];var _0x5c3a55=_0x1f66f8?0x0:_0x2b28b7['offset'];var _0x5b95ac=_0x1f66f8?_0x283e0c[_0x517e('0x1a')]:_0x2b28b7[_0x517e('0x17')]+_0x2b28b7[_0x517e('0x19')];var _0x3a2ae9;if(_0x5b95ac>=_0xfa5a1f){_0x5b95ac=_0xfa5a1f;_0x3a2ae9=0xc8;}else{_0x3a2ae9=0xce;}_0x23ab06[_0x517e('0x15')](_0x3a2ae9);return _0x23ab06[_0x517e('0x1b')]('Content-Range',_0x5c3a55+'-'+_0x5b95ac+'/'+_0xfa5a1f)[_0x517e('0x1c')](_0x283e0c);}return null;};}function patchUpdates(_0x10c847){return function(_0x7bd908){try{jsonpatch[_0x517e('0x1d')](_0x7bd908,_0x10c847,!![]);}catch(_0x2b69e7){return BPromise[_0x517e('0x1e')](_0x2b69e7);}return _0x7bd908[_0x517e('0x1f')]();};}function saveUpdates(_0x2fd563,_0x1dc19c){return function(_0x32f6d3){if(_0x32f6d3){return _0x32f6d3[_0x517e('0x20')](_0x2fd563)[_0x517e('0x21')](function(_0x3381a3){return _0x3381a3;});}return null;};}function removeEntity(_0x5e9c0d,_0x989954){return function(_0x58ec42){if(_0x58ec42){return _0x58ec42[_0x517e('0x22')]()['then'](function(){var _0x1d287b=_0x58ec42[_0x517e('0x23')]({'plain':!![]});var _0x4a510b=_0x517e('0x24');return db[_0x517e('0x25')][_0x517e('0x22')]({'where':{'type':_0x4a510b,'resourceId':_0x1d287b['id']}})[_0x517e('0x21')](function(){return _0x58ec42;});})[_0x517e('0x21')](function(){_0x5e9c0d['status'](0xcc)[_0x517e('0x16')]();});}};}function handleEntityNotFound(_0x3af570,_0x27af25){return function(_0x41e89b){if(!_0x41e89b){_0x3af570[_0x517e('0x14')](0x194);}return _0x41e89b;};}function handleError(_0x5d4c0a,_0x11c1c9){_0x11c1c9=_0x11c1c9||0x1f4;return function(_0x50d394){logger['error'](_0x50d394[_0x517e('0x26')]);if(_0x50d394[_0x517e('0x27')]){delete _0x50d394['name'];}_0x5d4c0a[_0x517e('0x15')](_0x11c1c9)['send'](_0x50d394);};}exports[_0x517e('0x28')]=function(_0x2c6988,_0x490e7e){var _0x1d7f18={},_0x20c995={},_0x1d0de9={'count':0x0,'rows':[]};return db['CmCompany'][_0x517e('0x29')]()[_0x517e('0x21')](function(_0x41200e){_0x20c995[_0x517e('0x2a')]=_[_0x517e('0x2b')](_0x41200e);_0x20c995[_0x517e('0x2c')]=_[_0x517e('0x2b')](_0x2c6988[_0x517e('0x2c')]);_0x20c995['filters']=_['intersection'](_0x20c995[_0x517e('0x2a')],_0x20c995[_0x517e('0x2c')]);_0x1d7f18[_0x517e('0x2d')]=_[_0x517e('0x2e')](_0x20c995[_0x517e('0x2a')],qs[_0x517e('0x2f')](_0x2c6988[_0x517e('0x2c')][_0x517e('0x2f')]));_0x1d7f18['attributes']=_0x1d7f18[_0x517e('0x2d')][_0x517e('0x30')]?_0x1d7f18[_0x517e('0x2d')]:_0x20c995[_0x517e('0x2a')];if(!_0x2c6988[_0x517e('0x2c')]['hasOwnProperty'](_0x517e('0x31'))){_0x1d7f18[_0x517e('0x19')]=qs[_0x517e('0x19')](_0x2c6988['query'][_0x517e('0x19')]);_0x1d7f18[_0x517e('0x17')]=qs[_0x517e('0x17')](_0x2c6988[_0x517e('0x2c')]['offset']);}_0x1d7f18[_0x517e('0x32')]=qs[_0x517e('0x33')](_0x2c6988[_0x517e('0x2c')]['sort']);_0x1d7f18[_0x517e('0x34')]=qs[_0x517e('0x35')](_['pick'](_0x2c6988[_0x517e('0x2c')],_0x20c995[_0x517e('0x35')]),_0x41200e);if(_0x2c6988[_0x517e('0x2c')]['filter']){_0x1d7f18[_0x517e('0x34')]=_[_0x517e('0x36')](_0x1d7f18[_0x517e('0x34')],{'$or':_[_0x517e('0x37')](_0x1d7f18['attributes'],function(_0xf9d9f1){var _0x5cfa5b={};_0x5cfa5b[_0xf9d9f1]={'$like':'%'+_0x2c6988[_0x517e('0x2c')][_0x517e('0x38')]+'%'};return _0x5cfa5b;})});}_0x1d7f18=_[_0x517e('0x36')]({},_0x1d7f18,_0x2c6988[_0x517e('0x39')]);var _0x1b97a3={'where':_0x1d7f18[_0x517e('0x34')]};return db[_0x517e('0x3a')][_0x517e('0x1a')](_0x1b97a3)[_0x517e('0x21')](function(_0x34a931){_0x1d0de9[_0x517e('0x1a')]=_0x34a931;if(_0x2c6988[_0x517e('0x2c')]['includeAll']){_0x1d7f18[_0x517e('0x3b')]=[{'all':!![]}];}return db[_0x517e('0x3a')]['findAll'](_0x1d7f18);})[_0x517e('0x21')](function(_0xe0f165){_0x1d0de9['rows']=_0xe0f165;return _0x1d0de9;})[_0x517e('0x21')](respondWithFilteredResult(_0x490e7e,_0x1d7f18))[_0x517e('0x3c')](handleError(_0x490e7e,null));})[_0x517e('0x3c')](handleError(_0x490e7e,null));};exports[_0x517e('0x3d')]=function(_0x59a638,_0x5cc628){var _0x29d816={'raw':![],'where':{'id':_0x59a638[_0x517e('0x3e')]['id']}},_0x2e1fd0={};_0x2e1fd0[_0x517e('0x2a')]=_[_0x517e('0x2b')](db['CmCompany'][_0x517e('0x3f')]);_0x2e1fd0[_0x517e('0x2c')]=_[_0x517e('0x2b')](_0x59a638[_0x517e('0x2c')]);_0x2e1fd0[_0x517e('0x35')]=_[_0x517e('0x2e')](_0x2e1fd0['model'],_0x2e1fd0[_0x517e('0x2c')]);_0x29d816[_0x517e('0x2d')]=_[_0x517e('0x2e')](_0x2e1fd0[_0x517e('0x2a')],qs['fields'](_0x59a638[_0x517e('0x2c')]['fields']));_0x29d816[_0x517e('0x2d')]=_0x29d816[_0x517e('0x2d')]['length']?_0x29d816[_0x517e('0x2d')]:_0x2e1fd0[_0x517e('0x2a')];if(_0x59a638[_0x517e('0x2c')][_0x517e('0x40')]){_0x29d816['include']=[{'all':!![]}];}_0x29d816=_[_0x517e('0x36')]({},_0x29d816,_0x59a638[_0x517e('0x39')]);return db[_0x517e('0x3a')][_0x517e('0x41')](_0x29d816)[_0x517e('0x21')](handleEntityNotFound(_0x5cc628,null))[_0x517e('0x21')](respondWithResult(_0x5cc628,null))['catch'](handleError(_0x5cc628,null));};exports[_0x517e('0x42')]=function(_0x4ac109,_0x1f5dda){return db[_0x517e('0x3a')][_0x517e('0x42')](_0x4ac109[_0x517e('0x43')],{})[_0x517e('0x21')](function(_0x4eabf2){var _0x5a467f=_0x4ac109['user']['get']({'plain':!![]});if(!_0x5a467f)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x5a467f[_0x517e('0x44')]===_0x517e('0x45')){var _0x48e415=_0x4eabf2[_0x517e('0x23')]({'plain':!![]});var _0x1209ed=_0x517e('0x24');return db[_0x517e('0x46')]['find']({'where':{'name':_0x1209ed,'userProfileId':_0x5a467f['userProfileId']},'raw':!![]})['then'](function(_0x1e1c2e){if(_0x1e1c2e&&_0x1e1c2e[_0x517e('0x47')]===0x0){return db[_0x517e('0x25')]['create']({'name':_0x48e415[_0x517e('0x27')],'resourceId':_0x48e415['id'],'type':_0x1e1c2e[_0x517e('0x27')],'sectionId':_0x1e1c2e['id']},{})[_0x517e('0x21')](function(){return _0x4eabf2;});}else{return _0x4eabf2;}})[_0x517e('0x3c')](function(_0x420959){logger[_0x517e('0x48')](_0x517e('0x49'),_0x420959);throw _0x420959;});}return _0x4eabf2;})[_0x517e('0x21')](respondWithResult(_0x1f5dda,0xc9))['catch'](handleError(_0x1f5dda,null));};exports[_0x517e('0x20')]=function(_0x13c3e6,_0x4b2177){if(_0x13c3e6[_0x517e('0x43')]['id']){delete _0x13c3e6[_0x517e('0x43')]['id'];}return db['CmCompany']['find']({'where':{'id':_0x13c3e6[_0x517e('0x3e')]['id']}})[_0x517e('0x21')](handleEntityNotFound(_0x4b2177,null))[_0x517e('0x21')](saveUpdates(_0x13c3e6[_0x517e('0x43')],null))['then'](respondWithResult(_0x4b2177,null))[_0x517e('0x3c')](handleError(_0x4b2177,null));};exports['destroy']=function(_0x2f8681,_0x1eb156){return db[_0x517e('0x3a')][_0x517e('0x41')]({'where':{'id':_0x2f8681[_0x517e('0x3e')]['id']}})['then'](handleEntityNotFound(_0x1eb156,null))['then'](removeEntity(_0x1eb156,null))[_0x517e('0x3c')](handleError(_0x1eb156,null));};exports[_0x517e('0x29')]=function(_0x4896ad,_0x30a41c){return db[_0x517e('0x3a')][_0x517e('0x29')]()[_0x517e('0x21')](respondWithResult(_0x30a41c,null))[_0x517e('0x3c')](handleError(_0x30a41c,null));};exports['addContacts']=function(_0x2a028e,_0x253029,_0x211aaa){return db[_0x517e('0x4a')][_0x517e('0x41')]({'where':{'id':_0x2a028e[_0x517e('0x3e')]['id']}})[_0x517e('0x21')](handleEntityNotFound(_0x253029,null))['then'](function(_0x20e251){if(_0x20e251){return _0x20e251[_0x517e('0x4b')](_0x2a028e[_0x517e('0x43')][_0x517e('0x4c')],_[_0x517e('0x4d')](_0x2a028e[_0x517e('0x43')],[_0x517e('0x4c'),'id'])||{});}})[_0x517e('0x21')](respondWithResult(_0x253029,null))[_0x517e('0x3c')](handleError(_0x253029,null));};exports[_0x517e('0x4e')]=function(_0x5b742d,_0xf90eb7,_0x9e3454){var _0x5a1210={};var _0xdee031={};var _0x1375d3;var _0x5aaced;return db[_0x517e('0x3a')][_0x517e('0x4f')]({'where':{'id':_0x5b742d[_0x517e('0x3e')]['id']}})[_0x517e('0x21')](handleEntityNotFound(_0xf90eb7,null))['then'](function(_0x282f5f){if(_0x282f5f){_0x1375d3=_0x282f5f;_0xdee031[_0x517e('0x2a')]=_['keys'](db[_0x517e('0x4a')][_0x517e('0x3f')]);_0xdee031[_0x517e('0x2c')]=_[_0x517e('0x2b')](_0x5b742d['query']);_0xdee031[_0x517e('0x35')]=_[_0x517e('0x2e')](_0xdee031[_0x517e('0x2a')],_0xdee031[_0x517e('0x2c')]);_0x5a1210[_0x517e('0x2d')]=_['intersection'](_0xdee031[_0x517e('0x2a')],qs[_0x517e('0x2f')](_0x5b742d['query'][_0x517e('0x2f')]));_0x5a1210['attributes']=_0x5a1210[_0x517e('0x2d')][_0x517e('0x30')]?_0x5a1210[_0x517e('0x2d')]:_0xdee031[_0x517e('0x2a')];_0x5a1210[_0x517e('0x32')]=qs[_0x517e('0x33')](_0x5b742d[_0x517e('0x2c')][_0x517e('0x33')]);_0x5a1210['where']=qs[_0x517e('0x35')](_['pick'](_0x5b742d[_0x517e('0x2c')],_0xdee031['filters']));if(_0x5b742d[_0x517e('0x2c')][_0x517e('0x38')]){_0x5a1210['where']=_[_0x517e('0x36')](_0x5a1210[_0x517e('0x34')],{'$or':_[_0x517e('0x37')](_0x5a1210[_0x517e('0x2d')],function(_0x13fe14){var _0x586a99={};_0x586a99[_0x13fe14]={'$like':'%'+_0x5b742d['query'][_0x517e('0x38')]+'%'};return _0x586a99;})});}_0x5a1210=_['merge']({},_0x5a1210,_0x5b742d[_0x517e('0x39')]);return _0x1375d3[_0x517e('0x4e')](_0x5a1210);}})[_0x517e('0x21')](function(_0x3e7aff){if(_0x3e7aff){_0x5aaced=_0x3e7aff[_0x517e('0x30')];if(!_0x5b742d[_0x517e('0x2c')][_0x517e('0x50')](_0x517e('0x31'))){_0x5a1210[_0x517e('0x19')]=qs[_0x517e('0x19')](_0x5b742d[_0x517e('0x2c')][_0x517e('0x19')]);_0x5a1210[_0x517e('0x17')]=qs['offset'](_0x5b742d[_0x517e('0x2c')][_0x517e('0x17')]);}return _0x1375d3['getContacts'](_0x5a1210);}})[_0x517e('0x21')](function(_0x262ce0){if(_0x262ce0){return _0x262ce0?{'count':_0x5aaced,'rows':_0x262ce0}:null;}})[_0x517e('0x21')](respondWithResult(_0xf90eb7,null))[_0x517e('0x3c')](handleError(_0xf90eb7,null));}; \ No newline at end of file +var _0x5120=['destroy','error','stack','name','send','index','CmCompany','describe','model','keys','query','intersection','fields','attributes','hasOwnProperty','order','sort','where','pick','filters','filter','merge','options','includeAll','include','findAll','catch','show','rawAttributes','length','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','CmContact','addContacts','ids','omit','getContacts','map','nolimit','eml-format','rimraf','fast-json-patch','request-promise','moment','mustache','path','sox','ejs','fs-extra','lodash','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','offset','limit','undefined','count','set','Content-Range','json','apply','reject','save','update','then','get','Companies'];(function(_0x1d3147,_0x26709d){var _0x14365c=function(_0x52cb62){while(--_0x52cb62){_0x1d3147['push'](_0x1d3147['shift']());}};_0x14365c(++_0x26709d);}(_0x5120,0x18a));var _0x0512=function(_0x215e5f,_0x321e4f){_0x215e5f=_0x215e5f-0x0;var _0x4ba505=_0x5120[_0x215e5f];return _0x4ba505;};'use strict';var emlformat=require(_0x0512('0x0'));var rimraf=require(_0x0512('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x0512('0x2'));var rp=require(_0x0512('0x3'));var moment=require(_0x0512('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x0512('0x5'));var util=require('util');var path=require(_0x0512('0x6'));var sox=require(_0x0512('0x7'));var csv=require('to-csv');var ejs=require(_0x0512('0x8'));var fs=require('fs');var fs_extra=require(_0x0512('0x9'));var _=require(_0x0512('0xa'));var squel=require('squel');var crypto=require(_0x0512('0xb'));var jsforce=require(_0x0512('0xc'));var deskjs=require(_0x0512('0xd'));var toCsv=require(_0x0512('0xe'));var querystring=require(_0x0512('0xf'));var Papa=require(_0x0512('0x10'));var Redis=require(_0x0512('0x11'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x0512('0x12'));var hardwareService=require(_0x0512('0x13'));var logger=require(_0x0512('0x14'))(_0x0512('0x15'));var utils=require(_0x0512('0x16'));var config=require(_0x0512('0x17'));var licenseUtil=require(_0x0512('0x18'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0xc406e9,_0x7e56ab){_0x7e56ab=_0x7e56ab||0xcc;return function(_0x167da4){if(_0x167da4){return _0xc406e9[_0x0512('0x19')](_0x7e56ab);}return _0xc406e9[_0x0512('0x1a')](_0x7e56ab)['end']();};}function respondWithResult(_0x475377,_0x204abe){_0x204abe=_0x204abe||0xc8;return function(_0x48a5e5){if(_0x48a5e5){return _0x475377[_0x0512('0x1a')](_0x204abe)['json'](_0x48a5e5);}};}function respondWithFilteredResult(_0x2601ac,_0x3726d2){return function(_0x456f02){if(_0x456f02){var _0x93e681=typeof _0x3726d2[_0x0512('0x1b')]==='undefined'&&typeof _0x3726d2[_0x0512('0x1c')]===_0x0512('0x1d');var _0x1e83da=_0x456f02[_0x0512('0x1e')];var _0x4e01fe=_0x93e681?0x0:_0x3726d2[_0x0512('0x1b')];var _0x5d71ae=_0x93e681?_0x456f02[_0x0512('0x1e')]:_0x3726d2['offset']+_0x3726d2['limit'];var _0x4077f7;if(_0x5d71ae>=_0x1e83da){_0x5d71ae=_0x1e83da;_0x4077f7=0xc8;}else{_0x4077f7=0xce;}_0x2601ac[_0x0512('0x1a')](_0x4077f7);return _0x2601ac[_0x0512('0x1f')](_0x0512('0x20'),_0x4e01fe+'-'+_0x5d71ae+'/'+_0x1e83da)[_0x0512('0x21')](_0x456f02);}return null;};}function patchUpdates(_0x4b75fe){return function(_0x3c5c62){try{jsonpatch[_0x0512('0x22')](_0x3c5c62,_0x4b75fe,!![]);}catch(_0x2b047b){return BPromise[_0x0512('0x23')](_0x2b047b);}return _0x3c5c62[_0x0512('0x24')]();};}function saveUpdates(_0x1b39b,_0x1793a4){return function(_0x12db62){if(_0x12db62){return _0x12db62[_0x0512('0x25')](_0x1b39b)[_0x0512('0x26')](function(_0x3b54a3){return _0x3b54a3;});}return null;};}function removeEntity(_0xdf5820,_0x186b5a){return function(_0x1bf0fd){if(_0x1bf0fd){return _0x1bf0fd['destroy']()[_0x0512('0x26')](function(){var _0x2cdd8a=_0x1bf0fd[_0x0512('0x27')]({'plain':!![]});var _0x5a0b5c=_0x0512('0x28');return db['UserProfileResource'][_0x0512('0x29')]({'where':{'type':_0x5a0b5c,'resourceId':_0x2cdd8a['id']}})['then'](function(){return _0x1bf0fd;});})[_0x0512('0x26')](function(){_0xdf5820[_0x0512('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x5e4ab7,_0x10f5b2){return function(_0x28f2e5){if(!_0x28f2e5){_0x5e4ab7['sendStatus'](0x194);}return _0x28f2e5;};}function handleError(_0x6b2bf,_0x165cce){_0x165cce=_0x165cce||0x1f4;return function(_0xed4c6d){logger[_0x0512('0x2a')](_0xed4c6d[_0x0512('0x2b')]);if(_0xed4c6d['name']){delete _0xed4c6d[_0x0512('0x2c')];}_0x6b2bf[_0x0512('0x1a')](_0x165cce)[_0x0512('0x2d')](_0xed4c6d);};}exports[_0x0512('0x2e')]=function(_0x36273c,_0x35fda9){var _0x4683ab={},_0x17b0fb={},_0x3b91b7={'count':0x0,'rows':[]};return db[_0x0512('0x2f')][_0x0512('0x30')]()[_0x0512('0x26')](function(_0x186f90){_0x17b0fb[_0x0512('0x31')]=_[_0x0512('0x32')](_0x186f90);_0x17b0fb[_0x0512('0x33')]=_[_0x0512('0x32')](_0x36273c[_0x0512('0x33')]);_0x17b0fb['filters']=_['intersection'](_0x17b0fb[_0x0512('0x31')],_0x17b0fb[_0x0512('0x33')]);_0x4683ab['attributes']=_[_0x0512('0x34')](_0x17b0fb[_0x0512('0x31')],qs[_0x0512('0x35')](_0x36273c[_0x0512('0x33')][_0x0512('0x35')]));_0x4683ab[_0x0512('0x36')]=_0x4683ab[_0x0512('0x36')]['length']?_0x4683ab['attributes']:_0x17b0fb[_0x0512('0x31')];if(!_0x36273c[_0x0512('0x33')][_0x0512('0x37')]('nolimit')){_0x4683ab[_0x0512('0x1c')]=qs['limit'](_0x36273c[_0x0512('0x33')][_0x0512('0x1c')]);_0x4683ab['offset']=qs[_0x0512('0x1b')](_0x36273c[_0x0512('0x33')][_0x0512('0x1b')]);}_0x4683ab[_0x0512('0x38')]=qs[_0x0512('0x39')](_0x36273c[_0x0512('0x33')][_0x0512('0x39')]);_0x4683ab[_0x0512('0x3a')]=qs['filters'](_[_0x0512('0x3b')](_0x36273c['query'],_0x17b0fb[_0x0512('0x3c')]),_0x186f90);if(_0x36273c[_0x0512('0x33')][_0x0512('0x3d')]){_0x4683ab[_0x0512('0x3a')]=_['merge'](_0x4683ab['where'],{'$or':_['map'](_0x4683ab['attributes'],function(_0x46e966){var _0x40d407={};_0x40d407[_0x46e966]={'$like':'%'+_0x36273c[_0x0512('0x33')][_0x0512('0x3d')]+'%'};return _0x40d407;})});}_0x4683ab=_[_0x0512('0x3e')]({},_0x4683ab,_0x36273c[_0x0512('0x3f')]);var _0x3bdc81={'where':_0x4683ab[_0x0512('0x3a')]};return db[_0x0512('0x2f')][_0x0512('0x1e')](_0x3bdc81)[_0x0512('0x26')](function(_0x2315a6){_0x3b91b7[_0x0512('0x1e')]=_0x2315a6;if(_0x36273c[_0x0512('0x33')][_0x0512('0x40')]){_0x4683ab[_0x0512('0x41')]=[{'all':!![]}];}return db[_0x0512('0x2f')][_0x0512('0x42')](_0x4683ab);})[_0x0512('0x26')](function(_0x240b43){_0x3b91b7['rows']=_0x240b43;return _0x3b91b7;})['then'](respondWithFilteredResult(_0x35fda9,_0x4683ab))['catch'](handleError(_0x35fda9,null));})[_0x0512('0x43')](handleError(_0x35fda9,null));};exports[_0x0512('0x44')]=function(_0x426802,_0x35556b){var _0x548336={'raw':![],'where':{'id':_0x426802['params']['id']}},_0x1a939c={};_0x1a939c[_0x0512('0x31')]=_[_0x0512('0x32')](db[_0x0512('0x2f')][_0x0512('0x45')]);_0x1a939c['query']=_[_0x0512('0x32')](_0x426802[_0x0512('0x33')]);_0x1a939c[_0x0512('0x3c')]=_[_0x0512('0x34')](_0x1a939c[_0x0512('0x31')],_0x1a939c[_0x0512('0x33')]);_0x548336[_0x0512('0x36')]=_['intersection'](_0x1a939c[_0x0512('0x31')],qs[_0x0512('0x35')](_0x426802[_0x0512('0x33')]['fields']));_0x548336[_0x0512('0x36')]=_0x548336['attributes'][_0x0512('0x46')]?_0x548336[_0x0512('0x36')]:_0x1a939c[_0x0512('0x31')];if(_0x426802[_0x0512('0x33')][_0x0512('0x40')]){_0x548336[_0x0512('0x41')]=[{'all':!![]}];}_0x548336=_[_0x0512('0x3e')]({},_0x548336,_0x426802['options']);return db['CmCompany'][_0x0512('0x47')](_0x548336)[_0x0512('0x26')](handleEntityNotFound(_0x35556b,null))['then'](respondWithResult(_0x35556b,null))[_0x0512('0x43')](handleError(_0x35556b,null));};exports[_0x0512('0x48')]=function(_0x18b68b,_0x10be23){return db[_0x0512('0x2f')][_0x0512('0x48')](_0x18b68b[_0x0512('0x49')],{})[_0x0512('0x26')](function(_0x28b414){var _0x41c0c3=_0x18b68b[_0x0512('0x4a')][_0x0512('0x27')]({'plain':!![]});if(!_0x41c0c3)throw new Error(_0x0512('0x4b'));if(_0x41c0c3['role']===_0x0512('0x4a')){var _0x422cac=_0x28b414[_0x0512('0x27')]({'plain':!![]});var _0x358c51=_0x0512('0x28');return db[_0x0512('0x4c')][_0x0512('0x47')]({'where':{'name':_0x358c51,'userProfileId':_0x41c0c3['userProfileId']},'raw':!![]})['then'](function(_0x3c246e){if(_0x3c246e&&_0x3c246e['autoAssociation']===0x0){return db[_0x0512('0x4d')]['create']({'name':_0x422cac[_0x0512('0x2c')],'resourceId':_0x422cac['id'],'type':_0x3c246e[_0x0512('0x2c')],'sectionId':_0x3c246e['id']},{})['then'](function(){return _0x28b414;});}else{return _0x28b414;}})[_0x0512('0x43')](function(_0x32d46c){logger[_0x0512('0x2a')](_0x0512('0x4e'),_0x32d46c);throw _0x32d46c;});}return _0x28b414;})[_0x0512('0x26')](respondWithResult(_0x10be23,0xc9))['catch'](handleError(_0x10be23,null));};exports['update']=function(_0x1b4833,_0x37416f){if(_0x1b4833[_0x0512('0x49')]['id']){delete _0x1b4833[_0x0512('0x49')]['id'];}return db['CmCompany'][_0x0512('0x47')]({'where':{'id':_0x1b4833[_0x0512('0x4f')]['id']}})[_0x0512('0x26')](handleEntityNotFound(_0x37416f,null))['then'](saveUpdates(_0x1b4833[_0x0512('0x49')],null))[_0x0512('0x26')](respondWithResult(_0x37416f,null))[_0x0512('0x43')](handleError(_0x37416f,null));};exports[_0x0512('0x29')]=function(_0x1a18e9,_0x3261c3){return db[_0x0512('0x2f')][_0x0512('0x47')]({'where':{'id':_0x1a18e9[_0x0512('0x4f')]['id']}})[_0x0512('0x26')](handleEntityNotFound(_0x3261c3,null))[_0x0512('0x26')](removeEntity(_0x3261c3,null))[_0x0512('0x43')](handleError(_0x3261c3,null));};exports[_0x0512('0x30')]=function(_0x422ea6,_0x5a0059){return db[_0x0512('0x2f')][_0x0512('0x30')]()[_0x0512('0x26')](respondWithResult(_0x5a0059,null))[_0x0512('0x43')](handleError(_0x5a0059,null));};exports['addContacts']=function(_0x387c7b,_0x20b6a0,_0x2067b0){return db[_0x0512('0x50')][_0x0512('0x47')]({'where':{'id':_0x387c7b[_0x0512('0x4f')]['id']}})[_0x0512('0x26')](handleEntityNotFound(_0x20b6a0,null))[_0x0512('0x26')](function(_0x26d3a5){if(_0x26d3a5){return _0x26d3a5[_0x0512('0x51')](_0x387c7b[_0x0512('0x49')][_0x0512('0x52')],_[_0x0512('0x53')](_0x387c7b[_0x0512('0x49')],[_0x0512('0x52'),'id'])||{});}})['then'](respondWithResult(_0x20b6a0,null))[_0x0512('0x43')](handleError(_0x20b6a0,null));};exports[_0x0512('0x54')]=function(_0x34b708,_0x49d21a,_0x2ad38f){var _0x3e23ac={};var _0x58840a={};var _0x491eb1;var _0x3f0d13;return db['CmCompany']['findOne']({'where':{'id':_0x34b708[_0x0512('0x4f')]['id']}})[_0x0512('0x26')](handleEntityNotFound(_0x49d21a,null))[_0x0512('0x26')](function(_0x17bd1b){if(_0x17bd1b){_0x491eb1=_0x17bd1b;_0x58840a[_0x0512('0x31')]=_[_0x0512('0x32')](db[_0x0512('0x50')][_0x0512('0x45')]);_0x58840a['query']=_[_0x0512('0x32')](_0x34b708[_0x0512('0x33')]);_0x58840a[_0x0512('0x3c')]=_['intersection'](_0x58840a[_0x0512('0x31')],_0x58840a['query']);_0x3e23ac[_0x0512('0x36')]=_[_0x0512('0x34')](_0x58840a[_0x0512('0x31')],qs[_0x0512('0x35')](_0x34b708['query'][_0x0512('0x35')]));_0x3e23ac['attributes']=_0x3e23ac[_0x0512('0x36')][_0x0512('0x46')]?_0x3e23ac[_0x0512('0x36')]:_0x58840a[_0x0512('0x31')];_0x3e23ac[_0x0512('0x38')]=qs[_0x0512('0x39')](_0x34b708['query'][_0x0512('0x39')]);_0x3e23ac[_0x0512('0x3a')]=qs[_0x0512('0x3c')](_[_0x0512('0x3b')](_0x34b708['query'],_0x58840a['filters']));if(_0x34b708[_0x0512('0x33')][_0x0512('0x3d')]){_0x3e23ac['where']=_[_0x0512('0x3e')](_0x3e23ac[_0x0512('0x3a')],{'$or':_[_0x0512('0x55')](_0x3e23ac[_0x0512('0x36')],function(_0x1d5d19){var _0x117992={};_0x117992[_0x1d5d19]={'$like':'%'+_0x34b708[_0x0512('0x33')]['filter']+'%'};return _0x117992;})});}_0x3e23ac=_['merge']({},_0x3e23ac,_0x34b708[_0x0512('0x3f')]);return _0x491eb1[_0x0512('0x54')](_0x3e23ac);}})['then'](function(_0x36be53){if(_0x36be53){_0x3f0d13=_0x36be53[_0x0512('0x46')];if(!_0x34b708['query'][_0x0512('0x37')](_0x0512('0x56'))){_0x3e23ac[_0x0512('0x1c')]=qs[_0x0512('0x1c')](_0x34b708[_0x0512('0x33')][_0x0512('0x1c')]);_0x3e23ac[_0x0512('0x1b')]=qs['offset'](_0x34b708[_0x0512('0x33')]['offset']);}return _0x491eb1[_0x0512('0x54')](_0x3e23ac);}})[_0x0512('0x26')](function(_0x14a897){if(_0x14a897){return _0x14a897?{'count':_0x3f0d13,'rows':_0x14a897}:null;}})['then'](respondWithResult(_0x49d21a,null))[_0x0512('0x43')](handleError(_0x49d21a,null));}; \ No newline at end of file diff --git a/server/api/cmCompany/cmCompany.model.js b/server/api/cmCompany/cmCompany.model.js index acb9646..1366b96 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 _0x64d8=['lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','exports','CmCompany','cm_companies'];(function(_0x24b2e3,_0x5c0a15){var _0x3b8628=function(_0x229eed){while(--_0x229eed){_0x24b2e3['push'](_0x24b2e3['shift']());}};_0x3b8628(++_0x5c0a15);}(_0x64d8,0x1a0));var _0x864d=function(_0x4490f4,_0x150e06){_0x4490f4=_0x4490f4-0x0;var _0x3e2a76=_0x64d8[_0x4490f4];return _0x3e2a76;};'use strict';var _=require(_0x864d('0x0'));var util=require(_0x864d('0x1'));var logger=require(_0x864d('0x2'))(_0x864d('0x3'));var moment=require(_0x864d('0x4'));var BPromise=require(_0x864d('0x5'));var rp=require(_0x864d('0x6'));var fs=require('fs');var path=require(_0x864d('0x7'));var rimraf=require(_0x864d('0x8'));var config=require(_0x864d('0x9'));var attributes=require('./cmCompany.attributes');module[_0x864d('0xa')]=function(_0x268eee,_0x165d66){return _0x268eee['define'](_0x864d('0xb'),attributes,{'tableName':_0x864d('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xd315=['util','../../config/logger','moment','bluebird','path','rimraf','../../config/environment','exports','CmCompany','cm_companies'];(function(_0x2964c9,_0x395033){var _0x37972e=function(_0x55a733){while(--_0x55a733){_0x2964c9['push'](_0x2964c9['shift']());}};_0x37972e(++_0x395033);}(_0xd315,0x1d6));var _0x5d31=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xd315[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require(_0x5d31('0x0'));var logger=require(_0x5d31('0x1'))('api');var moment=require(_0x5d31('0x2'));var BPromise=require(_0x5d31('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x5d31('0x4'));var rimraf=require(_0x5d31('0x5'));var config=require(_0x5d31('0x6'));var attributes=require('./cmCompany.attributes');module[_0x5d31('0x7')]=function(_0x148d15,_0x29ad8d){return _0x148d15['define'](_0x5d31('0x8'),attributes,{'tableName':_0x5d31('0x9'),'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 3c3bb3f..90e13c2 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 _0xcc15=['../../mysqldb','../../config/utils','../../config/environment','jayson/promise','client','http','request','then','info','debug','request\x20sent','error','code','CmCompany,\x20%s,\x20%s','message','result','catch','lodash','util','moment','bluebird','randomstring'];(function(_0x30c705,_0xe9cd72){var _0x45878a=function(_0x482571){while(--_0x482571){_0x30c705['push'](_0x30c705['shift']());}};_0x45878a(++_0xe9cd72);}(_0xcc15,0x171));var _0x5cc1=function(_0x5d6456,_0x58ecc7){_0x5d6456=_0x5d6456-0x0;var _0x4d66c1=_0xcc15[_0x5d6456];return _0x4d66c1;};'use strict';var _=require(_0x5cc1('0x0'));var util=require(_0x5cc1('0x1'));var moment=require(_0x5cc1('0x2'));var BPromise=require(_0x5cc1('0x3'));var rs=require(_0x5cc1('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x5cc1('0x5'))['db'];var utils=require(_0x5cc1('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0x5cc1('0x7'));var jayson=require(_0x5cc1('0x8'));var client=jayson[_0x5cc1('0x9')][_0x5cc1('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x64f5cc,_0x232f81,_0x23603a){return new BPromise(function(_0x259c51,_0x2356c4){return client[_0x5cc1('0xb')](_0x64f5cc,_0x23603a)[_0x5cc1('0xc')](function(_0x478d68){logger[_0x5cc1('0xd')]('CmCompany,\x20%s,\x20%s',_0x232f81,'request\x20sent');logger[_0x5cc1('0xe')]('CmCompany,\x20%s,\x20%s,\x20%s',_0x232f81,_0x5cc1('0xf'),JSON['stringify'](_0x478d68));if(_0x478d68['error']){if(_0x478d68[_0x5cc1('0x10')][_0x5cc1('0x11')]===0x1f4){logger[_0x5cc1('0x10')](_0x5cc1('0x12'),_0x232f81,_0x478d68[_0x5cc1('0x10')][_0x5cc1('0x13')]);return _0x2356c4(_0x478d68[_0x5cc1('0x10')]['message']);}logger[_0x5cc1('0x10')](_0x5cc1('0x12'),_0x232f81,_0x478d68[_0x5cc1('0x10')][_0x5cc1('0x13')]);return _0x259c51(_0x478d68[_0x5cc1('0x10')][_0x5cc1('0x13')]);}else{logger[_0x5cc1('0xd')]('CmCompany,\x20%s,\x20%s',_0x232f81,'request\x20sent');_0x259c51(_0x478d68[_0x5cc1('0x14')][_0x5cc1('0x13')]);}})[_0x5cc1('0x15')](function(_0x1ee544){logger['error'](_0x5cc1('0x12'),_0x232f81,_0x1ee544);_0x2356c4(_0x1ee544);});});} \ No newline at end of file +var _0xa532=['message','result','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','http','then','info','request\x20sent','CmCompany,\x20%s,\x20%s,\x20%s','error','CmCompany,\x20%s,\x20%s'];(function(_0x1aec2c,_0x46e47f){var _0x4ad327=function(_0xf99dcc){while(--_0xf99dcc){_0x1aec2c['push'](_0x1aec2c['shift']());}};_0x4ad327(++_0x46e47f);}(_0xa532,0x9a));var _0x2a53=function(_0x2b8e2c,_0x39fbd4){_0x2b8e2c=_0x2b8e2c-0x0;var _0x3124c6=_0xa532[_0x2b8e2c];return _0x3124c6;};'use strict';var _=require('lodash');var util=require(_0x2a53('0x0'));var moment=require(_0x2a53('0x1'));var BPromise=require(_0x2a53('0x2'));var rs=require(_0x2a53('0x3'));var fs=require('fs');var Redis=require(_0x2a53('0x4'));var db=require(_0x2a53('0x5'))['db'];var utils=require(_0x2a53('0x6'));var logger=require(_0x2a53('0x7'))('rpc');var config=require(_0x2a53('0x8'));var jayson=require(_0x2a53('0x9'));var client=jayson['client'][_0x2a53('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x295b6,_0x563e92,_0x1dbe8d){return new BPromise(function(_0x89dea0,_0x2f0d6a){return client['request'](_0x295b6,_0x1dbe8d)[_0x2a53('0xb')](function(_0x5b3801){logger[_0x2a53('0xc')]('CmCompany,\x20%s,\x20%s',_0x563e92,_0x2a53('0xd'));logger['debug'](_0x2a53('0xe'),_0x563e92,_0x2a53('0xd'),JSON['stringify'](_0x5b3801));if(_0x5b3801[_0x2a53('0xf')]){if(_0x5b3801['error']['code']===0x1f4){logger['error'](_0x2a53('0x10'),_0x563e92,_0x5b3801[_0x2a53('0xf')]['message']);return _0x2f0d6a(_0x5b3801[_0x2a53('0xf')][_0x2a53('0x11')]);}logger[_0x2a53('0xf')](_0x2a53('0x10'),_0x563e92,_0x5b3801['error'][_0x2a53('0x11')]);return _0x89dea0(_0x5b3801['error']['message']);}else{logger[_0x2a53('0xc')]('CmCompany,\x20%s,\x20%s',_0x563e92,_0x2a53('0xd'));_0x89dea0(_0x5b3801[_0x2a53('0x12')][_0x2a53('0x11')]);}})['catch'](function(_0x3cd310){logger[_0x2a53('0xf')](_0x2a53('0x10'),_0x563e92,_0x3cd310);_0x2f0d6a(_0x3cd310);});});} \ No newline at end of file diff --git a/server/api/cmCompany/index.js b/server/api/cmCompany/index.js index d59f476..fff6ace 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 _0xe0dc=['multer','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./cmCompany.controller','isAuthenticated','index','get','/describe','describe','/:id','show','/:id/contacts','getContacts','post','create','addContacts','put','update','delete','destroy','exports'];(function(_0x46698a,_0x8de1e4){var _0x356db0=function(_0x19e83c){while(--_0x19e83c){_0x46698a['push'](_0x46698a['shift']());}};_0x356db0(++_0x8de1e4);}(_0xe0dc,0x190));var _0xce0d=function(_0x3c0ee1,_0x3702ce){_0x3c0ee1=_0x3c0ee1-0x0;var _0x35d80f=_0xe0dc[_0x3c0ee1];return _0x35d80f;};'use strict';var multer=require(_0xce0d('0x0'));var util=require('util');var path=require(_0xce0d('0x1'));var timeout=require(_0xce0d('0x2'));var express=require('express');var router=express[_0xce0d('0x3')]();var fs_extra=require(_0xce0d('0x4'));var auth=require(_0xce0d('0x5'));var interaction=require(_0xce0d('0x6'));var config=require('../../config/environment');var controller=require(_0xce0d('0x7'));router['get']('/',auth[_0xce0d('0x8')](),controller[_0xce0d('0x9')]);router[_0xce0d('0xa')](_0xce0d('0xb'),auth[_0xce0d('0x8')](),controller[_0xce0d('0xc')]);router[_0xce0d('0xa')](_0xce0d('0xd'),auth[_0xce0d('0x8')](),controller[_0xce0d('0xe')]);router[_0xce0d('0xa')](_0xce0d('0xf'),auth[_0xce0d('0x8')](),controller[_0xce0d('0x10')]);router[_0xce0d('0x11')]('/',auth[_0xce0d('0x8')](),controller[_0xce0d('0x12')]);router[_0xce0d('0x11')](_0xce0d('0xf'),auth['isAuthenticated'](),controller[_0xce0d('0x13')]);router[_0xce0d('0x14')](_0xce0d('0xd'),auth[_0xce0d('0x8')](),controller[_0xce0d('0x15')]);router[_0xce0d('0x16')](_0xce0d('0xd'),auth[_0xce0d('0x8')](),controller[_0xce0d('0x17')]);module[_0xce0d('0x18')]=router; \ No newline at end of file +var _0x2295=['post','put','update','destroy','exports','multer','util','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','isAuthenticated','index','get','/:id','/:id/contacts','getContacts'];(function(_0x5ddb1c,_0x5ea4df){var _0x354adc=function(_0x2dfb1f){while(--_0x2dfb1f){_0x5ddb1c['push'](_0x5ddb1c['shift']());}};_0x354adc(++_0x5ea4df);}(_0x2295,0x16e));var _0x5229=function(_0x3699bb,_0x53dd8c){_0x3699bb=_0x3699bb-0x0;var _0x2b2f36=_0x2295[_0x3699bb];return _0x2b2f36;};'use strict';var multer=require(_0x5229('0x0'));var util=require(_0x5229('0x1'));var path=require('path');var timeout=require(_0x5229('0x2'));var express=require(_0x5229('0x3'));var router=express[_0x5229('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x5229('0x5'));var interaction=require(_0x5229('0x6'));var config=require(_0x5229('0x7'));var controller=require('./cmCompany.controller');router['get']('/',auth[_0x5229('0x8')](),controller[_0x5229('0x9')]);router['get']('/describe',auth[_0x5229('0x8')](),controller['describe']);router[_0x5229('0xa')](_0x5229('0xb'),auth[_0x5229('0x8')](),controller['show']);router['get'](_0x5229('0xc'),auth['isAuthenticated'](),controller[_0x5229('0xd')]);router[_0x5229('0xe')]('/',auth[_0x5229('0x8')](),controller['create']);router[_0x5229('0xe')]('/:id/contacts',auth[_0x5229('0x8')](),controller['addContacts']);router[_0x5229('0xf')](_0x5229('0xb'),auth[_0x5229('0x8')](),controller[_0x5229('0x10')]);router['delete'](_0x5229('0xb'),auth[_0x5229('0x8')](),controller[_0x5229('0x11')]);module[_0x5229('0x12')]=router; \ No newline at end of file diff --git a/server/api/cmContact/cmContact.attributes.js b/server/api/cmContact/cmContact.attributes.js index d697329..c5dc011 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 _0x6825=['lodash','exports','STRING','TEXT','INTEGER','UNSIGNED','DATE','NOW'];(function(_0x4823e2,_0xe74585){var _0x5dc63d=function(_0x29b425){while(--_0x29b425){_0x4823e2['push'](_0x4823e2['shift']());}};_0x5dc63d(++_0xe74585);}(_0x6825,0x1d8));var _0x5682=function(_0x4a07f1,_0x13eb1b){_0x4a07f1=_0x4a07f1-0x0;var _0x50c4c1=_0x6825[_0x4a07f1];return _0x50c4c1;};'use strict';var _=require(_0x5682('0x0'));var Sequelize=require('sequelize');module[_0x5682('0x1')]={'firstName':{'type':Sequelize[_0x5682('0x2')],'allowNull':![]},'lastName':{'type':Sequelize[_0x5682('0x2')]},'street':{'type':Sequelize[_0x5682('0x2')]},'postalCode':{'type':Sequelize[_0x5682('0x2')]},'city':{'type':Sequelize['STRING']},'country':{'type':Sequelize['STRING']},'dateOfBirth':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x5682('0x3')]},'phone':{'type':Sequelize['STRING']},'mobile':{'type':Sequelize[_0x5682('0x2')]},'fax':{'type':Sequelize[_0x5682('0x2')]},'email':{'type':Sequelize[_0x5682('0x2')]},'url':{'type':Sequelize[_0x5682('0x2')]},'facebook':{'type':Sequelize['STRING']},'fb_data':{'type':Sequelize[_0x5682('0x2')]},'twitter':{'type':Sequelize[_0x5682('0x2')]},'skype':{'type':Sequelize['STRING']},'teams':{'type':Sequelize[_0x5682('0x2')]},'viber':{'type':Sequelize[_0x5682('0x2')]},'line':{'type':Sequelize[_0x5682('0x2')]},'wechat':{'type':Sequelize[_0x5682('0x2')]},'telegram':{'type':Sequelize['STRING']},'UserId':{'type':Sequelize[_0x5682('0x4')]},'priority':{'type':Sequelize[_0x5682('0x4')](0x2)[_0x5682('0x5')],'defaultValue':0x2,'validate':{'min':0x0,'max':0x4}},'scheduledat':{'type':Sequelize[_0x5682('0x6')],'defaultValue':Sequelize[_0x5682('0x7')]}}; \ No newline at end of file +var _0xe0b6=['NOW','lodash','sequelize','STRING','TEXT','INTEGER','UNSIGNED','DATE'];(function(_0x3f1ada,_0x260a2b){var _0x3838a9=function(_0x480a8a){while(--_0x480a8a){_0x3f1ada['push'](_0x3f1ada['shift']());}};_0x3838a9(++_0x260a2b);}(_0xe0b6,0x121));var _0x6e0b=function(_0x45313f,_0x46caf4){_0x45313f=_0x45313f-0x0;var _0x402910=_0xe0b6[_0x45313f];return _0x402910;};'use strict';var _=require(_0x6e0b('0x0'));var Sequelize=require(_0x6e0b('0x1'));module['exports']={'firstName':{'type':Sequelize['STRING'],'allowNull':![]},'lastName':{'type':Sequelize['STRING']},'street':{'type':Sequelize['STRING']},'postalCode':{'type':Sequelize[_0x6e0b('0x2')]},'city':{'type':Sequelize[_0x6e0b('0x2')]},'country':{'type':Sequelize['STRING']},'dateOfBirth':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x6e0b('0x3')]},'phone':{'type':Sequelize[_0x6e0b('0x2')]},'mobile':{'type':Sequelize[_0x6e0b('0x2')]},'fax':{'type':Sequelize[_0x6e0b('0x2')]},'email':{'type':Sequelize[_0x6e0b('0x2')]},'url':{'type':Sequelize[_0x6e0b('0x2')]},'facebook':{'type':Sequelize['STRING']},'fb_data':{'type':Sequelize[_0x6e0b('0x2')]},'twitter':{'type':Sequelize[_0x6e0b('0x2')]},'skype':{'type':Sequelize[_0x6e0b('0x2')]},'teams':{'type':Sequelize[_0x6e0b('0x2')]},'viber':{'type':Sequelize[_0x6e0b('0x2')]},'line':{'type':Sequelize[_0x6e0b('0x2')]},'wechat':{'type':Sequelize[_0x6e0b('0x2')]},'telegram':{'type':Sequelize[_0x6e0b('0x2')]},'UserId':{'type':Sequelize[_0x6e0b('0x4')]},'priority':{'type':Sequelize['INTEGER'](0x2)[_0x6e0b('0x5')],'defaultValue':0x2,'validate':{'min':0x0,'max':0x4}},'scheduledat':{'type':Sequelize[_0x6e0b('0x6')],'defaultValue':Sequelize[_0x6e0b('0x7')]}}; \ No newline at end of file diff --git a/server/api/cmContact/cmContact.controller.js b/server/api/cmContact/cmContact.controller.js index 5c06e2a..5146b58 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 _0x8f89=['User','user','c.ListId\x20IS\x20NULL','role','ListId','sequelize','toString','keyBy','c.firstName','c.lastName','c.phone','c.mobile','c.fax','c.email','c.ListId','c.createdAt','c.deletedAt','c.CompanyId','TagIds','Tags','catch','CmContact','describe','tags','columnName','displayName','alias','custom','merge','body','findAll','get','info','[CmContact][merge]\x20to\x20%s\x20from\x20%s','CmHopper','[CmContact][merge][destroy][CmHopper],\x20%s','CmHopperBlack','[CmContact][merge][destroy][CmHopperBlack],\x20%s','create','ChatOfflineMessage','update','MailInteraction','MailMessage','SmsMessage','FaxMessage','OpenchannelInteraction','OpenchannelMessage','CmHopperFinal','CmHopperHistory','ReportAgentPreview','MailQueueReport','OpenchannelQueueReport','SmsQueueReport','JscriptySessionReport','WhatsappInteraction','bulkCreate','each','duplicates','$or','spread','show','params','$and','omit','cf_%d','pickBy','format','table','cm_contacts','setFields','toParam','phone','getTags','options','nolimit','setTags','ids','getHoppers','rawAttributes','ContactId','includeAll','include','rows','getHopperHistories','getHopperFinals','getJscriptySessions','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','zipObject','No\x20phone\x20column\x20specified','firstName','No\x20firstName\x20column\x20specified','join','server/files/tmp','file','0777','child_process','fork','../../components/import/cm/csv','CompanyId','File\x20uploaded\x20correctly!','upload','meta','import','binding','../../components/import/cm/csv2','stringify','message','pid','error\x20child\x20process','getJourney','mail','chat','sms','openchannel','fax','whatsapp','voice','-createdAt','resolve','includes','toLowerCase','channel','range','parse','isValid','Invalid\x20date\x20for\x20range\x20from\x20filter','Invalid\x20date\x20for\x20range\x20to\x20filter','Invalid\x20createdAt\x20filter','uniqueid','source','destination','callerid','endtime','duration','note','createdAt','userDisposition','userSecondDisposition','userThirdDisposition','UserId','fullname','VoiceCallReport','findAndCountAll','startCase','Account','closed','closedAt','thirdDisposition','key','browserName','customerIp','customerPort','deviceModel','osName','ratingValue','referer','subject','substatus','threadId','Interaction','Owner','flatten','reverse','slice','rimraf','zip-dir','fast-json-patch','request-promise','mustache','path','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','redis','localhost','sendStatus','status','end','json','offset','undefined','limit','count','Content-Range','apply','then','destroy','error','stack','name','send','index','length','keys','startsWith','cf_','push','CmCustomField','findOne','trimStart','all','type','model','query','filters','intersection','attributes','fields','hasOwnProperty','sort','where','pick','select','field','color','from','tools_tags','left_join','cm_user_has_contacts','uc.CmContactId\x20=\x20c.id','cm_contact_has_tags','ct.CmContactId\x20=\x20c.id','t.id\x20=\x20ct.TagId','c.deletedAt\x20IS\x20NULL','expr','search','parseSearch','conditions','find','Tag','value','split','map','forEach','union','uc.UserId\x20=\x20?','dateOfBirth','fieldType','castTo','DATE','text','start','filter','isNil','Contact','isEmpty','c.ListId\x20IN\x20?','concat','CONCAT_WS(\x27\x20\x27,\x20c.firstName,\x20c.lastName,\x20c.email)\x20LIKE\x20?','\x20=\x20?','tag','isArray','replace','MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','getFullTextValue','isNumeric','c.id\x20LIKE\x20?','c.phone\x20LIKE\x20?','c.mobile\x20LIKE\x20?','isEmail','c.email\x20LIKE\x20?','c.firstName\x20LIKE\x20?','c.lastName\x20LIKE\x20?','group','c.id','Sequelize','QueryTypes','SELECT','clone','order','DESC','t.id\x20IN\x20?','agent'];(function(_0x223ace,_0x28a4f1){var _0x599ef9=function(_0x58e15f){while(--_0x58e15f){_0x223ace['push'](_0x223ace['shift']());}};_0x599ef9(++_0x28a4f1);}(_0x8f89,0x1d2));var _0x98f8=function(_0xaf6602,_0x78a83d){_0xaf6602=_0xaf6602-0x0;var _0x5c11b3=_0x8f89[_0xaf6602];return _0x5c11b3;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x98f8('0x0'));var zipdir=require(_0x98f8('0x1'));var jsonpatch=require(_0x98f8('0x2'));var rp=require(_0x98f8('0x3'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x98f8('0x4'));var util=require('util');var path=require(_0x98f8('0x5'));var sox=require('sox');var csv=require(_0x98f8('0x6'));var ejs=require(_0x98f8('0x7'));var fs=require('fs');var fs_extra=require(_0x98f8('0x8'));var _=require(_0x98f8('0x9'));var squel=require(_0x98f8('0xa'));var crypto=require(_0x98f8('0xb'));var jsforce=require(_0x98f8('0xc'));var deskjs=require(_0x98f8('0xd'));var toCsv=require('to-csv');var querystring=require(_0x98f8('0xe'));var Papa=require(_0x98f8('0xf'));var Redis=require(_0x98f8('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x98f8('0x11'));var as=require(_0x98f8('0x12'));var hardwareService=require(_0x98f8('0x13'));var logger=require('../../config/logger')(_0x98f8('0x14'));var utils=require(_0x98f8('0x15'));var config=require(_0x98f8('0x16'));var licenseUtil=require('../../config/license/util');var db=require(_0x98f8('0x17'))['db'];config['redis']=_['defaults'](config[_0x98f8('0x18')],{'host':_0x98f8('0x19'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require('./cmContact.socket')['register'](socket);function respondWithStatusCode(_0x511914,_0x554f25){_0x554f25=_0x554f25||0xcc;return function(_0x26c081){if(_0x26c081){return _0x511914[_0x98f8('0x1a')](_0x554f25);}return _0x511914[_0x98f8('0x1b')](_0x554f25)[_0x98f8('0x1c')]();};}function respondWithResult(_0x2a1859,_0x6084d5){_0x6084d5=_0x6084d5||0xc8;return function(_0x2de631){if(_0x2de631){return _0x2a1859[_0x98f8('0x1b')](_0x6084d5)[_0x98f8('0x1d')](_0x2de631);}};}function respondWithFilteredResult(_0x52b09e,_0x59f450){return function(_0x424cf5){if(_0x424cf5){var _0x1d6892=typeof _0x59f450[_0x98f8('0x1e')]===_0x98f8('0x1f')&&typeof _0x59f450[_0x98f8('0x20')]===_0x98f8('0x1f');var _0x511408=_0x424cf5[_0x98f8('0x21')];var _0x1fae23=_0x1d6892?0x0:_0x59f450[_0x98f8('0x1e')];var _0x6a342b=_0x1d6892?_0x424cf5[_0x98f8('0x21')]:_0x59f450[_0x98f8('0x1e')]+_0x59f450[_0x98f8('0x20')];var _0x28a1f7;if(_0x6a342b>=_0x511408){_0x6a342b=_0x511408;_0x28a1f7=0xc8;}else{_0x28a1f7=0xce;}_0x52b09e['status'](_0x28a1f7);return _0x52b09e['set'](_0x98f8('0x22'),_0x1fae23+'-'+_0x6a342b+'/'+_0x511408)[_0x98f8('0x1d')](_0x424cf5);}return null;};}function patchUpdates(_0x1a8908){return function(_0x29e9a0){try{jsonpatch[_0x98f8('0x23')](_0x29e9a0,_0x1a8908,!![]);}catch(_0x24dc9d){return BPromise['reject'](_0x24dc9d);}return _0x29e9a0['save']();};}function saveUpdates(_0x5e48d7,_0x8a3683){return function(_0x1a8438){if(_0x1a8438){return _0x1a8438['update'](_0x5e48d7)[_0x98f8('0x24')](function(_0x298cee){return _0x298cee;});}return null;};}function removeEntity(_0x4e2377,_0x2b8688){return function(_0x58a717){if(_0x58a717){return _0x58a717[_0x98f8('0x25')]()[_0x98f8('0x24')](function(){_0x4e2377[_0x98f8('0x1b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x27e49d,_0x5a04ce){return function(_0x52d4d0){if(!_0x52d4d0){_0x27e49d[_0x98f8('0x1a')](0x194);}return _0x52d4d0;};}function handleError(_0x151571,_0x5d738f){_0x5d738f=_0x5d738f||0x1f4;return function(_0x5d8e83){logger[_0x98f8('0x26')](_0x5d8e83[_0x98f8('0x27')]);if(_0x5d8e83[_0x98f8('0x28')]){delete _0x5d8e83[_0x98f8('0x28')];}_0x151571[_0x98f8('0x1b')](_0x5d738f)[_0x98f8('0x29')](_0x5d8e83);};}exports[_0x98f8('0x2a')]=function(_0x50ac9e,_0xb519fe){var _0x527776={},_0xd8ef3f={},_0x3d2f37={'count':0x0,'rows':[]};return db['CmContact']['describe']()[_0x98f8('0x24')](function(_0x28e8b0){var _0x13be23=[];for(var _0x5659e6=0x0;_0x5659e60x1){_0x3cee22['or'](_0x98f8('0x68'),qs[_0x98f8('0x69')](_0x42c222),null);}else{if(qs[_0x98f8('0x6a')](_0x42c222)){_0x3cee22['or'](_0x98f8('0x6b'),_0x42c222+'%');_0x3cee22['or'](_0x98f8('0x6c'),_0x42c222+'%');_0x3cee22['or'](_0x98f8('0x6d'),_0x42c222+'%');_0x3cee22['or']('c.fax\x20LIKE\x20?',_0x42c222+'%');}else if(qs[_0x98f8('0x6e')](_0x42c222)){_0x3cee22['or'](_0x98f8('0x6f'),_0x42c222+'%');}else{_0x3cee22['or'](_0x98f8('0x70'),'%'+_0x42c222+'%');_0x3cee22['or'](_0x98f8('0x71'),'%'+_0x42c222+'%');_0x3cee22['or'](_0x98f8('0x6f'),'%'+_0x42c222+'%');}}}}_0x35c622[_0x98f8('0x3d')](_0x3cee22);_0x35c622[_0x98f8('0x72')](_0x98f8('0x73'));var _0x421a67={'type':db[_0x98f8('0x74')][_0x98f8('0x75')][_0x98f8('0x76')],'raw':!![]};var _0x58533f=_0x35c622[_0x98f8('0x77')]()[_0x98f8('0x40')](_0x98f8('0x73'));if(_0x527776[_0x98f8('0x78')]){_0x527776[_0x98f8('0x78')]['forEach'](function(_0x1a8e02){_0x35c622['order']('c.'+_0x1a8e02[0x0],_0x1a8e02[0x1]===_0x98f8('0x79')?![]:!![]);});}if(!_['isEmpty'](_0x139e70)){_0x35c622['having'](_0x621227);_0x58533f['where'](_0x98f8('0x7a'),_0x139e70);}BPromise['resolve']()[_0x98f8('0x24')](function(){if(!_0x4bab84)return;if(_0x50ac9e['user']['role']!==_0x98f8('0x7b'))return;if(!_['some'](_0x4bab84[_0x98f8('0x4e')],['field',_0x98f8('0x7c')])){return _0x50ac9e[_0x98f8('0x7d')]['getLists']({'attributes':['id'],'raw':!![]})[_0x98f8('0x24')](function(_0x61e0dc){if(_[_0x98f8('0x60')](_0x61e0dc)){_0x58533f[_0x98f8('0x3d')](_0x98f8('0x7e'));_0x35c622[_0x98f8('0x3d')](_0x98f8('0x7e'));}else{_0x58533f['where'](_0x98f8('0x61'),_[_0x98f8('0x53')](_0x61e0dc,'id'));_0x35c622['where'](_0x98f8('0x61'),_[_0x98f8('0x53')](_0x61e0dc,'id'));}});}})[_0x98f8('0x24')](function(){if(_0x50ac9e['user'][_0x98f8('0x7f')]===_0x98f8('0x7b')&&!_0x4bab84&&!_0x50ac9e[_0x98f8('0x36')][_0x98f8('0x80')])return[];return db[_0x98f8('0x81')][_0x98f8('0x36')](_0x58533f['toString'](),_0x421a67);})[_0x98f8('0x24')](function(_0x5a06c1){_0x3d2f37[_0x98f8('0x21')]=_0x5a06c1[_0x98f8('0x2b')];if(_0x3d2f37[_0x98f8('0x21')]===0x0)return[];return db[_0x98f8('0x81')]['query'](_0x1d489e[_0x98f8('0x82')](),_0x421a67)['then'](function(_0x72470b){_0x322f9f=_[_0x98f8('0x83')](_0x72470b,'id');_0x421a67=_['merge'](_0x421a67,{'model':db['CmContact'],'mapToModel':!![],'raw':!![],'nest':!![]});if(_0x50ac9e[_0x98f8('0x36')][_0x98f8('0x3a')]){_0x527776[_0x98f8('0x39')]['forEach'](function(_0x1cb153){_0x35c622[_0x98f8('0x40')]('c.'+_0x1cb153);});}else{_0x35c622[_0x98f8('0x40')](_0x98f8('0x73'));_0x35c622['field'](_0x98f8('0x84'));_0x35c622[_0x98f8('0x40')](_0x98f8('0x85'));_0x35c622[_0x98f8('0x40')](_0x98f8('0x86'));_0x35c622[_0x98f8('0x40')](_0x98f8('0x87'));_0x35c622[_0x98f8('0x40')](_0x98f8('0x88'));_0x35c622['field'](_0x98f8('0x89'));_0x35c622['field'](_0x98f8('0x8a'));_0x35c622[_0x98f8('0x40')](_0x98f8('0x8b'));_0x35c622[_0x98f8('0x40')](_0x98f8('0x8c'));_0x35c622[_0x98f8('0x40')](_0x98f8('0x8d'));_0x35c622['field']('GROUP_CONCAT(DISTINCT\x20t.id)',_0x98f8('0x8e'));}if(_0x527776[_0x98f8('0x20')])_0x35c622['limit'](_0x527776[_0x98f8('0x20')]);if(_0x527776[_0x98f8('0x1e')])_0x35c622[_0x98f8('0x1e')](_0x527776[_0x98f8('0x1e')]);return db[_0x98f8('0x81')][_0x98f8('0x36')](_0x35c622['toString'](),_0x421a67);});})[_0x98f8('0x24')](function(_0x5520e7){_0x5520e7[_0x98f8('0x54')](function(_0x290a73){if(_0x290a73[_0x98f8('0x8e')]){_0x290a73[_0x98f8('0x8f')]=[];_0x290a73[_0x98f8('0x8e')][_0x98f8('0x52')](',')[_0x98f8('0x54')](function(_0x5769d5){_0x290a73['Tags'][_0x98f8('0x2f')](_0x322f9f[_0x5769d5]);});}delete _0x290a73[_0x98f8('0x8e')];});_0x3d2f37['rows']=_0x5520e7;return _0x3d2f37;})['then'](respondWithFilteredResult(_0xb519fe,_0x527776));})[_0x98f8('0x90')](handleError(_0xb519fe,null));};exports['destroy']=function(_0x5b06b5,_0x1a1af1){return db[_0x98f8('0x91')][_0x98f8('0x4f')]({'where':{'id':_0x5b06b5['params']['id']}})[_0x98f8('0x24')](handleEntityNotFound(_0x1a1af1,null))['then'](removeEntity(_0x1a1af1,null))[_0x98f8('0x90')](handleError(_0x1a1af1,null));};exports[_0x98f8('0x92')]=function(_0x4d1ccf,_0x3ff5d9){return db['CmContact'][_0x98f8('0x92')]()['then'](function(_0x173aad){delete _0x173aad[_0x98f8('0x93')];for(var _0x3b74e9=0x0;_0x3b74e9=_0xe98f53){_0x5a6572=_0xe98f53;_0x22dc60=0xc8;}else{_0x22dc60=0xce;}_0x4cdbff['status'](_0x22dc60);return _0x4cdbff[_0xd803('0x20')](_0xd803('0x21'),_0x573858+'-'+_0x5a6572+'/'+_0xe98f53)[_0xd803('0x1c')](_0x171103);}return null;};}function patchUpdates(_0x444629){return function(_0x8775b3){try{jsonpatch[_0xd803('0x22')](_0x8775b3,_0x444629,!![]);}catch(_0x2fcc36){return BPromise[_0xd803('0x23')](_0x2fcc36);}return _0x8775b3['save']();};}function saveUpdates(_0x1fc41b,_0x54f48f){return function(_0x4d8e8f){if(_0x4d8e8f){return _0x4d8e8f[_0xd803('0x24')](_0x1fc41b)[_0xd803('0x25')](function(_0x48d431){return _0x48d431;});}return null;};}function removeEntity(_0x160580,_0x441d30){return function(_0xb3cf3d){if(_0xb3cf3d){return _0xb3cf3d[_0xd803('0x26')]()[_0xd803('0x25')](function(){_0x160580[_0xd803('0x27')](0xcc)[_0xd803('0x1b')]();});}};}function handleEntityNotFound(_0x128a56,_0x135a66){return function(_0x3d4062){if(!_0x3d4062){_0x128a56[_0xd803('0x1a')](0x194);}return _0x3d4062;};}function handleError(_0x55464c,_0x62430c){_0x62430c=_0x62430c||0x1f4;return function(_0x533a93){logger['error'](_0x533a93[_0xd803('0x28')]);if(_0x533a93[_0xd803('0x29')]){delete _0x533a93[_0xd803('0x29')];}_0x55464c[_0xd803('0x27')](_0x62430c)[_0xd803('0x2a')](_0x533a93);};}exports[_0xd803('0x2b')]=function(_0x3c7fdc,_0x40a6c3){var _0x30c8c5={},_0x372fac={},_0x327652={'count':0x0,'rows':[]};return db[_0xd803('0x2c')]['describe']()[_0xd803('0x25')](function(_0x2c5027){var _0x1ff62b=[];for(var _0x55bcaf=0x0;_0x55bcaf0x1){_0x3fc4d2['or'](_0xd803('0x6a'),qs[_0xd803('0x6b')](_0x93ea5),null);}else{if(qs[_0xd803('0x6c')](_0x93ea5)){_0x3fc4d2['or']('c.id\x20LIKE\x20?',_0x93ea5+'%');_0x3fc4d2['or'](_0xd803('0x6d'),_0x93ea5+'%');_0x3fc4d2['or'](_0xd803('0x6e'),_0x93ea5+'%');_0x3fc4d2['or'](_0xd803('0x6f'),_0x93ea5+'%');}else if(qs[_0xd803('0x70')](_0x93ea5)){_0x3fc4d2['or']('c.email\x20LIKE\x20?',_0x93ea5+'%');}else{_0x3fc4d2['or'](_0xd803('0x71'),'%'+_0x93ea5+'%');_0x3fc4d2['or'](_0xd803('0x72'),'%'+_0x93ea5+'%');_0x3fc4d2['or'](_0xd803('0x73'),'%'+_0x93ea5+'%');}}}}_0x36a443[_0xd803('0x41')](_0x3fc4d2);_0x36a443['group'](_0xd803('0x74'));var _0x1f3900={'type':db[_0xd803('0x75')][_0xd803('0x76')][_0xd803('0x77')],'raw':!![]};var _0xc41d30=_0x36a443[_0xd803('0x78')]()[_0xd803('0x42')]('c.id');if(_0x30c8c5[_0xd803('0x3f')]){_0x30c8c5[_0xd803('0x3f')][_0xd803('0x5f')](function(_0x419f9b){_0x36a443[_0xd803('0x3f')]('c.'+_0x419f9b[0x0],_0x419f9b[0x1]==='DESC'?![]:!![]);});}if(!_[_0xd803('0x5e')](_0x478904)){_0x36a443[_0xd803('0x79')](_0x419d3f);_0xc41d30['where'](_0xd803('0x7a'),_0x478904);}BPromise['resolve']()['then'](function(){if(!_0xa40372)return;if(_0x3c7fdc[_0xd803('0x7b')]['role']!==_0xd803('0x7c'))return;if(!_['some'](_0xa40372[_0xd803('0x4e')],[_0xd803('0x42'),_0xd803('0x53')])){return _0x3c7fdc[_0xd803('0x7b')][_0xd803('0x7d')]({'attributes':['id'],'raw':!![]})[_0xd803('0x25')](function(_0x350838){if(_['isEmpty'](_0x350838)){_0xc41d30[_0xd803('0x41')]('c.ListId\x20IS\x20NULL');_0x36a443[_0xd803('0x41')](_0xd803('0x7e'));}else{_0xc41d30[_0xd803('0x41')]('c.ListId\x20IN\x20?',_[_0xd803('0x51')](_0x350838,'id'));_0x36a443[_0xd803('0x41')]('c.ListId\x20IN\x20?',_[_0xd803('0x51')](_0x350838,'id'));}});}})[_0xd803('0x25')](function(){if(_0x3c7fdc['user'][_0xd803('0x7f')]===_0xd803('0x7c')&&!_0xa40372&&!_0x3c7fdc[_0xd803('0x38')][_0xd803('0x60')])return[];return db[_0xd803('0x80')][_0xd803('0x38')](_0xc41d30['toString'](),_0x1f3900);})[_0xd803('0x25')](function(_0x46b968){_0x327652[_0xd803('0x81')]=_0x46b968[_0xd803('0x2e')];if(_0x327652[_0xd803('0x81')]===0x0)return[];return db[_0xd803('0x80')][_0xd803('0x38')](_0x218f62[_0xd803('0x82')](),_0x1f3900)['then'](function(_0x521608){_0x2fff06=_[_0xd803('0x83')](_0x521608,'id');_0x1f3900=_['merge'](_0x1f3900,{'model':db[_0xd803('0x2c')],'mapToModel':!![],'raw':!![],'nest':!![]});if(_0x3c7fdc[_0xd803('0x38')]['fields']){_0x30c8c5[_0xd803('0x3a')][_0xd803('0x5f')](function(_0xa9ec){_0x36a443['field']('c.'+_0xa9ec);});}else{_0x36a443[_0xd803('0x42')](_0xd803('0x74'));_0x36a443[_0xd803('0x42')](_0xd803('0x84'));_0x36a443[_0xd803('0x42')](_0xd803('0x85'));_0x36a443[_0xd803('0x42')](_0xd803('0x86'));_0x36a443[_0xd803('0x42')](_0xd803('0x87'));_0x36a443[_0xd803('0x42')](_0xd803('0x88'));_0x36a443[_0xd803('0x42')](_0xd803('0x89'));_0x36a443[_0xd803('0x42')](_0xd803('0x8a'));_0x36a443['field'](_0xd803('0x8b'));_0x36a443['field'](_0xd803('0x8c'));_0x36a443[_0xd803('0x42')](_0xd803('0x8d'));_0x36a443[_0xd803('0x42')](_0xd803('0x8e'),_0xd803('0x8f'));}if(_0x30c8c5[_0xd803('0x1e')])_0x36a443[_0xd803('0x1e')](_0x30c8c5[_0xd803('0x1e')]);if(_0x30c8c5['offset'])_0x36a443[_0xd803('0x1d')](_0x30c8c5[_0xd803('0x1d')]);return db[_0xd803('0x80')][_0xd803('0x38')](_0x36a443[_0xd803('0x82')](),_0x1f3900);});})[_0xd803('0x25')](function(_0x1ff196){_0x1ff196[_0xd803('0x5f')](function(_0x53b6c2){if(_0x53b6c2[_0xd803('0x8f')]){_0x53b6c2[_0xd803('0x90')]=[];_0x53b6c2[_0xd803('0x8f')][_0xd803('0x50')](',')[_0xd803('0x5f')](function(_0x4f287f){_0x53b6c2[_0xd803('0x90')][_0xd803('0x31')](_0x2fff06[_0x4f287f]);});}delete _0x53b6c2[_0xd803('0x8f')];});_0x327652[_0xd803('0x91')]=_0x1ff196;return _0x327652;})[_0xd803('0x25')](respondWithFilteredResult(_0x40a6c3,_0x30c8c5));})[_0xd803('0x92')](handleError(_0x40a6c3,null));};exports[_0xd803('0x26')]=function(_0x103e6d,_0x1175c3){return db[_0xd803('0x2c')][_0xd803('0x93')]({'where':{'id':_0x103e6d[_0xd803('0x94')]['id']}})[_0xd803('0x25')](handleEntityNotFound(_0x1175c3,null))[_0xd803('0x25')](removeEntity(_0x1175c3,null))['catch'](handleError(_0x1175c3,null));};exports[_0xd803('0x95')]=function(_0x5d5c51,_0x53505f){return db[_0xd803('0x2c')][_0xd803('0x95')]()[_0xd803('0x25')](function(_0x115cea){delete _0x115cea[_0xd803('0x96')];for(var _0x3bb27d=0x0;_0x3bb27d{}\s\\|]/g,'-');_0x2ca14(null,util['format'](_0x372b('0x22'),path[_0x372b('0x23')](_0x259f87[_0x372b('0x21')],path[_0x372b('0x24')](_0x259f87[_0x372b('0x21')])),Date[_0x372b('0x25')](),path[_0x372b('0x24')](_0x259f87[_0x372b('0x21')])));}})});router[_0x372b('0x18')]('/csv',upload[_0x372b('0x26')](_0x372b('0x27')),controller[_0x372b('0x28')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x20c5f2,_0x32bbe8,_0xcae6dc){_0xcae6dc(null,path['join'](config[_0x372b('0x20')],_0x372b('0x29')));},'filename':function(_0x340351,_0x74bcc1,_0xbe8a1b){_0x74bcc1[_0x372b('0x21')]=_0x74bcc1[_0x372b('0x21')][_0x372b('0x2a')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0xbe8a1b(null,util[_0x372b('0x2b')]('%s-%s%s',path[_0x372b('0x23')](_0x74bcc1[_0x372b('0x21')],path['extname'](_0x74bcc1[_0x372b('0x21')])),Date[_0x372b('0x25')](),path[_0x372b('0x24')](_0x74bcc1[_0x372b('0x21')])));}})});router['post'](_0x372b('0x2c'),upload['single']('file'),controller[_0x372b('0x2d')]);router['post'](_0x372b('0x2e'),auth[_0x372b('0x6')](),controller[_0x372b('0x2f')]);router[_0x372b('0x30')](_0x372b('0xb'),auth[_0x372b('0x6')](),controller['update']);router[_0x372b('0x31')](_0x372b('0xb'),auth[_0x372b('0x6')](),controller['destroy']);module[_0x372b('0x32')]=router; \ No newline at end of file +var _0x1ce3=['put','delete','destroy','exports','multer','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./cmContact.controller','isAuthenticated','get','/describe','describe','/:id','show','/:id/tags','getTags','/:id/hoppers','/:id/hopper_histories','getHopperHistories','/:id/hopper_finals','getHopperFinals','/:id/jscripty_sessions','getJscriptySessions','/:id/journey','getJourney','/merge','merge','post','create','/create_many','bulkCreate','setTags','diskStorage','join','root','server/files/tmp','originalname','replace','basename','extname','single','file','uploadCsv','format','%s-%s%s','now','/upload','upload','/upload/:id','import'];(function(_0x46ed3a,_0x35b0b3){var _0x3caeb8=function(_0x46d704){while(--_0x46d704){_0x46ed3a['push'](_0x46ed3a['shift']());}};_0x3caeb8(++_0x35b0b3);}(_0x1ce3,0x1f3));var _0x31ce=function(_0x3c3855,_0x5562d0){_0x3c3855=_0x3c3855-0x0;var _0x53ba40=_0x1ce3[_0x3c3855];return _0x53ba40;};'use strict';var multer=require(_0x31ce('0x0'));var util=require(_0x31ce('0x1'));var path=require('path');var timeout=require(_0x31ce('0x2'));var express=require(_0x31ce('0x3'));var router=express[_0x31ce('0x4')]();var fs_extra=require(_0x31ce('0x5'));var auth=require(_0x31ce('0x6'));var interaction=require(_0x31ce('0x7'));var config=require('../../config/environment');var controller=require(_0x31ce('0x8'));router['get']('/',auth[_0x31ce('0x9')](),controller['index']);router[_0x31ce('0xa')](_0x31ce('0xb'),auth['isAuthenticated'](),controller[_0x31ce('0xc')]);router[_0x31ce('0xa')](_0x31ce('0xd'),auth[_0x31ce('0x9')](),controller[_0x31ce('0xe')]);router[_0x31ce('0xa')](_0x31ce('0xf'),auth[_0x31ce('0x9')](),controller[_0x31ce('0x10')]);router['get'](_0x31ce('0x11'),auth[_0x31ce('0x9')](),controller['getHoppers']);router[_0x31ce('0xa')](_0x31ce('0x12'),auth[_0x31ce('0x9')](),controller[_0x31ce('0x13')]);router['get'](_0x31ce('0x14'),auth[_0x31ce('0x9')](),controller[_0x31ce('0x15')]);router[_0x31ce('0xa')](_0x31ce('0x16'),auth[_0x31ce('0x9')](),controller[_0x31ce('0x17')]);router['get'](_0x31ce('0x18'),auth[_0x31ce('0x9')](),controller[_0x31ce('0x19')]);router['post'](_0x31ce('0x1a'),auth[_0x31ce('0x9')](),controller[_0x31ce('0x1b')]);router[_0x31ce('0x1c')]('/',auth[_0x31ce('0x9')](),controller[_0x31ce('0x1d')]);router[_0x31ce('0x1c')](_0x31ce('0x1e'),auth[_0x31ce('0x9')](),controller[_0x31ce('0x1f')]);router['post'](_0x31ce('0xf'),auth['isAuthenticated'](),controller[_0x31ce('0x20')]);var upload=multer({'storage':multer[_0x31ce('0x21')]({'destination':function(_0x4d8c23,_0x4c6e7c,_0x25e8a8){_0x25e8a8(null,path[_0x31ce('0x22')](config[_0x31ce('0x23')],_0x31ce('0x24')));},'filename':function(_0x278af9,_0x4f96b8,_0x1d7a0c){_0x4f96b8['originalname']=_0x4f96b8[_0x31ce('0x25')][_0x31ce('0x26')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x1d7a0c(null,util['format']('%s-%s%s',path[_0x31ce('0x27')](_0x4f96b8[_0x31ce('0x25')],path[_0x31ce('0x28')](_0x4f96b8[_0x31ce('0x25')])),Date['now'](),path[_0x31ce('0x28')](_0x4f96b8[_0x31ce('0x25')])));}})});router[_0x31ce('0x1c')]('/csv',upload[_0x31ce('0x29')](_0x31ce('0x2a')),controller[_0x31ce('0x2b')]);var upload=multer({'storage':multer[_0x31ce('0x21')]({'destination':function(_0x177a65,_0x35ea7b,_0x6f55c8){_0x6f55c8(null,path[_0x31ce('0x22')](config[_0x31ce('0x23')],_0x31ce('0x24')));},'filename':function(_0x1be0fa,_0x335319,_0x135b9b){_0x335319[_0x31ce('0x25')]=_0x335319[_0x31ce('0x25')][_0x31ce('0x26')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x135b9b(null,util[_0x31ce('0x2c')](_0x31ce('0x2d'),path['basename'](_0x335319[_0x31ce('0x25')],path[_0x31ce('0x28')](_0x335319['originalname'])),Date[_0x31ce('0x2e')](),path[_0x31ce('0x28')](_0x335319['originalname'])));}})});router[_0x31ce('0x1c')](_0x31ce('0x2f'),upload['single'](_0x31ce('0x2a')),controller[_0x31ce('0x30')]);router[_0x31ce('0x1c')](_0x31ce('0x31'),auth[_0x31ce('0x9')](),controller[_0x31ce('0x32')]);router[_0x31ce('0x33')](_0x31ce('0xd'),auth['isAuthenticated'](),controller['update']);router[_0x31ce('0x34')](_0x31ce('0xd'),auth[_0x31ce('0x9')](),controller[_0x31ce('0x35')]);module[_0x31ce('0x36')]=router; \ No newline at end of file diff --git a/server/api/cmCustomField/cmCustomField.attributes.js b/server/api/cmCustomField/cmCustomField.attributes.js index ff78905..5434dd6 100644 --- a/server/api/cmCustomField/cmCustomField.attributes.js +++ b/server/api/cmCustomField/cmCustomField.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfcbe=['isArray','stringify','BOOLEAN','ENUM','voice','sequelize','lodash','VIRTUAL','getDataValue','alias','STRING','setDataValue','TEXT','long','select','parse','values'];(function(_0x432682,_0x253044){var _0x463d05=function(_0xa73403){while(--_0xa73403){_0x432682['push'](_0x432682['shift']());}};_0x463d05(++_0x253044);}(_0xfcbe,0x115));var _0xefcb=function(_0x5da136,_0x27f239){_0x5da136=_0x5da136-0x0;var _0x3fc7a3=_0xfcbe[_0x5da136];return _0x3fc7a3;};'use strict';var Sequelize=require(_0xefcb('0x0'));var _=require(_0xefcb('0x1'));module['exports']={'name':{'type':Sequelize[_0xefcb('0x2')],'get':function(_0x3d2777){return this[_0xefcb('0x3')](_0xefcb('0x4'));}},'alias':{'type':Sequelize[_0xefcb('0x5')],'allowNull':![],'set':function(_0x2a76aa){this[_0xefcb('0x6')]('alias',_0x2a76aa?_0x2a76aa:this[_0xefcb('0x3')]('name'));}},'type':{'type':Sequelize[_0xefcb('0x5')],'allowNull':![]},'values':{'type':Sequelize[_0xefcb('0x7')](_0xefcb('0x8')),'get':function(){if(this['getDataValue']('type')===_0xefcb('0x9')){return JSON[_0xefcb('0xa')](this[_0xefcb('0x3')](_0xefcb('0xb')));}else{return this[_0xefcb('0x3')](_0xefcb('0xb'));}},'set':function(_0x48b290){if(Array[_0xefcb('0xc')](_0x48b290)){this[_0xefcb('0x6')](_0xefcb('0xb'),JSON[_0xefcb('0xd')](_0x48b290));}else{this[_0xefcb('0x6')]('values',_0x48b290);}}},'required':{'type':Sequelize[_0xefcb('0xe')],'defaultValue':![]},'clickToAction':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'actionType':{'type':Sequelize[_0xefcb('0xf')](_0xefcb('0x10'))}}; \ No newline at end of file +var _0x6bfa=['type','select','parse','values','isArray','stringify','BOOLEAN','ENUM','voice','sequelize','lodash','VIRTUAL','getDataValue','alias','setDataValue','name','STRING','TEXT'];(function(_0x2413d1,_0x3765e0){var _0x3c2bed=function(_0x4f3bf9){while(--_0x4f3bf9){_0x2413d1['push'](_0x2413d1['shift']());}};_0x3c2bed(++_0x3765e0);}(_0x6bfa,0x183));var _0xa6bf=function(_0x200bee,_0x5a5e01){_0x200bee=_0x200bee-0x0;var _0x2b8548=_0x6bfa[_0x200bee];return _0x2b8548;};'use strict';var Sequelize=require(_0xa6bf('0x0'));var _=require(_0xa6bf('0x1'));module['exports']={'name':{'type':Sequelize[_0xa6bf('0x2')],'get':function(_0x403a4d){return this[_0xa6bf('0x3')](_0xa6bf('0x4'));}},'alias':{'type':Sequelize['STRING'],'allowNull':![],'set':function(_0x14c7ff){this[_0xa6bf('0x5')](_0xa6bf('0x4'),_0x14c7ff?_0x14c7ff:this[_0xa6bf('0x3')](_0xa6bf('0x6')));}},'type':{'type':Sequelize[_0xa6bf('0x7')],'allowNull':![]},'values':{'type':Sequelize[_0xa6bf('0x8')]('long'),'get':function(){if(this[_0xa6bf('0x3')](_0xa6bf('0x9'))===_0xa6bf('0xa')){return JSON[_0xa6bf('0xb')](this[_0xa6bf('0x3')](_0xa6bf('0xc')));}else{return this[_0xa6bf('0x3')](_0xa6bf('0xc'));}},'set':function(_0x216d07){if(Array[_0xa6bf('0xd')](_0x216d07)){this[_0xa6bf('0x5')](_0xa6bf('0xc'),JSON[_0xa6bf('0xe')](_0x216d07));}else{this[_0xa6bf('0x5')](_0xa6bf('0xc'),_0x216d07);}}},'required':{'type':Sequelize[_0xa6bf('0xf')],'defaultValue':![]},'clickToAction':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'actionType':{'type':Sequelize[_0xa6bf('0x10')](_0xa6bf('0x11'))}}; \ No newline at end of file diff --git a/server/api/cmCustomField/cmCustomField.controller.js b/server/api/cmCustomField/cmCustomField.controller.js index dddf6a7..a3606fb 100644 --- a/server/api/cmCustomField/cmCustomField.controller.js +++ b/server/api/cmCustomField/cmCustomField.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa1bf=['../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/utils','../../config/environment','../../config/license/util','status','end','json','offset','undefined','limit','count','Content-Range','reject','save','update','then','destroy','sendStatus','error','stack','name','send','index','map','CmCustomField','rawAttributes','fieldName','type','key','differenceBy','query','filters','attributes','intersection','model','fields','length','hasOwnProperty','order','sort','where','filter','merge','include','rows','catch','show','keys','includeAll','options','find','body','params','create','sequelize','transaction','Sequelize','TEXT','number','INTEGER','switch','BOOLEAN','queryInterface','addColumn','format','cf_%d','eml-format','rimraf','request-promise','moment','mustache','path','sox','to-csv','ejs','lodash','squel','querystring','ioredis'];(function(_0x4e93a9,_0x413f30){var _0x43013c=function(_0x3a0cf3){while(--_0x3a0cf3){_0x4e93a9['push'](_0x4e93a9['shift']());}};_0x43013c(++_0x413f30);}(_0xa1bf,0xe6));var _0xfa1b=function(_0x4c5eea,_0x24df6a){_0x4c5eea=_0x4c5eea-0x0;var _0x309995=_0xa1bf[_0x4c5eea];return _0x309995;};'use strict';var emlformat=require(_0xfa1b('0x0'));var rimraf=require(_0xfa1b('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xfa1b('0x2'));var moment=require(_0xfa1b('0x3'));var BPromise=require('bluebird');var Mustache=require(_0xfa1b('0x4'));var util=require('util');var path=require(_0xfa1b('0x5'));var sox=require(_0xfa1b('0x6'));var csv=require(_0xfa1b('0x7'));var ejs=require(_0xfa1b('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xfa1b('0x9'));var squel=require(_0xfa1b('0xa'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0xfa1b('0xb'));var Papa=require('papaparse');var Redis=require(_0xfa1b('0xc'));var authService=require(_0xfa1b('0xd'));var qs=require('../../components/parsers/qs');var as=require(_0xfa1b('0xe'));var hardwareService=require(_0xfa1b('0xf'));var logger=require('../../config/logger')('api');var utils=require(_0xfa1b('0x10'));var config=require(_0xfa1b('0x11'));var licenseUtil=require(_0xfa1b('0x12'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x2ad164,_0xc5fecb){_0xc5fecb=_0xc5fecb||0xcc;return function(_0x4be4a8){if(_0x4be4a8){return _0x2ad164['sendStatus'](_0xc5fecb);}return _0x2ad164[_0xfa1b('0x13')](_0xc5fecb)[_0xfa1b('0x14')]();};}function respondWithResult(_0x460190,_0x5ea92c){_0x5ea92c=_0x5ea92c||0xc8;return function(_0x5bc3db){if(_0x5bc3db){return _0x460190[_0xfa1b('0x13')](_0x5ea92c)[_0xfa1b('0x15')](_0x5bc3db);}};}function respondWithFilteredResult(_0x2021cf,_0x43a34d){return function(_0x37a234){if(_0x37a234){var _0x2450bb=typeof _0x43a34d[_0xfa1b('0x16')]===_0xfa1b('0x17')&&typeof _0x43a34d[_0xfa1b('0x18')]===_0xfa1b('0x17');var _0x37ff20=_0x37a234[_0xfa1b('0x19')];var _0x89f8be=_0x2450bb?0x0:_0x43a34d[_0xfa1b('0x16')];var _0x31d0a5=_0x2450bb?_0x37a234['count']:_0x43a34d[_0xfa1b('0x16')]+_0x43a34d[_0xfa1b('0x18')];var _0x2e72e3;if(_0x31d0a5>=_0x37ff20){_0x31d0a5=_0x37ff20;_0x2e72e3=0xc8;}else{_0x2e72e3=0xce;}_0x2021cf[_0xfa1b('0x13')](_0x2e72e3);return _0x2021cf['set'](_0xfa1b('0x1a'),_0x89f8be+'-'+_0x31d0a5+'/'+_0x37ff20)[_0xfa1b('0x15')](_0x37a234);}return null;};}function patchUpdates(_0x5be993){return function(_0x532a25){try{jsonpatch['apply'](_0x532a25,_0x5be993,!![]);}catch(_0xb62391){return BPromise[_0xfa1b('0x1b')](_0xb62391);}return _0x532a25[_0xfa1b('0x1c')]();};}function saveUpdates(_0x57bfe9,_0x2e561e){return function(_0x246375){if(_0x246375){return _0x246375[_0xfa1b('0x1d')](_0x57bfe9)[_0xfa1b('0x1e')](function(_0x5330c3){return _0x5330c3;});}return null;};}function removeEntity(_0x52f987,_0x5a5c2a){return function(_0x45248d){if(_0x45248d){return _0x45248d[_0xfa1b('0x1f')]()[_0xfa1b('0x1e')](function(){_0x52f987['status'](0xcc)[_0xfa1b('0x14')]();});}};}function handleEntityNotFound(_0x205c30,_0x12cb22){return function(_0x292c03){if(!_0x292c03){_0x205c30[_0xfa1b('0x20')](0x194);}return _0x292c03;};}function handleError(_0x168616,_0x30da5f){_0x30da5f=_0x30da5f||0x1f4;return function(_0x41cf31){logger[_0xfa1b('0x21')](_0x41cf31[_0xfa1b('0x22')]);if(_0x41cf31[_0xfa1b('0x23')]){delete _0x41cf31[_0xfa1b('0x23')];}_0x168616['status'](_0x30da5f)[_0xfa1b('0x24')](_0x41cf31);};}exports[_0xfa1b('0x25')]=function(_0x20f841,_0x350827){var _0x45a50e={},_0x4635d0={},_0x3d02f7={'count':0x0,'rows':[]};var _0x5409bf=_[_0xfa1b('0x26')](db[_0xfa1b('0x27')][_0xfa1b('0x28')],function(_0x28925d){return{'name':_0x28925d[_0xfa1b('0x29')],'type':_0x28925d[_0xfa1b('0x2a')][_0xfa1b('0x2b')]};});_0x4635d0['model']=_[_0xfa1b('0x2c')](_[_0xfa1b('0x26')](_0x5409bf,'name'),[_0xfa1b('0x23')]);_0x4635d0[_0xfa1b('0x2d')]=_['keys'](_0x20f841[_0xfa1b('0x2d')]);_0x4635d0[_0xfa1b('0x2e')]=_['intersection'](_0x4635d0['model'],_0x4635d0['query']);_0x45a50e[_0xfa1b('0x2f')]=_[_0xfa1b('0x30')](_0x4635d0[_0xfa1b('0x31')],qs[_0xfa1b('0x32')](_0x20f841[_0xfa1b('0x2d')][_0xfa1b('0x32')]));_0x45a50e[_0xfa1b('0x2f')]=_0x45a50e[_0xfa1b('0x2f')][_0xfa1b('0x33')]?_0x45a50e[_0xfa1b('0x2f')]:_0x4635d0[_0xfa1b('0x31')];if(!_0x20f841['query'][_0xfa1b('0x34')]('nolimit')){_0x45a50e[_0xfa1b('0x18')]=qs[_0xfa1b('0x18')](_0x20f841[_0xfa1b('0x2d')][_0xfa1b('0x18')]);_0x45a50e['offset']=qs['offset'](_0x20f841[_0xfa1b('0x2d')][_0xfa1b('0x16')]);}_0x45a50e[_0xfa1b('0x35')]=qs[_0xfa1b('0x36')](_0x20f841[_0xfa1b('0x2d')][_0xfa1b('0x36')]);_0x45a50e[_0xfa1b('0x37')]=qs['filters'](_['pick'](_0x20f841['query'],_0x4635d0[_0xfa1b('0x2e')]),_0x5409bf);if(_0x20f841['query'][_0xfa1b('0x38')]){_0x45a50e['where']=_[_0xfa1b('0x39')](_0x45a50e[_0xfa1b('0x37')],{'$or':_['map'](_0x5409bf,function(_0x6c31c7){if(_0x6c31c7['type']!=='VIRTUAL'){var _0x2af57b={};_0x2af57b[_0x6c31c7[_0xfa1b('0x23')]]={'$like':'%'+_0x20f841[_0xfa1b('0x2d')][_0xfa1b('0x38')]+'%'};return _0x2af57b;}})});}_0x45a50e=_[_0xfa1b('0x39')]({},_0x45a50e,_0x20f841['options']);var _0x492c37={'where':_0x45a50e[_0xfa1b('0x37')]};return db[_0xfa1b('0x27')][_0xfa1b('0x19')](_0x492c37)[_0xfa1b('0x1e')](function(_0x3ea913){_0x3d02f7[_0xfa1b('0x19')]=_0x3ea913;if(_0x20f841[_0xfa1b('0x2d')]['includeAll']){_0x45a50e[_0xfa1b('0x3a')]=[{'all':!![]}];}return db['CmCustomField']['findAll'](_0x45a50e);})[_0xfa1b('0x1e')](function(_0x2a2cca){_0x3d02f7[_0xfa1b('0x3b')]=_0x2a2cca;return _0x3d02f7;})[_0xfa1b('0x1e')](respondWithFilteredResult(_0x350827,_0x45a50e))[_0xfa1b('0x3c')](handleError(_0x350827,null));};exports[_0xfa1b('0x3d')]=function(_0x162557,_0x4be022){var _0x5f25b0={'raw':!![],'where':{'id':_0x162557['params']['id']}},_0x156e63={};_0x156e63[_0xfa1b('0x31')]=_[_0xfa1b('0x3e')](db[_0xfa1b('0x27')]['rawAttributes']);_0x156e63[_0xfa1b('0x2d')]=_[_0xfa1b('0x3e')](_0x162557[_0xfa1b('0x2d')]);_0x156e63[_0xfa1b('0x2e')]=_[_0xfa1b('0x30')](_0x156e63['model'],_0x156e63[_0xfa1b('0x2d')]);_0x5f25b0[_0xfa1b('0x2f')]=_[_0xfa1b('0x30')](_0x156e63['model'],qs[_0xfa1b('0x32')](_0x162557[_0xfa1b('0x2d')][_0xfa1b('0x32')]));_0x5f25b0['attributes']=_0x5f25b0[_0xfa1b('0x2f')][_0xfa1b('0x33')]?_0x5f25b0[_0xfa1b('0x2f')]:_0x156e63[_0xfa1b('0x31')];if(_0x162557[_0xfa1b('0x2d')][_0xfa1b('0x3f')]){_0x5f25b0[_0xfa1b('0x3a')]=[{'all':!![]}];}_0x5f25b0=_[_0xfa1b('0x39')]({},_0x5f25b0,_0x162557[_0xfa1b('0x40')]);return db[_0xfa1b('0x27')][_0xfa1b('0x41')](_0x5f25b0)[_0xfa1b('0x1e')](handleEntityNotFound(_0x4be022,null))[_0xfa1b('0x1e')](respondWithResult(_0x4be022,null))['catch'](handleError(_0x4be022,null));};exports['update']=function(_0x2655f9,_0x33fdac){if(_0x2655f9[_0xfa1b('0x42')]['id']){delete _0x2655f9[_0xfa1b('0x42')]['id'];}return db[_0xfa1b('0x27')]['find']({'where':{'id':_0x2655f9[_0xfa1b('0x43')]['id']}})[_0xfa1b('0x1e')](handleEntityNotFound(_0x33fdac,null))['then'](saveUpdates(_0x2655f9['body'],null))[_0xfa1b('0x1e')](respondWithResult(_0x33fdac,null))[_0xfa1b('0x3c')](handleError(_0x33fdac,null));};exports[_0xfa1b('0x1f')]=function(_0xd1a0bf,_0x3ff3da){return db['CmCustomField'][_0xfa1b('0x41')]({'where':{'id':_0xd1a0bf[_0xfa1b('0x43')]['id']}})['then'](handleEntityNotFound(_0x3ff3da,null))[_0xfa1b('0x1e')](removeEntity(_0x3ff3da,null))[_0xfa1b('0x3c')](handleError(_0x3ff3da,null));};exports[_0xfa1b('0x44')]=function(_0x45ef20,_0x5803b4){var _0x58be94;return db[_0xfa1b('0x45')][_0xfa1b('0x46')](function(_0x54a366){return db[_0xfa1b('0x27')][_0xfa1b('0x44')](_0x45ef20[_0xfa1b('0x42')],{'transaction':_0x54a366})[_0xfa1b('0x1e')](function(_0x5c852f){_0x58be94=_0x5c852f;var _0x139919={'type':db[_0xfa1b('0x47')]['TEXT'],'transaction':_0x54a366};switch(_0x45ef20[_0xfa1b('0x42')]['type']){case'text':_0x139919[_0xfa1b('0x2a')]=db[_0xfa1b('0x47')][_0xfa1b('0x48')];break;case _0xfa1b('0x49'):_0x139919[_0xfa1b('0x2a')]=db['Sequelize'][_0xfa1b('0x4a')];break;case _0xfa1b('0x4b'):_0x139919[_0xfa1b('0x2a')]=db[_0xfa1b('0x47')][_0xfa1b('0x4c')];_0x139919['defaultValue']=![];break;default:}return db[_0xfa1b('0x45')][_0xfa1b('0x4d')][_0xfa1b('0x4e')]('cm_contacts',util[_0xfa1b('0x4f')](_0xfa1b('0x50'),_0x58be94['id']),_0x139919);})[_0xfa1b('0x1e')](function(){return _0x58be94;});})['then'](respondWithResult(_0x5803b4,0xc9))['catch'](handleError(_0x5803b4,null));}; \ No newline at end of file +var _0x0929=['body','sequelize','transaction','create','text','Sequelize','TEXT','number','INTEGER','switch','cm_contacts','cf_%d','rimraf','zip-dir','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','squel','crypto','jsforce','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/environment','../../config/license/util','sendStatus','status','end','offset','undefined','limit','count','set','Content-Range','apply','save','then','destroy','error','stack','send','index','map','CmCustomField','rawAttributes','fieldName','type','key','differenceBy','name','query','keys','filters','intersection','model','attributes','fields','length','hasOwnProperty','sort','where','filter','merge','options','include','rows','catch','show','params','find','update'];(function(_0x481bf7,_0x437f69){var _0x461787=function(_0xb3bc9d){while(--_0xb3bc9d){_0x481bf7['push'](_0x481bf7['shift']());}};_0x461787(++_0x437f69);}(_0x0929,0xa8));var _0x9092=function(_0x19cf1f,_0x4105e3){_0x19cf1f=_0x19cf1f-0x0;var _0x234028=_0x0929[_0x19cf1f];return _0x234028;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x9092('0x0'));var zipdir=require(_0x9092('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x9092('0x2'));var moment=require(_0x9092('0x3'));var BPromise=require(_0x9092('0x4'));var Mustache=require(_0x9092('0x5'));var util=require('util');var path=require(_0x9092('0x6'));var sox=require(_0x9092('0x7'));var csv=require(_0x9092('0x8'));var ejs=require(_0x9092('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x9092('0xa'));var crypto=require(_0x9092('0xb'));var jsforce=require(_0x9092('0xc'));var deskjs=require('desk.js');var toCsv=require(_0x9092('0x8'));var querystring=require('querystring');var Papa=require(_0x9092('0xd'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x9092('0xe'));var as=require(_0x9092('0xf'));var hardwareService=require(_0x9092('0x10'));var logger=require('../../config/logger')(_0x9092('0x11'));var utils=require('../../config/utils');var config=require(_0x9092('0x12'));var licenseUtil=require(_0x9092('0x13'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x46a5a1,_0x3b4b30){_0x3b4b30=_0x3b4b30||0xcc;return function(_0x20dcb5){if(_0x20dcb5){return _0x46a5a1[_0x9092('0x14')](_0x3b4b30);}return _0x46a5a1[_0x9092('0x15')](_0x3b4b30)[_0x9092('0x16')]();};}function respondWithResult(_0x14f1a6,_0x44c296){_0x44c296=_0x44c296||0xc8;return function(_0x1b740a){if(_0x1b740a){return _0x14f1a6[_0x9092('0x15')](_0x44c296)['json'](_0x1b740a);}};}function respondWithFilteredResult(_0xdab906,_0x506917){return function(_0x5db392){if(_0x5db392){var _0x4ab0ba=typeof _0x506917[_0x9092('0x17')]===_0x9092('0x18')&&typeof _0x506917[_0x9092('0x19')]===_0x9092('0x18');var _0x39303e=_0x5db392[_0x9092('0x1a')];var _0x5bd6df=_0x4ab0ba?0x0:_0x506917[_0x9092('0x17')];var _0x3c1fa0=_0x4ab0ba?_0x5db392[_0x9092('0x1a')]:_0x506917[_0x9092('0x17')]+_0x506917['limit'];var _0x26b26d;if(_0x3c1fa0>=_0x39303e){_0x3c1fa0=_0x39303e;_0x26b26d=0xc8;}else{_0x26b26d=0xce;}_0xdab906['status'](_0x26b26d);return _0xdab906[_0x9092('0x1b')](_0x9092('0x1c'),_0x5bd6df+'-'+_0x3c1fa0+'/'+_0x39303e)['json'](_0x5db392);}return null;};}function patchUpdates(_0x22741f){return function(_0x171665){try{jsonpatch[_0x9092('0x1d')](_0x171665,_0x22741f,!![]);}catch(_0x1678c4){return BPromise['reject'](_0x1678c4);}return _0x171665[_0x9092('0x1e')]();};}function saveUpdates(_0x2986de,_0x508820){return function(_0x34a298){if(_0x34a298){return _0x34a298['update'](_0x2986de)[_0x9092('0x1f')](function(_0x419258){return _0x419258;});}return null;};}function removeEntity(_0x4bb868,_0x21f3b5){return function(_0x3f01c4){if(_0x3f01c4){return _0x3f01c4[_0x9092('0x20')]()[_0x9092('0x1f')](function(){_0x4bb868['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x271b5e,_0x240ffa){return function(_0x2a27c0){if(!_0x2a27c0){_0x271b5e[_0x9092('0x14')](0x194);}return _0x2a27c0;};}function handleError(_0x3cc2ae,_0x2dc153){_0x2dc153=_0x2dc153||0x1f4;return function(_0x5dcf74){logger[_0x9092('0x21')](_0x5dcf74[_0x9092('0x22')]);if(_0x5dcf74['name']){delete _0x5dcf74['name'];}_0x3cc2ae[_0x9092('0x15')](_0x2dc153)[_0x9092('0x23')](_0x5dcf74);};}exports[_0x9092('0x24')]=function(_0x502d20,_0x3c8a53){var _0xaee05={},_0x1f8e91={},_0x3ada5f={'count':0x0,'rows':[]};var _0x277889=_[_0x9092('0x25')](db[_0x9092('0x26')][_0x9092('0x27')],function(_0x528142){return{'name':_0x528142[_0x9092('0x28')],'type':_0x528142[_0x9092('0x29')][_0x9092('0x2a')]};});_0x1f8e91['model']=_[_0x9092('0x2b')](_[_0x9092('0x25')](_0x277889,_0x9092('0x2c')),[_0x9092('0x2c')]);_0x1f8e91[_0x9092('0x2d')]=_[_0x9092('0x2e')](_0x502d20[_0x9092('0x2d')]);_0x1f8e91[_0x9092('0x2f')]=_[_0x9092('0x30')](_0x1f8e91[_0x9092('0x31')],_0x1f8e91['query']);_0xaee05[_0x9092('0x32')]=_['intersection'](_0x1f8e91[_0x9092('0x31')],qs[_0x9092('0x33')](_0x502d20['query'][_0x9092('0x33')]));_0xaee05[_0x9092('0x32')]=_0xaee05[_0x9092('0x32')][_0x9092('0x34')]?_0xaee05[_0x9092('0x32')]:_0x1f8e91[_0x9092('0x31')];if(!_0x502d20['query'][_0x9092('0x35')]('nolimit')){_0xaee05[_0x9092('0x19')]=qs['limit'](_0x502d20[_0x9092('0x2d')]['limit']);_0xaee05['offset']=qs[_0x9092('0x17')](_0x502d20[_0x9092('0x2d')][_0x9092('0x17')]);}_0xaee05['order']=qs[_0x9092('0x36')](_0x502d20[_0x9092('0x2d')]['sort']);_0xaee05[_0x9092('0x37')]=qs[_0x9092('0x2f')](_['pick'](_0x502d20['query'],_0x1f8e91[_0x9092('0x2f')]),_0x277889);if(_0x502d20[_0x9092('0x2d')][_0x9092('0x38')]){_0xaee05[_0x9092('0x37')]=_[_0x9092('0x39')](_0xaee05[_0x9092('0x37')],{'$or':_['map'](_0x277889,function(_0x1db1a0){if(_0x1db1a0['type']!=='VIRTUAL'){var _0xc91ef3={};_0xc91ef3[_0x1db1a0['name']]={'$like':'%'+_0x502d20[_0x9092('0x2d')]['filter']+'%'};return _0xc91ef3;}})});}_0xaee05=_[_0x9092('0x39')]({},_0xaee05,_0x502d20[_0x9092('0x3a')]);var _0x3f2c19={'where':_0xaee05[_0x9092('0x37')]};return db[_0x9092('0x26')][_0x9092('0x1a')](_0x3f2c19)[_0x9092('0x1f')](function(_0x464d6c){_0x3ada5f[_0x9092('0x1a')]=_0x464d6c;if(_0x502d20[_0x9092('0x2d')]['includeAll']){_0xaee05[_0x9092('0x3b')]=[{'all':!![]}];}return db['CmCustomField']['findAll'](_0xaee05);})[_0x9092('0x1f')](function(_0x535ff2){_0x3ada5f[_0x9092('0x3c')]=_0x535ff2;return _0x3ada5f;})[_0x9092('0x1f')](respondWithFilteredResult(_0x3c8a53,_0xaee05))[_0x9092('0x3d')](handleError(_0x3c8a53,null));};exports[_0x9092('0x3e')]=function(_0x5e9f57,_0x148f46){var _0xb26f17={'raw':!![],'where':{'id':_0x5e9f57[_0x9092('0x3f')]['id']}},_0x4f2794={};_0x4f2794[_0x9092('0x31')]=_['keys'](db[_0x9092('0x26')][_0x9092('0x27')]);_0x4f2794[_0x9092('0x2d')]=_[_0x9092('0x2e')](_0x5e9f57[_0x9092('0x2d')]);_0x4f2794[_0x9092('0x2f')]=_[_0x9092('0x30')](_0x4f2794['model'],_0x4f2794[_0x9092('0x2d')]);_0xb26f17[_0x9092('0x32')]=_['intersection'](_0x4f2794[_0x9092('0x31')],qs[_0x9092('0x33')](_0x5e9f57[_0x9092('0x2d')][_0x9092('0x33')]));_0xb26f17[_0x9092('0x32')]=_0xb26f17[_0x9092('0x32')]['length']?_0xb26f17['attributes']:_0x4f2794[_0x9092('0x31')];if(_0x5e9f57[_0x9092('0x2d')]['includeAll']){_0xb26f17['include']=[{'all':!![]}];}_0xb26f17=_[_0x9092('0x39')]({},_0xb26f17,_0x5e9f57[_0x9092('0x3a')]);return db[_0x9092('0x26')][_0x9092('0x40')](_0xb26f17)['then'](handleEntityNotFound(_0x148f46,null))[_0x9092('0x1f')](respondWithResult(_0x148f46,null))[_0x9092('0x3d')](handleError(_0x148f46,null));};exports[_0x9092('0x41')]=function(_0x47134f,_0x481ad){if(_0x47134f['body']['id']){delete _0x47134f[_0x9092('0x42')]['id'];}return db[_0x9092('0x26')]['find']({'where':{'id':_0x47134f['params']['id']}})[_0x9092('0x1f')](handleEntityNotFound(_0x481ad,null))['then'](saveUpdates(_0x47134f['body'],null))[_0x9092('0x1f')](respondWithResult(_0x481ad,null))[_0x9092('0x3d')](handleError(_0x481ad,null));};exports[_0x9092('0x20')]=function(_0x84c0dd,_0x2baaba){return db['CmCustomField'][_0x9092('0x40')]({'where':{'id':_0x84c0dd[_0x9092('0x3f')]['id']}})[_0x9092('0x1f')](handleEntityNotFound(_0x2baaba,null))[_0x9092('0x1f')](removeEntity(_0x2baaba,null))[_0x9092('0x3d')](handleError(_0x2baaba,null));};exports['create']=function(_0x1cd3ed,_0x5c9671){var _0x3da153;return db[_0x9092('0x43')][_0x9092('0x44')](function(_0xd0b631){return db[_0x9092('0x26')][_0x9092('0x45')](_0x1cd3ed[_0x9092('0x42')],{'transaction':_0xd0b631})[_0x9092('0x1f')](function(_0x56d938){_0x3da153=_0x56d938;var _0x6cfd95={'type':db['Sequelize']['TEXT'],'transaction':_0xd0b631};switch(_0x1cd3ed[_0x9092('0x42')][_0x9092('0x29')]){case _0x9092('0x46'):_0x6cfd95[_0x9092('0x29')]=db[_0x9092('0x47')][_0x9092('0x48')];break;case _0x9092('0x49'):_0x6cfd95[_0x9092('0x29')]=db[_0x9092('0x47')][_0x9092('0x4a')];break;case _0x9092('0x4b'):_0x6cfd95[_0x9092('0x29')]=db['Sequelize']['BOOLEAN'];_0x6cfd95['defaultValue']=![];break;default:}return db[_0x9092('0x43')]['queryInterface']['addColumn'](_0x9092('0x4c'),util['format'](_0x9092('0x4d'),_0x3da153['id']),_0x6cfd95);})[_0x9092('0x1f')](function(){return _0x3da153;});})[_0x9092('0x1f')](respondWithResult(_0x5c9671,0xc9))[_0x9092('0x3d')](handleError(_0x5c9671,null));}; \ No newline at end of file diff --git a/server/api/cmCustomField/cmCustomField.model.js b/server/api/cmCustomField/cmCustomField.model.js index 9526f32..73b52e3 100644 --- a/server/api/cmCustomField/cmCustomField.model.js +++ b/server/api/cmCustomField/cmCustomField.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc6bc=['path','rimraf','../../config/environment','./cmCustomField.attributes','lodash','util','api','moment','request-promise'];(function(_0x21549c,_0x6d64d1){var _0x426cbd=function(_0x323f5b){while(--_0x323f5b){_0x21549c['push'](_0x21549c['shift']());}};_0x426cbd(++_0x6d64d1);}(_0xc6bc,0x124));var _0xcc6b=function(_0x30bc39,_0x4ec507){_0x30bc39=_0x30bc39-0x0;var _0x190030=_0xc6bc[_0x30bc39];return _0x190030;};'use strict';var _=require(_0xcc6b('0x0'));var util=require(_0xcc6b('0x1'));var logger=require('../../config/logger')(_0xcc6b('0x2'));var moment=require(_0xcc6b('0x3'));var BPromise=require('bluebird');var rp=require(_0xcc6b('0x4'));var fs=require('fs');var path=require(_0xcc6b('0x5'));var rimraf=require(_0xcc6b('0x6'));var config=require(_0xcc6b('0x7'));var attributes=require(_0xcc6b('0x8'));module['exports']=function(_0x1c75ae,_0x324f75){return _0x1c75ae['define']('CmCustomField',attributes,{'tableName':'cm_custom_fields','paranoid':!![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x869e=['moment','bluebird','request-promise','path','exports','CmCustomField','cm_custom_fields','lodash','util','../../config/logger','api'];(function(_0x187ee1,_0x3fd1e6){var _0x388160=function(_0x542dd2){while(--_0x542dd2){_0x187ee1['push'](_0x187ee1['shift']());}};_0x388160(++_0x3fd1e6);}(_0x869e,0xcd));var _0xe869=function(_0x3de0c5,_0x381f0c){_0x3de0c5=_0x3de0c5-0x0;var _0x418935=_0x869e[_0x3de0c5];return _0x418935;};'use strict';var _=require(_0xe869('0x0'));var util=require(_0xe869('0x1'));var logger=require(_0xe869('0x2'))(_0xe869('0x3'));var moment=require(_0xe869('0x4'));var BPromise=require(_0xe869('0x5'));var rp=require(_0xe869('0x6'));var fs=require('fs');var path=require(_0xe869('0x7'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require('./cmCustomField.attributes');module[_0xe869('0x8')]=function(_0x3e77a1,_0x251d53){return _0x3e77a1['define'](_0xe869('0x9'),attributes,{'tableName':_0xe869('0xa'),'paranoid':!![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/cmCustomField/cmCustomField.rpc.js b/server/api/cmCustomField/cmCustomField.rpc.js index e8b603b..c289be9 100644 --- a/server/api/cmCustomField/cmCustomField.rpc.js +++ b/server/api/cmCustomField/cmCustomField.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4194=['CmCustomField,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','util','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','CmCustomField,\x20%s,\x20%s'];(function(_0x373a22,_0xc5f9d3){var _0x3d7f4c=function(_0x2286dd){while(--_0x2286dd){_0x373a22['push'](_0x373a22['shift']());}};_0x3d7f4c(++_0xc5f9d3);}(_0x4194,0x92));var _0x4419=function(_0x5bf593,_0x18c43e){_0x5bf593=_0x5bf593-0x0;var _0x15cbce=_0x4194[_0x5bf593];return _0x15cbce;};'use strict';var _=require('lodash');var util=require(_0x4419('0x0'));var moment=require(_0x4419('0x1'));var BPromise=require(_0x4419('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x4419('0x3'))['db'];var utils=require(_0x4419('0x4'));var logger=require(_0x4419('0x5'))(_0x4419('0x6'));var config=require(_0x4419('0x7'));var jayson=require(_0x4419('0x8'));var client=jayson[_0x4419('0x9')][_0x4419('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x50e0d8,_0x3bd20b,_0x3ee9ae){return new BPromise(function(_0x284635,_0xe6fed6){return client[_0x4419('0xb')](_0x50e0d8,_0x3ee9ae)[_0x4419('0xc')](function(_0x42c0d7){logger[_0x4419('0xd')](_0x4419('0xe'),_0x3bd20b,'request\x20sent');logger['debug'](_0x4419('0xf'),_0x3bd20b,_0x4419('0x10'),JSON[_0x4419('0x11')](_0x42c0d7));if(_0x42c0d7[_0x4419('0x12')]){if(_0x42c0d7['error'][_0x4419('0x13')]===0x1f4){logger[_0x4419('0x12')](_0x4419('0xe'),_0x3bd20b,_0x42c0d7[_0x4419('0x12')]['message']);return _0xe6fed6(_0x42c0d7[_0x4419('0x12')][_0x4419('0x14')]);}logger[_0x4419('0x12')]('CmCustomField,\x20%s,\x20%s',_0x3bd20b,_0x42c0d7['error'][_0x4419('0x14')]);return _0x284635(_0x42c0d7['error'][_0x4419('0x14')]);}else{logger[_0x4419('0xd')](_0x4419('0xe'),_0x3bd20b,_0x4419('0x10'));_0x284635(_0x42c0d7[_0x4419('0x15')][_0x4419('0x14')]);}})[_0x4419('0x16')](function(_0x4795ce){logger[_0x4419('0x12')]('CmCustomField,\x20%s,\x20%s',_0x3bd20b,_0x4795ce);_0xe6fed6(_0x4795ce);});});} \ No newline at end of file +var _0x99c9=['CmCustomField,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','catch','lodash','util','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','CmCustomField,\x20%s,\x20%s','debug'];(function(_0x510794,_0x120e85){var _0x3bd818=function(_0x34fab5){while(--_0x34fab5){_0x510794['push'](_0x510794['shift']());}};_0x3bd818(++_0x120e85);}(_0x99c9,0x7f));var _0x999c=function(_0x36ed48,_0x1ee0d4){_0x36ed48=_0x36ed48-0x0;var _0x51c63a=_0x99c9[_0x36ed48];return _0x51c63a;};'use strict';var _=require(_0x999c('0x0'));var util=require(_0x999c('0x1'));var moment=require('moment');var BPromise=require(_0x999c('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x999c('0x3'));var db=require(_0x999c('0x4'))['db'];var utils=require(_0x999c('0x5'));var logger=require(_0x999c('0x6'))(_0x999c('0x7'));var config=require(_0x999c('0x8'));var jayson=require(_0x999c('0x9'));var client=jayson[_0x999c('0xa')][_0x999c('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x5e553b,_0xc49af0,_0x4d2cf1){return new BPromise(function(_0x4acabf,_0x4bbe32){return client[_0x999c('0xc')](_0x5e553b,_0x4d2cf1)[_0x999c('0xd')](function(_0x4e723e){logger[_0x999c('0xe')](_0x999c('0xf'),_0xc49af0,'request\x20sent');logger[_0x999c('0x10')](_0x999c('0x11'),_0xc49af0,_0x999c('0x12'),JSON[_0x999c('0x13')](_0x4e723e));if(_0x4e723e[_0x999c('0x14')]){if(_0x4e723e['error'][_0x999c('0x15')]===0x1f4){logger[_0x999c('0x14')](_0x999c('0xf'),_0xc49af0,_0x4e723e[_0x999c('0x14')][_0x999c('0x16')]);return _0x4bbe32(_0x4e723e[_0x999c('0x14')][_0x999c('0x16')]);}logger['error'](_0x999c('0xf'),_0xc49af0,_0x4e723e[_0x999c('0x14')][_0x999c('0x16')]);return _0x4acabf(_0x4e723e[_0x999c('0x14')][_0x999c('0x16')]);}else{logger[_0x999c('0xe')]('CmCustomField,\x20%s,\x20%s',_0xc49af0,_0x999c('0x12'));_0x4acabf(_0x4e723e['result'][_0x999c('0x16')]);}})[_0x999c('0x17')](function(_0x144937){logger[_0x999c('0x14')](_0x999c('0xf'),_0xc49af0,_0x144937);_0x4bbe32(_0x144937);});});} \ No newline at end of file diff --git a/server/api/cmCustomField/index.js b/server/api/cmCustomField/index.js index 129c8c0..c9e8ff5 100644 --- a/server/api/cmCustomField/index.js +++ b/server/api/cmCustomField/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd10b=['../../components/auth/service','./cmCustomField.controller','index','get','/:id','isAuthenticated','show','post','create','put','update','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra'];(function(_0x1cf5f2,_0x482ae5){var _0x1c28cf=function(_0x188a15){while(--_0x188a15){_0x1cf5f2['push'](_0x1cf5f2['shift']());}};_0x1c28cf(++_0x482ae5);}(_0xd10b,0x189));var _0xbd10=function(_0x21e696,_0x1f087b){_0x21e696=_0x21e696-0x0;var _0x138b79=_0xd10b[_0x21e696];return _0x138b79;};'use strict';var multer=require(_0xbd10('0x0'));var util=require(_0xbd10('0x1'));var path=require(_0xbd10('0x2'));var timeout=require(_0xbd10('0x3'));var express=require(_0xbd10('0x4'));var router=express[_0xbd10('0x5')]();var fs_extra=require(_0xbd10('0x6'));var auth=require(_0xbd10('0x7'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xbd10('0x8'));router['get']('/',auth['isAuthenticated'](),controller[_0xbd10('0x9')]);router[_0xbd10('0xa')](_0xbd10('0xb'),auth[_0xbd10('0xc')](),controller[_0xbd10('0xd')]);router[_0xbd10('0xe')]('/',auth[_0xbd10('0xc')](),controller[_0xbd10('0xf')]);router[_0xbd10('0x10')](_0xbd10('0xb'),auth[_0xbd10('0xc')](),controller[_0xbd10('0x11')]);router['delete'](_0xbd10('0xb'),auth[_0xbd10('0xc')](),controller[_0xbd10('0x12')]);module[_0xbd10('0x13')]=router; \ No newline at end of file +var _0x383d=['/:id','isAuthenticated','show','create','put','update','delete','destroy','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./cmCustomField.controller','get','index'];(function(_0x31038b,_0x3ac1c9){var _0x1c9d3c=function(_0xe00e97){while(--_0xe00e97){_0x31038b['push'](_0x31038b['shift']());}};_0x1c9d3c(++_0x3ac1c9);}(_0x383d,0x86));var _0xd383=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x383d[_0x20a584];return _0x4b41a8;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0xd383('0x0'));var timeout=require(_0xd383('0x1'));var express=require(_0xd383('0x2'));var router=express['Router']();var fs_extra=require(_0xd383('0x3'));var auth=require(_0xd383('0x4'));var interaction=require(_0xd383('0x5'));var config=require(_0xd383('0x6'));var controller=require(_0xd383('0x7'));router[_0xd383('0x8')]('/',auth['isAuthenticated'](),controller[_0xd383('0x9')]);router[_0xd383('0x8')](_0xd383('0xa'),auth[_0xd383('0xb')](),controller[_0xd383('0xc')]);router['post']('/',auth['isAuthenticated'](),controller[_0xd383('0xd')]);router[_0xd383('0xe')]('/:id',auth[_0xd383('0xb')](),controller[_0xd383('0xf')]);router[_0xd383('0x10')](_0xd383('0xa'),auth[_0xd383('0xb')](),controller[_0xd383('0x11')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/cmHopper/cmHopper.attributes.js b/server/api/cmHopper/cmHopper.attributes.js index ecb7663..50f08f8 100644 --- a/server/api/cmHopper/cmHopper.attributes.js +++ b/server/api/cmHopper/cmHopper.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9def=['INTEGER','BOOLEAN','UNSIGNED','contactListQueue','moment','sequelize','exports','STRING','DATE'];(function(_0x42f12f,_0x44207c){var _0x5f5d58=function(_0x49a792){while(--_0x49a792){_0x42f12f['push'](_0x42f12f['shift']());}};_0x5f5d58(++_0x44207c);}(_0x9def,0x1cf));var _0xf9de=function(_0x4458a0,_0x2b37d3){_0x4458a0=_0x4458a0-0x0;var _0x1a8a2d=_0x9def[_0x4458a0];return _0x1a8a2d;};'use strict';var moment=require(_0xf9de('0x0'));var Sequelize=require(_0xf9de('0x1'));module[_0xf9de('0x2')]={'phone':{'type':Sequelize[_0xf9de('0x3')],'allowNull':![]},'active':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'scheduledat':{'type':Sequelize[_0xf9de('0x4')],'defaultValue':moment()['format']('YYYY-MM-DD\x20HH:mm:ss')},'countbusyretry':{'type':Sequelize[_0xf9de('0x5')],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize[_0xf9de('0x5')],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize[_0xf9de('0x5')],'defaultValue':0x0},'callback':{'type':Sequelize[_0xf9de('0x6')],'defaultValue':![]},'callbackuniqueid':{'type':Sequelize['STRING'],'defaultValue':null},'callbackat':{'type':Sequelize[_0xf9de('0x4')]},'priority':{'type':Sequelize[_0xf9de('0x5')](0x2)[_0xf9de('0x7')],'defaultValue':0x2,'validate':{'min':0x0,'max':0x4}},'recallme':{'type':Sequelize[_0xf9de('0x6')],'defaultValue':![]},'ContactId':{'type':Sequelize[_0xf9de('0x5')],'unique':_0xf9de('0x8')},'ListId':{'type':Sequelize[_0xf9de('0x5')],'unique':'contactListQueue'},'UserId':{'type':Sequelize[_0xf9de('0x5')]},'VoiceQueueId':{'type':Sequelize['INTEGER'],'unique':_0xf9de('0x8')},'CampaignId':{'type':Sequelize[_0xf9de('0x5')]},'countnosuchnumberretry':{'type':Sequelize[_0xf9de('0x5')],'defaultValue':0x0},'countdropretry':{'type':Sequelize[_0xf9de('0x5')],'defaultValue':0x0},'countabandonedretry':{'type':Sequelize[_0xf9de('0x5')],'defaultValue':0x0},'countmachineretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countagentrejectretry':{'type':Sequelize[_0xf9de('0x5')],'defaultValue':0x0}}; \ No newline at end of file +var _0x5ac2=['moment','sequelize','exports','STRING','DATE','format','YYYY-MM-DD\x20HH:mm:ss','INTEGER','BOOLEAN','contactListQueue'];(function(_0x279d37,_0x14de3f){var _0x530173=function(_0x37fc79){while(--_0x37fc79){_0x279d37['push'](_0x279d37['shift']());}};_0x530173(++_0x14de3f);}(_0x5ac2,0xb4));var _0x25ac=function(_0x1ac06b,_0x5dd5e5){_0x1ac06b=_0x1ac06b-0x0;var _0x49f7a3=_0x5ac2[_0x1ac06b];return _0x49f7a3;};'use strict';var moment=require(_0x25ac('0x0'));var Sequelize=require(_0x25ac('0x1'));module[_0x25ac('0x2')]={'phone':{'type':Sequelize[_0x25ac('0x3')],'allowNull':![]},'active':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'scheduledat':{'type':Sequelize[_0x25ac('0x4')],'defaultValue':moment()[_0x25ac('0x5')](_0x25ac('0x6'))},'countbusyretry':{'type':Sequelize[_0x25ac('0x7')],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize[_0x25ac('0x7')],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize[_0x25ac('0x7')],'defaultValue':0x0},'callback':{'type':Sequelize[_0x25ac('0x8')],'defaultValue':![]},'callbackuniqueid':{'type':Sequelize[_0x25ac('0x3')],'defaultValue':null},'callbackat':{'type':Sequelize[_0x25ac('0x4')]},'priority':{'type':Sequelize[_0x25ac('0x7')](0x2)['UNSIGNED'],'defaultValue':0x2,'validate':{'min':0x0,'max':0x4}},'recallme':{'type':Sequelize[_0x25ac('0x8')],'defaultValue':![]},'ContactId':{'type':Sequelize[_0x25ac('0x7')],'unique':_0x25ac('0x9')},'ListId':{'type':Sequelize[_0x25ac('0x7')],'unique':'contactListQueue'},'UserId':{'type':Sequelize['INTEGER']},'VoiceQueueId':{'type':Sequelize[_0x25ac('0x7')],'unique':_0x25ac('0x9')},'CampaignId':{'type':Sequelize['INTEGER']},'countnosuchnumberretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countdropretry':{'type':Sequelize[_0x25ac('0x7')],'defaultValue':0x0},'countabandonedretry':{'type':Sequelize[_0x25ac('0x7')],'defaultValue':0x0},'countmachineretry':{'type':Sequelize[_0x25ac('0x7')],'defaultValue':0x0},'countagentrejectretry':{'type':Sequelize[_0x25ac('0x7')],'defaultValue':0x0}}; \ No newline at end of file diff --git a/server/api/cmHopper/cmHopper.controller.js b/server/api/cmHopper/cmHopper.controller.js index c9b6215..417b4dd 100644 --- a/server/api/cmHopper/cmHopper.controller.js +++ b/server/api/cmHopper/cmHopper.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb0dc=['Campaign','omit','dataValues','createdAt','updatedAt','user','deletedat','YYYY-MM-DD\x20HH:mm:ss','queue','CmContact','ContactId','firstName','isNil','calleridname','lastName','finally','CmHopperFinal','end','getPreview','outbound','preview','dialOrderByScheduledAt','sequelize','transaction','direction','prev','hopperIds','priority','ASC','DESC','literal','COALESCE(CmHopper.UserId,\x200)\x20ASC','scheduledAt','COALESCE(CmHopper.UserId,\x200)\x20DESC','LOCK','UPDATE','CmCompany','Company','CmList','List','Queue','dialActive','getVoiceQueues','isNumber','CmHopper,\x20%s,\x20%s,\x20%s','getOpenContacts','entity\x20not\x20found','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','ejs','lodash','squel','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','update','destroy','then','sendStatus','error','stack','name','send','index','CmHopper','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','$and','$or','$gte','$lt','$lte','$ne','$eq','$notBetween','$in','$notIn','$notLike','$notILike','$like','$overlap','$contains','$contained','$any','attributes','fields','nolimit','order','sort','where','pick','filter','merge','map','VIRTUAL','options','includeAll','rows','show','params','length','include','find','catch','create','body','describe','VoiceQueueId','CampaignId'];(function(_0x1755e3,_0x22807c){var _0xba0a67=function(_0x1812af){while(--_0x1812af){_0x1755e3['push'](_0x1755e3['shift']());}};_0xba0a67(++_0x22807c);}(_0xb0dc,0xbd));var _0xcb0d=function(_0x2f936d,_0x5c4dd2){_0x2f936d=_0x2f936d-0x0;var _0x8a8be4=_0xb0dc[_0x2f936d];return _0x8a8be4;};'use strict';var emlformat=require(_0xcb0d('0x0'));var rimraf=require(_0xcb0d('0x1'));var zipdir=require(_0xcb0d('0x2'));var jsonpatch=require(_0xcb0d('0x3'));var rp=require('request-promise');var moment=require(_0xcb0d('0x4'));var BPromise=require(_0xcb0d('0x5'));var Mustache=require(_0xcb0d('0x6'));var util=require(_0xcb0d('0x7'));var path=require('path');var sox=require('sox');var csv=require('to-csv');var ejs=require(_0xcb0d('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xcb0d('0x9'));var squel=require(_0xcb0d('0xa'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0xcb0d('0xb'));var toCsv=require(_0xcb0d('0xc'));var querystring=require(_0xcb0d('0xd'));var Papa=require(_0xcb0d('0xe'));var Redis=require(_0xcb0d('0xf'));var authService=require(_0xcb0d('0x10'));var qs=require(_0xcb0d('0x11'));var as=require(_0xcb0d('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xcb0d('0x13'))(_0xcb0d('0x14'));var utils=require(_0xcb0d('0x15'));var config=require(_0xcb0d('0x16'));var licenseUtil=require('../../config/license/util');var db=require(_0xcb0d('0x17'))['db'];function respondWithStatusCode(_0x4835cc,_0x3e277b){_0x3e277b=_0x3e277b||0xcc;return function(_0x399e38){if(_0x399e38){return _0x4835cc['sendStatus'](_0x3e277b);}return _0x4835cc['status'](_0x3e277b)['end']();};}function respondWithResult(_0x4d4ba7,_0x1e0770){_0x1e0770=_0x1e0770||0xc8;return function(_0x37d8df){if(_0x37d8df){return _0x4d4ba7[_0xcb0d('0x18')](_0x1e0770)[_0xcb0d('0x19')](_0x37d8df);}};}function respondWithFilteredResult(_0x9ad407,_0x196629){return function(_0x1bac4c){if(_0x1bac4c){var _0x411d5d=typeof _0x196629[_0xcb0d('0x1a')]===_0xcb0d('0x1b')&&typeof _0x196629[_0xcb0d('0x1c')]===_0xcb0d('0x1b');var _0xd5d214=_0x1bac4c[_0xcb0d('0x1d')];var _0x2d2ba4=_0x411d5d?0x0:_0x196629[_0xcb0d('0x1a')];var _0x26f523=_0x411d5d?_0x1bac4c[_0xcb0d('0x1d')]:_0x196629[_0xcb0d('0x1a')]+_0x196629[_0xcb0d('0x1c')];var _0x3ed105;if(_0x26f523>=_0xd5d214){_0x26f523=_0xd5d214;_0x3ed105=0xc8;}else{_0x3ed105=0xce;}_0x9ad407['status'](_0x3ed105);return _0x9ad407[_0xcb0d('0x1e')](_0xcb0d('0x1f'),_0x2d2ba4+'-'+_0x26f523+'/'+_0xd5d214)[_0xcb0d('0x19')](_0x1bac4c);}return null;};}function patchUpdates(_0x3fea9f){return function(_0x22e3c9){try{jsonpatch[_0xcb0d('0x20')](_0x22e3c9,_0x3fea9f,!![]);}catch(_0x1adc15){return BPromise[_0xcb0d('0x21')](_0x1adc15);}return _0x22e3c9['save']();};}function saveUpdates(_0x3f703a,_0x50eb17){return function(_0x1545f4){if(_0x1545f4){return _0x1545f4[_0xcb0d('0x22')](_0x3f703a)['then'](function(_0x4b3808){return _0x4b3808;});}return null;};}function removeEntity(_0x4400bd,_0x389dd3){return function(_0x456bbb){if(_0x456bbb){return _0x456bbb[_0xcb0d('0x23')]()[_0xcb0d('0x24')](function(){_0x4400bd[_0xcb0d('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0x240726,_0x241dab){return function(_0x1b4859){if(!_0x1b4859){_0x240726[_0xcb0d('0x25')](0x194);}return _0x1b4859;};}function handleError(_0x4ee072,_0x11199d){_0x11199d=_0x11199d||0x1f4;return function(_0x52cfa1){logger[_0xcb0d('0x26')](_0x52cfa1[_0xcb0d('0x27')]);if(_0x52cfa1[_0xcb0d('0x28')]){delete _0x52cfa1['name'];}_0x4ee072[_0xcb0d('0x18')](_0x11199d)[_0xcb0d('0x29')](_0x52cfa1);};}exports[_0xcb0d('0x2a')]=function(_0x587d54,_0x30421e){var _0x509246={},_0x58f7b4={},_0x788a05={'count':0x0,'rows':[]};var _0x1163d1=_['map'](db[_0xcb0d('0x2b')][_0xcb0d('0x2c')],function(_0x58fa47){return{'name':_0x58fa47[_0xcb0d('0x2d')],'type':_0x58fa47[_0xcb0d('0x2e')][_0xcb0d('0x2f')]};});_0x58f7b4[_0xcb0d('0x30')]=_['map'](_0x1163d1,_0xcb0d('0x28'));_0x58f7b4[_0xcb0d('0x31')]=_[_0xcb0d('0x32')](_0x587d54[_0xcb0d('0x31')]);_0x58f7b4[_0xcb0d('0x33')]=_[_0xcb0d('0x34')](_0x58f7b4[_0xcb0d('0x30')],_0x58f7b4[_0xcb0d('0x31')]);_0x58f7b4[_0xcb0d('0x33')]=_['concat'](_0x58f7b4[_0xcb0d('0x33')],[_0xcb0d('0x35'),_0xcb0d('0x36'),'$gt',_0xcb0d('0x37'),_0xcb0d('0x38'),_0xcb0d('0x39'),_0xcb0d('0x3a'),_0xcb0d('0x3b'),'$not','$between',_0xcb0d('0x3c'),_0xcb0d('0x3d'),_0xcb0d('0x3e'),'$like',_0xcb0d('0x3f'),'$iLike',_0xcb0d('0x40'),_0xcb0d('0x41'),_0xcb0d('0x42'),_0xcb0d('0x43'),_0xcb0d('0x44'),_0xcb0d('0x45')]);_0x509246[_0xcb0d('0x46')]=_[_0xcb0d('0x34')](_0x58f7b4['model'],qs['fields'](_0x587d54['query'][_0xcb0d('0x47')]));_0x509246[_0xcb0d('0x46')]=_0x509246[_0xcb0d('0x46')]['length']?_0x509246[_0xcb0d('0x46')]:_0x58f7b4['model'];if(!_0x587d54[_0xcb0d('0x31')]['hasOwnProperty'](_0xcb0d('0x48'))){_0x509246['limit']=qs[_0xcb0d('0x1c')](_0x587d54[_0xcb0d('0x31')][_0xcb0d('0x1c')]);_0x509246['offset']=qs[_0xcb0d('0x1a')](_0x587d54[_0xcb0d('0x31')][_0xcb0d('0x1a')]);}_0x509246[_0xcb0d('0x49')]=qs[_0xcb0d('0x4a')](_0x587d54[_0xcb0d('0x31')]['sort']);_0x509246[_0xcb0d('0x4b')]=qs[_0xcb0d('0x33')](_[_0xcb0d('0x4c')](_0x587d54[_0xcb0d('0x31')],_0x58f7b4['filters']),_0x1163d1);if(_0x587d54[_0xcb0d('0x31')][_0xcb0d('0x4d')]){_0x509246[_0xcb0d('0x4b')]=_[_0xcb0d('0x4e')](_0x509246[_0xcb0d('0x4b')],{'$or':_[_0xcb0d('0x4f')](_0x1163d1,function(_0x2da2ea){if(_0x2da2ea[_0xcb0d('0x2e')]!==_0xcb0d('0x50')){var _0x4cfade={};_0x4cfade[_0x2da2ea[_0xcb0d('0x28')]]={'$like':'%'+_0x587d54[_0xcb0d('0x31')][_0xcb0d('0x4d')]+'%'};return _0x4cfade;}})});}_0x509246=_[_0xcb0d('0x4e')]({},_0x509246,_0x587d54[_0xcb0d('0x51')]);var _0x44653e={'where':_0x509246[_0xcb0d('0x4b')]};return db[_0xcb0d('0x2b')][_0xcb0d('0x1d')](_0x44653e)[_0xcb0d('0x24')](function(_0x108f94){_0x788a05[_0xcb0d('0x1d')]=_0x108f94;if(_0x587d54[_0xcb0d('0x31')][_0xcb0d('0x52')]){_0x509246['include']=[{'all':!![]}];}return db[_0xcb0d('0x2b')]['findAll'](_0x509246);})[_0xcb0d('0x24')](function(_0x35a1b1){_0x788a05[_0xcb0d('0x53')]=_0x35a1b1;return _0x788a05;})[_0xcb0d('0x24')](respondWithFilteredResult(_0x30421e,_0x509246))['catch'](handleError(_0x30421e,null));};exports[_0xcb0d('0x54')]=function(_0x53d515,_0x446685){var _0x5c55c7={'raw':!![],'where':{'id':_0x53d515[_0xcb0d('0x55')]['id']}},_0x182271={};_0x182271['model']=_['keys'](db[_0xcb0d('0x2b')][_0xcb0d('0x2c')]);_0x182271[_0xcb0d('0x31')]=_[_0xcb0d('0x32')](_0x53d515['query']);_0x182271['filters']=_[_0xcb0d('0x34')](_0x182271[_0xcb0d('0x30')],_0x182271[_0xcb0d('0x31')]);_0x5c55c7[_0xcb0d('0x46')]=_[_0xcb0d('0x34')](_0x182271[_0xcb0d('0x30')],qs['fields'](_0x53d515[_0xcb0d('0x31')][_0xcb0d('0x47')]));_0x5c55c7[_0xcb0d('0x46')]=_0x5c55c7[_0xcb0d('0x46')][_0xcb0d('0x56')]?_0x5c55c7[_0xcb0d('0x46')]:_0x182271[_0xcb0d('0x30')];if(_0x53d515[_0xcb0d('0x31')][_0xcb0d('0x52')]){_0x5c55c7[_0xcb0d('0x57')]=[{'all':!![]}];}_0x5c55c7=_[_0xcb0d('0x4e')]({},_0x5c55c7,_0x53d515[_0xcb0d('0x51')]);return db[_0xcb0d('0x2b')][_0xcb0d('0x58')](_0x5c55c7)[_0xcb0d('0x24')](handleEntityNotFound(_0x446685,null))[_0xcb0d('0x24')](respondWithResult(_0x446685,null))[_0xcb0d('0x59')](handleError(_0x446685,null));};exports[_0xcb0d('0x5a')]=function(_0x24270e,_0x227a74){return db[_0xcb0d('0x2b')][_0xcb0d('0x5a')](_0x24270e['body'],{})[_0xcb0d('0x24')](respondWithResult(_0x227a74,0xc9))[_0xcb0d('0x59')](handleError(_0x227a74,null));};exports['update']=function(_0x47ce1d,_0x25bb48){if(_0x47ce1d['body']['id']){delete _0x47ce1d[_0xcb0d('0x5b')]['id'];}return db[_0xcb0d('0x2b')][_0xcb0d('0x58')]({'where':{'id':_0x47ce1d['params']['id']}})[_0xcb0d('0x24')](handleEntityNotFound(_0x25bb48,null))[_0xcb0d('0x24')](saveUpdates(_0x47ce1d[_0xcb0d('0x5b')],null))[_0xcb0d('0x24')](respondWithResult(_0x25bb48,null))['catch'](handleError(_0x25bb48,null));};exports[_0xcb0d('0x5c')]=function(_0x1f3285,_0x2b71d7){return db[_0xcb0d('0x2b')]['describe']()[_0xcb0d('0x24')](respondWithResult(_0x2b71d7,null))['catch'](handleError(_0x2b71d7,null));};exports[_0xcb0d('0x23')]=function(_0x43d14e,_0x4c3137){var _0x518866;return db[_0xcb0d('0x2b')][_0xcb0d('0x58')]({'where':{'id':_0x43d14e[_0xcb0d('0x55')]['id']}})[_0xcb0d('0x24')](handleEntityNotFound(_0x4c3137,null))[_0xcb0d('0x24')](function(_0x489e74){if(_0x489e74){return _0x489e74[_0xcb0d('0x23')]()['then'](function(_0x2dd760){return _0x2dd760;});}})[_0xcb0d('0x24')](function(_0x1eaba5){_0x518866=_0x1eaba5;if(_0x1eaba5){if(_0x1eaba5[_0xcb0d('0x5d')]||_0x1eaba5[_0xcb0d('0x5e')]){return db[_0x1eaba5[_0xcb0d('0x5d')]?'VoiceQueue':_0xcb0d('0x5f')][_0xcb0d('0x58')]({'where':{'id':_0x1eaba5[_0xcb0d('0x5d')]?_0x1eaba5[_0xcb0d('0x5d')]:_0x1eaba5[_0xcb0d('0x5e')]},'attributes':['id',_0xcb0d('0x28')],'raw':!![]});}}})[_0xcb0d('0x24')](function(_0x309e6e){var _0x19ef57={};if(_0x309e6e){_['merge'](_0x19ef57,_[_0xcb0d('0x60')](_0x518866[_0xcb0d('0x61')],[_0xcb0d('0x62'),_0xcb0d('0x63'),'id']));_0x19ef57['state']=0x15;_0x19ef57['statedesc']='deleted';_0x19ef57['campaign']=_0x309e6e[_0xcb0d('0x28')];_0x19ef57['membername']=_0x43d14e['user'][_0xcb0d('0x28')];_0x19ef57['UserId']=_0x43d14e[_0xcb0d('0x64')]['id'];_0x19ef57['deleted']=!![];_0x19ef57[_0xcb0d('0x65')]=moment()['format'](_0xcb0d('0x66'));_0x19ef57['calleridnum']=_0x518866['phone'];_0x19ef57['campaigntype']=_0x518866[_0xcb0d('0x5d')]?_0xcb0d('0x67'):'ivr';return db[_0xcb0d('0x68')][_0xcb0d('0x58')]({'where':{'id':_0x19ef57[_0xcb0d('0x69')]},'attributes':[_0xcb0d('0x6a'),'lastName']})[_0xcb0d('0x24')](function(_0x1c6cf0){if(!_['isNil'](_0x4c3137)&&!_[_0xcb0d('0x6b')](_0x1c6cf0[_0xcb0d('0x6a')])){_0x19ef57[_0xcb0d('0x6c')]=_0x1c6cf0['firstName'];if(!_[_0xcb0d('0x6b')](_0x1c6cf0[_0xcb0d('0x6d')])){_0x19ef57[_0xcb0d('0x6c')]+='\x20'+_0x1c6cf0['lastName'];}}})[_0xcb0d('0x6e')](function(){return db[_0xcb0d('0x6f')][_0xcb0d('0x5a')](_0x19ef57);});}})[_0xcb0d('0x24')](function(){return _0x4c3137[_0xcb0d('0x18')](0xcc)[_0xcb0d('0x70')]();})[_0xcb0d('0x59')](handleError(_0x4c3137,null));};exports[_0xcb0d('0x71')]=function(_0x4a0486,_0x31adde,_0x420ed4){var _0x276ad0=[];return db[_0xcb0d('0x68')]['describe']()[_0xcb0d('0x24')](function(_0x27f9e8){_0x276ad0=_[_0xcb0d('0x32')](_0x27f9e8);return _0x4a0486['user']['getVoiceQueues']({'where':{'type':_0xcb0d('0x72'),'dialActive':!![],'dialMethod':_0xcb0d('0x73')},'attributes':['id',_0xcb0d('0x74')],'raw':!![]});})['then'](function(_0x2ec721){if(_0x2ec721&&_0x2ec721['length']){return db[_0xcb0d('0x75')][_0xcb0d('0x76')](function(_0x30e078){var _0x1a10e3={'active':![],'recallme':![],'scheduledAt':{'$lte':moment()['format']('YYYY-MM-DD\x20HH:mm:ss')},'VoiceQueueId':{'$in':_[_0xcb0d('0x4f')](_0x2ec721,'id')},'$or':[{'UserId':null},{'UserId':_0x4a0486[_0xcb0d('0x64')]['id']}]};var _0x2e72f8=[];if(_0x4a0486[_0xcb0d('0x5b')]['direction']&&_0x4a0486[_0xcb0d('0x5b')][_0xcb0d('0x77')]===_0xcb0d('0x78')){if(!_['isEmpty'](_0x4a0486[_0xcb0d('0x5b')][_0xcb0d('0x79')])){_0x1a10e3['id']={'$in':_0x4a0486[_0xcb0d('0x5b')][_0xcb0d('0x79')]};}_0x2e72f8=[[_0xcb0d('0x7a'),'ASC'],['scheduledAt',_0x2ec721[0x0][_0xcb0d('0x74')]===_0xcb0d('0x7b')?_0xcb0d('0x7c'):_0xcb0d('0x7b')],db[_0xcb0d('0x75')][_0xcb0d('0x7d')](_0xcb0d('0x7e')),['id','DESC']];}else{if(!_['isEmpty'](_0x4a0486['body'][_0xcb0d('0x79')])){_0x1a10e3['id']={'$notIn':_0x4a0486[_0xcb0d('0x5b')][_0xcb0d('0x79')]};}_0x2e72f8=[[_0xcb0d('0x7a'),_0xcb0d('0x7c')],[_0xcb0d('0x7f'),_0x2ec721[0x0]['dialOrderByScheduledAt']],db['sequelize'][_0xcb0d('0x7d')](_0xcb0d('0x80')),['id',_0xcb0d('0x7b')]];}return db[_0xcb0d('0x2b')]['findOne']({'attributes':['id','scheduledat'],'where':_0x1a10e3,'order':_0x2e72f8,'transaction':_0x30e078,'lock':_0x30e078[_0xcb0d('0x81')][_0xcb0d('0x82')],'include':[{'model':db[_0xcb0d('0x68')],'as':'Contact','attributes':_0x276ad0,'include':[{'model':db[_0xcb0d('0x83')],'as':_0xcb0d('0x84'),'attributes':['id',_0xcb0d('0x28')]}]},{'model':db[_0xcb0d('0x85')],'as':_0xcb0d('0x86'),'attributes':['id',_0xcb0d('0x28')]},{'model':db['VoiceQueue'],'as':_0xcb0d('0x87'),'attributes':['id',_0xcb0d('0x28'),_0xcb0d('0x88')]}]})[_0xcb0d('0x24')](function(_0x44e572){if(_0x44e572){return _0x44e572['update']({'UserId':_0x4a0486[_0xcb0d('0x64')]['id']},{'transaction':_0x30e078});}});});}})[_0xcb0d('0x24')](handleEntityNotFound(_0x31adde,null))[_0xcb0d('0x24')](respondWithResult(_0x31adde,null))['catch'](handleError(_0x31adde,null));};exports['getOpenContacts']=function(_0x21cacc,_0xc267f3,_0x1c2e69){return _0x21cacc['user'][_0xcb0d('0x89')]({'where':{'type':_0xcb0d('0x72'),'dialActive':!![],'dialMethod':_0xcb0d('0x73')},'attributes':['id'],'raw':!![]})[_0xcb0d('0x24')](function(_0x4c76b9){if(_0x4c76b9&&_0x4c76b9['length']){return db['CmHopper'][_0xcb0d('0x1d')]({'where':{'active':![],'recallme':![],'scheduledAt':{'$lte':moment()['format'](_0xcb0d('0x66'))},'VoiceQueueId':{'$in':_[_0xcb0d('0x4f')](_0x4c76b9,'id')},'$or':[{'UserId':null},{'UserId':_0x21cacc[_0xcb0d('0x64')]['id']}]}});}return 0x0;})[_0xcb0d('0x24')](function(_0x57d465){if(!_[_0xcb0d('0x6b')](_0x57d465)&&_[_0xcb0d('0x8a')](_0x57d465)){return _0xc267f3[_0xcb0d('0x18')](0xc8)['json']({'contacts':_0x57d465});}else{logger['error'](_0xcb0d('0x8b'),_0xcb0d('0x8c'),0x194,_0xcb0d('0x8d'));_0xc267f3[_0xcb0d('0x25')](0x194);}})[_0xcb0d('0x59')](handleError(_0xc267f3,null));}; \ No newline at end of file +var _0xc01b=['ivr','CmContact','firstName','lastName','isNil','calleridname','finally','getPreview','getVoiceQueues','outbound','preview','transaction','direction','prev','isEmpty','hopperIds','priority','ASC','scheduledAt','dialOrderByScheduledAt','sequelize','literal','COALESCE(CmHopper.UserId,\x200)\x20ASC','COALESCE(CmHopper.UserId,\x200)\x20DESC','LOCK','UPDATE','Contact','CmCompany','Company','CmList','List','Queue','dialActive','getOpenContacts','isNumber','CmHopper,\x20%s,\x20%s,\x20%s','entity\x20not\x20found','eml-format','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','end','json','undefined','count','offset','limit','set','Content-Range','apply','reject','save','update','destroy','then','error','stack','name','send','index','map','CmHopper','rawAttributes','fieldName','type','model','query','keys','filters','intersection','concat','$and','$gt','$gte','$lt','$lte','$not','$between','$notBetween','$in','$notIn','$like','$notLike','$iLike','$notILike','$contains','$contained','attributes','fields','length','nolimit','order','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','catch','show','params','find','create','body','describe','VoiceQueueId','CampaignId','VoiceQueue','Campaign','omit','dataValues','createdAt','state','statedesc','deleted','user','UserId','format','YYYY-MM-DD\x20HH:mm:ss','phone','campaigntype'];(function(_0x5e3577,_0x4aad41){var _0x382f94=function(_0x56de3e){while(--_0x56de3e){_0x5e3577['push'](_0x5e3577['shift']());}};_0x382f94(++_0x4aad41);}(_0xc01b,0xb9));var _0xbc01=function(_0x3e3e13,_0xed5886){_0x3e3e13=_0x3e3e13-0x0;var _0x596203=_0xc01b[_0x3e3e13];return _0x596203;};'use strict';var emlformat=require(_0xbc01('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xbc01('0x1'));var jsonpatch=require(_0xbc01('0x2'));var rp=require(_0xbc01('0x3'));var moment=require('moment');var BPromise=require(_0xbc01('0x4'));var Mustache=require(_0xbc01('0x5'));var util=require(_0xbc01('0x6'));var path=require('path');var sox=require(_0xbc01('0x7'));var csv=require(_0xbc01('0x8'));var ejs=require(_0xbc01('0x9'));var fs=require('fs');var fs_extra=require(_0xbc01('0xa'));var _=require(_0xbc01('0xb'));var squel=require(_0xbc01('0xc'));var crypto=require(_0xbc01('0xd'));var jsforce=require(_0xbc01('0xe'));var deskjs=require(_0xbc01('0xf'));var toCsv=require('to-csv');var querystring=require(_0xbc01('0x10'));var Papa=require(_0xbc01('0x11'));var Redis=require('ioredis');var authService=require(_0xbc01('0x12'));var qs=require(_0xbc01('0x13'));var as=require(_0xbc01('0x14'));var hardwareService=require(_0xbc01('0x15'));var logger=require(_0xbc01('0x16'))('api');var utils=require(_0xbc01('0x17'));var config=require('../../config/environment');var licenseUtil=require(_0xbc01('0x18'));var db=require(_0xbc01('0x19'))['db'];function respondWithStatusCode(_0x3c0065,_0xdcb212){_0xdcb212=_0xdcb212||0xcc;return function(_0x575ae7){if(_0x575ae7){return _0x3c0065[_0xbc01('0x1a')](_0xdcb212);}return _0x3c0065[_0xbc01('0x1b')](_0xdcb212)[_0xbc01('0x1c')]();};}function respondWithResult(_0x2aa447,_0x36348e){_0x36348e=_0x36348e||0xc8;return function(_0x3ae6f1){if(_0x3ae6f1){return _0x2aa447['status'](_0x36348e)[_0xbc01('0x1d')](_0x3ae6f1);}};}function respondWithFilteredResult(_0x2a14d7,_0x434d43){return function(_0x3463b8){if(_0x3463b8){var _0x2481ef=typeof _0x434d43['offset']===_0xbc01('0x1e')&&typeof _0x434d43['limit']===_0xbc01('0x1e');var _0x50a34e=_0x3463b8[_0xbc01('0x1f')];var _0x2edb74=_0x2481ef?0x0:_0x434d43[_0xbc01('0x20')];var _0x1d9ad5=_0x2481ef?_0x3463b8[_0xbc01('0x1f')]:_0x434d43[_0xbc01('0x20')]+_0x434d43[_0xbc01('0x21')];var _0x4023fc;if(_0x1d9ad5>=_0x50a34e){_0x1d9ad5=_0x50a34e;_0x4023fc=0xc8;}else{_0x4023fc=0xce;}_0x2a14d7['status'](_0x4023fc);return _0x2a14d7[_0xbc01('0x22')](_0xbc01('0x23'),_0x2edb74+'-'+_0x1d9ad5+'/'+_0x50a34e)[_0xbc01('0x1d')](_0x3463b8);}return null;};}function patchUpdates(_0x335fe){return function(_0xd7b74f){try{jsonpatch[_0xbc01('0x24')](_0xd7b74f,_0x335fe,!![]);}catch(_0x2e2a76){return BPromise[_0xbc01('0x25')](_0x2e2a76);}return _0xd7b74f[_0xbc01('0x26')]();};}function saveUpdates(_0x3f3cf3,_0x2a29e4){return function(_0x260bf9){if(_0x260bf9){return _0x260bf9[_0xbc01('0x27')](_0x3f3cf3)['then'](function(_0x1d40a9){return _0x1d40a9;});}return null;};}function removeEntity(_0x571176,_0x22970a){return function(_0x3105a8){if(_0x3105a8){return _0x3105a8[_0xbc01('0x28')]()[_0xbc01('0x29')](function(){_0x571176[_0xbc01('0x1b')](0xcc)[_0xbc01('0x1c')]();});}};}function handleEntityNotFound(_0x4e6a89,_0x1fb583){return function(_0x3c7cbf){if(!_0x3c7cbf){_0x4e6a89[_0xbc01('0x1a')](0x194);}return _0x3c7cbf;};}function handleError(_0xc43581,_0x965ec1){_0x965ec1=_0x965ec1||0x1f4;return function(_0x5b0c07){logger[_0xbc01('0x2a')](_0x5b0c07[_0xbc01('0x2b')]);if(_0x5b0c07[_0xbc01('0x2c')]){delete _0x5b0c07[_0xbc01('0x2c')];}_0xc43581['status'](_0x965ec1)[_0xbc01('0x2d')](_0x5b0c07);};}exports[_0xbc01('0x2e')]=function(_0x399afa,_0x95c07e){var _0x46727a={},_0x1b5c5f={},_0x17342e={'count':0x0,'rows':[]};var _0x4e3323=_[_0xbc01('0x2f')](db[_0xbc01('0x30')][_0xbc01('0x31')],function(_0x2c68b6){return{'name':_0x2c68b6[_0xbc01('0x32')],'type':_0x2c68b6[_0xbc01('0x33')]['key']};});_0x1b5c5f[_0xbc01('0x34')]=_['map'](_0x4e3323,_0xbc01('0x2c'));_0x1b5c5f[_0xbc01('0x35')]=_[_0xbc01('0x36')](_0x399afa[_0xbc01('0x35')]);_0x1b5c5f[_0xbc01('0x37')]=_[_0xbc01('0x38')](_0x1b5c5f[_0xbc01('0x34')],_0x1b5c5f[_0xbc01('0x35')]);_0x1b5c5f[_0xbc01('0x37')]=_[_0xbc01('0x39')](_0x1b5c5f[_0xbc01('0x37')],[_0xbc01('0x3a'),'$or',_0xbc01('0x3b'),_0xbc01('0x3c'),_0xbc01('0x3d'),_0xbc01('0x3e'),'$ne','$eq',_0xbc01('0x3f'),_0xbc01('0x40'),_0xbc01('0x41'),_0xbc01('0x42'),_0xbc01('0x43'),_0xbc01('0x44'),_0xbc01('0x45'),_0xbc01('0x46'),_0xbc01('0x47'),_0xbc01('0x44'),'$overlap',_0xbc01('0x48'),_0xbc01('0x49'),'$any']);_0x46727a[_0xbc01('0x4a')]=_[_0xbc01('0x38')](_0x1b5c5f[_0xbc01('0x34')],qs[_0xbc01('0x4b')](_0x399afa[_0xbc01('0x35')][_0xbc01('0x4b')]));_0x46727a[_0xbc01('0x4a')]=_0x46727a['attributes'][_0xbc01('0x4c')]?_0x46727a['attributes']:_0x1b5c5f[_0xbc01('0x34')];if(!_0x399afa[_0xbc01('0x35')]['hasOwnProperty'](_0xbc01('0x4d'))){_0x46727a['limit']=qs[_0xbc01('0x21')](_0x399afa[_0xbc01('0x35')][_0xbc01('0x21')]);_0x46727a[_0xbc01('0x20')]=qs[_0xbc01('0x20')](_0x399afa['query'][_0xbc01('0x20')]);}_0x46727a[_0xbc01('0x4e')]=qs['sort'](_0x399afa[_0xbc01('0x35')]['sort']);_0x46727a[_0xbc01('0x4f')]=qs[_0xbc01('0x37')](_[_0xbc01('0x50')](_0x399afa['query'],_0x1b5c5f['filters']),_0x4e3323);if(_0x399afa[_0xbc01('0x35')][_0xbc01('0x51')]){_0x46727a[_0xbc01('0x4f')]=_[_0xbc01('0x52')](_0x46727a['where'],{'$or':_[_0xbc01('0x2f')](_0x4e3323,function(_0x1ae198){if(_0x1ae198[_0xbc01('0x33')]!==_0xbc01('0x53')){var _0x34e785={};_0x34e785[_0x1ae198['name']]={'$like':'%'+_0x399afa[_0xbc01('0x35')][_0xbc01('0x51')]+'%'};return _0x34e785;}})});}_0x46727a=_[_0xbc01('0x52')]({},_0x46727a,_0x399afa[_0xbc01('0x54')]);var _0x392b58={'where':_0x46727a[_0xbc01('0x4f')]};return db[_0xbc01('0x30')][_0xbc01('0x1f')](_0x392b58)[_0xbc01('0x29')](function(_0x5321c9){_0x17342e[_0xbc01('0x1f')]=_0x5321c9;if(_0x399afa['query'][_0xbc01('0x55')]){_0x46727a[_0xbc01('0x56')]=[{'all':!![]}];}return db['CmHopper'][_0xbc01('0x57')](_0x46727a);})[_0xbc01('0x29')](function(_0x36cebd){_0x17342e['rows']=_0x36cebd;return _0x17342e;})[_0xbc01('0x29')](respondWithFilteredResult(_0x95c07e,_0x46727a))[_0xbc01('0x58')](handleError(_0x95c07e,null));};exports[_0xbc01('0x59')]=function(_0x41a265,_0xb97e35){var _0x30efeb={'raw':!![],'where':{'id':_0x41a265[_0xbc01('0x5a')]['id']}},_0x6e2a13={};_0x6e2a13[_0xbc01('0x34')]=_[_0xbc01('0x36')](db[_0xbc01('0x30')][_0xbc01('0x31')]);_0x6e2a13[_0xbc01('0x35')]=_[_0xbc01('0x36')](_0x41a265[_0xbc01('0x35')]);_0x6e2a13[_0xbc01('0x37')]=_[_0xbc01('0x38')](_0x6e2a13['model'],_0x6e2a13[_0xbc01('0x35')]);_0x30efeb[_0xbc01('0x4a')]=_[_0xbc01('0x38')](_0x6e2a13[_0xbc01('0x34')],qs['fields'](_0x41a265[_0xbc01('0x35')]['fields']));_0x30efeb[_0xbc01('0x4a')]=_0x30efeb[_0xbc01('0x4a')][_0xbc01('0x4c')]?_0x30efeb[_0xbc01('0x4a')]:_0x6e2a13[_0xbc01('0x34')];if(_0x41a265[_0xbc01('0x35')][_0xbc01('0x55')]){_0x30efeb['include']=[{'all':!![]}];}_0x30efeb=_[_0xbc01('0x52')]({},_0x30efeb,_0x41a265[_0xbc01('0x54')]);return db[_0xbc01('0x30')][_0xbc01('0x5b')](_0x30efeb)[_0xbc01('0x29')](handleEntityNotFound(_0xb97e35,null))['then'](respondWithResult(_0xb97e35,null))['catch'](handleError(_0xb97e35,null));};exports[_0xbc01('0x5c')]=function(_0x32eb9b,_0xb44786){return db[_0xbc01('0x30')][_0xbc01('0x5c')](_0x32eb9b[_0xbc01('0x5d')],{})['then'](respondWithResult(_0xb44786,0xc9))[_0xbc01('0x58')](handleError(_0xb44786,null));};exports['update']=function(_0xe8b7b3,_0x194bc3){if(_0xe8b7b3[_0xbc01('0x5d')]['id']){delete _0xe8b7b3[_0xbc01('0x5d')]['id'];}return db[_0xbc01('0x30')][_0xbc01('0x5b')]({'where':{'id':_0xe8b7b3['params']['id']}})[_0xbc01('0x29')](handleEntityNotFound(_0x194bc3,null))[_0xbc01('0x29')](saveUpdates(_0xe8b7b3[_0xbc01('0x5d')],null))[_0xbc01('0x29')](respondWithResult(_0x194bc3,null))['catch'](handleError(_0x194bc3,null));};exports[_0xbc01('0x5e')]=function(_0x4f125d,_0x1e74f4){return db[_0xbc01('0x30')]['describe']()['then'](respondWithResult(_0x1e74f4,null))[_0xbc01('0x58')](handleError(_0x1e74f4,null));};exports[_0xbc01('0x28')]=function(_0x162947,_0x3cadcb){var _0x47d8ae;return db[_0xbc01('0x30')][_0xbc01('0x5b')]({'where':{'id':_0x162947[_0xbc01('0x5a')]['id']}})[_0xbc01('0x29')](handleEntityNotFound(_0x3cadcb,null))[_0xbc01('0x29')](function(_0x28011b){if(_0x28011b){return _0x28011b[_0xbc01('0x28')]()['then'](function(_0x197a11){return _0x197a11;});}})['then'](function(_0x2dc3b3){_0x47d8ae=_0x2dc3b3;if(_0x2dc3b3){if(_0x2dc3b3[_0xbc01('0x5f')]||_0x2dc3b3[_0xbc01('0x60')]){return db[_0x2dc3b3[_0xbc01('0x5f')]?_0xbc01('0x61'):_0xbc01('0x62')][_0xbc01('0x5b')]({'where':{'id':_0x2dc3b3[_0xbc01('0x5f')]?_0x2dc3b3['VoiceQueueId']:_0x2dc3b3[_0xbc01('0x60')]},'attributes':['id','name'],'raw':!![]});}}})['then'](function(_0x4dbdc8){var _0xa129a3={};if(_0x4dbdc8){_[_0xbc01('0x52')](_0xa129a3,_[_0xbc01('0x63')](_0x47d8ae[_0xbc01('0x64')],[_0xbc01('0x65'),'updatedAt','id']));_0xa129a3[_0xbc01('0x66')]=0x15;_0xa129a3[_0xbc01('0x67')]=_0xbc01('0x68');_0xa129a3['campaign']=_0x4dbdc8[_0xbc01('0x2c')];_0xa129a3['membername']=_0x162947[_0xbc01('0x69')]['name'];_0xa129a3[_0xbc01('0x6a')]=_0x162947['user']['id'];_0xa129a3['deleted']=!![];_0xa129a3['deletedat']=moment()[_0xbc01('0x6b')](_0xbc01('0x6c'));_0xa129a3['calleridnum']=_0x47d8ae[_0xbc01('0x6d')];_0xa129a3[_0xbc01('0x6e')]=_0x47d8ae[_0xbc01('0x5f')]?'queue':_0xbc01('0x6f');return db[_0xbc01('0x70')][_0xbc01('0x5b')]({'where':{'id':_0xa129a3['ContactId']},'attributes':[_0xbc01('0x71'),_0xbc01('0x72')]})[_0xbc01('0x29')](function(_0x1d56cf){if(!_[_0xbc01('0x73')](_0x3cadcb)&&!_[_0xbc01('0x73')](_0x1d56cf[_0xbc01('0x71')])){_0xa129a3['calleridname']=_0x1d56cf[_0xbc01('0x71')];if(!_['isNil'](_0x1d56cf[_0xbc01('0x72')])){_0xa129a3[_0xbc01('0x74')]+='\x20'+_0x1d56cf[_0xbc01('0x72')];}}})[_0xbc01('0x75')](function(){return db['CmHopperFinal']['create'](_0xa129a3);});}})[_0xbc01('0x29')](function(){return _0x3cadcb['status'](0xcc)[_0xbc01('0x1c')]();})[_0xbc01('0x58')](handleError(_0x3cadcb,null));};exports[_0xbc01('0x76')]=function(_0x512912,_0x12963b,_0xbbdf19){var _0x3fe904=[];return db[_0xbc01('0x70')][_0xbc01('0x5e')]()[_0xbc01('0x29')](function(_0x2e7bae){_0x3fe904=_[_0xbc01('0x36')](_0x2e7bae);return _0x512912[_0xbc01('0x69')][_0xbc01('0x77')]({'where':{'type':_0xbc01('0x78'),'dialActive':!![],'dialMethod':_0xbc01('0x79')},'attributes':['id','dialOrderByScheduledAt'],'raw':!![]});})[_0xbc01('0x29')](function(_0x3fa116){if(_0x3fa116&&_0x3fa116['length']){return db['sequelize'][_0xbc01('0x7a')](function(_0x25a90b){var _0x2b8119={'active':![],'recallme':![],'scheduledAt':{'$lte':moment()[_0xbc01('0x6b')](_0xbc01('0x6c'))},'VoiceQueueId':{'$in':_[_0xbc01('0x2f')](_0x3fa116,'id')},'$or':[{'UserId':null},{'UserId':_0x512912['user']['id']}]};var _0x348d25=[];if(_0x512912[_0xbc01('0x5d')][_0xbc01('0x7b')]&&_0x512912[_0xbc01('0x5d')][_0xbc01('0x7b')]===_0xbc01('0x7c')){if(!_[_0xbc01('0x7d')](_0x512912[_0xbc01('0x5d')][_0xbc01('0x7e')])){_0x2b8119['id']={'$in':_0x512912[_0xbc01('0x5d')][_0xbc01('0x7e')]};}_0x348d25=[[_0xbc01('0x7f'),_0xbc01('0x80')],[_0xbc01('0x81'),_0x3fa116[0x0][_0xbc01('0x82')]===_0xbc01('0x80')?'DESC':_0xbc01('0x80')],db[_0xbc01('0x83')][_0xbc01('0x84')](_0xbc01('0x85')),['id','DESC']];}else{if(!_[_0xbc01('0x7d')](_0x512912[_0xbc01('0x5d')][_0xbc01('0x7e')])){_0x2b8119['id']={'$notIn':_0x512912['body'][_0xbc01('0x7e')]};}_0x348d25=[['priority','DESC'],[_0xbc01('0x81'),_0x3fa116[0x0][_0xbc01('0x82')]],db[_0xbc01('0x83')]['literal'](_0xbc01('0x86')),['id',_0xbc01('0x80')]];}return db[_0xbc01('0x30')]['findOne']({'attributes':['id','scheduledat'],'where':_0x2b8119,'order':_0x348d25,'transaction':_0x25a90b,'lock':_0x25a90b[_0xbc01('0x87')][_0xbc01('0x88')],'include':[{'model':db[_0xbc01('0x70')],'as':_0xbc01('0x89'),'attributes':_0x3fe904,'include':[{'model':db[_0xbc01('0x8a')],'as':_0xbc01('0x8b'),'attributes':['id',_0xbc01('0x2c')]}]},{'model':db[_0xbc01('0x8c')],'as':_0xbc01('0x8d'),'attributes':['id','name']},{'model':db[_0xbc01('0x61')],'as':_0xbc01('0x8e'),'attributes':['id',_0xbc01('0x2c'),_0xbc01('0x8f')]}]})[_0xbc01('0x29')](function(_0x4560da){if(_0x4560da){return _0x4560da[_0xbc01('0x27')]({'UserId':_0x512912[_0xbc01('0x69')]['id']},{'transaction':_0x25a90b});}});});}})[_0xbc01('0x29')](handleEntityNotFound(_0x12963b,null))[_0xbc01('0x29')](respondWithResult(_0x12963b,null))[_0xbc01('0x58')](handleError(_0x12963b,null));};exports[_0xbc01('0x90')]=function(_0x2b873a,_0x57c683,_0x4ecaa0){return _0x2b873a[_0xbc01('0x69')][_0xbc01('0x77')]({'where':{'type':'outbound','dialActive':!![],'dialMethod':_0xbc01('0x79')},'attributes':['id'],'raw':!![]})[_0xbc01('0x29')](function(_0x14f3c5){if(_0x14f3c5&&_0x14f3c5[_0xbc01('0x4c')]){return db[_0xbc01('0x30')][_0xbc01('0x1f')]({'where':{'active':![],'recallme':![],'scheduledAt':{'$lte':moment()['format'](_0xbc01('0x6c'))},'VoiceQueueId':{'$in':_['map'](_0x14f3c5,'id')},'$or':[{'UserId':null},{'UserId':_0x2b873a[_0xbc01('0x69')]['id']}]}});}return 0x0;})[_0xbc01('0x29')](function(_0x4bbe6e){if(!_[_0xbc01('0x73')](_0x4bbe6e)&&_[_0xbc01('0x91')](_0x4bbe6e)){return _0x57c683[_0xbc01('0x1b')](0xc8)[_0xbc01('0x1d')]({'contacts':_0x4bbe6e});}else{logger[_0xbc01('0x2a')](_0xbc01('0x92'),_0xbc01('0x90'),0x194,_0xbc01('0x93'));_0x57c683[_0xbc01('0x1a')](0x194);}})['catch'](handleError(_0x57c683,null));}; \ No newline at end of file diff --git a/server/api/cmHopper/cmHopper.model.js b/server/api/cmHopper/cmHopper.model.js index d28f6fc..f1c07e0 100644 --- a/server/api/cmHopper/cmHopper.model.js +++ b/server/api/cmHopper/cmHopper.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xafc4=['priority','lodash','../../config/logger','moment','bluebird','request-promise','path','exports','define','CmHopper','cm_hopper','scheduledat','phone'];(function(_0x1778f2,_0x2ae06a){var _0x933417=function(_0x14bced){while(--_0x14bced){_0x1778f2['push'](_0x1778f2['shift']());}};_0x933417(++_0x2ae06a);}(_0xafc4,0x69));var _0x4afc=function(_0x18301b,_0x37bc91){_0x18301b=_0x18301b-0x0;var _0x116583=_0xafc4[_0x18301b];return _0x116583;};'use strict';var _=require(_0x4afc('0x0'));var util=require('util');var logger=require(_0x4afc('0x1'))('api');var moment=require(_0x4afc('0x2'));var BPromise=require(_0x4afc('0x3'));var rp=require(_0x4afc('0x4'));var fs=require('fs');var path=require(_0x4afc('0x5'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require('./cmHopper.attributes');module[_0x4afc('0x6')]=function(_0x471d45,_0x16953b){return _0x471d45[_0x4afc('0x7')](_0x4afc('0x8'),attributes,{'tableName':_0x4afc('0x9'),'paranoid':![],'indexes':[{'name':'scheduledat','fields':[_0x4afc('0xa')]},{'name':_0x4afc('0xb'),'fields':[_0x4afc('0xb')]},{'name':_0x4afc('0xc'),'fields':[_0x4afc('0xc')]}],'timestamps':!![]});}; \ No newline at end of file +var _0x687b=['lodash','util','../../config/logger','api','request-promise','path','rimraf','../../config/environment','./cmHopper.attributes','exports','define','CmHopper','scheduledat','phone','priority'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x687b,0x14a));var _0xb687=function(_0x37bed5,_0x4fcea4){_0x37bed5=_0x37bed5-0x0;var _0xfd86c3=_0x687b[_0x37bed5];return _0xfd86c3;};'use strict';var _=require(_0xb687('0x0'));var util=require(_0xb687('0x1'));var logger=require(_0xb687('0x2'))(_0xb687('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xb687('0x4'));var fs=require('fs');var path=require(_0xb687('0x5'));var rimraf=require(_0xb687('0x6'));var config=require(_0xb687('0x7'));var attributes=require(_0xb687('0x8'));module[_0xb687('0x9')]=function(_0x16ccf3,_0xf43a1f){return _0x16ccf3[_0xb687('0xa')](_0xb687('0xb'),attributes,{'tableName':'cm_hopper','paranoid':![],'indexes':[{'name':_0xb687('0xc'),'fields':[_0xb687('0xc')]},{'name':'phone','fields':[_0xb687('0xd')]},{'name':_0xb687('0xe'),'fields':[_0xb687('0xe')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/cmHopper/cmHopper.rpc.js b/server/api/cmHopper/cmHopper.rpc.js index 10dec49..58a65a2 100644 --- a/server/api/cmHopper/cmHopper.rpc.js +++ b/server/api/cmHopper/cmHopper.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x734b=['GetContactDialer','MoveContactManagedDialer','CmHopperFinal','CountReScheduled','COUNT','format','contactsRescheduled','describe','all','GetContactRecallMe','GetCmHopperPreview','Contact','lodash','moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','CmHopper,\x20%s,\x20%s','request\x20sent','debug','CmHopper,\x20%s,\x20%s,\x20%s','stringify','error','message','CmHopper','options','raw','where','attributes','limit','include','map','model','GetCmHopper','catch','ShowCmHopper','find','CreateCmHopper','create','body','UpdateCmHopper','update','destroy','DestroyCmHopper','CmContact','sequelize','transaction','findAll','order','LOCK','UPDATE','keys','User','Agent','voicePause','length','UserId','push','includes'];(function(_0x3b91b8,_0x285a39){var _0x106cf9=function(_0x3730fd){while(--_0x3730fd){_0x3b91b8['push'](_0x3b91b8['shift']());}};_0x106cf9(++_0x285a39);}(_0x734b,0x1e1));var _0xb734=function(_0x1762b4,_0x33d836){_0x1762b4=_0x1762b4-0x0;var _0x29beda=_0x734b[_0x1762b4];return _0x29beda;};'use strict';var _=require(_0xb734('0x0'));var util=require('util');var moment=require(_0xb734('0x1'));var BPromise=require('bluebird');var rs=require(_0xb734('0x2'));var fs=require('fs');var Redis=require(_0xb734('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0xb734('0x4'));var logger=require(_0xb734('0x5'))(_0xb734('0x6'));var config=require(_0xb734('0x7'));var jayson=require(_0xb734('0x8'));var client=jayson[_0xb734('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x5310bb,_0x3236dd,_0x4615d5){return new BPromise(function(_0x182861,_0x3def06){return client[_0xb734('0xa')](_0x5310bb,_0x4615d5)[_0xb734('0xb')](function(_0x27e704){logger[_0xb734('0xc')](_0xb734('0xd'),_0x3236dd,_0xb734('0xe'));logger[_0xb734('0xf')](_0xb734('0x10'),_0x3236dd,_0xb734('0xe'),JSON[_0xb734('0x11')](_0x27e704));if(_0x27e704[_0xb734('0x12')]){if(_0x27e704[_0xb734('0x12')]['code']===0x1f4){logger['error']('CmHopper,\x20%s,\x20%s',_0x3236dd,_0x27e704['error'][_0xb734('0x13')]);return _0x3def06(_0x27e704[_0xb734('0x12')][_0xb734('0x13')]);}logger[_0xb734('0x12')](_0xb734('0xd'),_0x3236dd,_0x27e704[_0xb734('0x12')]['message']);return _0x182861(_0x27e704[_0xb734('0x12')][_0xb734('0x13')]);}else{logger[_0xb734('0xc')](_0xb734('0xd'),_0x3236dd,_0xb734('0xe'));_0x182861(_0x27e704['result'][_0xb734('0x13')]);}})['catch'](function(_0x31f104){logger[_0xb734('0x12')](_0xb734('0xd'),_0x3236dd,_0x31f104);_0x3def06(_0x31f104);});});}exports['GetCmHopper']=function(_0x1f4fc6){var _0x5c9703=this;return new Promise(function(_0x5e8996,_0x4f7fa8){return db[_0xb734('0x14')]['findAll']({'raw':_0x1f4fc6[_0xb734('0x15')]?_0x1f4fc6['options'][_0xb734('0x16')]===undefined?!![]:![]:!![],'where':_0x1f4fc6[_0xb734('0x15')]?_0x1f4fc6[_0xb734('0x15')][_0xb734('0x17')]||null:null,'attributes':_0x1f4fc6[_0xb734('0x15')]?_0x1f4fc6[_0xb734('0x15')][_0xb734('0x18')]||null:null,'limit':_0x1f4fc6[_0xb734('0x15')]?_0x1f4fc6['options'][_0xb734('0x19')]||null:null,'include':_0x1f4fc6[_0xb734('0x15')]?_0x1f4fc6[_0xb734('0x15')][_0xb734('0x1a')]?_[_0xb734('0x1b')](_0x1f4fc6[_0xb734('0x15')][_0xb734('0x1a')],function(_0x157eba){return{'model':db[_0x157eba[_0xb734('0x1c')]],'as':_0x157eba['as'],'attributes':_0x157eba[_0xb734('0x18')],'include':_0x157eba[_0xb734('0x1a')]?_['map'](_0x157eba['include'],function(_0x34fd0d){return{'model':db[_0x34fd0d[_0xb734('0x1c')]],'as':_0x34fd0d['as'],'attributes':_0x34fd0d['attributes'],'include':_0x34fd0d['include']?_['map'](_0x34fd0d[_0xb734('0x1a')],function(_0x2fdd1b){return{'model':db[_0x2fdd1b[_0xb734('0x1c')]],'as':_0x2fdd1b['as'],'attributes':_0x2fdd1b['attributes']};}):[]};}):[]};}):[]:[]})[_0xb734('0xb')](function(_0x409f00){logger[_0xb734('0xc')](_0xb734('0x1d'),_0x1f4fc6);logger[_0xb734('0xf')]('GetCmHopper',_0x1f4fc6,JSON[_0xb734('0x11')](_0x409f00));_0x5e8996(_0x409f00);})[_0xb734('0x1e')](function(_0x2acc75){logger['error'](_0xb734('0x1d'),_0x2acc75[_0xb734('0x13')],_0x1f4fc6);_0x4f7fa8(_0x5c9703[_0xb734('0x12')](0x1f4,_0x2acc75[_0xb734('0x13')]));});});};exports[_0xb734('0x1f')]=function(_0x3a23e7){var _0x22ea94=this;return new Promise(function(_0x40b90,_0x4f5522){return db[_0xb734('0x14')][_0xb734('0x20')]({'raw':_0x3a23e7[_0xb734('0x15')]?_0x3a23e7['options'][_0xb734('0x16')]===undefined?!![]:![]:!![],'where':_0x3a23e7[_0xb734('0x15')]?_0x3a23e7['options'][_0xb734('0x17')]||null:null,'attributes':_0x3a23e7[_0xb734('0x15')]?_0x3a23e7[_0xb734('0x15')][_0xb734('0x18')]||null:null,'include':_0x3a23e7[_0xb734('0x15')]?_0x3a23e7[_0xb734('0x15')][_0xb734('0x1a')]?_[_0xb734('0x1b')](_0x3a23e7['options'][_0xb734('0x1a')],function(_0x71b400){return{'model':db[_0x71b400[_0xb734('0x1c')]],'as':_0x71b400['as'],'attributes':_0x71b400[_0xb734('0x18')],'include':_0x71b400['include']?_[_0xb734('0x1b')](_0x71b400[_0xb734('0x1a')],function(_0x455df7){return{'model':db[_0x455df7[_0xb734('0x1c')]],'as':_0x455df7['as'],'attributes':_0x455df7['attributes'],'include':_0x455df7[_0xb734('0x1a')]?_[_0xb734('0x1b')](_0x455df7[_0xb734('0x1a')],function(_0x5ab03b){return{'model':db[_0x5ab03b['model']],'as':_0x5ab03b['as'],'attributes':_0x5ab03b['attributes']};}):[]};}):[]};}):[]:[]})[_0xb734('0xb')](function(_0x4d3abe){logger[_0xb734('0xc')](_0xb734('0x1f'),_0x3a23e7);logger[_0xb734('0xf')](_0xb734('0x1f'),_0x3a23e7,JSON[_0xb734('0x11')](_0x4d3abe));_0x40b90(_0x4d3abe);})[_0xb734('0x1e')](function(_0xed8b70){logger[_0xb734('0x12')](_0xb734('0x1f'),_0xed8b70[_0xb734('0x13')],_0x3a23e7);_0x4f5522(_0x22ea94[_0xb734('0x12')](0x1f4,_0xed8b70[_0xb734('0x13')]));});});};exports[_0xb734('0x21')]=function(_0x250cac){var _0x2d031d=this;return new Promise(function(_0x10d1bd,_0x5424e2){return db['CmHopper'][_0xb734('0x22')](_0x250cac[_0xb734('0x23')],{'raw':_0x250cac[_0xb734('0x15')]?_0x250cac['options']['raw']===undefined?!![]:![]:!![]})[_0xb734('0xb')](function(_0x179c04){logger[_0xb734('0xc')](_0xb734('0x21'),_0x250cac);logger[_0xb734('0xf')](_0xb734('0x21'),_0x250cac,JSON[_0xb734('0x11')](_0x179c04));_0x10d1bd(_0x179c04);})['catch'](function(_0x549f53){logger['error'](_0xb734('0x21'),_0x549f53[_0xb734('0x13')],_0x250cac);_0x5424e2(_0x2d031d[_0xb734('0x12')](0x1f4,_0x549f53[_0xb734('0x13')]));});});};exports[_0xb734('0x24')]=function(_0x5676f0){var _0x4fe6a1=this;return new Promise(function(_0x2900b5,_0x1eb87d){return db[_0xb734('0x14')][_0xb734('0x25')](_0x5676f0[_0xb734('0x23')],{'raw':_0x5676f0[_0xb734('0x15')]?_0x5676f0['options'][_0xb734('0x16')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x5676f0[_0xb734('0x15')]?_0x5676f0[_0xb734('0x15')][_0xb734('0x17')]||null:null,'attributes':_0x5676f0[_0xb734('0x15')]?_0x5676f0[_0xb734('0x15')][_0xb734('0x18')]||null:null,'limit':_0x5676f0['options']?_0x5676f0[_0xb734('0x15')][_0xb734('0x19')]||null:null})[_0xb734('0xb')](function(_0x2caea5){logger[_0xb734('0xc')](_0xb734('0x24'),_0x5676f0);logger[_0xb734('0xf')](_0xb734('0x24'),_0x5676f0,JSON['stringify'](_0x2caea5));_0x2900b5(_0x2caea5);})[_0xb734('0x1e')](function(_0x25dd8e){logger[_0xb734('0x12')](_0xb734('0x24'),_0x25dd8e['message'],_0x5676f0);_0x1eb87d(_0x4fe6a1[_0xb734('0x12')](0x1f4,_0x25dd8e[_0xb734('0x13')]));});});};exports['DestroyCmHopper']=function(_0x5ba92b){var _0x194f0d=this;return new Promise(function(_0xd3a2fc,_0x57348c){return db['CmHopper'][_0xb734('0x26')]({'where':_0x5ba92b['options']?_0x5ba92b[_0xb734('0x15')]['where']||null:null})[_0xb734('0xb')](function(_0x3fb16b){logger[_0xb734('0xc')]('DestroyCmHopper',_0x5ba92b);logger[_0xb734('0xf')](_0xb734('0x27'),_0x5ba92b,JSON['stringify'](_0x3fb16b));_0xd3a2fc(_0x3fb16b);})[_0xb734('0x1e')](function(_0x4d13cf){logger[_0xb734('0x12')]('DestroyCmHopper',_0x4d13cf[_0xb734('0x13')],_0x5ba92b);_0x57348c(_0x194f0d[_0xb734('0x12')](0x1f4,_0x4d13cf['message']));});});};exports['GetContactDialer']=function(_0x26aba1){var _0x1c8f4d=this;return new Promise(function(_0x506d51,_0x1fd71c){return db[_0xb734('0x28')]['describe']()['then'](function(_0x5b070c){return db[_0xb734('0x29')][_0xb734('0x2a')](function(_0x32af60){return db['CmHopper'][_0xb734('0x2b')]({'where':_0x26aba1['options']?_0x26aba1[_0xb734('0x15')]['where']||null:null,'attributes':_0x26aba1[_0xb734('0x15')]?_0x26aba1[_0xb734('0x15')]['attributes']||null:null,'limit':_0x26aba1[_0xb734('0x15')]?_0x26aba1[_0xb734('0x15')][_0xb734('0x19')]||null:null,'order':_0x26aba1['options']?_0x26aba1[_0xb734('0x15')][_0xb734('0x2c')]||null:null,'transaction':_0x32af60,'lock':_0x32af60[_0xb734('0x2d')][_0xb734('0x2e')],'include':[{'model':db[_0xb734('0x28')],'as':'Contact','attributes':_[_0xb734('0x2f')](_0x5b070c)},{'model':db[_0xb734('0x30')],'as':_0xb734('0x31'),'attributes':['id','name',_0xb734('0x32')]}]})[_0xb734('0xb')](function(_0x40f842){var _0x2c21a8=[];var _0x2fad3b=[];for(var _0x496cc2=0x0;_0x496cc2<_0x40f842[_0xb734('0x33')];_0x496cc2+=0x1){var _0xb62d91=_0x40f842[_0x496cc2][_0xb734('0x34')];if(_0xb62d91===null){_0x2c21a8[_0xb734('0x35')](_0x40f842[_0x496cc2][_0xb734('0x25')](_0x26aba1[_0xb734('0x23')],{'transaction':_0x32af60}));}else if(!_0x2fad3b[_0xb734('0x36')](_0xb62d91)){_0x2fad3b['push'](_0xb62d91);_0x2c21a8[_0xb734('0x35')](_0x40f842[_0x496cc2][_0xb734('0x25')](_0x26aba1[_0xb734('0x23')],{'transaction':_0x32af60}));}}return BPromise['all'](_0x2c21a8);});})[_0xb734('0xb')](function(_0x306e77){logger[_0xb734('0xc')](_0xb734('0x37'),_0x26aba1);logger[_0xb734('0xf')]('GetContactDialer',_0x26aba1,JSON[_0xb734('0x11')](_0x306e77));_0x506d51(_0x306e77);})[_0xb734('0x1e')](function(_0x1a8ab1){logger['error'](_0xb734('0x37'),_0x1a8ab1[_0xb734('0x13')],_0x26aba1);_0x1fd71c(_0x1c8f4d[_0xb734('0x12')](0x1f4,_0x1a8ab1[_0xb734('0x13')]));});});});};exports[_0xb734('0x38')]=function(_0x556a98){var _0x565f90=this;return new Promise(function(_0x105c09,_0xefba83){return db[_0xb734('0x29')][_0xb734('0x2a')](function(_0x43febf){return db[_0xb734('0x39')][_0xb734('0x22')](_0x556a98[_0xb734('0x23')],{'raw':_0x556a98[_0xb734('0x15')]?_0x556a98['options'][_0xb734('0x16')]===undefined?!![]:![]:!![],'transaction':_0x43febf})[_0xb734('0xb')](function(){return db['CmHopper']['destroy']({'where':_0x556a98[_0xb734('0x15')]?_0x556a98[_0xb734('0x15')][_0xb734('0x17')]||null:null,'transaction':_0x43febf});});})[_0xb734('0xb')](function(_0x1d32d0){logger[_0xb734('0xc')]('MoveContactManagedDialer',_0x556a98);logger[_0xb734('0xf')](_0xb734('0x38'),_0x556a98,JSON['stringify'](_0x1d32d0));_0x105c09(_0x1d32d0);})['catch'](function(_0x241574){logger['error'](_0xb734('0x38'),_0x241574[_0xb734('0x13')],_0x556a98);_0xefba83(_0x565f90[_0xb734('0x12')](0x1f4,_0x241574['message']));});});};exports[_0xb734('0x3a')]=function(_0x585883){var _0x1ff378=this;return new Promise(function(_0x114f50,_0x182031){return db[_0xb734('0x14')][_0xb734('0x2b')]({'raw':_0x585883[_0xb734('0x15')]?_0x585883[_0xb734('0x15')]['raw']===undefined?!![]:![]:!![],'where':_0x585883['options']?_0x585883[_0xb734('0x15')][_0xb734('0x17')]||null:null,'attributes':[[db['sequelize']['fn'](_0xb734('0x3b'),db[_0xb734('0x29')]['fn']('IF',db['sequelize']['literal']('`scheduledat`\x20>=\x20'+util[_0xb734('0x3c')]('\x22%s\x22',moment()[_0xb734('0x3c')]('YYYY-MM-DD\x20HH:mm:ss'))+'\x20,\x201,\x20null'))),_0xb734('0x3d')]]})['then'](function(_0x52670c){logger[_0xb734('0xc')](_0xb734('0x3a'),_0x585883);logger[_0xb734('0xf')](_0xb734('0x3a'),_0x585883,JSON[_0xb734('0x11')](_0x52670c));_0x114f50(_0x52670c);})['catch'](function(_0x33d237){logger[_0xb734('0x12')](_0xb734('0x3a'),_0x33d237[_0xb734('0x13')],_0x585883);_0x182031(_0x1ff378[_0xb734('0x12')](0x1f4,_0x33d237[_0xb734('0x13')]));});});};exports['GetContactRecallMe']=function(_0x5380ae){var _0x374f26=this;return new Promise(function(_0x1134c1,_0x11705b){return db[_0xb734('0x28')][_0xb734('0x3e')]()[_0xb734('0xb')](function(_0x15bdb3){return db[_0xb734('0x29')]['transaction'](function(_0x30a6c9){return db['CmHopper'][_0xb734('0x2b')]({'where':_0x5380ae[_0xb734('0x15')]?_0x5380ae[_0xb734('0x15')][_0xb734('0x17')]||null:null,'attributes':_0x5380ae[_0xb734('0x15')]?_0x5380ae[_0xb734('0x15')][_0xb734('0x18')]||null:null,'limit':0x1,'order':_0x5380ae[_0xb734('0x15')]?_0x5380ae[_0xb734('0x15')][_0xb734('0x2c')]||null:null,'group':db['CmHopper'][_0xb734('0x34')],'transaction':_0x30a6c9,'lock':_0x30a6c9[_0xb734('0x2d')][_0xb734('0x2e')],'include':_0x5380ae[_0xb734('0x15')]?_0x5380ae[_0xb734('0x15')][_0xb734('0x1a')]?_['map'](_0x5380ae[_0xb734('0x15')][_0xb734('0x1a')],function(_0x43dc1f){return{'model':db[_0x43dc1f[_0xb734('0x1c')]],'as':_0x43dc1f['as'],'attributes':_0x43dc1f['attributes'],'include':_0x43dc1f[_0xb734('0x1a')]?_[_0xb734('0x1b')](_0x43dc1f[_0xb734('0x1a')],function(_0x579208){return{'model':db[_0x579208[_0xb734('0x1c')]],'as':_0x579208['as'],'attributes':_0x579208[_0xb734('0x18')],'include':_0x579208[_0xb734('0x1a')]?_['map'](_0x579208[_0xb734('0x1a')],function(_0x46d770){return{'model':db[_0x46d770[_0xb734('0x1c')]],'as':_0x46d770['as'],'attributes':_0x46d770[_0xb734('0x18')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x1f967a){var _0x313488=[];for(var _0x3f9c2d=0x0;_0x3f9c2d<_0x1f967a['length'];_0x3f9c2d+=0x1){_0x313488[_0xb734('0x35')](_0x1f967a[_0x3f9c2d][_0xb734('0x25')](_0x5380ae['body'],{'transaction':_0x30a6c9}));}return BPromise[_0xb734('0x3f')](_0x313488);});})[_0xb734('0xb')](function(_0x5d076f){logger['info'](_0xb734('0x40'),_0x5380ae);logger['debug'](_0xb734('0x40'),_0x5380ae,JSON[_0xb734('0x11')](_0x5d076f));_0x1134c1(_0x5d076f);})[_0xb734('0x1e')](function(_0x17167f){logger['error'](_0xb734('0x40'),_0x17167f[_0xb734('0x13')],_0x5380ae);_0x11705b(_0x374f26[_0xb734('0x12')](0x1f4,_0x17167f[_0xb734('0x13')]));});});});};exports[_0xb734('0x41')]=function(_0x442737){var _0xbea823=this;return new Promise(function(_0x2f1b2a,_0x42648f){db[_0xb734('0x28')][_0xb734('0x3e')]()[_0xb734('0xb')](function(_0x79971c){return db['CmHopper'][_0xb734('0x2b')]({'raw':_0x442737[_0xb734('0x15')]?_0x442737['options'][_0xb734('0x16')]===undefined?!![]:![]:!![],'where':_0x442737['options']?_0x442737[_0xb734('0x15')][_0xb734('0x17')]||null:null,'attributes':_0x442737[_0xb734('0x15')]?_0x442737['options'][_0xb734('0x18')]||null:null,'limit':_0x442737['options']?_0x442737['options'][_0xb734('0x19')]||null:null,'include':_0x442737['options']?_0x442737[_0xb734('0x15')]['include']?_[_0xb734('0x1b')](_0x442737[_0xb734('0x15')][_0xb734('0x1a')],function(_0x234eec){return{'model':db[_0x234eec[_0xb734('0x1c')]],'as':_0x234eec['as'],'attributes':_0x234eec['as']===_0xb734('0x42')?_[_0xb734('0x2f')](_0x79971c):_0x234eec[_0xb734('0x18')],'include':_0x234eec['include']?_['map'](_0x234eec[_0xb734('0x1a')],function(_0x13d9fe){return{'model':db[_0x13d9fe[_0xb734('0x1c')]],'as':_0x13d9fe['as'],'attributes':_0x13d9fe[_0xb734('0x18')],'include':_0x13d9fe[_0xb734('0x1a')]?_[_0xb734('0x1b')](_0x13d9fe[_0xb734('0x1a')],function(_0x3b0e3b){return{'model':db[_0x3b0e3b[_0xb734('0x1c')]],'as':_0x3b0e3b['as'],'attributes':_0x3b0e3b[_0xb734('0x18')]};}):[]};}):[]};}):[]:[]})[_0xb734('0xb')](function(_0x536edb){logger[_0xb734('0xc')]('GetCmHopper',_0x442737);logger['debug'](_0xb734('0x1d'),_0x442737,JSON[_0xb734('0x11')](_0x536edb));_0x2f1b2a(_0x536edb);})['catch'](function(_0x28a6c3){logger[_0xb734('0x12')](_0xb734('0x1d'),_0x28a6c3[_0xb734('0x13')],_0x442737);_0x42648f(_0xbea823[_0xb734('0x12')](0x1f4,_0x28a6c3[_0xb734('0x13')]));});});});}; \ No newline at end of file +var _0xb2d5=['ShowCmHopper','CmHopper','find','create','body','CreateCmHopper','UpdateCmHopper','update','DestroyCmHopper','destroy','GetContactDialer','CmContact','describe','sequelize','LOCK','UPDATE','Contact','keys','User','Agent','voicePause','length','UserId','push','includes','all','MoveContactManagedDialer','CountReScheduled','findAll','COUNT','literal','format','YYYY-MM-DD\x20HH:mm:ss','\x20,\x201,\x20null','contactsRescheduled','GetContactRecallMe','transaction','order','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','CmHopper,\x20%s,\x20%s','debug','CmHopper,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','GetCmHopper','options','raw','where','limit','map','include','model','attributes'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xb2d5,0x6f));var _0x5b2d=function(_0x34fb4c,_0x409803){_0x34fb4c=_0x34fb4c-0x0;var _0x2a0bd8=_0xb2d5[_0x34fb4c];return _0x2a0bd8;};'use strict';var _=require(_0x5b2d('0x0'));var util=require(_0x5b2d('0x1'));var moment=require(_0x5b2d('0x2'));var BPromise=require(_0x5b2d('0x3'));var rs=require(_0x5b2d('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x5b2d('0x5'))['db'];var utils=require(_0x5b2d('0x6'));var logger=require(_0x5b2d('0x7'))(_0x5b2d('0x8'));var config=require(_0x5b2d('0x9'));var jayson=require(_0x5b2d('0xa'));var client=jayson[_0x5b2d('0xb')][_0x5b2d('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x43f635,_0x135caa,_0x5412bc){return new BPromise(function(_0xae63a7,_0x579b04){return client[_0x5b2d('0xd')](_0x43f635,_0x5412bc)[_0x5b2d('0xe')](function(_0x51af3a){logger[_0x5b2d('0xf')](_0x5b2d('0x10'),_0x135caa,'request\x20sent');logger[_0x5b2d('0x11')](_0x5b2d('0x12'),_0x135caa,_0x5b2d('0x13'),JSON[_0x5b2d('0x14')](_0x51af3a));if(_0x51af3a[_0x5b2d('0x15')]){if(_0x51af3a[_0x5b2d('0x15')][_0x5b2d('0x16')]===0x1f4){logger[_0x5b2d('0x15')]('CmHopper,\x20%s,\x20%s',_0x135caa,_0x51af3a['error'][_0x5b2d('0x17')]);return _0x579b04(_0x51af3a['error']['message']);}logger[_0x5b2d('0x15')]('CmHopper,\x20%s,\x20%s',_0x135caa,_0x51af3a['error'][_0x5b2d('0x17')]);return _0xae63a7(_0x51af3a[_0x5b2d('0x15')][_0x5b2d('0x17')]);}else{logger['info']('CmHopper,\x20%s,\x20%s',_0x135caa,_0x5b2d('0x13'));_0xae63a7(_0x51af3a[_0x5b2d('0x18')][_0x5b2d('0x17')]);}})[_0x5b2d('0x19')](function(_0x1c7da8){logger[_0x5b2d('0x15')]('CmHopper,\x20%s,\x20%s',_0x135caa,_0x1c7da8);_0x579b04(_0x1c7da8);});});}exports[_0x5b2d('0x1a')]=function(_0x299d28){var _0x428561=this;return new Promise(function(_0x3987be,_0x2b9a5d){return db['CmHopper']['findAll']({'raw':_0x299d28['options']?_0x299d28[_0x5b2d('0x1b')][_0x5b2d('0x1c')]===undefined?!![]:![]:!![],'where':_0x299d28['options']?_0x299d28['options'][_0x5b2d('0x1d')]||null:null,'attributes':_0x299d28[_0x5b2d('0x1b')]?_0x299d28[_0x5b2d('0x1b')]['attributes']||null:null,'limit':_0x299d28[_0x5b2d('0x1b')]?_0x299d28[_0x5b2d('0x1b')][_0x5b2d('0x1e')]||null:null,'include':_0x299d28[_0x5b2d('0x1b')]?_0x299d28[_0x5b2d('0x1b')]['include']?_[_0x5b2d('0x1f')](_0x299d28[_0x5b2d('0x1b')][_0x5b2d('0x20')],function(_0x5c577b){return{'model':db[_0x5c577b[_0x5b2d('0x21')]],'as':_0x5c577b['as'],'attributes':_0x5c577b[_0x5b2d('0x22')],'include':_0x5c577b['include']?_[_0x5b2d('0x1f')](_0x5c577b[_0x5b2d('0x20')],function(_0x3bd6f5){return{'model':db[_0x3bd6f5[_0x5b2d('0x21')]],'as':_0x3bd6f5['as'],'attributes':_0x3bd6f5[_0x5b2d('0x22')],'include':_0x3bd6f5[_0x5b2d('0x20')]?_[_0x5b2d('0x1f')](_0x3bd6f5[_0x5b2d('0x20')],function(_0x40b438){return{'model':db[_0x40b438[_0x5b2d('0x21')]],'as':_0x40b438['as'],'attributes':_0x40b438[_0x5b2d('0x22')]};}):[]};}):[]};}):[]:[]})[_0x5b2d('0xe')](function(_0x488281){logger[_0x5b2d('0xf')](_0x5b2d('0x1a'),_0x299d28);logger['debug']('GetCmHopper',_0x299d28,JSON[_0x5b2d('0x14')](_0x488281));_0x3987be(_0x488281);})[_0x5b2d('0x19')](function(_0x191ed0){logger['error'](_0x5b2d('0x1a'),_0x191ed0[_0x5b2d('0x17')],_0x299d28);_0x2b9a5d(_0x428561[_0x5b2d('0x15')](0x1f4,_0x191ed0[_0x5b2d('0x17')]));});});};exports[_0x5b2d('0x23')]=function(_0x271b2d){var _0xd2baca=this;return new Promise(function(_0x242214,_0x1ee5b6){return db[_0x5b2d('0x24')][_0x5b2d('0x25')]({'raw':_0x271b2d[_0x5b2d('0x1b')]?_0x271b2d[_0x5b2d('0x1b')][_0x5b2d('0x1c')]===undefined?!![]:![]:!![],'where':_0x271b2d['options']?_0x271b2d[_0x5b2d('0x1b')][_0x5b2d('0x1d')]||null:null,'attributes':_0x271b2d[_0x5b2d('0x1b')]?_0x271b2d[_0x5b2d('0x1b')][_0x5b2d('0x22')]||null:null,'include':_0x271b2d['options']?_0x271b2d[_0x5b2d('0x1b')][_0x5b2d('0x20')]?_[_0x5b2d('0x1f')](_0x271b2d[_0x5b2d('0x1b')][_0x5b2d('0x20')],function(_0x90805f){return{'model':db[_0x90805f['model']],'as':_0x90805f['as'],'attributes':_0x90805f[_0x5b2d('0x22')],'include':_0x90805f[_0x5b2d('0x20')]?_['map'](_0x90805f[_0x5b2d('0x20')],function(_0x518b2c){return{'model':db[_0x518b2c['model']],'as':_0x518b2c['as'],'attributes':_0x518b2c['attributes'],'include':_0x518b2c['include']?_[_0x5b2d('0x1f')](_0x518b2c[_0x5b2d('0x20')],function(_0x11aab0){return{'model':db[_0x11aab0[_0x5b2d('0x21')]],'as':_0x11aab0['as'],'attributes':_0x11aab0[_0x5b2d('0x22')]};}):[]};}):[]};}):[]:[]})[_0x5b2d('0xe')](function(_0x3a4ded){logger['info'](_0x5b2d('0x23'),_0x271b2d);logger[_0x5b2d('0x11')]('ShowCmHopper',_0x271b2d,JSON['stringify'](_0x3a4ded));_0x242214(_0x3a4ded);})['catch'](function(_0xf5983b){logger[_0x5b2d('0x15')](_0x5b2d('0x23'),_0xf5983b['message'],_0x271b2d);_0x1ee5b6(_0xd2baca[_0x5b2d('0x15')](0x1f4,_0xf5983b['message']));});});};exports['CreateCmHopper']=function(_0x5997f5){var _0x533b68=this;return new Promise(function(_0x4db90b,_0x22b26b){return db[_0x5b2d('0x24')][_0x5b2d('0x26')](_0x5997f5[_0x5b2d('0x27')],{'raw':_0x5997f5['options']?_0x5997f5['options'][_0x5b2d('0x1c')]===undefined?!![]:![]:!![]})[_0x5b2d('0xe')](function(_0x549a4a){logger['info']('CreateCmHopper',_0x5997f5);logger[_0x5b2d('0x11')](_0x5b2d('0x28'),_0x5997f5,JSON['stringify'](_0x549a4a));_0x4db90b(_0x549a4a);})['catch'](function(_0x5aa77e){logger[_0x5b2d('0x15')](_0x5b2d('0x28'),_0x5aa77e[_0x5b2d('0x17')],_0x5997f5);_0x22b26b(_0x533b68['error'](0x1f4,_0x5aa77e[_0x5b2d('0x17')]));});});};exports[_0x5b2d('0x29')]=function(_0xaa9aad){var _0x3e2d60=this;return new Promise(function(_0x2276f5,_0x208779){return db['CmHopper'][_0x5b2d('0x2a')](_0xaa9aad['body'],{'raw':_0xaa9aad[_0x5b2d('0x1b')]?_0xaa9aad[_0x5b2d('0x1b')][_0x5b2d('0x1c')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0xaa9aad[_0x5b2d('0x1b')]?_0xaa9aad[_0x5b2d('0x1b')][_0x5b2d('0x1d')]||null:null,'attributes':_0xaa9aad[_0x5b2d('0x1b')]?_0xaa9aad[_0x5b2d('0x1b')]['attributes']||null:null,'limit':_0xaa9aad[_0x5b2d('0x1b')]?_0xaa9aad[_0x5b2d('0x1b')]['limit']||null:null})[_0x5b2d('0xe')](function(_0x5cc700){logger['info'](_0x5b2d('0x29'),_0xaa9aad);logger[_0x5b2d('0x11')]('UpdateCmHopper',_0xaa9aad,JSON[_0x5b2d('0x14')](_0x5cc700));_0x2276f5(_0x5cc700);})['catch'](function(_0x4914a3){logger['error'](_0x5b2d('0x29'),_0x4914a3[_0x5b2d('0x17')],_0xaa9aad);_0x208779(_0x3e2d60[_0x5b2d('0x15')](0x1f4,_0x4914a3['message']));});});};exports[_0x5b2d('0x2b')]=function(_0x51292d){var _0x505163=this;return new Promise(function(_0x57c322,_0x364df2){return db[_0x5b2d('0x24')][_0x5b2d('0x2c')]({'where':_0x51292d[_0x5b2d('0x1b')]?_0x51292d[_0x5b2d('0x1b')][_0x5b2d('0x1d')]||null:null})[_0x5b2d('0xe')](function(_0x33f592){logger[_0x5b2d('0xf')](_0x5b2d('0x2b'),_0x51292d);logger['debug'](_0x5b2d('0x2b'),_0x51292d,JSON[_0x5b2d('0x14')](_0x33f592));_0x57c322(_0x33f592);})[_0x5b2d('0x19')](function(_0x19fd9f){logger[_0x5b2d('0x15')](_0x5b2d('0x2b'),_0x19fd9f[_0x5b2d('0x17')],_0x51292d);_0x364df2(_0x505163[_0x5b2d('0x15')](0x1f4,_0x19fd9f[_0x5b2d('0x17')]));});});};exports[_0x5b2d('0x2d')]=function(_0x517984){var _0x38d5ff=this;return new Promise(function(_0x5c54bf,_0x6d671){return db[_0x5b2d('0x2e')][_0x5b2d('0x2f')]()[_0x5b2d('0xe')](function(_0x362589){return db[_0x5b2d('0x30')]['transaction'](function(_0x2a2906){return db[_0x5b2d('0x24')]['findAll']({'where':_0x517984[_0x5b2d('0x1b')]?_0x517984[_0x5b2d('0x1b')][_0x5b2d('0x1d')]||null:null,'attributes':_0x517984['options']?_0x517984['options'][_0x5b2d('0x22')]||null:null,'limit':_0x517984[_0x5b2d('0x1b')]?_0x517984[_0x5b2d('0x1b')][_0x5b2d('0x1e')]||null:null,'order':_0x517984[_0x5b2d('0x1b')]?_0x517984[_0x5b2d('0x1b')]['order']||null:null,'transaction':_0x2a2906,'lock':_0x2a2906[_0x5b2d('0x31')][_0x5b2d('0x32')],'include':[{'model':db['CmContact'],'as':_0x5b2d('0x33'),'attributes':_[_0x5b2d('0x34')](_0x362589)},{'model':db[_0x5b2d('0x35')],'as':_0x5b2d('0x36'),'attributes':['id','name',_0x5b2d('0x37')]}]})[_0x5b2d('0xe')](function(_0x118960){var _0x52ae81=[];var _0x34e1f1=[];for(var _0x1b6e7a=0x0;_0x1b6e7a<_0x118960[_0x5b2d('0x38')];_0x1b6e7a+=0x1){var _0xaa3d06=_0x118960[_0x1b6e7a][_0x5b2d('0x39')];if(_0xaa3d06===null){_0x52ae81[_0x5b2d('0x3a')](_0x118960[_0x1b6e7a][_0x5b2d('0x2a')](_0x517984[_0x5b2d('0x27')],{'transaction':_0x2a2906}));}else if(!_0x34e1f1[_0x5b2d('0x3b')](_0xaa3d06)){_0x34e1f1[_0x5b2d('0x3a')](_0xaa3d06);_0x52ae81[_0x5b2d('0x3a')](_0x118960[_0x1b6e7a][_0x5b2d('0x2a')](_0x517984[_0x5b2d('0x27')],{'transaction':_0x2a2906}));}}return BPromise[_0x5b2d('0x3c')](_0x52ae81);});})[_0x5b2d('0xe')](function(_0x598788){logger['info'](_0x5b2d('0x2d'),_0x517984);logger[_0x5b2d('0x11')](_0x5b2d('0x2d'),_0x517984,JSON[_0x5b2d('0x14')](_0x598788));_0x5c54bf(_0x598788);})[_0x5b2d('0x19')](function(_0x72213e){logger[_0x5b2d('0x15')](_0x5b2d('0x2d'),_0x72213e[_0x5b2d('0x17')],_0x517984);_0x6d671(_0x38d5ff[_0x5b2d('0x15')](0x1f4,_0x72213e[_0x5b2d('0x17')]));});});});};exports['MoveContactManagedDialer']=function(_0x24aaa6){var _0x25d033=this;return new Promise(function(_0x2b85c7,_0x1e857f){return db['sequelize']['transaction'](function(_0x5f1498){return db['CmHopperFinal'][_0x5b2d('0x26')](_0x24aaa6[_0x5b2d('0x27')],{'raw':_0x24aaa6[_0x5b2d('0x1b')]?_0x24aaa6[_0x5b2d('0x1b')][_0x5b2d('0x1c')]===undefined?!![]:![]:!![],'transaction':_0x5f1498})[_0x5b2d('0xe')](function(){return db['CmHopper']['destroy']({'where':_0x24aaa6[_0x5b2d('0x1b')]?_0x24aaa6[_0x5b2d('0x1b')][_0x5b2d('0x1d')]||null:null,'transaction':_0x5f1498});});})[_0x5b2d('0xe')](function(_0x4d3a2a){logger[_0x5b2d('0xf')](_0x5b2d('0x3d'),_0x24aaa6);logger[_0x5b2d('0x11')](_0x5b2d('0x3d'),_0x24aaa6,JSON[_0x5b2d('0x14')](_0x4d3a2a));_0x2b85c7(_0x4d3a2a);})['catch'](function(_0x5b71e8){logger[_0x5b2d('0x15')]('MoveContactManagedDialer',_0x5b71e8[_0x5b2d('0x17')],_0x24aaa6);_0x1e857f(_0x25d033[_0x5b2d('0x15')](0x1f4,_0x5b71e8[_0x5b2d('0x17')]));});});};exports[_0x5b2d('0x3e')]=function(_0x270964){var _0x2826b3=this;return new Promise(function(_0x2a1201,_0x16a853){return db['CmHopper'][_0x5b2d('0x3f')]({'raw':_0x270964[_0x5b2d('0x1b')]?_0x270964[_0x5b2d('0x1b')]['raw']===undefined?!![]:![]:!![],'where':_0x270964[_0x5b2d('0x1b')]?_0x270964[_0x5b2d('0x1b')][_0x5b2d('0x1d')]||null:null,'attributes':[[db[_0x5b2d('0x30')]['fn'](_0x5b2d('0x40'),db[_0x5b2d('0x30')]['fn']('IF',db[_0x5b2d('0x30')][_0x5b2d('0x41')]('`scheduledat`\x20>=\x20'+util[_0x5b2d('0x42')]('\x22%s\x22',moment()[_0x5b2d('0x42')](_0x5b2d('0x43')))+_0x5b2d('0x44')))),_0x5b2d('0x45')]]})[_0x5b2d('0xe')](function(_0x36feec){logger[_0x5b2d('0xf')](_0x5b2d('0x3e'),_0x270964);logger['debug']('CountReScheduled',_0x270964,JSON[_0x5b2d('0x14')](_0x36feec));_0x2a1201(_0x36feec);})[_0x5b2d('0x19')](function(_0x37a7d9){logger['error'](_0x5b2d('0x3e'),_0x37a7d9[_0x5b2d('0x17')],_0x270964);_0x16a853(_0x2826b3[_0x5b2d('0x15')](0x1f4,_0x37a7d9[_0x5b2d('0x17')]));});});};exports[_0x5b2d('0x46')]=function(_0x1067bd){var _0x325a9e=this;return new Promise(function(_0xa3ed53,_0x3b9c46){return db[_0x5b2d('0x2e')][_0x5b2d('0x2f')]()[_0x5b2d('0xe')](function(_0x5ba245){return db[_0x5b2d('0x30')][_0x5b2d('0x47')](function(_0x5db907){return db[_0x5b2d('0x24')][_0x5b2d('0x3f')]({'where':_0x1067bd[_0x5b2d('0x1b')]?_0x1067bd[_0x5b2d('0x1b')][_0x5b2d('0x1d')]||null:null,'attributes':_0x1067bd[_0x5b2d('0x1b')]?_0x1067bd['options']['attributes']||null:null,'limit':0x1,'order':_0x1067bd[_0x5b2d('0x1b')]?_0x1067bd['options'][_0x5b2d('0x48')]||null:null,'group':db[_0x5b2d('0x24')][_0x5b2d('0x39')],'transaction':_0x5db907,'lock':_0x5db907['LOCK'][_0x5b2d('0x32')],'include':_0x1067bd['options']?_0x1067bd[_0x5b2d('0x1b')][_0x5b2d('0x20')]?_['map'](_0x1067bd['options'][_0x5b2d('0x20')],function(_0x335651){return{'model':db[_0x335651[_0x5b2d('0x21')]],'as':_0x335651['as'],'attributes':_0x335651[_0x5b2d('0x22')],'include':_0x335651[_0x5b2d('0x20')]?_[_0x5b2d('0x1f')](_0x335651['include'],function(_0x1ed277){return{'model':db[_0x1ed277['model']],'as':_0x1ed277['as'],'attributes':_0x1ed277[_0x5b2d('0x22')],'include':_0x1ed277[_0x5b2d('0x20')]?_[_0x5b2d('0x1f')](_0x1ed277['include'],function(_0x8ad0ed){return{'model':db[_0x8ad0ed[_0x5b2d('0x21')]],'as':_0x8ad0ed['as'],'attributes':_0x8ad0ed[_0x5b2d('0x22')]};}):[]};}):[]};}):[]:[]})[_0x5b2d('0xe')](function(_0x48384a){var _0x289a35=[];for(var _0x561b6b=0x0;_0x561b6b<_0x48384a[_0x5b2d('0x38')];_0x561b6b+=0x1){_0x289a35[_0x5b2d('0x3a')](_0x48384a[_0x561b6b][_0x5b2d('0x2a')](_0x1067bd[_0x5b2d('0x27')],{'transaction':_0x5db907}));}return BPromise['all'](_0x289a35);});})[_0x5b2d('0xe')](function(_0x1e45bd){logger[_0x5b2d('0xf')](_0x5b2d('0x46'),_0x1067bd);logger[_0x5b2d('0x11')]('GetContactRecallMe',_0x1067bd,JSON['stringify'](_0x1e45bd));_0xa3ed53(_0x1e45bd);})['catch'](function(_0x4a6db5){logger['error'](_0x5b2d('0x46'),_0x4a6db5[_0x5b2d('0x17')],_0x1067bd);_0x3b9c46(_0x325a9e[_0x5b2d('0x15')](0x1f4,_0x4a6db5[_0x5b2d('0x17')]));});});});};exports['GetCmHopperPreview']=function(_0x434ee6){var _0x3414b4=this;return new Promise(function(_0x38ea7c,_0x5c1256){db[_0x5b2d('0x2e')][_0x5b2d('0x2f')]()['then'](function(_0xfaadad){return db['CmHopper'][_0x5b2d('0x3f')]({'raw':_0x434ee6[_0x5b2d('0x1b')]?_0x434ee6[_0x5b2d('0x1b')]['raw']===undefined?!![]:![]:!![],'where':_0x434ee6['options']?_0x434ee6['options'][_0x5b2d('0x1d')]||null:null,'attributes':_0x434ee6['options']?_0x434ee6[_0x5b2d('0x1b')][_0x5b2d('0x22')]||null:null,'limit':_0x434ee6[_0x5b2d('0x1b')]?_0x434ee6[_0x5b2d('0x1b')][_0x5b2d('0x1e')]||null:null,'include':_0x434ee6[_0x5b2d('0x1b')]?_0x434ee6[_0x5b2d('0x1b')][_0x5b2d('0x20')]?_[_0x5b2d('0x1f')](_0x434ee6[_0x5b2d('0x1b')][_0x5b2d('0x20')],function(_0x328627){return{'model':db[_0x328627['model']],'as':_0x328627['as'],'attributes':_0x328627['as']===_0x5b2d('0x33')?_['keys'](_0xfaadad):_0x328627['attributes'],'include':_0x328627[_0x5b2d('0x20')]?_[_0x5b2d('0x1f')](_0x328627[_0x5b2d('0x20')],function(_0x16ec3a){return{'model':db[_0x16ec3a[_0x5b2d('0x21')]],'as':_0x16ec3a['as'],'attributes':_0x16ec3a['attributes'],'include':_0x16ec3a[_0x5b2d('0x20')]?_[_0x5b2d('0x1f')](_0x16ec3a[_0x5b2d('0x20')],function(_0x49a9c1){return{'model':db[_0x49a9c1[_0x5b2d('0x21')]],'as':_0x49a9c1['as'],'attributes':_0x49a9c1[_0x5b2d('0x22')]};}):[]};}):[]};}):[]:[]})[_0x5b2d('0xe')](function(_0x21abbb){logger[_0x5b2d('0xf')](_0x5b2d('0x1a'),_0x434ee6);logger[_0x5b2d('0x11')](_0x5b2d('0x1a'),_0x434ee6,JSON[_0x5b2d('0x14')](_0x21abbb));_0x38ea7c(_0x21abbb);})[_0x5b2d('0x19')](function(_0x892fdf){logger['error'](_0x5b2d('0x1a'),_0x892fdf['message'],_0x434ee6);_0x5c1256(_0x3414b4[_0x5b2d('0x15')](0x1f4,_0x892fdf[_0x5b2d('0x17')]));});});});}; \ No newline at end of file diff --git a/server/api/cmHopper/index.js b/server/api/cmHopper/index.js index 05ca202..55266ae 100644 --- a/server/api/cmHopper/index.js +++ b/server/api/cmHopper/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc157=['post','create','getPreview','put','update','delete','destroy','exports','multer','util','path','connect-timeout','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./cmHopper.controller','isAuthenticated','get','describe','/opencontacts','/:id','show'];(function(_0x20fa31,_0x27cbd7){var _0x2ddb06=function(_0x44af3c){while(--_0x44af3c){_0x20fa31['push'](_0x20fa31['shift']());}};_0x2ddb06(++_0x27cbd7);}(_0xc157,0xd7));var _0x7c15=function(_0x373ece,_0x724a30){_0x373ece=_0x373ece-0x0;var _0x33bb5b=_0xc157[_0x373ece];return _0x33bb5b;};'use strict';var multer=require(_0x7c15('0x0'));var util=require(_0x7c15('0x1'));var path=require(_0x7c15('0x2'));var timeout=require(_0x7c15('0x3'));var express=require('express');var router=express['Router']();var fs_extra=require(_0x7c15('0x4'));var auth=require(_0x7c15('0x5'));var interaction=require(_0x7c15('0x6'));var config=require(_0x7c15('0x7'));var controller=require(_0x7c15('0x8'));router['get']('/',auth[_0x7c15('0x9')](),controller['index']);router[_0x7c15('0xa')]('/describe',auth[_0x7c15('0x9')](),controller[_0x7c15('0xb')]);router[_0x7c15('0xa')](_0x7c15('0xc'),auth[_0x7c15('0x9')](),controller['getOpenContacts']);router[_0x7c15('0xa')](_0x7c15('0xd'),auth[_0x7c15('0x9')](),controller[_0x7c15('0xe')]);router[_0x7c15('0xf')]('/',auth[_0x7c15('0x9')](),controller[_0x7c15('0x10')]);router[_0x7c15('0xf')]('/preview',auth['isAuthenticated'](),controller[_0x7c15('0x11')]);router[_0x7c15('0x12')](_0x7c15('0xd'),auth[_0x7c15('0x9')](),controller[_0x7c15('0x13')]);router[_0x7c15('0x14')](_0x7c15('0xd'),auth[_0x7c15('0x9')](),controller[_0x7c15('0x15')]);module[_0x7c15('0x16')]=router; \ No newline at end of file +var _0xc554=['get','isAuthenticated','index','describe','/opencontacts','getOpenContacts','/:id','show','post','create','/preview','put','update','delete','destroy','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./cmHopper.controller'];(function(_0x397e5f,_0x454c8f){var _0x5302b8=function(_0x1a29ef){while(--_0x1a29ef){_0x397e5f['push'](_0x397e5f['shift']());}};_0x5302b8(++_0x454c8f);}(_0xc554,0x12e));var _0x4c55=function(_0x5a92ad,_0x2219a6){_0x5a92ad=_0x5a92ad-0x0;var _0x2466f8=_0xc554[_0x5a92ad];return _0x2466f8;};'use strict';var multer=require('multer');var util=require(_0x4c55('0x0'));var path=require(_0x4c55('0x1'));var timeout=require(_0x4c55('0x2'));var express=require(_0x4c55('0x3'));var router=express[_0x4c55('0x4')]();var fs_extra=require(_0x4c55('0x5'));var auth=require(_0x4c55('0x6'));var interaction=require(_0x4c55('0x7'));var config=require(_0x4c55('0x8'));var controller=require(_0x4c55('0x9'));router[_0x4c55('0xa')]('/',auth[_0x4c55('0xb')](),controller[_0x4c55('0xc')]);router[_0x4c55('0xa')]('/describe',auth['isAuthenticated'](),controller[_0x4c55('0xd')]);router[_0x4c55('0xa')](_0x4c55('0xe'),auth[_0x4c55('0xb')](),controller[_0x4c55('0xf')]);router[_0x4c55('0xa')](_0x4c55('0x10'),auth[_0x4c55('0xb')](),controller[_0x4c55('0x11')]);router[_0x4c55('0x12')]('/',auth[_0x4c55('0xb')](),controller[_0x4c55('0x13')]);router['post'](_0x4c55('0x14'),auth[_0x4c55('0xb')](),controller['getPreview']);router[_0x4c55('0x15')](_0x4c55('0x10'),auth['isAuthenticated'](),controller[_0x4c55('0x16')]);router[_0x4c55('0x17')]('/:id',auth[_0x4c55('0xb')](),controller[_0x4c55('0x18')]);module[_0x4c55('0x19')]=router; \ No newline at end of file diff --git a/server/api/cmHopperBlack/cmHopperBlack.attributes.js b/server/api/cmHopperBlack/cmHopperBlack.attributes.js index d9c65c6..8de073b 100644 --- a/server/api/cmHopperBlack/cmHopperBlack.attributes.js +++ b/server/api/cmHopperBlack/cmHopperBlack.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8185=['moment','sequelize','STRING','INTEGER','contactListQueue'];(function(_0x26a1ad,_0x357e08){var _0x153425=function(_0x282b8b){while(--_0x282b8b){_0x26a1ad['push'](_0x26a1ad['shift']());}};_0x153425(++_0x357e08);}(_0x8185,0x127));var _0x5818=function(_0x16b9ed,_0x56517a){_0x16b9ed=_0x16b9ed-0x0;var _0x66b1f8=_0x8185[_0x16b9ed];return _0x66b1f8;};'use strict';var moment=require(_0x5818('0x0'));var Sequelize=require(_0x5818('0x1'));module['exports']={'phone':{'type':Sequelize[_0x5818('0x2')],'allowNull':![]},'ContactId':{'type':Sequelize[_0x5818('0x3')],'unique':_0x5818('0x4')},'ListId':{'type':Sequelize['INTEGER'],'unique':'contactListQueue'},'VoiceQueueId':{'type':Sequelize[_0x5818('0x3')],'unique':_0x5818('0x4')}}; \ No newline at end of file +var _0xea7e=['exports','INTEGER','contactListQueue','sequelize'];(function(_0x2d8935,_0x2c9d2e){var _0x2c5156=function(_0x5ba97e){while(--_0x5ba97e){_0x2d8935['push'](_0x2d8935['shift']());}};_0x2c5156(++_0x2c9d2e);}(_0xea7e,0x143));var _0xeea7=function(_0x5f0b0a,_0x260c1a){_0x5f0b0a=_0x5f0b0a-0x0;var _0x335082=_0xea7e[_0x5f0b0a];return _0x335082;};'use strict';var moment=require('moment');var Sequelize=require(_0xeea7('0x0'));module[_0xeea7('0x1')]={'phone':{'type':Sequelize['STRING'],'allowNull':![]},'ContactId':{'type':Sequelize[_0xeea7('0x2')],'unique':_0xeea7('0x3')},'ListId':{'type':Sequelize[_0xeea7('0x2')],'unique':'contactListQueue'},'VoiceQueueId':{'type':Sequelize[_0xeea7('0x2')],'unique':_0xeea7('0x3')}}; \ No newline at end of file diff --git a/server/api/cmHopperBlack/cmHopperBlack.controller.js b/server/api/cmHopperBlack/cmHopperBlack.controller.js index 2f075aa..21ceeee 100644 --- a/server/api/cmHopperBlack/cmHopperBlack.controller.js +++ b/server/api/cmHopperBlack/cmHopperBlack.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1967=['sox','ejs','fs-extra','lodash','squel','crypto','jsforce','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end','json','offset','undefined','limit','count','set','apply','save','update','then','status','error','name','send','map','rawAttributes','fieldName','type','model','query','keys','filters','intersection','attributes','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','CmHopperBlack','includeAll','include','findAll','rows','show','params','fields','options','find','catch','body','destroy','describe','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path'];(function(_0x1e82b6,_0x4d8f82){var _0x5eaa3c=function(_0x195fbc){while(--_0x195fbc){_0x1e82b6['push'](_0x1e82b6['shift']());}};_0x5eaa3c(++_0x4d8f82);}(_0x1967,0x173));var _0x7196=function(_0x4f8c48,_0x380c36){_0x4f8c48=_0x4f8c48-0x0;var _0x1af7a5=_0x1967[_0x4f8c48];return _0x1af7a5;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x7196('0x0'));var zipdir=require(_0x7196('0x1'));var jsonpatch=require(_0x7196('0x2'));var rp=require(_0x7196('0x3'));var moment=require(_0x7196('0x4'));var BPromise=require(_0x7196('0x5'));var Mustache=require(_0x7196('0x6'));var util=require(_0x7196('0x7'));var path=require(_0x7196('0x8'));var sox=require(_0x7196('0x9'));var csv=require('to-csv');var ejs=require(_0x7196('0xa'));var fs=require('fs');var fs_extra=require(_0x7196('0xb'));var _=require(_0x7196('0xc'));var squel=require(_0x7196('0xd'));var crypto=require(_0x7196('0xe'));var jsforce=require(_0x7196('0xf'));var deskjs=require('desk.js');var toCsv=require(_0x7196('0x10'));var querystring=require(_0x7196('0x11'));var Papa=require(_0x7196('0x12'));var Redis=require(_0x7196('0x13'));var authService=require(_0x7196('0x14'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x7196('0x15'));var logger=require(_0x7196('0x16'))(_0x7196('0x17'));var utils=require(_0x7196('0x18'));var config=require(_0x7196('0x19'));var licenseUtil=require(_0x7196('0x1a'));var db=require(_0x7196('0x1b'))['db'];function respondWithStatusCode(_0x325641,_0x24f1c3){_0x24f1c3=_0x24f1c3||0xcc;return function(_0xba707b){if(_0xba707b){return _0x325641[_0x7196('0x1c')](_0x24f1c3);}return _0x325641['status'](_0x24f1c3)[_0x7196('0x1d')]();};}function respondWithResult(_0x3feccd,_0x3545aa){_0x3545aa=_0x3545aa||0xc8;return function(_0xf098c1){if(_0xf098c1){return _0x3feccd['status'](_0x3545aa)[_0x7196('0x1e')](_0xf098c1);}};}function respondWithFilteredResult(_0x539414,_0xe32933){return function(_0x2590a6){if(_0x2590a6){var _0xf7e97=typeof _0xe32933[_0x7196('0x1f')]===_0x7196('0x20')&&typeof _0xe32933[_0x7196('0x21')]===_0x7196('0x20');var _0x1ed296=_0x2590a6[_0x7196('0x22')];var _0x32fe2b=_0xf7e97?0x0:_0xe32933[_0x7196('0x1f')];var _0x5b716a=_0xf7e97?_0x2590a6['count']:_0xe32933[_0x7196('0x1f')]+_0xe32933[_0x7196('0x21')];var _0x40418d;if(_0x5b716a>=_0x1ed296){_0x5b716a=_0x1ed296;_0x40418d=0xc8;}else{_0x40418d=0xce;}_0x539414['status'](_0x40418d);return _0x539414[_0x7196('0x23')]('Content-Range',_0x32fe2b+'-'+_0x5b716a+'/'+_0x1ed296)['json'](_0x2590a6);}return null;};}function patchUpdates(_0x296e07){return function(_0x627223){try{jsonpatch[_0x7196('0x24')](_0x627223,_0x296e07,!![]);}catch(_0x4ddf78){return BPromise['reject'](_0x4ddf78);}return _0x627223[_0x7196('0x25')]();};}function saveUpdates(_0x3cd8ff,_0x598a26){return function(_0x18649b){if(_0x18649b){return _0x18649b[_0x7196('0x26')](_0x3cd8ff)[_0x7196('0x27')](function(_0x18d389){return _0x18d389;});}return null;};}function removeEntity(_0x38b3d6,_0x549f34){return function(_0x3f8178){if(_0x3f8178){return _0x3f8178['destroy']()[_0x7196('0x27')](function(){_0x38b3d6[_0x7196('0x28')](0xcc)[_0x7196('0x1d')]();});}};}function handleEntityNotFound(_0xa69810,_0x70aa65){return function(_0x43f6a2){if(!_0x43f6a2){_0xa69810['sendStatus'](0x194);}return _0x43f6a2;};}function handleError(_0x57c404,_0x1482e5){_0x1482e5=_0x1482e5||0x1f4;return function(_0x2d284f){logger[_0x7196('0x29')](_0x2d284f['stack']);if(_0x2d284f['name']){delete _0x2d284f[_0x7196('0x2a')];}_0x57c404[_0x7196('0x28')](_0x1482e5)[_0x7196('0x2b')](_0x2d284f);};}exports['index']=function(_0x35eef9,_0x4ecea1){var _0x4fd339={},_0x59d79d={},_0x30151f={'count':0x0,'rows':[]};var _0x985727=_[_0x7196('0x2c')](db['CmHopperBlack'][_0x7196('0x2d')],function(_0x45d567){return{'name':_0x45d567[_0x7196('0x2e')],'type':_0x45d567[_0x7196('0x2f')]['key']};});_0x59d79d[_0x7196('0x30')]=_[_0x7196('0x2c')](_0x985727,_0x7196('0x2a'));_0x59d79d[_0x7196('0x31')]=_[_0x7196('0x32')](_0x35eef9[_0x7196('0x31')]);_0x59d79d[_0x7196('0x33')]=_[_0x7196('0x34')](_0x59d79d[_0x7196('0x30')],_0x59d79d[_0x7196('0x31')]);_0x4fd339[_0x7196('0x35')]=_['intersection'](_0x59d79d[_0x7196('0x30')],qs['fields'](_0x35eef9[_0x7196('0x31')]['fields']));_0x4fd339[_0x7196('0x35')]=_0x4fd339[_0x7196('0x35')]['length']?_0x4fd339[_0x7196('0x35')]:_0x59d79d[_0x7196('0x30')];if(!_0x35eef9[_0x7196('0x31')][_0x7196('0x36')](_0x7196('0x37'))){_0x4fd339['limit']=qs[_0x7196('0x21')](_0x35eef9[_0x7196('0x31')][_0x7196('0x21')]);_0x4fd339[_0x7196('0x1f')]=qs[_0x7196('0x1f')](_0x35eef9[_0x7196('0x31')]['offset']);}_0x4fd339[_0x7196('0x38')]=qs[_0x7196('0x39')](_0x35eef9[_0x7196('0x31')]['sort']);_0x4fd339[_0x7196('0x3a')]=qs[_0x7196('0x33')](_[_0x7196('0x3b')](_0x35eef9[_0x7196('0x31')],_0x59d79d[_0x7196('0x33')]),_0x985727);if(_0x35eef9[_0x7196('0x31')][_0x7196('0x3c')]){_0x4fd339[_0x7196('0x3a')]=_[_0x7196('0x3d')](_0x4fd339[_0x7196('0x3a')],{'$or':_['map'](_0x985727,function(_0x257754){if(_0x257754[_0x7196('0x2f')]!=='VIRTUAL'){var _0x186efe={};_0x186efe[_0x257754['name']]={'$like':'%'+_0x35eef9['query'][_0x7196('0x3c')]+'%'};return _0x186efe;}})});}_0x4fd339=_[_0x7196('0x3d')]({},_0x4fd339,_0x35eef9['options']);var _0x587f6f={'where':_0x4fd339[_0x7196('0x3a')]};return db[_0x7196('0x3e')][_0x7196('0x22')](_0x587f6f)['then'](function(_0x36a990){_0x30151f[_0x7196('0x22')]=_0x36a990;if(_0x35eef9[_0x7196('0x31')][_0x7196('0x3f')]){_0x4fd339[_0x7196('0x40')]=[{'all':!![]}];}return db[_0x7196('0x3e')][_0x7196('0x41')](_0x4fd339);})[_0x7196('0x27')](function(_0x5cd903){_0x30151f[_0x7196('0x42')]=_0x5cd903;return _0x30151f;})[_0x7196('0x27')](respondWithFilteredResult(_0x4ecea1,_0x4fd339))['catch'](handleError(_0x4ecea1,null));};exports[_0x7196('0x43')]=function(_0x43d4c0,_0x48178f){var _0x471915={'raw':!![],'where':{'id':_0x43d4c0[_0x7196('0x44')]['id']}},_0x471bb2={};_0x471bb2['model']=_[_0x7196('0x32')](db[_0x7196('0x3e')]['rawAttributes']);_0x471bb2[_0x7196('0x31')]=_[_0x7196('0x32')](_0x43d4c0['query']);_0x471bb2[_0x7196('0x33')]=_['intersection'](_0x471bb2['model'],_0x471bb2['query']);_0x471915['attributes']=_['intersection'](_0x471bb2[_0x7196('0x30')],qs['fields'](_0x43d4c0[_0x7196('0x31')][_0x7196('0x45')]));_0x471915[_0x7196('0x35')]=_0x471915[_0x7196('0x35')]['length']?_0x471915[_0x7196('0x35')]:_0x471bb2['model'];if(_0x43d4c0[_0x7196('0x31')][_0x7196('0x3f')]){_0x471915[_0x7196('0x40')]=[{'all':!![]}];}_0x471915=_['merge']({},_0x471915,_0x43d4c0[_0x7196('0x46')]);return db[_0x7196('0x3e')][_0x7196('0x47')](_0x471915)['then'](handleEntityNotFound(_0x48178f,null))['then'](respondWithResult(_0x48178f,null))[_0x7196('0x48')](handleError(_0x48178f,null));};exports['update']=function(_0x29c7e8,_0x582884){if(_0x29c7e8['body']['id']){delete _0x29c7e8[_0x7196('0x49')]['id'];}return db['CmHopperBlack']['find']({'where':{'id':_0x29c7e8['params']['id']}})[_0x7196('0x27')](handleEntityNotFound(_0x582884,null))['then'](saveUpdates(_0x29c7e8['body'],null))[_0x7196('0x27')](respondWithResult(_0x582884,null))[_0x7196('0x48')](handleError(_0x582884,null));};exports[_0x7196('0x4a')]=function(_0x1786fa,_0x55de40){return db[_0x7196('0x3e')]['find']({'where':{'id':_0x1786fa[_0x7196('0x44')]['id']}})[_0x7196('0x27')](handleEntityNotFound(_0x55de40,null))['then'](removeEntity(_0x55de40,null))[_0x7196('0x48')](handleError(_0x55de40,null));};exports[_0x7196('0x4b')]=function(_0x3fe092,_0x4fa18f){return db[_0x7196('0x3e')]['describe']()[_0x7196('0x27')](respondWithResult(_0x4fa18f,null))[_0x7196('0x48')](handleError(_0x4fa18f,null));}; \ No newline at end of file +var _0x3759=['query','filters','intersection','attributes','length','hasOwnProperty','nolimit','order','sort','where','merge','VIRTUAL','filter','CmHopperBlack','includeAll','include','findAll','rows','catch','show','params','fields','options','find','body','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','mustache','util','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','json','undefined','limit','offset','count','status','Content-Range','reject','save','update','destroy','then','end','error','name','send','map','fieldName','type','model','keys'];(function(_0x2d9e27,_0x5965b2){var _0xd35381=function(_0x343d18){while(--_0x343d18){_0x2d9e27['push'](_0x2d9e27['shift']());}};_0xd35381(++_0x5965b2);}(_0x3759,0x131));var _0x9375=function(_0x282baa,_0x751ccb){_0x282baa=_0x282baa-0x0;var _0x404f61=_0x3759[_0x282baa];return _0x404f61;};'use strict';var emlformat=require(_0x9375('0x0'));var rimraf=require(_0x9375('0x1'));var zipdir=require(_0x9375('0x2'));var jsonpatch=require(_0x9375('0x3'));var rp=require(_0x9375('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x9375('0x5'));var util=require(_0x9375('0x6'));var path=require('path');var sox=require(_0x9375('0x7'));var csv=require(_0x9375('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x9375('0x9'));var _=require(_0x9375('0xa'));var squel=require(_0x9375('0xb'));var crypto=require(_0x9375('0xc'));var jsforce=require(_0x9375('0xd'));var deskjs=require(_0x9375('0xe'));var toCsv=require(_0x9375('0x8'));var querystring=require(_0x9375('0xf'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x9375('0x10'));var as=require(_0x9375('0x11'));var hardwareService=require(_0x9375('0x12'));var logger=require('../../config/logger')(_0x9375('0x13'));var utils=require(_0x9375('0x14'));var config=require(_0x9375('0x15'));var licenseUtil=require(_0x9375('0x16'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x21d0c4,_0x1344ff){_0x1344ff=_0x1344ff||0xcc;return function(_0x339b77){if(_0x339b77){return _0x21d0c4[_0x9375('0x17')](_0x1344ff);}return _0x21d0c4['status'](_0x1344ff)['end']();};}function respondWithResult(_0x49b871,_0x3dd87c){_0x3dd87c=_0x3dd87c||0xc8;return function(_0x49ea92){if(_0x49ea92){return _0x49b871['status'](_0x3dd87c)[_0x9375('0x18')](_0x49ea92);}};}function respondWithFilteredResult(_0x4402a5,_0x1e58e4){return function(_0x58c8ea){if(_0x58c8ea){var _0x468a36=typeof _0x1e58e4['offset']===_0x9375('0x19')&&typeof _0x1e58e4[_0x9375('0x1a')]==='undefined';var _0x22d180=_0x58c8ea['count'];var _0x5e915d=_0x468a36?0x0:_0x1e58e4[_0x9375('0x1b')];var _0x23fc9c=_0x468a36?_0x58c8ea[_0x9375('0x1c')]:_0x1e58e4[_0x9375('0x1b')]+_0x1e58e4['limit'];var _0x18d80c;if(_0x23fc9c>=_0x22d180){_0x23fc9c=_0x22d180;_0x18d80c=0xc8;}else{_0x18d80c=0xce;}_0x4402a5[_0x9375('0x1d')](_0x18d80c);return _0x4402a5['set'](_0x9375('0x1e'),_0x5e915d+'-'+_0x23fc9c+'/'+_0x22d180)[_0x9375('0x18')](_0x58c8ea);}return null;};}function patchUpdates(_0x36c98f){return function(_0x10a61e){try{jsonpatch['apply'](_0x10a61e,_0x36c98f,!![]);}catch(_0x298a8b){return BPromise[_0x9375('0x1f')](_0x298a8b);}return _0x10a61e[_0x9375('0x20')]();};}function saveUpdates(_0x308a8c,_0x2b77e4){return function(_0x1adab1){if(_0x1adab1){return _0x1adab1[_0x9375('0x21')](_0x308a8c)['then'](function(_0x4ccc28){return _0x4ccc28;});}return null;};}function removeEntity(_0x273091,_0x1c36b0){return function(_0x2d948d){if(_0x2d948d){return _0x2d948d[_0x9375('0x22')]()[_0x9375('0x23')](function(){_0x273091[_0x9375('0x1d')](0xcc)[_0x9375('0x24')]();});}};}function handleEntityNotFound(_0x4985d2,_0x4f74f8){return function(_0x20d669){if(!_0x20d669){_0x4985d2[_0x9375('0x17')](0x194);}return _0x20d669;};}function handleError(_0x48b714,_0x5b9102){_0x5b9102=_0x5b9102||0x1f4;return function(_0x482a25){logger[_0x9375('0x25')](_0x482a25['stack']);if(_0x482a25[_0x9375('0x26')]){delete _0x482a25[_0x9375('0x26')];}_0x48b714[_0x9375('0x1d')](_0x5b9102)[_0x9375('0x27')](_0x482a25);};}exports['index']=function(_0x872be7,_0x4e8233){var _0x54013f={},_0x39f75c={},_0x1c61d9={'count':0x0,'rows':[]};var _0x413fe8=_[_0x9375('0x28')](db['CmHopperBlack']['rawAttributes'],function(_0x1fea2f){return{'name':_0x1fea2f[_0x9375('0x29')],'type':_0x1fea2f[_0x9375('0x2a')]['key']};});_0x39f75c[_0x9375('0x2b')]=_[_0x9375('0x28')](_0x413fe8,'name');_0x39f75c['query']=_[_0x9375('0x2c')](_0x872be7[_0x9375('0x2d')]);_0x39f75c[_0x9375('0x2e')]=_[_0x9375('0x2f')](_0x39f75c['model'],_0x39f75c[_0x9375('0x2d')]);_0x54013f[_0x9375('0x30')]=_['intersection'](_0x39f75c[_0x9375('0x2b')],qs['fields'](_0x872be7['query']['fields']));_0x54013f['attributes']=_0x54013f[_0x9375('0x30')][_0x9375('0x31')]?_0x54013f[_0x9375('0x30')]:_0x39f75c['model'];if(!_0x872be7[_0x9375('0x2d')][_0x9375('0x32')](_0x9375('0x33'))){_0x54013f[_0x9375('0x1a')]=qs[_0x9375('0x1a')](_0x872be7['query'][_0x9375('0x1a')]);_0x54013f[_0x9375('0x1b')]=qs[_0x9375('0x1b')](_0x872be7[_0x9375('0x2d')]['offset']);}_0x54013f[_0x9375('0x34')]=qs[_0x9375('0x35')](_0x872be7['query'][_0x9375('0x35')]);_0x54013f[_0x9375('0x36')]=qs[_0x9375('0x2e')](_['pick'](_0x872be7[_0x9375('0x2d')],_0x39f75c[_0x9375('0x2e')]),_0x413fe8);if(_0x872be7[_0x9375('0x2d')]['filter']){_0x54013f['where']=_[_0x9375('0x37')](_0x54013f[_0x9375('0x36')],{'$or':_[_0x9375('0x28')](_0x413fe8,function(_0x1cc9bc){if(_0x1cc9bc[_0x9375('0x2a')]!==_0x9375('0x38')){var _0x4ae822={};_0x4ae822[_0x1cc9bc[_0x9375('0x26')]]={'$like':'%'+_0x872be7['query'][_0x9375('0x39')]+'%'};return _0x4ae822;}})});}_0x54013f=_['merge']({},_0x54013f,_0x872be7['options']);var _0x445afa={'where':_0x54013f[_0x9375('0x36')]};return db[_0x9375('0x3a')][_0x9375('0x1c')](_0x445afa)[_0x9375('0x23')](function(_0x3737c0){_0x1c61d9[_0x9375('0x1c')]=_0x3737c0;if(_0x872be7['query'][_0x9375('0x3b')]){_0x54013f[_0x9375('0x3c')]=[{'all':!![]}];}return db['CmHopperBlack'][_0x9375('0x3d')](_0x54013f);})[_0x9375('0x23')](function(_0x40a998){_0x1c61d9[_0x9375('0x3e')]=_0x40a998;return _0x1c61d9;})[_0x9375('0x23')](respondWithFilteredResult(_0x4e8233,_0x54013f))[_0x9375('0x3f')](handleError(_0x4e8233,null));};exports[_0x9375('0x40')]=function(_0x3c108a,_0x1e6f78){var _0x1ea235={'raw':!![],'where':{'id':_0x3c108a[_0x9375('0x41')]['id']}},_0xe12484={};_0xe12484[_0x9375('0x2b')]=_[_0x9375('0x2c')](db[_0x9375('0x3a')]['rawAttributes']);_0xe12484[_0x9375('0x2d')]=_[_0x9375('0x2c')](_0x3c108a[_0x9375('0x2d')]);_0xe12484['filters']=_[_0x9375('0x2f')](_0xe12484[_0x9375('0x2b')],_0xe12484[_0x9375('0x2d')]);_0x1ea235['attributes']=_['intersection'](_0xe12484[_0x9375('0x2b')],qs[_0x9375('0x42')](_0x3c108a[_0x9375('0x2d')][_0x9375('0x42')]));_0x1ea235[_0x9375('0x30')]=_0x1ea235[_0x9375('0x30')][_0x9375('0x31')]?_0x1ea235[_0x9375('0x30')]:_0xe12484[_0x9375('0x2b')];if(_0x3c108a[_0x9375('0x2d')]['includeAll']){_0x1ea235[_0x9375('0x3c')]=[{'all':!![]}];}_0x1ea235=_['merge']({},_0x1ea235,_0x3c108a[_0x9375('0x43')]);return db[_0x9375('0x3a')][_0x9375('0x44')](_0x1ea235)['then'](handleEntityNotFound(_0x1e6f78,null))[_0x9375('0x23')](respondWithResult(_0x1e6f78,null))['catch'](handleError(_0x1e6f78,null));};exports[_0x9375('0x21')]=function(_0x59bbd4,_0x569522){if(_0x59bbd4[_0x9375('0x45')]['id']){delete _0x59bbd4[_0x9375('0x45')]['id'];}return db['CmHopperBlack'][_0x9375('0x44')]({'where':{'id':_0x59bbd4[_0x9375('0x41')]['id']}})['then'](handleEntityNotFound(_0x569522,null))[_0x9375('0x23')](saveUpdates(_0x59bbd4[_0x9375('0x45')],null))['then'](respondWithResult(_0x569522,null))[_0x9375('0x3f')](handleError(_0x569522,null));};exports[_0x9375('0x22')]=function(_0x1b2231,_0x5cfaeb){return db['CmHopperBlack'][_0x9375('0x44')]({'where':{'id':_0x1b2231[_0x9375('0x41')]['id']}})['then'](handleEntityNotFound(_0x5cfaeb,null))[_0x9375('0x23')](removeEntity(_0x5cfaeb,null))[_0x9375('0x3f')](handleError(_0x5cfaeb,null));};exports['describe']=function(_0x57fa38,_0x18d4f7){return db[_0x9375('0x3a')]['describe']()[_0x9375('0x23')](respondWithResult(_0x18d4f7,null))[_0x9375('0x3f')](handleError(_0x18d4f7,null));}; \ No newline at end of file diff --git a/server/api/cmHopperBlack/cmHopperBlack.model.js b/server/api/cmHopperBlack/cmHopperBlack.model.js index 78f4eb4..a676665 100644 --- a/server/api/cmHopperBlack/cmHopperBlack.model.js +++ b/server/api/cmHopperBlack/cmHopperBlack.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3791=['util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./cmHopperBlack.attributes','exports'];(function(_0x5124f6,_0x3c142d){var _0x171e16=function(_0x4f61f9){while(--_0x4f61f9){_0x5124f6['push'](_0x5124f6['shift']());}};_0x171e16(++_0x3c142d);}(_0x3791,0xbb));var _0x1379=function(_0x2ca216,_0x4362d4){_0x2ca216=_0x2ca216-0x0;var _0x365ea9=_0x3791[_0x2ca216];return _0x365ea9;};'use strict';var _=require('lodash');var util=require(_0x1379('0x0'));var logger=require(_0x1379('0x1'))(_0x1379('0x2'));var moment=require(_0x1379('0x3'));var BPromise=require(_0x1379('0x4'));var rp=require(_0x1379('0x5'));var fs=require('fs');var path=require(_0x1379('0x6'));var rimraf=require(_0x1379('0x7'));var config=require(_0x1379('0x8'));var attributes=require(_0x1379('0x9'));module[_0x1379('0xa')]=function(_0x2d2f70,_0x376180){return _0x2d2f70['define']('CmHopperBlack',attributes,{'tableName':'cm_hopper_black','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xf34d=['../../config/environment','./cmHopperBlack.attributes','exports','define','CmHopperBlack','cm_hopper_black','lodash','../../config/logger','api','moment','bluebird','request-promise','rimraf'];(function(_0x21af3a,_0x386e1d){var _0x268a49=function(_0x41a650){while(--_0x41a650){_0x21af3a['push'](_0x21af3a['shift']());}};_0x268a49(++_0x386e1d);}(_0xf34d,0x10a));var _0xdf34=function(_0x4e56b0,_0x9ba2e8){_0x4e56b0=_0x4e56b0-0x0;var _0x276645=_0xf34d[_0x4e56b0];return _0x276645;};'use strict';var _=require(_0xdf34('0x0'));var util=require('util');var logger=require(_0xdf34('0x1'))(_0xdf34('0x2'));var moment=require(_0xdf34('0x3'));var BPromise=require(_0xdf34('0x4'));var rp=require(_0xdf34('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0xdf34('0x6'));var config=require(_0xdf34('0x7'));var attributes=require(_0xdf34('0x8'));module[_0xdf34('0x9')]=function(_0x2ccbfa,_0x499858){return _0x2ccbfa[_0xdf34('0xa')](_0xdf34('0xb'),attributes,{'tableName':_0xdf34('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/cmHopperBlack/cmHopperBlack.rpc.js b/server/api/cmHopperBlack/cmHopperBlack.rpc.js index e9cb948..0d6ab03 100644 --- a/server/api/cmHopperBlack/cmHopperBlack.rpc.js +++ b/server/api/cmHopperBlack/cmHopperBlack.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x06ac=['stringify','error','message','catch','CmHopperBlack','findAll','options','raw','where','attributes','limit','include','map','model','GetCmHopperBlack','UpdateCmHopperBlack','update','body','destroy','DestroyCmHopperBlack','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','request','then','info','CmHopperBlack,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x1a6e29,_0x4e7263){var _0x2cc6b6=function(_0x1009b4){while(--_0x1009b4){_0x1a6e29['push'](_0x1a6e29['shift']());}};_0x2cc6b6(++_0x4e7263);}(_0x06ac,0x172));var _0xc06a=function(_0x10f249,_0x5eb137){_0x10f249=_0x10f249-0x0;var _0x3adfad=_0x06ac[_0x10f249];return _0x3adfad;};'use strict';var _=require(_0xc06a('0x0'));var util=require(_0xc06a('0x1'));var moment=require(_0xc06a('0x2'));var BPromise=require('bluebird');var rs=require(_0xc06a('0x3'));var fs=require('fs');var Redis=require(_0xc06a('0x4'));var db=require(_0xc06a('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xc06a('0x6'))(_0xc06a('0x7'));var config=require(_0xc06a('0x8'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x2156fb,_0x114ec1,_0x13bbef){return new BPromise(function(_0x24ad00,_0x118067){return client[_0xc06a('0x9')](_0x2156fb,_0x13bbef)[_0xc06a('0xa')](function(_0x44510e){logger[_0xc06a('0xb')](_0xc06a('0xc'),_0x114ec1,_0xc06a('0xd'));logger[_0xc06a('0xe')]('CmHopperBlack,\x20%s,\x20%s,\x20%s',_0x114ec1,_0xc06a('0xd'),JSON[_0xc06a('0xf')](_0x44510e));if(_0x44510e[_0xc06a('0x10')]){if(_0x44510e[_0xc06a('0x10')]['code']===0x1f4){logger[_0xc06a('0x10')](_0xc06a('0xc'),_0x114ec1,_0x44510e['error'][_0xc06a('0x11')]);return _0x118067(_0x44510e[_0xc06a('0x10')][_0xc06a('0x11')]);}logger[_0xc06a('0x10')](_0xc06a('0xc'),_0x114ec1,_0x44510e['error'][_0xc06a('0x11')]);return _0x24ad00(_0x44510e[_0xc06a('0x10')][_0xc06a('0x11')]);}else{logger['info']('CmHopperBlack,\x20%s,\x20%s',_0x114ec1,_0xc06a('0xd'));_0x24ad00(_0x44510e['result']['message']);}})[_0xc06a('0x12')](function(_0x4da80e){logger[_0xc06a('0x10')](_0xc06a('0xc'),_0x114ec1,_0x4da80e);_0x118067(_0x4da80e);});});}exports['GetCmHopperBlack']=function(_0x4f2cde){var _0x46c40e=this;return new Promise(function(_0x53de79,_0xcd509d){return db[_0xc06a('0x13')][_0xc06a('0x14')]({'raw':_0x4f2cde[_0xc06a('0x15')]?_0x4f2cde['options'][_0xc06a('0x16')]===undefined?!![]:![]:!![],'where':_0x4f2cde[_0xc06a('0x15')]?_0x4f2cde[_0xc06a('0x15')][_0xc06a('0x17')]||null:null,'attributes':_0x4f2cde[_0xc06a('0x15')]?_0x4f2cde[_0xc06a('0x15')][_0xc06a('0x18')]||null:null,'limit':_0x4f2cde[_0xc06a('0x15')]?_0x4f2cde[_0xc06a('0x15')][_0xc06a('0x19')]||null:null,'include':_0x4f2cde[_0xc06a('0x15')]?_0x4f2cde[_0xc06a('0x15')][_0xc06a('0x1a')]?_[_0xc06a('0x1b')](_0x4f2cde[_0xc06a('0x15')][_0xc06a('0x1a')],function(_0x4bc2dd){return{'model':db[_0x4bc2dd[_0xc06a('0x1c')]],'as':_0x4bc2dd['as'],'attributes':_0x4bc2dd['attributes'],'include':_0x4bc2dd[_0xc06a('0x1a')]?_[_0xc06a('0x1b')](_0x4bc2dd[_0xc06a('0x1a')],function(_0x21bba4){return{'model':db[_0x21bba4[_0xc06a('0x1c')]],'as':_0x21bba4['as'],'attributes':_0x21bba4[_0xc06a('0x18')],'include':_0x21bba4[_0xc06a('0x1a')]?_[_0xc06a('0x1b')](_0x21bba4['include'],function(_0x596041){return{'model':db[_0x596041[_0xc06a('0x1c')]],'as':_0x596041['as'],'attributes':_0x596041[_0xc06a('0x18')]};}):[]};}):[]};}):[]:[]})[_0xc06a('0xa')](function(_0x6d7dec){logger[_0xc06a('0xb')](_0xc06a('0x1d'),_0x4f2cde);logger['debug'](_0xc06a('0x1d'),_0x4f2cde,JSON[_0xc06a('0xf')](_0x6d7dec));_0x53de79(_0x6d7dec);})[_0xc06a('0x12')](function(_0x12998f){logger['error'](_0xc06a('0x1d'),_0x12998f['message'],_0x4f2cde);_0xcd509d(_0x46c40e[_0xc06a('0x10')](0x1f4,_0x12998f['message']));});});};exports[_0xc06a('0x1e')]=function(_0x354317){var _0x300d22=this;return new Promise(function(_0x33540a,_0x55d299){return db[_0xc06a('0x13')][_0xc06a('0x1f')](_0x354317[_0xc06a('0x20')],{'raw':_0x354317['options']?_0x354317[_0xc06a('0x15')][_0xc06a('0x16')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x354317[_0xc06a('0x15')]?_0x354317[_0xc06a('0x15')][_0xc06a('0x17')]||null:null,'attributes':_0x354317['options']?_0x354317[_0xc06a('0x15')][_0xc06a('0x18')]||null:null,'limit':_0x354317[_0xc06a('0x15')]?_0x354317[_0xc06a('0x15')]['limit']||null:null})['then'](function(_0x5c7218){logger[_0xc06a('0xb')](_0xc06a('0x1e'),_0x354317);logger[_0xc06a('0xe')](_0xc06a('0x1e'),_0x354317,JSON[_0xc06a('0xf')](_0x5c7218));_0x33540a(_0x5c7218);})['catch'](function(_0x2b53da){logger[_0xc06a('0x10')](_0xc06a('0x1e'),_0x2b53da[_0xc06a('0x11')],_0x354317);_0x55d299(_0x300d22[_0xc06a('0x10')](0x1f4,_0x2b53da[_0xc06a('0x11')]));});});};exports['DestroyCmHopperBlack']=function(_0x141019){var _0xb39b24=this;return new Promise(function(_0x39600b,_0x10182f){return db[_0xc06a('0x13')][_0xc06a('0x21')]({'where':_0x141019[_0xc06a('0x15')]?_0x141019[_0xc06a('0x15')][_0xc06a('0x17')]||null:null})[_0xc06a('0xa')](function(_0x2841b9){logger['info'](_0xc06a('0x22'),_0x141019);logger[_0xc06a('0xe')](_0xc06a('0x22'),_0x141019,JSON[_0xc06a('0xf')](_0x2841b9));_0x39600b(_0x2841b9);})['catch'](function(_0x47843c){logger[_0xc06a('0x10')]('DestroyCmHopperBlack',_0x47843c['message'],_0x141019);_0x10182f(_0xb39b24['error'](0x1f4,_0x47843c[_0xc06a('0x11')]));});});}; \ No newline at end of file +var _0xe64a=['lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','CmHopperBlack,\x20%s,\x20%s','request\x20sent','error','code','message','result','catch','GetCmHopperBlack','CmHopperBlack','findAll','options','where','attributes','limit','include','map','model','stringify','UpdateCmHopperBlack','update','raw','debug','DestroyCmHopperBlack','destroy'];(function(_0x215f91,_0x42721a){var _0x396370=function(_0x2fbfd2){while(--_0x2fbfd2){_0x215f91['push'](_0x215f91['shift']());}};_0x396370(++_0x42721a);}(_0xe64a,0x168));var _0xae64=function(_0x4a9fb1,_0x273043){_0x4a9fb1=_0x4a9fb1-0x0;var _0x348672=_0xe64a[_0x4a9fb1];return _0x348672;};'use strict';var _=require(_0xae64('0x0'));var util=require(_0xae64('0x1'));var moment=require(_0xae64('0x2'));var BPromise=require(_0xae64('0x3'));var rs=require(_0xae64('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xae64('0x5'))['db'];var utils=require(_0xae64('0x6'));var logger=require(_0xae64('0x7'))(_0xae64('0x8'));var config=require(_0xae64('0x9'));var jayson=require(_0xae64('0xa'));var client=jayson[_0xae64('0xb')][_0xae64('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x3bd8ec,_0x2503c6,_0x37ca9d){return new BPromise(function(_0x4c688a,_0x39bd80){return client[_0xae64('0xd')](_0x3bd8ec,_0x37ca9d)[_0xae64('0xe')](function(_0x3dca98){logger[_0xae64('0xf')](_0xae64('0x10'),_0x2503c6,_0xae64('0x11'));logger['debug']('CmHopperBlack,\x20%s,\x20%s,\x20%s',_0x2503c6,_0xae64('0x11'),JSON['stringify'](_0x3dca98));if(_0x3dca98['error']){if(_0x3dca98[_0xae64('0x12')][_0xae64('0x13')]===0x1f4){logger[_0xae64('0x12')](_0xae64('0x10'),_0x2503c6,_0x3dca98[_0xae64('0x12')]['message']);return _0x39bd80(_0x3dca98[_0xae64('0x12')]['message']);}logger[_0xae64('0x12')](_0xae64('0x10'),_0x2503c6,_0x3dca98['error'][_0xae64('0x14')]);return _0x4c688a(_0x3dca98[_0xae64('0x12')][_0xae64('0x14')]);}else{logger[_0xae64('0xf')]('CmHopperBlack,\x20%s,\x20%s',_0x2503c6,_0xae64('0x11'));_0x4c688a(_0x3dca98[_0xae64('0x15')]['message']);}})[_0xae64('0x16')](function(_0x2a4a02){logger[_0xae64('0x12')]('CmHopperBlack,\x20%s,\x20%s',_0x2503c6,_0x2a4a02);_0x39bd80(_0x2a4a02);});});}exports[_0xae64('0x17')]=function(_0x1df8e3){var _0x1d2746=this;return new Promise(function(_0x9a168d,_0x545d79){return db[_0xae64('0x18')][_0xae64('0x19')]({'raw':_0x1df8e3['options']?_0x1df8e3[_0xae64('0x1a')]['raw']===undefined?!![]:![]:!![],'where':_0x1df8e3[_0xae64('0x1a')]?_0x1df8e3[_0xae64('0x1a')][_0xae64('0x1b')]||null:null,'attributes':_0x1df8e3[_0xae64('0x1a')]?_0x1df8e3[_0xae64('0x1a')][_0xae64('0x1c')]||null:null,'limit':_0x1df8e3[_0xae64('0x1a')]?_0x1df8e3[_0xae64('0x1a')][_0xae64('0x1d')]||null:null,'include':_0x1df8e3[_0xae64('0x1a')]?_0x1df8e3[_0xae64('0x1a')][_0xae64('0x1e')]?_[_0xae64('0x1f')](_0x1df8e3['options'][_0xae64('0x1e')],function(_0x29efa0){return{'model':db[_0x29efa0['model']],'as':_0x29efa0['as'],'attributes':_0x29efa0[_0xae64('0x1c')],'include':_0x29efa0[_0xae64('0x1e')]?_['map'](_0x29efa0['include'],function(_0x343a86){return{'model':db[_0x343a86['model']],'as':_0x343a86['as'],'attributes':_0x343a86[_0xae64('0x1c')],'include':_0x343a86[_0xae64('0x1e')]?_['map'](_0x343a86['include'],function(_0x5a727a){return{'model':db[_0x5a727a[_0xae64('0x20')]],'as':_0x5a727a['as'],'attributes':_0x5a727a['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x3bfd10){logger[_0xae64('0xf')]('GetCmHopperBlack',_0x1df8e3);logger['debug'](_0xae64('0x17'),_0x1df8e3,JSON[_0xae64('0x21')](_0x3bfd10));_0x9a168d(_0x3bfd10);})['catch'](function(_0x2bbfc9){logger[_0xae64('0x12')](_0xae64('0x17'),_0x2bbfc9[_0xae64('0x14')],_0x1df8e3);_0x545d79(_0x1d2746[_0xae64('0x12')](0x1f4,_0x2bbfc9['message']));});});};exports[_0xae64('0x22')]=function(_0x4efe0f){var _0x5b079f=this;return new Promise(function(_0x21d128,_0x487fd2){return db[_0xae64('0x18')][_0xae64('0x23')](_0x4efe0f['body'],{'raw':_0x4efe0f[_0xae64('0x1a')]?_0x4efe0f['options'][_0xae64('0x24')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x4efe0f[_0xae64('0x1a')]?_0x4efe0f[_0xae64('0x1a')][_0xae64('0x1b')]||null:null,'attributes':_0x4efe0f['options']?_0x4efe0f['options']['attributes']||null:null,'limit':_0x4efe0f['options']?_0x4efe0f[_0xae64('0x1a')][_0xae64('0x1d')]||null:null})['then'](function(_0x214136){logger[_0xae64('0xf')](_0xae64('0x22'),_0x4efe0f);logger[_0xae64('0x25')](_0xae64('0x22'),_0x4efe0f,JSON[_0xae64('0x21')](_0x214136));_0x21d128(_0x214136);})['catch'](function(_0x590a85){logger[_0xae64('0x12')](_0xae64('0x22'),_0x590a85[_0xae64('0x14')],_0x4efe0f);_0x487fd2(_0x5b079f[_0xae64('0x12')](0x1f4,_0x590a85['message']));});});};exports[_0xae64('0x26')]=function(_0x249a7a){var _0xc753b5=this;return new Promise(function(_0x19c2c8,_0x11d2fb){return db[_0xae64('0x18')][_0xae64('0x27')]({'where':_0x249a7a['options']?_0x249a7a[_0xae64('0x1a')]['where']||null:null})[_0xae64('0xe')](function(_0x24d689){logger[_0xae64('0xf')](_0xae64('0x26'),_0x249a7a);logger[_0xae64('0x25')](_0xae64('0x26'),_0x249a7a,JSON[_0xae64('0x21')](_0x24d689));_0x19c2c8(_0x24d689);})[_0xae64('0x16')](function(_0x1df71b){logger[_0xae64('0x12')](_0xae64('0x26'),_0x1df71b[_0xae64('0x14')],_0x249a7a);_0x11d2fb(_0xc753b5[_0xae64('0x12')](0x1f4,_0x1df71b[_0xae64('0x14')]));});});}; \ No newline at end of file diff --git a/server/api/cmHopperBlack/index.js b/server/api/cmHopperBlack/index.js index d526b0a..ae1bc82 100644 --- a/server/api/cmHopperBlack/index.js +++ b/server/api/cmHopperBlack/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x68b3=['/:id','show','update','destroy','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/describe','describe'];(function(_0x35d7ea,_0x1f30e1){var _0x371d17=function(_0x28ee99){while(--_0x28ee99){_0x35d7ea['push'](_0x35d7ea['shift']());}};_0x371d17(++_0x1f30e1);}(_0x68b3,0x1d8));var _0x368b=function(_0x39d965,_0x1853ac){_0x39d965=_0x39d965-0x0;var _0x1155ac=_0x68b3[_0x39d965];return _0x1155ac;};'use strict';var multer=require(_0x368b('0x0'));var util=require(_0x368b('0x1'));var path=require(_0x368b('0x2'));var timeout=require(_0x368b('0x3'));var express=require(_0x368b('0x4'));var router=express['Router']();var fs_extra=require(_0x368b('0x5'));var auth=require(_0x368b('0x6'));var interaction=require(_0x368b('0x7'));var config=require(_0x368b('0x8'));var controller=require('./cmHopperBlack.controller');router[_0x368b('0x9')]('/',auth[_0x368b('0xa')](),controller[_0x368b('0xb')]);router[_0x368b('0x9')](_0x368b('0xc'),auth[_0x368b('0xa')](),controller[_0x368b('0xd')]);router[_0x368b('0x9')](_0x368b('0xe'),auth[_0x368b('0xa')](),controller[_0x368b('0xf')]);router['put'](_0x368b('0xe'),auth[_0x368b('0xa')](),controller[_0x368b('0x10')]);router['delete'](_0x368b('0xe'),auth[_0x368b('0xa')](),controller[_0x368b('0x11')]);module['exports']=router; \ No newline at end of file +var _0xb145=['update','delete','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./cmHopperBlack.controller','get','isAuthenticated','index','/describe','describe','/:id','show','put'];(function(_0x58a3ab,_0x5a7ee4){var _0x791961=function(_0x5b4c39){while(--_0x5b4c39){_0x58a3ab['push'](_0x58a3ab['shift']());}};_0x791961(++_0x5a7ee4);}(_0xb145,0xa3));var _0x5b14=function(_0x28ff59,_0x44ad9f){_0x28ff59=_0x28ff59-0x0;var _0x5099bb=_0xb145[_0x28ff59];return _0x5099bb;};'use strict';var multer=require('multer');var util=require(_0x5b14('0x0'));var path=require(_0x5b14('0x1'));var timeout=require(_0x5b14('0x2'));var express=require(_0x5b14('0x3'));var router=express[_0x5b14('0x4')]();var fs_extra=require(_0x5b14('0x5'));var auth=require(_0x5b14('0x6'));var interaction=require(_0x5b14('0x7'));var config=require('../../config/environment');var controller=require(_0x5b14('0x8'));router[_0x5b14('0x9')]('/',auth[_0x5b14('0xa')](),controller[_0x5b14('0xb')]);router['get'](_0x5b14('0xc'),auth[_0x5b14('0xa')](),controller[_0x5b14('0xd')]);router[_0x5b14('0x9')](_0x5b14('0xe'),auth['isAuthenticated'](),controller[_0x5b14('0xf')]);router[_0x5b14('0x10')]('/:id',auth[_0x5b14('0xa')](),controller[_0x5b14('0x11')]);router[_0x5b14('0x12')](_0x5b14('0xe'),auth[_0x5b14('0xa')](),controller['destroy']);module[_0x5b14('0x13')]=router; \ No newline at end of file diff --git a/server/api/cmHopperFinal/cmHopperFinal.attributes.js b/server/api/cmHopperFinal/cmHopperFinal.attributes.js index 7142a2c..f3f5fa1 100644 --- a/server/api/cmHopperFinal/cmHopperFinal.attributes.js +++ b/server/api/cmHopperFinal/cmHopperFinal.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x75d4=['STRING','DATE','INTEGER','getDataValue','endtime','setDataValue','followuptime','diff','seconds','dispositionat','BOOLEAN','moment','exports'];(function(_0x457a50,_0x5b6817){var _0x156c23=function(_0x1185e1){while(--_0x1185e1){_0x457a50['push'](_0x457a50['shift']());}};_0x156c23(++_0x5b6817);}(_0x75d4,0x143));var _0x475d=function(_0x39d314,_0x819b78){_0x39d314=_0x39d314-0x0;var _0x5653de=_0x75d4[_0x39d314];return _0x5653de;};'use strict';var Sequelize=require('sequelize');var moment=require(_0x475d('0x0'));module[_0x475d('0x1')]={'state':{'type':Sequelize['INTEGER'](0x2)},'statedesc':{'type':Sequelize[_0x475d('0x2')]},'scheduledat':{'type':Sequelize[_0x475d('0x3')]},'countbusyretry':{'type':Sequelize[_0x475d('0x4')],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize[_0x475d('0x4')],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize[_0x475d('0x4')],'defaultValue':0x0},'countglobal':{'type':Sequelize[_0x475d('0x4')],'defaultValue':0x0},'uniqueid':{'type':Sequelize[_0x475d('0x2')]},'originatecalleridnum':{'type':Sequelize[_0x475d('0x2')]},'originatecalleridname':{'type':Sequelize[_0x475d('0x2')]},'calleridnum':{'type':Sequelize[_0x475d('0x2')]},'calleridname':{'type':Sequelize[_0x475d('0x2')]},'starttime':{'type':Sequelize[_0x475d('0x3')]},'responsetime':{'type':Sequelize[_0x475d('0x3')]},'answertime':{'type':Sequelize[_0x475d('0x3')]},'droptime':{'type':Sequelize[_0x475d('0x3')]},'endtime':{'type':Sequelize['DATE']},'ringtime':{'type':Sequelize[_0x475d('0x4')],'defaultValue':0x0},'holdtime':{'type':Sequelize[_0x475d('0x4')],'defaultValue':0x0},'talktime':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'followuptime':{'type':Sequelize[_0x475d('0x4')],'defaultValue':0x0},'dropreason':{'type':Sequelize[_0x475d('0x2')]},'campaign':{'type':Sequelize[_0x475d('0x2')]},'campaigntype':{'type':Sequelize[_0x475d('0x2')]},'membername':{'type':Sequelize[_0x475d('0x2')]},'reason':{'type':Sequelize[_0x475d('0x2')]},'disposition':{'type':Sequelize[_0x475d('0x2')]},'secondDisposition':{'type':Sequelize[_0x475d('0x2')]},'thirdDisposition':{'type':Sequelize[_0x475d('0x2')]},'dispositionat':{'type':Sequelize['DATE'],'set':function(_0x43a449){var _0x449d23=this[_0x475d('0x5')](_0x475d('0x6'));if(_0x449d23&&_0x43a449){this[_0x475d('0x7')](_0x475d('0x8'),moment(_0x43a449)[_0x475d('0x9')](moment(_0x449d23),_0x475d('0xa')));}return this[_0x475d('0x7')](_0x475d('0xb'),_0x43a449);}},'amd':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'fax':{'type':Sequelize[_0x475d('0xc')],'defaultValue':![]},'blacklist':{'type':Sequelize[_0x475d('0xc')],'defaultValue':![]},'rescheduled':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'rescheduledat':{'type':Sequelize[_0x475d('0x3')]},'callback':{'type':Sequelize[_0x475d('0xc')],'defaultValue':![]},'callbackuniqueid':{'type':Sequelize[_0x475d('0x2')],'defaultValue':null},'callbackat':{'type':Sequelize[_0x475d('0x3')]},'deleted':{'type':Sequelize[_0x475d('0x2')],'defaultValue':null},'deletedat':{'type':Sequelize[_0x475d('0x3')]},'recallme':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agiafterat':{'type':Sequelize['DATE']},'countnosuchnumberretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countdropretry':{'type':Sequelize[_0x475d('0x4')],'defaultValue':0x0},'countabandonedretry':{'type':Sequelize[_0x475d('0x4')],'defaultValue':0x0},'countmachineretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countagentrejectretry':{'type':Sequelize[_0x475d('0x4')],'defaultValue':0x0}}; \ No newline at end of file +var _0x40a4=['DATE','getDataValue','setDataValue','followuptime','diff','BOOLEAN','sequelize','moment','INTEGER','STRING'];(function(_0x2b5b44,_0x17189c){var _0x32cb66=function(_0x4ce183){while(--_0x4ce183){_0x2b5b44['push'](_0x2b5b44['shift']());}};_0x32cb66(++_0x17189c);}(_0x40a4,0x88));var _0x440a=function(_0x3030cb,_0x22b79f){_0x3030cb=_0x3030cb-0x0;var _0x51469c=_0x40a4[_0x3030cb];return _0x51469c;};'use strict';var Sequelize=require(_0x440a('0x0'));var moment=require(_0x440a('0x1'));module['exports']={'state':{'type':Sequelize[_0x440a('0x2')](0x2)},'statedesc':{'type':Sequelize[_0x440a('0x3')]},'scheduledat':{'type':Sequelize[_0x440a('0x4')]},'countbusyretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize[_0x440a('0x2')],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize[_0x440a('0x2')],'defaultValue':0x0},'countglobal':{'type':Sequelize[_0x440a('0x2')],'defaultValue':0x0},'uniqueid':{'type':Sequelize['STRING']},'originatecalleridnum':{'type':Sequelize[_0x440a('0x3')]},'originatecalleridname':{'type':Sequelize[_0x440a('0x3')]},'calleridnum':{'type':Sequelize[_0x440a('0x3')]},'calleridname':{'type':Sequelize['STRING']},'starttime':{'type':Sequelize[_0x440a('0x4')]},'responsetime':{'type':Sequelize[_0x440a('0x4')]},'answertime':{'type':Sequelize[_0x440a('0x4')]},'droptime':{'type':Sequelize[_0x440a('0x4')]},'endtime':{'type':Sequelize[_0x440a('0x4')]},'ringtime':{'type':Sequelize[_0x440a('0x2')],'defaultValue':0x0},'holdtime':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'talktime':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'followuptime':{'type':Sequelize[_0x440a('0x2')],'defaultValue':0x0},'dropreason':{'type':Sequelize[_0x440a('0x3')]},'campaign':{'type':Sequelize[_0x440a('0x3')]},'campaigntype':{'type':Sequelize[_0x440a('0x3')]},'membername':{'type':Sequelize[_0x440a('0x3')]},'reason':{'type':Sequelize['STRING']},'disposition':{'type':Sequelize[_0x440a('0x3')]},'secondDisposition':{'type':Sequelize[_0x440a('0x3')]},'thirdDisposition':{'type':Sequelize[_0x440a('0x3')]},'dispositionat':{'type':Sequelize[_0x440a('0x4')],'set':function(_0x2de5cf){var _0x5c6452=this[_0x440a('0x5')]('endtime');if(_0x5c6452&&_0x2de5cf){this[_0x440a('0x6')](_0x440a('0x7'),moment(_0x2de5cf)[_0x440a('0x8')](moment(_0x5c6452),'seconds'));}return this[_0x440a('0x6')]('dispositionat',_0x2de5cf);}},'amd':{'type':Sequelize[_0x440a('0x9')],'defaultValue':![]},'fax':{'type':Sequelize[_0x440a('0x9')],'defaultValue':![]},'blacklist':{'type':Sequelize[_0x440a('0x9')],'defaultValue':![]},'rescheduled':{'type':Sequelize[_0x440a('0x9')],'defaultValue':![]},'rescheduledat':{'type':Sequelize['DATE']},'callback':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'callbackuniqueid':{'type':Sequelize[_0x440a('0x3')],'defaultValue':null},'callbackat':{'type':Sequelize['DATE']},'deleted':{'type':Sequelize[_0x440a('0x3')],'defaultValue':null},'deletedat':{'type':Sequelize[_0x440a('0x4')]},'recallme':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agiafterat':{'type':Sequelize[_0x440a('0x4')]},'countnosuchnumberretry':{'type':Sequelize[_0x440a('0x2')],'defaultValue':0x0},'countdropretry':{'type':Sequelize[_0x440a('0x2')],'defaultValue':0x0},'countabandonedretry':{'type':Sequelize[_0x440a('0x2')],'defaultValue':0x0},'countmachineretry':{'type':Sequelize[_0x440a('0x2')],'defaultValue':0x0},'countagentrejectretry':{'type':Sequelize[_0x440a('0x2')],'defaultValue':0x0}}; \ No newline at end of file diff --git a/server/api/cmHopperFinal/cmHopperFinal.controller.js b/server/api/cmHopperFinal/cmHopperFinal.controller.js index b74428a..e375c3c 100644 --- a/server/api/cmHopperFinal/cmHopperFinal.controller.js +++ b/server/api/cmHopperFinal/cmHopperFinal.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5496=['set','Content-Range','apply','reject','save','update','then','error','stack','name','index','CmHopperFinal','rawAttributes','fieldName','type','key','model','map','query','filters','intersection','attributes','length','hasOwnProperty','nolimit','offset','order','sort','pick','filter','where','merge','VIRTUAL','includeAll','rows','catch','show','params','keys','fields','include','options','find','describe','body','uniqueid','countContactsQueueCampaignHopperFinal','findAll','sequelize','literal','`state`\x20=\x200,\x201,\x20null','noSuchContacts','COUNT','`state`\x20=\x203,\x201,\x20null','noAnswerContacts','`state`\x20=\x205,\x201,\x20null','busyContacts','`state`\x20=\x208,\x201,\x20null','congestionContacts','`state`\x20=\x2010\x20,\x201,\x20null','`state`\x20=\x2011\x20,\x201,\x20null','`state`\x20=\x2022,\x201,\x20null','`state`\x20=\x2019,\x201,\x20null','countContactsIvrCampaignHopperFinal','dropContacts','abandonedContacts','reCallContacts','answeringMachine','into','cm_hopper','fromQuery','ListId','VoiceQueueId','createdAt','field','phone','NOW()','scheduledAt','ANY_VALUE(ContactId)','ContactId','ANY_VALUE(ListId)','updatedAt','cm_hopper_final','VoiceQueueId\x20=\x20?','toString','state\x20=\x20?','state','calleridnum\x20IS\x20NOT\x20NULL','calleridnum\x20NOT\x20IN\x20(?)','select','from','calleridnum','state\x20=\x204','group','moveContactsIvrCampaignHopperFinal','Campaign','insert','CampaignId','ANY_VALUE(calleridnum)','CampaignId\x20=\x20?','checkContactHopper','CmHopper','findOne','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','util','path','sox','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end','status','json','undefined','limit','count'];(function(_0x1976c9,_0x4c6a2f){var _0x3bc4d4=function(_0x44343a){while(--_0x44343a){_0x1976c9['push'](_0x1976c9['shift']());}};_0x3bc4d4(++_0x4c6a2f);}(_0x5496,0x175));var _0x6549=function(_0x173af5,_0x5d4da4){_0x173af5=_0x173af5-0x0;var _0x529118=_0x5496[_0x173af5];return _0x529118;};'use strict';var emlformat=require(_0x6549('0x0'));var rimraf=require(_0x6549('0x1'));var zipdir=require(_0x6549('0x2'));var jsonpatch=require(_0x6549('0x3'));var rp=require(_0x6549('0x4'));var moment=require('moment');var BPromise=require(_0x6549('0x5'));var Mustache=require('mustache');var util=require(_0x6549('0x6'));var path=require(_0x6549('0x7'));var sox=require(_0x6549('0x8'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x6549('0x9'));var _=require(_0x6549('0xa'));var squel=require('squel');var crypto=require(_0x6549('0xb'));var jsforce=require(_0x6549('0xc'));var deskjs=require(_0x6549('0xd'));var toCsv=require('to-csv');var querystring=require(_0x6549('0xe'));var Papa=require(_0x6549('0xf'));var Redis=require(_0x6549('0x10'));var authService=require(_0x6549('0x11'));var qs=require(_0x6549('0x12'));var as=require(_0x6549('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x6549('0x14'));var utils=require(_0x6549('0x15'));var config=require(_0x6549('0x16'));var licenseUtil=require(_0x6549('0x17'));var db=require(_0x6549('0x18'))['db'];function respondWithStatusCode(_0x5bc018,_0x4dfb06){_0x4dfb06=_0x4dfb06||0xcc;return function(_0x3f844f){if(_0x3f844f){return _0x5bc018[_0x6549('0x19')](_0x4dfb06);}return _0x5bc018['status'](_0x4dfb06)[_0x6549('0x1a')]();};}function respondWithResult(_0x150fc8,_0x195d25){_0x195d25=_0x195d25||0xc8;return function(_0x12b068){if(_0x12b068){return _0x150fc8[_0x6549('0x1b')](_0x195d25)[_0x6549('0x1c')](_0x12b068);}};}function respondWithFilteredResult(_0x55c112,_0x5db86d){return function(_0x384f75){if(_0x384f75){var _0x25da29=typeof _0x5db86d['offset']===_0x6549('0x1d')&&typeof _0x5db86d[_0x6549('0x1e')]===_0x6549('0x1d');var _0x387e60=_0x384f75[_0x6549('0x1f')];var _0x53b12b=_0x25da29?0x0:_0x5db86d['offset'];var _0x26a212=_0x25da29?_0x384f75['count']:_0x5db86d['offset']+_0x5db86d[_0x6549('0x1e')];var _0x1e5079;if(_0x26a212>=_0x387e60){_0x26a212=_0x387e60;_0x1e5079=0xc8;}else{_0x1e5079=0xce;}_0x55c112[_0x6549('0x1b')](_0x1e5079);return _0x55c112[_0x6549('0x20')](_0x6549('0x21'),_0x53b12b+'-'+_0x26a212+'/'+_0x387e60)['json'](_0x384f75);}return null;};}function patchUpdates(_0x228117){return function(_0x4b40c1){try{jsonpatch[_0x6549('0x22')](_0x4b40c1,_0x228117,!![]);}catch(_0x72322b){return BPromise[_0x6549('0x23')](_0x72322b);}return _0x4b40c1[_0x6549('0x24')]();};}function saveUpdates(_0x22bcf8,_0x12d547){return function(_0x427b47){if(_0x427b47){return _0x427b47[_0x6549('0x25')](_0x22bcf8)[_0x6549('0x26')](function(_0x6ae00c){return _0x6ae00c;});}return null;};}function removeEntity(_0x40d3f9,_0x1fbfa4){return function(_0x23c0ba){if(_0x23c0ba){return _0x23c0ba['destroy']()[_0x6549('0x26')](function(){_0x40d3f9[_0x6549('0x1b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x126967,_0x29f89e){return function(_0x3768cb){if(!_0x3768cb){_0x126967['sendStatus'](0x194);}return _0x3768cb;};}function handleError(_0x31a95,_0xfb51a1){_0xfb51a1=_0xfb51a1||0x1f4;return function(_0x14de1f){logger[_0x6549('0x27')](_0x14de1f[_0x6549('0x28')]);if(_0x14de1f[_0x6549('0x29')]){delete _0x14de1f[_0x6549('0x29')];}_0x31a95[_0x6549('0x1b')](_0xfb51a1)['send'](_0x14de1f);};}exports[_0x6549('0x2a')]=function(_0x136518,_0x17fdfb){var _0x4c605c={},_0x3f1502={},_0x4acaf5={'count':0x0,'rows':[]};var _0x4f0ad1=_['map'](db[_0x6549('0x2b')][_0x6549('0x2c')],function(_0x4f3069){return{'name':_0x4f3069[_0x6549('0x2d')],'type':_0x4f3069[_0x6549('0x2e')][_0x6549('0x2f')]};});_0x3f1502[_0x6549('0x30')]=_[_0x6549('0x31')](_0x4f0ad1,_0x6549('0x29'));_0x3f1502[_0x6549('0x32')]=_['keys'](_0x136518[_0x6549('0x32')]);_0x3f1502[_0x6549('0x33')]=_[_0x6549('0x34')](_0x3f1502[_0x6549('0x30')],_0x3f1502[_0x6549('0x32')]);_0x4c605c[_0x6549('0x35')]=_['intersection'](_0x3f1502[_0x6549('0x30')],qs['fields'](_0x136518[_0x6549('0x32')]['fields']));_0x4c605c[_0x6549('0x35')]=_0x4c605c[_0x6549('0x35')][_0x6549('0x36')]?_0x4c605c['attributes']:_0x3f1502[_0x6549('0x30')];if(!_0x136518[_0x6549('0x32')][_0x6549('0x37')](_0x6549('0x38'))){_0x4c605c['limit']=qs['limit'](_0x136518['query'][_0x6549('0x1e')]);_0x4c605c[_0x6549('0x39')]=qs['offset'](_0x136518[_0x6549('0x32')][_0x6549('0x39')]);}_0x4c605c[_0x6549('0x3a')]=qs[_0x6549('0x3b')](_0x136518[_0x6549('0x32')]['sort']);_0x4c605c['where']=qs[_0x6549('0x33')](_[_0x6549('0x3c')](_0x136518[_0x6549('0x32')],_0x3f1502[_0x6549('0x33')]),_0x4f0ad1);if(_0x136518[_0x6549('0x32')][_0x6549('0x3d')]){_0x4c605c[_0x6549('0x3e')]=_[_0x6549('0x3f')](_0x4c605c[_0x6549('0x3e')],{'$or':_[_0x6549('0x31')](_0x4f0ad1,function(_0x525f82){if(_0x525f82[_0x6549('0x2e')]!==_0x6549('0x40')){var _0x2ea977={};_0x2ea977[_0x525f82[_0x6549('0x29')]]={'$like':'%'+_0x136518[_0x6549('0x32')]['filter']+'%'};return _0x2ea977;}})});}_0x4c605c=_['merge']({},_0x4c605c,_0x136518['options']);var _0x22b919={'where':_0x4c605c[_0x6549('0x3e')]};return db[_0x6549('0x2b')][_0x6549('0x1f')](_0x22b919)['then'](function(_0x56ce9f){_0x4acaf5[_0x6549('0x1f')]=_0x56ce9f;if(_0x136518[_0x6549('0x32')][_0x6549('0x41')]){_0x4c605c['include']=[{'all':!![]}];}return db[_0x6549('0x2b')]['findAll'](_0x4c605c);})[_0x6549('0x26')](function(_0x2ec614){_0x4acaf5[_0x6549('0x42')]=_0x2ec614;return _0x4acaf5;})[_0x6549('0x26')](respondWithFilteredResult(_0x17fdfb,_0x4c605c))[_0x6549('0x43')](handleError(_0x17fdfb,null));};exports[_0x6549('0x44')]=function(_0xbbfdc9,_0x4deaab){var _0x132625={'raw':!![],'where':{'id':_0xbbfdc9[_0x6549('0x45')]['id']}},_0x309f45={};_0x309f45[_0x6549('0x30')]=_[_0x6549('0x46')](db[_0x6549('0x2b')][_0x6549('0x2c')]);_0x309f45[_0x6549('0x32')]=_[_0x6549('0x46')](_0xbbfdc9[_0x6549('0x32')]);_0x309f45[_0x6549('0x33')]=_[_0x6549('0x34')](_0x309f45[_0x6549('0x30')],_0x309f45[_0x6549('0x32')]);_0x132625[_0x6549('0x35')]=_[_0x6549('0x34')](_0x309f45['model'],qs[_0x6549('0x47')](_0xbbfdc9[_0x6549('0x32')][_0x6549('0x47')]));_0x132625[_0x6549('0x35')]=_0x132625['attributes'][_0x6549('0x36')]?_0x132625['attributes']:_0x309f45[_0x6549('0x30')];if(_0xbbfdc9[_0x6549('0x32')]['includeAll']){_0x132625[_0x6549('0x48')]=[{'all':!![]}];}_0x132625=_[_0x6549('0x3f')]({},_0x132625,_0xbbfdc9[_0x6549('0x49')]);return db[_0x6549('0x2b')][_0x6549('0x4a')](_0x132625)['then'](handleEntityNotFound(_0x4deaab,null))['then'](respondWithResult(_0x4deaab,null))[_0x6549('0x43')](handleError(_0x4deaab,null));};exports[_0x6549('0x4b')]=function(_0x41d675,_0x1712f3){return db[_0x6549('0x2b')]['describe']()[_0x6549('0x26')](respondWithResult(_0x1712f3,null))[_0x6549('0x43')](handleError(_0x1712f3,null));};exports[_0x6549('0x25')]=function(_0x6121af,_0xa4c650){if(_0x6121af[_0x6549('0x4c')][_0x6549('0x4d')]){delete _0x6121af[_0x6549('0x4c')]['uniqueid'];}return db[_0x6549('0x2b')]['find']({'where':{'uniqueid':_0x6121af[_0x6549('0x45')]['id']}})[_0x6549('0x26')](handleEntityNotFound(_0xa4c650,null))[_0x6549('0x26')](saveUpdates(_0x6121af['body'],null))[_0x6549('0x26')](respondWithResult(_0xa4c650,null))[_0x6549('0x43')](handleError(_0xa4c650,null));};exports[_0x6549('0x4e')]=function(_0x5300c8,_0x19ac50,_0x17d7ce){return db[_0x6549('0x2b')][_0x6549('0x4f')]({'raw':![],'where':{'VoiceQueueId':_0x5300c8[_0x6549('0x45')]['id']},'attributes':[[db[_0x6549('0x50')]['fn']('COUNT',db[_0x6549('0x50')]['fn']('IF',db['sequelize'][_0x6549('0x51')](_0x6549('0x52')))),_0x6549('0x53')],[db[_0x6549('0x50')]['fn'](_0x6549('0x54'),db[_0x6549('0x50')]['fn']('IF',db[_0x6549('0x50')][_0x6549('0x51')](_0x6549('0x55')))),_0x6549('0x56')],[db[_0x6549('0x50')]['fn'](_0x6549('0x54'),db['sequelize']['fn']('IF',db[_0x6549('0x50')][_0x6549('0x51')](_0x6549('0x57')))),_0x6549('0x58')],[db[_0x6549('0x50')]['fn'](_0x6549('0x54'),db[_0x6549('0x50')]['fn']('IF',db[_0x6549('0x50')]['literal'](_0x6549('0x59')))),_0x6549('0x5a')],[db[_0x6549('0x50')]['fn'](_0x6549('0x54'),db[_0x6549('0x50')]['fn']('IF',db[_0x6549('0x50')][_0x6549('0x51')](_0x6549('0x5b')))),'dropContacts'],[db[_0x6549('0x50')]['fn'](_0x6549('0x54'),db[_0x6549('0x50')]['fn']('IF',db[_0x6549('0x50')][_0x6549('0x51')](_0x6549('0x5c')))),'abandonedContacts'],[db[_0x6549('0x50')]['fn'](_0x6549('0x54'),db['sequelize']['fn']('IF',db[_0x6549('0x50')][_0x6549('0x51')](_0x6549('0x5d')))),'reCallContacts'],[db[_0x6549('0x50')]['fn'](_0x6549('0x54'),db['sequelize']['fn']('IF',db[_0x6549('0x50')]['literal'](_0x6549('0x5e')))),'answeringMachine']]})[_0x6549('0x26')](handleEntityNotFound(_0x19ac50,null))[_0x6549('0x26')](respondWithResult(_0x19ac50,null))[_0x6549('0x43')](handleError(_0x19ac50,null));};exports[_0x6549('0x5f')]=function(_0x2da535,_0x45eb28,_0x3b01d9){return db[_0x6549('0x2b')][_0x6549('0x4f')]({'raw':![],'where':{'CampaignId':_0x2da535[_0x6549('0x45')]['id']},'attributes':[[db[_0x6549('0x50')]['fn'](_0x6549('0x54'),db[_0x6549('0x50')]['fn']('IF',db[_0x6549('0x50')]['literal'](_0x6549('0x52')))),_0x6549('0x53')],[db['sequelize']['fn'](_0x6549('0x54'),db[_0x6549('0x50')]['fn']('IF',db[_0x6549('0x50')][_0x6549('0x51')]('`state`\x20=\x203,\x201,\x20null'))),_0x6549('0x56')],[db[_0x6549('0x50')]['fn'](_0x6549('0x54'),db[_0x6549('0x50')]['fn']('IF',db['sequelize'][_0x6549('0x51')]('`state`\x20=\x205,\x201,\x20null'))),_0x6549('0x58')],[db[_0x6549('0x50')]['fn'](_0x6549('0x54'),db[_0x6549('0x50')]['fn']('IF',db[_0x6549('0x50')][_0x6549('0x51')](_0x6549('0x59')))),_0x6549('0x5a')],[db[_0x6549('0x50')]['fn'](_0x6549('0x54'),db['sequelize']['fn']('IF',db[_0x6549('0x50')][_0x6549('0x51')](_0x6549('0x5b')))),_0x6549('0x60')],[db[_0x6549('0x50')]['fn'](_0x6549('0x54'),db['sequelize']['fn']('IF',db['sequelize'][_0x6549('0x51')](_0x6549('0x5c')))),_0x6549('0x61')],[db['sequelize']['fn'](_0x6549('0x54'),db[_0x6549('0x50')]['fn']('IF',db['sequelize'][_0x6549('0x51')](_0x6549('0x5d')))),_0x6549('0x62')],[db[_0x6549('0x50')]['fn'](_0x6549('0x54'),db[_0x6549('0x50')]['fn']('IF',db[_0x6549('0x50')][_0x6549('0x51')]('`state`\x20=\x2019,\x201,\x20null'))),_0x6549('0x63')]]})['then'](handleEntityNotFound(_0x45eb28,null))[_0x6549('0x26')](respondWithResult(_0x45eb28,null))[_0x6549('0x43')](handleError(_0x45eb28,null));};exports['moveContactsQueueCampaignHopperFinal']=function(_0x372b67,_0x2c00a1,_0x2e6b4b){return db['VoiceQueue'][_0x6549('0x4a')]({'where':{'id':_0x372b67[_0x6549('0x45')]['id']}})[_0x6549('0x26')](handleEntityNotFound(_0x2c00a1,null))[_0x6549('0x26')](function(_0x15b906){var _0x34c5f9;if(_0x15b906){_0x34c5f9=squel['insert']()[_0x6549('0x64')](_0x6549('0x65'))[_0x6549('0x66')](['phone','scheduledAt','ContactId',_0x6549('0x67'),_0x6549('0x68'),_0x6549('0x69'),'updatedAt'],squel['select']()[_0x6549('0x6a')]('ANY_VALUE(calleridnum)',_0x6549('0x6b'))[_0x6549('0x6a')](_0x6549('0x6c'),_0x6549('0x6d'))[_0x6549('0x6a')](_0x6549('0x6e'),_0x6549('0x6f'))['field'](_0x6549('0x70'),_0x6549('0x67'))[_0x6549('0x6a')]('ANY_VALUE(VoiceQueueId)',_0x6549('0x68'))[_0x6549('0x6a')](_0x6549('0x6c'),_0x6549('0x69'))[_0x6549('0x6a')](_0x6549('0x6c'),_0x6549('0x71'))['from'](_0x6549('0x72'))['where'](_0x6549('0x73'),_0x372b67[_0x6549('0x45')]['id'][_0x6549('0x74')]())[_0x6549('0x3e')](_0x6549('0x75'),_0x372b67[_0x6549('0x4c')][_0x6549('0x76')][_0x6549('0x74')]())['where'](_0x6549('0x77'))[_0x6549('0x3e')](_0x6549('0x78'),squel[_0x6549('0x79')]()[_0x6549('0x6a')](_0x6549('0x6b'))[_0x6549('0x7a')](_0x6549('0x65'))[_0x6549('0x3e')](_0x6549('0x73'),_0x372b67['params']['id'][_0x6549('0x74')]()))[_0x6549('0x3e')](_0x6549('0x78'),squel[_0x6549('0x79')]()[_0x6549('0x6a')](_0x6549('0x7b'))[_0x6549('0x7a')](_0x6549('0x72'))[_0x6549('0x3e')](_0x6549('0x73'),_0x372b67[_0x6549('0x45')]['id'][_0x6549('0x74')]())[_0x6549('0x3e')](_0x6549('0x7c')))[_0x6549('0x7d')](_0x6549('0x6f')))[_0x6549('0x74')]();return db[_0x6549('0x50')]['query'](_0x34c5f9);}return[];})[_0x6549('0x26')](respondWithResult(_0x2c00a1,null))[_0x6549('0x43')](handleError(_0x2c00a1,null));};exports[_0x6549('0x7e')]=function(_0x35bad6,_0x371d8a,_0xfde69e){return db[_0x6549('0x7f')][_0x6549('0x4a')]({'where':{'id':_0x35bad6[_0x6549('0x45')]['id']}})[_0x6549('0x26')](handleEntityNotFound(_0x371d8a,null))[_0x6549('0x26')](function(_0x1da2d7){var _0x348d55;if(_0x1da2d7){_0x348d55=squel[_0x6549('0x80')]()[_0x6549('0x64')](_0x6549('0x65'))[_0x6549('0x66')](['phone',_0x6549('0x6d'),_0x6549('0x6f'),_0x6549('0x67'),_0x6549('0x81'),_0x6549('0x69'),_0x6549('0x71')],squel[_0x6549('0x79')]()['field'](_0x6549('0x82'),'phone')['field'](_0x6549('0x6c'),'scheduledAt')[_0x6549('0x6a')](_0x6549('0x6e'),_0x6549('0x6f'))[_0x6549('0x6a')](_0x6549('0x70'),'ListId')[_0x6549('0x6a')]('ANY_VALUE(CampaignId)',_0x6549('0x81'))[_0x6549('0x6a')](_0x6549('0x6c'),'createdAt')[_0x6549('0x6a')](_0x6549('0x6c'),'updatedAt')['from'](_0x6549('0x72'))[_0x6549('0x3e')](_0x6549('0x83'),_0x35bad6[_0x6549('0x45')]['id'][_0x6549('0x74')]())[_0x6549('0x3e')](_0x6549('0x75'),_0x35bad6[_0x6549('0x4c')][_0x6549('0x76')][_0x6549('0x74')]())[_0x6549('0x3e')](_0x6549('0x77'))[_0x6549('0x3e')](_0x6549('0x78'),squel[_0x6549('0x79')]()[_0x6549('0x6a')](_0x6549('0x6b'))[_0x6549('0x7a')](_0x6549('0x65'))['where']('CampaignId\x20=\x20?',_0x35bad6[_0x6549('0x45')]['id'][_0x6549('0x74')]()))[_0x6549('0x3e')](_0x6549('0x78'),squel[_0x6549('0x79')]()[_0x6549('0x6a')](_0x6549('0x7b'))[_0x6549('0x7a')](_0x6549('0x72'))[_0x6549('0x3e')]('CampaignId\x20=\x20?',_0x35bad6['params']['id']['toString']())[_0x6549('0x3e')](_0x6549('0x7c')))[_0x6549('0x7d')](_0x6549('0x6f')))[_0x6549('0x74')]();return db['sequelize'][_0x6549('0x32')](_0x348d55);}return[];})[_0x6549('0x26')](respondWithResult(_0x371d8a,null))[_0x6549('0x43')](handleError(_0x371d8a,null));};exports[_0x6549('0x84')]=function(_0x230874,_0x3be369,_0xaf1a80){return db[_0x6549('0x85')][_0x6549('0x86')]({'where':{'VoiceQueueId':_0x230874[_0x6549('0x4c')][_0x6549('0x68')],'CampaignId':_0x230874['body'][_0x6549('0x81')],'ContactId':_0x230874[_0x6549('0x4c')][_0x6549('0x6f')]}})[_0x6549('0x26')](handleEntityNotFound(_0x3be369,null))['then'](function(_0x158c92){if(_0x158c92){return _0x158c92;}return null;})[_0x6549('0x26')](respondWithResult(_0x3be369,null))[_0x6549('0x43')](handleError(_0x3be369,null));}; \ No newline at end of file +var _0xc4aa=['ContactId','ListId','ANY_VALUE(VoiceQueueId)','NOW()','createdAt','from','cm_hopper_final','toString','state\x20=\x20?','state','calleridnum\x20IS\x20NOT\x20NULL','calleridnum\x20NOT\x20IN\x20(?)','select','cm_hopper','VoiceQueueId\x20=\x20?','calleridnum','state\x20=\x204','group','moveContactsIvrCampaignHopperFinal','phone','CampaignId','ANY_VALUE(ContactId)','ANY_VALUE(ListId)','ANY_VALUE(CampaignId)','CampaignId\x20=\x20?','checkContactHopper','CmHopper','findOne','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','update','then','destroy','error','stack','name','send','index','map','CmHopperFinal','fieldName','type','key','model','query','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','filters','pick','filter','where','VIRTUAL','merge','options','includeAll','include','rows','catch','show','params','keys','rawAttributes','describe','uniqueid','find','body','countContactsQueueCampaignHopperFinal','findAll','sequelize','COUNT','`state`\x20=\x200,\x201,\x20null','noSuchContacts','literal','noAnswerContacts','busyContacts','`state`\x20=\x208,\x201,\x20null','congestionContacts','`state`\x20=\x2010\x20,\x201,\x20null','dropContacts','`state`\x20=\x2011\x20,\x201,\x20null','abandonedContacts','`state`\x20=\x2022,\x201,\x20null','reCallContacts','`state`\x20=\x2019,\x201,\x20null','countContactsIvrCampaignHopperFinal','`state`\x20=\x203,\x201,\x20null','`state`\x20=\x205,\x201,\x20null','answeringMachine','moveContactsQueueCampaignHopperFinal','VoiceQueue','insert','into','fromQuery','scheduledAt','VoiceQueueId','updatedAt','field','ANY_VALUE(calleridnum)'];(function(_0xd2c332,_0x1b5f38){var _0x4efc6f=function(_0x56d70c){while(--_0x56d70c){_0xd2c332['push'](_0xd2c332['shift']());}};_0x4efc6f(++_0x1b5f38);}(_0xc4aa,0x1b7));var _0xac4a=function(_0x342baa,_0x4a110f){_0x342baa=_0x342baa-0x0;var _0x1208f3=_0xc4aa[_0x342baa];return _0x1208f3;};'use strict';var emlformat=require(_0xac4a('0x0'));var rimraf=require(_0xac4a('0x1'));var zipdir=require(_0xac4a('0x2'));var jsonpatch=require(_0xac4a('0x3'));var rp=require(_0xac4a('0x4'));var moment=require(_0xac4a('0x5'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require('util');var path=require(_0xac4a('0x6'));var sox=require(_0xac4a('0x7'));var csv=require(_0xac4a('0x8'));var ejs=require(_0xac4a('0x9'));var fs=require('fs');var fs_extra=require(_0xac4a('0xa'));var _=require(_0xac4a('0xb'));var squel=require(_0xac4a('0xc'));var crypto=require(_0xac4a('0xd'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0xac4a('0x8'));var querystring=require(_0xac4a('0xe'));var Papa=require(_0xac4a('0xf'));var Redis=require('ioredis');var authService=require(_0xac4a('0x10'));var qs=require(_0xac4a('0x11'));var as=require(_0xac4a('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xac4a('0x13'))('api');var utils=require(_0xac4a('0x14'));var config=require('../../config/environment');var licenseUtil=require(_0xac4a('0x15'));var db=require(_0xac4a('0x16'))['db'];function respondWithStatusCode(_0x24291d,_0x5e16aa){_0x5e16aa=_0x5e16aa||0xcc;return function(_0x21a79){if(_0x21a79){return _0x24291d[_0xac4a('0x17')](_0x5e16aa);}return _0x24291d[_0xac4a('0x18')](_0x5e16aa)[_0xac4a('0x19')]();};}function respondWithResult(_0x1b4313,_0x3b71c0){_0x3b71c0=_0x3b71c0||0xc8;return function(_0x34bc01){if(_0x34bc01){return _0x1b4313[_0xac4a('0x18')](_0x3b71c0)[_0xac4a('0x1a')](_0x34bc01);}};}function respondWithFilteredResult(_0x42c7fc,_0x11e101){return function(_0x26dbb8){if(_0x26dbb8){var _0x4a2119=typeof _0x11e101[_0xac4a('0x1b')]===_0xac4a('0x1c')&&typeof _0x11e101[_0xac4a('0x1d')]===_0xac4a('0x1c');var _0x3e88e3=_0x26dbb8[_0xac4a('0x1e')];var _0x28e304=_0x4a2119?0x0:_0x11e101[_0xac4a('0x1b')];var _0x546c5d=_0x4a2119?_0x26dbb8['count']:_0x11e101[_0xac4a('0x1b')]+_0x11e101[_0xac4a('0x1d')];var _0x39b691;if(_0x546c5d>=_0x3e88e3){_0x546c5d=_0x3e88e3;_0x39b691=0xc8;}else{_0x39b691=0xce;}_0x42c7fc['status'](_0x39b691);return _0x42c7fc[_0xac4a('0x1f')](_0xac4a('0x20'),_0x28e304+'-'+_0x546c5d+'/'+_0x3e88e3)[_0xac4a('0x1a')](_0x26dbb8);}return null;};}function patchUpdates(_0x3a3cdb){return function(_0x123694){try{jsonpatch[_0xac4a('0x21')](_0x123694,_0x3a3cdb,!![]);}catch(_0xe38996){return BPromise[_0xac4a('0x22')](_0xe38996);}return _0x123694['save']();};}function saveUpdates(_0x3d8f0a,_0x3204ad){return function(_0x599787){if(_0x599787){return _0x599787[_0xac4a('0x23')](_0x3d8f0a)[_0xac4a('0x24')](function(_0x3eacd3){return _0x3eacd3;});}return null;};}function removeEntity(_0x947d8e,_0x4d2d6c){return function(_0x1b7998){if(_0x1b7998){return _0x1b7998[_0xac4a('0x25')]()[_0xac4a('0x24')](function(){_0x947d8e[_0xac4a('0x18')](0xcc)[_0xac4a('0x19')]();});}};}function handleEntityNotFound(_0x2b0dc2,_0x222507){return function(_0x36054a){if(!_0x36054a){_0x2b0dc2[_0xac4a('0x17')](0x194);}return _0x36054a;};}function handleError(_0x3bc318,_0x1d0539){_0x1d0539=_0x1d0539||0x1f4;return function(_0x215a31){logger[_0xac4a('0x26')](_0x215a31[_0xac4a('0x27')]);if(_0x215a31[_0xac4a('0x28')]){delete _0x215a31[_0xac4a('0x28')];}_0x3bc318['status'](_0x1d0539)[_0xac4a('0x29')](_0x215a31);};}exports[_0xac4a('0x2a')]=function(_0x42a33c,_0x2772fe){var _0x116700={},_0x4a5a9e={},_0x47f49c={'count':0x0,'rows':[]};var _0xdb7e=_[_0xac4a('0x2b')](db[_0xac4a('0x2c')]['rawAttributes'],function(_0x4bda1f){return{'name':_0x4bda1f[_0xac4a('0x2d')],'type':_0x4bda1f[_0xac4a('0x2e')][_0xac4a('0x2f')]};});_0x4a5a9e[_0xac4a('0x30')]=_[_0xac4a('0x2b')](_0xdb7e,'name');_0x4a5a9e[_0xac4a('0x31')]=_['keys'](_0x42a33c[_0xac4a('0x31')]);_0x4a5a9e['filters']=_[_0xac4a('0x32')](_0x4a5a9e[_0xac4a('0x30')],_0x4a5a9e[_0xac4a('0x31')]);_0x116700[_0xac4a('0x33')]=_[_0xac4a('0x32')](_0x4a5a9e[_0xac4a('0x30')],qs[_0xac4a('0x34')](_0x42a33c[_0xac4a('0x31')][_0xac4a('0x34')]));_0x116700[_0xac4a('0x33')]=_0x116700[_0xac4a('0x33')][_0xac4a('0x35')]?_0x116700[_0xac4a('0x33')]:_0x4a5a9e[_0xac4a('0x30')];if(!_0x42a33c['query'][_0xac4a('0x36')](_0xac4a('0x37'))){_0x116700['limit']=qs[_0xac4a('0x1d')](_0x42a33c[_0xac4a('0x31')]['limit']);_0x116700['offset']=qs[_0xac4a('0x1b')](_0x42a33c[_0xac4a('0x31')][_0xac4a('0x1b')]);}_0x116700[_0xac4a('0x38')]=qs['sort'](_0x42a33c[_0xac4a('0x31')][_0xac4a('0x39')]);_0x116700['where']=qs[_0xac4a('0x3a')](_[_0xac4a('0x3b')](_0x42a33c[_0xac4a('0x31')],_0x4a5a9e['filters']),_0xdb7e);if(_0x42a33c[_0xac4a('0x31')][_0xac4a('0x3c')]){_0x116700[_0xac4a('0x3d')]=_['merge'](_0x116700[_0xac4a('0x3d')],{'$or':_[_0xac4a('0x2b')](_0xdb7e,function(_0x4b9faf){if(_0x4b9faf['type']!==_0xac4a('0x3e')){var _0x5e0926={};_0x5e0926[_0x4b9faf['name']]={'$like':'%'+_0x42a33c['query']['filter']+'%'};return _0x5e0926;}})});}_0x116700=_[_0xac4a('0x3f')]({},_0x116700,_0x42a33c[_0xac4a('0x40')]);var _0x37834b={'where':_0x116700[_0xac4a('0x3d')]};return db[_0xac4a('0x2c')][_0xac4a('0x1e')](_0x37834b)[_0xac4a('0x24')](function(_0x2b16f0){_0x47f49c[_0xac4a('0x1e')]=_0x2b16f0;if(_0x42a33c[_0xac4a('0x31')][_0xac4a('0x41')]){_0x116700[_0xac4a('0x42')]=[{'all':!![]}];}return db['CmHopperFinal']['findAll'](_0x116700);})['then'](function(_0x1e1cc5){_0x47f49c[_0xac4a('0x43')]=_0x1e1cc5;return _0x47f49c;})[_0xac4a('0x24')](respondWithFilteredResult(_0x2772fe,_0x116700))[_0xac4a('0x44')](handleError(_0x2772fe,null));};exports[_0xac4a('0x45')]=function(_0x411543,_0x8febf0){var _0x3441f2={'raw':!![],'where':{'id':_0x411543[_0xac4a('0x46')]['id']}},_0x3e9973={};_0x3e9973['model']=_[_0xac4a('0x47')](db[_0xac4a('0x2c')][_0xac4a('0x48')]);_0x3e9973[_0xac4a('0x31')]=_[_0xac4a('0x47')](_0x411543['query']);_0x3e9973[_0xac4a('0x3a')]=_[_0xac4a('0x32')](_0x3e9973['model'],_0x3e9973[_0xac4a('0x31')]);_0x3441f2['attributes']=_[_0xac4a('0x32')](_0x3e9973[_0xac4a('0x30')],qs[_0xac4a('0x34')](_0x411543[_0xac4a('0x31')][_0xac4a('0x34')]));_0x3441f2[_0xac4a('0x33')]=_0x3441f2[_0xac4a('0x33')][_0xac4a('0x35')]?_0x3441f2[_0xac4a('0x33')]:_0x3e9973[_0xac4a('0x30')];if(_0x411543[_0xac4a('0x31')][_0xac4a('0x41')]){_0x3441f2['include']=[{'all':!![]}];}_0x3441f2=_[_0xac4a('0x3f')]({},_0x3441f2,_0x411543[_0xac4a('0x40')]);return db[_0xac4a('0x2c')]['find'](_0x3441f2)[_0xac4a('0x24')](handleEntityNotFound(_0x8febf0,null))[_0xac4a('0x24')](respondWithResult(_0x8febf0,null))['catch'](handleError(_0x8febf0,null));};exports[_0xac4a('0x49')]=function(_0x5a7f6e,_0x244950){return db[_0xac4a('0x2c')][_0xac4a('0x49')]()['then'](respondWithResult(_0x244950,null))['catch'](handleError(_0x244950,null));};exports[_0xac4a('0x23')]=function(_0x4aaeff,_0x18ae96){if(_0x4aaeff['body'][_0xac4a('0x4a')]){delete _0x4aaeff['body'][_0xac4a('0x4a')];}return db[_0xac4a('0x2c')][_0xac4a('0x4b')]({'where':{'uniqueid':_0x4aaeff[_0xac4a('0x46')]['id']}})['then'](handleEntityNotFound(_0x18ae96,null))[_0xac4a('0x24')](saveUpdates(_0x4aaeff[_0xac4a('0x4c')],null))[_0xac4a('0x24')](respondWithResult(_0x18ae96,null))[_0xac4a('0x44')](handleError(_0x18ae96,null));};exports[_0xac4a('0x4d')]=function(_0x138876,_0x187306,_0x4e6e19){return db[_0xac4a('0x2c')][_0xac4a('0x4e')]({'raw':![],'where':{'VoiceQueueId':_0x138876['params']['id']},'attributes':[[db[_0xac4a('0x4f')]['fn'](_0xac4a('0x50'),db[_0xac4a('0x4f')]['fn']('IF',db[_0xac4a('0x4f')]['literal'](_0xac4a('0x51')))),_0xac4a('0x52')],[db[_0xac4a('0x4f')]['fn'](_0xac4a('0x50'),db[_0xac4a('0x4f')]['fn']('IF',db['sequelize'][_0xac4a('0x53')]('`state`\x20=\x203,\x201,\x20null'))),_0xac4a('0x54')],[db[_0xac4a('0x4f')]['fn']('COUNT',db['sequelize']['fn']('IF',db[_0xac4a('0x4f')][_0xac4a('0x53')]('`state`\x20=\x205,\x201,\x20null'))),_0xac4a('0x55')],[db[_0xac4a('0x4f')]['fn'](_0xac4a('0x50'),db[_0xac4a('0x4f')]['fn']('IF',db['sequelize'][_0xac4a('0x53')](_0xac4a('0x56')))),_0xac4a('0x57')],[db[_0xac4a('0x4f')]['fn'](_0xac4a('0x50'),db[_0xac4a('0x4f')]['fn']('IF',db[_0xac4a('0x4f')]['literal'](_0xac4a('0x58')))),_0xac4a('0x59')],[db[_0xac4a('0x4f')]['fn'](_0xac4a('0x50'),db[_0xac4a('0x4f')]['fn']('IF',db[_0xac4a('0x4f')][_0xac4a('0x53')](_0xac4a('0x5a')))),_0xac4a('0x5b')],[db[_0xac4a('0x4f')]['fn'](_0xac4a('0x50'),db[_0xac4a('0x4f')]['fn']('IF',db[_0xac4a('0x4f')][_0xac4a('0x53')](_0xac4a('0x5c')))),_0xac4a('0x5d')],[db['sequelize']['fn'](_0xac4a('0x50'),db['sequelize']['fn']('IF',db[_0xac4a('0x4f')]['literal'](_0xac4a('0x5e')))),'answeringMachine']]})[_0xac4a('0x24')](handleEntityNotFound(_0x187306,null))['then'](respondWithResult(_0x187306,null))['catch'](handleError(_0x187306,null));};exports[_0xac4a('0x5f')]=function(_0x568ffb,_0x3bcae2,_0x3c2f84){return db[_0xac4a('0x2c')][_0xac4a('0x4e')]({'raw':![],'where':{'CampaignId':_0x568ffb['params']['id']},'attributes':[[db[_0xac4a('0x4f')]['fn']('COUNT',db[_0xac4a('0x4f')]['fn']('IF',db['sequelize'][_0xac4a('0x53')](_0xac4a('0x51')))),_0xac4a('0x52')],[db[_0xac4a('0x4f')]['fn'](_0xac4a('0x50'),db[_0xac4a('0x4f')]['fn']('IF',db[_0xac4a('0x4f')][_0xac4a('0x53')](_0xac4a('0x60')))),_0xac4a('0x54')],[db[_0xac4a('0x4f')]['fn'](_0xac4a('0x50'),db[_0xac4a('0x4f')]['fn']('IF',db[_0xac4a('0x4f')][_0xac4a('0x53')](_0xac4a('0x61')))),_0xac4a('0x55')],[db['sequelize']['fn'](_0xac4a('0x50'),db[_0xac4a('0x4f')]['fn']('IF',db['sequelize'][_0xac4a('0x53')](_0xac4a('0x56')))),_0xac4a('0x57')],[db[_0xac4a('0x4f')]['fn'](_0xac4a('0x50'),db['sequelize']['fn']('IF',db['sequelize'][_0xac4a('0x53')](_0xac4a('0x58')))),_0xac4a('0x59')],[db[_0xac4a('0x4f')]['fn'](_0xac4a('0x50'),db[_0xac4a('0x4f')]['fn']('IF',db[_0xac4a('0x4f')][_0xac4a('0x53')](_0xac4a('0x5a')))),_0xac4a('0x5b')],[db[_0xac4a('0x4f')]['fn']('COUNT',db['sequelize']['fn']('IF',db[_0xac4a('0x4f')][_0xac4a('0x53')](_0xac4a('0x5c')))),_0xac4a('0x5d')],[db[_0xac4a('0x4f')]['fn'](_0xac4a('0x50'),db[_0xac4a('0x4f')]['fn']('IF',db[_0xac4a('0x4f')][_0xac4a('0x53')](_0xac4a('0x5e')))),_0xac4a('0x62')]]})[_0xac4a('0x24')](handleEntityNotFound(_0x3bcae2,null))['then'](respondWithResult(_0x3bcae2,null))[_0xac4a('0x44')](handleError(_0x3bcae2,null));};exports[_0xac4a('0x63')]=function(_0x26bd31,_0x231932,_0x513976){return db[_0xac4a('0x64')]['find']({'where':{'id':_0x26bd31[_0xac4a('0x46')]['id']}})[_0xac4a('0x24')](handleEntityNotFound(_0x231932,null))['then'](function(_0x5bd95b){var _0x17eac2;if(_0x5bd95b){_0x17eac2=squel[_0xac4a('0x65')]()[_0xac4a('0x66')]('cm_hopper')[_0xac4a('0x67')](['phone',_0xac4a('0x68'),'ContactId','ListId',_0xac4a('0x69'),'createdAt',_0xac4a('0x6a')],squel['select']()[_0xac4a('0x6b')](_0xac4a('0x6c'),'phone')[_0xac4a('0x6b')]('NOW()',_0xac4a('0x68'))[_0xac4a('0x6b')]('ANY_VALUE(ContactId)',_0xac4a('0x6d'))['field']('ANY_VALUE(ListId)',_0xac4a('0x6e'))['field'](_0xac4a('0x6f'),'VoiceQueueId')['field'](_0xac4a('0x70'),_0xac4a('0x71'))[_0xac4a('0x6b')]('NOW()','updatedAt')[_0xac4a('0x72')](_0xac4a('0x73'))['where']('VoiceQueueId\x20=\x20?',_0x26bd31[_0xac4a('0x46')]['id'][_0xac4a('0x74')]())[_0xac4a('0x3d')](_0xac4a('0x75'),_0x26bd31[_0xac4a('0x4c')][_0xac4a('0x76')][_0xac4a('0x74')]())[_0xac4a('0x3d')](_0xac4a('0x77'))['where'](_0xac4a('0x78'),squel[_0xac4a('0x79')]()[_0xac4a('0x6b')]('phone')[_0xac4a('0x72')](_0xac4a('0x7a'))[_0xac4a('0x3d')](_0xac4a('0x7b'),_0x26bd31[_0xac4a('0x46')]['id']['toString']()))[_0xac4a('0x3d')](_0xac4a('0x78'),squel[_0xac4a('0x79')]()[_0xac4a('0x6b')](_0xac4a('0x7c'))[_0xac4a('0x72')](_0xac4a('0x73'))['where'](_0xac4a('0x7b'),_0x26bd31[_0xac4a('0x46')]['id'][_0xac4a('0x74')]())[_0xac4a('0x3d')](_0xac4a('0x7d')))[_0xac4a('0x7e')]('ContactId'))[_0xac4a('0x74')]();return db[_0xac4a('0x4f')][_0xac4a('0x31')](_0x17eac2);}return[];})[_0xac4a('0x24')](respondWithResult(_0x231932,null))['catch'](handleError(_0x231932,null));};exports[_0xac4a('0x7f')]=function(_0x56a934,_0x4447b5,_0x22b718){return db['Campaign']['find']({'where':{'id':_0x56a934[_0xac4a('0x46')]['id']}})[_0xac4a('0x24')](handleEntityNotFound(_0x4447b5,null))[_0xac4a('0x24')](function(_0x4bb03d){var _0x1f3f1c;if(_0x4bb03d){_0x1f3f1c=squel['insert']()[_0xac4a('0x66')](_0xac4a('0x7a'))[_0xac4a('0x67')]([_0xac4a('0x80'),_0xac4a('0x68'),'ContactId','ListId',_0xac4a('0x81'),_0xac4a('0x71'),_0xac4a('0x6a')],squel[_0xac4a('0x79')]()[_0xac4a('0x6b')](_0xac4a('0x6c'),_0xac4a('0x80'))[_0xac4a('0x6b')]('NOW()','scheduledAt')[_0xac4a('0x6b')](_0xac4a('0x82'),_0xac4a('0x6d'))[_0xac4a('0x6b')](_0xac4a('0x83'),_0xac4a('0x6e'))[_0xac4a('0x6b')](_0xac4a('0x84'),'CampaignId')['field'](_0xac4a('0x70'),_0xac4a('0x71'))[_0xac4a('0x6b')](_0xac4a('0x70'),_0xac4a('0x6a'))[_0xac4a('0x72')](_0xac4a('0x73'))['where'](_0xac4a('0x85'),_0x56a934[_0xac4a('0x46')]['id'][_0xac4a('0x74')]())['where'](_0xac4a('0x75'),_0x56a934[_0xac4a('0x4c')][_0xac4a('0x76')][_0xac4a('0x74')]())[_0xac4a('0x3d')](_0xac4a('0x77'))[_0xac4a('0x3d')](_0xac4a('0x78'),squel[_0xac4a('0x79')]()['field'](_0xac4a('0x80'))['from'](_0xac4a('0x7a'))[_0xac4a('0x3d')](_0xac4a('0x85'),_0x56a934[_0xac4a('0x46')]['id'][_0xac4a('0x74')]()))[_0xac4a('0x3d')](_0xac4a('0x78'),squel['select']()[_0xac4a('0x6b')](_0xac4a('0x7c'))[_0xac4a('0x72')](_0xac4a('0x73'))[_0xac4a('0x3d')]('CampaignId\x20=\x20?',_0x56a934[_0xac4a('0x46')]['id'][_0xac4a('0x74')]())['where']('state\x20=\x204'))[_0xac4a('0x7e')](_0xac4a('0x6d')))['toString']();return db[_0xac4a('0x4f')][_0xac4a('0x31')](_0x1f3f1c);}return[];})[_0xac4a('0x24')](respondWithResult(_0x4447b5,null))[_0xac4a('0x44')](handleError(_0x4447b5,null));};exports[_0xac4a('0x86')]=function(_0x34787c,_0x599775,_0xbdff4b){return db[_0xac4a('0x87')][_0xac4a('0x88')]({'where':{'VoiceQueueId':_0x34787c['body'][_0xac4a('0x69')],'CampaignId':_0x34787c[_0xac4a('0x4c')][_0xac4a('0x81')],'ContactId':_0x34787c[_0xac4a('0x4c')][_0xac4a('0x6d')]}})[_0xac4a('0x24')](handleEntityNotFound(_0x599775,null))['then'](function(_0xe84bf7){if(_0xe84bf7){return _0xe84bf7;}return null;})[_0xac4a('0x24')](respondWithResult(_0x599775,null))['catch'](handleError(_0x599775,null));}; \ No newline at end of file diff --git a/server/api/cmHopperFinal/cmHopperFinal.model.js b/server/api/cmHopperFinal/cmHopperFinal.model.js index 2c0d6ca..563a89a 100644 --- a/server/api/cmHopperFinal/cmHopperFinal.model.js +++ b/server/api/cmHopperFinal/cmHopperFinal.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x02e8=['../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./cmHopperFinal.attributes','exports','define','CmHopperFinal','cm_hopper_final','calleridnum','uniqueid','lodash','util'];(function(_0x5eba32,_0x514993){var _0x36c6c7=function(_0x1f06f5){while(--_0x1f06f5){_0x5eba32['push'](_0x5eba32['shift']());}};_0x36c6c7(++_0x514993);}(_0x02e8,0x16e));var _0x802e=function(_0x220614,_0x2fc588){_0x220614=_0x220614-0x0;var _0x4e718d=_0x02e8[_0x220614];return _0x4e718d;};'use strict';var _=require(_0x802e('0x0'));var util=require(_0x802e('0x1'));var logger=require(_0x802e('0x2'))(_0x802e('0x3'));var moment=require(_0x802e('0x4'));var BPromise=require(_0x802e('0x5'));var rp=require(_0x802e('0x6'));var fs=require('fs');var path=require(_0x802e('0x7'));var rimraf=require(_0x802e('0x8'));var config=require('../../config/environment');var attributes=require(_0x802e('0x9'));module[_0x802e('0xa')]=function(_0xc12847,_0x3cef0a){return _0xc12847[_0x802e('0xb')](_0x802e('0xc'),attributes,{'tableName':_0x802e('0xd'),'paranoid':![],'indexes':[{'name':_0x802e('0xe'),'fields':['calleridnum']},{'name':_0x802e('0xf'),'fields':[_0x802e('0xf')]}],'timestamps':!![]});}; \ No newline at end of file +var _0xd555=['./cmHopperFinal.attributes','exports','define','CmHopperFinal','calleridnum','uniqueid','lodash','moment','path','rimraf','../../config/environment'];(function(_0x51e8bf,_0x232a46){var _0x5dc283=function(_0x39dbd9){while(--_0x39dbd9){_0x51e8bf['push'](_0x51e8bf['shift']());}};_0x5dc283(++_0x232a46);}(_0xd555,0x1d4));var _0x5d55=function(_0x409ad2,_0x5129c1){_0x409ad2=_0x409ad2-0x0;var _0x595b5f=_0xd555[_0x409ad2];return _0x595b5f;};'use strict';var _=require(_0x5d55('0x0'));var util=require('util');var logger=require('../../config/logger')('api');var moment=require(_0x5d55('0x1'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x5d55('0x2'));var rimraf=require(_0x5d55('0x3'));var config=require(_0x5d55('0x4'));var attributes=require(_0x5d55('0x5'));module[_0x5d55('0x6')]=function(_0x2e4f98,_0x2aaf74){return _0x2e4f98[_0x5d55('0x7')](_0x5d55('0x8'),attributes,{'tableName':'cm_hopper_final','paranoid':![],'indexes':[{'name':_0x5d55('0x9'),'fields':[_0x5d55('0x9')]},{'name':_0x5d55('0xa'),'fields':['uniqueid']}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/cmHopperFinal/cmHopperFinal.rpc.js b/server/api/cmHopperFinal/cmHopperFinal.rpc.js index df28f8c..7799541 100644 --- a/server/api/cmHopperFinal/cmHopperFinal.rpc.js +++ b/server/api/cmHopperFinal/cmHopperFinal.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7a54=['../../config/environment','jayson/promise','http','info','CmHopperFinal,\x20%s,\x20%s','debug','stringify','error','code','message','request\x20sent','result','catch','CmHopperFinal','create','body','options','raw','CreateCmHopperFinal','lodash','util','moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc'];(function(_0x537f88,_0x3d5c26){var _0x1d67b3=function(_0x1c686d){while(--_0x1c686d){_0x537f88['push'](_0x537f88['shift']());}};_0x1d67b3(++_0x3d5c26);}(_0x7a54,0x106));var _0x47a5=function(_0x22666a,_0xc3a001){_0x22666a=_0x22666a-0x0;var _0xab9948=_0x7a54[_0x22666a];return _0xab9948;};'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')]('CmHopperFinal,\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);});});}exports['CreateCmHopperFinal']=function(_0x5247fd){var _0x423a81=this;return new Promise(function(_0xaf70a6,_0x2ce454){return db[_0x47a5('0x15')][_0x47a5('0x16')](_0x5247fd[_0x47a5('0x17')],{'raw':_0x5247fd[_0x47a5('0x18')]?_0x5247fd[_0x47a5('0x18')][_0x47a5('0x19')]===undefined?!![]:![]:!![]})['then'](function(_0x1570bc){logger[_0x47a5('0xb')]('CreateCmHopperFinal',_0x5247fd);logger[_0x47a5('0xd')](_0x47a5('0x1a'),_0x5247fd,JSON[_0x47a5('0xe')](_0x1570bc));_0xaf70a6(_0x1570bc);})['catch'](function(_0xb8ae6c){logger[_0x47a5('0xf')](_0x47a5('0x1a'),_0xb8ae6c[_0x47a5('0x11')],_0x5247fd);_0x2ce454(_0x423a81['error'](0x1f4,_0xb8ae6c[_0x47a5('0x11')]));});});}; \ No newline at end of file +var _0xb10b=['debug','lodash','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','CmHopperFinal,\x20%s,\x20%s','CmHopperFinal,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','CreateCmHopperFinal','CmHopperFinal','create','options','raw'];(function(_0x487b05,_0x26cf28){var _0x46494f=function(_0x2264f3){while(--_0x2264f3){_0x487b05['push'](_0x487b05['shift']());}};_0x46494f(++_0x26cf28);}(_0xb10b,0x12a));var _0xbb10=function(_0x251669,_0x4cfefe){_0x251669=_0x251669-0x0;var _0x476916=_0xb10b[_0x251669];return _0x476916;};'use strict';var _=require(_0xbb10('0x0'));var util=require('util');var moment=require(_0xbb10('0x1'));var BPromise=require(_0xbb10('0x2'));var rs=require(_0xbb10('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xbb10('0x4'))['db'];var utils=require(_0xbb10('0x5'));var logger=require(_0xbb10('0x6'))(_0xbb10('0x7'));var config=require(_0xbb10('0x8'));var jayson=require(_0xbb10('0x9'));var client=jayson['client'][_0xbb10('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3cdd53,_0x513741,_0x1b9e94){return new BPromise(function(_0x3fb675,_0x21370f){return client[_0xbb10('0xb')](_0x3cdd53,_0x1b9e94)[_0xbb10('0xc')](function(_0x1ce33e){logger[_0xbb10('0xd')](_0xbb10('0xe'),_0x513741,'request\x20sent');logger['debug'](_0xbb10('0xf'),_0x513741,_0xbb10('0x10'),JSON[_0xbb10('0x11')](_0x1ce33e));if(_0x1ce33e['error']){if(_0x1ce33e[_0xbb10('0x12')]['code']===0x1f4){logger[_0xbb10('0x12')](_0xbb10('0xe'),_0x513741,_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);return _0x21370f(_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);}logger['error'](_0xbb10('0xe'),_0x513741,_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);return _0x3fb675(_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);}else{logger[_0xbb10('0xd')](_0xbb10('0xe'),_0x513741,_0xbb10('0x10'));_0x3fb675(_0x1ce33e[_0xbb10('0x14')][_0xbb10('0x13')]);}})['catch'](function(_0x2eca0f){logger[_0xbb10('0x12')](_0xbb10('0xe'),_0x513741,_0x2eca0f);_0x21370f(_0x2eca0f);});});}exports[_0xbb10('0x15')]=function(_0x378da8){var _0x1682a4=this;return new Promise(function(_0x575cca,_0x30efc6){return db[_0xbb10('0x16')][_0xbb10('0x17')](_0x378da8['body'],{'raw':_0x378da8[_0xbb10('0x18')]?_0x378da8[_0xbb10('0x18')][_0xbb10('0x19')]===undefined?!![]:![]:!![]})[_0xbb10('0xc')](function(_0xdf237d){logger[_0xbb10('0xd')]('CreateCmHopperFinal',_0x378da8);logger[_0xbb10('0x1a')](_0xbb10('0x15'),_0x378da8,JSON['stringify'](_0xdf237d));_0x575cca(_0xdf237d);})['catch'](function(_0x8e2b97){logger[_0xbb10('0x12')](_0xbb10('0x15'),_0x8e2b97[_0xbb10('0x13')],_0x378da8);_0x30efc6(_0x1682a4[_0xbb10('0x12')](0x1f4,_0x8e2b97[_0xbb10('0x13')]));});});}; \ No newline at end of file diff --git a/server/api/cmHopperFinal/index.js b/server/api/cmHopperFinal/index.js index 7f8ed93..f9d99bc 100644 --- a/server/api/cmHopperFinal/index.js +++ b/server/api/cmHopperFinal/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf56c=['/voice/queue/moveContacts/:id','moveContactsQueueCampaignHopperFinal','/voice/campaign/moveContacts/:id','moveContactsIvrCampaignHopperFinal','/checkContactHopper','put','update','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./cmHopperFinal.controller','get','isAuthenticated','describe','/:id','/voice/queue/countAttributes/:id','countContactsQueueCampaignHopperFinal','/campaign/countAttributes/:id','post'];(function(_0x29db36,_0x410ae9){var _0x234e87=function(_0x48697b){while(--_0x48697b){_0x29db36['push'](_0x29db36['shift']());}};_0x234e87(++_0x410ae9);}(_0xf56c,0x67));var _0xcf56=function(_0x7709d5,_0x3a0bc4){_0x7709d5=_0x7709d5-0x0;var _0x36e23c=_0xf56c[_0x7709d5];return _0x36e23c;};'use strict';var multer=require('multer');var util=require(_0xcf56('0x0'));var path=require(_0xcf56('0x1'));var timeout=require(_0xcf56('0x2'));var express=require(_0xcf56('0x3'));var router=express['Router']();var fs_extra=require(_0xcf56('0x4'));var auth=require(_0xcf56('0x5'));var interaction=require(_0xcf56('0x6'));var config=require(_0xcf56('0x7'));var controller=require(_0xcf56('0x8'));router[_0xcf56('0x9')]('/',auth[_0xcf56('0xa')](),controller['index']);router[_0xcf56('0x9')]('/describe',auth[_0xcf56('0xa')](),controller[_0xcf56('0xb')]);router[_0xcf56('0x9')](_0xcf56('0xc'),auth[_0xcf56('0xa')](),controller['show']);router[_0xcf56('0x9')](_0xcf56('0xd'),auth[_0xcf56('0xa')](),controller[_0xcf56('0xe')]);router[_0xcf56('0x9')](_0xcf56('0xf'),auth[_0xcf56('0xa')](),controller['countContactsIvrCampaignHopperFinal']);router[_0xcf56('0x10')](_0xcf56('0x11'),auth['isAuthenticated'](),controller[_0xcf56('0x12')]);router[_0xcf56('0x10')](_0xcf56('0x13'),auth['isAuthenticated'](),controller[_0xcf56('0x14')]);router[_0xcf56('0x10')](_0xcf56('0x15'),auth[_0xcf56('0xa')](),controller['checkContactHopper']);router[_0xcf56('0x16')]('/:id',auth[_0xcf56('0xa')](),controller[_0xcf56('0x17')]);module['exports']=router; \ No newline at end of file +var _0x0de8=['isAuthenticated','describe','/:id','show','/voice/queue/countAttributes/:id','countContactsQueueCampaignHopperFinal','/campaign/countAttributes/:id','countContactsIvrCampaignHopperFinal','/voice/queue/moveContacts/:id','post','/voice/campaign/moveContacts/:id','moveContactsIvrCampaignHopperFinal','/checkContactHopper','checkContactHopper','update','multer','util','path','connect-timeout','../../components/auth/service','../../components/interaction/service','../../config/environment','get'];(function(_0x102094,_0x492e88){var _0x13a407=function(_0x336437){while(--_0x336437){_0x102094['push'](_0x102094['shift']());}};_0x13a407(++_0x492e88);}(_0x0de8,0x1db));var _0x80de=function(_0x52e64,_0x6ba4e8){_0x52e64=_0x52e64-0x0;var _0x282b80=_0x0de8[_0x52e64];return _0x282b80;};'use strict';var multer=require(_0x80de('0x0'));var util=require(_0x80de('0x1'));var path=require(_0x80de('0x2'));var timeout=require(_0x80de('0x3'));var express=require('express');var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0x80de('0x4'));var interaction=require(_0x80de('0x5'));var config=require(_0x80de('0x6'));var controller=require('./cmHopperFinal.controller');router[_0x80de('0x7')]('/',auth[_0x80de('0x8')](),controller['index']);router[_0x80de('0x7')]('/describe',auth[_0x80de('0x8')](),controller[_0x80de('0x9')]);router[_0x80de('0x7')](_0x80de('0xa'),auth[_0x80de('0x8')](),controller[_0x80de('0xb')]);router['get'](_0x80de('0xc'),auth[_0x80de('0x8')](),controller[_0x80de('0xd')]);router[_0x80de('0x7')](_0x80de('0xe'),auth[_0x80de('0x8')](),controller[_0x80de('0xf')]);router['post'](_0x80de('0x10'),auth[_0x80de('0x8')](),controller['moveContactsQueueCampaignHopperFinal']);router[_0x80de('0x11')](_0x80de('0x12'),auth['isAuthenticated'](),controller[_0x80de('0x13')]);router[_0x80de('0x11')](_0x80de('0x14'),auth[_0x80de('0x8')](),controller[_0x80de('0x15')]);router['put'](_0x80de('0xa'),auth[_0x80de('0x8')](),controller[_0x80de('0x16')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/cmHopperHistory/cmHopperHistory.attributes.js b/server/api/cmHopperHistory/cmHopperHistory.attributes.js index d3a715e..53a9c65 100644 --- a/server/api/cmHopperHistory/cmHopperHistory.attributes.js +++ b/server/api/cmHopperHistory/cmHopperHistory.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x68e0=['exports','INTEGER','DATE','STRING','BOOLEAN','sequelize'];(function(_0x55c485,_0x3fe77e){var _0x6bb521=function(_0x466a3d){while(--_0x466a3d){_0x55c485['push'](_0x55c485['shift']());}};_0x6bb521(++_0x3fe77e);}(_0x68e0,0x16d));var _0x068e=function(_0x283bdf,_0x3af1f5){_0x283bdf=_0x283bdf-0x0;var _0x38cbc0=_0x68e0[_0x283bdf];return _0x38cbc0;};'use strict';var Sequelize=require(_0x068e('0x0'));module[_0x068e('0x1')]={'state':{'type':Sequelize[_0x068e('0x2')](0x2)},'statedesc':{'type':Sequelize['STRING']},'scheduledat':{'type':Sequelize[_0x068e('0x3')]},'countbusyretry':{'type':Sequelize[_0x068e('0x2')],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize[_0x068e('0x2')],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize[_0x068e('0x2')],'defaultValue':0x0},'countglobal':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'uniqueid':{'type':Sequelize['STRING']},'originatecalleridnum':{'type':Sequelize[_0x068e('0x4')]},'originatecalleridname':{'type':Sequelize[_0x068e('0x4')]},'calleridnum':{'type':Sequelize[_0x068e('0x4')]},'calleridname':{'type':Sequelize[_0x068e('0x4')]},'starttime':{'type':Sequelize[_0x068e('0x3')]},'responsetime':{'type':Sequelize[_0x068e('0x3')]},'answertime':{'type':Sequelize[_0x068e('0x3')]},'droptime':{'type':Sequelize['DATE']},'endtime':{'type':Sequelize['DATE']},'ringtime':{'type':Sequelize[_0x068e('0x2')],'defaultValue':0x0},'holdtime':{'type':Sequelize[_0x068e('0x2')],'defaultValue':0x0},'talktime':{'type':Sequelize[_0x068e('0x2')],'defaultValue':0x0},'followuptime':{'type':Sequelize[_0x068e('0x2')],'defaultValue':0x0},'dropreason':{'type':Sequelize[_0x068e('0x4')]},'campaign':{'type':Sequelize[_0x068e('0x4')]},'campaigntype':{'type':Sequelize[_0x068e('0x4')]},'membername':{'type':Sequelize[_0x068e('0x4')]},'reason':{'type':Sequelize['STRING']},'amd':{'type':Sequelize[_0x068e('0x5')],'defaultValue':![]},'fax':{'type':Sequelize[_0x068e('0x5')],'defaultValue':![]},'callback':{'type':Sequelize[_0x068e('0x5')],'defaultValue':![]},'callbackuniqueid':{'type':Sequelize[_0x068e('0x4')],'defaultValue':null},'callbackat':{'type':Sequelize[_0x068e('0x3')]},'recallme':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'editedat':{'type':Sequelize['DATE']},'edited':{'type':Sequelize[_0x068e('0x5')],'defaultValue':![]},'countnosuchnumberretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countdropretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countabandonedretry':{'type':Sequelize[_0x068e('0x2')],'defaultValue':0x0},'countmachineretry':{'type':Sequelize[_0x068e('0x2')],'defaultValue':0x0},'countagentrejectretry':{'type':Sequelize[_0x068e('0x2')],'defaultValue':0x0}}; \ No newline at end of file +var _0x64b3=['exports','INTEGER','STRING','DATE','BOOLEAN'];(function(_0x568e7c,_0x5ea152){var _0x4682a7=function(_0x868695){while(--_0x868695){_0x568e7c['push'](_0x568e7c['shift']());}};_0x4682a7(++_0x5ea152);}(_0x64b3,0xf5));var _0x364b=function(_0x89d552,_0x4f3eef){_0x89d552=_0x89d552-0x0;var _0x2662d8=_0x64b3[_0x89d552];return _0x2662d8;};'use strict';var Sequelize=require('sequelize');module[_0x364b('0x0')]={'state':{'type':Sequelize[_0x364b('0x1')](0x2)},'statedesc':{'type':Sequelize['STRING']},'scheduledat':{'type':Sequelize['DATE']},'countbusyretry':{'type':Sequelize[_0x364b('0x1')],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize[_0x364b('0x1')],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize[_0x364b('0x1')],'defaultValue':0x0},'countglobal':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'uniqueid':{'type':Sequelize['STRING']},'originatecalleridnum':{'type':Sequelize[_0x364b('0x2')]},'originatecalleridname':{'type':Sequelize[_0x364b('0x2')]},'calleridnum':{'type':Sequelize['STRING']},'calleridname':{'type':Sequelize[_0x364b('0x2')]},'starttime':{'type':Sequelize[_0x364b('0x3')]},'responsetime':{'type':Sequelize[_0x364b('0x3')]},'answertime':{'type':Sequelize[_0x364b('0x3')]},'droptime':{'type':Sequelize[_0x364b('0x3')]},'endtime':{'type':Sequelize[_0x364b('0x3')]},'ringtime':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'holdtime':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'talktime':{'type':Sequelize[_0x364b('0x1')],'defaultValue':0x0},'followuptime':{'type':Sequelize[_0x364b('0x1')],'defaultValue':0x0},'dropreason':{'type':Sequelize['STRING']},'campaign':{'type':Sequelize['STRING']},'campaigntype':{'type':Sequelize[_0x364b('0x2')]},'membername':{'type':Sequelize[_0x364b('0x2')]},'reason':{'type':Sequelize[_0x364b('0x2')]},'amd':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'fax':{'type':Sequelize[_0x364b('0x4')],'defaultValue':![]},'callback':{'type':Sequelize[_0x364b('0x4')],'defaultValue':![]},'callbackuniqueid':{'type':Sequelize[_0x364b('0x2')],'defaultValue':null},'callbackat':{'type':Sequelize[_0x364b('0x3')]},'recallme':{'type':Sequelize[_0x364b('0x4')],'defaultValue':![]},'editedat':{'type':Sequelize['DATE']},'edited':{'type':Sequelize[_0x364b('0x4')],'defaultValue':![]},'countnosuchnumberretry':{'type':Sequelize[_0x364b('0x1')],'defaultValue':0x0},'countdropretry':{'type':Sequelize[_0x364b('0x1')],'defaultValue':0x0},'countabandonedretry':{'type':Sequelize[_0x364b('0x1')],'defaultValue':0x0},'countmachineretry':{'type':Sequelize[_0x364b('0x1')],'defaultValue':0x0},'countagentrejectretry':{'type':Sequelize[_0x364b('0x1')],'defaultValue':0x0}}; \ No newline at end of file diff --git a/server/api/cmHopperHistory/cmHopperHistory.controller.js b/server/api/cmHopperHistory/cmHopperHistory.controller.js index 457e7ba..c909fb5 100644 --- a/server/api/cmHopperHistory/cmHopperHistory.controller.js +++ b/server/api/cmHopperHistory/cmHopperHistory.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xdaf0=['desk.js','querystring','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','offset','undefined','limit','count','set','Content-Range','json','apply','reject','save','then','destroy','error','stack','name','send','index','map','CmHopperHistory','rawAttributes','fieldName','key','model','keys','intersection','attributes','fields','query','length','hasOwnProperty','nolimit','sort','where','filters','pick','filter','merge','type','VIRTUAL','options','include','catch','show','params','includeAll','find','create','describe','update','body','uniqueid','eml-format','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','lodash','squel','jsforce'];(function(_0xf3cd1e,_0xd7bb6f){var _0x2958b8=function(_0x341e08){while(--_0x341e08){_0xf3cd1e['push'](_0xf3cd1e['shift']());}};_0x2958b8(++_0xd7bb6f);}(_0xdaf0,0x179));var _0x0daf=function(_0x16edf4,_0x3aa469){_0x16edf4=_0x16edf4-0x0;var _0x317afa=_0xdaf0[_0x16edf4];return _0x317afa;};'use strict';var emlformat=require(_0x0daf('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x0daf('0x1'));var rp=require(_0x0daf('0x2'));var moment=require(_0x0daf('0x3'));var BPromise=require(_0x0daf('0x4'));var Mustache=require(_0x0daf('0x5'));var util=require(_0x0daf('0x6'));var path=require('path');var sox=require(_0x0daf('0x7'));var csv=require(_0x0daf('0x8'));var ejs=require(_0x0daf('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x0daf('0xa'));var squel=require(_0x0daf('0xb'));var crypto=require('crypto');var jsforce=require(_0x0daf('0xc'));var deskjs=require(_0x0daf('0xd'));var toCsv=require('to-csv');var querystring=require(_0x0daf('0xe'));var Papa=require(_0x0daf('0xf'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x0daf('0x10'));var as=require(_0x0daf('0x11'));var hardwareService=require(_0x0daf('0x12'));var logger=require(_0x0daf('0x13'))(_0x0daf('0x14'));var utils=require(_0x0daf('0x15'));var config=require(_0x0daf('0x16'));var licenseUtil=require('../../config/license/util');var db=require(_0x0daf('0x17'))['db'];function respondWithStatusCode(_0x5ebf97,_0x2cc567){_0x2cc567=_0x2cc567||0xcc;return function(_0x2ddf0c){if(_0x2ddf0c){return _0x5ebf97[_0x0daf('0x18')](_0x2cc567);}return _0x5ebf97[_0x0daf('0x19')](_0x2cc567)[_0x0daf('0x1a')]();};}function respondWithResult(_0x3f8dd3,_0xdc6e4d){_0xdc6e4d=_0xdc6e4d||0xc8;return function(_0x36df15){if(_0x36df15){return _0x3f8dd3[_0x0daf('0x19')](_0xdc6e4d)['json'](_0x36df15);}};}function respondWithFilteredResult(_0x5f3037,_0x496c55){return function(_0x219403){if(_0x219403){var _0x2006fe=typeof _0x496c55[_0x0daf('0x1b')]===_0x0daf('0x1c')&&typeof _0x496c55[_0x0daf('0x1d')]===_0x0daf('0x1c');var _0x23d39f=_0x219403[_0x0daf('0x1e')];var _0x4a4af5=_0x2006fe?0x0:_0x496c55['offset'];var _0x5a761=_0x2006fe?_0x219403[_0x0daf('0x1e')]:_0x496c55[_0x0daf('0x1b')]+_0x496c55['limit'];var _0x55e285;if(_0x5a761>=_0x23d39f){_0x5a761=_0x23d39f;_0x55e285=0xc8;}else{_0x55e285=0xce;}_0x5f3037[_0x0daf('0x19')](_0x55e285);return _0x5f3037[_0x0daf('0x1f')](_0x0daf('0x20'),_0x4a4af5+'-'+_0x5a761+'/'+_0x23d39f)[_0x0daf('0x21')](_0x219403);}return null;};}function patchUpdates(_0x365dd6){return function(_0x58509b){try{jsonpatch[_0x0daf('0x22')](_0x58509b,_0x365dd6,!![]);}catch(_0x51b28d){return BPromise[_0x0daf('0x23')](_0x51b28d);}return _0x58509b[_0x0daf('0x24')]();};}function saveUpdates(_0x24e359,_0x25b627){return function(_0x4f96ce){if(_0x4f96ce){return _0x4f96ce['update'](_0x24e359)[_0x0daf('0x25')](function(_0x370492){return _0x370492;});}return null;};}function removeEntity(_0x181a28,_0x24de21){return function(_0x506d44){if(_0x506d44){return _0x506d44[_0x0daf('0x26')]()[_0x0daf('0x25')](function(){_0x181a28[_0x0daf('0x19')](0xcc)[_0x0daf('0x1a')]();});}};}function handleEntityNotFound(_0x2db538,_0x4ec5aa){return function(_0x45b330){if(!_0x45b330){_0x2db538['sendStatus'](0x194);}return _0x45b330;};}function handleError(_0x4b4bfa,_0xfb0ae9){_0xfb0ae9=_0xfb0ae9||0x1f4;return function(_0x447155){logger[_0x0daf('0x27')](_0x447155[_0x0daf('0x28')]);if(_0x447155[_0x0daf('0x29')]){delete _0x447155['name'];}_0x4b4bfa[_0x0daf('0x19')](_0xfb0ae9)[_0x0daf('0x2a')](_0x447155);};}exports[_0x0daf('0x2b')]=function(_0x542a22,_0xa87a58){var _0x51a52f={},_0x54994f={},_0xa81343={'count':0x0,'rows':[]};var _0x3bb344=_[_0x0daf('0x2c')](db[_0x0daf('0x2d')][_0x0daf('0x2e')],function(_0x556acb){return{'name':_0x556acb[_0x0daf('0x2f')],'type':_0x556acb['type'][_0x0daf('0x30')]};});_0x54994f[_0x0daf('0x31')]=_[_0x0daf('0x2c')](_0x3bb344,_0x0daf('0x29'));_0x54994f['query']=_[_0x0daf('0x32')](_0x542a22['query']);_0x54994f['filters']=_[_0x0daf('0x33')](_0x54994f['model'],_0x54994f['query']);_0x51a52f[_0x0daf('0x34')]=_[_0x0daf('0x33')](_0x54994f['model'],qs[_0x0daf('0x35')](_0x542a22[_0x0daf('0x36')][_0x0daf('0x35')]));_0x51a52f['attributes']=_0x51a52f[_0x0daf('0x34')][_0x0daf('0x37')]?_0x51a52f['attributes']:_0x54994f['model'];if(!_0x542a22[_0x0daf('0x36')][_0x0daf('0x38')](_0x0daf('0x39'))){_0x51a52f[_0x0daf('0x1d')]=qs[_0x0daf('0x1d')](_0x542a22[_0x0daf('0x36')][_0x0daf('0x1d')]);_0x51a52f['offset']=qs['offset'](_0x542a22[_0x0daf('0x36')][_0x0daf('0x1b')]);}_0x51a52f['order']=qs[_0x0daf('0x3a')](_0x542a22[_0x0daf('0x36')][_0x0daf('0x3a')]);_0x51a52f[_0x0daf('0x3b')]=qs[_0x0daf('0x3c')](_[_0x0daf('0x3d')](_0x542a22['query'],_0x54994f[_0x0daf('0x3c')]),_0x3bb344);if(_0x542a22['query'][_0x0daf('0x3e')]){_0x51a52f[_0x0daf('0x3b')]=_[_0x0daf('0x3f')](_0x51a52f[_0x0daf('0x3b')],{'$or':_[_0x0daf('0x2c')](_0x3bb344,function(_0x59492b){if(_0x59492b[_0x0daf('0x40')]!==_0x0daf('0x41')){var _0x19cd63={};_0x19cd63[_0x59492b['name']]={'$like':'%'+_0x542a22[_0x0daf('0x36')][_0x0daf('0x3e')]+'%'};return _0x19cd63;}})});}_0x51a52f=_[_0x0daf('0x3f')]({},_0x51a52f,_0x542a22[_0x0daf('0x42')]);var _0x23ccba={'where':_0x51a52f['where']};return db[_0x0daf('0x2d')]['count'](_0x23ccba)[_0x0daf('0x25')](function(_0x1c1320){_0xa81343[_0x0daf('0x1e')]=_0x1c1320;if(_0x542a22[_0x0daf('0x36')]['includeAll']){_0x51a52f[_0x0daf('0x43')]=[{'all':!![]}];}return db['CmHopperHistory']['findAll'](_0x51a52f);})[_0x0daf('0x25')](function(_0x280453){_0xa81343['rows']=_0x280453;return _0xa81343;})[_0x0daf('0x25')](respondWithFilteredResult(_0xa87a58,_0x51a52f))[_0x0daf('0x44')](handleError(_0xa87a58,null));};exports[_0x0daf('0x45')]=function(_0x23fed3,_0x14d066){var _0x2dc410={'raw':!![],'where':{'id':_0x23fed3[_0x0daf('0x46')]['id']}},_0x2a2b2e={};_0x2a2b2e['model']=_[_0x0daf('0x32')](db[_0x0daf('0x2d')][_0x0daf('0x2e')]);_0x2a2b2e[_0x0daf('0x36')]=_[_0x0daf('0x32')](_0x23fed3['query']);_0x2a2b2e['filters']=_[_0x0daf('0x33')](_0x2a2b2e[_0x0daf('0x31')],_0x2a2b2e[_0x0daf('0x36')]);_0x2dc410[_0x0daf('0x34')]=_[_0x0daf('0x33')](_0x2a2b2e['model'],qs['fields'](_0x23fed3['query']['fields']));_0x2dc410[_0x0daf('0x34')]=_0x2dc410['attributes'][_0x0daf('0x37')]?_0x2dc410[_0x0daf('0x34')]:_0x2a2b2e[_0x0daf('0x31')];if(_0x23fed3[_0x0daf('0x36')][_0x0daf('0x47')]){_0x2dc410[_0x0daf('0x43')]=[{'all':!![]}];}_0x2dc410=_[_0x0daf('0x3f')]({},_0x2dc410,_0x23fed3[_0x0daf('0x42')]);return db['CmHopperHistory'][_0x0daf('0x48')](_0x2dc410)[_0x0daf('0x25')](handleEntityNotFound(_0x14d066,null))[_0x0daf('0x25')](respondWithResult(_0x14d066,null))[_0x0daf('0x44')](handleError(_0x14d066,null));};exports[_0x0daf('0x49')]=function(_0x3b987e,_0x4968c1){return db[_0x0daf('0x2d')][_0x0daf('0x49')](_0x3b987e['body'],{})['then'](respondWithResult(_0x4968c1,0xc9))[_0x0daf('0x44')](handleError(_0x4968c1,null));};exports['describe']=function(_0xffb192,_0x26293){return db[_0x0daf('0x2d')][_0x0daf('0x4a')]()[_0x0daf('0x25')](respondWithResult(_0x26293,null))[_0x0daf('0x44')](handleError(_0x26293,null));};exports[_0x0daf('0x4b')]=function(_0x8a590c,_0x4d4771){if(_0x8a590c[_0x0daf('0x4c')]['uniqueid']){delete _0x8a590c[_0x0daf('0x4c')][_0x0daf('0x4d')];}return db[_0x0daf('0x2d')]['find']({'where':{'uniqueid':_0x8a590c['params']['id']}})['then'](handleEntityNotFound(_0x4d4771,null))[_0x0daf('0x25')](saveUpdates(_0x8a590c[_0x0daf('0x4c')],null))['then'](respondWithResult(_0x4d4771,null))[_0x0daf('0x44')](handleError(_0x4d4771,null));}; \ No newline at end of file +var _0x6dd8=['pick','filter','merge','options','CmHopperHistory','include','findAll','rows','catch','show','params','keys','includeAll','find','create','body','describe','uniqueid','eml-format','rimraf','request-promise','moment','bluebird','mustache','util','path','lodash','squel','jsforce','to-csv','querystring','papaparse','ioredis','../../components/auth/service','api','../../config/environment','../../mysqldb','sendStatus','status','end','offset','limit','undefined','count','Content-Range','json','apply','update','then','destroy','error','stack','name','send','index','map','rawAttributes','fieldName','type','key','model','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where'];(function(_0x5df778,_0x3caa59){var _0x5ce726=function(_0x402096){while(--_0x402096){_0x5df778['push'](_0x5df778['shift']());}};_0x5ce726(++_0x3caa59);}(_0x6dd8,0x1c2));var _0x86dd=function(_0x19c058,_0x44c014){_0x19c058=_0x19c058-0x0;var _0x4df7e9=_0x6dd8[_0x19c058];return _0x4df7e9;};'use strict';var emlformat=require(_0x86dd('0x0'));var rimraf=require(_0x86dd('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x86dd('0x2'));var moment=require(_0x86dd('0x3'));var BPromise=require(_0x86dd('0x4'));var Mustache=require(_0x86dd('0x5'));var util=require(_0x86dd('0x6'));var path=require(_0x86dd('0x7'));var sox=require('sox');var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x86dd('0x8'));var squel=require(_0x86dd('0x9'));var crypto=require('crypto');var jsforce=require(_0x86dd('0xa'));var deskjs=require('desk.js');var toCsv=require(_0x86dd('0xb'));var querystring=require(_0x86dd('0xc'));var Papa=require(_0x86dd('0xd'));var Redis=require(_0x86dd('0xe'));var authService=require(_0x86dd('0xf'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x86dd('0x10'));var utils=require('../../config/utils');var config=require(_0x86dd('0x11'));var licenseUtil=require('../../config/license/util');var db=require(_0x86dd('0x12'))['db'];function respondWithStatusCode(_0x11fa08,_0x3d3644){_0x3d3644=_0x3d3644||0xcc;return function(_0x57fefc){if(_0x57fefc){return _0x11fa08[_0x86dd('0x13')](_0x3d3644);}return _0x11fa08[_0x86dd('0x14')](_0x3d3644)[_0x86dd('0x15')]();};}function respondWithResult(_0x24c6d6,_0x4afde3){_0x4afde3=_0x4afde3||0xc8;return function(_0x5abcfe){if(_0x5abcfe){return _0x24c6d6[_0x86dd('0x14')](_0x4afde3)['json'](_0x5abcfe);}};}function respondWithFilteredResult(_0x49c4b0,_0x2eb8ac){return function(_0x57ab2f){if(_0x57ab2f){var _0x5cfea5=typeof _0x2eb8ac[_0x86dd('0x16')]==='undefined'&&typeof _0x2eb8ac[_0x86dd('0x17')]===_0x86dd('0x18');var _0xf51722=_0x57ab2f[_0x86dd('0x19')];var _0x416110=_0x5cfea5?0x0:_0x2eb8ac['offset'];var _0x391f56=_0x5cfea5?_0x57ab2f['count']:_0x2eb8ac[_0x86dd('0x16')]+_0x2eb8ac[_0x86dd('0x17')];var _0xd8b5c6;if(_0x391f56>=_0xf51722){_0x391f56=_0xf51722;_0xd8b5c6=0xc8;}else{_0xd8b5c6=0xce;}_0x49c4b0[_0x86dd('0x14')](_0xd8b5c6);return _0x49c4b0['set'](_0x86dd('0x1a'),_0x416110+'-'+_0x391f56+'/'+_0xf51722)[_0x86dd('0x1b')](_0x57ab2f);}return null;};}function patchUpdates(_0x5d4b86){return function(_0x367d55){try{jsonpatch[_0x86dd('0x1c')](_0x367d55,_0x5d4b86,!![]);}catch(_0x22252a){return BPromise['reject'](_0x22252a);}return _0x367d55['save']();};}function saveUpdates(_0x40b2c2,_0x5bade9){return function(_0x1a24c4){if(_0x1a24c4){return _0x1a24c4[_0x86dd('0x1d')](_0x40b2c2)[_0x86dd('0x1e')](function(_0x36e9e7){return _0x36e9e7;});}return null;};}function removeEntity(_0x976815,_0x3fc19c){return function(_0x479c5f){if(_0x479c5f){return _0x479c5f[_0x86dd('0x1f')]()['then'](function(){_0x976815[_0x86dd('0x14')](0xcc)['end']();});}};}function handleEntityNotFound(_0x5abd9e,_0x56c81a){return function(_0x212833){if(!_0x212833){_0x5abd9e[_0x86dd('0x13')](0x194);}return _0x212833;};}function handleError(_0x2ee175,_0x8af269){_0x8af269=_0x8af269||0x1f4;return function(_0x25fd9b){logger[_0x86dd('0x20')](_0x25fd9b[_0x86dd('0x21')]);if(_0x25fd9b[_0x86dd('0x22')]){delete _0x25fd9b[_0x86dd('0x22')];}_0x2ee175[_0x86dd('0x14')](_0x8af269)[_0x86dd('0x23')](_0x25fd9b);};}exports[_0x86dd('0x24')]=function(_0x357f71,_0x8153bf){var _0x3dff81={},_0xfb2e79={},_0x166609={'count':0x0,'rows':[]};var _0x5edd0e=_[_0x86dd('0x25')](db['CmHopperHistory'][_0x86dd('0x26')],function(_0x232fb2){return{'name':_0x232fb2[_0x86dd('0x27')],'type':_0x232fb2[_0x86dd('0x28')][_0x86dd('0x29')]};});_0xfb2e79[_0x86dd('0x2a')]=_[_0x86dd('0x25')](_0x5edd0e,_0x86dd('0x22'));_0xfb2e79[_0x86dd('0x2b')]=_['keys'](_0x357f71[_0x86dd('0x2b')]);_0xfb2e79[_0x86dd('0x2c')]=_[_0x86dd('0x2d')](_0xfb2e79['model'],_0xfb2e79[_0x86dd('0x2b')]);_0x3dff81['attributes']=_['intersection'](_0xfb2e79[_0x86dd('0x2a')],qs[_0x86dd('0x2e')](_0x357f71['query'][_0x86dd('0x2e')]));_0x3dff81[_0x86dd('0x2f')]=_0x3dff81[_0x86dd('0x2f')][_0x86dd('0x30')]?_0x3dff81['attributes']:_0xfb2e79['model'];if(!_0x357f71['query'][_0x86dd('0x31')](_0x86dd('0x32'))){_0x3dff81['limit']=qs['limit'](_0x357f71[_0x86dd('0x2b')][_0x86dd('0x17')]);_0x3dff81[_0x86dd('0x16')]=qs[_0x86dd('0x16')](_0x357f71[_0x86dd('0x2b')]['offset']);}_0x3dff81[_0x86dd('0x33')]=qs[_0x86dd('0x34')](_0x357f71[_0x86dd('0x2b')]['sort']);_0x3dff81[_0x86dd('0x35')]=qs[_0x86dd('0x2c')](_[_0x86dd('0x36')](_0x357f71[_0x86dd('0x2b')],_0xfb2e79['filters']),_0x5edd0e);if(_0x357f71['query'][_0x86dd('0x37')]){_0x3dff81['where']=_[_0x86dd('0x38')](_0x3dff81['where'],{'$or':_[_0x86dd('0x25')](_0x5edd0e,function(_0x326593){if(_0x326593[_0x86dd('0x28')]!=='VIRTUAL'){var _0x224b44={};_0x224b44[_0x326593[_0x86dd('0x22')]]={'$like':'%'+_0x357f71['query'][_0x86dd('0x37')]+'%'};return _0x224b44;}})});}_0x3dff81=_[_0x86dd('0x38')]({},_0x3dff81,_0x357f71[_0x86dd('0x39')]);var _0x50d089={'where':_0x3dff81[_0x86dd('0x35')]};return db[_0x86dd('0x3a')][_0x86dd('0x19')](_0x50d089)[_0x86dd('0x1e')](function(_0x2c2a66){_0x166609[_0x86dd('0x19')]=_0x2c2a66;if(_0x357f71['query']['includeAll']){_0x3dff81[_0x86dd('0x3b')]=[{'all':!![]}];}return db[_0x86dd('0x3a')][_0x86dd('0x3c')](_0x3dff81);})[_0x86dd('0x1e')](function(_0x202873){_0x166609[_0x86dd('0x3d')]=_0x202873;return _0x166609;})[_0x86dd('0x1e')](respondWithFilteredResult(_0x8153bf,_0x3dff81))[_0x86dd('0x3e')](handleError(_0x8153bf,null));};exports[_0x86dd('0x3f')]=function(_0x5cf24f,_0x17c4e5){var _0x2a3215={'raw':!![],'where':{'id':_0x5cf24f[_0x86dd('0x40')]['id']}},_0x1b35a4={};_0x1b35a4[_0x86dd('0x2a')]=_[_0x86dd('0x41')](db[_0x86dd('0x3a')]['rawAttributes']);_0x1b35a4[_0x86dd('0x2b')]=_['keys'](_0x5cf24f[_0x86dd('0x2b')]);_0x1b35a4[_0x86dd('0x2c')]=_[_0x86dd('0x2d')](_0x1b35a4[_0x86dd('0x2a')],_0x1b35a4[_0x86dd('0x2b')]);_0x2a3215[_0x86dd('0x2f')]=_[_0x86dd('0x2d')](_0x1b35a4[_0x86dd('0x2a')],qs[_0x86dd('0x2e')](_0x5cf24f[_0x86dd('0x2b')][_0x86dd('0x2e')]));_0x2a3215[_0x86dd('0x2f')]=_0x2a3215['attributes'][_0x86dd('0x30')]?_0x2a3215[_0x86dd('0x2f')]:_0x1b35a4[_0x86dd('0x2a')];if(_0x5cf24f[_0x86dd('0x2b')][_0x86dd('0x42')]){_0x2a3215[_0x86dd('0x3b')]=[{'all':!![]}];}_0x2a3215=_[_0x86dd('0x38')]({},_0x2a3215,_0x5cf24f[_0x86dd('0x39')]);return db[_0x86dd('0x3a')][_0x86dd('0x43')](_0x2a3215)[_0x86dd('0x1e')](handleEntityNotFound(_0x17c4e5,null))[_0x86dd('0x1e')](respondWithResult(_0x17c4e5,null))[_0x86dd('0x3e')](handleError(_0x17c4e5,null));};exports[_0x86dd('0x44')]=function(_0x24938c,_0x47dac8){return db[_0x86dd('0x3a')][_0x86dd('0x44')](_0x24938c[_0x86dd('0x45')],{})[_0x86dd('0x1e')](respondWithResult(_0x47dac8,0xc9))['catch'](handleError(_0x47dac8,null));};exports[_0x86dd('0x46')]=function(_0x41a444,_0x4d018d){return db[_0x86dd('0x3a')][_0x86dd('0x46')]()[_0x86dd('0x1e')](respondWithResult(_0x4d018d,null))[_0x86dd('0x3e')](handleError(_0x4d018d,null));};exports[_0x86dd('0x1d')]=function(_0x271a24,_0x3eca85){if(_0x271a24[_0x86dd('0x45')]['uniqueid']){delete _0x271a24[_0x86dd('0x45')][_0x86dd('0x47')];}return db[_0x86dd('0x3a')]['find']({'where':{'uniqueid':_0x271a24[_0x86dd('0x40')]['id']}})[_0x86dd('0x1e')](handleEntityNotFound(_0x3eca85,null))['then'](saveUpdates(_0x271a24[_0x86dd('0x45')],null))[_0x86dd('0x1e')](respondWithResult(_0x3eca85,null))[_0x86dd('0x3e')](handleError(_0x3eca85,null));}; \ No newline at end of file diff --git a/server/api/cmHopperHistory/cmHopperHistory.model.js b/server/api/cmHopperHistory/cmHopperHistory.model.js index cf8860d..d27282b 100644 --- a/server/api/cmHopperHistory/cmHopperHistory.model.js +++ b/server/api/cmHopperHistory/cmHopperHistory.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x543b=['./cmHopperHistory.attributes','exports','define','CmHopperHistory','cm_hopper_history','endtime','uniqueid','lodash','util','../../config/logger','moment','bluebird','request-promise','rimraf','../../config/environment'];(function(_0x536079,_0x316201){var _0x2ff8eb=function(_0x2620ce){while(--_0x2620ce){_0x536079['push'](_0x536079['shift']());}};_0x2ff8eb(++_0x316201);}(_0x543b,0x18d));var _0xb543=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x543b[_0x14add3];return _0x4a174f;};'use strict';var _=require(_0xb543('0x0'));var util=require(_0xb543('0x1'));var logger=require(_0xb543('0x2'))('api');var moment=require(_0xb543('0x3'));var BPromise=require(_0xb543('0x4'));var rp=require(_0xb543('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0xb543('0x6'));var config=require(_0xb543('0x7'));var attributes=require(_0xb543('0x8'));module[_0xb543('0x9')]=function(_0x29c539,_0x35ebbf){return _0x29c539[_0xb543('0xa')](_0xb543('0xb'),attributes,{'tableName':_0xb543('0xc'),'paranoid':![],'indexes':[{'name':_0xb543('0xd'),'fields':[_0xb543('0xd')]},{'name':_0xb543('0xe'),'fields':['uniqueid']}],'timestamps':!![]});}; \ No newline at end of file +var _0xfef9=['rimraf','./cmHopperHistory.attributes','exports','define','cm_hopper_history','endtime','uniqueid','lodash','util','api','moment','request-promise'];(function(_0x49c68e,_0x1c1673){var _0x33032b=function(_0x42ac31){while(--_0x42ac31){_0x49c68e['push'](_0x49c68e['shift']());}};_0x33032b(++_0x1c1673);}(_0xfef9,0xd3));var _0x9fef=function(_0x225915,_0x2eaa2f){_0x225915=_0x225915-0x0;var _0x3b8d10=_0xfef9[_0x225915];return _0x3b8d10;};'use strict';var _=require(_0x9fef('0x0'));var util=require(_0x9fef('0x1'));var logger=require('../../config/logger')(_0x9fef('0x2'));var moment=require(_0x9fef('0x3'));var BPromise=require('bluebird');var rp=require(_0x9fef('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x9fef('0x5'));var config=require('../../config/environment');var attributes=require(_0x9fef('0x6'));module[_0x9fef('0x7')]=function(_0x4d86cb,_0x366ea9){return _0x4d86cb[_0x9fef('0x8')]('CmHopperHistory',attributes,{'tableName':_0x9fef('0x9'),'paranoid':![],'indexes':[{'name':_0x9fef('0xa'),'fields':[_0x9fef('0xa')]},{'name':'uniqueid','fields':[_0x9fef('0xb')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/cmHopperHistory/cmHopperHistory.rpc.js b/server/api/cmHopperHistory/cmHopperHistory.rpc.js index fcd5495..d6ad14a 100644 --- a/server/api/cmHopperHistory/cmHopperHistory.rpc.js +++ b/server/api/cmHopperHistory/cmHopperHistory.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfb09=['outboundRejectCallsDay','`state`\x20=\x2016,\x201,\x20null','outboundReCallsDay','GetVoiceQueueHopperHistory','ivrTotalCallsDays','ivrAnswerCallsDay','GetCampaignHopperHistory','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','CmHopperHistory,\x20%s,\x20%s','request\x20sent','debug','CmHopperHistory,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','CmHopperHistory','create','options','raw','CreateCmHopperHistory','stringify','AvgHandleTime','findAll','where','sequelize','COUNT','col','predictiveIntervalTotalCalls','`state`\x20=\x204,\x201,\x20null','predictiveIntervalAnsweredCalls','`state`\x20=\x2010,\x201,\x20null','predictiveIntervalDroppedCallsTimeout','literal','`state`\x20=\x2011,\x201,\x20null','predictiveIntervalDroppedCallsCallersExit','AVG','`state`\x20=\x204,\x20`holdtime`,\x20null','`state`\x20=\x204,\x20`talktime`,\x20null','campaign','name','`state`\x20=\x200,\x201,\x20null','outboundNoSuchCallsDay','outboundNoAnswerCallsDay','outboundAnswerCallsDay','`state`\x20=\x205,\x201,\x20null','outboundBusyCallsDay','outboundCongestionCallsDay','`state`\x20=\x2010\x20,\x201,\x20null','outboundDropCallsDayTimeout','`state`\x20=\x2011\x20,\x201,\x20null','outboundDropCallsDayCallersExit','`state`\x20=\x2012,\x201,\x20null','outboundUnknownCallsDay','`state`\x20=\x2013,\x201,\x20null','`state`\x20=\x2014,\x201,\x20null','outboundOriginateFailureCallsDay','`state`\x20=\x2018,\x201,\x20null'];(function(_0x427ad3,_0x157f0b){var _0x2c2acc=function(_0x27908f){while(--_0x27908f){_0x427ad3['push'](_0x427ad3['shift']());}};_0x2c2acc(++_0x157f0b);}(_0xfb09,0x97));var _0x9fb0=function(_0x4b7d13,_0x1ac074){_0x4b7d13=_0x4b7d13-0x0;var _0x4d8154=_0xfb09[_0x4b7d13];return _0x4d8154;};'use strict';var _=require(_0x9fb0('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x9fb0('0x1'));var rs=require(_0x9fb0('0x2'));var fs=require('fs');var Redis=require(_0x9fb0('0x3'));var db=require(_0x9fb0('0x4'))['db'];var utils=require(_0x9fb0('0x5'));var logger=require(_0x9fb0('0x6'))(_0x9fb0('0x7'));var config=require(_0x9fb0('0x8'));var jayson=require(_0x9fb0('0x9'));var client=jayson[_0x9fb0('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x53b96f,_0x8561e1,_0x5099c5){return new BPromise(function(_0x548f1f,_0x4b7c0e){return client[_0x9fb0('0xb')](_0x53b96f,_0x5099c5)[_0x9fb0('0xc')](function(_0x561503){logger[_0x9fb0('0xd')](_0x9fb0('0xe'),_0x8561e1,_0x9fb0('0xf'));logger[_0x9fb0('0x10')](_0x9fb0('0x11'),_0x8561e1,_0x9fb0('0xf'),JSON['stringify'](_0x561503));if(_0x561503[_0x9fb0('0x12')]){if(_0x561503[_0x9fb0('0x12')][_0x9fb0('0x13')]===0x1f4){logger[_0x9fb0('0x12')](_0x9fb0('0xe'),_0x8561e1,_0x561503[_0x9fb0('0x12')][_0x9fb0('0x14')]);return _0x4b7c0e(_0x561503[_0x9fb0('0x12')][_0x9fb0('0x14')]);}logger[_0x9fb0('0x12')](_0x9fb0('0xe'),_0x8561e1,_0x561503[_0x9fb0('0x12')][_0x9fb0('0x14')]);return _0x548f1f(_0x561503['error'][_0x9fb0('0x14')]);}else{logger[_0x9fb0('0xd')](_0x9fb0('0xe'),_0x8561e1,_0x9fb0('0xf'));_0x548f1f(_0x561503[_0x9fb0('0x15')][_0x9fb0('0x14')]);}})[_0x9fb0('0x16')](function(_0x19ae73){logger[_0x9fb0('0x12')](_0x9fb0('0xe'),_0x8561e1,_0x19ae73);_0x4b7c0e(_0x19ae73);});});}exports['CreateCmHopperHistory']=function(_0x5ab60c){var _0x221b66=this;return new Promise(function(_0x2c8990,_0x3253ba){return db[_0x9fb0('0x17')][_0x9fb0('0x18')](_0x5ab60c['body'],{'raw':_0x5ab60c[_0x9fb0('0x19')]?_0x5ab60c[_0x9fb0('0x19')][_0x9fb0('0x1a')]===undefined?!![]:![]:!![]})[_0x9fb0('0xc')](function(_0x312e1a){logger[_0x9fb0('0xd')](_0x9fb0('0x1b'),_0x5ab60c);logger[_0x9fb0('0x10')](_0x9fb0('0x1b'),_0x5ab60c,JSON[_0x9fb0('0x1c')](_0x312e1a));_0x2c8990(_0x312e1a);})[_0x9fb0('0x16')](function(_0x19502b){logger[_0x9fb0('0x12')](_0x9fb0('0x1b'),_0x19502b['message'],_0x5ab60c);_0x3253ba(_0x221b66['error'](0x1f4,_0x19502b[_0x9fb0('0x14')]));});});};exports[_0x9fb0('0x1d')]=function(_0x57f840){var _0x1cb76a=this;return new Promise(function(_0x5e0028,_0x3c61c4){return db['CmHopperHistory'][_0x9fb0('0x1e')]({'raw':_0x57f840[_0x9fb0('0x19')]?_0x57f840[_0x9fb0('0x19')][_0x9fb0('0x1a')]===undefined?!![]:![]:!![],'where':_0x57f840[_0x9fb0('0x19')]?_0x57f840[_0x9fb0('0x19')][_0x9fb0('0x1f')]||null:null,'attributes':[[db[_0x9fb0('0x20')]['fn'](_0x9fb0('0x21'),db[_0x9fb0('0x20')][_0x9fb0('0x22')]('id')),_0x9fb0('0x23')],[db[_0x9fb0('0x20')]['fn'](_0x9fb0('0x21'),db[_0x9fb0('0x20')]['fn']('IF',db['sequelize']['literal'](_0x9fb0('0x24')))),_0x9fb0('0x25')],[db[_0x9fb0('0x20')]['fn'](_0x9fb0('0x21'),db[_0x9fb0('0x20')]['fn']('IF',db[_0x9fb0('0x20')]['literal'](_0x9fb0('0x26')))),_0x9fb0('0x27')],[db[_0x9fb0('0x20')]['fn'](_0x9fb0('0x21'),db[_0x9fb0('0x20')]['fn']('IF',db[_0x9fb0('0x20')][_0x9fb0('0x28')](_0x9fb0('0x29')))),_0x9fb0('0x2a')],[db[_0x9fb0('0x20')]['fn'](_0x9fb0('0x2b'),db[_0x9fb0('0x20')]['fn']('IF',db[_0x9fb0('0x20')][_0x9fb0('0x28')](_0x9fb0('0x2c')))),'predictiveIntervalAvgHoldtime'],[db['sequelize']['fn'](_0x9fb0('0x2b'),db[_0x9fb0('0x20')]['fn']('IF',db[_0x9fb0('0x20')][_0x9fb0('0x28')](_0x9fb0('0x2d')))),'predictiveIntervalAvgTalktime']]})[_0x9fb0('0xc')](function(_0xe0602e){logger[_0x9fb0('0xd')]('AvgHandleTime',_0x57f840);logger[_0x9fb0('0x10')](_0x9fb0('0x1d'),_0x57f840,JSON[_0x9fb0('0x1c')](_0xe0602e));_0x5e0028(_0xe0602e);})[_0x9fb0('0x16')](function(_0x31be41){logger[_0x9fb0('0x12')](_0x9fb0('0x1d'),_0x31be41[_0x9fb0('0x14')],_0x57f840);_0x3c61c4(_0x1cb76a[_0x9fb0('0x12')](0x1f4,_0x31be41[_0x9fb0('0x14')]));});});};exports['GetVoiceQueueHopperHistory']=function(_0x46cd7b){var _0x46752b=this;return new Promise(function(_0x574ee9,_0x1d61da){return db['CmHopperHistory']['findAll']({'raw':_0x46cd7b[_0x9fb0('0x19')]?_0x46cd7b[_0x9fb0('0x19')][_0x9fb0('0x1a')]===undefined?!![]:![]:!![],'where':_0x46cd7b[_0x9fb0('0x19')]?_0x46cd7b[_0x9fb0('0x19')]['where']||null:null,'attributes':[[_0x9fb0('0x2e'),_0x9fb0('0x2f')],[db[_0x9fb0('0x20')]['fn'](_0x9fb0('0x21'),db[_0x9fb0('0x20')]['fn']('IF',db[_0x9fb0('0x20')][_0x9fb0('0x28')](_0x9fb0('0x30')))),_0x9fb0('0x31')],[db[_0x9fb0('0x20')]['fn'](_0x9fb0('0x21'),db[_0x9fb0('0x20')]['fn']('IF',db['sequelize'][_0x9fb0('0x28')]('`state`\x20=\x203,\x201,\x20null'))),_0x9fb0('0x32')],[db[_0x9fb0('0x20')]['fn'](_0x9fb0('0x21'),db[_0x9fb0('0x20')]['fn']('IF',db[_0x9fb0('0x20')][_0x9fb0('0x28')](_0x9fb0('0x24')))),_0x9fb0('0x33')],[db[_0x9fb0('0x20')]['fn']('COUNT',db[_0x9fb0('0x20')]['fn']('IF',db[_0x9fb0('0x20')][_0x9fb0('0x28')](_0x9fb0('0x34')))),_0x9fb0('0x35')],[db[_0x9fb0('0x20')]['fn'](_0x9fb0('0x21'),db[_0x9fb0('0x20')]['fn']('IF',db[_0x9fb0('0x20')][_0x9fb0('0x28')]('`state`\x20=\x208,\x201,\x20null'))),_0x9fb0('0x36')],[db[_0x9fb0('0x20')]['fn']('COUNT',db[_0x9fb0('0x20')]['fn']('IF',db[_0x9fb0('0x20')][_0x9fb0('0x28')](_0x9fb0('0x37')))),_0x9fb0('0x38')],[db[_0x9fb0('0x20')]['fn'](_0x9fb0('0x21'),db[_0x9fb0('0x20')]['fn']('IF',db[_0x9fb0('0x20')]['literal'](_0x9fb0('0x39')))),_0x9fb0('0x3a')],[db[_0x9fb0('0x20')]['fn']('COUNT',db[_0x9fb0('0x20')]['fn']('IF',db[_0x9fb0('0x20')][_0x9fb0('0x28')](_0x9fb0('0x3b')))),_0x9fb0('0x3c')],[db[_0x9fb0('0x20')]['fn'](_0x9fb0('0x21'),db[_0x9fb0('0x20')]['fn']('IF',db[_0x9fb0('0x20')]['literal'](_0x9fb0('0x3d')))),'outboundBlacklistCallsDay'],[db[_0x9fb0('0x20')]['fn']('COUNT',db[_0x9fb0('0x20')]['fn']('IF',db[_0x9fb0('0x20')]['literal'](_0x9fb0('0x3e')))),_0x9fb0('0x3f')],[db[_0x9fb0('0x20')]['fn'](_0x9fb0('0x21'),db[_0x9fb0('0x20')]['fn']('IF',db[_0x9fb0('0x20')]['literal'](_0x9fb0('0x40')))),_0x9fb0('0x41')],[db[_0x9fb0('0x20')]['fn'](_0x9fb0('0x21'),db['sequelize']['fn']('IF',db[_0x9fb0('0x20')][_0x9fb0('0x28')](_0x9fb0('0x42')))),'outboundAnswerAgiCallsDay'],[db[_0x9fb0('0x20')]['fn'](_0x9fb0('0x21'),db[_0x9fb0('0x20')]['fn']('IF',db[_0x9fb0('0x20')][_0x9fb0('0x28')]('`state`\x20=\x2020,\x201,\x20null'))),'outboundRejectCallsDay'],[db[_0x9fb0('0x20')]['fn']('COUNT',db[_0x9fb0('0x20')]['fn']('IF',db[_0x9fb0('0x20')][_0x9fb0('0x28')]('`state`\x20=\x2022\x20or\x20`state`\x20=\x2023,\x201,\x20null'))),_0x9fb0('0x43')]],'group':['campaign']})[_0x9fb0('0xc')](function(_0x1e1cef){logger['info']('GetVoiceQueueHopperHistory',_0x46cd7b);logger[_0x9fb0('0x10')](_0x9fb0('0x44'),_0x46cd7b,JSON['stringify'](_0x1e1cef));_0x574ee9(_0x1e1cef);})[_0x9fb0('0x16')](function(_0x28bbf5){logger[_0x9fb0('0x12')](_0x9fb0('0x44'),_0x28bbf5[_0x9fb0('0x14')],_0x46cd7b);_0x1d61da(_0x46752b[_0x9fb0('0x12')](0x1f4,_0x28bbf5[_0x9fb0('0x14')]));});});};exports['GetCampaignHopperHistory']=function(_0x196108){var _0x11f107=this;return new Promise(function(_0x441be3,_0x1369af){return db[_0x9fb0('0x17')]['findAll']({'raw':_0x196108[_0x9fb0('0x19')]?_0x196108[_0x9fb0('0x19')]['raw']===undefined?!![]:![]:!![],'where':_0x196108[_0x9fb0('0x19')]?_0x196108['options'][_0x9fb0('0x1f')]||null:null,'attributes':[[_0x9fb0('0x2e'),_0x9fb0('0x2f')],[db[_0x9fb0('0x20')]['fn'](_0x9fb0('0x21'),db['sequelize'][_0x9fb0('0x22')]('id')),_0x9fb0('0x45')],[db[_0x9fb0('0x20')]['fn'](_0x9fb0('0x21'),db[_0x9fb0('0x20')]['fn']('IF',db['sequelize'][_0x9fb0('0x28')]('`state`\x20=\x204,\x201,\x20null'))),_0x9fb0('0x46')]],'group':['campaign']})['then'](function(_0x2990bb){logger[_0x9fb0('0xd')](_0x9fb0('0x47'),_0x196108);logger['debug'](_0x9fb0('0x47'),_0x196108,JSON[_0x9fb0('0x1c')](_0x2990bb));_0x441be3(_0x2990bb);})[_0x9fb0('0x16')](function(_0x4d737e){logger[_0x9fb0('0x12')](_0x9fb0('0x47'),_0x4d737e[_0x9fb0('0x14')],_0x196108);_0x1369af(_0x11f107[_0x9fb0('0x12')](0x1f4,_0x4d737e[_0x9fb0('0x14')]));});});}; \ No newline at end of file +var _0xb332=['raw','campaign','name','`state`\x20=\x200,\x201,\x20null','outboundNoSuchCallsDay','`state`\x20=\x203,\x201,\x20null','outboundAnswerCallsDay','`state`\x20=\x205,\x201,\x20null','outboundBusyCallsDay','outboundCongestionCallsDay','`state`\x20=\x2010\x20,\x201,\x20null','`state`\x20=\x2011\x20,\x201,\x20null','outboundDropCallsDayCallersExit','outboundUnknownCallsDay','outboundRejectCallsDay','outboundAnswerAgiCallsDay','`state`\x20=\x2020,\x201,\x20null','`state`\x20=\x2022\x20or\x20`state`\x20=\x2023,\x201,\x20null','outboundReCallsDay','col','ivrAnswerCallsDay','GetCampaignHopperHistory','lodash','moment','bluebird','ioredis','../../config/utils','rpc','jayson/promise','client','http','request','then','info','request\x20sent','debug','CmHopperHistory,\x20%s,\x20%s,\x20%s','stringify','error','code','CmHopperHistory,\x20%s,\x20%s','message','result','catch','CmHopperHistory','create','body','options','CreateCmHopperHistory','AvgHandleTime','findAll','where','sequelize','predictiveIntervalTotalCalls','COUNT','literal','`state`\x20=\x204,\x201,\x20null','predictiveIntervalAnsweredCalls','predictiveIntervalDroppedCallsTimeout','predictiveIntervalDroppedCallsCallersExit','AVG','predictiveIntervalAvgHoldtime','`state`\x20=\x204,\x20`talktime`,\x20null','predictiveIntervalAvgTalktime','GetVoiceQueueHopperHistory'];(function(_0x1ee637,_0x3541e0){var _0x3d4422=function(_0x31a05c){while(--_0x31a05c){_0x1ee637['push'](_0x1ee637['shift']());}};_0x3d4422(++_0x3541e0);}(_0xb332,0xd9));var _0x2b33=function(_0x514c15,_0x486901){_0x514c15=_0x514c15-0x0;var _0x16283e=_0xb332[_0x514c15];return _0x16283e;};'use strict';var _=require(_0x2b33('0x0'));var util=require('util');var moment=require(_0x2b33('0x1'));var BPromise=require(_0x2b33('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x2b33('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x2b33('0x4'));var logger=require('../../config/logger')(_0x2b33('0x5'));var config=require('../../config/environment');var jayson=require(_0x2b33('0x6'));var client=jayson[_0x2b33('0x7')][_0x2b33('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x461d44,_0x5a7a3f,_0x5ccf2d){return new BPromise(function(_0x4302b7,_0x5f29ab){return client[_0x2b33('0x9')](_0x461d44,_0x5ccf2d)[_0x2b33('0xa')](function(_0x2f2cb3){logger[_0x2b33('0xb')]('CmHopperHistory,\x20%s,\x20%s',_0x5a7a3f,_0x2b33('0xc'));logger[_0x2b33('0xd')](_0x2b33('0xe'),_0x5a7a3f,_0x2b33('0xc'),JSON[_0x2b33('0xf')](_0x2f2cb3));if(_0x2f2cb3[_0x2b33('0x10')]){if(_0x2f2cb3[_0x2b33('0x10')][_0x2b33('0x11')]===0x1f4){logger[_0x2b33('0x10')](_0x2b33('0x12'),_0x5a7a3f,_0x2f2cb3[_0x2b33('0x10')]['message']);return _0x5f29ab(_0x2f2cb3[_0x2b33('0x10')][_0x2b33('0x13')]);}logger[_0x2b33('0x10')]('CmHopperHistory,\x20%s,\x20%s',_0x5a7a3f,_0x2f2cb3[_0x2b33('0x10')]['message']);return _0x4302b7(_0x2f2cb3[_0x2b33('0x10')][_0x2b33('0x13')]);}else{logger[_0x2b33('0xb')]('CmHopperHistory,\x20%s,\x20%s',_0x5a7a3f,'request\x20sent');_0x4302b7(_0x2f2cb3[_0x2b33('0x14')][_0x2b33('0x13')]);}})[_0x2b33('0x15')](function(_0x2f5119){logger[_0x2b33('0x10')]('CmHopperHistory,\x20%s,\x20%s',_0x5a7a3f,_0x2f5119);_0x5f29ab(_0x2f5119);});});}exports['CreateCmHopperHistory']=function(_0x59f0b6){var _0x4041bd=this;return new Promise(function(_0x4f10c4,_0x543d52){return db[_0x2b33('0x16')][_0x2b33('0x17')](_0x59f0b6[_0x2b33('0x18')],{'raw':_0x59f0b6['options']?_0x59f0b6[_0x2b33('0x19')]['raw']===undefined?!![]:![]:!![]})[_0x2b33('0xa')](function(_0x2565be){logger[_0x2b33('0xb')](_0x2b33('0x1a'),_0x59f0b6);logger[_0x2b33('0xd')](_0x2b33('0x1a'),_0x59f0b6,JSON[_0x2b33('0xf')](_0x2565be));_0x4f10c4(_0x2565be);})['catch'](function(_0x23024c){logger[_0x2b33('0x10')](_0x2b33('0x1a'),_0x23024c[_0x2b33('0x13')],_0x59f0b6);_0x543d52(_0x4041bd[_0x2b33('0x10')](0x1f4,_0x23024c[_0x2b33('0x13')]));});});};exports[_0x2b33('0x1b')]=function(_0x2605e6){var _0x5e1cba=this;return new Promise(function(_0x2b857f,_0x1b9a48){return db[_0x2b33('0x16')][_0x2b33('0x1c')]({'raw':_0x2605e6['options']?_0x2605e6[_0x2b33('0x19')]['raw']===undefined?!![]:![]:!![],'where':_0x2605e6[_0x2b33('0x19')]?_0x2605e6['options'][_0x2b33('0x1d')]||null:null,'attributes':[[db[_0x2b33('0x1e')]['fn']('COUNT',db[_0x2b33('0x1e')]['col']('id')),_0x2b33('0x1f')],[db['sequelize']['fn'](_0x2b33('0x20'),db[_0x2b33('0x1e')]['fn']('IF',db[_0x2b33('0x1e')][_0x2b33('0x21')](_0x2b33('0x22')))),_0x2b33('0x23')],[db[_0x2b33('0x1e')]['fn'](_0x2b33('0x20'),db[_0x2b33('0x1e')]['fn']('IF',db[_0x2b33('0x1e')]['literal']('`state`\x20=\x2010,\x201,\x20null'))),_0x2b33('0x24')],[db[_0x2b33('0x1e')]['fn'](_0x2b33('0x20'),db[_0x2b33('0x1e')]['fn']('IF',db[_0x2b33('0x1e')]['literal']('`state`\x20=\x2011,\x201,\x20null'))),_0x2b33('0x25')],[db[_0x2b33('0x1e')]['fn'](_0x2b33('0x26'),db[_0x2b33('0x1e')]['fn']('IF',db[_0x2b33('0x1e')][_0x2b33('0x21')]('`state`\x20=\x204,\x20`holdtime`,\x20null'))),_0x2b33('0x27')],[db['sequelize']['fn'](_0x2b33('0x26'),db[_0x2b33('0x1e')]['fn']('IF',db[_0x2b33('0x1e')][_0x2b33('0x21')](_0x2b33('0x28')))),_0x2b33('0x29')]]})[_0x2b33('0xa')](function(_0x84e1cd){logger[_0x2b33('0xb')](_0x2b33('0x1b'),_0x2605e6);logger[_0x2b33('0xd')](_0x2b33('0x1b'),_0x2605e6,JSON[_0x2b33('0xf')](_0x84e1cd));_0x2b857f(_0x84e1cd);})[_0x2b33('0x15')](function(_0xb06e25){logger[_0x2b33('0x10')]('AvgHandleTime',_0xb06e25['message'],_0x2605e6);_0x1b9a48(_0x5e1cba['error'](0x1f4,_0xb06e25[_0x2b33('0x13')]));});});};exports[_0x2b33('0x2a')]=function(_0x359075){var _0x7e1018=this;return new Promise(function(_0x32c792,_0x51a5d3){return db['CmHopperHistory'][_0x2b33('0x1c')]({'raw':_0x359075['options']?_0x359075[_0x2b33('0x19')][_0x2b33('0x2b')]===undefined?!![]:![]:!![],'where':_0x359075[_0x2b33('0x19')]?_0x359075[_0x2b33('0x19')][_0x2b33('0x1d')]||null:null,'attributes':[[_0x2b33('0x2c'),_0x2b33('0x2d')],[db[_0x2b33('0x1e')]['fn'](_0x2b33('0x20'),db[_0x2b33('0x1e')]['fn']('IF',db['sequelize'][_0x2b33('0x21')](_0x2b33('0x2e')))),_0x2b33('0x2f')],[db['sequelize']['fn']('COUNT',db[_0x2b33('0x1e')]['fn']('IF',db['sequelize'][_0x2b33('0x21')](_0x2b33('0x30')))),'outboundNoAnswerCallsDay'],[db[_0x2b33('0x1e')]['fn'](_0x2b33('0x20'),db['sequelize']['fn']('IF',db[_0x2b33('0x1e')][_0x2b33('0x21')]('`state`\x20=\x204,\x201,\x20null'))),_0x2b33('0x31')],[db[_0x2b33('0x1e')]['fn'](_0x2b33('0x20'),db['sequelize']['fn']('IF',db[_0x2b33('0x1e')][_0x2b33('0x21')](_0x2b33('0x32')))),_0x2b33('0x33')],[db[_0x2b33('0x1e')]['fn']('COUNT',db[_0x2b33('0x1e')]['fn']('IF',db[_0x2b33('0x1e')][_0x2b33('0x21')]('`state`\x20=\x208,\x201,\x20null'))),_0x2b33('0x34')],[db[_0x2b33('0x1e')]['fn'](_0x2b33('0x20'),db[_0x2b33('0x1e')]['fn']('IF',db['sequelize'][_0x2b33('0x21')](_0x2b33('0x35')))),'outboundDropCallsDayTimeout'],[db['sequelize']['fn']('COUNT',db[_0x2b33('0x1e')]['fn']('IF',db['sequelize'][_0x2b33('0x21')](_0x2b33('0x36')))),_0x2b33('0x37')],[db[_0x2b33('0x1e')]['fn'](_0x2b33('0x20'),db[_0x2b33('0x1e')]['fn']('IF',db[_0x2b33('0x1e')][_0x2b33('0x21')]('`state`\x20=\x2012,\x201,\x20null'))),_0x2b33('0x38')],[db[_0x2b33('0x1e')]['fn'](_0x2b33('0x20'),db[_0x2b33('0x1e')]['fn']('IF',db[_0x2b33('0x1e')][_0x2b33('0x21')]('`state`\x20=\x2013,\x201,\x20null'))),'outboundBlacklistCallsDay'],[db['sequelize']['fn']('COUNT',db[_0x2b33('0x1e')]['fn']('IF',db['sequelize'][_0x2b33('0x21')]('`state`\x20=\x2014,\x201,\x20null'))),'outboundOriginateFailureCallsDay'],[db[_0x2b33('0x1e')]['fn'](_0x2b33('0x20'),db[_0x2b33('0x1e')]['fn']('IF',db['sequelize'][_0x2b33('0x21')]('`state`\x20=\x2018,\x201,\x20null'))),_0x2b33('0x39')],[db[_0x2b33('0x1e')]['fn'](_0x2b33('0x20'),db[_0x2b33('0x1e')]['fn']('IF',db[_0x2b33('0x1e')][_0x2b33('0x21')]('`state`\x20=\x2016,\x201,\x20null'))),_0x2b33('0x3a')],[db[_0x2b33('0x1e')]['fn'](_0x2b33('0x20'),db['sequelize']['fn']('IF',db[_0x2b33('0x1e')][_0x2b33('0x21')](_0x2b33('0x3b')))),'outboundRejectCallsDay'],[db[_0x2b33('0x1e')]['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x2b33('0x1e')][_0x2b33('0x21')](_0x2b33('0x3c')))),_0x2b33('0x3d')]],'group':[_0x2b33('0x2c')]})[_0x2b33('0xa')](function(_0x1982aa){logger[_0x2b33('0xb')]('GetVoiceQueueHopperHistory',_0x359075);logger[_0x2b33('0xd')](_0x2b33('0x2a'),_0x359075,JSON['stringify'](_0x1982aa));_0x32c792(_0x1982aa);})[_0x2b33('0x15')](function(_0x45a939){logger['error'](_0x2b33('0x2a'),_0x45a939[_0x2b33('0x13')],_0x359075);_0x51a5d3(_0x7e1018[_0x2b33('0x10')](0x1f4,_0x45a939[_0x2b33('0x13')]));});});};exports['GetCampaignHopperHistory']=function(_0x27c2fe){var _0x1d55fd=this;return new Promise(function(_0x5528fe,_0x150035){return db[_0x2b33('0x16')][_0x2b33('0x1c')]({'raw':_0x27c2fe[_0x2b33('0x19')]?_0x27c2fe[_0x2b33('0x19')][_0x2b33('0x2b')]===undefined?!![]:![]:!![],'where':_0x27c2fe[_0x2b33('0x19')]?_0x27c2fe['options']['where']||null:null,'attributes':[[_0x2b33('0x2c'),_0x2b33('0x2d')],[db['sequelize']['fn'](_0x2b33('0x20'),db[_0x2b33('0x1e')][_0x2b33('0x3e')]('id')),'ivrTotalCallsDays'],[db[_0x2b33('0x1e')]['fn'](_0x2b33('0x20'),db[_0x2b33('0x1e')]['fn']('IF',db[_0x2b33('0x1e')][_0x2b33('0x21')](_0x2b33('0x22')))),_0x2b33('0x3f')]],'group':[_0x2b33('0x2c')]})['then'](function(_0x59e470){logger[_0x2b33('0xb')](_0x2b33('0x40'),_0x27c2fe);logger[_0x2b33('0xd')](_0x2b33('0x40'),_0x27c2fe,JSON[_0x2b33('0xf')](_0x59e470));_0x5528fe(_0x59e470);})[_0x2b33('0x15')](function(_0x4fbc8b){logger[_0x2b33('0x10')](_0x2b33('0x40'),_0x4fbc8b[_0x2b33('0x13')],_0x27c2fe);_0x150035(_0x1d55fd[_0x2b33('0x10')](0x1f4,_0x4fbc8b[_0x2b33('0x13')]));});});}; \ No newline at end of file diff --git a/server/api/cmHopperHistory/index.js b/server/api/cmHopperHistory/index.js index 8707893..ff15c9f 100644 --- a/server/api/cmHopperHistory/index.js +++ b/server/api/cmHopperHistory/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5cbd=['./cmHopperHistory.controller','get','isAuthenticated','index','/describe','describe','/:id','show','post','create','update','exports','multer','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service'];(function(_0x1f8066,_0x3e3db8){var _0x1a91fd=function(_0x5ad804){while(--_0x5ad804){_0x1f8066['push'](_0x1f8066['shift']());}};_0x1a91fd(++_0x3e3db8);}(_0x5cbd,0x19b));var _0xd5cb=function(_0x5dd44d,_0xecafbf){_0x5dd44d=_0x5dd44d-0x0;var _0x416bef=_0x5cbd[_0x5dd44d];return _0x416bef;};'use strict';var multer=require(_0xd5cb('0x0'));var util=require('util');var path=require('path');var timeout=require(_0xd5cb('0x1'));var express=require(_0xd5cb('0x2'));var router=express[_0xd5cb('0x3')]();var fs_extra=require(_0xd5cb('0x4'));var auth=require(_0xd5cb('0x5'));var interaction=require(_0xd5cb('0x6'));var config=require('../../config/environment');var controller=require(_0xd5cb('0x7'));router[_0xd5cb('0x8')]('/',auth[_0xd5cb('0x9')](),controller[_0xd5cb('0xa')]);router[_0xd5cb('0x8')](_0xd5cb('0xb'),auth['isAuthenticated'](),controller[_0xd5cb('0xc')]);router[_0xd5cb('0x8')](_0xd5cb('0xd'),auth['isAuthenticated'](),controller[_0xd5cb('0xe')]);router[_0xd5cb('0xf')]('/',auth[_0xd5cb('0x9')](),controller[_0xd5cb('0x10')]);router['put'](_0xd5cb('0xd'),auth[_0xd5cb('0x9')](),controller[_0xd5cb('0x11')]);module[_0xd5cb('0x12')]=router; \ No newline at end of file +var _0x32d5=['multer','util','path','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./cmHopperHistory.controller','get','isAuthenticated','index','describe','/:id','post','create','put','update','exports'];(function(_0x55abd9,_0x1148af){var _0x3e5669=function(_0x6f2105){while(--_0x6f2105){_0x55abd9['push'](_0x55abd9['shift']());}};_0x3e5669(++_0x1148af);}(_0x32d5,0x17c));var _0x532d=function(_0x2c585c,_0xe115bf){_0x2c585c=_0x2c585c-0x0;var _0xe3b848=_0x32d5[_0x2c585c];return _0xe3b848;};'use strict';var multer=require(_0x532d('0x0'));var util=require(_0x532d('0x1'));var path=require(_0x532d('0x2'));var timeout=require('connect-timeout');var express=require(_0x532d('0x3'));var router=express[_0x532d('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x532d('0x5'));var interaction=require(_0x532d('0x6'));var config=require(_0x532d('0x7'));var controller=require(_0x532d('0x8'));router[_0x532d('0x9')]('/',auth[_0x532d('0xa')](),controller[_0x532d('0xb')]);router[_0x532d('0x9')]('/describe',auth[_0x532d('0xa')](),controller[_0x532d('0xc')]);router[_0x532d('0x9')](_0x532d('0xd'),auth[_0x532d('0xa')](),controller['show']);router[_0x532d('0xe')]('/',auth[_0x532d('0xa')](),controller[_0x532d('0xf')]);router[_0x532d('0x10')]('/:id',auth[_0x532d('0xa')](),controller[_0x532d('0x11')]);module[_0x532d('0x12')]=router; \ No newline at end of file diff --git a/server/api/cmList/cmList.attributes.js b/server/api/cmList/cmList.attributes.js index ef33c55..36b5a1d 100644 --- a/server/api/cmList/cmList.attributes.js +++ b/server/api/cmList/cmList.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7edb=['STRING','name','exports'];(function(_0x5458f4,_0x4d3557){var _0x4dcace=function(_0x13df62){while(--_0x13df62){_0x5458f4['push'](_0x5458f4['shift']());}};_0x4dcace(++_0x4d3557);}(_0x7edb,0x158));var _0xb7ed=function(_0x3a3d1c,_0x34cdf8){_0x3a3d1c=_0x3a3d1c-0x0;var _0x3042fb=_0x7edb[_0x3a3d1c];return _0x3042fb;};'use strict';var Sequelize=require('sequelize');module[_0xb7ed('0x0')]={'name':{'type':Sequelize[_0xb7ed('0x1')],'unique':_0xb7ed('0x2'),'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0xb7ed('0x1')]},'dialPrefix':{'type':Sequelize[_0xb7ed('0x1')]}}; \ No newline at end of file +var _0x63b6=['STRING','sequelize','exports'];(function(_0x1ef1d8,_0x3e2038){var _0x37ecba=function(_0x34c02e){while(--_0x34c02e){_0x1ef1d8['push'](_0x1ef1d8['shift']());}};_0x37ecba(++_0x3e2038);}(_0x63b6,0x127));var _0x663b=function(_0x2000e8,_0x213bcd){_0x2000e8=_0x2000e8-0x0;var _0x3af0af=_0x63b6[_0x2000e8];return _0x3af0af;};'use strict';var Sequelize=require(_0x663b('0x0'));module[_0x663b('0x1')]={'name':{'type':Sequelize[_0x663b('0x2')],'unique':'name','allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0x663b('0x2')]},'dialPrefix':{'type':Sequelize['STRING']}}; \ No newline at end of file diff --git a/server/api/cmList/cmList.controller.js b/server/api/cmList/cmList.controller.js index c7f6d13..5afdbfb 100644 --- a/server/api/cmList/cmList.controller.js +++ b/server/api/cmList/cmList.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xedc8=['addCustomFields','Sequelize','TEXT','INTEGER','switch','BOOLEAN','sequelize','queryInterface','cm_contacts','cf_%s','getCustomFields','findAndCountAll','addAgents','emit','userCmList:save','removeAgents','userCmList:remove','getAgents','User','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','path','ejs','fs-extra','lodash','squel','crypto','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','socket.io-emitter','sendStatus','status','end','undefined','limit','offset','count','Content-Range','reject','save','update','then','get','Lists','UserProfileResource','destroy','error','stack','name','send','index','map','CmList','fieldName','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','pick','filter','merge','type','options','include','catch','show','params','rawAttributes','includeAll','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','find','describe','ListId','findOne','Disposition','findAll','ids','addContacts','tags','isArray','push','each','CmContact','omit','dataValues','errors','message','json','CmCustomField','CustomFields','concat','format','raw','getContacts','getContactsCsv','nolimit','writeFileSync','/tmp/list_%d_%s.csv','setHeader','attachment;\x20filename=','list_%d_%s.csv','Content-type','text/csv','download','transaction'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xedc8,0x99));var _0x8edc=function(_0x2261ce,_0x9ed8b6){_0x2261ce=_0x2261ce-0x0;var _0x524640=_0xedc8[_0x2261ce];return _0x524640;};'use strict';var emlformat=require(_0x8edc('0x0'));var rimraf=require(_0x8edc('0x1'));var zipdir=require(_0x8edc('0x2'));var jsonpatch=require(_0x8edc('0x3'));var rp=require(_0x8edc('0x4'));var moment=require(_0x8edc('0x5'));var BPromise=require(_0x8edc('0x6'));var Mustache=require('mustache');var util=require('util');var path=require(_0x8edc('0x7'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x8edc('0x8'));var fs=require('fs');var fs_extra=require(_0x8edc('0x9'));var _=require(_0x8edc('0xa'));var squel=require(_0x8edc('0xb'));var crypto=require(_0x8edc('0xc'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x8edc('0xd'));var Redis=require(_0x8edc('0xe'));var authService=require('../../components/auth/service');var qs=require(_0x8edc('0xf'));var as=require(_0x8edc('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x8edc('0x11'))(_0x8edc('0x12'));var utils=require(_0x8edc('0x13'));var config=require(_0x8edc('0x14'));var licenseUtil=require('../../config/license/util');var db=require(_0x8edc('0x15'))['db'];config['redis']=_['defaults'](config[_0x8edc('0x16')],{'host':'localhost','port':0x18eb});var socket=require(_0x8edc('0x17'))(new Redis(config['redis']));require('./cmList.socket')['register'](socket);function respondWithStatusCode(_0x213eeb,_0x4244fe){_0x4244fe=_0x4244fe||0xcc;return function(_0x4b6bc4){if(_0x4b6bc4){return _0x213eeb[_0x8edc('0x18')](_0x4244fe);}return _0x213eeb[_0x8edc('0x19')](_0x4244fe)[_0x8edc('0x1a')]();};}function respondWithResult(_0x507fce,_0x26a733){_0x26a733=_0x26a733||0xc8;return function(_0x16d37d){if(_0x16d37d){return _0x507fce[_0x8edc('0x19')](_0x26a733)['json'](_0x16d37d);}};}function respondWithFilteredResult(_0x1067c1,_0x177c30){return function(_0x5b21dd){if(_0x5b21dd){var _0x3f821f=typeof _0x177c30['offset']===_0x8edc('0x1b')&&typeof _0x177c30[_0x8edc('0x1c')]==='undefined';var _0x434c62=_0x5b21dd['count'];var _0x48db8b=_0x3f821f?0x0:_0x177c30[_0x8edc('0x1d')];var _0x1bfcb1=_0x3f821f?_0x5b21dd[_0x8edc('0x1e')]:_0x177c30['offset']+_0x177c30[_0x8edc('0x1c')];var _0x554f1f;if(_0x1bfcb1>=_0x434c62){_0x1bfcb1=_0x434c62;_0x554f1f=0xc8;}else{_0x554f1f=0xce;}_0x1067c1[_0x8edc('0x19')](_0x554f1f);return _0x1067c1['set'](_0x8edc('0x1f'),_0x48db8b+'-'+_0x1bfcb1+'/'+_0x434c62)['json'](_0x5b21dd);}return null;};}function patchUpdates(_0x4159a3){return function(_0x361383){try{jsonpatch['apply'](_0x361383,_0x4159a3,!![]);}catch(_0x5f2e0c){return BPromise[_0x8edc('0x20')](_0x5f2e0c);}return _0x361383[_0x8edc('0x21')]();};}function saveUpdates(_0x3f3d4a,_0x2cc0e6){return function(_0x561e65){if(_0x561e65){return _0x561e65[_0x8edc('0x22')](_0x3f3d4a)[_0x8edc('0x23')](function(_0x25cf14){return _0x25cf14;});}return null;};}function removeEntity(_0x1991bc,_0x101990){return function(_0x3c2947){if(_0x3c2947){return _0x3c2947['destroy']()[_0x8edc('0x23')](function(){var _0x13830b=_0x3c2947[_0x8edc('0x24')]({'plain':!![]});var _0x5e5a65=_0x8edc('0x25');return db[_0x8edc('0x26')][_0x8edc('0x27')]({'where':{'type':_0x5e5a65,'resourceId':_0x13830b['id']}})[_0x8edc('0x23')](function(){return _0x3c2947;});})[_0x8edc('0x23')](function(){_0x1991bc[_0x8edc('0x19')](0xcc)[_0x8edc('0x1a')]();});}};}function handleEntityNotFound(_0x3543dc,_0xb7e06e){return function(_0x1582ff){if(!_0x1582ff){_0x3543dc[_0x8edc('0x18')](0x194);}return _0x1582ff;};}function handleError(_0x28a90e,_0x304a36){_0x304a36=_0x304a36||0x1f4;return function(_0x143e6a){logger[_0x8edc('0x28')](_0x143e6a[_0x8edc('0x29')]);if(_0x143e6a[_0x8edc('0x2a')]){delete _0x143e6a[_0x8edc('0x2a')];}_0x28a90e[_0x8edc('0x19')](_0x304a36)[_0x8edc('0x2b')](_0x143e6a);};}exports[_0x8edc('0x2c')]=function(_0x55022f,_0x180dfd){var _0x1fecbe={},_0x4f2a79={},_0x7aeda7={'count':0x0,'rows':[]};var _0x27fa74=_[_0x8edc('0x2d')](db[_0x8edc('0x2e')]['rawAttributes'],function(_0x3bb131){return{'name':_0x3bb131[_0x8edc('0x2f')],'type':_0x3bb131['type'][_0x8edc('0x30')]};});_0x4f2a79[_0x8edc('0x31')]=_[_0x8edc('0x2d')](_0x27fa74,_0x8edc('0x2a'));_0x4f2a79[_0x8edc('0x32')]=_[_0x8edc('0x33')](_0x55022f[_0x8edc('0x32')]);_0x4f2a79[_0x8edc('0x34')]=_[_0x8edc('0x35')](_0x4f2a79[_0x8edc('0x31')],_0x4f2a79[_0x8edc('0x32')]);_0x1fecbe[_0x8edc('0x36')]=_[_0x8edc('0x35')](_0x4f2a79[_0x8edc('0x31')],qs[_0x8edc('0x37')](_0x55022f[_0x8edc('0x32')][_0x8edc('0x37')]));_0x1fecbe['attributes']=_0x1fecbe[_0x8edc('0x36')][_0x8edc('0x38')]?_0x1fecbe[_0x8edc('0x36')]:_0x4f2a79['model'];if(!_0x55022f[_0x8edc('0x32')][_0x8edc('0x39')]('nolimit')){_0x1fecbe[_0x8edc('0x1c')]=qs[_0x8edc('0x1c')](_0x55022f[_0x8edc('0x32')][_0x8edc('0x1c')]);_0x1fecbe[_0x8edc('0x1d')]=qs[_0x8edc('0x1d')](_0x55022f[_0x8edc('0x32')][_0x8edc('0x1d')]);}_0x1fecbe[_0x8edc('0x3a')]=qs[_0x8edc('0x3b')](_0x55022f['query'][_0x8edc('0x3b')]);_0x1fecbe[_0x8edc('0x3c')]=qs['filters'](_[_0x8edc('0x3d')](_0x55022f[_0x8edc('0x32')],_0x4f2a79[_0x8edc('0x34')]),_0x27fa74);if(_0x55022f[_0x8edc('0x32')][_0x8edc('0x3e')]){_0x1fecbe[_0x8edc('0x3c')]=_[_0x8edc('0x3f')](_0x1fecbe[_0x8edc('0x3c')],{'$or':_['map'](_0x27fa74,function(_0x3b81f8){if(_0x3b81f8[_0x8edc('0x40')]!=='VIRTUAL'){var _0x25e14d={};_0x25e14d[_0x3b81f8[_0x8edc('0x2a')]]={'$like':'%'+_0x55022f[_0x8edc('0x32')]['filter']+'%'};return _0x25e14d;}})});}_0x1fecbe=_['merge']({},_0x1fecbe,_0x55022f[_0x8edc('0x41')]);var _0x19a57d={'where':_0x1fecbe[_0x8edc('0x3c')]};return db['CmList']['count'](_0x19a57d)['then'](function(_0x4d2bfe){_0x7aeda7[_0x8edc('0x1e')]=_0x4d2bfe;if(_0x55022f[_0x8edc('0x32')]['includeAll']){_0x1fecbe[_0x8edc('0x42')]=[{'all':!![]}];}return db[_0x8edc('0x2e')]['findAll'](_0x1fecbe);})[_0x8edc('0x23')](function(_0x50405a){_0x7aeda7['rows']=_0x50405a;return _0x7aeda7;})[_0x8edc('0x23')](respondWithFilteredResult(_0x180dfd,_0x1fecbe))[_0x8edc('0x43')](handleError(_0x180dfd,null));};exports[_0x8edc('0x44')]=function(_0x168755,_0x38a97e){var _0xfad579={'raw':![],'where':{'id':_0x168755[_0x8edc('0x45')]['id']}},_0x49665b={};_0x49665b[_0x8edc('0x31')]=_[_0x8edc('0x33')](db['CmList'][_0x8edc('0x46')]);_0x49665b[_0x8edc('0x32')]=_[_0x8edc('0x33')](_0x168755[_0x8edc('0x32')]);_0x49665b[_0x8edc('0x34')]=_[_0x8edc('0x35')](_0x49665b['model'],_0x49665b['query']);_0xfad579[_0x8edc('0x36')]=_['intersection'](_0x49665b[_0x8edc('0x31')],qs[_0x8edc('0x37')](_0x168755[_0x8edc('0x32')][_0x8edc('0x37')]));_0xfad579[_0x8edc('0x36')]=_0xfad579[_0x8edc('0x36')][_0x8edc('0x38')]?_0xfad579[_0x8edc('0x36')]:_0x49665b[_0x8edc('0x31')];if(_0x168755[_0x8edc('0x32')][_0x8edc('0x47')]){_0xfad579[_0x8edc('0x42')]=[{'all':!![]}];}_0xfad579=_['merge']({},_0xfad579,_0x168755[_0x8edc('0x41')]);return db[_0x8edc('0x2e')]['find'](_0xfad579)[_0x8edc('0x23')](handleEntityNotFound(_0x38a97e,null))['then'](respondWithResult(_0x38a97e,null))[_0x8edc('0x43')](handleError(_0x38a97e,null));};exports[_0x8edc('0x48')]=function(_0x5d8e3f,_0x480a80){return db['CmList'][_0x8edc('0x48')](_0x5d8e3f[_0x8edc('0x49')],{})[_0x8edc('0x23')](function(_0xd57347){var _0x2ef51a=_0x5d8e3f[_0x8edc('0x4a')][_0x8edc('0x24')]({'plain':!![]});if(!_0x2ef51a)throw new Error(_0x8edc('0x4b'));if(_0x2ef51a['role']===_0x8edc('0x4a')){var _0xcb496f=_0xd57347[_0x8edc('0x24')]({'plain':!![]});var _0x4a7466=_0x8edc('0x25');return db[_0x8edc('0x4c')]['find']({'where':{'name':_0x4a7466,'userProfileId':_0x2ef51a[_0x8edc('0x4d')]},'raw':!![]})[_0x8edc('0x23')](function(_0x1eea55){if(_0x1eea55&&_0x1eea55[_0x8edc('0x4e')]===0x0){return db[_0x8edc('0x26')][_0x8edc('0x48')]({'name':_0xcb496f['name'],'resourceId':_0xcb496f['id'],'type':_0x1eea55[_0x8edc('0x2a')],'sectionId':_0x1eea55['id']},{})[_0x8edc('0x23')](function(){return _0xd57347;});}else{return _0xd57347;}})[_0x8edc('0x43')](function(_0x2947cb){logger[_0x8edc('0x28')](_0x8edc('0x4f'),_0x2947cb);throw _0x2947cb;});}return _0xd57347;})[_0x8edc('0x23')](respondWithResult(_0x480a80,0xc9))['catch'](handleError(_0x480a80,null));};exports[_0x8edc('0x22')]=function(_0x56db6b,_0x57d412){if(_0x56db6b[_0x8edc('0x49')]['id']){delete _0x56db6b['body']['id'];}return db['CmList'][_0x8edc('0x50')]({'where':{'id':_0x56db6b[_0x8edc('0x45')]['id']}})[_0x8edc('0x23')](handleEntityNotFound(_0x57d412,null))[_0x8edc('0x23')](saveUpdates(_0x56db6b['body'],null))[_0x8edc('0x23')](respondWithResult(_0x57d412,null))[_0x8edc('0x43')](handleError(_0x57d412,null));};exports[_0x8edc('0x27')]=function(_0x3e30f7,_0x28f86d){return db[_0x8edc('0x2e')]['find']({'where':{'id':_0x3e30f7[_0x8edc('0x45')]['id']}})[_0x8edc('0x23')](handleEntityNotFound(_0x28f86d,null))[_0x8edc('0x23')](removeEntity(_0x28f86d,null))['catch'](handleError(_0x28f86d,null));};exports[_0x8edc('0x51')]=function(_0x48ca97,_0x2653ce){return db[_0x8edc('0x2e')][_0x8edc('0x51')]()[_0x8edc('0x23')](respondWithResult(_0x2653ce,null))[_0x8edc('0x43')](handleError(_0x2653ce,null));};exports['addDisposition']=function(_0x370ac1,_0x22ffc5,_0x1d959f){if(_0x370ac1[_0x8edc('0x49')]['id']){delete _0x370ac1['body']['id'];}return db[_0x8edc('0x2e')][_0x8edc('0x50')]({'where':{'id':_0x370ac1[_0x8edc('0x45')]['id']}})['then'](handleEntityNotFound(_0x22ffc5,null))[_0x8edc('0x23')](function(_0x1423a4){if(_0x1423a4){_0x370ac1[_0x8edc('0x49')][_0x8edc('0x52')]=_0x1423a4['id'];return db['Disposition'][_0x8edc('0x48')](_0x370ac1[_0x8edc('0x49')]);}})[_0x8edc('0x23')](respondWithResult(_0x22ffc5,null))[_0x8edc('0x43')](handleError(_0x22ffc5,null));};exports['getDispositions']=function(_0x2a1c6f,_0x121721,_0x4b8cf6){var _0x10ae1a={'raw':![],'where':{}};var _0x4c2746={};var _0x3089a8={'count':0x0,'rows':[]};return db['CmList'][_0x8edc('0x53')]({'where':{'id':_0x2a1c6f[_0x8edc('0x45')]['id']}})[_0x8edc('0x23')](handleEntityNotFound(_0x121721,null))[_0x8edc('0x23')](function(_0x35d960){if(_0x35d960){_0x4c2746[_0x8edc('0x31')]=_[_0x8edc('0x33')](db[_0x8edc('0x54')][_0x8edc('0x46')]);_0x4c2746[_0x8edc('0x32')]=_[_0x8edc('0x33')](_0x2a1c6f[_0x8edc('0x32')]);_0x4c2746[_0x8edc('0x34')]=_[_0x8edc('0x35')](_0x4c2746[_0x8edc('0x31')],_0x4c2746['query']);_0x10ae1a[_0x8edc('0x36')]=_['intersection'](_0x4c2746[_0x8edc('0x31')],qs[_0x8edc('0x37')](_0x2a1c6f[_0x8edc('0x32')][_0x8edc('0x37')]));_0x10ae1a[_0x8edc('0x36')]=_0x10ae1a[_0x8edc('0x36')][_0x8edc('0x38')]?_0x10ae1a[_0x8edc('0x36')]:_0x4c2746[_0x8edc('0x31')];if(!_0x2a1c6f[_0x8edc('0x32')]['hasOwnProperty']('nolimit')){_0x10ae1a[_0x8edc('0x1c')]=qs[_0x8edc('0x1c')](_0x2a1c6f[_0x8edc('0x32')][_0x8edc('0x1c')]);_0x10ae1a[_0x8edc('0x1d')]=qs[_0x8edc('0x1d')](_0x2a1c6f[_0x8edc('0x32')]['offset']);}_0x10ae1a[_0x8edc('0x3a')]=qs[_0x8edc('0x3b')](_0x2a1c6f[_0x8edc('0x32')][_0x8edc('0x3b')]);_0x10ae1a[_0x8edc('0x3c')]=qs[_0x8edc('0x34')](_['pick'](_0x2a1c6f[_0x8edc('0x32')],_0x4c2746['filters']));_0x10ae1a[_0x8edc('0x3c')]['ListId']=_0x35d960['id'];if(_0x2a1c6f['query'][_0x8edc('0x3e')]){_0x10ae1a['where']=_['merge'](_0x10ae1a[_0x8edc('0x3c')],{'$or':_['map'](_0x10ae1a[_0x8edc('0x36')],function(_0x430df1){var _0x3200a6={};_0x3200a6[_0x430df1]={'$like':'%'+_0x2a1c6f[_0x8edc('0x32')][_0x8edc('0x3e')]+'%'};return _0x3200a6;})});}_0x10ae1a=_[_0x8edc('0x3f')]({},_0x10ae1a,_0x2a1c6f[_0x8edc('0x41')]);return db[_0x8edc('0x54')][_0x8edc('0x1e')]({'where':_0x10ae1a[_0x8edc('0x3c')]})[_0x8edc('0x23')](function(_0x6fa522){_0x3089a8[_0x8edc('0x1e')]=_0x6fa522;if(_0x2a1c6f['query']['includeAll']){_0x10ae1a[_0x8edc('0x42')]=[{'all':!![]}];}return db[_0x8edc('0x54')][_0x8edc('0x55')](_0x10ae1a);})['then'](function(_0x5b60e6){_0x3089a8['rows']=_0x5b60e6;return _0x3089a8;});}})[_0x8edc('0x23')](respondWithFilteredResult(_0x121721,_0x10ae1a))[_0x8edc('0x43')](handleError(_0x121721,null));};exports['removeDispositions']=function(_0x3cfe1b,_0x4d1fe1,_0x5665fd){return db[_0x8edc('0x2e')]['find']({'where':{'id':_0x3cfe1b['params']['id']}})[_0x8edc('0x23')](handleEntityNotFound(_0x4d1fe1,null))[_0x8edc('0x23')](function(_0x2e799e){if(_0x2e799e){return _0x2e799e['removeDispositions'](_0x3cfe1b[_0x8edc('0x32')][_0x8edc('0x56')]);}})[_0x8edc('0x23')](respondWithStatusCode(_0x4d1fe1,null))[_0x8edc('0x43')](handleError(_0x4d1fe1,null));};exports[_0x8edc('0x57')]=function(_0x4e9a6b,_0x506ca7,_0x17b6c0){return db[_0x8edc('0x2e')][_0x8edc('0x50')]({'where':{'id':_0x4e9a6b[_0x8edc('0x45')]['id']}})[_0x8edc('0x23')](handleEntityNotFound(_0x506ca7,null))['then'](function(_0xd76e26){if(_0xd76e26){var _0x53cc11=[];var _0x352e6c={'success':[],'errors':[]};return db['CmContact'][_0x8edc('0x51')]()[_0x8edc('0x23')](function(_0x2189a5){if(_0x4e9a6b[_0x8edc('0x49')][_0x8edc('0x58')]&&_['isArray'](_0x4e9a6b['body']['tags'])){if(_0x4e9a6b[_0x8edc('0x49')][_0x8edc('0x58')][_0x8edc('0x38')]){_0x4e9a6b[_0x8edc('0x49')][_0x8edc('0x58')]=_0x4e9a6b[_0x8edc('0x49')][_0x8edc('0x58')]['join'](';')+';';}else{_0x4e9a6b[_0x8edc('0x49')][_0x8edc('0x58')]=null;}}else{_0x4e9a6b[_0x8edc('0x49')][_0x8edc('0x58')]=null;}if(_0x4e9a6b[_0x8edc('0x49')]&&_[_0x8edc('0x59')](_0x4e9a6b[_0x8edc('0x49')])){for(var _0x5daa71=0x0;_0x5daa71<_0x4e9a6b['body']['length'];_0x5daa71+=0x1){_0x4e9a6b[_0x8edc('0x49')][_0x5daa71][_0x8edc('0x52')]=_0x4e9a6b[_0x8edc('0x45')]['id'];_0x53cc11[_0x8edc('0x5a')](_0x4e9a6b[_0x8edc('0x49')][_0x5daa71]);}return BPromise[_0x8edc('0x5b')](_0x53cc11,function(_0x59465f){return db[_0x8edc('0x5c')]['create'](_[_0x8edc('0x5d')](_0x59465f,[_0x8edc('0x56'),'id'])||{},{'fields':_['keys'](_0x2189a5),'raw':!![]})[_0x8edc('0x23')](function(_0x2f0525){_0x352e6c['success'][_0x8edc('0x5a')](_0x2f0525[_0x8edc('0x5e')]);})[_0x8edc('0x43')](function(_0x26a643){_0x352e6c[_0x8edc('0x5f')][_0x8edc('0x5a')]({'data':_0x59465f,'error':_0x26a643[_0x8edc('0x60')]});});})[_0x8edc('0x23')](function(_0x1acfe0){return _0x352e6c;})[_0x8edc('0x43')](function(_0x335bc3){return _0x335bc3;});}else{_0x506ca7[_0x8edc('0x19')](0x190)[_0x8edc('0x61')]({'message':'Malformed\x20request\x20syntax'});}});}})['then'](respondWithResult(_0x506ca7,null))[_0x8edc('0x43')](handleError(_0x506ca7,null));};exports['getContacts']=function(_0x20b3bf,_0xaec4a1,_0xcba270){var _0x3aaa2b;return db['CmList'][_0x8edc('0x50')]({'where':{'id':_0x20b3bf['params']['id']},'include':[{'model':db[_0x8edc('0x62')],'as':_0x8edc('0x63')}]})[_0x8edc('0x23')](handleEntityNotFound(_0xaec4a1,null))[_0x8edc('0x23')](function(_0x50beb3){if(_0x50beb3){_0x3aaa2b=_0x50beb3;return db[_0x8edc('0x5c')]['rawAttributes'];}})[_0x8edc('0x23')](function(_0x2d75b9){if(_0x2d75b9){var _0x3bf326={};var _0x1be763={};_0x1be763[_0x8edc('0x31')]=_[_0x8edc('0x64')](_['keys'](_0x2d75b9),_[_0x8edc('0x2d')](_0x3aaa2b[_0x8edc('0x63')],function(_0x477d52){return util[_0x8edc('0x65')]('cf_%d',_0x477d52['id']);}));_0x1be763[_0x8edc('0x32')]=_[_0x8edc('0x33')](_0x20b3bf[_0x8edc('0x32')]);_0x1be763[_0x8edc('0x34')]=_[_0x8edc('0x35')](_0x1be763['model'],_0x1be763[_0x8edc('0x32')]);_0x3bf326['attributes']=_[_0x8edc('0x35')](_0x1be763[_0x8edc('0x31')],qs[_0x8edc('0x37')](_0x20b3bf[_0x8edc('0x32')][_0x8edc('0x37')]));_0x3bf326[_0x8edc('0x36')]=_0x3bf326[_0x8edc('0x36')][_0x8edc('0x38')]?_0x3bf326['attributes']:_0x1be763[_0x8edc('0x31')];if(!_0x20b3bf[_0x8edc('0x32')]['hasOwnProperty']('nolimit')){_0x3bf326[_0x8edc('0x1c')]=qs[_0x8edc('0x1c')](_0x20b3bf[_0x8edc('0x32')][_0x8edc('0x1c')]);_0x3bf326[_0x8edc('0x1d')]=qs[_0x8edc('0x1d')](_0x20b3bf['query'][_0x8edc('0x1d')]);}_0x3bf326[_0x8edc('0x3a')]=qs[_0x8edc('0x3b')](_0x20b3bf[_0x8edc('0x32')]['sort']);_0x3bf326[_0x8edc('0x3c')]=qs['filters'](_[_0x8edc('0x3d')](_0x20b3bf[_0x8edc('0x32')],_0x1be763[_0x8edc('0x34')]));_0x3bf326[_0x8edc('0x66')]=!![];if(_0x20b3bf[_0x8edc('0x32')][_0x8edc('0x3e')]){_0x3bf326[_0x8edc('0x3c')]=_[_0x8edc('0x3f')](_0x3bf326['where'],{'$or':_[_0x8edc('0x2d')](_0x3bf326[_0x8edc('0x36')],function(_0x25c230){var _0x1bbacf={};_0x1bbacf[_0x25c230]={'$like':'%'+_0x20b3bf[_0x8edc('0x32')][_0x8edc('0x3e')]+'%'};return _0x1bbacf;})});}_0x3bf326=_[_0x8edc('0x3f')]({},_0x3bf326,_0x20b3bf['options']);return _0x3aaa2b[_0x8edc('0x67')](_0x3bf326);}})[_0x8edc('0x23')](respondWithResult(_0xaec4a1,null))['catch'](handleError(_0xaec4a1,null));};exports[_0x8edc('0x68')]=function(_0xab22db,_0x34b102,_0xef9f0){var _0x2bf19a;return db['CmList'][_0x8edc('0x50')]({'where':{'id':_0xab22db[_0x8edc('0x45')]['id']},'include':[{'model':db[_0x8edc('0x62')],'as':_0x8edc('0x63')}]})[_0x8edc('0x23')](handleEntityNotFound(_0x34b102,null))[_0x8edc('0x23')](function(_0x2d1d05){if(_0x2d1d05){_0x2bf19a=_0x2d1d05;return db[_0x8edc('0x5c')][_0x8edc('0x46')];}})[_0x8edc('0x23')](function(_0x124c6a){if(_0x124c6a){var _0x97d373={};var _0x47107b={};_0x47107b[_0x8edc('0x31')]=_['concat'](_[_0x8edc('0x33')](_0x124c6a),_['map'](_0x2bf19a['CustomFields'],function(_0xa9f19b){return util[_0x8edc('0x65')]('cf_%d',_0xa9f19b['id']);}));_0x47107b[_0x8edc('0x32')]=_['keys'](_0xab22db[_0x8edc('0x32')]);_0x47107b[_0x8edc('0x34')]=_[_0x8edc('0x35')](_0x47107b[_0x8edc('0x31')],_0x47107b['query']);_0x97d373['attributes']=_[_0x8edc('0x35')](_0x47107b[_0x8edc('0x31')],qs['fields'](_0xab22db[_0x8edc('0x32')]['fields']));_0x97d373[_0x8edc('0x36')]=_0x97d373[_0x8edc('0x36')][_0x8edc('0x38')]?_0x97d373[_0x8edc('0x36')]:_0x47107b['model'];if(!_0xab22db[_0x8edc('0x32')]['hasOwnProperty'](_0x8edc('0x69'))){_0x97d373[_0x8edc('0x1c')]=qs[_0x8edc('0x1c')](_0xab22db[_0x8edc('0x32')][_0x8edc('0x1c')]);_0x97d373[_0x8edc('0x1d')]=qs[_0x8edc('0x1d')](_0xab22db[_0x8edc('0x32')][_0x8edc('0x1d')]);}_0x97d373[_0x8edc('0x3a')]=qs[_0x8edc('0x3b')](_0xab22db[_0x8edc('0x32')]['sort']);_0x97d373['where']=qs[_0x8edc('0x34')](_[_0x8edc('0x3d')](_0xab22db[_0x8edc('0x32')],_0x47107b['filters']));_0x97d373[_0x8edc('0x66')]=!![];if(_0xab22db[_0x8edc('0x32')]['filter']){_0x97d373[_0x8edc('0x3c')]=_[_0x8edc('0x3f')](_0x97d373[_0x8edc('0x3c')],{'$or':_[_0x8edc('0x2d')](_0x97d373[_0x8edc('0x36')],function(_0x194fbe){var _0x41d90c={};_0x41d90c[_0x194fbe]={'$like':'%'+_0xab22db[_0x8edc('0x32')][_0x8edc('0x3e')]+'%'};return _0x41d90c;})});}_0x97d373=_[_0x8edc('0x3f')]({},_0x97d373,_0xab22db[_0x8edc('0x41')]);return _0x2bf19a[_0x8edc('0x67')](_0x97d373);}})[_0x8edc('0x23')](function(_0x3dc636){if(!_['isEmpty'](_0x3dc636)){var _0x35c986=toCsv(_0x3dc636);var _0x4f4001=Date['now']();fs[_0x8edc('0x6a')](util[_0x8edc('0x65')](_0x8edc('0x6b'),_0x2bf19a['id'],_0x4f4001),_0x35c986);_0x34b102[_0x8edc('0x6c')]('Content-disposition',_0x8edc('0x6d')+util[_0x8edc('0x65')](_0x8edc('0x6e'),_0x2bf19a['id'],_0x4f4001));_0x34b102[_0x8edc('0x6c')](_0x8edc('0x6f'),_0x8edc('0x70'));return _0x34b102[_0x8edc('0x71')](util[_0x8edc('0x65')]('/tmp/list_%d_%s.csv',_0x2bf19a['id'],_0x4f4001));}else{return _0x34b102[_0x8edc('0x18')](0xcc);}})['catch'](handleError(_0x34b102,null));};exports['addCustomField']=function(_0x3116ec,_0x28e566,_0x11015c){var _0x4786c4;delete _0x3116ec[_0x8edc('0x49')]['id'];return db[_0x8edc('0x2e')][_0x8edc('0x53')]({'where':{'id':_0x3116ec[_0x8edc('0x45')]['id']}})[_0x8edc('0x23')](handleEntityNotFound(_0x28e566,null))[_0x8edc('0x23')](function(_0x3bd68d){if(_0x3bd68d){return db['sequelize'][_0x8edc('0x72')](function(_0x29ede5){return db[_0x8edc('0x62')][_0x8edc('0x48')](_0x3116ec[_0x8edc('0x49')],{'transaction':_0x29ede5})[_0x8edc('0x23')](function(_0xdc6184){_0x4786c4=_0xdc6184;return _0x3bd68d[_0x8edc('0x73')](_0xdc6184,{'transaction':_0x29ede5});})['then'](function(){var _0x2554c0={'type':db[_0x8edc('0x74')][_0x8edc('0x75')],'transaction':_0x29ede5};switch(_0x3116ec[_0x8edc('0x49')][_0x8edc('0x40')]){case'text':_0x2554c0[_0x8edc('0x40')]=db[_0x8edc('0x74')][_0x8edc('0x75')];break;case'number':_0x2554c0[_0x8edc('0x40')]=db['Sequelize'][_0x8edc('0x76')];break;case _0x8edc('0x77'):_0x2554c0[_0x8edc('0x40')]=db['Sequelize'][_0x8edc('0x78')];_0x2554c0['defaultValue']=![];break;default:}return db[_0x8edc('0x79')][_0x8edc('0x7a')]['addColumn'](_0x8edc('0x7b'),util[_0x8edc('0x65')](_0x8edc('0x7c'),_0x4786c4['id']),_0x2554c0);})['then'](function(){return _0x4786c4;});});}})[_0x8edc('0x23')](respondWithResult(_0x28e566,null))[_0x8edc('0x43')](handleError(_0x28e566,null));};exports[_0x8edc('0x7d')]=function(_0x497e9a,_0x564cbc,_0x151d10){var _0x35d1a6={};var _0x33078c={};var _0xc1efd2;var _0x5457fc;return db[_0x8edc('0x2e')][_0x8edc('0x53')]({'where':{'id':_0x497e9a[_0x8edc('0x45')]['id']}})['then'](handleEntityNotFound(_0x564cbc,null))[_0x8edc('0x23')](function(_0x194a60){if(_0x194a60){_0xc1efd2=_0x194a60;_0x33078c[_0x8edc('0x31')]=_[_0x8edc('0x33')](db['CmCustomField'][_0x8edc('0x46')]);_0x33078c[_0x8edc('0x32')]=_[_0x8edc('0x33')](_0x497e9a[_0x8edc('0x32')]);_0x33078c['filters']=_[_0x8edc('0x35')](_0x33078c[_0x8edc('0x31')],_0x33078c[_0x8edc('0x32')]);_0x35d1a6['attributes']=_[_0x8edc('0x35')](_0x33078c[_0x8edc('0x31')],qs[_0x8edc('0x37')](_0x497e9a['query'][_0x8edc('0x37')]));_0x35d1a6[_0x8edc('0x36')]=_0x35d1a6['attributes'][_0x8edc('0x38')]?_0x35d1a6['attributes']:_0x33078c['model'];_0x35d1a6[_0x8edc('0x3a')]=qs[_0x8edc('0x3b')](_0x497e9a[_0x8edc('0x32')][_0x8edc('0x3b')]);_0x35d1a6[_0x8edc('0x3c')]=qs['filters'](_[_0x8edc('0x3d')](_0x497e9a[_0x8edc('0x32')],_0x33078c[_0x8edc('0x34')]));_0x35d1a6[_0x8edc('0x3c')]=_[_0x8edc('0x3f')](_0x35d1a6['where'],{'$or':[{'ListId':_0x194a60['id']},{'ListId':null}]});if(_0x497e9a[_0x8edc('0x32')][_0x8edc('0x3e')]){_0x35d1a6[_0x8edc('0x3c')]=_[_0x8edc('0x3f')](_0x35d1a6[_0x8edc('0x3c')],{'$or':_[_0x8edc('0x2d')](_0x35d1a6['attributes'],function(_0x2c9c6a){var _0x305765={};_0x305765[_0x2c9c6a]={'$like':'%'+_0x497e9a['query'][_0x8edc('0x3e')]+'%'};return _0x305765;})});}_0x35d1a6=_[_0x8edc('0x3f')]({},_0x35d1a6,_0x497e9a[_0x8edc('0x41')]);return db['CmCustomField'][_0x8edc('0x7e')](_0x35d1a6);}})[_0x8edc('0x23')](respondWithResult(_0x564cbc,null))[_0x8edc('0x43')](handleError(_0x564cbc,null));};exports[_0x8edc('0x7f')]=function(_0x24e183,_0x4d8482,_0x29c663){return db[_0x8edc('0x2e')][_0x8edc('0x50')]({'where':{'id':_0x24e183[_0x8edc('0x45')]['id']}})[_0x8edc('0x23')](handleEntityNotFound(_0x4d8482,null))[_0x8edc('0x23')](function(_0x3dbd70){if(_0x3dbd70){return _0x3dbd70[_0x8edc('0x7f')](_0x24e183[_0x8edc('0x49')]['ids'],_[_0x8edc('0x5d')](_0x24e183[_0x8edc('0x49')],[_0x8edc('0x56'),'id'])||{})['spread'](function(_0x2726d0){for(var _0x408981=0x0;_0x408981<_0x24e183['body']['ids'][_0x8edc('0x38')];_0x408981+=0x1){socket[_0x8edc('0x80')](_0x8edc('0x81'),{'UserId':_0x24e183[_0x8edc('0x49')][_0x8edc('0x56')][_0x408981],'CmListId':_0x24e183[_0x8edc('0x45')]['id']});}return _0x2726d0;});}})['then'](respondWithResult(_0x4d8482,null))[_0x8edc('0x43')](handleError(_0x4d8482,null));};exports[_0x8edc('0x82')]=function(_0x1d5ecf,_0x153100,_0x552f74){return db[_0x8edc('0x2e')][_0x8edc('0x50')]({'where':{'id':_0x1d5ecf[_0x8edc('0x45')]['id']}})[_0x8edc('0x23')](handleEntityNotFound(_0x153100,null))[_0x8edc('0x23')](function(_0x2e199d){if(_0x2e199d){return _0x2e199d[_0x8edc('0x82')](_0x1d5ecf[_0x8edc('0x32')]['ids'])[_0x8edc('0x23')](function(){if(_[_0x8edc('0x59')](_0x1d5ecf[_0x8edc('0x32')][_0x8edc('0x56')])){for(var _0x16f1ed=0x0;_0x16f1ed<_0x1d5ecf[_0x8edc('0x32')]['ids']['length'];_0x16f1ed+=0x1){socket['emit'](_0x8edc('0x83'),{'UserId':Number(_0x1d5ecf[_0x8edc('0x32')][_0x8edc('0x56')][_0x16f1ed]),'CmListId':Number(_0x1d5ecf[_0x8edc('0x45')]['id'])});}}else{socket[_0x8edc('0x80')](_0x8edc('0x83'),{'UserId':Number(_0x1d5ecf[_0x8edc('0x32')][_0x8edc('0x56')]),'CmListId':Number(_0x1d5ecf['params']['id'])});}});}})[_0x8edc('0x23')](respondWithStatusCode(_0x153100,null))['catch'](handleError(_0x153100,null));};exports[_0x8edc('0x84')]=function(_0x1af8df,_0x3fb4cc,_0x3e668e){var _0x5d7935={};var _0x27b73c={};var _0x193ff6;var _0x2a5a83;return db['CmList']['findOne']({'where':{'id':_0x1af8df[_0x8edc('0x45')]['id']}})[_0x8edc('0x23')](handleEntityNotFound(_0x3fb4cc,null))[_0x8edc('0x23')](function(_0xfd66b7){if(_0xfd66b7){_0x193ff6=_0xfd66b7;_0x27b73c[_0x8edc('0x31')]=_[_0x8edc('0x33')](db[_0x8edc('0x85')][_0x8edc('0x46')]);_0x27b73c['query']=_[_0x8edc('0x33')](_0x1af8df['query']);_0x27b73c[_0x8edc('0x34')]=_['intersection'](_0x27b73c[_0x8edc('0x31')],_0x27b73c['query']);_0x5d7935[_0x8edc('0x36')]=_[_0x8edc('0x35')](_0x27b73c[_0x8edc('0x31')],qs['fields'](_0x1af8df['query'][_0x8edc('0x37')]));_0x5d7935['attributes']=_0x5d7935[_0x8edc('0x36')][_0x8edc('0x38')]?_0x5d7935[_0x8edc('0x36')]:_0x27b73c[_0x8edc('0x31')];_0x5d7935[_0x8edc('0x3a')]=qs[_0x8edc('0x3b')](_0x1af8df['query'][_0x8edc('0x3b')]);_0x5d7935[_0x8edc('0x3c')]=qs[_0x8edc('0x34')](_['pick'](_0x1af8df[_0x8edc('0x32')],_0x27b73c['filters']));if(_0x1af8df['query'][_0x8edc('0x3e')]){_0x5d7935[_0x8edc('0x3c')]=_[_0x8edc('0x3f')](_0x5d7935['where'],{'$or':_[_0x8edc('0x2d')](_0x5d7935[_0x8edc('0x36')],function(_0x50d718){var _0x33aaab={};_0x33aaab[_0x50d718]={'$like':'%'+_0x1af8df[_0x8edc('0x32')][_0x8edc('0x3e')]+'%'};return _0x33aaab;})});}_0x5d7935=_[_0x8edc('0x3f')]({},_0x5d7935,_0x1af8df['options']);return _0x193ff6[_0x8edc('0x84')](_0x5d7935);}})['then'](function(_0x1c3b59){if(_0x1c3b59){_0x2a5a83=_0x1c3b59[_0x8edc('0x38')];if(!_0x1af8df[_0x8edc('0x32')][_0x8edc('0x39')](_0x8edc('0x69'))){_0x5d7935[_0x8edc('0x1c')]=qs[_0x8edc('0x1c')](_0x1af8df['query'][_0x8edc('0x1c')]);_0x5d7935['offset']=qs[_0x8edc('0x1d')](_0x1af8df[_0x8edc('0x32')][_0x8edc('0x1d')]);}return _0x193ff6[_0x8edc('0x84')](_0x5d7935);}})['then'](function(_0x27cbdd){if(_0x27cbdd){return _0x27cbdd?{'count':_0x2a5a83,'rows':_0x27cbdd}:null;}})[_0x8edc('0x23')](respondWithResult(_0x3fb4cc,null))[_0x8edc('0x43')](handleError(_0x3fb4cc,null));}; \ No newline at end of file +var _0x2581=['localhost','socket.io-emitter','./cmList.socket','register','status','end','offset','undefined','count','limit','set','Content-Range','json','reject','save','update','destroy','get','Lists','UserProfileResource','then','error','stack','name','CmList','rawAttributes','fieldName','type','key','model','map','query','filters','intersection','fields','attributes','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','findAll','show','params','keys','length','catch','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','autoAssociation','find','describe','getDispositions','findOne','Disposition','hasOwnProperty','include','rows','removeDispositions','ids','CmContact','tags','isArray','join','each','omit','success','push','errors','message','Malformed\x20request\x20syntax','getContacts','CmCustomField','CustomFields','concat','format','cf_%d','raw','getContactsCsv','now','writeFileSync','setHeader','attachment;\x20filename=','list_%d_%s.csv','sendStatus','addCustomField','transaction','addCustomFields','Sequelize','TEXT','text','number','INTEGER','switch','BOOLEAN','defaultValue','sequelize','queryInterface','cf_%s','getCustomFields','addAgents','spread','emit','removeAgents','userCmList:remove','User','getAgents','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x2581,0x72));var _0x1258=function(_0x253174,_0x1624df){_0x253174=_0x253174-0x0;var _0x9e0e73=_0x2581[_0x253174];return _0x9e0e73;};'use strict';var emlformat=require(_0x1258('0x0'));var rimraf=require(_0x1258('0x1'));var zipdir=require(_0x1258('0x2'));var jsonpatch=require(_0x1258('0x3'));var rp=require(_0x1258('0x4'));var moment=require(_0x1258('0x5'));var BPromise=require(_0x1258('0x6'));var Mustache=require(_0x1258('0x7'));var util=require(_0x1258('0x8'));var path=require(_0x1258('0x9'));var sox=require('sox');var csv=require(_0x1258('0xa'));var ejs=require(_0x1258('0xb'));var fs=require('fs');var fs_extra=require(_0x1258('0xc'));var _=require(_0x1258('0xd'));var squel=require(_0x1258('0xe'));var crypto=require(_0x1258('0xf'));var jsforce=require(_0x1258('0x10'));var deskjs=require(_0x1258('0x11'));var toCsv=require(_0x1258('0xa'));var querystring=require(_0x1258('0x12'));var Papa=require('papaparse');var Redis=require(_0x1258('0x13'));var authService=require(_0x1258('0x14'));var qs=require(_0x1258('0x15'));var as=require(_0x1258('0x16'));var hardwareService=require(_0x1258('0x17'));var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require(_0x1258('0x18'));var licenseUtil=require(_0x1258('0x19'));var db=require(_0x1258('0x1a'))['db'];config[_0x1258('0x1b')]=_[_0x1258('0x1c')](config['redis'],{'host':_0x1258('0x1d'),'port':0x18eb});var socket=require(_0x1258('0x1e'))(new Redis(config['redis']));require(_0x1258('0x1f'))[_0x1258('0x20')](socket);function respondWithStatusCode(_0xf8f5be,_0x16fb90){_0x16fb90=_0x16fb90||0xcc;return function(_0xc32485){if(_0xc32485){return _0xf8f5be['sendStatus'](_0x16fb90);}return _0xf8f5be[_0x1258('0x21')](_0x16fb90)[_0x1258('0x22')]();};}function respondWithResult(_0xe61944,_0x40a1e2){_0x40a1e2=_0x40a1e2||0xc8;return function(_0x10b08e){if(_0x10b08e){return _0xe61944[_0x1258('0x21')](_0x40a1e2)['json'](_0x10b08e);}};}function respondWithFilteredResult(_0x162315,_0x5b9a18){return function(_0x38605b){if(_0x38605b){var _0x2ff171=typeof _0x5b9a18[_0x1258('0x23')]===_0x1258('0x24')&&typeof _0x5b9a18['limit']===_0x1258('0x24');var _0x11b4e4=_0x38605b['count'];var _0x1911ae=_0x2ff171?0x0:_0x5b9a18[_0x1258('0x23')];var _0x37a9e9=_0x2ff171?_0x38605b[_0x1258('0x25')]:_0x5b9a18['offset']+_0x5b9a18[_0x1258('0x26')];var _0x4f1d41;if(_0x37a9e9>=_0x11b4e4){_0x37a9e9=_0x11b4e4;_0x4f1d41=0xc8;}else{_0x4f1d41=0xce;}_0x162315[_0x1258('0x21')](_0x4f1d41);return _0x162315[_0x1258('0x27')](_0x1258('0x28'),_0x1911ae+'-'+_0x37a9e9+'/'+_0x11b4e4)[_0x1258('0x29')](_0x38605b);}return null;};}function patchUpdates(_0x3e541d){return function(_0x11e56f){try{jsonpatch['apply'](_0x11e56f,_0x3e541d,!![]);}catch(_0x4bb110){return BPromise[_0x1258('0x2a')](_0x4bb110);}return _0x11e56f[_0x1258('0x2b')]();};}function saveUpdates(_0x4a468a,_0x452479){return function(_0x238ccb){if(_0x238ccb){return _0x238ccb[_0x1258('0x2c')](_0x4a468a)['then'](function(_0x4a5a96){return _0x4a5a96;});}return null;};}function removeEntity(_0x5524bf,_0x2aa934){return function(_0x321af7){if(_0x321af7){return _0x321af7[_0x1258('0x2d')]()['then'](function(){var _0xb84c8c=_0x321af7[_0x1258('0x2e')]({'plain':!![]});var _0x4d9907=_0x1258('0x2f');return db[_0x1258('0x30')][_0x1258('0x2d')]({'where':{'type':_0x4d9907,'resourceId':_0xb84c8c['id']}})[_0x1258('0x31')](function(){return _0x321af7;});})['then'](function(){_0x5524bf[_0x1258('0x21')](0xcc)[_0x1258('0x22')]();});}};}function handleEntityNotFound(_0x9d470d,_0x59e40b){return function(_0x4f85fd){if(!_0x4f85fd){_0x9d470d['sendStatus'](0x194);}return _0x4f85fd;};}function handleError(_0x21f33c,_0x5d580a){_0x5d580a=_0x5d580a||0x1f4;return function(_0x2c9329){logger[_0x1258('0x32')](_0x2c9329[_0x1258('0x33')]);if(_0x2c9329['name']){delete _0x2c9329[_0x1258('0x34')];}_0x21f33c[_0x1258('0x21')](_0x5d580a)['send'](_0x2c9329);};}exports['index']=function(_0x556f27,_0x4c2a87){var _0x5ebfbd={},_0x48922c={},_0x5a467f={'count':0x0,'rows':[]};var _0x4996bc=_['map'](db[_0x1258('0x35')][_0x1258('0x36')],function(_0x35a13b){return{'name':_0x35a13b[_0x1258('0x37')],'type':_0x35a13b[_0x1258('0x38')][_0x1258('0x39')]};});_0x48922c[_0x1258('0x3a')]=_[_0x1258('0x3b')](_0x4996bc,'name');_0x48922c[_0x1258('0x3c')]=_['keys'](_0x556f27[_0x1258('0x3c')]);_0x48922c[_0x1258('0x3d')]=_[_0x1258('0x3e')](_0x48922c[_0x1258('0x3a')],_0x48922c[_0x1258('0x3c')]);_0x5ebfbd['attributes']=_[_0x1258('0x3e')](_0x48922c['model'],qs['fields'](_0x556f27[_0x1258('0x3c')][_0x1258('0x3f')]));_0x5ebfbd[_0x1258('0x40')]=_0x5ebfbd[_0x1258('0x40')]['length']?_0x5ebfbd[_0x1258('0x40')]:_0x48922c[_0x1258('0x3a')];if(!_0x556f27[_0x1258('0x3c')]['hasOwnProperty'](_0x1258('0x41'))){_0x5ebfbd['limit']=qs['limit'](_0x556f27[_0x1258('0x3c')]['limit']);_0x5ebfbd[_0x1258('0x23')]=qs[_0x1258('0x23')](_0x556f27[_0x1258('0x3c')][_0x1258('0x23')]);}_0x5ebfbd[_0x1258('0x42')]=qs[_0x1258('0x43')](_0x556f27['query'][_0x1258('0x43')]);_0x5ebfbd[_0x1258('0x44')]=qs[_0x1258('0x3d')](_[_0x1258('0x45')](_0x556f27[_0x1258('0x3c')],_0x48922c[_0x1258('0x3d')]),_0x4996bc);if(_0x556f27['query'][_0x1258('0x46')]){_0x5ebfbd['where']=_[_0x1258('0x47')](_0x5ebfbd[_0x1258('0x44')],{'$or':_[_0x1258('0x3b')](_0x4996bc,function(_0x3a9b5f){if(_0x3a9b5f[_0x1258('0x38')]!==_0x1258('0x48')){var _0xe5f6ad={};_0xe5f6ad[_0x3a9b5f[_0x1258('0x34')]]={'$like':'%'+_0x556f27[_0x1258('0x3c')]['filter']+'%'};return _0xe5f6ad;}})});}_0x5ebfbd=_['merge']({},_0x5ebfbd,_0x556f27[_0x1258('0x49')]);var _0x253afb={'where':_0x5ebfbd['where']};return db[_0x1258('0x35')][_0x1258('0x25')](_0x253afb)['then'](function(_0x31e6a4){_0x5a467f['count']=_0x31e6a4;if(_0x556f27[_0x1258('0x3c')][_0x1258('0x4a')]){_0x5ebfbd['include']=[{'all':!![]}];}return db[_0x1258('0x35')][_0x1258('0x4b')](_0x5ebfbd);})['then'](function(_0x7d72f9){_0x5a467f['rows']=_0x7d72f9;return _0x5a467f;})[_0x1258('0x31')](respondWithFilteredResult(_0x4c2a87,_0x5ebfbd))['catch'](handleError(_0x4c2a87,null));};exports[_0x1258('0x4c')]=function(_0x41bfb2,_0x225ba8){var _0x5b337b={'raw':![],'where':{'id':_0x41bfb2[_0x1258('0x4d')]['id']}},_0x2bd19a={};_0x2bd19a[_0x1258('0x3a')]=_[_0x1258('0x4e')](db[_0x1258('0x35')][_0x1258('0x36')]);_0x2bd19a[_0x1258('0x3c')]=_[_0x1258('0x4e')](_0x41bfb2[_0x1258('0x3c')]);_0x2bd19a['filters']=_[_0x1258('0x3e')](_0x2bd19a[_0x1258('0x3a')],_0x2bd19a['query']);_0x5b337b[_0x1258('0x40')]=_[_0x1258('0x3e')](_0x2bd19a[_0x1258('0x3a')],qs['fields'](_0x41bfb2[_0x1258('0x3c')][_0x1258('0x3f')]));_0x5b337b[_0x1258('0x40')]=_0x5b337b['attributes'][_0x1258('0x4f')]?_0x5b337b[_0x1258('0x40')]:_0x2bd19a[_0x1258('0x3a')];if(_0x41bfb2[_0x1258('0x3c')][_0x1258('0x4a')]){_0x5b337b['include']=[{'all':!![]}];}_0x5b337b=_[_0x1258('0x47')]({},_0x5b337b,_0x41bfb2[_0x1258('0x49')]);return db['CmList']['find'](_0x5b337b)['then'](handleEntityNotFound(_0x225ba8,null))['then'](respondWithResult(_0x225ba8,null))[_0x1258('0x50')](handleError(_0x225ba8,null));};exports[_0x1258('0x51')]=function(_0x14b5d5,_0x36fb1a){return db[_0x1258('0x35')][_0x1258('0x51')](_0x14b5d5[_0x1258('0x52')],{})[_0x1258('0x31')](function(_0x4dfc64){var _0x23fa79=_0x14b5d5[_0x1258('0x53')][_0x1258('0x2e')]({'plain':!![]});if(!_0x23fa79)throw new Error(_0x1258('0x54'));if(_0x23fa79['role']==='user'){var _0x4d40d2=_0x4dfc64[_0x1258('0x2e')]({'plain':!![]});var _0x33f0a8=_0x1258('0x2f');return db['UserProfileSection']['find']({'where':{'name':_0x33f0a8,'userProfileId':_0x23fa79['userProfileId']},'raw':!![]})['then'](function(_0x40f26a){if(_0x40f26a&&_0x40f26a[_0x1258('0x55')]===0x0){return db['UserProfileResource'][_0x1258('0x51')]({'name':_0x4d40d2[_0x1258('0x34')],'resourceId':_0x4d40d2['id'],'type':_0x40f26a[_0x1258('0x34')],'sectionId':_0x40f26a['id']},{})[_0x1258('0x31')](function(){return _0x4dfc64;});}else{return _0x4dfc64;}})[_0x1258('0x50')](function(_0x558033){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x558033);throw _0x558033;});}return _0x4dfc64;})[_0x1258('0x31')](respondWithResult(_0x36fb1a,0xc9))['catch'](handleError(_0x36fb1a,null));};exports['update']=function(_0x7dee7a,_0x2ca4fe){if(_0x7dee7a[_0x1258('0x52')]['id']){delete _0x7dee7a[_0x1258('0x52')]['id'];}return db[_0x1258('0x35')][_0x1258('0x56')]({'where':{'id':_0x7dee7a['params']['id']}})[_0x1258('0x31')](handleEntityNotFound(_0x2ca4fe,null))[_0x1258('0x31')](saveUpdates(_0x7dee7a['body'],null))['then'](respondWithResult(_0x2ca4fe,null))[_0x1258('0x50')](handleError(_0x2ca4fe,null));};exports[_0x1258('0x2d')]=function(_0x25843f,_0x337d09){return db[_0x1258('0x35')]['find']({'where':{'id':_0x25843f[_0x1258('0x4d')]['id']}})[_0x1258('0x31')](handleEntityNotFound(_0x337d09,null))[_0x1258('0x31')](removeEntity(_0x337d09,null))[_0x1258('0x50')](handleError(_0x337d09,null));};exports[_0x1258('0x57')]=function(_0x5b6f28,_0x3d6013){return db[_0x1258('0x35')][_0x1258('0x57')]()[_0x1258('0x31')](respondWithResult(_0x3d6013,null))['catch'](handleError(_0x3d6013,null));};exports['addDisposition']=function(_0x4180c1,_0x2adf0d,_0x25899a){if(_0x4180c1['body']['id']){delete _0x4180c1[_0x1258('0x52')]['id'];}return db['CmList'][_0x1258('0x56')]({'where':{'id':_0x4180c1[_0x1258('0x4d')]['id']}})[_0x1258('0x31')](handleEntityNotFound(_0x2adf0d,null))[_0x1258('0x31')](function(_0x497b78){if(_0x497b78){_0x4180c1[_0x1258('0x52')]['ListId']=_0x497b78['id'];return db['Disposition'][_0x1258('0x51')](_0x4180c1[_0x1258('0x52')]);}})[_0x1258('0x31')](respondWithResult(_0x2adf0d,null))[_0x1258('0x50')](handleError(_0x2adf0d,null));};exports[_0x1258('0x58')]=function(_0x1889f8,_0x116230,_0x4e6c44){var _0x11ba15={'raw':![],'where':{}};var _0x503d97={};var _0x22f1b3={'count':0x0,'rows':[]};return db[_0x1258('0x35')][_0x1258('0x59')]({'where':{'id':_0x1889f8[_0x1258('0x4d')]['id']}})[_0x1258('0x31')](handleEntityNotFound(_0x116230,null))[_0x1258('0x31')](function(_0x5e2c39){if(_0x5e2c39){_0x503d97[_0x1258('0x3a')]=_[_0x1258('0x4e')](db[_0x1258('0x5a')][_0x1258('0x36')]);_0x503d97[_0x1258('0x3c')]=_[_0x1258('0x4e')](_0x1889f8[_0x1258('0x3c')]);_0x503d97[_0x1258('0x3d')]=_[_0x1258('0x3e')](_0x503d97[_0x1258('0x3a')],_0x503d97[_0x1258('0x3c')]);_0x11ba15[_0x1258('0x40')]=_['intersection'](_0x503d97[_0x1258('0x3a')],qs['fields'](_0x1889f8[_0x1258('0x3c')]['fields']));_0x11ba15['attributes']=_0x11ba15[_0x1258('0x40')][_0x1258('0x4f')]?_0x11ba15['attributes']:_0x503d97[_0x1258('0x3a')];if(!_0x1889f8['query'][_0x1258('0x5b')](_0x1258('0x41'))){_0x11ba15['limit']=qs[_0x1258('0x26')](_0x1889f8[_0x1258('0x3c')][_0x1258('0x26')]);_0x11ba15[_0x1258('0x23')]=qs['offset'](_0x1889f8['query'][_0x1258('0x23')]);}_0x11ba15[_0x1258('0x42')]=qs[_0x1258('0x43')](_0x1889f8['query']['sort']);_0x11ba15[_0x1258('0x44')]=qs['filters'](_[_0x1258('0x45')](_0x1889f8['query'],_0x503d97[_0x1258('0x3d')]));_0x11ba15[_0x1258('0x44')]['ListId']=_0x5e2c39['id'];if(_0x1889f8[_0x1258('0x3c')][_0x1258('0x46')]){_0x11ba15[_0x1258('0x44')]=_['merge'](_0x11ba15['where'],{'$or':_[_0x1258('0x3b')](_0x11ba15[_0x1258('0x40')],function(_0x51902b){var _0x2e8e4d={};_0x2e8e4d[_0x51902b]={'$like':'%'+_0x1889f8[_0x1258('0x3c')][_0x1258('0x46')]+'%'};return _0x2e8e4d;})});}_0x11ba15=_['merge']({},_0x11ba15,_0x1889f8[_0x1258('0x49')]);return db[_0x1258('0x5a')][_0x1258('0x25')]({'where':_0x11ba15[_0x1258('0x44')]})[_0x1258('0x31')](function(_0x14b6ae){_0x22f1b3[_0x1258('0x25')]=_0x14b6ae;if(_0x1889f8[_0x1258('0x3c')]['includeAll']){_0x11ba15[_0x1258('0x5c')]=[{'all':!![]}];}return db[_0x1258('0x5a')][_0x1258('0x4b')](_0x11ba15);})[_0x1258('0x31')](function(_0x2356d7){_0x22f1b3[_0x1258('0x5d')]=_0x2356d7;return _0x22f1b3;});}})[_0x1258('0x31')](respondWithFilteredResult(_0x116230,_0x11ba15))['catch'](handleError(_0x116230,null));};exports[_0x1258('0x5e')]=function(_0x410c53,_0x343e3c,_0xc694f3){return db[_0x1258('0x35')]['find']({'where':{'id':_0x410c53['params']['id']}})[_0x1258('0x31')](handleEntityNotFound(_0x343e3c,null))[_0x1258('0x31')](function(_0x50c2c3){if(_0x50c2c3){return _0x50c2c3[_0x1258('0x5e')](_0x410c53[_0x1258('0x3c')][_0x1258('0x5f')]);}})['then'](respondWithStatusCode(_0x343e3c,null))[_0x1258('0x50')](handleError(_0x343e3c,null));};exports['addContacts']=function(_0x51ed13,_0x3fc0f4,_0x2ae89f){return db[_0x1258('0x35')][_0x1258('0x56')]({'where':{'id':_0x51ed13[_0x1258('0x4d')]['id']}})['then'](handleEntityNotFound(_0x3fc0f4,null))[_0x1258('0x31')](function(_0x169f8e){if(_0x169f8e){var _0x170b89=[];var _0x13e0e4={'success':[],'errors':[]};return db[_0x1258('0x60')]['describe']()[_0x1258('0x31')](function(_0xf0b012){if(_0x51ed13['body'][_0x1258('0x61')]&&_[_0x1258('0x62')](_0x51ed13[_0x1258('0x52')][_0x1258('0x61')])){if(_0x51ed13[_0x1258('0x52')][_0x1258('0x61')]['length']){_0x51ed13['body'][_0x1258('0x61')]=_0x51ed13['body'][_0x1258('0x61')][_0x1258('0x63')](';')+';';}else{_0x51ed13['body'][_0x1258('0x61')]=null;}}else{_0x51ed13['body']['tags']=null;}if(_0x51ed13['body']&&_[_0x1258('0x62')](_0x51ed13['body'])){for(var _0x120c78=0x0;_0x120c78<_0x51ed13['body'][_0x1258('0x4f')];_0x120c78+=0x1){_0x51ed13['body'][_0x120c78]['ListId']=_0x51ed13[_0x1258('0x4d')]['id'];_0x170b89['push'](_0x51ed13[_0x1258('0x52')][_0x120c78]);}return BPromise[_0x1258('0x64')](_0x170b89,function(_0x344ba1){return db['CmContact']['create'](_[_0x1258('0x65')](_0x344ba1,[_0x1258('0x5f'),'id'])||{},{'fields':_[_0x1258('0x4e')](_0xf0b012),'raw':!![]})['then'](function(_0x1d997d){_0x13e0e4[_0x1258('0x66')][_0x1258('0x67')](_0x1d997d['dataValues']);})['catch'](function(_0x29870){_0x13e0e4[_0x1258('0x68')][_0x1258('0x67')]({'data':_0x344ba1,'error':_0x29870[_0x1258('0x69')]});});})[_0x1258('0x31')](function(_0x43aa93){return _0x13e0e4;})['catch'](function(_0x3461a7){return _0x3461a7;});}else{_0x3fc0f4[_0x1258('0x21')](0x190)[_0x1258('0x29')]({'message':_0x1258('0x6a')});}});}})[_0x1258('0x31')](respondWithResult(_0x3fc0f4,null))[_0x1258('0x50')](handleError(_0x3fc0f4,null));};exports[_0x1258('0x6b')]=function(_0x42fdca,_0x28e9e5,_0x492af2){var _0x47df4f;return db[_0x1258('0x35')][_0x1258('0x56')]({'where':{'id':_0x42fdca[_0x1258('0x4d')]['id']},'include':[{'model':db[_0x1258('0x6c')],'as':_0x1258('0x6d')}]})[_0x1258('0x31')](handleEntityNotFound(_0x28e9e5,null))['then'](function(_0x21ad4e){if(_0x21ad4e){_0x47df4f=_0x21ad4e;return db[_0x1258('0x60')]['rawAttributes'];}})[_0x1258('0x31')](function(_0x4749f8){if(_0x4749f8){var _0x44613f={};var _0x1631aa={};_0x1631aa[_0x1258('0x3a')]=_[_0x1258('0x6e')](_[_0x1258('0x4e')](_0x4749f8),_['map'](_0x47df4f[_0x1258('0x6d')],function(_0x1929bc){return util[_0x1258('0x6f')](_0x1258('0x70'),_0x1929bc['id']);}));_0x1631aa[_0x1258('0x3c')]=_[_0x1258('0x4e')](_0x42fdca[_0x1258('0x3c')]);_0x1631aa[_0x1258('0x3d')]=_[_0x1258('0x3e')](_0x1631aa['model'],_0x1631aa['query']);_0x44613f['attributes']=_[_0x1258('0x3e')](_0x1631aa[_0x1258('0x3a')],qs[_0x1258('0x3f')](_0x42fdca[_0x1258('0x3c')][_0x1258('0x3f')]));_0x44613f['attributes']=_0x44613f[_0x1258('0x40')][_0x1258('0x4f')]?_0x44613f[_0x1258('0x40')]:_0x1631aa[_0x1258('0x3a')];if(!_0x42fdca['query'][_0x1258('0x5b')]('nolimit')){_0x44613f[_0x1258('0x26')]=qs[_0x1258('0x26')](_0x42fdca[_0x1258('0x3c')][_0x1258('0x26')]);_0x44613f[_0x1258('0x23')]=qs[_0x1258('0x23')](_0x42fdca[_0x1258('0x3c')][_0x1258('0x23')]);}_0x44613f[_0x1258('0x42')]=qs['sort'](_0x42fdca[_0x1258('0x3c')][_0x1258('0x43')]);_0x44613f['where']=qs['filters'](_[_0x1258('0x45')](_0x42fdca[_0x1258('0x3c')],_0x1631aa[_0x1258('0x3d')]));_0x44613f[_0x1258('0x71')]=!![];if(_0x42fdca['query'][_0x1258('0x46')]){_0x44613f[_0x1258('0x44')]=_[_0x1258('0x47')](_0x44613f[_0x1258('0x44')],{'$or':_['map'](_0x44613f[_0x1258('0x40')],function(_0x40ae20){var _0x1664da={};_0x1664da[_0x40ae20]={'$like':'%'+_0x42fdca[_0x1258('0x3c')]['filter']+'%'};return _0x1664da;})});}_0x44613f=_[_0x1258('0x47')]({},_0x44613f,_0x42fdca[_0x1258('0x49')]);return _0x47df4f['getContacts'](_0x44613f);}})[_0x1258('0x31')](respondWithResult(_0x28e9e5,null))['catch'](handleError(_0x28e9e5,null));};exports[_0x1258('0x72')]=function(_0x3e31aa,_0x2ef643,_0x2d196e){var _0x2e4e26;return db[_0x1258('0x35')]['find']({'where':{'id':_0x3e31aa['params']['id']},'include':[{'model':db[_0x1258('0x6c')],'as':_0x1258('0x6d')}]})[_0x1258('0x31')](handleEntityNotFound(_0x2ef643,null))[_0x1258('0x31')](function(_0x10ba2b){if(_0x10ba2b){_0x2e4e26=_0x10ba2b;return db['CmContact']['rawAttributes'];}})[_0x1258('0x31')](function(_0x30a15d){if(_0x30a15d){var _0x32e759={};var _0x3edfd7={};_0x3edfd7['model']=_[_0x1258('0x6e')](_[_0x1258('0x4e')](_0x30a15d),_[_0x1258('0x3b')](_0x2e4e26[_0x1258('0x6d')],function(_0x158141){return util[_0x1258('0x6f')](_0x1258('0x70'),_0x158141['id']);}));_0x3edfd7[_0x1258('0x3c')]=_[_0x1258('0x4e')](_0x3e31aa[_0x1258('0x3c')]);_0x3edfd7[_0x1258('0x3d')]=_[_0x1258('0x3e')](_0x3edfd7[_0x1258('0x3a')],_0x3edfd7[_0x1258('0x3c')]);_0x32e759[_0x1258('0x40')]=_[_0x1258('0x3e')](_0x3edfd7['model'],qs[_0x1258('0x3f')](_0x3e31aa[_0x1258('0x3c')][_0x1258('0x3f')]));_0x32e759[_0x1258('0x40')]=_0x32e759[_0x1258('0x40')][_0x1258('0x4f')]?_0x32e759['attributes']:_0x3edfd7[_0x1258('0x3a')];if(!_0x3e31aa[_0x1258('0x3c')][_0x1258('0x5b')](_0x1258('0x41'))){_0x32e759[_0x1258('0x26')]=qs[_0x1258('0x26')](_0x3e31aa[_0x1258('0x3c')][_0x1258('0x26')]);_0x32e759['offset']=qs['offset'](_0x3e31aa[_0x1258('0x3c')][_0x1258('0x23')]);}_0x32e759[_0x1258('0x42')]=qs[_0x1258('0x43')](_0x3e31aa['query'][_0x1258('0x43')]);_0x32e759[_0x1258('0x44')]=qs[_0x1258('0x3d')](_[_0x1258('0x45')](_0x3e31aa[_0x1258('0x3c')],_0x3edfd7[_0x1258('0x3d')]));_0x32e759[_0x1258('0x71')]=!![];if(_0x3e31aa[_0x1258('0x3c')][_0x1258('0x46')]){_0x32e759[_0x1258('0x44')]=_[_0x1258('0x47')](_0x32e759['where'],{'$or':_[_0x1258('0x3b')](_0x32e759[_0x1258('0x40')],function(_0x24af2f){var _0x50d931={};_0x50d931[_0x24af2f]={'$like':'%'+_0x3e31aa[_0x1258('0x3c')][_0x1258('0x46')]+'%'};return _0x50d931;})});}_0x32e759=_[_0x1258('0x47')]({},_0x32e759,_0x3e31aa[_0x1258('0x49')]);return _0x2e4e26[_0x1258('0x6b')](_0x32e759);}})[_0x1258('0x31')](function(_0x306148){if(!_['isEmpty'](_0x306148)){var _0x21584f=toCsv(_0x306148);var _0x2a26c6=Date[_0x1258('0x73')]();fs[_0x1258('0x74')](util[_0x1258('0x6f')]('/tmp/list_%d_%s.csv',_0x2e4e26['id'],_0x2a26c6),_0x21584f);_0x2ef643[_0x1258('0x75')]('Content-disposition',_0x1258('0x76')+util[_0x1258('0x6f')](_0x1258('0x77'),_0x2e4e26['id'],_0x2a26c6));_0x2ef643[_0x1258('0x75')]('Content-type','text/csv');return _0x2ef643['download'](util['format']('/tmp/list_%d_%s.csv',_0x2e4e26['id'],_0x2a26c6));}else{return _0x2ef643[_0x1258('0x78')](0xcc);}})[_0x1258('0x50')](handleError(_0x2ef643,null));};exports[_0x1258('0x79')]=function(_0x5e52b3,_0x509963,_0x32a1e3){var _0x171bab;delete _0x5e52b3[_0x1258('0x52')]['id'];return db['CmList']['findOne']({'where':{'id':_0x5e52b3['params']['id']}})[_0x1258('0x31')](handleEntityNotFound(_0x509963,null))[_0x1258('0x31')](function(_0x4d2662){if(_0x4d2662){return db['sequelize'][_0x1258('0x7a')](function(_0xd3157c){return db[_0x1258('0x6c')]['create'](_0x5e52b3[_0x1258('0x52')],{'transaction':_0xd3157c})[_0x1258('0x31')](function(_0x1cb9e7){_0x171bab=_0x1cb9e7;return _0x4d2662[_0x1258('0x7b')](_0x1cb9e7,{'transaction':_0xd3157c});})[_0x1258('0x31')](function(){var _0x1660cf={'type':db[_0x1258('0x7c')][_0x1258('0x7d')],'transaction':_0xd3157c};switch(_0x5e52b3[_0x1258('0x52')][_0x1258('0x38')]){case _0x1258('0x7e'):_0x1660cf[_0x1258('0x38')]=db[_0x1258('0x7c')][_0x1258('0x7d')];break;case _0x1258('0x7f'):_0x1660cf[_0x1258('0x38')]=db[_0x1258('0x7c')][_0x1258('0x80')];break;case _0x1258('0x81'):_0x1660cf[_0x1258('0x38')]=db['Sequelize'][_0x1258('0x82')];_0x1660cf[_0x1258('0x83')]=![];break;default:}return db[_0x1258('0x84')][_0x1258('0x85')]['addColumn']('cm_contacts',util[_0x1258('0x6f')](_0x1258('0x86'),_0x171bab['id']),_0x1660cf);})[_0x1258('0x31')](function(){return _0x171bab;});});}})['then'](respondWithResult(_0x509963,null))[_0x1258('0x50')](handleError(_0x509963,null));};exports[_0x1258('0x87')]=function(_0x59bc4a,_0xc7ed65,_0x1823a8){var _0x7630f4={};var _0x5e2aeb={};var _0x479888;var _0x247a1d;return db[_0x1258('0x35')]['findOne']({'where':{'id':_0x59bc4a[_0x1258('0x4d')]['id']}})[_0x1258('0x31')](handleEntityNotFound(_0xc7ed65,null))['then'](function(_0x152123){if(_0x152123){_0x479888=_0x152123;_0x5e2aeb[_0x1258('0x3a')]=_['keys'](db[_0x1258('0x6c')][_0x1258('0x36')]);_0x5e2aeb[_0x1258('0x3c')]=_['keys'](_0x59bc4a[_0x1258('0x3c')]);_0x5e2aeb[_0x1258('0x3d')]=_['intersection'](_0x5e2aeb['model'],_0x5e2aeb[_0x1258('0x3c')]);_0x7630f4['attributes']=_[_0x1258('0x3e')](_0x5e2aeb[_0x1258('0x3a')],qs[_0x1258('0x3f')](_0x59bc4a[_0x1258('0x3c')]['fields']));_0x7630f4[_0x1258('0x40')]=_0x7630f4[_0x1258('0x40')]['length']?_0x7630f4[_0x1258('0x40')]:_0x5e2aeb[_0x1258('0x3a')];_0x7630f4['order']=qs[_0x1258('0x43')](_0x59bc4a[_0x1258('0x3c')]['sort']);_0x7630f4[_0x1258('0x44')]=qs['filters'](_['pick'](_0x59bc4a['query'],_0x5e2aeb['filters']));_0x7630f4['where']=_[_0x1258('0x47')](_0x7630f4[_0x1258('0x44')],{'$or':[{'ListId':_0x152123['id']},{'ListId':null}]});if(_0x59bc4a['query'][_0x1258('0x46')]){_0x7630f4[_0x1258('0x44')]=_[_0x1258('0x47')](_0x7630f4[_0x1258('0x44')],{'$or':_['map'](_0x7630f4[_0x1258('0x40')],function(_0x7b8eb0){var _0x296497={};_0x296497[_0x7b8eb0]={'$like':'%'+_0x59bc4a['query']['filter']+'%'};return _0x296497;})});}_0x7630f4=_[_0x1258('0x47')]({},_0x7630f4,_0x59bc4a[_0x1258('0x49')]);return db[_0x1258('0x6c')]['findAndCountAll'](_0x7630f4);}})['then'](respondWithResult(_0xc7ed65,null))[_0x1258('0x50')](handleError(_0xc7ed65,null));};exports['addAgents']=function(_0x30f11a,_0x55faa9,_0xde0356){return db['CmList'][_0x1258('0x56')]({'where':{'id':_0x30f11a[_0x1258('0x4d')]['id']}})[_0x1258('0x31')](handleEntityNotFound(_0x55faa9,null))[_0x1258('0x31')](function(_0x537150){if(_0x537150){return _0x537150[_0x1258('0x88')](_0x30f11a['body'][_0x1258('0x5f')],_['omit'](_0x30f11a['body'],['ids','id'])||{})[_0x1258('0x89')](function(_0x222cec){for(var _0x35b67b=0x0;_0x35b67b<_0x30f11a['body'][_0x1258('0x5f')][_0x1258('0x4f')];_0x35b67b+=0x1){socket[_0x1258('0x8a')]('userCmList:save',{'UserId':_0x30f11a['body'][_0x1258('0x5f')][_0x35b67b],'CmListId':_0x30f11a['params']['id']});}return _0x222cec;});}})[_0x1258('0x31')](respondWithResult(_0x55faa9,null))[_0x1258('0x50')](handleError(_0x55faa9,null));};exports[_0x1258('0x8b')]=function(_0x2f5dbb,_0x13bf25,_0x22516b){return db[_0x1258('0x35')][_0x1258('0x56')]({'where':{'id':_0x2f5dbb['params']['id']}})[_0x1258('0x31')](handleEntityNotFound(_0x13bf25,null))[_0x1258('0x31')](function(_0x1a9872){if(_0x1a9872){return _0x1a9872[_0x1258('0x8b')](_0x2f5dbb[_0x1258('0x3c')][_0x1258('0x5f')])['then'](function(){if(_[_0x1258('0x62')](_0x2f5dbb[_0x1258('0x3c')][_0x1258('0x5f')])){for(var _0x5e05ad=0x0;_0x5e05ad<_0x2f5dbb['query']['ids'][_0x1258('0x4f')];_0x5e05ad+=0x1){socket[_0x1258('0x8a')]('userCmList:remove',{'UserId':Number(_0x2f5dbb['query'][_0x1258('0x5f')][_0x5e05ad]),'CmListId':Number(_0x2f5dbb['params']['id'])});}}else{socket['emit'](_0x1258('0x8c'),{'UserId':Number(_0x2f5dbb[_0x1258('0x3c')]['ids']),'CmListId':Number(_0x2f5dbb[_0x1258('0x4d')]['id'])});}});}})[_0x1258('0x31')](respondWithStatusCode(_0x13bf25,null))[_0x1258('0x50')](handleError(_0x13bf25,null));};exports['getAgents']=function(_0x1be09e,_0x4c7785,_0x51e721){var _0x48c7ae={};var _0xbd2fa={};var _0x1cf104;var _0x46657e;return db[_0x1258('0x35')]['findOne']({'where':{'id':_0x1be09e[_0x1258('0x4d')]['id']}})[_0x1258('0x31')](handleEntityNotFound(_0x4c7785,null))[_0x1258('0x31')](function(_0x1bcde9){if(_0x1bcde9){_0x1cf104=_0x1bcde9;_0xbd2fa[_0x1258('0x3a')]=_[_0x1258('0x4e')](db[_0x1258('0x8d')][_0x1258('0x36')]);_0xbd2fa[_0x1258('0x3c')]=_[_0x1258('0x4e')](_0x1be09e['query']);_0xbd2fa[_0x1258('0x3d')]=_['intersection'](_0xbd2fa['model'],_0xbd2fa['query']);_0x48c7ae[_0x1258('0x40')]=_[_0x1258('0x3e')](_0xbd2fa[_0x1258('0x3a')],qs[_0x1258('0x3f')](_0x1be09e[_0x1258('0x3c')][_0x1258('0x3f')]));_0x48c7ae[_0x1258('0x40')]=_0x48c7ae[_0x1258('0x40')][_0x1258('0x4f')]?_0x48c7ae['attributes']:_0xbd2fa[_0x1258('0x3a')];_0x48c7ae[_0x1258('0x42')]=qs[_0x1258('0x43')](_0x1be09e[_0x1258('0x3c')][_0x1258('0x43')]);_0x48c7ae[_0x1258('0x44')]=qs[_0x1258('0x3d')](_[_0x1258('0x45')](_0x1be09e['query'],_0xbd2fa[_0x1258('0x3d')]));if(_0x1be09e[_0x1258('0x3c')][_0x1258('0x46')]){_0x48c7ae[_0x1258('0x44')]=_[_0x1258('0x47')](_0x48c7ae['where'],{'$or':_[_0x1258('0x3b')](_0x48c7ae[_0x1258('0x40')],function(_0x52b742){var _0x5cf279={};_0x5cf279[_0x52b742]={'$like':'%'+_0x1be09e[_0x1258('0x3c')]['filter']+'%'};return _0x5cf279;})});}_0x48c7ae=_['merge']({},_0x48c7ae,_0x1be09e[_0x1258('0x49')]);return _0x1cf104[_0x1258('0x8e')](_0x48c7ae);}})[_0x1258('0x31')](function(_0x34996f){if(_0x34996f){_0x46657e=_0x34996f[_0x1258('0x4f')];if(!_0x1be09e['query']['hasOwnProperty']('nolimit')){_0x48c7ae['limit']=qs[_0x1258('0x26')](_0x1be09e['query']['limit']);_0x48c7ae[_0x1258('0x23')]=qs[_0x1258('0x23')](_0x1be09e['query'][_0x1258('0x23')]);}return _0x1cf104[_0x1258('0x8e')](_0x48c7ae);}})['then'](function(_0x27ed73){if(_0x27ed73){return _0x27ed73?{'count':_0x46657e,'rows':_0x27ed73}:null;}})[_0x1258('0x31')](respondWithResult(_0x4c7785,null))[_0x1258('0x50')](handleError(_0x4c7785,null));}; \ No newline at end of file diff --git a/server/api/cmList/cmList.events.js b/server/api/cmList/cmList.events.js index 3d92ee3..b7d728a 100644 --- a/server/api/cmList/cmList.events.js +++ b/server/api/cmList/cmList.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9957=['setMaxListeners','update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','CmList'];(function(_0x2ed12d,_0x224a0a){var _0x4a84f1=function(_0x293cf1){while(--_0x293cf1){_0x2ed12d['push'](_0x2ed12d['shift']());}};_0x4a84f1(++_0x224a0a);}(_0x9957,0x93));var _0x7995=function(_0x5b644e,_0x2e5e07){_0x5b644e=_0x5b644e-0x0;var _0x49c6bf=_0x9957[_0x5b644e];return _0x49c6bf;};'use strict';var EventEmitter=require(_0x7995('0x0'));var CmList=require(_0x7995('0x1'))['db'][_0x7995('0x2')];var CmListEvents=new EventEmitter();CmListEvents[_0x7995('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x7995('0x4'),'afterDestroy':_0x7995('0x5')};function emitEvent(_0x1902b4){return function(_0x462a03,_0x576d89,_0x744bea){CmListEvents[_0x7995('0x6')](_0x1902b4+':'+_0x462a03['id'],_0x462a03);CmListEvents[_0x7995('0x6')](_0x1902b4,_0x462a03);_0x744bea(null);};}for(var e in events){if(events[_0x7995('0x7')](e)){var event=events[e];CmList[_0x7995('0x8')](e,emitEvent(event));}}module[_0x7995('0x9')]=CmListEvents; \ No newline at end of file +var _0x5fc3=['events','../../mysqldb','setMaxListeners','save','update','remove','emit','hook'];(function(_0x912d27,_0x28e0e3){var _0x31b918=function(_0x1882f7){while(--_0x1882f7){_0x912d27['push'](_0x912d27['shift']());}};_0x31b918(++_0x28e0e3);}(_0x5fc3,0xa8));var _0x35fc=function(_0x5400b,_0x55943a){_0x5400b=_0x5400b-0x0;var _0x36a39b=_0x5fc3[_0x5400b];return _0x36a39b;};'use strict';var EventEmitter=require(_0x35fc('0x0'));var CmList=require(_0x35fc('0x1'))['db']['CmList'];var CmListEvents=new EventEmitter();CmListEvents[_0x35fc('0x2')](0x0);var events={'afterCreate':_0x35fc('0x3'),'afterUpdate':_0x35fc('0x4'),'afterDestroy':_0x35fc('0x5')};function emitEvent(_0xb4f9ce){return function(_0x5e75e6,_0x2d1404,_0x1d5fec){CmListEvents[_0x35fc('0x6')](_0xb4f9ce+':'+_0x5e75e6['id'],_0x5e75e6);CmListEvents['emit'](_0xb4f9ce,_0x5e75e6);_0x1d5fec(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];CmList[_0x35fc('0x7')](e,emitEvent(event));}}module['exports']=CmListEvents; \ No newline at end of file diff --git a/server/api/cmList/cmList.model.js b/server/api/cmList/cmList.model.js index 224b247..374aee1 100644 --- a/server/api/cmList/cmList.model.js +++ b/server/api/cmList/cmList.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xaa88=['util','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','./cmList.attributes','CmList','cm_lists','lodash'];(function(_0x55b1f5,_0x450e6d){var _0x1557d4=function(_0x114154){while(--_0x114154){_0x55b1f5['push'](_0x55b1f5['shift']());}};_0x1557d4(++_0x450e6d);}(_0xaa88,0x137));var _0x8aa8=function(_0x25e109,_0x6ab24c){_0x25e109=_0x25e109-0x0;var _0xc0f7d6=_0xaa88[_0x25e109];return _0xc0f7d6;};'use strict';var _=require(_0x8aa8('0x0'));var util=require(_0x8aa8('0x1'));var logger=require(_0x8aa8('0x2'))(_0x8aa8('0x3'));var moment=require('moment');var BPromise=require(_0x8aa8('0x4'));var rp=require(_0x8aa8('0x5'));var fs=require('fs');var path=require(_0x8aa8('0x6'));var rimraf=require(_0x8aa8('0x7'));var config=require(_0x8aa8('0x8'));var attributes=require(_0x8aa8('0x9'));module['exports']=function(_0x5bda0d,_0x460042){return _0x5bda0d['define'](_0x8aa8('0xa'),attributes,{'tableName':_0x8aa8('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x22fb=['define','CmList','../../config/logger','moment','bluebird','request-promise','path','rimraf','./cmList.attributes','exports'];(function(_0x1efdec,_0x55695a){var _0x14ecb1=function(_0x534974){while(--_0x534974){_0x1efdec['push'](_0x1efdec['shift']());}};_0x14ecb1(++_0x55695a);}(_0x22fb,0x192));var _0xb22f=function(_0x1562e5,_0x47cd62){_0x1562e5=_0x1562e5-0x0;var _0x3ff235=_0x22fb[_0x1562e5];return _0x3ff235;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xb22f('0x0'))('api');var moment=require(_0xb22f('0x1'));var BPromise=require(_0xb22f('0x2'));var rp=require(_0xb22f('0x3'));var fs=require('fs');var path=require(_0xb22f('0x4'));var rimraf=require(_0xb22f('0x5'));var config=require('../../config/environment');var attributes=require(_0xb22f('0x6'));module[_0xb22f('0x7')]=function(_0x2d1fb3,_0xc3ffcc){return _0x2d1fb3[_0xb22f('0x8')](_0xb22f('0x9'),attributes,{'tableName':'cm_lists','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/cmList/cmList.rpc.js b/server/api/cmList/cmList.rpc.js index c9a7fb9..a3d8520 100644 --- a/server/api/cmList/cmList.rpc.js +++ b/server/api/cmList/cmList.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb2d5=['CmList,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./cmList.socket','register','request','info','CmList,\x20%s,\x20%s','request\x20sent'];(function(_0x451a1b,_0x4454c2){var _0xd6b180=function(_0x289556){while(--_0x289556){_0x451a1b['push'](_0x451a1b['shift']());}};_0xd6b180(++_0x4454c2);}(_0xb2d5,0x1e2));var _0x5b2d=function(_0x50b45b,_0x3544d9){_0x50b45b=_0x50b45b-0x0;var _0xe358e0=_0xb2d5[_0x50b45b];return _0xe358e0;};'use strict';var _=require(_0x5b2d('0x0'));var util=require(_0x5b2d('0x1'));var moment=require(_0x5b2d('0x2'));var BPromise=require(_0x5b2d('0x3'));var rs=require(_0x5b2d('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x5b2d('0x5'))['db'];var utils=require(_0x5b2d('0x6'));var logger=require(_0x5b2d('0x7'))('rpc');var config=require(_0x5b2d('0x8'));var jayson=require(_0x5b2d('0x9'));var client=jayson[_0x5b2d('0xa')][_0x5b2d('0xb')]({'port':0x232a});config[_0x5b2d('0xc')]=_[_0x5b2d('0xd')](config[_0x5b2d('0xc')],{'host':_0x5b2d('0xe'),'port':0x18eb});var socket=require(_0x5b2d('0xf'))(new Redis(config['redis']));require(_0x5b2d('0x10'))[_0x5b2d('0x11')](socket);function respondWithRpcPromise(_0xce4cc,_0x5f2b7,_0x357aa8){return new BPromise(function(_0x1745fb,_0x4f4e12){return client[_0x5b2d('0x12')](_0xce4cc,_0x357aa8)['then'](function(_0x4b7ff4){logger[_0x5b2d('0x13')](_0x5b2d('0x14'),_0x5f2b7,_0x5b2d('0x15'));logger['debug'](_0x5b2d('0x16'),_0x5f2b7,_0x5b2d('0x15'),JSON[_0x5b2d('0x17')](_0x4b7ff4));if(_0x4b7ff4[_0x5b2d('0x18')]){if(_0x4b7ff4[_0x5b2d('0x18')][_0x5b2d('0x19')]===0x1f4){logger['error']('CmList,\x20%s,\x20%s',_0x5f2b7,_0x4b7ff4[_0x5b2d('0x18')][_0x5b2d('0x1a')]);return _0x4f4e12(_0x4b7ff4[_0x5b2d('0x18')][_0x5b2d('0x1a')]);}logger[_0x5b2d('0x18')](_0x5b2d('0x14'),_0x5f2b7,_0x4b7ff4['error']['message']);return _0x1745fb(_0x4b7ff4[_0x5b2d('0x18')][_0x5b2d('0x1a')]);}else{logger[_0x5b2d('0x13')](_0x5b2d('0x14'),_0x5f2b7,_0x5b2d('0x15'));_0x1745fb(_0x4b7ff4[_0x5b2d('0x1b')]['message']);}})['catch'](function(_0x22673f){logger[_0x5b2d('0x18')]('CmList,\x20%s,\x20%s',_0x5f2b7,_0x22673f);_0x4f4e12(_0x22673f);});});} \ No newline at end of file +var _0xb6bb=['defaults','localhost','register','request','info','CmList,\x20%s,\x20%s','debug','CmList,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','util','moment','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','redis'];(function(_0x53bad5,_0x278914){var _0x231dc8=function(_0x18468a){while(--_0x18468a){_0x53bad5['push'](_0x53bad5['shift']());}};_0x231dc8(++_0x278914);}(_0xb6bb,0x147));var _0xbb6b=function(_0x1ecf36,_0x5a0f9e){_0x1ecf36=_0x1ecf36-0x0;var _0x481d5a=_0xb6bb[_0x1ecf36];return _0x481d5a;};'use strict';var _=require('lodash');var util=require(_0xbb6b('0x0'));var moment=require(_0xbb6b('0x1'));var BPromise=require('bluebird');var rs=require(_0xbb6b('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xbb6b('0x3'))['db'];var utils=require(_0xbb6b('0x4'));var logger=require('../../config/logger')(_0xbb6b('0x5'));var config=require(_0xbb6b('0x6'));var jayson=require(_0xbb6b('0x7'));var client=jayson[_0xbb6b('0x8')][_0xbb6b('0x9')]({'port':0x232a});config[_0xbb6b('0xa')]=_[_0xbb6b('0xb')](config[_0xbb6b('0xa')],{'host':_0xbb6b('0xc'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require('./cmList.socket')[_0xbb6b('0xd')](socket);function respondWithRpcPromise(_0x3851b8,_0x348148,_0x17df74){return new BPromise(function(_0x482722,_0x1a8cb6){return client[_0xbb6b('0xe')](_0x3851b8,_0x17df74)['then'](function(_0x570779){logger[_0xbb6b('0xf')](_0xbb6b('0x10'),_0x348148,'request\x20sent');logger[_0xbb6b('0x11')](_0xbb6b('0x12'),_0x348148,_0xbb6b('0x13'),JSON[_0xbb6b('0x14')](_0x570779));if(_0x570779[_0xbb6b('0x15')]){if(_0x570779[_0xbb6b('0x15')][_0xbb6b('0x16')]===0x1f4){logger['error'](_0xbb6b('0x10'),_0x348148,_0x570779[_0xbb6b('0x15')][_0xbb6b('0x17')]);return _0x1a8cb6(_0x570779[_0xbb6b('0x15')][_0xbb6b('0x17')]);}logger[_0xbb6b('0x15')](_0xbb6b('0x10'),_0x348148,_0x570779[_0xbb6b('0x15')][_0xbb6b('0x17')]);return _0x482722(_0x570779[_0xbb6b('0x15')]['message']);}else{logger[_0xbb6b('0xf')](_0xbb6b('0x10'),_0x348148,_0xbb6b('0x13'));_0x482722(_0x570779[_0xbb6b('0x18')]['message']);}})[_0xbb6b('0x19')](function(_0x3d4751){logger[_0xbb6b('0x15')](_0xbb6b('0x10'),_0x348148,_0x3d4751);_0x1a8cb6(_0x3d4751);});});} \ No newline at end of file diff --git a/server/api/cmList/cmList.socket.js b/server/api/cmList/cmList.socket.js index d5bd063..1934f92 100644 --- a/server/api/cmList/cmList.socket.js +++ b/server/api/cmList/cmList.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5e39=['remove','removeListener','register','length','cmList:','./cmList.events','save'];(function(_0x934425,_0x5af72f){var _0x31d596=function(_0x219869){while(--_0x219869){_0x934425['push'](_0x934425['shift']());}};_0x31d596(++_0x5af72f);}(_0x5e39,0xbb));var _0x95e3=function(_0x4adbc5,_0x1d5272){_0x4adbc5=_0x4adbc5-0x0;var _0x1a153e=_0x5e39[_0x4adbc5];return _0x1a153e;};'use strict';var CmListEvents=require(_0x95e3('0x0'));var events=[_0x95e3('0x1'),_0x95e3('0x2'),'update'];function createListener(_0x10937c,_0x19bfb4){return function(_0xedce62){_0x19bfb4['emit'](_0x10937c,_0xedce62);};}function removeListener(_0x3e0153,_0x258f49){return function(){CmListEvents[_0x95e3('0x3')](_0x3e0153,_0x258f49);};}exports[_0x95e3('0x4')]=function(_0x4610ec){for(var _0x1c1231=0x0,_0x17eabd=events[_0x95e3('0x5')];_0x1c1231<_0x17eabd;_0x1c1231++){var _0x188355=events[_0x1c1231];var _0x48a7af=createListener(_0x95e3('0x6')+_0x188355,_0x4610ec);CmListEvents['on'](_0x188355,_0x48a7af);}}; \ No newline at end of file +var _0x1f06=['emit','removeListener','register','length','cmList:'];(function(_0x54589c,_0x5ce31c){var _0x10e4d4=function(_0x25ef75){while(--_0x25ef75){_0x54589c['push'](_0x54589c['shift']());}};_0x10e4d4(++_0x5ce31c);}(_0x1f06,0x9b));var _0x61f0=function(_0x3da9c0,_0x19821f){_0x3da9c0=_0x3da9c0-0x0;var _0x22b8a2=_0x1f06[_0x3da9c0];return _0x22b8a2;};'use strict';var CmListEvents=require('./cmList.events');var events=['save','remove','update'];function createListener(_0x428c91,_0x152e05){return function(_0xcdd1e2){_0x152e05[_0x61f0('0x0')](_0x428c91,_0xcdd1e2);};}function removeListener(_0x38dd1c,_0x522052){return function(){CmListEvents[_0x61f0('0x1')](_0x38dd1c,_0x522052);};}exports[_0x61f0('0x2')]=function(_0xa112c2){for(var _0x2b180d=0x0,_0x1e5600=events[_0x61f0('0x3')];_0x2b180d<_0x1e5600;_0x2b180d++){var _0x269eb2=events[_0x2b180d];var _0x31d293=createListener(_0x61f0('0x4')+_0x269eb2,_0xa112c2);CmListEvents['on'](_0x269eb2,_0x31d293);}}; \ No newline at end of file diff --git a/server/api/cmList/index.js b/server/api/cmList/index.js index 8a0cceb..c3d0893 100644 --- a/server/api/cmList/index.js +++ b/server/api/cmList/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x81ae=['./cmList.controller','get','isAuthenticated','index','describe','/:id','/:id/contacts','getContacts','/:id/contacts/csv','getContactsCsv','/:id/fields','getCustomFields','/:id/users','getAgents','post','create','/:id/dispositions','addDisposition','addCustomField','addAgents','put','update','destroy','delete','removeDispositions','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment'];(function(_0x5450dd,_0x535755){var _0x42e364=function(_0x36a2bc){while(--_0x36a2bc){_0x5450dd['push'](_0x5450dd['shift']());}};_0x42e364(++_0x535755);}(_0x81ae,0x19b));var _0xe81a=function(_0x3bf83f,_0x181cac){_0x3bf83f=_0x3bf83f-0x0;var _0x22c4a9=_0x81ae[_0x3bf83f];return _0x22c4a9;};'use strict';var multer=require(_0xe81a('0x0'));var util=require(_0xe81a('0x1'));var path=require(_0xe81a('0x2'));var timeout=require(_0xe81a('0x3'));var express=require(_0xe81a('0x4'));var router=express[_0xe81a('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0xe81a('0x6'));var interaction=require(_0xe81a('0x7'));var config=require(_0xe81a('0x8'));var controller=require(_0xe81a('0x9'));router[_0xe81a('0xa')]('/',auth[_0xe81a('0xb')](),controller[_0xe81a('0xc')]);router[_0xe81a('0xa')]('/describe',auth[_0xe81a('0xb')](),controller[_0xe81a('0xd')]);router[_0xe81a('0xa')](_0xe81a('0xe'),auth['isAuthenticated'](),controller['show']);router[_0xe81a('0xa')]('/:id/dispositions',auth[_0xe81a('0xb')](),controller['getDispositions']);router[_0xe81a('0xa')](_0xe81a('0xf'),auth[_0xe81a('0xb')](),controller[_0xe81a('0x10')]);router[_0xe81a('0xa')](_0xe81a('0x11'),auth[_0xe81a('0xb')](),controller[_0xe81a('0x12')]);router[_0xe81a('0xa')](_0xe81a('0x13'),auth['isAuthenticated'](),controller[_0xe81a('0x14')]);router[_0xe81a('0xa')](_0xe81a('0x15'),auth[_0xe81a('0xb')](),controller[_0xe81a('0x16')]);router[_0xe81a('0x17')]('/',auth[_0xe81a('0xb')](),controller[_0xe81a('0x18')]);router[_0xe81a('0x17')](_0xe81a('0x19'),auth[_0xe81a('0xb')](),controller[_0xe81a('0x1a')]);router[_0xe81a('0x17')](_0xe81a('0xf'),auth[_0xe81a('0xb')](),controller['addContacts']);router[_0xe81a('0x17')]('/:id/fields',auth[_0xe81a('0xb')](),controller[_0xe81a('0x1b')]);router[_0xe81a('0x17')](_0xe81a('0x15'),auth[_0xe81a('0xb')](),controller[_0xe81a('0x1c')]);router[_0xe81a('0x1d')]('/:id',auth[_0xe81a('0xb')](),controller[_0xe81a('0x1e')]);router['delete'](_0xe81a('0xe'),auth['isAuthenticated'](),controller[_0xe81a('0x1f')]);router[_0xe81a('0x20')]('/:id/dispositions',auth[_0xe81a('0xb')](),controller[_0xe81a('0x21')]);router[_0xe81a('0x20')]('/:id/users',auth[_0xe81a('0xb')](),controller['removeAgents']);module[_0xe81a('0x22')]=router; \ No newline at end of file +var _0x14de=['getDispositions','/:id/contacts','getContactsCsv','/:id/fields','getCustomFields','post','addDisposition','addCustomField','/:id/users','addAgents','update','delete','removeDispositions','exports','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','./cmList.controller','get','isAuthenticated','/describe','describe','/:id','show','/:id/dispositions'];(function(_0x3649d3,_0x283e04){var _0x44245a=function(_0x569c5a){while(--_0x569c5a){_0x3649d3['push'](_0x3649d3['shift']());}};_0x44245a(++_0x283e04);}(_0x14de,0x1ea));var _0xe14d=function(_0x2e2f80,_0xf3283b){_0x2e2f80=_0x2e2f80-0x0;var _0x4320d4=_0x14de[_0x2e2f80];return _0x4320d4;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0xe14d('0x0'));var timeout=require(_0xe14d('0x1'));var express=require(_0xe14d('0x2'));var router=express['Router']();var fs_extra=require(_0xe14d('0x3'));var auth=require(_0xe14d('0x4'));var interaction=require(_0xe14d('0x5'));var config=require('../../config/environment');var controller=require(_0xe14d('0x6'));router[_0xe14d('0x7')]('/',auth[_0xe14d('0x8')](),controller['index']);router[_0xe14d('0x7')](_0xe14d('0x9'),auth['isAuthenticated'](),controller[_0xe14d('0xa')]);router[_0xe14d('0x7')](_0xe14d('0xb'),auth[_0xe14d('0x8')](),controller[_0xe14d('0xc')]);router[_0xe14d('0x7')](_0xe14d('0xd'),auth[_0xe14d('0x8')](),controller[_0xe14d('0xe')]);router['get'](_0xe14d('0xf'),auth[_0xe14d('0x8')](),controller['getContacts']);router['get']('/:id/contacts/csv',auth[_0xe14d('0x8')](),controller[_0xe14d('0x10')]);router[_0xe14d('0x7')](_0xe14d('0x11'),auth[_0xe14d('0x8')](),controller[_0xe14d('0x12')]);router[_0xe14d('0x7')]('/:id/users',auth[_0xe14d('0x8')](),controller['getAgents']);router[_0xe14d('0x13')]('/',auth[_0xe14d('0x8')](),controller['create']);router[_0xe14d('0x13')]('/:id/dispositions',auth[_0xe14d('0x8')](),controller[_0xe14d('0x14')]);router['post'](_0xe14d('0xf'),auth[_0xe14d('0x8')](),controller['addContacts']);router['post'](_0xe14d('0x11'),auth['isAuthenticated'](),controller[_0xe14d('0x15')]);router[_0xe14d('0x13')](_0xe14d('0x16'),auth['isAuthenticated'](),controller[_0xe14d('0x17')]);router['put'](_0xe14d('0xb'),auth[_0xe14d('0x8')](),controller[_0xe14d('0x18')]);router[_0xe14d('0x19')]('/:id',auth[_0xe14d('0x8')](),controller['destroy']);router[_0xe14d('0x19')](_0xe14d('0xd'),auth[_0xe14d('0x8')](),controller[_0xe14d('0x1a')]);router[_0xe14d('0x19')](_0xe14d('0x16'),auth['isAuthenticated'](),controller['removeAgents']);module[_0xe14d('0x1b')]=router; \ No newline at end of file diff --git a/server/api/condition/condition.attributes.js b/server/api/condition/condition.attributes.js index 63ea8c4..b878a79 100644 --- a/server/api/condition/condition.attributes.js +++ b/server/api/condition/condition.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb0e3=['sequelize','field','STRING'];(function(_0x4e5549,_0x484761){var _0x3ef78f=function(_0xefd8c6){while(--_0xefd8c6){_0x4e5549['push'](_0x4e5549['shift']());}};_0x3ef78f(++_0x484761);}(_0xb0e3,0x14a));var _0x3b0e=function(_0x29970d,_0x2593e8){_0x29970d=_0x29970d-0x0;var _0x1198c1=_0xb0e3[_0x29970d];return _0x1198c1;};'use strict';var Sequelize=require(_0x3b0e('0x0'));module['exports']={'name':{'type':Sequelize['VIRTUAL'],'get':function(_0x3e4d8e){return this['getDataValue'](_0x3b0e('0x1'));}},'field':{'type':Sequelize['STRING'],'allowNull':![]},'operator':{'type':Sequelize['STRING'],'allowNull':![]},'value':{'type':Sequelize[_0x3b0e('0x2')],'allowNull':![]}}; \ No newline at end of file +var _0x31e7=['field','STRING','sequelize','exports','VIRTUAL'];(function(_0x7a112,_0x2eb4a0){var _0x136dc5=function(_0x437650){while(--_0x437650){_0x7a112['push'](_0x7a112['shift']());}};_0x136dc5(++_0x2eb4a0);}(_0x31e7,0x7f));var _0x731e=function(_0x1a16d5,_0x25d12a){_0x1a16d5=_0x1a16d5-0x0;var _0xc075df=_0x31e7[_0x1a16d5];return _0xc075df;};'use strict';var Sequelize=require(_0x731e('0x0'));module[_0x731e('0x1')]={'name':{'type':Sequelize[_0x731e('0x2')],'get':function(_0x2a183c){return this['getDataValue'](_0x731e('0x3'));}},'field':{'type':Sequelize[_0x731e('0x4')],'allowNull':![]},'operator':{'type':Sequelize[_0x731e('0x4')],'allowNull':![]},'value':{'type':Sequelize[_0x731e('0x4')],'allowNull':![]}}; \ No newline at end of file diff --git a/server/api/condition/condition.controller.js b/server/api/condition/condition.controller.js index 1e57672..baa8d5b 100644 --- a/server/api/condition/condition.controller.js +++ b/server/api/condition/condition.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9957=['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','sendStatus','status','json','undefined','count','offset','limit','set','Content-Range','reject','save','then','destroy','error','name','send','update','body','Condition','find','catch','params'];(function(_0x41646c,_0x246f4f){var _0x20bdee=function(_0x5384e2){while(--_0x5384e2){_0x41646c['push'](_0x41646c['shift']());}};_0x20bdee(++_0x246f4f);}(_0x9957,0x93));var _0x7995=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0x9957[_0x2dafbe];return _0x58a45a;};'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){if(_0x4b6f99['body']['id']){delete _0x4b6f99[_0x7995('0x2c')]['id'];}return db[_0x7995('0x2d')][_0x7995('0x2e')]({'where':{'id':_0x4b6f99['params']['id']}})['then'](handleEntityNotFound(_0x9b2a15,null))['then'](saveUpdates(_0x4b6f99[_0x7995('0x2c')],null))[_0x7995('0x26')](respondWithResult(_0x9b2a15,null))[_0x7995('0x2f')](handleError(_0x9b2a15,null));};exports[_0x7995('0x27')]=function(_0x2e3493,_0x1ca460){return db['Condition']['find']({'where':{'id':_0x2e3493[_0x7995('0x30')]['id']}})['then'](handleEntityNotFound(_0x1ca460,null))[_0x7995('0x26')](removeEntity(_0x1ca460,null))[_0x7995('0x2f')](handleError(_0x1ca460,null));}; \ No newline at end of file +var _0x7a54=['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','body','Condition','find','catch','eml-format','rimraf','zip-dir','request-promise','moment','mustache','util','path'];(function(_0x1362f4,_0x4a8c69){var _0x3b94ae=function(_0x11b151){while(--_0x11b151){_0x1362f4['push'](_0x1362f4['shift']());}};_0x3b94ae(++_0x4a8c69);}(_0x7a54,0x106));var _0x47a5=function(_0x203e7a,_0x2f2f5b){_0x203e7a=_0x203e7a-0x0;var _0x3b1ff6=_0x7a54[_0x203e7a];return _0x3b1ff6;};'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('0x22')]=function(_0x136b14,_0x16631f){if(_0x136b14[_0x47a5('0x29')]['id']){delete _0x136b14[_0x47a5('0x29')]['id'];}return db[_0x47a5('0x2a')][_0x47a5('0x2b')]({'where':{'id':_0x136b14['params']['id']}})[_0x47a5('0x23')](handleEntityNotFound(_0x16631f,null))['then'](saveUpdates(_0x136b14[_0x47a5('0x29')],null))[_0x47a5('0x23')](respondWithResult(_0x16631f,null))[_0x47a5('0x2c')](handleError(_0x16631f,null));};exports['destroy']=function(_0x256650,_0x625952){return db[_0x47a5('0x2a')][_0x47a5('0x2b')]({'where':{'id':_0x256650['params']['id']}})['then'](handleEntityNotFound(_0x625952,null))[_0x47a5('0x23')](removeEntity(_0x625952,null))[_0x47a5('0x2c')](handleError(_0x625952,null));}; \ No newline at end of file diff --git a/server/api/condition/condition.model.js b/server/api/condition/condition.model.js index b00732c..89028ef 100644 --- a/server/api/condition/condition.model.js +++ b/server/api/condition/condition.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x62de=['api','moment','bluebird','request-promise','../../config/environment','./condition.attributes','define','Condition','tools_conditions','lodash','util','../../config/logger'];(function(_0x2cc0b3,_0x120bf1){var _0x1667ef=function(_0x3abcb4){while(--_0x3abcb4){_0x2cc0b3['push'](_0x2cc0b3['shift']());}};_0x1667ef(++_0x120bf1);}(_0x62de,0x165));var _0xe62d=function(_0x1e7922,_0x25b332){_0x1e7922=_0x1e7922-0x0;var _0x2f179d=_0x62de[_0x1e7922];return _0x2f179d;};'use strict';var _=require(_0xe62d('0x0'));var util=require(_0xe62d('0x1'));var logger=require(_0xe62d('0x2'))(_0xe62d('0x3'));var moment=require(_0xe62d('0x4'));var BPromise=require(_0xe62d('0x5'));var rp=require(_0xe62d('0x6'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0xe62d('0x7'));var attributes=require(_0xe62d('0x8'));module['exports']=function(_0x1c58b7,_0x5d3be3){return _0x1c58b7[_0xe62d('0x9')](_0xe62d('0xa'),attributes,{'tableName':_0xe62d('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xdb69=['request-promise','rimraf','./condition.attributes','exports','define','tools_conditions','util','../../config/logger','api','moment','bluebird'];(function(_0xa1e3ca,_0x559022){var _0x5005ab=function(_0x12f90e){while(--_0x12f90e){_0xa1e3ca['push'](_0xa1e3ca['shift']());}};_0x5005ab(++_0x559022);}(_0xdb69,0x103));var _0x9db6=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0xdb69[_0x501510];return _0x1e6ee5;};'use strict';var _=require('lodash');var util=require(_0x9db6('0x0'));var logger=require(_0x9db6('0x1'))(_0x9db6('0x2'));var moment=require(_0x9db6('0x3'));var BPromise=require(_0x9db6('0x4'));var rp=require(_0x9db6('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x9db6('0x6'));var config=require('../../config/environment');var attributes=require(_0x9db6('0x7'));module[_0x9db6('0x8')]=function(_0x40c200,_0x5c6e74){return _0x40c200[_0x9db6('0x9')]('Condition',attributes,{'tableName':_0x9db6('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/condition/condition.rpc.js b/server/api/condition/condition.rpc.js index 3f1c405..225c73f 100644 --- a/server/api/condition/condition.rpc.js +++ b/server/api/condition/condition.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9b1e=['code','message','result','catch','util','moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','Condition,\x20%s,\x20%s','request\x20sent','debug','Condition,\x20%s,\x20%s,\x20%s','error'];(function(_0x1c8f83,_0x1b33da){var _0x336039=function(_0x38950c){while(--_0x38950c){_0x1c8f83['push'](_0x1c8f83['shift']());}};_0x336039(++_0x1b33da);}(_0x9b1e,0xe0));var _0xe9b1=function(_0x2aae23,_0xab3425){_0x2aae23=_0x2aae23-0x0;var _0x23af4b=_0x9b1e[_0x2aae23];return _0x23af4b;};'use strict';var _=require('lodash');var util=require(_0xe9b1('0x0'));var moment=require(_0xe9b1('0x1'));var BPromise=require('bluebird');var rs=require(_0xe9b1('0x2'));var fs=require('fs');var Redis=require(_0xe9b1('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0xe9b1('0x4'));var logger=require(_0xe9b1('0x5'))(_0xe9b1('0x6'));var config=require(_0xe9b1('0x7'));var jayson=require(_0xe9b1('0x8'));var client=jayson['client'][_0xe9b1('0x9')]({'port':0x232a});function respondWithRpcPromise(_0xd0236a,_0x3ee7dd,_0x45f2e8){return new BPromise(function(_0x14dfa4,_0x15337f){return client[_0xe9b1('0xa')](_0xd0236a,_0x45f2e8)[_0xe9b1('0xb')](function(_0x5b28d0){logger[_0xe9b1('0xc')](_0xe9b1('0xd'),_0x3ee7dd,_0xe9b1('0xe'));logger[_0xe9b1('0xf')](_0xe9b1('0x10'),_0x3ee7dd,_0xe9b1('0xe'),JSON['stringify'](_0x5b28d0));if(_0x5b28d0[_0xe9b1('0x11')]){if(_0x5b28d0['error'][_0xe9b1('0x12')]===0x1f4){logger[_0xe9b1('0x11')]('Condition,\x20%s,\x20%s',_0x3ee7dd,_0x5b28d0[_0xe9b1('0x11')][_0xe9b1('0x13')]);return _0x15337f(_0x5b28d0[_0xe9b1('0x11')]['message']);}logger[_0xe9b1('0x11')](_0xe9b1('0xd'),_0x3ee7dd,_0x5b28d0[_0xe9b1('0x11')]['message']);return _0x14dfa4(_0x5b28d0[_0xe9b1('0x11')][_0xe9b1('0x13')]);}else{logger[_0xe9b1('0xc')](_0xe9b1('0xd'),_0x3ee7dd,_0xe9b1('0xe'));_0x14dfa4(_0x5b28d0[_0xe9b1('0x14')][_0xe9b1('0x13')]);}})[_0xe9b1('0x15')](function(_0x544041){logger[_0xe9b1('0x11')](_0xe9b1('0xd'),_0x3ee7dd,_0x544041);_0x15337f(_0x544041);});});} \ No newline at end of file +var _0x0a11=['info','Condition,\x20%s,\x20%s','request\x20sent','debug','Condition,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then'];(function(_0x124513,_0x37f0e4){var _0x2e32d5=function(_0x3012e9){while(--_0x3012e9){_0x124513['push'](_0x124513['shift']());}};_0x2e32d5(++_0x37f0e4);}(_0x0a11,0x1d3));var _0x10a1=function(_0x33975c,_0x50d085){_0x33975c=_0x33975c-0x0;var _0x1c15ab=_0x0a11[_0x33975c];return _0x1c15ab;};'use strict';var _=require(_0x10a1('0x0'));var util=require(_0x10a1('0x1'));var moment=require('moment');var BPromise=require(_0x10a1('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x10a1('0x3'));var db=require(_0x10a1('0x4'))['db'];var utils=require(_0x10a1('0x5'));var logger=require(_0x10a1('0x6'))('rpc');var config=require(_0x10a1('0x7'));var jayson=require(_0x10a1('0x8'));var client=jayson[_0x10a1('0x9')][_0x10a1('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3e94a3,_0x502372,_0x377c0d){return new BPromise(function(_0x16015f,_0x4065b7){return client[_0x10a1('0xb')](_0x3e94a3,_0x377c0d)[_0x10a1('0xc')](function(_0x2fe816){logger[_0x10a1('0xd')](_0x10a1('0xe'),_0x502372,_0x10a1('0xf'));logger[_0x10a1('0x10')](_0x10a1('0x11'),_0x502372,_0x10a1('0xf'),JSON[_0x10a1('0x12')](_0x2fe816));if(_0x2fe816[_0x10a1('0x13')]){if(_0x2fe816[_0x10a1('0x13')][_0x10a1('0x14')]===0x1f4){logger['error'](_0x10a1('0xe'),_0x502372,_0x2fe816[_0x10a1('0x13')]['message']);return _0x4065b7(_0x2fe816[_0x10a1('0x13')][_0x10a1('0x15')]);}logger[_0x10a1('0x13')](_0x10a1('0xe'),_0x502372,_0x2fe816['error'][_0x10a1('0x15')]);return _0x16015f(_0x2fe816[_0x10a1('0x13')]['message']);}else{logger[_0x10a1('0xd')](_0x10a1('0xe'),_0x502372,_0x10a1('0xf'));_0x16015f(_0x2fe816[_0x10a1('0x16')]['message']);}})[_0x10a1('0x17')](function(_0x332fc1){logger[_0x10a1('0x13')](_0x10a1('0xe'),_0x502372,_0x332fc1);_0x4065b7(_0x332fc1);});});} \ No newline at end of file diff --git a/server/api/condition/index.js b/server/api/condition/index.js index 3f0e421..46d4bde 100644 --- a/server/api/condition/index.js +++ b/server/api/condition/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf4bc=['path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./condition.controller','/:id','isAuthenticated','update','delete','destroy','exports','multer','util'];(function(_0x19950b,_0x53d0d7){var _0x3c6b41=function(_0x3924ad){while(--_0x3924ad){_0x19950b['push'](_0x19950b['shift']());}};_0x3c6b41(++_0x53d0d7);}(_0xf4bc,0x1de));var _0xcf4b=function(_0x3725fb,_0x2407fd){_0x3725fb=_0x3725fb-0x0;var _0xca75ff=_0xf4bc[_0x3725fb];return _0xca75ff;};'use strict';var multer=require(_0xcf4b('0x0'));var util=require(_0xcf4b('0x1'));var path=require(_0xcf4b('0x2'));var timeout=require(_0xcf4b('0x3'));var express=require(_0xcf4b('0x4'));var router=express[_0xcf4b('0x5')]();var fs_extra=require(_0xcf4b('0x6'));var auth=require(_0xcf4b('0x7'));var interaction=require(_0xcf4b('0x8'));var config=require('../../config/environment');var controller=require(_0xcf4b('0x9'));router['put'](_0xcf4b('0xa'),auth[_0xcf4b('0xb')](),controller[_0xcf4b('0xc')]);router[_0xcf4b('0xd')](_0xcf4b('0xa'),auth[_0xcf4b('0xb')](),controller[_0xcf4b('0xe')]);module[_0xcf4b('0xf')]=router; \ No newline at end of file +var _0xcac3=['update','delete','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./condition.controller','put','/:id','isAuthenticated'];(function(_0x4bf3a7,_0x5d756b){var _0x58c9cc=function(_0x13c6c9){while(--_0x13c6c9){_0x4bf3a7['push'](_0x4bf3a7['shift']());}};_0x58c9cc(++_0x5d756b);}(_0xcac3,0x193));var _0x3cac=function(_0x1e0c0e,_0x5ccb80){_0x1e0c0e=_0x1e0c0e-0x0;var _0x53fecc=_0xcac3[_0x1e0c0e];return _0x53fecc;};'use strict';var multer=require('multer');var util=require(_0x3cac('0x0'));var path=require(_0x3cac('0x1'));var timeout=require(_0x3cac('0x2'));var express=require(_0x3cac('0x3'));var router=express[_0x3cac('0x4')]();var fs_extra=require(_0x3cac('0x5'));var auth=require(_0x3cac('0x6'));var interaction=require(_0x3cac('0x7'));var config=require(_0x3cac('0x8'));var controller=require(_0x3cac('0x9'));router[_0x3cac('0xa')](_0x3cac('0xb'),auth[_0x3cac('0xc')](),controller[_0x3cac('0xd')]);router[_0x3cac('0xe')](_0x3cac('0xb'),auth[_0x3cac('0xc')](),controller['destroy']);module[_0x3cac('0xf')]=router; \ No newline at end of file diff --git a/server/api/dashboard/dashboard.attributes.js b/server/api/dashboard/dashboard.attributes.js index 5aabeac..fcccf76 100644 --- a/server/api/dashboard/dashboard.attributes.js +++ b/server/api/dashboard/dashboard.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd8b0=['exports','sequelize'];(function(_0x115923,_0x35ea76){var _0x3c7afd=function(_0x24a28e){while(--_0x24a28e){_0x115923['push'](_0x115923['shift']());}};_0x3c7afd(++_0x35ea76);}(_0xd8b0,0xad));var _0x0d8b=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xd8b0[_0x20a584];return _0x4b41a8;};'use strict';var Sequelize=require(_0x0d8b('0x0'));module[_0x0d8b('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![],'unique':'name'},'description':{'type':Sequelize['STRING']}}; \ No newline at end of file +var _0xb7e7=['STRING','sequelize'];(function(_0xbf8ebe,_0x3b69a5){var _0x1e25e8=function(_0x40c390){while(--_0x40c390){_0xbf8ebe['push'](_0xbf8ebe['shift']());}};_0x1e25e8(++_0x3b69a5);}(_0xb7e7,0x121));var _0x7b7e=function(_0x1cb18a,_0x33167a){_0x1cb18a=_0x1cb18a-0x0;var _0x22442e=_0xb7e7[_0x1cb18a];return _0x22442e;};'use strict';var Sequelize=require(_0x7b7e('0x0'));module['exports']={'name':{'type':Sequelize[_0x7b7e('0x1')],'allowNull':![],'unique':'name'},'description':{'type':Sequelize[_0x7b7e('0x1')]}}; \ No newline at end of file diff --git a/server/api/dashboard/dashboard.controller.js b/server/api/dashboard/dashboard.controller.js index 03100bf..3c1a955 100644 --- a/server/api/dashboard/dashboard.controller.js +++ b/server/api/dashboard/dashboard.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x614b=['user','role','find','userProfileId','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','omit','createdAt','updatedAt','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','autoAssociation','iframe','attrUrl','attrs','https://','custom','attrPath','value','attrHourFormat','HH:mm:ss','attrTimezone','attrFontSize','counter','attrMetric','multibar-chart','pie-chart','attrSerie1','total','attrSerie2','attrSerie3','attrVoiceQueues','attrReport','reportType','attrRefresh','widgetAttributes:\x20%s','stringify','addItem','DashboardId','DashboardItem','getItems','findOne','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./dashboard.socket','register','sendStatus','end','status','offset','undefined','limit','count','set','Content-Range','json','apply','reject','save','update','then','destroy','get','CustomDashboards','error','stack','name','send','map','Dashboard','rawAttributes','fieldName','key','model','query','filters','attributes','intersection','fields','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','type','VIRTUAL','includeAll','include','rows','catch','show','keys','length','options','create','body'];(function(_0x20c232,_0x485646){var _0x206575=function(_0x35f982){while(--_0x35f982){_0x20c232['push'](_0x20c232['shift']());}};_0x206575(++_0x485646);}(_0x614b,0x1a8));var _0xb614=function(_0x1c8b0b,_0x8dd684){_0x1c8b0b=_0x1c8b0b-0x0;var _0x4da615=_0x614b[_0x1c8b0b];return _0x4da615;};'use strict';var emlformat=require(_0xb614('0x0'));var rimraf=require(_0xb614('0x1'));var zipdir=require(_0xb614('0x2'));var jsonpatch=require(_0xb614('0x3'));var rp=require('request-promise');var moment=require(_0xb614('0x4'));var BPromise=require(_0xb614('0x5'));var Mustache=require(_0xb614('0x6'));var util=require('util');var path=require(_0xb614('0x7'));var sox=require(_0xb614('0x8'));var csv=require(_0xb614('0x9'));var ejs=require(_0xb614('0xa'));var fs=require('fs');var fs_extra=require(_0xb614('0xb'));var _=require(_0xb614('0xc'));var squel=require(_0xb614('0xd'));var crypto=require(_0xb614('0xe'));var jsforce=require(_0xb614('0xf'));var deskjs=require('desk.js');var toCsv=require(_0xb614('0x9'));var querystring=require(_0xb614('0x10'));var Papa=require(_0xb614('0x11'));var Redis=require('ioredis');var authService=require(_0xb614('0x12'));var qs=require(_0xb614('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0xb614('0x14'))('api');var utils=require(_0xb614('0x15'));var config=require(_0xb614('0x16'));var licenseUtil=require(_0xb614('0x17'));var db=require(_0xb614('0x18'))['db'];config[_0xb614('0x19')]=_[_0xb614('0x1a')](config[_0xb614('0x19')],{'host':_0xb614('0x1b'),'port':0x18eb});var socket=require(_0xb614('0x1c'))(new Redis(config['redis']));require(_0xb614('0x1d'))[_0xb614('0x1e')](socket);function respondWithStatusCode(_0x357d9e,_0x5b0c37){_0x5b0c37=_0x5b0c37||0xcc;return function(_0x1d9e48){if(_0x1d9e48){return _0x357d9e[_0xb614('0x1f')](_0x5b0c37);}return _0x357d9e['status'](_0x5b0c37)[_0xb614('0x20')]();};}function respondWithResult(_0x2749c7,_0x1908e2){_0x1908e2=_0x1908e2||0xc8;return function(_0x4d01f7){if(_0x4d01f7){return _0x2749c7[_0xb614('0x21')](_0x1908e2)['json'](_0x4d01f7);}};}function respondWithFilteredResult(_0x106a5b,_0x19a028){return function(_0x1bfbd2){if(_0x1bfbd2){var _0x3d3286=typeof _0x19a028[_0xb614('0x22')]===_0xb614('0x23')&&typeof _0x19a028[_0xb614('0x24')]===_0xb614('0x23');var _0xfd6550=_0x1bfbd2[_0xb614('0x25')];var _0x29c9f7=_0x3d3286?0x0:_0x19a028['offset'];var _0xb774a6=_0x3d3286?_0x1bfbd2[_0xb614('0x25')]:_0x19a028[_0xb614('0x22')]+_0x19a028['limit'];var _0x53dbce;if(_0xb774a6>=_0xfd6550){_0xb774a6=_0xfd6550;_0x53dbce=0xc8;}else{_0x53dbce=0xce;}_0x106a5b[_0xb614('0x21')](_0x53dbce);return _0x106a5b[_0xb614('0x26')](_0xb614('0x27'),_0x29c9f7+'-'+_0xb774a6+'/'+_0xfd6550)[_0xb614('0x28')](_0x1bfbd2);}return null;};}function patchUpdates(_0x80eebb){return function(_0x17668c){try{jsonpatch[_0xb614('0x29')](_0x17668c,_0x80eebb,!![]);}catch(_0xd1815f){return BPromise[_0xb614('0x2a')](_0xd1815f);}return _0x17668c[_0xb614('0x2b')]();};}function saveUpdates(_0x3647f6,_0x50014a){return function(_0x37cc15){if(_0x37cc15){return _0x37cc15[_0xb614('0x2c')](_0x3647f6)[_0xb614('0x2d')](function(_0x2a8636){return _0x2a8636;});}return null;};}function removeEntity(_0x340960,_0x1f7278){return function(_0x16bf34){if(_0x16bf34){return _0x16bf34[_0xb614('0x2e')]()[_0xb614('0x2d')](function(){var _0x5ca668=_0x16bf34[_0xb614('0x2f')]({'plain':!![]});var _0x409ccf=_0xb614('0x30');return db['UserProfileResource']['destroy']({'where':{'type':_0x409ccf,'resourceId':_0x5ca668['id']}})[_0xb614('0x2d')](function(){return _0x16bf34;});})[_0xb614('0x2d')](function(){_0x340960['status'](0xcc)[_0xb614('0x20')]();});}};}function handleEntityNotFound(_0x59e6f0,_0x4f82dd){return function(_0x3f304c){if(!_0x3f304c){_0x59e6f0[_0xb614('0x1f')](0x194);}return _0x3f304c;};}function handleError(_0x13e0eb,_0x569835){_0x569835=_0x569835||0x1f4;return function(_0x41c21f){logger[_0xb614('0x31')](_0x41c21f[_0xb614('0x32')]);if(_0x41c21f[_0xb614('0x33')]){delete _0x41c21f[_0xb614('0x33')];}_0x13e0eb['status'](_0x569835)[_0xb614('0x34')](_0x41c21f);};}exports['index']=function(_0x5f46bb,_0x26af4c){var _0x29d15b={},_0x27ea68={},_0x24199d={'count':0x0,'rows':[]};var _0x2501f6=_[_0xb614('0x35')](db[_0xb614('0x36')][_0xb614('0x37')],function(_0x431a0f){return{'name':_0x431a0f[_0xb614('0x38')],'type':_0x431a0f['type'][_0xb614('0x39')]};});_0x27ea68[_0xb614('0x3a')]=_[_0xb614('0x35')](_0x2501f6,_0xb614('0x33'));_0x27ea68[_0xb614('0x3b')]=_['keys'](_0x5f46bb['query']);_0x27ea68[_0xb614('0x3c')]=_['intersection'](_0x27ea68[_0xb614('0x3a')],_0x27ea68['query']);_0x29d15b[_0xb614('0x3d')]=_[_0xb614('0x3e')](_0x27ea68[_0xb614('0x3a')],qs[_0xb614('0x3f')](_0x5f46bb[_0xb614('0x3b')][_0xb614('0x3f')]));_0x29d15b[_0xb614('0x3d')]=_0x29d15b[_0xb614('0x3d')]['length']?_0x29d15b[_0xb614('0x3d')]:_0x27ea68['model'];if(!_0x5f46bb['query'][_0xb614('0x40')](_0xb614('0x41'))){_0x29d15b['limit']=qs['limit'](_0x5f46bb[_0xb614('0x3b')]['limit']);_0x29d15b[_0xb614('0x22')]=qs[_0xb614('0x22')](_0x5f46bb[_0xb614('0x3b')][_0xb614('0x22')]);}_0x29d15b[_0xb614('0x42')]=qs[_0xb614('0x43')](_0x5f46bb['query']['sort']);_0x29d15b[_0xb614('0x44')]=qs[_0xb614('0x3c')](_[_0xb614('0x45')](_0x5f46bb['query'],_0x27ea68[_0xb614('0x3c')]),_0x2501f6);if(_0x5f46bb[_0xb614('0x3b')][_0xb614('0x46')]){_0x29d15b[_0xb614('0x44')]=_[_0xb614('0x47')](_0x29d15b[_0xb614('0x44')],{'$or':_['map'](_0x2501f6,function(_0x23fc47){if(_0x23fc47[_0xb614('0x48')]!==_0xb614('0x49')){var _0xc41806={};_0xc41806[_0x23fc47[_0xb614('0x33')]]={'$like':'%'+_0x5f46bb[_0xb614('0x3b')][_0xb614('0x46')]+'%'};return _0xc41806;}})});}_0x29d15b=_[_0xb614('0x47')]({},_0x29d15b,_0x5f46bb['options']);var _0x434b8c={'where':_0x29d15b[_0xb614('0x44')]};return db[_0xb614('0x36')][_0xb614('0x25')](_0x434b8c)[_0xb614('0x2d')](function(_0x4669c9){_0x24199d[_0xb614('0x25')]=_0x4669c9;if(_0x5f46bb[_0xb614('0x3b')][_0xb614('0x4a')]){_0x29d15b[_0xb614('0x4b')]=[{'all':!![]}];}return db[_0xb614('0x36')]['findAll'](_0x29d15b);})[_0xb614('0x2d')](function(_0x10f61d){_0x24199d[_0xb614('0x4c')]=_0x10f61d;return _0x24199d;})['then'](respondWithFilteredResult(_0x26af4c,_0x29d15b))[_0xb614('0x4d')](handleError(_0x26af4c,null));};exports[_0xb614('0x4e')]=function(_0xc072be,_0xaee163){var _0x4dcef2={'raw':![],'where':{'id':_0xc072be['params']['id']}},_0x315db7={};_0x315db7[_0xb614('0x3a')]=_[_0xb614('0x4f')](db[_0xb614('0x36')][_0xb614('0x37')]);_0x315db7[_0xb614('0x3b')]=_[_0xb614('0x4f')](_0xc072be[_0xb614('0x3b')]);_0x315db7['filters']=_[_0xb614('0x3e')](_0x315db7[_0xb614('0x3a')],_0x315db7[_0xb614('0x3b')]);_0x4dcef2[_0xb614('0x3d')]=_[_0xb614('0x3e')](_0x315db7['model'],qs[_0xb614('0x3f')](_0xc072be[_0xb614('0x3b')][_0xb614('0x3f')]));_0x4dcef2[_0xb614('0x3d')]=_0x4dcef2[_0xb614('0x3d')][_0xb614('0x50')]?_0x4dcef2['attributes']:_0x315db7[_0xb614('0x3a')];if(_0xc072be['query'][_0xb614('0x4a')]){_0x4dcef2[_0xb614('0x4b')]=[{'all':!![]}];}_0x4dcef2=_[_0xb614('0x47')]({},_0x4dcef2,_0xc072be[_0xb614('0x51')]);return db[_0xb614('0x36')]['find'](_0x4dcef2)[_0xb614('0x2d')](handleEntityNotFound(_0xaee163,null))[_0xb614('0x2d')](respondWithResult(_0xaee163,null))[_0xb614('0x4d')](handleError(_0xaee163,null));};exports[_0xb614('0x52')]=function(_0x5bd1af,_0xe54519){return db['Dashboard'][_0xb614('0x52')](_0x5bd1af[_0xb614('0x53')],{})[_0xb614('0x2d')](function(_0x5cbf66){var _0x13dc8d=_0x5bd1af[_0xb614('0x54')][_0xb614('0x2f')]({'plain':!![]});if(!_0x13dc8d)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x13dc8d[_0xb614('0x55')]==='user'){var _0x2d080b=_0x5cbf66['get']({'plain':!![]});var _0x2bb3ec=_0xb614('0x30');return db['UserProfileSection'][_0xb614('0x56')]({'where':{'name':_0x2bb3ec,'userProfileId':_0x13dc8d[_0xb614('0x57')]},'raw':!![]})[_0xb614('0x2d')](function(_0x4a730d){if(_0x4a730d&&_0x4a730d['autoAssociation']===0x0){return db[_0xb614('0x58')][_0xb614('0x52')]({'name':_0x2d080b['name'],'resourceId':_0x2d080b['id'],'type':_0x4a730d[_0xb614('0x33')],'sectionId':_0x4a730d['id']},{})['then'](function(){return _0x5cbf66;});}else{return _0x5cbf66;}})[_0xb614('0x4d')](function(_0x28cd03){logger[_0xb614('0x31')](_0xb614('0x59'),_0x28cd03);throw _0x28cd03;});}return _0x5cbf66;})[_0xb614('0x2d')](respondWithResult(_0xe54519,0xc9))[_0xb614('0x4d')](handleError(_0xe54519,null));};exports['clone']=function(_0x4b22ba,_0x53c14c){var _0x5a7279={'where':{'id':_0x4b22ba[_0xb614('0x5a')]['id']}},_0x4ad441={};_0x4ad441[_0xb614('0x3a')]=_['keys'](db[_0xb614('0x36')][_0xb614('0x37')]);_0x5a7279[_0xb614('0x3d')]=_[_0xb614('0x3e')](_0x4ad441[_0xb614('0x3a')],qs[_0xb614('0x3f')](_0x4b22ba[_0xb614('0x3b')][_0xb614('0x3f')]));_0x5a7279[_0xb614('0x3d')]=_0x5a7279[_0xb614('0x3d')][_0xb614('0x50')]?_0x5a7279[_0xb614('0x3d')]:_0x4ad441['model'];if(_0x4b22ba['query'][_0xb614('0x4a')]){_0x5a7279[_0xb614('0x4b')]=[{'all':!![]}];}_0x5a7279=_[_0xb614('0x47')]({},_0x5a7279,_0x4b22ba['options']);return db[_0xb614('0x36')][_0xb614('0x56')](_0x5a7279)[_0xb614('0x2d')](handleEntityNotFound(_0x53c14c,null))[_0xb614('0x2d')](function(_0x59c65d){if(_0x59c65d){var _0x3f7275=_0x59c65d['get']({'plain':!![]});_0x3f7275=qs[_0xb614('0x5b')](_0x3f7275,['id',_0xb614('0x5c'),_0xb614('0x5d')]);_0x4b22ba[_0xb614('0x53')]=_[_0xb614('0x5b')](_0x4b22ba[_0xb614('0x53')],['id',_0xb614('0x5c'),'updatedAt']);return db[_0xb614('0x36')][_0xb614('0x52')](_[_0xb614('0x47')](_0x3f7275,_0x4b22ba[_0xb614('0x53')]),{'include':_0x4b22ba[_0xb614('0x3b')][_0xb614('0x4a')]?[{'all':!![]}]:undefined})[_0xb614('0x2d')](function(_0x558e26){var _0x3f934c=_0x4b22ba[_0xb614('0x54')]['get']({'plain':!![]});if(!_0x3f934c)throw new Error(_0xb614('0x5e'));if(_0x3f934c['role']===_0xb614('0x54')){var _0x13c6ce=_0x558e26[_0xb614('0x2f')]({'plain':!![]});var _0x89964a=_0xb614('0x30');return db[_0xb614('0x5f')][_0xb614('0x56')]({'where':{'name':_0x89964a,'userProfileId':_0x3f934c['userProfileId']},'raw':!![]})['then'](function(_0x36fefd){if(_0x36fefd&&_0x36fefd[_0xb614('0x60')]===0x0){return db[_0xb614('0x58')][_0xb614('0x52')]({'name':_0x13c6ce['name'],'resourceId':_0x13c6ce['id'],'type':_0x36fefd[_0xb614('0x33')],'sectionId':_0x36fefd['id']},{})[_0xb614('0x2d')](function(){return _0x558e26;});}else{return _0x558e26;}})[_0xb614('0x4d')](function(_0x12d148){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x12d148);throw _0x12d148;});}return _0x558e26;});}})[_0xb614('0x2d')](respondWithResult(_0x53c14c,0xc9))[_0xb614('0x4d')](handleError(_0x53c14c,null));};exports[_0xb614('0x2c')]=function(_0x2fcce3,_0x2aaf1f){if(_0x2fcce3[_0xb614('0x53')]['id']){delete _0x2fcce3[_0xb614('0x53')]['id'];}return db[_0xb614('0x36')][_0xb614('0x56')]({'where':{'id':_0x2fcce3[_0xb614('0x5a')]['id']}})['then'](handleEntityNotFound(_0x2aaf1f,null))[_0xb614('0x2d')](saveUpdates(_0x2fcce3[_0xb614('0x53')],null))[_0xb614('0x2d')](respondWithResult(_0x2aaf1f,null))['catch'](handleError(_0x2aaf1f,null));};exports[_0xb614('0x2e')]=function(_0x521c0f,_0x73ad85){return db[_0xb614('0x36')][_0xb614('0x56')]({'where':{'id':_0x521c0f[_0xb614('0x5a')]['id']}})[_0xb614('0x2d')](handleEntityNotFound(_0x73ad85,null))[_0xb614('0x2d')](removeEntity(_0x73ad85,null))['catch'](handleError(_0x73ad85,null));};function widgetAttributes(_0x66c8e9){try{switch(_0x66c8e9[_0xb614('0x48')]){case _0xb614('0x61'):return[{'name':_0xb614('0x62'),'value':_0x66c8e9[_0xb614('0x62')]||(_0x66c8e9[_0xb614('0x63')]&&_0x66c8e9['attrs'][0x0]?_0x66c8e9[_0xb614('0x63')][0x0]['value']:undefined)||_0xb614('0x64')}];case _0xb614('0x65'):return[{'name':_0xb614('0x66'),'value':_0x66c8e9['attrPath']||(_0x66c8e9[_0xb614('0x63')]&&_0x66c8e9[_0xb614('0x63')][0x0]?_0x66c8e9[_0xb614('0x63')][0x0][_0xb614('0x67')]:undefined)||''}];case'clock':return[{'name':_0xb614('0x68'),'value':_0x66c8e9[_0xb614('0x68')]||(_0x66c8e9['attrs']&&_0x66c8e9[_0xb614('0x63')][0x0]?_0x66c8e9[_0xb614('0x63')][0x0][_0xb614('0x67')]:undefined)||_0xb614('0x69')},{'name':_0xb614('0x6a'),'value':_0x66c8e9[_0xb614('0x6a')]||(_0x66c8e9[_0xb614('0x63')]&&_0x66c8e9[_0xb614('0x63')][0x1]?_0x66c8e9[_0xb614('0x63')][0x1][_0xb614('0x67')]:undefined)||'0.00'},{'name':'attrFontSize','value':_0x66c8e9[_0xb614('0x6b')]||(_0x66c8e9[_0xb614('0x63')]&&_0x66c8e9['attrs'][0x2]?_0x66c8e9[_0xb614('0x63')][0x2]['value']:undefined)||0xc}];case _0xb614('0x6c'):return[{'name':_0xb614('0x6d'),'value':_0x66c8e9[_0xb614('0x6d')]||(_0x66c8e9['attrs']&&_0x66c8e9['attrs'][0x0]?_0x66c8e9[_0xb614('0x63')][0x0]['value']:undefined)||'total'},{'name':'attrVoiceQueues','value':_0x66c8e9['attrVoiceQueues']||(_0x66c8e9[_0xb614('0x63')]&&_0x66c8e9['attrs'][0x1]?_0x66c8e9[_0xb614('0x63')][0x1][_0xb614('0x67')]:undefined)||[]},{'name':'attrFontSize','value':_0x66c8e9[_0xb614('0x6b')]||(_0x66c8e9[_0xb614('0x63')]&&_0x66c8e9[_0xb614('0x63')][0x2]?_0x66c8e9[_0xb614('0x63')][0x2][_0xb614('0x67')]:undefined)||0x14}];case _0xb614('0x6e'):case _0xb614('0x6f'):return[{'name':_0xb614('0x70'),'value':_0x66c8e9['attrSerie1']||(_0x66c8e9[_0xb614('0x63')]&&_0x66c8e9[_0xb614('0x63')][0x0]?_0x66c8e9[_0xb614('0x63')][0x0]['value']:undefined)||_0xb614('0x71')},{'name':_0xb614('0x72'),'value':_0x66c8e9['attrSerie2']||(_0x66c8e9[_0xb614('0x63')]&&_0x66c8e9[_0xb614('0x63')][0x1]?_0x66c8e9[_0xb614('0x63')][0x1]['value']:undefined)||null},{'name':_0xb614('0x73'),'value':_0x66c8e9['attrSerie3']||(_0x66c8e9[_0xb614('0x63')]&&_0x66c8e9[_0xb614('0x63')][0x2]?_0x66c8e9[_0xb614('0x63')][0x2][_0xb614('0x67')]:undefined)||null},{'name':_0xb614('0x74'),'value':_0x66c8e9['attrVoiceQueues']||(_0x66c8e9[_0xb614('0x63')]&&_0x66c8e9['attrs'][0x3]?_0x66c8e9[_0xb614('0x63')][0x3][_0xb614('0x67')]:undefined)||[]}];case'web-report':return[{'name':_0xb614('0x75'),'type':_0x66c8e9[_0xb614('0x76')]||(_0x66c8e9['attrs']&&_0x66c8e9[_0xb614('0x63')][0x0]?_0x66c8e9[_0xb614('0x63')][0x0][_0xb614('0x48')]:undefined)||null,'value':_0x66c8e9['attrReport']||(_0x66c8e9[_0xb614('0x63')]&&_0x66c8e9[_0xb614('0x63')][0x0]?_0x66c8e9[_0xb614('0x63')][0x0][_0xb614('0x67')]:undefined)||null},{'name':_0xb614('0x77'),'value':_0x66c8e9[_0xb614('0x77')]||(_0x66c8e9['attrs']&&_0x66c8e9[_0xb614('0x63')][0x1]?_0x66c8e9[_0xb614('0x63')][0x1][_0xb614('0x67')]:undefined)||0x0}];default:return[];}}catch(_0x9af22c){logger[_0xb614('0x31')](_0xb614('0x78'),JSON[_0xb614('0x79')](_0x9af22c));return[];}}exports[_0xb614('0x7a')]=function(_0x4f4a73,_0x4aa51b,_0x161ec9){if(_0x4f4a73['body']['id']){delete _0x4f4a73[_0xb614('0x53')]['id'];}return db['Dashboard'][_0xb614('0x56')]({'where':{'id':_0x4f4a73[_0xb614('0x5a')]['id']}})[_0xb614('0x2d')](handleEntityNotFound(_0x4aa51b,null))[_0xb614('0x2d')](function(_0x5d4565){if(_0x5d4565){_0x4f4a73[_0xb614('0x53')][_0xb614('0x7b')]=_0x5d4565['id'];_0x4f4a73[_0xb614('0x53')][_0xb614('0x63')]=widgetAttributes(_0x4f4a73[_0xb614('0x53')]);return db[_0xb614('0x7c')][_0xb614('0x52')](_0x4f4a73['body']);}})[_0xb614('0x2d')](respondWithResult(_0x4aa51b,null))[_0xb614('0x4d')](handleError(_0x4aa51b,null));};exports[_0xb614('0x7d')]=function(_0x4bfadd,_0x50942f,_0xa37d27){var _0x55feab={};var _0x50a500={};var _0x160c9b;var _0x3b95a9;return db['Dashboard'][_0xb614('0x7e')]({'where':{'id':_0x4bfadd['params']['id']}})[_0xb614('0x2d')](handleEntityNotFound(_0x50942f,null))[_0xb614('0x2d')](function(_0x5eff68){if(_0x5eff68){_0x160c9b=_0x5eff68;_0x50a500[_0xb614('0x3a')]=_['keys'](db[_0xb614('0x7c')]['rawAttributes']);_0x50a500['query']=_[_0xb614('0x4f')](_0x4bfadd[_0xb614('0x3b')]);_0x50a500[_0xb614('0x3c')]=_['intersection'](_0x50a500[_0xb614('0x3a')],_0x50a500[_0xb614('0x3b')]);_0x55feab['attributes']=_['intersection'](_0x50a500[_0xb614('0x3a')],qs[_0xb614('0x3f')](_0x4bfadd[_0xb614('0x3b')][_0xb614('0x3f')]));_0x55feab[_0xb614('0x3d')]=_0x55feab['attributes'][_0xb614('0x50')]?_0x55feab[_0xb614('0x3d')]:_0x50a500['model'];_0x55feab[_0xb614('0x42')]=qs[_0xb614('0x43')](_0x4bfadd[_0xb614('0x3b')][_0xb614('0x43')]);_0x55feab[_0xb614('0x44')]=qs[_0xb614('0x3c')](_[_0xb614('0x45')](_0x4bfadd[_0xb614('0x3b')],_0x50a500[_0xb614('0x3c')]));if(_0x4bfadd['query'][_0xb614('0x46')]){_0x55feab[_0xb614('0x44')]=_['merge'](_0x55feab[_0xb614('0x44')],{'$or':_[_0xb614('0x35')](_0x55feab[_0xb614('0x3d')],function(_0x414fcd){var _0x258510={};_0x258510[_0x414fcd]={'$like':'%'+_0x4bfadd[_0xb614('0x3b')][_0xb614('0x46')]+'%'};return _0x258510;})});}_0x55feab=_['merge']({},_0x55feab,_0x4bfadd['options']);return _0x160c9b[_0xb614('0x7d')](_0x55feab);}})['then'](function(_0x4cb38a){if(_0x4cb38a){_0x3b95a9=_0x4cb38a[_0xb614('0x50')];if(!_0x4bfadd[_0xb614('0x3b')][_0xb614('0x40')](_0xb614('0x41'))){_0x55feab[_0xb614('0x24')]=qs[_0xb614('0x24')](_0x4bfadd[_0xb614('0x3b')][_0xb614('0x24')]);_0x55feab[_0xb614('0x22')]=qs[_0xb614('0x22')](_0x4bfadd[_0xb614('0x3b')][_0xb614('0x22')]);}return _0x160c9b[_0xb614('0x7d')](_0x55feab);}})[_0xb614('0x2d')](function(_0xd0322c){if(_0xd0322c){return _0xd0322c?{'count':_0x3b95a9,'rows':_0xd0322c}:null;}})[_0xb614('0x2d')](respondWithResult(_0x50942f,null))[_0xb614('0x4d')](handleError(_0x50942f,null));}; \ No newline at end of file +var _0x28cc=['squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','redis','defaults','localhost','./dashboard.socket','sendStatus','status','json','offset','limit','undefined','count','set','apply','reject','save','update','CustomDashboards','UserProfileResource','destroy','then','end','error','stack','name','fieldName','model','query','filters','intersection','attributes','length','hasOwnProperty','nolimit','order','sort','pick','filter','where','merge','type','options','Dashboard','includeAll','include','findAll','rows','catch','show','params','keys','rawAttributes','fields','find','create','body','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','omit','updatedAt','userProfileId','iframe','attrUrl','attrs','value','https://','custom','attrPath','clock','attrHourFormat','HH:mm:ss','attrTimezone','attrFontSize','counter','attrMetric','total','attrVoiceQueues','pie-chart','attrSerie1','attrSerie2','attrSerie3','web-report','reportType','attrReport','attrRefresh','widgetAttributes:\x20%s','stringify','DashboardId','DashboardItem','getItems','findOne','eml-format','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra'];(function(_0x35f707,_0x479bf9){var _0x36751e=function(_0x37aa2f){while(--_0x37aa2f){_0x35f707['push'](_0x35f707['shift']());}};_0x36751e(++_0x479bf9);}(_0x28cc,0x1d4));var _0xc28c=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x28cc[_0x321bb2];return _0x9c12ed;};'use strict';var emlformat=require(_0xc28c('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xc28c('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0xc28c('0x2'));var moment=require(_0xc28c('0x3'));var BPromise=require(_0xc28c('0x4'));var Mustache=require(_0xc28c('0x5'));var util=require(_0xc28c('0x6'));var path=require(_0xc28c('0x7'));var sox=require(_0xc28c('0x8'));var csv=require(_0xc28c('0x9'));var ejs=require(_0xc28c('0xa'));var fs=require('fs');var fs_extra=require(_0xc28c('0xb'));var _=require('lodash');var squel=require(_0xc28c('0xc'));var crypto=require(_0xc28c('0xd'));var jsforce=require(_0xc28c('0xe'));var deskjs=require(_0xc28c('0xf'));var toCsv=require(_0xc28c('0x9'));var querystring=require(_0xc28c('0x10'));var Papa=require('papaparse');var Redis=require(_0xc28c('0x11'));var authService=require(_0xc28c('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0xc28c('0x13'));var hardwareService=require(_0xc28c('0x14'));var logger=require(_0xc28c('0x15'))(_0xc28c('0x16'));var utils=require('../../config/utils');var config=require(_0xc28c('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0xc28c('0x18'))['db'];config[_0xc28c('0x19')]=_[_0xc28c('0x1a')](config[_0xc28c('0x19')],{'host':_0xc28c('0x1b'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xc28c('0x19')]));require(_0xc28c('0x1c'))['register'](socket);function respondWithStatusCode(_0x138eea,_0x4c21a3){_0x4c21a3=_0x4c21a3||0xcc;return function(_0x3fe8cc){if(_0x3fe8cc){return _0x138eea[_0xc28c('0x1d')](_0x4c21a3);}return _0x138eea[_0xc28c('0x1e')](_0x4c21a3)['end']();};}function respondWithResult(_0x86350b,_0x20e6e1){_0x20e6e1=_0x20e6e1||0xc8;return function(_0x532302){if(_0x532302){return _0x86350b[_0xc28c('0x1e')](_0x20e6e1)[_0xc28c('0x1f')](_0x532302);}};}function respondWithFilteredResult(_0xe2b320,_0x43f735){return function(_0x151716){if(_0x151716){var _0x1beca0=typeof _0x43f735[_0xc28c('0x20')]==='undefined'&&typeof _0x43f735[_0xc28c('0x21')]===_0xc28c('0x22');var _0x1093ef=_0x151716[_0xc28c('0x23')];var _0x44a841=_0x1beca0?0x0:_0x43f735[_0xc28c('0x20')];var _0x4ef26d=_0x1beca0?_0x151716[_0xc28c('0x23')]:_0x43f735[_0xc28c('0x20')]+_0x43f735['limit'];var _0x19aeb5;if(_0x4ef26d>=_0x1093ef){_0x4ef26d=_0x1093ef;_0x19aeb5=0xc8;}else{_0x19aeb5=0xce;}_0xe2b320[_0xc28c('0x1e')](_0x19aeb5);return _0xe2b320[_0xc28c('0x24')]('Content-Range',_0x44a841+'-'+_0x4ef26d+'/'+_0x1093ef)['json'](_0x151716);}return null;};}function patchUpdates(_0x2d2261){return function(_0x119923){try{jsonpatch[_0xc28c('0x25')](_0x119923,_0x2d2261,!![]);}catch(_0x1c4165){return BPromise[_0xc28c('0x26')](_0x1c4165);}return _0x119923[_0xc28c('0x27')]();};}function saveUpdates(_0x252cef,_0x44d4f2){return function(_0x15bb49){if(_0x15bb49){return _0x15bb49[_0xc28c('0x28')](_0x252cef)['then'](function(_0x53b06a){return _0x53b06a;});}return null;};}function removeEntity(_0x102035,_0x5bfba9){return function(_0x5f0fc0){if(_0x5f0fc0){return _0x5f0fc0['destroy']()['then'](function(){var _0x26f5a4=_0x5f0fc0['get']({'plain':!![]});var _0x266cce=_0xc28c('0x29');return db[_0xc28c('0x2a')][_0xc28c('0x2b')]({'where':{'type':_0x266cce,'resourceId':_0x26f5a4['id']}})['then'](function(){return _0x5f0fc0;});})[_0xc28c('0x2c')](function(){_0x102035[_0xc28c('0x1e')](0xcc)[_0xc28c('0x2d')]();});}};}function handleEntityNotFound(_0x470709,_0xc8f60a){return function(_0x198052){if(!_0x198052){_0x470709['sendStatus'](0x194);}return _0x198052;};}function handleError(_0x17be8c,_0x1b9f72){_0x1b9f72=_0x1b9f72||0x1f4;return function(_0x2bb9c0){logger[_0xc28c('0x2e')](_0x2bb9c0[_0xc28c('0x2f')]);if(_0x2bb9c0['name']){delete _0x2bb9c0[_0xc28c('0x30')];}_0x17be8c[_0xc28c('0x1e')](_0x1b9f72)['send'](_0x2bb9c0);};}exports['index']=function(_0x1eded5,_0x33d6dd){var _0xfea596={},_0x488f9e={},_0x5aafbd={'count':0x0,'rows':[]};var _0x12b869=_['map'](db['Dashboard']['rawAttributes'],function(_0x4cdf74){return{'name':_0x4cdf74[_0xc28c('0x31')],'type':_0x4cdf74['type']['key']};});_0x488f9e[_0xc28c('0x32')]=_['map'](_0x12b869,_0xc28c('0x30'));_0x488f9e[_0xc28c('0x33')]=_['keys'](_0x1eded5[_0xc28c('0x33')]);_0x488f9e[_0xc28c('0x34')]=_[_0xc28c('0x35')](_0x488f9e[_0xc28c('0x32')],_0x488f9e[_0xc28c('0x33')]);_0xfea596['attributes']=_['intersection'](_0x488f9e[_0xc28c('0x32')],qs['fields'](_0x1eded5['query']['fields']));_0xfea596[_0xc28c('0x36')]=_0xfea596[_0xc28c('0x36')][_0xc28c('0x37')]?_0xfea596[_0xc28c('0x36')]:_0x488f9e[_0xc28c('0x32')];if(!_0x1eded5[_0xc28c('0x33')][_0xc28c('0x38')](_0xc28c('0x39'))){_0xfea596[_0xc28c('0x21')]=qs['limit'](_0x1eded5[_0xc28c('0x33')][_0xc28c('0x21')]);_0xfea596[_0xc28c('0x20')]=qs[_0xc28c('0x20')](_0x1eded5[_0xc28c('0x33')][_0xc28c('0x20')]);}_0xfea596[_0xc28c('0x3a')]=qs[_0xc28c('0x3b')](_0x1eded5[_0xc28c('0x33')][_0xc28c('0x3b')]);_0xfea596['where']=qs['filters'](_[_0xc28c('0x3c')](_0x1eded5[_0xc28c('0x33')],_0x488f9e[_0xc28c('0x34')]),_0x12b869);if(_0x1eded5[_0xc28c('0x33')][_0xc28c('0x3d')]){_0xfea596[_0xc28c('0x3e')]=_[_0xc28c('0x3f')](_0xfea596[_0xc28c('0x3e')],{'$or':_['map'](_0x12b869,function(_0x346813){if(_0x346813[_0xc28c('0x40')]!=='VIRTUAL'){var _0x458041={};_0x458041[_0x346813[_0xc28c('0x30')]]={'$like':'%'+_0x1eded5[_0xc28c('0x33')][_0xc28c('0x3d')]+'%'};return _0x458041;}})});}_0xfea596=_[_0xc28c('0x3f')]({},_0xfea596,_0x1eded5[_0xc28c('0x41')]);var _0x3ce5df={'where':_0xfea596[_0xc28c('0x3e')]};return db[_0xc28c('0x42')][_0xc28c('0x23')](_0x3ce5df)[_0xc28c('0x2c')](function(_0xe2694b){_0x5aafbd[_0xc28c('0x23')]=_0xe2694b;if(_0x1eded5[_0xc28c('0x33')][_0xc28c('0x43')]){_0xfea596[_0xc28c('0x44')]=[{'all':!![]}];}return db[_0xc28c('0x42')][_0xc28c('0x45')](_0xfea596);})[_0xc28c('0x2c')](function(_0x2a29bc){_0x5aafbd[_0xc28c('0x46')]=_0x2a29bc;return _0x5aafbd;})[_0xc28c('0x2c')](respondWithFilteredResult(_0x33d6dd,_0xfea596))[_0xc28c('0x47')](handleError(_0x33d6dd,null));};exports[_0xc28c('0x48')]=function(_0x16bb9c,_0x2e081b){var _0x1201b9={'raw':![],'where':{'id':_0x16bb9c[_0xc28c('0x49')]['id']}},_0x2e0c0d={};_0x2e0c0d[_0xc28c('0x32')]=_[_0xc28c('0x4a')](db['Dashboard'][_0xc28c('0x4b')]);_0x2e0c0d['query']=_[_0xc28c('0x4a')](_0x16bb9c['query']);_0x2e0c0d['filters']=_[_0xc28c('0x35')](_0x2e0c0d['model'],_0x2e0c0d[_0xc28c('0x33')]);_0x1201b9[_0xc28c('0x36')]=_[_0xc28c('0x35')](_0x2e0c0d[_0xc28c('0x32')],qs[_0xc28c('0x4c')](_0x16bb9c[_0xc28c('0x33')][_0xc28c('0x4c')]));_0x1201b9[_0xc28c('0x36')]=_0x1201b9[_0xc28c('0x36')][_0xc28c('0x37')]?_0x1201b9[_0xc28c('0x36')]:_0x2e0c0d['model'];if(_0x16bb9c['query'][_0xc28c('0x43')]){_0x1201b9[_0xc28c('0x44')]=[{'all':!![]}];}_0x1201b9=_[_0xc28c('0x3f')]({},_0x1201b9,_0x16bb9c['options']);return db['Dashboard'][_0xc28c('0x4d')](_0x1201b9)[_0xc28c('0x2c')](handleEntityNotFound(_0x2e081b,null))[_0xc28c('0x2c')](respondWithResult(_0x2e081b,null))[_0xc28c('0x47')](handleError(_0x2e081b,null));};exports[_0xc28c('0x4e')]=function(_0xda45a4,_0x36a1b5){return db[_0xc28c('0x42')][_0xc28c('0x4e')](_0xda45a4[_0xc28c('0x4f')],{})[_0xc28c('0x2c')](function(_0x5ea654){var _0x4ae36c=_0xda45a4[_0xc28c('0x50')][_0xc28c('0x51')]({'plain':!![]});if(!_0x4ae36c)throw new Error(_0xc28c('0x52'));if(_0x4ae36c[_0xc28c('0x53')]===_0xc28c('0x50')){var _0x5d2f95=_0x5ea654['get']({'plain':!![]});var _0x449427=_0xc28c('0x29');return db[_0xc28c('0x54')]['find']({'where':{'name':_0x449427,'userProfileId':_0x4ae36c['userProfileId']},'raw':!![]})[_0xc28c('0x2c')](function(_0x2509fa){if(_0x2509fa&&_0x2509fa[_0xc28c('0x55')]===0x0){return db[_0xc28c('0x2a')][_0xc28c('0x4e')]({'name':_0x5d2f95['name'],'resourceId':_0x5d2f95['id'],'type':_0x2509fa[_0xc28c('0x30')],'sectionId':_0x2509fa['id']},{})[_0xc28c('0x2c')](function(){return _0x5ea654;});}else{return _0x5ea654;}})[_0xc28c('0x47')](function(_0x4dc795){logger['error'](_0xc28c('0x56'),_0x4dc795);throw _0x4dc795;});}return _0x5ea654;})[_0xc28c('0x2c')](respondWithResult(_0x36a1b5,0xc9))[_0xc28c('0x47')](handleError(_0x36a1b5,null));};exports['clone']=function(_0x23ea12,_0x189e71){var _0x45ea56={'where':{'id':_0x23ea12[_0xc28c('0x49')]['id']}},_0x570e03={};_0x570e03['model']=_[_0xc28c('0x4a')](db[_0xc28c('0x42')][_0xc28c('0x4b')]);_0x45ea56['attributes']=_[_0xc28c('0x35')](_0x570e03[_0xc28c('0x32')],qs[_0xc28c('0x4c')](_0x23ea12['query'][_0xc28c('0x4c')]));_0x45ea56[_0xc28c('0x36')]=_0x45ea56[_0xc28c('0x36')][_0xc28c('0x37')]?_0x45ea56['attributes']:_0x570e03['model'];if(_0x23ea12[_0xc28c('0x33')][_0xc28c('0x43')]){_0x45ea56[_0xc28c('0x44')]=[{'all':!![]}];}_0x45ea56=_[_0xc28c('0x3f')]({},_0x45ea56,_0x23ea12[_0xc28c('0x41')]);return db['Dashboard'][_0xc28c('0x4d')](_0x45ea56)[_0xc28c('0x2c')](handleEntityNotFound(_0x189e71,null))[_0xc28c('0x2c')](function(_0x522341){if(_0x522341){var _0x6a57de=_0x522341[_0xc28c('0x51')]({'plain':!![]});_0x6a57de=qs[_0xc28c('0x57')](_0x6a57de,['id','createdAt',_0xc28c('0x58')]);_0x23ea12[_0xc28c('0x4f')]=_[_0xc28c('0x57')](_0x23ea12[_0xc28c('0x4f')],['id','createdAt','updatedAt']);return db[_0xc28c('0x42')]['create'](_['merge'](_0x6a57de,_0x23ea12[_0xc28c('0x4f')]),{'include':_0x23ea12[_0xc28c('0x33')][_0xc28c('0x43')]?[{'all':!![]}]:undefined})['then'](function(_0x5cee68){var _0x27246e=_0x23ea12['user'][_0xc28c('0x51')]({'plain':!![]});if(!_0x27246e)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x27246e['role']==='user'){var _0x5a010c=_0x5cee68[_0xc28c('0x51')]({'plain':!![]});var _0x25df5c=_0xc28c('0x29');return db[_0xc28c('0x54')][_0xc28c('0x4d')]({'where':{'name':_0x25df5c,'userProfileId':_0x27246e[_0xc28c('0x59')]},'raw':!![]})[_0xc28c('0x2c')](function(_0x3443cb){if(_0x3443cb&&_0x3443cb['autoAssociation']===0x0){return db[_0xc28c('0x2a')][_0xc28c('0x4e')]({'name':_0x5a010c[_0xc28c('0x30')],'resourceId':_0x5a010c['id'],'type':_0x3443cb['name'],'sectionId':_0x3443cb['id']},{})[_0xc28c('0x2c')](function(){return _0x5cee68;});}else{return _0x5cee68;}})[_0xc28c('0x47')](function(_0x3ff5d7){logger[_0xc28c('0x2e')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x3ff5d7);throw _0x3ff5d7;});}return _0x5cee68;});}})[_0xc28c('0x2c')](respondWithResult(_0x189e71,0xc9))[_0xc28c('0x47')](handleError(_0x189e71,null));};exports[_0xc28c('0x28')]=function(_0xfd3285,_0x15dd72){if(_0xfd3285[_0xc28c('0x4f')]['id']){delete _0xfd3285['body']['id'];}return db['Dashboard'][_0xc28c('0x4d')]({'where':{'id':_0xfd3285['params']['id']}})['then'](handleEntityNotFound(_0x15dd72,null))[_0xc28c('0x2c')](saveUpdates(_0xfd3285[_0xc28c('0x4f')],null))[_0xc28c('0x2c')](respondWithResult(_0x15dd72,null))[_0xc28c('0x47')](handleError(_0x15dd72,null));};exports[_0xc28c('0x2b')]=function(_0x4a4a6e,_0x1e2723){return db[_0xc28c('0x42')]['find']({'where':{'id':_0x4a4a6e[_0xc28c('0x49')]['id']}})[_0xc28c('0x2c')](handleEntityNotFound(_0x1e2723,null))[_0xc28c('0x2c')](removeEntity(_0x1e2723,null))[_0xc28c('0x47')](handleError(_0x1e2723,null));};function widgetAttributes(_0x71dc41){try{switch(_0x71dc41[_0xc28c('0x40')]){case _0xc28c('0x5a'):return[{'name':_0xc28c('0x5b'),'value':_0x71dc41[_0xc28c('0x5b')]||(_0x71dc41['attrs']&&_0x71dc41[_0xc28c('0x5c')][0x0]?_0x71dc41[_0xc28c('0x5c')][0x0][_0xc28c('0x5d')]:undefined)||_0xc28c('0x5e')}];case _0xc28c('0x5f'):return[{'name':_0xc28c('0x60'),'value':_0x71dc41[_0xc28c('0x60')]||(_0x71dc41[_0xc28c('0x5c')]&&_0x71dc41[_0xc28c('0x5c')][0x0]?_0x71dc41[_0xc28c('0x5c')][0x0][_0xc28c('0x5d')]:undefined)||''}];case _0xc28c('0x61'):return[{'name':_0xc28c('0x62'),'value':_0x71dc41[_0xc28c('0x62')]||(_0x71dc41[_0xc28c('0x5c')]&&_0x71dc41[_0xc28c('0x5c')][0x0]?_0x71dc41['attrs'][0x0][_0xc28c('0x5d')]:undefined)||_0xc28c('0x63')},{'name':_0xc28c('0x64'),'value':_0x71dc41[_0xc28c('0x64')]||(_0x71dc41[_0xc28c('0x5c')]&&_0x71dc41[_0xc28c('0x5c')][0x1]?_0x71dc41[_0xc28c('0x5c')][0x1]['value']:undefined)||'0.00'},{'name':_0xc28c('0x65'),'value':_0x71dc41['attrFontSize']||(_0x71dc41[_0xc28c('0x5c')]&&_0x71dc41[_0xc28c('0x5c')][0x2]?_0x71dc41[_0xc28c('0x5c')][0x2][_0xc28c('0x5d')]:undefined)||0xc}];case _0xc28c('0x66'):return[{'name':_0xc28c('0x67'),'value':_0x71dc41[_0xc28c('0x67')]||(_0x71dc41[_0xc28c('0x5c')]&&_0x71dc41[_0xc28c('0x5c')][0x0]?_0x71dc41[_0xc28c('0x5c')][0x0][_0xc28c('0x5d')]:undefined)||_0xc28c('0x68')},{'name':'attrVoiceQueues','value':_0x71dc41[_0xc28c('0x69')]||(_0x71dc41[_0xc28c('0x5c')]&&_0x71dc41[_0xc28c('0x5c')][0x1]?_0x71dc41[_0xc28c('0x5c')][0x1]['value']:undefined)||[]},{'name':'attrFontSize','value':_0x71dc41['attrFontSize']||(_0x71dc41[_0xc28c('0x5c')]&&_0x71dc41[_0xc28c('0x5c')][0x2]?_0x71dc41[_0xc28c('0x5c')][0x2][_0xc28c('0x5d')]:undefined)||0x14}];case'multibar-chart':case _0xc28c('0x6a'):return[{'name':_0xc28c('0x6b'),'value':_0x71dc41['attrSerie1']||(_0x71dc41[_0xc28c('0x5c')]&&_0x71dc41[_0xc28c('0x5c')][0x0]?_0x71dc41[_0xc28c('0x5c')][0x0][_0xc28c('0x5d')]:undefined)||_0xc28c('0x68')},{'name':_0xc28c('0x6c'),'value':_0x71dc41[_0xc28c('0x6c')]||(_0x71dc41[_0xc28c('0x5c')]&&_0x71dc41[_0xc28c('0x5c')][0x1]?_0x71dc41['attrs'][0x1][_0xc28c('0x5d')]:undefined)||null},{'name':_0xc28c('0x6d'),'value':_0x71dc41[_0xc28c('0x6d')]||(_0x71dc41['attrs']&&_0x71dc41[_0xc28c('0x5c')][0x2]?_0x71dc41['attrs'][0x2][_0xc28c('0x5d')]:undefined)||null},{'name':_0xc28c('0x69'),'value':_0x71dc41['attrVoiceQueues']||(_0x71dc41[_0xc28c('0x5c')]&&_0x71dc41[_0xc28c('0x5c')][0x3]?_0x71dc41[_0xc28c('0x5c')][0x3][_0xc28c('0x5d')]:undefined)||[]}];case _0xc28c('0x6e'):return[{'name':'attrReport','type':_0x71dc41[_0xc28c('0x6f')]||(_0x71dc41['attrs']&&_0x71dc41[_0xc28c('0x5c')][0x0]?_0x71dc41[_0xc28c('0x5c')][0x0][_0xc28c('0x40')]:undefined)||null,'value':_0x71dc41[_0xc28c('0x70')]||(_0x71dc41[_0xc28c('0x5c')]&&_0x71dc41[_0xc28c('0x5c')][0x0]?_0x71dc41[_0xc28c('0x5c')][0x0][_0xc28c('0x5d')]:undefined)||null},{'name':_0xc28c('0x71'),'value':_0x71dc41[_0xc28c('0x71')]||(_0x71dc41[_0xc28c('0x5c')]&&_0x71dc41[_0xc28c('0x5c')][0x1]?_0x71dc41[_0xc28c('0x5c')][0x1][_0xc28c('0x5d')]:undefined)||0x0}];default:return[];}}catch(_0x3151d0){logger[_0xc28c('0x2e')](_0xc28c('0x72'),JSON[_0xc28c('0x73')](_0x3151d0));return[];}}exports['addItem']=function(_0x1289cf,_0x42da72,_0xf908f4){if(_0x1289cf[_0xc28c('0x4f')]['id']){delete _0x1289cf[_0xc28c('0x4f')]['id'];}return db[_0xc28c('0x42')][_0xc28c('0x4d')]({'where':{'id':_0x1289cf[_0xc28c('0x49')]['id']}})[_0xc28c('0x2c')](handleEntityNotFound(_0x42da72,null))[_0xc28c('0x2c')](function(_0x2c20ac){if(_0x2c20ac){_0x1289cf[_0xc28c('0x4f')][_0xc28c('0x74')]=_0x2c20ac['id'];_0x1289cf[_0xc28c('0x4f')][_0xc28c('0x5c')]=widgetAttributes(_0x1289cf[_0xc28c('0x4f')]);return db[_0xc28c('0x75')][_0xc28c('0x4e')](_0x1289cf[_0xc28c('0x4f')]);}})['then'](respondWithResult(_0x42da72,null))[_0xc28c('0x47')](handleError(_0x42da72,null));};exports[_0xc28c('0x76')]=function(_0x12d0cd,_0x132ab9,_0x1fab64){var _0x1b10c0={};var _0x210af8={};var _0x4c3cf0;var _0x1a8944;return db[_0xc28c('0x42')][_0xc28c('0x77')]({'where':{'id':_0x12d0cd['params']['id']}})[_0xc28c('0x2c')](handleEntityNotFound(_0x132ab9,null))['then'](function(_0xb0b3e3){if(_0xb0b3e3){_0x4c3cf0=_0xb0b3e3;_0x210af8[_0xc28c('0x32')]=_[_0xc28c('0x4a')](db['DashboardItem']['rawAttributes']);_0x210af8['query']=_['keys'](_0x12d0cd[_0xc28c('0x33')]);_0x210af8[_0xc28c('0x34')]=_[_0xc28c('0x35')](_0x210af8[_0xc28c('0x32')],_0x210af8[_0xc28c('0x33')]);_0x1b10c0[_0xc28c('0x36')]=_[_0xc28c('0x35')](_0x210af8[_0xc28c('0x32')],qs[_0xc28c('0x4c')](_0x12d0cd['query'][_0xc28c('0x4c')]));_0x1b10c0['attributes']=_0x1b10c0[_0xc28c('0x36')]['length']?_0x1b10c0[_0xc28c('0x36')]:_0x210af8[_0xc28c('0x32')];_0x1b10c0[_0xc28c('0x3a')]=qs['sort'](_0x12d0cd[_0xc28c('0x33')]['sort']);_0x1b10c0['where']=qs['filters'](_[_0xc28c('0x3c')](_0x12d0cd[_0xc28c('0x33')],_0x210af8['filters']));if(_0x12d0cd[_0xc28c('0x33')][_0xc28c('0x3d')]){_0x1b10c0[_0xc28c('0x3e')]=_[_0xc28c('0x3f')](_0x1b10c0[_0xc28c('0x3e')],{'$or':_['map'](_0x1b10c0[_0xc28c('0x36')],function(_0x121f29){var _0x4cbdde={};_0x4cbdde[_0x121f29]={'$like':'%'+_0x12d0cd[_0xc28c('0x33')][_0xc28c('0x3d')]+'%'};return _0x4cbdde;})});}_0x1b10c0=_[_0xc28c('0x3f')]({},_0x1b10c0,_0x12d0cd[_0xc28c('0x41')]);return _0x4c3cf0[_0xc28c('0x76')](_0x1b10c0);}})['then'](function(_0x183855){if(_0x183855){_0x1a8944=_0x183855[_0xc28c('0x37')];if(!_0x12d0cd['query'][_0xc28c('0x38')](_0xc28c('0x39'))){_0x1b10c0['limit']=qs[_0xc28c('0x21')](_0x12d0cd[_0xc28c('0x33')][_0xc28c('0x21')]);_0x1b10c0['offset']=qs[_0xc28c('0x20')](_0x12d0cd[_0xc28c('0x33')][_0xc28c('0x20')]);}return _0x4c3cf0[_0xc28c('0x76')](_0x1b10c0);}})[_0xc28c('0x2c')](function(_0x448bd1){if(_0x448bd1){return _0x448bd1?{'count':_0x1a8944,'rows':_0x448bd1}:null;}})[_0xc28c('0x2c')](respondWithResult(_0x132ab9,null))[_0xc28c('0x47')](handleError(_0x132ab9,null));}; \ No newline at end of file diff --git a/server/api/dashboard/dashboard.events.js b/server/api/dashboard/dashboard.events.js index 52c83b8..bd36e67 100644 --- a/server/api/dashboard/dashboard.events.js +++ b/server/api/dashboard/dashboard.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x250c=['exports','../../mysqldb','Dashboard','setMaxListeners','save','update','remove','emit'];(function(_0x1b8524,_0x1bb669){var _0x81418d=function(_0x5f5795){while(--_0x5f5795){_0x1b8524['push'](_0x1b8524['shift']());}};_0x81418d(++_0x1bb669);}(_0x250c,0x191));var _0xc250=function(_0x42362d,_0x216a31){_0x42362d=_0x42362d-0x0;var _0x2bf4d0=_0x250c[_0x42362d];return _0x2bf4d0;};'use strict';var EventEmitter=require('events');var Dashboard=require(_0xc250('0x0'))['db'][_0xc250('0x1')];var DashboardEvents=new EventEmitter();DashboardEvents[_0xc250('0x2')](0x0);var events={'afterCreate':_0xc250('0x3'),'afterUpdate':_0xc250('0x4'),'afterDestroy':_0xc250('0x5')};function emitEvent(_0x263e78){return function(_0x65373d,_0x5c899e,_0x260683){DashboardEvents[_0xc250('0x6')](_0x263e78+':'+_0x65373d['id'],_0x65373d);DashboardEvents[_0xc250('0x6')](_0x263e78,_0x65373d);_0x260683(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];Dashboard['hook'](e,emitEvent(event));}}module[_0xc250('0x7')]=DashboardEvents; \ No newline at end of file +var _0xb4da=['../../mysqldb','Dashboard','setMaxListeners','save','update','remove','emit','hook','exports','events'];(function(_0x53b53e,_0x498437){var _0xbb6179=function(_0x3975eb){while(--_0x3975eb){_0x53b53e['push'](_0x53b53e['shift']());}};_0xbb6179(++_0x498437);}(_0xb4da,0x135));var _0xab4d=function(_0x543229,_0x48bd15){_0x543229=_0x543229-0x0;var _0x3ae8f4=_0xb4da[_0x543229];return _0x3ae8f4;};'use strict';var EventEmitter=require(_0xab4d('0x0'));var Dashboard=require(_0xab4d('0x1'))['db'][_0xab4d('0x2')];var DashboardEvents=new EventEmitter();DashboardEvents[_0xab4d('0x3')](0x0);var events={'afterCreate':_0xab4d('0x4'),'afterUpdate':_0xab4d('0x5'),'afterDestroy':_0xab4d('0x6')};function emitEvent(_0x5e7536){return function(_0x272380,_0x3fc1af,_0x307144){DashboardEvents[_0xab4d('0x7')](_0x5e7536+':'+_0x272380['id'],_0x272380);DashboardEvents['emit'](_0x5e7536,_0x272380);_0x307144(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];Dashboard[_0xab4d('0x8')](e,emitEvent(event));}}module[_0xab4d('0x9')]=DashboardEvents; \ No newline at end of file diff --git a/server/api/dashboard/dashboard.model.js b/server/api/dashboard/dashboard.model.js index 7dec70d..00325dd 100644 --- a/server/api/dashboard/dashboard.model.js +++ b/server/api/dashboard/dashboard.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2ba3=['define','dashboards','util','../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment','./dashboard.attributes'];(function(_0x5006b6,_0x29eda1){var _0xb187b1=function(_0x423455){while(--_0x423455){_0x5006b6['push'](_0x5006b6['shift']());}};_0xb187b1(++_0x29eda1);}(_0x2ba3,0x1af));var _0x32ba=function(_0x4dcaf1,_0x4a18d8){_0x4dcaf1=_0x4dcaf1-0x0;var _0x2fd321=_0x2ba3[_0x4dcaf1];return _0x2fd321;};'use strict';var _=require('lodash');var util=require(_0x32ba('0x0'));var logger=require(_0x32ba('0x1'))(_0x32ba('0x2'));var moment=require(_0x32ba('0x3'));var BPromise=require(_0x32ba('0x4'));var rp=require(_0x32ba('0x5'));var fs=require('fs');var path=require(_0x32ba('0x6'));var rimraf=require('rimraf');var config=require(_0x32ba('0x7'));var attributes=require(_0x32ba('0x8'));module['exports']=function(_0x408ec2,_0x46ff2b){return _0x408ec2[_0x32ba('0x9')]('Dashboard',attributes,{'tableName':_0x32ba('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x36b1=['exports','define','Dashboard','lodash','util','../../config/logger','path','../../config/environment','./dashboard.attributes'];(function(_0x3f9360,_0x562293){var _0x48c277=function(_0x14e994){while(--_0x14e994){_0x3f9360['push'](_0x3f9360['shift']());}};_0x48c277(++_0x562293);}(_0x36b1,0x1aa));var _0x136b=function(_0x5bfdd7,_0x21d254){_0x5bfdd7=_0x5bfdd7-0x0;var _0x2b411f=_0x36b1[_0x5bfdd7];return _0x2b411f;};'use strict';var _=require(_0x136b('0x0'));var util=require(_0x136b('0x1'));var logger=require(_0x136b('0x2'))('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x136b('0x3'));var rimraf=require('rimraf');var config=require(_0x136b('0x4'));var attributes=require(_0x136b('0x5'));module[_0x136b('0x6')]=function(_0x2240a6,_0x5a8f24){return _0x2240a6[_0x136b('0x7')](_0x136b('0x8'),attributes,{'tableName':'dashboards','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/dashboard/dashboard.rpc.js b/server/api/dashboard/dashboard.rpc.js index 78e9f34..8d6c75d 100644 --- a/server/api/dashboard/dashboard.rpc.js +++ b/server/api/dashboard/dashboard.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb66b=['bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','redis','defaults','localhost','./dashboard.socket','request','then','info','debug','Dashboard,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','Dashboard,\x20%s,\x20%s','message','catch','util','moment'];(function(_0x164760,_0x5874b0){var _0x8b91b2=function(_0x40d20a){while(--_0x40d20a){_0x164760['push'](_0x164760['shift']());}};_0x8b91b2(++_0x5874b0);}(_0xb66b,0x9a));var _0xbb66=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xb66b[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require(_0xbb66('0x0'));var moment=require(_0xbb66('0x1'));var BPromise=require(_0xbb66('0x2'));var rs=require(_0xbb66('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xbb66('0x4'))['db'];var utils=require(_0xbb66('0x5'));var logger=require(_0xbb66('0x6'))(_0xbb66('0x7'));var config=require(_0xbb66('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xbb66('0x9')][_0xbb66('0xa')]({'port':0x232a});config[_0xbb66('0xb')]=_[_0xbb66('0xc')](config[_0xbb66('0xb')],{'host':_0xbb66('0xd'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xbb66('0xb')]));require(_0xbb66('0xe'))['register'](socket);function respondWithRpcPromise(_0x1c2cc1,_0x3f21df,_0x90601c){return new BPromise(function(_0xc5c757,_0x185fa7){return client[_0xbb66('0xf')](_0x1c2cc1,_0x90601c)[_0xbb66('0x10')](function(_0x1f7366){logger[_0xbb66('0x11')]('Dashboard,\x20%s,\x20%s',_0x3f21df,'request\x20sent');logger[_0xbb66('0x12')](_0xbb66('0x13'),_0x3f21df,_0xbb66('0x14'),JSON[_0xbb66('0x15')](_0x1f7366));if(_0x1f7366[_0xbb66('0x16')]){if(_0x1f7366[_0xbb66('0x16')]['code']===0x1f4){logger[_0xbb66('0x16')](_0xbb66('0x17'),_0x3f21df,_0x1f7366[_0xbb66('0x16')]['message']);return _0x185fa7(_0x1f7366['error'][_0xbb66('0x18')]);}logger[_0xbb66('0x16')](_0xbb66('0x17'),_0x3f21df,_0x1f7366['error'][_0xbb66('0x18')]);return _0xc5c757(_0x1f7366[_0xbb66('0x16')][_0xbb66('0x18')]);}else{logger[_0xbb66('0x11')](_0xbb66('0x17'),_0x3f21df,_0xbb66('0x14'));_0xc5c757(_0x1f7366['result']['message']);}})[_0xbb66('0x19')](function(_0x2641e7){logger[_0xbb66('0x16')](_0xbb66('0x17'),_0x3f21df,_0x2641e7);_0x185fa7(_0x2641e7);});});} \ No newline at end of file +var _0x8c31=['result','catch','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','jayson/promise','client','redis','defaults','localhost','socket.io-emitter','./dashboard.socket','register','info','Dashboard,\x20%s,\x20%s','debug','Dashboard,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message'];(function(_0x1e23b8,_0x4690f9){var _0x11f0f3=function(_0x4f2718){while(--_0x4f2718){_0x1e23b8['push'](_0x1e23b8['shift']());}};_0x11f0f3(++_0x4690f9);}(_0x8c31,0x98));var _0x18c3=function(_0xba5a3f,_0x166b10){_0xba5a3f=_0xba5a3f-0x0;var _0x21d8e2=_0x8c31[_0xba5a3f];return _0x21d8e2;};'use strict';var _=require('lodash');var util=require(_0x18c3('0x0'));var moment=require('moment');var BPromise=require(_0x18c3('0x1'));var rs=require(_0x18c3('0x2'));var fs=require('fs');var Redis=require(_0x18c3('0x3'));var db=require(_0x18c3('0x4'))['db'];var utils=require(_0x18c3('0x5'));var logger=require('../../config/logger')(_0x18c3('0x6'));var config=require('../../config/environment');var jayson=require(_0x18c3('0x7'));var client=jayson[_0x18c3('0x8')]['http']({'port':0x232a});config[_0x18c3('0x9')]=_[_0x18c3('0xa')](config[_0x18c3('0x9')],{'host':_0x18c3('0xb'),'port':0x18eb});var socket=require(_0x18c3('0xc'))(new Redis(config[_0x18c3('0x9')]));require(_0x18c3('0xd'))[_0x18c3('0xe')](socket);function respondWithRpcPromise(_0x5c0e9f,_0x16dac9,_0x4a210c){return new BPromise(function(_0x9205be,_0x243cb7){return client['request'](_0x5c0e9f,_0x4a210c)['then'](function(_0x1491ac){logger[_0x18c3('0xf')](_0x18c3('0x10'),_0x16dac9,'request\x20sent');logger[_0x18c3('0x11')](_0x18c3('0x12'),_0x16dac9,_0x18c3('0x13'),JSON[_0x18c3('0x14')](_0x1491ac));if(_0x1491ac[_0x18c3('0x15')]){if(_0x1491ac[_0x18c3('0x15')]['code']===0x1f4){logger[_0x18c3('0x15')](_0x18c3('0x10'),_0x16dac9,_0x1491ac[_0x18c3('0x15')][_0x18c3('0x16')]);return _0x243cb7(_0x1491ac[_0x18c3('0x15')][_0x18c3('0x16')]);}logger[_0x18c3('0x15')](_0x18c3('0x10'),_0x16dac9,_0x1491ac[_0x18c3('0x15')][_0x18c3('0x16')]);return _0x9205be(_0x1491ac[_0x18c3('0x15')][_0x18c3('0x16')]);}else{logger[_0x18c3('0xf')](_0x18c3('0x10'),_0x16dac9,_0x18c3('0x13'));_0x9205be(_0x1491ac[_0x18c3('0x17')][_0x18c3('0x16')]);}})[_0x18c3('0x18')](function(_0x48685c){logger[_0x18c3('0x15')](_0x18c3('0x10'),_0x16dac9,_0x48685c);_0x243cb7(_0x48685c);});});} \ No newline at end of file diff --git a/server/api/dashboard/dashboard.socket.js b/server/api/dashboard/dashboard.socket.js index 6a0a2d6..5223ecf 100644 --- a/server/api/dashboard/dashboard.socket.js +++ b/server/api/dashboard/dashboard.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8984=['remove','update','emit','register','length','dashboard:','save'];(function(_0xaae4e3,_0x48c9db){var _0x68e5d7=function(_0x4fc6b){while(--_0x4fc6b){_0xaae4e3['push'](_0xaae4e3['shift']());}};_0x68e5d7(++_0x48c9db);}(_0x8984,0x164));var _0x4898=function(_0x25a475,_0x515af9){_0x25a475=_0x25a475-0x0;var _0x3b3464=_0x8984[_0x25a475];return _0x3b3464;};'use strict';var DashboardEvents=require('./dashboard.events');var events=[_0x4898('0x0'),_0x4898('0x1'),_0x4898('0x2')];function createListener(_0x582a14,_0x397c63){return function(_0x246912){_0x397c63[_0x4898('0x3')](_0x582a14,_0x246912);};}function removeListener(_0x5066d4,_0x2d976e){return function(){DashboardEvents['removeListener'](_0x5066d4,_0x2d976e);};}exports[_0x4898('0x4')]=function(_0xd136cd){for(var _0x2a56c4=0x0,_0x2351eb=events[_0x4898('0x5')];_0x2a56c4<_0x2351eb;_0x2a56c4++){var _0x4e394c=events[_0x2a56c4];var _0x38bc09=createListener(_0x4898('0x6')+_0x4e394c,_0xd136cd);DashboardEvents['on'](_0x4e394c,_0x38bc09);}}; \ No newline at end of file +var _0x8e2a=['dashboard:','save','remove','update','emit','removeListener','register'];(function(_0x3351d9,_0x29ff0b){var _0x2cdb0f=function(_0x18870c){while(--_0x18870c){_0x3351d9['push'](_0x3351d9['shift']());}};_0x2cdb0f(++_0x29ff0b);}(_0x8e2a,0x1c1));var _0xa8e2=function(_0x49068f,_0x6540b6){_0x49068f=_0x49068f-0x0;var _0x1dda4d=_0x8e2a[_0x49068f];return _0x1dda4d;};'use strict';var DashboardEvents=require('./dashboard.events');var events=[_0xa8e2('0x0'),_0xa8e2('0x1'),_0xa8e2('0x2')];function createListener(_0x1d9918,_0x159847){return function(_0xb53107){_0x159847[_0xa8e2('0x3')](_0x1d9918,_0xb53107);};}function removeListener(_0x2290f5,_0x468934){return function(){DashboardEvents[_0xa8e2('0x4')](_0x2290f5,_0x468934);};}exports[_0xa8e2('0x5')]=function(_0x256c28){for(var _0x38868d=0x0,_0x6a982=events['length'];_0x38868d<_0x6a982;_0x38868d++){var _0xba3e9b=events[_0x38868d];var _0x58b8c7=createListener(_0xa8e2('0x6')+_0xba3e9b,_0x256c28);DashboardEvents['on'](_0xba3e9b,_0x58b8c7);}}; \ No newline at end of file diff --git a/server/api/dashboard/index.js b/server/api/dashboard/index.js index 32d9be6..c553714 100644 --- a/server/api/dashboard/index.js +++ b/server/api/dashboard/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x40ac=['express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/:id','show','post','create','/:id/clone','clone','/:id/items','addItem','put','delete','destroy','exports','multer','util','connect-timeout'];(function(_0x325e09,_0x5e1183){var _0x28ec33=function(_0x199299){while(--_0x199299){_0x325e09['push'](_0x325e09['shift']());}};_0x28ec33(++_0x5e1183);}(_0x40ac,0x8d));var _0xc40a=function(_0x106f2d,_0x21645f){_0x106f2d=_0x106f2d-0x0;var _0x11200d=_0x40ac[_0x106f2d];return _0x11200d;};'use strict';var multer=require(_0xc40a('0x0'));var util=require(_0xc40a('0x1'));var path=require('path');var timeout=require(_0xc40a('0x2'));var express=require(_0xc40a('0x3'));var router=express[_0xc40a('0x4')]();var fs_extra=require(_0xc40a('0x5'));var auth=require(_0xc40a('0x6'));var interaction=require(_0xc40a('0x7'));var config=require(_0xc40a('0x8'));var controller=require('./dashboard.controller');router[_0xc40a('0x9')]('/',auth[_0xc40a('0xa')](),controller[_0xc40a('0xb')]);router[_0xc40a('0x9')](_0xc40a('0xc'),auth['isAuthenticated'](),controller[_0xc40a('0xd')]);router[_0xc40a('0x9')]('/:id/items',auth[_0xc40a('0xa')](),controller['getItems']);router[_0xc40a('0xe')]('/',auth['isAuthenticated'](),controller[_0xc40a('0xf')]);router[_0xc40a('0xe')](_0xc40a('0x10'),auth[_0xc40a('0xa')](),controller[_0xc40a('0x11')]);router[_0xc40a('0xe')](_0xc40a('0x12'),auth['isAuthenticated'](),controller[_0xc40a('0x13')]);router[_0xc40a('0x14')](_0xc40a('0xc'),auth[_0xc40a('0xa')](),controller['update']);router[_0xc40a('0x15')]('/:id',auth[_0xc40a('0xa')](),controller[_0xc40a('0x16')]);module[_0xc40a('0x17')]=router; \ No newline at end of file +var _0xe070=['put','/:id','delete','destroy','multer','util','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','get','index','show','/:id/items','isAuthenticated','getItems','post','create','addItem'];(function(_0x24237f,_0x4cf32c){var _0x48298e=function(_0x3f7511){while(--_0x3f7511){_0x24237f['push'](_0x24237f['shift']());}};_0x48298e(++_0x4cf32c);}(_0xe070,0x1e7));var _0x0e07=function(_0x2872b0,_0x4b0855){_0x2872b0=_0x2872b0-0x0;var _0x58b379=_0xe070[_0x2872b0];return _0x58b379;};'use strict';var multer=require(_0x0e07('0x0'));var util=require(_0x0e07('0x1'));var path=require('path');var timeout=require(_0x0e07('0x2'));var express=require(_0x0e07('0x3'));var router=express[_0x0e07('0x4')]();var fs_extra=require(_0x0e07('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x0e07('0x6'));var config=require(_0x0e07('0x7'));var controller=require('./dashboard.controller');router[_0x0e07('0x8')]('/',auth['isAuthenticated'](),controller[_0x0e07('0x9')]);router['get']('/:id',auth['isAuthenticated'](),controller[_0x0e07('0xa')]);router[_0x0e07('0x8')](_0x0e07('0xb'),auth[_0x0e07('0xc')](),controller[_0x0e07('0xd')]);router[_0x0e07('0xe')]('/',auth[_0x0e07('0xc')](),controller[_0x0e07('0xf')]);router[_0x0e07('0xe')]('/:id/clone',auth['isAuthenticated'](),controller['clone']);router[_0x0e07('0xe')](_0x0e07('0xb'),auth['isAuthenticated'](),controller[_0x0e07('0x10')]);router[_0x0e07('0x11')](_0x0e07('0x12'),auth[_0x0e07('0xc')](),controller['update']);router[_0x0e07('0x13')]('/:id',auth[_0x0e07('0xc')](),controller[_0x0e07('0x14')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/dashboardItem/dashboardItem.attributes.js b/server/api/dashboardItem/dashboardItem.attributes.js index 7eecf5d..2aeaaf4 100644 --- a/server/api/dashboardItem/dashboardItem.attributes.js +++ b/server/api/dashboardItem/dashboardItem.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2bd8=['TEXT','long','parse','attrs','stringify','setDataValue','INTEGER','sequelize','lodash','exports','STRING'];(function(_0x1c6940,_0x4f3430){var _0x5ac509=function(_0x474f59){while(--_0x474f59){_0x1c6940['push'](_0x1c6940['shift']());}};_0x5ac509(++_0x4f3430);}(_0x2bd8,0x130));var _0x82bd=function(_0x459a1e,_0x13f5a2){_0x459a1e=_0x459a1e-0x0;var _0x61bfed=_0x2bd8[_0x459a1e];return _0x61bfed;};'use strict';var Sequelize=require(_0x82bd('0x0'));var squel=require('squel');var _=require(_0x82bd('0x1'));module[_0x82bd('0x2')]={'title':{'type':Sequelize[_0x82bd('0x3')],'allowNull':![]},'type':{'type':Sequelize[_0x82bd('0x3')](0x14),'allowNull':![],'validate':{'len':[0x1,0x14]}},'attrs':{'type':Sequelize[_0x82bd('0x4')](_0x82bd('0x5')),'get':function(){try{return JSON[_0x82bd('0x6')](this['getDataValue'](_0x82bd('0x7')));}catch(_0x2e1a98){return[];}},'set':function(_0x3bf810){try{this['setDataValue'](_0x82bd('0x7'),JSON[_0x82bd('0x8')](_0x3bf810));}catch(_0x226f60){this[_0x82bd('0x9')]('attrs',JSON[_0x82bd('0x8')]([]));}}},'sizeX':{'type':Sequelize['INTEGER'],'allowNull':![],'defaultValue':0x1},'sizeY':{'type':Sequelize['INTEGER'],'allowNull':![],'defaultValue':0x1},'row':{'type':Sequelize['INTEGER']},'col':{'type':Sequelize[_0x82bd('0xa')]},'background':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':'#ffffff','validate':{'notEmpty':!![]}},'foreground':{'type':Sequelize[_0x82bd('0x3')],'allowNull':![],'defaultValue':'#2196f3','validate':{'notEmpty':!![]}},'link':{'type':Sequelize['STRING']},'titleFontSize':{'type':Sequelize[_0x82bd('0xa')],'defaultValue':0xc}}; \ No newline at end of file +var _0x01d9=['INTEGER','#ffffff','#2196f3','sequelize','squel','lodash','exports','STRING','TEXT','long','parse','getDataValue','attrs','setDataValue','stringify'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x01d9,0x6c));var _0x901d=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x01d9[_0x20a584];return _0x4b41a8;};'use strict';var Sequelize=require(_0x901d('0x0'));var squel=require(_0x901d('0x1'));var _=require(_0x901d('0x2'));module[_0x901d('0x3')]={'title':{'type':Sequelize['STRING'],'allowNull':![]},'type':{'type':Sequelize[_0x901d('0x4')](0x14),'allowNull':![],'validate':{'len':[0x1,0x14]}},'attrs':{'type':Sequelize[_0x901d('0x5')](_0x901d('0x6')),'get':function(){try{return JSON[_0x901d('0x7')](this[_0x901d('0x8')](_0x901d('0x9')));}catch(_0xb96b86){return[];}},'set':function(_0x4e7842){try{this[_0x901d('0xa')](_0x901d('0x9'),JSON[_0x901d('0xb')](_0x4e7842));}catch(_0x12c39f){this[_0x901d('0xa')](_0x901d('0x9'),JSON[_0x901d('0xb')]([]));}}},'sizeX':{'type':Sequelize[_0x901d('0xc')],'allowNull':![],'defaultValue':0x1},'sizeY':{'type':Sequelize[_0x901d('0xc')],'allowNull':![],'defaultValue':0x1},'row':{'type':Sequelize[_0x901d('0xc')]},'col':{'type':Sequelize[_0x901d('0xc')]},'background':{'type':Sequelize[_0x901d('0x4')],'allowNull':![],'defaultValue':_0x901d('0xd'),'validate':{'notEmpty':!![]}},'foreground':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x901d('0xe'),'validate':{'notEmpty':!![]}},'link':{'type':Sequelize['STRING']},'titleFontSize':{'type':Sequelize[_0x901d('0xc')],'defaultValue':0xc}}; \ No newline at end of file diff --git a/server/api/dashboardItem/dashboardItem.controller.js b/server/api/dashboardItem/dashboardItem.controller.js index 929cf61..64de295 100644 --- a/server/api/dashboardItem/dashboardItem.controller.js +++ b/server/api/dashboardItem/dashboardItem.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5d0f=['attrFontSize','counter','total','attrVoiceQueues','multibar-chart','pie-chart','attrSerie2','attrSerie3','web-report','attrReport','reportType','attrRefresh','widgetAttributes:\x20%s','body','create','eml-format','rimraf','request-promise','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./dashboardItem.socket','status','end','offset','undefined','limit','count','set','Content-Range','json','apply','reject','save','update','then','destroy','error','stack','name','send','show','model','keys','DashboardItem','rawAttributes','query','filters','intersection','attributes','fields','length','includeAll','merge','options','find','catch','params','type','iframe','attrUrl','attrs','value','https://','custom','attrPath','clock','attrHourFormat','HH:mm:ss','attrTimezone','0.00'];(function(_0x2e7426,_0x21caa7){var _0x4ddeb6=function(_0x37c23c){while(--_0x37c23c){_0x2e7426['push'](_0x2e7426['shift']());}};_0x4ddeb6(++_0x21caa7);}(_0x5d0f,0x126));var _0xf5d0=function(_0x319cb9,_0x4b8d35){_0x319cb9=_0x319cb9-0x0;var _0x1735fc=_0x5d0f[_0x319cb9];return _0x1735fc;};'use strict';var emlformat=require(_0xf5d0('0x0'));var rimraf=require(_0xf5d0('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xf5d0('0x2'));var moment=require('moment');var BPromise=require(_0xf5d0('0x3'));var Mustache=require(_0xf5d0('0x4'));var util=require('util');var path=require(_0xf5d0('0x5'));var sox=require(_0xf5d0('0x6'));var csv=require(_0xf5d0('0x7'));var ejs=require(_0xf5d0('0x8'));var fs=require('fs');var fs_extra=require(_0xf5d0('0x9'));var _=require(_0xf5d0('0xa'));var squel=require('squel');var crypto=require(_0xf5d0('0xb'));var jsforce=require(_0xf5d0('0xc'));var deskjs=require(_0xf5d0('0xd'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0xf5d0('0xe'));var authService=require(_0xf5d0('0xf'));var qs=require(_0xf5d0('0x10'));var as=require(_0xf5d0('0x11'));var hardwareService=require(_0xf5d0('0x12'));var logger=require(_0xf5d0('0x13'))(_0xf5d0('0x14'));var utils=require(_0xf5d0('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0xf5d0('0x16'));var db=require(_0xf5d0('0x17'))['db'];config[_0xf5d0('0x18')]=_[_0xf5d0('0x19')](config[_0xf5d0('0x18')],{'host':_0xf5d0('0x1a'),'port':0x18eb});var socket=require(_0xf5d0('0x1b'))(new Redis(config[_0xf5d0('0x18')]));require(_0xf5d0('0x1c'))['register'](socket);function respondWithStatusCode(_0x2586ef,_0x25aa16){_0x25aa16=_0x25aa16||0xcc;return function(_0x194510){if(_0x194510){return _0x2586ef['sendStatus'](_0x25aa16);}return _0x2586ef[_0xf5d0('0x1d')](_0x25aa16)[_0xf5d0('0x1e')]();};}function respondWithResult(_0x2caa2a,_0x35692e){_0x35692e=_0x35692e||0xc8;return function(_0x96e0cb){if(_0x96e0cb){return _0x2caa2a['status'](_0x35692e)['json'](_0x96e0cb);}};}function respondWithFilteredResult(_0xe4b01e,_0x81eff){return function(_0xdd40ca){if(_0xdd40ca){var _0x1540d3=typeof _0x81eff[_0xf5d0('0x1f')]===_0xf5d0('0x20')&&typeof _0x81eff[_0xf5d0('0x21')]===_0xf5d0('0x20');var _0x1a53d8=_0xdd40ca[_0xf5d0('0x22')];var _0xec8470=_0x1540d3?0x0:_0x81eff[_0xf5d0('0x1f')];var _0xa2ecdf=_0x1540d3?_0xdd40ca[_0xf5d0('0x22')]:_0x81eff[_0xf5d0('0x1f')]+_0x81eff['limit'];var _0x5916d7;if(_0xa2ecdf>=_0x1a53d8){_0xa2ecdf=_0x1a53d8;_0x5916d7=0xc8;}else{_0x5916d7=0xce;}_0xe4b01e[_0xf5d0('0x1d')](_0x5916d7);return _0xe4b01e[_0xf5d0('0x23')](_0xf5d0('0x24'),_0xec8470+'-'+_0xa2ecdf+'/'+_0x1a53d8)[_0xf5d0('0x25')](_0xdd40ca);}return null;};}function patchUpdates(_0x337b8a){return function(_0x53f4ae){try{jsonpatch[_0xf5d0('0x26')](_0x53f4ae,_0x337b8a,!![]);}catch(_0x51e73d){return BPromise[_0xf5d0('0x27')](_0x51e73d);}return _0x53f4ae[_0xf5d0('0x28')]();};}function saveUpdates(_0x285bee,_0x277125){return function(_0x1713d3){if(_0x1713d3){return _0x1713d3[_0xf5d0('0x29')](_0x285bee)[_0xf5d0('0x2a')](function(_0x2ea20e){return _0x2ea20e;});}return null;};}function removeEntity(_0x4a915e,_0x1fd079){return function(_0xf80ab1){if(_0xf80ab1){return _0xf80ab1[_0xf5d0('0x2b')]()['then'](function(){_0x4a915e[_0xf5d0('0x1d')](0xcc)[_0xf5d0('0x1e')]();});}};}function handleEntityNotFound(_0x4d281d,_0x4b69de){return function(_0x19263a){if(!_0x19263a){_0x4d281d['sendStatus'](0x194);}return _0x19263a;};}function handleError(_0x2258c5,_0x1505d9){_0x1505d9=_0x1505d9||0x1f4;return function(_0x32fd5b){logger[_0xf5d0('0x2c')](_0x32fd5b[_0xf5d0('0x2d')]);if(_0x32fd5b[_0xf5d0('0x2e')]){delete _0x32fd5b[_0xf5d0('0x2e')];}_0x2258c5[_0xf5d0('0x1d')](_0x1505d9)[_0xf5d0('0x2f')](_0x32fd5b);};}exports[_0xf5d0('0x30')]=function(_0x556d6d,_0x4d8ba5){var _0x2cfcbd={'raw':![],'where':{'id':_0x556d6d['params']['id']}},_0x18ddd0={};_0x18ddd0[_0xf5d0('0x31')]=_[_0xf5d0('0x32')](db[_0xf5d0('0x33')][_0xf5d0('0x34')]);_0x18ddd0[_0xf5d0('0x35')]=_[_0xf5d0('0x32')](_0x556d6d[_0xf5d0('0x35')]);_0x18ddd0[_0xf5d0('0x36')]=_[_0xf5d0('0x37')](_0x18ddd0[_0xf5d0('0x31')],_0x18ddd0['query']);_0x2cfcbd[_0xf5d0('0x38')]=_[_0xf5d0('0x37')](_0x18ddd0['model'],qs[_0xf5d0('0x39')](_0x556d6d[_0xf5d0('0x35')]['fields']));_0x2cfcbd[_0xf5d0('0x38')]=_0x2cfcbd[_0xf5d0('0x38')][_0xf5d0('0x3a')]?_0x2cfcbd[_0xf5d0('0x38')]:_0x18ddd0[_0xf5d0('0x31')];if(_0x556d6d['query'][_0xf5d0('0x3b')]){_0x2cfcbd['include']=[{'all':!![]}];}_0x2cfcbd=_[_0xf5d0('0x3c')]({},_0x2cfcbd,_0x556d6d[_0xf5d0('0x3d')]);return db[_0xf5d0('0x33')][_0xf5d0('0x3e')](_0x2cfcbd)[_0xf5d0('0x2a')](handleEntityNotFound(_0x4d8ba5,null))[_0xf5d0('0x2a')](respondWithResult(_0x4d8ba5,null))[_0xf5d0('0x3f')](handleError(_0x4d8ba5,null));};exports[_0xf5d0('0x2b')]=function(_0x220243,_0x4fde60){return db[_0xf5d0('0x33')]['find']({'where':{'id':_0x220243[_0xf5d0('0x40')]['id']}})['then'](handleEntityNotFound(_0x4fde60,null))[_0xf5d0('0x2a')](removeEntity(_0x4fde60,null))[_0xf5d0('0x3f')](handleError(_0x4fde60,null));};function widgetAttributes(_0x43eff3){try{switch(_0x43eff3[_0xf5d0('0x41')]){case _0xf5d0('0x42'):return[{'name':_0xf5d0('0x43'),'value':_0x43eff3[_0xf5d0('0x43')]||(_0x43eff3['attrs']&&_0x43eff3[_0xf5d0('0x44')][0x0]?_0x43eff3['attrs'][0x0][_0xf5d0('0x45')]:undefined)||_0xf5d0('0x46')}];case _0xf5d0('0x47'):return[{'name':'attrPath','value':_0x43eff3[_0xf5d0('0x48')]||(_0x43eff3[_0xf5d0('0x44')]&&_0x43eff3[_0xf5d0('0x44')][0x0]?_0x43eff3[_0xf5d0('0x44')][0x0]['value']:undefined)||''}];case _0xf5d0('0x49'):return[{'name':_0xf5d0('0x4a'),'value':_0x43eff3[_0xf5d0('0x4a')]||(_0x43eff3[_0xf5d0('0x44')]&&_0x43eff3[_0xf5d0('0x44')][0x0]?_0x43eff3[_0xf5d0('0x44')][0x0][_0xf5d0('0x45')]:undefined)||_0xf5d0('0x4b')},{'name':'attrTimezone','value':_0x43eff3[_0xf5d0('0x4c')]||(_0x43eff3[_0xf5d0('0x44')]&&_0x43eff3[_0xf5d0('0x44')][0x1]?_0x43eff3[_0xf5d0('0x44')][0x1][_0xf5d0('0x45')]:undefined)||_0xf5d0('0x4d')},{'name':'attrFontSize','value':_0x43eff3[_0xf5d0('0x4e')]||(_0x43eff3[_0xf5d0('0x44')]&&_0x43eff3[_0xf5d0('0x44')][0x2]?_0x43eff3[_0xf5d0('0x44')][0x2]['value']:undefined)||0xc}];case _0xf5d0('0x4f'):return[{'name':'attrMetric','value':_0x43eff3['attrMetric']||(_0x43eff3[_0xf5d0('0x44')]&&_0x43eff3[_0xf5d0('0x44')][0x0]?_0x43eff3[_0xf5d0('0x44')][0x0][_0xf5d0('0x45')]:undefined)||_0xf5d0('0x50')},{'name':'attrVoiceQueues','value':_0x43eff3[_0xf5d0('0x51')]||(_0x43eff3[_0xf5d0('0x44')]&&_0x43eff3[_0xf5d0('0x44')][0x1]?_0x43eff3['attrs'][0x1][_0xf5d0('0x45')]:undefined)||[]},{'name':_0xf5d0('0x4e'),'value':_0x43eff3[_0xf5d0('0x4e')]||(_0x43eff3[_0xf5d0('0x44')]&&_0x43eff3[_0xf5d0('0x44')][0x2]?_0x43eff3[_0xf5d0('0x44')][0x2][_0xf5d0('0x45')]:undefined)||0x14}];case _0xf5d0('0x52'):case _0xf5d0('0x53'):return[{'name':'attrSerie1','value':_0x43eff3['attrSerie1']||(_0x43eff3[_0xf5d0('0x44')]&&_0x43eff3[_0xf5d0('0x44')][0x0]?_0x43eff3[_0xf5d0('0x44')][0x0][_0xf5d0('0x45')]:undefined)||_0xf5d0('0x50')},{'name':_0xf5d0('0x54'),'value':_0x43eff3[_0xf5d0('0x54')]||(_0x43eff3[_0xf5d0('0x44')]&&_0x43eff3[_0xf5d0('0x44')][0x1]?_0x43eff3[_0xf5d0('0x44')][0x1][_0xf5d0('0x45')]:undefined)||null},{'name':_0xf5d0('0x55'),'value':_0x43eff3[_0xf5d0('0x55')]||(_0x43eff3[_0xf5d0('0x44')]&&_0x43eff3['attrs'][0x2]?_0x43eff3['attrs'][0x2][_0xf5d0('0x45')]:undefined)||null},{'name':_0xf5d0('0x51'),'value':_0x43eff3[_0xf5d0('0x51')]||(_0x43eff3[_0xf5d0('0x44')]&&_0x43eff3[_0xf5d0('0x44')][0x3]?_0x43eff3[_0xf5d0('0x44')][0x3][_0xf5d0('0x45')]:undefined)||[]}];case _0xf5d0('0x56'):return[{'name':_0xf5d0('0x57'),'type':_0x43eff3[_0xf5d0('0x58')]||(_0x43eff3[_0xf5d0('0x44')]&&_0x43eff3[_0xf5d0('0x44')][0x0]?_0x43eff3[_0xf5d0('0x44')][0x0]['type']:undefined)||null,'value':_0x43eff3[_0xf5d0('0x57')]||(_0x43eff3[_0xf5d0('0x44')]&&_0x43eff3[_0xf5d0('0x44')][0x0]?_0x43eff3['attrs'][0x0][_0xf5d0('0x45')]:undefined)||null},{'name':_0xf5d0('0x59'),'value':_0x43eff3[_0xf5d0('0x59')]||(_0x43eff3[_0xf5d0('0x44')]&&_0x43eff3[_0xf5d0('0x44')][0x1]?_0x43eff3[_0xf5d0('0x44')][0x1]['value']:undefined)||0x0}];default:return[];}}catch(_0x28bd91){logger[_0xf5d0('0x2c')](_0xf5d0('0x5a'),JSON['stringify'](_0x28bd91));return[];}}exports['create']=function(_0x395369,_0x3778bc){if(_0x395369[_0xf5d0('0x5b')]){_0x395369[_0xf5d0('0x5b')][_0xf5d0('0x44')]=widgetAttributes(_0x395369[_0xf5d0('0x5b')]);}return db['DashboardItem'][_0xf5d0('0x5c')](_0x395369[_0xf5d0('0x5b')],{})[_0xf5d0('0x2a')](respondWithResult(_0x3778bc,0xc9))[_0xf5d0('0x3f')](handleError(_0x3778bc,null));};exports[_0xf5d0('0x29')]=function(_0x535428,_0xa5dfb){if(_0x535428[_0xf5d0('0x5b')]['id']){delete _0x535428['body']['id'];}_0x535428[_0xf5d0('0x5b')][_0xf5d0('0x44')]=widgetAttributes(_0x535428['body']);return db[_0xf5d0('0x33')][_0xf5d0('0x3e')]({'where':{'id':_0x535428['params']['id']}})[_0xf5d0('0x2a')](handleEntityNotFound(_0xa5dfb,null))[_0xf5d0('0x2a')](saveUpdates(_0x535428[_0xf5d0('0x5b')],null))[_0xf5d0('0x2a')](respondWithResult(_0xa5dfb,null))[_0xf5d0('0x3f')](handleError(_0xa5dfb,null));}; \ No newline at end of file +var _0x8ccb=['params','iframe','attrUrl','attrs','value','https://','custom','clock','attrHourFormat','attrTimezone','attrFontSize','attrMetric','total','attrVoiceQueues','multibar-chart','pie-chart','attrSerie1','attrSerie3','web-report','reportType','attrReport','attrRefresh','error','widgetAttributes:\x20%s','create','body','update','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','path','sox','to-csv','fs-extra','lodash','squel','jsforce','desk.js','papaparse','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','register','sendStatus','end','status','offset','undefined','limit','count','set','Content-Range','json','apply','then','destroy','stack','name','show','model','DashboardItem','rawAttributes','keys','query','filters','intersection','attributes','fields','length','includeAll','include','merge','options','find','catch'];(function(_0x117a71,_0x42ebfb){var _0x5adea8=function(_0x4ab779){while(--_0x4ab779){_0x117a71['push'](_0x117a71['shift']());}};_0x5adea8(++_0x42ebfb);}(_0x8ccb,0x1c4));var _0xb8cc=function(_0xa1e3ca,_0x559022){_0xa1e3ca=_0xa1e3ca-0x0;var _0x5005ab=_0x8ccb[_0xa1e3ca];return _0x5005ab;};'use strict';var emlformat=require(_0xb8cc('0x0'));var rimraf=require(_0xb8cc('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xb8cc('0x2'));var rp=require(_0xb8cc('0x3'));var moment=require(_0xb8cc('0x4'));var BPromise=require(_0xb8cc('0x5'));var Mustache=require('mustache');var util=require('util');var path=require(_0xb8cc('0x6'));var sox=require(_0xb8cc('0x7'));var csv=require(_0xb8cc('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xb8cc('0x9'));var _=require(_0xb8cc('0xa'));var squel=require(_0xb8cc('0xb'));var crypto=require('crypto');var jsforce=require(_0xb8cc('0xc'));var deskjs=require(_0xb8cc('0xd'));var toCsv=require(_0xb8cc('0x8'));var querystring=require('querystring');var Papa=require(_0xb8cc('0xe'));var Redis=require(_0xb8cc('0xf'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0xb8cc('0x10'));var hardwareService=require(_0xb8cc('0x11'));var logger=require('../../config/logger')('api');var utils=require(_0xb8cc('0x12'));var config=require(_0xb8cc('0x13'));var licenseUtil=require('../../config/license/util');var db=require(_0xb8cc('0x14'))['db'];config[_0xb8cc('0x15')]=_[_0xb8cc('0x16')](config[_0xb8cc('0x15')],{'host':_0xb8cc('0x17'),'port':0x18eb});var socket=require(_0xb8cc('0x18'))(new Redis(config[_0xb8cc('0x15')]));require('./dashboardItem.socket')[_0xb8cc('0x19')](socket);function respondWithStatusCode(_0x5ec8a7,_0x2f876e){_0x2f876e=_0x2f876e||0xcc;return function(_0x426de4){if(_0x426de4){return _0x5ec8a7[_0xb8cc('0x1a')](_0x2f876e);}return _0x5ec8a7['status'](_0x2f876e)[_0xb8cc('0x1b')]();};}function respondWithResult(_0x274cab,_0x4663d4){_0x4663d4=_0x4663d4||0xc8;return function(_0x4bc6dd){if(_0x4bc6dd){return _0x274cab[_0xb8cc('0x1c')](_0x4663d4)['json'](_0x4bc6dd);}};}function respondWithFilteredResult(_0x131c44,_0x4e6573){return function(_0x2ac4cc){if(_0x2ac4cc){var _0x259708=typeof _0x4e6573[_0xb8cc('0x1d')]===_0xb8cc('0x1e')&&typeof _0x4e6573[_0xb8cc('0x1f')]==='undefined';var _0x1c1022=_0x2ac4cc[_0xb8cc('0x20')];var _0x3ef4f9=_0x259708?0x0:_0x4e6573['offset'];var _0x8102db=_0x259708?_0x2ac4cc[_0xb8cc('0x20')]:_0x4e6573['offset']+_0x4e6573[_0xb8cc('0x1f')];var _0xe5ad50;if(_0x8102db>=_0x1c1022){_0x8102db=_0x1c1022;_0xe5ad50=0xc8;}else{_0xe5ad50=0xce;}_0x131c44['status'](_0xe5ad50);return _0x131c44[_0xb8cc('0x21')](_0xb8cc('0x22'),_0x3ef4f9+'-'+_0x8102db+'/'+_0x1c1022)[_0xb8cc('0x23')](_0x2ac4cc);}return null;};}function patchUpdates(_0x1d372c){return function(_0x26fba9){try{jsonpatch[_0xb8cc('0x24')](_0x26fba9,_0x1d372c,!![]);}catch(_0x1a0467){return BPromise['reject'](_0x1a0467);}return _0x26fba9['save']();};}function saveUpdates(_0x8b6b21,_0x5a8fbf){return function(_0x9a6b98){if(_0x9a6b98){return _0x9a6b98['update'](_0x8b6b21)[_0xb8cc('0x25')](function(_0xbb1918){return _0xbb1918;});}return null;};}function removeEntity(_0x335f32,_0x77a162){return function(_0x56ed01){if(_0x56ed01){return _0x56ed01[_0xb8cc('0x26')]()[_0xb8cc('0x25')](function(){_0x335f32[_0xb8cc('0x1c')](0xcc)[_0xb8cc('0x1b')]();});}};}function handleEntityNotFound(_0x22b99a,_0x491a03){return function(_0x50ed6f){if(!_0x50ed6f){_0x22b99a[_0xb8cc('0x1a')](0x194);}return _0x50ed6f;};}function handleError(_0x30c4f7,_0x58dd4c){_0x58dd4c=_0x58dd4c||0x1f4;return function(_0x3e4a37){logger['error'](_0x3e4a37[_0xb8cc('0x27')]);if(_0x3e4a37[_0xb8cc('0x28')]){delete _0x3e4a37[_0xb8cc('0x28')];}_0x30c4f7[_0xb8cc('0x1c')](_0x58dd4c)['send'](_0x3e4a37);};}exports[_0xb8cc('0x29')]=function(_0x1fc4ac,_0x282579){var _0x52fbb1={'raw':![],'where':{'id':_0x1fc4ac['params']['id']}},_0x2430dd={};_0x2430dd[_0xb8cc('0x2a')]=_['keys'](db[_0xb8cc('0x2b')][_0xb8cc('0x2c')]);_0x2430dd['query']=_[_0xb8cc('0x2d')](_0x1fc4ac[_0xb8cc('0x2e')]);_0x2430dd[_0xb8cc('0x2f')]=_[_0xb8cc('0x30')](_0x2430dd[_0xb8cc('0x2a')],_0x2430dd[_0xb8cc('0x2e')]);_0x52fbb1[_0xb8cc('0x31')]=_['intersection'](_0x2430dd['model'],qs[_0xb8cc('0x32')](_0x1fc4ac['query'][_0xb8cc('0x32')]));_0x52fbb1['attributes']=_0x52fbb1['attributes'][_0xb8cc('0x33')]?_0x52fbb1[_0xb8cc('0x31')]:_0x2430dd[_0xb8cc('0x2a')];if(_0x1fc4ac['query'][_0xb8cc('0x34')]){_0x52fbb1[_0xb8cc('0x35')]=[{'all':!![]}];}_0x52fbb1=_[_0xb8cc('0x36')]({},_0x52fbb1,_0x1fc4ac[_0xb8cc('0x37')]);return db[_0xb8cc('0x2b')][_0xb8cc('0x38')](_0x52fbb1)[_0xb8cc('0x25')](handleEntityNotFound(_0x282579,null))[_0xb8cc('0x25')](respondWithResult(_0x282579,null))[_0xb8cc('0x39')](handleError(_0x282579,null));};exports[_0xb8cc('0x26')]=function(_0x265ef8,_0x17c18e){return db[_0xb8cc('0x2b')][_0xb8cc('0x38')]({'where':{'id':_0x265ef8[_0xb8cc('0x3a')]['id']}})[_0xb8cc('0x25')](handleEntityNotFound(_0x17c18e,null))[_0xb8cc('0x25')](removeEntity(_0x17c18e,null))[_0xb8cc('0x39')](handleError(_0x17c18e,null));};function widgetAttributes(_0x5c2d05){try{switch(_0x5c2d05['type']){case _0xb8cc('0x3b'):return[{'name':_0xb8cc('0x3c'),'value':_0x5c2d05[_0xb8cc('0x3c')]||(_0x5c2d05[_0xb8cc('0x3d')]&&_0x5c2d05[_0xb8cc('0x3d')][0x0]?_0x5c2d05[_0xb8cc('0x3d')][0x0][_0xb8cc('0x3e')]:undefined)||_0xb8cc('0x3f')}];case _0xb8cc('0x40'):return[{'name':'attrPath','value':_0x5c2d05['attrPath']||(_0x5c2d05['attrs']&&_0x5c2d05['attrs'][0x0]?_0x5c2d05[_0xb8cc('0x3d')][0x0]['value']:undefined)||''}];case _0xb8cc('0x41'):return[{'name':'attrHourFormat','value':_0x5c2d05[_0xb8cc('0x42')]||(_0x5c2d05[_0xb8cc('0x3d')]&&_0x5c2d05[_0xb8cc('0x3d')][0x0]?_0x5c2d05[_0xb8cc('0x3d')][0x0][_0xb8cc('0x3e')]:undefined)||'HH:mm:ss'},{'name':_0xb8cc('0x43'),'value':_0x5c2d05[_0xb8cc('0x43')]||(_0x5c2d05[_0xb8cc('0x3d')]&&_0x5c2d05['attrs'][0x1]?_0x5c2d05[_0xb8cc('0x3d')][0x1]['value']:undefined)||'0.00'},{'name':'attrFontSize','value':_0x5c2d05[_0xb8cc('0x44')]||(_0x5c2d05[_0xb8cc('0x3d')]&&_0x5c2d05[_0xb8cc('0x3d')][0x2]?_0x5c2d05[_0xb8cc('0x3d')][0x2]['value']:undefined)||0xc}];case'counter':return[{'name':_0xb8cc('0x45'),'value':_0x5c2d05['attrMetric']||(_0x5c2d05['attrs']&&_0x5c2d05[_0xb8cc('0x3d')][0x0]?_0x5c2d05[_0xb8cc('0x3d')][0x0][_0xb8cc('0x3e')]:undefined)||_0xb8cc('0x46')},{'name':'attrVoiceQueues','value':_0x5c2d05[_0xb8cc('0x47')]||(_0x5c2d05[_0xb8cc('0x3d')]&&_0x5c2d05['attrs'][0x1]?_0x5c2d05[_0xb8cc('0x3d')][0x1][_0xb8cc('0x3e')]:undefined)||[]},{'name':_0xb8cc('0x44'),'value':_0x5c2d05[_0xb8cc('0x44')]||(_0x5c2d05[_0xb8cc('0x3d')]&&_0x5c2d05[_0xb8cc('0x3d')][0x2]?_0x5c2d05[_0xb8cc('0x3d')][0x2]['value']:undefined)||0x14}];case _0xb8cc('0x48'):case _0xb8cc('0x49'):return[{'name':_0xb8cc('0x4a'),'value':_0x5c2d05[_0xb8cc('0x4a')]||(_0x5c2d05[_0xb8cc('0x3d')]&&_0x5c2d05[_0xb8cc('0x3d')][0x0]?_0x5c2d05[_0xb8cc('0x3d')][0x0]['value']:undefined)||_0xb8cc('0x46')},{'name':'attrSerie2','value':_0x5c2d05['attrSerie2']||(_0x5c2d05['attrs']&&_0x5c2d05[_0xb8cc('0x3d')][0x1]?_0x5c2d05[_0xb8cc('0x3d')][0x1][_0xb8cc('0x3e')]:undefined)||null},{'name':_0xb8cc('0x4b'),'value':_0x5c2d05['attrSerie3']||(_0x5c2d05['attrs']&&_0x5c2d05[_0xb8cc('0x3d')][0x2]?_0x5c2d05[_0xb8cc('0x3d')][0x2][_0xb8cc('0x3e')]:undefined)||null},{'name':_0xb8cc('0x47'),'value':_0x5c2d05[_0xb8cc('0x47')]||(_0x5c2d05[_0xb8cc('0x3d')]&&_0x5c2d05[_0xb8cc('0x3d')][0x3]?_0x5c2d05[_0xb8cc('0x3d')][0x3][_0xb8cc('0x3e')]:undefined)||[]}];case _0xb8cc('0x4c'):return[{'name':'attrReport','type':_0x5c2d05[_0xb8cc('0x4d')]||(_0x5c2d05[_0xb8cc('0x3d')]&&_0x5c2d05[_0xb8cc('0x3d')][0x0]?_0x5c2d05[_0xb8cc('0x3d')][0x0]['type']:undefined)||null,'value':_0x5c2d05[_0xb8cc('0x4e')]||(_0x5c2d05[_0xb8cc('0x3d')]&&_0x5c2d05[_0xb8cc('0x3d')][0x0]?_0x5c2d05['attrs'][0x0][_0xb8cc('0x3e')]:undefined)||null},{'name':_0xb8cc('0x4f'),'value':_0x5c2d05[_0xb8cc('0x4f')]||(_0x5c2d05['attrs']&&_0x5c2d05[_0xb8cc('0x3d')][0x1]?_0x5c2d05[_0xb8cc('0x3d')][0x1][_0xb8cc('0x3e')]:undefined)||0x0}];default:return[];}}catch(_0xaeb76){logger[_0xb8cc('0x50')](_0xb8cc('0x51'),JSON['stringify'](_0xaeb76));return[];}}exports[_0xb8cc('0x52')]=function(_0xa2d0ba,_0x2ced82){if(_0xa2d0ba[_0xb8cc('0x53')]){_0xa2d0ba['body'][_0xb8cc('0x3d')]=widgetAttributes(_0xa2d0ba[_0xb8cc('0x53')]);}return db[_0xb8cc('0x2b')]['create'](_0xa2d0ba[_0xb8cc('0x53')],{})[_0xb8cc('0x25')](respondWithResult(_0x2ced82,0xc9))[_0xb8cc('0x39')](handleError(_0x2ced82,null));};exports[_0xb8cc('0x54')]=function(_0x12db3b,_0xa505a7){if(_0x12db3b[_0xb8cc('0x53')]['id']){delete _0x12db3b[_0xb8cc('0x53')]['id'];}_0x12db3b[_0xb8cc('0x53')]['attrs']=widgetAttributes(_0x12db3b['body']);return db[_0xb8cc('0x2b')][_0xb8cc('0x38')]({'where':{'id':_0x12db3b['params']['id']}})['then'](handleEntityNotFound(_0xa505a7,null))[_0xb8cc('0x25')](saveUpdates(_0x12db3b[_0xb8cc('0x53')],null))[_0xb8cc('0x25')](respondWithResult(_0xa505a7,null))[_0xb8cc('0x39')](handleError(_0xa505a7,null));}; \ No newline at end of file diff --git a/server/api/dashboardItem/dashboardItem.events.js b/server/api/dashboardItem/dashboardItem.events.js index 8d7b66f..606d411 100644 --- a/server/api/dashboardItem/dashboardItem.events.js +++ b/server/api/dashboardItem/dashboardItem.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x49a9=['remove','emit','hasOwnProperty','hook','events','../../mysqldb','DashboardItem','setMaxListeners','save'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x49a9,0x1ab));var _0x949a=function(_0xe6be5c,_0x435ea5){_0xe6be5c=_0xe6be5c-0x0;var _0xb72265=_0x49a9[_0xe6be5c];return _0xb72265;};'use strict';var EventEmitter=require(_0x949a('0x0'));var DashboardItem=require(_0x949a('0x1'))['db'][_0x949a('0x2')];var DashboardItemEvents=new EventEmitter();DashboardItemEvents[_0x949a('0x3')](0x0);var events={'afterCreate':_0x949a('0x4'),'afterUpdate':'update','afterDestroy':_0x949a('0x5')};function emitEvent(_0x38e527){return function(_0x56dd80,_0x534f8e,_0x3ba1d5){DashboardItemEvents[_0x949a('0x6')](_0x38e527+':'+_0x56dd80['id'],_0x56dd80);DashboardItemEvents[_0x949a('0x6')](_0x38e527,_0x56dd80);_0x3ba1d5(null);};}for(var e in events){if(events[_0x949a('0x7')](e)){var event=events[e];DashboardItem[_0x949a('0x8')](e,emitEvent(event));}}module['exports']=DashboardItemEvents; \ No newline at end of file +var _0x7839=['exports','events','../../mysqldb','DashboardItem','update','remove','emit'];(function(_0x3afe0a,_0x1484e9){var _0x87c0d1=function(_0x3ba95f){while(--_0x3ba95f){_0x3afe0a['push'](_0x3afe0a['shift']());}};_0x87c0d1(++_0x1484e9);}(_0x7839,0x1ba));var _0x9783=function(_0x5616fb,_0xc8f069){_0x5616fb=_0x5616fb-0x0;var _0x112d5c=_0x7839[_0x5616fb];return _0x112d5c;};'use strict';var EventEmitter=require(_0x9783('0x0'));var DashboardItem=require(_0x9783('0x1'))['db'][_0x9783('0x2')];var DashboardItemEvents=new EventEmitter();DashboardItemEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0x9783('0x3'),'afterDestroy':_0x9783('0x4')};function emitEvent(_0xd75ac2){return function(_0x50d9e0,_0x20e8f6,_0x28e5d6){DashboardItemEvents['emit'](_0xd75ac2+':'+_0x50d9e0['id'],_0x50d9e0);DashboardItemEvents[_0x9783('0x5')](_0xd75ac2,_0x50d9e0);_0x28e5d6(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];DashboardItem['hook'](e,emitEvent(event));}}module[_0x9783('0x6')]=DashboardItemEvents; \ No newline at end of file diff --git a/server/api/dashboardItem/dashboardItem.model.js b/server/api/dashboardItem/dashboardItem.model.js index 8ac4591..9ecfb66 100644 --- a/server/api/dashboardItem/dashboardItem.model.js +++ b/server/api/dashboardItem/dashboardItem.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5fbd=['../../config/environment','./dashboardItem.attributes','exports','define','dashboard_items','lodash','../../config/logger','moment','request-promise','path','rimraf'];(function(_0x422905,_0x3bce3a){var _0x33dc6c=function(_0x4852c9){while(--_0x4852c9){_0x422905['push'](_0x422905['shift']());}};_0x33dc6c(++_0x3bce3a);}(_0x5fbd,0x1bd));var _0xd5fb=function(_0x2f9d2f,_0x5da9bf){_0x2f9d2f=_0x2f9d2f-0x0;var _0x24254e=_0x5fbd[_0x2f9d2f];return _0x24254e;};'use strict';var _=require(_0xd5fb('0x0'));var util=require('util');var logger=require(_0xd5fb('0x1'))('api');var moment=require(_0xd5fb('0x2'));var BPromise=require('bluebird');var rp=require(_0xd5fb('0x3'));var fs=require('fs');var path=require(_0xd5fb('0x4'));var rimraf=require(_0xd5fb('0x5'));var config=require(_0xd5fb('0x6'));var attributes=require(_0xd5fb('0x7'));module[_0xd5fb('0x8')]=function(_0x1f2a09,_0x4f08bc){return _0x1f2a09[_0xd5fb('0x9')]('DashboardItem',attributes,{'tableName':_0xd5fb('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xc9d4=['define','DashboardItem','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./dashboardItem.attributes','exports'];(function(_0x5d8987,_0x14d054){var _0x2997eb=function(_0x56f92a){while(--_0x56f92a){_0x5d8987['push'](_0x5d8987['shift']());}};_0x2997eb(++_0x14d054);}(_0xc9d4,0xf0));var _0x4c9d=function(_0x5329a2,_0x356185){_0x5329a2=_0x5329a2-0x0;var _0x54ad38=_0xc9d4[_0x5329a2];return _0x54ad38;};'use strict';var _=require(_0x4c9d('0x0'));var util=require(_0x4c9d('0x1'));var logger=require(_0x4c9d('0x2'))(_0x4c9d('0x3'));var moment=require(_0x4c9d('0x4'));var BPromise=require(_0x4c9d('0x5'));var rp=require(_0x4c9d('0x6'));var fs=require('fs');var path=require(_0x4c9d('0x7'));var rimraf=require(_0x4c9d('0x8'));var config=require(_0x4c9d('0x9'));var attributes=require(_0x4c9d('0xa'));module[_0x4c9d('0xb')]=function(_0x3c392a,_0x21d81d){return _0x3c392a[_0x4c9d('0xc')](_0x4c9d('0xd'),attributes,{'tableName':'dashboard_items','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/dashboardItem/dashboardItem.rpc.js b/server/api/dashboardItem/dashboardItem.rpc.js index 928adfc..c74ef04 100644 --- a/server/api/dashboardItem/dashboardItem.rpc.js +++ b/server/api/dashboardItem/dashboardItem.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8b5c=['result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','rpc','client','redis','defaults','localhost','socket.io-emitter','register','request','then','info','DashboardItem,\x20%s,\x20%s','request\x20sent','debug','DashboardItem,\x20%s,\x20%s,\x20%s','stringify','error','code','message'];(function(_0xe687e0,_0x2a7aa6){var _0x2d031b=function(_0xaf0193){while(--_0xaf0193){_0xe687e0['push'](_0xe687e0['shift']());}};_0x2d031b(++_0x2a7aa6);}(_0x8b5c,0x110));var _0xc8b5=function(_0x77cab1,_0x1fb831){_0x77cab1=_0x77cab1-0x0;var _0x2ee175=_0x8b5c[_0x77cab1];return _0x2ee175;};'use strict';var _=require(_0xc8b5('0x0'));var util=require(_0xc8b5('0x1'));var moment=require(_0xc8b5('0x2'));var BPromise=require(_0xc8b5('0x3'));var rs=require(_0xc8b5('0x4'));var fs=require('fs');var Redis=require(_0xc8b5('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xc8b5('0x6'));var logger=require('../../config/logger')(_0xc8b5('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xc8b5('0x8')]['http']({'port':0x232a});config[_0xc8b5('0x9')]=_[_0xc8b5('0xa')](config[_0xc8b5('0x9')],{'host':_0xc8b5('0xb'),'port':0x18eb});var socket=require(_0xc8b5('0xc'))(new Redis(config[_0xc8b5('0x9')]));require('./dashboardItem.socket')[_0xc8b5('0xd')](socket);function respondWithRpcPromise(_0x37f4fa,_0x16ec8e,_0xafb900){return new BPromise(function(_0x556ef5,_0x20a480){return client[_0xc8b5('0xe')](_0x37f4fa,_0xafb900)[_0xc8b5('0xf')](function(_0x494e3f){logger[_0xc8b5('0x10')](_0xc8b5('0x11'),_0x16ec8e,_0xc8b5('0x12'));logger[_0xc8b5('0x13')](_0xc8b5('0x14'),_0x16ec8e,_0xc8b5('0x12'),JSON[_0xc8b5('0x15')](_0x494e3f));if(_0x494e3f['error']){if(_0x494e3f[_0xc8b5('0x16')][_0xc8b5('0x17')]===0x1f4){logger[_0xc8b5('0x16')](_0xc8b5('0x11'),_0x16ec8e,_0x494e3f[_0xc8b5('0x16')]['message']);return _0x20a480(_0x494e3f['error'][_0xc8b5('0x18')]);}logger[_0xc8b5('0x16')](_0xc8b5('0x11'),_0x16ec8e,_0x494e3f['error'][_0xc8b5('0x18')]);return _0x556ef5(_0x494e3f[_0xc8b5('0x16')][_0xc8b5('0x18')]);}else{logger[_0xc8b5('0x10')](_0xc8b5('0x11'),_0x16ec8e,'request\x20sent');_0x556ef5(_0x494e3f[_0xc8b5('0x19')][_0xc8b5('0x18')]);}})[_0xc8b5('0x1a')](function(_0xf6b4eb){logger['error'](_0xc8b5('0x11'),_0x16ec8e,_0xf6b4eb);_0x20a480(_0xf6b4eb);});});} \ No newline at end of file +var _0x0a05=['rpc','jayson/promise','http','redis','defaults','localhost','socket.io-emitter','register','request','DashboardItem,\x20%s,\x20%s','DashboardItem,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger'];(function(_0x13cf5f,_0x5427f5){var _0x4c5537=function(_0x17432c){while(--_0x17432c){_0x13cf5f['push'](_0x13cf5f['shift']());}};_0x4c5537(++_0x5427f5);}(_0x0a05,0x172));var _0x50a0=function(_0x1c510a,_0x1413a9){_0x1c510a=_0x1c510a-0x0;var _0x23cedd=_0x0a05[_0x1c510a];return _0x23cedd;};'use strict';var _=require(_0x50a0('0x0'));var util=require(_0x50a0('0x1'));var moment=require(_0x50a0('0x2'));var BPromise=require(_0x50a0('0x3'));var rs=require(_0x50a0('0x4'));var fs=require('fs');var Redis=require(_0x50a0('0x5'));var db=require(_0x50a0('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x50a0('0x7'))(_0x50a0('0x8'));var config=require('../../config/environment');var jayson=require(_0x50a0('0x9'));var client=jayson['client'][_0x50a0('0xa')]({'port':0x232a});config[_0x50a0('0xb')]=_[_0x50a0('0xc')](config[_0x50a0('0xb')],{'host':_0x50a0('0xd'),'port':0x18eb});var socket=require(_0x50a0('0xe'))(new Redis(config[_0x50a0('0xb')]));require('./dashboardItem.socket')[_0x50a0('0xf')](socket);function respondWithRpcPromise(_0x5bad34,_0x5c89d8,_0x251b50){return new BPromise(function(_0x19980d,_0x1ccf64){return client[_0x50a0('0x10')](_0x5bad34,_0x251b50)['then'](function(_0x4695f2){logger['info'](_0x50a0('0x11'),_0x5c89d8,'request\x20sent');logger['debug'](_0x50a0('0x12'),_0x5c89d8,_0x50a0('0x13'),JSON[_0x50a0('0x14')](_0x4695f2));if(_0x4695f2[_0x50a0('0x15')]){if(_0x4695f2[_0x50a0('0x15')][_0x50a0('0x16')]===0x1f4){logger[_0x50a0('0x15')](_0x50a0('0x11'),_0x5c89d8,_0x4695f2[_0x50a0('0x15')]['message']);return _0x1ccf64(_0x4695f2[_0x50a0('0x15')]['message']);}logger[_0x50a0('0x15')]('DashboardItem,\x20%s,\x20%s',_0x5c89d8,_0x4695f2[_0x50a0('0x15')][_0x50a0('0x17')]);return _0x19980d(_0x4695f2[_0x50a0('0x15')]['message']);}else{logger[_0x50a0('0x18')]('DashboardItem,\x20%s,\x20%s',_0x5c89d8,_0x50a0('0x13'));_0x19980d(_0x4695f2[_0x50a0('0x19')][_0x50a0('0x17')]);}})[_0x50a0('0x1a')](function(_0x4efb1c){logger[_0x50a0('0x15')](_0x50a0('0x11'),_0x5c89d8,_0x4efb1c);_0x1ccf64(_0x4efb1c);});});} \ No newline at end of file diff --git a/server/api/dashboardItem/dashboardItem.socket.js b/server/api/dashboardItem/dashboardItem.socket.js index e11ff80..3293004 100644 --- a/server/api/dashboardItem/dashboardItem.socket.js +++ b/server/api/dashboardItem/dashboardItem.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf0f8=['./dashboardItem.events','save','remove','update','emit','removeListener','register'];(function(_0x32f26d,_0x2c0b5d){var _0x5d9ddc=function(_0x1f0e26){while(--_0x1f0e26){_0x32f26d['push'](_0x32f26d['shift']());}};_0x5d9ddc(++_0x2c0b5d);}(_0xf0f8,0xcb));var _0x8f0f=function(_0x4bc58b,_0x268acb){_0x4bc58b=_0x4bc58b-0x0;var _0x1eb800=_0xf0f8[_0x4bc58b];return _0x1eb800;};'use strict';var DashboardItemEvents=require(_0x8f0f('0x0'));var events=[_0x8f0f('0x1'),_0x8f0f('0x2'),_0x8f0f('0x3')];function createListener(_0x193994,_0x1a01e1){return function(_0x2d6575){_0x1a01e1[_0x8f0f('0x4')](_0x193994,_0x2d6575);};}function removeListener(_0x4fd24e,_0x2effdf){return function(){DashboardItemEvents[_0x8f0f('0x5')](_0x4fd24e,_0x2effdf);};}exports[_0x8f0f('0x6')]=function(_0x2986e3){for(var _0x1c2e45=0x0,_0x13e615=events['length'];_0x1c2e45<_0x13e615;_0x1c2e45++){var _0x45074f=events[_0x1c2e45];var _0x4c1eba=createListener('dashboardItem:'+_0x45074f,_0x2986e3);DashboardItemEvents['on'](_0x45074f,_0x4c1eba);}}; \ No newline at end of file +var _0x1069=['emit','register','./dashboardItem.events','remove','update'];(function(_0x229b99,_0xb6a166){var _0x13e10c=function(_0x166e54){while(--_0x166e54){_0x229b99['push'](_0x229b99['shift']());}};_0x13e10c(++_0xb6a166);}(_0x1069,0x129));var _0x9106=function(_0x57077b,_0x1e7dd5){_0x57077b=_0x57077b-0x0;var _0x56b2a3=_0x1069[_0x57077b];return _0x56b2a3;};'use strict';var DashboardItemEvents=require(_0x9106('0x0'));var events=['save',_0x9106('0x1'),_0x9106('0x2')];function createListener(_0x192160,_0x4c9f61){return function(_0x2f124c){_0x4c9f61[_0x9106('0x3')](_0x192160,_0x2f124c);};}function removeListener(_0x461da4,_0x5656ff){return function(){DashboardItemEvents['removeListener'](_0x461da4,_0x5656ff);};}exports[_0x9106('0x4')]=function(_0x35b0c2){for(var _0x181116=0x0,_0x5d8d5c=events['length'];_0x181116<_0x5d8d5c;_0x181116++){var _0x2e246c=events[_0x181116];var _0x25b3f2=createListener('dashboardItem:'+_0x2e246c,_0x35b0c2);DashboardItemEvents['on'](_0x2e246c,_0x25b3f2);}}; \ No newline at end of file diff --git a/server/api/dashboardItem/index.js b/server/api/dashboardItem/index.js index 9f25c54..6c8c30e 100644 --- a/server/api/dashboardItem/index.js +++ b/server/api/dashboardItem/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4f13=['put','/:id','update','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./dashboardItem.controller','get','isAuthenticated','show','post','create'];(function(_0x1d8c93,_0x5c6cc9){var _0x1db975=function(_0x5ec33b){while(--_0x5ec33b){_0x1d8c93['push'](_0x1d8c93['shift']());}};_0x1db975(++_0x5c6cc9);}(_0x4f13,0x145));var _0x34f1=function(_0x273ac0,_0x18bf58){_0x273ac0=_0x273ac0-0x0;var _0x2beaee=_0x4f13[_0x273ac0];return _0x2beaee;};'use strict';var multer=require(_0x34f1('0x0'));var util=require(_0x34f1('0x1'));var path=require(_0x34f1('0x2'));var timeout=require(_0x34f1('0x3'));var express=require(_0x34f1('0x4'));var router=express[_0x34f1('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0x34f1('0x6'));var interaction=require(_0x34f1('0x7'));var config=require(_0x34f1('0x8'));var controller=require(_0x34f1('0x9'));router[_0x34f1('0xa')]('/:id',auth[_0x34f1('0xb')](),controller[_0x34f1('0xc')]);router[_0x34f1('0xd')]('/',auth[_0x34f1('0xb')](),controller[_0x34f1('0xe')]);router[_0x34f1('0xf')](_0x34f1('0x10'),auth['isAuthenticated'](),controller[_0x34f1('0x11')]);router['delete']('/:id',auth[_0x34f1('0xb')](),controller[_0x34f1('0x12')]);module[_0x34f1('0x13')]=router; \ No newline at end of file +var _0x75df=['util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','./dashboardItem.controller','/:id','isAuthenticated','show','create','update','delete','destroy','multer'];(function(_0xaea18,_0x5670cd){var _0x33bf67=function(_0x5881d8){while(--_0x5881d8){_0xaea18['push'](_0xaea18['shift']());}};_0x33bf67(++_0x5670cd);}(_0x75df,0x9f));var _0xf75d=function(_0x5521f6,_0x8691e9){_0x5521f6=_0x5521f6-0x0;var _0x57656d=_0x75df[_0x5521f6];return _0x57656d;};'use strict';var multer=require(_0xf75d('0x0'));var util=require(_0xf75d('0x1'));var path=require(_0xf75d('0x2'));var timeout=require(_0xf75d('0x3'));var express=require(_0xf75d('0x4'));var router=express['Router']();var fs_extra=require(_0xf75d('0x5'));var auth=require(_0xf75d('0x6'));var interaction=require(_0xf75d('0x7'));var config=require('../../config/environment');var controller=require(_0xf75d('0x8'));router['get'](_0xf75d('0x9'),auth[_0xf75d('0xa')](),controller[_0xf75d('0xb')]);router['post']('/',auth[_0xf75d('0xa')](),controller[_0xf75d('0xc')]);router['put'](_0xf75d('0x9'),auth['isAuthenticated'](),controller[_0xf75d('0xd')]);router[_0xf75d('0xe')](_0xf75d('0x9'),auth[_0xf75d('0xa')](),controller[_0xf75d('0xf')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/disposition/disposition.attributes.js b/server/api/disposition/disposition.attributes.js index f4ed830..ced44ae 100644 --- a/server/api/disposition/disposition.attributes.js +++ b/server/api/disposition/disposition.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0b3e=['sequelize','exports','first','second','STRING'];(function(_0x2fb50e,_0x396eb7){var _0x143cbc=function(_0x1c26b5){while(--_0x1c26b5){_0x2fb50e['push'](_0x2fb50e['shift']());}};_0x143cbc(++_0x396eb7);}(_0x0b3e,0xf0));var _0xe0b3=function(_0x20351b,_0x2ab338){_0x20351b=_0x20351b-0x0;var _0x3fd8a2=_0x0b3e[_0x20351b];return _0x3fd8a2;};'use strict';var Sequelize=require(_0xe0b3('0x0'));module[_0xe0b3('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'level':{'type':Sequelize['ENUM'](_0xe0b3('0x2'),_0xe0b3('0x3'),'third'),'allowNull':![],'defaultValue':_0xe0b3('0x2')},'description':{'type':Sequelize[_0xe0b3('0x4')]}}; \ No newline at end of file +var _0xcf37=['exports','STRING','first','second','third','sequelize'];(function(_0x494d1f,_0x3f72ff){var _0x457b6e=function(_0x38cb16){while(--_0x38cb16){_0x494d1f['push'](_0x494d1f['shift']());}};_0x457b6e(++_0x3f72ff);}(_0xcf37,0x12b));var _0x7cf3=function(_0x7059d2,_0x50c049){_0x7059d2=_0x7059d2-0x0;var _0x3aa779=_0xcf37[_0x7059d2];return _0x3aa779;};'use strict';var Sequelize=require(_0x7cf3('0x0'));module[_0x7cf3('0x1')]={'name':{'type':Sequelize[_0x7cf3('0x2')],'allowNull':![]},'level':{'type':Sequelize['ENUM'](_0x7cf3('0x3'),_0x7cf3('0x4'),_0x7cf3('0x5')),'allowNull':![],'defaultValue':_0x7cf3('0x3')},'description':{'type':Sequelize[_0x7cf3('0x2')]}}; \ No newline at end of file diff --git a/server/api/disposition/disposition.controller.js b/server/api/disposition/disposition.controller.js index b23d856..6cbe398 100644 --- a/server/api/disposition/disposition.controller.js +++ b/server/api/disposition/disposition.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x614b=['Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','userProfileId','autoAssociation','create','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','desk.js','querystring','papaparse','../../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','offset','undefined','count','limit','set','Content-Range','json','apply','reject','save','update','then','Dispositions','UserProfileResource','destroy','error','name','send','map','Disposition','rawAttributes','fieldName','type','key','model','query','keys','attributes','fields','hasOwnProperty','nolimit','order','sort','filters','filter','where','merge','includeAll','rows','catch','show','intersection','include','options','find','body','user','get'];(function(_0x397e5f,_0x454c8f){var _0x5302b8=function(_0x1a29ef){while(--_0x1a29ef){_0x397e5f['push'](_0x397e5f['shift']());}};_0x5302b8(++_0x454c8f);}(_0x614b,0xb3));var _0xb614=function(_0x4400ff,_0x200973){_0x4400ff=_0x4400ff-0x0;var _0x2e3d86=_0x614b[_0x4400ff];return _0x2e3d86;};'use strict';var emlformat=require(_0xb614('0x0'));var rimraf=require(_0xb614('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xb614('0x2'));var rp=require(_0xb614('0x3'));var moment=require(_0xb614('0x4'));var BPromise=require(_0xb614('0x5'));var Mustache=require(_0xb614('0x6'));var util=require(_0xb614('0x7'));var path=require(_0xb614('0x8'));var sox=require(_0xb614('0x9'));var csv=require(_0xb614('0xa'));var ejs=require(_0xb614('0xb'));var fs=require('fs');var fs_extra=require(_0xb614('0xc'));var _=require(_0xb614('0xd'));var squel=require(_0xb614('0xe'));var crypto=require('crypto');var jsforce=require(_0xb614('0xf'));var deskjs=require(_0xb614('0x10'));var toCsv=require(_0xb614('0xa'));var querystring=require(_0xb614('0x11'));var Papa=require(_0xb614('0x12'));var Redis=require('ioredis');var authService=require(_0xb614('0x13'));var qs=require(_0xb614('0x14'));var as=require(_0xb614('0x15'));var hardwareService=require(_0xb614('0x16'));var logger=require(_0xb614('0x17'))('api');var utils=require(_0xb614('0x18'));var config=require(_0xb614('0x19'));var licenseUtil=require(_0xb614('0x1a'));var db=require(_0xb614('0x1b'))['db'];function respondWithStatusCode(_0x4d023c,_0x50b959){_0x50b959=_0x50b959||0xcc;return function(_0x421877){if(_0x421877){return _0x4d023c[_0xb614('0x1c')](_0x50b959);}return _0x4d023c[_0xb614('0x1d')](_0x50b959)[_0xb614('0x1e')]();};}function respondWithResult(_0x33df56,_0x29db38){_0x29db38=_0x29db38||0xc8;return function(_0x27c7e0){if(_0x27c7e0){return _0x33df56[_0xb614('0x1d')](_0x29db38)['json'](_0x27c7e0);}};}function respondWithFilteredResult(_0x7c945d,_0x5d3790){return function(_0x476337){if(_0x476337){var _0x5773c9=typeof _0x5d3790[_0xb614('0x1f')]===_0xb614('0x20')&&typeof _0x5d3790['limit']==='undefined';var _0x1937f5=_0x476337['count'];var _0x472b4e=_0x5773c9?0x0:_0x5d3790[_0xb614('0x1f')];var _0x199661=_0x5773c9?_0x476337[_0xb614('0x21')]:_0x5d3790[_0xb614('0x1f')]+_0x5d3790[_0xb614('0x22')];var _0x2c5922;if(_0x199661>=_0x1937f5){_0x199661=_0x1937f5;_0x2c5922=0xc8;}else{_0x2c5922=0xce;}_0x7c945d[_0xb614('0x1d')](_0x2c5922);return _0x7c945d[_0xb614('0x23')](_0xb614('0x24'),_0x472b4e+'-'+_0x199661+'/'+_0x1937f5)[_0xb614('0x25')](_0x476337);}return null;};}function patchUpdates(_0x392fe9){return function(_0x31e192){try{jsonpatch[_0xb614('0x26')](_0x31e192,_0x392fe9,!![]);}catch(_0x381273){return BPromise[_0xb614('0x27')](_0x381273);}return _0x31e192[_0xb614('0x28')]();};}function saveUpdates(_0x1b99e6,_0x5be48e){return function(_0x547598){if(_0x547598){return _0x547598[_0xb614('0x29')](_0x1b99e6)[_0xb614('0x2a')](function(_0x542b13){return _0x542b13;});}return null;};}function removeEntity(_0x15b4ea,_0x2e8526){return function(_0xa8790){if(_0xa8790){return _0xa8790['destroy']()['then'](function(){var _0x5b86d3=_0xa8790['get']({'plain':!![]});var _0x58d37c=_0xb614('0x2b');return db[_0xb614('0x2c')][_0xb614('0x2d')]({'where':{'type':_0x58d37c,'resourceId':_0x5b86d3['id']}})[_0xb614('0x2a')](function(){return _0xa8790;});})[_0xb614('0x2a')](function(){_0x15b4ea[_0xb614('0x1d')](0xcc)['end']();});}};}function handleEntityNotFound(_0x4441fd,_0x4440c2){return function(_0x1bb280){if(!_0x1bb280){_0x4441fd['sendStatus'](0x194);}return _0x1bb280;};}function handleError(_0x352ad6,_0x1f65cc){_0x1f65cc=_0x1f65cc||0x1f4;return function(_0x978bec){logger[_0xb614('0x2e')](_0x978bec['stack']);if(_0x978bec[_0xb614('0x2f')]){delete _0x978bec[_0xb614('0x2f')];}_0x352ad6[_0xb614('0x1d')](_0x1f65cc)[_0xb614('0x30')](_0x978bec);};}exports['index']=function(_0x3d2fbc,_0x43e94b){var _0x45a30={},_0x494379={},_0x482653={'count':0x0,'rows':[]};var _0x521d48=_[_0xb614('0x31')](db[_0xb614('0x32')][_0xb614('0x33')],function(_0x27bb3d){return{'name':_0x27bb3d[_0xb614('0x34')],'type':_0x27bb3d[_0xb614('0x35')][_0xb614('0x36')]};});_0x494379[_0xb614('0x37')]=_[_0xb614('0x31')](_0x521d48,_0xb614('0x2f'));_0x494379[_0xb614('0x38')]=_[_0xb614('0x39')](_0x3d2fbc[_0xb614('0x38')]);_0x494379['filters']=_['intersection'](_0x494379[_0xb614('0x37')],_0x494379[_0xb614('0x38')]);_0x45a30[_0xb614('0x3a')]=_['intersection'](_0x494379[_0xb614('0x37')],qs['fields'](_0x3d2fbc[_0xb614('0x38')][_0xb614('0x3b')]));_0x45a30[_0xb614('0x3a')]=_0x45a30[_0xb614('0x3a')]['length']?_0x45a30[_0xb614('0x3a')]:_0x494379['model'];if(!_0x3d2fbc['query'][_0xb614('0x3c')](_0xb614('0x3d'))){_0x45a30[_0xb614('0x22')]=qs[_0xb614('0x22')](_0x3d2fbc[_0xb614('0x38')][_0xb614('0x22')]);_0x45a30[_0xb614('0x1f')]=qs[_0xb614('0x1f')](_0x3d2fbc[_0xb614('0x38')][_0xb614('0x1f')]);}_0x45a30[_0xb614('0x3e')]=qs[_0xb614('0x3f')](_0x3d2fbc[_0xb614('0x38')][_0xb614('0x3f')]);_0x45a30['where']=qs[_0xb614('0x40')](_['pick'](_0x3d2fbc[_0xb614('0x38')],_0x494379[_0xb614('0x40')]),_0x521d48);if(_0x3d2fbc[_0xb614('0x38')][_0xb614('0x41')]){_0x45a30[_0xb614('0x42')]=_[_0xb614('0x43')](_0x45a30[_0xb614('0x42')],{'$or':_[_0xb614('0x31')](_0x521d48,function(_0x107ccb){if(_0x107ccb['type']!=='VIRTUAL'){var _0x5d9dda={};_0x5d9dda[_0x107ccb[_0xb614('0x2f')]]={'$like':'%'+_0x3d2fbc['query'][_0xb614('0x41')]+'%'};return _0x5d9dda;}})});}_0x45a30=_['merge']({},_0x45a30,_0x3d2fbc['options']);var _0x4f1c3d={'where':_0x45a30[_0xb614('0x42')]};return db['Disposition'][_0xb614('0x21')](_0x4f1c3d)[_0xb614('0x2a')](function(_0x36d590){_0x482653[_0xb614('0x21')]=_0x36d590;if(_0x3d2fbc['query'][_0xb614('0x44')]){_0x45a30['include']=[{'all':!![]}];}return db[_0xb614('0x32')]['findAll'](_0x45a30);})[_0xb614('0x2a')](function(_0x506a9e){_0x482653[_0xb614('0x45')]=_0x506a9e;return _0x482653;})[_0xb614('0x2a')](respondWithFilteredResult(_0x43e94b,_0x45a30))[_0xb614('0x46')](handleError(_0x43e94b,null));};exports[_0xb614('0x47')]=function(_0x14f649,_0x11077f){var _0x45a128={'raw':!![],'where':{'id':_0x14f649['params']['id']}},_0x2bf7c={};_0x2bf7c['model']=_[_0xb614('0x39')](db[_0xb614('0x32')][_0xb614('0x33')]);_0x2bf7c[_0xb614('0x38')]=_[_0xb614('0x39')](_0x14f649[_0xb614('0x38')]);_0x2bf7c[_0xb614('0x40')]=_[_0xb614('0x48')](_0x2bf7c[_0xb614('0x37')],_0x2bf7c[_0xb614('0x38')]);_0x45a128[_0xb614('0x3a')]=_[_0xb614('0x48')](_0x2bf7c['model'],qs[_0xb614('0x3b')](_0x14f649['query'][_0xb614('0x3b')]));_0x45a128[_0xb614('0x3a')]=_0x45a128[_0xb614('0x3a')]['length']?_0x45a128[_0xb614('0x3a')]:_0x2bf7c[_0xb614('0x37')];if(_0x14f649[_0xb614('0x38')][_0xb614('0x44')]){_0x45a128[_0xb614('0x49')]=[{'all':!![]}];}_0x45a128=_['merge']({},_0x45a128,_0x14f649[_0xb614('0x4a')]);return db[_0xb614('0x32')][_0xb614('0x4b')](_0x45a128)[_0xb614('0x2a')](handleEntityNotFound(_0x11077f,null))[_0xb614('0x2a')](respondWithResult(_0x11077f,null))[_0xb614('0x46')](handleError(_0x11077f,null));};exports['create']=function(_0x3e0e7b,_0x535a01){return db[_0xb614('0x32')]['create'](_0x3e0e7b[_0xb614('0x4c')],{})[_0xb614('0x2a')](function(_0x23eb02){var _0x360b57=_0x3e0e7b[_0xb614('0x4d')][_0xb614('0x4e')]({'plain':!![]});if(!_0x360b57)throw new Error(_0xb614('0x4f'));if(_0x360b57['role']==='user'){var _0x47845f=_0x23eb02[_0xb614('0x4e')]({'plain':!![]});var _0x1d82cd='Dispositions';return db[_0xb614('0x50')][_0xb614('0x4b')]({'where':{'name':_0x1d82cd,'userProfileId':_0x360b57[_0xb614('0x51')]},'raw':!![]})[_0xb614('0x2a')](function(_0x4b649f){if(_0x4b649f&&_0x4b649f[_0xb614('0x52')]===0x0){return db[_0xb614('0x2c')][_0xb614('0x53')]({'name':_0x47845f[_0xb614('0x2f')],'resourceId':_0x47845f['id'],'type':_0x4b649f['name'],'sectionId':_0x4b649f['id']},{})[_0xb614('0x2a')](function(){return _0x23eb02;});}else{return _0x23eb02;}})[_0xb614('0x46')](function(_0x3d3e03){logger['error'](_0xb614('0x54'),_0x3d3e03);throw _0x3d3e03;});}return _0x23eb02;})[_0xb614('0x2a')](respondWithResult(_0x535a01,0xc9))[_0xb614('0x46')](handleError(_0x535a01,null));};exports[_0xb614('0x29')]=function(_0x532f11,_0x57080f){if(_0x532f11['body']['id']){delete _0x532f11[_0xb614('0x4c')]['id'];}return db[_0xb614('0x32')][_0xb614('0x4b')]({'where':{'id':_0x532f11[_0xb614('0x55')]['id']}})[_0xb614('0x2a')](handleEntityNotFound(_0x57080f,null))['then'](saveUpdates(_0x532f11[_0xb614('0x4c')],null))[_0xb614('0x2a')](respondWithResult(_0x57080f,null))['catch'](handleError(_0x57080f,null));};exports[_0xb614('0x2d')]=function(_0x87ac69,_0x75a1f1){return db[_0xb614('0x32')]['find']({'where':{'id':_0x87ac69[_0xb614('0x55')]['id']}})[_0xb614('0x2a')](handleEntityNotFound(_0x75a1f1,null))[_0xb614('0x2a')](removeEntity(_0x75a1f1,null))['catch'](handleError(_0x75a1f1,null));}; \ No newline at end of file +var _0x9888=['end','status','offset','undefined','count','limit','set','json','apply','save','destroy','then','get','Dispositions','UserProfileResource','sendStatus','error','name','send','map','Disposition','type','key','query','keys','filters','intersection','model','attributes','fields','length','hasOwnProperty','order','sort','filter','where','VIRTUAL','merge','options','includeAll','rows','catch','show','find','create','role','UserProfileSection','userProfileId','autoAssociation','update','body','params','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/environment'];(function(_0x379aff,_0x433da6){var _0x543402=function(_0x46637a){while(--_0x46637a){_0x379aff['push'](_0x379aff['shift']());}};_0x543402(++_0x433da6);}(_0x9888,0xd0));var _0x8988=function(_0xd8d868,_0x4869be){_0xd8d868=_0xd8d868-0x0;var _0xff8721=_0x9888[_0xd8d868];return _0xff8721;};'use strict';var emlformat=require(_0x8988('0x0'));var rimraf=require(_0x8988('0x1'));var zipdir=require(_0x8988('0x2'));var jsonpatch=require(_0x8988('0x3'));var rp=require(_0x8988('0x4'));var moment=require(_0x8988('0x5'));var BPromise=require(_0x8988('0x6'));var Mustache=require(_0x8988('0x7'));var util=require(_0x8988('0x8'));var path=require(_0x8988('0x9'));var sox=require(_0x8988('0xa'));var csv=require(_0x8988('0xb'));var ejs=require(_0x8988('0xc'));var fs=require('fs');var fs_extra=require(_0x8988('0xd'));var _=require(_0x8988('0xe'));var squel=require(_0x8988('0xf'));var crypto=require('crypto');var jsforce=require(_0x8988('0x10'));var deskjs=require(_0x8988('0x11'));var toCsv=require(_0x8988('0xb'));var querystring=require(_0x8988('0x12'));var Papa=require(_0x8988('0x13'));var Redis=require(_0x8988('0x14'));var authService=require('../../components/auth/service');var qs=require(_0x8988('0x15'));var as=require(_0x8988('0x16'));var hardwareService=require(_0x8988('0x17'));var logger=require(_0x8988('0x18'))('api');var utils=require('../../config/utils');var config=require(_0x8988('0x19'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x10e414,_0x47d113){_0x47d113=_0x47d113||0xcc;return function(_0x3d639f){if(_0x3d639f){return _0x10e414['sendStatus'](_0x47d113);}return _0x10e414['status'](_0x47d113)[_0x8988('0x1a')]();};}function respondWithResult(_0x250c56,_0x509b27){_0x509b27=_0x509b27||0xc8;return function(_0x327d16){if(_0x327d16){return _0x250c56[_0x8988('0x1b')](_0x509b27)['json'](_0x327d16);}};}function respondWithFilteredResult(_0x15b1d5,_0x13155a){return function(_0xc97b3f){if(_0xc97b3f){var _0x252ac9=typeof _0x13155a[_0x8988('0x1c')]===_0x8988('0x1d')&&typeof _0x13155a['limit']===_0x8988('0x1d');var _0x1c4b21=_0xc97b3f[_0x8988('0x1e')];var _0x5d491c=_0x252ac9?0x0:_0x13155a[_0x8988('0x1c')];var _0x2922d8=_0x252ac9?_0xc97b3f['count']:_0x13155a[_0x8988('0x1c')]+_0x13155a[_0x8988('0x1f')];var _0x4ef32c;if(_0x2922d8>=_0x1c4b21){_0x2922d8=_0x1c4b21;_0x4ef32c=0xc8;}else{_0x4ef32c=0xce;}_0x15b1d5['status'](_0x4ef32c);return _0x15b1d5[_0x8988('0x20')]('Content-Range',_0x5d491c+'-'+_0x2922d8+'/'+_0x1c4b21)[_0x8988('0x21')](_0xc97b3f);}return null;};}function patchUpdates(_0xfeabff){return function(_0x5efcae){try{jsonpatch[_0x8988('0x22')](_0x5efcae,_0xfeabff,!![]);}catch(_0x425a59){return BPromise['reject'](_0x425a59);}return _0x5efcae[_0x8988('0x23')]();};}function saveUpdates(_0x44eea0,_0x317f97){return function(_0x1dd4e2){if(_0x1dd4e2){return _0x1dd4e2['update'](_0x44eea0)['then'](function(_0x40f7bb){return _0x40f7bb;});}return null;};}function removeEntity(_0x316bb5,_0x2c7cbf){return function(_0x3ac564){if(_0x3ac564){return _0x3ac564[_0x8988('0x24')]()[_0x8988('0x25')](function(){var _0x30ffcb=_0x3ac564[_0x8988('0x26')]({'plain':!![]});var _0xbf4d69=_0x8988('0x27');return db[_0x8988('0x28')][_0x8988('0x24')]({'where':{'type':_0xbf4d69,'resourceId':_0x30ffcb['id']}})[_0x8988('0x25')](function(){return _0x3ac564;});})['then'](function(){_0x316bb5[_0x8988('0x1b')](0xcc)[_0x8988('0x1a')]();});}};}function handleEntityNotFound(_0xa17390,_0x4e7955){return function(_0x5b87d1){if(!_0x5b87d1){_0xa17390[_0x8988('0x29')](0x194);}return _0x5b87d1;};}function handleError(_0x372a24,_0x2f25d8){_0x2f25d8=_0x2f25d8||0x1f4;return function(_0x128892){logger[_0x8988('0x2a')](_0x128892['stack']);if(_0x128892[_0x8988('0x2b')]){delete _0x128892[_0x8988('0x2b')];}_0x372a24[_0x8988('0x1b')](_0x2f25d8)[_0x8988('0x2c')](_0x128892);};}exports['index']=function(_0x3374f2,_0x520928){var _0x982e1e={},_0x495af8={},_0x55cc4a={'count':0x0,'rows':[]};var _0x1fe9e1=_[_0x8988('0x2d')](db[_0x8988('0x2e')]['rawAttributes'],function(_0x3d8dd3){return{'name':_0x3d8dd3['fieldName'],'type':_0x3d8dd3[_0x8988('0x2f')][_0x8988('0x30')]};});_0x495af8['model']=_['map'](_0x1fe9e1,_0x8988('0x2b'));_0x495af8[_0x8988('0x31')]=_[_0x8988('0x32')](_0x3374f2[_0x8988('0x31')]);_0x495af8[_0x8988('0x33')]=_[_0x8988('0x34')](_0x495af8[_0x8988('0x35')],_0x495af8[_0x8988('0x31')]);_0x982e1e[_0x8988('0x36')]=_[_0x8988('0x34')](_0x495af8[_0x8988('0x35')],qs[_0x8988('0x37')](_0x3374f2[_0x8988('0x31')]['fields']));_0x982e1e[_0x8988('0x36')]=_0x982e1e[_0x8988('0x36')][_0x8988('0x38')]?_0x982e1e['attributes']:_0x495af8['model'];if(!_0x3374f2['query'][_0x8988('0x39')]('nolimit')){_0x982e1e['limit']=qs[_0x8988('0x1f')](_0x3374f2['query'][_0x8988('0x1f')]);_0x982e1e['offset']=qs[_0x8988('0x1c')](_0x3374f2[_0x8988('0x31')][_0x8988('0x1c')]);}_0x982e1e[_0x8988('0x3a')]=qs[_0x8988('0x3b')](_0x3374f2[_0x8988('0x31')][_0x8988('0x3b')]);_0x982e1e['where']=qs['filters'](_['pick'](_0x3374f2[_0x8988('0x31')],_0x495af8['filters']),_0x1fe9e1);if(_0x3374f2[_0x8988('0x31')][_0x8988('0x3c')]){_0x982e1e[_0x8988('0x3d')]=_['merge'](_0x982e1e['where'],{'$or':_[_0x8988('0x2d')](_0x1fe9e1,function(_0x2111a1){if(_0x2111a1[_0x8988('0x2f')]!==_0x8988('0x3e')){var _0xe2b00d={};_0xe2b00d[_0x2111a1[_0x8988('0x2b')]]={'$like':'%'+_0x3374f2[_0x8988('0x31')]['filter']+'%'};return _0xe2b00d;}})});}_0x982e1e=_[_0x8988('0x3f')]({},_0x982e1e,_0x3374f2[_0x8988('0x40')]);var _0x1b184e={'where':_0x982e1e[_0x8988('0x3d')]};return db[_0x8988('0x2e')][_0x8988('0x1e')](_0x1b184e)[_0x8988('0x25')](function(_0xd0e8e0){_0x55cc4a['count']=_0xd0e8e0;if(_0x3374f2[_0x8988('0x31')][_0x8988('0x41')]){_0x982e1e['include']=[{'all':!![]}];}return db[_0x8988('0x2e')]['findAll'](_0x982e1e);})[_0x8988('0x25')](function(_0x12396a){_0x55cc4a[_0x8988('0x42')]=_0x12396a;return _0x55cc4a;})[_0x8988('0x25')](respondWithFilteredResult(_0x520928,_0x982e1e))[_0x8988('0x43')](handleError(_0x520928,null));};exports[_0x8988('0x44')]=function(_0x15a13f,_0xf8d162){var _0x3ddb83={'raw':!![],'where':{'id':_0x15a13f['params']['id']}},_0x2e710d={};_0x2e710d[_0x8988('0x35')]=_[_0x8988('0x32')](db[_0x8988('0x2e')]['rawAttributes']);_0x2e710d[_0x8988('0x31')]=_[_0x8988('0x32')](_0x15a13f[_0x8988('0x31')]);_0x2e710d['filters']=_['intersection'](_0x2e710d[_0x8988('0x35')],_0x2e710d[_0x8988('0x31')]);_0x3ddb83[_0x8988('0x36')]=_['intersection'](_0x2e710d[_0x8988('0x35')],qs['fields'](_0x15a13f[_0x8988('0x31')][_0x8988('0x37')]));_0x3ddb83[_0x8988('0x36')]=_0x3ddb83[_0x8988('0x36')][_0x8988('0x38')]?_0x3ddb83[_0x8988('0x36')]:_0x2e710d[_0x8988('0x35')];if(_0x15a13f[_0x8988('0x31')][_0x8988('0x41')]){_0x3ddb83['include']=[{'all':!![]}];}_0x3ddb83=_[_0x8988('0x3f')]({},_0x3ddb83,_0x15a13f[_0x8988('0x40')]);return db[_0x8988('0x2e')][_0x8988('0x45')](_0x3ddb83)[_0x8988('0x25')](handleEntityNotFound(_0xf8d162,null))[_0x8988('0x25')](respondWithResult(_0xf8d162,null))['catch'](handleError(_0xf8d162,null));};exports['create']=function(_0x322560,_0x4f3f5b){return db[_0x8988('0x2e')][_0x8988('0x46')](_0x322560['body'],{})[_0x8988('0x25')](function(_0x331511){var _0x25a8c4=_0x322560['user']['get']({'plain':!![]});if(!_0x25a8c4)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x25a8c4[_0x8988('0x47')]==='user'){var _0x109a68=_0x331511['get']({'plain':!![]});var _0x3f9ee2='Dispositions';return db[_0x8988('0x48')]['find']({'where':{'name':_0x3f9ee2,'userProfileId':_0x25a8c4[_0x8988('0x49')]},'raw':!![]})[_0x8988('0x25')](function(_0x3bc2bc){if(_0x3bc2bc&&_0x3bc2bc[_0x8988('0x4a')]===0x0){return db['UserProfileResource'][_0x8988('0x46')]({'name':_0x109a68[_0x8988('0x2b')],'resourceId':_0x109a68['id'],'type':_0x3bc2bc['name'],'sectionId':_0x3bc2bc['id']},{})['then'](function(){return _0x331511;});}else{return _0x331511;}})[_0x8988('0x43')](function(_0x3d2f68){logger[_0x8988('0x2a')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x3d2f68);throw _0x3d2f68;});}return _0x331511;})[_0x8988('0x25')](respondWithResult(_0x4f3f5b,0xc9))[_0x8988('0x43')](handleError(_0x4f3f5b,null));};exports[_0x8988('0x4b')]=function(_0x103334,_0x54465a){if(_0x103334[_0x8988('0x4c')]['id']){delete _0x103334[_0x8988('0x4c')]['id'];}return db[_0x8988('0x2e')][_0x8988('0x45')]({'where':{'id':_0x103334[_0x8988('0x4d')]['id']}})[_0x8988('0x25')](handleEntityNotFound(_0x54465a,null))[_0x8988('0x25')](saveUpdates(_0x103334['body'],null))['then'](respondWithResult(_0x54465a,null))[_0x8988('0x43')](handleError(_0x54465a,null));};exports[_0x8988('0x24')]=function(_0x2afad4,_0x1777d3){return db[_0x8988('0x2e')][_0x8988('0x45')]({'where':{'id':_0x2afad4[_0x8988('0x4d')]['id']}})[_0x8988('0x25')](handleEntityNotFound(_0x1777d3,null))['then'](removeEntity(_0x1777d3,null))[_0x8988('0x43')](handleError(_0x1777d3,null));}; \ No newline at end of file diff --git a/server/api/disposition/disposition.model.js b/server/api/disposition/disposition.model.js index 1c3da83..f8bf29f 100644 --- a/server/api/disposition/disposition.model.js +++ b/server/api/disposition/disposition.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbd3b=['WhatsappAccountId','lodash','util','../../config/logger','moment','bluebird','request-promise','path','rimraf','./disposition.attributes','exports','define','tools_dispositions','name_voice','ListId','name','name_mail','MailAccountId','name_sms','SmsAccountId','name_fax','FaxAccountId','name_openchannel','OpenchannelAccountId','name_whatsapp'];(function(_0x3e40f0,_0x3e47ed){var _0x56985a=function(_0x228873){while(--_0x228873){_0x3e40f0['push'](_0x3e40f0['shift']());}};_0x56985a(++_0x3e47ed);}(_0xbd3b,0xe2));var _0xbbd3=function(_0x397f37,_0x3cf86d){_0x397f37=_0x397f37-0x0;var _0x31cae6=_0xbd3b[_0x397f37];return _0x31cae6;};'use strict';var _=require(_0xbbd3('0x0'));var util=require(_0xbbd3('0x1'));var logger=require(_0xbbd3('0x2'))('api');var moment=require(_0xbbd3('0x3'));var BPromise=require(_0xbbd3('0x4'));var rp=require(_0xbbd3('0x5'));var fs=require('fs');var path=require(_0xbbd3('0x6'));var rimraf=require(_0xbbd3('0x7'));var config=require('../../config/environment');var attributes=require(_0xbbd3('0x8'));module[_0xbbd3('0x9')]=function(_0xb6403d,_0x299890){return _0xb6403d[_0xbbd3('0xa')]('Disposition',attributes,{'tableName':_0xbbd3('0xb'),'paranoid':![],'indexes':[{'unique':!![],'name':_0xbbd3('0xc'),'fields':['name',_0xbbd3('0xd')]},{'unique':!![],'name':'name_chat','fields':[_0xbbd3('0xe'),'ChatWebsiteId']},{'unique':!![],'name':_0xbbd3('0xf'),'fields':['name',_0xbbd3('0x10')]},{'unique':!![],'name':_0xbbd3('0x11'),'fields':[_0xbbd3('0xe'),_0xbbd3('0x12')]},{'unique':!![],'name':_0xbbd3('0x13'),'fields':['name',_0xbbd3('0x14')]},{'unique':!![],'name':_0xbbd3('0x15'),'fields':[_0xbbd3('0xe'),_0xbbd3('0x16')]},{'unique':!![],'name':_0xbbd3('0x17'),'fields':[_0xbbd3('0xe'),_0xbbd3('0x18')]}],'timestamps':!![]});}; \ No newline at end of file +var _0x301a=['ChatWebsiteId','name_mail','MailAccountId','name_fax','FaxAccountId','OpenchannelAccountId','WhatsappAccountId','lodash','util','moment','bluebird','request-promise','path','rimraf','../../config/environment','./disposition.attributes','exports','define','Disposition','tools_dispositions','name_voice','ListId','name_chat','name'];(function(_0x4fc9e6,_0xc51915){var _0x551d28=function(_0x1a603b){while(--_0x1a603b){_0x4fc9e6['push'](_0x4fc9e6['shift']());}};_0x551d28(++_0xc51915);}(_0x301a,0x97));var _0xa301=function(_0x1d6c5c,_0x4c3946){_0x1d6c5c=_0x1d6c5c-0x0;var _0x1e3404=_0x301a[_0x1d6c5c];return _0x1e3404;};'use strict';var _=require(_0xa301('0x0'));var util=require(_0xa301('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0xa301('0x2'));var BPromise=require(_0xa301('0x3'));var rp=require(_0xa301('0x4'));var fs=require('fs');var path=require(_0xa301('0x5'));var rimraf=require(_0xa301('0x6'));var config=require(_0xa301('0x7'));var attributes=require(_0xa301('0x8'));module[_0xa301('0x9')]=function(_0x59ca68,_0x48a3eb){return _0x59ca68[_0xa301('0xa')](_0xa301('0xb'),attributes,{'tableName':_0xa301('0xc'),'paranoid':![],'indexes':[{'unique':!![],'name':_0xa301('0xd'),'fields':['name',_0xa301('0xe')]},{'unique':!![],'name':_0xa301('0xf'),'fields':[_0xa301('0x10'),_0xa301('0x11')]},{'unique':!![],'name':_0xa301('0x12'),'fields':[_0xa301('0x10'),_0xa301('0x13')]},{'unique':!![],'name':'name_sms','fields':['name','SmsAccountId']},{'unique':!![],'name':_0xa301('0x14'),'fields':['name',_0xa301('0x15')]},{'unique':!![],'name':'name_openchannel','fields':[_0xa301('0x10'),_0xa301('0x16')]},{'unique':!![],'name':'name_whatsapp','fields':[_0xa301('0x10'),_0xa301('0x17')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/disposition/disposition.rpc.js b/server/api/disposition/disposition.rpc.js index d7031b7..dc02281 100644 --- a/server/api/disposition/disposition.rpc.js +++ b/server/api/disposition/disposition.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['http','info','Disposition,\x20%s,\x20%s','request\x20sent','debug','Disposition,\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(_0x1538e0,_0x30326c){var _0x103507=function(_0x330e29){while(--_0x330e29){_0x1538e0['push'](_0x1538e0['shift']());}};_0x103507(++_0x30326c);}(_0xa9e0,0x123));var _0x0a9e=function(_0x8de54f,_0x271987){_0x8de54f=_0x8de54f-0x0;var _0x14cba4=_0xa9e0[_0x8de54f];return _0x14cba4;};'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','Disposition,\x20%s,\x20%s','request\x20sent','debug','Disposition,\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(_0x38885d,_0x40cfe7){var _0x29386c=function(_0x367352){while(--_0x367352){_0x38885d['push'](_0x38885d['shift']());}};_0x29386c(++_0x40cfe7);}(_0xa9e0,0x123));var _0x0a9e=function(_0x34bf97,_0xc60f9d){_0x34bf97=_0x34bf97-0x0;var _0x292719=_0xa9e0[_0x34bf97];return _0x292719;};'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/disposition/index.js b/server/api/disposition/index.js index c377330..614e88d 100644 --- a/server/api/disposition/index.js +++ b/server/api/disposition/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb580=['util','connect-timeout','express','Router','../../components/auth/service','../../config/environment','./disposition.controller','isAuthenticated','index','show','post','create','put','/:id','update','delete','destroy','exports','multer'];(function(_0x4565bf,_0x5ad9d6){var _0x5610ba=function(_0x170988){while(--_0x170988){_0x4565bf['push'](_0x4565bf['shift']());}};_0x5610ba(++_0x5ad9d6);}(_0xb580,0x1b4));var _0x0b58=function(_0x5578b0,_0x4978d8){_0x5578b0=_0x5578b0-0x0;var _0x436723=_0xb580[_0x5578b0];return _0x436723;};'use strict';var multer=require(_0x0b58('0x0'));var util=require(_0x0b58('0x1'));var path=require('path');var timeout=require(_0x0b58('0x2'));var express=require(_0x0b58('0x3'));var router=express[_0x0b58('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x0b58('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x0b58('0x6'));var controller=require(_0x0b58('0x7'));router['get']('/',auth[_0x0b58('0x8')](),controller[_0x0b58('0x9')]);router['get']('/:id',auth['isAuthenticated'](),controller[_0x0b58('0xa')]);router[_0x0b58('0xb')]('/',auth[_0x0b58('0x8')](),controller[_0x0b58('0xc')]);router[_0x0b58('0xd')](_0x0b58('0xe'),auth[_0x0b58('0x8')](),controller[_0x0b58('0xf')]);router[_0x0b58('0x10')](_0x0b58('0xe'),auth[_0x0b58('0x8')](),controller[_0x0b58('0x11')]);module[_0x0b58('0x12')]=router; \ No newline at end of file +var _0xed63=['/:id','update','delete','exports','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./disposition.controller','index','get','isAuthenticated','show','post','create','put'];(function(_0x4c73ac,_0x46b73c){var _0x9839ee=function(_0x2076fb){while(--_0x2076fb){_0x4c73ac['push'](_0x4c73ac['shift']());}};_0x9839ee(++_0x46b73c);}(_0xed63,0x154));var _0x3ed6=function(_0x4fef8c,_0x186651){_0x4fef8c=_0x4fef8c-0x0;var _0x452aa9=_0xed63[_0x4fef8c];return _0x452aa9;};'use strict';var multer=require(_0x3ed6('0x0'));var util=require(_0x3ed6('0x1'));var path=require(_0x3ed6('0x2'));var timeout=require(_0x3ed6('0x3'));var express=require('express');var router=express[_0x3ed6('0x4')]();var fs_extra=require(_0x3ed6('0x5'));var auth=require(_0x3ed6('0x6'));var interaction=require(_0x3ed6('0x7'));var config=require(_0x3ed6('0x8'));var controller=require(_0x3ed6('0x9'));router['get']('/',auth['isAuthenticated'](),controller[_0x3ed6('0xa')]);router[_0x3ed6('0xb')]('/:id',auth[_0x3ed6('0xc')](),controller[_0x3ed6('0xd')]);router[_0x3ed6('0xe')]('/',auth[_0x3ed6('0xc')](),controller[_0x3ed6('0xf')]);router[_0x3ed6('0x10')](_0x3ed6('0x11'),auth[_0x3ed6('0xc')](),controller[_0x3ed6('0x12')]);router[_0x3ed6('0x13')]('/:id',auth[_0x3ed6('0xc')](),controller['destroy']);module[_0x3ed6('0x14')]=router; \ No newline at end of file diff --git a/server/api/faxAccount/faxAccount.attributes.js b/server/api/faxAccount/faxAccount.attributes.js index b7c1dbd..ee1a255 100644 --- a/server/api/faxAccount/faxAccount.attributes.js +++ b/server/api/faxAccount/faxAccount.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfdb1=['sequelize','exports','STRING','ENUM','yes','2400','4800','7200','9600','12000','14400','v17,v27,v29','IAX','DADHI','KHOMP','SIP','TEXT','BOOLEAN','INTEGER','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','setDataValue','mandatoryDispositionPauseId','mandatoryDisposition'];(function(_0x45baf7,_0x46ce25){var _0x2a4a93=function(_0x4ba470){while(--_0x4ba470){_0x45baf7['push'](_0x45baf7['shift']());}};_0x2a4a93(++_0x46ce25);}(_0xfdb1,0x1cc));var _0x1fdb=function(_0x59c9d4,_0x845cde){_0x59c9d4=_0x59c9d4-0x0;var _0x329778=_0xfdb1[_0x59c9d4];return _0x329778;};'use strict';var Sequelize=require(_0x1fdb('0x0'));module[_0x1fdb('0x1')]={'name':{'type':Sequelize[_0x1fdb('0x2')],'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0x1fdb('0x2')]},'ecm':{'type':Sequelize[_0x1fdb('0x3')](_0x1fdb('0x4'),'no'),'defaultValue':_0x1fdb('0x4')},'headerinfo':{'type':Sequelize[_0x1fdb('0x2')],'defaultValue':'xCALLY\x20Motion\x20Fax'},'localstationid':{'type':Sequelize['STRING'],'unique':'localstationid'},'minrate':{'type':Sequelize[_0x1fdb('0x3')](_0x1fdb('0x5'),_0x1fdb('0x6'),_0x1fdb('0x7'),_0x1fdb('0x8'),_0x1fdb('0x9'),_0x1fdb('0xa')),'defaultValue':'4800'},'maxrate':{'type':Sequelize[_0x1fdb('0x3')](_0x1fdb('0x5'),_0x1fdb('0x6'),'7200',_0x1fdb('0x8'),_0x1fdb('0x9'),'14400'),'defaultValue':'14400'},'modem':{'type':Sequelize['STRING'],'defaultValue':_0x1fdb('0xb')},'gateway':{'type':Sequelize[_0x1fdb('0x2')],'defaultValue':'no','validate':{'is':/^(?:yes|no|[0-9]+)$/}},'faxdetect':{'type':Sequelize[_0x1fdb('0x2')],'defaultValue':'no','validate':{'is':/^(?:yes|no|t38|cng|[0-9]+)$/}},'t38timeout':{'type':Sequelize['INTEGER'],'defaultValue':0x1388,'validate':{'min':0x3e8}},'tech':{'type':Sequelize[_0x1fdb('0x3')]('SIP',_0x1fdb('0xc'),_0x1fdb('0xd'),_0x1fdb('0xe')),'defaultValue':_0x1fdb('0xf')},'key':{'type':Sequelize['STRING'],'allowNull':![]},'notificationTemplate':{'type':Sequelize[_0x1fdb('0x10')],'defaultValue':function(){return'Account:\x20{{account.name}}
{{#queue}}Queue:\x20{{queue.name}}
{{/queue}}From\x20:\x20{{from}}';}},'notificationSound':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'notificationShake':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize[_0x1fdb('0x11')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x1fdb('0x11')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize[_0x1fdb('0x12')],'allowNull':!![],'defaultValue':null,'comment':'Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled'},'mandatoryDisposition':{'type':Sequelize[_0x1fdb('0x11')],'defaultValue':![],'comment':_0x1fdb('0x13'),'set':function(_0x104d51){if(!_0x104d51)this[_0x1fdb('0x14')](_0x1fdb('0x15'),null);this['setDataValue'](_0x1fdb('0x16'),_0x104d51);}}}; \ No newline at end of file +var _0x16e0=['2400','4800','9600','12000','14400','v17,v27,v29','INTEGER','IAX','TEXT','Account:\x20{{account.name}}
{{#queue}}Queue:\x20{{queue.name}}
{{/queue}}From\x20:\x20{{from}}','BOOLEAN','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','mandatoryDispositionPauseId','setDataValue','mandatoryDisposition','sequelize','exports','STRING','ENUM','yes','xCALLY\x20Motion\x20Fax','localstationid'];(function(_0x13a085,_0x4c4880){var _0x3e3f5e=function(_0x236b06){while(--_0x236b06){_0x13a085['push'](_0x13a085['shift']());}};_0x3e3f5e(++_0x4c4880);}(_0x16e0,0x124));var _0x016e=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x16e0[_0x20a584];return _0x4b41a8;};'use strict';var Sequelize=require(_0x016e('0x0'));module[_0x016e('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0x016e('0x2')]},'ecm':{'type':Sequelize[_0x016e('0x3')](_0x016e('0x4'),'no'),'defaultValue':'yes'},'headerinfo':{'type':Sequelize[_0x016e('0x2')],'defaultValue':_0x016e('0x5')},'localstationid':{'type':Sequelize['STRING'],'unique':_0x016e('0x6')},'minrate':{'type':Sequelize[_0x016e('0x3')](_0x016e('0x7'),_0x016e('0x8'),'7200',_0x016e('0x9'),_0x016e('0xa'),'14400'),'defaultValue':_0x016e('0x8')},'maxrate':{'type':Sequelize[_0x016e('0x3')](_0x016e('0x7'),'4800','7200',_0x016e('0x9'),_0x016e('0xa'),_0x016e('0xb')),'defaultValue':_0x016e('0xb')},'modem':{'type':Sequelize[_0x016e('0x2')],'defaultValue':_0x016e('0xc')},'gateway':{'type':Sequelize[_0x016e('0x2')],'defaultValue':'no','validate':{'is':/^(?:yes|no|[0-9]+)$/}},'faxdetect':{'type':Sequelize['STRING'],'defaultValue':'no','validate':{'is':/^(?:yes|no|t38|cng|[0-9]+)$/}},'t38timeout':{'type':Sequelize[_0x016e('0xd')],'defaultValue':0x1388,'validate':{'min':0x3e8}},'tech':{'type':Sequelize[_0x016e('0x3')]('SIP',_0x016e('0xe'),'DADHI','KHOMP'),'defaultValue':'SIP'},'key':{'type':Sequelize['STRING'],'allowNull':![]},'notificationTemplate':{'type':Sequelize[_0x016e('0xf')],'defaultValue':function(){return _0x016e('0x10');}},'notificationSound':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x016e('0x11')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0x016e('0xd')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize[_0x016e('0x11')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x016e('0xd')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x016e('0x11')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x016e('0xd')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize[_0x016e('0xd')],'allowNull':!![],'defaultValue':null,'comment':_0x016e('0x12')},'mandatoryDisposition':{'type':Sequelize[_0x016e('0x11')],'defaultValue':![],'comment':_0x016e('0x13'),'set':function(_0x28f270){if(!_0x28f270)this['setDataValue'](_0x016e('0x14'),null);this[_0x016e('0x15')](_0x016e('0x16'),_0x28f270);}}}; \ No newline at end of file diff --git a/server/api/faxAccount/faxAccount.controller.js b/server/api/faxAccount/faxAccount.controller.js index 4629667..312efbd 100644 --- a/server/api/faxAccount/faxAccount.controller.js +++ b/server/api/faxAccount/faxAccount.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x955f=['order','sort','where','pick','filter','merge','options','include','includeAll','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','find','describe','FaxAccountId','Disposition','getDispositions','findOne','hasOwnProperty','rows','removeDispositions','addAnswer','CannedAnswer','findAll','removeAnswers','ids','addInteraction','FaxInteraction','getInteractions','CmContact','Contact','User','internal','Tag','color','tag','addApplications','sequelize','transaction','FaxApplication','bulkCreate','findAndCountAll','getApplications','context','exten','localstationid','description','priority','appdata','Answer','push','CDR(type)=inbound-fax','Set','ecm','gateway','faxdetect','maxrate','minrate','modem','t38timeout','FAXOPT(','Wait','/var/opt/motion2/server/files/attachments/fax-${CALLERID(num)}-${CUT(UNIQUEID,.,1)}-${CUT(UNIQUEID,.,2)}-${STRFTIME(,,%C%y%m%d%H%M%S)}-rx.tif,d','ReceiveFax','addAccountApplications','VoiceExtension','updateAccountApplications','tech','createdAt','updatedAt','ListId','getMessages','FaxMessage','$gte','send','CmList','List','Contacts','DESC','attachments','root','basename','CheckAfterSend','isNil','from','format','\x22%s\x22\x20<%s>','fax','List\x20not\x20found','Send\x20Fax\x20failed','out','filename','Messages','Contact\x20not\x20found','spread','dataValues','SendFax','SendFaxRpc,\x20%s','addAgents','emit','userFaxAccount:save','removeAgents','isArray','userFaxAccount:remove','getAgents','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','path','to-csv','ejs','fs-extra','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','defaults','localhost','socket.io-emitter','redis','./faxAccount.socket','register','jayson/promise','client','http','info','FaxAccount,\x20%s,\x20%s','debug','FaxAccount,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','sendStatus','status','json','undefined','limit','count','offset','set','Content-Range','apply','save','update','destroy','then','get','FaxAccounts','end','name','index','Pause','mandatoryDispositionPause','map','FaxAccount','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','nolimit'];(function(_0x75af81,_0x4edde1){var _0x4f7d41=function(_0x2a6fc0){while(--_0x2a6fc0){_0x75af81['push'](_0x75af81['shift']());}};_0x4f7d41(++_0x4edde1);}(_0x955f,0x1eb));var _0xf955=function(_0x2daebd,_0x561e88){_0x2daebd=_0x2daebd-0x0;var _0x10b063=_0x955f[_0x2daebd];return _0x10b063;};'use strict';var emlformat=require(_0xf955('0x0'));var rimraf=require(_0xf955('0x1'));var zipdir=require(_0xf955('0x2'));var jsonpatch=require(_0xf955('0x3'));var rp=require(_0xf955('0x4'));var moment=require('moment');var BPromise=require(_0xf955('0x5'));var Mustache=require('mustache');var util=require('util');var path=require(_0xf955('0x6'));var sox=require('sox');var csv=require(_0xf955('0x7'));var ejs=require(_0xf955('0x8'));var fs=require('fs');var fs_extra=require(_0xf955('0x9'));var _=require('lodash');var squel=require(_0xf955('0xa'));var crypto=require(_0xf955('0xb'));var jsforce=require('jsforce');var deskjs=require(_0xf955('0xc'));var toCsv=require(_0xf955('0x7'));var querystring=require(_0xf955('0xd'));var Papa=require(_0xf955('0xe'));var Redis=require(_0xf955('0xf'));var authService=require(_0xf955('0x10'));var qs=require(_0xf955('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xf955('0x12'));var logger=require('../../config/logger')(_0xf955('0x13'));var utils=require(_0xf955('0x14'));var config=require(_0xf955('0x15'));var licenseUtil=require('../../config/license/util');var db=require(_0xf955('0x16'))['db'];config['redis']=_[_0xf955('0x17')](config['redis'],{'host':_0xf955('0x18'),'port':0x18eb});var socket=require(_0xf955('0x19'))(new Redis(config[_0xf955('0x1a')]));require(_0xf955('0x1b'))[_0xf955('0x1c')](socket);var jayson=require(_0xf955('0x1d'));var client=jayson[_0xf955('0x1e')][_0xf955('0x1f')]({'port':0x232c});var client9002=jayson[_0xf955('0x1e')][_0xf955('0x1f')]({'port':0x232a});function respondWithRpcPromise(_0x5350e4,_0xc29b35,_0x54e60b,_0x3139d5){return new BPromise(function(_0x3a814f,_0x2f881b){var _0x15c07c=_0x3139d5||client;return _0x15c07c['request'](_0x5350e4,_0x54e60b)['then'](function(_0x1e20d1){logger[_0xf955('0x20')](_0xf955('0x21'),_0xc29b35,'request\x20sent');logger[_0xf955('0x22')](_0xf955('0x23'),_0xc29b35,_0xf955('0x24'),JSON[_0xf955('0x25')](_0x1e20d1));if(_0x1e20d1[_0xf955('0x26')]){if(_0x1e20d1['error'][_0xf955('0x27')]===0x1f4){logger[_0xf955('0x26')](_0xf955('0x21'),_0xc29b35,_0x1e20d1['error'][_0xf955('0x28')]);return _0x2f881b(_0x1e20d1['error'][_0xf955('0x28')]);}logger[_0xf955('0x26')](_0xf955('0x21'),_0xc29b35,_0x1e20d1[_0xf955('0x26')][_0xf955('0x28')]);return _0x3a814f(_0x1e20d1['error'][_0xf955('0x28')]);}else{logger[_0xf955('0x20')](_0xf955('0x21'),_0xc29b35,_0xf955('0x24'));_0x3a814f(_0x1e20d1[_0xf955('0x29')][_0xf955('0x28')]);}})[_0xf955('0x2a')](function(_0x552cf3){logger[_0xf955('0x26')](_0xf955('0x21'),_0xc29b35,_0x552cf3);_0x2f881b(_0x552cf3);});});}function respondWithStatusCode(_0xba8a22,_0x406632){_0x406632=_0x406632||0xcc;return function(_0x2dcd55){if(_0x2dcd55){return _0xba8a22[_0xf955('0x2b')](_0x406632);}return _0xba8a22[_0xf955('0x2c')](_0x406632)['end']();};}function respondWithResult(_0x3caea6,_0x145098){_0x145098=_0x145098||0xc8;return function(_0x41c9f6){if(_0x41c9f6){return _0x3caea6[_0xf955('0x2c')](_0x145098)[_0xf955('0x2d')](_0x41c9f6);}};}function respondWithFilteredResult(_0x264f6d,_0x4d4af0){return function(_0x2232a7){if(_0x2232a7){var _0x1e5d37=typeof _0x4d4af0['offset']===_0xf955('0x2e')&&typeof _0x4d4af0[_0xf955('0x2f')]===_0xf955('0x2e');var _0x1ef794=_0x2232a7['count'];var _0x3a951c=_0x1e5d37?0x0:_0x4d4af0['offset'];var _0x227104=_0x1e5d37?_0x2232a7[_0xf955('0x30')]:_0x4d4af0[_0xf955('0x31')]+_0x4d4af0[_0xf955('0x2f')];var _0x1e8024;if(_0x227104>=_0x1ef794){_0x227104=_0x1ef794;_0x1e8024=0xc8;}else{_0x1e8024=0xce;}_0x264f6d[_0xf955('0x2c')](_0x1e8024);return _0x264f6d[_0xf955('0x32')](_0xf955('0x33'),_0x3a951c+'-'+_0x227104+'/'+_0x1ef794)['json'](_0x2232a7);}return null;};}function patchUpdates(_0x45e913){return function(_0x165cc4){try{jsonpatch[_0xf955('0x34')](_0x165cc4,_0x45e913,!![]);}catch(_0x2046c8){return BPromise['reject'](_0x2046c8);}return _0x165cc4[_0xf955('0x35')]();};}function saveUpdates(_0x31dad5,_0x3c81bc){return function(_0xe1b436){if(_0xe1b436){return _0xe1b436[_0xf955('0x36')](_0x31dad5)['then'](function(_0x4d7155){return _0x4d7155;});}return null;};}function removeEntity(_0x5480db,_0x2626cb){return function(_0x3783dc){if(_0x3783dc){return _0x3783dc[_0xf955('0x37')]()[_0xf955('0x38')](function(){var _0x467447=_0x3783dc[_0xf955('0x39')]({'plain':!![]});var _0x5acb00=_0xf955('0x3a');return db['UserProfileResource'][_0xf955('0x37')]({'where':{'type':_0x5acb00,'resourceId':_0x467447['id']}})[_0xf955('0x38')](function(){return _0x3783dc;});})[_0xf955('0x38')](function(){_0x5480db['status'](0xcc)[_0xf955('0x3b')]();});}};}function handleEntityNotFound(_0x4bef80,_0x2bc1a0){return function(_0x40edaf){if(!_0x40edaf){_0x4bef80[_0xf955('0x2b')](0x194);}return _0x40edaf;};}function handleError(_0x45b78d,_0x52ab07){_0x52ab07=_0x52ab07||0x1f4;return function(_0xf35170){logger[_0xf955('0x26')](_0xf35170['stack']);if(_0xf35170[_0xf955('0x3c')]){delete _0xf35170[_0xf955('0x3c')];}_0x45b78d[_0xf955('0x2c')](_0x52ab07)['send'](_0xf35170);};}exports[_0xf955('0x3d')]=function(_0xffe510,_0x11b7e2){var _0x488b6e={'include':[{'model':db[_0xf955('0x3e')],'as':_0xf955('0x3f')}]},_0x97e8ff={},_0x195faa={'count':0x0,'rows':[]};var _0x2bfbe4=_[_0xf955('0x40')](db[_0xf955('0x41')][_0xf955('0x42')],function(_0x5671c7){return{'name':_0x5671c7[_0xf955('0x43')],'type':_0x5671c7[_0xf955('0x44')][_0xf955('0x45')]};});_0x97e8ff[_0xf955('0x46')]=_[_0xf955('0x40')](_0x2bfbe4,_0xf955('0x3c'));_0x97e8ff[_0xf955('0x47')]=_[_0xf955('0x48')](_0xffe510[_0xf955('0x47')]);_0x97e8ff[_0xf955('0x49')]=_[_0xf955('0x4a')](_0x97e8ff[_0xf955('0x46')],_0x97e8ff[_0xf955('0x47')]);_0x488b6e[_0xf955('0x4b')]=_[_0xf955('0x4a')](_0x97e8ff[_0xf955('0x46')],qs[_0xf955('0x4c')](_0xffe510[_0xf955('0x47')][_0xf955('0x4c')]));_0x488b6e['attributes']=_0x488b6e[_0xf955('0x4b')][_0xf955('0x4d')]?_0x488b6e[_0xf955('0x4b')]:_0x97e8ff['model'];if(!_0xffe510[_0xf955('0x47')]['hasOwnProperty'](_0xf955('0x4e'))){_0x488b6e['limit']=qs[_0xf955('0x2f')](_0xffe510[_0xf955('0x47')][_0xf955('0x2f')]);_0x488b6e[_0xf955('0x31')]=qs['offset'](_0xffe510[_0xf955('0x47')][_0xf955('0x31')]);}_0x488b6e[_0xf955('0x4f')]=qs['sort'](_0xffe510['query'][_0xf955('0x50')]);_0x488b6e[_0xf955('0x51')]=qs[_0xf955('0x49')](_[_0xf955('0x52')](_0xffe510['query'],_0x97e8ff[_0xf955('0x49')]),_0x2bfbe4);if(_0xffe510[_0xf955('0x47')][_0xf955('0x53')]){_0x488b6e['where']=_[_0xf955('0x54')](_0x488b6e['where'],{'$or':_[_0xf955('0x40')](_0x2bfbe4,function(_0x3d3696){if(_0x3d3696[_0xf955('0x44')]!=='VIRTUAL'){var _0x3e24c9={};_0x3e24c9[_0x3d3696[_0xf955('0x3c')]]={'$like':'%'+_0xffe510[_0xf955('0x47')][_0xf955('0x53')]+'%'};return _0x3e24c9;}})});}_0x488b6e=_['merge']({},_0x488b6e,_0xffe510[_0xf955('0x55')]);var _0x4ff0f1={'where':_0x488b6e[_0xf955('0x51')]};return db[_0xf955('0x41')][_0xf955('0x30')](_0x4ff0f1)['then'](function(_0x29126c){_0x195faa['count']=_0x29126c;if(_0xffe510[_0xf955('0x47')]['includeAll']){_0x488b6e[_0xf955('0x56')]=[{'all':!![]}];}return db['FaxAccount']['findAll'](_0x488b6e);})[_0xf955('0x38')](function(_0x45c7fe){_0x195faa['rows']=_0x45c7fe;return _0x195faa;})[_0xf955('0x38')](respondWithFilteredResult(_0x11b7e2,_0x488b6e))['catch'](handleError(_0x11b7e2,null));};exports['show']=function(_0x4c2977,_0x5c427c){var _0x3c37e2={'raw':![],'where':{'id':_0x4c2977['params']['id']},'include':[{'model':db['Pause'],'as':_0xf955('0x3f')}]},_0x1abe1c={};_0x1abe1c[_0xf955('0x46')]=_[_0xf955('0x48')](db[_0xf955('0x41')][_0xf955('0x42')]);_0x1abe1c[_0xf955('0x47')]=_[_0xf955('0x48')](_0x4c2977[_0xf955('0x47')]);_0x1abe1c[_0xf955('0x49')]=_[_0xf955('0x4a')](_0x1abe1c[_0xf955('0x46')],_0x1abe1c[_0xf955('0x47')]);_0x3c37e2['attributes']=_[_0xf955('0x4a')](_0x1abe1c[_0xf955('0x46')],qs[_0xf955('0x4c')](_0x4c2977[_0xf955('0x47')][_0xf955('0x4c')]));_0x3c37e2['attributes']=_0x3c37e2[_0xf955('0x4b')][_0xf955('0x4d')]?_0x3c37e2[_0xf955('0x4b')]:_0x1abe1c[_0xf955('0x46')];if(_0x4c2977[_0xf955('0x47')][_0xf955('0x57')]){_0x3c37e2[_0xf955('0x56')]=[{'all':!![]}];}_0x3c37e2=_[_0xf955('0x54')]({},_0x3c37e2,_0x4c2977[_0xf955('0x55')]);return db[_0xf955('0x41')]['find'](_0x3c37e2)[_0xf955('0x38')](handleEntityNotFound(_0x5c427c,null))[_0xf955('0x38')](respondWithResult(_0x5c427c,null))[_0xf955('0x2a')](handleError(_0x5c427c,null));};exports[_0xf955('0x58')]=function(_0x116458,_0x3b0e91){return db[_0xf955('0x41')][_0xf955('0x58')](_0x116458[_0xf955('0x59')],{})[_0xf955('0x38')](function(_0x40efb1){var _0x2b8173=_0x116458['user'][_0xf955('0x39')]({'plain':!![]});if(!_0x2b8173)throw new Error(_0xf955('0x5a'));if(_0x2b8173[_0xf955('0x5b')]===_0xf955('0x5c')){var _0x3c2cfd=_0x40efb1[_0xf955('0x39')]({'plain':!![]});var _0x1c4e2d='FaxAccounts';return db['UserProfileSection']['find']({'where':{'name':_0x1c4e2d,'userProfileId':_0x2b8173[_0xf955('0x5d')]},'raw':!![]})['then'](function(_0x570b6a){if(_0x570b6a&&_0x570b6a[_0xf955('0x5e')]===0x0){return db['UserProfileResource'][_0xf955('0x58')]({'name':_0x3c2cfd[_0xf955('0x3c')],'resourceId':_0x3c2cfd['id'],'type':_0x570b6a[_0xf955('0x3c')],'sectionId':_0x570b6a['id']},{})[_0xf955('0x38')](function(){return _0x40efb1;});}else{return _0x40efb1;}})['catch'](function(_0x349d76){logger[_0xf955('0x26')](_0xf955('0x5f'),_0x349d76);throw _0x349d76;});}return _0x40efb1;})[_0xf955('0x38')](respondWithResult(_0x3b0e91,0xc9))[_0xf955('0x2a')](handleError(_0x3b0e91,null));};exports['update']=function(_0x189468,_0x5990d7){if(_0x189468[_0xf955('0x59')]['id']){delete _0x189468[_0xf955('0x59')]['id'];}return db[_0xf955('0x41')]['find']({'where':{'id':_0x189468[_0xf955('0x60')]['id']},'include':[{'model':db[_0xf955('0x3e')],'as':_0xf955('0x3f')}]})[_0xf955('0x38')](handleEntityNotFound(_0x5990d7,null))[_0xf955('0x38')](saveUpdates(_0x189468[_0xf955('0x59')],null))[_0xf955('0x38')](respondWithResult(_0x5990d7,null))['catch'](handleError(_0x5990d7,null));};exports['destroy']=function(_0x1bf4ac,_0x2d29a0){return db[_0xf955('0x41')][_0xf955('0x61')]({'where':{'id':_0x1bf4ac[_0xf955('0x60')]['id']}})[_0xf955('0x38')](handleEntityNotFound(_0x2d29a0,null))[_0xf955('0x38')](removeEntity(_0x2d29a0,null))[_0xf955('0x2a')](handleError(_0x2d29a0,null));};exports[_0xf955('0x62')]=function(_0x2d20af,_0x71ee3a){return db['FaxAccount'][_0xf955('0x62')]()['then'](respondWithResult(_0x71ee3a,null))[_0xf955('0x2a')](handleError(_0x71ee3a,null));};exports['addDisposition']=function(_0x49a263,_0x4210af,_0x20f11c){if(_0x49a263['body']['id']){delete _0x49a263[_0xf955('0x59')]['id'];}return db[_0xf955('0x41')]['find']({'where':{'id':_0x49a263['params']['id']}})[_0xf955('0x38')](handleEntityNotFound(_0x4210af,null))[_0xf955('0x38')](function(_0x46f0e2){if(_0x46f0e2){_0x49a263['body'][_0xf955('0x63')]=_0x46f0e2['id'];return db[_0xf955('0x64')][_0xf955('0x58')](_0x49a263[_0xf955('0x59')]);}})[_0xf955('0x38')](respondWithResult(_0x4210af,null))[_0xf955('0x2a')](handleError(_0x4210af,null));};exports[_0xf955('0x65')]=function(_0xf1e40b,_0x5a45da,_0x3960ec){var _0x1bc7b9={'raw':![],'where':{}};var _0x58eb99={};var _0x45dba4={'count':0x0,'rows':[]};return db[_0xf955('0x41')][_0xf955('0x66')]({'where':{'id':_0xf1e40b[_0xf955('0x60')]['id']}})['then'](handleEntityNotFound(_0x5a45da,null))[_0xf955('0x38')](function(_0x360786){if(_0x360786){_0x58eb99['model']=_['keys'](db[_0xf955('0x64')][_0xf955('0x42')]);_0x58eb99[_0xf955('0x47')]=_[_0xf955('0x48')](_0xf1e40b['query']);_0x58eb99[_0xf955('0x49')]=_[_0xf955('0x4a')](_0x58eb99[_0xf955('0x46')],_0x58eb99[_0xf955('0x47')]);_0x1bc7b9[_0xf955('0x4b')]=_[_0xf955('0x4a')](_0x58eb99[_0xf955('0x46')],qs[_0xf955('0x4c')](_0xf1e40b[_0xf955('0x47')][_0xf955('0x4c')]));_0x1bc7b9[_0xf955('0x4b')]=_0x1bc7b9[_0xf955('0x4b')][_0xf955('0x4d')]?_0x1bc7b9['attributes']:_0x58eb99[_0xf955('0x46')];if(!_0xf1e40b[_0xf955('0x47')][_0xf955('0x67')](_0xf955('0x4e'))){_0x1bc7b9['limit']=qs[_0xf955('0x2f')](_0xf1e40b[_0xf955('0x47')][_0xf955('0x2f')]);_0x1bc7b9[_0xf955('0x31')]=qs[_0xf955('0x31')](_0xf1e40b[_0xf955('0x47')][_0xf955('0x31')]);}_0x1bc7b9[_0xf955('0x4f')]=qs[_0xf955('0x50')](_0xf1e40b[_0xf955('0x47')][_0xf955('0x50')]);_0x1bc7b9['where']=qs[_0xf955('0x49')](_[_0xf955('0x52')](_0xf1e40b[_0xf955('0x47')],_0x58eb99[_0xf955('0x49')]));_0x1bc7b9[_0xf955('0x51')][_0xf955('0x63')]=_0x360786['id'];if(_0xf1e40b[_0xf955('0x47')]['filter']){_0x1bc7b9[_0xf955('0x51')]=_['merge'](_0x1bc7b9[_0xf955('0x51')],{'$or':_['map'](_0x1bc7b9[_0xf955('0x4b')],function(_0x2f53b9){var _0x3f76ce={};_0x3f76ce[_0x2f53b9]={'$like':'%'+_0xf1e40b[_0xf955('0x47')][_0xf955('0x53')]+'%'};return _0x3f76ce;})});}_0x1bc7b9=_[_0xf955('0x54')]({},_0x1bc7b9,_0xf1e40b['options']);return db[_0xf955('0x64')][_0xf955('0x30')]({'where':_0x1bc7b9[_0xf955('0x51')]})['then'](function(_0x526346){_0x45dba4[_0xf955('0x30')]=_0x526346;if(_0xf1e40b[_0xf955('0x47')][_0xf955('0x57')]){_0x1bc7b9['include']=[{'all':!![]}];}return db[_0xf955('0x64')]['findAll'](_0x1bc7b9);})[_0xf955('0x38')](function(_0x4afb35){_0x45dba4[_0xf955('0x68')]=_0x4afb35;return _0x45dba4;});}})[_0xf955('0x38')](respondWithFilteredResult(_0x5a45da,_0x1bc7b9))[_0xf955('0x2a')](handleError(_0x5a45da,null));};exports['removeDispositions']=function(_0x14dd35,_0x397f7e,_0x2cd1bd){return db['FaxAccount'][_0xf955('0x61')]({'where':{'id':_0x14dd35[_0xf955('0x60')]['id']}})[_0xf955('0x38')](handleEntityNotFound(_0x397f7e,null))[_0xf955('0x38')](function(_0x419da5){if(_0x419da5){return _0x419da5[_0xf955('0x69')](_0x14dd35[_0xf955('0x47')]['ids']);}})[_0xf955('0x38')](respondWithStatusCode(_0x397f7e,null))[_0xf955('0x2a')](handleError(_0x397f7e,null));};exports[_0xf955('0x6a')]=function(_0x347078,_0xcf610b,_0x585a62){if(_0x347078[_0xf955('0x59')]['id']){delete _0x347078[_0xf955('0x59')]['id'];}return db['FaxAccount']['find']({'where':{'id':_0x347078[_0xf955('0x60')]['id']}})[_0xf955('0x38')](handleEntityNotFound(_0xcf610b,null))[_0xf955('0x38')](function(_0x1ef4a4){if(_0x1ef4a4){_0x347078['body'][_0xf955('0x63')]=_0x1ef4a4['id'];return db['CannedAnswer']['create'](_0x347078[_0xf955('0x59')]);}})[_0xf955('0x38')](respondWithResult(_0xcf610b,null))['catch'](handleError(_0xcf610b,null));};exports['getAnswers']=function(_0x2fa2f5,_0x10f8b6,_0x13e548){var _0x4f71b9={'raw':![],'where':{}};var _0x51a64d={};var _0x406366={'count':0x0,'rows':[]};return db[_0xf955('0x41')][_0xf955('0x66')]({'where':{'id':_0x2fa2f5['params']['id']}})['then'](handleEntityNotFound(_0x10f8b6,null))['then'](function(_0x5999c5){if(_0x5999c5){_0x51a64d[_0xf955('0x46')]=_['keys'](db[_0xf955('0x6b')][_0xf955('0x42')]);_0x51a64d[_0xf955('0x47')]=_[_0xf955('0x48')](_0x2fa2f5[_0xf955('0x47')]);_0x51a64d['filters']=_[_0xf955('0x4a')](_0x51a64d[_0xf955('0x46')],_0x51a64d[_0xf955('0x47')]);_0x4f71b9[_0xf955('0x4b')]=_['intersection'](_0x51a64d[_0xf955('0x46')],qs[_0xf955('0x4c')](_0x2fa2f5['query'][_0xf955('0x4c')]));_0x4f71b9[_0xf955('0x4b')]=_0x4f71b9[_0xf955('0x4b')][_0xf955('0x4d')]?_0x4f71b9[_0xf955('0x4b')]:_0x51a64d[_0xf955('0x46')];if(!_0x2fa2f5['query']['hasOwnProperty'](_0xf955('0x4e'))){_0x4f71b9['limit']=qs[_0xf955('0x2f')](_0x2fa2f5[_0xf955('0x47')][_0xf955('0x2f')]);_0x4f71b9[_0xf955('0x31')]=qs['offset'](_0x2fa2f5['query'][_0xf955('0x31')]);}_0x4f71b9[_0xf955('0x4f')]=qs[_0xf955('0x50')](_0x2fa2f5[_0xf955('0x47')][_0xf955('0x50')]);_0x4f71b9['where']=qs[_0xf955('0x49')](_[_0xf955('0x52')](_0x2fa2f5[_0xf955('0x47')],_0x51a64d[_0xf955('0x49')]));_0x4f71b9['where']['FaxAccountId']=_0x5999c5['id'];if(_0x2fa2f5[_0xf955('0x47')][_0xf955('0x53')]){_0x4f71b9['where']=_[_0xf955('0x54')](_0x4f71b9[_0xf955('0x51')],{'$or':_[_0xf955('0x40')](_0x4f71b9[_0xf955('0x4b')],function(_0x5d9c5a){var _0x2ec76f={};_0x2ec76f[_0x5d9c5a]={'$like':'%'+_0x2fa2f5[_0xf955('0x47')][_0xf955('0x53')]+'%'};return _0x2ec76f;})});}_0x4f71b9=_[_0xf955('0x54')]({},_0x4f71b9,_0x2fa2f5[_0xf955('0x55')]);return db[_0xf955('0x6b')][_0xf955('0x30')]({'where':_0x4f71b9['where']})['then'](function(_0x4ba6ed){_0x406366[_0xf955('0x30')]=_0x4ba6ed;if(_0x2fa2f5[_0xf955('0x47')][_0xf955('0x57')]){_0x4f71b9[_0xf955('0x56')]=[{'all':!![]}];}return db[_0xf955('0x6b')][_0xf955('0x6c')](_0x4f71b9);})[_0xf955('0x38')](function(_0x4d4ede){_0x406366[_0xf955('0x68')]=_0x4d4ede;return _0x406366;});}})[_0xf955('0x38')](respondWithFilteredResult(_0x10f8b6,_0x4f71b9))['catch'](handleError(_0x10f8b6,null));};exports[_0xf955('0x6d')]=function(_0x92234,_0x101655,_0x906f64){return db[_0xf955('0x41')][_0xf955('0x61')]({'where':{'id':_0x92234[_0xf955('0x60')]['id']}})[_0xf955('0x38')](handleEntityNotFound(_0x101655,null))['then'](function(_0x50cf5e){if(_0x50cf5e){return _0x50cf5e['removeAnswers'](_0x92234[_0xf955('0x47')][_0xf955('0x6e')]);}})[_0xf955('0x38')](respondWithStatusCode(_0x101655,null))[_0xf955('0x2a')](handleError(_0x101655,null));};exports[_0xf955('0x6f')]=function(_0x4d4ff7,_0x147f69,_0x22f34c){return db[_0xf955('0x70')][_0xf955('0x61')]({'where':{'id':_0x4d4ff7[_0xf955('0x60')]['id']}})[_0xf955('0x38')](handleEntityNotFound(_0x147f69,null))[_0xf955('0x38')](function(_0x436d73){if(_0x436d73){return _0x436d73[_0xf955('0x6f')](_0x4d4ff7['body'][_0xf955('0x6e')],_['omit'](_0x4d4ff7[_0xf955('0x59')],[_0xf955('0x6e'),'id'])||{});}})[_0xf955('0x38')](respondWithResult(_0x147f69,null))[_0xf955('0x2a')](handleError(_0x147f69,null));};exports[_0xf955('0x71')]=function(_0x187fb0,_0x2d6b36,_0x4b8cde){var _0x1ef189={'raw':![],'where':{}};var _0x4bb590={};var _0x222df2={'count':0x0,'rows':[]};return db[_0xf955('0x41')]['findOne']({'where':{'id':_0x187fb0[_0xf955('0x60')]['id']}})[_0xf955('0x38')](handleEntityNotFound(_0x2d6b36,null))[_0xf955('0x38')](function(_0x11cc35){if(_0x11cc35){_0x4bb590[_0xf955('0x46')]=_[_0xf955('0x48')](db[_0xf955('0x70')]['rawAttributes']);_0x4bb590[_0xf955('0x47')]=_[_0xf955('0x48')](_0x187fb0['query']);_0x4bb590[_0xf955('0x49')]=_[_0xf955('0x4a')](_0x4bb590['model'],_0x4bb590['query']);_0x1ef189[_0xf955('0x4b')]=_[_0xf955('0x4a')](_0x4bb590[_0xf955('0x46')],qs['fields'](_0x187fb0[_0xf955('0x47')][_0xf955('0x4c')]));_0x1ef189[_0xf955('0x4b')]=_0x1ef189[_0xf955('0x4b')][_0xf955('0x4d')]?_0x1ef189[_0xf955('0x4b')]:_0x4bb590[_0xf955('0x46')];if(!_0x187fb0[_0xf955('0x47')][_0xf955('0x67')](_0xf955('0x4e'))){_0x1ef189[_0xf955('0x2f')]=qs[_0xf955('0x2f')](_0x187fb0[_0xf955('0x47')][_0xf955('0x2f')]);_0x1ef189['offset']=qs['offset'](_0x187fb0[_0xf955('0x47')][_0xf955('0x31')]);}_0x1ef189[_0xf955('0x4f')]=qs[_0xf955('0x50')](_0x187fb0[_0xf955('0x47')]['sort']);_0x1ef189[_0xf955('0x51')]=qs[_0xf955('0x49')](_['pick'](_0x187fb0[_0xf955('0x47')],_0x4bb590[_0xf955('0x49')]));_0x1ef189[_0xf955('0x51')][_0xf955('0x63')]=_0x11cc35['id'];if(_0x187fb0['query'][_0xf955('0x53')]){_0x1ef189['where']=_[_0xf955('0x54')](_0x1ef189[_0xf955('0x51')],{'$or':_[_0xf955('0x40')](_0x1ef189[_0xf955('0x4b')],function(_0x5aff59){var _0x2b3dcf={};_0x2b3dcf[_0x5aff59]={'$like':'%'+_0x187fb0[_0xf955('0x47')][_0xf955('0x53')]+'%'};return _0x2b3dcf;})});}_0x1ef189=_[_0xf955('0x54')]({},_0x1ef189,_0x187fb0[_0xf955('0x55')]);return db['FaxInteraction'][_0xf955('0x30')]({'where':_0x1ef189[_0xf955('0x51')]})[_0xf955('0x38')](function(_0x5f2c05){_0x222df2[_0xf955('0x30')]=_0x5f2c05;if(_0x187fb0[_0xf955('0x47')][_0xf955('0x57')]){_0x1ef189[_0xf955('0x56')]=[{'model':db[_0xf955('0x72')],'as':_0xf955('0x73'),'required':![]},{'model':db[_0xf955('0x74')],'as':'Owner','attributes':['name','fullname',_0xf955('0x75')],'required':![]},{'model':db[_0xf955('0x76')],'as':'Tags','attributes':['id',_0xf955('0x3c'),_0xf955('0x77')],'where':_0x187fb0[_0xf955('0x47')]['tag']?{'id':_0x187fb0[_0xf955('0x47')][_0xf955('0x78')]}:undefined,'required':_0x187fb0['query']['tag']?!![]:![]}];}return db[_0xf955('0x70')][_0xf955('0x6c')](_0x1ef189);})[_0xf955('0x38')](function(_0x30baa1){_0x222df2[_0xf955('0x68')]=_0x30baa1;return _0x222df2;});}})['then'](respondWithFilteredResult(_0x2d6b36,_0x1ef189))[_0xf955('0x2a')](handleError(_0x2d6b36,null));};exports[_0xf955('0x79')]=function(_0x3a2c35,_0x38935f,_0x349576){return db['FaxAccount'][_0xf955('0x66')]({'where':{'id':_0x3a2c35[_0xf955('0x60')]['id']}})[_0xf955('0x38')](handleEntityNotFound(_0x38935f,null))[_0xf955('0x38')](function(_0x497730){if(_0x497730){return db[_0xf955('0x7a')][_0xf955('0x7b')](function(_0x723d5e){return db[_0xf955('0x7c')][_0xf955('0x37')]({'where':{'FaxAccountId':_0x3a2c35['params']['id']},'transaction':_0x723d5e})[_0xf955('0x38')](function(_0xbbee29){var _0x5eed70=_[_0xf955('0x40')](_0x3a2c35[_0xf955('0x59')],function(_0xe6e1f2){_0xe6e1f2[_0xf955('0x63')]=_0x3a2c35[_0xf955('0x60')]['id'];return _0xe6e1f2;});return db[_0xf955('0x7c')][_0xf955('0x7d')](_0x5eed70,{'transaction':_0x723d5e});});})[_0xf955('0x38')](function(){return db[_0xf955('0x7c')][_0xf955('0x7e')]({'where':{'FaxAccountId':_0x3a2c35['params']['id']},'order':'priority'});});}})[_0xf955('0x38')](respondWithResult(_0x38935f,null))[_0xf955('0x2a')](handleError(_0x38935f,null));};exports[_0xf955('0x7f')]=function(_0x1d3424,_0x5ba1b6,_0x83574d){var _0x1d4389={};var _0x57e0d7={};var _0x54903a;var _0x318209;return db[_0xf955('0x41')][_0xf955('0x66')]({'where':{'id':_0x1d3424[_0xf955('0x60')]['id']}})['then'](handleEntityNotFound(_0x5ba1b6,null))[_0xf955('0x38')](function(_0x45cf37){if(_0x45cf37){_0x54903a=_0x45cf37;_0x57e0d7[_0xf955('0x46')]=_[_0xf955('0x48')](db[_0xf955('0x7c')][_0xf955('0x42')]);_0x57e0d7[_0xf955('0x47')]=_[_0xf955('0x48')](_0x1d3424['query']);_0x57e0d7[_0xf955('0x49')]=_[_0xf955('0x4a')](_0x57e0d7[_0xf955('0x46')],_0x57e0d7[_0xf955('0x47')]);_0x1d4389[_0xf955('0x4b')]=_[_0xf955('0x4a')](_0x57e0d7[_0xf955('0x46')],qs[_0xf955('0x4c')](_0x1d3424[_0xf955('0x47')][_0xf955('0x4c')]));_0x1d4389['attributes']=_0x1d4389[_0xf955('0x4b')][_0xf955('0x4d')]?_0x1d4389[_0xf955('0x4b')]:_0x57e0d7[_0xf955('0x46')];_0x1d4389[_0xf955('0x4f')]=qs[_0xf955('0x50')](_0x1d3424[_0xf955('0x47')]['sort']);_0x1d4389[_0xf955('0x51')]=qs['filters'](_[_0xf955('0x52')](_0x1d3424[_0xf955('0x47')],_0x57e0d7[_0xf955('0x49')]));if(_0x1d3424[_0xf955('0x47')][_0xf955('0x53')]){_0x1d4389[_0xf955('0x51')]=_[_0xf955('0x54')](_0x1d4389[_0xf955('0x51')],{'$or':_[_0xf955('0x40')](_0x1d4389['attributes'],function(_0x1fc665){var _0x2d79a0={};_0x2d79a0[_0x1fc665]={'$like':'%'+_0x1d3424[_0xf955('0x47')][_0xf955('0x53')]+'%'};return _0x2d79a0;})});}_0x1d4389=_[_0xf955('0x54')]({},_0x1d4389,_0x1d3424[_0xf955('0x55')]);return _0x54903a['getApplications'](_0x1d4389);}})[_0xf955('0x38')](function(_0x38ff21){if(_0x38ff21){_0x318209=_0x38ff21[_0xf955('0x4d')];if(!_0x1d3424['query'][_0xf955('0x67')](_0xf955('0x4e'))){_0x1d4389[_0xf955('0x2f')]=qs[_0xf955('0x2f')](_0x1d3424[_0xf955('0x47')][_0xf955('0x2f')]);_0x1d4389['offset']=qs[_0xf955('0x31')](_0x1d3424[_0xf955('0x47')][_0xf955('0x31')]);}return _0x54903a[_0xf955('0x7f')](_0x1d4389);}})[_0xf955('0x38')](function(_0x28eae8){if(_0x28eae8){return _0x28eae8?{'count':_0x318209,'rows':_0x28eae8}:null;}})['then'](respondWithResult(_0x5ba1b6,null))[_0xf955('0x2a')](handleError(_0x5ba1b6,null));};function Extension(_0x5a7e41,_0x4999fb,_0x5d4293,_0x5f06ec){this[_0xf955('0x80')]='from-voip-provider';this[_0xf955('0x81')]=_0x5a7e41[_0xf955('0x82')];this['app']=_0x5f06ec;this[_0xf955('0x44')]='system';this[_0xf955('0x83')]='Fax\x20Extension';this[_0xf955('0x63')]=_0x5a7e41['id'];this[_0xf955('0x84')]=_0x4999fb;this[_0xf955('0x85')]=_0x5d4293;}function createExtensionsReciveFax(_0x43a5c3){var _0x49e5a8=0x1;var _0x15b32a=[];_0x15b32a['push'](new Extension(_0x43a5c3,_0x49e5a8,'',_0xf955('0x86')));_0x49e5a8+=0x1;_0x15b32a[_0xf955('0x87')](new Extension(_0x43a5c3,_0x49e5a8,_0xf955('0x88'),_0xf955('0x89')));_0x49e5a8+=0x1;for(var _0x42f4f6 in _0x43a5c3){if(_0x43a5c3[_0xf955('0x67')](_0x42f4f6)&&(_0x42f4f6===_0xf955('0x8a')||_0x42f4f6===_0xf955('0x82')||_0x42f4f6===_0xf955('0x8b')||_0x42f4f6===_0xf955('0x8c')||_0x42f4f6==='headerinfo'||_0x42f4f6===_0xf955('0x8d')||_0x42f4f6===_0xf955('0x8e')||_0x42f4f6===_0xf955('0x8f')||_0x42f4f6===_0xf955('0x90'))){_0x15b32a[_0xf955('0x87')](new Extension(_0x43a5c3,_0x49e5a8,_0xf955('0x91')+_0x42f4f6+')='+_0x43a5c3[_0x42f4f6],_0xf955('0x89')));_0x49e5a8+=0x1;}}_0x15b32a['push'](new Extension(_0x43a5c3,_0x49e5a8,'6',_0xf955('0x92')));_0x49e5a8+=0x1;_0x15b32a[_0xf955('0x87')](new Extension(_0x43a5c3,_0x49e5a8,_0xf955('0x93'),_0xf955('0x94')));_0x49e5a8=0x0;return _0x15b32a;}exports[_0xf955('0x95')]=function(_0x2b68b3,_0x392191,_0x45564b){var _0x3fb318;return db[_0xf955('0x7a')]['transaction'](function(_0x1620ec){return db[_0xf955('0x41')][_0xf955('0x58')](_0x2b68b3[_0xf955('0x59')],{'transaction':_0x1620ec})[_0xf955('0x38')](function(_0x14e019){_0x3fb318=_0x14e019[_0xf955('0x39')]({'plain':!![]});return db[_0xf955('0x96')]['bulkCreate'](createExtensionsReciveFax(_0x3fb318),{'transaction':_0x1620ec});});})[_0xf955('0x38')](function(){return _0x3fb318;})[_0xf955('0x38')](respondWithResult(_0x392191,null))[_0xf955('0x2a')](handleError(_0x392191,null));};exports[_0xf955('0x97')]=function(_0x2148f0,_0x29d54d,_0x206b42){var _0x411e4d;return db['sequelize']['transaction'](function(_0x22d2de){return db[_0xf955('0x41')][_0xf955('0x36')](_0x2148f0[_0xf955('0x59')],{'where':{'id':_0x2148f0['body']['id']},'transaction':_0x22d2de})['then'](function(_0xb01fc1){return db[_0xf955('0x96')]['destroy']({'where':{'FaxAccountId':_0x2148f0[_0xf955('0x59')]['id']},'transaction':_0x22d2de})[_0xf955('0x38')](function(_0x46e341){return db[_0xf955('0x96')][_0xf955('0x7d')](createExtensionsReciveFax(_['omit'](_0x2148f0[_0xf955('0x59')],[_0xf955('0x98'),_0xf955('0x45'),_0xf955('0x99'),_0xf955('0x9a'),'TrunkId',_0xf955('0x9b')])),{'transaction':_0x22d2de});});});})['then'](function(){return db[_0xf955('0x41')]['findById'](_0x2148f0[_0xf955('0x59')]['id']);})[_0xf955('0x38')](respondWithResult(_0x29d54d,null))[_0xf955('0x2a')](handleError(_0x29d54d,null));};exports[_0xf955('0x9c')]=function(_0x435926,_0x23fa36,_0x85661f){var _0x3a0ad1={'raw':!![],'where':{}};var _0x421b76={};var _0x30a042={'count':0x0,'rows':[]};return db['FaxAccount']['findOne']({'where':{'id':_0x435926[_0xf955('0x60')]['id']}})[_0xf955('0x38')](handleEntityNotFound(_0x23fa36,null))[_0xf955('0x38')](function(_0x522403){if(_0x522403){_0x421b76['model']=_['keys'](db[_0xf955('0x9d')]['rawAttributes']);_0x421b76['query']=_[_0xf955('0x48')](_0x435926['query']);_0x421b76[_0xf955('0x49')]=_[_0xf955('0x4a')](_0x421b76['model'],_0x421b76['query']);_0x3a0ad1[_0xf955('0x4b')]=_[_0xf955('0x4a')](_0x421b76[_0xf955('0x46')],qs[_0xf955('0x4c')](_0x435926[_0xf955('0x47')]['fields']));_0x3a0ad1[_0xf955('0x4b')]=_0x3a0ad1['attributes']['length']?_0x3a0ad1['attributes']:_0x421b76[_0xf955('0x46')];if(!_0x435926[_0xf955('0x47')][_0xf955('0x67')]('nolimit')){_0x3a0ad1['limit']=qs[_0xf955('0x2f')](_0x435926['query'][_0xf955('0x2f')]);_0x3a0ad1['offset']=qs[_0xf955('0x31')](_0x435926[_0xf955('0x47')]['offset']);}_0x3a0ad1[_0xf955('0x4f')]=qs['sort'](_0x435926[_0xf955('0x47')][_0xf955('0x50')]);_0x3a0ad1[_0xf955('0x51')]=qs[_0xf955('0x49')](_[_0xf955('0x52')](_0x435926['query'],_0x421b76['filters']));_0x3a0ad1[_0xf955('0x51')][_0xf955('0x63')]=_0x522403['id'];if(_0x435926[_0xf955('0x47')][_0xf955('0x53')]){_0x3a0ad1[_0xf955('0x51')]=_[_0xf955('0x54')](_0x3a0ad1[_0xf955('0x51')],{'$or':_[_0xf955('0x40')](_0x3a0ad1[_0xf955('0x4b')],function(_0x552408){var _0x2e4606={};_0x2e4606[_0x552408]={'$like':'%'+_0x435926[_0xf955('0x47')][_0xf955('0x53')]+'%'};return _0x2e4606;})});}if(_0x435926[_0xf955('0x47')][_0xf955('0x9e')]){var _0x5798d7=_0x435926[_0xf955('0x47')][_0xf955('0x9e')]['split'](',');var _0x3c4bff={};_0x3c4bff[_0x5798d7[0x0]]={'$gte':moment(_0x5798d7[0x1])['format']('YYYY-MM-DD\x20HH:mm:ss')};_0x3a0ad1[_0xf955('0x51')]=_[_0xf955('0x54')](_0x3a0ad1[_0xf955('0x51')],_0x3c4bff);}_0x3a0ad1=_[_0xf955('0x54')]({},_0x3a0ad1,_0x435926['options']);return db[_0xf955('0x9d')][_0xf955('0x30')]({'where':_0x3a0ad1[_0xf955('0x51')]})[_0xf955('0x38')](function(_0x524978){_0x30a042[_0xf955('0x30')]=_0x524978;if(_0x435926[_0xf955('0x47')]['includeAll']){_0x3a0ad1[_0xf955('0x56')]=[{'all':!![]}];}return db[_0xf955('0x9d')][_0xf955('0x6c')](_0x3a0ad1);})['then'](function(_0x78f299){_0x30a042[_0xf955('0x68')]=_0x78f299;return _0x30a042;});}})[_0xf955('0x38')](respondWithFilteredResult(_0x23fa36,_0x3a0ad1))['catch'](handleError(_0x23fa36,null));};exports[_0xf955('0x9f')]=function(_0x49718e,_0x5aeba7,_0x52a4d2){var _0x2de63d,_0xef8165={},_0x19b556;if(_0x49718e[_0xf955('0x59')]['to']){_0x19b556=_0x49718e[_0xf955('0x59')]['to'][0x0];}return db[_0xf955('0x41')]['find']({'where':{'id':_0x49718e[_0xf955('0x60')]['id']},'include':[{'model':db[_0xf955('0xa0')],'as':_0xf955('0xa1'),'include':[{'model':db[_0xf955('0x72')],'as':_0xf955('0xa2'),'where':{'fax':_0x19b556},'limit':0x1,'order':[[_0xf955('0x9a'),_0xf955('0xa3')]]}]}]})[_0xf955('0x38')](handleEntityNotFound(_0x5aeba7,null))[_0xf955('0x38')](function(_0x56a307){_0x2de63d=_0x56a307;if(_0x49718e['body'][_0xf955('0xa4')]&&_0x49718e[_0xf955('0x59')][_0xf955('0xa4')]['length']){for(var _0x51db73=0x0;_0x51db73<_0x49718e[_0xf955('0x59')]['attachments'][_0xf955('0x4d')];_0x51db73+=0x1){_0x49718e[_0xf955('0x59')][_0xf955('0xa4')][_0x51db73]={'filename':_0x49718e[_0xf955('0x59')]['attachments'][_0x51db73][_0xf955('0x3c')],'id':_0x49718e[_0xf955('0x59')][_0xf955('0xa4')][_0x51db73]['id'],'path':path['join'](config[_0xf955('0xa5')],'server/files/attachments',_0x49718e[_0xf955('0x59')][_0xf955('0xa4')][_0x51db73][_0xf955('0xa6')])};}}return respondWithRpcPromise(_0xf955('0xa7'),'CheckAfterSend',{'FaxAccountId':_[_0xf955('0xa8')](_0x49718e[_0xf955('0x60')]['id'])?undefined:_0x49718e[_0xf955('0x60')]['id'],'path':_['isNil'](_0x49718e[_0xf955('0x59')]['attachments'][0x0][_0xf955('0x6')])?undefined:_0x49718e['body'][_0xf955('0xa4')][0x0]['path'],'fax':_[_0xf955('0xa8')](_0x49718e['body']['to'][0x0])?undefined:_0x49718e['body']['to'][0x0]},client9002);})['then'](function(){if(_0x2de63d){if(_[_0xf955('0xa8')](_0x49718e['body']['from'])){_0x49718e[_0xf955('0x59')][_0xf955('0xa9')]=util[_0xf955('0xaa')](_0xf955('0xab'),_0x2de63d[_0xf955('0x3c')],_0x2de63d[_0xf955('0xac')]);}if(_0x2de63d[_0xf955('0xa1')]){if(_0x2de63d[_0xf955('0xa1')]['Contacts'][_0xf955('0x4d')]){return _0x2de63d[_0xf955('0xa1')][_0xf955('0xa2')][0x0];}else{return db[_0xf955('0x72')][_0xf955('0x58')](_[_0xf955('0x17')](_0x49718e[_0xf955('0x59')],{'firstName':_0x49718e[_0xf955('0x59')]['to'][0x0],'phone':_0x49718e[_0xf955('0x59')]['to'][0x0],'fax':_0x49718e['body']['to'][0x0],'ListId':_0x2de63d[_0xf955('0x9b')]}));}}else{throw new Error(_0xf955('0xad'));}}else{throw new Error(_0xf955('0xae'));}})[_0xf955('0x38')](function(_0x914d41){if(_0x914d41){return db[_0xf955('0x70')]['find']({'where':{'ContactId':_0x914d41['id'],'closed':![],'FaxAccountId':_0x2de63d['id']}})[_0xf955('0x38')](function(_0x37ec4b){if(_0x37ec4b){return[_0x37ec4b,![]];}return db[_0xf955('0x70')][_0xf955('0x58')]({'UserId':_0x49718e[_0xf955('0x5c')]['id'],'ContactId':_0x914d41['id'],'FaxAccountId':_0x2de63d['id'],'fax':_0x49718e['body']['to'][0x0],'firstMsgDirection':_0xf955('0xaf'),'Messages':[_[_0xf955('0x54')](_0x49718e['body'],{'read':![],'body':_0x49718e['body']['attachments'][0x0][_0xf955('0xb0')],'FaxAccountId':_0x2de63d['id'],'UserId':_0x49718e[_0xf955('0x5c')]['id'],'ContactId':_0x914d41['id'],'AttachmentId':_0x49718e[_0xf955('0x59')][_0xf955('0xa4')][0x0]['id']})]},{'include':[{'model':db[_0xf955('0x9d')],'as':_0xf955('0xb1')}]})[_0xf955('0x38')](function(_0x2c8f94){return[_0x2c8f94,!![]];});});}else{throw new Error(_0xf955('0xb2'));}})[_0xf955('0xb3')](function(_0x4a8578,_0x36ae67){if(_0x36ae67){return _0x4a8578;}return db[_0xf955('0x9d')][_0xf955('0x58')]({'direction':_0xf955('0xaf'),'read':![],'body':_0x49718e[_0xf955('0x59')]['attachments'][0x0][_0xf955('0xb0')],'FaxAccountId':_0x2de63d['id'],'FaxInteractionId':_0x4a8578['id'],'UserId':_0x49718e[_0xf955('0x5c')]['id'],'ContactId':_0x4a8578['ContactId'],'AttachmentId':_0x49718e[_0xf955('0x59')][_0xf955('0xa4')][0x0]['id']})[_0xf955('0x38')](function(_0x598ad5){_0x4a8578[_0xf955('0xb4')][_0xf955('0xb1')]=[];_0x4a8578[_0xf955('0xb4')][_0xf955('0xb1')][_0xf955('0x87')](_0x598ad5[_0xf955('0xb4')]);return _0x4a8578;});})[_0xf955('0x38')](function(_0x574bde){respondWithRpcPromise(_0xf955('0xb5'),'SendFax',{'FaxAccountId':_['isNil'](_0x49718e['params']['id'])?undefined:_0x49718e[_0xf955('0x60')]['id'],'path':_[_0xf955('0xa8')](_0x49718e[_0xf955('0x59')][_0xf955('0xa4')][0x0][_0xf955('0x6')])?undefined:_0x49718e[_0xf955('0x59')][_0xf955('0xa4')][0x0]['path'],'fax':_['isNil'](_0x49718e[_0xf955('0x59')]['to'][0x0])?undefined:_0x49718e[_0xf955('0x59')]['to'][0x0],'AttachmentId':_0x49718e['body']['attachments'][0x0]['id']},client9002)[_0xf955('0x38')](function(_0x1fa2b4){logger[_0xf955('0x20')]('SendFaxRpc,\x20%s',_0x1fa2b4);})['catch'](function(_0x3b8cda){logger[_0xf955('0x20')](_0xf955('0xb6'),_0x3b8cda);});return _0x574bde;})[_0xf955('0x38')](respondWithResult(_0x5aeba7,null))[_0xf955('0x2a')](handleError(_0x5aeba7,null));};exports['addAgents']=function(_0x56e886,_0x2cc2dd,_0x32449b){return db[_0xf955('0x41')][_0xf955('0x61')]({'where':{'id':_0x56e886['params']['id']}})[_0xf955('0x38')](handleEntityNotFound(_0x2cc2dd,null))[_0xf955('0x38')](function(_0x1b1824){if(_0x1b1824){return _0x1b1824[_0xf955('0xb7')](_0x56e886[_0xf955('0x59')][_0xf955('0x6e')],_['omit'](_0x56e886['body'],[_0xf955('0x6e'),'id'])||{})['spread'](function(_0x26c950){for(var _0x2bb665=0x0;_0x2bb665<_0x56e886['body']['ids']['length'];_0x2bb665+=0x1){socket[_0xf955('0xb8')](_0xf955('0xb9'),{'UserId':_0x56e886[_0xf955('0x59')][_0xf955('0x6e')][_0x2bb665],'FaxAccountId':_0x56e886[_0xf955('0x60')]['id']});}return _0x26c950;});}})[_0xf955('0x38')](respondWithResult(_0x2cc2dd,null))[_0xf955('0x2a')](handleError(_0x2cc2dd,null));};exports[_0xf955('0xba')]=function(_0x426480,_0x53dc70,_0x3fd087){return db['FaxAccount']['find']({'where':{'id':_0x426480[_0xf955('0x60')]['id']}})[_0xf955('0x38')](handleEntityNotFound(_0x53dc70,null))[_0xf955('0x38')](function(_0x7a79c9){if(_0x7a79c9){return _0x7a79c9['removeAgents'](_0x426480[_0xf955('0x47')]['ids'])[_0xf955('0x38')](function(){if(_[_0xf955('0xbb')](_0x426480[_0xf955('0x47')][_0xf955('0x6e')])){for(var _0x512f7b=0x0;_0x512f7b<_0x426480[_0xf955('0x47')][_0xf955('0x6e')][_0xf955('0x4d')];_0x512f7b+=0x1){socket[_0xf955('0xb8')](_0xf955('0xbc'),{'UserId':Number(_0x426480[_0xf955('0x47')][_0xf955('0x6e')][_0x512f7b]),'FaxAccountId':Number(_0x426480[_0xf955('0x60')]['id'])});}}else{socket[_0xf955('0xb8')]('userFaxAccount:remove',{'UserId':Number(_0x426480[_0xf955('0x47')][_0xf955('0x6e')]),'FaxAccountId':Number(_0x426480[_0xf955('0x60')]['id'])});}});}})[_0xf955('0x38')](respondWithStatusCode(_0x53dc70,null))[_0xf955('0x2a')](handleError(_0x53dc70,null));};exports['getAgents']=function(_0x3ca289,_0x42ab5c,_0x1a0bf2){var _0x147f3c={};var _0x458e89={};var _0x2308b2;var _0x57a9d9;return db[_0xf955('0x41')][_0xf955('0x66')]({'where':{'id':_0x3ca289[_0xf955('0x60')]['id']}})[_0xf955('0x38')](handleEntityNotFound(_0x42ab5c,null))[_0xf955('0x38')](function(_0x597fab){if(_0x597fab){_0x2308b2=_0x597fab;_0x458e89[_0xf955('0x46')]=_[_0xf955('0x48')](db[_0xf955('0x74')]['rawAttributes']);_0x458e89[_0xf955('0x47')]=_[_0xf955('0x48')](_0x3ca289['query']);_0x458e89[_0xf955('0x49')]=_[_0xf955('0x4a')](_0x458e89[_0xf955('0x46')],_0x458e89[_0xf955('0x47')]);_0x147f3c[_0xf955('0x4b')]=_['intersection'](_0x458e89['model'],qs[_0xf955('0x4c')](_0x3ca289[_0xf955('0x47')][_0xf955('0x4c')]));_0x147f3c[_0xf955('0x4b')]=_0x147f3c[_0xf955('0x4b')][_0xf955('0x4d')]?_0x147f3c['attributes']:_0x458e89[_0xf955('0x46')];_0x147f3c[_0xf955('0x4f')]=qs[_0xf955('0x50')](_0x3ca289[_0xf955('0x47')]['sort']);_0x147f3c[_0xf955('0x51')]=qs[_0xf955('0x49')](_[_0xf955('0x52')](_0x3ca289[_0xf955('0x47')],_0x458e89['filters']));if(_0x3ca289[_0xf955('0x47')][_0xf955('0x53')]){_0x147f3c[_0xf955('0x51')]=_[_0xf955('0x54')](_0x147f3c[_0xf955('0x51')],{'$or':_[_0xf955('0x40')](_0x147f3c[_0xf955('0x4b')],function(_0x59abbd){var _0x3ccc35={};_0x3ccc35[_0x59abbd]={'$like':'%'+_0x3ca289[_0xf955('0x47')][_0xf955('0x53')]+'%'};return _0x3ccc35;})});}_0x147f3c=_[_0xf955('0x54')]({},_0x147f3c,_0x3ca289[_0xf955('0x55')]);return _0x2308b2[_0xf955('0xbd')](_0x147f3c);}})[_0xf955('0x38')](function(_0x1f655d){if(_0x1f655d){_0x57a9d9=_0x1f655d[_0xf955('0x4d')];if(!_0x3ca289[_0xf955('0x47')][_0xf955('0x67')](_0xf955('0x4e'))){_0x147f3c['limit']=qs[_0xf955('0x2f')](_0x3ca289[_0xf955('0x47')][_0xf955('0x2f')]);_0x147f3c['offset']=qs[_0xf955('0x31')](_0x3ca289['query'][_0xf955('0x31')]);}return _0x2308b2[_0xf955('0xbd')](_0x147f3c);}})[_0xf955('0x38')](function(_0x139935){if(_0x139935){return _0x139935?{'count':_0x57a9d9,'rows':_0x139935}:null;}})['then'](respondWithResult(_0x42ab5c,null))['catch'](handleError(_0x42ab5c,null));}; \ No newline at end of file +var _0xda2d=['from-voip-provider','exten','localstationid','type','description','Fax\x20Extension','appdata','push','Answer','CDR(type)=inbound-fax','Set','ecm','gateway','faxdetect','headerinfo','maxrate','minrate','modem','t38timeout','FAXOPT(','/var/opt/motion2/server/files/attachments/fax-${CALLERID(num)}-${CUT(UNIQUEID,.,1)}-${CUT(UNIQUEID,.,2)}-${STRFTIME(,,%C%y%m%d%H%M%S)}-rx.tif,d','ReceiveFax','VoiceExtension','updateAccountApplications','tech','createdAt','updatedAt','ListId','findById','getMessages','FaxMessage','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','CmList','List','CmContact','Contacts','DESC','attachments','join','basename','CheckAfterSend','isNil','from','\x22%s\x22\x20<%s>','List\x20not\x20found','out','filename','Messages','Contact\x20not\x20found','spread','dataValues','SendFax','SendFaxRpc,\x20%s','emit','userFaxAccount:save','removeAgents','isArray','userFaxAccount:remove','getAgents','User','rimraf','zip-dir','fast-json-patch','request-promise','moment','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','defaults','redis','localhost','socket.io-emitter','./faxAccount.socket','register','client','http','request','then','info','FaxAccount,\x20%s,\x20%s','request\x20sent','debug','FaxAccount,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','sendStatus','status','json','undefined','limit','offset','count','Content-Range','reject','save','update','destroy','get','FaxAccounts','UserProfileResource','end','stack','name','send','index','Pause','mandatoryDispositionPause','rawAttributes','fieldName','key','map','query','keys','filters','model','attributes','fields','length','nolimit','order','sort','filter','where','merge','options','FaxAccount','includeAll','include','findAll','rows','show','intersection','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','find','userProfileId','autoAssociation','create','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','describe','addDisposition','FaxAccountId','getDispositions','hasOwnProperty','pick','Disposition','ids','addAnswer','CannedAnswer','removeAnswers','addInteraction','FaxInteraction','omit','findOne','Contact','Owner','fullname','internal','Tags','tag','sequelize','transaction','FaxApplication','bulkCreate','findAndCountAll','priority','getApplications','context'];(function(_0x236bc2,_0x4d4ada){var _0x152fa7=function(_0x1fc3d8){while(--_0x1fc3d8){_0x236bc2['push'](_0x236bc2['shift']());}};_0x152fa7(++_0x4d4ada);}(_0xda2d,0x102));var _0xdda2=function(_0x283e17,_0x556b96){_0x283e17=_0x283e17-0x0;var _0x3ee87d=_0xda2d[_0x283e17];return _0x3ee87d;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xdda2('0x0'));var zipdir=require(_0xdda2('0x1'));var jsonpatch=require(_0xdda2('0x2'));var rp=require(_0xdda2('0x3'));var moment=require(_0xdda2('0x4'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require('util');var path=require(_0xdda2('0x5'));var sox=require(_0xdda2('0x6'));var csv=require(_0xdda2('0x7'));var ejs=require(_0xdda2('0x8'));var fs=require('fs');var fs_extra=require(_0xdda2('0x9'));var _=require(_0xdda2('0xa'));var squel=require(_0xdda2('0xb'));var crypto=require(_0xdda2('0xc'));var jsforce=require(_0xdda2('0xd'));var deskjs=require(_0xdda2('0xe'));var toCsv=require('to-csv');var querystring=require(_0xdda2('0xf'));var Papa=require(_0xdda2('0x10'));var Redis=require('ioredis');var authService=require(_0xdda2('0x11'));var qs=require(_0xdda2('0x12'));var as=require(_0xdda2('0x13'));var hardwareService=require(_0xdda2('0x14'));var logger=require(_0xdda2('0x15'))(_0xdda2('0x16'));var utils=require(_0xdda2('0x17'));var config=require(_0xdda2('0x18'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];config['redis']=_[_0xdda2('0x19')](config[_0xdda2('0x1a')],{'host':_0xdda2('0x1b'),'port':0x18eb});var socket=require(_0xdda2('0x1c'))(new Redis(config[_0xdda2('0x1a')]));require(_0xdda2('0x1d'))[_0xdda2('0x1e')](socket);var jayson=require('jayson/promise');var client=jayson[_0xdda2('0x1f')]['http']({'port':0x232c});var client9002=jayson[_0xdda2('0x1f')][_0xdda2('0x20')]({'port':0x232a});function respondWithRpcPromise(_0x3553d5,_0x457764,_0x1922b1,_0x5d8a83){return new BPromise(function(_0x55d674,_0x43f67b){var _0x518c6d=_0x5d8a83||client;return _0x518c6d[_0xdda2('0x21')](_0x3553d5,_0x1922b1)[_0xdda2('0x22')](function(_0x335fb5){logger[_0xdda2('0x23')](_0xdda2('0x24'),_0x457764,_0xdda2('0x25'));logger[_0xdda2('0x26')](_0xdda2('0x27'),_0x457764,_0xdda2('0x25'),JSON[_0xdda2('0x28')](_0x335fb5));if(_0x335fb5[_0xdda2('0x29')]){if(_0x335fb5[_0xdda2('0x29')]['code']===0x1f4){logger[_0xdda2('0x29')]('FaxAccount,\x20%s,\x20%s',_0x457764,_0x335fb5[_0xdda2('0x29')][_0xdda2('0x2a')]);return _0x43f67b(_0x335fb5[_0xdda2('0x29')]['message']);}logger[_0xdda2('0x29')]('FaxAccount,\x20%s,\x20%s',_0x457764,_0x335fb5[_0xdda2('0x29')][_0xdda2('0x2a')]);return _0x55d674(_0x335fb5['error'][_0xdda2('0x2a')]);}else{logger[_0xdda2('0x23')](_0xdda2('0x24'),_0x457764,_0xdda2('0x25'));_0x55d674(_0x335fb5[_0xdda2('0x2b')]['message']);}})[_0xdda2('0x2c')](function(_0x4be5ea){logger[_0xdda2('0x29')](_0xdda2('0x24'),_0x457764,_0x4be5ea);_0x43f67b(_0x4be5ea);});});}function respondWithStatusCode(_0x5436d1,_0x4e97dc){_0x4e97dc=_0x4e97dc||0xcc;return function(_0x28da54){if(_0x28da54){return _0x5436d1[_0xdda2('0x2d')](_0x4e97dc);}return _0x5436d1[_0xdda2('0x2e')](_0x4e97dc)['end']();};}function respondWithResult(_0x90d919,_0x5d26ae){_0x5d26ae=_0x5d26ae||0xc8;return function(_0x2e755b){if(_0x2e755b){return _0x90d919[_0xdda2('0x2e')](_0x5d26ae)[_0xdda2('0x2f')](_0x2e755b);}};}function respondWithFilteredResult(_0x91b41a,_0x4bb8a4){return function(_0x24c37d){if(_0x24c37d){var _0x255bbc=typeof _0x4bb8a4['offset']===_0xdda2('0x30')&&typeof _0x4bb8a4[_0xdda2('0x31')]===_0xdda2('0x30');var _0x15e511=_0x24c37d['count'];var _0x129eba=_0x255bbc?0x0:_0x4bb8a4[_0xdda2('0x32')];var _0x4b19b7=_0x255bbc?_0x24c37d[_0xdda2('0x33')]:_0x4bb8a4['offset']+_0x4bb8a4[_0xdda2('0x31')];var _0x55809a;if(_0x4b19b7>=_0x15e511){_0x4b19b7=_0x15e511;_0x55809a=0xc8;}else{_0x55809a=0xce;}_0x91b41a['status'](_0x55809a);return _0x91b41a['set'](_0xdda2('0x34'),_0x129eba+'-'+_0x4b19b7+'/'+_0x15e511)['json'](_0x24c37d);}return null;};}function patchUpdates(_0x1b13f4){return function(_0x508664){try{jsonpatch['apply'](_0x508664,_0x1b13f4,!![]);}catch(_0x52a509){return BPromise[_0xdda2('0x35')](_0x52a509);}return _0x508664[_0xdda2('0x36')]();};}function saveUpdates(_0xca6046,_0x2fd592){return function(_0x12e96d){if(_0x12e96d){return _0x12e96d[_0xdda2('0x37')](_0xca6046)[_0xdda2('0x22')](function(_0x1426fd){return _0x1426fd;});}return null;};}function removeEntity(_0x3cddbd,_0x2bcf47){return function(_0x4a32ea){if(_0x4a32ea){return _0x4a32ea[_0xdda2('0x38')]()[_0xdda2('0x22')](function(){var _0x2f8674=_0x4a32ea[_0xdda2('0x39')]({'plain':!![]});var _0x392373=_0xdda2('0x3a');return db[_0xdda2('0x3b')]['destroy']({'where':{'type':_0x392373,'resourceId':_0x2f8674['id']}})['then'](function(){return _0x4a32ea;});})[_0xdda2('0x22')](function(){_0x3cddbd[_0xdda2('0x2e')](0xcc)[_0xdda2('0x3c')]();});}};}function handleEntityNotFound(_0x4811d2,_0x54e211){return function(_0x871054){if(!_0x871054){_0x4811d2[_0xdda2('0x2d')](0x194);}return _0x871054;};}function handleError(_0x2d7a21,_0x11f1f6){_0x11f1f6=_0x11f1f6||0x1f4;return function(_0x246001){logger['error'](_0x246001[_0xdda2('0x3d')]);if(_0x246001[_0xdda2('0x3e')]){delete _0x246001['name'];}_0x2d7a21['status'](_0x11f1f6)[_0xdda2('0x3f')](_0x246001);};}exports[_0xdda2('0x40')]=function(_0x33fe97,_0x2708f4){var _0x20969d={'include':[{'model':db[_0xdda2('0x41')],'as':_0xdda2('0x42')}]},_0x585eba={},_0x2e7847={'count':0x0,'rows':[]};var _0x1a7262=_['map'](db['FaxAccount'][_0xdda2('0x43')],function(_0x2e0524){return{'name':_0x2e0524[_0xdda2('0x44')],'type':_0x2e0524['type'][_0xdda2('0x45')]};});_0x585eba['model']=_[_0xdda2('0x46')](_0x1a7262,'name');_0x585eba[_0xdda2('0x47')]=_[_0xdda2('0x48')](_0x33fe97[_0xdda2('0x47')]);_0x585eba[_0xdda2('0x49')]=_['intersection'](_0x585eba[_0xdda2('0x4a')],_0x585eba['query']);_0x20969d[_0xdda2('0x4b')]=_['intersection'](_0x585eba[_0xdda2('0x4a')],qs[_0xdda2('0x4c')](_0x33fe97[_0xdda2('0x47')][_0xdda2('0x4c')]));_0x20969d[_0xdda2('0x4b')]=_0x20969d['attributes'][_0xdda2('0x4d')]?_0x20969d[_0xdda2('0x4b')]:_0x585eba['model'];if(!_0x33fe97[_0xdda2('0x47')]['hasOwnProperty'](_0xdda2('0x4e'))){_0x20969d[_0xdda2('0x31')]=qs[_0xdda2('0x31')](_0x33fe97[_0xdda2('0x47')][_0xdda2('0x31')]);_0x20969d[_0xdda2('0x32')]=qs[_0xdda2('0x32')](_0x33fe97[_0xdda2('0x47')][_0xdda2('0x32')]);}_0x20969d[_0xdda2('0x4f')]=qs[_0xdda2('0x50')](_0x33fe97[_0xdda2('0x47')][_0xdda2('0x50')]);_0x20969d['where']=qs['filters'](_['pick'](_0x33fe97[_0xdda2('0x47')],_0x585eba[_0xdda2('0x49')]),_0x1a7262);if(_0x33fe97['query'][_0xdda2('0x51')]){_0x20969d[_0xdda2('0x52')]=_[_0xdda2('0x53')](_0x20969d['where'],{'$or':_[_0xdda2('0x46')](_0x1a7262,function(_0x1fa4d0){if(_0x1fa4d0['type']!=='VIRTUAL'){var _0x37422b={};_0x37422b[_0x1fa4d0['name']]={'$like':'%'+_0x33fe97[_0xdda2('0x47')]['filter']+'%'};return _0x37422b;}})});}_0x20969d=_[_0xdda2('0x53')]({},_0x20969d,_0x33fe97[_0xdda2('0x54')]);var _0x50bd88={'where':_0x20969d['where']};return db[_0xdda2('0x55')][_0xdda2('0x33')](_0x50bd88)[_0xdda2('0x22')](function(_0x33f0b4){_0x2e7847['count']=_0x33f0b4;if(_0x33fe97[_0xdda2('0x47')][_0xdda2('0x56')]){_0x20969d[_0xdda2('0x57')]=[{'all':!![]}];}return db[_0xdda2('0x55')][_0xdda2('0x58')](_0x20969d);})['then'](function(_0x1a56cc){_0x2e7847[_0xdda2('0x59')]=_0x1a56cc;return _0x2e7847;})['then'](respondWithFilteredResult(_0x2708f4,_0x20969d))[_0xdda2('0x2c')](handleError(_0x2708f4,null));};exports[_0xdda2('0x5a')]=function(_0x143670,_0x2c2a4a){var _0x161d7b={'raw':![],'where':{'id':_0x143670['params']['id']},'include':[{'model':db[_0xdda2('0x41')],'as':'mandatoryDispositionPause'}]},_0x265169={};_0x265169[_0xdda2('0x4a')]=_['keys'](db[_0xdda2('0x55')]['rawAttributes']);_0x265169[_0xdda2('0x47')]=_[_0xdda2('0x48')](_0x143670[_0xdda2('0x47')]);_0x265169[_0xdda2('0x49')]=_[_0xdda2('0x5b')](_0x265169[_0xdda2('0x4a')],_0x265169[_0xdda2('0x47')]);_0x161d7b[_0xdda2('0x4b')]=_['intersection'](_0x265169[_0xdda2('0x4a')],qs[_0xdda2('0x4c')](_0x143670[_0xdda2('0x47')]['fields']));_0x161d7b[_0xdda2('0x4b')]=_0x161d7b[_0xdda2('0x4b')]['length']?_0x161d7b[_0xdda2('0x4b')]:_0x265169['model'];if(_0x143670[_0xdda2('0x47')][_0xdda2('0x56')]){_0x161d7b[_0xdda2('0x57')]=[{'all':!![]}];}_0x161d7b=_[_0xdda2('0x53')]({},_0x161d7b,_0x143670[_0xdda2('0x54')]);return db['FaxAccount']['find'](_0x161d7b)['then'](handleEntityNotFound(_0x2c2a4a,null))[_0xdda2('0x22')](respondWithResult(_0x2c2a4a,null))[_0xdda2('0x2c')](handleError(_0x2c2a4a,null));};exports['create']=function(_0x44637d,_0x126977){return db[_0xdda2('0x55')]['create'](_0x44637d[_0xdda2('0x5c')],{})[_0xdda2('0x22')](function(_0x113266){var _0x58ae15=_0x44637d[_0xdda2('0x5d')][_0xdda2('0x39')]({'plain':!![]});if(!_0x58ae15)throw new Error(_0xdda2('0x5e'));if(_0x58ae15[_0xdda2('0x5f')]==='user'){var _0x4645f8=_0x113266['get']({'plain':!![]});var _0x494b81='FaxAccounts';return db[_0xdda2('0x60')][_0xdda2('0x61')]({'where':{'name':_0x494b81,'userProfileId':_0x58ae15[_0xdda2('0x62')]},'raw':!![]})[_0xdda2('0x22')](function(_0x3f511d){if(_0x3f511d&&_0x3f511d[_0xdda2('0x63')]===0x0){return db[_0xdda2('0x3b')][_0xdda2('0x64')]({'name':_0x4645f8[_0xdda2('0x3e')],'resourceId':_0x4645f8['id'],'type':_0x3f511d[_0xdda2('0x3e')],'sectionId':_0x3f511d['id']},{})[_0xdda2('0x22')](function(){return _0x113266;});}else{return _0x113266;}})['catch'](function(_0x215e2a){logger[_0xdda2('0x29')](_0xdda2('0x65'),_0x215e2a);throw _0x215e2a;});}return _0x113266;})[_0xdda2('0x22')](respondWithResult(_0x126977,0xc9))[_0xdda2('0x2c')](handleError(_0x126977,null));};exports[_0xdda2('0x37')]=function(_0x2affc6,_0x57fb41){if(_0x2affc6[_0xdda2('0x5c')]['id']){delete _0x2affc6[_0xdda2('0x5c')]['id'];}return db[_0xdda2('0x55')][_0xdda2('0x61')]({'where':{'id':_0x2affc6[_0xdda2('0x66')]['id']},'include':[{'model':db['Pause'],'as':_0xdda2('0x42')}]})[_0xdda2('0x22')](handleEntityNotFound(_0x57fb41,null))[_0xdda2('0x22')](saveUpdates(_0x2affc6[_0xdda2('0x5c')],null))[_0xdda2('0x22')](respondWithResult(_0x57fb41,null))['catch'](handleError(_0x57fb41,null));};exports[_0xdda2('0x38')]=function(_0x18d251,_0x3d49e8){return db[_0xdda2('0x55')][_0xdda2('0x61')]({'where':{'id':_0x18d251['params']['id']}})[_0xdda2('0x22')](handleEntityNotFound(_0x3d49e8,null))[_0xdda2('0x22')](removeEntity(_0x3d49e8,null))[_0xdda2('0x2c')](handleError(_0x3d49e8,null));};exports['describe']=function(_0x1b7b96,_0x483c17){return db[_0xdda2('0x55')][_0xdda2('0x67')]()[_0xdda2('0x22')](respondWithResult(_0x483c17,null))['catch'](handleError(_0x483c17,null));};exports[_0xdda2('0x68')]=function(_0xc60963,_0x511fb9,_0x13c0d9){if(_0xc60963['body']['id']){delete _0xc60963[_0xdda2('0x5c')]['id'];}return db[_0xdda2('0x55')][_0xdda2('0x61')]({'where':{'id':_0xc60963[_0xdda2('0x66')]['id']}})[_0xdda2('0x22')](handleEntityNotFound(_0x511fb9,null))['then'](function(_0x586ca1){if(_0x586ca1){_0xc60963[_0xdda2('0x5c')][_0xdda2('0x69')]=_0x586ca1['id'];return db['Disposition']['create'](_0xc60963[_0xdda2('0x5c')]);}})['then'](respondWithResult(_0x511fb9,null))[_0xdda2('0x2c')](handleError(_0x511fb9,null));};exports[_0xdda2('0x6a')]=function(_0x4910a6,_0x263f6d,_0x156c00){var _0xdcd08c={'raw':![],'where':{}};var _0x4739c4={};var _0x694386={'count':0x0,'rows':[]};return db[_0xdda2('0x55')]['findOne']({'where':{'id':_0x4910a6[_0xdda2('0x66')]['id']}})[_0xdda2('0x22')](handleEntityNotFound(_0x263f6d,null))[_0xdda2('0x22')](function(_0x533880){if(_0x533880){_0x4739c4[_0xdda2('0x4a')]=_[_0xdda2('0x48')](db['Disposition']['rawAttributes']);_0x4739c4[_0xdda2('0x47')]=_[_0xdda2('0x48')](_0x4910a6[_0xdda2('0x47')]);_0x4739c4['filters']=_['intersection'](_0x4739c4[_0xdda2('0x4a')],_0x4739c4['query']);_0xdcd08c[_0xdda2('0x4b')]=_[_0xdda2('0x5b')](_0x4739c4[_0xdda2('0x4a')],qs[_0xdda2('0x4c')](_0x4910a6[_0xdda2('0x47')][_0xdda2('0x4c')]));_0xdcd08c['attributes']=_0xdcd08c['attributes'][_0xdda2('0x4d')]?_0xdcd08c['attributes']:_0x4739c4[_0xdda2('0x4a')];if(!_0x4910a6[_0xdda2('0x47')][_0xdda2('0x6b')](_0xdda2('0x4e'))){_0xdcd08c[_0xdda2('0x31')]=qs[_0xdda2('0x31')](_0x4910a6[_0xdda2('0x47')][_0xdda2('0x31')]);_0xdcd08c[_0xdda2('0x32')]=qs['offset'](_0x4910a6[_0xdda2('0x47')][_0xdda2('0x32')]);}_0xdcd08c[_0xdda2('0x4f')]=qs[_0xdda2('0x50')](_0x4910a6['query'][_0xdda2('0x50')]);_0xdcd08c[_0xdda2('0x52')]=qs[_0xdda2('0x49')](_[_0xdda2('0x6c')](_0x4910a6['query'],_0x4739c4['filters']));_0xdcd08c[_0xdda2('0x52')][_0xdda2('0x69')]=_0x533880['id'];if(_0x4910a6[_0xdda2('0x47')][_0xdda2('0x51')]){_0xdcd08c['where']=_[_0xdda2('0x53')](_0xdcd08c[_0xdda2('0x52')],{'$or':_[_0xdda2('0x46')](_0xdcd08c[_0xdda2('0x4b')],function(_0x2dda16){var _0x1f77bd={};_0x1f77bd[_0x2dda16]={'$like':'%'+_0x4910a6[_0xdda2('0x47')][_0xdda2('0x51')]+'%'};return _0x1f77bd;})});}_0xdcd08c=_[_0xdda2('0x53')]({},_0xdcd08c,_0x4910a6[_0xdda2('0x54')]);return db[_0xdda2('0x6d')][_0xdda2('0x33')]({'where':_0xdcd08c[_0xdda2('0x52')]})[_0xdda2('0x22')](function(_0x2411e8){_0x694386['count']=_0x2411e8;if(_0x4910a6[_0xdda2('0x47')][_0xdda2('0x56')]){_0xdcd08c['include']=[{'all':!![]}];}return db['Disposition'][_0xdda2('0x58')](_0xdcd08c);})[_0xdda2('0x22')](function(_0x1ba7dd){_0x694386[_0xdda2('0x59')]=_0x1ba7dd;return _0x694386;});}})[_0xdda2('0x22')](respondWithFilteredResult(_0x263f6d,_0xdcd08c))[_0xdda2('0x2c')](handleError(_0x263f6d,null));};exports['removeDispositions']=function(_0x51ec8,_0x1f3abe,_0x447bd2){return db[_0xdda2('0x55')]['find']({'where':{'id':_0x51ec8[_0xdda2('0x66')]['id']}})['then'](handleEntityNotFound(_0x1f3abe,null))[_0xdda2('0x22')](function(_0x6b6dad){if(_0x6b6dad){return _0x6b6dad['removeDispositions'](_0x51ec8[_0xdda2('0x47')][_0xdda2('0x6e')]);}})[_0xdda2('0x22')](respondWithStatusCode(_0x1f3abe,null))[_0xdda2('0x2c')](handleError(_0x1f3abe,null));};exports[_0xdda2('0x6f')]=function(_0x313138,_0x1c6ef1,_0x460c2e){if(_0x313138[_0xdda2('0x5c')]['id']){delete _0x313138[_0xdda2('0x5c')]['id'];}return db[_0xdda2('0x55')]['find']({'where':{'id':_0x313138[_0xdda2('0x66')]['id']}})[_0xdda2('0x22')](handleEntityNotFound(_0x1c6ef1,null))[_0xdda2('0x22')](function(_0x3baaf8){if(_0x3baaf8){_0x313138[_0xdda2('0x5c')]['FaxAccountId']=_0x3baaf8['id'];return db[_0xdda2('0x70')][_0xdda2('0x64')](_0x313138['body']);}})[_0xdda2('0x22')](respondWithResult(_0x1c6ef1,null))[_0xdda2('0x2c')](handleError(_0x1c6ef1,null));};exports['getAnswers']=function(_0x5b24bc,_0x380aaa,_0x304609){var _0x179b1a={'raw':![],'where':{}};var _0x22b832={};var _0x14d8fa={'count':0x0,'rows':[]};return db[_0xdda2('0x55')]['findOne']({'where':{'id':_0x5b24bc[_0xdda2('0x66')]['id']}})[_0xdda2('0x22')](handleEntityNotFound(_0x380aaa,null))['then'](function(_0x4bd37d){if(_0x4bd37d){_0x22b832[_0xdda2('0x4a')]=_['keys'](db[_0xdda2('0x70')][_0xdda2('0x43')]);_0x22b832[_0xdda2('0x47')]=_['keys'](_0x5b24bc[_0xdda2('0x47')]);_0x22b832['filters']=_[_0xdda2('0x5b')](_0x22b832[_0xdda2('0x4a')],_0x22b832[_0xdda2('0x47')]);_0x179b1a[_0xdda2('0x4b')]=_['intersection'](_0x22b832['model'],qs[_0xdda2('0x4c')](_0x5b24bc[_0xdda2('0x47')]['fields']));_0x179b1a[_0xdda2('0x4b')]=_0x179b1a[_0xdda2('0x4b')][_0xdda2('0x4d')]?_0x179b1a[_0xdda2('0x4b')]:_0x22b832[_0xdda2('0x4a')];if(!_0x5b24bc[_0xdda2('0x47')][_0xdda2('0x6b')](_0xdda2('0x4e'))){_0x179b1a[_0xdda2('0x31')]=qs[_0xdda2('0x31')](_0x5b24bc[_0xdda2('0x47')][_0xdda2('0x31')]);_0x179b1a['offset']=qs['offset'](_0x5b24bc['query'][_0xdda2('0x32')]);}_0x179b1a['order']=qs[_0xdda2('0x50')](_0x5b24bc[_0xdda2('0x47')][_0xdda2('0x50')]);_0x179b1a[_0xdda2('0x52')]=qs['filters'](_[_0xdda2('0x6c')](_0x5b24bc[_0xdda2('0x47')],_0x22b832[_0xdda2('0x49')]));_0x179b1a['where'][_0xdda2('0x69')]=_0x4bd37d['id'];if(_0x5b24bc[_0xdda2('0x47')][_0xdda2('0x51')]){_0x179b1a['where']=_['merge'](_0x179b1a[_0xdda2('0x52')],{'$or':_[_0xdda2('0x46')](_0x179b1a[_0xdda2('0x4b')],function(_0x5e3718){var _0x29a037={};_0x29a037[_0x5e3718]={'$like':'%'+_0x5b24bc[_0xdda2('0x47')][_0xdda2('0x51')]+'%'};return _0x29a037;})});}_0x179b1a=_[_0xdda2('0x53')]({},_0x179b1a,_0x5b24bc[_0xdda2('0x54')]);return db[_0xdda2('0x70')][_0xdda2('0x33')]({'where':_0x179b1a['where']})[_0xdda2('0x22')](function(_0x385249){_0x14d8fa[_0xdda2('0x33')]=_0x385249;if(_0x5b24bc[_0xdda2('0x47')]['includeAll']){_0x179b1a[_0xdda2('0x57')]=[{'all':!![]}];}return db[_0xdda2('0x70')][_0xdda2('0x58')](_0x179b1a);})[_0xdda2('0x22')](function(_0x52d32c){_0x14d8fa['rows']=_0x52d32c;return _0x14d8fa;});}})['then'](respondWithFilteredResult(_0x380aaa,_0x179b1a))[_0xdda2('0x2c')](handleError(_0x380aaa,null));};exports[_0xdda2('0x71')]=function(_0x695a70,_0x429f24,_0x1cc1f4){return db[_0xdda2('0x55')]['find']({'where':{'id':_0x695a70[_0xdda2('0x66')]['id']}})[_0xdda2('0x22')](handleEntityNotFound(_0x429f24,null))[_0xdda2('0x22')](function(_0x288888){if(_0x288888){return _0x288888[_0xdda2('0x71')](_0x695a70[_0xdda2('0x47')][_0xdda2('0x6e')]);}})[_0xdda2('0x22')](respondWithStatusCode(_0x429f24,null))['catch'](handleError(_0x429f24,null));};exports[_0xdda2('0x72')]=function(_0x517b60,_0x161043,_0x58c926){return db[_0xdda2('0x73')]['find']({'where':{'id':_0x517b60[_0xdda2('0x66')]['id']}})[_0xdda2('0x22')](handleEntityNotFound(_0x161043,null))[_0xdda2('0x22')](function(_0x22deff){if(_0x22deff){return _0x22deff[_0xdda2('0x72')](_0x517b60[_0xdda2('0x5c')][_0xdda2('0x6e')],_[_0xdda2('0x74')](_0x517b60[_0xdda2('0x5c')],['ids','id'])||{});}})[_0xdda2('0x22')](respondWithResult(_0x161043,null))[_0xdda2('0x2c')](handleError(_0x161043,null));};exports['getInteractions']=function(_0x42db44,_0x1d71ef,_0x2f3807){var _0x5600da={'raw':![],'where':{}};var _0x1702ae={};var _0x21ade3={'count':0x0,'rows':[]};return db[_0xdda2('0x55')][_0xdda2('0x75')]({'where':{'id':_0x42db44[_0xdda2('0x66')]['id']}})[_0xdda2('0x22')](handleEntityNotFound(_0x1d71ef,null))[_0xdda2('0x22')](function(_0x42290e){if(_0x42290e){_0x1702ae[_0xdda2('0x4a')]=_[_0xdda2('0x48')](db['FaxInteraction'][_0xdda2('0x43')]);_0x1702ae[_0xdda2('0x47')]=_[_0xdda2('0x48')](_0x42db44[_0xdda2('0x47')]);_0x1702ae[_0xdda2('0x49')]=_['intersection'](_0x1702ae[_0xdda2('0x4a')],_0x1702ae[_0xdda2('0x47')]);_0x5600da[_0xdda2('0x4b')]=_['intersection'](_0x1702ae[_0xdda2('0x4a')],qs[_0xdda2('0x4c')](_0x42db44[_0xdda2('0x47')]['fields']));_0x5600da[_0xdda2('0x4b')]=_0x5600da['attributes']['length']?_0x5600da[_0xdda2('0x4b')]:_0x1702ae[_0xdda2('0x4a')];if(!_0x42db44[_0xdda2('0x47')][_0xdda2('0x6b')](_0xdda2('0x4e'))){_0x5600da[_0xdda2('0x31')]=qs[_0xdda2('0x31')](_0x42db44['query']['limit']);_0x5600da[_0xdda2('0x32')]=qs[_0xdda2('0x32')](_0x42db44[_0xdda2('0x47')][_0xdda2('0x32')]);}_0x5600da[_0xdda2('0x4f')]=qs['sort'](_0x42db44[_0xdda2('0x47')][_0xdda2('0x50')]);_0x5600da[_0xdda2('0x52')]=qs[_0xdda2('0x49')](_[_0xdda2('0x6c')](_0x42db44[_0xdda2('0x47')],_0x1702ae[_0xdda2('0x49')]));_0x5600da[_0xdda2('0x52')][_0xdda2('0x69')]=_0x42290e['id'];if(_0x42db44[_0xdda2('0x47')][_0xdda2('0x51')]){_0x5600da[_0xdda2('0x52')]=_[_0xdda2('0x53')](_0x5600da[_0xdda2('0x52')],{'$or':_[_0xdda2('0x46')](_0x5600da[_0xdda2('0x4b')],function(_0x47b7a5){var _0x1512aa={};_0x1512aa[_0x47b7a5]={'$like':'%'+_0x42db44['query'][_0xdda2('0x51')]+'%'};return _0x1512aa;})});}_0x5600da=_[_0xdda2('0x53')]({},_0x5600da,_0x42db44[_0xdda2('0x54')]);return db['FaxInteraction'][_0xdda2('0x33')]({'where':_0x5600da[_0xdda2('0x52')]})[_0xdda2('0x22')](function(_0x48b4eb){_0x21ade3[_0xdda2('0x33')]=_0x48b4eb;if(_0x42db44[_0xdda2('0x47')][_0xdda2('0x56')]){_0x5600da['include']=[{'model':db['CmContact'],'as':_0xdda2('0x76'),'required':![]},{'model':db['User'],'as':_0xdda2('0x77'),'attributes':[_0xdda2('0x3e'),_0xdda2('0x78'),_0xdda2('0x79')],'required':![]},{'model':db['Tag'],'as':_0xdda2('0x7a'),'attributes':['id','name','color'],'where':_0x42db44['query']['tag']?{'id':_0x42db44[_0xdda2('0x47')]['tag']}:undefined,'required':_0x42db44[_0xdda2('0x47')][_0xdda2('0x7b')]?!![]:![]}];}return db['FaxInteraction']['findAll'](_0x5600da);})[_0xdda2('0x22')](function(_0x255853){_0x21ade3[_0xdda2('0x59')]=_0x255853;return _0x21ade3;});}})[_0xdda2('0x22')](respondWithFilteredResult(_0x1d71ef,_0x5600da))['catch'](handleError(_0x1d71ef,null));};exports['addApplications']=function(_0x39206e,_0x19c1eb,_0xaa5d94){return db[_0xdda2('0x55')]['findOne']({'where':{'id':_0x39206e[_0xdda2('0x66')]['id']}})[_0xdda2('0x22')](handleEntityNotFound(_0x19c1eb,null))[_0xdda2('0x22')](function(_0x211015){if(_0x211015){return db[_0xdda2('0x7c')][_0xdda2('0x7d')](function(_0xa798dc){return db[_0xdda2('0x7e')][_0xdda2('0x38')]({'where':{'FaxAccountId':_0x39206e[_0xdda2('0x66')]['id']},'transaction':_0xa798dc})[_0xdda2('0x22')](function(_0x26144b){var _0x22f11c=_[_0xdda2('0x46')](_0x39206e[_0xdda2('0x5c')],function(_0x3c64bc){_0x3c64bc['FaxAccountId']=_0x39206e[_0xdda2('0x66')]['id'];return _0x3c64bc;});return db[_0xdda2('0x7e')][_0xdda2('0x7f')](_0x22f11c,{'transaction':_0xa798dc});});})[_0xdda2('0x22')](function(){return db[_0xdda2('0x7e')][_0xdda2('0x80')]({'where':{'FaxAccountId':_0x39206e[_0xdda2('0x66')]['id']},'order':_0xdda2('0x81')});});}})[_0xdda2('0x22')](respondWithResult(_0x19c1eb,null))[_0xdda2('0x2c')](handleError(_0x19c1eb,null));};exports[_0xdda2('0x82')]=function(_0x263f1d,_0x2db8df,_0x1ec02){var _0x19eea4={};var _0x5308f1={};var _0x17c084;var _0xf8632f;return db[_0xdda2('0x55')][_0xdda2('0x75')]({'where':{'id':_0x263f1d[_0xdda2('0x66')]['id']}})[_0xdda2('0x22')](handleEntityNotFound(_0x2db8df,null))[_0xdda2('0x22')](function(_0x3945e5){if(_0x3945e5){_0x17c084=_0x3945e5;_0x5308f1[_0xdda2('0x4a')]=_[_0xdda2('0x48')](db['FaxApplication'][_0xdda2('0x43')]);_0x5308f1['query']=_['keys'](_0x263f1d[_0xdda2('0x47')]);_0x5308f1[_0xdda2('0x49')]=_[_0xdda2('0x5b')](_0x5308f1[_0xdda2('0x4a')],_0x5308f1[_0xdda2('0x47')]);_0x19eea4['attributes']=_[_0xdda2('0x5b')](_0x5308f1[_0xdda2('0x4a')],qs[_0xdda2('0x4c')](_0x263f1d[_0xdda2('0x47')][_0xdda2('0x4c')]));_0x19eea4[_0xdda2('0x4b')]=_0x19eea4[_0xdda2('0x4b')][_0xdda2('0x4d')]?_0x19eea4['attributes']:_0x5308f1['model'];_0x19eea4[_0xdda2('0x4f')]=qs[_0xdda2('0x50')](_0x263f1d[_0xdda2('0x47')]['sort']);_0x19eea4['where']=qs['filters'](_[_0xdda2('0x6c')](_0x263f1d[_0xdda2('0x47')],_0x5308f1[_0xdda2('0x49')]));if(_0x263f1d[_0xdda2('0x47')]['filter']){_0x19eea4[_0xdda2('0x52')]=_['merge'](_0x19eea4[_0xdda2('0x52')],{'$or':_['map'](_0x19eea4[_0xdda2('0x4b')],function(_0x223c52){var _0x18544c={};_0x18544c[_0x223c52]={'$like':'%'+_0x263f1d['query'][_0xdda2('0x51')]+'%'};return _0x18544c;})});}_0x19eea4=_[_0xdda2('0x53')]({},_0x19eea4,_0x263f1d[_0xdda2('0x54')]);return _0x17c084['getApplications'](_0x19eea4);}})[_0xdda2('0x22')](function(_0x31921e){if(_0x31921e){_0xf8632f=_0x31921e['length'];if(!_0x263f1d[_0xdda2('0x47')][_0xdda2('0x6b')]('nolimit')){_0x19eea4['limit']=qs['limit'](_0x263f1d[_0xdda2('0x47')]['limit']);_0x19eea4['offset']=qs[_0xdda2('0x32')](_0x263f1d[_0xdda2('0x47')][_0xdda2('0x32')]);}return _0x17c084[_0xdda2('0x82')](_0x19eea4);}})[_0xdda2('0x22')](function(_0x3df57b){if(_0x3df57b){return _0x3df57b?{'count':_0xf8632f,'rows':_0x3df57b}:null;}})['then'](respondWithResult(_0x2db8df,null))['catch'](handleError(_0x2db8df,null));};function Extension(_0x40704e,_0x5e983b,_0xe1f534,_0x237683){this[_0xdda2('0x83')]=_0xdda2('0x84');this[_0xdda2('0x85')]=_0x40704e[_0xdda2('0x86')];this['app']=_0x237683;this[_0xdda2('0x87')]='system';this[_0xdda2('0x88')]=_0xdda2('0x89');this[_0xdda2('0x69')]=_0x40704e['id'];this[_0xdda2('0x81')]=_0x5e983b;this[_0xdda2('0x8a')]=_0xe1f534;}function createExtensionsReciveFax(_0x343795){var _0x47331c=0x1;var _0xe3742a=[];_0xe3742a[_0xdda2('0x8b')](new Extension(_0x343795,_0x47331c,'',_0xdda2('0x8c')));_0x47331c+=0x1;_0xe3742a[_0xdda2('0x8b')](new Extension(_0x343795,_0x47331c,_0xdda2('0x8d'),_0xdda2('0x8e')));_0x47331c+=0x1;for(var _0x23add5 in _0x343795){if(_0x343795[_0xdda2('0x6b')](_0x23add5)&&(_0x23add5===_0xdda2('0x8f')||_0x23add5==='localstationid'||_0x23add5===_0xdda2('0x90')||_0x23add5===_0xdda2('0x91')||_0x23add5===_0xdda2('0x92')||_0x23add5===_0xdda2('0x93')||_0x23add5===_0xdda2('0x94')||_0x23add5===_0xdda2('0x95')||_0x23add5===_0xdda2('0x96'))){_0xe3742a[_0xdda2('0x8b')](new Extension(_0x343795,_0x47331c,_0xdda2('0x97')+_0x23add5+')='+_0x343795[_0x23add5],_0xdda2('0x8e')));_0x47331c+=0x1;}}_0xe3742a['push'](new Extension(_0x343795,_0x47331c,'6','Wait'));_0x47331c+=0x1;_0xe3742a['push'](new Extension(_0x343795,_0x47331c,_0xdda2('0x98'),_0xdda2('0x99')));_0x47331c=0x0;return _0xe3742a;}exports['addAccountApplications']=function(_0x30c7a3,_0x241373,_0xf592ca){var _0x1fa2a4;return db[_0xdda2('0x7c')][_0xdda2('0x7d')](function(_0x4aecf6){return db[_0xdda2('0x55')]['create'](_0x30c7a3[_0xdda2('0x5c')],{'transaction':_0x4aecf6})[_0xdda2('0x22')](function(_0x12f808){_0x1fa2a4=_0x12f808['get']({'plain':!![]});return db[_0xdda2('0x9a')][_0xdda2('0x7f')](createExtensionsReciveFax(_0x1fa2a4),{'transaction':_0x4aecf6});});})[_0xdda2('0x22')](function(){return _0x1fa2a4;})[_0xdda2('0x22')](respondWithResult(_0x241373,null))['catch'](handleError(_0x241373,null));};exports[_0xdda2('0x9b')]=function(_0x2abf19,_0x3c525a,_0x14c53a){var _0x142d18;return db['sequelize'][_0xdda2('0x7d')](function(_0x4908ef){return db[_0xdda2('0x55')][_0xdda2('0x37')](_0x2abf19[_0xdda2('0x5c')],{'where':{'id':_0x2abf19['body']['id']},'transaction':_0x4908ef})[_0xdda2('0x22')](function(_0x3e8409){return db[_0xdda2('0x9a')][_0xdda2('0x38')]({'where':{'FaxAccountId':_0x2abf19[_0xdda2('0x5c')]['id']},'transaction':_0x4908ef})[_0xdda2('0x22')](function(_0x32c498){return db[_0xdda2('0x9a')][_0xdda2('0x7f')](createExtensionsReciveFax(_[_0xdda2('0x74')](_0x2abf19[_0xdda2('0x5c')],[_0xdda2('0x9c'),_0xdda2('0x45'),_0xdda2('0x9d'),_0xdda2('0x9e'),'TrunkId',_0xdda2('0x9f')])),{'transaction':_0x4908ef});});});})['then'](function(){return db[_0xdda2('0x55')][_0xdda2('0xa0')](_0x2abf19['body']['id']);})[_0xdda2('0x22')](respondWithResult(_0x3c525a,null))[_0xdda2('0x2c')](handleError(_0x3c525a,null));};exports[_0xdda2('0xa1')]=function(_0x58a79e,_0x5c7a5e,_0x5c88b4){var _0x21f617={'raw':!![],'where':{}};var _0x1d1371={};var _0xdb5e19={'count':0x0,'rows':[]};return db['FaxAccount'][_0xdda2('0x75')]({'where':{'id':_0x58a79e[_0xdda2('0x66')]['id']}})['then'](handleEntityNotFound(_0x5c7a5e,null))[_0xdda2('0x22')](function(_0x208614){if(_0x208614){_0x1d1371[_0xdda2('0x4a')]=_['keys'](db[_0xdda2('0xa2')][_0xdda2('0x43')]);_0x1d1371[_0xdda2('0x47')]=_[_0xdda2('0x48')](_0x58a79e[_0xdda2('0x47')]);_0x1d1371['filters']=_[_0xdda2('0x5b')](_0x1d1371['model'],_0x1d1371[_0xdda2('0x47')]);_0x21f617[_0xdda2('0x4b')]=_[_0xdda2('0x5b')](_0x1d1371['model'],qs['fields'](_0x58a79e[_0xdda2('0x47')][_0xdda2('0x4c')]));_0x21f617[_0xdda2('0x4b')]=_0x21f617[_0xdda2('0x4b')][_0xdda2('0x4d')]?_0x21f617[_0xdda2('0x4b')]:_0x1d1371[_0xdda2('0x4a')];if(!_0x58a79e['query'][_0xdda2('0x6b')](_0xdda2('0x4e'))){_0x21f617['limit']=qs[_0xdda2('0x31')](_0x58a79e[_0xdda2('0x47')][_0xdda2('0x31')]);_0x21f617[_0xdda2('0x32')]=qs[_0xdda2('0x32')](_0x58a79e['query'][_0xdda2('0x32')]);}_0x21f617[_0xdda2('0x4f')]=qs[_0xdda2('0x50')](_0x58a79e[_0xdda2('0x47')][_0xdda2('0x50')]);_0x21f617['where']=qs['filters'](_[_0xdda2('0x6c')](_0x58a79e[_0xdda2('0x47')],_0x1d1371[_0xdda2('0x49')]));_0x21f617[_0xdda2('0x52')]['FaxAccountId']=_0x208614['id'];if(_0x58a79e['query'][_0xdda2('0x51')]){_0x21f617[_0xdda2('0x52')]=_[_0xdda2('0x53')](_0x21f617[_0xdda2('0x52')],{'$or':_[_0xdda2('0x46')](_0x21f617[_0xdda2('0x4b')],function(_0x1d704f){var _0x50c10d={};_0x50c10d[_0x1d704f]={'$like':'%'+_0x58a79e['query'][_0xdda2('0x51')]+'%'};return _0x50c10d;})});}if(_0x58a79e[_0xdda2('0x47')]['$gte']){var _0x6347c0=_0x58a79e[_0xdda2('0x47')][_0xdda2('0xa3')][_0xdda2('0xa4')](',');var _0x482c95={};_0x482c95[_0x6347c0[0x0]]={'$gte':moment(_0x6347c0[0x1])[_0xdda2('0xa5')](_0xdda2('0xa6'))};_0x21f617[_0xdda2('0x52')]=_[_0xdda2('0x53')](_0x21f617['where'],_0x482c95);}_0x21f617=_[_0xdda2('0x53')]({},_0x21f617,_0x58a79e['options']);return db['FaxMessage']['count']({'where':_0x21f617[_0xdda2('0x52')]})[_0xdda2('0x22')](function(_0xd27448){_0xdb5e19[_0xdda2('0x33')]=_0xd27448;if(_0x58a79e[_0xdda2('0x47')]['includeAll']){_0x21f617[_0xdda2('0x57')]=[{'all':!![]}];}return db[_0xdda2('0xa2')]['findAll'](_0x21f617);})[_0xdda2('0x22')](function(_0x3eecea){_0xdb5e19[_0xdda2('0x59')]=_0x3eecea;return _0xdb5e19;});}})[_0xdda2('0x22')](respondWithFilteredResult(_0x5c7a5e,_0x21f617))[_0xdda2('0x2c')](handleError(_0x5c7a5e,null));};exports[_0xdda2('0x3f')]=function(_0x62b26e,_0x642b33,_0x4b7ad8){var _0x4e279b,_0x2678be={},_0x3cd8a6;if(_0x62b26e[_0xdda2('0x5c')]['to']){_0x3cd8a6=_0x62b26e[_0xdda2('0x5c')]['to'][0x0];}return db[_0xdda2('0x55')][_0xdda2('0x61')]({'where':{'id':_0x62b26e[_0xdda2('0x66')]['id']},'include':[{'model':db[_0xdda2('0xa7')],'as':_0xdda2('0xa8'),'include':[{'model':db[_0xdda2('0xa9')],'as':_0xdda2('0xaa'),'where':{'fax':_0x3cd8a6},'limit':0x1,'order':[['updatedAt',_0xdda2('0xab')]]}]}]})[_0xdda2('0x22')](handleEntityNotFound(_0x642b33,null))[_0xdda2('0x22')](function(_0x6280b0){_0x4e279b=_0x6280b0;if(_0x62b26e[_0xdda2('0x5c')][_0xdda2('0xac')]&&_0x62b26e[_0xdda2('0x5c')]['attachments'][_0xdda2('0x4d')]){for(var _0x15135d=0x0;_0x15135d<_0x62b26e[_0xdda2('0x5c')][_0xdda2('0xac')][_0xdda2('0x4d')];_0x15135d+=0x1){_0x62b26e['body'][_0xdda2('0xac')][_0x15135d]={'filename':_0x62b26e[_0xdda2('0x5c')][_0xdda2('0xac')][_0x15135d][_0xdda2('0x3e')],'id':_0x62b26e[_0xdda2('0x5c')]['attachments'][_0x15135d]['id'],'path':path[_0xdda2('0xad')](config['root'],'server/files/attachments',_0x62b26e[_0xdda2('0x5c')]['attachments'][_0x15135d][_0xdda2('0xae')])};}}return respondWithRpcPromise(_0xdda2('0xaf'),_0xdda2('0xaf'),{'FaxAccountId':_[_0xdda2('0xb0')](_0x62b26e[_0xdda2('0x66')]['id'])?undefined:_0x62b26e[_0xdda2('0x66')]['id'],'path':_[_0xdda2('0xb0')](_0x62b26e[_0xdda2('0x5c')][_0xdda2('0xac')][0x0][_0xdda2('0x5')])?undefined:_0x62b26e[_0xdda2('0x5c')][_0xdda2('0xac')][0x0][_0xdda2('0x5')],'fax':_[_0xdda2('0xb0')](_0x62b26e[_0xdda2('0x5c')]['to'][0x0])?undefined:_0x62b26e[_0xdda2('0x5c')]['to'][0x0]},client9002);})['then'](function(){if(_0x4e279b){if(_['isNil'](_0x62b26e[_0xdda2('0x5c')][_0xdda2('0xb1')])){_0x62b26e['body'][_0xdda2('0xb1')]=util[_0xdda2('0xa5')](_0xdda2('0xb2'),_0x4e279b['name'],_0x4e279b['fax']);}if(_0x4e279b[_0xdda2('0xa8')]){if(_0x4e279b[_0xdda2('0xa8')]['Contacts'][_0xdda2('0x4d')]){return _0x4e279b[_0xdda2('0xa8')][_0xdda2('0xaa')][0x0];}else{return db[_0xdda2('0xa9')][_0xdda2('0x64')](_[_0xdda2('0x19')](_0x62b26e[_0xdda2('0x5c')],{'firstName':_0x62b26e[_0xdda2('0x5c')]['to'][0x0],'phone':_0x62b26e[_0xdda2('0x5c')]['to'][0x0],'fax':_0x62b26e[_0xdda2('0x5c')]['to'][0x0],'ListId':_0x4e279b[_0xdda2('0x9f')]}));}}else{throw new Error(_0xdda2('0xb3'));}}else{throw new Error('Send\x20Fax\x20failed');}})[_0xdda2('0x22')](function(_0x5bee6c){if(_0x5bee6c){return db['FaxInteraction'][_0xdda2('0x61')]({'where':{'ContactId':_0x5bee6c['id'],'closed':![],'FaxAccountId':_0x4e279b['id']}})[_0xdda2('0x22')](function(_0x1cc3d6){if(_0x1cc3d6){return[_0x1cc3d6,![]];}return db[_0xdda2('0x73')]['create']({'UserId':_0x62b26e[_0xdda2('0x5d')]['id'],'ContactId':_0x5bee6c['id'],'FaxAccountId':_0x4e279b['id'],'fax':_0x62b26e[_0xdda2('0x5c')]['to'][0x0],'firstMsgDirection':_0xdda2('0xb4'),'Messages':[_[_0xdda2('0x53')](_0x62b26e['body'],{'read':![],'body':_0x62b26e['body'][_0xdda2('0xac')][0x0][_0xdda2('0xb5')],'FaxAccountId':_0x4e279b['id'],'UserId':_0x62b26e[_0xdda2('0x5d')]['id'],'ContactId':_0x5bee6c['id'],'AttachmentId':_0x62b26e[_0xdda2('0x5c')][_0xdda2('0xac')][0x0]['id']})]},{'include':[{'model':db[_0xdda2('0xa2')],'as':_0xdda2('0xb6')}]})[_0xdda2('0x22')](function(_0x310927){return[_0x310927,!![]];});});}else{throw new Error(_0xdda2('0xb7'));}})[_0xdda2('0xb8')](function(_0x505d10,_0x13e955){if(_0x13e955){return _0x505d10;}return db['FaxMessage'][_0xdda2('0x64')]({'direction':'out','read':![],'body':_0x62b26e[_0xdda2('0x5c')][_0xdda2('0xac')][0x0][_0xdda2('0xb5')],'FaxAccountId':_0x4e279b['id'],'FaxInteractionId':_0x505d10['id'],'UserId':_0x62b26e[_0xdda2('0x5d')]['id'],'ContactId':_0x505d10['ContactId'],'AttachmentId':_0x62b26e['body'][_0xdda2('0xac')][0x0]['id']})[_0xdda2('0x22')](function(_0x2f738a){_0x505d10[_0xdda2('0xb9')]['Messages']=[];_0x505d10[_0xdda2('0xb9')][_0xdda2('0xb6')][_0xdda2('0x8b')](_0x2f738a[_0xdda2('0xb9')]);return _0x505d10;});})[_0xdda2('0x22')](function(_0xf33f8){respondWithRpcPromise(_0xdda2('0xba'),_0xdda2('0xba'),{'FaxAccountId':_[_0xdda2('0xb0')](_0x62b26e[_0xdda2('0x66')]['id'])?undefined:_0x62b26e[_0xdda2('0x66')]['id'],'path':_[_0xdda2('0xb0')](_0x62b26e[_0xdda2('0x5c')][_0xdda2('0xac')][0x0]['path'])?undefined:_0x62b26e[_0xdda2('0x5c')][_0xdda2('0xac')][0x0]['path'],'fax':_[_0xdda2('0xb0')](_0x62b26e[_0xdda2('0x5c')]['to'][0x0])?undefined:_0x62b26e[_0xdda2('0x5c')]['to'][0x0],'AttachmentId':_0x62b26e[_0xdda2('0x5c')][_0xdda2('0xac')][0x0]['id']},client9002)[_0xdda2('0x22')](function(_0x4fac60){logger[_0xdda2('0x23')](_0xdda2('0xbb'),_0x4fac60);})[_0xdda2('0x2c')](function(_0x4fe8dc){logger[_0xdda2('0x23')](_0xdda2('0xbb'),_0x4fe8dc);});return _0xf33f8;})[_0xdda2('0x22')](respondWithResult(_0x642b33,null))[_0xdda2('0x2c')](handleError(_0x642b33,null));};exports['addAgents']=function(_0x4851d2,_0x56bff0,_0x38bcc0){return db[_0xdda2('0x55')][_0xdda2('0x61')]({'where':{'id':_0x4851d2[_0xdda2('0x66')]['id']}})['then'](handleEntityNotFound(_0x56bff0,null))[_0xdda2('0x22')](function(_0x13079c){if(_0x13079c){return _0x13079c['addAgents'](_0x4851d2[_0xdda2('0x5c')][_0xdda2('0x6e')],_['omit'](_0x4851d2[_0xdda2('0x5c')],['ids','id'])||{})[_0xdda2('0xb8')](function(_0x20365e){for(var _0x564510=0x0;_0x564510<_0x4851d2[_0xdda2('0x5c')][_0xdda2('0x6e')]['length'];_0x564510+=0x1){socket[_0xdda2('0xbc')](_0xdda2('0xbd'),{'UserId':_0x4851d2['body'][_0xdda2('0x6e')][_0x564510],'FaxAccountId':_0x4851d2['params']['id']});}return _0x20365e;});}})[_0xdda2('0x22')](respondWithResult(_0x56bff0,null))[_0xdda2('0x2c')](handleError(_0x56bff0,null));};exports[_0xdda2('0xbe')]=function(_0x3ab92d,_0xbb7633,_0x83d76){return db[_0xdda2('0x55')][_0xdda2('0x61')]({'where':{'id':_0x3ab92d['params']['id']}})['then'](handleEntityNotFound(_0xbb7633,null))[_0xdda2('0x22')](function(_0x4e2a8d){if(_0x4e2a8d){return _0x4e2a8d[_0xdda2('0xbe')](_0x3ab92d['query']['ids'])[_0xdda2('0x22')](function(){if(_[_0xdda2('0xbf')](_0x3ab92d[_0xdda2('0x47')][_0xdda2('0x6e')])){for(var _0x2e64b6=0x0;_0x2e64b6<_0x3ab92d[_0xdda2('0x47')][_0xdda2('0x6e')][_0xdda2('0x4d')];_0x2e64b6+=0x1){socket['emit']('userFaxAccount:remove',{'UserId':Number(_0x3ab92d[_0xdda2('0x47')][_0xdda2('0x6e')][_0x2e64b6]),'FaxAccountId':Number(_0x3ab92d[_0xdda2('0x66')]['id'])});}}else{socket[_0xdda2('0xbc')](_0xdda2('0xc0'),{'UserId':Number(_0x3ab92d[_0xdda2('0x47')][_0xdda2('0x6e')]),'FaxAccountId':Number(_0x3ab92d[_0xdda2('0x66')]['id'])});}});}})[_0xdda2('0x22')](respondWithStatusCode(_0xbb7633,null))[_0xdda2('0x2c')](handleError(_0xbb7633,null));};exports[_0xdda2('0xc1')]=function(_0x22fabe,_0x68fa9d,_0x4c9502){var _0xaabf31={};var _0x14a6b3={};var _0x111357;var _0xf0ce53;return db[_0xdda2('0x55')][_0xdda2('0x75')]({'where':{'id':_0x22fabe[_0xdda2('0x66')]['id']}})['then'](handleEntityNotFound(_0x68fa9d,null))[_0xdda2('0x22')](function(_0x844db3){if(_0x844db3){_0x111357=_0x844db3;_0x14a6b3[_0xdda2('0x4a')]=_[_0xdda2('0x48')](db[_0xdda2('0xc2')][_0xdda2('0x43')]);_0x14a6b3[_0xdda2('0x47')]=_[_0xdda2('0x48')](_0x22fabe['query']);_0x14a6b3[_0xdda2('0x49')]=_['intersection'](_0x14a6b3['model'],_0x14a6b3[_0xdda2('0x47')]);_0xaabf31[_0xdda2('0x4b')]=_[_0xdda2('0x5b')](_0x14a6b3[_0xdda2('0x4a')],qs[_0xdda2('0x4c')](_0x22fabe[_0xdda2('0x47')][_0xdda2('0x4c')]));_0xaabf31[_0xdda2('0x4b')]=_0xaabf31['attributes'][_0xdda2('0x4d')]?_0xaabf31['attributes']:_0x14a6b3['model'];_0xaabf31[_0xdda2('0x4f')]=qs[_0xdda2('0x50')](_0x22fabe[_0xdda2('0x47')][_0xdda2('0x50')]);_0xaabf31[_0xdda2('0x52')]=qs['filters'](_[_0xdda2('0x6c')](_0x22fabe[_0xdda2('0x47')],_0x14a6b3['filters']));if(_0x22fabe[_0xdda2('0x47')][_0xdda2('0x51')]){_0xaabf31[_0xdda2('0x52')]=_[_0xdda2('0x53')](_0xaabf31[_0xdda2('0x52')],{'$or':_[_0xdda2('0x46')](_0xaabf31['attributes'],function(_0x26c073){var _0x5496df={};_0x5496df[_0x26c073]={'$like':'%'+_0x22fabe[_0xdda2('0x47')][_0xdda2('0x51')]+'%'};return _0x5496df;})});}_0xaabf31=_['merge']({},_0xaabf31,_0x22fabe[_0xdda2('0x54')]);return _0x111357[_0xdda2('0xc1')](_0xaabf31);}})['then'](function(_0x51e400){if(_0x51e400){_0xf0ce53=_0x51e400[_0xdda2('0x4d')];if(!_0x22fabe['query']['hasOwnProperty']('nolimit')){_0xaabf31[_0xdda2('0x31')]=qs[_0xdda2('0x31')](_0x22fabe[_0xdda2('0x47')][_0xdda2('0x31')]);_0xaabf31[_0xdda2('0x32')]=qs['offset'](_0x22fabe[_0xdda2('0x47')][_0xdda2('0x32')]);}return _0x111357[_0xdda2('0xc1')](_0xaabf31);}})[_0xdda2('0x22')](function(_0x2e0841){if(_0x2e0841){return _0x2e0841?{'count':_0xf0ce53,'rows':_0x2e0841}:null;}})[_0xdda2('0x22')](respondWithResult(_0x68fa9d,null))[_0xdda2('0x2c')](handleError(_0x68fa9d,null));}; \ No newline at end of file diff --git a/server/api/faxAccount/faxAccount.events.js b/server/api/faxAccount/faxAccount.events.js index d70b065..28990b3 100644 --- a/server/api/faxAccount/faxAccount.events.js +++ b/server/api/faxAccount/faxAccount.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5767=['exports','events','../../mysqldb','FaxAccount','save','update','remove','emit','hook'];(function(_0x128aee,_0x525174){var _0x1bda31=function(_0xb48c0e){while(--_0xb48c0e){_0x128aee['push'](_0x128aee['shift']());}};_0x1bda31(++_0x525174);}(_0x5767,0xac));var _0x7576=function(_0x8f811b,_0x4bd6d1){_0x8f811b=_0x8f811b-0x0;var _0x5d276f=_0x5767[_0x8f811b];return _0x5d276f;};'use strict';var EventEmitter=require(_0x7576('0x0'));var FaxAccount=require(_0x7576('0x1'))['db'][_0x7576('0x2')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x7576('0x3'),'afterUpdate':_0x7576('0x4'),'afterDestroy':_0x7576('0x5')};function emitEvent(_0x32fde0){return function(_0x172ddb,_0x854ba4,_0x103b36){FaxAccountEvents['emit'](_0x32fde0+':'+_0x172ddb['id'],_0x172ddb);FaxAccountEvents[_0x7576('0x6')](_0x32fde0,_0x172ddb);_0x103b36(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];FaxAccount[_0x7576('0x7')](e,emitEvent(event));}}module[_0x7576('0x8')]=FaxAccountEvents; \ No newline at end of file +var _0x5a0f=['../../mysqldb','setMaxListeners','save','remove','emit','hook','events'];(function(_0x59d89e,_0x55edf5){var _0x554e93=function(_0x3d40bc){while(--_0x3d40bc){_0x59d89e['push'](_0x59d89e['shift']());}};_0x554e93(++_0x55edf5);}(_0x5a0f,0x1bf));var _0xf5a0=function(_0x1c4a76,_0x25b235){_0x1c4a76=_0x1c4a76-0x0;var _0x283482=_0x5a0f[_0x1c4a76];return _0x283482;};'use strict';var EventEmitter=require(_0xf5a0('0x0'));var FaxAccount=require(_0xf5a0('0x1'))['db']['FaxAccount'];var FaxAccountEvents=new EventEmitter();FaxAccountEvents[_0xf5a0('0x2')](0x0);var events={'afterCreate':_0xf5a0('0x3'),'afterUpdate':'update','afterDestroy':_0xf5a0('0x4')};function emitEvent(_0x37d202){return function(_0x213d5b,_0x1efbb7,_0x1a445f){FaxAccountEvents[_0xf5a0('0x5')](_0x37d202+':'+_0x213d5b['id'],_0x213d5b);FaxAccountEvents[_0xf5a0('0x5')](_0x37d202,_0x213d5b);_0x1a445f(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];FaxAccount[_0xf5a0('0x6')](e,emitEvent(event));}}module['exports']=FaxAccountEvents; \ No newline at end of file diff --git a/server/api/faxAccount/faxAccount.model.js b/server/api/faxAccount/faxAccount.model.js index 6efa5a4..ec95493 100644 --- a/server/api/faxAccount/faxAccount.model.js +++ b/server/api/faxAccount/faxAccount.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe5a9=['../../config/logger','api','moment','bluebird','request-promise','../../config/environment','exports','FaxAccount','fax_accounts','lodash','util'];(function(_0x375a04,_0x9f2aa6){var _0x2f7935=function(_0x4e860f){while(--_0x4e860f){_0x375a04['push'](_0x375a04['shift']());}};_0x2f7935(++_0x9f2aa6);}(_0xe5a9,0x195));var _0x9e5a=function(_0x2b1bb9,_0x3f85cc){_0x2b1bb9=_0x2b1bb9-0x0;var _0x59f401=_0xe5a9[_0x2b1bb9];return _0x59f401;};'use strict';var _=require(_0x9e5a('0x0'));var util=require(_0x9e5a('0x1'));var logger=require(_0x9e5a('0x2'))(_0x9e5a('0x3'));var moment=require(_0x9e5a('0x4'));var BPromise=require(_0x9e5a('0x5'));var rp=require(_0x9e5a('0x6'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x9e5a('0x7'));var attributes=require('./faxAccount.attributes');module[_0x9e5a('0x8')]=function(_0x5cfac9,_0x3f9e25){return _0x5cfac9['define'](_0x9e5a('0x9'),attributes,{'tableName':_0x9e5a('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x885a=['define','lodash','../../config/logger','api','moment','bluebird','rimraf','./faxAccount.attributes','exports'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0x885a,0x1c3));var _0xa885=function(_0x17d9e3,_0x1f969c){_0x17d9e3=_0x17d9e3-0x0;var _0x14192d=_0x885a[_0x17d9e3];return _0x14192d;};'use strict';var _=require(_0xa885('0x0'));var util=require('util');var logger=require(_0xa885('0x1'))(_0xa885('0x2'));var moment=require(_0xa885('0x3'));var BPromise=require(_0xa885('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xa885('0x5'));var config=require('../../config/environment');var attributes=require(_0xa885('0x6'));module[_0xa885('0x7')]=function(_0x42232a,_0x33782b){return _0x42232a[_0xa885('0x8')]('FaxAccount',attributes,{'tableName':'fax_accounts','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/faxAccount/faxAccount.rpc.js b/server/api/faxAccount/faxAccount.rpc.js index ef82532..cc18e62 100644 --- a/server/api/faxAccount/faxAccount.rpc.js +++ b/server/api/faxAccount/faxAccount.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5bab=['catch','FaxAccount','findAll','options','raw','where','limit','map','include','model','attributes','GetFaxAccount','NotifyFaxAccount','fax','describe','Sequelize','ValidationError','keys','createdAt','updatedAt','difference','CompanyId','isNil','from','from\x20is\x20mandatory','body','mapKey','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','find','account','CmList','List','CmContact','Contacts','DESC','FaxApplication','Applications','applications','list','orderBy','priority','length','ListId','create','contact','FaxInteraction','Contact\x20not\x20found','spread','get','autoclose','unmanaged','*,*,*,*','created','interaction','FaxMessage','AttachmentId','UserId','User','unshift','agent','name','waitForTheAssignedAgent','Start','startRouting','lodash','util','moment','bluebird','ioredis','../../config/utils','rpc','../../config/environment','jayson/promise','defaults','redis','./faxAccount.socket','register','request','then','info','FaxAccount,\x20%s,\x20%s','request\x20sent','debug','FaxAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result'];(function(_0x57f5ae,_0x2addac){var _0x36d28a=function(_0x4d49f4){while(--_0x4d49f4){_0x57f5ae['push'](_0x57f5ae['shift']());}};_0x36d28a(++_0x2addac);}(_0x5bab,0x1a9));var _0xb5ba=function(_0x39ac34,_0x2ad4d2){_0x39ac34=_0x39ac34-0x0;var _0x41ea79=_0x5bab[_0x39ac34];return _0x41ea79;};'use strict';var _=require(_0xb5ba('0x0'));var util=require(_0xb5ba('0x1'));var moment=require(_0xb5ba('0x2'));var BPromise=require(_0xb5ba('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xb5ba('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xb5ba('0x5'));var logger=require('../../config/logger')(_0xb5ba('0x6'));var config=require(_0xb5ba('0x7'));var jayson=require(_0xb5ba('0x8'));var client=jayson['client']['http']({'port':0x232c});config['redis']=_[_0xb5ba('0x9')](config[_0xb5ba('0xa')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xb5ba('0xa')]));require(_0xb5ba('0xb'))[_0xb5ba('0xc')](socket);function respondWithRpcPromise(_0xad92a1,_0x5ba418,_0x561840){return new BPromise(function(_0x355493,_0x50f6d5){return client[_0xb5ba('0xd')](_0xad92a1,_0x561840)[_0xb5ba('0xe')](function(_0xe80e5e){logger[_0xb5ba('0xf')](_0xb5ba('0x10'),_0x5ba418,_0xb5ba('0x11'));logger[_0xb5ba('0x12')](_0xb5ba('0x13'),_0x5ba418,_0xb5ba('0x11'),JSON[_0xb5ba('0x14')](_0xe80e5e));if(_0xe80e5e['error']){if(_0xe80e5e[_0xb5ba('0x15')][_0xb5ba('0x16')]===0x1f4){logger[_0xb5ba('0x15')](_0xb5ba('0x10'),_0x5ba418,_0xe80e5e['error']['message']);return _0x50f6d5(_0xe80e5e['error'][_0xb5ba('0x17')]);}logger['error']('FaxAccount,\x20%s,\x20%s',_0x5ba418,_0xe80e5e[_0xb5ba('0x15')]['message']);return _0x355493(_0xe80e5e[_0xb5ba('0x15')][_0xb5ba('0x17')]);}else{logger[_0xb5ba('0xf')](_0xb5ba('0x10'),_0x5ba418,_0xb5ba('0x11'));_0x355493(_0xe80e5e[_0xb5ba('0x18')][_0xb5ba('0x17')]);}})[_0xb5ba('0x19')](function(_0x2ae83f){logger[_0xb5ba('0x15')](_0xb5ba('0x10'),_0x5ba418,_0x2ae83f);_0x50f6d5(_0x2ae83f);});});}exports['GetFaxAccount']=function(_0x5df896){var _0x2b02c6=this;return new Promise(function(_0x446a3d,_0x271463){return db[_0xb5ba('0x1a')][_0xb5ba('0x1b')]({'raw':_0x5df896['options']?_0x5df896[_0xb5ba('0x1c')][_0xb5ba('0x1d')]===undefined?!![]:![]:!![],'where':_0x5df896['options']?_0x5df896[_0xb5ba('0x1c')][_0xb5ba('0x1e')]||null:null,'attributes':_0x5df896[_0xb5ba('0x1c')]?_0x5df896[_0xb5ba('0x1c')]['attributes']||null:null,'limit':_0x5df896['options']?_0x5df896[_0xb5ba('0x1c')][_0xb5ba('0x1f')]||null:null,'include':_0x5df896[_0xb5ba('0x1c')]?_0x5df896[_0xb5ba('0x1c')]['include']?_[_0xb5ba('0x20')](_0x5df896[_0xb5ba('0x1c')][_0xb5ba('0x21')],function(_0x76056e){return{'model':db[_0x76056e[_0xb5ba('0x22')]],'as':_0x76056e['as'],'attributes':_0x76056e[_0xb5ba('0x23')],'include':_0x76056e[_0xb5ba('0x21')]?_[_0xb5ba('0x20')](_0x76056e['include'],function(_0x3c7c2b){return{'model':db[_0x3c7c2b[_0xb5ba('0x22')]],'as':_0x3c7c2b['as'],'attributes':_0x3c7c2b[_0xb5ba('0x23')],'include':_0x3c7c2b[_0xb5ba('0x21')]?_[_0xb5ba('0x20')](_0x3c7c2b[_0xb5ba('0x21')],function(_0x128c8c){return{'model':db[_0x128c8c[_0xb5ba('0x22')]],'as':_0x128c8c['as'],'attributes':_0x128c8c[_0xb5ba('0x23')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x280c9c){logger[_0xb5ba('0xf')](_0xb5ba('0x24'),_0x5df896);logger[_0xb5ba('0x12')](_0xb5ba('0x24'),_0x5df896,JSON[_0xb5ba('0x14')](_0x280c9c));_0x446a3d(_0x280c9c);})[_0xb5ba('0x19')](function(_0x518842){logger[_0xb5ba('0x15')](_0xb5ba('0x24'),_0x518842[_0xb5ba('0x17')],_0x5df896);_0x271463(_0x2b02c6[_0xb5ba('0x15')](0x1f4,_0x518842[_0xb5ba('0x17')]));});});};exports[_0xb5ba('0x25')]=function(_0x50f03a,_0x4d7656,_0x3dd941){var _0x41287d=this;return new Promise(function(_0x114f41,_0x48b998){var _0x411bb0={'body':_0x50f03a['body'],'channel':_0xb5ba('0x26')};var _0x23acd3=[];var _0xd4ba6a=[];var _0x26bb5f={};return db['CmContact'][_0xb5ba('0x27')]()[_0xb5ba('0xe')](function(_0x48d9e6){if(!_0x48d9e6){throw new db[(_0xb5ba('0x28'))][(_0xb5ba('0x29'))]('no\x20available\x20attributes');}_0x23acd3=_['difference'](_[_0xb5ba('0x2a')](_0x48d9e6),[_0xb5ba('0x2b'),_0xb5ba('0x2c')]);_0xd4ba6a=_[_0xb5ba('0x2d')](_[_0xb5ba('0x2a')](_0x48d9e6),[_0xb5ba('0x2b'),_0xb5ba('0x2c'),_0xb5ba('0x2e'),'ListId']);if(_0x50f03a['body']['id']){delete _0x50f03a['body']['id'];}if(_[_0xb5ba('0x2f')](_0x50f03a['body'][_0xb5ba('0x30')])){throw new db['Sequelize'][(_0xb5ba('0x29'))](_0xb5ba('0x31'));}if(_[_0xb5ba('0x2f')](_0x50f03a['body'][_0xb5ba('0x32')])||_0x50f03a[_0xb5ba('0x32')][_0xb5ba('0x32')]===''){throw new db[(_0xb5ba('0x28'))][(_0xb5ba('0x29'))]('body\x20is\x20mandatory\x20and\x20not\x20empty');}if(_[_0xb5ba('0x2f')](_0x50f03a[_0xb5ba('0x32')][_0xb5ba('0x33')])){throw new db[(_0xb5ba('0x28'))][(_0xb5ba('0x29'))](_0xb5ba('0x34')+_0xd4ba6a);}if(!_[_0xb5ba('0x35')](_0xd4ba6a,_0x50f03a[_0xb5ba('0x32')][_0xb5ba('0x33')])){throw new db[(_0xb5ba('0x28'))][(_0xb5ba('0x29'))]('mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20'+_0xd4ba6a);}_0x26bb5f[_0x50f03a[_0xb5ba('0x32')][_0xb5ba('0x33')]]=_0x50f03a[_0xb5ba('0x32')][_0xb5ba('0x30')];})[_0xb5ba('0xe')](function(){return db[_0xb5ba('0x1a')][_0xb5ba('0x36')]({'where':{'id':_0x50f03a[_0xb5ba('0x37')]['id']},'include':[{'model':db[_0xb5ba('0x38')],'as':_0xb5ba('0x39'),'include':[{'model':db[_0xb5ba('0x3a')],'as':_0xb5ba('0x3b'),'where':_0x26bb5f,'limit':0x1,'order':[[_0xb5ba('0x2c'),_0xb5ba('0x3c')]]}]},{'model':db[_0xb5ba('0x3d')],'as':_0xb5ba('0x3e')}]});})[_0xb5ba('0xe')](function(_0x42eb80){if(_0x42eb80&&_0x42eb80[_0xb5ba('0x39')]){var _0x551488=_0x42eb80['get']({'plain':!![]});_0x411bb0['account']=_0x551488;_0x411bb0[_0xb5ba('0x3f')]=_0x551488[_0xb5ba('0x3e')];_0x411bb0[_0xb5ba('0x40')]=_0x551488[_0xb5ba('0x39')];_0x411bb0['applications']=_[_0xb5ba('0x41')](_0x411bb0[_0xb5ba('0x3f')],[_0xb5ba('0x42')],['asc']);if(_0x411bb0['account']['Applications']){delete _0x411bb0[_0xb5ba('0x37')][_0xb5ba('0x3e')];}if(_0x411bb0['account'][_0xb5ba('0x39')]&&_0x411bb0[_0xb5ba('0x37')][_0xb5ba('0x39')][_0xb5ba('0x3b')][_0xb5ba('0x43')]){return _0x411bb0[_0xb5ba('0x37')][_0xb5ba('0x39')][_0xb5ba('0x3b')][0x0];}var _0x2c285f=_['defaults'](_0x50f03a[_0xb5ba('0x32')],{'firstName':_0x50f03a[_0xb5ba('0x32')][_0xb5ba('0x30')],'ListId':_0x551488[_0xb5ba('0x44')]});_0x2c285f[_0x50f03a[_0xb5ba('0x32')][_0xb5ba('0x33')]]=_0x50f03a[_0xb5ba('0x32')]['from'];return db[_0xb5ba('0x3a')][_0xb5ba('0x45')](_0x2c285f,{'fields':_0x23acd3,'raw':!![]});}})[_0xb5ba('0xe')](function(_0xa374af){_0x411bb0[_0xb5ba('0x46')]=_0xa374af;if(_0xa374af){var _0x27ac9d={'ContactId':_0xa374af['id'],'FaxAccountId':_0x50f03a[_0xb5ba('0x37')]['id'],'fax':_0xa374af[_0xb5ba('0x26')]};return db[_0xb5ba('0x47')][_0xb5ba('0x36')]({'where':{'ContactId':_0xa374af['id'],'closed':![],'FaxAccountId':_0x50f03a[_0xb5ba('0x37')]['id']}})['then'](function(_0x146647){if(_0x146647){return[_0x146647,![]];}return db[_0xb5ba('0x47')][_0xb5ba('0x45')](_0x27ac9d)[_0xb5ba('0xe')](function(_0x296806){return[_0x296806,!![]];});});}else{throw new Error(_0xb5ba('0x48'));}})[_0xb5ba('0x49')](function(_0x322187,_0x6c4f60){var _0xe79113=_0x322187[_0xb5ba('0x4a')]({'plain':!![]});if(_0x6c4f60){if(_0x411bb0['account'][_0xb5ba('0x4b')]){_0x411bb0[_0xb5ba('0x3f')]['push']({'id':0x0,'priority':_0x411bb0[_0xb5ba('0x3f')][_0xb5ba('0x43')]+0x1,'app':'close','appdata':_0xb5ba('0x4c'),'interval':_0xb5ba('0x4d')});}_0xe79113[_0xb5ba('0x4e')]=!![];}else{_0xe79113[_0xb5ba('0x4e')]=![];}_0x411bb0[_0xb5ba('0x4f')]=_0xe79113;return db[_0xb5ba('0x50')][_0xb5ba('0x45')]({'body':_0x50f03a[_0xb5ba('0x32')][_0xb5ba('0x32')],'FaxAccountId':_0x50f03a[_0xb5ba('0x37')]['id'],'FaxInteractionId':_0x322187['id'],'direction':'in','ContactId':_0x322187['ContactId'],'AttachmentId':_0x50f03a['body'][_0xb5ba('0x51')]});})[_0xb5ba('0xe')](function(_0x595d57){_0x411bb0['message']=_0x595d57;if(_0x411bb0[_0xb5ba('0x4f')][_0xb5ba('0x52')]){return db[_0xb5ba('0x53')]['find']({'attributes':['id','name'],'where':{'id':_0x411bb0[_0xb5ba('0x4f')][_0xb5ba('0x52')]}})['then'](function(_0x84b9eb){if(_0x84b9eb){_0x411bb0[_0xb5ba('0x3f')][_0xb5ba('0x54')]({'id':0x0,'priority':0x0,'app':_0xb5ba('0x55'),'appdata':_0x84b9eb[_0xb5ba('0x56')]+','+(_0x411bb0[_0xb5ba('0x37')][_0xb5ba('0x57')]||0xa),'interval':_0xb5ba('0x4d')});}return respondWithRpcPromise(_0xb5ba('0x58'),_0xb5ba('0x59'),_0x411bb0);});}return respondWithRpcPromise(_0xb5ba('0x58'),_0xb5ba('0x59'),_0x411bb0);})[_0xb5ba('0xe')](function(_0x477128){_0x114f41(_0x477128);})[_0xb5ba('0x19')](function(_0x456aad){_0x48b998(_0x41287d[_0xb5ba('0x15')](0x1f4,_0x456aad[_0xb5ba('0x17')]));});});}; \ No newline at end of file +var _0x74ad=['CmContact','ValidationError','difference','createdAt','updatedAt','keys','CompanyId','ListId','isNil','from','Sequelize','from\x20is\x20mandatory','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','mapKey','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','find','account','List','Contacts','DESC','get','applications','Applications','list','orderBy','priority','asc','length','create','contact','FaxInteraction','Contact\x20not\x20found','spread','autoclose','push','close','unmanaged','*,*,*,*','created','interaction','FaxMessage','AttachmentId','UserId','name','agent','waitForTheAssignedAgent','Start','startRouting','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','http','redis','defaults','localhost','register','request','then','info','FaxAccount,\x20%s,\x20%s','debug','FaxAccount,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','code','error','message','result','GetFaxAccount','FaxAccount','findAll','options','raw','where','attributes','limit','map','model','include','catch','body','fax'];(function(_0xbf7121,_0x847a81){var _0x1eaeba=function(_0x546bc0){while(--_0x546bc0){_0xbf7121['push'](_0xbf7121['shift']());}};_0x1eaeba(++_0x847a81);}(_0x74ad,0x13c));var _0xd74a=function(_0x2bf31e,_0x3d5db7){_0x2bf31e=_0x2bf31e-0x0;var _0x528176=_0x74ad[_0x2bf31e];return _0x528176;};'use strict';var _=require(_0xd74a('0x0'));var util=require(_0xd74a('0x1'));var moment=require(_0xd74a('0x2'));var BPromise=require(_0xd74a('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xd74a('0x4'));var db=require(_0xd74a('0x5'))['db'];var utils=require(_0xd74a('0x6'));var logger=require('../../config/logger')(_0xd74a('0x7'));var config=require(_0xd74a('0x8'));var jayson=require('jayson/promise');var client=jayson['client'][_0xd74a('0x9')]({'port':0x232c});config[_0xd74a('0xa')]=_[_0xd74a('0xb')](config['redis'],{'host':_0xd74a('0xc'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require('./faxAccount.socket')[_0xd74a('0xd')](socket);function respondWithRpcPromise(_0x2e14a7,_0x53b4de,_0x30b7b5){return new BPromise(function(_0x3e0362,_0x50ca56){return client[_0xd74a('0xe')](_0x2e14a7,_0x30b7b5)[_0xd74a('0xf')](function(_0x5b1b0b){logger[_0xd74a('0x10')](_0xd74a('0x11'),_0x53b4de,'request\x20sent');logger[_0xd74a('0x12')](_0xd74a('0x13'),_0x53b4de,_0xd74a('0x14'),JSON[_0xd74a('0x15')](_0x5b1b0b));if(_0x5b1b0b['error']){if(_0x5b1b0b['error'][_0xd74a('0x16')]===0x1f4){logger[_0xd74a('0x17')](_0xd74a('0x11'),_0x53b4de,_0x5b1b0b[_0xd74a('0x17')][_0xd74a('0x18')]);return _0x50ca56(_0x5b1b0b[_0xd74a('0x17')][_0xd74a('0x18')]);}logger[_0xd74a('0x17')](_0xd74a('0x11'),_0x53b4de,_0x5b1b0b['error'][_0xd74a('0x18')]);return _0x3e0362(_0x5b1b0b[_0xd74a('0x17')]['message']);}else{logger[_0xd74a('0x10')](_0xd74a('0x11'),_0x53b4de,_0xd74a('0x14'));_0x3e0362(_0x5b1b0b[_0xd74a('0x19')][_0xd74a('0x18')]);}})['catch'](function(_0x3018df){logger[_0xd74a('0x17')](_0xd74a('0x11'),_0x53b4de,_0x3018df);_0x50ca56(_0x3018df);});});}exports[_0xd74a('0x1a')]=function(_0x2b22e6){var _0x3afbb7=this;return new Promise(function(_0x56f397,_0x2bda0e){return db[_0xd74a('0x1b')][_0xd74a('0x1c')]({'raw':_0x2b22e6[_0xd74a('0x1d')]?_0x2b22e6[_0xd74a('0x1d')][_0xd74a('0x1e')]===undefined?!![]:![]:!![],'where':_0x2b22e6[_0xd74a('0x1d')]?_0x2b22e6[_0xd74a('0x1d')][_0xd74a('0x1f')]||null:null,'attributes':_0x2b22e6['options']?_0x2b22e6[_0xd74a('0x1d')][_0xd74a('0x20')]||null:null,'limit':_0x2b22e6[_0xd74a('0x1d')]?_0x2b22e6['options'][_0xd74a('0x21')]||null:null,'include':_0x2b22e6[_0xd74a('0x1d')]?_0x2b22e6[_0xd74a('0x1d')]['include']?_[_0xd74a('0x22')](_0x2b22e6[_0xd74a('0x1d')]['include'],function(_0x4ad36b){return{'model':db[_0x4ad36b[_0xd74a('0x23')]],'as':_0x4ad36b['as'],'attributes':_0x4ad36b[_0xd74a('0x20')],'include':_0x4ad36b[_0xd74a('0x24')]?_[_0xd74a('0x22')](_0x4ad36b['include'],function(_0x34d954){return{'model':db[_0x34d954[_0xd74a('0x23')]],'as':_0x34d954['as'],'attributes':_0x34d954[_0xd74a('0x20')],'include':_0x34d954['include']?_['map'](_0x34d954[_0xd74a('0x24')],function(_0x13f264){return{'model':db[_0x13f264[_0xd74a('0x23')]],'as':_0x13f264['as'],'attributes':_0x13f264[_0xd74a('0x20')]};}):[]};}):[]};}):[]:[]})[_0xd74a('0xf')](function(_0x277d47){logger['info']('GetFaxAccount',_0x2b22e6);logger[_0xd74a('0x12')](_0xd74a('0x1a'),_0x2b22e6,JSON[_0xd74a('0x15')](_0x277d47));_0x56f397(_0x277d47);})[_0xd74a('0x25')](function(_0x16b3d2){logger[_0xd74a('0x17')](_0xd74a('0x1a'),_0x16b3d2[_0xd74a('0x18')],_0x2b22e6);_0x2bda0e(_0x3afbb7[_0xd74a('0x17')](0x1f4,_0x16b3d2[_0xd74a('0x18')]));});});};exports['NotifyFaxAccount']=function(_0x3b1f29,_0x314563,_0x15c7f6){var _0x5bd50b=this;return new Promise(function(_0x38153e,_0x5a5274){var _0x32d655={'body':_0x3b1f29[_0xd74a('0x26')],'channel':_0xd74a('0x27')};var _0x2a85a7=[];var _0x2cfc54=[];var _0x482c01={};return db[_0xd74a('0x28')]['describe']()[_0xd74a('0xf')](function(_0x56e81f){if(!_0x56e81f){throw new db['Sequelize'][(_0xd74a('0x29'))]('no\x20available\x20attributes');}_0x2a85a7=_[_0xd74a('0x2a')](_['keys'](_0x56e81f),[_0xd74a('0x2b'),_0xd74a('0x2c')]);_0x2cfc54=_[_0xd74a('0x2a')](_[_0xd74a('0x2d')](_0x56e81f),[_0xd74a('0x2b'),_0xd74a('0x2c'),_0xd74a('0x2e'),_0xd74a('0x2f')]);if(_0x3b1f29['body']['id']){delete _0x3b1f29[_0xd74a('0x26')]['id'];}if(_[_0xd74a('0x30')](_0x3b1f29[_0xd74a('0x26')][_0xd74a('0x31')])){throw new db[(_0xd74a('0x32'))][(_0xd74a('0x29'))](_0xd74a('0x33'));}if(_[_0xd74a('0x30')](_0x3b1f29[_0xd74a('0x26')][_0xd74a('0x26')])||_0x3b1f29[_0xd74a('0x26')][_0xd74a('0x26')]===''){throw new db['Sequelize'][(_0xd74a('0x29'))](_0xd74a('0x34'));}if(_[_0xd74a('0x30')](_0x3b1f29[_0xd74a('0x26')]['mapKey'])){throw new db[(_0xd74a('0x32'))][(_0xd74a('0x29'))](_0xd74a('0x35')+_0x2cfc54);}if(!_['includes'](_0x2cfc54,_0x3b1f29[_0xd74a('0x26')][_0xd74a('0x36')])){throw new db[(_0xd74a('0x32'))][(_0xd74a('0x29'))](_0xd74a('0x37')+_0x2cfc54);}_0x482c01[_0x3b1f29['body'][_0xd74a('0x36')]]=_0x3b1f29['body'][_0xd74a('0x31')];})[_0xd74a('0xf')](function(){return db['FaxAccount'][_0xd74a('0x38')]({'where':{'id':_0x3b1f29[_0xd74a('0x39')]['id']},'include':[{'model':db['CmList'],'as':_0xd74a('0x3a'),'include':[{'model':db['CmContact'],'as':_0xd74a('0x3b'),'where':_0x482c01,'limit':0x1,'order':[[_0xd74a('0x2c'),_0xd74a('0x3c')]]}]},{'model':db['FaxApplication'],'as':'Applications'}]});})[_0xd74a('0xf')](function(_0x15f235){if(_0x15f235&&_0x15f235[_0xd74a('0x3a')]){var _0x46afe8=_0x15f235[_0xd74a('0x3d')]({'plain':!![]});_0x32d655[_0xd74a('0x39')]=_0x46afe8;_0x32d655[_0xd74a('0x3e')]=_0x46afe8[_0xd74a('0x3f')];_0x32d655[_0xd74a('0x40')]=_0x46afe8[_0xd74a('0x3a')];_0x32d655[_0xd74a('0x3e')]=_[_0xd74a('0x41')](_0x32d655[_0xd74a('0x3e')],[_0xd74a('0x42')],[_0xd74a('0x43')]);if(_0x32d655[_0xd74a('0x39')][_0xd74a('0x3f')]){delete _0x32d655[_0xd74a('0x39')]['Applications'];}if(_0x32d655['account']['List']&&_0x32d655[_0xd74a('0x39')]['List'][_0xd74a('0x3b')][_0xd74a('0x44')]){return _0x32d655[_0xd74a('0x39')][_0xd74a('0x3a')][_0xd74a('0x3b')][0x0];}var _0x4d661e=_[_0xd74a('0xb')](_0x3b1f29[_0xd74a('0x26')],{'firstName':_0x3b1f29[_0xd74a('0x26')]['from'],'ListId':_0x46afe8['ListId']});_0x4d661e[_0x3b1f29[_0xd74a('0x26')][_0xd74a('0x36')]]=_0x3b1f29[_0xd74a('0x26')][_0xd74a('0x31')];return db['CmContact'][_0xd74a('0x45')](_0x4d661e,{'fields':_0x2a85a7,'raw':!![]});}})[_0xd74a('0xf')](function(_0x504879){_0x32d655[_0xd74a('0x46')]=_0x504879;if(_0x504879){var _0x4e99f7={'ContactId':_0x504879['id'],'FaxAccountId':_0x3b1f29[_0xd74a('0x39')]['id'],'fax':_0x504879[_0xd74a('0x27')]};return db[_0xd74a('0x47')]['find']({'where':{'ContactId':_0x504879['id'],'closed':![],'FaxAccountId':_0x3b1f29['account']['id']}})[_0xd74a('0xf')](function(_0x15d877){if(_0x15d877){return[_0x15d877,![]];}return db['FaxInteraction'][_0xd74a('0x45')](_0x4e99f7)[_0xd74a('0xf')](function(_0x418e6f){return[_0x418e6f,!![]];});});}else{throw new Error(_0xd74a('0x48'));}})[_0xd74a('0x49')](function(_0x583f5b,_0x1466b6){var _0x52d4c2=_0x583f5b[_0xd74a('0x3d')]({'plain':!![]});if(_0x1466b6){if(_0x32d655[_0xd74a('0x39')][_0xd74a('0x4a')]){_0x32d655[_0xd74a('0x3e')][_0xd74a('0x4b')]({'id':0x0,'priority':_0x32d655[_0xd74a('0x3e')][_0xd74a('0x44')]+0x1,'app':_0xd74a('0x4c'),'appdata':_0xd74a('0x4d'),'interval':_0xd74a('0x4e')});}_0x52d4c2['created']=!![];}else{_0x52d4c2[_0xd74a('0x4f')]=![];}_0x32d655[_0xd74a('0x50')]=_0x52d4c2;return db[_0xd74a('0x51')][_0xd74a('0x45')]({'body':_0x3b1f29[_0xd74a('0x26')]['body'],'FaxAccountId':_0x3b1f29[_0xd74a('0x39')]['id'],'FaxInteractionId':_0x583f5b['id'],'direction':'in','ContactId':_0x583f5b['ContactId'],'AttachmentId':_0x3b1f29[_0xd74a('0x26')][_0xd74a('0x52')]});})[_0xd74a('0xf')](function(_0x13dd72){_0x32d655[_0xd74a('0x18')]=_0x13dd72;if(_0x32d655[_0xd74a('0x50')][_0xd74a('0x53')]){return db['User']['find']({'attributes':['id',_0xd74a('0x54')],'where':{'id':_0x32d655['interaction'][_0xd74a('0x53')]}})[_0xd74a('0xf')](function(_0x5898f6){if(_0x5898f6){_0x32d655['applications']['unshift']({'id':0x0,'priority':0x0,'app':_0xd74a('0x55'),'appdata':_0x5898f6[_0xd74a('0x54')]+','+(_0x32d655[_0xd74a('0x39')][_0xd74a('0x56')]||0xa),'interval':_0xd74a('0x4e')});}return respondWithRpcPromise(_0xd74a('0x57'),_0xd74a('0x58'),_0x32d655);});}return respondWithRpcPromise('Start',_0xd74a('0x58'),_0x32d655);})[_0xd74a('0xf')](function(_0x4a6758){_0x38153e(_0x4a6758);})[_0xd74a('0x25')](function(_0x3289be){_0x5a5274(_0x5bd50b[_0xd74a('0x17')](0x1f4,_0x3289be[_0xd74a('0x18')]));});});}; \ No newline at end of file diff --git a/server/api/faxAccount/faxAccount.socket.js b/server/api/faxAccount/faxAccount.socket.js index 02eae24..4033b65 100644 --- a/server/api/faxAccount/faxAccount.socket.js +++ b/server/api/faxAccount/faxAccount.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa416=['faxAccount:','./faxAccount.events','save','remove','update','emit','removeListener','register','length'];(function(_0x4584fe,_0x545b00){var _0xf39cf5=function(_0xef9a8c){while(--_0xef9a8c){_0x4584fe['push'](_0x4584fe['shift']());}};_0xf39cf5(++_0x545b00);}(_0xa416,0x1ba));var _0x6a41=function(_0x4565bf,_0x5ad9d6){_0x4565bf=_0x4565bf-0x0;var _0x5610ba=_0xa416[_0x4565bf];return _0x5610ba;};'use strict';var FaxAccountEvents=require(_0x6a41('0x0'));var events=[_0x6a41('0x1'),_0x6a41('0x2'),_0x6a41('0x3')];function createListener(_0x18a781,_0x552782){return function(_0x125a3f){_0x552782[_0x6a41('0x4')](_0x18a781,_0x125a3f);};}function removeListener(_0x55352d,_0x297369){return function(){FaxAccountEvents[_0x6a41('0x5')](_0x55352d,_0x297369);};}exports[_0x6a41('0x6')]=function(_0x498239){for(var _0xb78671=0x0,_0x2af60e=events[_0x6a41('0x7')];_0xb78671<_0x2af60e;_0xb78671++){var _0x40e53a=events[_0xb78671];var _0x32c63f=createListener(_0x6a41('0x8')+_0x40e53a,_0x498239);FaxAccountEvents['on'](_0x40e53a,_0x32c63f);}}; \ No newline at end of file +var _0x476f=['./faxAccount.events','save','update','register','faxAccount:'];(function(_0x47175e,_0x675ba7){var _0x28175c=function(_0xa7434f){while(--_0xa7434f){_0x47175e['push'](_0x47175e['shift']());}};_0x28175c(++_0x675ba7);}(_0x476f,0x11d));var _0xf476=function(_0x25caac,_0x310d17){_0x25caac=_0x25caac-0x0;var _0x1aa445=_0x476f[_0x25caac];return _0x1aa445;};'use strict';var FaxAccountEvents=require(_0xf476('0x0'));var events=[_0xf476('0x1'),'remove',_0xf476('0x2')];function createListener(_0x135a48,_0x5d4237){return function(_0xe77927){_0x5d4237['emit'](_0x135a48,_0xe77927);};}function removeListener(_0x422665,_0x11cac4){return function(){FaxAccountEvents['removeListener'](_0x422665,_0x11cac4);};}exports[_0xf476('0x3')]=function(_0x305e2c){for(var _0x1e36d6=0x0,_0x3c4f1a=events['length'];_0x1e36d6<_0x3c4f1a;_0x1e36d6++){var _0x171f23=events[_0x1e36d6];var _0x4b2efd=createListener(_0xf476('0x4')+_0x171f23,_0x305e2c);FaxAccountEvents['on'](_0x171f23,_0x4b2efd);}}; \ No newline at end of file diff --git a/server/api/faxAccount/index.js b/server/api/faxAccount/index.js index 7f8aa8c..790acb3 100644 --- a/server/api/faxAccount/index.js +++ b/server/api/faxAccount/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./faxAccount.controller','get','index','/describe','show','/:id/dispositions','isAuthenticated','getDispositions','/:id/interactions','getInteractions','/:id/applications','/:id/messages','getMessages','/:id/users','getAgents','post','addDisposition','/:id/canned_answers','addAnswer','addInteraction','addApplications','addAccountApplications','/updateaccountapplications','/:id/send','send','addAgents','put','/:id','update','destroy','delete','removeDispositions','removeAnswers','removeAgents','exports','multer','util','path'];(function(_0x2c4375,_0x70d29d){var _0x37d82b=function(_0x1f3f12){while(--_0x1f3f12){_0x2c4375['push'](_0x2c4375['shift']());}};_0x37d82b(++_0x70d29d);}(_0xa9e0,0x123));var _0x0a9e=function(_0x12d033,_0x25fa2f){_0x12d033=_0x12d033-0x0;var _0x3b4e80=_0xa9e0[_0x12d033];return _0x3b4e80;};'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['describe']);router[_0x0a9e('0x8')]('/:id',auth['isAuthenticated'](),controller[_0x0a9e('0xb')]);router[_0x0a9e('0x8')](_0x0a9e('0xc'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0xe')]);router[_0x0a9e('0x8')]('/:id/canned_answers',auth['isAuthenticated'](),controller['getAnswers']);router['get'](_0x0a9e('0xf'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x10')]);router[_0x0a9e('0x8')](_0x0a9e('0x11'),auth[_0x0a9e('0xd')](),controller['getApplications']);router[_0x0a9e('0x8')](_0x0a9e('0x12'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x13')]);router[_0x0a9e('0x8')](_0x0a9e('0x14'),auth['isAuthenticated'](),controller[_0x0a9e('0x15')]);router['post']('/',auth[_0x0a9e('0xd')](),controller['create']);router[_0x0a9e('0x16')](_0x0a9e('0xc'),auth['isAuthenticated'](),controller[_0x0a9e('0x17')]);router['post'](_0x0a9e('0x18'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x19')]);router[_0x0a9e('0x16')](_0x0a9e('0xf'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1a')]);router[_0x0a9e('0x16')](_0x0a9e('0x11'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1b')]);router[_0x0a9e('0x16')]('/addaccountapplications',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1c')]);router['post'](_0x0a9e('0x1d'),auth['isAuthenticated'](),controller['updateAccountApplications']);router[_0x0a9e('0x16')](_0x0a9e('0x1e'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1f')]);router['post'](_0x0a9e('0x14'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x20')]);router[_0x0a9e('0x21')](_0x0a9e('0x22'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x23')]);router['delete']('/:id',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x24')]);router[_0x0a9e('0x25')](_0x0a9e('0xc'),auth['isAuthenticated'](),controller[_0x0a9e('0x26')]);router['delete'](_0x0a9e('0x18'),auth['isAuthenticated'](),controller[_0x0a9e('0x27')]);router[_0x0a9e('0x25')](_0x0a9e('0x14'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x28')]);module[_0x0a9e('0x29')]=router; \ No newline at end of file +var _0xa9e0=['Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./faxAccount.controller','get','index','/describe','show','/:id/dispositions','isAuthenticated','getDispositions','/:id/interactions','getInteractions','/:id/applications','/:id/messages','getMessages','/:id/users','getAgents','post','addDisposition','/:id/canned_answers','addAnswer','addInteraction','addApplications','addAccountApplications','/updateaccountapplications','/:id/send','send','addAgents','put','/:id','update','destroy','delete','removeDispositions','removeAnswers','removeAgents','exports','multer','util','path'];(function(_0x34f701,_0x37e407){var _0x3e2429=function(_0x20c0c3){while(--_0x20c0c3){_0x34f701['push'](_0x34f701['shift']());}};_0x3e2429(++_0x37e407);}(_0xa9e0,0x123));var _0x0a9e=function(_0x6131cd,_0x4c26a1){_0x6131cd=_0x6131cd-0x0;var _0x47e916=_0xa9e0[_0x6131cd];return _0x47e916;};'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['describe']);router[_0x0a9e('0x8')]('/:id',auth['isAuthenticated'](),controller[_0x0a9e('0xb')]);router[_0x0a9e('0x8')](_0x0a9e('0xc'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0xe')]);router[_0x0a9e('0x8')]('/:id/canned_answers',auth['isAuthenticated'](),controller['getAnswers']);router['get'](_0x0a9e('0xf'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x10')]);router[_0x0a9e('0x8')](_0x0a9e('0x11'),auth[_0x0a9e('0xd')](),controller['getApplications']);router[_0x0a9e('0x8')](_0x0a9e('0x12'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x13')]);router[_0x0a9e('0x8')](_0x0a9e('0x14'),auth['isAuthenticated'](),controller[_0x0a9e('0x15')]);router['post']('/',auth[_0x0a9e('0xd')](),controller['create']);router[_0x0a9e('0x16')](_0x0a9e('0xc'),auth['isAuthenticated'](),controller[_0x0a9e('0x17')]);router['post'](_0x0a9e('0x18'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x19')]);router[_0x0a9e('0x16')](_0x0a9e('0xf'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1a')]);router[_0x0a9e('0x16')](_0x0a9e('0x11'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1b')]);router[_0x0a9e('0x16')]('/addaccountapplications',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1c')]);router['post'](_0x0a9e('0x1d'),auth['isAuthenticated'](),controller['updateAccountApplications']);router[_0x0a9e('0x16')](_0x0a9e('0x1e'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1f')]);router['post'](_0x0a9e('0x14'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x20')]);router[_0x0a9e('0x21')](_0x0a9e('0x22'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x23')]);router['delete']('/:id',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x24')]);router[_0x0a9e('0x25')](_0x0a9e('0xc'),auth['isAuthenticated'](),controller[_0x0a9e('0x26')]);router['delete'](_0x0a9e('0x18'),auth['isAuthenticated'](),controller[_0x0a9e('0x27')]);router[_0x0a9e('0x25')](_0x0a9e('0x14'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x28')]);module[_0x0a9e('0x29')]=router; \ No newline at end of file diff --git a/server/api/faxApplication/faxApplication.attributes.js b/server/api/faxApplication/faxApplication.attributes.js index 2a8a66b..73207c4 100644 --- a/server/api/faxApplication/faxApplication.attributes.js +++ b/server/api/faxApplication/faxApplication.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xdc5f=['*,*,*,*','sequelize','exports','INTEGER','STRING','noop','TEXT'];(function(_0x194bcf,_0xa9d205){var _0x24c2c2=function(_0x9ddf57){while(--_0x9ddf57){_0x194bcf['push'](_0x194bcf['shift']());}};_0x24c2c2(++_0xa9d205);}(_0xdc5f,0x1e4));var _0xfdc5=function(_0x502c7d,_0x2f1285){_0x502c7d=_0x502c7d-0x0;var _0x30b7ed=_0xdc5f[_0x502c7d];return _0x30b7ed;};'use strict';var Sequelize=require(_0xfdc5('0x0'));module[_0xfdc5('0x1')]={'priority':{'type':Sequelize[_0xfdc5('0x2')],'allowNull':![]},'app':{'type':Sequelize[_0xfdc5('0x3')],'allowNull':![],'defaultValue':_0xfdc5('0x4')},'appdata':{'type':Sequelize[_0xfdc5('0x5')]()},'description':{'type':Sequelize['STRING']},'interval':{'type':Sequelize['STRING'],'defaultValue':_0xfdc5('0x6')}}; \ No newline at end of file +var _0x0256=['noop','sequelize','exports','STRING'];(function(_0x95452a,_0x2de7e6){var _0xfa6961=function(_0x2ec481){while(--_0x2ec481){_0x95452a['push'](_0x95452a['shift']());}};_0xfa6961(++_0x2de7e6);}(_0x0256,0x109));var _0x6025=function(_0x43f16f,_0x5b99e5){_0x43f16f=_0x43f16f-0x0;var _0x66db51=_0x0256[_0x43f16f];return _0x66db51;};'use strict';var Sequelize=require(_0x6025('0x0'));module[_0x6025('0x1')]={'priority':{'type':Sequelize['INTEGER'],'allowNull':![]},'app':{'type':Sequelize[_0x6025('0x2')],'allowNull':![],'defaultValue':_0x6025('0x3')},'appdata':{'type':Sequelize['TEXT']()},'description':{'type':Sequelize['STRING']},'interval':{'type':Sequelize[_0x6025('0x2')],'defaultValue':'*,*,*,*'}}; \ No newline at end of file diff --git a/server/api/faxApplication/faxApplication.controller.js b/server/api/faxApplication/faxApplication.controller.js index 98450e2..e4da17a 100644 --- a/server/api/faxApplication/faxApplication.controller.js +++ b/server/api/faxApplication/faxApplication.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa823=['then','destroy','sendStatus','error','stack','name','send','index','map','FaxApplication','fieldName','model','keys','intersection','fields','query','attributes','length','nolimit','order','sort','filters','pick','filter','where','merge','options','includeAll','include','findAll','rows','show','params','rawAttributes','find','catch','create','body','eml-format','zip-dir','moment','bluebird','mustache','util','path','sox','fs-extra','lodash','squel','crypto','jsforce','desk.js','to-csv','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','end','status','json','offset','undefined','limit','count','set','apply','reject','save','update'];(function(_0x1c7d54,_0x4b9e25){var _0x22fdc4=function(_0x3ba750){while(--_0x3ba750){_0x1c7d54['push'](_0x1c7d54['shift']());}};_0x22fdc4(++_0x4b9e25);}(_0xa823,0x19d));var _0x3a82=function(_0x33f010,_0x35fc77){_0x33f010=_0x33f010-0x0;var _0x2c03e2=_0xa823[_0x33f010];return _0x2c03e2;};'use strict';var emlformat=require(_0x3a82('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x3a82('0x1'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x3a82('0x2'));var BPromise=require(_0x3a82('0x3'));var Mustache=require(_0x3a82('0x4'));var util=require(_0x3a82('0x5'));var path=require(_0x3a82('0x6'));var sox=require(_0x3a82('0x7'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x3a82('0x8'));var _=require(_0x3a82('0x9'));var squel=require(_0x3a82('0xa'));var crypto=require(_0x3a82('0xb'));var jsforce=require(_0x3a82('0xc'));var deskjs=require(_0x3a82('0xd'));var toCsv=require(_0x3a82('0xe'));var querystring=require('querystring');var Papa=require(_0x3a82('0xf'));var Redis=require(_0x3a82('0x10'));var authService=require(_0x3a82('0x11'));var qs=require(_0x3a82('0x12'));var as=require(_0x3a82('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x3a82('0x14'))(_0x3a82('0x15'));var utils=require(_0x3a82('0x16'));var config=require(_0x3a82('0x17'));var licenseUtil=require(_0x3a82('0x18'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x1e359f,_0x55ccf1){_0x55ccf1=_0x55ccf1||0xcc;return function(_0x414211){if(_0x414211){return _0x1e359f['sendStatus'](_0x55ccf1);}return _0x1e359f['status'](_0x55ccf1)[_0x3a82('0x19')]();};}function respondWithResult(_0x2f4462,_0x5f084e){_0x5f084e=_0x5f084e||0xc8;return function(_0x48d792){if(_0x48d792){return _0x2f4462[_0x3a82('0x1a')](_0x5f084e)[_0x3a82('0x1b')](_0x48d792);}};}function respondWithFilteredResult(_0x54cc6a,_0x3ee7a4){return function(_0x1e6232){if(_0x1e6232){var _0x5756b8=typeof _0x3ee7a4[_0x3a82('0x1c')]===_0x3a82('0x1d')&&typeof _0x3ee7a4[_0x3a82('0x1e')]===_0x3a82('0x1d');var _0x81b11e=_0x1e6232['count'];var _0x4a19ea=_0x5756b8?0x0:_0x3ee7a4[_0x3a82('0x1c')];var _0x26bf90=_0x5756b8?_0x1e6232[_0x3a82('0x1f')]:_0x3ee7a4[_0x3a82('0x1c')]+_0x3ee7a4['limit'];var _0x32ff20;if(_0x26bf90>=_0x81b11e){_0x26bf90=_0x81b11e;_0x32ff20=0xc8;}else{_0x32ff20=0xce;}_0x54cc6a[_0x3a82('0x1a')](_0x32ff20);return _0x54cc6a[_0x3a82('0x20')]('Content-Range',_0x4a19ea+'-'+_0x26bf90+'/'+_0x81b11e)['json'](_0x1e6232);}return null;};}function patchUpdates(_0x13056f){return function(_0x1a24d7){try{jsonpatch[_0x3a82('0x21')](_0x1a24d7,_0x13056f,!![]);}catch(_0x31eb05){return BPromise[_0x3a82('0x22')](_0x31eb05);}return _0x1a24d7[_0x3a82('0x23')]();};}function saveUpdates(_0x103456,_0x208137){return function(_0x2b7e88){if(_0x2b7e88){return _0x2b7e88[_0x3a82('0x24')](_0x103456)[_0x3a82('0x25')](function(_0x2de76d){return _0x2de76d;});}return null;};}function removeEntity(_0x52cb2e,_0x22ec6a){return function(_0x36bcdd){if(_0x36bcdd){return _0x36bcdd[_0x3a82('0x26')]()['then'](function(){_0x52cb2e['status'](0xcc)[_0x3a82('0x19')]();});}};}function handleEntityNotFound(_0x47dbec,_0x4580ce){return function(_0x25ed01){if(!_0x25ed01){_0x47dbec[_0x3a82('0x27')](0x194);}return _0x25ed01;};}function handleError(_0x3e91b8,_0x154d5a){_0x154d5a=_0x154d5a||0x1f4;return function(_0xa75eb6){logger[_0x3a82('0x28')](_0xa75eb6[_0x3a82('0x29')]);if(_0xa75eb6[_0x3a82('0x2a')]){delete _0xa75eb6[_0x3a82('0x2a')];}_0x3e91b8[_0x3a82('0x1a')](_0x154d5a)[_0x3a82('0x2b')](_0xa75eb6);};}exports[_0x3a82('0x2c')]=function(_0x2cc270,_0x323eb4){var _0x121940={},_0x4608da={},_0x34d96={'count':0x0,'rows':[]};var _0x5bfbb2=_[_0x3a82('0x2d')](db[_0x3a82('0x2e')]['rawAttributes'],function(_0x4dc5ce){return{'name':_0x4dc5ce[_0x3a82('0x2f')],'type':_0x4dc5ce['type']['key']};});_0x4608da[_0x3a82('0x30')]=_['map'](_0x5bfbb2,_0x3a82('0x2a'));_0x4608da['query']=_[_0x3a82('0x31')](_0x2cc270['query']);_0x4608da['filters']=_['intersection'](_0x4608da[_0x3a82('0x30')],_0x4608da['query']);_0x121940['attributes']=_[_0x3a82('0x32')](_0x4608da[_0x3a82('0x30')],qs[_0x3a82('0x33')](_0x2cc270[_0x3a82('0x34')]['fields']));_0x121940[_0x3a82('0x35')]=_0x121940[_0x3a82('0x35')][_0x3a82('0x36')]?_0x121940[_0x3a82('0x35')]:_0x4608da[_0x3a82('0x30')];if(!_0x2cc270[_0x3a82('0x34')]['hasOwnProperty'](_0x3a82('0x37'))){_0x121940[_0x3a82('0x1e')]=qs[_0x3a82('0x1e')](_0x2cc270[_0x3a82('0x34')][_0x3a82('0x1e')]);_0x121940[_0x3a82('0x1c')]=qs[_0x3a82('0x1c')](_0x2cc270[_0x3a82('0x34')][_0x3a82('0x1c')]);}_0x121940[_0x3a82('0x38')]=qs[_0x3a82('0x39')](_0x2cc270['query'][_0x3a82('0x39')]);_0x121940['where']=qs[_0x3a82('0x3a')](_[_0x3a82('0x3b')](_0x2cc270[_0x3a82('0x34')],_0x4608da[_0x3a82('0x3a')]),_0x5bfbb2);if(_0x2cc270[_0x3a82('0x34')][_0x3a82('0x3c')]){_0x121940[_0x3a82('0x3d')]=_['merge'](_0x121940['where'],{'$or':_[_0x3a82('0x2d')](_0x5bfbb2,function(_0x3a7a7a){if(_0x3a7a7a['type']!=='VIRTUAL'){var _0x11eac3={};_0x11eac3[_0x3a7a7a[_0x3a82('0x2a')]]={'$like':'%'+_0x2cc270[_0x3a82('0x34')][_0x3a82('0x3c')]+'%'};return _0x11eac3;}})});}_0x121940=_[_0x3a82('0x3e')]({},_0x121940,_0x2cc270[_0x3a82('0x3f')]);var _0x53343d={'where':_0x121940[_0x3a82('0x3d')]};return db[_0x3a82('0x2e')][_0x3a82('0x1f')](_0x53343d)[_0x3a82('0x25')](function(_0xbebb53){_0x34d96[_0x3a82('0x1f')]=_0xbebb53;if(_0x2cc270[_0x3a82('0x34')][_0x3a82('0x40')]){_0x121940[_0x3a82('0x41')]=[{'all':!![]}];}return db[_0x3a82('0x2e')][_0x3a82('0x42')](_0x121940);})[_0x3a82('0x25')](function(_0x1188e0){_0x34d96[_0x3a82('0x43')]=_0x1188e0;return _0x34d96;})[_0x3a82('0x25')](respondWithFilteredResult(_0x323eb4,_0x121940))['catch'](handleError(_0x323eb4,null));};exports[_0x3a82('0x44')]=function(_0x3fdced,_0x282bc5){var _0x22207a={'raw':!![],'where':{'id':_0x3fdced[_0x3a82('0x45')]['id']}},_0x28a122={};_0x28a122['model']=_['keys'](db[_0x3a82('0x2e')][_0x3a82('0x46')]);_0x28a122[_0x3a82('0x34')]=_[_0x3a82('0x31')](_0x3fdced[_0x3a82('0x34')]);_0x28a122[_0x3a82('0x3a')]=_['intersection'](_0x28a122[_0x3a82('0x30')],_0x28a122[_0x3a82('0x34')]);_0x22207a['attributes']=_[_0x3a82('0x32')](_0x28a122[_0x3a82('0x30')],qs[_0x3a82('0x33')](_0x3fdced['query']['fields']));_0x22207a[_0x3a82('0x35')]=_0x22207a[_0x3a82('0x35')]['length']?_0x22207a[_0x3a82('0x35')]:_0x28a122[_0x3a82('0x30')];if(_0x3fdced[_0x3a82('0x34')][_0x3a82('0x40')]){_0x22207a[_0x3a82('0x41')]=[{'all':!![]}];}_0x22207a=_[_0x3a82('0x3e')]({},_0x22207a,_0x3fdced[_0x3a82('0x3f')]);return db['FaxApplication'][_0x3a82('0x47')](_0x22207a)[_0x3a82('0x25')](handleEntityNotFound(_0x282bc5,null))[_0x3a82('0x25')](respondWithResult(_0x282bc5,null))[_0x3a82('0x48')](handleError(_0x282bc5,null));};exports[_0x3a82('0x49')]=function(_0x264bff,_0x58cd68){return db[_0x3a82('0x2e')]['create'](_0x264bff[_0x3a82('0x4a')],{})[_0x3a82('0x25')](respondWithResult(_0x58cd68,0xc9))[_0x3a82('0x48')](handleError(_0x58cd68,null));};exports[_0x3a82('0x24')]=function(_0x153bbc,_0x4b087b){if(_0x153bbc[_0x3a82('0x4a')]['id']){delete _0x153bbc[_0x3a82('0x4a')]['id'];}return db[_0x3a82('0x2e')][_0x3a82('0x47')]({'where':{'id':_0x153bbc[_0x3a82('0x45')]['id']}})['then'](handleEntityNotFound(_0x4b087b,null))[_0x3a82('0x25')](saveUpdates(_0x153bbc['body'],null))[_0x3a82('0x25')](respondWithResult(_0x4b087b,null))[_0x3a82('0x48')](handleError(_0x4b087b,null));};exports[_0x3a82('0x26')]=function(_0x5b7226,_0x49415d){return db['FaxApplication'][_0x3a82('0x47')]({'where':{'id':_0x5b7226['params']['id']}})[_0x3a82('0x25')](handleEntityNotFound(_0x49415d,null))[_0x3a82('0x25')](removeEntity(_0x49415d,null))[_0x3a82('0x48')](handleError(_0x49415d,null));}; \ No newline at end of file +var _0xfddb=['count','offset','set','Content-Range','apply','reject','save','update','then','destroy','error','stack','name','index','FaxApplication','rawAttributes','fieldName','type','map','query','keys','intersection','model','fields','attributes','length','hasOwnProperty','order','sort','where','merge','VIRTUAL','filter','options','include','rows','catch','show','params','filters','includeAll','find','create','body','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','fs-extra','lodash','squel','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','status','json','undefined','limit'];(function(_0xfae23b,_0x2be4ba){var _0x200640=function(_0x4ae258){while(--_0x4ae258){_0xfae23b['push'](_0xfae23b['shift']());}};_0x200640(++_0x2be4ba);}(_0xfddb,0x160));var _0xbfdd=function(_0x4ee6a9,_0x5eec20){_0x4ee6a9=_0x4ee6a9-0x0;var _0x188ddb=_0xfddb[_0x4ee6a9];return _0x188ddb;};'use strict';var emlformat=require(_0xbfdd('0x0'));var rimraf=require(_0xbfdd('0x1'));var zipdir=require(_0xbfdd('0x2'));var jsonpatch=require(_0xbfdd('0x3'));var rp=require(_0xbfdd('0x4'));var moment=require(_0xbfdd('0x5'));var BPromise=require(_0xbfdd('0x6'));var Mustache=require(_0xbfdd('0x7'));var util=require(_0xbfdd('0x8'));var path=require(_0xbfdd('0x9'));var sox=require(_0xbfdd('0xa'));var csv=require('to-csv');var ejs=require(_0xbfdd('0xb'));var fs=require('fs');var fs_extra=require(_0xbfdd('0xc'));var _=require(_0xbfdd('0xd'));var squel=require(_0xbfdd('0xe'));var crypto=require('crypto');var jsforce=require(_0xbfdd('0xf'));var deskjs=require(_0xbfdd('0x10'));var toCsv=require('to-csv');var querystring=require(_0xbfdd('0x11'));var Papa=require('papaparse');var Redis=require(_0xbfdd('0x12'));var authService=require(_0xbfdd('0x13'));var qs=require(_0xbfdd('0x14'));var as=require(_0xbfdd('0x15'));var hardwareService=require(_0xbfdd('0x16'));var logger=require(_0xbfdd('0x17'))('api');var utils=require(_0xbfdd('0x18'));var config=require(_0xbfdd('0x19'));var licenseUtil=require('../../config/license/util');var db=require(_0xbfdd('0x1a'))['db'];function respondWithStatusCode(_0x5403d0,_0x4b0cd9){_0x4b0cd9=_0x4b0cd9||0xcc;return function(_0x597aa2){if(_0x597aa2){return _0x5403d0[_0xbfdd('0x1b')](_0x4b0cd9);}return _0x5403d0['status'](_0x4b0cd9)[_0xbfdd('0x1c')]();};}function respondWithResult(_0x3afa3b,_0x36cdcc){_0x36cdcc=_0x36cdcc||0xc8;return function(_0x2f902d){if(_0x2f902d){return _0x3afa3b[_0xbfdd('0x1d')](_0x36cdcc)[_0xbfdd('0x1e')](_0x2f902d);}};}function respondWithFilteredResult(_0x2b57a4,_0x4ef78a){return function(_0x20a106){if(_0x20a106){var _0x22fd6c=typeof _0x4ef78a['offset']===_0xbfdd('0x1f')&&typeof _0x4ef78a[_0xbfdd('0x20')]===_0xbfdd('0x1f');var _0x1f4d5e=_0x20a106[_0xbfdd('0x21')];var _0x3eba4e=_0x22fd6c?0x0:_0x4ef78a[_0xbfdd('0x22')];var _0x1f8369=_0x22fd6c?_0x20a106[_0xbfdd('0x21')]:_0x4ef78a[_0xbfdd('0x22')]+_0x4ef78a[_0xbfdd('0x20')];var _0x35ec72;if(_0x1f8369>=_0x1f4d5e){_0x1f8369=_0x1f4d5e;_0x35ec72=0xc8;}else{_0x35ec72=0xce;}_0x2b57a4[_0xbfdd('0x1d')](_0x35ec72);return _0x2b57a4[_0xbfdd('0x23')](_0xbfdd('0x24'),_0x3eba4e+'-'+_0x1f8369+'/'+_0x1f4d5e)[_0xbfdd('0x1e')](_0x20a106);}return null;};}function patchUpdates(_0x31296d){return function(_0x38e7cc){try{jsonpatch[_0xbfdd('0x25')](_0x38e7cc,_0x31296d,!![]);}catch(_0x5b5b1b){return BPromise[_0xbfdd('0x26')](_0x5b5b1b);}return _0x38e7cc[_0xbfdd('0x27')]();};}function saveUpdates(_0x2102a2,_0x26b555){return function(_0x497b63){if(_0x497b63){return _0x497b63[_0xbfdd('0x28')](_0x2102a2)[_0xbfdd('0x29')](function(_0xfb73e5){return _0xfb73e5;});}return null;};}function removeEntity(_0xd6b8ad,_0x14d37e){return function(_0x23a87a){if(_0x23a87a){return _0x23a87a[_0xbfdd('0x2a')]()['then'](function(){_0xd6b8ad['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x38130e,_0x1c17d3){return function(_0xf15141){if(!_0xf15141){_0x38130e['sendStatus'](0x194);}return _0xf15141;};}function handleError(_0x2e541d,_0x460204){_0x460204=_0x460204||0x1f4;return function(_0x3e985e){logger[_0xbfdd('0x2b')](_0x3e985e[_0xbfdd('0x2c')]);if(_0x3e985e['name']){delete _0x3e985e[_0xbfdd('0x2d')];}_0x2e541d[_0xbfdd('0x1d')](_0x460204)['send'](_0x3e985e);};}exports[_0xbfdd('0x2e')]=function(_0x483263,_0x4e66c2){var _0x509a25={},_0x301210={},_0x5a8dd8={'count':0x0,'rows':[]};var _0x5e1606=_['map'](db[_0xbfdd('0x2f')][_0xbfdd('0x30')],function(_0x3f141b){return{'name':_0x3f141b[_0xbfdd('0x31')],'type':_0x3f141b[_0xbfdd('0x32')]['key']};});_0x301210['model']=_[_0xbfdd('0x33')](_0x5e1606,_0xbfdd('0x2d'));_0x301210[_0xbfdd('0x34')]=_[_0xbfdd('0x35')](_0x483263[_0xbfdd('0x34')]);_0x301210['filters']=_[_0xbfdd('0x36')](_0x301210['model'],_0x301210[_0xbfdd('0x34')]);_0x509a25['attributes']=_[_0xbfdd('0x36')](_0x301210[_0xbfdd('0x37')],qs[_0xbfdd('0x38')](_0x483263[_0xbfdd('0x34')][_0xbfdd('0x38')]));_0x509a25[_0xbfdd('0x39')]=_0x509a25[_0xbfdd('0x39')][_0xbfdd('0x3a')]?_0x509a25[_0xbfdd('0x39')]:_0x301210[_0xbfdd('0x37')];if(!_0x483263[_0xbfdd('0x34')][_0xbfdd('0x3b')]('nolimit')){_0x509a25[_0xbfdd('0x20')]=qs[_0xbfdd('0x20')](_0x483263[_0xbfdd('0x34')]['limit']);_0x509a25['offset']=qs[_0xbfdd('0x22')](_0x483263[_0xbfdd('0x34')][_0xbfdd('0x22')]);}_0x509a25[_0xbfdd('0x3c')]=qs[_0xbfdd('0x3d')](_0x483263['query'][_0xbfdd('0x3d')]);_0x509a25[_0xbfdd('0x3e')]=qs['filters'](_['pick'](_0x483263['query'],_0x301210['filters']),_0x5e1606);if(_0x483263['query']['filter']){_0x509a25[_0xbfdd('0x3e')]=_[_0xbfdd('0x3f')](_0x509a25[_0xbfdd('0x3e')],{'$or':_[_0xbfdd('0x33')](_0x5e1606,function(_0x8b0513){if(_0x8b0513[_0xbfdd('0x32')]!==_0xbfdd('0x40')){var _0x180a86={};_0x180a86[_0x8b0513[_0xbfdd('0x2d')]]={'$like':'%'+_0x483263['query'][_0xbfdd('0x41')]+'%'};return _0x180a86;}})});}_0x509a25=_[_0xbfdd('0x3f')]({},_0x509a25,_0x483263[_0xbfdd('0x42')]);var _0x4054a3={'where':_0x509a25[_0xbfdd('0x3e')]};return db[_0xbfdd('0x2f')][_0xbfdd('0x21')](_0x4054a3)[_0xbfdd('0x29')](function(_0x5ec188){_0x5a8dd8['count']=_0x5ec188;if(_0x483263[_0xbfdd('0x34')]['includeAll']){_0x509a25[_0xbfdd('0x43')]=[{'all':!![]}];}return db[_0xbfdd('0x2f')]['findAll'](_0x509a25);})[_0xbfdd('0x29')](function(_0x23868f){_0x5a8dd8[_0xbfdd('0x44')]=_0x23868f;return _0x5a8dd8;})['then'](respondWithFilteredResult(_0x4e66c2,_0x509a25))[_0xbfdd('0x45')](handleError(_0x4e66c2,null));};exports[_0xbfdd('0x46')]=function(_0x18c0ed,_0x3cbfd5){var _0x540776={'raw':!![],'where':{'id':_0x18c0ed[_0xbfdd('0x47')]['id']}},_0x129b09={};_0x129b09[_0xbfdd('0x37')]=_[_0xbfdd('0x35')](db[_0xbfdd('0x2f')][_0xbfdd('0x30')]);_0x129b09['query']=_[_0xbfdd('0x35')](_0x18c0ed['query']);_0x129b09[_0xbfdd('0x48')]=_['intersection'](_0x129b09[_0xbfdd('0x37')],_0x129b09[_0xbfdd('0x34')]);_0x540776[_0xbfdd('0x39')]=_['intersection'](_0x129b09['model'],qs[_0xbfdd('0x38')](_0x18c0ed['query'][_0xbfdd('0x38')]));_0x540776[_0xbfdd('0x39')]=_0x540776[_0xbfdd('0x39')]['length']?_0x540776['attributes']:_0x129b09[_0xbfdd('0x37')];if(_0x18c0ed['query'][_0xbfdd('0x49')]){_0x540776[_0xbfdd('0x43')]=[{'all':!![]}];}_0x540776=_[_0xbfdd('0x3f')]({},_0x540776,_0x18c0ed[_0xbfdd('0x42')]);return db[_0xbfdd('0x2f')][_0xbfdd('0x4a')](_0x540776)[_0xbfdd('0x29')](handleEntityNotFound(_0x3cbfd5,null))[_0xbfdd('0x29')](respondWithResult(_0x3cbfd5,null))[_0xbfdd('0x45')](handleError(_0x3cbfd5,null));};exports[_0xbfdd('0x4b')]=function(_0x1b639b,_0xa72dcf){return db[_0xbfdd('0x2f')]['create'](_0x1b639b[_0xbfdd('0x4c')],{})[_0xbfdd('0x29')](respondWithResult(_0xa72dcf,0xc9))[_0xbfdd('0x45')](handleError(_0xa72dcf,null));};exports[_0xbfdd('0x28')]=function(_0xe1468d,_0x53113f){if(_0xe1468d[_0xbfdd('0x4c')]['id']){delete _0xe1468d['body']['id'];}return db[_0xbfdd('0x2f')][_0xbfdd('0x4a')]({'where':{'id':_0xe1468d[_0xbfdd('0x47')]['id']}})[_0xbfdd('0x29')](handleEntityNotFound(_0x53113f,null))['then'](saveUpdates(_0xe1468d[_0xbfdd('0x4c')],null))['then'](respondWithResult(_0x53113f,null))['catch'](handleError(_0x53113f,null));};exports[_0xbfdd('0x2a')]=function(_0x137f3a,_0x975d7e){return db[_0xbfdd('0x2f')]['find']({'where':{'id':_0x137f3a[_0xbfdd('0x47')]['id']}})[_0xbfdd('0x29')](handleEntityNotFound(_0x975d7e,null))['then'](removeEntity(_0x975d7e,null))[_0xbfdd('0x45')](handleError(_0x975d7e,null));}; \ No newline at end of file diff --git a/server/api/faxApplication/faxApplication.model.js b/server/api/faxApplication/faxApplication.model.js index a05c54f..a4ce8e5 100644 --- a/server/api/faxApplication/faxApplication.model.js +++ b/server/api/faxApplication/faxApplication.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6eaf=['utf8mb4','utf8mb4_unicode_ci','lodash','util','moment','bluebird','request-promise','path','rimraf','./faxApplication.attributes','define','FaxApplication','fax_applications'];(function(_0x405f76,_0x1b973c){var _0xa529d2=function(_0x194e50){while(--_0x194e50){_0x405f76['push'](_0x405f76['shift']());}};_0xa529d2(++_0x1b973c);}(_0x6eaf,0x147));var _0xf6ea=function(_0x2ce963,_0x11c5e5){_0x2ce963=_0x2ce963-0x0;var _0x1478ef=_0x6eaf[_0x2ce963];return _0x1478ef;};'use strict';var _=require(_0xf6ea('0x0'));var util=require(_0xf6ea('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0xf6ea('0x2'));var BPromise=require(_0xf6ea('0x3'));var rp=require(_0xf6ea('0x4'));var fs=require('fs');var path=require(_0xf6ea('0x5'));var rimraf=require(_0xf6ea('0x6'));var config=require('../../config/environment');var attributes=require(_0xf6ea('0x7'));module['exports']=function(_0x255011,_0x224c9d){return _0x255011[_0xf6ea('0x8')](_0xf6ea('0x9'),attributes,{'tableName':_0xf6ea('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xf6ea('0xb'),'collate':_0xf6ea('0xc')});}; \ No newline at end of file +var _0x6b43=['utf8mb4','lodash','../../config/logger','moment','bluebird','path','./faxApplication.attributes','exports','FaxApplication','fax_applications'];(function(_0x542d22,_0x52bc54){var _0x4278a6=function(_0xe7ef82){while(--_0xe7ef82){_0x542d22['push'](_0x542d22['shift']());}};_0x4278a6(++_0x52bc54);}(_0x6b43,0x8d));var _0x36b4=function(_0x13c4a6,_0x4041d9){_0x13c4a6=_0x13c4a6-0x0;var _0x5b1eeb=_0x6b43[_0x13c4a6];return _0x5b1eeb;};'use strict';var _=require(_0x36b4('0x0'));var util=require('util');var logger=require(_0x36b4('0x1'))('api');var moment=require(_0x36b4('0x2'));var BPromise=require(_0x36b4('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x36b4('0x4'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x36b4('0x5'));module[_0x36b4('0x6')]=function(_0x459732,_0x3f74b1){return _0x459732['define'](_0x36b4('0x7'),attributes,{'tableName':_0x36b4('0x8'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x36b4('0x9'),'collate':'utf8mb4_unicode_ci'});}; \ No newline at end of file diff --git a/server/api/faxApplication/faxApplication.rpc.js b/server/api/faxApplication/faxApplication.rpc.js index 0bf8cec..c7d5b1e 100644 --- a/server/api/faxApplication/faxApplication.rpc.js +++ b/server/api/faxApplication/faxApplication.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xcff4=['rpc','../../config/environment','jayson/promise','client','http','request','then','info','FaxApplication,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','result','catch','UpdateFaxApplication','FaxApplication','options','where','attributes','limit','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0x1db93a,_0x30824d){var _0x1ec4e6=function(_0xf4f596){while(--_0xf4f596){_0x1db93a['push'](_0x1db93a['shift']());}};_0x1ec4e6(++_0x30824d);}(_0xcff4,0x6d));var _0x4cff=function(_0x44e62b,_0x53f9f){_0x44e62b=_0x44e62b-0x0;var _0x5080a5=_0xcff4[_0x44e62b];return _0x5080a5;};'use strict';var _=require(_0x4cff('0x0'));var util=require(_0x4cff('0x1'));var moment=require(_0x4cff('0x2'));var BPromise=require(_0x4cff('0x3'));var rs=require(_0x4cff('0x4'));var fs=require('fs');var Redis=require(_0x4cff('0x5'));var db=require(_0x4cff('0x6'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x4cff('0x7'));var config=require(_0x4cff('0x8'));var jayson=require(_0x4cff('0x9'));var client=jayson[_0x4cff('0xa')][_0x4cff('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x46fe22,_0x5e2871,_0xe0648a){return new BPromise(function(_0x28ac97,_0x11554e){return client[_0x4cff('0xc')](_0x46fe22,_0xe0648a)[_0x4cff('0xd')](function(_0x3133dc){logger[_0x4cff('0xe')](_0x4cff('0xf'),_0x5e2871,_0x4cff('0x10'));logger[_0x4cff('0x11')]('FaxApplication,\x20%s,\x20%s,\x20%s',_0x5e2871,_0x4cff('0x10'),JSON[_0x4cff('0x12')](_0x3133dc));if(_0x3133dc[_0x4cff('0x13')]){if(_0x3133dc[_0x4cff('0x13')]['code']===0x1f4){logger[_0x4cff('0x13')]('FaxApplication,\x20%s,\x20%s',_0x5e2871,_0x3133dc[_0x4cff('0x13')][_0x4cff('0x14')]);return _0x11554e(_0x3133dc['error']['message']);}logger['error'](_0x4cff('0xf'),_0x5e2871,_0x3133dc[_0x4cff('0x13')][_0x4cff('0x14')]);return _0x28ac97(_0x3133dc[_0x4cff('0x13')][_0x4cff('0x14')]);}else{logger[_0x4cff('0xe')]('FaxApplication,\x20%s,\x20%s',_0x5e2871,_0x4cff('0x10'));_0x28ac97(_0x3133dc[_0x4cff('0x15')][_0x4cff('0x14')]);}})[_0x4cff('0x16')](function(_0x4016bc){logger['error'](_0x4cff('0xf'),_0x5e2871,_0x4016bc);_0x11554e(_0x4016bc);});});}exports[_0x4cff('0x17')]=function(_0x21fa9e){var _0x172446=this;return new Promise(function(_0x50b995,_0x2ac74d){return db[_0x4cff('0x18')]['update'](_0x21fa9e['body'],{'raw':_0x21fa9e[_0x4cff('0x19')]?_0x21fa9e[_0x4cff('0x19')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x21fa9e[_0x4cff('0x19')]?_0x21fa9e[_0x4cff('0x19')][_0x4cff('0x1a')]||null:null,'attributes':_0x21fa9e[_0x4cff('0x19')]?_0x21fa9e['options'][_0x4cff('0x1b')]||null:null,'limit':_0x21fa9e[_0x4cff('0x19')]?_0x21fa9e[_0x4cff('0x19')][_0x4cff('0x1c')]||null:null})[_0x4cff('0xd')](function(_0xc9f5de){logger[_0x4cff('0xe')](_0x4cff('0x17'),_0x21fa9e);logger[_0x4cff('0x11')](_0x4cff('0x17'),_0x21fa9e,JSON['stringify'](_0xc9f5de));_0x50b995(_0xc9f5de);})[_0x4cff('0x16')](function(_0x4d55c9){logger[_0x4cff('0x13')](_0x4cff('0x17'),_0x4d55c9[_0x4cff('0x14')],_0x21fa9e);_0x2ac74d(_0x172446['error'](0x1f4,_0x4d55c9['message']));});});}; \ No newline at end of file +var _0x11b7=['code','message','result','catch','FaxApplication','update','body','options','raw','where','attributes','limit','UpdateFaxApplication','bluebird','../../mysqldb','../../config/utils','rpc','../../config/environment','client','http','request','then','info','FaxApplication,\x20%s,\x20%s','request\x20sent','debug','FaxApplication,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x2d6608,_0x5cdc0f){var _0x73a6cc=function(_0x44fc6c){while(--_0x44fc6c){_0x2d6608['push'](_0x2d6608['shift']());}};_0x73a6cc(++_0x5cdc0f);}(_0x11b7,0x12f));var _0x711b=function(_0x310b6f,_0x839ec3){_0x310b6f=_0x310b6f-0x0;var _0x36182d=_0x11b7[_0x310b6f];return _0x36182d;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require(_0x711b('0x0'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x711b('0x1'))['db'];var utils=require(_0x711b('0x2'));var logger=require('../../config/logger')(_0x711b('0x3'));var config=require(_0x711b('0x4'));var jayson=require('jayson/promise');var client=jayson[_0x711b('0x5')][_0x711b('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x49acc9,_0x4da79a,_0x504eca){return new BPromise(function(_0x2ef3d0,_0xe91f13){return client[_0x711b('0x7')](_0x49acc9,_0x504eca)[_0x711b('0x8')](function(_0x432f72){logger[_0x711b('0x9')](_0x711b('0xa'),_0x4da79a,_0x711b('0xb'));logger[_0x711b('0xc')](_0x711b('0xd'),_0x4da79a,_0x711b('0xb'),JSON[_0x711b('0xe')](_0x432f72));if(_0x432f72[_0x711b('0xf')]){if(_0x432f72[_0x711b('0xf')][_0x711b('0x10')]===0x1f4){logger['error']('FaxApplication,\x20%s,\x20%s',_0x4da79a,_0x432f72[_0x711b('0xf')][_0x711b('0x11')]);return _0xe91f13(_0x432f72[_0x711b('0xf')]['message']);}logger[_0x711b('0xf')](_0x711b('0xa'),_0x4da79a,_0x432f72['error'][_0x711b('0x11')]);return _0x2ef3d0(_0x432f72[_0x711b('0xf')]['message']);}else{logger[_0x711b('0x9')](_0x711b('0xa'),_0x4da79a,_0x711b('0xb'));_0x2ef3d0(_0x432f72[_0x711b('0x12')][_0x711b('0x11')]);}})[_0x711b('0x13')](function(_0x3e72b0){logger[_0x711b('0xf')](_0x711b('0xa'),_0x4da79a,_0x3e72b0);_0xe91f13(_0x3e72b0);});});}exports['UpdateFaxApplication']=function(_0x4018d2){var _0xd60d64=this;return new Promise(function(_0x27db72,_0x455d58){return db[_0x711b('0x14')][_0x711b('0x15')](_0x4018d2[_0x711b('0x16')],{'raw':_0x4018d2['options']?_0x4018d2[_0x711b('0x17')][_0x711b('0x18')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x4018d2[_0x711b('0x17')]?_0x4018d2[_0x711b('0x17')][_0x711b('0x19')]||null:null,'attributes':_0x4018d2[_0x711b('0x17')]?_0x4018d2['options'][_0x711b('0x1a')]||null:null,'limit':_0x4018d2['options']?_0x4018d2[_0x711b('0x17')][_0x711b('0x1b')]||null:null})[_0x711b('0x8')](function(_0x59f9ec){logger[_0x711b('0x9')](_0x711b('0x1c'),_0x4018d2);logger['debug'](_0x711b('0x1c'),_0x4018d2,JSON[_0x711b('0xe')](_0x59f9ec));_0x27db72(_0x59f9ec);})['catch'](function(_0x26a94a){logger[_0x711b('0xf')](_0x711b('0x1c'),_0x26a94a[_0x711b('0x11')],_0x4018d2);_0x455d58(_0xd60d64[_0x711b('0xf')](0x1f4,_0x26a94a[_0x711b('0x11')]));});});}; \ No newline at end of file diff --git a/server/api/faxApplication/index.js b/server/api/faxApplication/index.js index cc0cc80..8c29c75 100644 --- a/server/api/faxApplication/index.js +++ b/server/api/faxApplication/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0abf=['isAuthenticated','index','show','post','put','/:id','destroy','exports','multer','path','connect-timeout','fs-extra','../../components/interaction/service','../../config/environment','./faxApplication.controller','get'];(function(_0x12fc8d,_0x19ee33){var _0x3f9d04=function(_0x52e51c){while(--_0x52e51c){_0x12fc8d['push'](_0x12fc8d['shift']());}};_0x3f9d04(++_0x19ee33);}(_0x0abf,0xe8));var _0xf0ab=function(_0x3947c9,_0x4d6c97){_0x3947c9=_0x3947c9-0x0;var _0x2e7871=_0x0abf[_0x3947c9];return _0x2e7871;};'use strict';var multer=require(_0xf0ab('0x0'));var util=require('util');var path=require(_0xf0ab('0x1'));var timeout=require(_0xf0ab('0x2'));var express=require('express');var router=express['Router']();var fs_extra=require(_0xf0ab('0x3'));var auth=require('../../components/auth/service');var interaction=require(_0xf0ab('0x4'));var config=require(_0xf0ab('0x5'));var controller=require(_0xf0ab('0x6'));router[_0xf0ab('0x7')]('/',auth[_0xf0ab('0x8')](),controller[_0xf0ab('0x9')]);router[_0xf0ab('0x7')]('/:id',auth[_0xf0ab('0x8')](),controller[_0xf0ab('0xa')]);router[_0xf0ab('0xb')]('/',auth[_0xf0ab('0x8')](),controller['create']);router[_0xf0ab('0xc')](_0xf0ab('0xd'),auth[_0xf0ab('0x8')](),controller['update']);router['delete'](_0xf0ab('0xd'),auth['isAuthenticated'](),controller[_0xf0ab('0xe')]);module[_0xf0ab('0xf')]=router; \ No newline at end of file +var _0xac4a=['express','Router','../../components/interaction/service','../../config/environment','./faxApplication.controller','isAuthenticated','get','show','create','/:id','delete','destroy','exports','multer','util','path','connect-timeout'];(function(_0x1b7d53,_0xee7979){var _0x30727a=function(_0x5be362){while(--_0x5be362){_0x1b7d53['push'](_0x1b7d53['shift']());}};_0x30727a(++_0xee7979);}(_0xac4a,0x13f));var _0xaac4=function(_0x58ccef,_0x59d52a){_0x58ccef=_0x58ccef-0x0;var _0x2a22f7=_0xac4a[_0x58ccef];return _0x2a22f7;};'use strict';var multer=require(_0xaac4('0x0'));var util=require(_0xaac4('0x1'));var path=require(_0xaac4('0x2'));var timeout=require(_0xaac4('0x3'));var express=require(_0xaac4('0x4'));var router=express[_0xaac4('0x5')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0xaac4('0x6'));var config=require(_0xaac4('0x7'));var controller=require(_0xaac4('0x8'));router['get']('/',auth[_0xaac4('0x9')](),controller['index']);router[_0xaac4('0xa')]('/:id',auth[_0xaac4('0x9')](),controller[_0xaac4('0xb')]);router['post']('/',auth['isAuthenticated'](),controller[_0xaac4('0xc')]);router['put'](_0xaac4('0xd'),auth['isAuthenticated'](),controller['update']);router[_0xaac4('0xe')](_0xaac4('0xd'),auth[_0xaac4('0x9')](),controller[_0xaac4('0xf')]);module[_0xaac4('0x10')]=router; \ No newline at end of file diff --git a/server/api/faxInteraction/faxInteraction.attributes.js b/server/api/faxInteraction/faxInteraction.attributes.js index 30dac4c..d51a59f 100644 --- a/server/api/faxInteraction/faxInteraction.attributes.js +++ b/server/api/faxInteraction/faxInteraction.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4a95=['out','exports','BOOLEAN','DATE','STRING','ENUM'];(function(_0x5b561d,_0x422b7c){var _0x431060=function(_0x401409){while(--_0x401409){_0x5b561d['push'](_0x5b561d['shift']());}};_0x431060(++_0x422b7c);}(_0x4a95,0x91));var _0x54a9=function(_0x432682,_0x253044){_0x432682=_0x432682-0x0;var _0x463d05=_0x4a95[_0x432682];return _0x463d05;};'use strict';var Sequelize=require('sequelize');module[_0x54a9('0x0')]={'closed':{'type':Sequelize[_0x54a9('0x1')],'defaultValue':![]},'closedAt':{'type':Sequelize[_0x54a9('0x2')]},'disposition':{'type':Sequelize[_0x54a9('0x3')]},'secondDisposition':{'type':Sequelize['STRING']},'thirdDisposition':{'type':Sequelize[_0x54a9('0x3')]},'note':{'type':Sequelize[_0x54a9('0x3')]},'read1stAt':{'type':Sequelize[_0x54a9('0x2')]},'fax':{'type':Sequelize['STRING']},'firstMsgDirection':{'type':Sequelize['ENUM']('in','out'),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize[_0x54a9('0x2')]},'lastMsgDirection':{'type':Sequelize[_0x54a9('0x4')]('in',_0x54a9('0x5')),'defaultValue':'in','allowNull':![]}}; \ No newline at end of file +var _0xceed=['STRING','ENUM','out','exports','BOOLEAN','DATE'];(function(_0x525c7b,_0x488fcc){var _0x27b33e=function(_0x56d43b){while(--_0x56d43b){_0x525c7b['push'](_0x525c7b['shift']());}};_0x27b33e(++_0x488fcc);}(_0xceed,0x177));var _0xdcee=function(_0x117f4c,_0x36a9b1){_0x117f4c=_0x117f4c-0x0;var _0x2b24e9=_0xceed[_0x117f4c];return _0x2b24e9;};'use strict';var Sequelize=require('sequelize');module[_0xdcee('0x0')]={'closed':{'type':Sequelize[_0xdcee('0x1')],'defaultValue':![]},'closedAt':{'type':Sequelize[_0xdcee('0x2')]},'disposition':{'type':Sequelize[_0xdcee('0x3')]},'secondDisposition':{'type':Sequelize['STRING']},'thirdDisposition':{'type':Sequelize[_0xdcee('0x3')]},'note':{'type':Sequelize[_0xdcee('0x3')]},'read1stAt':{'type':Sequelize[_0xdcee('0x2')]},'fax':{'type':Sequelize[_0xdcee('0x3')]},'firstMsgDirection':{'type':Sequelize[_0xdcee('0x4')]('in',_0xdcee('0x5')),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize[_0xdcee('0x2')]},'lastMsgDirection':{'type':Sequelize[_0xdcee('0x4')]('in','out'),'defaultValue':'in','allowNull':![]}}; \ No newline at end of file diff --git a/server/api/faxInteraction/faxInteraction.controller.js b/server/api/faxInteraction/faxInteraction.controller.js index c8a8f0b..4cd6f53 100644 --- a/server/api/faxInteraction/faxInteraction.controller.js +++ b/server/api/faxInteraction/faxInteraction.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8b07=['Contact.firstName','Contact.lastName','c.email','c.phone','Contact.phone','c.mobile','Contact.mobile','c.fax','Contact.fax','o.fullname','Owner.fullname','o.internal','Owner.internal','GROUP_CONCAT(DISTINCT\x20t.id)','groupBy','FaxInteractionId','all','rows','show','params','includeAll','create','describe','addMessage','FaxMessage','omit','ids','getMessages','findOne','YYYY-MM-DD\x20HH:mm:ss','options','addTags','setTags','spread','findAll','emit','faxInteractionTags:save','removeTags','download','unix','root','tmp','join','server','files','attachments','format','Attachment','Messages','get','basename','createWriteStream','log','err','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','redis','defaults','localhost','./faxInteraction.socket','register','sendStatus','status','json','offset','undefined','limit','count','set','save','update','then','name','send','Users','fullname','TagIds','Tags','split','push','catch','index','map','FaxInteraction','rawAttributes','type','key','query','keys','filters','intersection','attributes','model','fields','length','hasOwnProperty','nolimit','sort','where','pick','select','field','color','from','tools_tags','u.id','u.fullname','ui.FaxInteractionId','user_has_fax_interactions','left_join','users','fax_interactions','cm_contacts','o.id\x20=\x20i.UserId','fax_messages','me.FaxInteractionId\x20=\x20i.id','expr','search','parseSearch','sqlOperator','conditions','find','unreadMessages','value','`\x20=\x200','having','`\x20>\x200','Contact','$substring','c.firstName\x20LIKE\x20?\x20OR\x20c.lastName\x20LIKE\x20?\x20OR\x20c.email\x20LIKE\x20?','ContactId','buildExpression','text','start','union','User','operator','CONCAT_WS(\x27\x20\x27,\x20o.name,\x20o.fullname)\x20LIKE\x20?','UserId','body','end','some','compact','isEmpty','forEach','FaxAccountId','i.FaxAccountId\x20IN\x20?','concat','createdAt','parse','$gte','$lte','null','\x20IS\x20NULL','read','`unreadMessages`\x20=\x200','tag','isArray','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','filter','replace','isNumeric','i.id\x20LIKE\x20?','i.fax\x20LIKE\x20?','CONCAT(c.firstName,\x20\x27\x20\x27,\x20c.lastName)\x20LIKE\x20?','group','i.id','Sequelize','SELECT','SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)','order','contactName','DESC','resolve','i.FaxAccountId\x20IS\x20NOT\x20NULL','user','role','agent','getFaxAccounts','i.FaxAccountId\x20IS\x20NULL','sequelize','toString','keyBy','merge','a.key','Account.key','Account.mandatoryDisposition','i.*','c.firstName'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x8b07,0x108));var _0x78b0=function(_0x53c766,_0x468a3c){_0x53c766=_0x53c766-0x0;var _0x51e224=_0x8b07[_0x53c766];return _0x51e224;};'use strict';var emlformat=require(_0x78b0('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x78b0('0x1'));var jsonpatch=require(_0x78b0('0x2'));var rp=require(_0x78b0('0x3'));var moment=require(_0x78b0('0x4'));var BPromise=require(_0x78b0('0x5'));var Mustache=require('mustache');var util=require(_0x78b0('0x6'));var path=require(_0x78b0('0x7'));var sox=require(_0x78b0('0x8'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x78b0('0x9'));var _=require(_0x78b0('0xa'));var squel=require(_0x78b0('0xb'));var crypto=require(_0x78b0('0xc'));var jsforce=require(_0x78b0('0xd'));var deskjs=require(_0x78b0('0xe'));var toCsv=require('to-csv');var querystring=require(_0x78b0('0xf'));var Papa=require(_0x78b0('0x10'));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(_0x78b0('0x11'));var logger=require(_0x78b0('0x12'))(_0x78b0('0x13'));var utils=require(_0x78b0('0x14'));var config=require(_0x78b0('0x15'));var licenseUtil=require(_0x78b0('0x16'));var db=require('../../mysqldb')['db'];config[_0x78b0('0x17')]=_[_0x78b0('0x18')](config['redis'],{'host':_0x78b0('0x19'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x78b0('0x17')]));require(_0x78b0('0x1a'))[_0x78b0('0x1b')](socket);function respondWithStatusCode(_0x246cc8,_0x2be5b0){_0x2be5b0=_0x2be5b0||0xcc;return function(_0x21b1c4){if(_0x21b1c4){return _0x246cc8[_0x78b0('0x1c')](_0x2be5b0);}return _0x246cc8[_0x78b0('0x1d')](_0x2be5b0)['end']();};}function respondWithResult(_0x3bb50c,_0x2a4177){_0x2a4177=_0x2a4177||0xc8;return function(_0x5a7d5d){if(_0x5a7d5d){return _0x3bb50c[_0x78b0('0x1d')](_0x2a4177)[_0x78b0('0x1e')](_0x5a7d5d);}};}function respondWithFilteredResult(_0x189ba0,_0x1d79e3){return function(_0x216fe6){if(_0x216fe6){var _0xef7297=typeof _0x1d79e3[_0x78b0('0x1f')]===_0x78b0('0x20')&&typeof _0x1d79e3[_0x78b0('0x21')]===_0x78b0('0x20');var _0x27fb5f=_0x216fe6[_0x78b0('0x22')];var _0x19d3b8=_0xef7297?0x0:_0x1d79e3['offset'];var _0x290f4b=_0xef7297?_0x216fe6['count']:_0x1d79e3[_0x78b0('0x1f')]+_0x1d79e3[_0x78b0('0x21')];var _0x876fb4;if(_0x290f4b>=_0x27fb5f){_0x290f4b=_0x27fb5f;_0x876fb4=0xc8;}else{_0x876fb4=0xce;}_0x189ba0[_0x78b0('0x1d')](_0x876fb4);return _0x189ba0[_0x78b0('0x23')]('Content-Range',_0x19d3b8+'-'+_0x290f4b+'/'+_0x27fb5f)[_0x78b0('0x1e')](_0x216fe6);}return null;};}function patchUpdates(_0x3f04c8){return function(_0x208d7e){try{jsonpatch['apply'](_0x208d7e,_0x3f04c8,!![]);}catch(_0x5e2806){return BPromise['reject'](_0x5e2806);}return _0x208d7e[_0x78b0('0x24')]();};}function saveUpdates(_0x5f6569,_0x13b38c){return function(_0x59124e){if(_0x59124e){return _0x59124e[_0x78b0('0x25')](_0x5f6569)['then'](function(_0x448465){return _0x448465;});}return null;};}function removeEntity(_0x327a5f,_0x56f84e){return function(_0x2ca62d){if(_0x2ca62d){return _0x2ca62d['destroy']()[_0x78b0('0x26')](function(){_0x327a5f[_0x78b0('0x1d')](0xcc)['end']();});}};}function handleEntityNotFound(_0x1e4d5c,_0x2d229b){return function(_0x831a7d){if(!_0x831a7d){_0x1e4d5c[_0x78b0('0x1c')](0x194);}return _0x831a7d;};}function handleError(_0x214386,_0x1337d1){_0x1337d1=_0x1337d1||0x1f4;return function(_0x40c20a){logger['error'](_0x40c20a['stack']);if(_0x40c20a[_0x78b0('0x27')]){delete _0x40c20a[_0x78b0('0x27')];}_0x214386[_0x78b0('0x1d')](_0x1337d1)[_0x78b0('0x28')](_0x40c20a);};}function getInteractionUsers(_0x281850,_0x11a050){return new BPromise(function(_0x1f07db,_0x642fe5){try{if(_0x11a050[_0x281850['id']]){_0x281850[_0x78b0('0x29')]=_['map'](_0x11a050[_0x281850['id']],function(_0x16cf21){return{'id':_0x16cf21['id'],'fullname':_0x16cf21[_0x78b0('0x2a')]};});}}catch(_0xe1c803){_0x642fe5(_0xe1c803);}_0x1f07db(_0x281850);});}function getInteractionTags(_0x208154,_0x2949f4){return new BPromise(function(_0x31a430,_0x5c53ea){try{if(_0x208154[_0x78b0('0x2b')]){_0x208154[_0x78b0('0x2c')]=[];_0x208154[_0x78b0('0x2b')][_0x78b0('0x2d')](',')['forEach'](function(_0x409b8c){_0x208154[_0x78b0('0x2c')][_0x78b0('0x2e')](_0x2949f4[_0x409b8c]);});}delete _0x208154['TagIds'];}catch(_0x58eb28){_0x5c53ea(_0x58eb28);}_0x31a430(_0x208154);});}function updateFaxInteraction(_0x2ac791,_0x5c85fd,_0x5689c0){return new BPromise(function(_0x2f217c,_0x333324){return getInteractionUsers(_0x2ac791,_0x5689c0)[_0x78b0('0x26')](function(_0x18ecde){return getInteractionTags(_0x18ecde,_0x5c85fd);})[_0x78b0('0x26')](function(_0x103741){_0x2f217c(_0x103741);})[_0x78b0('0x2f')](function(_0x1cd72c){_0x333324(_0x1cd72c);});});}exports[_0x78b0('0x30')]=function(_0x1c7651,_0x3e51d8){var _0x138b01={},_0x2d3849={},_0x1f9bed={'count':0x0,'rows':[]};var _0x2d0d5e=_[_0x78b0('0x31')](db[_0x78b0('0x32')][_0x78b0('0x33')],function(_0x1fc847){return{'name':_0x1fc847['fieldName'],'type':_0x1fc847[_0x78b0('0x34')][_0x78b0('0x35')]};});_0x2d3849['model']=_['map'](_0x2d0d5e,_0x78b0('0x27'));_0x2d3849[_0x78b0('0x36')]=_[_0x78b0('0x37')](_0x1c7651['query']);_0x2d3849[_0x78b0('0x38')]=_[_0x78b0('0x39')](_0x2d3849['model'],_0x2d3849[_0x78b0('0x36')]);_0x138b01[_0x78b0('0x3a')]=_[_0x78b0('0x39')](_0x2d3849[_0x78b0('0x3b')],qs[_0x78b0('0x3c')](_0x1c7651[_0x78b0('0x36')][_0x78b0('0x3c')]));_0x138b01[_0x78b0('0x3a')]=_0x138b01[_0x78b0('0x3a')][_0x78b0('0x3d')]?_0x138b01[_0x78b0('0x3a')]:_0x2d3849[_0x78b0('0x3b')];if(!_0x1c7651[_0x78b0('0x36')][_0x78b0('0x3e')](_0x78b0('0x3f'))){_0x138b01['limit']=qs[_0x78b0('0x21')](_0x1c7651[_0x78b0('0x36')]['limit']);_0x138b01[_0x78b0('0x1f')]=qs['offset'](_0x1c7651[_0x78b0('0x36')][_0x78b0('0x1f')]);}_0x138b01['order']=qs[_0x78b0('0x40')](_0x1c7651[_0x78b0('0x36')]['sort']);_0x138b01[_0x78b0('0x41')]=qs[_0x78b0('0x38')](_[_0x78b0('0x42')](_0x1c7651[_0x78b0('0x36')],_0x2d3849['filters']),_0x2d0d5e);var _0x5b761b=[];var _0x3e4070=squel[_0x78b0('0x43')]()[_0x78b0('0x44')]('id')['field'](_0x78b0('0x27'))[_0x78b0('0x44')](_0x78b0('0x45'))[_0x78b0('0x46')](_0x78b0('0x47'));var _0x1c84f1=squel['select']()[_0x78b0('0x44')](_0x78b0('0x48'))['field'](_0x78b0('0x49'))[_0x78b0('0x44')](_0x78b0('0x4a'))['from'](_0x78b0('0x4b'),'ui')[_0x78b0('0x4c')](_0x78b0('0x4d'),'u','u.id\x20=\x20ui.UserId');var _0x3cf51a=squel[_0x78b0('0x43')]()[_0x78b0('0x46')](_0x78b0('0x4e'),'i')[_0x78b0('0x4c')](_0x78b0('0x4f'),'c','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL')[_0x78b0('0x4c')](_0x78b0('0x4d'),'o',_0x78b0('0x50'))[_0x78b0('0x4c')]('fax_accounts','a','a.id\x20=\x20i.FaxAccountId')[_0x78b0('0x4c')](_0x78b0('0x51'),'me',_0x78b0('0x52'))['left_join']('fax_interaction_has_tags','it','it.FaxInteractionId\x20=\x20i.id')['left_join'](_0x78b0('0x47'),'t','t.id\x20=\x20it.TagId');var _0x34e9a6=squel[_0x78b0('0x53')]();var _0x1694df=[];var _0x5c59e8=squel['expr']();var _0x2ca89b;if(_0x1c7651[_0x78b0('0x36')][_0x78b0('0x54')]){_0x2ca89b=as[_0x78b0('0x55')](_0x1c7651[_0x78b0('0x36')]['search']);var _0x496bc3=_0x2ca89b[_0x78b0('0x56')];for(var _0x358744=0x0;_0x358744<_0x2ca89b[_0x78b0('0x57')]['length'];_0x358744++){var _0x527b83=_0x2ca89b[_0x78b0('0x57')][_0x358744];var _0x555303='i';var _0x32cbdf=_[_0x78b0('0x58')](_0x2d0d5e,[_0x78b0('0x27'),_0x527b83[_0x78b0('0x44')]]);if(!_0x32cbdf){switch(_0x527b83[_0x78b0('0x44')]){case _0x78b0('0x59'):if(_0x527b83[_0x78b0('0x5a')]==0x1){_0x3cf51a['having']('`'+_0x527b83[_0x78b0('0x44')]+_0x78b0('0x5b'));}else{_0x3cf51a[_0x78b0('0x5c')]('`'+_0x527b83['field']+_0x78b0('0x5d'));}break;case _0x78b0('0x5e'):if(_0x527b83['operator']===_0x78b0('0x5f')){if(_0x527b83[_0x78b0('0x5a')][_0x78b0('0x2d')]('\x20')['length']>0x1){_0x34e9a6[_0x496bc3]('MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)',qs['getFullTextValue'](_0x527b83[_0x78b0('0x5a')]),null);}else{var _0x30cb22='%'+_0x527b83[_0x78b0('0x5a')]+'%';_0x34e9a6[_0x496bc3](_0x78b0('0x60'),_0x30cb22,_0x30cb22,_0x30cb22);}}else{_0x32cbdf=_['find'](_0x2d0d5e,['name',_0x78b0('0x61')]);_0x527b83[_0x78b0('0x44')]=_0x78b0('0x61');_0x3adb62=as[_0x78b0('0x62')](_0x555303,_0x32cbdf[_0x78b0('0x34')],_0x527b83);_0x34e9a6[_0x496bc3](_0x3adb62[_0x78b0('0x63')],_0x3adb62[_0x78b0('0x5a')][_0x78b0('0x64')],_0x3adb62[_0x78b0('0x5a')]['end']);}break;case'Tag':var _0x3c6f7f=_0x527b83['value'][_0x78b0('0x2d')](',')[_0x78b0('0x31')](function(_0x9fa6b0){return Number(_0x9fa6b0);});_0x3c6f7f['forEach'](function(_0x4253cc){_0x5c59e8['or']('CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','%,'+_0x4253cc+',%');});_0x1694df=_[_0x78b0('0x65')](_0x1694df,_0x3c6f7f);break;case _0x78b0('0x66'):if(_0x527b83[_0x78b0('0x67')]===_0x78b0('0x5f')){_0x34e9a6[_0x496bc3](_0x78b0('0x68'),'%'+_0x527b83[_0x78b0('0x5a')]+'%',null);}else{_0x32cbdf=_[_0x78b0('0x58')](_0x2d0d5e,[_0x78b0('0x27'),_0x78b0('0x69')]);_0x527b83[_0x78b0('0x44')]=_0x78b0('0x69');_0x3adb62=as[_0x78b0('0x62')](_0x555303,_0x32cbdf[_0x78b0('0x34')],_0x527b83);_0x34e9a6[_0x496bc3](_0x3adb62[_0x78b0('0x63')],_0x3adb62[_0x78b0('0x5a')][_0x78b0('0x64')],_0x3adb62[_0x78b0('0x5a')]['end']);}break;case _0x78b0('0x6a'):_0x3adb62=as[_0x78b0('0x62')]('me',null,_0x527b83);_0x34e9a6[_0x496bc3](_0x3adb62[_0x78b0('0x63')],_0x3adb62[_0x78b0('0x5a')][_0x78b0('0x64')],_0x3adb62[_0x78b0('0x5a')][_0x78b0('0x6b')]);break;}}else{var _0x3adb62=as[_0x78b0('0x62')](_0x555303,_0x32cbdf['type'],_0x527b83);_0x34e9a6[_0x496bc3](_0x3adb62[_0x78b0('0x63')],_0x3adb62['value'][_0x78b0('0x64')],_0x3adb62[_0x78b0('0x5a')]['end']);}}}else{var _0x4ea45c=_(_0x1c7651[_0x78b0('0x36')])[_0x78b0('0x37')]()[_0x78b0('0x31')](function(_0x305e79){return _[_0x78b0('0x6c')](_0x2d0d5e,[_0x78b0('0x27'),_0x305e79])?_0x305e79:undefined;})[_0x78b0('0x6d')]()[_0x78b0('0x5a')]();if(!_[_0x78b0('0x6e')](_0x4ea45c)){_0x4ea45c[_0x78b0('0x6f')](function(_0x14662d){if(_0x14662d===_0x78b0('0x70')){_0x3cf51a['where'](_0x78b0('0x71'),[][_0x78b0('0x72')](_0x1c7651['query'][_0x14662d]));}else if(_0x14662d===_0x78b0('0x73')){var _0x441bc0=JSON[_0x78b0('0x74')](_0x1c7651[_0x78b0('0x36')][_0x14662d])[_0x78b0('0x75')];var _0x24326e=JSON[_0x78b0('0x74')](_0x1c7651[_0x78b0('0x36')][_0x14662d])[_0x78b0('0x76')];_0x3cf51a[_0x78b0('0x41')]('i.createdAt\x20BETWEEN\x20?\x20AND\x20?',_0x441bc0,_0x24326e);}else{if(_0x1c7651[_0x78b0('0x36')][_0x14662d]===_0x78b0('0x77')){_0x3cf51a[_0x78b0('0x41')]('i.'+_0x14662d+_0x78b0('0x78'));}else{_0x3cf51a[_0x78b0('0x41')]('i.'+_0x14662d+'\x20=\x20?',_0x1c7651[_0x78b0('0x36')][_0x14662d]);}}});}if(_0x1c7651[_0x78b0('0x36')][_0x78b0('0x79')]){if(_0x1c7651[_0x78b0('0x36')][_0x78b0('0x79')]==0x1){_0x3cf51a[_0x78b0('0x5c')](_0x78b0('0x7a'));}else{_0x3cf51a[_0x78b0('0x5c')]('`unreadMessages`\x20>\x200');}}if(_0x1c7651[_0x78b0('0x36')][_0x78b0('0x7b')]){_0x1694df=_[_0x78b0('0x7c')](_0x1c7651['query']['tag'])?_0x1c7651[_0x78b0('0x36')][_0x78b0('0x7b')]:new Array(_0x1c7651[_0x78b0('0x36')][_0x78b0('0x7b')]);_0x1694df[_0x78b0('0x6f')](function(_0x512dc8){_0x5c59e8['or'](_0x78b0('0x7d'),'%,'+_0x512dc8+',%');});}if(_0x1c7651[_0x78b0('0x36')][_0x78b0('0x7e')]){var _0x3f9170=_0x1c7651[_0x78b0('0x36')][_0x78b0('0x7e')]['replace']('\x5c','\x5c\x5c')[_0x78b0('0x7f')](/'/g,'\x27\x27');if(qs[_0x78b0('0x80')](_0x3f9170)){_0x34e9a6['or'](_0x78b0('0x81'),_0x3f9170+'%')['or'](_0x78b0('0x82'),_0x3f9170+'%');}_0x34e9a6['or'](_0x78b0('0x83'),_0x3f9170+'%');}}_0x3cf51a['where'](_0x34e9a6);_0x3cf51a[_0x78b0('0x84')](_0x78b0('0x85'));var _0x2f60c7={'type':db[_0x78b0('0x86')]['QueryTypes'][_0x78b0('0x87')],'raw':!![]};var _0x101b29=_0x3cf51a['clone']();_0x101b29[_0x78b0('0x44')](_0x78b0('0x85'));_0x101b29['field'](_0x78b0('0x88'),_0x78b0('0x59'));if(_0x138b01[_0x78b0('0x89')]){_0x138b01[_0x78b0('0x89')][_0x78b0('0x6f')](function(_0x3537ac){var _0x565279=_0x3537ac[0x0]===_0x78b0('0x8a')?_0x3537ac[0x0]:'i.'+_0x3537ac[0x0];_0x3cf51a['order'](_0x565279,_0x3537ac[0x1]===_0x78b0('0x8b')?![]:!![]);});}if(!_[_0x78b0('0x6e')](_0x1694df)){_0x3cf51a['having'](_0x5c59e8);_0x101b29[_0x78b0('0x41')]('t.id\x20IN\x20?',_0x1694df);}BPromise[_0x78b0('0x8c')]()[_0x78b0('0x26')](function(){if(!_0x2ca89b){if(_0x1c7651['query'][_0x78b0('0x70')])return;_0x101b29[_0x78b0('0x41')]('i.FaxAccountId\x20IS\x20NOT\x20NULL');_0x3cf51a[_0x78b0('0x41')](_0x78b0('0x8d'));return;}if(_0x1c7651[_0x78b0('0x8e')][_0x78b0('0x8f')]!==_0x78b0('0x90'))return;return _0x1c7651[_0x78b0('0x8e')][_0x78b0('0x91')]({'attributes':['id'],'raw':!![]})[_0x78b0('0x26')](function(_0x58e610){if(_[_0x78b0('0x6e')](_0x58e610)){_0x101b29['where'](_0x78b0('0x92'));_0x3cf51a[_0x78b0('0x41')]('i.FaxAccountId\x20IS\x20NULL');}else{_0x101b29[_0x78b0('0x41')](_0x78b0('0x71'),_[_0x78b0('0x31')](_0x58e610,'id'));_0x3cf51a['where'](_0x78b0('0x71'),_[_0x78b0('0x31')](_0x58e610,'id'));}});})[_0x78b0('0x26')](function(){if(_0x1c7651[_0x78b0('0x8e')][_0x78b0('0x8f')]==='agent'&&!_0x2ca89b&&!_0x1c7651[_0x78b0('0x36')][_0x78b0('0x70')])return[];return db[_0x78b0('0x93')][_0x78b0('0x36')](_0x101b29['toString'](),_0x2f60c7);})[_0x78b0('0x26')](function(_0x575c97){_0x1f9bed[_0x78b0('0x22')]=_0x575c97[_0x78b0('0x3d')];if(_0x1f9bed[_0x78b0('0x22')]===0x0)return[];return db[_0x78b0('0x93')]['query'](_0x3e4070[_0x78b0('0x94')](),_0x2f60c7)['then'](function(_0x1a21e5){_0x5b761b=_[_0x78b0('0x95')](_0x1a21e5,'id');_0x2f60c7=_[_0x78b0('0x96')](_0x2f60c7,{'model':db[_0x78b0('0x32')],'mapToModel':!![],'raw':!![],'nest':!![]});if(_0x1c7651[_0x78b0('0x36')]['fields']){_0x138b01[_0x78b0('0x3a')][_0x78b0('0x6f')](function(_0x458079){_0x3cf51a[_0x78b0('0x44')]('i.'+_0x458079);});}else{_0x3cf51a[_0x78b0('0x44')](_0x78b0('0x88'),'unreadMessages');_0x3cf51a['field'](_0x78b0('0x97'),_0x78b0('0x98'));_0x3cf51a[_0x78b0('0x44')]('a.mandatoryDisposition',_0x78b0('0x99'));_0x3cf51a['field']('CASE\x20WHEN\x20(c.firstName\x20IS\x20NOT\x20NULL\x20AND\x20c.firstName\x20<>\x20\x27\x27)\x20OR\x20(c.lastName\x20IS\x20NOT\x20NULL\x20AND\x20c.lastName\x20<>\x20\x27\x27)\x20THEN\x20CONCAT(IFNULL(c.firstName,\x20\x27\x27),\x20\x27\x20\x27,\x20IFNULL(c.lastName,\x20\x27\x27))\x20ELSE\x20\x27Unknown\x27\x20END',_0x78b0('0x8a'));_0x3cf51a['field'](_0x78b0('0x9a'));_0x3cf51a['field'](_0x78b0('0x9b'),_0x78b0('0x9c'));_0x3cf51a['field']('c.lastName',_0x78b0('0x9d'));_0x3cf51a[_0x78b0('0x44')](_0x78b0('0x9e'),'Contact.email');_0x3cf51a[_0x78b0('0x44')](_0x78b0('0x9f'),_0x78b0('0xa0'));_0x3cf51a[_0x78b0('0x44')](_0x78b0('0xa1'),_0x78b0('0xa2'));_0x3cf51a[_0x78b0('0x44')](_0x78b0('0xa3'),_0x78b0('0xa4'));_0x3cf51a[_0x78b0('0x44')](_0x78b0('0xa5'),_0x78b0('0xa6'));_0x3cf51a[_0x78b0('0x44')](_0x78b0('0xa7'),_0x78b0('0xa8'));_0x3cf51a[_0x78b0('0x44')](_0x78b0('0xa9'),'TagIds');}if(_0x138b01['limit'])_0x3cf51a[_0x78b0('0x21')](_0x138b01[_0x78b0('0x21')]);if(_0x138b01[_0x78b0('0x1f')])_0x3cf51a[_0x78b0('0x1f')](_0x138b01[_0x78b0('0x1f')]);return db[_0x78b0('0x93')][_0x78b0('0x36')](_0x3cf51a[_0x78b0('0x94')](),_0x2f60c7);})[_0x78b0('0x26')](function(_0x2ac0ba){if(_0x2ac0ba[_0x78b0('0x3d')]>0x0)_0x1c84f1[_0x78b0('0x41')]('ui.FaxInteractionId\x20IN\x20?',_[_0x78b0('0x31')](_0x2ac0ba,'id'));return db[_0x78b0('0x93')][_0x78b0('0x36')](_0x1c84f1['toString'](),_0x2f60c7)[_0x78b0('0x26')](function(_0x2e75fe){var _0x20c447=_[_0x78b0('0xaa')](_0x2e75fe,_0x78b0('0xab'));var _0x45c518=[];_0x2ac0ba[_0x78b0('0x6f')](function(_0x253aee){_0x45c518[_0x78b0('0x2e')](updateFaxInteraction(_0x253aee,_0x5b761b,_0x20c447));});return BPromise[_0x78b0('0xac')](_0x45c518);});});})[_0x78b0('0x26')](function(_0x407db8){_0x1f9bed[_0x78b0('0xad')]=_0x407db8;return _0x1f9bed;})['then'](respondWithFilteredResult(_0x3e51d8,_0x138b01))[_0x78b0('0x2f')](handleError(_0x3e51d8,null));};exports[_0x78b0('0xae')]=function(_0x541942,_0x1da4b7){var _0x4b8406={'raw':![],'where':{'id':_0x541942[_0x78b0('0xaf')]['id']}},_0x3e8d25={};_0x3e8d25[_0x78b0('0x3b')]=_['keys'](db['FaxInteraction']['rawAttributes']);_0x3e8d25[_0x78b0('0x36')]=_[_0x78b0('0x37')](_0x541942[_0x78b0('0x36')]);_0x3e8d25[_0x78b0('0x38')]=_['intersection'](_0x3e8d25[_0x78b0('0x3b')],_0x3e8d25[_0x78b0('0x36')]);_0x4b8406['attributes']=_[_0x78b0('0x39')](_0x3e8d25[_0x78b0('0x3b')],qs[_0x78b0('0x3c')](_0x541942[_0x78b0('0x36')][_0x78b0('0x3c')]));_0x4b8406[_0x78b0('0x3a')]=_0x4b8406[_0x78b0('0x3a')][_0x78b0('0x3d')]?_0x4b8406[_0x78b0('0x3a')]:_0x3e8d25['model'];if(_0x541942['query'][_0x78b0('0xb0')]){_0x4b8406['include']=[{'all':!![]}];}_0x4b8406=_[_0x78b0('0x96')]({},_0x4b8406,_0x541942['options']);return db[_0x78b0('0x32')]['find'](_0x4b8406)[_0x78b0('0x26')](handleEntityNotFound(_0x1da4b7,null))[_0x78b0('0x26')](respondWithResult(_0x1da4b7,null))[_0x78b0('0x2f')](handleError(_0x1da4b7,null));};exports[_0x78b0('0xb1')]=function(_0x4f0e4b,_0x285277){return db['FaxInteraction'][_0x78b0('0xb1')](_0x4f0e4b[_0x78b0('0x6a')],{})[_0x78b0('0x26')](respondWithResult(_0x285277,0xc9))[_0x78b0('0x2f')](handleError(_0x285277,null));};exports[_0x78b0('0x25')]=function(_0x1f5829,_0x1aeec5){if(_0x1f5829['body']['id']){delete _0x1f5829[_0x78b0('0x6a')]['id'];}return db[_0x78b0('0x32')][_0x78b0('0x58')]({'where':{'id':_0x1f5829[_0x78b0('0xaf')]['id']}})[_0x78b0('0x26')](handleEntityNotFound(_0x1aeec5,null))[_0x78b0('0x26')](saveUpdates(_0x1f5829['body'],null))[_0x78b0('0x26')](respondWithResult(_0x1aeec5,null))[_0x78b0('0x2f')](handleError(_0x1aeec5,null));};exports['destroy']=function(_0x48684b,_0x864036){return db['FaxInteraction'][_0x78b0('0x58')]({'where':{'id':_0x48684b['params']['id']}})[_0x78b0('0x26')](handleEntityNotFound(_0x864036,null))[_0x78b0('0x26')](removeEntity(_0x864036,null))[_0x78b0('0x2f')](handleError(_0x864036,null));};exports[_0x78b0('0xb2')]=function(_0x40bd1c,_0x4c785b){return db[_0x78b0('0x32')][_0x78b0('0xb2')]()[_0x78b0('0x26')](respondWithResult(_0x4c785b,null))['catch'](handleError(_0x4c785b,null));};exports[_0x78b0('0xb3')]=function(_0x39c3d9,_0xf1070b,_0x4db86d){return db[_0x78b0('0xb4')][_0x78b0('0x58')]({'where':{'id':_0x39c3d9[_0x78b0('0xaf')]['id']}})['then'](handleEntityNotFound(_0xf1070b,null))[_0x78b0('0x26')](function(_0x18ec53){if(_0x18ec53){return _0x18ec53[_0x78b0('0xb3')](_0x39c3d9[_0x78b0('0x6a')]['ids'],_[_0x78b0('0xb5')](_0x39c3d9['body'],[_0x78b0('0xb6'),'id'])||{});}})[_0x78b0('0x26')](respondWithResult(_0xf1070b,null))[_0x78b0('0x2f')](handleError(_0xf1070b,null));};exports[_0x78b0('0xb7')]=function(_0x29e3d3,_0x32cf52,_0x56ee56){var _0x53c8e4={'raw':![],'where':{}};var _0x2ba340={};var _0x432b13={'count':0x0,'rows':[]};return db['FaxInteraction'][_0x78b0('0xb8')]({'where':{'id':_0x29e3d3[_0x78b0('0xaf')]['id']}})[_0x78b0('0x26')](handleEntityNotFound(_0x32cf52,null))['then'](function(_0x3a665c){if(_0x3a665c){_0x2ba340['model']=_[_0x78b0('0x37')](db[_0x78b0('0xb4')][_0x78b0('0x33')]);_0x2ba340[_0x78b0('0x36')]=_[_0x78b0('0x37')](_0x29e3d3['query']);_0x2ba340[_0x78b0('0x38')]=_[_0x78b0('0x39')](_0x2ba340[_0x78b0('0x3b')],_0x2ba340[_0x78b0('0x36')]);_0x53c8e4[_0x78b0('0x3a')]=_['intersection'](_0x2ba340[_0x78b0('0x3b')],qs[_0x78b0('0x3c')](_0x29e3d3[_0x78b0('0x36')]['fields']));_0x53c8e4[_0x78b0('0x3a')]=_0x53c8e4[_0x78b0('0x3a')][_0x78b0('0x3d')]?_0x53c8e4[_0x78b0('0x3a')]:_0x2ba340[_0x78b0('0x3b')];if(!_0x29e3d3[_0x78b0('0x36')][_0x78b0('0x3e')](_0x78b0('0x3f'))){_0x53c8e4['limit']=qs['limit'](_0x29e3d3[_0x78b0('0x36')]['limit']);_0x53c8e4['offset']=qs[_0x78b0('0x1f')](_0x29e3d3[_0x78b0('0x36')]['offset']);}_0x53c8e4[_0x78b0('0x89')]=qs[_0x78b0('0x40')](_0x29e3d3[_0x78b0('0x36')][_0x78b0('0x40')]);_0x53c8e4['where']=qs[_0x78b0('0x38')](_[_0x78b0('0x42')](_0x29e3d3['query'],_0x2ba340['filters']));_0x53c8e4[_0x78b0('0x41')][_0x78b0('0xab')]=_0x3a665c['id'];if(_0x29e3d3['query'][_0x78b0('0x7e')]){_0x53c8e4[_0x78b0('0x41')]=_[_0x78b0('0x96')](_0x53c8e4[_0x78b0('0x41')],{'$or':_['map'](_0x53c8e4['attributes'],function(_0x4b90c8){var _0x47a581={};_0x47a581[_0x4b90c8]={'$like':'%'+_0x29e3d3[_0x78b0('0x36')][_0x78b0('0x7e')]+'%'};return _0x47a581;})});}if(_0x29e3d3['query'][_0x78b0('0x75')]){var _0x13e128=_0x29e3d3['query']['$gte'][_0x78b0('0x2d')](',');var _0x37bb49={};_0x37bb49[_0x13e128[0x0]]={'$gte':moment(_0x13e128[0x1])['format'](_0x78b0('0xb9'))};_0x53c8e4[_0x78b0('0x41')]=_['merge'](_0x53c8e4[_0x78b0('0x41')],_0x37bb49);}_0x53c8e4=_[_0x78b0('0x96')]({},_0x53c8e4,_0x29e3d3[_0x78b0('0xba')]);return db[_0x78b0('0xb4')][_0x78b0('0x22')]({'where':_0x53c8e4[_0x78b0('0x41')]})[_0x78b0('0x26')](function(_0x229416){_0x432b13['count']=_0x229416;if(_0x29e3d3[_0x78b0('0x36')][_0x78b0('0xb0')]){_0x53c8e4['include']=[{'all':!![]}];}return db[_0x78b0('0xb4')]['findAll'](_0x53c8e4);})[_0x78b0('0x26')](function(_0x3c7784){_0x432b13[_0x78b0('0xad')]=_0x3c7784;return _0x432b13;});}})[_0x78b0('0x26')](respondWithFilteredResult(_0x32cf52,_0x53c8e4))[_0x78b0('0x2f')](handleError(_0x32cf52,null));};exports[_0x78b0('0xbb')]=function(_0x522fef,_0x28cfa5,_0x175796){return db[_0x78b0('0x32')][_0x78b0('0x58')]({'where':{'id':_0x522fef[_0x78b0('0xaf')]['id']}})[_0x78b0('0x26')](handleEntityNotFound(_0x28cfa5,null))[_0x78b0('0x26')](function(_0x266e06){if(_0x266e06){return _0x266e06[_0x78b0('0xbc')](_0x522fef[_0x78b0('0x6a')][_0x78b0('0xb6')],_['omit'](_0x522fef['body'],[_0x78b0('0xb6'),'id'])||{})[_0x78b0('0xbd')](function(){return db['Tag'][_0x78b0('0xbe')]({'attributes':['id',_0x78b0('0x27'),_0x78b0('0x45')],'where':{'id':_0x522fef[_0x78b0('0x6a')]['ids']}});})['then'](function(_0x408780){socket[_0x78b0('0xbf')](_0x78b0('0xc0'),{'id':Number(_0x522fef[_0x78b0('0xaf')]['id']),'tags':_0x408780||[]});return{'id':Number(_0x522fef['params']['id']),'tags':_0x408780||[]};});}})['then'](respondWithResult(_0x28cfa5,null))[_0x78b0('0x2f')](handleError(_0x28cfa5,null));};exports['removeTags']=function(_0x17ebe3,_0x411ac4,_0x31fb52){return db['FaxInteraction'][_0x78b0('0x58')]({'where':{'id':_0x17ebe3['params']['id']}})[_0x78b0('0x26')](handleEntityNotFound(_0x411ac4,null))[_0x78b0('0x26')](function(_0x547c18){if(_0x547c18){return _0x547c18[_0x78b0('0xc1')](_0x17ebe3[_0x78b0('0x36')]['ids']);}})['then'](respondWithStatusCode(_0x411ac4,null))[_0x78b0('0x2f')](handleError(_0x411ac4,null));};exports[_0x78b0('0xc2')]=function(_0x4fa6c4,_0x4a1ffb){var _0x497e6e=moment()[_0x78b0('0xc3')]()['toString']();var _0x1c2ed6=path['join'](config[_0x78b0('0xc4')],'server','files',_0x78b0('0xc5'));var _0x13b81d=path[_0x78b0('0xc6')](config['root'],_0x78b0('0xc7'),_0x78b0('0xc8'),_0x78b0('0xc9'));var _0x36f811=path[_0x78b0('0xc6')](_0x1c2ed6,_0x497e6e);var _0xd35cf9=util[_0x78b0('0xca')]('transcript-%d-%s.zip',_0x4fa6c4[_0x78b0('0xaf')]['id'],_0x497e6e);var _0xba1cc3=path[_0x78b0('0xc6')](_0x1c2ed6,_0xd35cf9);var _0x127a5d=[];_0x127a5d['push']({'model':db[_0x78b0('0xcb')],'as':'Attachment','raw':!![]});var _0x4a4744=[{'model':db['FaxMessage'],'as':_0x78b0('0xcc'),'attributes':['id',_0x78b0('0x6a'),_0x78b0('0x73')],'include':_0x127a5d}];return db['FaxInteraction'][_0x78b0('0x58')]({'where':{'id':_0x4fa6c4['params']['id']},'include':_0x4a4744})[_0x78b0('0x26')](handleEntityNotFound(_0x4a1ffb,null))[_0x78b0('0x26')](function(_0x2eb480){if(_0x2eb480&&_0x2eb480[_0x78b0('0xcc')]){var _0x5511a5=_0x2eb480[_0x78b0('0xcd')]({'plain':!![]});fs['mkdirSync'](_0x36f811);for(var _0x43c352=0x0;_0x43c352<_0x5511a5[_0x78b0('0xcc')][_0x78b0('0x3d')];_0x43c352++){var _0xad4361=_0x5511a5[_0x78b0('0xcc')][_0x43c352][_0x78b0('0xcb')];if(_0xad4361){var _0x2e30e8=path['join'](_0x13b81d,_0xad4361[_0x78b0('0xce')]);if(fs['existsSync'](_0x2e30e8)){fs['createReadStream'](_0x2e30e8)['pipe'](fs[_0x78b0('0xcf')](path['join'](_0x36f811,_0xad4361['basename'])));}}}return BPromise['resolve']()['then'](function(){return new BPromise(function(_0x23b390,_0x20a926){zipdir(_0x36f811,{'saveTo':_0xba1cc3},function(_0x51cf80,_0x26dcb5){if(_0x51cf80)return _0x20a926(_0x51cf80);return _0x23b390(_0x26dcb5);});})[_0x78b0('0x26')](function(){return new BPromise(function(_0x1b5546,_0x25ffde){rimraf(_0x36f811,function(_0x34a0f8){if(_0x34a0f8)_0x25ffde(_0x34a0f8);return _0x1b5546();});});})['then'](function(){return _0x4a1ffb['download'](_0xba1cc3,_0xd35cf9,function(_0x2193fb){if(_0x2193fb){console[_0x78b0('0xd0')](_0x78b0('0xd1'),_0x2193fb);}else{fs['unlinkSync'](_0xba1cc3);}});});});}else{return _0x4a1ffb[_0x78b0('0x1c')](0xc8);}})[_0x78b0('0x2f')](handleError(_0x4a1ffb,null));}; \ No newline at end of file +var _0x550e=['includeAll','include','options','create','body','describe','FaxMessage','addMessage','ids','omit','getMessages','format','YYYY-MM-DD\x20HH:mm:ss','findAll','spread','removeTags','download','unix','join','root','files','tmp','attachments','transcript-%d-%s.zip','Attachment','createdAt','Messages','get','mkdirSync','basename','existsSync','pipe','err','unlinkSync','eml-format','rimraf','fast-json-patch','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','defaults','redis','localhost','socket.io-emitter','./faxInteraction.socket','register','sendStatus','end','status','json','undefined','count','offset','set','Content-Range','reject','save','update','destroy','error','name','Users','fullname','TagIds','split','Tags','push','then','catch','index','map','FaxInteraction','rawAttributes','fieldName','key','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','limit','order','sort','pick','select','field','color','from','u.id','ui.FaxInteractionId','user_has_fax_interactions','users','u.id\x20=\x20ui.UserId','fax_interactions','left_join','cm_contacts','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL','o.id\x20=\x20i.UserId','fax_accounts','a.id\x20=\x20i.FaxAccountId','fax_messages','me.FaxInteractionId\x20=\x20i.id','fax_interaction_has_tags','it.FaxInteractionId\x20=\x20i.id','t.id\x20=\x20it.TagId','expr','search','parseSearch','conditions','find','unreadMessages','value','having','`\x20=\x200','`\x20>\x200','Contact','operator','$substring','MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','c.firstName\x20LIKE\x20?\x20OR\x20c.lastName\x20LIKE\x20?\x20OR\x20c.email\x20LIKE\x20?','ContactId','buildExpression','text','start','Tag','forEach','union','User','CONCAT_WS(\x27\x20\x27,\x20o.name,\x20o.fullname)\x20LIKE\x20?','UserId','type','keys','some','compact','isEmpty','FaxAccountId','where','i.FaxAccountId\x20IN\x20?','concat','parse','$gte','i.createdAt\x20BETWEEN\x20?\x20AND\x20?','\x20IS\x20NULL','\x20=\x20?','read','`unreadMessages`\x20=\x200','`unreadMessages`\x20>\x200','isArray','tag','filter','replace','i.id\x20LIKE\x20?','i.fax\x20LIKE\x20?','CONCAT(c.firstName,\x20\x27\x20\x27,\x20c.lastName)\x20LIKE\x20?','group','Sequelize','QueryTypes','SELECT','i.id','SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)','contactName','DESC','resolve','i.FaxAccountId\x20IS\x20NOT\x20NULL','user','role','agent','getFaxAccounts','i.FaxAccountId\x20IS\x20NULL','sequelize','toString','keyBy','merge','Account.key','a.mandatoryDisposition','Account.mandatoryDisposition','CASE\x20WHEN\x20(c.firstName\x20IS\x20NOT\x20NULL\x20AND\x20c.firstName\x20<>\x20\x27\x27)\x20OR\x20(c.lastName\x20IS\x20NOT\x20NULL\x20AND\x20c.lastName\x20<>\x20\x27\x27)\x20THEN\x20CONCAT(IFNULL(c.firstName,\x20\x27\x27),\x20\x27\x20\x27,\x20IFNULL(c.lastName,\x20\x27\x27))\x20ELSE\x20\x27Unknown\x27\x20END','i.*','c.firstName','Contact.firstName','c.lastName','Contact.lastName','c.email','Contact.email','c.phone','Contact.mobile','Contact.fax','o.fullname','Owner.fullname','o.internal','GROUP_CONCAT(DISTINCT\x20t.id)','ui.FaxInteractionId\x20IN\x20?','groupBy','rows','show','params'];(function(_0x577ba5,_0x4ad0e2){var _0x212d25=function(_0x22b26b){while(--_0x22b26b){_0x577ba5['push'](_0x577ba5['shift']());}};_0x212d25(++_0x4ad0e2);}(_0x550e,0x100));var _0xe550=function(_0x2c4a3e,_0x466f9b){_0x2c4a3e=_0x2c4a3e-0x0;var _0x28e8a5=_0x550e[_0x2c4a3e];return _0x28e8a5;};'use strict';var emlformat=require(_0xe550('0x0'));var rimraf=require(_0xe550('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xe550('0x2'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0xe550('0x3'));var Mustache=require(_0xe550('0x4'));var util=require(_0xe550('0x5'));var path=require(_0xe550('0x6'));var sox=require(_0xe550('0x7'));var csv=require(_0xe550('0x8'));var ejs=require(_0xe550('0x9'));var fs=require('fs');var fs_extra=require(_0xe550('0xa'));var _=require(_0xe550('0xb'));var squel=require(_0xe550('0xc'));var crypto=require(_0xe550('0xd'));var jsforce=require(_0xe550('0xe'));var deskjs=require(_0xe550('0xf'));var toCsv=require(_0xe550('0x8'));var querystring=require(_0xe550('0x10'));var Papa=require(_0xe550('0x11'));var Redis=require(_0xe550('0x12'));var authService=require(_0xe550('0x13'));var qs=require(_0xe550('0x14'));var as=require(_0xe550('0x15'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xe550('0x16'))(_0xe550('0x17'));var utils=require(_0xe550('0x18'));var config=require(_0xe550('0x19'));var licenseUtil=require(_0xe550('0x1a'));var db=require(_0xe550('0x1b'))['db'];config['redis']=_[_0xe550('0x1c')](config[_0xe550('0x1d')],{'host':_0xe550('0x1e'),'port':0x18eb});var socket=require(_0xe550('0x1f'))(new Redis(config['redis']));require(_0xe550('0x20'))[_0xe550('0x21')](socket);function respondWithStatusCode(_0x1dc855,_0x5853d8){_0x5853d8=_0x5853d8||0xcc;return function(_0x4d1f5d){if(_0x4d1f5d){return _0x1dc855[_0xe550('0x22')](_0x5853d8);}return _0x1dc855['status'](_0x5853d8)[_0xe550('0x23')]();};}function respondWithResult(_0x271a81,_0x3fac60){_0x3fac60=_0x3fac60||0xc8;return function(_0x1d0a0c){if(_0x1d0a0c){return _0x271a81[_0xe550('0x24')](_0x3fac60)[_0xe550('0x25')](_0x1d0a0c);}};}function respondWithFilteredResult(_0x3072e,_0x4c2edf){return function(_0x1054ae){if(_0x1054ae){var _0x54b62e=typeof _0x4c2edf['offset']===_0xe550('0x26')&&typeof _0x4c2edf['limit']===_0xe550('0x26');var _0x3c60d2=_0x1054ae[_0xe550('0x27')];var _0x3f1228=_0x54b62e?0x0:_0x4c2edf['offset'];var _0x1e8a20=_0x54b62e?_0x1054ae[_0xe550('0x27')]:_0x4c2edf[_0xe550('0x28')]+_0x4c2edf['limit'];var _0x38d6e9;if(_0x1e8a20>=_0x3c60d2){_0x1e8a20=_0x3c60d2;_0x38d6e9=0xc8;}else{_0x38d6e9=0xce;}_0x3072e[_0xe550('0x24')](_0x38d6e9);return _0x3072e[_0xe550('0x29')](_0xe550('0x2a'),_0x3f1228+'-'+_0x1e8a20+'/'+_0x3c60d2)['json'](_0x1054ae);}return null;};}function patchUpdates(_0x4b3db9){return function(_0x5a7817){try{jsonpatch['apply'](_0x5a7817,_0x4b3db9,!![]);}catch(_0x2b8f4b){return BPromise[_0xe550('0x2b')](_0x2b8f4b);}return _0x5a7817[_0xe550('0x2c')]();};}function saveUpdates(_0xe9a3e9,_0xf8a340){return function(_0x77e910){if(_0x77e910){return _0x77e910[_0xe550('0x2d')](_0xe9a3e9)['then'](function(_0x58d65d){return _0x58d65d;});}return null;};}function removeEntity(_0x518b49,_0x5429b2){return function(_0x3ce378){if(_0x3ce378){return _0x3ce378[_0xe550('0x2e')]()['then'](function(){_0x518b49['status'](0xcc)[_0xe550('0x23')]();});}};}function handleEntityNotFound(_0x58edfa,_0x3c04aa){return function(_0x31a168){if(!_0x31a168){_0x58edfa[_0xe550('0x22')](0x194);}return _0x31a168;};}function handleError(_0x55c635,_0x3be280){_0x3be280=_0x3be280||0x1f4;return function(_0x58d853){logger[_0xe550('0x2f')](_0x58d853['stack']);if(_0x58d853['name']){delete _0x58d853[_0xe550('0x30')];}_0x55c635[_0xe550('0x24')](_0x3be280)['send'](_0x58d853);};}function getInteractionUsers(_0x2420a7,_0x77c543){return new BPromise(function(_0x2d33a4,_0x2bee12){try{if(_0x77c543[_0x2420a7['id']]){_0x2420a7[_0xe550('0x31')]=_['map'](_0x77c543[_0x2420a7['id']],function(_0x48dbb8){return{'id':_0x48dbb8['id'],'fullname':_0x48dbb8[_0xe550('0x32')]};});}}catch(_0x58e205){_0x2bee12(_0x58e205);}_0x2d33a4(_0x2420a7);});}function getInteractionTags(_0x10b4ae,_0x39846d){return new BPromise(function(_0x223d59,_0x390957){try{if(_0x10b4ae[_0xe550('0x33')]){_0x10b4ae['Tags']=[];_0x10b4ae['TagIds'][_0xe550('0x34')](',')['forEach'](function(_0xa457ce){_0x10b4ae[_0xe550('0x35')][_0xe550('0x36')](_0x39846d[_0xa457ce]);});}delete _0x10b4ae[_0xe550('0x33')];}catch(_0x2dd34b){_0x390957(_0x2dd34b);}_0x223d59(_0x10b4ae);});}function updateFaxInteraction(_0x2ea7eb,_0x46a836,_0x4d75a8){return new BPromise(function(_0x275678,_0x4d811c){return getInteractionUsers(_0x2ea7eb,_0x4d75a8)[_0xe550('0x37')](function(_0x961925){return getInteractionTags(_0x961925,_0x46a836);})[_0xe550('0x37')](function(_0x1c33b6){_0x275678(_0x1c33b6);})[_0xe550('0x38')](function(_0x301724){_0x4d811c(_0x301724);});});}exports[_0xe550('0x39')]=function(_0x281d3a,_0x4105fd){var _0x57def2={},_0x3186bf={},_0x115622={'count':0x0,'rows':[]};var _0x5e152a=_[_0xe550('0x3a')](db[_0xe550('0x3b')][_0xe550('0x3c')],function(_0x25437c){return{'name':_0x25437c[_0xe550('0x3d')],'type':_0x25437c['type'][_0xe550('0x3e')]};});_0x3186bf[_0xe550('0x3f')]=_[_0xe550('0x3a')](_0x5e152a,_0xe550('0x30'));_0x3186bf[_0xe550('0x40')]=_['keys'](_0x281d3a[_0xe550('0x40')]);_0x3186bf[_0xe550('0x41')]=_[_0xe550('0x42')](_0x3186bf[_0xe550('0x3f')],_0x3186bf[_0xe550('0x40')]);_0x57def2[_0xe550('0x43')]=_[_0xe550('0x42')](_0x3186bf['model'],qs[_0xe550('0x44')](_0x281d3a[_0xe550('0x40')][_0xe550('0x44')]));_0x57def2[_0xe550('0x43')]=_0x57def2[_0xe550('0x43')][_0xe550('0x45')]?_0x57def2[_0xe550('0x43')]:_0x3186bf[_0xe550('0x3f')];if(!_0x281d3a[_0xe550('0x40')][_0xe550('0x46')](_0xe550('0x47'))){_0x57def2[_0xe550('0x48')]=qs['limit'](_0x281d3a[_0xe550('0x40')][_0xe550('0x48')]);_0x57def2[_0xe550('0x28')]=qs[_0xe550('0x28')](_0x281d3a[_0xe550('0x40')][_0xe550('0x28')]);}_0x57def2[_0xe550('0x49')]=qs[_0xe550('0x4a')](_0x281d3a[_0xe550('0x40')]['sort']);_0x57def2['where']=qs['filters'](_[_0xe550('0x4b')](_0x281d3a[_0xe550('0x40')],_0x3186bf[_0xe550('0x41')]),_0x5e152a);var _0x431259=[];var _0x563b86=squel[_0xe550('0x4c')]()['field']('id')[_0xe550('0x4d')]('name')[_0xe550('0x4d')](_0xe550('0x4e'))[_0xe550('0x4f')]('tools_tags');var _0x26c70b=squel['select']()[_0xe550('0x4d')](_0xe550('0x50'))[_0xe550('0x4d')]('u.fullname')[_0xe550('0x4d')](_0xe550('0x51'))['from'](_0xe550('0x52'),'ui')['left_join'](_0xe550('0x53'),'u',_0xe550('0x54'));var _0x4f987e=squel[_0xe550('0x4c')]()[_0xe550('0x4f')](_0xe550('0x55'),'i')[_0xe550('0x56')](_0xe550('0x57'),'c',_0xe550('0x58'))['left_join'](_0xe550('0x53'),'o',_0xe550('0x59'))[_0xe550('0x56')](_0xe550('0x5a'),'a',_0xe550('0x5b'))[_0xe550('0x56')](_0xe550('0x5c'),'me',_0xe550('0x5d'))[_0xe550('0x56')](_0xe550('0x5e'),'it',_0xe550('0x5f'))[_0xe550('0x56')]('tools_tags','t',_0xe550('0x60'));var _0xbb9a54=squel[_0xe550('0x61')]();var _0x507783=[];var _0x3242c2=squel['expr']();var _0x4a91a1;if(_0x281d3a[_0xe550('0x40')][_0xe550('0x62')]){_0x4a91a1=as[_0xe550('0x63')](_0x281d3a[_0xe550('0x40')][_0xe550('0x62')]);var _0x11911c=_0x4a91a1['sqlOperator'];for(var _0x248e8e=0x0;_0x248e8e<_0x4a91a1[_0xe550('0x64')][_0xe550('0x45')];_0x248e8e++){var _0x49d136=_0x4a91a1[_0xe550('0x64')][_0x248e8e];var _0x51ddb7='i';var _0x3c827f=_[_0xe550('0x65')](_0x5e152a,['name',_0x49d136['field']]);if(!_0x3c827f){switch(_0x49d136[_0xe550('0x4d')]){case _0xe550('0x66'):if(_0x49d136[_0xe550('0x67')]==0x1){_0x4f987e[_0xe550('0x68')]('`'+_0x49d136[_0xe550('0x4d')]+_0xe550('0x69'));}else{_0x4f987e['having']('`'+_0x49d136['field']+_0xe550('0x6a'));}break;case _0xe550('0x6b'):if(_0x49d136[_0xe550('0x6c')]===_0xe550('0x6d')){if(_0x49d136[_0xe550('0x67')][_0xe550('0x34')]('\x20')['length']>0x1){_0xbb9a54[_0x11911c](_0xe550('0x6e'),qs['getFullTextValue'](_0x49d136[_0xe550('0x67')]),null);}else{var _0x5dd848='%'+_0x49d136[_0xe550('0x67')]+'%';_0xbb9a54[_0x11911c](_0xe550('0x6f'),_0x5dd848,_0x5dd848,_0x5dd848);}}else{_0x3c827f=_[_0xe550('0x65')](_0x5e152a,[_0xe550('0x30'),'ContactId']);_0x49d136[_0xe550('0x4d')]=_0xe550('0x70');_0x186a6f=as[_0xe550('0x71')](_0x51ddb7,_0x3c827f['type'],_0x49d136);_0xbb9a54[_0x11911c](_0x186a6f[_0xe550('0x72')],_0x186a6f[_0xe550('0x67')][_0xe550('0x73')],_0x186a6f['value'][_0xe550('0x23')]);}break;case _0xe550('0x74'):var _0x53db2c=_0x49d136[_0xe550('0x67')]['split'](',')['map'](function(_0x5b3cf9){return Number(_0x5b3cf9);});_0x53db2c[_0xe550('0x75')](function(_0x372d80){_0x3242c2['or']('CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','%,'+_0x372d80+',%');});_0x507783=_[_0xe550('0x76')](_0x507783,_0x53db2c);break;case _0xe550('0x77'):if(_0x49d136['operator']===_0xe550('0x6d')){_0xbb9a54[_0x11911c](_0xe550('0x78'),'%'+_0x49d136[_0xe550('0x67')]+'%',null);}else{_0x3c827f=_[_0xe550('0x65')](_0x5e152a,[_0xe550('0x30'),_0xe550('0x79')]);_0x49d136[_0xe550('0x4d')]=_0xe550('0x79');_0x186a6f=as[_0xe550('0x71')](_0x51ddb7,_0x3c827f[_0xe550('0x7a')],_0x49d136);_0xbb9a54[_0x11911c](_0x186a6f['text'],_0x186a6f['value'][_0xe550('0x73')],_0x186a6f['value'][_0xe550('0x23')]);}break;case'body':_0x186a6f=as[_0xe550('0x71')]('me',null,_0x49d136);_0xbb9a54[_0x11911c](_0x186a6f[_0xe550('0x72')],_0x186a6f[_0xe550('0x67')]['start'],_0x186a6f['value'][_0xe550('0x23')]);break;}}else{var _0x186a6f=as['buildExpression'](_0x51ddb7,_0x3c827f[_0xe550('0x7a')],_0x49d136);_0xbb9a54[_0x11911c](_0x186a6f[_0xe550('0x72')],_0x186a6f[_0xe550('0x67')][_0xe550('0x73')],_0x186a6f[_0xe550('0x67')][_0xe550('0x23')]);}}}else{var _0x4895a2=_(_0x281d3a[_0xe550('0x40')])[_0xe550('0x7b')]()[_0xe550('0x3a')](function(_0x1a1570){return _[_0xe550('0x7c')](_0x5e152a,[_0xe550('0x30'),_0x1a1570])?_0x1a1570:undefined;})[_0xe550('0x7d')]()[_0xe550('0x67')]();if(!_[_0xe550('0x7e')](_0x4895a2)){_0x4895a2[_0xe550('0x75')](function(_0x4f8c2c){if(_0x4f8c2c===_0xe550('0x7f')){_0x4f987e[_0xe550('0x80')](_0xe550('0x81'),[][_0xe550('0x82')](_0x281d3a['query'][_0x4f8c2c]));}else if(_0x4f8c2c==='createdAt'){var _0x32b9bb=JSON[_0xe550('0x83')](_0x281d3a['query'][_0x4f8c2c])[_0xe550('0x84')];var _0xf0fe59=JSON[_0xe550('0x83')](_0x281d3a['query'][_0x4f8c2c])['$lte'];_0x4f987e['where'](_0xe550('0x85'),_0x32b9bb,_0xf0fe59);}else{if(_0x281d3a[_0xe550('0x40')][_0x4f8c2c]==='null'){_0x4f987e[_0xe550('0x80')]('i.'+_0x4f8c2c+_0xe550('0x86'));}else{_0x4f987e['where']('i.'+_0x4f8c2c+_0xe550('0x87'),_0x281d3a[_0xe550('0x40')][_0x4f8c2c]);}}});}if(_0x281d3a[_0xe550('0x40')][_0xe550('0x88')]){if(_0x281d3a[_0xe550('0x40')]['read']==0x1){_0x4f987e['having'](_0xe550('0x89'));}else{_0x4f987e['having'](_0xe550('0x8a'));}}if(_0x281d3a[_0xe550('0x40')]['tag']){_0x507783=_[_0xe550('0x8b')](_0x281d3a[_0xe550('0x40')][_0xe550('0x8c')])?_0x281d3a[_0xe550('0x40')][_0xe550('0x8c')]:new Array(_0x281d3a[_0xe550('0x40')][_0xe550('0x8c')]);_0x507783[_0xe550('0x75')](function(_0x3564ab){_0x3242c2['or']('CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','%,'+_0x3564ab+',%');});}if(_0x281d3a[_0xe550('0x40')][_0xe550('0x8d')]){var _0x5a497e=_0x281d3a[_0xe550('0x40')][_0xe550('0x8d')][_0xe550('0x8e')]('\x5c','\x5c\x5c')[_0xe550('0x8e')](/'/g,'\x27\x27');if(qs['isNumeric'](_0x5a497e)){_0xbb9a54['or'](_0xe550('0x8f'),_0x5a497e+'%')['or'](_0xe550('0x90'),_0x5a497e+'%');}_0xbb9a54['or'](_0xe550('0x91'),_0x5a497e+'%');}}_0x4f987e[_0xe550('0x80')](_0xbb9a54);_0x4f987e[_0xe550('0x92')]('i.id');var _0xd77ef6={'type':db[_0xe550('0x93')][_0xe550('0x94')][_0xe550('0x95')],'raw':!![]};var _0x3490fa=_0x4f987e['clone']();_0x3490fa[_0xe550('0x4d')](_0xe550('0x96'));_0x3490fa[_0xe550('0x4d')](_0xe550('0x97'),_0xe550('0x66'));if(_0x57def2['order']){_0x57def2[_0xe550('0x49')][_0xe550('0x75')](function(_0x2b9518){var _0x27a7e9=_0x2b9518[0x0]===_0xe550('0x98')?_0x2b9518[0x0]:'i.'+_0x2b9518[0x0];_0x4f987e['order'](_0x27a7e9,_0x2b9518[0x1]===_0xe550('0x99')?![]:!![]);});}if(!_[_0xe550('0x7e')](_0x507783)){_0x4f987e[_0xe550('0x68')](_0x3242c2);_0x3490fa['where']('t.id\x20IN\x20?',_0x507783);}BPromise[_0xe550('0x9a')]()[_0xe550('0x37')](function(){if(!_0x4a91a1){if(_0x281d3a[_0xe550('0x40')][_0xe550('0x7f')])return;_0x3490fa[_0xe550('0x80')](_0xe550('0x9b'));_0x4f987e[_0xe550('0x80')]('i.FaxAccountId\x20IS\x20NOT\x20NULL');return;}if(_0x281d3a[_0xe550('0x9c')][_0xe550('0x9d')]!==_0xe550('0x9e'))return;return _0x281d3a[_0xe550('0x9c')][_0xe550('0x9f')]({'attributes':['id'],'raw':!![]})[_0xe550('0x37')](function(_0x979c0c){if(_[_0xe550('0x7e')](_0x979c0c)){_0x3490fa['where']('i.FaxAccountId\x20IS\x20NULL');_0x4f987e[_0xe550('0x80')](_0xe550('0xa0'));}else{_0x3490fa[_0xe550('0x80')](_0xe550('0x81'),_[_0xe550('0x3a')](_0x979c0c,'id'));_0x4f987e[_0xe550('0x80')](_0xe550('0x81'),_[_0xe550('0x3a')](_0x979c0c,'id'));}});})[_0xe550('0x37')](function(){if(_0x281d3a[_0xe550('0x9c')][_0xe550('0x9d')]==='agent'&&!_0x4a91a1&&!_0x281d3a[_0xe550('0x40')]['FaxAccountId'])return[];return db[_0xe550('0xa1')]['query'](_0x3490fa[_0xe550('0xa2')](),_0xd77ef6);})[_0xe550('0x37')](function(_0x9e68c5){_0x115622[_0xe550('0x27')]=_0x9e68c5['length'];if(_0x115622[_0xe550('0x27')]===0x0)return[];return db[_0xe550('0xa1')][_0xe550('0x40')](_0x563b86[_0xe550('0xa2')](),_0xd77ef6)[_0xe550('0x37')](function(_0x4c3518){_0x431259=_[_0xe550('0xa3')](_0x4c3518,'id');_0xd77ef6=_[_0xe550('0xa4')](_0xd77ef6,{'model':db[_0xe550('0x3b')],'mapToModel':!![],'raw':!![],'nest':!![]});if(_0x281d3a[_0xe550('0x40')][_0xe550('0x44')]){_0x57def2['attributes'][_0xe550('0x75')](function(_0x1ce049){_0x4f987e['field']('i.'+_0x1ce049);});}else{_0x4f987e[_0xe550('0x4d')](_0xe550('0x97'),_0xe550('0x66'));_0x4f987e[_0xe550('0x4d')]('a.key',_0xe550('0xa5'));_0x4f987e[_0xe550('0x4d')](_0xe550('0xa6'),_0xe550('0xa7'));_0x4f987e[_0xe550('0x4d')](_0xe550('0xa8'),_0xe550('0x98'));_0x4f987e[_0xe550('0x4d')](_0xe550('0xa9'));_0x4f987e['field'](_0xe550('0xaa'),_0xe550('0xab'));_0x4f987e[_0xe550('0x4d')](_0xe550('0xac'),_0xe550('0xad'));_0x4f987e[_0xe550('0x4d')](_0xe550('0xae'),_0xe550('0xaf'));_0x4f987e['field'](_0xe550('0xb0'),'Contact.phone');_0x4f987e[_0xe550('0x4d')]('c.mobile',_0xe550('0xb1'));_0x4f987e[_0xe550('0x4d')]('c.fax',_0xe550('0xb2'));_0x4f987e['field'](_0xe550('0xb3'),_0xe550('0xb4'));_0x4f987e[_0xe550('0x4d')](_0xe550('0xb5'),'Owner.internal');_0x4f987e[_0xe550('0x4d')](_0xe550('0xb6'),_0xe550('0x33'));}if(_0x57def2[_0xe550('0x48')])_0x4f987e['limit'](_0x57def2[_0xe550('0x48')]);if(_0x57def2[_0xe550('0x28')])_0x4f987e[_0xe550('0x28')](_0x57def2[_0xe550('0x28')]);return db[_0xe550('0xa1')][_0xe550('0x40')](_0x4f987e[_0xe550('0xa2')](),_0xd77ef6);})[_0xe550('0x37')](function(_0x22d529){if(_0x22d529[_0xe550('0x45')]>0x0)_0x26c70b[_0xe550('0x80')](_0xe550('0xb7'),_['map'](_0x22d529,'id'));return db['sequelize'][_0xe550('0x40')](_0x26c70b[_0xe550('0xa2')](),_0xd77ef6)['then'](function(_0xf02923){var _0x1ce017=_[_0xe550('0xb8')](_0xf02923,'FaxInteractionId');var _0x3f4b29=[];_0x22d529[_0xe550('0x75')](function(_0x5aebb7){_0x3f4b29[_0xe550('0x36')](updateFaxInteraction(_0x5aebb7,_0x431259,_0x1ce017));});return BPromise['all'](_0x3f4b29);});});})[_0xe550('0x37')](function(_0xc07a1){_0x115622[_0xe550('0xb9')]=_0xc07a1;return _0x115622;})['then'](respondWithFilteredResult(_0x4105fd,_0x57def2))['catch'](handleError(_0x4105fd,null));};exports[_0xe550('0xba')]=function(_0x16d52e,_0x21dad0){var _0x1a2f30={'raw':![],'where':{'id':_0x16d52e[_0xe550('0xbb')]['id']}},_0x40d63b={};_0x40d63b[_0xe550('0x3f')]=_[_0xe550('0x7b')](db['FaxInteraction'][_0xe550('0x3c')]);_0x40d63b[_0xe550('0x40')]=_[_0xe550('0x7b')](_0x16d52e[_0xe550('0x40')]);_0x40d63b[_0xe550('0x41')]=_['intersection'](_0x40d63b[_0xe550('0x3f')],_0x40d63b[_0xe550('0x40')]);_0x1a2f30[_0xe550('0x43')]=_[_0xe550('0x42')](_0x40d63b[_0xe550('0x3f')],qs[_0xe550('0x44')](_0x16d52e[_0xe550('0x40')][_0xe550('0x44')]));_0x1a2f30[_0xe550('0x43')]=_0x1a2f30['attributes'][_0xe550('0x45')]?_0x1a2f30['attributes']:_0x40d63b['model'];if(_0x16d52e[_0xe550('0x40')][_0xe550('0xbc')]){_0x1a2f30[_0xe550('0xbd')]=[{'all':!![]}];}_0x1a2f30=_[_0xe550('0xa4')]({},_0x1a2f30,_0x16d52e[_0xe550('0xbe')]);return db[_0xe550('0x3b')][_0xe550('0x65')](_0x1a2f30)[_0xe550('0x37')](handleEntityNotFound(_0x21dad0,null))[_0xe550('0x37')](respondWithResult(_0x21dad0,null))[_0xe550('0x38')](handleError(_0x21dad0,null));};exports[_0xe550('0xbf')]=function(_0x29e9f7,_0x16ee1a){return db[_0xe550('0x3b')]['create'](_0x29e9f7[_0xe550('0xc0')],{})['then'](respondWithResult(_0x16ee1a,0xc9))[_0xe550('0x38')](handleError(_0x16ee1a,null));};exports[_0xe550('0x2d')]=function(_0x181290,_0x27b362){if(_0x181290[_0xe550('0xc0')]['id']){delete _0x181290[_0xe550('0xc0')]['id'];}return db[_0xe550('0x3b')]['find']({'where':{'id':_0x181290[_0xe550('0xbb')]['id']}})[_0xe550('0x37')](handleEntityNotFound(_0x27b362,null))[_0xe550('0x37')](saveUpdates(_0x181290['body'],null))[_0xe550('0x37')](respondWithResult(_0x27b362,null))[_0xe550('0x38')](handleError(_0x27b362,null));};exports[_0xe550('0x2e')]=function(_0x53db97,_0x1de49a){return db[_0xe550('0x3b')][_0xe550('0x65')]({'where':{'id':_0x53db97[_0xe550('0xbb')]['id']}})[_0xe550('0x37')](handleEntityNotFound(_0x1de49a,null))[_0xe550('0x37')](removeEntity(_0x1de49a,null))[_0xe550('0x38')](handleError(_0x1de49a,null));};exports['describe']=function(_0x54831b,_0x426da5){return db['FaxInteraction'][_0xe550('0xc1')]()['then'](respondWithResult(_0x426da5,null))['catch'](handleError(_0x426da5,null));};exports['addMessage']=function(_0x167e6e,_0x548d86,_0x3f2f65){return db[_0xe550('0xc2')][_0xe550('0x65')]({'where':{'id':_0x167e6e[_0xe550('0xbb')]['id']}})[_0xe550('0x37')](handleEntityNotFound(_0x548d86,null))['then'](function(_0x5c39f1){if(_0x5c39f1){return _0x5c39f1[_0xe550('0xc3')](_0x167e6e['body'][_0xe550('0xc4')],_[_0xe550('0xc5')](_0x167e6e[_0xe550('0xc0')],[_0xe550('0xc4'),'id'])||{});}})['then'](respondWithResult(_0x548d86,null))[_0xe550('0x38')](handleError(_0x548d86,null));};exports[_0xe550('0xc6')]=function(_0x55b906,_0x285a9a,_0xcdd2de){var _0x1024cc={'raw':![],'where':{}};var _0x1de401={};var _0x5bc061={'count':0x0,'rows':[]};return db[_0xe550('0x3b')]['findOne']({'where':{'id':_0x55b906['params']['id']}})[_0xe550('0x37')](handleEntityNotFound(_0x285a9a,null))['then'](function(_0xb23355){if(_0xb23355){_0x1de401[_0xe550('0x3f')]=_[_0xe550('0x7b')](db['FaxMessage']['rawAttributes']);_0x1de401[_0xe550('0x40')]=_['keys'](_0x55b906[_0xe550('0x40')]);_0x1de401[_0xe550('0x41')]=_['intersection'](_0x1de401[_0xe550('0x3f')],_0x1de401['query']);_0x1024cc[_0xe550('0x43')]=_[_0xe550('0x42')](_0x1de401[_0xe550('0x3f')],qs['fields'](_0x55b906['query'][_0xe550('0x44')]));_0x1024cc[_0xe550('0x43')]=_0x1024cc['attributes'][_0xe550('0x45')]?_0x1024cc['attributes']:_0x1de401[_0xe550('0x3f')];if(!_0x55b906['query'][_0xe550('0x46')](_0xe550('0x47'))){_0x1024cc[_0xe550('0x48')]=qs[_0xe550('0x48')](_0x55b906[_0xe550('0x40')][_0xe550('0x48')]);_0x1024cc[_0xe550('0x28')]=qs[_0xe550('0x28')](_0x55b906[_0xe550('0x40')][_0xe550('0x28')]);}_0x1024cc[_0xe550('0x49')]=qs['sort'](_0x55b906[_0xe550('0x40')][_0xe550('0x4a')]);_0x1024cc[_0xe550('0x80')]=qs[_0xe550('0x41')](_['pick'](_0x55b906[_0xe550('0x40')],_0x1de401['filters']));_0x1024cc[_0xe550('0x80')]['FaxInteractionId']=_0xb23355['id'];if(_0x55b906[_0xe550('0x40')][_0xe550('0x8d')]){_0x1024cc[_0xe550('0x80')]=_[_0xe550('0xa4')](_0x1024cc[_0xe550('0x80')],{'$or':_[_0xe550('0x3a')](_0x1024cc[_0xe550('0x43')],function(_0x2c7519){var _0x27212b={};_0x27212b[_0x2c7519]={'$like':'%'+_0x55b906[_0xe550('0x40')][_0xe550('0x8d')]+'%'};return _0x27212b;})});}if(_0x55b906[_0xe550('0x40')][_0xe550('0x84')]){var _0x48c408=_0x55b906[_0xe550('0x40')]['$gte']['split'](',');var _0x479f57={};_0x479f57[_0x48c408[0x0]]={'$gte':moment(_0x48c408[0x1])[_0xe550('0xc7')](_0xe550('0xc8'))};_0x1024cc[_0xe550('0x80')]=_[_0xe550('0xa4')](_0x1024cc[_0xe550('0x80')],_0x479f57);}_0x1024cc=_[_0xe550('0xa4')]({},_0x1024cc,_0x55b906[_0xe550('0xbe')]);return db[_0xe550('0xc2')][_0xe550('0x27')]({'where':_0x1024cc[_0xe550('0x80')]})[_0xe550('0x37')](function(_0x48386b){_0x5bc061[_0xe550('0x27')]=_0x48386b;if(_0x55b906['query'][_0xe550('0xbc')]){_0x1024cc[_0xe550('0xbd')]=[{'all':!![]}];}return db['FaxMessage'][_0xe550('0xc9')](_0x1024cc);})[_0xe550('0x37')](function(_0x54eefb){_0x5bc061[_0xe550('0xb9')]=_0x54eefb;return _0x5bc061;});}})[_0xe550('0x37')](respondWithFilteredResult(_0x285a9a,_0x1024cc))[_0xe550('0x38')](handleError(_0x285a9a,null));};exports['addTags']=function(_0x287412,_0x825bb1,_0x13ec39){return db[_0xe550('0x3b')][_0xe550('0x65')]({'where':{'id':_0x287412[_0xe550('0xbb')]['id']}})['then'](handleEntityNotFound(_0x825bb1,null))['then'](function(_0x209bf9){if(_0x209bf9){return _0x209bf9['setTags'](_0x287412[_0xe550('0xc0')]['ids'],_['omit'](_0x287412[_0xe550('0xc0')],[_0xe550('0xc4'),'id'])||{})[_0xe550('0xca')](function(){return db['Tag'][_0xe550('0xc9')]({'attributes':['id',_0xe550('0x30'),'color'],'where':{'id':_0x287412[_0xe550('0xc0')][_0xe550('0xc4')]}});})[_0xe550('0x37')](function(_0x207a9d){socket['emit']('faxInteractionTags:save',{'id':Number(_0x287412['params']['id']),'tags':_0x207a9d||[]});return{'id':Number(_0x287412[_0xe550('0xbb')]['id']),'tags':_0x207a9d||[]};});}})[_0xe550('0x37')](respondWithResult(_0x825bb1,null))[_0xe550('0x38')](handleError(_0x825bb1,null));};exports[_0xe550('0xcb')]=function(_0x292f46,_0x52af84,_0x2e34c5){return db[_0xe550('0x3b')]['find']({'where':{'id':_0x292f46[_0xe550('0xbb')]['id']}})[_0xe550('0x37')](handleEntityNotFound(_0x52af84,null))[_0xe550('0x37')](function(_0x3cc11f){if(_0x3cc11f){return _0x3cc11f[_0xe550('0xcb')](_0x292f46['query']['ids']);}})['then'](respondWithStatusCode(_0x52af84,null))[_0xe550('0x38')](handleError(_0x52af84,null));};exports[_0xe550('0xcc')]=function(_0x4e97e5,_0x4180b1){var _0xbba04f=moment()[_0xe550('0xcd')]()[_0xe550('0xa2')]();var _0x2ec2dc=path[_0xe550('0xce')](config[_0xe550('0xcf')],'server',_0xe550('0xd0'),_0xe550('0xd1'));var _0x4605d0=path['join'](config[_0xe550('0xcf')],'server',_0xe550('0xd0'),_0xe550('0xd2'));var _0x58cf21=path[_0xe550('0xce')](_0x2ec2dc,_0xbba04f);var _0x2e5315=util[_0xe550('0xc7')](_0xe550('0xd3'),_0x4e97e5['params']['id'],_0xbba04f);var _0x4988e2=path[_0xe550('0xce')](_0x2ec2dc,_0x2e5315);var _0x16352c=[];_0x16352c['push']({'model':db[_0xe550('0xd4')],'as':_0xe550('0xd4'),'raw':!![]});var _0x4e1150=[{'model':db['FaxMessage'],'as':'Messages','attributes':['id','body',_0xe550('0xd5')],'include':_0x16352c}];return db['FaxInteraction'][_0xe550('0x65')]({'where':{'id':_0x4e97e5['params']['id']},'include':_0x4e1150})[_0xe550('0x37')](handleEntityNotFound(_0x4180b1,null))['then'](function(_0x417fd4){if(_0x417fd4&&_0x417fd4[_0xe550('0xd6')]){var _0x4dd8da=_0x417fd4[_0xe550('0xd7')]({'plain':!![]});fs[_0xe550('0xd8')](_0x58cf21);for(var _0x2de090=0x0;_0x2de090<_0x4dd8da[_0xe550('0xd6')][_0xe550('0x45')];_0x2de090++){var _0x46f675=_0x4dd8da[_0xe550('0xd6')][_0x2de090][_0xe550('0xd4')];if(_0x46f675){var _0x5365f0=path[_0xe550('0xce')](_0x4605d0,_0x46f675[_0xe550('0xd9')]);if(fs[_0xe550('0xda')](_0x5365f0)){fs['createReadStream'](_0x5365f0)[_0xe550('0xdb')](fs['createWriteStream'](path[_0xe550('0xce')](_0x58cf21,_0x46f675[_0xe550('0xd9')])));}}}return BPromise['resolve']()['then'](function(){return new BPromise(function(_0xdd405,_0xc60b30){zipdir(_0x58cf21,{'saveTo':_0x4988e2},function(_0x2eec53,_0x5c08e0){if(_0x2eec53)return _0xc60b30(_0x2eec53);return _0xdd405(_0x5c08e0);});})[_0xe550('0x37')](function(){return new BPromise(function(_0x53b907,_0x338296){rimraf(_0x58cf21,function(_0x547aa8){if(_0x547aa8)_0x338296(_0x547aa8);return _0x53b907();});});})['then'](function(){return _0x4180b1[_0xe550('0xcc')](_0x4988e2,_0x2e5315,function(_0x26370f){if(_0x26370f){console['log'](_0xe550('0xdc'),_0x26370f);}else{fs[_0xe550('0xdd')](_0x4988e2);}});});});}else{return _0x4180b1[_0xe550('0x22')](0xc8);}})[_0xe550('0x38')](handleError(_0x4180b1,null));}; \ No newline at end of file diff --git a/server/api/faxInteraction/faxInteraction.events.js b/server/api/faxInteraction/faxInteraction.events.js index 63926a3..f6bbd78 100644 --- a/server/api/faxInteraction/faxInteraction.events.js +++ b/server/api/faxInteraction/faxInteraction.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd511=['remove','getUsers','setDataValue','Users','map','findAll','then','unreadMessages','length','emit','catch','hasOwnProperty','exports','../../mysqldb','FaxInteraction','FaxMessage','setMaxListeners','update'];(function(_0x5aaeb4,_0x5b1a5b){var _0xd3a720=function(_0x1c2237){while(--_0x1c2237){_0x5aaeb4['push'](_0x5aaeb4['shift']());}};_0xd3a720(++_0x5b1a5b);}(_0xd511,0xc1));var _0x1d51=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xd511[_0x20a584];return _0x4b41a8;};'use strict';var EventEmitter=require('events');var FaxInteraction=require(_0x1d51('0x0'))['db'][_0x1d51('0x1')];var FaxMessage=require(_0x1d51('0x0'))['db'][_0x1d51('0x2')];var FaxInteractionEvents=new EventEmitter();FaxInteractionEvents[_0x1d51('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x1d51('0x4'),'afterDestroy':_0x1d51('0x5')};function emitEvent(_0x55ba33){return function(_0x57d730,_0x5b575a,_0x3136ef){_0x57d730[_0x1d51('0x6')]({'attributes':['id'],'raw':!![]})['then'](function(_0x4cd754){_0x57d730[_0x1d51('0x7')](_0x1d51('0x8'),_0x4cd754[_0x1d51('0x9')](function(_0x2f2de9){return{'id':_0x2f2de9['id']};}));return FaxMessage[_0x1d51('0xa')]({'where':{'FaxInteractionId':_0x57d730['id'],'direction':'in','read':![]},'raw':!![]});})[_0x1d51('0xb')](function(_0x300975){_0x57d730[_0x1d51('0x7')](_0x1d51('0xc'),_0x300975[_0x1d51('0xd')]);FaxInteractionEvents[_0x1d51('0xe')](_0x55ba33+':'+_0x57d730['id'],_0x57d730);FaxInteractionEvents[_0x1d51('0xe')](_0x55ba33,_0x57d730);_0x3136ef(null);})[_0x1d51('0xf')](_0x3136ef(null));};}for(var e in events){if(events[_0x1d51('0x10')](e)){var event=events[e];FaxInteraction['hook'](e,emitEvent(event));}}module[_0x1d51('0x11')]=FaxInteractionEvents; \ No newline at end of file +var _0x6eb5=['getUsers','then','setDataValue','Users','findAll','unreadMessages','length','hasOwnProperty','hook','events','../../mysqldb','FaxInteraction','FaxMessage','setMaxListeners','save','remove'];(function(_0xe63bf7,_0x1e6042){var _0x58edc1=function(_0x492897){while(--_0x492897){_0xe63bf7['push'](_0xe63bf7['shift']());}};_0x58edc1(++_0x1e6042);}(_0x6eb5,0x119));var _0x56eb=function(_0x2c2980,_0x34282a){_0x2c2980=_0x2c2980-0x0;var _0x2a20a9=_0x6eb5[_0x2c2980];return _0x2a20a9;};'use strict';var EventEmitter=require(_0x56eb('0x0'));var FaxInteraction=require(_0x56eb('0x1'))['db'][_0x56eb('0x2')];var FaxMessage=require(_0x56eb('0x1'))['db'][_0x56eb('0x3')];var FaxInteractionEvents=new EventEmitter();FaxInteractionEvents[_0x56eb('0x4')](0x0);var events={'afterCreate':_0x56eb('0x5'),'afterUpdate':'update','afterDestroy':_0x56eb('0x6')};function emitEvent(_0x5b7630){return function(_0x58a2ba,_0x1f9001,_0x428a8e){_0x58a2ba[_0x56eb('0x7')]({'attributes':['id'],'raw':!![]})[_0x56eb('0x8')](function(_0x3e5114){_0x58a2ba[_0x56eb('0x9')](_0x56eb('0xa'),_0x3e5114['map'](function(_0x291a11){return{'id':_0x291a11['id']};}));return FaxMessage[_0x56eb('0xb')]({'where':{'FaxInteractionId':_0x58a2ba['id'],'direction':'in','read':![]},'raw':!![]});})['then'](function(_0x2b60b7){_0x58a2ba[_0x56eb('0x9')](_0x56eb('0xc'),_0x2b60b7[_0x56eb('0xd')]);FaxInteractionEvents['emit'](_0x5b7630+':'+_0x58a2ba['id'],_0x58a2ba);FaxInteractionEvents['emit'](_0x5b7630,_0x58a2ba);_0x428a8e(null);})['catch'](_0x428a8e(null));};}for(var e in events){if(events[_0x56eb('0xe')](e)){var event=events[e];FaxInteraction[_0x56eb('0xf')](e,emitEvent(event));}}module['exports']=FaxInteractionEvents; \ No newline at end of file diff --git a/server/api/faxInteraction/faxInteraction.model.js b/server/api/faxInteraction/faxInteraction.model.js index 0f7fa57..8597aa6 100644 --- a/server/api/faxInteraction/faxInteraction.model.js +++ b/server/api/faxInteraction/faxInteraction.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8a76=['FaxInteraction','changed','closed','YYYY-MM-DD\x20HH:mm:ss','lodash','../../config/logger','api','moment','path','rimraf','../../config/environment','./faxInteraction.attributes','exports','define'];(function(_0x4a7da5,_0x496177){var _0x432d85=function(_0x131c7d){while(--_0x131c7d){_0x4a7da5['push'](_0x4a7da5['shift']());}};_0x432d85(++_0x496177);}(_0x8a76,0x17e));var _0x68a7=function(_0x3c4ac5,_0x2df45f){_0x3c4ac5=_0x3c4ac5-0x0;var _0x4bb361=_0x8a76[_0x3c4ac5];return _0x4bb361;};'use strict';var _=require(_0x68a7('0x0'));var util=require('util');var logger=require(_0x68a7('0x1'))(_0x68a7('0x2'));var moment=require(_0x68a7('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x68a7('0x4'));var rimraf=require(_0x68a7('0x5'));var config=require(_0x68a7('0x6'));var attributes=require(_0x68a7('0x7'));module[_0x68a7('0x8')]=function(_0x2e623c,_0x3a0910){return _0x2e623c[_0x68a7('0x9')](_0x68a7('0xa'),attributes,{'tableName':'fax_interactions','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x1712b8,_0x1a5f7f,_0x27770e){if(_0x1712b8[_0x68a7('0xb')](_0x68a7('0xc'))){_0x1712b8['closedAt']=moment()['format'](_0x68a7('0xd'));}_0x27770e(null,_0x1712b8);}}});}; \ No newline at end of file +var _0x2469=['bluebird','path','rimraf','../../config/environment','./faxInteraction.attributes','exports','define','FaxInteraction','fax_interactions','changed','closed','closedAt','format','lodash','util','../../config/logger','api','moment'];(function(_0x2a8fc4,_0x2da687){var _0x421677=function(_0x5084a6){while(--_0x5084a6){_0x2a8fc4['push'](_0x2a8fc4['shift']());}};_0x421677(++_0x2da687);}(_0x2469,0xaf));var _0x9246=function(_0xf4dd66,_0x26fdd3){_0xf4dd66=_0xf4dd66-0x0;var _0x15e248=_0x2469[_0xf4dd66];return _0x15e248;};'use strict';var _=require(_0x9246('0x0'));var util=require(_0x9246('0x1'));var logger=require(_0x9246('0x2'))(_0x9246('0x3'));var moment=require(_0x9246('0x4'));var BPromise=require(_0x9246('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x9246('0x6'));var rimraf=require(_0x9246('0x7'));var config=require(_0x9246('0x8'));var attributes=require(_0x9246('0x9'));module[_0x9246('0xa')]=function(_0x4af43f,_0x131f26){return _0x4af43f[_0x9246('0xb')](_0x9246('0xc'),attributes,{'tableName':_0x9246('0xd'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x20da57,_0x29a5c4,_0x1f5c17){if(_0x20da57[_0x9246('0xe')](_0x9246('0xf'))){_0x20da57[_0x9246('0x10')]=moment()[_0x9246('0x11')]('YYYY-MM-DD\x20HH:mm:ss');}_0x1f5c17(null,_0x20da57);}}});}; \ No newline at end of file diff --git a/server/api/faxInteraction/faxInteraction.rpc.js b/server/api/faxInteraction/faxInteraction.rpc.js index e91dedd..0ff099a 100644 --- a/server/api/faxInteraction/faxInteraction.rpc.js +++ b/server/api/faxInteraction/faxInteraction.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x076d=['client','http','redis','defaults','socket.io-emitter','./faxInteraction.socket','register','request','info','FaxInteraction,\x20%s,\x20%s','request\x20sent','FaxInteraction,\x20%s,\x20%s,\x20%s','stringify','error','message','catch','UpdateFaxInteraction','FaxInteraction','update','raw','options','where','attributes','then','debug','AddTagsToFaxInteraction','find','addTags','body','spread','AddTags','lodash','moment','bluebird','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment'];(function(_0x34a5ee,_0x6e7b37){var _0x398c82=function(_0xebf565){while(--_0xebf565){_0x34a5ee['push'](_0x34a5ee['shift']());}};_0x398c82(++_0x6e7b37);}(_0x076d,0x157));var _0xd076=function(_0x164eca,_0x555e28){_0x164eca=_0x164eca-0x0;var _0x2ce562=_0x076d[_0x164eca];return _0x2ce562;};'use strict';var _=require(_0xd076('0x0'));var util=require('util');var moment=require(_0xd076('0x1'));var BPromise=require(_0xd076('0x2'));var rs=require(_0xd076('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xd076('0x4'))['db'];var utils=require(_0xd076('0x5'));var logger=require('../../config/logger')(_0xd076('0x6'));var config=require(_0xd076('0x7'));var jayson=require('jayson/promise');var client=jayson[_0xd076('0x8')][_0xd076('0x9')]({'port':0x232a});config[_0xd076('0xa')]=_[_0xd076('0xb')](config[_0xd076('0xa')],{'host':'localhost','port':0x18eb});var socket=require(_0xd076('0xc'))(new Redis(config[_0xd076('0xa')]));require(_0xd076('0xd'))[_0xd076('0xe')](socket);function respondWithRpcPromise(_0x1469cc,_0x212bec,_0x1122b6){return new BPromise(function(_0x2317fe,_0x62592f){return client[_0xd076('0xf')](_0x1469cc,_0x1122b6)['then'](function(_0x3bec38){logger[_0xd076('0x10')](_0xd076('0x11'),_0x212bec,_0xd076('0x12'));logger['debug'](_0xd076('0x13'),_0x212bec,_0xd076('0x12'),JSON[_0xd076('0x14')](_0x3bec38));if(_0x3bec38[_0xd076('0x15')]){if(_0x3bec38[_0xd076('0x15')]['code']===0x1f4){logger[_0xd076('0x15')]('FaxInteraction,\x20%s,\x20%s',_0x212bec,_0x3bec38[_0xd076('0x15')][_0xd076('0x16')]);return _0x62592f(_0x3bec38[_0xd076('0x15')][_0xd076('0x16')]);}logger['error'](_0xd076('0x11'),_0x212bec,_0x3bec38['error']['message']);return _0x2317fe(_0x3bec38['error'][_0xd076('0x16')]);}else{logger[_0xd076('0x10')]('FaxInteraction,\x20%s,\x20%s',_0x212bec,_0xd076('0x12'));_0x2317fe(_0x3bec38['result'][_0xd076('0x16')]);}})[_0xd076('0x17')](function(_0x3a9b0a){logger[_0xd076('0x15')](_0xd076('0x11'),_0x212bec,_0x3a9b0a);_0x62592f(_0x3a9b0a);});});}exports[_0xd076('0x18')]=function(_0x18c217){var _0x5148fc=this;return new Promise(function(_0x40df78,_0x158035){return db[_0xd076('0x19')][_0xd076('0x1a')](_0x18c217['body'],{'raw':_0x18c217['options']?_0x18c217['options'][_0xd076('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x18c217[_0xd076('0x1c')]?_0x18c217['options'][_0xd076('0x1d')]||null:null,'attributes':_0x18c217[_0xd076('0x1c')]?_0x18c217[_0xd076('0x1c')][_0xd076('0x1e')]||null:null,'limit':_0x18c217[_0xd076('0x1c')]?_0x18c217[_0xd076('0x1c')]['limit']||null:null})[_0xd076('0x1f')](function(_0x236579){logger[_0xd076('0x10')](_0xd076('0x18'),_0x18c217);logger[_0xd076('0x20')](_0xd076('0x18'),_0x18c217,JSON[_0xd076('0x14')](_0x236579));_0x40df78(_0x236579);})[_0xd076('0x17')](function(_0x3f3758){logger[_0xd076('0x15')](_0xd076('0x18'),_0x3f3758[_0xd076('0x16')],_0x18c217);_0x158035(_0x5148fc[_0xd076('0x15')](0x1f4,_0x3f3758[_0xd076('0x16')]));});});};exports[_0xd076('0x21')]=function(_0x3cbb14){return new Promise(function(_0x525207,_0x287114){return db[_0xd076('0x19')][_0xd076('0x22')]({'where':_0x3cbb14['options']?_0x3cbb14[_0xd076('0x1c')][_0xd076('0x1d')]||null:null})[_0xd076('0x1f')](function(_0x51b95c){if(_0x51b95c){return _0x51b95c[_0xd076('0x23')](_0x3cbb14[_0xd076('0x24')]['ids'],_['omit'](_0x3cbb14[_0xd076('0x24')],['ids','id'])||{});}})[_0xd076('0x25')](function(_0x39ec2e){logger[_0xd076('0x10')](_0xd076('0x26'),_0x3cbb14);logger[_0xd076('0x20')](_0xd076('0x26'),_0x3cbb14,JSON['stringify'](_0x39ec2e));_0x525207(_0x39ec2e);})[_0xd076('0x17')](function(_0x19c994){logger[_0xd076('0x15')](_0xd076('0x26'),_0x19c994[_0xd076('0x16')],_0x3cbb14);_0x287114(_this[_0xd076('0x15')](0x1f4,_0x19c994['message']));});});}; \ No newline at end of file +var _0xb392=['update','options','raw','where','attributes','limit','addTags','body','ids','spread','AddTags','lodash','util','moment','bluebird','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','redis','defaults','localhost','socket.io-emitter','./faxInteraction.socket','request','then','info','FaxInteraction,\x20%s,\x20%s','request\x20sent','debug','FaxInteraction,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','UpdateFaxInteraction','FaxInteraction'];(function(_0x5dfcd6,_0x5b6301){var _0x31f545=function(_0x3729b0){while(--_0x3729b0){_0x5dfcd6['push'](_0x5dfcd6['shift']());}};_0x31f545(++_0x5b6301);}(_0xb392,0x1ce));var _0x2b39=function(_0x41aa5d,_0x28f844){_0x41aa5d=_0x41aa5d-0x0;var _0x2aad3a=_0xb392[_0x41aa5d];return _0x2aad3a;};'use strict';var _=require(_0x2b39('0x0'));var util=require(_0x2b39('0x1'));var moment=require(_0x2b39('0x2'));var BPromise=require(_0x2b39('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x2b39('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x2b39('0x5'));var logger=require(_0x2b39('0x6'))(_0x2b39('0x7'));var config=require(_0x2b39('0x8'));var jayson=require(_0x2b39('0x9'));var client=jayson['client'][_0x2b39('0xa')]({'port':0x232a});config[_0x2b39('0xb')]=_[_0x2b39('0xc')](config[_0x2b39('0xb')],{'host':_0x2b39('0xd'),'port':0x18eb});var socket=require(_0x2b39('0xe'))(new Redis(config[_0x2b39('0xb')]));require(_0x2b39('0xf'))['register'](socket);function respondWithRpcPromise(_0x186942,_0x59ce6d,_0xe2654){return new BPromise(function(_0x1f1c63,_0xfcb0dd){return client[_0x2b39('0x10')](_0x186942,_0xe2654)[_0x2b39('0x11')](function(_0x470d38){logger[_0x2b39('0x12')](_0x2b39('0x13'),_0x59ce6d,_0x2b39('0x14'));logger[_0x2b39('0x15')](_0x2b39('0x16'),_0x59ce6d,_0x2b39('0x14'),JSON[_0x2b39('0x17')](_0x470d38));if(_0x470d38[_0x2b39('0x18')]){if(_0x470d38[_0x2b39('0x18')][_0x2b39('0x19')]===0x1f4){logger[_0x2b39('0x18')](_0x2b39('0x13'),_0x59ce6d,_0x470d38[_0x2b39('0x18')][_0x2b39('0x1a')]);return _0xfcb0dd(_0x470d38[_0x2b39('0x18')][_0x2b39('0x1a')]);}logger['error']('FaxInteraction,\x20%s,\x20%s',_0x59ce6d,_0x470d38[_0x2b39('0x18')][_0x2b39('0x1a')]);return _0x1f1c63(_0x470d38['error'][_0x2b39('0x1a')]);}else{logger[_0x2b39('0x12')](_0x2b39('0x13'),_0x59ce6d,'request\x20sent');_0x1f1c63(_0x470d38['result']['message']);}})[_0x2b39('0x1b')](function(_0x48a883){logger[_0x2b39('0x18')](_0x2b39('0x13'),_0x59ce6d,_0x48a883);_0xfcb0dd(_0x48a883);});});}exports[_0x2b39('0x1c')]=function(_0x3abca3){var _0x1042f9=this;return new Promise(function(_0x9477d9,_0x4d8c30){return db[_0x2b39('0x1d')][_0x2b39('0x1e')](_0x3abca3['body'],{'raw':_0x3abca3['options']?_0x3abca3[_0x2b39('0x1f')][_0x2b39('0x20')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3abca3[_0x2b39('0x1f')]?_0x3abca3[_0x2b39('0x1f')][_0x2b39('0x21')]||null:null,'attributes':_0x3abca3[_0x2b39('0x1f')]?_0x3abca3[_0x2b39('0x1f')][_0x2b39('0x22')]||null:null,'limit':_0x3abca3[_0x2b39('0x1f')]?_0x3abca3['options'][_0x2b39('0x23')]||null:null})[_0x2b39('0x11')](function(_0x24f209){logger['info']('UpdateFaxInteraction',_0x3abca3);logger[_0x2b39('0x15')]('UpdateFaxInteraction',_0x3abca3,JSON[_0x2b39('0x17')](_0x24f209));_0x9477d9(_0x24f209);})[_0x2b39('0x1b')](function(_0x1e99db){logger[_0x2b39('0x18')](_0x2b39('0x1c'),_0x1e99db[_0x2b39('0x1a')],_0x3abca3);_0x4d8c30(_0x1042f9[_0x2b39('0x18')](0x1f4,_0x1e99db[_0x2b39('0x1a')]));});});};exports['AddTagsToFaxInteraction']=function(_0x403571){return new Promise(function(_0x3d65b6,_0x11a8e4){return db[_0x2b39('0x1d')]['find']({'where':_0x403571['options']?_0x403571[_0x2b39('0x1f')]['where']||null:null})[_0x2b39('0x11')](function(_0x580c04){if(_0x580c04){return _0x580c04[_0x2b39('0x24')](_0x403571[_0x2b39('0x25')]['ids'],_['omit'](_0x403571[_0x2b39('0x25')],[_0x2b39('0x26'),'id'])||{});}})[_0x2b39('0x27')](function(_0x3b1840){logger['info'](_0x2b39('0x28'),_0x403571);logger[_0x2b39('0x15')]('AddTags',_0x403571,JSON['stringify'](_0x3b1840));_0x3d65b6(_0x3b1840);})[_0x2b39('0x1b')](function(_0x332bed){logger[_0x2b39('0x18')]('AddTags',_0x332bed[_0x2b39('0x1a')],_0x403571);_0x11a8e4(_this[_0x2b39('0x18')](0x1f4,_0x332bed[_0x2b39('0x1a')]));});});}; \ No newline at end of file diff --git a/server/api/faxInteraction/faxInteraction.socket.js b/server/api/faxInteraction/faxInteraction.socket.js index 2f28403..0b77150 100644 --- a/server/api/faxInteraction/faxInteraction.socket.js +++ b/server/api/faxInteraction/faxInteraction.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe429=['save','remove','update','emit','removeListener','./faxInteraction.events'];(function(_0x4c3b2a,_0x38e66e){var _0x2e0ef7=function(_0x315ea2){while(--_0x315ea2){_0x4c3b2a['push'](_0x4c3b2a['shift']());}};_0x2e0ef7(++_0x38e66e);}(_0xe429,0x16d));var _0x9e42=function(_0x405ce5,_0x1defb6){_0x405ce5=_0x405ce5-0x0;var _0x319006=_0xe429[_0x405ce5];return _0x319006;};'use strict';var FaxInteractionEvents=require(_0x9e42('0x0'));var events=[_0x9e42('0x1'),_0x9e42('0x2'),_0x9e42('0x3')];function createListener(_0x168ece,_0x3664a4){return function(_0x158a42){_0x3664a4[_0x9e42('0x4')](_0x168ece,_0x158a42);};}function removeListener(_0x5b1f08,_0x34a0c8){return function(){FaxInteractionEvents[_0x9e42('0x5')](_0x5b1f08,_0x34a0c8);};}exports['register']=function(_0x4cffe5){for(var _0x1bff46=0x0,_0x3f11d1=events['length'];_0x1bff46<_0x3f11d1;_0x1bff46++){var _0x3923e0=events[_0x1bff46];var _0x2c5100=createListener('faxInteraction:'+_0x3923e0,_0x4cffe5);FaxInteractionEvents['on'](_0x3923e0,_0x2c5100);}}; \ No newline at end of file +var _0xdb72=['emit','removeListener','register','length','save','remove','update'];(function(_0x2abbaf,_0x26e8e1){var _0x45bf3c=function(_0x2edc9c){while(--_0x2edc9c){_0x2abbaf['push'](_0x2abbaf['shift']());}};_0x45bf3c(++_0x26e8e1);}(_0xdb72,0x131));var _0x2db7=function(_0x3f8a03,_0x319b9c){_0x3f8a03=_0x3f8a03-0x0;var _0x147fb2=_0xdb72[_0x3f8a03];return _0x147fb2;};'use strict';var FaxInteractionEvents=require('./faxInteraction.events');var events=[_0x2db7('0x0'),_0x2db7('0x1'),_0x2db7('0x2')];function createListener(_0x3ca612,_0xb0a05c){return function(_0x53c5e1){_0xb0a05c[_0x2db7('0x3')](_0x3ca612,_0x53c5e1);};}function removeListener(_0x381751,_0x235857){return function(){FaxInteractionEvents[_0x2db7('0x4')](_0x381751,_0x235857);};}exports[_0x2db7('0x5')]=function(_0x23552a){for(var _0x1e9ebe=0x0,_0x5d424a=events[_0x2db7('0x6')];_0x1e9ebe<_0x5d424a;_0x1e9ebe++){var _0x5e255e=events[_0x1e9ebe];var _0x3569f5=createListener('faxInteraction:'+_0x5e255e,_0x23552a);FaxInteractionEvents['on'](_0x5e255e,_0x3569f5);}}; \ No newline at end of file diff --git a/server/api/faxInteraction/index.js b/server/api/faxInteraction/index.js index 50d65bc..568f921 100644 --- a/server/api/faxInteraction/index.js +++ b/server/api/faxInteraction/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7df1=['Router','../../components/interaction/service','../../config/environment','./faxInteraction.controller','isAuthenticated','get','describe','show','/:id/messages','/:id/download','download','post','/:id/tags','tracked','fax','faxinteraction:addtags','addTags','put','faxinteraction:update','update','/:id','faxinteraction:destroy','destroy','delete','removeTags','multer','util','path','express'];(function(_0x46f13c,_0x3733fe){var _0x5a653a=function(_0x3fb600){while(--_0x3fb600){_0x46f13c['push'](_0x46f13c['shift']());}};_0x5a653a(++_0x3733fe);}(_0x7df1,0xe4));var _0x17df=function(_0x41bcde,_0x375729){_0x41bcde=_0x41bcde-0x0;var _0x79306e=_0x7df1[_0x41bcde];return _0x79306e;};'use strict';var multer=require(_0x17df('0x0'));var util=require(_0x17df('0x1'));var path=require(_0x17df('0x2'));var timeout=require('connect-timeout');var express=require(_0x17df('0x3'));var router=express[_0x17df('0x4')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0x17df('0x5'));var config=require(_0x17df('0x6'));var controller=require(_0x17df('0x7'));router['get']('/',auth[_0x17df('0x8')](),controller['index']);router[_0x17df('0x9')]('/describe',auth['isAuthenticated'](),controller[_0x17df('0xa')]);router[_0x17df('0x9')]('/:id',auth[_0x17df('0x8')](),controller[_0x17df('0xb')]);router[_0x17df('0x9')](_0x17df('0xc'),auth['isAuthenticated'](),controller['getMessages']);router['get'](_0x17df('0xd'),auth['isAuthenticated'](),controller[_0x17df('0xe')]);router[_0x17df('0xf')]('/',auth['isAuthenticated'](),controller['create']);router[_0x17df('0xf')](_0x17df('0xc'),auth[_0x17df('0x8')](),controller['addMessage']);router[_0x17df('0xf')](_0x17df('0x10'),auth[_0x17df('0x8')](),interaction[_0x17df('0x11')](_0x17df('0x12'),_0x17df('0x13')),controller[_0x17df('0x14')]);router[_0x17df('0x15')]('/:id',auth['isAuthenticated'](),interaction[_0x17df('0x11')](_0x17df('0x12'),_0x17df('0x16')),controller[_0x17df('0x17')]);router['delete'](_0x17df('0x18'),auth['isAuthenticated'](),interaction[_0x17df('0x11')](_0x17df('0x12'),_0x17df('0x19')),controller[_0x17df('0x1a')]);router[_0x17df('0x1b')]('/:id/tags',auth[_0x17df('0x8')](),controller[_0x17df('0x1c')]);module['exports']=router; \ No newline at end of file +var _0x474f=['addMessage','tracked','faxinteraction:addtags','put','fax','faxinteraction:update','update','delete','faxinteraction:destroy','destroy','/:id/tags','removeTags','multer','path','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./faxInteraction.controller','get','isAuthenticated','index','/describe','/:id','show','/:id/messages','getMessages','/:id/download','download','post','create'];(function(_0x12d66a,_0x37d9e8){var _0x5ef7a7=function(_0x1337f6){while(--_0x1337f6){_0x12d66a['push'](_0x12d66a['shift']());}};_0x5ef7a7(++_0x37d9e8);}(_0x474f,0xac));var _0xf474=function(_0x409cad,_0x371bbf){_0x409cad=_0x409cad-0x0;var _0x565d81=_0x474f[_0x409cad];return _0x565d81;};'use strict';var multer=require(_0xf474('0x0'));var util=require('util');var path=require(_0xf474('0x1'));var timeout=require(_0xf474('0x2'));var express=require(_0xf474('0x3'));var router=express[_0xf474('0x4')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0xf474('0x5'));var config=require(_0xf474('0x6'));var controller=require(_0xf474('0x7'));router[_0xf474('0x8')]('/',auth[_0xf474('0x9')](),controller[_0xf474('0xa')]);router[_0xf474('0x8')](_0xf474('0xb'),auth[_0xf474('0x9')](),controller['describe']);router['get'](_0xf474('0xc'),auth[_0xf474('0x9')](),controller[_0xf474('0xd')]);router[_0xf474('0x8')](_0xf474('0xe'),auth[_0xf474('0x9')](),controller[_0xf474('0xf')]);router['get'](_0xf474('0x10'),auth[_0xf474('0x9')](),controller[_0xf474('0x11')]);router[_0xf474('0x12')]('/',auth['isAuthenticated'](),controller[_0xf474('0x13')]);router[_0xf474('0x12')](_0xf474('0xe'),auth[_0xf474('0x9')](),controller[_0xf474('0x14')]);router[_0xf474('0x12')]('/:id/tags',auth[_0xf474('0x9')](),interaction[_0xf474('0x15')]('fax',_0xf474('0x16')),controller['addTags']);router[_0xf474('0x17')](_0xf474('0xc'),auth[_0xf474('0x9')](),interaction['tracked'](_0xf474('0x18'),_0xf474('0x19')),controller[_0xf474('0x1a')]);router[_0xf474('0x1b')](_0xf474('0xc'),auth[_0xf474('0x9')](),interaction[_0xf474('0x15')](_0xf474('0x18'),_0xf474('0x1c')),controller[_0xf474('0x1d')]);router[_0xf474('0x1b')](_0xf474('0x1e'),auth[_0xf474('0x9')](),controller[_0xf474('0x1f')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/faxMessage/faxMessage.attributes.js b/server/api/faxMessage/faxMessage.attributes.js index c7440bb..fae232e 100644 --- a/server/api/faxMessage/faxMessage.attributes.js +++ b/server/api/faxMessage/faxMessage.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc18a=['DATE','sequelize','exports','TEXT','medium','ENUM','out'];(function(_0x877fd1,_0x5c517d){var _0x411637=function(_0x125d2e){while(--_0x125d2e){_0x877fd1['push'](_0x877fd1['shift']());}};_0x411637(++_0x5c517d);}(_0xc18a,0x1cf));var _0xac18=function(_0x48565c,_0x453bf9){_0x48565c=_0x48565c-0x0;var _0x24b921=_0xc18a[_0x48565c];return _0x24b921;};'use strict';var Sequelize=require(_0xac18('0x0'));module[_0xac18('0x1')]={'body':{'type':Sequelize[_0xac18('0x2')](_0xac18('0x3')),'allowNull':![]},'read':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'direction':{'type':Sequelize[_0xac18('0x4')]('in',_0xac18('0x5')),'defaultValue':_0xac18('0x5'),'allowNull':![]},'failMessage':{'type':Sequelize[_0xac18('0x2')],'defaultValue':null},'readAt':{'type':Sequelize[_0xac18('0x6')]}}; \ No newline at end of file +var _0x60c2=['ENUM','out','DATE','exports','TEXT','medium','BOOLEAN'];(function(_0x2546ac,_0x4472b8){var _0xd04857=function(_0x568785){while(--_0x568785){_0x2546ac['push'](_0x2546ac['shift']());}};_0xd04857(++_0x4472b8);}(_0x60c2,0x8f));var _0x260c=function(_0x1facfa,_0x1acf7d){_0x1facfa=_0x1facfa-0x0;var _0x9ec701=_0x60c2[_0x1facfa];return _0x9ec701;};'use strict';var Sequelize=require('sequelize');module[_0x260c('0x0')]={'body':{'type':Sequelize[_0x260c('0x1')](_0x260c('0x2')),'allowNull':![]},'read':{'type':Sequelize[_0x260c('0x3')],'defaultValue':![]},'direction':{'type':Sequelize[_0x260c('0x4')]('in',_0x260c('0x5')),'defaultValue':_0x260c('0x5'),'allowNull':![]},'failMessage':{'type':Sequelize[_0x260c('0x1')],'defaultValue':null},'readAt':{'type':Sequelize[_0x260c('0x6')]}}; \ No newline at end of file diff --git a/server/api/faxMessage/faxMessage.controller.js b/server/api/faxMessage/faxMessage.controller.js index 976e550..e68c6d9 100644 --- a/server/api/faxMessage/faxMessage.controller.js +++ b/server/api/faxMessage/faxMessage.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf250=['moment','bluebird','mustache','util','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/environment','defaults','redis','localhost','socket.io-emitter','jayson/promise','client','http','request','then','info','FaxMessage,\x20%s,\x20%s','request\x20sent','debug','FaxMessage,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','sendStatus','end','status','json','offset','undefined','limit','count','set','apply','save','update','destroy','stack','name','index','map','FaxMessage','rawAttributes','fieldName','type','key','keys','query','intersection','model','attributes','fields','length','hasOwnProperty','order','sort','where','filters','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','show','find','body','params','describe','accept','fax','read','readAt','format','YYYY-MM-DD\x20HH:mm:ss','UserId','user','agent','CmContact','Contact','get','isNil','read1stAt','interaction','role','stringify','null','AcceptMessage','acceptMessage','startsWith','push','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','sequelize','QueryTypes','contact','manual','interface','SIP/%s','channel','event','EventManager','acceptmessage','fax-interactions','reject','FaxInteraction','FaxInteractionId','rejectMessage','cf_','ContactId','Sequelize','SELECT','rejectmessage','create','findOne','Attachment','AttachmentId','SendFax','FaxAccountId','basename','root','server','files','attachments','download','join','eml-format','rimraf','zip-dir','fast-json-patch','request-promise'];(function(_0x35825e,_0x657421){var _0x4f4d90=function(_0x160265){while(--_0x160265){_0x35825e['push'](_0x35825e['shift']());}};_0x4f4d90(++_0x657421);}(_0xf250,0x121));var _0x0f25=function(_0x845304,_0x154c0f){_0x845304=_0x845304-0x0;var _0x51c06d=_0xf250[_0x845304];return _0x51c06d;};'use strict';var emlformat=require(_0x0f25('0x0'));var rimraf=require(_0x0f25('0x1'));var zipdir=require(_0x0f25('0x2'));var jsonpatch=require(_0x0f25('0x3'));var rp=require(_0x0f25('0x4'));var moment=require(_0x0f25('0x5'));var BPromise=require(_0x0f25('0x6'));var Mustache=require(_0x0f25('0x7'));var util=require(_0x0f25('0x8'));var path=require('path');var sox=require('sox');var csv=require(_0x0f25('0x9'));var ejs=require(_0x0f25('0xa'));var fs=require('fs');var fs_extra=require(_0x0f25('0xb'));var _=require(_0x0f25('0xc'));var squel=require(_0x0f25('0xd'));var crypto=require(_0x0f25('0xe'));var jsforce=require(_0x0f25('0xf'));var deskjs=require(_0x0f25('0x10'));var toCsv=require(_0x0f25('0x9'));var querystring=require('querystring');var Papa=require(_0x0f25('0x11'));var Redis=require(_0x0f25('0x12'));var authService=require(_0x0f25('0x13'));var qs=require(_0x0f25('0x14'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x0f25('0x15'));var logger=require(_0x0f25('0x16'))(_0x0f25('0x17'));var utils=require('../../config/utils');var config=require(_0x0f25('0x18'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];config['redis']=_[_0x0f25('0x19')](config[_0x0f25('0x1a')],{'host':_0x0f25('0x1b'),'port':0x18eb});var socket=require(_0x0f25('0x1c'))(new Redis(config['redis']));require('./faxMessage.socket')['register'](socket);var jayson=require(_0x0f25('0x1d'));var client=jayson[_0x0f25('0x1e')][_0x0f25('0x1f')]({'port':0x232c});var client9002=jayson[_0x0f25('0x1e')][_0x0f25('0x1f')]({'port':0x232a});function respondWithRpcPromise(_0x238d5c,_0x1a4958,_0x448295,_0x255344){return new BPromise(function(_0x239972,_0x2d30b1){var _0x840911=_0x255344||client;return _0x840911[_0x0f25('0x20')](_0x238d5c,_0x448295)[_0x0f25('0x21')](function(_0x1f3119){logger[_0x0f25('0x22')](_0x0f25('0x23'),_0x1a4958,_0x0f25('0x24'));logger[_0x0f25('0x25')](_0x0f25('0x26'),_0x1a4958,_0x0f25('0x24'),JSON['stringify'](_0x1f3119));if(_0x1f3119[_0x0f25('0x27')]){if(_0x1f3119[_0x0f25('0x27')][_0x0f25('0x28')]===0x1f4){logger['error'](_0x0f25('0x23'),_0x1a4958,_0x1f3119[_0x0f25('0x27')][_0x0f25('0x29')]);return _0x2d30b1(_0x1f3119[_0x0f25('0x27')]['message']);}logger[_0x0f25('0x27')](_0x0f25('0x23'),_0x1a4958,_0x1f3119[_0x0f25('0x27')][_0x0f25('0x29')]);return _0x239972(_0x1f3119['error'][_0x0f25('0x29')]);}else{logger[_0x0f25('0x22')]('FaxMessage,\x20%s,\x20%s',_0x1a4958,_0x0f25('0x24'));_0x239972(_0x1f3119[_0x0f25('0x2a')][_0x0f25('0x29')]);}})[_0x0f25('0x2b')](function(_0x5338d4){logger[_0x0f25('0x27')](_0x0f25('0x23'),_0x1a4958,_0x5338d4);_0x2d30b1(_0x5338d4);});});}function respondWithStatusCode(_0x2796d2,_0x1ceba0){_0x1ceba0=_0x1ceba0||0xcc;return function(_0x56da3d){if(_0x56da3d){return _0x2796d2[_0x0f25('0x2c')](_0x1ceba0);}return _0x2796d2['status'](_0x1ceba0)[_0x0f25('0x2d')]();};}function respondWithResult(_0x36ef73,_0x571431){_0x571431=_0x571431||0xc8;return function(_0x37bcff){if(_0x37bcff){return _0x36ef73[_0x0f25('0x2e')](_0x571431)[_0x0f25('0x2f')](_0x37bcff);}};}function respondWithFilteredResult(_0x3f91af,_0x193de6){return function(_0x655136){if(_0x655136){var _0x161c04=typeof _0x193de6[_0x0f25('0x30')]===_0x0f25('0x31')&&typeof _0x193de6[_0x0f25('0x32')]===_0x0f25('0x31');var _0x20256b=_0x655136[_0x0f25('0x33')];var _0x5333b6=_0x161c04?0x0:_0x193de6[_0x0f25('0x30')];var _0xfff534=_0x161c04?_0x655136[_0x0f25('0x33')]:_0x193de6[_0x0f25('0x30')]+_0x193de6['limit'];var _0x1ec747;if(_0xfff534>=_0x20256b){_0xfff534=_0x20256b;_0x1ec747=0xc8;}else{_0x1ec747=0xce;}_0x3f91af[_0x0f25('0x2e')](_0x1ec747);return _0x3f91af[_0x0f25('0x34')]('Content-Range',_0x5333b6+'-'+_0xfff534+'/'+_0x20256b)['json'](_0x655136);}return null;};}function patchUpdates(_0x177740){return function(_0xca4c4e){try{jsonpatch[_0x0f25('0x35')](_0xca4c4e,_0x177740,!![]);}catch(_0xec089a){return BPromise['reject'](_0xec089a);}return _0xca4c4e[_0x0f25('0x36')]();};}function saveUpdates(_0x4ca00d,_0x36e6f4){return function(_0x525ff5){if(_0x525ff5){return _0x525ff5[_0x0f25('0x37')](_0x4ca00d)['then'](function(_0x4bdde6){return _0x4bdde6;});}return null;};}function removeEntity(_0x227a39,_0x27b0b8){return function(_0xbbe58e){if(_0xbbe58e){return _0xbbe58e[_0x0f25('0x38')]()[_0x0f25('0x21')](function(){_0x227a39['status'](0xcc)[_0x0f25('0x2d')]();});}};}function handleEntityNotFound(_0x3e3e6b,_0x257ef0){return function(_0x2396ef){if(!_0x2396ef){_0x3e3e6b[_0x0f25('0x2c')](0x194);}return _0x2396ef;};}function handleError(_0x1d46c7,_0x2eae37){_0x2eae37=_0x2eae37||0x1f4;return function(_0x5f355f){logger[_0x0f25('0x27')](_0x5f355f[_0x0f25('0x39')]);if(_0x5f355f[_0x0f25('0x3a')]){delete _0x5f355f[_0x0f25('0x3a')];}_0x1d46c7[_0x0f25('0x2e')](_0x2eae37)['send'](_0x5f355f);};}exports[_0x0f25('0x3b')]=function(_0x8b1137,_0x311a8d){var _0x4504bf={},_0x377216={},_0x3a3b9b={'count':0x0,'rows':[]};var _0x2be2bb=_[_0x0f25('0x3c')](db[_0x0f25('0x3d')][_0x0f25('0x3e')],function(_0x4fcfce){return{'name':_0x4fcfce[_0x0f25('0x3f')],'type':_0x4fcfce[_0x0f25('0x40')][_0x0f25('0x41')]};});_0x377216['model']=_[_0x0f25('0x3c')](_0x2be2bb,'name');_0x377216['query']=_[_0x0f25('0x42')](_0x8b1137[_0x0f25('0x43')]);_0x377216['filters']=_[_0x0f25('0x44')](_0x377216[_0x0f25('0x45')],_0x377216['query']);_0x4504bf[_0x0f25('0x46')]=_[_0x0f25('0x44')](_0x377216[_0x0f25('0x45')],qs[_0x0f25('0x47')](_0x8b1137[_0x0f25('0x43')][_0x0f25('0x47')]));_0x4504bf[_0x0f25('0x46')]=_0x4504bf[_0x0f25('0x46')][_0x0f25('0x48')]?_0x4504bf[_0x0f25('0x46')]:_0x377216[_0x0f25('0x45')];if(!_0x8b1137[_0x0f25('0x43')][_0x0f25('0x49')]('nolimit')){_0x4504bf[_0x0f25('0x32')]=qs[_0x0f25('0x32')](_0x8b1137[_0x0f25('0x43')]['limit']);_0x4504bf[_0x0f25('0x30')]=qs[_0x0f25('0x30')](_0x8b1137[_0x0f25('0x43')][_0x0f25('0x30')]);}_0x4504bf[_0x0f25('0x4a')]=qs[_0x0f25('0x4b')](_0x8b1137[_0x0f25('0x43')]['sort']);_0x4504bf[_0x0f25('0x4c')]=qs['filters'](_['pick'](_0x8b1137[_0x0f25('0x43')],_0x377216[_0x0f25('0x4d')]),_0x2be2bb);if(_0x8b1137[_0x0f25('0x43')][_0x0f25('0x4e')]){_0x4504bf[_0x0f25('0x4c')]=_[_0x0f25('0x4f')](_0x4504bf[_0x0f25('0x4c')],{'$or':_[_0x0f25('0x3c')](_0x2be2bb,function(_0x41e1ab){if(_0x41e1ab[_0x0f25('0x40')]!==_0x0f25('0x50')){var _0x561609={};_0x561609[_0x41e1ab[_0x0f25('0x3a')]]={'$like':'%'+_0x8b1137['query'][_0x0f25('0x4e')]+'%'};return _0x561609;}})});}_0x4504bf=_[_0x0f25('0x4f')]({},_0x4504bf,_0x8b1137[_0x0f25('0x51')]);var _0x48844d={'where':_0x4504bf['where']};return db['FaxMessage'][_0x0f25('0x33')](_0x48844d)[_0x0f25('0x21')](function(_0x20f4ca){_0x3a3b9b[_0x0f25('0x33')]=_0x20f4ca;if(_0x8b1137[_0x0f25('0x43')][_0x0f25('0x52')]){_0x4504bf[_0x0f25('0x53')]=[{'all':!![]}];}return db[_0x0f25('0x3d')][_0x0f25('0x54')](_0x4504bf);})[_0x0f25('0x21')](function(_0x213514){_0x3a3b9b[_0x0f25('0x55')]=_0x213514;return _0x3a3b9b;})[_0x0f25('0x21')](respondWithFilteredResult(_0x311a8d,_0x4504bf))[_0x0f25('0x2b')](handleError(_0x311a8d,null));};exports[_0x0f25('0x56')]=function(_0x184567,_0x1d2594){var _0x1240ac={'raw':!![],'where':{'id':_0x184567['params']['id']}},_0x133901={};_0x133901[_0x0f25('0x45')]=_[_0x0f25('0x42')](db[_0x0f25('0x3d')][_0x0f25('0x3e')]);_0x133901[_0x0f25('0x43')]=_[_0x0f25('0x42')](_0x184567['query']);_0x133901[_0x0f25('0x4d')]=_[_0x0f25('0x44')](_0x133901['model'],_0x133901[_0x0f25('0x43')]);_0x1240ac['attributes']=_[_0x0f25('0x44')](_0x133901[_0x0f25('0x45')],qs['fields'](_0x184567['query'][_0x0f25('0x47')]));_0x1240ac[_0x0f25('0x46')]=_0x1240ac[_0x0f25('0x46')]['length']?_0x1240ac[_0x0f25('0x46')]:_0x133901[_0x0f25('0x45')];if(_0x184567[_0x0f25('0x43')][_0x0f25('0x52')]){_0x1240ac[_0x0f25('0x53')]=[{'all':!![]}];}_0x1240ac=_[_0x0f25('0x4f')]({},_0x1240ac,_0x184567['options']);return db[_0x0f25('0x3d')][_0x0f25('0x57')](_0x1240ac)[_0x0f25('0x21')](handleEntityNotFound(_0x1d2594,null))['then'](respondWithResult(_0x1d2594,null))[_0x0f25('0x2b')](handleError(_0x1d2594,null));};exports[_0x0f25('0x37')]=function(_0x58d616,_0x39c1d1){if(_0x58d616['body']['id']){delete _0x58d616[_0x0f25('0x58')]['id'];}return db[_0x0f25('0x3d')][_0x0f25('0x57')]({'where':{'id':_0x58d616[_0x0f25('0x59')]['id']}})[_0x0f25('0x21')](handleEntityNotFound(_0x39c1d1,null))[_0x0f25('0x21')](saveUpdates(_0x58d616[_0x0f25('0x58')],null))['then'](respondWithResult(_0x39c1d1,null))[_0x0f25('0x2b')](handleError(_0x39c1d1,null));};exports[_0x0f25('0x38')]=function(_0x1f4d7a,_0x53d760){return db[_0x0f25('0x3d')][_0x0f25('0x57')]({'where':{'id':_0x1f4d7a[_0x0f25('0x59')]['id']}})[_0x0f25('0x21')](handleEntityNotFound(_0x53d760,null))['then'](removeEntity(_0x53d760,null))[_0x0f25('0x2b')](handleError(_0x53d760,null));};exports['describe']=function(_0xededf,_0x5a6778){return db[_0x0f25('0x3d')][_0x0f25('0x5a')]()[_0x0f25('0x21')](respondWithResult(_0x5a6778,null))['catch'](handleError(_0x5a6778,null));};var interaction_log=require(_0x0f25('0x16'))('fax-interactions');exports[_0x0f25('0x5b')]=function(_0x2ce6ba,_0x354f00,_0x4f92a6){var _0x196838={'agent':{},'channel':_0x0f25('0x5c')};if(_0x2ce6ba[_0x0f25('0x58')]['id']){delete _0x2ce6ba[_0x0f25('0x58')]['id'];}_0x2ce6ba[_0x0f25('0x58')][_0x0f25('0x5d')]=!![];_0x2ce6ba[_0x0f25('0x58')][_0x0f25('0x5e')]=moment()[_0x0f25('0x5f')](_0x0f25('0x60'));_0x2ce6ba['body']['UserId']=_0x2ce6ba[_0x0f25('0x58')][_0x0f25('0x61')]||_0x2ce6ba[_0x0f25('0x62')]['id'];_0x196838[_0x0f25('0x63')]['id']=_0x2ce6ba[_0x0f25('0x58')][_0x0f25('0x61')];return db['FaxMessage'][_0x0f25('0x57')]({'where':{'id':_0x2ce6ba[_0x0f25('0x59')]['id'],'UserId':null},'include':[{'model':db[_0x0f25('0x64')],'as':_0x0f25('0x65')}]})[_0x0f25('0x21')](handleEntityNotFound(_0x354f00,null))[_0x0f25('0x21')](saveUpdates(_0x2ce6ba[_0x0f25('0x58')],null))[_0x0f25('0x21')](function(_0x3a6546){if(_0x3a6546){_0x196838['message']=_0x3a6546[_0x0f25('0x66')]({'plain':!![]});return db['FaxInteraction']['find']({'where':{'id':_0x3a6546['FaxInteractionId']}});}return null;})['then'](handleEntityNotFound(_0x354f00,null))['then'](function(_0x2468a9){if(_0x2468a9){return _0x2468a9[_0x0f25('0x37')]({'UserId':_0x2ce6ba[_0x0f25('0x58')][_0x0f25('0x61')],'read1stAt':_[_0x0f25('0x67')](_0x2468a9[_0x0f25('0x68')])?moment()[_0x0f25('0x5f')](_0x0f25('0x60')):undefined});}return null;})['then'](function(_0x2266a4){if(_0x2266a4){_0x196838[_0x0f25('0x69')]=_0x2266a4[_0x0f25('0x66')]({'plain':!![]});interaction_log[_0x0f25('0x22')]('[FAXMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x2ce6ba['user']['id'],_0x2ce6ba[_0x0f25('0x62')][_0x0f25('0x3a')],_0x2ce6ba[_0x0f25('0x62')][_0x0f25('0x6a')],_0x196838[_0x0f25('0x69')]['id'],_0x2ce6ba[_0x0f25('0x58')]?JSON[_0x0f25('0x6b')](_0x2ce6ba[_0x0f25('0x58')]):_0x0f25('0x6c'));return respondWithRpcPromise(_0x0f25('0x6d'),_0x0f25('0x6e'),_0x196838);}return null;})[_0x0f25('0x21')](function(_0x4d9f4f){return db[_0x0f25('0x64')][_0x0f25('0x5a')]()[_0x0f25('0x21')](function(_0xdf2d3a){var _0x10c035=[];for(var _0x4bc0dd=0x0;_0x4bc0dd=_0x3eefc1){_0x55de1e=_0x3eefc1;_0x358b95=0xc8;}else{_0x358b95=0xce;}_0x4a87b1[_0x3a86('0x2f')](_0x358b95);return _0x4a87b1['set'](_0x3a86('0x30'),_0x5b2238+'-'+_0x55de1e+'/'+_0x3eefc1)[_0x3a86('0x2a')](_0x1ad1f7);}return null;};}function patchUpdates(_0x18d1ae){return function(_0x42bb54){try{jsonpatch[_0x3a86('0x31')](_0x42bb54,_0x18d1ae,!![]);}catch(_0x482f76){return BPromise['reject'](_0x482f76);}return _0x42bb54[_0x3a86('0x32')]();};}function saveUpdates(_0x3e0ab9,_0x8285d5){return function(_0x221d7f){if(_0x221d7f){return _0x221d7f['update'](_0x3e0ab9)[_0x3a86('0x1e')](function(_0x456d26){return _0x456d26;});}return null;};}function removeEntity(_0x2c7deb,_0x59ff98){return function(_0x1f47fb){if(_0x1f47fb){return _0x1f47fb[_0x3a86('0x33')]()['then'](function(){_0x2c7deb[_0x3a86('0x2f')](0xcc)['end']();});}};}function handleEntityNotFound(_0x2cd690,_0x46631e){return function(_0x38dc5f){if(!_0x38dc5f){_0x2cd690['sendStatus'](0x194);}return _0x38dc5f;};}function handleError(_0x5bc8d1,_0x1c2922){_0x1c2922=_0x1c2922||0x1f4;return function(_0x1627c0){logger[_0x3a86('0x24')](_0x1627c0[_0x3a86('0x34')]);if(_0x1627c0[_0x3a86('0x35')]){delete _0x1627c0[_0x3a86('0x35')];}_0x5bc8d1[_0x3a86('0x2f')](_0x1c2922)[_0x3a86('0x36')](_0x1627c0);};}exports[_0x3a86('0x37')]=function(_0x2590f5,_0x4b325a){var _0x5268d4={},_0x2779d6={},_0xf2262a={'count':0x0,'rows':[]};var _0x5da8a6=_[_0x3a86('0x38')](db[_0x3a86('0x39')]['rawAttributes'],function(_0x14d1c5){return{'name':_0x14d1c5[_0x3a86('0x3a')],'type':_0x14d1c5[_0x3a86('0x3b')]['key']};});_0x2779d6[_0x3a86('0x3c')]=_['map'](_0x5da8a6,_0x3a86('0x35'));_0x2779d6[_0x3a86('0x3d')]=_['keys'](_0x2590f5[_0x3a86('0x3d')]);_0x2779d6[_0x3a86('0x3e')]=_[_0x3a86('0x3f')](_0x2779d6[_0x3a86('0x3c')],_0x2779d6[_0x3a86('0x3d')]);_0x5268d4[_0x3a86('0x40')]=_[_0x3a86('0x3f')](_0x2779d6[_0x3a86('0x3c')],qs[_0x3a86('0x41')](_0x2590f5[_0x3a86('0x3d')][_0x3a86('0x41')]));_0x5268d4[_0x3a86('0x40')]=_0x5268d4[_0x3a86('0x40')][_0x3a86('0x42')]?_0x5268d4[_0x3a86('0x40')]:_0x2779d6[_0x3a86('0x3c')];if(!_0x2590f5[_0x3a86('0x3d')][_0x3a86('0x43')](_0x3a86('0x44'))){_0x5268d4[_0x3a86('0x2d')]=qs[_0x3a86('0x2d')](_0x2590f5[_0x3a86('0x3d')]['limit']);_0x5268d4[_0x3a86('0x2b')]=qs[_0x3a86('0x2b')](_0x2590f5[_0x3a86('0x3d')]['offset']);}_0x5268d4[_0x3a86('0x45')]=qs[_0x3a86('0x46')](_0x2590f5[_0x3a86('0x3d')][_0x3a86('0x46')]);_0x5268d4[_0x3a86('0x47')]=qs[_0x3a86('0x3e')](_['pick'](_0x2590f5[_0x3a86('0x3d')],_0x2779d6[_0x3a86('0x3e')]),_0x5da8a6);if(_0x2590f5['query'][_0x3a86('0x48')]){_0x5268d4[_0x3a86('0x47')]=_[_0x3a86('0x49')](_0x5268d4[_0x3a86('0x47')],{'$or':_['map'](_0x5da8a6,function(_0x4a51a3){if(_0x4a51a3[_0x3a86('0x3b')]!==_0x3a86('0x4a')){var _0x368dd6={};_0x368dd6[_0x4a51a3['name']]={'$like':'%'+_0x2590f5[_0x3a86('0x3d')][_0x3a86('0x48')]+'%'};return _0x368dd6;}})});}_0x5268d4=_['merge']({},_0x5268d4,_0x2590f5['options']);var _0x47361f={'where':_0x5268d4['where']};return db[_0x3a86('0x39')]['count'](_0x47361f)[_0x3a86('0x1e')](function(_0xaa811){_0xf2262a['count']=_0xaa811;if(_0x2590f5[_0x3a86('0x3d')][_0x3a86('0x4b')]){_0x5268d4['include']=[{'all':!![]}];}return db[_0x3a86('0x39')][_0x3a86('0x4c')](_0x5268d4);})[_0x3a86('0x1e')](function(_0x2a6187){_0xf2262a['rows']=_0x2a6187;return _0xf2262a;})['then'](respondWithFilteredResult(_0x4b325a,_0x5268d4))[_0x3a86('0x27')](handleError(_0x4b325a,null));};exports[_0x3a86('0x4d')]=function(_0x497452,_0x667836){var _0x5d3c44={'raw':!![],'where':{'id':_0x497452[_0x3a86('0x4e')]['id']}},_0x1833fa={};_0x1833fa['model']=_[_0x3a86('0x4f')](db[_0x3a86('0x39')][_0x3a86('0x50')]);_0x1833fa[_0x3a86('0x3d')]=_['keys'](_0x497452[_0x3a86('0x3d')]);_0x1833fa['filters']=_[_0x3a86('0x3f')](_0x1833fa[_0x3a86('0x3c')],_0x1833fa[_0x3a86('0x3d')]);_0x5d3c44[_0x3a86('0x40')]=_[_0x3a86('0x3f')](_0x1833fa['model'],qs['fields'](_0x497452[_0x3a86('0x3d')][_0x3a86('0x41')]));_0x5d3c44[_0x3a86('0x40')]=_0x5d3c44['attributes'][_0x3a86('0x42')]?_0x5d3c44[_0x3a86('0x40')]:_0x1833fa['model'];if(_0x497452[_0x3a86('0x3d')][_0x3a86('0x4b')]){_0x5d3c44[_0x3a86('0x51')]=[{'all':!![]}];}_0x5d3c44=_[_0x3a86('0x49')]({},_0x5d3c44,_0x497452[_0x3a86('0x52')]);return db[_0x3a86('0x39')]['find'](_0x5d3c44)['then'](handleEntityNotFound(_0x667836,null))[_0x3a86('0x1e')](respondWithResult(_0x667836,null))[_0x3a86('0x27')](handleError(_0x667836,null));};exports[_0x3a86('0x53')]=function(_0x287364,_0x3891d3){if(_0x287364[_0x3a86('0x54')]['id']){delete _0x287364['body']['id'];}return db[_0x3a86('0x39')][_0x3a86('0x55')]({'where':{'id':_0x287364[_0x3a86('0x4e')]['id']}})[_0x3a86('0x1e')](handleEntityNotFound(_0x3891d3,null))[_0x3a86('0x1e')](saveUpdates(_0x287364[_0x3a86('0x54')],null))['then'](respondWithResult(_0x3891d3,null))[_0x3a86('0x27')](handleError(_0x3891d3,null));};exports[_0x3a86('0x33')]=function(_0x1df200,_0xc3dea5){return db['FaxMessage'][_0x3a86('0x55')]({'where':{'id':_0x1df200['params']['id']}})[_0x3a86('0x1e')](handleEntityNotFound(_0xc3dea5,null))[_0x3a86('0x1e')](removeEntity(_0xc3dea5,null))[_0x3a86('0x27')](handleError(_0xc3dea5,null));};exports[_0x3a86('0x56')]=function(_0x1eb2e8,_0xf6b4da){return db[_0x3a86('0x39')][_0x3a86('0x56')]()[_0x3a86('0x1e')](respondWithResult(_0xf6b4da,null))[_0x3a86('0x27')](handleError(_0xf6b4da,null));};var interaction_log=require(_0x3a86('0x12'))(_0x3a86('0x57'));exports[_0x3a86('0x58')]=function(_0x3ba38f,_0x492bc3,_0x5cd496){var _0x3c433e={'agent':{},'channel':_0x3a86('0x59')};if(_0x3ba38f[_0x3a86('0x54')]['id']){delete _0x3ba38f[_0x3a86('0x54')]['id'];}_0x3ba38f[_0x3a86('0x54')]['read']=!![];_0x3ba38f['body'][_0x3a86('0x5a')]=moment()[_0x3a86('0x5b')](_0x3a86('0x5c'));_0x3ba38f[_0x3a86('0x54')][_0x3a86('0x5d')]=_0x3ba38f[_0x3a86('0x54')]['UserId']||_0x3ba38f[_0x3a86('0x5e')]['id'];_0x3c433e[_0x3a86('0x5f')]['id']=_0x3ba38f[_0x3a86('0x54')][_0x3a86('0x5d')];return db[_0x3a86('0x39')][_0x3a86('0x55')]({'where':{'id':_0x3ba38f[_0x3a86('0x4e')]['id'],'UserId':null},'include':[{'model':db['CmContact'],'as':_0x3a86('0x60')}]})[_0x3a86('0x1e')](handleEntityNotFound(_0x492bc3,null))['then'](saveUpdates(_0x3ba38f[_0x3a86('0x54')],null))[_0x3a86('0x1e')](function(_0x56a5fe){if(_0x56a5fe){_0x3c433e[_0x3a86('0x26')]=_0x56a5fe[_0x3a86('0x61')]({'plain':!![]});return db[_0x3a86('0x62')][_0x3a86('0x55')]({'where':{'id':_0x56a5fe[_0x3a86('0x63')]}});}return null;})[_0x3a86('0x1e')](handleEntityNotFound(_0x492bc3,null))[_0x3a86('0x1e')](function(_0x218314){if(_0x218314){return _0x218314[_0x3a86('0x53')]({'UserId':_0x3ba38f[_0x3a86('0x54')][_0x3a86('0x5d')],'read1stAt':_['isNil'](_0x218314[_0x3a86('0x64')])?moment()['format'](_0x3a86('0x5c')):undefined});}return null;})['then'](function(_0x151f59){if(_0x151f59){_0x3c433e['interaction']=_0x151f59[_0x3a86('0x61')]({'plain':!![]});interaction_log[_0x3a86('0x1f')](_0x3a86('0x65'),_0x3ba38f[_0x3a86('0x5e')]['id'],_0x3ba38f[_0x3a86('0x5e')][_0x3a86('0x35')],_0x3ba38f[_0x3a86('0x5e')]['role'],_0x3c433e['interaction']['id'],_0x3ba38f[_0x3a86('0x54')]?JSON[_0x3a86('0x23')](_0x3ba38f[_0x3a86('0x54')]):_0x3a86('0x66'));return respondWithRpcPromise('AcceptMessage',_0x3a86('0x67'),_0x3c433e);}return null;})[_0x3a86('0x1e')](function(_0x1c0d5d){return db['CmContact'][_0x3a86('0x56')]()['then'](function(_0x461a27){var _0x32aea1=[];for(var _0xf0922f=0x0;_0xf0922f=_0x3b0bab){_0x33753f=_0x3b0bab;_0xc1f453=0xc8;}else{_0xc1f453=0xce;}_0x122769[_0x6b01('0x1a')](_0xc1f453);return _0x122769[_0x6b01('0x20')](_0x6b01('0x21'),_0x5a7d75+'-'+_0x33753f+'/'+_0x3b0bab)[_0x6b01('0x1b')](_0x9c6571);}return null;};}function patchUpdates(_0x2cea6e){return function(_0x542fab){try{jsonpatch[_0x6b01('0x22')](_0x542fab,_0x2cea6e,!![]);}catch(_0xcf9200){return BPromise[_0x6b01('0x23')](_0xcf9200);}return _0x542fab['save']();};}function saveUpdates(_0x399808,_0x70a1c0){return function(_0x304393){if(_0x304393){return _0x304393[_0x6b01('0x24')](_0x399808)[_0x6b01('0x25')](function(_0x2456e9){return _0x2456e9;});}return null;};}function removeEntity(_0x1b46fb,_0x136452){return function(_0x3ad5bb){if(_0x3ad5bb){return _0x3ad5bb[_0x6b01('0x26')]()[_0x6b01('0x25')](function(){var _0xa846d8=_0x3ad5bb[_0x6b01('0x27')]({'plain':!![]});var _0x55ca4b=_0x6b01('0x28');return db[_0x6b01('0x29')][_0x6b01('0x26')]({'where':{'type':_0x55ca4b,'resourceId':_0xa846d8['id']}})[_0x6b01('0x25')](function(){return _0x3ad5bb;});})[_0x6b01('0x25')](function(){_0x1b46fb['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x3fae61,_0x3df3d4){return function(_0xc574c){if(!_0xc574c){_0x3fae61[_0x6b01('0x2a')](0x194);}return _0xc574c;};}function handleError(_0x2a894e,_0x25d38d){_0x25d38d=_0x25d38d||0x1f4;return function(_0x542ca0){logger[_0x6b01('0x2b')](_0x542ca0['stack']);if(_0x542ca0[_0x6b01('0x2c')]){delete _0x542ca0['name'];}_0x2a894e[_0x6b01('0x1a')](_0x25d38d)[_0x6b01('0x2d')](_0x542ca0);};}exports[_0x6b01('0x2e')]=function(_0x1606ee,_0x3c8009){var _0x54575c={},_0x25ef16={},_0x2b4a20={'count':0x0,'rows':[]};var _0x3bb4b1=_['map'](db['FaxQueue'][_0x6b01('0x2f')],function(_0x4f17b3){return{'name':_0x4f17b3[_0x6b01('0x30')],'type':_0x4f17b3[_0x6b01('0x31')][_0x6b01('0x32')]};});_0x25ef16['model']=_[_0x6b01('0x33')](_0x3bb4b1,_0x6b01('0x2c'));_0x25ef16[_0x6b01('0x34')]=_['keys'](_0x1606ee[_0x6b01('0x34')]);_0x25ef16[_0x6b01('0x35')]=_[_0x6b01('0x36')](_0x25ef16[_0x6b01('0x37')],_0x25ef16[_0x6b01('0x34')]);_0x54575c['attributes']=_[_0x6b01('0x36')](_0x25ef16[_0x6b01('0x37')],qs[_0x6b01('0x38')](_0x1606ee[_0x6b01('0x34')][_0x6b01('0x38')]));_0x54575c[_0x6b01('0x39')]=_0x54575c[_0x6b01('0x39')][_0x6b01('0x3a')]?_0x54575c['attributes']:_0x25ef16[_0x6b01('0x37')];if(!_0x1606ee['query'][_0x6b01('0x3b')](_0x6b01('0x3c'))){_0x54575c[_0x6b01('0x1d')]=qs[_0x6b01('0x1d')](_0x1606ee[_0x6b01('0x34')][_0x6b01('0x1d')]);_0x54575c[_0x6b01('0x1c')]=qs['offset'](_0x1606ee[_0x6b01('0x34')][_0x6b01('0x1c')]);}_0x54575c[_0x6b01('0x3d')]=qs[_0x6b01('0x3e')](_0x1606ee[_0x6b01('0x34')][_0x6b01('0x3e')]);_0x54575c[_0x6b01('0x3f')]=qs[_0x6b01('0x35')](_['pick'](_0x1606ee[_0x6b01('0x34')],_0x25ef16['filters']),_0x3bb4b1);if(_0x1606ee[_0x6b01('0x34')][_0x6b01('0x40')]){_0x54575c['where']=_[_0x6b01('0x41')](_0x54575c[_0x6b01('0x3f')],{'$or':_[_0x6b01('0x33')](_0x3bb4b1,function(_0x45952a){if(_0x45952a[_0x6b01('0x31')]!==_0x6b01('0x42')){var _0x652fc2={};_0x652fc2[_0x45952a[_0x6b01('0x2c')]]={'$like':'%'+_0x1606ee[_0x6b01('0x34')][_0x6b01('0x40')]+'%'};return _0x652fc2;}})});}_0x54575c=_['merge']({},_0x54575c,_0x1606ee[_0x6b01('0x43')]);var _0x239254={'where':_0x54575c['where']};return db['FaxQueue'][_0x6b01('0x1f')](_0x239254)[_0x6b01('0x25')](function(_0x558ec1){_0x2b4a20[_0x6b01('0x1f')]=_0x558ec1;if(_0x1606ee[_0x6b01('0x34')]['includeAll']){_0x54575c[_0x6b01('0x44')]=[{'all':!![]}];}return db['FaxQueue'][_0x6b01('0x45')](_0x54575c);})[_0x6b01('0x25')](function(_0xf52992){_0x2b4a20['rows']=_0xf52992;return _0x2b4a20;})[_0x6b01('0x25')](respondWithFilteredResult(_0x3c8009,_0x54575c))[_0x6b01('0x46')](handleError(_0x3c8009,null));};exports['show']=function(_0x566a7a,_0x53c080){var _0x2ba743={'raw':!![],'where':{'id':_0x566a7a[_0x6b01('0x47')]['id']}},_0x182fb0={};_0x182fb0[_0x6b01('0x37')]=_[_0x6b01('0x48')](db[_0x6b01('0x49')]['rawAttributes']);_0x182fb0[_0x6b01('0x34')]=_[_0x6b01('0x48')](_0x566a7a[_0x6b01('0x34')]);_0x182fb0[_0x6b01('0x35')]=_[_0x6b01('0x36')](_0x182fb0[_0x6b01('0x37')],_0x182fb0['query']);_0x2ba743[_0x6b01('0x39')]=_['intersection'](_0x182fb0['model'],qs[_0x6b01('0x38')](_0x566a7a[_0x6b01('0x34')]['fields']));_0x2ba743[_0x6b01('0x39')]=_0x2ba743[_0x6b01('0x39')][_0x6b01('0x3a')]?_0x2ba743['attributes']:_0x182fb0['model'];if(_0x566a7a['query'][_0x6b01('0x4a')]){_0x2ba743[_0x6b01('0x44')]=[{'all':!![]}];}_0x2ba743=_['merge']({},_0x2ba743,_0x566a7a[_0x6b01('0x43')]);return db['FaxQueue']['find'](_0x2ba743)['then'](handleEntityNotFound(_0x53c080,null))[_0x6b01('0x25')](respondWithResult(_0x53c080,null))[_0x6b01('0x46')](handleError(_0x53c080,null));};exports['create']=function(_0x51c2c9,_0x2dfde0){return db['FaxQueue'][_0x6b01('0x4b')](_0x51c2c9[_0x6b01('0x4c')],{})[_0x6b01('0x25')](function(_0x172a56){var _0x13f6d7=_0x51c2c9['user'][_0x6b01('0x27')]({'plain':!![]});if(!_0x13f6d7)throw new Error(_0x6b01('0x4d'));if(_0x13f6d7[_0x6b01('0x4e')]==='user'){var _0x3884e=_0x172a56[_0x6b01('0x27')]({'plain':!![]});var _0x5617d7=_0x6b01('0x28');return db[_0x6b01('0x4f')][_0x6b01('0x50')]({'where':{'name':_0x5617d7,'userProfileId':_0x13f6d7[_0x6b01('0x51')]},'raw':!![]})['then'](function(_0x5d46e7){if(_0x5d46e7&&_0x5d46e7[_0x6b01('0x52')]===0x0){return db['UserProfileResource']['create']({'name':_0x3884e[_0x6b01('0x2c')],'resourceId':_0x3884e['id'],'type':_0x5d46e7[_0x6b01('0x2c')],'sectionId':_0x5d46e7['id']},{})['then'](function(){return _0x172a56;});}else{return _0x172a56;}})[_0x6b01('0x46')](function(_0xaad732){logger['error'](_0x6b01('0x53'),_0xaad732);throw _0xaad732;});}return _0x172a56;})[_0x6b01('0x25')](respondWithResult(_0x2dfde0,0xc9))[_0x6b01('0x46')](handleError(_0x2dfde0,null));};exports[_0x6b01('0x24')]=function(_0x229501,_0x5696d7){if(_0x229501[_0x6b01('0x4c')]['id']){delete _0x229501['body']['id'];}return db[_0x6b01('0x49')][_0x6b01('0x50')]({'where':{'id':_0x229501[_0x6b01('0x47')]['id']}})['then'](handleEntityNotFound(_0x5696d7,null))[_0x6b01('0x25')](saveUpdates(_0x229501[_0x6b01('0x4c')],null))[_0x6b01('0x25')](respondWithResult(_0x5696d7,null))[_0x6b01('0x46')](handleError(_0x5696d7,null));};exports['destroy']=function(_0x17c75d,_0x4ca3e){return db[_0x6b01('0x49')]['find']({'where':{'id':_0x17c75d['params']['id']}})[_0x6b01('0x25')](handleEntityNotFound(_0x4ca3e,null))[_0x6b01('0x25')](removeEntity(_0x4ca3e,null))[_0x6b01('0x46')](handleError(_0x4ca3e,null));};exports['describe']=function(_0x21b99f,_0x121546){return db[_0x6b01('0x49')]['describe']()['then'](respondWithResult(_0x121546,null))[_0x6b01('0x46')](handleError(_0x121546,null));};exports[_0x6b01('0x54')]=function(_0x4ec052,_0x3e16e8,_0x3faa54){var _0xe6d027={'raw':!![],'where':{}},_0x4f9da1={},_0x101af3;return db[_0x6b01('0x49')][_0x6b01('0x55')]({'where':{'id':_0x4ec052[_0x6b01('0x47')]['id']}})[_0x6b01('0x25')](handleEntityNotFound(_0x3e16e8,null))['then'](function(_0x2aa892){if(_0x2aa892){_0x101af3=_0x2aa892[_0x6b01('0x27')]({'plain':!![]});_0x4f9da1[_0x6b01('0x37')]=_[_0x6b01('0x48')](db[_0x6b01('0x56')][_0x6b01('0x2f')]);_0x4f9da1[_0x6b01('0x34')]=_[_0x6b01('0x48')](_0x4ec052[_0x6b01('0x34')]);_0x4f9da1['filters']=_[_0x6b01('0x36')](_0x4f9da1[_0x6b01('0x37')],_0x4f9da1[_0x6b01('0x34')]);_0xe6d027[_0x6b01('0x39')]=_[_0x6b01('0x36')](_0x4f9da1[_0x6b01('0x37')],qs['fields'](_0x4ec052['query'][_0x6b01('0x38')]));_0xe6d027[_0x6b01('0x39')]=_0xe6d027[_0x6b01('0x39')][_0x6b01('0x3a')]?_0xe6d027[_0x6b01('0x39')]:_0x4f9da1[_0x6b01('0x37')];if(!_0x4ec052['query'][_0x6b01('0x3b')](_0x6b01('0x3c'))){_0xe6d027[_0x6b01('0x1d')]=qs[_0x6b01('0x1d')](_0x4ec052[_0x6b01('0x34')][_0x6b01('0x1d')]);_0xe6d027[_0x6b01('0x1c')]=qs['offset'](_0x4ec052[_0x6b01('0x34')]['offset']);}_0xe6d027[_0x6b01('0x3d')]=qs[_0x6b01('0x3e')](_0x4ec052[_0x6b01('0x34')]['sort']);_0xe6d027[_0x6b01('0x3f')]=qs[_0x6b01('0x35')](_[_0x6b01('0x57')](_0x4ec052[_0x6b01('0x34')],_0x4f9da1[_0x6b01('0x35')]));_0xe6d027[_0x6b01('0x3f')][_0x6b01('0x58')]=_0x2aa892['id'];if(_0x4ec052[_0x6b01('0x34')][_0x6b01('0x40')]){_0xe6d027[_0x6b01('0x3f')]=_[_0x6b01('0x41')](_0xe6d027[_0x6b01('0x3f')],{'$or':_[_0x6b01('0x33')](_0xe6d027[_0x6b01('0x39')],function(_0x207e0a){var _0x13ceac={};_0x13ceac[_0x207e0a]={'$like':'%'+_0x4ec052[_0x6b01('0x34')][_0x6b01('0x40')]+'%'};return _0x13ceac;})});}_0xe6d027=_[_0x6b01('0x41')]({},_0xe6d027,_0x4ec052['options']);return db[_0x6b01('0x56')][_0x6b01('0x45')](_0xe6d027);}})[_0x6b01('0x25')](function(_0x246299){if(_0x246299){return db[_0x6b01('0x59')][_0x6b01('0x5a')]({'where':{'id':_[_0x6b01('0x33')](_0x246299,_0x6b01('0x5b')),'role':_0x6b01('0x5c')},'attributes':['id',_0x6b01('0x2c'),_0x6b01('0x5d'),_0x6b01('0x5e'),_0x6b01('0x5f')]});}})[_0x6b01('0x25')](function(_0x1a0bb7){if(_0x1a0bb7){return{'count':_0x1a0bb7['count'],'rows':_[_0x6b01('0x33')](_0x1a0bb7[_0x6b01('0x60')],function(_0x19a6d9){return{'membername':_0x19a6d9[_0x6b01('0x2c')],'UserId':_0x19a6d9['id'],'queue_name':_0x101af3[_0x6b01('0x2c')],'FaxQueueId':_0x101af3['id'],'interface':util[_0x6b01('0x61')](_0x6b01('0x62'),_0x6b01('0x63'),_0x19a6d9[_0x6b01('0x2c')]),'penalty':0x0,'paused':_0x19a6d9[_0x6b01('0x5d')],'createdAt':_0x19a6d9[_0x6b01('0x5f')],'updatedAt':_0x19a6d9[_0x6b01('0x5e')]};})};}else{return{'count':0x0,'rows':[]};}})[_0x6b01('0x25')](respondWithFilteredResult(_0x3e16e8,_0xe6d027))[_0x6b01('0x46')](handleError(_0x3e16e8,null));};exports[_0x6b01('0x64')]=function(_0x1812c9,_0x421ecf,_0x318a65){var _0x156103={};var _0x5c8dca={};var _0x56b01d;var _0x5b1c9a;return db['FaxQueue']['findOne']({'where':{'id':_0x1812c9[_0x6b01('0x47')]['id']}})['then'](handleEntityNotFound(_0x421ecf,null))['then'](function(_0x5293cd){if(_0x5293cd){_0x56b01d=_0x5293cd;_0x5c8dca[_0x6b01('0x37')]=_['keys'](db[_0x6b01('0x65')][_0x6b01('0x2f')]);_0x5c8dca[_0x6b01('0x34')]=_[_0x6b01('0x48')](_0x1812c9[_0x6b01('0x34')]);_0x5c8dca['filters']=_['intersection'](_0x5c8dca[_0x6b01('0x37')],_0x5c8dca[_0x6b01('0x34')]);_0x156103[_0x6b01('0x39')]=_['intersection'](_0x5c8dca[_0x6b01('0x37')],qs[_0x6b01('0x38')](_0x1812c9[_0x6b01('0x34')][_0x6b01('0x38')]));_0x156103[_0x6b01('0x39')]=_0x156103['attributes'][_0x6b01('0x3a')]?_0x156103['attributes']:_0x5c8dca[_0x6b01('0x37')];_0x156103[_0x6b01('0x3d')]=qs[_0x6b01('0x3e')](_0x1812c9[_0x6b01('0x34')][_0x6b01('0x3e')]);_0x156103['where']=qs[_0x6b01('0x35')](_[_0x6b01('0x57')](_0x1812c9[_0x6b01('0x34')],_0x5c8dca[_0x6b01('0x35')]));if(_0x1812c9['query'][_0x6b01('0x40')]){_0x156103[_0x6b01('0x3f')]=_[_0x6b01('0x41')](_0x156103[_0x6b01('0x3f')],{'$or':_[_0x6b01('0x33')](_0x156103[_0x6b01('0x39')],function(_0x4df26e){var _0x4f065d={};_0x4f065d[_0x4df26e]={'$like':'%'+_0x1812c9['query'][_0x6b01('0x40')]+'%'};return _0x4f065d;})});}_0x156103=_[_0x6b01('0x41')]({},_0x156103,_0x1812c9['options']);return _0x56b01d[_0x6b01('0x64')](_0x156103);}})[_0x6b01('0x25')](function(_0x34c971){if(_0x34c971){_0x5b1c9a=_0x34c971[_0x6b01('0x3a')];if(!_0x1812c9['query'][_0x6b01('0x3b')]('nolimit')){_0x156103[_0x6b01('0x1d')]=qs['limit'](_0x1812c9[_0x6b01('0x34')]['limit']);_0x156103[_0x6b01('0x1c')]=qs[_0x6b01('0x1c')](_0x1812c9[_0x6b01('0x34')][_0x6b01('0x1c')]);}return _0x56b01d[_0x6b01('0x64')](_0x156103);}})[_0x6b01('0x25')](function(_0x193b70){if(_0x193b70){return _0x193b70?{'count':_0x5b1c9a,'rows':_0x193b70}:null;}})['then'](respondWithResult(_0x421ecf,null))[_0x6b01('0x46')](handleError(_0x421ecf,null));};exports['addTeams']=function(_0x462394,_0x3bc67a,_0x3fc980){var _0x124990=_0x462394[_0x6b01('0x4c')][_0x6b01('0x66')];return db[_0x6b01('0x65')][_0x6b01('0x45')]({'where':{'id':_0x124990},'attributes':['id'],'include':[{'model':db[_0x6b01('0x59')],'as':_0x6b01('0x67'),'attributes':['id',_0x6b01('0x2c'),'online',_0x6b01('0x68'),_0x6b01('0x69')],'raw':!![]}]})[_0x6b01('0x25')](function(_0x41c2a9){if(_0x41c2a9){var _0x5ac0b6=_[_0x6b01('0x6a')](_0x41c2a9,function(_0x2f9f71){var _0x13704b=_0x2f9f71[_0x6b01('0x27')]({'plain':!![]});return _0x13704b[_0x6b01('0x67')];});return db['FaxQueue'][_0x6b01('0x50')]({'where':{'id':_0x462394['params']['id']}})[_0x6b01('0x25')](function(_0x692a4d){return db[_0x6b01('0x6b')][_0x6b01('0x6c')](function(_0x359fe0){return _0x692a4d[_0x6b01('0x6d')](_0x124990,{'transaction':_0x359fe0})[_0x6b01('0x25')](function(){return BPromise[_0x6b01('0x6e')](_0x5ac0b6,function(_0x15803d){return db[_0x6b01('0x56')][_0x6b01('0x6f')]({'where':{'UserId':_0x15803d['id'],'FaxQueueId':_0x462394[_0x6b01('0x47')]['id']},'transaction':_0x359fe0});});})[_0x6b01('0x25')](function(){_0x5ac0b6[_0x6b01('0x70')](function(_0x59a6cb){socket[_0x6b01('0x71')]('userFaxQueue:save',{'UserId':_0x59a6cb['id'],'FaxQueueId':_0x692a4d['id']});});});});});}})['then'](respondWithStatusCode(_0x3bc67a,null))[_0x6b01('0x46')](handleError(_0x3bc67a,null));};exports[_0x6b01('0x72')]=function(_0x26dacf,_0x22ccc8,_0x5dc77c){return db[_0x6b01('0x65')][_0x6b01('0x45')]({'where':{'id':_0x26dacf[_0x6b01('0x34')]['ids']},'attributes':['id'],'include':[{'model':db[_0x6b01('0x59')],'as':_0x6b01('0x67'),'attributes':['id'],'raw':!![]}]})[_0x6b01('0x25')](handleEntityNotFound(_0x22ccc8,null))[_0x6b01('0x25')](function(_0x14c3ee){var _0x625922=_[_0x6b01('0x33')](_0x14c3ee,'id');var _0x21b294=[];var _0x552eb4=[];var _0x135aeb=squel[_0x6b01('0x73')]();_0x135aeb[_0x6b01('0x74')](_0x6b01('0x75'))['from']('team_has_fax_queues','tq')[_0x6b01('0x76')](_0x6b01('0x77'),'ut',_0x6b01('0x78'))[_0x6b01('0x3f')](_0x6b01('0x79'),_0x26dacf[_0x6b01('0x47')]['id']);for(var _0x1343af=0x0;_0x1343af<_0x14c3ee[_0x6b01('0x3a')];_0x1343af+=0x1){let _0x5aa884=_0x14c3ee[_0x1343af];for(var _0x643cc6=0x0;_0x643cc6<_0x5aa884[_0x6b01('0x67')][_0x6b01('0x3a')];_0x643cc6+=0x1){let _0x884ce8=_0x5aa884[_0x6b01('0x67')][_0x643cc6];var _0x10efb9=_0x135aeb[_0x6b01('0x7a')]();_0x10efb9['where'](_0x6b01('0x7b'),_0x884ce8['id']);_0x552eb4['push'](db[_0x6b01('0x6b')][_0x6b01('0x34')](_0x10efb9[_0x6b01('0x7c')](),{'type':db[_0x6b01('0x6b')][_0x6b01('0x7d')]['SELECT']})[_0x6b01('0x25')](function(_0x5b5fcb){if(_0x5b5fcb[_0x6b01('0x3a')]===0x1){return _0x884ce8['id'];}else{var _0x3d2184=_['every'](_[_0x6b01('0x33')](_0x5b5fcb,_0x6b01('0x7e')),function(_0xff00ce){return _[_0x6b01('0x7f')](_0x625922,_0xff00ce);});if(_0x3d2184){return _0x884ce8['id'];}}}));}}return BPromise[_0x6b01('0x80')](_0x552eb4)['then'](function(_0x4e592a){_0x21b294=_(_0x21b294)[_0x6b01('0x81')](_0x4e592a)[_0x6b01('0x82')]()[_0x6b01('0x83')]();return db[_0x6b01('0x49')][_0x6b01('0x50')]({'where':{'id':_0x26dacf[_0x6b01('0x47')]['id']}})[_0x6b01('0x25')](function(_0x3f9c4c){return db[_0x6b01('0x6b')]['transaction'](function(_0x101f17){return _0x3f9c4c['removeTeams'](_0x26dacf[_0x6b01('0x34')]['ids'],{'transaction':_0x101f17})[_0x6b01('0x25')](function(){if(!_[_0x6b01('0x84')](_0x21b294)){return _0x3f9c4c[_0x6b01('0x85')](_0x21b294,{'transaction':_0x101f17});}})['then'](function(){_0x21b294[_0x6b01('0x70')](function(_0xa9cd5f){socket[_0x6b01('0x71')]('userFaxQueue:remove',{'UserId':_0xa9cd5f,'FaxQueueId':_0x3f9c4c['id']});});});});});});})[_0x6b01('0x25')](respondWithStatusCode(_0x22ccc8,null))[_0x6b01('0x46')](handleError(_0x22ccc8,null));};exports['addAgents']=function(_0x141083,_0x4b8abd,_0x5b075b){return db[_0x6b01('0x49')][_0x6b01('0x50')]({'where':{'id':_0x141083['params']['id']}})['then'](handleEntityNotFound(_0x4b8abd,null))[_0x6b01('0x25')](function(_0x5cbbcf){if(_0x5cbbcf){return _0x5cbbcf['addAgents'](_0x141083[_0x6b01('0x4c')]['ids'],_[_0x6b01('0x86')](_0x141083[_0x6b01('0x4c')],[_0x6b01('0x66'),'id'])||{})[_0x6b01('0x87')](function(_0x3bc455){for(var _0x421784=0x0;_0x421784<_0x141083[_0x6b01('0x4c')][_0x6b01('0x66')][_0x6b01('0x3a')];_0x421784+=0x1){socket[_0x6b01('0x71')](_0x6b01('0x88'),{'UserId':_0x141083[_0x6b01('0x4c')][_0x6b01('0x66')][_0x421784],'FaxQueueId':_0x141083[_0x6b01('0x47')]['id']});}return _0x3bc455;});}})[_0x6b01('0x25')](respondWithResult(_0x4b8abd,null))[_0x6b01('0x46')](handleError(_0x4b8abd,null));};exports[_0x6b01('0x85')]=function(_0x3825e6,_0x3ff825,_0xd994a7){return db[_0x6b01('0x49')]['find']({'where':{'id':_0x3825e6[_0x6b01('0x47')]['id']}})[_0x6b01('0x25')](handleEntityNotFound(_0x3ff825,null))[_0x6b01('0x25')](function(_0x418387){if(_0x418387){return _0x418387[_0x6b01('0x85')](_0x3825e6[_0x6b01('0x34')][_0x6b01('0x66')])[_0x6b01('0x25')](function(){if(_[_0x6b01('0x89')](_0x3825e6[_0x6b01('0x34')][_0x6b01('0x66')])){for(var _0x531475=0x0;_0x531475<_0x3825e6[_0x6b01('0x34')][_0x6b01('0x66')][_0x6b01('0x3a')];_0x531475+=0x1){socket['emit'](_0x6b01('0x8a'),{'UserId':Number(_0x3825e6[_0x6b01('0x34')][_0x6b01('0x66')][_0x531475]),'FaxQueueId':Number(_0x3825e6[_0x6b01('0x47')]['id'])});}}else{socket['emit']('userFaxQueue:remove',{'UserId':Number(_0x3825e6[_0x6b01('0x34')][_0x6b01('0x66')]),'FaxQueueId':Number(_0x3825e6['params']['id'])});}});}})[_0x6b01('0x25')](respondWithStatusCode(_0x3ff825,null))[_0x6b01('0x46')](handleError(_0x3ff825,null));};exports[_0x6b01('0x8b')]=function(_0x3be680,_0x2818f1,_0x663925){var _0x528c5e={};var _0x1641b8={};var _0x29e460;var _0x38c45b;return db[_0x6b01('0x49')][_0x6b01('0x55')]({'where':{'id':_0x3be680[_0x6b01('0x47')]['id']}})['then'](handleEntityNotFound(_0x2818f1,null))[_0x6b01('0x25')](function(_0x3db037){if(_0x3db037){_0x29e460=_0x3db037;_0x1641b8['model']=_[_0x6b01('0x48')](db[_0x6b01('0x59')][_0x6b01('0x2f')]);_0x1641b8[_0x6b01('0x34')]=_[_0x6b01('0x48')](_0x3be680['query']);_0x1641b8[_0x6b01('0x35')]=_[_0x6b01('0x36')](_0x1641b8[_0x6b01('0x37')],_0x1641b8[_0x6b01('0x34')]);_0x528c5e[_0x6b01('0x39')]=_[_0x6b01('0x36')](_0x1641b8[_0x6b01('0x37')],qs[_0x6b01('0x38')](_0x3be680[_0x6b01('0x34')][_0x6b01('0x38')]));_0x528c5e[_0x6b01('0x39')]=_0x528c5e[_0x6b01('0x39')][_0x6b01('0x3a')]?_0x528c5e[_0x6b01('0x39')]:_0x1641b8[_0x6b01('0x37')];_0x528c5e['order']=qs[_0x6b01('0x3e')](_0x3be680[_0x6b01('0x34')][_0x6b01('0x3e')]);_0x528c5e['where']=qs[_0x6b01('0x35')](_[_0x6b01('0x57')](_0x3be680[_0x6b01('0x34')],_0x1641b8[_0x6b01('0x35')]));if(_0x3be680[_0x6b01('0x34')][_0x6b01('0x40')]){_0x528c5e['where']=_['merge'](_0x528c5e['where'],{'$or':_['map'](_0x528c5e[_0x6b01('0x39')],function(_0x405665){var _0x32ff21={};_0x32ff21[_0x405665]={'$like':'%'+_0x3be680['query'][_0x6b01('0x40')]+'%'};return _0x32ff21;})});}_0x528c5e=_['merge']({},_0x528c5e,_0x3be680[_0x6b01('0x43')]);return _0x29e460['getAgents'](_0x528c5e);}})[_0x6b01('0x25')](function(_0x28de9f){if(_0x28de9f){_0x38c45b=_0x28de9f[_0x6b01('0x3a')];if(!_0x3be680[_0x6b01('0x34')][_0x6b01('0x3b')](_0x6b01('0x3c'))){_0x528c5e[_0x6b01('0x1d')]=qs[_0x6b01('0x1d')](_0x3be680[_0x6b01('0x34')]['limit']);_0x528c5e['offset']=qs[_0x6b01('0x1c')](_0x3be680[_0x6b01('0x34')][_0x6b01('0x1c')]);}return _0x29e460['getAgents'](_0x528c5e);}})['then'](function(_0x446b91){if(_0x446b91){return _0x446b91?{'count':_0x38c45b,'rows':_0x446b91}:null;}})['then'](respondWithResult(_0x2818f1,null))[_0x6b01('0x46')](handleError(_0x2818f1,null));}; \ No newline at end of file +var _0xdf55=['fs-extra','lodash','squel','crypto','jsforce','querystring','papaparse','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./faxQueue.socket','sendStatus','status','end','offset','undefined','count','limit','set','Content-Range','json','apply','reject','destroy','then','get','UserProfileResource','error','stack','name','send','index','map','FaxQueue','rawAttributes','fieldName','type','model','query','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','where','filters','pick','filter','VIRTUAL','merge','options','includeAll','include','rows','catch','show','params','keys','find','create','body','role','user','FaxQueues','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','describe','findOne','UserFaxQueue','order','FaxQueueId','findAll','findAndCountAll','UserId','faxPause','updatedAt','createdAt','format','SIP','getTeams','Team','addTeams','User','online','voicePause','interface','Agents','sequelize','transaction','each','findOrCreate','forEach','emit','userFaxQueue:save','removeTeams','ids','select','tq.TeamId','from','join','user_has_teams','FaxQueueId\x20=\x20?','clone','ut.UserId\x20=\x20?','toString','QueryTypes','SELECT','TeamId','includes','all','union','compact','value','isEmpty','removeAgents','userFaxQueue:remove','addAgents','spread','isArray','getAgents','eml-format','rimraf','fast-json-patch','request-promise','bluebird','mustache','util','sox','to-csv','ejs'];(function(_0xbf5e63,_0x5caca2){var _0x30961e=function(_0x4d0128){while(--_0x4d0128){_0xbf5e63['push'](_0xbf5e63['shift']());}};_0x30961e(++_0x5caca2);}(_0xdf55,0x83));var _0x5df5=function(_0x5a1cc9,_0x28f54d){_0x5a1cc9=_0x5a1cc9-0x0;var _0x471761=_0xdf55[_0x5a1cc9];return _0x471761;};'use strict';var emlformat=require(_0x5df5('0x0'));var rimraf=require(_0x5df5('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x5df5('0x2'));var rp=require(_0x5df5('0x3'));var moment=require('moment');var BPromise=require(_0x5df5('0x4'));var Mustache=require(_0x5df5('0x5'));var util=require(_0x5df5('0x6'));var path=require('path');var sox=require(_0x5df5('0x7'));var csv=require(_0x5df5('0x8'));var ejs=require(_0x5df5('0x9'));var fs=require('fs');var fs_extra=require(_0x5df5('0xa'));var _=require(_0x5df5('0xb'));var squel=require(_0x5df5('0xc'));var crypto=require(_0x5df5('0xd'));var jsforce=require(_0x5df5('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x5df5('0x8'));var querystring=require(_0x5df5('0xf'));var Papa=require(_0x5df5('0x10'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x5df5('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x5df5('0x12'));var logger=require(_0x5df5('0x13'))('api');var utils=require('../../config/utils');var config=require(_0x5df5('0x14'));var licenseUtil=require(_0x5df5('0x15'));var db=require(_0x5df5('0x16'))['db'];config[_0x5df5('0x17')]=_[_0x5df5('0x18')](config[_0x5df5('0x17')],{'host':_0x5df5('0x19'),'port':0x18eb});var socket=require(_0x5df5('0x1a'))(new Redis(config[_0x5df5('0x17')]));require(_0x5df5('0x1b'))['register'](socket);function respondWithStatusCode(_0x30fd32,_0x4d91b6){_0x4d91b6=_0x4d91b6||0xcc;return function(_0x13eb03){if(_0x13eb03){return _0x30fd32[_0x5df5('0x1c')](_0x4d91b6);}return _0x30fd32[_0x5df5('0x1d')](_0x4d91b6)[_0x5df5('0x1e')]();};}function respondWithResult(_0x282d53,_0x4e74c4){_0x4e74c4=_0x4e74c4||0xc8;return function(_0x27b3fb){if(_0x27b3fb){return _0x282d53[_0x5df5('0x1d')](_0x4e74c4)['json'](_0x27b3fb);}};}function respondWithFilteredResult(_0x9a52c9,_0x45813f){return function(_0xb7e1c2){if(_0xb7e1c2){var _0x44f700=typeof _0x45813f[_0x5df5('0x1f')]==='undefined'&&typeof _0x45813f['limit']===_0x5df5('0x20');var _0x5d8dfd=_0xb7e1c2[_0x5df5('0x21')];var _0x40a8f5=_0x44f700?0x0:_0x45813f[_0x5df5('0x1f')];var _0x34b107=_0x44f700?_0xb7e1c2[_0x5df5('0x21')]:_0x45813f['offset']+_0x45813f[_0x5df5('0x22')];var _0x39d8a1;if(_0x34b107>=_0x5d8dfd){_0x34b107=_0x5d8dfd;_0x39d8a1=0xc8;}else{_0x39d8a1=0xce;}_0x9a52c9[_0x5df5('0x1d')](_0x39d8a1);return _0x9a52c9[_0x5df5('0x23')](_0x5df5('0x24'),_0x40a8f5+'-'+_0x34b107+'/'+_0x5d8dfd)[_0x5df5('0x25')](_0xb7e1c2);}return null;};}function patchUpdates(_0x59ff67){return function(_0x2e99a1){try{jsonpatch[_0x5df5('0x26')](_0x2e99a1,_0x59ff67,!![]);}catch(_0x8742a7){return BPromise[_0x5df5('0x27')](_0x8742a7);}return _0x2e99a1['save']();};}function saveUpdates(_0x4358ba,_0x13369c){return function(_0x395f3e){if(_0x395f3e){return _0x395f3e['update'](_0x4358ba)['then'](function(_0x532923){return _0x532923;});}return null;};}function removeEntity(_0x357fb0,_0x3ff82e){return function(_0x4292a0){if(_0x4292a0){return _0x4292a0[_0x5df5('0x28')]()[_0x5df5('0x29')](function(){var _0x1fd83c=_0x4292a0[_0x5df5('0x2a')]({'plain':!![]});var _0x28723e='FaxQueues';return db[_0x5df5('0x2b')]['destroy']({'where':{'type':_0x28723e,'resourceId':_0x1fd83c['id']}})[_0x5df5('0x29')](function(){return _0x4292a0;});})[_0x5df5('0x29')](function(){_0x357fb0['status'](0xcc)[_0x5df5('0x1e')]();});}};}function handleEntityNotFound(_0x4945c6,_0xd2b213){return function(_0x4cccf1){if(!_0x4cccf1){_0x4945c6[_0x5df5('0x1c')](0x194);}return _0x4cccf1;};}function handleError(_0x4afe36,_0x309506){_0x309506=_0x309506||0x1f4;return function(_0x5793f5){logger[_0x5df5('0x2c')](_0x5793f5[_0x5df5('0x2d')]);if(_0x5793f5[_0x5df5('0x2e')]){delete _0x5793f5['name'];}_0x4afe36[_0x5df5('0x1d')](_0x309506)[_0x5df5('0x2f')](_0x5793f5);};}exports[_0x5df5('0x30')]=function(_0x2d53e5,_0x41362f){var _0x22c00b={},_0x8fe7fd={},_0x5b4deb={'count':0x0,'rows':[]};var _0x4965a0=_[_0x5df5('0x31')](db[_0x5df5('0x32')][_0x5df5('0x33')],function(_0xafe18){return{'name':_0xafe18[_0x5df5('0x34')],'type':_0xafe18[_0x5df5('0x35')]['key']};});_0x8fe7fd[_0x5df5('0x36')]=_[_0x5df5('0x31')](_0x4965a0,_0x5df5('0x2e'));_0x8fe7fd[_0x5df5('0x37')]=_['keys'](_0x2d53e5[_0x5df5('0x37')]);_0x8fe7fd['filters']=_[_0x5df5('0x38')](_0x8fe7fd[_0x5df5('0x36')],_0x8fe7fd['query']);_0x22c00b[_0x5df5('0x39')]=_['intersection'](_0x8fe7fd[_0x5df5('0x36')],qs[_0x5df5('0x3a')](_0x2d53e5[_0x5df5('0x37')][_0x5df5('0x3a')]));_0x22c00b['attributes']=_0x22c00b[_0x5df5('0x39')][_0x5df5('0x3b')]?_0x22c00b[_0x5df5('0x39')]:_0x8fe7fd[_0x5df5('0x36')];if(!_0x2d53e5['query'][_0x5df5('0x3c')](_0x5df5('0x3d'))){_0x22c00b[_0x5df5('0x22')]=qs[_0x5df5('0x22')](_0x2d53e5[_0x5df5('0x37')][_0x5df5('0x22')]);_0x22c00b[_0x5df5('0x1f')]=qs['offset'](_0x2d53e5[_0x5df5('0x37')][_0x5df5('0x1f')]);}_0x22c00b['order']=qs[_0x5df5('0x3e')](_0x2d53e5[_0x5df5('0x37')]['sort']);_0x22c00b[_0x5df5('0x3f')]=qs[_0x5df5('0x40')](_[_0x5df5('0x41')](_0x2d53e5[_0x5df5('0x37')],_0x8fe7fd[_0x5df5('0x40')]),_0x4965a0);if(_0x2d53e5[_0x5df5('0x37')][_0x5df5('0x42')]){_0x22c00b[_0x5df5('0x3f')]=_['merge'](_0x22c00b['where'],{'$or':_[_0x5df5('0x31')](_0x4965a0,function(_0x5b06f4){if(_0x5b06f4[_0x5df5('0x35')]!==_0x5df5('0x43')){var _0x4ada10={};_0x4ada10[_0x5b06f4[_0x5df5('0x2e')]]={'$like':'%'+_0x2d53e5[_0x5df5('0x37')][_0x5df5('0x42')]+'%'};return _0x4ada10;}})});}_0x22c00b=_[_0x5df5('0x44')]({},_0x22c00b,_0x2d53e5[_0x5df5('0x45')]);var _0x278e99={'where':_0x22c00b[_0x5df5('0x3f')]};return db[_0x5df5('0x32')]['count'](_0x278e99)[_0x5df5('0x29')](function(_0x4a4057){_0x5b4deb[_0x5df5('0x21')]=_0x4a4057;if(_0x2d53e5[_0x5df5('0x37')][_0x5df5('0x46')]){_0x22c00b[_0x5df5('0x47')]=[{'all':!![]}];}return db[_0x5df5('0x32')]['findAll'](_0x22c00b);})[_0x5df5('0x29')](function(_0x24c1f7){_0x5b4deb[_0x5df5('0x48')]=_0x24c1f7;return _0x5b4deb;})['then'](respondWithFilteredResult(_0x41362f,_0x22c00b))[_0x5df5('0x49')](handleError(_0x41362f,null));};exports[_0x5df5('0x4a')]=function(_0x5cbb57,_0xe4deee){var _0x2ab7c5={'raw':!![],'where':{'id':_0x5cbb57[_0x5df5('0x4b')]['id']}},_0xd612a5={};_0xd612a5['model']=_[_0x5df5('0x4c')](db[_0x5df5('0x32')]['rawAttributes']);_0xd612a5[_0x5df5('0x37')]=_[_0x5df5('0x4c')](_0x5cbb57[_0x5df5('0x37')]);_0xd612a5['filters']=_[_0x5df5('0x38')](_0xd612a5[_0x5df5('0x36')],_0xd612a5[_0x5df5('0x37')]);_0x2ab7c5[_0x5df5('0x39')]=_['intersection'](_0xd612a5[_0x5df5('0x36')],qs[_0x5df5('0x3a')](_0x5cbb57[_0x5df5('0x37')][_0x5df5('0x3a')]));_0x2ab7c5[_0x5df5('0x39')]=_0x2ab7c5['attributes']['length']?_0x2ab7c5[_0x5df5('0x39')]:_0xd612a5['model'];if(_0x5cbb57[_0x5df5('0x37')][_0x5df5('0x46')]){_0x2ab7c5[_0x5df5('0x47')]=[{'all':!![]}];}_0x2ab7c5=_[_0x5df5('0x44')]({},_0x2ab7c5,_0x5cbb57['options']);return db[_0x5df5('0x32')][_0x5df5('0x4d')](_0x2ab7c5)[_0x5df5('0x29')](handleEntityNotFound(_0xe4deee,null))[_0x5df5('0x29')](respondWithResult(_0xe4deee,null))[_0x5df5('0x49')](handleError(_0xe4deee,null));};exports[_0x5df5('0x4e')]=function(_0x5ad720,_0x1bf1e2){return db['FaxQueue'][_0x5df5('0x4e')](_0x5ad720[_0x5df5('0x4f')],{})[_0x5df5('0x29')](function(_0x4d1ebd){var _0x8622f4=_0x5ad720['user'][_0x5df5('0x2a')]({'plain':!![]});if(!_0x8622f4)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x8622f4[_0x5df5('0x50')]===_0x5df5('0x51')){var _0x34e4cc=_0x4d1ebd['get']({'plain':!![]});var _0x3d92a3=_0x5df5('0x52');return db['UserProfileSection'][_0x5df5('0x4d')]({'where':{'name':_0x3d92a3,'userProfileId':_0x8622f4[_0x5df5('0x53')]},'raw':!![]})[_0x5df5('0x29')](function(_0x9cb30e){if(_0x9cb30e&&_0x9cb30e[_0x5df5('0x54')]===0x0){return db[_0x5df5('0x2b')][_0x5df5('0x4e')]({'name':_0x34e4cc['name'],'resourceId':_0x34e4cc['id'],'type':_0x9cb30e[_0x5df5('0x2e')],'sectionId':_0x9cb30e['id']},{})['then'](function(){return _0x4d1ebd;});}else{return _0x4d1ebd;}})[_0x5df5('0x49')](function(_0x24db09){logger[_0x5df5('0x2c')](_0x5df5('0x55'),_0x24db09);throw _0x24db09;});}return _0x4d1ebd;})[_0x5df5('0x29')](respondWithResult(_0x1bf1e2,0xc9))[_0x5df5('0x49')](handleError(_0x1bf1e2,null));};exports[_0x5df5('0x56')]=function(_0x23e5ca,_0x56f1b3){if(_0x23e5ca[_0x5df5('0x4f')]['id']){delete _0x23e5ca[_0x5df5('0x4f')]['id'];}return db[_0x5df5('0x32')][_0x5df5('0x4d')]({'where':{'id':_0x23e5ca[_0x5df5('0x4b')]['id']}})['then'](handleEntityNotFound(_0x56f1b3,null))[_0x5df5('0x29')](saveUpdates(_0x23e5ca['body'],null))['then'](respondWithResult(_0x56f1b3,null))[_0x5df5('0x49')](handleError(_0x56f1b3,null));};exports[_0x5df5('0x28')]=function(_0xb452d6,_0x210ad2){return db[_0x5df5('0x32')][_0x5df5('0x4d')]({'where':{'id':_0xb452d6['params']['id']}})[_0x5df5('0x29')](handleEntityNotFound(_0x210ad2,null))[_0x5df5('0x29')](removeEntity(_0x210ad2,null))['catch'](handleError(_0x210ad2,null));};exports['describe']=function(_0x7fdce7,_0x2e6d4d){return db[_0x5df5('0x32')][_0x5df5('0x57')]()[_0x5df5('0x29')](respondWithResult(_0x2e6d4d,null))[_0x5df5('0x49')](handleError(_0x2e6d4d,null));};exports['getMembers']=function(_0x572bea,_0x5b9dd8,_0x2236bd){var _0x43fccb={'raw':!![],'where':{}},_0x57e3ea={},_0x42288c;return db[_0x5df5('0x32')][_0x5df5('0x58')]({'where':{'id':_0x572bea[_0x5df5('0x4b')]['id']}})[_0x5df5('0x29')](handleEntityNotFound(_0x5b9dd8,null))[_0x5df5('0x29')](function(_0x2f7202){if(_0x2f7202){_0x42288c=_0x2f7202[_0x5df5('0x2a')]({'plain':!![]});_0x57e3ea[_0x5df5('0x36')]=_['keys'](db[_0x5df5('0x59')][_0x5df5('0x33')]);_0x57e3ea[_0x5df5('0x37')]=_[_0x5df5('0x4c')](_0x572bea[_0x5df5('0x37')]);_0x57e3ea[_0x5df5('0x40')]=_[_0x5df5('0x38')](_0x57e3ea[_0x5df5('0x36')],_0x57e3ea[_0x5df5('0x37')]);_0x43fccb[_0x5df5('0x39')]=_[_0x5df5('0x38')](_0x57e3ea[_0x5df5('0x36')],qs['fields'](_0x572bea[_0x5df5('0x37')][_0x5df5('0x3a')]));_0x43fccb['attributes']=_0x43fccb[_0x5df5('0x39')][_0x5df5('0x3b')]?_0x43fccb[_0x5df5('0x39')]:_0x57e3ea[_0x5df5('0x36')];if(!_0x572bea['query'][_0x5df5('0x3c')](_0x5df5('0x3d'))){_0x43fccb['limit']=qs['limit'](_0x572bea[_0x5df5('0x37')][_0x5df5('0x22')]);_0x43fccb[_0x5df5('0x1f')]=qs['offset'](_0x572bea['query'][_0x5df5('0x1f')]);}_0x43fccb[_0x5df5('0x5a')]=qs['sort'](_0x572bea[_0x5df5('0x37')][_0x5df5('0x3e')]);_0x43fccb[_0x5df5('0x3f')]=qs[_0x5df5('0x40')](_[_0x5df5('0x41')](_0x572bea['query'],_0x57e3ea[_0x5df5('0x40')]));_0x43fccb[_0x5df5('0x3f')][_0x5df5('0x5b')]=_0x2f7202['id'];if(_0x572bea[_0x5df5('0x37')]['filter']){_0x43fccb[_0x5df5('0x3f')]=_['merge'](_0x43fccb[_0x5df5('0x3f')],{'$or':_[_0x5df5('0x31')](_0x43fccb['attributes'],function(_0x1dc6b1){var _0x5ed4a6={};_0x5ed4a6[_0x1dc6b1]={'$like':'%'+_0x572bea[_0x5df5('0x37')]['filter']+'%'};return _0x5ed4a6;})});}_0x43fccb=_[_0x5df5('0x44')]({},_0x43fccb,_0x572bea[_0x5df5('0x45')]);return db[_0x5df5('0x59')][_0x5df5('0x5c')](_0x43fccb);}})[_0x5df5('0x29')](function(_0x3ee081){if(_0x3ee081){return db['User'][_0x5df5('0x5d')]({'where':{'id':_[_0x5df5('0x31')](_0x3ee081,_0x5df5('0x5e')),'role':'agent'},'attributes':['id',_0x5df5('0x2e'),_0x5df5('0x5f'),_0x5df5('0x60'),_0x5df5('0x61')]});}})[_0x5df5('0x29')](function(_0x6e375f){if(_0x6e375f){return{'count':_0x6e375f['count'],'rows':_['map'](_0x6e375f[_0x5df5('0x48')],function(_0x23159c){return{'membername':_0x23159c[_0x5df5('0x2e')],'UserId':_0x23159c['id'],'queue_name':_0x42288c[_0x5df5('0x2e')],'FaxQueueId':_0x42288c['id'],'interface':util[_0x5df5('0x62')]('%s/%s',_0x5df5('0x63'),_0x23159c[_0x5df5('0x2e')]),'penalty':0x0,'paused':_0x23159c[_0x5df5('0x5f')],'createdAt':_0x23159c['createdAt'],'updatedAt':_0x23159c[_0x5df5('0x60')]};})};}else{return{'count':0x0,'rows':[]};}})[_0x5df5('0x29')](respondWithFilteredResult(_0x5b9dd8,_0x43fccb))[_0x5df5('0x49')](handleError(_0x5b9dd8,null));};exports[_0x5df5('0x64')]=function(_0x2dc0e2,_0x268e98,_0x31d7b4){var _0xec54b7={};var _0x2675cc={};var _0x5d4c7e;var _0x12184c;return db[_0x5df5('0x32')][_0x5df5('0x58')]({'where':{'id':_0x2dc0e2['params']['id']}})[_0x5df5('0x29')](handleEntityNotFound(_0x268e98,null))[_0x5df5('0x29')](function(_0x49f2da){if(_0x49f2da){_0x5d4c7e=_0x49f2da;_0x2675cc[_0x5df5('0x36')]=_[_0x5df5('0x4c')](db[_0x5df5('0x65')]['rawAttributes']);_0x2675cc[_0x5df5('0x37')]=_['keys'](_0x2dc0e2[_0x5df5('0x37')]);_0x2675cc[_0x5df5('0x40')]=_[_0x5df5('0x38')](_0x2675cc[_0x5df5('0x36')],_0x2675cc[_0x5df5('0x37')]);_0xec54b7[_0x5df5('0x39')]=_['intersection'](_0x2675cc[_0x5df5('0x36')],qs[_0x5df5('0x3a')](_0x2dc0e2['query'][_0x5df5('0x3a')]));_0xec54b7['attributes']=_0xec54b7['attributes'][_0x5df5('0x3b')]?_0xec54b7['attributes']:_0x2675cc[_0x5df5('0x36')];_0xec54b7[_0x5df5('0x5a')]=qs[_0x5df5('0x3e')](_0x2dc0e2[_0x5df5('0x37')][_0x5df5('0x3e')]);_0xec54b7[_0x5df5('0x3f')]=qs['filters'](_[_0x5df5('0x41')](_0x2dc0e2[_0x5df5('0x37')],_0x2675cc[_0x5df5('0x40')]));if(_0x2dc0e2['query'][_0x5df5('0x42')]){_0xec54b7[_0x5df5('0x3f')]=_['merge'](_0xec54b7[_0x5df5('0x3f')],{'$or':_[_0x5df5('0x31')](_0xec54b7[_0x5df5('0x39')],function(_0x1efdcd){var _0x76fc5d={};_0x76fc5d[_0x1efdcd]={'$like':'%'+_0x2dc0e2['query'][_0x5df5('0x42')]+'%'};return _0x76fc5d;})});}_0xec54b7=_['merge']({},_0xec54b7,_0x2dc0e2[_0x5df5('0x45')]);return _0x5d4c7e['getTeams'](_0xec54b7);}})[_0x5df5('0x29')](function(_0x168289){if(_0x168289){_0x12184c=_0x168289[_0x5df5('0x3b')];if(!_0x2dc0e2[_0x5df5('0x37')][_0x5df5('0x3c')]('nolimit')){_0xec54b7['limit']=qs[_0x5df5('0x22')](_0x2dc0e2[_0x5df5('0x37')][_0x5df5('0x22')]);_0xec54b7[_0x5df5('0x1f')]=qs[_0x5df5('0x1f')](_0x2dc0e2['query'][_0x5df5('0x1f')]);}return _0x5d4c7e[_0x5df5('0x64')](_0xec54b7);}})[_0x5df5('0x29')](function(_0xdb26){if(_0xdb26){return _0xdb26?{'count':_0x12184c,'rows':_0xdb26}:null;}})[_0x5df5('0x29')](respondWithResult(_0x268e98,null))[_0x5df5('0x49')](handleError(_0x268e98,null));};exports[_0x5df5('0x66')]=function(_0x1b85d0,_0x349f5d,_0x285281){var _0x1bff6c=_0x1b85d0['body']['ids'];return db['Team'][_0x5df5('0x5c')]({'where':{'id':_0x1bff6c},'attributes':['id'],'include':[{'model':db[_0x5df5('0x67')],'as':'Agents','attributes':['id',_0x5df5('0x2e'),_0x5df5('0x68'),_0x5df5('0x69'),_0x5df5('0x6a')],'raw':!![]}]})[_0x5df5('0x29')](function(_0x26bbe0){if(_0x26bbe0){var _0x36d8ee=_['flatMap'](_0x26bbe0,function(_0x331afb){var _0x36c355=_0x331afb[_0x5df5('0x2a')]({'plain':!![]});return _0x36c355[_0x5df5('0x6b')];});return db[_0x5df5('0x32')][_0x5df5('0x4d')]({'where':{'id':_0x1b85d0[_0x5df5('0x4b')]['id']}})['then'](function(_0x34dd22){return db[_0x5df5('0x6c')][_0x5df5('0x6d')](function(_0x24c6f4){return _0x34dd22[_0x5df5('0x66')](_0x1bff6c,{'transaction':_0x24c6f4})[_0x5df5('0x29')](function(){return BPromise[_0x5df5('0x6e')](_0x36d8ee,function(_0x2d3b80){return db['UserFaxQueue'][_0x5df5('0x6f')]({'where':{'UserId':_0x2d3b80['id'],'FaxQueueId':_0x1b85d0[_0x5df5('0x4b')]['id']},'transaction':_0x24c6f4});});})['then'](function(){_0x36d8ee[_0x5df5('0x70')](function(_0xf45574){socket[_0x5df5('0x71')](_0x5df5('0x72'),{'UserId':_0xf45574['id'],'FaxQueueId':_0x34dd22['id']});});});});});}})[_0x5df5('0x29')](respondWithStatusCode(_0x349f5d,null))['catch'](handleError(_0x349f5d,null));};exports[_0x5df5('0x73')]=function(_0x2d7f37,_0xfd61ba,_0x4cb7d9){return db['Team'][_0x5df5('0x5c')]({'where':{'id':_0x2d7f37[_0x5df5('0x37')][_0x5df5('0x74')]},'attributes':['id'],'include':[{'model':db[_0x5df5('0x67')],'as':_0x5df5('0x6b'),'attributes':['id'],'raw':!![]}]})[_0x5df5('0x29')](handleEntityNotFound(_0xfd61ba,null))['then'](function(_0x53217e){var _0x4f76e2=_[_0x5df5('0x31')](_0x53217e,'id');var _0x373de6=[];var _0x314c24=[];var _0x513d7a=squel[_0x5df5('0x75')]();_0x513d7a['field'](_0x5df5('0x76'))[_0x5df5('0x77')]('team_has_fax_queues','tq')[_0x5df5('0x78')](_0x5df5('0x79'),'ut','ut.TeamId\x20=\x20tq.TeamId')[_0x5df5('0x3f')](_0x5df5('0x7a'),_0x2d7f37[_0x5df5('0x4b')]['id']);for(var _0x9fffdb=0x0;_0x9fffdb<_0x53217e['length'];_0x9fffdb+=0x1){let _0x553507=_0x53217e[_0x9fffdb];for(var _0x1a2c09=0x0;_0x1a2c09<_0x553507[_0x5df5('0x6b')][_0x5df5('0x3b')];_0x1a2c09+=0x1){let _0x519e61=_0x553507[_0x5df5('0x6b')][_0x1a2c09];var _0x23c0a3=_0x513d7a[_0x5df5('0x7b')]();_0x23c0a3[_0x5df5('0x3f')](_0x5df5('0x7c'),_0x519e61['id']);_0x314c24['push'](db[_0x5df5('0x6c')][_0x5df5('0x37')](_0x23c0a3[_0x5df5('0x7d')](),{'type':db[_0x5df5('0x6c')][_0x5df5('0x7e')][_0x5df5('0x7f')]})[_0x5df5('0x29')](function(_0x160544){if(_0x160544[_0x5df5('0x3b')]===0x1){return _0x519e61['id'];}else{var _0x3eb955=_['every'](_[_0x5df5('0x31')](_0x160544,_0x5df5('0x80')),function(_0x4efacf){return _[_0x5df5('0x81')](_0x4f76e2,_0x4efacf);});if(_0x3eb955){return _0x519e61['id'];}}}));}}return BPromise[_0x5df5('0x82')](_0x314c24)['then'](function(_0x1a9118){_0x373de6=_(_0x373de6)[_0x5df5('0x83')](_0x1a9118)[_0x5df5('0x84')]()[_0x5df5('0x85')]();return db['FaxQueue'][_0x5df5('0x4d')]({'where':{'id':_0x2d7f37[_0x5df5('0x4b')]['id']}})[_0x5df5('0x29')](function(_0x476155){return db['sequelize'][_0x5df5('0x6d')](function(_0x34aa81){return _0x476155[_0x5df5('0x73')](_0x2d7f37[_0x5df5('0x37')][_0x5df5('0x74')],{'transaction':_0x34aa81})['then'](function(){if(!_[_0x5df5('0x86')](_0x373de6)){return _0x476155[_0x5df5('0x87')](_0x373de6,{'transaction':_0x34aa81});}})[_0x5df5('0x29')](function(){_0x373de6[_0x5df5('0x70')](function(_0x30d156){socket['emit'](_0x5df5('0x88'),{'UserId':_0x30d156,'FaxQueueId':_0x476155['id']});});});});});});})[_0x5df5('0x29')](respondWithStatusCode(_0xfd61ba,null))[_0x5df5('0x49')](handleError(_0xfd61ba,null));};exports['addAgents']=function(_0x5c8bcf,_0x132101,_0x56b00b){return db[_0x5df5('0x32')][_0x5df5('0x4d')]({'where':{'id':_0x5c8bcf['params']['id']}})[_0x5df5('0x29')](handleEntityNotFound(_0x132101,null))[_0x5df5('0x29')](function(_0x5d4da8){if(_0x5d4da8){return _0x5d4da8[_0x5df5('0x89')](_0x5c8bcf[_0x5df5('0x4f')][_0x5df5('0x74')],_['omit'](_0x5c8bcf[_0x5df5('0x4f')],[_0x5df5('0x74'),'id'])||{})[_0x5df5('0x8a')](function(_0x504735){for(var _0x47cf6b=0x0;_0x47cf6b<_0x5c8bcf[_0x5df5('0x4f')][_0x5df5('0x74')]['length'];_0x47cf6b+=0x1){socket[_0x5df5('0x71')](_0x5df5('0x72'),{'UserId':_0x5c8bcf['body'][_0x5df5('0x74')][_0x47cf6b],'FaxQueueId':_0x5c8bcf[_0x5df5('0x4b')]['id']});}return _0x504735;});}})[_0x5df5('0x29')](respondWithResult(_0x132101,null))[_0x5df5('0x49')](handleError(_0x132101,null));};exports[_0x5df5('0x87')]=function(_0xbed6bb,_0xa38e59,_0x3bcdb6){return db[_0x5df5('0x32')][_0x5df5('0x4d')]({'where':{'id':_0xbed6bb[_0x5df5('0x4b')]['id']}})[_0x5df5('0x29')](handleEntityNotFound(_0xa38e59,null))['then'](function(_0x3ef713){if(_0x3ef713){return _0x3ef713['removeAgents'](_0xbed6bb[_0x5df5('0x37')][_0x5df5('0x74')])[_0x5df5('0x29')](function(){if(_[_0x5df5('0x8b')](_0xbed6bb[_0x5df5('0x37')][_0x5df5('0x74')])){for(var _0x23eb0c=0x0;_0x23eb0c<_0xbed6bb[_0x5df5('0x37')][_0x5df5('0x74')][_0x5df5('0x3b')];_0x23eb0c+=0x1){socket[_0x5df5('0x71')]('userFaxQueue:remove',{'UserId':Number(_0xbed6bb[_0x5df5('0x37')][_0x5df5('0x74')][_0x23eb0c]),'FaxQueueId':Number(_0xbed6bb['params']['id'])});}}else{socket[_0x5df5('0x71')](_0x5df5('0x88'),{'UserId':Number(_0xbed6bb['query'][_0x5df5('0x74')]),'FaxQueueId':Number(_0xbed6bb[_0x5df5('0x4b')]['id'])});}});}})[_0x5df5('0x29')](respondWithStatusCode(_0xa38e59,null))['catch'](handleError(_0xa38e59,null));};exports[_0x5df5('0x8c')]=function(_0x3dbe37,_0x1d8e61,_0x392a0f){var _0x1f94e2={};var _0x378971={};var _0x4021c8;var _0x34ae35;return db[_0x5df5('0x32')][_0x5df5('0x58')]({'where':{'id':_0x3dbe37[_0x5df5('0x4b')]['id']}})['then'](handleEntityNotFound(_0x1d8e61,null))[_0x5df5('0x29')](function(_0x489ab5){if(_0x489ab5){_0x4021c8=_0x489ab5;_0x378971['model']=_['keys'](db['User'][_0x5df5('0x33')]);_0x378971[_0x5df5('0x37')]=_[_0x5df5('0x4c')](_0x3dbe37['query']);_0x378971[_0x5df5('0x40')]=_[_0x5df5('0x38')](_0x378971[_0x5df5('0x36')],_0x378971[_0x5df5('0x37')]);_0x1f94e2[_0x5df5('0x39')]=_[_0x5df5('0x38')](_0x378971['model'],qs[_0x5df5('0x3a')](_0x3dbe37['query'][_0x5df5('0x3a')]));_0x1f94e2[_0x5df5('0x39')]=_0x1f94e2[_0x5df5('0x39')][_0x5df5('0x3b')]?_0x1f94e2[_0x5df5('0x39')]:_0x378971[_0x5df5('0x36')];_0x1f94e2[_0x5df5('0x5a')]=qs[_0x5df5('0x3e')](_0x3dbe37[_0x5df5('0x37')][_0x5df5('0x3e')]);_0x1f94e2[_0x5df5('0x3f')]=qs[_0x5df5('0x40')](_[_0x5df5('0x41')](_0x3dbe37[_0x5df5('0x37')],_0x378971[_0x5df5('0x40')]));if(_0x3dbe37[_0x5df5('0x37')][_0x5df5('0x42')]){_0x1f94e2[_0x5df5('0x3f')]=_[_0x5df5('0x44')](_0x1f94e2[_0x5df5('0x3f')],{'$or':_[_0x5df5('0x31')](_0x1f94e2[_0x5df5('0x39')],function(_0x53b195){var _0x3373eb={};_0x3373eb[_0x53b195]={'$like':'%'+_0x3dbe37[_0x5df5('0x37')][_0x5df5('0x42')]+'%'};return _0x3373eb;})});}_0x1f94e2=_[_0x5df5('0x44')]({},_0x1f94e2,_0x3dbe37['options']);return _0x4021c8[_0x5df5('0x8c')](_0x1f94e2);}})['then'](function(_0x1b6461){if(_0x1b6461){_0x34ae35=_0x1b6461[_0x5df5('0x3b')];if(!_0x3dbe37[_0x5df5('0x37')]['hasOwnProperty'](_0x5df5('0x3d'))){_0x1f94e2['limit']=qs[_0x5df5('0x22')](_0x3dbe37['query'][_0x5df5('0x22')]);_0x1f94e2[_0x5df5('0x1f')]=qs[_0x5df5('0x1f')](_0x3dbe37[_0x5df5('0x37')][_0x5df5('0x1f')]);}return _0x4021c8['getAgents'](_0x1f94e2);}})['then'](function(_0xc6dca3){if(_0xc6dca3){return _0xc6dca3?{'count':_0x34ae35,'rows':_0xc6dca3}:null;}})[_0x5df5('0x29')](respondWithResult(_0x1d8e61,null))[_0x5df5('0x49')](handleError(_0x1d8e61,null));}; \ No newline at end of file diff --git a/server/api/faxQueue/faxQueue.events.js b/server/api/faxQueue/faxQueue.events.js index 12cb997..7d19840 100644 --- a/server/api/faxQueue/faxQueue.events.js +++ b/server/api/faxQueue/faxQueue.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x09b9=['save','update','remove','emit','hasOwnProperty','hook','events','../../mysqldb','FaxQueue','setMaxListeners'];(function(_0x32985f,_0x4fa527){var _0x5932c4=function(_0x292838){while(--_0x292838){_0x32985f['push'](_0x32985f['shift']());}};_0x5932c4(++_0x4fa527);}(_0x09b9,0x74));var _0x909b=function(_0x250401,_0x2f1d99){_0x250401=_0x250401-0x0;var _0x1edce6=_0x09b9[_0x250401];return _0x1edce6;};'use strict';var EventEmitter=require(_0x909b('0x0'));var FaxQueue=require(_0x909b('0x1'))['db'][_0x909b('0x2')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0x909b('0x3')](0x0);var events={'afterCreate':_0x909b('0x4'),'afterUpdate':_0x909b('0x5'),'afterDestroy':_0x909b('0x6')};function emitEvent(_0x273d4c){return function(_0x1339ed,_0x5c5a51,_0x1ab8b4){FaxQueueEvents[_0x909b('0x7')](_0x273d4c+':'+_0x1339ed['id'],_0x1339ed);FaxQueueEvents[_0x909b('0x7')](_0x273d4c,_0x1339ed);_0x1ab8b4(null);};}for(var e in events){if(events[_0x909b('0x8')](e)){var event=events[e];FaxQueue[_0x909b('0x9')](e,emitEvent(event));}}module['exports']=FaxQueueEvents; \ No newline at end of file +var _0xf5cc=['exports','../../mysqldb','FaxQueue','setMaxListeners','save','remove','emit','hasOwnProperty','hook'];(function(_0x261b8a,_0x553ec4){var _0x3455e8=function(_0xdf10d4){while(--_0xdf10d4){_0x261b8a['push'](_0x261b8a['shift']());}};_0x3455e8(++_0x553ec4);}(_0xf5cc,0x76));var _0xcf5c=function(_0xd1a252,_0x16396f){_0xd1a252=_0xd1a252-0x0;var _0x560ee1=_0xf5cc[_0xd1a252];return _0x560ee1;};'use strict';var EventEmitter=require('events');var FaxQueue=require(_0xcf5c('0x0'))['db'][_0xcf5c('0x1')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0xcf5c('0x2')](0x0);var events={'afterCreate':_0xcf5c('0x3'),'afterUpdate':'update','afterDestroy':_0xcf5c('0x4')};function emitEvent(_0x9cfedf){return function(_0x1f29f1,_0x5a23f4,_0x2d423a){FaxQueueEvents[_0xcf5c('0x5')](_0x9cfedf+':'+_0x1f29f1['id'],_0x1f29f1);FaxQueueEvents['emit'](_0x9cfedf,_0x1f29f1);_0x2d423a(null);};}for(var e in events){if(events[_0xcf5c('0x6')](e)){var event=events[e];FaxQueue[_0xcf5c('0x7')](e,emitEvent(event));}}module[_0xcf5c('0x8')]=FaxQueueEvents; \ No newline at end of file diff --git a/server/api/faxQueue/faxQueue.model.js b/server/api/faxQueue/faxQueue.model.js index 92ba486..70107d4 100644 --- a/server/api/faxQueue/faxQueue.model.js +++ b/server/api/faxQueue/faxQueue.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd4f9=['api','moment','bluebird','request-promise','path','../../config/environment','./faxQueue.attributes','exports','define','lodash','util','../../config/logger'];(function(_0x3ac632,_0x3bd1ae){var _0x1d4781=function(_0x14cb45){while(--_0x14cb45){_0x3ac632['push'](_0x3ac632['shift']());}};_0x1d4781(++_0x3bd1ae);}(_0xd4f9,0x14d));var _0x9d4f=function(_0x419fb4,_0x392c00){_0x419fb4=_0x419fb4-0x0;var _0x1f5974=_0xd4f9[_0x419fb4];return _0x1f5974;};'use strict';var _=require(_0x9d4f('0x0'));var util=require(_0x9d4f('0x1'));var logger=require(_0x9d4f('0x2'))(_0x9d4f('0x3'));var moment=require(_0x9d4f('0x4'));var BPromise=require(_0x9d4f('0x5'));var rp=require(_0x9d4f('0x6'));var fs=require('fs');var path=require(_0x9d4f('0x7'));var rimraf=require('rimraf');var config=require(_0x9d4f('0x8'));var attributes=require(_0x9d4f('0x9'));module[_0x9d4f('0xa')]=function(_0x315fe6,_0x533d38){return _0x315fe6[_0x9d4f('0xb')]('FaxQueue',attributes,{'tableName':'fax_queues','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xbb84=['./faxQueue.attributes','exports','define','fax_queues','lodash','util','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x455150,_0x274121){var _0x12ca9c=function(_0x47eb22){while(--_0x47eb22){_0x455150['push'](_0x455150['shift']());}};_0x12ca9c(++_0x274121);}(_0xbb84,0x1a6));var _0x4bb8=function(_0x24cdd5,_0x4232a0){_0x24cdd5=_0x24cdd5-0x0;var _0x52a09e=_0xbb84[_0x24cdd5];return _0x52a09e;};'use strict';var _=require(_0x4bb8('0x0'));var util=require(_0x4bb8('0x1'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0x4bb8('0x2'));var rp=require(_0x4bb8('0x3'));var fs=require('fs');var path=require(_0x4bb8('0x4'));var rimraf=require(_0x4bb8('0x5'));var config=require(_0x4bb8('0x6'));var attributes=require(_0x4bb8('0x7'));module[_0x4bb8('0x8')]=function(_0x4d9840,_0x464dc2){return _0x4d9840[_0x4bb8('0x9')]('FaxQueue',attributes,{'tableName':_0x4bb8('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/faxQueue/faxQueue.rpc.js b/server/api/faxQueue/faxQueue.rpc.js index ceedfe1..1b48a7c 100644 --- a/server/api/faxQueue/faxQueue.rpc.js +++ b/server/api/faxQueue/faxQueue.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x14c3=['localhost','./faxQueue.socket','register','request','then','info','request\x20sent','FaxQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','FaxQueue,\x20%s,\x20%s','catch','GetFaxQueue','FaxQueue','findAll','options','raw','attributes','limit','include','map','model','debug','ShowFaxQueue','find','where','lodash','moment','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','http','redis','defaults'];(function(_0x1b1e76,_0x31695b){var _0x3d743a=function(_0x4ae27b){while(--_0x4ae27b){_0x1b1e76['push'](_0x1b1e76['shift']());}};_0x3d743a(++_0x31695b);}(_0x14c3,0x12d));var _0x314c=function(_0x1c13b6,_0x4b15ca){_0x1c13b6=_0x1c13b6-0x0;var _0x1b4650=_0x14c3[_0x1c13b6];return _0x1b4650;};'use strict';var _=require(_0x314c('0x0'));var util=require('util');var moment=require(_0x314c('0x1'));var BPromise=require('bluebird');var rs=require(_0x314c('0x2'));var fs=require('fs');var Redis=require(_0x314c('0x3'));var db=require(_0x314c('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x314c('0x5'))(_0x314c('0x6'));var config=require(_0x314c('0x7'));var jayson=require('jayson/promise');var client=jayson['client'][_0x314c('0x8')]({'port':0x232a});config[_0x314c('0x9')]=_[_0x314c('0xa')](config[_0x314c('0x9')],{'host':_0x314c('0xb'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0x314c('0xc'))[_0x314c('0xd')](socket);function respondWithRpcPromise(_0x2837b7,_0x508543,_0x587843){return new BPromise(function(_0x48597f,_0x3336c9){return client[_0x314c('0xe')](_0x2837b7,_0x587843)[_0x314c('0xf')](function(_0x42c831){logger[_0x314c('0x10')]('FaxQueue,\x20%s,\x20%s',_0x508543,_0x314c('0x11'));logger['debug'](_0x314c('0x12'),_0x508543,_0x314c('0x11'),JSON[_0x314c('0x13')](_0x42c831));if(_0x42c831[_0x314c('0x14')]){if(_0x42c831[_0x314c('0x14')][_0x314c('0x15')]===0x1f4){logger[_0x314c('0x14')]('FaxQueue,\x20%s,\x20%s',_0x508543,_0x42c831['error']['message']);return _0x3336c9(_0x42c831['error'][_0x314c('0x16')]);}logger['error']('FaxQueue,\x20%s,\x20%s',_0x508543,_0x42c831[_0x314c('0x14')]['message']);return _0x48597f(_0x42c831[_0x314c('0x14')][_0x314c('0x16')]);}else{logger['info'](_0x314c('0x17'),_0x508543,_0x314c('0x11'));_0x48597f(_0x42c831['result']['message']);}})[_0x314c('0x18')](function(_0x341e90){logger[_0x314c('0x14')]('FaxQueue,\x20%s,\x20%s',_0x508543,_0x341e90);_0x3336c9(_0x341e90);});});}exports[_0x314c('0x19')]=function(_0x28c267){var _0x52e8d5=this;return new Promise(function(_0x159279,_0x3d28a6){return db[_0x314c('0x1a')][_0x314c('0x1b')]({'raw':_0x28c267['options']?_0x28c267[_0x314c('0x1c')][_0x314c('0x1d')]===undefined?!![]:![]:!![],'where':_0x28c267['options']?_0x28c267[_0x314c('0x1c')]['where']||null:null,'attributes':_0x28c267['options']?_0x28c267['options'][_0x314c('0x1e')]||null:null,'limit':_0x28c267['options']?_0x28c267[_0x314c('0x1c')][_0x314c('0x1f')]||null:null,'include':_0x28c267[_0x314c('0x1c')]?_0x28c267['options'][_0x314c('0x20')]?_[_0x314c('0x21')](_0x28c267['options'][_0x314c('0x20')],function(_0x20ee96){return{'model':db[_0x20ee96[_0x314c('0x22')]],'as':_0x20ee96['as'],'attributes':_0x20ee96[_0x314c('0x1e')],'include':_0x20ee96[_0x314c('0x20')]?_[_0x314c('0x21')](_0x20ee96[_0x314c('0x20')],function(_0x1443ab){return{'model':db[_0x1443ab[_0x314c('0x22')]],'as':_0x1443ab['as'],'attributes':_0x1443ab[_0x314c('0x1e')],'include':_0x1443ab['include']?_[_0x314c('0x21')](_0x1443ab[_0x314c('0x20')],function(_0x246058){return{'model':db[_0x246058[_0x314c('0x22')]],'as':_0x246058['as'],'attributes':_0x246058[_0x314c('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x314c('0xf')](function(_0xa8efb6){logger[_0x314c('0x10')](_0x314c('0x19'),_0x28c267);logger[_0x314c('0x23')](_0x314c('0x19'),_0x28c267,JSON[_0x314c('0x13')](_0xa8efb6));_0x159279(_0xa8efb6);})[_0x314c('0x18')](function(_0x4fd3ee){logger[_0x314c('0x14')](_0x314c('0x19'),_0x4fd3ee[_0x314c('0x16')],_0x28c267);_0x3d28a6(_0x52e8d5[_0x314c('0x14')](0x1f4,_0x4fd3ee[_0x314c('0x16')]));});});};exports[_0x314c('0x24')]=function(_0x54d765){var _0x1d8032=this;return new Promise(function(_0x3ca7c1,_0x489261){return db[_0x314c('0x1a')][_0x314c('0x25')]({'raw':_0x54d765[_0x314c('0x1c')]?_0x54d765[_0x314c('0x1c')][_0x314c('0x1d')]===undefined?!![]:![]:!![],'where':_0x54d765[_0x314c('0x1c')]?_0x54d765[_0x314c('0x1c')][_0x314c('0x26')]||null:null,'attributes':_0x54d765[_0x314c('0x1c')]?_0x54d765[_0x314c('0x1c')][_0x314c('0x1e')]||null:null,'include':_0x54d765[_0x314c('0x1c')]?_0x54d765[_0x314c('0x1c')][_0x314c('0x20')]?_['map'](_0x54d765[_0x314c('0x1c')]['include'],function(_0x27d0ef){return{'model':db[_0x27d0ef['model']],'as':_0x27d0ef['as'],'attributes':_0x27d0ef[_0x314c('0x1e')],'include':_0x27d0ef[_0x314c('0x20')]?_[_0x314c('0x21')](_0x27d0ef['include'],function(_0x1b949f){return{'model':db[_0x1b949f[_0x314c('0x22')]],'as':_0x1b949f['as'],'attributes':_0x1b949f[_0x314c('0x1e')],'include':_0x1b949f['include']?_[_0x314c('0x21')](_0x1b949f[_0x314c('0x20')],function(_0xbfd3ab){return{'model':db[_0xbfd3ab[_0x314c('0x22')]],'as':_0xbfd3ab['as'],'attributes':_0xbfd3ab[_0x314c('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x314c('0xf')](function(_0x568b47){logger[_0x314c('0x10')](_0x314c('0x24'),_0x54d765);logger[_0x314c('0x23')](_0x314c('0x24'),_0x54d765,JSON[_0x314c('0x13')](_0x568b47));_0x3ca7c1(_0x568b47);})['catch'](function(_0x504c18){logger[_0x314c('0x14')](_0x314c('0x24'),_0x504c18[_0x314c('0x16')],_0x54d765);_0x489261(_0x1d8032[_0x314c('0x14')](0x1f4,_0x504c18[_0x314c('0x16')]));});});}; \ No newline at end of file +var _0x5517=['ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','defaults','redis','localhost','socket.io-emitter','register','request','then','info','FaxQueue,\x20%s,\x20%s','request\x20sent','debug','FaxQueue,\x20%s,\x20%s,\x20%s','code','error','message','result','catch','GetFaxQueue','FaxQueue','options','raw','where','attributes','limit','map','include','model','stringify','ShowFaxQueue','find','lodash','util','moment','bluebird','randomstring'];(function(_0x107dfc,_0x342ae6){var _0x49d618=function(_0x4e1b5f){while(--_0x4e1b5f){_0x107dfc['push'](_0x107dfc['shift']());}};_0x49d618(++_0x342ae6);}(_0x5517,0xd2));var _0x7551=function(_0x25468f,_0x45ee61){_0x25468f=_0x25468f-0x0;var _0x31e3a2=_0x5517[_0x25468f];return _0x31e3a2;};'use strict';var _=require(_0x7551('0x0'));var util=require(_0x7551('0x1'));var moment=require(_0x7551('0x2'));var BPromise=require(_0x7551('0x3'));var rs=require(_0x7551('0x4'));var fs=require('fs');var Redis=require(_0x7551('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x7551('0x6'));var logger=require(_0x7551('0x7'))(_0x7551('0x8'));var config=require(_0x7551('0x9'));var jayson=require(_0x7551('0xa'));var client=jayson[_0x7551('0xb')][_0x7551('0xc')]({'port':0x232a});config['redis']=_[_0x7551('0xd')](config[_0x7551('0xe')],{'host':_0x7551('0xf'),'port':0x18eb});var socket=require(_0x7551('0x10'))(new Redis(config[_0x7551('0xe')]));require('./faxQueue.socket')[_0x7551('0x11')](socket);function respondWithRpcPromise(_0x5577eb,_0x197855,_0x3bb3cd){return new BPromise(function(_0x235fe1,_0x5b141c){return client[_0x7551('0x12')](_0x5577eb,_0x3bb3cd)[_0x7551('0x13')](function(_0x2c95a5){logger[_0x7551('0x14')](_0x7551('0x15'),_0x197855,_0x7551('0x16'));logger[_0x7551('0x17')](_0x7551('0x18'),_0x197855,_0x7551('0x16'),JSON['stringify'](_0x2c95a5));if(_0x2c95a5['error']){if(_0x2c95a5['error'][_0x7551('0x19')]===0x1f4){logger[_0x7551('0x1a')](_0x7551('0x15'),_0x197855,_0x2c95a5['error']['message']);return _0x5b141c(_0x2c95a5['error'][_0x7551('0x1b')]);}logger[_0x7551('0x1a')](_0x7551('0x15'),_0x197855,_0x2c95a5['error']['message']);return _0x235fe1(_0x2c95a5['error'][_0x7551('0x1b')]);}else{logger[_0x7551('0x14')]('FaxQueue,\x20%s,\x20%s',_0x197855,_0x7551('0x16'));_0x235fe1(_0x2c95a5[_0x7551('0x1c')][_0x7551('0x1b')]);}})[_0x7551('0x1d')](function(_0x242d4f){logger[_0x7551('0x1a')](_0x7551('0x15'),_0x197855,_0x242d4f);_0x5b141c(_0x242d4f);});});}exports[_0x7551('0x1e')]=function(_0x255a19){var _0x525f2f=this;return new Promise(function(_0x45b5ee,_0xf322d6){return db[_0x7551('0x1f')]['findAll']({'raw':_0x255a19['options']?_0x255a19[_0x7551('0x20')][_0x7551('0x21')]===undefined?!![]:![]:!![],'where':_0x255a19[_0x7551('0x20')]?_0x255a19[_0x7551('0x20')][_0x7551('0x22')]||null:null,'attributes':_0x255a19[_0x7551('0x20')]?_0x255a19[_0x7551('0x20')][_0x7551('0x23')]||null:null,'limit':_0x255a19[_0x7551('0x20')]?_0x255a19['options'][_0x7551('0x24')]||null:null,'include':_0x255a19[_0x7551('0x20')]?_0x255a19[_0x7551('0x20')]['include']?_[_0x7551('0x25')](_0x255a19['options'][_0x7551('0x26')],function(_0x487d7f){return{'model':db[_0x487d7f[_0x7551('0x27')]],'as':_0x487d7f['as'],'attributes':_0x487d7f[_0x7551('0x23')],'include':_0x487d7f[_0x7551('0x26')]?_[_0x7551('0x25')](_0x487d7f['include'],function(_0x5a95eb){return{'model':db[_0x5a95eb[_0x7551('0x27')]],'as':_0x5a95eb['as'],'attributes':_0x5a95eb[_0x7551('0x23')],'include':_0x5a95eb[_0x7551('0x26')]?_[_0x7551('0x25')](_0x5a95eb[_0x7551('0x26')],function(_0x35f56f){return{'model':db[_0x35f56f[_0x7551('0x27')]],'as':_0x35f56f['as'],'attributes':_0x35f56f[_0x7551('0x23')]};}):[]};}):[]};}):[]:[]})[_0x7551('0x13')](function(_0x123cdf){logger[_0x7551('0x14')](_0x7551('0x1e'),_0x255a19);logger['debug'](_0x7551('0x1e'),_0x255a19,JSON[_0x7551('0x28')](_0x123cdf));_0x45b5ee(_0x123cdf);})[_0x7551('0x1d')](function(_0x378097){logger[_0x7551('0x1a')]('GetFaxQueue',_0x378097['message'],_0x255a19);_0xf322d6(_0x525f2f['error'](0x1f4,_0x378097[_0x7551('0x1b')]));});});};exports[_0x7551('0x29')]=function(_0x2e6622){var _0x885824=this;return new Promise(function(_0xa3da65,_0x3b9c1f){return db[_0x7551('0x1f')][_0x7551('0x2a')]({'raw':_0x2e6622[_0x7551('0x20')]?_0x2e6622[_0x7551('0x20')][_0x7551('0x21')]===undefined?!![]:![]:!![],'where':_0x2e6622['options']?_0x2e6622['options'][_0x7551('0x22')]||null:null,'attributes':_0x2e6622[_0x7551('0x20')]?_0x2e6622[_0x7551('0x20')][_0x7551('0x23')]||null:null,'include':_0x2e6622[_0x7551('0x20')]?_0x2e6622['options'][_0x7551('0x26')]?_[_0x7551('0x25')](_0x2e6622[_0x7551('0x20')][_0x7551('0x26')],function(_0x546e30){return{'model':db[_0x546e30[_0x7551('0x27')]],'as':_0x546e30['as'],'attributes':_0x546e30[_0x7551('0x23')],'include':_0x546e30['include']?_['map'](_0x546e30['include'],function(_0x3bd0ae){return{'model':db[_0x3bd0ae[_0x7551('0x27')]],'as':_0x3bd0ae['as'],'attributes':_0x3bd0ae['attributes'],'include':_0x3bd0ae['include']?_['map'](_0x3bd0ae[_0x7551('0x26')],function(_0x196570){return{'model':db[_0x196570[_0x7551('0x27')]],'as':_0x196570['as'],'attributes':_0x196570['attributes']};}):[]};}):[]};}):[]:[]})[_0x7551('0x13')](function(_0x132964){logger[_0x7551('0x14')](_0x7551('0x29'),_0x2e6622);logger['debug'](_0x7551('0x29'),_0x2e6622,JSON['stringify'](_0x132964));_0xa3da65(_0x132964);})[_0x7551('0x1d')](function(_0x2805ce){logger['error'](_0x7551('0x29'),_0x2805ce[_0x7551('0x1b')],_0x2e6622);_0x3b9c1f(_0x885824[_0x7551('0x1a')](0x1f4,_0x2805ce[_0x7551('0x1b')]));});});}; \ No newline at end of file diff --git a/server/api/faxQueue/faxQueue.socket.js b/server/api/faxQueue/faxQueue.socket.js index a9d9f7b..9564515 100644 --- a/server/api/faxQueue/faxQueue.socket.js +++ b/server/api/faxQueue/faxQueue.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfd8f=['./faxQueue.events','save','update','register','length','faxQueue:'];(function(_0xcadf4c,_0x32eb3b){var _0x29001e=function(_0x4a71f1){while(--_0x4a71f1){_0xcadf4c['push'](_0xcadf4c['shift']());}};_0x29001e(++_0x32eb3b);}(_0xfd8f,0xae));var _0xffd8=function(_0x37d65b,_0x269048){_0x37d65b=_0x37d65b-0x0;var _0x45e826=_0xfd8f[_0x37d65b];return _0x45e826;};'use strict';var FaxQueueEvents=require(_0xffd8('0x0'));var events=[_0xffd8('0x1'),'remove',_0xffd8('0x2')];function createListener(_0xd82853,_0x180ca5){return function(_0x28015c){_0x180ca5['emit'](_0xd82853,_0x28015c);};}function removeListener(_0x123f30,_0x190f79){return function(){FaxQueueEvents['removeListener'](_0x123f30,_0x190f79);};}exports[_0xffd8('0x3')]=function(_0x135be6){for(var _0x2ca514=0x0,_0x1785ea=events[_0xffd8('0x4')];_0x2ca514<_0x1785ea;_0x2ca514++){var _0x254e4f=events[_0x2ca514];var _0x519e5d=createListener(_0xffd8('0x5')+_0x254e4f,_0x135be6);FaxQueueEvents['on'](_0x254e4f,_0x519e5d);}}; \ No newline at end of file +var _0x591d=['remove','update','emit','register','save'];(function(_0x30a42d,_0x4cb19e){var _0x3d3c75=function(_0x3d2ebd){while(--_0x3d2ebd){_0x30a42d['push'](_0x30a42d['shift']());}};_0x3d3c75(++_0x4cb19e);}(_0x591d,0x171));var _0xd591=function(_0x24d2d7,_0x29d567){_0x24d2d7=_0x24d2d7-0x0;var _0x42e997=_0x591d[_0x24d2d7];return _0x42e997;};'use strict';var FaxQueueEvents=require('./faxQueue.events');var events=[_0xd591('0x0'),_0xd591('0x1'),_0xd591('0x2')];function createListener(_0x475f66,_0x30d4d8){return function(_0x38c77b){_0x30d4d8[_0xd591('0x3')](_0x475f66,_0x38c77b);};}function removeListener(_0x3be726,_0x1de03c){return function(){FaxQueueEvents['removeListener'](_0x3be726,_0x1de03c);};}exports[_0xd591('0x4')]=function(_0x44cf79){for(var _0x160ed4=0x0,_0x2aaba9=events['length'];_0x160ed4<_0x2aaba9;_0x160ed4++){var _0x577932=events[_0x160ed4];var _0x5dce35=createListener('faxQueue:'+_0x577932,_0x44cf79);FaxQueueEvents['on'](_0x577932,_0x5dce35);}}; \ No newline at end of file diff --git a/server/api/faxQueue/index.js b/server/api/faxQueue/index.js index c980136..31bacc1 100644 --- a/server/api/faxQueue/index.js +++ b/server/api/faxQueue/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xdeb3=['exports','util','path','connect-timeout','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./faxQueue.controller','isAuthenticated','get','describe','/:id','show','/:id/members','/:id/teams','getTeams','/:id/users','getAgents','post','addTeams','put','update','delete','removeTeams','removeAgents'];(function(_0x4343c0,_0x337724){var _0x3faf43=function(_0x2de98a){while(--_0x2de98a){_0x4343c0['push'](_0x4343c0['shift']());}};_0x3faf43(++_0x337724);}(_0xdeb3,0xb7));var _0x3deb=function(_0xfae23b,_0x2be4ba){_0xfae23b=_0xfae23b-0x0;var _0x200640=_0xdeb3[_0xfae23b];return _0x200640;};'use strict';var multer=require('multer');var util=require(_0x3deb('0x0'));var path=require(_0x3deb('0x1'));var timeout=require(_0x3deb('0x2'));var express=require('express');var router=express['Router']();var fs_extra=require(_0x3deb('0x3'));var auth=require(_0x3deb('0x4'));var interaction=require(_0x3deb('0x5'));var config=require(_0x3deb('0x6'));var controller=require(_0x3deb('0x7'));router['get']('/',auth[_0x3deb('0x8')](),controller['index']);router[_0x3deb('0x9')]('/describe',auth[_0x3deb('0x8')](),controller[_0x3deb('0xa')]);router[_0x3deb('0x9')](_0x3deb('0xb'),auth[_0x3deb('0x8')](),controller[_0x3deb('0xc')]);router[_0x3deb('0x9')](_0x3deb('0xd'),auth[_0x3deb('0x8')](),controller['getMembers']);router['get'](_0x3deb('0xe'),auth[_0x3deb('0x8')](),controller[_0x3deb('0xf')]);router['get'](_0x3deb('0x10'),auth[_0x3deb('0x8')](),controller[_0x3deb('0x11')]);router[_0x3deb('0x12')]('/',auth['isAuthenticated'](),controller['create']);router['post'](_0x3deb('0xe'),auth[_0x3deb('0x8')](),controller[_0x3deb('0x13')]);router['post'](_0x3deb('0x10'),auth[_0x3deb('0x8')](),controller['addAgents']);router[_0x3deb('0x14')](_0x3deb('0xb'),auth['isAuthenticated'](),controller[_0x3deb('0x15')]);router['delete'](_0x3deb('0xb'),auth['isAuthenticated'](),controller['destroy']);router[_0x3deb('0x16')](_0x3deb('0xe'),auth[_0x3deb('0x8')](),controller[_0x3deb('0x17')]);router[_0x3deb('0x16')](_0x3deb('0x10'),auth['isAuthenticated'](),controller[_0x3deb('0x18')]);module[_0x3deb('0x19')]=router; \ No newline at end of file +var _0x187d=['express','Router','fs-extra','../../components/auth/service','../../config/environment','./faxQueue.controller','isAuthenticated','index','get','/describe','describe','/:id','show','/:id/members','getMembers','getTeams','getAgents','post','create','/:id/teams','/:id/users','addAgents','delete','destroy','removeTeams','removeAgents','exports','multer','path','connect-timeout'];(function(_0xdd7033,_0x2d0e74){var _0x1a6841=function(_0x576837){while(--_0x576837){_0xdd7033['push'](_0xdd7033['shift']());}};_0x1a6841(++_0x2d0e74);}(_0x187d,0x93));var _0xd187=function(_0x3635ce,_0x33a6f9){_0x3635ce=_0x3635ce-0x0;var _0x97ecd0=_0x187d[_0x3635ce];return _0x97ecd0;};'use strict';var multer=require(_0xd187('0x0'));var util=require('util');var path=require(_0xd187('0x1'));var timeout=require(_0xd187('0x2'));var express=require(_0xd187('0x3'));var router=express[_0xd187('0x4')]();var fs_extra=require(_0xd187('0x5'));var auth=require(_0xd187('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0xd187('0x7'));var controller=require(_0xd187('0x8'));router['get']('/',auth[_0xd187('0x9')](),controller[_0xd187('0xa')]);router[_0xd187('0xb')](_0xd187('0xc'),auth[_0xd187('0x9')](),controller[_0xd187('0xd')]);router[_0xd187('0xb')](_0xd187('0xe'),auth['isAuthenticated'](),controller[_0xd187('0xf')]);router[_0xd187('0xb')](_0xd187('0x10'),auth[_0xd187('0x9')](),controller[_0xd187('0x11')]);router[_0xd187('0xb')]('/:id/teams',auth[_0xd187('0x9')](),controller[_0xd187('0x12')]);router[_0xd187('0xb')]('/:id/users',auth[_0xd187('0x9')](),controller[_0xd187('0x13')]);router[_0xd187('0x14')]('/',auth['isAuthenticated'](),controller[_0xd187('0x15')]);router[_0xd187('0x14')](_0xd187('0x16'),auth[_0xd187('0x9')](),controller['addTeams']);router[_0xd187('0x14')](_0xd187('0x17'),auth[_0xd187('0x9')](),controller[_0xd187('0x18')]);router['put'](_0xd187('0xe'),auth['isAuthenticated'](),controller['update']);router[_0xd187('0x19')]('/:id',auth['isAuthenticated'](),controller[_0xd187('0x1a')]);router[_0xd187('0x19')](_0xd187('0x16'),auth[_0xd187('0x9')](),controller[_0xd187('0x1b')]);router[_0xd187('0x19')](_0xd187('0x17'),auth[_0xd187('0x9')](),controller[_0xd187('0x1c')]);module[_0xd187('0x1d')]=router; \ No newline at end of file diff --git a/server/api/faxQueueReport/faxQueueReport.attributes.js b/server/api/faxQueueReport/faxQueueReport.attributes.js index 236a737..02affb0 100644 --- a/server/api/faxQueueReport/faxQueueReport.attributes.js +++ b/server/api/faxQueueReport/faxQueueReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd8a3=['moment','sequelize','exports','STRING','DATE'];(function(_0x41f69a,_0x2d3dcc){var _0x3788a2=function(_0x1793bc){while(--_0x1793bc){_0x41f69a['push'](_0x41f69a['shift']());}};_0x3788a2(++_0x2d3dcc);}(_0xd8a3,0x1ea));var _0x3d8a=function(_0x81b7f2,_0x2abe48){_0x81b7f2=_0x81b7f2-0x0;var _0x3968e6=_0xd8a3[_0x81b7f2];return _0x3968e6;};'use strict';var moment=require(_0x3d8a('0x0'));var Sequelize=require(_0x3d8a('0x1'));module[_0x3d8a('0x2')]={'uniqueid':{'type':Sequelize[_0x3d8a('0x3')],'allowNull':![]},'from':{'type':Sequelize[_0x3d8a('0x3')]},'joinAt':{'type':Sequelize['DATE']},'leaveAt':{'type':Sequelize[_0x3d8a('0x4')]},'acceptAt':{'type':Sequelize[_0x3d8a('0x4')]},'exitAt':{'type':Sequelize['DATE']},'reason':{'type':Sequelize[_0x3d8a('0x3')]}}; \ No newline at end of file +var _0xe821=['moment','sequelize','STRING','DATE'];(function(_0x3a5949,_0x45f4c5){var _0x59c43d=function(_0x41b3d0){while(--_0x41b3d0){_0x3a5949['push'](_0x3a5949['shift']());}};_0x59c43d(++_0x45f4c5);}(_0xe821,0x140));var _0x1e82=function(_0x303a4d,_0x41a0e2){_0x303a4d=_0x303a4d-0x0;var _0x5499a6=_0xe821[_0x303a4d];return _0x5499a6;};'use strict';var moment=require(_0x1e82('0x0'));var Sequelize=require(_0x1e82('0x1'));module['exports']={'uniqueid':{'type':Sequelize[_0x1e82('0x2')],'allowNull':![]},'from':{'type':Sequelize[_0x1e82('0x2')]},'joinAt':{'type':Sequelize[_0x1e82('0x3')]},'leaveAt':{'type':Sequelize[_0x1e82('0x3')]},'acceptAt':{'type':Sequelize[_0x1e82('0x3')]},'exitAt':{'type':Sequelize['DATE']},'reason':{'type':Sequelize[_0x1e82('0x2')]}}; \ No newline at end of file diff --git a/server/api/faxQueueReport/faxQueueReport.controller.js b/server/api/faxQueueReport/faxQueueReport.controller.js index 9c6b236..fcb4b74 100644 --- a/server/api/faxQueueReport/faxQueueReport.controller.js +++ b/server/api/faxQueueReport/faxQueueReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6a55=['rawAttributes','fieldName','type','query','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','filters','pick','filter','where','VIRTUAL','includeAll','findAll','show','keys','include','merge','options','find','catch','create','body','params','destroy','describe','eml-format','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','offset','undefined','limit','count','json','reject','save','update','then','end','error','stack','name','index','map','FaxQueueReport'];(function(_0x126558,_0x143c9a){var _0x1f6d14=function(_0x2b0eea){while(--_0x2b0eea){_0x126558['push'](_0x126558['shift']());}};_0x1f6d14(++_0x143c9a);}(_0x6a55,0x154));var _0x56a5=function(_0x87506e,_0x5680ec){_0x87506e=_0x87506e-0x0;var _0x5496a4=_0x6a55[_0x87506e];return _0x5496a4;};'use strict';var emlformat=require(_0x56a5('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x56a5('0x1'));var jsonpatch=require(_0x56a5('0x2'));var rp=require('request-promise');var moment=require(_0x56a5('0x3'));var BPromise=require(_0x56a5('0x4'));var Mustache=require(_0x56a5('0x5'));var util=require(_0x56a5('0x6'));var path=require(_0x56a5('0x7'));var sox=require(_0x56a5('0x8'));var csv=require(_0x56a5('0x9'));var ejs=require(_0x56a5('0xa'));var fs=require('fs');var fs_extra=require(_0x56a5('0xb'));var _=require(_0x56a5('0xc'));var squel=require(_0x56a5('0xd'));var crypto=require(_0x56a5('0xe'));var jsforce=require(_0x56a5('0xf'));var deskjs=require(_0x56a5('0x10'));var toCsv=require('to-csv');var querystring=require(_0x56a5('0x11'));var Papa=require(_0x56a5('0x12'));var Redis=require('ioredis');var authService=require(_0x56a5('0x13'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x56a5('0x14'));var logger=require(_0x56a5('0x15'))(_0x56a5('0x16'));var utils=require(_0x56a5('0x17'));var config=require(_0x56a5('0x18'));var licenseUtil=require(_0x56a5('0x19'));var db=require(_0x56a5('0x1a'))['db'];function respondWithStatusCode(_0x4b4dc7,_0x42dced){_0x42dced=_0x42dced||0xcc;return function(_0x5a80ed){if(_0x5a80ed){return _0x4b4dc7[_0x56a5('0x1b')](_0x42dced);}return _0x4b4dc7[_0x56a5('0x1c')](_0x42dced)['end']();};}function respondWithResult(_0x281d8b,_0x145174){_0x145174=_0x145174||0xc8;return function(_0x11f64d){if(_0x11f64d){return _0x281d8b[_0x56a5('0x1c')](_0x145174)['json'](_0x11f64d);}};}function respondWithFilteredResult(_0x3ad9d9,_0xdfce42){return function(_0x24cb7b){if(_0x24cb7b){var _0x466f52=typeof _0xdfce42[_0x56a5('0x1d')]===_0x56a5('0x1e')&&typeof _0xdfce42[_0x56a5('0x1f')]===_0x56a5('0x1e');var _0x26debc=_0x24cb7b['count'];var _0x52758f=_0x466f52?0x0:_0xdfce42[_0x56a5('0x1d')];var _0x4ed8dc=_0x466f52?_0x24cb7b[_0x56a5('0x20')]:_0xdfce42[_0x56a5('0x1d')]+_0xdfce42[_0x56a5('0x1f')];var _0x365150;if(_0x4ed8dc>=_0x26debc){_0x4ed8dc=_0x26debc;_0x365150=0xc8;}else{_0x365150=0xce;}_0x3ad9d9[_0x56a5('0x1c')](_0x365150);return _0x3ad9d9['set']('Content-Range',_0x52758f+'-'+_0x4ed8dc+'/'+_0x26debc)[_0x56a5('0x21')](_0x24cb7b);}return null;};}function patchUpdates(_0x5882cd){return function(_0x32b71f){try{jsonpatch['apply'](_0x32b71f,_0x5882cd,!![]);}catch(_0x3a8046){return BPromise[_0x56a5('0x22')](_0x3a8046);}return _0x32b71f[_0x56a5('0x23')]();};}function saveUpdates(_0x4cc2e2,_0x25eeb2){return function(_0x5bdefb){if(_0x5bdefb){return _0x5bdefb[_0x56a5('0x24')](_0x4cc2e2)['then'](function(_0x5749ea){return _0x5749ea;});}return null;};}function removeEntity(_0x1228af,_0x488b2a){return function(_0x2cc3c0){if(_0x2cc3c0){return _0x2cc3c0['destroy']()[_0x56a5('0x25')](function(){_0x1228af[_0x56a5('0x1c')](0xcc)[_0x56a5('0x26')]();});}};}function handleEntityNotFound(_0x587d78,_0x38b5e0){return function(_0x2950f6){if(!_0x2950f6){_0x587d78['sendStatus'](0x194);}return _0x2950f6;};}function handleError(_0x1a0dec,_0x3cb7ae){_0x3cb7ae=_0x3cb7ae||0x1f4;return function(_0x3dfdaf){logger[_0x56a5('0x27')](_0x3dfdaf[_0x56a5('0x28')]);if(_0x3dfdaf[_0x56a5('0x29')]){delete _0x3dfdaf['name'];}_0x1a0dec[_0x56a5('0x1c')](_0x3cb7ae)['send'](_0x3dfdaf);};}exports[_0x56a5('0x2a')]=function(_0x42b87b,_0x1355d6){var _0xb1e9c5={},_0x263188={},_0x2de197={'count':0x0,'rows':[]};var _0x512a48=_[_0x56a5('0x2b')](db[_0x56a5('0x2c')][_0x56a5('0x2d')],function(_0x5036cc){return{'name':_0x5036cc[_0x56a5('0x2e')],'type':_0x5036cc[_0x56a5('0x2f')]['key']};});_0x263188['model']=_[_0x56a5('0x2b')](_0x512a48,_0x56a5('0x29'));_0x263188[_0x56a5('0x30')]=_['keys'](_0x42b87b[_0x56a5('0x30')]);_0x263188['filters']=_[_0x56a5('0x31')](_0x263188[_0x56a5('0x32')],_0x263188[_0x56a5('0x30')]);_0xb1e9c5[_0x56a5('0x33')]=_[_0x56a5('0x31')](_0x263188[_0x56a5('0x32')],qs['fields'](_0x42b87b['query'][_0x56a5('0x34')]));_0xb1e9c5[_0x56a5('0x33')]=_0xb1e9c5['attributes'][_0x56a5('0x35')]?_0xb1e9c5[_0x56a5('0x33')]:_0x263188[_0x56a5('0x32')];if(!_0x42b87b['query'][_0x56a5('0x36')](_0x56a5('0x37'))){_0xb1e9c5[_0x56a5('0x1f')]=qs[_0x56a5('0x1f')](_0x42b87b[_0x56a5('0x30')][_0x56a5('0x1f')]);_0xb1e9c5['offset']=qs[_0x56a5('0x1d')](_0x42b87b[_0x56a5('0x30')]['offset']);}_0xb1e9c5[_0x56a5('0x38')]=qs[_0x56a5('0x39')](_0x42b87b[_0x56a5('0x30')][_0x56a5('0x39')]);_0xb1e9c5['where']=qs[_0x56a5('0x3a')](_[_0x56a5('0x3b')](_0x42b87b[_0x56a5('0x30')],_0x263188[_0x56a5('0x3a')]),_0x512a48);if(_0x42b87b[_0x56a5('0x30')][_0x56a5('0x3c')]){_0xb1e9c5['where']=_['merge'](_0xb1e9c5[_0x56a5('0x3d')],{'$or':_[_0x56a5('0x2b')](_0x512a48,function(_0x268f9c){if(_0x268f9c[_0x56a5('0x2f')]!==_0x56a5('0x3e')){var _0x41bd0b={};_0x41bd0b[_0x268f9c['name']]={'$like':'%'+_0x42b87b[_0x56a5('0x30')][_0x56a5('0x3c')]+'%'};return _0x41bd0b;}})});}_0xb1e9c5=_['merge']({},_0xb1e9c5,_0x42b87b['options']);var _0xb44fb0={'where':_0xb1e9c5[_0x56a5('0x3d')]};return db['FaxQueueReport'][_0x56a5('0x20')](_0xb44fb0)[_0x56a5('0x25')](function(_0x47b3fa){_0x2de197[_0x56a5('0x20')]=_0x47b3fa;if(_0x42b87b[_0x56a5('0x30')][_0x56a5('0x3f')]){_0xb1e9c5['include']=[{'all':!![]}];}return db[_0x56a5('0x2c')][_0x56a5('0x40')](_0xb1e9c5);})['then'](function(_0x23bfa5){_0x2de197['rows']=_0x23bfa5;return _0x2de197;})[_0x56a5('0x25')](respondWithFilteredResult(_0x1355d6,_0xb1e9c5))['catch'](handleError(_0x1355d6,null));};exports[_0x56a5('0x41')]=function(_0x17fcee,_0x4431f7){var _0x5205b8={'raw':!![],'where':{'id':_0x17fcee['params']['id']}},_0x39ee9a={};_0x39ee9a[_0x56a5('0x32')]=_[_0x56a5('0x42')](db[_0x56a5('0x2c')][_0x56a5('0x2d')]);_0x39ee9a[_0x56a5('0x30')]=_[_0x56a5('0x42')](_0x17fcee[_0x56a5('0x30')]);_0x39ee9a[_0x56a5('0x3a')]=_['intersection'](_0x39ee9a[_0x56a5('0x32')],_0x39ee9a[_0x56a5('0x30')]);_0x5205b8['attributes']=_[_0x56a5('0x31')](_0x39ee9a[_0x56a5('0x32')],qs['fields'](_0x17fcee['query'][_0x56a5('0x34')]));_0x5205b8[_0x56a5('0x33')]=_0x5205b8[_0x56a5('0x33')][_0x56a5('0x35')]?_0x5205b8[_0x56a5('0x33')]:_0x39ee9a[_0x56a5('0x32')];if(_0x17fcee['query']['includeAll']){_0x5205b8[_0x56a5('0x43')]=[{'all':!![]}];}_0x5205b8=_[_0x56a5('0x44')]({},_0x5205b8,_0x17fcee[_0x56a5('0x45')]);return db['FaxQueueReport'][_0x56a5('0x46')](_0x5205b8)['then'](handleEntityNotFound(_0x4431f7,null))[_0x56a5('0x25')](respondWithResult(_0x4431f7,null))[_0x56a5('0x47')](handleError(_0x4431f7,null));};exports[_0x56a5('0x48')]=function(_0x2ecbaa,_0x37faf5){return db[_0x56a5('0x2c')][_0x56a5('0x48')](_0x2ecbaa[_0x56a5('0x49')],{})[_0x56a5('0x25')](respondWithResult(_0x37faf5,0xc9))['catch'](handleError(_0x37faf5,null));};exports[_0x56a5('0x24')]=function(_0xaaa40c,_0x5a8ba3){if(_0xaaa40c[_0x56a5('0x49')]['id']){delete _0xaaa40c[_0x56a5('0x49')]['id'];}return db[_0x56a5('0x2c')]['find']({'where':{'id':_0xaaa40c[_0x56a5('0x4a')]['id']}})[_0x56a5('0x25')](handleEntityNotFound(_0x5a8ba3,null))[_0x56a5('0x25')](saveUpdates(_0xaaa40c['body'],null))[_0x56a5('0x25')](respondWithResult(_0x5a8ba3,null))[_0x56a5('0x47')](handleError(_0x5a8ba3,null));};exports[_0x56a5('0x4b')]=function(_0x1b0c6f,_0x2b5f2a){return db[_0x56a5('0x2c')][_0x56a5('0x46')]({'where':{'id':_0x1b0c6f[_0x56a5('0x4a')]['id']}})[_0x56a5('0x25')](handleEntityNotFound(_0x2b5f2a,null))[_0x56a5('0x25')](removeEntity(_0x2b5f2a,null))[_0x56a5('0x47')](handleError(_0x2b5f2a,null));};exports[_0x56a5('0x4c')]=function(_0x3229c8,_0xff01fa){return db[_0x56a5('0x2c')][_0x56a5('0x4c')]()['then'](respondWithResult(_0xff01fa,null))['catch'](handleError(_0xff01fa,null));}; \ No newline at end of file +var _0x2bbb=['ejs','fs-extra','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/environment','../../config/license/util','../../mysqldb','status','end','json','offset','undefined','limit','count','Content-Range','reject','update','then','sendStatus','error','stack','name','index','map','rawAttributes','type','key','model','query','keys','filters','intersection','attributes','fields','length','nolimit','order','sort','where','filter','merge','VIRTUAL','options','FaxQueueReport','include','rows','find','catch','create','body','params','destroy','describe','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox'];(function(_0xf9b7a3,_0x2a66f4){var _0x25f0a2=function(_0x3d3364){while(--_0x3d3364){_0xf9b7a3['push'](_0xf9b7a3['shift']());}};_0x25f0a2(++_0x2a66f4);}(_0x2bbb,0x85));var _0xb2bb=function(_0x701470,_0x5dc235){_0x701470=_0x701470-0x0;var _0x508944=_0x2bbb[_0x701470];return _0x508944;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xb2bb('0x0'));var zipdir=require(_0xb2bb('0x1'));var jsonpatch=require(_0xb2bb('0x2'));var rp=require('request-promise');var moment=require(_0xb2bb('0x3'));var BPromise=require(_0xb2bb('0x4'));var Mustache=require(_0xb2bb('0x5'));var util=require(_0xb2bb('0x6'));var path=require(_0xb2bb('0x7'));var sox=require(_0xb2bb('0x8'));var csv=require('to-csv');var ejs=require(_0xb2bb('0x9'));var fs=require('fs');var fs_extra=require(_0xb2bb('0xa'));var _=require('lodash');var squel=require(_0xb2bb('0xb'));var crypto=require(_0xb2bb('0xc'));var jsforce=require(_0xb2bb('0xd'));var deskjs=require(_0xb2bb('0xe'));var toCsv=require('to-csv');var querystring=require(_0xb2bb('0xf'));var Papa=require('papaparse');var Redis=require(_0xb2bb('0x10'));var authService=require(_0xb2bb('0x11'));var qs=require(_0xb2bb('0x12'));var as=require(_0xb2bb('0x13'));var hardwareService=require(_0xb2bb('0x14'));var logger=require('../../config/logger')(_0xb2bb('0x15'));var utils=require('../../config/utils');var config=require(_0xb2bb('0x16'));var licenseUtil=require(_0xb2bb('0x17'));var db=require(_0xb2bb('0x18'))['db'];function respondWithStatusCode(_0x43950f,_0x38ea15){_0x38ea15=_0x38ea15||0xcc;return function(_0x14c05e){if(_0x14c05e){return _0x43950f['sendStatus'](_0x38ea15);}return _0x43950f[_0xb2bb('0x19')](_0x38ea15)[_0xb2bb('0x1a')]();};}function respondWithResult(_0x332903,_0x2905e2){_0x2905e2=_0x2905e2||0xc8;return function(_0x50a32e){if(_0x50a32e){return _0x332903[_0xb2bb('0x19')](_0x2905e2)[_0xb2bb('0x1b')](_0x50a32e);}};}function respondWithFilteredResult(_0x3bb017,_0x28b73c){return function(_0x367c6f){if(_0x367c6f){var _0x48d630=typeof _0x28b73c[_0xb2bb('0x1c')]===_0xb2bb('0x1d')&&typeof _0x28b73c[_0xb2bb('0x1e')]===_0xb2bb('0x1d');var _0x2dcb2d=_0x367c6f[_0xb2bb('0x1f')];var _0x35c4de=_0x48d630?0x0:_0x28b73c[_0xb2bb('0x1c')];var _0x8d2033=_0x48d630?_0x367c6f[_0xb2bb('0x1f')]:_0x28b73c[_0xb2bb('0x1c')]+_0x28b73c[_0xb2bb('0x1e')];var _0x5e8d6a;if(_0x8d2033>=_0x2dcb2d){_0x8d2033=_0x2dcb2d;_0x5e8d6a=0xc8;}else{_0x5e8d6a=0xce;}_0x3bb017[_0xb2bb('0x19')](_0x5e8d6a);return _0x3bb017['set'](_0xb2bb('0x20'),_0x35c4de+'-'+_0x8d2033+'/'+_0x2dcb2d)['json'](_0x367c6f);}return null;};}function patchUpdates(_0x3e7028){return function(_0x8f37d9){try{jsonpatch['apply'](_0x8f37d9,_0x3e7028,!![]);}catch(_0x302cd4){return BPromise[_0xb2bb('0x21')](_0x302cd4);}return _0x8f37d9['save']();};}function saveUpdates(_0x5ab483,_0x4a428f){return function(_0x2f1e0f){if(_0x2f1e0f){return _0x2f1e0f[_0xb2bb('0x22')](_0x5ab483)[_0xb2bb('0x23')](function(_0x494344){return _0x494344;});}return null;};}function removeEntity(_0x297d52,_0x2b1f94){return function(_0x250c3f){if(_0x250c3f){return _0x250c3f['destroy']()[_0xb2bb('0x23')](function(){_0x297d52[_0xb2bb('0x19')](0xcc)[_0xb2bb('0x1a')]();});}};}function handleEntityNotFound(_0x14aba5,_0x4b77e7){return function(_0x467b79){if(!_0x467b79){_0x14aba5[_0xb2bb('0x24')](0x194);}return _0x467b79;};}function handleError(_0x3d7890,_0x4a47ab){_0x4a47ab=_0x4a47ab||0x1f4;return function(_0xa09168){logger[_0xb2bb('0x25')](_0xa09168[_0xb2bb('0x26')]);if(_0xa09168[_0xb2bb('0x27')]){delete _0xa09168[_0xb2bb('0x27')];}_0x3d7890[_0xb2bb('0x19')](_0x4a47ab)['send'](_0xa09168);};}exports[_0xb2bb('0x28')]=function(_0x48d96f,_0xf1ed22){var _0x53e6aa={},_0x3d82c8={},_0x2b8ae3={'count':0x0,'rows':[]};var _0x5719f3=_[_0xb2bb('0x29')](db['FaxQueueReport'][_0xb2bb('0x2a')],function(_0x115202){return{'name':_0x115202['fieldName'],'type':_0x115202[_0xb2bb('0x2b')][_0xb2bb('0x2c')]};});_0x3d82c8[_0xb2bb('0x2d')]=_[_0xb2bb('0x29')](_0x5719f3,_0xb2bb('0x27'));_0x3d82c8[_0xb2bb('0x2e')]=_[_0xb2bb('0x2f')](_0x48d96f[_0xb2bb('0x2e')]);_0x3d82c8[_0xb2bb('0x30')]=_[_0xb2bb('0x31')](_0x3d82c8[_0xb2bb('0x2d')],_0x3d82c8['query']);_0x53e6aa[_0xb2bb('0x32')]=_[_0xb2bb('0x31')](_0x3d82c8[_0xb2bb('0x2d')],qs[_0xb2bb('0x33')](_0x48d96f[_0xb2bb('0x2e')]['fields']));_0x53e6aa[_0xb2bb('0x32')]=_0x53e6aa[_0xb2bb('0x32')][_0xb2bb('0x34')]?_0x53e6aa[_0xb2bb('0x32')]:_0x3d82c8[_0xb2bb('0x2d')];if(!_0x48d96f['query']['hasOwnProperty'](_0xb2bb('0x35'))){_0x53e6aa[_0xb2bb('0x1e')]=qs['limit'](_0x48d96f[_0xb2bb('0x2e')][_0xb2bb('0x1e')]);_0x53e6aa['offset']=qs[_0xb2bb('0x1c')](_0x48d96f['query'][_0xb2bb('0x1c')]);}_0x53e6aa[_0xb2bb('0x36')]=qs['sort'](_0x48d96f[_0xb2bb('0x2e')][_0xb2bb('0x37')]);_0x53e6aa[_0xb2bb('0x38')]=qs[_0xb2bb('0x30')](_['pick'](_0x48d96f[_0xb2bb('0x2e')],_0x3d82c8[_0xb2bb('0x30')]),_0x5719f3);if(_0x48d96f[_0xb2bb('0x2e')][_0xb2bb('0x39')]){_0x53e6aa[_0xb2bb('0x38')]=_[_0xb2bb('0x3a')](_0x53e6aa[_0xb2bb('0x38')],{'$or':_[_0xb2bb('0x29')](_0x5719f3,function(_0xa8e622){if(_0xa8e622['type']!==_0xb2bb('0x3b')){var _0x3e1ab8={};_0x3e1ab8[_0xa8e622[_0xb2bb('0x27')]]={'$like':'%'+_0x48d96f[_0xb2bb('0x2e')][_0xb2bb('0x39')]+'%'};return _0x3e1ab8;}})});}_0x53e6aa=_[_0xb2bb('0x3a')]({},_0x53e6aa,_0x48d96f[_0xb2bb('0x3c')]);var _0x185c68={'where':_0x53e6aa['where']};return db[_0xb2bb('0x3d')]['count'](_0x185c68)[_0xb2bb('0x23')](function(_0x18d464){_0x2b8ae3[_0xb2bb('0x1f')]=_0x18d464;if(_0x48d96f[_0xb2bb('0x2e')]['includeAll']){_0x53e6aa[_0xb2bb('0x3e')]=[{'all':!![]}];}return db['FaxQueueReport']['findAll'](_0x53e6aa);})[_0xb2bb('0x23')](function(_0x51c19b){_0x2b8ae3[_0xb2bb('0x3f')]=_0x51c19b;return _0x2b8ae3;})['then'](respondWithFilteredResult(_0xf1ed22,_0x53e6aa))['catch'](handleError(_0xf1ed22,null));};exports['show']=function(_0x3a1220,_0x2fc06e){var _0x37dee5={'raw':!![],'where':{'id':_0x3a1220['params']['id']}},_0x5dab12={};_0x5dab12[_0xb2bb('0x2d')]=_[_0xb2bb('0x2f')](db['FaxQueueReport'][_0xb2bb('0x2a')]);_0x5dab12[_0xb2bb('0x2e')]=_['keys'](_0x3a1220[_0xb2bb('0x2e')]);_0x5dab12[_0xb2bb('0x30')]=_['intersection'](_0x5dab12['model'],_0x5dab12[_0xb2bb('0x2e')]);_0x37dee5[_0xb2bb('0x32')]=_[_0xb2bb('0x31')](_0x5dab12[_0xb2bb('0x2d')],qs['fields'](_0x3a1220[_0xb2bb('0x2e')][_0xb2bb('0x33')]));_0x37dee5[_0xb2bb('0x32')]=_0x37dee5[_0xb2bb('0x32')][_0xb2bb('0x34')]?_0x37dee5[_0xb2bb('0x32')]:_0x5dab12['model'];if(_0x3a1220[_0xb2bb('0x2e')]['includeAll']){_0x37dee5[_0xb2bb('0x3e')]=[{'all':!![]}];}_0x37dee5=_[_0xb2bb('0x3a')]({},_0x37dee5,_0x3a1220[_0xb2bb('0x3c')]);return db[_0xb2bb('0x3d')][_0xb2bb('0x40')](_0x37dee5)[_0xb2bb('0x23')](handleEntityNotFound(_0x2fc06e,null))[_0xb2bb('0x23')](respondWithResult(_0x2fc06e,null))[_0xb2bb('0x41')](handleError(_0x2fc06e,null));};exports['create']=function(_0x764d07,_0x4e70e3){return db[_0xb2bb('0x3d')][_0xb2bb('0x42')](_0x764d07[_0xb2bb('0x43')],{})['then'](respondWithResult(_0x4e70e3,0xc9))[_0xb2bb('0x41')](handleError(_0x4e70e3,null));};exports[_0xb2bb('0x22')]=function(_0x4a3fb2,_0x47ac7d){if(_0x4a3fb2['body']['id']){delete _0x4a3fb2[_0xb2bb('0x43')]['id'];}return db['FaxQueueReport'][_0xb2bb('0x40')]({'where':{'id':_0x4a3fb2[_0xb2bb('0x44')]['id']}})['then'](handleEntityNotFound(_0x47ac7d,null))[_0xb2bb('0x23')](saveUpdates(_0x4a3fb2[_0xb2bb('0x43')],null))[_0xb2bb('0x23')](respondWithResult(_0x47ac7d,null))[_0xb2bb('0x41')](handleError(_0x47ac7d,null));};exports[_0xb2bb('0x45')]=function(_0xb883ef,_0x127666){return db['FaxQueueReport'][_0xb2bb('0x40')]({'where':{'id':_0xb883ef[_0xb2bb('0x44')]['id']}})[_0xb2bb('0x23')](handleEntityNotFound(_0x127666,null))[_0xb2bb('0x23')](removeEntity(_0x127666,null))['catch'](handleError(_0x127666,null));};exports[_0xb2bb('0x46')]=function(_0x44e406,_0x59a1be){return db[_0xb2bb('0x3d')][_0xb2bb('0x46')]()[_0xb2bb('0x23')](respondWithResult(_0x59a1be,null))[_0xb2bb('0x41')](handleError(_0x59a1be,null));}; \ No newline at end of file diff --git a/server/api/faxQueueReport/faxQueueReport.model.js b/server/api/faxQueueReport/faxQueueReport.model.js index 2076349..4249d64 100644 --- a/server/api/faxQueueReport/faxQueueReport.model.js +++ b/server/api/faxQueueReport/faxQueueReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x814b=['../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','./faxQueueReport.attributes','exports','define','FaxQueueReport','uniqueid','lodash','util'];(function(_0x574617,_0x42eccc){var _0x29de90=function(_0x367aff){while(--_0x367aff){_0x574617['push'](_0x574617['shift']());}};_0x29de90(++_0x42eccc);}(_0x814b,0x1a2));var _0xb814=function(_0x2393c0,_0x5d5d61){_0x2393c0=_0x2393c0-0x0;var _0x188aa9=_0x814b[_0x2393c0];return _0x188aa9;};'use strict';var _=require(_0xb814('0x0'));var util=require(_0xb814('0x1'));var logger=require(_0xb814('0x2'))(_0xb814('0x3'));var moment=require(_0xb814('0x4'));var BPromise=require(_0xb814('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xb814('0x6'));var rimraf=require(_0xb814('0x7'));var config=require(_0xb814('0x8'));var attributes=require(_0xb814('0x9'));module[_0xb814('0xa')]=function(_0x322a70,_0x53e507){return _0x322a70[_0xb814('0xb')](_0xb814('0xc'),attributes,{'tableName':'report_fax_queue','paranoid':![],'indexes':[{'name':_0xb814('0xd'),'fields':[_0xb814('0xd')]}],'timestamps':!![]});}; \ No newline at end of file +var _0xf494=['util','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','./faxQueueReport.attributes','exports','define','uniqueid','lodash'];(function(_0x2578a8,_0x580ac3){var _0x3e1c37=function(_0x2d2af0){while(--_0x2d2af0){_0x2578a8['push'](_0x2578a8['shift']());}};_0x3e1c37(++_0x580ac3);}(_0xf494,0x1c6));var _0x4f49=function(_0x14c467,_0x1d353c){_0x14c467=_0x14c467-0x0;var _0x36dac1=_0xf494[_0x14c467];return _0x36dac1;};'use strict';var _=require(_0x4f49('0x0'));var util=require(_0x4f49('0x1'));var logger=require(_0x4f49('0x2'))('api');var moment=require(_0x4f49('0x3'));var BPromise=require(_0x4f49('0x4'));var rp=require(_0x4f49('0x5'));var fs=require('fs');var path=require(_0x4f49('0x6'));var rimraf=require(_0x4f49('0x7'));var config=require(_0x4f49('0x8'));var attributes=require(_0x4f49('0x9'));module[_0x4f49('0xa')]=function(_0xc5e778,_0x413530){return _0xc5e778[_0x4f49('0xb')]('FaxQueueReport',attributes,{'tableName':'report_fax_queue','paranoid':![],'indexes':[{'name':_0x4f49('0xc'),'fields':[_0x4f49('0xc')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/faxQueueReport/faxQueueReport.rpc.js b/server/api/faxQueueReport/faxQueueReport.rpc.js index 232814c..f2b5f70 100644 --- a/server/api/faxQueueReport/faxQueueReport.rpc.js +++ b/server/api/faxQueueReport/faxQueueReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfdbc=['create','body','options','update','raw','limit','UpdateFaxQueueReport','lodash','moment','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','then','request\x20sent','debug','FaxQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','FaxQueueReport,\x20%s,\x20%s','message','info','result','catch','CreateFaxQueueReport','FaxQueueReport'];(function(_0x47f62a,_0x1cec5d){var _0x28248f=function(_0x216f41){while(--_0x216f41){_0x47f62a['push'](_0x47f62a['shift']());}};_0x28248f(++_0x1cec5d);}(_0xfdbc,0xf7));var _0xcfdb=function(_0x413844,_0x15064c){_0x413844=_0x413844-0x0;var _0x2b3f2d=_0xfdbc[_0x413844];return _0x2b3f2d;};'use strict';var _=require(_0xcfdb('0x0'));var util=require('util');var moment=require(_0xcfdb('0x1'));var BPromise=require('bluebird');var rs=require(_0xcfdb('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xcfdb('0x3'))['db'];var utils=require(_0xcfdb('0x4'));var logger=require('../../config/logger')(_0xcfdb('0x5'));var config=require(_0xcfdb('0x6'));var jayson=require(_0xcfdb('0x7'));var client=jayson[_0xcfdb('0x8')][_0xcfdb('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x4ceb19,_0x38ae2b,_0x246a1c){return new BPromise(function(_0x5d48f5,_0x54cb31){return client['request'](_0x4ceb19,_0x246a1c)[_0xcfdb('0xa')](function(_0x1137d5){logger['info']('FaxQueueReport,\x20%s,\x20%s',_0x38ae2b,_0xcfdb('0xb'));logger[_0xcfdb('0xc')](_0xcfdb('0xd'),_0x38ae2b,_0xcfdb('0xb'),JSON[_0xcfdb('0xe')](_0x1137d5));if(_0x1137d5[_0xcfdb('0xf')]){if(_0x1137d5[_0xcfdb('0xf')]['code']===0x1f4){logger['error'](_0xcfdb('0x10'),_0x38ae2b,_0x1137d5[_0xcfdb('0xf')]['message']);return _0x54cb31(_0x1137d5['error']['message']);}logger[_0xcfdb('0xf')](_0xcfdb('0x10'),_0x38ae2b,_0x1137d5['error'][_0xcfdb('0x11')]);return _0x5d48f5(_0x1137d5[_0xcfdb('0xf')][_0xcfdb('0x11')]);}else{logger[_0xcfdb('0x12')](_0xcfdb('0x10'),_0x38ae2b,'request\x20sent');_0x5d48f5(_0x1137d5[_0xcfdb('0x13')][_0xcfdb('0x11')]);}})[_0xcfdb('0x14')](function(_0x11f774){logger[_0xcfdb('0xf')](_0xcfdb('0x10'),_0x38ae2b,_0x11f774);_0x54cb31(_0x11f774);});});}exports[_0xcfdb('0x15')]=function(_0x5790e1){var _0x4819a1=this;return new Promise(function(_0x2cb3b2,_0x319683){return db[_0xcfdb('0x16')][_0xcfdb('0x17')](_0x5790e1[_0xcfdb('0x18')],{'raw':_0x5790e1[_0xcfdb('0x19')]?_0x5790e1[_0xcfdb('0x19')]['raw']===undefined?!![]:![]:!![]})[_0xcfdb('0xa')](function(_0x5a7b54){logger[_0xcfdb('0x12')](_0xcfdb('0x15'),_0x5790e1);logger['debug'](_0xcfdb('0x15'),_0x5790e1,JSON[_0xcfdb('0xe')](_0x5a7b54));_0x2cb3b2(_0x5a7b54);})[_0xcfdb('0x14')](function(_0x475296){logger[_0xcfdb('0xf')]('CreateFaxQueueReport',_0x475296['message'],_0x5790e1);_0x319683(_0x4819a1[_0xcfdb('0xf')](0x1f4,_0x475296[_0xcfdb('0x11')]));});});};exports['UpdateFaxQueueReport']=function(_0x20ca6c){var _0x3f1b8f=this;return new Promise(function(_0x14b761,_0x315c76){return db[_0xcfdb('0x16')][_0xcfdb('0x1a')](_0x20ca6c['body'],{'raw':_0x20ca6c[_0xcfdb('0x19')]?_0x20ca6c[_0xcfdb('0x19')][_0xcfdb('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x20ca6c['options']?_0x20ca6c['options']['where']||null:null,'attributes':_0x20ca6c[_0xcfdb('0x19')]?_0x20ca6c[_0xcfdb('0x19')]['attributes']||null:null,'limit':_0x20ca6c[_0xcfdb('0x19')]?_0x20ca6c[_0xcfdb('0x19')][_0xcfdb('0x1c')]||null:null})[_0xcfdb('0xa')](function(_0x12e516){logger[_0xcfdb('0x12')]('UpdateFaxQueueReport',_0x20ca6c);logger[_0xcfdb('0xc')](_0xcfdb('0x1d'),_0x20ca6c,JSON[_0xcfdb('0xe')](_0x12e516));_0x14b761(_0x12e516);})[_0xcfdb('0x14')](function(_0x330527){logger['error'](_0xcfdb('0x1d'),_0x330527['message'],_0x20ca6c);_0x315c76(_0x3f1b8f['error'](0x1f4,_0x330527[_0xcfdb('0x11')]));});});}; \ No newline at end of file +var _0xa5fb=['FaxQueueReport,\x20%s,\x20%s','request\x20sent','debug','FaxQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','FaxQueueReport','options','raw','then','info','CreateFaxQueueReport','UpdateFaxQueueReport','body','where','attributes','limit','lodash','util','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','client','request'];(function(_0x4b870e,_0x390eca){var _0x234d51=function(_0x22133a){while(--_0x22133a){_0x4b870e['push'](_0x4b870e['shift']());}};_0x234d51(++_0x390eca);}(_0xa5fb,0x15f));var _0xba5f=function(_0x54bc6b,_0x2d066d){_0x54bc6b=_0x54bc6b-0x0;var _0x1e7168=_0xa5fb[_0x54bc6b];return _0x1e7168;};'use strict';var _=require(_0xba5f('0x0'));var util=require(_0xba5f('0x1'));var moment=require('moment');var BPromise=require(_0xba5f('0x2'));var rs=require(_0xba5f('0x3'));var fs=require('fs');var Redis=require(_0xba5f('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xba5f('0x5'));var logger=require(_0xba5f('0x6'))('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xba5f('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0xb17b31,_0x18aca8,_0x19b15e){return new BPromise(function(_0x5291e6,_0x3b8df5){return client[_0xba5f('0x8')](_0xb17b31,_0x19b15e)['then'](function(_0x34c474){logger['info'](_0xba5f('0x9'),_0x18aca8,_0xba5f('0xa'));logger[_0xba5f('0xb')](_0xba5f('0xc'),_0x18aca8,_0xba5f('0xa'),JSON[_0xba5f('0xd')](_0x34c474));if(_0x34c474[_0xba5f('0xe')]){if(_0x34c474[_0xba5f('0xe')][_0xba5f('0xf')]===0x1f4){logger[_0xba5f('0xe')](_0xba5f('0x9'),_0x18aca8,_0x34c474[_0xba5f('0xe')][_0xba5f('0x10')]);return _0x3b8df5(_0x34c474['error']['message']);}logger[_0xba5f('0xe')]('FaxQueueReport,\x20%s,\x20%s',_0x18aca8,_0x34c474[_0xba5f('0xe')][_0xba5f('0x10')]);return _0x5291e6(_0x34c474[_0xba5f('0xe')][_0xba5f('0x10')]);}else{logger['info'](_0xba5f('0x9'),_0x18aca8,'request\x20sent');_0x5291e6(_0x34c474[_0xba5f('0x11')][_0xba5f('0x10')]);}})[_0xba5f('0x12')](function(_0x444aee){logger[_0xba5f('0xe')](_0xba5f('0x9'),_0x18aca8,_0x444aee);_0x3b8df5(_0x444aee);});});}exports['CreateFaxQueueReport']=function(_0x2245d4){var _0x46a20b=this;return new Promise(function(_0x3d3386,_0x45ccc9){return db[_0xba5f('0x13')]['create'](_0x2245d4['body'],{'raw':_0x2245d4[_0xba5f('0x14')]?_0x2245d4[_0xba5f('0x14')][_0xba5f('0x15')]===undefined?!![]:![]:!![]})[_0xba5f('0x16')](function(_0x499e7e){logger[_0xba5f('0x17')](_0xba5f('0x18'),_0x2245d4);logger[_0xba5f('0xb')](_0xba5f('0x18'),_0x2245d4,JSON[_0xba5f('0xd')](_0x499e7e));_0x3d3386(_0x499e7e);})[_0xba5f('0x12')](function(_0x21142d){logger['error'](_0xba5f('0x18'),_0x21142d[_0xba5f('0x10')],_0x2245d4);_0x45ccc9(_0x46a20b[_0xba5f('0xe')](0x1f4,_0x21142d[_0xba5f('0x10')]));});});};exports[_0xba5f('0x19')]=function(_0x58b4b0){var _0x5cab77=this;return new Promise(function(_0x3249d4,_0x316892){return db['FaxQueueReport']['update'](_0x58b4b0[_0xba5f('0x1a')],{'raw':_0x58b4b0[_0xba5f('0x14')]?_0x58b4b0[_0xba5f('0x14')][_0xba5f('0x15')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x58b4b0[_0xba5f('0x14')]?_0x58b4b0[_0xba5f('0x14')][_0xba5f('0x1b')]||null:null,'attributes':_0x58b4b0['options']?_0x58b4b0[_0xba5f('0x14')][_0xba5f('0x1c')]||null:null,'limit':_0x58b4b0[_0xba5f('0x14')]?_0x58b4b0[_0xba5f('0x14')][_0xba5f('0x1d')]||null:null})[_0xba5f('0x16')](function(_0x705cb8){logger['info']('UpdateFaxQueueReport',_0x58b4b0);logger[_0xba5f('0xb')]('UpdateFaxQueueReport',_0x58b4b0,JSON[_0xba5f('0xd')](_0x705cb8));_0x3249d4(_0x705cb8);})[_0xba5f('0x12')](function(_0x4d0211){logger[_0xba5f('0xe')](_0xba5f('0x19'),_0x4d0211[_0xba5f('0x10')],_0x58b4b0);_0x316892(_0x5cab77['error'](0x1f4,_0x4d0211[_0xba5f('0x10')]));});});}; \ No newline at end of file diff --git a/server/api/faxQueueReport/index.js b/server/api/faxQueueReport/index.js index 18f1a1a..2399ccb 100644 --- a/server/api/faxQueueReport/index.js +++ b/server/api/faxQueueReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4bb6=['update','delete','destroy','exports','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../config/environment','./faxQueueReport.controller','isAuthenticated','index','get','/describe','describe','show','post','create','/:id'];(function(_0x393f83,_0xc442de){var _0xc7bf6f=function(_0x3ba026){while(--_0x3ba026){_0x393f83['push'](_0x393f83['shift']());}};_0xc7bf6f(++_0xc442de);}(_0x4bb6,0x1bc));var _0x64bb=function(_0x1b2506,_0x1af6a6){_0x1b2506=_0x1b2506-0x0;var _0x2033b6=_0x4bb6[_0x1b2506];return _0x2033b6;};'use strict';var multer=require(_0x64bb('0x0'));var util=require(_0x64bb('0x1'));var path=require(_0x64bb('0x2'));var timeout=require(_0x64bb('0x3'));var express=require(_0x64bb('0x4'));var router=express['Router']();var fs_extra=require(_0x64bb('0x5'));var auth=require(_0x64bb('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x64bb('0x7'));var controller=require(_0x64bb('0x8'));router['get']('/',auth[_0x64bb('0x9')](),controller[_0x64bb('0xa')]);router[_0x64bb('0xb')](_0x64bb('0xc'),auth[_0x64bb('0x9')](),controller[_0x64bb('0xd')]);router['get']('/:id',auth['isAuthenticated'](),controller[_0x64bb('0xe')]);router[_0x64bb('0xf')]('/',auth['isAuthenticated'](),controller[_0x64bb('0x10')]);router['put'](_0x64bb('0x11'),auth[_0x64bb('0x9')](),controller[_0x64bb('0x12')]);router[_0x64bb('0x13')](_0x64bb('0x11'),auth['isAuthenticated'](),controller[_0x64bb('0x14')]);module[_0x64bb('0x15')]=router; \ No newline at end of file +var _0x1ed4=['get','index','/describe','describe','/:id','isAuthenticated','post','create','put','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./faxQueueReport.controller'];(function(_0x1e245c,_0x586617){var _0x5bd4f1=function(_0xc6de49){while(--_0xc6de49){_0x1e245c['push'](_0x1e245c['shift']());}};_0x5bd4f1(++_0x586617);}(_0x1ed4,0x1a5));var _0x41ed=function(_0x973d08,_0x9105de){_0x973d08=_0x973d08-0x0;var _0x384029=_0x1ed4[_0x973d08];return _0x384029;};'use strict';var multer=require(_0x41ed('0x0'));var util=require(_0x41ed('0x1'));var path=require(_0x41ed('0x2'));var timeout=require(_0x41ed('0x3'));var express=require(_0x41ed('0x4'));var router=express[_0x41ed('0x5')]();var fs_extra=require(_0x41ed('0x6'));var auth=require(_0x41ed('0x7'));var interaction=require(_0x41ed('0x8'));var config=require(_0x41ed('0x9'));var controller=require(_0x41ed('0xa'));router[_0x41ed('0xb')]('/',auth['isAuthenticated'](),controller[_0x41ed('0xc')]);router[_0x41ed('0xb')](_0x41ed('0xd'),auth['isAuthenticated'](),controller[_0x41ed('0xe')]);router[_0x41ed('0xb')](_0x41ed('0xf'),auth[_0x41ed('0x10')](),controller['show']);router[_0x41ed('0x11')]('/',auth['isAuthenticated'](),controller[_0x41ed('0x12')]);router[_0x41ed('0x13')](_0x41ed('0xf'),auth[_0x41ed('0x10')](),controller[_0x41ed('0x14')]);router[_0x41ed('0x15')](_0x41ed('0xf'),auth[_0x41ed('0x10')](),controller[_0x41ed('0x16')]);module[_0x41ed('0x17')]=router; \ No newline at end of file diff --git a/server/api/faxTransferReport/faxTransferReport.attributes.js b/server/api/faxTransferReport/faxTransferReport.attributes.js index 65ed858..c537867 100644 --- a/server/api/faxTransferReport/faxTransferReport.attributes.js +++ b/server/api/faxTransferReport/faxTransferReport.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(_0x191154,_0x56f74c){var _0x3dcd73=function(_0x51c321){while(--_0x51c321){_0x191154['push'](_0x191154['shift']());}};_0x3dcd73(++_0x56f74c);}(_0xb43b,0x1b2));var _0xbb43=function(_0x1b03ee,_0x3b24f0){_0x1b03ee=_0x1b03ee-0x0;var _0x321c8c=_0xb43b[_0x1b03ee];return _0x321c8c;};'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 _0xcb91=['STRING','ENUM','account','queue','NOW','exports'];(function(_0x4613e2,_0x116644){var _0x4bf192=function(_0xf13219){while(--_0xf13219){_0x4613e2['push'](_0x4613e2['shift']());}};_0x4bf192(++_0x116644);}(_0xcb91,0x1a9));var _0x1cb9=function(_0x2b305c,_0x5ae303){_0x2b305c=_0x2b305c-0x0;var _0x5d8c85=_0xcb91[_0x2b305c];return _0x5d8c85;};'use strict';var moment=require('moment');var Sequelize=require('sequelize');module[_0x1cb9('0x0')]={'uniqueid':{'type':Sequelize[_0x1cb9('0x1')],'allowNull':![]},'type':{'type':Sequelize[_0x1cb9('0x2')](_0x1cb9('0x3'),'agent',_0x1cb9('0x4')),'allowNull':![],'defaultValue':_0x1cb9('0x4')},'transferredAt':{'type':Sequelize['DATE'],'allowNull':![],'defaultValue':Sequelize[_0x1cb9('0x5')]}}; \ No newline at end of file diff --git a/server/api/faxTransferReport/faxTransferReport.controller.js b/server/api/faxTransferReport/faxTransferReport.controller.js index 4543878..e060be7 100644 --- a/server/api/faxTransferReport/faxTransferReport.controller.js +++ b/server/api/faxTransferReport/faxTransferReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb7c9=['options','then','includeAll','include','findAll','rows','catch','show','params','find','create','body','describe','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','jsforce','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','end','status','json','offset','limit','count','Content-Range','apply','reject','save','update','destroy','sendStatus','stack','send','map','FaxTransferReport','rawAttributes','fieldName','key','name','query','keys','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','type','VIRTUAL','filter'];(function(_0x12077e,_0x3444c9){var _0xfcd15f=function(_0x21f5e3){while(--_0x21f5e3){_0x12077e['push'](_0x12077e['shift']());}};_0xfcd15f(++_0x3444c9);}(_0xb7c9,0xf1));var _0x9b7c=function(_0x2c91e9,_0x2fb965){_0x2c91e9=_0x2c91e9-0x0;var _0x13f0ff=_0xb7c9[_0x2c91e9];return _0x13f0ff;};'use strict';var emlformat=require(_0x9b7c('0x0'));var rimraf=require(_0x9b7c('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x9b7c('0x2'));var rp=require(_0x9b7c('0x3'));var moment=require(_0x9b7c('0x4'));var BPromise=require(_0x9b7c('0x5'));var Mustache=require(_0x9b7c('0x6'));var util=require(_0x9b7c('0x7'));var path=require(_0x9b7c('0x8'));var sox=require(_0x9b7c('0x9'));var csv=require(_0x9b7c('0xa'));var ejs=require(_0x9b7c('0xb'));var fs=require('fs');var fs_extra=require(_0x9b7c('0xc'));var _=require(_0x9b7c('0xd'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x9b7c('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x9b7c('0xa'));var querystring=require(_0x9b7c('0xf'));var Papa=require(_0x9b7c('0x10'));var Redis=require('ioredis');var authService=require(_0x9b7c('0x11'));var qs=require(_0x9b7c('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x9b7c('0x13'))(_0x9b7c('0x14'));var utils=require(_0x9b7c('0x15'));var config=require(_0x9b7c('0x16'));var licenseUtil=require('../../config/license/util');var db=require(_0x9b7c('0x17'))['db'];function respondWithStatusCode(_0xf5d7a4,_0x2db359){_0x2db359=_0x2db359||0xcc;return function(_0x396129){if(_0x396129){return _0xf5d7a4['sendStatus'](_0x2db359);}return _0xf5d7a4['status'](_0x2db359)[_0x9b7c('0x18')]();};}function respondWithResult(_0x24696d,_0x57ee0a){_0x57ee0a=_0x57ee0a||0xc8;return function(_0x4b3bee){if(_0x4b3bee){return _0x24696d[_0x9b7c('0x19')](_0x57ee0a)[_0x9b7c('0x1a')](_0x4b3bee);}};}function respondWithFilteredResult(_0x180b67,_0x398ba4){return function(_0x366b34){if(_0x366b34){var _0x11ca59=typeof _0x398ba4[_0x9b7c('0x1b')]==='undefined'&&typeof _0x398ba4[_0x9b7c('0x1c')]==='undefined';var _0x22916d=_0x366b34['count'];var _0x43f2f0=_0x11ca59?0x0:_0x398ba4[_0x9b7c('0x1b')];var _0x42baf3=_0x11ca59?_0x366b34[_0x9b7c('0x1d')]:_0x398ba4[_0x9b7c('0x1b')]+_0x398ba4[_0x9b7c('0x1c')];var _0x1be2a3;if(_0x42baf3>=_0x22916d){_0x42baf3=_0x22916d;_0x1be2a3=0xc8;}else{_0x1be2a3=0xce;}_0x180b67[_0x9b7c('0x19')](_0x1be2a3);return _0x180b67['set'](_0x9b7c('0x1e'),_0x43f2f0+'-'+_0x42baf3+'/'+_0x22916d)[_0x9b7c('0x1a')](_0x366b34);}return null;};}function patchUpdates(_0x5c9640){return function(_0x5a9b17){try{jsonpatch[_0x9b7c('0x1f')](_0x5a9b17,_0x5c9640,!![]);}catch(_0x43cb50){return BPromise[_0x9b7c('0x20')](_0x43cb50);}return _0x5a9b17[_0x9b7c('0x21')]();};}function saveUpdates(_0x255204,_0x2f779e){return function(_0x100e96){if(_0x100e96){return _0x100e96[_0x9b7c('0x22')](_0x255204)['then'](function(_0x29d522){return _0x29d522;});}return null;};}function removeEntity(_0x244b67,_0x915692){return function(_0x14864f){if(_0x14864f){return _0x14864f[_0x9b7c('0x23')]()['then'](function(){_0x244b67[_0x9b7c('0x19')](0xcc)[_0x9b7c('0x18')]();});}};}function handleEntityNotFound(_0x28e20b,_0x37a6e6){return function(_0x5dd405){if(!_0x5dd405){_0x28e20b[_0x9b7c('0x24')](0x194);}return _0x5dd405;};}function handleError(_0x5ea7a9,_0x421888){_0x421888=_0x421888||0x1f4;return function(_0x32189a){logger['error'](_0x32189a[_0x9b7c('0x25')]);if(_0x32189a['name']){delete _0x32189a['name'];}_0x5ea7a9['status'](_0x421888)[_0x9b7c('0x26')](_0x32189a);};}exports['index']=function(_0x46c2fe,_0xa8f57c){var _0x423b8a={},_0x18840e={},_0x525dd3={'count':0x0,'rows':[]};var _0x2d88e4=_[_0x9b7c('0x27')](db[_0x9b7c('0x28')][_0x9b7c('0x29')],function(_0x1ab2be){return{'name':_0x1ab2be[_0x9b7c('0x2a')],'type':_0x1ab2be['type'][_0x9b7c('0x2b')]};});_0x18840e['model']=_[_0x9b7c('0x27')](_0x2d88e4,_0x9b7c('0x2c'));_0x18840e[_0x9b7c('0x2d')]=_[_0x9b7c('0x2e')](_0x46c2fe[_0x9b7c('0x2d')]);_0x18840e[_0x9b7c('0x2f')]=_[_0x9b7c('0x30')](_0x18840e[_0x9b7c('0x31')],_0x18840e['query']);_0x423b8a[_0x9b7c('0x32')]=_[_0x9b7c('0x30')](_0x18840e[_0x9b7c('0x31')],qs[_0x9b7c('0x33')](_0x46c2fe[_0x9b7c('0x2d')][_0x9b7c('0x33')]));_0x423b8a[_0x9b7c('0x32')]=_0x423b8a['attributes'][_0x9b7c('0x34')]?_0x423b8a['attributes']:_0x18840e[_0x9b7c('0x31')];if(!_0x46c2fe[_0x9b7c('0x2d')][_0x9b7c('0x35')](_0x9b7c('0x36'))){_0x423b8a['limit']=qs[_0x9b7c('0x1c')](_0x46c2fe[_0x9b7c('0x2d')][_0x9b7c('0x1c')]);_0x423b8a[_0x9b7c('0x1b')]=qs[_0x9b7c('0x1b')](_0x46c2fe['query'][_0x9b7c('0x1b')]);}_0x423b8a[_0x9b7c('0x37')]=qs['sort'](_0x46c2fe[_0x9b7c('0x2d')][_0x9b7c('0x38')]);_0x423b8a[_0x9b7c('0x39')]=qs[_0x9b7c('0x2f')](_[_0x9b7c('0x3a')](_0x46c2fe[_0x9b7c('0x2d')],_0x18840e['filters']),_0x2d88e4);if(_0x46c2fe[_0x9b7c('0x2d')]['filter']){_0x423b8a['where']=_[_0x9b7c('0x3b')](_0x423b8a[_0x9b7c('0x39')],{'$or':_[_0x9b7c('0x27')](_0x2d88e4,function(_0x58aa01){if(_0x58aa01[_0x9b7c('0x3c')]!==_0x9b7c('0x3d')){var _0x1c8da1={};_0x1c8da1[_0x58aa01[_0x9b7c('0x2c')]]={'$like':'%'+_0x46c2fe[_0x9b7c('0x2d')][_0x9b7c('0x3e')]+'%'};return _0x1c8da1;}})});}_0x423b8a=_[_0x9b7c('0x3b')]({},_0x423b8a,_0x46c2fe[_0x9b7c('0x3f')]);var _0x116104={'where':_0x423b8a['where']};return db[_0x9b7c('0x28')][_0x9b7c('0x1d')](_0x116104)[_0x9b7c('0x40')](function(_0xeb3aa1){_0x525dd3[_0x9b7c('0x1d')]=_0xeb3aa1;if(_0x46c2fe[_0x9b7c('0x2d')][_0x9b7c('0x41')]){_0x423b8a[_0x9b7c('0x42')]=[{'all':!![]}];}return db[_0x9b7c('0x28')][_0x9b7c('0x43')](_0x423b8a);})['then'](function(_0x13848e){_0x525dd3[_0x9b7c('0x44')]=_0x13848e;return _0x525dd3;})[_0x9b7c('0x40')](respondWithFilteredResult(_0xa8f57c,_0x423b8a))[_0x9b7c('0x45')](handleError(_0xa8f57c,null));};exports[_0x9b7c('0x46')]=function(_0x506922,_0x242324){var _0x38a3ee={'raw':!![],'where':{'id':_0x506922[_0x9b7c('0x47')]['id']}},_0x33f6f5={};_0x33f6f5[_0x9b7c('0x31')]=_[_0x9b7c('0x2e')](db[_0x9b7c('0x28')][_0x9b7c('0x29')]);_0x33f6f5['query']=_['keys'](_0x506922[_0x9b7c('0x2d')]);_0x33f6f5['filters']=_[_0x9b7c('0x30')](_0x33f6f5[_0x9b7c('0x31')],_0x33f6f5[_0x9b7c('0x2d')]);_0x38a3ee[_0x9b7c('0x32')]=_['intersection'](_0x33f6f5['model'],qs[_0x9b7c('0x33')](_0x506922[_0x9b7c('0x2d')][_0x9b7c('0x33')]));_0x38a3ee['attributes']=_0x38a3ee[_0x9b7c('0x32')][_0x9b7c('0x34')]?_0x38a3ee[_0x9b7c('0x32')]:_0x33f6f5['model'];if(_0x506922[_0x9b7c('0x2d')][_0x9b7c('0x41')]){_0x38a3ee['include']=[{'all':!![]}];}_0x38a3ee=_[_0x9b7c('0x3b')]({},_0x38a3ee,_0x506922[_0x9b7c('0x3f')]);return db[_0x9b7c('0x28')][_0x9b7c('0x48')](_0x38a3ee)['then'](handleEntityNotFound(_0x242324,null))[_0x9b7c('0x40')](respondWithResult(_0x242324,null))[_0x9b7c('0x45')](handleError(_0x242324,null));};exports[_0x9b7c('0x49')]=function(_0x3e63e9,_0x53ef55){return db[_0x9b7c('0x28')][_0x9b7c('0x49')](_0x3e63e9['body'],{})[_0x9b7c('0x40')](respondWithResult(_0x53ef55,0xc9))[_0x9b7c('0x45')](handleError(_0x53ef55,null));};exports['update']=function(_0x3f48a6,_0x4ca0c3){if(_0x3f48a6[_0x9b7c('0x4a')]['id']){delete _0x3f48a6[_0x9b7c('0x4a')]['id'];}return db[_0x9b7c('0x28')]['find']({'where':{'id':_0x3f48a6['params']['id']}})[_0x9b7c('0x40')](handleEntityNotFound(_0x4ca0c3,null))[_0x9b7c('0x40')](saveUpdates(_0x3f48a6[_0x9b7c('0x4a')],null))[_0x9b7c('0x40')](respondWithResult(_0x4ca0c3,null))[_0x9b7c('0x45')](handleError(_0x4ca0c3,null));};exports[_0x9b7c('0x23')]=function(_0x264b86,_0x10fc1d){return db['FaxTransferReport'][_0x9b7c('0x48')]({'where':{'id':_0x264b86[_0x9b7c('0x47')]['id']}})[_0x9b7c('0x40')](handleEntityNotFound(_0x10fc1d,null))['then'](removeEntity(_0x10fc1d,null))['catch'](handleError(_0x10fc1d,null));};exports[_0x9b7c('0x4b')]=function(_0x25f55a,_0x526531){return db['FaxTransferReport'][_0x9b7c('0x4b')]()[_0x9b7c('0x40')](respondWithResult(_0x526531,null))[_0x9b7c('0x45')](handleError(_0x526531,null));}; \ No newline at end of file +var _0x565f=['show','params','rawAttributes','keys','include','find','create','body','describe','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','undefined','limit','count','offset','apply','reject','save','update','then','name','send','index','FaxTransferReport','fieldName','type','key','model','query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','findAll','rows','catch'];(function(_0x4390fa,_0x521500){var _0x55144c=function(_0x153279){while(--_0x153279){_0x4390fa['push'](_0x4390fa['shift']());}};_0x55144c(++_0x521500);}(_0x565f,0xe7));var _0xf565=function(_0xa049d9,_0x54854a){_0xa049d9=_0xa049d9-0x0;var _0xb3c1e4=_0x565f[_0xa049d9];return _0xb3c1e4;};'use strict';var emlformat=require(_0xf565('0x0'));var rimraf=require(_0xf565('0x1'));var zipdir=require(_0xf565('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xf565('0x3'));var moment=require(_0xf565('0x4'));var BPromise=require(_0xf565('0x5'));var Mustache=require(_0xf565('0x6'));var util=require(_0xf565('0x7'));var path=require(_0xf565('0x8'));var sox=require('sox');var csv=require(_0xf565('0x9'));var ejs=require(_0xf565('0xa'));var fs=require('fs');var fs_extra=require(_0xf565('0xb'));var _=require(_0xf565('0xc'));var squel=require('squel');var crypto=require(_0xf565('0xd'));var jsforce=require(_0xf565('0xe'));var deskjs=require(_0xf565('0xf'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xf565('0x10'));var Redis=require('ioredis');var authService=require(_0xf565('0x11'));var qs=require(_0xf565('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0xf565('0x13'))(_0xf565('0x14'));var utils=require(_0xf565('0x15'));var config=require(_0xf565('0x16'));var licenseUtil=require(_0xf565('0x17'));var db=require(_0xf565('0x18'))['db'];function respondWithStatusCode(_0x5cd8f0,_0x3fd9cc){_0x3fd9cc=_0x3fd9cc||0xcc;return function(_0x30248b){if(_0x30248b){return _0x5cd8f0[_0xf565('0x19')](_0x3fd9cc);}return _0x5cd8f0[_0xf565('0x1a')](_0x3fd9cc)[_0xf565('0x1b')]();};}function respondWithResult(_0x25472f,_0x4dcf46){_0x4dcf46=_0x4dcf46||0xc8;return function(_0x3fceb6){if(_0x3fceb6){return _0x25472f[_0xf565('0x1a')](_0x4dcf46)[_0xf565('0x1c')](_0x3fceb6);}};}function respondWithFilteredResult(_0x19cc71,_0x961b25){return function(_0x56085f){if(_0x56085f){var _0x1b477c=typeof _0x961b25['offset']===_0xf565('0x1d')&&typeof _0x961b25[_0xf565('0x1e')]===_0xf565('0x1d');var _0x5b8536=_0x56085f[_0xf565('0x1f')];var _0x5b630e=_0x1b477c?0x0:_0x961b25[_0xf565('0x20')];var _0x50fc8b=_0x1b477c?_0x56085f[_0xf565('0x1f')]:_0x961b25['offset']+_0x961b25[_0xf565('0x1e')];var _0xa793e8;if(_0x50fc8b>=_0x5b8536){_0x50fc8b=_0x5b8536;_0xa793e8=0xc8;}else{_0xa793e8=0xce;}_0x19cc71['status'](_0xa793e8);return _0x19cc71['set']('Content-Range',_0x5b630e+'-'+_0x50fc8b+'/'+_0x5b8536)['json'](_0x56085f);}return null;};}function patchUpdates(_0x230856){return function(_0x4aa203){try{jsonpatch[_0xf565('0x21')](_0x4aa203,_0x230856,!![]);}catch(_0x485f8d){return BPromise[_0xf565('0x22')](_0x485f8d);}return _0x4aa203[_0xf565('0x23')]();};}function saveUpdates(_0xc4a647,_0x1e8a4c){return function(_0xad5ea2){if(_0xad5ea2){return _0xad5ea2[_0xf565('0x24')](_0xc4a647)[_0xf565('0x25')](function(_0x2918e2){return _0x2918e2;});}return null;};}function removeEntity(_0x12aedb,_0x32bd1f){return function(_0x33443b){if(_0x33443b){return _0x33443b['destroy']()[_0xf565('0x25')](function(){_0x12aedb[_0xf565('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x34c2b4,_0x5448fa){return function(_0x438b51){if(!_0x438b51){_0x34c2b4['sendStatus'](0x194);}return _0x438b51;};}function handleError(_0x5701f1,_0x96fecb){_0x96fecb=_0x96fecb||0x1f4;return function(_0x38f4b9){logger['error'](_0x38f4b9['stack']);if(_0x38f4b9[_0xf565('0x26')]){delete _0x38f4b9[_0xf565('0x26')];}_0x5701f1['status'](_0x96fecb)[_0xf565('0x27')](_0x38f4b9);};}exports[_0xf565('0x28')]=function(_0xd198af,_0x516e3e){var _0xd3c7be={},_0x2f3df4={},_0x34714c={'count':0x0,'rows':[]};var _0x38569a=_['map'](db[_0xf565('0x29')]['rawAttributes'],function(_0x134fb8){return{'name':_0x134fb8[_0xf565('0x2a')],'type':_0x134fb8[_0xf565('0x2b')][_0xf565('0x2c')]};});_0x2f3df4[_0xf565('0x2d')]=_['map'](_0x38569a,'name');_0x2f3df4['query']=_['keys'](_0xd198af[_0xf565('0x2e')]);_0x2f3df4[_0xf565('0x2f')]=_[_0xf565('0x30')](_0x2f3df4[_0xf565('0x2d')],_0x2f3df4[_0xf565('0x2e')]);_0xd3c7be[_0xf565('0x31')]=_[_0xf565('0x30')](_0x2f3df4['model'],qs[_0xf565('0x32')](_0xd198af['query'][_0xf565('0x32')]));_0xd3c7be[_0xf565('0x31')]=_0xd3c7be[_0xf565('0x31')]['length']?_0xd3c7be['attributes']:_0x2f3df4[_0xf565('0x2d')];if(!_0xd198af[_0xf565('0x2e')][_0xf565('0x33')](_0xf565('0x34'))){_0xd3c7be[_0xf565('0x1e')]=qs[_0xf565('0x1e')](_0xd198af['query']['limit']);_0xd3c7be['offset']=qs['offset'](_0xd198af[_0xf565('0x2e')][_0xf565('0x20')]);}_0xd3c7be[_0xf565('0x35')]=qs['sort'](_0xd198af[_0xf565('0x2e')][_0xf565('0x36')]);_0xd3c7be[_0xf565('0x37')]=qs[_0xf565('0x2f')](_[_0xf565('0x38')](_0xd198af[_0xf565('0x2e')],_0x2f3df4[_0xf565('0x2f')]),_0x38569a);if(_0xd198af[_0xf565('0x2e')][_0xf565('0x39')]){_0xd3c7be[_0xf565('0x37')]=_[_0xf565('0x3a')](_0xd3c7be[_0xf565('0x37')],{'$or':_['map'](_0x38569a,function(_0x12cc73){if(_0x12cc73[_0xf565('0x2b')]!==_0xf565('0x3b')){var _0x55b19c={};_0x55b19c[_0x12cc73[_0xf565('0x26')]]={'$like':'%'+_0xd198af[_0xf565('0x2e')][_0xf565('0x39')]+'%'};return _0x55b19c;}})});}_0xd3c7be=_[_0xf565('0x3a')]({},_0xd3c7be,_0xd198af[_0xf565('0x3c')]);var _0x3d797f={'where':_0xd3c7be['where']};return db['FaxTransferReport']['count'](_0x3d797f)[_0xf565('0x25')](function(_0x4f88a0){_0x34714c[_0xf565('0x1f')]=_0x4f88a0;if(_0xd198af[_0xf565('0x2e')][_0xf565('0x3d')]){_0xd3c7be['include']=[{'all':!![]}];}return db[_0xf565('0x29')][_0xf565('0x3e')](_0xd3c7be);})[_0xf565('0x25')](function(_0x2cdd8e){_0x34714c[_0xf565('0x3f')]=_0x2cdd8e;return _0x34714c;})[_0xf565('0x25')](respondWithFilteredResult(_0x516e3e,_0xd3c7be))[_0xf565('0x40')](handleError(_0x516e3e,null));};exports[_0xf565('0x41')]=function(_0x4d5259,_0xd2c6df){var _0x2fce51={'raw':!![],'where':{'id':_0x4d5259[_0xf565('0x42')]['id']}},_0x533ae8={};_0x533ae8[_0xf565('0x2d')]=_['keys'](db[_0xf565('0x29')][_0xf565('0x43')]);_0x533ae8[_0xf565('0x2e')]=_[_0xf565('0x44')](_0x4d5259[_0xf565('0x2e')]);_0x533ae8[_0xf565('0x2f')]=_[_0xf565('0x30')](_0x533ae8[_0xf565('0x2d')],_0x533ae8[_0xf565('0x2e')]);_0x2fce51[_0xf565('0x31')]=_[_0xf565('0x30')](_0x533ae8[_0xf565('0x2d')],qs[_0xf565('0x32')](_0x4d5259[_0xf565('0x2e')]['fields']));_0x2fce51[_0xf565('0x31')]=_0x2fce51[_0xf565('0x31')]['length']?_0x2fce51[_0xf565('0x31')]:_0x533ae8[_0xf565('0x2d')];if(_0x4d5259[_0xf565('0x2e')]['includeAll']){_0x2fce51[_0xf565('0x45')]=[{'all':!![]}];}_0x2fce51=_['merge']({},_0x2fce51,_0x4d5259[_0xf565('0x3c')]);return db[_0xf565('0x29')][_0xf565('0x46')](_0x2fce51)[_0xf565('0x25')](handleEntityNotFound(_0xd2c6df,null))[_0xf565('0x25')](respondWithResult(_0xd2c6df,null))['catch'](handleError(_0xd2c6df,null));};exports[_0xf565('0x47')]=function(_0x1bbb17,_0x140522){return db[_0xf565('0x29')]['create'](_0x1bbb17['body'],{})[_0xf565('0x25')](respondWithResult(_0x140522,0xc9))[_0xf565('0x40')](handleError(_0x140522,null));};exports[_0xf565('0x24')]=function(_0x139621,_0x41d41e){if(_0x139621[_0xf565('0x48')]['id']){delete _0x139621[_0xf565('0x48')]['id'];}return db[_0xf565('0x29')]['find']({'where':{'id':_0x139621[_0xf565('0x42')]['id']}})[_0xf565('0x25')](handleEntityNotFound(_0x41d41e,null))[_0xf565('0x25')](saveUpdates(_0x139621[_0xf565('0x48')],null))[_0xf565('0x25')](respondWithResult(_0x41d41e,null))[_0xf565('0x40')](handleError(_0x41d41e,null));};exports['destroy']=function(_0x46d10e,_0x65741d){return db[_0xf565('0x29')][_0xf565('0x46')]({'where':{'id':_0x46d10e[_0xf565('0x42')]['id']}})[_0xf565('0x25')](handleEntityNotFound(_0x65741d,null))[_0xf565('0x25')](removeEntity(_0x65741d,null))[_0xf565('0x40')](handleError(_0x65741d,null));};exports[_0xf565('0x49')]=function(_0x3bfdd7,_0x530270){return db[_0xf565('0x29')][_0xf565('0x49')]()[_0xf565('0x25')](respondWithResult(_0x530270,null))[_0xf565('0x40')](handleError(_0x530270,null));}; \ No newline at end of file diff --git a/server/api/faxTransferReport/faxTransferReport.model.js b/server/api/faxTransferReport/faxTransferReport.model.js index daaed91..ff94f9d 100644 --- a/server/api/faxTransferReport/faxTransferReport.model.js +++ b/server/api/faxTransferReport/faxTransferReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfd14=['path','../../config/environment','define','report_fax_transfer','uniqueid','../../config/logger','api','request-promise'];(function(_0x4191bc,_0x3096c5){var _0x1ffd4e=function(_0x36faed){while(--_0x36faed){_0x4191bc['push'](_0x4191bc['shift']());}};_0x1ffd4e(++_0x3096c5);}(_0xfd14,0x195));var _0x4fd1=function(_0x226ffe,_0x3d0593){_0x226ffe=_0x226ffe-0x0;var _0xad1d05=_0xfd14[_0x226ffe];return _0xad1d05;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x4fd1('0x0'))(_0x4fd1('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x4fd1('0x2'));var fs=require('fs');var path=require(_0x4fd1('0x3'));var rimraf=require('rimraf');var config=require(_0x4fd1('0x4'));var attributes=require('./faxTransferReport.attributes');module['exports']=function(_0x294a09,_0x4ab501){return _0x294a09[_0x4fd1('0x5')]('FaxTransferReport',attributes,{'tableName':_0x4fd1('0x6'),'paranoid':![],'indexes':[{'name':'uniqueid','fields':[_0x4fd1('0x7')]}],'timestamps':!![]});}; \ No newline at end of file +var _0xe5fc=['uniqueid','lodash','../../config/logger','api','moment','rimraf','./faxTransferReport.attributes','exports','define','FaxTransferReport','report_fax_transfer'];(function(_0x49e734,_0xc04f4f){var _0x2a2d42=function(_0x564e55){while(--_0x564e55){_0x49e734['push'](_0x49e734['shift']());}};_0x2a2d42(++_0xc04f4f);}(_0xe5fc,0x109));var _0xce5f=function(_0x1805f9,_0x315bdd){_0x1805f9=_0x1805f9-0x0;var _0x2d3576=_0xe5fc[_0x1805f9];return _0x2d3576;};'use strict';var _=require(_0xce5f('0x0'));var util=require('util');var logger=require(_0xce5f('0x1'))(_0xce5f('0x2'));var moment=require(_0xce5f('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xce5f('0x4'));var config=require('../../config/environment');var attributes=require(_0xce5f('0x5'));module[_0xce5f('0x6')]=function(_0x2c23b0,_0x12d30e){return _0x2c23b0[_0xce5f('0x7')](_0xce5f('0x8'),attributes,{'tableName':_0xce5f('0x9'),'paranoid':![],'indexes':[{'name':_0xce5f('0xa'),'fields':['uniqueid']}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/faxTransferReport/faxTransferReport.rpc.js b/server/api/faxTransferReport/faxTransferReport.rpc.js index f7d2310..eba1d8c 100644 --- a/server/api/faxTransferReport/faxTransferReport.rpc.js +++ b/server/api/faxTransferReport/faxTransferReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc36f=['stringify','error','code','message','catch','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','http','request','FaxTransferReport,\x20%s,\x20%s','request\x20sent','FaxTransferReport,\x20%s,\x20%s,\x20%s'];(function(_0x528e8f,_0x46e66f){var _0x523c78=function(_0xdfac5f){while(--_0xdfac5f){_0x528e8f['push'](_0x528e8f['shift']());}};_0x523c78(++_0x46e66f);}(_0xc36f,0x1a5));var _0xfc36=function(_0x97e4df,_0x2a7d44){_0x97e4df=_0x97e4df-0x0;var _0x55126a=_0xc36f[_0x97e4df];return _0x55126a;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require(_0xfc36('0x0'));var rs=require(_0xfc36('0x1'));var fs=require('fs');var Redis=require(_0xfc36('0x2'));var db=require('../../mysqldb')['db'];var utils=require(_0xfc36('0x3'));var logger=require(_0xfc36('0x4'))(_0xfc36('0x5'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client'][_0xfc36('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x14452a,_0x22be4a,_0x21ba51){return new BPromise(function(_0x18828e,_0x1f6e5f){return client[_0xfc36('0x7')](_0x14452a,_0x21ba51)['then'](function(_0x1dc512){logger['info'](_0xfc36('0x8'),_0x22be4a,_0xfc36('0x9'));logger['debug'](_0xfc36('0xa'),_0x22be4a,_0xfc36('0x9'),JSON[_0xfc36('0xb')](_0x1dc512));if(_0x1dc512['error']){if(_0x1dc512[_0xfc36('0xc')][_0xfc36('0xd')]===0x1f4){logger[_0xfc36('0xc')](_0xfc36('0x8'),_0x22be4a,_0x1dc512['error']['message']);return _0x1f6e5f(_0x1dc512[_0xfc36('0xc')][_0xfc36('0xe')]);}logger[_0xfc36('0xc')](_0xfc36('0x8'),_0x22be4a,_0x1dc512[_0xfc36('0xc')][_0xfc36('0xe')]);return _0x18828e(_0x1dc512['error'][_0xfc36('0xe')]);}else{logger['info'](_0xfc36('0x8'),_0x22be4a,_0xfc36('0x9'));_0x18828e(_0x1dc512['result'][_0xfc36('0xe')]);}})[_0xfc36('0xf')](function(_0x4c4c87){logger[_0xfc36('0xc')](_0xfc36('0x8'),_0x22be4a,_0x4c4c87);_0x1f6e5f(_0x4c4c87);});});} \ No newline at end of file +var _0x965b=['randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','FaxTransferReport,\x20%s,\x20%s','request\x20sent','debug','FaxTransferReport,\x20%s,\x20%s,\x20%s','error','message','info','catch','lodash','util','moment','bluebird'];(function(_0x1d2c4a,_0x54c283){var _0x23e15d=function(_0x2baca1){while(--_0x2baca1){_0x1d2c4a['push'](_0x1d2c4a['shift']());}};_0x23e15d(++_0x54c283);}(_0x965b,0x146));var _0xb965=function(_0x1895dc,_0x127b0a){_0x1895dc=_0x1895dc-0x0;var _0x312b0c=_0x965b[_0x1895dc];return _0x312b0c;};'use strict';var _=require(_0xb965('0x0'));var util=require(_0xb965('0x1'));var moment=require(_0xb965('0x2'));var BPromise=require(_0xb965('0x3'));var rs=require(_0xb965('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xb965('0x5'))['db'];var utils=require(_0xb965('0x6'));var logger=require('../../config/logger')(_0xb965('0x7'));var config=require(_0xb965('0x8'));var jayson=require(_0xb965('0x9'));var client=jayson[_0xb965('0xa')][_0xb965('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x4bc530,_0x3220f6,_0x1d7106){return new BPromise(function(_0x206fd0,_0xde1ebd){return client[_0xb965('0xc')](_0x4bc530,_0x1d7106)[_0xb965('0xd')](function(_0x4555cb){logger['info'](_0xb965('0xe'),_0x3220f6,_0xb965('0xf'));logger[_0xb965('0x10')](_0xb965('0x11'),_0x3220f6,_0xb965('0xf'),JSON['stringify'](_0x4555cb));if(_0x4555cb['error']){if(_0x4555cb[_0xb965('0x12')]['code']===0x1f4){logger['error'](_0xb965('0xe'),_0x3220f6,_0x4555cb[_0xb965('0x12')][_0xb965('0x13')]);return _0xde1ebd(_0x4555cb[_0xb965('0x12')]['message']);}logger[_0xb965('0x12')](_0xb965('0xe'),_0x3220f6,_0x4555cb[_0xb965('0x12')][_0xb965('0x13')]);return _0x206fd0(_0x4555cb['error']['message']);}else{logger[_0xb965('0x14')](_0xb965('0xe'),_0x3220f6,_0xb965('0xf'));_0x206fd0(_0x4555cb['result']['message']);}})[_0xb965('0x15')](function(_0x373ae1){logger[_0xb965('0x12')]('FaxTransferReport,\x20%s,\x20%s',_0x3220f6,_0x373ae1);_0xde1ebd(_0x373ae1);});});} \ No newline at end of file diff --git a/server/api/faxTransferReport/index.js b/server/api/faxTransferReport/index.js index c6981d1..8aade37 100644 --- a/server/api/faxTransferReport/index.js +++ b/server/api/faxTransferReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe61b=['exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','isAuthenticated','index','/describe','describe','get','/:id','show','post','create','update','delete'];(function(_0x496b86,_0x5663cd){var _0x200ea3=function(_0x1f4fa9){while(--_0x1f4fa9){_0x496b86['push'](_0x496b86['shift']());}};_0x200ea3(++_0x5663cd);}(_0xe61b,0x14b));var _0xbe61=function(_0x74892f,_0x1e981b){_0x74892f=_0x74892f-0x0;var _0x10ee61=_0xe61b[_0x74892f];return _0x10ee61;};'use strict';var multer=require(_0xbe61('0x0'));var util=require(_0xbe61('0x1'));var path=require(_0xbe61('0x2'));var timeout=require(_0xbe61('0x3'));var express=require(_0xbe61('0x4'));var router=express[_0xbe61('0x5')]();var fs_extra=require(_0xbe61('0x6'));var auth=require(_0xbe61('0x7'));var interaction=require(_0xbe61('0x8'));var config=require(_0xbe61('0x9'));var controller=require('./faxTransferReport.controller');router['get']('/',auth[_0xbe61('0xa')](),controller[_0xbe61('0xb')]);router['get'](_0xbe61('0xc'),auth['isAuthenticated'](),controller[_0xbe61('0xd')]);router[_0xbe61('0xe')](_0xbe61('0xf'),auth[_0xbe61('0xa')](),controller[_0xbe61('0x10')]);router[_0xbe61('0x11')]('/',auth['isAuthenticated'](),controller[_0xbe61('0x12')]);router['put'](_0xbe61('0xf'),auth[_0xbe61('0xa')](),controller[_0xbe61('0x13')]);router[_0xbe61('0x14')]('/:id',auth[_0xbe61('0xa')](),controller['destroy']);module[_0xbe61('0x15')]=router; \ No newline at end of file +var _0x9b6e=['delete','destroy','exports','multer','util','path','fs-extra','../../config/environment','./faxTransferReport.controller','get','index','/describe','isAuthenticated','describe','/:id','show','post','create','put','update'];(function(_0xe73080,_0x24c56d){var _0x12cbc4=function(_0x1377e2){while(--_0x1377e2){_0xe73080['push'](_0xe73080['shift']());}};_0x12cbc4(++_0x24c56d);}(_0x9b6e,0xa3));var _0xe9b6=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x9b6e[_0x321bb2];return _0x9c12ed;};'use strict';var multer=require(_0xe9b6('0x0'));var util=require(_0xe9b6('0x1'));var path=require(_0xe9b6('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express['Router']();var fs_extra=require(_0xe9b6('0x3'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0xe9b6('0x4'));var controller=require(_0xe9b6('0x5'));router[_0xe9b6('0x6')]('/',auth['isAuthenticated'](),controller[_0xe9b6('0x7')]);router[_0xe9b6('0x6')](_0xe9b6('0x8'),auth[_0xe9b6('0x9')](),controller[_0xe9b6('0xa')]);router[_0xe9b6('0x6')](_0xe9b6('0xb'),auth['isAuthenticated'](),controller[_0xe9b6('0xc')]);router[_0xe9b6('0xd')]('/',auth['isAuthenticated'](),controller[_0xe9b6('0xe')]);router[_0xe9b6('0xf')](_0xe9b6('0xb'),auth[_0xe9b6('0x9')](),controller[_0xe9b6('0x10')]);router[_0xe9b6('0x11')](_0xe9b6('0xb'),auth[_0xe9b6('0x9')](),controller[_0xe9b6('0x12')]);module[_0xe9b6('0x13')]=router; \ No newline at end of file diff --git a/server/api/intDeskAccount/index.js b/server/api/intDeskAccount/index.js index c4b39a5..ec4f895 100644 --- a/server/api/intDeskAccount/index.js +++ b/server/api/intDeskAccount/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd4bf=['../../config/environment','./intDeskAccount.controller','get','isAuthenticated','index','/:id/configurations','getConfigurations','create','post','/:id','update','delete','destroy','exports','multer','util','path','connect-timeout','Router','fs-extra','../../components/interaction/service'];(function(_0x435c89,_0x2b6da8){var _0x183449=function(_0x22369e){while(--_0x22369e){_0x435c89['push'](_0x435c89['shift']());}};_0x183449(++_0x2b6da8);}(_0xd4bf,0x1b2));var _0xfd4b=function(_0x241e40,_0x67a2e2){_0x241e40=_0x241e40-0x0;var _0x37a736=_0xd4bf[_0x241e40];return _0x37a736;};'use strict';var multer=require(_0xfd4b('0x0'));var util=require(_0xfd4b('0x1'));var path=require(_0xfd4b('0x2'));var timeout=require(_0xfd4b('0x3'));var express=require('express');var router=express[_0xfd4b('0x4')]();var fs_extra=require(_0xfd4b('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0xfd4b('0x6'));var config=require(_0xfd4b('0x7'));var controller=require(_0xfd4b('0x8'));router[_0xfd4b('0x9')]('/',auth[_0xfd4b('0xa')](),controller[_0xfd4b('0xb')]);router['get']('/:id',auth['isAuthenticated'](),controller['show']);router[_0xfd4b('0x9')](_0xfd4b('0xc'),auth['isAuthenticated'](),controller[_0xfd4b('0xd')]);router[_0xfd4b('0x9')]('/:id/fields',auth[_0xfd4b('0xa')](),controller['getFields']);router['post']('/',auth['isAuthenticated'](),controller[_0xfd4b('0xe')]);router[_0xfd4b('0xf')](_0xfd4b('0xc'),auth[_0xfd4b('0xa')](),controller['addConfiguration']);router['put'](_0xfd4b('0x10'),auth[_0xfd4b('0xa')](),controller[_0xfd4b('0x11')]);router[_0xfd4b('0x12')](_0xfd4b('0x10'),auth[_0xfd4b('0xa')](),controller[_0xfd4b('0x13')]);module[_0xfd4b('0x14')]=router; \ No newline at end of file +var _0xcd28=['getFields','post','create','addConfiguration','put','update','delete','exports','multer','util','connect-timeout','Router','../../config/environment','./intDeskAccount.controller','isAuthenticated','index','get','/:id','show','/:id/configurations','getConfigurations'];(function(_0x33dc1a,_0x810788){var _0x5b85ee=function(_0x31a465){while(--_0x31a465){_0x33dc1a['push'](_0x33dc1a['shift']());}};_0x5b85ee(++_0x810788);}(_0xcd28,0xc5));var _0x8cd2=function(_0x2b0a1f,_0x53d5d6){_0x2b0a1f=_0x2b0a1f-0x0;var _0xea00a6=_0xcd28[_0x2b0a1f];return _0xea00a6;};'use strict';var multer=require(_0x8cd2('0x0'));var util=require(_0x8cd2('0x1'));var path=require('path');var timeout=require(_0x8cd2('0x2'));var express=require('express');var router=express[_0x8cd2('0x3')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x8cd2('0x4'));var controller=require(_0x8cd2('0x5'));router['get']('/',auth[_0x8cd2('0x6')](),controller[_0x8cd2('0x7')]);router[_0x8cd2('0x8')](_0x8cd2('0x9'),auth[_0x8cd2('0x6')](),controller[_0x8cd2('0xa')]);router['get'](_0x8cd2('0xb'),auth[_0x8cd2('0x6')](),controller[_0x8cd2('0xc')]);router['get']('/:id/fields',auth[_0x8cd2('0x6')](),controller[_0x8cd2('0xd')]);router[_0x8cd2('0xe')]('/',auth[_0x8cd2('0x6')](),controller[_0x8cd2('0xf')]);router[_0x8cd2('0xe')](_0x8cd2('0xb'),auth[_0x8cd2('0x6')](),controller[_0x8cd2('0x10')]);router[_0x8cd2('0x11')](_0x8cd2('0x9'),auth[_0x8cd2('0x6')](),controller[_0x8cd2('0x12')]);router[_0x8cd2('0x13')]('/:id',auth[_0x8cd2('0x6')](),controller['destroy']);module[_0x8cd2('0x14')]=router; \ No newline at end of file diff --git a/server/api/intDeskAccount/intDeskAccount.attributes.js b/server/api/intDeskAccount/intDeskAccount.attributes.js index 8456835..1ab4a99 100644 --- a/server/api/intDeskAccount/intDeskAccount.attributes.js +++ b/server/api/intDeskAccount/intDeskAccount.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5d3e=['basic','newTab','integrationTab','sequelize','STRING'];(function(_0x2b54d6,_0x2fd783){var _0x12474c=function(_0x1530df){while(--_0x1530df){_0x2b54d6['push'](_0x2b54d6['shift']());}};_0x12474c(++_0x2fd783);}(_0x5d3e,0xda));var _0xe5d3=function(_0x4ca0bb,_0x4c43c9){_0x4ca0bb=_0x4ca0bb-0x0;var _0x458944=_0x5d3e[_0x4ca0bb];return _0x458944;};'use strict';var Sequelize=require(_0xe5d3('0x0'));module['exports']={'name':{'type':Sequelize[_0xe5d3('0x1')]},'description':{'type':Sequelize[_0xe5d3('0x1')]},'username':{'type':Sequelize['STRING']},'remoteUri':{'type':Sequelize[_0xe5d3('0x1')]},'authType':{'type':Sequelize['ENUM']('basic'),'defaultValue':_0xe5d3('0x2')},'password':{'type':Sequelize[_0xe5d3('0x1')]},'consumerKey':{'type':Sequelize['STRING']},'consumerSecret':{'type':Sequelize['STRING']},'token':{'type':Sequelize[_0xe5d3('0x1')]},'tokenSecret':{'type':Sequelize[_0xe5d3('0x1')]},'serverUrl':{'type':Sequelize[_0xe5d3('0x1')],'allowNull':![]},'type':{'type':Sequelize['ENUM']('integrationTab',_0xe5d3('0x3')),'defaultValue':_0xe5d3('0x4')}}; \ No newline at end of file +var _0x6f7b=['STRING','basic','ENUM','integrationTab','sequelize','exports'];(function(_0x4f5af0,_0x5af252){var _0x49647a=function(_0x3d9146){while(--_0x3d9146){_0x4f5af0['push'](_0x4f5af0['shift']());}};_0x49647a(++_0x5af252);}(_0x6f7b,0x1de));var _0xb6f7=function(_0x44af10,_0xcb073a){_0x44af10=_0x44af10-0x0;var _0x316932=_0x6f7b[_0x44af10];return _0x316932;};'use strict';var Sequelize=require(_0xb6f7('0x0'));module[_0xb6f7('0x1')]={'name':{'type':Sequelize[_0xb6f7('0x2')]},'description':{'type':Sequelize['STRING']},'username':{'type':Sequelize[_0xb6f7('0x2')]},'remoteUri':{'type':Sequelize[_0xb6f7('0x2')]},'authType':{'type':Sequelize['ENUM']('basic'),'defaultValue':_0xb6f7('0x3')},'password':{'type':Sequelize[_0xb6f7('0x2')]},'consumerKey':{'type':Sequelize[_0xb6f7('0x2')]},'consumerSecret':{'type':Sequelize[_0xb6f7('0x2')]},'token':{'type':Sequelize['STRING']},'tokenSecret':{'type':Sequelize['STRING']},'serverUrl':{'type':Sequelize[_0xb6f7('0x2')],'allowNull':![]},'type':{'type':Sequelize[_0xb6f7('0x4')](_0xb6f7('0x5'),'newTab'),'defaultValue':_0xb6f7('0x5')}}; \ No newline at end of file diff --git a/server/api/intDeskAccount/intDeskAccount.controller.js b/server/api/intDeskAccount/intDeskAccount.controller.js index eee8281..41726d0 100644 --- a/server/api/intDeskAccount/intDeskAccount.controller.js +++ b/server/api/intDeskAccount/intDeskAccount.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7f6f=['label','test','getFields,\x20%s,\x20%s,\x20%s','send','Wrong\x20credentials','statusCode','eml-format','zip-dir','fast-json-patch','moment','bluebird','util','path','ejs','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','jayson/promise','client','http','request','then','info','DeskAccount,\x20%s,\x20%s','request\x20sent','DeskAccount,\x20%s,\x20%s,\x20%s','error','code','message','catch','sendStatus','status','json','offset','undefined','count','apply','reject','update','destroy','end','name','map','DeskAccount','rawAttributes','fieldName','model','keys','filters','intersection','query','attributes','fields','length','hasOwnProperty','nolimit','limit','order','sort','where','pick','filter','merge','options','include','findAll','rows','show','includeAll','create','body','find','params','getConfigurations','findOne','addConfiguration','AccountId','getSubjects','channel','type','Descriptions','getDescriptions','DeskConfiguration','DeskField','Subjects','getFields','priority','remoteUri','username','password','consumerKey','consumerSecret','token','tokenSecret','substring','lastIndexOf','format','application/json','headers','Authorization','Basic\x20%s','%s:%s','base64','concat','_embedded','entries','active'];(function(_0x57b54c,_0x54ce0d){var _0x59cc19=function(_0xa33bc6){while(--_0xa33bc6){_0x57b54c['push'](_0x57b54c['shift']());}};_0x59cc19(++_0x54ce0d);}(_0x7f6f,0x168));var _0xf7f6=function(_0x3a02c6,_0x595ec6){_0x3a02c6=_0x3a02c6-0x0;var _0x3f7ded=_0x7f6f[_0x3a02c6];return _0x3f7ded;};'use strict';var emlformat=require(_0xf7f6('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xf7f6('0x1'));var jsonpatch=require(_0xf7f6('0x2'));var rp=require('request-promise');var moment=require(_0xf7f6('0x3'));var BPromise=require(_0xf7f6('0x4'));var Mustache=require('mustache');var util=require(_0xf7f6('0x5'));var path=require(_0xf7f6('0x6'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0xf7f6('0x7'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xf7f6('0x8'));var squel=require(_0xf7f6('0x9'));var crypto=require(_0xf7f6('0xa'));var jsforce=require(_0xf7f6('0xb'));var deskjs=require(_0xf7f6('0xc'));var toCsv=require(_0xf7f6('0xd'));var querystring=require(_0xf7f6('0xe'));var Papa=require('papaparse');var Redis=require(_0xf7f6('0xf'));var authService=require(_0xf7f6('0x10'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xf7f6('0x11'));var logger=require(_0xf7f6('0x12'))(_0xf7f6('0x13'));var utils=require('../../config/utils');var config=require(_0xf7f6('0x14'));var licenseUtil=require(_0xf7f6('0x15'));var db=require('../../mysqldb')['db'];var integrations=require('../../components/integrations/configuration');var jayson=require(_0xf7f6('0x16'));var client=jayson[_0xf7f6('0x17')][_0xf7f6('0x18')]({'port':0x232a});function respondWithRpcPromise(_0x59fc35,_0x492401,_0x33645f,_0x247a43){return new BPromise(function(_0x329aae,_0x123e9c){var _0xd1eb76=_0x247a43||client;return _0xd1eb76[_0xf7f6('0x19')](_0x59fc35,_0x33645f)[_0xf7f6('0x1a')](function(_0x4ff8d2){logger[_0xf7f6('0x1b')](_0xf7f6('0x1c'),_0x492401,_0xf7f6('0x1d'));logger['debug'](_0xf7f6('0x1e'),_0x492401,_0xf7f6('0x1d'),JSON['stringify'](_0x4ff8d2));if(_0x4ff8d2[_0xf7f6('0x1f')]){if(_0x4ff8d2[_0xf7f6('0x1f')][_0xf7f6('0x20')]===0x1f4){logger[_0xf7f6('0x1f')]('DeskAccount,\x20%s,\x20%s',_0x492401,_0x4ff8d2[_0xf7f6('0x1f')][_0xf7f6('0x21')]);return _0x123e9c(_0x4ff8d2[_0xf7f6('0x1f')]['message']);}logger[_0xf7f6('0x1f')](_0xf7f6('0x1c'),_0x492401,_0x4ff8d2[_0xf7f6('0x1f')][_0xf7f6('0x21')]);return _0x329aae(_0x4ff8d2[_0xf7f6('0x1f')]['message']);}else{logger[_0xf7f6('0x1b')](_0xf7f6('0x1c'),_0x492401,_0xf7f6('0x1d'));_0x329aae(_0x4ff8d2['result'][_0xf7f6('0x21')]);}})[_0xf7f6('0x22')](function(_0x473947){logger['error'](_0xf7f6('0x1c'),_0x492401,_0x473947);_0x123e9c(_0x473947);});});}function respondWithStatusCode(_0x1501e5,_0x42e56f){_0x42e56f=_0x42e56f||0xcc;return function(_0x27c4e5){if(_0x27c4e5){return _0x1501e5[_0xf7f6('0x23')](_0x42e56f);}return _0x1501e5[_0xf7f6('0x24')](_0x42e56f)['end']();};}function respondWithResult(_0x2e9295,_0xe116c1){_0xe116c1=_0xe116c1||0xc8;return function(_0x49bfb5){if(_0x49bfb5){return _0x2e9295[_0xf7f6('0x24')](_0xe116c1)[_0xf7f6('0x25')](_0x49bfb5);}};}function respondWithFilteredResult(_0x8d8927,_0x449d41){return function(_0x1cb220){if(_0x1cb220){var _0x272467=typeof _0x449d41[_0xf7f6('0x26')]===_0xf7f6('0x27')&&typeof _0x449d41['limit']===_0xf7f6('0x27');var _0x57a718=_0x1cb220[_0xf7f6('0x28')];var _0x35d43e=_0x272467?0x0:_0x449d41['offset'];var _0x12892b=_0x272467?_0x1cb220[_0xf7f6('0x28')]:_0x449d41[_0xf7f6('0x26')]+_0x449d41['limit'];var _0x5d78cc;if(_0x12892b>=_0x57a718){_0x12892b=_0x57a718;_0x5d78cc=0xc8;}else{_0x5d78cc=0xce;}_0x8d8927[_0xf7f6('0x24')](_0x5d78cc);return _0x8d8927['set']('Content-Range',_0x35d43e+'-'+_0x12892b+'/'+_0x57a718)[_0xf7f6('0x25')](_0x1cb220);}return null;};}function patchUpdates(_0x4f7c1b){return function(_0x173e98){try{jsonpatch[_0xf7f6('0x29')](_0x173e98,_0x4f7c1b,!![]);}catch(_0x4de749){return BPromise[_0xf7f6('0x2a')](_0x4de749);}return _0x173e98['save']();};}function saveUpdates(_0x58b439,_0x826618){return function(_0x3d9f16){if(_0x3d9f16){return _0x3d9f16[_0xf7f6('0x2b')](_0x58b439)[_0xf7f6('0x1a')](function(_0x5ed2a8){return _0x5ed2a8;});}return null;};}function removeEntity(_0x15e821,_0x2ab7a0){return function(_0x2cf1b7){if(_0x2cf1b7){return _0x2cf1b7[_0xf7f6('0x2c')]()[_0xf7f6('0x1a')](function(){_0x15e821[_0xf7f6('0x24')](0xcc)[_0xf7f6('0x2d')]();});}};}function handleEntityNotFound(_0x4c8931,_0x8dd83a){return function(_0x541dcc){if(!_0x541dcc){_0x4c8931['sendStatus'](0x194);}return _0x541dcc;};}function handleError(_0x39819b,_0x2f3f95){_0x2f3f95=_0x2f3f95||0x1f4;return function(_0x2c87ae){logger[_0xf7f6('0x1f')](_0x2c87ae['stack']);if(_0x2c87ae[_0xf7f6('0x2e')]){delete _0x2c87ae[_0xf7f6('0x2e')];}_0x39819b['status'](_0x2f3f95)['send'](_0x2c87ae);};}exports['index']=function(_0x20d72,_0x3cdbbe){var _0x3618c9={},_0x6a4a45={},_0x547cb2={'count':0x0,'rows':[]};var _0x14e46f=_[_0xf7f6('0x2f')](db[_0xf7f6('0x30')][_0xf7f6('0x31')],function(_0x3c929e){return{'name':_0x3c929e[_0xf7f6('0x32')],'type':_0x3c929e['type']['key']};});_0x6a4a45[_0xf7f6('0x33')]=_[_0xf7f6('0x2f')](_0x14e46f,_0xf7f6('0x2e'));_0x6a4a45['query']=_[_0xf7f6('0x34')](_0x20d72['query']);_0x6a4a45[_0xf7f6('0x35')]=_[_0xf7f6('0x36')](_0x6a4a45['model'],_0x6a4a45[_0xf7f6('0x37')]);_0x3618c9[_0xf7f6('0x38')]=_[_0xf7f6('0x36')](_0x6a4a45[_0xf7f6('0x33')],qs[_0xf7f6('0x39')](_0x20d72[_0xf7f6('0x37')]['fields']));_0x3618c9['attributes']=_0x3618c9['attributes'][_0xf7f6('0x3a')]?_0x3618c9[_0xf7f6('0x38')]:_0x6a4a45[_0xf7f6('0x33')];if(!_0x20d72[_0xf7f6('0x37')][_0xf7f6('0x3b')](_0xf7f6('0x3c'))){_0x3618c9[_0xf7f6('0x3d')]=qs['limit'](_0x20d72[_0xf7f6('0x37')][_0xf7f6('0x3d')]);_0x3618c9['offset']=qs[_0xf7f6('0x26')](_0x20d72[_0xf7f6('0x37')][_0xf7f6('0x26')]);}_0x3618c9[_0xf7f6('0x3e')]=qs[_0xf7f6('0x3f')](_0x20d72[_0xf7f6('0x37')][_0xf7f6('0x3f')]);_0x3618c9[_0xf7f6('0x40')]=qs['filters'](_[_0xf7f6('0x41')](_0x20d72[_0xf7f6('0x37')],_0x6a4a45['filters']),_0x14e46f);if(_0x20d72[_0xf7f6('0x37')][_0xf7f6('0x42')]){_0x3618c9[_0xf7f6('0x40')]=_[_0xf7f6('0x43')](_0x3618c9[_0xf7f6('0x40')],{'$or':_[_0xf7f6('0x2f')](_0x14e46f,function(_0x3ffd82){if(_0x3ffd82['type']!=='VIRTUAL'){var _0x37c14b={};_0x37c14b[_0x3ffd82[_0xf7f6('0x2e')]]={'$like':'%'+_0x20d72[_0xf7f6('0x37')][_0xf7f6('0x42')]+'%'};return _0x37c14b;}})});}_0x3618c9=_[_0xf7f6('0x43')]({},_0x3618c9,_0x20d72[_0xf7f6('0x44')]);var _0x3f8dc6={'where':_0x3618c9[_0xf7f6('0x40')]};return db[_0xf7f6('0x30')]['count'](_0x3f8dc6)[_0xf7f6('0x1a')](function(_0x132bc4){_0x547cb2[_0xf7f6('0x28')]=_0x132bc4;if(_0x20d72[_0xf7f6('0x37')]['includeAll']){_0x3618c9[_0xf7f6('0x45')]=[{'all':!![]}];}return db[_0xf7f6('0x30')][_0xf7f6('0x46')](_0x3618c9);})['then'](function(_0x2c07e9){_0x547cb2[_0xf7f6('0x47')]=_0x2c07e9;return _0x547cb2;})[_0xf7f6('0x1a')](respondWithFilteredResult(_0x3cdbbe,_0x3618c9))[_0xf7f6('0x22')](handleError(_0x3cdbbe,null));};exports[_0xf7f6('0x48')]=function(_0x2c16e8,_0x3584ce){var _0x31c47f={'raw':![],'where':{'id':_0x2c16e8['params']['id']}},_0x224b83={};_0x224b83[_0xf7f6('0x33')]=_['keys'](db[_0xf7f6('0x30')][_0xf7f6('0x31')]);_0x224b83[_0xf7f6('0x37')]=_[_0xf7f6('0x34')](_0x2c16e8[_0xf7f6('0x37')]);_0x224b83[_0xf7f6('0x35')]=_[_0xf7f6('0x36')](_0x224b83[_0xf7f6('0x33')],_0x224b83[_0xf7f6('0x37')]);_0x31c47f[_0xf7f6('0x38')]=_[_0xf7f6('0x36')](_0x224b83[_0xf7f6('0x33')],qs[_0xf7f6('0x39')](_0x2c16e8[_0xf7f6('0x37')][_0xf7f6('0x39')]));_0x31c47f[_0xf7f6('0x38')]=_0x31c47f[_0xf7f6('0x38')][_0xf7f6('0x3a')]?_0x31c47f[_0xf7f6('0x38')]:_0x224b83[_0xf7f6('0x33')];if(_0x2c16e8[_0xf7f6('0x37')][_0xf7f6('0x49')]){_0x31c47f[_0xf7f6('0x45')]=[{'all':!![]}];}_0x31c47f=_['merge']({},_0x31c47f,_0x2c16e8[_0xf7f6('0x44')]);return db[_0xf7f6('0x30')]['find'](_0x31c47f)[_0xf7f6('0x1a')](handleEntityNotFound(_0x3584ce,null))[_0xf7f6('0x1a')](respondWithResult(_0x3584ce,null))['catch'](handleError(_0x3584ce,null));};exports[_0xf7f6('0x4a')]=function(_0x20fc1e,_0x4419a4){return db[_0xf7f6('0x30')][_0xf7f6('0x4a')](_0x20fc1e[_0xf7f6('0x4b')],{})[_0xf7f6('0x1a')](respondWithResult(_0x4419a4,0xc9))[_0xf7f6('0x22')](handleError(_0x4419a4,null));};exports[_0xf7f6('0x2b')]=function(_0x25def9,_0x435eae){if(_0x25def9[_0xf7f6('0x4b')]['id']){delete _0x25def9[_0xf7f6('0x4b')]['id'];}return db[_0xf7f6('0x30')][_0xf7f6('0x4c')]({'where':{'id':_0x25def9['params']['id']}})[_0xf7f6('0x1a')](handleEntityNotFound(_0x435eae,null))[_0xf7f6('0x1a')](saveUpdates(_0x25def9['body'],null))[_0xf7f6('0x1a')](respondWithResult(_0x435eae,null))[_0xf7f6('0x22')](handleError(_0x435eae,null));};exports[_0xf7f6('0x2c')]=function(_0xd517f9,_0x185a8c){return db[_0xf7f6('0x30')][_0xf7f6('0x4c')]({'where':{'id':_0xd517f9[_0xf7f6('0x4d')]['id']}})[_0xf7f6('0x1a')](handleEntityNotFound(_0x185a8c,null))['then'](removeEntity(_0x185a8c,null))[_0xf7f6('0x22')](handleError(_0x185a8c,null));};exports[_0xf7f6('0x4e')]=function(_0x3c8350,_0x47fb01,_0x2549ed){var _0xe36ef={};var _0x33ed1a={};var _0x38f776;var _0x4ab9a5;return db[_0xf7f6('0x30')][_0xf7f6('0x4f')]({'where':{'id':_0x3c8350[_0xf7f6('0x4d')]['id']}})[_0xf7f6('0x1a')](handleEntityNotFound(_0x47fb01,null))[_0xf7f6('0x1a')](function(_0x1de496){if(_0x1de496){_0x38f776=_0x1de496;_0x33ed1a['model']=_[_0xf7f6('0x34')](db['DeskConfiguration'][_0xf7f6('0x31')]);_0x33ed1a[_0xf7f6('0x37')]=_[_0xf7f6('0x34')](_0x3c8350[_0xf7f6('0x37')]);_0x33ed1a[_0xf7f6('0x35')]=_['intersection'](_0x33ed1a[_0xf7f6('0x33')],_0x33ed1a[_0xf7f6('0x37')]);_0xe36ef[_0xf7f6('0x38')]=_['intersection'](_0x33ed1a[_0xf7f6('0x33')],qs[_0xf7f6('0x39')](_0x3c8350['query'][_0xf7f6('0x39')]));_0xe36ef[_0xf7f6('0x38')]=_0xe36ef[_0xf7f6('0x38')][_0xf7f6('0x3a')]?_0xe36ef[_0xf7f6('0x38')]:_0x33ed1a[_0xf7f6('0x33')];_0xe36ef[_0xf7f6('0x3e')]=qs[_0xf7f6('0x3f')](_0x3c8350[_0xf7f6('0x37')][_0xf7f6('0x3f')]);_0xe36ef[_0xf7f6('0x40')]=qs[_0xf7f6('0x35')](_['pick'](_0x3c8350[_0xf7f6('0x37')],_0x33ed1a[_0xf7f6('0x35')]));if(_0x3c8350[_0xf7f6('0x37')][_0xf7f6('0x42')]){_0xe36ef[_0xf7f6('0x40')]=_[_0xf7f6('0x43')](_0xe36ef[_0xf7f6('0x40')],{'$or':_[_0xf7f6('0x2f')](_0xe36ef[_0xf7f6('0x38')],function(_0x4b9c7e){var _0x5f3d17={};_0x5f3d17[_0x4b9c7e]={'$like':'%'+_0x3c8350[_0xf7f6('0x37')][_0xf7f6('0x42')]+'%'};return _0x5f3d17;})});}_0xe36ef=_[_0xf7f6('0x43')]({},_0xe36ef,_0x3c8350[_0xf7f6('0x44')]);return _0x38f776[_0xf7f6('0x4e')](_0xe36ef);}})['then'](function(_0x12df4b){if(_0x12df4b){_0x4ab9a5=_0x12df4b[_0xf7f6('0x3a')];if(!_0x3c8350[_0xf7f6('0x37')][_0xf7f6('0x3b')]('nolimit')){_0xe36ef['limit']=qs[_0xf7f6('0x3d')](_0x3c8350[_0xf7f6('0x37')][_0xf7f6('0x3d')]);_0xe36ef[_0xf7f6('0x26')]=qs[_0xf7f6('0x26')](_0x3c8350[_0xf7f6('0x37')][_0xf7f6('0x26')]);}return _0x38f776[_0xf7f6('0x4e')](_0xe36ef);}})[_0xf7f6('0x1a')](function(_0x5f003e){if(_0x5f003e){return _0x5f003e?{'count':_0x4ab9a5,'rows':_0x5f003e}:null;}})[_0xf7f6('0x1a')](respondWithResult(_0x47fb01,null))['catch'](handleError(_0x47fb01,null));};exports[_0xf7f6('0x50')]=function(_0x31f004,_0x3e3997,_0x105113){if(_0x31f004[_0xf7f6('0x4b')]['id']){delete _0x31f004[_0xf7f6('0x4b')]['id'];}return db[_0xf7f6('0x30')][_0xf7f6('0x4f')]({'where':{'id':_0x31f004[_0xf7f6('0x4d')]['id']}})[_0xf7f6('0x1a')](handleEntityNotFound(_0x3e3997,null))[_0xf7f6('0x1a')](function(_0x4e4708){if(_0x4e4708){_0x31f004['body'][_0xf7f6('0x51')]=_0x4e4708['id'];_0x31f004[_0xf7f6('0x4b')]['Subjects']=integrations[_0xf7f6('0x52')](_0x31f004[_0xf7f6('0x4b')][_0xf7f6('0x53')],_0x31f004['body'][_0xf7f6('0x54')]);_0x31f004[_0xf7f6('0x4b')][_0xf7f6('0x55')]=integrations[_0xf7f6('0x56')](_0x31f004[_0xf7f6('0x4b')]['channel'],_0x31f004[_0xf7f6('0x4b')][_0xf7f6('0x54')]);return db[_0xf7f6('0x57')][_0xf7f6('0x4a')](_0x31f004['body'],{'include':[{'model':db[_0xf7f6('0x58')],'as':_0xf7f6('0x59')},{'model':db[_0xf7f6('0x58')],'as':_0xf7f6('0x55')}]});}return null;})['then'](respondWithResult(_0x3e3997,null))[_0xf7f6('0x22')](handleError(_0x3e3997,null));};exports[_0xf7f6('0x5a')]=function(_0x155a5a,_0x21bc66,_0x20722f){var _0x4ac56f=[{'name':_0xf7f6('0x5b'),'label':_0xf7f6('0x5b'),'custom':![],'options':[{'name':0x1,'value':0x1},{'name':0x2,'value':0x2},{'name':0x3,'value':0x3},{'name':0x4,'value':0x4},{'name':0x5,'value':0x5},{'name':0x6,'value':0x6},{'name':0x7,'value':0x7},{'name':0x8,'value':0x8},{'name':0x9,'value':0x9},{'name':0xa,'value':0xa}]}];var _0xb71a85='';return db['DeskAccount'][_0xf7f6('0x4f')]({'where':{'id':_0x155a5a[_0xf7f6('0x4d')]['id']},'attributes':['id',_0xf7f6('0x5c'),'authType',_0xf7f6('0x5d'),_0xf7f6('0x5e'),_0xf7f6('0x5f'),_0xf7f6('0x60'),_0xf7f6('0x61'),_0xf7f6('0x62')]})[_0xf7f6('0x1a')](handleEntityNotFound(_0x21bc66,null))['then'](function(_0x553e1f){if(_0x553e1f){_0xb71a85=_0x553e1f[_0xf7f6('0x5c')];var _0x426a67=_0xb71a85['slice'](-0x1);if(_0x426a67==='/'){_0xb71a85=_0xb71a85[_0xf7f6('0x63')](0x0,_0xb71a85[_0xf7f6('0x64')](_0x426a67));}var _0x3fb494={'method':'GET','uri':util[_0xf7f6('0x65')]('%s/custom_fields',_0xb71a85),'headers':{'Content-Type':'application/json','Accept':_0xf7f6('0x66')},'json':!![]};if(_0x553e1f['authType']==='basic'){_0x3fb494[_0xf7f6('0x67')][_0xf7f6('0x68')]=util['format'](_0xf7f6('0x69'),new Buffer(util[_0xf7f6('0x65')](_0xf7f6('0x6a'),_0x553e1f[_0xf7f6('0x5d')],_0x553e1f[_0xf7f6('0x5e')]))['toString'](_0xf7f6('0x6b')));}return rp(_0x3fb494)[_0xf7f6('0x1a')](function(_0x1c7dbe){return _0x4ac56f[_0xf7f6('0x6c')](_[_0xf7f6('0x2f')](_0x1c7dbe[_0xf7f6('0x6d')][_0xf7f6('0x6e')],function(_0x486ac7){return{'id':_0x486ac7['name'],'name':_0x486ac7['name'],'type':_0x486ac7[_0xf7f6('0x54')],'active':_0x486ac7[_0xf7f6('0x6f')],'label':_0x486ac7[_0xf7f6('0x70')],'custom':!![]};}));});}})[_0xf7f6('0x1a')](function(_0x140219){return{'count':_0x140219[_0xf7f6('0x3a')],'rows':_0x140219};})[_0xf7f6('0x1a')](respondWithResult(_0x21bc66,null))['catch'](function(_0x2ee34e){var _0x32c67d=_0x155a5a[_0xf7f6('0x37')][_0xf7f6('0x71')]?0x1f4:_0x2ee34e['statusCode']||0x1f4;logger['error'](_0xf7f6('0x72'),_0xf7f6('0x5a'),_0x32c67d,JSON['stringify'](_0x2ee34e));delete _0x2ee34e[_0xf7f6('0x2e')];if(_0x32c67d===0x191){_0x32c67d=0x190;}_0x21bc66[_0xf7f6('0x24')](_0x32c67d)[_0xf7f6('0x73')](_0x155a5a['query'][_0xf7f6('0x71')]?{'message':_0xf7f6('0x74'),'statusCode':_0x2ee34e[_0xf7f6('0x75')]}:_0x2ee34e);});}; \ No newline at end of file +var _0xa5fe=['type','key','model','query','keys','filters','intersection','attributes','fields','length','nolimit','order','sort','where','pick','merge','map','VIRTUAL','includeAll','DeskAccount','findAll','params','include','find','create','body','DeskConfiguration','filter','getConfigurations','addConfiguration','findOne','AccountId','getSubjects','Descriptions','DeskField','Subjects','getFields','priority','remoteUri','username','password','consumerKey','consumerSecret','tokenSecret','slice','substring','lastIndexOf','format','%s/custom_fields','application/json','authType','basic','headers','Authorization','%s:%s','base64','concat','_embedded','entries','label','getFields,\x20%s,\x20%s,\x20%s','test','Wrong\x20credentials','statusCode','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','fs-extra','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../config/license/util','../../mysqldb','../../components/integrations/configuration','jayson/promise','client','http','then','DeskAccount,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','result','catch','sendStatus','end','status','json','offset','undefined','limit','count','apply','save','update','destroy','stack','name','send','index','rawAttributes','fieldName'];(function(_0xbdd3e1,_0x5734d6){var _0x1fb6b5=function(_0x42b854){while(--_0x42b854){_0xbdd3e1['push'](_0xbdd3e1['shift']());}};_0x1fb6b5(++_0x5734d6);}(_0xa5fe,0xb8));var _0xea5f=function(_0x29e35f,_0x4859ef){_0x29e35f=_0x29e35f-0x0;var _0x266b74=_0xa5fe[_0x29e35f];return _0x266b74;};'use strict';var emlformat=require(_0xea5f('0x0'));var rimraf=require(_0xea5f('0x1'));var zipdir=require(_0xea5f('0x2'));var jsonpatch=require(_0xea5f('0x3'));var rp=require(_0xea5f('0x4'));var moment=require(_0xea5f('0x5'));var BPromise=require(_0xea5f('0x6'));var Mustache=require('mustache');var util=require(_0xea5f('0x7'));var path=require(_0xea5f('0x8'));var sox=require(_0xea5f('0x9'));var csv=require(_0xea5f('0xa'));var ejs=require(_0xea5f('0xb'));var fs=require('fs');var fs_extra=require(_0xea5f('0xc'));var _=require('lodash');var squel=require(_0xea5f('0xd'));var crypto=require(_0xea5f('0xe'));var jsforce=require(_0xea5f('0xf'));var deskjs=require('desk.js');var toCsv=require(_0xea5f('0xa'));var querystring=require(_0xea5f('0x10'));var Papa=require(_0xea5f('0x11'));var Redis=require(_0xea5f('0x12'));var authService=require('../../components/auth/service');var qs=require(_0xea5f('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xea5f('0x14'));var logger=require('../../config/logger')(_0xea5f('0x15'));var utils=require(_0xea5f('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0xea5f('0x17'));var db=require(_0xea5f('0x18'))['db'];var integrations=require(_0xea5f('0x19'));var jayson=require(_0xea5f('0x1a'));var client=jayson[_0xea5f('0x1b')][_0xea5f('0x1c')]({'port':0x232a});function respondWithRpcPromise(_0x49105d,_0x305e0b,_0x10c895,_0x1abf90){return new BPromise(function(_0x3f1ef7,_0x196ad9){var _0x2bdb2f=_0x1abf90||client;return _0x2bdb2f['request'](_0x49105d,_0x10c895)[_0xea5f('0x1d')](function(_0x118bc2){logger['info'](_0xea5f('0x1e'),_0x305e0b,_0xea5f('0x1f'));logger[_0xea5f('0x20')]('DeskAccount,\x20%s,\x20%s,\x20%s',_0x305e0b,_0xea5f('0x1f'),JSON[_0xea5f('0x21')](_0x118bc2));if(_0x118bc2['error']){if(_0x118bc2['error']['code']===0x1f4){logger['error'](_0xea5f('0x1e'),_0x305e0b,_0x118bc2['error']['message']);return _0x196ad9(_0x118bc2[_0xea5f('0x22')]['message']);}logger[_0xea5f('0x22')](_0xea5f('0x1e'),_0x305e0b,_0x118bc2[_0xea5f('0x22')]['message']);return _0x3f1ef7(_0x118bc2['error'][_0xea5f('0x23')]);}else{logger['info'](_0xea5f('0x1e'),_0x305e0b,'request\x20sent');_0x3f1ef7(_0x118bc2[_0xea5f('0x24')]['message']);}})[_0xea5f('0x25')](function(_0x5d6ed8){logger['error'](_0xea5f('0x1e'),_0x305e0b,_0x5d6ed8);_0x196ad9(_0x5d6ed8);});});}function respondWithStatusCode(_0x44b4ae,_0x3cc2d6){_0x3cc2d6=_0x3cc2d6||0xcc;return function(_0x10b22f){if(_0x10b22f){return _0x44b4ae[_0xea5f('0x26')](_0x3cc2d6);}return _0x44b4ae['status'](_0x3cc2d6)[_0xea5f('0x27')]();};}function respondWithResult(_0x41a825,_0x2d418c){_0x2d418c=_0x2d418c||0xc8;return function(_0x34b1aa){if(_0x34b1aa){return _0x41a825[_0xea5f('0x28')](_0x2d418c)[_0xea5f('0x29')](_0x34b1aa);}};}function respondWithFilteredResult(_0x436910,_0x62b244){return function(_0xcca164){if(_0xcca164){var _0x58da75=typeof _0x62b244[_0xea5f('0x2a')]===_0xea5f('0x2b')&&typeof _0x62b244[_0xea5f('0x2c')]===_0xea5f('0x2b');var _0x58ca39=_0xcca164[_0xea5f('0x2d')];var _0x46f5c8=_0x58da75?0x0:_0x62b244[_0xea5f('0x2a')];var _0x25eb0d=_0x58da75?_0xcca164['count']:_0x62b244['offset']+_0x62b244['limit'];var _0x4c86fb;if(_0x25eb0d>=_0x58ca39){_0x25eb0d=_0x58ca39;_0x4c86fb=0xc8;}else{_0x4c86fb=0xce;}_0x436910['status'](_0x4c86fb);return _0x436910['set']('Content-Range',_0x46f5c8+'-'+_0x25eb0d+'/'+_0x58ca39)['json'](_0xcca164);}return null;};}function patchUpdates(_0x476736){return function(_0x273d9f){try{jsonpatch[_0xea5f('0x2e')](_0x273d9f,_0x476736,!![]);}catch(_0x936818){return BPromise['reject'](_0x936818);}return _0x273d9f[_0xea5f('0x2f')]();};}function saveUpdates(_0x3a3c74,_0x4572e8){return function(_0x429768){if(_0x429768){return _0x429768[_0xea5f('0x30')](_0x3a3c74)[_0xea5f('0x1d')](function(_0xd147d8){return _0xd147d8;});}return null;};}function removeEntity(_0x4d036e,_0x13dc2f){return function(_0x31e119){if(_0x31e119){return _0x31e119[_0xea5f('0x31')]()['then'](function(){_0x4d036e[_0xea5f('0x28')](0xcc)[_0xea5f('0x27')]();});}};}function handleEntityNotFound(_0x5ab960,_0xcea888){return function(_0x5e175c){if(!_0x5e175c){_0x5ab960[_0xea5f('0x26')](0x194);}return _0x5e175c;};}function handleError(_0x49d28a,_0x1a39d0){_0x1a39d0=_0x1a39d0||0x1f4;return function(_0x52690c){logger[_0xea5f('0x22')](_0x52690c[_0xea5f('0x32')]);if(_0x52690c[_0xea5f('0x33')]){delete _0x52690c['name'];}_0x49d28a[_0xea5f('0x28')](_0x1a39d0)[_0xea5f('0x34')](_0x52690c);};}exports[_0xea5f('0x35')]=function(_0x36c8fa,_0x33fb14){var _0x321198={},_0x4ba2cd={},_0x259349={'count':0x0,'rows':[]};var _0x23a0d8=_['map'](db['DeskAccount'][_0xea5f('0x36')],function(_0x41caca){return{'name':_0x41caca[_0xea5f('0x37')],'type':_0x41caca[_0xea5f('0x38')][_0xea5f('0x39')]};});_0x4ba2cd[_0xea5f('0x3a')]=_['map'](_0x23a0d8,'name');_0x4ba2cd[_0xea5f('0x3b')]=_[_0xea5f('0x3c')](_0x36c8fa['query']);_0x4ba2cd[_0xea5f('0x3d')]=_[_0xea5f('0x3e')](_0x4ba2cd[_0xea5f('0x3a')],_0x4ba2cd[_0xea5f('0x3b')]);_0x321198[_0xea5f('0x3f')]=_['intersection'](_0x4ba2cd[_0xea5f('0x3a')],qs[_0xea5f('0x40')](_0x36c8fa[_0xea5f('0x3b')][_0xea5f('0x40')]));_0x321198[_0xea5f('0x3f')]=_0x321198[_0xea5f('0x3f')][_0xea5f('0x41')]?_0x321198[_0xea5f('0x3f')]:_0x4ba2cd[_0xea5f('0x3a')];if(!_0x36c8fa[_0xea5f('0x3b')]['hasOwnProperty'](_0xea5f('0x42'))){_0x321198['limit']=qs[_0xea5f('0x2c')](_0x36c8fa[_0xea5f('0x3b')][_0xea5f('0x2c')]);_0x321198[_0xea5f('0x2a')]=qs[_0xea5f('0x2a')](_0x36c8fa[_0xea5f('0x3b')][_0xea5f('0x2a')]);}_0x321198[_0xea5f('0x43')]=qs[_0xea5f('0x44')](_0x36c8fa[_0xea5f('0x3b')][_0xea5f('0x44')]);_0x321198[_0xea5f('0x45')]=qs[_0xea5f('0x3d')](_[_0xea5f('0x46')](_0x36c8fa[_0xea5f('0x3b')],_0x4ba2cd[_0xea5f('0x3d')]),_0x23a0d8);if(_0x36c8fa[_0xea5f('0x3b')]['filter']){_0x321198[_0xea5f('0x45')]=_[_0xea5f('0x47')](_0x321198['where'],{'$or':_[_0xea5f('0x48')](_0x23a0d8,function(_0x265d17){if(_0x265d17['type']!==_0xea5f('0x49')){var _0x267794={};_0x267794[_0x265d17[_0xea5f('0x33')]]={'$like':'%'+_0x36c8fa[_0xea5f('0x3b')]['filter']+'%'};return _0x267794;}})});}_0x321198=_[_0xea5f('0x47')]({},_0x321198,_0x36c8fa['options']);var _0x1b0c33={'where':_0x321198[_0xea5f('0x45')]};return db['DeskAccount'][_0xea5f('0x2d')](_0x1b0c33)[_0xea5f('0x1d')](function(_0x575ed4){_0x259349['count']=_0x575ed4;if(_0x36c8fa[_0xea5f('0x3b')][_0xea5f('0x4a')]){_0x321198['include']=[{'all':!![]}];}return db[_0xea5f('0x4b')][_0xea5f('0x4c')](_0x321198);})[_0xea5f('0x1d')](function(_0x372c77){_0x259349['rows']=_0x372c77;return _0x259349;})[_0xea5f('0x1d')](respondWithFilteredResult(_0x33fb14,_0x321198))[_0xea5f('0x25')](handleError(_0x33fb14,null));};exports['show']=function(_0x39b04f,_0x4eb64b){var _0x21e069={'raw':![],'where':{'id':_0x39b04f[_0xea5f('0x4d')]['id']}},_0x5f25b1={};_0x5f25b1[_0xea5f('0x3a')]=_[_0xea5f('0x3c')](db['DeskAccount'][_0xea5f('0x36')]);_0x5f25b1[_0xea5f('0x3b')]=_['keys'](_0x39b04f[_0xea5f('0x3b')]);_0x5f25b1[_0xea5f('0x3d')]=_[_0xea5f('0x3e')](_0x5f25b1[_0xea5f('0x3a')],_0x5f25b1['query']);_0x21e069[_0xea5f('0x3f')]=_[_0xea5f('0x3e')](_0x5f25b1[_0xea5f('0x3a')],qs[_0xea5f('0x40')](_0x39b04f[_0xea5f('0x3b')]['fields']));_0x21e069[_0xea5f('0x3f')]=_0x21e069[_0xea5f('0x3f')][_0xea5f('0x41')]?_0x21e069[_0xea5f('0x3f')]:_0x5f25b1[_0xea5f('0x3a')];if(_0x39b04f[_0xea5f('0x3b')][_0xea5f('0x4a')]){_0x21e069[_0xea5f('0x4e')]=[{'all':!![]}];}_0x21e069=_[_0xea5f('0x47')]({},_0x21e069,_0x39b04f['options']);return db[_0xea5f('0x4b')][_0xea5f('0x4f')](_0x21e069)[_0xea5f('0x1d')](handleEntityNotFound(_0x4eb64b,null))['then'](respondWithResult(_0x4eb64b,null))[_0xea5f('0x25')](handleError(_0x4eb64b,null));};exports['create']=function(_0x4f2f64,_0x34a615){return db[_0xea5f('0x4b')][_0xea5f('0x50')](_0x4f2f64[_0xea5f('0x51')],{})[_0xea5f('0x1d')](respondWithResult(_0x34a615,0xc9))['catch'](handleError(_0x34a615,null));};exports['update']=function(_0x466af0,_0x1b7872){if(_0x466af0['body']['id']){delete _0x466af0[_0xea5f('0x51')]['id'];}return db[_0xea5f('0x4b')]['find']({'where':{'id':_0x466af0['params']['id']}})[_0xea5f('0x1d')](handleEntityNotFound(_0x1b7872,null))[_0xea5f('0x1d')](saveUpdates(_0x466af0[_0xea5f('0x51')],null))[_0xea5f('0x1d')](respondWithResult(_0x1b7872,null))['catch'](handleError(_0x1b7872,null));};exports[_0xea5f('0x31')]=function(_0x56b67e,_0x491204){return db['DeskAccount'][_0xea5f('0x4f')]({'where':{'id':_0x56b67e[_0xea5f('0x4d')]['id']}})['then'](handleEntityNotFound(_0x491204,null))[_0xea5f('0x1d')](removeEntity(_0x491204,null))[_0xea5f('0x25')](handleError(_0x491204,null));};exports['getConfigurations']=function(_0x1e9527,_0x2e03bf,_0xaacbf5){var _0x3a6cce={};var _0x22ed90={};var _0x109378;var _0x1a4988;return db['DeskAccount']['findOne']({'where':{'id':_0x1e9527[_0xea5f('0x4d')]['id']}})[_0xea5f('0x1d')](handleEntityNotFound(_0x2e03bf,null))['then'](function(_0x4f3f25){if(_0x4f3f25){_0x109378=_0x4f3f25;_0x22ed90['model']=_[_0xea5f('0x3c')](db[_0xea5f('0x52')][_0xea5f('0x36')]);_0x22ed90[_0xea5f('0x3b')]=_[_0xea5f('0x3c')](_0x1e9527['query']);_0x22ed90[_0xea5f('0x3d')]=_[_0xea5f('0x3e')](_0x22ed90[_0xea5f('0x3a')],_0x22ed90[_0xea5f('0x3b')]);_0x3a6cce[_0xea5f('0x3f')]=_['intersection'](_0x22ed90['model'],qs['fields'](_0x1e9527[_0xea5f('0x3b')][_0xea5f('0x40')]));_0x3a6cce['attributes']=_0x3a6cce[_0xea5f('0x3f')][_0xea5f('0x41')]?_0x3a6cce[_0xea5f('0x3f')]:_0x22ed90[_0xea5f('0x3a')];_0x3a6cce[_0xea5f('0x43')]=qs[_0xea5f('0x44')](_0x1e9527['query']['sort']);_0x3a6cce['where']=qs[_0xea5f('0x3d')](_[_0xea5f('0x46')](_0x1e9527[_0xea5f('0x3b')],_0x22ed90[_0xea5f('0x3d')]));if(_0x1e9527['query'][_0xea5f('0x53')]){_0x3a6cce['where']=_[_0xea5f('0x47')](_0x3a6cce[_0xea5f('0x45')],{'$or':_[_0xea5f('0x48')](_0x3a6cce[_0xea5f('0x3f')],function(_0x3d0adf){var _0x2aa3f0={};_0x2aa3f0[_0x3d0adf]={'$like':'%'+_0x1e9527[_0xea5f('0x3b')][_0xea5f('0x53')]+'%'};return _0x2aa3f0;})});}_0x3a6cce=_[_0xea5f('0x47')]({},_0x3a6cce,_0x1e9527['options']);return _0x109378[_0xea5f('0x54')](_0x3a6cce);}})['then'](function(_0x30fcf1){if(_0x30fcf1){_0x1a4988=_0x30fcf1['length'];if(!_0x1e9527['query']['hasOwnProperty']('nolimit')){_0x3a6cce[_0xea5f('0x2c')]=qs['limit'](_0x1e9527[_0xea5f('0x3b')]['limit']);_0x3a6cce['offset']=qs[_0xea5f('0x2a')](_0x1e9527['query'][_0xea5f('0x2a')]);}return _0x109378[_0xea5f('0x54')](_0x3a6cce);}})['then'](function(_0x2a6af2){if(_0x2a6af2){return _0x2a6af2?{'count':_0x1a4988,'rows':_0x2a6af2}:null;}})['then'](respondWithResult(_0x2e03bf,null))['catch'](handleError(_0x2e03bf,null));};exports[_0xea5f('0x55')]=function(_0x1dffa1,_0x55194e,_0x47dfad){if(_0x1dffa1[_0xea5f('0x51')]['id']){delete _0x1dffa1[_0xea5f('0x51')]['id'];}return db[_0xea5f('0x4b')][_0xea5f('0x56')]({'where':{'id':_0x1dffa1['params']['id']}})[_0xea5f('0x1d')](handleEntityNotFound(_0x55194e,null))[_0xea5f('0x1d')](function(_0xfa2fa1){if(_0xfa2fa1){_0x1dffa1[_0xea5f('0x51')][_0xea5f('0x57')]=_0xfa2fa1['id'];_0x1dffa1[_0xea5f('0x51')]['Subjects']=integrations[_0xea5f('0x58')](_0x1dffa1['body']['channel'],_0x1dffa1[_0xea5f('0x51')][_0xea5f('0x38')]);_0x1dffa1[_0xea5f('0x51')][_0xea5f('0x59')]=integrations['getDescriptions'](_0x1dffa1[_0xea5f('0x51')]['channel'],_0x1dffa1[_0xea5f('0x51')][_0xea5f('0x38')]);return db[_0xea5f('0x52')][_0xea5f('0x50')](_0x1dffa1[_0xea5f('0x51')],{'include':[{'model':db[_0xea5f('0x5a')],'as':_0xea5f('0x5b')},{'model':db['DeskField'],'as':_0xea5f('0x59')}]});}return null;})[_0xea5f('0x1d')](respondWithResult(_0x55194e,null))[_0xea5f('0x25')](handleError(_0x55194e,null));};exports[_0xea5f('0x5c')]=function(_0x121acb,_0x53e730,_0x1301db){var _0x21e193=[{'name':'priority','label':_0xea5f('0x5d'),'custom':![],'options':[{'name':0x1,'value':0x1},{'name':0x2,'value':0x2},{'name':0x3,'value':0x3},{'name':0x4,'value':0x4},{'name':0x5,'value':0x5},{'name':0x6,'value':0x6},{'name':0x7,'value':0x7},{'name':0x8,'value':0x8},{'name':0x9,'value':0x9},{'name':0xa,'value':0xa}]}];var _0x4212df='';return db[_0xea5f('0x4b')][_0xea5f('0x56')]({'where':{'id':_0x121acb['params']['id']},'attributes':['id',_0xea5f('0x5e'),'authType',_0xea5f('0x5f'),_0xea5f('0x60'),_0xea5f('0x61'),_0xea5f('0x62'),'token',_0xea5f('0x63')]})[_0xea5f('0x1d')](handleEntityNotFound(_0x53e730,null))[_0xea5f('0x1d')](function(_0x3f1a9e){if(_0x3f1a9e){_0x4212df=_0x3f1a9e[_0xea5f('0x5e')];var _0x29f44e=_0x4212df[_0xea5f('0x64')](-0x1);if(_0x29f44e==='/'){_0x4212df=_0x4212df[_0xea5f('0x65')](0x0,_0x4212df[_0xea5f('0x66')](_0x29f44e));}var _0x4227f0={'method':'GET','uri':util[_0xea5f('0x67')](_0xea5f('0x68'),_0x4212df),'headers':{'Content-Type':_0xea5f('0x69'),'Accept':_0xea5f('0x69')},'json':!![]};if(_0x3f1a9e[_0xea5f('0x6a')]===_0xea5f('0x6b')){_0x4227f0[_0xea5f('0x6c')][_0xea5f('0x6d')]=util[_0xea5f('0x67')]('Basic\x20%s',new Buffer(util[_0xea5f('0x67')](_0xea5f('0x6e'),_0x3f1a9e[_0xea5f('0x5f')],_0x3f1a9e[_0xea5f('0x60')]))['toString'](_0xea5f('0x6f')));}return rp(_0x4227f0)[_0xea5f('0x1d')](function(_0x18e41d){return _0x21e193[_0xea5f('0x70')](_[_0xea5f('0x48')](_0x18e41d[_0xea5f('0x71')][_0xea5f('0x72')],function(_0x51bdc2){return{'id':_0x51bdc2[_0xea5f('0x33')],'name':_0x51bdc2['name'],'type':_0x51bdc2[_0xea5f('0x38')],'active':_0x51bdc2['active'],'label':_0x51bdc2[_0xea5f('0x73')],'custom':!![]};}));});}})[_0xea5f('0x1d')](function(_0x15bc8e){return{'count':_0x15bc8e[_0xea5f('0x41')],'rows':_0x15bc8e};})['then'](respondWithResult(_0x53e730,null))[_0xea5f('0x25')](function(_0x4ca4f7){var _0x533836=_0x121acb[_0xea5f('0x3b')]['test']?0x1f4:_0x4ca4f7['statusCode']||0x1f4;logger['error'](_0xea5f('0x74'),_0xea5f('0x5c'),_0x533836,JSON[_0xea5f('0x21')](_0x4ca4f7));delete _0x4ca4f7[_0xea5f('0x33')];if(_0x533836===0x191){_0x533836=0x190;}_0x53e730[_0xea5f('0x28')](_0x533836)[_0xea5f('0x34')](_0x121acb[_0xea5f('0x3b')][_0xea5f('0x75')]?{'message':_0xea5f('0x76'),'statusCode':_0x4ca4f7[_0xea5f('0x77')]}:_0x4ca4f7);});}; \ No newline at end of file diff --git a/server/api/intDeskAccount/intDeskAccount.model.js b/server/api/intDeskAccount/intDeskAccount.model.js index 531a5c9..6476ec2 100644 --- a/server/api/intDeskAccount/intDeskAccount.model.js +++ b/server/api/intDeskAccount/intDeskAccount.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x35aa=['util','api','bluebird','request-promise','path','rimraf','../../config/environment','../../components/integrations/configuration','exports','DeskAccount','int_desk_accounts','lodash'];(function(_0x31215b,_0x2ac7a8){var _0x51033b=function(_0x372021){while(--_0x372021){_0x31215b['push'](_0x31215b['shift']());}};_0x51033b(++_0x2ac7a8);}(_0x35aa,0x1af));var _0xa35a=function(_0x170add,_0x206e45){_0x170add=_0x170add-0x0;var _0x1249f1=_0x35aa[_0x170add];return _0x1249f1;};'use strict';var _=require(_0xa35a('0x0'));var util=require(_0xa35a('0x1'));var logger=require('../../config/logger')(_0xa35a('0x2'));var moment=require('moment');var BPromise=require(_0xa35a('0x3'));var rp=require(_0xa35a('0x4'));var fs=require('fs');var path=require(_0xa35a('0x5'));var rimraf=require(_0xa35a('0x6'));var config=require(_0xa35a('0x7'));var attributes=require('./intDeskAccount.attributes');var integrations=require(_0xa35a('0x8'));module[_0xa35a('0x9')]=function(_0x3e1dcd,_0x29ad38){return _0x3e1dcd['define'](_0xa35a('0xa'),attributes,{'tableName':_0xa35a('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x5e35=['DeskAccount','int_desk_accounts','util','../../config/logger','moment','request-promise','../../config/environment','./intDeskAccount.attributes','../../components/integrations/configuration','exports','define'];(function(_0x2c855e,_0x3148a9){var _0x1a2761=function(_0x1feed9){while(--_0x1feed9){_0x2c855e['push'](_0x2c855e['shift']());}};_0x1a2761(++_0x3148a9);}(_0x5e35,0x120));var _0x55e3=function(_0x3070dc,_0x40cf11){_0x3070dc=_0x3070dc-0x0;var _0x431489=_0x5e35[_0x3070dc];return _0x431489;};'use strict';var _=require('lodash');var util=require(_0x55e3('0x0'));var logger=require(_0x55e3('0x1'))('api');var moment=require(_0x55e3('0x2'));var BPromise=require('bluebird');var rp=require(_0x55e3('0x3'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x55e3('0x4'));var attributes=require(_0x55e3('0x5'));var integrations=require(_0x55e3('0x6'));module[_0x55e3('0x7')]=function(_0x25e7ca,_0x22cbe9){return _0x25e7ca[_0x55e3('0x8')](_0x55e3('0x9'),attributes,{'tableName':_0x55e3('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intDeskAccount/intDeskAccount.rpc.js b/server/api/intDeskAccount/intDeskAccount.rpc.js index b5c9250..7b3ff6c 100644 --- a/server/api/intDeskAccount/intDeskAccount.rpc.js +++ b/server/api/intDeskAccount/intDeskAccount.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6150=['DeskAccount','findAll','options','raw','where','attributes','map','include','model','catch','ShowDeskAccount','find','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','then','info','DeskAccount,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','GetDeskAccount'];(function(_0x119ded,_0x497e72){var _0x22108b=function(_0x3da0cf){while(--_0x3da0cf){_0x119ded['push'](_0x119ded['shift']());}};_0x22108b(++_0x497e72);}(_0x6150,0xf3));var _0x0615=function(_0x46094d,_0x5bf5b9){_0x46094d=_0x46094d-0x0;var _0x54b4f0=_0x6150[_0x46094d];return _0x54b4f0;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x0615('0x0'));var BPromise=require(_0x0615('0x1'));var rs=require(_0x0615('0x2'));var fs=require('fs');var Redis=require(_0x0615('0x3'));var db=require(_0x0615('0x4'))['db'];var utils=require(_0x0615('0x5'));var logger=require(_0x0615('0x6'))(_0x0615('0x7'));var config=require(_0x0615('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x0615('0x9')][_0x0615('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x296dea,_0x5df7b8,_0x5a7453){return new BPromise(function(_0x45399c,_0x11b9d4){return client['request'](_0x296dea,_0x5a7453)[_0x0615('0xb')](function(_0x594a21){logger[_0x0615('0xc')](_0x0615('0xd'),_0x5df7b8,_0x0615('0xe'));logger[_0x0615('0xf')]('DeskAccount,\x20%s,\x20%s,\x20%s',_0x5df7b8,_0x0615('0xe'),JSON[_0x0615('0x10')](_0x594a21));if(_0x594a21['error']){if(_0x594a21[_0x0615('0x11')][_0x0615('0x12')]===0x1f4){logger[_0x0615('0x11')](_0x0615('0xd'),_0x5df7b8,_0x594a21[_0x0615('0x11')][_0x0615('0x13')]);return _0x11b9d4(_0x594a21['error'][_0x0615('0x13')]);}logger[_0x0615('0x11')]('DeskAccount,\x20%s,\x20%s',_0x5df7b8,_0x594a21[_0x0615('0x11')][_0x0615('0x13')]);return _0x45399c(_0x594a21[_0x0615('0x11')][_0x0615('0x13')]);}else{logger['info'](_0x0615('0xd'),_0x5df7b8,_0x0615('0xe'));_0x45399c(_0x594a21['result'][_0x0615('0x13')]);}})['catch'](function(_0x47da75){logger[_0x0615('0x11')]('DeskAccount,\x20%s,\x20%s',_0x5df7b8,_0x47da75);_0x11b9d4(_0x47da75);});});}exports[_0x0615('0x14')]=function(_0x4c1b79){var _0x24e2b5=this;return new Promise(function(_0x3e8195,_0x15804e){return db[_0x0615('0x15')][_0x0615('0x16')]({'raw':_0x4c1b79[_0x0615('0x17')]?_0x4c1b79[_0x0615('0x17')][_0x0615('0x18')]===undefined?!![]:![]:!![],'where':_0x4c1b79[_0x0615('0x17')]?_0x4c1b79[_0x0615('0x17')][_0x0615('0x19')]||null:null,'attributes':_0x4c1b79[_0x0615('0x17')]?_0x4c1b79[_0x0615('0x17')][_0x0615('0x1a')]||null:null,'limit':_0x4c1b79[_0x0615('0x17')]?_0x4c1b79[_0x0615('0x17')]['limit']||null:null,'include':_0x4c1b79[_0x0615('0x17')]?_0x4c1b79[_0x0615('0x17')]['include']?_[_0x0615('0x1b')](_0x4c1b79[_0x0615('0x17')][_0x0615('0x1c')],function(_0x210c00){return{'model':db[_0x210c00[_0x0615('0x1d')]],'as':_0x210c00['as'],'attributes':_0x210c00[_0x0615('0x1a')],'include':_0x210c00[_0x0615('0x1c')]?_[_0x0615('0x1b')](_0x210c00[_0x0615('0x1c')],function(_0x7e60d9){return{'model':db[_0x7e60d9['model']],'as':_0x7e60d9['as'],'attributes':_0x7e60d9[_0x0615('0x1a')],'include':_0x7e60d9[_0x0615('0x1c')]?_[_0x0615('0x1b')](_0x7e60d9['include'],function(_0x4454aa){return{'model':db[_0x4454aa[_0x0615('0x1d')]],'as':_0x4454aa['as'],'attributes':_0x4454aa[_0x0615('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x0615('0xb')](function(_0xfa506e){logger[_0x0615('0xc')](_0x0615('0x14'),_0x4c1b79);logger['debug']('GetDeskAccount',_0x4c1b79,JSON[_0x0615('0x10')](_0xfa506e));_0x3e8195(_0xfa506e);})[_0x0615('0x1e')](function(_0x31790b){logger[_0x0615('0x11')](_0x0615('0x14'),_0x31790b[_0x0615('0x13')],_0x4c1b79);_0x15804e(_0x24e2b5[_0x0615('0x11')](0x1f4,_0x31790b[_0x0615('0x13')]));});});};exports[_0x0615('0x1f')]=function(_0x20cfdc){var _0x3ee27c=this;return new Promise(function(_0x2f15c7,_0x514062){return db[_0x0615('0x15')][_0x0615('0x20')]({'raw':_0x20cfdc[_0x0615('0x17')]?_0x20cfdc[_0x0615('0x17')][_0x0615('0x18')]===undefined?!![]:![]:!![],'where':_0x20cfdc['options']?_0x20cfdc[_0x0615('0x17')][_0x0615('0x19')]||null:null,'attributes':_0x20cfdc[_0x0615('0x17')]?_0x20cfdc[_0x0615('0x17')][_0x0615('0x1a')]||null:null,'include':_0x20cfdc[_0x0615('0x17')]?_0x20cfdc[_0x0615('0x17')][_0x0615('0x1c')]?_['map'](_0x20cfdc[_0x0615('0x17')][_0x0615('0x1c')],function(_0x22f964){return{'model':db[_0x22f964[_0x0615('0x1d')]],'as':_0x22f964['as'],'attributes':_0x22f964['attributes'],'include':_0x22f964[_0x0615('0x1c')]?_[_0x0615('0x1b')](_0x22f964[_0x0615('0x1c')],function(_0x130e71){return{'model':db[_0x130e71[_0x0615('0x1d')]],'as':_0x130e71['as'],'attributes':_0x130e71['attributes'],'include':_0x130e71[_0x0615('0x1c')]?_['map'](_0x130e71[_0x0615('0x1c')],function(_0x411d3d){return{'model':db[_0x411d3d[_0x0615('0x1d')]],'as':_0x411d3d['as'],'attributes':_0x411d3d[_0x0615('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x0615('0xb')](function(_0x44bf14){logger[_0x0615('0xc')](_0x0615('0x1f'),_0x20cfdc);logger['debug'](_0x0615('0x1f'),_0x20cfdc,JSON[_0x0615('0x10')](_0x44bf14));_0x2f15c7(_0x44bf14);})[_0x0615('0x1e')](function(_0x58fe8c){logger[_0x0615('0x11')]('ShowDeskAccount',_0x58fe8c[_0x0615('0x13')],_0x20cfdc);_0x514062(_0x3ee27c[_0x0615('0x11')](0x1f4,_0x58fe8c[_0x0615('0x13')]));});});}; \ No newline at end of file +var _0xb1fb=['DeskAccount,\x20%s,\x20%s','debug','DeskAccount,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','catch','DeskAccount','options','raw','where','attributes','limit','include','map','model','then','GetDeskAccount','ShowDeskAccount','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','info'];(function(_0x4fbf1f,_0x3d2c29){var _0x351472=function(_0x39128a){while(--_0x39128a){_0x4fbf1f['push'](_0x4fbf1f['shift']());}};_0x351472(++_0x3d2c29);}(_0xb1fb,0x1c2));var _0xbb1f=function(_0x483607,_0x2ee031){_0x483607=_0x483607-0x0;var _0x44ad95=_0xb1fb[_0x483607];return _0x44ad95;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xbb1f('0x0'));var BPromise=require(_0xbb1f('0x1'));var rs=require(_0xbb1f('0x2'));var fs=require('fs');var Redis=require(_0xbb1f('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0xbb1f('0x4'));var logger=require(_0xbb1f('0x5'))(_0xbb1f('0x6'));var config=require(_0xbb1f('0x7'));var jayson=require(_0xbb1f('0x8'));var client=jayson[_0xbb1f('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x4bf6ce,_0x5aa908,_0x3ecdd5){return new BPromise(function(_0x51054d,_0x291da9){return client[_0xbb1f('0xa')](_0x4bf6ce,_0x3ecdd5)['then'](function(_0x2f7976){logger[_0xbb1f('0xb')](_0xbb1f('0xc'),_0x5aa908,'request\x20sent');logger[_0xbb1f('0xd')](_0xbb1f('0xe'),_0x5aa908,_0xbb1f('0xf'),JSON[_0xbb1f('0x10')](_0x2f7976));if(_0x2f7976['error']){if(_0x2f7976['error']['code']===0x1f4){logger[_0xbb1f('0x11')]('DeskAccount,\x20%s,\x20%s',_0x5aa908,_0x2f7976[_0xbb1f('0x11')][_0xbb1f('0x12')]);return _0x291da9(_0x2f7976[_0xbb1f('0x11')][_0xbb1f('0x12')]);}logger['error'](_0xbb1f('0xc'),_0x5aa908,_0x2f7976[_0xbb1f('0x11')][_0xbb1f('0x12')]);return _0x51054d(_0x2f7976[_0xbb1f('0x11')][_0xbb1f('0x12')]);}else{logger[_0xbb1f('0xb')]('DeskAccount,\x20%s,\x20%s',_0x5aa908,_0xbb1f('0xf'));_0x51054d(_0x2f7976[_0xbb1f('0x13')]['message']);}})[_0xbb1f('0x14')](function(_0x58451a){logger[_0xbb1f('0x11')](_0xbb1f('0xc'),_0x5aa908,_0x58451a);_0x291da9(_0x58451a);});});}exports['GetDeskAccount']=function(_0xa89936){var _0x2a526c=this;return new Promise(function(_0x5bdcaf,_0x23533b){return db[_0xbb1f('0x15')]['findAll']({'raw':_0xa89936['options']?_0xa89936[_0xbb1f('0x16')][_0xbb1f('0x17')]===undefined?!![]:![]:!![],'where':_0xa89936[_0xbb1f('0x16')]?_0xa89936[_0xbb1f('0x16')][_0xbb1f('0x18')]||null:null,'attributes':_0xa89936['options']?_0xa89936['options'][_0xbb1f('0x19')]||null:null,'limit':_0xa89936[_0xbb1f('0x16')]?_0xa89936[_0xbb1f('0x16')][_0xbb1f('0x1a')]||null:null,'include':_0xa89936['options']?_0xa89936['options'][_0xbb1f('0x1b')]?_[_0xbb1f('0x1c')](_0xa89936[_0xbb1f('0x16')][_0xbb1f('0x1b')],function(_0xfa17b0){return{'model':db[_0xfa17b0['model']],'as':_0xfa17b0['as'],'attributes':_0xfa17b0['attributes'],'include':_0xfa17b0[_0xbb1f('0x1b')]?_[_0xbb1f('0x1c')](_0xfa17b0['include'],function(_0x4b7d73){return{'model':db[_0x4b7d73[_0xbb1f('0x1d')]],'as':_0x4b7d73['as'],'attributes':_0x4b7d73[_0xbb1f('0x19')],'include':_0x4b7d73[_0xbb1f('0x1b')]?_[_0xbb1f('0x1c')](_0x4b7d73[_0xbb1f('0x1b')],function(_0x44188e){return{'model':db[_0x44188e['model']],'as':_0x44188e['as'],'attributes':_0x44188e[_0xbb1f('0x19')]};}):[]};}):[]};}):[]:[]})[_0xbb1f('0x1e')](function(_0x14635e){logger[_0xbb1f('0xb')](_0xbb1f('0x1f'),_0xa89936);logger['debug'](_0xbb1f('0x1f'),_0xa89936,JSON[_0xbb1f('0x10')](_0x14635e));_0x5bdcaf(_0x14635e);})['catch'](function(_0x470b06){logger[_0xbb1f('0x11')](_0xbb1f('0x1f'),_0x470b06[_0xbb1f('0x12')],_0xa89936);_0x23533b(_0x2a526c[_0xbb1f('0x11')](0x1f4,_0x470b06[_0xbb1f('0x12')]));});});};exports[_0xbb1f('0x20')]=function(_0xf90a4e){var _0x56a592=this;return new Promise(function(_0x1cafe3,_0x5cbdb1){return db[_0xbb1f('0x15')]['find']({'raw':_0xf90a4e['options']?_0xf90a4e[_0xbb1f('0x16')][_0xbb1f('0x17')]===undefined?!![]:![]:!![],'where':_0xf90a4e['options']?_0xf90a4e[_0xbb1f('0x16')][_0xbb1f('0x18')]||null:null,'attributes':_0xf90a4e[_0xbb1f('0x16')]?_0xf90a4e[_0xbb1f('0x16')]['attributes']||null:null,'include':_0xf90a4e['options']?_0xf90a4e[_0xbb1f('0x16')][_0xbb1f('0x1b')]?_[_0xbb1f('0x1c')](_0xf90a4e[_0xbb1f('0x16')][_0xbb1f('0x1b')],function(_0x5a0f8e){return{'model':db[_0x5a0f8e['model']],'as':_0x5a0f8e['as'],'attributes':_0x5a0f8e[_0xbb1f('0x19')],'include':_0x5a0f8e[_0xbb1f('0x1b')]?_[_0xbb1f('0x1c')](_0x5a0f8e['include'],function(_0xf8914f){return{'model':db[_0xf8914f[_0xbb1f('0x1d')]],'as':_0xf8914f['as'],'attributes':_0xf8914f[_0xbb1f('0x19')],'include':_0xf8914f[_0xbb1f('0x1b')]?_[_0xbb1f('0x1c')](_0xf8914f[_0xbb1f('0x1b')],function(_0x33e7cb){return{'model':db[_0x33e7cb[_0xbb1f('0x1d')]],'as':_0x33e7cb['as'],'attributes':_0x33e7cb[_0xbb1f('0x19')]};}):[]};}):[]};}):[]:[]})[_0xbb1f('0x1e')](function(_0x5590a0){logger['info']('ShowDeskAccount',_0xf90a4e);logger['debug']('ShowDeskAccount',_0xf90a4e,JSON[_0xbb1f('0x10')](_0x5590a0));_0x1cafe3(_0x5590a0);})[_0xbb1f('0x14')](function(_0x30408b){logger[_0xbb1f('0x11')]('ShowDeskAccount',_0x30408b[_0xbb1f('0x12')],_0xf90a4e);_0x5cbdb1(_0x56a592['error'](0x1f4,_0x30408b['message']));});});}; \ No newline at end of file diff --git a/server/api/intDeskConfiguration/index.js b/server/api/intDeskConfiguration/index.js index 701df69..9cc8f1e 100644 --- a/server/api/intDeskConfiguration/index.js +++ b/server/api/intDeskConfiguration/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7217=['getDescriptions','/:id/tags','post','setTags','destroy','exports','multer','path','connect-timeout','express','Router','fs-extra','../../config/environment','./intDeskConfiguration.controller','get','isAuthenticated','index','/:id','show','/:id/fields','getFields','/:id/subjects','getSubjects','/:id/descriptions'];(function(_0x5c883c,_0x41eafb){var _0x2fa10e=function(_0x3412fd){while(--_0x3412fd){_0x5c883c['push'](_0x5c883c['shift']());}};_0x2fa10e(++_0x41eafb);}(_0x7217,0x19e));var _0x7721=function(_0x28947d,_0x4cc9c6){_0x28947d=_0x28947d-0x0;var _0x12d2ee=_0x7217[_0x28947d];return _0x12d2ee;};'use strict';var multer=require(_0x7721('0x0'));var util=require('util');var path=require(_0x7721('0x1'));var timeout=require(_0x7721('0x2'));var express=require(_0x7721('0x3'));var router=express[_0x7721('0x4')]();var fs_extra=require(_0x7721('0x5'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x7721('0x6'));var controller=require(_0x7721('0x7'));router[_0x7721('0x8')]('/',auth[_0x7721('0x9')](),controller[_0x7721('0xa')]);router[_0x7721('0x8')](_0x7721('0xb'),auth[_0x7721('0x9')](),controller[_0x7721('0xc')]);router[_0x7721('0x8')](_0x7721('0xd'),auth[_0x7721('0x9')](),controller[_0x7721('0xe')]);router[_0x7721('0x8')](_0x7721('0xf'),auth['isAuthenticated'](),controller[_0x7721('0x10')]);router[_0x7721('0x8')](_0x7721('0x11'),auth[_0x7721('0x9')](),controller[_0x7721('0x12')]);router[_0x7721('0x8')](_0x7721('0x13'),auth[_0x7721('0x9')](),controller['getTags']);router[_0x7721('0x14')]('/',auth[_0x7721('0x9')](),controller['create']);router[_0x7721('0x14')](_0x7721('0x13'),auth[_0x7721('0x9')](),controller[_0x7721('0x15')]);router['put'](_0x7721('0xb'),auth[_0x7721('0x9')](),controller['update']);router['delete']('/:id',auth[_0x7721('0x9')](),controller[_0x7721('0x16')]);module[_0x7721('0x17')]=router; \ No newline at end of file +var _0x34e8=['../../config/environment','./intDeskConfiguration.controller','get','index','/:id','isAuthenticated','show','/:id/fields','getFields','/:id/subjects','getSubjects','/:id/descriptions','getDescriptions','/:id/tags','getTags','post','create','put','update','exports','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service'];(function(_0x1f95a7,_0x2cd05f){var _0x398299=function(_0xbb5e4a){while(--_0xbb5e4a){_0x1f95a7['push'](_0x1f95a7['shift']());}};_0x398299(++_0x2cd05f);}(_0x34e8,0x12c));var _0x834e=function(_0x5406a6,_0x271e82){_0x5406a6=_0x5406a6-0x0;var _0xde8616=_0x34e8[_0x5406a6];return _0xde8616;};'use strict';var multer=require(_0x834e('0x0'));var util=require(_0x834e('0x1'));var path=require(_0x834e('0x2'));var timeout=require(_0x834e('0x3'));var express=require('express');var router=express[_0x834e('0x4')]();var fs_extra=require(_0x834e('0x5'));var auth=require(_0x834e('0x6'));var interaction=require(_0x834e('0x7'));var config=require(_0x834e('0x8'));var controller=require(_0x834e('0x9'));router[_0x834e('0xa')]('/',auth['isAuthenticated'](),controller[_0x834e('0xb')]);router['get'](_0x834e('0xc'),auth[_0x834e('0xd')](),controller[_0x834e('0xe')]);router[_0x834e('0xa')](_0x834e('0xf'),auth[_0x834e('0xd')](),controller[_0x834e('0x10')]);router[_0x834e('0xa')](_0x834e('0x11'),auth[_0x834e('0xd')](),controller[_0x834e('0x12')]);router[_0x834e('0xa')](_0x834e('0x13'),auth[_0x834e('0xd')](),controller[_0x834e('0x14')]);router[_0x834e('0xa')](_0x834e('0x15'),auth['isAuthenticated'](),controller[_0x834e('0x16')]);router[_0x834e('0x17')]('/',auth['isAuthenticated'](),controller[_0x834e('0x18')]);router[_0x834e('0x17')](_0x834e('0x15'),auth[_0x834e('0xd')](),controller['setTags']);router[_0x834e('0x19')](_0x834e('0xc'),auth['isAuthenticated'](),controller[_0x834e('0x1a')]);router['delete'](_0x834e('0xc'),auth[_0x834e('0xd')](),controller['destroy']);module[_0x834e('0x1b')]=router; \ No newline at end of file diff --git a/server/api/intDeskConfiguration/intDeskConfiguration.attributes.js b/server/api/intDeskConfiguration/intDeskConfiguration.attributes.js index a274a85..465b9a9 100644 --- a/server/api/intDeskConfiguration/intDeskConfiguration.attributes.js +++ b/server/api/intDeskConfiguration/intDeskConfiguration.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf1ff=['STRING','sequelize'];(function(_0x389da0,_0x136b50){var _0x5e8153=function(_0x207439){while(--_0x207439){_0x389da0['push'](_0x389da0['shift']());}};_0x5e8153(++_0x136b50);}(_0xf1ff,0x10b));var _0xff1f=function(_0x422d6a,_0x20d24f){_0x422d6a=_0x422d6a-0x0;var _0x3bff4b=_0xf1ff[_0x422d6a];return _0x3bff4b;};'use strict';var Sequelize=require(_0xff1f('0x0'));module['exports']={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0xff1f('0x1')]}}; \ No newline at end of file +var _0x2f1f=['STRING','sequelize','exports'];(function(_0x298d8e,_0x2c9cc8){var _0x2a4ad2=function(_0x26cc0e){while(--_0x26cc0e){_0x298d8e['push'](_0x298d8e['shift']());}};_0x2a4ad2(++_0x2c9cc8);}(_0x2f1f,0x124));var _0xf2f1=function(_0x313758,_0x457111){_0x313758=_0x313758-0x0;var _0x2d6488=_0x2f1f[_0x313758];return _0x2d6488;};'use strict';var Sequelize=require(_0xf2f1('0x0'));module[_0xf2f1('0x1')]={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0xf2f1('0x2')]}}; \ No newline at end of file diff --git a/server/api/intDeskConfiguration/intDeskConfiguration.controller.js b/server/api/intDeskConfiguration/intDeskConfiguration.controller.js index 1912ff3..64844c6 100644 --- a/server/api/intDeskConfiguration/intDeskConfiguration.controller.js +++ b/server/api/intDeskConfiguration/intDeskConfiguration.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x55da=['bluebird','mustache','util','path','to-csv','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','jayson/promise','client','http','request','then','info','debug','DeskConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','DeskConfiguration,\x20%s,\x20%s','request\x20sent','result','catch','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','destroy','end','stack','send','index','map','DeskConfiguration','rawAttributes','fieldName','type','key','name','query','keys','filters','intersection','model','fields','attributes','length','order','sort','where','pick','filter','merge','options','includeAll','include','rows','show','params','find','create','body','getFields','findOne','DeskField','hasOwnProperty','getSubjects','nolimit','getDescriptions','getTags','Tag','setTags','eml-format','rimraf','zip-dir','request-promise','moment'];(function(_0xa91f1b,_0x72d44e){var _0x366747=function(_0x19e423){while(--_0x19e423){_0xa91f1b['push'](_0xa91f1b['shift']());}};_0x366747(++_0x72d44e);}(_0x55da,0x1ef));var _0xa55d=function(_0x58ee96,_0x5affd5){_0x58ee96=_0x58ee96-0x0;var _0xb346aa=_0x55da[_0x58ee96];return _0xb346aa;};'use strict';var emlformat=require(_0xa55d('0x0'));var rimraf=require(_0xa55d('0x1'));var zipdir=require(_0xa55d('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xa55d('0x3'));var moment=require(_0xa55d('0x4'));var BPromise=require(_0xa55d('0x5'));var Mustache=require(_0xa55d('0x6'));var util=require(_0xa55d('0x7'));var path=require(_0xa55d('0x8'));var sox=require('sox');var csv=require(_0xa55d('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0xa55d('0xa'));var crypto=require(_0xa55d('0xb'));var jsforce=require(_0xa55d('0xc'));var deskjs=require(_0xa55d('0xd'));var toCsv=require('to-csv');var querystring=require(_0xa55d('0xe'));var Papa=require(_0xa55d('0xf'));var Redis=require(_0xa55d('0x10'));var authService=require(_0xa55d('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0xa55d('0x12'));var hardwareService=require(_0xa55d('0x13'));var logger=require(_0xa55d('0x14'))(_0xa55d('0x15'));var utils=require(_0xa55d('0x16'));var config=require(_0xa55d('0x17'));var licenseUtil=require(_0xa55d('0x18'));var db=require(_0xa55d('0x19'))['db'];var jayson=require(_0xa55d('0x1a'));var client=jayson[_0xa55d('0x1b')][_0xa55d('0x1c')]({'port':0x232a});function respondWithRpcPromise(_0x37639e,_0x41a941,_0x3d95a1,_0x51d75d){return new BPromise(function(_0x547ce4,_0x134f38){var _0x5a2443=_0x51d75d||client;return _0x5a2443[_0xa55d('0x1d')](_0x37639e,_0x3d95a1)[_0xa55d('0x1e')](function(_0x5593fa){logger[_0xa55d('0x1f')]('DeskConfiguration,\x20%s,\x20%s',_0x41a941,'request\x20sent');logger[_0xa55d('0x20')](_0xa55d('0x21'),_0x41a941,'request\x20sent',JSON[_0xa55d('0x22')](_0x5593fa));if(_0x5593fa[_0xa55d('0x23')]){if(_0x5593fa[_0xa55d('0x23')][_0xa55d('0x24')]===0x1f4){logger[_0xa55d('0x23')]('DeskConfiguration,\x20%s,\x20%s',_0x41a941,_0x5593fa[_0xa55d('0x23')][_0xa55d('0x25')]);return _0x134f38(_0x5593fa[_0xa55d('0x23')][_0xa55d('0x25')]);}logger[_0xa55d('0x23')](_0xa55d('0x26'),_0x41a941,_0x5593fa[_0xa55d('0x23')][_0xa55d('0x25')]);return _0x547ce4(_0x5593fa[_0xa55d('0x23')]['message']);}else{logger[_0xa55d('0x1f')]('DeskConfiguration,\x20%s,\x20%s',_0x41a941,_0xa55d('0x27'));_0x547ce4(_0x5593fa[_0xa55d('0x28')][_0xa55d('0x25')]);}})[_0xa55d('0x29')](function(_0xd22f9e){logger[_0xa55d('0x23')](_0xa55d('0x26'),_0x41a941,_0xd22f9e);_0x134f38(_0xd22f9e);});});}function respondWithStatusCode(_0x1f993e,_0x25bd63){_0x25bd63=_0x25bd63||0xcc;return function(_0x1ba29a){if(_0x1ba29a){return _0x1f993e[_0xa55d('0x2a')](_0x25bd63);}return _0x1f993e['status'](_0x25bd63)['end']();};}function respondWithResult(_0x1badf1,_0x5f0c1b){_0x5f0c1b=_0x5f0c1b||0xc8;return function(_0x5d6ea1){if(_0x5d6ea1){return _0x1badf1[_0xa55d('0x2b')](_0x5f0c1b)[_0xa55d('0x2c')](_0x5d6ea1);}};}function respondWithFilteredResult(_0x31ef52,_0x453634){return function(_0xbb89b0){if(_0xbb89b0){var _0x5042dc=typeof _0x453634[_0xa55d('0x2d')]===_0xa55d('0x2e')&&typeof _0x453634[_0xa55d('0x2f')]==='undefined';var _0x1b843c=_0xbb89b0[_0xa55d('0x30')];var _0x59673c=_0x5042dc?0x0:_0x453634[_0xa55d('0x2d')];var _0x1bf70e=_0x5042dc?_0xbb89b0[_0xa55d('0x30')]:_0x453634[_0xa55d('0x2d')]+_0x453634[_0xa55d('0x2f')];var _0x404c53;if(_0x1bf70e>=_0x1b843c){_0x1bf70e=_0x1b843c;_0x404c53=0xc8;}else{_0x404c53=0xce;}_0x31ef52[_0xa55d('0x2b')](_0x404c53);return _0x31ef52[_0xa55d('0x31')](_0xa55d('0x32'),_0x59673c+'-'+_0x1bf70e+'/'+_0x1b843c)['json'](_0xbb89b0);}return null;};}function patchUpdates(_0x50701a){return function(_0x470d39){try{jsonpatch[_0xa55d('0x33')](_0x470d39,_0x50701a,!![]);}catch(_0x4df99f){return BPromise[_0xa55d('0x34')](_0x4df99f);}return _0x470d39[_0xa55d('0x35')]();};}function saveUpdates(_0x7e93d3,_0x5de63b){return function(_0x35ac45){if(_0x35ac45){return _0x35ac45[_0xa55d('0x36')](_0x7e93d3)['then'](function(_0x1cd721){return _0x1cd721;});}return null;};}function removeEntity(_0x2c3461,_0x51f52d){return function(_0xc1d15e){if(_0xc1d15e){return _0xc1d15e[_0xa55d('0x37')]()[_0xa55d('0x1e')](function(){_0x2c3461[_0xa55d('0x2b')](0xcc)[_0xa55d('0x38')]();});}};}function handleEntityNotFound(_0x306854,_0x206160){return function(_0x26aca7){if(!_0x26aca7){_0x306854[_0xa55d('0x2a')](0x194);}return _0x26aca7;};}function handleError(_0x139f03,_0x391ed1){_0x391ed1=_0x391ed1||0x1f4;return function(_0x39d5f0){logger[_0xa55d('0x23')](_0x39d5f0[_0xa55d('0x39')]);if(_0x39d5f0['name']){delete _0x39d5f0['name'];}_0x139f03[_0xa55d('0x2b')](_0x391ed1)[_0xa55d('0x3a')](_0x39d5f0);};}exports[_0xa55d('0x3b')]=function(_0x4543af,_0x36aa5e){var _0x4566d6={},_0x2b277c={},_0x34a710={'count':0x0,'rows':[]};var _0x15033c=_[_0xa55d('0x3c')](db[_0xa55d('0x3d')][_0xa55d('0x3e')],function(_0x3bb3b3){return{'name':_0x3bb3b3[_0xa55d('0x3f')],'type':_0x3bb3b3[_0xa55d('0x40')][_0xa55d('0x41')]};});_0x2b277c['model']=_[_0xa55d('0x3c')](_0x15033c,_0xa55d('0x42'));_0x2b277c[_0xa55d('0x43')]=_[_0xa55d('0x44')](_0x4543af[_0xa55d('0x43')]);_0x2b277c[_0xa55d('0x45')]=_[_0xa55d('0x46')](_0x2b277c[_0xa55d('0x47')],_0x2b277c[_0xa55d('0x43')]);_0x4566d6['attributes']=_['intersection'](_0x2b277c[_0xa55d('0x47')],qs[_0xa55d('0x48')](_0x4543af[_0xa55d('0x43')][_0xa55d('0x48')]));_0x4566d6['attributes']=_0x4566d6[_0xa55d('0x49')][_0xa55d('0x4a')]?_0x4566d6[_0xa55d('0x49')]:_0x2b277c['model'];if(!_0x4543af[_0xa55d('0x43')]['hasOwnProperty']('nolimit')){_0x4566d6[_0xa55d('0x2f')]=qs['limit'](_0x4543af[_0xa55d('0x43')][_0xa55d('0x2f')]);_0x4566d6['offset']=qs[_0xa55d('0x2d')](_0x4543af[_0xa55d('0x43')][_0xa55d('0x2d')]);}_0x4566d6[_0xa55d('0x4b')]=qs['sort'](_0x4543af[_0xa55d('0x43')][_0xa55d('0x4c')]);_0x4566d6[_0xa55d('0x4d')]=qs[_0xa55d('0x45')](_[_0xa55d('0x4e')](_0x4543af[_0xa55d('0x43')],_0x2b277c[_0xa55d('0x45')]),_0x15033c);if(_0x4543af[_0xa55d('0x43')][_0xa55d('0x4f')]){_0x4566d6[_0xa55d('0x4d')]=_['merge'](_0x4566d6[_0xa55d('0x4d')],{'$or':_[_0xa55d('0x3c')](_0x15033c,function(_0x510189){if(_0x510189[_0xa55d('0x40')]!=='VIRTUAL'){var _0x1b8771={};_0x1b8771[_0x510189[_0xa55d('0x42')]]={'$like':'%'+_0x4543af[_0xa55d('0x43')][_0xa55d('0x4f')]+'%'};return _0x1b8771;}})});}_0x4566d6=_[_0xa55d('0x50')]({},_0x4566d6,_0x4543af[_0xa55d('0x51')]);var _0x48aade={'where':_0x4566d6[_0xa55d('0x4d')]};return db[_0xa55d('0x3d')]['count'](_0x48aade)[_0xa55d('0x1e')](function(_0x4b1738){_0x34a710['count']=_0x4b1738;if(_0x4543af[_0xa55d('0x43')][_0xa55d('0x52')]){_0x4566d6[_0xa55d('0x53')]=[{'all':!![]}];}return db[_0xa55d('0x3d')]['findAll'](_0x4566d6);})[_0xa55d('0x1e')](function(_0x453e3a){_0x34a710[_0xa55d('0x54')]=_0x453e3a;return _0x34a710;})['then'](respondWithFilteredResult(_0x36aa5e,_0x4566d6))[_0xa55d('0x29')](handleError(_0x36aa5e,null));};exports[_0xa55d('0x55')]=function(_0x3d3bbb,_0x307cca){var _0x4a9d49={'raw':![],'where':{'id':_0x3d3bbb[_0xa55d('0x56')]['id']}},_0x525266={};_0x525266[_0xa55d('0x47')]=_[_0xa55d('0x44')](db['DeskConfiguration'][_0xa55d('0x3e')]);_0x525266[_0xa55d('0x43')]=_[_0xa55d('0x44')](_0x3d3bbb[_0xa55d('0x43')]);_0x525266[_0xa55d('0x45')]=_['intersection'](_0x525266[_0xa55d('0x47')],_0x525266['query']);_0x4a9d49['attributes']=_[_0xa55d('0x46')](_0x525266[_0xa55d('0x47')],qs[_0xa55d('0x48')](_0x3d3bbb[_0xa55d('0x43')][_0xa55d('0x48')]));_0x4a9d49[_0xa55d('0x49')]=_0x4a9d49[_0xa55d('0x49')][_0xa55d('0x4a')]?_0x4a9d49[_0xa55d('0x49')]:_0x525266[_0xa55d('0x47')];if(_0x3d3bbb[_0xa55d('0x43')]['includeAll']){_0x4a9d49[_0xa55d('0x53')]=[{'all':!![]}];}_0x4a9d49=_['merge']({},_0x4a9d49,_0x3d3bbb[_0xa55d('0x51')]);return db['DeskConfiguration'][_0xa55d('0x57')](_0x4a9d49)[_0xa55d('0x1e')](handleEntityNotFound(_0x307cca,null))['then'](respondWithResult(_0x307cca,null))[_0xa55d('0x29')](handleError(_0x307cca,null));};exports[_0xa55d('0x58')]=function(_0x1ee5cb,_0x6a940f){return db['DeskConfiguration'][_0xa55d('0x58')](_0x1ee5cb[_0xa55d('0x59')],{})[_0xa55d('0x1e')](respondWithResult(_0x6a940f,0xc9))['catch'](handleError(_0x6a940f,null));};exports[_0xa55d('0x36')]=function(_0x224b56,_0x4cd380){if(_0x224b56[_0xa55d('0x59')]['id']){delete _0x224b56['body']['id'];}return db[_0xa55d('0x3d')]['find']({'where':{'id':_0x224b56[_0xa55d('0x56')]['id']}})['then'](handleEntityNotFound(_0x4cd380,null))['then'](saveUpdates(_0x224b56[_0xa55d('0x59')],null))['then'](respondWithResult(_0x4cd380,null))['catch'](handleError(_0x4cd380,null));};exports[_0xa55d('0x37')]=function(_0x3511bd,_0x28f16d){return db['DeskConfiguration']['find']({'where':{'id':_0x3511bd[_0xa55d('0x56')]['id']}})[_0xa55d('0x1e')](handleEntityNotFound(_0x28f16d,null))['then'](removeEntity(_0x28f16d,null))[_0xa55d('0x29')](handleError(_0x28f16d,null));};exports[_0xa55d('0x5a')]=function(_0xeb929b,_0xd36c12,_0x109cea){var _0x57c5e1={};var _0x56bcb3={};var _0x180823;var _0x44dc54;return db[_0xa55d('0x3d')][_0xa55d('0x5b')]({'where':{'id':_0xeb929b[_0xa55d('0x56')]['id']}})[_0xa55d('0x1e')](handleEntityNotFound(_0xd36c12,null))[_0xa55d('0x1e')](function(_0x3a4b59){if(_0x3a4b59){_0x180823=_0x3a4b59;_0x56bcb3[_0xa55d('0x47')]=_[_0xa55d('0x44')](db[_0xa55d('0x5c')][_0xa55d('0x3e')]);_0x56bcb3[_0xa55d('0x43')]=_[_0xa55d('0x44')](_0xeb929b[_0xa55d('0x43')]);_0x56bcb3[_0xa55d('0x45')]=_[_0xa55d('0x46')](_0x56bcb3[_0xa55d('0x47')],_0x56bcb3['query']);_0x57c5e1[_0xa55d('0x49')]=_[_0xa55d('0x46')](_0x56bcb3[_0xa55d('0x47')],qs[_0xa55d('0x48')](_0xeb929b[_0xa55d('0x43')][_0xa55d('0x48')]));_0x57c5e1[_0xa55d('0x49')]=_0x57c5e1[_0xa55d('0x49')][_0xa55d('0x4a')]?_0x57c5e1[_0xa55d('0x49')]:_0x56bcb3[_0xa55d('0x47')];_0x57c5e1['order']=qs[_0xa55d('0x4c')](_0xeb929b['query'][_0xa55d('0x4c')]);_0x57c5e1['where']=qs[_0xa55d('0x45')](_[_0xa55d('0x4e')](_0xeb929b['query'],_0x56bcb3[_0xa55d('0x45')]));if(_0xeb929b[_0xa55d('0x43')][_0xa55d('0x4f')]){_0x57c5e1[_0xa55d('0x4d')]=_['merge'](_0x57c5e1['where'],{'$or':_[_0xa55d('0x3c')](_0x57c5e1[_0xa55d('0x49')],function(_0x10c3b3){var _0x2f1965={};_0x2f1965[_0x10c3b3]={'$like':'%'+_0xeb929b[_0xa55d('0x43')]['filter']+'%'};return _0x2f1965;})});}_0x57c5e1=_[_0xa55d('0x50')]({},_0x57c5e1,_0xeb929b[_0xa55d('0x51')]);return _0x180823[_0xa55d('0x5a')](_0x57c5e1);}})[_0xa55d('0x1e')](function(_0x44d5f3){if(_0x44d5f3){_0x44dc54=_0x44d5f3[_0xa55d('0x4a')];if(!_0xeb929b[_0xa55d('0x43')][_0xa55d('0x5d')]('nolimit')){_0x57c5e1[_0xa55d('0x2f')]=qs[_0xa55d('0x2f')](_0xeb929b['query'][_0xa55d('0x2f')]);_0x57c5e1[_0xa55d('0x2d')]=qs[_0xa55d('0x2d')](_0xeb929b[_0xa55d('0x43')][_0xa55d('0x2d')]);}return _0x180823[_0xa55d('0x5a')](_0x57c5e1);}})['then'](function(_0x51a64d){if(_0x51a64d){return _0x51a64d?{'count':_0x44dc54,'rows':_0x51a64d}:null;}})[_0xa55d('0x1e')](respondWithResult(_0xd36c12,null))[_0xa55d('0x29')](handleError(_0xd36c12,null));};exports[_0xa55d('0x5e')]=function(_0x288b2f,_0x4f643b,_0x4256c8){var _0x5cc6e9={};var _0x4fa471={};var _0x50ee26;var _0x439c2d;return db[_0xa55d('0x3d')]['findOne']({'where':{'id':_0x288b2f[_0xa55d('0x56')]['id']}})[_0xa55d('0x1e')](handleEntityNotFound(_0x4f643b,null))[_0xa55d('0x1e')](function(_0x2b503d){if(_0x2b503d){_0x50ee26=_0x2b503d;_0x4fa471[_0xa55d('0x47')]=_['keys'](db[_0xa55d('0x5c')]['rawAttributes']);_0x4fa471[_0xa55d('0x43')]=_[_0xa55d('0x44')](_0x288b2f[_0xa55d('0x43')]);_0x4fa471['filters']=_[_0xa55d('0x46')](_0x4fa471['model'],_0x4fa471['query']);_0x5cc6e9[_0xa55d('0x49')]=_[_0xa55d('0x46')](_0x4fa471['model'],qs['fields'](_0x288b2f['query'][_0xa55d('0x48')]));_0x5cc6e9[_0xa55d('0x49')]=_0x5cc6e9['attributes'][_0xa55d('0x4a')]?_0x5cc6e9['attributes']:_0x4fa471[_0xa55d('0x47')];_0x5cc6e9[_0xa55d('0x4b')]=qs[_0xa55d('0x4c')](_0x288b2f[_0xa55d('0x43')][_0xa55d('0x4c')]);_0x5cc6e9[_0xa55d('0x4d')]=qs[_0xa55d('0x45')](_[_0xa55d('0x4e')](_0x288b2f[_0xa55d('0x43')],_0x4fa471[_0xa55d('0x45')]));if(_0x288b2f[_0xa55d('0x43')][_0xa55d('0x4f')]){_0x5cc6e9[_0xa55d('0x4d')]=_[_0xa55d('0x50')](_0x5cc6e9[_0xa55d('0x4d')],{'$or':_['map'](_0x5cc6e9[_0xa55d('0x49')],function(_0x9a700){var _0x43fc14={};_0x43fc14[_0x9a700]={'$like':'%'+_0x288b2f['query'][_0xa55d('0x4f')]+'%'};return _0x43fc14;})});}_0x5cc6e9=_[_0xa55d('0x50')]({},_0x5cc6e9,_0x288b2f[_0xa55d('0x51')]);return _0x50ee26[_0xa55d('0x5e')](_0x5cc6e9);}})[_0xa55d('0x1e')](function(_0x2c2643){if(_0x2c2643){_0x439c2d=_0x2c2643['length'];if(!_0x288b2f[_0xa55d('0x43')][_0xa55d('0x5d')](_0xa55d('0x5f'))){_0x5cc6e9[_0xa55d('0x2f')]=qs['limit'](_0x288b2f[_0xa55d('0x43')]['limit']);_0x5cc6e9[_0xa55d('0x2d')]=qs[_0xa55d('0x2d')](_0x288b2f[_0xa55d('0x43')][_0xa55d('0x2d')]);}return _0x50ee26['getSubjects'](_0x5cc6e9);}})[_0xa55d('0x1e')](function(_0x17ee75){if(_0x17ee75){return _0x17ee75?{'count':_0x439c2d,'rows':_0x17ee75}:null;}})[_0xa55d('0x1e')](respondWithResult(_0x4f643b,null))[_0xa55d('0x29')](handleError(_0x4f643b,null));};exports[_0xa55d('0x60')]=function(_0xdb0d70,_0x27cdc9,_0x55b292){var _0x53acb8={};var _0x1d3608={};var _0x2a7c96;var _0x4cd15b;return db[_0xa55d('0x3d')][_0xa55d('0x5b')]({'where':{'id':_0xdb0d70[_0xa55d('0x56')]['id']}})[_0xa55d('0x1e')](handleEntityNotFound(_0x27cdc9,null))[_0xa55d('0x1e')](function(_0x20386a){if(_0x20386a){_0x2a7c96=_0x20386a;_0x1d3608[_0xa55d('0x47')]=_[_0xa55d('0x44')](db[_0xa55d('0x5c')][_0xa55d('0x3e')]);_0x1d3608[_0xa55d('0x43')]=_['keys'](_0xdb0d70[_0xa55d('0x43')]);_0x1d3608[_0xa55d('0x45')]=_[_0xa55d('0x46')](_0x1d3608['model'],_0x1d3608[_0xa55d('0x43')]);_0x53acb8[_0xa55d('0x49')]=_[_0xa55d('0x46')](_0x1d3608['model'],qs['fields'](_0xdb0d70[_0xa55d('0x43')]['fields']));_0x53acb8['attributes']=_0x53acb8[_0xa55d('0x49')][_0xa55d('0x4a')]?_0x53acb8['attributes']:_0x1d3608[_0xa55d('0x47')];_0x53acb8['order']=qs[_0xa55d('0x4c')](_0xdb0d70[_0xa55d('0x43')][_0xa55d('0x4c')]);_0x53acb8['where']=qs[_0xa55d('0x45')](_[_0xa55d('0x4e')](_0xdb0d70[_0xa55d('0x43')],_0x1d3608['filters']));if(_0xdb0d70[_0xa55d('0x43')]['filter']){_0x53acb8[_0xa55d('0x4d')]=_['merge'](_0x53acb8[_0xa55d('0x4d')],{'$or':_[_0xa55d('0x3c')](_0x53acb8['attributes'],function(_0x86c25d){var _0x55ff7f={};_0x55ff7f[_0x86c25d]={'$like':'%'+_0xdb0d70[_0xa55d('0x43')]['filter']+'%'};return _0x55ff7f;})});}_0x53acb8=_[_0xa55d('0x50')]({},_0x53acb8,_0xdb0d70[_0xa55d('0x51')]);return _0x2a7c96[_0xa55d('0x60')](_0x53acb8);}})['then'](function(_0x58ab8d){if(_0x58ab8d){_0x4cd15b=_0x58ab8d[_0xa55d('0x4a')];if(!_0xdb0d70[_0xa55d('0x43')][_0xa55d('0x5d')](_0xa55d('0x5f'))){_0x53acb8[_0xa55d('0x2f')]=qs[_0xa55d('0x2f')](_0xdb0d70[_0xa55d('0x43')][_0xa55d('0x2f')]);_0x53acb8[_0xa55d('0x2d')]=qs[_0xa55d('0x2d')](_0xdb0d70[_0xa55d('0x43')][_0xa55d('0x2d')]);}return _0x2a7c96[_0xa55d('0x60')](_0x53acb8);}})[_0xa55d('0x1e')](function(_0x197d64){if(_0x197d64){return _0x197d64?{'count':_0x4cd15b,'rows':_0x197d64}:null;}})[_0xa55d('0x1e')](respondWithResult(_0x27cdc9,null))[_0xa55d('0x29')](handleError(_0x27cdc9,null));};exports[_0xa55d('0x61')]=function(_0x42a2e0,_0x5d8233,_0x3fd55f){var _0x32ce11={};var _0x2f62dc={};var _0xdab4eb;var _0x599493;return db[_0xa55d('0x3d')][_0xa55d('0x5b')]({'where':{'id':_0x42a2e0['params']['id']}})['then'](handleEntityNotFound(_0x5d8233,null))[_0xa55d('0x1e')](function(_0x401ce9){if(_0x401ce9){_0xdab4eb=_0x401ce9;_0x2f62dc[_0xa55d('0x47')]=_['keys'](db[_0xa55d('0x62')]['rawAttributes']);_0x2f62dc[_0xa55d('0x43')]=_[_0xa55d('0x44')](_0x42a2e0[_0xa55d('0x43')]);_0x2f62dc[_0xa55d('0x45')]=_[_0xa55d('0x46')](_0x2f62dc[_0xa55d('0x47')],_0x2f62dc[_0xa55d('0x43')]);_0x32ce11[_0xa55d('0x49')]=_[_0xa55d('0x46')](_0x2f62dc[_0xa55d('0x47')],qs[_0xa55d('0x48')](_0x42a2e0['query'][_0xa55d('0x48')]));_0x32ce11[_0xa55d('0x49')]=_0x32ce11[_0xa55d('0x49')][_0xa55d('0x4a')]?_0x32ce11[_0xa55d('0x49')]:_0x2f62dc[_0xa55d('0x47')];_0x32ce11['order']=qs[_0xa55d('0x4c')](_0x42a2e0[_0xa55d('0x43')][_0xa55d('0x4c')]);_0x32ce11['where']=qs[_0xa55d('0x45')](_['pick'](_0x42a2e0['query'],_0x2f62dc[_0xa55d('0x45')]));if(_0x42a2e0[_0xa55d('0x43')][_0xa55d('0x4f')]){_0x32ce11[_0xa55d('0x4d')]=_[_0xa55d('0x50')](_0x32ce11[_0xa55d('0x4d')],{'$or':_[_0xa55d('0x3c')](_0x32ce11['attributes'],function(_0x841885){var _0xcda9ba={};_0xcda9ba[_0x841885]={'$like':'%'+_0x42a2e0[_0xa55d('0x43')]['filter']+'%'};return _0xcda9ba;})});}_0x32ce11=_[_0xa55d('0x50')]({},_0x32ce11,_0x42a2e0[_0xa55d('0x51')]);return _0xdab4eb[_0xa55d('0x61')](_0x32ce11);}})[_0xa55d('0x1e')](function(_0x12e0a0){if(_0x12e0a0){_0x599493=_0x12e0a0[_0xa55d('0x4a')];if(!_0x42a2e0[_0xa55d('0x43')][_0xa55d('0x5d')](_0xa55d('0x5f'))){_0x32ce11[_0xa55d('0x2f')]=qs[_0xa55d('0x2f')](_0x42a2e0['query']['limit']);_0x32ce11[_0xa55d('0x2d')]=qs[_0xa55d('0x2d')](_0x42a2e0[_0xa55d('0x43')]['offset']);}return _0xdab4eb['getTags'](_0x32ce11);}})[_0xa55d('0x1e')](function(_0x452aee){if(_0x452aee){return _0x452aee?{'count':_0x599493,'rows':_0x452aee}:null;}})[_0xa55d('0x1e')](respondWithResult(_0x5d8233,null))[_0xa55d('0x29')](handleError(_0x5d8233,null));};exports[_0xa55d('0x63')]=function(_0x34c242,_0x24bb8a,_0x3eb18c){if(_0x34c242['body']['id']){delete _0x34c242[_0xa55d('0x59')]['id'];}return db[_0xa55d('0x3d')][_0xa55d('0x5b')]({'where':{'id':_0x34c242['params']['id']}})[_0xa55d('0x1e')](handleEntityNotFound(_0x24bb8a,null))[_0xa55d('0x1e')](function(_0x4ef249){if(_0x4ef249){return _0x4ef249[_0xa55d('0x63')](_0x34c242[_0xa55d('0x59')]['ids']||[]);}return null;})['then'](respondWithResult(_0x24bb8a,null))['catch'](handleError(_0x24bb8a,null));}; \ No newline at end of file +var _0x2d5f=['Content-Range','apply','save','update','destroy','name','index','rawAttributes','fieldName','type','key','map','query','keys','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','merge','VIRTUAL','options','DeskConfiguration','include','findAll','rows','show','params','includeAll','find','create','body','getFields','findOne','pick','filter','getSubjects','DeskField','getDescriptions','getTags','Tag','setTags','ids','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','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','../../mysqldb','jayson/promise','request','then','info','DeskConfiguration,\x20%s,\x20%s','debug','DeskConfiguration,\x20%s,\x20%s,\x20%s','error','message','request\x20sent','catch','sendStatus','status','end','json','offset','undefined','limit','count','set'];(function(_0x30f64d,_0x40f95e){var _0x191c46=function(_0x1091d5){while(--_0x1091d5){_0x30f64d['push'](_0x30f64d['shift']());}};_0x191c46(++_0x40f95e);}(_0x2d5f,0x90));var _0xf2d5=function(_0x547587,_0x48cbd9){_0x547587=_0x547587-0x0;var _0x3d7777=_0x2d5f[_0x547587];return _0x3d7777;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xf2d5('0x0'));var zipdir=require(_0xf2d5('0x1'));var jsonpatch=require(_0xf2d5('0x2'));var rp=require(_0xf2d5('0x3'));var moment=require(_0xf2d5('0x4'));var BPromise=require(_0xf2d5('0x5'));var Mustache=require(_0xf2d5('0x6'));var util=require(_0xf2d5('0x7'));var path=require(_0xf2d5('0x8'));var sox=require(_0xf2d5('0x9'));var csv=require(_0xf2d5('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xf2d5('0xb'));var _=require(_0xf2d5('0xc'));var squel=require(_0xf2d5('0xd'));var crypto=require('crypto');var jsforce=require(_0xf2d5('0xe'));var deskjs=require(_0xf2d5('0xf'));var toCsv=require('to-csv');var querystring=require(_0xf2d5('0x10'));var Papa=require(_0xf2d5('0x11'));var Redis=require(_0xf2d5('0x12'));var authService=require(_0xf2d5('0x13'));var qs=require(_0xf2d5('0x14'));var as=require(_0xf2d5('0x15'));var hardwareService=require(_0xf2d5('0x16'));var logger=require(_0xf2d5('0x17'))(_0xf2d5('0x18'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0xf2d5('0x19'))['db'];var jayson=require(_0xf2d5('0x1a'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0xc3db91,_0x4f4229,_0x2f35e1,_0x5e1083){return new BPromise(function(_0x5c41e4,_0x1bceee){var _0x4704e2=_0x5e1083||client;return _0x4704e2[_0xf2d5('0x1b')](_0xc3db91,_0x2f35e1)[_0xf2d5('0x1c')](function(_0x30e162){logger[_0xf2d5('0x1d')](_0xf2d5('0x1e'),_0x4f4229,'request\x20sent');logger[_0xf2d5('0x1f')](_0xf2d5('0x20'),_0x4f4229,'request\x20sent',JSON['stringify'](_0x30e162));if(_0x30e162[_0xf2d5('0x21')]){if(_0x30e162['error']['code']===0x1f4){logger[_0xf2d5('0x21')](_0xf2d5('0x1e'),_0x4f4229,_0x30e162['error'][_0xf2d5('0x22')]);return _0x1bceee(_0x30e162['error'][_0xf2d5('0x22')]);}logger[_0xf2d5('0x21')](_0xf2d5('0x1e'),_0x4f4229,_0x30e162[_0xf2d5('0x21')][_0xf2d5('0x22')]);return _0x5c41e4(_0x30e162[_0xf2d5('0x21')][_0xf2d5('0x22')]);}else{logger[_0xf2d5('0x1d')](_0xf2d5('0x1e'),_0x4f4229,_0xf2d5('0x23'));_0x5c41e4(_0x30e162['result'][_0xf2d5('0x22')]);}})[_0xf2d5('0x24')](function(_0xb73f7){logger['error'](_0xf2d5('0x1e'),_0x4f4229,_0xb73f7);_0x1bceee(_0xb73f7);});});}function respondWithStatusCode(_0x5c68e7,_0x54b1ca){_0x54b1ca=_0x54b1ca||0xcc;return function(_0x14185e){if(_0x14185e){return _0x5c68e7[_0xf2d5('0x25')](_0x54b1ca);}return _0x5c68e7[_0xf2d5('0x26')](_0x54b1ca)[_0xf2d5('0x27')]();};}function respondWithResult(_0x4307f8,_0x360ba7){_0x360ba7=_0x360ba7||0xc8;return function(_0x1aef5c){if(_0x1aef5c){return _0x4307f8['status'](_0x360ba7)[_0xf2d5('0x28')](_0x1aef5c);}};}function respondWithFilteredResult(_0x132395,_0x428283){return function(_0x5c164d){if(_0x5c164d){var _0x3b20bf=typeof _0x428283[_0xf2d5('0x29')]===_0xf2d5('0x2a')&&typeof _0x428283[_0xf2d5('0x2b')]===_0xf2d5('0x2a');var _0x311fda=_0x5c164d[_0xf2d5('0x2c')];var _0x5c70b8=_0x3b20bf?0x0:_0x428283['offset'];var _0x240f1d=_0x3b20bf?_0x5c164d['count']:_0x428283[_0xf2d5('0x29')]+_0x428283['limit'];var _0x9f4c35;if(_0x240f1d>=_0x311fda){_0x240f1d=_0x311fda;_0x9f4c35=0xc8;}else{_0x9f4c35=0xce;}_0x132395[_0xf2d5('0x26')](_0x9f4c35);return _0x132395[_0xf2d5('0x2d')](_0xf2d5('0x2e'),_0x5c70b8+'-'+_0x240f1d+'/'+_0x311fda)[_0xf2d5('0x28')](_0x5c164d);}return null;};}function patchUpdates(_0x54d177){return function(_0x81e96d){try{jsonpatch[_0xf2d5('0x2f')](_0x81e96d,_0x54d177,!![]);}catch(_0x8e845b){return BPromise['reject'](_0x8e845b);}return _0x81e96d[_0xf2d5('0x30')]();};}function saveUpdates(_0xc894b2,_0x46ec5b){return function(_0x51c5c1){if(_0x51c5c1){return _0x51c5c1[_0xf2d5('0x31')](_0xc894b2)['then'](function(_0x1323b1){return _0x1323b1;});}return null;};}function removeEntity(_0x1db247,_0x5e9dad){return function(_0x5e18a2){if(_0x5e18a2){return _0x5e18a2[_0xf2d5('0x32')]()[_0xf2d5('0x1c')](function(){_0x1db247[_0xf2d5('0x26')](0xcc)['end']();});}};}function handleEntityNotFound(_0x258456,_0x3cc722){return function(_0x1cd1d5){if(!_0x1cd1d5){_0x258456['sendStatus'](0x194);}return _0x1cd1d5;};}function handleError(_0x3b9e72,_0x1868bd){_0x1868bd=_0x1868bd||0x1f4;return function(_0x3e8599){logger[_0xf2d5('0x21')](_0x3e8599['stack']);if(_0x3e8599[_0xf2d5('0x33')]){delete _0x3e8599[_0xf2d5('0x33')];}_0x3b9e72[_0xf2d5('0x26')](_0x1868bd)['send'](_0x3e8599);};}exports[_0xf2d5('0x34')]=function(_0x4e39e5,_0xd6f6f7){var _0x36399c={},_0xf9d28b={},_0x23c0e8={'count':0x0,'rows':[]};var _0x30a621=_['map'](db['DeskConfiguration'][_0xf2d5('0x35')],function(_0x4c099a){return{'name':_0x4c099a[_0xf2d5('0x36')],'type':_0x4c099a[_0xf2d5('0x37')][_0xf2d5('0x38')]};});_0xf9d28b['model']=_[_0xf2d5('0x39')](_0x30a621,_0xf2d5('0x33'));_0xf9d28b[_0xf2d5('0x3a')]=_[_0xf2d5('0x3b')](_0x4e39e5[_0xf2d5('0x3a')]);_0xf9d28b[_0xf2d5('0x3c')]=_[_0xf2d5('0x3d')](_0xf9d28b[_0xf2d5('0x3e')],_0xf9d28b[_0xf2d5('0x3a')]);_0x36399c[_0xf2d5('0x3f')]=_[_0xf2d5('0x3d')](_0xf9d28b[_0xf2d5('0x3e')],qs[_0xf2d5('0x40')](_0x4e39e5[_0xf2d5('0x3a')][_0xf2d5('0x40')]));_0x36399c[_0xf2d5('0x3f')]=_0x36399c[_0xf2d5('0x3f')][_0xf2d5('0x41')]?_0x36399c['attributes']:_0xf9d28b[_0xf2d5('0x3e')];if(!_0x4e39e5['query'][_0xf2d5('0x42')](_0xf2d5('0x43'))){_0x36399c[_0xf2d5('0x2b')]=qs[_0xf2d5('0x2b')](_0x4e39e5[_0xf2d5('0x3a')][_0xf2d5('0x2b')]);_0x36399c[_0xf2d5('0x29')]=qs['offset'](_0x4e39e5[_0xf2d5('0x3a')][_0xf2d5('0x29')]);}_0x36399c[_0xf2d5('0x44')]=qs[_0xf2d5('0x45')](_0x4e39e5[_0xf2d5('0x3a')][_0xf2d5('0x45')]);_0x36399c[_0xf2d5('0x46')]=qs[_0xf2d5('0x3c')](_['pick'](_0x4e39e5['query'],_0xf9d28b[_0xf2d5('0x3c')]),_0x30a621);if(_0x4e39e5[_0xf2d5('0x3a')]['filter']){_0x36399c[_0xf2d5('0x46')]=_[_0xf2d5('0x47')](_0x36399c['where'],{'$or':_[_0xf2d5('0x39')](_0x30a621,function(_0x439ca9){if(_0x439ca9['type']!==_0xf2d5('0x48')){var _0x531b19={};_0x531b19[_0x439ca9['name']]={'$like':'%'+_0x4e39e5[_0xf2d5('0x3a')]['filter']+'%'};return _0x531b19;}})});}_0x36399c=_[_0xf2d5('0x47')]({},_0x36399c,_0x4e39e5[_0xf2d5('0x49')]);var _0x53e183={'where':_0x36399c['where']};return db[_0xf2d5('0x4a')]['count'](_0x53e183)[_0xf2d5('0x1c')](function(_0x52ac89){_0x23c0e8['count']=_0x52ac89;if(_0x4e39e5[_0xf2d5('0x3a')]['includeAll']){_0x36399c[_0xf2d5('0x4b')]=[{'all':!![]}];}return db[_0xf2d5('0x4a')][_0xf2d5('0x4c')](_0x36399c);})[_0xf2d5('0x1c')](function(_0x3c0891){_0x23c0e8[_0xf2d5('0x4d')]=_0x3c0891;return _0x23c0e8;})[_0xf2d5('0x1c')](respondWithFilteredResult(_0xd6f6f7,_0x36399c))[_0xf2d5('0x24')](handleError(_0xd6f6f7,null));};exports[_0xf2d5('0x4e')]=function(_0xf29cc2,_0x1117c5){var _0xab2cc5={'raw':![],'where':{'id':_0xf29cc2[_0xf2d5('0x4f')]['id']}},_0x5001a5={};_0x5001a5[_0xf2d5('0x3e')]=_[_0xf2d5('0x3b')](db['DeskConfiguration'][_0xf2d5('0x35')]);_0x5001a5[_0xf2d5('0x3a')]=_[_0xf2d5('0x3b')](_0xf29cc2[_0xf2d5('0x3a')]);_0x5001a5['filters']=_[_0xf2d5('0x3d')](_0x5001a5[_0xf2d5('0x3e')],_0x5001a5[_0xf2d5('0x3a')]);_0xab2cc5[_0xf2d5('0x3f')]=_[_0xf2d5('0x3d')](_0x5001a5[_0xf2d5('0x3e')],qs['fields'](_0xf29cc2['query'][_0xf2d5('0x40')]));_0xab2cc5['attributes']=_0xab2cc5['attributes'][_0xf2d5('0x41')]?_0xab2cc5[_0xf2d5('0x3f')]:_0x5001a5['model'];if(_0xf29cc2[_0xf2d5('0x3a')][_0xf2d5('0x50')]){_0xab2cc5[_0xf2d5('0x4b')]=[{'all':!![]}];}_0xab2cc5=_[_0xf2d5('0x47')]({},_0xab2cc5,_0xf29cc2[_0xf2d5('0x49')]);return db['DeskConfiguration'][_0xf2d5('0x51')](_0xab2cc5)[_0xf2d5('0x1c')](handleEntityNotFound(_0x1117c5,null))[_0xf2d5('0x1c')](respondWithResult(_0x1117c5,null))[_0xf2d5('0x24')](handleError(_0x1117c5,null));};exports[_0xf2d5('0x52')]=function(_0x38b6c2,_0x1a682e){return db[_0xf2d5('0x4a')][_0xf2d5('0x52')](_0x38b6c2['body'],{})[_0xf2d5('0x1c')](respondWithResult(_0x1a682e,0xc9))[_0xf2d5('0x24')](handleError(_0x1a682e,null));};exports['update']=function(_0x4d9622,_0x68d8d8){if(_0x4d9622['body']['id']){delete _0x4d9622[_0xf2d5('0x53')]['id'];}return db[_0xf2d5('0x4a')]['find']({'where':{'id':_0x4d9622['params']['id']}})['then'](handleEntityNotFound(_0x68d8d8,null))[_0xf2d5('0x1c')](saveUpdates(_0x4d9622[_0xf2d5('0x53')],null))[_0xf2d5('0x1c')](respondWithResult(_0x68d8d8,null))[_0xf2d5('0x24')](handleError(_0x68d8d8,null));};exports['destroy']=function(_0x2b7ebd,_0x46a5e6){return db[_0xf2d5('0x4a')][_0xf2d5('0x51')]({'where':{'id':_0x2b7ebd['params']['id']}})[_0xf2d5('0x1c')](handleEntityNotFound(_0x46a5e6,null))[_0xf2d5('0x1c')](removeEntity(_0x46a5e6,null))['catch'](handleError(_0x46a5e6,null));};exports[_0xf2d5('0x54')]=function(_0x56efcc,_0x442ed5,_0x24ba93){var _0x459426={};var _0x3b0587={};var _0x16e617;var _0x3afb2d;return db[_0xf2d5('0x4a')][_0xf2d5('0x55')]({'where':{'id':_0x56efcc['params']['id']}})[_0xf2d5('0x1c')](handleEntityNotFound(_0x442ed5,null))[_0xf2d5('0x1c')](function(_0x47c772){if(_0x47c772){_0x16e617=_0x47c772;_0x3b0587[_0xf2d5('0x3e')]=_['keys'](db['DeskField']['rawAttributes']);_0x3b0587[_0xf2d5('0x3a')]=_[_0xf2d5('0x3b')](_0x56efcc[_0xf2d5('0x3a')]);_0x3b0587['filters']=_[_0xf2d5('0x3d')](_0x3b0587['model'],_0x3b0587[_0xf2d5('0x3a')]);_0x459426[_0xf2d5('0x3f')]=_[_0xf2d5('0x3d')](_0x3b0587['model'],qs['fields'](_0x56efcc[_0xf2d5('0x3a')][_0xf2d5('0x40')]));_0x459426[_0xf2d5('0x3f')]=_0x459426[_0xf2d5('0x3f')][_0xf2d5('0x41')]?_0x459426['attributes']:_0x3b0587[_0xf2d5('0x3e')];_0x459426[_0xf2d5('0x44')]=qs[_0xf2d5('0x45')](_0x56efcc[_0xf2d5('0x3a')][_0xf2d5('0x45')]);_0x459426[_0xf2d5('0x46')]=qs[_0xf2d5('0x3c')](_[_0xf2d5('0x56')](_0x56efcc['query'],_0x3b0587[_0xf2d5('0x3c')]));if(_0x56efcc[_0xf2d5('0x3a')][_0xf2d5('0x57')]){_0x459426[_0xf2d5('0x46')]=_[_0xf2d5('0x47')](_0x459426[_0xf2d5('0x46')],{'$or':_['map'](_0x459426['attributes'],function(_0xb8694c){var _0x22f752={};_0x22f752[_0xb8694c]={'$like':'%'+_0x56efcc[_0xf2d5('0x3a')]['filter']+'%'};return _0x22f752;})});}_0x459426=_[_0xf2d5('0x47')]({},_0x459426,_0x56efcc[_0xf2d5('0x49')]);return _0x16e617[_0xf2d5('0x54')](_0x459426);}})['then'](function(_0x51f19e){if(_0x51f19e){_0x3afb2d=_0x51f19e[_0xf2d5('0x41')];if(!_0x56efcc[_0xf2d5('0x3a')][_0xf2d5('0x42')]('nolimit')){_0x459426[_0xf2d5('0x2b')]=qs[_0xf2d5('0x2b')](_0x56efcc['query'][_0xf2d5('0x2b')]);_0x459426[_0xf2d5('0x29')]=qs[_0xf2d5('0x29')](_0x56efcc[_0xf2d5('0x3a')][_0xf2d5('0x29')]);}return _0x16e617[_0xf2d5('0x54')](_0x459426);}})['then'](function(_0xe8ddf1){if(_0xe8ddf1){return _0xe8ddf1?{'count':_0x3afb2d,'rows':_0xe8ddf1}:null;}})[_0xf2d5('0x1c')](respondWithResult(_0x442ed5,null))[_0xf2d5('0x24')](handleError(_0x442ed5,null));};exports[_0xf2d5('0x58')]=function(_0x260502,_0x33f5e6,_0x49e14d){var _0x3d6137={};var _0x5b3f70={};var _0x2888bd;var _0x1b3581;return db[_0xf2d5('0x4a')][_0xf2d5('0x55')]({'where':{'id':_0x260502[_0xf2d5('0x4f')]['id']}})[_0xf2d5('0x1c')](handleEntityNotFound(_0x33f5e6,null))['then'](function(_0x4c0e64){if(_0x4c0e64){_0x2888bd=_0x4c0e64;_0x5b3f70[_0xf2d5('0x3e')]=_[_0xf2d5('0x3b')](db[_0xf2d5('0x59')]['rawAttributes']);_0x5b3f70[_0xf2d5('0x3a')]=_['keys'](_0x260502[_0xf2d5('0x3a')]);_0x5b3f70['filters']=_['intersection'](_0x5b3f70[_0xf2d5('0x3e')],_0x5b3f70[_0xf2d5('0x3a')]);_0x3d6137[_0xf2d5('0x3f')]=_['intersection'](_0x5b3f70['model'],qs['fields'](_0x260502[_0xf2d5('0x3a')]['fields']));_0x3d6137[_0xf2d5('0x3f')]=_0x3d6137[_0xf2d5('0x3f')][_0xf2d5('0x41')]?_0x3d6137[_0xf2d5('0x3f')]:_0x5b3f70['model'];_0x3d6137['order']=qs['sort'](_0x260502['query'][_0xf2d5('0x45')]);_0x3d6137[_0xf2d5('0x46')]=qs['filters'](_[_0xf2d5('0x56')](_0x260502['query'],_0x5b3f70[_0xf2d5('0x3c')]));if(_0x260502[_0xf2d5('0x3a')][_0xf2d5('0x57')]){_0x3d6137[_0xf2d5('0x46')]=_['merge'](_0x3d6137[_0xf2d5('0x46')],{'$or':_[_0xf2d5('0x39')](_0x3d6137['attributes'],function(_0x43f113){var _0x1af134={};_0x1af134[_0x43f113]={'$like':'%'+_0x260502[_0xf2d5('0x3a')]['filter']+'%'};return _0x1af134;})});}_0x3d6137=_['merge']({},_0x3d6137,_0x260502['options']);return _0x2888bd['getSubjects'](_0x3d6137);}})[_0xf2d5('0x1c')](function(_0x1d835f){if(_0x1d835f){_0x1b3581=_0x1d835f['length'];if(!_0x260502['query'][_0xf2d5('0x42')](_0xf2d5('0x43'))){_0x3d6137['limit']=qs[_0xf2d5('0x2b')](_0x260502[_0xf2d5('0x3a')][_0xf2d5('0x2b')]);_0x3d6137[_0xf2d5('0x29')]=qs[_0xf2d5('0x29')](_0x260502['query']['offset']);}return _0x2888bd[_0xf2d5('0x58')](_0x3d6137);}})[_0xf2d5('0x1c')](function(_0x44d2a1){if(_0x44d2a1){return _0x44d2a1?{'count':_0x1b3581,'rows':_0x44d2a1}:null;}})[_0xf2d5('0x1c')](respondWithResult(_0x33f5e6,null))[_0xf2d5('0x24')](handleError(_0x33f5e6,null));};exports[_0xf2d5('0x5a')]=function(_0x1e0744,_0x1e07f8,_0x4a7f9b){var _0x2ba162={};var _0x2257c3={};var _0x90298e;var _0x2a7a84;return db[_0xf2d5('0x4a')][_0xf2d5('0x55')]({'where':{'id':_0x1e0744[_0xf2d5('0x4f')]['id']}})['then'](handleEntityNotFound(_0x1e07f8,null))['then'](function(_0x52fb18){if(_0x52fb18){_0x90298e=_0x52fb18;_0x2257c3[_0xf2d5('0x3e')]=_['keys'](db[_0xf2d5('0x59')][_0xf2d5('0x35')]);_0x2257c3['query']=_['keys'](_0x1e0744[_0xf2d5('0x3a')]);_0x2257c3['filters']=_['intersection'](_0x2257c3[_0xf2d5('0x3e')],_0x2257c3['query']);_0x2ba162[_0xf2d5('0x3f')]=_['intersection'](_0x2257c3[_0xf2d5('0x3e')],qs[_0xf2d5('0x40')](_0x1e0744[_0xf2d5('0x3a')][_0xf2d5('0x40')]));_0x2ba162[_0xf2d5('0x3f')]=_0x2ba162[_0xf2d5('0x3f')][_0xf2d5('0x41')]?_0x2ba162[_0xf2d5('0x3f')]:_0x2257c3['model'];_0x2ba162['order']=qs[_0xf2d5('0x45')](_0x1e0744['query'][_0xf2d5('0x45')]);_0x2ba162[_0xf2d5('0x46')]=qs[_0xf2d5('0x3c')](_[_0xf2d5('0x56')](_0x1e0744[_0xf2d5('0x3a')],_0x2257c3[_0xf2d5('0x3c')]));if(_0x1e0744[_0xf2d5('0x3a')][_0xf2d5('0x57')]){_0x2ba162[_0xf2d5('0x46')]=_['merge'](_0x2ba162[_0xf2d5('0x46')],{'$or':_['map'](_0x2ba162['attributes'],function(_0x17facd){var _0x4ddacd={};_0x4ddacd[_0x17facd]={'$like':'%'+_0x1e0744['query'][_0xf2d5('0x57')]+'%'};return _0x4ddacd;})});}_0x2ba162=_['merge']({},_0x2ba162,_0x1e0744[_0xf2d5('0x49')]);return _0x90298e[_0xf2d5('0x5a')](_0x2ba162);}})[_0xf2d5('0x1c')](function(_0x348925){if(_0x348925){_0x2a7a84=_0x348925[_0xf2d5('0x41')];if(!_0x1e0744['query'][_0xf2d5('0x42')](_0xf2d5('0x43'))){_0x2ba162[_0xf2d5('0x2b')]=qs[_0xf2d5('0x2b')](_0x1e0744['query'][_0xf2d5('0x2b')]);_0x2ba162[_0xf2d5('0x29')]=qs[_0xf2d5('0x29')](_0x1e0744[_0xf2d5('0x3a')][_0xf2d5('0x29')]);}return _0x90298e['getDescriptions'](_0x2ba162);}})[_0xf2d5('0x1c')](function(_0x63a6aa){if(_0x63a6aa){return _0x63a6aa?{'count':_0x2a7a84,'rows':_0x63a6aa}:null;}})[_0xf2d5('0x1c')](respondWithResult(_0x1e07f8,null))[_0xf2d5('0x24')](handleError(_0x1e07f8,null));};exports[_0xf2d5('0x5b')]=function(_0x5132a1,_0x1a146f,_0x36fe01){var _0x57eba3={};var _0x19ebed={};var _0x26430b;var _0x4f11aa;return db[_0xf2d5('0x4a')][_0xf2d5('0x55')]({'where':{'id':_0x5132a1[_0xf2d5('0x4f')]['id']}})[_0xf2d5('0x1c')](handleEntityNotFound(_0x1a146f,null))[_0xf2d5('0x1c')](function(_0x1830f0){if(_0x1830f0){_0x26430b=_0x1830f0;_0x19ebed[_0xf2d5('0x3e')]=_[_0xf2d5('0x3b')](db[_0xf2d5('0x5c')][_0xf2d5('0x35')]);_0x19ebed[_0xf2d5('0x3a')]=_[_0xf2d5('0x3b')](_0x5132a1[_0xf2d5('0x3a')]);_0x19ebed['filters']=_[_0xf2d5('0x3d')](_0x19ebed[_0xf2d5('0x3e')],_0x19ebed[_0xf2d5('0x3a')]);_0x57eba3[_0xf2d5('0x3f')]=_[_0xf2d5('0x3d')](_0x19ebed[_0xf2d5('0x3e')],qs['fields'](_0x5132a1[_0xf2d5('0x3a')][_0xf2d5('0x40')]));_0x57eba3[_0xf2d5('0x3f')]=_0x57eba3['attributes'][_0xf2d5('0x41')]?_0x57eba3['attributes']:_0x19ebed['model'];_0x57eba3[_0xf2d5('0x44')]=qs[_0xf2d5('0x45')](_0x5132a1[_0xf2d5('0x3a')][_0xf2d5('0x45')]);_0x57eba3[_0xf2d5('0x46')]=qs[_0xf2d5('0x3c')](_[_0xf2d5('0x56')](_0x5132a1['query'],_0x19ebed[_0xf2d5('0x3c')]));if(_0x5132a1[_0xf2d5('0x3a')][_0xf2d5('0x57')]){_0x57eba3[_0xf2d5('0x46')]=_[_0xf2d5('0x47')](_0x57eba3[_0xf2d5('0x46')],{'$or':_[_0xf2d5('0x39')](_0x57eba3[_0xf2d5('0x3f')],function(_0x438992){var _0x401513={};_0x401513[_0x438992]={'$like':'%'+_0x5132a1[_0xf2d5('0x3a')][_0xf2d5('0x57')]+'%'};return _0x401513;})});}_0x57eba3=_[_0xf2d5('0x47')]({},_0x57eba3,_0x5132a1[_0xf2d5('0x49')]);return _0x26430b[_0xf2d5('0x5b')](_0x57eba3);}})['then'](function(_0x3070b8){if(_0x3070b8){_0x4f11aa=_0x3070b8[_0xf2d5('0x41')];if(!_0x5132a1[_0xf2d5('0x3a')]['hasOwnProperty']('nolimit')){_0x57eba3[_0xf2d5('0x2b')]=qs[_0xf2d5('0x2b')](_0x5132a1['query'][_0xf2d5('0x2b')]);_0x57eba3[_0xf2d5('0x29')]=qs[_0xf2d5('0x29')](_0x5132a1[_0xf2d5('0x3a')]['offset']);}return _0x26430b[_0xf2d5('0x5b')](_0x57eba3);}})[_0xf2d5('0x1c')](function(_0x48e22b){if(_0x48e22b){return _0x48e22b?{'count':_0x4f11aa,'rows':_0x48e22b}:null;}})[_0xf2d5('0x1c')](respondWithResult(_0x1a146f,null))['catch'](handleError(_0x1a146f,null));};exports[_0xf2d5('0x5d')]=function(_0x43dc9a,_0xe3ab7d,_0x1dd184){if(_0x43dc9a[_0xf2d5('0x53')]['id']){delete _0x43dc9a[_0xf2d5('0x53')]['id'];}return db['DeskConfiguration'][_0xf2d5('0x55')]({'where':{'id':_0x43dc9a[_0xf2d5('0x4f')]['id']}})[_0xf2d5('0x1c')](handleEntityNotFound(_0xe3ab7d,null))[_0xf2d5('0x1c')](function(_0x52c138){if(_0x52c138){return _0x52c138[_0xf2d5('0x5d')](_0x43dc9a[_0xf2d5('0x53')][_0xf2d5('0x5e')]||[]);}return null;})[_0xf2d5('0x1c')](respondWithResult(_0xe3ab7d,null))[_0xf2d5('0x24')](handleError(_0xe3ab7d,null));}; \ No newline at end of file diff --git a/server/api/intDeskConfiguration/intDeskConfiguration.model.js b/server/api/intDeskConfiguration/intDeskConfiguration.model.js index 8b60734..800f4f0 100644 --- a/server/api/intDeskConfiguration/intDeskConfiguration.model.js +++ b/server/api/intDeskConfiguration/intDeskConfiguration.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7a2b=['exports','define','DeskConfiguration','int_desk_configurations','lodash','util','request-promise','rimraf','../../config/environment','./intDeskConfiguration.attributes'];(function(_0x4e0119,_0x59b949){var _0x216d7a=function(_0x547702){while(--_0x547702){_0x4e0119['push'](_0x4e0119['shift']());}};_0x216d7a(++_0x59b949);}(_0x7a2b,0x7c));var _0xb7a2=function(_0x6c993a,_0x5ea3ab){_0x6c993a=_0x6c993a-0x0;var _0x27f547=_0x7a2b[_0x6c993a];return _0x27f547;};'use strict';var _=require(_0xb7a2('0x0'));var util=require(_0xb7a2('0x1'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xb7a2('0x2'));var fs=require('fs');var path=require('path');var rimraf=require(_0xb7a2('0x3'));var config=require(_0xb7a2('0x4'));var attributes=require(_0xb7a2('0x5'));module[_0xb7a2('0x6')]=function(_0x2cdf6d,_0x1d5fd0){return _0x2cdf6d[_0xb7a2('0x7')](_0xb7a2('0x8'),attributes,{'tableName':_0xb7a2('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xd2fa=['../../config/environment','./intDeskConfiguration.attributes','exports','define','DeskConfiguration','int_desk_configurations','lodash','util','api','bluebird','path','rimraf'];(function(_0x54edc9,_0x345f01){var _0x2ae7a9=function(_0x24a545){while(--_0x24a545){_0x54edc9['push'](_0x54edc9['shift']());}};_0x2ae7a9(++_0x345f01);}(_0xd2fa,0x16e));var _0xad2f=function(_0x183ab5,_0x245620){_0x183ab5=_0x183ab5-0x0;var _0x414acf=_0xd2fa[_0x183ab5];return _0x414acf;};'use strict';var _=require(_0xad2f('0x0'));var util=require(_0xad2f('0x1'));var logger=require('../../config/logger')(_0xad2f('0x2'));var moment=require('moment');var BPromise=require(_0xad2f('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xad2f('0x4'));var rimraf=require(_0xad2f('0x5'));var config=require(_0xad2f('0x6'));var attributes=require(_0xad2f('0x7'));module[_0xad2f('0x8')]=function(_0x5355d2,_0x3e48f7){return _0x5355d2[_0xad2f('0x9')](_0xad2f('0xa'),attributes,{'tableName':_0xad2f('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intDeskConfiguration/intDeskConfiguration.rpc.js b/server/api/intDeskConfiguration/intDeskConfiguration.rpc.js index 3ca7ddd..3321e7d 100644 --- a/server/api/intDeskConfiguration/intDeskConfiguration.rpc.js +++ b/server/api/intDeskConfiguration/intDeskConfiguration.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbc87=['stringify','error','code','message','lodash','bluebird','randomstring','ioredis','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','DeskConfiguration,\x20%s,\x20%s','request\x20sent','DeskConfiguration,\x20%s,\x20%s,\x20%s'];(function(_0x3409eb,_0x228fc4){var _0x5691d0=function(_0x23ad29){while(--_0x23ad29){_0x3409eb['push'](_0x3409eb['shift']());}};_0x5691d0(++_0x228fc4);}(_0xbc87,0x144));var _0x7bc8=function(_0x3057a3,_0x321953){_0x3057a3=_0x3057a3-0x0;var _0x5a9844=_0xbc87[_0x3057a3];return _0x5a9844;};'use strict';var _=require(_0x7bc8('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x7bc8('0x1'));var rs=require(_0x7bc8('0x2'));var fs=require('fs');var Redis=require(_0x7bc8('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x7bc8('0x4'))(_0x7bc8('0x5'));var config=require(_0x7bc8('0x6'));var jayson=require(_0x7bc8('0x7'));var client=jayson[_0x7bc8('0x8')][_0x7bc8('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x410b95,_0x2e1d63,_0x1fcc43){return new BPromise(function(_0x466ed5,_0xb87048){return client[_0x7bc8('0xa')](_0x410b95,_0x1fcc43)[_0x7bc8('0xb')](function(_0x368899){logger[_0x7bc8('0xc')](_0x7bc8('0xd'),_0x2e1d63,_0x7bc8('0xe'));logger['debug'](_0x7bc8('0xf'),_0x2e1d63,'request\x20sent',JSON[_0x7bc8('0x10')](_0x368899));if(_0x368899[_0x7bc8('0x11')]){if(_0x368899[_0x7bc8('0x11')][_0x7bc8('0x12')]===0x1f4){logger[_0x7bc8('0x11')](_0x7bc8('0xd'),_0x2e1d63,_0x368899['error'][_0x7bc8('0x13')]);return _0xb87048(_0x368899[_0x7bc8('0x11')]['message']);}logger[_0x7bc8('0x11')]('DeskConfiguration,\x20%s,\x20%s',_0x2e1d63,_0x368899[_0x7bc8('0x11')][_0x7bc8('0x13')]);return _0x466ed5(_0x368899[_0x7bc8('0x11')][_0x7bc8('0x13')]);}else{logger[_0x7bc8('0xc')]('DeskConfiguration,\x20%s,\x20%s',_0x2e1d63,_0x7bc8('0xe'));_0x466ed5(_0x368899['result'][_0x7bc8('0x13')]);}})['catch'](function(_0x455f9a){logger[_0x7bc8('0x11')](_0x7bc8('0xd'),_0x2e1d63,_0x455f9a);_0xb87048(_0x455f9a);});});} \ No newline at end of file +var _0x48ae=['client','http','request','info','DeskConfiguration,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','jayson/promise'];(function(_0x5c1c5a,_0x28b4b3){var _0x435d7a=function(_0xf1fdbd){while(--_0xf1fdbd){_0x5c1c5a['push'](_0x5c1c5a['shift']());}};_0x435d7a(++_0x28b4b3);}(_0x48ae,0xd2));var _0xe48a=function(_0xb59502,_0x1438a0){_0xb59502=_0xb59502-0x0;var _0xf5ffd0=_0x48ae[_0xb59502];return _0xf5ffd0;};'use strict';var _=require(_0xe48a('0x0'));var util=require(_0xe48a('0x1'));var moment=require(_0xe48a('0x2'));var BPromise=require(_0xe48a('0x3'));var rs=require(_0xe48a('0x4'));var fs=require('fs');var Redis=require(_0xe48a('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xe48a('0x6'));var logger=require(_0xe48a('0x7'))(_0xe48a('0x8'));var config=require('../../config/environment');var jayson=require(_0xe48a('0x9'));var client=jayson[_0xe48a('0xa')][_0xe48a('0xb')]({'port':0x232a});function respondWithRpcPromise(_0xc233d9,_0x4ea5c8,_0x533d93){return new BPromise(function(_0x2069ff,_0x28949f){return client[_0xe48a('0xc')](_0xc233d9,_0x533d93)['then'](function(_0xbe27c0){logger[_0xe48a('0xd')](_0xe48a('0xe'),_0x4ea5c8,'request\x20sent');logger[_0xe48a('0xf')]('DeskConfiguration,\x20%s,\x20%s,\x20%s',_0x4ea5c8,_0xe48a('0x10'),JSON[_0xe48a('0x11')](_0xbe27c0));if(_0xbe27c0['error']){if(_0xbe27c0[_0xe48a('0x12')][_0xe48a('0x13')]===0x1f4){logger[_0xe48a('0x12')](_0xe48a('0xe'),_0x4ea5c8,_0xbe27c0[_0xe48a('0x12')]['message']);return _0x28949f(_0xbe27c0[_0xe48a('0x12')][_0xe48a('0x14')]);}logger['error'](_0xe48a('0xe'),_0x4ea5c8,_0xbe27c0[_0xe48a('0x12')]['message']);return _0x2069ff(_0xbe27c0[_0xe48a('0x12')][_0xe48a('0x14')]);}else{logger[_0xe48a('0xd')](_0xe48a('0xe'),_0x4ea5c8,_0xe48a('0x10'));_0x2069ff(_0xbe27c0['result'][_0xe48a('0x14')]);}})[_0xe48a('0x15')](function(_0x37d8d7){logger[_0xe48a('0x12')](_0xe48a('0xe'),_0x4ea5c8,_0x37d8d7);_0x28949f(_0x37d8d7);});});} \ No newline at end of file diff --git a/server/api/intDeskField/index.js b/server/api/intDeskField/index.js index 8486577..bcdeb04 100644 --- a/server/api/intDeskField/index.js +++ b/server/api/intDeskField/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7aa0=['exports','multer','util','path','connect-timeout','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intDeskField.controller','get','index','/:id','show','post','isAuthenticated','create','put','update','destroy'];(function(_0x3e1054,_0x345ece){var _0xa74ef6=function(_0x2312e1){while(--_0x2312e1){_0x3e1054['push'](_0x3e1054['shift']());}};_0xa74ef6(++_0x345ece);}(_0x7aa0,0xa1));var _0x07aa=function(_0x536f0a,_0x2dd638){_0x536f0a=_0x536f0a-0x0;var _0x552487=_0x7aa0[_0x536f0a];return _0x552487;};'use strict';var multer=require(_0x07aa('0x0'));var util=require(_0x07aa('0x1'));var path=require(_0x07aa('0x2'));var timeout=require(_0x07aa('0x3'));var express=require('express');var router=express['Router']();var fs_extra=require(_0x07aa('0x4'));var auth=require(_0x07aa('0x5'));var interaction=require(_0x07aa('0x6'));var config=require(_0x07aa('0x7'));var controller=require(_0x07aa('0x8'));router[_0x07aa('0x9')]('/',auth['isAuthenticated'](),controller[_0x07aa('0xa')]);router['get'](_0x07aa('0xb'),auth['isAuthenticated'](),controller[_0x07aa('0xc')]);router[_0x07aa('0xd')]('/',auth[_0x07aa('0xe')](),controller[_0x07aa('0xf')]);router[_0x07aa('0x10')](_0x07aa('0xb'),auth[_0x07aa('0xe')](),controller[_0x07aa('0x11')]);router['delete'](_0x07aa('0xb'),auth['isAuthenticated'](),controller[_0x07aa('0x12')]);module[_0x07aa('0x13')]=router; \ No newline at end of file +var _0x0817=['update','delete','destroy','exports','multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intDeskField.controller','get','isAuthenticated','index','show','post','create'];(function(_0x2a16f4,_0x2ce51d){var _0x37fd3c=function(_0x6e855c){while(--_0x6e855c){_0x2a16f4['push'](_0x2a16f4['shift']());}};_0x37fd3c(++_0x2ce51d);}(_0x0817,0x90));var _0x7081=function(_0x3664f5,_0xa63a64){_0x3664f5=_0x3664f5-0x0;var _0x1e7303=_0x0817[_0x3664f5];return _0x1e7303;};'use strict';var multer=require(_0x7081('0x0'));var util=require('util');var path=require(_0x7081('0x1'));var timeout=require(_0x7081('0x2'));var express=require(_0x7081('0x3'));var router=express[_0x7081('0x4')]();var fs_extra=require(_0x7081('0x5'));var auth=require(_0x7081('0x6'));var interaction=require(_0x7081('0x7'));var config=require(_0x7081('0x8'));var controller=require(_0x7081('0x9'));router[_0x7081('0xa')]('/',auth[_0x7081('0xb')](),controller[_0x7081('0xc')]);router[_0x7081('0xa')]('/:id',auth[_0x7081('0xb')](),controller[_0x7081('0xd')]);router[_0x7081('0xe')]('/',auth['isAuthenticated'](),controller[_0x7081('0xf')]);router['put']('/:id',auth[_0x7081('0xb')](),controller[_0x7081('0x10')]);router[_0x7081('0x11')]('/:id',auth['isAuthenticated'](),controller[_0x7081('0x12')]);module[_0x7081('0x13')]=router; \ No newline at end of file diff --git a/server/api/intDeskField/intDeskField.attributes.js b/server/api/intDeskField/intDeskField.attributes.js index 0578e25..7b2711b 100644 --- a/server/api/intDeskField/intDeskField.attributes.js +++ b/server/api/intDeskField/intDeskField.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0f01=['ENUM','string','variable','customVariable','keyValue','picklist','STRING','BOOLEAN','sequelize','exports'];(function(_0x199b1f,_0x4ed849){var _0x267ac9=function(_0x184ac6){while(--_0x184ac6){_0x199b1f['push'](_0x199b1f['shift']());}};_0x267ac9(++_0x4ed849);}(_0x0f01,0x1ca));var _0x10f0=function(_0x4bf5cd,_0xddf2f2){_0x4bf5cd=_0x4bf5cd-0x0;var _0x2f9e5a=_0x0f01[_0x4bf5cd];return _0x2f9e5a;};'use strict';var Sequelize=require(_0x10f0('0x0'));module[_0x10f0('0x1')]={'type':{'type':Sequelize[_0x10f0('0x2')](_0x10f0('0x3'),_0x10f0('0x4'),_0x10f0('0x5'),_0x10f0('0x6'),_0x10f0('0x7')),'defaultValue':'string'},'content':{'type':Sequelize[_0x10f0('0x8')]},'key':{'type':Sequelize[_0x10f0('0x8')]},'keyType':{'type':Sequelize['ENUM'](_0x10f0('0x3'),_0x10f0('0x4'),'customVariable')},'keyContent':{'type':Sequelize[_0x10f0('0x8')]},'idField':{'type':Sequelize[_0x10f0('0x8')]},'nameField':{'type':Sequelize[_0x10f0('0x8')]},'customField':{'type':Sequelize[_0x10f0('0x9')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x10f0('0x8')]}}; \ No newline at end of file +var _0x6f92=['BOOLEAN','sequelize','ENUM','string','variable','keyValue','picklist','STRING','customVariable'];(function(_0x13c1b2,_0x40d086){var _0x3f2327=function(_0x13d8d2){while(--_0x13d8d2){_0x13c1b2['push'](_0x13c1b2['shift']());}};_0x3f2327(++_0x40d086);}(_0x6f92,0x160));var _0x26f9=function(_0x9f0833,_0x144c6f){_0x9f0833=_0x9f0833-0x0;var _0x1f3c2f=_0x6f92[_0x9f0833];return _0x1f3c2f;};'use strict';var Sequelize=require(_0x26f9('0x0'));module['exports']={'type':{'type':Sequelize[_0x26f9('0x1')](_0x26f9('0x2'),_0x26f9('0x3'),'customVariable',_0x26f9('0x4'),_0x26f9('0x5')),'defaultValue':_0x26f9('0x2')},'content':{'type':Sequelize[_0x26f9('0x6')]},'key':{'type':Sequelize[_0x26f9('0x6')]},'keyType':{'type':Sequelize[_0x26f9('0x1')](_0x26f9('0x2'),_0x26f9('0x3'),_0x26f9('0x7'))},'keyContent':{'type':Sequelize[_0x26f9('0x6')]},'idField':{'type':Sequelize[_0x26f9('0x6')]},'nameField':{'type':Sequelize[_0x26f9('0x6')]},'customField':{'type':Sequelize[_0x26f9('0x8')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x26f9('0x6')]}}; \ No newline at end of file diff --git a/server/api/intDeskField/intDeskField.controller.js b/server/api/intDeskField/intDeskField.controller.js index b0475b9..d02b722 100644 --- a/server/api/intDeskField/intDeskField.controller.js +++ b/server/api/intDeskField/intDeskField.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0e6a=['name','send','index','map','DeskField','rawAttributes','fieldName','type','key','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','VIRTUAL','filter','options','findAll','rows','show','params','keys','includeAll','include','find','catch','create','body','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','fs-extra','crypto','jsforce','desk.js','querystring','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/environment','sendStatus','status','offset','undefined','limit','count','set','Content-Range','reject','update','then','destroy','end','error'];(function(_0x254c9e,_0xab8a1b){var _0x2d4cb6=function(_0x15b027){while(--_0x15b027){_0x254c9e['push'](_0x254c9e['shift']());}};_0x2d4cb6(++_0xab8a1b);}(_0x0e6a,0x100));var _0xa0e6=function(_0x8a74d1,_0x4abf13){_0x8a74d1=_0x8a74d1-0x0;var _0x53775a=_0x0e6a[_0x8a74d1];return _0x53775a;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xa0e6('0x0'));var zipdir=require(_0xa0e6('0x1'));var jsonpatch=require(_0xa0e6('0x2'));var rp=require(_0xa0e6('0x3'));var moment=require(_0xa0e6('0x4'));var BPromise=require(_0xa0e6('0x5'));var Mustache=require('mustache');var util=require(_0xa0e6('0x6'));var path=require(_0xa0e6('0x7'));var sox=require(_0xa0e6('0x8'));var csv=require(_0xa0e6('0x9'));var ejs=require(_0xa0e6('0xa'));var fs=require('fs');var fs_extra=require(_0xa0e6('0xb'));var _=require('lodash');var squel=require('squel');var crypto=require(_0xa0e6('0xc'));var jsforce=require(_0xa0e6('0xd'));var deskjs=require(_0xa0e6('0xe'));var toCsv=require(_0xa0e6('0x9'));var querystring=require(_0xa0e6('0xf'));var Papa=require(_0xa0e6('0x10'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0xa0e6('0x11'));var as=require(_0xa0e6('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xa0e6('0x13'))('api');var utils=require(_0xa0e6('0x14'));var config=require(_0xa0e6('0x15'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x1854b2,_0xb8b194){_0xb8b194=_0xb8b194||0xcc;return function(_0x27118c){if(_0x27118c){return _0x1854b2[_0xa0e6('0x16')](_0xb8b194);}return _0x1854b2[_0xa0e6('0x17')](_0xb8b194)['end']();};}function respondWithResult(_0x1165bf,_0x558c9d){_0x558c9d=_0x558c9d||0xc8;return function(_0x14d99c){if(_0x14d99c){return _0x1165bf[_0xa0e6('0x17')](_0x558c9d)['json'](_0x14d99c);}};}function respondWithFilteredResult(_0x197e8b,_0x2da5c7){return function(_0x1bfdb1){if(_0x1bfdb1){var _0x301a37=typeof _0x2da5c7[_0xa0e6('0x18')]===_0xa0e6('0x19')&&typeof _0x2da5c7[_0xa0e6('0x1a')]==='undefined';var _0x5b4294=_0x1bfdb1['count'];var _0x3cc453=_0x301a37?0x0:_0x2da5c7[_0xa0e6('0x18')];var _0x5b9aa6=_0x301a37?_0x1bfdb1[_0xa0e6('0x1b')]:_0x2da5c7[_0xa0e6('0x18')]+_0x2da5c7[_0xa0e6('0x1a')];var _0x5c0718;if(_0x5b9aa6>=_0x5b4294){_0x5b9aa6=_0x5b4294;_0x5c0718=0xc8;}else{_0x5c0718=0xce;}_0x197e8b['status'](_0x5c0718);return _0x197e8b[_0xa0e6('0x1c')](_0xa0e6('0x1d'),_0x3cc453+'-'+_0x5b9aa6+'/'+_0x5b4294)['json'](_0x1bfdb1);}return null;};}function patchUpdates(_0x2dc797){return function(_0x290a58){try{jsonpatch['apply'](_0x290a58,_0x2dc797,!![]);}catch(_0x200849){return BPromise[_0xa0e6('0x1e')](_0x200849);}return _0x290a58['save']();};}function saveUpdates(_0x2eddca,_0x582ee5){return function(_0x2361ad){if(_0x2361ad){return _0x2361ad[_0xa0e6('0x1f')](_0x2eddca)[_0xa0e6('0x20')](function(_0x2e3224){return _0x2e3224;});}return null;};}function removeEntity(_0x421503,_0x1182ee){return function(_0x4683ad){if(_0x4683ad){return _0x4683ad[_0xa0e6('0x21')]()[_0xa0e6('0x20')](function(){_0x421503[_0xa0e6('0x17')](0xcc)[_0xa0e6('0x22')]();});}};}function handleEntityNotFound(_0x275269,_0xf35c98){return function(_0x144b7c){if(!_0x144b7c){_0x275269[_0xa0e6('0x16')](0x194);}return _0x144b7c;};}function handleError(_0x301854,_0x12b46f){_0x12b46f=_0x12b46f||0x1f4;return function(_0x35aa2a){logger[_0xa0e6('0x23')](_0x35aa2a['stack']);if(_0x35aa2a[_0xa0e6('0x24')]){delete _0x35aa2a[_0xa0e6('0x24')];}_0x301854[_0xa0e6('0x17')](_0x12b46f)[_0xa0e6('0x25')](_0x35aa2a);};}exports[_0xa0e6('0x26')]=function(_0x17c0a5,_0x2a5d3c){var _0x51c173={},_0x500a3d={},_0x12185c={'count':0x0,'rows':[]};var _0x2f4c57=_[_0xa0e6('0x27')](db[_0xa0e6('0x28')][_0xa0e6('0x29')],function(_0x1dc830){return{'name':_0x1dc830[_0xa0e6('0x2a')],'type':_0x1dc830[_0xa0e6('0x2b')][_0xa0e6('0x2c')]};});_0x500a3d[_0xa0e6('0x2d')]=_[_0xa0e6('0x27')](_0x2f4c57,'name');_0x500a3d['query']=_['keys'](_0x17c0a5[_0xa0e6('0x2e')]);_0x500a3d[_0xa0e6('0x2f')]=_[_0xa0e6('0x30')](_0x500a3d[_0xa0e6('0x2d')],_0x500a3d['query']);_0x51c173[_0xa0e6('0x31')]=_['intersection'](_0x500a3d[_0xa0e6('0x2d')],qs[_0xa0e6('0x32')](_0x17c0a5[_0xa0e6('0x2e')][_0xa0e6('0x32')]));_0x51c173['attributes']=_0x51c173['attributes'][_0xa0e6('0x33')]?_0x51c173[_0xa0e6('0x31')]:_0x500a3d[_0xa0e6('0x2d')];if(!_0x17c0a5['query'][_0xa0e6('0x34')](_0xa0e6('0x35'))){_0x51c173[_0xa0e6('0x1a')]=qs[_0xa0e6('0x1a')](_0x17c0a5[_0xa0e6('0x2e')][_0xa0e6('0x1a')]);_0x51c173[_0xa0e6('0x18')]=qs[_0xa0e6('0x18')](_0x17c0a5[_0xa0e6('0x2e')][_0xa0e6('0x18')]);}_0x51c173[_0xa0e6('0x36')]=qs[_0xa0e6('0x37')](_0x17c0a5[_0xa0e6('0x2e')][_0xa0e6('0x37')]);_0x51c173[_0xa0e6('0x38')]=qs[_0xa0e6('0x2f')](_[_0xa0e6('0x39')](_0x17c0a5[_0xa0e6('0x2e')],_0x500a3d[_0xa0e6('0x2f')]),_0x2f4c57);if(_0x17c0a5[_0xa0e6('0x2e')]['filter']){_0x51c173[_0xa0e6('0x38')]=_[_0xa0e6('0x3a')](_0x51c173[_0xa0e6('0x38')],{'$or':_[_0xa0e6('0x27')](_0x2f4c57,function(_0x41aa76){if(_0x41aa76[_0xa0e6('0x2b')]!==_0xa0e6('0x3b')){var _0x541e0d={};_0x541e0d[_0x41aa76[_0xa0e6('0x24')]]={'$like':'%'+_0x17c0a5[_0xa0e6('0x2e')][_0xa0e6('0x3c')]+'%'};return _0x541e0d;}})});}_0x51c173=_[_0xa0e6('0x3a')]({},_0x51c173,_0x17c0a5[_0xa0e6('0x3d')]);var _0x3127a8={'where':_0x51c173[_0xa0e6('0x38')]};return db[_0xa0e6('0x28')]['count'](_0x3127a8)[_0xa0e6('0x20')](function(_0x10964d){_0x12185c[_0xa0e6('0x1b')]=_0x10964d;if(_0x17c0a5[_0xa0e6('0x2e')]['includeAll']){_0x51c173['include']=[{'all':!![]}];}return db[_0xa0e6('0x28')][_0xa0e6('0x3e')](_0x51c173);})[_0xa0e6('0x20')](function(_0x11b884){_0x12185c[_0xa0e6('0x3f')]=_0x11b884;return _0x12185c;})[_0xa0e6('0x20')](respondWithFilteredResult(_0x2a5d3c,_0x51c173))['catch'](handleError(_0x2a5d3c,null));};exports[_0xa0e6('0x40')]=function(_0x5db983,_0x3bebb2){var _0x3c3dc7={'raw':!![],'where':{'id':_0x5db983[_0xa0e6('0x41')]['id']}},_0x1b2195={};_0x1b2195[_0xa0e6('0x2d')]=_[_0xa0e6('0x42')](db[_0xa0e6('0x28')][_0xa0e6('0x29')]);_0x1b2195[_0xa0e6('0x2e')]=_[_0xa0e6('0x42')](_0x5db983[_0xa0e6('0x2e')]);_0x1b2195[_0xa0e6('0x2f')]=_['intersection'](_0x1b2195[_0xa0e6('0x2d')],_0x1b2195[_0xa0e6('0x2e')]);_0x3c3dc7[_0xa0e6('0x31')]=_[_0xa0e6('0x30')](_0x1b2195[_0xa0e6('0x2d')],qs['fields'](_0x5db983[_0xa0e6('0x2e')][_0xa0e6('0x32')]));_0x3c3dc7[_0xa0e6('0x31')]=_0x3c3dc7[_0xa0e6('0x31')][_0xa0e6('0x33')]?_0x3c3dc7[_0xa0e6('0x31')]:_0x1b2195[_0xa0e6('0x2d')];if(_0x5db983[_0xa0e6('0x2e')][_0xa0e6('0x43')]){_0x3c3dc7[_0xa0e6('0x44')]=[{'all':!![]}];}_0x3c3dc7=_[_0xa0e6('0x3a')]({},_0x3c3dc7,_0x5db983['options']);return db['DeskField'][_0xa0e6('0x45')](_0x3c3dc7)[_0xa0e6('0x20')](handleEntityNotFound(_0x3bebb2,null))[_0xa0e6('0x20')](respondWithResult(_0x3bebb2,null))[_0xa0e6('0x46')](handleError(_0x3bebb2,null));};exports['create']=function(_0x8987a0,_0x3cf8d1){return db[_0xa0e6('0x28')][_0xa0e6('0x47')](_0x8987a0['body'],{})['then'](respondWithResult(_0x3cf8d1,0xc9))[_0xa0e6('0x46')](handleError(_0x3cf8d1,null));};exports['update']=function(_0x356a2d,_0x3e2a28){if(_0x356a2d['body']['id']){delete _0x356a2d[_0xa0e6('0x48')]['id'];}return db['DeskField'][_0xa0e6('0x45')]({'where':{'id':_0x356a2d[_0xa0e6('0x41')]['id']}})['then'](handleEntityNotFound(_0x3e2a28,null))[_0xa0e6('0x20')](saveUpdates(_0x356a2d[_0xa0e6('0x48')],null))[_0xa0e6('0x20')](respondWithResult(_0x3e2a28,null))[_0xa0e6('0x46')](handleError(_0x3e2a28,null));};exports[_0xa0e6('0x21')]=function(_0x11a924,_0x1745ea){return db[_0xa0e6('0x28')][_0xa0e6('0x45')]({'where':{'id':_0x11a924[_0xa0e6('0x41')]['id']}})[_0xa0e6('0x20')](handleEntityNotFound(_0x1745ea,null))[_0xa0e6('0x20')](removeEntity(_0x1745ea,null))['catch'](handleError(_0x1745ea,null));}; \ No newline at end of file +var _0x9541=['attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','includeAll','findAll','show','params','length','include','options','find','catch','create','body','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','end','status','offset','undefined','limit','count','set','Content-Range','json','apply','reject','save','update','then','destroy','sendStatus','stack','name','send','index','map','DeskField','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection'];(function(_0x2ec04e,_0x53e8c1){var _0x4a546a=function(_0x4a00d6){while(--_0x4a00d6){_0x2ec04e['push'](_0x2ec04e['shift']());}};_0x4a546a(++_0x53e8c1);}(_0x9541,0xb3));var _0x1954=function(_0x258555,_0x18ca7a){_0x258555=_0x258555-0x0;var _0x4f4171=_0x9541[_0x258555];return _0x4f4171;};'use strict';var emlformat=require(_0x1954('0x0'));var rimraf=require(_0x1954('0x1'));var zipdir=require(_0x1954('0x2'));var jsonpatch=require(_0x1954('0x3'));var rp=require(_0x1954('0x4'));var moment=require(_0x1954('0x5'));var BPromise=require(_0x1954('0x6'));var Mustache=require(_0x1954('0x7'));var util=require('util');var path=require('path');var sox=require(_0x1954('0x8'));var csv=require(_0x1954('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x1954('0xa'));var _=require(_0x1954('0xb'));var squel=require(_0x1954('0xc'));var crypto=require(_0x1954('0xd'));var jsforce=require(_0x1954('0xe'));var deskjs=require(_0x1954('0xf'));var toCsv=require('to-csv');var querystring=require(_0x1954('0x10'));var Papa=require(_0x1954('0x11'));var Redis=require(_0x1954('0x12'));var authService=require(_0x1954('0x13'));var qs=require(_0x1954('0x14'));var as=require(_0x1954('0x15'));var hardwareService=require(_0x1954('0x16'));var logger=require(_0x1954('0x17'))('api');var utils=require(_0x1954('0x18'));var config=require(_0x1954('0x19'));var licenseUtil=require('../../config/license/util');var db=require(_0x1954('0x1a'))['db'];function respondWithStatusCode(_0x5e8400,_0x289155){_0x289155=_0x289155||0xcc;return function(_0x4dc96b){if(_0x4dc96b){return _0x5e8400['sendStatus'](_0x289155);}return _0x5e8400['status'](_0x289155)[_0x1954('0x1b')]();};}function respondWithResult(_0x1b33cb,_0x96906a){_0x96906a=_0x96906a||0xc8;return function(_0x520dc7){if(_0x520dc7){return _0x1b33cb[_0x1954('0x1c')](_0x96906a)['json'](_0x520dc7);}};}function respondWithFilteredResult(_0x5daee1,_0xaeb0e3){return function(_0xf43d28){if(_0xf43d28){var _0x36565c=typeof _0xaeb0e3[_0x1954('0x1d')]===_0x1954('0x1e')&&typeof _0xaeb0e3[_0x1954('0x1f')]===_0x1954('0x1e');var _0x46b400=_0xf43d28[_0x1954('0x20')];var _0xb9c2cd=_0x36565c?0x0:_0xaeb0e3[_0x1954('0x1d')];var _0x3da757=_0x36565c?_0xf43d28[_0x1954('0x20')]:_0xaeb0e3[_0x1954('0x1d')]+_0xaeb0e3[_0x1954('0x1f')];var _0x4503d7;if(_0x3da757>=_0x46b400){_0x3da757=_0x46b400;_0x4503d7=0xc8;}else{_0x4503d7=0xce;}_0x5daee1[_0x1954('0x1c')](_0x4503d7);return _0x5daee1[_0x1954('0x21')](_0x1954('0x22'),_0xb9c2cd+'-'+_0x3da757+'/'+_0x46b400)[_0x1954('0x23')](_0xf43d28);}return null;};}function patchUpdates(_0x5e20b8){return function(_0x2105d5){try{jsonpatch[_0x1954('0x24')](_0x2105d5,_0x5e20b8,!![]);}catch(_0x3a84c0){return BPromise[_0x1954('0x25')](_0x3a84c0);}return _0x2105d5[_0x1954('0x26')]();};}function saveUpdates(_0x5e549f,_0x61107d){return function(_0x15dd0b){if(_0x15dd0b){return _0x15dd0b[_0x1954('0x27')](_0x5e549f)[_0x1954('0x28')](function(_0x6d8a2){return _0x6d8a2;});}return null;};}function removeEntity(_0x5a7256,_0x4d1b25){return function(_0x18a883){if(_0x18a883){return _0x18a883[_0x1954('0x29')]()[_0x1954('0x28')](function(){_0x5a7256[_0x1954('0x1c')](0xcc)['end']();});}};}function handleEntityNotFound(_0x21f395,_0x26484f){return function(_0x27dc66){if(!_0x27dc66){_0x21f395[_0x1954('0x2a')](0x194);}return _0x27dc66;};}function handleError(_0x3f06de,_0x1bfa18){_0x1bfa18=_0x1bfa18||0x1f4;return function(_0x46fdc1){logger['error'](_0x46fdc1[_0x1954('0x2b')]);if(_0x46fdc1[_0x1954('0x2c')]){delete _0x46fdc1['name'];}_0x3f06de[_0x1954('0x1c')](_0x1bfa18)[_0x1954('0x2d')](_0x46fdc1);};}exports[_0x1954('0x2e')]=function(_0x3a488b,_0x1d8f32){var _0x251386={},_0x41b143={},_0x41c850={'count':0x0,'rows':[]};var _0xde7055=_[_0x1954('0x2f')](db[_0x1954('0x30')][_0x1954('0x31')],function(_0x40da25){return{'name':_0x40da25[_0x1954('0x32')],'type':_0x40da25[_0x1954('0x33')][_0x1954('0x34')]};});_0x41b143[_0x1954('0x35')]=_[_0x1954('0x2f')](_0xde7055,_0x1954('0x2c'));_0x41b143[_0x1954('0x36')]=_[_0x1954('0x37')](_0x3a488b[_0x1954('0x36')]);_0x41b143[_0x1954('0x38')]=_[_0x1954('0x39')](_0x41b143['model'],_0x41b143['query']);_0x251386[_0x1954('0x3a')]=_['intersection'](_0x41b143[_0x1954('0x35')],qs[_0x1954('0x3b')](_0x3a488b['query'][_0x1954('0x3b')]));_0x251386[_0x1954('0x3a')]=_0x251386['attributes']['length']?_0x251386[_0x1954('0x3a')]:_0x41b143[_0x1954('0x35')];if(!_0x3a488b[_0x1954('0x36')][_0x1954('0x3c')](_0x1954('0x3d'))){_0x251386[_0x1954('0x1f')]=qs[_0x1954('0x1f')](_0x3a488b['query']['limit']);_0x251386[_0x1954('0x1d')]=qs[_0x1954('0x1d')](_0x3a488b[_0x1954('0x36')][_0x1954('0x1d')]);}_0x251386[_0x1954('0x3e')]=qs[_0x1954('0x3f')](_0x3a488b['query'][_0x1954('0x3f')]);_0x251386[_0x1954('0x40')]=qs['filters'](_[_0x1954('0x41')](_0x3a488b[_0x1954('0x36')],_0x41b143['filters']),_0xde7055);if(_0x3a488b['query'][_0x1954('0x42')]){_0x251386[_0x1954('0x40')]=_['merge'](_0x251386[_0x1954('0x40')],{'$or':_[_0x1954('0x2f')](_0xde7055,function(_0x13725c){if(_0x13725c[_0x1954('0x33')]!=='VIRTUAL'){var _0x339b28={};_0x339b28[_0x13725c['name']]={'$like':'%'+_0x3a488b[_0x1954('0x36')][_0x1954('0x42')]+'%'};return _0x339b28;}})});}_0x251386=_[_0x1954('0x43')]({},_0x251386,_0x3a488b['options']);var _0x1c2f3={'where':_0x251386[_0x1954('0x40')]};return db[_0x1954('0x30')][_0x1954('0x20')](_0x1c2f3)[_0x1954('0x28')](function(_0x517492){_0x41c850[_0x1954('0x20')]=_0x517492;if(_0x3a488b['query'][_0x1954('0x44')]){_0x251386['include']=[{'all':!![]}];}return db[_0x1954('0x30')][_0x1954('0x45')](_0x251386);})[_0x1954('0x28')](function(_0x4334f9){_0x41c850['rows']=_0x4334f9;return _0x41c850;})[_0x1954('0x28')](respondWithFilteredResult(_0x1d8f32,_0x251386))['catch'](handleError(_0x1d8f32,null));};exports[_0x1954('0x46')]=function(_0x1435d6,_0x59c4cb){var _0x1dede8={'raw':!![],'where':{'id':_0x1435d6[_0x1954('0x47')]['id']}},_0x45f70e={};_0x45f70e[_0x1954('0x35')]=_[_0x1954('0x37')](db[_0x1954('0x30')][_0x1954('0x31')]);_0x45f70e[_0x1954('0x36')]=_[_0x1954('0x37')](_0x1435d6['query']);_0x45f70e['filters']=_['intersection'](_0x45f70e[_0x1954('0x35')],_0x45f70e['query']);_0x1dede8[_0x1954('0x3a')]=_[_0x1954('0x39')](_0x45f70e[_0x1954('0x35')],qs[_0x1954('0x3b')](_0x1435d6[_0x1954('0x36')][_0x1954('0x3b')]));_0x1dede8[_0x1954('0x3a')]=_0x1dede8[_0x1954('0x3a')][_0x1954('0x48')]?_0x1dede8['attributes']:_0x45f70e['model'];if(_0x1435d6[_0x1954('0x36')]['includeAll']){_0x1dede8[_0x1954('0x49')]=[{'all':!![]}];}_0x1dede8=_['merge']({},_0x1dede8,_0x1435d6[_0x1954('0x4a')]);return db[_0x1954('0x30')][_0x1954('0x4b')](_0x1dede8)[_0x1954('0x28')](handleEntityNotFound(_0x59c4cb,null))[_0x1954('0x28')](respondWithResult(_0x59c4cb,null))[_0x1954('0x4c')](handleError(_0x59c4cb,null));};exports[_0x1954('0x4d')]=function(_0x15ff45,_0x15295e){return db[_0x1954('0x30')]['create'](_0x15ff45[_0x1954('0x4e')],{})[_0x1954('0x28')](respondWithResult(_0x15295e,0xc9))[_0x1954('0x4c')](handleError(_0x15295e,null));};exports[_0x1954('0x27')]=function(_0x510b62,_0x1cd2dd){if(_0x510b62[_0x1954('0x4e')]['id']){delete _0x510b62['body']['id'];}return db[_0x1954('0x30')]['find']({'where':{'id':_0x510b62[_0x1954('0x47')]['id']}})[_0x1954('0x28')](handleEntityNotFound(_0x1cd2dd,null))[_0x1954('0x28')](saveUpdates(_0x510b62[_0x1954('0x4e')],null))[_0x1954('0x28')](respondWithResult(_0x1cd2dd,null))[_0x1954('0x4c')](handleError(_0x1cd2dd,null));};exports[_0x1954('0x29')]=function(_0x49003e,_0x1b4557){return db['DeskField'][_0x1954('0x4b')]({'where':{'id':_0x49003e[_0x1954('0x47')]['id']}})[_0x1954('0x28')](handleEntityNotFound(_0x1b4557,null))['then'](removeEntity(_0x1b4557,null))[_0x1954('0x4c')](handleError(_0x1b4557,null));}; \ No newline at end of file diff --git a/server/api/intDeskField/intDeskField.model.js b/server/api/intDeskField/intDeskField.model.js index 66ba685..772383c 100644 --- a/server/api/intDeskField/intDeskField.model.js +++ b/server/api/intDeskField/intDeskField.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4e3a=['./intDeskField.attributes','exports','define','int_desk_fields','desk_unique_index','FieldId','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x24781a,_0x3f8afb){var _0x1a2e66=function(_0x3d1517){while(--_0x3d1517){_0x24781a['push'](_0x24781a['shift']());}};_0x1a2e66(++_0x3f8afb);}(_0x4e3a,0x114));var _0xa4e3=function(_0x8a969d,_0x339d9f){_0x8a969d=_0x8a969d-0x0;var _0x1d8dc7=_0x4e3a[_0x8a969d];return _0x1d8dc7;};'use strict';var _=require('lodash');var util=require(_0xa4e3('0x0'));var logger=require(_0xa4e3('0x1'))(_0xa4e3('0x2'));var moment=require(_0xa4e3('0x3'));var BPromise=require(_0xa4e3('0x4'));var rp=require(_0xa4e3('0x5'));var fs=require('fs');var path=require(_0xa4e3('0x6'));var rimraf=require(_0xa4e3('0x7'));var config=require(_0xa4e3('0x8'));var attributes=require(_0xa4e3('0x9'));module[_0xa4e3('0xa')]=function(_0x3932ea,_0x3d2e70){return _0x3932ea[_0xa4e3('0xb')]('DeskField',attributes,{'tableName':_0xa4e3('0xc'),'paranoid':![],'indexes':[{'name':_0xa4e3('0xd'),'fields':['idField',_0xa4e3('0xe')],'unique':!![]}],'timestamps':!![]});}; \ No newline at end of file +var _0xa962=['int_desk_fields','desk_unique_index','idField','lodash','util','api','moment','request-promise','path','../../config/environment','./intDeskField.attributes','exports','define','DeskField'];(function(_0x590455,_0x338a42){var _0x1b5a98=function(_0x29f08c){while(--_0x29f08c){_0x590455['push'](_0x590455['shift']());}};_0x1b5a98(++_0x338a42);}(_0xa962,0xf1));var _0x2a96=function(_0x4f345d,_0x22f2ea){_0x4f345d=_0x4f345d-0x0;var _0x4e75d5=_0xa962[_0x4f345d];return _0x4e75d5;};'use strict';var _=require(_0x2a96('0x0'));var util=require(_0x2a96('0x1'));var logger=require('../../config/logger')(_0x2a96('0x2'));var moment=require(_0x2a96('0x3'));var BPromise=require('bluebird');var rp=require(_0x2a96('0x4'));var fs=require('fs');var path=require(_0x2a96('0x5'));var rimraf=require('rimraf');var config=require(_0x2a96('0x6'));var attributes=require(_0x2a96('0x7'));module[_0x2a96('0x8')]=function(_0xdfc210,_0x441f6a){return _0xdfc210[_0x2a96('0x9')](_0x2a96('0xa'),attributes,{'tableName':_0x2a96('0xb'),'paranoid':![],'indexes':[{'name':_0x2a96('0xc'),'fields':[_0x2a96('0xd'),'FieldId'],'unique':!![]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intDeskField/intDeskField.rpc.js b/server/api/intDeskField/intDeskField.rpc.js index 7796095..a58b676 100644 --- a/server/api/intDeskField/intDeskField.rpc.js +++ b/server/api/intDeskField/intDeskField.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1ffa=['bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','DeskField,\x20%s,\x20%s','request\x20sent','debug','DeskField,\x20%s,\x20%s,\x20%s','error','message','catch','lodash','moment'];(function(_0x42b163,_0x25df96){var _0x26273a=function(_0x57b9ab){while(--_0x57b9ab){_0x42b163['push'](_0x42b163['shift']());}};_0x26273a(++_0x25df96);}(_0x1ffa,0xae));var _0xa1ff=function(_0x30ed28,_0x36a6c8){_0x30ed28=_0x30ed28-0x0;var _0xf9d71a=_0x1ffa[_0x30ed28];return _0xf9d71a;};'use strict';var _=require(_0xa1ff('0x0'));var util=require('util');var moment=require(_0xa1ff('0x1'));var BPromise=require(_0xa1ff('0x2'));var rs=require(_0xa1ff('0x3'));var fs=require('fs');var Redis=require(_0xa1ff('0x4'));var db=require(_0xa1ff('0x5'))['db'];var utils=require(_0xa1ff('0x6'));var logger=require(_0xa1ff('0x7'))(_0xa1ff('0x8'));var config=require(_0xa1ff('0x9'));var jayson=require(_0xa1ff('0xa'));var client=jayson[_0xa1ff('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x3379f5,_0x3864ed,_0x1cd4ce){return new BPromise(function(_0xb7c02,_0x113e3c){return client[_0xa1ff('0xc')](_0x3379f5,_0x1cd4ce)[_0xa1ff('0xd')](function(_0x3a75d4){logger[_0xa1ff('0xe')](_0xa1ff('0xf'),_0x3864ed,_0xa1ff('0x10'));logger[_0xa1ff('0x11')](_0xa1ff('0x12'),_0x3864ed,_0xa1ff('0x10'),JSON['stringify'](_0x3a75d4));if(_0x3a75d4['error']){if(_0x3a75d4[_0xa1ff('0x13')]['code']===0x1f4){logger['error'](_0xa1ff('0xf'),_0x3864ed,_0x3a75d4[_0xa1ff('0x13')]['message']);return _0x113e3c(_0x3a75d4[_0xa1ff('0x13')][_0xa1ff('0x14')]);}logger[_0xa1ff('0x13')](_0xa1ff('0xf'),_0x3864ed,_0x3a75d4[_0xa1ff('0x13')]['message']);return _0xb7c02(_0x3a75d4[_0xa1ff('0x13')][_0xa1ff('0x14')]);}else{logger[_0xa1ff('0xe')](_0xa1ff('0xf'),_0x3864ed,_0xa1ff('0x10'));_0xb7c02(_0x3a75d4['result'][_0xa1ff('0x14')]);}})[_0xa1ff('0x15')](function(_0x1c966d){logger[_0xa1ff('0x13')]('DeskField,\x20%s,\x20%s',_0x3864ed,_0x1c966d);_0x113e3c(_0x1c966d);});});} \ No newline at end of file +var _0x9062=['../../config/environment','jayson/promise','http','request','then','info','request\x20sent','debug','DeskField,\x20%s,\x20%s,\x20%s','stringify','error','code','DeskField,\x20%s,\x20%s','message','result','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','rpc'];(function(_0x47db8e,_0x27ecfa){var _0x477c02=function(_0x397c37){while(--_0x397c37){_0x47db8e['push'](_0x47db8e['shift']());}};_0x477c02(++_0x27ecfa);}(_0x9062,0xd0));var _0x2906=function(_0x4b2db1,_0x5060ba){_0x4b2db1=_0x4b2db1-0x0;var _0x2af851=_0x9062[_0x4b2db1];return _0x2af851;};'use strict';var _=require(_0x2906('0x0'));var util=require(_0x2906('0x1'));var moment=require(_0x2906('0x2'));var BPromise=require('bluebird');var rs=require(_0x2906('0x3'));var fs=require('fs');var Redis=require(_0x2906('0x4'));var db=require(_0x2906('0x5'))['db'];var utils=require(_0x2906('0x6'));var logger=require('../../config/logger')(_0x2906('0x7'));var config=require(_0x2906('0x8'));var jayson=require(_0x2906('0x9'));var client=jayson['client'][_0x2906('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x497b31,_0x53621f,_0x2a1fde){return new BPromise(function(_0x1832c7,_0x375cb7){return client[_0x2906('0xb')](_0x497b31,_0x2a1fde)[_0x2906('0xc')](function(_0xd7c3b3){logger[_0x2906('0xd')]('DeskField,\x20%s,\x20%s',_0x53621f,_0x2906('0xe'));logger[_0x2906('0xf')](_0x2906('0x10'),_0x53621f,'request\x20sent',JSON[_0x2906('0x11')](_0xd7c3b3));if(_0xd7c3b3[_0x2906('0x12')]){if(_0xd7c3b3['error'][_0x2906('0x13')]===0x1f4){logger['error'](_0x2906('0x14'),_0x53621f,_0xd7c3b3[_0x2906('0x12')][_0x2906('0x15')]);return _0x375cb7(_0xd7c3b3[_0x2906('0x12')][_0x2906('0x15')]);}logger['error'](_0x2906('0x14'),_0x53621f,_0xd7c3b3[_0x2906('0x12')][_0x2906('0x15')]);return _0x1832c7(_0xd7c3b3['error'][_0x2906('0x15')]);}else{logger[_0x2906('0xd')](_0x2906('0x14'),_0x53621f,_0x2906('0xe'));_0x1832c7(_0xd7c3b3[_0x2906('0x16')][_0x2906('0x15')]);}})[_0x2906('0x17')](function(_0x3faba5){logger[_0x2906('0x12')](_0x2906('0x14'),_0x53621f,_0x3faba5);_0x375cb7(_0x3faba5);});});} \ No newline at end of file diff --git a/server/api/intDynamics365Account/index.js b/server/api/intDynamics365Account/index.js index a1e8c84..09c7d8d 100644 --- a/server/api/intDynamics365Account/index.js +++ b/server/api/intDynamics365Account/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x02bf=['get','isAuthenticated','index','show','getConfigurations','post','create','/:id/configurations','addConfiguration','/:id','delete','destroy','multer','path','express','fs-extra','../../components/auth/service','../../components/interaction/service'];(function(_0x5cbab1,_0x32afac){var _0x2637f4=function(_0x47abed){while(--_0x47abed){_0x5cbab1['push'](_0x5cbab1['shift']());}};_0x2637f4(++_0x32afac);}(_0x02bf,0xd2));var _0xf02b=function(_0x12a2a6,_0x374ff1){_0x12a2a6=_0x12a2a6-0x0;var _0x1754ae=_0x02bf[_0x12a2a6];return _0x1754ae;};'use strict';var multer=require(_0xf02b('0x0'));var util=require('util');var path=require(_0xf02b('0x1'));var timeout=require('connect-timeout');var express=require(_0xf02b('0x2'));var router=express['Router']();var fs_extra=require(_0xf02b('0x3'));var auth=require(_0xf02b('0x4'));var interaction=require(_0xf02b('0x5'));var config=require('../../config/environment');var controller=require('./intDynamics365Account.controller');router[_0xf02b('0x6')]('/',auth[_0xf02b('0x7')](),controller[_0xf02b('0x8')]);router[_0xf02b('0x6')]('/:id',auth['isAuthenticated'](),controller[_0xf02b('0x9')]);router[_0xf02b('0x6')]('/:id/configurations',auth['isAuthenticated'](),controller[_0xf02b('0xa')]);router[_0xf02b('0x6')]('/:id/fields',auth[_0xf02b('0x7')](),controller['getFields']);router[_0xf02b('0xb')]('/',auth[_0xf02b('0x7')](),controller[_0xf02b('0xc')]);router[_0xf02b('0xb')](_0xf02b('0xd'),auth[_0xf02b('0x7')](),controller[_0xf02b('0xe')]);router['put'](_0xf02b('0xf'),auth[_0xf02b('0x7')](),controller['update']);router[_0xf02b('0x10')](_0xf02b('0xf'),auth[_0xf02b('0x7')](),controller[_0xf02b('0x11')]);module['exports']=router; \ No newline at end of file +var _0x05be=['create','/:id/configurations','addConfiguration','put','update','delete','destroy','exports','multer','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','index','/:id','isAuthenticated','getConfigurations','/:id/fields','getFields','post'];(function(_0x354ab1,_0xec5b21){var _0x9918a1=function(_0x1becca){while(--_0x1becca){_0x354ab1['push'](_0x354ab1['shift']());}};_0x9918a1(++_0xec5b21);}(_0x05be,0x1ca));var _0xe05b=function(_0x3fc298,_0x253a12){_0x3fc298=_0x3fc298-0x0;var _0xd23ba5=_0x05be[_0x3fc298];return _0xd23ba5;};'use strict';var multer=require(_0xe05b('0x0'));var util=require(_0xe05b('0x1'));var path=require('path');var timeout=require(_0xe05b('0x2'));var express=require(_0xe05b('0x3'));var router=express[_0xe05b('0x4')]();var fs_extra=require(_0xe05b('0x5'));var auth=require(_0xe05b('0x6'));var interaction=require(_0xe05b('0x7'));var config=require(_0xe05b('0x8'));var controller=require('./intDynamics365Account.controller');router[_0xe05b('0x9')]('/',auth['isAuthenticated'](),controller[_0xe05b('0xa')]);router[_0xe05b('0x9')](_0xe05b('0xb'),auth[_0xe05b('0xc')](),controller['show']);router[_0xe05b('0x9')]('/:id/configurations',auth[_0xe05b('0xc')](),controller[_0xe05b('0xd')]);router['get'](_0xe05b('0xe'),auth[_0xe05b('0xc')](),controller[_0xe05b('0xf')]);router[_0xe05b('0x10')]('/',auth['isAuthenticated'](),controller[_0xe05b('0x11')]);router[_0xe05b('0x10')](_0xe05b('0x12'),auth[_0xe05b('0xc')](),controller[_0xe05b('0x13')]);router[_0xe05b('0x14')](_0xe05b('0xb'),auth[_0xe05b('0xc')](),controller[_0xe05b('0x15')]);router[_0xe05b('0x16')]('/:id',auth[_0xe05b('0xc')](),controller[_0xe05b('0x17')]);module[_0xe05b('0x18')]=router; \ No newline at end of file diff --git a/server/api/intDynamics365Account/intDynamics365Account.attributes.js b/server/api/intDynamics365Account/intDynamics365Account.attributes.js index c759229..86ebbb4 100644 --- a/server/api/intDynamics365Account/intDynamics365Account.attributes.js +++ b/server/api/intDynamics365Account/intDynamics365Account.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xde09=['STRING','sequelize'];(function(_0x46849c,_0x3f4e0b){var _0x3df997=function(_0x8335a1){while(--_0x8335a1){_0x46849c['push'](_0x46849c['shift']());}};_0x3df997(++_0x3f4e0b);}(_0xde09,0x1c5));var _0x9de0=function(_0x40a045,_0x516f0e){_0x40a045=_0x40a045-0x0;var _0x1a687c=_0xde09[_0x40a045];return _0x1a687c;};'use strict';var Sequelize=require(_0x9de0('0x0'));module['exports']={'name':{'type':Sequelize[_0x9de0('0x1')]},'username':{'type':Sequelize[_0x9de0('0x1')]},'password':{'type':Sequelize[_0x9de0('0x1')]},'remoteUri':{'type':Sequelize['STRING']},'tenantId':{'type':Sequelize['STRING']},'clientId':{'type':Sequelize[_0x9de0('0x1')]},'clientSecret':{'type':Sequelize[_0x9de0('0x1')]},'serverUrl':{'type':Sequelize[_0x9de0('0x1')],'allowNull':![]},'description':{'type':Sequelize[_0x9de0('0x1')]}}; \ No newline at end of file +var _0xafd0=['exports','STRING'];(function(_0x5aa99f,_0x2a3912){var _0x3727a7=function(_0x4bc46b){while(--_0x4bc46b){_0x5aa99f['push'](_0x5aa99f['shift']());}};_0x3727a7(++_0x2a3912);}(_0xafd0,0x70));var _0x0afd=function(_0x5f1391,_0x19c132){_0x5f1391=_0x5f1391-0x0;var _0x50ebe3=_0xafd0[_0x5f1391];return _0x50ebe3;};'use strict';var Sequelize=require('sequelize');module[_0x0afd('0x0')]={'name':{'type':Sequelize['STRING']},'username':{'type':Sequelize['STRING']},'password':{'type':Sequelize[_0x0afd('0x1')]},'remoteUri':{'type':Sequelize[_0x0afd('0x1')]},'tenantId':{'type':Sequelize[_0x0afd('0x1')]},'clientId':{'type':Sequelize[_0x0afd('0x1')]},'clientSecret':{'type':Sequelize[_0x0afd('0x1')]},'serverUrl':{'type':Sequelize['STRING'],'allowNull':![]},'description':{'type':Sequelize['STRING']}}; \ No newline at end of file diff --git a/server/api/intDynamics365Account/intDynamics365Account.controller.js b/server/api/intDynamics365Account/intDynamics365Account.controller.js index e029691..a3aa029 100644 --- a/server/api/intDynamics365Account/intDynamics365Account.controller.js +++ b/server/api/intDynamics365Account/intDynamics365Account.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3f53=['productserialnumber','resolveby','resolvebykpiidname','responseby','responsiblecontactidname','responsiblecontactidyominame','slainvokedidname','slaname','socialprofileidname','statecode','statuscode','subjectidname','ticketnumber','timezoneruleversionnumber','utcconversiontimezonecode','versionnumber','concat','password','remoteUri','tenantId','clientId','slice','substring','%s/api/data/v9.0/','/oauth2/token','EntityDefinitions?$select=DisplayName,EntitySetName&$filter=SchemaName\x20eq\x20\x27','Bearer\x20','4.0','value','MetadataId','GET',')?$select=LogicalName&$expand=Attributes($select=LogicalName)','includes','LogicalName','forEach','@odata.type','lastIndexOf','push','all','isNil','BooleanAttributeMetadata','StringAttributeMetadata','DoubleAttributeMetadata','BigIntAttributeMetadata','MemoAttributeMetadata','StatusAttributeMetadata','StateAttributeMetadata','DecimalAttributeMetadata','test','statusCode','send','Wrong\x20credentials',')/Attributes(',')/Microsoft.Dynamics.CRM.PicklistAttributeMetadata?','OptionSet','Options','UserLocalizedLabel','Value','DisplayName','Label',')/Microsoft.Dynamics.CRM.BooleanAttributeMetadata?$select=DisplayName,LogicalName&$expand=OptionSet($select=FalseOption,\x20TrueOption)','TrueOption','true','FalseOption','false','EntityDefinitions(',')/Microsoft.Dynamics.CRM.','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','fs-extra','lodash','squel','desk.js','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/environment','../../mysqldb','../../components/integrations/configuration','jayson/promise','client','http','then','info','Dynamics365Account,\x20%s,\x20%s','request\x20sent','Dynamics365Account,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','status','end','json','undefined','limit','count','offset','set','Content-Range','apply','destroy','sendStatus','stack','name','index','Dynamics365Account','rawAttributes','fieldName','type','key','model','map','query','keys','filters','intersection','attributes','fields','length','nolimit','order','sort','pick','filter','where','merge','VIRTUAL','includeAll','include','findAll','show','params','options','find','create','update','body','Dynamics365Configuration','getConfigurations','addConfiguration','findOne','AccountId','Subjects','getSubjects','Descriptions','getDescriptions','channel','Dynamics365Field','getFields','ticketType','incident','Incident','PhoneCall','title','description','customerid','ownerid','caseorigincode','subject','phonenumber','directioncode','accountidyominame','actualserviceunits','billedserviceunits','contactidname','contactidyominame','contractdetailidname','createdbyexternalpartyname','createdbyexternalpartyyominame','createdbyname','createdbyyominame','createdon','customeridname','customeridyominame','emailaddress','entityimage_timestamp','escalatedon','exchangerate','followupby','importsequencenumber','influencescore','kbarticleidname','masteridname','modifiedbyexternalpartyyominame','modifiedbyname','modifiedbyyominame','modifiedon','modifiedonbehalfbyname','modifiedonbehalfbyyominame','msdyn_incidenttypename','msdyn_iotalertname','onholdtime','overriddencreatedon','owneridname','owneridtype','owneridyominame','parentcaseidname','primarycontactidyominame','prioritycodename'];(function(_0x1bb01d,_0x26dcaa){var _0x2ad339=function(_0x37b55c){while(--_0x37b55c){_0x1bb01d['push'](_0x1bb01d['shift']());}};_0x2ad339(++_0x26dcaa);}(_0x3f53,0x117));var _0x33f5=function(_0x5819db,_0x89d060){_0x5819db=_0x5819db-0x0;var _0x1c970d=_0x3f53[_0x5819db];return _0x1c970d;};'use strict';var emlformat=require(_0x33f5('0x0'));var rimraf=require(_0x33f5('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x33f5('0x2'));var rp=require(_0x33f5('0x3'));var moment=require(_0x33f5('0x4'));var BPromise=require(_0x33f5('0x5'));var Mustache=require('mustache');var util=require(_0x33f5('0x6'));var path=require(_0x33f5('0x7'));var sox=require(_0x33f5('0x8'));var csv=require(_0x33f5('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x33f5('0xa'));var _=require(_0x33f5('0xb'));var squel=require(_0x33f5('0xc'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x33f5('0xd'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x33f5('0xe'));var Redis=require(_0x33f5('0xf'));var authService=require('../../components/auth/service');var qs=require(_0x33f5('0x10'));var as=require(_0x33f5('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x33f5('0x12'))(_0x33f5('0x13'));var utils=require('../../config/utils');var config=require(_0x33f5('0x14'));var licenseUtil=require('../../config/license/util');var db=require(_0x33f5('0x15'))['db'];var integrations=require(_0x33f5('0x16'));var jayson=require(_0x33f5('0x17'));var client=jayson[_0x33f5('0x18')][_0x33f5('0x19')]({'port':0x232a});function respondWithRpcPromise(_0x30be02,_0xf99a87,_0x27f3f0,_0x888210){return new BPromise(function(_0x77ad4c,_0x320c19){var _0x8c217e=_0x888210||client;return _0x8c217e['request'](_0x30be02,_0x27f3f0)[_0x33f5('0x1a')](function(_0x3a16b2){logger[_0x33f5('0x1b')](_0x33f5('0x1c'),_0xf99a87,_0x33f5('0x1d'));logger['debug'](_0x33f5('0x1e'),_0xf99a87,_0x33f5('0x1d'),JSON[_0x33f5('0x1f')](_0x3a16b2));if(_0x3a16b2[_0x33f5('0x20')]){if(_0x3a16b2[_0x33f5('0x20')][_0x33f5('0x21')]===0x1f4){logger[_0x33f5('0x20')](_0x33f5('0x1c'),_0xf99a87,_0x3a16b2[_0x33f5('0x20')][_0x33f5('0x22')]);return _0x320c19(_0x3a16b2[_0x33f5('0x20')]['message']);}logger['error'](_0x33f5('0x1c'),_0xf99a87,_0x3a16b2[_0x33f5('0x20')][_0x33f5('0x22')]);return _0x77ad4c(_0x3a16b2[_0x33f5('0x20')][_0x33f5('0x22')]);}else{logger[_0x33f5('0x1b')](_0x33f5('0x1c'),_0xf99a87,'request\x20sent');_0x77ad4c(_0x3a16b2['result']['message']);}})[_0x33f5('0x23')](function(_0x58f7e4){logger[_0x33f5('0x20')](_0x33f5('0x1c'),_0xf99a87,_0x58f7e4);_0x320c19(_0x58f7e4);});});}function respondWithStatusCode(_0x505382,_0x138c6a){_0x138c6a=_0x138c6a||0xcc;return function(_0x576e3c){if(_0x576e3c){return _0x505382['sendStatus'](_0x138c6a);}return _0x505382[_0x33f5('0x24')](_0x138c6a)[_0x33f5('0x25')]();};}function respondWithResult(_0x2f07fc,_0x543e2b){_0x543e2b=_0x543e2b||0xc8;return function(_0x22793f){if(_0x22793f){return _0x2f07fc[_0x33f5('0x24')](_0x543e2b)[_0x33f5('0x26')](_0x22793f);}};}function respondWithFilteredResult(_0x4e4f7e,_0x104f99){return function(_0x3ef939){if(_0x3ef939){var _0x36bc8e=typeof _0x104f99['offset']===_0x33f5('0x27')&&typeof _0x104f99[_0x33f5('0x28')]==='undefined';var _0x4f6861=_0x3ef939[_0x33f5('0x29')];var _0xefc3ab=_0x36bc8e?0x0:_0x104f99[_0x33f5('0x2a')];var _0x3348b3=_0x36bc8e?_0x3ef939[_0x33f5('0x29')]:_0x104f99['offset']+_0x104f99['limit'];var _0xf7fabb;if(_0x3348b3>=_0x4f6861){_0x3348b3=_0x4f6861;_0xf7fabb=0xc8;}else{_0xf7fabb=0xce;}_0x4e4f7e[_0x33f5('0x24')](_0xf7fabb);return _0x4e4f7e[_0x33f5('0x2b')](_0x33f5('0x2c'),_0xefc3ab+'-'+_0x3348b3+'/'+_0x4f6861)[_0x33f5('0x26')](_0x3ef939);}return null;};}function patchUpdates(_0x227b24){return function(_0x1811be){try{jsonpatch[_0x33f5('0x2d')](_0x1811be,_0x227b24,!![]);}catch(_0x375db6){return BPromise['reject'](_0x375db6);}return _0x1811be['save']();};}function saveUpdates(_0x3e218c,_0x160eea){return function(_0x3f50fb){if(_0x3f50fb){return _0x3f50fb['update'](_0x3e218c)[_0x33f5('0x1a')](function(_0x461a32){return _0x461a32;});}return null;};}function removeEntity(_0x24cc65,_0x216a87){return function(_0x4a7456){if(_0x4a7456){return _0x4a7456[_0x33f5('0x2e')]()[_0x33f5('0x1a')](function(){_0x24cc65[_0x33f5('0x24')](0xcc)[_0x33f5('0x25')]();});}};}function handleEntityNotFound(_0x1c15d1,_0xeb479a){return function(_0x7f192b){if(!_0x7f192b){_0x1c15d1[_0x33f5('0x2f')](0x194);}return _0x7f192b;};}function handleError(_0xfad036,_0x309c43){_0x309c43=_0x309c43||0x1f4;return function(_0x2fcc63){logger[_0x33f5('0x20')](_0x2fcc63[_0x33f5('0x30')]);if(_0x2fcc63[_0x33f5('0x31')]){delete _0x2fcc63[_0x33f5('0x31')];}_0xfad036[_0x33f5('0x24')](_0x309c43)['send'](_0x2fcc63);};}exports[_0x33f5('0x32')]=function(_0x5e5443,_0x51a2f0){var _0x41e9bf={},_0x51483e={},_0x1672a7={'count':0x0,'rows':[]};var _0x530ba7=_['map'](db[_0x33f5('0x33')][_0x33f5('0x34')],function(_0x36077){return{'name':_0x36077[_0x33f5('0x35')],'type':_0x36077[_0x33f5('0x36')][_0x33f5('0x37')]};});_0x51483e[_0x33f5('0x38')]=_[_0x33f5('0x39')](_0x530ba7,'name');_0x51483e[_0x33f5('0x3a')]=_[_0x33f5('0x3b')](_0x5e5443[_0x33f5('0x3a')]);_0x51483e[_0x33f5('0x3c')]=_[_0x33f5('0x3d')](_0x51483e[_0x33f5('0x38')],_0x51483e['query']);_0x41e9bf[_0x33f5('0x3e')]=_['intersection'](_0x51483e[_0x33f5('0x38')],qs['fields'](_0x5e5443[_0x33f5('0x3a')][_0x33f5('0x3f')]));_0x41e9bf[_0x33f5('0x3e')]=_0x41e9bf[_0x33f5('0x3e')][_0x33f5('0x40')]?_0x41e9bf[_0x33f5('0x3e')]:_0x51483e[_0x33f5('0x38')];if(!_0x5e5443[_0x33f5('0x3a')]['hasOwnProperty'](_0x33f5('0x41'))){_0x41e9bf[_0x33f5('0x28')]=qs[_0x33f5('0x28')](_0x5e5443['query'][_0x33f5('0x28')]);_0x41e9bf[_0x33f5('0x2a')]=qs[_0x33f5('0x2a')](_0x5e5443[_0x33f5('0x3a')][_0x33f5('0x2a')]);}_0x41e9bf[_0x33f5('0x42')]=qs[_0x33f5('0x43')](_0x5e5443[_0x33f5('0x3a')][_0x33f5('0x43')]);_0x41e9bf['where']=qs[_0x33f5('0x3c')](_[_0x33f5('0x44')](_0x5e5443[_0x33f5('0x3a')],_0x51483e[_0x33f5('0x3c')]),_0x530ba7);if(_0x5e5443[_0x33f5('0x3a')][_0x33f5('0x45')]){_0x41e9bf[_0x33f5('0x46')]=_[_0x33f5('0x47')](_0x41e9bf[_0x33f5('0x46')],{'$or':_[_0x33f5('0x39')](_0x530ba7,function(_0x1e9225){if(_0x1e9225['type']!==_0x33f5('0x48')){var _0x7d1d08={};_0x7d1d08[_0x1e9225[_0x33f5('0x31')]]={'$like':'%'+_0x5e5443[_0x33f5('0x3a')]['filter']+'%'};return _0x7d1d08;}})});}_0x41e9bf=_[_0x33f5('0x47')]({},_0x41e9bf,_0x5e5443['options']);var _0x41a76a={'where':_0x41e9bf[_0x33f5('0x46')]};return db['Dynamics365Account'][_0x33f5('0x29')](_0x41a76a)[_0x33f5('0x1a')](function(_0xcd18d8){_0x1672a7[_0x33f5('0x29')]=_0xcd18d8;if(_0x5e5443['query'][_0x33f5('0x49')]){_0x41e9bf[_0x33f5('0x4a')]=[{'all':!![]}];}return db[_0x33f5('0x33')][_0x33f5('0x4b')](_0x41e9bf);})[_0x33f5('0x1a')](function(_0x2ef0b2){_0x1672a7['rows']=_0x2ef0b2;return _0x1672a7;})[_0x33f5('0x1a')](respondWithFilteredResult(_0x51a2f0,_0x41e9bf))[_0x33f5('0x23')](handleError(_0x51a2f0,null));};exports[_0x33f5('0x4c')]=function(_0x3f1317,_0x3882ef){var _0x33d35c={'raw':![],'where':{'id':_0x3f1317[_0x33f5('0x4d')]['id']}},_0x2457c6={};_0x2457c6[_0x33f5('0x38')]=_[_0x33f5('0x3b')](db[_0x33f5('0x33')][_0x33f5('0x34')]);_0x2457c6[_0x33f5('0x3a')]=_[_0x33f5('0x3b')](_0x3f1317[_0x33f5('0x3a')]);_0x2457c6['filters']=_[_0x33f5('0x3d')](_0x2457c6['model'],_0x2457c6[_0x33f5('0x3a')]);_0x33d35c[_0x33f5('0x3e')]=_[_0x33f5('0x3d')](_0x2457c6['model'],qs[_0x33f5('0x3f')](_0x3f1317['query'][_0x33f5('0x3f')]));_0x33d35c['attributes']=_0x33d35c[_0x33f5('0x3e')][_0x33f5('0x40')]?_0x33d35c[_0x33f5('0x3e')]:_0x2457c6[_0x33f5('0x38')];if(_0x3f1317['query'][_0x33f5('0x49')]){_0x33d35c[_0x33f5('0x4a')]=[{'all':!![]}];}_0x33d35c=_[_0x33f5('0x47')]({},_0x33d35c,_0x3f1317[_0x33f5('0x4e')]);return db[_0x33f5('0x33')][_0x33f5('0x4f')](_0x33d35c)[_0x33f5('0x1a')](handleEntityNotFound(_0x3882ef,null))[_0x33f5('0x1a')](respondWithResult(_0x3882ef,null))[_0x33f5('0x23')](handleError(_0x3882ef,null));};exports[_0x33f5('0x50')]=function(_0xb1552,_0x77750c){return db[_0x33f5('0x33')]['create'](_0xb1552['body'],{})['then'](respondWithResult(_0x77750c,0xc9))['catch'](handleError(_0x77750c,null));};exports[_0x33f5('0x51')]=function(_0x4e9389,_0x2b860){if(_0x4e9389[_0x33f5('0x52')]['id']){delete _0x4e9389['body']['id'];}return db[_0x33f5('0x33')][_0x33f5('0x4f')]({'where':{'id':_0x4e9389[_0x33f5('0x4d')]['id']}})['then'](handleEntityNotFound(_0x2b860,null))[_0x33f5('0x1a')](saveUpdates(_0x4e9389[_0x33f5('0x52')],null))[_0x33f5('0x1a')](respondWithResult(_0x2b860,null))['catch'](handleError(_0x2b860,null));};exports[_0x33f5('0x2e')]=function(_0x3960b2,_0x439686){return db[_0x33f5('0x33')][_0x33f5('0x4f')]({'where':{'id':_0x3960b2[_0x33f5('0x4d')]['id']}})[_0x33f5('0x1a')](handleEntityNotFound(_0x439686,null))[_0x33f5('0x1a')](removeEntity(_0x439686,null))[_0x33f5('0x23')](handleError(_0x439686,null));};exports['getConfigurations']=function(_0x194eb1,_0x4882ca,_0x6f28a8){var _0x59c551={};var _0x3bb3df={};var _0x2e754f;var _0x18a124;return db[_0x33f5('0x33')]['findOne']({'where':{'id':_0x194eb1[_0x33f5('0x4d')]['id']}})[_0x33f5('0x1a')](handleEntityNotFound(_0x4882ca,null))[_0x33f5('0x1a')](function(_0x58985f){if(_0x58985f){_0x2e754f=_0x58985f;_0x3bb3df[_0x33f5('0x38')]=_[_0x33f5('0x3b')](db[_0x33f5('0x53')][_0x33f5('0x34')]);_0x3bb3df[_0x33f5('0x3a')]=_[_0x33f5('0x3b')](_0x194eb1['query']);_0x3bb3df[_0x33f5('0x3c')]=_[_0x33f5('0x3d')](_0x3bb3df[_0x33f5('0x38')],_0x3bb3df['query']);_0x59c551[_0x33f5('0x3e')]=_[_0x33f5('0x3d')](_0x3bb3df['model'],qs[_0x33f5('0x3f')](_0x194eb1[_0x33f5('0x3a')][_0x33f5('0x3f')]));_0x59c551[_0x33f5('0x3e')]=_0x59c551[_0x33f5('0x3e')][_0x33f5('0x40')]?_0x59c551[_0x33f5('0x3e')]:_0x3bb3df['model'];_0x59c551['order']=qs[_0x33f5('0x43')](_0x194eb1[_0x33f5('0x3a')][_0x33f5('0x43')]);_0x59c551[_0x33f5('0x46')]=qs[_0x33f5('0x3c')](_[_0x33f5('0x44')](_0x194eb1[_0x33f5('0x3a')],_0x3bb3df[_0x33f5('0x3c')]));if(_0x194eb1['query'][_0x33f5('0x45')]){_0x59c551[_0x33f5('0x46')]=_['merge'](_0x59c551[_0x33f5('0x46')],{'$or':_[_0x33f5('0x39')](_0x59c551['attributes'],function(_0x4bfe12){var _0x598181={};_0x598181[_0x4bfe12]={'$like':'%'+_0x194eb1['query'][_0x33f5('0x45')]+'%'};return _0x598181;})});}_0x59c551=_[_0x33f5('0x47')]({},_0x59c551,_0x194eb1[_0x33f5('0x4e')]);return _0x2e754f[_0x33f5('0x54')](_0x59c551);}})[_0x33f5('0x1a')](function(_0x421bc2){if(_0x421bc2){_0x18a124=_0x421bc2[_0x33f5('0x40')];if(!_0x194eb1['query']['hasOwnProperty']('nolimit')){_0x59c551[_0x33f5('0x28')]=qs[_0x33f5('0x28')](_0x194eb1['query'][_0x33f5('0x28')]);_0x59c551['offset']=qs[_0x33f5('0x2a')](_0x194eb1[_0x33f5('0x3a')][_0x33f5('0x2a')]);}return _0x2e754f['getConfigurations'](_0x59c551);}})[_0x33f5('0x1a')](function(_0x125edb){if(_0x125edb){return _0x125edb?{'count':_0x18a124,'rows':_0x125edb}:null;}})[_0x33f5('0x1a')](respondWithResult(_0x4882ca,null))[_0x33f5('0x23')](handleError(_0x4882ca,null));};exports[_0x33f5('0x55')]=function(_0x59d3a3,_0x1cb1aa,_0x2dd016){if(_0x59d3a3[_0x33f5('0x52')]['id']){delete _0x59d3a3[_0x33f5('0x52')]['id'];}return db[_0x33f5('0x33')][_0x33f5('0x56')]({'where':{'id':_0x59d3a3[_0x33f5('0x4d')]['id']}})[_0x33f5('0x1a')](handleEntityNotFound(_0x1cb1aa,null))[_0x33f5('0x1a')](function(_0x342e8e){if(_0x342e8e){_0x59d3a3[_0x33f5('0x52')][_0x33f5('0x57')]=_0x342e8e['id'];_0x59d3a3['body'][_0x33f5('0x58')]=integrations[_0x33f5('0x59')](_0x59d3a3['body']['channel'],_0x59d3a3[_0x33f5('0x52')][_0x33f5('0x36')]);_0x59d3a3['body'][_0x33f5('0x5a')]=integrations[_0x33f5('0x5b')](_0x59d3a3[_0x33f5('0x52')][_0x33f5('0x5c')],_0x59d3a3['body'][_0x33f5('0x36')]);return db[_0x33f5('0x53')][_0x33f5('0x50')](_0x59d3a3[_0x33f5('0x52')],{'include':[{'model':db[_0x33f5('0x5d')],'as':_0x33f5('0x58')},{'model':db[_0x33f5('0x5d')],'as':'Descriptions'}]});}return null;})[_0x33f5('0x1a')](respondWithResult(_0x1cb1aa,null))[_0x33f5('0x23')](handleError(_0x1cb1aa,null));};exports[_0x33f5('0x5e')]=function(_0x521f76,_0x3f38a2,_0x13419a){var _0x2f5b63=_0x521f76[_0x33f5('0x3a')][_0x33f5('0x5f')];var _0x3d918e=_0x2f5b63===_0x33f5('0x60')?_0x33f5('0x61'):_0x33f5('0x62');var _0xbb1278='';var _0x128f8e='';var _0x2b4b86='';var _0x3eb060='';var _0x1e9f1e='';var _0x2ecb9d='';var _0x507598='';var _0x5311e2='';var _0x36fd30=[_0x33f5('0x63'),_0x33f5('0x64'),_0x33f5('0x65'),_0x33f5('0x66'),_0x33f5('0x67'),_0x33f5('0x68'),_0x33f5('0x69'),'regardingobjectid',_0x33f5('0x6a'),'phonecall_activity_parties'];var _0x757c2f=['accountidname',_0x33f5('0x6b'),_0x33f5('0x6c'),_0x33f5('0x6d'),_0x33f5('0x6e'),_0x33f5('0x6f'),_0x33f5('0x70'),'contractidname',_0x33f5('0x71'),_0x33f5('0x72'),_0x33f5('0x73'),_0x33f5('0x74'),_0x33f5('0x75'),'createdonbehalfbyname','createdonbehalfbyyominame',_0x33f5('0x76'),'customeridtype',_0x33f5('0x77'),_0x33f5('0x78'),'entitlementidname',_0x33f5('0x79'),'entityimage_url',_0x33f5('0x7a'),_0x33f5('0x7b'),'firstresponsebykpiidname',_0x33f5('0x7c'),_0x33f5('0x7d'),_0x33f5('0x7e'),_0x33f5('0x7f'),'lastonholdtime',_0x33f5('0x80'),'modifiedbyexternalpartyname',_0x33f5('0x81'),_0x33f5('0x82'),_0x33f5('0x83'),_0x33f5('0x84'),_0x33f5('0x85'),_0x33f5('0x86'),_0x33f5('0x87'),_0x33f5('0x88'),'numberofchildincidents',_0x33f5('0x89'),_0x33f5('0x8a'),_0x33f5('0x8b'),_0x33f5('0x8c'),_0x33f5('0x8d'),_0x33f5('0x8e'),'primarycontactidname',_0x33f5('0x8f'),_0x33f5('0x90'),'productidname',_0x33f5('0x91'),_0x33f5('0x92'),_0x33f5('0x93'),_0x33f5('0x94'),_0x33f5('0x95'),_0x33f5('0x96'),'sentimentvalue',_0x33f5('0x97'),_0x33f5('0x98'),_0x33f5('0x99'),_0x33f5('0x9a'),_0x33f5('0x9b'),_0x33f5('0x9c'),_0x33f5('0x9d'),_0x33f5('0x9e'),'transactioncurrencyidname','traversedpath',_0x33f5('0x9f'),_0x33f5('0xa0')];var _0x36b11c=_0x36fd30[_0x33f5('0xa1')](_0x757c2f);return db['Dynamics365Account'][_0x33f5('0x56')]({'where':{'id':_0x521f76[_0x33f5('0x4d')]['id']},'attributes':['id','username',_0x33f5('0xa2'),_0x33f5('0xa3'),_0x33f5('0xa4'),_0x33f5('0xa5'),'clientSecret']})['then'](handleEntityNotFound(_0x3f38a2,null))[_0x33f5('0x1a')](function(_0x28a420){if(_0x28a420){_0x5311e2=_0x28a420['remoteUri'];var _0x1f7d9d=_0x5311e2[_0x33f5('0xa6')](-0x1);if(_0x1f7d9d==='/'){_0x5311e2=_0x5311e2[_0x33f5('0xa7')](0x0,_0x5311e2['lastIndexOf'](_0x1f7d9d));}_0x507598=util['format'](_0x33f5('0xa8'),_0x5311e2);var _0x5e6864={'method':'POST','uri':'https://login.microsoftonline.com/'+_0x28a420[_0x33f5('0xa4')]+_0x33f5('0xa9'),'form':{'client_id':_0x28a420[_0x33f5('0xa5')],'resource':_0x5311e2,'username':_0x28a420['username'],'password':_0x28a420[_0x33f5('0xa2')],'grant_type':_0x33f5('0xa2'),'client_secret':_0x28a420['clientSecret']},'json':!![]};return rp(_0x5e6864);}})[_0x33f5('0x1a')](function(_0x114712){_0x2ecb9d=_0x114712['access_token'];var _0x490e37={'method':'GET','uri':encodeURI(_0x507598+_0x33f5('0xaa')+_0x3d918e+'\x27'),'headers':{'Authorization':_0x33f5('0xab')+_0x2ecb9d,'If-None-Match':null,'OData-Version':_0x33f5('0xac')},'json':!![]};return rp(_0x490e37);})[_0x33f5('0x1a')](function(_0x447ae5){var _0xd4531d=_0x447ae5[_0x33f5('0xad')][0x0];var _0x4668bf=_0xd4531d[_0x33f5('0xae')];var _0xfc9db={'method':_0x33f5('0xaf'),'uri':_0x507598+'EntityDefinitions('+_0x4668bf+_0x33f5('0xb0'),'headers':{'Authorization':_0x33f5('0xab')+_0x2ecb9d,'If-None-Match':null,'OData-Version':_0x33f5('0xac')},'json':!![]};return rp(_0xfc9db);})[_0x33f5('0x1a')](function(_0x566641){_0xbb1278=_0x566641;_0x128f8e=_0xbb1278['Attributes'];_0x128f8e=_['remove'](_0x128f8e,function(_0x1063cb){return!_0x36b11c[_0x33f5('0xb1')](_0x1063cb[_0x33f5('0xb2')]);});var _0x4ddf00=[];var _0x3ffeb3=[];_0x128f8e[_0x33f5('0xb3')](function(_0x25e2af){if(_0x25e2af[_0x33f5('0xb4')]){var _0x4f5aa6=_0x25e2af['@odata.type'][_0x33f5('0xa7')](_0x25e2af['@odata.type'][_0x33f5('0xb5')]('.')+0x1);if(_0x4f5aa6==='PicklistAttributeMetadata'){_0x4ddf00[_0x33f5('0xb6')](getSelectList(_0x507598,_0x2f5b63,_0x3ffeb3,_0xbb1278[_0x33f5('0xae')],_0x25e2af[_0x33f5('0xae')],_0x2ecb9d));}}});return Promise[_0x33f5('0xb7')](_0x4ddf00);})[_0x33f5('0x1a')](function(_0x1a855f){_0x2b4b86=_0x1a855f[0x0];var _0x53742d=[];var _0x524acc=[];_0x128f8e[_0x33f5('0xb3')](function(_0x497573){if(!_[_0x33f5('0xb8')](_0x497573[_0x33f5('0xb4')])){var _0x2a5deb=_0x497573[_0x33f5('0xb4')][_0x33f5('0xa7')](_0x497573['@odata.type']['lastIndexOf']('.')+0x1);if(_0x2a5deb===_0x33f5('0xb9')){_0x53742d[_0x33f5('0xb6')](getBooleanList(_0x507598,_0x2f5b63,_0x524acc,_0xbb1278['MetadataId'],_0x497573[_0x33f5('0xae')],_0x2ecb9d));}}});return Promise[_0x33f5('0xb7')](_0x53742d);})['then'](function(_0x227c6c){_0x3eb060=_0x227c6c[0x0];var _0x3463ee=[];var _0xa72a68=[];_0x128f8e[_0x33f5('0xb3')](function(_0x1e165f){if(_0x1e165f[_0x33f5('0xb4')]){var _0x46c61c=_0x1e165f[_0x33f5('0xb4')][_0x33f5('0xa7')](_0x1e165f[_0x33f5('0xb4')]['lastIndexOf']('.')+0x1);if(_0x46c61c===_0x33f5('0xba')||_0x46c61c===_0x33f5('0xbb')||_0x46c61c===_0x33f5('0xbc')||_0x46c61c==='IntegerAttributeMetadata'||_0x46c61c===_0x33f5('0xbd')||_0x46c61c==='DateTimeAttributeMetadata'||_0x46c61c===_0x33f5('0xbe')||_0x46c61c==='EntityNameAttributeMetadata'||_0x46c61c===_0x33f5('0xbf')||_0x46c61c===_0x33f5('0xc0')){_0x3463ee[_0x33f5('0xb6')](getInputList(_0x507598,_0x2f5b63,_0x46c61c,_0xa72a68,_0xbb1278[_0x33f5('0xae')],_0x1e165f[_0x33f5('0xae')],_0x2ecb9d));}}});return Promise[_0x33f5('0xb7')](_0x3463ee);})[_0x33f5('0x1a')](function(_0xa80421){_0x1e9f1e=_0xa80421[0x0];var _0xc08fd3=_0x2b4b86[_0x33f5('0xa1')](_0x3eb060)[_0x33f5('0xa1')](_0x1e9f1e);var _0x5f359b={'count':_0xc08fd3['length'],'rows':_0xc08fd3};return _0x5f359b;})['then'](respondWithResult(_0x3f38a2,null))[_0x33f5('0x23')](function(_0x20c735){var _0x332dcc=_0x521f76[_0x33f5('0x3a')][_0x33f5('0xc1')]?0x1f4:_0x20c735[_0x33f5('0xc2')]||0x1f4;logger[_0x33f5('0x20')](_0x20c735[_0x33f5('0x30')]);delete _0x20c735[_0x33f5('0x31')];if(_0x332dcc===0x191){_0x332dcc=0x190;}_0x3f38a2['status'](_0x332dcc)[_0x33f5('0xc3')](_0x521f76['query'][_0x33f5('0xc1')]?{'message':_0x33f5('0xc4'),'statusCode':_0x20c735[_0x33f5('0xc2')]}:_0x20c735);});};function getSelectList(_0x336575,_0xee2456,_0x33600e,_0x1b98b7,_0x5c7b0f,_0x170843){var _0x52adfe={'method':_0x33f5('0xaf'),'uri':_0x336575+'EntityDefinitions('+_0x1b98b7+_0x33f5('0xc5')+_0x5c7b0f+_0x33f5('0xc6')+'$select=DisplayName,LogicalName&$expand=OptionSet($select=Options)','headers':{'Authorization':_0x33f5('0xab')+_0x170843,'If-None-Match':null,'OData-Version':_0x33f5('0xac')},'json':!![]};return rp(_0x52adfe)[_0x33f5('0x1a')](function(_0x59f1af){var _0x37d1c7=[];var _0x17ee3c=_0x59f1af[_0x33f5('0xc7')][_0x33f5('0xc8')];_0x17ee3c['forEach'](function(_0x391dfe){_0x37d1c7[_0x33f5('0xb6')]({'name':_0x391dfe['Label'][_0x33f5('0xc9')]['Label'],'value':String(_0x391dfe[_0x33f5('0xca')])});});var _0x507352={'id':_0xee2456+'_'+_0x59f1af[_0x33f5('0xb2')],'name':_0x59f1af[_0x33f5('0xcb')]['UserLocalizedLabel'][_0x33f5('0xcc')],'custom':![],'options':_0x37d1c7};_0x33600e[_0x33f5('0xb6')](_0x507352);return _0x33600e;});}function getBooleanList(_0x2e28bb,_0x321be0,_0x431190,_0x611820,_0x20f986,_0x5e1f5f){var _0x3a6c5e={'method':_0x33f5('0xaf'),'uri':_0x2e28bb+'EntityDefinitions('+_0x611820+')/Attributes('+_0x20f986+_0x33f5('0xcd'),'headers':{'Authorization':_0x33f5('0xab')+_0x5e1f5f,'If-None-Match':null,'OData-Version':_0x33f5('0xac')},'json':!![]};return rp(_0x3a6c5e)[_0x33f5('0x1a')](function(_0x2959c3){var _0x25aaa9=[];_0x25aaa9[_0x33f5('0xb6')]({'name':_0x2959c3['OptionSet'][_0x33f5('0xce')][_0x33f5('0xcc')][_0x33f5('0xc9')][_0x33f5('0xcc')],'value':_0x33f5('0xcf')},{'name':_0x2959c3[_0x33f5('0xc7')][_0x33f5('0xd0')]['Label'][_0x33f5('0xc9')][_0x33f5('0xcc')],'value':_0x33f5('0xd1')});var _0x103665={'id':_0x321be0+'_'+_0x2959c3[_0x33f5('0xb2')],'name':_0x2959c3[_0x33f5('0xcb')]['UserLocalizedLabel']['Label'],'custom':![],'options':_0x25aaa9};_0x431190[_0x33f5('0xb6')](_0x103665);return _0x431190;});}function getInputList(_0x4ab2c2,_0x51adc3,_0x32df6a,_0x415f83,_0x9d6766,_0x5ae76d,_0x2edfb2){var _0x559cc2={'method':_0x33f5('0xaf'),'uri':_0x4ab2c2+_0x33f5('0xd2')+_0x9d6766+_0x33f5('0xc5')+_0x5ae76d+_0x33f5('0xd3')+_0x32df6a+'?$select=DisplayName,LogicalName','headers':{'Authorization':_0x33f5('0xab')+_0x2edfb2,'If-None-Match':null,'OData-Version':_0x33f5('0xac')},'json':!![]};return rp(_0x559cc2)[_0x33f5('0x1a')](function(_0x58a926){var _0x3a6302={'id':_0x51adc3+'_'+_0x58a926[_0x33f5('0xb2')],'name':_0x58a926[_0x33f5('0xcb')][_0x33f5('0xc9')]?_0x58a926[_0x33f5('0xcb')][_0x33f5('0xc9')]['Label']:_0x58a926[_0x33f5('0xb2')],'custom':![],'options':[]};_0x415f83['push'](_0x3a6302);return _0x415f83;});} \ No newline at end of file +var _0x5bc4=['offset','undefined','limit','count','set','Content-Range','reject','save','then','destroy','end','stack','name','index','rawAttributes','fieldName','type','key','model','map','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','filter','where','merge','VIRTUAL','options','Dynamics365Account','include','rows','show','params','includeAll','find','create','update','body','findOne','Dynamics365Configuration','addConfiguration','AccountId','channel','Descriptions','Dynamics365Field','Subjects','ticketType','incident','Incident','PhoneCall','title','description','customerid','ownerid','subject','phonenumber','regardingobjectid','phonecall_activity_parties','accountidname','accountidyominame','actualserviceunits','billedserviceunits','contactidyominame','contractdetailidname','contractidname','createdbyexternalpartyname','createdbyname','createdbyyominame','createdonbehalfbyname','createdonbehalfbyyominame','customeridname','emailaddress','entitlementidname','entityimage_timestamp','escalatedon','exchangerate','firstresponsebykpiidname','followupby','importsequencenumber','influencescore','modifiedbyexternalpartyname','modifiedbyname','modifiedon','modifiedonbehalfbyyominame','msdyn_incidenttypename','msdyn_iotalertname','onholdtime','overriddencreatedon','owneridname','owneridtype','owneridyominame','parentcaseidname','primarycontactidname','primarycontactidyominame','prioritycodename','productidname','productserialnumber','resolveby','resolvebykpiidname','responseby','responsiblecontactidname','sentimentvalue','slainvokedidname','slaname','socialprofileidname','statuscode','subjectidname','ticketnumber','timezoneruleversionnumber','traversedpath','utcconversiontimezonecode','concat','username','password','remoteUri','tenantId','clientId','slice','substring','format','%s/api/data/v9.0/','https://login.microsoftonline.com/','access_token','Bearer\x20','4.0','value','MetadataId','GET','EntityDefinitions(',')?$select=LogicalName&$expand=Attributes($select=LogicalName)','Attributes','remove','includes','LogicalName','forEach','@odata.type','lastIndexOf','PicklistAttributeMetadata','push','all','isNil','BooleanAttributeMetadata','StringAttributeMetadata','BigIntAttributeMetadata','IntegerAttributeMetadata','MemoAttributeMetadata','DateTimeAttributeMetadata','EntityNameAttributeMetadata','StateAttributeMetadata','test','statusCode','send',')/Microsoft.Dynamics.CRM.PicklistAttributeMetadata?','OptionSet','Options','Label','Value','UserLocalizedLabel',')/Attributes(',')/Microsoft.Dynamics.CRM.BooleanAttributeMetadata?$select=DisplayName,LogicalName&$expand=OptionSet($select=FalseOption,\x20TrueOption)','TrueOption','true','DisplayName',')/Microsoft.Dynamics.CRM.','?$select=DisplayName,LogicalName','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','fs-extra','lodash','crypto','jsforce','querystring','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','../../components/integrations/configuration','client','request','info','Dynamics365Account,\x20%s,\x20%s','request\x20sent','debug','Dynamics365Account,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','sendStatus','status','json'];(function(_0x1a6659,_0xcc8b76){var _0x53aeb8=function(_0x2b58f6){while(--_0x2b58f6){_0x1a6659['push'](_0x1a6659['shift']());}};_0x53aeb8(++_0xcc8b76);}(_0x5bc4,0x182));var _0x45bc=function(_0x3af68c,_0x4fec00){_0x3af68c=_0x3af68c-0x0;var _0x140b8a=_0x5bc4[_0x3af68c];return _0x140b8a;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x45bc('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0x45bc('0x1'));var rp=require(_0x45bc('0x2'));var moment=require(_0x45bc('0x3'));var BPromise=require(_0x45bc('0x4'));var Mustache=require(_0x45bc('0x5'));var util=require(_0x45bc('0x6'));var path=require(_0x45bc('0x7'));var sox=require(_0x45bc('0x8'));var csv=require(_0x45bc('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x45bc('0xa'));var _=require(_0x45bc('0xb'));var squel=require('squel');var crypto=require(_0x45bc('0xc'));var jsforce=require(_0x45bc('0xd'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x45bc('0xe'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x45bc('0xf'));var qs=require(_0x45bc('0x10'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x45bc('0x11'));var logger=require(_0x45bc('0x12'))(_0x45bc('0x13'));var utils=require(_0x45bc('0x14'));var config=require(_0x45bc('0x15'));var licenseUtil=require(_0x45bc('0x16'));var db=require(_0x45bc('0x17'))['db'];var integrations=require(_0x45bc('0x18'));var jayson=require('jayson/promise');var client=jayson[_0x45bc('0x19')]['http']({'port':0x232a});function respondWithRpcPromise(_0xc8771e,_0x3e4552,_0x4bd1d7,_0x1e1da6){return new BPromise(function(_0x510ddb,_0x35cc4e){var _0x35d769=_0x1e1da6||client;return _0x35d769[_0x45bc('0x1a')](_0xc8771e,_0x4bd1d7)['then'](function(_0x130423){logger[_0x45bc('0x1b')](_0x45bc('0x1c'),_0x3e4552,_0x45bc('0x1d'));logger[_0x45bc('0x1e')](_0x45bc('0x1f'),_0x3e4552,_0x45bc('0x1d'),JSON[_0x45bc('0x20')](_0x130423));if(_0x130423[_0x45bc('0x21')]){if(_0x130423['error'][_0x45bc('0x22')]===0x1f4){logger['error'](_0x45bc('0x1c'),_0x3e4552,_0x130423[_0x45bc('0x21')][_0x45bc('0x23')]);return _0x35cc4e(_0x130423[_0x45bc('0x21')]['message']);}logger[_0x45bc('0x21')]('Dynamics365Account,\x20%s,\x20%s',_0x3e4552,_0x130423[_0x45bc('0x21')][_0x45bc('0x23')]);return _0x510ddb(_0x130423[_0x45bc('0x21')][_0x45bc('0x23')]);}else{logger[_0x45bc('0x1b')]('Dynamics365Account,\x20%s,\x20%s',_0x3e4552,_0x45bc('0x1d'));_0x510ddb(_0x130423['result'][_0x45bc('0x23')]);}})[_0x45bc('0x24')](function(_0x59cb83){logger[_0x45bc('0x21')](_0x45bc('0x1c'),_0x3e4552,_0x59cb83);_0x35cc4e(_0x59cb83);});});}function respondWithStatusCode(_0x29da19,_0x5d84c6){_0x5d84c6=_0x5d84c6||0xcc;return function(_0x31560d){if(_0x31560d){return _0x29da19[_0x45bc('0x25')](_0x5d84c6);}return _0x29da19[_0x45bc('0x26')](_0x5d84c6)['end']();};}function respondWithResult(_0x2370e3,_0x38b630){_0x38b630=_0x38b630||0xc8;return function(_0x30cd7a){if(_0x30cd7a){return _0x2370e3[_0x45bc('0x26')](_0x38b630)[_0x45bc('0x27')](_0x30cd7a);}};}function respondWithFilteredResult(_0x147bae,_0x47fd2f){return function(_0x25b652){if(_0x25b652){var _0x3a429c=typeof _0x47fd2f[_0x45bc('0x28')]===_0x45bc('0x29')&&typeof _0x47fd2f[_0x45bc('0x2a')]==='undefined';var _0x31ecbf=_0x25b652[_0x45bc('0x2b')];var _0x3d60a5=_0x3a429c?0x0:_0x47fd2f[_0x45bc('0x28')];var _0x4b70d5=_0x3a429c?_0x25b652[_0x45bc('0x2b')]:_0x47fd2f[_0x45bc('0x28')]+_0x47fd2f[_0x45bc('0x2a')];var _0x260dc9;if(_0x4b70d5>=_0x31ecbf){_0x4b70d5=_0x31ecbf;_0x260dc9=0xc8;}else{_0x260dc9=0xce;}_0x147bae[_0x45bc('0x26')](_0x260dc9);return _0x147bae[_0x45bc('0x2c')](_0x45bc('0x2d'),_0x3d60a5+'-'+_0x4b70d5+'/'+_0x31ecbf)[_0x45bc('0x27')](_0x25b652);}return null;};}function patchUpdates(_0x143cc9){return function(_0x3229fe){try{jsonpatch['apply'](_0x3229fe,_0x143cc9,!![]);}catch(_0x94ea02){return BPromise[_0x45bc('0x2e')](_0x94ea02);}return _0x3229fe[_0x45bc('0x2f')]();};}function saveUpdates(_0x5b3056,_0x1d050f){return function(_0x27bccd){if(_0x27bccd){return _0x27bccd['update'](_0x5b3056)[_0x45bc('0x30')](function(_0x286db4){return _0x286db4;});}return null;};}function removeEntity(_0x1b88bb,_0x54ff18){return function(_0x425c1a){if(_0x425c1a){return _0x425c1a[_0x45bc('0x31')]()[_0x45bc('0x30')](function(){_0x1b88bb[_0x45bc('0x26')](0xcc)[_0x45bc('0x32')]();});}};}function handleEntityNotFound(_0x1c055b,_0x27e609){return function(_0x8ebc12){if(!_0x8ebc12){_0x1c055b[_0x45bc('0x25')](0x194);}return _0x8ebc12;};}function handleError(_0x1c7a04,_0x2a1c6a){_0x2a1c6a=_0x2a1c6a||0x1f4;return function(_0x3a807e){logger[_0x45bc('0x21')](_0x3a807e[_0x45bc('0x33')]);if(_0x3a807e[_0x45bc('0x34')]){delete _0x3a807e['name'];}_0x1c7a04[_0x45bc('0x26')](_0x2a1c6a)['send'](_0x3a807e);};}exports[_0x45bc('0x35')]=function(_0x36d533,_0x4eef54){var _0x5c2ff1={},_0x231b7d={},_0x202584={'count':0x0,'rows':[]};var _0x530a96=_['map'](db['Dynamics365Account'][_0x45bc('0x36')],function(_0x1152a7){return{'name':_0x1152a7[_0x45bc('0x37')],'type':_0x1152a7[_0x45bc('0x38')][_0x45bc('0x39')]};});_0x231b7d[_0x45bc('0x3a')]=_[_0x45bc('0x3b')](_0x530a96,_0x45bc('0x34'));_0x231b7d[_0x45bc('0x3c')]=_[_0x45bc('0x3d')](_0x36d533['query']);_0x231b7d[_0x45bc('0x3e')]=_[_0x45bc('0x3f')](_0x231b7d[_0x45bc('0x3a')],_0x231b7d[_0x45bc('0x3c')]);_0x5c2ff1['attributes']=_[_0x45bc('0x3f')](_0x231b7d[_0x45bc('0x3a')],qs[_0x45bc('0x40')](_0x36d533[_0x45bc('0x3c')]['fields']));_0x5c2ff1[_0x45bc('0x41')]=_0x5c2ff1[_0x45bc('0x41')][_0x45bc('0x42')]?_0x5c2ff1['attributes']:_0x231b7d[_0x45bc('0x3a')];if(!_0x36d533[_0x45bc('0x3c')][_0x45bc('0x43')](_0x45bc('0x44'))){_0x5c2ff1[_0x45bc('0x2a')]=qs[_0x45bc('0x2a')](_0x36d533[_0x45bc('0x3c')][_0x45bc('0x2a')]);_0x5c2ff1['offset']=qs[_0x45bc('0x28')](_0x36d533['query'][_0x45bc('0x28')]);}_0x5c2ff1[_0x45bc('0x45')]=qs[_0x45bc('0x46')](_0x36d533[_0x45bc('0x3c')][_0x45bc('0x46')]);_0x5c2ff1['where']=qs[_0x45bc('0x3e')](_['pick'](_0x36d533['query'],_0x231b7d[_0x45bc('0x3e')]),_0x530a96);if(_0x36d533[_0x45bc('0x3c')][_0x45bc('0x47')]){_0x5c2ff1[_0x45bc('0x48')]=_[_0x45bc('0x49')](_0x5c2ff1[_0x45bc('0x48')],{'$or':_[_0x45bc('0x3b')](_0x530a96,function(_0x1d5d38){if(_0x1d5d38[_0x45bc('0x38')]!==_0x45bc('0x4a')){var _0x5732f2={};_0x5732f2[_0x1d5d38[_0x45bc('0x34')]]={'$like':'%'+_0x36d533['query'][_0x45bc('0x47')]+'%'};return _0x5732f2;}})});}_0x5c2ff1=_[_0x45bc('0x49')]({},_0x5c2ff1,_0x36d533[_0x45bc('0x4b')]);var _0x146043={'where':_0x5c2ff1[_0x45bc('0x48')]};return db[_0x45bc('0x4c')]['count'](_0x146043)['then'](function(_0x463e1f){_0x202584[_0x45bc('0x2b')]=_0x463e1f;if(_0x36d533[_0x45bc('0x3c')]['includeAll']){_0x5c2ff1[_0x45bc('0x4d')]=[{'all':!![]}];}return db['Dynamics365Account']['findAll'](_0x5c2ff1);})[_0x45bc('0x30')](function(_0x2b205b){_0x202584[_0x45bc('0x4e')]=_0x2b205b;return _0x202584;})[_0x45bc('0x30')](respondWithFilteredResult(_0x4eef54,_0x5c2ff1))['catch'](handleError(_0x4eef54,null));};exports[_0x45bc('0x4f')]=function(_0x5aeb95,_0x485b8e){var _0x445561={'raw':![],'where':{'id':_0x5aeb95[_0x45bc('0x50')]['id']}},_0x548e81={};_0x548e81[_0x45bc('0x3a')]=_[_0x45bc('0x3d')](db['Dynamics365Account']['rawAttributes']);_0x548e81[_0x45bc('0x3c')]=_[_0x45bc('0x3d')](_0x5aeb95[_0x45bc('0x3c')]);_0x548e81['filters']=_[_0x45bc('0x3f')](_0x548e81[_0x45bc('0x3a')],_0x548e81[_0x45bc('0x3c')]);_0x445561[_0x45bc('0x41')]=_[_0x45bc('0x3f')](_0x548e81[_0x45bc('0x3a')],qs['fields'](_0x5aeb95[_0x45bc('0x3c')][_0x45bc('0x40')]));_0x445561[_0x45bc('0x41')]=_0x445561[_0x45bc('0x41')]['length']?_0x445561['attributes']:_0x548e81[_0x45bc('0x3a')];if(_0x5aeb95['query'][_0x45bc('0x51')]){_0x445561['include']=[{'all':!![]}];}_0x445561=_[_0x45bc('0x49')]({},_0x445561,_0x5aeb95['options']);return db['Dynamics365Account'][_0x45bc('0x52')](_0x445561)[_0x45bc('0x30')](handleEntityNotFound(_0x485b8e,null))[_0x45bc('0x30')](respondWithResult(_0x485b8e,null))[_0x45bc('0x24')](handleError(_0x485b8e,null));};exports[_0x45bc('0x53')]=function(_0x78442d,_0x4ede66){return db[_0x45bc('0x4c')]['create'](_0x78442d['body'],{})[_0x45bc('0x30')](respondWithResult(_0x4ede66,0xc9))[_0x45bc('0x24')](handleError(_0x4ede66,null));};exports[_0x45bc('0x54')]=function(_0x37ccef,_0x419b93){if(_0x37ccef[_0x45bc('0x55')]['id']){delete _0x37ccef[_0x45bc('0x55')]['id'];}return db[_0x45bc('0x4c')][_0x45bc('0x52')]({'where':{'id':_0x37ccef[_0x45bc('0x50')]['id']}})[_0x45bc('0x30')](handleEntityNotFound(_0x419b93,null))[_0x45bc('0x30')](saveUpdates(_0x37ccef[_0x45bc('0x55')],null))[_0x45bc('0x30')](respondWithResult(_0x419b93,null))[_0x45bc('0x24')](handleError(_0x419b93,null));};exports['destroy']=function(_0x135f7f,_0x5d368c){return db[_0x45bc('0x4c')][_0x45bc('0x52')]({'where':{'id':_0x135f7f[_0x45bc('0x50')]['id']}})['then'](handleEntityNotFound(_0x5d368c,null))[_0x45bc('0x30')](removeEntity(_0x5d368c,null))[_0x45bc('0x24')](handleError(_0x5d368c,null));};exports['getConfigurations']=function(_0x3d9d7c,_0x29dd8c,_0x5c9a40){var _0x47f938={};var _0xe42c63={};var _0x4ccac0;var _0x3836b9;return db['Dynamics365Account'][_0x45bc('0x56')]({'where':{'id':_0x3d9d7c['params']['id']}})[_0x45bc('0x30')](handleEntityNotFound(_0x29dd8c,null))[_0x45bc('0x30')](function(_0x5cc522){if(_0x5cc522){_0x4ccac0=_0x5cc522;_0xe42c63[_0x45bc('0x3a')]=_[_0x45bc('0x3d')](db[_0x45bc('0x57')][_0x45bc('0x36')]);_0xe42c63[_0x45bc('0x3c')]=_[_0x45bc('0x3d')](_0x3d9d7c[_0x45bc('0x3c')]);_0xe42c63['filters']=_['intersection'](_0xe42c63['model'],_0xe42c63[_0x45bc('0x3c')]);_0x47f938['attributes']=_[_0x45bc('0x3f')](_0xe42c63[_0x45bc('0x3a')],qs['fields'](_0x3d9d7c[_0x45bc('0x3c')]['fields']));_0x47f938[_0x45bc('0x41')]=_0x47f938['attributes'][_0x45bc('0x42')]?_0x47f938[_0x45bc('0x41')]:_0xe42c63[_0x45bc('0x3a')];_0x47f938[_0x45bc('0x45')]=qs[_0x45bc('0x46')](_0x3d9d7c[_0x45bc('0x3c')][_0x45bc('0x46')]);_0x47f938[_0x45bc('0x48')]=qs[_0x45bc('0x3e')](_['pick'](_0x3d9d7c[_0x45bc('0x3c')],_0xe42c63['filters']));if(_0x3d9d7c[_0x45bc('0x3c')][_0x45bc('0x47')]){_0x47f938[_0x45bc('0x48')]=_[_0x45bc('0x49')](_0x47f938['where'],{'$or':_[_0x45bc('0x3b')](_0x47f938[_0x45bc('0x41')],function(_0xa281f3){var _0x42e8b2={};_0x42e8b2[_0xa281f3]={'$like':'%'+_0x3d9d7c['query'][_0x45bc('0x47')]+'%'};return _0x42e8b2;})});}_0x47f938=_[_0x45bc('0x49')]({},_0x47f938,_0x3d9d7c[_0x45bc('0x4b')]);return _0x4ccac0['getConfigurations'](_0x47f938);}})[_0x45bc('0x30')](function(_0x5e05c6){if(_0x5e05c6){_0x3836b9=_0x5e05c6['length'];if(!_0x3d9d7c['query'][_0x45bc('0x43')]('nolimit')){_0x47f938[_0x45bc('0x2a')]=qs['limit'](_0x3d9d7c['query'][_0x45bc('0x2a')]);_0x47f938[_0x45bc('0x28')]=qs[_0x45bc('0x28')](_0x3d9d7c['query']['offset']);}return _0x4ccac0['getConfigurations'](_0x47f938);}})[_0x45bc('0x30')](function(_0x134f7f){if(_0x134f7f){return _0x134f7f?{'count':_0x3836b9,'rows':_0x134f7f}:null;}})['then'](respondWithResult(_0x29dd8c,null))[_0x45bc('0x24')](handleError(_0x29dd8c,null));};exports[_0x45bc('0x58')]=function(_0x51c4b3,_0x1d3ae3,_0x43dc35){if(_0x51c4b3[_0x45bc('0x55')]['id']){delete _0x51c4b3[_0x45bc('0x55')]['id'];}return db[_0x45bc('0x4c')][_0x45bc('0x56')]({'where':{'id':_0x51c4b3[_0x45bc('0x50')]['id']}})[_0x45bc('0x30')](handleEntityNotFound(_0x1d3ae3,null))[_0x45bc('0x30')](function(_0x17cc2d){if(_0x17cc2d){_0x51c4b3[_0x45bc('0x55')][_0x45bc('0x59')]=_0x17cc2d['id'];_0x51c4b3[_0x45bc('0x55')]['Subjects']=integrations['getSubjects'](_0x51c4b3[_0x45bc('0x55')][_0x45bc('0x5a')],_0x51c4b3[_0x45bc('0x55')][_0x45bc('0x38')]);_0x51c4b3[_0x45bc('0x55')][_0x45bc('0x5b')]=integrations['getDescriptions'](_0x51c4b3[_0x45bc('0x55')][_0x45bc('0x5a')],_0x51c4b3[_0x45bc('0x55')][_0x45bc('0x38')]);return db[_0x45bc('0x57')]['create'](_0x51c4b3['body'],{'include':[{'model':db[_0x45bc('0x5c')],'as':_0x45bc('0x5d')},{'model':db['Dynamics365Field'],'as':_0x45bc('0x5b')}]});}return null;})[_0x45bc('0x30')](respondWithResult(_0x1d3ae3,null))[_0x45bc('0x24')](handleError(_0x1d3ae3,null));};exports['getFields']=function(_0x543795,_0x572dce,_0x414cc0){var _0xb17d1c=_0x543795[_0x45bc('0x3c')][_0x45bc('0x5e')];var _0x34dbb3=_0xb17d1c===_0x45bc('0x5f')?_0x45bc('0x60'):_0x45bc('0x61');var _0x4a3b81='';var _0x22e807='';var _0x475574='';var _0x40c45f='';var _0x5d3c1e='';var _0x369e3f='';var _0x49cb0c='';var _0x461ccf='';var _0x3b3ad3=[_0x45bc('0x62'),_0x45bc('0x63'),_0x45bc('0x64'),_0x45bc('0x65'),'caseorigincode',_0x45bc('0x66'),_0x45bc('0x67'),_0x45bc('0x68'),'directioncode',_0x45bc('0x69')];var _0x49b64d=[_0x45bc('0x6a'),_0x45bc('0x6b'),_0x45bc('0x6c'),_0x45bc('0x6d'),'contactidname',_0x45bc('0x6e'),_0x45bc('0x6f'),_0x45bc('0x70'),_0x45bc('0x71'),'createdbyexternalpartyyominame',_0x45bc('0x72'),_0x45bc('0x73'),'createdon',_0x45bc('0x74'),_0x45bc('0x75'),_0x45bc('0x76'),'customeridtype','customeridyominame',_0x45bc('0x77'),_0x45bc('0x78'),_0x45bc('0x79'),'entityimage_url',_0x45bc('0x7a'),_0x45bc('0x7b'),_0x45bc('0x7c'),_0x45bc('0x7d'),_0x45bc('0x7e'),_0x45bc('0x7f'),'kbarticleidname','lastonholdtime','masteridname',_0x45bc('0x80'),'modifiedbyexternalpartyyominame',_0x45bc('0x81'),'modifiedbyyominame',_0x45bc('0x82'),'modifiedonbehalfbyname',_0x45bc('0x83'),_0x45bc('0x84'),_0x45bc('0x85'),'numberofchildincidents',_0x45bc('0x86'),_0x45bc('0x87'),_0x45bc('0x88'),_0x45bc('0x89'),_0x45bc('0x8a'),_0x45bc('0x8b'),_0x45bc('0x8c'),_0x45bc('0x8d'),_0x45bc('0x8e'),_0x45bc('0x8f'),_0x45bc('0x90'),_0x45bc('0x91'),_0x45bc('0x92'),_0x45bc('0x93'),_0x45bc('0x94'),'responsiblecontactidyominame',_0x45bc('0x95'),_0x45bc('0x96'),_0x45bc('0x97'),_0x45bc('0x98'),'statecode',_0x45bc('0x99'),_0x45bc('0x9a'),_0x45bc('0x9b'),_0x45bc('0x9c'),'transactioncurrencyidname',_0x45bc('0x9d'),_0x45bc('0x9e'),'versionnumber'];var _0x474254=_0x3b3ad3[_0x45bc('0x9f')](_0x49b64d);return db[_0x45bc('0x4c')][_0x45bc('0x56')]({'where':{'id':_0x543795[_0x45bc('0x50')]['id']},'attributes':['id',_0x45bc('0xa0'),_0x45bc('0xa1'),_0x45bc('0xa2'),_0x45bc('0xa3'),_0x45bc('0xa4'),'clientSecret']})[_0x45bc('0x30')](handleEntityNotFound(_0x572dce,null))[_0x45bc('0x30')](function(_0x4bcb7f){if(_0x4bcb7f){_0x461ccf=_0x4bcb7f[_0x45bc('0xa2')];var _0xb14e2=_0x461ccf[_0x45bc('0xa5')](-0x1);if(_0xb14e2==='/'){_0x461ccf=_0x461ccf[_0x45bc('0xa6')](0x0,_0x461ccf['lastIndexOf'](_0xb14e2));}_0x49cb0c=util[_0x45bc('0xa7')](_0x45bc('0xa8'),_0x461ccf);var _0x4cd64f={'method':'POST','uri':_0x45bc('0xa9')+_0x4bcb7f[_0x45bc('0xa3')]+'/oauth2/token','form':{'client_id':_0x4bcb7f['clientId'],'resource':_0x461ccf,'username':_0x4bcb7f[_0x45bc('0xa0')],'password':_0x4bcb7f['password'],'grant_type':_0x45bc('0xa1'),'client_secret':_0x4bcb7f['clientSecret']},'json':!![]};return rp(_0x4cd64f);}})[_0x45bc('0x30')](function(_0x448709){_0x369e3f=_0x448709[_0x45bc('0xaa')];var _0x3dccc2={'method':'GET','uri':encodeURI(_0x49cb0c+'EntityDefinitions?$select=DisplayName,EntitySetName&$filter=SchemaName\x20eq\x20\x27'+_0x34dbb3+'\x27'),'headers':{'Authorization':_0x45bc('0xab')+_0x369e3f,'If-None-Match':null,'OData-Version':_0x45bc('0xac')},'json':!![]};return rp(_0x3dccc2);})[_0x45bc('0x30')](function(_0x2a716f){var _0x569a03=_0x2a716f[_0x45bc('0xad')][0x0];var _0x2eedd9=_0x569a03[_0x45bc('0xae')];var _0x1ec18a={'method':_0x45bc('0xaf'),'uri':_0x49cb0c+_0x45bc('0xb0')+_0x2eedd9+_0x45bc('0xb1'),'headers':{'Authorization':_0x45bc('0xab')+_0x369e3f,'If-None-Match':null,'OData-Version':_0x45bc('0xac')},'json':!![]};return rp(_0x1ec18a);})[_0x45bc('0x30')](function(_0x12e425){_0x4a3b81=_0x12e425;_0x22e807=_0x4a3b81[_0x45bc('0xb2')];_0x22e807=_[_0x45bc('0xb3')](_0x22e807,function(_0x5594fc){return!_0x474254[_0x45bc('0xb4')](_0x5594fc[_0x45bc('0xb5')]);});var _0x253f9d=[];var _0xeb9730=[];_0x22e807[_0x45bc('0xb6')](function(_0xfd0a08){if(_0xfd0a08['@odata.type']){var _0x2a3f7d=_0xfd0a08[_0x45bc('0xb7')][_0x45bc('0xa6')](_0xfd0a08[_0x45bc('0xb7')][_0x45bc('0xb8')]('.')+0x1);if(_0x2a3f7d===_0x45bc('0xb9')){_0x253f9d[_0x45bc('0xba')](getSelectList(_0x49cb0c,_0xb17d1c,_0xeb9730,_0x4a3b81[_0x45bc('0xae')],_0xfd0a08['MetadataId'],_0x369e3f));}}});return Promise[_0x45bc('0xbb')](_0x253f9d);})[_0x45bc('0x30')](function(_0x49e707){_0x475574=_0x49e707[0x0];var _0x5e09df=[];var _0x1e0da2=[];_0x22e807[_0x45bc('0xb6')](function(_0x1717a6){if(!_[_0x45bc('0xbc')](_0x1717a6['@odata.type'])){var _0x24f1de=_0x1717a6['@odata.type'][_0x45bc('0xa6')](_0x1717a6[_0x45bc('0xb7')][_0x45bc('0xb8')]('.')+0x1);if(_0x24f1de===_0x45bc('0xbd')){_0x5e09df[_0x45bc('0xba')](getBooleanList(_0x49cb0c,_0xb17d1c,_0x1e0da2,_0x4a3b81['MetadataId'],_0x1717a6[_0x45bc('0xae')],_0x369e3f));}}});return Promise[_0x45bc('0xbb')](_0x5e09df);})['then'](function(_0x57ccb3){_0x40c45f=_0x57ccb3[0x0];var _0x383fe7=[];var _0x1d987f=[];_0x22e807['forEach'](function(_0x15a9c5){if(_0x15a9c5['@odata.type']){var _0x18398f=_0x15a9c5[_0x45bc('0xb7')][_0x45bc('0xa6')](_0x15a9c5[_0x45bc('0xb7')]['lastIndexOf']('.')+0x1);if(_0x18398f===_0x45bc('0xbe')||_0x18398f==='DoubleAttributeMetadata'||_0x18398f===_0x45bc('0xbf')||_0x18398f===_0x45bc('0xc0')||_0x18398f===_0x45bc('0xc1')||_0x18398f===_0x45bc('0xc2')||_0x18398f==='StatusAttributeMetadata'||_0x18398f===_0x45bc('0xc3')||_0x18398f===_0x45bc('0xc4')||_0x18398f==='DecimalAttributeMetadata'){_0x383fe7['push'](getInputList(_0x49cb0c,_0xb17d1c,_0x18398f,_0x1d987f,_0x4a3b81['MetadataId'],_0x15a9c5['MetadataId'],_0x369e3f));}}});return Promise[_0x45bc('0xbb')](_0x383fe7);})[_0x45bc('0x30')](function(_0x5f137c){_0x5d3c1e=_0x5f137c[0x0];var _0x465f5d=_0x475574['concat'](_0x40c45f)['concat'](_0x5d3c1e);var _0x20e0ef={'count':_0x465f5d['length'],'rows':_0x465f5d};return _0x20e0ef;})[_0x45bc('0x30')](respondWithResult(_0x572dce,null))[_0x45bc('0x24')](function(_0x6b6e87){var _0x5756cf=_0x543795[_0x45bc('0x3c')][_0x45bc('0xc5')]?0x1f4:_0x6b6e87[_0x45bc('0xc6')]||0x1f4;logger[_0x45bc('0x21')](_0x6b6e87[_0x45bc('0x33')]);delete _0x6b6e87['name'];if(_0x5756cf===0x191){_0x5756cf=0x190;}_0x572dce['status'](_0x5756cf)[_0x45bc('0xc7')](_0x543795['query'][_0x45bc('0xc5')]?{'message':'Wrong\x20credentials','statusCode':_0x6b6e87[_0x45bc('0xc6')]}:_0x6b6e87);});};function getSelectList(_0x1da9b5,_0x309bd5,_0x9bda83,_0x5c6bbd,_0x57a4aa,_0x7fe9c1){var _0x822a7e={'method':_0x45bc('0xaf'),'uri':_0x1da9b5+_0x45bc('0xb0')+_0x5c6bbd+')/Attributes('+_0x57a4aa+_0x45bc('0xc8')+'$select=DisplayName,LogicalName&$expand=OptionSet($select=Options)','headers':{'Authorization':_0x45bc('0xab')+_0x7fe9c1,'If-None-Match':null,'OData-Version':_0x45bc('0xac')},'json':!![]};return rp(_0x822a7e)['then'](function(_0x4cfc53){var _0x465082=[];var _0x2f3dc7=_0x4cfc53[_0x45bc('0xc9')][_0x45bc('0xca')];_0x2f3dc7['forEach'](function(_0x9a0fcb){_0x465082[_0x45bc('0xba')]({'name':_0x9a0fcb[_0x45bc('0xcb')]['UserLocalizedLabel'][_0x45bc('0xcb')],'value':String(_0x9a0fcb[_0x45bc('0xcc')])});});var _0x1512b1={'id':_0x309bd5+'_'+_0x4cfc53['LogicalName'],'name':_0x4cfc53['DisplayName'][_0x45bc('0xcd')]['Label'],'custom':![],'options':_0x465082};_0x9bda83[_0x45bc('0xba')](_0x1512b1);return _0x9bda83;});}function getBooleanList(_0x40a2e8,_0x469319,_0x30f6df,_0x3f4972,_0x3e01d9,_0x35a608){var _0x3ae0dd={'method':'GET','uri':_0x40a2e8+_0x45bc('0xb0')+_0x3f4972+_0x45bc('0xce')+_0x3e01d9+_0x45bc('0xcf'),'headers':{'Authorization':_0x45bc('0xab')+_0x35a608,'If-None-Match':null,'OData-Version':_0x45bc('0xac')},'json':!![]};return rp(_0x3ae0dd)[_0x45bc('0x30')](function(_0x138e8d){var _0x5d3988=[];_0x5d3988[_0x45bc('0xba')]({'name':_0x138e8d[_0x45bc('0xc9')][_0x45bc('0xd0')][_0x45bc('0xcb')][_0x45bc('0xcd')]['Label'],'value':_0x45bc('0xd1')},{'name':_0x138e8d[_0x45bc('0xc9')]['FalseOption'][_0x45bc('0xcb')][_0x45bc('0xcd')][_0x45bc('0xcb')],'value':'false'});var _0x41939e={'id':_0x469319+'_'+_0x138e8d[_0x45bc('0xb5')],'name':_0x138e8d[_0x45bc('0xd2')][_0x45bc('0xcd')][_0x45bc('0xcb')],'custom':![],'options':_0x5d3988};_0x30f6df[_0x45bc('0xba')](_0x41939e);return _0x30f6df;});}function getInputList(_0x24788b,_0x5cdbb4,_0x2d1338,_0x29fdf2,_0x35feac,_0x3ef6e6,_0x775dd){var _0xc4a195={'method':'GET','uri':_0x24788b+_0x45bc('0xb0')+_0x35feac+_0x45bc('0xce')+_0x3ef6e6+_0x45bc('0xd3')+_0x2d1338+_0x45bc('0xd4'),'headers':{'Authorization':_0x45bc('0xab')+_0x775dd,'If-None-Match':null,'OData-Version':_0x45bc('0xac')},'json':!![]};return rp(_0xc4a195)['then'](function(_0x4e88c2){var _0x132879={'id':_0x5cdbb4+'_'+_0x4e88c2[_0x45bc('0xb5')],'name':_0x4e88c2[_0x45bc('0xd2')][_0x45bc('0xcd')]?_0x4e88c2['DisplayName']['UserLocalizedLabel'][_0x45bc('0xcb')]:_0x4e88c2[_0x45bc('0xb5')],'custom':![],'options':[]};_0x29fdf2[_0x45bc('0xba')](_0x132879);return _0x29fdf2;});} \ No newline at end of file diff --git a/server/api/intDynamics365Account/intDynamics365Account.model.js b/server/api/intDynamics365Account/intDynamics365Account.model.js index 0b3a452..21f5ef2 100644 --- a/server/api/intDynamics365Account/intDynamics365Account.model.js +++ b/server/api/intDynamics365Account/intDynamics365Account.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0713=['../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment','./intDynamics365Account.attributes','../../components/integrations/configuration','exports','define','Dynamics365Account','int_dynamics365_accounts'];(function(_0x160c73,_0x2ee678){var _0xd9302=function(_0x169454){while(--_0x169454){_0x160c73['push'](_0x160c73['shift']());}};_0xd9302(++_0x2ee678);}(_0x0713,0x1ba));var _0x3071=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0713[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x3071('0x0'))(_0x3071('0x1'));var moment=require(_0x3071('0x2'));var BPromise=require(_0x3071('0x3'));var rp=require(_0x3071('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x3071('0x5'));var config=require(_0x3071('0x6'));var attributes=require(_0x3071('0x7'));var integrations=require(_0x3071('0x8'));module[_0x3071('0x9')]=function(_0x41cf76,_0x1d3dd6){return _0x41cf76[_0x3071('0xa')](_0x3071('0xb'),attributes,{'tableName':_0x3071('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xd8b0=['exports','Dynamics365Account','int_dynamics365_accounts','lodash','util','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0xca301a,_0x59f60d){var _0x31cfb9=function(_0x38d65b){while(--_0x38d65b){_0xca301a['push'](_0xca301a['shift']());}};_0x31cfb9(++_0x59f60d);}(_0xd8b0,0xad));var _0x0d8b=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xd8b0[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0x0d8b('0x0'));var util=require(_0x0d8b('0x1'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0x0d8b('0x2'));var rp=require(_0x0d8b('0x3'));var fs=require('fs');var path=require(_0x0d8b('0x4'));var rimraf=require(_0x0d8b('0x5'));var config=require(_0x0d8b('0x6'));var attributes=require('./intDynamics365Account.attributes');var integrations=require('../../components/integrations/configuration');module[_0x0d8b('0x7')]=function(_0x227c63,_0x39f43a){return _0x227c63['define'](_0x0d8b('0x8'),attributes,{'tableName':_0x0d8b('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intDynamics365Account/intDynamics365Account.rpc.js b/server/api/intDynamics365Account/intDynamics365Account.rpc.js index 461e495..947d6cf 100644 --- a/server/api/intDynamics365Account/intDynamics365Account.rpc.js +++ b/server/api/intDynamics365Account/intDynamics365Account.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1b84=['catch','Dynamics365Account','options','raw','limit','include','map','model','attributes','debug','GetDynamics365Account','ShowDynamics365Account','where','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','info','Dynamics365Account,\x20%s,\x20%s','request\x20sent','stringify','error','message','result'];(function(_0x4285c4,_0x2ade76){var _0x5ecaad=function(_0x1def15){while(--_0x1def15){_0x4285c4['push'](_0x4285c4['shift']());}};_0x5ecaad(++_0x2ade76);}(_0x1b84,0x178));var _0x41b8=function(_0x2c5a55,_0x31e04a){_0x2c5a55=_0x2c5a55-0x0;var _0x4c4dbf=_0x1b84[_0x2c5a55];return _0x4c4dbf;};'use strict';var _=require(_0x41b8('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x41b8('0x1'));var rs=require(_0x41b8('0x2'));var fs=require('fs');var Redis=require(_0x41b8('0x3'));var db=require(_0x41b8('0x4'))['db'];var utils=require(_0x41b8('0x5'));var logger=require(_0x41b8('0x6'))(_0x41b8('0x7'));var config=require('../../config/environment');var jayson=require(_0x41b8('0x8'));var client=jayson[_0x41b8('0x9')][_0x41b8('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x33b59d,_0x339b72,_0xdecad4){return new BPromise(function(_0x2f6731,_0x4d86f4){return client[_0x41b8('0xb')](_0x33b59d,_0xdecad4)[_0x41b8('0xc')](function(_0x47e07a){logger[_0x41b8('0xd')](_0x41b8('0xe'),_0x339b72,_0x41b8('0xf'));logger['debug']('Dynamics365Account,\x20%s,\x20%s,\x20%s',_0x339b72,_0x41b8('0xf'),JSON[_0x41b8('0x10')](_0x47e07a));if(_0x47e07a[_0x41b8('0x11')]){if(_0x47e07a['error']['code']===0x1f4){logger['error']('Dynamics365Account,\x20%s,\x20%s',_0x339b72,_0x47e07a[_0x41b8('0x11')][_0x41b8('0x12')]);return _0x4d86f4(_0x47e07a[_0x41b8('0x11')][_0x41b8('0x12')]);}logger[_0x41b8('0x11')](_0x41b8('0xe'),_0x339b72,_0x47e07a['error']['message']);return _0x2f6731(_0x47e07a[_0x41b8('0x11')][_0x41b8('0x12')]);}else{logger[_0x41b8('0xd')](_0x41b8('0xe'),_0x339b72,_0x41b8('0xf'));_0x2f6731(_0x47e07a[_0x41b8('0x13')][_0x41b8('0x12')]);}})[_0x41b8('0x14')](function(_0x58dc77){logger[_0x41b8('0x11')]('Dynamics365Account,\x20%s,\x20%s',_0x339b72,_0x58dc77);_0x4d86f4(_0x58dc77);});});}exports['GetDynamics365Account']=function(_0x206783){var _0x4c3e86=this;return new Promise(function(_0x3e4946,_0x56a53c){return db[_0x41b8('0x15')]['findAll']({'raw':_0x206783[_0x41b8('0x16')]?_0x206783['options'][_0x41b8('0x17')]===undefined?!![]:![]:!![],'where':_0x206783[_0x41b8('0x16')]?_0x206783['options']['where']||null:null,'attributes':_0x206783['options']?_0x206783['options']['attributes']||null:null,'limit':_0x206783[_0x41b8('0x16')]?_0x206783['options'][_0x41b8('0x18')]||null:null,'include':_0x206783[_0x41b8('0x16')]?_0x206783[_0x41b8('0x16')][_0x41b8('0x19')]?_[_0x41b8('0x1a')](_0x206783[_0x41b8('0x16')][_0x41b8('0x19')],function(_0xad152b){return{'model':db[_0xad152b[_0x41b8('0x1b')]],'as':_0xad152b['as'],'attributes':_0xad152b[_0x41b8('0x1c')],'include':_0xad152b[_0x41b8('0x19')]?_['map'](_0xad152b[_0x41b8('0x19')],function(_0x2ed0d9){return{'model':db[_0x2ed0d9[_0x41b8('0x1b')]],'as':_0x2ed0d9['as'],'attributes':_0x2ed0d9[_0x41b8('0x1c')],'include':_0x2ed0d9['include']?_['map'](_0x2ed0d9[_0x41b8('0x19')],function(_0x3977d1){return{'model':db[_0x3977d1[_0x41b8('0x1b')]],'as':_0x3977d1['as'],'attributes':_0x3977d1['attributes']};}):[]};}):[]};}):[]:[]})[_0x41b8('0xc')](function(_0x449bfc){logger[_0x41b8('0xd')]('GetDynamics365Account',_0x206783);logger[_0x41b8('0x1d')](_0x41b8('0x1e'),_0x206783,JSON[_0x41b8('0x10')](_0x449bfc));_0x3e4946(_0x449bfc);})[_0x41b8('0x14')](function(_0x189362){logger['error'](_0x41b8('0x1e'),_0x189362['message'],_0x206783);_0x56a53c(_0x4c3e86[_0x41b8('0x11')](0x1f4,_0x189362[_0x41b8('0x12')]));});});};exports[_0x41b8('0x1f')]=function(_0x590aeb){var _0x41801a=this;return new Promise(function(_0x305ac7,_0x1e0ba1){return db[_0x41b8('0x15')]['find']({'raw':_0x590aeb['options']?_0x590aeb[_0x41b8('0x16')][_0x41b8('0x17')]===undefined?!![]:![]:!![],'where':_0x590aeb['options']?_0x590aeb[_0x41b8('0x16')][_0x41b8('0x20')]||null:null,'attributes':_0x590aeb[_0x41b8('0x16')]?_0x590aeb[_0x41b8('0x16')][_0x41b8('0x1c')]||null:null,'include':_0x590aeb[_0x41b8('0x16')]?_0x590aeb[_0x41b8('0x16')][_0x41b8('0x19')]?_[_0x41b8('0x1a')](_0x590aeb[_0x41b8('0x16')]['include'],function(_0x15f98a){return{'model':db[_0x15f98a[_0x41b8('0x1b')]],'as':_0x15f98a['as'],'attributes':_0x15f98a[_0x41b8('0x1c')],'include':_0x15f98a[_0x41b8('0x19')]?_[_0x41b8('0x1a')](_0x15f98a['include'],function(_0x5ae51d){return{'model':db[_0x5ae51d[_0x41b8('0x1b')]],'as':_0x5ae51d['as'],'attributes':_0x5ae51d[_0x41b8('0x1c')],'include':_0x5ae51d[_0x41b8('0x19')]?_[_0x41b8('0x1a')](_0x5ae51d[_0x41b8('0x19')],function(_0x491051){return{'model':db[_0x491051[_0x41b8('0x1b')]],'as':_0x491051['as'],'attributes':_0x491051[_0x41b8('0x1c')]};}):[]};}):[]};}):[]:[]})[_0x41b8('0xc')](function(_0x3eea54){logger[_0x41b8('0xd')](_0x41b8('0x1f'),_0x590aeb);logger['debug']('ShowDynamics365Account',_0x590aeb,JSON[_0x41b8('0x10')](_0x3eea54));_0x305ac7(_0x3eea54);})[_0x41b8('0x14')](function(_0xf0a581){logger['error'](_0x41b8('0x1f'),_0xf0a581['message'],_0x590aeb);_0x1e0ba1(_0x41801a['error'](0x1f4,_0xf0a581[_0x41b8('0x12')]));});});}; \ No newline at end of file +var _0x7a5b=['catch','GetDynamics365Account','Dynamics365Account','findAll','options','where','attributes','limit','include','map','model','debug','stringify','ShowDynamics365Account','find','raw','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise','client','http','request','then','info','Dynamics365Account,\x20%s,\x20%s','request\x20sent','error','message','result'];(function(_0x4c0757,_0x444b70){var _0x4ef9ef=function(_0x116020){while(--_0x116020){_0x4c0757['push'](_0x4c0757['shift']());}};_0x4ef9ef(++_0x444b70);}(_0x7a5b,0x1d7));var _0xb7a5=function(_0x28e5ef,_0x4e406f){_0x28e5ef=_0x28e5ef-0x0;var _0x128683=_0x7a5b[_0x28e5ef];return _0x128683;};'use strict';var _=require(_0xb7a5('0x0'));var util=require(_0xb7a5('0x1'));var moment=require('moment');var BPromise=require(_0xb7a5('0x2'));var rs=require(_0xb7a5('0x3'));var fs=require('fs');var Redis=require(_0xb7a5('0x4'));var db=require(_0xb7a5('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xb7a5('0x6'))(_0xb7a5('0x7'));var config=require('../../config/environment');var jayson=require(_0xb7a5('0x8'));var client=jayson[_0xb7a5('0x9')][_0xb7a5('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x583712,_0x3927c7,_0x6f8d03){return new BPromise(function(_0x257f7e,_0x1d514c){return client[_0xb7a5('0xb')](_0x583712,_0x6f8d03)[_0xb7a5('0xc')](function(_0x37a034){logger[_0xb7a5('0xd')](_0xb7a5('0xe'),_0x3927c7,'request\x20sent');logger['debug']('Dynamics365Account,\x20%s,\x20%s,\x20%s',_0x3927c7,_0xb7a5('0xf'),JSON['stringify'](_0x37a034));if(_0x37a034[_0xb7a5('0x10')]){if(_0x37a034['error']['code']===0x1f4){logger['error'](_0xb7a5('0xe'),_0x3927c7,_0x37a034['error'][_0xb7a5('0x11')]);return _0x1d514c(_0x37a034[_0xb7a5('0x10')][_0xb7a5('0x11')]);}logger['error'](_0xb7a5('0xe'),_0x3927c7,_0x37a034[_0xb7a5('0x10')][_0xb7a5('0x11')]);return _0x257f7e(_0x37a034[_0xb7a5('0x10')][_0xb7a5('0x11')]);}else{logger[_0xb7a5('0xd')](_0xb7a5('0xe'),_0x3927c7,_0xb7a5('0xf'));_0x257f7e(_0x37a034[_0xb7a5('0x12')][_0xb7a5('0x11')]);}})[_0xb7a5('0x13')](function(_0xd411ee){logger[_0xb7a5('0x10')](_0xb7a5('0xe'),_0x3927c7,_0xd411ee);_0x1d514c(_0xd411ee);});});}exports[_0xb7a5('0x14')]=function(_0x3f8b57){var _0x136080=this;return new Promise(function(_0x50262b,_0x123dbf){return db[_0xb7a5('0x15')][_0xb7a5('0x16')]({'raw':_0x3f8b57[_0xb7a5('0x17')]?_0x3f8b57[_0xb7a5('0x17')]['raw']===undefined?!![]:![]:!![],'where':_0x3f8b57['options']?_0x3f8b57[_0xb7a5('0x17')][_0xb7a5('0x18')]||null:null,'attributes':_0x3f8b57[_0xb7a5('0x17')]?_0x3f8b57[_0xb7a5('0x17')][_0xb7a5('0x19')]||null:null,'limit':_0x3f8b57[_0xb7a5('0x17')]?_0x3f8b57[_0xb7a5('0x17')][_0xb7a5('0x1a')]||null:null,'include':_0x3f8b57[_0xb7a5('0x17')]?_0x3f8b57[_0xb7a5('0x17')]['include']?_['map'](_0x3f8b57[_0xb7a5('0x17')][_0xb7a5('0x1b')],function(_0x3014cd){return{'model':db[_0x3014cd['model']],'as':_0x3014cd['as'],'attributes':_0x3014cd['attributes'],'include':_0x3014cd[_0xb7a5('0x1b')]?_[_0xb7a5('0x1c')](_0x3014cd[_0xb7a5('0x1b')],function(_0x3f0e4e){return{'model':db[_0x3f0e4e[_0xb7a5('0x1d')]],'as':_0x3f0e4e['as'],'attributes':_0x3f0e4e[_0xb7a5('0x19')],'include':_0x3f0e4e[_0xb7a5('0x1b')]?_[_0xb7a5('0x1c')](_0x3f0e4e[_0xb7a5('0x1b')],function(_0x445210){return{'model':db[_0x445210[_0xb7a5('0x1d')]],'as':_0x445210['as'],'attributes':_0x445210[_0xb7a5('0x19')]};}):[]};}):[]};}):[]:[]})[_0xb7a5('0xc')](function(_0x30d3c5){logger[_0xb7a5('0xd')](_0xb7a5('0x14'),_0x3f8b57);logger[_0xb7a5('0x1e')](_0xb7a5('0x14'),_0x3f8b57,JSON[_0xb7a5('0x1f')](_0x30d3c5));_0x50262b(_0x30d3c5);})[_0xb7a5('0x13')](function(_0x3ea81d){logger[_0xb7a5('0x10')](_0xb7a5('0x14'),_0x3ea81d[_0xb7a5('0x11')],_0x3f8b57);_0x123dbf(_0x136080[_0xb7a5('0x10')](0x1f4,_0x3ea81d[_0xb7a5('0x11')]));});});};exports[_0xb7a5('0x20')]=function(_0x3f5272){var _0x21b619=this;return new Promise(function(_0x20a052,_0x1fcc07){return db[_0xb7a5('0x15')][_0xb7a5('0x21')]({'raw':_0x3f5272[_0xb7a5('0x17')]?_0x3f5272[_0xb7a5('0x17')][_0xb7a5('0x22')]===undefined?!![]:![]:!![],'where':_0x3f5272[_0xb7a5('0x17')]?_0x3f5272[_0xb7a5('0x17')][_0xb7a5('0x18')]||null:null,'attributes':_0x3f5272[_0xb7a5('0x17')]?_0x3f5272['options']['attributes']||null:null,'include':_0x3f5272['options']?_0x3f5272[_0xb7a5('0x17')][_0xb7a5('0x1b')]?_[_0xb7a5('0x1c')](_0x3f5272[_0xb7a5('0x17')][_0xb7a5('0x1b')],function(_0x278e86){return{'model':db[_0x278e86[_0xb7a5('0x1d')]],'as':_0x278e86['as'],'attributes':_0x278e86[_0xb7a5('0x19')],'include':_0x278e86[_0xb7a5('0x1b')]?_[_0xb7a5('0x1c')](_0x278e86['include'],function(_0x5d7256){return{'model':db[_0x5d7256[_0xb7a5('0x1d')]],'as':_0x5d7256['as'],'attributes':_0x5d7256[_0xb7a5('0x19')],'include':_0x5d7256[_0xb7a5('0x1b')]?_[_0xb7a5('0x1c')](_0x5d7256[_0xb7a5('0x1b')],function(_0x361ba2){return{'model':db[_0x361ba2[_0xb7a5('0x1d')]],'as':_0x361ba2['as'],'attributes':_0x361ba2[_0xb7a5('0x19')]};}):[]};}):[]};}):[]:[]})[_0xb7a5('0xc')](function(_0x90490e){logger[_0xb7a5('0xd')]('ShowDynamics365Account',_0x3f5272);logger[_0xb7a5('0x1e')]('ShowDynamics365Account',_0x3f5272,JSON[_0xb7a5('0x1f')](_0x90490e));_0x20a052(_0x90490e);})[_0xb7a5('0x13')](function(_0x4f2e64){logger[_0xb7a5('0x10')](_0xb7a5('0x20'),_0x4f2e64['message'],_0x3f5272);_0x1fcc07(_0x21b619[_0xb7a5('0x10')](0x1f4,_0x4f2e64[_0xb7a5('0x11')]));});});}; \ No newline at end of file diff --git a/server/api/intDynamics365Configuration/index.js b/server/api/intDynamics365Configuration/index.js index 6f7469a..665ffa4 100644 --- a/server/api/intDynamics365Configuration/index.js +++ b/server/api/intDynamics365Configuration/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x00f0=['getFields','/:id/subjects','getSubjects','/:id/descriptions','getDescriptions','post','update','delete','destroy','multer','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./intDynamics365Configuration.controller','isAuthenticated','get','/:id','show','/:id/fields'];(function(_0x186376,_0x5d988a){var _0x2dbdd9=function(_0x96908e){while(--_0x96908e){_0x186376['push'](_0x186376['shift']());}};_0x2dbdd9(++_0x5d988a);}(_0x00f0,0x111));var _0x000f=function(_0x44fec0,_0x3db6df){_0x44fec0=_0x44fec0-0x0;var _0x217c5b=_0x00f0[_0x44fec0];return _0x217c5b;};'use strict';var multer=require(_0x000f('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x000f('0x1'));var express=require(_0x000f('0x2'));var router=express[_0x000f('0x3')]();var fs_extra=require(_0x000f('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x000f('0x5'));var config=require(_0x000f('0x6'));var controller=require(_0x000f('0x7'));router['get']('/',auth[_0x000f('0x8')](),controller['index']);router[_0x000f('0x9')](_0x000f('0xa'),auth[_0x000f('0x8')](),controller[_0x000f('0xb')]);router[_0x000f('0x9')](_0x000f('0xc'),auth['isAuthenticated'](),controller[_0x000f('0xd')]);router[_0x000f('0x9')](_0x000f('0xe'),auth['isAuthenticated'](),controller[_0x000f('0xf')]);router[_0x000f('0x9')](_0x000f('0x10'),auth[_0x000f('0x8')](),controller[_0x000f('0x11')]);router[_0x000f('0x12')]('/',auth['isAuthenticated'](),controller['create']);router['put'](_0x000f('0xa'),auth[_0x000f('0x8')](),controller[_0x000f('0x13')]);router[_0x000f('0x14')]('/:id',auth[_0x000f('0x8')](),controller[_0x000f('0x15')]);module['exports']=router; \ No newline at end of file +var _0x5386=['put','/:id','update','delete','destroy','exports','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intDynamics365Configuration.controller','get','isAuthenticated','show','/:id/fields','getFields','/:id/subjects','getSubjects','/:id/descriptions','getDescriptions'];(function(_0x18cd5b,_0x10240b){var _0x5eaa52=function(_0x2bccad){while(--_0x2bccad){_0x18cd5b['push'](_0x18cd5b['shift']());}};_0x5eaa52(++_0x10240b);}(_0x5386,0x1e1));var _0x6538=function(_0x5c3a6a,_0x5e567a){_0x5c3a6a=_0x5c3a6a-0x0;var _0x68d5d6=_0x5386[_0x5c3a6a];return _0x68d5d6;};'use strict';var multer=require(_0x6538('0x0'));var util=require(_0x6538('0x1'));var path=require(_0x6538('0x2'));var timeout=require(_0x6538('0x3'));var express=require('express');var router=express[_0x6538('0x4')]();var fs_extra=require(_0x6538('0x5'));var auth=require(_0x6538('0x6'));var interaction=require(_0x6538('0x7'));var config=require(_0x6538('0x8'));var controller=require(_0x6538('0x9'));router[_0x6538('0xa')]('/',auth[_0x6538('0xb')](),controller['index']);router[_0x6538('0xa')]('/:id',auth[_0x6538('0xb')](),controller[_0x6538('0xc')]);router[_0x6538('0xa')](_0x6538('0xd'),auth[_0x6538('0xb')](),controller[_0x6538('0xe')]);router[_0x6538('0xa')](_0x6538('0xf'),auth[_0x6538('0xb')](),controller[_0x6538('0x10')]);router['get'](_0x6538('0x11'),auth[_0x6538('0xb')](),controller[_0x6538('0x12')]);router['post']('/',auth[_0x6538('0xb')](),controller['create']);router[_0x6538('0x13')](_0x6538('0x14'),auth['isAuthenticated'](),controller[_0x6538('0x15')]);router[_0x6538('0x16')]('/:id',auth[_0x6538('0xb')](),controller[_0x6538('0x17')]);module[_0x6538('0x18')]=router; \ No newline at end of file diff --git a/server/api/intDynamics365Configuration/intDynamics365Configuration.attributes.js b/server/api/intDynamics365Configuration/intDynamics365Configuration.attributes.js index 337711c..4a92ee2 100644 --- a/server/api/intDynamics365Configuration/intDynamics365Configuration.attributes.js +++ b/server/api/intDynamics365Configuration/intDynamics365Configuration.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xccaf=['exports','STRING','ENUM','incident','phonecall','sequelize'];(function(_0x18ab2a,_0x4debcd){var _0x16dcee=function(_0x10107a){while(--_0x10107a){_0x18ab2a['push'](_0x18ab2a['shift']());}};_0x16dcee(++_0x4debcd);}(_0xccaf,0xb3));var _0xfcca=function(_0x3168e1,_0xa046e0){_0x3168e1=_0x3168e1-0x0;var _0x13ad69=_0xccaf[_0x3168e1];return _0x13ad69;};'use strict';var Sequelize=require(_0xfcca('0x0'));module[_0xfcca('0x1')]={'name':{'type':Sequelize[_0xfcca('0x2')]},'description':{'type':Sequelize[_0xfcca('0x2')]},'ticketType':{'type':Sequelize[_0xfcca('0x3')](_0xfcca('0x4'),_0xfcca('0x5')),'defaultValue':_0xfcca('0x4')}}; \ No newline at end of file +var _0x30c7=['STRING','ENUM','incident','phonecall','sequelize','exports'];(function(_0x248184,_0x44e899){var _0x5517c7=function(_0x37a131){while(--_0x37a131){_0x248184['push'](_0x248184['shift']());}};_0x5517c7(++_0x44e899);}(_0x30c7,0x118));var _0x730c=function(_0x406973,_0xc02370){_0x406973=_0x406973-0x0;var _0x12813b=_0x30c7[_0x406973];return _0x12813b;};'use strict';var Sequelize=require(_0x730c('0x0'));module[_0x730c('0x1')]={'name':{'type':Sequelize[_0x730c('0x2')]},'description':{'type':Sequelize[_0x730c('0x2')]},'ticketType':{'type':Sequelize[_0x730c('0x3')](_0x730c('0x4'),_0x730c('0x5')),'defaultValue':_0x730c('0x4')}}; \ No newline at end of file diff --git a/server/api/intDynamics365Configuration/intDynamics365Configuration.controller.js b/server/api/intDynamics365Configuration/intDynamics365Configuration.controller.js index c9107e8..6e20214 100644 --- a/server/api/intDynamics365Configuration/intDynamics365Configuration.controller.js +++ b/server/api/intDynamics365Configuration/intDynamics365Configuration.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb5aa=['findAll','rows','show','params','length','find','create','body','getFields','Dynamics365Field','hasOwnProperty','getSubjects','findOne','getDescriptions','eml-format','rimraf','fast-json-patch','request-promise','moment','mustache','util','path','sox','ejs','fs-extra','lodash','crypto','desk.js','to-csv','querystring','papaparse','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','jayson/promise','http','request','Dynamics365Configuration,\x20%s,\x20%s','request\x20sent','Dynamics365Configuration,\x20%s,\x20%s,\x20%s','stringify','error','message','info','catch','sendStatus','status','json','offset','limit','undefined','set','Content-Range','apply','reject','save','update','then','destroy','name','send','map','Dynamics365Configuration','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','nolimit','order','sort','pick','filter','where','merge','VIRTUAL','options','count','include'];(function(_0x5a6ee4,_0x2e1727){var _0x5906fa=function(_0x3aacb5){while(--_0x3aacb5){_0x5a6ee4['push'](_0x5a6ee4['shift']());}};_0x5906fa(++_0x2e1727);}(_0xb5aa,0x116));var _0xab5a=function(_0x413feb,_0x10477f){_0x413feb=_0x413feb-0x0;var _0x40ee88=_0xb5aa[_0x413feb];return _0x40ee88;};'use strict';var emlformat=require(_0xab5a('0x0'));var rimraf=require(_0xab5a('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xab5a('0x2'));var rp=require(_0xab5a('0x3'));var moment=require(_0xab5a('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xab5a('0x5'));var util=require(_0xab5a('0x6'));var path=require(_0xab5a('0x7'));var sox=require(_0xab5a('0x8'));var csv=require('to-csv');var ejs=require(_0xab5a('0x9'));var fs=require('fs');var fs_extra=require(_0xab5a('0xa'));var _=require(_0xab5a('0xb'));var squel=require('squel');var crypto=require(_0xab5a('0xc'));var jsforce=require('jsforce');var deskjs=require(_0xab5a('0xd'));var toCsv=require(_0xab5a('0xe'));var querystring=require(_0xab5a('0xf'));var Papa=require(_0xab5a('0x10'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0xab5a('0x11'));var hardwareService=require(_0xab5a('0x12'));var logger=require(_0xab5a('0x13'))(_0xab5a('0x14'));var utils=require(_0xab5a('0x15'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0xab5a('0x16'))['db'];var jayson=require(_0xab5a('0x17'));var client=jayson['client'][_0xab5a('0x18')]({'port':0x232a});function respondWithRpcPromise(_0x701b21,_0x117d6b,_0x1b74fd,_0x2540ac){return new BPromise(function(_0x5263c2,_0x3de3e4){var _0x33562a=_0x2540ac||client;return _0x33562a[_0xab5a('0x19')](_0x701b21,_0x1b74fd)['then'](function(_0x244843){logger['info'](_0xab5a('0x1a'),_0x117d6b,_0xab5a('0x1b'));logger['debug'](_0xab5a('0x1c'),_0x117d6b,_0xab5a('0x1b'),JSON[_0xab5a('0x1d')](_0x244843));if(_0x244843['error']){if(_0x244843['error']['code']===0x1f4){logger[_0xab5a('0x1e')](_0xab5a('0x1a'),_0x117d6b,_0x244843[_0xab5a('0x1e')][_0xab5a('0x1f')]);return _0x3de3e4(_0x244843[_0xab5a('0x1e')]['message']);}logger['error'](_0xab5a('0x1a'),_0x117d6b,_0x244843[_0xab5a('0x1e')][_0xab5a('0x1f')]);return _0x5263c2(_0x244843['error'][_0xab5a('0x1f')]);}else{logger[_0xab5a('0x20')]('Dynamics365Configuration,\x20%s,\x20%s',_0x117d6b,_0xab5a('0x1b'));_0x5263c2(_0x244843['result'][_0xab5a('0x1f')]);}})[_0xab5a('0x21')](function(_0x258d95){logger[_0xab5a('0x1e')](_0xab5a('0x1a'),_0x117d6b,_0x258d95);_0x3de3e4(_0x258d95);});});}function respondWithStatusCode(_0x1f3d6a,_0x58dcb8){_0x58dcb8=_0x58dcb8||0xcc;return function(_0x10dc1b){if(_0x10dc1b){return _0x1f3d6a[_0xab5a('0x22')](_0x58dcb8);}return _0x1f3d6a[_0xab5a('0x23')](_0x58dcb8)['end']();};}function respondWithResult(_0x3ca84d,_0xfe6c0b){_0xfe6c0b=_0xfe6c0b||0xc8;return function(_0x20f921){if(_0x20f921){return _0x3ca84d['status'](_0xfe6c0b)[_0xab5a('0x24')](_0x20f921);}};}function respondWithFilteredResult(_0x11556a,_0x5a9630){return function(_0x282b9f){if(_0x282b9f){var _0x418cd5=typeof _0x5a9630[_0xab5a('0x25')]==='undefined'&&typeof _0x5a9630[_0xab5a('0x26')]===_0xab5a('0x27');var _0x22bf8b=_0x282b9f['count'];var _0x13339d=_0x418cd5?0x0:_0x5a9630['offset'];var _0x29b576=_0x418cd5?_0x282b9f['count']:_0x5a9630['offset']+_0x5a9630[_0xab5a('0x26')];var _0x277a64;if(_0x29b576>=_0x22bf8b){_0x29b576=_0x22bf8b;_0x277a64=0xc8;}else{_0x277a64=0xce;}_0x11556a[_0xab5a('0x23')](_0x277a64);return _0x11556a[_0xab5a('0x28')](_0xab5a('0x29'),_0x13339d+'-'+_0x29b576+'/'+_0x22bf8b)[_0xab5a('0x24')](_0x282b9f);}return null;};}function patchUpdates(_0x114acf){return function(_0x11bf27){try{jsonpatch[_0xab5a('0x2a')](_0x11bf27,_0x114acf,!![]);}catch(_0x48b769){return BPromise[_0xab5a('0x2b')](_0x48b769);}return _0x11bf27[_0xab5a('0x2c')]();};}function saveUpdates(_0x557a6a,_0x459747){return function(_0x5b031d){if(_0x5b031d){return _0x5b031d[_0xab5a('0x2d')](_0x557a6a)[_0xab5a('0x2e')](function(_0x3fe6cf){return _0x3fe6cf;});}return null;};}function removeEntity(_0x3da292,_0x2d305d){return function(_0x3e3aa0){if(_0x3e3aa0){return _0x3e3aa0[_0xab5a('0x2f')]()['then'](function(){_0x3da292[_0xab5a('0x23')](0xcc)['end']();});}};}function handleEntityNotFound(_0x453538,_0x956461){return function(_0x27d792){if(!_0x27d792){_0x453538[_0xab5a('0x22')](0x194);}return _0x27d792;};}function handleError(_0x29fba3,_0x3db730){_0x3db730=_0x3db730||0x1f4;return function(_0x494c09){logger[_0xab5a('0x1e')](_0x494c09['stack']);if(_0x494c09[_0xab5a('0x30')]){delete _0x494c09[_0xab5a('0x30')];}_0x29fba3['status'](_0x3db730)[_0xab5a('0x31')](_0x494c09);};}exports['index']=function(_0x538f97,_0xb1c04f){var _0x4c98c6={},_0xb0b38a={},_0x1f22ff={'count':0x0,'rows':[]};var _0x145155=_[_0xab5a('0x32')](db[_0xab5a('0x33')][_0xab5a('0x34')],function(_0x4f14ce){return{'name':_0x4f14ce[_0xab5a('0x35')],'type':_0x4f14ce[_0xab5a('0x36')][_0xab5a('0x37')]};});_0xb0b38a[_0xab5a('0x38')]=_[_0xab5a('0x32')](_0x145155,_0xab5a('0x30'));_0xb0b38a[_0xab5a('0x39')]=_[_0xab5a('0x3a')](_0x538f97[_0xab5a('0x39')]);_0xb0b38a[_0xab5a('0x3b')]=_[_0xab5a('0x3c')](_0xb0b38a['model'],_0xb0b38a[_0xab5a('0x39')]);_0x4c98c6[_0xab5a('0x3d')]=_[_0xab5a('0x3c')](_0xb0b38a[_0xab5a('0x38')],qs[_0xab5a('0x3e')](_0x538f97[_0xab5a('0x39')][_0xab5a('0x3e')]));_0x4c98c6[_0xab5a('0x3d')]=_0x4c98c6[_0xab5a('0x3d')]['length']?_0x4c98c6[_0xab5a('0x3d')]:_0xb0b38a[_0xab5a('0x38')];if(!_0x538f97[_0xab5a('0x39')]['hasOwnProperty'](_0xab5a('0x3f'))){_0x4c98c6[_0xab5a('0x26')]=qs[_0xab5a('0x26')](_0x538f97[_0xab5a('0x39')][_0xab5a('0x26')]);_0x4c98c6[_0xab5a('0x25')]=qs['offset'](_0x538f97[_0xab5a('0x39')][_0xab5a('0x25')]);}_0x4c98c6[_0xab5a('0x40')]=qs['sort'](_0x538f97[_0xab5a('0x39')][_0xab5a('0x41')]);_0x4c98c6['where']=qs[_0xab5a('0x3b')](_[_0xab5a('0x42')](_0x538f97['query'],_0xb0b38a['filters']),_0x145155);if(_0x538f97[_0xab5a('0x39')][_0xab5a('0x43')]){_0x4c98c6[_0xab5a('0x44')]=_[_0xab5a('0x45')](_0x4c98c6[_0xab5a('0x44')],{'$or':_[_0xab5a('0x32')](_0x145155,function(_0x277669){if(_0x277669[_0xab5a('0x36')]!==_0xab5a('0x46')){var _0x3915b2={};_0x3915b2[_0x277669['name']]={'$like':'%'+_0x538f97[_0xab5a('0x39')][_0xab5a('0x43')]+'%'};return _0x3915b2;}})});}_0x4c98c6=_[_0xab5a('0x45')]({},_0x4c98c6,_0x538f97[_0xab5a('0x47')]);var _0x19bbf3={'where':_0x4c98c6[_0xab5a('0x44')]};return db[_0xab5a('0x33')]['count'](_0x19bbf3)['then'](function(_0x2f5131){_0x1f22ff[_0xab5a('0x48')]=_0x2f5131;if(_0x538f97[_0xab5a('0x39')]['includeAll']){_0x4c98c6[_0xab5a('0x49')]=[{'all':!![]}];}return db['Dynamics365Configuration'][_0xab5a('0x4a')](_0x4c98c6);})[_0xab5a('0x2e')](function(_0x1928fa){_0x1f22ff[_0xab5a('0x4b')]=_0x1928fa;return _0x1f22ff;})[_0xab5a('0x2e')](respondWithFilteredResult(_0xb1c04f,_0x4c98c6))[_0xab5a('0x21')](handleError(_0xb1c04f,null));};exports[_0xab5a('0x4c')]=function(_0x57d53a,_0x812410){var _0x5827ad={'raw':![],'where':{'id':_0x57d53a[_0xab5a('0x4d')]['id']}},_0x42d2af={};_0x42d2af[_0xab5a('0x38')]=_['keys'](db[_0xab5a('0x33')][_0xab5a('0x34')]);_0x42d2af['query']=_[_0xab5a('0x3a')](_0x57d53a['query']);_0x42d2af[_0xab5a('0x3b')]=_['intersection'](_0x42d2af['model'],_0x42d2af[_0xab5a('0x39')]);_0x5827ad[_0xab5a('0x3d')]=_[_0xab5a('0x3c')](_0x42d2af[_0xab5a('0x38')],qs['fields'](_0x57d53a['query'][_0xab5a('0x3e')]));_0x5827ad[_0xab5a('0x3d')]=_0x5827ad['attributes'][_0xab5a('0x4e')]?_0x5827ad[_0xab5a('0x3d')]:_0x42d2af[_0xab5a('0x38')];if(_0x57d53a[_0xab5a('0x39')]['includeAll']){_0x5827ad[_0xab5a('0x49')]=[{'all':!![]}];}_0x5827ad=_[_0xab5a('0x45')]({},_0x5827ad,_0x57d53a[_0xab5a('0x47')]);return db[_0xab5a('0x33')][_0xab5a('0x4f')](_0x5827ad)[_0xab5a('0x2e')](handleEntityNotFound(_0x812410,null))[_0xab5a('0x2e')](respondWithResult(_0x812410,null))[_0xab5a('0x21')](handleError(_0x812410,null));};exports['create']=function(_0x4d9471,_0x29bc46){return db['Dynamics365Configuration'][_0xab5a('0x50')](_0x4d9471[_0xab5a('0x51')],{})['then'](respondWithResult(_0x29bc46,0xc9))[_0xab5a('0x21')](handleError(_0x29bc46,null));};exports[_0xab5a('0x2d')]=function(_0x4fbd7b,_0x58a939){if(_0x4fbd7b[_0xab5a('0x51')]['id']){delete _0x4fbd7b[_0xab5a('0x51')]['id'];}return db[_0xab5a('0x33')]['find']({'where':{'id':_0x4fbd7b[_0xab5a('0x4d')]['id']}})[_0xab5a('0x2e')](handleEntityNotFound(_0x58a939,null))[_0xab5a('0x2e')](saveUpdates(_0x4fbd7b[_0xab5a('0x51')],null))[_0xab5a('0x2e')](respondWithResult(_0x58a939,null))[_0xab5a('0x21')](handleError(_0x58a939,null));};exports[_0xab5a('0x2f')]=function(_0xec6155,_0x2d4692){return db[_0xab5a('0x33')][_0xab5a('0x4f')]({'where':{'id':_0xec6155['params']['id']}})[_0xab5a('0x2e')](handleEntityNotFound(_0x2d4692,null))['then'](removeEntity(_0x2d4692,null))['catch'](handleError(_0x2d4692,null));};exports[_0xab5a('0x52')]=function(_0x5d85a9,_0x5bef79,_0x2f0c1){var _0x5cafa9={};var _0xf08917={};var _0x3cdeb5;var _0x4a2a5a;return db[_0xab5a('0x33')]['findOne']({'where':{'id':_0x5d85a9[_0xab5a('0x4d')]['id']}})[_0xab5a('0x2e')](handleEntityNotFound(_0x5bef79,null))['then'](function(_0x25a142){if(_0x25a142){_0x3cdeb5=_0x25a142;_0xf08917[_0xab5a('0x38')]=_['keys'](db[_0xab5a('0x53')]['rawAttributes']);_0xf08917[_0xab5a('0x39')]=_[_0xab5a('0x3a')](_0x5d85a9[_0xab5a('0x39')]);_0xf08917['filters']=_[_0xab5a('0x3c')](_0xf08917[_0xab5a('0x38')],_0xf08917[_0xab5a('0x39')]);_0x5cafa9[_0xab5a('0x3d')]=_[_0xab5a('0x3c')](_0xf08917['model'],qs['fields'](_0x5d85a9[_0xab5a('0x39')][_0xab5a('0x3e')]));_0x5cafa9[_0xab5a('0x3d')]=_0x5cafa9[_0xab5a('0x3d')]['length']?_0x5cafa9[_0xab5a('0x3d')]:_0xf08917[_0xab5a('0x38')];_0x5cafa9[_0xab5a('0x40')]=qs[_0xab5a('0x41')](_0x5d85a9[_0xab5a('0x39')]['sort']);_0x5cafa9[_0xab5a('0x44')]=qs[_0xab5a('0x3b')](_[_0xab5a('0x42')](_0x5d85a9[_0xab5a('0x39')],_0xf08917[_0xab5a('0x3b')]));if(_0x5d85a9[_0xab5a('0x39')][_0xab5a('0x43')]){_0x5cafa9[_0xab5a('0x44')]=_[_0xab5a('0x45')](_0x5cafa9[_0xab5a('0x44')],{'$or':_[_0xab5a('0x32')](_0x5cafa9[_0xab5a('0x3d')],function(_0xa1d248){var _0x181342={};_0x181342[_0xa1d248]={'$like':'%'+_0x5d85a9[_0xab5a('0x39')]['filter']+'%'};return _0x181342;})});}_0x5cafa9=_['merge']({},_0x5cafa9,_0x5d85a9[_0xab5a('0x47')]);return _0x3cdeb5[_0xab5a('0x52')](_0x5cafa9);}})[_0xab5a('0x2e')](function(_0x41e771){if(_0x41e771){_0x4a2a5a=_0x41e771[_0xab5a('0x4e')];if(!_0x5d85a9['query'][_0xab5a('0x54')]('nolimit')){_0x5cafa9[_0xab5a('0x26')]=qs['limit'](_0x5d85a9[_0xab5a('0x39')][_0xab5a('0x26')]);_0x5cafa9['offset']=qs['offset'](_0x5d85a9[_0xab5a('0x39')][_0xab5a('0x25')]);}return _0x3cdeb5['getFields'](_0x5cafa9);}})[_0xab5a('0x2e')](function(_0x4f1ea5){if(_0x4f1ea5){return _0x4f1ea5?{'count':_0x4a2a5a,'rows':_0x4f1ea5}:null;}})['then'](respondWithResult(_0x5bef79,null))[_0xab5a('0x21')](handleError(_0x5bef79,null));};exports[_0xab5a('0x55')]=function(_0x3fd3c0,_0x36b6a8,_0x3de5e0){var _0x3b78a8={};var _0x3b12b9={};var _0x5d85f9;var _0x22b338;return db[_0xab5a('0x33')][_0xab5a('0x56')]({'where':{'id':_0x3fd3c0['params']['id']}})[_0xab5a('0x2e')](handleEntityNotFound(_0x36b6a8,null))[_0xab5a('0x2e')](function(_0x4273e2){if(_0x4273e2){_0x5d85f9=_0x4273e2;_0x3b12b9[_0xab5a('0x38')]=_[_0xab5a('0x3a')](db[_0xab5a('0x53')][_0xab5a('0x34')]);_0x3b12b9[_0xab5a('0x39')]=_[_0xab5a('0x3a')](_0x3fd3c0[_0xab5a('0x39')]);_0x3b12b9[_0xab5a('0x3b')]=_[_0xab5a('0x3c')](_0x3b12b9[_0xab5a('0x38')],_0x3b12b9[_0xab5a('0x39')]);_0x3b78a8[_0xab5a('0x3d')]=_[_0xab5a('0x3c')](_0x3b12b9['model'],qs['fields'](_0x3fd3c0[_0xab5a('0x39')][_0xab5a('0x3e')]));_0x3b78a8['attributes']=_0x3b78a8[_0xab5a('0x3d')]['length']?_0x3b78a8[_0xab5a('0x3d')]:_0x3b12b9[_0xab5a('0x38')];_0x3b78a8[_0xab5a('0x40')]=qs['sort'](_0x3fd3c0[_0xab5a('0x39')][_0xab5a('0x41')]);_0x3b78a8[_0xab5a('0x44')]=qs['filters'](_[_0xab5a('0x42')](_0x3fd3c0[_0xab5a('0x39')],_0x3b12b9['filters']));if(_0x3fd3c0['query'][_0xab5a('0x43')]){_0x3b78a8[_0xab5a('0x44')]=_[_0xab5a('0x45')](_0x3b78a8[_0xab5a('0x44')],{'$or':_[_0xab5a('0x32')](_0x3b78a8[_0xab5a('0x3d')],function(_0x404623){var _0x24856b={};_0x24856b[_0x404623]={'$like':'%'+_0x3fd3c0[_0xab5a('0x39')][_0xab5a('0x43')]+'%'};return _0x24856b;})});}_0x3b78a8=_['merge']({},_0x3b78a8,_0x3fd3c0[_0xab5a('0x47')]);return _0x5d85f9['getSubjects'](_0x3b78a8);}})[_0xab5a('0x2e')](function(_0x571196){if(_0x571196){_0x22b338=_0x571196[_0xab5a('0x4e')];if(!_0x3fd3c0[_0xab5a('0x39')][_0xab5a('0x54')]('nolimit')){_0x3b78a8[_0xab5a('0x26')]=qs[_0xab5a('0x26')](_0x3fd3c0[_0xab5a('0x39')][_0xab5a('0x26')]);_0x3b78a8[_0xab5a('0x25')]=qs[_0xab5a('0x25')](_0x3fd3c0[_0xab5a('0x39')][_0xab5a('0x25')]);}return _0x5d85f9[_0xab5a('0x55')](_0x3b78a8);}})['then'](function(_0x265ac6){if(_0x265ac6){return _0x265ac6?{'count':_0x22b338,'rows':_0x265ac6}:null;}})[_0xab5a('0x2e')](respondWithResult(_0x36b6a8,null))[_0xab5a('0x21')](handleError(_0x36b6a8,null));};exports[_0xab5a('0x57')]=function(_0x6775,_0x43a949,_0x342da4){var _0x5e8f4f={};var _0x4e5115={};var _0x466d4f;var _0x59d4e1;return db[_0xab5a('0x33')][_0xab5a('0x56')]({'where':{'id':_0x6775[_0xab5a('0x4d')]['id']}})[_0xab5a('0x2e')](handleEntityNotFound(_0x43a949,null))[_0xab5a('0x2e')](function(_0x3e2893){if(_0x3e2893){_0x466d4f=_0x3e2893;_0x4e5115[_0xab5a('0x38')]=_[_0xab5a('0x3a')](db['Dynamics365Field'][_0xab5a('0x34')]);_0x4e5115[_0xab5a('0x39')]=_[_0xab5a('0x3a')](_0x6775[_0xab5a('0x39')]);_0x4e5115[_0xab5a('0x3b')]=_[_0xab5a('0x3c')](_0x4e5115[_0xab5a('0x38')],_0x4e5115['query']);_0x5e8f4f[_0xab5a('0x3d')]=_[_0xab5a('0x3c')](_0x4e5115[_0xab5a('0x38')],qs[_0xab5a('0x3e')](_0x6775[_0xab5a('0x39')]['fields']));_0x5e8f4f[_0xab5a('0x3d')]=_0x5e8f4f[_0xab5a('0x3d')][_0xab5a('0x4e')]?_0x5e8f4f[_0xab5a('0x3d')]:_0x4e5115[_0xab5a('0x38')];_0x5e8f4f[_0xab5a('0x40')]=qs['sort'](_0x6775[_0xab5a('0x39')][_0xab5a('0x41')]);_0x5e8f4f[_0xab5a('0x44')]=qs['filters'](_[_0xab5a('0x42')](_0x6775[_0xab5a('0x39')],_0x4e5115['filters']));if(_0x6775[_0xab5a('0x39')][_0xab5a('0x43')]){_0x5e8f4f[_0xab5a('0x44')]=_[_0xab5a('0x45')](_0x5e8f4f['where'],{'$or':_[_0xab5a('0x32')](_0x5e8f4f[_0xab5a('0x3d')],function(_0x235c50){var _0x5d1749={};_0x5d1749[_0x235c50]={'$like':'%'+_0x6775[_0xab5a('0x39')][_0xab5a('0x43')]+'%'};return _0x5d1749;})});}_0x5e8f4f=_[_0xab5a('0x45')]({},_0x5e8f4f,_0x6775[_0xab5a('0x47')]);return _0x466d4f[_0xab5a('0x57')](_0x5e8f4f);}})['then'](function(_0x5b7932){if(_0x5b7932){_0x59d4e1=_0x5b7932['length'];if(!_0x6775[_0xab5a('0x39')][_0xab5a('0x54')](_0xab5a('0x3f'))){_0x5e8f4f[_0xab5a('0x26')]=qs['limit'](_0x6775['query'][_0xab5a('0x26')]);_0x5e8f4f[_0xab5a('0x25')]=qs[_0xab5a('0x25')](_0x6775[_0xab5a('0x39')][_0xab5a('0x25')]);}return _0x466d4f[_0xab5a('0x57')](_0x5e8f4f);}})[_0xab5a('0x2e')](function(_0x1a788f){if(_0x1a788f){return _0x1a788f?{'count':_0x59d4e1,'rows':_0x1a788f}:null;}})[_0xab5a('0x2e')](respondWithResult(_0x43a949,null))[_0xab5a('0x21')](handleError(_0x43a949,null));}; \ No newline at end of file +var _0x8319=['moment','bluebird','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','jayson/promise','client','http','request','then','Dynamics365Configuration,\x20%s,\x20%s','request\x20sent','debug','Dynamics365Configuration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','end','status','json','offset','undefined','limit','count','set','apply','save','update','destroy','sendStatus','stack','name','index','map','Dynamics365Configuration','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','pick','filter','where','merge','VIRTUAL','options','include','findAll','rows','catch','show','includeAll','find','create','body','params','getFields','findOne','Dynamics365Field','sort','getSubjects','getDescriptions','eml-format','rimraf','fast-json-patch','request-promise'];(function(_0x19237b,_0x262f3f){var _0x141cde=function(_0x4cfc26){while(--_0x4cfc26){_0x19237b['push'](_0x19237b['shift']());}};_0x141cde(++_0x262f3f);}(_0x8319,0x1dc));var _0x9831=function(_0x21de15,_0x3371ef){_0x21de15=_0x21de15-0x0;var _0x5beb18=_0x8319[_0x21de15];return _0x5beb18;};'use strict';var emlformat=require(_0x9831('0x0'));var rimraf=require(_0x9831('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x9831('0x2'));var rp=require(_0x9831('0x3'));var moment=require(_0x9831('0x4'));var BPromise=require(_0x9831('0x5'));var Mustache=require('mustache');var util=require('util');var path=require(_0x9831('0x6'));var sox=require(_0x9831('0x7'));var csv=require(_0x9831('0x8'));var ejs=require(_0x9831('0x9'));var fs=require('fs');var fs_extra=require(_0x9831('0xa'));var _=require(_0x9831('0xb'));var squel=require(_0x9831('0xc'));var crypto=require(_0x9831('0xd'));var jsforce=require(_0x9831('0xe'));var deskjs=require(_0x9831('0xf'));var toCsv=require(_0x9831('0x8'));var querystring=require(_0x9831('0x10'));var Papa=require(_0x9831('0x11'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x9831('0x12'));var as=require(_0x9831('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x9831('0x14'))(_0x9831('0x15'));var utils=require(_0x9831('0x16'));var config=require(_0x9831('0x17'));var licenseUtil=require(_0x9831('0x18'));var db=require(_0x9831('0x19'))['db'];var jayson=require(_0x9831('0x1a'));var client=jayson[_0x9831('0x1b')][_0x9831('0x1c')]({'port':0x232a});function respondWithRpcPromise(_0x5a08fb,_0x1e0d50,_0x5651b6,_0x5905c9){return new BPromise(function(_0x3a026e,_0x39e2d2){var _0x5a6e6f=_0x5905c9||client;return _0x5a6e6f[_0x9831('0x1d')](_0x5a08fb,_0x5651b6)[_0x9831('0x1e')](function(_0x2b5195){logger['info'](_0x9831('0x1f'),_0x1e0d50,_0x9831('0x20'));logger[_0x9831('0x21')](_0x9831('0x22'),_0x1e0d50,'request\x20sent',JSON[_0x9831('0x23')](_0x2b5195));if(_0x2b5195[_0x9831('0x24')]){if(_0x2b5195[_0x9831('0x24')][_0x9831('0x25')]===0x1f4){logger['error']('Dynamics365Configuration,\x20%s,\x20%s',_0x1e0d50,_0x2b5195[_0x9831('0x24')][_0x9831('0x26')]);return _0x39e2d2(_0x2b5195['error']['message']);}logger[_0x9831('0x24')](_0x9831('0x1f'),_0x1e0d50,_0x2b5195['error']['message']);return _0x3a026e(_0x2b5195[_0x9831('0x24')][_0x9831('0x26')]);}else{logger[_0x9831('0x27')]('Dynamics365Configuration,\x20%s,\x20%s',_0x1e0d50,_0x9831('0x20'));_0x3a026e(_0x2b5195[_0x9831('0x28')][_0x9831('0x26')]);}})['catch'](function(_0x5b725d){logger[_0x9831('0x24')]('Dynamics365Configuration,\x20%s,\x20%s',_0x1e0d50,_0x5b725d);_0x39e2d2(_0x5b725d);});});}function respondWithStatusCode(_0x4e39d8,_0x2fc986){_0x2fc986=_0x2fc986||0xcc;return function(_0x416689){if(_0x416689){return _0x4e39d8['sendStatus'](_0x2fc986);}return _0x4e39d8['status'](_0x2fc986)[_0x9831('0x29')]();};}function respondWithResult(_0x222af9,_0xde1566){_0xde1566=_0xde1566||0xc8;return function(_0xf36051){if(_0xf36051){return _0x222af9[_0x9831('0x2a')](_0xde1566)[_0x9831('0x2b')](_0xf36051);}};}function respondWithFilteredResult(_0xbc2203,_0x544182){return function(_0x18d69a){if(_0x18d69a){var _0x13532f=typeof _0x544182[_0x9831('0x2c')]===_0x9831('0x2d')&&typeof _0x544182[_0x9831('0x2e')]==='undefined';var _0x284667=_0x18d69a['count'];var _0x14f28a=_0x13532f?0x0:_0x544182[_0x9831('0x2c')];var _0x3540c0=_0x13532f?_0x18d69a[_0x9831('0x2f')]:_0x544182['offset']+_0x544182['limit'];var _0x3b0f31;if(_0x3540c0>=_0x284667){_0x3540c0=_0x284667;_0x3b0f31=0xc8;}else{_0x3b0f31=0xce;}_0xbc2203[_0x9831('0x2a')](_0x3b0f31);return _0xbc2203[_0x9831('0x30')]('Content-Range',_0x14f28a+'-'+_0x3540c0+'/'+_0x284667)['json'](_0x18d69a);}return null;};}function patchUpdates(_0x18439e){return function(_0x54c08c){try{jsonpatch[_0x9831('0x31')](_0x54c08c,_0x18439e,!![]);}catch(_0x82fbe8){return BPromise['reject'](_0x82fbe8);}return _0x54c08c[_0x9831('0x32')]();};}function saveUpdates(_0x3357ab,_0x29ddf5){return function(_0x5b3b1a){if(_0x5b3b1a){return _0x5b3b1a[_0x9831('0x33')](_0x3357ab)[_0x9831('0x1e')](function(_0x12e57){return _0x12e57;});}return null;};}function removeEntity(_0x31b1de,_0x2ad14e){return function(_0x1a1f47){if(_0x1a1f47){return _0x1a1f47[_0x9831('0x34')]()[_0x9831('0x1e')](function(){_0x31b1de[_0x9831('0x2a')](0xcc)[_0x9831('0x29')]();});}};}function handleEntityNotFound(_0xf5c303,_0x259d5b){return function(_0x2590f6){if(!_0x2590f6){_0xf5c303[_0x9831('0x35')](0x194);}return _0x2590f6;};}function handleError(_0x215d10,_0x503c66){_0x503c66=_0x503c66||0x1f4;return function(_0x253238){logger[_0x9831('0x24')](_0x253238[_0x9831('0x36')]);if(_0x253238[_0x9831('0x37')]){delete _0x253238[_0x9831('0x37')];}_0x215d10[_0x9831('0x2a')](_0x503c66)['send'](_0x253238);};}exports[_0x9831('0x38')]=function(_0x4b6537,_0x1f96cd){var _0x4b3abf={},_0x2b8f6f={},_0x1a96c8={'count':0x0,'rows':[]};var _0x4af9f6=_[_0x9831('0x39')](db[_0x9831('0x3a')][_0x9831('0x3b')],function(_0x495e10){return{'name':_0x495e10[_0x9831('0x3c')],'type':_0x495e10[_0x9831('0x3d')][_0x9831('0x3e')]};});_0x2b8f6f[_0x9831('0x3f')]=_[_0x9831('0x39')](_0x4af9f6,_0x9831('0x37'));_0x2b8f6f[_0x9831('0x40')]=_[_0x9831('0x41')](_0x4b6537[_0x9831('0x40')]);_0x2b8f6f[_0x9831('0x42')]=_[_0x9831('0x43')](_0x2b8f6f['model'],_0x2b8f6f[_0x9831('0x40')]);_0x4b3abf[_0x9831('0x44')]=_[_0x9831('0x43')](_0x2b8f6f[_0x9831('0x3f')],qs[_0x9831('0x45')](_0x4b6537[_0x9831('0x40')]['fields']));_0x4b3abf[_0x9831('0x44')]=_0x4b3abf[_0x9831('0x44')][_0x9831('0x46')]?_0x4b3abf[_0x9831('0x44')]:_0x2b8f6f['model'];if(!_0x4b6537['query'][_0x9831('0x47')](_0x9831('0x48'))){_0x4b3abf[_0x9831('0x2e')]=qs[_0x9831('0x2e')](_0x4b6537[_0x9831('0x40')][_0x9831('0x2e')]);_0x4b3abf['offset']=qs['offset'](_0x4b6537[_0x9831('0x40')][_0x9831('0x2c')]);}_0x4b3abf[_0x9831('0x49')]=qs['sort'](_0x4b6537['query']['sort']);_0x4b3abf['where']=qs[_0x9831('0x42')](_[_0x9831('0x4a')](_0x4b6537[_0x9831('0x40')],_0x2b8f6f[_0x9831('0x42')]),_0x4af9f6);if(_0x4b6537[_0x9831('0x40')][_0x9831('0x4b')]){_0x4b3abf[_0x9831('0x4c')]=_[_0x9831('0x4d')](_0x4b3abf[_0x9831('0x4c')],{'$or':_['map'](_0x4af9f6,function(_0x370b92){if(_0x370b92['type']!==_0x9831('0x4e')){var _0x48efac={};_0x48efac[_0x370b92['name']]={'$like':'%'+_0x4b6537['query']['filter']+'%'};return _0x48efac;}})});}_0x4b3abf=_[_0x9831('0x4d')]({},_0x4b3abf,_0x4b6537[_0x9831('0x4f')]);var _0x4bd932={'where':_0x4b3abf[_0x9831('0x4c')]};return db[_0x9831('0x3a')][_0x9831('0x2f')](_0x4bd932)[_0x9831('0x1e')](function(_0x102680){_0x1a96c8[_0x9831('0x2f')]=_0x102680;if(_0x4b6537[_0x9831('0x40')]['includeAll']){_0x4b3abf[_0x9831('0x50')]=[{'all':!![]}];}return db[_0x9831('0x3a')][_0x9831('0x51')](_0x4b3abf);})[_0x9831('0x1e')](function(_0x368247){_0x1a96c8[_0x9831('0x52')]=_0x368247;return _0x1a96c8;})['then'](respondWithFilteredResult(_0x1f96cd,_0x4b3abf))[_0x9831('0x53')](handleError(_0x1f96cd,null));};exports[_0x9831('0x54')]=function(_0x28557b,_0x171e2a){var _0x4aba9d={'raw':![],'where':{'id':_0x28557b['params']['id']}},_0x5cbb90={};_0x5cbb90[_0x9831('0x3f')]=_[_0x9831('0x41')](db[_0x9831('0x3a')][_0x9831('0x3b')]);_0x5cbb90['query']=_[_0x9831('0x41')](_0x28557b['query']);_0x5cbb90[_0x9831('0x42')]=_[_0x9831('0x43')](_0x5cbb90[_0x9831('0x3f')],_0x5cbb90[_0x9831('0x40')]);_0x4aba9d[_0x9831('0x44')]=_[_0x9831('0x43')](_0x5cbb90[_0x9831('0x3f')],qs[_0x9831('0x45')](_0x28557b[_0x9831('0x40')]['fields']));_0x4aba9d['attributes']=_0x4aba9d['attributes']['length']?_0x4aba9d[_0x9831('0x44')]:_0x5cbb90[_0x9831('0x3f')];if(_0x28557b[_0x9831('0x40')][_0x9831('0x55')]){_0x4aba9d[_0x9831('0x50')]=[{'all':!![]}];}_0x4aba9d=_[_0x9831('0x4d')]({},_0x4aba9d,_0x28557b[_0x9831('0x4f')]);return db[_0x9831('0x3a')][_0x9831('0x56')](_0x4aba9d)[_0x9831('0x1e')](handleEntityNotFound(_0x171e2a,null))[_0x9831('0x1e')](respondWithResult(_0x171e2a,null))[_0x9831('0x53')](handleError(_0x171e2a,null));};exports[_0x9831('0x57')]=function(_0x3b978d,_0x4e11fe){return db[_0x9831('0x3a')][_0x9831('0x57')](_0x3b978d[_0x9831('0x58')],{})[_0x9831('0x1e')](respondWithResult(_0x4e11fe,0xc9))['catch'](handleError(_0x4e11fe,null));};exports[_0x9831('0x33')]=function(_0x3b1662,_0x571094){if(_0x3b1662['body']['id']){delete _0x3b1662[_0x9831('0x58')]['id'];}return db[_0x9831('0x3a')][_0x9831('0x56')]({'where':{'id':_0x3b1662['params']['id']}})['then'](handleEntityNotFound(_0x571094,null))[_0x9831('0x1e')](saveUpdates(_0x3b1662[_0x9831('0x58')],null))[_0x9831('0x1e')](respondWithResult(_0x571094,null))['catch'](handleError(_0x571094,null));};exports['destroy']=function(_0x47c7b3,_0x1274d1){return db[_0x9831('0x3a')][_0x9831('0x56')]({'where':{'id':_0x47c7b3[_0x9831('0x59')]['id']}})[_0x9831('0x1e')](handleEntityNotFound(_0x1274d1,null))[_0x9831('0x1e')](removeEntity(_0x1274d1,null))[_0x9831('0x53')](handleError(_0x1274d1,null));};exports[_0x9831('0x5a')]=function(_0x366e37,_0x1aab0b,_0x2b7a80){var _0x3364a0={};var _0x2f6a0c={};var _0x1cd861;var _0x2cd9e8;return db[_0x9831('0x3a')][_0x9831('0x5b')]({'where':{'id':_0x366e37[_0x9831('0x59')]['id']}})['then'](handleEntityNotFound(_0x1aab0b,null))[_0x9831('0x1e')](function(_0x1443dc){if(_0x1443dc){_0x1cd861=_0x1443dc;_0x2f6a0c['model']=_['keys'](db[_0x9831('0x5c')][_0x9831('0x3b')]);_0x2f6a0c[_0x9831('0x40')]=_['keys'](_0x366e37[_0x9831('0x40')]);_0x2f6a0c[_0x9831('0x42')]=_[_0x9831('0x43')](_0x2f6a0c['model'],_0x2f6a0c['query']);_0x3364a0[_0x9831('0x44')]=_[_0x9831('0x43')](_0x2f6a0c['model'],qs[_0x9831('0x45')](_0x366e37[_0x9831('0x40')][_0x9831('0x45')]));_0x3364a0['attributes']=_0x3364a0['attributes']['length']?_0x3364a0[_0x9831('0x44')]:_0x2f6a0c[_0x9831('0x3f')];_0x3364a0['order']=qs[_0x9831('0x5d')](_0x366e37[_0x9831('0x40')][_0x9831('0x5d')]);_0x3364a0['where']=qs[_0x9831('0x42')](_[_0x9831('0x4a')](_0x366e37[_0x9831('0x40')],_0x2f6a0c[_0x9831('0x42')]));if(_0x366e37[_0x9831('0x40')][_0x9831('0x4b')]){_0x3364a0[_0x9831('0x4c')]=_[_0x9831('0x4d')](_0x3364a0[_0x9831('0x4c')],{'$or':_[_0x9831('0x39')](_0x3364a0[_0x9831('0x44')],function(_0x36b664){var _0x9b152b={};_0x9b152b[_0x36b664]={'$like':'%'+_0x366e37[_0x9831('0x40')][_0x9831('0x4b')]+'%'};return _0x9b152b;})});}_0x3364a0=_[_0x9831('0x4d')]({},_0x3364a0,_0x366e37[_0x9831('0x4f')]);return _0x1cd861['getFields'](_0x3364a0);}})['then'](function(_0x50d5b0){if(_0x50d5b0){_0x2cd9e8=_0x50d5b0[_0x9831('0x46')];if(!_0x366e37['query'][_0x9831('0x47')](_0x9831('0x48'))){_0x3364a0['limit']=qs['limit'](_0x366e37['query']['limit']);_0x3364a0[_0x9831('0x2c')]=qs[_0x9831('0x2c')](_0x366e37[_0x9831('0x40')][_0x9831('0x2c')]);}return _0x1cd861[_0x9831('0x5a')](_0x3364a0);}})[_0x9831('0x1e')](function(_0x23497e){if(_0x23497e){return _0x23497e?{'count':_0x2cd9e8,'rows':_0x23497e}:null;}})[_0x9831('0x1e')](respondWithResult(_0x1aab0b,null))['catch'](handleError(_0x1aab0b,null));};exports[_0x9831('0x5e')]=function(_0x48bd10,_0x8a6ce6,_0x47a1ba){var _0x5129c6={};var _0x4a52f1={};var _0xe619ab;var _0x2b471f;return db['Dynamics365Configuration']['findOne']({'where':{'id':_0x48bd10[_0x9831('0x59')]['id']}})[_0x9831('0x1e')](handleEntityNotFound(_0x8a6ce6,null))['then'](function(_0x43c324){if(_0x43c324){_0xe619ab=_0x43c324;_0x4a52f1[_0x9831('0x3f')]=_[_0x9831('0x41')](db[_0x9831('0x5c')][_0x9831('0x3b')]);_0x4a52f1[_0x9831('0x40')]=_[_0x9831('0x41')](_0x48bd10[_0x9831('0x40')]);_0x4a52f1['filters']=_['intersection'](_0x4a52f1[_0x9831('0x3f')],_0x4a52f1['query']);_0x5129c6[_0x9831('0x44')]=_[_0x9831('0x43')](_0x4a52f1[_0x9831('0x3f')],qs['fields'](_0x48bd10['query'][_0x9831('0x45')]));_0x5129c6[_0x9831('0x44')]=_0x5129c6[_0x9831('0x44')][_0x9831('0x46')]?_0x5129c6[_0x9831('0x44')]:_0x4a52f1[_0x9831('0x3f')];_0x5129c6['order']=qs[_0x9831('0x5d')](_0x48bd10[_0x9831('0x40')]['sort']);_0x5129c6[_0x9831('0x4c')]=qs[_0x9831('0x42')](_['pick'](_0x48bd10[_0x9831('0x40')],_0x4a52f1[_0x9831('0x42')]));if(_0x48bd10['query'][_0x9831('0x4b')]){_0x5129c6[_0x9831('0x4c')]=_[_0x9831('0x4d')](_0x5129c6[_0x9831('0x4c')],{'$or':_[_0x9831('0x39')](_0x5129c6[_0x9831('0x44')],function(_0x28dba4){var _0x555b6d={};_0x555b6d[_0x28dba4]={'$like':'%'+_0x48bd10[_0x9831('0x40')][_0x9831('0x4b')]+'%'};return _0x555b6d;})});}_0x5129c6=_['merge']({},_0x5129c6,_0x48bd10['options']);return _0xe619ab['getSubjects'](_0x5129c6);}})[_0x9831('0x1e')](function(_0x436a9f){if(_0x436a9f){_0x2b471f=_0x436a9f[_0x9831('0x46')];if(!_0x48bd10['query'][_0x9831('0x47')](_0x9831('0x48'))){_0x5129c6[_0x9831('0x2e')]=qs[_0x9831('0x2e')](_0x48bd10['query'][_0x9831('0x2e')]);_0x5129c6[_0x9831('0x2c')]=qs[_0x9831('0x2c')](_0x48bd10[_0x9831('0x40')]['offset']);}return _0xe619ab[_0x9831('0x5e')](_0x5129c6);}})['then'](function(_0x127548){if(_0x127548){return _0x127548?{'count':_0x2b471f,'rows':_0x127548}:null;}})[_0x9831('0x1e')](respondWithResult(_0x8a6ce6,null))['catch'](handleError(_0x8a6ce6,null));};exports[_0x9831('0x5f')]=function(_0x1ce6a0,_0x5bb616,_0x46bc3a){var _0x13a0bd={};var _0x5d2352={};var _0x342657;var _0x44e97a;return db[_0x9831('0x3a')][_0x9831('0x5b')]({'where':{'id':_0x1ce6a0[_0x9831('0x59')]['id']}})['then'](handleEntityNotFound(_0x5bb616,null))['then'](function(_0x4d3e38){if(_0x4d3e38){_0x342657=_0x4d3e38;_0x5d2352['model']=_[_0x9831('0x41')](db[_0x9831('0x5c')][_0x9831('0x3b')]);_0x5d2352['query']=_[_0x9831('0x41')](_0x1ce6a0[_0x9831('0x40')]);_0x5d2352[_0x9831('0x42')]=_[_0x9831('0x43')](_0x5d2352['model'],_0x5d2352['query']);_0x13a0bd[_0x9831('0x44')]=_[_0x9831('0x43')](_0x5d2352[_0x9831('0x3f')],qs[_0x9831('0x45')](_0x1ce6a0[_0x9831('0x40')][_0x9831('0x45')]));_0x13a0bd[_0x9831('0x44')]=_0x13a0bd[_0x9831('0x44')]['length']?_0x13a0bd[_0x9831('0x44')]:_0x5d2352['model'];_0x13a0bd['order']=qs[_0x9831('0x5d')](_0x1ce6a0[_0x9831('0x40')][_0x9831('0x5d')]);_0x13a0bd[_0x9831('0x4c')]=qs[_0x9831('0x42')](_[_0x9831('0x4a')](_0x1ce6a0[_0x9831('0x40')],_0x5d2352[_0x9831('0x42')]));if(_0x1ce6a0[_0x9831('0x40')][_0x9831('0x4b')]){_0x13a0bd['where']=_[_0x9831('0x4d')](_0x13a0bd[_0x9831('0x4c')],{'$or':_[_0x9831('0x39')](_0x13a0bd['attributes'],function(_0x4b7908){var _0x96a58b={};_0x96a58b[_0x4b7908]={'$like':'%'+_0x1ce6a0[_0x9831('0x40')]['filter']+'%'};return _0x96a58b;})});}_0x13a0bd=_[_0x9831('0x4d')]({},_0x13a0bd,_0x1ce6a0['options']);return _0x342657['getDescriptions'](_0x13a0bd);}})['then'](function(_0x58d519){if(_0x58d519){_0x44e97a=_0x58d519[_0x9831('0x46')];if(!_0x1ce6a0[_0x9831('0x40')]['hasOwnProperty'](_0x9831('0x48'))){_0x13a0bd[_0x9831('0x2e')]=qs[_0x9831('0x2e')](_0x1ce6a0[_0x9831('0x40')][_0x9831('0x2e')]);_0x13a0bd[_0x9831('0x2c')]=qs[_0x9831('0x2c')](_0x1ce6a0['query'][_0x9831('0x2c')]);}return _0x342657[_0x9831('0x5f')](_0x13a0bd);}})['then'](function(_0x351bca){if(_0x351bca){return _0x351bca?{'count':_0x44e97a,'rows':_0x351bca}:null;}})[_0x9831('0x1e')](respondWithResult(_0x5bb616,null))['catch'](handleError(_0x5bb616,null));}; \ No newline at end of file diff --git a/server/api/intDynamics365Configuration/intDynamics365Configuration.model.js b/server/api/intDynamics365Configuration/intDynamics365Configuration.model.js index a427410..fcd1b61 100644 --- a/server/api/intDynamics365Configuration/intDynamics365Configuration.model.js +++ b/server/api/intDynamics365Configuration/intDynamics365Configuration.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb43b=['rimraf','../../config/environment','./intDynamics365Configuration.attributes','Dynamics365Configuration','int_dynamics365_configurations','lodash','util','api','moment','bluebird','path'];(function(_0xb066b1,_0x1ae397){var _0x20ac31=function(_0x45a409){while(--_0x45a409){_0xb066b1['push'](_0xb066b1['shift']());}};_0x20ac31(++_0x1ae397);}(_0xb43b,0x1b2));var _0xbb43=function(_0x14f1d6,_0x126174){_0x14f1d6=_0x14f1d6-0x0;var _0x2f3f98=_0xb43b[_0x14f1d6];return _0x2f3f98;};'use strict';var _=require(_0xbb43('0x0'));var util=require(_0xbb43('0x1'));var logger=require('../../config/logger')(_0xbb43('0x2'));var moment=require(_0xbb43('0x3'));var BPromise=require(_0xbb43('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xbb43('0x5'));var rimraf=require(_0xbb43('0x6'));var config=require(_0xbb43('0x7'));var attributes=require(_0xbb43('0x8'));module['exports']=function(_0x491fb9,_0x378df5){return _0x491fb9['define'](_0xbb43('0x9'),attributes,{'tableName':_0xbb43('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x4b84=['moment','path','rimraf','../../config/environment','Dynamics365Configuration','lodash','util'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x4b84,0x1cc));var _0x44b8=function(_0x582d0b,_0x28f609){_0x582d0b=_0x582d0b-0x0;var _0x2e93e1=_0x4b84[_0x582d0b];return _0x2e93e1;};'use strict';var _=require(_0x44b8('0x0'));var util=require(_0x44b8('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0x44b8('0x2'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x44b8('0x3'));var rimraf=require(_0x44b8('0x4'));var config=require(_0x44b8('0x5'));var attributes=require('./intDynamics365Configuration.attributes');module['exports']=function(_0x55f25d,_0x996a8b){return _0x55f25d['define'](_0x44b8('0x6'),attributes,{'tableName':'int_dynamics365_configurations','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intDynamics365Configuration/intDynamics365Configuration.rpc.js b/server/api/intDynamics365Configuration/intDynamics365Configuration.rpc.js index 56688c1..721de81 100644 --- a/server/api/intDynamics365Configuration/intDynamics365Configuration.rpc.js +++ b/server/api/intDynamics365Configuration/intDynamics365Configuration.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe7c0=['../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info','Dynamics365Configuration,\x20%s,\x20%s','request\x20sent','debug','Dynamics365Configuration,\x20%s,\x20%s,\x20%s','error','message','result','catch','util','bluebird','randomstring','ioredis'];(function(_0xa5e821,_0x4dd2f6){var _0x62d0cd=function(_0x119f86){while(--_0x119f86){_0xa5e821['push'](_0xa5e821['shift']());}};_0x62d0cd(++_0x4dd2f6);}(_0xe7c0,0x1f4));var _0x0e7c=function(_0x16da8f,_0x4ddb80){_0x16da8f=_0x16da8f-0x0;var _0xd5dca8=_0xe7c0[_0x16da8f];return _0xd5dca8;};'use strict';var _=require('lodash');var util=require(_0x0e7c('0x0'));var moment=require('moment');var BPromise=require(_0x0e7c('0x1'));var rs=require(_0x0e7c('0x2'));var fs=require('fs');var Redis=require(_0x0e7c('0x3'));var db=require(_0x0e7c('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x0e7c('0x5'))(_0x0e7c('0x6'));var config=require(_0x0e7c('0x7'));var jayson=require(_0x0e7c('0x8'));var client=jayson[_0x0e7c('0x9')][_0x0e7c('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x9b8f91,_0x267104,_0x4b13f6){return new BPromise(function(_0x14b95a,_0x47d80b){return client[_0x0e7c('0xb')](_0x9b8f91,_0x4b13f6)['then'](function(_0xce6aa8){logger[_0x0e7c('0xc')](_0x0e7c('0xd'),_0x267104,_0x0e7c('0xe'));logger[_0x0e7c('0xf')](_0x0e7c('0x10'),_0x267104,'request\x20sent',JSON['stringify'](_0xce6aa8));if(_0xce6aa8[_0x0e7c('0x11')]){if(_0xce6aa8[_0x0e7c('0x11')]['code']===0x1f4){logger['error'](_0x0e7c('0xd'),_0x267104,_0xce6aa8['error']['message']);return _0x47d80b(_0xce6aa8[_0x0e7c('0x11')]['message']);}logger[_0x0e7c('0x11')](_0x0e7c('0xd'),_0x267104,_0xce6aa8[_0x0e7c('0x11')][_0x0e7c('0x12')]);return _0x14b95a(_0xce6aa8[_0x0e7c('0x11')][_0x0e7c('0x12')]);}else{logger['info'](_0x0e7c('0xd'),_0x267104,'request\x20sent');_0x14b95a(_0xce6aa8[_0x0e7c('0x13')][_0x0e7c('0x12')]);}})[_0x0e7c('0x14')](function(_0x5364ac){logger[_0x0e7c('0x11')](_0x0e7c('0xd'),_0x267104,_0x5364ac);_0x47d80b(_0x5364ac);});});} \ No newline at end of file +var _0x2b47=['http','request','then','info','Dynamics365Configuration,\x20%s,\x20%s','request\x20sent','stringify','error','message','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client'];(function(_0x3aba72,_0x1f4876){var _0x59b797=function(_0x2aa47e){while(--_0x2aa47e){_0x3aba72['push'](_0x3aba72['shift']());}};_0x59b797(++_0x1f4876);}(_0x2b47,0x11e));var _0x72b4=function(_0x581e6b,_0x28a346){_0x581e6b=_0x581e6b-0x0;var _0x384521=_0x2b47[_0x581e6b];return _0x384521;};'use strict';var _=require(_0x72b4('0x0'));var util=require(_0x72b4('0x1'));var moment=require(_0x72b4('0x2'));var BPromise=require(_0x72b4('0x3'));var rs=require(_0x72b4('0x4'));var fs=require('fs');var Redis=require(_0x72b4('0x5'));var db=require(_0x72b4('0x6'))['db'];var utils=require(_0x72b4('0x7'));var logger=require(_0x72b4('0x8'))(_0x72b4('0x9'));var config=require(_0x72b4('0xa'));var jayson=require(_0x72b4('0xb'));var client=jayson[_0x72b4('0xc')][_0x72b4('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x232019,_0xbc2d2a,_0x29863f){return new BPromise(function(_0x22b448,_0x3443bc){return client[_0x72b4('0xe')](_0x232019,_0x29863f)[_0x72b4('0xf')](function(_0x167dd2){logger[_0x72b4('0x10')](_0x72b4('0x11'),_0xbc2d2a,_0x72b4('0x12'));logger['debug']('Dynamics365Configuration,\x20%s,\x20%s,\x20%s',_0xbc2d2a,'request\x20sent',JSON[_0x72b4('0x13')](_0x167dd2));if(_0x167dd2[_0x72b4('0x14')]){if(_0x167dd2['error']['code']===0x1f4){logger[_0x72b4('0x14')](_0x72b4('0x11'),_0xbc2d2a,_0x167dd2[_0x72b4('0x14')][_0x72b4('0x15')]);return _0x3443bc(_0x167dd2[_0x72b4('0x14')][_0x72b4('0x15')]);}logger['error'](_0x72b4('0x11'),_0xbc2d2a,_0x167dd2['error'][_0x72b4('0x15')]);return _0x22b448(_0x167dd2[_0x72b4('0x14')][_0x72b4('0x15')]);}else{logger[_0x72b4('0x10')](_0x72b4('0x11'),_0xbc2d2a,_0x72b4('0x12'));_0x22b448(_0x167dd2['result'][_0x72b4('0x15')]);}})[_0x72b4('0x16')](function(_0x5334db){logger[_0x72b4('0x14')](_0x72b4('0x11'),_0xbc2d2a,_0x5334db);_0x3443bc(_0x5334db);});});} \ No newline at end of file diff --git a/server/api/intDynamics365Field/index.js b/server/api/intDynamics365Field/index.js index 026360f..b07786b 100644 --- a/server/api/intDynamics365Field/index.js +++ b/server/api/intDynamics365Field/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf060=['express','fs-extra','../../components/auth/service','../../config/environment','get','isAuthenticated','index','/:id','show','post','delete','multer','util','path'];(function(_0x543dac,_0x57f800){var _0x5141fe=function(_0x5e7cda){while(--_0x5e7cda){_0x543dac['push'](_0x543dac['shift']());}};_0x5141fe(++_0x57f800);}(_0xf060,0x1a1));var _0x0f06=function(_0x3c4365,_0x4bfbf4){_0x3c4365=_0x3c4365-0x0;var _0x5ccdfe=_0xf060[_0x3c4365];return _0x5ccdfe;};'use strict';var multer=require(_0x0f06('0x0'));var util=require(_0x0f06('0x1'));var path=require(_0x0f06('0x2'));var timeout=require('connect-timeout');var express=require(_0x0f06('0x3'));var router=express['Router']();var fs_extra=require(_0x0f06('0x4'));var auth=require(_0x0f06('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x0f06('0x6'));var controller=require('./intDynamics365Field.controller');router[_0x0f06('0x7')]('/',auth[_0x0f06('0x8')](),controller[_0x0f06('0x9')]);router[_0x0f06('0x7')](_0x0f06('0xa'),auth['isAuthenticated'](),controller[_0x0f06('0xb')]);router[_0x0f06('0xc')]('/',auth[_0x0f06('0x8')](),controller['create']);router['put'](_0x0f06('0xa'),auth['isAuthenticated'](),controller['update']);router[_0x0f06('0xd')](_0x0f06('0xa'),auth[_0x0f06('0x8')](),controller['destroy']);module['exports']=router; \ No newline at end of file +var _0x8e77=['fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intDynamics365Field.controller','get','index','/:id','isAuthenticated','show','post','create','update','delete','destroy','exports','multer','util','path','connect-timeout','express'];(function(_0x5d712f,_0x719225){var _0x34e3e2=function(_0x30448e){while(--_0x30448e){_0x5d712f['push'](_0x5d712f['shift']());}};_0x34e3e2(++_0x719225);}(_0x8e77,0x1f3));var _0x78e7=function(_0x32bce8,_0x54f965){_0x32bce8=_0x32bce8-0x0;var _0x38badc=_0x8e77[_0x32bce8];return _0x38badc;};'use strict';var multer=require(_0x78e7('0x0'));var util=require(_0x78e7('0x1'));var path=require(_0x78e7('0x2'));var timeout=require(_0x78e7('0x3'));var express=require(_0x78e7('0x4'));var router=express['Router']();var fs_extra=require(_0x78e7('0x5'));var auth=require(_0x78e7('0x6'));var interaction=require(_0x78e7('0x7'));var config=require(_0x78e7('0x8'));var controller=require(_0x78e7('0x9'));router[_0x78e7('0xa')]('/',auth['isAuthenticated'](),controller[_0x78e7('0xb')]);router[_0x78e7('0xa')](_0x78e7('0xc'),auth[_0x78e7('0xd')](),controller[_0x78e7('0xe')]);router[_0x78e7('0xf')]('/',auth[_0x78e7('0xd')](),controller[_0x78e7('0x10')]);router['put'](_0x78e7('0xc'),auth[_0x78e7('0xd')](),controller[_0x78e7('0x11')]);router[_0x78e7('0x12')](_0x78e7('0xc'),auth['isAuthenticated'](),controller[_0x78e7('0x13')]);module[_0x78e7('0x14')]=router; \ No newline at end of file diff --git a/server/api/intDynamics365Field/intDynamics365Field.attributes.js b/server/api/intDynamics365Field/intDynamics365Field.attributes.js index 6c8c538..37055d5 100644 --- a/server/api/intDynamics365Field/intDynamics365Field.attributes.js +++ b/server/api/intDynamics365Field/intDynamics365Field.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbaa3=['keyValue','STRING','BOOLEAN','sequelize','exports','ENUM','string','customVariable'];(function(_0x58ec8a,_0x3baf54){var _0x2120cd=function(_0x29c0b0){while(--_0x29c0b0){_0x58ec8a['push'](_0x58ec8a['shift']());}};_0x2120cd(++_0x3baf54);}(_0xbaa3,0x83));var _0x3baa=function(_0x45dafa,_0x171e29){_0x45dafa=_0x45dafa-0x0;var _0xeb385a=_0xbaa3[_0x45dafa];return _0xeb385a;};'use strict';var Sequelize=require(_0x3baa('0x0'));module[_0x3baa('0x1')]={'type':{'type':Sequelize[_0x3baa('0x2')](_0x3baa('0x3'),'variable',_0x3baa('0x4'),_0x3baa('0x5'),'picklist'),'defaultValue':_0x3baa('0x3')},'content':{'type':Sequelize[_0x3baa('0x6')]},'key':{'type':Sequelize['STRING']},'keyType':{'type':Sequelize['ENUM'](_0x3baa('0x3'),'variable',_0x3baa('0x4'))},'keyContent':{'type':Sequelize['STRING']},'idField':{'type':Sequelize['STRING']},'nameField':{'type':Sequelize[_0x3baa('0x6')]},'customField':{'type':Sequelize[_0x3baa('0x7')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x3baa('0x6')]}}; \ No newline at end of file +var _0xc229=['ENUM','sequelize','exports','string','customVariable','keyValue','picklist','STRING'];(function(_0x5e3b04,_0xbb6795){var _0x1fc44d=function(_0x3472a1){while(--_0x3472a1){_0x5e3b04['push'](_0x5e3b04['shift']());}};_0x1fc44d(++_0xbb6795);}(_0xc229,0x129));var _0x9c22=function(_0x148a63,_0x3c1877){_0x148a63=_0x148a63-0x0;var _0x4694fa=_0xc229[_0x148a63];return _0x4694fa;};'use strict';var Sequelize=require(_0x9c22('0x0'));module[_0x9c22('0x1')]={'type':{'type':Sequelize['ENUM'](_0x9c22('0x2'),'variable',_0x9c22('0x3'),_0x9c22('0x4'),_0x9c22('0x5')),'defaultValue':_0x9c22('0x2')},'content':{'type':Sequelize[_0x9c22('0x6')]},'key':{'type':Sequelize[_0x9c22('0x6')]},'keyType':{'type':Sequelize[_0x9c22('0x7')](_0x9c22('0x2'),'variable',_0x9c22('0x3'))},'keyContent':{'type':Sequelize['STRING']},'idField':{'type':Sequelize['STRING']},'nameField':{'type':Sequelize[_0x9c22('0x6')]},'customField':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x9c22('0x6')]}}; \ No newline at end of file diff --git a/server/api/intDynamics365Field/intDynamics365Field.controller.js b/server/api/intDynamics365Field/intDynamics365Field.controller.js index 48a4fe5..3eac0bb 100644 --- a/server/api/intDynamics365Field/intDynamics365Field.controller.js +++ b/server/api/intDynamics365Field/intDynamics365Field.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa901=['hasOwnProperty','nolimit','where','pick','filter','merge','VIRTUAL','options','include','findAll','catch','show','keys','length','includeAll','find','create','body','params','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','querystring','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end','status','json','undefined','offset','count','limit','save','update','then','destroy','error','name','send','index','map','Dynamics365Field','fieldName','type','key','model','query','filters','intersection','attributes','fields'];(function(_0x20620f,_0x37c815){var _0x593a2f=function(_0x25479a){while(--_0x25479a){_0x20620f['push'](_0x20620f['shift']());}};_0x593a2f(++_0x37c815);}(_0xa901,0xa3));var _0x1a90=function(_0x5e81fd,_0x501e7f){_0x5e81fd=_0x5e81fd-0x0;var _0x48108a=_0xa901[_0x5e81fd];return _0x48108a;};'use strict';var emlformat=require(_0x1a90('0x0'));var rimraf=require(_0x1a90('0x1'));var zipdir=require(_0x1a90('0x2'));var jsonpatch=require(_0x1a90('0x3'));var rp=require('request-promise');var moment=require(_0x1a90('0x4'));var BPromise=require(_0x1a90('0x5'));var Mustache=require(_0x1a90('0x6'));var util=require('util');var path=require(_0x1a90('0x7'));var sox=require(_0x1a90('0x8'));var csv=require(_0x1a90('0x9'));var ejs=require(_0x1a90('0xa'));var fs=require('fs');var fs_extra=require(_0x1a90('0xb'));var _=require(_0x1a90('0xc'));var squel=require(_0x1a90('0xd'));var crypto=require(_0x1a90('0xe'));var jsforce=require('jsforce');var deskjs=require(_0x1a90('0xf'));var toCsv=require(_0x1a90('0x9'));var querystring=require(_0x1a90('0x10'));var Papa=require('papaparse');var Redis=require(_0x1a90('0x11'));var authService=require('../../components/auth/service');var qs=require(_0x1a90('0x12'));var as=require(_0x1a90('0x13'));var hardwareService=require(_0x1a90('0x14'));var logger=require('../../config/logger')(_0x1a90('0x15'));var utils=require(_0x1a90('0x16'));var config=require(_0x1a90('0x17'));var licenseUtil=require(_0x1a90('0x18'));var db=require(_0x1a90('0x19'))['db'];function respondWithStatusCode(_0x4b6c95,_0x591ffc){_0x591ffc=_0x591ffc||0xcc;return function(_0x1b570d){if(_0x1b570d){return _0x4b6c95[_0x1a90('0x1a')](_0x591ffc);}return _0x4b6c95['status'](_0x591ffc)[_0x1a90('0x1b')]();};}function respondWithResult(_0x37e872,_0x243d39){_0x243d39=_0x243d39||0xc8;return function(_0xffb79e){if(_0xffb79e){return _0x37e872[_0x1a90('0x1c')](_0x243d39)[_0x1a90('0x1d')](_0xffb79e);}};}function respondWithFilteredResult(_0xa8d8f8,_0x246736){return function(_0x57d79f){if(_0x57d79f){var _0x2ae5ef=typeof _0x246736['offset']===_0x1a90('0x1e')&&typeof _0x246736['limit']===_0x1a90('0x1e');var _0x40429f=_0x57d79f['count'];var _0x3faca8=_0x2ae5ef?0x0:_0x246736[_0x1a90('0x1f')];var _0xe441d9=_0x2ae5ef?_0x57d79f[_0x1a90('0x20')]:_0x246736[_0x1a90('0x1f')]+_0x246736[_0x1a90('0x21')];var _0x356cd4;if(_0xe441d9>=_0x40429f){_0xe441d9=_0x40429f;_0x356cd4=0xc8;}else{_0x356cd4=0xce;}_0xa8d8f8['status'](_0x356cd4);return _0xa8d8f8['set']('Content-Range',_0x3faca8+'-'+_0xe441d9+'/'+_0x40429f)[_0x1a90('0x1d')](_0x57d79f);}return null;};}function patchUpdates(_0x3813b3){return function(_0x2b2b10){try{jsonpatch['apply'](_0x2b2b10,_0x3813b3,!![]);}catch(_0x5bcc22){return BPromise['reject'](_0x5bcc22);}return _0x2b2b10[_0x1a90('0x22')]();};}function saveUpdates(_0x3ddf7c,_0x4ab523){return function(_0x23afb0){if(_0x23afb0){return _0x23afb0[_0x1a90('0x23')](_0x3ddf7c)[_0x1a90('0x24')](function(_0xa4b571){return _0xa4b571;});}return null;};}function removeEntity(_0x3e96bd,_0x33c9c2){return function(_0x23b0d8){if(_0x23b0d8){return _0x23b0d8[_0x1a90('0x25')]()[_0x1a90('0x24')](function(){_0x3e96bd[_0x1a90('0x1c')](0xcc)[_0x1a90('0x1b')]();});}};}function handleEntityNotFound(_0x142b69,_0x47bf09){return function(_0x26f522){if(!_0x26f522){_0x142b69[_0x1a90('0x1a')](0x194);}return _0x26f522;};}function handleError(_0x25b274,_0x20ce6f){_0x20ce6f=_0x20ce6f||0x1f4;return function(_0x5a2ebd){logger[_0x1a90('0x26')](_0x5a2ebd['stack']);if(_0x5a2ebd[_0x1a90('0x27')]){delete _0x5a2ebd[_0x1a90('0x27')];}_0x25b274[_0x1a90('0x1c')](_0x20ce6f)[_0x1a90('0x28')](_0x5a2ebd);};}exports[_0x1a90('0x29')]=function(_0x2c8259,_0x3f20be){var _0x2d96a7={},_0x49247b={},_0x42f187={'count':0x0,'rows':[]};var _0x5bec28=_[_0x1a90('0x2a')](db[_0x1a90('0x2b')]['rawAttributes'],function(_0x4cd219){return{'name':_0x4cd219[_0x1a90('0x2c')],'type':_0x4cd219[_0x1a90('0x2d')][_0x1a90('0x2e')]};});_0x49247b[_0x1a90('0x2f')]=_[_0x1a90('0x2a')](_0x5bec28,_0x1a90('0x27'));_0x49247b[_0x1a90('0x30')]=_['keys'](_0x2c8259[_0x1a90('0x30')]);_0x49247b[_0x1a90('0x31')]=_[_0x1a90('0x32')](_0x49247b[_0x1a90('0x2f')],_0x49247b[_0x1a90('0x30')]);_0x2d96a7[_0x1a90('0x33')]=_[_0x1a90('0x32')](_0x49247b[_0x1a90('0x2f')],qs['fields'](_0x2c8259[_0x1a90('0x30')][_0x1a90('0x34')]));_0x2d96a7[_0x1a90('0x33')]=_0x2d96a7['attributes']['length']?_0x2d96a7[_0x1a90('0x33')]:_0x49247b[_0x1a90('0x2f')];if(!_0x2c8259[_0x1a90('0x30')][_0x1a90('0x35')](_0x1a90('0x36'))){_0x2d96a7[_0x1a90('0x21')]=qs[_0x1a90('0x21')](_0x2c8259[_0x1a90('0x30')][_0x1a90('0x21')]);_0x2d96a7[_0x1a90('0x1f')]=qs[_0x1a90('0x1f')](_0x2c8259[_0x1a90('0x30')][_0x1a90('0x1f')]);}_0x2d96a7['order']=qs['sort'](_0x2c8259['query']['sort']);_0x2d96a7[_0x1a90('0x37')]=qs['filters'](_[_0x1a90('0x38')](_0x2c8259[_0x1a90('0x30')],_0x49247b[_0x1a90('0x31')]),_0x5bec28);if(_0x2c8259[_0x1a90('0x30')][_0x1a90('0x39')]){_0x2d96a7[_0x1a90('0x37')]=_[_0x1a90('0x3a')](_0x2d96a7[_0x1a90('0x37')],{'$or':_[_0x1a90('0x2a')](_0x5bec28,function(_0x3933d0){if(_0x3933d0[_0x1a90('0x2d')]!==_0x1a90('0x3b')){var _0x4c5dd2={};_0x4c5dd2[_0x3933d0[_0x1a90('0x27')]]={'$like':'%'+_0x2c8259[_0x1a90('0x30')][_0x1a90('0x39')]+'%'};return _0x4c5dd2;}})});}_0x2d96a7=_[_0x1a90('0x3a')]({},_0x2d96a7,_0x2c8259[_0x1a90('0x3c')]);var _0x4950a9={'where':_0x2d96a7['where']};return db['Dynamics365Field']['count'](_0x4950a9)[_0x1a90('0x24')](function(_0x4f5532){_0x42f187['count']=_0x4f5532;if(_0x2c8259[_0x1a90('0x30')]['includeAll']){_0x2d96a7[_0x1a90('0x3d')]=[{'all':!![]}];}return db[_0x1a90('0x2b')][_0x1a90('0x3e')](_0x2d96a7);})[_0x1a90('0x24')](function(_0x122a0d){_0x42f187['rows']=_0x122a0d;return _0x42f187;})['then'](respondWithFilteredResult(_0x3f20be,_0x2d96a7))[_0x1a90('0x3f')](handleError(_0x3f20be,null));};exports[_0x1a90('0x40')]=function(_0x405545,_0x423d9c){var _0x9c8ef1={'raw':!![],'where':{'id':_0x405545['params']['id']}},_0xec8445={};_0xec8445[_0x1a90('0x2f')]=_['keys'](db[_0x1a90('0x2b')]['rawAttributes']);_0xec8445[_0x1a90('0x30')]=_[_0x1a90('0x41')](_0x405545[_0x1a90('0x30')]);_0xec8445['filters']=_[_0x1a90('0x32')](_0xec8445[_0x1a90('0x2f')],_0xec8445['query']);_0x9c8ef1[_0x1a90('0x33')]=_[_0x1a90('0x32')](_0xec8445['model'],qs[_0x1a90('0x34')](_0x405545['query']['fields']));_0x9c8ef1[_0x1a90('0x33')]=_0x9c8ef1['attributes'][_0x1a90('0x42')]?_0x9c8ef1['attributes']:_0xec8445[_0x1a90('0x2f')];if(_0x405545[_0x1a90('0x30')][_0x1a90('0x43')]){_0x9c8ef1['include']=[{'all':!![]}];}_0x9c8ef1=_['merge']({},_0x9c8ef1,_0x405545['options']);return db[_0x1a90('0x2b')][_0x1a90('0x44')](_0x9c8ef1)[_0x1a90('0x24')](handleEntityNotFound(_0x423d9c,null))[_0x1a90('0x24')](respondWithResult(_0x423d9c,null))[_0x1a90('0x3f')](handleError(_0x423d9c,null));};exports[_0x1a90('0x45')]=function(_0x52f8f9,_0x3ccad4){return db[_0x1a90('0x2b')][_0x1a90('0x45')](_0x52f8f9['body'],{})[_0x1a90('0x24')](respondWithResult(_0x3ccad4,0xc9))['catch'](handleError(_0x3ccad4,null));};exports[_0x1a90('0x23')]=function(_0x2d009,_0x218cba){if(_0x2d009[_0x1a90('0x46')]['id']){delete _0x2d009[_0x1a90('0x46')]['id'];}return db[_0x1a90('0x2b')]['find']({'where':{'id':_0x2d009[_0x1a90('0x47')]['id']}})[_0x1a90('0x24')](handleEntityNotFound(_0x218cba,null))[_0x1a90('0x24')](saveUpdates(_0x2d009[_0x1a90('0x46')],null))[_0x1a90('0x24')](respondWithResult(_0x218cba,null))['catch'](handleError(_0x218cba,null));};exports[_0x1a90('0x25')]=function(_0x2658ee,_0x425e62){return db[_0x1a90('0x2b')][_0x1a90('0x44')]({'where':{'id':_0x2658ee['params']['id']}})[_0x1a90('0x24')](handleEntityNotFound(_0x425e62,null))[_0x1a90('0x24')](removeEntity(_0x425e62,null))[_0x1a90('0x3f')](handleError(_0x425e62,null));}; \ No newline at end of file +var _0x3545=['order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','params','create','body','find','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','json','undefined','limit','count','offset','set','reject','save','update','then','destroy','error','stack','name','send','index','Dynamics365Field','rawAttributes','fieldName','type','key','model','map','keys','query','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit'];(function(_0x5c98dd,_0x14d331){var _0x2ee37c=function(_0x8cb469){while(--_0x8cb469){_0x5c98dd['push'](_0x5c98dd['shift']());}};_0x2ee37c(++_0x14d331);}(_0x3545,0x14a));var _0x5354=function(_0x29f6f8,_0x370292){_0x29f6f8=_0x29f6f8-0x0;var _0x379929=_0x3545[_0x29f6f8];return _0x379929;};'use strict';var emlformat=require(_0x5354('0x0'));var rimraf=require(_0x5354('0x1'));var zipdir=require(_0x5354('0x2'));var jsonpatch=require(_0x5354('0x3'));var rp=require(_0x5354('0x4'));var moment=require(_0x5354('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x5354('0x6'));var util=require(_0x5354('0x7'));var path=require(_0x5354('0x8'));var sox=require(_0x5354('0x9'));var csv=require(_0x5354('0xa'));var ejs=require(_0x5354('0xb'));var fs=require('fs');var fs_extra=require(_0x5354('0xc'));var _=require(_0x5354('0xd'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x5354('0xe'));var deskjs=require(_0x5354('0xf'));var toCsv=require(_0x5354('0xa'));var querystring=require(_0x5354('0x10'));var Papa=require(_0x5354('0x11'));var Redis=require('ioredis');var authService=require(_0x5354('0x12'));var qs=require(_0x5354('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x5354('0x14'));var logger=require(_0x5354('0x15'))(_0x5354('0x16'));var utils=require(_0x5354('0x17'));var config=require('../../config/environment');var licenseUtil=require(_0x5354('0x18'));var db=require(_0x5354('0x19'))['db'];function respondWithStatusCode(_0x479852,_0x1d4e51){_0x1d4e51=_0x1d4e51||0xcc;return function(_0x56522c){if(_0x56522c){return _0x479852[_0x5354('0x1a')](_0x1d4e51);}return _0x479852[_0x5354('0x1b')](_0x1d4e51)['end']();};}function respondWithResult(_0x453c33,_0x1967d6){_0x1967d6=_0x1967d6||0xc8;return function(_0x334048){if(_0x334048){return _0x453c33['status'](_0x1967d6)[_0x5354('0x1c')](_0x334048);}};}function respondWithFilteredResult(_0x33d5d1,_0x580840){return function(_0x56ee9c){if(_0x56ee9c){var _0x39ce35=typeof _0x580840['offset']===_0x5354('0x1d')&&typeof _0x580840[_0x5354('0x1e')]==='undefined';var _0x12ed17=_0x56ee9c[_0x5354('0x1f')];var _0x19dc70=_0x39ce35?0x0:_0x580840[_0x5354('0x20')];var _0x61c6ac=_0x39ce35?_0x56ee9c[_0x5354('0x1f')]:_0x580840[_0x5354('0x20')]+_0x580840[_0x5354('0x1e')];var _0x20c2cc;if(_0x61c6ac>=_0x12ed17){_0x61c6ac=_0x12ed17;_0x20c2cc=0xc8;}else{_0x20c2cc=0xce;}_0x33d5d1[_0x5354('0x1b')](_0x20c2cc);return _0x33d5d1[_0x5354('0x21')]('Content-Range',_0x19dc70+'-'+_0x61c6ac+'/'+_0x12ed17)[_0x5354('0x1c')](_0x56ee9c);}return null;};}function patchUpdates(_0x1277c5){return function(_0x4aad6a){try{jsonpatch['apply'](_0x4aad6a,_0x1277c5,!![]);}catch(_0x176bac){return BPromise[_0x5354('0x22')](_0x176bac);}return _0x4aad6a[_0x5354('0x23')]();};}function saveUpdates(_0xc94edb,_0x16cd11){return function(_0x31cc73){if(_0x31cc73){return _0x31cc73[_0x5354('0x24')](_0xc94edb)[_0x5354('0x25')](function(_0x458517){return _0x458517;});}return null;};}function removeEntity(_0x2ec565,_0x1990b9){return function(_0x59cf83){if(_0x59cf83){return _0x59cf83[_0x5354('0x26')]()[_0x5354('0x25')](function(){_0x2ec565[_0x5354('0x1b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x1da5b3,_0x15eda2){return function(_0x11ccd8){if(!_0x11ccd8){_0x1da5b3['sendStatus'](0x194);}return _0x11ccd8;};}function handleError(_0x196893,_0x49229a){_0x49229a=_0x49229a||0x1f4;return function(_0x4ab0ae){logger[_0x5354('0x27')](_0x4ab0ae[_0x5354('0x28')]);if(_0x4ab0ae['name']){delete _0x4ab0ae[_0x5354('0x29')];}_0x196893[_0x5354('0x1b')](_0x49229a)[_0x5354('0x2a')](_0x4ab0ae);};}exports[_0x5354('0x2b')]=function(_0x148c40,_0xcde88c){var _0x409add={},_0x413e29={},_0x53803b={'count':0x0,'rows':[]};var _0x581cef=_['map'](db[_0x5354('0x2c')][_0x5354('0x2d')],function(_0x38b2e4){return{'name':_0x38b2e4[_0x5354('0x2e')],'type':_0x38b2e4[_0x5354('0x2f')][_0x5354('0x30')]};});_0x413e29[_0x5354('0x31')]=_[_0x5354('0x32')](_0x581cef,_0x5354('0x29'));_0x413e29['query']=_[_0x5354('0x33')](_0x148c40[_0x5354('0x34')]);_0x413e29[_0x5354('0x35')]=_['intersection'](_0x413e29['model'],_0x413e29[_0x5354('0x34')]);_0x409add[_0x5354('0x36')]=_[_0x5354('0x37')](_0x413e29[_0x5354('0x31')],qs[_0x5354('0x38')](_0x148c40[_0x5354('0x34')][_0x5354('0x38')]));_0x409add['attributes']=_0x409add['attributes'][_0x5354('0x39')]?_0x409add['attributes']:_0x413e29[_0x5354('0x31')];if(!_0x148c40[_0x5354('0x34')][_0x5354('0x3a')](_0x5354('0x3b'))){_0x409add[_0x5354('0x1e')]=qs[_0x5354('0x1e')](_0x148c40[_0x5354('0x34')][_0x5354('0x1e')]);_0x409add[_0x5354('0x20')]=qs['offset'](_0x148c40[_0x5354('0x34')][_0x5354('0x20')]);}_0x409add[_0x5354('0x3c')]=qs[_0x5354('0x3d')](_0x148c40[_0x5354('0x34')][_0x5354('0x3d')]);_0x409add[_0x5354('0x3e')]=qs[_0x5354('0x35')](_[_0x5354('0x3f')](_0x148c40[_0x5354('0x34')],_0x413e29['filters']),_0x581cef);if(_0x148c40['query'][_0x5354('0x40')]){_0x409add[_0x5354('0x3e')]=_[_0x5354('0x41')](_0x409add[_0x5354('0x3e')],{'$or':_[_0x5354('0x32')](_0x581cef,function(_0x14e42d){if(_0x14e42d['type']!==_0x5354('0x42')){var _0x4b67c3={};_0x4b67c3[_0x14e42d[_0x5354('0x29')]]={'$like':'%'+_0x148c40['query'][_0x5354('0x40')]+'%'};return _0x4b67c3;}})});}_0x409add=_[_0x5354('0x41')]({},_0x409add,_0x148c40[_0x5354('0x43')]);var _0x32974b={'where':_0x409add[_0x5354('0x3e')]};return db[_0x5354('0x2c')][_0x5354('0x1f')](_0x32974b)[_0x5354('0x25')](function(_0xc2f2cc){_0x53803b[_0x5354('0x1f')]=_0xc2f2cc;if(_0x148c40[_0x5354('0x34')][_0x5354('0x44')]){_0x409add[_0x5354('0x45')]=[{'all':!![]}];}return db[_0x5354('0x2c')][_0x5354('0x46')](_0x409add);})[_0x5354('0x25')](function(_0x272d7d){_0x53803b[_0x5354('0x47')]=_0x272d7d;return _0x53803b;})[_0x5354('0x25')](respondWithFilteredResult(_0xcde88c,_0x409add))[_0x5354('0x48')](handleError(_0xcde88c,null));};exports[_0x5354('0x49')]=function(_0x2cbcc8,_0x3ae456){var _0x1f42fb={'raw':!![],'where':{'id':_0x2cbcc8[_0x5354('0x4a')]['id']}},_0xec5911={};_0xec5911[_0x5354('0x31')]=_[_0x5354('0x33')](db[_0x5354('0x2c')][_0x5354('0x2d')]);_0xec5911[_0x5354('0x34')]=_[_0x5354('0x33')](_0x2cbcc8[_0x5354('0x34')]);_0xec5911[_0x5354('0x35')]=_[_0x5354('0x37')](_0xec5911['model'],_0xec5911['query']);_0x1f42fb[_0x5354('0x36')]=_[_0x5354('0x37')](_0xec5911['model'],qs[_0x5354('0x38')](_0x2cbcc8['query']['fields']));_0x1f42fb[_0x5354('0x36')]=_0x1f42fb[_0x5354('0x36')]['length']?_0x1f42fb[_0x5354('0x36')]:_0xec5911[_0x5354('0x31')];if(_0x2cbcc8[_0x5354('0x34')][_0x5354('0x44')]){_0x1f42fb[_0x5354('0x45')]=[{'all':!![]}];}_0x1f42fb=_[_0x5354('0x41')]({},_0x1f42fb,_0x2cbcc8[_0x5354('0x43')]);return db['Dynamics365Field']['find'](_0x1f42fb)[_0x5354('0x25')](handleEntityNotFound(_0x3ae456,null))[_0x5354('0x25')](respondWithResult(_0x3ae456,null))[_0x5354('0x48')](handleError(_0x3ae456,null));};exports[_0x5354('0x4b')]=function(_0x5f30a7,_0x2866cb){return db[_0x5354('0x2c')][_0x5354('0x4b')](_0x5f30a7[_0x5354('0x4c')],{})[_0x5354('0x25')](respondWithResult(_0x2866cb,0xc9))[_0x5354('0x48')](handleError(_0x2866cb,null));};exports[_0x5354('0x24')]=function(_0x57de2f,_0x2154a9){if(_0x57de2f[_0x5354('0x4c')]['id']){delete _0x57de2f[_0x5354('0x4c')]['id'];}return db[_0x5354('0x2c')]['find']({'where':{'id':_0x57de2f['params']['id']}})['then'](handleEntityNotFound(_0x2154a9,null))['then'](saveUpdates(_0x57de2f[_0x5354('0x4c')],null))['then'](respondWithResult(_0x2154a9,null))[_0x5354('0x48')](handleError(_0x2154a9,null));};exports[_0x5354('0x26')]=function(_0x179a54,_0x385610){return db[_0x5354('0x2c')][_0x5354('0x4d')]({'where':{'id':_0x179a54[_0x5354('0x4a')]['id']}})['then'](handleEntityNotFound(_0x385610,null))[_0x5354('0x25')](removeEntity(_0x385610,null))[_0x5354('0x48')](handleError(_0x385610,null));}; \ No newline at end of file diff --git a/server/api/intDynamics365Field/intDynamics365Field.model.js b/server/api/intDynamics365Field/intDynamics365Field.model.js index 90ab491..4e15d3c 100644 --- a/server/api/intDynamics365Field/intDynamics365Field.model.js +++ b/server/api/intDynamics365Field/intDynamics365Field.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x145f=['int_dynamics365_fields','dynamics365_unique_index','idField','lodash','../../config/logger','moment','bluebird','request-promise','path','exports','define','Dynamics365Field'];(function(_0x45783c,_0x49c56d){var _0x1161da=function(_0x3c5d41){while(--_0x3c5d41){_0x45783c['push'](_0x45783c['shift']());}};_0x1161da(++_0x49c56d);}(_0x145f,0x6f));var _0xf145=function(_0x29703a,_0x5c014b){_0x29703a=_0x29703a-0x0;var _0x56f5b2=_0x145f[_0x29703a];return _0x56f5b2;};'use strict';var _=require(_0xf145('0x0'));var util=require('util');var logger=require(_0xf145('0x1'))('api');var moment=require(_0xf145('0x2'));var BPromise=require(_0xf145('0x3'));var rp=require(_0xf145('0x4'));var fs=require('fs');var path=require(_0xf145('0x5'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require('./intDynamics365Field.attributes');module[_0xf145('0x6')]=function(_0x4de2b5,_0x46b471){return _0x4de2b5[_0xf145('0x7')](_0xf145('0x8'),attributes,{'tableName':_0xf145('0x9'),'paranoid':![],'indexes':[{'name':_0xf145('0xa'),'fields':[_0xf145('0xb'),'FieldId'],'unique':!![]}],'timestamps':!![]});}; \ No newline at end of file +var _0xb979=['../../config/logger','api','request-promise','rimraf','../../config/environment','exports','define','int_dynamics365_fields','dynamics365_unique_index','idField','FieldId','lodash','util'];(function(_0x28947f,_0x5012af){var _0x173459=function(_0x28a4fb){while(--_0x28a4fb){_0x28947f['push'](_0x28947f['shift']());}};_0x173459(++_0x5012af);}(_0xb979,0x184));var _0x9b97=function(_0x58514f,_0x471d28){_0x58514f=_0x58514f-0x0;var _0x34af31=_0xb979[_0x58514f];return _0x34af31;};'use strict';var _=require(_0x9b97('0x0'));var util=require(_0x9b97('0x1'));var logger=require(_0x9b97('0x2'))(_0x9b97('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x9b97('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x9b97('0x5'));var config=require(_0x9b97('0x6'));var attributes=require('./intDynamics365Field.attributes');module[_0x9b97('0x7')]=function(_0x122cf2,_0x9fba5b){return _0x122cf2[_0x9b97('0x8')]('Dynamics365Field',attributes,{'tableName':_0x9b97('0x9'),'paranoid':![],'indexes':[{'name':_0x9b97('0xa'),'fields':[_0x9b97('0xb'),_0x9b97('0xc')],'unique':!![]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intDynamics365Field/intDynamics365Field.rpc.js b/server/api/intDynamics365Field/intDynamics365Field.rpc.js index 143bdff..5bbe4fd 100644 --- a/server/api/intDynamics365Field/intDynamics365Field.rpc.js +++ b/server/api/intDynamics365Field/intDynamics365Field.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf109=['message','result','catch','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/environment','http','then','info','Dynamics365Field,\x20%s,\x20%s','debug','Dynamics365Field,\x20%s,\x20%s,\x20%s','request\x20sent','error','code'];(function(_0x2c6d06,_0x3b4206){var _0x33c9ec=function(_0x497858){while(--_0x497858){_0x2c6d06['push'](_0x2c6d06['shift']());}};_0x33c9ec(++_0x3b4206);}(_0xf109,0x147));var _0x9f10=function(_0x20a558,_0x160e0e){_0x20a558=_0x20a558-0x0;var _0x53d3f7=_0xf109[_0x20a558];return _0x53d3f7;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x9f10('0x0'));var BPromise=require(_0x9f10('0x1'));var rs=require(_0x9f10('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x9f10('0x3'))['db'];var utils=require(_0x9f10('0x4'));var logger=require('../../config/logger')('rpc');var config=require(_0x9f10('0x5'));var jayson=require('jayson/promise');var client=jayson['client'][_0x9f10('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x1f5ffb,_0x5954c8,_0x209667){return new BPromise(function(_0x19897b,_0x3b5cc0){return client['request'](_0x1f5ffb,_0x209667)[_0x9f10('0x7')](function(_0x54b31a){logger[_0x9f10('0x8')](_0x9f10('0x9'),_0x5954c8,'request\x20sent');logger[_0x9f10('0xa')](_0x9f10('0xb'),_0x5954c8,_0x9f10('0xc'),JSON['stringify'](_0x54b31a));if(_0x54b31a['error']){if(_0x54b31a[_0x9f10('0xd')][_0x9f10('0xe')]===0x1f4){logger[_0x9f10('0xd')](_0x9f10('0x9'),_0x5954c8,_0x54b31a['error'][_0x9f10('0xf')]);return _0x3b5cc0(_0x54b31a[_0x9f10('0xd')][_0x9f10('0xf')]);}logger['error'](_0x9f10('0x9'),_0x5954c8,_0x54b31a[_0x9f10('0xd')][_0x9f10('0xf')]);return _0x19897b(_0x54b31a[_0x9f10('0xd')][_0x9f10('0xf')]);}else{logger[_0x9f10('0x8')](_0x9f10('0x9'),_0x5954c8,_0x9f10('0xc'));_0x19897b(_0x54b31a[_0x9f10('0x10')][_0x9f10('0xf')]);}})[_0x9f10('0x11')](function(_0x569c43){logger[_0x9f10('0xd')](_0x9f10('0x9'),_0x5954c8,_0x569c43);_0x3b5cc0(_0x569c43);});});} \ No newline at end of file +var _0xd9ed=['info','Dynamics365Field,\x20%s,\x20%s','request\x20sent','debug','Dynamics365Field,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','request','then'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xd9ed,0x7d));var _0xdd9e=function(_0x27cd4a,_0x301494){_0x27cd4a=_0x27cd4a-0x0;var _0x2c48e0=_0xd9ed[_0x27cd4a];return _0x2c48e0;};'use strict';var _=require(_0xdd9e('0x0'));var util=require(_0xdd9e('0x1'));var moment=require(_0xdd9e('0x2'));var BPromise=require(_0xdd9e('0x3'));var rs=require(_0xdd9e('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xdd9e('0x5'))['db'];var utils=require(_0xdd9e('0x6'));var logger=require(_0xdd9e('0x7'))('rpc');var config=require(_0xdd9e('0x8'));var jayson=require(_0xdd9e('0x9'));var client=jayson[_0xdd9e('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x3e0d6d,_0x1be80d,_0x477452){return new BPromise(function(_0x29926a,_0x29a813){return client[_0xdd9e('0xb')](_0x3e0d6d,_0x477452)[_0xdd9e('0xc')](function(_0x85b7a6){logger[_0xdd9e('0xd')](_0xdd9e('0xe'),_0x1be80d,_0xdd9e('0xf'));logger[_0xdd9e('0x10')](_0xdd9e('0x11'),_0x1be80d,_0xdd9e('0xf'),JSON[_0xdd9e('0x12')](_0x85b7a6));if(_0x85b7a6[_0xdd9e('0x13')]){if(_0x85b7a6[_0xdd9e('0x13')][_0xdd9e('0x14')]===0x1f4){logger[_0xdd9e('0x13')](_0xdd9e('0xe'),_0x1be80d,_0x85b7a6[_0xdd9e('0x13')][_0xdd9e('0x15')]);return _0x29a813(_0x85b7a6[_0xdd9e('0x13')][_0xdd9e('0x15')]);}logger[_0xdd9e('0x13')](_0xdd9e('0xe'),_0x1be80d,_0x85b7a6[_0xdd9e('0x13')][_0xdd9e('0x15')]);return _0x29926a(_0x85b7a6['error'][_0xdd9e('0x15')]);}else{logger[_0xdd9e('0xd')](_0xdd9e('0xe'),_0x1be80d,_0xdd9e('0xf'));_0x29926a(_0x85b7a6['result'][_0xdd9e('0x15')]);}})[_0xdd9e('0x16')](function(_0x16e978){logger[_0xdd9e('0x13')](_0xdd9e('0xe'),_0x1be80d,_0x16e978);_0x29a813(_0x16e978);});});} \ No newline at end of file diff --git a/server/api/intFreshdeskAccount/index.js b/server/api/intFreshdeskAccount/index.js index d5d8a0e..da93309 100644 --- a/server/api/intFreshdeskAccount/index.js +++ b/server/api/intFreshdeskAccount/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9c4=['exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','./intFreshdeskAccount.controller','get','isAuthenticated','index','/:id','/:id/configurations','getConfigurations','post','create','put'];(function(_0x500c0,_0xdb6a03){var _0xdd146f=function(_0x2e8090){while(--_0x2e8090){_0x500c0['push'](_0x500c0['shift']());}};_0xdd146f(++_0xdb6a03);}(_0xa9c4,0x19f));var _0x4a9c=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xa9c4[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require(_0x4a9c('0x0'));var util=require(_0x4a9c('0x1'));var path=require(_0x4a9c('0x2'));var timeout=require(_0x4a9c('0x3'));var express=require(_0x4a9c('0x4'));var router=express[_0x4a9c('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0x4a9c('0x6'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x4a9c('0x7'));router[_0x4a9c('0x8')]('/',auth[_0x4a9c('0x9')](),controller[_0x4a9c('0xa')]);router[_0x4a9c('0x8')](_0x4a9c('0xb'),auth['isAuthenticated'](),controller['show']);router[_0x4a9c('0x8')](_0x4a9c('0xc'),auth[_0x4a9c('0x9')](),controller[_0x4a9c('0xd')]);router[_0x4a9c('0x8')]('/:id/fields',auth[_0x4a9c('0x9')](),controller['getFields']);router[_0x4a9c('0xe')]('/',auth[_0x4a9c('0x9')](),controller[_0x4a9c('0xf')]);router[_0x4a9c('0xe')](_0x4a9c('0xc'),auth[_0x4a9c('0x9')](),controller['addConfiguration']);router[_0x4a9c('0x10')]('/:id',auth[_0x4a9c('0x9')](),controller['update']);router['delete'](_0x4a9c('0xb'),auth['isAuthenticated'](),controller['destroy']);module[_0x4a9c('0x11')]=router; \ No newline at end of file +var _0xcc18=['isAuthenticated','show','/:id/configurations','getConfigurations','get','/:id/fields','getFields','post','create','addConfiguration','put','delete','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','./intFreshdeskAccount.controller','/:id'];(function(_0x57e008,_0x71ced4){var _0x1f3be8=function(_0x3e5bb8){while(--_0x3e5bb8){_0x57e008['push'](_0x57e008['shift']());}};_0x1f3be8(++_0x71ced4);}(_0xcc18,0x1ab));var _0x8cc1=function(_0x5cb1af,_0x4bdc8c){_0x5cb1af=_0x5cb1af-0x0;var _0x8d7940=_0xcc18[_0x5cb1af];return _0x8d7940;};'use strict';var multer=require(_0x8cc1('0x0'));var util=require(_0x8cc1('0x1'));var path=require(_0x8cc1('0x2'));var timeout=require(_0x8cc1('0x3'));var express=require(_0x8cc1('0x4'));var router=express[_0x8cc1('0x5')]();var fs_extra=require(_0x8cc1('0x6'));var auth=require('../../components/auth/service');var interaction=require(_0x8cc1('0x7'));var config=require('../../config/environment');var controller=require(_0x8cc1('0x8'));router['get']('/',auth['isAuthenticated'](),controller['index']);router['get'](_0x8cc1('0x9'),auth[_0x8cc1('0xa')](),controller[_0x8cc1('0xb')]);router['get'](_0x8cc1('0xc'),auth[_0x8cc1('0xa')](),controller[_0x8cc1('0xd')]);router[_0x8cc1('0xe')](_0x8cc1('0xf'),auth[_0x8cc1('0xa')](),controller[_0x8cc1('0x10')]);router[_0x8cc1('0x11')]('/',auth[_0x8cc1('0xa')](),controller[_0x8cc1('0x12')]);router['post'](_0x8cc1('0xc'),auth['isAuthenticated'](),controller[_0x8cc1('0x13')]);router[_0x8cc1('0x14')](_0x8cc1('0x9'),auth['isAuthenticated'](),controller['update']);router[_0x8cc1('0x15')](_0x8cc1('0x9'),auth['isAuthenticated'](),controller['destroy']);module[_0x8cc1('0x16')]=router; \ No newline at end of file diff --git a/server/api/intFreshdeskAccount/intFreshdeskAccount.attributes.js b/server/api/intFreshdeskAccount/intFreshdeskAccount.attributes.js index a317abb..4e9f51f 100644 --- a/server/api/intFreshdeskAccount/intFreshdeskAccount.attributes.js +++ b/server/api/intFreshdeskAccount/intFreshdeskAccount.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x958a=['sequelize','exports','STRING','username'];(function(_0x576170,_0x1712ae){var _0x397c70=function(_0x2eb9de){while(--_0x2eb9de){_0x576170['push'](_0x576170['shift']());}};_0x397c70(++_0x1712ae);}(_0x958a,0x128));var _0xa958=function(_0x33713,_0xddb3b1){_0x33713=_0x33713-0x0;var _0x2f2e49=_0x958a[_0x33713];return _0x2f2e49;};'use strict';var Sequelize=require(_0xa958('0x0'));module[_0xa958('0x1')]={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0xa958('0x2')]},'username':{'type':Sequelize[_0xa958('0x2')],'unique':_0xa958('0x3')},'apiKey':{'type':Sequelize[_0xa958('0x2')]},'remoteUri':{'type':Sequelize[_0xa958('0x2')],'unique':'remoteUri'},'serverUrl':{'type':Sequelize[_0xa958('0x2')],'allowNull':![]}}; \ No newline at end of file +var _0xf61e=['remoteUri','sequelize','exports','STRING','username'];(function(_0x4f2070,_0x28d0a5){var _0x5c8071=function(_0x47be10){while(--_0x47be10){_0x4f2070['push'](_0x4f2070['shift']());}};_0x5c8071(++_0x28d0a5);}(_0xf61e,0x191));var _0xef61=function(_0x57b4a5,_0x34234c){_0x57b4a5=_0x57b4a5-0x0;var _0x2e73d6=_0xf61e[_0x57b4a5];return _0x2e73d6;};'use strict';var Sequelize=require(_0xef61('0x0'));module[_0xef61('0x1')]={'name':{'type':Sequelize[_0xef61('0x2')]},'description':{'type':Sequelize[_0xef61('0x2')]},'username':{'type':Sequelize[_0xef61('0x2')],'unique':_0xef61('0x3')},'apiKey':{'type':Sequelize[_0xef61('0x2')]},'remoteUri':{'type':Sequelize[_0xef61('0x2')],'unique':_0xef61('0x4')},'serverUrl':{'type':Sequelize[_0xef61('0x2')],'allowNull':![]}}; \ No newline at end of file diff --git a/server/api/intFreshdeskAccount/intFreshdeskAccount.controller.js b/server/api/intFreshdeskAccount/intFreshdeskAccount.controller.js index 373785f..8e8df37 100644 --- a/server/api/intFreshdeskAccount/intFreshdeskAccount.controller.js +++ b/server/api/intFreshdeskAccount/intFreshdeskAccount.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5e47=['priority','group','company','remove','includes','custom_text','custom_dropdown','label','default','choices','capitalize','test','getFields,\x20%s,\x20%s,\x20%s','getFields','stringify','send','Wrong\x20credentials','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','util','path','sox','to-csv','ejs','fs-extra','lodash','jsforce','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','../../components/integrations/configuration','jayson/promise','client','http','debug','request\x20sent','code','error','FreshdeskAccount,\x20%s,\x20%s','message','result','catch','sendStatus','end','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','destroy','name','index','map','FreshdeskAccount','fieldName','type','key','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','includeAll','findAll','rows','show','params','rawAttributes','include','options','find','create','body','findOne','FreshdeskConfiguration','getConfigurations','addConfiguration','AccountId','Subjects','getSubjects','channel','getDescriptions','FreshdeskField','Descriptions','remoteUri','apiKey','slice','substring','GET','api/v2/ticket_fields','Basic\x20%s','format','toString','base64','requester','subject','agent','description'];(function(_0x3f50a8,_0x2e6e75){var _0x148d7f=function(_0x26bbeb){while(--_0x26bbeb){_0x3f50a8['push'](_0x3f50a8['shift']());}};_0x148d7f(++_0x2e6e75);}(_0x5e47,0x92));var _0x75e4=function(_0x138387,_0x2a16ac){_0x138387=_0x138387-0x0;var _0x45b15a=_0x5e47[_0x138387];return _0x45b15a;};'use strict';var emlformat=require(_0x75e4('0x0'));var rimraf=require(_0x75e4('0x1'));var zipdir=require(_0x75e4('0x2'));var jsonpatch=require(_0x75e4('0x3'));var rp=require('request-promise');var moment=require(_0x75e4('0x4'));var BPromise=require(_0x75e4('0x5'));var Mustache=require('mustache');var util=require(_0x75e4('0x6'));var path=require(_0x75e4('0x7'));var sox=require(_0x75e4('0x8'));var csv=require(_0x75e4('0x9'));var ejs=require(_0x75e4('0xa'));var fs=require('fs');var fs_extra=require(_0x75e4('0xb'));var _=require(_0x75e4('0xc'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x75e4('0xd'));var deskjs=require('desk.js');var toCsv=require(_0x75e4('0x9'));var querystring=require('querystring');var Papa=require(_0x75e4('0xe'));var Redis=require('ioredis');var authService=require(_0x75e4('0xf'));var qs=require(_0x75e4('0x10'));var as=require(_0x75e4('0x11'));var hardwareService=require(_0x75e4('0x12'));var logger=require(_0x75e4('0x13'))(_0x75e4('0x14'));var utils=require(_0x75e4('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0x75e4('0x16'));var db=require(_0x75e4('0x17'))['db'];var integrations=require(_0x75e4('0x18'));var jayson=require(_0x75e4('0x19'));var client=jayson[_0x75e4('0x1a')][_0x75e4('0x1b')]({'port':0x232a});function respondWithRpcPromise(_0x3c3129,_0x5c4ba,_0x194352,_0x372421){return new BPromise(function(_0x29d1f3,_0x20d9ae){var _0x5353e2=_0x372421||client;return _0x5353e2['request'](_0x3c3129,_0x194352)['then'](function(_0x14a6a8){logger['info']('FreshdeskAccount,\x20%s,\x20%s',_0x5c4ba,'request\x20sent');logger[_0x75e4('0x1c')]('FreshdeskAccount,\x20%s,\x20%s,\x20%s',_0x5c4ba,_0x75e4('0x1d'),JSON['stringify'](_0x14a6a8));if(_0x14a6a8['error']){if(_0x14a6a8['error'][_0x75e4('0x1e')]===0x1f4){logger[_0x75e4('0x1f')](_0x75e4('0x20'),_0x5c4ba,_0x14a6a8[_0x75e4('0x1f')][_0x75e4('0x21')]);return _0x20d9ae(_0x14a6a8[_0x75e4('0x1f')][_0x75e4('0x21')]);}logger[_0x75e4('0x1f')](_0x75e4('0x20'),_0x5c4ba,_0x14a6a8[_0x75e4('0x1f')]['message']);return _0x29d1f3(_0x14a6a8['error']['message']);}else{logger['info']('FreshdeskAccount,\x20%s,\x20%s',_0x5c4ba,_0x75e4('0x1d'));_0x29d1f3(_0x14a6a8[_0x75e4('0x22')][_0x75e4('0x21')]);}})[_0x75e4('0x23')](function(_0x4e3a79){logger[_0x75e4('0x1f')]('FreshdeskAccount,\x20%s,\x20%s',_0x5c4ba,_0x4e3a79);_0x20d9ae(_0x4e3a79);});});}function respondWithStatusCode(_0x1a61d2,_0x46fa4e){_0x46fa4e=_0x46fa4e||0xcc;return function(_0x1fec15){if(_0x1fec15){return _0x1a61d2[_0x75e4('0x24')](_0x46fa4e);}return _0x1a61d2['status'](_0x46fa4e)[_0x75e4('0x25')]();};}function respondWithResult(_0x20e349,_0x1e4a1b){_0x1e4a1b=_0x1e4a1b||0xc8;return function(_0x49d858){if(_0x49d858){return _0x20e349[_0x75e4('0x26')](_0x1e4a1b)[_0x75e4('0x27')](_0x49d858);}};}function respondWithFilteredResult(_0x1e7d0c,_0x5b2e11){return function(_0x5d51dc){if(_0x5d51dc){var _0x836a79=typeof _0x5b2e11[_0x75e4('0x28')]===_0x75e4('0x29')&&typeof _0x5b2e11[_0x75e4('0x2a')]===_0x75e4('0x29');var _0x38afa9=_0x5d51dc[_0x75e4('0x2b')];var _0x2968fd=_0x836a79?0x0:_0x5b2e11[_0x75e4('0x28')];var _0x13dfcd=_0x836a79?_0x5d51dc[_0x75e4('0x2b')]:_0x5b2e11['offset']+_0x5b2e11[_0x75e4('0x2a')];var _0xb1453e;if(_0x13dfcd>=_0x38afa9){_0x13dfcd=_0x38afa9;_0xb1453e=0xc8;}else{_0xb1453e=0xce;}_0x1e7d0c[_0x75e4('0x26')](_0xb1453e);return _0x1e7d0c[_0x75e4('0x2c')](_0x75e4('0x2d'),_0x2968fd+'-'+_0x13dfcd+'/'+_0x38afa9)[_0x75e4('0x27')](_0x5d51dc);}return null;};}function patchUpdates(_0x1f294a){return function(_0x542952){try{jsonpatch[_0x75e4('0x2e')](_0x542952,_0x1f294a,!![]);}catch(_0x3ee50a){return BPromise[_0x75e4('0x2f')](_0x3ee50a);}return _0x542952[_0x75e4('0x30')]();};}function saveUpdates(_0xe4d0ce,_0x2a9f3f){return function(_0x453e91){if(_0x453e91){return _0x453e91[_0x75e4('0x31')](_0xe4d0ce)[_0x75e4('0x32')](function(_0x3cbfd3){return _0x3cbfd3;});}return null;};}function removeEntity(_0x3c20d4,_0x563556){return function(_0x7ea665){if(_0x7ea665){return _0x7ea665[_0x75e4('0x33')]()[_0x75e4('0x32')](function(){_0x3c20d4[_0x75e4('0x26')](0xcc)['end']();});}};}function handleEntityNotFound(_0x41adbd,_0x57d914){return function(_0x3a8c3f){if(!_0x3a8c3f){_0x41adbd[_0x75e4('0x24')](0x194);}return _0x3a8c3f;};}function handleError(_0x19cac4,_0x3d2084){_0x3d2084=_0x3d2084||0x1f4;return function(_0x4af6c2){logger[_0x75e4('0x1f')](_0x4af6c2['stack']);if(_0x4af6c2[_0x75e4('0x34')]){delete _0x4af6c2[_0x75e4('0x34')];}_0x19cac4['status'](_0x3d2084)['send'](_0x4af6c2);};}exports[_0x75e4('0x35')]=function(_0x222cda,_0x30f727){var _0x10b8cc={},_0x3c54ab={},_0x13bf9a={'count':0x0,'rows':[]};var _0x5252f1=_[_0x75e4('0x36')](db[_0x75e4('0x37')]['rawAttributes'],function(_0x403eeb){return{'name':_0x403eeb[_0x75e4('0x38')],'type':_0x403eeb[_0x75e4('0x39')][_0x75e4('0x3a')]};});_0x3c54ab[_0x75e4('0x3b')]=_[_0x75e4('0x36')](_0x5252f1,'name');_0x3c54ab['query']=_[_0x75e4('0x3c')](_0x222cda[_0x75e4('0x3d')]);_0x3c54ab[_0x75e4('0x3e')]=_[_0x75e4('0x3f')](_0x3c54ab[_0x75e4('0x3b')],_0x3c54ab[_0x75e4('0x3d')]);_0x10b8cc[_0x75e4('0x40')]=_[_0x75e4('0x3f')](_0x3c54ab[_0x75e4('0x3b')],qs['fields'](_0x222cda[_0x75e4('0x3d')][_0x75e4('0x41')]));_0x10b8cc[_0x75e4('0x40')]=_0x10b8cc[_0x75e4('0x40')][_0x75e4('0x42')]?_0x10b8cc[_0x75e4('0x40')]:_0x3c54ab[_0x75e4('0x3b')];if(!_0x222cda['query'][_0x75e4('0x43')](_0x75e4('0x44'))){_0x10b8cc[_0x75e4('0x2a')]=qs['limit'](_0x222cda['query'][_0x75e4('0x2a')]);_0x10b8cc[_0x75e4('0x28')]=qs[_0x75e4('0x28')](_0x222cda['query']['offset']);}_0x10b8cc[_0x75e4('0x45')]=qs[_0x75e4('0x46')](_0x222cda[_0x75e4('0x3d')]['sort']);_0x10b8cc[_0x75e4('0x47')]=qs[_0x75e4('0x3e')](_[_0x75e4('0x48')](_0x222cda[_0x75e4('0x3d')],_0x3c54ab[_0x75e4('0x3e')]),_0x5252f1);if(_0x222cda[_0x75e4('0x3d')][_0x75e4('0x49')]){_0x10b8cc[_0x75e4('0x47')]=_[_0x75e4('0x4a')](_0x10b8cc[_0x75e4('0x47')],{'$or':_[_0x75e4('0x36')](_0x5252f1,function(_0xc284b4){if(_0xc284b4[_0x75e4('0x39')]!==_0x75e4('0x4b')){var _0x335d4d={};_0x335d4d[_0xc284b4['name']]={'$like':'%'+_0x222cda[_0x75e4('0x3d')][_0x75e4('0x49')]+'%'};return _0x335d4d;}})});}_0x10b8cc=_[_0x75e4('0x4a')]({},_0x10b8cc,_0x222cda['options']);var _0x4f4941={'where':_0x10b8cc['where']};return db[_0x75e4('0x37')][_0x75e4('0x2b')](_0x4f4941)[_0x75e4('0x32')](function(_0x5243f5){_0x13bf9a['count']=_0x5243f5;if(_0x222cda['query'][_0x75e4('0x4c')]){_0x10b8cc['include']=[{'all':!![]}];}return db[_0x75e4('0x37')][_0x75e4('0x4d')](_0x10b8cc);})[_0x75e4('0x32')](function(_0x5bd845){_0x13bf9a[_0x75e4('0x4e')]=_0x5bd845;return _0x13bf9a;})[_0x75e4('0x32')](respondWithFilteredResult(_0x30f727,_0x10b8cc))[_0x75e4('0x23')](handleError(_0x30f727,null));};exports[_0x75e4('0x4f')]=function(_0x3ae60e,_0x12a166){var _0x59110b={'raw':![],'where':{'id':_0x3ae60e[_0x75e4('0x50')]['id']}},_0x552d68={};_0x552d68[_0x75e4('0x3b')]=_[_0x75e4('0x3c')](db[_0x75e4('0x37')][_0x75e4('0x51')]);_0x552d68[_0x75e4('0x3d')]=_[_0x75e4('0x3c')](_0x3ae60e[_0x75e4('0x3d')]);_0x552d68[_0x75e4('0x3e')]=_[_0x75e4('0x3f')](_0x552d68['model'],_0x552d68['query']);_0x59110b[_0x75e4('0x40')]=_[_0x75e4('0x3f')](_0x552d68[_0x75e4('0x3b')],qs['fields'](_0x3ae60e[_0x75e4('0x3d')][_0x75e4('0x41')]));_0x59110b[_0x75e4('0x40')]=_0x59110b[_0x75e4('0x40')]['length']?_0x59110b[_0x75e4('0x40')]:_0x552d68[_0x75e4('0x3b')];if(_0x3ae60e[_0x75e4('0x3d')]['includeAll']){_0x59110b[_0x75e4('0x52')]=[{'all':!![]}];}_0x59110b=_['merge']({},_0x59110b,_0x3ae60e[_0x75e4('0x53')]);return db[_0x75e4('0x37')][_0x75e4('0x54')](_0x59110b)['then'](handleEntityNotFound(_0x12a166,null))['then'](respondWithResult(_0x12a166,null))[_0x75e4('0x23')](handleError(_0x12a166,null));};exports['create']=function(_0x344ee7,_0x4d7285){return db['FreshdeskAccount'][_0x75e4('0x55')](_0x344ee7[_0x75e4('0x56')],{})[_0x75e4('0x32')](respondWithResult(_0x4d7285,0xc9))['catch'](handleError(_0x4d7285,null));};exports[_0x75e4('0x31')]=function(_0x1d599a,_0x390537){if(_0x1d599a[_0x75e4('0x56')]['id']){delete _0x1d599a[_0x75e4('0x56')]['id'];}return db[_0x75e4('0x37')][_0x75e4('0x54')]({'where':{'id':_0x1d599a[_0x75e4('0x50')]['id']}})['then'](handleEntityNotFound(_0x390537,null))[_0x75e4('0x32')](saveUpdates(_0x1d599a['body'],null))['then'](respondWithResult(_0x390537,null))['catch'](handleError(_0x390537,null));};exports[_0x75e4('0x33')]=function(_0x56f721,_0x1eee19){return db['FreshdeskAccount'][_0x75e4('0x54')]({'where':{'id':_0x56f721['params']['id']}})['then'](handleEntityNotFound(_0x1eee19,null))[_0x75e4('0x32')](removeEntity(_0x1eee19,null))['catch'](handleError(_0x1eee19,null));};exports['getConfigurations']=function(_0x5d1a13,_0xb07263,_0x336bd3){var _0x3f4fbe={};var _0x5e339f={};var _0x38b249;var _0x55ccb9;return db[_0x75e4('0x37')][_0x75e4('0x57')]({'where':{'id':_0x5d1a13[_0x75e4('0x50')]['id']}})[_0x75e4('0x32')](handleEntityNotFound(_0xb07263,null))['then'](function(_0x226dc3){if(_0x226dc3){_0x38b249=_0x226dc3;_0x5e339f['model']=_[_0x75e4('0x3c')](db[_0x75e4('0x58')][_0x75e4('0x51')]);_0x5e339f[_0x75e4('0x3d')]=_[_0x75e4('0x3c')](_0x5d1a13[_0x75e4('0x3d')]);_0x5e339f[_0x75e4('0x3e')]=_[_0x75e4('0x3f')](_0x5e339f['model'],_0x5e339f[_0x75e4('0x3d')]);_0x3f4fbe[_0x75e4('0x40')]=_[_0x75e4('0x3f')](_0x5e339f[_0x75e4('0x3b')],qs[_0x75e4('0x41')](_0x5d1a13[_0x75e4('0x3d')][_0x75e4('0x41')]));_0x3f4fbe['attributes']=_0x3f4fbe[_0x75e4('0x40')][_0x75e4('0x42')]?_0x3f4fbe[_0x75e4('0x40')]:_0x5e339f[_0x75e4('0x3b')];_0x3f4fbe['order']=qs['sort'](_0x5d1a13[_0x75e4('0x3d')][_0x75e4('0x46')]);_0x3f4fbe[_0x75e4('0x47')]=qs['filters'](_[_0x75e4('0x48')](_0x5d1a13[_0x75e4('0x3d')],_0x5e339f[_0x75e4('0x3e')]));if(_0x5d1a13[_0x75e4('0x3d')][_0x75e4('0x49')]){_0x3f4fbe[_0x75e4('0x47')]=_[_0x75e4('0x4a')](_0x3f4fbe[_0x75e4('0x47')],{'$or':_['map'](_0x3f4fbe[_0x75e4('0x40')],function(_0x27ae33){var _0x2514fc={};_0x2514fc[_0x27ae33]={'$like':'%'+_0x5d1a13[_0x75e4('0x3d')][_0x75e4('0x49')]+'%'};return _0x2514fc;})});}_0x3f4fbe=_['merge']({},_0x3f4fbe,_0x5d1a13['options']);return _0x38b249[_0x75e4('0x59')](_0x3f4fbe);}})['then'](function(_0x1bffd8){if(_0x1bffd8){_0x55ccb9=_0x1bffd8[_0x75e4('0x42')];if(!_0x5d1a13[_0x75e4('0x3d')][_0x75e4('0x43')](_0x75e4('0x44'))){_0x3f4fbe[_0x75e4('0x2a')]=qs[_0x75e4('0x2a')](_0x5d1a13[_0x75e4('0x3d')][_0x75e4('0x2a')]);_0x3f4fbe[_0x75e4('0x28')]=qs[_0x75e4('0x28')](_0x5d1a13[_0x75e4('0x3d')][_0x75e4('0x28')]);}return _0x38b249[_0x75e4('0x59')](_0x3f4fbe);}})[_0x75e4('0x32')](function(_0xbee3cb){if(_0xbee3cb){return _0xbee3cb?{'count':_0x55ccb9,'rows':_0xbee3cb}:null;}})[_0x75e4('0x32')](respondWithResult(_0xb07263,null))[_0x75e4('0x23')](handleError(_0xb07263,null));};exports[_0x75e4('0x5a')]=function(_0x50dc19,_0x19869d,_0x30a2c2){if(_0x50dc19[_0x75e4('0x56')]['id']){delete _0x50dc19['body']['id'];}return db[_0x75e4('0x37')]['findOne']({'where':{'id':_0x50dc19[_0x75e4('0x50')]['id']}})[_0x75e4('0x32')](handleEntityNotFound(_0x19869d,null))[_0x75e4('0x32')](function(_0x5b3c90){if(_0x5b3c90){_0x50dc19[_0x75e4('0x56')][_0x75e4('0x5b')]=_0x5b3c90['id'];_0x50dc19[_0x75e4('0x56')][_0x75e4('0x5c')]=integrations[_0x75e4('0x5d')](_0x50dc19[_0x75e4('0x56')][_0x75e4('0x5e')],_0x50dc19[_0x75e4('0x56')][_0x75e4('0x39')]);_0x50dc19[_0x75e4('0x56')]['Descriptions']=integrations[_0x75e4('0x5f')](_0x50dc19[_0x75e4('0x56')][_0x75e4('0x5e')],_0x50dc19[_0x75e4('0x56')][_0x75e4('0x39')]);return db['FreshdeskConfiguration'][_0x75e4('0x55')](_0x50dc19[_0x75e4('0x56')],{'include':[{'model':db[_0x75e4('0x60')],'as':_0x75e4('0x5c')},{'model':db['FreshdeskField'],'as':_0x75e4('0x61')}]});}return null;})[_0x75e4('0x32')](respondWithResult(_0x19869d,null))[_0x75e4('0x23')](handleError(_0x19869d,null));};exports['getFields']=function(_0x4c96ed,_0xd4c6b6,_0x57ab22){var _0x3b3ee9='';return db[_0x75e4('0x37')]['findOne']({'where':{'id':_0x4c96ed[_0x75e4('0x50')]['id']},'attributes':['id',_0x75e4('0x62'),_0x75e4('0x63')]})[_0x75e4('0x32')](handleEntityNotFound(_0xd4c6b6,null))['then'](function(_0x2b7989){if(_0x2b7989){_0x3b3ee9=_0x2b7989[_0x75e4('0x62')];var _0x39f4e8=_0x3b3ee9[_0x75e4('0x64')](-0x1);if(_0x39f4e8==='/'){_0x3b3ee9=_0x3b3ee9[_0x75e4('0x65')](0x0,_0x3b3ee9['lastIndexOf'](_0x39f4e8));}return rp({'method':_0x75e4('0x66'),'uri':util['format']('%s/%s',_0x3b3ee9,_0x75e4('0x67')),'headers':{'Authorization':util['format'](_0x75e4('0x68'),new Buffer(util[_0x75e4('0x69')]('%s:X',_0x2b7989[_0x75e4('0x63')]))[_0x75e4('0x6a')](_0x75e4('0x6b')))},'json':!![]});}})[_0x75e4('0x32')](function(_0x2126d8){if(_0x2126d8){var _0x54a77b=[_0x75e4('0x6c'),_0x75e4('0x6d'),_0x75e4('0x6e'),_0x75e4('0x6f'),_0x75e4('0x26'),_0x75e4('0x70'),_0x75e4('0x71'),'source','ticket_type','group',_0x75e4('0x72')];_[_0x75e4('0x73')](_0x2126d8,function(_0x549e5f){return _0x54a77b[_0x75e4('0x74')](_0x549e5f[_0x75e4('0x34')])||!_0x549e5f['default']&&_0x549e5f[_0x75e4('0x39')]!==_0x75e4('0x75')&&_0x549e5f[_0x75e4('0x39')]!==_0x75e4('0x76');});return{'count':_0x2126d8[_0x75e4('0x42')],'rows':_[_0x75e4('0x36')](_0x2126d8,function(_0x291b28){return{'id':_0x291b28[_0x75e4('0x34')],'name':_0x291b28[_0x75e4('0x77')],'custom':!_0x291b28[_0x75e4('0x78')],'options':_0x291b28['choices']?_[_0x75e4('0x36')](_0x291b28[_0x75e4('0x79')],function(_0x3551a0){return{'name':_[_0x75e4('0x7a')](_0x3551a0),'value':_0x3551a0};}):[]};})};}})[_0x75e4('0x32')](respondWithResult(_0xd4c6b6,null))['catch'](function(_0x395a6a){var _0x4d5c29=_0x4c96ed[_0x75e4('0x3d')][_0x75e4('0x7b')]?0x1f4:_0x395a6a['statusCode']||0x1f4;logger['error'](_0x75e4('0x7c'),_0x75e4('0x7d'),_0x4d5c29,JSON[_0x75e4('0x7e')](_0x395a6a));delete _0x395a6a[_0x75e4('0x34')];if(_0x4d5c29===0x191){_0x4d5c29=0x190;}_0xd4c6b6[_0x75e4('0x26')](_0x4d5c29)[_0x75e4('0x7f')](_0x4c96ed[_0x75e4('0x3d')][_0x75e4('0x7b')]?{'message':_0x75e4('0x80'),'statusCode':_0x395a6a['statusCode']}:_0x395a6a);});}; \ No newline at end of file +var _0xdb60=['requester','subject','description','priority','group','ticket_type','company','includes','default','custom_dropdown','label','choices','capitalize','test','statusCode','getFields,\x20%s,\x20%s,\x20%s','Wrong\x20credentials','eml-format','rimraf','moment','bluebird','mustache','to-csv','ejs','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','jayson/promise','client','http','then','FreshdeskAccount,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','info','catch','sendStatus','end','status','undefined','limit','count','offset','set','apply','reject','save','update','destroy','stack','name','send','FreshdeskAccount','rawAttributes','fieldName','type','key','model','map','query','keys','filters','intersection','attributes','fields','hasOwnProperty','nolimit','sort','where','pick','filter','merge','options','includeAll','include','findAll','rows','params','length','find','create','body','getConfigurations','FreshdeskConfiguration','order','addConfiguration','findOne','AccountId','getSubjects','channel','getDescriptions','FreshdeskField','Descriptions','getFields','remoteUri','apiKey','slice','lastIndexOf','GET','format','Basic\x20%s','%s:X','toString','base64'];(function(_0x486f4a,_0x478dc7){var _0x135d99=function(_0x434008){while(--_0x434008){_0x486f4a['push'](_0x486f4a['shift']());}};_0x135d99(++_0x478dc7);}(_0xdb60,0xfd));var _0x0db6=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xdb60[_0x20a584];return _0x4b41a8;};'use strict';var emlformat=require(_0x0db6('0x0'));var rimraf=require(_0x0db6('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x0db6('0x2'));var BPromise=require(_0x0db6('0x3'));var Mustache=require(_0x0db6('0x4'));var util=require('util');var path=require('path');var sox=require('sox');var csv=require(_0x0db6('0x5'));var ejs=require(_0x0db6('0x6'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x0db6('0x7'));var squel=require(_0x0db6('0x8'));var crypto=require(_0x0db6('0x9'));var jsforce=require(_0x0db6('0xa'));var deskjs=require('desk.js');var toCsv=require(_0x0db6('0x5'));var querystring=require(_0x0db6('0xb'));var Papa=require(_0x0db6('0xc'));var Redis=require(_0x0db6('0xd'));var authService=require('../../components/auth/service');var qs=require(_0x0db6('0xe'));var as=require(_0x0db6('0xf'));var hardwareService=require(_0x0db6('0x10'));var logger=require(_0x0db6('0x11'))('api');var utils=require(_0x0db6('0x12'));var config=require(_0x0db6('0x13'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];var integrations=require('../../components/integrations/configuration');var jayson=require(_0x0db6('0x14'));var client=jayson[_0x0db6('0x15')][_0x0db6('0x16')]({'port':0x232a});function respondWithRpcPromise(_0x37d1ab,_0x575966,_0x1c0742,_0xbe52c8){return new BPromise(function(_0x51a36b,_0x5d0e24){var _0x80f718=_0xbe52c8||client;return _0x80f718['request'](_0x37d1ab,_0x1c0742)[_0x0db6('0x17')](function(_0x3e553b){logger['info'](_0x0db6('0x18'),_0x575966,_0x0db6('0x19'));logger[_0x0db6('0x1a')]('FreshdeskAccount,\x20%s,\x20%s,\x20%s',_0x575966,_0x0db6('0x19'),JSON[_0x0db6('0x1b')](_0x3e553b));if(_0x3e553b['error']){if(_0x3e553b[_0x0db6('0x1c')][_0x0db6('0x1d')]===0x1f4){logger[_0x0db6('0x1c')](_0x0db6('0x18'),_0x575966,_0x3e553b[_0x0db6('0x1c')][_0x0db6('0x1e')]);return _0x5d0e24(_0x3e553b[_0x0db6('0x1c')][_0x0db6('0x1e')]);}logger[_0x0db6('0x1c')](_0x0db6('0x18'),_0x575966,_0x3e553b['error']['message']);return _0x51a36b(_0x3e553b[_0x0db6('0x1c')][_0x0db6('0x1e')]);}else{logger[_0x0db6('0x1f')](_0x0db6('0x18'),_0x575966,_0x0db6('0x19'));_0x51a36b(_0x3e553b['result'][_0x0db6('0x1e')]);}})[_0x0db6('0x20')](function(_0x32cd20){logger[_0x0db6('0x1c')](_0x0db6('0x18'),_0x575966,_0x32cd20);_0x5d0e24(_0x32cd20);});});}function respondWithStatusCode(_0x4f41e2,_0x35d4a4){_0x35d4a4=_0x35d4a4||0xcc;return function(_0x21326b){if(_0x21326b){return _0x4f41e2[_0x0db6('0x21')](_0x35d4a4);}return _0x4f41e2['status'](_0x35d4a4)[_0x0db6('0x22')]();};}function respondWithResult(_0x4947d7,_0x33af50){_0x33af50=_0x33af50||0xc8;return function(_0x281271){if(_0x281271){return _0x4947d7[_0x0db6('0x23')](_0x33af50)['json'](_0x281271);}};}function respondWithFilteredResult(_0x4002ad,_0x4210e1){return function(_0x51436c){if(_0x51436c){var _0x557596=typeof _0x4210e1['offset']===_0x0db6('0x24')&&typeof _0x4210e1[_0x0db6('0x25')]===_0x0db6('0x24');var _0x43db7c=_0x51436c[_0x0db6('0x26')];var _0x1d24f8=_0x557596?0x0:_0x4210e1[_0x0db6('0x27')];var _0x253d29=_0x557596?_0x51436c[_0x0db6('0x26')]:_0x4210e1[_0x0db6('0x27')]+_0x4210e1[_0x0db6('0x25')];var _0x4865e7;if(_0x253d29>=_0x43db7c){_0x253d29=_0x43db7c;_0x4865e7=0xc8;}else{_0x4865e7=0xce;}_0x4002ad['status'](_0x4865e7);return _0x4002ad[_0x0db6('0x28')]('Content-Range',_0x1d24f8+'-'+_0x253d29+'/'+_0x43db7c)['json'](_0x51436c);}return null;};}function patchUpdates(_0x112257){return function(_0x4093d7){try{jsonpatch[_0x0db6('0x29')](_0x4093d7,_0x112257,!![]);}catch(_0x80e84d){return BPromise[_0x0db6('0x2a')](_0x80e84d);}return _0x4093d7[_0x0db6('0x2b')]();};}function saveUpdates(_0x3344a3,_0x3c16b8){return function(_0x39b9a2){if(_0x39b9a2){return _0x39b9a2[_0x0db6('0x2c')](_0x3344a3)[_0x0db6('0x17')](function(_0x5da589){return _0x5da589;});}return null;};}function removeEntity(_0x1551ab,_0x2f0ecb){return function(_0x4fd5c8){if(_0x4fd5c8){return _0x4fd5c8[_0x0db6('0x2d')]()[_0x0db6('0x17')](function(){_0x1551ab['status'](0xcc)[_0x0db6('0x22')]();});}};}function handleEntityNotFound(_0x3dc99b,_0x12b2aa){return function(_0x307f2c){if(!_0x307f2c){_0x3dc99b[_0x0db6('0x21')](0x194);}return _0x307f2c;};}function handleError(_0x3442b8,_0x10126c){_0x10126c=_0x10126c||0x1f4;return function(_0xc5820b){logger[_0x0db6('0x1c')](_0xc5820b[_0x0db6('0x2e')]);if(_0xc5820b[_0x0db6('0x2f')]){delete _0xc5820b[_0x0db6('0x2f')];}_0x3442b8[_0x0db6('0x23')](_0x10126c)[_0x0db6('0x30')](_0xc5820b);};}exports['index']=function(_0x2a5a4a,_0x3dd5fb){var _0x47a09a={},_0x4801be={},_0x568c91={'count':0x0,'rows':[]};var _0x11c82a=_['map'](db[_0x0db6('0x31')][_0x0db6('0x32')],function(_0x279710){return{'name':_0x279710[_0x0db6('0x33')],'type':_0x279710[_0x0db6('0x34')][_0x0db6('0x35')]};});_0x4801be[_0x0db6('0x36')]=_[_0x0db6('0x37')](_0x11c82a,_0x0db6('0x2f'));_0x4801be[_0x0db6('0x38')]=_[_0x0db6('0x39')](_0x2a5a4a[_0x0db6('0x38')]);_0x4801be[_0x0db6('0x3a')]=_[_0x0db6('0x3b')](_0x4801be[_0x0db6('0x36')],_0x4801be[_0x0db6('0x38')]);_0x47a09a[_0x0db6('0x3c')]=_[_0x0db6('0x3b')](_0x4801be[_0x0db6('0x36')],qs[_0x0db6('0x3d')](_0x2a5a4a[_0x0db6('0x38')][_0x0db6('0x3d')]));_0x47a09a[_0x0db6('0x3c')]=_0x47a09a[_0x0db6('0x3c')]['length']?_0x47a09a[_0x0db6('0x3c')]:_0x4801be['model'];if(!_0x2a5a4a[_0x0db6('0x38')][_0x0db6('0x3e')](_0x0db6('0x3f'))){_0x47a09a['limit']=qs['limit'](_0x2a5a4a[_0x0db6('0x38')][_0x0db6('0x25')]);_0x47a09a[_0x0db6('0x27')]=qs[_0x0db6('0x27')](_0x2a5a4a[_0x0db6('0x38')][_0x0db6('0x27')]);}_0x47a09a['order']=qs[_0x0db6('0x40')](_0x2a5a4a[_0x0db6('0x38')][_0x0db6('0x40')]);_0x47a09a[_0x0db6('0x41')]=qs[_0x0db6('0x3a')](_[_0x0db6('0x42')](_0x2a5a4a[_0x0db6('0x38')],_0x4801be[_0x0db6('0x3a')]),_0x11c82a);if(_0x2a5a4a[_0x0db6('0x38')][_0x0db6('0x43')]){_0x47a09a[_0x0db6('0x41')]=_[_0x0db6('0x44')](_0x47a09a['where'],{'$or':_[_0x0db6('0x37')](_0x11c82a,function(_0x5ea2b6){if(_0x5ea2b6['type']!=='VIRTUAL'){var _0xaccc82={};_0xaccc82[_0x5ea2b6[_0x0db6('0x2f')]]={'$like':'%'+_0x2a5a4a[_0x0db6('0x38')][_0x0db6('0x43')]+'%'};return _0xaccc82;}})});}_0x47a09a=_[_0x0db6('0x44')]({},_0x47a09a,_0x2a5a4a[_0x0db6('0x45')]);var _0xd38d27={'where':_0x47a09a[_0x0db6('0x41')]};return db[_0x0db6('0x31')][_0x0db6('0x26')](_0xd38d27)[_0x0db6('0x17')](function(_0x10f0e8){_0x568c91[_0x0db6('0x26')]=_0x10f0e8;if(_0x2a5a4a['query'][_0x0db6('0x46')]){_0x47a09a[_0x0db6('0x47')]=[{'all':!![]}];}return db[_0x0db6('0x31')][_0x0db6('0x48')](_0x47a09a);})['then'](function(_0x23e268){_0x568c91[_0x0db6('0x49')]=_0x23e268;return _0x568c91;})[_0x0db6('0x17')](respondWithFilteredResult(_0x3dd5fb,_0x47a09a))[_0x0db6('0x20')](handleError(_0x3dd5fb,null));};exports['show']=function(_0x58c147,_0x193a8f){var _0x2eb6d2={'raw':![],'where':{'id':_0x58c147[_0x0db6('0x4a')]['id']}},_0x29474b={};_0x29474b[_0x0db6('0x36')]=_[_0x0db6('0x39')](db[_0x0db6('0x31')]['rawAttributes']);_0x29474b['query']=_[_0x0db6('0x39')](_0x58c147[_0x0db6('0x38')]);_0x29474b[_0x0db6('0x3a')]=_[_0x0db6('0x3b')](_0x29474b[_0x0db6('0x36')],_0x29474b[_0x0db6('0x38')]);_0x2eb6d2[_0x0db6('0x3c')]=_[_0x0db6('0x3b')](_0x29474b[_0x0db6('0x36')],qs[_0x0db6('0x3d')](_0x58c147[_0x0db6('0x38')][_0x0db6('0x3d')]));_0x2eb6d2[_0x0db6('0x3c')]=_0x2eb6d2[_0x0db6('0x3c')][_0x0db6('0x4b')]?_0x2eb6d2['attributes']:_0x29474b[_0x0db6('0x36')];if(_0x58c147['query'][_0x0db6('0x46')]){_0x2eb6d2[_0x0db6('0x47')]=[{'all':!![]}];}_0x2eb6d2=_[_0x0db6('0x44')]({},_0x2eb6d2,_0x58c147[_0x0db6('0x45')]);return db[_0x0db6('0x31')][_0x0db6('0x4c')](_0x2eb6d2)[_0x0db6('0x17')](handleEntityNotFound(_0x193a8f,null))[_0x0db6('0x17')](respondWithResult(_0x193a8f,null))['catch'](handleError(_0x193a8f,null));};exports[_0x0db6('0x4d')]=function(_0x5b8ccf,_0x3e56d6){return db['FreshdeskAccount'][_0x0db6('0x4d')](_0x5b8ccf[_0x0db6('0x4e')],{})[_0x0db6('0x17')](respondWithResult(_0x3e56d6,0xc9))['catch'](handleError(_0x3e56d6,null));};exports[_0x0db6('0x2c')]=function(_0x28c78d,_0x53bd55){if(_0x28c78d[_0x0db6('0x4e')]['id']){delete _0x28c78d[_0x0db6('0x4e')]['id'];}return db[_0x0db6('0x31')][_0x0db6('0x4c')]({'where':{'id':_0x28c78d[_0x0db6('0x4a')]['id']}})['then'](handleEntityNotFound(_0x53bd55,null))['then'](saveUpdates(_0x28c78d[_0x0db6('0x4e')],null))[_0x0db6('0x17')](respondWithResult(_0x53bd55,null))[_0x0db6('0x20')](handleError(_0x53bd55,null));};exports[_0x0db6('0x2d')]=function(_0x506d94,_0x2af911){return db[_0x0db6('0x31')][_0x0db6('0x4c')]({'where':{'id':_0x506d94['params']['id']}})['then'](handleEntityNotFound(_0x2af911,null))[_0x0db6('0x17')](removeEntity(_0x2af911,null))[_0x0db6('0x20')](handleError(_0x2af911,null));};exports[_0x0db6('0x4f')]=function(_0x3b1376,_0x3aec9e,_0x231b21){var _0x1447e0={};var _0x41ea3b={};var _0x1d046f;var _0x1fdce2;return db[_0x0db6('0x31')]['findOne']({'where':{'id':_0x3b1376['params']['id']}})[_0x0db6('0x17')](handleEntityNotFound(_0x3aec9e,null))[_0x0db6('0x17')](function(_0x4c5ba1){if(_0x4c5ba1){_0x1d046f=_0x4c5ba1;_0x41ea3b['model']=_['keys'](db[_0x0db6('0x50')][_0x0db6('0x32')]);_0x41ea3b[_0x0db6('0x38')]=_['keys'](_0x3b1376[_0x0db6('0x38')]);_0x41ea3b['filters']=_[_0x0db6('0x3b')](_0x41ea3b[_0x0db6('0x36')],_0x41ea3b[_0x0db6('0x38')]);_0x1447e0[_0x0db6('0x3c')]=_[_0x0db6('0x3b')](_0x41ea3b[_0x0db6('0x36')],qs[_0x0db6('0x3d')](_0x3b1376['query'][_0x0db6('0x3d')]));_0x1447e0[_0x0db6('0x3c')]=_0x1447e0[_0x0db6('0x3c')][_0x0db6('0x4b')]?_0x1447e0[_0x0db6('0x3c')]:_0x41ea3b[_0x0db6('0x36')];_0x1447e0[_0x0db6('0x51')]=qs[_0x0db6('0x40')](_0x3b1376['query'][_0x0db6('0x40')]);_0x1447e0[_0x0db6('0x41')]=qs[_0x0db6('0x3a')](_[_0x0db6('0x42')](_0x3b1376[_0x0db6('0x38')],_0x41ea3b[_0x0db6('0x3a')]));if(_0x3b1376[_0x0db6('0x38')][_0x0db6('0x43')]){_0x1447e0[_0x0db6('0x41')]=_[_0x0db6('0x44')](_0x1447e0[_0x0db6('0x41')],{'$or':_['map'](_0x1447e0[_0x0db6('0x3c')],function(_0x4bbbb3){var _0x10a094={};_0x10a094[_0x4bbbb3]={'$like':'%'+_0x3b1376['query'][_0x0db6('0x43')]+'%'};return _0x10a094;})});}_0x1447e0=_[_0x0db6('0x44')]({},_0x1447e0,_0x3b1376[_0x0db6('0x45')]);return _0x1d046f[_0x0db6('0x4f')](_0x1447e0);}})[_0x0db6('0x17')](function(_0x2bbd90){if(_0x2bbd90){_0x1fdce2=_0x2bbd90[_0x0db6('0x4b')];if(!_0x3b1376[_0x0db6('0x38')]['hasOwnProperty']('nolimit')){_0x1447e0['limit']=qs[_0x0db6('0x25')](_0x3b1376[_0x0db6('0x38')][_0x0db6('0x25')]);_0x1447e0[_0x0db6('0x27')]=qs[_0x0db6('0x27')](_0x3b1376[_0x0db6('0x38')]['offset']);}return _0x1d046f['getConfigurations'](_0x1447e0);}})[_0x0db6('0x17')](function(_0x2d2b25){if(_0x2d2b25){return _0x2d2b25?{'count':_0x1fdce2,'rows':_0x2d2b25}:null;}})[_0x0db6('0x17')](respondWithResult(_0x3aec9e,null))[_0x0db6('0x20')](handleError(_0x3aec9e,null));};exports[_0x0db6('0x52')]=function(_0x173df0,_0xa61a39,_0x5ad5f9){if(_0x173df0[_0x0db6('0x4e')]['id']){delete _0x173df0[_0x0db6('0x4e')]['id'];}return db['FreshdeskAccount'][_0x0db6('0x53')]({'where':{'id':_0x173df0[_0x0db6('0x4a')]['id']}})[_0x0db6('0x17')](handleEntityNotFound(_0xa61a39,null))['then'](function(_0x2fb9d9){if(_0x2fb9d9){_0x173df0[_0x0db6('0x4e')][_0x0db6('0x54')]=_0x2fb9d9['id'];_0x173df0[_0x0db6('0x4e')]['Subjects']=integrations[_0x0db6('0x55')](_0x173df0[_0x0db6('0x4e')][_0x0db6('0x56')],_0x173df0[_0x0db6('0x4e')][_0x0db6('0x34')]);_0x173df0[_0x0db6('0x4e')]['Descriptions']=integrations[_0x0db6('0x57')](_0x173df0[_0x0db6('0x4e')][_0x0db6('0x56')],_0x173df0[_0x0db6('0x4e')][_0x0db6('0x34')]);return db[_0x0db6('0x50')]['create'](_0x173df0['body'],{'include':[{'model':db[_0x0db6('0x58')],'as':'Subjects'},{'model':db[_0x0db6('0x58')],'as':_0x0db6('0x59')}]});}return null;})[_0x0db6('0x17')](respondWithResult(_0xa61a39,null))[_0x0db6('0x20')](handleError(_0xa61a39,null));};exports[_0x0db6('0x5a')]=function(_0x15e87c,_0x1e4fb3,_0xc40b43){var _0x561856='';return db[_0x0db6('0x31')][_0x0db6('0x53')]({'where':{'id':_0x15e87c['params']['id']},'attributes':['id',_0x0db6('0x5b'),_0x0db6('0x5c')]})['then'](handleEntityNotFound(_0x1e4fb3,null))[_0x0db6('0x17')](function(_0x38cade){if(_0x38cade){_0x561856=_0x38cade[_0x0db6('0x5b')];var _0x477628=_0x561856[_0x0db6('0x5d')](-0x1);if(_0x477628==='/'){_0x561856=_0x561856['substring'](0x0,_0x561856[_0x0db6('0x5e')](_0x477628));}return rp({'method':_0x0db6('0x5f'),'uri':util[_0x0db6('0x60')]('%s/%s',_0x561856,'api/v2/ticket_fields'),'headers':{'Authorization':util['format'](_0x0db6('0x61'),new Buffer(util[_0x0db6('0x60')](_0x0db6('0x62'),_0x38cade[_0x0db6('0x5c')]))[_0x0db6('0x63')](_0x0db6('0x64')))},'json':!![]});}})['then'](function(_0x412375){if(_0x412375){var _0x54a501=[_0x0db6('0x65'),_0x0db6('0x66'),'agent',_0x0db6('0x67'),'status',_0x0db6('0x68'),_0x0db6('0x69'),'source',_0x0db6('0x6a'),_0x0db6('0x69'),_0x0db6('0x6b')];_['remove'](_0x412375,function(_0x9ac6e2){return _0x54a501[_0x0db6('0x6c')](_0x9ac6e2[_0x0db6('0x2f')])||!_0x9ac6e2[_0x0db6('0x6d')]&&_0x9ac6e2['type']!=='custom_text'&&_0x9ac6e2[_0x0db6('0x34')]!==_0x0db6('0x6e');});return{'count':_0x412375['length'],'rows':_['map'](_0x412375,function(_0x1532f2){return{'id':_0x1532f2['name'],'name':_0x1532f2[_0x0db6('0x6f')],'custom':!_0x1532f2[_0x0db6('0x6d')],'options':_0x1532f2[_0x0db6('0x70')]?_[_0x0db6('0x37')](_0x1532f2[_0x0db6('0x70')],function(_0x1026aa){return{'name':_[_0x0db6('0x71')](_0x1026aa),'value':_0x1026aa};}):[]};})};}})[_0x0db6('0x17')](respondWithResult(_0x1e4fb3,null))[_0x0db6('0x20')](function(_0x21110b){var _0x45a8b0=_0x15e87c[_0x0db6('0x38')][_0x0db6('0x72')]?0x1f4:_0x21110b[_0x0db6('0x73')]||0x1f4;logger[_0x0db6('0x1c')](_0x0db6('0x74'),_0x0db6('0x5a'),_0x45a8b0,JSON[_0x0db6('0x1b')](_0x21110b));delete _0x21110b[_0x0db6('0x2f')];if(_0x45a8b0===0x191){_0x45a8b0=0x190;}_0x1e4fb3[_0x0db6('0x23')](_0x45a8b0)['send'](_0x15e87c['query'][_0x0db6('0x72')]?{'message':_0x0db6('0x75'),'statusCode':_0x21110b[_0x0db6('0x73')]}:_0x21110b);});}; \ No newline at end of file diff --git a/server/api/intFreshdeskAccount/intFreshdeskAccount.model.js b/server/api/intFreshdeskAccount/intFreshdeskAccount.model.js index f45c66d..e492f5e 100644 --- a/server/api/intFreshdeskAccount/intFreshdeskAccount.model.js +++ b/server/api/intFreshdeskAccount/intFreshdeskAccount.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x20c2=['bluebird','request-promise','path','rimraf','../../config/environment','./intFreshdeskAccount.attributes','../../components/integrations/configuration','define','FreshdeskAccount','int_freshdesk_accounts','lodash','util','../../config/logger','api'];(function(_0x3ab51d,_0x2fa01d){var _0x29a04e=function(_0x7807b0){while(--_0x7807b0){_0x3ab51d['push'](_0x3ab51d['shift']());}};_0x29a04e(++_0x2fa01d);}(_0x20c2,0x168));var _0x220c=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x20c2[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0x220c('0x0'));var util=require(_0x220c('0x1'));var logger=require(_0x220c('0x2'))(_0x220c('0x3'));var moment=require('moment');var BPromise=require(_0x220c('0x4'));var rp=require(_0x220c('0x5'));var fs=require('fs');var path=require(_0x220c('0x6'));var rimraf=require(_0x220c('0x7'));var config=require(_0x220c('0x8'));var attributes=require(_0x220c('0x9'));var integrations=require(_0x220c('0xa'));module['exports']=function(_0x4d96b2,_0x45ffda){return _0x4d96b2[_0x220c('0xb')](_0x220c('0xc'),attributes,{'tableName':_0x220c('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xb404=['../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./intFreshdeskAccount.attributes','define','FreshdeskAccount','lodash','util'];(function(_0x4a3f18,_0x21cafd){var _0x27f25a=function(_0x440c05){while(--_0x440c05){_0x4a3f18['push'](_0x4a3f18['shift']());}};_0x27f25a(++_0x21cafd);}(_0xb404,0x142));var _0x4b40=function(_0x5db443,_0x835e1b){_0x5db443=_0x5db443-0x0;var _0xfef0fa=_0xb404[_0x5db443];return _0xfef0fa;};'use strict';var _=require(_0x4b40('0x0'));var util=require(_0x4b40('0x1'));var logger=require(_0x4b40('0x2'))(_0x4b40('0x3'));var moment=require(_0x4b40('0x4'));var BPromise=require(_0x4b40('0x5'));var rp=require(_0x4b40('0x6'));var fs=require('fs');var path=require(_0x4b40('0x7'));var rimraf=require(_0x4b40('0x8'));var config=require('../../config/environment');var attributes=require(_0x4b40('0x9'));var integrations=require('../../components/integrations/configuration');module['exports']=function(_0x4bfdf9,_0x41f711){return _0x4bfdf9[_0x4b40('0xa')](_0x4b40('0xb'),attributes,{'tableName':'int_freshdesk_accounts','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intFreshdeskAccount/intFreshdeskAccount.rpc.js b/server/api/intFreshdeskAccount/intFreshdeskAccount.rpc.js index 8c6a935..8b3c3e7 100644 --- a/server/api/intFreshdeskAccount/intFreshdeskAccount.rpc.js +++ b/server/api/intFreshdeskAccount/intFreshdeskAccount.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3525=['FreshdeskAccount,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','GetFreshdeskAccount','findAll','options','where','attributes','limit','map','include','model','stringify','find','raw','ShowFreshdeskAccount','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','info','FreshdeskAccount,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x13b8f3,_0x442821){var _0x1a6d06=function(_0x5126f2){while(--_0x5126f2){_0x13b8f3['push'](_0x13b8f3['shift']());}};_0x1a6d06(++_0x442821);}(_0x3525,0x143));var _0x5352=function(_0xc0b1b5,_0x4218e9){_0xc0b1b5=_0xc0b1b5-0x0;var _0x149f24=_0x3525[_0xc0b1b5];return _0x149f24;};'use strict';var _=require(_0x5352('0x0'));var util=require(_0x5352('0x1'));var moment=require(_0x5352('0x2'));var BPromise=require(_0x5352('0x3'));var rs=require(_0x5352('0x4'));var fs=require('fs');var Redis=require(_0x5352('0x5'));var db=require(_0x5352('0x6'))['db'];var utils=require(_0x5352('0x7'));var logger=require('../../config/logger')(_0x5352('0x8'));var config=require(_0x5352('0x9'));var jayson=require(_0x5352('0xa'));var client=jayson[_0x5352('0xb')][_0x5352('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x3a6f6f,_0x5b1065,_0x11cbbc){return new BPromise(function(_0x9d74dc,_0x4bd764){return client[_0x5352('0xd')](_0x3a6f6f,_0x11cbbc)[_0x5352('0xe')](function(_0x4f6fb2){logger[_0x5352('0xf')](_0x5352('0x10'),_0x5b1065,_0x5352('0x11'));logger[_0x5352('0x12')](_0x5352('0x13'),_0x5b1065,_0x5352('0x11'),JSON['stringify'](_0x4f6fb2));if(_0x4f6fb2[_0x5352('0x14')]){if(_0x4f6fb2[_0x5352('0x14')][_0x5352('0x15')]===0x1f4){logger[_0x5352('0x14')](_0x5352('0x10'),_0x5b1065,_0x4f6fb2['error']['message']);return _0x4bd764(_0x4f6fb2[_0x5352('0x14')][_0x5352('0x16')]);}logger[_0x5352('0x14')](_0x5352('0x10'),_0x5b1065,_0x4f6fb2['error'][_0x5352('0x16')]);return _0x9d74dc(_0x4f6fb2['error'][_0x5352('0x16')]);}else{logger[_0x5352('0xf')](_0x5352('0x10'),_0x5b1065,_0x5352('0x11'));_0x9d74dc(_0x4f6fb2[_0x5352('0x17')][_0x5352('0x16')]);}})[_0x5352('0x18')](function(_0xd14043){logger[_0x5352('0x14')]('FreshdeskAccount,\x20%s,\x20%s',_0x5b1065,_0xd14043);_0x4bd764(_0xd14043);});});}exports[_0x5352('0x19')]=function(_0x48e9eb){var _0x2c94c0=this;return new Promise(function(_0x2fff7e,_0x32d4bc){return db['FreshdeskAccount'][_0x5352('0x1a')]({'raw':_0x48e9eb[_0x5352('0x1b')]?_0x48e9eb[_0x5352('0x1b')]['raw']===undefined?!![]:![]:!![],'where':_0x48e9eb[_0x5352('0x1b')]?_0x48e9eb[_0x5352('0x1b')][_0x5352('0x1c')]||null:null,'attributes':_0x48e9eb[_0x5352('0x1b')]?_0x48e9eb['options'][_0x5352('0x1d')]||null:null,'limit':_0x48e9eb[_0x5352('0x1b')]?_0x48e9eb[_0x5352('0x1b')][_0x5352('0x1e')]||null:null,'include':_0x48e9eb[_0x5352('0x1b')]?_0x48e9eb[_0x5352('0x1b')]['include']?_[_0x5352('0x1f')](_0x48e9eb[_0x5352('0x1b')][_0x5352('0x20')],function(_0xcb97e){return{'model':db[_0xcb97e[_0x5352('0x21')]],'as':_0xcb97e['as'],'attributes':_0xcb97e[_0x5352('0x1d')],'include':_0xcb97e[_0x5352('0x20')]?_['map'](_0xcb97e[_0x5352('0x20')],function(_0x4a50aa){return{'model':db[_0x4a50aa[_0x5352('0x21')]],'as':_0x4a50aa['as'],'attributes':_0x4a50aa[_0x5352('0x1d')],'include':_0x4a50aa[_0x5352('0x20')]?_[_0x5352('0x1f')](_0x4a50aa[_0x5352('0x20')],function(_0xf248ac){return{'model':db[_0xf248ac[_0x5352('0x21')]],'as':_0xf248ac['as'],'attributes':_0xf248ac[_0x5352('0x1d')]};}):[]};}):[]};}):[]:[]})[_0x5352('0xe')](function(_0x2f9426){logger[_0x5352('0xf')](_0x5352('0x19'),_0x48e9eb);logger[_0x5352('0x12')](_0x5352('0x19'),_0x48e9eb,JSON[_0x5352('0x22')](_0x2f9426));_0x2fff7e(_0x2f9426);})[_0x5352('0x18')](function(_0x544a2f){logger['error'](_0x5352('0x19'),_0x544a2f[_0x5352('0x16')],_0x48e9eb);_0x32d4bc(_0x2c94c0[_0x5352('0x14')](0x1f4,_0x544a2f[_0x5352('0x16')]));});});};exports['ShowFreshdeskAccount']=function(_0x2ccab4){var _0x2e53b2=this;return new Promise(function(_0x438299,_0x1dd413){return db['FreshdeskAccount'][_0x5352('0x23')]({'raw':_0x2ccab4[_0x5352('0x1b')]?_0x2ccab4['options'][_0x5352('0x24')]===undefined?!![]:![]:!![],'where':_0x2ccab4[_0x5352('0x1b')]?_0x2ccab4['options'][_0x5352('0x1c')]||null:null,'attributes':_0x2ccab4[_0x5352('0x1b')]?_0x2ccab4[_0x5352('0x1b')]['attributes']||null:null,'include':_0x2ccab4[_0x5352('0x1b')]?_0x2ccab4[_0x5352('0x1b')][_0x5352('0x20')]?_[_0x5352('0x1f')](_0x2ccab4[_0x5352('0x1b')][_0x5352('0x20')],function(_0x538eff){return{'model':db[_0x538eff[_0x5352('0x21')]],'as':_0x538eff['as'],'attributes':_0x538eff['attributes'],'include':_0x538eff[_0x5352('0x20')]?_[_0x5352('0x1f')](_0x538eff[_0x5352('0x20')],function(_0x57cd11){return{'model':db[_0x57cd11[_0x5352('0x21')]],'as':_0x57cd11['as'],'attributes':_0x57cd11[_0x5352('0x1d')],'include':_0x57cd11[_0x5352('0x20')]?_[_0x5352('0x1f')](_0x57cd11[_0x5352('0x20')],function(_0x5b0ccc){return{'model':db[_0x5b0ccc[_0x5352('0x21')]],'as':_0x5b0ccc['as'],'attributes':_0x5b0ccc['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0xa13a2a){logger[_0x5352('0xf')](_0x5352('0x25'),_0x2ccab4);logger[_0x5352('0x12')]('ShowFreshdeskAccount',_0x2ccab4,JSON[_0x5352('0x22')](_0xa13a2a));_0x438299(_0xa13a2a);})[_0x5352('0x18')](function(_0x3bceb6){logger[_0x5352('0x14')](_0x5352('0x25'),_0x3bceb6[_0x5352('0x16')],_0x2ccab4);_0x1dd413(_0x2e53b2[_0x5352('0x14')](0x1f4,_0x3bceb6['message']));});});}; \ No newline at end of file +var _0x968b=['where','attributes','include','map','model','ShowFreshdeskAccount','find','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','request','then','info','FreshdeskAccount,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','GetFreshdeskAccount','FreshdeskAccount','findAll','options','raw'];(function(_0x18a5d2,_0x4d56a1){var _0xeb9ac6=function(_0x5b4a46){while(--_0x5b4a46){_0x18a5d2['push'](_0x18a5d2['shift']());}};_0xeb9ac6(++_0x4d56a1);}(_0x968b,0x8f));var _0xb968=function(_0x1324c3,_0x1947b7){_0x1324c3=_0x1324c3-0x0;var _0x36fd4b=_0x968b[_0x1324c3];return _0x36fd4b;};'use strict';var _=require(_0xb968('0x0'));var util=require(_0xb968('0x1'));var moment=require(_0xb968('0x2'));var BPromise=require(_0xb968('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xb968('0x4'));var db=require(_0xb968('0x5'))['db'];var utils=require(_0xb968('0x6'));var logger=require(_0xb968('0x7'))(_0xb968('0x8'));var config=require(_0xb968('0x9'));var jayson=require(_0xb968('0xa'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x2cf764,_0x322d2e,_0x256b3e){return new BPromise(function(_0x325393,_0x18a82b){return client[_0xb968('0xb')](_0x2cf764,_0x256b3e)[_0xb968('0xc')](function(_0x23cf2e){logger[_0xb968('0xd')](_0xb968('0xe'),_0x322d2e,_0xb968('0xf'));logger['debug']('FreshdeskAccount,\x20%s,\x20%s,\x20%s',_0x322d2e,_0xb968('0xf'),JSON[_0xb968('0x10')](_0x23cf2e));if(_0x23cf2e[_0xb968('0x11')]){if(_0x23cf2e[_0xb968('0x11')][_0xb968('0x12')]===0x1f4){logger[_0xb968('0x11')]('FreshdeskAccount,\x20%s,\x20%s',_0x322d2e,_0x23cf2e[_0xb968('0x11')]['message']);return _0x18a82b(_0x23cf2e[_0xb968('0x11')][_0xb968('0x13')]);}logger['error'](_0xb968('0xe'),_0x322d2e,_0x23cf2e[_0xb968('0x11')][_0xb968('0x13')]);return _0x325393(_0x23cf2e[_0xb968('0x11')]['message']);}else{logger[_0xb968('0xd')](_0xb968('0xe'),_0x322d2e,'request\x20sent');_0x325393(_0x23cf2e[_0xb968('0x14')][_0xb968('0x13')]);}})[_0xb968('0x15')](function(_0x33ec3b){logger[_0xb968('0x11')](_0xb968('0xe'),_0x322d2e,_0x33ec3b);_0x18a82b(_0x33ec3b);});});}exports[_0xb968('0x16')]=function(_0x3a249c){var _0x422beb=this;return new Promise(function(_0x3cfe4e,_0x17dd31){return db[_0xb968('0x17')][_0xb968('0x18')]({'raw':_0x3a249c[_0xb968('0x19')]?_0x3a249c[_0xb968('0x19')][_0xb968('0x1a')]===undefined?!![]:![]:!![],'where':_0x3a249c[_0xb968('0x19')]?_0x3a249c[_0xb968('0x19')][_0xb968('0x1b')]||null:null,'attributes':_0x3a249c[_0xb968('0x19')]?_0x3a249c[_0xb968('0x19')][_0xb968('0x1c')]||null:null,'limit':_0x3a249c[_0xb968('0x19')]?_0x3a249c[_0xb968('0x19')]['limit']||null:null,'include':_0x3a249c[_0xb968('0x19')]?_0x3a249c['options'][_0xb968('0x1d')]?_['map'](_0x3a249c[_0xb968('0x19')]['include'],function(_0x15106d){return{'model':db[_0x15106d['model']],'as':_0x15106d['as'],'attributes':_0x15106d[_0xb968('0x1c')],'include':_0x15106d[_0xb968('0x1d')]?_[_0xb968('0x1e')](_0x15106d[_0xb968('0x1d')],function(_0x516b8f){return{'model':db[_0x516b8f[_0xb968('0x1f')]],'as':_0x516b8f['as'],'attributes':_0x516b8f['attributes'],'include':_0x516b8f[_0xb968('0x1d')]?_[_0xb968('0x1e')](_0x516b8f['include'],function(_0x2d8b88){return{'model':db[_0x2d8b88[_0xb968('0x1f')]],'as':_0x2d8b88['as'],'attributes':_0x2d8b88[_0xb968('0x1c')]};}):[]};}):[]};}):[]:[]})[_0xb968('0xc')](function(_0xae1f56){logger[_0xb968('0xd')](_0xb968('0x16'),_0x3a249c);logger['debug'](_0xb968('0x16'),_0x3a249c,JSON[_0xb968('0x10')](_0xae1f56));_0x3cfe4e(_0xae1f56);})['catch'](function(_0x450e74){logger[_0xb968('0x11')]('GetFreshdeskAccount',_0x450e74['message'],_0x3a249c);_0x17dd31(_0x422beb['error'](0x1f4,_0x450e74[_0xb968('0x13')]));});});};exports[_0xb968('0x20')]=function(_0x343e0f){var _0xc1c05=this;return new Promise(function(_0x456c1c,_0x34d0b9){return db[_0xb968('0x17')][_0xb968('0x21')]({'raw':_0x343e0f[_0xb968('0x19')]?_0x343e0f[_0xb968('0x19')]['raw']===undefined?!![]:![]:!![],'where':_0x343e0f[_0xb968('0x19')]?_0x343e0f[_0xb968('0x19')]['where']||null:null,'attributes':_0x343e0f[_0xb968('0x19')]?_0x343e0f[_0xb968('0x19')][_0xb968('0x1c')]||null:null,'include':_0x343e0f[_0xb968('0x19')]?_0x343e0f[_0xb968('0x19')][_0xb968('0x1d')]?_[_0xb968('0x1e')](_0x343e0f[_0xb968('0x19')][_0xb968('0x1d')],function(_0x40192b){return{'model':db[_0x40192b['model']],'as':_0x40192b['as'],'attributes':_0x40192b[_0xb968('0x1c')],'include':_0x40192b[_0xb968('0x1d')]?_[_0xb968('0x1e')](_0x40192b['include'],function(_0x47eb24){return{'model':db[_0x47eb24['model']],'as':_0x47eb24['as'],'attributes':_0x47eb24[_0xb968('0x1c')],'include':_0x47eb24['include']?_[_0xb968('0x1e')](_0x47eb24[_0xb968('0x1d')],function(_0x270a03){return{'model':db[_0x270a03[_0xb968('0x1f')]],'as':_0x270a03['as'],'attributes':_0x270a03['attributes']};}):[]};}):[]};}):[]:[]})[_0xb968('0xc')](function(_0x1ec35d){logger[_0xb968('0xd')](_0xb968('0x20'),_0x343e0f);logger['debug'](_0xb968('0x20'),_0x343e0f,JSON['stringify'](_0x1ec35d));_0x456c1c(_0x1ec35d);})[_0xb968('0x15')](function(_0x102e51){logger[_0xb968('0x11')](_0xb968('0x20'),_0x102e51[_0xb968('0x13')],_0x343e0f);_0x34d0b9(_0xc1c05[_0xb968('0x11')](0x1f4,_0x102e51['message']));});});}; \ No newline at end of file diff --git a/server/api/intFreshdeskConfiguration/index.js b/server/api/intFreshdeskConfiguration/index.js index 5675bf5..e4c0c30 100644 --- a/server/api/intFreshdeskConfiguration/index.js +++ b/server/api/intFreshdeskConfiguration/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x794d=['put','delete','destroy','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../config/environment','./intFreshdeskConfiguration.controller','get','isAuthenticated','/:id','show','getFields','getSubjects','/:id/tags','create','post'];(function(_0x18f9e6,_0x1a22f6){var _0x40bda2=function(_0x5ea39f){while(--_0x5ea39f){_0x18f9e6['push'](_0x18f9e6['shift']());}};_0x40bda2(++_0x1a22f6);}(_0x794d,0xf6));var _0xd794=function(_0x29638f,_0x5dfb8a){_0x29638f=_0x29638f-0x0;var _0x4c2121=_0x794d[_0x29638f];return _0x4c2121;};'use strict';var multer=require(_0xd794('0x0'));var util=require(_0xd794('0x1'));var path=require(_0xd794('0x2'));var timeout=require('connect-timeout');var express=require(_0xd794('0x3'));var router=express[_0xd794('0x4')]();var fs_extra=require(_0xd794('0x5'));var auth=require(_0xd794('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0xd794('0x7'));var controller=require(_0xd794('0x8'));router[_0xd794('0x9')]('/',auth[_0xd794('0xa')](),controller['index']);router[_0xd794('0x9')](_0xd794('0xb'),auth[_0xd794('0xa')](),controller[_0xd794('0xc')]);router['get']('/:id/fields',auth['isAuthenticated'](),controller[_0xd794('0xd')]);router[_0xd794('0x9')]('/:id/subjects',auth['isAuthenticated'](),controller[_0xd794('0xe')]);router[_0xd794('0x9')]('/:id/descriptions',auth[_0xd794('0xa')](),controller['getDescriptions']);router['get'](_0xd794('0xf'),auth[_0xd794('0xa')](),controller['getTags']);router['post']('/',auth[_0xd794('0xa')](),controller[_0xd794('0x10')]);router[_0xd794('0x11')](_0xd794('0xf'),auth['isAuthenticated'](),controller['setTags']);router[_0xd794('0x12')]('/:id',auth[_0xd794('0xa')](),controller['update']);router[_0xd794('0x13')](_0xd794('0xb'),auth[_0xd794('0xa')](),controller[_0xd794('0x14')]);module[_0xd794('0x15')]=router; \ No newline at end of file +var _0x69d8=['create','setTags','put','update','delete','exports','util','path','connect-timeout','express','fs-extra','../../components/interaction/service','../../config/environment','./intFreshdeskConfiguration.controller','get','isAuthenticated','index','/:id','show','getFields','/:id/subjects','getSubjects','/:id/descriptions','getDescriptions','/:id/tags','post'];(function(_0x186c93,_0x516cc5){var _0x15052c=function(_0x2310cd){while(--_0x2310cd){_0x186c93['push'](_0x186c93['shift']());}};_0x15052c(++_0x516cc5);}(_0x69d8,0x1c0));var _0x869d=function(_0x3a9637,_0x51f973){_0x3a9637=_0x3a9637-0x0;var _0xf32cc9=_0x69d8[_0x3a9637];return _0xf32cc9;};'use strict';var multer=require('multer');var util=require(_0x869d('0x0'));var path=require(_0x869d('0x1'));var timeout=require(_0x869d('0x2'));var express=require(_0x869d('0x3'));var router=express['Router']();var fs_extra=require(_0x869d('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x869d('0x5'));var config=require(_0x869d('0x6'));var controller=require(_0x869d('0x7'));router[_0x869d('0x8')]('/',auth[_0x869d('0x9')](),controller[_0x869d('0xa')]);router[_0x869d('0x8')](_0x869d('0xb'),auth['isAuthenticated'](),controller[_0x869d('0xc')]);router[_0x869d('0x8')]('/:id/fields',auth['isAuthenticated'](),controller[_0x869d('0xd')]);router['get'](_0x869d('0xe'),auth[_0x869d('0x9')](),controller[_0x869d('0xf')]);router[_0x869d('0x8')](_0x869d('0x10'),auth['isAuthenticated'](),controller[_0x869d('0x11')]);router[_0x869d('0x8')](_0x869d('0x12'),auth[_0x869d('0x9')](),controller['getTags']);router[_0x869d('0x13')]('/',auth['isAuthenticated'](),controller[_0x869d('0x14')]);router[_0x869d('0x13')]('/:id/tags',auth[_0x869d('0x9')](),controller[_0x869d('0x15')]);router[_0x869d('0x16')](_0x869d('0xb'),auth[_0x869d('0x9')](),controller[_0x869d('0x17')]);router[_0x869d('0x18')]('/:id',auth[_0x869d('0x9')](),controller['destroy']);module[_0x869d('0x19')]=router; \ No newline at end of file diff --git a/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.attributes.js b/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.attributes.js index 74cc0e0..8ab32c7 100644 --- a/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.attributes.js +++ b/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5702=['sequelize','exports','STRING'];(function(_0x51f825,_0x23391d){var _0x350a55=function(_0x299e29){while(--_0x299e29){_0x51f825['push'](_0x51f825['shift']());}};_0x350a55(++_0x23391d);}(_0x5702,0x84));var _0x2570=function(_0x20d85a,_0xcff79a){_0x20d85a=_0x20d85a-0x0;var _0x3ce33=_0x5702[_0x20d85a];return _0x3ce33;};'use strict';var Sequelize=require(_0x2570('0x0'));module[_0x2570('0x1')]={'name':{'type':Sequelize[_0x2570('0x2')]},'description':{'type':Sequelize[_0x2570('0x2')]}}; \ No newline at end of file +var _0x30f2=['sequelize','STRING'];(function(_0x2c91e9,_0x2fb965){var _0x13f0ff=function(_0xb39edf){while(--_0xb39edf){_0x2c91e9['push'](_0x2c91e9['shift']());}};_0x13f0ff(++_0x2fb965);}(_0x30f2,0x15a));var _0x230f=function(_0x2a2eeb,_0x552a15){_0x2a2eeb=_0x2a2eeb-0x0;var _0x5324d8=_0x30f2[_0x2a2eeb];return _0x5324d8;};'use strict';var Sequelize=require(_0x230f('0x0'));module['exports']={'name':{'type':Sequelize[_0x230f('0x1')]},'description':{'type':Sequelize[_0x230f('0x1')]}}; \ No newline at end of file diff --git a/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.controller.js b/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.controller.js index a933de6..78e35ab 100644 --- a/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.controller.js +++ b/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe17e=['querystring','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','client','http','request','then','info','request\x20sent','stringify','error','code','FreshdeskConfiguration,\x20%s,\x20%s','message','result','catch','sendStatus','status','end','offset','undefined','limit','count','set','Content-Range','json','apply','reject','save','update','destroy','stack','name','index','map','FreshdeskConfiguration','rawAttributes','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','VIRTUAL','options','includeAll','include','findAll','rows','show','params','find','create','body','filter','getFields','getSubjects','getDescriptions','FreshdeskField','findOne','Tag','getTags','setTags','ids','eml-format','zip-dir','fast-json-patch','moment','util','path','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce'];(function(_0x26462c,_0xd20a35){var _0x509a42=function(_0x1b22c9){while(--_0x1b22c9){_0x26462c['push'](_0x26462c['shift']());}};_0x509a42(++_0xd20a35);}(_0xe17e,0xb3));var _0xee17=function(_0x5b386e,_0x1989fe){_0x5b386e=_0x5b386e-0x0;var _0x17eedd=_0xe17e[_0x5b386e];return _0x17eedd;};'use strict';var emlformat=require(_0xee17('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xee17('0x1'));var jsonpatch=require(_0xee17('0x2'));var rp=require('request-promise');var moment=require(_0xee17('0x3'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0xee17('0x4'));var path=require(_0xee17('0x5'));var sox=require(_0xee17('0x6'));var csv=require(_0xee17('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xee17('0x8'));var _=require(_0xee17('0x9'));var squel=require(_0xee17('0xa'));var crypto=require(_0xee17('0xb'));var jsforce=require(_0xee17('0xc'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0xee17('0xd'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0xee17('0xe'));var qs=require(_0xee17('0xf'));var as=require(_0xee17('0x10'));var hardwareService=require(_0xee17('0x11'));var logger=require(_0xee17('0x12'))(_0xee17('0x13'));var utils=require(_0xee17('0x14'));var config=require(_0xee17('0x15'));var licenseUtil=require(_0xee17('0x16'));var db=require(_0xee17('0x17'))['db'];var jayson=require('jayson/promise');var client=jayson[_0xee17('0x18')][_0xee17('0x19')]({'port':0x232a});function respondWithRpcPromise(_0x1feb7c,_0x298ab4,_0x2c296f,_0x47ee20){return new BPromise(function(_0xf5c2fb,_0x2823cc){var _0x359aeb=_0x47ee20||client;return _0x359aeb[_0xee17('0x1a')](_0x1feb7c,_0x2c296f)[_0xee17('0x1b')](function(_0x3f9223){logger[_0xee17('0x1c')]('FreshdeskConfiguration,\x20%s,\x20%s',_0x298ab4,_0xee17('0x1d'));logger['debug']('FreshdeskConfiguration,\x20%s,\x20%s,\x20%s',_0x298ab4,'request\x20sent',JSON[_0xee17('0x1e')](_0x3f9223));if(_0x3f9223['error']){if(_0x3f9223[_0xee17('0x1f')][_0xee17('0x20')]===0x1f4){logger['error'](_0xee17('0x21'),_0x298ab4,_0x3f9223[_0xee17('0x1f')][_0xee17('0x22')]);return _0x2823cc(_0x3f9223[_0xee17('0x1f')][_0xee17('0x22')]);}logger['error'](_0xee17('0x21'),_0x298ab4,_0x3f9223['error']['message']);return _0xf5c2fb(_0x3f9223[_0xee17('0x1f')][_0xee17('0x22')]);}else{logger['info'](_0xee17('0x21'),_0x298ab4,'request\x20sent');_0xf5c2fb(_0x3f9223[_0xee17('0x23')][_0xee17('0x22')]);}})[_0xee17('0x24')](function(_0x16be08){logger[_0xee17('0x1f')]('FreshdeskConfiguration,\x20%s,\x20%s',_0x298ab4,_0x16be08);_0x2823cc(_0x16be08);});});}function respondWithStatusCode(_0x124dcd,_0x24716d){_0x24716d=_0x24716d||0xcc;return function(_0x1c042b){if(_0x1c042b){return _0x124dcd[_0xee17('0x25')](_0x24716d);}return _0x124dcd[_0xee17('0x26')](_0x24716d)[_0xee17('0x27')]();};}function respondWithResult(_0x3730f2,_0x2b4654){_0x2b4654=_0x2b4654||0xc8;return function(_0x5034a8){if(_0x5034a8){return _0x3730f2[_0xee17('0x26')](_0x2b4654)['json'](_0x5034a8);}};}function respondWithFilteredResult(_0x1be6e0,_0x33efa2){return function(_0x327be0){if(_0x327be0){var _0x27486a=typeof _0x33efa2[_0xee17('0x28')]===_0xee17('0x29')&&typeof _0x33efa2[_0xee17('0x2a')]===_0xee17('0x29');var _0x42fe8f=_0x327be0[_0xee17('0x2b')];var _0x5501f8=_0x27486a?0x0:_0x33efa2['offset'];var _0x51df3c=_0x27486a?_0x327be0[_0xee17('0x2b')]:_0x33efa2[_0xee17('0x28')]+_0x33efa2[_0xee17('0x2a')];var _0x124fbe;if(_0x51df3c>=_0x42fe8f){_0x51df3c=_0x42fe8f;_0x124fbe=0xc8;}else{_0x124fbe=0xce;}_0x1be6e0[_0xee17('0x26')](_0x124fbe);return _0x1be6e0[_0xee17('0x2c')](_0xee17('0x2d'),_0x5501f8+'-'+_0x51df3c+'/'+_0x42fe8f)[_0xee17('0x2e')](_0x327be0);}return null;};}function patchUpdates(_0x1f410a){return function(_0xcb9cec){try{jsonpatch[_0xee17('0x2f')](_0xcb9cec,_0x1f410a,!![]);}catch(_0x58bc02){return BPromise[_0xee17('0x30')](_0x58bc02);}return _0xcb9cec[_0xee17('0x31')]();};}function saveUpdates(_0x1c8924,_0x413227){return function(_0x5ece92){if(_0x5ece92){return _0x5ece92[_0xee17('0x32')](_0x1c8924)[_0xee17('0x1b')](function(_0x4bb32d){return _0x4bb32d;});}return null;};}function removeEntity(_0x4957fd,_0x241955){return function(_0x4b4850){if(_0x4b4850){return _0x4b4850[_0xee17('0x33')]()[_0xee17('0x1b')](function(){_0x4957fd[_0xee17('0x26')](0xcc)[_0xee17('0x27')]();});}};}function handleEntityNotFound(_0x1219a6,_0x7162a5){return function(_0x528ec0){if(!_0x528ec0){_0x1219a6[_0xee17('0x25')](0x194);}return _0x528ec0;};}function handleError(_0x24d559,_0x2de6b6){_0x2de6b6=_0x2de6b6||0x1f4;return function(_0x289461){logger[_0xee17('0x1f')](_0x289461[_0xee17('0x34')]);if(_0x289461[_0xee17('0x35')]){delete _0x289461[_0xee17('0x35')];}_0x24d559['status'](_0x2de6b6)['send'](_0x289461);};}exports[_0xee17('0x36')]=function(_0x111ed2,_0x35dca7){var _0x3c40fd={},_0x48db7f={},_0x2aeee4={'count':0x0,'rows':[]};var _0x49abee=_[_0xee17('0x37')](db[_0xee17('0x38')][_0xee17('0x39')],function(_0x2c1b83){return{'name':_0x2c1b83['fieldName'],'type':_0x2c1b83[_0xee17('0x3a')][_0xee17('0x3b')]};});_0x48db7f[_0xee17('0x3c')]=_[_0xee17('0x37')](_0x49abee,_0xee17('0x35'));_0x48db7f[_0xee17('0x3d')]=_[_0xee17('0x3e')](_0x111ed2[_0xee17('0x3d')]);_0x48db7f[_0xee17('0x3f')]=_[_0xee17('0x40')](_0x48db7f[_0xee17('0x3c')],_0x48db7f[_0xee17('0x3d')]);_0x3c40fd[_0xee17('0x41')]=_[_0xee17('0x40')](_0x48db7f['model'],qs[_0xee17('0x42')](_0x111ed2[_0xee17('0x3d')][_0xee17('0x42')]));_0x3c40fd['attributes']=_0x3c40fd[_0xee17('0x41')][_0xee17('0x43')]?_0x3c40fd['attributes']:_0x48db7f[_0xee17('0x3c')];if(!_0x111ed2[_0xee17('0x3d')][_0xee17('0x44')](_0xee17('0x45'))){_0x3c40fd[_0xee17('0x2a')]=qs['limit'](_0x111ed2[_0xee17('0x3d')][_0xee17('0x2a')]);_0x3c40fd[_0xee17('0x28')]=qs[_0xee17('0x28')](_0x111ed2[_0xee17('0x3d')][_0xee17('0x28')]);}_0x3c40fd[_0xee17('0x46')]=qs[_0xee17('0x47')](_0x111ed2[_0xee17('0x3d')]['sort']);_0x3c40fd[_0xee17('0x48')]=qs[_0xee17('0x3f')](_[_0xee17('0x49')](_0x111ed2['query'],_0x48db7f[_0xee17('0x3f')]),_0x49abee);if(_0x111ed2[_0xee17('0x3d')]['filter']){_0x3c40fd['where']=_[_0xee17('0x4a')](_0x3c40fd['where'],{'$or':_[_0xee17('0x37')](_0x49abee,function(_0x437f74){if(_0x437f74[_0xee17('0x3a')]!==_0xee17('0x4b')){var _0x6f740f={};_0x6f740f[_0x437f74[_0xee17('0x35')]]={'$like':'%'+_0x111ed2[_0xee17('0x3d')]['filter']+'%'};return _0x6f740f;}})});}_0x3c40fd=_[_0xee17('0x4a')]({},_0x3c40fd,_0x111ed2[_0xee17('0x4c')]);var _0x35ce5e={'where':_0x3c40fd[_0xee17('0x48')]};return db[_0xee17('0x38')][_0xee17('0x2b')](_0x35ce5e)[_0xee17('0x1b')](function(_0x575fe5){_0x2aeee4[_0xee17('0x2b')]=_0x575fe5;if(_0x111ed2[_0xee17('0x3d')][_0xee17('0x4d')]){_0x3c40fd[_0xee17('0x4e')]=[{'all':!![]}];}return db[_0xee17('0x38')][_0xee17('0x4f')](_0x3c40fd);})['then'](function(_0x1e2019){_0x2aeee4[_0xee17('0x50')]=_0x1e2019;return _0x2aeee4;})[_0xee17('0x1b')](respondWithFilteredResult(_0x35dca7,_0x3c40fd))[_0xee17('0x24')](handleError(_0x35dca7,null));};exports[_0xee17('0x51')]=function(_0x23cdf4,_0x32e10f){var _0x5baa10={'raw':![],'where':{'id':_0x23cdf4[_0xee17('0x52')]['id']}},_0x2cf806={};_0x2cf806['model']=_[_0xee17('0x3e')](db['FreshdeskConfiguration'][_0xee17('0x39')]);_0x2cf806[_0xee17('0x3d')]=_[_0xee17('0x3e')](_0x23cdf4[_0xee17('0x3d')]);_0x2cf806[_0xee17('0x3f')]=_['intersection'](_0x2cf806['model'],_0x2cf806[_0xee17('0x3d')]);_0x5baa10['attributes']=_['intersection'](_0x2cf806[_0xee17('0x3c')],qs[_0xee17('0x42')](_0x23cdf4[_0xee17('0x3d')][_0xee17('0x42')]));_0x5baa10[_0xee17('0x41')]=_0x5baa10[_0xee17('0x41')][_0xee17('0x43')]?_0x5baa10['attributes']:_0x2cf806[_0xee17('0x3c')];if(_0x23cdf4[_0xee17('0x3d')]['includeAll']){_0x5baa10[_0xee17('0x4e')]=[{'all':!![]}];}_0x5baa10=_['merge']({},_0x5baa10,_0x23cdf4[_0xee17('0x4c')]);return db['FreshdeskConfiguration'][_0xee17('0x53')](_0x5baa10)['then'](handleEntityNotFound(_0x32e10f,null))[_0xee17('0x1b')](respondWithResult(_0x32e10f,null))['catch'](handleError(_0x32e10f,null));};exports[_0xee17('0x54')]=function(_0x594a4b,_0x5d9018){return db[_0xee17('0x38')][_0xee17('0x54')](_0x594a4b[_0xee17('0x55')],{})[_0xee17('0x1b')](respondWithResult(_0x5d9018,0xc9))[_0xee17('0x24')](handleError(_0x5d9018,null));};exports['update']=function(_0x387f85,_0x173dd4){if(_0x387f85['body']['id']){delete _0x387f85[_0xee17('0x55')]['id'];}return db[_0xee17('0x38')][_0xee17('0x53')]({'where':{'id':_0x387f85[_0xee17('0x52')]['id']}})[_0xee17('0x1b')](handleEntityNotFound(_0x173dd4,null))['then'](saveUpdates(_0x387f85[_0xee17('0x55')],null))['then'](respondWithResult(_0x173dd4,null))[_0xee17('0x24')](handleError(_0x173dd4,null));};exports['destroy']=function(_0x4a2291,_0x11476b){return db[_0xee17('0x38')][_0xee17('0x53')]({'where':{'id':_0x4a2291[_0xee17('0x52')]['id']}})[_0xee17('0x1b')](handleEntityNotFound(_0x11476b,null))['then'](removeEntity(_0x11476b,null))[_0xee17('0x24')](handleError(_0x11476b,null));};exports['getFields']=function(_0x3af34a,_0x71c2c9,_0x49f939){var _0x593af7={};var _0x2525b8={};var _0x1c0345;var _0x1d359d;return db['FreshdeskConfiguration']['findOne']({'where':{'id':_0x3af34a[_0xee17('0x52')]['id']}})[_0xee17('0x1b')](handleEntityNotFound(_0x71c2c9,null))[_0xee17('0x1b')](function(_0x3b7367){if(_0x3b7367){_0x1c0345=_0x3b7367;_0x2525b8[_0xee17('0x3c')]=_[_0xee17('0x3e')](db['FreshdeskField']['rawAttributes']);_0x2525b8['query']=_['keys'](_0x3af34a[_0xee17('0x3d')]);_0x2525b8[_0xee17('0x3f')]=_['intersection'](_0x2525b8[_0xee17('0x3c')],_0x2525b8['query']);_0x593af7['attributes']=_[_0xee17('0x40')](_0x2525b8[_0xee17('0x3c')],qs['fields'](_0x3af34a[_0xee17('0x3d')][_0xee17('0x42')]));_0x593af7['attributes']=_0x593af7[_0xee17('0x41')][_0xee17('0x43')]?_0x593af7[_0xee17('0x41')]:_0x2525b8[_0xee17('0x3c')];_0x593af7['order']=qs[_0xee17('0x47')](_0x3af34a['query']['sort']);_0x593af7[_0xee17('0x48')]=qs[_0xee17('0x3f')](_[_0xee17('0x49')](_0x3af34a['query'],_0x2525b8[_0xee17('0x3f')]));if(_0x3af34a[_0xee17('0x3d')][_0xee17('0x56')]){_0x593af7[_0xee17('0x48')]=_[_0xee17('0x4a')](_0x593af7[_0xee17('0x48')],{'$or':_[_0xee17('0x37')](_0x593af7[_0xee17('0x41')],function(_0x41fd67){var _0x2a69f2={};_0x2a69f2[_0x41fd67]={'$like':'%'+_0x3af34a['query'][_0xee17('0x56')]+'%'};return _0x2a69f2;})});}_0x593af7=_['merge']({},_0x593af7,_0x3af34a[_0xee17('0x4c')]);return _0x1c0345[_0xee17('0x57')](_0x593af7);}})['then'](function(_0x4a8db7){if(_0x4a8db7){_0x1d359d=_0x4a8db7[_0xee17('0x43')];if(!_0x3af34a[_0xee17('0x3d')][_0xee17('0x44')]('nolimit')){_0x593af7[_0xee17('0x2a')]=qs[_0xee17('0x2a')](_0x3af34a[_0xee17('0x3d')]['limit']);_0x593af7[_0xee17('0x28')]=qs[_0xee17('0x28')](_0x3af34a['query'][_0xee17('0x28')]);}return _0x1c0345[_0xee17('0x57')](_0x593af7);}})[_0xee17('0x1b')](function(_0x51febf){if(_0x51febf){return _0x51febf?{'count':_0x1d359d,'rows':_0x51febf}:null;}})[_0xee17('0x1b')](respondWithResult(_0x71c2c9,null))[_0xee17('0x24')](handleError(_0x71c2c9,null));};exports[_0xee17('0x58')]=function(_0x4a95d8,_0x44e7e2,_0x1603b5){var _0x5ea2fe={};var _0xdfe8d3={};var _0x302366;var _0x15a0cd;return db[_0xee17('0x38')]['findOne']({'where':{'id':_0x4a95d8['params']['id']}})[_0xee17('0x1b')](handleEntityNotFound(_0x44e7e2,null))[_0xee17('0x1b')](function(_0x47c4c0){if(_0x47c4c0){_0x302366=_0x47c4c0;_0xdfe8d3[_0xee17('0x3c')]=_[_0xee17('0x3e')](db['FreshdeskField'][_0xee17('0x39')]);_0xdfe8d3[_0xee17('0x3d')]=_[_0xee17('0x3e')](_0x4a95d8[_0xee17('0x3d')]);_0xdfe8d3[_0xee17('0x3f')]=_[_0xee17('0x40')](_0xdfe8d3[_0xee17('0x3c')],_0xdfe8d3[_0xee17('0x3d')]);_0x5ea2fe[_0xee17('0x41')]=_[_0xee17('0x40')](_0xdfe8d3[_0xee17('0x3c')],qs[_0xee17('0x42')](_0x4a95d8[_0xee17('0x3d')]['fields']));_0x5ea2fe[_0xee17('0x41')]=_0x5ea2fe[_0xee17('0x41')][_0xee17('0x43')]?_0x5ea2fe[_0xee17('0x41')]:_0xdfe8d3[_0xee17('0x3c')];_0x5ea2fe[_0xee17('0x46')]=qs[_0xee17('0x47')](_0x4a95d8['query']['sort']);_0x5ea2fe[_0xee17('0x48')]=qs['filters'](_['pick'](_0x4a95d8['query'],_0xdfe8d3[_0xee17('0x3f')]));if(_0x4a95d8[_0xee17('0x3d')]['filter']){_0x5ea2fe[_0xee17('0x48')]=_[_0xee17('0x4a')](_0x5ea2fe[_0xee17('0x48')],{'$or':_[_0xee17('0x37')](_0x5ea2fe[_0xee17('0x41')],function(_0x40383a){var _0x1f465b={};_0x1f465b[_0x40383a]={'$like':'%'+_0x4a95d8[_0xee17('0x3d')][_0xee17('0x56')]+'%'};return _0x1f465b;})});}_0x5ea2fe=_[_0xee17('0x4a')]({},_0x5ea2fe,_0x4a95d8[_0xee17('0x4c')]);return _0x302366[_0xee17('0x58')](_0x5ea2fe);}})['then'](function(_0x3141b0){if(_0x3141b0){_0x15a0cd=_0x3141b0[_0xee17('0x43')];if(!_0x4a95d8[_0xee17('0x3d')][_0xee17('0x44')](_0xee17('0x45'))){_0x5ea2fe[_0xee17('0x2a')]=qs[_0xee17('0x2a')](_0x4a95d8[_0xee17('0x3d')][_0xee17('0x2a')]);_0x5ea2fe['offset']=qs['offset'](_0x4a95d8[_0xee17('0x3d')][_0xee17('0x28')]);}return _0x302366[_0xee17('0x58')](_0x5ea2fe);}})[_0xee17('0x1b')](function(_0x406bd9){if(_0x406bd9){return _0x406bd9?{'count':_0x15a0cd,'rows':_0x406bd9}:null;}})[_0xee17('0x1b')](respondWithResult(_0x44e7e2,null))[_0xee17('0x24')](handleError(_0x44e7e2,null));};exports[_0xee17('0x59')]=function(_0x2826f3,_0x31a4b9,_0xd9ed14){var _0x143dd8={};var _0x39668d={};var _0x39785f;var _0x580569;return db['FreshdeskConfiguration']['findOne']({'where':{'id':_0x2826f3[_0xee17('0x52')]['id']}})[_0xee17('0x1b')](handleEntityNotFound(_0x31a4b9,null))['then'](function(_0x4ecf36){if(_0x4ecf36){_0x39785f=_0x4ecf36;_0x39668d[_0xee17('0x3c')]=_['keys'](db[_0xee17('0x5a')]['rawAttributes']);_0x39668d[_0xee17('0x3d')]=_[_0xee17('0x3e')](_0x2826f3[_0xee17('0x3d')]);_0x39668d[_0xee17('0x3f')]=_[_0xee17('0x40')](_0x39668d['model'],_0x39668d[_0xee17('0x3d')]);_0x143dd8['attributes']=_[_0xee17('0x40')](_0x39668d[_0xee17('0x3c')],qs[_0xee17('0x42')](_0x2826f3[_0xee17('0x3d')][_0xee17('0x42')]));_0x143dd8[_0xee17('0x41')]=_0x143dd8[_0xee17('0x41')][_0xee17('0x43')]?_0x143dd8['attributes']:_0x39668d[_0xee17('0x3c')];_0x143dd8[_0xee17('0x46')]=qs[_0xee17('0x47')](_0x2826f3[_0xee17('0x3d')]['sort']);_0x143dd8[_0xee17('0x48')]=qs[_0xee17('0x3f')](_[_0xee17('0x49')](_0x2826f3[_0xee17('0x3d')],_0x39668d['filters']));if(_0x2826f3[_0xee17('0x3d')]['filter']){_0x143dd8[_0xee17('0x48')]=_['merge'](_0x143dd8[_0xee17('0x48')],{'$or':_[_0xee17('0x37')](_0x143dd8[_0xee17('0x41')],function(_0xf14206){var _0x4fee4d={};_0x4fee4d[_0xf14206]={'$like':'%'+_0x2826f3[_0xee17('0x3d')]['filter']+'%'};return _0x4fee4d;})});}_0x143dd8=_[_0xee17('0x4a')]({},_0x143dd8,_0x2826f3[_0xee17('0x4c')]);return _0x39785f['getDescriptions'](_0x143dd8);}})[_0xee17('0x1b')](function(_0x3b54cd){if(_0x3b54cd){_0x580569=_0x3b54cd['length'];if(!_0x2826f3[_0xee17('0x3d')]['hasOwnProperty'](_0xee17('0x45'))){_0x143dd8[_0xee17('0x2a')]=qs[_0xee17('0x2a')](_0x2826f3[_0xee17('0x3d')]['limit']);_0x143dd8[_0xee17('0x28')]=qs[_0xee17('0x28')](_0x2826f3[_0xee17('0x3d')][_0xee17('0x28')]);}return _0x39785f[_0xee17('0x59')](_0x143dd8);}})[_0xee17('0x1b')](function(_0xf405af){if(_0xf405af){return _0xf405af?{'count':_0x580569,'rows':_0xf405af}:null;}})[_0xee17('0x1b')](respondWithResult(_0x31a4b9,null))[_0xee17('0x24')](handleError(_0x31a4b9,null));};exports['getTags']=function(_0x5c2601,_0x559491,_0x319a1c){var _0x25ee9c={};var _0xffc2e={};var _0x54490a;var _0x3fdc3e;return db[_0xee17('0x38')][_0xee17('0x5b')]({'where':{'id':_0x5c2601[_0xee17('0x52')]['id']}})[_0xee17('0x1b')](handleEntityNotFound(_0x559491,null))[_0xee17('0x1b')](function(_0x10964d){if(_0x10964d){_0x54490a=_0x10964d;_0xffc2e['model']=_[_0xee17('0x3e')](db[_0xee17('0x5c')][_0xee17('0x39')]);_0xffc2e['query']=_[_0xee17('0x3e')](_0x5c2601[_0xee17('0x3d')]);_0xffc2e[_0xee17('0x3f')]=_[_0xee17('0x40')](_0xffc2e[_0xee17('0x3c')],_0xffc2e['query']);_0x25ee9c[_0xee17('0x41')]=_['intersection'](_0xffc2e[_0xee17('0x3c')],qs[_0xee17('0x42')](_0x5c2601[_0xee17('0x3d')][_0xee17('0x42')]));_0x25ee9c[_0xee17('0x41')]=_0x25ee9c[_0xee17('0x41')]['length']?_0x25ee9c[_0xee17('0x41')]:_0xffc2e[_0xee17('0x3c')];_0x25ee9c[_0xee17('0x46')]=qs[_0xee17('0x47')](_0x5c2601[_0xee17('0x3d')][_0xee17('0x47')]);_0x25ee9c['where']=qs['filters'](_[_0xee17('0x49')](_0x5c2601[_0xee17('0x3d')],_0xffc2e['filters']));if(_0x5c2601[_0xee17('0x3d')][_0xee17('0x56')]){_0x25ee9c['where']=_[_0xee17('0x4a')](_0x25ee9c[_0xee17('0x48')],{'$or':_['map'](_0x25ee9c[_0xee17('0x41')],function(_0x4e2e61){var _0x3f3dfb={};_0x3f3dfb[_0x4e2e61]={'$like':'%'+_0x5c2601[_0xee17('0x3d')][_0xee17('0x56')]+'%'};return _0x3f3dfb;})});}_0x25ee9c=_[_0xee17('0x4a')]({},_0x25ee9c,_0x5c2601[_0xee17('0x4c')]);return _0x54490a['getTags'](_0x25ee9c);}})['then'](function(_0x2551aa){if(_0x2551aa){_0x3fdc3e=_0x2551aa[_0xee17('0x43')];if(!_0x5c2601[_0xee17('0x3d')][_0xee17('0x44')](_0xee17('0x45'))){_0x25ee9c[_0xee17('0x2a')]=qs[_0xee17('0x2a')](_0x5c2601[_0xee17('0x3d')]['limit']);_0x25ee9c[_0xee17('0x28')]=qs['offset'](_0x5c2601[_0xee17('0x3d')]['offset']);}return _0x54490a[_0xee17('0x5d')](_0x25ee9c);}})[_0xee17('0x1b')](function(_0x42e4a6){if(_0x42e4a6){return _0x42e4a6?{'count':_0x3fdc3e,'rows':_0x42e4a6}:null;}})[_0xee17('0x1b')](respondWithResult(_0x559491,null))[_0xee17('0x24')](handleError(_0x559491,null));};exports[_0xee17('0x5e')]=function(_0x13496b,_0x5f5607,_0x3dcb11){if(_0x13496b[_0xee17('0x55')]['id']){delete _0x13496b[_0xee17('0x55')]['id'];}return db[_0xee17('0x38')][_0xee17('0x5b')]({'where':{'id':_0x13496b[_0xee17('0x52')]['id']}})[_0xee17('0x1b')](handleEntityNotFound(_0x5f5607,null))['then'](function(_0x1402ab){if(_0x1402ab){return _0x1402ab['setTags'](_0x13496b[_0xee17('0x55')][_0xee17('0x5f')]||[]);}return null;})[_0xee17('0x1b')](respondWithResult(_0x5f5607,null))[_0xee17('0x24')](handleError(_0x5f5607,null));}; \ No newline at end of file +var _0x47b4=['jayson/promise','http','request','then','info','FreshdeskConfiguration,\x20%s,\x20%s','request\x20sent','debug','FreshdeskConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','sendStatus','json','count','offset','limit','set','Content-Range','reject','save','update','destroy','status','end','stack','name','index','map','FreshdeskConfiguration','rawAttributes','fieldName','type','key','model','query','filters','attributes','intersection','fields','hasOwnProperty','nolimit','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','show','params','keys','length','create','body','find','findOne','FreshdeskField','getFields','getSubjects','getDescriptions','getTags','Tag','order','setTags','ids','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','path','sox','to-csv','fs-extra','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb'];(function(_0x4e255e,_0x1681c5){var _0x88c0aa=function(_0x4d9980){while(--_0x4d9980){_0x4e255e['push'](_0x4e255e['shift']());}};_0x88c0aa(++_0x1681c5);}(_0x47b4,0x108));var _0x447b=function(_0x4a0bdc,_0x308288){_0x4a0bdc=_0x4a0bdc-0x0;var _0x1584c3=_0x47b4[_0x4a0bdc];return _0x1584c3;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x447b('0x0'));var zipdir=require(_0x447b('0x1'));var jsonpatch=require(_0x447b('0x2'));var rp=require(_0x447b('0x3'));var moment=require(_0x447b('0x4'));var BPromise=require(_0x447b('0x5'));var Mustache=require('mustache');var util=require('util');var path=require(_0x447b('0x6'));var sox=require(_0x447b('0x7'));var csv=require(_0x447b('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x447b('0x9'));var _=require('lodash');var squel=require('squel');var crypto=require(_0x447b('0xa'));var jsforce=require(_0x447b('0xb'));var deskjs=require(_0x447b('0xc'));var toCsv=require(_0x447b('0x8'));var querystring=require(_0x447b('0xd'));var Papa=require(_0x447b('0xe'));var Redis=require(_0x447b('0xf'));var authService=require(_0x447b('0x10'));var qs=require('../../components/parsers/qs');var as=require(_0x447b('0x11'));var hardwareService=require(_0x447b('0x12'));var logger=require(_0x447b('0x13'))('api');var utils=require(_0x447b('0x14'));var config=require(_0x447b('0x15'));var licenseUtil=require(_0x447b('0x16'));var db=require(_0x447b('0x17'))['db'];var jayson=require(_0x447b('0x18'));var client=jayson['client'][_0x447b('0x19')]({'port':0x232a});function respondWithRpcPromise(_0x54ac4e,_0x3b0113,_0xa5109e,_0x10c5ef){return new BPromise(function(_0x4e4f03,_0x24bcf3){var _0x251a20=_0x10c5ef||client;return _0x251a20[_0x447b('0x1a')](_0x54ac4e,_0xa5109e)[_0x447b('0x1b')](function(_0x311e0a){logger[_0x447b('0x1c')](_0x447b('0x1d'),_0x3b0113,_0x447b('0x1e'));logger[_0x447b('0x1f')](_0x447b('0x20'),_0x3b0113,_0x447b('0x1e'),JSON[_0x447b('0x21')](_0x311e0a));if(_0x311e0a['error']){if(_0x311e0a[_0x447b('0x22')][_0x447b('0x23')]===0x1f4){logger['error']('FreshdeskConfiguration,\x20%s,\x20%s',_0x3b0113,_0x311e0a['error'][_0x447b('0x24')]);return _0x24bcf3(_0x311e0a[_0x447b('0x22')]['message']);}logger[_0x447b('0x22')](_0x447b('0x1d'),_0x3b0113,_0x311e0a[_0x447b('0x22')]['message']);return _0x4e4f03(_0x311e0a['error'][_0x447b('0x24')]);}else{logger[_0x447b('0x1c')](_0x447b('0x1d'),_0x3b0113,'request\x20sent');_0x4e4f03(_0x311e0a[_0x447b('0x25')][_0x447b('0x24')]);}})[_0x447b('0x26')](function(_0x987b46){logger[_0x447b('0x22')](_0x447b('0x1d'),_0x3b0113,_0x987b46);_0x24bcf3(_0x987b46);});});}function respondWithStatusCode(_0x5d00f6,_0x4cc39f){_0x4cc39f=_0x4cc39f||0xcc;return function(_0x512854){if(_0x512854){return _0x5d00f6[_0x447b('0x27')](_0x4cc39f);}return _0x5d00f6['status'](_0x4cc39f)['end']();};}function respondWithResult(_0xccf025,_0x2d6a48){_0x2d6a48=_0x2d6a48||0xc8;return function(_0x50a8a7){if(_0x50a8a7){return _0xccf025['status'](_0x2d6a48)[_0x447b('0x28')](_0x50a8a7);}};}function respondWithFilteredResult(_0xa1208b,_0x5c1f91){return function(_0x4d19d5){if(_0x4d19d5){var _0x3f22f2=typeof _0x5c1f91['offset']==='undefined'&&typeof _0x5c1f91['limit']==='undefined';var _0x4853df=_0x4d19d5[_0x447b('0x29')];var _0x40a033=_0x3f22f2?0x0:_0x5c1f91[_0x447b('0x2a')];var _0x15e411=_0x3f22f2?_0x4d19d5[_0x447b('0x29')]:_0x5c1f91[_0x447b('0x2a')]+_0x5c1f91[_0x447b('0x2b')];var _0x217168;if(_0x15e411>=_0x4853df){_0x15e411=_0x4853df;_0x217168=0xc8;}else{_0x217168=0xce;}_0xa1208b['status'](_0x217168);return _0xa1208b[_0x447b('0x2c')](_0x447b('0x2d'),_0x40a033+'-'+_0x15e411+'/'+_0x4853df)[_0x447b('0x28')](_0x4d19d5);}return null;};}function patchUpdates(_0x228338){return function(_0x4e73ac){try{jsonpatch['apply'](_0x4e73ac,_0x228338,!![]);}catch(_0x27cdd2){return BPromise[_0x447b('0x2e')](_0x27cdd2);}return _0x4e73ac[_0x447b('0x2f')]();};}function saveUpdates(_0x5c2fab,_0x4255fd){return function(_0x20d586){if(_0x20d586){return _0x20d586[_0x447b('0x30')](_0x5c2fab)['then'](function(_0x4e76de){return _0x4e76de;});}return null;};}function removeEntity(_0x5cd090,_0x42c5d1){return function(_0x4a030f){if(_0x4a030f){return _0x4a030f[_0x447b('0x31')]()['then'](function(){_0x5cd090[_0x447b('0x32')](0xcc)[_0x447b('0x33')]();});}};}function handleEntityNotFound(_0x83e241,_0x3c2401){return function(_0x4bd263){if(!_0x4bd263){_0x83e241[_0x447b('0x27')](0x194);}return _0x4bd263;};}function handleError(_0x506b2c,_0x4cdccc){_0x4cdccc=_0x4cdccc||0x1f4;return function(_0x31baed){logger[_0x447b('0x22')](_0x31baed[_0x447b('0x34')]);if(_0x31baed[_0x447b('0x35')]){delete _0x31baed[_0x447b('0x35')];}_0x506b2c[_0x447b('0x32')](_0x4cdccc)['send'](_0x31baed);};}exports[_0x447b('0x36')]=function(_0x40face,_0x516170){var _0x570081={},_0x43221a={},_0x4635c3={'count':0x0,'rows':[]};var _0x449bda=_[_0x447b('0x37')](db[_0x447b('0x38')][_0x447b('0x39')],function(_0x5324b3){return{'name':_0x5324b3[_0x447b('0x3a')],'type':_0x5324b3[_0x447b('0x3b')][_0x447b('0x3c')]};});_0x43221a[_0x447b('0x3d')]=_[_0x447b('0x37')](_0x449bda,_0x447b('0x35'));_0x43221a[_0x447b('0x3e')]=_['keys'](_0x40face['query']);_0x43221a[_0x447b('0x3f')]=_['intersection'](_0x43221a[_0x447b('0x3d')],_0x43221a[_0x447b('0x3e')]);_0x570081[_0x447b('0x40')]=_[_0x447b('0x41')](_0x43221a[_0x447b('0x3d')],qs[_0x447b('0x42')](_0x40face[_0x447b('0x3e')]['fields']));_0x570081['attributes']=_0x570081[_0x447b('0x40')]['length']?_0x570081[_0x447b('0x40')]:_0x43221a[_0x447b('0x3d')];if(!_0x40face[_0x447b('0x3e')][_0x447b('0x43')](_0x447b('0x44'))){_0x570081[_0x447b('0x2b')]=qs['limit'](_0x40face[_0x447b('0x3e')][_0x447b('0x2b')]);_0x570081[_0x447b('0x2a')]=qs[_0x447b('0x2a')](_0x40face[_0x447b('0x3e')][_0x447b('0x2a')]);}_0x570081['order']=qs[_0x447b('0x45')](_0x40face[_0x447b('0x3e')][_0x447b('0x45')]);_0x570081[_0x447b('0x46')]=qs[_0x447b('0x3f')](_[_0x447b('0x47')](_0x40face[_0x447b('0x3e')],_0x43221a['filters']),_0x449bda);if(_0x40face[_0x447b('0x3e')][_0x447b('0x48')]){_0x570081[_0x447b('0x46')]=_[_0x447b('0x49')](_0x570081[_0x447b('0x46')],{'$or':_['map'](_0x449bda,function(_0xdd2dee){if(_0xdd2dee['type']!==_0x447b('0x4a')){var _0x5c6c4c={};_0x5c6c4c[_0xdd2dee['name']]={'$like':'%'+_0x40face['query'][_0x447b('0x48')]+'%'};return _0x5c6c4c;}})});}_0x570081=_[_0x447b('0x49')]({},_0x570081,_0x40face[_0x447b('0x4b')]);var _0x45d55a={'where':_0x570081[_0x447b('0x46')]};return db[_0x447b('0x38')]['count'](_0x45d55a)[_0x447b('0x1b')](function(_0x52fa98){_0x4635c3[_0x447b('0x29')]=_0x52fa98;if(_0x40face['query'][_0x447b('0x4c')]){_0x570081[_0x447b('0x4d')]=[{'all':!![]}];}return db['FreshdeskConfiguration'][_0x447b('0x4e')](_0x570081);})['then'](function(_0x2c669d){_0x4635c3['rows']=_0x2c669d;return _0x4635c3;})['then'](respondWithFilteredResult(_0x516170,_0x570081))[_0x447b('0x26')](handleError(_0x516170,null));};exports[_0x447b('0x4f')]=function(_0x5586d5,_0x66d583){var _0x3c4171={'raw':![],'where':{'id':_0x5586d5[_0x447b('0x50')]['id']}},_0x127c7e={};_0x127c7e['model']=_[_0x447b('0x51')](db[_0x447b('0x38')][_0x447b('0x39')]);_0x127c7e[_0x447b('0x3e')]=_[_0x447b('0x51')](_0x5586d5[_0x447b('0x3e')]);_0x127c7e[_0x447b('0x3f')]=_[_0x447b('0x41')](_0x127c7e[_0x447b('0x3d')],_0x127c7e[_0x447b('0x3e')]);_0x3c4171[_0x447b('0x40')]=_[_0x447b('0x41')](_0x127c7e[_0x447b('0x3d')],qs['fields'](_0x5586d5['query']['fields']));_0x3c4171[_0x447b('0x40')]=_0x3c4171[_0x447b('0x40')][_0x447b('0x52')]?_0x3c4171['attributes']:_0x127c7e[_0x447b('0x3d')];if(_0x5586d5[_0x447b('0x3e')][_0x447b('0x4c')]){_0x3c4171[_0x447b('0x4d')]=[{'all':!![]}];}_0x3c4171=_['merge']({},_0x3c4171,_0x5586d5[_0x447b('0x4b')]);return db[_0x447b('0x38')]['find'](_0x3c4171)['then'](handleEntityNotFound(_0x66d583,null))[_0x447b('0x1b')](respondWithResult(_0x66d583,null))[_0x447b('0x26')](handleError(_0x66d583,null));};exports[_0x447b('0x53')]=function(_0x27f826,_0x22bb8d){return db[_0x447b('0x38')][_0x447b('0x53')](_0x27f826[_0x447b('0x54')],{})[_0x447b('0x1b')](respondWithResult(_0x22bb8d,0xc9))['catch'](handleError(_0x22bb8d,null));};exports[_0x447b('0x30')]=function(_0x17e990,_0x4c2631){if(_0x17e990[_0x447b('0x54')]['id']){delete _0x17e990[_0x447b('0x54')]['id'];}return db[_0x447b('0x38')][_0x447b('0x55')]({'where':{'id':_0x17e990[_0x447b('0x50')]['id']}})[_0x447b('0x1b')](handleEntityNotFound(_0x4c2631,null))[_0x447b('0x1b')](saveUpdates(_0x17e990[_0x447b('0x54')],null))[_0x447b('0x1b')](respondWithResult(_0x4c2631,null))[_0x447b('0x26')](handleError(_0x4c2631,null));};exports[_0x447b('0x31')]=function(_0x545469,_0x5c10ea){return db[_0x447b('0x38')]['find']({'where':{'id':_0x545469['params']['id']}})[_0x447b('0x1b')](handleEntityNotFound(_0x5c10ea,null))['then'](removeEntity(_0x5c10ea,null))[_0x447b('0x26')](handleError(_0x5c10ea,null));};exports['getFields']=function(_0x3cd28d,_0x55ce76,_0x16565f){var _0x5d0a01={};var _0x542122={};var _0x274a0a;var _0x4b7b5d;return db[_0x447b('0x38')][_0x447b('0x56')]({'where':{'id':_0x3cd28d[_0x447b('0x50')]['id']}})[_0x447b('0x1b')](handleEntityNotFound(_0x55ce76,null))[_0x447b('0x1b')](function(_0x5c604e){if(_0x5c604e){_0x274a0a=_0x5c604e;_0x542122[_0x447b('0x3d')]=_['keys'](db[_0x447b('0x57')][_0x447b('0x39')]);_0x542122[_0x447b('0x3e')]=_[_0x447b('0x51')](_0x3cd28d['query']);_0x542122['filters']=_[_0x447b('0x41')](_0x542122[_0x447b('0x3d')],_0x542122[_0x447b('0x3e')]);_0x5d0a01[_0x447b('0x40')]=_[_0x447b('0x41')](_0x542122['model'],qs['fields'](_0x3cd28d['query'][_0x447b('0x42')]));_0x5d0a01[_0x447b('0x40')]=_0x5d0a01[_0x447b('0x40')][_0x447b('0x52')]?_0x5d0a01[_0x447b('0x40')]:_0x542122[_0x447b('0x3d')];_0x5d0a01['order']=qs[_0x447b('0x45')](_0x3cd28d[_0x447b('0x3e')][_0x447b('0x45')]);_0x5d0a01[_0x447b('0x46')]=qs['filters'](_[_0x447b('0x47')](_0x3cd28d[_0x447b('0x3e')],_0x542122[_0x447b('0x3f')]));if(_0x3cd28d[_0x447b('0x3e')]['filter']){_0x5d0a01[_0x447b('0x46')]=_[_0x447b('0x49')](_0x5d0a01['where'],{'$or':_[_0x447b('0x37')](_0x5d0a01[_0x447b('0x40')],function(_0x10747b){var _0x4ab1f={};_0x4ab1f[_0x10747b]={'$like':'%'+_0x3cd28d['query'][_0x447b('0x48')]+'%'};return _0x4ab1f;})});}_0x5d0a01=_[_0x447b('0x49')]({},_0x5d0a01,_0x3cd28d[_0x447b('0x4b')]);return _0x274a0a[_0x447b('0x58')](_0x5d0a01);}})[_0x447b('0x1b')](function(_0x4be8f8){if(_0x4be8f8){_0x4b7b5d=_0x4be8f8[_0x447b('0x52')];if(!_0x3cd28d[_0x447b('0x3e')]['hasOwnProperty'](_0x447b('0x44'))){_0x5d0a01[_0x447b('0x2b')]=qs[_0x447b('0x2b')](_0x3cd28d[_0x447b('0x3e')][_0x447b('0x2b')]);_0x5d0a01[_0x447b('0x2a')]=qs[_0x447b('0x2a')](_0x3cd28d[_0x447b('0x3e')][_0x447b('0x2a')]);}return _0x274a0a['getFields'](_0x5d0a01);}})[_0x447b('0x1b')](function(_0x39d5ed){if(_0x39d5ed){return _0x39d5ed?{'count':_0x4b7b5d,'rows':_0x39d5ed}:null;}})['then'](respondWithResult(_0x55ce76,null))[_0x447b('0x26')](handleError(_0x55ce76,null));};exports[_0x447b('0x59')]=function(_0x3e0cb3,_0x12231b,_0x1b1987){var _0xa3cb79={};var _0xe8ee4b={};var _0x4287d4;var _0x22d9e9;return db[_0x447b('0x38')]['findOne']({'where':{'id':_0x3e0cb3[_0x447b('0x50')]['id']}})[_0x447b('0x1b')](handleEntityNotFound(_0x12231b,null))[_0x447b('0x1b')](function(_0x44f815){if(_0x44f815){_0x4287d4=_0x44f815;_0xe8ee4b[_0x447b('0x3d')]=_[_0x447b('0x51')](db[_0x447b('0x57')][_0x447b('0x39')]);_0xe8ee4b[_0x447b('0x3e')]=_[_0x447b('0x51')](_0x3e0cb3[_0x447b('0x3e')]);_0xe8ee4b['filters']=_[_0x447b('0x41')](_0xe8ee4b[_0x447b('0x3d')],_0xe8ee4b['query']);_0xa3cb79[_0x447b('0x40')]=_[_0x447b('0x41')](_0xe8ee4b['model'],qs[_0x447b('0x42')](_0x3e0cb3['query'][_0x447b('0x42')]));_0xa3cb79['attributes']=_0xa3cb79[_0x447b('0x40')][_0x447b('0x52')]?_0xa3cb79[_0x447b('0x40')]:_0xe8ee4b[_0x447b('0x3d')];_0xa3cb79['order']=qs[_0x447b('0x45')](_0x3e0cb3['query']['sort']);_0xa3cb79[_0x447b('0x46')]=qs[_0x447b('0x3f')](_[_0x447b('0x47')](_0x3e0cb3[_0x447b('0x3e')],_0xe8ee4b['filters']));if(_0x3e0cb3['query'][_0x447b('0x48')]){_0xa3cb79['where']=_[_0x447b('0x49')](_0xa3cb79[_0x447b('0x46')],{'$or':_['map'](_0xa3cb79[_0x447b('0x40')],function(_0x53ccb1){var _0x4f5688={};_0x4f5688[_0x53ccb1]={'$like':'%'+_0x3e0cb3[_0x447b('0x3e')][_0x447b('0x48')]+'%'};return _0x4f5688;})});}_0xa3cb79=_[_0x447b('0x49')]({},_0xa3cb79,_0x3e0cb3[_0x447b('0x4b')]);return _0x4287d4[_0x447b('0x59')](_0xa3cb79);}})[_0x447b('0x1b')](function(_0x5f52d7){if(_0x5f52d7){_0x22d9e9=_0x5f52d7[_0x447b('0x52')];if(!_0x3e0cb3['query'][_0x447b('0x43')](_0x447b('0x44'))){_0xa3cb79[_0x447b('0x2b')]=qs[_0x447b('0x2b')](_0x3e0cb3['query']['limit']);_0xa3cb79[_0x447b('0x2a')]=qs[_0x447b('0x2a')](_0x3e0cb3['query'][_0x447b('0x2a')]);}return _0x4287d4[_0x447b('0x59')](_0xa3cb79);}})['then'](function(_0x33ee61){if(_0x33ee61){return _0x33ee61?{'count':_0x22d9e9,'rows':_0x33ee61}:null;}})[_0x447b('0x1b')](respondWithResult(_0x12231b,null))[_0x447b('0x26')](handleError(_0x12231b,null));};exports[_0x447b('0x5a')]=function(_0x2a4a2d,_0x26b558,_0x1acfef){var _0x27b4dd={};var _0x2a9e40={};var _0x2e60f9;var _0x260e55;return db[_0x447b('0x38')][_0x447b('0x56')]({'where':{'id':_0x2a4a2d[_0x447b('0x50')]['id']}})['then'](handleEntityNotFound(_0x26b558,null))[_0x447b('0x1b')](function(_0x3ab76e){if(_0x3ab76e){_0x2e60f9=_0x3ab76e;_0x2a9e40[_0x447b('0x3d')]=_[_0x447b('0x51')](db['FreshdeskField']['rawAttributes']);_0x2a9e40[_0x447b('0x3e')]=_['keys'](_0x2a4a2d[_0x447b('0x3e')]);_0x2a9e40['filters']=_['intersection'](_0x2a9e40[_0x447b('0x3d')],_0x2a9e40['query']);_0x27b4dd[_0x447b('0x40')]=_[_0x447b('0x41')](_0x2a9e40[_0x447b('0x3d')],qs[_0x447b('0x42')](_0x2a4a2d[_0x447b('0x3e')][_0x447b('0x42')]));_0x27b4dd['attributes']=_0x27b4dd[_0x447b('0x40')][_0x447b('0x52')]?_0x27b4dd[_0x447b('0x40')]:_0x2a9e40[_0x447b('0x3d')];_0x27b4dd['order']=qs[_0x447b('0x45')](_0x2a4a2d[_0x447b('0x3e')][_0x447b('0x45')]);_0x27b4dd[_0x447b('0x46')]=qs[_0x447b('0x3f')](_[_0x447b('0x47')](_0x2a4a2d[_0x447b('0x3e')],_0x2a9e40[_0x447b('0x3f')]));if(_0x2a4a2d[_0x447b('0x3e')][_0x447b('0x48')]){_0x27b4dd[_0x447b('0x46')]=_['merge'](_0x27b4dd['where'],{'$or':_[_0x447b('0x37')](_0x27b4dd['attributes'],function(_0x10d57e){var _0x202cd7={};_0x202cd7[_0x10d57e]={'$like':'%'+_0x2a4a2d[_0x447b('0x3e')]['filter']+'%'};return _0x202cd7;})});}_0x27b4dd=_[_0x447b('0x49')]({},_0x27b4dd,_0x2a4a2d['options']);return _0x2e60f9[_0x447b('0x5a')](_0x27b4dd);}})[_0x447b('0x1b')](function(_0xdc3ce6){if(_0xdc3ce6){_0x260e55=_0xdc3ce6[_0x447b('0x52')];if(!_0x2a4a2d[_0x447b('0x3e')][_0x447b('0x43')](_0x447b('0x44'))){_0x27b4dd[_0x447b('0x2b')]=qs[_0x447b('0x2b')](_0x2a4a2d[_0x447b('0x3e')][_0x447b('0x2b')]);_0x27b4dd[_0x447b('0x2a')]=qs[_0x447b('0x2a')](_0x2a4a2d[_0x447b('0x3e')][_0x447b('0x2a')]);}return _0x2e60f9['getDescriptions'](_0x27b4dd);}})['then'](function(_0x52765a){if(_0x52765a){return _0x52765a?{'count':_0x260e55,'rows':_0x52765a}:null;}})['then'](respondWithResult(_0x26b558,null))['catch'](handleError(_0x26b558,null));};exports[_0x447b('0x5b')]=function(_0x58c0ec,_0x245229,_0x4fd012){var _0x458fe4={};var _0x3f218b={};var _0x40a1c3;var _0x460677;return db[_0x447b('0x38')]['findOne']({'where':{'id':_0x58c0ec[_0x447b('0x50')]['id']}})[_0x447b('0x1b')](handleEntityNotFound(_0x245229,null))[_0x447b('0x1b')](function(_0x4cec34){if(_0x4cec34){_0x40a1c3=_0x4cec34;_0x3f218b[_0x447b('0x3d')]=_[_0x447b('0x51')](db[_0x447b('0x5c')]['rawAttributes']);_0x3f218b[_0x447b('0x3e')]=_[_0x447b('0x51')](_0x58c0ec['query']);_0x3f218b[_0x447b('0x3f')]=_[_0x447b('0x41')](_0x3f218b[_0x447b('0x3d')],_0x3f218b[_0x447b('0x3e')]);_0x458fe4[_0x447b('0x40')]=_[_0x447b('0x41')](_0x3f218b[_0x447b('0x3d')],qs[_0x447b('0x42')](_0x58c0ec[_0x447b('0x3e')][_0x447b('0x42')]));_0x458fe4[_0x447b('0x40')]=_0x458fe4[_0x447b('0x40')][_0x447b('0x52')]?_0x458fe4[_0x447b('0x40')]:_0x3f218b[_0x447b('0x3d')];_0x458fe4[_0x447b('0x5d')]=qs['sort'](_0x58c0ec['query'][_0x447b('0x45')]);_0x458fe4[_0x447b('0x46')]=qs[_0x447b('0x3f')](_[_0x447b('0x47')](_0x58c0ec[_0x447b('0x3e')],_0x3f218b[_0x447b('0x3f')]));if(_0x58c0ec[_0x447b('0x3e')]['filter']){_0x458fe4[_0x447b('0x46')]=_[_0x447b('0x49')](_0x458fe4['where'],{'$or':_[_0x447b('0x37')](_0x458fe4[_0x447b('0x40')],function(_0x146af9){var _0xfaafd9={};_0xfaafd9[_0x146af9]={'$like':'%'+_0x58c0ec[_0x447b('0x3e')][_0x447b('0x48')]+'%'};return _0xfaafd9;})});}_0x458fe4=_[_0x447b('0x49')]({},_0x458fe4,_0x58c0ec[_0x447b('0x4b')]);return _0x40a1c3[_0x447b('0x5b')](_0x458fe4);}})['then'](function(_0x5c35a6){if(_0x5c35a6){_0x460677=_0x5c35a6['length'];if(!_0x58c0ec['query'][_0x447b('0x43')](_0x447b('0x44'))){_0x458fe4[_0x447b('0x2b')]=qs[_0x447b('0x2b')](_0x58c0ec['query'][_0x447b('0x2b')]);_0x458fe4[_0x447b('0x2a')]=qs[_0x447b('0x2a')](_0x58c0ec[_0x447b('0x3e')][_0x447b('0x2a')]);}return _0x40a1c3[_0x447b('0x5b')](_0x458fe4);}})[_0x447b('0x1b')](function(_0x23ff58){if(_0x23ff58){return _0x23ff58?{'count':_0x460677,'rows':_0x23ff58}:null;}})[_0x447b('0x1b')](respondWithResult(_0x245229,null))[_0x447b('0x26')](handleError(_0x245229,null));};exports['setTags']=function(_0x378cee,_0x46a74b,_0x2b0197){if(_0x378cee['body']['id']){delete _0x378cee['body']['id'];}return db['FreshdeskConfiguration'][_0x447b('0x56')]({'where':{'id':_0x378cee[_0x447b('0x50')]['id']}})[_0x447b('0x1b')](handleEntityNotFound(_0x46a74b,null))[_0x447b('0x1b')](function(_0x51593d){if(_0x51593d){return _0x51593d[_0x447b('0x5e')](_0x378cee[_0x447b('0x54')][_0x447b('0x5f')]||[]);}return null;})[_0x447b('0x1b')](respondWithResult(_0x46a74b,null))[_0x447b('0x26')](handleError(_0x46a74b,null));}; \ No newline at end of file diff --git a/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.model.js b/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.model.js index 4363572..4195168 100644 --- a/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.model.js +++ b/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6a13=['./intFreshdeskConfiguration.attributes','define','FreshdeskConfiguration','int_freshdesk_configurations','util','../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment'];(function(_0xdc4171,_0x2bee54){var _0x5db668=function(_0x4bec40){while(--_0x4bec40){_0xdc4171['push'](_0xdc4171['shift']());}};_0x5db668(++_0x2bee54);}(_0x6a13,0x1f0));var _0x36a1=function(_0x38cea6,_0xfaccc2){_0x38cea6=_0x38cea6-0x0;var _0xb845bb=_0x6a13[_0x38cea6];return _0xb845bb;};'use strict';var _=require('lodash');var util=require(_0x36a1('0x0'));var logger=require(_0x36a1('0x1'))(_0x36a1('0x2'));var moment=require(_0x36a1('0x3'));var BPromise=require(_0x36a1('0x4'));var rp=require(_0x36a1('0x5'));var fs=require('fs');var path=require(_0x36a1('0x6'));var rimraf=require('rimraf');var config=require(_0x36a1('0x7'));var attributes=require(_0x36a1('0x8'));module['exports']=function(_0x7dd03f,_0x432641){return _0x7dd03f[_0x36a1('0x9')](_0x36a1('0xa'),attributes,{'tableName':_0x36a1('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x837e=['util','../../config/logger','api','request-promise','rimraf','./intFreshdeskConfiguration.attributes','exports','FreshdeskConfiguration','lodash'];(function(_0x1a0daa,_0x2a4634){var _0x1dbe15=function(_0xa8ab22){while(--_0xa8ab22){_0x1a0daa['push'](_0x1a0daa['shift']());}};_0x1dbe15(++_0x2a4634);}(_0x837e,0x179));var _0xe837=function(_0x4c5e77,_0x334922){_0x4c5e77=_0x4c5e77-0x0;var _0x11cb85=_0x837e[_0x4c5e77];return _0x11cb85;};'use strict';var _=require(_0xe837('0x0'));var util=require(_0xe837('0x1'));var logger=require(_0xe837('0x2'))(_0xe837('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xe837('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xe837('0x5'));var config=require('../../config/environment');var attributes=require(_0xe837('0x6'));module[_0xe837('0x7')]=function(_0x49e7ca,_0x417ecc){return _0x49e7ca['define'](_0xe837('0x8'),attributes,{'tableName':'int_freshdesk_configurations','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.rpc.js b/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.rpc.js index eb04699..53e3736 100644 --- a/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.rpc.js +++ b/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfedf=['debug','stringify','error','code','message','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise','client','http','request','info','FreshdeskConfiguration,\x20%s,\x20%s','request\x20sent'];(function(_0x61db1a,_0x2bbf5b){var _0x1e7e70=function(_0x354612){while(--_0x354612){_0x61db1a['push'](_0x61db1a['shift']());}};_0x1e7e70(++_0x2bbf5b);}(_0xfedf,0x16b));var _0xffed=function(_0x3ea913,_0x255df2){_0x3ea913=_0x3ea913-0x0;var _0x2b4f28=_0xfedf[_0x3ea913];return _0x2b4f28;};'use strict';var _=require(_0xffed('0x0'));var util=require(_0xffed('0x1'));var moment=require(_0xffed('0x2'));var BPromise=require(_0xffed('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xffed('0x4'));var db=require(_0xffed('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xffed('0x6'))(_0xffed('0x7'));var config=require('../../config/environment');var jayson=require(_0xffed('0x8'));var client=jayson[_0xffed('0x9')][_0xffed('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x152ff6,_0x348f28,_0x3e5294){return new BPromise(function(_0x3644a3,_0x3c7187){return client[_0xffed('0xb')](_0x152ff6,_0x3e5294)['then'](function(_0x587caa){logger[_0xffed('0xc')](_0xffed('0xd'),_0x348f28,_0xffed('0xe'));logger[_0xffed('0xf')]('FreshdeskConfiguration,\x20%s,\x20%s,\x20%s',_0x348f28,'request\x20sent',JSON[_0xffed('0x10')](_0x587caa));if(_0x587caa[_0xffed('0x11')]){if(_0x587caa['error'][_0xffed('0x12')]===0x1f4){logger[_0xffed('0x11')]('FreshdeskConfiguration,\x20%s,\x20%s',_0x348f28,_0x587caa['error'][_0xffed('0x13')]);return _0x3c7187(_0x587caa[_0xffed('0x11')][_0xffed('0x13')]);}logger[_0xffed('0x11')](_0xffed('0xd'),_0x348f28,_0x587caa['error'][_0xffed('0x13')]);return _0x3644a3(_0x587caa['error'][_0xffed('0x13')]);}else{logger[_0xffed('0xc')](_0xffed('0xd'),_0x348f28,_0xffed('0xe'));_0x3644a3(_0x587caa['result']['message']);}})[_0xffed('0x14')](function(_0x37bf59){logger[_0xffed('0x11')](_0xffed('0xd'),_0x348f28,_0x37bf59);_0x3c7187(_0x37bf59);});});} \ No newline at end of file +var _0xe5b0=['debug','stringify','error','code','message','info','result','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','request','then','FreshdeskConfiguration,\x20%s,\x20%s','request\x20sent'];(function(_0x4da356,_0x5235e1){var _0x321b07=function(_0x2bc6f4){while(--_0x2bc6f4){_0x4da356['push'](_0x4da356['shift']());}};_0x321b07(++_0x5235e1);}(_0xe5b0,0x152));var _0x0e5b=function(_0x32f70b,_0xdd436e){_0x32f70b=_0x32f70b-0x0;var _0x19618f=_0xe5b0[_0x32f70b];return _0x19618f;};'use strict';var _=require(_0x0e5b('0x0'));var util=require(_0x0e5b('0x1'));var moment=require(_0x0e5b('0x2'));var BPromise=require('bluebird');var rs=require(_0x0e5b('0x3'));var fs=require('fs');var Redis=require(_0x0e5b('0x4'));var db=require(_0x0e5b('0x5'))['db'];var utils=require(_0x0e5b('0x6'));var logger=require(_0x0e5b('0x7'))('rpc');var config=require(_0x0e5b('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x0e5b('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x405066,_0x58b310,_0x2c871b){return new BPromise(function(_0x6c131a,_0x25b6aa){return client[_0x0e5b('0xa')](_0x405066,_0x2c871b)[_0x0e5b('0xb')](function(_0x47c19d){logger['info'](_0x0e5b('0xc'),_0x58b310,_0x0e5b('0xd'));logger[_0x0e5b('0xe')]('FreshdeskConfiguration,\x20%s,\x20%s,\x20%s',_0x58b310,_0x0e5b('0xd'),JSON[_0x0e5b('0xf')](_0x47c19d));if(_0x47c19d[_0x0e5b('0x10')]){if(_0x47c19d[_0x0e5b('0x10')][_0x0e5b('0x11')]===0x1f4){logger[_0x0e5b('0x10')]('FreshdeskConfiguration,\x20%s,\x20%s',_0x58b310,_0x47c19d['error'][_0x0e5b('0x12')]);return _0x25b6aa(_0x47c19d[_0x0e5b('0x10')][_0x0e5b('0x12')]);}logger[_0x0e5b('0x10')](_0x0e5b('0xc'),_0x58b310,_0x47c19d[_0x0e5b('0x10')][_0x0e5b('0x12')]);return _0x6c131a(_0x47c19d[_0x0e5b('0x10')]['message']);}else{logger[_0x0e5b('0x13')](_0x0e5b('0xc'),_0x58b310,'request\x20sent');_0x6c131a(_0x47c19d[_0x0e5b('0x14')][_0x0e5b('0x12')]);}})[_0x0e5b('0x15')](function(_0x4ff8b7){logger[_0x0e5b('0x10')](_0x0e5b('0xc'),_0x58b310,_0x4ff8b7);_0x25b6aa(_0x4ff8b7);});});} \ No newline at end of file diff --git a/server/api/intFreshdeskField/index.js b/server/api/intFreshdeskField/index.js index 8230d87..b2e688f 100644 --- a/server/api/intFreshdeskField/index.js +++ b/server/api/intFreshdeskField/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa45b=['isAuthenticated','post','create','update','delete','destroy','exports','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','./intFreshdeskField.controller','get','index','/:id'];(function(_0x5618aa,_0x5a87b0){var _0x54ac1d=function(_0x5e9eb9){while(--_0x5e9eb9){_0x5618aa['push'](_0x5618aa['shift']());}};_0x54ac1d(++_0x5a87b0);}(_0xa45b,0x139));var _0xba45=function(_0x19f80f,_0x559974){_0x19f80f=_0x19f80f-0x0;var _0x26025d=_0xa45b[_0x19f80f];return _0x26025d;};'use strict';var multer=require(_0xba45('0x0'));var util=require(_0xba45('0x1'));var path=require(_0xba45('0x2'));var timeout=require(_0xba45('0x3'));var express=require(_0xba45('0x4'));var router=express['Router']();var fs_extra=require(_0xba45('0x5'));var auth=require(_0xba45('0x6'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xba45('0x7'));router[_0xba45('0x8')]('/',auth['isAuthenticated'](),controller[_0xba45('0x9')]);router[_0xba45('0x8')](_0xba45('0xa'),auth[_0xba45('0xb')](),controller['show']);router[_0xba45('0xc')]('/',auth[_0xba45('0xb')](),controller[_0xba45('0xd')]);router['put'](_0xba45('0xa'),auth['isAuthenticated'](),controller[_0xba45('0xe')]);router[_0xba45('0xf')](_0xba45('0xa'),auth[_0xba45('0xb')](),controller[_0xba45('0x10')]);module[_0xba45('0x11')]=router; \ No newline at end of file +var _0x3f77=['../../config/environment','./intFreshdeskField.controller','get','isAuthenticated','index','/:id','show','post','create','put','update','delete','exports','util','path','connect-timeout','fs-extra','../../components/auth/service','../../components/interaction/service'];(function(_0x1b2844,_0x24f744){var _0x477498=function(_0x2b45a3){while(--_0x2b45a3){_0x1b2844['push'](_0x1b2844['shift']());}};_0x477498(++_0x24f744);}(_0x3f77,0x6c));var _0x73f7=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x3f77[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require('multer');var util=require(_0x73f7('0x0'));var path=require(_0x73f7('0x1'));var timeout=require(_0x73f7('0x2'));var express=require('express');var router=express['Router']();var fs_extra=require(_0x73f7('0x3'));var auth=require(_0x73f7('0x4'));var interaction=require(_0x73f7('0x5'));var config=require(_0x73f7('0x6'));var controller=require(_0x73f7('0x7'));router[_0x73f7('0x8')]('/',auth[_0x73f7('0x9')](),controller[_0x73f7('0xa')]);router[_0x73f7('0x8')](_0x73f7('0xb'),auth[_0x73f7('0x9')](),controller[_0x73f7('0xc')]);router[_0x73f7('0xd')]('/',auth[_0x73f7('0x9')](),controller[_0x73f7('0xe')]);router[_0x73f7('0xf')](_0x73f7('0xb'),auth[_0x73f7('0x9')](),controller[_0x73f7('0x10')]);router[_0x73f7('0x11')](_0x73f7('0xb'),auth[_0x73f7('0x9')](),controller['destroy']);module[_0x73f7('0x12')]=router; \ No newline at end of file diff --git a/server/api/intFreshdeskField/intFreshdeskField.attributes.js b/server/api/intFreshdeskField/intFreshdeskField.attributes.js index 2a70c4e..eca4ff1 100644 --- a/server/api/intFreshdeskField/intFreshdeskField.attributes.js +++ b/server/api/intFreshdeskField/intFreshdeskField.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa4b8=['exports','ENUM','string','customVariable','keyValue','picklist','STRING','variable','BOOLEAN','sequelize'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0xa4b8,0x1df));var _0x8a4b=function(_0x43fce7,_0xc8e0c1){_0x43fce7=_0x43fce7-0x0;var _0x1b8fc9=_0xa4b8[_0x43fce7];return _0x1b8fc9;};'use strict';var Sequelize=require(_0x8a4b('0x0'));module[_0x8a4b('0x1')]={'type':{'type':Sequelize[_0x8a4b('0x2')](_0x8a4b('0x3'),'variable',_0x8a4b('0x4'),_0x8a4b('0x5'),_0x8a4b('0x6')),'defaultValue':_0x8a4b('0x3')},'content':{'type':Sequelize['STRING']},'key':{'type':Sequelize[_0x8a4b('0x7')]},'keyType':{'type':Sequelize['ENUM']('string',_0x8a4b('0x8'),_0x8a4b('0x4'))},'keyContent':{'type':Sequelize[_0x8a4b('0x7')]},'idField':{'type':Sequelize['STRING']},'nameField':{'type':Sequelize[_0x8a4b('0x7')]},'customField':{'type':Sequelize[_0x8a4b('0x9')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x8a4b('0x7')]}}; \ No newline at end of file +var _0xa993=['picklist','STRING','ENUM','string','BOOLEAN','sequelize','exports','variable','customVariable','keyValue'];(function(_0x1c17a7,_0x8ca1f0){var _0x45e840=function(_0x4059af){while(--_0x4059af){_0x1c17a7['push'](_0x1c17a7['shift']());}};_0x45e840(++_0x8ca1f0);}(_0xa993,0x177));var _0x3a99=function(_0x22c97b,_0x34365d){_0x22c97b=_0x22c97b-0x0;var _0x4d8de7=_0xa993[_0x22c97b];return _0x4d8de7;};'use strict';var Sequelize=require(_0x3a99('0x0'));module[_0x3a99('0x1')]={'type':{'type':Sequelize['ENUM']('string',_0x3a99('0x2'),_0x3a99('0x3'),_0x3a99('0x4'),_0x3a99('0x5')),'defaultValue':'string'},'content':{'type':Sequelize[_0x3a99('0x6')]},'key':{'type':Sequelize[_0x3a99('0x6')]},'keyType':{'type':Sequelize[_0x3a99('0x7')](_0x3a99('0x8'),_0x3a99('0x2'),_0x3a99('0x3'))},'keyContent':{'type':Sequelize[_0x3a99('0x6')]},'idField':{'type':Sequelize[_0x3a99('0x6')]},'nameField':{'type':Sequelize[_0x3a99('0x6')]},'customField':{'type':Sequelize[_0x3a99('0x9')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x3a99('0x6')]}}; \ No newline at end of file diff --git a/server/api/intFreshdeskField/intFreshdeskField.controller.js b/server/api/intFreshdeskField/intFreshdeskField.controller.js index 8efd248..e77c69d 100644 --- a/server/api/intFreshdeskField/intFreshdeskField.controller.js +++ b/server/api/intFreshdeskField/intFreshdeskField.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf109=['crypto','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/utils','../../config/environment','../../config/license/util','status','end','undefined','limit','count','offset','set','Content-Range','json','apply','save','update','destroy','then','sendStatus','error','name','send','index','map','rawAttributes','fieldName','type','model','keys','filters','intersection','attributes','fields','query','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','options','FreshdeskField','includeAll','include','rows','catch','show','params','find','create','body','eml-format','rimraf','zip-dir','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel'];(function(_0x4ca610,_0x42a400){var _0x48561c=function(_0x1a0e0b){while(--_0x1a0e0b){_0x4ca610['push'](_0x4ca610['shift']());}};_0x48561c(++_0x42a400);}(_0xf109,0xce));var _0x9f10=function(_0x9c2427,_0x17c865){_0x9c2427=_0x9c2427-0x0;var _0x51984f=_0xf109[_0x9c2427];return _0x51984f;};'use strict';var emlformat=require(_0x9f10('0x0'));var rimraf=require(_0x9f10('0x1'));var zipdir=require(_0x9f10('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x9f10('0x3'));var Mustache=require(_0x9f10('0x4'));var util=require(_0x9f10('0x5'));var path=require(_0x9f10('0x6'));var sox=require(_0x9f10('0x7'));var csv=require(_0x9f10('0x8'));var ejs=require(_0x9f10('0x9'));var fs=require('fs');var fs_extra=require(_0x9f10('0xa'));var _=require(_0x9f10('0xb'));var squel=require(_0x9f10('0xc'));var crypto=require(_0x9f10('0xd'));var jsforce=require('jsforce');var deskjs=require(_0x9f10('0xe'));var toCsv=require(_0x9f10('0x8'));var querystring=require(_0x9f10('0xf'));var Papa=require(_0x9f10('0x10'));var Redis=require(_0x9f10('0x11'));var authService=require('../../components/auth/service');var qs=require(_0x9f10('0x12'));var as=require(_0x9f10('0x13'));var hardwareService=require(_0x9f10('0x14'));var logger=require('../../config/logger')('api');var utils=require(_0x9f10('0x15'));var config=require(_0x9f10('0x16'));var licenseUtil=require(_0x9f10('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x289164,_0x260606){_0x260606=_0x260606||0xcc;return function(_0x35c529){if(_0x35c529){return _0x289164['sendStatus'](_0x260606);}return _0x289164[_0x9f10('0x18')](_0x260606)[_0x9f10('0x19')]();};}function respondWithResult(_0x5be443,_0x40a48a){_0x40a48a=_0x40a48a||0xc8;return function(_0x236e28){if(_0x236e28){return _0x5be443['status'](_0x40a48a)['json'](_0x236e28);}};}function respondWithFilteredResult(_0x2b6c4c,_0x177918){return function(_0x549217){if(_0x549217){var _0x11154b=typeof _0x177918['offset']===_0x9f10('0x1a')&&typeof _0x177918[_0x9f10('0x1b')]==='undefined';var _0x11cc56=_0x549217[_0x9f10('0x1c')];var _0x509fba=_0x11154b?0x0:_0x177918[_0x9f10('0x1d')];var _0x53bfbd=_0x11154b?_0x549217[_0x9f10('0x1c')]:_0x177918['offset']+_0x177918[_0x9f10('0x1b')];var _0x56fb44;if(_0x53bfbd>=_0x11cc56){_0x53bfbd=_0x11cc56;_0x56fb44=0xc8;}else{_0x56fb44=0xce;}_0x2b6c4c['status'](_0x56fb44);return _0x2b6c4c[_0x9f10('0x1e')](_0x9f10('0x1f'),_0x509fba+'-'+_0x53bfbd+'/'+_0x11cc56)[_0x9f10('0x20')](_0x549217);}return null;};}function patchUpdates(_0x3a78be){return function(_0xa810c){try{jsonpatch[_0x9f10('0x21')](_0xa810c,_0x3a78be,!![]);}catch(_0x27843d){return BPromise['reject'](_0x27843d);}return _0xa810c[_0x9f10('0x22')]();};}function saveUpdates(_0x58e6ba,_0x293990){return function(_0x36ace4){if(_0x36ace4){return _0x36ace4[_0x9f10('0x23')](_0x58e6ba)['then'](function(_0x2f31fb){return _0x2f31fb;});}return null;};}function removeEntity(_0x3dde2e,_0x213567){return function(_0x4d21c5){if(_0x4d21c5){return _0x4d21c5[_0x9f10('0x24')]()[_0x9f10('0x25')](function(){_0x3dde2e[_0x9f10('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0x2ec07d,_0x23c2e7){return function(_0x11cae7){if(!_0x11cae7){_0x2ec07d[_0x9f10('0x26')](0x194);}return _0x11cae7;};}function handleError(_0x5e80de,_0x57539b){_0x57539b=_0x57539b||0x1f4;return function(_0x5c1800){logger[_0x9f10('0x27')](_0x5c1800['stack']);if(_0x5c1800[_0x9f10('0x28')]){delete _0x5c1800[_0x9f10('0x28')];}_0x5e80de[_0x9f10('0x18')](_0x57539b)[_0x9f10('0x29')](_0x5c1800);};}exports[_0x9f10('0x2a')]=function(_0x4f6b0c,_0x522805){var _0x22814f={},_0x40f96b={},_0xfbb37f={'count':0x0,'rows':[]};var _0x181aec=_[_0x9f10('0x2b')](db['FreshdeskField'][_0x9f10('0x2c')],function(_0x501ee){return{'name':_0x501ee[_0x9f10('0x2d')],'type':_0x501ee[_0x9f10('0x2e')]['key']};});_0x40f96b[_0x9f10('0x2f')]=_[_0x9f10('0x2b')](_0x181aec,_0x9f10('0x28'));_0x40f96b['query']=_[_0x9f10('0x30')](_0x4f6b0c['query']);_0x40f96b[_0x9f10('0x31')]=_[_0x9f10('0x32')](_0x40f96b[_0x9f10('0x2f')],_0x40f96b['query']);_0x22814f[_0x9f10('0x33')]=_[_0x9f10('0x32')](_0x40f96b[_0x9f10('0x2f')],qs[_0x9f10('0x34')](_0x4f6b0c[_0x9f10('0x35')]['fields']));_0x22814f[_0x9f10('0x33')]=_0x22814f['attributes'][_0x9f10('0x36')]?_0x22814f[_0x9f10('0x33')]:_0x40f96b[_0x9f10('0x2f')];if(!_0x4f6b0c[_0x9f10('0x35')][_0x9f10('0x37')](_0x9f10('0x38'))){_0x22814f['limit']=qs[_0x9f10('0x1b')](_0x4f6b0c[_0x9f10('0x35')][_0x9f10('0x1b')]);_0x22814f['offset']=qs[_0x9f10('0x1d')](_0x4f6b0c[_0x9f10('0x35')]['offset']);}_0x22814f[_0x9f10('0x39')]=qs['sort'](_0x4f6b0c[_0x9f10('0x35')][_0x9f10('0x3a')]);_0x22814f[_0x9f10('0x3b')]=qs[_0x9f10('0x31')](_[_0x9f10('0x3c')](_0x4f6b0c[_0x9f10('0x35')],_0x40f96b[_0x9f10('0x31')]),_0x181aec);if(_0x4f6b0c[_0x9f10('0x35')]['filter']){_0x22814f[_0x9f10('0x3b')]=_[_0x9f10('0x3d')](_0x22814f[_0x9f10('0x3b')],{'$or':_['map'](_0x181aec,function(_0x233bab){if(_0x233bab[_0x9f10('0x2e')]!=='VIRTUAL'){var _0x30b04b={};_0x30b04b[_0x233bab[_0x9f10('0x28')]]={'$like':'%'+_0x4f6b0c[_0x9f10('0x35')]['filter']+'%'};return _0x30b04b;}})});}_0x22814f=_['merge']({},_0x22814f,_0x4f6b0c[_0x9f10('0x3e')]);var _0x2ff98d={'where':_0x22814f[_0x9f10('0x3b')]};return db[_0x9f10('0x3f')][_0x9f10('0x1c')](_0x2ff98d)[_0x9f10('0x25')](function(_0x15929f){_0xfbb37f[_0x9f10('0x1c')]=_0x15929f;if(_0x4f6b0c[_0x9f10('0x35')][_0x9f10('0x40')]){_0x22814f[_0x9f10('0x41')]=[{'all':!![]}];}return db[_0x9f10('0x3f')]['findAll'](_0x22814f);})['then'](function(_0x4bb805){_0xfbb37f[_0x9f10('0x42')]=_0x4bb805;return _0xfbb37f;})['then'](respondWithFilteredResult(_0x522805,_0x22814f))[_0x9f10('0x43')](handleError(_0x522805,null));};exports[_0x9f10('0x44')]=function(_0x426d30,_0x47d25c){var _0x3cfce6={'raw':!![],'where':{'id':_0x426d30[_0x9f10('0x45')]['id']}},_0xf1164={};_0xf1164[_0x9f10('0x2f')]=_[_0x9f10('0x30')](db['FreshdeskField']['rawAttributes']);_0xf1164['query']=_[_0x9f10('0x30')](_0x426d30['query']);_0xf1164[_0x9f10('0x31')]=_['intersection'](_0xf1164[_0x9f10('0x2f')],_0xf1164[_0x9f10('0x35')]);_0x3cfce6[_0x9f10('0x33')]=_[_0x9f10('0x32')](_0xf1164['model'],qs[_0x9f10('0x34')](_0x426d30[_0x9f10('0x35')]['fields']));_0x3cfce6[_0x9f10('0x33')]=_0x3cfce6[_0x9f10('0x33')][_0x9f10('0x36')]?_0x3cfce6[_0x9f10('0x33')]:_0xf1164[_0x9f10('0x2f')];if(_0x426d30[_0x9f10('0x35')][_0x9f10('0x40')]){_0x3cfce6[_0x9f10('0x41')]=[{'all':!![]}];}_0x3cfce6=_[_0x9f10('0x3d')]({},_0x3cfce6,_0x426d30[_0x9f10('0x3e')]);return db['FreshdeskField'][_0x9f10('0x46')](_0x3cfce6)[_0x9f10('0x25')](handleEntityNotFound(_0x47d25c,null))['then'](respondWithResult(_0x47d25c,null))[_0x9f10('0x43')](handleError(_0x47d25c,null));};exports[_0x9f10('0x47')]=function(_0x1cf3eb,_0x1807b3){return db['FreshdeskField'][_0x9f10('0x47')](_0x1cf3eb[_0x9f10('0x48')],{})[_0x9f10('0x25')](respondWithResult(_0x1807b3,0xc9))[_0x9f10('0x43')](handleError(_0x1807b3,null));};exports[_0x9f10('0x23')]=function(_0x43cb31,_0x479b46){if(_0x43cb31[_0x9f10('0x48')]['id']){delete _0x43cb31[_0x9f10('0x48')]['id'];}return db[_0x9f10('0x3f')][_0x9f10('0x46')]({'where':{'id':_0x43cb31[_0x9f10('0x45')]['id']}})[_0x9f10('0x25')](handleEntityNotFound(_0x479b46,null))['then'](saveUpdates(_0x43cb31[_0x9f10('0x48')],null))[_0x9f10('0x25')](respondWithResult(_0x479b46,null))[_0x9f10('0x43')](handleError(_0x479b46,null));};exports[_0x9f10('0x24')]=function(_0x39dae3,_0x15d676){return db[_0x9f10('0x3f')][_0x9f10('0x46')]({'where':{'id':_0x39dae3['params']['id']}})[_0x9f10('0x25')](handleEntityNotFound(_0x15d676,null))['then'](removeEntity(_0x15d676,null))[_0x9f10('0x43')](handleError(_0x15d676,null));}; \ No newline at end of file +var _0x657b=['order','sort','pick','filter','merge','VIRTUAL','options','where','include','findAll','rows','catch','params','includeAll','find','create','body','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','squel','jsforce','desk.js','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','end','json','offset','undefined','limit','count','save','update','then','sendStatus','error','stack','name','send','index','map','FreshdeskField','rawAttributes','fieldName','type','key','query','keys','filters','intersection','model','attributes','fields','length','hasOwnProperty'];(function(_0x56778e,_0x4eee57){var _0x2c540f=function(_0x479b16){while(--_0x479b16){_0x56778e['push'](_0x56778e['shift']());}};_0x2c540f(++_0x4eee57);}(_0x657b,0x131));var _0xb657=function(_0x147aca,_0x2b794b){_0x147aca=_0x147aca-0x0;var _0x38041e=_0x657b[_0x147aca];return _0x38041e;};'use strict';var emlformat=require(_0xb657('0x0'));var rimraf=require(_0xb657('0x1'));var zipdir=require(_0xb657('0x2'));var jsonpatch=require(_0xb657('0x3'));var rp=require(_0xb657('0x4'));var moment=require('moment');var BPromise=require(_0xb657('0x5'));var Mustache=require(_0xb657('0x6'));var util=require('util');var path=require(_0xb657('0x7'));var sox=require(_0xb657('0x8'));var csv=require(_0xb657('0x9'));var ejs=require(_0xb657('0xa'));var fs=require('fs');var fs_extra=require(_0xb657('0xb'));var _=require('lodash');var squel=require(_0xb657('0xc'));var crypto=require('crypto');var jsforce=require(_0xb657('0xd'));var deskjs=require(_0xb657('0xe'));var toCsv=require(_0xb657('0x9'));var querystring=require('querystring');var Papa=require(_0xb657('0xf'));var Redis=require('ioredis');var authService=require(_0xb657('0x10'));var qs=require('../../components/parsers/qs');var as=require(_0xb657('0x11'));var hardwareService=require(_0xb657('0x12'));var logger=require(_0xb657('0x13'))('api');var utils=require(_0xb657('0x14'));var config=require(_0xb657('0x15'));var licenseUtil=require(_0xb657('0x16'));var db=require(_0xb657('0x17'))['db'];function respondWithStatusCode(_0x51228b,_0x3e1ea1){_0x3e1ea1=_0x3e1ea1||0xcc;return function(_0x3ebcc2){if(_0x3ebcc2){return _0x51228b['sendStatus'](_0x3e1ea1);}return _0x51228b[_0xb657('0x18')](_0x3e1ea1)[_0xb657('0x19')]();};}function respondWithResult(_0xf04de9,_0x3ca0b4){_0x3ca0b4=_0x3ca0b4||0xc8;return function(_0x4aedb7){if(_0x4aedb7){return _0xf04de9[_0xb657('0x18')](_0x3ca0b4)[_0xb657('0x1a')](_0x4aedb7);}};}function respondWithFilteredResult(_0x511057,_0x4d253b){return function(_0x144eaf){if(_0x144eaf){var _0xbde891=typeof _0x4d253b[_0xb657('0x1b')]===_0xb657('0x1c')&&typeof _0x4d253b[_0xb657('0x1d')]===_0xb657('0x1c');var _0x20919b=_0x144eaf[_0xb657('0x1e')];var _0x9e98be=_0xbde891?0x0:_0x4d253b[_0xb657('0x1b')];var _0x2f0ba0=_0xbde891?_0x144eaf['count']:_0x4d253b[_0xb657('0x1b')]+_0x4d253b[_0xb657('0x1d')];var _0x21474b;if(_0x2f0ba0>=_0x20919b){_0x2f0ba0=_0x20919b;_0x21474b=0xc8;}else{_0x21474b=0xce;}_0x511057[_0xb657('0x18')](_0x21474b);return _0x511057['set']('Content-Range',_0x9e98be+'-'+_0x2f0ba0+'/'+_0x20919b)[_0xb657('0x1a')](_0x144eaf);}return null;};}function patchUpdates(_0x926b57){return function(_0xee3c7e){try{jsonpatch['apply'](_0xee3c7e,_0x926b57,!![]);}catch(_0x19f1e9){return BPromise['reject'](_0x19f1e9);}return _0xee3c7e[_0xb657('0x1f')]();};}function saveUpdates(_0x466a42,_0x2895ab){return function(_0x12fd7d){if(_0x12fd7d){return _0x12fd7d[_0xb657('0x20')](_0x466a42)['then'](function(_0x3de4eb){return _0x3de4eb;});}return null;};}function removeEntity(_0x13cea8,_0x38b4a0){return function(_0xfdd680){if(_0xfdd680){return _0xfdd680['destroy']()[_0xb657('0x21')](function(){_0x13cea8['status'](0xcc)[_0xb657('0x19')]();});}};}function handleEntityNotFound(_0x4e8587,_0x221794){return function(_0x4fe1c5){if(!_0x4fe1c5){_0x4e8587[_0xb657('0x22')](0x194);}return _0x4fe1c5;};}function handleError(_0x154f83,_0x5d4b01){_0x5d4b01=_0x5d4b01||0x1f4;return function(_0x241301){logger[_0xb657('0x23')](_0x241301[_0xb657('0x24')]);if(_0x241301['name']){delete _0x241301[_0xb657('0x25')];}_0x154f83[_0xb657('0x18')](_0x5d4b01)[_0xb657('0x26')](_0x241301);};}exports[_0xb657('0x27')]=function(_0x37a5af,_0xba9c05){var _0x66d5af={},_0x3be5de={},_0x291a32={'count':0x0,'rows':[]};var _0x410a93=_[_0xb657('0x28')](db[_0xb657('0x29')][_0xb657('0x2a')],function(_0x292fb1){return{'name':_0x292fb1[_0xb657('0x2b')],'type':_0x292fb1[_0xb657('0x2c')][_0xb657('0x2d')]};});_0x3be5de['model']=_[_0xb657('0x28')](_0x410a93,'name');_0x3be5de[_0xb657('0x2e')]=_[_0xb657('0x2f')](_0x37a5af['query']);_0x3be5de[_0xb657('0x30')]=_[_0xb657('0x31')](_0x3be5de[_0xb657('0x32')],_0x3be5de[_0xb657('0x2e')]);_0x66d5af[_0xb657('0x33')]=_['intersection'](_0x3be5de[_0xb657('0x32')],qs[_0xb657('0x34')](_0x37a5af[_0xb657('0x2e')][_0xb657('0x34')]));_0x66d5af[_0xb657('0x33')]=_0x66d5af['attributes'][_0xb657('0x35')]?_0x66d5af[_0xb657('0x33')]:_0x3be5de[_0xb657('0x32')];if(!_0x37a5af['query'][_0xb657('0x36')]('nolimit')){_0x66d5af[_0xb657('0x1d')]=qs[_0xb657('0x1d')](_0x37a5af[_0xb657('0x2e')][_0xb657('0x1d')]);_0x66d5af[_0xb657('0x1b')]=qs[_0xb657('0x1b')](_0x37a5af[_0xb657('0x2e')][_0xb657('0x1b')]);}_0x66d5af[_0xb657('0x37')]=qs[_0xb657('0x38')](_0x37a5af[_0xb657('0x2e')]['sort']);_0x66d5af['where']=qs[_0xb657('0x30')](_[_0xb657('0x39')](_0x37a5af[_0xb657('0x2e')],_0x3be5de[_0xb657('0x30')]),_0x410a93);if(_0x37a5af[_0xb657('0x2e')][_0xb657('0x3a')]){_0x66d5af['where']=_[_0xb657('0x3b')](_0x66d5af['where'],{'$or':_[_0xb657('0x28')](_0x410a93,function(_0xb37c21){if(_0xb37c21[_0xb657('0x2c')]!==_0xb657('0x3c')){var _0x3e854e={};_0x3e854e[_0xb37c21['name']]={'$like':'%'+_0x37a5af[_0xb657('0x2e')][_0xb657('0x3a')]+'%'};return _0x3e854e;}})});}_0x66d5af=_[_0xb657('0x3b')]({},_0x66d5af,_0x37a5af[_0xb657('0x3d')]);var _0x53941c={'where':_0x66d5af[_0xb657('0x3e')]};return db[_0xb657('0x29')][_0xb657('0x1e')](_0x53941c)[_0xb657('0x21')](function(_0x229f48){_0x291a32['count']=_0x229f48;if(_0x37a5af[_0xb657('0x2e')]['includeAll']){_0x66d5af[_0xb657('0x3f')]=[{'all':!![]}];}return db['FreshdeskField'][_0xb657('0x40')](_0x66d5af);})[_0xb657('0x21')](function(_0x2397c3){_0x291a32[_0xb657('0x41')]=_0x2397c3;return _0x291a32;})[_0xb657('0x21')](respondWithFilteredResult(_0xba9c05,_0x66d5af))[_0xb657('0x42')](handleError(_0xba9c05,null));};exports['show']=function(_0x199b64,_0x3583f1){var _0x22b735={'raw':!![],'where':{'id':_0x199b64[_0xb657('0x43')]['id']}},_0x5c9c67={};_0x5c9c67[_0xb657('0x32')]=_[_0xb657('0x2f')](db[_0xb657('0x29')][_0xb657('0x2a')]);_0x5c9c67[_0xb657('0x2e')]=_[_0xb657('0x2f')](_0x199b64[_0xb657('0x2e')]);_0x5c9c67[_0xb657('0x30')]=_['intersection'](_0x5c9c67[_0xb657('0x32')],_0x5c9c67['query']);_0x22b735[_0xb657('0x33')]=_[_0xb657('0x31')](_0x5c9c67['model'],qs[_0xb657('0x34')](_0x199b64['query']['fields']));_0x22b735[_0xb657('0x33')]=_0x22b735[_0xb657('0x33')][_0xb657('0x35')]?_0x22b735[_0xb657('0x33')]:_0x5c9c67['model'];if(_0x199b64[_0xb657('0x2e')][_0xb657('0x44')]){_0x22b735[_0xb657('0x3f')]=[{'all':!![]}];}_0x22b735=_[_0xb657('0x3b')]({},_0x22b735,_0x199b64[_0xb657('0x3d')]);return db['FreshdeskField'][_0xb657('0x45')](_0x22b735)['then'](handleEntityNotFound(_0x3583f1,null))['then'](respondWithResult(_0x3583f1,null))['catch'](handleError(_0x3583f1,null));};exports[_0xb657('0x46')]=function(_0x4a4a38,_0x2367aa){return db[_0xb657('0x29')][_0xb657('0x46')](_0x4a4a38['body'],{})[_0xb657('0x21')](respondWithResult(_0x2367aa,0xc9))[_0xb657('0x42')](handleError(_0x2367aa,null));};exports[_0xb657('0x20')]=function(_0x8178df,_0x2b957b){if(_0x8178df[_0xb657('0x47')]['id']){delete _0x8178df['body']['id'];}return db[_0xb657('0x29')][_0xb657('0x45')]({'where':{'id':_0x8178df['params']['id']}})[_0xb657('0x21')](handleEntityNotFound(_0x2b957b,null))['then'](saveUpdates(_0x8178df[_0xb657('0x47')],null))['then'](respondWithResult(_0x2b957b,null))[_0xb657('0x42')](handleError(_0x2b957b,null));};exports['destroy']=function(_0x385228,_0x5b6e64){return db[_0xb657('0x29')][_0xb657('0x45')]({'where':{'id':_0x385228[_0xb657('0x43')]['id']}})[_0xb657('0x21')](handleEntityNotFound(_0x5b6e64,null))[_0xb657('0x21')](removeEntity(_0x5b6e64,null))['catch'](handleError(_0x5b6e64,null));}; \ No newline at end of file diff --git a/server/api/intFreshdeskField/intFreshdeskField.model.js b/server/api/intFreshdeskField/intFreshdeskField.model.js index 69ef932..50da285 100644 --- a/server/api/intFreshdeskField/intFreshdeskField.model.js +++ b/server/api/intFreshdeskField/intFreshdeskField.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7c6b=['request-promise','rimraf','../../config/environment','./intFreshdeskField.attributes','exports','define','FreshdeskField','int_freshdesk_fields','freshdesk_unique_index','idField','FieldId','lodash','util','../../config/logger','moment','bluebird'];(function(_0x2a6754,_0x277259){var _0x17feda=function(_0x5745be){while(--_0x5745be){_0x2a6754['push'](_0x2a6754['shift']());}};_0x17feda(++_0x277259);}(_0x7c6b,0x9b));var _0xb7c6=function(_0x574524,_0x114ff8){_0x574524=_0x574524-0x0;var _0x4c6d91=_0x7c6b[_0x574524];return _0x4c6d91;};'use strict';var _=require(_0xb7c6('0x0'));var util=require(_0xb7c6('0x1'));var logger=require(_0xb7c6('0x2'))('api');var moment=require(_0xb7c6('0x3'));var BPromise=require(_0xb7c6('0x4'));var rp=require(_0xb7c6('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0xb7c6('0x6'));var config=require(_0xb7c6('0x7'));var attributes=require(_0xb7c6('0x8'));module[_0xb7c6('0x9')]=function(_0x509c1e,_0x475e4b){return _0x509c1e[_0xb7c6('0xa')](_0xb7c6('0xb'),attributes,{'tableName':_0xb7c6('0xc'),'paranoid':![],'indexes':[{'name':_0xb7c6('0xd'),'fields':[_0xb7c6('0xe'),_0xb7c6('0xf')],'unique':!![]}],'timestamps':!![]});}; \ No newline at end of file +var _0xd858=['./intFreshdeskField.attributes','exports','define','FreshdeskField','int_freshdesk_fields','idField','lodash','util','../../config/logger','api','moment','bluebird','path','rimraf'];(function(_0x3bd52b,_0xbbc735){var _0x1e5b89=function(_0x29ccc3){while(--_0x29ccc3){_0x3bd52b['push'](_0x3bd52b['shift']());}};_0x1e5b89(++_0xbbc735);}(_0xd858,0x156));var _0x8d85=function(_0x2f94f1,_0x588aaf){_0x2f94f1=_0x2f94f1-0x0;var _0x542f24=_0xd858[_0x2f94f1];return _0x542f24;};'use strict';var _=require(_0x8d85('0x0'));var util=require(_0x8d85('0x1'));var logger=require(_0x8d85('0x2'))(_0x8d85('0x3'));var moment=require(_0x8d85('0x4'));var BPromise=require(_0x8d85('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x8d85('0x6'));var rimraf=require(_0x8d85('0x7'));var config=require('../../config/environment');var attributes=require(_0x8d85('0x8'));module[_0x8d85('0x9')]=function(_0x4306a8,_0x492687){return _0x4306a8[_0x8d85('0xa')](_0x8d85('0xb'),attributes,{'tableName':_0x8d85('0xc'),'paranoid':![],'indexes':[{'name':'freshdesk_unique_index','fields':[_0x8d85('0xd'),'FieldId'],'unique':!![]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intFreshdeskField/intFreshdeskField.rpc.js b/server/api/intFreshdeskField/intFreshdeskField.rpc.js index 9c9aa61..5e0c527 100644 --- a/server/api/intFreshdeskField/intFreshdeskField.rpc.js +++ b/server/api/intFreshdeskField/intFreshdeskField.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9bf6=['../../config/environment','client','http','request','then','FreshdeskField,\x20%s,\x20%s','request\x20sent','debug','FreshdeskField,\x20%s,\x20%s,\x20%s','error','code','message','result','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc'];(function(_0x57b54c,_0x54ce0d){var _0x59cc19=function(_0xa33bc6){while(--_0xa33bc6){_0x57b54c['push'](_0x57b54c['shift']());}};_0x59cc19(++_0x54ce0d);}(_0x9bf6,0xd3));var _0x69bf=function(_0x1fc03f,_0x49f4a7){_0x1fc03f=_0x1fc03f-0x0;var _0x4acc09=_0x9bf6[_0x1fc03f];return _0x4acc09;};'use strict';var _=require(_0x69bf('0x0'));var util=require(_0x69bf('0x1'));var moment=require(_0x69bf('0x2'));var BPromise=require(_0x69bf('0x3'));var rs=require(_0x69bf('0x4'));var fs=require('fs');var Redis=require(_0x69bf('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x69bf('0x6'));var logger=require(_0x69bf('0x7'))(_0x69bf('0x8'));var config=require(_0x69bf('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x69bf('0xa')][_0x69bf('0xb')]({'port':0x232a});function respondWithRpcPromise(_0xd23efd,_0x323b6b,_0x40c124){return new BPromise(function(_0x5931fe,_0x5d96b9){return client[_0x69bf('0xc')](_0xd23efd,_0x40c124)[_0x69bf('0xd')](function(_0x103bee){logger['info'](_0x69bf('0xe'),_0x323b6b,_0x69bf('0xf'));logger[_0x69bf('0x10')](_0x69bf('0x11'),_0x323b6b,_0x69bf('0xf'),JSON['stringify'](_0x103bee));if(_0x103bee[_0x69bf('0x12')]){if(_0x103bee[_0x69bf('0x12')][_0x69bf('0x13')]===0x1f4){logger[_0x69bf('0x12')](_0x69bf('0xe'),_0x323b6b,_0x103bee['error']['message']);return _0x5d96b9(_0x103bee[_0x69bf('0x12')][_0x69bf('0x14')]);}logger[_0x69bf('0x12')](_0x69bf('0xe'),_0x323b6b,_0x103bee[_0x69bf('0x12')][_0x69bf('0x14')]);return _0x5931fe(_0x103bee[_0x69bf('0x12')][_0x69bf('0x14')]);}else{logger['info'](_0x69bf('0xe'),_0x323b6b,_0x69bf('0xf'));_0x5931fe(_0x103bee[_0x69bf('0x15')][_0x69bf('0x14')]);}})['catch'](function(_0x119f0e){logger['error'](_0x69bf('0xe'),_0x323b6b,_0x119f0e);_0x5d96b9(_0x119f0e);});});} \ No newline at end of file +var _0xbb7f=['FreshdeskField,\x20%s,\x20%s','message','result','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','info','request\x20sent','debug','FreshdeskField,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x2d03ca,_0x5833f3){var _0x3d538a=function(_0x28b682){while(--_0x28b682){_0x2d03ca['push'](_0x2d03ca['shift']());}};_0x3d538a(++_0x5833f3);}(_0xbb7f,0xc9));var _0xfbb7=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0xbb7f[_0x501510];return _0x1e6ee5;};'use strict';var _=require(_0xfbb7('0x0'));var util=require(_0xfbb7('0x1'));var moment=require(_0xfbb7('0x2'));var BPromise=require(_0xfbb7('0x3'));var rs=require(_0xfbb7('0x4'));var fs=require('fs');var Redis=require(_0xfbb7('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xfbb7('0x6'));var logger=require(_0xfbb7('0x7'))(_0xfbb7('0x8'));var config=require('../../config/environment');var jayson=require(_0xfbb7('0x9'));var client=jayson[_0xfbb7('0xa')][_0xfbb7('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x4d2b35,_0x2fc2ef,_0x2aeb3a){return new BPromise(function(_0x57de4c,_0x5a08c3){return client[_0xfbb7('0xc')](_0x4d2b35,_0x2aeb3a)['then'](function(_0x4d714d){logger[_0xfbb7('0xd')]('FreshdeskField,\x20%s,\x20%s',_0x2fc2ef,_0xfbb7('0xe'));logger[_0xfbb7('0xf')](_0xfbb7('0x10'),_0x2fc2ef,_0xfbb7('0xe'),JSON[_0xfbb7('0x11')](_0x4d714d));if(_0x4d714d[_0xfbb7('0x12')]){if(_0x4d714d[_0xfbb7('0x12')]['code']===0x1f4){logger[_0xfbb7('0x12')](_0xfbb7('0x13'),_0x2fc2ef,_0x4d714d[_0xfbb7('0x12')][_0xfbb7('0x14')]);return _0x5a08c3(_0x4d714d[_0xfbb7('0x12')][_0xfbb7('0x14')]);}logger['error'](_0xfbb7('0x13'),_0x2fc2ef,_0x4d714d[_0xfbb7('0x12')]['message']);return _0x57de4c(_0x4d714d['error'][_0xfbb7('0x14')]);}else{logger[_0xfbb7('0xd')](_0xfbb7('0x13'),_0x2fc2ef,_0xfbb7('0xe'));_0x57de4c(_0x4d714d[_0xfbb7('0x15')][_0xfbb7('0x14')]);}})['catch'](function(_0x49fbac){logger[_0xfbb7('0x12')](_0xfbb7('0x13'),_0x2fc2ef,_0x49fbac);_0x5a08c3(_0x49fbac);});});} \ No newline at end of file diff --git a/server/api/intFreshsalesAccount/index.js b/server/api/intFreshsalesAccount/index.js index a67085c..3fab71b 100644 --- a/server/api/intFreshsalesAccount/index.js +++ b/server/api/intFreshsalesAccount/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xee5b=['multer','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','index','getConfigurations','/:id/fields','getFields','post','create','/:id/configurations','addConfiguration','put','delete','/:id'];(function(_0x25d69d,_0x308b44){var _0x42739f=function(_0x3c2a8b){while(--_0x3c2a8b){_0x25d69d['push'](_0x25d69d['shift']());}};_0x42739f(++_0x308b44);}(_0xee5b,0x1f4));var _0xbee5=function(_0x50cda0,_0x13d382){_0x50cda0=_0x50cda0-0x0;var _0x25e05b=_0xee5b[_0x50cda0];return _0x25e05b;};'use strict';var multer=require(_0xbee5('0x0'));var util=require('util');var path=require(_0xbee5('0x1'));var timeout=require(_0xbee5('0x2'));var express=require('express');var router=express[_0xbee5('0x3')]();var fs_extra=require(_0xbee5('0x4'));var auth=require(_0xbee5('0x5'));var interaction=require(_0xbee5('0x6'));var config=require('../../config/environment');var controller=require('./intFreshsalesAccount.controller');router[_0xbee5('0x7')]('/',auth[_0xbee5('0x8')](),controller[_0xbee5('0x9')]);router[_0xbee5('0x7')]('/:id',auth['isAuthenticated'](),controller['show']);router['get']('/:id/configurations',auth[_0xbee5('0x8')](),controller[_0xbee5('0xa')]);router[_0xbee5('0x7')](_0xbee5('0xb'),auth['isAuthenticated'](),controller[_0xbee5('0xc')]);router[_0xbee5('0xd')]('/',auth[_0xbee5('0x8')](),controller[_0xbee5('0xe')]);router[_0xbee5('0xd')](_0xbee5('0xf'),auth[_0xbee5('0x8')](),controller[_0xbee5('0x10')]);router[_0xbee5('0x11')]('/:id',auth[_0xbee5('0x8')](),controller['update']);router[_0xbee5('0x12')](_0xbee5('0x13'),auth[_0xbee5('0x8')](),controller['destroy']);module['exports']=router; \ No newline at end of file +var _0xe205=['./intFreshsalesAccount.controller','get','isAuthenticated','index','/:id/configurations','/:id/fields','getFields','create','post','addConfiguration','/:id','update','destroy','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service'];(function(_0x374ada,_0x27b3a5){var _0x449ed8=function(_0x3efc46){while(--_0x3efc46){_0x374ada['push'](_0x374ada['shift']());}};_0x449ed8(++_0x27b3a5);}(_0xe205,0xa7));var _0x5e20=function(_0x42b755,_0x54cdcc){_0x42b755=_0x42b755-0x0;var _0x4c0603=_0xe205[_0x42b755];return _0x4c0603;};'use strict';var multer=require(_0x5e20('0x0'));var util=require(_0x5e20('0x1'));var path=require(_0x5e20('0x2'));var timeout=require(_0x5e20('0x3'));var express=require(_0x5e20('0x4'));var router=express[_0x5e20('0x5')]();var fs_extra=require(_0x5e20('0x6'));var auth=require(_0x5e20('0x7'));var interaction=require(_0x5e20('0x8'));var config=require('../../config/environment');var controller=require(_0x5e20('0x9'));router[_0x5e20('0xa')]('/',auth[_0x5e20('0xb')](),controller[_0x5e20('0xc')]);router['get']('/:id',auth[_0x5e20('0xb')](),controller['show']);router['get'](_0x5e20('0xd'),auth[_0x5e20('0xb')](),controller['getConfigurations']);router[_0x5e20('0xa')](_0x5e20('0xe'),auth[_0x5e20('0xb')](),controller[_0x5e20('0xf')]);router['post']('/',auth[_0x5e20('0xb')](),controller[_0x5e20('0x10')]);router[_0x5e20('0x11')](_0x5e20('0xd'),auth[_0x5e20('0xb')](),controller[_0x5e20('0x12')]);router['put'](_0x5e20('0x13'),auth[_0x5e20('0xb')](),controller[_0x5e20('0x14')]);router['delete'](_0x5e20('0x13'),auth['isAuthenticated'](),controller[_0x5e20('0x15')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/intFreshsalesAccount/intFreshsalesAccount.attributes.js b/server/api/intFreshsalesAccount/intFreshsalesAccount.attributes.js index db8c0db..eac175a 100644 --- a/server/api/intFreshsalesAccount/intFreshsalesAccount.attributes.js +++ b/server/api/intFreshsalesAccount/intFreshsalesAccount.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9f0e=['STRING','remoteUri','sequelize','exports'];(function(_0x6641fe,_0x2aadf5){var _0x525530=function(_0x1b9672){while(--_0x1b9672){_0x6641fe['push'](_0x6641fe['shift']());}};_0x525530(++_0x2aadf5);}(_0x9f0e,0x116));var _0xe9f0=function(_0x508a86,_0x55fd11){_0x508a86=_0x508a86-0x0;var _0x7e9b9=_0x9f0e[_0x508a86];return _0x7e9b9;};'use strict';var Sequelize=require(_0xe9f0('0x0'));module[_0xe9f0('0x1')]={'name':{'type':Sequelize[_0xe9f0('0x2')]},'description':{'type':Sequelize[_0xe9f0('0x2')]},'username':{'type':Sequelize[_0xe9f0('0x2')],'unique':'username'},'apiKey':{'type':Sequelize['STRING']},'remoteUri':{'type':Sequelize[_0xe9f0('0x2')],'unique':_0xe9f0('0x3')},'serverUrl':{'type':Sequelize[_0xe9f0('0x2')],'allowNull':![]}}; \ No newline at end of file +var _0x7880=['exports','STRING','username','remoteUri'];(function(_0x5c85d2,_0x3165af){var _0x2d2d10=function(_0x550a26){while(--_0x550a26){_0x5c85d2['push'](_0x5c85d2['shift']());}};_0x2d2d10(++_0x3165af);}(_0x7880,0x1f4));var _0x0788=function(_0x1d90ca,_0x3bab16){_0x1d90ca=_0x1d90ca-0x0;var _0x28872b=_0x7880[_0x1d90ca];return _0x28872b;};'use strict';var Sequelize=require('sequelize');module[_0x0788('0x0')]={'name':{'type':Sequelize[_0x0788('0x1')]},'description':{'type':Sequelize[_0x0788('0x1')]},'username':{'type':Sequelize[_0x0788('0x1')],'unique':_0x0788('0x2')},'apiKey':{'type':Sequelize[_0x0788('0x1')]},'remoteUri':{'type':Sequelize['STRING'],'unique':_0x0788('0x3')},'serverUrl':{'type':Sequelize[_0x0788('0x1')],'allowNull':![]}}; \ No newline at end of file diff --git a/server/api/intFreshsalesAccount/intFreshsalesAccount.controller.js b/server/api/intFreshsalesAccount/intFreshsalesAccount.controller.js index df45eb8..b0ef8be 100644 --- a/server/api/intFreshsalesAccount/intFreshsalesAccount.controller.js +++ b/server/api/intFreshsalesAccount/intFreshsalesAccount.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3fec=['crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/license/util','../../mysqldb','../../components/integrations/configuration','jayson/promise','client','http','request','then','info','FreshsalesAccount,\x20%s,\x20%s','request\x20sent','debug','FreshsalesAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','destroy','stack','name','index','map','FreshsalesAccount','type','key','model','keys','query','filters','intersection','attributes','fields','length','sort','filter','where','merge','VIRTUAL','options','include','findAll','rows','show','params','rawAttributes','find','create','body','getConfigurations','findOne','FreshsalesConfiguration','order','hasOwnProperty','nolimit','AccountId','Subjects','getSubjects','channel','getDescriptions','FreshsalesField','Descriptions','username','remoteUri','slice','substring','lastIndexOf','format','%s%s','/api/selector/owners','apiKey','Requested\x20Resource\x20not\x20Found','test','statusCode','getFields,\x20%s,\x20%s,\x20%s','getFields','eml-format','fast-json-patch','request-promise','bluebird','path','to-csv','ejs','fs-extra','lodash','squel'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x3fec,0x1ba));var _0xc3fe=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x3fec[_0x14add3];return _0x4a174f;};'use strict';var emlformat=require(_0xc3fe('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0xc3fe('0x1'));var rp=require(_0xc3fe('0x2'));var moment=require('moment');var BPromise=require(_0xc3fe('0x3'));var Mustache=require('mustache');var util=require('util');var path=require(_0xc3fe('0x4'));var sox=require('sox');var csv=require(_0xc3fe('0x5'));var ejs=require(_0xc3fe('0x6'));var fs=require('fs');var fs_extra=require(_0xc3fe('0x7'));var _=require(_0xc3fe('0x8'));var squel=require(_0xc3fe('0x9'));var crypto=require(_0xc3fe('0xa'));var jsforce=require(_0xc3fe('0xb'));var deskjs=require(_0xc3fe('0xc'));var toCsv=require(_0xc3fe('0x5'));var querystring=require(_0xc3fe('0xd'));var Papa=require(_0xc3fe('0xe'));var Redis=require(_0xc3fe('0xf'));var authService=require(_0xc3fe('0x10'));var qs=require(_0xc3fe('0x11'));var as=require(_0xc3fe('0x12'));var hardwareService=require(_0xc3fe('0x13'));var logger=require('../../config/logger')(_0xc3fe('0x14'));var utils=require(_0xc3fe('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0xc3fe('0x16'));var db=require(_0xc3fe('0x17'))['db'];var integrations=require(_0xc3fe('0x18'));var jayson=require(_0xc3fe('0x19'));var client=jayson[_0xc3fe('0x1a')][_0xc3fe('0x1b')]({'port':0x232a});function respondWithRpcPromise(_0x1ac4d7,_0x7d5e67,_0xb6a471,_0x432539){return new BPromise(function(_0x4b8088,_0x400476){var _0x531fa5=_0x432539||client;return _0x531fa5[_0xc3fe('0x1c')](_0x1ac4d7,_0xb6a471)[_0xc3fe('0x1d')](function(_0x2e3671){logger[_0xc3fe('0x1e')](_0xc3fe('0x1f'),_0x7d5e67,_0xc3fe('0x20'));logger[_0xc3fe('0x21')](_0xc3fe('0x22'),_0x7d5e67,_0xc3fe('0x20'),JSON[_0xc3fe('0x23')](_0x2e3671));if(_0x2e3671[_0xc3fe('0x24')]){if(_0x2e3671[_0xc3fe('0x24')][_0xc3fe('0x25')]===0x1f4){logger[_0xc3fe('0x24')](_0xc3fe('0x1f'),_0x7d5e67,_0x2e3671['error'][_0xc3fe('0x26')]);return _0x400476(_0x2e3671[_0xc3fe('0x24')][_0xc3fe('0x26')]);}logger['error'](_0xc3fe('0x1f'),_0x7d5e67,_0x2e3671[_0xc3fe('0x24')]['message']);return _0x4b8088(_0x2e3671['error'][_0xc3fe('0x26')]);}else{logger[_0xc3fe('0x1e')](_0xc3fe('0x1f'),_0x7d5e67,'request\x20sent');_0x4b8088(_0x2e3671[_0xc3fe('0x27')][_0xc3fe('0x26')]);}})[_0xc3fe('0x28')](function(_0x3c0ac4){logger[_0xc3fe('0x24')](_0xc3fe('0x1f'),_0x7d5e67,_0x3c0ac4);_0x400476(_0x3c0ac4);});});}function respondWithStatusCode(_0x1dcfec,_0x6b57a6){_0x6b57a6=_0x6b57a6||0xcc;return function(_0x2c4727){if(_0x2c4727){return _0x1dcfec[_0xc3fe('0x29')](_0x6b57a6);}return _0x1dcfec[_0xc3fe('0x2a')](_0x6b57a6)[_0xc3fe('0x2b')]();};}function respondWithResult(_0x4da635,_0x3220e7){_0x3220e7=_0x3220e7||0xc8;return function(_0x1caee8){if(_0x1caee8){return _0x4da635[_0xc3fe('0x2a')](_0x3220e7)[_0xc3fe('0x2c')](_0x1caee8);}};}function respondWithFilteredResult(_0x416149,_0x5672b9){return function(_0xcadfae){if(_0xcadfae){var _0x431594=typeof _0x5672b9[_0xc3fe('0x2d')]===_0xc3fe('0x2e')&&typeof _0x5672b9[_0xc3fe('0x2f')]===_0xc3fe('0x2e');var _0x2dac90=_0xcadfae[_0xc3fe('0x30')];var _0xa74edf=_0x431594?0x0:_0x5672b9[_0xc3fe('0x2d')];var _0x391167=_0x431594?_0xcadfae[_0xc3fe('0x30')]:_0x5672b9[_0xc3fe('0x2d')]+_0x5672b9[_0xc3fe('0x2f')];var _0x165734;if(_0x391167>=_0x2dac90){_0x391167=_0x2dac90;_0x165734=0xc8;}else{_0x165734=0xce;}_0x416149[_0xc3fe('0x2a')](_0x165734);return _0x416149[_0xc3fe('0x31')](_0xc3fe('0x32'),_0xa74edf+'-'+_0x391167+'/'+_0x2dac90)['json'](_0xcadfae);}return null;};}function patchUpdates(_0x1e8a38){return function(_0x19d353){try{jsonpatch[_0xc3fe('0x33')](_0x19d353,_0x1e8a38,!![]);}catch(_0x246621){return BPromise[_0xc3fe('0x34')](_0x246621);}return _0x19d353[_0xc3fe('0x35')]();};}function saveUpdates(_0x3f4573,_0x28fc3b){return function(_0x6fe063){if(_0x6fe063){return _0x6fe063[_0xc3fe('0x36')](_0x3f4573)[_0xc3fe('0x1d')](function(_0x484746){return _0x484746;});}return null;};}function removeEntity(_0x5b6151,_0x4aadda){return function(_0x26f65d){if(_0x26f65d){return _0x26f65d[_0xc3fe('0x37')]()['then'](function(){_0x5b6151[_0xc3fe('0x2a')](0xcc)[_0xc3fe('0x2b')]();});}};}function handleEntityNotFound(_0x5f37c0,_0x5b76ae){return function(_0x38c948){if(!_0x38c948){_0x5f37c0[_0xc3fe('0x29')](0x194);}return _0x38c948;};}function handleError(_0xd8aa2c,_0x2aa7b8){_0x2aa7b8=_0x2aa7b8||0x1f4;return function(_0x5716b0){logger['error'](_0x5716b0[_0xc3fe('0x38')]);if(_0x5716b0[_0xc3fe('0x39')]){delete _0x5716b0[_0xc3fe('0x39')];}_0xd8aa2c[_0xc3fe('0x2a')](_0x2aa7b8)['send'](_0x5716b0);};}exports[_0xc3fe('0x3a')]=function(_0x484e59,_0x1b0090){var _0x4e694d={},_0x7fc7fb={},_0x201d72={'count':0x0,'rows':[]};var _0x51776c=_[_0xc3fe('0x3b')](db[_0xc3fe('0x3c')]['rawAttributes'],function(_0x399616){return{'name':_0x399616['fieldName'],'type':_0x399616[_0xc3fe('0x3d')][_0xc3fe('0x3e')]};});_0x7fc7fb[_0xc3fe('0x3f')]=_[_0xc3fe('0x3b')](_0x51776c,_0xc3fe('0x39'));_0x7fc7fb['query']=_[_0xc3fe('0x40')](_0x484e59[_0xc3fe('0x41')]);_0x7fc7fb[_0xc3fe('0x42')]=_[_0xc3fe('0x43')](_0x7fc7fb[_0xc3fe('0x3f')],_0x7fc7fb[_0xc3fe('0x41')]);_0x4e694d[_0xc3fe('0x44')]=_['intersection'](_0x7fc7fb[_0xc3fe('0x3f')],qs[_0xc3fe('0x45')](_0x484e59[_0xc3fe('0x41')][_0xc3fe('0x45')]));_0x4e694d[_0xc3fe('0x44')]=_0x4e694d[_0xc3fe('0x44')][_0xc3fe('0x46')]?_0x4e694d['attributes']:_0x7fc7fb['model'];if(!_0x484e59[_0xc3fe('0x41')]['hasOwnProperty']('nolimit')){_0x4e694d[_0xc3fe('0x2f')]=qs[_0xc3fe('0x2f')](_0x484e59[_0xc3fe('0x41')][_0xc3fe('0x2f')]);_0x4e694d['offset']=qs[_0xc3fe('0x2d')](_0x484e59[_0xc3fe('0x41')][_0xc3fe('0x2d')]);}_0x4e694d['order']=qs[_0xc3fe('0x47')](_0x484e59[_0xc3fe('0x41')][_0xc3fe('0x47')]);_0x4e694d['where']=qs['filters'](_['pick'](_0x484e59[_0xc3fe('0x41')],_0x7fc7fb[_0xc3fe('0x42')]),_0x51776c);if(_0x484e59[_0xc3fe('0x41')][_0xc3fe('0x48')]){_0x4e694d[_0xc3fe('0x49')]=_[_0xc3fe('0x4a')](_0x4e694d[_0xc3fe('0x49')],{'$or':_['map'](_0x51776c,function(_0x10de1b){if(_0x10de1b[_0xc3fe('0x3d')]!==_0xc3fe('0x4b')){var _0x112142={};_0x112142[_0x10de1b[_0xc3fe('0x39')]]={'$like':'%'+_0x484e59[_0xc3fe('0x41')]['filter']+'%'};return _0x112142;}})});}_0x4e694d=_[_0xc3fe('0x4a')]({},_0x4e694d,_0x484e59[_0xc3fe('0x4c')]);var _0xec37eb={'where':_0x4e694d[_0xc3fe('0x49')]};return db[_0xc3fe('0x3c')][_0xc3fe('0x30')](_0xec37eb)[_0xc3fe('0x1d')](function(_0x1897af){_0x201d72[_0xc3fe('0x30')]=_0x1897af;if(_0x484e59[_0xc3fe('0x41')]['includeAll']){_0x4e694d[_0xc3fe('0x4d')]=[{'all':!![]}];}return db[_0xc3fe('0x3c')][_0xc3fe('0x4e')](_0x4e694d);})[_0xc3fe('0x1d')](function(_0x1f9df3){_0x201d72[_0xc3fe('0x4f')]=_0x1f9df3;return _0x201d72;})[_0xc3fe('0x1d')](respondWithFilteredResult(_0x1b0090,_0x4e694d))[_0xc3fe('0x28')](handleError(_0x1b0090,null));};exports[_0xc3fe('0x50')]=function(_0x21d5f6,_0x24c37c){var _0x378c16={'raw':![],'where':{'id':_0x21d5f6[_0xc3fe('0x51')]['id']}},_0xccbee9={};_0xccbee9['model']=_[_0xc3fe('0x40')](db[_0xc3fe('0x3c')][_0xc3fe('0x52')]);_0xccbee9['query']=_[_0xc3fe('0x40')](_0x21d5f6[_0xc3fe('0x41')]);_0xccbee9[_0xc3fe('0x42')]=_[_0xc3fe('0x43')](_0xccbee9[_0xc3fe('0x3f')],_0xccbee9['query']);_0x378c16['attributes']=_[_0xc3fe('0x43')](_0xccbee9[_0xc3fe('0x3f')],qs['fields'](_0x21d5f6[_0xc3fe('0x41')][_0xc3fe('0x45')]));_0x378c16['attributes']=_0x378c16[_0xc3fe('0x44')][_0xc3fe('0x46')]?_0x378c16[_0xc3fe('0x44')]:_0xccbee9[_0xc3fe('0x3f')];if(_0x21d5f6['query']['includeAll']){_0x378c16[_0xc3fe('0x4d')]=[{'all':!![]}];}_0x378c16=_[_0xc3fe('0x4a')]({},_0x378c16,_0x21d5f6[_0xc3fe('0x4c')]);return db['FreshsalesAccount'][_0xc3fe('0x53')](_0x378c16)[_0xc3fe('0x1d')](handleEntityNotFound(_0x24c37c,null))[_0xc3fe('0x1d')](respondWithResult(_0x24c37c,null))['catch'](handleError(_0x24c37c,null));};exports[_0xc3fe('0x54')]=function(_0x426d51,_0x5caf49){return db[_0xc3fe('0x3c')][_0xc3fe('0x54')](_0x426d51[_0xc3fe('0x55')],{})[_0xc3fe('0x1d')](respondWithResult(_0x5caf49,0xc9))[_0xc3fe('0x28')](handleError(_0x5caf49,null));};exports[_0xc3fe('0x36')]=function(_0x17d27f,_0x2f3568){if(_0x17d27f[_0xc3fe('0x55')]['id']){delete _0x17d27f['body']['id'];}return db[_0xc3fe('0x3c')]['find']({'where':{'id':_0x17d27f[_0xc3fe('0x51')]['id']}})[_0xc3fe('0x1d')](handleEntityNotFound(_0x2f3568,null))['then'](saveUpdates(_0x17d27f[_0xc3fe('0x55')],null))[_0xc3fe('0x1d')](respondWithResult(_0x2f3568,null))[_0xc3fe('0x28')](handleError(_0x2f3568,null));};exports['destroy']=function(_0x598d2b,_0x2ef4eb){return db[_0xc3fe('0x3c')]['find']({'where':{'id':_0x598d2b[_0xc3fe('0x51')]['id']}})[_0xc3fe('0x1d')](handleEntityNotFound(_0x2ef4eb,null))[_0xc3fe('0x1d')](removeEntity(_0x2ef4eb,null))[_0xc3fe('0x28')](handleError(_0x2ef4eb,null));};exports[_0xc3fe('0x56')]=function(_0x398edb,_0x35f07a,_0x5caf99){var _0x11e5bf={};var _0x224d97={};var _0x1ab9c8;var _0x1ead09;return db[_0xc3fe('0x3c')][_0xc3fe('0x57')]({'where':{'id':_0x398edb[_0xc3fe('0x51')]['id']}})[_0xc3fe('0x1d')](handleEntityNotFound(_0x35f07a,null))[_0xc3fe('0x1d')](function(_0x3a64c6){if(_0x3a64c6){_0x1ab9c8=_0x3a64c6;_0x224d97[_0xc3fe('0x3f')]=_['keys'](db[_0xc3fe('0x58')][_0xc3fe('0x52')]);_0x224d97['query']=_[_0xc3fe('0x40')](_0x398edb['query']);_0x224d97[_0xc3fe('0x42')]=_[_0xc3fe('0x43')](_0x224d97[_0xc3fe('0x3f')],_0x224d97[_0xc3fe('0x41')]);_0x11e5bf[_0xc3fe('0x44')]=_['intersection'](_0x224d97[_0xc3fe('0x3f')],qs['fields'](_0x398edb[_0xc3fe('0x41')]['fields']));_0x11e5bf[_0xc3fe('0x44')]=_0x11e5bf[_0xc3fe('0x44')]['length']?_0x11e5bf[_0xc3fe('0x44')]:_0x224d97[_0xc3fe('0x3f')];_0x11e5bf[_0xc3fe('0x59')]=qs[_0xc3fe('0x47')](_0x398edb[_0xc3fe('0x41')][_0xc3fe('0x47')]);_0x11e5bf[_0xc3fe('0x49')]=qs[_0xc3fe('0x42')](_['pick'](_0x398edb[_0xc3fe('0x41')],_0x224d97[_0xc3fe('0x42')]));if(_0x398edb[_0xc3fe('0x41')][_0xc3fe('0x48')]){_0x11e5bf['where']=_['merge'](_0x11e5bf[_0xc3fe('0x49')],{'$or':_[_0xc3fe('0x3b')](_0x11e5bf[_0xc3fe('0x44')],function(_0x1a853d){var _0x19cf22={};_0x19cf22[_0x1a853d]={'$like':'%'+_0x398edb[_0xc3fe('0x41')][_0xc3fe('0x48')]+'%'};return _0x19cf22;})});}_0x11e5bf=_[_0xc3fe('0x4a')]({},_0x11e5bf,_0x398edb[_0xc3fe('0x4c')]);return _0x1ab9c8['getConfigurations'](_0x11e5bf);}})[_0xc3fe('0x1d')](function(_0x2630fe){if(_0x2630fe){_0x1ead09=_0x2630fe[_0xc3fe('0x46')];if(!_0x398edb['query'][_0xc3fe('0x5a')](_0xc3fe('0x5b'))){_0x11e5bf[_0xc3fe('0x2f')]=qs[_0xc3fe('0x2f')](_0x398edb[_0xc3fe('0x41')][_0xc3fe('0x2f')]);_0x11e5bf[_0xc3fe('0x2d')]=qs[_0xc3fe('0x2d')](_0x398edb[_0xc3fe('0x41')][_0xc3fe('0x2d')]);}return _0x1ab9c8[_0xc3fe('0x56')](_0x11e5bf);}})[_0xc3fe('0x1d')](function(_0x3844e4){if(_0x3844e4){return _0x3844e4?{'count':_0x1ead09,'rows':_0x3844e4}:null;}})[_0xc3fe('0x1d')](respondWithResult(_0x35f07a,null))['catch'](handleError(_0x35f07a,null));};exports['addConfiguration']=function(_0x36067f,_0x5547bf,_0x402b0b){if(_0x36067f[_0xc3fe('0x55')]['id']){delete _0x36067f['body']['id'];}return db[_0xc3fe('0x3c')]['findOne']({'where':{'id':_0x36067f[_0xc3fe('0x51')]['id']}})['then'](handleEntityNotFound(_0x5547bf,null))[_0xc3fe('0x1d')](function(_0x13f3c4){if(_0x13f3c4){_0x36067f['body'][_0xc3fe('0x5c')]=_0x13f3c4['id'];_0x36067f[_0xc3fe('0x55')][_0xc3fe('0x5d')]=integrations[_0xc3fe('0x5e')](_0x36067f['body'][_0xc3fe('0x5f')],_0x36067f['body'][_0xc3fe('0x3d')]);_0x36067f[_0xc3fe('0x55')]['Descriptions']=integrations[_0xc3fe('0x60')](_0x36067f[_0xc3fe('0x55')]['channel'],_0x36067f[_0xc3fe('0x55')][_0xc3fe('0x3d')]);return db[_0xc3fe('0x58')][_0xc3fe('0x54')](_0x36067f[_0xc3fe('0x55')],{'include':[{'model':db['FreshsalesField'],'as':_0xc3fe('0x5d')},{'model':db[_0xc3fe('0x61')],'as':_0xc3fe('0x62')}]});}return null;})['then'](respondWithResult(_0x5547bf,null))[_0xc3fe('0x28')](handleError(_0x5547bf,null));};exports['getFields']=function(_0x1658ec,_0x57b214,_0x48682c){var _0x593864='';var _0x49d355='';return db['FreshsalesAccount'][_0xc3fe('0x57')]({'where':{'id':_0x1658ec[_0xc3fe('0x51')]['id']},'attributes':['id',_0xc3fe('0x63'),_0xc3fe('0x64'),'apiKey']})['then'](handleEntityNotFound(_0x57b214,null))[_0xc3fe('0x1d')](function(_0xe221df){if(_0xe221df){_0x49d355=_0xe221df[_0xc3fe('0x63')];_0x593864=_0xe221df[_0xc3fe('0x64')];var _0x168603=_0xe221df[_0xc3fe('0x64')][_0xc3fe('0x65')](-0x1);if(_0x168603==='/'){_0x593864=_0x593864[_0xc3fe('0x66')](0x0,_0x593864[_0xc3fe('0x67')](_0x168603));}return rp({'method':'GET','uri':util[_0xc3fe('0x68')](_0xc3fe('0x69'),_0x593864,_0xc3fe('0x6a')),'headers':{'Authorization':'Token\x20token='+_0xe221df[_0xc3fe('0x6b')]},'json':!![]});}})[_0xc3fe('0x1d')](function(_0x114347){if(_0x114347){var _0x3670c1=_0x114347['users'];var _0x29268f=![];var _0x2af1c1=null;for(_0x2af1c1=0x0;_0x2af1c1<_0x3670c1['length'];_0x2af1c1++){if(_0x3670c1[_0x2af1c1]['email']===_0x49d355){_0x29268f=!![];}}if(_0x29268f){return!![];}else{throw new Error({'statusCode':0x194,'message':_0xc3fe('0x6c')});}}})['then'](respondWithResult(_0x57b214,null))[_0xc3fe('0x28')](function(_0x5b1c65){var _0x1c7c73=_0x1658ec['query'][_0xc3fe('0x6d')]?0x1f4:_0x5b1c65[_0xc3fe('0x6e')]||0x1f4;logger[_0xc3fe('0x24')](_0xc3fe('0x6f'),_0xc3fe('0x70'),_0x1c7c73,JSON['stringify'](_0x5b1c65));delete _0x5b1c65[_0xc3fe('0x39')];if(_0x1c7c73===0x191){_0x1c7c73=0x190;}_0x57b214['status'](_0x1c7c73)['send'](_0x1658ec['query']['test']?{'message':'Wrong\x20credentials','statusCode':_0x5b1c65[_0xc3fe('0x6e')]}:_0x5b1c65);});}; \ No newline at end of file +var _0xd5ec=['code','FreshsalesAccount,\x20%s,\x20%s','message','info','catch','sendStatus','status','end','json','offset','undefined','limit','count','save','update','destroy','stack','name','send','index','map','FreshsalesAccount','rawAttributes','fieldName','type','key','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','show','params','find','create','body','getConfigurations','findOne','FreshsalesConfiguration','nolimit','addConfiguration','getSubjects','Descriptions','channel','FreshsalesField','Subjects','getFields','remoteUri','apiKey','username','substring','GET','%s%s','Token\x20token=','users','email','Requested\x20Resource\x20not\x20Found','test','statusCode','getFields,\x20%s,\x20%s,\x20%s','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../components/integrations/configuration','jayson/promise','client','request','then','request\x20sent','FreshsalesAccount,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x1a98bc,_0x3e41f1){var _0x4a120c=function(_0x37b1a3){while(--_0x37b1a3){_0x1a98bc['push'](_0x1a98bc['shift']());}};_0x4a120c(++_0x3e41f1);}(_0xd5ec,0xb8));var _0xcd5e=function(_0x1af98d,_0x3c608e){_0x1af98d=_0x1af98d-0x0;var _0x3553ea=_0xd5ec[_0x1af98d];return _0x3553ea;};'use strict';var emlformat=require(_0xcd5e('0x0'));var rimraf=require(_0xcd5e('0x1'));var zipdir=require(_0xcd5e('0x2'));var jsonpatch=require(_0xcd5e('0x3'));var rp=require('request-promise');var moment=require(_0xcd5e('0x4'));var BPromise=require(_0xcd5e('0x5'));var Mustache=require(_0xcd5e('0x6'));var util=require(_0xcd5e('0x7'));var path=require(_0xcd5e('0x8'));var sox=require(_0xcd5e('0x9'));var csv=require(_0xcd5e('0xa'));var ejs=require(_0xcd5e('0xb'));var fs=require('fs');var fs_extra=require(_0xcd5e('0xc'));var _=require(_0xcd5e('0xd'));var squel=require(_0xcd5e('0xe'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0xcd5e('0xf'));var toCsv=require(_0xcd5e('0xa'));var querystring=require(_0xcd5e('0x10'));var Papa=require('papaparse');var Redis=require(_0xcd5e('0x11'));var authService=require(_0xcd5e('0x12'));var qs=require(_0xcd5e('0x13'));var as=require(_0xcd5e('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xcd5e('0x15'))('api');var utils=require(_0xcd5e('0x16'));var config=require(_0xcd5e('0x17'));var licenseUtil=require(_0xcd5e('0x18'));var db=require('../../mysqldb')['db'];var integrations=require(_0xcd5e('0x19'));var jayson=require(_0xcd5e('0x1a'));var client=jayson[_0xcd5e('0x1b')]['http']({'port':0x232a});function respondWithRpcPromise(_0x44a8b8,_0x1a933d,_0x25f0b8,_0x32f947){return new BPromise(function(_0x4203a9,_0x38b33c){var _0x5a17c8=_0x32f947||client;return _0x5a17c8[_0xcd5e('0x1c')](_0x44a8b8,_0x25f0b8)[_0xcd5e('0x1d')](function(_0x35205c){logger['info']('FreshsalesAccount,\x20%s,\x20%s',_0x1a933d,_0xcd5e('0x1e'));logger['debug'](_0xcd5e('0x1f'),_0x1a933d,_0xcd5e('0x1e'),JSON[_0xcd5e('0x20')](_0x35205c));if(_0x35205c[_0xcd5e('0x21')]){if(_0x35205c[_0xcd5e('0x21')][_0xcd5e('0x22')]===0x1f4){logger[_0xcd5e('0x21')](_0xcd5e('0x23'),_0x1a933d,_0x35205c['error'][_0xcd5e('0x24')]);return _0x38b33c(_0x35205c[_0xcd5e('0x21')]['message']);}logger[_0xcd5e('0x21')](_0xcd5e('0x23'),_0x1a933d,_0x35205c[_0xcd5e('0x21')][_0xcd5e('0x24')]);return _0x4203a9(_0x35205c['error'][_0xcd5e('0x24')]);}else{logger[_0xcd5e('0x25')](_0xcd5e('0x23'),_0x1a933d,'request\x20sent');_0x4203a9(_0x35205c['result'][_0xcd5e('0x24')]);}})[_0xcd5e('0x26')](function(_0x12b591){logger[_0xcd5e('0x21')](_0xcd5e('0x23'),_0x1a933d,_0x12b591);_0x38b33c(_0x12b591);});});}function respondWithStatusCode(_0x3f2f15,_0x109209){_0x109209=_0x109209||0xcc;return function(_0x5732b8){if(_0x5732b8){return _0x3f2f15[_0xcd5e('0x27')](_0x109209);}return _0x3f2f15[_0xcd5e('0x28')](_0x109209)[_0xcd5e('0x29')]();};}function respondWithResult(_0x1b5a89,_0x57e339){_0x57e339=_0x57e339||0xc8;return function(_0x3053cf){if(_0x3053cf){return _0x1b5a89[_0xcd5e('0x28')](_0x57e339)[_0xcd5e('0x2a')](_0x3053cf);}};}function respondWithFilteredResult(_0x4d4125,_0x8930c7){return function(_0x335758){if(_0x335758){var _0x29f929=typeof _0x8930c7[_0xcd5e('0x2b')]===_0xcd5e('0x2c')&&typeof _0x8930c7[_0xcd5e('0x2d')]==='undefined';var _0x5a4539=_0x335758[_0xcd5e('0x2e')];var _0x297f7b=_0x29f929?0x0:_0x8930c7[_0xcd5e('0x2b')];var _0x37ee24=_0x29f929?_0x335758[_0xcd5e('0x2e')]:_0x8930c7[_0xcd5e('0x2b')]+_0x8930c7[_0xcd5e('0x2d')];var _0x190ac5;if(_0x37ee24>=_0x5a4539){_0x37ee24=_0x5a4539;_0x190ac5=0xc8;}else{_0x190ac5=0xce;}_0x4d4125[_0xcd5e('0x28')](_0x190ac5);return _0x4d4125['set']('Content-Range',_0x297f7b+'-'+_0x37ee24+'/'+_0x5a4539)['json'](_0x335758);}return null;};}function patchUpdates(_0x1f03d3){return function(_0x42d092){try{jsonpatch['apply'](_0x42d092,_0x1f03d3,!![]);}catch(_0x177d7d){return BPromise['reject'](_0x177d7d);}return _0x42d092[_0xcd5e('0x2f')]();};}function saveUpdates(_0x1cacc5,_0x7cee7d){return function(_0x5be7fd){if(_0x5be7fd){return _0x5be7fd[_0xcd5e('0x30')](_0x1cacc5)[_0xcd5e('0x1d')](function(_0x2f9c40){return _0x2f9c40;});}return null;};}function removeEntity(_0x2d8d90,_0x3ecda5){return function(_0x49f356){if(_0x49f356){return _0x49f356[_0xcd5e('0x31')]()[_0xcd5e('0x1d')](function(){_0x2d8d90[_0xcd5e('0x28')](0xcc)[_0xcd5e('0x29')]();});}};}function handleEntityNotFound(_0x19f81c,_0x541be1){return function(_0xe647a6){if(!_0xe647a6){_0x19f81c[_0xcd5e('0x27')](0x194);}return _0xe647a6;};}function handleError(_0x4e84d1,_0x3af373){_0x3af373=_0x3af373||0x1f4;return function(_0x4e6de0){logger[_0xcd5e('0x21')](_0x4e6de0[_0xcd5e('0x32')]);if(_0x4e6de0[_0xcd5e('0x33')]){delete _0x4e6de0[_0xcd5e('0x33')];}_0x4e84d1[_0xcd5e('0x28')](_0x3af373)[_0xcd5e('0x34')](_0x4e6de0);};}exports[_0xcd5e('0x35')]=function(_0x498c0b,_0x22c8d0){var _0x1edab8={},_0xdf5e2a={},_0x39b7f6={'count':0x0,'rows':[]};var _0x34e3b1=_[_0xcd5e('0x36')](db[_0xcd5e('0x37')][_0xcd5e('0x38')],function(_0x2054cb){return{'name':_0x2054cb[_0xcd5e('0x39')],'type':_0x2054cb[_0xcd5e('0x3a')][_0xcd5e('0x3b')]};});_0xdf5e2a[_0xcd5e('0x3c')]=_[_0xcd5e('0x36')](_0x34e3b1,_0xcd5e('0x33'));_0xdf5e2a['query']=_[_0xcd5e('0x3d')](_0x498c0b[_0xcd5e('0x3e')]);_0xdf5e2a[_0xcd5e('0x3f')]=_[_0xcd5e('0x40')](_0xdf5e2a[_0xcd5e('0x3c')],_0xdf5e2a[_0xcd5e('0x3e')]);_0x1edab8[_0xcd5e('0x41')]=_[_0xcd5e('0x40')](_0xdf5e2a[_0xcd5e('0x3c')],qs[_0xcd5e('0x42')](_0x498c0b[_0xcd5e('0x3e')][_0xcd5e('0x42')]));_0x1edab8[_0xcd5e('0x41')]=_0x1edab8[_0xcd5e('0x41')][_0xcd5e('0x43')]?_0x1edab8['attributes']:_0xdf5e2a['model'];if(!_0x498c0b[_0xcd5e('0x3e')][_0xcd5e('0x44')]('nolimit')){_0x1edab8[_0xcd5e('0x2d')]=qs[_0xcd5e('0x2d')](_0x498c0b['query']['limit']);_0x1edab8[_0xcd5e('0x2b')]=qs[_0xcd5e('0x2b')](_0x498c0b[_0xcd5e('0x3e')][_0xcd5e('0x2b')]);}_0x1edab8['order']=qs[_0xcd5e('0x45')](_0x498c0b[_0xcd5e('0x3e')][_0xcd5e('0x45')]);_0x1edab8[_0xcd5e('0x46')]=qs[_0xcd5e('0x3f')](_[_0xcd5e('0x47')](_0x498c0b['query'],_0xdf5e2a[_0xcd5e('0x3f')]),_0x34e3b1);if(_0x498c0b[_0xcd5e('0x3e')][_0xcd5e('0x48')]){_0x1edab8[_0xcd5e('0x46')]=_[_0xcd5e('0x49')](_0x1edab8['where'],{'$or':_[_0xcd5e('0x36')](_0x34e3b1,function(_0x358aa0){if(_0x358aa0['type']!==_0xcd5e('0x4a')){var _0x37b602={};_0x37b602[_0x358aa0[_0xcd5e('0x33')]]={'$like':'%'+_0x498c0b[_0xcd5e('0x3e')][_0xcd5e('0x48')]+'%'};return _0x37b602;}})});}_0x1edab8=_[_0xcd5e('0x49')]({},_0x1edab8,_0x498c0b[_0xcd5e('0x4b')]);var _0x4968e9={'where':_0x1edab8['where']};return db[_0xcd5e('0x37')][_0xcd5e('0x2e')](_0x4968e9)['then'](function(_0xcad691){_0x39b7f6[_0xcd5e('0x2e')]=_0xcad691;if(_0x498c0b['query'][_0xcd5e('0x4c')]){_0x1edab8[_0xcd5e('0x4d')]=[{'all':!![]}];}return db[_0xcd5e('0x37')][_0xcd5e('0x4e')](_0x1edab8);})['then'](function(_0x5b73e1){_0x39b7f6[_0xcd5e('0x4f')]=_0x5b73e1;return _0x39b7f6;})[_0xcd5e('0x1d')](respondWithFilteredResult(_0x22c8d0,_0x1edab8))[_0xcd5e('0x26')](handleError(_0x22c8d0,null));};exports[_0xcd5e('0x50')]=function(_0x2c625a,_0x18f89a){var _0x1326a2={'raw':![],'where':{'id':_0x2c625a[_0xcd5e('0x51')]['id']}},_0x5ca280={};_0x5ca280[_0xcd5e('0x3c')]=_[_0xcd5e('0x3d')](db[_0xcd5e('0x37')][_0xcd5e('0x38')]);_0x5ca280[_0xcd5e('0x3e')]=_[_0xcd5e('0x3d')](_0x2c625a['query']);_0x5ca280[_0xcd5e('0x3f')]=_[_0xcd5e('0x40')](_0x5ca280[_0xcd5e('0x3c')],_0x5ca280['query']);_0x1326a2[_0xcd5e('0x41')]=_[_0xcd5e('0x40')](_0x5ca280[_0xcd5e('0x3c')],qs[_0xcd5e('0x42')](_0x2c625a[_0xcd5e('0x3e')][_0xcd5e('0x42')]));_0x1326a2[_0xcd5e('0x41')]=_0x1326a2[_0xcd5e('0x41')][_0xcd5e('0x43')]?_0x1326a2[_0xcd5e('0x41')]:_0x5ca280['model'];if(_0x2c625a[_0xcd5e('0x3e')][_0xcd5e('0x4c')]){_0x1326a2['include']=[{'all':!![]}];}_0x1326a2=_['merge']({},_0x1326a2,_0x2c625a['options']);return db[_0xcd5e('0x37')][_0xcd5e('0x52')](_0x1326a2)['then'](handleEntityNotFound(_0x18f89a,null))[_0xcd5e('0x1d')](respondWithResult(_0x18f89a,null))[_0xcd5e('0x26')](handleError(_0x18f89a,null));};exports['create']=function(_0x4a3ab0,_0x32d96a){return db['FreshsalesAccount'][_0xcd5e('0x53')](_0x4a3ab0['body'],{})[_0xcd5e('0x1d')](respondWithResult(_0x32d96a,0xc9))[_0xcd5e('0x26')](handleError(_0x32d96a,null));};exports[_0xcd5e('0x30')]=function(_0x4e5f0c,_0x3a23d5){if(_0x4e5f0c['body']['id']){delete _0x4e5f0c[_0xcd5e('0x54')]['id'];}return db['FreshsalesAccount'][_0xcd5e('0x52')]({'where':{'id':_0x4e5f0c[_0xcd5e('0x51')]['id']}})[_0xcd5e('0x1d')](handleEntityNotFound(_0x3a23d5,null))['then'](saveUpdates(_0x4e5f0c[_0xcd5e('0x54')],null))[_0xcd5e('0x1d')](respondWithResult(_0x3a23d5,null))[_0xcd5e('0x26')](handleError(_0x3a23d5,null));};exports[_0xcd5e('0x31')]=function(_0x34b75f,_0x35b193){return db[_0xcd5e('0x37')][_0xcd5e('0x52')]({'where':{'id':_0x34b75f[_0xcd5e('0x51')]['id']}})[_0xcd5e('0x1d')](handleEntityNotFound(_0x35b193,null))[_0xcd5e('0x1d')](removeEntity(_0x35b193,null))[_0xcd5e('0x26')](handleError(_0x35b193,null));};exports[_0xcd5e('0x55')]=function(_0x42c7e4,_0x455609,_0x39cc5d){var _0x46ebe4={};var _0x175a85={};var _0x5c3bfb;var _0x1bed6f;return db['FreshsalesAccount'][_0xcd5e('0x56')]({'where':{'id':_0x42c7e4[_0xcd5e('0x51')]['id']}})[_0xcd5e('0x1d')](handleEntityNotFound(_0x455609,null))['then'](function(_0x4c2246){if(_0x4c2246){_0x5c3bfb=_0x4c2246;_0x175a85[_0xcd5e('0x3c')]=_[_0xcd5e('0x3d')](db[_0xcd5e('0x57')][_0xcd5e('0x38')]);_0x175a85['query']=_['keys'](_0x42c7e4[_0xcd5e('0x3e')]);_0x175a85[_0xcd5e('0x3f')]=_[_0xcd5e('0x40')](_0x175a85[_0xcd5e('0x3c')],_0x175a85['query']);_0x46ebe4['attributes']=_['intersection'](_0x175a85[_0xcd5e('0x3c')],qs[_0xcd5e('0x42')](_0x42c7e4['query']['fields']));_0x46ebe4[_0xcd5e('0x41')]=_0x46ebe4[_0xcd5e('0x41')][_0xcd5e('0x43')]?_0x46ebe4[_0xcd5e('0x41')]:_0x175a85[_0xcd5e('0x3c')];_0x46ebe4['order']=qs[_0xcd5e('0x45')](_0x42c7e4[_0xcd5e('0x3e')][_0xcd5e('0x45')]);_0x46ebe4['where']=qs[_0xcd5e('0x3f')](_[_0xcd5e('0x47')](_0x42c7e4[_0xcd5e('0x3e')],_0x175a85[_0xcd5e('0x3f')]));if(_0x42c7e4['query'][_0xcd5e('0x48')]){_0x46ebe4['where']=_[_0xcd5e('0x49')](_0x46ebe4[_0xcd5e('0x46')],{'$or':_[_0xcd5e('0x36')](_0x46ebe4[_0xcd5e('0x41')],function(_0x460318){var _0x278235={};_0x278235[_0x460318]={'$like':'%'+_0x42c7e4['query'][_0xcd5e('0x48')]+'%'};return _0x278235;})});}_0x46ebe4=_[_0xcd5e('0x49')]({},_0x46ebe4,_0x42c7e4[_0xcd5e('0x4b')]);return _0x5c3bfb[_0xcd5e('0x55')](_0x46ebe4);}})[_0xcd5e('0x1d')](function(_0x523d38){if(_0x523d38){_0x1bed6f=_0x523d38['length'];if(!_0x42c7e4[_0xcd5e('0x3e')][_0xcd5e('0x44')](_0xcd5e('0x58'))){_0x46ebe4[_0xcd5e('0x2d')]=qs[_0xcd5e('0x2d')](_0x42c7e4[_0xcd5e('0x3e')]['limit']);_0x46ebe4[_0xcd5e('0x2b')]=qs[_0xcd5e('0x2b')](_0x42c7e4[_0xcd5e('0x3e')][_0xcd5e('0x2b')]);}return _0x5c3bfb['getConfigurations'](_0x46ebe4);}})[_0xcd5e('0x1d')](function(_0x744428){if(_0x744428){return _0x744428?{'count':_0x1bed6f,'rows':_0x744428}:null;}})[_0xcd5e('0x1d')](respondWithResult(_0x455609,null))['catch'](handleError(_0x455609,null));};exports[_0xcd5e('0x59')]=function(_0x1396ba,_0x7695d0,_0x4d03f6){if(_0x1396ba[_0xcd5e('0x54')]['id']){delete _0x1396ba['body']['id'];}return db[_0xcd5e('0x37')][_0xcd5e('0x56')]({'where':{'id':_0x1396ba[_0xcd5e('0x51')]['id']}})[_0xcd5e('0x1d')](handleEntityNotFound(_0x7695d0,null))[_0xcd5e('0x1d')](function(_0x346129){if(_0x346129){_0x1396ba[_0xcd5e('0x54')]['AccountId']=_0x346129['id'];_0x1396ba[_0xcd5e('0x54')]['Subjects']=integrations[_0xcd5e('0x5a')](_0x1396ba[_0xcd5e('0x54')]['channel'],_0x1396ba[_0xcd5e('0x54')][_0xcd5e('0x3a')]);_0x1396ba[_0xcd5e('0x54')][_0xcd5e('0x5b')]=integrations['getDescriptions'](_0x1396ba[_0xcd5e('0x54')][_0xcd5e('0x5c')],_0x1396ba[_0xcd5e('0x54')][_0xcd5e('0x3a')]);return db[_0xcd5e('0x57')][_0xcd5e('0x53')](_0x1396ba['body'],{'include':[{'model':db[_0xcd5e('0x5d')],'as':_0xcd5e('0x5e')},{'model':db[_0xcd5e('0x5d')],'as':_0xcd5e('0x5b')}]});}return null;})[_0xcd5e('0x1d')](respondWithResult(_0x7695d0,null))[_0xcd5e('0x26')](handleError(_0x7695d0,null));};exports[_0xcd5e('0x5f')]=function(_0x180f65,_0x9825aa,_0x232ea5){var _0x289392='';var _0x1c50fc='';return db['FreshsalesAccount'][_0xcd5e('0x56')]({'where':{'id':_0x180f65[_0xcd5e('0x51')]['id']},'attributes':['id','username',_0xcd5e('0x60'),_0xcd5e('0x61')]})[_0xcd5e('0x1d')](handleEntityNotFound(_0x9825aa,null))['then'](function(_0x2ead5e){if(_0x2ead5e){_0x1c50fc=_0x2ead5e[_0xcd5e('0x62')];_0x289392=_0x2ead5e[_0xcd5e('0x60')];var _0x262ac3=_0x2ead5e[_0xcd5e('0x60')]['slice'](-0x1);if(_0x262ac3==='/'){_0x289392=_0x289392[_0xcd5e('0x63')](0x0,_0x289392['lastIndexOf'](_0x262ac3));}return rp({'method':_0xcd5e('0x64'),'uri':util['format'](_0xcd5e('0x65'),_0x289392,'/api/selector/owners'),'headers':{'Authorization':_0xcd5e('0x66')+_0x2ead5e['apiKey']},'json':!![]});}})['then'](function(_0x46a555){if(_0x46a555){var _0x5e5de5=_0x46a555[_0xcd5e('0x67')];var _0x3d2592=![];var _0xe4fa83=null;for(_0xe4fa83=0x0;_0xe4fa83<_0x5e5de5['length'];_0xe4fa83++){if(_0x5e5de5[_0xe4fa83][_0xcd5e('0x68')]===_0x1c50fc){_0x3d2592=!![];}}if(_0x3d2592){return!![];}else{throw new Error({'statusCode':0x194,'message':_0xcd5e('0x69')});}}})['then'](respondWithResult(_0x9825aa,null))[_0xcd5e('0x26')](function(_0x50b54d){var _0xdd197b=_0x180f65[_0xcd5e('0x3e')][_0xcd5e('0x6a')]?0x1f4:_0x50b54d[_0xcd5e('0x6b')]||0x1f4;logger[_0xcd5e('0x21')](_0xcd5e('0x6c'),'getFields',_0xdd197b,JSON['stringify'](_0x50b54d));delete _0x50b54d[_0xcd5e('0x33')];if(_0xdd197b===0x191){_0xdd197b=0x190;}_0x9825aa[_0xcd5e('0x28')](_0xdd197b)[_0xcd5e('0x34')](_0x180f65[_0xcd5e('0x3e')][_0xcd5e('0x6a')]?{'message':'Wrong\x20credentials','statusCode':_0x50b54d[_0xcd5e('0x6b')]}:_0x50b54d);});}; \ No newline at end of file diff --git a/server/api/intFreshsalesAccount/intFreshsalesAccount.model.js b/server/api/intFreshsalesAccount/intFreshsalesAccount.model.js index 803c52a..2b13f48 100644 --- a/server/api/intFreshsalesAccount/intFreshsalesAccount.model.js +++ b/server/api/intFreshsalesAccount/intFreshsalesAccount.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xdf55=['int_freshsales_accounts','lodash','util','api','moment','request-promise','path','rimraf','./intFreshsalesAccount.attributes','../../components/integrations/configuration','exports','define','FreshsalesAccount'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xdf55,0x83));var _0x5df5=function(_0x2b0f81,_0x3917f0){_0x2b0f81=_0x2b0f81-0x0;var _0x5ce74c=_0xdf55[_0x2b0f81];return _0x5ce74c;};'use strict';var _=require(_0x5df5('0x0'));var util=require(_0x5df5('0x1'));var logger=require('../../config/logger')(_0x5df5('0x2'));var moment=require(_0x5df5('0x3'));var BPromise=require('bluebird');var rp=require(_0x5df5('0x4'));var fs=require('fs');var path=require(_0x5df5('0x5'));var rimraf=require(_0x5df5('0x6'));var config=require('../../config/environment');var attributes=require(_0x5df5('0x7'));var integrations=require(_0x5df5('0x8'));module[_0x5df5('0x9')]=function(_0x476e21,_0x9b8756){return _0x476e21[_0x5df5('0xa')](_0x5df5('0xb'),attributes,{'tableName':_0x5df5('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xe3da=['moment','bluebird','request-promise','path','rimraf','../../config/environment','./intFreshsalesAccount.attributes','../../components/integrations/configuration','exports','define','int_freshsales_accounts','lodash','util','../../config/logger','api'];(function(_0x1e20f4,_0x103413){var _0x7d34cd=function(_0x51f50f){while(--_0x51f50f){_0x1e20f4['push'](_0x1e20f4['shift']());}};_0x7d34cd(++_0x103413);}(_0xe3da,0x1cd));var _0xae3d=function(_0x42cae2,_0x284ef8){_0x42cae2=_0x42cae2-0x0;var _0x5f256f=_0xe3da[_0x42cae2];return _0x5f256f;};'use strict';var _=require(_0xae3d('0x0'));var util=require(_0xae3d('0x1'));var logger=require(_0xae3d('0x2'))(_0xae3d('0x3'));var moment=require(_0xae3d('0x4'));var BPromise=require(_0xae3d('0x5'));var rp=require(_0xae3d('0x6'));var fs=require('fs');var path=require(_0xae3d('0x7'));var rimraf=require(_0xae3d('0x8'));var config=require(_0xae3d('0x9'));var attributes=require(_0xae3d('0xa'));var integrations=require(_0xae3d('0xb'));module[_0xae3d('0xc')]=function(_0xa54808,_0x476579){return _0xa54808[_0xae3d('0xd')]('FreshsalesAccount',attributes,{'tableName':_0xae3d('0xe'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intFreshsalesAccount/intFreshsalesAccount.rpc.js b/server/api/intFreshsalesAccount/intFreshsalesAccount.rpc.js index 93f1ff4..d711ecf 100644 --- a/server/api/intFreshsalesAccount/intFreshsalesAccount.rpc.js +++ b/server/api/intFreshsalesAccount/intFreshsalesAccount.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc1c6=['then','FreshsalesAccount,\x20%s,\x20%s','request\x20sent','debug','FreshsalesAccount,\x20%s,\x20%s,\x20%s','stringify','error','message','info','catch','findAll','options','raw','where','attributes','limit','include','map','model','GetFreshsalesAccount','FreshsalesAccount','find','ShowFreshsalesAccount','lodash','util','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','http'];(function(_0x3a4cb4,_0x3842df){var _0x48d95f=function(_0x10ba6c){while(--_0x10ba6c){_0x3a4cb4['push'](_0x3a4cb4['shift']());}};_0x48d95f(++_0x3842df);}(_0xc1c6,0xf7));var _0x6c1c=function(_0x3fba4f,_0x172f0b){_0x3fba4f=_0x3fba4f-0x0;var _0x1148d5=_0xc1c6[_0x3fba4f];return _0x1148d5;};'use strict';var _=require(_0x6c1c('0x0'));var util=require(_0x6c1c('0x1'));var moment=require(_0x6c1c('0x2'));var BPromise=require('bluebird');var rs=require(_0x6c1c('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x6c1c('0x4'))['db'];var utils=require(_0x6c1c('0x5'));var logger=require(_0x6c1c('0x6'))('rpc');var config=require('../../config/environment');var jayson=require(_0x6c1c('0x7'));var client=jayson['client'][_0x6c1c('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x582bec,_0xe510ca,_0x2eb1ba){return new BPromise(function(_0x38369d,_0x2cec58){return client['request'](_0x582bec,_0x2eb1ba)[_0x6c1c('0x9')](function(_0x3ca985){logger['info'](_0x6c1c('0xa'),_0xe510ca,_0x6c1c('0xb'));logger[_0x6c1c('0xc')](_0x6c1c('0xd'),_0xe510ca,'request\x20sent',JSON[_0x6c1c('0xe')](_0x3ca985));if(_0x3ca985[_0x6c1c('0xf')]){if(_0x3ca985[_0x6c1c('0xf')]['code']===0x1f4){logger[_0x6c1c('0xf')](_0x6c1c('0xa'),_0xe510ca,_0x3ca985[_0x6c1c('0xf')]['message']);return _0x2cec58(_0x3ca985[_0x6c1c('0xf')]['message']);}logger[_0x6c1c('0xf')](_0x6c1c('0xa'),_0xe510ca,_0x3ca985[_0x6c1c('0xf')][_0x6c1c('0x10')]);return _0x38369d(_0x3ca985[_0x6c1c('0xf')][_0x6c1c('0x10')]);}else{logger[_0x6c1c('0x11')](_0x6c1c('0xa'),_0xe510ca,_0x6c1c('0xb'));_0x38369d(_0x3ca985['result'][_0x6c1c('0x10')]);}})[_0x6c1c('0x12')](function(_0x5214ee){logger[_0x6c1c('0xf')](_0x6c1c('0xa'),_0xe510ca,_0x5214ee);_0x2cec58(_0x5214ee);});});}exports['GetFreshsalesAccount']=function(_0x137770){var _0x4ede06=this;return new Promise(function(_0x338dc2,_0x1a0ab9){return db['FreshsalesAccount'][_0x6c1c('0x13')]({'raw':_0x137770['options']?_0x137770[_0x6c1c('0x14')][_0x6c1c('0x15')]===undefined?!![]:![]:!![],'where':_0x137770[_0x6c1c('0x14')]?_0x137770[_0x6c1c('0x14')][_0x6c1c('0x16')]||null:null,'attributes':_0x137770[_0x6c1c('0x14')]?_0x137770[_0x6c1c('0x14')][_0x6c1c('0x17')]||null:null,'limit':_0x137770[_0x6c1c('0x14')]?_0x137770[_0x6c1c('0x14')][_0x6c1c('0x18')]||null:null,'include':_0x137770[_0x6c1c('0x14')]?_0x137770[_0x6c1c('0x14')][_0x6c1c('0x19')]?_[_0x6c1c('0x1a')](_0x137770[_0x6c1c('0x14')][_0x6c1c('0x19')],function(_0x12c638){return{'model':db[_0x12c638[_0x6c1c('0x1b')]],'as':_0x12c638['as'],'attributes':_0x12c638[_0x6c1c('0x17')],'include':_0x12c638[_0x6c1c('0x19')]?_[_0x6c1c('0x1a')](_0x12c638[_0x6c1c('0x19')],function(_0x7ff10d){return{'model':db[_0x7ff10d[_0x6c1c('0x1b')]],'as':_0x7ff10d['as'],'attributes':_0x7ff10d[_0x6c1c('0x17')],'include':_0x7ff10d[_0x6c1c('0x19')]?_[_0x6c1c('0x1a')](_0x7ff10d[_0x6c1c('0x19')],function(_0x5f4568){return{'model':db[_0x5f4568[_0x6c1c('0x1b')]],'as':_0x5f4568['as'],'attributes':_0x5f4568['attributes']};}):[]};}):[]};}):[]:[]})[_0x6c1c('0x9')](function(_0x4c23f8){logger[_0x6c1c('0x11')]('GetFreshsalesAccount',_0x137770);logger[_0x6c1c('0xc')](_0x6c1c('0x1c'),_0x137770,JSON['stringify'](_0x4c23f8));_0x338dc2(_0x4c23f8);})[_0x6c1c('0x12')](function(_0x24da4c){logger['error'](_0x6c1c('0x1c'),_0x24da4c[_0x6c1c('0x10')],_0x137770);_0x1a0ab9(_0x4ede06[_0x6c1c('0xf')](0x1f4,_0x24da4c[_0x6c1c('0x10')]));});});};exports['ShowFreshsalesAccount']=function(_0x52c036){var _0x3cba17=this;return new Promise(function(_0x45128c,_0x21acef){return db[_0x6c1c('0x1d')][_0x6c1c('0x1e')]({'raw':_0x52c036[_0x6c1c('0x14')]?_0x52c036['options'][_0x6c1c('0x15')]===undefined?!![]:![]:!![],'where':_0x52c036[_0x6c1c('0x14')]?_0x52c036['options'][_0x6c1c('0x16')]||null:null,'attributes':_0x52c036[_0x6c1c('0x14')]?_0x52c036[_0x6c1c('0x14')][_0x6c1c('0x17')]||null:null,'include':_0x52c036['options']?_0x52c036[_0x6c1c('0x14')][_0x6c1c('0x19')]?_[_0x6c1c('0x1a')](_0x52c036['options'][_0x6c1c('0x19')],function(_0x4e5767){return{'model':db[_0x4e5767[_0x6c1c('0x1b')]],'as':_0x4e5767['as'],'attributes':_0x4e5767['attributes'],'include':_0x4e5767[_0x6c1c('0x19')]?_[_0x6c1c('0x1a')](_0x4e5767[_0x6c1c('0x19')],function(_0x54b8d3){return{'model':db[_0x54b8d3['model']],'as':_0x54b8d3['as'],'attributes':_0x54b8d3[_0x6c1c('0x17')],'include':_0x54b8d3[_0x6c1c('0x19')]?_[_0x6c1c('0x1a')](_0x54b8d3['include'],function(_0x1a9132){return{'model':db[_0x1a9132['model']],'as':_0x1a9132['as'],'attributes':_0x1a9132['attributes']};}):[]};}):[]};}):[]:[]})[_0x6c1c('0x9')](function(_0xbafcb3){logger[_0x6c1c('0x11')](_0x6c1c('0x1f'),_0x52c036);logger['debug'](_0x6c1c('0x1f'),_0x52c036,JSON[_0x6c1c('0xe')](_0xbafcb3));_0x45128c(_0xbafcb3);})[_0x6c1c('0x12')](function(_0x18da02){logger[_0x6c1c('0xf')](_0x6c1c('0x1f'),_0x18da02[_0x6c1c('0x10')],_0x52c036);_0x21acef(_0x3cba17[_0x6c1c('0xf')](0x1f4,_0x18da02[_0x6c1c('0x10')]));});});}; \ No newline at end of file +var _0x6455=['moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','info','FreshsalesAccount,\x20%s,\x20%s','request\x20sent','FreshsalesAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','findAll','raw','options','attributes','limit','include','map','model','GetFreshsalesAccount','debug','catch','FreshsalesAccount','find','where','ShowFreshsalesAccount','lodash'];(function(_0x5170ed,_0x32233e){var _0x2af40c=function(_0x4a25b3){while(--_0x4a25b3){_0x5170ed['push'](_0x5170ed['shift']());}};_0x2af40c(++_0x32233e);}(_0x6455,0x97));var _0x5645=function(_0x142a30,_0x261935){_0x142a30=_0x142a30-0x0;var _0x25662e=_0x6455[_0x142a30];return _0x25662e;};'use strict';var _=require(_0x5645('0x0'));var util=require('util');var moment=require(_0x5645('0x1'));var BPromise=require(_0x5645('0x2'));var rs=require(_0x5645('0x3'));var fs=require('fs');var Redis=require(_0x5645('0x4'));var db=require(_0x5645('0x5'))['db'];var utils=require(_0x5645('0x6'));var logger=require('../../config/logger')(_0x5645('0x7'));var config=require(_0x5645('0x8'));var jayson=require(_0x5645('0x9'));var client=jayson[_0x5645('0xa')][_0x5645('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x37d672,_0xa14a06,_0x278d86){return new BPromise(function(_0x518a28,_0x5f4037){return client[_0x5645('0xc')](_0x37d672,_0x278d86)[_0x5645('0xd')](function(_0x38c07a){logger[_0x5645('0xe')](_0x5645('0xf'),_0xa14a06,_0x5645('0x10'));logger['debug'](_0x5645('0x11'),_0xa14a06,_0x5645('0x10'),JSON[_0x5645('0x12')](_0x38c07a));if(_0x38c07a[_0x5645('0x13')]){if(_0x38c07a['error'][_0x5645('0x14')]===0x1f4){logger['error'](_0x5645('0xf'),_0xa14a06,_0x38c07a[_0x5645('0x13')][_0x5645('0x15')]);return _0x5f4037(_0x38c07a[_0x5645('0x13')][_0x5645('0x15')]);}logger[_0x5645('0x13')](_0x5645('0xf'),_0xa14a06,_0x38c07a[_0x5645('0x13')]['message']);return _0x518a28(_0x38c07a[_0x5645('0x13')][_0x5645('0x15')]);}else{logger[_0x5645('0xe')]('FreshsalesAccount,\x20%s,\x20%s',_0xa14a06,'request\x20sent');_0x518a28(_0x38c07a[_0x5645('0x16')][_0x5645('0x15')]);}})['catch'](function(_0x35e0c7){logger[_0x5645('0x13')](_0x5645('0xf'),_0xa14a06,_0x35e0c7);_0x5f4037(_0x35e0c7);});});}exports['GetFreshsalesAccount']=function(_0x35bc6f){var _0x1d519d=this;return new Promise(function(_0x22a6cf,_0x102c19){return db['FreshsalesAccount'][_0x5645('0x17')]({'raw':_0x35bc6f['options']?_0x35bc6f['options'][_0x5645('0x18')]===undefined?!![]:![]:!![],'where':_0x35bc6f[_0x5645('0x19')]?_0x35bc6f[_0x5645('0x19')]['where']||null:null,'attributes':_0x35bc6f[_0x5645('0x19')]?_0x35bc6f['options'][_0x5645('0x1a')]||null:null,'limit':_0x35bc6f['options']?_0x35bc6f['options'][_0x5645('0x1b')]||null:null,'include':_0x35bc6f['options']?_0x35bc6f[_0x5645('0x19')][_0x5645('0x1c')]?_['map'](_0x35bc6f[_0x5645('0x19')][_0x5645('0x1c')],function(_0xe83ed7){return{'model':db[_0xe83ed7['model']],'as':_0xe83ed7['as'],'attributes':_0xe83ed7[_0x5645('0x1a')],'include':_0xe83ed7[_0x5645('0x1c')]?_[_0x5645('0x1d')](_0xe83ed7[_0x5645('0x1c')],function(_0x568fd6){return{'model':db[_0x568fd6['model']],'as':_0x568fd6['as'],'attributes':_0x568fd6['attributes'],'include':_0x568fd6['include']?_[_0x5645('0x1d')](_0x568fd6['include'],function(_0x47d097){return{'model':db[_0x47d097[_0x5645('0x1e')]],'as':_0x47d097['as'],'attributes':_0x47d097[_0x5645('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x5645('0xd')](function(_0x308991){logger[_0x5645('0xe')](_0x5645('0x1f'),_0x35bc6f);logger[_0x5645('0x20')](_0x5645('0x1f'),_0x35bc6f,JSON[_0x5645('0x12')](_0x308991));_0x22a6cf(_0x308991);})[_0x5645('0x21')](function(_0x1c0aa2){logger[_0x5645('0x13')](_0x5645('0x1f'),_0x1c0aa2[_0x5645('0x15')],_0x35bc6f);_0x102c19(_0x1d519d['error'](0x1f4,_0x1c0aa2[_0x5645('0x15')]));});});};exports['ShowFreshsalesAccount']=function(_0x12aea2){var _0x31c31b=this;return new Promise(function(_0x40f716,_0x43d514){return db[_0x5645('0x22')][_0x5645('0x23')]({'raw':_0x12aea2['options']?_0x12aea2['options'][_0x5645('0x18')]===undefined?!![]:![]:!![],'where':_0x12aea2[_0x5645('0x19')]?_0x12aea2[_0x5645('0x19')][_0x5645('0x24')]||null:null,'attributes':_0x12aea2[_0x5645('0x19')]?_0x12aea2[_0x5645('0x19')][_0x5645('0x1a')]||null:null,'include':_0x12aea2[_0x5645('0x19')]?_0x12aea2[_0x5645('0x19')][_0x5645('0x1c')]?_[_0x5645('0x1d')](_0x12aea2['options']['include'],function(_0xe01db0){return{'model':db[_0xe01db0['model']],'as':_0xe01db0['as'],'attributes':_0xe01db0[_0x5645('0x1a')],'include':_0xe01db0['include']?_[_0x5645('0x1d')](_0xe01db0['include'],function(_0x2e3dfb){return{'model':db[_0x2e3dfb[_0x5645('0x1e')]],'as':_0x2e3dfb['as'],'attributes':_0x2e3dfb[_0x5645('0x1a')],'include':_0x2e3dfb[_0x5645('0x1c')]?_[_0x5645('0x1d')](_0x2e3dfb[_0x5645('0x1c')],function(_0x57fe61){return{'model':db[_0x57fe61[_0x5645('0x1e')]],'as':_0x57fe61['as'],'attributes':_0x57fe61[_0x5645('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x5645('0xd')](function(_0x1f6c2f){logger[_0x5645('0xe')](_0x5645('0x25'),_0x12aea2);logger[_0x5645('0x20')](_0x5645('0x25'),_0x12aea2,JSON['stringify'](_0x1f6c2f));_0x40f716(_0x1f6c2f);})[_0x5645('0x21')](function(_0x48844f){logger[_0x5645('0x13')](_0x5645('0x25'),_0x48844f[_0x5645('0x15')],_0x12aea2);_0x43d514(_0x31c31b[_0x5645('0x13')](0x1f4,_0x48844f[_0x5645('0x15')]));});});}; \ No newline at end of file diff --git a/server/api/intFreshsalesConfiguration/index.js b/server/api/intFreshsalesConfiguration/index.js index eebd930..47994d4 100644 --- a/server/api/intFreshsalesConfiguration/index.js +++ b/server/api/intFreshsalesConfiguration/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf539=['util','path','express','Router','fs-extra','../../components/auth/service','../../config/environment','./intFreshsalesConfiguration.controller','get','isAuthenticated','index','/:id','show','/:id/subjects','getSubjects','getDescriptions','/:id/fields','getFields','post','create','update','delete','destroy','exports','multer'];(function(_0x3e70bf,_0x456d91){var _0x2de5ca=function(_0xb63413){while(--_0xb63413){_0x3e70bf['push'](_0x3e70bf['shift']());}};_0x2de5ca(++_0x456d91);}(_0xf539,0x144));var _0x9f53=function(_0x172157,_0x30b00d){_0x172157=_0x172157-0x0;var _0x553bb6=_0xf539[_0x172157];return _0x553bb6;};'use strict';var multer=require(_0x9f53('0x0'));var util=require(_0x9f53('0x1'));var path=require(_0x9f53('0x2'));var timeout=require('connect-timeout');var express=require(_0x9f53('0x3'));var router=express[_0x9f53('0x4')]();var fs_extra=require(_0x9f53('0x5'));var auth=require(_0x9f53('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x9f53('0x7'));var controller=require(_0x9f53('0x8'));router[_0x9f53('0x9')]('/',auth[_0x9f53('0xa')](),controller[_0x9f53('0xb')]);router[_0x9f53('0x9')](_0x9f53('0xc'),auth['isAuthenticated'](),controller[_0x9f53('0xd')]);router[_0x9f53('0x9')](_0x9f53('0xe'),auth[_0x9f53('0xa')](),controller[_0x9f53('0xf')]);router[_0x9f53('0x9')]('/:id/descriptions',auth['isAuthenticated'](),controller[_0x9f53('0x10')]);router[_0x9f53('0x9')](_0x9f53('0x11'),auth[_0x9f53('0xa')](),controller[_0x9f53('0x12')]);router[_0x9f53('0x13')]('/',auth[_0x9f53('0xa')](),controller[_0x9f53('0x14')]);router['put'](_0x9f53('0xc'),auth[_0x9f53('0xa')](),controller[_0x9f53('0x15')]);router[_0x9f53('0x16')](_0x9f53('0xc'),auth[_0x9f53('0xa')](),controller[_0x9f53('0x17')]);module[_0x9f53('0x18')]=router; \ No newline at end of file +var _0xeca5=['../../config/environment','./intFreshsalesConfiguration.controller','get','isAuthenticated','index','show','/:id/subjects','getSubjects','/:id/descriptions','getDescriptions','/:id/fields','getFields','post','create','/:id','update','delete','destroy','exports','multer','util','path','connect-timeout','fs-extra','../../components/interaction/service'];(function(_0x5c89f6,_0x54d349){var _0x2bb6e2=function(_0x5a6bf2){while(--_0x5a6bf2){_0x5c89f6['push'](_0x5c89f6['shift']());}};_0x2bb6e2(++_0x54d349);}(_0xeca5,0x13f));var _0x5eca=function(_0x5209d2,_0xe5af07){_0x5209d2=_0x5209d2-0x0;var _0x3da3e2=_0xeca5[_0x5209d2];return _0x3da3e2;};'use strict';var multer=require(_0x5eca('0x0'));var util=require(_0x5eca('0x1'));var path=require(_0x5eca('0x2'));var timeout=require(_0x5eca('0x3'));var express=require('express');var router=express['Router']();var fs_extra=require(_0x5eca('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x5eca('0x5'));var config=require(_0x5eca('0x6'));var controller=require(_0x5eca('0x7'));router[_0x5eca('0x8')]('/',auth[_0x5eca('0x9')](),controller[_0x5eca('0xa')]);router[_0x5eca('0x8')]('/:id',auth[_0x5eca('0x9')](),controller[_0x5eca('0xb')]);router['get'](_0x5eca('0xc'),auth[_0x5eca('0x9')](),controller[_0x5eca('0xd')]);router[_0x5eca('0x8')](_0x5eca('0xe'),auth['isAuthenticated'](),controller[_0x5eca('0xf')]);router['get'](_0x5eca('0x10'),auth[_0x5eca('0x9')](),controller[_0x5eca('0x11')]);router[_0x5eca('0x12')]('/',auth[_0x5eca('0x9')](),controller[_0x5eca('0x13')]);router['put'](_0x5eca('0x14'),auth[_0x5eca('0x9')](),controller[_0x5eca('0x15')]);router[_0x5eca('0x16')]('/:id',auth[_0x5eca('0x9')](),controller[_0x5eca('0x17')]);module[_0x5eca('0x18')]=router; \ No newline at end of file diff --git a/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.attributes.js b/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.attributes.js index b945ae7..1f57e84 100644 --- a/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.attributes.js +++ b/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xefa0=['STRING','exports'];(function(_0x1e4def,_0x111a8d){var _0x1ba65e=function(_0x4271ed){while(--_0x4271ed){_0x1e4def['push'](_0x1e4def['shift']());}};_0x1ba65e(++_0x111a8d);}(_0xefa0,0x1f3));var _0x0efa=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xefa0[_0x321bb2];return _0x9c12ed;};'use strict';var Sequelize=require('sequelize');module[_0x0efa('0x0')]={'name':{'type':Sequelize[_0x0efa('0x1')]},'description':{'type':Sequelize[_0x0efa('0x1')]}}; \ No newline at end of file +var _0x0908=['STRING'];(function(_0x263a74,_0xc31414){var _0x2aa86c=function(_0x382896){while(--_0x382896){_0x263a74['push'](_0x263a74['shift']());}};_0x2aa86c(++_0xc31414);}(_0x0908,0x1b3));var _0x8090=function(_0x3310c3,_0x4ad23e){_0x3310c3=_0x3310c3-0x0;var _0x2c8be8=_0x0908[_0x3310c3];return _0x2c8be8;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0x8090('0x0')]},'description':{'type':Sequelize[_0x8090('0x0')]}}; \ No newline at end of file diff --git a/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.controller.js b/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.controller.js index af2429a..7d16fcd 100644 --- a/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.controller.js +++ b/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8fb9=['includeAll','include','findAll','catch','show','options','find','create','body','findOne','params','FreshsalesField','getSubjects','getDescriptions','getFields','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','fs-extra','lodash','squel','crypto','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/license/util','../../mysqldb','jayson/promise','http','request','then','info','FreshsalesConfiguration,\x20%s,\x20%s','debug','FreshsalesConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','request\x20sent','result','end','json','offset','count','limit','status','Content-Range','reject','save','update','destroy','sendStatus','stack','send','index','map','rawAttributes','type','key','model','name','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','FreshsalesConfiguration'];(function(_0x38e730,_0x2e63b6){var _0x29b82e=function(_0x7ab722){while(--_0x7ab722){_0x38e730['push'](_0x38e730['shift']());}};_0x29b82e(++_0x2e63b6);}(_0x8fb9,0xc3));var _0x98fb=function(_0x1e2321,_0x3ae1c5){_0x1e2321=_0x1e2321-0x0;var _0x1d346d=_0x8fb9[_0x1e2321];return _0x1d346d;};'use strict';var emlformat=require(_0x98fb('0x0'));var rimraf=require(_0x98fb('0x1'));var zipdir=require(_0x98fb('0x2'));var jsonpatch=require(_0x98fb('0x3'));var rp=require(_0x98fb('0x4'));var moment=require(_0x98fb('0x5'));var BPromise=require(_0x98fb('0x6'));var Mustache=require(_0x98fb('0x7'));var util=require(_0x98fb('0x8'));var path=require('path');var sox=require(_0x98fb('0x9'));var csv=require(_0x98fb('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x98fb('0xb'));var _=require(_0x98fb('0xc'));var squel=require(_0x98fb('0xd'));var crypto=require(_0x98fb('0xe'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x98fb('0xa'));var querystring=require(_0x98fb('0xf'));var Papa=require(_0x98fb('0x10'));var Redis=require(_0x98fb('0x11'));var authService=require(_0x98fb('0x12'));var qs=require(_0x98fb('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x98fb('0x14'));var logger=require('../../config/logger')(_0x98fb('0x15'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x98fb('0x16'));var db=require(_0x98fb('0x17'))['db'];var jayson=require(_0x98fb('0x18'));var client=jayson['client'][_0x98fb('0x19')]({'port':0x232a});function respondWithRpcPromise(_0x399c9,_0x3f433d,_0x4a8a52,_0x3ba9b0){return new BPromise(function(_0x2047a3,_0x510a28){var _0x14cebe=_0x3ba9b0||client;return _0x14cebe[_0x98fb('0x1a')](_0x399c9,_0x4a8a52)[_0x98fb('0x1b')](function(_0x14ba58){logger[_0x98fb('0x1c')](_0x98fb('0x1d'),_0x3f433d,'request\x20sent');logger[_0x98fb('0x1e')](_0x98fb('0x1f'),_0x3f433d,'request\x20sent',JSON[_0x98fb('0x20')](_0x14ba58));if(_0x14ba58[_0x98fb('0x21')]){if(_0x14ba58[_0x98fb('0x21')][_0x98fb('0x22')]===0x1f4){logger[_0x98fb('0x21')](_0x98fb('0x1d'),_0x3f433d,_0x14ba58[_0x98fb('0x21')][_0x98fb('0x23')]);return _0x510a28(_0x14ba58[_0x98fb('0x21')][_0x98fb('0x23')]);}logger[_0x98fb('0x21')](_0x98fb('0x1d'),_0x3f433d,_0x14ba58[_0x98fb('0x21')]['message']);return _0x2047a3(_0x14ba58[_0x98fb('0x21')][_0x98fb('0x23')]);}else{logger['info'](_0x98fb('0x1d'),_0x3f433d,_0x98fb('0x24'));_0x2047a3(_0x14ba58[_0x98fb('0x25')][_0x98fb('0x23')]);}})['catch'](function(_0x49730e){logger[_0x98fb('0x21')]('FreshsalesConfiguration,\x20%s,\x20%s',_0x3f433d,_0x49730e);_0x510a28(_0x49730e);});});}function respondWithStatusCode(_0x147ea0,_0x329754){_0x329754=_0x329754||0xcc;return function(_0x473ae1){if(_0x473ae1){return _0x147ea0['sendStatus'](_0x329754);}return _0x147ea0['status'](_0x329754)[_0x98fb('0x26')]();};}function respondWithResult(_0x3e1c67,_0x59a154){_0x59a154=_0x59a154||0xc8;return function(_0x5e511f){if(_0x5e511f){return _0x3e1c67['status'](_0x59a154)[_0x98fb('0x27')](_0x5e511f);}};}function respondWithFilteredResult(_0x530461,_0x4759d9){return function(_0x27112a){if(_0x27112a){var _0x14568c=typeof _0x4759d9[_0x98fb('0x28')]==='undefined'&&typeof _0x4759d9['limit']==='undefined';var _0x7825b5=_0x27112a[_0x98fb('0x29')];var _0x127b2e=_0x14568c?0x0:_0x4759d9[_0x98fb('0x28')];var _0x589cbf=_0x14568c?_0x27112a[_0x98fb('0x29')]:_0x4759d9[_0x98fb('0x28')]+_0x4759d9[_0x98fb('0x2a')];var _0x48d03a;if(_0x589cbf>=_0x7825b5){_0x589cbf=_0x7825b5;_0x48d03a=0xc8;}else{_0x48d03a=0xce;}_0x530461[_0x98fb('0x2b')](_0x48d03a);return _0x530461['set'](_0x98fb('0x2c'),_0x127b2e+'-'+_0x589cbf+'/'+_0x7825b5)[_0x98fb('0x27')](_0x27112a);}return null;};}function patchUpdates(_0x326cab){return function(_0x4a808b){try{jsonpatch['apply'](_0x4a808b,_0x326cab,!![]);}catch(_0x51bd2a){return BPromise[_0x98fb('0x2d')](_0x51bd2a);}return _0x4a808b[_0x98fb('0x2e')]();};}function saveUpdates(_0x2ba237,_0xbee3dd){return function(_0x453bd8){if(_0x453bd8){return _0x453bd8[_0x98fb('0x2f')](_0x2ba237)[_0x98fb('0x1b')](function(_0x13af8f){return _0x13af8f;});}return null;};}function removeEntity(_0x5d76e9,_0x22446f){return function(_0x9a2141){if(_0x9a2141){return _0x9a2141[_0x98fb('0x30')]()['then'](function(){_0x5d76e9[_0x98fb('0x2b')](0xcc)[_0x98fb('0x26')]();});}};}function handleEntityNotFound(_0x558e15,_0x3708de){return function(_0x1b06f8){if(!_0x1b06f8){_0x558e15[_0x98fb('0x31')](0x194);}return _0x1b06f8;};}function handleError(_0x23763a,_0x290960){_0x290960=_0x290960||0x1f4;return function(_0x4f2849){logger[_0x98fb('0x21')](_0x4f2849[_0x98fb('0x32')]);if(_0x4f2849['name']){delete _0x4f2849['name'];}_0x23763a[_0x98fb('0x2b')](_0x290960)[_0x98fb('0x33')](_0x4f2849);};}exports[_0x98fb('0x34')]=function(_0x42974e,_0x3407e4){var _0x4bc2b5={},_0x1a663a={},_0x1ca8dc={'count':0x0,'rows':[]};var _0x559124=_[_0x98fb('0x35')](db['FreshsalesConfiguration'][_0x98fb('0x36')],function(_0x40fc8c){return{'name':_0x40fc8c['fieldName'],'type':_0x40fc8c[_0x98fb('0x37')][_0x98fb('0x38')]};});_0x1a663a[_0x98fb('0x39')]=_[_0x98fb('0x35')](_0x559124,_0x98fb('0x3a'));_0x1a663a[_0x98fb('0x3b')]=_[_0x98fb('0x3c')](_0x42974e['query']);_0x1a663a[_0x98fb('0x3d')]=_[_0x98fb('0x3e')](_0x1a663a[_0x98fb('0x39')],_0x1a663a[_0x98fb('0x3b')]);_0x4bc2b5[_0x98fb('0x3f')]=_[_0x98fb('0x3e')](_0x1a663a[_0x98fb('0x39')],qs[_0x98fb('0x40')](_0x42974e['query'][_0x98fb('0x40')]));_0x4bc2b5[_0x98fb('0x3f')]=_0x4bc2b5[_0x98fb('0x3f')][_0x98fb('0x41')]?_0x4bc2b5[_0x98fb('0x3f')]:_0x1a663a[_0x98fb('0x39')];if(!_0x42974e[_0x98fb('0x3b')][_0x98fb('0x42')](_0x98fb('0x43'))){_0x4bc2b5['limit']=qs['limit'](_0x42974e[_0x98fb('0x3b')][_0x98fb('0x2a')]);_0x4bc2b5[_0x98fb('0x28')]=qs['offset'](_0x42974e[_0x98fb('0x3b')][_0x98fb('0x28')]);}_0x4bc2b5[_0x98fb('0x44')]=qs[_0x98fb('0x45')](_0x42974e[_0x98fb('0x3b')][_0x98fb('0x45')]);_0x4bc2b5[_0x98fb('0x46')]=qs['filters'](_[_0x98fb('0x47')](_0x42974e[_0x98fb('0x3b')],_0x1a663a[_0x98fb('0x3d')]),_0x559124);if(_0x42974e[_0x98fb('0x3b')][_0x98fb('0x48')]){_0x4bc2b5[_0x98fb('0x46')]=_[_0x98fb('0x49')](_0x4bc2b5[_0x98fb('0x46')],{'$or':_[_0x98fb('0x35')](_0x559124,function(_0x381e27){if(_0x381e27['type']!=='VIRTUAL'){var _0x494e89={};_0x494e89[_0x381e27['name']]={'$like':'%'+_0x42974e['query'][_0x98fb('0x48')]+'%'};return _0x494e89;}})});}_0x4bc2b5=_[_0x98fb('0x49')]({},_0x4bc2b5,_0x42974e['options']);var _0x4cfc6a={'where':_0x4bc2b5[_0x98fb('0x46')]};return db[_0x98fb('0x4a')]['count'](_0x4cfc6a)['then'](function(_0x3e0f3d){_0x1ca8dc['count']=_0x3e0f3d;if(_0x42974e[_0x98fb('0x3b')][_0x98fb('0x4b')]){_0x4bc2b5[_0x98fb('0x4c')]=[{'all':!![]}];}return db[_0x98fb('0x4a')][_0x98fb('0x4d')](_0x4bc2b5);})['then'](function(_0xf6f9b){_0x1ca8dc['rows']=_0xf6f9b;return _0x1ca8dc;})[_0x98fb('0x1b')](respondWithFilteredResult(_0x3407e4,_0x4bc2b5))[_0x98fb('0x4e')](handleError(_0x3407e4,null));};exports[_0x98fb('0x4f')]=function(_0x34d171,_0x17ea6a){var _0x489a45={'raw':![],'where':{'id':_0x34d171['params']['id']}},_0x49b3ed={};_0x49b3ed[_0x98fb('0x39')]=_[_0x98fb('0x3c')](db[_0x98fb('0x4a')][_0x98fb('0x36')]);_0x49b3ed['query']=_[_0x98fb('0x3c')](_0x34d171[_0x98fb('0x3b')]);_0x49b3ed[_0x98fb('0x3d')]=_[_0x98fb('0x3e')](_0x49b3ed[_0x98fb('0x39')],_0x49b3ed[_0x98fb('0x3b')]);_0x489a45[_0x98fb('0x3f')]=_['intersection'](_0x49b3ed[_0x98fb('0x39')],qs[_0x98fb('0x40')](_0x34d171['query'][_0x98fb('0x40')]));_0x489a45[_0x98fb('0x3f')]=_0x489a45['attributes'][_0x98fb('0x41')]?_0x489a45[_0x98fb('0x3f')]:_0x49b3ed[_0x98fb('0x39')];if(_0x34d171[_0x98fb('0x3b')]['includeAll']){_0x489a45[_0x98fb('0x4c')]=[{'all':!![]}];}_0x489a45=_[_0x98fb('0x49')]({},_0x489a45,_0x34d171[_0x98fb('0x50')]);return db[_0x98fb('0x4a')][_0x98fb('0x51')](_0x489a45)['then'](handleEntityNotFound(_0x17ea6a,null))[_0x98fb('0x1b')](respondWithResult(_0x17ea6a,null))[_0x98fb('0x4e')](handleError(_0x17ea6a,null));};exports[_0x98fb('0x52')]=function(_0x485999,_0x3fb350){return db[_0x98fb('0x4a')]['create'](_0x485999[_0x98fb('0x53')],{})[_0x98fb('0x1b')](respondWithResult(_0x3fb350,0xc9))[_0x98fb('0x4e')](handleError(_0x3fb350,null));};exports[_0x98fb('0x2f')]=function(_0x1509b6,_0x1c16af){if(_0x1509b6['body']['id']){delete _0x1509b6[_0x98fb('0x53')]['id'];}return db['FreshsalesConfiguration']['find']({'where':{'id':_0x1509b6['params']['id']}})['then'](handleEntityNotFound(_0x1c16af,null))[_0x98fb('0x1b')](saveUpdates(_0x1509b6[_0x98fb('0x53')],null))[_0x98fb('0x1b')](respondWithResult(_0x1c16af,null))['catch'](handleError(_0x1c16af,null));};exports[_0x98fb('0x30')]=function(_0x239b92,_0x15430a){return db['FreshsalesConfiguration'][_0x98fb('0x51')]({'where':{'id':_0x239b92['params']['id']}})[_0x98fb('0x1b')](handleEntityNotFound(_0x15430a,null))[_0x98fb('0x1b')](removeEntity(_0x15430a,null))['catch'](handleError(_0x15430a,null));};exports['getSubjects']=function(_0x41b1ac,_0x56e0e8,_0x225426){var _0x1e0b8a={};var _0x1ddca3={};var _0xc684f1;var _0xa57617;return db[_0x98fb('0x4a')][_0x98fb('0x54')]({'where':{'id':_0x41b1ac[_0x98fb('0x55')]['id']}})[_0x98fb('0x1b')](handleEntityNotFound(_0x56e0e8,null))['then'](function(_0x23cf27){if(_0x23cf27){_0xc684f1=_0x23cf27;_0x1ddca3[_0x98fb('0x39')]=_['keys'](db[_0x98fb('0x56')][_0x98fb('0x36')]);_0x1ddca3[_0x98fb('0x3b')]=_[_0x98fb('0x3c')](_0x41b1ac[_0x98fb('0x3b')]);_0x1ddca3['filters']=_[_0x98fb('0x3e')](_0x1ddca3[_0x98fb('0x39')],_0x1ddca3[_0x98fb('0x3b')]);_0x1e0b8a['attributes']=_['intersection'](_0x1ddca3['model'],qs[_0x98fb('0x40')](_0x41b1ac[_0x98fb('0x3b')][_0x98fb('0x40')]));_0x1e0b8a[_0x98fb('0x3f')]=_0x1e0b8a[_0x98fb('0x3f')][_0x98fb('0x41')]?_0x1e0b8a[_0x98fb('0x3f')]:_0x1ddca3[_0x98fb('0x39')];_0x1e0b8a['order']=qs['sort'](_0x41b1ac[_0x98fb('0x3b')]['sort']);_0x1e0b8a[_0x98fb('0x46')]=qs['filters'](_[_0x98fb('0x47')](_0x41b1ac[_0x98fb('0x3b')],_0x1ddca3[_0x98fb('0x3d')]));if(_0x41b1ac['query'][_0x98fb('0x48')]){_0x1e0b8a['where']=_[_0x98fb('0x49')](_0x1e0b8a['where'],{'$or':_[_0x98fb('0x35')](_0x1e0b8a[_0x98fb('0x3f')],function(_0x4281d0){var _0x54a861={};_0x54a861[_0x4281d0]={'$like':'%'+_0x41b1ac[_0x98fb('0x3b')]['filter']+'%'};return _0x54a861;})});}_0x1e0b8a=_[_0x98fb('0x49')]({},_0x1e0b8a,_0x41b1ac['options']);return _0xc684f1[_0x98fb('0x57')](_0x1e0b8a);}})[_0x98fb('0x1b')](function(_0x1e3955){if(_0x1e3955){_0xa57617=_0x1e3955['length'];if(!_0x41b1ac[_0x98fb('0x3b')][_0x98fb('0x42')]('nolimit')){_0x1e0b8a[_0x98fb('0x2a')]=qs[_0x98fb('0x2a')](_0x41b1ac[_0x98fb('0x3b')][_0x98fb('0x2a')]);_0x1e0b8a[_0x98fb('0x28')]=qs[_0x98fb('0x28')](_0x41b1ac[_0x98fb('0x3b')]['offset']);}return _0xc684f1['getSubjects'](_0x1e0b8a);}})['then'](function(_0x3cd2a3){if(_0x3cd2a3){return _0x3cd2a3?{'count':_0xa57617,'rows':_0x3cd2a3}:null;}})[_0x98fb('0x1b')](respondWithResult(_0x56e0e8,null))['catch'](handleError(_0x56e0e8,null));};exports[_0x98fb('0x58')]=function(_0x1a7fec,_0x21bbd0,_0x3bbab8){var _0x25b542={};var _0x30c1d5={};var _0x49d8ce;var _0x3d6493;return db[_0x98fb('0x4a')][_0x98fb('0x54')]({'where':{'id':_0x1a7fec['params']['id']}})[_0x98fb('0x1b')](handleEntityNotFound(_0x21bbd0,null))[_0x98fb('0x1b')](function(_0x5ab1dd){if(_0x5ab1dd){_0x49d8ce=_0x5ab1dd;_0x30c1d5[_0x98fb('0x39')]=_[_0x98fb('0x3c')](db['FreshsalesField'][_0x98fb('0x36')]);_0x30c1d5['query']=_['keys'](_0x1a7fec[_0x98fb('0x3b')]);_0x30c1d5[_0x98fb('0x3d')]=_[_0x98fb('0x3e')](_0x30c1d5[_0x98fb('0x39')],_0x30c1d5[_0x98fb('0x3b')]);_0x25b542['attributes']=_[_0x98fb('0x3e')](_0x30c1d5[_0x98fb('0x39')],qs['fields'](_0x1a7fec['query']['fields']));_0x25b542[_0x98fb('0x3f')]=_0x25b542[_0x98fb('0x3f')]['length']?_0x25b542[_0x98fb('0x3f')]:_0x30c1d5[_0x98fb('0x39')];_0x25b542[_0x98fb('0x44')]=qs[_0x98fb('0x45')](_0x1a7fec['query'][_0x98fb('0x45')]);_0x25b542[_0x98fb('0x46')]=qs[_0x98fb('0x3d')](_[_0x98fb('0x47')](_0x1a7fec[_0x98fb('0x3b')],_0x30c1d5[_0x98fb('0x3d')]));if(_0x1a7fec[_0x98fb('0x3b')][_0x98fb('0x48')]){_0x25b542[_0x98fb('0x46')]=_[_0x98fb('0x49')](_0x25b542[_0x98fb('0x46')],{'$or':_[_0x98fb('0x35')](_0x25b542[_0x98fb('0x3f')],function(_0x212a9b){var _0x601213={};_0x601213[_0x212a9b]={'$like':'%'+_0x1a7fec[_0x98fb('0x3b')][_0x98fb('0x48')]+'%'};return _0x601213;})});}_0x25b542=_[_0x98fb('0x49')]({},_0x25b542,_0x1a7fec[_0x98fb('0x50')]);return _0x49d8ce[_0x98fb('0x58')](_0x25b542);}})[_0x98fb('0x1b')](function(_0x381083){if(_0x381083){_0x3d6493=_0x381083[_0x98fb('0x41')];if(!_0x1a7fec['query'][_0x98fb('0x42')](_0x98fb('0x43'))){_0x25b542[_0x98fb('0x2a')]=qs[_0x98fb('0x2a')](_0x1a7fec[_0x98fb('0x3b')][_0x98fb('0x2a')]);_0x25b542['offset']=qs[_0x98fb('0x28')](_0x1a7fec[_0x98fb('0x3b')][_0x98fb('0x28')]);}return _0x49d8ce[_0x98fb('0x58')](_0x25b542);}})['then'](function(_0x5394c5){if(_0x5394c5){return _0x5394c5?{'count':_0x3d6493,'rows':_0x5394c5}:null;}})[_0x98fb('0x1b')](respondWithResult(_0x21bbd0,null))[_0x98fb('0x4e')](handleError(_0x21bbd0,null));};exports[_0x98fb('0x59')]=function(_0x344719,_0x733070,_0x5ddde1){var _0x16a1d1={};var _0x27be7b={};var _0x305d46;var _0x5d080d;return db[_0x98fb('0x4a')][_0x98fb('0x54')]({'where':{'id':_0x344719['params']['id']}})['then'](handleEntityNotFound(_0x733070,null))['then'](function(_0x337519){if(_0x337519){_0x305d46=_0x337519;_0x27be7b['model']=_[_0x98fb('0x3c')](db['FreshsalesField']['rawAttributes']);_0x27be7b['query']=_[_0x98fb('0x3c')](_0x344719['query']);_0x27be7b['filters']=_[_0x98fb('0x3e')](_0x27be7b[_0x98fb('0x39')],_0x27be7b[_0x98fb('0x3b')]);_0x16a1d1['attributes']=_['intersection'](_0x27be7b[_0x98fb('0x39')],qs[_0x98fb('0x40')](_0x344719[_0x98fb('0x3b')][_0x98fb('0x40')]));_0x16a1d1[_0x98fb('0x3f')]=_0x16a1d1[_0x98fb('0x3f')][_0x98fb('0x41')]?_0x16a1d1[_0x98fb('0x3f')]:_0x27be7b[_0x98fb('0x39')];_0x16a1d1[_0x98fb('0x44')]=qs[_0x98fb('0x45')](_0x344719[_0x98fb('0x3b')][_0x98fb('0x45')]);_0x16a1d1[_0x98fb('0x46')]=qs[_0x98fb('0x3d')](_[_0x98fb('0x47')](_0x344719[_0x98fb('0x3b')],_0x27be7b[_0x98fb('0x3d')]));if(_0x344719[_0x98fb('0x3b')][_0x98fb('0x48')]){_0x16a1d1[_0x98fb('0x46')]=_[_0x98fb('0x49')](_0x16a1d1[_0x98fb('0x46')],{'$or':_[_0x98fb('0x35')](_0x16a1d1[_0x98fb('0x3f')],function(_0x2c9eb9){var _0x46b8a2={};_0x46b8a2[_0x2c9eb9]={'$like':'%'+_0x344719[_0x98fb('0x3b')][_0x98fb('0x48')]+'%'};return _0x46b8a2;})});}_0x16a1d1=_['merge']({},_0x16a1d1,_0x344719[_0x98fb('0x50')]);return _0x305d46['getFields'](_0x16a1d1);}})[_0x98fb('0x1b')](function(_0x213128){if(_0x213128){_0x5d080d=_0x213128['length'];if(!_0x344719[_0x98fb('0x3b')]['hasOwnProperty'](_0x98fb('0x43'))){_0x16a1d1['limit']=qs['limit'](_0x344719[_0x98fb('0x3b')]['limit']);_0x16a1d1[_0x98fb('0x28')]=qs[_0x98fb('0x28')](_0x344719[_0x98fb('0x3b')]['offset']);}return _0x305d46[_0x98fb('0x59')](_0x16a1d1);}})['then'](function(_0x143f77){if(_0x143f77){return _0x143f77?{'count':_0x5d080d,'rows':_0x143f77}:null;}})[_0x98fb('0x1b')](respondWithResult(_0x733070,null))['catch'](handleError(_0x733070,null));}; \ No newline at end of file +var _0x5ad5=['../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','jayson/promise','client','http','request','info','FreshsalesConfiguration,\x20%s,\x20%s','request\x20sent','debug','FreshsalesConfiguration,\x20%s,\x20%s,\x20%s','error','message','result','catch','end','status','json','offset','undefined','count','limit','set','Content-Range','reject','save','then','destroy','sendStatus','stack','name','send','index','map','FreshsalesConfiguration','rawAttributes','key','query','keys','filters','intersection','attributes','model','fields','hasOwnProperty','order','sort','where','filter','merge','VIRTUAL','options','includeAll','show','params','length','include','find','create','body','update','getSubjects','FreshsalesField','nolimit','getDescriptions','getFields','findOne','pick','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','util','to-csv','ejs','lodash','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x5ad5,0xa1));var _0x55ad=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0x5ad5[_0x501510];return _0x1e6ee5;};'use strict';var emlformat=require(_0x55ad('0x0'));var rimraf=require(_0x55ad('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x55ad('0x2'));var rp=require(_0x55ad('0x3'));var moment=require(_0x55ad('0x4'));var BPromise=require(_0x55ad('0x5'));var Mustache=require('mustache');var util=require(_0x55ad('0x6'));var path=require('path');var sox=require('sox');var csv=require(_0x55ad('0x7'));var ejs=require(_0x55ad('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x55ad('0x9'));var squel=require('squel');var crypto=require(_0x55ad('0xa'));var jsforce=require(_0x55ad('0xb'));var deskjs=require(_0x55ad('0xc'));var toCsv=require(_0x55ad('0x7'));var querystring=require(_0x55ad('0xd'));var Papa=require('papaparse');var Redis=require(_0x55ad('0xe'));var authService=require(_0x55ad('0xf'));var qs=require(_0x55ad('0x10'));var as=require(_0x55ad('0x11'));var hardwareService=require(_0x55ad('0x12'));var logger=require(_0x55ad('0x13'))('api');var utils=require(_0x55ad('0x14'));var config=require(_0x55ad('0x15'));var licenseUtil=require(_0x55ad('0x16'));var db=require(_0x55ad('0x17'))['db'];var jayson=require(_0x55ad('0x18'));var client=jayson[_0x55ad('0x19')][_0x55ad('0x1a')]({'port':0x232a});function respondWithRpcPromise(_0x5306a9,_0x1905b0,_0x4671e4,_0x28ad68){return new BPromise(function(_0x2bfe85,_0x3a80b9){var _0x59b3c0=_0x28ad68||client;return _0x59b3c0[_0x55ad('0x1b')](_0x5306a9,_0x4671e4)['then'](function(_0xbd5afd){logger[_0x55ad('0x1c')](_0x55ad('0x1d'),_0x1905b0,_0x55ad('0x1e'));logger[_0x55ad('0x1f')](_0x55ad('0x20'),_0x1905b0,'request\x20sent',JSON['stringify'](_0xbd5afd));if(_0xbd5afd[_0x55ad('0x21')]){if(_0xbd5afd['error']['code']===0x1f4){logger['error'](_0x55ad('0x1d'),_0x1905b0,_0xbd5afd['error'][_0x55ad('0x22')]);return _0x3a80b9(_0xbd5afd['error'][_0x55ad('0x22')]);}logger[_0x55ad('0x21')](_0x55ad('0x1d'),_0x1905b0,_0xbd5afd[_0x55ad('0x21')]['message']);return _0x2bfe85(_0xbd5afd[_0x55ad('0x21')][_0x55ad('0x22')]);}else{logger[_0x55ad('0x1c')]('FreshsalesConfiguration,\x20%s,\x20%s',_0x1905b0,_0x55ad('0x1e'));_0x2bfe85(_0xbd5afd[_0x55ad('0x23')][_0x55ad('0x22')]);}})[_0x55ad('0x24')](function(_0x3c2839){logger[_0x55ad('0x21')](_0x55ad('0x1d'),_0x1905b0,_0x3c2839);_0x3a80b9(_0x3c2839);});});}function respondWithStatusCode(_0x512f03,_0x3ac109){_0x3ac109=_0x3ac109||0xcc;return function(_0x34c7aa){if(_0x34c7aa){return _0x512f03['sendStatus'](_0x3ac109);}return _0x512f03['status'](_0x3ac109)[_0x55ad('0x25')]();};}function respondWithResult(_0x332156,_0x1f29d1){_0x1f29d1=_0x1f29d1||0xc8;return function(_0x104759){if(_0x104759){return _0x332156[_0x55ad('0x26')](_0x1f29d1)[_0x55ad('0x27')](_0x104759);}};}function respondWithFilteredResult(_0x3a1576,_0x2561af){return function(_0x571da8){if(_0x571da8){var _0x339a87=typeof _0x2561af[_0x55ad('0x28')]===_0x55ad('0x29')&&typeof _0x2561af['limit']===_0x55ad('0x29');var _0x3f7d74=_0x571da8[_0x55ad('0x2a')];var _0x192f51=_0x339a87?0x0:_0x2561af[_0x55ad('0x28')];var _0x3f6864=_0x339a87?_0x571da8[_0x55ad('0x2a')]:_0x2561af[_0x55ad('0x28')]+_0x2561af[_0x55ad('0x2b')];var _0x1c4013;if(_0x3f6864>=_0x3f7d74){_0x3f6864=_0x3f7d74;_0x1c4013=0xc8;}else{_0x1c4013=0xce;}_0x3a1576['status'](_0x1c4013);return _0x3a1576[_0x55ad('0x2c')](_0x55ad('0x2d'),_0x192f51+'-'+_0x3f6864+'/'+_0x3f7d74)[_0x55ad('0x27')](_0x571da8);}return null;};}function patchUpdates(_0x44454f){return function(_0x28d4d2){try{jsonpatch['apply'](_0x28d4d2,_0x44454f,!![]);}catch(_0x197088){return BPromise[_0x55ad('0x2e')](_0x197088);}return _0x28d4d2[_0x55ad('0x2f')]();};}function saveUpdates(_0x27dce5,_0x9be278){return function(_0x2d99cf){if(_0x2d99cf){return _0x2d99cf['update'](_0x27dce5)[_0x55ad('0x30')](function(_0x3c2ed1){return _0x3c2ed1;});}return null;};}function removeEntity(_0x420982,_0x444c46){return function(_0x40e9af){if(_0x40e9af){return _0x40e9af[_0x55ad('0x31')]()[_0x55ad('0x30')](function(){_0x420982[_0x55ad('0x26')](0xcc)['end']();});}};}function handleEntityNotFound(_0x2c4d1a,_0x40f10c){return function(_0x40edf8){if(!_0x40edf8){_0x2c4d1a[_0x55ad('0x32')](0x194);}return _0x40edf8;};}function handleError(_0x4287bc,_0x43d87b){_0x43d87b=_0x43d87b||0x1f4;return function(_0x2d4586){logger[_0x55ad('0x21')](_0x2d4586[_0x55ad('0x33')]);if(_0x2d4586[_0x55ad('0x34')]){delete _0x2d4586[_0x55ad('0x34')];}_0x4287bc[_0x55ad('0x26')](_0x43d87b)[_0x55ad('0x35')](_0x2d4586);};}exports[_0x55ad('0x36')]=function(_0x5b5066,_0x77cf2){var _0x1f4e7e={},_0x4de8b5={},_0x2d2170={'count':0x0,'rows':[]};var _0x34e624=_[_0x55ad('0x37')](db[_0x55ad('0x38')][_0x55ad('0x39')],function(_0x57c1d5){return{'name':_0x57c1d5['fieldName'],'type':_0x57c1d5['type'][_0x55ad('0x3a')]};});_0x4de8b5['model']=_[_0x55ad('0x37')](_0x34e624,_0x55ad('0x34'));_0x4de8b5[_0x55ad('0x3b')]=_[_0x55ad('0x3c')](_0x5b5066[_0x55ad('0x3b')]);_0x4de8b5[_0x55ad('0x3d')]=_[_0x55ad('0x3e')](_0x4de8b5['model'],_0x4de8b5[_0x55ad('0x3b')]);_0x1f4e7e[_0x55ad('0x3f')]=_[_0x55ad('0x3e')](_0x4de8b5[_0x55ad('0x40')],qs[_0x55ad('0x41')](_0x5b5066['query']['fields']));_0x1f4e7e[_0x55ad('0x3f')]=_0x1f4e7e['attributes']['length']?_0x1f4e7e[_0x55ad('0x3f')]:_0x4de8b5[_0x55ad('0x40')];if(!_0x5b5066['query'][_0x55ad('0x42')]('nolimit')){_0x1f4e7e[_0x55ad('0x2b')]=qs[_0x55ad('0x2b')](_0x5b5066[_0x55ad('0x3b')][_0x55ad('0x2b')]);_0x1f4e7e['offset']=qs['offset'](_0x5b5066[_0x55ad('0x3b')][_0x55ad('0x28')]);}_0x1f4e7e[_0x55ad('0x43')]=qs[_0x55ad('0x44')](_0x5b5066[_0x55ad('0x3b')][_0x55ad('0x44')]);_0x1f4e7e[_0x55ad('0x45')]=qs[_0x55ad('0x3d')](_['pick'](_0x5b5066[_0x55ad('0x3b')],_0x4de8b5[_0x55ad('0x3d')]),_0x34e624);if(_0x5b5066[_0x55ad('0x3b')][_0x55ad('0x46')]){_0x1f4e7e[_0x55ad('0x45')]=_[_0x55ad('0x47')](_0x1f4e7e['where'],{'$or':_['map'](_0x34e624,function(_0x28b89f){if(_0x28b89f['type']!==_0x55ad('0x48')){var _0x4e21e2={};_0x4e21e2[_0x28b89f[_0x55ad('0x34')]]={'$like':'%'+_0x5b5066['query'][_0x55ad('0x46')]+'%'};return _0x4e21e2;}})});}_0x1f4e7e=_[_0x55ad('0x47')]({},_0x1f4e7e,_0x5b5066[_0x55ad('0x49')]);var _0x38f960={'where':_0x1f4e7e[_0x55ad('0x45')]};return db[_0x55ad('0x38')][_0x55ad('0x2a')](_0x38f960)[_0x55ad('0x30')](function(_0x2e9110){_0x2d2170['count']=_0x2e9110;if(_0x5b5066[_0x55ad('0x3b')][_0x55ad('0x4a')]){_0x1f4e7e['include']=[{'all':!![]}];}return db[_0x55ad('0x38')]['findAll'](_0x1f4e7e);})[_0x55ad('0x30')](function(_0x4d40e3){_0x2d2170['rows']=_0x4d40e3;return _0x2d2170;})['then'](respondWithFilteredResult(_0x77cf2,_0x1f4e7e))[_0x55ad('0x24')](handleError(_0x77cf2,null));};exports[_0x55ad('0x4b')]=function(_0x482aff,_0x54f4f2){var _0x5035f2={'raw':![],'where':{'id':_0x482aff[_0x55ad('0x4c')]['id']}},_0x2548f8={};_0x2548f8[_0x55ad('0x40')]=_[_0x55ad('0x3c')](db[_0x55ad('0x38')][_0x55ad('0x39')]);_0x2548f8[_0x55ad('0x3b')]=_['keys'](_0x482aff[_0x55ad('0x3b')]);_0x2548f8['filters']=_[_0x55ad('0x3e')](_0x2548f8[_0x55ad('0x40')],_0x2548f8[_0x55ad('0x3b')]);_0x5035f2['attributes']=_['intersection'](_0x2548f8[_0x55ad('0x40')],qs[_0x55ad('0x41')](_0x482aff['query'][_0x55ad('0x41')]));_0x5035f2['attributes']=_0x5035f2[_0x55ad('0x3f')][_0x55ad('0x4d')]?_0x5035f2[_0x55ad('0x3f')]:_0x2548f8[_0x55ad('0x40')];if(_0x482aff[_0x55ad('0x3b')]['includeAll']){_0x5035f2[_0x55ad('0x4e')]=[{'all':!![]}];}_0x5035f2=_[_0x55ad('0x47')]({},_0x5035f2,_0x482aff[_0x55ad('0x49')]);return db[_0x55ad('0x38')][_0x55ad('0x4f')](_0x5035f2)['then'](handleEntityNotFound(_0x54f4f2,null))[_0x55ad('0x30')](respondWithResult(_0x54f4f2,null))[_0x55ad('0x24')](handleError(_0x54f4f2,null));};exports[_0x55ad('0x50')]=function(_0x50eae2,_0x4af282){return db[_0x55ad('0x38')][_0x55ad('0x50')](_0x50eae2[_0x55ad('0x51')],{})['then'](respondWithResult(_0x4af282,0xc9))[_0x55ad('0x24')](handleError(_0x4af282,null));};exports[_0x55ad('0x52')]=function(_0x252fd0,_0x1d4bba){if(_0x252fd0[_0x55ad('0x51')]['id']){delete _0x252fd0[_0x55ad('0x51')]['id'];}return db[_0x55ad('0x38')][_0x55ad('0x4f')]({'where':{'id':_0x252fd0['params']['id']}})['then'](handleEntityNotFound(_0x1d4bba,null))[_0x55ad('0x30')](saveUpdates(_0x252fd0['body'],null))['then'](respondWithResult(_0x1d4bba,null))[_0x55ad('0x24')](handleError(_0x1d4bba,null));};exports[_0x55ad('0x31')]=function(_0x19df92,_0x2cd6af){return db[_0x55ad('0x38')][_0x55ad('0x4f')]({'where':{'id':_0x19df92[_0x55ad('0x4c')]['id']}})[_0x55ad('0x30')](handleEntityNotFound(_0x2cd6af,null))[_0x55ad('0x30')](removeEntity(_0x2cd6af,null))[_0x55ad('0x24')](handleError(_0x2cd6af,null));};exports[_0x55ad('0x53')]=function(_0x4d8f10,_0x2ba589,_0xf80f3){var _0x4243f1={};var _0x279ea={};var _0x2dbaa1;var _0x4e20db;return db[_0x55ad('0x38')]['findOne']({'where':{'id':_0x4d8f10['params']['id']}})[_0x55ad('0x30')](handleEntityNotFound(_0x2ba589,null))[_0x55ad('0x30')](function(_0x435623){if(_0x435623){_0x2dbaa1=_0x435623;_0x279ea[_0x55ad('0x40')]=_[_0x55ad('0x3c')](db[_0x55ad('0x54')][_0x55ad('0x39')]);_0x279ea['query']=_['keys'](_0x4d8f10[_0x55ad('0x3b')]);_0x279ea[_0x55ad('0x3d')]=_[_0x55ad('0x3e')](_0x279ea['model'],_0x279ea[_0x55ad('0x3b')]);_0x4243f1[_0x55ad('0x3f')]=_['intersection'](_0x279ea['model'],qs[_0x55ad('0x41')](_0x4d8f10[_0x55ad('0x3b')]['fields']));_0x4243f1[_0x55ad('0x3f')]=_0x4243f1[_0x55ad('0x3f')][_0x55ad('0x4d')]?_0x4243f1[_0x55ad('0x3f')]:_0x279ea['model'];_0x4243f1[_0x55ad('0x43')]=qs[_0x55ad('0x44')](_0x4d8f10[_0x55ad('0x3b')][_0x55ad('0x44')]);_0x4243f1[_0x55ad('0x45')]=qs[_0x55ad('0x3d')](_['pick'](_0x4d8f10['query'],_0x279ea['filters']));if(_0x4d8f10[_0x55ad('0x3b')]['filter']){_0x4243f1[_0x55ad('0x45')]=_['merge'](_0x4243f1['where'],{'$or':_[_0x55ad('0x37')](_0x4243f1['attributes'],function(_0x148f08){var _0x3b5583={};_0x3b5583[_0x148f08]={'$like':'%'+_0x4d8f10[_0x55ad('0x3b')]['filter']+'%'};return _0x3b5583;})});}_0x4243f1=_[_0x55ad('0x47')]({},_0x4243f1,_0x4d8f10['options']);return _0x2dbaa1[_0x55ad('0x53')](_0x4243f1);}})['then'](function(_0x58053d){if(_0x58053d){_0x4e20db=_0x58053d[_0x55ad('0x4d')];if(!_0x4d8f10[_0x55ad('0x3b')][_0x55ad('0x42')](_0x55ad('0x55'))){_0x4243f1[_0x55ad('0x2b')]=qs[_0x55ad('0x2b')](_0x4d8f10['query'][_0x55ad('0x2b')]);_0x4243f1[_0x55ad('0x28')]=qs[_0x55ad('0x28')](_0x4d8f10[_0x55ad('0x3b')][_0x55ad('0x28')]);}return _0x2dbaa1[_0x55ad('0x53')](_0x4243f1);}})['then'](function(_0x12071c){if(_0x12071c){return _0x12071c?{'count':_0x4e20db,'rows':_0x12071c}:null;}})['then'](respondWithResult(_0x2ba589,null))[_0x55ad('0x24')](handleError(_0x2ba589,null));};exports['getDescriptions']=function(_0x4144d9,_0x11e1d5,_0x5deb43){var _0x501a10={};var _0xa87674={};var _0x184d67;var _0x21e5f0;return db['FreshsalesConfiguration']['findOne']({'where':{'id':_0x4144d9[_0x55ad('0x4c')]['id']}})[_0x55ad('0x30')](handleEntityNotFound(_0x11e1d5,null))[_0x55ad('0x30')](function(_0x59cc7a){if(_0x59cc7a){_0x184d67=_0x59cc7a;_0xa87674[_0x55ad('0x40')]=_[_0x55ad('0x3c')](db['FreshsalesField'][_0x55ad('0x39')]);_0xa87674['query']=_[_0x55ad('0x3c')](_0x4144d9[_0x55ad('0x3b')]);_0xa87674[_0x55ad('0x3d')]=_['intersection'](_0xa87674[_0x55ad('0x40')],_0xa87674['query']);_0x501a10[_0x55ad('0x3f')]=_[_0x55ad('0x3e')](_0xa87674[_0x55ad('0x40')],qs[_0x55ad('0x41')](_0x4144d9[_0x55ad('0x3b')]['fields']));_0x501a10[_0x55ad('0x3f')]=_0x501a10[_0x55ad('0x3f')][_0x55ad('0x4d')]?_0x501a10[_0x55ad('0x3f')]:_0xa87674[_0x55ad('0x40')];_0x501a10[_0x55ad('0x43')]=qs[_0x55ad('0x44')](_0x4144d9['query'][_0x55ad('0x44')]);_0x501a10[_0x55ad('0x45')]=qs[_0x55ad('0x3d')](_['pick'](_0x4144d9[_0x55ad('0x3b')],_0xa87674[_0x55ad('0x3d')]));if(_0x4144d9[_0x55ad('0x3b')][_0x55ad('0x46')]){_0x501a10[_0x55ad('0x45')]=_['merge'](_0x501a10['where'],{'$or':_[_0x55ad('0x37')](_0x501a10[_0x55ad('0x3f')],function(_0x4f233a){var _0x18dbd6={};_0x18dbd6[_0x4f233a]={'$like':'%'+_0x4144d9[_0x55ad('0x3b')][_0x55ad('0x46')]+'%'};return _0x18dbd6;})});}_0x501a10=_[_0x55ad('0x47')]({},_0x501a10,_0x4144d9[_0x55ad('0x49')]);return _0x184d67['getDescriptions'](_0x501a10);}})[_0x55ad('0x30')](function(_0x45c321){if(_0x45c321){_0x21e5f0=_0x45c321[_0x55ad('0x4d')];if(!_0x4144d9[_0x55ad('0x3b')][_0x55ad('0x42')]('nolimit')){_0x501a10['limit']=qs[_0x55ad('0x2b')](_0x4144d9['query'][_0x55ad('0x2b')]);_0x501a10['offset']=qs[_0x55ad('0x28')](_0x4144d9['query'][_0x55ad('0x28')]);}return _0x184d67[_0x55ad('0x56')](_0x501a10);}})[_0x55ad('0x30')](function(_0x5b73e0){if(_0x5b73e0){return _0x5b73e0?{'count':_0x21e5f0,'rows':_0x5b73e0}:null;}})[_0x55ad('0x30')](respondWithResult(_0x11e1d5,null))[_0x55ad('0x24')](handleError(_0x11e1d5,null));};exports[_0x55ad('0x57')]=function(_0x4fd996,_0x535ab5,_0x59493d){var _0x2e4ca2={};var _0x18536e={};var _0x32957d;var _0x46ca0d;return db[_0x55ad('0x38')][_0x55ad('0x58')]({'where':{'id':_0x4fd996[_0x55ad('0x4c')]['id']}})[_0x55ad('0x30')](handleEntityNotFound(_0x535ab5,null))[_0x55ad('0x30')](function(_0x549abc){if(_0x549abc){_0x32957d=_0x549abc;_0x18536e['model']=_[_0x55ad('0x3c')](db[_0x55ad('0x54')][_0x55ad('0x39')]);_0x18536e['query']=_['keys'](_0x4fd996[_0x55ad('0x3b')]);_0x18536e[_0x55ad('0x3d')]=_[_0x55ad('0x3e')](_0x18536e[_0x55ad('0x40')],_0x18536e[_0x55ad('0x3b')]);_0x2e4ca2[_0x55ad('0x3f')]=_[_0x55ad('0x3e')](_0x18536e[_0x55ad('0x40')],qs[_0x55ad('0x41')](_0x4fd996[_0x55ad('0x3b')][_0x55ad('0x41')]));_0x2e4ca2[_0x55ad('0x3f')]=_0x2e4ca2['attributes']['length']?_0x2e4ca2[_0x55ad('0x3f')]:_0x18536e[_0x55ad('0x40')];_0x2e4ca2['order']=qs[_0x55ad('0x44')](_0x4fd996[_0x55ad('0x3b')][_0x55ad('0x44')]);_0x2e4ca2['where']=qs[_0x55ad('0x3d')](_[_0x55ad('0x59')](_0x4fd996[_0x55ad('0x3b')],_0x18536e[_0x55ad('0x3d')]));if(_0x4fd996[_0x55ad('0x3b')][_0x55ad('0x46')]){_0x2e4ca2[_0x55ad('0x45')]=_[_0x55ad('0x47')](_0x2e4ca2[_0x55ad('0x45')],{'$or':_[_0x55ad('0x37')](_0x2e4ca2[_0x55ad('0x3f')],function(_0x5a2927){var _0xfb87e5={};_0xfb87e5[_0x5a2927]={'$like':'%'+_0x4fd996['query']['filter']+'%'};return _0xfb87e5;})});}_0x2e4ca2=_[_0x55ad('0x47')]({},_0x2e4ca2,_0x4fd996[_0x55ad('0x49')]);return _0x32957d[_0x55ad('0x57')](_0x2e4ca2);}})[_0x55ad('0x30')](function(_0x34878b){if(_0x34878b){_0x46ca0d=_0x34878b[_0x55ad('0x4d')];if(!_0x4fd996[_0x55ad('0x3b')][_0x55ad('0x42')](_0x55ad('0x55'))){_0x2e4ca2[_0x55ad('0x2b')]=qs[_0x55ad('0x2b')](_0x4fd996['query'][_0x55ad('0x2b')]);_0x2e4ca2[_0x55ad('0x28')]=qs[_0x55ad('0x28')](_0x4fd996['query'][_0x55ad('0x28')]);}return _0x32957d[_0x55ad('0x57')](_0x2e4ca2);}})[_0x55ad('0x30')](function(_0xe9275c){if(_0xe9275c){return _0xe9275c?{'count':_0x46ca0d,'rows':_0xe9275c}:null;}})['then'](respondWithResult(_0x535ab5,null))['catch'](handleError(_0x535ab5,null));}; \ No newline at end of file diff --git a/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.model.js b/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.model.js index 7610b8a..71f68b6 100644 --- a/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.model.js +++ b/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa5ed=['./intFreshsalesConfiguration.attributes','exports','FreshsalesConfiguration','int_freshsales_configurations','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x4ca993,_0x26914e){var _0x1ec3d8=function(_0x1c835d){while(--_0x1c835d){_0x4ca993['push'](_0x4ca993['shift']());}};_0x1ec3d8(++_0x26914e);}(_0xa5ed,0x9e));var _0xda5e=function(_0x6f027,_0x5acd5f){_0x6f027=_0x6f027-0x0;var _0x232f62=_0xa5ed[_0x6f027];return _0x232f62;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xda5e('0x0'))('api');var moment=require(_0xda5e('0x1'));var BPromise=require(_0xda5e('0x2'));var rp=require(_0xda5e('0x3'));var fs=require('fs');var path=require(_0xda5e('0x4'));var rimraf=require(_0xda5e('0x5'));var config=require(_0xda5e('0x6'));var attributes=require(_0xda5e('0x7'));module[_0xda5e('0x8')]=function(_0x4a9f21,_0x3bf95f){return _0x4a9f21['define'](_0xda5e('0x9'),attributes,{'tableName':_0xda5e('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xd696=['FreshsalesConfiguration','int_freshsales_configurations','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','exports','define'];(function(_0x4780ac,_0x5b96ee){var _0x29e58e=function(_0x5c042d){while(--_0x5c042d){_0x4780ac['push'](_0x4780ac['shift']());}};_0x29e58e(++_0x5b96ee);}(_0xd696,0x113));var _0x6d69=function(_0x3474ac,_0x22d0f7){_0x3474ac=_0x3474ac-0x0;var _0x5345ec=_0xd696[_0x3474ac];return _0x5345ec;};'use strict';var _=require(_0x6d69('0x0'));var util=require(_0x6d69('0x1'));var logger=require(_0x6d69('0x2'))(_0x6d69('0x3'));var moment=require('moment');var BPromise=require(_0x6d69('0x4'));var rp=require(_0x6d69('0x5'));var fs=require('fs');var path=require(_0x6d69('0x6'));var rimraf=require(_0x6d69('0x7'));var config=require(_0x6d69('0x8'));var attributes=require('./intFreshsalesConfiguration.attributes');module[_0x6d69('0x9')]=function(_0x171b28,_0x22f289){return _0x171b28[_0x6d69('0xa')](_0x6d69('0xb'),attributes,{'tableName':_0x6d69('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.rpc.js b/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.rpc.js index 322a9d9..88d6bb9 100644 --- a/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.rpc.js +++ b/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9238=['stringify','error','code','message','result','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','info','FreshsalesConfiguration,\x20%s,\x20%s','request\x20sent','debug','FreshsalesConfiguration,\x20%s,\x20%s,\x20%s'];(function(_0x44946b,_0xf874ec){var _0x249bc4=function(_0x40a23e){while(--_0x40a23e){_0x44946b['push'](_0x44946b['shift']());}};_0x249bc4(++_0xf874ec);}(_0x9238,0xbd));var _0x8923=function(_0x41d183,_0x43c96d){_0x41d183=_0x41d183-0x0;var _0x1c909e=_0x9238[_0x41d183];return _0x1c909e;};'use strict';var _=require(_0x8923('0x0'));var util=require(_0x8923('0x1'));var moment=require(_0x8923('0x2'));var BPromise=require(_0x8923('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x8923('0x4'));var db=require(_0x8923('0x5'))['db'];var utils=require(_0x8923('0x6'));var logger=require(_0x8923('0x7'))(_0x8923('0x8'));var config=require(_0x8923('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x8923('0xa')][_0x8923('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x42b8ec,_0x170fd7,_0x57dd03){return new BPromise(function(_0x3c66d8,_0x669538){return client[_0x8923('0xc')](_0x42b8ec,_0x57dd03)['then'](function(_0x5f402d){logger[_0x8923('0xd')](_0x8923('0xe'),_0x170fd7,_0x8923('0xf'));logger[_0x8923('0x10')](_0x8923('0x11'),_0x170fd7,_0x8923('0xf'),JSON[_0x8923('0x12')](_0x5f402d));if(_0x5f402d['error']){if(_0x5f402d[_0x8923('0x13')][_0x8923('0x14')]===0x1f4){logger[_0x8923('0x13')](_0x8923('0xe'),_0x170fd7,_0x5f402d['error'][_0x8923('0x15')]);return _0x669538(_0x5f402d['error'][_0x8923('0x15')]);}logger['error'](_0x8923('0xe'),_0x170fd7,_0x5f402d[_0x8923('0x13')][_0x8923('0x15')]);return _0x3c66d8(_0x5f402d[_0x8923('0x13')][_0x8923('0x15')]);}else{logger['info'](_0x8923('0xe'),_0x170fd7,'request\x20sent');_0x3c66d8(_0x5f402d[_0x8923('0x16')][_0x8923('0x15')]);}})['catch'](function(_0x2d2d14){logger['error']('FreshsalesConfiguration,\x20%s,\x20%s',_0x170fd7,_0x2d2d14);_0x669538(_0x2d2d14);});});} \ No newline at end of file +var _0xfa0a=['../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','FreshsalesConfiguration,\x20%s,\x20%s','request\x20sent','debug','FreshsalesConfiguration,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','moment','bluebird','ioredis'];(function(_0x57f070,_0x33a280){var _0x17ff74=function(_0x15a439){while(--_0x15a439){_0x57f070['push'](_0x57f070['shift']());}};_0x17ff74(++_0x33a280);}(_0xfa0a,0xba));var _0xafa0=function(_0xc97e22,_0x59577c){_0xc97e22=_0xc97e22-0x0;var _0x160f39=_0xfa0a[_0xc97e22];return _0x160f39;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xafa0('0x0'));var BPromise=require(_0xafa0('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xafa0('0x2'));var db=require('../../mysqldb')['db'];var utils=require(_0xafa0('0x3'));var logger=require(_0xafa0('0x4'))('rpc');var config=require(_0xafa0('0x5'));var jayson=require(_0xafa0('0x6'));var client=jayson[_0xafa0('0x7')][_0xafa0('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x5b07b,_0x6aee6e,_0x1870cf){return new BPromise(function(_0x2bb23d,_0x489012){return client[_0xafa0('0x9')](_0x5b07b,_0x1870cf)[_0xafa0('0xa')](function(_0x305f6d){logger[_0xafa0('0xb')](_0xafa0('0xc'),_0x6aee6e,_0xafa0('0xd'));logger[_0xafa0('0xe')](_0xafa0('0xf'),_0x6aee6e,'request\x20sent',JSON['stringify'](_0x305f6d));if(_0x305f6d[_0xafa0('0x10')]){if(_0x305f6d[_0xafa0('0x10')][_0xafa0('0x11')]===0x1f4){logger[_0xafa0('0x10')](_0xafa0('0xc'),_0x6aee6e,_0x305f6d[_0xafa0('0x10')][_0xafa0('0x12')]);return _0x489012(_0x305f6d['error'][_0xafa0('0x12')]);}logger[_0xafa0('0x10')](_0xafa0('0xc'),_0x6aee6e,_0x305f6d[_0xafa0('0x10')][_0xafa0('0x12')]);return _0x2bb23d(_0x305f6d[_0xafa0('0x10')][_0xafa0('0x12')]);}else{logger[_0xafa0('0xb')](_0xafa0('0xc'),_0x6aee6e,'request\x20sent');_0x2bb23d(_0x305f6d[_0xafa0('0x13')][_0xafa0('0x12')]);}})[_0xafa0('0x14')](function(_0x8a4b0c){logger[_0xafa0('0x10')](_0xafa0('0xc'),_0x6aee6e,_0x8a4b0c);_0x489012(_0x8a4b0c);});});} \ No newline at end of file diff --git a/server/api/intFreshsalesField/index.js b/server/api/intFreshsalesField/index.js index 9251f96..99c764f 100644 --- a/server/api/intFreshsalesField/index.js +++ b/server/api/intFreshsalesField/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa44a=['/:id','update','delete','exports','multer','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','show','create'];(function(_0x15b380,_0x1a3c5f){var _0x232c5c=function(_0x12f8e0){while(--_0x12f8e0){_0x15b380['push'](_0x15b380['shift']());}};_0x232c5c(++_0x1a3c5f);}(_0xa44a,0x9a));var _0xaa44=function(_0x35faa8,_0x18c8b7){_0x35faa8=_0x35faa8-0x0;var _0x3227b0=_0xa44a[_0x35faa8];return _0x3227b0;};'use strict';var multer=require(_0xaa44('0x0'));var util=require('util');var path=require('path');var timeout=require(_0xaa44('0x1'));var express=require(_0xaa44('0x2'));var router=express[_0xaa44('0x3')]();var fs_extra=require(_0xaa44('0x4'));var auth=require(_0xaa44('0x5'));var interaction=require(_0xaa44('0x6'));var config=require('../../config/environment');var controller=require('./intFreshsalesField.controller');router[_0xaa44('0x7')]('/',auth[_0xaa44('0x8')](),controller['index']);router[_0xaa44('0x7')]('/:id',auth[_0xaa44('0x8')](),controller[_0xaa44('0x9')]);router['post']('/',auth[_0xaa44('0x8')](),controller[_0xaa44('0xa')]);router['put'](_0xaa44('0xb'),auth[_0xaa44('0x8')](),controller[_0xaa44('0xc')]);router[_0xaa44('0xd')]('/:id',auth[_0xaa44('0x8')](),controller['destroy']);module[_0xaa44('0xe')]=router; \ No newline at end of file +var _0x5d55=['post','create','put','update','destroy','exports','util','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','./intFreshsalesField.controller','get','isAuthenticated','index','/:id','show'];(function(_0x281ba3,_0x31410b){var _0x3cf513=function(_0x2da9d0){while(--_0x2da9d0){_0x281ba3['push'](_0x281ba3['shift']());}};_0x3cf513(++_0x31410b);}(_0x5d55,0x1a4));var _0x55d5=function(_0x2bfd32,_0x243708){_0x2bfd32=_0x2bfd32-0x0;var _0x5cb824=_0x5d55[_0x2bfd32];return _0x5cb824;};'use strict';var multer=require('multer');var util=require(_0x55d5('0x0'));var path=require('path');var timeout=require(_0x55d5('0x1'));var express=require(_0x55d5('0x2'));var router=express['Router']();var fs_extra=require(_0x55d5('0x3'));var auth=require(_0x55d5('0x4'));var interaction=require(_0x55d5('0x5'));var config=require('../../config/environment');var controller=require(_0x55d5('0x6'));router[_0x55d5('0x7')]('/',auth[_0x55d5('0x8')](),controller[_0x55d5('0x9')]);router[_0x55d5('0x7')](_0x55d5('0xa'),auth[_0x55d5('0x8')](),controller[_0x55d5('0xb')]);router[_0x55d5('0xc')]('/',auth['isAuthenticated'](),controller[_0x55d5('0xd')]);router[_0x55d5('0xe')](_0x55d5('0xa'),auth[_0x55d5('0x8')](),controller[_0x55d5('0xf')]);router['delete'](_0x55d5('0xa'),auth['isAuthenticated'](),controller[_0x55d5('0x10')]);module[_0x55d5('0x11')]=router; \ No newline at end of file diff --git a/server/api/intFreshsalesField/intFreshsalesField.attributes.js b/server/api/intFreshsalesField/intFreshsalesField.attributes.js index 74c9eba..dc99a9e 100644 --- a/server/api/intFreshsalesField/intFreshsalesField.attributes.js +++ b/server/api/intFreshsalesField/intFreshsalesField.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xea97=['customVariable','keyValue','string','STRING','sequelize','ENUM','variable'];(function(_0xb8634d,_0x5abce6){var _0x54b38e=function(_0x3d9c83){while(--_0x3d9c83){_0xb8634d['push'](_0xb8634d['shift']());}};_0x54b38e(++_0x5abce6);}(_0xea97,0xc8));var _0x7ea9=function(_0x5a9c0c,_0x4ec485){_0x5a9c0c=_0x5a9c0c-0x0;var _0x53c77d=_0xea97[_0x5a9c0c];return _0x53c77d;};'use strict';var Sequelize=require(_0x7ea9('0x0'));module['exports']={'type':{'type':Sequelize[_0x7ea9('0x1')]('string',_0x7ea9('0x2'),_0x7ea9('0x3'),_0x7ea9('0x4'),'picklist'),'defaultValue':_0x7ea9('0x5')},'content':{'type':Sequelize[_0x7ea9('0x6')]},'key':{'type':Sequelize[_0x7ea9('0x6')]},'keyType':{'type':Sequelize[_0x7ea9('0x1')](_0x7ea9('0x5'),_0x7ea9('0x2'),_0x7ea9('0x3'))},'keyContent':{'type':Sequelize[_0x7ea9('0x6')]},'idField':{'type':Sequelize['STRING']},'nameField':{'type':Sequelize[_0x7ea9('0x6')]},'customField':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'variableName':{'type':Sequelize['STRING']}}; \ No newline at end of file +var _0x3861=['keyValue','picklist','STRING','customVariable','BOOLEAN','string','variable'];(function(_0x138adb,_0x193fee){var _0x1b27f2=function(_0x5e97a2){while(--_0x5e97a2){_0x138adb['push'](_0x138adb['shift']());}};_0x1b27f2(++_0x193fee);}(_0x3861,0x6e));var _0x1386=function(_0x345b8e,_0x148f91){_0x345b8e=_0x345b8e-0x0;var _0xbef88e=_0x3861[_0x345b8e];return _0xbef88e;};'use strict';var Sequelize=require('sequelize');module['exports']={'type':{'type':Sequelize['ENUM'](_0x1386('0x0'),_0x1386('0x1'),'customVariable',_0x1386('0x2'),_0x1386('0x3')),'defaultValue':_0x1386('0x0')},'content':{'type':Sequelize[_0x1386('0x4')]},'key':{'type':Sequelize['STRING']},'keyType':{'type':Sequelize['ENUM']('string',_0x1386('0x1'),_0x1386('0x5'))},'keyContent':{'type':Sequelize[_0x1386('0x4')]},'idField':{'type':Sequelize[_0x1386('0x4')]},'nameField':{'type':Sequelize[_0x1386('0x4')]},'customField':{'type':Sequelize[_0x1386('0x6')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x1386('0x4')]}}; \ No newline at end of file diff --git a/server/api/intFreshsalesField/intFreshsalesField.controller.js b/server/api/intFreshsalesField/intFreshsalesField.controller.js index b41ec43..dee3c57 100644 --- a/server/api/intFreshsalesField/intFreshsalesField.controller.js +++ b/server/api/intFreshsalesField/intFreshsalesField.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4646=['show','params','find','create','body','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','offset','limit','undefined','count','set','json','apply','reject','save','update','then','destroy','error','stack','name','send','index','FreshsalesField','rawAttributes','fieldName','type','model','keys','query','filters','intersection','fields','attributes','length','hasOwnProperty','order','sort','where','merge','map','VIRTUAL','options','includeAll','include','findAll','rows','catch'];(function(_0x34f545,_0x2bd2ee){var _0x1ff6b8=function(_0x582e3b){while(--_0x582e3b){_0x34f545['push'](_0x34f545['shift']());}};_0x1ff6b8(++_0x2bd2ee);}(_0x4646,0x12d));var _0x6464=function(_0x12ec50,_0x5c868a){_0x12ec50=_0x12ec50-0x0;var _0x32dd5e=_0x4646[_0x12ec50];return _0x32dd5e;};'use strict';var emlformat=require(_0x6464('0x0'));var rimraf=require(_0x6464('0x1'));var zipdir=require(_0x6464('0x2'));var jsonpatch=require(_0x6464('0x3'));var rp=require(_0x6464('0x4'));var moment=require(_0x6464('0x5'));var BPromise=require(_0x6464('0x6'));var Mustache=require(_0x6464('0x7'));var util=require('util');var path=require(_0x6464('0x8'));var sox=require(_0x6464('0x9'));var csv=require(_0x6464('0xa'));var ejs=require(_0x6464('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x6464('0xc'));var crypto=require(_0x6464('0xd'));var jsforce=require(_0x6464('0xe'));var deskjs=require(_0x6464('0xf'));var toCsv=require(_0x6464('0xa'));var querystring=require('querystring');var Papa=require(_0x6464('0x10'));var Redis=require(_0x6464('0x11'));var authService=require('../../components/auth/service');var qs=require(_0x6464('0x12'));var as=require(_0x6464('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x6464('0x14'));var utils=require('../../config/utils');var config=require(_0x6464('0x15'));var licenseUtil=require(_0x6464('0x16'));var db=require(_0x6464('0x17'))['db'];function respondWithStatusCode(_0x54b113,_0x2b02ee){_0x2b02ee=_0x2b02ee||0xcc;return function(_0x89743b){if(_0x89743b){return _0x54b113[_0x6464('0x18')](_0x2b02ee);}return _0x54b113[_0x6464('0x19')](_0x2b02ee)[_0x6464('0x1a')]();};}function respondWithResult(_0x16c6b3,_0x27957f){_0x27957f=_0x27957f||0xc8;return function(_0x97e543){if(_0x97e543){return _0x16c6b3[_0x6464('0x19')](_0x27957f)['json'](_0x97e543);}};}function respondWithFilteredResult(_0x508b51,_0x5ba443){return function(_0x488ba2){if(_0x488ba2){var _0x5997e9=typeof _0x5ba443[_0x6464('0x1b')]==='undefined'&&typeof _0x5ba443[_0x6464('0x1c')]===_0x6464('0x1d');var _0x533ee0=_0x488ba2['count'];var _0x5db3e4=_0x5997e9?0x0:_0x5ba443[_0x6464('0x1b')];var _0x31c9ce=_0x5997e9?_0x488ba2[_0x6464('0x1e')]:_0x5ba443[_0x6464('0x1b')]+_0x5ba443['limit'];var _0x1177c8;if(_0x31c9ce>=_0x533ee0){_0x31c9ce=_0x533ee0;_0x1177c8=0xc8;}else{_0x1177c8=0xce;}_0x508b51['status'](_0x1177c8);return _0x508b51[_0x6464('0x1f')]('Content-Range',_0x5db3e4+'-'+_0x31c9ce+'/'+_0x533ee0)[_0x6464('0x20')](_0x488ba2);}return null;};}function patchUpdates(_0xce263b){return function(_0x7ba8dc){try{jsonpatch[_0x6464('0x21')](_0x7ba8dc,_0xce263b,!![]);}catch(_0x599df8){return BPromise[_0x6464('0x22')](_0x599df8);}return _0x7ba8dc[_0x6464('0x23')]();};}function saveUpdates(_0x20b9b4,_0x54f08e){return function(_0x2a6539){if(_0x2a6539){return _0x2a6539[_0x6464('0x24')](_0x20b9b4)[_0x6464('0x25')](function(_0x26b75e){return _0x26b75e;});}return null;};}function removeEntity(_0x47c061,_0x48b36f){return function(_0x44a80b){if(_0x44a80b){return _0x44a80b[_0x6464('0x26')]()[_0x6464('0x25')](function(){_0x47c061['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x14abf6,_0x3555e9){return function(_0x2882a2){if(!_0x2882a2){_0x14abf6['sendStatus'](0x194);}return _0x2882a2;};}function handleError(_0x59b3df,_0x57e657){_0x57e657=_0x57e657||0x1f4;return function(_0xbde0f5){logger[_0x6464('0x27')](_0xbde0f5[_0x6464('0x28')]);if(_0xbde0f5[_0x6464('0x29')]){delete _0xbde0f5[_0x6464('0x29')];}_0x59b3df[_0x6464('0x19')](_0x57e657)[_0x6464('0x2a')](_0xbde0f5);};}exports[_0x6464('0x2b')]=function(_0x44b099,_0x2cce8c){var _0x51636f={},_0xc45381={},_0x18607d={'count':0x0,'rows':[]};var _0x35e9ae=_['map'](db[_0x6464('0x2c')][_0x6464('0x2d')],function(_0x2b5522){return{'name':_0x2b5522[_0x6464('0x2e')],'type':_0x2b5522[_0x6464('0x2f')]['key']};});_0xc45381[_0x6464('0x30')]=_['map'](_0x35e9ae,_0x6464('0x29'));_0xc45381['query']=_[_0x6464('0x31')](_0x44b099[_0x6464('0x32')]);_0xc45381[_0x6464('0x33')]=_[_0x6464('0x34')](_0xc45381[_0x6464('0x30')],_0xc45381[_0x6464('0x32')]);_0x51636f['attributes']=_[_0x6464('0x34')](_0xc45381[_0x6464('0x30')],qs[_0x6464('0x35')](_0x44b099[_0x6464('0x32')][_0x6464('0x35')]));_0x51636f[_0x6464('0x36')]=_0x51636f[_0x6464('0x36')][_0x6464('0x37')]?_0x51636f[_0x6464('0x36')]:_0xc45381[_0x6464('0x30')];if(!_0x44b099[_0x6464('0x32')][_0x6464('0x38')]('nolimit')){_0x51636f[_0x6464('0x1c')]=qs[_0x6464('0x1c')](_0x44b099[_0x6464('0x32')][_0x6464('0x1c')]);_0x51636f['offset']=qs[_0x6464('0x1b')](_0x44b099[_0x6464('0x32')][_0x6464('0x1b')]);}_0x51636f[_0x6464('0x39')]=qs[_0x6464('0x3a')](_0x44b099[_0x6464('0x32')][_0x6464('0x3a')]);_0x51636f['where']=qs[_0x6464('0x33')](_['pick'](_0x44b099['query'],_0xc45381[_0x6464('0x33')]),_0x35e9ae);if(_0x44b099[_0x6464('0x32')]['filter']){_0x51636f[_0x6464('0x3b')]=_[_0x6464('0x3c')](_0x51636f[_0x6464('0x3b')],{'$or':_[_0x6464('0x3d')](_0x35e9ae,function(_0x56a82d){if(_0x56a82d[_0x6464('0x2f')]!==_0x6464('0x3e')){var _0x5ec8f4={};_0x5ec8f4[_0x56a82d[_0x6464('0x29')]]={'$like':'%'+_0x44b099[_0x6464('0x32')]['filter']+'%'};return _0x5ec8f4;}})});}_0x51636f=_[_0x6464('0x3c')]({},_0x51636f,_0x44b099[_0x6464('0x3f')]);var _0xe9daac={'where':_0x51636f[_0x6464('0x3b')]};return db[_0x6464('0x2c')][_0x6464('0x1e')](_0xe9daac)[_0x6464('0x25')](function(_0x27a662){_0x18607d[_0x6464('0x1e')]=_0x27a662;if(_0x44b099[_0x6464('0x32')][_0x6464('0x40')]){_0x51636f[_0x6464('0x41')]=[{'all':!![]}];}return db[_0x6464('0x2c')][_0x6464('0x42')](_0x51636f);})[_0x6464('0x25')](function(_0x16fc0c){_0x18607d[_0x6464('0x43')]=_0x16fc0c;return _0x18607d;})['then'](respondWithFilteredResult(_0x2cce8c,_0x51636f))[_0x6464('0x44')](handleError(_0x2cce8c,null));};exports[_0x6464('0x45')]=function(_0x19fa94,_0xb48b4e){var _0x15a82b={'raw':!![],'where':{'id':_0x19fa94[_0x6464('0x46')]['id']}},_0x24b1bf={};_0x24b1bf[_0x6464('0x30')]=_[_0x6464('0x31')](db['FreshsalesField']['rawAttributes']);_0x24b1bf['query']=_[_0x6464('0x31')](_0x19fa94[_0x6464('0x32')]);_0x24b1bf[_0x6464('0x33')]=_['intersection'](_0x24b1bf[_0x6464('0x30')],_0x24b1bf[_0x6464('0x32')]);_0x15a82b[_0x6464('0x36')]=_[_0x6464('0x34')](_0x24b1bf[_0x6464('0x30')],qs[_0x6464('0x35')](_0x19fa94[_0x6464('0x32')][_0x6464('0x35')]));_0x15a82b[_0x6464('0x36')]=_0x15a82b[_0x6464('0x36')][_0x6464('0x37')]?_0x15a82b['attributes']:_0x24b1bf['model'];if(_0x19fa94[_0x6464('0x32')]['includeAll']){_0x15a82b['include']=[{'all':!![]}];}_0x15a82b=_[_0x6464('0x3c')]({},_0x15a82b,_0x19fa94[_0x6464('0x3f')]);return db[_0x6464('0x2c')][_0x6464('0x47')](_0x15a82b)[_0x6464('0x25')](handleEntityNotFound(_0xb48b4e,null))[_0x6464('0x25')](respondWithResult(_0xb48b4e,null))['catch'](handleError(_0xb48b4e,null));};exports['create']=function(_0x4db4d0,_0xac079){return db[_0x6464('0x2c')][_0x6464('0x48')](_0x4db4d0['body'],{})[_0x6464('0x25')](respondWithResult(_0xac079,0xc9))['catch'](handleError(_0xac079,null));};exports[_0x6464('0x24')]=function(_0x2dafd3,_0x4d4948){if(_0x2dafd3['body']['id']){delete _0x2dafd3[_0x6464('0x49')]['id'];}return db[_0x6464('0x2c')][_0x6464('0x47')]({'where':{'id':_0x2dafd3[_0x6464('0x46')]['id']}})['then'](handleEntityNotFound(_0x4d4948,null))['then'](saveUpdates(_0x2dafd3['body'],null))[_0x6464('0x25')](respondWithResult(_0x4d4948,null))[_0x6464('0x44')](handleError(_0x4d4948,null));};exports[_0x6464('0x26')]=function(_0x2fe418,_0xa50d10){return db[_0x6464('0x2c')][_0x6464('0x47')]({'where':{'id':_0x2fe418['params']['id']}})[_0x6464('0x25')](handleEntityNotFound(_0xa50d10,null))[_0x6464('0x25')](removeEntity(_0xa50d10,null))[_0x6464('0x44')](handleError(_0xa50d10,null));}; \ No newline at end of file +var _0x2db2=['desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','then','stack','name','send','map','FreshsalesField','type','model','query','filters','attributes','intersection','fields','length','hasOwnProperty','sort','where','pick','filter','VIRTUAL','merge','options','includeAll','findAll','rows','catch','show','params','keys','rawAttributes','create','update','find','body','destroy','eml-format','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','ejs','fs-extra','lodash'];(function(_0x330bb0,_0x4f695f){var _0x442278=function(_0x52d830){while(--_0x52d830){_0x330bb0['push'](_0x330bb0['shift']());}};_0x442278(++_0x4f695f);}(_0x2db2,0x149));var _0x22db=function(_0x5b8b97,_0x6b4dfa){_0x5b8b97=_0x5b8b97-0x0;var _0x1fdf84=_0x2db2[_0x5b8b97];return _0x1fdf84;};'use strict';var emlformat=require(_0x22db('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x22db('0x1'));var rp=require(_0x22db('0x2'));var moment=require(_0x22db('0x3'));var BPromise=require(_0x22db('0x4'));var Mustache=require(_0x22db('0x5'));var util=require('util');var path=require(_0x22db('0x6'));var sox=require(_0x22db('0x7'));var csv=require('to-csv');var ejs=require(_0x22db('0x8'));var fs=require('fs');var fs_extra=require(_0x22db('0x9'));var _=require(_0x22db('0xa'));var squel=require('squel');var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x22db('0xb'));var toCsv=require('to-csv');var querystring=require(_0x22db('0xc'));var Papa=require(_0x22db('0xd'));var Redis=require(_0x22db('0xe'));var authService=require(_0x22db('0xf'));var qs=require(_0x22db('0x10'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x22db('0x11'));var logger=require('../../config/logger')(_0x22db('0x12'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x22db('0x13'));var db=require(_0x22db('0x14'))['db'];function respondWithStatusCode(_0x455699,_0x5bf399){_0x5bf399=_0x5bf399||0xcc;return function(_0x4a7971){if(_0x4a7971){return _0x455699[_0x22db('0x15')](_0x5bf399);}return _0x455699[_0x22db('0x16')](_0x5bf399)[_0x22db('0x17')]();};}function respondWithResult(_0x2a755d,_0x1e0560){_0x1e0560=_0x1e0560||0xc8;return function(_0x9376c8){if(_0x9376c8){return _0x2a755d['status'](_0x1e0560)[_0x22db('0x18')](_0x9376c8);}};}function respondWithFilteredResult(_0x5305ad,_0x5604ef){return function(_0x5b08cb){if(_0x5b08cb){var _0x1deb35=typeof _0x5604ef[_0x22db('0x19')]===_0x22db('0x1a')&&typeof _0x5604ef[_0x22db('0x1b')]===_0x22db('0x1a');var _0x311fef=_0x5b08cb[_0x22db('0x1c')];var _0x14cebb=_0x1deb35?0x0:_0x5604ef[_0x22db('0x19')];var _0xc2c4b3=_0x1deb35?_0x5b08cb[_0x22db('0x1c')]:_0x5604ef[_0x22db('0x19')]+_0x5604ef[_0x22db('0x1b')];var _0xac96e7;if(_0xc2c4b3>=_0x311fef){_0xc2c4b3=_0x311fef;_0xac96e7=0xc8;}else{_0xac96e7=0xce;}_0x5305ad['status'](_0xac96e7);return _0x5305ad[_0x22db('0x1d')](_0x22db('0x1e'),_0x14cebb+'-'+_0xc2c4b3+'/'+_0x311fef)[_0x22db('0x18')](_0x5b08cb);}return null;};}function patchUpdates(_0x471f01){return function(_0x931b63){try{jsonpatch[_0x22db('0x1f')](_0x931b63,_0x471f01,!![]);}catch(_0x14f71a){return BPromise[_0x22db('0x20')](_0x14f71a);}return _0x931b63['save']();};}function saveUpdates(_0x417848,_0x4a5317){return function(_0x15587f){if(_0x15587f){return _0x15587f['update'](_0x417848)[_0x22db('0x21')](function(_0x6b9970){return _0x6b9970;});}return null;};}function removeEntity(_0xd4fec7,_0x56cb84){return function(_0x391691){if(_0x391691){return _0x391691['destroy']()[_0x22db('0x21')](function(){_0xd4fec7['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x12f5f5,_0x4b0c0b){return function(_0x2a2613){if(!_0x2a2613){_0x12f5f5[_0x22db('0x15')](0x194);}return _0x2a2613;};}function handleError(_0x16d56f,_0xcd86d2){_0xcd86d2=_0xcd86d2||0x1f4;return function(_0x41ff9c){logger['error'](_0x41ff9c[_0x22db('0x22')]);if(_0x41ff9c[_0x22db('0x23')]){delete _0x41ff9c[_0x22db('0x23')];}_0x16d56f[_0x22db('0x16')](_0xcd86d2)[_0x22db('0x24')](_0x41ff9c);};}exports['index']=function(_0x8fc536,_0x4723f9){var _0x373c21={},_0x29ccb3={},_0x4196bd={'count':0x0,'rows':[]};var _0x63c2b4=_[_0x22db('0x25')](db[_0x22db('0x26')]['rawAttributes'],function(_0x3bce6c){return{'name':_0x3bce6c['fieldName'],'type':_0x3bce6c[_0x22db('0x27')]['key']};});_0x29ccb3[_0x22db('0x28')]=_[_0x22db('0x25')](_0x63c2b4,_0x22db('0x23'));_0x29ccb3[_0x22db('0x29')]=_['keys'](_0x8fc536[_0x22db('0x29')]);_0x29ccb3[_0x22db('0x2a')]=_['intersection'](_0x29ccb3[_0x22db('0x28')],_0x29ccb3[_0x22db('0x29')]);_0x373c21[_0x22db('0x2b')]=_[_0x22db('0x2c')](_0x29ccb3['model'],qs[_0x22db('0x2d')](_0x8fc536[_0x22db('0x29')][_0x22db('0x2d')]));_0x373c21['attributes']=_0x373c21['attributes'][_0x22db('0x2e')]?_0x373c21[_0x22db('0x2b')]:_0x29ccb3['model'];if(!_0x8fc536['query'][_0x22db('0x2f')]('nolimit')){_0x373c21[_0x22db('0x1b')]=qs['limit'](_0x8fc536['query'][_0x22db('0x1b')]);_0x373c21[_0x22db('0x19')]=qs[_0x22db('0x19')](_0x8fc536[_0x22db('0x29')][_0x22db('0x19')]);}_0x373c21['order']=qs[_0x22db('0x30')](_0x8fc536[_0x22db('0x29')][_0x22db('0x30')]);_0x373c21[_0x22db('0x31')]=qs['filters'](_[_0x22db('0x32')](_0x8fc536['query'],_0x29ccb3['filters']),_0x63c2b4);if(_0x8fc536['query'][_0x22db('0x33')]){_0x373c21[_0x22db('0x31')]=_['merge'](_0x373c21[_0x22db('0x31')],{'$or':_['map'](_0x63c2b4,function(_0x887f8e){if(_0x887f8e[_0x22db('0x27')]!==_0x22db('0x34')){var _0x10f93d={};_0x10f93d[_0x887f8e[_0x22db('0x23')]]={'$like':'%'+_0x8fc536[_0x22db('0x29')][_0x22db('0x33')]+'%'};return _0x10f93d;}})});}_0x373c21=_[_0x22db('0x35')]({},_0x373c21,_0x8fc536[_0x22db('0x36')]);var _0x196a18={'where':_0x373c21[_0x22db('0x31')]};return db['FreshsalesField']['count'](_0x196a18)[_0x22db('0x21')](function(_0x5cbcdb){_0x4196bd['count']=_0x5cbcdb;if(_0x8fc536['query'][_0x22db('0x37')]){_0x373c21['include']=[{'all':!![]}];}return db[_0x22db('0x26')][_0x22db('0x38')](_0x373c21);})[_0x22db('0x21')](function(_0x43cc21){_0x4196bd[_0x22db('0x39')]=_0x43cc21;return _0x4196bd;})[_0x22db('0x21')](respondWithFilteredResult(_0x4723f9,_0x373c21))[_0x22db('0x3a')](handleError(_0x4723f9,null));};exports[_0x22db('0x3b')]=function(_0x4b705e,_0x167fdc){var _0x2698ae={'raw':!![],'where':{'id':_0x4b705e[_0x22db('0x3c')]['id']}},_0x44b870={};_0x44b870['model']=_[_0x22db('0x3d')](db[_0x22db('0x26')][_0x22db('0x3e')]);_0x44b870['query']=_['keys'](_0x4b705e['query']);_0x44b870[_0x22db('0x2a')]=_[_0x22db('0x2c')](_0x44b870[_0x22db('0x28')],_0x44b870[_0x22db('0x29')]);_0x2698ae[_0x22db('0x2b')]=_['intersection'](_0x44b870['model'],qs[_0x22db('0x2d')](_0x4b705e[_0x22db('0x29')][_0x22db('0x2d')]));_0x2698ae[_0x22db('0x2b')]=_0x2698ae[_0x22db('0x2b')][_0x22db('0x2e')]?_0x2698ae['attributes']:_0x44b870[_0x22db('0x28')];if(_0x4b705e[_0x22db('0x29')][_0x22db('0x37')]){_0x2698ae['include']=[{'all':!![]}];}_0x2698ae=_['merge']({},_0x2698ae,_0x4b705e['options']);return db[_0x22db('0x26')]['find'](_0x2698ae)['then'](handleEntityNotFound(_0x167fdc,null))['then'](respondWithResult(_0x167fdc,null))[_0x22db('0x3a')](handleError(_0x167fdc,null));};exports[_0x22db('0x3f')]=function(_0x55bfda,_0x1f726e){return db[_0x22db('0x26')][_0x22db('0x3f')](_0x55bfda['body'],{})[_0x22db('0x21')](respondWithResult(_0x1f726e,0xc9))['catch'](handleError(_0x1f726e,null));};exports[_0x22db('0x40')]=function(_0x285e8a,_0x272b80){if(_0x285e8a['body']['id']){delete _0x285e8a['body']['id'];}return db[_0x22db('0x26')][_0x22db('0x41')]({'where':{'id':_0x285e8a[_0x22db('0x3c')]['id']}})[_0x22db('0x21')](handleEntityNotFound(_0x272b80,null))[_0x22db('0x21')](saveUpdates(_0x285e8a[_0x22db('0x42')],null))[_0x22db('0x21')](respondWithResult(_0x272b80,null))['catch'](handleError(_0x272b80,null));};exports[_0x22db('0x43')]=function(_0x388615,_0x49d5c2){return db[_0x22db('0x26')][_0x22db('0x41')]({'where':{'id':_0x388615[_0x22db('0x3c')]['id']}})[_0x22db('0x21')](handleEntityNotFound(_0x49d5c2,null))[_0x22db('0x21')](removeEntity(_0x49d5c2,null))['catch'](handleError(_0x49d5c2,null));}; \ No newline at end of file diff --git a/server/api/intFreshsalesField/intFreshsalesField.model.js b/server/api/intFreshsalesField/intFreshsalesField.model.js index 9397939..1a60d57 100644 --- a/server/api/intFreshsalesField/intFreshsalesField.model.js +++ b/server/api/intFreshsalesField/intFreshsalesField.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x065e=['int_freshsales_fields','idField','FieldId','lodash','moment','bluebird','request-promise','../../config/environment','./intFreshsalesField.attributes','define'];(function(_0x101380,_0x1d7c22){var _0x39e846=function(_0x5d0933){while(--_0x5d0933){_0x101380['push'](_0x101380['shift']());}};_0x39e846(++_0x1d7c22);}(_0x065e,0x1a7));var _0xe065=function(_0x137f62,_0x194abe){_0x137f62=_0x137f62-0x0;var _0x318cfd=_0x065e[_0x137f62];return _0x318cfd;};'use strict';var _=require(_0xe065('0x0'));var util=require('util');var logger=require('../../config/logger')('api');var moment=require(_0xe065('0x1'));var BPromise=require(_0xe065('0x2'));var rp=require(_0xe065('0x3'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0xe065('0x4'));var attributes=require(_0xe065('0x5'));module['exports']=function(_0x10b45f,_0x1e7e69){return _0x10b45f[_0xe065('0x6')]('FreshsalesField',attributes,{'tableName':_0xe065('0x7'),'paranoid':![],'indexes':[{'name':'freshsales_unique_index','fields':[_0xe065('0x8'),_0xe065('0x9')],'unique':!![]}],'timestamps':!![]});}; \ No newline at end of file +var _0xe486=['idField','lodash','util','../../config/logger','api','moment','bluebird','request-promise','../../config/environment','./intFreshsalesField.attributes','exports','define','FreshsalesField','int_freshsales_fields','freshsales_unique_index'];(function(_0x25df80,_0xa2aec5){var _0x17b6d0=function(_0x446155){while(--_0x446155){_0x25df80['push'](_0x25df80['shift']());}};_0x17b6d0(++_0xa2aec5);}(_0xe486,0x6a));var _0x6e48=function(_0x573cc1,_0x2179e3){_0x573cc1=_0x573cc1-0x0;var _0x22b90b=_0xe486[_0x573cc1];return _0x22b90b;};'use strict';var _=require(_0x6e48('0x0'));var util=require(_0x6e48('0x1'));var logger=require(_0x6e48('0x2'))(_0x6e48('0x3'));var moment=require(_0x6e48('0x4'));var BPromise=require(_0x6e48('0x5'));var rp=require(_0x6e48('0x6'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x6e48('0x7'));var attributes=require(_0x6e48('0x8'));module[_0x6e48('0x9')]=function(_0x404e2f,_0x5e77f1){return _0x404e2f[_0x6e48('0xa')](_0x6e48('0xb'),attributes,{'tableName':_0x6e48('0xc'),'paranoid':![],'indexes':[{'name':_0x6e48('0xd'),'fields':[_0x6e48('0xe'),'FieldId'],'unique':!![]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intFreshsalesField/intFreshsalesField.rpc.js b/server/api/intFreshsalesField/intFreshsalesField.rpc.js index e7df8b8..7830931 100644 --- a/server/api/intFreshsalesField/intFreshsalesField.rpc.js +++ b/server/api/intFreshsalesField/intFreshsalesField.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4c60=['client','http','request','then','debug','request\x20sent','stringify','error','code','FreshsalesField,\x20%s,\x20%s','message','info','catch','lodash','util','moment','bluebird','ioredis','../../config/environment','jayson/promise'];(function(_0x23aac0,_0x50c3aa){var _0x1bb0e3=function(_0x3499e6){while(--_0x3499e6){_0x23aac0['push'](_0x23aac0['shift']());}};_0x1bb0e3(++_0x50c3aa);}(_0x4c60,0xc1));var _0x04c6=function(_0xbba9bd,_0x18145c){_0xbba9bd=_0xbba9bd-0x0;var _0x550337=_0x4c60[_0xbba9bd];return _0x550337;};'use strict';var _=require(_0x04c6('0x0'));var util=require(_0x04c6('0x1'));var moment=require(_0x04c6('0x2'));var BPromise=require(_0x04c6('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x04c6('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0x04c6('0x5'));var jayson=require(_0x04c6('0x6'));var client=jayson[_0x04c6('0x7')][_0x04c6('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x2b9041,_0x39be2d,_0x8f9b13){return new BPromise(function(_0x530a48,_0x2a4b51){return client[_0x04c6('0x9')](_0x2b9041,_0x8f9b13)[_0x04c6('0xa')](function(_0x30b901){logger['info']('FreshsalesField,\x20%s,\x20%s',_0x39be2d,'request\x20sent');logger[_0x04c6('0xb')]('FreshsalesField,\x20%s,\x20%s,\x20%s',_0x39be2d,_0x04c6('0xc'),JSON[_0x04c6('0xd')](_0x30b901));if(_0x30b901['error']){if(_0x30b901[_0x04c6('0xe')][_0x04c6('0xf')]===0x1f4){logger[_0x04c6('0xe')](_0x04c6('0x10'),_0x39be2d,_0x30b901['error'][_0x04c6('0x11')]);return _0x2a4b51(_0x30b901[_0x04c6('0xe')][_0x04c6('0x11')]);}logger['error'](_0x04c6('0x10'),_0x39be2d,_0x30b901[_0x04c6('0xe')][_0x04c6('0x11')]);return _0x530a48(_0x30b901[_0x04c6('0xe')][_0x04c6('0x11')]);}else{logger[_0x04c6('0x12')](_0x04c6('0x10'),_0x39be2d,_0x04c6('0xc'));_0x530a48(_0x30b901['result'][_0x04c6('0x11')]);}})[_0x04c6('0x13')](function(_0x382e58){logger[_0x04c6('0xe')](_0x04c6('0x10'),_0x39be2d,_0x382e58);_0x2a4b51(_0x382e58);});});} \ No newline at end of file +var _0x524e=['randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','FreshsalesField,\x20%s,\x20%s','request\x20sent','debug','FreshsalesField,\x20%s,\x20%s,\x20%s','stringify','error','code','message','moment','bluebird'];(function(_0x550aed,_0x1ba6cb){var _0x1c43a5=function(_0x39e5f7){while(--_0x39e5f7){_0x550aed['push'](_0x550aed['shift']());}};_0x1c43a5(++_0x1ba6cb);}(_0x524e,0x15e));var _0xe524=function(_0x1819df,_0xc49f72){_0x1819df=_0x1819df-0x0;var _0x4e8cc5=_0x524e[_0x1819df];return _0x4e8cc5;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xe524('0x0'));var BPromise=require(_0xe524('0x1'));var rs=require(_0xe524('0x2'));var fs=require('fs');var Redis=require(_0xe524('0x3'));var db=require(_0xe524('0x4'))['db'];var utils=require(_0xe524('0x5'));var logger=require(_0xe524('0x6'))(_0xe524('0x7'));var config=require(_0xe524('0x8'));var jayson=require(_0xe524('0x9'));var client=jayson['client'][_0xe524('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x41e1a3,_0x347bed,_0x533c14){return new BPromise(function(_0x384935,_0x3e4cda){return client[_0xe524('0xb')](_0x41e1a3,_0x533c14)[_0xe524('0xc')](function(_0x991924){logger[_0xe524('0xd')](_0xe524('0xe'),_0x347bed,_0xe524('0xf'));logger[_0xe524('0x10')](_0xe524('0x11'),_0x347bed,_0xe524('0xf'),JSON[_0xe524('0x12')](_0x991924));if(_0x991924[_0xe524('0x13')]){if(_0x991924[_0xe524('0x13')][_0xe524('0x14')]===0x1f4){logger[_0xe524('0x13')]('FreshsalesField,\x20%s,\x20%s',_0x347bed,_0x991924['error'][_0xe524('0x15')]);return _0x3e4cda(_0x991924[_0xe524('0x13')][_0xe524('0x15')]);}logger[_0xe524('0x13')](_0xe524('0xe'),_0x347bed,_0x991924['error'][_0xe524('0x15')]);return _0x384935(_0x991924['error'][_0xe524('0x15')]);}else{logger[_0xe524('0xd')]('FreshsalesField,\x20%s,\x20%s',_0x347bed,_0xe524('0xf'));_0x384935(_0x991924['result'][_0xe524('0x15')]);}})['catch'](function(_0x29a031){logger['error']('FreshsalesField,\x20%s,\x20%s',_0x347bed,_0x29a031);_0x3e4cda(_0x29a031);});});} \ No newline at end of file diff --git a/server/api/intSalesforceAccount/index.js b/server/api/intSalesforceAccount/index.js index 248895d..2e54338 100644 --- a/server/api/intSalesforceAccount/index.js +++ b/server/api/intSalesforceAccount/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','./intSalesforceAccount.controller','get','isAuthenticated','index','/:id','show','getConfigurations','/:id/fields','getFields','post','create','addConfiguration','put','update','delete','destroy','exports','multer','util','path'];(function(_0x25c75c,_0x5b0ec5){var _0x38e731=function(_0x500f13){while(--_0x500f13){_0x25c75c['push'](_0x25c75c['shift']());}};_0x38e731(++_0x5b0ec5);}(_0x9957,0x93));var _0x7995=function(_0x2f5ac5,_0x1ee939){_0x2f5ac5=_0x2f5ac5-0x0;var _0x37c9a8=_0x9957[_0x2f5ac5];return _0x37c9a8;};'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/configurations',auth[_0x7995('0xa')](),controller[_0x7995('0xe')]);router[_0x7995('0x9')](_0x7995('0xf'),auth[_0x7995('0xa')](),controller[_0x7995('0x10')]);router[_0x7995('0x11')]('/',auth['isAuthenticated'](),controller[_0x7995('0x12')]);router[_0x7995('0x11')]('/:id/configurations',auth[_0x7995('0xa')](),controller[_0x7995('0x13')]);router[_0x7995('0x14')](_0x7995('0xc'),auth[_0x7995('0xa')](),controller[_0x7995('0x15')]);router[_0x7995('0x16')]('/:id',auth['isAuthenticated'](),controller[_0x7995('0x17')]);module[_0x7995('0x18')]=router; \ No newline at end of file +var _0xa9e0=['Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./intSalesforceAccount.controller','get','index','/:id','getConfigurations','/:id/fields','isAuthenticated','getFields','post','addConfiguration','put','update','destroy','exports','multer','util','path'];(function(_0x299ee9,_0x3106fa){var _0x3125e8=function(_0xc10908){while(--_0xc10908){_0x299ee9['push'](_0x299ee9['shift']());}};_0x3125e8(++_0x3106fa);}(_0xa9e0,0x123));var _0x0a9e=function(_0x220dbb,_0x99328d){_0x220dbb=_0x220dbb-0x0;var _0x2b77de=_0xa9e0[_0x220dbb];return _0x2b77de;};'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('0x8')]('/:id/configurations',auth['isAuthenticated'](),controller[_0x0a9e('0xb')]);router[_0x0a9e('0x8')](_0x0a9e('0xc'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0xe')]);router[_0x0a9e('0xf')]('/',auth['isAuthenticated'](),controller['create']);router['post']('/:id/configurations',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x10')]);router[_0x0a9e('0x11')](_0x0a9e('0xa'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x12')]);router['delete'](_0x0a9e('0xa'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x13')]);module[_0x0a9e('0x14')]=router; \ No newline at end of file diff --git a/server/api/intSalesforceAccount/intSalesforceAccount.attributes.js b/server/api/intSalesforceAccount/intSalesforceAccount.attributes.js index d94fdd0..4f17e13 100644 --- a/server/api/intSalesforceAccount/intSalesforceAccount.attributes.js +++ b/server/api/intSalesforceAccount/intSalesforceAccount.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5eef=['STRING','newTab','integrationTab'];(function(_0xd67dd9,_0x26b695){var _0x32ee5f=function(_0x117600){while(--_0x117600){_0xd67dd9['push'](_0xd67dd9['shift']());}};_0x32ee5f(++_0x26b695);}(_0x5eef,0x9c));var _0xf5ee=function(_0x2a4966,_0x1722ac){_0x2a4966=_0x2a4966-0x0;var _0x407841=_0x5eef[_0x2a4966];return _0x407841;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0xf5ee('0x0')]},'description':{'type':Sequelize['STRING']},'username':{'type':Sequelize[_0xf5ee('0x0')],'unique':'username'},'remoteUri':{'type':Sequelize[_0xf5ee('0x0')]},'password':{'type':Sequelize[_0xf5ee('0x0')]},'clientId':{'type':Sequelize[_0xf5ee('0x0')]},'clientSecret':{'type':Sequelize[_0xf5ee('0x0')]},'securityToken':{'type':Sequelize[_0xf5ee('0x0')]},'serverUrl':{'type':Sequelize['STRING'],'allowNull':![]},'type':{'type':Sequelize['ENUM']('integrationTab',_0xf5ee('0x1')),'defaultValue':_0xf5ee('0x2')}}; \ No newline at end of file +var _0x5601=['STRING','ENUM','integrationTab','sequelize'];(function(_0x1eb4c6,_0x1f9124){var _0x10df2f=function(_0x2cc9fd){while(--_0x2cc9fd){_0x1eb4c6['push'](_0x1eb4c6['shift']());}};_0x10df2f(++_0x1f9124);}(_0x5601,0x1cf));var _0x1560=function(_0x18d078,_0x4b83aa){_0x18d078=_0x18d078-0x0;var _0x2a79d2=_0x5601[_0x18d078];return _0x2a79d2;};'use strict';var Sequelize=require(_0x1560('0x0'));module['exports']={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x1560('0x1')]},'username':{'type':Sequelize[_0x1560('0x1')],'unique':'username'},'remoteUri':{'type':Sequelize[_0x1560('0x1')]},'password':{'type':Sequelize[_0x1560('0x1')]},'clientId':{'type':Sequelize['STRING']},'clientSecret':{'type':Sequelize[_0x1560('0x1')]},'securityToken':{'type':Sequelize[_0x1560('0x1')]},'serverUrl':{'type':Sequelize[_0x1560('0x1')],'allowNull':![]},'type':{'type':Sequelize[_0x1560('0x2')]('integrationTab','newTab'),'defaultValue':_0x1560('0x3')}}; \ No newline at end of file diff --git a/server/api/intSalesforceAccount/intSalesforceAccount.controller.js b/server/api/intSalesforceAccount/intSalesforceAccount.controller.js index 54d2630..4c97f94 100644 --- a/server/api/intSalesforceAccount/intSalesforceAccount.controller.js +++ b/server/api/intSalesforceAccount/intSalesforceAccount.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x83d7=['http','request','info','SalesforceAccount,\x20%s,\x20%s','request\x20sent','SalesforceAccount,\x20%s,\x20%s,\x20%s','stringify','code','error','message','sendStatus','status','json','offset','limit','undefined','count','set','Content-Range','apply','save','update','then','destroy','stack','name','send','map','SalesforceAccount','rawAttributes','fieldName','type','key','model','query','keys','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','filters','pick','filter','where','merge','options','includeAll','include','rows','catch','show','params','find','create','body','getConfigurations','findOne','SalesforceConfiguration','addConfiguration','AccountId','Subjects','getSubjects','channel','Descriptions','SalesforceField','getFields','Task','remoteUri','clientSecret','username','slice','substring','lastIndexOf','Connection','clientId','login','password','concat','securityToken','ticketType','sobject','describe','OwnerId','ActivityDate','IsReminderSet','IsRecurrence','Subject','Description','string','picklist','boolean','email','phone','includes','label','custom','picklistValues','True','true','False','false','test','getFields,\x20%s,\x20%s,\x20%s','Wrong\x20credentials','statusCode','eml-format','rimraf','zip-dir','moment','bluebird','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','client'];(function(_0x212a37,_0xf35b2e){var _0x5d0bf9=function(_0x51850f){while(--_0x51850f){_0x212a37['push'](_0x212a37['shift']());}};_0x5d0bf9(++_0xf35b2e);}(_0x83d7,0x6d));var _0x783d=function(_0x2f3848,_0x48564d){_0x2f3848=_0x2f3848-0x0;var _0x102668=_0x83d7[_0x2f3848];return _0x102668;};'use strict';var emlformat=require(_0x783d('0x0'));var rimraf=require(_0x783d('0x1'));var zipdir=require(_0x783d('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x783d('0x3'));var BPromise=require(_0x783d('0x4'));var Mustache=require('mustache');var util=require('util');var path=require(_0x783d('0x5'));var sox=require(_0x783d('0x6'));var csv=require(_0x783d('0x7'));var ejs=require(_0x783d('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x783d('0x9'));var squel=require(_0x783d('0xa'));var crypto=require(_0x783d('0xb'));var jsforce=require(_0x783d('0xc'));var deskjs=require(_0x783d('0xd'));var toCsv=require(_0x783d('0x7'));var querystring=require(_0x783d('0xe'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x783d('0xf'));var qs=require('../../components/parsers/qs');var as=require(_0x783d('0x10'));var hardwareService=require(_0x783d('0x11'));var logger=require(_0x783d('0x12'))(_0x783d('0x13'));var utils=require('../../config/utils');var config=require(_0x783d('0x14'));var licenseUtil=require(_0x783d('0x15'));var db=require(_0x783d('0x16'))['db'];var integrations=require('../../components/integrations/configuration');var jayson=require('jayson/promise');var client=jayson[_0x783d('0x17')][_0x783d('0x18')]({'port':0x232a});function respondWithRpcPromise(_0x23d5d4,_0x18fab7,_0xcd528e,_0x5e60f3){return new BPromise(function(_0x15fcae,_0x51f9ef){var _0x2d0850=_0x5e60f3||client;return _0x2d0850[_0x783d('0x19')](_0x23d5d4,_0xcd528e)['then'](function(_0xac709){logger[_0x783d('0x1a')](_0x783d('0x1b'),_0x18fab7,_0x783d('0x1c'));logger['debug'](_0x783d('0x1d'),_0x18fab7,_0x783d('0x1c'),JSON[_0x783d('0x1e')](_0xac709));if(_0xac709['error']){if(_0xac709['error'][_0x783d('0x1f')]===0x1f4){logger[_0x783d('0x20')](_0x783d('0x1b'),_0x18fab7,_0xac709[_0x783d('0x20')][_0x783d('0x21')]);return _0x51f9ef(_0xac709['error']['message']);}logger[_0x783d('0x20')]('SalesforceAccount,\x20%s,\x20%s',_0x18fab7,_0xac709[_0x783d('0x20')][_0x783d('0x21')]);return _0x15fcae(_0xac709[_0x783d('0x20')][_0x783d('0x21')]);}else{logger[_0x783d('0x1a')]('SalesforceAccount,\x20%s,\x20%s',_0x18fab7,_0x783d('0x1c'));_0x15fcae(_0xac709['result']['message']);}})['catch'](function(_0x4abe3b){logger[_0x783d('0x20')](_0x783d('0x1b'),_0x18fab7,_0x4abe3b);_0x51f9ef(_0x4abe3b);});});}function respondWithStatusCode(_0x2c002a,_0x14b834){_0x14b834=_0x14b834||0xcc;return function(_0x5d54cb){if(_0x5d54cb){return _0x2c002a[_0x783d('0x22')](_0x14b834);}return _0x2c002a[_0x783d('0x23')](_0x14b834)['end']();};}function respondWithResult(_0x5b7063,_0x34babb){_0x34babb=_0x34babb||0xc8;return function(_0x18dd57){if(_0x18dd57){return _0x5b7063[_0x783d('0x23')](_0x34babb)[_0x783d('0x24')](_0x18dd57);}};}function respondWithFilteredResult(_0xdb0a00,_0x4aab9c){return function(_0x15b5ed){if(_0x15b5ed){var _0x5dd928=typeof _0x4aab9c[_0x783d('0x25')]==='undefined'&&typeof _0x4aab9c[_0x783d('0x26')]===_0x783d('0x27');var _0x48fd90=_0x15b5ed['count'];var _0x17ba91=_0x5dd928?0x0:_0x4aab9c[_0x783d('0x25')];var _0x197e31=_0x5dd928?_0x15b5ed[_0x783d('0x28')]:_0x4aab9c[_0x783d('0x25')]+_0x4aab9c[_0x783d('0x26')];var _0x9b505e;if(_0x197e31>=_0x48fd90){_0x197e31=_0x48fd90;_0x9b505e=0xc8;}else{_0x9b505e=0xce;}_0xdb0a00[_0x783d('0x23')](_0x9b505e);return _0xdb0a00[_0x783d('0x29')](_0x783d('0x2a'),_0x17ba91+'-'+_0x197e31+'/'+_0x48fd90)[_0x783d('0x24')](_0x15b5ed);}return null;};}function patchUpdates(_0x3a4573){return function(_0x173c34){try{jsonpatch[_0x783d('0x2b')](_0x173c34,_0x3a4573,!![]);}catch(_0x475bbe){return BPromise['reject'](_0x475bbe);}return _0x173c34[_0x783d('0x2c')]();};}function saveUpdates(_0x2cfa9e,_0x44e131){return function(_0x81cc4c){if(_0x81cc4c){return _0x81cc4c[_0x783d('0x2d')](_0x2cfa9e)[_0x783d('0x2e')](function(_0x1b475a){return _0x1b475a;});}return null;};}function removeEntity(_0x2a3044,_0x2556a8){return function(_0x397517){if(_0x397517){return _0x397517[_0x783d('0x2f')]()[_0x783d('0x2e')](function(){_0x2a3044[_0x783d('0x23')](0xcc)['end']();});}};}function handleEntityNotFound(_0x599952,_0x258464){return function(_0x1dec7b){if(!_0x1dec7b){_0x599952['sendStatus'](0x194);}return _0x1dec7b;};}function handleError(_0x341065,_0x1cfc2a){_0x1cfc2a=_0x1cfc2a||0x1f4;return function(_0x43f01b){logger[_0x783d('0x20')](_0x43f01b[_0x783d('0x30')]);if(_0x43f01b[_0x783d('0x31')]){delete _0x43f01b[_0x783d('0x31')];}_0x341065[_0x783d('0x23')](_0x1cfc2a)[_0x783d('0x32')](_0x43f01b);};}exports['index']=function(_0xf168fb,_0x118f50){var _0x3bdd56={},_0x518a9a={},_0xec03e6={'count':0x0,'rows':[]};var _0x3aa037=_[_0x783d('0x33')](db[_0x783d('0x34')][_0x783d('0x35')],function(_0x26385a){return{'name':_0x26385a[_0x783d('0x36')],'type':_0x26385a[_0x783d('0x37')][_0x783d('0x38')]};});_0x518a9a[_0x783d('0x39')]=_[_0x783d('0x33')](_0x3aa037,_0x783d('0x31'));_0x518a9a[_0x783d('0x3a')]=_[_0x783d('0x3b')](_0xf168fb[_0x783d('0x3a')]);_0x518a9a['filters']=_[_0x783d('0x3c')](_0x518a9a['model'],_0x518a9a[_0x783d('0x3a')]);_0x3bdd56[_0x783d('0x3d')]=_[_0x783d('0x3c')](_0x518a9a[_0x783d('0x39')],qs[_0x783d('0x3e')](_0xf168fb[_0x783d('0x3a')][_0x783d('0x3e')]));_0x3bdd56[_0x783d('0x3d')]=_0x3bdd56[_0x783d('0x3d')][_0x783d('0x3f')]?_0x3bdd56[_0x783d('0x3d')]:_0x518a9a[_0x783d('0x39')];if(!_0xf168fb[_0x783d('0x3a')][_0x783d('0x40')](_0x783d('0x41'))){_0x3bdd56[_0x783d('0x26')]=qs[_0x783d('0x26')](_0xf168fb[_0x783d('0x3a')][_0x783d('0x26')]);_0x3bdd56['offset']=qs[_0x783d('0x25')](_0xf168fb[_0x783d('0x3a')][_0x783d('0x25')]);}_0x3bdd56[_0x783d('0x42')]=qs['sort'](_0xf168fb['query'][_0x783d('0x43')]);_0x3bdd56['where']=qs[_0x783d('0x44')](_[_0x783d('0x45')](_0xf168fb[_0x783d('0x3a')],_0x518a9a[_0x783d('0x44')]),_0x3aa037);if(_0xf168fb[_0x783d('0x3a')][_0x783d('0x46')]){_0x3bdd56[_0x783d('0x47')]=_[_0x783d('0x48')](_0x3bdd56['where'],{'$or':_[_0x783d('0x33')](_0x3aa037,function(_0x4743a4){if(_0x4743a4['type']!=='VIRTUAL'){var _0x1bb51d={};_0x1bb51d[_0x4743a4['name']]={'$like':'%'+_0xf168fb['query']['filter']+'%'};return _0x1bb51d;}})});}_0x3bdd56=_[_0x783d('0x48')]({},_0x3bdd56,_0xf168fb[_0x783d('0x49')]);var _0x1f3209={'where':_0x3bdd56['where']};return db[_0x783d('0x34')]['count'](_0x1f3209)[_0x783d('0x2e')](function(_0xbd5544){_0xec03e6[_0x783d('0x28')]=_0xbd5544;if(_0xf168fb[_0x783d('0x3a')][_0x783d('0x4a')]){_0x3bdd56[_0x783d('0x4b')]=[{'all':!![]}];}return db[_0x783d('0x34')]['findAll'](_0x3bdd56);})[_0x783d('0x2e')](function(_0x10f731){_0xec03e6[_0x783d('0x4c')]=_0x10f731;return _0xec03e6;})[_0x783d('0x2e')](respondWithFilteredResult(_0x118f50,_0x3bdd56))[_0x783d('0x4d')](handleError(_0x118f50,null));};exports[_0x783d('0x4e')]=function(_0x85f6c7,_0x136ae6){var _0xf81656={'raw':![],'where':{'id':_0x85f6c7[_0x783d('0x4f')]['id']}},_0x2a7b35={};_0x2a7b35[_0x783d('0x39')]=_[_0x783d('0x3b')](db['SalesforceAccount'][_0x783d('0x35')]);_0x2a7b35['query']=_[_0x783d('0x3b')](_0x85f6c7[_0x783d('0x3a')]);_0x2a7b35['filters']=_[_0x783d('0x3c')](_0x2a7b35[_0x783d('0x39')],_0x2a7b35[_0x783d('0x3a')]);_0xf81656[_0x783d('0x3d')]=_[_0x783d('0x3c')](_0x2a7b35['model'],qs[_0x783d('0x3e')](_0x85f6c7[_0x783d('0x3a')]['fields']));_0xf81656[_0x783d('0x3d')]=_0xf81656[_0x783d('0x3d')][_0x783d('0x3f')]?_0xf81656[_0x783d('0x3d')]:_0x2a7b35[_0x783d('0x39')];if(_0x85f6c7[_0x783d('0x3a')][_0x783d('0x4a')]){_0xf81656[_0x783d('0x4b')]=[{'all':!![]}];}_0xf81656=_[_0x783d('0x48')]({},_0xf81656,_0x85f6c7[_0x783d('0x49')]);return db['SalesforceAccount'][_0x783d('0x50')](_0xf81656)[_0x783d('0x2e')](handleEntityNotFound(_0x136ae6,null))['then'](respondWithResult(_0x136ae6,null))['catch'](handleError(_0x136ae6,null));};exports[_0x783d('0x51')]=function(_0xabb5e2,_0x5b4174){return db['SalesforceAccount']['create'](_0xabb5e2[_0x783d('0x52')],{})['then'](respondWithResult(_0x5b4174,0xc9))[_0x783d('0x4d')](handleError(_0x5b4174,null));};exports[_0x783d('0x2d')]=function(_0x275b80,_0x39c006){if(_0x275b80[_0x783d('0x52')]['id']){delete _0x275b80[_0x783d('0x52')]['id'];}return db[_0x783d('0x34')][_0x783d('0x50')]({'where':{'id':_0x275b80['params']['id']}})[_0x783d('0x2e')](handleEntityNotFound(_0x39c006,null))[_0x783d('0x2e')](saveUpdates(_0x275b80[_0x783d('0x52')],null))['then'](respondWithResult(_0x39c006,null))[_0x783d('0x4d')](handleError(_0x39c006,null));};exports[_0x783d('0x2f')]=function(_0x56e8a8,_0x976702){return db['SalesforceAccount'][_0x783d('0x50')]({'where':{'id':_0x56e8a8[_0x783d('0x4f')]['id']}})[_0x783d('0x2e')](handleEntityNotFound(_0x976702,null))[_0x783d('0x2e')](removeEntity(_0x976702,null))[_0x783d('0x4d')](handleError(_0x976702,null));};exports[_0x783d('0x53')]=function(_0x5485ca,_0x2f5d11,_0x204d8f){var _0x2eb60d={};var _0x44cbf7={};var _0x57977d;var _0x1baa14;return db[_0x783d('0x34')][_0x783d('0x54')]({'where':{'id':_0x5485ca[_0x783d('0x4f')]['id']}})[_0x783d('0x2e')](handleEntityNotFound(_0x2f5d11,null))['then'](function(_0x4841f1){if(_0x4841f1){_0x57977d=_0x4841f1;_0x44cbf7[_0x783d('0x39')]=_[_0x783d('0x3b')](db[_0x783d('0x55')]['rawAttributes']);_0x44cbf7['query']=_[_0x783d('0x3b')](_0x5485ca[_0x783d('0x3a')]);_0x44cbf7[_0x783d('0x44')]=_[_0x783d('0x3c')](_0x44cbf7[_0x783d('0x39')],_0x44cbf7[_0x783d('0x3a')]);_0x2eb60d[_0x783d('0x3d')]=_[_0x783d('0x3c')](_0x44cbf7[_0x783d('0x39')],qs[_0x783d('0x3e')](_0x5485ca['query'][_0x783d('0x3e')]));_0x2eb60d[_0x783d('0x3d')]=_0x2eb60d[_0x783d('0x3d')]['length']?_0x2eb60d[_0x783d('0x3d')]:_0x44cbf7[_0x783d('0x39')];_0x2eb60d[_0x783d('0x42')]=qs[_0x783d('0x43')](_0x5485ca['query']['sort']);_0x2eb60d[_0x783d('0x47')]=qs['filters'](_['pick'](_0x5485ca['query'],_0x44cbf7['filters']));if(_0x5485ca[_0x783d('0x3a')][_0x783d('0x46')]){_0x2eb60d[_0x783d('0x47')]=_[_0x783d('0x48')](_0x2eb60d[_0x783d('0x47')],{'$or':_[_0x783d('0x33')](_0x2eb60d[_0x783d('0x3d')],function(_0x146815){var _0x2006aa={};_0x2006aa[_0x146815]={'$like':'%'+_0x5485ca[_0x783d('0x3a')][_0x783d('0x46')]+'%'};return _0x2006aa;})});}_0x2eb60d=_['merge']({},_0x2eb60d,_0x5485ca[_0x783d('0x49')]);return _0x57977d[_0x783d('0x53')](_0x2eb60d);}})[_0x783d('0x2e')](function(_0x281662){if(_0x281662){_0x1baa14=_0x281662[_0x783d('0x3f')];if(!_0x5485ca[_0x783d('0x3a')][_0x783d('0x40')]('nolimit')){_0x2eb60d[_0x783d('0x26')]=qs['limit'](_0x5485ca[_0x783d('0x3a')][_0x783d('0x26')]);_0x2eb60d['offset']=qs[_0x783d('0x25')](_0x5485ca[_0x783d('0x3a')][_0x783d('0x25')]);}return _0x57977d['getConfigurations'](_0x2eb60d);}})['then'](function(_0x59f16d){if(_0x59f16d){return _0x59f16d?{'count':_0x1baa14,'rows':_0x59f16d}:null;}})[_0x783d('0x2e')](respondWithResult(_0x2f5d11,null))[_0x783d('0x4d')](handleError(_0x2f5d11,null));};exports[_0x783d('0x56')]=function(_0x12a109,_0x199391,_0x491a5f){if(_0x12a109[_0x783d('0x52')]['id']){delete _0x12a109[_0x783d('0x52')]['id'];}return db[_0x783d('0x34')][_0x783d('0x54')]({'where':{'id':_0x12a109[_0x783d('0x4f')]['id']}})[_0x783d('0x2e')](handleEntityNotFound(_0x199391,null))['then'](function(_0xdb91f7){if(_0xdb91f7){_0x12a109[_0x783d('0x52')][_0x783d('0x57')]=_0xdb91f7['id'];_0x12a109[_0x783d('0x52')][_0x783d('0x58')]=integrations[_0x783d('0x59')](_0x12a109[_0x783d('0x52')][_0x783d('0x5a')],_0x12a109['body']['type']);_0x12a109['body'][_0x783d('0x5b')]=integrations['getDescriptions'](_0x12a109[_0x783d('0x52')][_0x783d('0x5a')],_0x12a109['body'][_0x783d('0x37')]);return db[_0x783d('0x55')][_0x783d('0x51')](_0x12a109[_0x783d('0x52')],{'include':[{'model':db[_0x783d('0x5c')],'as':_0x783d('0x58')},{'model':db[_0x783d('0x5c')],'as':_0x783d('0x5b')}]});}return null;})[_0x783d('0x2e')](respondWithResult(_0x199391,null))[_0x783d('0x4d')](handleError(_0x199391,null));};exports[_0x783d('0x5d')]=function(_0x86480d,_0x559e6c,_0x3ea23b){var _0x1326d0;var _0x384bdb='';var _0x43d4f8=_0x783d('0x5e');return db[_0x783d('0x34')][_0x783d('0x54')]({'where':{'id':_0x86480d[_0x783d('0x4f')]['id']},'attributes':['id',_0x783d('0x5f'),'clientId',_0x783d('0x60'),_0x783d('0x61'),'password','securityToken']})[_0x783d('0x2e')](handleEntityNotFound(_0x559e6c,null))[_0x783d('0x2e')](function(_0xc6d712){if(_0xc6d712){_0x384bdb=_0xc6d712[_0x783d('0x5f')];var _0x49b3cb=_0x384bdb[_0x783d('0x62')](-0x1);if(_0x49b3cb==='/'){_0x384bdb=_0x384bdb[_0x783d('0x63')](0x0,_0x384bdb[_0x783d('0x64')](_0x49b3cb));}_0x1326d0=new jsforce[(_0x783d('0x65'))]({'oauth2':{'loginUrl':_0x384bdb,'clientId':_0xc6d712[_0x783d('0x66')],'clientSecret':_0xc6d712['clientSecret']}});return _0x1326d0[_0x783d('0x67')](_0xc6d712['username'],_0xc6d712[_0x783d('0x68')][_0x783d('0x69')](_0xc6d712[_0x783d('0x6a')]));}})[_0x783d('0x2e')](function(_0x19d739){if(_0x19d739){if(!_['isNil'](_0x86480d[_0x783d('0x3a')][_0x783d('0x6b')])){_0x43d4f8=_0x86480d[_0x783d('0x3a')][_0x783d('0x6b')];}return _0x1326d0[_0x783d('0x6c')](_0x43d4f8)[_0x783d('0x6d')]();}})[_0x783d('0x2e')](function(_0x497c14){var _0x72c456=[_0x783d('0x6e'),_0x783d('0x6f'),_0x783d('0x70'),_0x783d('0x71'),_0x783d('0x72'),_0x783d('0x73')];var _0x10ac57=[_0x783d('0x74'),'int',_0x783d('0x75'),_0x783d('0x76'),_0x783d('0x77'),'textarea',_0x783d('0x78')];if(_0x497c14){_['remove'](_0x497c14[_0x783d('0x3e')],function(_0xb75527){return _0x72c456[_0x783d('0x79')](_0xb75527['name'])||!_0x10ac57[_0x783d('0x79')](_0xb75527[_0x783d('0x37')]);});return{'count':_0x497c14[_0x783d('0x3e')]['length'],'rows':_[_0x783d('0x33')](_0x497c14[_0x783d('0x3e')],function(_0x18ab70){return{'id':_0x18ab70[_0x783d('0x31')],'name':_0x18ab70[_0x783d('0x7a')],'custom':_0x18ab70[_0x783d('0x7b')],'options':_0x18ab70[_0x783d('0x7c')][_0x783d('0x3f')]>0x0?_[_0x783d('0x33')](_0x18ab70[_0x783d('0x7c')],function(_0x5842a7){return{'name':_0x5842a7[_0x783d('0x7a')],'value':_0x5842a7['value']};}):_0x18ab70[_0x783d('0x37')]=='boolean'?[{'name':_0x783d('0x7d'),'value':_0x783d('0x7e')},{'name':_0x783d('0x7f'),'value':_0x783d('0x80')}]:[]};})};}})[_0x783d('0x2e')](respondWithResult(_0x559e6c,null))[_0x783d('0x4d')](function(_0x14abfa){var _0x33718e=_0x86480d[_0x783d('0x3a')][_0x783d('0x81')]?0x1f4:_0x14abfa['statusCode']||0x1f4;logger[_0x783d('0x20')](_0x783d('0x82'),_0x783d('0x5d'),_0x33718e,JSON[_0x783d('0x1e')](_0x14abfa));delete _0x14abfa['name'];if(_0x33718e===0x191){_0x33718e=0x190;}_0x559e6c[_0x783d('0x23')](_0x33718e)[_0x783d('0x32')](_0x86480d['query'][_0x783d('0x81')]?{'message':_0x783d('0x83'),'statusCode':_0x14abfa[_0x783d('0x84')]}:_0x14abfa);});}; \ No newline at end of file +var _0x9ec6=['fields','hasOwnProperty','nolimit','order','sort','pick','filter','merge','where','includeAll','findAll','rows','length','options','find','create','body','params','getConfigurations','findOne','SalesforceConfiguration','addConfiguration','AccountId','Subjects','getSubjects','channel','Descriptions','getDescriptions','SalesforceField','getFields','Task','remoteUri','clientId','clientSecret','username','password','securityToken','slice','substring','lastIndexOf','Connection','login','concat','isNil','ticketType','sobject','describe','OwnerId','ActivityDate','IsReminderSet','IsRecurrence','Subject','Description','string','picklist','email','textarea','includes','label','custom','picklistValues','value','True','true','False','false','statusCode','getFields,\x20%s,\x20%s,\x20%s','Wrong\x20credentials','eml-format','zip-dir','moment','bluebird','mustache','util','path','sox','lodash','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','../../components/integrations/configuration','jayson/promise','request','request\x20sent','debug','SalesforceAccount,\x20%s,\x20%s,\x20%s','stringify','error','SalesforceAccount,\x20%s,\x20%s','message','info','result','catch','status','json','offset','limit','undefined','count','set','Content-Range','reject','save','update','then','end','stack','name','send','SalesforceAccount','rawAttributes','fieldName','type','key','model','map','query','keys','filters','attributes','intersection'];(function(_0x4d394d,_0x40e7b3){var _0x4f0003=function(_0x56d25d){while(--_0x56d25d){_0x4d394d['push'](_0x4d394d['shift']());}};_0x4f0003(++_0x40e7b3);}(_0x9ec6,0xcb));var _0x69ec=function(_0x4704dc,_0x575a5f){_0x4704dc=_0x4704dc-0x0;var _0x254d81=_0x9ec6[_0x4704dc];return _0x254d81;};'use strict';var emlformat=require(_0x69ec('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x69ec('0x1'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x69ec('0x2'));var BPromise=require(_0x69ec('0x3'));var Mustache=require(_0x69ec('0x4'));var util=require(_0x69ec('0x5'));var path=require(_0x69ec('0x6'));var sox=require(_0x69ec('0x7'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x69ec('0x8'));var squel=require('squel');var crypto=require(_0x69ec('0x9'));var jsforce=require(_0x69ec('0xa'));var deskjs=require(_0x69ec('0xb'));var toCsv=require(_0x69ec('0xc'));var querystring=require(_0x69ec('0xd'));var Papa=require(_0x69ec('0xe'));var Redis=require(_0x69ec('0xf'));var authService=require(_0x69ec('0x10'));var qs=require(_0x69ec('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x69ec('0x12'));var logger=require(_0x69ec('0x13'))(_0x69ec('0x14'));var utils=require(_0x69ec('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0x69ec('0x16'));var db=require(_0x69ec('0x17'))['db'];var integrations=require(_0x69ec('0x18'));var jayson=require(_0x69ec('0x19'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x92005c,_0x4d808d,_0x13ed17,_0x54387b){return new BPromise(function(_0x6822f0,_0x1ec552){var _0x459591=_0x54387b||client;return _0x459591[_0x69ec('0x1a')](_0x92005c,_0x13ed17)['then'](function(_0x277696){logger['info']('SalesforceAccount,\x20%s,\x20%s',_0x4d808d,_0x69ec('0x1b'));logger[_0x69ec('0x1c')](_0x69ec('0x1d'),_0x4d808d,_0x69ec('0x1b'),JSON[_0x69ec('0x1e')](_0x277696));if(_0x277696[_0x69ec('0x1f')]){if(_0x277696[_0x69ec('0x1f')]['code']===0x1f4){logger[_0x69ec('0x1f')](_0x69ec('0x20'),_0x4d808d,_0x277696[_0x69ec('0x1f')]['message']);return _0x1ec552(_0x277696['error']['message']);}logger['error'](_0x69ec('0x20'),_0x4d808d,_0x277696[_0x69ec('0x1f')][_0x69ec('0x21')]);return _0x6822f0(_0x277696[_0x69ec('0x1f')][_0x69ec('0x21')]);}else{logger[_0x69ec('0x22')]('SalesforceAccount,\x20%s,\x20%s',_0x4d808d,_0x69ec('0x1b'));_0x6822f0(_0x277696[_0x69ec('0x23')]['message']);}})[_0x69ec('0x24')](function(_0x467eb7){logger[_0x69ec('0x1f')](_0x69ec('0x20'),_0x4d808d,_0x467eb7);_0x1ec552(_0x467eb7);});});}function respondWithStatusCode(_0x46e9ee,_0x36e915){_0x36e915=_0x36e915||0xcc;return function(_0x415441){if(_0x415441){return _0x46e9ee['sendStatus'](_0x36e915);}return _0x46e9ee[_0x69ec('0x25')](_0x36e915)['end']();};}function respondWithResult(_0x440ef9,_0x515a71){_0x515a71=_0x515a71||0xc8;return function(_0x458cbb){if(_0x458cbb){return _0x440ef9['status'](_0x515a71)[_0x69ec('0x26')](_0x458cbb);}};}function respondWithFilteredResult(_0x354e21,_0x535010){return function(_0xd442e1){if(_0xd442e1){var _0x52bb4f=typeof _0x535010[_0x69ec('0x27')]==='undefined'&&typeof _0x535010[_0x69ec('0x28')]===_0x69ec('0x29');var _0x4c2fd8=_0xd442e1[_0x69ec('0x2a')];var _0x287a94=_0x52bb4f?0x0:_0x535010[_0x69ec('0x27')];var _0x155e2f=_0x52bb4f?_0xd442e1[_0x69ec('0x2a')]:_0x535010['offset']+_0x535010[_0x69ec('0x28')];var _0x24e9a4;if(_0x155e2f>=_0x4c2fd8){_0x155e2f=_0x4c2fd8;_0x24e9a4=0xc8;}else{_0x24e9a4=0xce;}_0x354e21['status'](_0x24e9a4);return _0x354e21[_0x69ec('0x2b')](_0x69ec('0x2c'),_0x287a94+'-'+_0x155e2f+'/'+_0x4c2fd8)['json'](_0xd442e1);}return null;};}function patchUpdates(_0x14f371){return function(_0x278cca){try{jsonpatch['apply'](_0x278cca,_0x14f371,!![]);}catch(_0x21f21c){return BPromise[_0x69ec('0x2d')](_0x21f21c);}return _0x278cca[_0x69ec('0x2e')]();};}function saveUpdates(_0x2b4445,_0x5480a7){return function(_0x19ec56){if(_0x19ec56){return _0x19ec56[_0x69ec('0x2f')](_0x2b4445)[_0x69ec('0x30')](function(_0x552a98){return _0x552a98;});}return null;};}function removeEntity(_0x47dbde,_0x52b9e6){return function(_0x28ecf4){if(_0x28ecf4){return _0x28ecf4['destroy']()[_0x69ec('0x30')](function(){_0x47dbde[_0x69ec('0x25')](0xcc)[_0x69ec('0x31')]();});}};}function handleEntityNotFound(_0xb75d5d,_0xbc423d){return function(_0x170cf0){if(!_0x170cf0){_0xb75d5d['sendStatus'](0x194);}return _0x170cf0;};}function handleError(_0x2f2ea2,_0x54caa3){_0x54caa3=_0x54caa3||0x1f4;return function(_0x1c1d3a){logger[_0x69ec('0x1f')](_0x1c1d3a[_0x69ec('0x32')]);if(_0x1c1d3a[_0x69ec('0x33')]){delete _0x1c1d3a[_0x69ec('0x33')];}_0x2f2ea2[_0x69ec('0x25')](_0x54caa3)[_0x69ec('0x34')](_0x1c1d3a);};}exports['index']=function(_0x59a79f,_0x4ab6ec){var _0x5c7f7a={},_0x29fa6e={},_0x50e5bb={'count':0x0,'rows':[]};var _0x36219d=_['map'](db[_0x69ec('0x35')][_0x69ec('0x36')],function(_0x4d0e13){return{'name':_0x4d0e13[_0x69ec('0x37')],'type':_0x4d0e13[_0x69ec('0x38')][_0x69ec('0x39')]};});_0x29fa6e[_0x69ec('0x3a')]=_[_0x69ec('0x3b')](_0x36219d,_0x69ec('0x33'));_0x29fa6e[_0x69ec('0x3c')]=_[_0x69ec('0x3d')](_0x59a79f[_0x69ec('0x3c')]);_0x29fa6e[_0x69ec('0x3e')]=_['intersection'](_0x29fa6e[_0x69ec('0x3a')],_0x29fa6e[_0x69ec('0x3c')]);_0x5c7f7a[_0x69ec('0x3f')]=_[_0x69ec('0x40')](_0x29fa6e[_0x69ec('0x3a')],qs[_0x69ec('0x41')](_0x59a79f[_0x69ec('0x3c')][_0x69ec('0x41')]));_0x5c7f7a['attributes']=_0x5c7f7a['attributes']['length']?_0x5c7f7a[_0x69ec('0x3f')]:_0x29fa6e[_0x69ec('0x3a')];if(!_0x59a79f[_0x69ec('0x3c')][_0x69ec('0x42')](_0x69ec('0x43'))){_0x5c7f7a[_0x69ec('0x28')]=qs['limit'](_0x59a79f['query'][_0x69ec('0x28')]);_0x5c7f7a[_0x69ec('0x27')]=qs['offset'](_0x59a79f[_0x69ec('0x3c')][_0x69ec('0x27')]);}_0x5c7f7a[_0x69ec('0x44')]=qs[_0x69ec('0x45')](_0x59a79f[_0x69ec('0x3c')]['sort']);_0x5c7f7a['where']=qs[_0x69ec('0x3e')](_[_0x69ec('0x46')](_0x59a79f[_0x69ec('0x3c')],_0x29fa6e[_0x69ec('0x3e')]),_0x36219d);if(_0x59a79f['query'][_0x69ec('0x47')]){_0x5c7f7a['where']=_[_0x69ec('0x48')](_0x5c7f7a[_0x69ec('0x49')],{'$or':_[_0x69ec('0x3b')](_0x36219d,function(_0x10306f){if(_0x10306f[_0x69ec('0x38')]!=='VIRTUAL'){var _0x4eb900={};_0x4eb900[_0x10306f[_0x69ec('0x33')]]={'$like':'%'+_0x59a79f['query']['filter']+'%'};return _0x4eb900;}})});}_0x5c7f7a=_[_0x69ec('0x48')]({},_0x5c7f7a,_0x59a79f['options']);var _0x374a12={'where':_0x5c7f7a['where']};return db[_0x69ec('0x35')][_0x69ec('0x2a')](_0x374a12)[_0x69ec('0x30')](function(_0xaea362){_0x50e5bb[_0x69ec('0x2a')]=_0xaea362;if(_0x59a79f[_0x69ec('0x3c')][_0x69ec('0x4a')]){_0x5c7f7a['include']=[{'all':!![]}];}return db[_0x69ec('0x35')][_0x69ec('0x4b')](_0x5c7f7a);})[_0x69ec('0x30')](function(_0x47587f){_0x50e5bb[_0x69ec('0x4c')]=_0x47587f;return _0x50e5bb;})[_0x69ec('0x30')](respondWithFilteredResult(_0x4ab6ec,_0x5c7f7a))[_0x69ec('0x24')](handleError(_0x4ab6ec,null));};exports['show']=function(_0x522a9e,_0x4a1aef){var _0x16ae0c={'raw':![],'where':{'id':_0x522a9e['params']['id']}},_0x2c9ab1={};_0x2c9ab1[_0x69ec('0x3a')]=_['keys'](db[_0x69ec('0x35')][_0x69ec('0x36')]);_0x2c9ab1[_0x69ec('0x3c')]=_[_0x69ec('0x3d')](_0x522a9e[_0x69ec('0x3c')]);_0x2c9ab1['filters']=_[_0x69ec('0x40')](_0x2c9ab1[_0x69ec('0x3a')],_0x2c9ab1[_0x69ec('0x3c')]);_0x16ae0c['attributes']=_[_0x69ec('0x40')](_0x2c9ab1[_0x69ec('0x3a')],qs[_0x69ec('0x41')](_0x522a9e['query'][_0x69ec('0x41')]));_0x16ae0c[_0x69ec('0x3f')]=_0x16ae0c[_0x69ec('0x3f')][_0x69ec('0x4d')]?_0x16ae0c['attributes']:_0x2c9ab1['model'];if(_0x522a9e[_0x69ec('0x3c')][_0x69ec('0x4a')]){_0x16ae0c['include']=[{'all':!![]}];}_0x16ae0c=_[_0x69ec('0x48')]({},_0x16ae0c,_0x522a9e[_0x69ec('0x4e')]);return db['SalesforceAccount'][_0x69ec('0x4f')](_0x16ae0c)['then'](handleEntityNotFound(_0x4a1aef,null))['then'](respondWithResult(_0x4a1aef,null))[_0x69ec('0x24')](handleError(_0x4a1aef,null));};exports[_0x69ec('0x50')]=function(_0x24a99f,_0x5bff8b){return db[_0x69ec('0x35')][_0x69ec('0x50')](_0x24a99f[_0x69ec('0x51')],{})[_0x69ec('0x30')](respondWithResult(_0x5bff8b,0xc9))[_0x69ec('0x24')](handleError(_0x5bff8b,null));};exports[_0x69ec('0x2f')]=function(_0x23f01d,_0x2b75b7){if(_0x23f01d[_0x69ec('0x51')]['id']){delete _0x23f01d['body']['id'];}return db[_0x69ec('0x35')][_0x69ec('0x4f')]({'where':{'id':_0x23f01d[_0x69ec('0x52')]['id']}})[_0x69ec('0x30')](handleEntityNotFound(_0x2b75b7,null))[_0x69ec('0x30')](saveUpdates(_0x23f01d['body'],null))[_0x69ec('0x30')](respondWithResult(_0x2b75b7,null))[_0x69ec('0x24')](handleError(_0x2b75b7,null));};exports['destroy']=function(_0x368a99,_0x2b20b6){return db[_0x69ec('0x35')][_0x69ec('0x4f')]({'where':{'id':_0x368a99[_0x69ec('0x52')]['id']}})[_0x69ec('0x30')](handleEntityNotFound(_0x2b20b6,null))[_0x69ec('0x30')](removeEntity(_0x2b20b6,null))['catch'](handleError(_0x2b20b6,null));};exports[_0x69ec('0x53')]=function(_0x52e920,_0x4be8b5,_0x342701){var _0x2402d9={};var _0x5e97c2={};var _0x48bdbe;var _0x5a462a;return db[_0x69ec('0x35')][_0x69ec('0x54')]({'where':{'id':_0x52e920[_0x69ec('0x52')]['id']}})[_0x69ec('0x30')](handleEntityNotFound(_0x4be8b5,null))[_0x69ec('0x30')](function(_0x5b45a1){if(_0x5b45a1){_0x48bdbe=_0x5b45a1;_0x5e97c2[_0x69ec('0x3a')]=_[_0x69ec('0x3d')](db[_0x69ec('0x55')]['rawAttributes']);_0x5e97c2[_0x69ec('0x3c')]=_['keys'](_0x52e920[_0x69ec('0x3c')]);_0x5e97c2[_0x69ec('0x3e')]=_[_0x69ec('0x40')](_0x5e97c2['model'],_0x5e97c2['query']);_0x2402d9[_0x69ec('0x3f')]=_[_0x69ec('0x40')](_0x5e97c2['model'],qs[_0x69ec('0x41')](_0x52e920[_0x69ec('0x3c')][_0x69ec('0x41')]));_0x2402d9['attributes']=_0x2402d9[_0x69ec('0x3f')][_0x69ec('0x4d')]?_0x2402d9[_0x69ec('0x3f')]:_0x5e97c2[_0x69ec('0x3a')];_0x2402d9['order']=qs[_0x69ec('0x45')](_0x52e920[_0x69ec('0x3c')][_0x69ec('0x45')]);_0x2402d9[_0x69ec('0x49')]=qs[_0x69ec('0x3e')](_[_0x69ec('0x46')](_0x52e920[_0x69ec('0x3c')],_0x5e97c2[_0x69ec('0x3e')]));if(_0x52e920['query'][_0x69ec('0x47')]){_0x2402d9[_0x69ec('0x49')]=_[_0x69ec('0x48')](_0x2402d9['where'],{'$or':_['map'](_0x2402d9['attributes'],function(_0x594962){var _0x2e09ea={};_0x2e09ea[_0x594962]={'$like':'%'+_0x52e920[_0x69ec('0x3c')][_0x69ec('0x47')]+'%'};return _0x2e09ea;})});}_0x2402d9=_[_0x69ec('0x48')]({},_0x2402d9,_0x52e920[_0x69ec('0x4e')]);return _0x48bdbe[_0x69ec('0x53')](_0x2402d9);}})['then'](function(_0x34fdf5){if(_0x34fdf5){_0x5a462a=_0x34fdf5[_0x69ec('0x4d')];if(!_0x52e920['query']['hasOwnProperty'](_0x69ec('0x43'))){_0x2402d9[_0x69ec('0x28')]=qs[_0x69ec('0x28')](_0x52e920['query']['limit']);_0x2402d9[_0x69ec('0x27')]=qs[_0x69ec('0x27')](_0x52e920[_0x69ec('0x3c')]['offset']);}return _0x48bdbe[_0x69ec('0x53')](_0x2402d9);}})['then'](function(_0x557e4b){if(_0x557e4b){return _0x557e4b?{'count':_0x5a462a,'rows':_0x557e4b}:null;}})[_0x69ec('0x30')](respondWithResult(_0x4be8b5,null))['catch'](handleError(_0x4be8b5,null));};exports[_0x69ec('0x56')]=function(_0x16ca91,_0x27c1d8,_0x35f6bf){if(_0x16ca91[_0x69ec('0x51')]['id']){delete _0x16ca91[_0x69ec('0x51')]['id'];}return db[_0x69ec('0x35')][_0x69ec('0x54')]({'where':{'id':_0x16ca91[_0x69ec('0x52')]['id']}})['then'](handleEntityNotFound(_0x27c1d8,null))[_0x69ec('0x30')](function(_0x2448c4){if(_0x2448c4){_0x16ca91['body'][_0x69ec('0x57')]=_0x2448c4['id'];_0x16ca91[_0x69ec('0x51')][_0x69ec('0x58')]=integrations[_0x69ec('0x59')](_0x16ca91[_0x69ec('0x51')][_0x69ec('0x5a')],_0x16ca91[_0x69ec('0x51')][_0x69ec('0x38')]);_0x16ca91[_0x69ec('0x51')][_0x69ec('0x5b')]=integrations[_0x69ec('0x5c')](_0x16ca91[_0x69ec('0x51')][_0x69ec('0x5a')],_0x16ca91['body']['type']);return db[_0x69ec('0x55')][_0x69ec('0x50')](_0x16ca91['body'],{'include':[{'model':db['SalesforceField'],'as':_0x69ec('0x58')},{'model':db[_0x69ec('0x5d')],'as':_0x69ec('0x5b')}]});}return null;})[_0x69ec('0x30')](respondWithResult(_0x27c1d8,null))[_0x69ec('0x24')](handleError(_0x27c1d8,null));};exports[_0x69ec('0x5e')]=function(_0x572289,_0x496f12,_0x37ad42){var _0x53cfe6;var _0x23db50='';var _0x238697=_0x69ec('0x5f');return db[_0x69ec('0x35')]['findOne']({'where':{'id':_0x572289['params']['id']},'attributes':['id',_0x69ec('0x60'),_0x69ec('0x61'),_0x69ec('0x62'),_0x69ec('0x63'),_0x69ec('0x64'),_0x69ec('0x65')]})[_0x69ec('0x30')](handleEntityNotFound(_0x496f12,null))['then'](function(_0x25d43f){if(_0x25d43f){_0x23db50=_0x25d43f[_0x69ec('0x60')];var _0xf33f72=_0x23db50[_0x69ec('0x66')](-0x1);if(_0xf33f72==='/'){_0x23db50=_0x23db50[_0x69ec('0x67')](0x0,_0x23db50[_0x69ec('0x68')](_0xf33f72));}_0x53cfe6=new jsforce[(_0x69ec('0x69'))]({'oauth2':{'loginUrl':_0x23db50,'clientId':_0x25d43f['clientId'],'clientSecret':_0x25d43f[_0x69ec('0x62')]}});return _0x53cfe6[_0x69ec('0x6a')](_0x25d43f[_0x69ec('0x63')],_0x25d43f[_0x69ec('0x64')][_0x69ec('0x6b')](_0x25d43f[_0x69ec('0x65')]));}})[_0x69ec('0x30')](function(_0x5184a5){if(_0x5184a5){if(!_[_0x69ec('0x6c')](_0x572289[_0x69ec('0x3c')][_0x69ec('0x6d')])){_0x238697=_0x572289[_0x69ec('0x3c')][_0x69ec('0x6d')];}return _0x53cfe6[_0x69ec('0x6e')](_0x238697)[_0x69ec('0x6f')]();}})['then'](function(_0x4dc855){var _0x23a4c5=[_0x69ec('0x70'),_0x69ec('0x71'),_0x69ec('0x72'),_0x69ec('0x73'),_0x69ec('0x74'),_0x69ec('0x75')];var _0xb5c8c8=[_0x69ec('0x76'),'int',_0x69ec('0x77'),'boolean',_0x69ec('0x78'),_0x69ec('0x79'),'phone'];if(_0x4dc855){_['remove'](_0x4dc855['fields'],function(_0x32746c){return _0x23a4c5[_0x69ec('0x7a')](_0x32746c[_0x69ec('0x33')])||!_0xb5c8c8[_0x69ec('0x7a')](_0x32746c[_0x69ec('0x38')]);});return{'count':_0x4dc855[_0x69ec('0x41')]['length'],'rows':_['map'](_0x4dc855[_0x69ec('0x41')],function(_0x2e940a){return{'id':_0x2e940a[_0x69ec('0x33')],'name':_0x2e940a[_0x69ec('0x7b')],'custom':_0x2e940a[_0x69ec('0x7c')],'options':_0x2e940a[_0x69ec('0x7d')]['length']>0x0?_['map'](_0x2e940a[_0x69ec('0x7d')],function(_0x5f0fa3){return{'name':_0x5f0fa3['label'],'value':_0x5f0fa3[_0x69ec('0x7e')]};}):_0x2e940a[_0x69ec('0x38')]=='boolean'?[{'name':_0x69ec('0x7f'),'value':_0x69ec('0x80')},{'name':_0x69ec('0x81'),'value':_0x69ec('0x82')}]:[]};})};}})[_0x69ec('0x30')](respondWithResult(_0x496f12,null))[_0x69ec('0x24')](function(_0x10f7e8){var _0x2981ca=_0x572289[_0x69ec('0x3c')]['test']?0x1f4:_0x10f7e8[_0x69ec('0x83')]||0x1f4;logger[_0x69ec('0x1f')](_0x69ec('0x84'),_0x69ec('0x5e'),_0x2981ca,JSON[_0x69ec('0x1e')](_0x10f7e8));delete _0x10f7e8[_0x69ec('0x33')];if(_0x2981ca===0x191){_0x2981ca=0x190;}_0x496f12[_0x69ec('0x25')](_0x2981ca)[_0x69ec('0x34')](_0x572289[_0x69ec('0x3c')]['test']?{'message':_0x69ec('0x85'),'statusCode':_0x10f7e8[_0x69ec('0x83')]}:_0x10f7e8);});}; \ No newline at end of file diff --git a/server/api/intSalesforceAccount/intSalesforceAccount.model.js b/server/api/intSalesforceAccount/intSalesforceAccount.model.js index ea9ee32..b2ba419 100644 --- a/server/api/intSalesforceAccount/intSalesforceAccount.model.js +++ b/server/api/intSalesforceAccount/intSalesforceAccount.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x738f=['util','../../config/logger','api','moment','bluebird','../../config/environment','exports','define','SalesforceAccount','int_salesforce_accounts','lodash'];(function(_0x5b44ae,_0x49c972){var _0x1f82be=function(_0x2d5b05){while(--_0x2d5b05){_0x5b44ae['push'](_0x5b44ae['shift']());}};_0x1f82be(++_0x49c972);}(_0x738f,0xc5));var _0xf738=function(_0x258919,_0x1754e6){_0x258919=_0x258919-0x0;var _0xfbd68b=_0x738f[_0x258919];return _0xfbd68b;};'use strict';var _=require(_0xf738('0x0'));var util=require(_0xf738('0x1'));var logger=require(_0xf738('0x2'))(_0xf738('0x3'));var moment=require(_0xf738('0x4'));var BPromise=require(_0xf738('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0xf738('0x6'));var attributes=require('./intSalesforceAccount.attributes');var integrations=require('../../components/integrations/configuration');module[_0xf738('0x7')]=function(_0x13d47f,_0x505a97){return _0x13d47f[_0xf738('0x8')](_0xf738('0x9'),attributes,{'tableName':_0xf738('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x0da2=['int_salesforce_accounts','lodash','util','../../config/logger','api','moment','request-promise','path','rimraf','./intSalesforceAccount.attributes','../../components/integrations/configuration','exports','define'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x0da2,0x1bb));var _0x20da=function(_0x13329e,_0x3d5b9b){_0x13329e=_0x13329e-0x0;var _0x5bc2f1=_0x0da2[_0x13329e];return _0x5bc2f1;};'use strict';var _=require(_0x20da('0x0'));var util=require(_0x20da('0x1'));var logger=require(_0x20da('0x2'))(_0x20da('0x3'));var moment=require(_0x20da('0x4'));var BPromise=require('bluebird');var rp=require(_0x20da('0x5'));var fs=require('fs');var path=require(_0x20da('0x6'));var rimraf=require(_0x20da('0x7'));var config=require('../../config/environment');var attributes=require(_0x20da('0x8'));var integrations=require(_0x20da('0x9'));module[_0x20da('0xa')]=function(_0x5b3331,_0x2c94bc){return _0x5b3331[_0x20da('0xb')]('SalesforceAccount',attributes,{'tableName':_0x20da('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intSalesforceAccount/intSalesforceAccount.rpc.js b/server/api/intSalesforceAccount/intSalesforceAccount.rpc.js index e21734d..6242321 100644 --- a/server/api/intSalesforceAccount/intSalesforceAccount.rpc.js +++ b/server/api/intSalesforceAccount/intSalesforceAccount.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x583c=['limit','include','model','map','then','ShowSalesforceAccount','where','moment','bluebird','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','client','http','SalesforceAccount,\x20%s,\x20%s','debug','SalesforceAccount,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result','catch','GetSalesforceAccount','SalesforceAccount','options','raw','attributes'];(function(_0x146467,_0x124f17){var _0x59c87b=function(_0x492602){while(--_0x492602){_0x146467['push'](_0x146467['shift']());}};_0x59c87b(++_0x124f17);}(_0x583c,0xac));var _0xc583=function(_0x382e89,_0x4768c0){_0x382e89=_0x382e89-0x0;var _0x3a1318=_0x583c[_0x382e89];return _0x3a1318;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xc583('0x0'));var BPromise=require(_0xc583('0x1'));var rs=require(_0xc583('0x2'));var fs=require('fs');var Redis=require(_0xc583('0x3'));var db=require(_0xc583('0x4'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xc583('0x5'));var config=require(_0xc583('0x6'));var jayson=require(_0xc583('0x7'));var client=jayson[_0xc583('0x8')][_0xc583('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x1ace1b,_0xba4964,_0x3293e7){return new BPromise(function(_0x46d980,_0x5c57da){return client['request'](_0x1ace1b,_0x3293e7)['then'](function(_0x4bc2f5){logger['info'](_0xc583('0xa'),_0xba4964,'request\x20sent');logger[_0xc583('0xb')](_0xc583('0xc'),_0xba4964,_0xc583('0xd'),JSON[_0xc583('0xe')](_0x4bc2f5));if(_0x4bc2f5[_0xc583('0xf')]){if(_0x4bc2f5[_0xc583('0xf')][_0xc583('0x10')]===0x1f4){logger[_0xc583('0xf')](_0xc583('0xa'),_0xba4964,_0x4bc2f5[_0xc583('0xf')][_0xc583('0x11')]);return _0x5c57da(_0x4bc2f5['error'][_0xc583('0x11')]);}logger[_0xc583('0xf')]('SalesforceAccount,\x20%s,\x20%s',_0xba4964,_0x4bc2f5[_0xc583('0xf')]['message']);return _0x46d980(_0x4bc2f5['error']['message']);}else{logger[_0xc583('0x12')](_0xc583('0xa'),_0xba4964,_0xc583('0xd'));_0x46d980(_0x4bc2f5[_0xc583('0x13')][_0xc583('0x11')]);}})[_0xc583('0x14')](function(_0x70257){logger['error'](_0xc583('0xa'),_0xba4964,_0x70257);_0x5c57da(_0x70257);});});}exports[_0xc583('0x15')]=function(_0x332c01){var _0x4fb4dd=this;return new Promise(function(_0x1f857e,_0x2e1be0){return db[_0xc583('0x16')]['findAll']({'raw':_0x332c01[_0xc583('0x17')]?_0x332c01[_0xc583('0x17')][_0xc583('0x18')]===undefined?!![]:![]:!![],'where':_0x332c01[_0xc583('0x17')]?_0x332c01[_0xc583('0x17')]['where']||null:null,'attributes':_0x332c01['options']?_0x332c01[_0xc583('0x17')][_0xc583('0x19')]||null:null,'limit':_0x332c01['options']?_0x332c01[_0xc583('0x17')][_0xc583('0x1a')]||null:null,'include':_0x332c01[_0xc583('0x17')]?_0x332c01[_0xc583('0x17')][_0xc583('0x1b')]?_['map'](_0x332c01[_0xc583('0x17')][_0xc583('0x1b')],function(_0x58cb1f){return{'model':db[_0x58cb1f[_0xc583('0x1c')]],'as':_0x58cb1f['as'],'attributes':_0x58cb1f[_0xc583('0x19')],'include':_0x58cb1f['include']?_[_0xc583('0x1d')](_0x58cb1f[_0xc583('0x1b')],function(_0xb602bb){return{'model':db[_0xb602bb[_0xc583('0x1c')]],'as':_0xb602bb['as'],'attributes':_0xb602bb[_0xc583('0x19')],'include':_0xb602bb['include']?_['map'](_0xb602bb[_0xc583('0x1b')],function(_0x4b54aa){return{'model':db[_0x4b54aa[_0xc583('0x1c')]],'as':_0x4b54aa['as'],'attributes':_0x4b54aa['attributes']};}):[]};}):[]};}):[]:[]})[_0xc583('0x1e')](function(_0x43ed1d){logger[_0xc583('0x12')](_0xc583('0x15'),_0x332c01);logger[_0xc583('0xb')](_0xc583('0x15'),_0x332c01,JSON[_0xc583('0xe')](_0x43ed1d));_0x1f857e(_0x43ed1d);})['catch'](function(_0x42c92f){logger[_0xc583('0xf')](_0xc583('0x15'),_0x42c92f[_0xc583('0x11')],_0x332c01);_0x2e1be0(_0x4fb4dd['error'](0x1f4,_0x42c92f[_0xc583('0x11')]));});});};exports[_0xc583('0x1f')]=function(_0xe2544b){var _0x2cadb8=this;return new Promise(function(_0x249b48,_0x35193f){return db['SalesforceAccount']['find']({'raw':_0xe2544b['options']?_0xe2544b[_0xc583('0x17')][_0xc583('0x18')]===undefined?!![]:![]:!![],'where':_0xe2544b[_0xc583('0x17')]?_0xe2544b[_0xc583('0x17')][_0xc583('0x20')]||null:null,'attributes':_0xe2544b['options']?_0xe2544b[_0xc583('0x17')][_0xc583('0x19')]||null:null,'include':_0xe2544b[_0xc583('0x17')]?_0xe2544b[_0xc583('0x17')]['include']?_[_0xc583('0x1d')](_0xe2544b[_0xc583('0x17')][_0xc583('0x1b')],function(_0x4e3e6b){return{'model':db[_0x4e3e6b[_0xc583('0x1c')]],'as':_0x4e3e6b['as'],'attributes':_0x4e3e6b['attributes'],'include':_0x4e3e6b[_0xc583('0x1b')]?_['map'](_0x4e3e6b['include'],function(_0x557c3a){return{'model':db[_0x557c3a[_0xc583('0x1c')]],'as':_0x557c3a['as'],'attributes':_0x557c3a[_0xc583('0x19')],'include':_0x557c3a['include']?_[_0xc583('0x1d')](_0x557c3a[_0xc583('0x1b')],function(_0x4b3f32){return{'model':db[_0x4b3f32['model']],'as':_0x4b3f32['as'],'attributes':_0x4b3f32[_0xc583('0x19')]};}):[]};}):[]};}):[]:[]})[_0xc583('0x1e')](function(_0x2eb222){logger[_0xc583('0x12')]('ShowSalesforceAccount',_0xe2544b);logger[_0xc583('0xb')](_0xc583('0x1f'),_0xe2544b,JSON[_0xc583('0xe')](_0x2eb222));_0x249b48(_0x2eb222);})[_0xc583('0x14')](function(_0x580761){logger[_0xc583('0xf')](_0xc583('0x1f'),_0x580761[_0xc583('0x11')],_0xe2544b);_0x35193f(_0x2cadb8['error'](0x1f4,_0x580761[_0xc583('0x11')]));});});}; \ No newline at end of file +var _0x1b30=['lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','client','http','request','then','info','SalesforceAccount,\x20%s,\x20%s','request\x20sent','SalesforceAccount,\x20%s,\x20%s,\x20%s','error','message','result','catch','GetSalesforceAccount','SalesforceAccount','findAll','options','raw','attributes','limit','map','model','include','stringify','ShowSalesforceAccount','find','where','debug'];(function(_0x4fe57a,_0x3207a3){var _0x4d0386=function(_0x4ecbc1){while(--_0x4ecbc1){_0x4fe57a['push'](_0x4fe57a['shift']());}};_0x4d0386(++_0x3207a3);}(_0x1b30,0x1b0));var _0x01b3=function(_0x1d3ca5,_0x207c28){_0x1d3ca5=_0x1d3ca5-0x0;var _0x59ed17=_0x1b30[_0x1d3ca5];return _0x59ed17;};'use strict';var _=require(_0x01b3('0x0'));var util=require(_0x01b3('0x1'));var moment=require('moment');var BPromise=require(_0x01b3('0x2'));var rs=require(_0x01b3('0x3'));var fs=require('fs');var Redis=require(_0x01b3('0x4'));var db=require(_0x01b3('0x5'))['db'];var utils=require(_0x01b3('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0x01b3('0x7'));var jayson=require(_0x01b3('0x8'));var client=jayson[_0x01b3('0x9')][_0x01b3('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x347b7f,_0x2158dc,_0x59f888){return new BPromise(function(_0x4462e8,_0x1ab621){return client[_0x01b3('0xb')](_0x347b7f,_0x59f888)[_0x01b3('0xc')](function(_0x4b043f){logger[_0x01b3('0xd')](_0x01b3('0xe'),_0x2158dc,_0x01b3('0xf'));logger['debug'](_0x01b3('0x10'),_0x2158dc,_0x01b3('0xf'),JSON['stringify'](_0x4b043f));if(_0x4b043f[_0x01b3('0x11')]){if(_0x4b043f[_0x01b3('0x11')]['code']===0x1f4){logger[_0x01b3('0x11')](_0x01b3('0xe'),_0x2158dc,_0x4b043f[_0x01b3('0x11')][_0x01b3('0x12')]);return _0x1ab621(_0x4b043f[_0x01b3('0x11')][_0x01b3('0x12')]);}logger[_0x01b3('0x11')]('SalesforceAccount,\x20%s,\x20%s',_0x2158dc,_0x4b043f[_0x01b3('0x11')][_0x01b3('0x12')]);return _0x4462e8(_0x4b043f['error'][_0x01b3('0x12')]);}else{logger['info']('SalesforceAccount,\x20%s,\x20%s',_0x2158dc,_0x01b3('0xf'));_0x4462e8(_0x4b043f[_0x01b3('0x13')][_0x01b3('0x12')]);}})[_0x01b3('0x14')](function(_0x4b9a2f){logger[_0x01b3('0x11')](_0x01b3('0xe'),_0x2158dc,_0x4b9a2f);_0x1ab621(_0x4b9a2f);});});}exports[_0x01b3('0x15')]=function(_0x56f17e){var _0x333131=this;return new Promise(function(_0x33f569,_0x1f4667){return db[_0x01b3('0x16')][_0x01b3('0x17')]({'raw':_0x56f17e[_0x01b3('0x18')]?_0x56f17e[_0x01b3('0x18')][_0x01b3('0x19')]===undefined?!![]:![]:!![],'where':_0x56f17e[_0x01b3('0x18')]?_0x56f17e[_0x01b3('0x18')]['where']||null:null,'attributes':_0x56f17e['options']?_0x56f17e['options'][_0x01b3('0x1a')]||null:null,'limit':_0x56f17e[_0x01b3('0x18')]?_0x56f17e[_0x01b3('0x18')][_0x01b3('0x1b')]||null:null,'include':_0x56f17e[_0x01b3('0x18')]?_0x56f17e[_0x01b3('0x18')]['include']?_[_0x01b3('0x1c')](_0x56f17e[_0x01b3('0x18')]['include'],function(_0x17a60c){return{'model':db[_0x17a60c[_0x01b3('0x1d')]],'as':_0x17a60c['as'],'attributes':_0x17a60c[_0x01b3('0x1a')],'include':_0x17a60c['include']?_[_0x01b3('0x1c')](_0x17a60c[_0x01b3('0x1e')],function(_0x109535){return{'model':db[_0x109535[_0x01b3('0x1d')]],'as':_0x109535['as'],'attributes':_0x109535[_0x01b3('0x1a')],'include':_0x109535[_0x01b3('0x1e')]?_[_0x01b3('0x1c')](_0x109535['include'],function(_0x2798b6){return{'model':db[_0x2798b6[_0x01b3('0x1d')]],'as':_0x2798b6['as'],'attributes':_0x2798b6['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0xf969e3){logger['info'](_0x01b3('0x15'),_0x56f17e);logger['debug'](_0x01b3('0x15'),_0x56f17e,JSON[_0x01b3('0x1f')](_0xf969e3));_0x33f569(_0xf969e3);})[_0x01b3('0x14')](function(_0x1f7f56){logger['error'](_0x01b3('0x15'),_0x1f7f56['message'],_0x56f17e);_0x1f4667(_0x333131['error'](0x1f4,_0x1f7f56[_0x01b3('0x12')]));});});};exports[_0x01b3('0x20')]=function(_0x470667){var _0x3cc7fd=this;return new Promise(function(_0x3d584a,_0x348161){return db[_0x01b3('0x16')][_0x01b3('0x21')]({'raw':_0x470667[_0x01b3('0x18')]?_0x470667[_0x01b3('0x18')][_0x01b3('0x19')]===undefined?!![]:![]:!![],'where':_0x470667['options']?_0x470667[_0x01b3('0x18')][_0x01b3('0x22')]||null:null,'attributes':_0x470667['options']?_0x470667[_0x01b3('0x18')]['attributes']||null:null,'include':_0x470667[_0x01b3('0x18')]?_0x470667[_0x01b3('0x18')][_0x01b3('0x1e')]?_[_0x01b3('0x1c')](_0x470667[_0x01b3('0x18')][_0x01b3('0x1e')],function(_0x743132){return{'model':db[_0x743132[_0x01b3('0x1d')]],'as':_0x743132['as'],'attributes':_0x743132['attributes'],'include':_0x743132[_0x01b3('0x1e')]?_[_0x01b3('0x1c')](_0x743132[_0x01b3('0x1e')],function(_0x41ff52){return{'model':db[_0x41ff52[_0x01b3('0x1d')]],'as':_0x41ff52['as'],'attributes':_0x41ff52[_0x01b3('0x1a')],'include':_0x41ff52[_0x01b3('0x1e')]?_[_0x01b3('0x1c')](_0x41ff52[_0x01b3('0x1e')],function(_0x3404ca){return{'model':db[_0x3404ca[_0x01b3('0x1d')]],'as':_0x3404ca['as'],'attributes':_0x3404ca[_0x01b3('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x01b3('0xc')](function(_0x20638a){logger[_0x01b3('0xd')]('ShowSalesforceAccount',_0x470667);logger[_0x01b3('0x23')](_0x01b3('0x20'),_0x470667,JSON[_0x01b3('0x1f')](_0x20638a));_0x3d584a(_0x20638a);})[_0x01b3('0x14')](function(_0x1ae863){logger[_0x01b3('0x11')](_0x01b3('0x20'),_0x1ae863[_0x01b3('0x12')],_0x470667);_0x348161(_0x3cc7fd[_0x01b3('0x11')](0x1f4,_0x1ae863[_0x01b3('0x12')]));});});}; \ No newline at end of file diff --git a/server/api/intSalesforceConfiguration/index.js b/server/api/intSalesforceConfiguration/index.js index 01128f4..856ea1d 100644 --- a/server/api/intSalesforceConfiguration/index.js +++ b/server/api/intSalesforceConfiguration/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0b0e=['post','create','put','/:id','update','destroy','exports','multer','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intSalesforceConfiguration.controller','get','isAuthenticated','index','show','/:id/fields','/:id/subjects','getSubjects','getDescriptions'];(function(_0x57486e,_0x32283b){var _0x5f110b=function(_0xa18fc3){while(--_0xa18fc3){_0x57486e['push'](_0x57486e['shift']());}};_0x5f110b(++_0x32283b);}(_0x0b0e,0x187));var _0xe0b0=function(_0x1bda6c,_0x5440b1){_0x1bda6c=_0x1bda6c-0x0;var _0x501a86=_0x0b0e[_0x1bda6c];return _0x501a86;};'use strict';var multer=require(_0xe0b0('0x0'));var util=require('util');var path=require(_0xe0b0('0x1'));var timeout=require('connect-timeout');var express=require(_0xe0b0('0x2'));var router=express[_0xe0b0('0x3')]();var fs_extra=require(_0xe0b0('0x4'));var auth=require(_0xe0b0('0x5'));var interaction=require(_0xe0b0('0x6'));var config=require(_0xe0b0('0x7'));var controller=require(_0xe0b0('0x8'));router[_0xe0b0('0x9')]('/',auth[_0xe0b0('0xa')](),controller[_0xe0b0('0xb')]);router[_0xe0b0('0x9')]('/:id',auth['isAuthenticated'](),controller[_0xe0b0('0xc')]);router[_0xe0b0('0x9')](_0xe0b0('0xd'),auth[_0xe0b0('0xa')](),controller['getFields']);router[_0xe0b0('0x9')](_0xe0b0('0xe'),auth['isAuthenticated'](),controller[_0xe0b0('0xf')]);router[_0xe0b0('0x9')]('/:id/descriptions',auth[_0xe0b0('0xa')](),controller[_0xe0b0('0x10')]);router[_0xe0b0('0x11')]('/',auth['isAuthenticated'](),controller[_0xe0b0('0x12')]);router[_0xe0b0('0x13')](_0xe0b0('0x14'),auth[_0xe0b0('0xa')](),controller[_0xe0b0('0x15')]);router['delete'](_0xe0b0('0x14'),auth[_0xe0b0('0xa')](),controller[_0xe0b0('0x16')]);module[_0xe0b0('0x17')]=router; \ No newline at end of file +var _0x5f66=['express','Router','fs-extra','../../components/auth/service','../../config/environment','get','isAuthenticated','/:id','show','/:id/fields','/:id/subjects','getSubjects','put','update','delete','destroy','exports','util','connect-timeout'];(function(_0x2a558e,_0x3dc5b4){var _0x275d74=function(_0x44b6db){while(--_0x44b6db){_0x2a558e['push'](_0x2a558e['shift']());}};_0x275d74(++_0x3dc5b4);}(_0x5f66,0x1a0));var _0x65f6=function(_0x297fd3,_0x115406){_0x297fd3=_0x297fd3-0x0;var _0x2af381=_0x5f66[_0x297fd3];return _0x2af381;};'use strict';var multer=require('multer');var util=require(_0x65f6('0x0'));var path=require('path');var timeout=require(_0x65f6('0x1'));var express=require(_0x65f6('0x2'));var router=express[_0x65f6('0x3')]();var fs_extra=require(_0x65f6('0x4'));var auth=require(_0x65f6('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x65f6('0x6'));var controller=require('./intSalesforceConfiguration.controller');router[_0x65f6('0x7')]('/',auth[_0x65f6('0x8')](),controller['index']);router['get'](_0x65f6('0x9'),auth[_0x65f6('0x8')](),controller[_0x65f6('0xa')]);router[_0x65f6('0x7')](_0x65f6('0xb'),auth[_0x65f6('0x8')](),controller['getFields']);router['get'](_0x65f6('0xc'),auth[_0x65f6('0x8')](),controller[_0x65f6('0xd')]);router[_0x65f6('0x7')]('/:id/descriptions',auth[_0x65f6('0x8')](),controller['getDescriptions']);router['post']('/',auth[_0x65f6('0x8')](),controller['create']);router[_0x65f6('0xe')]('/:id',auth[_0x65f6('0x8')](),controller[_0x65f6('0xf')]);router[_0x65f6('0x10')](_0x65f6('0x9'),auth[_0x65f6('0x8')](),controller[_0x65f6('0x11')]);module[_0x65f6('0x12')]=router; \ No newline at end of file diff --git a/server/api/intSalesforceConfiguration/intSalesforceConfiguration.attributes.js b/server/api/intSalesforceConfiguration/intSalesforceConfiguration.attributes.js index f9af210..84f468c 100644 --- a/server/api/intSalesforceConfiguration/intSalesforceConfiguration.attributes.js +++ b/server/api/intSalesforceConfiguration/intSalesforceConfiguration.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6346=['account_contact_lead','account','sequelize','exports','STRING','ENUM','contact_lead','lead'];(function(_0x28a59c,_0x37bd9f){var _0x14cbba=function(_0x4624eb){while(--_0x4624eb){_0x28a59c['push'](_0x28a59c['shift']());}};_0x14cbba(++_0x37bd9f);}(_0x6346,0x152));var _0x6634=function(_0xaa1b3e,_0x47d976){_0xaa1b3e=_0xaa1b3e-0x0;var _0x454d7d=_0x6346[_0xaa1b3e];return _0x454d7d;};'use strict';var Sequelize=require(_0x6634('0x0'));module[_0x6634('0x1')]={'name':{'type':Sequelize[_0x6634('0x2')]},'description':{'type':Sequelize[_0x6634('0x2')]},'ticketType':{'type':Sequelize[_0x6634('0x3')]('Task','Case'),'defaultValue':'Task'},'moduleSearch':{'type':Sequelize[_0x6634('0x3')](_0x6634('0x4'),'contact',_0x6634('0x5'),_0x6634('0x6'),'account'),'defaultValue':_0x6634('0x4')},'moduleCreate':{'type':Sequelize[_0x6634('0x3')]('nothing','contact',_0x6634('0x5'),_0x6634('0x7')),'defaultValue':_0x6634('0x5')},'leadId':{'type':Sequelize['STRING']},'additionalSearchAccount':{'type':Sequelize[_0x6634('0x2')]},'additionalSearchContact':{'type':Sequelize['STRING']},'additionalSearchLead':{'type':Sequelize['STRING']}}; \ No newline at end of file +var _0x8fb9=['exports','STRING','Task','Case','contact','lead','account_contact_lead','account','contact_lead','ENUM','nothing'];(function(_0x251d17,_0x52e8d4){var _0x207b25=function(_0x56b526){while(--_0x56b526){_0x251d17['push'](_0x251d17['shift']());}};_0x207b25(++_0x52e8d4);}(_0x8fb9,0x155));var _0x98fb=function(_0x515afd,_0x1a1e91){_0x515afd=_0x515afd-0x0;var _0x536d53=_0x8fb9[_0x515afd];return _0x536d53;};'use strict';var Sequelize=require('sequelize');module[_0x98fb('0x0')]={'name':{'type':Sequelize[_0x98fb('0x1')]},'description':{'type':Sequelize[_0x98fb('0x1')]},'ticketType':{'type':Sequelize['ENUM'](_0x98fb('0x2'),_0x98fb('0x3')),'defaultValue':_0x98fb('0x2')},'moduleSearch':{'type':Sequelize['ENUM']('contact_lead',_0x98fb('0x4'),_0x98fb('0x5'),_0x98fb('0x6'),_0x98fb('0x7')),'defaultValue':_0x98fb('0x8')},'moduleCreate':{'type':Sequelize[_0x98fb('0x9')](_0x98fb('0xa'),_0x98fb('0x4'),_0x98fb('0x5'),_0x98fb('0x7')),'defaultValue':_0x98fb('0x5')},'leadId':{'type':Sequelize['STRING']},'additionalSearchAccount':{'type':Sequelize[_0x98fb('0x1')]},'additionalSearchContact':{'type':Sequelize[_0x98fb('0x1')]},'additionalSearchLead':{'type':Sequelize[_0x98fb('0x1')]}}; \ No newline at end of file diff --git a/server/api/intSalesforceConfiguration/intSalesforceConfiguration.controller.js b/server/api/intSalesforceConfiguration/intSalesforceConfiguration.controller.js index a199625..b2be1bf 100644 --- a/server/api/intSalesforceConfiguration/intSalesforceConfiguration.controller.js +++ b/server/api/intSalesforceConfiguration/intSalesforceConfiguration.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x812d=['length','hasOwnProperty','sort','where','pick','filter','merge','VIRTUAL','options','SalesforceConfiguration','includeAll','include','rows','show','find','create','body','params','getFields','findOne','SalesforceField','order','nolimit','getSubjects','getDescriptions','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','squel','crypto','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','api','../../config/license/util','../../mysqldb','jayson/promise','http','info','debug','SalesforceConfiguration,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','SalesforceConfiguration,\x20%s,\x20%s','message','catch','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','update','then','destroy','end','stack','name','send','rawAttributes','type','key','model','map','query','keys','filters','intersection','attributes','fields'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x812d,0x6e));var _0xd812=function(_0x41f5d0,_0x2b9e81){_0x41f5d0=_0x41f5d0-0x0;var _0x5d01d5=_0x812d[_0x41f5d0];return _0x5d01d5;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xd812('0x0'));var zipdir=require(_0xd812('0x1'));var jsonpatch=require(_0xd812('0x2'));var rp=require(_0xd812('0x3'));var moment=require(_0xd812('0x4'));var BPromise=require(_0xd812('0x5'));var Mustache=require(_0xd812('0x6'));var util=require(_0xd812('0x7'));var path=require('path');var sox=require(_0xd812('0x8'));var csv=require(_0xd812('0x9'));var ejs=require(_0xd812('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0xd812('0xb'));var crypto=require(_0xd812('0xc'));var jsforce=require('jsforce');var deskjs=require(_0xd812('0xd'));var toCsv=require(_0xd812('0x9'));var querystring=require('querystring');var Papa=require(_0xd812('0xe'));var Redis=require(_0xd812('0xf'));var authService=require(_0xd812('0x10'));var qs=require('../../components/parsers/qs');var as=require(_0xd812('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xd812('0x12'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0xd812('0x13'));var db=require(_0xd812('0x14'))['db'];var jayson=require(_0xd812('0x15'));var client=jayson['client'][_0xd812('0x16')]({'port':0x232a});function respondWithRpcPromise(_0x431464,_0x2a7060,_0x188cd5,_0x3e4ef2){return new BPromise(function(_0x2625e5,_0x2bc66b){var _0x30feb1=_0x3e4ef2||client;return _0x30feb1['request'](_0x431464,_0x188cd5)['then'](function(_0x5cb5e9){logger[_0xd812('0x17')]('SalesforceConfiguration,\x20%s,\x20%s',_0x2a7060,'request\x20sent');logger[_0xd812('0x18')](_0xd812('0x19'),_0x2a7060,_0xd812('0x1a'),JSON[_0xd812('0x1b')](_0x5cb5e9));if(_0x5cb5e9[_0xd812('0x1c')]){if(_0x5cb5e9[_0xd812('0x1c')][_0xd812('0x1d')]===0x1f4){logger['error']('SalesforceConfiguration,\x20%s,\x20%s',_0x2a7060,_0x5cb5e9[_0xd812('0x1c')]['message']);return _0x2bc66b(_0x5cb5e9[_0xd812('0x1c')]['message']);}logger['error'](_0xd812('0x1e'),_0x2a7060,_0x5cb5e9[_0xd812('0x1c')][_0xd812('0x1f')]);return _0x2625e5(_0x5cb5e9[_0xd812('0x1c')][_0xd812('0x1f')]);}else{logger['info']('SalesforceConfiguration,\x20%s,\x20%s',_0x2a7060,'request\x20sent');_0x2625e5(_0x5cb5e9['result'][_0xd812('0x1f')]);}})[_0xd812('0x20')](function(_0x4b4434){logger[_0xd812('0x1c')]('SalesforceConfiguration,\x20%s,\x20%s',_0x2a7060,_0x4b4434);_0x2bc66b(_0x4b4434);});});}function respondWithStatusCode(_0x5c4dd0,_0x3f34e0){_0x3f34e0=_0x3f34e0||0xcc;return function(_0x4522b4){if(_0x4522b4){return _0x5c4dd0[_0xd812('0x21')](_0x3f34e0);}return _0x5c4dd0[_0xd812('0x22')](_0x3f34e0)['end']();};}function respondWithResult(_0x299c00,_0x2d51f6){_0x2d51f6=_0x2d51f6||0xc8;return function(_0x584669){if(_0x584669){return _0x299c00[_0xd812('0x22')](_0x2d51f6)[_0xd812('0x23')](_0x584669);}};}function respondWithFilteredResult(_0x3e223b,_0x1dd1de){return function(_0x47d075){if(_0x47d075){var _0x41e301=typeof _0x1dd1de[_0xd812('0x24')]===_0xd812('0x25')&&typeof _0x1dd1de[_0xd812('0x26')]==='undefined';var _0x517bf3=_0x47d075[_0xd812('0x27')];var _0x59d8e4=_0x41e301?0x0:_0x1dd1de[_0xd812('0x24')];var _0xcda85=_0x41e301?_0x47d075['count']:_0x1dd1de[_0xd812('0x24')]+_0x1dd1de[_0xd812('0x26')];var _0x408d10;if(_0xcda85>=_0x517bf3){_0xcda85=_0x517bf3;_0x408d10=0xc8;}else{_0x408d10=0xce;}_0x3e223b['status'](_0x408d10);return _0x3e223b[_0xd812('0x28')](_0xd812('0x29'),_0x59d8e4+'-'+_0xcda85+'/'+_0x517bf3)[_0xd812('0x23')](_0x47d075);}return null;};}function patchUpdates(_0x5e114e){return function(_0x1caaea){try{jsonpatch['apply'](_0x1caaea,_0x5e114e,!![]);}catch(_0x2c014e){return BPromise['reject'](_0x2c014e);}return _0x1caaea['save']();};}function saveUpdates(_0x59bb07,_0x10921b){return function(_0x416759){if(_0x416759){return _0x416759[_0xd812('0x2a')](_0x59bb07)[_0xd812('0x2b')](function(_0x4d0db5){return _0x4d0db5;});}return null;};}function removeEntity(_0x19e881,_0x5f234d){return function(_0x347408){if(_0x347408){return _0x347408[_0xd812('0x2c')]()[_0xd812('0x2b')](function(){_0x19e881['status'](0xcc)[_0xd812('0x2d')]();});}};}function handleEntityNotFound(_0x16cb57,_0x283f7b){return function(_0x2623f1){if(!_0x2623f1){_0x16cb57[_0xd812('0x21')](0x194);}return _0x2623f1;};}function handleError(_0x3dec65,_0x3ac431){_0x3ac431=_0x3ac431||0x1f4;return function(_0x4c9205){logger[_0xd812('0x1c')](_0x4c9205[_0xd812('0x2e')]);if(_0x4c9205[_0xd812('0x2f')]){delete _0x4c9205['name'];}_0x3dec65[_0xd812('0x22')](_0x3ac431)[_0xd812('0x30')](_0x4c9205);};}exports['index']=function(_0x244f27,_0x4a7208){var _0x437114={},_0x2a8c52={},_0x4d67a0={'count':0x0,'rows':[]};var _0x4ddb8f=_['map'](db['SalesforceConfiguration'][_0xd812('0x31')],function(_0x4c9d75){return{'name':_0x4c9d75['fieldName'],'type':_0x4c9d75[_0xd812('0x32')][_0xd812('0x33')]};});_0x2a8c52[_0xd812('0x34')]=_[_0xd812('0x35')](_0x4ddb8f,_0xd812('0x2f'));_0x2a8c52[_0xd812('0x36')]=_[_0xd812('0x37')](_0x244f27[_0xd812('0x36')]);_0x2a8c52[_0xd812('0x38')]=_[_0xd812('0x39')](_0x2a8c52['model'],_0x2a8c52['query']);_0x437114[_0xd812('0x3a')]=_[_0xd812('0x39')](_0x2a8c52[_0xd812('0x34')],qs['fields'](_0x244f27[_0xd812('0x36')][_0xd812('0x3b')]));_0x437114['attributes']=_0x437114[_0xd812('0x3a')][_0xd812('0x3c')]?_0x437114[_0xd812('0x3a')]:_0x2a8c52[_0xd812('0x34')];if(!_0x244f27[_0xd812('0x36')][_0xd812('0x3d')]('nolimit')){_0x437114[_0xd812('0x26')]=qs['limit'](_0x244f27[_0xd812('0x36')][_0xd812('0x26')]);_0x437114['offset']=qs[_0xd812('0x24')](_0x244f27[_0xd812('0x36')][_0xd812('0x24')]);}_0x437114['order']=qs[_0xd812('0x3e')](_0x244f27[_0xd812('0x36')]['sort']);_0x437114[_0xd812('0x3f')]=qs[_0xd812('0x38')](_[_0xd812('0x40')](_0x244f27[_0xd812('0x36')],_0x2a8c52['filters']),_0x4ddb8f);if(_0x244f27[_0xd812('0x36')][_0xd812('0x41')]){_0x437114[_0xd812('0x3f')]=_[_0xd812('0x42')](_0x437114[_0xd812('0x3f')],{'$or':_['map'](_0x4ddb8f,function(_0x4e1885){if(_0x4e1885[_0xd812('0x32')]!==_0xd812('0x43')){var _0x18097e={};_0x18097e[_0x4e1885['name']]={'$like':'%'+_0x244f27[_0xd812('0x36')][_0xd812('0x41')]+'%'};return _0x18097e;}})});}_0x437114=_[_0xd812('0x42')]({},_0x437114,_0x244f27[_0xd812('0x44')]);var _0x5d39d9={'where':_0x437114[_0xd812('0x3f')]};return db[_0xd812('0x45')]['count'](_0x5d39d9)[_0xd812('0x2b')](function(_0x3b114c){_0x4d67a0[_0xd812('0x27')]=_0x3b114c;if(_0x244f27[_0xd812('0x36')][_0xd812('0x46')]){_0x437114[_0xd812('0x47')]=[{'all':!![]}];}return db[_0xd812('0x45')]['findAll'](_0x437114);})[_0xd812('0x2b')](function(_0x9e8ae){_0x4d67a0[_0xd812('0x48')]=_0x9e8ae;return _0x4d67a0;})['then'](respondWithFilteredResult(_0x4a7208,_0x437114))[_0xd812('0x20')](handleError(_0x4a7208,null));};exports[_0xd812('0x49')]=function(_0x5af375,_0x5eadf9){var _0x397601={'raw':![],'where':{'id':_0x5af375['params']['id']}},_0x509c15={};_0x509c15[_0xd812('0x34')]=_[_0xd812('0x37')](db[_0xd812('0x45')][_0xd812('0x31')]);_0x509c15[_0xd812('0x36')]=_[_0xd812('0x37')](_0x5af375[_0xd812('0x36')]);_0x509c15[_0xd812('0x38')]=_[_0xd812('0x39')](_0x509c15['model'],_0x509c15['query']);_0x397601[_0xd812('0x3a')]=_[_0xd812('0x39')](_0x509c15[_0xd812('0x34')],qs[_0xd812('0x3b')](_0x5af375[_0xd812('0x36')][_0xd812('0x3b')]));_0x397601[_0xd812('0x3a')]=_0x397601['attributes']['length']?_0x397601['attributes']:_0x509c15['model'];if(_0x5af375['query']['includeAll']){_0x397601['include']=[{'all':!![]}];}_0x397601=_[_0xd812('0x42')]({},_0x397601,_0x5af375['options']);return db['SalesforceConfiguration'][_0xd812('0x4a')](_0x397601)[_0xd812('0x2b')](handleEntityNotFound(_0x5eadf9,null))['then'](respondWithResult(_0x5eadf9,null))[_0xd812('0x20')](handleError(_0x5eadf9,null));};exports['create']=function(_0x3ed453,_0x4943ba){return db['SalesforceConfiguration'][_0xd812('0x4b')](_0x3ed453['body'],{})['then'](respondWithResult(_0x4943ba,0xc9))[_0xd812('0x20')](handleError(_0x4943ba,null));};exports[_0xd812('0x2a')]=function(_0x19aa2f,_0x59e41f){if(_0x19aa2f['body']['id']){delete _0x19aa2f[_0xd812('0x4c')]['id'];}return db[_0xd812('0x45')]['find']({'where':{'id':_0x19aa2f[_0xd812('0x4d')]['id']}})['then'](handleEntityNotFound(_0x59e41f,null))[_0xd812('0x2b')](saveUpdates(_0x19aa2f[_0xd812('0x4c')],null))[_0xd812('0x2b')](respondWithResult(_0x59e41f,null))['catch'](handleError(_0x59e41f,null));};exports[_0xd812('0x2c')]=function(_0xa71a27,_0x21e1c2){return db[_0xd812('0x45')]['find']({'where':{'id':_0xa71a27[_0xd812('0x4d')]['id']}})[_0xd812('0x2b')](handleEntityNotFound(_0x21e1c2,null))[_0xd812('0x2b')](removeEntity(_0x21e1c2,null))['catch'](handleError(_0x21e1c2,null));};exports[_0xd812('0x4e')]=function(_0x3f067a,_0x19cc6b,_0x218984){var _0x3e9f08={};var _0x1cc732={};var _0x1114c2;var _0x253628;return db[_0xd812('0x45')][_0xd812('0x4f')]({'where':{'id':_0x3f067a[_0xd812('0x4d')]['id']}})[_0xd812('0x2b')](handleEntityNotFound(_0x19cc6b,null))[_0xd812('0x2b')](function(_0xa7a023){if(_0xa7a023){_0x1114c2=_0xa7a023;_0x1cc732[_0xd812('0x34')]=_[_0xd812('0x37')](db[_0xd812('0x50')]['rawAttributes']);_0x1cc732['query']=_['keys'](_0x3f067a[_0xd812('0x36')]);_0x1cc732['filters']=_[_0xd812('0x39')](_0x1cc732[_0xd812('0x34')],_0x1cc732[_0xd812('0x36')]);_0x3e9f08['attributes']=_['intersection'](_0x1cc732['model'],qs[_0xd812('0x3b')](_0x3f067a['query'][_0xd812('0x3b')]));_0x3e9f08['attributes']=_0x3e9f08[_0xd812('0x3a')][_0xd812('0x3c')]?_0x3e9f08[_0xd812('0x3a')]:_0x1cc732['model'];_0x3e9f08[_0xd812('0x51')]=qs[_0xd812('0x3e')](_0x3f067a[_0xd812('0x36')][_0xd812('0x3e')]);_0x3e9f08[_0xd812('0x3f')]=qs[_0xd812('0x38')](_[_0xd812('0x40')](_0x3f067a[_0xd812('0x36')],_0x1cc732[_0xd812('0x38')]));if(_0x3f067a['query'][_0xd812('0x41')]){_0x3e9f08[_0xd812('0x3f')]=_[_0xd812('0x42')](_0x3e9f08[_0xd812('0x3f')],{'$or':_[_0xd812('0x35')](_0x3e9f08[_0xd812('0x3a')],function(_0x6b4c27){var _0x2dbd10={};_0x2dbd10[_0x6b4c27]={'$like':'%'+_0x3f067a[_0xd812('0x36')][_0xd812('0x41')]+'%'};return _0x2dbd10;})});}_0x3e9f08=_[_0xd812('0x42')]({},_0x3e9f08,_0x3f067a[_0xd812('0x44')]);return _0x1114c2[_0xd812('0x4e')](_0x3e9f08);}})[_0xd812('0x2b')](function(_0x43bced){if(_0x43bced){_0x253628=_0x43bced[_0xd812('0x3c')];if(!_0x3f067a[_0xd812('0x36')]['hasOwnProperty'](_0xd812('0x52'))){_0x3e9f08[_0xd812('0x26')]=qs['limit'](_0x3f067a[_0xd812('0x36')][_0xd812('0x26')]);_0x3e9f08['offset']=qs[_0xd812('0x24')](_0x3f067a[_0xd812('0x36')][_0xd812('0x24')]);}return _0x1114c2['getFields'](_0x3e9f08);}})[_0xd812('0x2b')](function(_0x597cc5){if(_0x597cc5){return _0x597cc5?{'count':_0x253628,'rows':_0x597cc5}:null;}})['then'](respondWithResult(_0x19cc6b,null))[_0xd812('0x20')](handleError(_0x19cc6b,null));};exports[_0xd812('0x53')]=function(_0x5aa20f,_0xc9c536,_0x36034d){var _0x5b79c8={};var _0x54238d={};var _0x4a9ee4;var _0xabfee2;return db[_0xd812('0x45')][_0xd812('0x4f')]({'where':{'id':_0x5aa20f['params']['id']}})[_0xd812('0x2b')](handleEntityNotFound(_0xc9c536,null))[_0xd812('0x2b')](function(_0x51fecb){if(_0x51fecb){_0x4a9ee4=_0x51fecb;_0x54238d[_0xd812('0x34')]=_[_0xd812('0x37')](db['SalesforceField']['rawAttributes']);_0x54238d[_0xd812('0x36')]=_[_0xd812('0x37')](_0x5aa20f[_0xd812('0x36')]);_0x54238d['filters']=_['intersection'](_0x54238d[_0xd812('0x34')],_0x54238d[_0xd812('0x36')]);_0x5b79c8[_0xd812('0x3a')]=_['intersection'](_0x54238d[_0xd812('0x34')],qs[_0xd812('0x3b')](_0x5aa20f[_0xd812('0x36')][_0xd812('0x3b')]));_0x5b79c8['attributes']=_0x5b79c8[_0xd812('0x3a')][_0xd812('0x3c')]?_0x5b79c8[_0xd812('0x3a')]:_0x54238d['model'];_0x5b79c8['order']=qs[_0xd812('0x3e')](_0x5aa20f['query'][_0xd812('0x3e')]);_0x5b79c8[_0xd812('0x3f')]=qs['filters'](_[_0xd812('0x40')](_0x5aa20f['query'],_0x54238d[_0xd812('0x38')]));if(_0x5aa20f['query'][_0xd812('0x41')]){_0x5b79c8[_0xd812('0x3f')]=_[_0xd812('0x42')](_0x5b79c8[_0xd812('0x3f')],{'$or':_[_0xd812('0x35')](_0x5b79c8['attributes'],function(_0x2d3684){var _0x2f3471={};_0x2f3471[_0x2d3684]={'$like':'%'+_0x5aa20f['query']['filter']+'%'};return _0x2f3471;})});}_0x5b79c8=_[_0xd812('0x42')]({},_0x5b79c8,_0x5aa20f[_0xd812('0x44')]);return _0x4a9ee4['getSubjects'](_0x5b79c8);}})[_0xd812('0x2b')](function(_0x232172){if(_0x232172){_0xabfee2=_0x232172['length'];if(!_0x5aa20f['query'][_0xd812('0x3d')](_0xd812('0x52'))){_0x5b79c8[_0xd812('0x26')]=qs[_0xd812('0x26')](_0x5aa20f['query']['limit']);_0x5b79c8[_0xd812('0x24')]=qs[_0xd812('0x24')](_0x5aa20f['query']['offset']);}return _0x4a9ee4[_0xd812('0x53')](_0x5b79c8);}})[_0xd812('0x2b')](function(_0xf65325){if(_0xf65325){return _0xf65325?{'count':_0xabfee2,'rows':_0xf65325}:null;}})[_0xd812('0x2b')](respondWithResult(_0xc9c536,null))[_0xd812('0x20')](handleError(_0xc9c536,null));};exports[_0xd812('0x54')]=function(_0x1f1ed4,_0x29d671,_0x5b7db0){var _0x5b15d9={};var _0x453e47={};var _0x2ffbb2;var _0x222475;return db[_0xd812('0x45')]['findOne']({'where':{'id':_0x1f1ed4[_0xd812('0x4d')]['id']}})['then'](handleEntityNotFound(_0x29d671,null))[_0xd812('0x2b')](function(_0x1619fd){if(_0x1619fd){_0x2ffbb2=_0x1619fd;_0x453e47['model']=_[_0xd812('0x37')](db[_0xd812('0x50')][_0xd812('0x31')]);_0x453e47[_0xd812('0x36')]=_[_0xd812('0x37')](_0x1f1ed4[_0xd812('0x36')]);_0x453e47[_0xd812('0x38')]=_[_0xd812('0x39')](_0x453e47[_0xd812('0x34')],_0x453e47[_0xd812('0x36')]);_0x5b15d9[_0xd812('0x3a')]=_[_0xd812('0x39')](_0x453e47[_0xd812('0x34')],qs[_0xd812('0x3b')](_0x1f1ed4[_0xd812('0x36')][_0xd812('0x3b')]));_0x5b15d9[_0xd812('0x3a')]=_0x5b15d9[_0xd812('0x3a')][_0xd812('0x3c')]?_0x5b15d9[_0xd812('0x3a')]:_0x453e47['model'];_0x5b15d9[_0xd812('0x51')]=qs[_0xd812('0x3e')](_0x1f1ed4['query'][_0xd812('0x3e')]);_0x5b15d9[_0xd812('0x3f')]=qs[_0xd812('0x38')](_[_0xd812('0x40')](_0x1f1ed4[_0xd812('0x36')],_0x453e47[_0xd812('0x38')]));if(_0x1f1ed4['query'][_0xd812('0x41')]){_0x5b15d9[_0xd812('0x3f')]=_[_0xd812('0x42')](_0x5b15d9[_0xd812('0x3f')],{'$or':_[_0xd812('0x35')](_0x5b15d9[_0xd812('0x3a')],function(_0x839d9f){var _0x351614={};_0x351614[_0x839d9f]={'$like':'%'+_0x1f1ed4[_0xd812('0x36')][_0xd812('0x41')]+'%'};return _0x351614;})});}_0x5b15d9=_['merge']({},_0x5b15d9,_0x1f1ed4[_0xd812('0x44')]);return _0x2ffbb2[_0xd812('0x54')](_0x5b15d9);}})[_0xd812('0x2b')](function(_0x20636d){if(_0x20636d){_0x222475=_0x20636d[_0xd812('0x3c')];if(!_0x1f1ed4['query'][_0xd812('0x3d')](_0xd812('0x52'))){_0x5b15d9[_0xd812('0x26')]=qs[_0xd812('0x26')](_0x1f1ed4[_0xd812('0x36')]['limit']);_0x5b15d9[_0xd812('0x24')]=qs['offset'](_0x1f1ed4['query'][_0xd812('0x24')]);}return _0x2ffbb2[_0xd812('0x54')](_0x5b15d9);}})[_0xd812('0x2b')](function(_0x1e024c){if(_0x1e024c){return _0x1e024c?{'count':_0x222475,'rows':_0x1e024c}:null;}})[_0xd812('0x2b')](respondWithResult(_0x29d671,null))[_0xd812('0x20')](handleError(_0x29d671,null));}; \ No newline at end of file +var _0xe5e0=['body','params','findOne','SalesforceField','order','getFields','hasOwnProperty','getSubjects','getDescriptions','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','client','http','request','info','request\x20sent','debug','error','code','SalesforceConfiguration,\x20%s,\x20%s','message','result','catch','sendStatus','status','end','offset','undefined','count','limit','set','Content-Range','apply','reject','save','update','destroy','then','stack','name','send','index','map','SalesforceConfiguration','rawAttributes','fieldName','type','key','keys','query','intersection','model','fields','attributes','length','nolimit','sort','pick','filters','filter','merge','where','VIRTUAL','options','includeAll','show','include','find','create'];(function(_0x2641f9,_0x26715f){var _0x585741=function(_0x2d1462){while(--_0x2d1462){_0x2641f9['push'](_0x2641f9['shift']());}};_0x585741(++_0x26715f);}(_0xe5e0,0x123));var _0x0e5e=function(_0x174f19,_0x4c8a8b){_0x174f19=_0x174f19-0x0;var _0x53cc50=_0xe5e0[_0x174f19];return _0x53cc50;};'use strict';var emlformat=require(_0x0e5e('0x0'));var rimraf=require(_0x0e5e('0x1'));var zipdir=require(_0x0e5e('0x2'));var jsonpatch=require(_0x0e5e('0x3'));var rp=require(_0x0e5e('0x4'));var moment=require(_0x0e5e('0x5'));var BPromise=require(_0x0e5e('0x6'));var Mustache=require(_0x0e5e('0x7'));var util=require(_0x0e5e('0x8'));var path=require(_0x0e5e('0x9'));var sox=require('sox');var csv=require(_0x0e5e('0xa'));var ejs=require(_0x0e5e('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x0e5e('0xc'));var squel=require('squel');var crypto=require(_0x0e5e('0xd'));var jsforce=require(_0x0e5e('0xe'));var deskjs=require(_0x0e5e('0xf'));var toCsv=require('to-csv');var querystring=require(_0x0e5e('0x10'));var Papa=require(_0x0e5e('0x11'));var Redis=require(_0x0e5e('0x12'));var authService=require(_0x0e5e('0x13'));var qs=require(_0x0e5e('0x14'));var as=require(_0x0e5e('0x15'));var hardwareService=require(_0x0e5e('0x16'));var logger=require(_0x0e5e('0x17'))(_0x0e5e('0x18'));var utils=require('../../config/utils');var config=require(_0x0e5e('0x19'));var licenseUtil=require('../../config/license/util');var db=require(_0x0e5e('0x1a'))['db'];var jayson=require('jayson/promise');var client=jayson[_0x0e5e('0x1b')][_0x0e5e('0x1c')]({'port':0x232a});function respondWithRpcPromise(_0x2ff943,_0x363c7a,_0x3030d4,_0x39abe5){return new BPromise(function(_0x3a3b25,_0x4a9b48){var _0x2f089f=_0x39abe5||client;return _0x2f089f[_0x0e5e('0x1d')](_0x2ff943,_0x3030d4)['then'](function(_0xa59fa4){logger[_0x0e5e('0x1e')]('SalesforceConfiguration,\x20%s,\x20%s',_0x363c7a,_0x0e5e('0x1f'));logger[_0x0e5e('0x20')]('SalesforceConfiguration,\x20%s,\x20%s,\x20%s',_0x363c7a,'request\x20sent',JSON['stringify'](_0xa59fa4));if(_0xa59fa4['error']){if(_0xa59fa4[_0x0e5e('0x21')][_0x0e5e('0x22')]===0x1f4){logger[_0x0e5e('0x21')](_0x0e5e('0x23'),_0x363c7a,_0xa59fa4[_0x0e5e('0x21')]['message']);return _0x4a9b48(_0xa59fa4[_0x0e5e('0x21')][_0x0e5e('0x24')]);}logger[_0x0e5e('0x21')]('SalesforceConfiguration,\x20%s,\x20%s',_0x363c7a,_0xa59fa4['error'][_0x0e5e('0x24')]);return _0x3a3b25(_0xa59fa4[_0x0e5e('0x21')]['message']);}else{logger[_0x0e5e('0x1e')]('SalesforceConfiguration,\x20%s,\x20%s',_0x363c7a,_0x0e5e('0x1f'));_0x3a3b25(_0xa59fa4[_0x0e5e('0x25')][_0x0e5e('0x24')]);}})[_0x0e5e('0x26')](function(_0x28d460){logger['error'](_0x0e5e('0x23'),_0x363c7a,_0x28d460);_0x4a9b48(_0x28d460);});});}function respondWithStatusCode(_0x1aabd1,_0x4759d9){_0x4759d9=_0x4759d9||0xcc;return function(_0x4a9505){if(_0x4a9505){return _0x1aabd1[_0x0e5e('0x27')](_0x4759d9);}return _0x1aabd1[_0x0e5e('0x28')](_0x4759d9)[_0x0e5e('0x29')]();};}function respondWithResult(_0x4c877f,_0x1d516b){_0x1d516b=_0x1d516b||0xc8;return function(_0x699304){if(_0x699304){return _0x4c877f[_0x0e5e('0x28')](_0x1d516b)['json'](_0x699304);}};}function respondWithFilteredResult(_0x3e91b5,_0x34dbf5){return function(_0x5e5349){if(_0x5e5349){var _0x848d2d=typeof _0x34dbf5[_0x0e5e('0x2a')]===_0x0e5e('0x2b')&&typeof _0x34dbf5['limit']===_0x0e5e('0x2b');var _0x27d8ba=_0x5e5349[_0x0e5e('0x2c')];var _0x106dc3=_0x848d2d?0x0:_0x34dbf5['offset'];var _0x58b734=_0x848d2d?_0x5e5349[_0x0e5e('0x2c')]:_0x34dbf5['offset']+_0x34dbf5[_0x0e5e('0x2d')];var _0x364309;if(_0x58b734>=_0x27d8ba){_0x58b734=_0x27d8ba;_0x364309=0xc8;}else{_0x364309=0xce;}_0x3e91b5['status'](_0x364309);return _0x3e91b5[_0x0e5e('0x2e')](_0x0e5e('0x2f'),_0x106dc3+'-'+_0x58b734+'/'+_0x27d8ba)['json'](_0x5e5349);}return null;};}function patchUpdates(_0x402430){return function(_0x5f3dab){try{jsonpatch[_0x0e5e('0x30')](_0x5f3dab,_0x402430,!![]);}catch(_0x218daf){return BPromise[_0x0e5e('0x31')](_0x218daf);}return _0x5f3dab[_0x0e5e('0x32')]();};}function saveUpdates(_0x40168c,_0x21b63c){return function(_0x5bac54){if(_0x5bac54){return _0x5bac54[_0x0e5e('0x33')](_0x40168c)['then'](function(_0x5c0180){return _0x5c0180;});}return null;};}function removeEntity(_0x4bd575,_0x2a14e7){return function(_0x1416d5){if(_0x1416d5){return _0x1416d5[_0x0e5e('0x34')]()[_0x0e5e('0x35')](function(){_0x4bd575[_0x0e5e('0x28')](0xcc)[_0x0e5e('0x29')]();});}};}function handleEntityNotFound(_0x2fcbae,_0x41d74f){return function(_0x2b0ceb){if(!_0x2b0ceb){_0x2fcbae[_0x0e5e('0x27')](0x194);}return _0x2b0ceb;};}function handleError(_0xeeac1a,_0xb104e2){_0xb104e2=_0xb104e2||0x1f4;return function(_0x166ace){logger[_0x0e5e('0x21')](_0x166ace[_0x0e5e('0x36')]);if(_0x166ace[_0x0e5e('0x37')]){delete _0x166ace['name'];}_0xeeac1a[_0x0e5e('0x28')](_0xb104e2)[_0x0e5e('0x38')](_0x166ace);};}exports[_0x0e5e('0x39')]=function(_0x457d2f,_0xd0b723){var _0x2237a4={},_0x490075={},_0xead385={'count':0x0,'rows':[]};var _0x4cb471=_[_0x0e5e('0x3a')](db[_0x0e5e('0x3b')][_0x0e5e('0x3c')],function(_0x2b4fca){return{'name':_0x2b4fca[_0x0e5e('0x3d')],'type':_0x2b4fca[_0x0e5e('0x3e')][_0x0e5e('0x3f')]};});_0x490075['model']=_['map'](_0x4cb471,_0x0e5e('0x37'));_0x490075['query']=_[_0x0e5e('0x40')](_0x457d2f[_0x0e5e('0x41')]);_0x490075['filters']=_[_0x0e5e('0x42')](_0x490075['model'],_0x490075['query']);_0x2237a4['attributes']=_[_0x0e5e('0x42')](_0x490075[_0x0e5e('0x43')],qs[_0x0e5e('0x44')](_0x457d2f[_0x0e5e('0x41')]['fields']));_0x2237a4[_0x0e5e('0x45')]=_0x2237a4[_0x0e5e('0x45')][_0x0e5e('0x46')]?_0x2237a4[_0x0e5e('0x45')]:_0x490075[_0x0e5e('0x43')];if(!_0x457d2f[_0x0e5e('0x41')]['hasOwnProperty'](_0x0e5e('0x47'))){_0x2237a4[_0x0e5e('0x2d')]=qs[_0x0e5e('0x2d')](_0x457d2f[_0x0e5e('0x41')][_0x0e5e('0x2d')]);_0x2237a4['offset']=qs[_0x0e5e('0x2a')](_0x457d2f[_0x0e5e('0x41')][_0x0e5e('0x2a')]);}_0x2237a4['order']=qs[_0x0e5e('0x48')](_0x457d2f[_0x0e5e('0x41')][_0x0e5e('0x48')]);_0x2237a4['where']=qs['filters'](_[_0x0e5e('0x49')](_0x457d2f['query'],_0x490075[_0x0e5e('0x4a')]),_0x4cb471);if(_0x457d2f[_0x0e5e('0x41')][_0x0e5e('0x4b')]){_0x2237a4['where']=_[_0x0e5e('0x4c')](_0x2237a4[_0x0e5e('0x4d')],{'$or':_[_0x0e5e('0x3a')](_0x4cb471,function(_0x139ea4){if(_0x139ea4['type']!==_0x0e5e('0x4e')){var _0x3f9d14={};_0x3f9d14[_0x139ea4[_0x0e5e('0x37')]]={'$like':'%'+_0x457d2f['query'][_0x0e5e('0x4b')]+'%'};return _0x3f9d14;}})});}_0x2237a4=_[_0x0e5e('0x4c')]({},_0x2237a4,_0x457d2f[_0x0e5e('0x4f')]);var _0x2bcef4={'where':_0x2237a4[_0x0e5e('0x4d')]};return db[_0x0e5e('0x3b')][_0x0e5e('0x2c')](_0x2bcef4)[_0x0e5e('0x35')](function(_0x1cda38){_0xead385['count']=_0x1cda38;if(_0x457d2f['query'][_0x0e5e('0x50')]){_0x2237a4['include']=[{'all':!![]}];}return db[_0x0e5e('0x3b')]['findAll'](_0x2237a4);})[_0x0e5e('0x35')](function(_0x291b32){_0xead385['rows']=_0x291b32;return _0xead385;})[_0x0e5e('0x35')](respondWithFilteredResult(_0xd0b723,_0x2237a4))[_0x0e5e('0x26')](handleError(_0xd0b723,null));};exports[_0x0e5e('0x51')]=function(_0x20928f,_0x48474f){var _0x277860={'raw':![],'where':{'id':_0x20928f['params']['id']}},_0x292d6e={};_0x292d6e[_0x0e5e('0x43')]=_[_0x0e5e('0x40')](db[_0x0e5e('0x3b')][_0x0e5e('0x3c')]);_0x292d6e['query']=_[_0x0e5e('0x40')](_0x20928f['query']);_0x292d6e[_0x0e5e('0x4a')]=_[_0x0e5e('0x42')](_0x292d6e[_0x0e5e('0x43')],_0x292d6e[_0x0e5e('0x41')]);_0x277860[_0x0e5e('0x45')]=_[_0x0e5e('0x42')](_0x292d6e[_0x0e5e('0x43')],qs[_0x0e5e('0x44')](_0x20928f[_0x0e5e('0x41')][_0x0e5e('0x44')]));_0x277860[_0x0e5e('0x45')]=_0x277860[_0x0e5e('0x45')][_0x0e5e('0x46')]?_0x277860[_0x0e5e('0x45')]:_0x292d6e[_0x0e5e('0x43')];if(_0x20928f['query'][_0x0e5e('0x50')]){_0x277860[_0x0e5e('0x52')]=[{'all':!![]}];}_0x277860=_[_0x0e5e('0x4c')]({},_0x277860,_0x20928f[_0x0e5e('0x4f')]);return db[_0x0e5e('0x3b')][_0x0e5e('0x53')](_0x277860)[_0x0e5e('0x35')](handleEntityNotFound(_0x48474f,null))[_0x0e5e('0x35')](respondWithResult(_0x48474f,null))['catch'](handleError(_0x48474f,null));};exports[_0x0e5e('0x54')]=function(_0x31122d,_0x22344c){return db[_0x0e5e('0x3b')]['create'](_0x31122d[_0x0e5e('0x55')],{})[_0x0e5e('0x35')](respondWithResult(_0x22344c,0xc9))[_0x0e5e('0x26')](handleError(_0x22344c,null));};exports[_0x0e5e('0x33')]=function(_0x3c669b,_0xf3646b){if(_0x3c669b[_0x0e5e('0x55')]['id']){delete _0x3c669b[_0x0e5e('0x55')]['id'];}return db[_0x0e5e('0x3b')][_0x0e5e('0x53')]({'where':{'id':_0x3c669b['params']['id']}})[_0x0e5e('0x35')](handleEntityNotFound(_0xf3646b,null))[_0x0e5e('0x35')](saveUpdates(_0x3c669b[_0x0e5e('0x55')],null))['then'](respondWithResult(_0xf3646b,null))[_0x0e5e('0x26')](handleError(_0xf3646b,null));};exports[_0x0e5e('0x34')]=function(_0x33e562,_0x4786ed){return db[_0x0e5e('0x3b')][_0x0e5e('0x53')]({'where':{'id':_0x33e562[_0x0e5e('0x56')]['id']}})[_0x0e5e('0x35')](handleEntityNotFound(_0x4786ed,null))[_0x0e5e('0x35')](removeEntity(_0x4786ed,null))['catch'](handleError(_0x4786ed,null));};exports['getFields']=function(_0x14c1da,_0x44ad35,_0x76e776){var _0x3d6d17={};var _0x1c9fe6={};var _0x38ebc5;var _0x56fbf6;return db['SalesforceConfiguration'][_0x0e5e('0x57')]({'where':{'id':_0x14c1da[_0x0e5e('0x56')]['id']}})[_0x0e5e('0x35')](handleEntityNotFound(_0x44ad35,null))[_0x0e5e('0x35')](function(_0x37a4f6){if(_0x37a4f6){_0x38ebc5=_0x37a4f6;_0x1c9fe6[_0x0e5e('0x43')]=_[_0x0e5e('0x40')](db[_0x0e5e('0x58')][_0x0e5e('0x3c')]);_0x1c9fe6[_0x0e5e('0x41')]=_['keys'](_0x14c1da[_0x0e5e('0x41')]);_0x1c9fe6[_0x0e5e('0x4a')]=_[_0x0e5e('0x42')](_0x1c9fe6['model'],_0x1c9fe6['query']);_0x3d6d17[_0x0e5e('0x45')]=_[_0x0e5e('0x42')](_0x1c9fe6[_0x0e5e('0x43')],qs['fields'](_0x14c1da[_0x0e5e('0x41')]['fields']));_0x3d6d17['attributes']=_0x3d6d17['attributes']['length']?_0x3d6d17[_0x0e5e('0x45')]:_0x1c9fe6['model'];_0x3d6d17[_0x0e5e('0x59')]=qs[_0x0e5e('0x48')](_0x14c1da[_0x0e5e('0x41')][_0x0e5e('0x48')]);_0x3d6d17['where']=qs[_0x0e5e('0x4a')](_[_0x0e5e('0x49')](_0x14c1da[_0x0e5e('0x41')],_0x1c9fe6[_0x0e5e('0x4a')]));if(_0x14c1da['query'][_0x0e5e('0x4b')]){_0x3d6d17['where']=_[_0x0e5e('0x4c')](_0x3d6d17[_0x0e5e('0x4d')],{'$or':_[_0x0e5e('0x3a')](_0x3d6d17[_0x0e5e('0x45')],function(_0x167d53){var _0x6f6383={};_0x6f6383[_0x167d53]={'$like':'%'+_0x14c1da['query']['filter']+'%'};return _0x6f6383;})});}_0x3d6d17=_[_0x0e5e('0x4c')]({},_0x3d6d17,_0x14c1da['options']);return _0x38ebc5[_0x0e5e('0x5a')](_0x3d6d17);}})[_0x0e5e('0x35')](function(_0x2ec17b){if(_0x2ec17b){_0x56fbf6=_0x2ec17b[_0x0e5e('0x46')];if(!_0x14c1da[_0x0e5e('0x41')][_0x0e5e('0x5b')](_0x0e5e('0x47'))){_0x3d6d17[_0x0e5e('0x2d')]=qs[_0x0e5e('0x2d')](_0x14c1da[_0x0e5e('0x41')][_0x0e5e('0x2d')]);_0x3d6d17[_0x0e5e('0x2a')]=qs['offset'](_0x14c1da[_0x0e5e('0x41')][_0x0e5e('0x2a')]);}return _0x38ebc5['getFields'](_0x3d6d17);}})[_0x0e5e('0x35')](function(_0x48e027){if(_0x48e027){return _0x48e027?{'count':_0x56fbf6,'rows':_0x48e027}:null;}})[_0x0e5e('0x35')](respondWithResult(_0x44ad35,null))['catch'](handleError(_0x44ad35,null));};exports[_0x0e5e('0x5c')]=function(_0x259276,_0x3ddcb9,_0x21055f){var _0x479c17={};var _0x23b248={};var _0x518585;var _0x30c855;return db[_0x0e5e('0x3b')][_0x0e5e('0x57')]({'where':{'id':_0x259276['params']['id']}})[_0x0e5e('0x35')](handleEntityNotFound(_0x3ddcb9,null))[_0x0e5e('0x35')](function(_0x2328db){if(_0x2328db){_0x518585=_0x2328db;_0x23b248[_0x0e5e('0x43')]=_['keys'](db[_0x0e5e('0x58')][_0x0e5e('0x3c')]);_0x23b248['query']=_[_0x0e5e('0x40')](_0x259276[_0x0e5e('0x41')]);_0x23b248['filters']=_['intersection'](_0x23b248[_0x0e5e('0x43')],_0x23b248[_0x0e5e('0x41')]);_0x479c17[_0x0e5e('0x45')]=_[_0x0e5e('0x42')](_0x23b248[_0x0e5e('0x43')],qs[_0x0e5e('0x44')](_0x259276[_0x0e5e('0x41')][_0x0e5e('0x44')]));_0x479c17['attributes']=_0x479c17[_0x0e5e('0x45')]['length']?_0x479c17[_0x0e5e('0x45')]:_0x23b248[_0x0e5e('0x43')];_0x479c17[_0x0e5e('0x59')]=qs[_0x0e5e('0x48')](_0x259276[_0x0e5e('0x41')]['sort']);_0x479c17[_0x0e5e('0x4d')]=qs[_0x0e5e('0x4a')](_[_0x0e5e('0x49')](_0x259276[_0x0e5e('0x41')],_0x23b248['filters']));if(_0x259276[_0x0e5e('0x41')]['filter']){_0x479c17[_0x0e5e('0x4d')]=_['merge'](_0x479c17['where'],{'$or':_[_0x0e5e('0x3a')](_0x479c17[_0x0e5e('0x45')],function(_0x148cbf){var _0x2b18fc={};_0x2b18fc[_0x148cbf]={'$like':'%'+_0x259276['query'][_0x0e5e('0x4b')]+'%'};return _0x2b18fc;})});}_0x479c17=_['merge']({},_0x479c17,_0x259276['options']);return _0x518585[_0x0e5e('0x5c')](_0x479c17);}})[_0x0e5e('0x35')](function(_0x50bad0){if(_0x50bad0){_0x30c855=_0x50bad0['length'];if(!_0x259276[_0x0e5e('0x41')][_0x0e5e('0x5b')](_0x0e5e('0x47'))){_0x479c17[_0x0e5e('0x2d')]=qs['limit'](_0x259276['query']['limit']);_0x479c17[_0x0e5e('0x2a')]=qs[_0x0e5e('0x2a')](_0x259276[_0x0e5e('0x41')][_0x0e5e('0x2a')]);}return _0x518585[_0x0e5e('0x5c')](_0x479c17);}})['then'](function(_0x256736){if(_0x256736){return _0x256736?{'count':_0x30c855,'rows':_0x256736}:null;}})[_0x0e5e('0x35')](respondWithResult(_0x3ddcb9,null))[_0x0e5e('0x26')](handleError(_0x3ddcb9,null));};exports[_0x0e5e('0x5d')]=function(_0x3e71e4,_0x3d4fd2,_0x39b858){var _0x50ce6d={};var _0x1a2ac6={};var _0x2dffcd;var _0x20f8be;return db[_0x0e5e('0x3b')][_0x0e5e('0x57')]({'where':{'id':_0x3e71e4[_0x0e5e('0x56')]['id']}})[_0x0e5e('0x35')](handleEntityNotFound(_0x3d4fd2,null))[_0x0e5e('0x35')](function(_0x5593c5){if(_0x5593c5){_0x2dffcd=_0x5593c5;_0x1a2ac6[_0x0e5e('0x43')]=_['keys'](db[_0x0e5e('0x58')][_0x0e5e('0x3c')]);_0x1a2ac6['query']=_[_0x0e5e('0x40')](_0x3e71e4[_0x0e5e('0x41')]);_0x1a2ac6[_0x0e5e('0x4a')]=_['intersection'](_0x1a2ac6[_0x0e5e('0x43')],_0x1a2ac6[_0x0e5e('0x41')]);_0x50ce6d[_0x0e5e('0x45')]=_['intersection'](_0x1a2ac6[_0x0e5e('0x43')],qs['fields'](_0x3e71e4[_0x0e5e('0x41')][_0x0e5e('0x44')]));_0x50ce6d[_0x0e5e('0x45')]=_0x50ce6d[_0x0e5e('0x45')][_0x0e5e('0x46')]?_0x50ce6d[_0x0e5e('0x45')]:_0x1a2ac6[_0x0e5e('0x43')];_0x50ce6d[_0x0e5e('0x59')]=qs['sort'](_0x3e71e4['query'][_0x0e5e('0x48')]);_0x50ce6d['where']=qs['filters'](_[_0x0e5e('0x49')](_0x3e71e4[_0x0e5e('0x41')],_0x1a2ac6[_0x0e5e('0x4a')]));if(_0x3e71e4['query'][_0x0e5e('0x4b')]){_0x50ce6d[_0x0e5e('0x4d')]=_[_0x0e5e('0x4c')](_0x50ce6d[_0x0e5e('0x4d')],{'$or':_['map'](_0x50ce6d[_0x0e5e('0x45')],function(_0x9c1722){var _0x352443={};_0x352443[_0x9c1722]={'$like':'%'+_0x3e71e4[_0x0e5e('0x41')][_0x0e5e('0x4b')]+'%'};return _0x352443;})});}_0x50ce6d=_[_0x0e5e('0x4c')]({},_0x50ce6d,_0x3e71e4[_0x0e5e('0x4f')]);return _0x2dffcd[_0x0e5e('0x5d')](_0x50ce6d);}})[_0x0e5e('0x35')](function(_0x1a9712){if(_0x1a9712){_0x20f8be=_0x1a9712[_0x0e5e('0x46')];if(!_0x3e71e4[_0x0e5e('0x41')][_0x0e5e('0x5b')](_0x0e5e('0x47'))){_0x50ce6d[_0x0e5e('0x2d')]=qs[_0x0e5e('0x2d')](_0x3e71e4[_0x0e5e('0x41')][_0x0e5e('0x2d')]);_0x50ce6d['offset']=qs[_0x0e5e('0x2a')](_0x3e71e4[_0x0e5e('0x41')][_0x0e5e('0x2a')]);}return _0x2dffcd[_0x0e5e('0x5d')](_0x50ce6d);}})[_0x0e5e('0x35')](function(_0xb75743){if(_0xb75743){return _0xb75743?{'count':_0x20f8be,'rows':_0xb75743}:null;}})[_0x0e5e('0x35')](respondWithResult(_0x3d4fd2,null))['catch'](handleError(_0x3d4fd2,null));}; \ No newline at end of file diff --git a/server/api/intSalesforceConfiguration/intSalesforceConfiguration.model.js b/server/api/intSalesforceConfiguration/intSalesforceConfiguration.model.js index e3a9781..6e61863 100644 --- a/server/api/intSalesforceConfiguration/intSalesforceConfiguration.model.js +++ b/server/api/intSalesforceConfiguration/intSalesforceConfiguration.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x42cd=['moment','bluebird','request-promise','path','rimraf','../../config/environment','exports','define','int_salesforce_configurations','lodash','util','../../config/logger','api'];(function(_0x4a4951,_0x48a52b){var _0x42d2f0=function(_0x1ff49c){while(--_0x1ff49c){_0x4a4951['push'](_0x4a4951['shift']());}};_0x42d2f0(++_0x48a52b);}(_0x42cd,0xcc));var _0xd42c=function(_0x1ca5fa,_0xdff97a){_0x1ca5fa=_0x1ca5fa-0x0;var _0x2c963f=_0x42cd[_0x1ca5fa];return _0x2c963f;};'use strict';var _=require(_0xd42c('0x0'));var util=require(_0xd42c('0x1'));var logger=require(_0xd42c('0x2'))(_0xd42c('0x3'));var moment=require(_0xd42c('0x4'));var BPromise=require(_0xd42c('0x5'));var rp=require(_0xd42c('0x6'));var fs=require('fs');var path=require(_0xd42c('0x7'));var rimraf=require(_0xd42c('0x8'));var config=require(_0xd42c('0x9'));var attributes=require('./intSalesforceConfiguration.attributes');module[_0xd42c('0xa')]=function(_0x255b93,_0x45cf11){return _0x255b93[_0xd42c('0xb')]('SalesforceConfiguration',attributes,{'tableName':_0xd42c('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x01b4=['./intSalesforceConfiguration.attributes','exports','SalesforceConfiguration','int_salesforce_configurations','lodash','util','../../config/logger','api','moment','bluebird','rimraf','../../config/environment'];(function(_0x5dfc2a,_0x1a953f){var _0x3f1a71=function(_0x15916){while(--_0x15916){_0x5dfc2a['push'](_0x5dfc2a['shift']());}};_0x3f1a71(++_0x1a953f);}(_0x01b4,0x64));var _0x401b=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x01b4[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x401b('0x0'));var util=require(_0x401b('0x1'));var logger=require(_0x401b('0x2'))(_0x401b('0x3'));var moment=require(_0x401b('0x4'));var BPromise=require(_0x401b('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x401b('0x6'));var config=require(_0x401b('0x7'));var attributes=require(_0x401b('0x8'));module[_0x401b('0x9')]=function(_0x1779ef,_0x4da0db){return _0x1779ef['define'](_0x401b('0xa'),attributes,{'tableName':_0x401b('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intSalesforceConfiguration/intSalesforceConfiguration.rpc.js b/server/api/intSalesforceConfiguration/intSalesforceConfiguration.rpc.js index 61656d6..0ca8ea5 100644 --- a/server/api/intSalesforceConfiguration/intSalesforceConfiguration.rpc.js +++ b/server/api/intSalesforceConfiguration/intSalesforceConfiguration.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1474=['error','SalesforceConfiguration,\x20%s,\x20%s','message','result','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','debug','SalesforceConfiguration,\x20%s,\x20%s,\x20%s','request\x20sent','stringify'];(function(_0x80f6bc,_0x2176f0){var _0x463349=function(_0x362e0f){while(--_0x362e0f){_0x80f6bc['push'](_0x80f6bc['shift']());}};_0x463349(++_0x2176f0);}(_0x1474,0xb4));var _0x4147=function(_0x3e49fe,_0x552dba){_0x3e49fe=_0x3e49fe-0x0;var _0x150873=_0x1474[_0x3e49fe];return _0x150873;};'use strict';var _=require(_0x4147('0x0'));var util=require(_0x4147('0x1'));var moment=require('moment');var BPromise=require(_0x4147('0x2'));var rs=require(_0x4147('0x3'));var fs=require('fs');var Redis=require(_0x4147('0x4'));var db=require(_0x4147('0x5'))['db'];var utils=require(_0x4147('0x6'));var logger=require(_0x4147('0x7'))(_0x4147('0x8'));var config=require(_0x4147('0x9'));var jayson=require(_0x4147('0xa'));var client=jayson[_0x4147('0xb')][_0x4147('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x52196b,_0x20146d,_0x4707df){return new BPromise(function(_0x34e19b,_0x2d337b){return client[_0x4147('0xd')](_0x52196b,_0x4707df)[_0x4147('0xe')](function(_0x5f5144){logger[_0x4147('0xf')]('SalesforceConfiguration,\x20%s,\x20%s',_0x20146d,'request\x20sent');logger[_0x4147('0x10')](_0x4147('0x11'),_0x20146d,_0x4147('0x12'),JSON[_0x4147('0x13')](_0x5f5144));if(_0x5f5144[_0x4147('0x14')]){if(_0x5f5144[_0x4147('0x14')]['code']===0x1f4){logger['error'](_0x4147('0x15'),_0x20146d,_0x5f5144[_0x4147('0x14')][_0x4147('0x16')]);return _0x2d337b(_0x5f5144[_0x4147('0x14')][_0x4147('0x16')]);}logger[_0x4147('0x14')](_0x4147('0x15'),_0x20146d,_0x5f5144[_0x4147('0x14')][_0x4147('0x16')]);return _0x34e19b(_0x5f5144[_0x4147('0x14')][_0x4147('0x16')]);}else{logger[_0x4147('0xf')]('SalesforceConfiguration,\x20%s,\x20%s',_0x20146d,_0x4147('0x12'));_0x34e19b(_0x5f5144[_0x4147('0x17')][_0x4147('0x16')]);}})[_0x4147('0x18')](function(_0x3a9da2){logger[_0x4147('0x14')](_0x4147('0x15'),_0x20146d,_0x3a9da2);_0x2d337b(_0x3a9da2);});});} \ No newline at end of file +var _0xab7b=['message','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','info','SalesforceConfiguration,\x20%s,\x20%s','request\x20sent','debug','SalesforceConfiguration,\x20%s,\x20%s,\x20%s','stringify','code','error'];(function(_0x2e0717,_0x1c89dc){var _0x422bd8=function(_0x178125){while(--_0x178125){_0x2e0717['push'](_0x2e0717['shift']());}};_0x422bd8(++_0x1c89dc);}(_0xab7b,0x123));var _0xbab7=function(_0x3279a9,_0x3a966c){_0x3279a9=_0x3279a9-0x0;var _0x48bd4d=_0xab7b[_0x3279a9];return _0x48bd4d;};'use strict';var _=require(_0xbab7('0x0'));var util=require('util');var moment=require(_0xbab7('0x1'));var BPromise=require(_0xbab7('0x2'));var rs=require(_0xbab7('0x3'));var fs=require('fs');var Redis=require(_0xbab7('0x4'));var db=require(_0xbab7('0x5'))['db'];var utils=require(_0xbab7('0x6'));var logger=require(_0xbab7('0x7'))(_0xbab7('0x8'));var config=require('../../config/environment');var jayson=require(_0xbab7('0x9'));var client=jayson[_0xbab7('0xa')][_0xbab7('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x2ef36f,_0x394d38,_0x5cb443){return new BPromise(function(_0x190645,_0x800eb7){return client[_0xbab7('0xc')](_0x2ef36f,_0x5cb443)['then'](function(_0x39bcee){logger[_0xbab7('0xd')](_0xbab7('0xe'),_0x394d38,_0xbab7('0xf'));logger[_0xbab7('0x10')](_0xbab7('0x11'),_0x394d38,'request\x20sent',JSON[_0xbab7('0x12')](_0x39bcee));if(_0x39bcee['error']){if(_0x39bcee['error'][_0xbab7('0x13')]===0x1f4){logger[_0xbab7('0x14')](_0xbab7('0xe'),_0x394d38,_0x39bcee[_0xbab7('0x14')][_0xbab7('0x15')]);return _0x800eb7(_0x39bcee[_0xbab7('0x14')]['message']);}logger[_0xbab7('0x14')](_0xbab7('0xe'),_0x394d38,_0x39bcee[_0xbab7('0x14')]['message']);return _0x190645(_0x39bcee['error'][_0xbab7('0x15')]);}else{logger[_0xbab7('0xd')]('SalesforceConfiguration,\x20%s,\x20%s',_0x394d38,_0xbab7('0xf'));_0x190645(_0x39bcee[_0xbab7('0x16')][_0xbab7('0x15')]);}})[_0xbab7('0x17')](function(_0x2c0125){logger[_0xbab7('0x14')]('SalesforceConfiguration,\x20%s,\x20%s',_0x394d38,_0x2c0125);_0x800eb7(_0x2c0125);});});} \ No newline at end of file diff --git a/server/api/intSalesforceField/index.js b/server/api/intSalesforceField/index.js index 1b09ee6..1474905 100644 --- a/server/api/intSalesforceField/index.js +++ b/server/api/intSalesforceField/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9158=['get','isAuthenticated','index','/:id','show','post','create','put','update','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./intSalesforceField.controller'];(function(_0xf49bf2,_0x2b321a){var _0x50163c=function(_0x4a91bd){while(--_0x4a91bd){_0xf49bf2['push'](_0xf49bf2['shift']());}};_0x50163c(++_0x2b321a);}(_0x9158,0x1ee));var _0x8915=function(_0x5db218,_0x2b3949){_0x5db218=_0x5db218-0x0;var _0x4a1c73=_0x9158[_0x5db218];return _0x4a1c73;};'use strict';var multer=require(_0x8915('0x0'));var util=require(_0x8915('0x1'));var path=require(_0x8915('0x2'));var timeout=require(_0x8915('0x3'));var express=require(_0x8915('0x4'));var router=express[_0x8915('0x5')]();var fs_extra=require(_0x8915('0x6'));var auth=require(_0x8915('0x7'));var interaction=require(_0x8915('0x8'));var config=require('../../config/environment');var controller=require(_0x8915('0x9'));router[_0x8915('0xa')]('/',auth[_0x8915('0xb')](),controller[_0x8915('0xc')]);router[_0x8915('0xa')](_0x8915('0xd'),auth[_0x8915('0xb')](),controller[_0x8915('0xe')]);router[_0x8915('0xf')]('/',auth[_0x8915('0xb')](),controller[_0x8915('0x10')]);router[_0x8915('0x11')](_0x8915('0xd'),auth['isAuthenticated'](),controller[_0x8915('0x12')]);router['delete'](_0x8915('0xd'),auth[_0x8915('0xb')](),controller[_0x8915('0x13')]);module[_0x8915('0x14')]=router; \ No newline at end of file +var _0xb4fb=['fs-extra','../../components/auth/service','get','/:id','isAuthenticated','show','post','put','delete','destroy','exports','multer','util','path','express'];(function(_0x372de7,_0x400667){var _0x55c7a3=function(_0x32fe0e){while(--_0x32fe0e){_0x372de7['push'](_0x372de7['shift']());}};_0x55c7a3(++_0x400667);}(_0xb4fb,0x119));var _0xbb4f=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xb4fb[_0x20a584];return _0x4b41a8;};'use strict';var multer=require(_0xbb4f('0x0'));var util=require(_0xbb4f('0x1'));var path=require(_0xbb4f('0x2'));var timeout=require('connect-timeout');var express=require(_0xbb4f('0x3'));var router=express['Router']();var fs_extra=require(_0xbb4f('0x4'));var auth=require(_0xbb4f('0x5'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require('./intSalesforceField.controller');router[_0xbb4f('0x6')]('/',auth['isAuthenticated'](),controller['index']);router[_0xbb4f('0x6')](_0xbb4f('0x7'),auth[_0xbb4f('0x8')](),controller[_0xbb4f('0x9')]);router[_0xbb4f('0xa')]('/',auth[_0xbb4f('0x8')](),controller['create']);router[_0xbb4f('0xb')](_0xbb4f('0x7'),auth[_0xbb4f('0x8')](),controller['update']);router[_0xbb4f('0xc')](_0xbb4f('0x7'),auth[_0xbb4f('0x8')](),controller[_0xbb4f('0xd')]);module[_0xbb4f('0xe')]=router; \ No newline at end of file diff --git a/server/api/intSalesforceField/intSalesforceField.attributes.js b/server/api/intSalesforceField/intSalesforceField.attributes.js index fbed381..c1d66a6 100644 --- a/server/api/intSalesforceField/intSalesforceField.attributes.js +++ b/server/api/intSalesforceField/intSalesforceField.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x583e=['sequelize','variable','keyValue','picklist','string','STRING','ENUM','customVariable'];(function(_0x48a7bd,_0x38bc26){var _0x4068d4=function(_0x5ce8ed){while(--_0x5ce8ed){_0x48a7bd['push'](_0x48a7bd['shift']());}};_0x4068d4(++_0x38bc26);}(_0x583e,0x1e0));var _0xe583=function(_0x95d45,_0x4bb3f1){_0x95d45=_0x95d45-0x0;var _0x38086f=_0x583e[_0x95d45];return _0x38086f;};'use strict';var Sequelize=require(_0xe583('0x0'));module['exports']={'type':{'type':Sequelize['ENUM']('string',_0xe583('0x1'),'customVariable',_0xe583('0x2'),_0xe583('0x3')),'defaultValue':_0xe583('0x4')},'content':{'type':Sequelize[_0xe583('0x5')]},'key':{'type':Sequelize['STRING']},'keyType':{'type':Sequelize[_0xe583('0x6')](_0xe583('0x4'),_0xe583('0x1'),_0xe583('0x7'))},'keyContent':{'type':Sequelize[_0xe583('0x5')]},'idField':{'type':Sequelize[_0xe583('0x5')]},'variableName':{'type':Sequelize[_0xe583('0x5')]}}; \ No newline at end of file +var _0x47fe=['keyValue','STRING','ENUM','customVariable','sequelize','string','variable'];(function(_0x1b1c5c,_0x3c7a20){var _0x573d02=function(_0x10ab23){while(--_0x10ab23){_0x1b1c5c['push'](_0x1b1c5c['shift']());}};_0x573d02(++_0x3c7a20);}(_0x47fe,0x1b6));var _0xe47f=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x47fe[_0x20a584];return _0x4b41a8;};'use strict';var Sequelize=require(_0xe47f('0x0'));module['exports']={'type':{'type':Sequelize['ENUM'](_0xe47f('0x1'),_0xe47f('0x2'),'customVariable',_0xe47f('0x3'),'picklist'),'defaultValue':_0xe47f('0x1')},'content':{'type':Sequelize[_0xe47f('0x4')]},'key':{'type':Sequelize['STRING']},'keyType':{'type':Sequelize[_0xe47f('0x5')](_0xe47f('0x1'),_0xe47f('0x2'),_0xe47f('0x6'))},'keyContent':{'type':Sequelize[_0xe47f('0x4')]},'idField':{'type':Sequelize['STRING']},'variableName':{'type':Sequelize['STRING']}}; \ No newline at end of file diff --git a/server/api/intSalesforceField/intSalesforceField.controller.js b/server/api/intSalesforceField/intSalesforceField.controller.js index bf2aa0e..44de9fe 100644 --- a/server/api/intSalesforceField/intSalesforceField.controller.js +++ b/server/api/intSalesforceField/intSalesforceField.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x073d=['../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','limit','undefined','offset','Content-Range','apply','save','destroy','then','end','error','stack','name','index','map','SalesforceField','rawAttributes','fieldName','key','query','keys','filters','intersection','model','attributes','fields','hasOwnProperty','nolimit','order','sort','pick','filter','where','type','VIRTUAL','merge','options','count','include','findAll','rows','catch','show','params','length','includeAll','create','body','update','find','rimraf','zip-dir','fast-json-patch','moment','mustache','util','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','api'];(function(_0x484d9d,_0x30ecb7){var _0x2b778e=function(_0x39646e){while(--_0x39646e){_0x484d9d['push'](_0x484d9d['shift']());}};_0x2b778e(++_0x30ecb7);}(_0x073d,0xd2));var _0xd073=function(_0x11f893,_0x259935){_0x11f893=_0x11f893-0x0;var _0x400fa8=_0x073d[_0x11f893];return _0x400fa8;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xd073('0x0'));var zipdir=require(_0xd073('0x1'));var jsonpatch=require(_0xd073('0x2'));var rp=require('request-promise');var moment=require(_0xd073('0x3'));var BPromise=require('bluebird');var Mustache=require(_0xd073('0x4'));var util=require(_0xd073('0x5'));var path=require('path');var sox=require(_0xd073('0x6'));var csv=require(_0xd073('0x7'));var ejs=require(_0xd073('0x8'));var fs=require('fs');var fs_extra=require(_0xd073('0x9'));var _=require(_0xd073('0xa'));var squel=require(_0xd073('0xb'));var crypto=require(_0xd073('0xc'));var jsforce=require(_0xd073('0xd'));var deskjs=require(_0xd073('0xe'));var toCsv=require(_0xd073('0x7'));var querystring=require(_0xd073('0xf'));var Papa=require(_0xd073('0x10'));var Redis=require(_0xd073('0x11'));var authService=require(_0xd073('0x12'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xd073('0x13'));var logger=require('../../config/logger')(_0xd073('0x14'));var utils=require(_0xd073('0x15'));var config=require(_0xd073('0x16'));var licenseUtil=require(_0xd073('0x17'));var db=require(_0xd073('0x18'))['db'];function respondWithStatusCode(_0x5bb5af,_0x2eed9b){_0x2eed9b=_0x2eed9b||0xcc;return function(_0x6769eb){if(_0x6769eb){return _0x5bb5af[_0xd073('0x19')](_0x2eed9b);}return _0x5bb5af[_0xd073('0x1a')](_0x2eed9b)['end']();};}function respondWithResult(_0x36195c,_0x2e35bc){_0x2e35bc=_0x2e35bc||0xc8;return function(_0x5066a8){if(_0x5066a8){return _0x36195c[_0xd073('0x1a')](_0x2e35bc)[_0xd073('0x1b')](_0x5066a8);}};}function respondWithFilteredResult(_0xe3f97,_0x402b13){return function(_0x55d1d9){if(_0x55d1d9){var _0x49a1dd=typeof _0x402b13['offset']==='undefined'&&typeof _0x402b13[_0xd073('0x1c')]===_0xd073('0x1d');var _0x412bc3=_0x55d1d9['count'];var _0x1e4585=_0x49a1dd?0x0:_0x402b13[_0xd073('0x1e')];var _0x2a5c98=_0x49a1dd?_0x55d1d9['count']:_0x402b13[_0xd073('0x1e')]+_0x402b13[_0xd073('0x1c')];var _0x148443;if(_0x2a5c98>=_0x412bc3){_0x2a5c98=_0x412bc3;_0x148443=0xc8;}else{_0x148443=0xce;}_0xe3f97[_0xd073('0x1a')](_0x148443);return _0xe3f97['set'](_0xd073('0x1f'),_0x1e4585+'-'+_0x2a5c98+'/'+_0x412bc3)[_0xd073('0x1b')](_0x55d1d9);}return null;};}function patchUpdates(_0x3918cb){return function(_0x571133){try{jsonpatch[_0xd073('0x20')](_0x571133,_0x3918cb,!![]);}catch(_0x2c244e){return BPromise['reject'](_0x2c244e);}return _0x571133[_0xd073('0x21')]();};}function saveUpdates(_0x72b4aa,_0x1b6526){return function(_0x55ce48){if(_0x55ce48){return _0x55ce48['update'](_0x72b4aa)['then'](function(_0x4caa5d){return _0x4caa5d;});}return null;};}function removeEntity(_0x326bed,_0x1f51cd){return function(_0x3bd458){if(_0x3bd458){return _0x3bd458[_0xd073('0x22')]()[_0xd073('0x23')](function(){_0x326bed[_0xd073('0x1a')](0xcc)[_0xd073('0x24')]();});}};}function handleEntityNotFound(_0x28eae0,_0x3876eb){return function(_0x4bc4ad){if(!_0x4bc4ad){_0x28eae0[_0xd073('0x19')](0x194);}return _0x4bc4ad;};}function handleError(_0x5c43f3,_0x26bf66){_0x26bf66=_0x26bf66||0x1f4;return function(_0x34d20b){logger[_0xd073('0x25')](_0x34d20b[_0xd073('0x26')]);if(_0x34d20b['name']){delete _0x34d20b[_0xd073('0x27')];}_0x5c43f3['status'](_0x26bf66)['send'](_0x34d20b);};}exports[_0xd073('0x28')]=function(_0x27653c,_0x5470ab){var _0x317785={},_0x54c32f={},_0xa80cc8={'count':0x0,'rows':[]};var _0x5dbf33=_[_0xd073('0x29')](db[_0xd073('0x2a')][_0xd073('0x2b')],function(_0x27b8a0){return{'name':_0x27b8a0[_0xd073('0x2c')],'type':_0x27b8a0['type'][_0xd073('0x2d')]};});_0x54c32f['model']=_[_0xd073('0x29')](_0x5dbf33,_0xd073('0x27'));_0x54c32f[_0xd073('0x2e')]=_[_0xd073('0x2f')](_0x27653c[_0xd073('0x2e')]);_0x54c32f[_0xd073('0x30')]=_[_0xd073('0x31')](_0x54c32f[_0xd073('0x32')],_0x54c32f[_0xd073('0x2e')]);_0x317785[_0xd073('0x33')]=_[_0xd073('0x31')](_0x54c32f['model'],qs[_0xd073('0x34')](_0x27653c['query'][_0xd073('0x34')]));_0x317785[_0xd073('0x33')]=_0x317785[_0xd073('0x33')]['length']?_0x317785['attributes']:_0x54c32f['model'];if(!_0x27653c[_0xd073('0x2e')][_0xd073('0x35')](_0xd073('0x36'))){_0x317785[_0xd073('0x1c')]=qs[_0xd073('0x1c')](_0x27653c[_0xd073('0x2e')]['limit']);_0x317785[_0xd073('0x1e')]=qs[_0xd073('0x1e')](_0x27653c['query'][_0xd073('0x1e')]);}_0x317785[_0xd073('0x37')]=qs[_0xd073('0x38')](_0x27653c[_0xd073('0x2e')][_0xd073('0x38')]);_0x317785['where']=qs[_0xd073('0x30')](_[_0xd073('0x39')](_0x27653c[_0xd073('0x2e')],_0x54c32f['filters']),_0x5dbf33);if(_0x27653c[_0xd073('0x2e')][_0xd073('0x3a')]){_0x317785[_0xd073('0x3b')]=_['merge'](_0x317785[_0xd073('0x3b')],{'$or':_[_0xd073('0x29')](_0x5dbf33,function(_0xcfcad4){if(_0xcfcad4[_0xd073('0x3c')]!==_0xd073('0x3d')){var _0x3263f2={};_0x3263f2[_0xcfcad4['name']]={'$like':'%'+_0x27653c['query'][_0xd073('0x3a')]+'%'};return _0x3263f2;}})});}_0x317785=_[_0xd073('0x3e')]({},_0x317785,_0x27653c[_0xd073('0x3f')]);var _0x377181={'where':_0x317785['where']};return db[_0xd073('0x2a')][_0xd073('0x40')](_0x377181)[_0xd073('0x23')](function(_0x5a1033){_0xa80cc8[_0xd073('0x40')]=_0x5a1033;if(_0x27653c['query']['includeAll']){_0x317785[_0xd073('0x41')]=[{'all':!![]}];}return db[_0xd073('0x2a')][_0xd073('0x42')](_0x317785);})[_0xd073('0x23')](function(_0x54825d){_0xa80cc8[_0xd073('0x43')]=_0x54825d;return _0xa80cc8;})['then'](respondWithFilteredResult(_0x5470ab,_0x317785))[_0xd073('0x44')](handleError(_0x5470ab,null));};exports[_0xd073('0x45')]=function(_0x10373e,_0x4de8e4){var _0x63f254={'raw':!![],'where':{'id':_0x10373e[_0xd073('0x46')]['id']}},_0x52d1aa={};_0x52d1aa[_0xd073('0x32')]=_[_0xd073('0x2f')](db[_0xd073('0x2a')][_0xd073('0x2b')]);_0x52d1aa[_0xd073('0x2e')]=_[_0xd073('0x2f')](_0x10373e[_0xd073('0x2e')]);_0x52d1aa['filters']=_[_0xd073('0x31')](_0x52d1aa[_0xd073('0x32')],_0x52d1aa[_0xd073('0x2e')]);_0x63f254[_0xd073('0x33')]=_[_0xd073('0x31')](_0x52d1aa[_0xd073('0x32')],qs[_0xd073('0x34')](_0x10373e[_0xd073('0x2e')]['fields']));_0x63f254[_0xd073('0x33')]=_0x63f254[_0xd073('0x33')][_0xd073('0x47')]?_0x63f254[_0xd073('0x33')]:_0x52d1aa[_0xd073('0x32')];if(_0x10373e[_0xd073('0x2e')][_0xd073('0x48')]){_0x63f254[_0xd073('0x41')]=[{'all':!![]}];}_0x63f254=_['merge']({},_0x63f254,_0x10373e[_0xd073('0x3f')]);return db['SalesforceField']['find'](_0x63f254)[_0xd073('0x23')](handleEntityNotFound(_0x4de8e4,null))[_0xd073('0x23')](respondWithResult(_0x4de8e4,null))['catch'](handleError(_0x4de8e4,null));};exports[_0xd073('0x49')]=function(_0x5e114f,_0x23d4b4){return db[_0xd073('0x2a')][_0xd073('0x49')](_0x5e114f[_0xd073('0x4a')],{})[_0xd073('0x23')](respondWithResult(_0x23d4b4,0xc9))[_0xd073('0x44')](handleError(_0x23d4b4,null));};exports[_0xd073('0x4b')]=function(_0x5c53b1,_0xeff554){if(_0x5c53b1[_0xd073('0x4a')]['id']){delete _0x5c53b1[_0xd073('0x4a')]['id'];}return db[_0xd073('0x2a')][_0xd073('0x4c')]({'where':{'id':_0x5c53b1[_0xd073('0x46')]['id']}})[_0xd073('0x23')](handleEntityNotFound(_0xeff554,null))[_0xd073('0x23')](saveUpdates(_0x5c53b1[_0xd073('0x4a')],null))[_0xd073('0x23')](respondWithResult(_0xeff554,null))[_0xd073('0x44')](handleError(_0xeff554,null));};exports['destroy']=function(_0x545679,_0x54e67d){return db[_0xd073('0x2a')][_0xd073('0x4c')]({'where':{'id':_0x545679[_0xd073('0x46')]['id']}})[_0xd073('0x23')](handleEntityNotFound(_0x54e67d,null))['then'](removeEntity(_0x54e67d,null))['catch'](handleError(_0x54e67d,null));}; \ No newline at end of file +var _0xab54=['fast-json-patch','moment','bluebird','util','path','sox','ejs','fs-extra','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','offset','undefined','limit','count','status','set','Content-Range','json','apply','update','then','destroy','name','send','index','map','rawAttributes','fieldName','type','query','keys','filters','intersection','model','fields','attributes','length','hasOwnProperty','nolimit','sort','where','pick','filter','merge','VIRTUAL','options','SalesforceField','includeAll','include','findAll','catch','show','params','find','create','body','rimraf','zip-dir'];(function(_0x2a238a,_0x1d5054){var _0xeef802=function(_0x583637){while(--_0x583637){_0x2a238a['push'](_0x2a238a['shift']());}};_0xeef802(++_0x1d5054);}(_0xab54,0x8e));var _0x4ab5=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xab54[_0x3dd15e];return _0x231fd0;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x4ab5('0x0'));var zipdir=require(_0x4ab5('0x1'));var jsonpatch=require(_0x4ab5('0x2'));var rp=require('request-promise');var moment=require(_0x4ab5('0x3'));var BPromise=require(_0x4ab5('0x4'));var Mustache=require('mustache');var util=require(_0x4ab5('0x5'));var path=require(_0x4ab5('0x6'));var sox=require(_0x4ab5('0x7'));var csv=require('to-csv');var ejs=require(_0x4ab5('0x8'));var fs=require('fs');var fs_extra=require(_0x4ab5('0x9'));var _=require(_0x4ab5('0xa'));var squel=require(_0x4ab5('0xb'));var crypto=require('crypto');var jsforce=require(_0x4ab5('0xc'));var deskjs=require(_0x4ab5('0xd'));var toCsv=require('to-csv');var querystring=require(_0x4ab5('0xe'));var Papa=require(_0x4ab5('0xf'));var Redis=require(_0x4ab5('0x10'));var authService=require(_0x4ab5('0x11'));var qs=require(_0x4ab5('0x12'));var as=require(_0x4ab5('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x4ab5('0x14'));var utils=require(_0x4ab5('0x15'));var config=require(_0x4ab5('0x16'));var licenseUtil=require('../../config/license/util');var db=require(_0x4ab5('0x17'))['db'];function respondWithStatusCode(_0x4876ba,_0x167aac){_0x167aac=_0x167aac||0xcc;return function(_0x27900d){if(_0x27900d){return _0x4876ba[_0x4ab5('0x18')](_0x167aac);}return _0x4876ba['status'](_0x167aac)[_0x4ab5('0x19')]();};}function respondWithResult(_0x367225,_0x1ec37c){_0x1ec37c=_0x1ec37c||0xc8;return function(_0x41ff8f){if(_0x41ff8f){return _0x367225['status'](_0x1ec37c)['json'](_0x41ff8f);}};}function respondWithFilteredResult(_0x31f0ce,_0x5f53ae){return function(_0x97c64e){if(_0x97c64e){var _0x28d643=typeof _0x5f53ae[_0x4ab5('0x1a')]===_0x4ab5('0x1b')&&typeof _0x5f53ae[_0x4ab5('0x1c')]==='undefined';var _0xd409b5=_0x97c64e[_0x4ab5('0x1d')];var _0x2c635e=_0x28d643?0x0:_0x5f53ae[_0x4ab5('0x1a')];var _0x3d85ba=_0x28d643?_0x97c64e[_0x4ab5('0x1d')]:_0x5f53ae[_0x4ab5('0x1a')]+_0x5f53ae[_0x4ab5('0x1c')];var _0x5aa011;if(_0x3d85ba>=_0xd409b5){_0x3d85ba=_0xd409b5;_0x5aa011=0xc8;}else{_0x5aa011=0xce;}_0x31f0ce[_0x4ab5('0x1e')](_0x5aa011);return _0x31f0ce[_0x4ab5('0x1f')](_0x4ab5('0x20'),_0x2c635e+'-'+_0x3d85ba+'/'+_0xd409b5)[_0x4ab5('0x21')](_0x97c64e);}return null;};}function patchUpdates(_0x5f685){return function(_0x253c9d){try{jsonpatch[_0x4ab5('0x22')](_0x253c9d,_0x5f685,!![]);}catch(_0x5971b6){return BPromise['reject'](_0x5971b6);}return _0x253c9d['save']();};}function saveUpdates(_0x836539,_0x54e12c){return function(_0x27b998){if(_0x27b998){return _0x27b998[_0x4ab5('0x23')](_0x836539)[_0x4ab5('0x24')](function(_0x3957c7){return _0x3957c7;});}return null;};}function removeEntity(_0x3a462f,_0x4cc8ee){return function(_0x540813){if(_0x540813){return _0x540813[_0x4ab5('0x25')]()[_0x4ab5('0x24')](function(){_0x3a462f['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x4c450d,_0x1ca1c5){return function(_0x27904d){if(!_0x27904d){_0x4c450d[_0x4ab5('0x18')](0x194);}return _0x27904d;};}function handleError(_0x145ca4,_0x2078a7){_0x2078a7=_0x2078a7||0x1f4;return function(_0x5b843){logger['error'](_0x5b843['stack']);if(_0x5b843[_0x4ab5('0x26')]){delete _0x5b843[_0x4ab5('0x26')];}_0x145ca4['status'](_0x2078a7)[_0x4ab5('0x27')](_0x5b843);};}exports[_0x4ab5('0x28')]=function(_0x1a85b2,_0xc7d5e7){var _0xea380a={},_0x19f9b6={},_0xdecb58={'count':0x0,'rows':[]};var _0x3d0c92=_[_0x4ab5('0x29')](db['SalesforceField'][_0x4ab5('0x2a')],function(_0x5b6833){return{'name':_0x5b6833[_0x4ab5('0x2b')],'type':_0x5b6833[_0x4ab5('0x2c')]['key']};});_0x19f9b6['model']=_[_0x4ab5('0x29')](_0x3d0c92,_0x4ab5('0x26'));_0x19f9b6[_0x4ab5('0x2d')]=_[_0x4ab5('0x2e')](_0x1a85b2[_0x4ab5('0x2d')]);_0x19f9b6[_0x4ab5('0x2f')]=_[_0x4ab5('0x30')](_0x19f9b6[_0x4ab5('0x31')],_0x19f9b6[_0x4ab5('0x2d')]);_0xea380a['attributes']=_[_0x4ab5('0x30')](_0x19f9b6[_0x4ab5('0x31')],qs[_0x4ab5('0x32')](_0x1a85b2[_0x4ab5('0x2d')]['fields']));_0xea380a[_0x4ab5('0x33')]=_0xea380a[_0x4ab5('0x33')][_0x4ab5('0x34')]?_0xea380a[_0x4ab5('0x33')]:_0x19f9b6[_0x4ab5('0x31')];if(!_0x1a85b2[_0x4ab5('0x2d')][_0x4ab5('0x35')](_0x4ab5('0x36'))){_0xea380a[_0x4ab5('0x1c')]=qs[_0x4ab5('0x1c')](_0x1a85b2[_0x4ab5('0x2d')][_0x4ab5('0x1c')]);_0xea380a[_0x4ab5('0x1a')]=qs[_0x4ab5('0x1a')](_0x1a85b2[_0x4ab5('0x2d')][_0x4ab5('0x1a')]);}_0xea380a['order']=qs['sort'](_0x1a85b2['query'][_0x4ab5('0x37')]);_0xea380a[_0x4ab5('0x38')]=qs[_0x4ab5('0x2f')](_[_0x4ab5('0x39')](_0x1a85b2[_0x4ab5('0x2d')],_0x19f9b6['filters']),_0x3d0c92);if(_0x1a85b2['query'][_0x4ab5('0x3a')]){_0xea380a[_0x4ab5('0x38')]=_[_0x4ab5('0x3b')](_0xea380a[_0x4ab5('0x38')],{'$or':_['map'](_0x3d0c92,function(_0x438ffe){if(_0x438ffe['type']!==_0x4ab5('0x3c')){var _0x2959b2={};_0x2959b2[_0x438ffe[_0x4ab5('0x26')]]={'$like':'%'+_0x1a85b2[_0x4ab5('0x2d')][_0x4ab5('0x3a')]+'%'};return _0x2959b2;}})});}_0xea380a=_[_0x4ab5('0x3b')]({},_0xea380a,_0x1a85b2[_0x4ab5('0x3d')]);var _0x445991={'where':_0xea380a[_0x4ab5('0x38')]};return db[_0x4ab5('0x3e')][_0x4ab5('0x1d')](_0x445991)[_0x4ab5('0x24')](function(_0x710368){_0xdecb58['count']=_0x710368;if(_0x1a85b2[_0x4ab5('0x2d')][_0x4ab5('0x3f')]){_0xea380a[_0x4ab5('0x40')]=[{'all':!![]}];}return db['SalesforceField'][_0x4ab5('0x41')](_0xea380a);})[_0x4ab5('0x24')](function(_0x4e4d64){_0xdecb58['rows']=_0x4e4d64;return _0xdecb58;})['then'](respondWithFilteredResult(_0xc7d5e7,_0xea380a))[_0x4ab5('0x42')](handleError(_0xc7d5e7,null));};exports[_0x4ab5('0x43')]=function(_0x1b6ec8,_0x4888c7){var _0x53bb65={'raw':!![],'where':{'id':_0x1b6ec8[_0x4ab5('0x44')]['id']}},_0x1099ac={};_0x1099ac[_0x4ab5('0x31')]=_['keys'](db['SalesforceField'][_0x4ab5('0x2a')]);_0x1099ac['query']=_[_0x4ab5('0x2e')](_0x1b6ec8[_0x4ab5('0x2d')]);_0x1099ac['filters']=_[_0x4ab5('0x30')](_0x1099ac[_0x4ab5('0x31')],_0x1099ac[_0x4ab5('0x2d')]);_0x53bb65[_0x4ab5('0x33')]=_['intersection'](_0x1099ac[_0x4ab5('0x31')],qs['fields'](_0x1b6ec8[_0x4ab5('0x2d')][_0x4ab5('0x32')]));_0x53bb65[_0x4ab5('0x33')]=_0x53bb65[_0x4ab5('0x33')]['length']?_0x53bb65[_0x4ab5('0x33')]:_0x1099ac[_0x4ab5('0x31')];if(_0x1b6ec8[_0x4ab5('0x2d')][_0x4ab5('0x3f')]){_0x53bb65['include']=[{'all':!![]}];}_0x53bb65=_[_0x4ab5('0x3b')]({},_0x53bb65,_0x1b6ec8[_0x4ab5('0x3d')]);return db[_0x4ab5('0x3e')][_0x4ab5('0x45')](_0x53bb65)[_0x4ab5('0x24')](handleEntityNotFound(_0x4888c7,null))[_0x4ab5('0x24')](respondWithResult(_0x4888c7,null))['catch'](handleError(_0x4888c7,null));};exports[_0x4ab5('0x46')]=function(_0x23808f,_0x5fb49f){return db[_0x4ab5('0x3e')]['create'](_0x23808f[_0x4ab5('0x47')],{})[_0x4ab5('0x24')](respondWithResult(_0x5fb49f,0xc9))[_0x4ab5('0x42')](handleError(_0x5fb49f,null));};exports[_0x4ab5('0x23')]=function(_0xdcc8ec,_0x3e6a01){if(_0xdcc8ec[_0x4ab5('0x47')]['id']){delete _0xdcc8ec[_0x4ab5('0x47')]['id'];}return db[_0x4ab5('0x3e')][_0x4ab5('0x45')]({'where':{'id':_0xdcc8ec['params']['id']}})['then'](handleEntityNotFound(_0x3e6a01,null))[_0x4ab5('0x24')](saveUpdates(_0xdcc8ec['body'],null))['then'](respondWithResult(_0x3e6a01,null))[_0x4ab5('0x42')](handleError(_0x3e6a01,null));};exports[_0x4ab5('0x25')]=function(_0x5b609d,_0x17ab6d){return db[_0x4ab5('0x3e')][_0x4ab5('0x45')]({'where':{'id':_0x5b609d[_0x4ab5('0x44')]['id']}})['then'](handleEntityNotFound(_0x17ab6d,null))['then'](removeEntity(_0x17ab6d,null))[_0x4ab5('0x42')](handleError(_0x17ab6d,null));}; \ No newline at end of file diff --git a/server/api/intSalesforceField/intSalesforceField.model.js b/server/api/intSalesforceField/intSalesforceField.model.js index 4f20ee4..68c777b 100644 --- a/server/api/intSalesforceField/intSalesforceField.model.js +++ b/server/api/intSalesforceField/intSalesforceField.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x11b2=['api','moment','bluebird','path','rimraf','./intSalesforceField.attributes','exports','define','salesforce_unique_index','idField','FieldId','lodash','util'];(function(_0x31ced5,_0x5d5415){var _0x10d9e5=function(_0x2e51a5){while(--_0x2e51a5){_0x31ced5['push'](_0x31ced5['shift']());}};_0x10d9e5(++_0x5d5415);}(_0x11b2,0x1b8));var _0x211b=function(_0x4a1945,_0x10af76){_0x4a1945=_0x4a1945-0x0;var _0x34d6f4=_0x11b2[_0x4a1945];return _0x34d6f4;};'use strict';var _=require(_0x211b('0x0'));var util=require(_0x211b('0x1'));var logger=require('../../config/logger')(_0x211b('0x2'));var moment=require(_0x211b('0x3'));var BPromise=require(_0x211b('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x211b('0x5'));var rimraf=require(_0x211b('0x6'));var config=require('../../config/environment');var attributes=require(_0x211b('0x7'));module[_0x211b('0x8')]=function(_0x4c6de1,_0x111b11){return _0x4c6de1[_0x211b('0x9')]('SalesforceField',attributes,{'tableName':'int_salesforce_fields','paranoid':![],'indexes':[{'name':_0x211b('0xa'),'fields':[_0x211b('0xb'),_0x211b('0xc')],'unique':!![]}],'timestamps':!![]});}; \ No newline at end of file +var _0x2d81=['../../config/logger','api','moment','bluebird','request-promise','path','./intSalesforceField.attributes','exports','define','SalesforceField','salesforce_unique_index','idField','util'];(function(_0x46dbb9,_0x20aae7){var _0x51afcd=function(_0x5591fd){while(--_0x5591fd){_0x46dbb9['push'](_0x46dbb9['shift']());}};_0x51afcd(++_0x20aae7);}(_0x2d81,0x1ac));var _0x12d8=function(_0x5aa6cc,_0x5e993d){_0x5aa6cc=_0x5aa6cc-0x0;var _0x48bda6=_0x2d81[_0x5aa6cc];return _0x48bda6;};'use strict';var _=require('lodash');var util=require(_0x12d8('0x0'));var logger=require(_0x12d8('0x1'))(_0x12d8('0x2'));var moment=require(_0x12d8('0x3'));var BPromise=require(_0x12d8('0x4'));var rp=require(_0x12d8('0x5'));var fs=require('fs');var path=require(_0x12d8('0x6'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x12d8('0x7'));module[_0x12d8('0x8')]=function(_0x3cb56f,_0x500528){return _0x3cb56f[_0x12d8('0x9')](_0x12d8('0xa'),attributes,{'tableName':'int_salesforce_fields','paranoid':![],'indexes':[{'name':_0x12d8('0xb'),'fields':[_0x12d8('0xc'),'FieldId'],'unique':!![]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intSalesforceField/intSalesforceField.rpc.js b/server/api/intSalesforceField/intSalesforceField.rpc.js index 995177c..ca462d2 100644 --- a/server/api/intSalesforceField/intSalesforceField.rpc.js +++ b/server/api/intSalesforceField/intSalesforceField.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfa2e=['debug','request\x20sent','stringify','error','SalesforceField,\x20%s,\x20%s','message','result','catch','lodash','util','moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info'];(function(_0x2ca773,_0x5c6e1f){var _0x495e4f=function(_0x50948){while(--_0x50948){_0x2ca773['push'](_0x2ca773['shift']());}};_0x495e4f(++_0x5c6e1f);}(_0xfa2e,0x178));var _0xefa2=function(_0xcd9679,_0x2ff83a){_0xcd9679=_0xcd9679-0x0;var _0x3a41f2=_0xfa2e[_0xcd9679];return _0x3a41f2;};'use strict';var _=require(_0xefa2('0x0'));var util=require(_0xefa2('0x1'));var moment=require(_0xefa2('0x2'));var BPromise=require('bluebird');var rs=require(_0xefa2('0x3'));var fs=require('fs');var Redis=require(_0xefa2('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xefa2('0x5'));var logger=require(_0xefa2('0x6'))(_0xefa2('0x7'));var config=require(_0xefa2('0x8'));var jayson=require(_0xefa2('0x9'));var client=jayson[_0xefa2('0xa')][_0xefa2('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x1eb9a3,_0xe07285,_0x3199b3){return new BPromise(function(_0x10845a,_0x4d95bd){return client[_0xefa2('0xc')](_0x1eb9a3,_0x3199b3)[_0xefa2('0xd')](function(_0x494cd9){logger[_0xefa2('0xe')]('SalesforceField,\x20%s,\x20%s',_0xe07285,'request\x20sent');logger[_0xefa2('0xf')]('SalesforceField,\x20%s,\x20%s,\x20%s',_0xe07285,_0xefa2('0x10'),JSON[_0xefa2('0x11')](_0x494cd9));if(_0x494cd9[_0xefa2('0x12')]){if(_0x494cd9[_0xefa2('0x12')]['code']===0x1f4){logger[_0xefa2('0x12')](_0xefa2('0x13'),_0xe07285,_0x494cd9[_0xefa2('0x12')][_0xefa2('0x14')]);return _0x4d95bd(_0x494cd9[_0xefa2('0x12')][_0xefa2('0x14')]);}logger['error'](_0xefa2('0x13'),_0xe07285,_0x494cd9[_0xefa2('0x12')]['message']);return _0x10845a(_0x494cd9['error'][_0xefa2('0x14')]);}else{logger[_0xefa2('0xe')](_0xefa2('0x13'),_0xe07285,_0xefa2('0x10'));_0x10845a(_0x494cd9[_0xefa2('0x15')][_0xefa2('0x14')]);}})[_0xefa2('0x16')](function(_0x295d49){logger['error'](_0xefa2('0x13'),_0xe07285,_0x295d49);_0x4d95bd(_0x295d49);});});} \ No newline at end of file +var _0x1e66=['info','request\x20sent','SalesforceField,\x20%s,\x20%s,\x20%s','stringify','error','code','SalesforceField,\x20%s,\x20%s','message','result','catch','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then'];(function(_0x2ec461,_0x5f588a){var _0x28603d=function(_0x21114b){while(--_0x21114b){_0x2ec461['push'](_0x2ec461['shift']());}};_0x28603d(++_0x5f588a);}(_0x1e66,0x1c3));var _0x61e6=function(_0x38537f,_0x252124){_0x38537f=_0x38537f-0x0;var _0x141e23=_0x1e66[_0x38537f];return _0x141e23;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x61e6('0x0'));var BPromise=require(_0x61e6('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x61e6('0x2'))['db'];var utils=require(_0x61e6('0x3'));var logger=require(_0x61e6('0x4'))(_0x61e6('0x5'));var config=require(_0x61e6('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x61e6('0x7')][_0x61e6('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x438cb5,_0x3d36d1,_0x685137){return new BPromise(function(_0x23ad41,_0x10af52){return client[_0x61e6('0x9')](_0x438cb5,_0x685137)[_0x61e6('0xa')](function(_0x19f8c8){logger[_0x61e6('0xb')]('SalesforceField,\x20%s,\x20%s',_0x3d36d1,_0x61e6('0xc'));logger['debug'](_0x61e6('0xd'),_0x3d36d1,_0x61e6('0xc'),JSON[_0x61e6('0xe')](_0x19f8c8));if(_0x19f8c8[_0x61e6('0xf')]){if(_0x19f8c8[_0x61e6('0xf')][_0x61e6('0x10')]===0x1f4){logger[_0x61e6('0xf')](_0x61e6('0x11'),_0x3d36d1,_0x19f8c8[_0x61e6('0xf')][_0x61e6('0x12')]);return _0x10af52(_0x19f8c8['error'][_0x61e6('0x12')]);}logger['error'](_0x61e6('0x11'),_0x3d36d1,_0x19f8c8[_0x61e6('0xf')][_0x61e6('0x12')]);return _0x23ad41(_0x19f8c8[_0x61e6('0xf')]['message']);}else{logger[_0x61e6('0xb')]('SalesforceField,\x20%s,\x20%s',_0x3d36d1,_0x61e6('0xc'));_0x23ad41(_0x19f8c8[_0x61e6('0x13')]['message']);}})[_0x61e6('0x14')](function(_0x1d504a){logger[_0x61e6('0xf')]('SalesforceField,\x20%s,\x20%s',_0x3d36d1,_0x1d504a);_0x10af52(_0x1d504a);});});} \ No newline at end of file diff --git a/server/api/intServicenowAccount/index.js b/server/api/intServicenowAccount/index.js index 769984a..7426d14 100644 --- a/server/api/intServicenowAccount/index.js +++ b/server/api/intServicenowAccount/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa1a2=['./intServicenowAccount.controller','get','isAuthenticated','index','/:id','/:id/configurations','/:id/fields','post','addConfiguration','put','delete','destroy','exports','multer','util','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment'];(function(_0x401f12,_0x17c530){var _0x1f52e6=function(_0x19fb4e){while(--_0x19fb4e){_0x401f12['push'](_0x401f12['shift']());}};_0x1f52e6(++_0x17c530);}(_0xa1a2,0x76));var _0x2a1a=function(_0x3bc9d5,_0x136c33){_0x3bc9d5=_0x3bc9d5-0x0;var _0x118e6c=_0xa1a2[_0x3bc9d5];return _0x118e6c;};'use strict';var multer=require(_0x2a1a('0x0'));var util=require(_0x2a1a('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x2a1a('0x2'));var router=express[_0x2a1a('0x3')]();var fs_extra=require(_0x2a1a('0x4'));var auth=require(_0x2a1a('0x5'));var interaction=require(_0x2a1a('0x6'));var config=require(_0x2a1a('0x7'));var controller=require(_0x2a1a('0x8'));router[_0x2a1a('0x9')]('/',auth[_0x2a1a('0xa')](),controller[_0x2a1a('0xb')]);router[_0x2a1a('0x9')](_0x2a1a('0xc'),auth[_0x2a1a('0xa')](),controller['show']);router[_0x2a1a('0x9')](_0x2a1a('0xd'),auth[_0x2a1a('0xa')](),controller['getConfigurations']);router[_0x2a1a('0x9')](_0x2a1a('0xe'),auth[_0x2a1a('0xa')](),controller['getFields']);router[_0x2a1a('0xf')]('/',auth[_0x2a1a('0xa')](),controller['create']);router[_0x2a1a('0xf')](_0x2a1a('0xd'),auth['isAuthenticated'](),controller[_0x2a1a('0x10')]);router[_0x2a1a('0x11')]('/:id',auth[_0x2a1a('0xa')](),controller['update']);router[_0x2a1a('0x12')]('/:id',auth[_0x2a1a('0xa')](),controller[_0x2a1a('0x13')]);module[_0x2a1a('0x14')]=router; \ No newline at end of file +var _0x6623=['destroy','exports','util','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./intServicenowAccount.controller','get','isAuthenticated','index','/:id','show','/:id/configurations','/:id/fields','getFields','create','post','put','update','delete'];(function(_0x55054d,_0x35adc6){var _0x5324fa=function(_0x348b0c){while(--_0x348b0c){_0x55054d['push'](_0x55054d['shift']());}};_0x5324fa(++_0x35adc6);}(_0x6623,0x189));var _0x3662=function(_0xbb091,_0x3fe7ee){_0xbb091=_0xbb091-0x0;var _0x467a04=_0x6623[_0xbb091];return _0x467a04;};'use strict';var multer=require('multer');var util=require(_0x3662('0x0'));var path=require(_0x3662('0x1'));var timeout=require(_0x3662('0x2'));var express=require(_0x3662('0x3'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0x3662('0x4'));var interaction=require(_0x3662('0x5'));var config=require(_0x3662('0x6'));var controller=require(_0x3662('0x7'));router[_0x3662('0x8')]('/',auth[_0x3662('0x9')](),controller[_0x3662('0xa')]);router[_0x3662('0x8')](_0x3662('0xb'),auth['isAuthenticated'](),controller[_0x3662('0xc')]);router[_0x3662('0x8')](_0x3662('0xd'),auth[_0x3662('0x9')](),controller['getConfigurations']);router[_0x3662('0x8')](_0x3662('0xe'),auth[_0x3662('0x9')](),controller[_0x3662('0xf')]);router['post']('/',auth[_0x3662('0x9')](),controller[_0x3662('0x10')]);router[_0x3662('0x11')](_0x3662('0xd'),auth[_0x3662('0x9')](),controller['addConfiguration']);router[_0x3662('0x12')](_0x3662('0xb'),auth[_0x3662('0x9')](),controller[_0x3662('0x13')]);router[_0x3662('0x14')](_0x3662('0xb'),auth[_0x3662('0x9')](),controller[_0x3662('0x15')]);module[_0x3662('0x16')]=router; \ No newline at end of file diff --git a/server/api/intServicenowAccount/intServicenowAccount.attributes.js b/server/api/intServicenowAccount/intServicenowAccount.attributes.js index fdc79dd..bdefe8b 100644 --- a/server/api/intServicenowAccount/intServicenowAccount.attributes.js +++ b/server/api/intServicenowAccount/intServicenowAccount.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf9fe=['exports','STRING','username','remoteUri','sequelize'];(function(_0x62c958,_0x2bfdbc){var _0x57ec61=function(_0x5c0094){while(--_0x5c0094){_0x62c958['push'](_0x62c958['shift']());}};_0x57ec61(++_0x2bfdbc);}(_0xf9fe,0x1ad));var _0xef9f=function(_0x130ee4,_0x862140){_0x130ee4=_0x130ee4-0x0;var _0x37ed66=_0xf9fe[_0x130ee4];return _0x37ed66;};'use strict';var Sequelize=require(_0xef9f('0x0'));module[_0xef9f('0x1')]={'name':{'type':Sequelize[_0xef9f('0x2')]},'description':{'type':Sequelize[_0xef9f('0x2')]},'username':{'type':Sequelize[_0xef9f('0x2')],'unique':_0xef9f('0x3')},'password':{'type':Sequelize['STRING']},'email':{'type':Sequelize['STRING']},'remoteUri':{'type':Sequelize['STRING'],'unique':_0xef9f('0x4')},'serverUrl':{'type':Sequelize[_0xef9f('0x2')],'allowNull':![]}}; \ No newline at end of file +var _0x9090=['STRING','remoteUri','sequelize','exports'];(function(_0x2a2de4,_0x5b5c3f){var _0x16fa2c=function(_0x24df44){while(--_0x24df44){_0x2a2de4['push'](_0x2a2de4['shift']());}};_0x16fa2c(++_0x5b5c3f);}(_0x9090,0xca));var _0x0909=function(_0x407559,_0x54ad20){_0x407559=_0x407559-0x0;var _0x2bb73c=_0x9090[_0x407559];return _0x2bb73c;};'use strict';var Sequelize=require(_0x0909('0x0'));module[_0x0909('0x1')]={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x0909('0x2')]},'username':{'type':Sequelize[_0x0909('0x2')],'unique':'username'},'password':{'type':Sequelize[_0x0909('0x2')]},'email':{'type':Sequelize[_0x0909('0x2')]},'remoteUri':{'type':Sequelize[_0x0909('0x2')],'unique':_0x0909('0x3')},'serverUrl':{'type':Sequelize[_0x0909('0x2')],'allowNull':![]}}; \ No newline at end of file diff --git a/server/api/intServicenowAccount/intServicenowAccount.controller.js b/server/api/intServicenowAccount/intServicenowAccount.controller.js index 3dbeb55..b1bbf9a 100644 --- a/server/api/intServicenowAccount/intServicenowAccount.controller.js +++ b/server/api/intServicenowAccount/intServicenowAccount.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x064c=['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','../../components/integrations/configuration','jayson/promise','client','http','then','info','request\x20sent','ServicenowAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','ServicenowAccount,\x20%s,\x20%s','message','result','catch','sendStatus','status','offset','undefined','limit','count','json','reject','save','update','end','stack','name','send','index','map','rawAttributes','fieldName','type','key','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','VIRTUAL','merge','ServicenowAccount','includeAll','findAll','rows','params','include','options','find','create','body','destroy','findOne','keys','getConfigurations','addConfiguration','Subjects','getSubjects','Descriptions','getDescriptions','channel','ServicenowConfiguration','ServicenowField','getFields','made_sla','subcategory','close_code','notify','incident_state','severity','category','parent','caused_by','watch_list','upon_reject','sys_updated_on','child_incidents','number','resolved_by','opened_by','user_input','sys_domain','state','sys_created_by','knowledge','calendar_stc','cmdb_ci','delivery_plan','impact','active','business_service','priority','sys_domain_path','rfc','time_worked','expected_start','opened_at','group_list','work_end','resolved_at','caller_id','approval_set','short_description','delivery_task','assignment_group','business_stc','additional_assignee_list','description','calendar_duration','sys_class_name','close_notes','closed_by','follow_up','parent_incident','sys_id','contact_type','reopened_by','urgency','company','reassignment_count','assigned_to','comments','sla_due','approval','comments_and_work_notes','sys_mod_count','reopen_count','escalation','upon_approval','correlation_id','location','username','password','email','remoteUri','serverUrl','substring','lastIndexOf','format','%s/api/now/table/','GET','incident?sysparm_display_value=all','assign','remove','includes','forEach','internalType','label','push','all','log','TCL:\x20_object','TCL:\x20exports.getEntityFields\x20->\x20_objectsCustom','concat','ServiceNow\x20error:\x20','test','statusCode','Wrong\x20credentials','boolean','True','true','False','sys_choice?sysparm_query=name=incident^element=','inactive','false','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','fs-extra','lodash'];(function(_0x1aa3fe,_0x27c5fa){var _0x163cee=function(_0x2a1505){while(--_0x2a1505){_0x1aa3fe['push'](_0x1aa3fe['shift']());}};_0x163cee(++_0x27c5fa);}(_0x064c,0xbc));var _0xc064=function(_0xe39824,_0xbdf61f){_0xe39824=_0xe39824-0x0;var _0x4bc31e=_0x064c[_0xe39824];return _0x4bc31e;};'use strict';var emlformat=require(_0xc064('0x0'));var rimraf=require(_0xc064('0x1'));var zipdir=require(_0xc064('0x2'));var jsonpatch=require(_0xc064('0x3'));var rp=require(_0xc064('0x4'));var moment=require('moment');var BPromise=require(_0xc064('0x5'));var Mustache=require(_0xc064('0x6'));var util=require(_0xc064('0x7'));var path=require(_0xc064('0x8'));var sox=require(_0xc064('0x9'));var csv=require(_0xc064('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xc064('0xb'));var _=require(_0xc064('0xc'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xc064('0xd'));var deskjs=require(_0xc064('0xe'));var toCsv=require('to-csv');var querystring=require(_0xc064('0xf'));var Papa=require(_0xc064('0x10'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0xc064('0x11'));var as=require(_0xc064('0x12'));var hardwareService=require(_0xc064('0x13'));var logger=require(_0xc064('0x14'))(_0xc064('0x15'));var utils=require(_0xc064('0x16'));var config=require(_0xc064('0x17'));var licenseUtil=require(_0xc064('0x18'));var db=require(_0xc064('0x19'))['db'];var integrations=require(_0xc064('0x1a'));var jayson=require(_0xc064('0x1b'));var client=jayson[_0xc064('0x1c')][_0xc064('0x1d')]({'port':0x232a});function respondWithRpcPromise(_0x3515ee,_0x8cd50e,_0x2536d2,_0x3aa1ae){return new BPromise(function(_0x273ffe,_0x326b7e){var _0x2bb808=_0x3aa1ae||client;return _0x2bb808['request'](_0x3515ee,_0x2536d2)[_0xc064('0x1e')](function(_0x5eb085){logger[_0xc064('0x1f')]('ServicenowAccount,\x20%s,\x20%s',_0x8cd50e,_0xc064('0x20'));logger['debug'](_0xc064('0x21'),_0x8cd50e,_0xc064('0x20'),JSON[_0xc064('0x22')](_0x5eb085));if(_0x5eb085[_0xc064('0x23')]){if(_0x5eb085[_0xc064('0x23')][_0xc064('0x24')]===0x1f4){logger[_0xc064('0x23')](_0xc064('0x25'),_0x8cd50e,_0x5eb085[_0xc064('0x23')][_0xc064('0x26')]);return _0x326b7e(_0x5eb085[_0xc064('0x23')][_0xc064('0x26')]);}logger[_0xc064('0x23')](_0xc064('0x25'),_0x8cd50e,_0x5eb085[_0xc064('0x23')][_0xc064('0x26')]);return _0x273ffe(_0x5eb085[_0xc064('0x23')][_0xc064('0x26')]);}else{logger[_0xc064('0x1f')](_0xc064('0x25'),_0x8cd50e,_0xc064('0x20'));_0x273ffe(_0x5eb085[_0xc064('0x27')][_0xc064('0x26')]);}})[_0xc064('0x28')](function(_0x4eed1a){logger['error'](_0xc064('0x25'),_0x8cd50e,_0x4eed1a);_0x326b7e(_0x4eed1a);});});}function respondWithStatusCode(_0x5403cb,_0x569838){_0x569838=_0x569838||0xcc;return function(_0x55122f){if(_0x55122f){return _0x5403cb[_0xc064('0x29')](_0x569838);}return _0x5403cb[_0xc064('0x2a')](_0x569838)['end']();};}function respondWithResult(_0x101f82,_0x21fd70){_0x21fd70=_0x21fd70||0xc8;return function(_0x160770){if(_0x160770){return _0x101f82[_0xc064('0x2a')](_0x21fd70)['json'](_0x160770);}};}function respondWithFilteredResult(_0xb08daf,_0x44b2dd){return function(_0xd5840a){if(_0xd5840a){var _0xc2941c=typeof _0x44b2dd[_0xc064('0x2b')]===_0xc064('0x2c')&&typeof _0x44b2dd[_0xc064('0x2d')]===_0xc064('0x2c');var _0x12820b=_0xd5840a[_0xc064('0x2e')];var _0x30ffbc=_0xc2941c?0x0:_0x44b2dd['offset'];var _0xfd1362=_0xc2941c?_0xd5840a['count']:_0x44b2dd['offset']+_0x44b2dd[_0xc064('0x2d')];var _0x468a31;if(_0xfd1362>=_0x12820b){_0xfd1362=_0x12820b;_0x468a31=0xc8;}else{_0x468a31=0xce;}_0xb08daf[_0xc064('0x2a')](_0x468a31);return _0xb08daf['set']('Content-Range',_0x30ffbc+'-'+_0xfd1362+'/'+_0x12820b)[_0xc064('0x2f')](_0xd5840a);}return null;};}function patchUpdates(_0x39b8d8){return function(_0x51898c){try{jsonpatch['apply'](_0x51898c,_0x39b8d8,!![]);}catch(_0x87dc4e){return BPromise[_0xc064('0x30')](_0x87dc4e);}return _0x51898c[_0xc064('0x31')]();};}function saveUpdates(_0x12ad54,_0x4152c5){return function(_0x562252){if(_0x562252){return _0x562252[_0xc064('0x32')](_0x12ad54)['then'](function(_0x5a4a44){return _0x5a4a44;});}return null;};}function removeEntity(_0x4da12e,_0x5cd11c){return function(_0x4bb8be){if(_0x4bb8be){return _0x4bb8be['destroy']()[_0xc064('0x1e')](function(){_0x4da12e['status'](0xcc)[_0xc064('0x33')]();});}};}function handleEntityNotFound(_0x37ff77,_0x161326){return function(_0x4a3305){if(!_0x4a3305){_0x37ff77['sendStatus'](0x194);}return _0x4a3305;};}function handleError(_0x19a0b1,_0x3ad6b1){_0x3ad6b1=_0x3ad6b1||0x1f4;return function(_0x3a828a){logger['error'](_0x3a828a[_0xc064('0x34')]);if(_0x3a828a[_0xc064('0x35')]){delete _0x3a828a['name'];}_0x19a0b1[_0xc064('0x2a')](_0x3ad6b1)[_0xc064('0x36')](_0x3a828a);};}exports[_0xc064('0x37')]=function(_0xa195e0,_0xb6523d){var _0x3558e4={},_0x5a7432={},_0x29954c={'count':0x0,'rows':[]};var _0x591e35=_[_0xc064('0x38')](db['ServicenowAccount'][_0xc064('0x39')],function(_0x3ad976){return{'name':_0x3ad976[_0xc064('0x3a')],'type':_0x3ad976[_0xc064('0x3b')][_0xc064('0x3c')]};});_0x5a7432[_0xc064('0x3d')]=_[_0xc064('0x38')](_0x591e35,_0xc064('0x35'));_0x5a7432[_0xc064('0x3e')]=_['keys'](_0xa195e0['query']);_0x5a7432[_0xc064('0x3f')]=_[_0xc064('0x40')](_0x5a7432[_0xc064('0x3d')],_0x5a7432[_0xc064('0x3e')]);_0x3558e4[_0xc064('0x41')]=_[_0xc064('0x40')](_0x5a7432[_0xc064('0x3d')],qs[_0xc064('0x42')](_0xa195e0[_0xc064('0x3e')][_0xc064('0x42')]));_0x3558e4[_0xc064('0x41')]=_0x3558e4['attributes'][_0xc064('0x43')]?_0x3558e4[_0xc064('0x41')]:_0x5a7432[_0xc064('0x3d')];if(!_0xa195e0[_0xc064('0x3e')][_0xc064('0x44')](_0xc064('0x45'))){_0x3558e4[_0xc064('0x2d')]=qs[_0xc064('0x2d')](_0xa195e0[_0xc064('0x3e')][_0xc064('0x2d')]);_0x3558e4[_0xc064('0x2b')]=qs[_0xc064('0x2b')](_0xa195e0['query'][_0xc064('0x2b')]);}_0x3558e4[_0xc064('0x46')]=qs['sort'](_0xa195e0[_0xc064('0x3e')][_0xc064('0x47')]);_0x3558e4[_0xc064('0x48')]=qs['filters'](_[_0xc064('0x49')](_0xa195e0[_0xc064('0x3e')],_0x5a7432[_0xc064('0x3f')]),_0x591e35);if(_0xa195e0['query'][_0xc064('0x4a')]){_0x3558e4[_0xc064('0x48')]=_['merge'](_0x3558e4[_0xc064('0x48')],{'$or':_[_0xc064('0x38')](_0x591e35,function(_0xf6bfe1){if(_0xf6bfe1[_0xc064('0x3b')]!==_0xc064('0x4b')){var _0x15a99e={};_0x15a99e[_0xf6bfe1[_0xc064('0x35')]]={'$like':'%'+_0xa195e0[_0xc064('0x3e')]['filter']+'%'};return _0x15a99e;}})});}_0x3558e4=_[_0xc064('0x4c')]({},_0x3558e4,_0xa195e0['options']);var _0x4d9938={'where':_0x3558e4[_0xc064('0x48')]};return db[_0xc064('0x4d')]['count'](_0x4d9938)[_0xc064('0x1e')](function(_0x1961c7){_0x29954c[_0xc064('0x2e')]=_0x1961c7;if(_0xa195e0[_0xc064('0x3e')][_0xc064('0x4e')]){_0x3558e4['include']=[{'all':!![]}];}return db[_0xc064('0x4d')][_0xc064('0x4f')](_0x3558e4);})[_0xc064('0x1e')](function(_0x4eac3a){_0x29954c[_0xc064('0x50')]=_0x4eac3a;return _0x29954c;})[_0xc064('0x1e')](respondWithFilteredResult(_0xb6523d,_0x3558e4))[_0xc064('0x28')](handleError(_0xb6523d,null));};exports['show']=function(_0x4fb0e0,_0x1c58ae){var _0x5518d7={'raw':![],'where':{'id':_0x4fb0e0[_0xc064('0x51')]['id']}},_0x5e3d40={};_0x5e3d40[_0xc064('0x3d')]=_['keys'](db[_0xc064('0x4d')]['rawAttributes']);_0x5e3d40[_0xc064('0x3e')]=_['keys'](_0x4fb0e0[_0xc064('0x3e')]);_0x5e3d40[_0xc064('0x3f')]=_[_0xc064('0x40')](_0x5e3d40['model'],_0x5e3d40[_0xc064('0x3e')]);_0x5518d7[_0xc064('0x41')]=_[_0xc064('0x40')](_0x5e3d40[_0xc064('0x3d')],qs[_0xc064('0x42')](_0x4fb0e0[_0xc064('0x3e')]['fields']));_0x5518d7['attributes']=_0x5518d7[_0xc064('0x41')][_0xc064('0x43')]?_0x5518d7[_0xc064('0x41')]:_0x5e3d40['model'];if(_0x4fb0e0[_0xc064('0x3e')][_0xc064('0x4e')]){_0x5518d7[_0xc064('0x52')]=[{'all':!![]}];}_0x5518d7=_[_0xc064('0x4c')]({},_0x5518d7,_0x4fb0e0[_0xc064('0x53')]);return db[_0xc064('0x4d')][_0xc064('0x54')](_0x5518d7)[_0xc064('0x1e')](handleEntityNotFound(_0x1c58ae,null))[_0xc064('0x1e')](respondWithResult(_0x1c58ae,null))[_0xc064('0x28')](handleError(_0x1c58ae,null));};exports[_0xc064('0x55')]=function(_0x301608,_0xb4aafd){return db[_0xc064('0x4d')][_0xc064('0x55')](_0x301608[_0xc064('0x56')],{})[_0xc064('0x1e')](respondWithResult(_0xb4aafd,0xc9))[_0xc064('0x28')](handleError(_0xb4aafd,null));};exports[_0xc064('0x32')]=function(_0x5b9b19,_0x4a9bda){if(_0x5b9b19[_0xc064('0x56')]['id']){delete _0x5b9b19[_0xc064('0x56')]['id'];}return db[_0xc064('0x4d')][_0xc064('0x54')]({'where':{'id':_0x5b9b19[_0xc064('0x51')]['id']}})[_0xc064('0x1e')](handleEntityNotFound(_0x4a9bda,null))[_0xc064('0x1e')](saveUpdates(_0x5b9b19[_0xc064('0x56')],null))[_0xc064('0x1e')](respondWithResult(_0x4a9bda,null))['catch'](handleError(_0x4a9bda,null));};exports[_0xc064('0x57')]=function(_0x1f2982,_0x2ac14e){return db[_0xc064('0x4d')][_0xc064('0x54')]({'where':{'id':_0x1f2982[_0xc064('0x51')]['id']}})[_0xc064('0x1e')](handleEntityNotFound(_0x2ac14e,null))['then'](removeEntity(_0x2ac14e,null))['catch'](handleError(_0x2ac14e,null));};exports['getConfigurations']=function(_0x1711c8,_0x1ba72c,_0x26dd3c){var _0x123113={};var _0x18dbbe={};var _0x13e641;var _0x500618;return db['ServicenowAccount'][_0xc064('0x58')]({'where':{'id':_0x1711c8[_0xc064('0x51')]['id']}})[_0xc064('0x1e')](handleEntityNotFound(_0x1ba72c,null))[_0xc064('0x1e')](function(_0x22a415){if(_0x22a415){_0x13e641=_0x22a415;_0x18dbbe[_0xc064('0x3d')]=_[_0xc064('0x59')](db['ServicenowConfiguration'][_0xc064('0x39')]);_0x18dbbe[_0xc064('0x3e')]=_[_0xc064('0x59')](_0x1711c8[_0xc064('0x3e')]);_0x18dbbe[_0xc064('0x3f')]=_[_0xc064('0x40')](_0x18dbbe[_0xc064('0x3d')],_0x18dbbe[_0xc064('0x3e')]);_0x123113[_0xc064('0x41')]=_['intersection'](_0x18dbbe[_0xc064('0x3d')],qs['fields'](_0x1711c8['query']['fields']));_0x123113[_0xc064('0x41')]=_0x123113[_0xc064('0x41')][_0xc064('0x43')]?_0x123113['attributes']:_0x18dbbe[_0xc064('0x3d')];_0x123113[_0xc064('0x46')]=qs['sort'](_0x1711c8[_0xc064('0x3e')][_0xc064('0x47')]);_0x123113[_0xc064('0x48')]=qs[_0xc064('0x3f')](_[_0xc064('0x49')](_0x1711c8[_0xc064('0x3e')],_0x18dbbe['filters']));if(_0x1711c8[_0xc064('0x3e')][_0xc064('0x4a')]){_0x123113['where']=_['merge'](_0x123113['where'],{'$or':_['map'](_0x123113[_0xc064('0x41')],function(_0x2f90d4){var _0x183434={};_0x183434[_0x2f90d4]={'$like':'%'+_0x1711c8[_0xc064('0x3e')][_0xc064('0x4a')]+'%'};return _0x183434;})});}_0x123113=_[_0xc064('0x4c')]({},_0x123113,_0x1711c8[_0xc064('0x53')]);return _0x13e641[_0xc064('0x5a')](_0x123113);}})[_0xc064('0x1e')](function(_0x6c3ab2){if(_0x6c3ab2){_0x500618=_0x6c3ab2[_0xc064('0x43')];if(!_0x1711c8[_0xc064('0x3e')]['hasOwnProperty'](_0xc064('0x45'))){_0x123113['limit']=qs[_0xc064('0x2d')](_0x1711c8[_0xc064('0x3e')][_0xc064('0x2d')]);_0x123113['offset']=qs[_0xc064('0x2b')](_0x1711c8['query'][_0xc064('0x2b')]);}return _0x13e641['getConfigurations'](_0x123113);}})['then'](function(_0x109dc5){if(_0x109dc5){return _0x109dc5?{'count':_0x500618,'rows':_0x109dc5}:null;}})[_0xc064('0x1e')](respondWithResult(_0x1ba72c,null))[_0xc064('0x28')](handleError(_0x1ba72c,null));};exports[_0xc064('0x5b')]=function(_0xaef76d,_0x1f5056,_0x504b57){if(_0xaef76d[_0xc064('0x56')]['id']){delete _0xaef76d[_0xc064('0x56')]['id'];}return db['ServicenowAccount'][_0xc064('0x58')]({'where':{'id':_0xaef76d[_0xc064('0x51')]['id']}})['then'](handleEntityNotFound(_0x1f5056,null))[_0xc064('0x1e')](function(_0xb9c33c){if(_0xb9c33c){_0xaef76d['body']['AccountId']=_0xb9c33c['id'];_0xaef76d[_0xc064('0x56')][_0xc064('0x5c')]=integrations[_0xc064('0x5d')](_0xaef76d[_0xc064('0x56')]['channel'],_0xaef76d['body'][_0xc064('0x3b')]);_0xaef76d['body'][_0xc064('0x5e')]=integrations[_0xc064('0x5f')](_0xaef76d[_0xc064('0x56')][_0xc064('0x60')],_0xaef76d[_0xc064('0x56')][_0xc064('0x3b')]);return db[_0xc064('0x61')][_0xc064('0x55')](_0xaef76d[_0xc064('0x56')],{'include':[{'model':db['ServicenowField'],'as':_0xc064('0x5c')},{'model':db[_0xc064('0x62')],'as':_0xc064('0x5e')}]});}return null;})[_0xc064('0x1e')](respondWithResult(_0x1f5056,null))['catch'](handleError(_0x1f5056,null));};exports[_0xc064('0x63')]=function(_0xdbb14f,_0x21b55f,_0x26bb3b){var _0x308e7e=[_0xc064('0x64'),'hold_reason','knowledge',_0xc064('0x65'),_0xc064('0x66'),_0xc064('0x67'),_0xc064('0x68'),_0xc064('0x69'),_0xc064('0x6a')];var _0x3d56cd=[_0xc064('0x6b'),_0xc064('0x64'),_0xc064('0x6c'),_0xc064('0x6d'),_0xc064('0x6e'),_0xc064('0x6f'),_0xc064('0x70'),'hold_reason','approval_history',_0xc064('0x71'),_0xc064('0x72'),'sys_updated_by',_0xc064('0x73'),_0xc064('0x74'),'sys_created_on',_0xc064('0x75'),_0xc064('0x76'),_0xc064('0x77'),_0xc064('0x78'),_0xc064('0x46'),_0xc064('0x79'),'closed_at',_0xc064('0x7a'),_0xc064('0x7b'),_0xc064('0x7c'),_0xc064('0x7d'),'work_notes_list',_0xc064('0x7e'),_0xc064('0x7f'),_0xc064('0x80'),_0xc064('0x81'),_0xc064('0x82'),_0xc064('0x83'),_0xc064('0x84'),'business_duration',_0xc064('0x85'),_0xc064('0x86'),'reopened_time',_0xc064('0x87'),_0xc064('0x88'),_0xc064('0x89'),_0xc064('0x65'),'work_notes',_0xc064('0x8a'),_0xc064('0x66'),'correlation_display',_0xc064('0x8b'),'work_start',_0xc064('0x8c'),_0xc064('0x8d'),_0xc064('0x8e'),_0xc064('0x8f'),_0xc064('0x90'),_0xc064('0x67'),_0xc064('0x91'),_0xc064('0x92'),_0xc064('0x93'),_0xc064('0x94'),_0xc064('0x95'),_0xc064('0x96'),_0xc064('0x97'),_0xc064('0x98'),_0xc064('0x68'),_0xc064('0x99'),'problem_id',_0xc064('0x9a'),_0xc064('0x9b'),'activity_due',_0xc064('0x9c'),_0xc064('0x69'),_0xc064('0x9d'),_0xc064('0x9e'),_0xc064('0x9f'),_0xc064('0xa0'),'due_date',_0xc064('0xa1'),_0xc064('0xa2'),'sys_tags',_0xc064('0xa3'),_0xc064('0xa4'),_0xc064('0xa5'),_0xc064('0xa6'),_0xc064('0x6a')];var _0xa181e8='';var _0x2f2549='';var _0x3ac709=[];var _0x378dce='';var _0x4d3596='';var _0x403d75=[];var _0x2c4298='';var _0x54e6de='';var _0x1e0091={};var _0x105b02='';return db[_0xc064('0x4d')]['findOne']({'where':{'id':_0xdbb14f['params']['id']},'attributes':['id',_0xc064('0xa7'),_0xc064('0xa8'),_0xc064('0xa9'),_0xc064('0xaa'),_0xc064('0xab')]})[_0xc064('0x1e')](handleEntityNotFound(_0x21b55f,null))[_0xc064('0x1e')](function(_0x21105b){if(_0x21105b){_0x105b02=_0x21105b['remoteUri'];var _0x49049a=_0x105b02['slice'](-0x1);if(_0x49049a==='/'){_0x105b02=_0x105b02[_0xc064('0xac')](0x0,_0x105b02[_0xc064('0xad')](_0x49049a));}_0x54e6de=util[_0xc064('0xae')]('%s/api/now/doc/table/schema/',_0x105b02);_0x2c4298=util[_0xc064('0xae')](_0xc064('0xaf'),_0x105b02);_0x1e0091={'user':_0x21105b[_0xc064('0xa7')],'pass':_0x21105b['password']};var _0x303951={'method':_0xc064('0xb0'),'uri':_0x54e6de+_0xc064('0xb1'),'auth':_0x1e0091,'json':!![]};return rp(_0x303951);}})['then'](function(_0x149ec7){if(_0x149ec7[_0xc064('0x27')][_0xc064('0x43')]>0x0){_0xa181e8=_0x149ec7['result'];}console['log']('incident\x20table\x20objects',_0xa181e8);_0x403d75=[];_0x2f2549=Object[_0xc064('0xb2')]([],_0xa181e8);_[_0xc064('0xb3')](_0x2f2549,function(_0x2fd9c7){return!_0x308e7e[_0xc064('0xb4')](_0x2fd9c7[_0xc064('0x35')]);});_0x2f2549[_0xc064('0xb5')](function(_0x229c7a){var _0x19a1e6=createFieldObject(_0x2c4298,_0x1e0091,_0x229c7a[_0xc064('0xb6')],_0x229c7a[_0xc064('0x35')],_0x229c7a[_0xc064('0xb7')],![]);_0x403d75[_0xc064('0xb8')](_0x19a1e6);});return Promise[_0xc064('0xb9')](_0x403d75);})['then'](function(_0x3bb6b0){_0x3ac709=_0x3bb6b0;_0x378dce=Object['assign']([],_0xa181e8);console[_0xc064('0xba')](_0xc064('0xbb'),_0xa181e8);_[_0xc064('0xb3')](_0x378dce,function(_0x457165){return _0x3d56cd[_0xc064('0xb4')](_0x457165['name']);});console[_0xc064('0xba')](_0xc064('0xbc'),_0x378dce);_0x403d75=[];_0x378dce['forEach'](function(_0x2e01d8){var _0x361eb1=createFieldObject(_0x2c4298,_0x1e0091,_0x2e01d8[_0xc064('0xb6')],_0x2e01d8[_0xc064('0x35')],_0x2e01d8[_0xc064('0xb7')],!![]);_0x403d75[_0xc064('0xb8')](_0x361eb1);});return Promise[_0xc064('0xb9')](_0x403d75);})[_0xc064('0x1e')](function(_0x78ceea){_0x4d3596=_0x78ceea;var _0x5ba57d=_0x3ac709[_0xc064('0xbd')](_0x4d3596);return{'count':_0x5ba57d[_0xc064('0x43')],'rows':_0x5ba57d};})[_0xc064('0x1e')](respondWithResult(_0x21b55f,null))[_0xc064('0x28')](function(_0x4319f3){console[_0xc064('0xba')](_0xc064('0xbe')+_0x4319f3);var _0x4acabf=_0xdbb14f[_0xc064('0x3e')][_0xc064('0xbf')]?0x1f4:_0x4319f3[_0xc064('0xc0')]||0x1f4;logger['error'](_0x4319f3[_0xc064('0x34')]);delete _0x4319f3['name'];if(_0x4acabf===0x191){_0x4acabf=0x190;}_0x21b55f[_0xc064('0x2a')](_0x4acabf)[_0xc064('0x36')](_0xdbb14f['query'][_0xc064('0xbf')]?{'message':_0xc064('0xc1'),'statusCode':_0x4319f3[_0xc064('0xc0')]}:_0x4319f3);});};function createFieldObject(_0x4e36f9,_0x3b5cb2,_0x15154a,_0x10f939,_0x31d442,_0x1fedba){return new Promise(function(_0x56ef31,_0x5cb25b){var _0x5af843={'id':_0x10f939,'name':_0x31d442,'custom':_0x1fedba};if(_0x15154a===_0xc064('0xc2')){_0x5af843['options']=[{'name':_0xc064('0xc3'),'value':_0xc064('0xc4')},{'name':_0xc064('0xc5'),'value':'false'}];_0x56ef31(_0x5af843);}else{var _0x5dc7a6={'method':_0xc064('0xb0'),'uri':_0x4e36f9+_0xc064('0xc6')+_0x10f939,'auth':_0x3b5cb2,'json':!![]};return rp(_0x5dc7a6)[_0xc064('0x1e')](function(_0x3908eb){var _0x1bc5fb=[];if(_0x3908eb[_0xc064('0x27')]['length']>0x0){_0x3908eb[_0xc064('0x27')]['forEach'](function(_0x1968dd){if(_0x1968dd[_0xc064('0xc7')]===_0xc064('0xc8')){var _0x15554a={'name':_0x1968dd[_0xc064('0xb7')],'value':_0x1968dd['value']};_0x1bc5fb[_0xc064('0xb8')](_0x15554a);}});}_0x5af843[_0xc064('0x53')]=_0x1bc5fb;if(_0x5af843[_0xc064('0x53')][_0xc064('0x43')]>0x0){_0x56ef31(_0x5af843);}else{if(_0x1fedba==![]){_0x56ef31();}else{_0x56ef31(_0x5af843);}}});}});} \ No newline at end of file +var _0x89c5=['sys_class_name','close_notes','closed_by','follow_up','parent_incident','sys_id','reopened_by','urgency','problem_id','company','reassignment_count','assigned_to','comments','sla_due','approval','reopen_count','sys_tags','escalation','correlation_id','username','password','email','remoteUri','serverUrl','substring','format','%s/api/now/table/','incident?sysparm_display_value=all','log','incident\x20table\x20objects','assign','remove','forEach','internalType','label','push','all','TCL:\x20exports.getEntityFields\x20->\x20_objectsCustom','concat','ServiceNow\x20error:\x20','Wrong\x20credentials','statusCode','True','true','False','GET','sys_choice?sysparm_query=name=incident^element=','inactive','false','value','eml-format','zip-dir','request-promise','bluebird','mustache','util','sox','fs-extra','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','client','http','then','info','ServicenowAccount,\x20%s,\x20%s','debug','request\x20sent','error','code','message','result','catch','sendStatus','end','json','undefined','limit','count','offset','status','set','apply','reject','save','destroy','stack','name','send','index','map','rawAttributes','fieldName','type','key','model','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','ServicenowAccount','includeAll','include','findAll','rows','show','params','keys','find','create','body','getConfigurations','findOne','ServicenowConfiguration','addConfiguration','AccountId','Subjects','getSubjects','channel','getDescriptions','Descriptions','getFields','made_sla','hold_reason','knowledge','subcategory','close_code','notify','severity','parent','upon_reject','child_incidents','approval_history','number','resolved_by','sys_updated_by','opened_by','user_input','sys_created_on','state','sys_created_by','calendar_stc','cmdb_ci','delivery_plan','impact','work_notes_list','business_service','time_worked','opened_at','business_duration','work_end','reopened_time','caller_id','approval_set','short_description','correlation_display','delivery_task','assignment_group','business_stc','additional_assignee_list','description','calendar_duration'];(function(_0x45cd43,_0x26b777){var _0x394883=function(_0x30d29c){while(--_0x30d29c){_0x45cd43['push'](_0x45cd43['shift']());}};_0x394883(++_0x26b777);}(_0x89c5,0x1aa));var _0x589c=function(_0x513027,_0x40051f){_0x513027=_0x513027-0x0;var _0x4e326c=_0x89c5[_0x513027];return _0x4e326c;};'use strict';var emlformat=require(_0x589c('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x589c('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x589c('0x2'));var moment=require('moment');var BPromise=require(_0x589c('0x3'));var Mustache=require(_0x589c('0x4'));var util=require(_0x589c('0x5'));var path=require('path');var sox=require(_0x589c('0x6'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x589c('0x7'));var _=require(_0x589c('0x8'));var squel=require(_0x589c('0x9'));var crypto=require(_0x589c('0xa'));var jsforce=require(_0x589c('0xb'));var deskjs=require(_0x589c('0xc'));var toCsv=require(_0x589c('0xd'));var querystring=require(_0x589c('0xe'));var Papa=require(_0x589c('0xf'));var Redis=require('ioredis');var authService=require(_0x589c('0x10'));var qs=require(_0x589c('0x11'));var as=require(_0x589c('0x12'));var hardwareService=require(_0x589c('0x13'));var logger=require(_0x589c('0x14'))(_0x589c('0x15'));var utils=require(_0x589c('0x16'));var config=require(_0x589c('0x17'));var licenseUtil=require(_0x589c('0x18'));var db=require('../../mysqldb')['db'];var integrations=require('../../components/integrations/configuration');var jayson=require('jayson/promise');var client=jayson[_0x589c('0x19')][_0x589c('0x1a')]({'port':0x232a});function respondWithRpcPromise(_0x3e6e23,_0x31ff26,_0x25f5d9,_0x39127c){return new BPromise(function(_0x2c8ccf,_0x2d89e3){var _0x1365f2=_0x39127c||client;return _0x1365f2['request'](_0x3e6e23,_0x25f5d9)[_0x589c('0x1b')](function(_0x1aeaf2){logger[_0x589c('0x1c')](_0x589c('0x1d'),_0x31ff26,'request\x20sent');logger[_0x589c('0x1e')]('ServicenowAccount,\x20%s,\x20%s,\x20%s',_0x31ff26,_0x589c('0x1f'),JSON['stringify'](_0x1aeaf2));if(_0x1aeaf2[_0x589c('0x20')]){if(_0x1aeaf2[_0x589c('0x20')][_0x589c('0x21')]===0x1f4){logger['error']('ServicenowAccount,\x20%s,\x20%s',_0x31ff26,_0x1aeaf2[_0x589c('0x20')][_0x589c('0x22')]);return _0x2d89e3(_0x1aeaf2['error']['message']);}logger['error'](_0x589c('0x1d'),_0x31ff26,_0x1aeaf2[_0x589c('0x20')][_0x589c('0x22')]);return _0x2c8ccf(_0x1aeaf2[_0x589c('0x20')][_0x589c('0x22')]);}else{logger[_0x589c('0x1c')]('ServicenowAccount,\x20%s,\x20%s',_0x31ff26,_0x589c('0x1f'));_0x2c8ccf(_0x1aeaf2[_0x589c('0x23')][_0x589c('0x22')]);}})[_0x589c('0x24')](function(_0x8103cc){logger[_0x589c('0x20')]('ServicenowAccount,\x20%s,\x20%s',_0x31ff26,_0x8103cc);_0x2d89e3(_0x8103cc);});});}function respondWithStatusCode(_0xd5d26e,_0x17919a){_0x17919a=_0x17919a||0xcc;return function(_0x2dce47){if(_0x2dce47){return _0xd5d26e[_0x589c('0x25')](_0x17919a);}return _0xd5d26e['status'](_0x17919a)[_0x589c('0x26')]();};}function respondWithResult(_0x5d09e6,_0x132baf){_0x132baf=_0x132baf||0xc8;return function(_0x213c25){if(_0x213c25){return _0x5d09e6['status'](_0x132baf)[_0x589c('0x27')](_0x213c25);}};}function respondWithFilteredResult(_0x4c4814,_0x19a191){return function(_0x505a0d){if(_0x505a0d){var _0x324114=typeof _0x19a191['offset']===_0x589c('0x28')&&typeof _0x19a191[_0x589c('0x29')]==='undefined';var _0x71add5=_0x505a0d[_0x589c('0x2a')];var _0x760131=_0x324114?0x0:_0x19a191[_0x589c('0x2b')];var _0x4dd8f4=_0x324114?_0x505a0d[_0x589c('0x2a')]:_0x19a191[_0x589c('0x2b')]+_0x19a191[_0x589c('0x29')];var _0x495bbc;if(_0x4dd8f4>=_0x71add5){_0x4dd8f4=_0x71add5;_0x495bbc=0xc8;}else{_0x495bbc=0xce;}_0x4c4814[_0x589c('0x2c')](_0x495bbc);return _0x4c4814[_0x589c('0x2d')]('Content-Range',_0x760131+'-'+_0x4dd8f4+'/'+_0x71add5)[_0x589c('0x27')](_0x505a0d);}return null;};}function patchUpdates(_0x442ff2){return function(_0x12e713){try{jsonpatch[_0x589c('0x2e')](_0x12e713,_0x442ff2,!![]);}catch(_0x2e3e81){return BPromise[_0x589c('0x2f')](_0x2e3e81);}return _0x12e713[_0x589c('0x30')]();};}function saveUpdates(_0x58018f,_0xcbbe79){return function(_0x5cc3f5){if(_0x5cc3f5){return _0x5cc3f5['update'](_0x58018f)[_0x589c('0x1b')](function(_0x521619){return _0x521619;});}return null;};}function removeEntity(_0x5587cc,_0x2ec67a){return function(_0x2fa360){if(_0x2fa360){return _0x2fa360[_0x589c('0x31')]()[_0x589c('0x1b')](function(){_0x5587cc[_0x589c('0x2c')](0xcc)['end']();});}};}function handleEntityNotFound(_0x480855,_0x526e99){return function(_0x1374b6){if(!_0x1374b6){_0x480855[_0x589c('0x25')](0x194);}return _0x1374b6;};}function handleError(_0x49398c,_0x6b0358){_0x6b0358=_0x6b0358||0x1f4;return function(_0x3edbfc){logger['error'](_0x3edbfc[_0x589c('0x32')]);if(_0x3edbfc[_0x589c('0x33')]){delete _0x3edbfc[_0x589c('0x33')];}_0x49398c[_0x589c('0x2c')](_0x6b0358)[_0x589c('0x34')](_0x3edbfc);};}exports[_0x589c('0x35')]=function(_0x151875,_0x59ce1d){var _0x5d7f8b={},_0x170e6d={},_0x355e38={'count':0x0,'rows':[]};var _0x1e4f8a=_[_0x589c('0x36')](db['ServicenowAccount'][_0x589c('0x37')],function(_0x498d0e){return{'name':_0x498d0e[_0x589c('0x38')],'type':_0x498d0e[_0x589c('0x39')][_0x589c('0x3a')]};});_0x170e6d[_0x589c('0x3b')]=_[_0x589c('0x36')](_0x1e4f8a,_0x589c('0x33'));_0x170e6d['query']=_['keys'](_0x151875[_0x589c('0x3c')]);_0x170e6d[_0x589c('0x3d')]=_['intersection'](_0x170e6d['model'],_0x170e6d[_0x589c('0x3c')]);_0x5d7f8b['attributes']=_[_0x589c('0x3e')](_0x170e6d['model'],qs['fields'](_0x151875[_0x589c('0x3c')][_0x589c('0x3f')]));_0x5d7f8b[_0x589c('0x40')]=_0x5d7f8b[_0x589c('0x40')][_0x589c('0x41')]?_0x5d7f8b[_0x589c('0x40')]:_0x170e6d[_0x589c('0x3b')];if(!_0x151875[_0x589c('0x3c')][_0x589c('0x42')](_0x589c('0x43'))){_0x5d7f8b[_0x589c('0x29')]=qs['limit'](_0x151875['query']['limit']);_0x5d7f8b[_0x589c('0x2b')]=qs[_0x589c('0x2b')](_0x151875[_0x589c('0x3c')][_0x589c('0x2b')]);}_0x5d7f8b[_0x589c('0x44')]=qs[_0x589c('0x45')](_0x151875[_0x589c('0x3c')][_0x589c('0x45')]);_0x5d7f8b[_0x589c('0x46')]=qs[_0x589c('0x3d')](_[_0x589c('0x47')](_0x151875['query'],_0x170e6d[_0x589c('0x3d')]),_0x1e4f8a);if(_0x151875[_0x589c('0x3c')][_0x589c('0x48')]){_0x5d7f8b['where']=_[_0x589c('0x49')](_0x5d7f8b[_0x589c('0x46')],{'$or':_[_0x589c('0x36')](_0x1e4f8a,function(_0x234441){if(_0x234441[_0x589c('0x39')]!==_0x589c('0x4a')){var _0x5378f3={};_0x5378f3[_0x234441[_0x589c('0x33')]]={'$like':'%'+_0x151875[_0x589c('0x3c')][_0x589c('0x48')]+'%'};return _0x5378f3;}})});}_0x5d7f8b=_[_0x589c('0x49')]({},_0x5d7f8b,_0x151875[_0x589c('0x4b')]);var _0xa49a9={'where':_0x5d7f8b[_0x589c('0x46')]};return db[_0x589c('0x4c')][_0x589c('0x2a')](_0xa49a9)[_0x589c('0x1b')](function(_0x4cc906){_0x355e38[_0x589c('0x2a')]=_0x4cc906;if(_0x151875['query'][_0x589c('0x4d')]){_0x5d7f8b[_0x589c('0x4e')]=[{'all':!![]}];}return db[_0x589c('0x4c')][_0x589c('0x4f')](_0x5d7f8b);})[_0x589c('0x1b')](function(_0x1e0e27){_0x355e38[_0x589c('0x50')]=_0x1e0e27;return _0x355e38;})['then'](respondWithFilteredResult(_0x59ce1d,_0x5d7f8b))[_0x589c('0x24')](handleError(_0x59ce1d,null));};exports[_0x589c('0x51')]=function(_0x3fdbb6,_0x31813b){var _0x139904={'raw':![],'where':{'id':_0x3fdbb6[_0x589c('0x52')]['id']}},_0x17e5be={};_0x17e5be['model']=_[_0x589c('0x53')](db[_0x589c('0x4c')][_0x589c('0x37')]);_0x17e5be[_0x589c('0x3c')]=_['keys'](_0x3fdbb6[_0x589c('0x3c')]);_0x17e5be[_0x589c('0x3d')]=_[_0x589c('0x3e')](_0x17e5be[_0x589c('0x3b')],_0x17e5be['query']);_0x139904['attributes']=_['intersection'](_0x17e5be[_0x589c('0x3b')],qs[_0x589c('0x3f')](_0x3fdbb6['query'][_0x589c('0x3f')]));_0x139904['attributes']=_0x139904['attributes'][_0x589c('0x41')]?_0x139904[_0x589c('0x40')]:_0x17e5be['model'];if(_0x3fdbb6[_0x589c('0x3c')][_0x589c('0x4d')]){_0x139904[_0x589c('0x4e')]=[{'all':!![]}];}_0x139904=_[_0x589c('0x49')]({},_0x139904,_0x3fdbb6[_0x589c('0x4b')]);return db[_0x589c('0x4c')][_0x589c('0x54')](_0x139904)['then'](handleEntityNotFound(_0x31813b,null))[_0x589c('0x1b')](respondWithResult(_0x31813b,null))[_0x589c('0x24')](handleError(_0x31813b,null));};exports[_0x589c('0x55')]=function(_0x207dec,_0x107e2d){return db[_0x589c('0x4c')][_0x589c('0x55')](_0x207dec[_0x589c('0x56')],{})['then'](respondWithResult(_0x107e2d,0xc9))[_0x589c('0x24')](handleError(_0x107e2d,null));};exports['update']=function(_0x53e407,_0x34cf8d){if(_0x53e407[_0x589c('0x56')]['id']){delete _0x53e407[_0x589c('0x56')]['id'];}return db['ServicenowAccount']['find']({'where':{'id':_0x53e407[_0x589c('0x52')]['id']}})[_0x589c('0x1b')](handleEntityNotFound(_0x34cf8d,null))[_0x589c('0x1b')](saveUpdates(_0x53e407[_0x589c('0x56')],null))[_0x589c('0x1b')](respondWithResult(_0x34cf8d,null))[_0x589c('0x24')](handleError(_0x34cf8d,null));};exports[_0x589c('0x31')]=function(_0x7ab8fb,_0x443283){return db[_0x589c('0x4c')]['find']({'where':{'id':_0x7ab8fb['params']['id']}})[_0x589c('0x1b')](handleEntityNotFound(_0x443283,null))[_0x589c('0x1b')](removeEntity(_0x443283,null))[_0x589c('0x24')](handleError(_0x443283,null));};exports[_0x589c('0x57')]=function(_0x2ec684,_0x4b9163,_0x54cfef){var _0x3b6821={};var _0x1d7eb4={};var _0x1cf0b7;var _0x374f5d;return db[_0x589c('0x4c')][_0x589c('0x58')]({'where':{'id':_0x2ec684[_0x589c('0x52')]['id']}})[_0x589c('0x1b')](handleEntityNotFound(_0x4b9163,null))[_0x589c('0x1b')](function(_0x5f1392){if(_0x5f1392){_0x1cf0b7=_0x5f1392;_0x1d7eb4['model']=_[_0x589c('0x53')](db[_0x589c('0x59')][_0x589c('0x37')]);_0x1d7eb4['query']=_['keys'](_0x2ec684[_0x589c('0x3c')]);_0x1d7eb4['filters']=_[_0x589c('0x3e')](_0x1d7eb4[_0x589c('0x3b')],_0x1d7eb4[_0x589c('0x3c')]);_0x3b6821[_0x589c('0x40')]=_['intersection'](_0x1d7eb4[_0x589c('0x3b')],qs[_0x589c('0x3f')](_0x2ec684[_0x589c('0x3c')]['fields']));_0x3b6821['attributes']=_0x3b6821['attributes'][_0x589c('0x41')]?_0x3b6821[_0x589c('0x40')]:_0x1d7eb4[_0x589c('0x3b')];_0x3b6821[_0x589c('0x44')]=qs[_0x589c('0x45')](_0x2ec684[_0x589c('0x3c')][_0x589c('0x45')]);_0x3b6821[_0x589c('0x46')]=qs[_0x589c('0x3d')](_[_0x589c('0x47')](_0x2ec684[_0x589c('0x3c')],_0x1d7eb4[_0x589c('0x3d')]));if(_0x2ec684[_0x589c('0x3c')][_0x589c('0x48')]){_0x3b6821[_0x589c('0x46')]=_[_0x589c('0x49')](_0x3b6821['where'],{'$or':_['map'](_0x3b6821[_0x589c('0x40')],function(_0xa5c558){var _0x4ec71f={};_0x4ec71f[_0xa5c558]={'$like':'%'+_0x2ec684['query'][_0x589c('0x48')]+'%'};return _0x4ec71f;})});}_0x3b6821=_[_0x589c('0x49')]({},_0x3b6821,_0x2ec684['options']);return _0x1cf0b7[_0x589c('0x57')](_0x3b6821);}})[_0x589c('0x1b')](function(_0x422bb3){if(_0x422bb3){_0x374f5d=_0x422bb3['length'];if(!_0x2ec684[_0x589c('0x3c')][_0x589c('0x42')]('nolimit')){_0x3b6821[_0x589c('0x29')]=qs[_0x589c('0x29')](_0x2ec684[_0x589c('0x3c')][_0x589c('0x29')]);_0x3b6821['offset']=qs[_0x589c('0x2b')](_0x2ec684['query'][_0x589c('0x2b')]);}return _0x1cf0b7[_0x589c('0x57')](_0x3b6821);}})['then'](function(_0x5274bf){if(_0x5274bf){return _0x5274bf?{'count':_0x374f5d,'rows':_0x5274bf}:null;}})[_0x589c('0x1b')](respondWithResult(_0x4b9163,null))[_0x589c('0x24')](handleError(_0x4b9163,null));};exports[_0x589c('0x5a')]=function(_0x53e741,_0x2048c5,_0x2fcc6a){if(_0x53e741['body']['id']){delete _0x53e741[_0x589c('0x56')]['id'];}return db[_0x589c('0x4c')]['findOne']({'where':{'id':_0x53e741[_0x589c('0x52')]['id']}})[_0x589c('0x1b')](handleEntityNotFound(_0x2048c5,null))[_0x589c('0x1b')](function(_0x2d911c){if(_0x2d911c){_0x53e741[_0x589c('0x56')][_0x589c('0x5b')]=_0x2d911c['id'];_0x53e741[_0x589c('0x56')][_0x589c('0x5c')]=integrations[_0x589c('0x5d')](_0x53e741['body'][_0x589c('0x5e')],_0x53e741['body'][_0x589c('0x39')]);_0x53e741[_0x589c('0x56')]['Descriptions']=integrations[_0x589c('0x5f')](_0x53e741[_0x589c('0x56')][_0x589c('0x5e')],_0x53e741['body']['type']);return db['ServicenowConfiguration'][_0x589c('0x55')](_0x53e741[_0x589c('0x56')],{'include':[{'model':db['ServicenowField'],'as':_0x589c('0x5c')},{'model':db['ServicenowField'],'as':_0x589c('0x60')}]});}return null;})[_0x589c('0x1b')](respondWithResult(_0x2048c5,null))[_0x589c('0x24')](handleError(_0x2048c5,null));};exports[_0x589c('0x61')]=function(_0x209a5e,_0x1be37f,_0x5c541f){var _0x2b8022=[_0x589c('0x62'),_0x589c('0x63'),_0x589c('0x64'),_0x589c('0x65'),_0x589c('0x66'),_0x589c('0x67'),'incident_state',_0x589c('0x68'),'category'];var _0x575b2a=[_0x589c('0x69'),'made_sla','caused_by','watch_list',_0x589c('0x6a'),'sys_updated_on',_0x589c('0x6b'),'hold_reason',_0x589c('0x6c'),_0x589c('0x6d'),_0x589c('0x6e'),_0x589c('0x6f'),_0x589c('0x70'),_0x589c('0x71'),_0x589c('0x72'),'sys_domain',_0x589c('0x73'),_0x589c('0x74'),_0x589c('0x64'),_0x589c('0x44'),_0x589c('0x75'),'closed_at',_0x589c('0x76'),_0x589c('0x77'),_0x589c('0x78'),'active',_0x589c('0x79'),_0x589c('0x7a'),'priority','sys_domain_path','rfc',_0x589c('0x7b'),'expected_start',_0x589c('0x7c'),_0x589c('0x7d'),'group_list',_0x589c('0x7e'),_0x589c('0x7f'),'resolved_at',_0x589c('0x80'),_0x589c('0x81'),'subcategory','work_notes',_0x589c('0x82'),'close_code',_0x589c('0x83'),_0x589c('0x84'),'work_start',_0x589c('0x85'),_0x589c('0x86'),_0x589c('0x87'),_0x589c('0x88'),_0x589c('0x89'),_0x589c('0x67'),_0x589c('0x8a'),_0x589c('0x8b'),_0x589c('0x8c'),_0x589c('0x8d'),_0x589c('0x8e'),_0x589c('0x8f'),'contact_type',_0x589c('0x90'),'incident_state',_0x589c('0x91'),_0x589c('0x92'),_0x589c('0x93'),_0x589c('0x94'),'activity_due',_0x589c('0x95'),_0x589c('0x68'),_0x589c('0x96'),_0x589c('0x97'),_0x589c('0x98'),'comments_and_work_notes','due_date','sys_mod_count',_0x589c('0x99'),_0x589c('0x9a'),_0x589c('0x9b'),'upon_approval',_0x589c('0x9c'),'location','category'];var _0x21597d='';var _0x583951='';var _0x3f2ca8=[];var _0xf0b29c='';var _0x1c850f='';var _0x138dce=[];var _0x55215a='';var _0x5ed5fc='';var _0xeb3100={};var _0x1f6c6f='';return db[_0x589c('0x4c')]['findOne']({'where':{'id':_0x209a5e[_0x589c('0x52')]['id']},'attributes':['id',_0x589c('0x9d'),_0x589c('0x9e'),_0x589c('0x9f'),_0x589c('0xa0'),_0x589c('0xa1')]})[_0x589c('0x1b')](handleEntityNotFound(_0x1be37f,null))[_0x589c('0x1b')](function(_0xb21c16){if(_0xb21c16){_0x1f6c6f=_0xb21c16[_0x589c('0xa0')];var _0x592fca=_0x1f6c6f['slice'](-0x1);if(_0x592fca==='/'){_0x1f6c6f=_0x1f6c6f[_0x589c('0xa2')](0x0,_0x1f6c6f['lastIndexOf'](_0x592fca));}_0x5ed5fc=util[_0x589c('0xa3')]('%s/api/now/doc/table/schema/',_0x1f6c6f);_0x55215a=util[_0x589c('0xa3')](_0x589c('0xa4'),_0x1f6c6f);_0xeb3100={'user':_0xb21c16[_0x589c('0x9d')],'pass':_0xb21c16['password']};var _0x2456d6={'method':'GET','uri':_0x5ed5fc+_0x589c('0xa5'),'auth':_0xeb3100,'json':!![]};return rp(_0x2456d6);}})[_0x589c('0x1b')](function(_0x329a3c){if(_0x329a3c[_0x589c('0x23')][_0x589c('0x41')]>0x0){_0x21597d=_0x329a3c[_0x589c('0x23')];}console[_0x589c('0xa6')](_0x589c('0xa7'),_0x21597d);_0x138dce=[];_0x583951=Object[_0x589c('0xa8')]([],_0x21597d);_[_0x589c('0xa9')](_0x583951,function(_0xf328bf){return!_0x2b8022['includes'](_0xf328bf[_0x589c('0x33')]);});_0x583951[_0x589c('0xaa')](function(_0x49b7a7){var _0x57cfad=createFieldObject(_0x55215a,_0xeb3100,_0x49b7a7[_0x589c('0xab')],_0x49b7a7[_0x589c('0x33')],_0x49b7a7[_0x589c('0xac')],![]);_0x138dce[_0x589c('0xad')](_0x57cfad);});return Promise[_0x589c('0xae')](_0x138dce);})[_0x589c('0x1b')](function(_0x27fa14){_0x3f2ca8=_0x27fa14;_0xf0b29c=Object[_0x589c('0xa8')]([],_0x21597d);console[_0x589c('0xa6')]('TCL:\x20_object',_0x21597d);_[_0x589c('0xa9')](_0xf0b29c,function(_0x374340){return _0x575b2a['includes'](_0x374340[_0x589c('0x33')]);});console[_0x589c('0xa6')](_0x589c('0xaf'),_0xf0b29c);_0x138dce=[];_0xf0b29c[_0x589c('0xaa')](function(_0x120517){var _0x370ea6=createFieldObject(_0x55215a,_0xeb3100,_0x120517[_0x589c('0xab')],_0x120517[_0x589c('0x33')],_0x120517[_0x589c('0xac')],!![]);_0x138dce[_0x589c('0xad')](_0x370ea6);});return Promise[_0x589c('0xae')](_0x138dce);})['then'](function(_0xaea285){_0x1c850f=_0xaea285;var _0x12ac0d=_0x3f2ca8[_0x589c('0xb0')](_0x1c850f);return{'count':_0x12ac0d[_0x589c('0x41')],'rows':_0x12ac0d};})[_0x589c('0x1b')](respondWithResult(_0x1be37f,null))[_0x589c('0x24')](function(_0x2f3b88){console[_0x589c('0xa6')](_0x589c('0xb1')+_0x2f3b88);var _0x4780ba=_0x209a5e[_0x589c('0x3c')]['test']?0x1f4:_0x2f3b88['statusCode']||0x1f4;logger[_0x589c('0x20')](_0x2f3b88[_0x589c('0x32')]);delete _0x2f3b88[_0x589c('0x33')];if(_0x4780ba===0x191){_0x4780ba=0x190;}_0x1be37f[_0x589c('0x2c')](_0x4780ba)[_0x589c('0x34')](_0x209a5e['query']['test']?{'message':_0x589c('0xb2'),'statusCode':_0x2f3b88[_0x589c('0xb3')]}:_0x2f3b88);});};function createFieldObject(_0x3ff968,_0x111a13,_0x5f5b2c,_0x55ab4c,_0x17e49a,_0x1169cd){return new Promise(function(_0x7fae75,_0x26ceee){var _0x1848a9={'id':_0x55ab4c,'name':_0x17e49a,'custom':_0x1169cd};if(_0x5f5b2c==='boolean'){_0x1848a9[_0x589c('0x4b')]=[{'name':_0x589c('0xb4'),'value':_0x589c('0xb5')},{'name':_0x589c('0xb6'),'value':'false'}];_0x7fae75(_0x1848a9);}else{var _0x3f5793={'method':_0x589c('0xb7'),'uri':_0x3ff968+_0x589c('0xb8')+_0x55ab4c,'auth':_0x111a13,'json':!![]};return rp(_0x3f5793)[_0x589c('0x1b')](function(_0x196858){var _0x29b287=[];if(_0x196858[_0x589c('0x23')][_0x589c('0x41')]>0x0){_0x196858[_0x589c('0x23')][_0x589c('0xaa')](function(_0x2e056d){if(_0x2e056d[_0x589c('0xb9')]===_0x589c('0xba')){var _0x38113f={'name':_0x2e056d[_0x589c('0xac')],'value':_0x2e056d[_0x589c('0xbb')]};_0x29b287[_0x589c('0xad')](_0x38113f);}});}_0x1848a9[_0x589c('0x4b')]=_0x29b287;if(_0x1848a9['options'][_0x589c('0x41')]>0x0){_0x7fae75(_0x1848a9);}else{if(_0x1169cd==![]){_0x7fae75();}else{_0x7fae75(_0x1848a9);}}});}});} \ No newline at end of file diff --git a/server/api/intServicenowAccount/intServicenowAccount.model.js b/server/api/intServicenowAccount/intServicenowAccount.model.js index 2e0d362..dd415ce 100644 --- a/server/api/intServicenowAccount/intServicenowAccount.model.js +++ b/server/api/intServicenowAccount/intServicenowAccount.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5075=['bluebird','request-promise','rimraf','../../config/environment','./intServicenowAccount.attributes','ServicenowAccount','int_servicenow_accounts','lodash','util','../../config/logger','api','moment'];(function(_0x2fbbb3,_0x56fdac){var _0x7e3f04=function(_0x26d794){while(--_0x26d794){_0x2fbbb3['push'](_0x2fbbb3['shift']());}};_0x7e3f04(++_0x56fdac);}(_0x5075,0x73));var _0x5507=function(_0x4a3b02,_0x3f5b31){_0x4a3b02=_0x4a3b02-0x0;var _0x40d53c=_0x5075[_0x4a3b02];return _0x40d53c;};'use strict';var _=require(_0x5507('0x0'));var util=require(_0x5507('0x1'));var logger=require(_0x5507('0x2'))(_0x5507('0x3'));var moment=require(_0x5507('0x4'));var BPromise=require(_0x5507('0x5'));var rp=require(_0x5507('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0x5507('0x7'));var config=require(_0x5507('0x8'));var attributes=require(_0x5507('0x9'));var integrations=require('../../components/integrations/configuration');module['exports']=function(_0x2cd9ee,_0x773559){return _0x2cd9ee['define'](_0x5507('0xa'),attributes,{'tableName':_0x5507('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x7fbe=['moment','bluebird','request-promise','path','rimraf','../../config/environment','./intServicenowAccount.attributes','../../components/integrations/configuration','exports','define','int_servicenow_accounts','../../config/logger','api'];(function(_0x16ea87,_0x378d8b){var _0x6e7b1c=function(_0x26306e){while(--_0x26306e){_0x16ea87['push'](_0x16ea87['shift']());}};_0x6e7b1c(++_0x378d8b);}(_0x7fbe,0x1ec));var _0xe7fb=function(_0x3f5bf5,_0x498786){_0x3f5bf5=_0x3f5bf5-0x0;var _0x59e229=_0x7fbe[_0x3f5bf5];return _0x59e229;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xe7fb('0x0'))(_0xe7fb('0x1'));var moment=require(_0xe7fb('0x2'));var BPromise=require(_0xe7fb('0x3'));var rp=require(_0xe7fb('0x4'));var fs=require('fs');var path=require(_0xe7fb('0x5'));var rimraf=require(_0xe7fb('0x6'));var config=require(_0xe7fb('0x7'));var attributes=require(_0xe7fb('0x8'));var integrations=require(_0xe7fb('0x9'));module[_0xe7fb('0xa')]=function(_0x12d1b0,_0x24cd67){return _0x12d1b0[_0xe7fb('0xb')]('ServicenowAccount',attributes,{'tableName':_0xe7fb('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intServicenowAccount/intServicenowAccount.rpc.js b/server/api/intServicenowAccount/intServicenowAccount.rpc.js index 27430b1..36adb46 100644 --- a/server/api/intServicenowAccount/intServicenowAccount.rpc.js +++ b/server/api/intServicenowAccount/intServicenowAccount.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x37cb=['util','moment','bluebird','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','client','http','request','then','info','ServicenowAccount,\x20%s,\x20%s','debug','ServicenowAccount,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','findAll','options','where','attributes','limit','include','map','model','GetServicenowAccount','ShowServicenowAccount','ServicenowAccount','find','raw','lodash'];(function(_0x167cc1,_0x56ef5a){var _0x10bc4b=function(_0xd6a255){while(--_0xd6a255){_0x167cc1['push'](_0x167cc1['shift']());}};_0x10bc4b(++_0x56ef5a);}(_0x37cb,0x1bb));var _0xb37c=function(_0x1b6c6d,_0x2983b0){_0x1b6c6d=_0x1b6c6d-0x0;var _0x290d9d=_0x37cb[_0x1b6c6d];return _0x290d9d;};'use strict';var _=require(_0xb37c('0x0'));var util=require(_0xb37c('0x1'));var moment=require(_0xb37c('0x2'));var BPromise=require(_0xb37c('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xb37c('0x4'));var db=require(_0xb37c('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xb37c('0x6'));var config=require(_0xb37c('0x7'));var jayson=require(_0xb37c('0x8'));var client=jayson[_0xb37c('0x9')][_0xb37c('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x4ce987,_0x56acf6,_0x98fd45){return new BPromise(function(_0x4be321,_0x210d4e){return client[_0xb37c('0xb')](_0x4ce987,_0x98fd45)[_0xb37c('0xc')](function(_0x36ec07){logger[_0xb37c('0xd')](_0xb37c('0xe'),_0x56acf6,'request\x20sent');logger[_0xb37c('0xf')](_0xb37c('0x10'),_0x56acf6,_0xb37c('0x11'),JSON[_0xb37c('0x12')](_0x36ec07));if(_0x36ec07[_0xb37c('0x13')]){if(_0x36ec07[_0xb37c('0x13')][_0xb37c('0x14')]===0x1f4){logger[_0xb37c('0x13')](_0xb37c('0xe'),_0x56acf6,_0x36ec07[_0xb37c('0x13')][_0xb37c('0x15')]);return _0x210d4e(_0x36ec07[_0xb37c('0x13')][_0xb37c('0x15')]);}logger['error'](_0xb37c('0xe'),_0x56acf6,_0x36ec07[_0xb37c('0x13')][_0xb37c('0x15')]);return _0x4be321(_0x36ec07[_0xb37c('0x13')][_0xb37c('0x15')]);}else{logger[_0xb37c('0xd')](_0xb37c('0xe'),_0x56acf6,_0xb37c('0x11'));_0x4be321(_0x36ec07[_0xb37c('0x16')][_0xb37c('0x15')]);}})[_0xb37c('0x17')](function(_0x5da796){logger[_0xb37c('0x13')](_0xb37c('0xe'),_0x56acf6,_0x5da796);_0x210d4e(_0x5da796);});});}exports['GetServicenowAccount']=function(_0x201313){var _0x25dbcf=this;return new Promise(function(_0x3dd489,_0x552165){return db['ServicenowAccount'][_0xb37c('0x18')]({'raw':_0x201313[_0xb37c('0x19')]?_0x201313[_0xb37c('0x19')]['raw']===undefined?!![]:![]:!![],'where':_0x201313[_0xb37c('0x19')]?_0x201313[_0xb37c('0x19')][_0xb37c('0x1a')]||null:null,'attributes':_0x201313[_0xb37c('0x19')]?_0x201313['options'][_0xb37c('0x1b')]||null:null,'limit':_0x201313[_0xb37c('0x19')]?_0x201313[_0xb37c('0x19')][_0xb37c('0x1c')]||null:null,'include':_0x201313[_0xb37c('0x19')]?_0x201313['options'][_0xb37c('0x1d')]?_[_0xb37c('0x1e')](_0x201313[_0xb37c('0x19')][_0xb37c('0x1d')],function(_0x52d949){return{'model':db[_0x52d949[_0xb37c('0x1f')]],'as':_0x52d949['as'],'attributes':_0x52d949[_0xb37c('0x1b')],'include':_0x52d949[_0xb37c('0x1d')]?_[_0xb37c('0x1e')](_0x52d949[_0xb37c('0x1d')],function(_0x167a39){return{'model':db[_0x167a39['model']],'as':_0x167a39['as'],'attributes':_0x167a39[_0xb37c('0x1b')],'include':_0x167a39['include']?_['map'](_0x167a39[_0xb37c('0x1d')],function(_0x883f5){return{'model':db[_0x883f5['model']],'as':_0x883f5['as'],'attributes':_0x883f5[_0xb37c('0x1b')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x14283e){logger[_0xb37c('0xd')]('GetServicenowAccount',_0x201313);logger[_0xb37c('0xf')](_0xb37c('0x20'),_0x201313,JSON[_0xb37c('0x12')](_0x14283e));_0x3dd489(_0x14283e);})[_0xb37c('0x17')](function(_0x114a1a){logger[_0xb37c('0x13')](_0xb37c('0x20'),_0x114a1a[_0xb37c('0x15')],_0x201313);_0x552165(_0x25dbcf['error'](0x1f4,_0x114a1a[_0xb37c('0x15')]));});});};exports[_0xb37c('0x21')]=function(_0x30b150){var _0x150f8b=this;return new Promise(function(_0x224bae,_0x4d43a3){return db[_0xb37c('0x22')][_0xb37c('0x23')]({'raw':_0x30b150['options']?_0x30b150[_0xb37c('0x19')][_0xb37c('0x24')]===undefined?!![]:![]:!![],'where':_0x30b150[_0xb37c('0x19')]?_0x30b150[_0xb37c('0x19')][_0xb37c('0x1a')]||null:null,'attributes':_0x30b150[_0xb37c('0x19')]?_0x30b150[_0xb37c('0x19')][_0xb37c('0x1b')]||null:null,'include':_0x30b150[_0xb37c('0x19')]?_0x30b150['options'][_0xb37c('0x1d')]?_['map'](_0x30b150[_0xb37c('0x19')]['include'],function(_0x30f4de){return{'model':db[_0x30f4de[_0xb37c('0x1f')]],'as':_0x30f4de['as'],'attributes':_0x30f4de[_0xb37c('0x1b')],'include':_0x30f4de[_0xb37c('0x1d')]?_['map'](_0x30f4de[_0xb37c('0x1d')],function(_0x5d39cb){return{'model':db[_0x5d39cb['model']],'as':_0x5d39cb['as'],'attributes':_0x5d39cb['attributes'],'include':_0x5d39cb[_0xb37c('0x1d')]?_[_0xb37c('0x1e')](_0x5d39cb[_0xb37c('0x1d')],function(_0x52ac80){return{'model':db[_0x52ac80['model']],'as':_0x52ac80['as'],'attributes':_0x52ac80['attributes']};}):[]};}):[]};}):[]:[]})[_0xb37c('0xc')](function(_0x432971){logger[_0xb37c('0xd')]('ShowServicenowAccount',_0x30b150);logger[_0xb37c('0xf')](_0xb37c('0x21'),_0x30b150,JSON[_0xb37c('0x12')](_0x432971));_0x224bae(_0x432971);})['catch'](function(_0x26c856){logger['error'](_0xb37c('0x21'),_0x26c856[_0xb37c('0x15')],_0x30b150);_0x4d43a3(_0x150f8b['error'](0x1f4,_0x26c856[_0xb37c('0x15')]));});});}; \ No newline at end of file +var _0xdb32=['ServicenowAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','findAll','options','limit','include','map','model','attributes','then','GetServicenowAccount','ShowServicenowAccount','find','where','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','http','request','info','ServicenowAccount,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x35000d,_0xc8945c){var _0x2b856f=function(_0x3d8eb2){while(--_0x3d8eb2){_0x35000d['push'](_0x35000d['shift']());}};_0x2b856f(++_0xc8945c);}(_0xdb32,0x7b));var _0x2db3=function(_0x4e7fcb,_0x590ea7){_0x4e7fcb=_0x4e7fcb-0x0;var _0x2775df=_0xdb32[_0x4e7fcb];return _0x2775df;};'use strict';var _=require(_0x2db3('0x0'));var util=require(_0x2db3('0x1'));var moment=require(_0x2db3('0x2'));var BPromise=require(_0x2db3('0x3'));var rs=require(_0x2db3('0x4'));var fs=require('fs');var Redis=require(_0x2db3('0x5'));var db=require(_0x2db3('0x6'))['db'];var utils=require(_0x2db3('0x7'));var logger=require(_0x2db3('0x8'))(_0x2db3('0x9'));var config=require(_0x2db3('0xa'));var jayson=require('jayson/promise');var client=jayson['client'][_0x2db3('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x2eed2f,_0x28f841,_0x466dac){return new BPromise(function(_0x1dace5,_0x45b763){return client[_0x2db3('0xc')](_0x2eed2f,_0x466dac)['then'](function(_0x11dfda){logger[_0x2db3('0xd')](_0x2db3('0xe'),_0x28f841,_0x2db3('0xf'));logger[_0x2db3('0x10')](_0x2db3('0x11'),_0x28f841,'request\x20sent',JSON[_0x2db3('0x12')](_0x11dfda));if(_0x11dfda[_0x2db3('0x13')]){if(_0x11dfda[_0x2db3('0x13')][_0x2db3('0x14')]===0x1f4){logger[_0x2db3('0x13')](_0x2db3('0xe'),_0x28f841,_0x11dfda['error']['message']);return _0x45b763(_0x11dfda[_0x2db3('0x13')][_0x2db3('0x15')]);}logger[_0x2db3('0x13')]('ServicenowAccount,\x20%s,\x20%s',_0x28f841,_0x11dfda[_0x2db3('0x13')][_0x2db3('0x15')]);return _0x1dace5(_0x11dfda['error']['message']);}else{logger[_0x2db3('0xd')](_0x2db3('0xe'),_0x28f841,_0x2db3('0xf'));_0x1dace5(_0x11dfda['result']['message']);}})[_0x2db3('0x16')](function(_0x1df4ee){logger[_0x2db3('0x13')](_0x2db3('0xe'),_0x28f841,_0x1df4ee);_0x45b763(_0x1df4ee);});});}exports['GetServicenowAccount']=function(_0x4b6bec){var _0x1f0835=this;return new Promise(function(_0x196bf2,_0x38cb52){return db['ServicenowAccount'][_0x2db3('0x17')]({'raw':_0x4b6bec[_0x2db3('0x18')]?_0x4b6bec[_0x2db3('0x18')]['raw']===undefined?!![]:![]:!![],'where':_0x4b6bec[_0x2db3('0x18')]?_0x4b6bec[_0x2db3('0x18')]['where']||null:null,'attributes':_0x4b6bec[_0x2db3('0x18')]?_0x4b6bec['options']['attributes']||null:null,'limit':_0x4b6bec[_0x2db3('0x18')]?_0x4b6bec[_0x2db3('0x18')][_0x2db3('0x19')]||null:null,'include':_0x4b6bec['options']?_0x4b6bec[_0x2db3('0x18')][_0x2db3('0x1a')]?_[_0x2db3('0x1b')](_0x4b6bec['options'][_0x2db3('0x1a')],function(_0x3de076){return{'model':db[_0x3de076[_0x2db3('0x1c')]],'as':_0x3de076['as'],'attributes':_0x3de076['attributes'],'include':_0x3de076['include']?_[_0x2db3('0x1b')](_0x3de076[_0x2db3('0x1a')],function(_0x68ef4b){return{'model':db[_0x68ef4b[_0x2db3('0x1c')]],'as':_0x68ef4b['as'],'attributes':_0x68ef4b['attributes'],'include':_0x68ef4b[_0x2db3('0x1a')]?_[_0x2db3('0x1b')](_0x68ef4b[_0x2db3('0x1a')],function(_0x454585){return{'model':db[_0x454585[_0x2db3('0x1c')]],'as':_0x454585['as'],'attributes':_0x454585[_0x2db3('0x1d')]};}):[]};}):[]};}):[]:[]})[_0x2db3('0x1e')](function(_0x3e45a4){logger[_0x2db3('0xd')](_0x2db3('0x1f'),_0x4b6bec);logger[_0x2db3('0x10')](_0x2db3('0x1f'),_0x4b6bec,JSON[_0x2db3('0x12')](_0x3e45a4));_0x196bf2(_0x3e45a4);})['catch'](function(_0x4e792b){logger['error'](_0x2db3('0x1f'),_0x4e792b[_0x2db3('0x15')],_0x4b6bec);_0x38cb52(_0x1f0835['error'](0x1f4,_0x4e792b['message']));});});};exports[_0x2db3('0x20')]=function(_0x277602){var _0x26bf4c=this;return new Promise(function(_0x362911,_0x598188){return db['ServicenowAccount'][_0x2db3('0x21')]({'raw':_0x277602[_0x2db3('0x18')]?_0x277602[_0x2db3('0x18')]['raw']===undefined?!![]:![]:!![],'where':_0x277602[_0x2db3('0x18')]?_0x277602[_0x2db3('0x18')][_0x2db3('0x22')]||null:null,'attributes':_0x277602[_0x2db3('0x18')]?_0x277602[_0x2db3('0x18')][_0x2db3('0x1d')]||null:null,'include':_0x277602[_0x2db3('0x18')]?_0x277602[_0x2db3('0x18')]['include']?_[_0x2db3('0x1b')](_0x277602[_0x2db3('0x18')]['include'],function(_0x31567f){return{'model':db[_0x31567f['model']],'as':_0x31567f['as'],'attributes':_0x31567f[_0x2db3('0x1d')],'include':_0x31567f[_0x2db3('0x1a')]?_[_0x2db3('0x1b')](_0x31567f['include'],function(_0x1efe2c){return{'model':db[_0x1efe2c['model']],'as':_0x1efe2c['as'],'attributes':_0x1efe2c[_0x2db3('0x1d')],'include':_0x1efe2c['include']?_[_0x2db3('0x1b')](_0x1efe2c[_0x2db3('0x1a')],function(_0x3fe337){return{'model':db[_0x3fe337[_0x2db3('0x1c')]],'as':_0x3fe337['as'],'attributes':_0x3fe337[_0x2db3('0x1d')]};}):[]};}):[]};}):[]:[]})[_0x2db3('0x1e')](function(_0x5996a3){logger['info']('ShowServicenowAccount',_0x277602);logger['debug'](_0x2db3('0x20'),_0x277602,JSON['stringify'](_0x5996a3));_0x362911(_0x5996a3);})[_0x2db3('0x16')](function(_0x5a30ca){logger[_0x2db3('0x13')](_0x2db3('0x20'),_0x5a30ca[_0x2db3('0x15')],_0x277602);_0x598188(_0x26bf4c['error'](0x1f4,_0x5a30ca[_0x2db3('0x15')]));});});}; \ No newline at end of file diff --git a/server/api/intServicenowConfiguration/index.js b/server/api/intServicenowConfiguration/index.js index 08f8d48..5a97fc5 100644 --- a/server/api/intServicenowConfiguration/index.js +++ b/server/api/intServicenowConfiguration/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9db3=['../../config/environment','./intServicenowConfiguration.controller','get','isAuthenticated','index','/:id/fields','/:id/subjects','getSubjects','/:id/descriptions','getDescriptions','create','put','delete','/:id','destroy','exports','multer','path','express','Router','../../components/auth/service','../../components/interaction/service'];(function(_0x5e410d,_0x4eaf38){var _0xa97676=function(_0x18d8c8){while(--_0x18d8c8){_0x5e410d['push'](_0x5e410d['shift']());}};_0xa97676(++_0x4eaf38);}(_0x9db3,0x68));var _0x39db=function(_0x59ee6f,_0x450239){_0x59ee6f=_0x59ee6f-0x0;var _0x4c0979=_0x9db3[_0x59ee6f];return _0x4c0979;};'use strict';var multer=require(_0x39db('0x0'));var util=require('util');var path=require(_0x39db('0x1'));var timeout=require('connect-timeout');var express=require(_0x39db('0x2'));var router=express[_0x39db('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x39db('0x4'));var interaction=require(_0x39db('0x5'));var config=require(_0x39db('0x6'));var controller=require(_0x39db('0x7'));router[_0x39db('0x8')]('/',auth[_0x39db('0x9')](),controller[_0x39db('0xa')]);router[_0x39db('0x8')]('/:id',auth[_0x39db('0x9')](),controller['show']);router[_0x39db('0x8')](_0x39db('0xb'),auth[_0x39db('0x9')](),controller['getFields']);router[_0x39db('0x8')](_0x39db('0xc'),auth[_0x39db('0x9')](),controller[_0x39db('0xd')]);router['get'](_0x39db('0xe'),auth[_0x39db('0x9')](),controller[_0x39db('0xf')]);router['post']('/',auth['isAuthenticated'](),controller[_0x39db('0x10')]);router[_0x39db('0x11')]('/:id',auth['isAuthenticated'](),controller['update']);router[_0x39db('0x12')](_0x39db('0x13'),auth[_0x39db('0x9')](),controller[_0x39db('0x14')]);module[_0x39db('0x15')]=router; \ No newline at end of file +var _0xc3b9=['delete','destroy','multer','util','path','connect-timeout','express','Router','../../components/interaction/service','./intServicenowConfiguration.controller','get','index','/:id','isAuthenticated','show','/:id/fields','getFields','/:id/subjects','/:id/descriptions','getDescriptions','post','create','put','update'];(function(_0x200939,_0xea7f19){var _0x38886c=function(_0x14476c){while(--_0x14476c){_0x200939['push'](_0x200939['shift']());}};_0x38886c(++_0xea7f19);}(_0xc3b9,0x19a));var _0x9c3b=function(_0x3d4876,_0x366386){_0x3d4876=_0x3d4876-0x0;var _0x58ca9d=_0xc3b9[_0x3d4876];return _0x58ca9d;};'use strict';var multer=require(_0x9c3b('0x0'));var util=require(_0x9c3b('0x1'));var path=require(_0x9c3b('0x2'));var timeout=require(_0x9c3b('0x3'));var express=require(_0x9c3b('0x4'));var router=express[_0x9c3b('0x5')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0x9c3b('0x6'));var config=require('../../config/environment');var controller=require(_0x9c3b('0x7'));router[_0x9c3b('0x8')]('/',auth['isAuthenticated'](),controller[_0x9c3b('0x9')]);router[_0x9c3b('0x8')](_0x9c3b('0xa'),auth[_0x9c3b('0xb')](),controller[_0x9c3b('0xc')]);router[_0x9c3b('0x8')](_0x9c3b('0xd'),auth[_0x9c3b('0xb')](),controller[_0x9c3b('0xe')]);router['get'](_0x9c3b('0xf'),auth[_0x9c3b('0xb')](),controller['getSubjects']);router[_0x9c3b('0x8')](_0x9c3b('0x10'),auth[_0x9c3b('0xb')](),controller[_0x9c3b('0x11')]);router[_0x9c3b('0x12')]('/',auth[_0x9c3b('0xb')](),controller[_0x9c3b('0x13')]);router[_0x9c3b('0x14')](_0x9c3b('0xa'),auth[_0x9c3b('0xb')](),controller[_0x9c3b('0x15')]);router[_0x9c3b('0x16')]('/:id',auth[_0x9c3b('0xb')](),controller[_0x9c3b('0x17')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/intServicenowConfiguration/intServicenowConfiguration.attributes.js b/server/api/intServicenowConfiguration/intServicenowConfiguration.attributes.js index 99306d0..de97293 100644 --- a/server/api/intServicenowConfiguration/intServicenowConfiguration.attributes.js +++ b/server/api/intServicenowConfiguration/intServicenowConfiguration.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb14e=['STRING','sequelize','exports'];(function(_0x36f7e1,_0x547c1f){var _0x12486f=function(_0xd60538){while(--_0xd60538){_0x36f7e1['push'](_0x36f7e1['shift']());}};_0x12486f(++_0x547c1f);}(_0xb14e,0x15d));var _0xeb14=function(_0x34f792,_0xb32088){_0x34f792=_0x34f792-0x0;var _0x379019=_0xb14e[_0x34f792];return _0x379019;};'use strict';var Sequelize=require(_0xeb14('0x0'));module[_0xeb14('0x1')]={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0xeb14('0x2')]}}; \ No newline at end of file +var _0x7c7c=['STRING','sequelize','exports'];(function(_0x498d3d,_0x308a98){var _0x217c23=function(_0x4a20c5){while(--_0x4a20c5){_0x498d3d['push'](_0x498d3d['shift']());}};_0x217c23(++_0x308a98);}(_0x7c7c,0x100));var _0xc7c7=function(_0x7d163d,_0x4cf14b){_0x7d163d=_0x7d163d-0x0;var _0x108980=_0x7c7c[_0x7d163d];return _0x108980;};'use strict';var Sequelize=require(_0xc7c7('0x0'));module[_0xc7c7('0x1')]={'name':{'type':Sequelize[_0xc7c7('0x2')]},'description':{'type':Sequelize[_0xc7c7('0x2')]}}; \ No newline at end of file diff --git a/server/api/intServicenowConfiguration/intServicenowConfiguration.controller.js b/server/api/intServicenowConfiguration/intServicenowConfiguration.controller.js index ca11207..12e350e 100644 --- a/server/api/intServicenowConfiguration/intServicenowConfiguration.controller.js +++ b/server/api/intServicenowConfiguration/intServicenowConfiguration.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xaae2=['query','keys','intersection','fields','attributes','length','model','nolimit','order','sort','filters','pick','where','merge','VIRTUAL','ServicenowConfiguration','include','findAll','show','params','rawAttributes','includeAll','options','create','body','destroy','findOne','filter','getFields','hasOwnProperty','getSubjects','ServicenowField','getDescriptions','eml-format','rimraf','zip-dir','request-promise','moment','mustache','sox','to-csv','ejs','fs-extra','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','jayson/promise','http','request','info','debug','ServicenowConfiguration,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','ServicenowConfiguration,\x20%s,\x20%s','result','catch','sendStatus','end','status','json','offset','undefined','limit','count','set','Content-Range','apply','save','update','then','stack','name','index','map','fieldName','type'];(function(_0x2ae11c,_0x4137a1){var _0x17dd87=function(_0xa1b56c){while(--_0xa1b56c){_0x2ae11c['push'](_0x2ae11c['shift']());}};_0x17dd87(++_0x4137a1);}(_0xaae2,0x7a));var _0x2aae=function(_0x32f6ac,_0xd10b8f){_0x32f6ac=_0x32f6ac-0x0;var _0x3ad85c=_0xaae2[_0x32f6ac];return _0x3ad85c;};'use strict';var emlformat=require(_0x2aae('0x0'));var rimraf=require(_0x2aae('0x1'));var zipdir=require(_0x2aae('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x2aae('0x3'));var moment=require(_0x2aae('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x2aae('0x5'));var util=require('util');var path=require('path');var sox=require(_0x2aae('0x6'));var csv=require(_0x2aae('0x7'));var ejs=require(_0x2aae('0x8'));var fs=require('fs');var fs_extra=require(_0x2aae('0x9'));var _=require('lodash');var squel=require(_0x2aae('0xa'));var crypto=require(_0x2aae('0xb'));var jsforce=require(_0x2aae('0xc'));var deskjs=require(_0x2aae('0xd'));var toCsv=require('to-csv');var querystring=require(_0x2aae('0xe'));var Papa=require(_0x2aae('0xf'));var Redis=require(_0x2aae('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x2aae('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x2aae('0x12'))(_0x2aae('0x13'));var utils=require(_0x2aae('0x14'));var config=require('../../config/environment');var licenseUtil=require(_0x2aae('0x15'));var db=require(_0x2aae('0x16'))['db'];var jayson=require(_0x2aae('0x17'));var client=jayson['client'][_0x2aae('0x18')]({'port':0x232a});function respondWithRpcPromise(_0x9ff483,_0x5ecf7f,_0x352b52,_0x3550ef){return new BPromise(function(_0x49f7c3,_0x1498c7){var _0x159932=_0x3550ef||client;return _0x159932[_0x2aae('0x19')](_0x9ff483,_0x352b52)['then'](function(_0x279c97){logger[_0x2aae('0x1a')]('ServicenowConfiguration,\x20%s,\x20%s',_0x5ecf7f,'request\x20sent');logger[_0x2aae('0x1b')](_0x2aae('0x1c'),_0x5ecf7f,_0x2aae('0x1d'),JSON['stringify'](_0x279c97));if(_0x279c97[_0x2aae('0x1e')]){if(_0x279c97['error'][_0x2aae('0x1f')]===0x1f4){logger[_0x2aae('0x1e')]('ServicenowConfiguration,\x20%s,\x20%s',_0x5ecf7f,_0x279c97[_0x2aae('0x1e')][_0x2aae('0x20')]);return _0x1498c7(_0x279c97[_0x2aae('0x1e')][_0x2aae('0x20')]);}logger['error'](_0x2aae('0x21'),_0x5ecf7f,_0x279c97['error'][_0x2aae('0x20')]);return _0x49f7c3(_0x279c97[_0x2aae('0x1e')][_0x2aae('0x20')]);}else{logger[_0x2aae('0x1a')]('ServicenowConfiguration,\x20%s,\x20%s',_0x5ecf7f,'request\x20sent');_0x49f7c3(_0x279c97[_0x2aae('0x22')][_0x2aae('0x20')]);}})[_0x2aae('0x23')](function(_0x2fab68){logger[_0x2aae('0x1e')](_0x2aae('0x21'),_0x5ecf7f,_0x2fab68);_0x1498c7(_0x2fab68);});});}function respondWithStatusCode(_0x174173,_0x3aed20){_0x3aed20=_0x3aed20||0xcc;return function(_0x406544){if(_0x406544){return _0x174173[_0x2aae('0x24')](_0x3aed20);}return _0x174173['status'](_0x3aed20)[_0x2aae('0x25')]();};}function respondWithResult(_0x42ff0b,_0x24ae66){_0x24ae66=_0x24ae66||0xc8;return function(_0x21bab7){if(_0x21bab7){return _0x42ff0b[_0x2aae('0x26')](_0x24ae66)[_0x2aae('0x27')](_0x21bab7);}};}function respondWithFilteredResult(_0x26413d,_0x3745d1){return function(_0xcce384){if(_0xcce384){var _0x420cfb=typeof _0x3745d1[_0x2aae('0x28')]===_0x2aae('0x29')&&typeof _0x3745d1[_0x2aae('0x2a')]==='undefined';var _0x5e5eb2=_0xcce384[_0x2aae('0x2b')];var _0xceac89=_0x420cfb?0x0:_0x3745d1[_0x2aae('0x28')];var _0x91e9bc=_0x420cfb?_0xcce384['count']:_0x3745d1[_0x2aae('0x28')]+_0x3745d1[_0x2aae('0x2a')];var _0x59a442;if(_0x91e9bc>=_0x5e5eb2){_0x91e9bc=_0x5e5eb2;_0x59a442=0xc8;}else{_0x59a442=0xce;}_0x26413d[_0x2aae('0x26')](_0x59a442);return _0x26413d[_0x2aae('0x2c')](_0x2aae('0x2d'),_0xceac89+'-'+_0x91e9bc+'/'+_0x5e5eb2)[_0x2aae('0x27')](_0xcce384);}return null;};}function patchUpdates(_0x24af65){return function(_0x18a86e){try{jsonpatch[_0x2aae('0x2e')](_0x18a86e,_0x24af65,!![]);}catch(_0x3c9b6f){return BPromise['reject'](_0x3c9b6f);}return _0x18a86e[_0x2aae('0x2f')]();};}function saveUpdates(_0x53c2d6,_0x5ef222){return function(_0x3a7faf){if(_0x3a7faf){return _0x3a7faf[_0x2aae('0x30')](_0x53c2d6)[_0x2aae('0x31')](function(_0x30d120){return _0x30d120;});}return null;};}function removeEntity(_0x2a6a06,_0x652448){return function(_0x49e532){if(_0x49e532){return _0x49e532['destroy']()[_0x2aae('0x31')](function(){_0x2a6a06[_0x2aae('0x26')](0xcc)[_0x2aae('0x25')]();});}};}function handleEntityNotFound(_0x4a48c2,_0x50b395){return function(_0x18676a){if(!_0x18676a){_0x4a48c2[_0x2aae('0x24')](0x194);}return _0x18676a;};}function handleError(_0xeed1e7,_0x30a05b){_0x30a05b=_0x30a05b||0x1f4;return function(_0xf7a2f7){logger[_0x2aae('0x1e')](_0xf7a2f7[_0x2aae('0x32')]);if(_0xf7a2f7[_0x2aae('0x33')]){delete _0xf7a2f7[_0x2aae('0x33')];}_0xeed1e7[_0x2aae('0x26')](_0x30a05b)['send'](_0xf7a2f7);};}exports[_0x2aae('0x34')]=function(_0x47f59e,_0x3f92a1){var _0x38fea6={},_0x474e93={},_0x319fc7={'count':0x0,'rows':[]};var _0x5cb2fa=_[_0x2aae('0x35')](db['ServicenowConfiguration']['rawAttributes'],function(_0x54cc04){return{'name':_0x54cc04[_0x2aae('0x36')],'type':_0x54cc04[_0x2aae('0x37')]['key']};});_0x474e93['model']=_['map'](_0x5cb2fa,_0x2aae('0x33'));_0x474e93[_0x2aae('0x38')]=_[_0x2aae('0x39')](_0x47f59e[_0x2aae('0x38')]);_0x474e93['filters']=_[_0x2aae('0x3a')](_0x474e93['model'],_0x474e93[_0x2aae('0x38')]);_0x38fea6['attributes']=_['intersection'](_0x474e93['model'],qs[_0x2aae('0x3b')](_0x47f59e[_0x2aae('0x38')]['fields']));_0x38fea6[_0x2aae('0x3c')]=_0x38fea6['attributes'][_0x2aae('0x3d')]?_0x38fea6[_0x2aae('0x3c')]:_0x474e93[_0x2aae('0x3e')];if(!_0x47f59e['query']['hasOwnProperty'](_0x2aae('0x3f'))){_0x38fea6['limit']=qs[_0x2aae('0x2a')](_0x47f59e[_0x2aae('0x38')][_0x2aae('0x2a')]);_0x38fea6[_0x2aae('0x28')]=qs['offset'](_0x47f59e['query'][_0x2aae('0x28')]);}_0x38fea6[_0x2aae('0x40')]=qs[_0x2aae('0x41')](_0x47f59e['query'][_0x2aae('0x41')]);_0x38fea6['where']=qs[_0x2aae('0x42')](_[_0x2aae('0x43')](_0x47f59e[_0x2aae('0x38')],_0x474e93[_0x2aae('0x42')]),_0x5cb2fa);if(_0x47f59e[_0x2aae('0x38')]['filter']){_0x38fea6[_0x2aae('0x44')]=_[_0x2aae('0x45')](_0x38fea6[_0x2aae('0x44')],{'$or':_[_0x2aae('0x35')](_0x5cb2fa,function(_0x59825f){if(_0x59825f[_0x2aae('0x37')]!==_0x2aae('0x46')){var _0x5a7376={};_0x5a7376[_0x59825f[_0x2aae('0x33')]]={'$like':'%'+_0x47f59e[_0x2aae('0x38')]['filter']+'%'};return _0x5a7376;}})});}_0x38fea6=_[_0x2aae('0x45')]({},_0x38fea6,_0x47f59e['options']);var _0x2229a7={'where':_0x38fea6[_0x2aae('0x44')]};return db[_0x2aae('0x47')][_0x2aae('0x2b')](_0x2229a7)[_0x2aae('0x31')](function(_0x15bb52){_0x319fc7[_0x2aae('0x2b')]=_0x15bb52;if(_0x47f59e[_0x2aae('0x38')]['includeAll']){_0x38fea6[_0x2aae('0x48')]=[{'all':!![]}];}return db[_0x2aae('0x47')][_0x2aae('0x49')](_0x38fea6);})[_0x2aae('0x31')](function(_0x5733c9){_0x319fc7['rows']=_0x5733c9;return _0x319fc7;})[_0x2aae('0x31')](respondWithFilteredResult(_0x3f92a1,_0x38fea6))['catch'](handleError(_0x3f92a1,null));};exports[_0x2aae('0x4a')]=function(_0x59f71e,_0x4d52ac){var _0x37e2b4={'raw':![],'where':{'id':_0x59f71e[_0x2aae('0x4b')]['id']}},_0x3c5e19={};_0x3c5e19[_0x2aae('0x3e')]=_[_0x2aae('0x39')](db['ServicenowConfiguration'][_0x2aae('0x4c')]);_0x3c5e19[_0x2aae('0x38')]=_[_0x2aae('0x39')](_0x59f71e[_0x2aae('0x38')]);_0x3c5e19['filters']=_[_0x2aae('0x3a')](_0x3c5e19[_0x2aae('0x3e')],_0x3c5e19['query']);_0x37e2b4['attributes']=_[_0x2aae('0x3a')](_0x3c5e19[_0x2aae('0x3e')],qs[_0x2aae('0x3b')](_0x59f71e[_0x2aae('0x38')][_0x2aae('0x3b')]));_0x37e2b4[_0x2aae('0x3c')]=_0x37e2b4[_0x2aae('0x3c')][_0x2aae('0x3d')]?_0x37e2b4[_0x2aae('0x3c')]:_0x3c5e19[_0x2aae('0x3e')];if(_0x59f71e[_0x2aae('0x38')][_0x2aae('0x4d')]){_0x37e2b4[_0x2aae('0x48')]=[{'all':!![]}];}_0x37e2b4=_['merge']({},_0x37e2b4,_0x59f71e[_0x2aae('0x4e')]);return db[_0x2aae('0x47')]['find'](_0x37e2b4)[_0x2aae('0x31')](handleEntityNotFound(_0x4d52ac,null))['then'](respondWithResult(_0x4d52ac,null))[_0x2aae('0x23')](handleError(_0x4d52ac,null));};exports[_0x2aae('0x4f')]=function(_0x5e6dc1,_0x305e68){return db[_0x2aae('0x47')][_0x2aae('0x4f')](_0x5e6dc1['body'],{})['then'](respondWithResult(_0x305e68,0xc9))[_0x2aae('0x23')](handleError(_0x305e68,null));};exports[_0x2aae('0x30')]=function(_0x185c94,_0xbec9b6){if(_0x185c94[_0x2aae('0x50')]['id']){delete _0x185c94[_0x2aae('0x50')]['id'];}return db[_0x2aae('0x47')]['find']({'where':{'id':_0x185c94[_0x2aae('0x4b')]['id']}})[_0x2aae('0x31')](handleEntityNotFound(_0xbec9b6,null))[_0x2aae('0x31')](saveUpdates(_0x185c94['body'],null))[_0x2aae('0x31')](respondWithResult(_0xbec9b6,null))[_0x2aae('0x23')](handleError(_0xbec9b6,null));};exports[_0x2aae('0x51')]=function(_0x94e3bb,_0x669da8){return db[_0x2aae('0x47')]['find']({'where':{'id':_0x94e3bb[_0x2aae('0x4b')]['id']}})[_0x2aae('0x31')](handleEntityNotFound(_0x669da8,null))[_0x2aae('0x31')](removeEntity(_0x669da8,null))[_0x2aae('0x23')](handleError(_0x669da8,null));};exports['getFields']=function(_0x3f9d3a,_0x353cc9,_0x173986){var _0x5a0385={};var _0xb2bad1={};var _0x1a9450;var _0x4ddb11;return db[_0x2aae('0x47')][_0x2aae('0x52')]({'where':{'id':_0x3f9d3a['params']['id']}})[_0x2aae('0x31')](handleEntityNotFound(_0x353cc9,null))[_0x2aae('0x31')](function(_0x3de58d){if(_0x3de58d){_0x1a9450=_0x3de58d;_0xb2bad1[_0x2aae('0x3e')]=_[_0x2aae('0x39')](db['ServicenowField'][_0x2aae('0x4c')]);_0xb2bad1[_0x2aae('0x38')]=_[_0x2aae('0x39')](_0x3f9d3a[_0x2aae('0x38')]);_0xb2bad1[_0x2aae('0x42')]=_[_0x2aae('0x3a')](_0xb2bad1['model'],_0xb2bad1[_0x2aae('0x38')]);_0x5a0385['attributes']=_['intersection'](_0xb2bad1[_0x2aae('0x3e')],qs[_0x2aae('0x3b')](_0x3f9d3a[_0x2aae('0x38')]['fields']));_0x5a0385[_0x2aae('0x3c')]=_0x5a0385[_0x2aae('0x3c')][_0x2aae('0x3d')]?_0x5a0385[_0x2aae('0x3c')]:_0xb2bad1[_0x2aae('0x3e')];_0x5a0385[_0x2aae('0x40')]=qs[_0x2aae('0x41')](_0x3f9d3a[_0x2aae('0x38')]['sort']);_0x5a0385[_0x2aae('0x44')]=qs[_0x2aae('0x42')](_['pick'](_0x3f9d3a[_0x2aae('0x38')],_0xb2bad1[_0x2aae('0x42')]));if(_0x3f9d3a['query'][_0x2aae('0x53')]){_0x5a0385[_0x2aae('0x44')]=_[_0x2aae('0x45')](_0x5a0385['where'],{'$or':_[_0x2aae('0x35')](_0x5a0385[_0x2aae('0x3c')],function(_0x549c57){var _0x574c29={};_0x574c29[_0x549c57]={'$like':'%'+_0x3f9d3a[_0x2aae('0x38')]['filter']+'%'};return _0x574c29;})});}_0x5a0385=_[_0x2aae('0x45')]({},_0x5a0385,_0x3f9d3a[_0x2aae('0x4e')]);return _0x1a9450[_0x2aae('0x54')](_0x5a0385);}})[_0x2aae('0x31')](function(_0x5c8614){if(_0x5c8614){_0x4ddb11=_0x5c8614[_0x2aae('0x3d')];if(!_0x3f9d3a[_0x2aae('0x38')][_0x2aae('0x55')]('nolimit')){_0x5a0385[_0x2aae('0x2a')]=qs[_0x2aae('0x2a')](_0x3f9d3a[_0x2aae('0x38')][_0x2aae('0x2a')]);_0x5a0385[_0x2aae('0x28')]=qs[_0x2aae('0x28')](_0x3f9d3a[_0x2aae('0x38')][_0x2aae('0x28')]);}return _0x1a9450[_0x2aae('0x54')](_0x5a0385);}})[_0x2aae('0x31')](function(_0x2fa5ff){if(_0x2fa5ff){return _0x2fa5ff?{'count':_0x4ddb11,'rows':_0x2fa5ff}:null;}})['then'](respondWithResult(_0x353cc9,null))[_0x2aae('0x23')](handleError(_0x353cc9,null));};exports['getSubjects']=function(_0x3fc7e4,_0x427756,_0x3831a8){var _0x30eac7={};var _0x54fe3e={};var _0x470c42;var _0x3a09fd;return db[_0x2aae('0x47')][_0x2aae('0x52')]({'where':{'id':_0x3fc7e4[_0x2aae('0x4b')]['id']}})[_0x2aae('0x31')](handleEntityNotFound(_0x427756,null))[_0x2aae('0x31')](function(_0x2760cd){if(_0x2760cd){_0x470c42=_0x2760cd;_0x54fe3e[_0x2aae('0x3e')]=_[_0x2aae('0x39')](db['ServicenowField'][_0x2aae('0x4c')]);_0x54fe3e[_0x2aae('0x38')]=_['keys'](_0x3fc7e4[_0x2aae('0x38')]);_0x54fe3e[_0x2aae('0x42')]=_[_0x2aae('0x3a')](_0x54fe3e[_0x2aae('0x3e')],_0x54fe3e[_0x2aae('0x38')]);_0x30eac7[_0x2aae('0x3c')]=_[_0x2aae('0x3a')](_0x54fe3e['model'],qs[_0x2aae('0x3b')](_0x3fc7e4[_0x2aae('0x38')][_0x2aae('0x3b')]));_0x30eac7[_0x2aae('0x3c')]=_0x30eac7[_0x2aae('0x3c')][_0x2aae('0x3d')]?_0x30eac7[_0x2aae('0x3c')]:_0x54fe3e[_0x2aae('0x3e')];_0x30eac7[_0x2aae('0x40')]=qs[_0x2aae('0x41')](_0x3fc7e4[_0x2aae('0x38')][_0x2aae('0x41')]);_0x30eac7[_0x2aae('0x44')]=qs[_0x2aae('0x42')](_[_0x2aae('0x43')](_0x3fc7e4[_0x2aae('0x38')],_0x54fe3e['filters']));if(_0x3fc7e4[_0x2aae('0x38')]['filter']){_0x30eac7[_0x2aae('0x44')]=_['merge'](_0x30eac7[_0x2aae('0x44')],{'$or':_[_0x2aae('0x35')](_0x30eac7[_0x2aae('0x3c')],function(_0x532bbe){var _0x225e8b={};_0x225e8b[_0x532bbe]={'$like':'%'+_0x3fc7e4[_0x2aae('0x38')][_0x2aae('0x53')]+'%'};return _0x225e8b;})});}_0x30eac7=_[_0x2aae('0x45')]({},_0x30eac7,_0x3fc7e4[_0x2aae('0x4e')]);return _0x470c42[_0x2aae('0x56')](_0x30eac7);}})['then'](function(_0x5844dd){if(_0x5844dd){_0x3a09fd=_0x5844dd[_0x2aae('0x3d')];if(!_0x3fc7e4[_0x2aae('0x38')]['hasOwnProperty'](_0x2aae('0x3f'))){_0x30eac7[_0x2aae('0x2a')]=qs['limit'](_0x3fc7e4[_0x2aae('0x38')][_0x2aae('0x2a')]);_0x30eac7['offset']=qs[_0x2aae('0x28')](_0x3fc7e4[_0x2aae('0x38')][_0x2aae('0x28')]);}return _0x470c42[_0x2aae('0x56')](_0x30eac7);}})[_0x2aae('0x31')](function(_0x2b4e79){if(_0x2b4e79){return _0x2b4e79?{'count':_0x3a09fd,'rows':_0x2b4e79}:null;}})[_0x2aae('0x31')](respondWithResult(_0x427756,null))['catch'](handleError(_0x427756,null));};exports['getDescriptions']=function(_0x454447,_0x507331,_0x244111){var _0x46e003={};var _0x335b7e={};var _0x38ec74;var _0x50798e;return db[_0x2aae('0x47')][_0x2aae('0x52')]({'where':{'id':_0x454447[_0x2aae('0x4b')]['id']}})[_0x2aae('0x31')](handleEntityNotFound(_0x507331,null))[_0x2aae('0x31')](function(_0x44711b){if(_0x44711b){_0x38ec74=_0x44711b;_0x335b7e[_0x2aae('0x3e')]=_['keys'](db[_0x2aae('0x57')]['rawAttributes']);_0x335b7e[_0x2aae('0x38')]=_[_0x2aae('0x39')](_0x454447[_0x2aae('0x38')]);_0x335b7e['filters']=_[_0x2aae('0x3a')](_0x335b7e['model'],_0x335b7e[_0x2aae('0x38')]);_0x46e003[_0x2aae('0x3c')]=_[_0x2aae('0x3a')](_0x335b7e[_0x2aae('0x3e')],qs[_0x2aae('0x3b')](_0x454447[_0x2aae('0x38')][_0x2aae('0x3b')]));_0x46e003[_0x2aae('0x3c')]=_0x46e003[_0x2aae('0x3c')][_0x2aae('0x3d')]?_0x46e003[_0x2aae('0x3c')]:_0x335b7e['model'];_0x46e003['order']=qs[_0x2aae('0x41')](_0x454447[_0x2aae('0x38')][_0x2aae('0x41')]);_0x46e003[_0x2aae('0x44')]=qs[_0x2aae('0x42')](_[_0x2aae('0x43')](_0x454447[_0x2aae('0x38')],_0x335b7e['filters']));if(_0x454447['query']['filter']){_0x46e003[_0x2aae('0x44')]=_[_0x2aae('0x45')](_0x46e003['where'],{'$or':_['map'](_0x46e003[_0x2aae('0x3c')],function(_0x3bb765){var _0x32ad05={};_0x32ad05[_0x3bb765]={'$like':'%'+_0x454447[_0x2aae('0x38')][_0x2aae('0x53')]+'%'};return _0x32ad05;})});}_0x46e003=_[_0x2aae('0x45')]({},_0x46e003,_0x454447['options']);return _0x38ec74[_0x2aae('0x58')](_0x46e003);}})['then'](function(_0x5c2778){if(_0x5c2778){_0x50798e=_0x5c2778[_0x2aae('0x3d')];if(!_0x454447[_0x2aae('0x38')][_0x2aae('0x55')](_0x2aae('0x3f'))){_0x46e003[_0x2aae('0x2a')]=qs[_0x2aae('0x2a')](_0x454447['query'][_0x2aae('0x2a')]);_0x46e003['offset']=qs['offset'](_0x454447[_0x2aae('0x38')][_0x2aae('0x28')]);}return _0x38ec74[_0x2aae('0x58')](_0x46e003);}})['then'](function(_0x48d94b){if(_0x48d94b){return _0x48d94b?{'count':_0x50798e,'rows':_0x48d94b}:null;}})['then'](respondWithResult(_0x507331,null))[_0x2aae('0x23')](handleError(_0x507331,null));}; \ No newline at end of file +var _0xcaba=['ServicenowField','order','pick','hasOwnProperty','getFields','getSubjects','findOne','getDescriptions','eml-format','rimraf','request-promise','moment','mustache','util','sox','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','client','http','request','then','info','ServicenowConfiguration,\x20%s,\x20%s','request\x20sent','debug','ServicenowConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','reject','save','update','destroy','end','stack','name','send','index','map','ServicenowConfiguration','fieldName','type','model','filters','intersection','attributes','fields','length','query','nolimit','sort','where','filter','merge','options','includeAll','include','findAll','rows','keys','rawAttributes','find','create','body','params'];(function(_0x5653cc,_0x2363ca){var _0x3d0563=function(_0x1c64db){while(--_0x1c64db){_0x5653cc['push'](_0x5653cc['shift']());}};_0x3d0563(++_0x2363ca);}(_0xcaba,0xba));var _0xacab=function(_0x50a84c,_0x2e8117){_0x50a84c=_0x50a84c-0x0;var _0xf4b692=_0xcaba[_0x50a84c];return _0xf4b692;};'use strict';var emlformat=require(_0xacab('0x0'));var rimraf=require(_0xacab('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xacab('0x2'));var moment=require(_0xacab('0x3'));var BPromise=require('bluebird');var Mustache=require(_0xacab('0x4'));var util=require(_0xacab('0x5'));var path=require('path');var sox=require(_0xacab('0x6'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require('squel');var crypto=require(_0xacab('0x7'));var jsforce=require(_0xacab('0x8'));var deskjs=require(_0xacab('0x9'));var toCsv=require(_0xacab('0xa'));var querystring=require(_0xacab('0xb'));var Papa=require(_0xacab('0xc'));var Redis=require(_0xacab('0xd'));var authService=require('../../components/auth/service');var qs=require(_0xacab('0xe'));var as=require(_0xacab('0xf'));var hardwareService=require(_0xacab('0x10'));var logger=require('../../config/logger')(_0xacab('0x11'));var utils=require(_0xacab('0x12'));var config=require(_0xacab('0x13'));var licenseUtil=require(_0xacab('0x14'));var db=require('../../mysqldb')['db'];var jayson=require('jayson/promise');var client=jayson[_0xacab('0x15')][_0xacab('0x16')]({'port':0x232a});function respondWithRpcPromise(_0x4de238,_0x5178a7,_0x1b630c,_0x88963c){return new BPromise(function(_0x1c8e8e,_0x3c1609){var _0x413807=_0x88963c||client;return _0x413807[_0xacab('0x17')](_0x4de238,_0x1b630c)[_0xacab('0x18')](function(_0x3aacb1){logger[_0xacab('0x19')](_0xacab('0x1a'),_0x5178a7,_0xacab('0x1b'));logger[_0xacab('0x1c')](_0xacab('0x1d'),_0x5178a7,_0xacab('0x1b'),JSON[_0xacab('0x1e')](_0x3aacb1));if(_0x3aacb1[_0xacab('0x1f')]){if(_0x3aacb1['error'][_0xacab('0x20')]===0x1f4){logger[_0xacab('0x1f')](_0xacab('0x1a'),_0x5178a7,_0x3aacb1[_0xacab('0x1f')][_0xacab('0x21')]);return _0x3c1609(_0x3aacb1[_0xacab('0x1f')][_0xacab('0x21')]);}logger['error'](_0xacab('0x1a'),_0x5178a7,_0x3aacb1['error']['message']);return _0x1c8e8e(_0x3aacb1[_0xacab('0x1f')][_0xacab('0x21')]);}else{logger[_0xacab('0x19')](_0xacab('0x1a'),_0x5178a7,_0xacab('0x1b'));_0x1c8e8e(_0x3aacb1[_0xacab('0x22')][_0xacab('0x21')]);}})[_0xacab('0x23')](function(_0x5337d7){logger[_0xacab('0x1f')]('ServicenowConfiguration,\x20%s,\x20%s',_0x5178a7,_0x5337d7);_0x3c1609(_0x5337d7);});});}function respondWithStatusCode(_0xa5c570,_0x2693ee){_0x2693ee=_0x2693ee||0xcc;return function(_0x5ad244){if(_0x5ad244){return _0xa5c570[_0xacab('0x24')](_0x2693ee);}return _0xa5c570[_0xacab('0x25')](_0x2693ee)['end']();};}function respondWithResult(_0x207e91,_0x4ffb6b){_0x4ffb6b=_0x4ffb6b||0xc8;return function(_0x18ac6c){if(_0x18ac6c){return _0x207e91['status'](_0x4ffb6b)[_0xacab('0x26')](_0x18ac6c);}};}function respondWithFilteredResult(_0x1ccbdf,_0x47a794){return function(_0xed9616){if(_0xed9616){var _0x24e9bd=typeof _0x47a794[_0xacab('0x27')]===_0xacab('0x28')&&typeof _0x47a794[_0xacab('0x29')]===_0xacab('0x28');var _0x4ef1a8=_0xed9616['count'];var _0x7a8b7c=_0x24e9bd?0x0:_0x47a794[_0xacab('0x27')];var _0x263889=_0x24e9bd?_0xed9616[_0xacab('0x2a')]:_0x47a794[_0xacab('0x27')]+_0x47a794[_0xacab('0x29')];var _0x44c0ad;if(_0x263889>=_0x4ef1a8){_0x263889=_0x4ef1a8;_0x44c0ad=0xc8;}else{_0x44c0ad=0xce;}_0x1ccbdf[_0xacab('0x25')](_0x44c0ad);return _0x1ccbdf[_0xacab('0x2b')](_0xacab('0x2c'),_0x7a8b7c+'-'+_0x263889+'/'+_0x4ef1a8)['json'](_0xed9616);}return null;};}function patchUpdates(_0x437d0f){return function(_0x8a5e79){try{jsonpatch['apply'](_0x8a5e79,_0x437d0f,!![]);}catch(_0x3ddebb){return BPromise[_0xacab('0x2d')](_0x3ddebb);}return _0x8a5e79[_0xacab('0x2e')]();};}function saveUpdates(_0x505974,_0x312cf9){return function(_0x1ae811){if(_0x1ae811){return _0x1ae811[_0xacab('0x2f')](_0x505974)[_0xacab('0x18')](function(_0x306cd6){return _0x306cd6;});}return null;};}function removeEntity(_0x2ecdf4,_0x6badc3){return function(_0x47b2c2){if(_0x47b2c2){return _0x47b2c2[_0xacab('0x30')]()[_0xacab('0x18')](function(){_0x2ecdf4[_0xacab('0x25')](0xcc)[_0xacab('0x31')]();});}};}function handleEntityNotFound(_0x4d4e8a,_0x4d64b8){return function(_0x28c620){if(!_0x28c620){_0x4d4e8a[_0xacab('0x24')](0x194);}return _0x28c620;};}function handleError(_0x348c3f,_0x2ea7fa){_0x2ea7fa=_0x2ea7fa||0x1f4;return function(_0x167cff){logger[_0xacab('0x1f')](_0x167cff[_0xacab('0x32')]);if(_0x167cff[_0xacab('0x33')]){delete _0x167cff['name'];}_0x348c3f[_0xacab('0x25')](_0x2ea7fa)[_0xacab('0x34')](_0x167cff);};}exports[_0xacab('0x35')]=function(_0x517265,_0x195d3f){var _0x4cbaa5={},_0x16cb6f={},_0x8dd21d={'count':0x0,'rows':[]};var _0x36220d=_[_0xacab('0x36')](db[_0xacab('0x37')]['rawAttributes'],function(_0x5e71eb){return{'name':_0x5e71eb[_0xacab('0x38')],'type':_0x5e71eb[_0xacab('0x39')]['key']};});_0x16cb6f[_0xacab('0x3a')]=_[_0xacab('0x36')](_0x36220d,_0xacab('0x33'));_0x16cb6f['query']=_['keys'](_0x517265['query']);_0x16cb6f[_0xacab('0x3b')]=_[_0xacab('0x3c')](_0x16cb6f[_0xacab('0x3a')],_0x16cb6f['query']);_0x4cbaa5[_0xacab('0x3d')]=_[_0xacab('0x3c')](_0x16cb6f[_0xacab('0x3a')],qs[_0xacab('0x3e')](_0x517265['query'][_0xacab('0x3e')]));_0x4cbaa5['attributes']=_0x4cbaa5['attributes'][_0xacab('0x3f')]?_0x4cbaa5[_0xacab('0x3d')]:_0x16cb6f[_0xacab('0x3a')];if(!_0x517265[_0xacab('0x40')]['hasOwnProperty'](_0xacab('0x41'))){_0x4cbaa5[_0xacab('0x29')]=qs[_0xacab('0x29')](_0x517265[_0xacab('0x40')][_0xacab('0x29')]);_0x4cbaa5[_0xacab('0x27')]=qs['offset'](_0x517265[_0xacab('0x40')]['offset']);}_0x4cbaa5['order']=qs[_0xacab('0x42')](_0x517265[_0xacab('0x40')][_0xacab('0x42')]);_0x4cbaa5[_0xacab('0x43')]=qs[_0xacab('0x3b')](_['pick'](_0x517265[_0xacab('0x40')],_0x16cb6f['filters']),_0x36220d);if(_0x517265['query'][_0xacab('0x44')]){_0x4cbaa5[_0xacab('0x43')]=_[_0xacab('0x45')](_0x4cbaa5[_0xacab('0x43')],{'$or':_['map'](_0x36220d,function(_0x34fd14){if(_0x34fd14[_0xacab('0x39')]!=='VIRTUAL'){var _0x56d112={};_0x56d112[_0x34fd14[_0xacab('0x33')]]={'$like':'%'+_0x517265[_0xacab('0x40')]['filter']+'%'};return _0x56d112;}})});}_0x4cbaa5=_[_0xacab('0x45')]({},_0x4cbaa5,_0x517265[_0xacab('0x46')]);var _0x28af49={'where':_0x4cbaa5[_0xacab('0x43')]};return db['ServicenowConfiguration'][_0xacab('0x2a')](_0x28af49)[_0xacab('0x18')](function(_0x1e175a){_0x8dd21d[_0xacab('0x2a')]=_0x1e175a;if(_0x517265['query'][_0xacab('0x47')]){_0x4cbaa5[_0xacab('0x48')]=[{'all':!![]}];}return db['ServicenowConfiguration'][_0xacab('0x49')](_0x4cbaa5);})[_0xacab('0x18')](function(_0x40da55){_0x8dd21d[_0xacab('0x4a')]=_0x40da55;return _0x8dd21d;})['then'](respondWithFilteredResult(_0x195d3f,_0x4cbaa5))[_0xacab('0x23')](handleError(_0x195d3f,null));};exports['show']=function(_0x30463b,_0x543270){var _0x2ea305={'raw':![],'where':{'id':_0x30463b['params']['id']}},_0x2a2e8d={};_0x2a2e8d[_0xacab('0x3a')]=_[_0xacab('0x4b')](db[_0xacab('0x37')][_0xacab('0x4c')]);_0x2a2e8d[_0xacab('0x40')]=_[_0xacab('0x4b')](_0x30463b[_0xacab('0x40')]);_0x2a2e8d[_0xacab('0x3b')]=_[_0xacab('0x3c')](_0x2a2e8d[_0xacab('0x3a')],_0x2a2e8d[_0xacab('0x40')]);_0x2ea305[_0xacab('0x3d')]=_['intersection'](_0x2a2e8d[_0xacab('0x3a')],qs[_0xacab('0x3e')](_0x30463b['query'][_0xacab('0x3e')]));_0x2ea305[_0xacab('0x3d')]=_0x2ea305['attributes'][_0xacab('0x3f')]?_0x2ea305[_0xacab('0x3d')]:_0x2a2e8d[_0xacab('0x3a')];if(_0x30463b[_0xacab('0x40')][_0xacab('0x47')]){_0x2ea305[_0xacab('0x48')]=[{'all':!![]}];}_0x2ea305=_[_0xacab('0x45')]({},_0x2ea305,_0x30463b[_0xacab('0x46')]);return db['ServicenowConfiguration'][_0xacab('0x4d')](_0x2ea305)[_0xacab('0x18')](handleEntityNotFound(_0x543270,null))['then'](respondWithResult(_0x543270,null))[_0xacab('0x23')](handleError(_0x543270,null));};exports[_0xacab('0x4e')]=function(_0x5555b7,_0x839b11){return db[_0xacab('0x37')][_0xacab('0x4e')](_0x5555b7[_0xacab('0x4f')],{})[_0xacab('0x18')](respondWithResult(_0x839b11,0xc9))[_0xacab('0x23')](handleError(_0x839b11,null));};exports[_0xacab('0x2f')]=function(_0xe01197,_0x4fa715){if(_0xe01197[_0xacab('0x4f')]['id']){delete _0xe01197['body']['id'];}return db[_0xacab('0x37')][_0xacab('0x4d')]({'where':{'id':_0xe01197[_0xacab('0x50')]['id']}})['then'](handleEntityNotFound(_0x4fa715,null))[_0xacab('0x18')](saveUpdates(_0xe01197[_0xacab('0x4f')],null))[_0xacab('0x18')](respondWithResult(_0x4fa715,null))['catch'](handleError(_0x4fa715,null));};exports[_0xacab('0x30')]=function(_0x4b121c,_0x23c6f0){return db[_0xacab('0x37')]['find']({'where':{'id':_0x4b121c['params']['id']}})[_0xacab('0x18')](handleEntityNotFound(_0x23c6f0,null))[_0xacab('0x18')](removeEntity(_0x23c6f0,null))[_0xacab('0x23')](handleError(_0x23c6f0,null));};exports['getFields']=function(_0x29a5e4,_0x39390d,_0x3ccd8b){var _0x5eff6d={};var _0x4f4ce8={};var _0xb3de72;var _0xdd28a7;return db[_0xacab('0x37')]['findOne']({'where':{'id':_0x29a5e4[_0xacab('0x50')]['id']}})[_0xacab('0x18')](handleEntityNotFound(_0x39390d,null))[_0xacab('0x18')](function(_0x3575fa){if(_0x3575fa){_0xb3de72=_0x3575fa;_0x4f4ce8['model']=_['keys'](db[_0xacab('0x51')][_0xacab('0x4c')]);_0x4f4ce8['query']=_[_0xacab('0x4b')](_0x29a5e4['query']);_0x4f4ce8[_0xacab('0x3b')]=_['intersection'](_0x4f4ce8[_0xacab('0x3a')],_0x4f4ce8[_0xacab('0x40')]);_0x5eff6d[_0xacab('0x3d')]=_[_0xacab('0x3c')](_0x4f4ce8[_0xacab('0x3a')],qs[_0xacab('0x3e')](_0x29a5e4['query'][_0xacab('0x3e')]));_0x5eff6d[_0xacab('0x3d')]=_0x5eff6d[_0xacab('0x3d')][_0xacab('0x3f')]?_0x5eff6d[_0xacab('0x3d')]:_0x4f4ce8[_0xacab('0x3a')];_0x5eff6d[_0xacab('0x52')]=qs[_0xacab('0x42')](_0x29a5e4[_0xacab('0x40')][_0xacab('0x42')]);_0x5eff6d[_0xacab('0x43')]=qs['filters'](_[_0xacab('0x53')](_0x29a5e4['query'],_0x4f4ce8[_0xacab('0x3b')]));if(_0x29a5e4[_0xacab('0x40')][_0xacab('0x44')]){_0x5eff6d[_0xacab('0x43')]=_[_0xacab('0x45')](_0x5eff6d[_0xacab('0x43')],{'$or':_['map'](_0x5eff6d['attributes'],function(_0x20d7c4){var _0x46792={};_0x46792[_0x20d7c4]={'$like':'%'+_0x29a5e4[_0xacab('0x40')][_0xacab('0x44')]+'%'};return _0x46792;})});}_0x5eff6d=_[_0xacab('0x45')]({},_0x5eff6d,_0x29a5e4[_0xacab('0x46')]);return _0xb3de72['getFields'](_0x5eff6d);}})[_0xacab('0x18')](function(_0x3bec8a){if(_0x3bec8a){_0xdd28a7=_0x3bec8a['length'];if(!_0x29a5e4[_0xacab('0x40')][_0xacab('0x54')](_0xacab('0x41'))){_0x5eff6d[_0xacab('0x29')]=qs[_0xacab('0x29')](_0x29a5e4['query']['limit']);_0x5eff6d[_0xacab('0x27')]=qs['offset'](_0x29a5e4['query'][_0xacab('0x27')]);}return _0xb3de72[_0xacab('0x55')](_0x5eff6d);}})['then'](function(_0x151dab){if(_0x151dab){return _0x151dab?{'count':_0xdd28a7,'rows':_0x151dab}:null;}})[_0xacab('0x18')](respondWithResult(_0x39390d,null))[_0xacab('0x23')](handleError(_0x39390d,null));};exports[_0xacab('0x56')]=function(_0x383e79,_0x3a03ef,_0x5a284b){var _0x36e2e0={};var _0x437164={};var _0x1d7739;var _0x4e07f1;return db['ServicenowConfiguration'][_0xacab('0x57')]({'where':{'id':_0x383e79[_0xacab('0x50')]['id']}})['then'](handleEntityNotFound(_0x3a03ef,null))[_0xacab('0x18')](function(_0x22184f){if(_0x22184f){_0x1d7739=_0x22184f;_0x437164[_0xacab('0x3a')]=_[_0xacab('0x4b')](db[_0xacab('0x51')]['rawAttributes']);_0x437164[_0xacab('0x40')]=_[_0xacab('0x4b')](_0x383e79[_0xacab('0x40')]);_0x437164['filters']=_['intersection'](_0x437164['model'],_0x437164[_0xacab('0x40')]);_0x36e2e0[_0xacab('0x3d')]=_['intersection'](_0x437164[_0xacab('0x3a')],qs[_0xacab('0x3e')](_0x383e79[_0xacab('0x40')][_0xacab('0x3e')]));_0x36e2e0['attributes']=_0x36e2e0[_0xacab('0x3d')][_0xacab('0x3f')]?_0x36e2e0[_0xacab('0x3d')]:_0x437164['model'];_0x36e2e0[_0xacab('0x52')]=qs[_0xacab('0x42')](_0x383e79[_0xacab('0x40')][_0xacab('0x42')]);_0x36e2e0['where']=qs[_0xacab('0x3b')](_['pick'](_0x383e79['query'],_0x437164[_0xacab('0x3b')]));if(_0x383e79[_0xacab('0x40')][_0xacab('0x44')]){_0x36e2e0[_0xacab('0x43')]=_[_0xacab('0x45')](_0x36e2e0[_0xacab('0x43')],{'$or':_['map'](_0x36e2e0[_0xacab('0x3d')],function(_0x286249){var _0x24eace={};_0x24eace[_0x286249]={'$like':'%'+_0x383e79[_0xacab('0x40')][_0xacab('0x44')]+'%'};return _0x24eace;})});}_0x36e2e0=_[_0xacab('0x45')]({},_0x36e2e0,_0x383e79[_0xacab('0x46')]);return _0x1d7739['getSubjects'](_0x36e2e0);}})[_0xacab('0x18')](function(_0x2f6695){if(_0x2f6695){_0x4e07f1=_0x2f6695['length'];if(!_0x383e79[_0xacab('0x40')][_0xacab('0x54')]('nolimit')){_0x36e2e0['limit']=qs[_0xacab('0x29')](_0x383e79[_0xacab('0x40')][_0xacab('0x29')]);_0x36e2e0[_0xacab('0x27')]=qs['offset'](_0x383e79[_0xacab('0x40')][_0xacab('0x27')]);}return _0x1d7739[_0xacab('0x56')](_0x36e2e0);}})[_0xacab('0x18')](function(_0x55ec9c){if(_0x55ec9c){return _0x55ec9c?{'count':_0x4e07f1,'rows':_0x55ec9c}:null;}})[_0xacab('0x18')](respondWithResult(_0x3a03ef,null))['catch'](handleError(_0x3a03ef,null));};exports[_0xacab('0x58')]=function(_0x14c6cb,_0x1570ae,_0x161e4f){var _0x4fc644={};var _0x44f084={};var _0x360da1;var _0x18b16c;return db[_0xacab('0x37')][_0xacab('0x57')]({'where':{'id':_0x14c6cb['params']['id']}})[_0xacab('0x18')](handleEntityNotFound(_0x1570ae,null))[_0xacab('0x18')](function(_0x1aa6e2){if(_0x1aa6e2){_0x360da1=_0x1aa6e2;_0x44f084['model']=_[_0xacab('0x4b')](db['ServicenowField']['rawAttributes']);_0x44f084[_0xacab('0x40')]=_[_0xacab('0x4b')](_0x14c6cb['query']);_0x44f084[_0xacab('0x3b')]=_['intersection'](_0x44f084['model'],_0x44f084[_0xacab('0x40')]);_0x4fc644['attributes']=_[_0xacab('0x3c')](_0x44f084[_0xacab('0x3a')],qs[_0xacab('0x3e')](_0x14c6cb[_0xacab('0x40')]['fields']));_0x4fc644['attributes']=_0x4fc644['attributes']['length']?_0x4fc644[_0xacab('0x3d')]:_0x44f084[_0xacab('0x3a')];_0x4fc644['order']=qs['sort'](_0x14c6cb[_0xacab('0x40')][_0xacab('0x42')]);_0x4fc644[_0xacab('0x43')]=qs['filters'](_[_0xacab('0x53')](_0x14c6cb['query'],_0x44f084['filters']));if(_0x14c6cb[_0xacab('0x40')][_0xacab('0x44')]){_0x4fc644[_0xacab('0x43')]=_[_0xacab('0x45')](_0x4fc644[_0xacab('0x43')],{'$or':_['map'](_0x4fc644[_0xacab('0x3d')],function(_0x2d2860){var _0x591a73={};_0x591a73[_0x2d2860]={'$like':'%'+_0x14c6cb[_0xacab('0x40')]['filter']+'%'};return _0x591a73;})});}_0x4fc644=_[_0xacab('0x45')]({},_0x4fc644,_0x14c6cb[_0xacab('0x46')]);return _0x360da1[_0xacab('0x58')](_0x4fc644);}})['then'](function(_0x3a01d9){if(_0x3a01d9){_0x18b16c=_0x3a01d9[_0xacab('0x3f')];if(!_0x14c6cb[_0xacab('0x40')][_0xacab('0x54')]('nolimit')){_0x4fc644['limit']=qs[_0xacab('0x29')](_0x14c6cb[_0xacab('0x40')]['limit']);_0x4fc644['offset']=qs[_0xacab('0x27')](_0x14c6cb[_0xacab('0x40')][_0xacab('0x27')]);}return _0x360da1[_0xacab('0x58')](_0x4fc644);}})[_0xacab('0x18')](function(_0x468ef8){if(_0x468ef8){return _0x468ef8?{'count':_0x18b16c,'rows':_0x468ef8}:null;}})[_0xacab('0x18')](respondWithResult(_0x1570ae,null))['catch'](handleError(_0x1570ae,null));}; \ No newline at end of file diff --git a/server/api/intServicenowConfiguration/intServicenowConfiguration.model.js b/server/api/intServicenowConfiguration/intServicenowConfiguration.model.js index 3f90a3e..08b2811 100644 --- a/server/api/intServicenowConfiguration/intServicenowConfiguration.model.js +++ b/server/api/intServicenowConfiguration/intServicenowConfiguration.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xde9f=['lodash','api','moment','request-promise','path','../../config/environment','./intServicenowConfiguration.attributes','exports','ServicenowConfiguration','int_servicenow_configurations'];(function(_0x341e0f,_0x4a09d0){var _0x59555a=function(_0x4343a8){while(--_0x4343a8){_0x341e0f['push'](_0x341e0f['shift']());}};_0x59555a(++_0x4a09d0);}(_0xde9f,0x118));var _0xfde9=function(_0x37862a,_0x2bc98e){_0x37862a=_0x37862a-0x0;var _0x5b0104=_0xde9f[_0x37862a];return _0x5b0104;};'use strict';var _=require(_0xfde9('0x0'));var util=require('util');var logger=require('../../config/logger')(_0xfde9('0x1'));var moment=require(_0xfde9('0x2'));var BPromise=require('bluebird');var rp=require(_0xfde9('0x3'));var fs=require('fs');var path=require(_0xfde9('0x4'));var rimraf=require('rimraf');var config=require(_0xfde9('0x5'));var attributes=require(_0xfde9('0x6'));module[_0xfde9('0x7')]=function(_0xe30eaf,_0x5e69c0){return _0xe30eaf['define'](_0xfde9('0x8'),attributes,{'tableName':_0xfde9('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x2ffe=['bluebird','path','rimraf','exports','ServicenowConfiguration','int_servicenow_configurations','util','../../config/logger','api','moment'];(function(_0xfd75c7,_0x4b6dd2){var _0x2b106e=function(_0x25f784){while(--_0x25f784){_0xfd75c7['push'](_0xfd75c7['shift']());}};_0x2b106e(++_0x4b6dd2);}(_0x2ffe,0x6a));var _0xe2ff=function(_0x1ac0c7,_0x51a28c){_0x1ac0c7=_0x1ac0c7-0x0;var _0x165b16=_0x2ffe[_0x1ac0c7];return _0x165b16;};'use strict';var _=require('lodash');var util=require(_0xe2ff('0x0'));var logger=require(_0xe2ff('0x1'))(_0xe2ff('0x2'));var moment=require(_0xe2ff('0x3'));var BPromise=require(_0xe2ff('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xe2ff('0x5'));var rimraf=require(_0xe2ff('0x6'));var config=require('../../config/environment');var attributes=require('./intServicenowConfiguration.attributes');module[_0xe2ff('0x7')]=function(_0xc562df,_0xa461e7){return _0xc562df['define'](_0xe2ff('0x8'),attributes,{'tableName':_0xe2ff('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intServicenowConfiguration/intServicenowConfiguration.rpc.js b/server/api/intServicenowConfiguration/intServicenowConfiguration.rpc.js index aa810c4..6beee5a 100644 --- a/server/api/intServicenowConfiguration/intServicenowConfiguration.rpc.js +++ b/server/api/intServicenowConfiguration/intServicenowConfiguration.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xcecc=['rpc','../../config/environment','jayson/promise','client','http','request','then','request\x20sent','debug','ServicenowConfiguration,\x20%s,\x20%s,\x20%s','error','code','ServicenowConfiguration,\x20%s,\x20%s','message','info','result','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger'];(function(_0x1727a1,_0x123d7b){var _0x3dfb4f=function(_0x1a2c54){while(--_0x1a2c54){_0x1727a1['push'](_0x1727a1['shift']());}};_0x3dfb4f(++_0x123d7b);}(_0xcecc,0x118));var _0xccec=function(_0x1718e8,_0x111b20){_0x1718e8=_0x1718e8-0x0;var _0x485839=_0xcecc[_0x1718e8];return _0x485839;};'use strict';var _=require(_0xccec('0x0'));var util=require(_0xccec('0x1'));var moment=require(_0xccec('0x2'));var BPromise=require(_0xccec('0x3'));var rs=require(_0xccec('0x4'));var fs=require('fs');var Redis=require(_0xccec('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xccec('0x6'));var logger=require(_0xccec('0x7'))(_0xccec('0x8'));var config=require(_0xccec('0x9'));var jayson=require(_0xccec('0xa'));var client=jayson[_0xccec('0xb')][_0xccec('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x3327ca,_0x57221e,_0x7edc69){return new BPromise(function(_0x521929,_0x545b64){return client[_0xccec('0xd')](_0x3327ca,_0x7edc69)[_0xccec('0xe')](function(_0x180186){logger['info']('ServicenowConfiguration,\x20%s,\x20%s',_0x57221e,_0xccec('0xf'));logger[_0xccec('0x10')](_0xccec('0x11'),_0x57221e,_0xccec('0xf'),JSON['stringify'](_0x180186));if(_0x180186[_0xccec('0x12')]){if(_0x180186[_0xccec('0x12')][_0xccec('0x13')]===0x1f4){logger['error'](_0xccec('0x14'),_0x57221e,_0x180186[_0xccec('0x12')]['message']);return _0x545b64(_0x180186[_0xccec('0x12')][_0xccec('0x15')]);}logger[_0xccec('0x12')]('ServicenowConfiguration,\x20%s,\x20%s',_0x57221e,_0x180186[_0xccec('0x12')][_0xccec('0x15')]);return _0x521929(_0x180186[_0xccec('0x12')][_0xccec('0x15')]);}else{logger[_0xccec('0x16')]('ServicenowConfiguration,\x20%s,\x20%s',_0x57221e,'request\x20sent');_0x521929(_0x180186[_0xccec('0x17')][_0xccec('0x15')]);}})['catch'](function(_0x2ab89d){logger[_0xccec('0x12')]('ServicenowConfiguration,\x20%s,\x20%s',_0x57221e,_0x2ab89d);_0x545b64(_0x2ab89d);});});} \ No newline at end of file +var _0xd65f=['request','ServicenowConfiguration,\x20%s,\x20%s','request\x20sent','debug','ServicenowConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','../../config/environment','client'];(function(_0x41cf37,_0x4b447c){var _0x5643d5=function(_0x5f3335){while(--_0x5f3335){_0x41cf37['push'](_0x41cf37['shift']());}};_0x5643d5(++_0x4b447c);}(_0xd65f,0x171));var _0xfd65=function(_0x35906a,_0x9e0b54){_0x35906a=_0x35906a-0x0;var _0x43ba69=_0xd65f[_0x35906a];return _0x43ba69;};'use strict';var _=require(_0xfd65('0x0'));var util=require(_0xfd65('0x1'));var moment=require('moment');var BPromise=require(_0xfd65('0x2'));var rs=require(_0xfd65('0x3'));var fs=require('fs');var Redis=require(_0xfd65('0x4'));var db=require(_0xfd65('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xfd65('0x6'))('rpc');var config=require(_0xfd65('0x7'));var jayson=require('jayson/promise');var client=jayson[_0xfd65('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x34a06a,_0x156a7c,_0x24f665){return new BPromise(function(_0x2a9658,_0x5effb6){return client[_0xfd65('0x9')](_0x34a06a,_0x24f665)['then'](function(_0x64f869){logger['info'](_0xfd65('0xa'),_0x156a7c,_0xfd65('0xb'));logger[_0xfd65('0xc')](_0xfd65('0xd'),_0x156a7c,'request\x20sent',JSON[_0xfd65('0xe')](_0x64f869));if(_0x64f869[_0xfd65('0xf')]){if(_0x64f869[_0xfd65('0xf')][_0xfd65('0x10')]===0x1f4){logger['error'](_0xfd65('0xa'),_0x156a7c,_0x64f869[_0xfd65('0xf')][_0xfd65('0x11')]);return _0x5effb6(_0x64f869[_0xfd65('0xf')][_0xfd65('0x11')]);}logger[_0xfd65('0xf')](_0xfd65('0xa'),_0x156a7c,_0x64f869['error'][_0xfd65('0x11')]);return _0x2a9658(_0x64f869[_0xfd65('0xf')]['message']);}else{logger[_0xfd65('0x12')](_0xfd65('0xa'),_0x156a7c,_0xfd65('0xb'));_0x2a9658(_0x64f869[_0xfd65('0x13')][_0xfd65('0x11')]);}})[_0xfd65('0x14')](function(_0x303b76){logger[_0xfd65('0xf')](_0xfd65('0xa'),_0x156a7c,_0x303b76);_0x5effb6(_0x303b76);});});} \ No newline at end of file diff --git a/server/api/intServicenowField/index.js b/server/api/intServicenowField/index.js index 6a85675..9cdef71 100644 --- a/server/api/intServicenowField/index.js +++ b/server/api/intServicenowField/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa785=['put','update','exports','multer','util','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','isAuthenticated','index','get','/:id','post'];(function(_0x1f063b,_0x321a3c){var _0x4d864b=function(_0x173dfe){while(--_0x173dfe){_0x1f063b['push'](_0x1f063b['shift']());}};_0x4d864b(++_0x321a3c);}(_0xa785,0x102));var _0x5a78=function(_0xc753c8,_0x5627ff){_0xc753c8=_0xc753c8-0x0;var _0xd02f5c=_0xa785[_0xc753c8];return _0xd02f5c;};'use strict';var multer=require(_0x5a78('0x0'));var util=require(_0x5a78('0x1'));var path=require('path');var timeout=require(_0x5a78('0x2'));var express=require(_0x5a78('0x3'));var router=express['Router']();var fs_extra=require(_0x5a78('0x4'));var auth=require(_0x5a78('0x5'));var interaction=require(_0x5a78('0x6'));var config=require('../../config/environment');var controller=require('./intServicenowField.controller');router['get']('/',auth[_0x5a78('0x7')](),controller[_0x5a78('0x8')]);router[_0x5a78('0x9')](_0x5a78('0xa'),auth['isAuthenticated'](),controller['show']);router[_0x5a78('0xb')]('/',auth['isAuthenticated'](),controller['create']);router[_0x5a78('0xc')](_0x5a78('0xa'),auth[_0x5a78('0x7')](),controller[_0x5a78('0xd')]);router['delete'](_0x5a78('0xa'),auth[_0x5a78('0x7')](),controller['destroy']);module[_0x5a78('0xe')]=router; \ No newline at end of file +var _0xaf19=['post','create','put','isAuthenticated','destroy','multer','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intServicenowField.controller','index','/:id','show'];(function(_0x719760,_0xa92c00){var _0x4b7995=function(_0x512929){while(--_0x512929){_0x719760['push'](_0x719760['shift']());}};_0x4b7995(++_0xa92c00);}(_0xaf19,0x104));var _0x9af1=function(_0x338488,_0x131300){_0x338488=_0x338488-0x0;var _0x38bfa4=_0xaf19[_0x338488];return _0x38bfa4;};'use strict';var multer=require(_0x9af1('0x0'));var util=require('util');var path=require(_0x9af1('0x1'));var timeout=require(_0x9af1('0x2'));var express=require(_0x9af1('0x3'));var router=express['Router']();var fs_extra=require(_0x9af1('0x4'));var auth=require(_0x9af1('0x5'));var interaction=require(_0x9af1('0x6'));var config=require(_0x9af1('0x7'));var controller=require(_0x9af1('0x8'));router['get']('/',auth['isAuthenticated'](),controller[_0x9af1('0x9')]);router['get'](_0x9af1('0xa'),auth['isAuthenticated'](),controller[_0x9af1('0xb')]);router[_0x9af1('0xc')]('/',auth['isAuthenticated'](),controller[_0x9af1('0xd')]);router[_0x9af1('0xe')](_0x9af1('0xa'),auth[_0x9af1('0xf')](),controller['update']);router['delete'](_0x9af1('0xa'),auth[_0x9af1('0xf')](),controller[_0x9af1('0x10')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/intServicenowField/intServicenowField.attributes.js b/server/api/intServicenowField/intServicenowField.attributes.js index 29419cc..931a0b0 100644 --- a/server/api/intServicenowField/intServicenowField.attributes.js +++ b/server/api/intServicenowField/intServicenowField.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7cd9=['customVariable','keyValue','picklist','STRING','BOOLEAN','sequelize','exports','ENUM','string','variable'];(function(_0x1249f4,_0x27226c){var _0x47c8a9=function(_0x2d9917){while(--_0x2d9917){_0x1249f4['push'](_0x1249f4['shift']());}};_0x47c8a9(++_0x27226c);}(_0x7cd9,0x127));var _0x97cd=function(_0x214871,_0x528677){_0x214871=_0x214871-0x0;var _0x55c14e=_0x7cd9[_0x214871];return _0x55c14e;};'use strict';var Sequelize=require(_0x97cd('0x0'));module[_0x97cd('0x1')]={'type':{'type':Sequelize[_0x97cd('0x2')](_0x97cd('0x3'),_0x97cd('0x4'),_0x97cd('0x5'),_0x97cd('0x6'),_0x97cd('0x7')),'defaultValue':_0x97cd('0x3')},'content':{'type':Sequelize[_0x97cd('0x8')]},'key':{'type':Sequelize[_0x97cd('0x8')]},'keyType':{'type':Sequelize[_0x97cd('0x2')](_0x97cd('0x3'),_0x97cd('0x4'),'customVariable')},'keyContent':{'type':Sequelize['STRING']},'idField':{'type':Sequelize[_0x97cd('0x8')]},'nameField':{'type':Sequelize['STRING']},'customField':{'type':Sequelize[_0x97cd('0x9')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x97cd('0x8')]}}; \ No newline at end of file +var _0xfe46=['STRING','BOOLEAN','sequelize','ENUM','string','variable','customVariable','keyValue'];(function(_0x142830,_0x38bebb){var _0x4772e9=function(_0x2c3a7d){while(--_0x2c3a7d){_0x142830['push'](_0x142830['shift']());}};_0x4772e9(++_0x38bebb);}(_0xfe46,0x92));var _0x6fe4=function(_0x2ffd9e,_0x63ff0c){_0x2ffd9e=_0x2ffd9e-0x0;var _0x383b24=_0xfe46[_0x2ffd9e];return _0x383b24;};'use strict';var Sequelize=require(_0x6fe4('0x0'));module['exports']={'type':{'type':Sequelize[_0x6fe4('0x1')](_0x6fe4('0x2'),_0x6fe4('0x3'),_0x6fe4('0x4'),_0x6fe4('0x5'),'picklist'),'defaultValue':_0x6fe4('0x2')},'content':{'type':Sequelize[_0x6fe4('0x6')]},'key':{'type':Sequelize[_0x6fe4('0x6')]},'keyType':{'type':Sequelize[_0x6fe4('0x1')](_0x6fe4('0x2'),_0x6fe4('0x3'),_0x6fe4('0x4'))},'keyContent':{'type':Sequelize[_0x6fe4('0x6')]},'idField':{'type':Sequelize[_0x6fe4('0x6')]},'nameField':{'type':Sequelize[_0x6fe4('0x6')]},'customField':{'type':Sequelize[_0x6fe4('0x7')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x6fe4('0x6')]}}; \ No newline at end of file diff --git a/server/api/intServicenowField/intServicenowField.controller.js b/server/api/intServicenowField/intServicenowField.controller.js index b0da7ed..bb2e71a 100644 --- a/server/api/intServicenowField/intServicenowField.controller.js +++ b/server/api/intServicenowField/intServicenowField.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd040=['bluebird','mustache','util','path','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','offset','undefined','limit','Content-Range','json','apply','reject','destroy','then','error','stack','name','send','index','map','ServicenowField','fieldName','type','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','VIRTUAL','merge','options','count','include','findAll','rows','catch','show','rawAttributes','includeAll','find','create','body','update','params','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment'];(function(_0x1d1e9c,_0x46bd3c){var _0x4b4cf1=function(_0x5c0518){while(--_0x5c0518){_0x1d1e9c['push'](_0x1d1e9c['shift']());}};_0x4b4cf1(++_0x46bd3c);}(_0xd040,0x142));var _0x0d04=function(_0x4333b1,_0x49696a){_0x4333b1=_0x4333b1-0x0;var _0x4e0410=_0xd040[_0x4333b1];return _0x4e0410;};'use strict';var emlformat=require(_0x0d04('0x0'));var rimraf=require(_0x0d04('0x1'));var zipdir=require(_0x0d04('0x2'));var jsonpatch=require(_0x0d04('0x3'));var rp=require(_0x0d04('0x4'));var moment=require(_0x0d04('0x5'));var BPromise=require(_0x0d04('0x6'));var Mustache=require(_0x0d04('0x7'));var util=require(_0x0d04('0x8'));var path=require(_0x0d04('0x9'));var sox=require(_0x0d04('0xa'));var csv=require(_0x0d04('0xb'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x0d04('0xc'));var _=require(_0x0d04('0xd'));var squel=require(_0x0d04('0xe'));var crypto=require(_0x0d04('0xf'));var jsforce=require(_0x0d04('0x10'));var deskjs=require(_0x0d04('0x11'));var toCsv=require(_0x0d04('0xb'));var querystring=require(_0x0d04('0x12'));var Papa=require(_0x0d04('0x13'));var Redis=require(_0x0d04('0x14'));var authService=require(_0x0d04('0x15'));var qs=require('../../components/parsers/qs');var as=require(_0x0d04('0x16'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x0d04('0x17'))(_0x0d04('0x18'));var utils=require(_0x0d04('0x19'));var config=require(_0x0d04('0x1a'));var licenseUtil=require(_0x0d04('0x1b'));var db=require(_0x0d04('0x1c'))['db'];function respondWithStatusCode(_0xc6936a,_0x5bb274){_0x5bb274=_0x5bb274||0xcc;return function(_0x499983){if(_0x499983){return _0xc6936a[_0x0d04('0x1d')](_0x5bb274);}return _0xc6936a[_0x0d04('0x1e')](_0x5bb274)[_0x0d04('0x1f')]();};}function respondWithResult(_0x2e47a2,_0x40ace0){_0x40ace0=_0x40ace0||0xc8;return function(_0xecec47){if(_0xecec47){return _0x2e47a2[_0x0d04('0x1e')](_0x40ace0)['json'](_0xecec47);}};}function respondWithFilteredResult(_0x305190,_0x2dfa34){return function(_0x3dd4c4){if(_0x3dd4c4){var _0x463e38=typeof _0x2dfa34[_0x0d04('0x20')]===_0x0d04('0x21')&&typeof _0x2dfa34[_0x0d04('0x22')]==='undefined';var _0x1574cd=_0x3dd4c4['count'];var _0x34737f=_0x463e38?0x0:_0x2dfa34[_0x0d04('0x20')];var _0x5b23ee=_0x463e38?_0x3dd4c4['count']:_0x2dfa34[_0x0d04('0x20')]+_0x2dfa34['limit'];var _0x169468;if(_0x5b23ee>=_0x1574cd){_0x5b23ee=_0x1574cd;_0x169468=0xc8;}else{_0x169468=0xce;}_0x305190[_0x0d04('0x1e')](_0x169468);return _0x305190['set'](_0x0d04('0x23'),_0x34737f+'-'+_0x5b23ee+'/'+_0x1574cd)[_0x0d04('0x24')](_0x3dd4c4);}return null;};}function patchUpdates(_0xef767c){return function(_0x1ddd17){try{jsonpatch[_0x0d04('0x25')](_0x1ddd17,_0xef767c,!![]);}catch(_0x8c5d26){return BPromise[_0x0d04('0x26')](_0x8c5d26);}return _0x1ddd17['save']();};}function saveUpdates(_0x181bbb,_0x365edf){return function(_0x55d6a){if(_0x55d6a){return _0x55d6a['update'](_0x181bbb)['then'](function(_0x561d4b){return _0x561d4b;});}return null;};}function removeEntity(_0x584065,_0x5a3b84){return function(_0x3fca21){if(_0x3fca21){return _0x3fca21[_0x0d04('0x27')]()[_0x0d04('0x28')](function(){_0x584065[_0x0d04('0x1e')](0xcc)[_0x0d04('0x1f')]();});}};}function handleEntityNotFound(_0x4ad896,_0x372f14){return function(_0x300d69){if(!_0x300d69){_0x4ad896[_0x0d04('0x1d')](0x194);}return _0x300d69;};}function handleError(_0x1f9f40,_0x59c444){_0x59c444=_0x59c444||0x1f4;return function(_0x1fc1ab){logger[_0x0d04('0x29')](_0x1fc1ab[_0x0d04('0x2a')]);if(_0x1fc1ab[_0x0d04('0x2b')]){delete _0x1fc1ab['name'];}_0x1f9f40[_0x0d04('0x1e')](_0x59c444)[_0x0d04('0x2c')](_0x1fc1ab);};}exports[_0x0d04('0x2d')]=function(_0x1e50a8,_0x2b461c){var _0x4b7f9a={},_0x50d8e4={},_0x5a71a8={'count':0x0,'rows':[]};var _0x45cf45=_[_0x0d04('0x2e')](db[_0x0d04('0x2f')]['rawAttributes'],function(_0x1de29b){return{'name':_0x1de29b[_0x0d04('0x30')],'type':_0x1de29b[_0x0d04('0x31')][_0x0d04('0x32')]};});_0x50d8e4[_0x0d04('0x33')]=_[_0x0d04('0x2e')](_0x45cf45,'name');_0x50d8e4[_0x0d04('0x34')]=_[_0x0d04('0x35')](_0x1e50a8[_0x0d04('0x34')]);_0x50d8e4[_0x0d04('0x36')]=_[_0x0d04('0x37')](_0x50d8e4[_0x0d04('0x33')],_0x50d8e4[_0x0d04('0x34')]);_0x4b7f9a['attributes']=_[_0x0d04('0x37')](_0x50d8e4[_0x0d04('0x33')],qs['fields'](_0x1e50a8[_0x0d04('0x34')][_0x0d04('0x38')]));_0x4b7f9a['attributes']=_0x4b7f9a[_0x0d04('0x39')][_0x0d04('0x3a')]?_0x4b7f9a[_0x0d04('0x39')]:_0x50d8e4[_0x0d04('0x33')];if(!_0x1e50a8[_0x0d04('0x34')][_0x0d04('0x3b')](_0x0d04('0x3c'))){_0x4b7f9a[_0x0d04('0x22')]=qs[_0x0d04('0x22')](_0x1e50a8['query'][_0x0d04('0x22')]);_0x4b7f9a[_0x0d04('0x20')]=qs[_0x0d04('0x20')](_0x1e50a8[_0x0d04('0x34')][_0x0d04('0x20')]);}_0x4b7f9a[_0x0d04('0x3d')]=qs['sort'](_0x1e50a8[_0x0d04('0x34')][_0x0d04('0x3e')]);_0x4b7f9a[_0x0d04('0x3f')]=qs[_0x0d04('0x36')](_[_0x0d04('0x40')](_0x1e50a8[_0x0d04('0x34')],_0x50d8e4[_0x0d04('0x36')]),_0x45cf45);if(_0x1e50a8[_0x0d04('0x34')][_0x0d04('0x41')]){_0x4b7f9a[_0x0d04('0x3f')]=_['merge'](_0x4b7f9a[_0x0d04('0x3f')],{'$or':_['map'](_0x45cf45,function(_0x1fe66d){if(_0x1fe66d[_0x0d04('0x31')]!==_0x0d04('0x42')){var _0x54c6b7={};_0x54c6b7[_0x1fe66d[_0x0d04('0x2b')]]={'$like':'%'+_0x1e50a8['query'][_0x0d04('0x41')]+'%'};return _0x54c6b7;}})});}_0x4b7f9a=_[_0x0d04('0x43')]({},_0x4b7f9a,_0x1e50a8[_0x0d04('0x44')]);var _0x25408f={'where':_0x4b7f9a[_0x0d04('0x3f')]};return db[_0x0d04('0x2f')][_0x0d04('0x45')](_0x25408f)[_0x0d04('0x28')](function(_0x2d3242){_0x5a71a8[_0x0d04('0x45')]=_0x2d3242;if(_0x1e50a8[_0x0d04('0x34')]['includeAll']){_0x4b7f9a[_0x0d04('0x46')]=[{'all':!![]}];}return db[_0x0d04('0x2f')][_0x0d04('0x47')](_0x4b7f9a);})['then'](function(_0x44eec5){_0x5a71a8[_0x0d04('0x48')]=_0x44eec5;return _0x5a71a8;})[_0x0d04('0x28')](respondWithFilteredResult(_0x2b461c,_0x4b7f9a))[_0x0d04('0x49')](handleError(_0x2b461c,null));};exports[_0x0d04('0x4a')]=function(_0x29c049,_0x2723f0){var _0x37356e={'raw':!![],'where':{'id':_0x29c049['params']['id']}},_0x4e060f={};_0x4e060f[_0x0d04('0x33')]=_['keys'](db[_0x0d04('0x2f')][_0x0d04('0x4b')]);_0x4e060f['query']=_[_0x0d04('0x35')](_0x29c049['query']);_0x4e060f[_0x0d04('0x36')]=_[_0x0d04('0x37')](_0x4e060f['model'],_0x4e060f[_0x0d04('0x34')]);_0x37356e['attributes']=_[_0x0d04('0x37')](_0x4e060f[_0x0d04('0x33')],qs[_0x0d04('0x38')](_0x29c049[_0x0d04('0x34')][_0x0d04('0x38')]));_0x37356e['attributes']=_0x37356e[_0x0d04('0x39')][_0x0d04('0x3a')]?_0x37356e[_0x0d04('0x39')]:_0x4e060f[_0x0d04('0x33')];if(_0x29c049[_0x0d04('0x34')][_0x0d04('0x4c')]){_0x37356e[_0x0d04('0x46')]=[{'all':!![]}];}_0x37356e=_[_0x0d04('0x43')]({},_0x37356e,_0x29c049[_0x0d04('0x44')]);return db['ServicenowField'][_0x0d04('0x4d')](_0x37356e)['then'](handleEntityNotFound(_0x2723f0,null))[_0x0d04('0x28')](respondWithResult(_0x2723f0,null))[_0x0d04('0x49')](handleError(_0x2723f0,null));};exports['create']=function(_0x268032,_0x53426c){return db[_0x0d04('0x2f')][_0x0d04('0x4e')](_0x268032[_0x0d04('0x4f')],{})[_0x0d04('0x28')](respondWithResult(_0x53426c,0xc9))[_0x0d04('0x49')](handleError(_0x53426c,null));};exports[_0x0d04('0x50')]=function(_0x2a5a27,_0x24925d){if(_0x2a5a27['body']['id']){delete _0x2a5a27[_0x0d04('0x4f')]['id'];}return db[_0x0d04('0x2f')][_0x0d04('0x4d')]({'where':{'id':_0x2a5a27[_0x0d04('0x51')]['id']}})[_0x0d04('0x28')](handleEntityNotFound(_0x24925d,null))[_0x0d04('0x28')](saveUpdates(_0x2a5a27[_0x0d04('0x4f')],null))[_0x0d04('0x28')](respondWithResult(_0x24925d,null))[_0x0d04('0x49')](handleError(_0x24925d,null));};exports[_0x0d04('0x27')]=function(_0x32cbe8,_0x4b4874){return db['ServicenowField'][_0x0d04('0x4d')]({'where':{'id':_0x32cbe8[_0x0d04('0x51')]['id']}})[_0x0d04('0x28')](handleEntityNotFound(_0x4b4874,null))[_0x0d04('0x28')](removeEntity(_0x4b4874,null))[_0x0d04('0x49')](handleError(_0x4b4874,null));}; \ No newline at end of file +var _0xb9de=['update','then','destroy','stack','name','send','ServicenowField','rawAttributes','fieldName','key','model','query','keys','filters','intersection','fields','attributes','length','nolimit','sort','filter','merge','where','map','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','params','create','body','find','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','crypto','jsforce','desk.js','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','end','offset','undefined','count','limit','Content-Range','json','reject','save'];(function(_0x1fc122,_0x5e2c17){var _0xa2cb13=function(_0x263b13){while(--_0x263b13){_0x1fc122['push'](_0x1fc122['shift']());}};_0xa2cb13(++_0x5e2c17);}(_0xb9de,0x67));var _0xeb9d=function(_0x57ade6,_0x154235){_0x57ade6=_0x57ade6-0x0;var _0x52f9ac=_0xb9de[_0x57ade6];return _0x52f9ac;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xeb9d('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0xeb9d('0x1'));var rp=require(_0xeb9d('0x2'));var moment=require(_0xeb9d('0x3'));var BPromise=require(_0xeb9d('0x4'));var Mustache=require(_0xeb9d('0x5'));var util=require(_0xeb9d('0x6'));var path=require(_0xeb9d('0x7'));var sox=require(_0xeb9d('0x8'));var csv=require(_0xeb9d('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require('squel');var crypto=require(_0xeb9d('0xa'));var jsforce=require(_0xeb9d('0xb'));var deskjs=require(_0xeb9d('0xc'));var toCsv=require(_0xeb9d('0x9'));var querystring=require('querystring');var Papa=require(_0xeb9d('0xd'));var Redis=require(_0xeb9d('0xe'));var authService=require('../../components/auth/service');var qs=require(_0xeb9d('0xf'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xeb9d('0x10'));var logger=require('../../config/logger')('api');var utils=require(_0xeb9d('0x11'));var config=require(_0xeb9d('0x12'));var licenseUtil=require(_0xeb9d('0x13'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x4cc434,_0x50339c){_0x50339c=_0x50339c||0xcc;return function(_0x2d0bec){if(_0x2d0bec){return _0x4cc434[_0xeb9d('0x14')](_0x50339c);}return _0x4cc434[_0xeb9d('0x15')](_0x50339c)[_0xeb9d('0x16')]();};}function respondWithResult(_0x5d39b3,_0x4f2ba0){_0x4f2ba0=_0x4f2ba0||0xc8;return function(_0x420e77){if(_0x420e77){return _0x5d39b3[_0xeb9d('0x15')](_0x4f2ba0)['json'](_0x420e77);}};}function respondWithFilteredResult(_0x260121,_0x3f62ac){return function(_0x179194){if(_0x179194){var _0x4eed67=typeof _0x3f62ac[_0xeb9d('0x17')]===_0xeb9d('0x18')&&typeof _0x3f62ac['limit']===_0xeb9d('0x18');var _0xf1b001=_0x179194[_0xeb9d('0x19')];var _0x34ab17=_0x4eed67?0x0:_0x3f62ac[_0xeb9d('0x17')];var _0x172d66=_0x4eed67?_0x179194[_0xeb9d('0x19')]:_0x3f62ac[_0xeb9d('0x17')]+_0x3f62ac[_0xeb9d('0x1a')];var _0x164110;if(_0x172d66>=_0xf1b001){_0x172d66=_0xf1b001;_0x164110=0xc8;}else{_0x164110=0xce;}_0x260121['status'](_0x164110);return _0x260121['set'](_0xeb9d('0x1b'),_0x34ab17+'-'+_0x172d66+'/'+_0xf1b001)[_0xeb9d('0x1c')](_0x179194);}return null;};}function patchUpdates(_0x5804bd){return function(_0x1f46a7){try{jsonpatch['apply'](_0x1f46a7,_0x5804bd,!![]);}catch(_0x264e7c){return BPromise[_0xeb9d('0x1d')](_0x264e7c);}return _0x1f46a7[_0xeb9d('0x1e')]();};}function saveUpdates(_0x52b023,_0x56c908){return function(_0x1c584b){if(_0x1c584b){return _0x1c584b[_0xeb9d('0x1f')](_0x52b023)[_0xeb9d('0x20')](function(_0x400dab){return _0x400dab;});}return null;};}function removeEntity(_0x2c8206,_0x3424e3){return function(_0x2fb4b7){if(_0x2fb4b7){return _0x2fb4b7[_0xeb9d('0x21')]()[_0xeb9d('0x20')](function(){_0x2c8206['status'](0xcc)[_0xeb9d('0x16')]();});}};}function handleEntityNotFound(_0x3a4aed,_0x2dc566){return function(_0x2e493c){if(!_0x2e493c){_0x3a4aed[_0xeb9d('0x14')](0x194);}return _0x2e493c;};}function handleError(_0x2ad579,_0x1fe04d){_0x1fe04d=_0x1fe04d||0x1f4;return function(_0x372b39){logger['error'](_0x372b39[_0xeb9d('0x22')]);if(_0x372b39[_0xeb9d('0x23')]){delete _0x372b39[_0xeb9d('0x23')];}_0x2ad579[_0xeb9d('0x15')](_0x1fe04d)[_0xeb9d('0x24')](_0x372b39);};}exports['index']=function(_0x62f6bf,_0x584b97){var _0x23c108={},_0x2e1bec={},_0xca6ced={'count':0x0,'rows':[]};var _0x4bfdb1=_['map'](db[_0xeb9d('0x25')][_0xeb9d('0x26')],function(_0x267b19){return{'name':_0x267b19[_0xeb9d('0x27')],'type':_0x267b19['type'][_0xeb9d('0x28')]};});_0x2e1bec[_0xeb9d('0x29')]=_['map'](_0x4bfdb1,_0xeb9d('0x23'));_0x2e1bec[_0xeb9d('0x2a')]=_[_0xeb9d('0x2b')](_0x62f6bf[_0xeb9d('0x2a')]);_0x2e1bec[_0xeb9d('0x2c')]=_['intersection'](_0x2e1bec[_0xeb9d('0x29')],_0x2e1bec[_0xeb9d('0x2a')]);_0x23c108['attributes']=_[_0xeb9d('0x2d')](_0x2e1bec[_0xeb9d('0x29')],qs[_0xeb9d('0x2e')](_0x62f6bf[_0xeb9d('0x2a')][_0xeb9d('0x2e')]));_0x23c108[_0xeb9d('0x2f')]=_0x23c108[_0xeb9d('0x2f')][_0xeb9d('0x30')]?_0x23c108[_0xeb9d('0x2f')]:_0x2e1bec[_0xeb9d('0x29')];if(!_0x62f6bf[_0xeb9d('0x2a')]['hasOwnProperty'](_0xeb9d('0x31'))){_0x23c108[_0xeb9d('0x1a')]=qs[_0xeb9d('0x1a')](_0x62f6bf[_0xeb9d('0x2a')][_0xeb9d('0x1a')]);_0x23c108[_0xeb9d('0x17')]=qs[_0xeb9d('0x17')](_0x62f6bf[_0xeb9d('0x2a')]['offset']);}_0x23c108['order']=qs[_0xeb9d('0x32')](_0x62f6bf[_0xeb9d('0x2a')][_0xeb9d('0x32')]);_0x23c108['where']=qs[_0xeb9d('0x2c')](_['pick'](_0x62f6bf[_0xeb9d('0x2a')],_0x2e1bec[_0xeb9d('0x2c')]),_0x4bfdb1);if(_0x62f6bf[_0xeb9d('0x2a')][_0xeb9d('0x33')]){_0x23c108['where']=_[_0xeb9d('0x34')](_0x23c108[_0xeb9d('0x35')],{'$or':_[_0xeb9d('0x36')](_0x4bfdb1,function(_0x4e3be0){if(_0x4e3be0['type']!==_0xeb9d('0x37')){var _0xfbd74d={};_0xfbd74d[_0x4e3be0['name']]={'$like':'%'+_0x62f6bf[_0xeb9d('0x2a')]['filter']+'%'};return _0xfbd74d;}})});}_0x23c108=_[_0xeb9d('0x34')]({},_0x23c108,_0x62f6bf[_0xeb9d('0x38')]);var _0x8716f7={'where':_0x23c108[_0xeb9d('0x35')]};return db['ServicenowField'][_0xeb9d('0x19')](_0x8716f7)[_0xeb9d('0x20')](function(_0x53832d){_0xca6ced[_0xeb9d('0x19')]=_0x53832d;if(_0x62f6bf['query'][_0xeb9d('0x39')]){_0x23c108[_0xeb9d('0x3a')]=[{'all':!![]}];}return db[_0xeb9d('0x25')][_0xeb9d('0x3b')](_0x23c108);})[_0xeb9d('0x20')](function(_0x1c5242){_0xca6ced[_0xeb9d('0x3c')]=_0x1c5242;return _0xca6ced;})['then'](respondWithFilteredResult(_0x584b97,_0x23c108))[_0xeb9d('0x3d')](handleError(_0x584b97,null));};exports[_0xeb9d('0x3e')]=function(_0x8c5307,_0x2d06d9){var _0x5332c9={'raw':!![],'where':{'id':_0x8c5307[_0xeb9d('0x3f')]['id']}},_0x10bfec={};_0x10bfec[_0xeb9d('0x29')]=_[_0xeb9d('0x2b')](db[_0xeb9d('0x25')][_0xeb9d('0x26')]);_0x10bfec[_0xeb9d('0x2a')]=_['keys'](_0x8c5307['query']);_0x10bfec['filters']=_[_0xeb9d('0x2d')](_0x10bfec[_0xeb9d('0x29')],_0x10bfec[_0xeb9d('0x2a')]);_0x5332c9[_0xeb9d('0x2f')]=_[_0xeb9d('0x2d')](_0x10bfec[_0xeb9d('0x29')],qs[_0xeb9d('0x2e')](_0x8c5307[_0xeb9d('0x2a')]['fields']));_0x5332c9[_0xeb9d('0x2f')]=_0x5332c9[_0xeb9d('0x2f')][_0xeb9d('0x30')]?_0x5332c9[_0xeb9d('0x2f')]:_0x10bfec[_0xeb9d('0x29')];if(_0x8c5307[_0xeb9d('0x2a')][_0xeb9d('0x39')]){_0x5332c9[_0xeb9d('0x3a')]=[{'all':!![]}];}_0x5332c9=_[_0xeb9d('0x34')]({},_0x5332c9,_0x8c5307[_0xeb9d('0x38')]);return db['ServicenowField']['find'](_0x5332c9)[_0xeb9d('0x20')](handleEntityNotFound(_0x2d06d9,null))[_0xeb9d('0x20')](respondWithResult(_0x2d06d9,null))[_0xeb9d('0x3d')](handleError(_0x2d06d9,null));};exports[_0xeb9d('0x40')]=function(_0x5d283f,_0x452dcf){return db[_0xeb9d('0x25')]['create'](_0x5d283f[_0xeb9d('0x41')],{})[_0xeb9d('0x20')](respondWithResult(_0x452dcf,0xc9))[_0xeb9d('0x3d')](handleError(_0x452dcf,null));};exports[_0xeb9d('0x1f')]=function(_0x2d436a,_0x1356e2){if(_0x2d436a[_0xeb9d('0x41')]['id']){delete _0x2d436a[_0xeb9d('0x41')]['id'];}return db['ServicenowField'][_0xeb9d('0x42')]({'where':{'id':_0x2d436a['params']['id']}})[_0xeb9d('0x20')](handleEntityNotFound(_0x1356e2,null))['then'](saveUpdates(_0x2d436a[_0xeb9d('0x41')],null))['then'](respondWithResult(_0x1356e2,null))[_0xeb9d('0x3d')](handleError(_0x1356e2,null));};exports['destroy']=function(_0x5bc183,_0x2aed0b){return db[_0xeb9d('0x25')][_0xeb9d('0x42')]({'where':{'id':_0x5bc183[_0xeb9d('0x3f')]['id']}})['then'](handleEntityNotFound(_0x2aed0b,null))[_0xeb9d('0x20')](removeEntity(_0x2aed0b,null))['catch'](handleError(_0x2aed0b,null));}; \ No newline at end of file diff --git a/server/api/intServicenowField/intServicenowField.model.js b/server/api/intServicenowField/intServicenowField.model.js index 0b4bedf..2d2df70 100644 --- a/server/api/intServicenowField/intServicenowField.model.js +++ b/server/api/intServicenowField/intServicenowField.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9fc3=['./intServicenowField.attributes','exports','define','ServicenowField','servicenow_unique_index','idField','FieldId','lodash','util','../../config/logger','api','moment','path','rimraf'];(function(_0x7b2e19,_0x25dcda){var _0x4536a4=function(_0xf46e0f){while(--_0xf46e0f){_0x7b2e19['push'](_0x7b2e19['shift']());}};_0x4536a4(++_0x25dcda);}(_0x9fc3,0xcb));var _0x39fc=function(_0x2c2aed,_0x33b80d){_0x2c2aed=_0x2c2aed-0x0;var _0x67f2fb=_0x9fc3[_0x2c2aed];return _0x67f2fb;};'use strict';var _=require(_0x39fc('0x0'));var util=require(_0x39fc('0x1'));var logger=require(_0x39fc('0x2'))(_0x39fc('0x3'));var moment=require(_0x39fc('0x4'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x39fc('0x5'));var rimraf=require(_0x39fc('0x6'));var config=require('../../config/environment');var attributes=require(_0x39fc('0x7'));module[_0x39fc('0x8')]=function(_0x1ad379,_0x4496d0){return _0x1ad379[_0x39fc('0x9')](_0x39fc('0xa'),attributes,{'tableName':'int_servicenow_fields','paranoid':![],'indexes':[{'name':_0x39fc('0xb'),'fields':[_0x39fc('0xc'),_0x39fc('0xd')],'unique':!![]}],'timestamps':!![]});}; \ No newline at end of file +var _0x6f4d=['lodash','../../config/logger','moment','bluebird','rimraf','../../config/environment','exports','ServicenowField','int_servicenow_fields','FieldId'];(function(_0x35a6b5,_0x4bee3b){var _0x5d0faf=function(_0x23395c){while(--_0x23395c){_0x35a6b5['push'](_0x35a6b5['shift']());}};_0x5d0faf(++_0x4bee3b);}(_0x6f4d,0x6e));var _0xd6f4=function(_0xd815f3,_0x1fe7e5){_0xd815f3=_0xd815f3-0x0;var _0x4daa18=_0x6f4d[_0xd815f3];return _0x4daa18;};'use strict';var _=require(_0xd6f4('0x0'));var util=require('util');var logger=require(_0xd6f4('0x1'))('api');var moment=require(_0xd6f4('0x2'));var BPromise=require(_0xd6f4('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xd6f4('0x4'));var config=require(_0xd6f4('0x5'));var attributes=require('./intServicenowField.attributes');module[_0xd6f4('0x6')]=function(_0x47bef6,_0x380b4){return _0x47bef6['define'](_0xd6f4('0x7'),attributes,{'tableName':_0xd6f4('0x8'),'paranoid':![],'indexes':[{'name':'servicenow_unique_index','fields':['idField',_0xd6f4('0x9')],'unique':!![]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intServicenowField/intServicenowField.rpc.js b/server/api/intServicenowField/intServicenowField.rpc.js index f111f76..3d3ad43 100644 --- a/server/api/intServicenowField/intServicenowField.rpc.js +++ b/server/api/intServicenowField/intServicenowField.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xcb91=['stringify','error','code','message','catch','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','http','request','info','ServicenowField,\x20%s,\x20%s','request\x20sent','debug','ServicenowField,\x20%s,\x20%s,\x20%s'];(function(_0x1e4016,_0x16a60f){var _0x21b7f0=function(_0x5d71d2){while(--_0x5d71d2){_0x1e4016['push'](_0x1e4016['shift']());}};_0x21b7f0(++_0x16a60f);}(_0xcb91,0x1a9));var _0x1cb9=function(_0x466bc5,_0x3a0f2a){_0x466bc5=_0x466bc5-0x0;var _0x138952=_0xcb91[_0x466bc5];return _0x138952;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x1cb9('0x0'));var BPromise=require(_0x1cb9('0x1'));var rs=require(_0x1cb9('0x2'));var fs=require('fs');var Redis=require(_0x1cb9('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x1cb9('0x4'));var logger=require(_0x1cb9('0x5'))('rpc');var config=require(_0x1cb9('0x6'));var jayson=require(_0x1cb9('0x7'));var client=jayson['client'][_0x1cb9('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x3f7deb,_0x4ffe20,_0x38737d){return new BPromise(function(_0x12567c,_0x59d1be){return client[_0x1cb9('0x9')](_0x3f7deb,_0x38737d)['then'](function(_0x567139){logger[_0x1cb9('0xa')](_0x1cb9('0xb'),_0x4ffe20,_0x1cb9('0xc'));logger[_0x1cb9('0xd')](_0x1cb9('0xe'),_0x4ffe20,'request\x20sent',JSON[_0x1cb9('0xf')](_0x567139));if(_0x567139[_0x1cb9('0x10')]){if(_0x567139[_0x1cb9('0x10')][_0x1cb9('0x11')]===0x1f4){logger[_0x1cb9('0x10')]('ServicenowField,\x20%s,\x20%s',_0x4ffe20,_0x567139['error']['message']);return _0x59d1be(_0x567139[_0x1cb9('0x10')][_0x1cb9('0x12')]);}logger[_0x1cb9('0x10')](_0x1cb9('0xb'),_0x4ffe20,_0x567139['error'][_0x1cb9('0x12')]);return _0x12567c(_0x567139[_0x1cb9('0x10')][_0x1cb9('0x12')]);}else{logger[_0x1cb9('0xa')](_0x1cb9('0xb'),_0x4ffe20,'request\x20sent');_0x12567c(_0x567139['result'][_0x1cb9('0x12')]);}})[_0x1cb9('0x13')](function(_0x3904b7){logger[_0x1cb9('0x10')](_0x1cb9('0xb'),_0x4ffe20,_0x3904b7);_0x59d1be(_0x3904b7);});});} \ No newline at end of file +var _0x9bde=['code','message','ServicenowField,\x20%s,\x20%s','result','catch','util','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','debug','ServicenowField,\x20%s,\x20%s,\x20%s','request\x20sent','error'];(function(_0x5cfd3a,_0x4f74c1){var _0x306e38=function(_0x9804ce){while(--_0x9804ce){_0x5cfd3a['push'](_0x5cfd3a['shift']());}};_0x306e38(++_0x4f74c1);}(_0x9bde,0xe1));var _0xe9bd=function(_0xa8f52b,_0x36f81e){_0xa8f52b=_0xa8f52b-0x0;var _0xb63d51=_0x9bde[_0xa8f52b];return _0xb63d51;};'use strict';var _=require('lodash');var util=require(_0xe9bd('0x0'));var moment=require('moment');var BPromise=require(_0xe9bd('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xe9bd('0x2'));var db=require(_0xe9bd('0x3'))['db'];var utils=require(_0xe9bd('0x4'));var logger=require(_0xe9bd('0x5'))(_0xe9bd('0x6'));var config=require(_0xe9bd('0x7'));var jayson=require(_0xe9bd('0x8'));var client=jayson['client'][_0xe9bd('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x5f18fe,_0x22a438,_0xa66ae2){return new BPromise(function(_0x2d5c75,_0x3ef9e3){return client[_0xe9bd('0xa')](_0x5f18fe,_0xa66ae2)[_0xe9bd('0xb')](function(_0x439abc){logger[_0xe9bd('0xc')]('ServicenowField,\x20%s,\x20%s',_0x22a438,'request\x20sent');logger[_0xe9bd('0xd')](_0xe9bd('0xe'),_0x22a438,_0xe9bd('0xf'),JSON['stringify'](_0x439abc));if(_0x439abc[_0xe9bd('0x10')]){if(_0x439abc[_0xe9bd('0x10')][_0xe9bd('0x11')]===0x1f4){logger[_0xe9bd('0x10')]('ServicenowField,\x20%s,\x20%s',_0x22a438,_0x439abc[_0xe9bd('0x10')]['message']);return _0x3ef9e3(_0x439abc[_0xe9bd('0x10')][_0xe9bd('0x12')]);}logger[_0xe9bd('0x10')]('ServicenowField,\x20%s,\x20%s',_0x22a438,_0x439abc['error'][_0xe9bd('0x12')]);return _0x2d5c75(_0x439abc[_0xe9bd('0x10')][_0xe9bd('0x12')]);}else{logger[_0xe9bd('0xc')](_0xe9bd('0x13'),_0x22a438,_0xe9bd('0xf'));_0x2d5c75(_0x439abc[_0xe9bd('0x14')]['message']);}})[_0xe9bd('0x15')](function(_0x464a1b){logger[_0xe9bd('0x10')]('ServicenowField,\x20%s,\x20%s',_0x22a438,_0x464a1b);_0x3ef9e3(_0x464a1b);});});} \ No newline at end of file diff --git a/server/api/intSugarcrmAccount/index.js b/server/api/intSugarcrmAccount/index.js index 0cac065..d3babff 100644 --- a/server/api/intSugarcrmAccount/index.js +++ b/server/api/intSugarcrmAccount/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./intSugarcrmAccount.controller','get','index','/:id','getConfigurations','/:id/fields','isAuthenticated','getFields','post','addConfiguration','put','update','destroy','exports','multer','util','path'];(function(_0x3b485f,_0x2d44ff){var _0x277d2c=function(_0x11b3b6){while(--_0x11b3b6){_0x3b485f['push'](_0x3b485f['shift']());}};_0x277d2c(++_0x2d44ff);}(_0xa9e0,0x123));var _0x0a9e=function(_0x4bfac3,_0x58324d){_0x4bfac3=_0x4bfac3-0x0;var _0x15f0f2=_0xa9e0[_0x4bfac3];return _0x15f0f2;};'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('0x8')]('/:id/configurations',auth['isAuthenticated'](),controller[_0x0a9e('0xb')]);router[_0x0a9e('0x8')](_0x0a9e('0xc'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0xe')]);router[_0x0a9e('0xf')]('/',auth['isAuthenticated'](),controller['create']);router['post']('/:id/configurations',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x10')]);router[_0x0a9e('0x11')](_0x0a9e('0xa'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x12')]);router['delete'](_0x0a9e('0xa'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x13')]);module[_0x0a9e('0x14')]=router; \ No newline at end of file +var _0xa9e0=['Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./intSugarcrmAccount.controller','get','index','/:id','getConfigurations','/:id/fields','isAuthenticated','getFields','post','addConfiguration','put','update','destroy','exports','multer','util','path'];(function(_0x1b5df2,_0x48f81c){var _0x2b34af=function(_0x219f89){while(--_0x219f89){_0x1b5df2['push'](_0x1b5df2['shift']());}};_0x2b34af(++_0x48f81c);}(_0xa9e0,0x123));var _0x0a9e=function(_0x3899d1,_0x4aa04c){_0x3899d1=_0x3899d1-0x0;var _0xeb4a7d=_0xa9e0[_0x3899d1];return _0xeb4a7d;};'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('0x8')]('/:id/configurations',auth['isAuthenticated'](),controller[_0x0a9e('0xb')]);router[_0x0a9e('0x8')](_0x0a9e('0xc'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0xe')]);router[_0x0a9e('0xf')]('/',auth['isAuthenticated'](),controller['create']);router['post']('/:id/configurations',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x10')]);router[_0x0a9e('0x11')](_0x0a9e('0xa'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x12')]);router['delete'](_0x0a9e('0xa'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x13')]);module[_0x0a9e('0x14')]=router; \ No newline at end of file diff --git a/server/api/intSugarcrmAccount/intSugarcrmAccount.attributes.js b/server/api/intSugarcrmAccount/intSugarcrmAccount.attributes.js index 306241e..22ebda4 100644 --- a/server/api/intSugarcrmAccount/intSugarcrmAccount.attributes.js +++ b/server/api/intSugarcrmAccount/intSugarcrmAccount.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['remoteUri','sequelize','exports','STRING','username'];(function(_0x4d7477,_0x5070b8){var _0x1a1ca8=function(_0x221036){while(--_0x221036){_0x4d7477['push'](_0x4d7477['shift']());}};_0x1a1ca8(++_0x5070b8);}(_0xa9e0,0x123));var _0x0a9e=function(_0x5c351c,_0x2046d8){_0x5c351c=_0x5c351c-0x0;var _0x26f3b3=_0xa9e0[_0x5c351c];return _0x26f3b3;};'use strict';var Sequelize=require(_0x0a9e('0x0'));module[_0x0a9e('0x1')]={'name':{'type':Sequelize[_0x0a9e('0x2')]},'description':{'type':Sequelize['STRING']},'username':{'type':Sequelize['STRING'],'unique':_0x0a9e('0x3')},'password':{'type':Sequelize['STRING']},'remoteUri':{'type':Sequelize[_0x0a9e('0x2')],'unique':_0x0a9e('0x4')},'serverUrl':{'type':Sequelize[_0x0a9e('0x2')],'allowNull':![]}}; \ No newline at end of file +var _0xa9e0=['remoteUri','sequelize','exports','STRING','username'];(function(_0x4170e4,_0x166757){var _0x1c85fa=function(_0x3ebabe){while(--_0x3ebabe){_0x4170e4['push'](_0x4170e4['shift']());}};_0x1c85fa(++_0x166757);}(_0xa9e0,0x123));var _0x0a9e=function(_0x3c2a69,_0x4c8b41){_0x3c2a69=_0x3c2a69-0x0;var _0x596bc8=_0xa9e0[_0x3c2a69];return _0x596bc8;};'use strict';var Sequelize=require(_0x0a9e('0x0'));module[_0x0a9e('0x1')]={'name':{'type':Sequelize[_0x0a9e('0x2')]},'description':{'type':Sequelize['STRING']},'username':{'type':Sequelize['STRING'],'unique':_0x0a9e('0x3')},'password':{'type':Sequelize['STRING']},'remoteUri':{'type':Sequelize[_0x0a9e('0x2')],'unique':_0x0a9e('0x4')},'serverUrl':{'type':Sequelize[_0x0a9e('0x2')],'allowNull':![]}}; \ No newline at end of file diff --git a/server/api/intSugarcrmAccount/intSugarcrmAccount.controller.js b/server/api/intSugarcrmAccount/intSugarcrmAccount.controller.js index 036b52e..5f224fa 100644 --- a/server/api/intSugarcrmAccount/intSugarcrmAccount.controller.js +++ b/server/api/intSugarcrmAccount/intSugarcrmAccount.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x04ce=['../../components/integrations/configuration','jayson/promise','client','http','request','then','info','SugarcrmAccount,\x20%s,\x20%s','request\x20sent','debug','SugarcrmAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','status','end','json','offset','undefined','count','limit','set','Content-Range','apply','save','destroy','name','send','index','map','SugarcrmAccount','rawAttributes','fieldName','type','key','model','query','attributes','intersection','fields','hasOwnProperty','nolimit','order','sort','where','pick','filters','filter','merge','VIRTUAL','options','includeAll','include','findAll','params','keys','length','create','body','find','getConfigurations','findOne','SugarcrmConfiguration','AccountId','Subjects','getSubjects','channel','Descriptions','getDescriptions','SugarcrmField','getFields','assigned_user_id','date_start','duration_hours','duration_minutes','parent_type','parent_name','direction','username','password','remoteUri','slice','substring','format','%s%s','JSON','PLAIN','xCALLY\x20Motion\x20Integration','Invalid\x20Login','Password\x20Expired','POST','values','module_fields','includes','label','endsWith','test','statusCode','getFields,\x20%s,\x20%s,\x20%s','Wrong\x20credentials','rimraf','request-promise','moment','bluebird','mustache','util','to-csv','fs-extra','crypto','jsforce','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util'];(function(_0x453536,_0x46622b){var _0x252fb0=function(_0x14e766){while(--_0x14e766){_0x453536['push'](_0x453536['shift']());}};_0x252fb0(++_0x46622b);}(_0x04ce,0x15d));var _0xe04c=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0x04ce[_0xa464c9];return _0x3d73c4;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xe04c('0x0'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xe04c('0x1'));var moment=require(_0xe04c('0x2'));var BPromise=require(_0xe04c('0x3'));var Mustache=require(_0xe04c('0x4'));var util=require(_0xe04c('0x5'));var path=require('path');var sox=require('sox');var csv=require(_0xe04c('0x6'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xe04c('0x7'));var _=require('lodash');var squel=require('squel');var crypto=require(_0xe04c('0x8'));var jsforce=require(_0xe04c('0x9'));var deskjs=require('desk.js');var toCsv=require(_0xe04c('0x6'));var querystring=require(_0xe04c('0xa'));var Papa=require(_0xe04c('0xb'));var Redis=require(_0xe04c('0xc'));var authService=require('../../components/auth/service');var qs=require(_0xe04c('0xd'));var as=require(_0xe04c('0xe'));var hardwareService=require(_0xe04c('0xf'));var logger=require(_0xe04c('0x10'))('api');var utils=require(_0xe04c('0x11'));var config=require(_0xe04c('0x12'));var licenseUtil=require(_0xe04c('0x13'));var db=require('../../mysqldb')['db'];var integrations=require(_0xe04c('0x14'));var jayson=require(_0xe04c('0x15'));var client=jayson[_0xe04c('0x16')][_0xe04c('0x17')]({'port':0x232a});function respondWithRpcPromise(_0x2cc850,_0x1722c7,_0x253ade,_0x46e6b8){return new BPromise(function(_0x27664a,_0x5d3016){var _0x448dca=_0x46e6b8||client;return _0x448dca[_0xe04c('0x18')](_0x2cc850,_0x253ade)[_0xe04c('0x19')](function(_0x8c1758){logger[_0xe04c('0x1a')](_0xe04c('0x1b'),_0x1722c7,_0xe04c('0x1c'));logger[_0xe04c('0x1d')](_0xe04c('0x1e'),_0x1722c7,_0xe04c('0x1c'),JSON[_0xe04c('0x1f')](_0x8c1758));if(_0x8c1758['error']){if(_0x8c1758[_0xe04c('0x20')][_0xe04c('0x21')]===0x1f4){logger[_0xe04c('0x20')](_0xe04c('0x1b'),_0x1722c7,_0x8c1758[_0xe04c('0x20')][_0xe04c('0x22')]);return _0x5d3016(_0x8c1758[_0xe04c('0x20')]['message']);}logger['error']('SugarcrmAccount,\x20%s,\x20%s',_0x1722c7,_0x8c1758['error'][_0xe04c('0x22')]);return _0x27664a(_0x8c1758[_0xe04c('0x20')][_0xe04c('0x22')]);}else{logger[_0xe04c('0x1a')](_0xe04c('0x1b'),_0x1722c7,'request\x20sent');_0x27664a(_0x8c1758[_0xe04c('0x23')]['message']);}})[_0xe04c('0x24')](function(_0x1ed74a){logger[_0xe04c('0x20')](_0xe04c('0x1b'),_0x1722c7,_0x1ed74a);_0x5d3016(_0x1ed74a);});});}function respondWithStatusCode(_0x3d150a,_0x3b198c){_0x3b198c=_0x3b198c||0xcc;return function(_0xe6371a){if(_0xe6371a){return _0x3d150a['sendStatus'](_0x3b198c);}return _0x3d150a[_0xe04c('0x25')](_0x3b198c)[_0xe04c('0x26')]();};}function respondWithResult(_0x29ee7e,_0x37df90){_0x37df90=_0x37df90||0xc8;return function(_0x280c4d){if(_0x280c4d){return _0x29ee7e[_0xe04c('0x25')](_0x37df90)[_0xe04c('0x27')](_0x280c4d);}};}function respondWithFilteredResult(_0x238dc2,_0x9d4ef5){return function(_0x1c4088){if(_0x1c4088){var _0x4da8df=typeof _0x9d4ef5[_0xe04c('0x28')]===_0xe04c('0x29')&&typeof _0x9d4ef5['limit']===_0xe04c('0x29');var _0x26ee2b=_0x1c4088[_0xe04c('0x2a')];var _0x452070=_0x4da8df?0x0:_0x9d4ef5['offset'];var _0x5b4d55=_0x4da8df?_0x1c4088[_0xe04c('0x2a')]:_0x9d4ef5['offset']+_0x9d4ef5[_0xe04c('0x2b')];var _0x375fc5;if(_0x5b4d55>=_0x26ee2b){_0x5b4d55=_0x26ee2b;_0x375fc5=0xc8;}else{_0x375fc5=0xce;}_0x238dc2['status'](_0x375fc5);return _0x238dc2[_0xe04c('0x2c')](_0xe04c('0x2d'),_0x452070+'-'+_0x5b4d55+'/'+_0x26ee2b)['json'](_0x1c4088);}return null;};}function patchUpdates(_0x2c3dbf){return function(_0x2e72bf){try{jsonpatch[_0xe04c('0x2e')](_0x2e72bf,_0x2c3dbf,!![]);}catch(_0x147edb){return BPromise['reject'](_0x147edb);}return _0x2e72bf[_0xe04c('0x2f')]();};}function saveUpdates(_0x3d01bc,_0x22a9bf){return function(_0x5605cc){if(_0x5605cc){return _0x5605cc['update'](_0x3d01bc)[_0xe04c('0x19')](function(_0x12ea0b){return _0x12ea0b;});}return null;};}function removeEntity(_0x4b0305,_0x5771bd){return function(_0x23d689){if(_0x23d689){return _0x23d689[_0xe04c('0x30')]()['then'](function(){_0x4b0305[_0xe04c('0x25')](0xcc)[_0xe04c('0x26')]();});}};}function handleEntityNotFound(_0x11febf,_0x445e4f){return function(_0x31f339){if(!_0x31f339){_0x11febf['sendStatus'](0x194);}return _0x31f339;};}function handleError(_0xa9f986,_0x388e7){_0x388e7=_0x388e7||0x1f4;return function(_0x9ab68){logger[_0xe04c('0x20')](_0x9ab68['stack']);if(_0x9ab68['name']){delete _0x9ab68[_0xe04c('0x31')];}_0xa9f986[_0xe04c('0x25')](_0x388e7)[_0xe04c('0x32')](_0x9ab68);};}exports[_0xe04c('0x33')]=function(_0x26a889,_0x1bab62){var _0x1551a5={},_0x28f319={},_0x3d4c46={'count':0x0,'rows':[]};var _0x63a11b=_[_0xe04c('0x34')](db[_0xe04c('0x35')][_0xe04c('0x36')],function(_0x49152e){return{'name':_0x49152e[_0xe04c('0x37')],'type':_0x49152e[_0xe04c('0x38')][_0xe04c('0x39')]};});_0x28f319[_0xe04c('0x3a')]=_[_0xe04c('0x34')](_0x63a11b,'name');_0x28f319[_0xe04c('0x3b')]=_['keys'](_0x26a889[_0xe04c('0x3b')]);_0x28f319['filters']=_['intersection'](_0x28f319[_0xe04c('0x3a')],_0x28f319['query']);_0x1551a5[_0xe04c('0x3c')]=_[_0xe04c('0x3d')](_0x28f319[_0xe04c('0x3a')],qs[_0xe04c('0x3e')](_0x26a889[_0xe04c('0x3b')]['fields']));_0x1551a5[_0xe04c('0x3c')]=_0x1551a5[_0xe04c('0x3c')]['length']?_0x1551a5[_0xe04c('0x3c')]:_0x28f319[_0xe04c('0x3a')];if(!_0x26a889[_0xe04c('0x3b')][_0xe04c('0x3f')](_0xe04c('0x40'))){_0x1551a5[_0xe04c('0x2b')]=qs[_0xe04c('0x2b')](_0x26a889[_0xe04c('0x3b')][_0xe04c('0x2b')]);_0x1551a5[_0xe04c('0x28')]=qs[_0xe04c('0x28')](_0x26a889[_0xe04c('0x3b')][_0xe04c('0x28')]);}_0x1551a5[_0xe04c('0x41')]=qs['sort'](_0x26a889['query'][_0xe04c('0x42')]);_0x1551a5[_0xe04c('0x43')]=qs['filters'](_[_0xe04c('0x44')](_0x26a889['query'],_0x28f319[_0xe04c('0x45')]),_0x63a11b);if(_0x26a889[_0xe04c('0x3b')][_0xe04c('0x46')]){_0x1551a5[_0xe04c('0x43')]=_[_0xe04c('0x47')](_0x1551a5[_0xe04c('0x43')],{'$or':_[_0xe04c('0x34')](_0x63a11b,function(_0x370b1f){if(_0x370b1f[_0xe04c('0x38')]!==_0xe04c('0x48')){var _0x5071fd={};_0x5071fd[_0x370b1f[_0xe04c('0x31')]]={'$like':'%'+_0x26a889[_0xe04c('0x3b')]['filter']+'%'};return _0x5071fd;}})});}_0x1551a5=_[_0xe04c('0x47')]({},_0x1551a5,_0x26a889[_0xe04c('0x49')]);var _0x33b0b5={'where':_0x1551a5[_0xe04c('0x43')]};return db[_0xe04c('0x35')][_0xe04c('0x2a')](_0x33b0b5)[_0xe04c('0x19')](function(_0x4d8afc){_0x3d4c46['count']=_0x4d8afc;if(_0x26a889['query'][_0xe04c('0x4a')]){_0x1551a5[_0xe04c('0x4b')]=[{'all':!![]}];}return db[_0xe04c('0x35')][_0xe04c('0x4c')](_0x1551a5);})['then'](function(_0x456730){_0x3d4c46['rows']=_0x456730;return _0x3d4c46;})[_0xe04c('0x19')](respondWithFilteredResult(_0x1bab62,_0x1551a5))[_0xe04c('0x24')](handleError(_0x1bab62,null));};exports['show']=function(_0x72243,_0x148586){var _0x2bdbca={'raw':![],'where':{'id':_0x72243[_0xe04c('0x4d')]['id']}},_0x2caf02={};_0x2caf02['model']=_[_0xe04c('0x4e')](db[_0xe04c('0x35')][_0xe04c('0x36')]);_0x2caf02[_0xe04c('0x3b')]=_[_0xe04c('0x4e')](_0x72243[_0xe04c('0x3b')]);_0x2caf02[_0xe04c('0x45')]=_[_0xe04c('0x3d')](_0x2caf02[_0xe04c('0x3a')],_0x2caf02['query']);_0x2bdbca[_0xe04c('0x3c')]=_['intersection'](_0x2caf02['model'],qs[_0xe04c('0x3e')](_0x72243['query'][_0xe04c('0x3e')]));_0x2bdbca[_0xe04c('0x3c')]=_0x2bdbca['attributes'][_0xe04c('0x4f')]?_0x2bdbca[_0xe04c('0x3c')]:_0x2caf02[_0xe04c('0x3a')];if(_0x72243[_0xe04c('0x3b')]['includeAll']){_0x2bdbca['include']=[{'all':!![]}];}_0x2bdbca=_[_0xe04c('0x47')]({},_0x2bdbca,_0x72243[_0xe04c('0x49')]);return db['SugarcrmAccount']['find'](_0x2bdbca)['then'](handleEntityNotFound(_0x148586,null))[_0xe04c('0x19')](respondWithResult(_0x148586,null))[_0xe04c('0x24')](handleError(_0x148586,null));};exports[_0xe04c('0x50')]=function(_0x2c6c63,_0x4631e3){return db[_0xe04c('0x35')][_0xe04c('0x50')](_0x2c6c63[_0xe04c('0x51')],{})['then'](respondWithResult(_0x4631e3,0xc9))[_0xe04c('0x24')](handleError(_0x4631e3,null));};exports['update']=function(_0x393681,_0x4cfc7e){if(_0x393681[_0xe04c('0x51')]['id']){delete _0x393681[_0xe04c('0x51')]['id'];}return db[_0xe04c('0x35')]['find']({'where':{'id':_0x393681[_0xe04c('0x4d')]['id']}})['then'](handleEntityNotFound(_0x4cfc7e,null))[_0xe04c('0x19')](saveUpdates(_0x393681[_0xe04c('0x51')],null))[_0xe04c('0x19')](respondWithResult(_0x4cfc7e,null))['catch'](handleError(_0x4cfc7e,null));};exports[_0xe04c('0x30')]=function(_0x541b5a,_0x144cf1){return db[_0xe04c('0x35')][_0xe04c('0x52')]({'where':{'id':_0x541b5a[_0xe04c('0x4d')]['id']}})['then'](handleEntityNotFound(_0x144cf1,null))[_0xe04c('0x19')](removeEntity(_0x144cf1,null))[_0xe04c('0x24')](handleError(_0x144cf1,null));};exports[_0xe04c('0x53')]=function(_0x487c9b,_0x371483,_0x38500e){var _0x379ca6={};var _0xa65ac8={};var _0x1e6e75;var _0x2b4bbf;return db[_0xe04c('0x35')][_0xe04c('0x54')]({'where':{'id':_0x487c9b[_0xe04c('0x4d')]['id']}})[_0xe04c('0x19')](handleEntityNotFound(_0x371483,null))[_0xe04c('0x19')](function(_0x41e090){if(_0x41e090){_0x1e6e75=_0x41e090;_0xa65ac8[_0xe04c('0x3a')]=_[_0xe04c('0x4e')](db[_0xe04c('0x55')]['rawAttributes']);_0xa65ac8[_0xe04c('0x3b')]=_[_0xe04c('0x4e')](_0x487c9b[_0xe04c('0x3b')]);_0xa65ac8[_0xe04c('0x45')]=_[_0xe04c('0x3d')](_0xa65ac8['model'],_0xa65ac8[_0xe04c('0x3b')]);_0x379ca6['attributes']=_[_0xe04c('0x3d')](_0xa65ac8[_0xe04c('0x3a')],qs[_0xe04c('0x3e')](_0x487c9b[_0xe04c('0x3b')][_0xe04c('0x3e')]));_0x379ca6[_0xe04c('0x3c')]=_0x379ca6['attributes']['length']?_0x379ca6[_0xe04c('0x3c')]:_0xa65ac8[_0xe04c('0x3a')];_0x379ca6[_0xe04c('0x41')]=qs[_0xe04c('0x42')](_0x487c9b[_0xe04c('0x3b')][_0xe04c('0x42')]);_0x379ca6['where']=qs[_0xe04c('0x45')](_[_0xe04c('0x44')](_0x487c9b[_0xe04c('0x3b')],_0xa65ac8[_0xe04c('0x45')]));if(_0x487c9b[_0xe04c('0x3b')]['filter']){_0x379ca6[_0xe04c('0x43')]=_[_0xe04c('0x47')](_0x379ca6[_0xe04c('0x43')],{'$or':_['map'](_0x379ca6['attributes'],function(_0x10fc85){var _0x34c771={};_0x34c771[_0x10fc85]={'$like':'%'+_0x487c9b['query'][_0xe04c('0x46')]+'%'};return _0x34c771;})});}_0x379ca6=_['merge']({},_0x379ca6,_0x487c9b[_0xe04c('0x49')]);return _0x1e6e75['getConfigurations'](_0x379ca6);}})[_0xe04c('0x19')](function(_0x35ae78){if(_0x35ae78){_0x2b4bbf=_0x35ae78[_0xe04c('0x4f')];if(!_0x487c9b[_0xe04c('0x3b')][_0xe04c('0x3f')](_0xe04c('0x40'))){_0x379ca6[_0xe04c('0x2b')]=qs[_0xe04c('0x2b')](_0x487c9b[_0xe04c('0x3b')][_0xe04c('0x2b')]);_0x379ca6[_0xe04c('0x28')]=qs[_0xe04c('0x28')](_0x487c9b[_0xe04c('0x3b')][_0xe04c('0x28')]);}return _0x1e6e75[_0xe04c('0x53')](_0x379ca6);}})[_0xe04c('0x19')](function(_0x1ec7f4){if(_0x1ec7f4){return _0x1ec7f4?{'count':_0x2b4bbf,'rows':_0x1ec7f4}:null;}})[_0xe04c('0x19')](respondWithResult(_0x371483,null))[_0xe04c('0x24')](handleError(_0x371483,null));};exports['addConfiguration']=function(_0x836462,_0x1dbfcd,_0x131587){if(_0x836462[_0xe04c('0x51')]['id']){delete _0x836462['body']['id'];}return db[_0xe04c('0x35')][_0xe04c('0x54')]({'where':{'id':_0x836462[_0xe04c('0x4d')]['id']}})[_0xe04c('0x19')](handleEntityNotFound(_0x1dbfcd,null))[_0xe04c('0x19')](function(_0xc9e2f1){if(_0xc9e2f1){_0x836462[_0xe04c('0x51')][_0xe04c('0x56')]=_0xc9e2f1['id'];_0x836462['body'][_0xe04c('0x57')]=integrations[_0xe04c('0x58')](_0x836462['body'][_0xe04c('0x59')],_0x836462['body'][_0xe04c('0x38')]);_0x836462[_0xe04c('0x51')][_0xe04c('0x5a')]=integrations[_0xe04c('0x5b')](_0x836462['body'][_0xe04c('0x59')],_0x836462[_0xe04c('0x51')][_0xe04c('0x38')]);return db[_0xe04c('0x55')][_0xe04c('0x50')](_0x836462[_0xe04c('0x51')],{'include':[{'model':db['SugarcrmField'],'as':_0xe04c('0x57')},{'model':db[_0xe04c('0x5c')],'as':_0xe04c('0x5a')}]});}return null;})[_0xe04c('0x19')](respondWithResult(_0x1dbfcd,null))[_0xe04c('0x24')](handleError(_0x1dbfcd,null));};exports[_0xe04c('0x5d')]=function(_0x11889e,_0x153758,_0x298435){var _0x52f1dc='';var _0x35df13=['id',_0xe04c('0x31'),_0xe04c('0x5e'),'created_by','description',_0xe04c('0x5f'),_0xe04c('0x60'),_0xe04c('0x61'),'parent_id',_0xe04c('0x62'),_0xe04c('0x63'),_0xe04c('0x64')];return db[_0xe04c('0x35')][_0xe04c('0x54')]({'where':{'id':_0x11889e['params']['id']},'attributes':['id',_0xe04c('0x65'),_0xe04c('0x66'),_0xe04c('0x67')]})[_0xe04c('0x19')](handleEntityNotFound(_0x153758,null))[_0xe04c('0x19')](function(_0x588635){if(_0x588635){_0x52f1dc=_0x588635['remoteUri'];var _0x3f5726=_0x52f1dc[_0xe04c('0x68')](-0x1);if(_0x3f5726==='/'){_0x52f1dc=_0x52f1dc[_0xe04c('0x69')](0x0,_0x52f1dc['lastIndexOf'](_0x3f5726));}return rp({'method':'POST','uri':util[_0xe04c('0x6a')](_0xe04c('0x6b'),_0x52f1dc,'/service/v4_1/rest.php'),'json':!![],'form':{'method':'login','input_type':_0xe04c('0x6c'),'response_type':_0xe04c('0x6c'),'rest_data':JSON[_0xe04c('0x1f')]({'user_auth':{'user_name':_0x588635[_0xe04c('0x65')],'password':_0x588635[_0xe04c('0x66')],'encryption':_0xe04c('0x6d')},'application':_0xe04c('0x6e')})}});}})['then'](function(_0xbd039a){if(_0xbd039a&&_0xbd039a[_0xe04c('0x31')]!==_0xe04c('0x6f')&&_0xbd039a[_0xe04c('0x31')]!==_0xe04c('0x70')){return rp({'method':_0xe04c('0x71'),'uri':util['format'](_0xe04c('0x6b'),_0x52f1dc,'/service/v4_1/rest.php'),'json':!![],'form':{'method':'get_module_fields','input_type':'JSON','response_type':_0xe04c('0x6c'),'rest_data':JSON['stringify']({'session':_0xbd039a['id'],'module_name':'Calls'})}})[_0xe04c('0x19')](function(_0x3becfb){if(_0x3becfb){var _0x1d22f5=_[_0xe04c('0x72')](_0x3becfb[_0xe04c('0x73')]);_['remove'](_0x1d22f5,function(_0x5b2a4b){return _0x35df13[_0xe04c('0x74')](_0x5b2a4b[_0xe04c('0x31')]);});return{'count':_0x1d22f5[_0xe04c('0x4f')],'rows':_[_0xe04c('0x34')](_0x1d22f5,function(_0x242858){return{'id':_0x242858[_0xe04c('0x31')],'name':_0x242858[_0xe04c('0x75')],'custom':_[_0xe04c('0x76')](_0x242858[_0xe04c('0x31')],'_c')?!![]:![],'options':_0x242858['options']?_['map'](_['values'](_0x242858[_0xe04c('0x49')]),function(_0x490741){return{'name':_0x490741['value'],'value':_0x490741[_0xe04c('0x31')]};}):[]};})};}})[_0xe04c('0x19')](respondWithResult(_0x153758,null))[_0xe04c('0x24')](function(_0x3900dd){var _0x39091f=_0x11889e[_0xe04c('0x3b')][_0xe04c('0x77')]?0x1f4:_0x3900dd[_0xe04c('0x78')]||0x1f4;logger[_0xe04c('0x20')](_0xe04c('0x79'),_0xe04c('0x5d'),_0x39091f,JSON[_0xe04c('0x1f')](_0x3900dd));delete _0x3900dd[_0xe04c('0x31')];if(_0x39091f===0x191){_0x39091f=0x190;}_0x153758[_0xe04c('0x25')](_0x39091f)[_0xe04c('0x32')](_0x11889e[_0xe04c('0x3b')]['test']?{'message':_0xe04c('0x7a'),'statusCode':_0x3900dd['statusCode']}:_0x3900dd);});}else{var _0x255d7c=0x1f4;_0x153758[_0xe04c('0x25')](_0x255d7c)[_0xe04c('0x32')]({'message':_0xe04c('0x7a'),'statusCode':0x190});}});}; \ No newline at end of file +var _0x6694=['label','value','statusCode','test','Wrong\x20credentials','eml-format','rimraf','zip-dir','moment','bluebird','util','path','sox','to-csv','ejs','lodash','crypto','jsforce','desk.js','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','../../components/integrations/configuration','jayson/promise','client','http','then','info','SugarcrmAccount,\x20%s,\x20%s','request\x20sent','debug','SugarcrmAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','sendStatus','status','end','json','count','offset','limit','Content-Range','reject','save','update','destroy','stack','name','send','index','map','SugarcrmAccount','rawAttributes','fieldName','type','key','model','query','filters','attributes','intersection','fields','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','include','findAll','rows','show','params','keys','length','includeAll','find','create','body','getConfigurations','findOne','SugarcrmConfiguration','options','hasOwnProperty','addConfiguration','AccountId','Descriptions','getDescriptions','Subjects','SugarcrmField','getFields','assigned_user_id','description','date_start','duration_hours','duration_minutes','parent_type','parent_name','direction','username','password','remoteUri','slice','substring','POST','format','%s%s','/service/v4_1/rest.php','login','JSON','PLAIN','xCALLY\x20Motion\x20Integration','Invalid\x20Login','get_module_fields','Calls','values','module_fields','remove','includes'];(function(_0x4ffc20,_0x5cbe59){var _0xfa74f0=function(_0xe0a633){while(--_0xe0a633){_0x4ffc20['push'](_0x4ffc20['shift']());}};_0xfa74f0(++_0x5cbe59);}(_0x6694,0x89));var _0x4669=function(_0x2abe9d,_0x4a8c6e){_0x2abe9d=_0x2abe9d-0x0;var _0x135213=_0x6694[_0x2abe9d];return _0x135213;};'use strict';var emlformat=require(_0x4669('0x0'));var rimraf=require(_0x4669('0x1'));var zipdir=require(_0x4669('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x4669('0x3'));var BPromise=require(_0x4669('0x4'));var Mustache=require('mustache');var util=require(_0x4669('0x5'));var path=require(_0x4669('0x6'));var sox=require(_0x4669('0x7'));var csv=require(_0x4669('0x8'));var ejs=require(_0x4669('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x4669('0xa'));var squel=require('squel');var crypto=require(_0x4669('0xb'));var jsforce=require(_0x4669('0xc'));var deskjs=require(_0x4669('0xd'));var toCsv=require(_0x4669('0x8'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x4669('0xe'));var authService=require(_0x4669('0xf'));var qs=require(_0x4669('0x10'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x4669('0x11'));var logger=require(_0x4669('0x12'))(_0x4669('0x13'));var utils=require(_0x4669('0x14'));var config=require(_0x4669('0x15'));var licenseUtil=require(_0x4669('0x16'));var db=require(_0x4669('0x17'))['db'];var integrations=require(_0x4669('0x18'));var jayson=require(_0x4669('0x19'));var client=jayson[_0x4669('0x1a')][_0x4669('0x1b')]({'port':0x232a});function respondWithRpcPromise(_0x36e672,_0x1678a6,_0x4bdd45,_0x409cf8){return new BPromise(function(_0x46a5bf,_0x182a08){var _0xce8c4d=_0x409cf8||client;return _0xce8c4d['request'](_0x36e672,_0x4bdd45)[_0x4669('0x1c')](function(_0x16c692){logger[_0x4669('0x1d')](_0x4669('0x1e'),_0x1678a6,_0x4669('0x1f'));logger[_0x4669('0x20')](_0x4669('0x21'),_0x1678a6,'request\x20sent',JSON[_0x4669('0x22')](_0x16c692));if(_0x16c692['error']){if(_0x16c692[_0x4669('0x23')][_0x4669('0x24')]===0x1f4){logger[_0x4669('0x23')](_0x4669('0x1e'),_0x1678a6,_0x16c692['error']['message']);return _0x182a08(_0x16c692['error'][_0x4669('0x25')]);}logger[_0x4669('0x23')]('SugarcrmAccount,\x20%s,\x20%s',_0x1678a6,_0x16c692[_0x4669('0x23')]['message']);return _0x46a5bf(_0x16c692[_0x4669('0x23')][_0x4669('0x25')]);}else{logger[_0x4669('0x1d')](_0x4669('0x1e'),_0x1678a6,_0x4669('0x1f'));_0x46a5bf(_0x16c692[_0x4669('0x26')][_0x4669('0x25')]);}})[_0x4669('0x27')](function(_0x5022d0){logger[_0x4669('0x23')](_0x4669('0x1e'),_0x1678a6,_0x5022d0);_0x182a08(_0x5022d0);});});}function respondWithStatusCode(_0x437012,_0xe995dc){_0xe995dc=_0xe995dc||0xcc;return function(_0x58b018){if(_0x58b018){return _0x437012[_0x4669('0x28')](_0xe995dc);}return _0x437012[_0x4669('0x29')](_0xe995dc)[_0x4669('0x2a')]();};}function respondWithResult(_0x322744,_0x3a38d9){_0x3a38d9=_0x3a38d9||0xc8;return function(_0x476408){if(_0x476408){return _0x322744[_0x4669('0x29')](_0x3a38d9)[_0x4669('0x2b')](_0x476408);}};}function respondWithFilteredResult(_0x52516e,_0x699fce){return function(_0x253f73){if(_0x253f73){var _0x6eb694=typeof _0x699fce['offset']==='undefined'&&typeof _0x699fce['limit']==='undefined';var _0x20d4d8=_0x253f73[_0x4669('0x2c')];var _0x2d1f41=_0x6eb694?0x0:_0x699fce[_0x4669('0x2d')];var _0x4d85e9=_0x6eb694?_0x253f73[_0x4669('0x2c')]:_0x699fce[_0x4669('0x2d')]+_0x699fce[_0x4669('0x2e')];var _0x25079;if(_0x4d85e9>=_0x20d4d8){_0x4d85e9=_0x20d4d8;_0x25079=0xc8;}else{_0x25079=0xce;}_0x52516e[_0x4669('0x29')](_0x25079);return _0x52516e['set'](_0x4669('0x2f'),_0x2d1f41+'-'+_0x4d85e9+'/'+_0x20d4d8)[_0x4669('0x2b')](_0x253f73);}return null;};}function patchUpdates(_0x2c6ee8){return function(_0x865787){try{jsonpatch['apply'](_0x865787,_0x2c6ee8,!![]);}catch(_0x15e344){return BPromise[_0x4669('0x30')](_0x15e344);}return _0x865787[_0x4669('0x31')]();};}function saveUpdates(_0x4e7e1e,_0x8a56d2){return function(_0x2739d5){if(_0x2739d5){return _0x2739d5[_0x4669('0x32')](_0x4e7e1e)[_0x4669('0x1c')](function(_0x381dcf){return _0x381dcf;});}return null;};}function removeEntity(_0x27f96d,_0x3753d5){return function(_0x13496f){if(_0x13496f){return _0x13496f[_0x4669('0x33')]()[_0x4669('0x1c')](function(){_0x27f96d[_0x4669('0x29')](0xcc)[_0x4669('0x2a')]();});}};}function handleEntityNotFound(_0x3ecbca,_0xa1b60d){return function(_0x3a6622){if(!_0x3a6622){_0x3ecbca[_0x4669('0x28')](0x194);}return _0x3a6622;};}function handleError(_0x376936,_0x3ce515){_0x3ce515=_0x3ce515||0x1f4;return function(_0x57426a){logger[_0x4669('0x23')](_0x57426a[_0x4669('0x34')]);if(_0x57426a[_0x4669('0x35')]){delete _0x57426a[_0x4669('0x35')];}_0x376936['status'](_0x3ce515)[_0x4669('0x36')](_0x57426a);};}exports[_0x4669('0x37')]=function(_0x4b840c,_0x131dad){var _0xd77e68={},_0x15b2a0={},_0x4aa51c={'count':0x0,'rows':[]};var _0x34c9b5=_[_0x4669('0x38')](db[_0x4669('0x39')][_0x4669('0x3a')],function(_0x41a96e){return{'name':_0x41a96e[_0x4669('0x3b')],'type':_0x41a96e[_0x4669('0x3c')][_0x4669('0x3d')]};});_0x15b2a0[_0x4669('0x3e')]=_[_0x4669('0x38')](_0x34c9b5,_0x4669('0x35'));_0x15b2a0[_0x4669('0x3f')]=_['keys'](_0x4b840c[_0x4669('0x3f')]);_0x15b2a0[_0x4669('0x40')]=_['intersection'](_0x15b2a0[_0x4669('0x3e')],_0x15b2a0[_0x4669('0x3f')]);_0xd77e68[_0x4669('0x41')]=_[_0x4669('0x42')](_0x15b2a0[_0x4669('0x3e')],qs['fields'](_0x4b840c[_0x4669('0x3f')][_0x4669('0x43')]));_0xd77e68[_0x4669('0x41')]=_0xd77e68[_0x4669('0x41')]['length']?_0xd77e68['attributes']:_0x15b2a0[_0x4669('0x3e')];if(!_0x4b840c[_0x4669('0x3f')]['hasOwnProperty'](_0x4669('0x44'))){_0xd77e68[_0x4669('0x2e')]=qs[_0x4669('0x2e')](_0x4b840c[_0x4669('0x3f')][_0x4669('0x2e')]);_0xd77e68[_0x4669('0x2d')]=qs[_0x4669('0x2d')](_0x4b840c[_0x4669('0x3f')]['offset']);}_0xd77e68[_0x4669('0x45')]=qs[_0x4669('0x46')](_0x4b840c['query'][_0x4669('0x46')]);_0xd77e68[_0x4669('0x47')]=qs[_0x4669('0x40')](_[_0x4669('0x48')](_0x4b840c[_0x4669('0x3f')],_0x15b2a0['filters']),_0x34c9b5);if(_0x4b840c[_0x4669('0x3f')][_0x4669('0x49')]){_0xd77e68[_0x4669('0x47')]=_[_0x4669('0x4a')](_0xd77e68[_0x4669('0x47')],{'$or':_[_0x4669('0x38')](_0x34c9b5,function(_0x535f39){if(_0x535f39[_0x4669('0x3c')]!==_0x4669('0x4b')){var _0x47ec42={};_0x47ec42[_0x535f39[_0x4669('0x35')]]={'$like':'%'+_0x4b840c['query'][_0x4669('0x49')]+'%'};return _0x47ec42;}})});}_0xd77e68=_['merge']({},_0xd77e68,_0x4b840c['options']);var _0x3f99c0={'where':_0xd77e68['where']};return db[_0x4669('0x39')]['count'](_0x3f99c0)[_0x4669('0x1c')](function(_0x2fb685){_0x4aa51c[_0x4669('0x2c')]=_0x2fb685;if(_0x4b840c[_0x4669('0x3f')]['includeAll']){_0xd77e68[_0x4669('0x4c')]=[{'all':!![]}];}return db[_0x4669('0x39')][_0x4669('0x4d')](_0xd77e68);})[_0x4669('0x1c')](function(_0x32c78a){_0x4aa51c[_0x4669('0x4e')]=_0x32c78a;return _0x4aa51c;})[_0x4669('0x1c')](respondWithFilteredResult(_0x131dad,_0xd77e68))[_0x4669('0x27')](handleError(_0x131dad,null));};exports[_0x4669('0x4f')]=function(_0x381554,_0x571d61){var _0x3f63b4={'raw':![],'where':{'id':_0x381554[_0x4669('0x50')]['id']}},_0x291ac3={};_0x291ac3['model']=_[_0x4669('0x51')](db['SugarcrmAccount'][_0x4669('0x3a')]);_0x291ac3['query']=_['keys'](_0x381554[_0x4669('0x3f')]);_0x291ac3[_0x4669('0x40')]=_[_0x4669('0x42')](_0x291ac3[_0x4669('0x3e')],_0x291ac3['query']);_0x3f63b4['attributes']=_['intersection'](_0x291ac3[_0x4669('0x3e')],qs[_0x4669('0x43')](_0x381554[_0x4669('0x3f')][_0x4669('0x43')]));_0x3f63b4[_0x4669('0x41')]=_0x3f63b4[_0x4669('0x41')][_0x4669('0x52')]?_0x3f63b4['attributes']:_0x291ac3['model'];if(_0x381554[_0x4669('0x3f')][_0x4669('0x53')]){_0x3f63b4[_0x4669('0x4c')]=[{'all':!![]}];}_0x3f63b4=_['merge']({},_0x3f63b4,_0x381554['options']);return db['SugarcrmAccount'][_0x4669('0x54')](_0x3f63b4)['then'](handleEntityNotFound(_0x571d61,null))[_0x4669('0x1c')](respondWithResult(_0x571d61,null))['catch'](handleError(_0x571d61,null));};exports[_0x4669('0x55')]=function(_0x25dc1a,_0x541179){return db[_0x4669('0x39')][_0x4669('0x55')](_0x25dc1a[_0x4669('0x56')],{})[_0x4669('0x1c')](respondWithResult(_0x541179,0xc9))[_0x4669('0x27')](handleError(_0x541179,null));};exports[_0x4669('0x32')]=function(_0x2a6f36,_0x4b6d06){if(_0x2a6f36[_0x4669('0x56')]['id']){delete _0x2a6f36[_0x4669('0x56')]['id'];}return db[_0x4669('0x39')][_0x4669('0x54')]({'where':{'id':_0x2a6f36['params']['id']}})['then'](handleEntityNotFound(_0x4b6d06,null))[_0x4669('0x1c')](saveUpdates(_0x2a6f36[_0x4669('0x56')],null))[_0x4669('0x1c')](respondWithResult(_0x4b6d06,null))[_0x4669('0x27')](handleError(_0x4b6d06,null));};exports['destroy']=function(_0x494294,_0xeca6b0){return db[_0x4669('0x39')][_0x4669('0x54')]({'where':{'id':_0x494294['params']['id']}})['then'](handleEntityNotFound(_0xeca6b0,null))[_0x4669('0x1c')](removeEntity(_0xeca6b0,null))[_0x4669('0x27')](handleError(_0xeca6b0,null));};exports[_0x4669('0x57')]=function(_0x4faa5e,_0x37c0f9,_0x5b9472){var _0x195c6d={};var _0x201d92={};var _0x139c63;var _0x464004;return db[_0x4669('0x39')][_0x4669('0x58')]({'where':{'id':_0x4faa5e[_0x4669('0x50')]['id']}})['then'](handleEntityNotFound(_0x37c0f9,null))[_0x4669('0x1c')](function(_0x16f1eb){if(_0x16f1eb){_0x139c63=_0x16f1eb;_0x201d92['model']=_[_0x4669('0x51')](db[_0x4669('0x59')][_0x4669('0x3a')]);_0x201d92['query']=_[_0x4669('0x51')](_0x4faa5e[_0x4669('0x3f')]);_0x201d92[_0x4669('0x40')]=_[_0x4669('0x42')](_0x201d92[_0x4669('0x3e')],_0x201d92['query']);_0x195c6d[_0x4669('0x41')]=_[_0x4669('0x42')](_0x201d92[_0x4669('0x3e')],qs[_0x4669('0x43')](_0x4faa5e['query']['fields']));_0x195c6d[_0x4669('0x41')]=_0x195c6d[_0x4669('0x41')][_0x4669('0x52')]?_0x195c6d[_0x4669('0x41')]:_0x201d92[_0x4669('0x3e')];_0x195c6d[_0x4669('0x45')]=qs[_0x4669('0x46')](_0x4faa5e['query']['sort']);_0x195c6d['where']=qs[_0x4669('0x40')](_['pick'](_0x4faa5e['query'],_0x201d92[_0x4669('0x40')]));if(_0x4faa5e['query'][_0x4669('0x49')]){_0x195c6d[_0x4669('0x47')]=_[_0x4669('0x4a')](_0x195c6d[_0x4669('0x47')],{'$or':_['map'](_0x195c6d[_0x4669('0x41')],function(_0x163dae){var _0x357895={};_0x357895[_0x163dae]={'$like':'%'+_0x4faa5e[_0x4669('0x3f')]['filter']+'%'};return _0x357895;})});}_0x195c6d=_['merge']({},_0x195c6d,_0x4faa5e[_0x4669('0x5a')]);return _0x139c63[_0x4669('0x57')](_0x195c6d);}})[_0x4669('0x1c')](function(_0x3e716e){if(_0x3e716e){_0x464004=_0x3e716e[_0x4669('0x52')];if(!_0x4faa5e[_0x4669('0x3f')][_0x4669('0x5b')](_0x4669('0x44'))){_0x195c6d[_0x4669('0x2e')]=qs[_0x4669('0x2e')](_0x4faa5e[_0x4669('0x3f')][_0x4669('0x2e')]);_0x195c6d[_0x4669('0x2d')]=qs[_0x4669('0x2d')](_0x4faa5e[_0x4669('0x3f')][_0x4669('0x2d')]);}return _0x139c63['getConfigurations'](_0x195c6d);}})['then'](function(_0x4cdc1c){if(_0x4cdc1c){return _0x4cdc1c?{'count':_0x464004,'rows':_0x4cdc1c}:null;}})['then'](respondWithResult(_0x37c0f9,null))[_0x4669('0x27')](handleError(_0x37c0f9,null));};exports[_0x4669('0x5c')]=function(_0x358d18,_0x49b343,_0x33ed82){if(_0x358d18[_0x4669('0x56')]['id']){delete _0x358d18['body']['id'];}return db['SugarcrmAccount'][_0x4669('0x58')]({'where':{'id':_0x358d18[_0x4669('0x50')]['id']}})[_0x4669('0x1c')](handleEntityNotFound(_0x49b343,null))['then'](function(_0x1f6111){if(_0x1f6111){_0x358d18['body'][_0x4669('0x5d')]=_0x1f6111['id'];_0x358d18['body']['Subjects']=integrations['getSubjects'](_0x358d18[_0x4669('0x56')]['channel'],_0x358d18[_0x4669('0x56')]['type']);_0x358d18[_0x4669('0x56')][_0x4669('0x5e')]=integrations[_0x4669('0x5f')](_0x358d18[_0x4669('0x56')]['channel'],_0x358d18['body'][_0x4669('0x3c')]);return db[_0x4669('0x59')][_0x4669('0x55')](_0x358d18['body'],{'include':[{'model':db['SugarcrmField'],'as':_0x4669('0x60')},{'model':db[_0x4669('0x61')],'as':'Descriptions'}]});}return null;})['then'](respondWithResult(_0x49b343,null))['catch'](handleError(_0x49b343,null));};exports[_0x4669('0x62')]=function(_0x497b51,_0x2aac7e,_0xecca49){var _0x325c16='';var _0x17ca1f=['id',_0x4669('0x35'),_0x4669('0x63'),'created_by',_0x4669('0x64'),_0x4669('0x65'),_0x4669('0x66'),_0x4669('0x67'),'parent_id',_0x4669('0x68'),_0x4669('0x69'),_0x4669('0x6a')];return db[_0x4669('0x39')][_0x4669('0x58')]({'where':{'id':_0x497b51[_0x4669('0x50')]['id']},'attributes':['id',_0x4669('0x6b'),_0x4669('0x6c'),'remoteUri']})['then'](handleEntityNotFound(_0x2aac7e,null))['then'](function(_0x4dc249){if(_0x4dc249){_0x325c16=_0x4dc249[_0x4669('0x6d')];var _0x526aa9=_0x325c16[_0x4669('0x6e')](-0x1);if(_0x526aa9==='/'){_0x325c16=_0x325c16[_0x4669('0x6f')](0x0,_0x325c16['lastIndexOf'](_0x526aa9));}return rp({'method':_0x4669('0x70'),'uri':util[_0x4669('0x71')](_0x4669('0x72'),_0x325c16,_0x4669('0x73')),'json':!![],'form':{'method':_0x4669('0x74'),'input_type':_0x4669('0x75'),'response_type':_0x4669('0x75'),'rest_data':JSON[_0x4669('0x22')]({'user_auth':{'user_name':_0x4dc249[_0x4669('0x6b')],'password':_0x4dc249[_0x4669('0x6c')],'encryption':_0x4669('0x76')},'application':_0x4669('0x77')})}});}})[_0x4669('0x1c')](function(_0x39e4e1){if(_0x39e4e1&&_0x39e4e1[_0x4669('0x35')]!==_0x4669('0x78')&&_0x39e4e1[_0x4669('0x35')]!=='Password\x20Expired'){return rp({'method':_0x4669('0x70'),'uri':util[_0x4669('0x71')]('%s%s',_0x325c16,_0x4669('0x73')),'json':!![],'form':{'method':_0x4669('0x79'),'input_type':_0x4669('0x75'),'response_type':_0x4669('0x75'),'rest_data':JSON['stringify']({'session':_0x39e4e1['id'],'module_name':_0x4669('0x7a')})}})[_0x4669('0x1c')](function(_0x3fc3ec){if(_0x3fc3ec){var _0x493986=_[_0x4669('0x7b')](_0x3fc3ec[_0x4669('0x7c')]);_[_0x4669('0x7d')](_0x493986,function(_0x1e42c6){return _0x17ca1f[_0x4669('0x7e')](_0x1e42c6['name']);});return{'count':_0x493986[_0x4669('0x52')],'rows':_['map'](_0x493986,function(_0x550fae){return{'id':_0x550fae[_0x4669('0x35')],'name':_0x550fae[_0x4669('0x7f')],'custom':_['endsWith'](_0x550fae[_0x4669('0x35')],'_c')?!![]:![],'options':_0x550fae[_0x4669('0x5a')]?_[_0x4669('0x38')](_[_0x4669('0x7b')](_0x550fae[_0x4669('0x5a')]),function(_0x29061c){return{'name':_0x29061c[_0x4669('0x80')],'value':_0x29061c['name']};}):[]};})};}})[_0x4669('0x1c')](respondWithResult(_0x2aac7e,null))[_0x4669('0x27')](function(_0x1f0835){var _0x3cd124=_0x497b51[_0x4669('0x3f')]['test']?0x1f4:_0x1f0835[_0x4669('0x81')]||0x1f4;logger[_0x4669('0x23')]('getFields,\x20%s,\x20%s,\x20%s',_0x4669('0x62'),_0x3cd124,JSON['stringify'](_0x1f0835));delete _0x1f0835[_0x4669('0x35')];if(_0x3cd124===0x191){_0x3cd124=0x190;}_0x2aac7e[_0x4669('0x29')](_0x3cd124)[_0x4669('0x36')](_0x497b51['query'][_0x4669('0x82')]?{'message':_0x4669('0x83'),'statusCode':_0x1f0835[_0x4669('0x81')]}:_0x1f0835);});}else{var _0xd184fa=0x1f4;_0x2aac7e[_0x4669('0x29')](_0xd184fa)[_0x4669('0x36')]({'message':_0x4669('0x83'),'statusCode':0x190});}});}; \ No newline at end of file diff --git a/server/api/intSugarcrmAccount/intSugarcrmAccount.model.js b/server/api/intSugarcrmAccount/intSugarcrmAccount.model.js index c851679..f1d043d 100644 --- a/server/api/intSugarcrmAccount/intSugarcrmAccount.model.js +++ b/server/api/intSugarcrmAccount/intSugarcrmAccount.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1678=['int_sugarcrm_accounts','lodash','util','../../config/logger','api','moment','path','rimraf','../../config/environment','./intSugarcrmAccount.attributes','../../components/integrations/configuration','exports','define','SugarcrmAccount'];(function(_0x532850,_0x3a100a){var _0x4ea53f=function(_0x243531){while(--_0x243531){_0x532850['push'](_0x532850['shift']());}};_0x4ea53f(++_0x3a100a);}(_0x1678,0x17b));var _0x8167=function(_0x8ddd7a,_0x9112a7){_0x8ddd7a=_0x8ddd7a-0x0;var _0x3a7d47=_0x1678[_0x8ddd7a];return _0x3a7d47;};'use strict';var _=require(_0x8167('0x0'));var util=require(_0x8167('0x1'));var logger=require(_0x8167('0x2'))(_0x8167('0x3'));var moment=require(_0x8167('0x4'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x8167('0x5'));var rimraf=require(_0x8167('0x6'));var config=require(_0x8167('0x7'));var attributes=require(_0x8167('0x8'));var integrations=require(_0x8167('0x9'));module[_0x8167('0xa')]=function(_0x30f248,_0x4ce075){return _0x30f248[_0x8167('0xb')](_0x8167('0xc'),attributes,{'tableName':_0x8167('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x6c79=['moment','request-promise','rimraf','../../config/environment','./intSugarcrmAccount.attributes','../../components/integrations/configuration','exports','define','SugarcrmAccount','int_sugarcrm_accounts','lodash','util','../../config/logger','api'];(function(_0x173070,_0x37b0e0){var _0xe5c742=function(_0x438158){while(--_0x438158){_0x173070['push'](_0x173070['shift']());}};_0xe5c742(++_0x37b0e0);}(_0x6c79,0x184));var _0x96c7=function(_0x5d008b,_0x12b7b2){_0x5d008b=_0x5d008b-0x0;var _0x381807=_0x6c79[_0x5d008b];return _0x381807;};'use strict';var _=require(_0x96c7('0x0'));var util=require(_0x96c7('0x1'));var logger=require(_0x96c7('0x2'))(_0x96c7('0x3'));var moment=require(_0x96c7('0x4'));var BPromise=require('bluebird');var rp=require(_0x96c7('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x96c7('0x6'));var config=require(_0x96c7('0x7'));var attributes=require(_0x96c7('0x8'));var integrations=require(_0x96c7('0x9'));module[_0x96c7('0xa')]=function(_0x487fd6,_0x2dac6b){return _0x487fd6[_0x96c7('0xb')](_0x96c7('0xc'),attributes,{'tableName':_0x96c7('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intSugarcrmAccount/intSugarcrmAccount.rpc.js b/server/api/intSugarcrmAccount/intSugarcrmAccount.rpc.js index 369037c..496fde0 100644 --- a/server/api/intSugarcrmAccount/intSugarcrmAccount.rpc.js +++ b/server/api/intSugarcrmAccount/intSugarcrmAccount.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb9b1=['info','request\x20sent','debug','error','code','SugarcrmAccount,\x20%s,\x20%s','message','catch','GetSugarcrmAccount','SugarcrmAccount','options','raw','where','attributes','limit','include','map','model','then','stringify','ShowSugarcrmAccount','find','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','rpc','request'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0xb9b1,0x73));var _0x1b9b=function(_0x3f47ae,_0x4418f5){_0x3f47ae=_0x3f47ae-0x0;var _0x5f4f93=_0xb9b1[_0x3f47ae];return _0x5f4f93;};'use strict';var _=require(_0x1b9b('0x0'));var util=require(_0x1b9b('0x1'));var moment=require(_0x1b9b('0x2'));var BPromise=require(_0x1b9b('0x3'));var rs=require(_0x1b9b('0x4'));var fs=require('fs');var Redis=require(_0x1b9b('0x5'));var db=require(_0x1b9b('0x6'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x1b9b('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x4a3474,_0x2772c5,_0x4f0969){return new BPromise(function(_0x4cf1b0,_0x13062f){return client[_0x1b9b('0x8')](_0x4a3474,_0x4f0969)['then'](function(_0x444e25){logger[_0x1b9b('0x9')]('SugarcrmAccount,\x20%s,\x20%s',_0x2772c5,_0x1b9b('0xa'));logger[_0x1b9b('0xb')]('SugarcrmAccount,\x20%s,\x20%s,\x20%s',_0x2772c5,_0x1b9b('0xa'),JSON['stringify'](_0x444e25));if(_0x444e25[_0x1b9b('0xc')]){if(_0x444e25['error'][_0x1b9b('0xd')]===0x1f4){logger[_0x1b9b('0xc')](_0x1b9b('0xe'),_0x2772c5,_0x444e25[_0x1b9b('0xc')][_0x1b9b('0xf')]);return _0x13062f(_0x444e25[_0x1b9b('0xc')][_0x1b9b('0xf')]);}logger[_0x1b9b('0xc')](_0x1b9b('0xe'),_0x2772c5,_0x444e25['error'][_0x1b9b('0xf')]);return _0x4cf1b0(_0x444e25['error']['message']);}else{logger['info'](_0x1b9b('0xe'),_0x2772c5,_0x1b9b('0xa'));_0x4cf1b0(_0x444e25['result'][_0x1b9b('0xf')]);}})[_0x1b9b('0x10')](function(_0x32e896){logger[_0x1b9b('0xc')](_0x1b9b('0xe'),_0x2772c5,_0x32e896);_0x13062f(_0x32e896);});});}exports[_0x1b9b('0x11')]=function(_0x137e53){var _0x2e0c08=this;return new Promise(function(_0x3fbee5,_0x38ef9d){return db[_0x1b9b('0x12')]['findAll']({'raw':_0x137e53[_0x1b9b('0x13')]?_0x137e53[_0x1b9b('0x13')][_0x1b9b('0x14')]===undefined?!![]:![]:!![],'where':_0x137e53[_0x1b9b('0x13')]?_0x137e53[_0x1b9b('0x13')][_0x1b9b('0x15')]||null:null,'attributes':_0x137e53[_0x1b9b('0x13')]?_0x137e53[_0x1b9b('0x13')][_0x1b9b('0x16')]||null:null,'limit':_0x137e53['options']?_0x137e53[_0x1b9b('0x13')][_0x1b9b('0x17')]||null:null,'include':_0x137e53[_0x1b9b('0x13')]?_0x137e53[_0x1b9b('0x13')][_0x1b9b('0x18')]?_[_0x1b9b('0x19')](_0x137e53[_0x1b9b('0x13')][_0x1b9b('0x18')],function(_0x102fbc){return{'model':db[_0x102fbc[_0x1b9b('0x1a')]],'as':_0x102fbc['as'],'attributes':_0x102fbc[_0x1b9b('0x16')],'include':_0x102fbc[_0x1b9b('0x18')]?_[_0x1b9b('0x19')](_0x102fbc['include'],function(_0x47ecc1){return{'model':db[_0x47ecc1[_0x1b9b('0x1a')]],'as':_0x47ecc1['as'],'attributes':_0x47ecc1[_0x1b9b('0x16')],'include':_0x47ecc1[_0x1b9b('0x18')]?_[_0x1b9b('0x19')](_0x47ecc1['include'],function(_0x15a19b){return{'model':db[_0x15a19b['model']],'as':_0x15a19b['as'],'attributes':_0x15a19b[_0x1b9b('0x16')]};}):[]};}):[]};}):[]:[]})[_0x1b9b('0x1b')](function(_0x4c2712){logger[_0x1b9b('0x9')](_0x1b9b('0x11'),_0x137e53);logger['debug'](_0x1b9b('0x11'),_0x137e53,JSON[_0x1b9b('0x1c')](_0x4c2712));_0x3fbee5(_0x4c2712);})[_0x1b9b('0x10')](function(_0x137b34){logger[_0x1b9b('0xc')]('GetSugarcrmAccount',_0x137b34[_0x1b9b('0xf')],_0x137e53);_0x38ef9d(_0x2e0c08[_0x1b9b('0xc')](0x1f4,_0x137b34[_0x1b9b('0xf')]));});});};exports[_0x1b9b('0x1d')]=function(_0x59aaa4){var _0x247e96=this;return new Promise(function(_0x1eb411,_0x261533){return db['SugarcrmAccount'][_0x1b9b('0x1e')]({'raw':_0x59aaa4[_0x1b9b('0x13')]?_0x59aaa4['options'][_0x1b9b('0x14')]===undefined?!![]:![]:!![],'where':_0x59aaa4['options']?_0x59aaa4['options']['where']||null:null,'attributes':_0x59aaa4[_0x1b9b('0x13')]?_0x59aaa4['options'][_0x1b9b('0x16')]||null:null,'include':_0x59aaa4['options']?_0x59aaa4[_0x1b9b('0x13')]['include']?_['map'](_0x59aaa4[_0x1b9b('0x13')][_0x1b9b('0x18')],function(_0xce0081){return{'model':db[_0xce0081[_0x1b9b('0x1a')]],'as':_0xce0081['as'],'attributes':_0xce0081[_0x1b9b('0x16')],'include':_0xce0081['include']?_['map'](_0xce0081[_0x1b9b('0x18')],function(_0x4d828e){return{'model':db[_0x4d828e[_0x1b9b('0x1a')]],'as':_0x4d828e['as'],'attributes':_0x4d828e[_0x1b9b('0x16')],'include':_0x4d828e['include']?_[_0x1b9b('0x19')](_0x4d828e['include'],function(_0x27110f){return{'model':db[_0x27110f[_0x1b9b('0x1a')]],'as':_0x27110f['as'],'attributes':_0x27110f[_0x1b9b('0x16')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x5aa4fc){logger[_0x1b9b('0x9')](_0x1b9b('0x1d'),_0x59aaa4);logger['debug'](_0x1b9b('0x1d'),_0x59aaa4,JSON['stringify'](_0x5aa4fc));_0x1eb411(_0x5aa4fc);})[_0x1b9b('0x10')](function(_0x185dbd){logger[_0x1b9b('0xc')](_0x1b9b('0x1d'),_0x185dbd['message'],_0x59aaa4);_0x261533(_0x247e96['error'](0x1f4,_0x185dbd[_0x1b9b('0xf')]));});});}; \ No newline at end of file +var _0x7123=['error','code','message','info','request\x20sent','result','catch','GetSugarcrmAccount','SugarcrmAccount','findAll','options','raw','where','limit','model','map','include','attributes','ShowSugarcrmAccount','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','jayson/promise','request','then','SugarcrmAccount,\x20%s,\x20%s','debug','SugarcrmAccount,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x484ad7,_0xab3f8e){var _0x42547d=function(_0x56fcdc){while(--_0x56fcdc){_0x484ad7['push'](_0x484ad7['shift']());}};_0x42547d(++_0xab3f8e);}(_0x7123,0x1d3));var _0x3712=function(_0x2ccd83,_0x2c533c){_0x2ccd83=_0x2ccd83-0x0;var _0x4fd6b7=_0x7123[_0x2ccd83];return _0x4fd6b7;};'use strict';var _=require(_0x3712('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x3712('0x1'));var rs=require(_0x3712('0x2'));var fs=require('fs');var Redis=require(_0x3712('0x3'));var db=require(_0x3712('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x3712('0x5'))('rpc');var config=require('../../config/environment');var jayson=require(_0x3712('0x6'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x37d0e3,_0x438c6f,_0x1cb6d4){return new BPromise(function(_0xfdb02d,_0x335a27){return client[_0x3712('0x7')](_0x37d0e3,_0x1cb6d4)[_0x3712('0x8')](function(_0x1601eb){logger['info'](_0x3712('0x9'),_0x438c6f,'request\x20sent');logger[_0x3712('0xa')](_0x3712('0xb'),_0x438c6f,'request\x20sent',JSON[_0x3712('0xc')](_0x1601eb));if(_0x1601eb[_0x3712('0xd')]){if(_0x1601eb[_0x3712('0xd')][_0x3712('0xe')]===0x1f4){logger[_0x3712('0xd')]('SugarcrmAccount,\x20%s,\x20%s',_0x438c6f,_0x1601eb[_0x3712('0xd')][_0x3712('0xf')]);return _0x335a27(_0x1601eb[_0x3712('0xd')][_0x3712('0xf')]);}logger[_0x3712('0xd')](_0x3712('0x9'),_0x438c6f,_0x1601eb[_0x3712('0xd')]['message']);return _0xfdb02d(_0x1601eb['error'][_0x3712('0xf')]);}else{logger[_0x3712('0x10')](_0x3712('0x9'),_0x438c6f,_0x3712('0x11'));_0xfdb02d(_0x1601eb[_0x3712('0x12')][_0x3712('0xf')]);}})[_0x3712('0x13')](function(_0x1fc70e){logger['error'](_0x3712('0x9'),_0x438c6f,_0x1fc70e);_0x335a27(_0x1fc70e);});});}exports[_0x3712('0x14')]=function(_0x17ef48){var _0x43c4ac=this;return new Promise(function(_0x131861,_0x74c16d){return db[_0x3712('0x15')][_0x3712('0x16')]({'raw':_0x17ef48['options']?_0x17ef48[_0x3712('0x17')][_0x3712('0x18')]===undefined?!![]:![]:!![],'where':_0x17ef48[_0x3712('0x17')]?_0x17ef48[_0x3712('0x17')][_0x3712('0x19')]||null:null,'attributes':_0x17ef48['options']?_0x17ef48[_0x3712('0x17')]['attributes']||null:null,'limit':_0x17ef48[_0x3712('0x17')]?_0x17ef48['options'][_0x3712('0x1a')]||null:null,'include':_0x17ef48['options']?_0x17ef48[_0x3712('0x17')]['include']?_['map'](_0x17ef48[_0x3712('0x17')]['include'],function(_0x3f6687){return{'model':db[_0x3f6687[_0x3712('0x1b')]],'as':_0x3f6687['as'],'attributes':_0x3f6687['attributes'],'include':_0x3f6687['include']?_[_0x3712('0x1c')](_0x3f6687[_0x3712('0x1d')],function(_0x17ba99){return{'model':db[_0x17ba99[_0x3712('0x1b')]],'as':_0x17ba99['as'],'attributes':_0x17ba99['attributes'],'include':_0x17ba99[_0x3712('0x1d')]?_[_0x3712('0x1c')](_0x17ba99[_0x3712('0x1d')],function(_0x5d711a){return{'model':db[_0x5d711a[_0x3712('0x1b')]],'as':_0x5d711a['as'],'attributes':_0x5d711a[_0x3712('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x3712('0x8')](function(_0x387e9f){logger[_0x3712('0x10')](_0x3712('0x14'),_0x17ef48);logger[_0x3712('0xa')](_0x3712('0x14'),_0x17ef48,JSON[_0x3712('0xc')](_0x387e9f));_0x131861(_0x387e9f);})['catch'](function(_0x50cc61){logger[_0x3712('0xd')](_0x3712('0x14'),_0x50cc61['message'],_0x17ef48);_0x74c16d(_0x43c4ac['error'](0x1f4,_0x50cc61['message']));});});};exports[_0x3712('0x1f')]=function(_0x151739){var _0x2deff1=this;return new Promise(function(_0x414484,_0x4ac53d){return db[_0x3712('0x15')]['find']({'raw':_0x151739[_0x3712('0x17')]?_0x151739[_0x3712('0x17')][_0x3712('0x18')]===undefined?!![]:![]:!![],'where':_0x151739['options']?_0x151739[_0x3712('0x17')][_0x3712('0x19')]||null:null,'attributes':_0x151739[_0x3712('0x17')]?_0x151739[_0x3712('0x17')][_0x3712('0x1e')]||null:null,'include':_0x151739['options']?_0x151739[_0x3712('0x17')][_0x3712('0x1d')]?_['map'](_0x151739['options'][_0x3712('0x1d')],function(_0x33e6ee){return{'model':db[_0x33e6ee[_0x3712('0x1b')]],'as':_0x33e6ee['as'],'attributes':_0x33e6ee[_0x3712('0x1e')],'include':_0x33e6ee[_0x3712('0x1d')]?_[_0x3712('0x1c')](_0x33e6ee['include'],function(_0x475b49){return{'model':db[_0x475b49[_0x3712('0x1b')]],'as':_0x475b49['as'],'attributes':_0x475b49[_0x3712('0x1e')],'include':_0x475b49['include']?_['map'](_0x475b49['include'],function(_0x11c3dd){return{'model':db[_0x11c3dd[_0x3712('0x1b')]],'as':_0x11c3dd['as'],'attributes':_0x11c3dd[_0x3712('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x3712('0x8')](function(_0x42b331){logger['info'](_0x3712('0x1f'),_0x151739);logger[_0x3712('0xa')](_0x3712('0x1f'),_0x151739,JSON['stringify'](_0x42b331));_0x414484(_0x42b331);})[_0x3712('0x13')](function(_0x11887d){logger[_0x3712('0xd')]('ShowSugarcrmAccount',_0x11887d[_0x3712('0xf')],_0x151739);_0x4ac53d(_0x2deff1[_0x3712('0xd')](0x1f4,_0x11887d[_0x3712('0xf')]));});});}; \ No newline at end of file diff --git a/server/api/intSugarcrmConfiguration/index.js b/server/api/intSugarcrmConfiguration/index.js index 56f9c6b..46a570d 100644 --- a/server/api/intSugarcrmConfiguration/index.js +++ b/server/api/intSugarcrmConfiguration/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9e24=['Router','fs-extra','../../components/auth/service','../../components/interaction/service','./intSugarcrmConfiguration.controller','get','isAuthenticated','show','getFields','/:id/subjects','/:id/descriptions','put','/:id','update','delete','destroy','exports','multer','util','path','express'];(function(_0x22cb5f,_0x2cdd63){var _0x274d36=function(_0x421472){while(--_0x421472){_0x22cb5f['push'](_0x22cb5f['shift']());}};_0x274d36(++_0x2cdd63);}(_0x9e24,0x1df));var _0x49e2=function(_0x568496,_0x565afd){_0x568496=_0x568496-0x0;var _0x26c5c1=_0x9e24[_0x568496];return _0x26c5c1;};'use strict';var multer=require(_0x49e2('0x0'));var util=require(_0x49e2('0x1'));var path=require(_0x49e2('0x2'));var timeout=require('connect-timeout');var express=require(_0x49e2('0x3'));var router=express[_0x49e2('0x4')]();var fs_extra=require(_0x49e2('0x5'));var auth=require(_0x49e2('0x6'));var interaction=require(_0x49e2('0x7'));var config=require('../../config/environment');var controller=require(_0x49e2('0x8'));router[_0x49e2('0x9')]('/',auth[_0x49e2('0xa')](),controller['index']);router[_0x49e2('0x9')]('/:id',auth['isAuthenticated'](),controller[_0x49e2('0xb')]);router[_0x49e2('0x9')]('/:id/fields',auth[_0x49e2('0xa')](),controller[_0x49e2('0xc')]);router[_0x49e2('0x9')](_0x49e2('0xd'),auth[_0x49e2('0xa')](),controller['getSubjects']);router['get'](_0x49e2('0xe'),auth['isAuthenticated'](),controller['getDescriptions']);router['post']('/',auth[_0x49e2('0xa')](),controller['create']);router[_0x49e2('0xf')](_0x49e2('0x10'),auth[_0x49e2('0xa')](),controller[_0x49e2('0x11')]);router[_0x49e2('0x12')]('/:id',auth[_0x49e2('0xa')](),controller[_0x49e2('0x13')]);module[_0x49e2('0x14')]=router; \ No newline at end of file +var _0x4109=['connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./intSugarcrmConfiguration.controller','isAuthenticated','index','get','/:id','show','/:id/fields','getFields','/:id/subjects','/:id/descriptions','post','put','update','delete','exports','multer','util','path'];(function(_0x5cbdc1,_0x3ebf6b){var _0x1c7677=function(_0x58490e){while(--_0x58490e){_0x5cbdc1['push'](_0x5cbdc1['shift']());}};_0x1c7677(++_0x3ebf6b);}(_0x4109,0x1e0));var _0x9410=function(_0x21ac51,_0x3d4a2a){_0x21ac51=_0x21ac51-0x0;var _0x3aa32d=_0x4109[_0x21ac51];return _0x3aa32d;};'use strict';var multer=require(_0x9410('0x0'));var util=require(_0x9410('0x1'));var path=require(_0x9410('0x2'));var timeout=require(_0x9410('0x3'));var express=require('express');var router=express[_0x9410('0x4')]();var fs_extra=require(_0x9410('0x5'));var auth=require(_0x9410('0x6'));var interaction=require(_0x9410('0x7'));var config=require('../../config/environment');var controller=require(_0x9410('0x8'));router['get']('/',auth[_0x9410('0x9')](),controller[_0x9410('0xa')]);router[_0x9410('0xb')](_0x9410('0xc'),auth[_0x9410('0x9')](),controller[_0x9410('0xd')]);router[_0x9410('0xb')](_0x9410('0xe'),auth[_0x9410('0x9')](),controller[_0x9410('0xf')]);router[_0x9410('0xb')](_0x9410('0x10'),auth[_0x9410('0x9')](),controller['getSubjects']);router[_0x9410('0xb')](_0x9410('0x11'),auth[_0x9410('0x9')](),controller['getDescriptions']);router[_0x9410('0x12')]('/',auth[_0x9410('0x9')](),controller['create']);router[_0x9410('0x13')](_0x9410('0xc'),auth[_0x9410('0x9')](),controller[_0x9410('0x14')]);router[_0x9410('0x15')](_0x9410('0xc'),auth[_0x9410('0x9')](),controller['destroy']);module[_0x9410('0x16')]=router; \ No newline at end of file diff --git a/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.attributes.js b/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.attributes.js index 1be1da3..6dc6466 100644 --- a/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.attributes.js +++ b/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x919e=['STRING','exports'];(function(_0x463037,_0x113e69){var _0x31331f=function(_0x19c90d){while(--_0x19c90d){_0x463037['push'](_0x463037['shift']());}};_0x31331f(++_0x113e69);}(_0x919e,0x71));var _0xe919=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x919e[_0x3dd15e];return _0x231fd0;};'use strict';var Sequelize=require('sequelize');module[_0xe919('0x0')]={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0xe919('0x1')]}}; \ No newline at end of file +var _0x6193=['sequelize','exports','STRING'];(function(_0x24bbd5,_0x34a7c4){var _0x8fb737=function(_0xda751f){while(--_0xda751f){_0x24bbd5['push'](_0x24bbd5['shift']());}};_0x8fb737(++_0x34a7c4);}(_0x6193,0x15c));var _0x3619=function(_0x25203b,_0x5e576f){_0x25203b=_0x25203b-0x0;var _0x494f9b=_0x6193[_0x25203b];return _0x494f9b;};'use strict';var Sequelize=require(_0x3619('0x0'));module[_0x3619('0x1')]={'name':{'type':Sequelize[_0x3619('0x2')]},'description':{'type':Sequelize[_0x3619('0x2')]}}; \ No newline at end of file diff --git a/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.controller.js b/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.controller.js index beffdbd..2ecf2f5 100644 --- a/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.controller.js +++ b/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xaa50=['debug','SugarcrmConfiguration,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','sendStatus','end','status','json','offset','undefined','limit','count','Content-Range','apply','save','update','destroy','stack','name','send','index','SugarcrmConfiguration','rawAttributes','fieldName','type','model','map','query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick','merge','VIRTUAL','filter','options','includeAll','include','show','params','keys','length','find','create','body','getFields','findOne','SugarcrmField','getSubjects','getDescriptions','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','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/logger','api','../../config/utils','../../config/license/util','../../mysqldb','client','http','then','SugarcrmConfiguration,\x20%s,\x20%s'];(function(_0x4169a1,_0x318947){var _0x4736b5=function(_0x2dd99e){while(--_0x2dd99e){_0x4169a1['push'](_0x4169a1['shift']());}};_0x4736b5(++_0x318947);}(_0xaa50,0x9a));var _0x0aa5=function(_0x3e618a,_0x135251){_0x3e618a=_0x3e618a-0x0;var _0x1f3d61=_0xaa50[_0x3e618a];return _0x1f3d61;};'use strict';var emlformat=require(_0x0aa5('0x0'));var rimraf=require(_0x0aa5('0x1'));var zipdir=require(_0x0aa5('0x2'));var jsonpatch=require(_0x0aa5('0x3'));var rp=require('request-promise');var moment=require(_0x0aa5('0x4'));var BPromise=require(_0x0aa5('0x5'));var Mustache=require(_0x0aa5('0x6'));var util=require(_0x0aa5('0x7'));var path=require(_0x0aa5('0x8'));var sox=require('sox');var csv=require(_0x0aa5('0x9'));var ejs=require(_0x0aa5('0xa'));var fs=require('fs');var fs_extra=require(_0x0aa5('0xb'));var _=require(_0x0aa5('0xc'));var squel=require(_0x0aa5('0xd'));var crypto=require(_0x0aa5('0xe'));var jsforce=require(_0x0aa5('0xf'));var deskjs=require(_0x0aa5('0x10'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x0aa5('0x11'));var Redis=require(_0x0aa5('0x12'));var authService=require(_0x0aa5('0x13'));var qs=require(_0x0aa5('0x14'));var as=require(_0x0aa5('0x15'));var hardwareService=require(_0x0aa5('0x16'));var logger=require(_0x0aa5('0x17'))(_0x0aa5('0x18'));var utils=require(_0x0aa5('0x19'));var config=require('../../config/environment');var licenseUtil=require(_0x0aa5('0x1a'));var db=require(_0x0aa5('0x1b'))['db'];var jayson=require('jayson/promise');var client=jayson[_0x0aa5('0x1c')][_0x0aa5('0x1d')]({'port':0x232a});function respondWithRpcPromise(_0x4b2dd7,_0x3388e2,_0x4bcd60,_0xe88b3b){return new BPromise(function(_0x4f4cd3,_0x27e98f){var _0x2384b7=_0xe88b3b||client;return _0x2384b7['request'](_0x4b2dd7,_0x4bcd60)[_0x0aa5('0x1e')](function(_0x23c64e){logger['info'](_0x0aa5('0x1f'),_0x3388e2,'request\x20sent');logger[_0x0aa5('0x20')](_0x0aa5('0x21'),_0x3388e2,_0x0aa5('0x22'),JSON[_0x0aa5('0x23')](_0x23c64e));if(_0x23c64e[_0x0aa5('0x24')]){if(_0x23c64e[_0x0aa5('0x24')][_0x0aa5('0x25')]===0x1f4){logger[_0x0aa5('0x24')](_0x0aa5('0x1f'),_0x3388e2,_0x23c64e[_0x0aa5('0x24')][_0x0aa5('0x26')]);return _0x27e98f(_0x23c64e[_0x0aa5('0x24')]['message']);}logger['error']('SugarcrmConfiguration,\x20%s,\x20%s',_0x3388e2,_0x23c64e[_0x0aa5('0x24')]['message']);return _0x4f4cd3(_0x23c64e['error']['message']);}else{logger['info'](_0x0aa5('0x1f'),_0x3388e2,_0x0aa5('0x22'));_0x4f4cd3(_0x23c64e[_0x0aa5('0x27')][_0x0aa5('0x26')]);}})[_0x0aa5('0x28')](function(_0x555098){logger[_0x0aa5('0x24')](_0x0aa5('0x1f'),_0x3388e2,_0x555098);_0x27e98f(_0x555098);});});}function respondWithStatusCode(_0x5e719e,_0xd00816){_0xd00816=_0xd00816||0xcc;return function(_0x3bc9c2){if(_0x3bc9c2){return _0x5e719e[_0x0aa5('0x29')](_0xd00816);}return _0x5e719e['status'](_0xd00816)[_0x0aa5('0x2a')]();};}function respondWithResult(_0x1ce46c,_0x2c1dcd){_0x2c1dcd=_0x2c1dcd||0xc8;return function(_0x5940d1){if(_0x5940d1){return _0x1ce46c[_0x0aa5('0x2b')](_0x2c1dcd)[_0x0aa5('0x2c')](_0x5940d1);}};}function respondWithFilteredResult(_0x51edd5,_0x273e75){return function(_0x50ecdf){if(_0x50ecdf){var _0x380bec=typeof _0x273e75[_0x0aa5('0x2d')]===_0x0aa5('0x2e')&&typeof _0x273e75[_0x0aa5('0x2f')]===_0x0aa5('0x2e');var _0x482e88=_0x50ecdf[_0x0aa5('0x30')];var _0x4a1887=_0x380bec?0x0:_0x273e75['offset'];var _0x21631f=_0x380bec?_0x50ecdf['count']:_0x273e75[_0x0aa5('0x2d')]+_0x273e75[_0x0aa5('0x2f')];var _0x11a122;if(_0x21631f>=_0x482e88){_0x21631f=_0x482e88;_0x11a122=0xc8;}else{_0x11a122=0xce;}_0x51edd5[_0x0aa5('0x2b')](_0x11a122);return _0x51edd5['set'](_0x0aa5('0x31'),_0x4a1887+'-'+_0x21631f+'/'+_0x482e88)[_0x0aa5('0x2c')](_0x50ecdf);}return null;};}function patchUpdates(_0x36f80c){return function(_0x1f0847){try{jsonpatch[_0x0aa5('0x32')](_0x1f0847,_0x36f80c,!![]);}catch(_0x5d7154){return BPromise['reject'](_0x5d7154);}return _0x1f0847[_0x0aa5('0x33')]();};}function saveUpdates(_0x5788b6,_0x315691){return function(_0x4f0988){if(_0x4f0988){return _0x4f0988[_0x0aa5('0x34')](_0x5788b6)[_0x0aa5('0x1e')](function(_0x49b812){return _0x49b812;});}return null;};}function removeEntity(_0x4e7872,_0x54d236){return function(_0x40055b){if(_0x40055b){return _0x40055b[_0x0aa5('0x35')]()[_0x0aa5('0x1e')](function(){_0x4e7872['status'](0xcc)[_0x0aa5('0x2a')]();});}};}function handleEntityNotFound(_0x250a37,_0x2c2085){return function(_0x5e7cd5){if(!_0x5e7cd5){_0x250a37['sendStatus'](0x194);}return _0x5e7cd5;};}function handleError(_0x33c343,_0x5a78c2){_0x5a78c2=_0x5a78c2||0x1f4;return function(_0x2105d3){logger[_0x0aa5('0x24')](_0x2105d3[_0x0aa5('0x36')]);if(_0x2105d3[_0x0aa5('0x37')]){delete _0x2105d3[_0x0aa5('0x37')];}_0x33c343[_0x0aa5('0x2b')](_0x5a78c2)[_0x0aa5('0x38')](_0x2105d3);};}exports[_0x0aa5('0x39')]=function(_0x412c90,_0x159a2f){var _0x42c48f={},_0x4d9c5a={},_0x17ef05={'count':0x0,'rows':[]};var _0x5f43b9=_['map'](db[_0x0aa5('0x3a')][_0x0aa5('0x3b')],function(_0x45de04){return{'name':_0x45de04[_0x0aa5('0x3c')],'type':_0x45de04[_0x0aa5('0x3d')]['key']};});_0x4d9c5a[_0x0aa5('0x3e')]=_[_0x0aa5('0x3f')](_0x5f43b9,'name');_0x4d9c5a[_0x0aa5('0x40')]=_['keys'](_0x412c90['query']);_0x4d9c5a[_0x0aa5('0x41')]=_[_0x0aa5('0x42')](_0x4d9c5a[_0x0aa5('0x3e')],_0x4d9c5a[_0x0aa5('0x40')]);_0x42c48f[_0x0aa5('0x43')]=_[_0x0aa5('0x42')](_0x4d9c5a[_0x0aa5('0x3e')],qs[_0x0aa5('0x44')](_0x412c90[_0x0aa5('0x40')][_0x0aa5('0x44')]));_0x42c48f[_0x0aa5('0x43')]=_0x42c48f[_0x0aa5('0x43')]['length']?_0x42c48f[_0x0aa5('0x43')]:_0x4d9c5a['model'];if(!_0x412c90[_0x0aa5('0x40')][_0x0aa5('0x45')](_0x0aa5('0x46'))){_0x42c48f['limit']=qs[_0x0aa5('0x2f')](_0x412c90[_0x0aa5('0x40')][_0x0aa5('0x2f')]);_0x42c48f['offset']=qs[_0x0aa5('0x2d')](_0x412c90[_0x0aa5('0x40')][_0x0aa5('0x2d')]);}_0x42c48f[_0x0aa5('0x47')]=qs[_0x0aa5('0x48')](_0x412c90[_0x0aa5('0x40')][_0x0aa5('0x48')]);_0x42c48f[_0x0aa5('0x49')]=qs[_0x0aa5('0x41')](_[_0x0aa5('0x4a')](_0x412c90[_0x0aa5('0x40')],_0x4d9c5a['filters']),_0x5f43b9);if(_0x412c90[_0x0aa5('0x40')]['filter']){_0x42c48f[_0x0aa5('0x49')]=_[_0x0aa5('0x4b')](_0x42c48f[_0x0aa5('0x49')],{'$or':_[_0x0aa5('0x3f')](_0x5f43b9,function(_0xdc7a09){if(_0xdc7a09[_0x0aa5('0x3d')]!==_0x0aa5('0x4c')){var _0xf3a82c={};_0xf3a82c[_0xdc7a09[_0x0aa5('0x37')]]={'$like':'%'+_0x412c90[_0x0aa5('0x40')][_0x0aa5('0x4d')]+'%'};return _0xf3a82c;}})});}_0x42c48f=_[_0x0aa5('0x4b')]({},_0x42c48f,_0x412c90[_0x0aa5('0x4e')]);var _0x5eff70={'where':_0x42c48f[_0x0aa5('0x49')]};return db['SugarcrmConfiguration'][_0x0aa5('0x30')](_0x5eff70)['then'](function(_0x51f384){_0x17ef05['count']=_0x51f384;if(_0x412c90['query'][_0x0aa5('0x4f')]){_0x42c48f[_0x0aa5('0x50')]=[{'all':!![]}];}return db[_0x0aa5('0x3a')]['findAll'](_0x42c48f);})['then'](function(_0xdee1fe){_0x17ef05['rows']=_0xdee1fe;return _0x17ef05;})[_0x0aa5('0x1e')](respondWithFilteredResult(_0x159a2f,_0x42c48f))[_0x0aa5('0x28')](handleError(_0x159a2f,null));};exports[_0x0aa5('0x51')]=function(_0x1f17d0,_0x200521){var _0x4a8ca2={'raw':![],'where':{'id':_0x1f17d0[_0x0aa5('0x52')]['id']}},_0x111a24={};_0x111a24[_0x0aa5('0x3e')]=_['keys'](db[_0x0aa5('0x3a')][_0x0aa5('0x3b')]);_0x111a24[_0x0aa5('0x40')]=_[_0x0aa5('0x53')](_0x1f17d0[_0x0aa5('0x40')]);_0x111a24['filters']=_['intersection'](_0x111a24[_0x0aa5('0x3e')],_0x111a24[_0x0aa5('0x40')]);_0x4a8ca2[_0x0aa5('0x43')]=_[_0x0aa5('0x42')](_0x111a24['model'],qs[_0x0aa5('0x44')](_0x1f17d0[_0x0aa5('0x40')]['fields']));_0x4a8ca2['attributes']=_0x4a8ca2[_0x0aa5('0x43')][_0x0aa5('0x54')]?_0x4a8ca2['attributes']:_0x111a24[_0x0aa5('0x3e')];if(_0x1f17d0[_0x0aa5('0x40')][_0x0aa5('0x4f')]){_0x4a8ca2[_0x0aa5('0x50')]=[{'all':!![]}];}_0x4a8ca2=_[_0x0aa5('0x4b')]({},_0x4a8ca2,_0x1f17d0['options']);return db[_0x0aa5('0x3a')][_0x0aa5('0x55')](_0x4a8ca2)[_0x0aa5('0x1e')](handleEntityNotFound(_0x200521,null))[_0x0aa5('0x1e')](respondWithResult(_0x200521,null))[_0x0aa5('0x28')](handleError(_0x200521,null));};exports[_0x0aa5('0x56')]=function(_0x55c4de,_0x799a44){return db['SugarcrmConfiguration'][_0x0aa5('0x56')](_0x55c4de[_0x0aa5('0x57')],{})[_0x0aa5('0x1e')](respondWithResult(_0x799a44,0xc9))[_0x0aa5('0x28')](handleError(_0x799a44,null));};exports[_0x0aa5('0x34')]=function(_0x211e34,_0xce0a8e){if(_0x211e34[_0x0aa5('0x57')]['id']){delete _0x211e34[_0x0aa5('0x57')]['id'];}return db[_0x0aa5('0x3a')][_0x0aa5('0x55')]({'where':{'id':_0x211e34[_0x0aa5('0x52')]['id']}})['then'](handleEntityNotFound(_0xce0a8e,null))[_0x0aa5('0x1e')](saveUpdates(_0x211e34[_0x0aa5('0x57')],null))['then'](respondWithResult(_0xce0a8e,null))[_0x0aa5('0x28')](handleError(_0xce0a8e,null));};exports[_0x0aa5('0x35')]=function(_0x285edf,_0x435288){return db['SugarcrmConfiguration'][_0x0aa5('0x55')]({'where':{'id':_0x285edf[_0x0aa5('0x52')]['id']}})[_0x0aa5('0x1e')](handleEntityNotFound(_0x435288,null))[_0x0aa5('0x1e')](removeEntity(_0x435288,null))[_0x0aa5('0x28')](handleError(_0x435288,null));};exports[_0x0aa5('0x58')]=function(_0x50770f,_0x5571b3,_0x4e7667){var _0x5eb588={};var _0x3ee402={};var _0x3f52cc;var _0x63f58b;return db[_0x0aa5('0x3a')][_0x0aa5('0x59')]({'where':{'id':_0x50770f[_0x0aa5('0x52')]['id']}})['then'](handleEntityNotFound(_0x5571b3,null))['then'](function(_0x11386f){if(_0x11386f){_0x3f52cc=_0x11386f;_0x3ee402['model']=_[_0x0aa5('0x53')](db[_0x0aa5('0x5a')][_0x0aa5('0x3b')]);_0x3ee402[_0x0aa5('0x40')]=_[_0x0aa5('0x53')](_0x50770f[_0x0aa5('0x40')]);_0x3ee402[_0x0aa5('0x41')]=_[_0x0aa5('0x42')](_0x3ee402[_0x0aa5('0x3e')],_0x3ee402[_0x0aa5('0x40')]);_0x5eb588[_0x0aa5('0x43')]=_[_0x0aa5('0x42')](_0x3ee402['model'],qs[_0x0aa5('0x44')](_0x50770f['query']['fields']));_0x5eb588[_0x0aa5('0x43')]=_0x5eb588[_0x0aa5('0x43')]['length']?_0x5eb588['attributes']:_0x3ee402[_0x0aa5('0x3e')];_0x5eb588[_0x0aa5('0x47')]=qs[_0x0aa5('0x48')](_0x50770f[_0x0aa5('0x40')][_0x0aa5('0x48')]);_0x5eb588[_0x0aa5('0x49')]=qs[_0x0aa5('0x41')](_[_0x0aa5('0x4a')](_0x50770f[_0x0aa5('0x40')],_0x3ee402['filters']));if(_0x50770f['query']['filter']){_0x5eb588[_0x0aa5('0x49')]=_[_0x0aa5('0x4b')](_0x5eb588['where'],{'$or':_[_0x0aa5('0x3f')](_0x5eb588[_0x0aa5('0x43')],function(_0x201596){var _0x2f773a={};_0x2f773a[_0x201596]={'$like':'%'+_0x50770f[_0x0aa5('0x40')]['filter']+'%'};return _0x2f773a;})});}_0x5eb588=_['merge']({},_0x5eb588,_0x50770f[_0x0aa5('0x4e')]);return _0x3f52cc[_0x0aa5('0x58')](_0x5eb588);}})['then'](function(_0xf8b0ce){if(_0xf8b0ce){_0x63f58b=_0xf8b0ce[_0x0aa5('0x54')];if(!_0x50770f['query'][_0x0aa5('0x45')](_0x0aa5('0x46'))){_0x5eb588[_0x0aa5('0x2f')]=qs[_0x0aa5('0x2f')](_0x50770f['query'][_0x0aa5('0x2f')]);_0x5eb588[_0x0aa5('0x2d')]=qs[_0x0aa5('0x2d')](_0x50770f[_0x0aa5('0x40')][_0x0aa5('0x2d')]);}return _0x3f52cc[_0x0aa5('0x58')](_0x5eb588);}})[_0x0aa5('0x1e')](function(_0x533b65){if(_0x533b65){return _0x533b65?{'count':_0x63f58b,'rows':_0x533b65}:null;}})['then'](respondWithResult(_0x5571b3,null))[_0x0aa5('0x28')](handleError(_0x5571b3,null));};exports[_0x0aa5('0x5b')]=function(_0xacef41,_0x36fe47,_0x171cfb){var _0xbddae4={};var _0x369f2d={};var _0xddd466;var _0x185deb;return db[_0x0aa5('0x3a')][_0x0aa5('0x59')]({'where':{'id':_0xacef41['params']['id']}})[_0x0aa5('0x1e')](handleEntityNotFound(_0x36fe47,null))[_0x0aa5('0x1e')](function(_0x2d4c77){if(_0x2d4c77){_0xddd466=_0x2d4c77;_0x369f2d[_0x0aa5('0x3e')]=_[_0x0aa5('0x53')](db['SugarcrmField'][_0x0aa5('0x3b')]);_0x369f2d[_0x0aa5('0x40')]=_[_0x0aa5('0x53')](_0xacef41['query']);_0x369f2d['filters']=_[_0x0aa5('0x42')](_0x369f2d['model'],_0x369f2d[_0x0aa5('0x40')]);_0xbddae4[_0x0aa5('0x43')]=_[_0x0aa5('0x42')](_0x369f2d[_0x0aa5('0x3e')],qs[_0x0aa5('0x44')](_0xacef41[_0x0aa5('0x40')]['fields']));_0xbddae4[_0x0aa5('0x43')]=_0xbddae4[_0x0aa5('0x43')][_0x0aa5('0x54')]?_0xbddae4['attributes']:_0x369f2d[_0x0aa5('0x3e')];_0xbddae4[_0x0aa5('0x47')]=qs['sort'](_0xacef41['query'][_0x0aa5('0x48')]);_0xbddae4[_0x0aa5('0x49')]=qs['filters'](_[_0x0aa5('0x4a')](_0xacef41[_0x0aa5('0x40')],_0x369f2d[_0x0aa5('0x41')]));if(_0xacef41[_0x0aa5('0x40')][_0x0aa5('0x4d')]){_0xbddae4[_0x0aa5('0x49')]=_['merge'](_0xbddae4[_0x0aa5('0x49')],{'$or':_['map'](_0xbddae4[_0x0aa5('0x43')],function(_0x59e0ed){var _0x11e750={};_0x11e750[_0x59e0ed]={'$like':'%'+_0xacef41[_0x0aa5('0x40')][_0x0aa5('0x4d')]+'%'};return _0x11e750;})});}_0xbddae4=_[_0x0aa5('0x4b')]({},_0xbddae4,_0xacef41['options']);return _0xddd466[_0x0aa5('0x5b')](_0xbddae4);}})[_0x0aa5('0x1e')](function(_0x31b58b){if(_0x31b58b){_0x185deb=_0x31b58b[_0x0aa5('0x54')];if(!_0xacef41[_0x0aa5('0x40')][_0x0aa5('0x45')](_0x0aa5('0x46'))){_0xbddae4[_0x0aa5('0x2f')]=qs[_0x0aa5('0x2f')](_0xacef41[_0x0aa5('0x40')]['limit']);_0xbddae4[_0x0aa5('0x2d')]=qs[_0x0aa5('0x2d')](_0xacef41[_0x0aa5('0x40')][_0x0aa5('0x2d')]);}return _0xddd466[_0x0aa5('0x5b')](_0xbddae4);}})[_0x0aa5('0x1e')](function(_0x4167fb){if(_0x4167fb){return _0x4167fb?{'count':_0x185deb,'rows':_0x4167fb}:null;}})[_0x0aa5('0x1e')](respondWithResult(_0x36fe47,null))[_0x0aa5('0x28')](handleError(_0x36fe47,null));};exports['getDescriptions']=function(_0x29e496,_0x16b1c5,_0x380e4c){var _0x52aede={};var _0xee647c={};var _0x10e686;var _0xe22361;return db[_0x0aa5('0x3a')][_0x0aa5('0x59')]({'where':{'id':_0x29e496[_0x0aa5('0x52')]['id']}})['then'](handleEntityNotFound(_0x16b1c5,null))['then'](function(_0x4f39b1){if(_0x4f39b1){_0x10e686=_0x4f39b1;_0xee647c[_0x0aa5('0x3e')]=_['keys'](db[_0x0aa5('0x5a')][_0x0aa5('0x3b')]);_0xee647c['query']=_['keys'](_0x29e496[_0x0aa5('0x40')]);_0xee647c[_0x0aa5('0x41')]=_[_0x0aa5('0x42')](_0xee647c[_0x0aa5('0x3e')],_0xee647c['query']);_0x52aede[_0x0aa5('0x43')]=_[_0x0aa5('0x42')](_0xee647c['model'],qs[_0x0aa5('0x44')](_0x29e496['query'][_0x0aa5('0x44')]));_0x52aede[_0x0aa5('0x43')]=_0x52aede[_0x0aa5('0x43')][_0x0aa5('0x54')]?_0x52aede['attributes']:_0xee647c[_0x0aa5('0x3e')];_0x52aede[_0x0aa5('0x47')]=qs[_0x0aa5('0x48')](_0x29e496[_0x0aa5('0x40')]['sort']);_0x52aede[_0x0aa5('0x49')]=qs[_0x0aa5('0x41')](_[_0x0aa5('0x4a')](_0x29e496['query'],_0xee647c['filters']));if(_0x29e496[_0x0aa5('0x40')]['filter']){_0x52aede[_0x0aa5('0x49')]=_[_0x0aa5('0x4b')](_0x52aede[_0x0aa5('0x49')],{'$or':_[_0x0aa5('0x3f')](_0x52aede['attributes'],function(_0x7d76b1){var _0x43cd13={};_0x43cd13[_0x7d76b1]={'$like':'%'+_0x29e496[_0x0aa5('0x40')][_0x0aa5('0x4d')]+'%'};return _0x43cd13;})});}_0x52aede=_[_0x0aa5('0x4b')]({},_0x52aede,_0x29e496[_0x0aa5('0x4e')]);return _0x10e686['getDescriptions'](_0x52aede);}})[_0x0aa5('0x1e')](function(_0x34e69a){if(_0x34e69a){_0xe22361=_0x34e69a[_0x0aa5('0x54')];if(!_0x29e496['query'][_0x0aa5('0x45')](_0x0aa5('0x46'))){_0x52aede[_0x0aa5('0x2f')]=qs[_0x0aa5('0x2f')](_0x29e496[_0x0aa5('0x40')][_0x0aa5('0x2f')]);_0x52aede['offset']=qs['offset'](_0x29e496[_0x0aa5('0x40')][_0x0aa5('0x2d')]);}return _0x10e686[_0x0aa5('0x5c')](_0x52aede);}})['then'](function(_0x3c4f6d){if(_0x3c4f6d){return _0x3c4f6d?{'count':_0xe22361,'rows':_0x3c4f6d}:null;}})[_0x0aa5('0x1e')](respondWithResult(_0x16b1c5,null))[_0x0aa5('0x28')](handleError(_0x16b1c5,null));}; \ No newline at end of file +var _0xae0b=['request-promise','mustache','util','path','sox','to-csv','fs-extra','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','jayson/promise','client','http','request','then','SugarcrmConfiguration,\x20%s,\x20%s','debug','SugarcrmConfiguration,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result','catch','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','save','update','destroy','stack','name','send','map','SugarcrmConfiguration','fieldName','model','query','keys','intersection','fields','attributes','hasOwnProperty','nolimit','order','sort','where','pick','filters','merge','type','VIRTUAL','includeAll','include','findAll','rows','show','params','rawAttributes','length','options','find','create','body','SugarcrmField','getFields','getSubjects','findOne','filter','getDescriptions','rimraf','zip-dir','fast-json-patch'];(function(_0x5e338b,_0x50691a){var _0x4c496c=function(_0x3599ba){while(--_0x3599ba){_0x5e338b['push'](_0x5e338b['shift']());}};_0x4c496c(++_0x50691a);}(_0xae0b,0x1d3));var _0xbae0=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xae0b[_0x3dd15e];return _0x231fd0;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xbae0('0x0'));var zipdir=require(_0xbae0('0x1'));var jsonpatch=require(_0xbae0('0x2'));var rp=require(_0xbae0('0x3'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xbae0('0x4'));var util=require(_0xbae0('0x5'));var path=require(_0xbae0('0x6'));var sox=require(_0xbae0('0x7'));var csv=require(_0xbae0('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xbae0('0x9'));var _=require('lodash');var squel=require(_0xbae0('0xa'));var crypto=require(_0xbae0('0xb'));var jsforce=require(_0xbae0('0xc'));var deskjs=require(_0xbae0('0xd'));var toCsv=require(_0xbae0('0x8'));var querystring=require(_0xbae0('0xe'));var Papa=require('papaparse');var Redis=require(_0xbae0('0xf'));var authService=require('../../components/auth/service');var qs=require(_0xbae0('0x10'));var as=require(_0xbae0('0x11'));var hardwareService=require(_0xbae0('0x12'));var logger=require(_0xbae0('0x13'))(_0xbae0('0x14'));var utils=require(_0xbae0('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0xbae0('0x16'));var db=require(_0xbae0('0x17'))['db'];var jayson=require(_0xbae0('0x18'));var client=jayson[_0xbae0('0x19')][_0xbae0('0x1a')]({'port':0x232a});function respondWithRpcPromise(_0x1f0551,_0x2d3ea8,_0x33da65,_0x318ad1){return new BPromise(function(_0x4212fc,_0x50b08c){var _0x3ad2fc=_0x318ad1||client;return _0x3ad2fc[_0xbae0('0x1b')](_0x1f0551,_0x33da65)[_0xbae0('0x1c')](function(_0x3fc0f1){logger['info'](_0xbae0('0x1d'),_0x2d3ea8,'request\x20sent');logger[_0xbae0('0x1e')](_0xbae0('0x1f'),_0x2d3ea8,_0xbae0('0x20'),JSON[_0xbae0('0x21')](_0x3fc0f1));if(_0x3fc0f1[_0xbae0('0x22')]){if(_0x3fc0f1[_0xbae0('0x22')][_0xbae0('0x23')]===0x1f4){logger['error'](_0xbae0('0x1d'),_0x2d3ea8,_0x3fc0f1[_0xbae0('0x22')]['message']);return _0x50b08c(_0x3fc0f1[_0xbae0('0x22')]['message']);}logger[_0xbae0('0x22')](_0xbae0('0x1d'),_0x2d3ea8,_0x3fc0f1['error'][_0xbae0('0x24')]);return _0x4212fc(_0x3fc0f1[_0xbae0('0x22')][_0xbae0('0x24')]);}else{logger[_0xbae0('0x25')]('SugarcrmConfiguration,\x20%s,\x20%s',_0x2d3ea8,_0xbae0('0x20'));_0x4212fc(_0x3fc0f1[_0xbae0('0x26')][_0xbae0('0x24')]);}})[_0xbae0('0x27')](function(_0x15c31e){logger[_0xbae0('0x22')](_0xbae0('0x1d'),_0x2d3ea8,_0x15c31e);_0x50b08c(_0x15c31e);});});}function respondWithStatusCode(_0x4986b7,_0x3b1183){_0x3b1183=_0x3b1183||0xcc;return function(_0x3fd473){if(_0x3fd473){return _0x4986b7[_0xbae0('0x28')](_0x3b1183);}return _0x4986b7[_0xbae0('0x29')](_0x3b1183)[_0xbae0('0x2a')]();};}function respondWithResult(_0x59af9c,_0x380897){_0x380897=_0x380897||0xc8;return function(_0xf9e583){if(_0xf9e583){return _0x59af9c[_0xbae0('0x29')](_0x380897)[_0xbae0('0x2b')](_0xf9e583);}};}function respondWithFilteredResult(_0x58f27a,_0x3bd6d8){return function(_0x4cb053){if(_0x4cb053){var _0x24b9f6=typeof _0x3bd6d8[_0xbae0('0x2c')]===_0xbae0('0x2d')&&typeof _0x3bd6d8[_0xbae0('0x2e')]==='undefined';var _0x21f773=_0x4cb053[_0xbae0('0x2f')];var _0x2045b5=_0x24b9f6?0x0:_0x3bd6d8[_0xbae0('0x2c')];var _0x235b2f=_0x24b9f6?_0x4cb053[_0xbae0('0x2f')]:_0x3bd6d8[_0xbae0('0x2c')]+_0x3bd6d8['limit'];var _0xf3b617;if(_0x235b2f>=_0x21f773){_0x235b2f=_0x21f773;_0xf3b617=0xc8;}else{_0xf3b617=0xce;}_0x58f27a[_0xbae0('0x29')](_0xf3b617);return _0x58f27a[_0xbae0('0x30')](_0xbae0('0x31'),_0x2045b5+'-'+_0x235b2f+'/'+_0x21f773)['json'](_0x4cb053);}return null;};}function patchUpdates(_0x147efc){return function(_0x3e9051){try{jsonpatch[_0xbae0('0x32')](_0x3e9051,_0x147efc,!![]);}catch(_0x41c9ba){return BPromise['reject'](_0x41c9ba);}return _0x3e9051[_0xbae0('0x33')]();};}function saveUpdates(_0x158786,_0x10735c){return function(_0x5d21e1){if(_0x5d21e1){return _0x5d21e1[_0xbae0('0x34')](_0x158786)[_0xbae0('0x1c')](function(_0x35bb70){return _0x35bb70;});}return null;};}function removeEntity(_0x54b37b,_0x437279){return function(_0x3cc319){if(_0x3cc319){return _0x3cc319[_0xbae0('0x35')]()['then'](function(){_0x54b37b[_0xbae0('0x29')](0xcc)['end']();});}};}function handleEntityNotFound(_0x44c672,_0x477608){return function(_0x5e40a6){if(!_0x5e40a6){_0x44c672[_0xbae0('0x28')](0x194);}return _0x5e40a6;};}function handleError(_0x1a5bdf,_0x5e6f12){_0x5e6f12=_0x5e6f12||0x1f4;return function(_0x10e279){logger[_0xbae0('0x22')](_0x10e279[_0xbae0('0x36')]);if(_0x10e279[_0xbae0('0x37')]){delete _0x10e279[_0xbae0('0x37')];}_0x1a5bdf[_0xbae0('0x29')](_0x5e6f12)[_0xbae0('0x38')](_0x10e279);};}exports['index']=function(_0x168ef4,_0x286953){var _0x375ad0={},_0x507cea={},_0x1eba03={'count':0x0,'rows':[]};var _0x23b63d=_[_0xbae0('0x39')](db[_0xbae0('0x3a')]['rawAttributes'],function(_0x3c2b8c){return{'name':_0x3c2b8c[_0xbae0('0x3b')],'type':_0x3c2b8c['type']['key']};});_0x507cea[_0xbae0('0x3c')]=_[_0xbae0('0x39')](_0x23b63d,_0xbae0('0x37'));_0x507cea[_0xbae0('0x3d')]=_[_0xbae0('0x3e')](_0x168ef4[_0xbae0('0x3d')]);_0x507cea['filters']=_[_0xbae0('0x3f')](_0x507cea[_0xbae0('0x3c')],_0x507cea[_0xbae0('0x3d')]);_0x375ad0['attributes']=_[_0xbae0('0x3f')](_0x507cea[_0xbae0('0x3c')],qs[_0xbae0('0x40')](_0x168ef4[_0xbae0('0x3d')]['fields']));_0x375ad0[_0xbae0('0x41')]=_0x375ad0[_0xbae0('0x41')]['length']?_0x375ad0['attributes']:_0x507cea[_0xbae0('0x3c')];if(!_0x168ef4['query'][_0xbae0('0x42')](_0xbae0('0x43'))){_0x375ad0[_0xbae0('0x2e')]=qs[_0xbae0('0x2e')](_0x168ef4['query'][_0xbae0('0x2e')]);_0x375ad0['offset']=qs[_0xbae0('0x2c')](_0x168ef4[_0xbae0('0x3d')][_0xbae0('0x2c')]);}_0x375ad0[_0xbae0('0x44')]=qs[_0xbae0('0x45')](_0x168ef4['query'][_0xbae0('0x45')]);_0x375ad0[_0xbae0('0x46')]=qs['filters'](_[_0xbae0('0x47')](_0x168ef4[_0xbae0('0x3d')],_0x507cea[_0xbae0('0x48')]),_0x23b63d);if(_0x168ef4[_0xbae0('0x3d')]['filter']){_0x375ad0[_0xbae0('0x46')]=_[_0xbae0('0x49')](_0x375ad0[_0xbae0('0x46')],{'$or':_[_0xbae0('0x39')](_0x23b63d,function(_0x5eaf84){if(_0x5eaf84[_0xbae0('0x4a')]!==_0xbae0('0x4b')){var _0x52f94c={};_0x52f94c[_0x5eaf84[_0xbae0('0x37')]]={'$like':'%'+_0x168ef4['query']['filter']+'%'};return _0x52f94c;}})});}_0x375ad0=_['merge']({},_0x375ad0,_0x168ef4['options']);var _0x4bf734={'where':_0x375ad0[_0xbae0('0x46')]};return db[_0xbae0('0x3a')][_0xbae0('0x2f')](_0x4bf734)[_0xbae0('0x1c')](function(_0x56b55e){_0x1eba03[_0xbae0('0x2f')]=_0x56b55e;if(_0x168ef4['query'][_0xbae0('0x4c')]){_0x375ad0[_0xbae0('0x4d')]=[{'all':!![]}];}return db[_0xbae0('0x3a')][_0xbae0('0x4e')](_0x375ad0);})[_0xbae0('0x1c')](function(_0x2519ba){_0x1eba03[_0xbae0('0x4f')]=_0x2519ba;return _0x1eba03;})[_0xbae0('0x1c')](respondWithFilteredResult(_0x286953,_0x375ad0))[_0xbae0('0x27')](handleError(_0x286953,null));};exports[_0xbae0('0x50')]=function(_0x1516b9,_0x22d7f3){var _0x44d8cc={'raw':![],'where':{'id':_0x1516b9[_0xbae0('0x51')]['id']}},_0x1d1b6b={};_0x1d1b6b[_0xbae0('0x3c')]=_[_0xbae0('0x3e')](db[_0xbae0('0x3a')][_0xbae0('0x52')]);_0x1d1b6b[_0xbae0('0x3d')]=_[_0xbae0('0x3e')](_0x1516b9[_0xbae0('0x3d')]);_0x1d1b6b[_0xbae0('0x48')]=_['intersection'](_0x1d1b6b[_0xbae0('0x3c')],_0x1d1b6b[_0xbae0('0x3d')]);_0x44d8cc[_0xbae0('0x41')]=_['intersection'](_0x1d1b6b[_0xbae0('0x3c')],qs[_0xbae0('0x40')](_0x1516b9[_0xbae0('0x3d')]['fields']));_0x44d8cc[_0xbae0('0x41')]=_0x44d8cc['attributes'][_0xbae0('0x53')]?_0x44d8cc[_0xbae0('0x41')]:_0x1d1b6b[_0xbae0('0x3c')];if(_0x1516b9[_0xbae0('0x3d')][_0xbae0('0x4c')]){_0x44d8cc[_0xbae0('0x4d')]=[{'all':!![]}];}_0x44d8cc=_[_0xbae0('0x49')]({},_0x44d8cc,_0x1516b9[_0xbae0('0x54')]);return db['SugarcrmConfiguration'][_0xbae0('0x55')](_0x44d8cc)[_0xbae0('0x1c')](handleEntityNotFound(_0x22d7f3,null))[_0xbae0('0x1c')](respondWithResult(_0x22d7f3,null))[_0xbae0('0x27')](handleError(_0x22d7f3,null));};exports[_0xbae0('0x56')]=function(_0x4aec1a,_0x43ceb3){return db[_0xbae0('0x3a')]['create'](_0x4aec1a[_0xbae0('0x57')],{})[_0xbae0('0x1c')](respondWithResult(_0x43ceb3,0xc9))[_0xbae0('0x27')](handleError(_0x43ceb3,null));};exports[_0xbae0('0x34')]=function(_0x49eecb,_0x3ca663){if(_0x49eecb[_0xbae0('0x57')]['id']){delete _0x49eecb[_0xbae0('0x57')]['id'];}return db[_0xbae0('0x3a')]['find']({'where':{'id':_0x49eecb[_0xbae0('0x51')]['id']}})[_0xbae0('0x1c')](handleEntityNotFound(_0x3ca663,null))[_0xbae0('0x1c')](saveUpdates(_0x49eecb[_0xbae0('0x57')],null))[_0xbae0('0x1c')](respondWithResult(_0x3ca663,null))['catch'](handleError(_0x3ca663,null));};exports[_0xbae0('0x35')]=function(_0x4e06af,_0x3bde88){return db[_0xbae0('0x3a')]['find']({'where':{'id':_0x4e06af[_0xbae0('0x51')]['id']}})[_0xbae0('0x1c')](handleEntityNotFound(_0x3bde88,null))['then'](removeEntity(_0x3bde88,null))['catch'](handleError(_0x3bde88,null));};exports['getFields']=function(_0x5206f5,_0x2252e8,_0x42cb41){var _0x101c41={};var _0x58a273={};var _0x23749b;var _0x1c7a57;return db['SugarcrmConfiguration']['findOne']({'where':{'id':_0x5206f5[_0xbae0('0x51')]['id']}})[_0xbae0('0x1c')](handleEntityNotFound(_0x2252e8,null))[_0xbae0('0x1c')](function(_0x320d3f){if(_0x320d3f){_0x23749b=_0x320d3f;_0x58a273[_0xbae0('0x3c')]=_['keys'](db[_0xbae0('0x58')][_0xbae0('0x52')]);_0x58a273[_0xbae0('0x3d')]=_['keys'](_0x5206f5[_0xbae0('0x3d')]);_0x58a273[_0xbae0('0x48')]=_['intersection'](_0x58a273[_0xbae0('0x3c')],_0x58a273['query']);_0x101c41[_0xbae0('0x41')]=_['intersection'](_0x58a273[_0xbae0('0x3c')],qs[_0xbae0('0x40')](_0x5206f5[_0xbae0('0x3d')][_0xbae0('0x40')]));_0x101c41[_0xbae0('0x41')]=_0x101c41[_0xbae0('0x41')][_0xbae0('0x53')]?_0x101c41[_0xbae0('0x41')]:_0x58a273['model'];_0x101c41[_0xbae0('0x44')]=qs['sort'](_0x5206f5[_0xbae0('0x3d')][_0xbae0('0x45')]);_0x101c41[_0xbae0('0x46')]=qs['filters'](_[_0xbae0('0x47')](_0x5206f5['query'],_0x58a273[_0xbae0('0x48')]));if(_0x5206f5[_0xbae0('0x3d')]['filter']){_0x101c41[_0xbae0('0x46')]=_['merge'](_0x101c41[_0xbae0('0x46')],{'$or':_[_0xbae0('0x39')](_0x101c41['attributes'],function(_0x3c0b4a){var _0x1dc141={};_0x1dc141[_0x3c0b4a]={'$like':'%'+_0x5206f5[_0xbae0('0x3d')]['filter']+'%'};return _0x1dc141;})});}_0x101c41=_[_0xbae0('0x49')]({},_0x101c41,_0x5206f5['options']);return _0x23749b[_0xbae0('0x59')](_0x101c41);}})[_0xbae0('0x1c')](function(_0x4743b8){if(_0x4743b8){_0x1c7a57=_0x4743b8['length'];if(!_0x5206f5[_0xbae0('0x3d')]['hasOwnProperty'](_0xbae0('0x43'))){_0x101c41[_0xbae0('0x2e')]=qs['limit'](_0x5206f5[_0xbae0('0x3d')][_0xbae0('0x2e')]);_0x101c41[_0xbae0('0x2c')]=qs['offset'](_0x5206f5[_0xbae0('0x3d')][_0xbae0('0x2c')]);}return _0x23749b[_0xbae0('0x59')](_0x101c41);}})[_0xbae0('0x1c')](function(_0x5c7607){if(_0x5c7607){return _0x5c7607?{'count':_0x1c7a57,'rows':_0x5c7607}:null;}})[_0xbae0('0x1c')](respondWithResult(_0x2252e8,null))[_0xbae0('0x27')](handleError(_0x2252e8,null));};exports[_0xbae0('0x5a')]=function(_0x2dd16c,_0x386fce,_0x561619){var _0x82baf6={};var _0x27a18f={};var _0x153817;var _0x16d4a1;return db['SugarcrmConfiguration'][_0xbae0('0x5b')]({'where':{'id':_0x2dd16c['params']['id']}})[_0xbae0('0x1c')](handleEntityNotFound(_0x386fce,null))[_0xbae0('0x1c')](function(_0x23cbf6){if(_0x23cbf6){_0x153817=_0x23cbf6;_0x27a18f[_0xbae0('0x3c')]=_[_0xbae0('0x3e')](db[_0xbae0('0x58')]['rawAttributes']);_0x27a18f[_0xbae0('0x3d')]=_[_0xbae0('0x3e')](_0x2dd16c[_0xbae0('0x3d')]);_0x27a18f[_0xbae0('0x48')]=_[_0xbae0('0x3f')](_0x27a18f[_0xbae0('0x3c')],_0x27a18f[_0xbae0('0x3d')]);_0x82baf6[_0xbae0('0x41')]=_[_0xbae0('0x3f')](_0x27a18f[_0xbae0('0x3c')],qs[_0xbae0('0x40')](_0x2dd16c[_0xbae0('0x3d')][_0xbae0('0x40')]));_0x82baf6[_0xbae0('0x41')]=_0x82baf6[_0xbae0('0x41')][_0xbae0('0x53')]?_0x82baf6[_0xbae0('0x41')]:_0x27a18f[_0xbae0('0x3c')];_0x82baf6['order']=qs['sort'](_0x2dd16c[_0xbae0('0x3d')][_0xbae0('0x45')]);_0x82baf6['where']=qs[_0xbae0('0x48')](_[_0xbae0('0x47')](_0x2dd16c[_0xbae0('0x3d')],_0x27a18f['filters']));if(_0x2dd16c[_0xbae0('0x3d')][_0xbae0('0x5c')]){_0x82baf6[_0xbae0('0x46')]=_['merge'](_0x82baf6[_0xbae0('0x46')],{'$or':_[_0xbae0('0x39')](_0x82baf6['attributes'],function(_0x173d06){var _0x23d8e0={};_0x23d8e0[_0x173d06]={'$like':'%'+_0x2dd16c[_0xbae0('0x3d')][_0xbae0('0x5c')]+'%'};return _0x23d8e0;})});}_0x82baf6=_[_0xbae0('0x49')]({},_0x82baf6,_0x2dd16c[_0xbae0('0x54')]);return _0x153817[_0xbae0('0x5a')](_0x82baf6);}})[_0xbae0('0x1c')](function(_0xb9424d){if(_0xb9424d){_0x16d4a1=_0xb9424d[_0xbae0('0x53')];if(!_0x2dd16c[_0xbae0('0x3d')][_0xbae0('0x42')]('nolimit')){_0x82baf6[_0xbae0('0x2e')]=qs[_0xbae0('0x2e')](_0x2dd16c['query'][_0xbae0('0x2e')]);_0x82baf6[_0xbae0('0x2c')]=qs[_0xbae0('0x2c')](_0x2dd16c['query'][_0xbae0('0x2c')]);}return _0x153817[_0xbae0('0x5a')](_0x82baf6);}})[_0xbae0('0x1c')](function(_0x348eac){if(_0x348eac){return _0x348eac?{'count':_0x16d4a1,'rows':_0x348eac}:null;}})['then'](respondWithResult(_0x386fce,null))['catch'](handleError(_0x386fce,null));};exports['getDescriptions']=function(_0x5bb51e,_0x1e8ab8,_0xa4846f){var _0x59e70b={};var _0x376388={};var _0x2c24ab;var _0x5b813d;return db[_0xbae0('0x3a')]['findOne']({'where':{'id':_0x5bb51e[_0xbae0('0x51')]['id']}})['then'](handleEntityNotFound(_0x1e8ab8,null))['then'](function(_0x4b31fa){if(_0x4b31fa){_0x2c24ab=_0x4b31fa;_0x376388[_0xbae0('0x3c')]=_[_0xbae0('0x3e')](db['SugarcrmField'][_0xbae0('0x52')]);_0x376388[_0xbae0('0x3d')]=_[_0xbae0('0x3e')](_0x5bb51e[_0xbae0('0x3d')]);_0x376388[_0xbae0('0x48')]=_['intersection'](_0x376388[_0xbae0('0x3c')],_0x376388[_0xbae0('0x3d')]);_0x59e70b[_0xbae0('0x41')]=_[_0xbae0('0x3f')](_0x376388[_0xbae0('0x3c')],qs['fields'](_0x5bb51e[_0xbae0('0x3d')]['fields']));_0x59e70b['attributes']=_0x59e70b[_0xbae0('0x41')][_0xbae0('0x53')]?_0x59e70b[_0xbae0('0x41')]:_0x376388[_0xbae0('0x3c')];_0x59e70b[_0xbae0('0x44')]=qs['sort'](_0x5bb51e[_0xbae0('0x3d')][_0xbae0('0x45')]);_0x59e70b['where']=qs['filters'](_[_0xbae0('0x47')](_0x5bb51e[_0xbae0('0x3d')],_0x376388[_0xbae0('0x48')]));if(_0x5bb51e[_0xbae0('0x3d')][_0xbae0('0x5c')]){_0x59e70b[_0xbae0('0x46')]=_[_0xbae0('0x49')](_0x59e70b[_0xbae0('0x46')],{'$or':_[_0xbae0('0x39')](_0x59e70b[_0xbae0('0x41')],function(_0x26c98d){var _0x29b637={};_0x29b637[_0x26c98d]={'$like':'%'+_0x5bb51e[_0xbae0('0x3d')][_0xbae0('0x5c')]+'%'};return _0x29b637;})});}_0x59e70b=_['merge']({},_0x59e70b,_0x5bb51e[_0xbae0('0x54')]);return _0x2c24ab[_0xbae0('0x5d')](_0x59e70b);}})[_0xbae0('0x1c')](function(_0x11cfad){if(_0x11cfad){_0x5b813d=_0x11cfad[_0xbae0('0x53')];if(!_0x5bb51e[_0xbae0('0x3d')][_0xbae0('0x42')]('nolimit')){_0x59e70b[_0xbae0('0x2e')]=qs[_0xbae0('0x2e')](_0x5bb51e[_0xbae0('0x3d')][_0xbae0('0x2e')]);_0x59e70b[_0xbae0('0x2c')]=qs[_0xbae0('0x2c')](_0x5bb51e['query'][_0xbae0('0x2c')]);}return _0x2c24ab[_0xbae0('0x5d')](_0x59e70b);}})['then'](function(_0x5d912d){if(_0x5d912d){return _0x5d912d?{'count':_0x5b813d,'rows':_0x5d912d}:null;}})[_0xbae0('0x1c')](respondWithResult(_0x1e8ab8,null))[_0xbae0('0x27')](handleError(_0x1e8ab8,null));}; \ No newline at end of file diff --git a/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.model.js b/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.model.js index 7153eb0..6caa05c 100644 --- a/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.model.js +++ b/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfc97=['util','api','moment','request-promise','path','rimraf','../../config/environment','./intSugarcrmConfiguration.attributes','exports','define','SugarcrmConfiguration','lodash'];(function(_0x53f7fb,_0x2f3c53){var _0x5751ea=function(_0x4fe375){while(--_0x4fe375){_0x53f7fb['push'](_0x53f7fb['shift']());}};_0x5751ea(++_0x2f3c53);}(_0xfc97,0x1eb));var _0x7fc9=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xfc97[_0x321bb2];return _0x9c12ed;};'use strict';var _=require(_0x7fc9('0x0'));var util=require(_0x7fc9('0x1'));var logger=require('../../config/logger')(_0x7fc9('0x2'));var moment=require(_0x7fc9('0x3'));var BPromise=require('bluebird');var rp=require(_0x7fc9('0x4'));var fs=require('fs');var path=require(_0x7fc9('0x5'));var rimraf=require(_0x7fc9('0x6'));var config=require(_0x7fc9('0x7'));var attributes=require(_0x7fc9('0x8'));module[_0x7fc9('0x9')]=function(_0x2b7186,_0x15a62b){return _0x2b7186[_0x7fc9('0xa')](_0x7fc9('0xb'),attributes,{'tableName':'int_sugarcrm_configurations','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x7b98=['../../config/environment','exports','SugarcrmConfiguration','int_sugarcrm_configurations','lodash','util','../../config/logger','api','moment','bluebird','request-promise','rimraf'];(function(_0x51e953,_0x25fe1e){var _0x2b8568=function(_0x36e188){while(--_0x36e188){_0x51e953['push'](_0x51e953['shift']());}};_0x2b8568(++_0x25fe1e);}(_0x7b98,0x118));var _0x87b9=function(_0x5302fb,_0x1a2db3){_0x5302fb=_0x5302fb-0x0;var _0x43e6a4=_0x7b98[_0x5302fb];return _0x43e6a4;};'use strict';var _=require(_0x87b9('0x0'));var util=require(_0x87b9('0x1'));var logger=require(_0x87b9('0x2'))(_0x87b9('0x3'));var moment=require(_0x87b9('0x4'));var BPromise=require(_0x87b9('0x5'));var rp=require(_0x87b9('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0x87b9('0x7'));var config=require(_0x87b9('0x8'));var attributes=require('./intSugarcrmConfiguration.attributes');module[_0x87b9('0x9')]=function(_0x5ad608,_0x2c8c92){return _0x5ad608['define'](_0x87b9('0xa'),attributes,{'tableName':_0x87b9('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.rpc.js b/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.rpc.js index f0615d0..e2c4501 100644 --- a/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.rpc.js +++ b/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x405b=['../../mysqldb','../../config/utils','../../config/logger','../../config/environment','http','request','then','info','SugarcrmConfiguration,\x20%s,\x20%s','request\x20sent','debug','SugarcrmConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','lodash','util','moment','randomstring','ioredis'];(function(_0x1743e8,_0x59be92){var _0xced648=function(_0x16e15f){while(--_0x16e15f){_0x1743e8['push'](_0x1743e8['shift']());}};_0xced648(++_0x59be92);}(_0x405b,0xab));var _0xb405=function(_0x588baa,_0x1fa344){_0x588baa=_0x588baa-0x0;var _0x185f73=_0x405b[_0x588baa];return _0x185f73;};'use strict';var _=require(_0xb405('0x0'));var util=require(_0xb405('0x1'));var moment=require(_0xb405('0x2'));var BPromise=require('bluebird');var rs=require(_0xb405('0x3'));var fs=require('fs');var Redis=require(_0xb405('0x4'));var db=require(_0xb405('0x5'))['db'];var utils=require(_0xb405('0x6'));var logger=require(_0xb405('0x7'))('rpc');var config=require(_0xb405('0x8'));var jayson=require('jayson/promise');var client=jayson['client'][_0xb405('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x488715,_0xac23a3,_0x825d3c){return new BPromise(function(_0x1ee820,_0x3b4fc8){return client[_0xb405('0xa')](_0x488715,_0x825d3c)[_0xb405('0xb')](function(_0x18528b){logger[_0xb405('0xc')](_0xb405('0xd'),_0xac23a3,_0xb405('0xe'));logger[_0xb405('0xf')](_0xb405('0x10'),_0xac23a3,'request\x20sent',JSON[_0xb405('0x11')](_0x18528b));if(_0x18528b[_0xb405('0x12')]){if(_0x18528b[_0xb405('0x12')][_0xb405('0x13')]===0x1f4){logger[_0xb405('0x12')](_0xb405('0xd'),_0xac23a3,_0x18528b[_0xb405('0x12')][_0xb405('0x14')]);return _0x3b4fc8(_0x18528b[_0xb405('0x12')]['message']);}logger[_0xb405('0x12')](_0xb405('0xd'),_0xac23a3,_0x18528b['error'][_0xb405('0x14')]);return _0x1ee820(_0x18528b[_0xb405('0x12')][_0xb405('0x14')]);}else{logger[_0xb405('0xc')](_0xb405('0xd'),_0xac23a3,'request\x20sent');_0x1ee820(_0x18528b['result']['message']);}})[_0xb405('0x15')](function(_0x1f32b2){logger['error'](_0xb405('0xd'),_0xac23a3,_0x1f32b2);_0x3b4fc8(_0x1f32b2);});});} \ No newline at end of file +var _0x72da=['message','info','result','catch','lodash','moment','bluebird','../../config/utils','../../config/logger','rpc','../../config/environment','http','request','SugarcrmConfiguration,\x20%s,\x20%s','request\x20sent','debug','SugarcrmConfiguration,\x20%s,\x20%s,\x20%s','error','code'];(function(_0x1cf20f,_0x35344a){var _0x7189bb=function(_0x22d3a8){while(--_0x22d3a8){_0x1cf20f['push'](_0x1cf20f['shift']());}};_0x7189bb(++_0x35344a);}(_0x72da,0x1f2));var _0xa72d=function(_0x49c68e,_0x1c1673){_0x49c68e=_0x49c68e-0x0;var _0x33032b=_0x72da[_0x49c68e];return _0x33032b;};'use strict';var _=require(_0xa72d('0x0'));var util=require('util');var moment=require(_0xa72d('0x1'));var BPromise=require(_0xa72d('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xa72d('0x3'));var logger=require(_0xa72d('0x4'))(_0xa72d('0x5'));var config=require(_0xa72d('0x6'));var jayson=require('jayson/promise');var client=jayson['client'][_0xa72d('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x32899a,_0x1f8f01,_0x5a8155){return new BPromise(function(_0x2472c4,_0x3404e2){return client[_0xa72d('0x8')](_0x32899a,_0x5a8155)['then'](function(_0x3a9655){logger['info'](_0xa72d('0x9'),_0x1f8f01,_0xa72d('0xa'));logger[_0xa72d('0xb')](_0xa72d('0xc'),_0x1f8f01,_0xa72d('0xa'),JSON['stringify'](_0x3a9655));if(_0x3a9655[_0xa72d('0xd')]){if(_0x3a9655['error'][_0xa72d('0xe')]===0x1f4){logger[_0xa72d('0xd')](_0xa72d('0x9'),_0x1f8f01,_0x3a9655[_0xa72d('0xd')][_0xa72d('0xf')]);return _0x3404e2(_0x3a9655['error'][_0xa72d('0xf')]);}logger[_0xa72d('0xd')](_0xa72d('0x9'),_0x1f8f01,_0x3a9655['error'][_0xa72d('0xf')]);return _0x2472c4(_0x3a9655[_0xa72d('0xd')][_0xa72d('0xf')]);}else{logger[_0xa72d('0x10')](_0xa72d('0x9'),_0x1f8f01,_0xa72d('0xa'));_0x2472c4(_0x3a9655[_0xa72d('0x11')]['message']);}})[_0xa72d('0x12')](function(_0xff101){logger['error']('SugarcrmConfiguration,\x20%s,\x20%s',_0x1f8f01,_0xff101);_0x3404e2(_0xff101);});});} \ No newline at end of file diff --git a/server/api/intSugarcrmField/index.js b/server/api/intSugarcrmField/index.js index 202e49c..7e83909 100644 --- a/server/api/intSugarcrmField/index.js +++ b/server/api/intSugarcrmField/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa8d0=['/:id','show','post','create','put','update','delete','destroy','exports','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intSugarcrmField.controller','isAuthenticated','index','get'];(function(_0x1d930e,_0x20d8b8){var _0x5bbd66=function(_0x3c7488){while(--_0x3c7488){_0x1d930e['push'](_0x1d930e['shift']());}};_0x5bbd66(++_0x20d8b8);}(_0xa8d0,0x77));var _0x0a8d=function(_0x445175,_0x49ee96){_0x445175=_0x445175-0x0;var _0x559740=_0xa8d0[_0x445175];return _0x559740;};'use strict';var multer=require(_0x0a8d('0x0'));var util=require(_0x0a8d('0x1'));var path=require(_0x0a8d('0x2'));var timeout=require(_0x0a8d('0x3'));var express=require(_0x0a8d('0x4'));var router=express['Router']();var fs_extra=require(_0x0a8d('0x5'));var auth=require(_0x0a8d('0x6'));var interaction=require(_0x0a8d('0x7'));var config=require(_0x0a8d('0x8'));var controller=require(_0x0a8d('0x9'));router['get']('/',auth[_0x0a8d('0xa')](),controller[_0x0a8d('0xb')]);router[_0x0a8d('0xc')](_0x0a8d('0xd'),auth[_0x0a8d('0xa')](),controller[_0x0a8d('0xe')]);router[_0x0a8d('0xf')]('/',auth['isAuthenticated'](),controller[_0x0a8d('0x10')]);router[_0x0a8d('0x11')](_0x0a8d('0xd'),auth[_0x0a8d('0xa')](),controller[_0x0a8d('0x12')]);router[_0x0a8d('0x13')](_0x0a8d('0xd'),auth[_0x0a8d('0xa')](),controller[_0x0a8d('0x14')]);module[_0x0a8d('0x15')]=router; \ No newline at end of file +var _0x203b=['connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./intSugarcrmField.controller','get','isAuthenticated','index','/:id','post','create','put','update','delete','exports','util','path'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x203b,0xa9));var _0xb203=function(_0x37dc8f,_0x3df2a9){_0x37dc8f=_0x37dc8f-0x0;var _0x7175cf=_0x203b[_0x37dc8f];return _0x7175cf;};'use strict';var multer=require('multer');var util=require(_0xb203('0x0'));var path=require(_0xb203('0x1'));var timeout=require(_0xb203('0x2'));var express=require(_0xb203('0x3'));var router=express[_0xb203('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0xb203('0x5'));var interaction=require(_0xb203('0x6'));var config=require(_0xb203('0x7'));var controller=require(_0xb203('0x8'));router[_0xb203('0x9')]('/',auth[_0xb203('0xa')](),controller[_0xb203('0xb')]);router['get'](_0xb203('0xc'),auth[_0xb203('0xa')](),controller['show']);router[_0xb203('0xd')]('/',auth['isAuthenticated'](),controller[_0xb203('0xe')]);router[_0xb203('0xf')]('/:id',auth[_0xb203('0xa')](),controller[_0xb203('0x10')]);router[_0xb203('0x11')]('/:id',auth[_0xb203('0xa')](),controller['destroy']);module[_0xb203('0x12')]=router; \ No newline at end of file diff --git a/server/api/intSugarcrmField/intSugarcrmField.attributes.js b/server/api/intSugarcrmField/intSugarcrmField.attributes.js index 3aaccd5..e4cc941 100644 --- a/server/api/intSugarcrmField/intSugarcrmField.attributes.js +++ b/server/api/intSugarcrmField/intSugarcrmField.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x279a=['BOOLEAN','exports','ENUM','string','variable','customVariable','picklist','STRING'];(function(_0x3aac12,_0x5ce4a3){var _0x283857=function(_0x581ab6){while(--_0x581ab6){_0x3aac12['push'](_0x3aac12['shift']());}};_0x283857(++_0x5ce4a3);}(_0x279a,0x141));var _0xa279=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x279a[_0x14add3];return _0x4a174f;};'use strict';var Sequelize=require('sequelize');module[_0xa279('0x0')]={'type':{'type':Sequelize[_0xa279('0x1')](_0xa279('0x2'),_0xa279('0x3'),_0xa279('0x4'),'keyValue',_0xa279('0x5')),'defaultValue':'string'},'content':{'type':Sequelize[_0xa279('0x6')]},'key':{'type':Sequelize['STRING']},'keyType':{'type':Sequelize['ENUM'](_0xa279('0x2'),_0xa279('0x3'),_0xa279('0x4'))},'keyContent':{'type':Sequelize[_0xa279('0x6')]},'idField':{'type':Sequelize[_0xa279('0x6')]},'nameField':{'type':Sequelize[_0xa279('0x6')]},'customField':{'type':Sequelize[_0xa279('0x7')],'defaultValue':!![]},'variableName':{'type':Sequelize['STRING']}}; \ No newline at end of file +var _0x418a=['STRING','BOOLEAN','sequelize','ENUM','string','variable','customVariable','picklist'];(function(_0x599e60,_0x5b6519){var _0x468e19=function(_0xcdfd97){while(--_0xcdfd97){_0x599e60['push'](_0x599e60['shift']());}};_0x468e19(++_0x5b6519);}(_0x418a,0x7a));var _0xa418=function(_0x2d9090,_0x2048e8){_0x2d9090=_0x2d9090-0x0;var _0x535479=_0x418a[_0x2d9090];return _0x535479;};'use strict';var Sequelize=require(_0xa418('0x0'));module['exports']={'type':{'type':Sequelize[_0xa418('0x1')](_0xa418('0x2'),_0xa418('0x3'),_0xa418('0x4'),'keyValue',_0xa418('0x5')),'defaultValue':_0xa418('0x2')},'content':{'type':Sequelize[_0xa418('0x6')]},'key':{'type':Sequelize[_0xa418('0x6')]},'keyType':{'type':Sequelize[_0xa418('0x1')](_0xa418('0x2'),'variable',_0xa418('0x4'))},'keyContent':{'type':Sequelize[_0xa418('0x6')]},'idField':{'type':Sequelize['STRING']},'nameField':{'type':Sequelize[_0xa418('0x6')]},'customField':{'type':Sequelize[_0xa418('0x7')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0xa418('0x6')]}}; \ No newline at end of file diff --git a/server/api/intSugarcrmField/intSugarcrmField.controller.js b/server/api/intSugarcrmField/intSugarcrmField.controller.js index 9fa4500..d42d68c 100644 --- a/server/api/intSugarcrmField/intSugarcrmField.controller.js +++ b/server/api/intSugarcrmField/intSugarcrmField.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xeb48=['../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','offset','limit','undefined','count','set','Content-Range','json','apply','reject','save','update','then','destroy','end','stack','name','index','map','SugarcrmField','fieldName','type','key','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','where','pick','filter','merge','VIRTUAL','includeAll','findAll','catch','params','keys','rawAttributes','include','find','create','body','eml-format','rimraf','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','fs-extra','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs'];(function(_0x108b84,_0x4c77d4){var _0x56a0af=function(_0x532b77){while(--_0x532b77){_0x108b84['push'](_0x108b84['shift']());}};_0x56a0af(++_0x4c77d4);}(_0xeb48,0x119));var _0x8eb4=function(_0x17f734,_0x4d42ef){_0x17f734=_0x17f734-0x0;var _0x3ce96f=_0xeb48[_0x17f734];return _0x3ce96f;};'use strict';var emlformat=require(_0x8eb4('0x0'));var rimraf=require(_0x8eb4('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x8eb4('0x2'));var rp=require(_0x8eb4('0x3'));var moment=require('moment');var BPromise=require(_0x8eb4('0x4'));var Mustache=require(_0x8eb4('0x5'));var util=require(_0x8eb4('0x6'));var path=require(_0x8eb4('0x7'));var sox=require(_0x8eb4('0x8'));var csv=require(_0x8eb4('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x8eb4('0xa'));var _=require('lodash');var squel=require(_0x8eb4('0xb'));var crypto=require(_0x8eb4('0xc'));var jsforce=require(_0x8eb4('0xd'));var deskjs=require(_0x8eb4('0xe'));var toCsv=require(_0x8eb4('0x9'));var querystring=require('querystring');var Papa=require(_0x8eb4('0xf'));var Redis=require(_0x8eb4('0x10'));var authService=require(_0x8eb4('0x11'));var qs=require(_0x8eb4('0x12'));var as=require(_0x8eb4('0x13'));var hardwareService=require(_0x8eb4('0x14'));var logger=require(_0x8eb4('0x15'))('api');var utils=require(_0x8eb4('0x16'));var config=require(_0x8eb4('0x17'));var licenseUtil=require(_0x8eb4('0x18'));var db=require(_0x8eb4('0x19'))['db'];function respondWithStatusCode(_0x26999f,_0x5a9663){_0x5a9663=_0x5a9663||0xcc;return function(_0x1632a7){if(_0x1632a7){return _0x26999f[_0x8eb4('0x1a')](_0x5a9663);}return _0x26999f[_0x8eb4('0x1b')](_0x5a9663)['end']();};}function respondWithResult(_0x3cafe0,_0x5e6251){_0x5e6251=_0x5e6251||0xc8;return function(_0x32d12c){if(_0x32d12c){return _0x3cafe0['status'](_0x5e6251)['json'](_0x32d12c);}};}function respondWithFilteredResult(_0x5fae3a,_0x14a5f3){return function(_0x25faaa){if(_0x25faaa){var _0x5e325c=typeof _0x14a5f3[_0x8eb4('0x1c')]==='undefined'&&typeof _0x14a5f3[_0x8eb4('0x1d')]===_0x8eb4('0x1e');var _0x54f778=_0x25faaa['count'];var _0x4351ae=_0x5e325c?0x0:_0x14a5f3[_0x8eb4('0x1c')];var _0x1cc4f9=_0x5e325c?_0x25faaa[_0x8eb4('0x1f')]:_0x14a5f3[_0x8eb4('0x1c')]+_0x14a5f3[_0x8eb4('0x1d')];var _0x4ebc22;if(_0x1cc4f9>=_0x54f778){_0x1cc4f9=_0x54f778;_0x4ebc22=0xc8;}else{_0x4ebc22=0xce;}_0x5fae3a[_0x8eb4('0x1b')](_0x4ebc22);return _0x5fae3a[_0x8eb4('0x20')](_0x8eb4('0x21'),_0x4351ae+'-'+_0x1cc4f9+'/'+_0x54f778)[_0x8eb4('0x22')](_0x25faaa);}return null;};}function patchUpdates(_0x435956){return function(_0xc830ea){try{jsonpatch[_0x8eb4('0x23')](_0xc830ea,_0x435956,!![]);}catch(_0x5e281d){return BPromise[_0x8eb4('0x24')](_0x5e281d);}return _0xc830ea[_0x8eb4('0x25')]();};}function saveUpdates(_0x13283c,_0x56f510){return function(_0x4ba409){if(_0x4ba409){return _0x4ba409[_0x8eb4('0x26')](_0x13283c)[_0x8eb4('0x27')](function(_0x5d7483){return _0x5d7483;});}return null;};}function removeEntity(_0x5c4080,_0x45b2f2){return function(_0x57be92){if(_0x57be92){return _0x57be92[_0x8eb4('0x28')]()[_0x8eb4('0x27')](function(){_0x5c4080['status'](0xcc)[_0x8eb4('0x29')]();});}};}function handleEntityNotFound(_0x5af073,_0x41f6d6){return function(_0x597867){if(!_0x597867){_0x5af073[_0x8eb4('0x1a')](0x194);}return _0x597867;};}function handleError(_0x78f297,_0x3ac845){_0x3ac845=_0x3ac845||0x1f4;return function(_0x47fe35){logger['error'](_0x47fe35[_0x8eb4('0x2a')]);if(_0x47fe35[_0x8eb4('0x2b')]){delete _0x47fe35['name'];}_0x78f297[_0x8eb4('0x1b')](_0x3ac845)['send'](_0x47fe35);};}exports[_0x8eb4('0x2c')]=function(_0x5c5a34,_0x1a8789){var _0x2a6eaf={},_0x201b00={},_0x238c7a={'count':0x0,'rows':[]};var _0x2e5dc0=_[_0x8eb4('0x2d')](db[_0x8eb4('0x2e')]['rawAttributes'],function(_0x43556c){return{'name':_0x43556c[_0x8eb4('0x2f')],'type':_0x43556c[_0x8eb4('0x30')][_0x8eb4('0x31')]};});_0x201b00[_0x8eb4('0x32')]=_[_0x8eb4('0x2d')](_0x2e5dc0,_0x8eb4('0x2b'));_0x201b00[_0x8eb4('0x33')]=_['keys'](_0x5c5a34['query']);_0x201b00[_0x8eb4('0x34')]=_[_0x8eb4('0x35')](_0x201b00[_0x8eb4('0x32')],_0x201b00[_0x8eb4('0x33')]);_0x2a6eaf[_0x8eb4('0x36')]=_[_0x8eb4('0x35')](_0x201b00[_0x8eb4('0x32')],qs[_0x8eb4('0x37')](_0x5c5a34[_0x8eb4('0x33')]['fields']));_0x2a6eaf[_0x8eb4('0x36')]=_0x2a6eaf[_0x8eb4('0x36')][_0x8eb4('0x38')]?_0x2a6eaf['attributes']:_0x201b00['model'];if(!_0x5c5a34[_0x8eb4('0x33')][_0x8eb4('0x39')](_0x8eb4('0x3a'))){_0x2a6eaf['limit']=qs[_0x8eb4('0x1d')](_0x5c5a34['query'][_0x8eb4('0x1d')]);_0x2a6eaf[_0x8eb4('0x1c')]=qs[_0x8eb4('0x1c')](_0x5c5a34[_0x8eb4('0x33')]['offset']);}_0x2a6eaf['order']=qs[_0x8eb4('0x3b')](_0x5c5a34[_0x8eb4('0x33')][_0x8eb4('0x3b')]);_0x2a6eaf[_0x8eb4('0x3c')]=qs[_0x8eb4('0x34')](_[_0x8eb4('0x3d')](_0x5c5a34[_0x8eb4('0x33')],_0x201b00[_0x8eb4('0x34')]),_0x2e5dc0);if(_0x5c5a34['query'][_0x8eb4('0x3e')]){_0x2a6eaf[_0x8eb4('0x3c')]=_[_0x8eb4('0x3f')](_0x2a6eaf[_0x8eb4('0x3c')],{'$or':_[_0x8eb4('0x2d')](_0x2e5dc0,function(_0x580900){if(_0x580900[_0x8eb4('0x30')]!==_0x8eb4('0x40')){var _0x46edf8={};_0x46edf8[_0x580900[_0x8eb4('0x2b')]]={'$like':'%'+_0x5c5a34[_0x8eb4('0x33')][_0x8eb4('0x3e')]+'%'};return _0x46edf8;}})});}_0x2a6eaf=_[_0x8eb4('0x3f')]({},_0x2a6eaf,_0x5c5a34['options']);var _0x2e7f7a={'where':_0x2a6eaf[_0x8eb4('0x3c')]};return db[_0x8eb4('0x2e')][_0x8eb4('0x1f')](_0x2e7f7a)[_0x8eb4('0x27')](function(_0x3104e8){_0x238c7a[_0x8eb4('0x1f')]=_0x3104e8;if(_0x5c5a34[_0x8eb4('0x33')][_0x8eb4('0x41')]){_0x2a6eaf['include']=[{'all':!![]}];}return db['SugarcrmField'][_0x8eb4('0x42')](_0x2a6eaf);})[_0x8eb4('0x27')](function(_0x392e7a){_0x238c7a['rows']=_0x392e7a;return _0x238c7a;})[_0x8eb4('0x27')](respondWithFilteredResult(_0x1a8789,_0x2a6eaf))[_0x8eb4('0x43')](handleError(_0x1a8789,null));};exports['show']=function(_0x1f97b3,_0x4d3bad){var _0x30972e={'raw':!![],'where':{'id':_0x1f97b3[_0x8eb4('0x44')]['id']}},_0xc53aec={};_0xc53aec[_0x8eb4('0x32')]=_[_0x8eb4('0x45')](db[_0x8eb4('0x2e')][_0x8eb4('0x46')]);_0xc53aec['query']=_['keys'](_0x1f97b3[_0x8eb4('0x33')]);_0xc53aec[_0x8eb4('0x34')]=_['intersection'](_0xc53aec[_0x8eb4('0x32')],_0xc53aec[_0x8eb4('0x33')]);_0x30972e[_0x8eb4('0x36')]=_[_0x8eb4('0x35')](_0xc53aec[_0x8eb4('0x32')],qs[_0x8eb4('0x37')](_0x1f97b3[_0x8eb4('0x33')]['fields']));_0x30972e[_0x8eb4('0x36')]=_0x30972e[_0x8eb4('0x36')]['length']?_0x30972e[_0x8eb4('0x36')]:_0xc53aec[_0x8eb4('0x32')];if(_0x1f97b3[_0x8eb4('0x33')][_0x8eb4('0x41')]){_0x30972e[_0x8eb4('0x47')]=[{'all':!![]}];}_0x30972e=_[_0x8eb4('0x3f')]({},_0x30972e,_0x1f97b3['options']);return db[_0x8eb4('0x2e')][_0x8eb4('0x48')](_0x30972e)[_0x8eb4('0x27')](handleEntityNotFound(_0x4d3bad,null))[_0x8eb4('0x27')](respondWithResult(_0x4d3bad,null))[_0x8eb4('0x43')](handleError(_0x4d3bad,null));};exports[_0x8eb4('0x49')]=function(_0x4aa131,_0x308818){return db[_0x8eb4('0x2e')]['create'](_0x4aa131[_0x8eb4('0x4a')],{})[_0x8eb4('0x27')](respondWithResult(_0x308818,0xc9))[_0x8eb4('0x43')](handleError(_0x308818,null));};exports[_0x8eb4('0x26')]=function(_0x48610e,_0x53f80a){if(_0x48610e[_0x8eb4('0x4a')]['id']){delete _0x48610e[_0x8eb4('0x4a')]['id'];}return db[_0x8eb4('0x2e')][_0x8eb4('0x48')]({'where':{'id':_0x48610e[_0x8eb4('0x44')]['id']}})[_0x8eb4('0x27')](handleEntityNotFound(_0x53f80a,null))[_0x8eb4('0x27')](saveUpdates(_0x48610e[_0x8eb4('0x4a')],null))[_0x8eb4('0x27')](respondWithResult(_0x53f80a,null))['catch'](handleError(_0x53f80a,null));};exports[_0x8eb4('0x28')]=function(_0x37fa65,_0xbe4711){return db[_0x8eb4('0x2e')][_0x8eb4('0x48')]({'where':{'id':_0x37fa65[_0x8eb4('0x44')]['id']}})['then'](handleEntityNotFound(_0xbe4711,null))[_0x8eb4('0x27')](removeEntity(_0xbe4711,null))[_0x8eb4('0x43')](handleError(_0xbe4711,null));}; \ No newline at end of file +var _0xebfc=['to-csv','ejs','lodash','squel','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','undefined','limit','count','offset','set','Content-Range','apply','reject','destroy','error','stack','name','send','map','rawAttributes','type','key','model','query','intersection','attributes','hasOwnProperty','order','sort','where','filters','VIRTUAL','merge','options','then','includeAll','include','SugarcrmField','rows','catch','show','keys','fields','find','body','update','params','eml-format','rimraf','fast-json-patch','moment','bluebird','util','sox'];(function(_0x56eafe,_0x165231){var _0x524805=function(_0x43e55b){while(--_0x43e55b){_0x56eafe['push'](_0x56eafe['shift']());}};_0x524805(++_0x165231);}(_0xebfc,0xc8));var _0xcebf=function(_0xfae23b,_0x2be4ba){_0xfae23b=_0xfae23b-0x0;var _0x200640=_0xebfc[_0xfae23b];return _0x200640;};'use strict';var emlformat=require(_0xcebf('0x0'));var rimraf=require(_0xcebf('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xcebf('0x2'));var rp=require('request-promise');var moment=require(_0xcebf('0x3'));var BPromise=require(_0xcebf('0x4'));var Mustache=require('mustache');var util=require(_0xcebf('0x5'));var path=require('path');var sox=require(_0xcebf('0x6'));var csv=require(_0xcebf('0x7'));var ejs=require(_0xcebf('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xcebf('0x9'));var squel=require(_0xcebf('0xa'));var crypto=require('crypto');var jsforce=require(_0xcebf('0xb'));var deskjs=require(_0xcebf('0xc'));var toCsv=require(_0xcebf('0x7'));var querystring=require('querystring');var Papa=require(_0xcebf('0xd'));var Redis=require(_0xcebf('0xe'));var authService=require(_0xcebf('0xf'));var qs=require(_0xcebf('0x10'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xcebf('0x11'));var logger=require(_0xcebf('0x12'))(_0xcebf('0x13'));var utils=require(_0xcebf('0x14'));var config=require(_0xcebf('0x15'));var licenseUtil=require(_0xcebf('0x16'));var db=require(_0xcebf('0x17'))['db'];function respondWithStatusCode(_0x5ebd44,_0x45581c){_0x45581c=_0x45581c||0xcc;return function(_0x58948e){if(_0x58948e){return _0x5ebd44[_0xcebf('0x18')](_0x45581c);}return _0x5ebd44[_0xcebf('0x19')](_0x45581c)['end']();};}function respondWithResult(_0x51e157,_0x502f6e){_0x502f6e=_0x502f6e||0xc8;return function(_0x59ab21){if(_0x59ab21){return _0x51e157[_0xcebf('0x19')](_0x502f6e)[_0xcebf('0x1a')](_0x59ab21);}};}function respondWithFilteredResult(_0x46a30b,_0x5ca0f8){return function(_0x3e8664){if(_0x3e8664){var _0x8b33eb=typeof _0x5ca0f8['offset']===_0xcebf('0x1b')&&typeof _0x5ca0f8[_0xcebf('0x1c')]===_0xcebf('0x1b');var _0x1d31b4=_0x3e8664[_0xcebf('0x1d')];var _0x24b6e8=_0x8b33eb?0x0:_0x5ca0f8[_0xcebf('0x1e')];var _0x1dc851=_0x8b33eb?_0x3e8664['count']:_0x5ca0f8[_0xcebf('0x1e')]+_0x5ca0f8[_0xcebf('0x1c')];var _0x27c8bb;if(_0x1dc851>=_0x1d31b4){_0x1dc851=_0x1d31b4;_0x27c8bb=0xc8;}else{_0x27c8bb=0xce;}_0x46a30b[_0xcebf('0x19')](_0x27c8bb);return _0x46a30b[_0xcebf('0x1f')](_0xcebf('0x20'),_0x24b6e8+'-'+_0x1dc851+'/'+_0x1d31b4)[_0xcebf('0x1a')](_0x3e8664);}return null;};}function patchUpdates(_0x53e2a1){return function(_0x137e55){try{jsonpatch[_0xcebf('0x21')](_0x137e55,_0x53e2a1,!![]);}catch(_0x27db65){return BPromise[_0xcebf('0x22')](_0x27db65);}return _0x137e55['save']();};}function saveUpdates(_0x2f44fb,_0x2c469d){return function(_0x4efc04){if(_0x4efc04){return _0x4efc04['update'](_0x2f44fb)['then'](function(_0xd3d009){return _0xd3d009;});}return null;};}function removeEntity(_0x20f180,_0x24c75c){return function(_0x56f738){if(_0x56f738){return _0x56f738[_0xcebf('0x23')]()['then'](function(){_0x20f180['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x2f5f58,_0x1e8d3a){return function(_0x4382f0){if(!_0x4382f0){_0x2f5f58[_0xcebf('0x18')](0x194);}return _0x4382f0;};}function handleError(_0xd195de,_0x57775c){_0x57775c=_0x57775c||0x1f4;return function(_0x3dc694){logger[_0xcebf('0x24')](_0x3dc694[_0xcebf('0x25')]);if(_0x3dc694['name']){delete _0x3dc694[_0xcebf('0x26')];}_0xd195de['status'](_0x57775c)[_0xcebf('0x27')](_0x3dc694);};}exports['index']=function(_0x58996b,_0x19bd1b){var _0x295366={},_0x180b52={},_0x24e5a7={'count':0x0,'rows':[]};var _0x4736fe=_[_0xcebf('0x28')](db['SugarcrmField'][_0xcebf('0x29')],function(_0x138235){return{'name':_0x138235['fieldName'],'type':_0x138235[_0xcebf('0x2a')][_0xcebf('0x2b')]};});_0x180b52[_0xcebf('0x2c')]=_['map'](_0x4736fe,_0xcebf('0x26'));_0x180b52[_0xcebf('0x2d')]=_['keys'](_0x58996b[_0xcebf('0x2d')]);_0x180b52['filters']=_[_0xcebf('0x2e')](_0x180b52[_0xcebf('0x2c')],_0x180b52['query']);_0x295366['attributes']=_['intersection'](_0x180b52[_0xcebf('0x2c')],qs['fields'](_0x58996b[_0xcebf('0x2d')]['fields']));_0x295366['attributes']=_0x295366[_0xcebf('0x2f')]['length']?_0x295366[_0xcebf('0x2f')]:_0x180b52[_0xcebf('0x2c')];if(!_0x58996b[_0xcebf('0x2d')][_0xcebf('0x30')]('nolimit')){_0x295366[_0xcebf('0x1c')]=qs[_0xcebf('0x1c')](_0x58996b[_0xcebf('0x2d')][_0xcebf('0x1c')]);_0x295366[_0xcebf('0x1e')]=qs[_0xcebf('0x1e')](_0x58996b[_0xcebf('0x2d')]['offset']);}_0x295366[_0xcebf('0x31')]=qs[_0xcebf('0x32')](_0x58996b[_0xcebf('0x2d')][_0xcebf('0x32')]);_0x295366[_0xcebf('0x33')]=qs[_0xcebf('0x34')](_['pick'](_0x58996b['query'],_0x180b52['filters']),_0x4736fe);if(_0x58996b[_0xcebf('0x2d')]['filter']){_0x295366['where']=_['merge'](_0x295366[_0xcebf('0x33')],{'$or':_[_0xcebf('0x28')](_0x4736fe,function(_0x16fbb3){if(_0x16fbb3[_0xcebf('0x2a')]!==_0xcebf('0x35')){var _0x55096f={};_0x55096f[_0x16fbb3[_0xcebf('0x26')]]={'$like':'%'+_0x58996b['query']['filter']+'%'};return _0x55096f;}})});}_0x295366=_[_0xcebf('0x36')]({},_0x295366,_0x58996b[_0xcebf('0x37')]);var _0x272776={'where':_0x295366[_0xcebf('0x33')]};return db['SugarcrmField'][_0xcebf('0x1d')](_0x272776)[_0xcebf('0x38')](function(_0x5ec81d){_0x24e5a7[_0xcebf('0x1d')]=_0x5ec81d;if(_0x58996b[_0xcebf('0x2d')][_0xcebf('0x39')]){_0x295366[_0xcebf('0x3a')]=[{'all':!![]}];}return db[_0xcebf('0x3b')]['findAll'](_0x295366);})['then'](function(_0x59a45d){_0x24e5a7[_0xcebf('0x3c')]=_0x59a45d;return _0x24e5a7;})['then'](respondWithFilteredResult(_0x19bd1b,_0x295366))[_0xcebf('0x3d')](handleError(_0x19bd1b,null));};exports[_0xcebf('0x3e')]=function(_0x27d85b,_0x52669f){var _0x239cfe={'raw':!![],'where':{'id':_0x27d85b['params']['id']}},_0x73d66d={};_0x73d66d[_0xcebf('0x2c')]=_[_0xcebf('0x3f')](db[_0xcebf('0x3b')]['rawAttributes']);_0x73d66d[_0xcebf('0x2d')]=_[_0xcebf('0x3f')](_0x27d85b[_0xcebf('0x2d')]);_0x73d66d['filters']=_[_0xcebf('0x2e')](_0x73d66d[_0xcebf('0x2c')],_0x73d66d[_0xcebf('0x2d')]);_0x239cfe[_0xcebf('0x2f')]=_[_0xcebf('0x2e')](_0x73d66d['model'],qs['fields'](_0x27d85b[_0xcebf('0x2d')][_0xcebf('0x40')]));_0x239cfe[_0xcebf('0x2f')]=_0x239cfe[_0xcebf('0x2f')]['length']?_0x239cfe[_0xcebf('0x2f')]:_0x73d66d[_0xcebf('0x2c')];if(_0x27d85b[_0xcebf('0x2d')][_0xcebf('0x39')]){_0x239cfe[_0xcebf('0x3a')]=[{'all':!![]}];}_0x239cfe=_['merge']({},_0x239cfe,_0x27d85b['options']);return db[_0xcebf('0x3b')][_0xcebf('0x41')](_0x239cfe)[_0xcebf('0x38')](handleEntityNotFound(_0x52669f,null))[_0xcebf('0x38')](respondWithResult(_0x52669f,null))[_0xcebf('0x3d')](handleError(_0x52669f,null));};exports['create']=function(_0x5cfdd7,_0x407f65){return db['SugarcrmField']['create'](_0x5cfdd7[_0xcebf('0x42')],{})[_0xcebf('0x38')](respondWithResult(_0x407f65,0xc9))[_0xcebf('0x3d')](handleError(_0x407f65,null));};exports[_0xcebf('0x43')]=function(_0x50d2b6,_0x1e11ea){if(_0x50d2b6['body']['id']){delete _0x50d2b6[_0xcebf('0x42')]['id'];}return db[_0xcebf('0x3b')]['find']({'where':{'id':_0x50d2b6['params']['id']}})['then'](handleEntityNotFound(_0x1e11ea,null))[_0xcebf('0x38')](saveUpdates(_0x50d2b6[_0xcebf('0x42')],null))[_0xcebf('0x38')](respondWithResult(_0x1e11ea,null))[_0xcebf('0x3d')](handleError(_0x1e11ea,null));};exports[_0xcebf('0x23')]=function(_0x10e774,_0x243f8e){return db[_0xcebf('0x3b')][_0xcebf('0x41')]({'where':{'id':_0x10e774[_0xcebf('0x44')]['id']}})[_0xcebf('0x38')](handleEntityNotFound(_0x243f8e,null))['then'](removeEntity(_0x243f8e,null))[_0xcebf('0x3d')](handleError(_0x243f8e,null));}; \ No newline at end of file diff --git a/server/api/intSugarcrmField/intSugarcrmField.model.js b/server/api/intSugarcrmField/intSugarcrmField.model.js index 45557f3..7d2396e 100644 --- a/server/api/intSugarcrmField/intSugarcrmField.model.js +++ b/server/api/intSugarcrmField/intSugarcrmField.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6d25=['./intSugarcrmField.attributes','exports','define','SugarcrmField','int_sugarcrm_fields','sugarcrm_unique_index','FieldId','lodash','util','api','bluebird','../../config/environment'];(function(_0x56dc8f,_0x57a0aa){var _0x27c8f6=function(_0x5a6113){while(--_0x5a6113){_0x56dc8f['push'](_0x56dc8f['shift']());}};_0x27c8f6(++_0x57a0aa);}(_0x6d25,0x1e7));var _0x56d2=function(_0x5744da,_0x4fbd1d){_0x5744da=_0x5744da-0x0;var _0x3c1903=_0x6d25[_0x5744da];return _0x3c1903;};'use strict';var _=require(_0x56d2('0x0'));var util=require(_0x56d2('0x1'));var logger=require('../../config/logger')(_0x56d2('0x2'));var moment=require('moment');var BPromise=require(_0x56d2('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x56d2('0x4'));var attributes=require(_0x56d2('0x5'));module[_0x56d2('0x6')]=function(_0x297626,_0x3c561d){return _0x297626[_0x56d2('0x7')](_0x56d2('0x8'),attributes,{'tableName':_0x56d2('0x9'),'paranoid':![],'indexes':[{'name':_0x56d2('0xa'),'fields':['idField',_0x56d2('0xb')],'unique':!![]}],'timestamps':!![]});}; \ No newline at end of file +var _0x49dd=['./intSugarcrmField.attributes','exports','define','SugarcrmField','sugarcrm_unique_index','idField','lodash','../../config/logger','api','bluebird','request-promise','path','../../config/environment'];(function(_0xe480f0,_0x4c0dc1){var _0x57b198=function(_0x4d8304){while(--_0x4d8304){_0xe480f0['push'](_0xe480f0['shift']());}};_0x57b198(++_0x4c0dc1);}(_0x49dd,0x131));var _0xd49d=function(_0x47d55d,_0x1765b1){_0x47d55d=_0x47d55d-0x0;var _0x39d034=_0x49dd[_0x47d55d];return _0x39d034;};'use strict';var _=require(_0xd49d('0x0'));var util=require('util');var logger=require(_0xd49d('0x1'))(_0xd49d('0x2'));var moment=require('moment');var BPromise=require(_0xd49d('0x3'));var rp=require(_0xd49d('0x4'));var fs=require('fs');var path=require(_0xd49d('0x5'));var rimraf=require('rimraf');var config=require(_0xd49d('0x6'));var attributes=require(_0xd49d('0x7'));module[_0xd49d('0x8')]=function(_0x3d61b4,_0x5e5090){return _0x3d61b4[_0xd49d('0x9')](_0xd49d('0xa'),attributes,{'tableName':'int_sugarcrm_fields','paranoid':![],'indexes':[{'name':_0xd49d('0xb'),'fields':[_0xd49d('0xc'),'FieldId'],'unique':!![]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intSugarcrmField/intSugarcrmField.rpc.js b/server/api/intSugarcrmField/intSugarcrmField.rpc.js index b7b2b9f..3ecba23 100644 --- a/server/api/intSugarcrmField/intSugarcrmField.rpc.js +++ b/server/api/intSugarcrmField/intSugarcrmField.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4f1c=['moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','SugarcrmField,\x20%s,\x20%s','request\x20sent','debug','error','code','message','info','result','util'];(function(_0xa53868,_0x1263f7){var _0x4acd43=function(_0x4e988a){while(--_0x4e988a){_0xa53868['push'](_0xa53868['shift']());}};_0x4acd43(++_0x1263f7);}(_0x4f1c,0x15f));var _0xc4f1=function(_0x22b6e4,_0x48c9bc){_0x22b6e4=_0x22b6e4-0x0;var _0x3569f6=_0x4f1c[_0x22b6e4];return _0x3569f6;};'use strict';var _=require('lodash');var util=require(_0xc4f1('0x0'));var moment=require(_0xc4f1('0x1'));var BPromise=require(_0xc4f1('0x2'));var rs=require(_0xc4f1('0x3'));var fs=require('fs');var Redis=require(_0xc4f1('0x4'));var db=require(_0xc4f1('0x5'))['db'];var utils=require(_0xc4f1('0x6'));var logger=require(_0xc4f1('0x7'))(_0xc4f1('0x8'));var config=require(_0xc4f1('0x9'));var jayson=require(_0xc4f1('0xa'));var client=jayson[_0xc4f1('0xb')][_0xc4f1('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x2b1490,_0x4b1544,_0x73bdaa){return new BPromise(function(_0x4fc5dc,_0xc82247){return client[_0xc4f1('0xd')](_0x2b1490,_0x73bdaa)['then'](function(_0x2b0586){logger['info'](_0xc4f1('0xe'),_0x4b1544,_0xc4f1('0xf'));logger[_0xc4f1('0x10')]('SugarcrmField,\x20%s,\x20%s,\x20%s',_0x4b1544,_0xc4f1('0xf'),JSON['stringify'](_0x2b0586));if(_0x2b0586['error']){if(_0x2b0586[_0xc4f1('0x11')][_0xc4f1('0x12')]===0x1f4){logger[_0xc4f1('0x11')]('SugarcrmField,\x20%s,\x20%s',_0x4b1544,_0x2b0586[_0xc4f1('0x11')][_0xc4f1('0x13')]);return _0xc82247(_0x2b0586[_0xc4f1('0x11')]['message']);}logger[_0xc4f1('0x11')](_0xc4f1('0xe'),_0x4b1544,_0x2b0586['error'][_0xc4f1('0x13')]);return _0x4fc5dc(_0x2b0586[_0xc4f1('0x11')][_0xc4f1('0x13')]);}else{logger[_0xc4f1('0x14')](_0xc4f1('0xe'),_0x4b1544,_0xc4f1('0xf'));_0x4fc5dc(_0x2b0586[_0xc4f1('0x15')]['message']);}})['catch'](function(_0x43d7eb){logger[_0xc4f1('0x11')](_0xc4f1('0xe'),_0x4b1544,_0x43d7eb);_0xc82247(_0x43d7eb);});});} \ No newline at end of file +var _0x2b17=['client','then','info','SugarcrmField,\x20%s,\x20%s','request\x20sent','debug','SugarcrmField,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment','randomstring','ioredis','../../config/logger','../../config/environment','jayson/promise'];(function(_0x274538,_0x350335){var _0x2ff4bf=function(_0x25081a){while(--_0x25081a){_0x274538['push'](_0x274538['shift']());}};_0x2ff4bf(++_0x350335);}(_0x2b17,0x76));var _0x72b1=function(_0x4cc5a0,_0x1d1c87){_0x4cc5a0=_0x4cc5a0-0x0;var _0x1f0a26=_0x2b17[_0x4cc5a0];return _0x1f0a26;};'use strict';var _=require(_0x72b1('0x0'));var util=require(_0x72b1('0x1'));var moment=require(_0x72b1('0x2'));var BPromise=require('bluebird');var rs=require(_0x72b1('0x3'));var fs=require('fs');var Redis=require(_0x72b1('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x72b1('0x5'))('rpc');var config=require(_0x72b1('0x6'));var jayson=require(_0x72b1('0x7'));var client=jayson[_0x72b1('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x43f1d8,_0x554702,_0x4614f6){return new BPromise(function(_0x2cc52e,_0x5ec297){return client['request'](_0x43f1d8,_0x4614f6)[_0x72b1('0x9')](function(_0x271fd5){logger[_0x72b1('0xa')](_0x72b1('0xb'),_0x554702,_0x72b1('0xc'));logger[_0x72b1('0xd')](_0x72b1('0xe'),_0x554702,_0x72b1('0xc'),JSON[_0x72b1('0xf')](_0x271fd5));if(_0x271fd5[_0x72b1('0x10')]){if(_0x271fd5['error'][_0x72b1('0x11')]===0x1f4){logger['error'](_0x72b1('0xb'),_0x554702,_0x271fd5[_0x72b1('0x10')][_0x72b1('0x12')]);return _0x5ec297(_0x271fd5[_0x72b1('0x10')]['message']);}logger[_0x72b1('0x10')](_0x72b1('0xb'),_0x554702,_0x271fd5[_0x72b1('0x10')][_0x72b1('0x12')]);return _0x2cc52e(_0x271fd5[_0x72b1('0x10')]['message']);}else{logger[_0x72b1('0xa')](_0x72b1('0xb'),_0x554702,_0x72b1('0xc'));_0x2cc52e(_0x271fd5[_0x72b1('0x13')][_0x72b1('0x12')]);}})[_0x72b1('0x14')](function(_0x4c9aa0){logger[_0x72b1('0x10')]('SugarcrmField,\x20%s,\x20%s',_0x554702,_0x4c9aa0);_0x5ec297(_0x4c9aa0);});});} \ No newline at end of file diff --git a/server/api/intVtigerAccount/index.js b/server/api/intVtigerAccount/index.js index 1af42de..9273344 100644 --- a/server/api/intVtigerAccount/index.js +++ b/server/api/intVtigerAccount/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2dde=['express','fs-extra','../../components/auth/service','../../config/environment','get','isAuthenticated','index','/:id','show','/:id/configurations','getConfigurations','/:id/fields','getFields','post','addConfiguration','put','update','destroy','exports','multer','util','path','connect-timeout'];(function(_0x502c7d,_0x2f1285){var _0x30b7ed=function(_0x2d92f3){while(--_0x2d92f3){_0x502c7d['push'](_0x502c7d['shift']());}};_0x30b7ed(++_0x2f1285);}(_0x2dde,0x19a));var _0xe2dd=function(_0x54faaf,_0x4218c1){_0x54faaf=_0x54faaf-0x0;var _0x304135=_0x2dde[_0x54faaf];return _0x304135;};'use strict';var multer=require(_0xe2dd('0x0'));var util=require(_0xe2dd('0x1'));var path=require(_0xe2dd('0x2'));var timeout=require(_0xe2dd('0x3'));var express=require(_0xe2dd('0x4'));var router=express['Router']();var fs_extra=require(_0xe2dd('0x5'));var auth=require(_0xe2dd('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0xe2dd('0x7'));var controller=require('./intVtigerAccount.controller');router[_0xe2dd('0x8')]('/',auth[_0xe2dd('0x9')](),controller[_0xe2dd('0xa')]);router[_0xe2dd('0x8')](_0xe2dd('0xb'),auth[_0xe2dd('0x9')](),controller[_0xe2dd('0xc')]);router[_0xe2dd('0x8')](_0xe2dd('0xd'),auth[_0xe2dd('0x9')](),controller[_0xe2dd('0xe')]);router['get'](_0xe2dd('0xf'),auth['isAuthenticated'](),controller[_0xe2dd('0x10')]);router['post']('/',auth[_0xe2dd('0x9')](),controller['create']);router[_0xe2dd('0x11')](_0xe2dd('0xd'),auth[_0xe2dd('0x9')](),controller[_0xe2dd('0x12')]);router[_0xe2dd('0x13')](_0xe2dd('0xb'),auth['isAuthenticated'](),controller[_0xe2dd('0x14')]);router['delete'](_0xe2dd('0xb'),auth[_0xe2dd('0x9')](),controller[_0xe2dd('0x15')]);module[_0xe2dd('0x16')]=router; \ No newline at end of file +var _0x0a34=['index','/:id','/:id/configurations','getConfigurations','/:id/fields','getFields','post','addConfiguration','put','update','destroy','exports','multer','util','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated'];(function(_0x2ade6c,_0x2d42f2){var _0x2cb372=function(_0x477d8a){while(--_0x477d8a){_0x2ade6c['push'](_0x2ade6c['shift']());}};_0x2cb372(++_0x2d42f2);}(_0x0a34,0x12a));var _0x40a3=function(_0x1573ea,_0x434f02){_0x1573ea=_0x1573ea-0x0;var _0x51c0e2=_0x0a34[_0x1573ea];return _0x51c0e2;};'use strict';var multer=require(_0x40a3('0x0'));var util=require(_0x40a3('0x1'));var path=require('path');var timeout=require(_0x40a3('0x2'));var express=require(_0x40a3('0x3'));var router=express[_0x40a3('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x40a3('0x5'));var interaction=require(_0x40a3('0x6'));var config=require(_0x40a3('0x7'));var controller=require('./intVtigerAccount.controller');router[_0x40a3('0x8')]('/',auth[_0x40a3('0x9')](),controller[_0x40a3('0xa')]);router[_0x40a3('0x8')](_0x40a3('0xb'),auth[_0x40a3('0x9')](),controller['show']);router[_0x40a3('0x8')](_0x40a3('0xc'),auth[_0x40a3('0x9')](),controller[_0x40a3('0xd')]);router[_0x40a3('0x8')](_0x40a3('0xe'),auth['isAuthenticated'](),controller[_0x40a3('0xf')]);router[_0x40a3('0x10')]('/',auth[_0x40a3('0x9')](),controller['create']);router[_0x40a3('0x10')](_0x40a3('0xc'),auth['isAuthenticated'](),controller[_0x40a3('0x11')]);router[_0x40a3('0x12')]('/:id',auth[_0x40a3('0x9')](),controller[_0x40a3('0x13')]);router['delete'](_0x40a3('0xb'),auth[_0x40a3('0x9')](),controller[_0x40a3('0x14')]);module[_0x40a3('0x15')]=router; \ No newline at end of file diff --git a/server/api/intVtigerAccount/intVtigerAccount.attributes.js b/server/api/intVtigerAccount/intVtigerAccount.attributes.js index d46d633..6f15f5f 100644 --- a/server/api/intVtigerAccount/intVtigerAccount.attributes.js +++ b/server/api/intVtigerAccount/intVtigerAccount.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x102a=['STRING','sequelize'];(function(_0x179a45,_0x4ab8fe){var _0x55685=function(_0xd14902){while(--_0xd14902){_0x179a45['push'](_0x179a45['shift']());}};_0x55685(++_0x4ab8fe);}(_0x102a,0xcf));var _0xa102=function(_0x4ae2a3,_0x409a72){_0x4ae2a3=_0x4ae2a3-0x0;var _0x9dfcd0=_0x102a[_0x4ae2a3];return _0x9dfcd0;};'use strict';var Sequelize=require(_0xa102('0x0'));module['exports']={'name':{'type':Sequelize[_0xa102('0x1')],'allowNull':![]},'description':{'type':Sequelize[_0xa102('0x1')]},'username':{'type':Sequelize[_0xa102('0x1')],'allowNull':![]},'moduleName':{'type':Sequelize[_0xa102('0x1')],'allowNull':![],'defaultValue':'HelpDesk'},'remoteUri':{'type':Sequelize['STRING'],'allowNull':![]},'serverUrl':{'type':Sequelize[_0xa102('0x1')],'allowNull':![]},'accessKey':{'type':Sequelize[_0xa102('0x1')],'allowNull':![]}}; \ No newline at end of file +var _0x956a=['STRING','HelpDesk','sequelize'];(function(_0x3a085d,_0xf6a5d5){var _0x5eb635=function(_0x5a453f){while(--_0x5a453f){_0x3a085d['push'](_0x3a085d['shift']());}};_0x5eb635(++_0xf6a5d5);}(_0x956a,0x149));var _0xa956=function(_0x21a9d9,_0x4d5ac8){_0x21a9d9=_0x21a9d9-0x0;var _0x46adce=_0x956a[_0x21a9d9];return _0x46adce;};'use strict';var Sequelize=require(_0xa956('0x0'));module['exports']={'name':{'type':Sequelize['STRING'],'allowNull':![]},'description':{'type':Sequelize['STRING']},'username':{'type':Sequelize[_0xa956('0x1')],'allowNull':![]},'moduleName':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0xa956('0x2')},'remoteUri':{'type':Sequelize[_0xa956('0x1')],'allowNull':![]},'serverUrl':{'type':Sequelize[_0xa956('0x1')],'allowNull':![]},'accessKey':{'type':Sequelize[_0xa956('0x1')],'allowNull':![]}}; \ No newline at end of file diff --git a/server/api/intVtigerAccount/intVtigerAccount.controller.js b/server/api/intVtigerAccount/intVtigerAccount.controller.js index 09600ad..06adaf8 100644 --- a/server/api/intVtigerAccount/intVtigerAccount.controller.js +++ b/server/api/intVtigerAccount/intVtigerAccount.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x395d=['mustache','util','path','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','to-csv','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','jayson/promise','client','http','request','then','info','VtigerAccount,\x20%s,\x20%s','debug','VtigerAccount,\x20%s,\x20%s,\x20%s','error','code','message','request\x20sent','result','catch','status','end','json','offset','undefined','limit','count','Content-Range','apply','reject','destroy','stack','name','send','VtigerAccount','rawAttributes','type','key','model','map','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','where','pick','VIRTUAL','filter','merge','includeAll','findAll','rows','show','params','include','options','create','body','findOne','order','getConfigurations','addConfiguration','AccountId','Subjects','channel','VtigerConfiguration','VtigerField','getFields','moduleName','serverUrl','username','remoteUri','slice','substring','%s/webservice.php','GET','login','token','success','describe','autogenerated','reference','owner','remove','includes','false','label','startsWith','cf_','picklist','picklistValues','value','test','statusCode','stringify','rimraf','zip-dir','fast-json-patch','moment'];(function(_0x4aaf31,_0x3f1063){var _0x591eb1=function(_0xa9ac0b){while(--_0xa9ac0b){_0x4aaf31['push'](_0x4aaf31['shift']());}};_0x591eb1(++_0x3f1063);}(_0x395d,0x167));var _0xd395=function(_0x6addc8,_0x2d1af6){_0x6addc8=_0x6addc8-0x0;var _0x42200b=_0x395d[_0x6addc8];return _0x42200b;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xd395('0x0'));var zipdir=require(_0xd395('0x1'));var jsonpatch=require(_0xd395('0x2'));var rp=require('request-promise');var moment=require(_0xd395('0x3'));var BPromise=require('bluebird');var Mustache=require(_0xd395('0x4'));var util=require(_0xd395('0x5'));var path=require(_0xd395('0x6'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0xd395('0x7'));var fs=require('fs');var fs_extra=require(_0xd395('0x8'));var _=require(_0xd395('0x9'));var squel=require(_0xd395('0xa'));var crypto=require(_0xd395('0xb'));var jsforce=require(_0xd395('0xc'));var deskjs=require(_0xd395('0xd'));var toCsv=require(_0xd395('0xe'));var querystring=require('querystring');var Papa=require(_0xd395('0xf'));var Redis=require(_0xd395('0x10'));var authService=require(_0xd395('0x11'));var qs=require(_0xd395('0x12'));var as=require(_0xd395('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xd395('0x14'));var utils=require(_0xd395('0x15'));var config=require(_0xd395('0x16'));var licenseUtil=require(_0xd395('0x17'));var db=require(_0xd395('0x18'))['db'];var integrations=require('../../components/integrations/configuration');var jayson=require(_0xd395('0x19'));var client=jayson[_0xd395('0x1a')][_0xd395('0x1b')]({'port':0x232a});function respondWithRpcPromise(_0xd7ace2,_0x27be11,_0x1889f7,_0x1726a7){return new BPromise(function(_0x10dbae,_0x5bc3ce){var _0x11e759=_0x1726a7||client;return _0x11e759[_0xd395('0x1c')](_0xd7ace2,_0x1889f7)[_0xd395('0x1d')](function(_0x5d939c){logger[_0xd395('0x1e')](_0xd395('0x1f'),_0x27be11,'request\x20sent');logger[_0xd395('0x20')](_0xd395('0x21'),_0x27be11,'request\x20sent',JSON['stringify'](_0x5d939c));if(_0x5d939c[_0xd395('0x22')]){if(_0x5d939c[_0xd395('0x22')][_0xd395('0x23')]===0x1f4){logger[_0xd395('0x22')](_0xd395('0x1f'),_0x27be11,_0x5d939c['error'][_0xd395('0x24')]);return _0x5bc3ce(_0x5d939c[_0xd395('0x22')][_0xd395('0x24')]);}logger[_0xd395('0x22')](_0xd395('0x1f'),_0x27be11,_0x5d939c[_0xd395('0x22')][_0xd395('0x24')]);return _0x10dbae(_0x5d939c['error'][_0xd395('0x24')]);}else{logger[_0xd395('0x1e')](_0xd395('0x1f'),_0x27be11,_0xd395('0x25'));_0x10dbae(_0x5d939c[_0xd395('0x26')][_0xd395('0x24')]);}})[_0xd395('0x27')](function(_0x46858c){logger['error']('VtigerAccount,\x20%s,\x20%s',_0x27be11,_0x46858c);_0x5bc3ce(_0x46858c);});});}function respondWithStatusCode(_0x1994d8,_0x194771){_0x194771=_0x194771||0xcc;return function(_0x55d2df){if(_0x55d2df){return _0x1994d8['sendStatus'](_0x194771);}return _0x1994d8[_0xd395('0x28')](_0x194771)[_0xd395('0x29')]();};}function respondWithResult(_0x7d1a59,_0x3c32be){_0x3c32be=_0x3c32be||0xc8;return function(_0x3e6546){if(_0x3e6546){return _0x7d1a59[_0xd395('0x28')](_0x3c32be)[_0xd395('0x2a')](_0x3e6546);}};}function respondWithFilteredResult(_0x3b65ef,_0x553c71){return function(_0x2856c3){if(_0x2856c3){var _0x4720b4=typeof _0x553c71[_0xd395('0x2b')]===_0xd395('0x2c')&&typeof _0x553c71[_0xd395('0x2d')]===_0xd395('0x2c');var _0x4f6378=_0x2856c3['count'];var _0x3c0883=_0x4720b4?0x0:_0x553c71[_0xd395('0x2b')];var _0x3b6463=_0x4720b4?_0x2856c3[_0xd395('0x2e')]:_0x553c71[_0xd395('0x2b')]+_0x553c71[_0xd395('0x2d')];var _0x181ea0;if(_0x3b6463>=_0x4f6378){_0x3b6463=_0x4f6378;_0x181ea0=0xc8;}else{_0x181ea0=0xce;}_0x3b65ef[_0xd395('0x28')](_0x181ea0);return _0x3b65ef['set'](_0xd395('0x2f'),_0x3c0883+'-'+_0x3b6463+'/'+_0x4f6378)[_0xd395('0x2a')](_0x2856c3);}return null;};}function patchUpdates(_0x137452){return function(_0x311583){try{jsonpatch[_0xd395('0x30')](_0x311583,_0x137452,!![]);}catch(_0xfe31c0){return BPromise[_0xd395('0x31')](_0xfe31c0);}return _0x311583['save']();};}function saveUpdates(_0x7a9fe8,_0x3c714b){return function(_0x75db5a){if(_0x75db5a){return _0x75db5a['update'](_0x7a9fe8)[_0xd395('0x1d')](function(_0x5511db){return _0x5511db;});}return null;};}function removeEntity(_0x487073,_0x173211){return function(_0x259eec){if(_0x259eec){return _0x259eec[_0xd395('0x32')]()['then'](function(){_0x487073[_0xd395('0x28')](0xcc)['end']();});}};}function handleEntityNotFound(_0x2d6034,_0x1d2072){return function(_0x518502){if(!_0x518502){_0x2d6034['sendStatus'](0x194);}return _0x518502;};}function handleError(_0x594568,_0x1a0bef){_0x1a0bef=_0x1a0bef||0x1f4;return function(_0x4fec0a){logger['error'](_0x4fec0a[_0xd395('0x33')]);if(_0x4fec0a[_0xd395('0x34')]){delete _0x4fec0a['name'];}_0x594568[_0xd395('0x28')](_0x1a0bef)[_0xd395('0x35')](_0x4fec0a);};}exports['index']=function(_0x2feae0,_0x523b74){var _0x173933={},_0xb9872={},_0x5ee42e={'count':0x0,'rows':[]};var _0x2a9908=_['map'](db[_0xd395('0x36')][_0xd395('0x37')],function(_0x57b409){return{'name':_0x57b409['fieldName'],'type':_0x57b409[_0xd395('0x38')][_0xd395('0x39')]};});_0xb9872[_0xd395('0x3a')]=_[_0xd395('0x3b')](_0x2a9908,_0xd395('0x34'));_0xb9872[_0xd395('0x3c')]=_[_0xd395('0x3d')](_0x2feae0[_0xd395('0x3c')]);_0xb9872[_0xd395('0x3e')]=_[_0xd395('0x3f')](_0xb9872['model'],_0xb9872['query']);_0x173933[_0xd395('0x40')]=_['intersection'](_0xb9872[_0xd395('0x3a')],qs[_0xd395('0x41')](_0x2feae0[_0xd395('0x3c')][_0xd395('0x41')]));_0x173933[_0xd395('0x40')]=_0x173933[_0xd395('0x40')][_0xd395('0x42')]?_0x173933[_0xd395('0x40')]:_0xb9872[_0xd395('0x3a')];if(!_0x2feae0[_0xd395('0x3c')][_0xd395('0x43')](_0xd395('0x44'))){_0x173933[_0xd395('0x2d')]=qs[_0xd395('0x2d')](_0x2feae0[_0xd395('0x3c')]['limit']);_0x173933[_0xd395('0x2b')]=qs['offset'](_0x2feae0[_0xd395('0x3c')][_0xd395('0x2b')]);}_0x173933['order']=qs[_0xd395('0x45')](_0x2feae0[_0xd395('0x3c')][_0xd395('0x45')]);_0x173933[_0xd395('0x46')]=qs[_0xd395('0x3e')](_[_0xd395('0x47')](_0x2feae0[_0xd395('0x3c')],_0xb9872[_0xd395('0x3e')]),_0x2a9908);if(_0x2feae0[_0xd395('0x3c')]['filter']){_0x173933[_0xd395('0x46')]=_['merge'](_0x173933['where'],{'$or':_[_0xd395('0x3b')](_0x2a9908,function(_0xab79e7){if(_0xab79e7[_0xd395('0x38')]!==_0xd395('0x48')){var _0x3fabe2={};_0x3fabe2[_0xab79e7[_0xd395('0x34')]]={'$like':'%'+_0x2feae0[_0xd395('0x3c')][_0xd395('0x49')]+'%'};return _0x3fabe2;}})});}_0x173933=_[_0xd395('0x4a')]({},_0x173933,_0x2feae0['options']);var _0xbbafa4={'where':_0x173933[_0xd395('0x46')]};return db[_0xd395('0x36')][_0xd395('0x2e')](_0xbbafa4)[_0xd395('0x1d')](function(_0x320756){_0x5ee42e['count']=_0x320756;if(_0x2feae0[_0xd395('0x3c')][_0xd395('0x4b')]){_0x173933['include']=[{'all':!![]}];}return db['VtigerAccount'][_0xd395('0x4c')](_0x173933);})[_0xd395('0x1d')](function(_0x570085){_0x5ee42e[_0xd395('0x4d')]=_0x570085;return _0x5ee42e;})[_0xd395('0x1d')](respondWithFilteredResult(_0x523b74,_0x173933))[_0xd395('0x27')](handleError(_0x523b74,null));};exports[_0xd395('0x4e')]=function(_0x3259cc,_0x2ff323){var _0x3de511={'raw':![],'where':{'id':_0x3259cc[_0xd395('0x4f')]['id']}},_0x25531a={};_0x25531a[_0xd395('0x3a')]=_[_0xd395('0x3d')](db[_0xd395('0x36')][_0xd395('0x37')]);_0x25531a[_0xd395('0x3c')]=_['keys'](_0x3259cc[_0xd395('0x3c')]);_0x25531a[_0xd395('0x3e')]=_['intersection'](_0x25531a['model'],_0x25531a[_0xd395('0x3c')]);_0x3de511[_0xd395('0x40')]=_[_0xd395('0x3f')](_0x25531a[_0xd395('0x3a')],qs[_0xd395('0x41')](_0x3259cc['query']['fields']));_0x3de511[_0xd395('0x40')]=_0x3de511['attributes'][_0xd395('0x42')]?_0x3de511[_0xd395('0x40')]:_0x25531a[_0xd395('0x3a')];if(_0x3259cc[_0xd395('0x3c')][_0xd395('0x4b')]){_0x3de511[_0xd395('0x50')]=[{'all':!![]}];}_0x3de511=_[_0xd395('0x4a')]({},_0x3de511,_0x3259cc[_0xd395('0x51')]);return db['VtigerAccount']['find'](_0x3de511)[_0xd395('0x1d')](handleEntityNotFound(_0x2ff323,null))[_0xd395('0x1d')](respondWithResult(_0x2ff323,null))[_0xd395('0x27')](handleError(_0x2ff323,null));};exports[_0xd395('0x52')]=function(_0x3614c3,_0x2728ab){return db[_0xd395('0x36')][_0xd395('0x52')](_0x3614c3[_0xd395('0x53')],{})[_0xd395('0x1d')](respondWithResult(_0x2728ab,0xc9))[_0xd395('0x27')](handleError(_0x2728ab,null));};exports['update']=function(_0x30b796,_0x1db4f5){if(_0x30b796['body']['id']){delete _0x30b796['body']['id'];}return db[_0xd395('0x36')]['find']({'where':{'id':_0x30b796[_0xd395('0x4f')]['id']}})['then'](handleEntityNotFound(_0x1db4f5,null))[_0xd395('0x1d')](saveUpdates(_0x30b796[_0xd395('0x53')],null))[_0xd395('0x1d')](respondWithResult(_0x1db4f5,null))[_0xd395('0x27')](handleError(_0x1db4f5,null));};exports[_0xd395('0x32')]=function(_0x3658b0,_0x4249d5){return db['VtigerAccount']['find']({'where':{'id':_0x3658b0[_0xd395('0x4f')]['id']}})['then'](handleEntityNotFound(_0x4249d5,null))[_0xd395('0x1d')](removeEntity(_0x4249d5,null))[_0xd395('0x27')](handleError(_0x4249d5,null));};exports['getConfigurations']=function(_0x5c59b3,_0x28036c,_0x5a36e0){var _0x5c6b30={};var _0x51b143={};var _0x4d866d;var _0x1b20b6;return db[_0xd395('0x36')][_0xd395('0x54')]({'where':{'id':_0x5c59b3[_0xd395('0x4f')]['id']}})[_0xd395('0x1d')](handleEntityNotFound(_0x28036c,null))['then'](function(_0x17f507){if(_0x17f507){_0x4d866d=_0x17f507;_0x51b143[_0xd395('0x3a')]=_[_0xd395('0x3d')](db['VtigerConfiguration'][_0xd395('0x37')]);_0x51b143['query']=_[_0xd395('0x3d')](_0x5c59b3[_0xd395('0x3c')]);_0x51b143[_0xd395('0x3e')]=_[_0xd395('0x3f')](_0x51b143[_0xd395('0x3a')],_0x51b143['query']);_0x5c6b30[_0xd395('0x40')]=_[_0xd395('0x3f')](_0x51b143[_0xd395('0x3a')],qs[_0xd395('0x41')](_0x5c59b3['query'][_0xd395('0x41')]));_0x5c6b30[_0xd395('0x40')]=_0x5c6b30['attributes']['length']?_0x5c6b30[_0xd395('0x40')]:_0x51b143['model'];_0x5c6b30[_0xd395('0x55')]=qs[_0xd395('0x45')](_0x5c59b3[_0xd395('0x3c')]['sort']);_0x5c6b30[_0xd395('0x46')]=qs[_0xd395('0x3e')](_[_0xd395('0x47')](_0x5c59b3[_0xd395('0x3c')],_0x51b143[_0xd395('0x3e')]));if(_0x5c59b3[_0xd395('0x3c')][_0xd395('0x49')]){_0x5c6b30[_0xd395('0x46')]=_[_0xd395('0x4a')](_0x5c6b30[_0xd395('0x46')],{'$or':_[_0xd395('0x3b')](_0x5c6b30[_0xd395('0x40')],function(_0x3e17b9){var _0x323378={};_0x323378[_0x3e17b9]={'$like':'%'+_0x5c59b3['query'][_0xd395('0x49')]+'%'};return _0x323378;})});}_0x5c6b30=_['merge']({},_0x5c6b30,_0x5c59b3[_0xd395('0x51')]);return _0x4d866d['getConfigurations'](_0x5c6b30);}})[_0xd395('0x1d')](function(_0x5ca614){if(_0x5ca614){_0x1b20b6=_0x5ca614['length'];if(!_0x5c59b3[_0xd395('0x3c')]['hasOwnProperty'](_0xd395('0x44'))){_0x5c6b30[_0xd395('0x2d')]=qs['limit'](_0x5c59b3[_0xd395('0x3c')]['limit']);_0x5c6b30[_0xd395('0x2b')]=qs[_0xd395('0x2b')](_0x5c59b3[_0xd395('0x3c')]['offset']);}return _0x4d866d[_0xd395('0x56')](_0x5c6b30);}})[_0xd395('0x1d')](function(_0xd3162b){if(_0xd3162b){return _0xd3162b?{'count':_0x1b20b6,'rows':_0xd3162b}:null;}})['then'](respondWithResult(_0x28036c,null))[_0xd395('0x27')](handleError(_0x28036c,null));};exports[_0xd395('0x57')]=function(_0x40797f,_0x5eae34,_0xda3cbf){if(_0x40797f[_0xd395('0x53')]['id']){delete _0x40797f['body']['id'];}return db['VtigerAccount']['findOne']({'where':{'id':_0x40797f['params']['id']}})[_0xd395('0x1d')](handleEntityNotFound(_0x5eae34,null))[_0xd395('0x1d')](function(_0x56ec8d){if(_0x56ec8d){_0x40797f[_0xd395('0x53')][_0xd395('0x58')]=_0x56ec8d['id'];_0x40797f[_0xd395('0x53')][_0xd395('0x59')]=integrations['getSubjects'](_0x40797f['body'][_0xd395('0x5a')],_0x40797f['body'][_0xd395('0x38')]);_0x40797f[_0xd395('0x53')]['Descriptions']=integrations['getDescriptions'](_0x40797f[_0xd395('0x53')]['channel'],_0x40797f['body'][_0xd395('0x38')]);return db[_0xd395('0x5b')][_0xd395('0x52')](_0x40797f['body'],{'include':[{'model':db[_0xd395('0x5c')],'as':_0xd395('0x59')},{'model':db['VtigerField'],'as':'Descriptions'}]});}return null;})[_0xd395('0x1d')](respondWithResult(_0x5eae34,null))[_0xd395('0x27')](handleError(_0x5eae34,null));};var md5=require('md5');exports[_0xd395('0x5d')]=function(_0x522937,_0x35add7,_0x16655b){var _0xe36b20=null;var _0x1e720a=null;var _0x2b1c03=null;var _0x5a6200=null;var _0x2f6e6e='';return db[_0xd395('0x36')]['findOne']({'where':{'id':_0x522937['params']['id']},'attributes':['id',_0xd395('0x34'),'username','description',_0xd395('0x5e'),'remoteUri',_0xd395('0x5f'),'accessKey']})[_0xd395('0x1d')](handleEntityNotFound(_0x35add7,null))[_0xd395('0x1d')](function(_0x51a00e){if(_0x51a00e){_0xe36b20=_0x51a00e[_0xd395('0x60')];_0x1e720a=_0x51a00e['accessKey'];_0x2b1c03=_0x51a00e[_0xd395('0x5e')];_0x2f6e6e=_0x51a00e[_0xd395('0x61')];var _0x459aeb=_0x2f6e6e[_0xd395('0x62')](-0x1);if(_0x459aeb==='/'){_0x2f6e6e=_0x2f6e6e[_0xd395('0x63')](0x0,_0x2f6e6e['lastIndexOf'](_0x459aeb));}_0x5a6200=util['format'](_0xd395('0x64'),_0x2f6e6e);var _0x1f02c6={'method':_0xd395('0x65'),'uri':_0x5a6200,'qs':{'operation':'getchallenge','username':_0x51a00e[_0xd395('0x60')]},'json':!![]};return rp(_0x1f02c6);}})['then'](function(_0x37d7a3){if(_0x37d7a3['success']){var _0xdcfc98={'method':'POST','uri':_0x5a6200,'form':{'operation':_0xd395('0x66'),'username':_0xe36b20,'accessKey':md5(_0x37d7a3['result'][_0xd395('0x67')]+_0x1e720a)},'json':!![]};return rp(_0xdcfc98);}})[_0xd395('0x1d')](function(_0x13754c){if(_0x13754c[_0xd395('0x68')]){var _0x2879f1={'method':_0xd395('0x65'),'uri':_0x5a6200,'qs':{'operation':_0xd395('0x69'),'username':_0xe36b20,'sessionName':_0x13754c[_0xd395('0x26')]['sessionName'],'elementType':_0x2b1c03},'json':!![]};return rp(_0x2879f1);}})['then'](function(_0x524e5d){if(_0x524e5d['success']){var _0x4ff202=[_0xd395('0x6a'),_0xd395('0x6b'),_0xd395('0x6c')];_[_0xd395('0x6d')](_0x524e5d[_0xd395('0x26')]['fields'],function(_0x56cefc){return _0x4ff202[_0xd395('0x6e')](_0x56cefc[_0xd395('0x38')][_0xd395('0x34')]);});_[_0xd395('0x6d')](_0x524e5d[_0xd395('0x26')][_0xd395('0x41')],function(_0x3ca953){return _0x3ca953['editable']===_0xd395('0x6f');});return{'count':_0x524e5d[_0xd395('0x26')][_0xd395('0x41')][_0xd395('0x42')],'rows':_[_0xd395('0x3b')](_0x524e5d[_0xd395('0x26')]['fields'],function(_0x20d078){return{'id':_0x20d078[_0xd395('0x34')],'name':_0x20d078[_0xd395('0x70')],'custom':_[_0xd395('0x71')](_0x20d078[_0xd395('0x34')],_0xd395('0x72'))?!![]:![],'options':_0x20d078[_0xd395('0x38')][_0xd395('0x34')]===_0xd395('0x73')&&_0x20d078[_0xd395('0x38')][_0xd395('0x74')]['length']>0x0?_[_0xd395('0x3b')](_0x20d078[_0xd395('0x38')][_0xd395('0x74')],function(_0x120b71){return{'name':_0x120b71[_0xd395('0x70')],'value':_0x120b71[_0xd395('0x75')]};}):[]};})};}})[_0xd395('0x1d')](respondWithResult(_0x35add7,null))[_0xd395('0x27')](function(_0xaca96b){console['log']('vTiger\x20error:\x20'+_0xaca96b);var _0xef7677=_0x522937['query'][_0xd395('0x76')]?0x1f4:_0xaca96b[_0xd395('0x77')]||0x1f4;logger[_0xd395('0x22')]('getFields,\x20%s,\x20%s,\x20%s',_0xd395('0x5d'),_0xef7677,JSON[_0xd395('0x78')](_0xaca96b));delete _0xaca96b[_0xd395('0x34')];if(_0xef7677===0x191){_0xef7677=0x190;}_0x35add7[_0xd395('0x28')](_0xef7677)[_0xd395('0x35')](_0x522937[_0xd395('0x3c')]['test']?{'message':'Wrong\x20credentials','statusCode':_0xaca96b[_0xd395('0x77')]}:_0xaca96b);});}; \ No newline at end of file +var _0xa1e3=['%s/webservice.php','GET','success','POST','token','describe','sessionName','autogenerated','owner','remove','includes','label','startsWith','picklistValues','value','log','vTiger\x20error:\x20','getFields,\x20%s,\x20%s,\x20%s','send','test','Wrong\x20credentials','statusCode','eml-format','rimraf','request-promise','mustache','path','to-csv','ejs','lodash','squel','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','../../components/integrations/configuration','http','then','info','VtigerAccount,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','catch','status','end','json','offset','undefined','count','limit','set','Content-Range','apply','reject','save','update','destroy','stack','name','index','map','VtigerAccount','fieldName','type','key','model','query','keys','attributes','intersection','fields','length','nolimit','sort','where','filters','pick','filter','merge','VIRTUAL','options','include','findAll','show','params','rawAttributes','includeAll','create','body','find','getConfigurations','VtigerConfiguration','order','addConfiguration','AccountId','getSubjects','channel','Descriptions','getDescriptions','Subjects','VtigerField','md5','getFields','findOne','username','description','moduleName','remoteUri','serverUrl','accessKey','slice','substring','lastIndexOf','format'];(function(_0x23fb63,_0x1111ac){var _0x717e42=function(_0x3d2fc3){while(--_0x3d2fc3){_0x23fb63['push'](_0x23fb63['shift']());}};_0x717e42(++_0x1111ac);}(_0xa1e3,0x18d));var _0x3a1e=function(_0x2b643e,_0x267acc){_0x2b643e=_0x2b643e-0x0;var _0x19b7c7=_0xa1e3[_0x2b643e];return _0x19b7c7;};'use strict';var emlformat=require(_0x3a1e('0x0'));var rimraf=require(_0x3a1e('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x3a1e('0x2'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x3a1e('0x3'));var util=require('util');var path=require(_0x3a1e('0x4'));var sox=require('sox');var csv=require(_0x3a1e('0x5'));var ejs=require(_0x3a1e('0x6'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x3a1e('0x7'));var squel=require(_0x3a1e('0x8'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x3a1e('0x9'));var toCsv=require(_0x3a1e('0x5'));var querystring=require(_0x3a1e('0xa'));var Papa=require(_0x3a1e('0xb'));var Redis=require(_0x3a1e('0xc'));var authService=require(_0x3a1e('0xd'));var qs=require(_0x3a1e('0xe'));var as=require(_0x3a1e('0xf'));var hardwareService=require(_0x3a1e('0x10'));var logger=require('../../config/logger')('api');var utils=require(_0x3a1e('0x11'));var config=require(_0x3a1e('0x12'));var licenseUtil=require(_0x3a1e('0x13'));var db=require(_0x3a1e('0x14'))['db'];var integrations=require(_0x3a1e('0x15'));var jayson=require('jayson/promise');var client=jayson['client'][_0x3a1e('0x16')]({'port':0x232a});function respondWithRpcPromise(_0x3183a4,_0x301591,_0x141da2,_0xa1c52b){return new BPromise(function(_0x466bf4,_0x13c944){var _0x53cf77=_0xa1c52b||client;return _0x53cf77['request'](_0x3183a4,_0x141da2)[_0x3a1e('0x17')](function(_0x255c93){logger[_0x3a1e('0x18')](_0x3a1e('0x19'),_0x301591,_0x3a1e('0x1a'));logger['debug']('VtigerAccount,\x20%s,\x20%s,\x20%s',_0x301591,_0x3a1e('0x1a'),JSON[_0x3a1e('0x1b')](_0x255c93));if(_0x255c93[_0x3a1e('0x1c')]){if(_0x255c93[_0x3a1e('0x1c')]['code']===0x1f4){logger[_0x3a1e('0x1c')](_0x3a1e('0x19'),_0x301591,_0x255c93['error'][_0x3a1e('0x1d')]);return _0x13c944(_0x255c93[_0x3a1e('0x1c')][_0x3a1e('0x1d')]);}logger['error'](_0x3a1e('0x19'),_0x301591,_0x255c93[_0x3a1e('0x1c')]['message']);return _0x466bf4(_0x255c93[_0x3a1e('0x1c')][_0x3a1e('0x1d')]);}else{logger['info'](_0x3a1e('0x19'),_0x301591,'request\x20sent');_0x466bf4(_0x255c93[_0x3a1e('0x1e')]['message']);}})[_0x3a1e('0x1f')](function(_0x123867){logger['error']('VtigerAccount,\x20%s,\x20%s',_0x301591,_0x123867);_0x13c944(_0x123867);});});}function respondWithStatusCode(_0x3107d1,_0x2c72da){_0x2c72da=_0x2c72da||0xcc;return function(_0xb6eb11){if(_0xb6eb11){return _0x3107d1['sendStatus'](_0x2c72da);}return _0x3107d1[_0x3a1e('0x20')](_0x2c72da)[_0x3a1e('0x21')]();};}function respondWithResult(_0x3d5ea7,_0x1583bf){_0x1583bf=_0x1583bf||0xc8;return function(_0x5e328b){if(_0x5e328b){return _0x3d5ea7[_0x3a1e('0x20')](_0x1583bf)[_0x3a1e('0x22')](_0x5e328b);}};}function respondWithFilteredResult(_0x3b970c,_0x3fcb1f){return function(_0x43424c){if(_0x43424c){var _0x357c8d=typeof _0x3fcb1f[_0x3a1e('0x23')]==='undefined'&&typeof _0x3fcb1f['limit']===_0x3a1e('0x24');var _0x22e455=_0x43424c[_0x3a1e('0x25')];var _0x38b825=_0x357c8d?0x0:_0x3fcb1f[_0x3a1e('0x23')];var _0x222feb=_0x357c8d?_0x43424c[_0x3a1e('0x25')]:_0x3fcb1f[_0x3a1e('0x23')]+_0x3fcb1f[_0x3a1e('0x26')];var _0x56310c;if(_0x222feb>=_0x22e455){_0x222feb=_0x22e455;_0x56310c=0xc8;}else{_0x56310c=0xce;}_0x3b970c[_0x3a1e('0x20')](_0x56310c);return _0x3b970c[_0x3a1e('0x27')](_0x3a1e('0x28'),_0x38b825+'-'+_0x222feb+'/'+_0x22e455)[_0x3a1e('0x22')](_0x43424c);}return null;};}function patchUpdates(_0x48374f){return function(_0x36225b){try{jsonpatch[_0x3a1e('0x29')](_0x36225b,_0x48374f,!![]);}catch(_0x17d7b7){return BPromise[_0x3a1e('0x2a')](_0x17d7b7);}return _0x36225b[_0x3a1e('0x2b')]();};}function saveUpdates(_0x536219,_0x17c363){return function(_0x3577d2){if(_0x3577d2){return _0x3577d2[_0x3a1e('0x2c')](_0x536219)['then'](function(_0xd18216){return _0xd18216;});}return null;};}function removeEntity(_0x57186f,_0xaca95c){return function(_0x1c33fe){if(_0x1c33fe){return _0x1c33fe[_0x3a1e('0x2d')]()[_0x3a1e('0x17')](function(){_0x57186f[_0x3a1e('0x20')](0xcc)['end']();});}};}function handleEntityNotFound(_0x1acb52,_0x32e888){return function(_0x3bd5b3){if(!_0x3bd5b3){_0x1acb52['sendStatus'](0x194);}return _0x3bd5b3;};}function handleError(_0x2eda9e,_0x97df60){_0x97df60=_0x97df60||0x1f4;return function(_0x5e964a){logger[_0x3a1e('0x1c')](_0x5e964a[_0x3a1e('0x2e')]);if(_0x5e964a[_0x3a1e('0x2f')]){delete _0x5e964a[_0x3a1e('0x2f')];}_0x2eda9e[_0x3a1e('0x20')](_0x97df60)['send'](_0x5e964a);};}exports[_0x3a1e('0x30')]=function(_0x2c9a79,_0x27705b){var _0xaf9c0f={},_0x1cb9d7={},_0x57f4c3={'count':0x0,'rows':[]};var _0x1eddca=_[_0x3a1e('0x31')](db[_0x3a1e('0x32')]['rawAttributes'],function(_0x353ac0){return{'name':_0x353ac0[_0x3a1e('0x33')],'type':_0x353ac0[_0x3a1e('0x34')][_0x3a1e('0x35')]};});_0x1cb9d7[_0x3a1e('0x36')]=_[_0x3a1e('0x31')](_0x1eddca,_0x3a1e('0x2f'));_0x1cb9d7[_0x3a1e('0x37')]=_[_0x3a1e('0x38')](_0x2c9a79[_0x3a1e('0x37')]);_0x1cb9d7['filters']=_['intersection'](_0x1cb9d7[_0x3a1e('0x36')],_0x1cb9d7[_0x3a1e('0x37')]);_0xaf9c0f[_0x3a1e('0x39')]=_[_0x3a1e('0x3a')](_0x1cb9d7['model'],qs[_0x3a1e('0x3b')](_0x2c9a79[_0x3a1e('0x37')][_0x3a1e('0x3b')]));_0xaf9c0f[_0x3a1e('0x39')]=_0xaf9c0f['attributes'][_0x3a1e('0x3c')]?_0xaf9c0f['attributes']:_0x1cb9d7[_0x3a1e('0x36')];if(!_0x2c9a79[_0x3a1e('0x37')]['hasOwnProperty'](_0x3a1e('0x3d'))){_0xaf9c0f['limit']=qs['limit'](_0x2c9a79[_0x3a1e('0x37')]['limit']);_0xaf9c0f[_0x3a1e('0x23')]=qs[_0x3a1e('0x23')](_0x2c9a79['query'][_0x3a1e('0x23')]);}_0xaf9c0f['order']=qs[_0x3a1e('0x3e')](_0x2c9a79['query']['sort']);_0xaf9c0f[_0x3a1e('0x3f')]=qs[_0x3a1e('0x40')](_[_0x3a1e('0x41')](_0x2c9a79[_0x3a1e('0x37')],_0x1cb9d7[_0x3a1e('0x40')]),_0x1eddca);if(_0x2c9a79[_0x3a1e('0x37')][_0x3a1e('0x42')]){_0xaf9c0f[_0x3a1e('0x3f')]=_[_0x3a1e('0x43')](_0xaf9c0f[_0x3a1e('0x3f')],{'$or':_[_0x3a1e('0x31')](_0x1eddca,function(_0x4837b9){if(_0x4837b9[_0x3a1e('0x34')]!==_0x3a1e('0x44')){var _0xcb79e0={};_0xcb79e0[_0x4837b9[_0x3a1e('0x2f')]]={'$like':'%'+_0x2c9a79['query']['filter']+'%'};return _0xcb79e0;}})});}_0xaf9c0f=_[_0x3a1e('0x43')]({},_0xaf9c0f,_0x2c9a79[_0x3a1e('0x45')]);var _0x2d24b4={'where':_0xaf9c0f[_0x3a1e('0x3f')]};return db[_0x3a1e('0x32')]['count'](_0x2d24b4)[_0x3a1e('0x17')](function(_0x1b4512){_0x57f4c3['count']=_0x1b4512;if(_0x2c9a79[_0x3a1e('0x37')]['includeAll']){_0xaf9c0f[_0x3a1e('0x46')]=[{'all':!![]}];}return db[_0x3a1e('0x32')][_0x3a1e('0x47')](_0xaf9c0f);})[_0x3a1e('0x17')](function(_0x39dd76){_0x57f4c3['rows']=_0x39dd76;return _0x57f4c3;})[_0x3a1e('0x17')](respondWithFilteredResult(_0x27705b,_0xaf9c0f))['catch'](handleError(_0x27705b,null));};exports[_0x3a1e('0x48')]=function(_0x389e3a,_0x61460c){var _0x44cdd1={'raw':![],'where':{'id':_0x389e3a[_0x3a1e('0x49')]['id']}},_0x498935={};_0x498935[_0x3a1e('0x36')]=_['keys'](db[_0x3a1e('0x32')][_0x3a1e('0x4a')]);_0x498935['query']=_[_0x3a1e('0x38')](_0x389e3a[_0x3a1e('0x37')]);_0x498935[_0x3a1e('0x40')]=_['intersection'](_0x498935['model'],_0x498935[_0x3a1e('0x37')]);_0x44cdd1['attributes']=_[_0x3a1e('0x3a')](_0x498935[_0x3a1e('0x36')],qs['fields'](_0x389e3a[_0x3a1e('0x37')][_0x3a1e('0x3b')]));_0x44cdd1['attributes']=_0x44cdd1[_0x3a1e('0x39')][_0x3a1e('0x3c')]?_0x44cdd1['attributes']:_0x498935[_0x3a1e('0x36')];if(_0x389e3a[_0x3a1e('0x37')][_0x3a1e('0x4b')]){_0x44cdd1['include']=[{'all':!![]}];}_0x44cdd1=_[_0x3a1e('0x43')]({},_0x44cdd1,_0x389e3a[_0x3a1e('0x45')]);return db[_0x3a1e('0x32')]['find'](_0x44cdd1)[_0x3a1e('0x17')](handleEntityNotFound(_0x61460c,null))[_0x3a1e('0x17')](respondWithResult(_0x61460c,null))['catch'](handleError(_0x61460c,null));};exports[_0x3a1e('0x4c')]=function(_0x1285c3,_0x519f05){return db[_0x3a1e('0x32')][_0x3a1e('0x4c')](_0x1285c3[_0x3a1e('0x4d')],{})[_0x3a1e('0x17')](respondWithResult(_0x519f05,0xc9))[_0x3a1e('0x1f')](handleError(_0x519f05,null));};exports[_0x3a1e('0x2c')]=function(_0x16a586,_0x378e03){if(_0x16a586[_0x3a1e('0x4d')]['id']){delete _0x16a586['body']['id'];}return db['VtigerAccount'][_0x3a1e('0x4e')]({'where':{'id':_0x16a586['params']['id']}})[_0x3a1e('0x17')](handleEntityNotFound(_0x378e03,null))['then'](saveUpdates(_0x16a586['body'],null))[_0x3a1e('0x17')](respondWithResult(_0x378e03,null))[_0x3a1e('0x1f')](handleError(_0x378e03,null));};exports[_0x3a1e('0x2d')]=function(_0x4eb115,_0x116018){return db[_0x3a1e('0x32')]['find']({'where':{'id':_0x4eb115['params']['id']}})[_0x3a1e('0x17')](handleEntityNotFound(_0x116018,null))['then'](removeEntity(_0x116018,null))[_0x3a1e('0x1f')](handleError(_0x116018,null));};exports[_0x3a1e('0x4f')]=function(_0x35ce0e,_0x1959c2,_0x56842a){var _0x12951f={};var _0x505c91={};var _0x4ac262;var _0x36f52d;return db[_0x3a1e('0x32')]['findOne']({'where':{'id':_0x35ce0e[_0x3a1e('0x49')]['id']}})[_0x3a1e('0x17')](handleEntityNotFound(_0x1959c2,null))[_0x3a1e('0x17')](function(_0x2b0675){if(_0x2b0675){_0x4ac262=_0x2b0675;_0x505c91[_0x3a1e('0x36')]=_['keys'](db[_0x3a1e('0x50')]['rawAttributes']);_0x505c91['query']=_[_0x3a1e('0x38')](_0x35ce0e[_0x3a1e('0x37')]);_0x505c91[_0x3a1e('0x40')]=_['intersection'](_0x505c91[_0x3a1e('0x36')],_0x505c91[_0x3a1e('0x37')]);_0x12951f[_0x3a1e('0x39')]=_['intersection'](_0x505c91[_0x3a1e('0x36')],qs[_0x3a1e('0x3b')](_0x35ce0e['query'][_0x3a1e('0x3b')]));_0x12951f[_0x3a1e('0x39')]=_0x12951f['attributes']['length']?_0x12951f[_0x3a1e('0x39')]:_0x505c91[_0x3a1e('0x36')];_0x12951f[_0x3a1e('0x51')]=qs[_0x3a1e('0x3e')](_0x35ce0e[_0x3a1e('0x37')]['sort']);_0x12951f[_0x3a1e('0x3f')]=qs[_0x3a1e('0x40')](_[_0x3a1e('0x41')](_0x35ce0e[_0x3a1e('0x37')],_0x505c91[_0x3a1e('0x40')]));if(_0x35ce0e[_0x3a1e('0x37')]['filter']){_0x12951f[_0x3a1e('0x3f')]=_[_0x3a1e('0x43')](_0x12951f[_0x3a1e('0x3f')],{'$or':_[_0x3a1e('0x31')](_0x12951f[_0x3a1e('0x39')],function(_0x1aac60){var _0x400041={};_0x400041[_0x1aac60]={'$like':'%'+_0x35ce0e[_0x3a1e('0x37')]['filter']+'%'};return _0x400041;})});}_0x12951f=_['merge']({},_0x12951f,_0x35ce0e[_0x3a1e('0x45')]);return _0x4ac262[_0x3a1e('0x4f')](_0x12951f);}})['then'](function(_0x438e2c){if(_0x438e2c){_0x36f52d=_0x438e2c[_0x3a1e('0x3c')];if(!_0x35ce0e[_0x3a1e('0x37')]['hasOwnProperty']('nolimit')){_0x12951f['limit']=qs[_0x3a1e('0x26')](_0x35ce0e[_0x3a1e('0x37')][_0x3a1e('0x26')]);_0x12951f[_0x3a1e('0x23')]=qs[_0x3a1e('0x23')](_0x35ce0e[_0x3a1e('0x37')][_0x3a1e('0x23')]);}return _0x4ac262[_0x3a1e('0x4f')](_0x12951f);}})[_0x3a1e('0x17')](function(_0x435514){if(_0x435514){return _0x435514?{'count':_0x36f52d,'rows':_0x435514}:null;}})['then'](respondWithResult(_0x1959c2,null))[_0x3a1e('0x1f')](handleError(_0x1959c2,null));};exports[_0x3a1e('0x52')]=function(_0x5c456a,_0x18225f,_0x1acdc3){if(_0x5c456a[_0x3a1e('0x4d')]['id']){delete _0x5c456a[_0x3a1e('0x4d')]['id'];}return db['VtigerAccount']['findOne']({'where':{'id':_0x5c456a['params']['id']}})[_0x3a1e('0x17')](handleEntityNotFound(_0x18225f,null))[_0x3a1e('0x17')](function(_0x4899df){if(_0x4899df){_0x5c456a[_0x3a1e('0x4d')][_0x3a1e('0x53')]=_0x4899df['id'];_0x5c456a[_0x3a1e('0x4d')]['Subjects']=integrations[_0x3a1e('0x54')](_0x5c456a['body'][_0x3a1e('0x55')],_0x5c456a[_0x3a1e('0x4d')][_0x3a1e('0x34')]);_0x5c456a[_0x3a1e('0x4d')][_0x3a1e('0x56')]=integrations[_0x3a1e('0x57')](_0x5c456a[_0x3a1e('0x4d')][_0x3a1e('0x55')],_0x5c456a[_0x3a1e('0x4d')]['type']);return db['VtigerConfiguration'][_0x3a1e('0x4c')](_0x5c456a['body'],{'include':[{'model':db['VtigerField'],'as':_0x3a1e('0x58')},{'model':db[_0x3a1e('0x59')],'as':'Descriptions'}]});}return null;})['then'](respondWithResult(_0x18225f,null))[_0x3a1e('0x1f')](handleError(_0x18225f,null));};var md5=require(_0x3a1e('0x5a'));exports[_0x3a1e('0x5b')]=function(_0x27ef1c,_0x4fd866,_0x55d49a){var _0x15112e=null;var _0x2e0a90=null;var _0x30afe8=null;var _0x44a2e8=null;var _0x47534d='';return db[_0x3a1e('0x32')][_0x3a1e('0x5c')]({'where':{'id':_0x27ef1c[_0x3a1e('0x49')]['id']},'attributes':['id',_0x3a1e('0x2f'),_0x3a1e('0x5d'),_0x3a1e('0x5e'),_0x3a1e('0x5f'),_0x3a1e('0x60'),_0x3a1e('0x61'),_0x3a1e('0x62')]})[_0x3a1e('0x17')](handleEntityNotFound(_0x4fd866,null))[_0x3a1e('0x17')](function(_0x352577){if(_0x352577){_0x15112e=_0x352577['username'];_0x2e0a90=_0x352577[_0x3a1e('0x62')];_0x30afe8=_0x352577['moduleName'];_0x47534d=_0x352577[_0x3a1e('0x60')];var _0x1adef8=_0x47534d[_0x3a1e('0x63')](-0x1);if(_0x1adef8==='/'){_0x47534d=_0x47534d[_0x3a1e('0x64')](0x0,_0x47534d[_0x3a1e('0x65')](_0x1adef8));}_0x44a2e8=util[_0x3a1e('0x66')](_0x3a1e('0x67'),_0x47534d);var _0x1d9edc={'method':_0x3a1e('0x68'),'uri':_0x44a2e8,'qs':{'operation':'getchallenge','username':_0x352577[_0x3a1e('0x5d')]},'json':!![]};return rp(_0x1d9edc);}})[_0x3a1e('0x17')](function(_0x21b5d3){if(_0x21b5d3[_0x3a1e('0x69')]){var _0x114bd2={'method':_0x3a1e('0x6a'),'uri':_0x44a2e8,'form':{'operation':'login','username':_0x15112e,'accessKey':md5(_0x21b5d3[_0x3a1e('0x1e')][_0x3a1e('0x6b')]+_0x2e0a90)},'json':!![]};return rp(_0x114bd2);}})[_0x3a1e('0x17')](function(_0x321cdc){if(_0x321cdc[_0x3a1e('0x69')]){var _0x5eb68f={'method':'GET','uri':_0x44a2e8,'qs':{'operation':_0x3a1e('0x6c'),'username':_0x15112e,'sessionName':_0x321cdc[_0x3a1e('0x1e')][_0x3a1e('0x6d')],'elementType':_0x30afe8},'json':!![]};return rp(_0x5eb68f);}})[_0x3a1e('0x17')](function(_0x35a526){if(_0x35a526[_0x3a1e('0x69')]){var _0x51459d=[_0x3a1e('0x6e'),'reference',_0x3a1e('0x6f')];_[_0x3a1e('0x70')](_0x35a526[_0x3a1e('0x1e')][_0x3a1e('0x3b')],function(_0x50fced){return _0x51459d[_0x3a1e('0x71')](_0x50fced[_0x3a1e('0x34')][_0x3a1e('0x2f')]);});_[_0x3a1e('0x70')](_0x35a526[_0x3a1e('0x1e')][_0x3a1e('0x3b')],function(_0x49e6fc){return _0x49e6fc['editable']==='false';});return{'count':_0x35a526[_0x3a1e('0x1e')][_0x3a1e('0x3b')][_0x3a1e('0x3c')],'rows':_[_0x3a1e('0x31')](_0x35a526['result'][_0x3a1e('0x3b')],function(_0x130a83){return{'id':_0x130a83[_0x3a1e('0x2f')],'name':_0x130a83[_0x3a1e('0x72')],'custom':_[_0x3a1e('0x73')](_0x130a83[_0x3a1e('0x2f')],'cf_')?!![]:![],'options':_0x130a83['type'][_0x3a1e('0x2f')]==='picklist'&&_0x130a83['type']['picklistValues'][_0x3a1e('0x3c')]>0x0?_[_0x3a1e('0x31')](_0x130a83['type'][_0x3a1e('0x74')],function(_0x521c0c){return{'name':_0x521c0c[_0x3a1e('0x72')],'value':_0x521c0c[_0x3a1e('0x75')]};}):[]};})};}})[_0x3a1e('0x17')](respondWithResult(_0x4fd866,null))[_0x3a1e('0x1f')](function(_0x15eb39){console[_0x3a1e('0x76')](_0x3a1e('0x77')+_0x15eb39);var _0x4253ed=_0x27ef1c[_0x3a1e('0x37')]['test']?0x1f4:_0x15eb39['statusCode']||0x1f4;logger[_0x3a1e('0x1c')](_0x3a1e('0x78'),_0x3a1e('0x5b'),_0x4253ed,JSON[_0x3a1e('0x1b')](_0x15eb39));delete _0x15eb39[_0x3a1e('0x2f')];if(_0x4253ed===0x191){_0x4253ed=0x190;}_0x4fd866['status'](_0x4253ed)[_0x3a1e('0x79')](_0x27ef1c[_0x3a1e('0x37')][_0x3a1e('0x7a')]?{'message':_0x3a1e('0x7b'),'statusCode':_0x15eb39[_0x3a1e('0x7c')]}:_0x15eb39);});}; \ No newline at end of file diff --git a/server/api/intVtigerAccount/intVtigerAccount.model.js b/server/api/intVtigerAccount/intVtigerAccount.model.js index 940650d..fd483e6 100644 --- a/server/api/intVtigerAccount/intVtigerAccount.model.js +++ b/server/api/intVtigerAccount/intVtigerAccount.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0eb1=['exports','define','util','api','moment','bluebird','request-promise','rimraf','../../config/environment','../../components/integrations/configuration'];(function(_0x161eda,_0x37545c){var _0x1b59b4=function(_0x216b9c){while(--_0x216b9c){_0x161eda['push'](_0x161eda['shift']());}};_0x1b59b4(++_0x37545c);}(_0x0eb1,0xf2));var _0x10eb=function(_0x37975c,_0x1067f1){_0x37975c=_0x37975c-0x0;var _0x34feda=_0x0eb1[_0x37975c];return _0x34feda;};'use strict';var _=require('lodash');var util=require(_0x10eb('0x0'));var logger=require('../../config/logger')(_0x10eb('0x1'));var moment=require(_0x10eb('0x2'));var BPromise=require(_0x10eb('0x3'));var rp=require(_0x10eb('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x10eb('0x5'));var config=require(_0x10eb('0x6'));var attributes=require('./intVtigerAccount.attributes');var integrations=require(_0x10eb('0x7'));module[_0x10eb('0x8')]=function(_0x459d8b,_0xebcf27){return _0x459d8b[_0x10eb('0x9')]('VtigerAccount',attributes,{'tableName':'int_vtiger_accounts','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xaffc=['api','bluebird','request-promise','path','rimraf','../../config/environment','./intVtigerAccount.attributes','../../components/integrations/configuration','VtigerAccount','int_vtiger_accounts','lodash','util','../../config/logger'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xaffc,0xb3));var _0xcaff=function(_0x4f5e51,_0x28eebe){_0x4f5e51=_0x4f5e51-0x0;var _0x190d99=_0xaffc[_0x4f5e51];return _0x190d99;};'use strict';var _=require(_0xcaff('0x0'));var util=require(_0xcaff('0x1'));var logger=require(_0xcaff('0x2'))(_0xcaff('0x3'));var moment=require('moment');var BPromise=require(_0xcaff('0x4'));var rp=require(_0xcaff('0x5'));var fs=require('fs');var path=require(_0xcaff('0x6'));var rimraf=require(_0xcaff('0x7'));var config=require(_0xcaff('0x8'));var attributes=require(_0xcaff('0x9'));var integrations=require(_0xcaff('0xa'));module['exports']=function(_0x2b1055,_0x4bf8df){return _0x2b1055['define'](_0xcaff('0xb'),attributes,{'tableName':_0xcaff('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intVtigerAccount/intVtigerAccount.rpc.js b/server/api/intVtigerAccount/intVtigerAccount.rpc.js index 3567dad..681366c 100644 --- a/server/api/intVtigerAccount/intVtigerAccount.rpc.js +++ b/server/api/intVtigerAccount/intVtigerAccount.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1d2d=['error','code','message','result','catch','VtigerAccount','findAll','raw','where','options','attributes','limit','map','include','model','GetVtigerAccount','ShowVtigerAccount','find','lodash','util','moment','bluebird','randomstring','../../mysqldb','rpc','../../config/environment','jayson/promise','client','http','request','then','info','VtigerAccount,\x20%s,\x20%s','request\x20sent','debug','VtigerAccount,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x7c13ed,_0x4d9dd5){var _0x4cad66=function(_0x3db414){while(--_0x3db414){_0x7c13ed['push'](_0x7c13ed['shift']());}};_0x4cad66(++_0x4d9dd5);}(_0x1d2d,0xf0));var _0xd1d2=function(_0x324f56,_0x177646){_0x324f56=_0x324f56-0x0;var _0x575e60=_0x1d2d[_0x324f56];return _0x575e60;};'use strict';var _=require(_0xd1d2('0x0'));var util=require(_0xd1d2('0x1'));var moment=require(_0xd1d2('0x2'));var BPromise=require(_0xd1d2('0x3'));var rs=require(_0xd1d2('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xd1d2('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xd1d2('0x6'));var config=require(_0xd1d2('0x7'));var jayson=require(_0xd1d2('0x8'));var client=jayson[_0xd1d2('0x9')][_0xd1d2('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x353dbd,_0x55be7a,_0x1eaf41){return new BPromise(function(_0x21bc28,_0x35735f){return client[_0xd1d2('0xb')](_0x353dbd,_0x1eaf41)[_0xd1d2('0xc')](function(_0x59e484){logger[_0xd1d2('0xd')](_0xd1d2('0xe'),_0x55be7a,_0xd1d2('0xf'));logger[_0xd1d2('0x10')](_0xd1d2('0x11'),_0x55be7a,_0xd1d2('0xf'),JSON[_0xd1d2('0x12')](_0x59e484));if(_0x59e484['error']){if(_0x59e484[_0xd1d2('0x13')][_0xd1d2('0x14')]===0x1f4){logger[_0xd1d2('0x13')](_0xd1d2('0xe'),_0x55be7a,_0x59e484[_0xd1d2('0x13')][_0xd1d2('0x15')]);return _0x35735f(_0x59e484[_0xd1d2('0x13')][_0xd1d2('0x15')]);}logger[_0xd1d2('0x13')](_0xd1d2('0xe'),_0x55be7a,_0x59e484['error'][_0xd1d2('0x15')]);return _0x21bc28(_0x59e484[_0xd1d2('0x13')][_0xd1d2('0x15')]);}else{logger['info'](_0xd1d2('0xe'),_0x55be7a,_0xd1d2('0xf'));_0x21bc28(_0x59e484[_0xd1d2('0x16')][_0xd1d2('0x15')]);}})[_0xd1d2('0x17')](function(_0x2723b3){logger[_0xd1d2('0x13')]('VtigerAccount,\x20%s,\x20%s',_0x55be7a,_0x2723b3);_0x35735f(_0x2723b3);});});}exports['GetVtigerAccount']=function(_0x3be186){var _0x55320b=this;return new Promise(function(_0x247b3a,_0x42565b){return db[_0xd1d2('0x18')][_0xd1d2('0x19')]({'raw':_0x3be186['options']?_0x3be186['options'][_0xd1d2('0x1a')]===undefined?!![]:![]:!![],'where':_0x3be186['options']?_0x3be186['options'][_0xd1d2('0x1b')]||null:null,'attributes':_0x3be186[_0xd1d2('0x1c')]?_0x3be186[_0xd1d2('0x1c')][_0xd1d2('0x1d')]||null:null,'limit':_0x3be186['options']?_0x3be186[_0xd1d2('0x1c')][_0xd1d2('0x1e')]||null:null,'include':_0x3be186[_0xd1d2('0x1c')]?_0x3be186['options']['include']?_[_0xd1d2('0x1f')](_0x3be186[_0xd1d2('0x1c')][_0xd1d2('0x20')],function(_0x2f92ee){return{'model':db[_0x2f92ee[_0xd1d2('0x21')]],'as':_0x2f92ee['as'],'attributes':_0x2f92ee[_0xd1d2('0x1d')],'include':_0x2f92ee[_0xd1d2('0x20')]?_['map'](_0x2f92ee[_0xd1d2('0x20')],function(_0x42da6d){return{'model':db[_0x42da6d[_0xd1d2('0x21')]],'as':_0x42da6d['as'],'attributes':_0x42da6d[_0xd1d2('0x1d')],'include':_0x42da6d[_0xd1d2('0x20')]?_[_0xd1d2('0x1f')](_0x42da6d[_0xd1d2('0x20')],function(_0x34faf7){return{'model':db[_0x34faf7[_0xd1d2('0x21')]],'as':_0x34faf7['as'],'attributes':_0x34faf7[_0xd1d2('0x1d')]};}):[]};}):[]};}):[]:[]})[_0xd1d2('0xc')](function(_0x4e1bc2){logger['info'](_0xd1d2('0x22'),_0x3be186);logger[_0xd1d2('0x10')](_0xd1d2('0x22'),_0x3be186,JSON[_0xd1d2('0x12')](_0x4e1bc2));_0x247b3a(_0x4e1bc2);})[_0xd1d2('0x17')](function(_0x48ade1){logger[_0xd1d2('0x13')](_0xd1d2('0x22'),_0x48ade1[_0xd1d2('0x15')],_0x3be186);_0x42565b(_0x55320b['error'](0x1f4,_0x48ade1[_0xd1d2('0x15')]));});});};exports[_0xd1d2('0x23')]=function(_0xbd855a){var _0x56557d=this;return new Promise(function(_0x419db7,_0x18528f){return db[_0xd1d2('0x18')][_0xd1d2('0x24')]({'raw':_0xbd855a[_0xd1d2('0x1c')]?_0xbd855a[_0xd1d2('0x1c')][_0xd1d2('0x1a')]===undefined?!![]:![]:!![],'where':_0xbd855a[_0xd1d2('0x1c')]?_0xbd855a[_0xd1d2('0x1c')][_0xd1d2('0x1b')]||null:null,'attributes':_0xbd855a[_0xd1d2('0x1c')]?_0xbd855a[_0xd1d2('0x1c')][_0xd1d2('0x1d')]||null:null,'include':_0xbd855a[_0xd1d2('0x1c')]?_0xbd855a[_0xd1d2('0x1c')][_0xd1d2('0x20')]?_[_0xd1d2('0x1f')](_0xbd855a[_0xd1d2('0x1c')]['include'],function(_0x1541ff){return{'model':db[_0x1541ff[_0xd1d2('0x21')]],'as':_0x1541ff['as'],'attributes':_0x1541ff[_0xd1d2('0x1d')],'include':_0x1541ff['include']?_[_0xd1d2('0x1f')](_0x1541ff['include'],function(_0x57a7fb){return{'model':db[_0x57a7fb[_0xd1d2('0x21')]],'as':_0x57a7fb['as'],'attributes':_0x57a7fb[_0xd1d2('0x1d')],'include':_0x57a7fb[_0xd1d2('0x20')]?_[_0xd1d2('0x1f')](_0x57a7fb[_0xd1d2('0x20')],function(_0x2d2d12){return{'model':db[_0x2d2d12['model']],'as':_0x2d2d12['as'],'attributes':_0x2d2d12[_0xd1d2('0x1d')]};}):[]};}):[]};}):[]:[]})[_0xd1d2('0xc')](function(_0x5bdf40){logger[_0xd1d2('0xd')](_0xd1d2('0x23'),_0xbd855a);logger[_0xd1d2('0x10')](_0xd1d2('0x23'),_0xbd855a,JSON['stringify'](_0x5bdf40));_0x419db7(_0x5bdf40);})['catch'](function(_0x2fd2c5){logger['error']('ShowVtigerAccount',_0x2fd2c5['message'],_0xbd855a);_0x18528f(_0x56557d[_0xd1d2('0x13')](0x1f4,_0x2fd2c5['message']));});});}; \ No newline at end of file +var _0x3c81=['debug','VtigerAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','GetVtigerAccount','VtigerAccount','findAll','options','raw','where','attributes','limit','include','map','model','catch','ShowVtigerAccount','lodash','util','bluebird','randomstring','rpc','../../config/environment','jayson/promise','client','http','request','then','info','VtigerAccount,\x20%s,\x20%s','request\x20sent'];(function(_0x402d00,_0x46761f){var _0x23df42=function(_0x55eac8){while(--_0x55eac8){_0x402d00['push'](_0x402d00['shift']());}};_0x23df42(++_0x46761f);}(_0x3c81,0x102));var _0x13c8=function(_0x574fd1,_0x4f7e74){_0x574fd1=_0x574fd1-0x0;var _0xf7c789=_0x3c81[_0x574fd1];return _0xf7c789;};'use strict';var _=require(_0x13c8('0x0'));var util=require(_0x13c8('0x1'));var moment=require('moment');var BPromise=require(_0x13c8('0x2'));var rs=require(_0x13c8('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x13c8('0x4'));var config=require(_0x13c8('0x5'));var jayson=require(_0x13c8('0x6'));var client=jayson[_0x13c8('0x7')][_0x13c8('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x3f0bd2,_0x445b69,_0x4f7bcc){return new BPromise(function(_0x17c228,_0x4905c3){return client[_0x13c8('0x9')](_0x3f0bd2,_0x4f7bcc)[_0x13c8('0xa')](function(_0x189ce6){logger[_0x13c8('0xb')](_0x13c8('0xc'),_0x445b69,_0x13c8('0xd'));logger[_0x13c8('0xe')](_0x13c8('0xf'),_0x445b69,_0x13c8('0xd'),JSON[_0x13c8('0x10')](_0x189ce6));if(_0x189ce6[_0x13c8('0x11')]){if(_0x189ce6[_0x13c8('0x11')][_0x13c8('0x12')]===0x1f4){logger[_0x13c8('0x11')]('VtigerAccount,\x20%s,\x20%s',_0x445b69,_0x189ce6[_0x13c8('0x11')][_0x13c8('0x13')]);return _0x4905c3(_0x189ce6[_0x13c8('0x11')][_0x13c8('0x13')]);}logger['error'](_0x13c8('0xc'),_0x445b69,_0x189ce6['error']['message']);return _0x17c228(_0x189ce6['error'][_0x13c8('0x13')]);}else{logger['info'](_0x13c8('0xc'),_0x445b69,_0x13c8('0xd'));_0x17c228(_0x189ce6[_0x13c8('0x14')][_0x13c8('0x13')]);}})['catch'](function(_0x13a9e1){logger[_0x13c8('0x11')](_0x13c8('0xc'),_0x445b69,_0x13a9e1);_0x4905c3(_0x13a9e1);});});}exports[_0x13c8('0x15')]=function(_0xce1ad2){var _0x28f07e=this;return new Promise(function(_0x346417,_0x251c38){return db[_0x13c8('0x16')][_0x13c8('0x17')]({'raw':_0xce1ad2[_0x13c8('0x18')]?_0xce1ad2['options'][_0x13c8('0x19')]===undefined?!![]:![]:!![],'where':_0xce1ad2[_0x13c8('0x18')]?_0xce1ad2[_0x13c8('0x18')][_0x13c8('0x1a')]||null:null,'attributes':_0xce1ad2['options']?_0xce1ad2[_0x13c8('0x18')][_0x13c8('0x1b')]||null:null,'limit':_0xce1ad2[_0x13c8('0x18')]?_0xce1ad2[_0x13c8('0x18')][_0x13c8('0x1c')]||null:null,'include':_0xce1ad2[_0x13c8('0x18')]?_0xce1ad2['options'][_0x13c8('0x1d')]?_[_0x13c8('0x1e')](_0xce1ad2[_0x13c8('0x18')][_0x13c8('0x1d')],function(_0x577df6){return{'model':db[_0x577df6[_0x13c8('0x1f')]],'as':_0x577df6['as'],'attributes':_0x577df6[_0x13c8('0x1b')],'include':_0x577df6['include']?_['map'](_0x577df6[_0x13c8('0x1d')],function(_0x4aff35){return{'model':db[_0x4aff35['model']],'as':_0x4aff35['as'],'attributes':_0x4aff35['attributes'],'include':_0x4aff35[_0x13c8('0x1d')]?_[_0x13c8('0x1e')](_0x4aff35['include'],function(_0x4df077){return{'model':db[_0x4df077[_0x13c8('0x1f')]],'as':_0x4df077['as'],'attributes':_0x4df077['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x1c7dc4){logger[_0x13c8('0xb')](_0x13c8('0x15'),_0xce1ad2);logger['debug']('GetVtigerAccount',_0xce1ad2,JSON[_0x13c8('0x10')](_0x1c7dc4));_0x346417(_0x1c7dc4);})[_0x13c8('0x20')](function(_0x399840){logger[_0x13c8('0x11')](_0x13c8('0x15'),_0x399840[_0x13c8('0x13')],_0xce1ad2);_0x251c38(_0x28f07e[_0x13c8('0x11')](0x1f4,_0x399840['message']));});});};exports[_0x13c8('0x21')]=function(_0xcbc9b7){var _0x5a5911=this;return new Promise(function(_0x5c85e4,_0x23a725){return db[_0x13c8('0x16')]['find']({'raw':_0xcbc9b7[_0x13c8('0x18')]?_0xcbc9b7[_0x13c8('0x18')]['raw']===undefined?!![]:![]:!![],'where':_0xcbc9b7[_0x13c8('0x18')]?_0xcbc9b7[_0x13c8('0x18')][_0x13c8('0x1a')]||null:null,'attributes':_0xcbc9b7[_0x13c8('0x18')]?_0xcbc9b7[_0x13c8('0x18')][_0x13c8('0x1b')]||null:null,'include':_0xcbc9b7[_0x13c8('0x18')]?_0xcbc9b7[_0x13c8('0x18')]['include']?_['map'](_0xcbc9b7[_0x13c8('0x18')][_0x13c8('0x1d')],function(_0x517d01){return{'model':db[_0x517d01[_0x13c8('0x1f')]],'as':_0x517d01['as'],'attributes':_0x517d01['attributes'],'include':_0x517d01[_0x13c8('0x1d')]?_['map'](_0x517d01[_0x13c8('0x1d')],function(_0x53de18){return{'model':db[_0x53de18[_0x13c8('0x1f')]],'as':_0x53de18['as'],'attributes':_0x53de18[_0x13c8('0x1b')],'include':_0x53de18[_0x13c8('0x1d')]?_[_0x13c8('0x1e')](_0x53de18[_0x13c8('0x1d')],function(_0x5287f2){return{'model':db[_0x5287f2[_0x13c8('0x1f')]],'as':_0x5287f2['as'],'attributes':_0x5287f2[_0x13c8('0x1b')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x362b9c){logger[_0x13c8('0xb')](_0x13c8('0x21'),_0xcbc9b7);logger['debug']('ShowVtigerAccount',_0xcbc9b7,JSON['stringify'](_0x362b9c));_0x5c85e4(_0x362b9c);})[_0x13c8('0x20')](function(_0x2c8218){logger[_0x13c8('0x11')](_0x13c8('0x21'),_0x2c8218[_0x13c8('0x13')],_0xcbc9b7);_0x23a725(_0x5a5911[_0x13c8('0x11')](0x1f4,_0x2c8218[_0x13c8('0x13')]));});});}; \ No newline at end of file diff --git a/server/api/intVtigerConfiguration/index.js b/server/api/intVtigerConfiguration/index.js index 5cf3ede..ed7408a 100644 --- a/server/api/intVtigerConfiguration/index.js +++ b/server/api/intVtigerConfiguration/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc46b=['util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intVtigerConfiguration.controller','get','isAuthenticated','index','/:id','show','getFields','/:id/subjects','getSubjects','/:id/descriptions','getDescriptions','post','create','put','update','delete','destroy','exports','multer'];(function(_0x1be179,_0x53906c){var _0x244e71=function(_0x522046){while(--_0x522046){_0x1be179['push'](_0x1be179['shift']());}};_0x244e71(++_0x53906c);}(_0xc46b,0xbc));var _0xbc46=function(_0xa2c23b,_0x4514a0){_0xa2c23b=_0xa2c23b-0x0;var _0x1c5b4b=_0xc46b[_0xa2c23b];return _0x1c5b4b;};'use strict';var multer=require(_0xbc46('0x0'));var util=require(_0xbc46('0x1'));var path=require('path');var timeout=require(_0xbc46('0x2'));var express=require(_0xbc46('0x3'));var router=express[_0xbc46('0x4')]();var fs_extra=require(_0xbc46('0x5'));var auth=require(_0xbc46('0x6'));var interaction=require(_0xbc46('0x7'));var config=require(_0xbc46('0x8'));var controller=require(_0xbc46('0x9'));router[_0xbc46('0xa')]('/',auth[_0xbc46('0xb')](),controller[_0xbc46('0xc')]);router[_0xbc46('0xa')](_0xbc46('0xd'),auth[_0xbc46('0xb')](),controller[_0xbc46('0xe')]);router[_0xbc46('0xa')]('/:id/fields',auth[_0xbc46('0xb')](),controller[_0xbc46('0xf')]);router['get'](_0xbc46('0x10'),auth[_0xbc46('0xb')](),controller[_0xbc46('0x11')]);router[_0xbc46('0xa')](_0xbc46('0x12'),auth[_0xbc46('0xb')](),controller[_0xbc46('0x13')]);router[_0xbc46('0x14')]('/',auth[_0xbc46('0xb')](),controller[_0xbc46('0x15')]);router[_0xbc46('0x16')](_0xbc46('0xd'),auth[_0xbc46('0xb')](),controller[_0xbc46('0x17')]);router[_0xbc46('0x18')](_0xbc46('0xd'),auth[_0xbc46('0xb')](),controller[_0xbc46('0x19')]);module[_0xbc46('0x1a')]=router; \ No newline at end of file +var _0x6017=['express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intVtigerConfiguration.controller','isAuthenticated','get','/:id','show','/:id/fields','/:id/subjects','getSubjects','/:id/descriptions','getDescriptions','post','create','put','update','delete','destroy','multer','util','connect-timeout'];(function(_0xba1760,_0x191969){var _0x1f3143=function(_0x5aa807){while(--_0x5aa807){_0xba1760['push'](_0xba1760['shift']());}};_0x1f3143(++_0x191969);}(_0x6017,0xed));var _0x7601=function(_0x4ab4c5,_0x458a7c){_0x4ab4c5=_0x4ab4c5-0x0;var _0x10368f=_0x6017[_0x4ab4c5];return _0x10368f;};'use strict';var multer=require(_0x7601('0x0'));var util=require(_0x7601('0x1'));var path=require('path');var timeout=require(_0x7601('0x2'));var express=require(_0x7601('0x3'));var router=express['Router']();var fs_extra=require(_0x7601('0x4'));var auth=require(_0x7601('0x5'));var interaction=require(_0x7601('0x6'));var config=require(_0x7601('0x7'));var controller=require(_0x7601('0x8'));router['get']('/',auth[_0x7601('0x9')](),controller['index']);router[_0x7601('0xa')](_0x7601('0xb'),auth[_0x7601('0x9')](),controller[_0x7601('0xc')]);router['get'](_0x7601('0xd'),auth[_0x7601('0x9')](),controller['getFields']);router[_0x7601('0xa')](_0x7601('0xe'),auth[_0x7601('0x9')](),controller[_0x7601('0xf')]);router[_0x7601('0xa')](_0x7601('0x10'),auth['isAuthenticated'](),controller[_0x7601('0x11')]);router[_0x7601('0x12')]('/',auth[_0x7601('0x9')](),controller[_0x7601('0x13')]);router[_0x7601('0x14')]('/:id',auth[_0x7601('0x9')](),controller[_0x7601('0x15')]);router[_0x7601('0x16')](_0x7601('0xb'),auth[_0x7601('0x9')](),controller[_0x7601('0x17')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/intVtigerConfiguration/intVtigerConfiguration.attributes.js b/server/api/intVtigerConfiguration/intVtigerConfiguration.attributes.js index 6e4501b..35b2956 100644 --- a/server/api/intVtigerConfiguration/intVtigerConfiguration.attributes.js +++ b/server/api/intVtigerConfiguration/intVtigerConfiguration.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7918=['sequelize','exports','STRING'];(function(_0x35c069,_0x5c8dea){var _0xd30f58=function(_0x281901){while(--_0x281901){_0x35c069['push'](_0x35c069['shift']());}};_0xd30f58(++_0x5c8dea);}(_0x7918,0xa5));var _0x8791=function(_0x387d92,_0x4d451a){_0x387d92=_0x387d92-0x0;var _0x127a61=_0x7918[_0x387d92];return _0x127a61;};'use strict';var Sequelize=require(_0x8791('0x0'));module[_0x8791('0x1')]={'name':{'type':Sequelize[_0x8791('0x2')]},'description':{'type':Sequelize['STRING']}}; \ No newline at end of file +var _0x6602=['sequelize','STRING'];(function(_0x51407f,_0x1c609b){var _0x37a469=function(_0x536f8a){while(--_0x536f8a){_0x51407f['push'](_0x51407f['shift']());}};_0x37a469(++_0x1c609b);}(_0x6602,0x16a));var _0x2660=function(_0x1deb03,_0xd05ad8){_0x1deb03=_0x1deb03-0x0;var _0x189fe7=_0x6602[_0x1deb03];return _0x189fe7;};'use strict';var Sequelize=require(_0x2660('0x0'));module['exports']={'name':{'type':Sequelize[_0x2660('0x1')]},'description':{'type':Sequelize[_0x2660('0x1')]}}; \ No newline at end of file diff --git a/server/api/intVtigerConfiguration/intVtigerConfiguration.controller.js b/server/api/intVtigerConfiguration/intVtigerConfiguration.controller.js index 40c1996..cd62e07 100644 --- a/server/api/intVtigerConfiguration/intVtigerConfiguration.controller.js +++ b/server/api/intVtigerConfiguration/intVtigerConfiguration.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7daf=['where','pick','filter','merge','VIRTUAL','options','VtigerConfiguration','include','findAll','rows','show','params','length','find','create','body','destroy','findOne','VtigerField','order','getFields','nolimit','getSubjects','getDescriptions','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','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','../../config/environment','../../config/license/util','../../mysqldb','jayson/promise','client','http','request','request\x20sent','debug','VtigerConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','VtigerConfiguration,\x20%s,\x20%s','message','info','result','catch','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','stack','name','send','rawAttributes','fieldName','type','model','map','query','keys','filters','intersection','fields','attributes','hasOwnProperty','sort'];(function(_0x267181,_0x5afcf9){var _0x426beb=function(_0x3cec69){while(--_0x3cec69){_0x267181['push'](_0x267181['shift']());}};_0x426beb(++_0x5afcf9);}(_0x7daf,0xda));var _0xf7da=function(_0x1820f1,_0x1403e7){_0x1820f1=_0x1820f1-0x0;var _0x167aed=_0x7daf[_0x1820f1];return _0x167aed;};'use strict';var emlformat=require(_0xf7da('0x0'));var rimraf=require(_0xf7da('0x1'));var zipdir=require(_0xf7da('0x2'));var jsonpatch=require(_0xf7da('0x3'));var rp=require(_0xf7da('0x4'));var moment=require(_0xf7da('0x5'));var BPromise=require(_0xf7da('0x6'));var Mustache=require(_0xf7da('0x7'));var util=require(_0xf7da('0x8'));var path=require(_0xf7da('0x9'));var sox=require('sox');var csv=require(_0xf7da('0xa'));var ejs=require(_0xf7da('0xb'));var fs=require('fs');var fs_extra=require(_0xf7da('0xc'));var _=require(_0xf7da('0xd'));var squel=require(_0xf7da('0xe'));var crypto=require('crypto');var jsforce=require(_0xf7da('0xf'));var deskjs=require(_0xf7da('0x10'));var toCsv=require('to-csv');var querystring=require(_0xf7da('0x11'));var Papa=require(_0xf7da('0x12'));var Redis=require(_0xf7da('0x13'));var authService=require(_0xf7da('0x14'));var qs=require(_0xf7da('0x15'));var as=require(_0xf7da('0x16'));var hardwareService=require(_0xf7da('0x17'));var logger=require(_0xf7da('0x18'))('api');var utils=require('../../config/utils');var config=require(_0xf7da('0x19'));var licenseUtil=require(_0xf7da('0x1a'));var db=require(_0xf7da('0x1b'))['db'];var jayson=require(_0xf7da('0x1c'));var client=jayson[_0xf7da('0x1d')][_0xf7da('0x1e')]({'port':0x232a});function respondWithRpcPromise(_0x54ad70,_0x41f0bc,_0x425836,_0x1d8922){return new BPromise(function(_0x4ad8f5,_0x38e12b){var _0x42e9dd=_0x1d8922||client;return _0x42e9dd[_0xf7da('0x1f')](_0x54ad70,_0x425836)['then'](function(_0x18e3f6){logger['info']('VtigerConfiguration,\x20%s,\x20%s',_0x41f0bc,_0xf7da('0x20'));logger[_0xf7da('0x21')](_0xf7da('0x22'),_0x41f0bc,_0xf7da('0x20'),JSON[_0xf7da('0x23')](_0x18e3f6));if(_0x18e3f6[_0xf7da('0x24')]){if(_0x18e3f6['error']['code']===0x1f4){logger[_0xf7da('0x24')](_0xf7da('0x25'),_0x41f0bc,_0x18e3f6[_0xf7da('0x24')]['message']);return _0x38e12b(_0x18e3f6[_0xf7da('0x24')][_0xf7da('0x26')]);}logger['error']('VtigerConfiguration,\x20%s,\x20%s',_0x41f0bc,_0x18e3f6[_0xf7da('0x24')][_0xf7da('0x26')]);return _0x4ad8f5(_0x18e3f6[_0xf7da('0x24')][_0xf7da('0x26')]);}else{logger[_0xf7da('0x27')](_0xf7da('0x25'),_0x41f0bc,_0xf7da('0x20'));_0x4ad8f5(_0x18e3f6[_0xf7da('0x28')][_0xf7da('0x26')]);}})[_0xf7da('0x29')](function(_0x54054a){logger[_0xf7da('0x24')](_0xf7da('0x25'),_0x41f0bc,_0x54054a);_0x38e12b(_0x54054a);});});}function respondWithStatusCode(_0x113316,_0x52a9b4){_0x52a9b4=_0x52a9b4||0xcc;return function(_0x3e18b2){if(_0x3e18b2){return _0x113316[_0xf7da('0x2a')](_0x52a9b4);}return _0x113316[_0xf7da('0x2b')](_0x52a9b4)[_0xf7da('0x2c')]();};}function respondWithResult(_0x1a8467,_0x18d46f){_0x18d46f=_0x18d46f||0xc8;return function(_0x3df9a7){if(_0x3df9a7){return _0x1a8467[_0xf7da('0x2b')](_0x18d46f)[_0xf7da('0x2d')](_0x3df9a7);}};}function respondWithFilteredResult(_0x5f549c,_0x4b28e4){return function(_0x110b15){if(_0x110b15){var _0x3d55cf=typeof _0x4b28e4[_0xf7da('0x2e')]===_0xf7da('0x2f')&&typeof _0x4b28e4[_0xf7da('0x30')]===_0xf7da('0x2f');var _0x124d74=_0x110b15[_0xf7da('0x31')];var _0x46767f=_0x3d55cf?0x0:_0x4b28e4['offset'];var _0xd486a7=_0x3d55cf?_0x110b15['count']:_0x4b28e4[_0xf7da('0x2e')]+_0x4b28e4[_0xf7da('0x30')];var _0x54378c;if(_0xd486a7>=_0x124d74){_0xd486a7=_0x124d74;_0x54378c=0xc8;}else{_0x54378c=0xce;}_0x5f549c[_0xf7da('0x2b')](_0x54378c);return _0x5f549c[_0xf7da('0x32')](_0xf7da('0x33'),_0x46767f+'-'+_0xd486a7+'/'+_0x124d74)[_0xf7da('0x2d')](_0x110b15);}return null;};}function patchUpdates(_0x50ba5c){return function(_0x16305c){try{jsonpatch[_0xf7da('0x34')](_0x16305c,_0x50ba5c,!![]);}catch(_0x4a10d4){return BPromise[_0xf7da('0x35')](_0x4a10d4);}return _0x16305c[_0xf7da('0x36')]();};}function saveUpdates(_0x299b6e,_0x280a13){return function(_0x359d2d){if(_0x359d2d){return _0x359d2d[_0xf7da('0x37')](_0x299b6e)[_0xf7da('0x38')](function(_0x402838){return _0x402838;});}return null;};}function removeEntity(_0xf6f824,_0x328b0a){return function(_0xff7cde){if(_0xff7cde){return _0xff7cde['destroy']()[_0xf7da('0x38')](function(){_0xf6f824[_0xf7da('0x2b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x4db1d0,_0x164ec1){return function(_0x176705){if(!_0x176705){_0x4db1d0[_0xf7da('0x2a')](0x194);}return _0x176705;};}function handleError(_0x500c30,_0x424544){_0x424544=_0x424544||0x1f4;return function(_0x27ee6e){logger[_0xf7da('0x24')](_0x27ee6e[_0xf7da('0x39')]);if(_0x27ee6e[_0xf7da('0x3a')]){delete _0x27ee6e[_0xf7da('0x3a')];}_0x500c30[_0xf7da('0x2b')](_0x424544)[_0xf7da('0x3b')](_0x27ee6e);};}exports['index']=function(_0x48c0e1,_0x7deb5c){var _0x34da34={},_0x323ba1={},_0x589d0a={'count':0x0,'rows':[]};var _0x4c8196=_['map'](db['VtigerConfiguration'][_0xf7da('0x3c')],function(_0x2ea4b1){return{'name':_0x2ea4b1[_0xf7da('0x3d')],'type':_0x2ea4b1[_0xf7da('0x3e')]['key']};});_0x323ba1[_0xf7da('0x3f')]=_[_0xf7da('0x40')](_0x4c8196,'name');_0x323ba1[_0xf7da('0x41')]=_[_0xf7da('0x42')](_0x48c0e1[_0xf7da('0x41')]);_0x323ba1[_0xf7da('0x43')]=_['intersection'](_0x323ba1[_0xf7da('0x3f')],_0x323ba1[_0xf7da('0x41')]);_0x34da34['attributes']=_[_0xf7da('0x44')](_0x323ba1[_0xf7da('0x3f')],qs[_0xf7da('0x45')](_0x48c0e1['query']['fields']));_0x34da34[_0xf7da('0x46')]=_0x34da34[_0xf7da('0x46')]['length']?_0x34da34[_0xf7da('0x46')]:_0x323ba1[_0xf7da('0x3f')];if(!_0x48c0e1[_0xf7da('0x41')][_0xf7da('0x47')]('nolimit')){_0x34da34[_0xf7da('0x30')]=qs['limit'](_0x48c0e1[_0xf7da('0x41')][_0xf7da('0x30')]);_0x34da34[_0xf7da('0x2e')]=qs[_0xf7da('0x2e')](_0x48c0e1[_0xf7da('0x41')][_0xf7da('0x2e')]);}_0x34da34['order']=qs[_0xf7da('0x48')](_0x48c0e1[_0xf7da('0x41')]['sort']);_0x34da34[_0xf7da('0x49')]=qs[_0xf7da('0x43')](_[_0xf7da('0x4a')](_0x48c0e1[_0xf7da('0x41')],_0x323ba1[_0xf7da('0x43')]),_0x4c8196);if(_0x48c0e1['query'][_0xf7da('0x4b')]){_0x34da34[_0xf7da('0x49')]=_[_0xf7da('0x4c')](_0x34da34[_0xf7da('0x49')],{'$or':_['map'](_0x4c8196,function(_0x405b18){if(_0x405b18['type']!==_0xf7da('0x4d')){var _0x41636c={};_0x41636c[_0x405b18[_0xf7da('0x3a')]]={'$like':'%'+_0x48c0e1[_0xf7da('0x41')][_0xf7da('0x4b')]+'%'};return _0x41636c;}})});}_0x34da34=_[_0xf7da('0x4c')]({},_0x34da34,_0x48c0e1[_0xf7da('0x4e')]);var _0x3ba4bb={'where':_0x34da34[_0xf7da('0x49')]};return db[_0xf7da('0x4f')][_0xf7da('0x31')](_0x3ba4bb)[_0xf7da('0x38')](function(_0xf22f15){_0x589d0a['count']=_0xf22f15;if(_0x48c0e1[_0xf7da('0x41')]['includeAll']){_0x34da34[_0xf7da('0x50')]=[{'all':!![]}];}return db[_0xf7da('0x4f')][_0xf7da('0x51')](_0x34da34);})[_0xf7da('0x38')](function(_0x293ab6){_0x589d0a[_0xf7da('0x52')]=_0x293ab6;return _0x589d0a;})[_0xf7da('0x38')](respondWithFilteredResult(_0x7deb5c,_0x34da34))[_0xf7da('0x29')](handleError(_0x7deb5c,null));};exports[_0xf7da('0x53')]=function(_0x1fb016,_0x528908){var _0x155993={'raw':![],'where':{'id':_0x1fb016[_0xf7da('0x54')]['id']}},_0x9dc187={};_0x9dc187['model']=_[_0xf7da('0x42')](db[_0xf7da('0x4f')][_0xf7da('0x3c')]);_0x9dc187[_0xf7da('0x41')]=_['keys'](_0x1fb016['query']);_0x9dc187['filters']=_[_0xf7da('0x44')](_0x9dc187[_0xf7da('0x3f')],_0x9dc187[_0xf7da('0x41')]);_0x155993[_0xf7da('0x46')]=_[_0xf7da('0x44')](_0x9dc187[_0xf7da('0x3f')],qs[_0xf7da('0x45')](_0x1fb016[_0xf7da('0x41')][_0xf7da('0x45')]));_0x155993['attributes']=_0x155993[_0xf7da('0x46')][_0xf7da('0x55')]?_0x155993[_0xf7da('0x46')]:_0x9dc187[_0xf7da('0x3f')];if(_0x1fb016[_0xf7da('0x41')]['includeAll']){_0x155993['include']=[{'all':!![]}];}_0x155993=_[_0xf7da('0x4c')]({},_0x155993,_0x1fb016['options']);return db['VtigerConfiguration'][_0xf7da('0x56')](_0x155993)[_0xf7da('0x38')](handleEntityNotFound(_0x528908,null))[_0xf7da('0x38')](respondWithResult(_0x528908,null))[_0xf7da('0x29')](handleError(_0x528908,null));};exports[_0xf7da('0x57')]=function(_0x424ead,_0x295686){return db[_0xf7da('0x4f')][_0xf7da('0x57')](_0x424ead[_0xf7da('0x58')],{})[_0xf7da('0x38')](respondWithResult(_0x295686,0xc9))['catch'](handleError(_0x295686,null));};exports[_0xf7da('0x37')]=function(_0xf11108,_0x337c81){if(_0xf11108[_0xf7da('0x58')]['id']){delete _0xf11108[_0xf7da('0x58')]['id'];}return db[_0xf7da('0x4f')][_0xf7da('0x56')]({'where':{'id':_0xf11108['params']['id']}})[_0xf7da('0x38')](handleEntityNotFound(_0x337c81,null))['then'](saveUpdates(_0xf11108[_0xf7da('0x58')],null))[_0xf7da('0x38')](respondWithResult(_0x337c81,null))[_0xf7da('0x29')](handleError(_0x337c81,null));};exports[_0xf7da('0x59')]=function(_0x105568,_0x33265a){return db[_0xf7da('0x4f')]['find']({'where':{'id':_0x105568['params']['id']}})[_0xf7da('0x38')](handleEntityNotFound(_0x33265a,null))[_0xf7da('0x38')](removeEntity(_0x33265a,null))[_0xf7da('0x29')](handleError(_0x33265a,null));};exports['getFields']=function(_0x12de16,_0x17b1b2,_0x1c07d3){var _0x1ccfd9={};var _0x196e0c={};var _0x5719ef;var _0x9f4712;return db[_0xf7da('0x4f')][_0xf7da('0x5a')]({'where':{'id':_0x12de16[_0xf7da('0x54')]['id']}})[_0xf7da('0x38')](handleEntityNotFound(_0x17b1b2,null))[_0xf7da('0x38')](function(_0x167699){if(_0x167699){_0x5719ef=_0x167699;_0x196e0c[_0xf7da('0x3f')]=_[_0xf7da('0x42')](db[_0xf7da('0x5b')][_0xf7da('0x3c')]);_0x196e0c[_0xf7da('0x41')]=_[_0xf7da('0x42')](_0x12de16['query']);_0x196e0c[_0xf7da('0x43')]=_[_0xf7da('0x44')](_0x196e0c['model'],_0x196e0c[_0xf7da('0x41')]);_0x1ccfd9[_0xf7da('0x46')]=_[_0xf7da('0x44')](_0x196e0c[_0xf7da('0x3f')],qs[_0xf7da('0x45')](_0x12de16[_0xf7da('0x41')][_0xf7da('0x45')]));_0x1ccfd9[_0xf7da('0x46')]=_0x1ccfd9['attributes'][_0xf7da('0x55')]?_0x1ccfd9[_0xf7da('0x46')]:_0x196e0c[_0xf7da('0x3f')];_0x1ccfd9[_0xf7da('0x5c')]=qs[_0xf7da('0x48')](_0x12de16[_0xf7da('0x41')]['sort']);_0x1ccfd9['where']=qs[_0xf7da('0x43')](_[_0xf7da('0x4a')](_0x12de16['query'],_0x196e0c['filters']));if(_0x12de16[_0xf7da('0x41')][_0xf7da('0x4b')]){_0x1ccfd9['where']=_[_0xf7da('0x4c')](_0x1ccfd9[_0xf7da('0x49')],{'$or':_[_0xf7da('0x40')](_0x1ccfd9[_0xf7da('0x46')],function(_0x480f4e){var _0x6134c5={};_0x6134c5[_0x480f4e]={'$like':'%'+_0x12de16['query']['filter']+'%'};return _0x6134c5;})});}_0x1ccfd9=_['merge']({},_0x1ccfd9,_0x12de16[_0xf7da('0x4e')]);return _0x5719ef[_0xf7da('0x5d')](_0x1ccfd9);}})['then'](function(_0x517a75){if(_0x517a75){_0x9f4712=_0x517a75['length'];if(!_0x12de16[_0xf7da('0x41')][_0xf7da('0x47')](_0xf7da('0x5e'))){_0x1ccfd9[_0xf7da('0x30')]=qs[_0xf7da('0x30')](_0x12de16['query'][_0xf7da('0x30')]);_0x1ccfd9[_0xf7da('0x2e')]=qs['offset'](_0x12de16[_0xf7da('0x41')]['offset']);}return _0x5719ef[_0xf7da('0x5d')](_0x1ccfd9);}})['then'](function(_0x2dd192){if(_0x2dd192){return _0x2dd192?{'count':_0x9f4712,'rows':_0x2dd192}:null;}})[_0xf7da('0x38')](respondWithResult(_0x17b1b2,null))[_0xf7da('0x29')](handleError(_0x17b1b2,null));};exports[_0xf7da('0x5f')]=function(_0x1a8745,_0x2d41cb,_0x380f37){var _0x2fa61b={};var _0x5ad78a={};var _0x38aab5;var _0x58241a;return db[_0xf7da('0x4f')]['findOne']({'where':{'id':_0x1a8745[_0xf7da('0x54')]['id']}})[_0xf7da('0x38')](handleEntityNotFound(_0x2d41cb,null))['then'](function(_0x2ce08e){if(_0x2ce08e){_0x38aab5=_0x2ce08e;_0x5ad78a[_0xf7da('0x3f')]=_[_0xf7da('0x42')](db['VtigerField'][_0xf7da('0x3c')]);_0x5ad78a[_0xf7da('0x41')]=_[_0xf7da('0x42')](_0x1a8745['query']);_0x5ad78a[_0xf7da('0x43')]=_[_0xf7da('0x44')](_0x5ad78a['model'],_0x5ad78a[_0xf7da('0x41')]);_0x2fa61b[_0xf7da('0x46')]=_[_0xf7da('0x44')](_0x5ad78a[_0xf7da('0x3f')],qs['fields'](_0x1a8745[_0xf7da('0x41')][_0xf7da('0x45')]));_0x2fa61b[_0xf7da('0x46')]=_0x2fa61b[_0xf7da('0x46')]['length']?_0x2fa61b[_0xf7da('0x46')]:_0x5ad78a[_0xf7da('0x3f')];_0x2fa61b[_0xf7da('0x5c')]=qs['sort'](_0x1a8745[_0xf7da('0x41')]['sort']);_0x2fa61b[_0xf7da('0x49')]=qs[_0xf7da('0x43')](_[_0xf7da('0x4a')](_0x1a8745[_0xf7da('0x41')],_0x5ad78a[_0xf7da('0x43')]));if(_0x1a8745[_0xf7da('0x41')][_0xf7da('0x4b')]){_0x2fa61b[_0xf7da('0x49')]=_['merge'](_0x2fa61b[_0xf7da('0x49')],{'$or':_[_0xf7da('0x40')](_0x2fa61b[_0xf7da('0x46')],function(_0x5ac475){var _0x5748dd={};_0x5748dd[_0x5ac475]={'$like':'%'+_0x1a8745[_0xf7da('0x41')][_0xf7da('0x4b')]+'%'};return _0x5748dd;})});}_0x2fa61b=_['merge']({},_0x2fa61b,_0x1a8745[_0xf7da('0x4e')]);return _0x38aab5['getSubjects'](_0x2fa61b);}})[_0xf7da('0x38')](function(_0x1c1d5e){if(_0x1c1d5e){_0x58241a=_0x1c1d5e[_0xf7da('0x55')];if(!_0x1a8745[_0xf7da('0x41')][_0xf7da('0x47')](_0xf7da('0x5e'))){_0x2fa61b['limit']=qs[_0xf7da('0x30')](_0x1a8745['query'][_0xf7da('0x30')]);_0x2fa61b[_0xf7da('0x2e')]=qs[_0xf7da('0x2e')](_0x1a8745[_0xf7da('0x41')][_0xf7da('0x2e')]);}return _0x38aab5['getSubjects'](_0x2fa61b);}})[_0xf7da('0x38')](function(_0x100135){if(_0x100135){return _0x100135?{'count':_0x58241a,'rows':_0x100135}:null;}})[_0xf7da('0x38')](respondWithResult(_0x2d41cb,null))[_0xf7da('0x29')](handleError(_0x2d41cb,null));};exports[_0xf7da('0x60')]=function(_0x191dae,_0x1a5698,_0x636e0){var _0x57f4b5={};var _0x383959={};var _0x334787;var _0x3d966d;return db[_0xf7da('0x4f')][_0xf7da('0x5a')]({'where':{'id':_0x191dae['params']['id']}})['then'](handleEntityNotFound(_0x1a5698,null))[_0xf7da('0x38')](function(_0x41fc13){if(_0x41fc13){_0x334787=_0x41fc13;_0x383959['model']=_['keys'](db['VtigerField'][_0xf7da('0x3c')]);_0x383959[_0xf7da('0x41')]=_[_0xf7da('0x42')](_0x191dae[_0xf7da('0x41')]);_0x383959[_0xf7da('0x43')]=_[_0xf7da('0x44')](_0x383959[_0xf7da('0x3f')],_0x383959[_0xf7da('0x41')]);_0x57f4b5[_0xf7da('0x46')]=_[_0xf7da('0x44')](_0x383959[_0xf7da('0x3f')],qs['fields'](_0x191dae[_0xf7da('0x41')][_0xf7da('0x45')]));_0x57f4b5['attributes']=_0x57f4b5[_0xf7da('0x46')][_0xf7da('0x55')]?_0x57f4b5[_0xf7da('0x46')]:_0x383959[_0xf7da('0x3f')];_0x57f4b5[_0xf7da('0x5c')]=qs[_0xf7da('0x48')](_0x191dae['query']['sort']);_0x57f4b5[_0xf7da('0x49')]=qs[_0xf7da('0x43')](_[_0xf7da('0x4a')](_0x191dae[_0xf7da('0x41')],_0x383959[_0xf7da('0x43')]));if(_0x191dae[_0xf7da('0x41')][_0xf7da('0x4b')]){_0x57f4b5[_0xf7da('0x49')]=_['merge'](_0x57f4b5[_0xf7da('0x49')],{'$or':_['map'](_0x57f4b5[_0xf7da('0x46')],function(_0x478afe){var _0x179d42={};_0x179d42[_0x478afe]={'$like':'%'+_0x191dae[_0xf7da('0x41')][_0xf7da('0x4b')]+'%'};return _0x179d42;})});}_0x57f4b5=_[_0xf7da('0x4c')]({},_0x57f4b5,_0x191dae['options']);return _0x334787[_0xf7da('0x60')](_0x57f4b5);}})[_0xf7da('0x38')](function(_0x19d546){if(_0x19d546){_0x3d966d=_0x19d546['length'];if(!_0x191dae['query'][_0xf7da('0x47')](_0xf7da('0x5e'))){_0x57f4b5[_0xf7da('0x30')]=qs[_0xf7da('0x30')](_0x191dae[_0xf7da('0x41')][_0xf7da('0x30')]);_0x57f4b5[_0xf7da('0x2e')]=qs[_0xf7da('0x2e')](_0x191dae[_0xf7da('0x41')][_0xf7da('0x2e')]);}return _0x334787[_0xf7da('0x60')](_0x57f4b5);}})[_0xf7da('0x38')](function(_0x4eee76){if(_0x4eee76){return _0x4eee76?{'count':_0x3d966d,'rows':_0x4eee76}:null;}})[_0xf7da('0x38')](respondWithResult(_0x1a5698,null))[_0xf7da('0x29')](handleError(_0x1a5698,null));}; \ No newline at end of file +var _0x850c=['attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','includeAll','include','findAll','rows','catch','show','options','find','create','body','params','getFields','findOne','VtigerField','getSubjects','getDescriptions','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','lodash','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','jayson/promise','client','http','request','info','request\x20sent','debug','VtigerConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','VtigerConfiguration,\x20%s,\x20%s','message','result','sendStatus','json','offset','undefined','count','limit','status','set','Content-Range','reject','save','update','then','destroy','end','name','index','VtigerConfiguration','rawAttributes','type','key','model','map','query','keys','filters','intersection','fields'];(function(_0x3ae35e,_0x14f519){var _0xaa849=function(_0x2777f6){while(--_0x2777f6){_0x3ae35e['push'](_0x3ae35e['shift']());}};_0xaa849(++_0x14f519);}(_0x850c,0x77));var _0xc850=function(_0x1b7743,_0x3928c9){_0x1b7743=_0x1b7743-0x0;var _0xe22046=_0x850c[_0x1b7743];return _0xe22046;};'use strict';var emlformat=require(_0xc850('0x0'));var rimraf=require(_0xc850('0x1'));var zipdir=require(_0xc850('0x2'));var jsonpatch=require(_0xc850('0x3'));var rp=require(_0xc850('0x4'));var moment=require(_0xc850('0x5'));var BPromise=require(_0xc850('0x6'));var Mustache=require('mustache');var util=require(_0xc850('0x7'));var path=require(_0xc850('0x8'));var sox=require(_0xc850('0x9'));var csv=require(_0xc850('0xa'));var ejs=require(_0xc850('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xc850('0xc'));var squel=require('squel');var crypto=require(_0xc850('0xd'));var jsforce=require(_0xc850('0xe'));var deskjs=require(_0xc850('0xf'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xc850('0x10'));var Redis=require(_0xc850('0x11'));var authService=require(_0xc850('0x12'));var qs=require(_0xc850('0x13'));var as=require(_0xc850('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xc850('0x15'))('api');var utils=require(_0xc850('0x16'));var config=require(_0xc850('0x17'));var licenseUtil=require(_0xc850('0x18'));var db=require('../../mysqldb')['db'];var jayson=require(_0xc850('0x19'));var client=jayson[_0xc850('0x1a')][_0xc850('0x1b')]({'port':0x232a});function respondWithRpcPromise(_0x1d78ff,_0x3805ed,_0x4cbb5b,_0xd01c18){return new BPromise(function(_0x1c0f95,_0x2a2713){var _0x472796=_0xd01c18||client;return _0x472796[_0xc850('0x1c')](_0x1d78ff,_0x4cbb5b)['then'](function(_0x4ddb96){logger[_0xc850('0x1d')]('VtigerConfiguration,\x20%s,\x20%s',_0x3805ed,_0xc850('0x1e'));logger[_0xc850('0x1f')](_0xc850('0x20'),_0x3805ed,_0xc850('0x1e'),JSON[_0xc850('0x21')](_0x4ddb96));if(_0x4ddb96[_0xc850('0x22')]){if(_0x4ddb96['error'][_0xc850('0x23')]===0x1f4){logger['error'](_0xc850('0x24'),_0x3805ed,_0x4ddb96['error'][_0xc850('0x25')]);return _0x2a2713(_0x4ddb96[_0xc850('0x22')][_0xc850('0x25')]);}logger[_0xc850('0x22')](_0xc850('0x24'),_0x3805ed,_0x4ddb96[_0xc850('0x22')][_0xc850('0x25')]);return _0x1c0f95(_0x4ddb96[_0xc850('0x22')][_0xc850('0x25')]);}else{logger[_0xc850('0x1d')]('VtigerConfiguration,\x20%s,\x20%s',_0x3805ed,_0xc850('0x1e'));_0x1c0f95(_0x4ddb96[_0xc850('0x26')][_0xc850('0x25')]);}})['catch'](function(_0x5f4399){logger[_0xc850('0x22')](_0xc850('0x24'),_0x3805ed,_0x5f4399);_0x2a2713(_0x5f4399);});});}function respondWithStatusCode(_0x4a087a,_0x55a302){_0x55a302=_0x55a302||0xcc;return function(_0x9b3d22){if(_0x9b3d22){return _0x4a087a[_0xc850('0x27')](_0x55a302);}return _0x4a087a['status'](_0x55a302)['end']();};}function respondWithResult(_0x1bb737,_0xe8ad6a){_0xe8ad6a=_0xe8ad6a||0xc8;return function(_0x50c8b0){if(_0x50c8b0){return _0x1bb737['status'](_0xe8ad6a)[_0xc850('0x28')](_0x50c8b0);}};}function respondWithFilteredResult(_0x48d584,_0x181637){return function(_0x136ac4){if(_0x136ac4){var _0x357d2f=typeof _0x181637[_0xc850('0x29')]==='undefined'&&typeof _0x181637['limit']===_0xc850('0x2a');var _0x2188f8=_0x136ac4[_0xc850('0x2b')];var _0xa1dc9a=_0x357d2f?0x0:_0x181637[_0xc850('0x29')];var _0x552068=_0x357d2f?_0x136ac4[_0xc850('0x2b')]:_0x181637['offset']+_0x181637[_0xc850('0x2c')];var _0x21da3b;if(_0x552068>=_0x2188f8){_0x552068=_0x2188f8;_0x21da3b=0xc8;}else{_0x21da3b=0xce;}_0x48d584[_0xc850('0x2d')](_0x21da3b);return _0x48d584[_0xc850('0x2e')](_0xc850('0x2f'),_0xa1dc9a+'-'+_0x552068+'/'+_0x2188f8)[_0xc850('0x28')](_0x136ac4);}return null;};}function patchUpdates(_0x1e9b29){return function(_0x46cde2){try{jsonpatch['apply'](_0x46cde2,_0x1e9b29,!![]);}catch(_0x179322){return BPromise[_0xc850('0x30')](_0x179322);}return _0x46cde2[_0xc850('0x31')]();};}function saveUpdates(_0x4b18b5,_0x2609c0){return function(_0x23fa1b){if(_0x23fa1b){return _0x23fa1b[_0xc850('0x32')](_0x4b18b5)[_0xc850('0x33')](function(_0x5a50a7){return _0x5a50a7;});}return null;};}function removeEntity(_0x21d744,_0x49cf94){return function(_0x425cd9){if(_0x425cd9){return _0x425cd9[_0xc850('0x34')]()[_0xc850('0x33')](function(){_0x21d744[_0xc850('0x2d')](0xcc)[_0xc850('0x35')]();});}};}function handleEntityNotFound(_0x293898,_0x425865){return function(_0x497b24){if(!_0x497b24){_0x293898[_0xc850('0x27')](0x194);}return _0x497b24;};}function handleError(_0x137311,_0x2156e1){_0x2156e1=_0x2156e1||0x1f4;return function(_0x449219){logger[_0xc850('0x22')](_0x449219['stack']);if(_0x449219[_0xc850('0x36')]){delete _0x449219[_0xc850('0x36')];}_0x137311[_0xc850('0x2d')](_0x2156e1)['send'](_0x449219);};}exports[_0xc850('0x37')]=function(_0x6086ce,_0x3b1150){var _0x143936={},_0x37c338={},_0xde3c8b={'count':0x0,'rows':[]};var _0x25d8bb=_['map'](db[_0xc850('0x38')][_0xc850('0x39')],function(_0x1192e1){return{'name':_0x1192e1['fieldName'],'type':_0x1192e1[_0xc850('0x3a')][_0xc850('0x3b')]};});_0x37c338[_0xc850('0x3c')]=_[_0xc850('0x3d')](_0x25d8bb,_0xc850('0x36'));_0x37c338[_0xc850('0x3e')]=_[_0xc850('0x3f')](_0x6086ce[_0xc850('0x3e')]);_0x37c338[_0xc850('0x40')]=_[_0xc850('0x41')](_0x37c338[_0xc850('0x3c')],_0x37c338[_0xc850('0x3e')]);_0x143936['attributes']=_[_0xc850('0x41')](_0x37c338['model'],qs['fields'](_0x6086ce[_0xc850('0x3e')][_0xc850('0x42')]));_0x143936['attributes']=_0x143936[_0xc850('0x43')][_0xc850('0x44')]?_0x143936[_0xc850('0x43')]:_0x37c338['model'];if(!_0x6086ce[_0xc850('0x3e')][_0xc850('0x45')](_0xc850('0x46'))){_0x143936[_0xc850('0x2c')]=qs[_0xc850('0x2c')](_0x6086ce[_0xc850('0x3e')][_0xc850('0x2c')]);_0x143936[_0xc850('0x29')]=qs[_0xc850('0x29')](_0x6086ce[_0xc850('0x3e')][_0xc850('0x29')]);}_0x143936[_0xc850('0x47')]=qs[_0xc850('0x48')](_0x6086ce[_0xc850('0x3e')][_0xc850('0x48')]);_0x143936[_0xc850('0x49')]=qs[_0xc850('0x40')](_[_0xc850('0x4a')](_0x6086ce[_0xc850('0x3e')],_0x37c338[_0xc850('0x40')]),_0x25d8bb);if(_0x6086ce[_0xc850('0x3e')][_0xc850('0x4b')]){_0x143936[_0xc850('0x49')]=_['merge'](_0x143936['where'],{'$or':_[_0xc850('0x3d')](_0x25d8bb,function(_0x5286bc){if(_0x5286bc[_0xc850('0x3a')]!=='VIRTUAL'){var _0x990b4e={};_0x990b4e[_0x5286bc[_0xc850('0x36')]]={'$like':'%'+_0x6086ce['query'][_0xc850('0x4b')]+'%'};return _0x990b4e;}})});}_0x143936=_[_0xc850('0x4c')]({},_0x143936,_0x6086ce['options']);var _0x5ddf83={'where':_0x143936['where']};return db['VtigerConfiguration']['count'](_0x5ddf83)['then'](function(_0x432451){_0xde3c8b[_0xc850('0x2b')]=_0x432451;if(_0x6086ce[_0xc850('0x3e')][_0xc850('0x4d')]){_0x143936[_0xc850('0x4e')]=[{'all':!![]}];}return db[_0xc850('0x38')][_0xc850('0x4f')](_0x143936);})[_0xc850('0x33')](function(_0x228910){_0xde3c8b[_0xc850('0x50')]=_0x228910;return _0xde3c8b;})[_0xc850('0x33')](respondWithFilteredResult(_0x3b1150,_0x143936))[_0xc850('0x51')](handleError(_0x3b1150,null));};exports[_0xc850('0x52')]=function(_0x525fd1,_0x286c1f){var _0x5ecf5a={'raw':![],'where':{'id':_0x525fd1['params']['id']}},_0x5a1160={};_0x5a1160[_0xc850('0x3c')]=_[_0xc850('0x3f')](db[_0xc850('0x38')]['rawAttributes']);_0x5a1160[_0xc850('0x3e')]=_[_0xc850('0x3f')](_0x525fd1[_0xc850('0x3e')]);_0x5a1160[_0xc850('0x40')]=_[_0xc850('0x41')](_0x5a1160[_0xc850('0x3c')],_0x5a1160[_0xc850('0x3e')]);_0x5ecf5a[_0xc850('0x43')]=_[_0xc850('0x41')](_0x5a1160['model'],qs[_0xc850('0x42')](_0x525fd1[_0xc850('0x3e')][_0xc850('0x42')]));_0x5ecf5a[_0xc850('0x43')]=_0x5ecf5a['attributes'][_0xc850('0x44')]?_0x5ecf5a[_0xc850('0x43')]:_0x5a1160[_0xc850('0x3c')];if(_0x525fd1[_0xc850('0x3e')]['includeAll']){_0x5ecf5a[_0xc850('0x4e')]=[{'all':!![]}];}_0x5ecf5a=_[_0xc850('0x4c')]({},_0x5ecf5a,_0x525fd1[_0xc850('0x53')]);return db[_0xc850('0x38')][_0xc850('0x54')](_0x5ecf5a)['then'](handleEntityNotFound(_0x286c1f,null))[_0xc850('0x33')](respondWithResult(_0x286c1f,null))[_0xc850('0x51')](handleError(_0x286c1f,null));};exports[_0xc850('0x55')]=function(_0x2c9ffb,_0x37fbea){return db[_0xc850('0x38')][_0xc850('0x55')](_0x2c9ffb[_0xc850('0x56')],{})[_0xc850('0x33')](respondWithResult(_0x37fbea,0xc9))[_0xc850('0x51')](handleError(_0x37fbea,null));};exports[_0xc850('0x32')]=function(_0x5d53be,_0x57fbca){if(_0x5d53be['body']['id']){delete _0x5d53be[_0xc850('0x56')]['id'];}return db[_0xc850('0x38')][_0xc850('0x54')]({'where':{'id':_0x5d53be[_0xc850('0x57')]['id']}})['then'](handleEntityNotFound(_0x57fbca,null))['then'](saveUpdates(_0x5d53be[_0xc850('0x56')],null))[_0xc850('0x33')](respondWithResult(_0x57fbca,null))[_0xc850('0x51')](handleError(_0x57fbca,null));};exports[_0xc850('0x34')]=function(_0x283561,_0x586f91){return db['VtigerConfiguration']['find']({'where':{'id':_0x283561[_0xc850('0x57')]['id']}})[_0xc850('0x33')](handleEntityNotFound(_0x586f91,null))[_0xc850('0x33')](removeEntity(_0x586f91,null))[_0xc850('0x51')](handleError(_0x586f91,null));};exports[_0xc850('0x58')]=function(_0x4263fc,_0x2761ef,_0x3884e4){var _0x42e106={};var _0x347cc4={};var _0x186862;var _0x278cb5;return db[_0xc850('0x38')][_0xc850('0x59')]({'where':{'id':_0x4263fc[_0xc850('0x57')]['id']}})[_0xc850('0x33')](handleEntityNotFound(_0x2761ef,null))['then'](function(_0x45ecf0){if(_0x45ecf0){_0x186862=_0x45ecf0;_0x347cc4[_0xc850('0x3c')]=_[_0xc850('0x3f')](db[_0xc850('0x5a')]['rawAttributes']);_0x347cc4['query']=_['keys'](_0x4263fc['query']);_0x347cc4[_0xc850('0x40')]=_[_0xc850('0x41')](_0x347cc4['model'],_0x347cc4['query']);_0x42e106[_0xc850('0x43')]=_[_0xc850('0x41')](_0x347cc4[_0xc850('0x3c')],qs[_0xc850('0x42')](_0x4263fc[_0xc850('0x3e')]['fields']));_0x42e106['attributes']=_0x42e106[_0xc850('0x43')][_0xc850('0x44')]?_0x42e106['attributes']:_0x347cc4[_0xc850('0x3c')];_0x42e106[_0xc850('0x47')]=qs['sort'](_0x4263fc[_0xc850('0x3e')]['sort']);_0x42e106[_0xc850('0x49')]=qs[_0xc850('0x40')](_[_0xc850('0x4a')](_0x4263fc[_0xc850('0x3e')],_0x347cc4[_0xc850('0x40')]));if(_0x4263fc[_0xc850('0x3e')][_0xc850('0x4b')]){_0x42e106[_0xc850('0x49')]=_[_0xc850('0x4c')](_0x42e106['where'],{'$or':_[_0xc850('0x3d')](_0x42e106['attributes'],function(_0x372486){var _0x936d42={};_0x936d42[_0x372486]={'$like':'%'+_0x4263fc[_0xc850('0x3e')][_0xc850('0x4b')]+'%'};return _0x936d42;})});}_0x42e106=_[_0xc850('0x4c')]({},_0x42e106,_0x4263fc[_0xc850('0x53')]);return _0x186862[_0xc850('0x58')](_0x42e106);}})[_0xc850('0x33')](function(_0x1c21a6){if(_0x1c21a6){_0x278cb5=_0x1c21a6[_0xc850('0x44')];if(!_0x4263fc['query'][_0xc850('0x45')]('nolimit')){_0x42e106[_0xc850('0x2c')]=qs['limit'](_0x4263fc['query'][_0xc850('0x2c')]);_0x42e106[_0xc850('0x29')]=qs[_0xc850('0x29')](_0x4263fc[_0xc850('0x3e')][_0xc850('0x29')]);}return _0x186862[_0xc850('0x58')](_0x42e106);}})[_0xc850('0x33')](function(_0x3e17f0){if(_0x3e17f0){return _0x3e17f0?{'count':_0x278cb5,'rows':_0x3e17f0}:null;}})[_0xc850('0x33')](respondWithResult(_0x2761ef,null))[_0xc850('0x51')](handleError(_0x2761ef,null));};exports['getSubjects']=function(_0x49a62a,_0x40d05f,_0x3fb149){var _0x4931f3={};var _0x1f1515={};var _0x42e15e;var _0x15e99d;return db[_0xc850('0x38')][_0xc850('0x59')]({'where':{'id':_0x49a62a[_0xc850('0x57')]['id']}})[_0xc850('0x33')](handleEntityNotFound(_0x40d05f,null))[_0xc850('0x33')](function(_0x587ad3){if(_0x587ad3){_0x42e15e=_0x587ad3;_0x1f1515[_0xc850('0x3c')]=_['keys'](db['VtigerField'][_0xc850('0x39')]);_0x1f1515[_0xc850('0x3e')]=_[_0xc850('0x3f')](_0x49a62a[_0xc850('0x3e')]);_0x1f1515['filters']=_['intersection'](_0x1f1515[_0xc850('0x3c')],_0x1f1515[_0xc850('0x3e')]);_0x4931f3['attributes']=_['intersection'](_0x1f1515[_0xc850('0x3c')],qs[_0xc850('0x42')](_0x49a62a[_0xc850('0x3e')][_0xc850('0x42')]));_0x4931f3[_0xc850('0x43')]=_0x4931f3[_0xc850('0x43')]['length']?_0x4931f3[_0xc850('0x43')]:_0x1f1515[_0xc850('0x3c')];_0x4931f3['order']=qs[_0xc850('0x48')](_0x49a62a['query'][_0xc850('0x48')]);_0x4931f3['where']=qs[_0xc850('0x40')](_[_0xc850('0x4a')](_0x49a62a[_0xc850('0x3e')],_0x1f1515[_0xc850('0x40')]));if(_0x49a62a[_0xc850('0x3e')][_0xc850('0x4b')]){_0x4931f3['where']=_[_0xc850('0x4c')](_0x4931f3[_0xc850('0x49')],{'$or':_[_0xc850('0x3d')](_0x4931f3[_0xc850('0x43')],function(_0x81b2a5){var _0x505930={};_0x505930[_0x81b2a5]={'$like':'%'+_0x49a62a[_0xc850('0x3e')][_0xc850('0x4b')]+'%'};return _0x505930;})});}_0x4931f3=_[_0xc850('0x4c')]({},_0x4931f3,_0x49a62a['options']);return _0x42e15e[_0xc850('0x5b')](_0x4931f3);}})[_0xc850('0x33')](function(_0x56e960){if(_0x56e960){_0x15e99d=_0x56e960[_0xc850('0x44')];if(!_0x49a62a[_0xc850('0x3e')][_0xc850('0x45')](_0xc850('0x46'))){_0x4931f3[_0xc850('0x2c')]=qs[_0xc850('0x2c')](_0x49a62a['query'][_0xc850('0x2c')]);_0x4931f3[_0xc850('0x29')]=qs[_0xc850('0x29')](_0x49a62a[_0xc850('0x3e')][_0xc850('0x29')]);}return _0x42e15e[_0xc850('0x5b')](_0x4931f3);}})[_0xc850('0x33')](function(_0x5d8d25){if(_0x5d8d25){return _0x5d8d25?{'count':_0x15e99d,'rows':_0x5d8d25}:null;}})['then'](respondWithResult(_0x40d05f,null))[_0xc850('0x51')](handleError(_0x40d05f,null));};exports['getDescriptions']=function(_0xb80862,_0x3ed46d,_0x496231){var _0x1c53cc={};var _0x3d2011={};var _0x4c8d20;var _0x4c6614;return db['VtigerConfiguration'][_0xc850('0x59')]({'where':{'id':_0xb80862[_0xc850('0x57')]['id']}})['then'](handleEntityNotFound(_0x3ed46d,null))[_0xc850('0x33')](function(_0x5d11c7){if(_0x5d11c7){_0x4c8d20=_0x5d11c7;_0x3d2011[_0xc850('0x3c')]=_[_0xc850('0x3f')](db[_0xc850('0x5a')][_0xc850('0x39')]);_0x3d2011[_0xc850('0x3e')]=_[_0xc850('0x3f')](_0xb80862[_0xc850('0x3e')]);_0x3d2011[_0xc850('0x40')]=_['intersection'](_0x3d2011['model'],_0x3d2011['query']);_0x1c53cc[_0xc850('0x43')]=_[_0xc850('0x41')](_0x3d2011[_0xc850('0x3c')],qs[_0xc850('0x42')](_0xb80862['query'][_0xc850('0x42')]));_0x1c53cc[_0xc850('0x43')]=_0x1c53cc[_0xc850('0x43')][_0xc850('0x44')]?_0x1c53cc[_0xc850('0x43')]:_0x3d2011[_0xc850('0x3c')];_0x1c53cc[_0xc850('0x47')]=qs[_0xc850('0x48')](_0xb80862[_0xc850('0x3e')][_0xc850('0x48')]);_0x1c53cc[_0xc850('0x49')]=qs[_0xc850('0x40')](_['pick'](_0xb80862['query'],_0x3d2011[_0xc850('0x40')]));if(_0xb80862[_0xc850('0x3e')][_0xc850('0x4b')]){_0x1c53cc['where']=_[_0xc850('0x4c')](_0x1c53cc[_0xc850('0x49')],{'$or':_[_0xc850('0x3d')](_0x1c53cc['attributes'],function(_0x1b85f9){var _0x304f30={};_0x304f30[_0x1b85f9]={'$like':'%'+_0xb80862[_0xc850('0x3e')][_0xc850('0x4b')]+'%'};return _0x304f30;})});}_0x1c53cc=_[_0xc850('0x4c')]({},_0x1c53cc,_0xb80862[_0xc850('0x53')]);return _0x4c8d20[_0xc850('0x5c')](_0x1c53cc);}})['then'](function(_0x260a78){if(_0x260a78){_0x4c6614=_0x260a78[_0xc850('0x44')];if(!_0xb80862[_0xc850('0x3e')][_0xc850('0x45')]('nolimit')){_0x1c53cc[_0xc850('0x2c')]=qs[_0xc850('0x2c')](_0xb80862[_0xc850('0x3e')][_0xc850('0x2c')]);_0x1c53cc[_0xc850('0x29')]=qs[_0xc850('0x29')](_0xb80862[_0xc850('0x3e')][_0xc850('0x29')]);}return _0x4c8d20[_0xc850('0x5c')](_0x1c53cc);}})['then'](function(_0x24c9bd){if(_0x24c9bd){return _0x24c9bd?{'count':_0x4c6614,'rows':_0x24c9bd}:null;}})[_0xc850('0x33')](respondWithResult(_0x3ed46d,null))[_0xc850('0x51')](handleError(_0x3ed46d,null));}; \ No newline at end of file diff --git a/server/api/intVtigerConfiguration/intVtigerConfiguration.model.js b/server/api/intVtigerConfiguration/intVtigerConfiguration.model.js index b1e4f95..a571f2d 100644 --- a/server/api/intVtigerConfiguration/intVtigerConfiguration.model.js +++ b/server/api/intVtigerConfiguration/intVtigerConfiguration.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa7a0=['util','moment','bluebird','request-promise','path','rimraf','exports','define','int_vtiger_configurations','lodash'];(function(_0x332309,_0x5eff30){var _0x5048cf=function(_0x5b5ef5){while(--_0x5b5ef5){_0x332309['push'](_0x332309['shift']());}};_0x5048cf(++_0x5eff30);}(_0xa7a0,0xa9));var _0x0a7a=function(_0x974c6,_0x51a1e9){_0x974c6=_0x974c6-0x0;var _0x186bdf=_0xa7a0[_0x974c6];return _0x186bdf;};'use strict';var _=require(_0x0a7a('0x0'));var util=require(_0x0a7a('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0x0a7a('0x2'));var BPromise=require(_0x0a7a('0x3'));var rp=require(_0x0a7a('0x4'));var fs=require('fs');var path=require(_0x0a7a('0x5'));var rimraf=require(_0x0a7a('0x6'));var config=require('../../config/environment');var attributes=require('./intVtigerConfiguration.attributes');module[_0x0a7a('0x7')]=function(_0x402e98,_0x2310a8){return _0x402e98[_0x0a7a('0x8')]('VtigerConfiguration',attributes,{'tableName':_0x0a7a('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x60ca=['exports','define','VtigerConfiguration','lodash','util','../../config/logger','api','bluebird','rimraf','../../config/environment'];(function(_0x590985,_0x3a1e02){var _0x2d8d61=function(_0x406e48){while(--_0x406e48){_0x590985['push'](_0x590985['shift']());}};_0x2d8d61(++_0x3a1e02);}(_0x60ca,0x139));var _0xa60c=function(_0x475cd4,_0x18f1b8){_0x475cd4=_0x475cd4-0x0;var _0x5c810e=_0x60ca[_0x475cd4];return _0x5c810e;};'use strict';var _=require(_0xa60c('0x0'));var util=require(_0xa60c('0x1'));var logger=require(_0xa60c('0x2'))(_0xa60c('0x3'));var moment=require('moment');var BPromise=require(_0xa60c('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xa60c('0x5'));var config=require(_0xa60c('0x6'));var attributes=require('./intVtigerConfiguration.attributes');module[_0xa60c('0x7')]=function(_0x1e288c,_0x23bd55){return _0x1e288c[_0xa60c('0x8')](_0xa60c('0x9'),attributes,{'tableName':'int_vtiger_configurations','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intVtigerConfiguration/intVtigerConfiguration.rpc.js b/server/api/intVtigerConfiguration/intVtigerConfiguration.rpc.js index 1b0e947..563c4f2 100644 --- a/server/api/intVtigerConfiguration/intVtigerConfiguration.rpc.js +++ b/server/api/intVtigerConfiguration/intVtigerConfiguration.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x060b=['ioredis','../../mysqldb','../../config/utils','rpc','jayson/promise','client','request','then','VtigerConfiguration,\x20%s,\x20%s','request\x20sent','debug','VtigerConfiguration,\x20%s,\x20%s,\x20%s','error','message','info','result','catch','util','bluebird','randomstring'];(function(_0x39f290,_0x1d3554){var _0x3c08f2=function(_0x50226d){while(--_0x50226d){_0x39f290['push'](_0x39f290['shift']());}};_0x3c08f2(++_0x1d3554);}(_0x060b,0x13d));var _0xb060=function(_0x5e8e01,_0x111966){_0x5e8e01=_0x5e8e01-0x0;var _0x552d8c=_0x060b[_0x5e8e01];return _0x552d8c;};'use strict';var _=require('lodash');var util=require(_0xb060('0x0'));var moment=require('moment');var BPromise=require(_0xb060('0x1'));var rs=require(_0xb060('0x2'));var fs=require('fs');var Redis=require(_0xb060('0x3'));var db=require(_0xb060('0x4'))['db'];var utils=require(_0xb060('0x5'));var logger=require('../../config/logger')(_0xb060('0x6'));var config=require('../../config/environment');var jayson=require(_0xb060('0x7'));var client=jayson[_0xb060('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x5e2758,_0x11064c,_0x1937f0){return new BPromise(function(_0x508709,_0x24344b){return client[_0xb060('0x9')](_0x5e2758,_0x1937f0)[_0xb060('0xa')](function(_0x5d76a4){logger['info'](_0xb060('0xb'),_0x11064c,_0xb060('0xc'));logger[_0xb060('0xd')](_0xb060('0xe'),_0x11064c,_0xb060('0xc'),JSON['stringify'](_0x5d76a4));if(_0x5d76a4[_0xb060('0xf')]){if(_0x5d76a4[_0xb060('0xf')]['code']===0x1f4){logger[_0xb060('0xf')](_0xb060('0xb'),_0x11064c,_0x5d76a4['error']['message']);return _0x24344b(_0x5d76a4[_0xb060('0xf')][_0xb060('0x10')]);}logger[_0xb060('0xf')]('VtigerConfiguration,\x20%s,\x20%s',_0x11064c,_0x5d76a4[_0xb060('0xf')][_0xb060('0x10')]);return _0x508709(_0x5d76a4[_0xb060('0xf')][_0xb060('0x10')]);}else{logger[_0xb060('0x11')](_0xb060('0xb'),_0x11064c,'request\x20sent');_0x508709(_0x5d76a4[_0xb060('0x12')][_0xb060('0x10')]);}})[_0xb060('0x13')](function(_0x393583){logger['error'](_0xb060('0xb'),_0x11064c,_0x393583);_0x24344b(_0x393583);});});} \ No newline at end of file +var _0x806f=['code','VtigerConfiguration,\x20%s,\x20%s','message','request\x20sent','result','catch','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','request','then','info','debug','VtigerConfiguration,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x443547,_0x21d7a8){var _0x1423a8=function(_0x2f8d47){while(--_0x2f8d47){_0x443547['push'](_0x443547['shift']());}};_0x1423a8(++_0x21d7a8);}(_0x806f,0x1d2));var _0xf806=function(_0x4803aa,_0x346933){_0x4803aa=_0x4803aa-0x0;var _0x56b05c=_0x806f[_0x4803aa];return _0x56b05c;};'use strict';var _=require(_0xf806('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xf806('0x1'));var rs=require(_0xf806('0x2'));var fs=require('fs');var Redis=require(_0xf806('0x3'));var db=require(_0xf806('0x4'))['db'];var utils=require(_0xf806('0x5'));var logger=require(_0xf806('0x6'))('rpc');var config=require(_0xf806('0x7'));var jayson=require(_0xf806('0x8'));var client=jayson[_0xf806('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x2985f2,_0xba4466,_0x1f4be5){return new BPromise(function(_0x5740d6,_0x32a134){return client[_0xf806('0xa')](_0x2985f2,_0x1f4be5)[_0xf806('0xb')](function(_0xa9c57f){logger[_0xf806('0xc')]('VtigerConfiguration,\x20%s,\x20%s',_0xba4466,'request\x20sent');logger[_0xf806('0xd')](_0xf806('0xe'),_0xba4466,'request\x20sent',JSON[_0xf806('0xf')](_0xa9c57f));if(_0xa9c57f[_0xf806('0x10')]){if(_0xa9c57f[_0xf806('0x10')][_0xf806('0x11')]===0x1f4){logger[_0xf806('0x10')](_0xf806('0x12'),_0xba4466,_0xa9c57f['error']['message']);return _0x32a134(_0xa9c57f[_0xf806('0x10')]['message']);}logger['error'](_0xf806('0x12'),_0xba4466,_0xa9c57f['error'][_0xf806('0x13')]);return _0x5740d6(_0xa9c57f[_0xf806('0x10')][_0xf806('0x13')]);}else{logger['info'](_0xf806('0x12'),_0xba4466,_0xf806('0x14'));_0x5740d6(_0xa9c57f[_0xf806('0x15')][_0xf806('0x13')]);}})[_0xf806('0x16')](function(_0x184806){logger[_0xf806('0x10')]('VtigerConfiguration,\x20%s,\x20%s',_0xba4466,_0x184806);_0x32a134(_0x184806);});});} \ No newline at end of file diff --git a/server/api/intVtigerField/index.js b/server/api/intVtigerField/index.js index 4a0aa9c..95c1d63 100644 --- a/server/api/intVtigerField/index.js +++ b/server/api/intVtigerField/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xedf4=['destroy','exports','multer','util','path','connect-timeout','Router','../../components/interaction/service','../../config/environment','./intVtigerField.controller','get','isAuthenticated','show','post','create','put','delete','/:id'];(function(_0x46eb54,_0x4f1eac){var _0x3902b2=function(_0x3ac68b){while(--_0x3ac68b){_0x46eb54['push'](_0x46eb54['shift']());}};_0x3902b2(++_0x4f1eac);}(_0xedf4,0x134));var _0x4edf=function(_0x53d5e1,_0x2c19e7){_0x53d5e1=_0x53d5e1-0x0;var _0x390c5b=_0xedf4[_0x53d5e1];return _0x390c5b;};'use strict';var multer=require(_0x4edf('0x0'));var util=require(_0x4edf('0x1'));var path=require(_0x4edf('0x2'));var timeout=require(_0x4edf('0x3'));var express=require('express');var router=express[_0x4edf('0x4')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0x4edf('0x5'));var config=require(_0x4edf('0x6'));var controller=require(_0x4edf('0x7'));router[_0x4edf('0x8')]('/',auth[_0x4edf('0x9')](),controller['index']);router[_0x4edf('0x8')]('/:id',auth['isAuthenticated'](),controller[_0x4edf('0xa')]);router[_0x4edf('0xb')]('/',auth[_0x4edf('0x9')](),controller[_0x4edf('0xc')]);router[_0x4edf('0xd')]('/:id',auth[_0x4edf('0x9')](),controller['update']);router[_0x4edf('0xe')](_0x4edf('0xf'),auth[_0x4edf('0x9')](),controller[_0x4edf('0x10')]);module[_0x4edf('0x11')]=router; \ No newline at end of file +var _0xe35d=['delete','exports','multer','util','path','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intVtigerField.controller','get','isAuthenticated','index','show','put','/:id','update'];(function(_0x26cdf0,_0x27ccdf){var _0x2bffd7=function(_0x26ace){while(--_0x26ace){_0x26cdf0['push'](_0x26cdf0['shift']());}};_0x2bffd7(++_0x27ccdf);}(_0xe35d,0x1e8));var _0xde35=function(_0x29a8da,_0x329267){_0x29a8da=_0x29a8da-0x0;var _0x31e7aa=_0xe35d[_0x29a8da];return _0x31e7aa;};'use strict';var multer=require(_0xde35('0x0'));var util=require(_0xde35('0x1'));var path=require(_0xde35('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0xde35('0x3')]();var fs_extra=require(_0xde35('0x4'));var auth=require(_0xde35('0x5'));var interaction=require(_0xde35('0x6'));var config=require(_0xde35('0x7'));var controller=require(_0xde35('0x8'));router[_0xde35('0x9')]('/',auth[_0xde35('0xa')](),controller[_0xde35('0xb')]);router[_0xde35('0x9')]('/:id',auth[_0xde35('0xa')](),controller[_0xde35('0xc')]);router['post']('/',auth[_0xde35('0xa')](),controller['create']);router[_0xde35('0xd')](_0xde35('0xe'),auth['isAuthenticated'](),controller[_0xde35('0xf')]);router[_0xde35('0x10')](_0xde35('0xe'),auth[_0xde35('0xa')](),controller['destroy']);module[_0xde35('0x11')]=router; \ No newline at end of file diff --git a/server/api/intVtigerField/intVtigerField.attributes.js b/server/api/intVtigerField/intVtigerField.attributes.js index 595373a..df8e79d 100644 --- a/server/api/intVtigerField/intVtigerField.attributes.js +++ b/server/api/intVtigerField/intVtigerField.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x02ad=['exports','ENUM','variable','picklist','string','STRING','BOOLEAN','sequelize'];(function(_0x5cffe0,_0x43afcd){var _0x325399=function(_0xe97124){while(--_0xe97124){_0x5cffe0['push'](_0x5cffe0['shift']());}};_0x325399(++_0x43afcd);}(_0x02ad,0x1ef));var _0xd02a=function(_0x1928c9,_0x13a6d1){_0x1928c9=_0x1928c9-0x0;var _0x51b5fb=_0x02ad[_0x1928c9];return _0x51b5fb;};'use strict';var Sequelize=require(_0xd02a('0x0'));module[_0xd02a('0x1')]={'type':{'type':Sequelize[_0xd02a('0x2')]('string',_0xd02a('0x3'),'customVariable','keyValue',_0xd02a('0x4')),'defaultValue':_0xd02a('0x5')},'content':{'type':Sequelize['STRING']},'key':{'type':Sequelize[_0xd02a('0x6')]},'keyType':{'type':Sequelize[_0xd02a('0x2')](_0xd02a('0x5'),'variable','customVariable')},'keyContent':{'type':Sequelize['STRING']},'idField':{'type':Sequelize[_0xd02a('0x6')]},'nameField':{'type':Sequelize[_0xd02a('0x6')]},'customField':{'type':Sequelize[_0xd02a('0x7')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0xd02a('0x6')]}}; \ No newline at end of file +var _0xd855=['string','variable','customVariable','STRING','BOOLEAN','exports','ENUM','picklist'];(function(_0x5f0756,_0x346a18){var _0x168735=function(_0x4bf94f){while(--_0x4bf94f){_0x5f0756['push'](_0x5f0756['shift']());}};_0x168735(++_0x346a18);}(_0xd855,0x18d));var _0x5d85=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xd855[_0x321bb2];return _0x9c12ed;};'use strict';var Sequelize=require('sequelize');module[_0x5d85('0x0')]={'type':{'type':Sequelize[_0x5d85('0x1')]('string','variable','customVariable','keyValue',_0x5d85('0x2')),'defaultValue':_0x5d85('0x3')},'content':{'type':Sequelize['STRING']},'key':{'type':Sequelize['STRING']},'keyType':{'type':Sequelize['ENUM']('string',_0x5d85('0x4'),_0x5d85('0x5'))},'keyContent':{'type':Sequelize[_0x5d85('0x6')]},'idField':{'type':Sequelize[_0x5d85('0x6')]},'nameField':{'type':Sequelize['STRING']},'customField':{'type':Sequelize[_0x5d85('0x7')],'defaultValue':!![]},'variableName':{'type':Sequelize['STRING']}}; \ No newline at end of file diff --git a/server/api/intVtigerField/intVtigerField.controller.js b/server/api/intVtigerField/intVtigerField.controller.js index 0fdc62d..46d8594 100644 --- a/server/api/intVtigerField/intVtigerField.controller.js +++ b/server/api/intVtigerField/intVtigerField.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2e79=['eml-format','rimraf','fast-json-patch','moment','bluebird','mustache','util','to-csv','ejs','fs-extra','lodash','crypto','desk.js','querystring','../../components/auth/service','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','offset','limit','undefined','count','json','apply','reject','update','then','destroy','error','stack','name','send','map','VtigerField','rawAttributes','key','model','query','keys','intersection','fields','attributes','order','sort','filters','filter','where','merge','type','VIRTUAL','findAll','rows','catch','params','length','include','options','find','create','body'];(function(_0xf70dcd,_0x4548e0){var _0x54ad43=function(_0x58335f){while(--_0x58335f){_0xf70dcd['push'](_0xf70dcd['shift']());}};_0x54ad43(++_0x4548e0);}(_0x2e79,0x84));var _0x92e7=function(_0x278da2,_0x14d780){_0x278da2=_0x278da2-0x0;var _0x40f7d2=_0x2e79[_0x278da2];return _0x40f7d2;};'use strict';var emlformat=require(_0x92e7('0x0'));var rimraf=require(_0x92e7('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x92e7('0x2'));var rp=require('request-promise');var moment=require(_0x92e7('0x3'));var BPromise=require(_0x92e7('0x4'));var Mustache=require(_0x92e7('0x5'));var util=require(_0x92e7('0x6'));var path=require('path');var sox=require('sox');var csv=require(_0x92e7('0x7'));var ejs=require(_0x92e7('0x8'));var fs=require('fs');var fs_extra=require(_0x92e7('0x9'));var _=require(_0x92e7('0xa'));var squel=require('squel');var crypto=require(_0x92e7('0xb'));var jsforce=require('jsforce');var deskjs=require(_0x92e7('0xc'));var toCsv=require('to-csv');var querystring=require(_0x92e7('0xd'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x92e7('0xe'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x92e7('0xf'))(_0x92e7('0x10'));var utils=require(_0x92e7('0x11'));var config=require(_0x92e7('0x12'));var licenseUtil=require(_0x92e7('0x13'));var db=require(_0x92e7('0x14'))['db'];function respondWithStatusCode(_0x19bf8c,_0x55d990){_0x55d990=_0x55d990||0xcc;return function(_0x4b59e7){if(_0x4b59e7){return _0x19bf8c[_0x92e7('0x15')](_0x55d990);}return _0x19bf8c[_0x92e7('0x16')](_0x55d990)[_0x92e7('0x17')]();};}function respondWithResult(_0x202c56,_0x3d1fed){_0x3d1fed=_0x3d1fed||0xc8;return function(_0x621cd5){if(_0x621cd5){return _0x202c56[_0x92e7('0x16')](_0x3d1fed)['json'](_0x621cd5);}};}function respondWithFilteredResult(_0x38ae8a,_0x427e59){return function(_0x18f44d){if(_0x18f44d){var _0x2cbeee=typeof _0x427e59[_0x92e7('0x18')]==='undefined'&&typeof _0x427e59[_0x92e7('0x19')]===_0x92e7('0x1a');var _0x363811=_0x18f44d[_0x92e7('0x1b')];var _0x5196c2=_0x2cbeee?0x0:_0x427e59[_0x92e7('0x18')];var _0x24b8ef=_0x2cbeee?_0x18f44d['count']:_0x427e59[_0x92e7('0x18')]+_0x427e59[_0x92e7('0x19')];var _0x1aa840;if(_0x24b8ef>=_0x363811){_0x24b8ef=_0x363811;_0x1aa840=0xc8;}else{_0x1aa840=0xce;}_0x38ae8a['status'](_0x1aa840);return _0x38ae8a['set']('Content-Range',_0x5196c2+'-'+_0x24b8ef+'/'+_0x363811)[_0x92e7('0x1c')](_0x18f44d);}return null;};}function patchUpdates(_0x2f80c2){return function(_0x7704){try{jsonpatch[_0x92e7('0x1d')](_0x7704,_0x2f80c2,!![]);}catch(_0x3625a8){return BPromise[_0x92e7('0x1e')](_0x3625a8);}return _0x7704['save']();};}function saveUpdates(_0x883c4,_0x1172a3){return function(_0x5f216f){if(_0x5f216f){return _0x5f216f[_0x92e7('0x1f')](_0x883c4)[_0x92e7('0x20')](function(_0x463970){return _0x463970;});}return null;};}function removeEntity(_0x2470a8,_0x18ad22){return function(_0x3e0981){if(_0x3e0981){return _0x3e0981[_0x92e7('0x21')]()[_0x92e7('0x20')](function(){_0x2470a8['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x1093d6,_0x317f07){return function(_0x57e7e8){if(!_0x57e7e8){_0x1093d6[_0x92e7('0x15')](0x194);}return _0x57e7e8;};}function handleError(_0xb9e08e,_0x4ec79a){_0x4ec79a=_0x4ec79a||0x1f4;return function(_0xd1f044){logger[_0x92e7('0x22')](_0xd1f044[_0x92e7('0x23')]);if(_0xd1f044[_0x92e7('0x24')]){delete _0xd1f044[_0x92e7('0x24')];}_0xb9e08e[_0x92e7('0x16')](_0x4ec79a)[_0x92e7('0x25')](_0xd1f044);};}exports['index']=function(_0x38bb21,_0x20bf8d){var _0x411a7f={},_0x31b2e9={},_0xd4fffa={'count':0x0,'rows':[]};var _0x2b950e=_[_0x92e7('0x26')](db[_0x92e7('0x27')][_0x92e7('0x28')],function(_0x4169c3){return{'name':_0x4169c3['fieldName'],'type':_0x4169c3['type'][_0x92e7('0x29')]};});_0x31b2e9[_0x92e7('0x2a')]=_[_0x92e7('0x26')](_0x2b950e,_0x92e7('0x24'));_0x31b2e9[_0x92e7('0x2b')]=_[_0x92e7('0x2c')](_0x38bb21[_0x92e7('0x2b')]);_0x31b2e9['filters']=_[_0x92e7('0x2d')](_0x31b2e9['model'],_0x31b2e9[_0x92e7('0x2b')]);_0x411a7f['attributes']=_[_0x92e7('0x2d')](_0x31b2e9[_0x92e7('0x2a')],qs[_0x92e7('0x2e')](_0x38bb21[_0x92e7('0x2b')][_0x92e7('0x2e')]));_0x411a7f['attributes']=_0x411a7f[_0x92e7('0x2f')]['length']?_0x411a7f['attributes']:_0x31b2e9[_0x92e7('0x2a')];if(!_0x38bb21['query']['hasOwnProperty']('nolimit')){_0x411a7f[_0x92e7('0x19')]=qs['limit'](_0x38bb21['query'][_0x92e7('0x19')]);_0x411a7f[_0x92e7('0x18')]=qs[_0x92e7('0x18')](_0x38bb21[_0x92e7('0x2b')][_0x92e7('0x18')]);}_0x411a7f[_0x92e7('0x30')]=qs[_0x92e7('0x31')](_0x38bb21[_0x92e7('0x2b')][_0x92e7('0x31')]);_0x411a7f['where']=qs[_0x92e7('0x32')](_['pick'](_0x38bb21[_0x92e7('0x2b')],_0x31b2e9[_0x92e7('0x32')]),_0x2b950e);if(_0x38bb21['query'][_0x92e7('0x33')]){_0x411a7f[_0x92e7('0x34')]=_[_0x92e7('0x35')](_0x411a7f[_0x92e7('0x34')],{'$or':_[_0x92e7('0x26')](_0x2b950e,function(_0x319558){if(_0x319558[_0x92e7('0x36')]!==_0x92e7('0x37')){var _0x10b1c1={};_0x10b1c1[_0x319558['name']]={'$like':'%'+_0x38bb21[_0x92e7('0x2b')]['filter']+'%'};return _0x10b1c1;}})});}_0x411a7f=_[_0x92e7('0x35')]({},_0x411a7f,_0x38bb21['options']);var _0x1c0919={'where':_0x411a7f[_0x92e7('0x34')]};return db[_0x92e7('0x27')][_0x92e7('0x1b')](_0x1c0919)[_0x92e7('0x20')](function(_0x5083c4){_0xd4fffa[_0x92e7('0x1b')]=_0x5083c4;if(_0x38bb21['query']['includeAll']){_0x411a7f['include']=[{'all':!![]}];}return db[_0x92e7('0x27')][_0x92e7('0x38')](_0x411a7f);})[_0x92e7('0x20')](function(_0xadcc6a){_0xd4fffa[_0x92e7('0x39')]=_0xadcc6a;return _0xd4fffa;})[_0x92e7('0x20')](respondWithFilteredResult(_0x20bf8d,_0x411a7f))[_0x92e7('0x3a')](handleError(_0x20bf8d,null));};exports['show']=function(_0x236bc1,_0x2944eb){var _0x1173e8={'raw':!![],'where':{'id':_0x236bc1[_0x92e7('0x3b')]['id']}},_0x569882={};_0x569882['model']=_['keys'](db[_0x92e7('0x27')][_0x92e7('0x28')]);_0x569882[_0x92e7('0x2b')]=_[_0x92e7('0x2c')](_0x236bc1[_0x92e7('0x2b')]);_0x569882[_0x92e7('0x32')]=_[_0x92e7('0x2d')](_0x569882[_0x92e7('0x2a')],_0x569882[_0x92e7('0x2b')]);_0x1173e8[_0x92e7('0x2f')]=_[_0x92e7('0x2d')](_0x569882[_0x92e7('0x2a')],qs['fields'](_0x236bc1[_0x92e7('0x2b')][_0x92e7('0x2e')]));_0x1173e8['attributes']=_0x1173e8['attributes'][_0x92e7('0x3c')]?_0x1173e8['attributes']:_0x569882[_0x92e7('0x2a')];if(_0x236bc1['query']['includeAll']){_0x1173e8[_0x92e7('0x3d')]=[{'all':!![]}];}_0x1173e8=_[_0x92e7('0x35')]({},_0x1173e8,_0x236bc1[_0x92e7('0x3e')]);return db[_0x92e7('0x27')][_0x92e7('0x3f')](_0x1173e8)[_0x92e7('0x20')](handleEntityNotFound(_0x2944eb,null))[_0x92e7('0x20')](respondWithResult(_0x2944eb,null))['catch'](handleError(_0x2944eb,null));};exports['create']=function(_0xcf97f5,_0x7b7d5d){return db[_0x92e7('0x27')][_0x92e7('0x40')](_0xcf97f5[_0x92e7('0x41')],{})['then'](respondWithResult(_0x7b7d5d,0xc9))[_0x92e7('0x3a')](handleError(_0x7b7d5d,null));};exports[_0x92e7('0x1f')]=function(_0x4346c3,_0x2b08ff){if(_0x4346c3['body']['id']){delete _0x4346c3['body']['id'];}return db[_0x92e7('0x27')][_0x92e7('0x3f')]({'where':{'id':_0x4346c3[_0x92e7('0x3b')]['id']}})[_0x92e7('0x20')](handleEntityNotFound(_0x2b08ff,null))[_0x92e7('0x20')](saveUpdates(_0x4346c3[_0x92e7('0x41')],null))[_0x92e7('0x20')](respondWithResult(_0x2b08ff,null))['catch'](handleError(_0x2b08ff,null));};exports[_0x92e7('0x21')]=function(_0x180177,_0x139c2d){return db[_0x92e7('0x27')][_0x92e7('0x3f')]({'where':{'id':_0x180177[_0x92e7('0x3b')]['id']}})['then'](handleEntityNotFound(_0x139c2d,null))[_0x92e7('0x20')](removeEntity(_0x139c2d,null))[_0x92e7('0x3a')](handleError(_0x139c2d,null));}; \ No newline at end of file +var _0xd5ed=['ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','reject','save','update','destroy','then','error','name','index','map','VtigerField','rawAttributes','model','query','filters','intersection','attributes','fields','length','nolimit','order','sort','where','filter','merge','type','VIRTUAL','includeAll','include','rows','catch','show','keys','options','find','create','body','params','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse'];(function(_0x4ba522,_0x4e9848){var _0x5752b4=function(_0x4cdd29){while(--_0x4cdd29){_0x4ba522['push'](_0x4ba522['shift']());}};_0x5752b4(++_0x4e9848);}(_0xd5ed,0x1a3));var _0xdd5e=function(_0x2236a3,_0x49a25d){_0x2236a3=_0x2236a3-0x0;var _0x21f81d=_0xd5ed[_0x2236a3];return _0x21f81d;};'use strict';var emlformat=require(_0xdd5e('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xdd5e('0x1'));var jsonpatch=require(_0xdd5e('0x2'));var rp=require(_0xdd5e('0x3'));var moment=require(_0xdd5e('0x4'));var BPromise=require(_0xdd5e('0x5'));var Mustache=require(_0xdd5e('0x6'));var util=require(_0xdd5e('0x7'));var path=require('path');var sox=require(_0xdd5e('0x8'));var csv=require(_0xdd5e('0x9'));var ejs=require(_0xdd5e('0xa'));var fs=require('fs');var fs_extra=require(_0xdd5e('0xb'));var _=require(_0xdd5e('0xc'));var squel=require(_0xdd5e('0xd'));var crypto=require(_0xdd5e('0xe'));var jsforce=require(_0xdd5e('0xf'));var deskjs=require(_0xdd5e('0x10'));var toCsv=require('to-csv');var querystring=require(_0xdd5e('0x11'));var Papa=require(_0xdd5e('0x12'));var Redis=require(_0xdd5e('0x13'));var authService=require(_0xdd5e('0x14'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xdd5e('0x15'));var logger=require(_0xdd5e('0x16'))(_0xdd5e('0x17'));var utils=require(_0xdd5e('0x18'));var config=require('../../config/environment');var licenseUtil=require(_0xdd5e('0x19'));var db=require(_0xdd5e('0x1a'))['db'];function respondWithStatusCode(_0x10545a,_0x3da7cb){_0x3da7cb=_0x3da7cb||0xcc;return function(_0x2260cd){if(_0x2260cd){return _0x10545a[_0xdd5e('0x1b')](_0x3da7cb);}return _0x10545a[_0xdd5e('0x1c')](_0x3da7cb)[_0xdd5e('0x1d')]();};}function respondWithResult(_0x54a4ec,_0x385107){_0x385107=_0x385107||0xc8;return function(_0x1a6451){if(_0x1a6451){return _0x54a4ec['status'](_0x385107)[_0xdd5e('0x1e')](_0x1a6451);}};}function respondWithFilteredResult(_0x597236,_0x570717){return function(_0x2e7d37){if(_0x2e7d37){var _0xa22562=typeof _0x570717[_0xdd5e('0x1f')]===_0xdd5e('0x20')&&typeof _0x570717[_0xdd5e('0x21')]===_0xdd5e('0x20');var _0x5071ed=_0x2e7d37[_0xdd5e('0x22')];var _0x338a65=_0xa22562?0x0:_0x570717[_0xdd5e('0x1f')];var _0x310c8c=_0xa22562?_0x2e7d37[_0xdd5e('0x22')]:_0x570717[_0xdd5e('0x1f')]+_0x570717[_0xdd5e('0x21')];var _0x476e1e;if(_0x310c8c>=_0x5071ed){_0x310c8c=_0x5071ed;_0x476e1e=0xc8;}else{_0x476e1e=0xce;}_0x597236[_0xdd5e('0x1c')](_0x476e1e);return _0x597236[_0xdd5e('0x23')]('Content-Range',_0x338a65+'-'+_0x310c8c+'/'+_0x5071ed)[_0xdd5e('0x1e')](_0x2e7d37);}return null;};}function patchUpdates(_0x2910c5){return function(_0x331f6d){try{jsonpatch['apply'](_0x331f6d,_0x2910c5,!![]);}catch(_0x114320){return BPromise[_0xdd5e('0x24')](_0x114320);}return _0x331f6d[_0xdd5e('0x25')]();};}function saveUpdates(_0x5c3c7a,_0x293d4c){return function(_0x4bd93c){if(_0x4bd93c){return _0x4bd93c[_0xdd5e('0x26')](_0x5c3c7a)['then'](function(_0x3ebdb2){return _0x3ebdb2;});}return null;};}function removeEntity(_0x4d4017,_0x4897f4){return function(_0x5588af){if(_0x5588af){return _0x5588af[_0xdd5e('0x27')]()[_0xdd5e('0x28')](function(){_0x4d4017['status'](0xcc)[_0xdd5e('0x1d')]();});}};}function handleEntityNotFound(_0x250e18,_0x169acc){return function(_0x1e8f41){if(!_0x1e8f41){_0x250e18[_0xdd5e('0x1b')](0x194);}return _0x1e8f41;};}function handleError(_0x48f289,_0x3e54ae){_0x3e54ae=_0x3e54ae||0x1f4;return function(_0x37d392){logger[_0xdd5e('0x29')](_0x37d392['stack']);if(_0x37d392[_0xdd5e('0x2a')]){delete _0x37d392[_0xdd5e('0x2a')];}_0x48f289[_0xdd5e('0x1c')](_0x3e54ae)['send'](_0x37d392);};}exports[_0xdd5e('0x2b')]=function(_0x1cc0f1,_0x5ce92f){var _0xa5c3de={},_0x202c7e={},_0x591055={'count':0x0,'rows':[]};var _0x504c7f=_[_0xdd5e('0x2c')](db[_0xdd5e('0x2d')][_0xdd5e('0x2e')],function(_0x1b8492){return{'name':_0x1b8492['fieldName'],'type':_0x1b8492['type']['key']};});_0x202c7e[_0xdd5e('0x2f')]=_[_0xdd5e('0x2c')](_0x504c7f,'name');_0x202c7e[_0xdd5e('0x30')]=_['keys'](_0x1cc0f1[_0xdd5e('0x30')]);_0x202c7e[_0xdd5e('0x31')]=_[_0xdd5e('0x32')](_0x202c7e[_0xdd5e('0x2f')],_0x202c7e[_0xdd5e('0x30')]);_0xa5c3de[_0xdd5e('0x33')]=_['intersection'](_0x202c7e[_0xdd5e('0x2f')],qs['fields'](_0x1cc0f1[_0xdd5e('0x30')][_0xdd5e('0x34')]));_0xa5c3de[_0xdd5e('0x33')]=_0xa5c3de[_0xdd5e('0x33')][_0xdd5e('0x35')]?_0xa5c3de[_0xdd5e('0x33')]:_0x202c7e['model'];if(!_0x1cc0f1[_0xdd5e('0x30')]['hasOwnProperty'](_0xdd5e('0x36'))){_0xa5c3de[_0xdd5e('0x21')]=qs[_0xdd5e('0x21')](_0x1cc0f1[_0xdd5e('0x30')][_0xdd5e('0x21')]);_0xa5c3de[_0xdd5e('0x1f')]=qs['offset'](_0x1cc0f1[_0xdd5e('0x30')]['offset']);}_0xa5c3de[_0xdd5e('0x37')]=qs[_0xdd5e('0x38')](_0x1cc0f1[_0xdd5e('0x30')][_0xdd5e('0x38')]);_0xa5c3de[_0xdd5e('0x39')]=qs['filters'](_['pick'](_0x1cc0f1[_0xdd5e('0x30')],_0x202c7e[_0xdd5e('0x31')]),_0x504c7f);if(_0x1cc0f1[_0xdd5e('0x30')][_0xdd5e('0x3a')]){_0xa5c3de['where']=_[_0xdd5e('0x3b')](_0xa5c3de[_0xdd5e('0x39')],{'$or':_['map'](_0x504c7f,function(_0x12a98c){if(_0x12a98c[_0xdd5e('0x3c')]!==_0xdd5e('0x3d')){var _0x260015={};_0x260015[_0x12a98c[_0xdd5e('0x2a')]]={'$like':'%'+_0x1cc0f1[_0xdd5e('0x30')][_0xdd5e('0x3a')]+'%'};return _0x260015;}})});}_0xa5c3de=_['merge']({},_0xa5c3de,_0x1cc0f1['options']);var _0x540b8e={'where':_0xa5c3de[_0xdd5e('0x39')]};return db[_0xdd5e('0x2d')][_0xdd5e('0x22')](_0x540b8e)[_0xdd5e('0x28')](function(_0x317a18){_0x591055[_0xdd5e('0x22')]=_0x317a18;if(_0x1cc0f1[_0xdd5e('0x30')][_0xdd5e('0x3e')]){_0xa5c3de[_0xdd5e('0x3f')]=[{'all':!![]}];}return db['VtigerField']['findAll'](_0xa5c3de);})[_0xdd5e('0x28')](function(_0x36ad1b){_0x591055[_0xdd5e('0x40')]=_0x36ad1b;return _0x591055;})[_0xdd5e('0x28')](respondWithFilteredResult(_0x5ce92f,_0xa5c3de))[_0xdd5e('0x41')](handleError(_0x5ce92f,null));};exports[_0xdd5e('0x42')]=function(_0x4346c2,_0x34e4ba){var _0x1b93a7={'raw':!![],'where':{'id':_0x4346c2['params']['id']}},_0x584d5c={};_0x584d5c[_0xdd5e('0x2f')]=_[_0xdd5e('0x43')](db[_0xdd5e('0x2d')][_0xdd5e('0x2e')]);_0x584d5c[_0xdd5e('0x30')]=_['keys'](_0x4346c2[_0xdd5e('0x30')]);_0x584d5c[_0xdd5e('0x31')]=_[_0xdd5e('0x32')](_0x584d5c[_0xdd5e('0x2f')],_0x584d5c[_0xdd5e('0x30')]);_0x1b93a7['attributes']=_[_0xdd5e('0x32')](_0x584d5c['model'],qs[_0xdd5e('0x34')](_0x4346c2[_0xdd5e('0x30')][_0xdd5e('0x34')]));_0x1b93a7[_0xdd5e('0x33')]=_0x1b93a7[_0xdd5e('0x33')][_0xdd5e('0x35')]?_0x1b93a7['attributes']:_0x584d5c[_0xdd5e('0x2f')];if(_0x4346c2[_0xdd5e('0x30')][_0xdd5e('0x3e')]){_0x1b93a7[_0xdd5e('0x3f')]=[{'all':!![]}];}_0x1b93a7=_[_0xdd5e('0x3b')]({},_0x1b93a7,_0x4346c2[_0xdd5e('0x44')]);return db[_0xdd5e('0x2d')][_0xdd5e('0x45')](_0x1b93a7)[_0xdd5e('0x28')](handleEntityNotFound(_0x34e4ba,null))[_0xdd5e('0x28')](respondWithResult(_0x34e4ba,null))['catch'](handleError(_0x34e4ba,null));};exports[_0xdd5e('0x46')]=function(_0x352f34,_0x25dbb3){return db[_0xdd5e('0x2d')][_0xdd5e('0x46')](_0x352f34[_0xdd5e('0x47')],{})['then'](respondWithResult(_0x25dbb3,0xc9))['catch'](handleError(_0x25dbb3,null));};exports[_0xdd5e('0x26')]=function(_0x5055b8,_0x1a2b50){if(_0x5055b8[_0xdd5e('0x47')]['id']){delete _0x5055b8['body']['id'];}return db[_0xdd5e('0x2d')][_0xdd5e('0x45')]({'where':{'id':_0x5055b8['params']['id']}})[_0xdd5e('0x28')](handleEntityNotFound(_0x1a2b50,null))[_0xdd5e('0x28')](saveUpdates(_0x5055b8[_0xdd5e('0x47')],null))[_0xdd5e('0x28')](respondWithResult(_0x1a2b50,null))[_0xdd5e('0x41')](handleError(_0x1a2b50,null));};exports['destroy']=function(_0x2290b7,_0x5b1c74){return db[_0xdd5e('0x2d')][_0xdd5e('0x45')]({'where':{'id':_0x2290b7[_0xdd5e('0x48')]['id']}})['then'](handleEntityNotFound(_0x5b1c74,null))['then'](removeEntity(_0x5b1c74,null))[_0xdd5e('0x41')](handleError(_0x5b1c74,null));}; \ No newline at end of file diff --git a/server/api/intVtigerField/intVtigerField.model.js b/server/api/intVtigerField/intVtigerField.model.js index 71c13a8..8184a12 100644 --- a/server/api/intVtigerField/intVtigerField.model.js +++ b/server/api/intVtigerField/intVtigerField.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xdf1b=['request-promise','path','rimraf','../../config/environment','define','VtigerField','int_vtiger_fields','vtiger_unique_index','idField','FieldId','api','moment','bluebird'];(function(_0x4e5a89,_0x153335){var _0x161631=function(_0x5eead4){while(--_0x5eead4){_0x4e5a89['push'](_0x4e5a89['shift']());}};_0x161631(++_0x153335);}(_0xdf1b,0x1c4));var _0xbdf1=function(_0x4c9380,_0x2fefc0){_0x4c9380=_0x4c9380-0x0;var _0x49a523=_0xdf1b[_0x4c9380];return _0x49a523;};'use strict';var _=require('lodash');var util=require('util');var logger=require('../../config/logger')(_0xbdf1('0x0'));var moment=require(_0xbdf1('0x1'));var BPromise=require(_0xbdf1('0x2'));var rp=require(_0xbdf1('0x3'));var fs=require('fs');var path=require(_0xbdf1('0x4'));var rimraf=require(_0xbdf1('0x5'));var config=require(_0xbdf1('0x6'));var attributes=require('./intVtigerField.attributes');module['exports']=function(_0x25c6fa,_0x500a46){return _0x25c6fa[_0xbdf1('0x7')](_0xbdf1('0x8'),attributes,{'tableName':_0xbdf1('0x9'),'paranoid':![],'indexes':[{'name':_0xbdf1('0xa'),'fields':[_0xbdf1('0xb'),_0xbdf1('0xc')],'unique':!![]}],'timestamps':!![]});}; \ No newline at end of file +var _0x9a6a=['exports','define','VtigerField','vtiger_unique_index','FieldId','lodash','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','./intVtigerField.attributes'];(function(_0x44f286,_0x3cdd90){var _0x5cd4d4=function(_0x5a90db){while(--_0x5a90db){_0x44f286['push'](_0x44f286['shift']());}};_0x5cd4d4(++_0x3cdd90);}(_0x9a6a,0x17f));var _0xa9a6=function(_0x4463b5,_0x482d3c){_0x4463b5=_0x4463b5-0x0;var _0x366461=_0x9a6a[_0x4463b5];return _0x366461;};'use strict';var _=require(_0xa9a6('0x0'));var util=require('util');var logger=require(_0xa9a6('0x1'))(_0xa9a6('0x2'));var moment=require('moment');var BPromise=require(_0xa9a6('0x3'));var rp=require(_0xa9a6('0x4'));var fs=require('fs');var path=require(_0xa9a6('0x5'));var rimraf=require(_0xa9a6('0x6'));var config=require(_0xa9a6('0x7'));var attributes=require(_0xa9a6('0x8'));module[_0xa9a6('0x9')]=function(_0x10b726,_0x98255c){return _0x10b726[_0xa9a6('0xa')](_0xa9a6('0xb'),attributes,{'tableName':'int_vtiger_fields','paranoid':![],'indexes':[{'name':_0xa9a6('0xc'),'fields':['idField',_0xa9a6('0xd')],'unique':!![]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intVtigerField/intVtigerField.rpc.js b/server/api/intVtigerField/intVtigerField.rpc.js index 67babb3..c11a1eb 100644 --- a/server/api/intVtigerField/intVtigerField.rpc.js +++ b/server/api/intVtigerField/intVtigerField.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x74a1=['../../config/environment','jayson/promise','client','http','request','then','info','VtigerField,\x20%s,\x20%s','VtigerField,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x4080f3,_0x18eb36){var _0x3314f5=function(_0x58d499){while(--_0x58d499){_0x4080f3['push'](_0x4080f3['shift']());}};_0x3314f5(++_0x18eb36);}(_0x74a1,0x7d));var _0x174a=function(_0x3d7315,_0x196ac3){_0x3d7315=_0x3d7315-0x0;var _0x42745e=_0x74a1[_0x3d7315];return _0x42745e;};'use strict';var _=require(_0x174a('0x0'));var util=require(_0x174a('0x1'));var moment=require(_0x174a('0x2'));var BPromise=require('bluebird');var rs=require(_0x174a('0x3'));var fs=require('fs');var Redis=require(_0x174a('0x4'));var db=require(_0x174a('0x5'))['db'];var utils=require(_0x174a('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0x174a('0x7'));var jayson=require(_0x174a('0x8'));var client=jayson[_0x174a('0x9')][_0x174a('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x29bef3,_0x538953,_0x1761e4){return new BPromise(function(_0x40cbc2,_0x356f26){return client[_0x174a('0xb')](_0x29bef3,_0x1761e4)[_0x174a('0xc')](function(_0x4dcc6f){logger[_0x174a('0xd')](_0x174a('0xe'),_0x538953,'request\x20sent');logger['debug'](_0x174a('0xf'),_0x538953,_0x174a('0x10'),JSON[_0x174a('0x11')](_0x4dcc6f));if(_0x4dcc6f[_0x174a('0x12')]){if(_0x4dcc6f[_0x174a('0x12')]['code']===0x1f4){logger[_0x174a('0x12')](_0x174a('0xe'),_0x538953,_0x4dcc6f[_0x174a('0x12')][_0x174a('0x13')]);return _0x356f26(_0x4dcc6f['error'][_0x174a('0x13')]);}logger['error'](_0x174a('0xe'),_0x538953,_0x4dcc6f[_0x174a('0x12')][_0x174a('0x13')]);return _0x40cbc2(_0x4dcc6f['error'][_0x174a('0x13')]);}else{logger[_0x174a('0xd')](_0x174a('0xe'),_0x538953,_0x174a('0x10'));_0x40cbc2(_0x4dcc6f[_0x174a('0x14')][_0x174a('0x13')]);}})[_0x174a('0x15')](function(_0x35afb2){logger['error'](_0x174a('0xe'),_0x538953,_0x35afb2);_0x356f26(_0x35afb2);});});} \ No newline at end of file +var _0x2bed=['randomstring','../../mysqldb','../../config/utils','rpc','jayson/promise','client','then','info','VtigerField,\x20%s,\x20%s','debug','VtigerField,\x20%s,\x20%s,\x20%s','request\x20sent','error','message','result','catch','lodash','util'];(function(_0x4dc0d9,_0x4f6443){var _0x3e44a8=function(_0x26d2fc){while(--_0x26d2fc){_0x4dc0d9['push'](_0x4dc0d9['shift']());}};_0x3e44a8(++_0x4f6443);}(_0x2bed,0x178));var _0xd2be=function(_0x4b0f29,_0x292f22){_0x4b0f29=_0x4b0f29-0x0;var _0x528e5b=_0x2bed[_0x4b0f29];return _0x528e5b;};'use strict';var _=require(_0xd2be('0x0'));var util=require(_0xd2be('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xd2be('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xd2be('0x3'))['db'];var utils=require(_0xd2be('0x4'));var logger=require('../../config/logger')(_0xd2be('0x5'));var config=require('../../config/environment');var jayson=require(_0xd2be('0x6'));var client=jayson[_0xd2be('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0x3d14ea,_0x2aad37,_0x3b21a5){return new BPromise(function(_0x442c70,_0x5360ba){return client['request'](_0x3d14ea,_0x3b21a5)[_0xd2be('0x8')](function(_0x1bf944){logger[_0xd2be('0x9')](_0xd2be('0xa'),_0x2aad37,'request\x20sent');logger[_0xd2be('0xb')](_0xd2be('0xc'),_0x2aad37,_0xd2be('0xd'),JSON['stringify'](_0x1bf944));if(_0x1bf944[_0xd2be('0xe')]){if(_0x1bf944['error']['code']===0x1f4){logger[_0xd2be('0xe')](_0xd2be('0xa'),_0x2aad37,_0x1bf944[_0xd2be('0xe')][_0xd2be('0xf')]);return _0x5360ba(_0x1bf944['error'][_0xd2be('0xf')]);}logger[_0xd2be('0xe')](_0xd2be('0xa'),_0x2aad37,_0x1bf944[_0xd2be('0xe')][_0xd2be('0xf')]);return _0x442c70(_0x1bf944['error'][_0xd2be('0xf')]);}else{logger[_0xd2be('0x9')](_0xd2be('0xa'),_0x2aad37,'request\x20sent');_0x442c70(_0x1bf944[_0xd2be('0x10')][_0xd2be('0xf')]);}})[_0xd2be('0x11')](function(_0x3d5a60){logger[_0xd2be('0xe')]('VtigerField,\x20%s,\x20%s',_0x2aad37,_0x3d5a60);_0x5360ba(_0x3d5a60);});});} \ No newline at end of file diff --git a/server/api/intZendeskAccount/index.js b/server/api/intZendeskAccount/index.js index 734934f..f19c63f 100644 --- a/server/api/intZendeskAccount/index.js +++ b/server/api/intZendeskAccount/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x14c5=['delete','destroy','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intZendeskAccount.controller','get','isAuthenticated','/:id','show','/:id/configurations','getConfigurations','/:id/fields','getFields','post','create','addConfiguration','update'];(function(_0x1034ca,_0x14ecd6){var _0x1a023a=function(_0x2cfa65){while(--_0x2cfa65){_0x1034ca['push'](_0x1034ca['shift']());}};_0x1a023a(++_0x14ecd6);}(_0x14c5,0x1de));var _0x514c=function(_0x18b9f4,_0x113c1c){_0x18b9f4=_0x18b9f4-0x0;var _0x59737c=_0x14c5[_0x18b9f4];return _0x59737c;};'use strict';var multer=require(_0x514c('0x0'));var util=require(_0x514c('0x1'));var path=require(_0x514c('0x2'));var timeout=require('connect-timeout');var express=require(_0x514c('0x3'));var router=express[_0x514c('0x4')]();var fs_extra=require(_0x514c('0x5'));var auth=require(_0x514c('0x6'));var interaction=require(_0x514c('0x7'));var config=require(_0x514c('0x8'));var controller=require(_0x514c('0x9'));router[_0x514c('0xa')]('/',auth[_0x514c('0xb')](),controller['index']);router[_0x514c('0xa')](_0x514c('0xc'),auth[_0x514c('0xb')](),controller[_0x514c('0xd')]);router[_0x514c('0xa')](_0x514c('0xe'),auth[_0x514c('0xb')](),controller[_0x514c('0xf')]);router['get'](_0x514c('0x10'),auth[_0x514c('0xb')](),controller[_0x514c('0x11')]);router[_0x514c('0x12')]('/',auth[_0x514c('0xb')](),controller[_0x514c('0x13')]);router[_0x514c('0x12')](_0x514c('0xe'),auth[_0x514c('0xb')](),controller[_0x514c('0x14')]);router['put'](_0x514c('0xc'),auth['isAuthenticated'](),controller[_0x514c('0x15')]);router[_0x514c('0x16')](_0x514c('0xc'),auth['isAuthenticated'](),controller[_0x514c('0x17')]);module[_0x514c('0x18')]=router; \ No newline at end of file +var _0x4f45=['express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/:id','show','/:id/configurations','getConfigurations','getFields','post','create','addConfiguration','put','delete','destroy','exports','util','connect-timeout'];(function(_0x285111,_0x5c101f){var _0x23151c=function(_0x5ca182){while(--_0x5ca182){_0x285111['push'](_0x285111['shift']());}};_0x23151c(++_0x5c101f);}(_0x4f45,0xcd));var _0x54f4=function(_0x1058fe,_0x3e5080){_0x1058fe=_0x1058fe-0x0;var _0x1632cc=_0x4f45[_0x1058fe];return _0x1632cc;};'use strict';var multer=require('multer');var util=require(_0x54f4('0x0'));var path=require('path');var timeout=require(_0x54f4('0x1'));var express=require(_0x54f4('0x2'));var router=express[_0x54f4('0x3')]();var fs_extra=require(_0x54f4('0x4'));var auth=require(_0x54f4('0x5'));var interaction=require(_0x54f4('0x6'));var config=require(_0x54f4('0x7'));var controller=require('./intZendeskAccount.controller');router[_0x54f4('0x8')]('/',auth[_0x54f4('0x9')](),controller[_0x54f4('0xa')]);router[_0x54f4('0x8')](_0x54f4('0xb'),auth['isAuthenticated'](),controller[_0x54f4('0xc')]);router[_0x54f4('0x8')](_0x54f4('0xd'),auth['isAuthenticated'](),controller[_0x54f4('0xe')]);router[_0x54f4('0x8')]('/:id/fields',auth['isAuthenticated'](),controller[_0x54f4('0xf')]);router[_0x54f4('0x10')]('/',auth['isAuthenticated'](),controller[_0x54f4('0x11')]);router[_0x54f4('0x10')](_0x54f4('0xd'),auth[_0x54f4('0x9')](),controller[_0x54f4('0x12')]);router[_0x54f4('0x13')](_0x54f4('0xb'),auth['isAuthenticated'](),controller['update']);router[_0x54f4('0x14')](_0x54f4('0xb'),auth[_0x54f4('0x9')](),controller[_0x54f4('0x15')]);module[_0x54f4('0x16')]=router; \ No newline at end of file diff --git a/server/api/intZendeskAccount/intZendeskAccount.attributes.js b/server/api/intZendeskAccount/intZendeskAccount.attributes.js index b71aa7c..7352aaa 100644 --- a/server/api/intZendeskAccount/intZendeskAccount.attributes.js +++ b/server/api/intZendeskAccount/intZendeskAccount.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4745=['exports','STRING','username','remoteUri','ENUM','password','integrationTab','sequelize'];(function(_0x5f12fd,_0x33c70d){var _0x58bd80=function(_0x515f56){while(--_0x515f56){_0x5f12fd['push'](_0x5f12fd['shift']());}};_0x58bd80(++_0x33c70d);}(_0x4745,0x1e7));var _0x5474=function(_0x387777,_0x356171){_0x387777=_0x387777-0x0;var _0x3f84c0=_0x4745[_0x387777];return _0x3f84c0;};'use strict';var Sequelize=require(_0x5474('0x0'));module[_0x5474('0x1')]={'name':{'type':Sequelize[_0x5474('0x2')]},'description':{'type':Sequelize[_0x5474('0x2')]},'username':{'type':Sequelize[_0x5474('0x2')],'unique':_0x5474('0x3')},'password':{'type':Sequelize[_0x5474('0x2')]},'token':{'type':Sequelize[_0x5474('0x2')]},'remoteUri':{'type':Sequelize[_0x5474('0x2')],'unique':_0x5474('0x4')},'authType':{'type':Sequelize[_0x5474('0x5')](_0x5474('0x6'),'token'),'defaultValue':_0x5474('0x6')},'serverUrl':{'type':Sequelize[_0x5474('0x2')],'allowNull':![]},'type':{'type':Sequelize['ENUM'](_0x5474('0x7'),'newTab'),'defaultValue':_0x5474('0x7')}}; \ No newline at end of file +var _0x14b2=['username','remoteUri','token','password','ENUM','integrationTab','newTab','sequelize','exports','STRING'];(function(_0x5ce781,_0x736b15){var _0xa70499=function(_0x48558b){while(--_0x48558b){_0x5ce781['push'](_0x5ce781['shift']());}};_0xa70499(++_0x736b15);}(_0x14b2,0x1a1));var _0x214b=function(_0x225203,_0x3500e9){_0x225203=_0x225203-0x0;var _0xb0b070=_0x14b2[_0x225203];return _0xb0b070;};'use strict';var Sequelize=require(_0x214b('0x0'));module[_0x214b('0x1')]={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x214b('0x2')]},'username':{'type':Sequelize[_0x214b('0x2')],'unique':_0x214b('0x3')},'password':{'type':Sequelize[_0x214b('0x2')]},'token':{'type':Sequelize['STRING']},'remoteUri':{'type':Sequelize[_0x214b('0x2')],'unique':_0x214b('0x4')},'authType':{'type':Sequelize['ENUM']('password',_0x214b('0x5')),'defaultValue':_0x214b('0x6')},'serverUrl':{'type':Sequelize[_0x214b('0x2')],'allowNull':![]},'type':{'type':Sequelize[_0x214b('0x7')](_0x214b('0x8'),_0x214b('0x9')),'defaultValue':'integrationTab'}}; \ No newline at end of file diff --git a/server/api/intZendeskAccount/intZendeskAccount.controller.js b/server/api/intZendeskAccount/intZendeskAccount.controller.js index fb43016..743b97b 100644 --- a/server/api/intZendeskAccount/intZendeskAccount.controller.js +++ b/server/api/intZendeskAccount/intZendeskAccount.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x06f9=['ZendeskField','getFields','username','password','token','remoteUri','substring','lastIndexOf','GET','%s/%s','ticket_fields','authType','headers','format','Basic\x20%s','%s:%s','toString','base64','%s/token:%s','Sequelize','ValidationError','Unknown\x20authentication\x20type','description','group','assignee','remove','includes','position','system_field_options','statusCode','getFields,\x20%s,\x20%s,\x20%s','Wrong\x20credentials','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','jayson/promise','http','request','then','info','ZendeskAccount,\x20%s,\x20%s','request\x20sent','debug','ZendeskAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','status','end','json','undefined','limit','offset','count','set','Content-Range','apply','reject','save','destroy','sendStatus','stack','name','send','map','ZendeskAccount','rawAttributes','fieldName','type','model','query','filters','intersection','attributes','fields','hasOwnProperty','sort','where','filter','VIRTUAL','merge','includeAll','include','findAll','rows','show','keys','length','find','create','update','body','params','getConfigurations','ZendeskConfiguration','nolimit','addConfiguration','findOne','AccountId','Subjects','channel','Descriptions'];(function(_0x1f67e7,_0x27349a){var _0x1f2cc5=function(_0x104728){while(--_0x104728){_0x1f67e7['push'](_0x1f67e7['shift']());}};_0x1f2cc5(++_0x27349a);}(_0x06f9,0x120));var _0x906f=function(_0x22f8ab,_0x15d8ff){_0x22f8ab=_0x22f8ab-0x0;var _0x2a70e5=_0x06f9[_0x22f8ab];return _0x2a70e5;};'use strict';var emlformat=require(_0x906f('0x0'));var rimraf=require(_0x906f('0x1'));var zipdir=require(_0x906f('0x2'));var jsonpatch=require(_0x906f('0x3'));var rp=require(_0x906f('0x4'));var moment=require(_0x906f('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x906f('0x6'));var util=require(_0x906f('0x7'));var path=require(_0x906f('0x8'));var sox=require(_0x906f('0x9'));var csv=require(_0x906f('0xa'));var ejs=require(_0x906f('0xb'));var fs=require('fs');var fs_extra=require(_0x906f('0xc'));var _=require(_0x906f('0xd'));var squel=require(_0x906f('0xe'));var crypto=require('crypto');var jsforce=require(_0x906f('0xf'));var deskjs=require(_0x906f('0x10'));var toCsv=require(_0x906f('0xa'));var querystring=require(_0x906f('0x11'));var Papa=require(_0x906f('0x12'));var Redis=require(_0x906f('0x13'));var authService=require(_0x906f('0x14'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x906f('0x15'));var logger=require(_0x906f('0x16'))(_0x906f('0x17'));var utils=require(_0x906f('0x18'));var config=require('../../config/environment');var licenseUtil=require(_0x906f('0x19'));var db=require('../../mysqldb')['db'];var integrations=require('../../components/integrations/configuration');var jayson=require(_0x906f('0x1a'));var client=jayson['client'][_0x906f('0x1b')]({'port':0x232a});function respondWithRpcPromise(_0x2ac03f,_0x315b42,_0x2220f3,_0x24df3e){return new BPromise(function(_0x161c36,_0x251ed4){var _0x447b62=_0x24df3e||client;return _0x447b62[_0x906f('0x1c')](_0x2ac03f,_0x2220f3)[_0x906f('0x1d')](function(_0x15e75c){logger[_0x906f('0x1e')](_0x906f('0x1f'),_0x315b42,_0x906f('0x20'));logger[_0x906f('0x21')](_0x906f('0x22'),_0x315b42,'request\x20sent',JSON[_0x906f('0x23')](_0x15e75c));if(_0x15e75c['error']){if(_0x15e75c[_0x906f('0x24')][_0x906f('0x25')]===0x1f4){logger[_0x906f('0x24')](_0x906f('0x1f'),_0x315b42,_0x15e75c[_0x906f('0x24')][_0x906f('0x26')]);return _0x251ed4(_0x15e75c[_0x906f('0x24')][_0x906f('0x26')]);}logger['error']('ZendeskAccount,\x20%s,\x20%s',_0x315b42,_0x15e75c[_0x906f('0x24')][_0x906f('0x26')]);return _0x161c36(_0x15e75c[_0x906f('0x24')][_0x906f('0x26')]);}else{logger['info'](_0x906f('0x1f'),_0x315b42,'request\x20sent');_0x161c36(_0x15e75c[_0x906f('0x27')][_0x906f('0x26')]);}})[_0x906f('0x28')](function(_0x5b7719){logger[_0x906f('0x24')]('ZendeskAccount,\x20%s,\x20%s',_0x315b42,_0x5b7719);_0x251ed4(_0x5b7719);});});}function respondWithStatusCode(_0x55af3d,_0x4f8ab2){_0x4f8ab2=_0x4f8ab2||0xcc;return function(_0x38cf37){if(_0x38cf37){return _0x55af3d['sendStatus'](_0x4f8ab2);}return _0x55af3d[_0x906f('0x29')](_0x4f8ab2)[_0x906f('0x2a')]();};}function respondWithResult(_0x4503bc,_0x19a777){_0x19a777=_0x19a777||0xc8;return function(_0x501ad9){if(_0x501ad9){return _0x4503bc['status'](_0x19a777)[_0x906f('0x2b')](_0x501ad9);}};}function respondWithFilteredResult(_0x42ba5b,_0x203ae3){return function(_0x56c735){if(_0x56c735){var _0x3100ab=typeof _0x203ae3['offset']===_0x906f('0x2c')&&typeof _0x203ae3[_0x906f('0x2d')]===_0x906f('0x2c');var _0x39b907=_0x56c735['count'];var _0x39c91d=_0x3100ab?0x0:_0x203ae3[_0x906f('0x2e')];var _0x30473a=_0x3100ab?_0x56c735[_0x906f('0x2f')]:_0x203ae3[_0x906f('0x2e')]+_0x203ae3[_0x906f('0x2d')];var _0x5d3696;if(_0x30473a>=_0x39b907){_0x30473a=_0x39b907;_0x5d3696=0xc8;}else{_0x5d3696=0xce;}_0x42ba5b[_0x906f('0x29')](_0x5d3696);return _0x42ba5b[_0x906f('0x30')](_0x906f('0x31'),_0x39c91d+'-'+_0x30473a+'/'+_0x39b907)['json'](_0x56c735);}return null;};}function patchUpdates(_0x4d9dab){return function(_0x4a2e00){try{jsonpatch[_0x906f('0x32')](_0x4a2e00,_0x4d9dab,!![]);}catch(_0x2b8c79){return BPromise[_0x906f('0x33')](_0x2b8c79);}return _0x4a2e00[_0x906f('0x34')]();};}function saveUpdates(_0x3b282f,_0x15d5b2){return function(_0x4df64f){if(_0x4df64f){return _0x4df64f['update'](_0x3b282f)[_0x906f('0x1d')](function(_0x5adbdc){return _0x5adbdc;});}return null;};}function removeEntity(_0x259b65,_0x57aeba){return function(_0x1a3208){if(_0x1a3208){return _0x1a3208[_0x906f('0x35')]()['then'](function(){_0x259b65[_0x906f('0x29')](0xcc)[_0x906f('0x2a')]();});}};}function handleEntityNotFound(_0x441cc9,_0x598438){return function(_0x11daa4){if(!_0x11daa4){_0x441cc9[_0x906f('0x36')](0x194);}return _0x11daa4;};}function handleError(_0x42ea71,_0x4434c7){_0x4434c7=_0x4434c7||0x1f4;return function(_0x216e9f){logger[_0x906f('0x24')](_0x216e9f[_0x906f('0x37')]);if(_0x216e9f[_0x906f('0x38')]){delete _0x216e9f[_0x906f('0x38')];}_0x42ea71['status'](_0x4434c7)[_0x906f('0x39')](_0x216e9f);};}exports['index']=function(_0x4e181a,_0x11c69b){var _0x1ad0c9={},_0x4bf9e8={},_0x5042fa={'count':0x0,'rows':[]};var _0x366cf8=_[_0x906f('0x3a')](db[_0x906f('0x3b')][_0x906f('0x3c')],function(_0x55108b){return{'name':_0x55108b[_0x906f('0x3d')],'type':_0x55108b[_0x906f('0x3e')]['key']};});_0x4bf9e8[_0x906f('0x3f')]=_[_0x906f('0x3a')](_0x366cf8,_0x906f('0x38'));_0x4bf9e8['query']=_['keys'](_0x4e181a[_0x906f('0x40')]);_0x4bf9e8[_0x906f('0x41')]=_[_0x906f('0x42')](_0x4bf9e8[_0x906f('0x3f')],_0x4bf9e8[_0x906f('0x40')]);_0x1ad0c9[_0x906f('0x43')]=_[_0x906f('0x42')](_0x4bf9e8[_0x906f('0x3f')],qs[_0x906f('0x44')](_0x4e181a[_0x906f('0x40')][_0x906f('0x44')]));_0x1ad0c9[_0x906f('0x43')]=_0x1ad0c9['attributes']['length']?_0x1ad0c9[_0x906f('0x43')]:_0x4bf9e8[_0x906f('0x3f')];if(!_0x4e181a[_0x906f('0x40')][_0x906f('0x45')]('nolimit')){_0x1ad0c9[_0x906f('0x2d')]=qs[_0x906f('0x2d')](_0x4e181a[_0x906f('0x40')]['limit']);_0x1ad0c9[_0x906f('0x2e')]=qs[_0x906f('0x2e')](_0x4e181a[_0x906f('0x40')][_0x906f('0x2e')]);}_0x1ad0c9['order']=qs[_0x906f('0x46')](_0x4e181a[_0x906f('0x40')]['sort']);_0x1ad0c9[_0x906f('0x47')]=qs[_0x906f('0x41')](_['pick'](_0x4e181a['query'],_0x4bf9e8['filters']),_0x366cf8);if(_0x4e181a['query'][_0x906f('0x48')]){_0x1ad0c9[_0x906f('0x47')]=_['merge'](_0x1ad0c9['where'],{'$or':_[_0x906f('0x3a')](_0x366cf8,function(_0x4dfa3c){if(_0x4dfa3c[_0x906f('0x3e')]!==_0x906f('0x49')){var _0x3ac8cb={};_0x3ac8cb[_0x4dfa3c[_0x906f('0x38')]]={'$like':'%'+_0x4e181a[_0x906f('0x40')][_0x906f('0x48')]+'%'};return _0x3ac8cb;}})});}_0x1ad0c9=_[_0x906f('0x4a')]({},_0x1ad0c9,_0x4e181a['options']);var _0x1440e5={'where':_0x1ad0c9[_0x906f('0x47')]};return db['ZendeskAccount'][_0x906f('0x2f')](_0x1440e5)[_0x906f('0x1d')](function(_0x3c1cef){_0x5042fa[_0x906f('0x2f')]=_0x3c1cef;if(_0x4e181a[_0x906f('0x40')][_0x906f('0x4b')]){_0x1ad0c9[_0x906f('0x4c')]=[{'all':!![]}];}return db[_0x906f('0x3b')][_0x906f('0x4d')](_0x1ad0c9);})[_0x906f('0x1d')](function(_0x1e9f4c){_0x5042fa[_0x906f('0x4e')]=_0x1e9f4c;return _0x5042fa;})[_0x906f('0x1d')](respondWithFilteredResult(_0x11c69b,_0x1ad0c9))[_0x906f('0x28')](handleError(_0x11c69b,null));};exports[_0x906f('0x4f')]=function(_0x455a44,_0x3b8073){var _0x4db22b={'raw':![],'where':{'id':_0x455a44['params']['id']}},_0x3b8002={};_0x3b8002[_0x906f('0x3f')]=_[_0x906f('0x50')](db[_0x906f('0x3b')][_0x906f('0x3c')]);_0x3b8002[_0x906f('0x40')]=_[_0x906f('0x50')](_0x455a44[_0x906f('0x40')]);_0x3b8002['filters']=_[_0x906f('0x42')](_0x3b8002[_0x906f('0x3f')],_0x3b8002[_0x906f('0x40')]);_0x4db22b[_0x906f('0x43')]=_[_0x906f('0x42')](_0x3b8002['model'],qs[_0x906f('0x44')](_0x455a44[_0x906f('0x40')][_0x906f('0x44')]));_0x4db22b[_0x906f('0x43')]=_0x4db22b[_0x906f('0x43')][_0x906f('0x51')]?_0x4db22b[_0x906f('0x43')]:_0x3b8002['model'];if(_0x455a44['query'][_0x906f('0x4b')]){_0x4db22b['include']=[{'all':!![]}];}_0x4db22b=_[_0x906f('0x4a')]({},_0x4db22b,_0x455a44['options']);return db[_0x906f('0x3b')][_0x906f('0x52')](_0x4db22b)[_0x906f('0x1d')](handleEntityNotFound(_0x3b8073,null))[_0x906f('0x1d')](respondWithResult(_0x3b8073,null))[_0x906f('0x28')](handleError(_0x3b8073,null));};exports[_0x906f('0x53')]=function(_0x5c1155,_0x5eb3e9){return db[_0x906f('0x3b')][_0x906f('0x53')](_0x5c1155['body'],{})[_0x906f('0x1d')](respondWithResult(_0x5eb3e9,0xc9))[_0x906f('0x28')](handleError(_0x5eb3e9,null));};exports[_0x906f('0x54')]=function(_0x16ef36,_0x73f893){if(_0x16ef36[_0x906f('0x55')]['id']){delete _0x16ef36[_0x906f('0x55')]['id'];}return db[_0x906f('0x3b')][_0x906f('0x52')]({'where':{'id':_0x16ef36[_0x906f('0x56')]['id']}})[_0x906f('0x1d')](handleEntityNotFound(_0x73f893,null))[_0x906f('0x1d')](saveUpdates(_0x16ef36[_0x906f('0x55')],null))[_0x906f('0x1d')](respondWithResult(_0x73f893,null))[_0x906f('0x28')](handleError(_0x73f893,null));};exports['destroy']=function(_0x252742,_0x1b91ae){return db[_0x906f('0x3b')]['find']({'where':{'id':_0x252742[_0x906f('0x56')]['id']}})[_0x906f('0x1d')](handleEntityNotFound(_0x1b91ae,null))[_0x906f('0x1d')](removeEntity(_0x1b91ae,null))[_0x906f('0x28')](handleError(_0x1b91ae,null));};exports[_0x906f('0x57')]=function(_0x503fe9,_0x5e0752,_0x7c38db){var _0x11be50={};var _0x36899e={};var _0x40a4cd;var _0xaba54e;return db[_0x906f('0x3b')]['findOne']({'where':{'id':_0x503fe9[_0x906f('0x56')]['id']}})[_0x906f('0x1d')](handleEntityNotFound(_0x5e0752,null))['then'](function(_0x36ee5a){if(_0x36ee5a){_0x40a4cd=_0x36ee5a;_0x36899e[_0x906f('0x3f')]=_[_0x906f('0x50')](db[_0x906f('0x58')][_0x906f('0x3c')]);_0x36899e[_0x906f('0x40')]=_['keys'](_0x503fe9[_0x906f('0x40')]);_0x36899e[_0x906f('0x41')]=_[_0x906f('0x42')](_0x36899e[_0x906f('0x3f')],_0x36899e[_0x906f('0x40')]);_0x11be50['attributes']=_[_0x906f('0x42')](_0x36899e[_0x906f('0x3f')],qs[_0x906f('0x44')](_0x503fe9['query']['fields']));_0x11be50[_0x906f('0x43')]=_0x11be50[_0x906f('0x43')][_0x906f('0x51')]?_0x11be50[_0x906f('0x43')]:_0x36899e[_0x906f('0x3f')];_0x11be50['order']=qs['sort'](_0x503fe9[_0x906f('0x40')][_0x906f('0x46')]);_0x11be50[_0x906f('0x47')]=qs[_0x906f('0x41')](_['pick'](_0x503fe9['query'],_0x36899e[_0x906f('0x41')]));if(_0x503fe9[_0x906f('0x40')]['filter']){_0x11be50[_0x906f('0x47')]=_[_0x906f('0x4a')](_0x11be50[_0x906f('0x47')],{'$or':_['map'](_0x11be50[_0x906f('0x43')],function(_0x5eb70f){var _0xcc4c52={};_0xcc4c52[_0x5eb70f]={'$like':'%'+_0x503fe9['query'][_0x906f('0x48')]+'%'};return _0xcc4c52;})});}_0x11be50=_['merge']({},_0x11be50,_0x503fe9['options']);return _0x40a4cd[_0x906f('0x57')](_0x11be50);}})[_0x906f('0x1d')](function(_0x3e3461){if(_0x3e3461){_0xaba54e=_0x3e3461['length'];if(!_0x503fe9[_0x906f('0x40')][_0x906f('0x45')](_0x906f('0x59'))){_0x11be50['limit']=qs[_0x906f('0x2d')](_0x503fe9['query'][_0x906f('0x2d')]);_0x11be50[_0x906f('0x2e')]=qs['offset'](_0x503fe9[_0x906f('0x40')][_0x906f('0x2e')]);}return _0x40a4cd[_0x906f('0x57')](_0x11be50);}})[_0x906f('0x1d')](function(_0x51bc1f){if(_0x51bc1f){return _0x51bc1f?{'count':_0xaba54e,'rows':_0x51bc1f}:null;}})[_0x906f('0x1d')](respondWithResult(_0x5e0752,null))[_0x906f('0x28')](handleError(_0x5e0752,null));};exports[_0x906f('0x5a')]=function(_0x557d8d,_0x21406c,_0x1c6ccc){if(_0x557d8d[_0x906f('0x55')]['id']){delete _0x557d8d[_0x906f('0x55')]['id'];}return db[_0x906f('0x3b')][_0x906f('0x5b')]({'where':{'id':_0x557d8d[_0x906f('0x56')]['id']}})['then'](handleEntityNotFound(_0x21406c,null))['then'](function(_0x2ceec0){if(_0x2ceec0){_0x557d8d[_0x906f('0x55')][_0x906f('0x5c')]=_0x2ceec0['id'];_0x557d8d[_0x906f('0x55')][_0x906f('0x5d')]=integrations['getSubjects'](_0x557d8d[_0x906f('0x55')][_0x906f('0x5e')],_0x557d8d[_0x906f('0x55')][_0x906f('0x3e')]);_0x557d8d['body'][_0x906f('0x5f')]=integrations['getDescriptions'](_0x557d8d['body'][_0x906f('0x5e')],_0x557d8d[_0x906f('0x55')][_0x906f('0x3e')]);return db[_0x906f('0x58')][_0x906f('0x53')](_0x557d8d[_0x906f('0x55')],{'include':[{'model':db[_0x906f('0x60')],'as':_0x906f('0x5d')},{'model':db[_0x906f('0x60')],'as':_0x906f('0x5f')}]});}return null;})[_0x906f('0x1d')](respondWithResult(_0x21406c,null))[_0x906f('0x28')](handleError(_0x21406c,null));};exports[_0x906f('0x61')]=function(_0x11a778,_0x410551,_0x159dbf){var _0x564c3b='';return db['ZendeskAccount'][_0x906f('0x5b')]({'where':{'id':_0x11a778[_0x906f('0x56')]['id']},'attributes':['id',_0x906f('0x62'),_0x906f('0x63'),_0x906f('0x64'),'authType',_0x906f('0x65')]})[_0x906f('0x1d')](handleEntityNotFound(_0x410551,null))[_0x906f('0x1d')](function(_0x2b720a){if(_0x2b720a){_0x564c3b=_0x2b720a[_0x906f('0x65')];var _0x45737c=_0x564c3b['slice'](-0x1);if(_0x45737c==='/'){_0x564c3b=_0x564c3b[_0x906f('0x66')](0x0,_0x564c3b[_0x906f('0x67')](_0x45737c));}var _0x305292={'method':_0x906f('0x68'),'uri':util['format'](_0x906f('0x69'),_0x564c3b,_0x906f('0x6a')),'json':!![]};switch(_0x2b720a[_0x906f('0x6b')]){case'password':_0x305292[_0x906f('0x6c')]={'Authorization':util[_0x906f('0x6d')](_0x906f('0x6e'),new Buffer(util[_0x906f('0x6d')](_0x906f('0x6f'),_0x2b720a[_0x906f('0x62')],_0x2b720a[_0x906f('0x63')]))[_0x906f('0x70')](_0x906f('0x71')))};break;case _0x906f('0x64'):_0x305292[_0x906f('0x6c')]={'Authorization':util[_0x906f('0x6d')](_0x906f('0x6e'),new Buffer(util[_0x906f('0x6d')](_0x906f('0x72'),_0x2b720a[_0x906f('0x62')],_0x2b720a[_0x906f('0x64')]))['toString']('base64'))};break;default:throw new db[(_0x906f('0x73'))][(_0x906f('0x74'))](_0x906f('0x75'));}return rp(_0x305292);}})[_0x906f('0x1d')](function(_0x3a004b){if(_0x3a004b){var _0x594262=['subject',_0x906f('0x76'),_0x906f('0x77'),_0x906f('0x78')];_[_0x906f('0x79')](_0x3a004b['ticket_fields'],function(_0x51e900){return _0x594262[_0x906f('0x7a')](_0x51e900[_0x906f('0x3e')]);});return{'count':_0x3a004b[_0x906f('0x6a')][_0x906f('0x51')],'rows':_[_0x906f('0x3a')](_0x3a004b['ticket_fields'],function(_0x521714){return{'id':_0x521714['id'],'name':_0x521714[_0x906f('0x7b')]>0x7?_0x521714['title']:_0x521714[_0x906f('0x3e')],'custom':_0x521714['position']>0x7?!![]:![],'options':_0x521714[_0x906f('0x7c')]?_0x521714[_0x906f('0x7c')]:_0x521714['custom_field_options']?_0x521714['custom_field_options']:[]};})};}})[_0x906f('0x1d')](respondWithResult(_0x410551,null))[_0x906f('0x28')](function(_0x179ccf){var _0x3f8a64=_0x11a778['query']['test']?0x1f4:_0x179ccf[_0x906f('0x7d')]||0x1f4;logger['error'](_0x906f('0x7e'),_0x906f('0x61'),_0x3f8a64,JSON[_0x906f('0x23')](_0x179ccf));delete _0x179ccf[_0x906f('0x38')];if(_0x3f8a64===0x191){_0x3f8a64=0x190;}_0x410551[_0x906f('0x29')](_0x3f8a64)[_0x906f('0x39')](_0x11a778[_0x906f('0x40')]['test']?{'message':_0x906f('0x7f'),'statusCode':_0x179ccf[_0x906f('0x7d')]}:_0x179ccf);});}; \ No newline at end of file +var _0x4b88=['ejs','fs-extra','lodash','squel','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../components/integrations/configuration','jayson/promise','then','info','debug','ZendeskAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','ZendeskAccount,\x20%s,\x20%s','request\x20sent','status','json','undefined','count','offset','limit','set','apply','reject','save','update','destroy','end','sendStatus','stack','index','ZendeskAccount','rawAttributes','fieldName','type','model','map','name','query','keys','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','where','filters','filter','merge','options','include','findAll','rows','catch','show','params','includeAll','find','create','body','getConfigurations','findOne','ZendeskConfiguration','sort','pick','Subjects','getSubjects','channel','Descriptions','getDescriptions','ZendeskField','getFields','username','password','authType','slice','substring','GET','format','%s/%s','ticket_fields','headers','Basic\x20%s','%s:%s','toString','base64','token','%s/token:%s','ValidationError','subject','description','assignee','position','system_field_options','statusCode','getFields,\x20%s,\x20%s,\x20%s','send','test','Wrong\x20credentials','eml-format','rimraf','zip-dir','request-promise','mustache','path','sox','to-csv'];(function(_0xf33e03,_0x3611b2){var _0x847bea=function(_0x4d852f){while(--_0x4d852f){_0xf33e03['push'](_0xf33e03['shift']());}};_0x847bea(++_0x3611b2);}(_0x4b88,0x70));var _0x84b8=function(_0x2da0f9,_0x1b5b8d){_0x2da0f9=_0x2da0f9-0x0;var _0x29a0f9=_0x4b88[_0x2da0f9];return _0x29a0f9;};'use strict';var emlformat=require(_0x84b8('0x0'));var rimraf=require(_0x84b8('0x1'));var zipdir=require(_0x84b8('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x84b8('0x3'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x84b8('0x4'));var util=require('util');var path=require(_0x84b8('0x5'));var sox=require(_0x84b8('0x6'));var csv=require(_0x84b8('0x7'));var ejs=require(_0x84b8('0x8'));var fs=require('fs');var fs_extra=require(_0x84b8('0x9'));var _=require(_0x84b8('0xa'));var squel=require(_0x84b8('0xb'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x84b8('0xc'));var toCsv=require(_0x84b8('0x7'));var querystring=require(_0x84b8('0xd'));var Papa=require(_0x84b8('0xe'));var Redis=require(_0x84b8('0xf'));var authService=require(_0x84b8('0x10'));var qs=require(_0x84b8('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x84b8('0x12'));var logger=require(_0x84b8('0x13'))(_0x84b8('0x14'));var utils=require(_0x84b8('0x15'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];var integrations=require(_0x84b8('0x16'));var jayson=require(_0x84b8('0x17'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x5789b2,_0xb5dffe,_0x570108,_0x4743d3){return new BPromise(function(_0xdcd74c,_0x2ad7ee){var _0x5c2701=_0x4743d3||client;return _0x5c2701['request'](_0x5789b2,_0x570108)[_0x84b8('0x18')](function(_0x2f9d16){logger[_0x84b8('0x19')]('ZendeskAccount,\x20%s,\x20%s',_0xb5dffe,'request\x20sent');logger[_0x84b8('0x1a')](_0x84b8('0x1b'),_0xb5dffe,'request\x20sent',JSON[_0x84b8('0x1c')](_0x2f9d16));if(_0x2f9d16[_0x84b8('0x1d')]){if(_0x2f9d16['error'][_0x84b8('0x1e')]===0x1f4){logger[_0x84b8('0x1d')]('ZendeskAccount,\x20%s,\x20%s',_0xb5dffe,_0x2f9d16[_0x84b8('0x1d')][_0x84b8('0x1f')]);return _0x2ad7ee(_0x2f9d16[_0x84b8('0x1d')][_0x84b8('0x1f')]);}logger[_0x84b8('0x1d')](_0x84b8('0x20'),_0xb5dffe,_0x2f9d16['error']['message']);return _0xdcd74c(_0x2f9d16[_0x84b8('0x1d')][_0x84b8('0x1f')]);}else{logger[_0x84b8('0x19')](_0x84b8('0x20'),_0xb5dffe,_0x84b8('0x21'));_0xdcd74c(_0x2f9d16['result'][_0x84b8('0x1f')]);}})['catch'](function(_0x9358d1){logger[_0x84b8('0x1d')]('ZendeskAccount,\x20%s,\x20%s',_0xb5dffe,_0x9358d1);_0x2ad7ee(_0x9358d1);});});}function respondWithStatusCode(_0x5aa913,_0x561e84){_0x561e84=_0x561e84||0xcc;return function(_0x17e43e){if(_0x17e43e){return _0x5aa913['sendStatus'](_0x561e84);}return _0x5aa913[_0x84b8('0x22')](_0x561e84)['end']();};}function respondWithResult(_0x166754,_0x3bbecd){_0x3bbecd=_0x3bbecd||0xc8;return function(_0x4e8fc2){if(_0x4e8fc2){return _0x166754[_0x84b8('0x22')](_0x3bbecd)[_0x84b8('0x23')](_0x4e8fc2);}};}function respondWithFilteredResult(_0x19aa2d,_0x1794bd){return function(_0x4dbc00){if(_0x4dbc00){var _0x26f4e1=typeof _0x1794bd['offset']===_0x84b8('0x24')&&typeof _0x1794bd['limit']==='undefined';var _0x3f9afd=_0x4dbc00[_0x84b8('0x25')];var _0x5a60fe=_0x26f4e1?0x0:_0x1794bd['offset'];var _0x1f010e=_0x26f4e1?_0x4dbc00[_0x84b8('0x25')]:_0x1794bd[_0x84b8('0x26')]+_0x1794bd[_0x84b8('0x27')];var _0x430c63;if(_0x1f010e>=_0x3f9afd){_0x1f010e=_0x3f9afd;_0x430c63=0xc8;}else{_0x430c63=0xce;}_0x19aa2d[_0x84b8('0x22')](_0x430c63);return _0x19aa2d[_0x84b8('0x28')]('Content-Range',_0x5a60fe+'-'+_0x1f010e+'/'+_0x3f9afd)['json'](_0x4dbc00);}return null;};}function patchUpdates(_0x5184b0){return function(_0x225144){try{jsonpatch[_0x84b8('0x29')](_0x225144,_0x5184b0,!![]);}catch(_0x5a3ecc){return BPromise[_0x84b8('0x2a')](_0x5a3ecc);}return _0x225144[_0x84b8('0x2b')]();};}function saveUpdates(_0xee8a7c,_0x1680ba){return function(_0x11af0d){if(_0x11af0d){return _0x11af0d[_0x84b8('0x2c')](_0xee8a7c)[_0x84b8('0x18')](function(_0x3100dc){return _0x3100dc;});}return null;};}function removeEntity(_0x446326,_0x1a2c13){return function(_0x16e0d5){if(_0x16e0d5){return _0x16e0d5[_0x84b8('0x2d')]()[_0x84b8('0x18')](function(){_0x446326[_0x84b8('0x22')](0xcc)[_0x84b8('0x2e')]();});}};}function handleEntityNotFound(_0x28c846,_0x1f9a15){return function(_0x148879){if(!_0x148879){_0x28c846[_0x84b8('0x2f')](0x194);}return _0x148879;};}function handleError(_0x4fcf8c,_0x1751e0){_0x1751e0=_0x1751e0||0x1f4;return function(_0x2919b9){logger['error'](_0x2919b9[_0x84b8('0x30')]);if(_0x2919b9['name']){delete _0x2919b9['name'];}_0x4fcf8c[_0x84b8('0x22')](_0x1751e0)['send'](_0x2919b9);};}exports[_0x84b8('0x31')]=function(_0x4616fc,_0x7dd244){var _0x51e01f={},_0x6664a1={},_0x5542dd={'count':0x0,'rows':[]};var _0x1974a6=_['map'](db[_0x84b8('0x32')][_0x84b8('0x33')],function(_0x5d1b8f){return{'name':_0x5d1b8f[_0x84b8('0x34')],'type':_0x5d1b8f[_0x84b8('0x35')]['key']};});_0x6664a1[_0x84b8('0x36')]=_[_0x84b8('0x37')](_0x1974a6,_0x84b8('0x38'));_0x6664a1[_0x84b8('0x39')]=_[_0x84b8('0x3a')](_0x4616fc[_0x84b8('0x39')]);_0x6664a1['filters']=_[_0x84b8('0x3b')](_0x6664a1[_0x84b8('0x36')],_0x6664a1['query']);_0x51e01f[_0x84b8('0x3c')]=_[_0x84b8('0x3b')](_0x6664a1[_0x84b8('0x36')],qs[_0x84b8('0x3d')](_0x4616fc[_0x84b8('0x39')][_0x84b8('0x3d')]));_0x51e01f[_0x84b8('0x3c')]=_0x51e01f[_0x84b8('0x3c')][_0x84b8('0x3e')]?_0x51e01f[_0x84b8('0x3c')]:_0x6664a1[_0x84b8('0x36')];if(!_0x4616fc[_0x84b8('0x39')][_0x84b8('0x3f')](_0x84b8('0x40'))){_0x51e01f[_0x84b8('0x27')]=qs[_0x84b8('0x27')](_0x4616fc[_0x84b8('0x39')][_0x84b8('0x27')]);_0x51e01f['offset']=qs['offset'](_0x4616fc[_0x84b8('0x39')][_0x84b8('0x26')]);}_0x51e01f[_0x84b8('0x41')]=qs['sort'](_0x4616fc[_0x84b8('0x39')]['sort']);_0x51e01f[_0x84b8('0x42')]=qs[_0x84b8('0x43')](_['pick'](_0x4616fc[_0x84b8('0x39')],_0x6664a1[_0x84b8('0x43')]),_0x1974a6);if(_0x4616fc[_0x84b8('0x39')][_0x84b8('0x44')]){_0x51e01f['where']=_[_0x84b8('0x45')](_0x51e01f[_0x84b8('0x42')],{'$or':_[_0x84b8('0x37')](_0x1974a6,function(_0x3d2d4b){if(_0x3d2d4b['type']!=='VIRTUAL'){var _0x4f49b4={};_0x4f49b4[_0x3d2d4b[_0x84b8('0x38')]]={'$like':'%'+_0x4616fc['query'][_0x84b8('0x44')]+'%'};return _0x4f49b4;}})});}_0x51e01f=_[_0x84b8('0x45')]({},_0x51e01f,_0x4616fc[_0x84b8('0x46')]);var _0x25d075={'where':_0x51e01f['where']};return db[_0x84b8('0x32')][_0x84b8('0x25')](_0x25d075)['then'](function(_0x37d97a){_0x5542dd[_0x84b8('0x25')]=_0x37d97a;if(_0x4616fc[_0x84b8('0x39')]['includeAll']){_0x51e01f[_0x84b8('0x47')]=[{'all':!![]}];}return db['ZendeskAccount'][_0x84b8('0x48')](_0x51e01f);})[_0x84b8('0x18')](function(_0x2acf6){_0x5542dd[_0x84b8('0x49')]=_0x2acf6;return _0x5542dd;})[_0x84b8('0x18')](respondWithFilteredResult(_0x7dd244,_0x51e01f))[_0x84b8('0x4a')](handleError(_0x7dd244,null));};exports[_0x84b8('0x4b')]=function(_0x26cd12,_0x33bb25){var _0x34e144={'raw':![],'where':{'id':_0x26cd12[_0x84b8('0x4c')]['id']}},_0x3fa668={};_0x3fa668[_0x84b8('0x36')]=_[_0x84b8('0x3a')](db[_0x84b8('0x32')]['rawAttributes']);_0x3fa668['query']=_['keys'](_0x26cd12['query']);_0x3fa668[_0x84b8('0x43')]=_[_0x84b8('0x3b')](_0x3fa668[_0x84b8('0x36')],_0x3fa668['query']);_0x34e144[_0x84b8('0x3c')]=_['intersection'](_0x3fa668['model'],qs['fields'](_0x26cd12[_0x84b8('0x39')][_0x84b8('0x3d')]));_0x34e144[_0x84b8('0x3c')]=_0x34e144[_0x84b8('0x3c')][_0x84b8('0x3e')]?_0x34e144[_0x84b8('0x3c')]:_0x3fa668['model'];if(_0x26cd12['query'][_0x84b8('0x4d')]){_0x34e144[_0x84b8('0x47')]=[{'all':!![]}];}_0x34e144=_[_0x84b8('0x45')]({},_0x34e144,_0x26cd12[_0x84b8('0x46')]);return db[_0x84b8('0x32')][_0x84b8('0x4e')](_0x34e144)['then'](handleEntityNotFound(_0x33bb25,null))[_0x84b8('0x18')](respondWithResult(_0x33bb25,null))[_0x84b8('0x4a')](handleError(_0x33bb25,null));};exports[_0x84b8('0x4f')]=function(_0x5f3e5f,_0x54882a){return db[_0x84b8('0x32')][_0x84b8('0x4f')](_0x5f3e5f[_0x84b8('0x50')],{})[_0x84b8('0x18')](respondWithResult(_0x54882a,0xc9))[_0x84b8('0x4a')](handleError(_0x54882a,null));};exports[_0x84b8('0x2c')]=function(_0x559070,_0x229434){if(_0x559070[_0x84b8('0x50')]['id']){delete _0x559070['body']['id'];}return db[_0x84b8('0x32')][_0x84b8('0x4e')]({'where':{'id':_0x559070['params']['id']}})['then'](handleEntityNotFound(_0x229434,null))[_0x84b8('0x18')](saveUpdates(_0x559070['body'],null))[_0x84b8('0x18')](respondWithResult(_0x229434,null))[_0x84b8('0x4a')](handleError(_0x229434,null));};exports[_0x84b8('0x2d')]=function(_0x166890,_0x197801){return db[_0x84b8('0x32')][_0x84b8('0x4e')]({'where':{'id':_0x166890[_0x84b8('0x4c')]['id']}})[_0x84b8('0x18')](handleEntityNotFound(_0x197801,null))[_0x84b8('0x18')](removeEntity(_0x197801,null))[_0x84b8('0x4a')](handleError(_0x197801,null));};exports[_0x84b8('0x51')]=function(_0x4f1702,_0x3f6da2,_0x44863e){var _0xcd4599={};var _0x8168d4={};var _0x5378df;var _0x4135d9;return db[_0x84b8('0x32')][_0x84b8('0x52')]({'where':{'id':_0x4f1702['params']['id']}})[_0x84b8('0x18')](handleEntityNotFound(_0x3f6da2,null))[_0x84b8('0x18')](function(_0x18d567){if(_0x18d567){_0x5378df=_0x18d567;_0x8168d4['model']=_['keys'](db[_0x84b8('0x53')][_0x84b8('0x33')]);_0x8168d4[_0x84b8('0x39')]=_['keys'](_0x4f1702[_0x84b8('0x39')]);_0x8168d4['filters']=_['intersection'](_0x8168d4['model'],_0x8168d4[_0x84b8('0x39')]);_0xcd4599[_0x84b8('0x3c')]=_['intersection'](_0x8168d4['model'],qs[_0x84b8('0x3d')](_0x4f1702[_0x84b8('0x39')]['fields']));_0xcd4599[_0x84b8('0x3c')]=_0xcd4599['attributes'][_0x84b8('0x3e')]?_0xcd4599['attributes']:_0x8168d4[_0x84b8('0x36')];_0xcd4599[_0x84b8('0x41')]=qs[_0x84b8('0x54')](_0x4f1702['query']['sort']);_0xcd4599[_0x84b8('0x42')]=qs[_0x84b8('0x43')](_[_0x84b8('0x55')](_0x4f1702[_0x84b8('0x39')],_0x8168d4[_0x84b8('0x43')]));if(_0x4f1702[_0x84b8('0x39')][_0x84b8('0x44')]){_0xcd4599[_0x84b8('0x42')]=_[_0x84b8('0x45')](_0xcd4599['where'],{'$or':_[_0x84b8('0x37')](_0xcd4599[_0x84b8('0x3c')],function(_0x28d865){var _0xc7bb90={};_0xc7bb90[_0x28d865]={'$like':'%'+_0x4f1702[_0x84b8('0x39')]['filter']+'%'};return _0xc7bb90;})});}_0xcd4599=_['merge']({},_0xcd4599,_0x4f1702[_0x84b8('0x46')]);return _0x5378df[_0x84b8('0x51')](_0xcd4599);}})[_0x84b8('0x18')](function(_0x3bf454){if(_0x3bf454){_0x4135d9=_0x3bf454[_0x84b8('0x3e')];if(!_0x4f1702[_0x84b8('0x39')][_0x84b8('0x3f')](_0x84b8('0x40'))){_0xcd4599['limit']=qs['limit'](_0x4f1702[_0x84b8('0x39')][_0x84b8('0x27')]);_0xcd4599[_0x84b8('0x26')]=qs[_0x84b8('0x26')](_0x4f1702['query'][_0x84b8('0x26')]);}return _0x5378df[_0x84b8('0x51')](_0xcd4599);}})[_0x84b8('0x18')](function(_0x1ae856){if(_0x1ae856){return _0x1ae856?{'count':_0x4135d9,'rows':_0x1ae856}:null;}})[_0x84b8('0x18')](respondWithResult(_0x3f6da2,null))[_0x84b8('0x4a')](handleError(_0x3f6da2,null));};exports['addConfiguration']=function(_0x221649,_0x424c3c,_0x35c54b){if(_0x221649[_0x84b8('0x50')]['id']){delete _0x221649['body']['id'];}return db['ZendeskAccount']['findOne']({'where':{'id':_0x221649[_0x84b8('0x4c')]['id']}})['then'](handleEntityNotFound(_0x424c3c,null))[_0x84b8('0x18')](function(_0x5582f8){if(_0x5582f8){_0x221649['body']['AccountId']=_0x5582f8['id'];_0x221649[_0x84b8('0x50')][_0x84b8('0x56')]=integrations[_0x84b8('0x57')](_0x221649[_0x84b8('0x50')][_0x84b8('0x58')],_0x221649[_0x84b8('0x50')][_0x84b8('0x35')]);_0x221649[_0x84b8('0x50')][_0x84b8('0x59')]=integrations[_0x84b8('0x5a')](_0x221649[_0x84b8('0x50')][_0x84b8('0x58')],_0x221649[_0x84b8('0x50')][_0x84b8('0x35')]);return db[_0x84b8('0x53')][_0x84b8('0x4f')](_0x221649[_0x84b8('0x50')],{'include':[{'model':db[_0x84b8('0x5b')],'as':_0x84b8('0x56')},{'model':db[_0x84b8('0x5b')],'as':'Descriptions'}]});}return null;})[_0x84b8('0x18')](respondWithResult(_0x424c3c,null))['catch'](handleError(_0x424c3c,null));};exports[_0x84b8('0x5c')]=function(_0x2f4114,_0x5b48e5,_0x2c1639){var _0x57269a='';return db[_0x84b8('0x32')][_0x84b8('0x52')]({'where':{'id':_0x2f4114['params']['id']},'attributes':['id',_0x84b8('0x5d'),_0x84b8('0x5e'),'token',_0x84b8('0x5f'),'remoteUri']})[_0x84b8('0x18')](handleEntityNotFound(_0x5b48e5,null))['then'](function(_0x2be8ee){if(_0x2be8ee){_0x57269a=_0x2be8ee['remoteUri'];var _0x531237=_0x57269a[_0x84b8('0x60')](-0x1);if(_0x531237==='/'){_0x57269a=_0x57269a[_0x84b8('0x61')](0x0,_0x57269a['lastIndexOf'](_0x531237));}var _0x36688b={'method':_0x84b8('0x62'),'uri':util[_0x84b8('0x63')](_0x84b8('0x64'),_0x57269a,_0x84b8('0x65')),'json':!![]};switch(_0x2be8ee[_0x84b8('0x5f')]){case _0x84b8('0x5e'):_0x36688b[_0x84b8('0x66')]={'Authorization':util[_0x84b8('0x63')](_0x84b8('0x67'),new Buffer(util[_0x84b8('0x63')](_0x84b8('0x68'),_0x2be8ee['username'],_0x2be8ee[_0x84b8('0x5e')]))[_0x84b8('0x69')](_0x84b8('0x6a')))};break;case _0x84b8('0x6b'):_0x36688b[_0x84b8('0x66')]={'Authorization':util['format'](_0x84b8('0x67'),new Buffer(util['format'](_0x84b8('0x6c'),_0x2be8ee[_0x84b8('0x5d')],_0x2be8ee[_0x84b8('0x6b')]))[_0x84b8('0x69')](_0x84b8('0x6a')))};break;default:throw new db['Sequelize'][(_0x84b8('0x6d'))]('Unknown\x20authentication\x20type');}return rp(_0x36688b);}})[_0x84b8('0x18')](function(_0x231f42){if(_0x231f42){var _0x4ade03=[_0x84b8('0x6e'),_0x84b8('0x6f'),'group',_0x84b8('0x70')];_['remove'](_0x231f42['ticket_fields'],function(_0x47cd1c){return _0x4ade03['includes'](_0x47cd1c[_0x84b8('0x35')]);});return{'count':_0x231f42[_0x84b8('0x65')][_0x84b8('0x3e')],'rows':_['map'](_0x231f42[_0x84b8('0x65')],function(_0x4d167b){return{'id':_0x4d167b['id'],'name':_0x4d167b[_0x84b8('0x71')]>0x7?_0x4d167b['title']:_0x4d167b[_0x84b8('0x35')],'custom':_0x4d167b[_0x84b8('0x71')]>0x7?!![]:![],'options':_0x4d167b['system_field_options']?_0x4d167b[_0x84b8('0x72')]:_0x4d167b['custom_field_options']?_0x4d167b['custom_field_options']:[]};})};}})[_0x84b8('0x18')](respondWithResult(_0x5b48e5,null))[_0x84b8('0x4a')](function(_0x563db5){var _0x1c63f8=_0x2f4114[_0x84b8('0x39')]['test']?0x1f4:_0x563db5[_0x84b8('0x73')]||0x1f4;logger[_0x84b8('0x1d')](_0x84b8('0x74'),_0x84b8('0x5c'),_0x1c63f8,JSON['stringify'](_0x563db5));delete _0x563db5[_0x84b8('0x38')];if(_0x1c63f8===0x191){_0x1c63f8=0x190;}_0x5b48e5[_0x84b8('0x22')](_0x1c63f8)[_0x84b8('0x75')](_0x2f4114[_0x84b8('0x39')][_0x84b8('0x76')]?{'message':_0x84b8('0x77'),'statusCode':_0x563db5['statusCode']}:_0x563db5);});}; \ No newline at end of file diff --git a/server/api/intZendeskAccount/intZendeskAccount.model.js b/server/api/intZendeskAccount/intZendeskAccount.model.js index 6859bae..3276d47 100644 --- a/server/api/intZendeskAccount/intZendeskAccount.model.js +++ b/server/api/intZendeskAccount/intZendeskAccount.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe565=['lodash','../../config/logger','api','bluebird','request-promise','rimraf','../../config/environment','exports','define','ZendeskAccount','int_zendesk_accounts'];(function(_0xc4001c,_0x1bf8f0){var _0x49f7bc=function(_0x1059b8){while(--_0x1059b8){_0xc4001c['push'](_0xc4001c['shift']());}};_0x49f7bc(++_0x1bf8f0);}(_0xe565,0x113));var _0x5e56=function(_0x49de67,_0x408ea1){_0x49de67=_0x49de67-0x0;var _0x4d260d=_0xe565[_0x49de67];return _0x4d260d;};'use strict';var _=require(_0x5e56('0x0'));var util=require('util');var logger=require(_0x5e56('0x1'))(_0x5e56('0x2'));var moment=require('moment');var BPromise=require(_0x5e56('0x3'));var rp=require(_0x5e56('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x5e56('0x5'));var config=require(_0x5e56('0x6'));var attributes=require('./intZendeskAccount.attributes');var integrations=require('../../components/integrations/configuration');module[_0x5e56('0x7')]=function(_0x5c0099,_0x18a053){return _0x5c0099[_0x5e56('0x8')](_0x5e56('0x9'),attributes,{'tableName':_0x5e56('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x7ff7=['api','bluebird','request-promise','path','rimraf','./intZendeskAccount.attributes','../../components/integrations/configuration','exports','define','ZendeskAccount','int_zendesk_accounts','lodash','util','../../config/logger'];(function(_0x1facfa,_0x1acf7d){var _0x9ec701=function(_0x115e37){while(--_0x115e37){_0x1facfa['push'](_0x1facfa['shift']());}};_0x9ec701(++_0x1acf7d);}(_0x7ff7,0x1d9));var _0x77ff=function(_0x4553d2,_0xe4a0ff){_0x4553d2=_0x4553d2-0x0;var _0x176f24=_0x7ff7[_0x4553d2];return _0x176f24;};'use strict';var _=require(_0x77ff('0x0'));var util=require(_0x77ff('0x1'));var logger=require(_0x77ff('0x2'))(_0x77ff('0x3'));var moment=require('moment');var BPromise=require(_0x77ff('0x4'));var rp=require(_0x77ff('0x5'));var fs=require('fs');var path=require(_0x77ff('0x6'));var rimraf=require(_0x77ff('0x7'));var config=require('../../config/environment');var attributes=require(_0x77ff('0x8'));var integrations=require(_0x77ff('0x9'));module[_0x77ff('0xa')]=function(_0x3353e8,_0x2994c8){return _0x3353e8[_0x77ff('0xb')](_0x77ff('0xc'),attributes,{'tableName':_0x77ff('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intZendeskAccount/intZendeskAccount.rpc.js b/server/api/intZendeskAccount/intZendeskAccount.rpc.js index 74c963d..858141d 100644 --- a/server/api/intZendeskAccount/intZendeskAccount.rpc.js +++ b/server/api/intZendeskAccount/intZendeskAccount.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2ee5=['client','http','request','ZendeskAccount,\x20%s,\x20%s','ZendeskAccount,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','info','result','catch','GetZendeskAccount','ZendeskAccount','findAll','options','raw','where','attributes','include','map','model','then','ShowZendeskAccount','debug','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment'];(function(_0x31085f,_0x4ea194){var _0x109639=function(_0x430b0b){while(--_0x430b0b){_0x31085f['push'](_0x31085f['shift']());}};_0x109639(++_0x4ea194);}(_0x2ee5,0x14b));var _0x52ee=function(_0x56310b,_0x3ef42b){_0x56310b=_0x56310b-0x0;var _0x5b6948=_0x2ee5[_0x56310b];return _0x5b6948;};'use strict';var _=require(_0x52ee('0x0'));var util=require(_0x52ee('0x1'));var moment=require('moment');var BPromise=require(_0x52ee('0x2'));var rs=require(_0x52ee('0x3'));var fs=require('fs');var Redis=require(_0x52ee('0x4'));var db=require(_0x52ee('0x5'))['db'];var utils=require(_0x52ee('0x6'));var logger=require('../../config/logger')(_0x52ee('0x7'));var config=require(_0x52ee('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x52ee('0x9')][_0x52ee('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x525134,_0x445ef2,_0x18bbbe){return new BPromise(function(_0x172a64,_0x5d558d){return client[_0x52ee('0xb')](_0x525134,_0x18bbbe)['then'](function(_0x56b557){logger['info'](_0x52ee('0xc'),_0x445ef2,'request\x20sent');logger['debug'](_0x52ee('0xd'),_0x445ef2,_0x52ee('0xe'),JSON[_0x52ee('0xf')](_0x56b557));if(_0x56b557['error']){if(_0x56b557['error']['code']===0x1f4){logger[_0x52ee('0x10')](_0x52ee('0xc'),_0x445ef2,_0x56b557[_0x52ee('0x10')][_0x52ee('0x11')]);return _0x5d558d(_0x56b557[_0x52ee('0x10')]['message']);}logger[_0x52ee('0x10')](_0x52ee('0xc'),_0x445ef2,_0x56b557[_0x52ee('0x10')][_0x52ee('0x11')]);return _0x172a64(_0x56b557[_0x52ee('0x10')]['message']);}else{logger[_0x52ee('0x12')](_0x52ee('0xc'),_0x445ef2,_0x52ee('0xe'));_0x172a64(_0x56b557[_0x52ee('0x13')][_0x52ee('0x11')]);}})[_0x52ee('0x14')](function(_0x37a5ea){logger['error']('ZendeskAccount,\x20%s,\x20%s',_0x445ef2,_0x37a5ea);_0x5d558d(_0x37a5ea);});});}exports[_0x52ee('0x15')]=function(_0x30ce7b){var _0x4dadab=this;return new Promise(function(_0x47baaa,_0x5f148c){return db[_0x52ee('0x16')][_0x52ee('0x17')]({'raw':_0x30ce7b['options']?_0x30ce7b[_0x52ee('0x18')][_0x52ee('0x19')]===undefined?!![]:![]:!![],'where':_0x30ce7b[_0x52ee('0x18')]?_0x30ce7b['options'][_0x52ee('0x1a')]||null:null,'attributes':_0x30ce7b[_0x52ee('0x18')]?_0x30ce7b[_0x52ee('0x18')][_0x52ee('0x1b')]||null:null,'limit':_0x30ce7b[_0x52ee('0x18')]?_0x30ce7b[_0x52ee('0x18')]['limit']||null:null,'include':_0x30ce7b[_0x52ee('0x18')]?_0x30ce7b[_0x52ee('0x18')][_0x52ee('0x1c')]?_[_0x52ee('0x1d')](_0x30ce7b[_0x52ee('0x18')][_0x52ee('0x1c')],function(_0x9c255c){return{'model':db[_0x9c255c[_0x52ee('0x1e')]],'as':_0x9c255c['as'],'attributes':_0x9c255c[_0x52ee('0x1b')],'include':_0x9c255c[_0x52ee('0x1c')]?_['map'](_0x9c255c[_0x52ee('0x1c')],function(_0x1ad8e3){return{'model':db[_0x1ad8e3[_0x52ee('0x1e')]],'as':_0x1ad8e3['as'],'attributes':_0x1ad8e3[_0x52ee('0x1b')],'include':_0x1ad8e3[_0x52ee('0x1c')]?_['map'](_0x1ad8e3[_0x52ee('0x1c')],function(_0x2565b7){return{'model':db[_0x2565b7[_0x52ee('0x1e')]],'as':_0x2565b7['as'],'attributes':_0x2565b7['attributes']};}):[]};}):[]};}):[]:[]})[_0x52ee('0x1f')](function(_0x50cad6){logger[_0x52ee('0x12')]('GetZendeskAccount',_0x30ce7b);logger['debug'](_0x52ee('0x15'),_0x30ce7b,JSON[_0x52ee('0xf')](_0x50cad6));_0x47baaa(_0x50cad6);})['catch'](function(_0xae39ef){logger['error'](_0x52ee('0x15'),_0xae39ef[_0x52ee('0x11')],_0x30ce7b);_0x5f148c(_0x4dadab[_0x52ee('0x10')](0x1f4,_0xae39ef[_0x52ee('0x11')]));});});};exports[_0x52ee('0x20')]=function(_0x551442){var _0x5885cb=this;return new Promise(function(_0x201133,_0x1c5d8e){return db[_0x52ee('0x16')]['find']({'raw':_0x551442[_0x52ee('0x18')]?_0x551442[_0x52ee('0x18')][_0x52ee('0x19')]===undefined?!![]:![]:!![],'where':_0x551442[_0x52ee('0x18')]?_0x551442[_0x52ee('0x18')]['where']||null:null,'attributes':_0x551442['options']?_0x551442[_0x52ee('0x18')][_0x52ee('0x1b')]||null:null,'include':_0x551442[_0x52ee('0x18')]?_0x551442[_0x52ee('0x18')][_0x52ee('0x1c')]?_[_0x52ee('0x1d')](_0x551442[_0x52ee('0x18')]['include'],function(_0x5f37f9){return{'model':db[_0x5f37f9['model']],'as':_0x5f37f9['as'],'attributes':_0x5f37f9['attributes'],'include':_0x5f37f9[_0x52ee('0x1c')]?_[_0x52ee('0x1d')](_0x5f37f9[_0x52ee('0x1c')],function(_0x10a56e){return{'model':db[_0x10a56e[_0x52ee('0x1e')]],'as':_0x10a56e['as'],'attributes':_0x10a56e['attributes'],'include':_0x10a56e['include']?_[_0x52ee('0x1d')](_0x10a56e[_0x52ee('0x1c')],function(_0x1ef26b){return{'model':db[_0x1ef26b[_0x52ee('0x1e')]],'as':_0x1ef26b['as'],'attributes':_0x1ef26b[_0x52ee('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x52ee('0x1f')](function(_0x4ffe3a){logger['info'](_0x52ee('0x20'),_0x551442);logger[_0x52ee('0x21')]('ShowZendeskAccount',_0x551442,JSON[_0x52ee('0xf')](_0x4ffe3a));_0x201133(_0x4ffe3a);})[_0x52ee('0x14')](function(_0x3fd14e){logger[_0x52ee('0x10')](_0x52ee('0x20'),_0x3fd14e[_0x52ee('0x11')],_0x551442);_0x1c5d8e(_0x5885cb[_0x52ee('0x10')](0x1f4,_0x3fd14e[_0x52ee('0x11')]));});});}; \ No newline at end of file +var _0x76d3=['ZendeskAccount,\x20%s,\x20%s','request\x20sent','ZendeskAccount,\x20%s,\x20%s,\x20%s','error','code','message','catch','GetZendeskAccount','ZendeskAccount','findAll','options','raw','where','limit','map','include','attributes','model','debug','stringify','ShowZendeskAccount','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','http','request','then','info'];(function(_0x4851ef,_0x3f4b07){var _0x38c3fe=function(_0x40578f){while(--_0x40578f){_0x4851ef['push'](_0x4851ef['shift']());}};_0x38c3fe(++_0x3f4b07);}(_0x76d3,0x12d));var _0x376d=function(_0x4c12ec,_0x2e9103){_0x4c12ec=_0x4c12ec-0x0;var _0x3ae42c=_0x76d3[_0x4c12ec];return _0x3ae42c;};'use strict';var _=require('lodash');var util=require(_0x376d('0x0'));var moment=require(_0x376d('0x1'));var BPromise=require(_0x376d('0x2'));var rs=require(_0x376d('0x3'));var fs=require('fs');var Redis=require(_0x376d('0x4'));var db=require(_0x376d('0x5'))['db'];var utils=require(_0x376d('0x6'));var logger=require('../../config/logger')(_0x376d('0x7'));var config=require(_0x376d('0x8'));var jayson=require(_0x376d('0x9'));var client=jayson['client'][_0x376d('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x39aa77,_0x403dfd,_0x57e6d5){return new BPromise(function(_0x420c32,_0x268800){return client[_0x376d('0xb')](_0x39aa77,_0x57e6d5)[_0x376d('0xc')](function(_0x5dd75b){logger[_0x376d('0xd')](_0x376d('0xe'),_0x403dfd,_0x376d('0xf'));logger['debug'](_0x376d('0x10'),_0x403dfd,_0x376d('0xf'),JSON['stringify'](_0x5dd75b));if(_0x5dd75b[_0x376d('0x11')]){if(_0x5dd75b[_0x376d('0x11')][_0x376d('0x12')]===0x1f4){logger[_0x376d('0x11')](_0x376d('0xe'),_0x403dfd,_0x5dd75b[_0x376d('0x11')][_0x376d('0x13')]);return _0x268800(_0x5dd75b[_0x376d('0x11')][_0x376d('0x13')]);}logger[_0x376d('0x11')](_0x376d('0xe'),_0x403dfd,_0x5dd75b[_0x376d('0x11')][_0x376d('0x13')]);return _0x420c32(_0x5dd75b[_0x376d('0x11')][_0x376d('0x13')]);}else{logger[_0x376d('0xd')](_0x376d('0xe'),_0x403dfd,_0x376d('0xf'));_0x420c32(_0x5dd75b['result'][_0x376d('0x13')]);}})[_0x376d('0x14')](function(_0x26c4ee){logger[_0x376d('0x11')](_0x376d('0xe'),_0x403dfd,_0x26c4ee);_0x268800(_0x26c4ee);});});}exports[_0x376d('0x15')]=function(_0x59db6c){var _0x399419=this;return new Promise(function(_0x60510b,_0x68b164){return db[_0x376d('0x16')][_0x376d('0x17')]({'raw':_0x59db6c[_0x376d('0x18')]?_0x59db6c[_0x376d('0x18')][_0x376d('0x19')]===undefined?!![]:![]:!![],'where':_0x59db6c[_0x376d('0x18')]?_0x59db6c[_0x376d('0x18')][_0x376d('0x1a')]||null:null,'attributes':_0x59db6c[_0x376d('0x18')]?_0x59db6c['options']['attributes']||null:null,'limit':_0x59db6c[_0x376d('0x18')]?_0x59db6c[_0x376d('0x18')][_0x376d('0x1b')]||null:null,'include':_0x59db6c[_0x376d('0x18')]?_0x59db6c['options']['include']?_[_0x376d('0x1c')](_0x59db6c['options'][_0x376d('0x1d')],function(_0x5c0f91){return{'model':db[_0x5c0f91['model']],'as':_0x5c0f91['as'],'attributes':_0x5c0f91[_0x376d('0x1e')],'include':_0x5c0f91[_0x376d('0x1d')]?_[_0x376d('0x1c')](_0x5c0f91[_0x376d('0x1d')],function(_0x48cb8a){return{'model':db[_0x48cb8a['model']],'as':_0x48cb8a['as'],'attributes':_0x48cb8a['attributes'],'include':_0x48cb8a[_0x376d('0x1d')]?_[_0x376d('0x1c')](_0x48cb8a[_0x376d('0x1d')],function(_0x27eb31){return{'model':db[_0x27eb31[_0x376d('0x1f')]],'as':_0x27eb31['as'],'attributes':_0x27eb31['attributes']};}):[]};}):[]};}):[]:[]})[_0x376d('0xc')](function(_0x587793){logger[_0x376d('0xd')]('GetZendeskAccount',_0x59db6c);logger[_0x376d('0x20')](_0x376d('0x15'),_0x59db6c,JSON[_0x376d('0x21')](_0x587793));_0x60510b(_0x587793);})[_0x376d('0x14')](function(_0x211c46){logger[_0x376d('0x11')](_0x376d('0x15'),_0x211c46[_0x376d('0x13')],_0x59db6c);_0x68b164(_0x399419['error'](0x1f4,_0x211c46[_0x376d('0x13')]));});});};exports[_0x376d('0x22')]=function(_0x186bbe){var _0x48b4ef=this;return new Promise(function(_0x499e7d,_0x3dc236){return db['ZendeskAccount']['find']({'raw':_0x186bbe[_0x376d('0x18')]?_0x186bbe[_0x376d('0x18')]['raw']===undefined?!![]:![]:!![],'where':_0x186bbe['options']?_0x186bbe['options']['where']||null:null,'attributes':_0x186bbe[_0x376d('0x18')]?_0x186bbe[_0x376d('0x18')]['attributes']||null:null,'include':_0x186bbe[_0x376d('0x18')]?_0x186bbe[_0x376d('0x18')][_0x376d('0x1d')]?_[_0x376d('0x1c')](_0x186bbe[_0x376d('0x18')][_0x376d('0x1d')],function(_0x5da98b){return{'model':db[_0x5da98b['model']],'as':_0x5da98b['as'],'attributes':_0x5da98b[_0x376d('0x1e')],'include':_0x5da98b['include']?_['map'](_0x5da98b['include'],function(_0x2912ff){return{'model':db[_0x2912ff[_0x376d('0x1f')]],'as':_0x2912ff['as'],'attributes':_0x2912ff[_0x376d('0x1e')],'include':_0x2912ff[_0x376d('0x1d')]?_[_0x376d('0x1c')](_0x2912ff['include'],function(_0x51eae0){return{'model':db[_0x51eae0[_0x376d('0x1f')]],'as':_0x51eae0['as'],'attributes':_0x51eae0['attributes']};}):[]};}):[]};}):[]:[]})[_0x376d('0xc')](function(_0x84a729){logger[_0x376d('0xd')]('ShowZendeskAccount',_0x186bbe);logger['debug'](_0x376d('0x22'),_0x186bbe,JSON['stringify'](_0x84a729));_0x499e7d(_0x84a729);})[_0x376d('0x14')](function(_0x4db5c){logger[_0x376d('0x11')](_0x376d('0x22'),_0x4db5c[_0x376d('0x13')],_0x186bbe);_0x3dc236(_0x48b4ef['error'](0x1f4,_0x4db5c[_0x376d('0x13')]));});});}; \ No newline at end of file diff --git a/server/api/intZendeskConfiguration/index.js b/server/api/intZendeskConfiguration/index.js index 7ea3619..5e6c848 100644 --- a/server/api/intZendeskConfiguration/index.js +++ b/server/api/intZendeskConfiguration/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0713=['/:id/subjects','getSubjects','getDescriptions','/:id/tags','post','setTags','update','delete','destroy','exports','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./intZendeskConfiguration.controller','get','isAuthenticated','index','/:id','show','/:id/fields'];(function(_0x1a0d4f,_0x5141ef){var _0x42b23e=function(_0x4cb0a2){while(--_0x4cb0a2){_0x1a0d4f['push'](_0x1a0d4f['shift']());}};_0x42b23e(++_0x5141ef);}(_0x0713,0x1ba));var _0x3071=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0713[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x3071('0x0'));var timeout=require(_0x3071('0x1'));var express=require(_0x3071('0x2'));var router=express[_0x3071('0x3')]();var fs_extra=require(_0x3071('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x3071('0x5'));var config=require(_0x3071('0x6'));var controller=require(_0x3071('0x7'));router[_0x3071('0x8')]('/',auth[_0x3071('0x9')](),controller[_0x3071('0xa')]);router[_0x3071('0x8')](_0x3071('0xb'),auth[_0x3071('0x9')](),controller[_0x3071('0xc')]);router[_0x3071('0x8')](_0x3071('0xd'),auth[_0x3071('0x9')](),controller['getFields']);router[_0x3071('0x8')](_0x3071('0xe'),auth[_0x3071('0x9')](),controller[_0x3071('0xf')]);router[_0x3071('0x8')]('/:id/descriptions',auth[_0x3071('0x9')](),controller[_0x3071('0x10')]);router[_0x3071('0x8')](_0x3071('0x11'),auth[_0x3071('0x9')](),controller['getTags']);router['post']('/',auth[_0x3071('0x9')](),controller['create']);router[_0x3071('0x12')](_0x3071('0x11'),auth['isAuthenticated'](),controller[_0x3071('0x13')]);router['put'](_0x3071('0xb'),auth[_0x3071('0x9')](),controller[_0x3071('0x14')]);router[_0x3071('0x15')](_0x3071('0xb'),auth[_0x3071('0x9')](),controller[_0x3071('0x16')]);module[_0x3071('0x17')]=router; \ No newline at end of file +var _0xa571=['util','path','connect-timeout','Router','fs-extra','../../config/environment','get','isAuthenticated','index','/:id','/:id/fields','/:id/subjects','getSubjects','/:id/descriptions','getDescriptions','getTags','post','create','put','update','exports','multer'];(function(_0x4a544c,_0x5c86f0){var _0x5cbb49=function(_0x5ad503){while(--_0x5ad503){_0x4a544c['push'](_0x4a544c['shift']());}};_0x5cbb49(++_0x5c86f0);}(_0xa571,0x107));var _0x1a57=function(_0x3a457e,_0x48b643){_0x3a457e=_0x3a457e-0x0;var _0x11a6a5=_0xa571[_0x3a457e];return _0x11a6a5;};'use strict';var multer=require(_0x1a57('0x0'));var util=require(_0x1a57('0x1'));var path=require(_0x1a57('0x2'));var timeout=require(_0x1a57('0x3'));var express=require('express');var router=express[_0x1a57('0x4')]();var fs_extra=require(_0x1a57('0x5'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x1a57('0x6'));var controller=require('./intZendeskConfiguration.controller');router[_0x1a57('0x7')]('/',auth[_0x1a57('0x8')](),controller[_0x1a57('0x9')]);router[_0x1a57('0x7')](_0x1a57('0xa'),auth[_0x1a57('0x8')](),controller['show']);router[_0x1a57('0x7')](_0x1a57('0xb'),auth[_0x1a57('0x8')](),controller['getFields']);router[_0x1a57('0x7')](_0x1a57('0xc'),auth[_0x1a57('0x8')](),controller[_0x1a57('0xd')]);router[_0x1a57('0x7')](_0x1a57('0xe'),auth[_0x1a57('0x8')](),controller[_0x1a57('0xf')]);router['get']('/:id/tags',auth[_0x1a57('0x8')](),controller[_0x1a57('0x10')]);router[_0x1a57('0x11')]('/',auth['isAuthenticated'](),controller[_0x1a57('0x12')]);router[_0x1a57('0x11')]('/:id/tags',auth[_0x1a57('0x8')](),controller['setTags']);router[_0x1a57('0x13')](_0x1a57('0xa'),auth[_0x1a57('0x8')](),controller[_0x1a57('0x14')]);router['delete'](_0x1a57('0xa'),auth['isAuthenticated'](),controller['destroy']);module[_0x1a57('0x15')]=router; \ No newline at end of file diff --git a/server/api/intZendeskConfiguration/intZendeskConfiguration.attributes.js b/server/api/intZendeskConfiguration/intZendeskConfiguration.attributes.js index a0e38eb..56f5bb0 100644 --- a/server/api/intZendeskConfiguration/intZendeskConfiguration.attributes.js +++ b/server/api/intZendeskConfiguration/intZendeskConfiguration.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe516=['exports'];(function(_0x3a4bdd,_0x86f01e){var _0x3ffe07=function(_0x4523a5){while(--_0x4523a5){_0x3a4bdd['push'](_0x3a4bdd['shift']());}};_0x3ffe07(++_0x86f01e);}(_0xe516,0x1c2));var _0x6e51=function(_0x56b138,_0x2396d6){_0x56b138=_0x56b138-0x0;var _0x3df878=_0xe516[_0x56b138];return _0x3df878;};'use strict';var Sequelize=require('sequelize');module[_0x6e51('0x0')]={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize['STRING']}}; \ No newline at end of file +var _0x30ab=['exports','STRING'];(function(_0x472ee2,_0x295444){var _0x18387b=function(_0x320611){while(--_0x320611){_0x472ee2['push'](_0x472ee2['shift']());}};_0x18387b(++_0x295444);}(_0x30ab,0x9e));var _0xb30a=function(_0x1fecc4,_0x44c613){_0x1fecc4=_0x1fecc4-0x0;var _0x5cd204=_0x30ab[_0x1fecc4];return _0x5cd204;};'use strict';var Sequelize=require('sequelize');module[_0xb30a('0x0')]={'name':{'type':Sequelize[_0xb30a('0x1')]},'description':{'type':Sequelize[_0xb30a('0x1')]}}; \ No newline at end of file diff --git a/server/api/intZendeskConfiguration/intZendeskConfiguration.controller.js b/server/api/intZendeskConfiguration/intZendeskConfiguration.controller.js index f6a2b85..6acf734 100644 --- a/server/api/intZendeskConfiguration/intZendeskConfiguration.controller.js +++ b/server/api/intZendeskConfiguration/intZendeskConfiguration.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x53c9=['Tag','setTags','ids','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','ejs','fs-extra','crypto','jsforce','desk.js','querystring','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','jayson/promise','client','http','request','then','info','ZendeskConfiguration,\x20%s,\x20%s','request\x20sent','debug','ZendeskConfiguration,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','status','end','offset','undefined','count','limit','set','Content-Range','json','reject','destroy','sendStatus','stack','name','send','map','ZendeskConfiguration','rawAttributes','type','key','model','query','filters','intersection','fields','length','attributes','hasOwnProperty','nolimit','sort','where','pick','merge','filter','options','includeAll','include','findAll','rows','show','params','keys','find','create','body','getFields','findOne','ZendeskField','order','getSubjects','getTags'];(function(_0x4fe705,_0xf42d4e){var _0x2f5bd7=function(_0x3d20d1){while(--_0x3d20d1){_0x4fe705['push'](_0x4fe705['shift']());}};_0x2f5bd7(++_0xf42d4e);}(_0x53c9,0xb7));var _0x953c=function(_0x5e343c,_0x5d5c6a){_0x5e343c=_0x5e343c-0x0;var _0x497243=_0x53c9[_0x5e343c];return _0x497243;};'use strict';var emlformat=require(_0x953c('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x953c('0x1'));var jsonpatch=require(_0x953c('0x2'));var rp=require(_0x953c('0x3'));var moment=require(_0x953c('0x4'));var BPromise=require(_0x953c('0x5'));var Mustache=require('mustache');var util=require(_0x953c('0x6'));var path=require('path');var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x953c('0x7'));var fs=require('fs');var fs_extra=require(_0x953c('0x8'));var _=require('lodash');var squel=require('squel');var crypto=require(_0x953c('0x9'));var jsforce=require(_0x953c('0xa'));var deskjs=require(_0x953c('0xb'));var toCsv=require('to-csv');var querystring=require(_0x953c('0xc'));var Papa=require('papaparse');var Redis=require(_0x953c('0xd'));var authService=require('../../components/auth/service');var qs=require(_0x953c('0xe'));var as=require(_0x953c('0xf'));var hardwareService=require(_0x953c('0x10'));var logger=require('../../config/logger')(_0x953c('0x11'));var utils=require(_0x953c('0x12'));var config=require(_0x953c('0x13'));var licenseUtil=require('../../config/license/util');var db=require(_0x953c('0x14'))['db'];var jayson=require(_0x953c('0x15'));var client=jayson[_0x953c('0x16')][_0x953c('0x17')]({'port':0x232a});function respondWithRpcPromise(_0xd27e50,_0x1dc785,_0x4eb7b7,_0x2594f8){return new BPromise(function(_0x56033a,_0x51e9ba){var _0x286e0c=_0x2594f8||client;return _0x286e0c[_0x953c('0x18')](_0xd27e50,_0x4eb7b7)[_0x953c('0x19')](function(_0x50f90a){logger[_0x953c('0x1a')](_0x953c('0x1b'),_0x1dc785,_0x953c('0x1c'));logger[_0x953c('0x1d')](_0x953c('0x1e'),_0x1dc785,'request\x20sent',JSON['stringify'](_0x50f90a));if(_0x50f90a['error']){if(_0x50f90a[_0x953c('0x1f')][_0x953c('0x20')]===0x1f4){logger[_0x953c('0x1f')](_0x953c('0x1b'),_0x1dc785,_0x50f90a[_0x953c('0x1f')][_0x953c('0x21')]);return _0x51e9ba(_0x50f90a['error']['message']);}logger['error'](_0x953c('0x1b'),_0x1dc785,_0x50f90a[_0x953c('0x1f')][_0x953c('0x21')]);return _0x56033a(_0x50f90a['error']['message']);}else{logger[_0x953c('0x1a')](_0x953c('0x1b'),_0x1dc785,'request\x20sent');_0x56033a(_0x50f90a[_0x953c('0x22')][_0x953c('0x21')]);}})[_0x953c('0x23')](function(_0x1411d9){logger[_0x953c('0x1f')]('ZendeskConfiguration,\x20%s,\x20%s',_0x1dc785,_0x1411d9);_0x51e9ba(_0x1411d9);});});}function respondWithStatusCode(_0x19d9b5,_0x107e97){_0x107e97=_0x107e97||0xcc;return function(_0x536963){if(_0x536963){return _0x19d9b5['sendStatus'](_0x107e97);}return _0x19d9b5[_0x953c('0x24')](_0x107e97)[_0x953c('0x25')]();};}function respondWithResult(_0x2691df,_0x45231d){_0x45231d=_0x45231d||0xc8;return function(_0x56838b){if(_0x56838b){return _0x2691df[_0x953c('0x24')](_0x45231d)['json'](_0x56838b);}};}function respondWithFilteredResult(_0x3e2a3c,_0x41b81a){return function(_0x358a6f){if(_0x358a6f){var _0x25bc63=typeof _0x41b81a[_0x953c('0x26')]===_0x953c('0x27')&&typeof _0x41b81a['limit']==='undefined';var _0x3a0e2b=_0x358a6f[_0x953c('0x28')];var _0x2faeca=_0x25bc63?0x0:_0x41b81a[_0x953c('0x26')];var _0x4312fe=_0x25bc63?_0x358a6f[_0x953c('0x28')]:_0x41b81a[_0x953c('0x26')]+_0x41b81a[_0x953c('0x29')];var _0x3ed6c5;if(_0x4312fe>=_0x3a0e2b){_0x4312fe=_0x3a0e2b;_0x3ed6c5=0xc8;}else{_0x3ed6c5=0xce;}_0x3e2a3c[_0x953c('0x24')](_0x3ed6c5);return _0x3e2a3c[_0x953c('0x2a')](_0x953c('0x2b'),_0x2faeca+'-'+_0x4312fe+'/'+_0x3a0e2b)[_0x953c('0x2c')](_0x358a6f);}return null;};}function patchUpdates(_0x46f121){return function(_0x10e6dc){try{jsonpatch['apply'](_0x10e6dc,_0x46f121,!![]);}catch(_0x1f562a){return BPromise[_0x953c('0x2d')](_0x1f562a);}return _0x10e6dc['save']();};}function saveUpdates(_0x5682c0,_0x1274a2){return function(_0x168cbf){if(_0x168cbf){return _0x168cbf['update'](_0x5682c0)[_0x953c('0x19')](function(_0x1c3f7a){return _0x1c3f7a;});}return null;};}function removeEntity(_0x389f37,_0x159a19){return function(_0x57ea43){if(_0x57ea43){return _0x57ea43[_0x953c('0x2e')]()[_0x953c('0x19')](function(){_0x389f37[_0x953c('0x24')](0xcc)[_0x953c('0x25')]();});}};}function handleEntityNotFound(_0x539cf1,_0x2ef52a){return function(_0x337ba6){if(!_0x337ba6){_0x539cf1[_0x953c('0x2f')](0x194);}return _0x337ba6;};}function handleError(_0x5e2317,_0x4272a7){_0x4272a7=_0x4272a7||0x1f4;return function(_0x45794f){logger[_0x953c('0x1f')](_0x45794f[_0x953c('0x30')]);if(_0x45794f[_0x953c('0x31')]){delete _0x45794f[_0x953c('0x31')];}_0x5e2317['status'](_0x4272a7)[_0x953c('0x32')](_0x45794f);};}exports['index']=function(_0x3aa0e7,_0x186991){var _0xc8cfb4={},_0xe4d41f={},_0x5e373f={'count':0x0,'rows':[]};var _0x43eb2d=_[_0x953c('0x33')](db[_0x953c('0x34')][_0x953c('0x35')],function(_0x59b1e4){return{'name':_0x59b1e4['fieldName'],'type':_0x59b1e4[_0x953c('0x36')][_0x953c('0x37')]};});_0xe4d41f[_0x953c('0x38')]=_[_0x953c('0x33')](_0x43eb2d,'name');_0xe4d41f[_0x953c('0x39')]=_['keys'](_0x3aa0e7[_0x953c('0x39')]);_0xe4d41f[_0x953c('0x3a')]=_[_0x953c('0x3b')](_0xe4d41f[_0x953c('0x38')],_0xe4d41f[_0x953c('0x39')]);_0xc8cfb4['attributes']=_[_0x953c('0x3b')](_0xe4d41f[_0x953c('0x38')],qs[_0x953c('0x3c')](_0x3aa0e7[_0x953c('0x39')]['fields']));_0xc8cfb4['attributes']=_0xc8cfb4['attributes'][_0x953c('0x3d')]?_0xc8cfb4[_0x953c('0x3e')]:_0xe4d41f[_0x953c('0x38')];if(!_0x3aa0e7['query'][_0x953c('0x3f')](_0x953c('0x40'))){_0xc8cfb4[_0x953c('0x29')]=qs['limit'](_0x3aa0e7[_0x953c('0x39')][_0x953c('0x29')]);_0xc8cfb4['offset']=qs[_0x953c('0x26')](_0x3aa0e7[_0x953c('0x39')][_0x953c('0x26')]);}_0xc8cfb4['order']=qs['sort'](_0x3aa0e7[_0x953c('0x39')][_0x953c('0x41')]);_0xc8cfb4[_0x953c('0x42')]=qs[_0x953c('0x3a')](_[_0x953c('0x43')](_0x3aa0e7[_0x953c('0x39')],_0xe4d41f[_0x953c('0x3a')]),_0x43eb2d);if(_0x3aa0e7[_0x953c('0x39')]['filter']){_0xc8cfb4[_0x953c('0x42')]=_[_0x953c('0x44')](_0xc8cfb4[_0x953c('0x42')],{'$or':_[_0x953c('0x33')](_0x43eb2d,function(_0x3533b7){if(_0x3533b7['type']!=='VIRTUAL'){var _0x55cf13={};_0x55cf13[_0x3533b7['name']]={'$like':'%'+_0x3aa0e7[_0x953c('0x39')][_0x953c('0x45')]+'%'};return _0x55cf13;}})});}_0xc8cfb4=_[_0x953c('0x44')]({},_0xc8cfb4,_0x3aa0e7[_0x953c('0x46')]);var _0x14201a={'where':_0xc8cfb4['where']};return db[_0x953c('0x34')][_0x953c('0x28')](_0x14201a)['then'](function(_0x4ae690){_0x5e373f[_0x953c('0x28')]=_0x4ae690;if(_0x3aa0e7[_0x953c('0x39')][_0x953c('0x47')]){_0xc8cfb4[_0x953c('0x48')]=[{'all':!![]}];}return db['ZendeskConfiguration'][_0x953c('0x49')](_0xc8cfb4);})[_0x953c('0x19')](function(_0x3fca46){_0x5e373f[_0x953c('0x4a')]=_0x3fca46;return _0x5e373f;})[_0x953c('0x19')](respondWithFilteredResult(_0x186991,_0xc8cfb4))[_0x953c('0x23')](handleError(_0x186991,null));};exports[_0x953c('0x4b')]=function(_0x233866,_0x46ec09){var _0x3078c8={'raw':![],'where':{'id':_0x233866[_0x953c('0x4c')]['id']}},_0x533085={};_0x533085[_0x953c('0x38')]=_[_0x953c('0x4d')](db['ZendeskConfiguration'][_0x953c('0x35')]);_0x533085['query']=_[_0x953c('0x4d')](_0x233866[_0x953c('0x39')]);_0x533085[_0x953c('0x3a')]=_[_0x953c('0x3b')](_0x533085[_0x953c('0x38')],_0x533085[_0x953c('0x39')]);_0x3078c8['attributes']=_[_0x953c('0x3b')](_0x533085['model'],qs[_0x953c('0x3c')](_0x233866[_0x953c('0x39')][_0x953c('0x3c')]));_0x3078c8[_0x953c('0x3e')]=_0x3078c8[_0x953c('0x3e')][_0x953c('0x3d')]?_0x3078c8[_0x953c('0x3e')]:_0x533085[_0x953c('0x38')];if(_0x233866[_0x953c('0x39')][_0x953c('0x47')]){_0x3078c8[_0x953c('0x48')]=[{'all':!![]}];}_0x3078c8=_[_0x953c('0x44')]({},_0x3078c8,_0x233866[_0x953c('0x46')]);return db['ZendeskConfiguration'][_0x953c('0x4e')](_0x3078c8)[_0x953c('0x19')](handleEntityNotFound(_0x46ec09,null))[_0x953c('0x19')](respondWithResult(_0x46ec09,null))[_0x953c('0x23')](handleError(_0x46ec09,null));};exports[_0x953c('0x4f')]=function(_0x37e779,_0x332cde){return db[_0x953c('0x34')][_0x953c('0x4f')](_0x37e779[_0x953c('0x50')],{})[_0x953c('0x19')](respondWithResult(_0x332cde,0xc9))[_0x953c('0x23')](handleError(_0x332cde,null));};exports['update']=function(_0x520232,_0x14b8aa){if(_0x520232[_0x953c('0x50')]['id']){delete _0x520232['body']['id'];}return db[_0x953c('0x34')][_0x953c('0x4e')]({'where':{'id':_0x520232[_0x953c('0x4c')]['id']}})['then'](handleEntityNotFound(_0x14b8aa,null))[_0x953c('0x19')](saveUpdates(_0x520232['body'],null))['then'](respondWithResult(_0x14b8aa,null))[_0x953c('0x23')](handleError(_0x14b8aa,null));};exports[_0x953c('0x2e')]=function(_0x4f61c5,_0x34890a){return db[_0x953c('0x34')][_0x953c('0x4e')]({'where':{'id':_0x4f61c5[_0x953c('0x4c')]['id']}})[_0x953c('0x19')](handleEntityNotFound(_0x34890a,null))[_0x953c('0x19')](removeEntity(_0x34890a,null))[_0x953c('0x23')](handleError(_0x34890a,null));};exports[_0x953c('0x51')]=function(_0x308a0a,_0x1c533f,_0x2ce132){var _0x2abf37={};var _0x37fc87={};var _0xba3903;var _0x517656;return db[_0x953c('0x34')][_0x953c('0x52')]({'where':{'id':_0x308a0a['params']['id']}})[_0x953c('0x19')](handleEntityNotFound(_0x1c533f,null))[_0x953c('0x19')](function(_0x2a8987){if(_0x2a8987){_0xba3903=_0x2a8987;_0x37fc87['model']=_['keys'](db[_0x953c('0x53')][_0x953c('0x35')]);_0x37fc87[_0x953c('0x39')]=_[_0x953c('0x4d')](_0x308a0a[_0x953c('0x39')]);_0x37fc87[_0x953c('0x3a')]=_[_0x953c('0x3b')](_0x37fc87['model'],_0x37fc87[_0x953c('0x39')]);_0x2abf37['attributes']=_[_0x953c('0x3b')](_0x37fc87[_0x953c('0x38')],qs[_0x953c('0x3c')](_0x308a0a['query']['fields']));_0x2abf37[_0x953c('0x3e')]=_0x2abf37[_0x953c('0x3e')][_0x953c('0x3d')]?_0x2abf37[_0x953c('0x3e')]:_0x37fc87[_0x953c('0x38')];_0x2abf37[_0x953c('0x54')]=qs['sort'](_0x308a0a[_0x953c('0x39')][_0x953c('0x41')]);_0x2abf37[_0x953c('0x42')]=qs[_0x953c('0x3a')](_['pick'](_0x308a0a[_0x953c('0x39')],_0x37fc87[_0x953c('0x3a')]));if(_0x308a0a[_0x953c('0x39')][_0x953c('0x45')]){_0x2abf37[_0x953c('0x42')]=_['merge'](_0x2abf37['where'],{'$or':_[_0x953c('0x33')](_0x2abf37[_0x953c('0x3e')],function(_0x3b6c36){var _0x5ad769={};_0x5ad769[_0x3b6c36]={'$like':'%'+_0x308a0a[_0x953c('0x39')][_0x953c('0x45')]+'%'};return _0x5ad769;})});}_0x2abf37=_[_0x953c('0x44')]({},_0x2abf37,_0x308a0a[_0x953c('0x46')]);return _0xba3903['getFields'](_0x2abf37);}})[_0x953c('0x19')](function(_0x32db9f){if(_0x32db9f){_0x517656=_0x32db9f[_0x953c('0x3d')];if(!_0x308a0a[_0x953c('0x39')]['hasOwnProperty']('nolimit')){_0x2abf37[_0x953c('0x29')]=qs[_0x953c('0x29')](_0x308a0a[_0x953c('0x39')][_0x953c('0x29')]);_0x2abf37[_0x953c('0x26')]=qs[_0x953c('0x26')](_0x308a0a[_0x953c('0x39')]['offset']);}return _0xba3903[_0x953c('0x51')](_0x2abf37);}})[_0x953c('0x19')](function(_0x2158c1){if(_0x2158c1){return _0x2158c1?{'count':_0x517656,'rows':_0x2158c1}:null;}})[_0x953c('0x19')](respondWithResult(_0x1c533f,null))[_0x953c('0x23')](handleError(_0x1c533f,null));};exports[_0x953c('0x55')]=function(_0x38a492,_0x81a283,_0x399a14){var _0x3b7e0f={};var _0xb9bdaa={};var _0x3462f9;var _0xc08206;return db[_0x953c('0x34')][_0x953c('0x52')]({'where':{'id':_0x38a492[_0x953c('0x4c')]['id']}})['then'](handleEntityNotFound(_0x81a283,null))[_0x953c('0x19')](function(_0x1c0a84){if(_0x1c0a84){_0x3462f9=_0x1c0a84;_0xb9bdaa[_0x953c('0x38')]=_[_0x953c('0x4d')](db[_0x953c('0x53')][_0x953c('0x35')]);_0xb9bdaa[_0x953c('0x39')]=_[_0x953c('0x4d')](_0x38a492[_0x953c('0x39')]);_0xb9bdaa['filters']=_[_0x953c('0x3b')](_0xb9bdaa[_0x953c('0x38')],_0xb9bdaa[_0x953c('0x39')]);_0x3b7e0f[_0x953c('0x3e')]=_[_0x953c('0x3b')](_0xb9bdaa['model'],qs[_0x953c('0x3c')](_0x38a492[_0x953c('0x39')][_0x953c('0x3c')]));_0x3b7e0f[_0x953c('0x3e')]=_0x3b7e0f[_0x953c('0x3e')][_0x953c('0x3d')]?_0x3b7e0f[_0x953c('0x3e')]:_0xb9bdaa['model'];_0x3b7e0f[_0x953c('0x54')]=qs['sort'](_0x38a492['query'][_0x953c('0x41')]);_0x3b7e0f['where']=qs[_0x953c('0x3a')](_[_0x953c('0x43')](_0x38a492[_0x953c('0x39')],_0xb9bdaa['filters']));if(_0x38a492['query'][_0x953c('0x45')]){_0x3b7e0f[_0x953c('0x42')]=_[_0x953c('0x44')](_0x3b7e0f['where'],{'$or':_['map'](_0x3b7e0f['attributes'],function(_0x58e05f){var _0x2fac14={};_0x2fac14[_0x58e05f]={'$like':'%'+_0x38a492[_0x953c('0x39')][_0x953c('0x45')]+'%'};return _0x2fac14;})});}_0x3b7e0f=_[_0x953c('0x44')]({},_0x3b7e0f,_0x38a492[_0x953c('0x46')]);return _0x3462f9[_0x953c('0x55')](_0x3b7e0f);}})['then'](function(_0x1d2bd9){if(_0x1d2bd9){_0xc08206=_0x1d2bd9[_0x953c('0x3d')];if(!_0x38a492[_0x953c('0x39')][_0x953c('0x3f')]('nolimit')){_0x3b7e0f['limit']=qs[_0x953c('0x29')](_0x38a492[_0x953c('0x39')][_0x953c('0x29')]);_0x3b7e0f['offset']=qs['offset'](_0x38a492[_0x953c('0x39')]['offset']);}return _0x3462f9[_0x953c('0x55')](_0x3b7e0f);}})['then'](function(_0x2f0f6a){if(_0x2f0f6a){return _0x2f0f6a?{'count':_0xc08206,'rows':_0x2f0f6a}:null;}})[_0x953c('0x19')](respondWithResult(_0x81a283,null))['catch'](handleError(_0x81a283,null));};exports['getDescriptions']=function(_0x49ec10,_0x447a22,_0x35106c){var _0x535db2={};var _0x1fda0d={};var _0x5ee9e0;var _0x1e4f12;return db['ZendeskConfiguration']['findOne']({'where':{'id':_0x49ec10[_0x953c('0x4c')]['id']}})[_0x953c('0x19')](handleEntityNotFound(_0x447a22,null))[_0x953c('0x19')](function(_0x2a334a){if(_0x2a334a){_0x5ee9e0=_0x2a334a;_0x1fda0d[_0x953c('0x38')]=_[_0x953c('0x4d')](db[_0x953c('0x53')]['rawAttributes']);_0x1fda0d[_0x953c('0x39')]=_['keys'](_0x49ec10['query']);_0x1fda0d[_0x953c('0x3a')]=_[_0x953c('0x3b')](_0x1fda0d[_0x953c('0x38')],_0x1fda0d[_0x953c('0x39')]);_0x535db2[_0x953c('0x3e')]=_[_0x953c('0x3b')](_0x1fda0d[_0x953c('0x38')],qs['fields'](_0x49ec10[_0x953c('0x39')][_0x953c('0x3c')]));_0x535db2[_0x953c('0x3e')]=_0x535db2[_0x953c('0x3e')][_0x953c('0x3d')]?_0x535db2['attributes']:_0x1fda0d[_0x953c('0x38')];_0x535db2[_0x953c('0x54')]=qs[_0x953c('0x41')](_0x49ec10['query'][_0x953c('0x41')]);_0x535db2[_0x953c('0x42')]=qs[_0x953c('0x3a')](_['pick'](_0x49ec10['query'],_0x1fda0d[_0x953c('0x3a')]));if(_0x49ec10[_0x953c('0x39')][_0x953c('0x45')]){_0x535db2['where']=_['merge'](_0x535db2[_0x953c('0x42')],{'$or':_[_0x953c('0x33')](_0x535db2['attributes'],function(_0x477b34){var _0x538302={};_0x538302[_0x477b34]={'$like':'%'+_0x49ec10[_0x953c('0x39')][_0x953c('0x45')]+'%'};return _0x538302;})});}_0x535db2=_[_0x953c('0x44')]({},_0x535db2,_0x49ec10[_0x953c('0x46')]);return _0x5ee9e0['getDescriptions'](_0x535db2);}})[_0x953c('0x19')](function(_0x3648c7){if(_0x3648c7){_0x1e4f12=_0x3648c7[_0x953c('0x3d')];if(!_0x49ec10[_0x953c('0x39')]['hasOwnProperty'](_0x953c('0x40'))){_0x535db2[_0x953c('0x29')]=qs['limit'](_0x49ec10[_0x953c('0x39')][_0x953c('0x29')]);_0x535db2['offset']=qs[_0x953c('0x26')](_0x49ec10[_0x953c('0x39')][_0x953c('0x26')]);}return _0x5ee9e0['getDescriptions'](_0x535db2);}})['then'](function(_0x2a52e5){if(_0x2a52e5){return _0x2a52e5?{'count':_0x1e4f12,'rows':_0x2a52e5}:null;}})['then'](respondWithResult(_0x447a22,null))[_0x953c('0x23')](handleError(_0x447a22,null));};exports[_0x953c('0x56')]=function(_0x1a06d9,_0x58a99d,_0x3269e9){var _0x518de2={};var _0x4b3eee={};var _0x187eab;var _0x3f770e;return db[_0x953c('0x34')][_0x953c('0x52')]({'where':{'id':_0x1a06d9[_0x953c('0x4c')]['id']}})[_0x953c('0x19')](handleEntityNotFound(_0x58a99d,null))['then'](function(_0x59318b){if(_0x59318b){_0x187eab=_0x59318b;_0x4b3eee[_0x953c('0x38')]=_['keys'](db[_0x953c('0x57')][_0x953c('0x35')]);_0x4b3eee['query']=_[_0x953c('0x4d')](_0x1a06d9[_0x953c('0x39')]);_0x4b3eee[_0x953c('0x3a')]=_[_0x953c('0x3b')](_0x4b3eee[_0x953c('0x38')],_0x4b3eee[_0x953c('0x39')]);_0x518de2[_0x953c('0x3e')]=_['intersection'](_0x4b3eee[_0x953c('0x38')],qs[_0x953c('0x3c')](_0x1a06d9[_0x953c('0x39')]['fields']));_0x518de2['attributes']=_0x518de2[_0x953c('0x3e')][_0x953c('0x3d')]?_0x518de2[_0x953c('0x3e')]:_0x4b3eee[_0x953c('0x38')];_0x518de2[_0x953c('0x54')]=qs['sort'](_0x1a06d9[_0x953c('0x39')][_0x953c('0x41')]);_0x518de2[_0x953c('0x42')]=qs[_0x953c('0x3a')](_[_0x953c('0x43')](_0x1a06d9[_0x953c('0x39')],_0x4b3eee[_0x953c('0x3a')]));if(_0x1a06d9[_0x953c('0x39')]['filter']){_0x518de2[_0x953c('0x42')]=_[_0x953c('0x44')](_0x518de2[_0x953c('0x42')],{'$or':_['map'](_0x518de2[_0x953c('0x3e')],function(_0x1fbc38){var _0x246f8b={};_0x246f8b[_0x1fbc38]={'$like':'%'+_0x1a06d9['query'][_0x953c('0x45')]+'%'};return _0x246f8b;})});}_0x518de2=_[_0x953c('0x44')]({},_0x518de2,_0x1a06d9[_0x953c('0x46')]);return _0x187eab['getTags'](_0x518de2);}})[_0x953c('0x19')](function(_0x30f899){if(_0x30f899){_0x3f770e=_0x30f899[_0x953c('0x3d')];if(!_0x1a06d9[_0x953c('0x39')][_0x953c('0x3f')](_0x953c('0x40'))){_0x518de2[_0x953c('0x29')]=qs[_0x953c('0x29')](_0x1a06d9['query'][_0x953c('0x29')]);_0x518de2[_0x953c('0x26')]=qs[_0x953c('0x26')](_0x1a06d9['query']['offset']);}return _0x187eab[_0x953c('0x56')](_0x518de2);}})[_0x953c('0x19')](function(_0x1beb24){if(_0x1beb24){return _0x1beb24?{'count':_0x3f770e,'rows':_0x1beb24}:null;}})[_0x953c('0x19')](respondWithResult(_0x58a99d,null))[_0x953c('0x23')](handleError(_0x58a99d,null));};exports[_0x953c('0x58')]=function(_0x463628,_0x400aca,_0x27be91){if(_0x463628[_0x953c('0x50')]['id']){delete _0x463628[_0x953c('0x50')]['id'];}return db[_0x953c('0x34')][_0x953c('0x52')]({'where':{'id':_0x463628[_0x953c('0x4c')]['id']}})['then'](handleEntityNotFound(_0x400aca,null))['then'](function(_0x344e2a){if(_0x344e2a){return _0x344e2a['setTags'](_0x463628[_0x953c('0x50')][_0x953c('0x59')]||[]);}return null;})[_0x953c('0x19')](respondWithResult(_0x400aca,null))[_0x953c('0x23')](handleError(_0x400aca,null));}; \ No newline at end of file +var _0x29b2=['status','Content-Range','json','apply','reject','destroy','stack','name','map','fieldName','type','key','model','query','keys','filters','intersection','fields','attributes','hasOwnProperty','order','sort','filter','where','merge','options','ZendeskConfiguration','includeAll','include','findAll','rows','show','params','rawAttributes','find','create','body','update','getFields','findOne','ZendeskField','length','nolimit','getSubjects','pick','getDescriptions','getTags','setTags','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','client','http','request','then','ZendeskConfiguration,\x20%s,\x20%s','request\x20sent','debug','ZendeskConfiguration,\x20%s,\x20%s,\x20%s','stringify','code','error','message','result','catch','sendStatus','end','offset','undefined','limit','count'];(function(_0x5d8d8a,_0x44eaa6){var _0x2656c9=function(_0xd4c485){while(--_0xd4c485){_0x5d8d8a['push'](_0x5d8d8a['shift']());}};_0x2656c9(++_0x44eaa6);}(_0x29b2,0x1a8));var _0x229b=function(_0x2ffbfc,_0x4daa57){_0x2ffbfc=_0x2ffbfc-0x0;var _0x401468=_0x29b2[_0x2ffbfc];return _0x401468;};'use strict';var emlformat=require(_0x229b('0x0'));var rimraf=require(_0x229b('0x1'));var zipdir=require(_0x229b('0x2'));var jsonpatch=require(_0x229b('0x3'));var rp=require(_0x229b('0x4'));var moment=require(_0x229b('0x5'));var BPromise=require(_0x229b('0x6'));var Mustache=require(_0x229b('0x7'));var util=require(_0x229b('0x8'));var path=require(_0x229b('0x9'));var sox=require(_0x229b('0xa'));var csv=require(_0x229b('0xb'));var ejs=require(_0x229b('0xc'));var fs=require('fs');var fs_extra=require(_0x229b('0xd'));var _=require(_0x229b('0xe'));var squel=require(_0x229b('0xf'));var crypto=require(_0x229b('0x10'));var jsforce=require(_0x229b('0x11'));var deskjs=require('desk.js');var toCsv=require(_0x229b('0xb'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x229b('0x12'));var authService=require(_0x229b('0x13'));var qs=require('../../components/parsers/qs');var as=require(_0x229b('0x14'));var hardwareService=require(_0x229b('0x15'));var logger=require(_0x229b('0x16'))('api');var utils=require(_0x229b('0x17'));var config=require(_0x229b('0x18'));var licenseUtil=require(_0x229b('0x19'));var db=require('../../mysqldb')['db'];var jayson=require('jayson/promise');var client=jayson[_0x229b('0x1a')][_0x229b('0x1b')]({'port':0x232a});function respondWithRpcPromise(_0x4e2161,_0x3a9fd8,_0x8ef9c7,_0x292b35){return new BPromise(function(_0x1b8e6b,_0x9d8ad4){var _0x57b95c=_0x292b35||client;return _0x57b95c[_0x229b('0x1c')](_0x4e2161,_0x8ef9c7)[_0x229b('0x1d')](function(_0xc92604){logger['info'](_0x229b('0x1e'),_0x3a9fd8,_0x229b('0x1f'));logger[_0x229b('0x20')](_0x229b('0x21'),_0x3a9fd8,'request\x20sent',JSON[_0x229b('0x22')](_0xc92604));if(_0xc92604['error']){if(_0xc92604['error'][_0x229b('0x23')]===0x1f4){logger['error']('ZendeskConfiguration,\x20%s,\x20%s',_0x3a9fd8,_0xc92604[_0x229b('0x24')][_0x229b('0x25')]);return _0x9d8ad4(_0xc92604[_0x229b('0x24')][_0x229b('0x25')]);}logger[_0x229b('0x24')](_0x229b('0x1e'),_0x3a9fd8,_0xc92604[_0x229b('0x24')][_0x229b('0x25')]);return _0x1b8e6b(_0xc92604[_0x229b('0x24')][_0x229b('0x25')]);}else{logger['info']('ZendeskConfiguration,\x20%s,\x20%s',_0x3a9fd8,_0x229b('0x1f'));_0x1b8e6b(_0xc92604[_0x229b('0x26')][_0x229b('0x25')]);}})[_0x229b('0x27')](function(_0x59d4e0){logger[_0x229b('0x24')]('ZendeskConfiguration,\x20%s,\x20%s',_0x3a9fd8,_0x59d4e0);_0x9d8ad4(_0x59d4e0);});});}function respondWithStatusCode(_0x46a2f0,_0x5cdc81){_0x5cdc81=_0x5cdc81||0xcc;return function(_0x6fa66e){if(_0x6fa66e){return _0x46a2f0[_0x229b('0x28')](_0x5cdc81);}return _0x46a2f0['status'](_0x5cdc81)[_0x229b('0x29')]();};}function respondWithResult(_0x428bfe,_0x209601){_0x209601=_0x209601||0xc8;return function(_0x124992){if(_0x124992){return _0x428bfe['status'](_0x209601)['json'](_0x124992);}};}function respondWithFilteredResult(_0x1c3e13,_0x4c7c61){return function(_0x555583){if(_0x555583){var _0x538ad3=typeof _0x4c7c61[_0x229b('0x2a')]===_0x229b('0x2b')&&typeof _0x4c7c61[_0x229b('0x2c')]===_0x229b('0x2b');var _0x443c64=_0x555583[_0x229b('0x2d')];var _0x570bba=_0x538ad3?0x0:_0x4c7c61[_0x229b('0x2a')];var _0x4a55d1=_0x538ad3?_0x555583[_0x229b('0x2d')]:_0x4c7c61[_0x229b('0x2a')]+_0x4c7c61[_0x229b('0x2c')];var _0x4fa95c;if(_0x4a55d1>=_0x443c64){_0x4a55d1=_0x443c64;_0x4fa95c=0xc8;}else{_0x4fa95c=0xce;}_0x1c3e13[_0x229b('0x2e')](_0x4fa95c);return _0x1c3e13['set'](_0x229b('0x2f'),_0x570bba+'-'+_0x4a55d1+'/'+_0x443c64)[_0x229b('0x30')](_0x555583);}return null;};}function patchUpdates(_0x31a373){return function(_0x5e304d){try{jsonpatch[_0x229b('0x31')](_0x5e304d,_0x31a373,!![]);}catch(_0x5c54ef){return BPromise[_0x229b('0x32')](_0x5c54ef);}return _0x5e304d['save']();};}function saveUpdates(_0x4002cc,_0x7f1675){return function(_0x18d19c){if(_0x18d19c){return _0x18d19c['update'](_0x4002cc)['then'](function(_0x5c5da5){return _0x5c5da5;});}return null;};}function removeEntity(_0x1d40ab,_0x987011){return function(_0x5a14a5){if(_0x5a14a5){return _0x5a14a5[_0x229b('0x33')]()['then'](function(){_0x1d40ab['status'](0xcc)[_0x229b('0x29')]();});}};}function handleEntityNotFound(_0x43da0f,_0x616a14){return function(_0x2ec96f){if(!_0x2ec96f){_0x43da0f[_0x229b('0x28')](0x194);}return _0x2ec96f;};}function handleError(_0xb5479c,_0x3df92c){_0x3df92c=_0x3df92c||0x1f4;return function(_0x3af62e){logger[_0x229b('0x24')](_0x3af62e[_0x229b('0x34')]);if(_0x3af62e[_0x229b('0x35')]){delete _0x3af62e[_0x229b('0x35')];}_0xb5479c['status'](_0x3df92c)['send'](_0x3af62e);};}exports['index']=function(_0x60f7f8,_0x389b57){var _0xc1ea77={},_0x17498a={},_0x17b05f={'count':0x0,'rows':[]};var _0x2a9dc2=_[_0x229b('0x36')](db['ZendeskConfiguration']['rawAttributes'],function(_0x54a764){return{'name':_0x54a764[_0x229b('0x37')],'type':_0x54a764[_0x229b('0x38')][_0x229b('0x39')]};});_0x17498a[_0x229b('0x3a')]=_[_0x229b('0x36')](_0x2a9dc2,_0x229b('0x35'));_0x17498a[_0x229b('0x3b')]=_[_0x229b('0x3c')](_0x60f7f8[_0x229b('0x3b')]);_0x17498a[_0x229b('0x3d')]=_[_0x229b('0x3e')](_0x17498a[_0x229b('0x3a')],_0x17498a[_0x229b('0x3b')]);_0xc1ea77['attributes']=_['intersection'](_0x17498a['model'],qs[_0x229b('0x3f')](_0x60f7f8['query'][_0x229b('0x3f')]));_0xc1ea77[_0x229b('0x40')]=_0xc1ea77[_0x229b('0x40')]['length']?_0xc1ea77[_0x229b('0x40')]:_0x17498a[_0x229b('0x3a')];if(!_0x60f7f8[_0x229b('0x3b')][_0x229b('0x41')]('nolimit')){_0xc1ea77['limit']=qs[_0x229b('0x2c')](_0x60f7f8['query'][_0x229b('0x2c')]);_0xc1ea77[_0x229b('0x2a')]=qs['offset'](_0x60f7f8[_0x229b('0x3b')]['offset']);}_0xc1ea77[_0x229b('0x42')]=qs[_0x229b('0x43')](_0x60f7f8[_0x229b('0x3b')][_0x229b('0x43')]);_0xc1ea77['where']=qs[_0x229b('0x3d')](_['pick'](_0x60f7f8[_0x229b('0x3b')],_0x17498a[_0x229b('0x3d')]),_0x2a9dc2);if(_0x60f7f8[_0x229b('0x3b')][_0x229b('0x44')]){_0xc1ea77[_0x229b('0x45')]=_['merge'](_0xc1ea77[_0x229b('0x45')],{'$or':_['map'](_0x2a9dc2,function(_0x53ee83){if(_0x53ee83[_0x229b('0x38')]!=='VIRTUAL'){var _0xc09c31={};_0xc09c31[_0x53ee83['name']]={'$like':'%'+_0x60f7f8[_0x229b('0x3b')][_0x229b('0x44')]+'%'};return _0xc09c31;}})});}_0xc1ea77=_[_0x229b('0x46')]({},_0xc1ea77,_0x60f7f8[_0x229b('0x47')]);var _0x44a72e={'where':_0xc1ea77[_0x229b('0x45')]};return db[_0x229b('0x48')][_0x229b('0x2d')](_0x44a72e)[_0x229b('0x1d')](function(_0x406bda){_0x17b05f[_0x229b('0x2d')]=_0x406bda;if(_0x60f7f8[_0x229b('0x3b')][_0x229b('0x49')]){_0xc1ea77[_0x229b('0x4a')]=[{'all':!![]}];}return db[_0x229b('0x48')][_0x229b('0x4b')](_0xc1ea77);})[_0x229b('0x1d')](function(_0x2d1cf){_0x17b05f[_0x229b('0x4c')]=_0x2d1cf;return _0x17b05f;})[_0x229b('0x1d')](respondWithFilteredResult(_0x389b57,_0xc1ea77))[_0x229b('0x27')](handleError(_0x389b57,null));};exports[_0x229b('0x4d')]=function(_0x2fbd10,_0x45f2ed){var _0x55fe44={'raw':![],'where':{'id':_0x2fbd10[_0x229b('0x4e')]['id']}},_0x5c6e9d={};_0x5c6e9d[_0x229b('0x3a')]=_[_0x229b('0x3c')](db[_0x229b('0x48')][_0x229b('0x4f')]);_0x5c6e9d[_0x229b('0x3b')]=_[_0x229b('0x3c')](_0x2fbd10[_0x229b('0x3b')]);_0x5c6e9d[_0x229b('0x3d')]=_[_0x229b('0x3e')](_0x5c6e9d[_0x229b('0x3a')],_0x5c6e9d[_0x229b('0x3b')]);_0x55fe44[_0x229b('0x40')]=_[_0x229b('0x3e')](_0x5c6e9d[_0x229b('0x3a')],qs['fields'](_0x2fbd10[_0x229b('0x3b')][_0x229b('0x3f')]));_0x55fe44[_0x229b('0x40')]=_0x55fe44[_0x229b('0x40')]['length']?_0x55fe44[_0x229b('0x40')]:_0x5c6e9d[_0x229b('0x3a')];if(_0x2fbd10[_0x229b('0x3b')][_0x229b('0x49')]){_0x55fe44['include']=[{'all':!![]}];}_0x55fe44=_[_0x229b('0x46')]({},_0x55fe44,_0x2fbd10[_0x229b('0x47')]);return db[_0x229b('0x48')][_0x229b('0x50')](_0x55fe44)['then'](handleEntityNotFound(_0x45f2ed,null))[_0x229b('0x1d')](respondWithResult(_0x45f2ed,null))[_0x229b('0x27')](handleError(_0x45f2ed,null));};exports[_0x229b('0x51')]=function(_0x4f5d4d,_0x3b127e){return db[_0x229b('0x48')][_0x229b('0x51')](_0x4f5d4d[_0x229b('0x52')],{})[_0x229b('0x1d')](respondWithResult(_0x3b127e,0xc9))[_0x229b('0x27')](handleError(_0x3b127e,null));};exports[_0x229b('0x53')]=function(_0x29daa6,_0x251e54){if(_0x29daa6[_0x229b('0x52')]['id']){delete _0x29daa6[_0x229b('0x52')]['id'];}return db[_0x229b('0x48')]['find']({'where':{'id':_0x29daa6[_0x229b('0x4e')]['id']}})[_0x229b('0x1d')](handleEntityNotFound(_0x251e54,null))[_0x229b('0x1d')](saveUpdates(_0x29daa6[_0x229b('0x52')],null))[_0x229b('0x1d')](respondWithResult(_0x251e54,null))['catch'](handleError(_0x251e54,null));};exports['destroy']=function(_0x4a283f,_0xaa54d){return db[_0x229b('0x48')]['find']({'where':{'id':_0x4a283f['params']['id']}})['then'](handleEntityNotFound(_0xaa54d,null))[_0x229b('0x1d')](removeEntity(_0xaa54d,null))['catch'](handleError(_0xaa54d,null));};exports[_0x229b('0x54')]=function(_0x9dbd75,_0x3b21ba,_0x31b4ec){var _0x16d030={};var _0x431d83={};var _0x54a68d;var _0x1519e2;return db[_0x229b('0x48')][_0x229b('0x55')]({'where':{'id':_0x9dbd75['params']['id']}})[_0x229b('0x1d')](handleEntityNotFound(_0x3b21ba,null))[_0x229b('0x1d')](function(_0x188152){if(_0x188152){_0x54a68d=_0x188152;_0x431d83['model']=_[_0x229b('0x3c')](db[_0x229b('0x56')][_0x229b('0x4f')]);_0x431d83[_0x229b('0x3b')]=_['keys'](_0x9dbd75[_0x229b('0x3b')]);_0x431d83['filters']=_[_0x229b('0x3e')](_0x431d83[_0x229b('0x3a')],_0x431d83[_0x229b('0x3b')]);_0x16d030['attributes']=_[_0x229b('0x3e')](_0x431d83['model'],qs[_0x229b('0x3f')](_0x9dbd75[_0x229b('0x3b')][_0x229b('0x3f')]));_0x16d030[_0x229b('0x40')]=_0x16d030[_0x229b('0x40')][_0x229b('0x57')]?_0x16d030['attributes']:_0x431d83['model'];_0x16d030[_0x229b('0x42')]=qs['sort'](_0x9dbd75['query']['sort']);_0x16d030['where']=qs[_0x229b('0x3d')](_['pick'](_0x9dbd75[_0x229b('0x3b')],_0x431d83['filters']));if(_0x9dbd75[_0x229b('0x3b')][_0x229b('0x44')]){_0x16d030[_0x229b('0x45')]=_[_0x229b('0x46')](_0x16d030[_0x229b('0x45')],{'$or':_[_0x229b('0x36')](_0x16d030['attributes'],function(_0xd20db4){var _0x281a84={};_0x281a84[_0xd20db4]={'$like':'%'+_0x9dbd75[_0x229b('0x3b')][_0x229b('0x44')]+'%'};return _0x281a84;})});}_0x16d030=_[_0x229b('0x46')]({},_0x16d030,_0x9dbd75['options']);return _0x54a68d[_0x229b('0x54')](_0x16d030);}})[_0x229b('0x1d')](function(_0x51ce69){if(_0x51ce69){_0x1519e2=_0x51ce69[_0x229b('0x57')];if(!_0x9dbd75[_0x229b('0x3b')][_0x229b('0x41')](_0x229b('0x58'))){_0x16d030['limit']=qs[_0x229b('0x2c')](_0x9dbd75[_0x229b('0x3b')][_0x229b('0x2c')]);_0x16d030[_0x229b('0x2a')]=qs[_0x229b('0x2a')](_0x9dbd75[_0x229b('0x3b')][_0x229b('0x2a')]);}return _0x54a68d['getFields'](_0x16d030);}})[_0x229b('0x1d')](function(_0x64ef84){if(_0x64ef84){return _0x64ef84?{'count':_0x1519e2,'rows':_0x64ef84}:null;}})[_0x229b('0x1d')](respondWithResult(_0x3b21ba,null))[_0x229b('0x27')](handleError(_0x3b21ba,null));};exports[_0x229b('0x59')]=function(_0x32f274,_0x197c94,_0x5c203f){var _0x1286e0={};var _0x5ed223={};var _0x1a8591;var _0x1ff19e;return db['ZendeskConfiguration'][_0x229b('0x55')]({'where':{'id':_0x32f274[_0x229b('0x4e')]['id']}})['then'](handleEntityNotFound(_0x197c94,null))[_0x229b('0x1d')](function(_0x2a4102){if(_0x2a4102){_0x1a8591=_0x2a4102;_0x5ed223[_0x229b('0x3a')]=_[_0x229b('0x3c')](db['ZendeskField']['rawAttributes']);_0x5ed223[_0x229b('0x3b')]=_['keys'](_0x32f274[_0x229b('0x3b')]);_0x5ed223[_0x229b('0x3d')]=_['intersection'](_0x5ed223[_0x229b('0x3a')],_0x5ed223[_0x229b('0x3b')]);_0x1286e0[_0x229b('0x40')]=_[_0x229b('0x3e')](_0x5ed223['model'],qs[_0x229b('0x3f')](_0x32f274[_0x229b('0x3b')]['fields']));_0x1286e0['attributes']=_0x1286e0['attributes'][_0x229b('0x57')]?_0x1286e0[_0x229b('0x40')]:_0x5ed223['model'];_0x1286e0[_0x229b('0x42')]=qs['sort'](_0x32f274[_0x229b('0x3b')][_0x229b('0x43')]);_0x1286e0[_0x229b('0x45')]=qs[_0x229b('0x3d')](_[_0x229b('0x5a')](_0x32f274[_0x229b('0x3b')],_0x5ed223[_0x229b('0x3d')]));if(_0x32f274['query'][_0x229b('0x44')]){_0x1286e0['where']=_[_0x229b('0x46')](_0x1286e0[_0x229b('0x45')],{'$or':_['map'](_0x1286e0['attributes'],function(_0x4584a2){var _0x2c10fd={};_0x2c10fd[_0x4584a2]={'$like':'%'+_0x32f274[_0x229b('0x3b')][_0x229b('0x44')]+'%'};return _0x2c10fd;})});}_0x1286e0=_['merge']({},_0x1286e0,_0x32f274['options']);return _0x1a8591[_0x229b('0x59')](_0x1286e0);}})[_0x229b('0x1d')](function(_0x4aefd6){if(_0x4aefd6){_0x1ff19e=_0x4aefd6[_0x229b('0x57')];if(!_0x32f274['query']['hasOwnProperty'](_0x229b('0x58'))){_0x1286e0['limit']=qs['limit'](_0x32f274['query'][_0x229b('0x2c')]);_0x1286e0[_0x229b('0x2a')]=qs[_0x229b('0x2a')](_0x32f274['query'][_0x229b('0x2a')]);}return _0x1a8591[_0x229b('0x59')](_0x1286e0);}})[_0x229b('0x1d')](function(_0x33c4a0){if(_0x33c4a0){return _0x33c4a0?{'count':_0x1ff19e,'rows':_0x33c4a0}:null;}})[_0x229b('0x1d')](respondWithResult(_0x197c94,null))[_0x229b('0x27')](handleError(_0x197c94,null));};exports[_0x229b('0x5b')]=function(_0x3c9279,_0x15c4df,_0x435862){var _0x2e44df={};var _0x3fdee1={};var _0x4760b0;var _0x26f847;return db[_0x229b('0x48')][_0x229b('0x55')]({'where':{'id':_0x3c9279[_0x229b('0x4e')]['id']}})[_0x229b('0x1d')](handleEntityNotFound(_0x15c4df,null))[_0x229b('0x1d')](function(_0x3ed2b4){if(_0x3ed2b4){_0x4760b0=_0x3ed2b4;_0x3fdee1[_0x229b('0x3a')]=_[_0x229b('0x3c')](db['ZendeskField'][_0x229b('0x4f')]);_0x3fdee1['query']=_[_0x229b('0x3c')](_0x3c9279[_0x229b('0x3b')]);_0x3fdee1['filters']=_['intersection'](_0x3fdee1['model'],_0x3fdee1[_0x229b('0x3b')]);_0x2e44df[_0x229b('0x40')]=_[_0x229b('0x3e')](_0x3fdee1[_0x229b('0x3a')],qs[_0x229b('0x3f')](_0x3c9279['query'][_0x229b('0x3f')]));_0x2e44df[_0x229b('0x40')]=_0x2e44df['attributes'][_0x229b('0x57')]?_0x2e44df[_0x229b('0x40')]:_0x3fdee1[_0x229b('0x3a')];_0x2e44df[_0x229b('0x42')]=qs['sort'](_0x3c9279[_0x229b('0x3b')][_0x229b('0x43')]);_0x2e44df[_0x229b('0x45')]=qs[_0x229b('0x3d')](_[_0x229b('0x5a')](_0x3c9279['query'],_0x3fdee1[_0x229b('0x3d')]));if(_0x3c9279['query'][_0x229b('0x44')]){_0x2e44df[_0x229b('0x45')]=_[_0x229b('0x46')](_0x2e44df[_0x229b('0x45')],{'$or':_['map'](_0x2e44df[_0x229b('0x40')],function(_0x1df8d1){var _0x44e621={};_0x44e621[_0x1df8d1]={'$like':'%'+_0x3c9279[_0x229b('0x3b')]['filter']+'%'};return _0x44e621;})});}_0x2e44df=_[_0x229b('0x46')]({},_0x2e44df,_0x3c9279['options']);return _0x4760b0[_0x229b('0x5b')](_0x2e44df);}})[_0x229b('0x1d')](function(_0x3640f9){if(_0x3640f9){_0x26f847=_0x3640f9[_0x229b('0x57')];if(!_0x3c9279[_0x229b('0x3b')][_0x229b('0x41')]('nolimit')){_0x2e44df[_0x229b('0x2c')]=qs[_0x229b('0x2c')](_0x3c9279[_0x229b('0x3b')][_0x229b('0x2c')]);_0x2e44df[_0x229b('0x2a')]=qs[_0x229b('0x2a')](_0x3c9279[_0x229b('0x3b')]['offset']);}return _0x4760b0[_0x229b('0x5b')](_0x2e44df);}})[_0x229b('0x1d')](function(_0x12ba4a){if(_0x12ba4a){return _0x12ba4a?{'count':_0x26f847,'rows':_0x12ba4a}:null;}})[_0x229b('0x1d')](respondWithResult(_0x15c4df,null))['catch'](handleError(_0x15c4df,null));};exports[_0x229b('0x5c')]=function(_0x3062fc,_0x1966e1,_0x47cfbc){var _0x29e3ce={};var _0x534047={};var _0x498dba;var _0x2f8db6;return db['ZendeskConfiguration']['findOne']({'where':{'id':_0x3062fc[_0x229b('0x4e')]['id']}})[_0x229b('0x1d')](handleEntityNotFound(_0x1966e1,null))[_0x229b('0x1d')](function(_0x568052){if(_0x568052){_0x498dba=_0x568052;_0x534047[_0x229b('0x3a')]=_[_0x229b('0x3c')](db['Tag']['rawAttributes']);_0x534047[_0x229b('0x3b')]=_[_0x229b('0x3c')](_0x3062fc[_0x229b('0x3b')]);_0x534047[_0x229b('0x3d')]=_[_0x229b('0x3e')](_0x534047[_0x229b('0x3a')],_0x534047['query']);_0x29e3ce[_0x229b('0x40')]=_[_0x229b('0x3e')](_0x534047[_0x229b('0x3a')],qs[_0x229b('0x3f')](_0x3062fc[_0x229b('0x3b')][_0x229b('0x3f')]));_0x29e3ce[_0x229b('0x40')]=_0x29e3ce[_0x229b('0x40')][_0x229b('0x57')]?_0x29e3ce[_0x229b('0x40')]:_0x534047[_0x229b('0x3a')];_0x29e3ce[_0x229b('0x42')]=qs[_0x229b('0x43')](_0x3062fc[_0x229b('0x3b')][_0x229b('0x43')]);_0x29e3ce[_0x229b('0x45')]=qs['filters'](_[_0x229b('0x5a')](_0x3062fc[_0x229b('0x3b')],_0x534047[_0x229b('0x3d')]));if(_0x3062fc[_0x229b('0x3b')][_0x229b('0x44')]){_0x29e3ce[_0x229b('0x45')]=_['merge'](_0x29e3ce[_0x229b('0x45')],{'$or':_[_0x229b('0x36')](_0x29e3ce[_0x229b('0x40')],function(_0x2365ba){var _0x3114f2={};_0x3114f2[_0x2365ba]={'$like':'%'+_0x3062fc[_0x229b('0x3b')][_0x229b('0x44')]+'%'};return _0x3114f2;})});}_0x29e3ce=_[_0x229b('0x46')]({},_0x29e3ce,_0x3062fc[_0x229b('0x47')]);return _0x498dba[_0x229b('0x5c')](_0x29e3ce);}})[_0x229b('0x1d')](function(_0x52d96a){if(_0x52d96a){_0x2f8db6=_0x52d96a[_0x229b('0x57')];if(!_0x3062fc[_0x229b('0x3b')][_0x229b('0x41')](_0x229b('0x58'))){_0x29e3ce['limit']=qs[_0x229b('0x2c')](_0x3062fc[_0x229b('0x3b')][_0x229b('0x2c')]);_0x29e3ce[_0x229b('0x2a')]=qs[_0x229b('0x2a')](_0x3062fc['query']['offset']);}return _0x498dba[_0x229b('0x5c')](_0x29e3ce);}})[_0x229b('0x1d')](function(_0x503826){if(_0x503826){return _0x503826?{'count':_0x2f8db6,'rows':_0x503826}:null;}})[_0x229b('0x1d')](respondWithResult(_0x1966e1,null))[_0x229b('0x27')](handleError(_0x1966e1,null));};exports[_0x229b('0x5d')]=function(_0xba21a4,_0x5d54fc,_0x3ceef1){if(_0xba21a4[_0x229b('0x52')]['id']){delete _0xba21a4['body']['id'];}return db[_0x229b('0x48')][_0x229b('0x55')]({'where':{'id':_0xba21a4[_0x229b('0x4e')]['id']}})[_0x229b('0x1d')](handleEntityNotFound(_0x5d54fc,null))['then'](function(_0x3a32ca){if(_0x3a32ca){return _0x3a32ca[_0x229b('0x5d')](_0xba21a4[_0x229b('0x52')]['ids']||[]);}return null;})[_0x229b('0x1d')](respondWithResult(_0x5d54fc,null))[_0x229b('0x27')](handleError(_0x5d54fc,null));}; \ No newline at end of file diff --git a/server/api/intZendeskConfiguration/intZendeskConfiguration.model.js b/server/api/intZendeskConfiguration/intZendeskConfiguration.model.js index 2d8875c..a4118ee 100644 --- a/server/api/intZendeskConfiguration/intZendeskConfiguration.model.js +++ b/server/api/intZendeskConfiguration/intZendeskConfiguration.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xeb3b=['moment','path','../../config/environment','exports','define','ZendeskConfiguration','int_zendesk_configurations','lodash','util','../../config/logger','api'];(function(_0x4e99c0,_0xcf6975){var _0x4fa388=function(_0x85144a){while(--_0x85144a){_0x4e99c0['push'](_0x4e99c0['shift']());}};_0x4fa388(++_0xcf6975);}(_0xeb3b,0x19e));var _0xbeb3=function(_0x232cf2,_0x4ffb79){_0x232cf2=_0x232cf2-0x0;var _0x463cec=_0xeb3b[_0x232cf2];return _0x463cec;};'use strict';var _=require(_0xbeb3('0x0'));var util=require(_0xbeb3('0x1'));var logger=require(_0xbeb3('0x2'))(_0xbeb3('0x3'));var moment=require(_0xbeb3('0x4'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xbeb3('0x5'));var rimraf=require('rimraf');var config=require(_0xbeb3('0x6'));var attributes=require('./intZendeskConfiguration.attributes');module[_0xbeb3('0x7')]=function(_0x5ae6f9,_0x8d8cce){return _0x5ae6f9[_0xbeb3('0x8')](_0xbeb3('0x9'),attributes,{'tableName':_0xbeb3('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x5ec6=['int_zendesk_configurations','lodash','util','../../config/logger','moment','request-promise','rimraf','./intZendeskConfiguration.attributes','ZendeskConfiguration'];(function(_0x19bf9c,_0xa5ef2){var _0x2fd6a6=function(_0x1662fc){while(--_0x1662fc){_0x19bf9c['push'](_0x19bf9c['shift']());}};_0x2fd6a6(++_0xa5ef2);}(_0x5ec6,0x7f));var _0x65ec=function(_0x2dc82c,_0x2bf940){_0x2dc82c=_0x2dc82c-0x0;var _0x2d9efe=_0x5ec6[_0x2dc82c];return _0x2d9efe;};'use strict';var _=require(_0x65ec('0x0'));var util=require(_0x65ec('0x1'));var logger=require(_0x65ec('0x2'))('api');var moment=require(_0x65ec('0x3'));var BPromise=require('bluebird');var rp=require(_0x65ec('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x65ec('0x5'));var config=require('../../config/environment');var attributes=require(_0x65ec('0x6'));module['exports']=function(_0x2fc973,_0xbb2e56){return _0x2fc973['define'](_0x65ec('0x7'),attributes,{'tableName':_0x65ec('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intZendeskConfiguration/intZendeskConfiguration.rpc.js b/server/api/intZendeskConfiguration/intZendeskConfiguration.rpc.js index 777ae7b..c926ace 100644 --- a/server/api/intZendeskConfiguration/intZendeskConfiguration.rpc.js +++ b/server/api/intZendeskConfiguration/intZendeskConfiguration.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5004=['moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','ZendeskConfiguration,\x20%s,\x20%s','request\x20sent','debug','ZendeskConfiguration,\x20%s,\x20%s,\x20%s','stringify','code','error','message','result','catch','lodash'];(function(_0x978997,_0x1e92a4){var _0x2ae317=function(_0x300a87){while(--_0x300a87){_0x978997['push'](_0x978997['shift']());}};_0x2ae317(++_0x1e92a4);}(_0x5004,0x107));var _0x4500=function(_0x271b2a,_0x4daa19){_0x271b2a=_0x271b2a-0x0;var _0x14f682=_0x5004[_0x271b2a];return _0x14f682;};'use strict';var _=require(_0x4500('0x0'));var util=require('util');var moment=require(_0x4500('0x1'));var BPromise=require(_0x4500('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x4500('0x3'))['db'];var utils=require(_0x4500('0x4'));var logger=require(_0x4500('0x5'))(_0x4500('0x6'));var config=require(_0x4500('0x7'));var jayson=require(_0x4500('0x8'));var client=jayson[_0x4500('0x9')][_0x4500('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x30e20f,_0x42249b,_0x5b4ce1){return new BPromise(function(_0x2cb3f5,_0x31ae73){return client[_0x4500('0xb')](_0x30e20f,_0x5b4ce1)[_0x4500('0xc')](function(_0x99a636){logger[_0x4500('0xd')](_0x4500('0xe'),_0x42249b,_0x4500('0xf'));logger[_0x4500('0x10')](_0x4500('0x11'),_0x42249b,_0x4500('0xf'),JSON[_0x4500('0x12')](_0x99a636));if(_0x99a636['error']){if(_0x99a636['error'][_0x4500('0x13')]===0x1f4){logger[_0x4500('0x14')](_0x4500('0xe'),_0x42249b,_0x99a636[_0x4500('0x14')][_0x4500('0x15')]);return _0x31ae73(_0x99a636['error'][_0x4500('0x15')]);}logger['error'](_0x4500('0xe'),_0x42249b,_0x99a636['error']['message']);return _0x2cb3f5(_0x99a636[_0x4500('0x14')]['message']);}else{logger[_0x4500('0xd')](_0x4500('0xe'),_0x42249b,_0x4500('0xf'));_0x2cb3f5(_0x99a636[_0x4500('0x16')][_0x4500('0x15')]);}})[_0x4500('0x17')](function(_0x27a7f8){logger[_0x4500('0x14')]('ZendeskConfiguration,\x20%s,\x20%s',_0x42249b,_0x27a7f8);_0x31ae73(_0x27a7f8);});});} \ No newline at end of file +var _0xd9f6=['message','result','catch','lodash','util','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','then','info','ZendeskConfiguration,\x20%s,\x20%s','ZendeskConfiguration,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code'];(function(_0x15469a,_0x57bd7f){var _0x2dffeb=function(_0x2db860){while(--_0x2db860){_0x15469a['push'](_0x15469a['shift']());}};_0x2dffeb(++_0x57bd7f);}(_0xd9f6,0x1a7));var _0x6d9f=function(_0x3e88d5,_0x49ce12){_0x3e88d5=_0x3e88d5-0x0;var _0x436654=_0xd9f6[_0x3e88d5];return _0x436654;};'use strict';var _=require(_0x6d9f('0x0'));var util=require(_0x6d9f('0x1'));var moment=require('moment');var BPromise=require(_0x6d9f('0x2'));var rs=require(_0x6d9f('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x6d9f('0x4'))['db'];var utils=require(_0x6d9f('0x5'));var logger=require(_0x6d9f('0x6'))('rpc');var config=require(_0x6d9f('0x7'));var jayson=require(_0x6d9f('0x8'));var client=jayson[_0x6d9f('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x27087c,_0x346302,_0x3be886){return new BPromise(function(_0xc26005,_0x51aead){return client['request'](_0x27087c,_0x3be886)[_0x6d9f('0xa')](function(_0x1121e5){logger[_0x6d9f('0xb')](_0x6d9f('0xc'),_0x346302,'request\x20sent');logger['debug'](_0x6d9f('0xd'),_0x346302,_0x6d9f('0xe'),JSON[_0x6d9f('0xf')](_0x1121e5));if(_0x1121e5[_0x6d9f('0x10')]){if(_0x1121e5[_0x6d9f('0x10')][_0x6d9f('0x11')]===0x1f4){logger[_0x6d9f('0x10')]('ZendeskConfiguration,\x20%s,\x20%s',_0x346302,_0x1121e5[_0x6d9f('0x10')]['message']);return _0x51aead(_0x1121e5['error'][_0x6d9f('0x12')]);}logger['error'](_0x6d9f('0xc'),_0x346302,_0x1121e5[_0x6d9f('0x10')][_0x6d9f('0x12')]);return _0xc26005(_0x1121e5['error']['message']);}else{logger['info']('ZendeskConfiguration,\x20%s,\x20%s',_0x346302,'request\x20sent');_0xc26005(_0x1121e5[_0x6d9f('0x13')][_0x6d9f('0x12')]);}})[_0x6d9f('0x14')](function(_0x28410f){logger[_0x6d9f('0x10')](_0x6d9f('0xc'),_0x346302,_0x28410f);_0x51aead(_0x28410f);});});} \ No newline at end of file diff --git a/server/api/intZendeskField/index.js b/server/api/intZendeskField/index.js index 3f90623..cf29606 100644 --- a/server/api/intZendeskField/index.js +++ b/server/api/intZendeskField/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa564=['Router','../../components/auth/service','get','isAuthenticated','index','/:id','show','post','create','put','delete','exports','multer','util','path','express'];(function(_0x4b2863,_0x494899){var _0x567d67=function(_0x751f03){while(--_0x751f03){_0x4b2863['push'](_0x4b2863['shift']());}};_0x567d67(++_0x494899);}(_0xa564,0x1dc));var _0x4a56=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xa564[_0x14add3];return _0x4a174f;};'use strict';var multer=require(_0x4a56('0x0'));var util=require(_0x4a56('0x1'));var path=require(_0x4a56('0x2'));var timeout=require('connect-timeout');var express=require(_0x4a56('0x3'));var router=express[_0x4a56('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x4a56('0x5'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require('./intZendeskField.controller');router[_0x4a56('0x6')]('/',auth[_0x4a56('0x7')](),controller[_0x4a56('0x8')]);router[_0x4a56('0x6')](_0x4a56('0x9'),auth[_0x4a56('0x7')](),controller[_0x4a56('0xa')]);router[_0x4a56('0xb')]('/',auth[_0x4a56('0x7')](),controller[_0x4a56('0xc')]);router[_0x4a56('0xd')](_0x4a56('0x9'),auth[_0x4a56('0x7')](),controller['update']);router[_0x4a56('0xe')]('/:id',auth[_0x4a56('0x7')](),controller['destroy']);module[_0x4a56('0xf')]=router; \ No newline at end of file +var _0xe209=['get','index','/:id','isAuthenticated','show','put','update','delete','exports','multer','util','path','connect-timeout','express','fs-extra','../../components/interaction/service','./intZendeskField.controller'];(function(_0xafca8d,_0x320396){var _0x5099a2=function(_0x54f0f1){while(--_0x54f0f1){_0xafca8d['push'](_0xafca8d['shift']());}};_0x5099a2(++_0x320396);}(_0xe209,0x17f));var _0x9e20=function(_0x3fdee8,_0x536265){_0x3fdee8=_0x3fdee8-0x0;var _0x4ab16d=_0xe209[_0x3fdee8];return _0x4ab16d;};'use strict';var multer=require(_0x9e20('0x0'));var util=require(_0x9e20('0x1'));var path=require(_0x9e20('0x2'));var timeout=require(_0x9e20('0x3'));var express=require(_0x9e20('0x4'));var router=express['Router']();var fs_extra=require(_0x9e20('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x9e20('0x6'));var config=require('../../config/environment');var controller=require(_0x9e20('0x7'));router[_0x9e20('0x8')]('/',auth['isAuthenticated'](),controller[_0x9e20('0x9')]);router[_0x9e20('0x8')](_0x9e20('0xa'),auth[_0x9e20('0xb')](),controller[_0x9e20('0xc')]);router['post']('/',auth[_0x9e20('0xb')](),controller['create']);router[_0x9e20('0xd')](_0x9e20('0xa'),auth[_0x9e20('0xb')](),controller[_0x9e20('0xe')]);router[_0x9e20('0xf')](_0x9e20('0xa'),auth[_0x9e20('0xb')](),controller['destroy']);module[_0x9e20('0x10')]=router; \ No newline at end of file diff --git a/server/api/intZendeskField/intZendeskField.attributes.js b/server/api/intZendeskField/intZendeskField.attributes.js index ff61b45..f875a7f 100644 --- a/server/api/intZendeskField/intZendeskField.attributes.js +++ b/server/api/intZendeskField/intZendeskField.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x867b=['sequelize','ENUM','string','variable','customVariable','picklist','STRING'];(function(_0x3947c9,_0x4d6c97){var _0x2e7871=function(_0x1236cc){while(--_0x1236cc){_0x3947c9['push'](_0x3947c9['shift']());}};_0x2e7871(++_0x4d6c97);}(_0x867b,0xa8));var _0xb867=function(_0x5bb850,_0x25984b){_0x5bb850=_0x5bb850-0x0;var _0x2d032f=_0x867b[_0x5bb850];return _0x2d032f;};'use strict';var Sequelize=require(_0xb867('0x0'));module['exports']={'type':{'type':Sequelize[_0xb867('0x1')](_0xb867('0x2'),_0xb867('0x3'),_0xb867('0x4'),'keyValue',_0xb867('0x5')),'defaultValue':'string'},'content':{'type':Sequelize[_0xb867('0x6')]},'key':{'type':Sequelize[_0xb867('0x6')]},'keyType':{'type':Sequelize[_0xb867('0x1')]('string','variable',_0xb867('0x4'))},'keyContent':{'type':Sequelize[_0xb867('0x6')]},'idField':{'type':Sequelize[_0xb867('0x6')]},'nameField':{'type':Sequelize[_0xb867('0x6')]},'customField':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'variableName':{'type':Sequelize[_0xb867('0x6')]}}; \ No newline at end of file +var _0xaf3c=['customVariable','STRING','BOOLEAN','sequelize','ENUM','string','keyValue','picklist','variable'];(function(_0x4a9fb1,_0x273043){var _0x348672=function(_0x142b69){while(--_0x142b69){_0x4a9fb1['push'](_0x4a9fb1['shift']());}};_0x348672(++_0x273043);}(_0xaf3c,0xdb));var _0xcaf3=function(_0x3a5821,_0x6ee764){_0x3a5821=_0x3a5821-0x0;var _0x23c6cc=_0xaf3c[_0x3a5821];return _0x23c6cc;};'use strict';var Sequelize=require(_0xcaf3('0x0'));module['exports']={'type':{'type':Sequelize[_0xcaf3('0x1')](_0xcaf3('0x2'),'variable','customVariable',_0xcaf3('0x3'),_0xcaf3('0x4')),'defaultValue':'string'},'content':{'type':Sequelize['STRING']},'key':{'type':Sequelize['STRING']},'keyType':{'type':Sequelize[_0xcaf3('0x1')](_0xcaf3('0x2'),_0xcaf3('0x5'),_0xcaf3('0x6'))},'keyContent':{'type':Sequelize[_0xcaf3('0x7')]},'idField':{'type':Sequelize[_0xcaf3('0x7')]},'nameField':{'type':Sequelize[_0xcaf3('0x7')]},'customField':{'type':Sequelize[_0xcaf3('0x8')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0xcaf3('0x7')]}}; \ No newline at end of file diff --git a/server/api/intZendeskField/intZendeskField.controller.js b/server/api/intZendeskField/intZendeskField.controller.js index f5a5a03..c6876a7 100644 --- a/server/api/intZendeskField/intZendeskField.controller.js +++ b/server/api/intZendeskField/intZendeskField.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2cbd=['desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','status','json','offset','undefined','limit','count','reject','save','update','then','destroy','error','stack','name','send','index','map','ZendeskField','fieldName','key','model','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','sort','filter','where','merge','type','options','include','findAll','catch','show','params','keys','rawAttributes','includeAll','find','create','body','eml-format','rimraf','fast-json-patch','request-promise','moment','mustache','util','to-csv','ejs','fs-extra','lodash','crypto'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x2cbd,0x19e));var _0xd2cb=function(_0x57645b,_0x25f73a){_0x57645b=_0x57645b-0x0;var _0xe82f00=_0x2cbd[_0x57645b];return _0xe82f00;};'use strict';var emlformat=require(_0xd2cb('0x0'));var rimraf=require(_0xd2cb('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xd2cb('0x2'));var rp=require(_0xd2cb('0x3'));var moment=require(_0xd2cb('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xd2cb('0x5'));var util=require(_0xd2cb('0x6'));var path=require('path');var sox=require('sox');var csv=require(_0xd2cb('0x7'));var ejs=require(_0xd2cb('0x8'));var fs=require('fs');var fs_extra=require(_0xd2cb('0x9'));var _=require(_0xd2cb('0xa'));var squel=require('squel');var crypto=require(_0xd2cb('0xb'));var jsforce=require('jsforce');var deskjs=require(_0xd2cb('0xc'));var toCsv=require('to-csv');var querystring=require(_0xd2cb('0xd'));var Papa=require(_0xd2cb('0xe'));var Redis=require('ioredis');var authService=require(_0xd2cb('0xf'));var qs=require(_0xd2cb('0x10'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xd2cb('0x11'));var logger=require(_0xd2cb('0x12'))(_0xd2cb('0x13'));var utils=require(_0xd2cb('0x14'));var config=require(_0xd2cb('0x15'));var licenseUtil=require('../../config/license/util');var db=require(_0xd2cb('0x16'))['db'];function respondWithStatusCode(_0x3f6903,_0x62c951){_0x62c951=_0x62c951||0xcc;return function(_0x1ae36a){if(_0x1ae36a){return _0x3f6903[_0xd2cb('0x17')](_0x62c951);}return _0x3f6903['status'](_0x62c951)[_0xd2cb('0x18')]();};}function respondWithResult(_0xd25e16,_0x1e1ad5){_0x1e1ad5=_0x1e1ad5||0xc8;return function(_0x57e0c9){if(_0x57e0c9){return _0xd25e16[_0xd2cb('0x19')](_0x1e1ad5)[_0xd2cb('0x1a')](_0x57e0c9);}};}function respondWithFilteredResult(_0x501e19,_0x33538d){return function(_0x4ef741){if(_0x4ef741){var _0x4e02f7=typeof _0x33538d[_0xd2cb('0x1b')]===_0xd2cb('0x1c')&&typeof _0x33538d[_0xd2cb('0x1d')]===_0xd2cb('0x1c');var _0x498e27=_0x4ef741['count'];var _0x2f41d1=_0x4e02f7?0x0:_0x33538d[_0xd2cb('0x1b')];var _0x5871e5=_0x4e02f7?_0x4ef741[_0xd2cb('0x1e')]:_0x33538d[_0xd2cb('0x1b')]+_0x33538d[_0xd2cb('0x1d')];var _0x5d385a;if(_0x5871e5>=_0x498e27){_0x5871e5=_0x498e27;_0x5d385a=0xc8;}else{_0x5d385a=0xce;}_0x501e19[_0xd2cb('0x19')](_0x5d385a);return _0x501e19['set']('Content-Range',_0x2f41d1+'-'+_0x5871e5+'/'+_0x498e27)[_0xd2cb('0x1a')](_0x4ef741);}return null;};}function patchUpdates(_0x190cbb){return function(_0x4643a0){try{jsonpatch['apply'](_0x4643a0,_0x190cbb,!![]);}catch(_0x34c00a){return BPromise[_0xd2cb('0x1f')](_0x34c00a);}return _0x4643a0[_0xd2cb('0x20')]();};}function saveUpdates(_0x4618f1,_0x27badc){return function(_0x43154a){if(_0x43154a){return _0x43154a[_0xd2cb('0x21')](_0x4618f1)[_0xd2cb('0x22')](function(_0x5d1499){return _0x5d1499;});}return null;};}function removeEntity(_0x37333a,_0x29f8f0){return function(_0x5dfca2){if(_0x5dfca2){return _0x5dfca2[_0xd2cb('0x23')]()[_0xd2cb('0x22')](function(){_0x37333a[_0xd2cb('0x19')](0xcc)[_0xd2cb('0x18')]();});}};}function handleEntityNotFound(_0x46a378,_0x84aaf5){return function(_0x4d37a4){if(!_0x4d37a4){_0x46a378[_0xd2cb('0x17')](0x194);}return _0x4d37a4;};}function handleError(_0x54ee5f,_0x5978c1){_0x5978c1=_0x5978c1||0x1f4;return function(_0x58bf1b){logger[_0xd2cb('0x24')](_0x58bf1b[_0xd2cb('0x25')]);if(_0x58bf1b[_0xd2cb('0x26')]){delete _0x58bf1b[_0xd2cb('0x26')];}_0x54ee5f['status'](_0x5978c1)[_0xd2cb('0x27')](_0x58bf1b);};}exports[_0xd2cb('0x28')]=function(_0xd28ae7,_0x238e6e){var _0x45dd41={},_0x1b9614={},_0x27926d={'count':0x0,'rows':[]};var _0x34a145=_[_0xd2cb('0x29')](db[_0xd2cb('0x2a')]['rawAttributes'],function(_0x3b4b77){return{'name':_0x3b4b77[_0xd2cb('0x2b')],'type':_0x3b4b77['type'][_0xd2cb('0x2c')]};});_0x1b9614[_0xd2cb('0x2d')]=_[_0xd2cb('0x29')](_0x34a145,_0xd2cb('0x26'));_0x1b9614['query']=_['keys'](_0xd28ae7[_0xd2cb('0x2e')]);_0x1b9614[_0xd2cb('0x2f')]=_[_0xd2cb('0x30')](_0x1b9614[_0xd2cb('0x2d')],_0x1b9614[_0xd2cb('0x2e')]);_0x45dd41['attributes']=_[_0xd2cb('0x30')](_0x1b9614[_0xd2cb('0x2d')],qs[_0xd2cb('0x31')](_0xd28ae7[_0xd2cb('0x2e')][_0xd2cb('0x31')]));_0x45dd41[_0xd2cb('0x32')]=_0x45dd41[_0xd2cb('0x32')][_0xd2cb('0x33')]?_0x45dd41['attributes']:_0x1b9614[_0xd2cb('0x2d')];if(!_0xd28ae7['query'][_0xd2cb('0x34')](_0xd2cb('0x35'))){_0x45dd41[_0xd2cb('0x1d')]=qs[_0xd2cb('0x1d')](_0xd28ae7[_0xd2cb('0x2e')][_0xd2cb('0x1d')]);_0x45dd41[_0xd2cb('0x1b')]=qs['offset'](_0xd28ae7[_0xd2cb('0x2e')]['offset']);}_0x45dd41['order']=qs[_0xd2cb('0x36')](_0xd28ae7[_0xd2cb('0x2e')][_0xd2cb('0x36')]);_0x45dd41['where']=qs[_0xd2cb('0x2f')](_['pick'](_0xd28ae7[_0xd2cb('0x2e')],_0x1b9614['filters']),_0x34a145);if(_0xd28ae7['query'][_0xd2cb('0x37')]){_0x45dd41[_0xd2cb('0x38')]=_[_0xd2cb('0x39')](_0x45dd41[_0xd2cb('0x38')],{'$or':_[_0xd2cb('0x29')](_0x34a145,function(_0xe19fda){if(_0xe19fda[_0xd2cb('0x3a')]!=='VIRTUAL'){var _0x47bb03={};_0x47bb03[_0xe19fda[_0xd2cb('0x26')]]={'$like':'%'+_0xd28ae7[_0xd2cb('0x2e')][_0xd2cb('0x37')]+'%'};return _0x47bb03;}})});}_0x45dd41=_[_0xd2cb('0x39')]({},_0x45dd41,_0xd28ae7[_0xd2cb('0x3b')]);var _0x552aa7={'where':_0x45dd41[_0xd2cb('0x38')]};return db['ZendeskField']['count'](_0x552aa7)[_0xd2cb('0x22')](function(_0x4df61f){_0x27926d[_0xd2cb('0x1e')]=_0x4df61f;if(_0xd28ae7[_0xd2cb('0x2e')]['includeAll']){_0x45dd41[_0xd2cb('0x3c')]=[{'all':!![]}];}return db[_0xd2cb('0x2a')][_0xd2cb('0x3d')](_0x45dd41);})[_0xd2cb('0x22')](function(_0x260450){_0x27926d['rows']=_0x260450;return _0x27926d;})[_0xd2cb('0x22')](respondWithFilteredResult(_0x238e6e,_0x45dd41))[_0xd2cb('0x3e')](handleError(_0x238e6e,null));};exports[_0xd2cb('0x3f')]=function(_0x2e181d,_0x37b584){var _0x3ee564={'raw':!![],'where':{'id':_0x2e181d[_0xd2cb('0x40')]['id']}},_0x26e204={};_0x26e204['model']=_[_0xd2cb('0x41')](db[_0xd2cb('0x2a')][_0xd2cb('0x42')]);_0x26e204[_0xd2cb('0x2e')]=_[_0xd2cb('0x41')](_0x2e181d[_0xd2cb('0x2e')]);_0x26e204[_0xd2cb('0x2f')]=_[_0xd2cb('0x30')](_0x26e204[_0xd2cb('0x2d')],_0x26e204['query']);_0x3ee564[_0xd2cb('0x32')]=_[_0xd2cb('0x30')](_0x26e204[_0xd2cb('0x2d')],qs[_0xd2cb('0x31')](_0x2e181d[_0xd2cb('0x2e')]['fields']));_0x3ee564[_0xd2cb('0x32')]=_0x3ee564[_0xd2cb('0x32')][_0xd2cb('0x33')]?_0x3ee564[_0xd2cb('0x32')]:_0x26e204['model'];if(_0x2e181d[_0xd2cb('0x2e')][_0xd2cb('0x43')]){_0x3ee564[_0xd2cb('0x3c')]=[{'all':!![]}];}_0x3ee564=_['merge']({},_0x3ee564,_0x2e181d[_0xd2cb('0x3b')]);return db[_0xd2cb('0x2a')][_0xd2cb('0x44')](_0x3ee564)[_0xd2cb('0x22')](handleEntityNotFound(_0x37b584,null))[_0xd2cb('0x22')](respondWithResult(_0x37b584,null))['catch'](handleError(_0x37b584,null));};exports[_0xd2cb('0x45')]=function(_0x3c5b86,_0x5ab1ab){return db[_0xd2cb('0x2a')]['create'](_0x3c5b86[_0xd2cb('0x46')],{})[_0xd2cb('0x22')](respondWithResult(_0x5ab1ab,0xc9))[_0xd2cb('0x3e')](handleError(_0x5ab1ab,null));};exports[_0xd2cb('0x21')]=function(_0x1e716b,_0x3d6d4d){if(_0x1e716b[_0xd2cb('0x46')]['id']){delete _0x1e716b['body']['id'];}return db['ZendeskField']['find']({'where':{'id':_0x1e716b['params']['id']}})[_0xd2cb('0x22')](handleEntityNotFound(_0x3d6d4d,null))['then'](saveUpdates(_0x1e716b[_0xd2cb('0x46')],null))['then'](respondWithResult(_0x3d6d4d,null))[_0xd2cb('0x3e')](handleError(_0x3d6d4d,null));};exports[_0xd2cb('0x23')]=function(_0x2eea67,_0x3a7aaf){return db['ZendeskField']['find']({'where':{'id':_0x2eea67[_0xd2cb('0x40')]['id']}})[_0xd2cb('0x22')](handleEntityNotFound(_0x3a7aaf,null))['then'](removeEntity(_0x3a7aaf,null))['catch'](handleError(_0x3a7aaf,null));}; \ No newline at end of file +var _0x3133=['find','create','body','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','ejs','fs-extra','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','limit','undefined','count','set','Content-Range','reject','save','update','then','stack','send','index','map','rawAttributes','type','key','model','name','query','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','options','ZendeskField','includeAll','include','findAll','catch','show','params','keys'];(function(_0x38ae4f,_0x1d3180){var _0x1e92db=function(_0x1a1cb9){while(--_0x1a1cb9){_0x38ae4f['push'](_0x38ae4f['shift']());}};_0x1e92db(++_0x1d3180);}(_0x3133,0x1cb));var _0x3313=function(_0x439945,_0xf2251b){_0x439945=_0x439945-0x0;var _0x24557a=_0x3133[_0x439945];return _0x24557a;};'use strict';var emlformat=require(_0x3313('0x0'));var rimraf=require(_0x3313('0x1'));var zipdir=require(_0x3313('0x2'));var jsonpatch=require(_0x3313('0x3'));var rp=require(_0x3313('0x4'));var moment=require(_0x3313('0x5'));var BPromise=require(_0x3313('0x6'));var Mustache=require(_0x3313('0x7'));var util=require(_0x3313('0x8'));var path=require('path');var sox=require(_0x3313('0x9'));var csv=require('to-csv');var ejs=require(_0x3313('0xa'));var fs=require('fs');var fs_extra=require(_0x3313('0xb'));var _=require('lodash');var squel=require('squel');var crypto=require(_0x3313('0xc'));var jsforce=require(_0x3313('0xd'));var deskjs=require(_0x3313('0xe'));var toCsv=require(_0x3313('0xf'));var querystring=require(_0x3313('0x10'));var Papa=require(_0x3313('0x11'));var Redis=require(_0x3313('0x12'));var authService=require(_0x3313('0x13'));var qs=require(_0x3313('0x14'));var as=require(_0x3313('0x15'));var hardwareService=require(_0x3313('0x16'));var logger=require(_0x3313('0x17'))(_0x3313('0x18'));var utils=require('../../config/utils');var config=require(_0x3313('0x19'));var licenseUtil=require(_0x3313('0x1a'));var db=require(_0x3313('0x1b'))['db'];function respondWithStatusCode(_0x3c465a,_0x42bc75){_0x42bc75=_0x42bc75||0xcc;return function(_0x1c0482){if(_0x1c0482){return _0x3c465a[_0x3313('0x1c')](_0x42bc75);}return _0x3c465a[_0x3313('0x1d')](_0x42bc75)['end']();};}function respondWithResult(_0x1a7e87,_0x206dac){_0x206dac=_0x206dac||0xc8;return function(_0xdc5f3){if(_0xdc5f3){return _0x1a7e87[_0x3313('0x1d')](_0x206dac)[_0x3313('0x1e')](_0xdc5f3);}};}function respondWithFilteredResult(_0x242417,_0x2679ac){return function(_0x213573){if(_0x213573){var _0x1f66d5=typeof _0x2679ac[_0x3313('0x1f')]==='undefined'&&typeof _0x2679ac[_0x3313('0x20')]===_0x3313('0x21');var _0x159a64=_0x213573['count'];var _0x858ea1=_0x1f66d5?0x0:_0x2679ac[_0x3313('0x1f')];var _0x2cbe5b=_0x1f66d5?_0x213573[_0x3313('0x22')]:_0x2679ac['offset']+_0x2679ac['limit'];var _0x1a79f9;if(_0x2cbe5b>=_0x159a64){_0x2cbe5b=_0x159a64;_0x1a79f9=0xc8;}else{_0x1a79f9=0xce;}_0x242417['status'](_0x1a79f9);return _0x242417[_0x3313('0x23')](_0x3313('0x24'),_0x858ea1+'-'+_0x2cbe5b+'/'+_0x159a64)['json'](_0x213573);}return null;};}function patchUpdates(_0x256d29){return function(_0x488cd7){try{jsonpatch['apply'](_0x488cd7,_0x256d29,!![]);}catch(_0x1715cd){return BPromise[_0x3313('0x25')](_0x1715cd);}return _0x488cd7[_0x3313('0x26')]();};}function saveUpdates(_0x286d34,_0x15b990){return function(_0x5efdb6){if(_0x5efdb6){return _0x5efdb6[_0x3313('0x27')](_0x286d34)[_0x3313('0x28')](function(_0x456f60){return _0x456f60;});}return null;};}function removeEntity(_0x580692,_0x22c067){return function(_0x62fe7a){if(_0x62fe7a){return _0x62fe7a['destroy']()[_0x3313('0x28')](function(){_0x580692[_0x3313('0x1d')](0xcc)['end']();});}};}function handleEntityNotFound(_0x461b15,_0x1a48c1){return function(_0x326a48){if(!_0x326a48){_0x461b15[_0x3313('0x1c')](0x194);}return _0x326a48;};}function handleError(_0x2b86bb,_0x564dd3){_0x564dd3=_0x564dd3||0x1f4;return function(_0x1b95b5){logger['error'](_0x1b95b5[_0x3313('0x29')]);if(_0x1b95b5['name']){delete _0x1b95b5['name'];}_0x2b86bb['status'](_0x564dd3)[_0x3313('0x2a')](_0x1b95b5);};}exports[_0x3313('0x2b')]=function(_0x19ee2e,_0x14ae2e){var _0x13f261={},_0x1220a6={},_0x38a9f4={'count':0x0,'rows':[]};var _0x4f26a6=_[_0x3313('0x2c')](db['ZendeskField'][_0x3313('0x2d')],function(_0x8337af){return{'name':_0x8337af['fieldName'],'type':_0x8337af[_0x3313('0x2e')][_0x3313('0x2f')]};});_0x1220a6[_0x3313('0x30')]=_['map'](_0x4f26a6,_0x3313('0x31'));_0x1220a6[_0x3313('0x32')]=_['keys'](_0x19ee2e[_0x3313('0x32')]);_0x1220a6[_0x3313('0x33')]=_['intersection'](_0x1220a6[_0x3313('0x30')],_0x1220a6[_0x3313('0x32')]);_0x13f261[_0x3313('0x34')]=_[_0x3313('0x35')](_0x1220a6[_0x3313('0x30')],qs[_0x3313('0x36')](_0x19ee2e[_0x3313('0x32')]['fields']));_0x13f261['attributes']=_0x13f261[_0x3313('0x34')][_0x3313('0x37')]?_0x13f261[_0x3313('0x34')]:_0x1220a6[_0x3313('0x30')];if(!_0x19ee2e[_0x3313('0x32')][_0x3313('0x38')](_0x3313('0x39'))){_0x13f261[_0x3313('0x20')]=qs[_0x3313('0x20')](_0x19ee2e[_0x3313('0x32')]['limit']);_0x13f261['offset']=qs[_0x3313('0x1f')](_0x19ee2e[_0x3313('0x32')][_0x3313('0x1f')]);}_0x13f261[_0x3313('0x3a')]=qs['sort'](_0x19ee2e['query'][_0x3313('0x3b')]);_0x13f261[_0x3313('0x3c')]=qs[_0x3313('0x33')](_[_0x3313('0x3d')](_0x19ee2e[_0x3313('0x32')],_0x1220a6[_0x3313('0x33')]),_0x4f26a6);if(_0x19ee2e['query'][_0x3313('0x3e')]){_0x13f261[_0x3313('0x3c')]=_[_0x3313('0x3f')](_0x13f261[_0x3313('0x3c')],{'$or':_[_0x3313('0x2c')](_0x4f26a6,function(_0x1c33d4){if(_0x1c33d4[_0x3313('0x2e')]!=='VIRTUAL'){var _0xa0bd0b={};_0xa0bd0b[_0x1c33d4['name']]={'$like':'%'+_0x19ee2e[_0x3313('0x32')][_0x3313('0x3e')]+'%'};return _0xa0bd0b;}})});}_0x13f261=_['merge']({},_0x13f261,_0x19ee2e[_0x3313('0x40')]);var _0x37beb6={'where':_0x13f261[_0x3313('0x3c')]};return db[_0x3313('0x41')][_0x3313('0x22')](_0x37beb6)[_0x3313('0x28')](function(_0x1b8636){_0x38a9f4[_0x3313('0x22')]=_0x1b8636;if(_0x19ee2e[_0x3313('0x32')][_0x3313('0x42')]){_0x13f261[_0x3313('0x43')]=[{'all':!![]}];}return db[_0x3313('0x41')][_0x3313('0x44')](_0x13f261);})[_0x3313('0x28')](function(_0x9651cc){_0x38a9f4['rows']=_0x9651cc;return _0x38a9f4;})[_0x3313('0x28')](respondWithFilteredResult(_0x14ae2e,_0x13f261))[_0x3313('0x45')](handleError(_0x14ae2e,null));};exports[_0x3313('0x46')]=function(_0x498f5c,_0x44b046){var _0x8e8a6a={'raw':!![],'where':{'id':_0x498f5c[_0x3313('0x47')]['id']}},_0x3807e0={};_0x3807e0[_0x3313('0x30')]=_[_0x3313('0x48')](db[_0x3313('0x41')][_0x3313('0x2d')]);_0x3807e0[_0x3313('0x32')]=_[_0x3313('0x48')](_0x498f5c[_0x3313('0x32')]);_0x3807e0[_0x3313('0x33')]=_[_0x3313('0x35')](_0x3807e0[_0x3313('0x30')],_0x3807e0[_0x3313('0x32')]);_0x8e8a6a['attributes']=_[_0x3313('0x35')](_0x3807e0[_0x3313('0x30')],qs['fields'](_0x498f5c['query'][_0x3313('0x36')]));_0x8e8a6a['attributes']=_0x8e8a6a[_0x3313('0x34')][_0x3313('0x37')]?_0x8e8a6a[_0x3313('0x34')]:_0x3807e0[_0x3313('0x30')];if(_0x498f5c[_0x3313('0x32')][_0x3313('0x42')]){_0x8e8a6a[_0x3313('0x43')]=[{'all':!![]}];}_0x8e8a6a=_['merge']({},_0x8e8a6a,_0x498f5c[_0x3313('0x40')]);return db['ZendeskField'][_0x3313('0x49')](_0x8e8a6a)[_0x3313('0x28')](handleEntityNotFound(_0x44b046,null))[_0x3313('0x28')](respondWithResult(_0x44b046,null))[_0x3313('0x45')](handleError(_0x44b046,null));};exports[_0x3313('0x4a')]=function(_0x30cab7,_0x2075bb){return db[_0x3313('0x41')][_0x3313('0x4a')](_0x30cab7['body'],{})[_0x3313('0x28')](respondWithResult(_0x2075bb,0xc9))[_0x3313('0x45')](handleError(_0x2075bb,null));};exports[_0x3313('0x27')]=function(_0x5172be,_0x1c1f15){if(_0x5172be[_0x3313('0x4b')]['id']){delete _0x5172be[_0x3313('0x4b')]['id'];}return db[_0x3313('0x41')][_0x3313('0x49')]({'where':{'id':_0x5172be['params']['id']}})['then'](handleEntityNotFound(_0x1c1f15,null))['then'](saveUpdates(_0x5172be[_0x3313('0x4b')],null))[_0x3313('0x28')](respondWithResult(_0x1c1f15,null))[_0x3313('0x45')](handleError(_0x1c1f15,null));};exports['destroy']=function(_0x1ee224,_0x91d96c){return db[_0x3313('0x41')][_0x3313('0x49')]({'where':{'id':_0x1ee224['params']['id']}})[_0x3313('0x28')](handleEntityNotFound(_0x91d96c,null))[_0x3313('0x28')](removeEntity(_0x91d96c,null))[_0x3313('0x45')](handleError(_0x91d96c,null));}; \ No newline at end of file diff --git a/server/api/intZendeskField/intZendeskField.model.js b/server/api/intZendeskField/intZendeskField.model.js index d0c3062..652630a 100644 --- a/server/api/intZendeskField/intZendeskField.model.js +++ b/server/api/intZendeskField/intZendeskField.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc0f9=['moment','path','./intZendeskField.attributes','exports','define','int_zendesk_fields','zendesk_unique_index','../../config/logger'];(function(_0xd578cb,_0x2167a3){var _0x775533=function(_0x1c340d){while(--_0x1c340d){_0xd578cb['push'](_0xd578cb['shift']());}};_0x775533(++_0x2167a3);}(_0xc0f9,0x1e7));var _0x9c0f=function(_0x26bafe,_0x13e506){_0x26bafe=_0x26bafe-0x0;var _0x307879=_0xc0f9[_0x26bafe];return _0x307879;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x9c0f('0x0'))('api');var moment=require(_0x9c0f('0x1'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x9c0f('0x2'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x9c0f('0x3'));module[_0x9c0f('0x4')]=function(_0x1e2d17,_0x1b04e1){return _0x1e2d17[_0x9c0f('0x5')]('ZendeskField',attributes,{'tableName':_0x9c0f('0x6'),'paranoid':![],'indexes':[{'name':_0x9c0f('0x7'),'fields':['idField','FieldId'],'unique':!![]}],'timestamps':!![]});}; \ No newline at end of file +var _0x475a=['lodash','util','../../config/logger','moment','request-promise','path','rimraf','./intZendeskField.attributes','define','ZendeskField','int_zendesk_fields','zendesk_unique_index','idField','FieldId'];(function(_0x5951e8,_0x42b9a7){var _0x20a1f5=function(_0x2bc968){while(--_0x2bc968){_0x5951e8['push'](_0x5951e8['shift']());}};_0x20a1f5(++_0x42b9a7);}(_0x475a,0x188));var _0xa475=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x475a[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0xa475('0x0'));var util=require(_0xa475('0x1'));var logger=require(_0xa475('0x2'))('api');var moment=require(_0xa475('0x3'));var BPromise=require('bluebird');var rp=require(_0xa475('0x4'));var fs=require('fs');var path=require(_0xa475('0x5'));var rimraf=require(_0xa475('0x6'));var config=require('../../config/environment');var attributes=require(_0xa475('0x7'));module['exports']=function(_0x5bd893,_0x40c88f){return _0x5bd893[_0xa475('0x8')](_0xa475('0x9'),attributes,{'tableName':_0xa475('0xa'),'paranoid':![],'indexes':[{'name':_0xa475('0xb'),'fields':[_0xa475('0xc'),_0xa475('0xd')],'unique':!![]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intZendeskField/intZendeskField.rpc.js b/server/api/intZendeskField/intZendeskField.rpc.js index 5ad16cc..a659310 100644 --- a/server/api/intZendeskField/intZendeskField.rpc.js +++ b/server/api/intZendeskField/intZendeskField.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe549=['../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','ZendeskField,\x20%s,\x20%s','ZendeskField,\x20%s,\x20%s,\x20%s','request\x20sent','error','message','info','result','catch','lodash','moment','randomstring','../../mysqldb'];(function(_0x463e29,_0xfc1e0c){var _0x4a09ad=function(_0x1a684c){while(--_0x1a684c){_0x463e29['push'](_0x463e29['shift']());}};_0x4a09ad(++_0xfc1e0c);}(_0xe549,0x88));var _0x9e54=function(_0x48f441,_0xe9b34e){_0x48f441=_0x48f441-0x0;var _0x1cb7dd=_0xe549[_0x48f441];return _0x1cb7dd;};'use strict';var _=require(_0x9e54('0x0'));var util=require('util');var moment=require(_0x9e54('0x1'));var BPromise=require('bluebird');var rs=require(_0x9e54('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x9e54('0x3'))['db'];var utils=require(_0x9e54('0x4'));var logger=require(_0x9e54('0x5'))(_0x9e54('0x6'));var config=require(_0x9e54('0x7'));var jayson=require(_0x9e54('0x8'));var client=jayson[_0x9e54('0x9')][_0x9e54('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x25870e,_0x3fee26,_0x36e835){return new BPromise(function(_0x13d245,_0x319c1c){return client[_0x9e54('0xb')](_0x25870e,_0x36e835)['then'](function(_0x237e43){logger['info'](_0x9e54('0xc'),_0x3fee26,'request\x20sent');logger['debug'](_0x9e54('0xd'),_0x3fee26,_0x9e54('0xe'),JSON['stringify'](_0x237e43));if(_0x237e43[_0x9e54('0xf')]){if(_0x237e43[_0x9e54('0xf')]['code']===0x1f4){logger['error'](_0x9e54('0xc'),_0x3fee26,_0x237e43[_0x9e54('0xf')][_0x9e54('0x10')]);return _0x319c1c(_0x237e43['error'][_0x9e54('0x10')]);}logger[_0x9e54('0xf')](_0x9e54('0xc'),_0x3fee26,_0x237e43[_0x9e54('0xf')][_0x9e54('0x10')]);return _0x13d245(_0x237e43[_0x9e54('0xf')][_0x9e54('0x10')]);}else{logger[_0x9e54('0x11')](_0x9e54('0xc'),_0x3fee26,_0x9e54('0xe'));_0x13d245(_0x237e43[_0x9e54('0x12')][_0x9e54('0x10')]);}})[_0x9e54('0x13')](function(_0x4d156a){logger[_0x9e54('0xf')](_0x9e54('0xc'),_0x3fee26,_0x4d156a);_0x319c1c(_0x4d156a);});});} \ No newline at end of file +var _0xa1ac=['util','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then','info','ZendeskField,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','lodash'];(function(_0x50f62d,_0x49e6ff){var _0x1b5b8a=function(_0x3cb7b6){while(--_0x3cb7b6){_0x50f62d['push'](_0x50f62d['shift']());}};_0x1b5b8a(++_0x49e6ff);}(_0xa1ac,0x72));var _0xca1a=function(_0x3f8be9,_0x255470){_0x3f8be9=_0x3f8be9-0x0;var _0x1d198a=_0xa1ac[_0x3f8be9];return _0x1d198a;};'use strict';var _=require(_0xca1a('0x0'));var util=require(_0xca1a('0x1'));var moment=require(_0xca1a('0x2'));var BPromise=require('bluebird');var rs=require(_0xca1a('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xca1a('0x4'))['db'];var utils=require(_0xca1a('0x5'));var logger=require(_0xca1a('0x6'))(_0xca1a('0x7'));var config=require(_0xca1a('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xca1a('0x9')][_0xca1a('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x1d3232,_0x585185,_0x5b186f){return new BPromise(function(_0x3b26d5,_0x3b1ea6){return client[_0xca1a('0xb')](_0x1d3232,_0x5b186f)[_0xca1a('0xc')](function(_0x33486d){logger[_0xca1a('0xd')](_0xca1a('0xe'),_0x585185,_0xca1a('0xf'));logger[_0xca1a('0x10')]('ZendeskField,\x20%s,\x20%s,\x20%s',_0x585185,_0xca1a('0xf'),JSON[_0xca1a('0x11')](_0x33486d));if(_0x33486d[_0xca1a('0x12')]){if(_0x33486d[_0xca1a('0x12')][_0xca1a('0x13')]===0x1f4){logger[_0xca1a('0x12')](_0xca1a('0xe'),_0x585185,_0x33486d['error'][_0xca1a('0x14')]);return _0x3b1ea6(_0x33486d[_0xca1a('0x12')][_0xca1a('0x14')]);}logger[_0xca1a('0x12')]('ZendeskField,\x20%s,\x20%s',_0x585185,_0x33486d[_0xca1a('0x12')][_0xca1a('0x14')]);return _0x3b26d5(_0x33486d['error'][_0xca1a('0x14')]);}else{logger[_0xca1a('0xd')](_0xca1a('0xe'),_0x585185,'request\x20sent');_0x3b26d5(_0x33486d[_0xca1a('0x15')][_0xca1a('0x14')]);}})[_0xca1a('0x16')](function(_0x21dea4){logger[_0xca1a('0x12')](_0xca1a('0xe'),_0x585185,_0x21dea4);_0x3b1ea6(_0x21dea4);});});} \ No newline at end of file diff --git a/server/api/intZohoAccount/index.js b/server/api/intZohoAccount/index.js index e25fb1a..0bb16fc 100644 --- a/server/api/intZohoAccount/index.js +++ b/server/api/intZohoAccount/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8a3b=['fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intZohoAccount.controller','index','get','/:id','isAuthenticated','show','/:id/configurations','getConfigurations','/:id/fields','getFields','post','create','addConfiguration','delete','destroy','exports','Router'];(function(_0x13d95a,_0x15e6d0){var _0x2456b8=function(_0x5a1d30){while(--_0x5a1d30){_0x13d95a['push'](_0x13d95a['shift']());}};_0x2456b8(++_0x15e6d0);}(_0x8a3b,0xa7));var _0xb8a3=function(_0x580576,_0x2f107d){_0x580576=_0x580576-0x0;var _0x3f55a0=_0x8a3b[_0x580576];return _0x3f55a0;};'use strict';var multer=require('multer');var util=require('util');var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0xb8a3('0x0')]();var fs_extra=require(_0xb8a3('0x1'));var auth=require(_0xb8a3('0x2'));var interaction=require(_0xb8a3('0x3'));var config=require(_0xb8a3('0x4'));var controller=require(_0xb8a3('0x5'));router['get']('/',auth['isAuthenticated'](),controller[_0xb8a3('0x6')]);router[_0xb8a3('0x7')](_0xb8a3('0x8'),auth[_0xb8a3('0x9')](),controller[_0xb8a3('0xa')]);router[_0xb8a3('0x7')](_0xb8a3('0xb'),auth[_0xb8a3('0x9')](),controller[_0xb8a3('0xc')]);router[_0xb8a3('0x7')](_0xb8a3('0xd'),auth['isAuthenticated'](),controller[_0xb8a3('0xe')]);router[_0xb8a3('0xf')]('/',auth['isAuthenticated'](),controller[_0xb8a3('0x10')]);router[_0xb8a3('0xf')]('/:id/configurations',auth[_0xb8a3('0x9')](),controller[_0xb8a3('0x11')]);router['put'](_0xb8a3('0x8'),auth[_0xb8a3('0x9')](),controller['update']);router[_0xb8a3('0x12')](_0xb8a3('0x8'),auth[_0xb8a3('0x9')](),controller[_0xb8a3('0x13')]);module[_0xb8a3('0x14')]=router; \ No newline at end of file +var _0x2628=['getConfigurations','/:id/fields','getFields','post','/:id/configurations','addConfiguration','put','update','destroy','exports','path','connect-timeout','express','fs-extra','../../config/environment','./intZohoAccount.controller','/:id','isAuthenticated','get'];(function(_0x52a094,_0x3b1332){var _0x5ed7e4=function(_0x36722e){while(--_0x36722e){_0x52a094['push'](_0x52a094['shift']());}};_0x5ed7e4(++_0x3b1332);}(_0x2628,0x1d2));var _0x8262=function(_0x3560dc,_0x55dad2){_0x3560dc=_0x3560dc-0x0;var _0x10e05c=_0x2628[_0x3560dc];return _0x10e05c;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x8262('0x0'));var timeout=require(_0x8262('0x1'));var express=require(_0x8262('0x2'));var router=express['Router']();var fs_extra=require(_0x8262('0x3'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x8262('0x4'));var controller=require(_0x8262('0x5'));router['get']('/',auth['isAuthenticated'](),controller['index']);router['get'](_0x8262('0x6'),auth[_0x8262('0x7')](),controller['show']);router[_0x8262('0x8')]('/:id/configurations',auth[_0x8262('0x7')](),controller[_0x8262('0x9')]);router['get'](_0x8262('0xa'),auth[_0x8262('0x7')](),controller[_0x8262('0xb')]);router['post']('/',auth['isAuthenticated'](),controller['create']);router[_0x8262('0xc')](_0x8262('0xd'),auth[_0x8262('0x7')](),controller[_0x8262('0xe')]);router[_0x8262('0xf')](_0x8262('0x6'),auth[_0x8262('0x7')](),controller[_0x8262('0x10')]);router['delete'](_0x8262('0x6'),auth[_0x8262('0x7')](),controller[_0x8262('0x11')]);module[_0x8262('0x12')]=router; \ No newline at end of file diff --git a/server/api/intZohoAccount/intZohoAccount.attributes.js b/server/api/intZohoAccount/intZohoAccount.attributes.js index 9a773a7..8f0ddf4 100644 --- a/server/api/intZohoAccount/intZohoAccount.attributes.js +++ b/server/api/intZohoAccount/intZohoAccount.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x00bb=['STRING','sequelize','exports'];(function(_0x352180,_0x357139){var _0x222c5e=function(_0x345b75){while(--_0x345b75){_0x352180['push'](_0x352180['shift']());}};_0x222c5e(++_0x357139);}(_0x00bb,0x1d8));var _0xb00b=function(_0x484e36,_0x4482d8){_0x484e36=_0x484e36-0x0;var _0xafc85d=_0x00bb[_0x484e36];return _0xafc85d;};'use strict';var Sequelize=require(_0xb00b('0x0'));module[_0xb00b('0x1')]={'name':{'type':Sequelize[_0xb00b('0x2')]},'description':{'type':Sequelize['STRING']},'host':{'type':Sequelize[_0xb00b('0x2')]},'zone':{'type':Sequelize['STRING']},'clientId':{'type':Sequelize[_0xb00b('0x2')]},'clientSecret':{'type':Sequelize[_0xb00b('0x2')]},'serverUrl':{'type':Sequelize['STRING'],'allowNull':![]},'code':{'type':Sequelize[_0xb00b('0x2')]},'refreshToken':{'type':Sequelize[_0xb00b('0x2')]}}; \ No newline at end of file +var _0x1be1=['STRING'];(function(_0x13ce6d,_0x5984bf){var _0x397a06=function(_0x57c4bf){while(--_0x57c4bf){_0x13ce6d['push'](_0x13ce6d['shift']());}};_0x397a06(++_0x5984bf);}(_0x1be1,0x192));var _0x11be=function(_0x574159,_0x952110){_0x574159=_0x574159-0x0;var _0x5dd226=_0x1be1[_0x574159];return _0x5dd226;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0x11be('0x0')]},'description':{'type':Sequelize[_0x11be('0x0')]},'host':{'type':Sequelize['STRING']},'zone':{'type':Sequelize[_0x11be('0x0')]},'clientId':{'type':Sequelize[_0x11be('0x0')]},'clientSecret':{'type':Sequelize[_0x11be('0x0')]},'serverUrl':{'type':Sequelize[_0x11be('0x0')],'allowNull':![]},'code':{'type':Sequelize['STRING']},'refreshToken':{'type':Sequelize[_0x11be('0x0')]}}; \ No newline at end of file diff --git a/server/api/intZohoAccount/intZohoAccount.controller.js b/server/api/intZohoAccount/intZohoAccount.controller.js index e240839..1a922ea 100644 --- a/server/api/intZohoAccount/intZohoAccount.controller.js +++ b/server/api/intZohoAccount/intZohoAccount.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa768=['length','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','merge','VIRTUAL','options','findAll','rows','params','rawAttributes','includeAll','find','create','body','update','getConfigurations','findOne','ZohoConfiguration','addConfiguration','AccountId','Subjects','getSubjects','channel','zone','https://accounts.zoho.in','https://accounts.zoho.com.cn','POST','/oauth/v2/token','clientId','clientSecret','refresh_token','access_token','Unable\x20to\x20retrieve\x20the\x20access\x20token','getFields','host','serverUrl','refreshToken','zoho.eu','com','slice','lastIndexOf','GET','format','Calls','Zoho-oauthtoken\x20','response','Owner','Subject','Description','WhoId','Call_Result','Call_Start_Time','Call_Type','system_mandatory','push','custom_field','picklist','pick_list_values','test','statusCode','getFields,\x20%s,\x20%s,\x20%s','Wrong\x20credentials','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../mysqldb','../../components/integrations/configuration','jayson/promise','client','http','then','info','request\x20sent','debug','ZohoAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','ZohoAccount,\x20%s,\x20%s','message','result','catch','status','end','json','limit','undefined','count','offset','set','Content-Range','apply','save','destroy','sendStatus','stack','name','send','map','ZohoAccount','type','key','query','keys','intersection','model','attributes','fields'];(function(_0x445dc4,_0x3764da){var _0x19f060=function(_0x2fcf6f){while(--_0x2fcf6f){_0x445dc4['push'](_0x445dc4['shift']());}};_0x19f060(++_0x3764da);}(_0xa768,0x1d3));var _0x8a76=function(_0x4b0be5,_0x1ed1aa){_0x4b0be5=_0x4b0be5-0x0;var _0x4b2c39=_0xa768[_0x4b0be5];return _0x4b2c39;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x8a76('0x0'));var zipdir=require(_0x8a76('0x1'));var jsonpatch=require(_0x8a76('0x2'));var rp=require(_0x8a76('0x3'));var moment=require(_0x8a76('0x4'));var BPromise=require(_0x8a76('0x5'));var Mustache=require('mustache');var util=require('util');var path=require(_0x8a76('0x6'));var sox=require(_0x8a76('0x7'));var csv=require(_0x8a76('0x8'));var ejs=require(_0x8a76('0x9'));var fs=require('fs');var fs_extra=require(_0x8a76('0xa'));var _=require(_0x8a76('0xb'));var squel=require(_0x8a76('0xc'));var crypto=require(_0x8a76('0xd'));var jsforce=require(_0x8a76('0xe'));var deskjs=require(_0x8a76('0xf'));var toCsv=require(_0x8a76('0x8'));var querystring=require(_0x8a76('0x10'));var Papa=require(_0x8a76('0x11'));var Redis=require(_0x8a76('0x12'));var authService=require('../../components/auth/service');var qs=require(_0x8a76('0x13'));var as=require(_0x8a76('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x8a76('0x15'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x8a76('0x16'))['db'];var integrations=require(_0x8a76('0x17'));var jayson=require(_0x8a76('0x18'));var client=jayson[_0x8a76('0x19')][_0x8a76('0x1a')]({'port':0x232a});function respondWithRpcPromise(_0x5da30b,_0x2f5362,_0x325a60,_0x4f086f){return new BPromise(function(_0x4f646b,_0x3e9800){var _0x5e57cd=_0x4f086f||client;return _0x5e57cd['request'](_0x5da30b,_0x325a60)[_0x8a76('0x1b')](function(_0x5765be){logger[_0x8a76('0x1c')]('ZohoAccount,\x20%s,\x20%s',_0x2f5362,_0x8a76('0x1d'));logger[_0x8a76('0x1e')](_0x8a76('0x1f'),_0x2f5362,_0x8a76('0x1d'),JSON[_0x8a76('0x20')](_0x5765be));if(_0x5765be[_0x8a76('0x21')]){if(_0x5765be[_0x8a76('0x21')][_0x8a76('0x22')]===0x1f4){logger[_0x8a76('0x21')](_0x8a76('0x23'),_0x2f5362,_0x5765be['error'][_0x8a76('0x24')]);return _0x3e9800(_0x5765be['error']['message']);}logger[_0x8a76('0x21')](_0x8a76('0x23'),_0x2f5362,_0x5765be['error']['message']);return _0x4f646b(_0x5765be[_0x8a76('0x21')]['message']);}else{logger[_0x8a76('0x1c')](_0x8a76('0x23'),_0x2f5362,'request\x20sent');_0x4f646b(_0x5765be[_0x8a76('0x25')][_0x8a76('0x24')]);}})[_0x8a76('0x26')](function(_0x2f6341){logger[_0x8a76('0x21')](_0x8a76('0x23'),_0x2f5362,_0x2f6341);_0x3e9800(_0x2f6341);});});}function respondWithStatusCode(_0x1cb9bb,_0x9a7820){_0x9a7820=_0x9a7820||0xcc;return function(_0x21daf4){if(_0x21daf4){return _0x1cb9bb['sendStatus'](_0x9a7820);}return _0x1cb9bb[_0x8a76('0x27')](_0x9a7820)[_0x8a76('0x28')]();};}function respondWithResult(_0x547b57,_0x1dd31a){_0x1dd31a=_0x1dd31a||0xc8;return function(_0x2923c1){if(_0x2923c1){return _0x547b57['status'](_0x1dd31a)[_0x8a76('0x29')](_0x2923c1);}};}function respondWithFilteredResult(_0x5c4eea,_0x54dd7f){return function(_0x4b3665){if(_0x4b3665){var _0x184837=typeof _0x54dd7f['offset']==='undefined'&&typeof _0x54dd7f[_0x8a76('0x2a')]===_0x8a76('0x2b');var _0x1eee6e=_0x4b3665[_0x8a76('0x2c')];var _0x141a86=_0x184837?0x0:_0x54dd7f['offset'];var _0x1725dc=_0x184837?_0x4b3665[_0x8a76('0x2c')]:_0x54dd7f[_0x8a76('0x2d')]+_0x54dd7f['limit'];var _0x21c5f0;if(_0x1725dc>=_0x1eee6e){_0x1725dc=_0x1eee6e;_0x21c5f0=0xc8;}else{_0x21c5f0=0xce;}_0x5c4eea['status'](_0x21c5f0);return _0x5c4eea[_0x8a76('0x2e')](_0x8a76('0x2f'),_0x141a86+'-'+_0x1725dc+'/'+_0x1eee6e)[_0x8a76('0x29')](_0x4b3665);}return null;};}function patchUpdates(_0xad4d0){return function(_0x30c117){try{jsonpatch[_0x8a76('0x30')](_0x30c117,_0xad4d0,!![]);}catch(_0x1c8af4){return BPromise['reject'](_0x1c8af4);}return _0x30c117[_0x8a76('0x31')]();};}function saveUpdates(_0x2a8469,_0x1d3040){return function(_0x57486a){if(_0x57486a){return _0x57486a['update'](_0x2a8469)[_0x8a76('0x1b')](function(_0x57c0ff){return _0x57c0ff;});}return null;};}function removeEntity(_0x4fd42e,_0x4bb8f0){return function(_0x33742d){if(_0x33742d){return _0x33742d[_0x8a76('0x32')]()['then'](function(){_0x4fd42e[_0x8a76('0x27')](0xcc)[_0x8a76('0x28')]();});}};}function handleEntityNotFound(_0x4b5936,_0x2788ca){return function(_0x1c252c){if(!_0x1c252c){_0x4b5936[_0x8a76('0x33')](0x194);}return _0x1c252c;};}function handleError(_0x3691af,_0x3455f5){_0x3455f5=_0x3455f5||0x1f4;return function(_0x2218b5){logger[_0x8a76('0x21')](_0x2218b5[_0x8a76('0x34')]);if(_0x2218b5['name']){delete _0x2218b5[_0x8a76('0x35')];}_0x3691af['status'](_0x3455f5)[_0x8a76('0x36')](_0x2218b5);};}exports['index']=function(_0x522760,_0x2b7baa){var _0x2f3233={},_0x35376f={},_0x1a6702={'count':0x0,'rows':[]};var _0x1df7ec=_[_0x8a76('0x37')](db[_0x8a76('0x38')]['rawAttributes'],function(_0x121070){return{'name':_0x121070['fieldName'],'type':_0x121070[_0x8a76('0x39')][_0x8a76('0x3a')]};});_0x35376f['model']=_[_0x8a76('0x37')](_0x1df7ec,_0x8a76('0x35'));_0x35376f[_0x8a76('0x3b')]=_[_0x8a76('0x3c')](_0x522760['query']);_0x35376f['filters']=_[_0x8a76('0x3d')](_0x35376f[_0x8a76('0x3e')],_0x35376f[_0x8a76('0x3b')]);_0x2f3233[_0x8a76('0x3f')]=_[_0x8a76('0x3d')](_0x35376f[_0x8a76('0x3e')],qs[_0x8a76('0x40')](_0x522760[_0x8a76('0x3b')][_0x8a76('0x40')]));_0x2f3233[_0x8a76('0x3f')]=_0x2f3233[_0x8a76('0x3f')][_0x8a76('0x41')]?_0x2f3233['attributes']:_0x35376f[_0x8a76('0x3e')];if(!_0x522760[_0x8a76('0x3b')][_0x8a76('0x42')](_0x8a76('0x43'))){_0x2f3233[_0x8a76('0x2a')]=qs[_0x8a76('0x2a')](_0x522760['query'][_0x8a76('0x2a')]);_0x2f3233[_0x8a76('0x2d')]=qs['offset'](_0x522760[_0x8a76('0x3b')]['offset']);}_0x2f3233[_0x8a76('0x44')]=qs[_0x8a76('0x45')](_0x522760[_0x8a76('0x3b')][_0x8a76('0x45')]);_0x2f3233[_0x8a76('0x46')]=qs[_0x8a76('0x47')](_[_0x8a76('0x48')](_0x522760['query'],_0x35376f[_0x8a76('0x47')]),_0x1df7ec);if(_0x522760[_0x8a76('0x3b')][_0x8a76('0x49')]){_0x2f3233[_0x8a76('0x46')]=_[_0x8a76('0x4a')](_0x2f3233[_0x8a76('0x46')],{'$or':_[_0x8a76('0x37')](_0x1df7ec,function(_0x49264f){if(_0x49264f[_0x8a76('0x39')]!==_0x8a76('0x4b')){var _0x287784={};_0x287784[_0x49264f[_0x8a76('0x35')]]={'$like':'%'+_0x522760[_0x8a76('0x3b')]['filter']+'%'};return _0x287784;}})});}_0x2f3233=_[_0x8a76('0x4a')]({},_0x2f3233,_0x522760[_0x8a76('0x4c')]);var _0x41d094={'where':_0x2f3233['where']};return db['ZohoAccount'][_0x8a76('0x2c')](_0x41d094)['then'](function(_0x405317){_0x1a6702['count']=_0x405317;if(_0x522760[_0x8a76('0x3b')]['includeAll']){_0x2f3233['include']=[{'all':!![]}];}return db[_0x8a76('0x38')][_0x8a76('0x4d')](_0x2f3233);})[_0x8a76('0x1b')](function(_0x2ea741){_0x1a6702[_0x8a76('0x4e')]=_0x2ea741;return _0x1a6702;})[_0x8a76('0x1b')](respondWithFilteredResult(_0x2b7baa,_0x2f3233))[_0x8a76('0x26')](handleError(_0x2b7baa,null));};exports['show']=function(_0x3a51db,_0xbebe1e){var _0x495954={'raw':![],'where':{'id':_0x3a51db[_0x8a76('0x4f')]['id']}},_0x12433a={};_0x12433a[_0x8a76('0x3e')]=_[_0x8a76('0x3c')](db['ZohoAccount'][_0x8a76('0x50')]);_0x12433a[_0x8a76('0x3b')]=_['keys'](_0x3a51db[_0x8a76('0x3b')]);_0x12433a[_0x8a76('0x47')]=_['intersection'](_0x12433a[_0x8a76('0x3e')],_0x12433a[_0x8a76('0x3b')]);_0x495954[_0x8a76('0x3f')]=_[_0x8a76('0x3d')](_0x12433a['model'],qs[_0x8a76('0x40')](_0x3a51db['query'][_0x8a76('0x40')]));_0x495954['attributes']=_0x495954['attributes'][_0x8a76('0x41')]?_0x495954[_0x8a76('0x3f')]:_0x12433a[_0x8a76('0x3e')];if(_0x3a51db[_0x8a76('0x3b')][_0x8a76('0x51')]){_0x495954['include']=[{'all':!![]}];}_0x495954=_[_0x8a76('0x4a')]({},_0x495954,_0x3a51db[_0x8a76('0x4c')]);return db[_0x8a76('0x38')][_0x8a76('0x52')](_0x495954)['then'](handleEntityNotFound(_0xbebe1e,null))[_0x8a76('0x1b')](respondWithResult(_0xbebe1e,null))[_0x8a76('0x26')](handleError(_0xbebe1e,null));};exports[_0x8a76('0x53')]=function(_0x4945c4,_0x3ebdb3){return db['ZohoAccount'][_0x8a76('0x53')](_0x4945c4[_0x8a76('0x54')],{})[_0x8a76('0x1b')](respondWithResult(_0x3ebdb3,0xc9))['catch'](handleError(_0x3ebdb3,null));};exports[_0x8a76('0x55')]=function(_0x1b9218,_0x52c92e){if(_0x1b9218['body']['id']){delete _0x1b9218['body']['id'];}return db[_0x8a76('0x38')][_0x8a76('0x52')]({'where':{'id':_0x1b9218[_0x8a76('0x4f')]['id']}})[_0x8a76('0x1b')](handleEntityNotFound(_0x52c92e,null))[_0x8a76('0x1b')](saveUpdates(_0x1b9218[_0x8a76('0x54')],null))['then'](respondWithResult(_0x52c92e,null))['catch'](handleError(_0x52c92e,null));};exports[_0x8a76('0x32')]=function(_0x4c434b,_0x31f4f1){return db[_0x8a76('0x38')][_0x8a76('0x52')]({'where':{'id':_0x4c434b[_0x8a76('0x4f')]['id']}})[_0x8a76('0x1b')](handleEntityNotFound(_0x31f4f1,null))[_0x8a76('0x1b')](removeEntity(_0x31f4f1,null))[_0x8a76('0x26')](handleError(_0x31f4f1,null));};exports[_0x8a76('0x56')]=function(_0x2383be,_0x15fc2f,_0xdcd559){var _0x19f12c={};var _0x47fcb8={};var _0x3ffa8c;var _0x2a6169;return db[_0x8a76('0x38')][_0x8a76('0x57')]({'where':{'id':_0x2383be[_0x8a76('0x4f')]['id']}})[_0x8a76('0x1b')](handleEntityNotFound(_0x15fc2f,null))[_0x8a76('0x1b')](function(_0x5defb6){if(_0x5defb6){_0x3ffa8c=_0x5defb6;_0x47fcb8[_0x8a76('0x3e')]=_[_0x8a76('0x3c')](db[_0x8a76('0x58')]['rawAttributes']);_0x47fcb8[_0x8a76('0x3b')]=_['keys'](_0x2383be[_0x8a76('0x3b')]);_0x47fcb8[_0x8a76('0x47')]=_[_0x8a76('0x3d')](_0x47fcb8['model'],_0x47fcb8[_0x8a76('0x3b')]);_0x19f12c['attributes']=_[_0x8a76('0x3d')](_0x47fcb8[_0x8a76('0x3e')],qs[_0x8a76('0x40')](_0x2383be['query'][_0x8a76('0x40')]));_0x19f12c[_0x8a76('0x3f')]=_0x19f12c[_0x8a76('0x3f')][_0x8a76('0x41')]?_0x19f12c[_0x8a76('0x3f')]:_0x47fcb8[_0x8a76('0x3e')];_0x19f12c[_0x8a76('0x44')]=qs[_0x8a76('0x45')](_0x2383be['query'][_0x8a76('0x45')]);_0x19f12c[_0x8a76('0x46')]=qs[_0x8a76('0x47')](_[_0x8a76('0x48')](_0x2383be[_0x8a76('0x3b')],_0x47fcb8[_0x8a76('0x47')]));if(_0x2383be[_0x8a76('0x3b')][_0x8a76('0x49')]){_0x19f12c[_0x8a76('0x46')]=_['merge'](_0x19f12c[_0x8a76('0x46')],{'$or':_[_0x8a76('0x37')](_0x19f12c[_0x8a76('0x3f')],function(_0x419cb6){var _0x20fcd6={};_0x20fcd6[_0x419cb6]={'$like':'%'+_0x2383be[_0x8a76('0x3b')]['filter']+'%'};return _0x20fcd6;})});}_0x19f12c=_[_0x8a76('0x4a')]({},_0x19f12c,_0x2383be['options']);return _0x3ffa8c[_0x8a76('0x56')](_0x19f12c);}})['then'](function(_0x3c9234){if(_0x3c9234){_0x2a6169=_0x3c9234[_0x8a76('0x41')];if(!_0x2383be['query'][_0x8a76('0x42')](_0x8a76('0x43'))){_0x19f12c[_0x8a76('0x2a')]=qs[_0x8a76('0x2a')](_0x2383be[_0x8a76('0x3b')][_0x8a76('0x2a')]);_0x19f12c['offset']=qs[_0x8a76('0x2d')](_0x2383be[_0x8a76('0x3b')][_0x8a76('0x2d')]);}return _0x3ffa8c[_0x8a76('0x56')](_0x19f12c);}})['then'](function(_0x53d66a){if(_0x53d66a){return _0x53d66a?{'count':_0x2a6169,'rows':_0x53d66a}:null;}})['then'](respondWithResult(_0x15fc2f,null))[_0x8a76('0x26')](handleError(_0x15fc2f,null));};exports[_0x8a76('0x59')]=function(_0x245d78,_0x444447,_0x2a8f1e){if(_0x245d78['body']['id']){delete _0x245d78[_0x8a76('0x54')]['id'];}return db[_0x8a76('0x38')]['findOne']({'where':{'id':_0x245d78[_0x8a76('0x4f')]['id']}})[_0x8a76('0x1b')](handleEntityNotFound(_0x444447,null))[_0x8a76('0x1b')](function(_0x2d14e8){if(_0x2d14e8){_0x245d78[_0x8a76('0x54')][_0x8a76('0x5a')]=_0x2d14e8['id'];_0x245d78[_0x8a76('0x54')][_0x8a76('0x5b')]=integrations[_0x8a76('0x5c')](_0x245d78[_0x8a76('0x54')][_0x8a76('0x5d')],_0x245d78['body'][_0x8a76('0x39')]);_0x245d78[_0x8a76('0x54')]['Descriptions']=integrations['getDescriptions'](_0x245d78[_0x8a76('0x54')]['channel'],_0x245d78['body'][_0x8a76('0x39')]);return db['ZohoConfiguration'][_0x8a76('0x53')](_0x245d78[_0x8a76('0x54')],{'include':[{'model':db['ZohoField'],'as':'Subjects'},{'model':db['ZohoField'],'as':'Descriptions'}]});}return null;})[_0x8a76('0x1b')](respondWithResult(_0x444447,null))[_0x8a76('0x26')](handleError(_0x444447,null));};function getAccessToken(_0x488892){return new Promise(function(_0x37aa98,_0x3790d1){var _0x32da92;switch(_0x488892[_0x8a76('0x5e')]){case'US':_0x32da92='https://accounts.zoho.com';break;case'AU':_0x32da92='https://accounts.zoho.com.au';break;case'EU':_0x32da92='https://accounts.zoho.eu';break;case'IN':_0x32da92=_0x8a76('0x5f');break;case'CN':_0x32da92=_0x8a76('0x60');break;default:_0x32da92='https://accounts.zoho.eu';break;}var _0x1beb45={'method':_0x8a76('0x61'),'uri':_0x32da92+_0x8a76('0x62'),'qs':{'refresh_token':_0x488892['refreshToken'],'client_id':_0x488892[_0x8a76('0x63')],'client_secret':_0x488892[_0x8a76('0x64')],'grant_type':_0x8a76('0x65')},'json':!![]};return rp(_0x1beb45)[_0x8a76('0x1b')](function(_0x1f439e){if(_0x1f439e[_0x8a76('0x66')]){_0x37aa98(_0x1f439e[_0x8a76('0x66')]);}else{_0x3790d1(_0x8a76('0x67'));}})[_0x8a76('0x26')](function(_0x587309){_0x3790d1(_0x587309);});});}exports[_0x8a76('0x68')]=function(_0x555628,_0x5a129a,_0x27567c){var _0x1b7690,_0x1ea7d2,_0x5ada6f,_0x15d197,_0x2322d7;return db[_0x8a76('0x38')][_0x8a76('0x57')]({'where':{'id':_0x555628[_0x8a76('0x4f')]['id']},'attributes':['id',_0x8a76('0x69'),_0x8a76('0x5e'),'clientId',_0x8a76('0x64'),_0x8a76('0x6a'),_0x8a76('0x22'),_0x8a76('0x6b')]})['then'](handleEntityNotFound(_0x5a129a,null))[_0x8a76('0x1b')](function(_0x222358){_0x2322d7=_0x222358;_0x1b7690=_0x2322d7['host'];_0x1ea7d2=_0x1b7690===_0x8a76('0x6c')?'eu':_0x8a76('0x6d');_0x5ada6f=_0x2322d7[_0x8a76('0x6a')];var _0x412089=_0x5ada6f[_0x8a76('0x6e')](-0x1);if(_0x412089==='/'||_0x412089==='\x5c'||_0x412089===':'){_0x5ada6f=_0x5ada6f['substring'](0x0,_0x5ada6f[_0x8a76('0x6f')](_0x412089));}if(!_0x2322d7[_0x8a76('0x6b')]){throw new Error('Refresh\x20Token\x20not\x20available\x20for\x20the\x20account');}return getAccessToken(_0x2322d7);})[_0x8a76('0x1b')](function(_0x1b111a){if(_0x1b111a){return rp({'method':_0x8a76('0x70'),'uri':util[_0x8a76('0x71')]('https://www.zohoapis.%s/crm/v2/settings/fields',_0x1ea7d2),'qs':{'module':_0x8a76('0x72')},'headers':{'Authorization':_0x8a76('0x73')+_0x1b111a},'json':!![]});}})[_0x8a76('0x1b')](function(_0xf98f48){if(_0xf98f48){if(_0xf98f48[_0x8a76('0x74')]&&_0xf98f48['response'][_0x8a76('0x21')]){throw new Error(_0xf98f48['response'][_0x8a76('0x21')][_0x8a76('0x24')]);}var _0xe72229=[];var _0x5792b8=[];var _0x52af4a=[_0x8a76('0x75'),_0x8a76('0x76'),_0x8a76('0x77'),_0x8a76('0x78'),'Call_Duration',_0x8a76('0x79'),_0x8a76('0x7a'),_0x8a76('0x7b')];_0x5792b8=_['remove'](_0xf98f48['fields'],function(_0x19dc4b){return _0x52af4a['includes'](_0x19dc4b['api_name']);});for(var _0x5dd64d=0x0;_0x5dd64d<_0x5792b8[_0x8a76('0x41')];_0x5dd64d++){if(_0x5792b8[_0x5dd64d][_0x8a76('0x7c')]===![]){_0xe72229[_0x8a76('0x7d')]({'id':_0x5792b8[_0x5dd64d]['id'],'name':_0x5792b8[_0x5dd64d]['display_label'],'custom':_0x5792b8[_0x5dd64d][_0x8a76('0x7e')],'options':_0x5792b8[_0x5dd64d]['data_type']===_0x8a76('0x7f')&&_0x5792b8[_0x5dd64d][_0x8a76('0x80')]['length']>-0x1?_[_0x8a76('0x37')](_0x5792b8[_0x5dd64d][_0x8a76('0x80')],function(_0xcf7a5b){return{'name':_0xcf7a5b,'value':_0xcf7a5b};}):[]});}}return{'count':_0xe72229[_0x8a76('0x41')],'rows':_0xe72229};}else{return{'count':0x0,'rows':[]};}})['then'](respondWithResult(_0x5a129a,null))['catch'](function(_0x3884a3){var _0x568ad5=_0x555628[_0x8a76('0x3b')][_0x8a76('0x81')]?0x1f4:_0x3884a3[_0x8a76('0x82')]||0x1f4;logger[_0x8a76('0x21')](_0x8a76('0x83'),'getFields',_0x568ad5,JSON[_0x8a76('0x20')](_0x3884a3));delete _0x3884a3[_0x8a76('0x35')];if(_0x568ad5===0x191){_0x568ad5=0x190;}_0x5a129a[_0x8a76('0x27')](_0x568ad5)['send'](_0x555628[_0x8a76('0x3b')][_0x8a76('0x81')]?{'message':_0x8a76('0x84'),'statusCode':_0x3884a3[_0x8a76('0x82')]}:_0x3884a3);});}; \ No newline at end of file +var _0xfd98=['zone','clientSecret','serverUrl','zoho.eu','com','slice','substring','lastIndexOf','Refresh\x20Token\x20not\x20available\x20for\x20the\x20account','GET','format','https://www.zohoapis.%s/crm/v2/settings/fields','Calls','Zoho-oauthtoken\x20','response','Owner','Subject','Description','WhoId','Call_Duration','Call_Result','Call_Start_Time','Call_Type','remove','system_mandatory','push','display_label','custom_field','picklist','pick_list_values','test','statusCode','getFields,\x20%s,\x20%s,\x20%s','getFields','Wrong\x20credentials','rimraf','zip-dir','fast-json-patch','moment','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','../../config/utils','../../components/integrations/configuration','jayson/promise','client','request','then','info','ZohoAccount,\x20%s,\x20%s','request\x20sent','ZohoAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','sendStatus','status','end','json','offset','undefined','count','limit','set','Content-Range','reject','save','destroy','stack','name','index','map','rawAttributes','fieldName','type','model','query','filters','attributes','fields','length','hasOwnProperty','nolimit','order','filter','where','merge','VIRTUAL','options','ZohoAccount','include','rows','show','params','keys','intersection','includeAll','create','body','update','find','getConfigurations','sort','pick','findOne','AccountId','Subjects','getSubjects','channel','Descriptions','ZohoConfiguration','ZohoField','https://accounts.zoho.com','https://accounts.zoho.com.au','https://accounts.zoho.in','https://accounts.zoho.com.cn','https://accounts.zoho.eu','POST','refreshToken','clientId','refresh_token','access_token','Unable\x20to\x20retrieve\x20the\x20access\x20token','host'];(function(_0x267d8d,_0xe90f65){var _0x11a98f=function(_0x5703c9){while(--_0x5703c9){_0x267d8d['push'](_0x267d8d['shift']());}};_0x11a98f(++_0xe90f65);}(_0xfd98,0xaf));var _0x8fd9=function(_0x3372fa,_0x50fbc3){_0x3372fa=_0x3372fa-0x0;var _0x4d436c=_0xfd98[_0x3372fa];return _0x4d436c;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x8fd9('0x0'));var zipdir=require(_0x8fd9('0x1'));var jsonpatch=require(_0x8fd9('0x2'));var rp=require('request-promise');var moment=require(_0x8fd9('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x8fd9('0x4'));var util=require(_0x8fd9('0x5'));var path=require(_0x8fd9('0x6'));var sox=require(_0x8fd9('0x7'));var csv=require(_0x8fd9('0x8'));var ejs=require(_0x8fd9('0x9'));var fs=require('fs');var fs_extra=require(_0x8fd9('0xa'));var _=require(_0x8fd9('0xb'));var squel=require(_0x8fd9('0xc'));var crypto=require('crypto');var jsforce=require(_0x8fd9('0xd'));var deskjs=require(_0x8fd9('0xe'));var toCsv=require(_0x8fd9('0x8'));var querystring=require('querystring');var Papa=require(_0x8fd9('0xf'));var Redis=require(_0x8fd9('0x10'));var authService=require(_0x8fd9('0x11'));var qs=require(_0x8fd9('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x8fd9('0x13'))('api');var utils=require(_0x8fd9('0x14'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];var integrations=require(_0x8fd9('0x15'));var jayson=require(_0x8fd9('0x16'));var client=jayson[_0x8fd9('0x17')]['http']({'port':0x232a});function respondWithRpcPromise(_0x5aa977,_0x56780c,_0x55c473,_0x198a19){return new BPromise(function(_0x1666ee,_0x4dc05c){var _0x4dba8e=_0x198a19||client;return _0x4dba8e[_0x8fd9('0x18')](_0x5aa977,_0x55c473)[_0x8fd9('0x19')](function(_0x320aa3){logger[_0x8fd9('0x1a')](_0x8fd9('0x1b'),_0x56780c,_0x8fd9('0x1c'));logger['debug'](_0x8fd9('0x1d'),_0x56780c,_0x8fd9('0x1c'),JSON[_0x8fd9('0x1e')](_0x320aa3));if(_0x320aa3['error']){if(_0x320aa3[_0x8fd9('0x1f')][_0x8fd9('0x20')]===0x1f4){logger['error']('ZohoAccount,\x20%s,\x20%s',_0x56780c,_0x320aa3[_0x8fd9('0x1f')][_0x8fd9('0x21')]);return _0x4dc05c(_0x320aa3[_0x8fd9('0x1f')][_0x8fd9('0x21')]);}logger[_0x8fd9('0x1f')](_0x8fd9('0x1b'),_0x56780c,_0x320aa3['error'][_0x8fd9('0x21')]);return _0x1666ee(_0x320aa3[_0x8fd9('0x1f')][_0x8fd9('0x21')]);}else{logger['info'](_0x8fd9('0x1b'),_0x56780c,_0x8fd9('0x1c'));_0x1666ee(_0x320aa3[_0x8fd9('0x22')]['message']);}})[_0x8fd9('0x23')](function(_0x151e87){logger[_0x8fd9('0x1f')](_0x8fd9('0x1b'),_0x56780c,_0x151e87);_0x4dc05c(_0x151e87);});});}function respondWithStatusCode(_0x55e0c6,_0x2b15f3){_0x2b15f3=_0x2b15f3||0xcc;return function(_0x2c3ded){if(_0x2c3ded){return _0x55e0c6[_0x8fd9('0x24')](_0x2b15f3);}return _0x55e0c6[_0x8fd9('0x25')](_0x2b15f3)[_0x8fd9('0x26')]();};}function respondWithResult(_0x2a68f1,_0x384705){_0x384705=_0x384705||0xc8;return function(_0x518447){if(_0x518447){return _0x2a68f1['status'](_0x384705)[_0x8fd9('0x27')](_0x518447);}};}function respondWithFilteredResult(_0x3ca40d,_0x1c41e9){return function(_0x1f8e5d){if(_0x1f8e5d){var _0x387b38=typeof _0x1c41e9[_0x8fd9('0x28')]==='undefined'&&typeof _0x1c41e9['limit']===_0x8fd9('0x29');var _0x241b35=_0x1f8e5d[_0x8fd9('0x2a')];var _0x241bcf=_0x387b38?0x0:_0x1c41e9[_0x8fd9('0x28')];var _0x8d228a=_0x387b38?_0x1f8e5d['count']:_0x1c41e9[_0x8fd9('0x28')]+_0x1c41e9[_0x8fd9('0x2b')];var _0x5b5ed1;if(_0x8d228a>=_0x241b35){_0x8d228a=_0x241b35;_0x5b5ed1=0xc8;}else{_0x5b5ed1=0xce;}_0x3ca40d[_0x8fd9('0x25')](_0x5b5ed1);return _0x3ca40d[_0x8fd9('0x2c')](_0x8fd9('0x2d'),_0x241bcf+'-'+_0x8d228a+'/'+_0x241b35)[_0x8fd9('0x27')](_0x1f8e5d);}return null;};}function patchUpdates(_0x3c40bd){return function(_0x337a13){try{jsonpatch['apply'](_0x337a13,_0x3c40bd,!![]);}catch(_0x195209){return BPromise[_0x8fd9('0x2e')](_0x195209);}return _0x337a13[_0x8fd9('0x2f')]();};}function saveUpdates(_0x3a7695,_0x4e3bd6){return function(_0x34b986){if(_0x34b986){return _0x34b986['update'](_0x3a7695)[_0x8fd9('0x19')](function(_0x38fae5){return _0x38fae5;});}return null;};}function removeEntity(_0x2b222c,_0x5ae763){return function(_0x286d99){if(_0x286d99){return _0x286d99[_0x8fd9('0x30')]()['then'](function(){_0x2b222c[_0x8fd9('0x25')](0xcc)[_0x8fd9('0x26')]();});}};}function handleEntityNotFound(_0x1825e4,_0xa5f17f){return function(_0x2e9fe2){if(!_0x2e9fe2){_0x1825e4[_0x8fd9('0x24')](0x194);}return _0x2e9fe2;};}function handleError(_0x5db1bd,_0x364b33){_0x364b33=_0x364b33||0x1f4;return function(_0x4e529b){logger[_0x8fd9('0x1f')](_0x4e529b[_0x8fd9('0x31')]);if(_0x4e529b[_0x8fd9('0x32')]){delete _0x4e529b[_0x8fd9('0x32')];}_0x5db1bd[_0x8fd9('0x25')](_0x364b33)['send'](_0x4e529b);};}exports[_0x8fd9('0x33')]=function(_0x23eb09,_0x5219e1){var _0x3af145={},_0x4630fb={},_0x4b639b={'count':0x0,'rows':[]};var _0x295c37=_[_0x8fd9('0x34')](db['ZohoAccount'][_0x8fd9('0x35')],function(_0x4fa432){return{'name':_0x4fa432[_0x8fd9('0x36')],'type':_0x4fa432[_0x8fd9('0x37')]['key']};});_0x4630fb[_0x8fd9('0x38')]=_[_0x8fd9('0x34')](_0x295c37,_0x8fd9('0x32'));_0x4630fb[_0x8fd9('0x39')]=_['keys'](_0x23eb09[_0x8fd9('0x39')]);_0x4630fb[_0x8fd9('0x3a')]=_['intersection'](_0x4630fb[_0x8fd9('0x38')],_0x4630fb[_0x8fd9('0x39')]);_0x3af145[_0x8fd9('0x3b')]=_['intersection'](_0x4630fb['model'],qs['fields'](_0x23eb09[_0x8fd9('0x39')][_0x8fd9('0x3c')]));_0x3af145['attributes']=_0x3af145['attributes'][_0x8fd9('0x3d')]?_0x3af145[_0x8fd9('0x3b')]:_0x4630fb['model'];if(!_0x23eb09[_0x8fd9('0x39')][_0x8fd9('0x3e')](_0x8fd9('0x3f'))){_0x3af145[_0x8fd9('0x2b')]=qs['limit'](_0x23eb09[_0x8fd9('0x39')]['limit']);_0x3af145[_0x8fd9('0x28')]=qs[_0x8fd9('0x28')](_0x23eb09[_0x8fd9('0x39')][_0x8fd9('0x28')]);}_0x3af145[_0x8fd9('0x40')]=qs['sort'](_0x23eb09[_0x8fd9('0x39')]['sort']);_0x3af145['where']=qs[_0x8fd9('0x3a')](_['pick'](_0x23eb09[_0x8fd9('0x39')],_0x4630fb[_0x8fd9('0x3a')]),_0x295c37);if(_0x23eb09[_0x8fd9('0x39')][_0x8fd9('0x41')]){_0x3af145[_0x8fd9('0x42')]=_[_0x8fd9('0x43')](_0x3af145[_0x8fd9('0x42')],{'$or':_[_0x8fd9('0x34')](_0x295c37,function(_0x3704b8){if(_0x3704b8['type']!==_0x8fd9('0x44')){var _0x68d8bf={};_0x68d8bf[_0x3704b8[_0x8fd9('0x32')]]={'$like':'%'+_0x23eb09[_0x8fd9('0x39')][_0x8fd9('0x41')]+'%'};return _0x68d8bf;}})});}_0x3af145=_['merge']({},_0x3af145,_0x23eb09[_0x8fd9('0x45')]);var _0x2bd983={'where':_0x3af145[_0x8fd9('0x42')]};return db[_0x8fd9('0x46')][_0x8fd9('0x2a')](_0x2bd983)[_0x8fd9('0x19')](function(_0x1b0ee3){_0x4b639b[_0x8fd9('0x2a')]=_0x1b0ee3;if(_0x23eb09['query']['includeAll']){_0x3af145[_0x8fd9('0x47')]=[{'all':!![]}];}return db[_0x8fd9('0x46')]['findAll'](_0x3af145);})[_0x8fd9('0x19')](function(_0x3bd98a){_0x4b639b[_0x8fd9('0x48')]=_0x3bd98a;return _0x4b639b;})[_0x8fd9('0x19')](respondWithFilteredResult(_0x5219e1,_0x3af145))[_0x8fd9('0x23')](handleError(_0x5219e1,null));};exports[_0x8fd9('0x49')]=function(_0x5cd759,_0x52faf0){var _0xd4d343={'raw':![],'where':{'id':_0x5cd759[_0x8fd9('0x4a')]['id']}},_0x31ca2a={};_0x31ca2a[_0x8fd9('0x38')]=_[_0x8fd9('0x4b')](db['ZohoAccount'][_0x8fd9('0x35')]);_0x31ca2a[_0x8fd9('0x39')]=_[_0x8fd9('0x4b')](_0x5cd759[_0x8fd9('0x39')]);_0x31ca2a[_0x8fd9('0x3a')]=_[_0x8fd9('0x4c')](_0x31ca2a[_0x8fd9('0x38')],_0x31ca2a[_0x8fd9('0x39')]);_0xd4d343[_0x8fd9('0x3b')]=_['intersection'](_0x31ca2a[_0x8fd9('0x38')],qs[_0x8fd9('0x3c')](_0x5cd759[_0x8fd9('0x39')][_0x8fd9('0x3c')]));_0xd4d343[_0x8fd9('0x3b')]=_0xd4d343[_0x8fd9('0x3b')]['length']?_0xd4d343[_0x8fd9('0x3b')]:_0x31ca2a['model'];if(_0x5cd759[_0x8fd9('0x39')][_0x8fd9('0x4d')]){_0xd4d343[_0x8fd9('0x47')]=[{'all':!![]}];}_0xd4d343=_[_0x8fd9('0x43')]({},_0xd4d343,_0x5cd759[_0x8fd9('0x45')]);return db[_0x8fd9('0x46')]['find'](_0xd4d343)[_0x8fd9('0x19')](handleEntityNotFound(_0x52faf0,null))[_0x8fd9('0x19')](respondWithResult(_0x52faf0,null))[_0x8fd9('0x23')](handleError(_0x52faf0,null));};exports[_0x8fd9('0x4e')]=function(_0x5a1f90,_0x366eb1){return db['ZohoAccount'][_0x8fd9('0x4e')](_0x5a1f90[_0x8fd9('0x4f')],{})[_0x8fd9('0x19')](respondWithResult(_0x366eb1,0xc9))['catch'](handleError(_0x366eb1,null));};exports[_0x8fd9('0x50')]=function(_0x2efb75,_0x26ff68){if(_0x2efb75[_0x8fd9('0x4f')]['id']){delete _0x2efb75[_0x8fd9('0x4f')]['id'];}return db[_0x8fd9('0x46')][_0x8fd9('0x51')]({'where':{'id':_0x2efb75[_0x8fd9('0x4a')]['id']}})['then'](handleEntityNotFound(_0x26ff68,null))[_0x8fd9('0x19')](saveUpdates(_0x2efb75['body'],null))[_0x8fd9('0x19')](respondWithResult(_0x26ff68,null))['catch'](handleError(_0x26ff68,null));};exports[_0x8fd9('0x30')]=function(_0x4b3b27,_0x123d1e){return db['ZohoAccount'][_0x8fd9('0x51')]({'where':{'id':_0x4b3b27[_0x8fd9('0x4a')]['id']}})[_0x8fd9('0x19')](handleEntityNotFound(_0x123d1e,null))[_0x8fd9('0x19')](removeEntity(_0x123d1e,null))[_0x8fd9('0x23')](handleError(_0x123d1e,null));};exports[_0x8fd9('0x52')]=function(_0x3c66ec,_0x1e7bae,_0x1d06c4){var _0x4e44db={};var _0x51c237={};var _0x4518c2;var _0x240c36;return db['ZohoAccount']['findOne']({'where':{'id':_0x3c66ec['params']['id']}})[_0x8fd9('0x19')](handleEntityNotFound(_0x1e7bae,null))[_0x8fd9('0x19')](function(_0x175ebd){if(_0x175ebd){_0x4518c2=_0x175ebd;_0x51c237[_0x8fd9('0x38')]=_[_0x8fd9('0x4b')](db['ZohoConfiguration'][_0x8fd9('0x35')]);_0x51c237[_0x8fd9('0x39')]=_[_0x8fd9('0x4b')](_0x3c66ec['query']);_0x51c237[_0x8fd9('0x3a')]=_[_0x8fd9('0x4c')](_0x51c237['model'],_0x51c237[_0x8fd9('0x39')]);_0x4e44db[_0x8fd9('0x3b')]=_[_0x8fd9('0x4c')](_0x51c237[_0x8fd9('0x38')],qs[_0x8fd9('0x3c')](_0x3c66ec[_0x8fd9('0x39')][_0x8fd9('0x3c')]));_0x4e44db[_0x8fd9('0x3b')]=_0x4e44db['attributes'][_0x8fd9('0x3d')]?_0x4e44db[_0x8fd9('0x3b')]:_0x51c237[_0x8fd9('0x38')];_0x4e44db[_0x8fd9('0x40')]=qs[_0x8fd9('0x53')](_0x3c66ec[_0x8fd9('0x39')][_0x8fd9('0x53')]);_0x4e44db[_0x8fd9('0x42')]=qs['filters'](_[_0x8fd9('0x54')](_0x3c66ec[_0x8fd9('0x39')],_0x51c237['filters']));if(_0x3c66ec[_0x8fd9('0x39')][_0x8fd9('0x41')]){_0x4e44db[_0x8fd9('0x42')]=_[_0x8fd9('0x43')](_0x4e44db['where'],{'$or':_[_0x8fd9('0x34')](_0x4e44db[_0x8fd9('0x3b')],function(_0x2720da){var _0x3f16f2={};_0x3f16f2[_0x2720da]={'$like':'%'+_0x3c66ec[_0x8fd9('0x39')][_0x8fd9('0x41')]+'%'};return _0x3f16f2;})});}_0x4e44db=_[_0x8fd9('0x43')]({},_0x4e44db,_0x3c66ec[_0x8fd9('0x45')]);return _0x4518c2[_0x8fd9('0x52')](_0x4e44db);}})[_0x8fd9('0x19')](function(_0x335d37){if(_0x335d37){_0x240c36=_0x335d37[_0x8fd9('0x3d')];if(!_0x3c66ec['query']['hasOwnProperty'](_0x8fd9('0x3f'))){_0x4e44db['limit']=qs[_0x8fd9('0x2b')](_0x3c66ec[_0x8fd9('0x39')][_0x8fd9('0x2b')]);_0x4e44db['offset']=qs[_0x8fd9('0x28')](_0x3c66ec[_0x8fd9('0x39')]['offset']);}return _0x4518c2[_0x8fd9('0x52')](_0x4e44db);}})[_0x8fd9('0x19')](function(_0x32da74){if(_0x32da74){return _0x32da74?{'count':_0x240c36,'rows':_0x32da74}:null;}})['then'](respondWithResult(_0x1e7bae,null))['catch'](handleError(_0x1e7bae,null));};exports['addConfiguration']=function(_0xf7b2ed,_0xfc5d11,_0x1a39de){if(_0xf7b2ed[_0x8fd9('0x4f')]['id']){delete _0xf7b2ed['body']['id'];}return db[_0x8fd9('0x46')][_0x8fd9('0x55')]({'where':{'id':_0xf7b2ed[_0x8fd9('0x4a')]['id']}})[_0x8fd9('0x19')](handleEntityNotFound(_0xfc5d11,null))[_0x8fd9('0x19')](function(_0x32e1b4){if(_0x32e1b4){_0xf7b2ed[_0x8fd9('0x4f')][_0x8fd9('0x56')]=_0x32e1b4['id'];_0xf7b2ed[_0x8fd9('0x4f')][_0x8fd9('0x57')]=integrations[_0x8fd9('0x58')](_0xf7b2ed[_0x8fd9('0x4f')][_0x8fd9('0x59')],_0xf7b2ed[_0x8fd9('0x4f')]['type']);_0xf7b2ed[_0x8fd9('0x4f')][_0x8fd9('0x5a')]=integrations['getDescriptions'](_0xf7b2ed[_0x8fd9('0x4f')][_0x8fd9('0x59')],_0xf7b2ed[_0x8fd9('0x4f')][_0x8fd9('0x37')]);return db[_0x8fd9('0x5b')]['create'](_0xf7b2ed[_0x8fd9('0x4f')],{'include':[{'model':db[_0x8fd9('0x5c')],'as':_0x8fd9('0x57')},{'model':db[_0x8fd9('0x5c')],'as':_0x8fd9('0x5a')}]});}return null;})[_0x8fd9('0x19')](respondWithResult(_0xfc5d11,null))[_0x8fd9('0x23')](handleError(_0xfc5d11,null));};function getAccessToken(_0x266488){return new Promise(function(_0x19a7a7,_0x4a668e){var _0x617f76;switch(_0x266488['zone']){case'US':_0x617f76=_0x8fd9('0x5d');break;case'AU':_0x617f76=_0x8fd9('0x5e');break;case'EU':_0x617f76='https://accounts.zoho.eu';break;case'IN':_0x617f76=_0x8fd9('0x5f');break;case'CN':_0x617f76=_0x8fd9('0x60');break;default:_0x617f76=_0x8fd9('0x61');break;}var _0x40bf03={'method':_0x8fd9('0x62'),'uri':_0x617f76+'/oauth/v2/token','qs':{'refresh_token':_0x266488[_0x8fd9('0x63')],'client_id':_0x266488[_0x8fd9('0x64')],'client_secret':_0x266488['clientSecret'],'grant_type':_0x8fd9('0x65')},'json':!![]};return rp(_0x40bf03)['then'](function(_0x1adaa2){if(_0x1adaa2[_0x8fd9('0x66')]){_0x19a7a7(_0x1adaa2[_0x8fd9('0x66')]);}else{_0x4a668e(_0x8fd9('0x67'));}})[_0x8fd9('0x23')](function(_0x4aa48f){_0x4a668e(_0x4aa48f);});});}exports['getFields']=function(_0x28b251,_0x349599,_0x453762){var _0x4ab7dc,_0x468cef,_0x3f0aab,_0x9a688f,_0x37e1f3;return db[_0x8fd9('0x46')][_0x8fd9('0x55')]({'where':{'id':_0x28b251['params']['id']},'attributes':['id',_0x8fd9('0x68'),_0x8fd9('0x69'),'clientId',_0x8fd9('0x6a'),_0x8fd9('0x6b'),_0x8fd9('0x20'),_0x8fd9('0x63')]})[_0x8fd9('0x19')](handleEntityNotFound(_0x349599,null))[_0x8fd9('0x19')](function(_0x2ff791){_0x37e1f3=_0x2ff791;_0x4ab7dc=_0x37e1f3[_0x8fd9('0x68')];_0x468cef=_0x4ab7dc===_0x8fd9('0x6c')?'eu':_0x8fd9('0x6d');_0x3f0aab=_0x37e1f3[_0x8fd9('0x6b')];var _0x556f7a=_0x3f0aab[_0x8fd9('0x6e')](-0x1);if(_0x556f7a==='/'||_0x556f7a==='\x5c'||_0x556f7a===':'){_0x3f0aab=_0x3f0aab[_0x8fd9('0x6f')](0x0,_0x3f0aab[_0x8fd9('0x70')](_0x556f7a));}if(!_0x37e1f3[_0x8fd9('0x63')]){throw new Error(_0x8fd9('0x71'));}return getAccessToken(_0x37e1f3);})[_0x8fd9('0x19')](function(_0x406750){if(_0x406750){return rp({'method':_0x8fd9('0x72'),'uri':util[_0x8fd9('0x73')](_0x8fd9('0x74'),_0x468cef),'qs':{'module':_0x8fd9('0x75')},'headers':{'Authorization':_0x8fd9('0x76')+_0x406750},'json':!![]});}})[_0x8fd9('0x19')](function(_0x161515){if(_0x161515){if(_0x161515[_0x8fd9('0x77')]&&_0x161515['response'][_0x8fd9('0x1f')]){throw new Error(_0x161515[_0x8fd9('0x77')][_0x8fd9('0x1f')]['message']);}var _0xb0ced3=[];var _0x31d19a=[];var _0x573ad9=[_0x8fd9('0x78'),_0x8fd9('0x79'),_0x8fd9('0x7a'),_0x8fd9('0x7b'),_0x8fd9('0x7c'),_0x8fd9('0x7d'),_0x8fd9('0x7e'),_0x8fd9('0x7f')];_0x31d19a=_[_0x8fd9('0x80')](_0x161515['fields'],function(_0x239759){return _0x573ad9['includes'](_0x239759['api_name']);});for(var _0x5e8059=0x0;_0x5e8059<_0x31d19a['length'];_0x5e8059++){if(_0x31d19a[_0x5e8059][_0x8fd9('0x81')]===![]){_0xb0ced3[_0x8fd9('0x82')]({'id':_0x31d19a[_0x5e8059]['id'],'name':_0x31d19a[_0x5e8059][_0x8fd9('0x83')],'custom':_0x31d19a[_0x5e8059][_0x8fd9('0x84')],'options':_0x31d19a[_0x5e8059]['data_type']===_0x8fd9('0x85')&&_0x31d19a[_0x5e8059]['pick_list_values'][_0x8fd9('0x3d')]>-0x1?_['map'](_0x31d19a[_0x5e8059][_0x8fd9('0x86')],function(_0x5ab7b5){return{'name':_0x5ab7b5,'value':_0x5ab7b5};}):[]});}}return{'count':_0xb0ced3[_0x8fd9('0x3d')],'rows':_0xb0ced3};}else{return{'count':0x0,'rows':[]};}})[_0x8fd9('0x19')](respondWithResult(_0x349599,null))[_0x8fd9('0x23')](function(_0x16a2df){var _0x7c66ca=_0x28b251[_0x8fd9('0x39')][_0x8fd9('0x87')]?0x1f4:_0x16a2df[_0x8fd9('0x88')]||0x1f4;logger[_0x8fd9('0x1f')](_0x8fd9('0x89'),_0x8fd9('0x8a'),_0x7c66ca,JSON['stringify'](_0x16a2df));delete _0x16a2df[_0x8fd9('0x32')];if(_0x7c66ca===0x191){_0x7c66ca=0x190;}_0x349599[_0x8fd9('0x25')](_0x7c66ca)['send'](_0x28b251[_0x8fd9('0x39')][_0x8fd9('0x87')]?{'message':_0x8fd9('0x8b'),'statusCode':_0x16a2df[_0x8fd9('0x88')]}:_0x16a2df);});}; \ No newline at end of file diff --git a/server/api/intZohoAccount/intZohoAccount.model.js b/server/api/intZohoAccount/intZohoAccount.model.js index 38f93b1..dedd8c1 100644 --- a/server/api/intZohoAccount/intZohoAccount.model.js +++ b/server/api/intZohoAccount/intZohoAccount.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbe14=['https://accounts.zoho.com.au','https://accounts.zoho.com.cn','https://accounts.zoho.eu','POST','authorization_code','code','application/x-www-form-urlencoded','then','parse','refreshToken','refresh_token','info','format','name','error','ZohoAccount,\x20Unable\x20to\x20generate\x20the\x20refresh\x20token\x20for\x20account\x20\x22%s\x22\x20#%d','inspect','catch','zone','https://accounts.zoho.in','/oauth/v2/token','ZohoAccount,\x20Refresh\x20token\x20successfully\x20generated\x20for\x20account\x20\x22%s\x22\x20#%d','lodash','util','bluebird','path','rimraf','../../config/environment','../../components/integrations/configuration','exports','define','changed','serverUrl','clientId','clientSecret','host','substring','lastIndexOf','https://accounts.zoho.com'];(function(_0x1a30a8,_0x39be48){var _0x56006a=function(_0x2adfd5){while(--_0x2adfd5){_0x1a30a8['push'](_0x1a30a8['shift']());}};_0x56006a(++_0x39be48);}(_0xbe14,0xb2));var _0x4be1=function(_0x397e5f,_0x454c8f){_0x397e5f=_0x397e5f-0x0;var _0x5302b8=_0xbe14[_0x397e5f];return _0x5302b8;};'use strict';var _=require(_0x4be1('0x0'));var util=require(_0x4be1('0x1'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0x4be1('0x2'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x4be1('0x3'));var rimraf=require(_0x4be1('0x4'));var config=require(_0x4be1('0x5'));var attributes=require('./intZohoAccount.attributes');var integrations=require(_0x4be1('0x6'));module[_0x4be1('0x7')]=function(_0x55e23b,_0x3105f5){return _0x55e23b[_0x4be1('0x8')]('ZohoAccount',attributes,{'tableName':'int_zoho_accounts','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeCreate':function(_0x4fd434,_0x25bd31,_0x4b457d){if(_0x4fd434[_0x4be1('0x9')]('zone')||_0x4fd434[_0x4be1('0x9')](_0x4be1('0xa'))||_0x4fd434[_0x4be1('0x9')](_0x4be1('0xb'))||_0x4fd434['changed'](_0x4be1('0xc'))||_0x4fd434['changed']('code')||_0x4fd434[_0x4be1('0x9')](_0x4be1('0xd'))){var _0x8a6c4f,_0x1448ae;_0x8a6c4f=_0x4fd434[_0x4be1('0xa')];var _0x1c3590=_0x8a6c4f['slice'](-0x1);if(_0x1c3590==='/'||_0x1c3590==='\x5c'||_0x1c3590===':'){_0x8a6c4f=_0x8a6c4f[_0x4be1('0xe')](0x0,_0x8a6c4f[_0x4be1('0xf')](_0x1c3590));}switch(_0x4fd434['zone']){case'US':_0x1448ae=_0x4be1('0x10');break;case'AU':_0x1448ae=_0x4be1('0x11');break;case'IN':_0x1448ae='https://accounts.zoho.in';break;case'CN':_0x1448ae=_0x4be1('0x12');break;default:_0x1448ae=_0x4be1('0x13');break;}var _0xe8357d={'method':_0x4be1('0x14'),'uri':_0x1448ae+'/oauth/v2/token','form':{'grant_type':_0x4be1('0x15'),'client_id':_0x4fd434[_0x4be1('0xb')],'client_secret':_0x4fd434[_0x4be1('0xc')],'redirect_uri':_0x4fd434[_0x4be1('0xa')],'code':_0x4fd434[_0x4be1('0x16')]},'headers':{'Content-Type':_0x4be1('0x17')}};return rp(_0xe8357d)[_0x4be1('0x18')](function(_0x1a2699){var _0x4cbbed=JSON[_0x4be1('0x19')](_0x1a2699);if(_0x4cbbed['refresh_token']){_0x4fd434[_0x4be1('0x1a')]=_0x4cbbed[_0x4be1('0x1b')];logger[_0x4be1('0x1c')](util[_0x4be1('0x1d')]('ZohoAccount,\x20Refresh\x20token\x20successfully\x20generated\x20for\x20account\x20\x22%s\x22\x20#%d',_0x4fd434[_0x4be1('0x1e')],_0x4fd434['id']));}else{logger[_0x4be1('0x1f')](util[_0x4be1('0x1d')](_0x4be1('0x20'),_0x4fd434[_0x4be1('0x1e')],_0x4fd434['id']),util[_0x4be1('0x21')](_0x4cbbed,{'showHidden':![],'depth':null}));}return _0x4b457d(null,_0x25bd31);})[_0x4be1('0x22')](function(_0x5a30d6){logger[_0x4be1('0x1f')](util['format'](_0x4be1('0x20'),_0x4fd434['name'],_0x4fd434['id']),util[_0x4be1('0x21')](parsedResult,{'showHidden':![],'depth':null}));return _0x4b457d(_0x5a30d6);});}else{return _0x4b457d(null,_0x25bd31);}},'beforeUpdate':function(_0x58bc61,_0x2608ba,_0x398cc3){if(_0x58bc61[_0x4be1('0x9')]('zone')||_0x58bc61[_0x4be1('0x9')](_0x4be1('0xa'))||_0x58bc61['changed'](_0x4be1('0xb'))||_0x58bc61[_0x4be1('0x9')](_0x4be1('0xc'))||_0x58bc61['changed']('code')||_0x58bc61[_0x4be1('0x9')](_0x4be1('0xd'))){var _0x3e4b6d,_0x18b001;_0x3e4b6d=_0x58bc61[_0x4be1('0xa')];var _0x43c8bc=_0x3e4b6d['slice'](-0x1);if(_0x43c8bc==='/'||_0x43c8bc==='\x5c'||_0x43c8bc===':'){_0x3e4b6d=_0x3e4b6d[_0x4be1('0xe')](0x0,_0x3e4b6d[_0x4be1('0xf')](_0x43c8bc));}switch(_0x58bc61[_0x4be1('0x23')]){case'US':_0x18b001=_0x4be1('0x10');break;case'AU':_0x18b001=_0x4be1('0x11');break;case'IN':_0x18b001=_0x4be1('0x24');break;case'CN':_0x18b001='https://accounts.zoho.com.cn';break;default:_0x18b001=_0x4be1('0x13');break;}var _0x4bf8f2={'method':_0x4be1('0x14'),'uri':_0x18b001+_0x4be1('0x25'),'form':{'grant_type':'authorization_code','client_id':_0x58bc61['clientId'],'client_secret':_0x58bc61['clientSecret'],'redirect_uri':_0x58bc61[_0x4be1('0xa')],'code':_0x58bc61['code']},'headers':{'Content-Type':_0x4be1('0x17')}};return rp(_0x4bf8f2)[_0x4be1('0x18')](function(_0x4583f6){var _0x7df416=JSON[_0x4be1('0x19')](_0x4583f6);if(_0x7df416[_0x4be1('0x1b')]){_0x58bc61[_0x4be1('0x1a')]=_0x7df416[_0x4be1('0x1b')];logger[_0x4be1('0x1c')](util[_0x4be1('0x1d')](_0x4be1('0x26'),_0x58bc61['name'],_0x58bc61['id']));}else{logger[_0x4be1('0x1f')](util[_0x4be1('0x1d')](_0x4be1('0x20'),_0x58bc61[_0x4be1('0x1e')],_0x58bc61['id']),util['inspect'](_0x7df416,{'showHidden':![],'depth':null}));}return _0x398cc3(null,_0x2608ba);})[_0x4be1('0x22')](function(_0x406466){logger['error'](util[_0x4be1('0x1d')]('ZohoAccount,\x20Unable\x20to\x20generate\x20the\x20refresh\x20token\x20for\x20account\x20\x22%s\x22\x20#%d',_0x58bc61[_0x4be1('0x1e')],_0x58bc61['id']),util[_0x4be1('0x21')](parsedResult,{'showHidden':![],'depth':null}));return _0x398cc3(_0x406466);});}else{return _0x398cc3(null,_0x2608ba);}}}});}; \ No newline at end of file +var _0xf889=['then','refresh_token','refreshToken','ZohoAccount,\x20Refresh\x20token\x20successfully\x20generated\x20for\x20account\x20\x22%s\x22\x20#%d','error','format','ZohoAccount,\x20Unable\x20to\x20generate\x20the\x20refresh\x20token\x20for\x20account\x20\x22%s\x22\x20#%d','name','inspect','catch','host','https://accounts.zoho.in','info','lodash','util','../../config/logger','bluebird','request-promise','path','rimraf','./intZohoAccount.attributes','exports','define','ZohoAccount','int_zoho_accounts','changed','zone','clientId','code','serverUrl','slice','substring','lastIndexOf','https://accounts.zoho.com','https://accounts.zoho.com.au','https://accounts.zoho.com.cn','https://accounts.zoho.eu','POST','/oauth/v2/token','authorization_code','clientSecret','application/x-www-form-urlencoded'];(function(_0x11a0b0,_0x13077c){var _0x1382e6=function(_0x562ed0){while(--_0x562ed0){_0x11a0b0['push'](_0x11a0b0['shift']());}};_0x1382e6(++_0x13077c);}(_0xf889,0x1db));var _0x9f88=function(_0x192510,_0x282611){_0x192510=_0x192510-0x0;var _0x5e676d=_0xf889[_0x192510];return _0x5e676d;};'use strict';var _=require(_0x9f88('0x0'));var util=require(_0x9f88('0x1'));var logger=require(_0x9f88('0x2'))('api');var moment=require('moment');var BPromise=require(_0x9f88('0x3'));var rp=require(_0x9f88('0x4'));var fs=require('fs');var path=require(_0x9f88('0x5'));var rimraf=require(_0x9f88('0x6'));var config=require('../../config/environment');var attributes=require(_0x9f88('0x7'));var integrations=require('../../components/integrations/configuration');module[_0x9f88('0x8')]=function(_0x5a7b45,_0x138b15){return _0x5a7b45[_0x9f88('0x9')](_0x9f88('0xa'),attributes,{'tableName':_0x9f88('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeCreate':function(_0x343f27,_0x2bf537,_0x3a6475){if(_0x343f27[_0x9f88('0xc')](_0x9f88('0xd'))||_0x343f27[_0x9f88('0xc')]('serverUrl')||_0x343f27[_0x9f88('0xc')](_0x9f88('0xe'))||_0x343f27[_0x9f88('0xc')]('clientSecret')||_0x343f27['changed'](_0x9f88('0xf'))||_0x343f27['changed']('host')){var _0x5beae9,_0x30506b;_0x5beae9=_0x343f27[_0x9f88('0x10')];var _0x57163d=_0x5beae9[_0x9f88('0x11')](-0x1);if(_0x57163d==='/'||_0x57163d==='\x5c'||_0x57163d===':'){_0x5beae9=_0x5beae9[_0x9f88('0x12')](0x0,_0x5beae9[_0x9f88('0x13')](_0x57163d));}switch(_0x343f27[_0x9f88('0xd')]){case'US':_0x30506b=_0x9f88('0x14');break;case'AU':_0x30506b=_0x9f88('0x15');break;case'IN':_0x30506b='https://accounts.zoho.in';break;case'CN':_0x30506b=_0x9f88('0x16');break;default:_0x30506b=_0x9f88('0x17');break;}var _0x4bb6c1={'method':_0x9f88('0x18'),'uri':_0x30506b+_0x9f88('0x19'),'form':{'grant_type':_0x9f88('0x1a'),'client_id':_0x343f27[_0x9f88('0xe')],'client_secret':_0x343f27[_0x9f88('0x1b')],'redirect_uri':_0x343f27[_0x9f88('0x10')],'code':_0x343f27['code']},'headers':{'Content-Type':_0x9f88('0x1c')}};return rp(_0x4bb6c1)[_0x9f88('0x1d')](function(_0x1059a0){var _0x404088=JSON['parse'](_0x1059a0);if(_0x404088[_0x9f88('0x1e')]){_0x343f27[_0x9f88('0x1f')]=_0x404088['refresh_token'];logger['info'](util['format'](_0x9f88('0x20'),_0x343f27['name'],_0x343f27['id']));}else{logger[_0x9f88('0x21')](util[_0x9f88('0x22')](_0x9f88('0x23'),_0x343f27[_0x9f88('0x24')],_0x343f27['id']),util[_0x9f88('0x25')](_0x404088,{'showHidden':![],'depth':null}));}return _0x3a6475(null,_0x2bf537);})[_0x9f88('0x26')](function(_0xb93fd3){logger['error'](util[_0x9f88('0x22')](_0x9f88('0x23'),_0x343f27[_0x9f88('0x24')],_0x343f27['id']),util[_0x9f88('0x25')](parsedResult,{'showHidden':![],'depth':null}));return _0x3a6475(_0xb93fd3);});}else{return _0x3a6475(null,_0x2bf537);}},'beforeUpdate':function(_0x415e2c,_0x278d67,_0x39c97e){if(_0x415e2c[_0x9f88('0xc')](_0x9f88('0xd'))||_0x415e2c[_0x9f88('0xc')]('serverUrl')||_0x415e2c[_0x9f88('0xc')](_0x9f88('0xe'))||_0x415e2c['changed'](_0x9f88('0x1b'))||_0x415e2c[_0x9f88('0xc')](_0x9f88('0xf'))||_0x415e2c[_0x9f88('0xc')](_0x9f88('0x27'))){var _0x575e21,_0x2ae76a;_0x575e21=_0x415e2c[_0x9f88('0x10')];var _0x182797=_0x575e21['slice'](-0x1);if(_0x182797==='/'||_0x182797==='\x5c'||_0x182797===':'){_0x575e21=_0x575e21[_0x9f88('0x12')](0x0,_0x575e21[_0x9f88('0x13')](_0x182797));}switch(_0x415e2c[_0x9f88('0xd')]){case'US':_0x2ae76a=_0x9f88('0x14');break;case'AU':_0x2ae76a=_0x9f88('0x15');break;case'IN':_0x2ae76a=_0x9f88('0x28');break;case'CN':_0x2ae76a=_0x9f88('0x16');break;default:_0x2ae76a='https://accounts.zoho.eu';break;}var _0x39901f={'method':_0x9f88('0x18'),'uri':_0x2ae76a+_0x9f88('0x19'),'form':{'grant_type':_0x9f88('0x1a'),'client_id':_0x415e2c['clientId'],'client_secret':_0x415e2c[_0x9f88('0x1b')],'redirect_uri':_0x415e2c[_0x9f88('0x10')],'code':_0x415e2c[_0x9f88('0xf')]},'headers':{'Content-Type':_0x9f88('0x1c')}};return rp(_0x39901f)[_0x9f88('0x1d')](function(_0x53b654){var _0x22e41b=JSON['parse'](_0x53b654);if(_0x22e41b[_0x9f88('0x1e')]){_0x415e2c[_0x9f88('0x1f')]=_0x22e41b[_0x9f88('0x1e')];logger[_0x9f88('0x29')](util['format'](_0x9f88('0x20'),_0x415e2c[_0x9f88('0x24')],_0x415e2c['id']));}else{logger[_0x9f88('0x21')](util['format']('ZohoAccount,\x20Unable\x20to\x20generate\x20the\x20refresh\x20token\x20for\x20account\x20\x22%s\x22\x20#%d',_0x415e2c['name'],_0x415e2c['id']),util[_0x9f88('0x25')](_0x22e41b,{'showHidden':![],'depth':null}));}return _0x39c97e(null,_0x278d67);})[_0x9f88('0x26')](function(_0x3deae1){logger['error'](util[_0x9f88('0x22')](_0x9f88('0x23'),_0x415e2c[_0x9f88('0x24')],_0x415e2c['id']),util[_0x9f88('0x25')](parsedResult,{'showHidden':![],'depth':null}));return _0x39c97e(_0x3deae1);});}else{return _0x39c97e(null,_0x278d67);}}}});}; \ No newline at end of file diff --git a/server/api/intZohoAccount/intZohoAccount.rpc.js b/server/api/intZohoAccount/intZohoAccount.rpc.js index 2bcb3b7..f415cc3 100644 --- a/server/api/intZohoAccount/intZohoAccount.rpc.js +++ b/server/api/intZohoAccount/intZohoAccount.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4253=['client','http','request','then','info','ZohoAccount,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','ZohoAccount,\x20%s,\x20%s','result','GetZohoAccount','findAll','options','raw','where','limit','include','map','model','attributes','catch','ShowZohoAccount','ZohoAccount','find','debug','lodash','util','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x3da67f,_0x453576){var _0x389b97=function(_0x3d4cdb){while(--_0x3d4cdb){_0x3da67f['push'](_0x3da67f['shift']());}};_0x389b97(++_0x453576);}(_0x4253,0x14c));var _0x3425=function(_0x51a07a,_0xbd0fc7){_0x51a07a=_0x51a07a-0x0;var _0x57531e=_0x4253[_0x51a07a];return _0x57531e;};'use strict';var _=require(_0x3425('0x0'));var util=require(_0x3425('0x1'));var moment=require('moment');var BPromise=require(_0x3425('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x3425('0x3'));var db=require(_0x3425('0x4'))['db'];var utils=require(_0x3425('0x5'));var logger=require(_0x3425('0x6'))(_0x3425('0x7'));var config=require(_0x3425('0x8'));var jayson=require(_0x3425('0x9'));var client=jayson[_0x3425('0xa')][_0x3425('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x53cc1f,_0x1bb3ca,_0x1994b1){return new BPromise(function(_0x33cbc7,_0x4ce62b){return client[_0x3425('0xc')](_0x53cc1f,_0x1994b1)[_0x3425('0xd')](function(_0x5a2bc6){logger[_0x3425('0xe')]('ZohoAccount,\x20%s,\x20%s',_0x1bb3ca,'request\x20sent');logger['debug'](_0x3425('0xf'),_0x1bb3ca,_0x3425('0x10'),JSON[_0x3425('0x11')](_0x5a2bc6));if(_0x5a2bc6['error']){if(_0x5a2bc6[_0x3425('0x12')][_0x3425('0x13')]===0x1f4){logger[_0x3425('0x12')]('ZohoAccount,\x20%s,\x20%s',_0x1bb3ca,_0x5a2bc6[_0x3425('0x12')][_0x3425('0x14')]);return _0x4ce62b(_0x5a2bc6[_0x3425('0x12')][_0x3425('0x14')]);}logger[_0x3425('0x12')](_0x3425('0x15'),_0x1bb3ca,_0x5a2bc6[_0x3425('0x12')]['message']);return _0x33cbc7(_0x5a2bc6[_0x3425('0x12')]['message']);}else{logger[_0x3425('0xe')](_0x3425('0x15'),_0x1bb3ca,'request\x20sent');_0x33cbc7(_0x5a2bc6[_0x3425('0x16')][_0x3425('0x14')]);}})['catch'](function(_0x13aabd){logger['error'](_0x3425('0x15'),_0x1bb3ca,_0x13aabd);_0x4ce62b(_0x13aabd);});});}exports[_0x3425('0x17')]=function(_0x1565c8){var _0x2156c4=this;return new Promise(function(_0x4d5933,_0xb9b412){return db['ZohoAccount'][_0x3425('0x18')]({'raw':_0x1565c8[_0x3425('0x19')]?_0x1565c8[_0x3425('0x19')][_0x3425('0x1a')]===undefined?!![]:![]:!![],'where':_0x1565c8[_0x3425('0x19')]?_0x1565c8[_0x3425('0x19')][_0x3425('0x1b')]||null:null,'attributes':_0x1565c8[_0x3425('0x19')]?_0x1565c8['options']['attributes']||null:null,'limit':_0x1565c8[_0x3425('0x19')]?_0x1565c8['options'][_0x3425('0x1c')]||null:null,'include':_0x1565c8[_0x3425('0x19')]?_0x1565c8[_0x3425('0x19')][_0x3425('0x1d')]?_[_0x3425('0x1e')](_0x1565c8[_0x3425('0x19')]['include'],function(_0x38b577){return{'model':db[_0x38b577[_0x3425('0x1f')]],'as':_0x38b577['as'],'attributes':_0x38b577[_0x3425('0x20')],'include':_0x38b577[_0x3425('0x1d')]?_['map'](_0x38b577[_0x3425('0x1d')],function(_0x31d4d5){return{'model':db[_0x31d4d5[_0x3425('0x1f')]],'as':_0x31d4d5['as'],'attributes':_0x31d4d5[_0x3425('0x20')],'include':_0x31d4d5[_0x3425('0x1d')]?_[_0x3425('0x1e')](_0x31d4d5[_0x3425('0x1d')],function(_0x2638b5){return{'model':db[_0x2638b5[_0x3425('0x1f')]],'as':_0x2638b5['as'],'attributes':_0x2638b5[_0x3425('0x20')]};}):[]};}):[]};}):[]:[]})[_0x3425('0xd')](function(_0x16c50a){logger[_0x3425('0xe')](_0x3425('0x17'),_0x1565c8);logger['debug'](_0x3425('0x17'),_0x1565c8,JSON[_0x3425('0x11')](_0x16c50a));_0x4d5933(_0x16c50a);})[_0x3425('0x21')](function(_0x27f416){logger[_0x3425('0x12')](_0x3425('0x17'),_0x27f416[_0x3425('0x14')],_0x1565c8);_0xb9b412(_0x2156c4[_0x3425('0x12')](0x1f4,_0x27f416[_0x3425('0x14')]));});});};exports[_0x3425('0x22')]=function(_0x24b353){var _0xf4111=this;return new Promise(function(_0x256a64,_0x425753){return db[_0x3425('0x23')][_0x3425('0x24')]({'raw':_0x24b353[_0x3425('0x19')]?_0x24b353[_0x3425('0x19')]['raw']===undefined?!![]:![]:!![],'where':_0x24b353[_0x3425('0x19')]?_0x24b353[_0x3425('0x19')][_0x3425('0x1b')]||null:null,'attributes':_0x24b353['options']?_0x24b353[_0x3425('0x19')][_0x3425('0x20')]||null:null,'include':_0x24b353[_0x3425('0x19')]?_0x24b353[_0x3425('0x19')][_0x3425('0x1d')]?_[_0x3425('0x1e')](_0x24b353[_0x3425('0x19')][_0x3425('0x1d')],function(_0x7b658c){return{'model':db[_0x7b658c[_0x3425('0x1f')]],'as':_0x7b658c['as'],'attributes':_0x7b658c[_0x3425('0x20')],'include':_0x7b658c[_0x3425('0x1d')]?_['map'](_0x7b658c[_0x3425('0x1d')],function(_0x3efee9){return{'model':db[_0x3efee9[_0x3425('0x1f')]],'as':_0x3efee9['as'],'attributes':_0x3efee9[_0x3425('0x20')],'include':_0x3efee9[_0x3425('0x1d')]?_[_0x3425('0x1e')](_0x3efee9[_0x3425('0x1d')],function(_0x22ef8e){return{'model':db[_0x22ef8e[_0x3425('0x1f')]],'as':_0x22ef8e['as'],'attributes':_0x22ef8e[_0x3425('0x20')]};}):[]};}):[]};}):[]:[]})[_0x3425('0xd')](function(_0xda59ce){logger['info'](_0x3425('0x22'),_0x24b353);logger[_0x3425('0x25')](_0x3425('0x22'),_0x24b353,JSON[_0x3425('0x11')](_0xda59ce));_0x256a64(_0xda59ce);})[_0x3425('0x21')](function(_0x21e67e){logger[_0x3425('0x12')](_0x3425('0x22'),_0x21e67e[_0x3425('0x14')],_0x24b353);_0x425753(_0xf4111[_0x3425('0x12')](0x1f4,_0x21e67e[_0x3425('0x14')]));});});}; \ No newline at end of file +var _0xf3a8=['message','catch','ZohoAccount','findAll','options','raw','where','attributes','limit','include','map','model','then','info','GetZohoAccount','stringify','ShowZohoAccount','find','util','moment','randomstring','../../config/utils','rpc','jayson/promise','client','http','request','ZohoAccount,\x20%s,\x20%s','request\x20sent','debug','ZohoAccount,\x20%s,\x20%s,\x20%s','error'];(function(_0x190417,_0x54dc0d){var _0x110e9c=function(_0x517b86){while(--_0x517b86){_0x190417['push'](_0x190417['shift']());}};_0x110e9c(++_0x54dc0d);}(_0xf3a8,0xf2));var _0x8f3a=function(_0x1513ca,_0x49ce0f){_0x1513ca=_0x1513ca-0x0;var _0x1771c9=_0xf3a8[_0x1513ca];return _0x1771c9;};'use strict';var _=require('lodash');var util=require(_0x8f3a('0x0'));var moment=require(_0x8f3a('0x1'));var BPromise=require('bluebird');var rs=require(_0x8f3a('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x8f3a('0x3'));var logger=require('../../config/logger')(_0x8f3a('0x4'));var config=require('../../config/environment');var jayson=require(_0x8f3a('0x5'));var client=jayson[_0x8f3a('0x6')][_0x8f3a('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x32bb3a,_0xc50ed8,_0x2e290d){return new BPromise(function(_0x3dc1ea,_0xcfad11){return client[_0x8f3a('0x8')](_0x32bb3a,_0x2e290d)['then'](function(_0x2164ba){logger['info'](_0x8f3a('0x9'),_0xc50ed8,_0x8f3a('0xa'));logger[_0x8f3a('0xb')](_0x8f3a('0xc'),_0xc50ed8,_0x8f3a('0xa'),JSON['stringify'](_0x2164ba));if(_0x2164ba[_0x8f3a('0xd')]){if(_0x2164ba[_0x8f3a('0xd')]['code']===0x1f4){logger[_0x8f3a('0xd')]('ZohoAccount,\x20%s,\x20%s',_0xc50ed8,_0x2164ba['error'][_0x8f3a('0xe')]);return _0xcfad11(_0x2164ba[_0x8f3a('0xd')]['message']);}logger[_0x8f3a('0xd')](_0x8f3a('0x9'),_0xc50ed8,_0x2164ba[_0x8f3a('0xd')]['message']);return _0x3dc1ea(_0x2164ba[_0x8f3a('0xd')][_0x8f3a('0xe')]);}else{logger['info'](_0x8f3a('0x9'),_0xc50ed8,_0x8f3a('0xa'));_0x3dc1ea(_0x2164ba['result'][_0x8f3a('0xe')]);}})[_0x8f3a('0xf')](function(_0x9bf803){logger[_0x8f3a('0xd')](_0x8f3a('0x9'),_0xc50ed8,_0x9bf803);_0xcfad11(_0x9bf803);});});}exports['GetZohoAccount']=function(_0x451aee){var _0x2b05ef=this;return new Promise(function(_0x17c14c,_0x3a0b94){return db[_0x8f3a('0x10')][_0x8f3a('0x11')]({'raw':_0x451aee['options']?_0x451aee[_0x8f3a('0x12')][_0x8f3a('0x13')]===undefined?!![]:![]:!![],'where':_0x451aee[_0x8f3a('0x12')]?_0x451aee['options'][_0x8f3a('0x14')]||null:null,'attributes':_0x451aee['options']?_0x451aee[_0x8f3a('0x12')][_0x8f3a('0x15')]||null:null,'limit':_0x451aee[_0x8f3a('0x12')]?_0x451aee[_0x8f3a('0x12')][_0x8f3a('0x16')]||null:null,'include':_0x451aee['options']?_0x451aee[_0x8f3a('0x12')][_0x8f3a('0x17')]?_[_0x8f3a('0x18')](_0x451aee[_0x8f3a('0x12')][_0x8f3a('0x17')],function(_0x5a72d4){return{'model':db[_0x5a72d4['model']],'as':_0x5a72d4['as'],'attributes':_0x5a72d4[_0x8f3a('0x15')],'include':_0x5a72d4['include']?_[_0x8f3a('0x18')](_0x5a72d4[_0x8f3a('0x17')],function(_0x5e47ab){return{'model':db[_0x5e47ab['model']],'as':_0x5e47ab['as'],'attributes':_0x5e47ab['attributes'],'include':_0x5e47ab['include']?_[_0x8f3a('0x18')](_0x5e47ab['include'],function(_0x48128e){return{'model':db[_0x48128e[_0x8f3a('0x19')]],'as':_0x48128e['as'],'attributes':_0x48128e[_0x8f3a('0x15')]};}):[]};}):[]};}):[]:[]})[_0x8f3a('0x1a')](function(_0x87656f){logger[_0x8f3a('0x1b')](_0x8f3a('0x1c'),_0x451aee);logger[_0x8f3a('0xb')](_0x8f3a('0x1c'),_0x451aee,JSON[_0x8f3a('0x1d')](_0x87656f));_0x17c14c(_0x87656f);})[_0x8f3a('0xf')](function(_0x49b8a5){logger[_0x8f3a('0xd')]('GetZohoAccount',_0x49b8a5[_0x8f3a('0xe')],_0x451aee);_0x3a0b94(_0x2b05ef[_0x8f3a('0xd')](0x1f4,_0x49b8a5[_0x8f3a('0xe')]));});});};exports[_0x8f3a('0x1e')]=function(_0x1ba5ef){var _0x5f5874=this;return new Promise(function(_0x3d7414,_0x1c6255){return db[_0x8f3a('0x10')][_0x8f3a('0x1f')]({'raw':_0x1ba5ef[_0x8f3a('0x12')]?_0x1ba5ef['options'][_0x8f3a('0x13')]===undefined?!![]:![]:!![],'where':_0x1ba5ef[_0x8f3a('0x12')]?_0x1ba5ef[_0x8f3a('0x12')][_0x8f3a('0x14')]||null:null,'attributes':_0x1ba5ef[_0x8f3a('0x12')]?_0x1ba5ef[_0x8f3a('0x12')][_0x8f3a('0x15')]||null:null,'include':_0x1ba5ef[_0x8f3a('0x12')]?_0x1ba5ef['options']['include']?_['map'](_0x1ba5ef[_0x8f3a('0x12')][_0x8f3a('0x17')],function(_0x1ea7ba){return{'model':db[_0x1ea7ba[_0x8f3a('0x19')]],'as':_0x1ea7ba['as'],'attributes':_0x1ea7ba['attributes'],'include':_0x1ea7ba[_0x8f3a('0x17')]?_[_0x8f3a('0x18')](_0x1ea7ba[_0x8f3a('0x17')],function(_0x123db1){return{'model':db[_0x123db1[_0x8f3a('0x19')]],'as':_0x123db1['as'],'attributes':_0x123db1[_0x8f3a('0x15')],'include':_0x123db1[_0x8f3a('0x17')]?_['map'](_0x123db1[_0x8f3a('0x17')],function(_0x3e4c2e){return{'model':db[_0x3e4c2e[_0x8f3a('0x19')]],'as':_0x3e4c2e['as'],'attributes':_0x3e4c2e['attributes']};}):[]};}):[]};}):[]:[]})[_0x8f3a('0x1a')](function(_0x3904a0){logger[_0x8f3a('0x1b')](_0x8f3a('0x1e'),_0x1ba5ef);logger[_0x8f3a('0xb')]('ShowZohoAccount',_0x1ba5ef,JSON['stringify'](_0x3904a0));_0x3d7414(_0x3904a0);})[_0x8f3a('0xf')](function(_0x37bbd3){logger[_0x8f3a('0xd')](_0x8f3a('0x1e'),_0x37bbd3[_0x8f3a('0xe')],_0x1ba5ef);_0x1c6255(_0x5f5874[_0x8f3a('0xd')](0x1f4,_0x37bbd3[_0x8f3a('0xe')]));});});}; \ No newline at end of file diff --git a/server/api/intZohoConfiguration/index.js b/server/api/intZohoConfiguration/index.js index 0193dd8..385b683 100644 --- a/server/api/intZohoConfiguration/index.js +++ b/server/api/intZohoConfiguration/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xab31=['getDescriptions','post','put','update','delete','destroy','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./intZohoConfiguration.controller','get','isAuthenticated','index','/:id','show','getFields','/:id/subjects','/:id/descriptions'];(function(_0x2f5a22,_0x5e9f03){var _0x326b70=function(_0x1b7bf9){while(--_0x1b7bf9){_0x2f5a22['push'](_0x2f5a22['shift']());}};_0x326b70(++_0x5e9f03);}(_0xab31,0x10e));var _0x1ab3=function(_0x5cc9d6,_0xc0f634){_0x5cc9d6=_0x5cc9d6-0x0;var _0x3c626c=_0xab31[_0x5cc9d6];return _0x3c626c;};'use strict';var multer=require(_0x1ab3('0x0'));var util=require(_0x1ab3('0x1'));var path=require(_0x1ab3('0x2'));var timeout=require(_0x1ab3('0x3'));var express=require(_0x1ab3('0x4'));var router=express[_0x1ab3('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0x1ab3('0x6'));var interaction=require(_0x1ab3('0x7'));var config=require(_0x1ab3('0x8'));var controller=require(_0x1ab3('0x9'));router[_0x1ab3('0xa')]('/',auth[_0x1ab3('0xb')](),controller[_0x1ab3('0xc')]);router[_0x1ab3('0xa')](_0x1ab3('0xd'),auth[_0x1ab3('0xb')](),controller[_0x1ab3('0xe')]);router[_0x1ab3('0xa')]('/:id/fields',auth['isAuthenticated'](),controller[_0x1ab3('0xf')]);router[_0x1ab3('0xa')](_0x1ab3('0x10'),auth['isAuthenticated'](),controller['getSubjects']);router[_0x1ab3('0xa')](_0x1ab3('0x11'),auth[_0x1ab3('0xb')](),controller[_0x1ab3('0x12')]);router[_0x1ab3('0x13')]('/',auth[_0x1ab3('0xb')](),controller['create']);router[_0x1ab3('0x14')](_0x1ab3('0xd'),auth[_0x1ab3('0xb')](),controller[_0x1ab3('0x15')]);router[_0x1ab3('0x16')](_0x1ab3('0xd'),auth[_0x1ab3('0xb')](),controller[_0x1ab3('0x17')]);module['exports']=router; \ No newline at end of file +var _0x50a6=['path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','show','/:id/descriptions','post','create','/:id','delete','destroy','multer','util'];(function(_0x2f7575,_0x4f3d55){var _0x59b985=function(_0x112141){while(--_0x112141){_0x2f7575['push'](_0x2f7575['shift']());}};_0x59b985(++_0x4f3d55);}(_0x50a6,0x1ca));var _0x650a=function(_0xa970d1,_0x8e9f98){_0xa970d1=_0xa970d1-0x0;var _0x4c5a31=_0x50a6[_0xa970d1];return _0x4c5a31;};'use strict';var multer=require(_0x650a('0x0'));var util=require(_0x650a('0x1'));var path=require(_0x650a('0x2'));var timeout=require(_0x650a('0x3'));var express=require(_0x650a('0x4'));var router=express[_0x650a('0x5')]();var fs_extra=require(_0x650a('0x6'));var auth=require(_0x650a('0x7'));var interaction=require(_0x650a('0x8'));var config=require(_0x650a('0x9'));var controller=require('./intZohoConfiguration.controller');router[_0x650a('0xa')]('/',auth[_0x650a('0xb')](),controller[_0x650a('0xc')]);router['get']('/:id',auth[_0x650a('0xb')](),controller[_0x650a('0xd')]);router[_0x650a('0xa')]('/:id/fields',auth[_0x650a('0xb')](),controller['getFields']);router[_0x650a('0xa')]('/:id/subjects',auth[_0x650a('0xb')](),controller['getSubjects']);router[_0x650a('0xa')](_0x650a('0xe'),auth[_0x650a('0xb')](),controller['getDescriptions']);router[_0x650a('0xf')]('/',auth['isAuthenticated'](),controller[_0x650a('0x10')]);router['put'](_0x650a('0x11'),auth[_0x650a('0xb')](),controller['update']);router[_0x650a('0x12')]('/:id',auth[_0x650a('0xb')](),controller[_0x650a('0x13')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/intZohoConfiguration/intZohoConfiguration.attributes.js b/server/api/intZohoConfiguration/intZohoConfiguration.attributes.js index 24286e2..4eea4df 100644 --- a/server/api/intZohoConfiguration/intZohoConfiguration.attributes.js +++ b/server/api/intZohoConfiguration/intZohoConfiguration.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x643e=['contact','sequelize','STRING','lead','ENUM','contact_lead'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x643e,0x193));var _0xe643=function(_0x4e4c27,_0x1751e5){_0x4e4c27=_0x4e4c27-0x0;var _0x599324=_0x643e[_0x4e4c27];return _0x599324;};'use strict';var Sequelize=require(_0xe643('0x0'));module['exports']={'name':{'type':Sequelize[_0xe643('0x1')]},'moduleCreate':{'type':Sequelize['ENUM'](_0xe643('0x2'),'contact','nothing'),'defaultValue':_0xe643('0x2')},'moduleSearch':{'type':Sequelize[_0xe643('0x3')](_0xe643('0x4'),_0xe643('0x5'),'lead'),'defaultValue':'contact_lead'},'description':{'type':Sequelize[_0xe643('0x1')]}}; \ No newline at end of file +var _0x07d5=['STRING','ENUM','lead','contact','contact_lead','sequelize','exports'];(function(_0x45c961,_0x540511){var _0x8ec48c=function(_0x530151){while(--_0x530151){_0x45c961['push'](_0x45c961['shift']());}};_0x8ec48c(++_0x540511);}(_0x07d5,0x15c));var _0x507d=function(_0x491fad,_0x3a39c1){_0x491fad=_0x491fad-0x0;var _0x1f4758=_0x07d5[_0x491fad];return _0x1f4758;};'use strict';var Sequelize=require(_0x507d('0x0'));module[_0x507d('0x1')]={'name':{'type':Sequelize[_0x507d('0x2')]},'moduleCreate':{'type':Sequelize[_0x507d('0x3')](_0x507d('0x4'),_0x507d('0x5'),'nothing'),'defaultValue':_0x507d('0x4')},'moduleSearch':{'type':Sequelize['ENUM'](_0x507d('0x6'),_0x507d('0x5'),_0x507d('0x4')),'defaultValue':_0x507d('0x6')},'description':{'type':Sequelize['STRING']}}; \ No newline at end of file diff --git a/server/api/intZohoConfiguration/intZohoConfiguration.controller.js b/server/api/intZohoConfiguration/intZohoConfiguration.controller.js index 3eeb537..255e058 100644 --- a/server/api/intZohoConfiguration/intZohoConfiguration.controller.js +++ b/server/api/intZohoConfiguration/intZohoConfiguration.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6dff=['squel','jsforce','desk.js','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/license/util','jayson/promise','client','http','request','then','info','ZohoConfiguration,\x20%s,\x20%s','request\x20sent','debug','error','code','message','result','catch','status','end','json','offset','undefined','limit','count','Content-Range','apply','reject','update','destroy','sendStatus','stack','name','index','map','ZohoConfiguration','rawAttributes','fieldName','type','key','keys','intersection','model','attributes','query','fields','length','hasOwnProperty','nolimit','order','sort','where','filters','merge','VIRTUAL','filter','includeAll','include','findAll','rows','show','options','create','body','find','params','getFields','ZohoField','pick','getSubjects','findOne','getDescriptions','rimraf','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash'];(function(_0x169f86,_0xadf81f){var _0x30cced=function(_0x84611b){while(--_0x84611b){_0x169f86['push'](_0x169f86['shift']());}};_0x30cced(++_0xadf81f);}(_0x6dff,0x158));var _0xf6df=function(_0x1844c0,_0x29d3d3){_0x1844c0=_0x1844c0-0x0;var _0x1648ab=_0x6dff[_0x1844c0];return _0x1648ab;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xf6df('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0xf6df('0x1'));var rp=require(_0xf6df('0x2'));var moment=require('moment');var BPromise=require(_0xf6df('0x3'));var Mustache=require(_0xf6df('0x4'));var util=require(_0xf6df('0x5'));var path=require(_0xf6df('0x6'));var sox=require(_0xf6df('0x7'));var csv=require(_0xf6df('0x8'));var ejs=require(_0xf6df('0x9'));var fs=require('fs');var fs_extra=require(_0xf6df('0xa'));var _=require(_0xf6df('0xb'));var squel=require(_0xf6df('0xc'));var crypto=require('crypto');var jsforce=require(_0xf6df('0xd'));var deskjs=require(_0xf6df('0xe'));var toCsv=require(_0xf6df('0x8'));var querystring=require('querystring');var Papa=require(_0xf6df('0xf'));var Redis=require(_0xf6df('0x10'));var authService=require('../../components/auth/service');var qs=require(_0xf6df('0x11'));var as=require(_0xf6df('0x12'));var hardwareService=require(_0xf6df('0x13'));var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0xf6df('0x14'));var db=require('../../mysqldb')['db'];var jayson=require(_0xf6df('0x15'));var client=jayson[_0xf6df('0x16')][_0xf6df('0x17')]({'port':0x232a});function respondWithRpcPromise(_0x4ef518,_0x2abd2a,_0xfca1f1,_0x5486dd){return new BPromise(function(_0x57ca59,_0x3d81bc){var _0x44eb1a=_0x5486dd||client;return _0x44eb1a[_0xf6df('0x18')](_0x4ef518,_0xfca1f1)[_0xf6df('0x19')](function(_0x172e2b){logger[_0xf6df('0x1a')](_0xf6df('0x1b'),_0x2abd2a,_0xf6df('0x1c'));logger[_0xf6df('0x1d')]('ZohoConfiguration,\x20%s,\x20%s,\x20%s',_0x2abd2a,_0xf6df('0x1c'),JSON['stringify'](_0x172e2b));if(_0x172e2b[_0xf6df('0x1e')]){if(_0x172e2b['error'][_0xf6df('0x1f')]===0x1f4){logger[_0xf6df('0x1e')]('ZohoConfiguration,\x20%s,\x20%s',_0x2abd2a,_0x172e2b[_0xf6df('0x1e')][_0xf6df('0x20')]);return _0x3d81bc(_0x172e2b[_0xf6df('0x1e')][_0xf6df('0x20')]);}logger[_0xf6df('0x1e')](_0xf6df('0x1b'),_0x2abd2a,_0x172e2b[_0xf6df('0x1e')]['message']);return _0x57ca59(_0x172e2b[_0xf6df('0x1e')][_0xf6df('0x20')]);}else{logger['info'](_0xf6df('0x1b'),_0x2abd2a,_0xf6df('0x1c'));_0x57ca59(_0x172e2b[_0xf6df('0x21')][_0xf6df('0x20')]);}})[_0xf6df('0x22')](function(_0xcd983a){logger[_0xf6df('0x1e')](_0xf6df('0x1b'),_0x2abd2a,_0xcd983a);_0x3d81bc(_0xcd983a);});});}function respondWithStatusCode(_0x18d900,_0x4f4aec){_0x4f4aec=_0x4f4aec||0xcc;return function(_0x1e897d){if(_0x1e897d){return _0x18d900['sendStatus'](_0x4f4aec);}return _0x18d900[_0xf6df('0x23')](_0x4f4aec)[_0xf6df('0x24')]();};}function respondWithResult(_0x3dea88,_0xc6369d){_0xc6369d=_0xc6369d||0xc8;return function(_0x5f7df8){if(_0x5f7df8){return _0x3dea88['status'](_0xc6369d)[_0xf6df('0x25')](_0x5f7df8);}};}function respondWithFilteredResult(_0x2d9422,_0x188ad8){return function(_0x90699d){if(_0x90699d){var _0x2a4fb6=typeof _0x188ad8[_0xf6df('0x26')]===_0xf6df('0x27')&&typeof _0x188ad8[_0xf6df('0x28')]===_0xf6df('0x27');var _0x44abc3=_0x90699d[_0xf6df('0x29')];var _0x58d564=_0x2a4fb6?0x0:_0x188ad8['offset'];var _0x1a6be9=_0x2a4fb6?_0x90699d['count']:_0x188ad8[_0xf6df('0x26')]+_0x188ad8['limit'];var _0x3ee234;if(_0x1a6be9>=_0x44abc3){_0x1a6be9=_0x44abc3;_0x3ee234=0xc8;}else{_0x3ee234=0xce;}_0x2d9422[_0xf6df('0x23')](_0x3ee234);return _0x2d9422['set'](_0xf6df('0x2a'),_0x58d564+'-'+_0x1a6be9+'/'+_0x44abc3)[_0xf6df('0x25')](_0x90699d);}return null;};}function patchUpdates(_0x1b8f9f){return function(_0x3cdaa5){try{jsonpatch[_0xf6df('0x2b')](_0x3cdaa5,_0x1b8f9f,!![]);}catch(_0x382c89){return BPromise[_0xf6df('0x2c')](_0x382c89);}return _0x3cdaa5['save']();};}function saveUpdates(_0xb563c8,_0x75a3e8){return function(_0x3812bf){if(_0x3812bf){return _0x3812bf[_0xf6df('0x2d')](_0xb563c8)['then'](function(_0x4c8992){return _0x4c8992;});}return null;};}function removeEntity(_0x5b7bd1,_0x2b2a25){return function(_0x599849){if(_0x599849){return _0x599849[_0xf6df('0x2e')]()[_0xf6df('0x19')](function(){_0x5b7bd1['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x495daa,_0xf7e7ae){return function(_0x36034b){if(!_0x36034b){_0x495daa[_0xf6df('0x2f')](0x194);}return _0x36034b;};}function handleError(_0x49cbae,_0x33fbab){_0x33fbab=_0x33fbab||0x1f4;return function(_0x27026b){logger[_0xf6df('0x1e')](_0x27026b[_0xf6df('0x30')]);if(_0x27026b[_0xf6df('0x31')]){delete _0x27026b[_0xf6df('0x31')];}_0x49cbae['status'](_0x33fbab)['send'](_0x27026b);};}exports[_0xf6df('0x32')]=function(_0x2ab080,_0x4d8e5c){var _0x2fc6df={},_0x24edb8={},_0x2a0752={'count':0x0,'rows':[]};var _0x4ebec6=_[_0xf6df('0x33')](db[_0xf6df('0x34')][_0xf6df('0x35')],function(_0x50c179){return{'name':_0x50c179[_0xf6df('0x36')],'type':_0x50c179[_0xf6df('0x37')][_0xf6df('0x38')]};});_0x24edb8['model']=_[_0xf6df('0x33')](_0x4ebec6,_0xf6df('0x31'));_0x24edb8['query']=_[_0xf6df('0x39')](_0x2ab080['query']);_0x24edb8['filters']=_[_0xf6df('0x3a')](_0x24edb8[_0xf6df('0x3b')],_0x24edb8['query']);_0x2fc6df[_0xf6df('0x3c')]=_[_0xf6df('0x3a')](_0x24edb8[_0xf6df('0x3b')],qs['fields'](_0x2ab080[_0xf6df('0x3d')][_0xf6df('0x3e')]));_0x2fc6df['attributes']=_0x2fc6df[_0xf6df('0x3c')][_0xf6df('0x3f')]?_0x2fc6df['attributes']:_0x24edb8[_0xf6df('0x3b')];if(!_0x2ab080['query'][_0xf6df('0x40')](_0xf6df('0x41'))){_0x2fc6df[_0xf6df('0x28')]=qs[_0xf6df('0x28')](_0x2ab080['query'][_0xf6df('0x28')]);_0x2fc6df['offset']=qs['offset'](_0x2ab080[_0xf6df('0x3d')][_0xf6df('0x26')]);}_0x2fc6df[_0xf6df('0x42')]=qs[_0xf6df('0x43')](_0x2ab080[_0xf6df('0x3d')][_0xf6df('0x43')]);_0x2fc6df[_0xf6df('0x44')]=qs[_0xf6df('0x45')](_['pick'](_0x2ab080[_0xf6df('0x3d')],_0x24edb8[_0xf6df('0x45')]),_0x4ebec6);if(_0x2ab080[_0xf6df('0x3d')]['filter']){_0x2fc6df[_0xf6df('0x44')]=_[_0xf6df('0x46')](_0x2fc6df[_0xf6df('0x44')],{'$or':_[_0xf6df('0x33')](_0x4ebec6,function(_0x383a20){if(_0x383a20['type']!==_0xf6df('0x47')){var _0x2adfcd={};_0x2adfcd[_0x383a20[_0xf6df('0x31')]]={'$like':'%'+_0x2ab080[_0xf6df('0x3d')][_0xf6df('0x48')]+'%'};return _0x2adfcd;}})});}_0x2fc6df=_['merge']({},_0x2fc6df,_0x2ab080['options']);var _0x10fe66={'where':_0x2fc6df[_0xf6df('0x44')]};return db[_0xf6df('0x34')]['count'](_0x10fe66)[_0xf6df('0x19')](function(_0x1fc96c){_0x2a0752[_0xf6df('0x29')]=_0x1fc96c;if(_0x2ab080[_0xf6df('0x3d')][_0xf6df('0x49')]){_0x2fc6df[_0xf6df('0x4a')]=[{'all':!![]}];}return db[_0xf6df('0x34')][_0xf6df('0x4b')](_0x2fc6df);})[_0xf6df('0x19')](function(_0x57d9da){_0x2a0752[_0xf6df('0x4c')]=_0x57d9da;return _0x2a0752;})[_0xf6df('0x19')](respondWithFilteredResult(_0x4d8e5c,_0x2fc6df))[_0xf6df('0x22')](handleError(_0x4d8e5c,null));};exports[_0xf6df('0x4d')]=function(_0x5ae789,_0x1190a7){var _0xe51feb={'raw':![],'where':{'id':_0x5ae789['params']['id']}},_0x4c11d3={};_0x4c11d3[_0xf6df('0x3b')]=_[_0xf6df('0x39')](db[_0xf6df('0x34')][_0xf6df('0x35')]);_0x4c11d3[_0xf6df('0x3d')]=_['keys'](_0x5ae789[_0xf6df('0x3d')]);_0x4c11d3[_0xf6df('0x45')]=_[_0xf6df('0x3a')](_0x4c11d3['model'],_0x4c11d3['query']);_0xe51feb[_0xf6df('0x3c')]=_[_0xf6df('0x3a')](_0x4c11d3[_0xf6df('0x3b')],qs[_0xf6df('0x3e')](_0x5ae789['query'][_0xf6df('0x3e')]));_0xe51feb[_0xf6df('0x3c')]=_0xe51feb[_0xf6df('0x3c')][_0xf6df('0x3f')]?_0xe51feb[_0xf6df('0x3c')]:_0x4c11d3[_0xf6df('0x3b')];if(_0x5ae789[_0xf6df('0x3d')][_0xf6df('0x49')]){_0xe51feb[_0xf6df('0x4a')]=[{'all':!![]}];}_0xe51feb=_[_0xf6df('0x46')]({},_0xe51feb,_0x5ae789[_0xf6df('0x4e')]);return db[_0xf6df('0x34')]['find'](_0xe51feb)['then'](handleEntityNotFound(_0x1190a7,null))['then'](respondWithResult(_0x1190a7,null))[_0xf6df('0x22')](handleError(_0x1190a7,null));};exports['create']=function(_0x37ec8c,_0x3a538b){return db[_0xf6df('0x34')][_0xf6df('0x4f')](_0x37ec8c[_0xf6df('0x50')],{})[_0xf6df('0x19')](respondWithResult(_0x3a538b,0xc9))[_0xf6df('0x22')](handleError(_0x3a538b,null));};exports[_0xf6df('0x2d')]=function(_0x37a6fc,_0x2745ab){if(_0x37a6fc[_0xf6df('0x50')]['id']){delete _0x37a6fc[_0xf6df('0x50')]['id'];}return db[_0xf6df('0x34')][_0xf6df('0x51')]({'where':{'id':_0x37a6fc[_0xf6df('0x52')]['id']}})[_0xf6df('0x19')](handleEntityNotFound(_0x2745ab,null))['then'](saveUpdates(_0x37a6fc[_0xf6df('0x50')],null))[_0xf6df('0x19')](respondWithResult(_0x2745ab,null))[_0xf6df('0x22')](handleError(_0x2745ab,null));};exports[_0xf6df('0x2e')]=function(_0x56e960,_0x425b4a){return db[_0xf6df('0x34')][_0xf6df('0x51')]({'where':{'id':_0x56e960['params']['id']}})[_0xf6df('0x19')](handleEntityNotFound(_0x425b4a,null))[_0xf6df('0x19')](removeEntity(_0x425b4a,null))[_0xf6df('0x22')](handleError(_0x425b4a,null));};exports[_0xf6df('0x53')]=function(_0x185dd9,_0x205f67,_0x77705c){var _0x318006={};var _0x3dca9a={};var _0x129f1a;var _0x26016a;return db[_0xf6df('0x34')]['findOne']({'where':{'id':_0x185dd9[_0xf6df('0x52')]['id']}})[_0xf6df('0x19')](handleEntityNotFound(_0x205f67,null))[_0xf6df('0x19')](function(_0x247c67){if(_0x247c67){_0x129f1a=_0x247c67;_0x3dca9a[_0xf6df('0x3b')]=_[_0xf6df('0x39')](db[_0xf6df('0x54')][_0xf6df('0x35')]);_0x3dca9a['query']=_['keys'](_0x185dd9['query']);_0x3dca9a['filters']=_[_0xf6df('0x3a')](_0x3dca9a[_0xf6df('0x3b')],_0x3dca9a['query']);_0x318006[_0xf6df('0x3c')]=_[_0xf6df('0x3a')](_0x3dca9a[_0xf6df('0x3b')],qs[_0xf6df('0x3e')](_0x185dd9[_0xf6df('0x3d')]['fields']));_0x318006['attributes']=_0x318006['attributes'][_0xf6df('0x3f')]?_0x318006['attributes']:_0x3dca9a['model'];_0x318006[_0xf6df('0x42')]=qs['sort'](_0x185dd9[_0xf6df('0x3d')][_0xf6df('0x43')]);_0x318006[_0xf6df('0x44')]=qs[_0xf6df('0x45')](_[_0xf6df('0x55')](_0x185dd9[_0xf6df('0x3d')],_0x3dca9a[_0xf6df('0x45')]));if(_0x185dd9[_0xf6df('0x3d')][_0xf6df('0x48')]){_0x318006[_0xf6df('0x44')]=_['merge'](_0x318006['where'],{'$or':_[_0xf6df('0x33')](_0x318006['attributes'],function(_0x4e0209){var _0x16961f={};_0x16961f[_0x4e0209]={'$like':'%'+_0x185dd9[_0xf6df('0x3d')][_0xf6df('0x48')]+'%'};return _0x16961f;})});}_0x318006=_[_0xf6df('0x46')]({},_0x318006,_0x185dd9[_0xf6df('0x4e')]);return _0x129f1a[_0xf6df('0x53')](_0x318006);}})[_0xf6df('0x19')](function(_0x5e041e){if(_0x5e041e){_0x26016a=_0x5e041e['length'];if(!_0x185dd9[_0xf6df('0x3d')][_0xf6df('0x40')]('nolimit')){_0x318006[_0xf6df('0x28')]=qs[_0xf6df('0x28')](_0x185dd9[_0xf6df('0x3d')][_0xf6df('0x28')]);_0x318006[_0xf6df('0x26')]=qs[_0xf6df('0x26')](_0x185dd9[_0xf6df('0x3d')][_0xf6df('0x26')]);}return _0x129f1a['getFields'](_0x318006);}})[_0xf6df('0x19')](function(_0x27252d){if(_0x27252d){return _0x27252d?{'count':_0x26016a,'rows':_0x27252d}:null;}})[_0xf6df('0x19')](respondWithResult(_0x205f67,null))[_0xf6df('0x22')](handleError(_0x205f67,null));};exports[_0xf6df('0x56')]=function(_0x3381e0,_0x26a5cc,_0x5b6e03){var _0x2d5348={};var _0x535753={};var _0x364207;var _0x2f64fe;return db['ZohoConfiguration'][_0xf6df('0x57')]({'where':{'id':_0x3381e0[_0xf6df('0x52')]['id']}})['then'](handleEntityNotFound(_0x26a5cc,null))[_0xf6df('0x19')](function(_0x4f00cb){if(_0x4f00cb){_0x364207=_0x4f00cb;_0x535753[_0xf6df('0x3b')]=_[_0xf6df('0x39')](db[_0xf6df('0x54')]['rawAttributes']);_0x535753['query']=_[_0xf6df('0x39')](_0x3381e0[_0xf6df('0x3d')]);_0x535753[_0xf6df('0x45')]=_[_0xf6df('0x3a')](_0x535753[_0xf6df('0x3b')],_0x535753[_0xf6df('0x3d')]);_0x2d5348[_0xf6df('0x3c')]=_['intersection'](_0x535753[_0xf6df('0x3b')],qs[_0xf6df('0x3e')](_0x3381e0[_0xf6df('0x3d')][_0xf6df('0x3e')]));_0x2d5348['attributes']=_0x2d5348[_0xf6df('0x3c')][_0xf6df('0x3f')]?_0x2d5348['attributes']:_0x535753[_0xf6df('0x3b')];_0x2d5348[_0xf6df('0x42')]=qs[_0xf6df('0x43')](_0x3381e0[_0xf6df('0x3d')]['sort']);_0x2d5348['where']=qs[_0xf6df('0x45')](_[_0xf6df('0x55')](_0x3381e0[_0xf6df('0x3d')],_0x535753[_0xf6df('0x45')]));if(_0x3381e0['query'][_0xf6df('0x48')]){_0x2d5348[_0xf6df('0x44')]=_['merge'](_0x2d5348[_0xf6df('0x44')],{'$or':_[_0xf6df('0x33')](_0x2d5348[_0xf6df('0x3c')],function(_0x3f2c46){var _0x1cf1e9={};_0x1cf1e9[_0x3f2c46]={'$like':'%'+_0x3381e0[_0xf6df('0x3d')][_0xf6df('0x48')]+'%'};return _0x1cf1e9;})});}_0x2d5348=_['merge']({},_0x2d5348,_0x3381e0['options']);return _0x364207[_0xf6df('0x56')](_0x2d5348);}})[_0xf6df('0x19')](function(_0x3eed56){if(_0x3eed56){_0x2f64fe=_0x3eed56[_0xf6df('0x3f')];if(!_0x3381e0[_0xf6df('0x3d')][_0xf6df('0x40')](_0xf6df('0x41'))){_0x2d5348['limit']=qs[_0xf6df('0x28')](_0x3381e0['query']['limit']);_0x2d5348[_0xf6df('0x26')]=qs[_0xf6df('0x26')](_0x3381e0[_0xf6df('0x3d')][_0xf6df('0x26')]);}return _0x364207['getSubjects'](_0x2d5348);}})['then'](function(_0x5a791e){if(_0x5a791e){return _0x5a791e?{'count':_0x2f64fe,'rows':_0x5a791e}:null;}})[_0xf6df('0x19')](respondWithResult(_0x26a5cc,null))[_0xf6df('0x22')](handleError(_0x26a5cc,null));};exports['getDescriptions']=function(_0x1dad14,_0x512d97,_0x47842c){var _0x51b668={};var _0x489786={};var _0x3f2ae2;var _0xfcff5a;return db[_0xf6df('0x34')]['findOne']({'where':{'id':_0x1dad14[_0xf6df('0x52')]['id']}})[_0xf6df('0x19')](handleEntityNotFound(_0x512d97,null))['then'](function(_0x3afd9d){if(_0x3afd9d){_0x3f2ae2=_0x3afd9d;_0x489786[_0xf6df('0x3b')]=_['keys'](db[_0xf6df('0x54')]['rawAttributes']);_0x489786[_0xf6df('0x3d')]=_[_0xf6df('0x39')](_0x1dad14[_0xf6df('0x3d')]);_0x489786[_0xf6df('0x45')]=_['intersection'](_0x489786[_0xf6df('0x3b')],_0x489786[_0xf6df('0x3d')]);_0x51b668[_0xf6df('0x3c')]=_[_0xf6df('0x3a')](_0x489786[_0xf6df('0x3b')],qs[_0xf6df('0x3e')](_0x1dad14[_0xf6df('0x3d')]['fields']));_0x51b668[_0xf6df('0x3c')]=_0x51b668[_0xf6df('0x3c')][_0xf6df('0x3f')]?_0x51b668[_0xf6df('0x3c')]:_0x489786['model'];_0x51b668[_0xf6df('0x42')]=qs[_0xf6df('0x43')](_0x1dad14['query'][_0xf6df('0x43')]);_0x51b668[_0xf6df('0x44')]=qs[_0xf6df('0x45')](_[_0xf6df('0x55')](_0x1dad14['query'],_0x489786[_0xf6df('0x45')]));if(_0x1dad14['query'][_0xf6df('0x48')]){_0x51b668[_0xf6df('0x44')]=_[_0xf6df('0x46')](_0x51b668[_0xf6df('0x44')],{'$or':_['map'](_0x51b668[_0xf6df('0x3c')],function(_0x57396){var _0x46c7e8={};_0x46c7e8[_0x57396]={'$like':'%'+_0x1dad14[_0xf6df('0x3d')]['filter']+'%'};return _0x46c7e8;})});}_0x51b668=_[_0xf6df('0x46')]({},_0x51b668,_0x1dad14[_0xf6df('0x4e')]);return _0x3f2ae2[_0xf6df('0x58')](_0x51b668);}})[_0xf6df('0x19')](function(_0x49dd94){if(_0x49dd94){_0xfcff5a=_0x49dd94[_0xf6df('0x3f')];if(!_0x1dad14[_0xf6df('0x3d')][_0xf6df('0x40')]('nolimit')){_0x51b668[_0xf6df('0x28')]=qs[_0xf6df('0x28')](_0x1dad14[_0xf6df('0x3d')]['limit']);_0x51b668[_0xf6df('0x26')]=qs[_0xf6df('0x26')](_0x1dad14[_0xf6df('0x3d')][_0xf6df('0x26')]);}return _0x3f2ae2[_0xf6df('0x58')](_0x51b668);}})['then'](function(_0x1d689d){if(_0x1d689d){return _0x1d689d?{'count':_0xfcff5a,'rows':_0x1d689d}:null;}})[_0xf6df('0x19')](respondWithResult(_0x512d97,null))[_0xf6df('0x22')](handleError(_0x512d97,null));}; \ No newline at end of file +var _0x493c=['sendStatus','stack','send','map','ZohoConfiguration','fieldName','type','key','model','name','query','keys','filters','attributes','intersection','fields','length','order','sort','pick','filter','where','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','params','find','create','body','getFields','findOne','ZohoField','rawAttributes','hasOwnProperty','nolimit','getSubjects','getDescriptions','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','util','path','sox','ejs','fs-extra','squel','crypto','to-csv','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','jayson/promise','then','info','ZohoConfiguration,\x20%s,\x20%s','ZohoConfiguration,\x20%s,\x20%s,\x20%s','error','code','message','request\x20sent','result','end','json','offset','undefined','limit','count','status','set','Content-Range','reject','save','update','destroy'];(function(_0xd38e1e,_0x358055){var _0x27d87c=function(_0x229503){while(--_0x229503){_0xd38e1e['push'](_0xd38e1e['shift']());}};_0x27d87c(++_0x358055);}(_0x493c,0x139));var _0xc493=function(_0x57c586,_0x4e97c1){_0x57c586=_0x57c586-0x0;var _0x27d6e1=_0x493c[_0x57c586];return _0x27d6e1;};'use strict';var emlformat=require(_0xc493('0x0'));var rimraf=require(_0xc493('0x1'));var zipdir=require(_0xc493('0x2'));var jsonpatch=require(_0xc493('0x3'));var rp=require('request-promise');var moment=require(_0xc493('0x4'));var BPromise=require(_0xc493('0x5'));var Mustache=require('mustache');var util=require(_0xc493('0x6'));var path=require(_0xc493('0x7'));var sox=require(_0xc493('0x8'));var csv=require('to-csv');var ejs=require(_0xc493('0x9'));var fs=require('fs');var fs_extra=require(_0xc493('0xa'));var _=require('lodash');var squel=require(_0xc493('0xb'));var crypto=require(_0xc493('0xc'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0xc493('0xd'));var querystring=require(_0xc493('0xe'));var Papa=require('papaparse');var Redis=require(_0xc493('0xf'));var authService=require(_0xc493('0x10'));var qs=require(_0xc493('0x11'));var as=require(_0xc493('0x12'));var hardwareService=require(_0xc493('0x13'));var logger=require(_0xc493('0x14'))(_0xc493('0x15'));var utils=require(_0xc493('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0xc493('0x17'));var db=require('../../mysqldb')['db'];var jayson=require(_0xc493('0x18'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x4948b9,_0x1304bd,_0x19c9ac,_0x19369f){return new BPromise(function(_0x3e03bd,_0x47266d){var _0x498274=_0x19369f||client;return _0x498274['request'](_0x4948b9,_0x19c9ac)[_0xc493('0x19')](function(_0x30df3d){logger[_0xc493('0x1a')](_0xc493('0x1b'),_0x1304bd,'request\x20sent');logger['debug'](_0xc493('0x1c'),_0x1304bd,'request\x20sent',JSON['stringify'](_0x30df3d));if(_0x30df3d['error']){if(_0x30df3d[_0xc493('0x1d')][_0xc493('0x1e')]===0x1f4){logger[_0xc493('0x1d')](_0xc493('0x1b'),_0x1304bd,_0x30df3d[_0xc493('0x1d')][_0xc493('0x1f')]);return _0x47266d(_0x30df3d[_0xc493('0x1d')][_0xc493('0x1f')]);}logger['error'](_0xc493('0x1b'),_0x1304bd,_0x30df3d['error'][_0xc493('0x1f')]);return _0x3e03bd(_0x30df3d[_0xc493('0x1d')]['message']);}else{logger[_0xc493('0x1a')]('ZohoConfiguration,\x20%s,\x20%s',_0x1304bd,_0xc493('0x20'));_0x3e03bd(_0x30df3d[_0xc493('0x21')][_0xc493('0x1f')]);}})['catch'](function(_0x52ad31){logger[_0xc493('0x1d')](_0xc493('0x1b'),_0x1304bd,_0x52ad31);_0x47266d(_0x52ad31);});});}function respondWithStatusCode(_0x339a9e,_0x1316d8){_0x1316d8=_0x1316d8||0xcc;return function(_0x524d27){if(_0x524d27){return _0x339a9e['sendStatus'](_0x1316d8);}return _0x339a9e['status'](_0x1316d8)[_0xc493('0x22')]();};}function respondWithResult(_0x136d8a,_0x34478c){_0x34478c=_0x34478c||0xc8;return function(_0x4508ea){if(_0x4508ea){return _0x136d8a['status'](_0x34478c)[_0xc493('0x23')](_0x4508ea);}};}function respondWithFilteredResult(_0x200851,_0x10913c){return function(_0x59adda){if(_0x59adda){var _0x1a6de4=typeof _0x10913c[_0xc493('0x24')]===_0xc493('0x25')&&typeof _0x10913c[_0xc493('0x26')]===_0xc493('0x25');var _0x312200=_0x59adda['count'];var _0x42765f=_0x1a6de4?0x0:_0x10913c[_0xc493('0x24')];var _0x314827=_0x1a6de4?_0x59adda[_0xc493('0x27')]:_0x10913c[_0xc493('0x24')]+_0x10913c[_0xc493('0x26')];var _0x3649f5;if(_0x314827>=_0x312200){_0x314827=_0x312200;_0x3649f5=0xc8;}else{_0x3649f5=0xce;}_0x200851[_0xc493('0x28')](_0x3649f5);return _0x200851[_0xc493('0x29')](_0xc493('0x2a'),_0x42765f+'-'+_0x314827+'/'+_0x312200)['json'](_0x59adda);}return null;};}function patchUpdates(_0x511537){return function(_0x4f4486){try{jsonpatch['apply'](_0x4f4486,_0x511537,!![]);}catch(_0x249a48){return BPromise[_0xc493('0x2b')](_0x249a48);}return _0x4f4486[_0xc493('0x2c')]();};}function saveUpdates(_0x420777,_0x5dab39){return function(_0x263ed5){if(_0x263ed5){return _0x263ed5[_0xc493('0x2d')](_0x420777)[_0xc493('0x19')](function(_0x545324){return _0x545324;});}return null;};}function removeEntity(_0x5287db,_0x5c7173){return function(_0x3e3dd3){if(_0x3e3dd3){return _0x3e3dd3[_0xc493('0x2e')]()[_0xc493('0x19')](function(){_0x5287db['status'](0xcc)[_0xc493('0x22')]();});}};}function handleEntityNotFound(_0x2a8c59,_0x1b4a60){return function(_0x9fb60e){if(!_0x9fb60e){_0x2a8c59[_0xc493('0x2f')](0x194);}return _0x9fb60e;};}function handleError(_0xa86e76,_0x35b376){_0x35b376=_0x35b376||0x1f4;return function(_0x27fe76){logger['error'](_0x27fe76[_0xc493('0x30')]);if(_0x27fe76['name']){delete _0x27fe76['name'];}_0xa86e76[_0xc493('0x28')](_0x35b376)[_0xc493('0x31')](_0x27fe76);};}exports['index']=function(_0x4ddc06,_0x5220f1){var _0x5a69ce={},_0x22bda7={},_0x4fd09d={'count':0x0,'rows':[]};var _0x423d7f=_[_0xc493('0x32')](db[_0xc493('0x33')]['rawAttributes'],function(_0x498145){return{'name':_0x498145[_0xc493('0x34')],'type':_0x498145[_0xc493('0x35')][_0xc493('0x36')]};});_0x22bda7[_0xc493('0x37')]=_['map'](_0x423d7f,_0xc493('0x38'));_0x22bda7[_0xc493('0x39')]=_[_0xc493('0x3a')](_0x4ddc06['query']);_0x22bda7[_0xc493('0x3b')]=_['intersection'](_0x22bda7['model'],_0x22bda7[_0xc493('0x39')]);_0x5a69ce[_0xc493('0x3c')]=_[_0xc493('0x3d')](_0x22bda7[_0xc493('0x37')],qs[_0xc493('0x3e')](_0x4ddc06[_0xc493('0x39')][_0xc493('0x3e')]));_0x5a69ce[_0xc493('0x3c')]=_0x5a69ce[_0xc493('0x3c')][_0xc493('0x3f')]?_0x5a69ce[_0xc493('0x3c')]:_0x22bda7[_0xc493('0x37')];if(!_0x4ddc06['query']['hasOwnProperty']('nolimit')){_0x5a69ce[_0xc493('0x26')]=qs[_0xc493('0x26')](_0x4ddc06[_0xc493('0x39')]['limit']);_0x5a69ce[_0xc493('0x24')]=qs[_0xc493('0x24')](_0x4ddc06[_0xc493('0x39')][_0xc493('0x24')]);}_0x5a69ce[_0xc493('0x40')]=qs['sort'](_0x4ddc06[_0xc493('0x39')][_0xc493('0x41')]);_0x5a69ce['where']=qs[_0xc493('0x3b')](_[_0xc493('0x42')](_0x4ddc06['query'],_0x22bda7[_0xc493('0x3b')]),_0x423d7f);if(_0x4ddc06[_0xc493('0x39')][_0xc493('0x43')]){_0x5a69ce[_0xc493('0x44')]=_[_0xc493('0x45')](_0x5a69ce[_0xc493('0x44')],{'$or':_[_0xc493('0x32')](_0x423d7f,function(_0xd42b64){if(_0xd42b64[_0xc493('0x35')]!==_0xc493('0x46')){var _0x4ae866={};_0x4ae866[_0xd42b64[_0xc493('0x38')]]={'$like':'%'+_0x4ddc06[_0xc493('0x39')][_0xc493('0x43')]+'%'};return _0x4ae866;}})});}_0x5a69ce=_[_0xc493('0x45')]({},_0x5a69ce,_0x4ddc06[_0xc493('0x47')]);var _0xb19488={'where':_0x5a69ce['where']};return db['ZohoConfiguration'][_0xc493('0x27')](_0xb19488)[_0xc493('0x19')](function(_0x42d50b){_0x4fd09d[_0xc493('0x27')]=_0x42d50b;if(_0x4ddc06[_0xc493('0x39')][_0xc493('0x48')]){_0x5a69ce[_0xc493('0x49')]=[{'all':!![]}];}return db[_0xc493('0x33')][_0xc493('0x4a')](_0x5a69ce);})['then'](function(_0x54f04e){_0x4fd09d[_0xc493('0x4b')]=_0x54f04e;return _0x4fd09d;})[_0xc493('0x19')](respondWithFilteredResult(_0x5220f1,_0x5a69ce))[_0xc493('0x4c')](handleError(_0x5220f1,null));};exports[_0xc493('0x4d')]=function(_0x59bf9c,_0x4d7d84){var _0x244019={'raw':![],'where':{'id':_0x59bf9c[_0xc493('0x4e')]['id']}},_0x2bd87d={};_0x2bd87d[_0xc493('0x37')]=_[_0xc493('0x3a')](db[_0xc493('0x33')]['rawAttributes']);_0x2bd87d['query']=_[_0xc493('0x3a')](_0x59bf9c[_0xc493('0x39')]);_0x2bd87d[_0xc493('0x3b')]=_[_0xc493('0x3d')](_0x2bd87d[_0xc493('0x37')],_0x2bd87d['query']);_0x244019[_0xc493('0x3c')]=_[_0xc493('0x3d')](_0x2bd87d[_0xc493('0x37')],qs[_0xc493('0x3e')](_0x59bf9c[_0xc493('0x39')][_0xc493('0x3e')]));_0x244019['attributes']=_0x244019[_0xc493('0x3c')][_0xc493('0x3f')]?_0x244019['attributes']:_0x2bd87d[_0xc493('0x37')];if(_0x59bf9c[_0xc493('0x39')][_0xc493('0x48')]){_0x244019[_0xc493('0x49')]=[{'all':!![]}];}_0x244019=_[_0xc493('0x45')]({},_0x244019,_0x59bf9c[_0xc493('0x47')]);return db['ZohoConfiguration'][_0xc493('0x4f')](_0x244019)['then'](handleEntityNotFound(_0x4d7d84,null))[_0xc493('0x19')](respondWithResult(_0x4d7d84,null))['catch'](handleError(_0x4d7d84,null));};exports[_0xc493('0x50')]=function(_0x51e718,_0x3c5c2c){return db[_0xc493('0x33')]['create'](_0x51e718[_0xc493('0x51')],{})[_0xc493('0x19')](respondWithResult(_0x3c5c2c,0xc9))[_0xc493('0x4c')](handleError(_0x3c5c2c,null));};exports[_0xc493('0x2d')]=function(_0x415ae3,_0x20fd36){if(_0x415ae3['body']['id']){delete _0x415ae3[_0xc493('0x51')]['id'];}return db[_0xc493('0x33')][_0xc493('0x4f')]({'where':{'id':_0x415ae3['params']['id']}})['then'](handleEntityNotFound(_0x20fd36,null))[_0xc493('0x19')](saveUpdates(_0x415ae3[_0xc493('0x51')],null))['then'](respondWithResult(_0x20fd36,null))['catch'](handleError(_0x20fd36,null));};exports['destroy']=function(_0x40c64f,_0x2d97be){return db[_0xc493('0x33')][_0xc493('0x4f')]({'where':{'id':_0x40c64f[_0xc493('0x4e')]['id']}})[_0xc493('0x19')](handleEntityNotFound(_0x2d97be,null))[_0xc493('0x19')](removeEntity(_0x2d97be,null))[_0xc493('0x4c')](handleError(_0x2d97be,null));};exports[_0xc493('0x52')]=function(_0x46fdf3,_0x4e2ef7,_0x286b8e){var _0x43733a={};var _0xb1a6c={};var _0x5f2cd6;var _0x2b4490;return db[_0xc493('0x33')][_0xc493('0x53')]({'where':{'id':_0x46fdf3[_0xc493('0x4e')]['id']}})[_0xc493('0x19')](handleEntityNotFound(_0x4e2ef7,null))[_0xc493('0x19')](function(_0x959da4){if(_0x959da4){_0x5f2cd6=_0x959da4;_0xb1a6c[_0xc493('0x37')]=_[_0xc493('0x3a')](db[_0xc493('0x54')][_0xc493('0x55')]);_0xb1a6c['query']=_[_0xc493('0x3a')](_0x46fdf3['query']);_0xb1a6c['filters']=_[_0xc493('0x3d')](_0xb1a6c[_0xc493('0x37')],_0xb1a6c[_0xc493('0x39')]);_0x43733a[_0xc493('0x3c')]=_[_0xc493('0x3d')](_0xb1a6c[_0xc493('0x37')],qs['fields'](_0x46fdf3[_0xc493('0x39')][_0xc493('0x3e')]));_0x43733a[_0xc493('0x3c')]=_0x43733a['attributes']['length']?_0x43733a[_0xc493('0x3c')]:_0xb1a6c['model'];_0x43733a[_0xc493('0x40')]=qs[_0xc493('0x41')](_0x46fdf3[_0xc493('0x39')][_0xc493('0x41')]);_0x43733a[_0xc493('0x44')]=qs[_0xc493('0x3b')](_[_0xc493('0x42')](_0x46fdf3[_0xc493('0x39')],_0xb1a6c[_0xc493('0x3b')]));if(_0x46fdf3['query'][_0xc493('0x43')]){_0x43733a[_0xc493('0x44')]=_[_0xc493('0x45')](_0x43733a[_0xc493('0x44')],{'$or':_[_0xc493('0x32')](_0x43733a[_0xc493('0x3c')],function(_0x1c0fd8){var _0x3dbe11={};_0x3dbe11[_0x1c0fd8]={'$like':'%'+_0x46fdf3[_0xc493('0x39')][_0xc493('0x43')]+'%'};return _0x3dbe11;})});}_0x43733a=_[_0xc493('0x45')]({},_0x43733a,_0x46fdf3[_0xc493('0x47')]);return _0x5f2cd6[_0xc493('0x52')](_0x43733a);}})['then'](function(_0x19c355){if(_0x19c355){_0x2b4490=_0x19c355['length'];if(!_0x46fdf3['query'][_0xc493('0x56')](_0xc493('0x57'))){_0x43733a['limit']=qs['limit'](_0x46fdf3['query'][_0xc493('0x26')]);_0x43733a[_0xc493('0x24')]=qs[_0xc493('0x24')](_0x46fdf3['query'][_0xc493('0x24')]);}return _0x5f2cd6[_0xc493('0x52')](_0x43733a);}})['then'](function(_0x30167d){if(_0x30167d){return _0x30167d?{'count':_0x2b4490,'rows':_0x30167d}:null;}})[_0xc493('0x19')](respondWithResult(_0x4e2ef7,null))[_0xc493('0x4c')](handleError(_0x4e2ef7,null));};exports[_0xc493('0x58')]=function(_0x4e5085,_0x2bba78,_0x109f93){var _0xac800f={};var _0x3450dd={};var _0x4e003e;var _0x3a99fa;return db['ZohoConfiguration'][_0xc493('0x53')]({'where':{'id':_0x4e5085['params']['id']}})[_0xc493('0x19')](handleEntityNotFound(_0x2bba78,null))[_0xc493('0x19')](function(_0x5ab3b1){if(_0x5ab3b1){_0x4e003e=_0x5ab3b1;_0x3450dd[_0xc493('0x37')]=_[_0xc493('0x3a')](db[_0xc493('0x54')]['rawAttributes']);_0x3450dd[_0xc493('0x39')]=_[_0xc493('0x3a')](_0x4e5085[_0xc493('0x39')]);_0x3450dd[_0xc493('0x3b')]=_[_0xc493('0x3d')](_0x3450dd['model'],_0x3450dd['query']);_0xac800f[_0xc493('0x3c')]=_['intersection'](_0x3450dd[_0xc493('0x37')],qs['fields'](_0x4e5085[_0xc493('0x39')]['fields']));_0xac800f['attributes']=_0xac800f[_0xc493('0x3c')]['length']?_0xac800f[_0xc493('0x3c')]:_0x3450dd['model'];_0xac800f[_0xc493('0x40')]=qs[_0xc493('0x41')](_0x4e5085[_0xc493('0x39')][_0xc493('0x41')]);_0xac800f[_0xc493('0x44')]=qs['filters'](_[_0xc493('0x42')](_0x4e5085['query'],_0x3450dd[_0xc493('0x3b')]));if(_0x4e5085[_0xc493('0x39')][_0xc493('0x43')]){_0xac800f[_0xc493('0x44')]=_[_0xc493('0x45')](_0xac800f['where'],{'$or':_['map'](_0xac800f[_0xc493('0x3c')],function(_0x4fdecd){var _0x5c7eb2={};_0x5c7eb2[_0x4fdecd]={'$like':'%'+_0x4e5085['query']['filter']+'%'};return _0x5c7eb2;})});}_0xac800f=_[_0xc493('0x45')]({},_0xac800f,_0x4e5085[_0xc493('0x47')]);return _0x4e003e[_0xc493('0x58')](_0xac800f);}})[_0xc493('0x19')](function(_0x1eaa98){if(_0x1eaa98){_0x3a99fa=_0x1eaa98['length'];if(!_0x4e5085[_0xc493('0x39')][_0xc493('0x56')](_0xc493('0x57'))){_0xac800f['limit']=qs[_0xc493('0x26')](_0x4e5085[_0xc493('0x39')]['limit']);_0xac800f['offset']=qs['offset'](_0x4e5085[_0xc493('0x39')][_0xc493('0x24')]);}return _0x4e003e[_0xc493('0x58')](_0xac800f);}})['then'](function(_0x3155bc){if(_0x3155bc){return _0x3155bc?{'count':_0x3a99fa,'rows':_0x3155bc}:null;}})['then'](respondWithResult(_0x2bba78,null))[_0xc493('0x4c')](handleError(_0x2bba78,null));};exports[_0xc493('0x59')]=function(_0x24083a,_0x174826,_0x36eb9f){var _0x4a3568={};var _0x169199={};var _0x15c9ea;var _0x56405a;return db[_0xc493('0x33')][_0xc493('0x53')]({'where':{'id':_0x24083a[_0xc493('0x4e')]['id']}})[_0xc493('0x19')](handleEntityNotFound(_0x174826,null))[_0xc493('0x19')](function(_0x11c9eb){if(_0x11c9eb){_0x15c9ea=_0x11c9eb;_0x169199['model']=_['keys'](db[_0xc493('0x54')][_0xc493('0x55')]);_0x169199['query']=_[_0xc493('0x3a')](_0x24083a['query']);_0x169199[_0xc493('0x3b')]=_[_0xc493('0x3d')](_0x169199[_0xc493('0x37')],_0x169199['query']);_0x4a3568[_0xc493('0x3c')]=_['intersection'](_0x169199[_0xc493('0x37')],qs[_0xc493('0x3e')](_0x24083a[_0xc493('0x39')][_0xc493('0x3e')]));_0x4a3568[_0xc493('0x3c')]=_0x4a3568[_0xc493('0x3c')][_0xc493('0x3f')]?_0x4a3568['attributes']:_0x169199['model'];_0x4a3568['order']=qs[_0xc493('0x41')](_0x24083a[_0xc493('0x39')][_0xc493('0x41')]);_0x4a3568['where']=qs['filters'](_[_0xc493('0x42')](_0x24083a[_0xc493('0x39')],_0x169199[_0xc493('0x3b')]));if(_0x24083a[_0xc493('0x39')][_0xc493('0x43')]){_0x4a3568['where']=_[_0xc493('0x45')](_0x4a3568['where'],{'$or':_['map'](_0x4a3568['attributes'],function(_0x14e93f){var _0x1d86e0={};_0x1d86e0[_0x14e93f]={'$like':'%'+_0x24083a[_0xc493('0x39')][_0xc493('0x43')]+'%'};return _0x1d86e0;})});}_0x4a3568=_['merge']({},_0x4a3568,_0x24083a[_0xc493('0x47')]);return _0x15c9ea[_0xc493('0x59')](_0x4a3568);}})[_0xc493('0x19')](function(_0x175157){if(_0x175157){_0x56405a=_0x175157[_0xc493('0x3f')];if(!_0x24083a['query'][_0xc493('0x56')](_0xc493('0x57'))){_0x4a3568[_0xc493('0x26')]=qs['limit'](_0x24083a[_0xc493('0x39')][_0xc493('0x26')]);_0x4a3568['offset']=qs[_0xc493('0x24')](_0x24083a[_0xc493('0x39')][_0xc493('0x24')]);}return _0x15c9ea[_0xc493('0x59')](_0x4a3568);}})['then'](function(_0x519180){if(_0x519180){return _0x519180?{'count':_0x56405a,'rows':_0x519180}:null;}})[_0xc493('0x19')](respondWithResult(_0x174826,null))[_0xc493('0x4c')](handleError(_0x174826,null));}; \ No newline at end of file diff --git a/server/api/intZohoConfiguration/intZohoConfiguration.model.js b/server/api/intZohoConfiguration/intZohoConfiguration.model.js index 44b2336..9c37464 100644 --- a/server/api/intZohoConfiguration/intZohoConfiguration.model.js +++ b/server/api/intZohoConfiguration/intZohoConfiguration.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0482=['../../config/environment','./intZohoConfiguration.attributes','ZohoConfiguration','int_zoho_configurations','util','../../config/logger','api','request-promise','path','rimraf'];(function(_0x1f5829,_0x290f83){var _0x189eef=function(_0x13bada){while(--_0x13bada){_0x1f5829['push'](_0x1f5829['shift']());}};_0x189eef(++_0x290f83);}(_0x0482,0x18a));var _0x2048=function(_0x182b7d,_0x416e33){_0x182b7d=_0x182b7d-0x0;var _0x4f3e12=_0x0482[_0x182b7d];return _0x4f3e12;};'use strict';var _=require('lodash');var util=require(_0x2048('0x0'));var logger=require(_0x2048('0x1'))(_0x2048('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x2048('0x3'));var fs=require('fs');var path=require(_0x2048('0x4'));var rimraf=require(_0x2048('0x5'));var config=require(_0x2048('0x6'));var attributes=require(_0x2048('0x7'));module['exports']=function(_0x169f31,_0x318656){return _0x169f31['define'](_0x2048('0x8'),attributes,{'tableName':_0x2048('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x100e=['bluebird','path','rimraf','../../config/environment','./intZohoConfiguration.attributes','exports','define','int_zoho_configurations','util','../../config/logger','api','moment'];(function(_0x40ec58,_0x3a2a95){var _0x3d72c7=function(_0x35d4b9){while(--_0x35d4b9){_0x40ec58['push'](_0x40ec58['shift']());}};_0x3d72c7(++_0x3a2a95);}(_0x100e,0xf8));var _0xe100=function(_0xeff2c3,_0x3a5a82){_0xeff2c3=_0xeff2c3-0x0;var _0x2cade6=_0x100e[_0xeff2c3];return _0x2cade6;};'use strict';var _=require('lodash');var util=require(_0xe100('0x0'));var logger=require(_0xe100('0x1'))(_0xe100('0x2'));var moment=require(_0xe100('0x3'));var BPromise=require(_0xe100('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xe100('0x5'));var rimraf=require(_0xe100('0x6'));var config=require(_0xe100('0x7'));var attributes=require(_0xe100('0x8'));module[_0xe100('0x9')]=function(_0x7de151,_0x25a5d9){return _0x7de151[_0xe100('0xa')]('ZohoConfiguration',attributes,{'tableName':_0xe100('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intZohoConfiguration/intZohoConfiguration.rpc.js b/server/api/intZohoConfiguration/intZohoConfiguration.rpc.js index a28baca..ed553da 100644 --- a/server/api/intZohoConfiguration/intZohoConfiguration.rpc.js +++ b/server/api/intZohoConfiguration/intZohoConfiguration.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x28b7=['../../config/environment','jayson/promise','client','http','request','then','info','ZohoConfiguration,\x20%s,\x20%s','request\x20sent','debug','ZohoConfiguration,\x20%s,\x20%s,\x20%s','error','code','message','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','rpc'];(function(_0x1ccdf7,_0x215d5a){var _0x52a0ae=function(_0x40324a){while(--_0x40324a){_0x1ccdf7['push'](_0x1ccdf7['shift']());}};_0x52a0ae(++_0x215d5a);}(_0x28b7,0x99));var _0x728b=function(_0xadd417,_0x207028){_0xadd417=_0xadd417-0x0;var _0x5c79e7=_0x28b7[_0xadd417];return _0x5c79e7;};'use strict';var _=require(_0x728b('0x0'));var util=require(_0x728b('0x1'));var moment=require(_0x728b('0x2'));var BPromise=require('bluebird');var rs=require(_0x728b('0x3'));var fs=require('fs');var Redis=require(_0x728b('0x4'));var db=require(_0x728b('0x5'))['db'];var utils=require(_0x728b('0x6'));var logger=require('../../config/logger')(_0x728b('0x7'));var config=require(_0x728b('0x8'));var jayson=require(_0x728b('0x9'));var client=jayson[_0x728b('0xa')][_0x728b('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x3e0369,_0x2d34ea,_0x5c5509){return new BPromise(function(_0x3ec713,_0x5650bf){return client[_0x728b('0xc')](_0x3e0369,_0x5c5509)[_0x728b('0xd')](function(_0x54edc6){logger[_0x728b('0xe')](_0x728b('0xf'),_0x2d34ea,_0x728b('0x10'));logger[_0x728b('0x11')](_0x728b('0x12'),_0x2d34ea,_0x728b('0x10'),JSON['stringify'](_0x54edc6));if(_0x54edc6[_0x728b('0x13')]){if(_0x54edc6[_0x728b('0x13')][_0x728b('0x14')]===0x1f4){logger['error']('ZohoConfiguration,\x20%s,\x20%s',_0x2d34ea,_0x54edc6['error']['message']);return _0x5650bf(_0x54edc6[_0x728b('0x13')]['message']);}logger[_0x728b('0x13')](_0x728b('0xf'),_0x2d34ea,_0x54edc6[_0x728b('0x13')][_0x728b('0x15')]);return _0x3ec713(_0x54edc6[_0x728b('0x13')][_0x728b('0x15')]);}else{logger[_0x728b('0xe')](_0x728b('0xf'),_0x2d34ea,'request\x20sent');_0x3ec713(_0x54edc6['result']['message']);}})[_0x728b('0x16')](function(_0x255a30){logger[_0x728b('0x13')]('ZohoConfiguration,\x20%s,\x20%s',_0x2d34ea,_0x255a30);_0x5650bf(_0x255a30);});});} \ No newline at end of file +var _0xc674=['http','request','info','ZohoConfiguration,\x20%s,\x20%s','request\x20sent','ZohoConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','client'];(function(_0x2d4fb5,_0x2f4d84){var _0xa551a4=function(_0x599334){while(--_0x599334){_0x2d4fb5['push'](_0x2d4fb5['shift']());}};_0xa551a4(++_0x2f4d84);}(_0xc674,0x15c));var _0x4c67=function(_0x2afb44,_0x249a57){_0x2afb44=_0x2afb44-0x0;var _0x15ccc2=_0xc674[_0x2afb44];return _0x15ccc2;};'use strict';var _=require(_0x4c67('0x0'));var util=require('util');var moment=require(_0x4c67('0x1'));var BPromise=require(_0x4c67('0x2'));var rs=require(_0x4c67('0x3'));var fs=require('fs');var Redis=require(_0x4c67('0x4'));var db=require(_0x4c67('0x5'))['db'];var utils=require(_0x4c67('0x6'));var logger=require(_0x4c67('0x7'))('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x4c67('0x8')][_0x4c67('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2c9ca0,_0xec3112,_0xab7605){return new BPromise(function(_0x39a474,_0x40841a){return client[_0x4c67('0xa')](_0x2c9ca0,_0xab7605)['then'](function(_0x1b0a75){logger[_0x4c67('0xb')](_0x4c67('0xc'),_0xec3112,_0x4c67('0xd'));logger['debug'](_0x4c67('0xe'),_0xec3112,_0x4c67('0xd'),JSON[_0x4c67('0xf')](_0x1b0a75));if(_0x1b0a75[_0x4c67('0x10')]){if(_0x1b0a75[_0x4c67('0x10')][_0x4c67('0x11')]===0x1f4){logger[_0x4c67('0x10')]('ZohoConfiguration,\x20%s,\x20%s',_0xec3112,_0x1b0a75[_0x4c67('0x10')]['message']);return _0x40841a(_0x1b0a75[_0x4c67('0x10')][_0x4c67('0x12')]);}logger[_0x4c67('0x10')](_0x4c67('0xc'),_0xec3112,_0x1b0a75[_0x4c67('0x10')][_0x4c67('0x12')]);return _0x39a474(_0x1b0a75[_0x4c67('0x10')][_0x4c67('0x12')]);}else{logger[_0x4c67('0xb')]('ZohoConfiguration,\x20%s,\x20%s',_0xec3112,_0x4c67('0xd'));_0x39a474(_0x1b0a75[_0x4c67('0x13')]['message']);}})[_0x4c67('0x14')](function(_0x545ce5){logger[_0x4c67('0x10')](_0x4c67('0xc'),_0xec3112,_0x545ce5);_0x40841a(_0x545ce5);});});} \ No newline at end of file diff --git a/server/api/intZohoField/index.js b/server/api/intZohoField/index.js index ff91029..0da6258 100644 --- a/server/api/intZohoField/index.js +++ b/server/api/intZohoField/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x44e5=['exports','multer','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','./intZohoField.controller','get','isAuthenticated','index','show','create','/:id','delete'];(function(_0x5be621,_0x5b9112){var _0x2f0c1e=function(_0x34c394){while(--_0x34c394){_0x5be621['push'](_0x5be621['shift']());}};_0x2f0c1e(++_0x5b9112);}(_0x44e5,0x97));var _0x544e=function(_0x492af5,_0xd51471){_0x492af5=_0x492af5-0x0;var _0x59f529=_0x44e5[_0x492af5];return _0x59f529;};'use strict';var multer=require(_0x544e('0x0'));var util=require('util');var path=require(_0x544e('0x1'));var timeout=require(_0x544e('0x2'));var express=require('express');var router=express[_0x544e('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x544e('0x4'));var interaction=require(_0x544e('0x5'));var config=require('../../config/environment');var controller=require(_0x544e('0x6'));router[_0x544e('0x7')]('/',auth[_0x544e('0x8')](),controller[_0x544e('0x9')]);router[_0x544e('0x7')]('/:id',auth[_0x544e('0x8')](),controller[_0x544e('0xa')]);router['post']('/',auth['isAuthenticated'](),controller[_0x544e('0xb')]);router['put'](_0x544e('0xc'),auth['isAuthenticated'](),controller['update']);router[_0x544e('0xd')](_0x544e('0xc'),auth[_0x544e('0x8')](),controller['destroy']);module[_0x544e('0xe')]=router; \ No newline at end of file +var _0xfba2=['update','exports','multer','util','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./intZohoField.controller','get','isAuthenticated','index','/:id','show','post','create','put'];(function(_0x2abc3d,_0x48edca){var _0x252745=function(_0x32bb6f){while(--_0x32bb6f){_0x2abc3d['push'](_0x2abc3d['shift']());}};_0x252745(++_0x48edca);}(_0xfba2,0x19a));var _0x2fba=function(_0x39cbfc,_0x2d0e81){_0x39cbfc=_0x39cbfc-0x0;var _0x5c82df=_0xfba2[_0x39cbfc];return _0x5c82df;};'use strict';var multer=require(_0x2fba('0x0'));var util=require(_0x2fba('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x2fba('0x2'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0x2fba('0x3'));var interaction=require(_0x2fba('0x4'));var config=require(_0x2fba('0x5'));var controller=require(_0x2fba('0x6'));router[_0x2fba('0x7')]('/',auth[_0x2fba('0x8')](),controller[_0x2fba('0x9')]);router['get'](_0x2fba('0xa'),auth['isAuthenticated'](),controller[_0x2fba('0xb')]);router[_0x2fba('0xc')]('/',auth[_0x2fba('0x8')](),controller[_0x2fba('0xd')]);router[_0x2fba('0xe')]('/:id',auth[_0x2fba('0x8')](),controller[_0x2fba('0xf')]);router['delete'](_0x2fba('0xa'),auth[_0x2fba('0x8')](),controller['destroy']);module[_0x2fba('0x10')]=router; \ No newline at end of file diff --git a/server/api/intZohoField/intZohoField.attributes.js b/server/api/intZohoField/intZohoField.attributes.js index 991d678..b981da3 100644 --- a/server/api/intZohoField/intZohoField.attributes.js +++ b/server/api/intZohoField/intZohoField.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xec2c=['variable','customVariable','BOOLEAN','sequelize','exports','string','keyValue','picklist','STRING','ENUM'];(function(_0x522558,_0x21e60f){var _0x4f8f6b=function(_0x3af7bc){while(--_0x3af7bc){_0x522558['push'](_0x522558['shift']());}};_0x4f8f6b(++_0x21e60f);}(_0xec2c,0xe9));var _0xcec2=function(_0x6c0b0a,_0x496391){_0x6c0b0a=_0x6c0b0a-0x0;var _0x5f456a=_0xec2c[_0x6c0b0a];return _0x5f456a;};'use strict';var Sequelize=require(_0xcec2('0x0'));module[_0xcec2('0x1')]={'type':{'type':Sequelize['ENUM'](_0xcec2('0x2'),'variable','customVariable',_0xcec2('0x3'),_0xcec2('0x4')),'defaultValue':_0xcec2('0x2')},'content':{'type':Sequelize['STRING']},'key':{'type':Sequelize[_0xcec2('0x5')]},'keyType':{'type':Sequelize[_0xcec2('0x6')]('string',_0xcec2('0x7'),_0xcec2('0x8'))},'keyContent':{'type':Sequelize['STRING']},'idField':{'type':Sequelize['STRING']},'nameField':{'type':Sequelize[_0xcec2('0x5')]},'customField':{'type':Sequelize[_0xcec2('0x9')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0xcec2('0x5')]}}; \ No newline at end of file +var _0x3ce4=['STRING','ENUM','BOOLEAN','exports','variable','customVariable','keyValue','string'];(function(_0x616290,_0x280b7f){var _0x453879=function(_0x27bda7){while(--_0x27bda7){_0x616290['push'](_0x616290['shift']());}};_0x453879(++_0x280b7f);}(_0x3ce4,0x183));var _0x43ce=function(_0x2c7dc6,_0x3c4ce0){_0x2c7dc6=_0x2c7dc6-0x0;var _0x10002b=_0x3ce4[_0x2c7dc6];return _0x10002b;};'use strict';var Sequelize=require('sequelize');module[_0x43ce('0x0')]={'type':{'type':Sequelize['ENUM']('string',_0x43ce('0x1'),_0x43ce('0x2'),_0x43ce('0x3'),'picklist'),'defaultValue':_0x43ce('0x4')},'content':{'type':Sequelize[_0x43ce('0x5')]},'key':{'type':Sequelize[_0x43ce('0x5')]},'keyType':{'type':Sequelize[_0x43ce('0x6')](_0x43ce('0x4'),_0x43ce('0x1'),_0x43ce('0x2'))},'keyContent':{'type':Sequelize[_0x43ce('0x5')]},'idField':{'type':Sequelize[_0x43ce('0x5')]},'nameField':{'type':Sequelize[_0x43ce('0x5')]},'customField':{'type':Sequelize[_0x43ce('0x7')],'defaultValue':!![]},'variableName':{'type':Sequelize['STRING']}}; \ No newline at end of file diff --git a/server/api/intZohoField/intZohoField.controller.js b/server/api/intZohoField/intZohoField.controller.js index b522f10..13d4935 100644 --- a/server/api/intZohoField/intZohoField.controller.js +++ b/server/api/intZohoField/intZohoField.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6aa4=['intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick','filter','VIRTUAL','merge','options','include','findAll','rows','catch','show','params','length','includeAll','find','create','body','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','status','json','offset','undefined','count','limit','set','Content-Range','apply','reject','update','destroy','then','end','error','name','send','map','ZohoField','rawAttributes','type','key','model','query','keys','filters'];(function(_0x48d6a3,_0x37c848){var _0x38bfa0=function(_0x3fba2e){while(--_0x3fba2e){_0x48d6a3['push'](_0x48d6a3['shift']());}};_0x38bfa0(++_0x37c848);}(_0x6aa4,0xb2));var _0x46aa=function(_0x35bb87,_0x14f283){_0x35bb87=_0x35bb87-0x0;var _0x2143fb=_0x6aa4[_0x35bb87];return _0x2143fb;};'use strict';var emlformat=require(_0x46aa('0x0'));var rimraf=require(_0x46aa('0x1'));var zipdir=require(_0x46aa('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x46aa('0x3'));var moment=require(_0x46aa('0x4'));var BPromise=require(_0x46aa('0x5'));var Mustache=require(_0x46aa('0x6'));var util=require(_0x46aa('0x7'));var path=require(_0x46aa('0x8'));var sox=require(_0x46aa('0x9'));var csv=require(_0x46aa('0xa'));var ejs=require(_0x46aa('0xb'));var fs=require('fs');var fs_extra=require(_0x46aa('0xc'));var _=require(_0x46aa('0xd'));var squel=require(_0x46aa('0xe'));var crypto=require('crypto');var jsforce=require(_0x46aa('0xf'));var deskjs=require(_0x46aa('0x10'));var toCsv=require(_0x46aa('0xa'));var querystring=require(_0x46aa('0x11'));var Papa=require(_0x46aa('0x12'));var Redis=require(_0x46aa('0x13'));var authService=require('../../components/auth/service');var qs=require(_0x46aa('0x14'));var as=require(_0x46aa('0x15'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x46aa('0x16'))(_0x46aa('0x17'));var utils=require(_0x46aa('0x18'));var config=require(_0x46aa('0x19'));var licenseUtil=require('../../config/license/util');var db=require(_0x46aa('0x1a'))['db'];function respondWithStatusCode(_0x5f1237,_0x6a73c1){_0x6a73c1=_0x6a73c1||0xcc;return function(_0x39f8cd){if(_0x39f8cd){return _0x5f1237['sendStatus'](_0x6a73c1);}return _0x5f1237['status'](_0x6a73c1)['end']();};}function respondWithResult(_0x28d892,_0x3d5360){_0x3d5360=_0x3d5360||0xc8;return function(_0x52c2ce){if(_0x52c2ce){return _0x28d892[_0x46aa('0x1b')](_0x3d5360)[_0x46aa('0x1c')](_0x52c2ce);}};}function respondWithFilteredResult(_0x16f11d,_0x22eb21){return function(_0x2ee765){if(_0x2ee765){var _0x25d695=typeof _0x22eb21[_0x46aa('0x1d')]===_0x46aa('0x1e')&&typeof _0x22eb21['limit']===_0x46aa('0x1e');var _0x5af58e=_0x2ee765[_0x46aa('0x1f')];var _0x41cd19=_0x25d695?0x0:_0x22eb21[_0x46aa('0x1d')];var _0x403e8=_0x25d695?_0x2ee765[_0x46aa('0x1f')]:_0x22eb21[_0x46aa('0x1d')]+_0x22eb21[_0x46aa('0x20')];var _0x2b6f45;if(_0x403e8>=_0x5af58e){_0x403e8=_0x5af58e;_0x2b6f45=0xc8;}else{_0x2b6f45=0xce;}_0x16f11d[_0x46aa('0x1b')](_0x2b6f45);return _0x16f11d[_0x46aa('0x21')](_0x46aa('0x22'),_0x41cd19+'-'+_0x403e8+'/'+_0x5af58e)[_0x46aa('0x1c')](_0x2ee765);}return null;};}function patchUpdates(_0x547695){return function(_0x5a1de8){try{jsonpatch[_0x46aa('0x23')](_0x5a1de8,_0x547695,!![]);}catch(_0x8e7d2d){return BPromise[_0x46aa('0x24')](_0x8e7d2d);}return _0x5a1de8['save']();};}function saveUpdates(_0x43d375,_0x1bdf90){return function(_0x57f0c5){if(_0x57f0c5){return _0x57f0c5[_0x46aa('0x25')](_0x43d375)['then'](function(_0x8bf4ba){return _0x8bf4ba;});}return null;};}function removeEntity(_0x3ba429,_0xde8034){return function(_0x5087f){if(_0x5087f){return _0x5087f[_0x46aa('0x26')]()[_0x46aa('0x27')](function(){_0x3ba429[_0x46aa('0x1b')](0xcc)[_0x46aa('0x28')]();});}};}function handleEntityNotFound(_0x311a30,_0x478da2){return function(_0x515dff){if(!_0x515dff){_0x311a30['sendStatus'](0x194);}return _0x515dff;};}function handleError(_0xa6750b,_0x5155f5){_0x5155f5=_0x5155f5||0x1f4;return function(_0x1a7675){logger[_0x46aa('0x29')](_0x1a7675['stack']);if(_0x1a7675[_0x46aa('0x2a')]){delete _0x1a7675['name'];}_0xa6750b[_0x46aa('0x1b')](_0x5155f5)[_0x46aa('0x2b')](_0x1a7675);};}exports['index']=function(_0xae5250,_0x162be0){var _0x588d64={},_0x41b65d={},_0x3d3747={'count':0x0,'rows':[]};var _0x2db3e5=_[_0x46aa('0x2c')](db[_0x46aa('0x2d')][_0x46aa('0x2e')],function(_0x54c50f){return{'name':_0x54c50f['fieldName'],'type':_0x54c50f[_0x46aa('0x2f')][_0x46aa('0x30')]};});_0x41b65d[_0x46aa('0x31')]=_[_0x46aa('0x2c')](_0x2db3e5,_0x46aa('0x2a'));_0x41b65d[_0x46aa('0x32')]=_[_0x46aa('0x33')](_0xae5250[_0x46aa('0x32')]);_0x41b65d[_0x46aa('0x34')]=_[_0x46aa('0x35')](_0x41b65d[_0x46aa('0x31')],_0x41b65d['query']);_0x588d64[_0x46aa('0x36')]=_[_0x46aa('0x35')](_0x41b65d[_0x46aa('0x31')],qs[_0x46aa('0x37')](_0xae5250[_0x46aa('0x32')]['fields']));_0x588d64[_0x46aa('0x36')]=_0x588d64[_0x46aa('0x36')]['length']?_0x588d64[_0x46aa('0x36')]:_0x41b65d[_0x46aa('0x31')];if(!_0xae5250[_0x46aa('0x32')][_0x46aa('0x38')](_0x46aa('0x39'))){_0x588d64[_0x46aa('0x20')]=qs['limit'](_0xae5250['query']['limit']);_0x588d64[_0x46aa('0x1d')]=qs[_0x46aa('0x1d')](_0xae5250['query']['offset']);}_0x588d64[_0x46aa('0x3a')]=qs[_0x46aa('0x3b')](_0xae5250[_0x46aa('0x32')]['sort']);_0x588d64[_0x46aa('0x3c')]=qs[_0x46aa('0x34')](_[_0x46aa('0x3d')](_0xae5250[_0x46aa('0x32')],_0x41b65d[_0x46aa('0x34')]),_0x2db3e5);if(_0xae5250[_0x46aa('0x32')][_0x46aa('0x3e')]){_0x588d64[_0x46aa('0x3c')]=_['merge'](_0x588d64['where'],{'$or':_[_0x46aa('0x2c')](_0x2db3e5,function(_0x33ed1d){if(_0x33ed1d[_0x46aa('0x2f')]!==_0x46aa('0x3f')){var _0x574577={};_0x574577[_0x33ed1d[_0x46aa('0x2a')]]={'$like':'%'+_0xae5250[_0x46aa('0x32')][_0x46aa('0x3e')]+'%'};return _0x574577;}})});}_0x588d64=_[_0x46aa('0x40')]({},_0x588d64,_0xae5250[_0x46aa('0x41')]);var _0x318ab8={'where':_0x588d64[_0x46aa('0x3c')]};return db[_0x46aa('0x2d')][_0x46aa('0x1f')](_0x318ab8)[_0x46aa('0x27')](function(_0x19ed37){_0x3d3747[_0x46aa('0x1f')]=_0x19ed37;if(_0xae5250[_0x46aa('0x32')]['includeAll']){_0x588d64[_0x46aa('0x42')]=[{'all':!![]}];}return db[_0x46aa('0x2d')][_0x46aa('0x43')](_0x588d64);})[_0x46aa('0x27')](function(_0x22fa06){_0x3d3747[_0x46aa('0x44')]=_0x22fa06;return _0x3d3747;})[_0x46aa('0x27')](respondWithFilteredResult(_0x162be0,_0x588d64))[_0x46aa('0x45')](handleError(_0x162be0,null));};exports[_0x46aa('0x46')]=function(_0x356325,_0x18e265){var _0x548934={'raw':!![],'where':{'id':_0x356325[_0x46aa('0x47')]['id']}},_0x3fdeaa={};_0x3fdeaa[_0x46aa('0x31')]=_[_0x46aa('0x33')](db[_0x46aa('0x2d')]['rawAttributes']);_0x3fdeaa[_0x46aa('0x32')]=_[_0x46aa('0x33')](_0x356325['query']);_0x3fdeaa[_0x46aa('0x34')]=_['intersection'](_0x3fdeaa[_0x46aa('0x31')],_0x3fdeaa['query']);_0x548934[_0x46aa('0x36')]=_[_0x46aa('0x35')](_0x3fdeaa[_0x46aa('0x31')],qs['fields'](_0x356325[_0x46aa('0x32')][_0x46aa('0x37')]));_0x548934[_0x46aa('0x36')]=_0x548934[_0x46aa('0x36')][_0x46aa('0x48')]?_0x548934[_0x46aa('0x36')]:_0x3fdeaa[_0x46aa('0x31')];if(_0x356325[_0x46aa('0x32')][_0x46aa('0x49')]){_0x548934[_0x46aa('0x42')]=[{'all':!![]}];}_0x548934=_['merge']({},_0x548934,_0x356325[_0x46aa('0x41')]);return db[_0x46aa('0x2d')][_0x46aa('0x4a')](_0x548934)['then'](handleEntityNotFound(_0x18e265,null))['then'](respondWithResult(_0x18e265,null))[_0x46aa('0x45')](handleError(_0x18e265,null));};exports[_0x46aa('0x4b')]=function(_0x1d948c,_0x3fff84){return db[_0x46aa('0x2d')][_0x46aa('0x4b')](_0x1d948c[_0x46aa('0x4c')],{})[_0x46aa('0x27')](respondWithResult(_0x3fff84,0xc9))[_0x46aa('0x45')](handleError(_0x3fff84,null));};exports[_0x46aa('0x25')]=function(_0x61618c,_0x53ba56){if(_0x61618c['body']['id']){delete _0x61618c['body']['id'];}return db[_0x46aa('0x2d')][_0x46aa('0x4a')]({'where':{'id':_0x61618c[_0x46aa('0x47')]['id']}})['then'](handleEntityNotFound(_0x53ba56,null))[_0x46aa('0x27')](saveUpdates(_0x61618c['body'],null))['then'](respondWithResult(_0x53ba56,null))[_0x46aa('0x45')](handleError(_0x53ba56,null));};exports[_0x46aa('0x26')]=function(_0x2c5203,_0x58506a){return db[_0x46aa('0x2d')][_0x46aa('0x4a')]({'where':{'id':_0x2c5203[_0x46aa('0x47')]['id']}})['then'](handleEntityNotFound(_0x58506a,null))[_0x46aa('0x27')](removeEntity(_0x58506a,null))[_0x46aa('0x45')](handleError(_0x58506a,null));}; \ No newline at end of file +var _0x6ee5=['mustache','util','path','sox','ejs','fs-extra','squel','jsforce','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','../../mysqldb','status','end','undefined','offset','count','limit','Content-Range','apply','reject','save','update','then','destroy','sendStatus','error','stack','name','send','map','ZohoField','fieldName','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','type','VIRTUAL','includeAll','include','findAll','rows','catch','show','params','rawAttributes','options','find','create','body','eml-format','fast-json-patch','request-promise','moment'];(function(_0x3113b7,_0x1bfc43){var _0x1e49bf=function(_0x4e6b1e){while(--_0x4e6b1e){_0x3113b7['push'](_0x3113b7['shift']());}};_0x1e49bf(++_0x1bfc43);}(_0x6ee5,0x92));var _0x56ee=function(_0x5cbfed,_0x2b8ba5){_0x5cbfed=_0x5cbfed-0x0;var _0x462d98=_0x6ee5[_0x5cbfed];return _0x462d98;};'use strict';var emlformat=require(_0x56ee('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x56ee('0x1'));var rp=require(_0x56ee('0x2'));var moment=require(_0x56ee('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x56ee('0x4'));var util=require(_0x56ee('0x5'));var path=require(_0x56ee('0x6'));var sox=require(_0x56ee('0x7'));var csv=require('to-csv');var ejs=require(_0x56ee('0x8'));var fs=require('fs');var fs_extra=require(_0x56ee('0x9'));var _=require('lodash');var squel=require(_0x56ee('0xa'));var crypto=require('crypto');var jsforce=require(_0x56ee('0xb'));var deskjs=require(_0x56ee('0xc'));var toCsv=require(_0x56ee('0xd'));var querystring=require(_0x56ee('0xe'));var Papa=require(_0x56ee('0xf'));var Redis=require(_0x56ee('0x10'));var authService=require(_0x56ee('0x11'));var qs=require(_0x56ee('0x12'));var as=require(_0x56ee('0x13'));var hardwareService=require(_0x56ee('0x14'));var logger=require(_0x56ee('0x15'))('api');var utils=require(_0x56ee('0x16'));var config=require(_0x56ee('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0x56ee('0x18'))['db'];function respondWithStatusCode(_0x56b778,_0x532dcb){_0x532dcb=_0x532dcb||0xcc;return function(_0x3398cf){if(_0x3398cf){return _0x56b778['sendStatus'](_0x532dcb);}return _0x56b778[_0x56ee('0x19')](_0x532dcb)[_0x56ee('0x1a')]();};}function respondWithResult(_0x32722d,_0x5e717e){_0x5e717e=_0x5e717e||0xc8;return function(_0x2a457c){if(_0x2a457c){return _0x32722d[_0x56ee('0x19')](_0x5e717e)['json'](_0x2a457c);}};}function respondWithFilteredResult(_0x23132b,_0x419e82){return function(_0x2808e6){if(_0x2808e6){var _0x3d97ea=typeof _0x419e82['offset']===_0x56ee('0x1b')&&typeof _0x419e82['limit']===_0x56ee('0x1b');var _0xed23c0=_0x2808e6['count'];var _0x1a77f0=_0x3d97ea?0x0:_0x419e82[_0x56ee('0x1c')];var _0x5615e1=_0x3d97ea?_0x2808e6[_0x56ee('0x1d')]:_0x419e82[_0x56ee('0x1c')]+_0x419e82[_0x56ee('0x1e')];var _0x1ce1e6;if(_0x5615e1>=_0xed23c0){_0x5615e1=_0xed23c0;_0x1ce1e6=0xc8;}else{_0x1ce1e6=0xce;}_0x23132b[_0x56ee('0x19')](_0x1ce1e6);return _0x23132b['set'](_0x56ee('0x1f'),_0x1a77f0+'-'+_0x5615e1+'/'+_0xed23c0)['json'](_0x2808e6);}return null;};}function patchUpdates(_0x29ae20){return function(_0x1f5197){try{jsonpatch[_0x56ee('0x20')](_0x1f5197,_0x29ae20,!![]);}catch(_0x4e2f78){return BPromise[_0x56ee('0x21')](_0x4e2f78);}return _0x1f5197[_0x56ee('0x22')]();};}function saveUpdates(_0x3dc8b6,_0x5b06ee){return function(_0x1d3e17){if(_0x1d3e17){return _0x1d3e17[_0x56ee('0x23')](_0x3dc8b6)[_0x56ee('0x24')](function(_0x52f13e){return _0x52f13e;});}return null;};}function removeEntity(_0x5ba0ab,_0x42c03b){return function(_0x3e8dc1){if(_0x3e8dc1){return _0x3e8dc1[_0x56ee('0x25')]()['then'](function(){_0x5ba0ab[_0x56ee('0x19')](0xcc)[_0x56ee('0x1a')]();});}};}function handleEntityNotFound(_0x6d6393,_0x591e8c){return function(_0x5d3d60){if(!_0x5d3d60){_0x6d6393[_0x56ee('0x26')](0x194);}return _0x5d3d60;};}function handleError(_0x552260,_0x53c606){_0x53c606=_0x53c606||0x1f4;return function(_0x36387e){logger[_0x56ee('0x27')](_0x36387e[_0x56ee('0x28')]);if(_0x36387e['name']){delete _0x36387e[_0x56ee('0x29')];}_0x552260[_0x56ee('0x19')](_0x53c606)[_0x56ee('0x2a')](_0x36387e);};}exports['index']=function(_0x59d16f,_0x315a4f){var _0x4a1bef={},_0x2c9821={},_0xc47708={'count':0x0,'rows':[]};var _0x4f9272=_[_0x56ee('0x2b')](db[_0x56ee('0x2c')]['rawAttributes'],function(_0x1ea645){return{'name':_0x1ea645[_0x56ee('0x2d')],'type':_0x1ea645['type']['key']};});_0x2c9821[_0x56ee('0x2e')]=_[_0x56ee('0x2b')](_0x4f9272,_0x56ee('0x29'));_0x2c9821[_0x56ee('0x2f')]=_[_0x56ee('0x30')](_0x59d16f[_0x56ee('0x2f')]);_0x2c9821[_0x56ee('0x31')]=_[_0x56ee('0x32')](_0x2c9821[_0x56ee('0x2e')],_0x2c9821[_0x56ee('0x2f')]);_0x4a1bef[_0x56ee('0x33')]=_[_0x56ee('0x32')](_0x2c9821['model'],qs[_0x56ee('0x34')](_0x59d16f[_0x56ee('0x2f')][_0x56ee('0x34')]));_0x4a1bef['attributes']=_0x4a1bef[_0x56ee('0x33')][_0x56ee('0x35')]?_0x4a1bef[_0x56ee('0x33')]:_0x2c9821[_0x56ee('0x2e')];if(!_0x59d16f[_0x56ee('0x2f')][_0x56ee('0x36')](_0x56ee('0x37'))){_0x4a1bef[_0x56ee('0x1e')]=qs[_0x56ee('0x1e')](_0x59d16f[_0x56ee('0x2f')]['limit']);_0x4a1bef['offset']=qs[_0x56ee('0x1c')](_0x59d16f['query']['offset']);}_0x4a1bef[_0x56ee('0x38')]=qs[_0x56ee('0x39')](_0x59d16f['query']['sort']);_0x4a1bef[_0x56ee('0x3a')]=qs[_0x56ee('0x31')](_['pick'](_0x59d16f['query'],_0x2c9821[_0x56ee('0x31')]),_0x4f9272);if(_0x59d16f[_0x56ee('0x2f')][_0x56ee('0x3b')]){_0x4a1bef[_0x56ee('0x3a')]=_[_0x56ee('0x3c')](_0x4a1bef[_0x56ee('0x3a')],{'$or':_[_0x56ee('0x2b')](_0x4f9272,function(_0x3f5fb7){if(_0x3f5fb7[_0x56ee('0x3d')]!==_0x56ee('0x3e')){var _0x357ef0={};_0x357ef0[_0x3f5fb7[_0x56ee('0x29')]]={'$like':'%'+_0x59d16f[_0x56ee('0x2f')][_0x56ee('0x3b')]+'%'};return _0x357ef0;}})});}_0x4a1bef=_[_0x56ee('0x3c')]({},_0x4a1bef,_0x59d16f['options']);var _0x29c61f={'where':_0x4a1bef[_0x56ee('0x3a')]};return db[_0x56ee('0x2c')][_0x56ee('0x1d')](_0x29c61f)[_0x56ee('0x24')](function(_0x94cdbd){_0xc47708[_0x56ee('0x1d')]=_0x94cdbd;if(_0x59d16f[_0x56ee('0x2f')][_0x56ee('0x3f')]){_0x4a1bef[_0x56ee('0x40')]=[{'all':!![]}];}return db['ZohoField'][_0x56ee('0x41')](_0x4a1bef);})[_0x56ee('0x24')](function(_0x369061){_0xc47708[_0x56ee('0x42')]=_0x369061;return _0xc47708;})[_0x56ee('0x24')](respondWithFilteredResult(_0x315a4f,_0x4a1bef))[_0x56ee('0x43')](handleError(_0x315a4f,null));};exports[_0x56ee('0x44')]=function(_0xc105e1,_0x511eaf){var _0x2c7d22={'raw':!![],'where':{'id':_0xc105e1[_0x56ee('0x45')]['id']}},_0x18a9e0={};_0x18a9e0[_0x56ee('0x2e')]=_[_0x56ee('0x30')](db['ZohoField'][_0x56ee('0x46')]);_0x18a9e0[_0x56ee('0x2f')]=_[_0x56ee('0x30')](_0xc105e1[_0x56ee('0x2f')]);_0x18a9e0[_0x56ee('0x31')]=_['intersection'](_0x18a9e0['model'],_0x18a9e0[_0x56ee('0x2f')]);_0x2c7d22[_0x56ee('0x33')]=_[_0x56ee('0x32')](_0x18a9e0['model'],qs[_0x56ee('0x34')](_0xc105e1[_0x56ee('0x2f')][_0x56ee('0x34')]));_0x2c7d22[_0x56ee('0x33')]=_0x2c7d22[_0x56ee('0x33')][_0x56ee('0x35')]?_0x2c7d22[_0x56ee('0x33')]:_0x18a9e0[_0x56ee('0x2e')];if(_0xc105e1['query'][_0x56ee('0x3f')]){_0x2c7d22[_0x56ee('0x40')]=[{'all':!![]}];}_0x2c7d22=_[_0x56ee('0x3c')]({},_0x2c7d22,_0xc105e1[_0x56ee('0x47')]);return db[_0x56ee('0x2c')][_0x56ee('0x48')](_0x2c7d22)[_0x56ee('0x24')](handleEntityNotFound(_0x511eaf,null))['then'](respondWithResult(_0x511eaf,null))[_0x56ee('0x43')](handleError(_0x511eaf,null));};exports[_0x56ee('0x49')]=function(_0xfdef6c,_0x1a204e){return db[_0x56ee('0x2c')]['create'](_0xfdef6c[_0x56ee('0x4a')],{})[_0x56ee('0x24')](respondWithResult(_0x1a204e,0xc9))[_0x56ee('0x43')](handleError(_0x1a204e,null));};exports['update']=function(_0x5aea47,_0x39e058){if(_0x5aea47[_0x56ee('0x4a')]['id']){delete _0x5aea47['body']['id'];}return db[_0x56ee('0x2c')][_0x56ee('0x48')]({'where':{'id':_0x5aea47[_0x56ee('0x45')]['id']}})[_0x56ee('0x24')](handleEntityNotFound(_0x39e058,null))[_0x56ee('0x24')](saveUpdates(_0x5aea47[_0x56ee('0x4a')],null))['then'](respondWithResult(_0x39e058,null))['catch'](handleError(_0x39e058,null));};exports[_0x56ee('0x25')]=function(_0x55b2bc,_0x45d68e){return db[_0x56ee('0x2c')][_0x56ee('0x48')]({'where':{'id':_0x55b2bc[_0x56ee('0x45')]['id']}})[_0x56ee('0x24')](handleEntityNotFound(_0x45d68e,null))[_0x56ee('0x24')](removeEntity(_0x45d68e,null))[_0x56ee('0x43')](handleError(_0x45d68e,null));}; \ No newline at end of file diff --git a/server/api/intZohoField/intZohoField.model.js b/server/api/intZohoField/intZohoField.model.js index 67449c7..a4e6313 100644 --- a/server/api/intZohoField/intZohoField.model.js +++ b/server/api/intZohoField/intZohoField.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8aad=['request-promise','../../config/environment','define','int_zoho_fields','zoho_unique_index','idField','FieldId','lodash','util','api','bluebird'];(function(_0x1caf6a,_0x26a5bf){var _0x1bf493=function(_0x3982f5){while(--_0x3982f5){_0x1caf6a['push'](_0x1caf6a['shift']());}};_0x1bf493(++_0x26a5bf);}(_0x8aad,0x146));var _0xd8aa=function(_0x5ce6dd,_0x4ada6a){_0x5ce6dd=_0x5ce6dd-0x0;var _0x233a26=_0x8aad[_0x5ce6dd];return _0x233a26;};'use strict';var _=require(_0xd8aa('0x0'));var util=require(_0xd8aa('0x1'));var logger=require('../../config/logger')(_0xd8aa('0x2'));var moment=require('moment');var BPromise=require(_0xd8aa('0x3'));var rp=require(_0xd8aa('0x4'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0xd8aa('0x5'));var attributes=require('./intZohoField.attributes');module['exports']=function(_0x16b648,_0x43ddeb){return _0x16b648[_0xd8aa('0x6')]('ZohoField',attributes,{'tableName':_0xd8aa('0x7'),'paranoid':![],'indexes':[{'name':_0xd8aa('0x8'),'fields':[_0xd8aa('0x9'),_0xd8aa('0xa')],'unique':!![]}],'timestamps':!![]});}; \ No newline at end of file +var _0xc6ac=['bluebird','request-promise','path','rimraf','../../config/environment','./intZohoField.attributes','exports','ZohoField','int_zoho_fields','zoho_unique_index','FieldId','lodash','util','../../config/logger','api','moment'];(function(_0x4e1ebc,_0xa986bc){var _0x985638=function(_0x439e24){while(--_0x439e24){_0x4e1ebc['push'](_0x4e1ebc['shift']());}};_0x985638(++_0xa986bc);}(_0xc6ac,0x15b));var _0xcc6a=function(_0x1de1e3,_0x46ec04){_0x1de1e3=_0x1de1e3-0x0;var _0x2e4726=_0xc6ac[_0x1de1e3];return _0x2e4726;};'use strict';var _=require(_0xcc6a('0x0'));var util=require(_0xcc6a('0x1'));var logger=require(_0xcc6a('0x2'))(_0xcc6a('0x3'));var moment=require(_0xcc6a('0x4'));var BPromise=require(_0xcc6a('0x5'));var rp=require(_0xcc6a('0x6'));var fs=require('fs');var path=require(_0xcc6a('0x7'));var rimraf=require(_0xcc6a('0x8'));var config=require(_0xcc6a('0x9'));var attributes=require(_0xcc6a('0xa'));module[_0xcc6a('0xb')]=function(_0x12330e,_0x197bd7){return _0x12330e['define'](_0xcc6a('0xc'),attributes,{'tableName':_0xcc6a('0xd'),'paranoid':![],'indexes':[{'name':_0xcc6a('0xe'),'fields':['idField',_0xcc6a('0xf')],'unique':!![]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intZohoField/intZohoField.rpc.js b/server/api/intZohoField/intZohoField.rpc.js index 0c48a10..ecc225a 100644 --- a/server/api/intZohoField/intZohoField.rpc.js +++ b/server/api/intZohoField/intZohoField.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xad57=['result','catch','util','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','http','request','ZohoField,\x20%s,\x20%s','request\x20sent','ZohoField,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info'];(function(_0x3eb567,_0x1d4baf){var _0x3a84bc=function(_0x1bf75b){while(--_0x1bf75b){_0x3eb567['push'](_0x3eb567['shift']());}};_0x3a84bc(++_0x1d4baf);}(_0xad57,0x17e));var _0x7ad5=function(_0x464498,_0x4af658){_0x464498=_0x464498-0x0;var _0x11ca7d=_0xad57[_0x464498];return _0x11ca7d;};'use strict';var _=require('lodash');var util=require(_0x7ad5('0x0'));var moment=require('moment');var BPromise=require(_0x7ad5('0x1'));var rs=require(_0x7ad5('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x7ad5('0x3'))['db'];var utils=require(_0x7ad5('0x4'));var logger=require(_0x7ad5('0x5'))('rpc');var config=require(_0x7ad5('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x7ad5('0x7')][_0x7ad5('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x5c0f6a,_0x275896,_0x5b20a3){return new BPromise(function(_0x1776f4,_0x1c5d2f){return client[_0x7ad5('0x9')](_0x5c0f6a,_0x5b20a3)['then'](function(_0x5443c9){logger['info'](_0x7ad5('0xa'),_0x275896,_0x7ad5('0xb'));logger['debug'](_0x7ad5('0xc'),_0x275896,_0x7ad5('0xb'),JSON[_0x7ad5('0xd')](_0x5443c9));if(_0x5443c9[_0x7ad5('0xe')]){if(_0x5443c9['error'][_0x7ad5('0xf')]===0x1f4){logger['error'](_0x7ad5('0xa'),_0x275896,_0x5443c9[_0x7ad5('0xe')][_0x7ad5('0x10')]);return _0x1c5d2f(_0x5443c9[_0x7ad5('0xe')]['message']);}logger[_0x7ad5('0xe')](_0x7ad5('0xa'),_0x275896,_0x5443c9['error'][_0x7ad5('0x10')]);return _0x1776f4(_0x5443c9[_0x7ad5('0xe')][_0x7ad5('0x10')]);}else{logger[_0x7ad5('0x11')]('ZohoField,\x20%s,\x20%s',_0x275896,_0x7ad5('0xb'));_0x1776f4(_0x5443c9[_0x7ad5('0x12')]['message']);}})[_0x7ad5('0x13')](function(_0xa8f308){logger[_0x7ad5('0xe')]('ZohoField,\x20%s,\x20%s',_0x275896,_0xa8f308);_0x1c5d2f(_0xa8f308);});});} \ No newline at end of file +var _0x105e=['randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then','info','ZohoField,\x20%s,\x20%s','request\x20sent','debug','ZohoField,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','lodash','util','moment','bluebird'];(function(_0x4b13ce,_0x339cb0){var _0x427d4b=function(_0x26aaad){while(--_0x26aaad){_0x4b13ce['push'](_0x4b13ce['shift']());}};_0x427d4b(++_0x339cb0);}(_0x105e,0x104));var _0xe105=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x105e[_0x14add3];return _0x4a174f;};'use strict';var _=require(_0xe105('0x0'));var util=require(_0xe105('0x1'));var moment=require(_0xe105('0x2'));var BPromise=require(_0xe105('0x3'));var rs=require(_0xe105('0x4'));var fs=require('fs');var Redis=require(_0xe105('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xe105('0x6'));var logger=require(_0xe105('0x7'))(_0xe105('0x8'));var config=require(_0xe105('0x9'));var jayson=require(_0xe105('0xa'));var client=jayson[_0xe105('0xb')][_0xe105('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x510ee0,_0x206fbd,_0x3fdb92){return new BPromise(function(_0x3eb971,_0x2d71ef){return client['request'](_0x510ee0,_0x3fdb92)[_0xe105('0xd')](function(_0x1ac749){logger[_0xe105('0xe')](_0xe105('0xf'),_0x206fbd,_0xe105('0x10'));logger[_0xe105('0x11')](_0xe105('0x12'),_0x206fbd,_0xe105('0x10'),JSON[_0xe105('0x13')](_0x1ac749));if(_0x1ac749[_0xe105('0x14')]){if(_0x1ac749[_0xe105('0x14')][_0xe105('0x15')]===0x1f4){logger[_0xe105('0x14')](_0xe105('0xf'),_0x206fbd,_0x1ac749['error'][_0xe105('0x16')]);return _0x2d71ef(_0x1ac749[_0xe105('0x14')][_0xe105('0x16')]);}logger['error'](_0xe105('0xf'),_0x206fbd,_0x1ac749[_0xe105('0x14')][_0xe105('0x16')]);return _0x3eb971(_0x1ac749['error'][_0xe105('0x16')]);}else{logger[_0xe105('0xe')]('ZohoField,\x20%s,\x20%s',_0x206fbd,_0xe105('0x10'));_0x3eb971(_0x1ac749['result'][_0xe105('0x16')]);}})[_0xe105('0x17')](function(_0x114782){logger[_0xe105('0x14')](_0xe105('0xf'),_0x206fbd,_0x114782);_0x2d71ef(_0x114782);});});} \ No newline at end of file diff --git a/server/api/integration/index.js b/server/api/integration/index.js index 2134d2a..4a3e486 100644 --- a/server/api/integration/index.js +++ b/server/api/integration/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xedd9=['util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','exports'];(function(_0x2b13c,_0x35d1d6){var _0x4cb485=function(_0x5d6d08){while(--_0x5d6d08){_0x2b13c['push'](_0x2b13c['shift']());}};_0x4cb485(++_0x35d1d6);}(_0xedd9,0xfc));var _0x9edd=function(_0xbfd9e0,_0x4a6972){_0xbfd9e0=_0xbfd9e0-0x0;var _0x404416=_0xedd9[_0xbfd9e0];return _0x404416;};'use strict';var multer=require('multer');var util=require(_0x9edd('0x0'));var path=require(_0x9edd('0x1'));var timeout=require(_0x9edd('0x2'));var express=require(_0x9edd('0x3'));var router=express[_0x9edd('0x4')]();var fs_extra=require(_0x9edd('0x5'));var auth=require(_0x9edd('0x6'));var interaction=require(_0x9edd('0x7'));var config=require('../../config/environment');module[_0x9edd('0x8')]=router; \ No newline at end of file +var _0x70e0=['../../components/auth/service','../../components/interaction/service','exports','multer','util','path','Router','fs-extra'];(function(_0x491be6,_0x1dd7e7){var _0x2893e5=function(_0x495c7b){while(--_0x495c7b){_0x491be6['push'](_0x491be6['shift']());}};_0x2893e5(++_0x1dd7e7);}(_0x70e0,0x17b));var _0x070e=function(_0x6bf0d6,_0x18fa3e){_0x6bf0d6=_0x6bf0d6-0x0;var _0x302d9c=_0x70e0[_0x6bf0d6];return _0x302d9c;};'use strict';var multer=require(_0x070e('0x0'));var util=require(_0x070e('0x1'));var path=require(_0x070e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x070e('0x3')]();var fs_extra=require(_0x070e('0x4'));var auth=require(_0x070e('0x5'));var interaction=require(_0x070e('0x6'));var config=require('../../config/environment');module[_0x070e('0x7')]=router; \ No newline at end of file diff --git a/server/api/integration/integration.attributes.js b/server/api/integration/integration.attributes.js index 14b2306..bb1d076 100644 --- a/server/api/integration/integration.attributes.js +++ b/server/api/integration/integration.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9809=['sequelize','exports','STRING','unique_name_and_version','app.js','BOOLEAN'];(function(_0x575057,_0x14baf3){var _0x49dbc8=function(_0x23599a){while(--_0x23599a){_0x575057['push'](_0x575057['shift']());}};_0x49dbc8(++_0x14baf3);}(_0x9809,0x1da));var _0x9980=function(_0x425c33,_0x426084){_0x425c33=_0x425c33-0x0;var _0x248387=_0x9809[_0x425c33];return _0x248387;};'use strict';var Sequelize=require(_0x9980('0x0'));module[_0x9980('0x1')]={'name':{'type':Sequelize[_0x9980('0x2')],'allowNull':![],'unique':_0x9980('0x3')},'version':{'type':Sequelize[_0x9980('0x2')],'allowNull':![],'unique':_0x9980('0x3')},'main':{'type':Sequelize[_0x9980('0x2')],'defaultValue':_0x9980('0x4')},'filename':{'type':Sequelize[_0x9980('0x2')]},'path':{'type':Sequelize[_0x9980('0x2')]},'type':{'type':Sequelize[_0x9980('0x2')]},'size':{'type':Sequelize['INTEGER']},'active':{'type':Sequelize[_0x9980('0x5')],'defaultValue':![]},'author':{'type':Sequelize[_0x9980('0x2')]},'logo':{'type':Sequelize['STRING']},'state':{'type':Sequelize[_0x9980('0x2')],'unique':'state'},'description':{'type':Sequelize[_0x9980('0x2')]},'title':{'type':Sequelize[_0x9980('0x2')]},'remoteUri':{'type':Sequelize['STRING']},'link':{'type':Sequelize[_0x9980('0x2')],'defaultValue':'#'}}; \ No newline at end of file +var _0x47c2=['app.js','INTEGER','BOOLEAN','sequelize','exports','STRING','unique_name_and_version'];(function(_0x26f702,_0x3919bf){var _0x11417d=function(_0x1aa3e8){while(--_0x1aa3e8){_0x26f702['push'](_0x26f702['shift']());}};_0x11417d(++_0x3919bf);}(_0x47c2,0x1ae));var _0x247c=function(_0x160846,_0x400ec0){_0x160846=_0x160846-0x0;var _0xea8ec=_0x47c2[_0x160846];return _0xea8ec;};'use strict';var Sequelize=require(_0x247c('0x0'));module[_0x247c('0x1')]={'name':{'type':Sequelize[_0x247c('0x2')],'allowNull':![],'unique':_0x247c('0x3')},'version':{'type':Sequelize[_0x247c('0x2')],'allowNull':![],'unique':_0x247c('0x3')},'main':{'type':Sequelize[_0x247c('0x2')],'defaultValue':_0x247c('0x4')},'filename':{'type':Sequelize[_0x247c('0x2')]},'path':{'type':Sequelize[_0x247c('0x2')]},'type':{'type':Sequelize[_0x247c('0x2')]},'size':{'type':Sequelize[_0x247c('0x5')]},'active':{'type':Sequelize[_0x247c('0x6')],'defaultValue':![]},'author':{'type':Sequelize[_0x247c('0x2')]},'logo':{'type':Sequelize[_0x247c('0x2')]},'state':{'type':Sequelize[_0x247c('0x2')],'unique':'state'},'description':{'type':Sequelize[_0x247c('0x2')]},'title':{'type':Sequelize['STRING']},'remoteUri':{'type':Sequelize[_0x247c('0x2')]},'link':{'type':Sequelize[_0x247c('0x2')],'defaultValue':'#'}}; \ No newline at end of file diff --git a/server/api/integration/integration.controller.js b/server/api/integration/integration.controller.js index 2b2238c..ba496d4 100644 --- a/server/api/integration/integration.controller.js +++ b/server/api/integration/integration.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xafc4=['reject','save','update','destroy','then','stack','name','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','sort','where','filter','merge','map','VIRTUAL','options','Integration','includeAll','catch','show','params','create','body','find','eml-format','zip-dir','request-promise','moment','bluebird','mustache','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply'];(function(_0x276e58,_0x237144){var _0x3391eb=function(_0x32225a){while(--_0x32225a){_0x276e58['push'](_0x276e58['shift']());}};_0x3391eb(++_0x237144);}(_0xafc4,0x69));var _0x4afc=function(_0x3bbd1c,_0x269608){_0x3bbd1c=_0x3bbd1c-0x0;var _0x5a65ea=_0xafc4[_0x3bbd1c];return _0x5a65ea;};'use strict';var emlformat=require(_0x4afc('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x4afc('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x4afc('0x2'));var moment=require(_0x4afc('0x3'));var BPromise=require(_0x4afc('0x4'));var Mustache=require(_0x4afc('0x5'));var util=require('util');var path=require('path');var sox=require('sox');var csv=require(_0x4afc('0x6'));var ejs=require(_0x4afc('0x7'));var fs=require('fs');var fs_extra=require(_0x4afc('0x8'));var _=require(_0x4afc('0x9'));var squel=require(_0x4afc('0xa'));var crypto=require(_0x4afc('0xb'));var jsforce=require('jsforce');var deskjs=require(_0x4afc('0xc'));var toCsv=require(_0x4afc('0x6'));var querystring=require(_0x4afc('0xd'));var Papa=require(_0x4afc('0xe'));var Redis=require(_0x4afc('0xf'));var authService=require(_0x4afc('0x10'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x4afc('0x11'));var logger=require('../../config/logger')(_0x4afc('0x12'));var utils=require(_0x4afc('0x13'));var config=require('../../config/environment');var licenseUtil=require(_0x4afc('0x14'));var db=require(_0x4afc('0x15'))['db'];function respondWithStatusCode(_0x2b191c,_0x2768bf){_0x2768bf=_0x2768bf||0xcc;return function(_0x1d8f98){if(_0x1d8f98){return _0x2b191c[_0x4afc('0x16')](_0x2768bf);}return _0x2b191c[_0x4afc('0x17')](_0x2768bf)[_0x4afc('0x18')]();};}function respondWithResult(_0x5effb4,_0x26f3f1){_0x26f3f1=_0x26f3f1||0xc8;return function(_0x429fd8){if(_0x429fd8){return _0x5effb4[_0x4afc('0x17')](_0x26f3f1)[_0x4afc('0x19')](_0x429fd8);}};}function respondWithFilteredResult(_0x5f2dc9,_0x4e32e8){return function(_0x2452ae){if(_0x2452ae){var _0x4f3127=typeof _0x4e32e8[_0x4afc('0x1a')]===_0x4afc('0x1b')&&typeof _0x4e32e8[_0x4afc('0x1c')]===_0x4afc('0x1b');var _0x3a306f=_0x2452ae[_0x4afc('0x1d')];var _0x22f809=_0x4f3127?0x0:_0x4e32e8[_0x4afc('0x1a')];var _0x16365f=_0x4f3127?_0x2452ae[_0x4afc('0x1d')]:_0x4e32e8[_0x4afc('0x1a')]+_0x4e32e8['limit'];var _0x1a8f49;if(_0x16365f>=_0x3a306f){_0x16365f=_0x3a306f;_0x1a8f49=0xc8;}else{_0x1a8f49=0xce;}_0x5f2dc9[_0x4afc('0x17')](_0x1a8f49);return _0x5f2dc9[_0x4afc('0x1e')](_0x4afc('0x1f'),_0x22f809+'-'+_0x16365f+'/'+_0x3a306f)['json'](_0x2452ae);}return null;};}function patchUpdates(_0x3bddc0){return function(_0x30eda3){try{jsonpatch[_0x4afc('0x20')](_0x30eda3,_0x3bddc0,!![]);}catch(_0x280587){return BPromise[_0x4afc('0x21')](_0x280587);}return _0x30eda3[_0x4afc('0x22')]();};}function saveUpdates(_0x3ad7a5,_0x573a75){return function(_0x5403e4){if(_0x5403e4){return _0x5403e4[_0x4afc('0x23')](_0x3ad7a5)['then'](function(_0x37debf){return _0x37debf;});}return null;};}function removeEntity(_0x4e9a48,_0x1aa676){return function(_0x2a0314){if(_0x2a0314){return _0x2a0314[_0x4afc('0x24')]()[_0x4afc('0x25')](function(){_0x4e9a48[_0x4afc('0x17')](0xcc)[_0x4afc('0x18')]();});}};}function handleEntityNotFound(_0x40a0db,_0x383a71){return function(_0x2bb837){if(!_0x2bb837){_0x40a0db[_0x4afc('0x16')](0x194);}return _0x2bb837;};}function handleError(_0x4e8273,_0x359c07){_0x359c07=_0x359c07||0x1f4;return function(_0x35f5b3){logger['error'](_0x35f5b3[_0x4afc('0x26')]);if(_0x35f5b3[_0x4afc('0x27')]){delete _0x35f5b3[_0x4afc('0x27')];}_0x4e8273['status'](_0x359c07)['send'](_0x35f5b3);};}exports['index']=function(_0x426e9d,_0x5db47e){var _0x5e4747={},_0xd26d2f={},_0x628e42={'count':0x0,'rows':[]};var _0x494fe7=_['map'](db['Integration'][_0x4afc('0x28')],function(_0x34434a){return{'name':_0x34434a[_0x4afc('0x29')],'type':_0x34434a[_0x4afc('0x2a')][_0x4afc('0x2b')]};});_0xd26d2f[_0x4afc('0x2c')]=_['map'](_0x494fe7,_0x4afc('0x27'));_0xd26d2f[_0x4afc('0x2d')]=_[_0x4afc('0x2e')](_0x426e9d[_0x4afc('0x2d')]);_0xd26d2f[_0x4afc('0x2f')]=_[_0x4afc('0x30')](_0xd26d2f[_0x4afc('0x2c')],_0xd26d2f[_0x4afc('0x2d')]);_0x5e4747['attributes']=_[_0x4afc('0x30')](_0xd26d2f['model'],qs['fields'](_0x426e9d[_0x4afc('0x2d')][_0x4afc('0x31')]));_0x5e4747[_0x4afc('0x32')]=_0x5e4747[_0x4afc('0x32')][_0x4afc('0x33')]?_0x5e4747[_0x4afc('0x32')]:_0xd26d2f['model'];if(!_0x426e9d[_0x4afc('0x2d')][_0x4afc('0x34')](_0x4afc('0x35'))){_0x5e4747[_0x4afc('0x1c')]=qs[_0x4afc('0x1c')](_0x426e9d[_0x4afc('0x2d')]['limit']);_0x5e4747[_0x4afc('0x1a')]=qs[_0x4afc('0x1a')](_0x426e9d[_0x4afc('0x2d')][_0x4afc('0x1a')]);}_0x5e4747['order']=qs['sort'](_0x426e9d[_0x4afc('0x2d')][_0x4afc('0x36')]);_0x5e4747[_0x4afc('0x37')]=qs['filters'](_['pick'](_0x426e9d[_0x4afc('0x2d')],_0xd26d2f['filters']),_0x494fe7);if(_0x426e9d['query'][_0x4afc('0x38')]){_0x5e4747[_0x4afc('0x37')]=_[_0x4afc('0x39')](_0x5e4747[_0x4afc('0x37')],{'$or':_[_0x4afc('0x3a')](_0x494fe7,function(_0x4420fb){if(_0x4420fb[_0x4afc('0x2a')]!==_0x4afc('0x3b')){var _0x3ccc5a={};_0x3ccc5a[_0x4420fb[_0x4afc('0x27')]]={'$like':'%'+_0x426e9d[_0x4afc('0x2d')][_0x4afc('0x38')]+'%'};return _0x3ccc5a;}})});}_0x5e4747=_[_0x4afc('0x39')]({},_0x5e4747,_0x426e9d[_0x4afc('0x3c')]);var _0x46dd2a={'where':_0x5e4747['where']};return db[_0x4afc('0x3d')][_0x4afc('0x1d')](_0x46dd2a)[_0x4afc('0x25')](function(_0xe6db12){_0x628e42[_0x4afc('0x1d')]=_0xe6db12;if(_0x426e9d[_0x4afc('0x2d')][_0x4afc('0x3e')]){_0x5e4747['include']=[{'all':!![]}];}return db['Integration']['findAll'](_0x5e4747);})[_0x4afc('0x25')](function(_0x105c03){_0x628e42['rows']=_0x105c03;return _0x628e42;})[_0x4afc('0x25')](respondWithFilteredResult(_0x5db47e,_0x5e4747))[_0x4afc('0x3f')](handleError(_0x5db47e,null));};exports[_0x4afc('0x40')]=function(_0x397996,_0x545109){var _0x12b5db={'raw':![],'where':{'id':_0x397996[_0x4afc('0x41')]['id']}},_0x45c9c3={};_0x45c9c3[_0x4afc('0x2c')]=_[_0x4afc('0x2e')](db[_0x4afc('0x3d')]['rawAttributes']);_0x45c9c3[_0x4afc('0x2d')]=_['keys'](_0x397996[_0x4afc('0x2d')]);_0x45c9c3[_0x4afc('0x2f')]=_[_0x4afc('0x30')](_0x45c9c3['model'],_0x45c9c3['query']);_0x12b5db[_0x4afc('0x32')]=_[_0x4afc('0x30')](_0x45c9c3[_0x4afc('0x2c')],qs[_0x4afc('0x31')](_0x397996[_0x4afc('0x2d')][_0x4afc('0x31')]));_0x12b5db[_0x4afc('0x32')]=_0x12b5db[_0x4afc('0x32')]['length']?_0x12b5db[_0x4afc('0x32')]:_0x45c9c3[_0x4afc('0x2c')];if(_0x397996['query'][_0x4afc('0x3e')]){_0x12b5db['include']=[{'all':!![]}];}_0x12b5db=_[_0x4afc('0x39')]({},_0x12b5db,_0x397996[_0x4afc('0x3c')]);return db[_0x4afc('0x3d')]['find'](_0x12b5db)[_0x4afc('0x25')](handleEntityNotFound(_0x545109,null))[_0x4afc('0x25')](respondWithResult(_0x545109,null))[_0x4afc('0x3f')](handleError(_0x545109,null));};exports[_0x4afc('0x42')]=function(_0x4772db,_0x19a0ac){return db['Integration']['create'](_0x4772db['body'],{})[_0x4afc('0x25')](respondWithResult(_0x19a0ac,0xc9))[_0x4afc('0x3f')](handleError(_0x19a0ac,null));};exports[_0x4afc('0x23')]=function(_0x269c24,_0xb5cca9){if(_0x269c24[_0x4afc('0x43')]['id']){delete _0x269c24[_0x4afc('0x43')]['id'];}return db[_0x4afc('0x3d')][_0x4afc('0x44')]({'where':{'id':_0x269c24[_0x4afc('0x41')]['id']}})['then'](handleEntityNotFound(_0xb5cca9,null))[_0x4afc('0x25')](saveUpdates(_0x269c24['body'],null))['then'](respondWithResult(_0xb5cca9,null))[_0x4afc('0x3f')](handleError(_0xb5cca9,null));};exports['destroy']=function(_0x428d78,_0x355198){return db[_0x4afc('0x3d')][_0x4afc('0x44')]({'where':{'id':_0x428d78['params']['id']}})[_0x4afc('0x25')](handleEntityNotFound(_0x355198,null))['then'](removeEntity(_0x355198,null))[_0x4afc('0x3f')](handleError(_0x355198,null));}; \ No newline at end of file +var _0xafc4=['reject','save','update','destroy','then','stack','name','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','sort','where','filter','merge','map','VIRTUAL','options','Integration','includeAll','catch','show','params','create','body','find','eml-format','zip-dir','request-promise','moment','bluebird','mustache','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply'];(function(_0x4620ce,_0x2b5a9b){var _0xa69281=function(_0x19051f){while(--_0x19051f){_0x4620ce['push'](_0x4620ce['shift']());}};_0xa69281(++_0x2b5a9b);}(_0xafc4,0x69));var _0x4afc=function(_0x5e67f7,_0x54f781){_0x5e67f7=_0x5e67f7-0x0;var _0x255b45=_0xafc4[_0x5e67f7];return _0x255b45;};'use strict';var emlformat=require(_0x4afc('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x4afc('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x4afc('0x2'));var moment=require(_0x4afc('0x3'));var BPromise=require(_0x4afc('0x4'));var Mustache=require(_0x4afc('0x5'));var util=require('util');var path=require('path');var sox=require('sox');var csv=require(_0x4afc('0x6'));var ejs=require(_0x4afc('0x7'));var fs=require('fs');var fs_extra=require(_0x4afc('0x8'));var _=require(_0x4afc('0x9'));var squel=require(_0x4afc('0xa'));var crypto=require(_0x4afc('0xb'));var jsforce=require('jsforce');var deskjs=require(_0x4afc('0xc'));var toCsv=require(_0x4afc('0x6'));var querystring=require(_0x4afc('0xd'));var Papa=require(_0x4afc('0xe'));var Redis=require(_0x4afc('0xf'));var authService=require(_0x4afc('0x10'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x4afc('0x11'));var logger=require('../../config/logger')(_0x4afc('0x12'));var utils=require(_0x4afc('0x13'));var config=require('../../config/environment');var licenseUtil=require(_0x4afc('0x14'));var db=require(_0x4afc('0x15'))['db'];function respondWithStatusCode(_0x2b191c,_0x2768bf){_0x2768bf=_0x2768bf||0xcc;return function(_0x1d8f98){if(_0x1d8f98){return _0x2b191c[_0x4afc('0x16')](_0x2768bf);}return _0x2b191c[_0x4afc('0x17')](_0x2768bf)[_0x4afc('0x18')]();};}function respondWithResult(_0x5effb4,_0x26f3f1){_0x26f3f1=_0x26f3f1||0xc8;return function(_0x429fd8){if(_0x429fd8){return _0x5effb4[_0x4afc('0x17')](_0x26f3f1)[_0x4afc('0x19')](_0x429fd8);}};}function respondWithFilteredResult(_0x5f2dc9,_0x4e32e8){return function(_0x2452ae){if(_0x2452ae){var _0x4f3127=typeof _0x4e32e8[_0x4afc('0x1a')]===_0x4afc('0x1b')&&typeof _0x4e32e8[_0x4afc('0x1c')]===_0x4afc('0x1b');var _0x3a306f=_0x2452ae[_0x4afc('0x1d')];var _0x22f809=_0x4f3127?0x0:_0x4e32e8[_0x4afc('0x1a')];var _0x16365f=_0x4f3127?_0x2452ae[_0x4afc('0x1d')]:_0x4e32e8[_0x4afc('0x1a')]+_0x4e32e8['limit'];var _0x1a8f49;if(_0x16365f>=_0x3a306f){_0x16365f=_0x3a306f;_0x1a8f49=0xc8;}else{_0x1a8f49=0xce;}_0x5f2dc9[_0x4afc('0x17')](_0x1a8f49);return _0x5f2dc9[_0x4afc('0x1e')](_0x4afc('0x1f'),_0x22f809+'-'+_0x16365f+'/'+_0x3a306f)['json'](_0x2452ae);}return null;};}function patchUpdates(_0x3bddc0){return function(_0x30eda3){try{jsonpatch[_0x4afc('0x20')](_0x30eda3,_0x3bddc0,!![]);}catch(_0x280587){return BPromise[_0x4afc('0x21')](_0x280587);}return _0x30eda3[_0x4afc('0x22')]();};}function saveUpdates(_0x3ad7a5,_0x573a75){return function(_0x5403e4){if(_0x5403e4){return _0x5403e4[_0x4afc('0x23')](_0x3ad7a5)['then'](function(_0x37debf){return _0x37debf;});}return null;};}function removeEntity(_0x4e9a48,_0x1aa676){return function(_0x2a0314){if(_0x2a0314){return _0x2a0314[_0x4afc('0x24')]()[_0x4afc('0x25')](function(){_0x4e9a48[_0x4afc('0x17')](0xcc)[_0x4afc('0x18')]();});}};}function handleEntityNotFound(_0x40a0db,_0x383a71){return function(_0x2bb837){if(!_0x2bb837){_0x40a0db[_0x4afc('0x16')](0x194);}return _0x2bb837;};}function handleError(_0x4e8273,_0x359c07){_0x359c07=_0x359c07||0x1f4;return function(_0x35f5b3){logger['error'](_0x35f5b3[_0x4afc('0x26')]);if(_0x35f5b3[_0x4afc('0x27')]){delete _0x35f5b3[_0x4afc('0x27')];}_0x4e8273['status'](_0x359c07)['send'](_0x35f5b3);};}exports['index']=function(_0x426e9d,_0x5db47e){var _0x5e4747={},_0xd26d2f={},_0x628e42={'count':0x0,'rows':[]};var _0x494fe7=_['map'](db['Integration'][_0x4afc('0x28')],function(_0x34434a){return{'name':_0x34434a[_0x4afc('0x29')],'type':_0x34434a[_0x4afc('0x2a')][_0x4afc('0x2b')]};});_0xd26d2f[_0x4afc('0x2c')]=_['map'](_0x494fe7,_0x4afc('0x27'));_0xd26d2f[_0x4afc('0x2d')]=_[_0x4afc('0x2e')](_0x426e9d[_0x4afc('0x2d')]);_0xd26d2f[_0x4afc('0x2f')]=_[_0x4afc('0x30')](_0xd26d2f[_0x4afc('0x2c')],_0xd26d2f[_0x4afc('0x2d')]);_0x5e4747['attributes']=_[_0x4afc('0x30')](_0xd26d2f['model'],qs['fields'](_0x426e9d[_0x4afc('0x2d')][_0x4afc('0x31')]));_0x5e4747[_0x4afc('0x32')]=_0x5e4747[_0x4afc('0x32')][_0x4afc('0x33')]?_0x5e4747[_0x4afc('0x32')]:_0xd26d2f['model'];if(!_0x426e9d[_0x4afc('0x2d')][_0x4afc('0x34')](_0x4afc('0x35'))){_0x5e4747[_0x4afc('0x1c')]=qs[_0x4afc('0x1c')](_0x426e9d[_0x4afc('0x2d')]['limit']);_0x5e4747[_0x4afc('0x1a')]=qs[_0x4afc('0x1a')](_0x426e9d[_0x4afc('0x2d')][_0x4afc('0x1a')]);}_0x5e4747['order']=qs['sort'](_0x426e9d[_0x4afc('0x2d')][_0x4afc('0x36')]);_0x5e4747[_0x4afc('0x37')]=qs['filters'](_['pick'](_0x426e9d[_0x4afc('0x2d')],_0xd26d2f['filters']),_0x494fe7);if(_0x426e9d['query'][_0x4afc('0x38')]){_0x5e4747[_0x4afc('0x37')]=_[_0x4afc('0x39')](_0x5e4747[_0x4afc('0x37')],{'$or':_[_0x4afc('0x3a')](_0x494fe7,function(_0x4420fb){if(_0x4420fb[_0x4afc('0x2a')]!==_0x4afc('0x3b')){var _0x3ccc5a={};_0x3ccc5a[_0x4420fb[_0x4afc('0x27')]]={'$like':'%'+_0x426e9d[_0x4afc('0x2d')][_0x4afc('0x38')]+'%'};return _0x3ccc5a;}})});}_0x5e4747=_[_0x4afc('0x39')]({},_0x5e4747,_0x426e9d[_0x4afc('0x3c')]);var _0x46dd2a={'where':_0x5e4747['where']};return db[_0x4afc('0x3d')][_0x4afc('0x1d')](_0x46dd2a)[_0x4afc('0x25')](function(_0xe6db12){_0x628e42[_0x4afc('0x1d')]=_0xe6db12;if(_0x426e9d[_0x4afc('0x2d')][_0x4afc('0x3e')]){_0x5e4747['include']=[{'all':!![]}];}return db['Integration']['findAll'](_0x5e4747);})[_0x4afc('0x25')](function(_0x105c03){_0x628e42['rows']=_0x105c03;return _0x628e42;})[_0x4afc('0x25')](respondWithFilteredResult(_0x5db47e,_0x5e4747))[_0x4afc('0x3f')](handleError(_0x5db47e,null));};exports[_0x4afc('0x40')]=function(_0x397996,_0x545109){var _0x12b5db={'raw':![],'where':{'id':_0x397996[_0x4afc('0x41')]['id']}},_0x45c9c3={};_0x45c9c3[_0x4afc('0x2c')]=_[_0x4afc('0x2e')](db[_0x4afc('0x3d')]['rawAttributes']);_0x45c9c3[_0x4afc('0x2d')]=_['keys'](_0x397996[_0x4afc('0x2d')]);_0x45c9c3[_0x4afc('0x2f')]=_[_0x4afc('0x30')](_0x45c9c3['model'],_0x45c9c3['query']);_0x12b5db[_0x4afc('0x32')]=_[_0x4afc('0x30')](_0x45c9c3[_0x4afc('0x2c')],qs[_0x4afc('0x31')](_0x397996[_0x4afc('0x2d')][_0x4afc('0x31')]));_0x12b5db[_0x4afc('0x32')]=_0x12b5db[_0x4afc('0x32')]['length']?_0x12b5db[_0x4afc('0x32')]:_0x45c9c3[_0x4afc('0x2c')];if(_0x397996['query'][_0x4afc('0x3e')]){_0x12b5db['include']=[{'all':!![]}];}_0x12b5db=_[_0x4afc('0x39')]({},_0x12b5db,_0x397996[_0x4afc('0x3c')]);return db[_0x4afc('0x3d')]['find'](_0x12b5db)[_0x4afc('0x25')](handleEntityNotFound(_0x545109,null))[_0x4afc('0x25')](respondWithResult(_0x545109,null))[_0x4afc('0x3f')](handleError(_0x545109,null));};exports[_0x4afc('0x42')]=function(_0x4772db,_0x19a0ac){return db['Integration']['create'](_0x4772db['body'],{})[_0x4afc('0x25')](respondWithResult(_0x19a0ac,0xc9))[_0x4afc('0x3f')](handleError(_0x19a0ac,null));};exports[_0x4afc('0x23')]=function(_0x269c24,_0xb5cca9){if(_0x269c24[_0x4afc('0x43')]['id']){delete _0x269c24[_0x4afc('0x43')]['id'];}return db[_0x4afc('0x3d')][_0x4afc('0x44')]({'where':{'id':_0x269c24[_0x4afc('0x41')]['id']}})['then'](handleEntityNotFound(_0xb5cca9,null))[_0x4afc('0x25')](saveUpdates(_0x269c24['body'],null))['then'](respondWithResult(_0xb5cca9,null))[_0x4afc('0x3f')](handleError(_0xb5cca9,null));};exports['destroy']=function(_0x428d78,_0x355198){return db[_0x4afc('0x3d')][_0x4afc('0x44')]({'where':{'id':_0x428d78['params']['id']}})[_0x4afc('0x25')](handleEntityNotFound(_0x355198,null))['then'](removeEntity(_0x355198,null))[_0x4afc('0x3f')](handleError(_0x355198,null));}; \ No newline at end of file diff --git a/server/api/integration/integration.model.js b/server/api/integration/integration.model.js index e6a1e8d..ab1fa5b 100644 --- a/server/api/integration/integration.model.js +++ b/server/api/integration/integration.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x32f3=['util','../../config/logger','moment','bluebird','request-promise','path','rimraf','./integration.attributes','exports','Integration','integrations','lodash'];(function(_0x2eb263,_0x559174){var _0x45d375=function(_0xec192b){while(--_0xec192b){_0x2eb263['push'](_0x2eb263['shift']());}};_0x45d375(++_0x559174);}(_0x32f3,0x9b));var _0x332f=function(_0x2c0adc,_0x11da2b){_0x2c0adc=_0x2c0adc-0x0;var _0x239f91=_0x32f3[_0x2c0adc];return _0x239f91;};'use strict';var _=require(_0x332f('0x0'));var util=require(_0x332f('0x1'));var logger=require(_0x332f('0x2'))('api');var moment=require(_0x332f('0x3'));var BPromise=require(_0x332f('0x4'));var rp=require(_0x332f('0x5'));var fs=require('fs');var path=require(_0x332f('0x6'));var rimraf=require(_0x332f('0x7'));var config=require('../../config/environment');var attributes=require(_0x332f('0x8'));module[_0x332f('0x9')]=function(_0x219201,_0x4b6095){return _0x219201['define'](_0x332f('0xa'),attributes,{'tableName':_0x332f('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x8ae4=['moment','request-promise','path','rimraf','../../config/environment','./integration.attributes','exports','define','Integration','integrations','lodash','util','../../config/logger','api'];(function(_0x131496,_0x54288d){var _0x47f3c1=function(_0x30e226){while(--_0x30e226){_0x131496['push'](_0x131496['shift']());}};_0x47f3c1(++_0x54288d);}(_0x8ae4,0x13e));var _0x48ae=function(_0xf58665,_0x4fce09){_0xf58665=_0xf58665-0x0;var _0xbac4b=_0x8ae4[_0xf58665];return _0xbac4b;};'use strict';var _=require(_0x48ae('0x0'));var util=require(_0x48ae('0x1'));var logger=require(_0x48ae('0x2'))(_0x48ae('0x3'));var moment=require(_0x48ae('0x4'));var BPromise=require('bluebird');var rp=require(_0x48ae('0x5'));var fs=require('fs');var path=require(_0x48ae('0x6'));var rimraf=require(_0x48ae('0x7'));var config=require(_0x48ae('0x8'));var attributes=require(_0x48ae('0x9'));module[_0x48ae('0xa')]=function(_0x5c1252,_0x1084b5){return _0x5c1252[_0x48ae('0xb')](_0x48ae('0xc'),attributes,{'tableName':_0x48ae('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/integration/integration.rpc.js b/server/api/integration/integration.rpc.js index 5002526..a766f38 100644 --- a/server/api/integration/integration.rpc.js +++ b/server/api/integration/integration.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2ef3=['bluebird','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','request','then','info','Integration,\x20%s,\x20%s','Integration,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','catch','lodash','util','moment'];(function(_0x508acd,_0x852c77){var _0x4e8524=function(_0x10ea09){while(--_0x10ea09){_0x508acd['push'](_0x508acd['shift']());}};_0x4e8524(++_0x852c77);}(_0x2ef3,0xba));var _0x32ef=function(_0x3b2fb1,_0x1bd13f){_0x3b2fb1=_0x3b2fb1-0x0;var _0xf1fe71=_0x2ef3[_0x3b2fb1];return _0xf1fe71;};'use strict';var _=require(_0x32ef('0x0'));var util=require(_0x32ef('0x1'));var moment=require(_0x32ef('0x2'));var BPromise=require(_0x32ef('0x3'));var rs=require(_0x32ef('0x4'));var fs=require('fs');var Redis=require(_0x32ef('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x32ef('0x6'));var logger=require(_0x32ef('0x7'))('rpc');var config=require(_0x32ef('0x8'));var jayson=require(_0x32ef('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x2c0089,_0x4bfcf8,_0x367c39){return new BPromise(function(_0x2fb8eb,_0x234863){return client[_0x32ef('0xa')](_0x2c0089,_0x367c39)[_0x32ef('0xb')](function(_0x2bbb50){logger[_0x32ef('0xc')](_0x32ef('0xd'),_0x4bfcf8,'request\x20sent');logger['debug'](_0x32ef('0xe'),_0x4bfcf8,_0x32ef('0xf'),JSON[_0x32ef('0x10')](_0x2bbb50));if(_0x2bbb50[_0x32ef('0x11')]){if(_0x2bbb50['error'][_0x32ef('0x12')]===0x1f4){logger['error'](_0x32ef('0xd'),_0x4bfcf8,_0x2bbb50['error'][_0x32ef('0x13')]);return _0x234863(_0x2bbb50[_0x32ef('0x11')]['message']);}logger['error'](_0x32ef('0xd'),_0x4bfcf8,_0x2bbb50['error'][_0x32ef('0x13')]);return _0x2fb8eb(_0x2bbb50[_0x32ef('0x11')][_0x32ef('0x13')]);}else{logger[_0x32ef('0xc')]('Integration,\x20%s,\x20%s',_0x4bfcf8,'request\x20sent');_0x2fb8eb(_0x2bbb50['result'][_0x32ef('0x13')]);}})[_0x32ef('0x14')](function(_0xb5aed2){logger['error']('Integration,\x20%s,\x20%s',_0x4bfcf8,_0xb5aed2);_0x234863(_0xb5aed2);});});} \ No newline at end of file +var _0xdd4f=['lodash','randomstring','ioredis','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','Integration,\x20%s,\x20%s','debug','Integration,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result'];(function(_0x2a3b45,_0x1dcdf3){var _0x5848dd=function(_0x6e84a4){while(--_0x6e84a4){_0x2a3b45['push'](_0x2a3b45['shift']());}};_0x5848dd(++_0x1dcdf3);}(_0xdd4f,0x1ce));var _0xfdd4=function(_0x5d009e,_0x25a3e9){_0x5d009e=_0x5d009e-0x0;var _0x391707=_0xdd4f[_0x5d009e];return _0x391707;};'use strict';var _=require(_0xfdd4('0x0'));var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xfdd4('0x1'));var fs=require('fs');var Redis=require(_0xfdd4('0x2'));var db=require('../../mysqldb')['db'];var utils=require(_0xfdd4('0x3'));var logger=require(_0xfdd4('0x4'))(_0xfdd4('0x5'));var config=require('../../config/environment');var jayson=require(_0xfdd4('0x6'));var client=jayson[_0xfdd4('0x7')][_0xfdd4('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x307ac6,_0x3c72d4,_0x51acd6){return new BPromise(function(_0x3cd8e6,_0x563ae6){return client[_0xfdd4('0x9')](_0x307ac6,_0x51acd6)[_0xfdd4('0xa')](function(_0x1e823e){logger['info'](_0xfdd4('0xb'),_0x3c72d4,'request\x20sent');logger[_0xfdd4('0xc')](_0xfdd4('0xd'),_0x3c72d4,_0xfdd4('0xe'),JSON[_0xfdd4('0xf')](_0x1e823e));if(_0x1e823e[_0xfdd4('0x10')]){if(_0x1e823e[_0xfdd4('0x10')][_0xfdd4('0x11')]===0x1f4){logger[_0xfdd4('0x10')](_0xfdd4('0xb'),_0x3c72d4,_0x1e823e[_0xfdd4('0x10')][_0xfdd4('0x12')]);return _0x563ae6(_0x1e823e['error'][_0xfdd4('0x12')]);}logger[_0xfdd4('0x10')](_0xfdd4('0xb'),_0x3c72d4,_0x1e823e['error'][_0xfdd4('0x12')]);return _0x3cd8e6(_0x1e823e['error'][_0xfdd4('0x12')]);}else{logger[_0xfdd4('0x13')](_0xfdd4('0xb'),_0x3c72d4,_0xfdd4('0xe'));_0x3cd8e6(_0x1e823e[_0xfdd4('0x14')]['message']);}})['catch'](function(_0x559c77){logger[_0xfdd4('0x10')](_0xfdd4('0xb'),_0x3c72d4,_0x559c77);_0x563ae6(_0x559c77);});});} \ No newline at end of file diff --git a/server/api/integrationReport/index.js b/server/api/integrationReport/index.js index 3edc041..3fa155f 100644 --- a/server/api/integrationReport/index.js +++ b/server/api/integrationReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc2c7=['/:id','show','create','put','update','delete','destroy','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','index','describe'];(function(_0x481b67,_0x5d538f){var _0x578cfe=function(_0x2dfb1c){while(--_0x2dfb1c){_0x481b67['push'](_0x481b67['shift']());}};_0x578cfe(++_0x5d538f);}(_0xc2c7,0x134));var _0x7c2c=function(_0x326f97,_0x12d654){_0x326f97=_0x326f97-0x0;var _0x470d32=_0xc2c7[_0x326f97];return _0x470d32;};'use strict';var multer=require('multer');var util=require(_0x7c2c('0x0'));var path=require(_0x7c2c('0x1'));var timeout=require(_0x7c2c('0x2'));var express=require(_0x7c2c('0x3'));var router=express[_0x7c2c('0x4')]();var fs_extra=require(_0x7c2c('0x5'));var auth=require(_0x7c2c('0x6'));var interaction=require(_0x7c2c('0x7'));var config=require('../../config/environment');var controller=require('./integrationReport.controller');router[_0x7c2c('0x8')]('/',auth[_0x7c2c('0x9')](),controller[_0x7c2c('0xa')]);router['get']('/describe',auth['isAuthenticated'](),controller[_0x7c2c('0xb')]);router[_0x7c2c('0x8')](_0x7c2c('0xc'),auth[_0x7c2c('0x9')](),controller[_0x7c2c('0xd')]);router['post']('/',auth[_0x7c2c('0x9')](),controller[_0x7c2c('0xe')]);router[_0x7c2c('0xf')](_0x7c2c('0xc'),auth[_0x7c2c('0x9')](),controller[_0x7c2c('0x10')]);router[_0x7c2c('0x11')](_0x7c2c('0xc'),auth[_0x7c2c('0x9')](),controller[_0x7c2c('0x12')]);module[_0x7c2c('0x13')]=router; \ No newline at end of file +var _0x0295=['isAuthenticated','index','post','create','put','/:id','update','delete','destroy','exports','multer','connect-timeout','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./integrationReport.controller','get'];(function(_0x344a3f,_0x579a22){var _0x264712=function(_0x34c9f0){while(--_0x34c9f0){_0x344a3f['push'](_0x344a3f['shift']());}};_0x264712(++_0x579a22);}(_0x0295,0x1f0));var _0x5029=function(_0x1b0452,_0x3c69a5){_0x1b0452=_0x1b0452-0x0;var _0x140bb1=_0x0295[_0x1b0452];return _0x140bb1;};'use strict';var multer=require(_0x5029('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x5029('0x1'));var express=require('express');var router=express['Router']();var fs_extra=require(_0x5029('0x2'));var auth=require(_0x5029('0x3'));var interaction=require(_0x5029('0x4'));var config=require(_0x5029('0x5'));var controller=require(_0x5029('0x6'));router[_0x5029('0x7')]('/',auth[_0x5029('0x8')](),controller[_0x5029('0x9')]);router[_0x5029('0x7')]('/describe',auth['isAuthenticated'](),controller['describe']);router[_0x5029('0x7')]('/:id',auth[_0x5029('0x8')](),controller['show']);router[_0x5029('0xa')]('/',auth['isAuthenticated'](),controller[_0x5029('0xb')]);router[_0x5029('0xc')](_0x5029('0xd'),auth['isAuthenticated'](),controller[_0x5029('0xe')]);router[_0x5029('0xf')](_0x5029('0xd'),auth['isAuthenticated'](),controller[_0x5029('0x10')]);module[_0x5029('0x11')]=router; \ No newline at end of file diff --git a/server/api/integrationReport/integrationReport.attributes.js b/server/api/integrationReport/integrationReport.attributes.js index ffa955f..f8bc718 100644 --- a/server/api/integrationReport/integrationReport.attributes.js +++ b/server/api/integrationReport/integrationReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x33ab=['exports','STRING','INTEGER','DATE','BOOLEAN','TEXT','ENUM','SENT','SENDING','RECEIVED','FAILED','sequelize'];(function(_0x2083dd,_0x6518b4){var _0x207db8=function(_0x28ee38){while(--_0x28ee38){_0x2083dd['push'](_0x2083dd['shift']());}};_0x207db8(++_0x6518b4);}(_0x33ab,0x18b));var _0xb33a=function(_0x1c1509,_0x2dfa81){_0x1c1509=_0x1c1509-0x0;var _0xf11b7=_0x33ab[_0x1c1509];return _0xf11b7;};'use strict';var Sequelize=require(_0xb33a('0x0'));module[_0xb33a('0x1')]={'integration':{'type':Sequelize[_0xb33a('0x2')]},'eventChannel':{'type':Sequelize[_0xb33a('0x2')]},'exitStatus':{'type':Sequelize[_0xb33a('0x2')]},'ticketId':{'type':Sequelize[_0xb33a('0x2')]},'integrationId':{'type':Sequelize[_0xb33a('0x3')]},'contacts':{'type':Sequelize['STRING']},'uniqueid':{'type':Sequelize[_0xb33a('0x2')]},'calleridnum':{'type':Sequelize['STRING']},'calleridname':{'type':Sequelize[_0xb33a('0x2')]},'queue':{'type':Sequelize[_0xb33a('0x2')]},'interface':{'type':Sequelize[_0xb33a('0x2')]},'membername':{'type':Sequelize[_0xb33a('0x2')]},'agentcalledAt':{'type':Sequelize[_0xb33a('0x4')]},'agentconnectAt':{'type':Sequelize[_0xb33a('0x4')]},'holdtime':{'type':Sequelize[_0xb33a('0x3')]},'agentcomplete':{'type':Sequelize[_0xb33a('0x5')],'defaultValue':![]},'agentcompleteAt':{'type':Sequelize['DATE']},'talktime':{'type':Sequelize['INTEGER']},'agentacw':{'type':Sequelize[_0xb33a('0x5')],'defaultValue':![]},'acwtime':{'type':Sequelize[_0xb33a('0x3')]},'reason':{'type':Sequelize['STRING']},'agentringnoanswer':{'type':Sequelize[_0xb33a('0x5')],'defaultValue':![]},'agentringnoanswerAt':{'type':Sequelize[_0xb33a('0x4')]},'agentdump':{'type':Sequelize[_0xb33a('0x5')],'defaultValue':![]},'agentdumpAt':{'type':Sequelize[_0xb33a('0x4')]},'lastevent':{'type':Sequelize[_0xb33a('0x2')]},'channel':{'type':Sequelize[_0xb33a('0x2')]},'channelstate':{'type':Sequelize[_0xb33a('0x3')]},'channelstatedesc':{'type':Sequelize[_0xb33a('0x2')]},'connectedlinenum':{'type':Sequelize[_0xb33a('0x2')]},'connectedlinename':{'type':Sequelize[_0xb33a('0x2')]},'language':{'type':Sequelize['STRING']},'accountcode':{'type':Sequelize[_0xb33a('0x2')]},'context':{'type':Sequelize[_0xb33a('0x2')]},'exten':{'type':Sequelize[_0xb33a('0x2')]},'priority':{'type':Sequelize[_0xb33a('0x2')]},'destchannel':{'type':Sequelize['STRING']},'destchannelstate':{'type':Sequelize['INTEGER']},'destchannelstatedesc':{'type':Sequelize['STRING']},'destcalleridnum':{'type':Sequelize[_0xb33a('0x2')]},'destcalleridname':{'type':Sequelize[_0xb33a('0x2')]},'destconnectedlinenum':{'type':Sequelize[_0xb33a('0x2')]},'destconnectedlinename':{'type':Sequelize['STRING']},'destlanguage':{'type':Sequelize['STRING']},'destaccountcode':{'type':Sequelize[_0xb33a('0x2')]},'destcontext':{'type':Sequelize[_0xb33a('0x2')]},'destexten':{'type':Sequelize[_0xb33a('0x2')]},'destpriority':{'type':Sequelize['STRING']},'destuniqueid':{'type':Sequelize['STRING']},'messageId':{'type':Sequelize[_0xb33a('0x2')]},'inReplyTo':{'type':Sequelize[_0xb33a('0x2')]},'subject':{'type':Sequelize[_0xb33a('0x2')]},'from':{'type':Sequelize['STRING']},'to':{'type':Sequelize[_0xb33a('0x2')]},'cc':{'type':Sequelize[_0xb33a('0x2')]},'attachment':{'type':Sequelize[_0xb33a('0x6')]},'html':{'type':Sequelize['TEXT']},'text':{'type':Sequelize[_0xb33a('0x6')]},'status':{'type':Sequelize[_0xb33a('0x7')](_0xb33a('0x8'),_0xb33a('0x9'),_0xb33a('0xa'),_0xb33a('0xb'))},'url':{'type':Sequelize['STRING']},'app':{'type':Sequelize['STRING']},'appdata':{'type':Sequelize[_0xb33a('0x2')]},'projectId':{'type':Sequelize[_0xb33a('0x3')]}}; \ No newline at end of file +var _0xa105=['ENUM','SENT','SENDING','RECEIVED','exports','STRING','DATE','INTEGER','BOOLEAN','TEXT'];(function(_0x1d1d09,_0x504d77){var _0x8827e=function(_0x4f3128){while(--_0x4f3128){_0x1d1d09['push'](_0x1d1d09['shift']());}};_0x8827e(++_0x504d77);}(_0xa105,0x1b2));var _0x5a10=function(_0x39fe98,_0x1a316d){_0x39fe98=_0x39fe98-0x0;var _0x2122c3=_0xa105[_0x39fe98];return _0x2122c3;};'use strict';var Sequelize=require('sequelize');module[_0x5a10('0x0')]={'integration':{'type':Sequelize[_0x5a10('0x1')]},'eventChannel':{'type':Sequelize[_0x5a10('0x1')]},'exitStatus':{'type':Sequelize[_0x5a10('0x1')]},'ticketId':{'type':Sequelize[_0x5a10('0x1')]},'integrationId':{'type':Sequelize['INTEGER']},'contacts':{'type':Sequelize[_0x5a10('0x1')]},'uniqueid':{'type':Sequelize[_0x5a10('0x1')]},'calleridnum':{'type':Sequelize['STRING']},'calleridname':{'type':Sequelize[_0x5a10('0x1')]},'queue':{'type':Sequelize[_0x5a10('0x1')]},'interface':{'type':Sequelize[_0x5a10('0x1')]},'membername':{'type':Sequelize[_0x5a10('0x1')]},'agentcalledAt':{'type':Sequelize[_0x5a10('0x2')]},'agentconnectAt':{'type':Sequelize['DATE']},'holdtime':{'type':Sequelize[_0x5a10('0x3')]},'agentcomplete':{'type':Sequelize[_0x5a10('0x4')],'defaultValue':![]},'agentcompleteAt':{'type':Sequelize['DATE']},'talktime':{'type':Sequelize[_0x5a10('0x3')]},'agentacw':{'type':Sequelize[_0x5a10('0x4')],'defaultValue':![]},'acwtime':{'type':Sequelize[_0x5a10('0x3')]},'reason':{'type':Sequelize[_0x5a10('0x1')]},'agentringnoanswer':{'type':Sequelize[_0x5a10('0x4')],'defaultValue':![]},'agentringnoanswerAt':{'type':Sequelize[_0x5a10('0x2')]},'agentdump':{'type':Sequelize[_0x5a10('0x4')],'defaultValue':![]},'agentdumpAt':{'type':Sequelize[_0x5a10('0x2')]},'lastevent':{'type':Sequelize[_0x5a10('0x1')]},'channel':{'type':Sequelize[_0x5a10('0x1')]},'channelstate':{'type':Sequelize[_0x5a10('0x3')]},'channelstatedesc':{'type':Sequelize[_0x5a10('0x1')]},'connectedlinenum':{'type':Sequelize[_0x5a10('0x1')]},'connectedlinename':{'type':Sequelize[_0x5a10('0x1')]},'language':{'type':Sequelize[_0x5a10('0x1')]},'accountcode':{'type':Sequelize[_0x5a10('0x1')]},'context':{'type':Sequelize[_0x5a10('0x1')]},'exten':{'type':Sequelize['STRING']},'priority':{'type':Sequelize[_0x5a10('0x1')]},'destchannel':{'type':Sequelize[_0x5a10('0x1')]},'destchannelstate':{'type':Sequelize[_0x5a10('0x3')]},'destchannelstatedesc':{'type':Sequelize['STRING']},'destcalleridnum':{'type':Sequelize[_0x5a10('0x1')]},'destcalleridname':{'type':Sequelize['STRING']},'destconnectedlinenum':{'type':Sequelize[_0x5a10('0x1')]},'destconnectedlinename':{'type':Sequelize[_0x5a10('0x1')]},'destlanguage':{'type':Sequelize[_0x5a10('0x1')]},'destaccountcode':{'type':Sequelize['STRING']},'destcontext':{'type':Sequelize[_0x5a10('0x1')]},'destexten':{'type':Sequelize['STRING']},'destpriority':{'type':Sequelize[_0x5a10('0x1')]},'destuniqueid':{'type':Sequelize[_0x5a10('0x1')]},'messageId':{'type':Sequelize[_0x5a10('0x1')]},'inReplyTo':{'type':Sequelize['STRING']},'subject':{'type':Sequelize[_0x5a10('0x1')]},'from':{'type':Sequelize[_0x5a10('0x1')]},'to':{'type':Sequelize[_0x5a10('0x1')]},'cc':{'type':Sequelize[_0x5a10('0x1')]},'attachment':{'type':Sequelize[_0x5a10('0x5')]},'html':{'type':Sequelize[_0x5a10('0x5')]},'text':{'type':Sequelize['TEXT']},'status':{'type':Sequelize[_0x5a10('0x6')](_0x5a10('0x7'),_0x5a10('0x8'),_0x5a10('0x9'),'FAILED')},'url':{'type':Sequelize['STRING']},'app':{'type':Sequelize[_0x5a10('0x1')]},'appdata':{'type':Sequelize[_0x5a10('0x1')]},'projectId':{'type':Sequelize[_0x5a10('0x3')]}}; \ No newline at end of file diff --git a/server/api/integrationReport/integrationReport.controller.js b/server/api/integrationReport/integrationReport.controller.js index ccdf64c..f65c674 100644 --- a/server/api/integrationReport/integrationReport.controller.js +++ b/server/api/integrationReport/integrationReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbfb1=['squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','apply','save','update','then','destroy','stack','name','send','index','map','IntegrationReport','rawAttributes','fieldName','key','query','keys','filters','intersection','model','fields','attributes','length','nolimit','order','sort','where','filter','merge','type','includeAll','include','findAll','catch','show','params','options','find','create','body','describe','eml-format','rimraf','zip-dir','request-promise','bluebird','mustache','util','sox','to-csv','fs-extra','lodash'];(function(_0x4cde6e,_0x18d897){var _0x1dac34=function(_0x23fc91){while(--_0x23fc91){_0x4cde6e['push'](_0x4cde6e['shift']());}};_0x1dac34(++_0x18d897);}(_0xbfb1,0x81));var _0x1bfb=function(_0x90d801,_0x5e10e5){_0x90d801=_0x90d801-0x0;var _0x136d39=_0xbfb1[_0x90d801];return _0x136d39;};'use strict';var emlformat=require(_0x1bfb('0x0'));var rimraf=require(_0x1bfb('0x1'));var zipdir=require(_0x1bfb('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x1bfb('0x3'));var moment=require('moment');var BPromise=require(_0x1bfb('0x4'));var Mustache=require(_0x1bfb('0x5'));var util=require(_0x1bfb('0x6'));var path=require('path');var sox=require(_0x1bfb('0x7'));var csv=require(_0x1bfb('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x1bfb('0x9'));var _=require(_0x1bfb('0xa'));var squel=require(_0x1bfb('0xb'));var crypto=require(_0x1bfb('0xc'));var jsforce=require(_0x1bfb('0xd'));var deskjs=require(_0x1bfb('0xe'));var toCsv=require(_0x1bfb('0x8'));var querystring=require('querystring');var Papa=require(_0x1bfb('0xf'));var Redis=require(_0x1bfb('0x10'));var authService=require(_0x1bfb('0x11'));var qs=require(_0x1bfb('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x1bfb('0x13'))('api');var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x1bfb('0x14'));var db=require(_0x1bfb('0x15'))['db'];function respondWithStatusCode(_0x4fc66f,_0x2d5825){_0x2d5825=_0x2d5825||0xcc;return function(_0x35abde){if(_0x35abde){return _0x4fc66f[_0x1bfb('0x16')](_0x2d5825);}return _0x4fc66f[_0x1bfb('0x17')](_0x2d5825)[_0x1bfb('0x18')]();};}function respondWithResult(_0x13e045,_0x832b89){_0x832b89=_0x832b89||0xc8;return function(_0x3cff83){if(_0x3cff83){return _0x13e045[_0x1bfb('0x17')](_0x832b89)[_0x1bfb('0x19')](_0x3cff83);}};}function respondWithFilteredResult(_0x4b922a,_0x3ee0b3){return function(_0x5327a7){if(_0x5327a7){var _0x2381fa=typeof _0x3ee0b3[_0x1bfb('0x1a')]===_0x1bfb('0x1b')&&typeof _0x3ee0b3[_0x1bfb('0x1c')]===_0x1bfb('0x1b');var _0xdea238=_0x5327a7[_0x1bfb('0x1d')];var _0x112f77=_0x2381fa?0x0:_0x3ee0b3[_0x1bfb('0x1a')];var _0x1d6274=_0x2381fa?_0x5327a7[_0x1bfb('0x1d')]:_0x3ee0b3['offset']+_0x3ee0b3[_0x1bfb('0x1c')];var _0x3a2f34;if(_0x1d6274>=_0xdea238){_0x1d6274=_0xdea238;_0x3a2f34=0xc8;}else{_0x3a2f34=0xce;}_0x4b922a[_0x1bfb('0x17')](_0x3a2f34);return _0x4b922a['set']('Content-Range',_0x112f77+'-'+_0x1d6274+'/'+_0xdea238)[_0x1bfb('0x19')](_0x5327a7);}return null;};}function patchUpdates(_0x1f8b7d){return function(_0x13a5eb){try{jsonpatch[_0x1bfb('0x1e')](_0x13a5eb,_0x1f8b7d,!![]);}catch(_0x4a684a){return BPromise['reject'](_0x4a684a);}return _0x13a5eb[_0x1bfb('0x1f')]();};}function saveUpdates(_0x3c49f7,_0x1a759c){return function(_0x5bc274){if(_0x5bc274){return _0x5bc274[_0x1bfb('0x20')](_0x3c49f7)[_0x1bfb('0x21')](function(_0x388ff1){return _0x388ff1;});}return null;};}function removeEntity(_0x1bde67,_0x1799cc){return function(_0x5cac25){if(_0x5cac25){return _0x5cac25[_0x1bfb('0x22')]()[_0x1bfb('0x21')](function(){_0x1bde67[_0x1bfb('0x17')](0xcc)[_0x1bfb('0x18')]();});}};}function handleEntityNotFound(_0x270a08,_0x556a93){return function(_0x512d69){if(!_0x512d69){_0x270a08[_0x1bfb('0x16')](0x194);}return _0x512d69;};}function handleError(_0x7f40ea,_0x31463f){_0x31463f=_0x31463f||0x1f4;return function(_0x55b65f){logger['error'](_0x55b65f[_0x1bfb('0x23')]);if(_0x55b65f[_0x1bfb('0x24')]){delete _0x55b65f['name'];}_0x7f40ea[_0x1bfb('0x17')](_0x31463f)[_0x1bfb('0x25')](_0x55b65f);};}exports[_0x1bfb('0x26')]=function(_0xffa63e,_0x3f0790){var _0x2bdef0={},_0x258c13={},_0x4fb61e={'count':0x0,'rows':[]};var _0x1248a7=_[_0x1bfb('0x27')](db[_0x1bfb('0x28')][_0x1bfb('0x29')],function(_0x359e9b){return{'name':_0x359e9b[_0x1bfb('0x2a')],'type':_0x359e9b['type'][_0x1bfb('0x2b')]};});_0x258c13['model']=_['map'](_0x1248a7,_0x1bfb('0x24'));_0x258c13[_0x1bfb('0x2c')]=_[_0x1bfb('0x2d')](_0xffa63e[_0x1bfb('0x2c')]);_0x258c13[_0x1bfb('0x2e')]=_[_0x1bfb('0x2f')](_0x258c13['model'],_0x258c13[_0x1bfb('0x2c')]);_0x2bdef0['attributes']=_['intersection'](_0x258c13[_0x1bfb('0x30')],qs[_0x1bfb('0x31')](_0xffa63e[_0x1bfb('0x2c')][_0x1bfb('0x31')]));_0x2bdef0[_0x1bfb('0x32')]=_0x2bdef0['attributes'][_0x1bfb('0x33')]?_0x2bdef0[_0x1bfb('0x32')]:_0x258c13[_0x1bfb('0x30')];if(!_0xffa63e['query']['hasOwnProperty'](_0x1bfb('0x34'))){_0x2bdef0[_0x1bfb('0x1c')]=qs[_0x1bfb('0x1c')](_0xffa63e['query'][_0x1bfb('0x1c')]);_0x2bdef0[_0x1bfb('0x1a')]=qs[_0x1bfb('0x1a')](_0xffa63e[_0x1bfb('0x2c')][_0x1bfb('0x1a')]);}_0x2bdef0[_0x1bfb('0x35')]=qs[_0x1bfb('0x36')](_0xffa63e[_0x1bfb('0x2c')]['sort']);_0x2bdef0[_0x1bfb('0x37')]=qs['filters'](_['pick'](_0xffa63e[_0x1bfb('0x2c')],_0x258c13[_0x1bfb('0x2e')]),_0x1248a7);if(_0xffa63e[_0x1bfb('0x2c')][_0x1bfb('0x38')]){_0x2bdef0[_0x1bfb('0x37')]=_[_0x1bfb('0x39')](_0x2bdef0[_0x1bfb('0x37')],{'$or':_['map'](_0x1248a7,function(_0x3918ba){if(_0x3918ba[_0x1bfb('0x3a')]!=='VIRTUAL'){var _0x1f3fc5={};_0x1f3fc5[_0x3918ba[_0x1bfb('0x24')]]={'$like':'%'+_0xffa63e[_0x1bfb('0x2c')][_0x1bfb('0x38')]+'%'};return _0x1f3fc5;}})});}_0x2bdef0=_['merge']({},_0x2bdef0,_0xffa63e['options']);var _0x30acb3={'where':_0x2bdef0[_0x1bfb('0x37')]};return db['IntegrationReport'][_0x1bfb('0x1d')](_0x30acb3)[_0x1bfb('0x21')](function(_0xdddaa){_0x4fb61e[_0x1bfb('0x1d')]=_0xdddaa;if(_0xffa63e[_0x1bfb('0x2c')][_0x1bfb('0x3b')]){_0x2bdef0[_0x1bfb('0x3c')]=[{'all':!![]}];}return db[_0x1bfb('0x28')][_0x1bfb('0x3d')](_0x2bdef0);})['then'](function(_0x2536d6){_0x4fb61e['rows']=_0x2536d6;return _0x4fb61e;})['then'](respondWithFilteredResult(_0x3f0790,_0x2bdef0))[_0x1bfb('0x3e')](handleError(_0x3f0790,null));};exports[_0x1bfb('0x3f')]=function(_0x29b725,_0x56ba32){var _0x14932a={'raw':![],'where':{'id':_0x29b725[_0x1bfb('0x40')]['id']}},_0x23a94d={};_0x23a94d['model']=_['keys'](db[_0x1bfb('0x28')][_0x1bfb('0x29')]);_0x23a94d[_0x1bfb('0x2c')]=_['keys'](_0x29b725[_0x1bfb('0x2c')]);_0x23a94d['filters']=_[_0x1bfb('0x2f')](_0x23a94d[_0x1bfb('0x30')],_0x23a94d[_0x1bfb('0x2c')]);_0x14932a[_0x1bfb('0x32')]=_[_0x1bfb('0x2f')](_0x23a94d['model'],qs[_0x1bfb('0x31')](_0x29b725[_0x1bfb('0x2c')][_0x1bfb('0x31')]));_0x14932a[_0x1bfb('0x32')]=_0x14932a['attributes']['length']?_0x14932a[_0x1bfb('0x32')]:_0x23a94d[_0x1bfb('0x30')];if(_0x29b725[_0x1bfb('0x2c')]['includeAll']){_0x14932a['include']=[{'all':!![]}];}_0x14932a=_[_0x1bfb('0x39')]({},_0x14932a,_0x29b725[_0x1bfb('0x41')]);return db[_0x1bfb('0x28')][_0x1bfb('0x42')](_0x14932a)[_0x1bfb('0x21')](handleEntityNotFound(_0x56ba32,null))['then'](respondWithResult(_0x56ba32,null))[_0x1bfb('0x3e')](handleError(_0x56ba32,null));};exports[_0x1bfb('0x43')]=function(_0x4ec838,_0x1614cc){return db[_0x1bfb('0x28')][_0x1bfb('0x43')](_0x4ec838[_0x1bfb('0x44')],{})[_0x1bfb('0x21')](respondWithResult(_0x1614cc,0xc9))['catch'](handleError(_0x1614cc,null));};exports[_0x1bfb('0x20')]=function(_0x381a50,_0x3a436f){if(_0x381a50[_0x1bfb('0x44')]['id']){delete _0x381a50['body']['id'];}return db[_0x1bfb('0x28')][_0x1bfb('0x42')]({'where':{'id':_0x381a50[_0x1bfb('0x40')]['id']}})[_0x1bfb('0x21')](handleEntityNotFound(_0x3a436f,null))[_0x1bfb('0x21')](saveUpdates(_0x381a50['body'],null))[_0x1bfb('0x21')](respondWithResult(_0x3a436f,null))[_0x1bfb('0x3e')](handleError(_0x3a436f,null));};exports[_0x1bfb('0x22')]=function(_0x5930c5,_0x21364c){return db['IntegrationReport']['find']({'where':{'id':_0x5930c5[_0x1bfb('0x40')]['id']}})['then'](handleEntityNotFound(_0x21364c,null))[_0x1bfb('0x21')](removeEntity(_0x21364c,null))[_0x1bfb('0x3e')](handleError(_0x21364c,null));};exports[_0x1bfb('0x45')]=function(_0x592727,_0x31bbd5){return db[_0x1bfb('0x28')][_0x1bfb('0x45')]()[_0x1bfb('0x21')](respondWithResult(_0x31bbd5,null))[_0x1bfb('0x3e')](handleError(_0x31bbd5,null));}; \ No newline at end of file +var _0x5c53=['where','pick','merge','VIRTUAL','filter','options','IntegrationReport','rows','catch','show','rawAttributes','create','body','params','find','eml-format','fast-json-patch','request-promise','bluebird','mustache','util','sox','squel','crypto','desk.js','querystring','papaparse','ioredis','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end','status','json','offset','limit','undefined','count','set','Content-Range','reject','save','update','destroy','then','error','stack','name','send','index','map','fieldName','type','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x5c53,0xde));var _0x35c5=function(_0x2c018f,_0x28984a){_0x2c018f=_0x2c018f-0x0;var _0x220a1b=_0x5c53[_0x2c018f];return _0x220a1b;};'use strict';var emlformat=require(_0x35c5('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x35c5('0x1'));var rp=require(_0x35c5('0x2'));var moment=require('moment');var BPromise=require(_0x35c5('0x3'));var Mustache=require(_0x35c5('0x4'));var util=require(_0x35c5('0x5'));var path=require('path');var sox=require(_0x35c5('0x6'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x35c5('0x7'));var crypto=require(_0x35c5('0x8'));var jsforce=require('jsforce');var deskjs=require(_0x35c5('0x9'));var toCsv=require('to-csv');var querystring=require(_0x35c5('0xa'));var Papa=require(_0x35c5('0xb'));var Redis=require(_0x35c5('0xc'));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(_0x35c5('0xd'))(_0x35c5('0xe'));var utils=require(_0x35c5('0xf'));var config=require(_0x35c5('0x10'));var licenseUtil=require(_0x35c5('0x11'));var db=require(_0x35c5('0x12'))['db'];function respondWithStatusCode(_0x22e0da,_0x289f8d){_0x289f8d=_0x289f8d||0xcc;return function(_0xfeac2b){if(_0xfeac2b){return _0x22e0da[_0x35c5('0x13')](_0x289f8d);}return _0x22e0da['status'](_0x289f8d)[_0x35c5('0x14')]();};}function respondWithResult(_0x5d135d,_0x52ee89){_0x52ee89=_0x52ee89||0xc8;return function(_0x5ec666){if(_0x5ec666){return _0x5d135d[_0x35c5('0x15')](_0x52ee89)[_0x35c5('0x16')](_0x5ec666);}};}function respondWithFilteredResult(_0x427051,_0x32c774){return function(_0x5e5d3c){if(_0x5e5d3c){var _0x9699cc=typeof _0x32c774[_0x35c5('0x17')]==='undefined'&&typeof _0x32c774[_0x35c5('0x18')]===_0x35c5('0x19');var _0x47fb45=_0x5e5d3c[_0x35c5('0x1a')];var _0x9cee78=_0x9699cc?0x0:_0x32c774[_0x35c5('0x17')];var _0x19f685=_0x9699cc?_0x5e5d3c['count']:_0x32c774[_0x35c5('0x17')]+_0x32c774['limit'];var _0xba1639;if(_0x19f685>=_0x47fb45){_0x19f685=_0x47fb45;_0xba1639=0xc8;}else{_0xba1639=0xce;}_0x427051['status'](_0xba1639);return _0x427051[_0x35c5('0x1b')](_0x35c5('0x1c'),_0x9cee78+'-'+_0x19f685+'/'+_0x47fb45)[_0x35c5('0x16')](_0x5e5d3c);}return null;};}function patchUpdates(_0xfdfdb9){return function(_0x1a1b66){try{jsonpatch['apply'](_0x1a1b66,_0xfdfdb9,!![]);}catch(_0x2066e1){return BPromise[_0x35c5('0x1d')](_0x2066e1);}return _0x1a1b66[_0x35c5('0x1e')]();};}function saveUpdates(_0x1ac907,_0x3c6fa2){return function(_0x5a7432){if(_0x5a7432){return _0x5a7432[_0x35c5('0x1f')](_0x1ac907)['then'](function(_0x3f0b70){return _0x3f0b70;});}return null;};}function removeEntity(_0x1e51dc,_0x3b1f94){return function(_0x4f05a7){if(_0x4f05a7){return _0x4f05a7[_0x35c5('0x20')]()[_0x35c5('0x21')](function(){_0x1e51dc[_0x35c5('0x15')](0xcc)[_0x35c5('0x14')]();});}};}function handleEntityNotFound(_0x334428,_0x3fb5f8){return function(_0x1f83b9){if(!_0x1f83b9){_0x334428['sendStatus'](0x194);}return _0x1f83b9;};}function handleError(_0x3782d2,_0x50d273){_0x50d273=_0x50d273||0x1f4;return function(_0x3448f7){logger[_0x35c5('0x22')](_0x3448f7[_0x35c5('0x23')]);if(_0x3448f7[_0x35c5('0x24')]){delete _0x3448f7[_0x35c5('0x24')];}_0x3782d2['status'](_0x50d273)[_0x35c5('0x25')](_0x3448f7);};}exports[_0x35c5('0x26')]=function(_0x2d0c55,_0x4536a4){var _0x4f9a89={},_0x2f1f6e={},_0x2bf4ad={'count':0x0,'rows':[]};var _0x46198b=_[_0x35c5('0x27')](db['IntegrationReport']['rawAttributes'],function(_0x271b70){return{'name':_0x271b70[_0x35c5('0x28')],'type':_0x271b70[_0x35c5('0x29')]['key']};});_0x2f1f6e[_0x35c5('0x2a')]=_[_0x35c5('0x27')](_0x46198b,_0x35c5('0x24'));_0x2f1f6e[_0x35c5('0x2b')]=_[_0x35c5('0x2c')](_0x2d0c55[_0x35c5('0x2b')]);_0x2f1f6e[_0x35c5('0x2d')]=_[_0x35c5('0x2e')](_0x2f1f6e[_0x35c5('0x2a')],_0x2f1f6e['query']);_0x4f9a89['attributes']=_[_0x35c5('0x2e')](_0x2f1f6e['model'],qs[_0x35c5('0x2f')](_0x2d0c55[_0x35c5('0x2b')][_0x35c5('0x2f')]));_0x4f9a89[_0x35c5('0x30')]=_0x4f9a89['attributes'][_0x35c5('0x31')]?_0x4f9a89[_0x35c5('0x30')]:_0x2f1f6e[_0x35c5('0x2a')];if(!_0x2d0c55[_0x35c5('0x2b')][_0x35c5('0x32')](_0x35c5('0x33'))){_0x4f9a89[_0x35c5('0x18')]=qs[_0x35c5('0x18')](_0x2d0c55[_0x35c5('0x2b')][_0x35c5('0x18')]);_0x4f9a89[_0x35c5('0x17')]=qs[_0x35c5('0x17')](_0x2d0c55[_0x35c5('0x2b')][_0x35c5('0x17')]);}_0x4f9a89[_0x35c5('0x34')]=qs[_0x35c5('0x35')](_0x2d0c55[_0x35c5('0x2b')]['sort']);_0x4f9a89[_0x35c5('0x36')]=qs[_0x35c5('0x2d')](_[_0x35c5('0x37')](_0x2d0c55[_0x35c5('0x2b')],_0x2f1f6e[_0x35c5('0x2d')]),_0x46198b);if(_0x2d0c55[_0x35c5('0x2b')]['filter']){_0x4f9a89[_0x35c5('0x36')]=_[_0x35c5('0x38')](_0x4f9a89['where'],{'$or':_['map'](_0x46198b,function(_0xcebc9b){if(_0xcebc9b[_0x35c5('0x29')]!==_0x35c5('0x39')){var _0x43dae0={};_0x43dae0[_0xcebc9b['name']]={'$like':'%'+_0x2d0c55[_0x35c5('0x2b')][_0x35c5('0x3a')]+'%'};return _0x43dae0;}})});}_0x4f9a89=_['merge']({},_0x4f9a89,_0x2d0c55[_0x35c5('0x3b')]);var _0x3e415b={'where':_0x4f9a89[_0x35c5('0x36')]};return db[_0x35c5('0x3c')][_0x35c5('0x1a')](_0x3e415b)['then'](function(_0x399b9a){_0x2bf4ad[_0x35c5('0x1a')]=_0x399b9a;if(_0x2d0c55[_0x35c5('0x2b')]['includeAll']){_0x4f9a89['include']=[{'all':!![]}];}return db[_0x35c5('0x3c')]['findAll'](_0x4f9a89);})[_0x35c5('0x21')](function(_0x477a1a){_0x2bf4ad[_0x35c5('0x3d')]=_0x477a1a;return _0x2bf4ad;})[_0x35c5('0x21')](respondWithFilteredResult(_0x4536a4,_0x4f9a89))[_0x35c5('0x3e')](handleError(_0x4536a4,null));};exports[_0x35c5('0x3f')]=function(_0x4bcf7d,_0x3e3105){var _0x4d284d={'raw':![],'where':{'id':_0x4bcf7d['params']['id']}},_0x1122d7={};_0x1122d7[_0x35c5('0x2a')]=_[_0x35c5('0x2c')](db[_0x35c5('0x3c')][_0x35c5('0x40')]);_0x1122d7[_0x35c5('0x2b')]=_[_0x35c5('0x2c')](_0x4bcf7d['query']);_0x1122d7[_0x35c5('0x2d')]=_[_0x35c5('0x2e')](_0x1122d7['model'],_0x1122d7[_0x35c5('0x2b')]);_0x4d284d[_0x35c5('0x30')]=_['intersection'](_0x1122d7[_0x35c5('0x2a')],qs['fields'](_0x4bcf7d[_0x35c5('0x2b')][_0x35c5('0x2f')]));_0x4d284d[_0x35c5('0x30')]=_0x4d284d[_0x35c5('0x30')][_0x35c5('0x31')]?_0x4d284d['attributes']:_0x1122d7['model'];if(_0x4bcf7d[_0x35c5('0x2b')]['includeAll']){_0x4d284d['include']=[{'all':!![]}];}_0x4d284d=_[_0x35c5('0x38')]({},_0x4d284d,_0x4bcf7d[_0x35c5('0x3b')]);return db[_0x35c5('0x3c')]['find'](_0x4d284d)[_0x35c5('0x21')](handleEntityNotFound(_0x3e3105,null))[_0x35c5('0x21')](respondWithResult(_0x3e3105,null))[_0x35c5('0x3e')](handleError(_0x3e3105,null));};exports[_0x35c5('0x41')]=function(_0x2ecaf3,_0x39083d){return db[_0x35c5('0x3c')][_0x35c5('0x41')](_0x2ecaf3[_0x35c5('0x42')],{})['then'](respondWithResult(_0x39083d,0xc9))['catch'](handleError(_0x39083d,null));};exports[_0x35c5('0x1f')]=function(_0x2e273b,_0x571b59){if(_0x2e273b['body']['id']){delete _0x2e273b[_0x35c5('0x42')]['id'];}return db[_0x35c5('0x3c')]['find']({'where':{'id':_0x2e273b[_0x35c5('0x43')]['id']}})['then'](handleEntityNotFound(_0x571b59,null))[_0x35c5('0x21')](saveUpdates(_0x2e273b[_0x35c5('0x42')],null))[_0x35c5('0x21')](respondWithResult(_0x571b59,null))['catch'](handleError(_0x571b59,null));};exports[_0x35c5('0x20')]=function(_0x434c77,_0x4163e5){return db[_0x35c5('0x3c')][_0x35c5('0x44')]({'where':{'id':_0x434c77['params']['id']}})[_0x35c5('0x21')](handleEntityNotFound(_0x4163e5,null))[_0x35c5('0x21')](removeEntity(_0x4163e5,null))[_0x35c5('0x3e')](handleError(_0x4163e5,null));};exports['describe']=function(_0x30efe1,_0xe22cde){return db[_0x35c5('0x3c')]['describe']()[_0x35c5('0x21')](respondWithResult(_0xe22cde,null))[_0x35c5('0x3e')](handleError(_0xe22cde,null));}; \ No newline at end of file diff --git a/server/api/integrationReport/integrationReport.model.js b/server/api/integrationReport/integrationReport.model.js index fc40409..83ae3bb 100644 --- a/server/api/integrationReport/integrationReport.model.js +++ b/server/api/integrationReport/integrationReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0f3b=['util','../../config/logger','bluebird','request-promise','rimraf','../../config/environment','./integrationReport.attributes','exports','define','IntegrationReport','report_integration','lodash'];(function(_0x25167c,_0x33ab9e){var _0xe15c31=function(_0x16b17a){while(--_0x16b17a){_0x25167c['push'](_0x25167c['shift']());}};_0xe15c31(++_0x33ab9e);}(_0x0f3b,0x113));var _0xb0f3=function(_0x119c74,_0x451559){_0x119c74=_0x119c74-0x0;var _0x2ceb7b=_0x0f3b[_0x119c74];return _0x2ceb7b;};'use strict';var _=require(_0xb0f3('0x0'));var util=require(_0xb0f3('0x1'));var logger=require(_0xb0f3('0x2'))('api');var moment=require('moment');var BPromise=require(_0xb0f3('0x3'));var rp=require(_0xb0f3('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xb0f3('0x5'));var config=require(_0xb0f3('0x6'));var attributes=require(_0xb0f3('0x7'));module[_0xb0f3('0x8')]=function(_0x54e743,_0x1a4484){return _0x54e743[_0xb0f3('0x9')](_0xb0f3('0xa'),attributes,{'tableName':_0xb0f3('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xe52b=['path','rimraf','../../config/environment','./integrationReport.attributes','exports','define','IntegrationReport','report_integration','lodash','../../config/logger','api','bluebird','request-promise'];(function(_0x4da6d2,_0x811b9a){var _0x278f55=function(_0x361b13){while(--_0x361b13){_0x4da6d2['push'](_0x4da6d2['shift']());}};_0x278f55(++_0x811b9a);}(_0xe52b,0x7d));var _0xbe52=function(_0xcbf0d6,_0x5eb346){_0xcbf0d6=_0xcbf0d6-0x0;var _0x1b9782=_0xe52b[_0xcbf0d6];return _0x1b9782;};'use strict';var _=require(_0xbe52('0x0'));var util=require('util');var logger=require(_0xbe52('0x1'))(_0xbe52('0x2'));var moment=require('moment');var BPromise=require(_0xbe52('0x3'));var rp=require(_0xbe52('0x4'));var fs=require('fs');var path=require(_0xbe52('0x5'));var rimraf=require(_0xbe52('0x6'));var config=require(_0xbe52('0x7'));var attributes=require(_0xbe52('0x8'));module[_0xbe52('0x9')]=function(_0x2f8669,_0x3a5a36){return _0x2f8669[_0xbe52('0xa')](_0xbe52('0xb'),attributes,{'tableName':_0xbe52('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/integrationReport/integrationReport.rpc.js b/server/api/integrationReport/integrationReport.rpc.js index 0d7cc4a..e29f2c7 100644 --- a/server/api/integrationReport/integrationReport.rpc.js +++ b/server/api/integrationReport/integrationReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5fab=['../../config/environment','jayson/promise','client','request','then','request\x20sent','debug','IntegrationReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','IntegrationReport,\x20%s,\x20%s','result','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc'];(function(_0xa883e3,_0x599111){var _0x23300a=function(_0x4abd7f){while(--_0x4abd7f){_0xa883e3['push'](_0xa883e3['shift']());}};_0x23300a(++_0x599111);}(_0x5fab,0x177));var _0xb5fa=function(_0x3541da,_0x5b2254){_0x3541da=_0x3541da-0x0;var _0xa24cff=_0x5fab[_0x3541da];return _0xa24cff;};'use strict';var _=require(_0xb5fa('0x0'));var util=require(_0xb5fa('0x1'));var moment=require('moment');var BPromise=require(_0xb5fa('0x2'));var rs=require(_0xb5fa('0x3'));var fs=require('fs');var Redis=require(_0xb5fa('0x4'));var db=require(_0xb5fa('0x5'))['db'];var utils=require(_0xb5fa('0x6'));var logger=require(_0xb5fa('0x7'))(_0xb5fa('0x8'));var config=require(_0xb5fa('0x9'));var jayson=require(_0xb5fa('0xa'));var client=jayson[_0xb5fa('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x5d70f6,_0x2e3804,_0x1aec3e){return new BPromise(function(_0x9c7bce,_0x56d018){return client[_0xb5fa('0xc')](_0x5d70f6,_0x1aec3e)[_0xb5fa('0xd')](function(_0x2cf4a5){logger['info']('IntegrationReport,\x20%s,\x20%s',_0x2e3804,_0xb5fa('0xe'));logger[_0xb5fa('0xf')](_0xb5fa('0x10'),_0x2e3804,_0xb5fa('0xe'),JSON[_0xb5fa('0x11')](_0x2cf4a5));if(_0x2cf4a5[_0xb5fa('0x12')]){if(_0x2cf4a5[_0xb5fa('0x12')][_0xb5fa('0x13')]===0x1f4){logger[_0xb5fa('0x12')]('IntegrationReport,\x20%s,\x20%s',_0x2e3804,_0x2cf4a5[_0xb5fa('0x12')][_0xb5fa('0x14')]);return _0x56d018(_0x2cf4a5['error'][_0xb5fa('0x14')]);}logger['error'](_0xb5fa('0x15'),_0x2e3804,_0x2cf4a5[_0xb5fa('0x12')][_0xb5fa('0x14')]);return _0x9c7bce(_0x2cf4a5[_0xb5fa('0x12')][_0xb5fa('0x14')]);}else{logger['info']('IntegrationReport,\x20%s,\x20%s',_0x2e3804,_0xb5fa('0xe'));_0x9c7bce(_0x2cf4a5[_0xb5fa('0x16')][_0xb5fa('0x14')]);}})[_0xb5fa('0x17')](function(_0x56fe10){logger['error'](_0xb5fa('0x15'),_0x2e3804,_0x56fe10);_0x56d018(_0x56fe10);});});} \ No newline at end of file +var _0x31f0=['../../config/environment','request','info','IntegrationReport,\x20%s,\x20%s','request\x20sent','debug','IntegrationReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','lodash','moment','randomstring','ioredis','../../mysqldb','../../config/utils','rpc'];(function(_0x36a0a4,_0x7178d6){var _0x32d0b6=function(_0x4a931a){while(--_0x4a931a){_0x36a0a4['push'](_0x36a0a4['shift']());}};_0x32d0b6(++_0x7178d6);}(_0x31f0,0xb7));var _0x031f=function(_0x56df1d,_0x5ab5dc){_0x56df1d=_0x56df1d-0x0;var _0x3d32fb=_0x31f0[_0x56df1d];return _0x3d32fb;};'use strict';var _=require(_0x031f('0x0'));var util=require('util');var moment=require(_0x031f('0x1'));var BPromise=require('bluebird');var rs=require(_0x031f('0x2'));var fs=require('fs');var Redis=require(_0x031f('0x3'));var db=require(_0x031f('0x4'))['db'];var utils=require(_0x031f('0x5'));var logger=require('../../config/logger')(_0x031f('0x6'));var config=require(_0x031f('0x7'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x3dc98e,_0x487e65,_0x365f59){return new BPromise(function(_0x4300b4,_0x2569b6){return client[_0x031f('0x8')](_0x3dc98e,_0x365f59)['then'](function(_0x2e5624){logger[_0x031f('0x9')](_0x031f('0xa'),_0x487e65,_0x031f('0xb'));logger[_0x031f('0xc')](_0x031f('0xd'),_0x487e65,_0x031f('0xb'),JSON[_0x031f('0xe')](_0x2e5624));if(_0x2e5624['error']){if(_0x2e5624[_0x031f('0xf')][_0x031f('0x10')]===0x1f4){logger[_0x031f('0xf')](_0x031f('0xa'),_0x487e65,_0x2e5624[_0x031f('0xf')][_0x031f('0x11')]);return _0x2569b6(_0x2e5624[_0x031f('0xf')]['message']);}logger[_0x031f('0xf')](_0x031f('0xa'),_0x487e65,_0x2e5624[_0x031f('0xf')][_0x031f('0x11')]);return _0x4300b4(_0x2e5624[_0x031f('0xf')]['message']);}else{logger['info'](_0x031f('0xa'),_0x487e65,_0x031f('0xb'));_0x4300b4(_0x2e5624[_0x031f('0x12')][_0x031f('0x11')]);}})['catch'](function(_0x1dc4a7){logger[_0x031f('0xf')]('IntegrationReport,\x20%s,\x20%s',_0x487e65,_0x1dc4a7);_0x2569b6(_0x1dc4a7);});});} \ No newline at end of file diff --git a/server/api/interval/index.js b/server/api/interval/index.js index 0ca04e4..433a9be 100644 --- a/server/api/interval/index.js +++ b/server/api/interval/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x99a0=['update','destroy','exports','multer','util','fs-extra','../../components/auth/service','../../config/environment','./interval.controller','get','isAuthenticated','index','show','getIntervals','post','create','/:id/sub_intervals','addInterval','/:id/sub_intervals/create_many','addIntervals','put','/:id'];(function(_0x3a7634,_0x2db384){var _0x23bbe9=function(_0x226734){while(--_0x226734){_0x3a7634['push'](_0x3a7634['shift']());}};_0x23bbe9(++_0x2db384);}(_0x99a0,0x121));var _0x099a=function(_0x466b18,_0x32d417){_0x466b18=_0x466b18-0x0;var _0x71d91c=_0x99a0[_0x466b18];return _0x71d91c;};'use strict';var multer=require(_0x099a('0x0'));var util=require(_0x099a('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express['Router']();var fs_extra=require(_0x099a('0x2'));var auth=require(_0x099a('0x3'));var interaction=require('../../components/interaction/service');var config=require(_0x099a('0x4'));var controller=require(_0x099a('0x5'));router[_0x099a('0x6')]('/',auth[_0x099a('0x7')](),controller[_0x099a('0x8')]);router[_0x099a('0x6')]('/:id',auth[_0x099a('0x7')](),controller[_0x099a('0x9')]);router[_0x099a('0x6')]('/:id/sub_intervals',auth[_0x099a('0x7')](),controller[_0x099a('0xa')]);router[_0x099a('0xb')]('/',auth[_0x099a('0x7')](),controller[_0x099a('0xc')]);router[_0x099a('0xb')](_0x099a('0xd'),auth[_0x099a('0x7')](),controller[_0x099a('0xe')]);router[_0x099a('0xb')](_0x099a('0xf'),auth[_0x099a('0x7')](),controller[_0x099a('0x10')]);router[_0x099a('0x11')](_0x099a('0x12'),auth['isAuthenticated'](),controller[_0x099a('0x13')]);router['delete'](_0x099a('0x12'),auth['isAuthenticated'](),controller[_0x099a('0x14')]);module[_0x099a('0x15')]=router; \ No newline at end of file +var _0xe364=['/:id','/:id/sub_intervals','getIntervals','create','post','/:id/sub_intervals/create_many','addIntervals','put','destroy','exports','util','path','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./interval.controller','get','isAuthenticated','index'];(function(_0x2d122c,_0x4b4c90){var _0x264930=function(_0x5f5354){while(--_0x5f5354){_0x2d122c['push'](_0x2d122c['shift']());}};_0x264930(++_0x4b4c90);}(_0xe364,0x1c3));var _0x4e36=function(_0x4bd06e,_0x593701){_0x4bd06e=_0x4bd06e-0x0;var _0x85ebb=_0xe364[_0x4bd06e];return _0x85ebb;};'use strict';var multer=require('multer');var util=require(_0x4e36('0x0'));var path=require(_0x4e36('0x1'));var timeout=require('connect-timeout');var express=require(_0x4e36('0x2'));var router=express['Router']();var fs_extra=require(_0x4e36('0x3'));var auth=require(_0x4e36('0x4'));var interaction=require(_0x4e36('0x5'));var config=require(_0x4e36('0x6'));var controller=require(_0x4e36('0x7'));router[_0x4e36('0x8')]('/',auth[_0x4e36('0x9')](),controller[_0x4e36('0xa')]);router[_0x4e36('0x8')](_0x4e36('0xb'),auth[_0x4e36('0x9')](),controller['show']);router[_0x4e36('0x8')](_0x4e36('0xc'),auth['isAuthenticated'](),controller[_0x4e36('0xd')]);router['post']('/',auth['isAuthenticated'](),controller[_0x4e36('0xe')]);router[_0x4e36('0xf')](_0x4e36('0xc'),auth['isAuthenticated'](),controller['addInterval']);router['post'](_0x4e36('0x10'),auth[_0x4e36('0x9')](),controller[_0x4e36('0x11')]);router[_0x4e36('0x12')](_0x4e36('0xb'),auth[_0x4e36('0x9')](),controller['update']);router['delete'](_0x4e36('0xb'),auth['isAuthenticated'](),controller[_0x4e36('0x13')]);module[_0x4e36('0x14')]=router; \ No newline at end of file diff --git a/server/api/interval/interval.attributes.js b/server/api/interval/interval.attributes.js index 79eb012..2db438f 100644 --- a/server/api/interval/interval.attributes.js +++ b/server/api/interval/interval.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa671=['STRING','sequelize','exports'];(function(_0x209ec9,_0x30378c){var _0x129b1b=function(_0x2f2b9e){while(--_0x2f2b9e){_0x209ec9['push'](_0x209ec9['shift']());}};_0x129b1b(++_0x30378c);}(_0xa671,0x178));var _0x1a67=function(_0x284f22,_0x45e825){_0x284f22=_0x284f22-0x0;var _0x287180=_0xa671[_0x284f22];return _0x287180;};'use strict';var Sequelize=require(_0x1a67('0x0'));module[_0x1a67('0x1')]={'name':{'type':Sequelize[_0x1a67('0x2')]},'description':{'type':Sequelize[_0x1a67('0x2')]},'interval':{'type':Sequelize[_0x1a67('0x2')],'allowNull':!![]}}; \ No newline at end of file +var _0x46c4=['STRING','sequelize','exports'];(function(_0x46968a,_0x2b6716){var _0x4470d9=function(_0x284d69){while(--_0x284d69){_0x46968a['push'](_0x46968a['shift']());}};_0x4470d9(++_0x2b6716);}(_0x46c4,0x196));var _0x446c=function(_0x16a8b3,_0xa0e45c){_0x16a8b3=_0x16a8b3-0x0;var _0x202a11=_0x46c4[_0x16a8b3];return _0x202a11;};'use strict';var Sequelize=require(_0x446c('0x0'));module[_0x446c('0x1')]={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x446c('0x2')]},'interval':{'type':Sequelize['STRING'],'allowNull':!![]}}; \ No newline at end of file diff --git a/server/api/interval/interval.controller.js b/server/api/interval/interval.controller.js index 72f5161..be5344c 100644 --- a/server/api/interval/interval.controller.js +++ b/server/api/interval/interval.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5c9b=['../../config/utils','../../config/environment','../../config/license/util','../../components/extensions/rewrite','sendStatus','status','limit','undefined','count','offset','set','Content-Range','json','save','update','then','destroy','get','Intervals','UserProfileResource','error','stack','name','Interval','rawAttributes','fieldName','type','key','model','map','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','pick','filter','where','merge','includeAll','findAll','rows','show','params','keys','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','autoAssociation','catch','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','IntervalId','getIntervals','addIntervals','findOne','sequelize','transaction','bulkCreate','eml-format','rimraf','zip-dir','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api'];(function(_0x4ea04c,_0x3cfbcf){var _0x2e347a=function(_0x180afa){while(--_0x180afa){_0x4ea04c['push'](_0x4ea04c['shift']());}};_0x2e347a(++_0x3cfbcf);}(_0x5c9b,0x14e));var _0xb5c9=function(_0x26ed27,_0x1f7cb2){_0x26ed27=_0x26ed27-0x0;var _0x47fde3=_0x5c9b[_0x26ed27];return _0x47fde3;};'use strict';var emlformat=require(_0xb5c9('0x0'));var rimraf=require(_0xb5c9('0x1'));var zipdir=require(_0xb5c9('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0xb5c9('0x3'));var Mustache=require(_0xb5c9('0x4'));var util=require(_0xb5c9('0x5'));var path=require(_0xb5c9('0x6'));var sox=require(_0xb5c9('0x7'));var csv=require(_0xb5c9('0x8'));var ejs=require(_0xb5c9('0x9'));var fs=require('fs');var fs_extra=require(_0xb5c9('0xa'));var _=require(_0xb5c9('0xb'));var squel=require(_0xb5c9('0xc'));var crypto=require(_0xb5c9('0xd'));var jsforce=require('jsforce');var deskjs=require(_0xb5c9('0xe'));var toCsv=require(_0xb5c9('0x8'));var querystring=require(_0xb5c9('0xf'));var Papa=require(_0xb5c9('0x10'));var Redis=require(_0xb5c9('0x11'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0xb5c9('0x12'));var hardwareService=require(_0xb5c9('0x13'));var logger=require(_0xb5c9('0x14'))(_0xb5c9('0x15'));var utils=require(_0xb5c9('0x16'));var config=require(_0xb5c9('0x17'));var licenseUtil=require(_0xb5c9('0x18'));var db=require('../../mysqldb')['db'];var extensions=require(_0xb5c9('0x19'));function respondWithStatusCode(_0x310fd4,_0x791d6b){_0x791d6b=_0x791d6b||0xcc;return function(_0x42a954){if(_0x42a954){return _0x310fd4[_0xb5c9('0x1a')](_0x791d6b);}return _0x310fd4['status'](_0x791d6b)['end']();};}function respondWithResult(_0x9fb9dd,_0x4e22e1){_0x4e22e1=_0x4e22e1||0xc8;return function(_0x583425){if(_0x583425){return _0x9fb9dd[_0xb5c9('0x1b')](_0x4e22e1)['json'](_0x583425);}};}function respondWithFilteredResult(_0x3f5e83,_0x4a3b88){return function(_0x24a847){if(_0x24a847){var _0x143dce=typeof _0x4a3b88['offset']==='undefined'&&typeof _0x4a3b88[_0xb5c9('0x1c')]===_0xb5c9('0x1d');var _0x544ad6=_0x24a847[_0xb5c9('0x1e')];var _0x2cbf4f=_0x143dce?0x0:_0x4a3b88[_0xb5c9('0x1f')];var _0x25c531=_0x143dce?_0x24a847[_0xb5c9('0x1e')]:_0x4a3b88['offset']+_0x4a3b88['limit'];var _0x19749d;if(_0x25c531>=_0x544ad6){_0x25c531=_0x544ad6;_0x19749d=0xc8;}else{_0x19749d=0xce;}_0x3f5e83[_0xb5c9('0x1b')](_0x19749d);return _0x3f5e83[_0xb5c9('0x20')](_0xb5c9('0x21'),_0x2cbf4f+'-'+_0x25c531+'/'+_0x544ad6)[_0xb5c9('0x22')](_0x24a847);}return null;};}function patchUpdates(_0x12d3c3){return function(_0x374afc){try{jsonpatch['apply'](_0x374afc,_0x12d3c3,!![]);}catch(_0x4f053f){return BPromise['reject'](_0x4f053f);}return _0x374afc[_0xb5c9('0x23')]();};}function saveUpdates(_0x1799b5,_0x433249){return function(_0x7aefc5){if(_0x7aefc5){return _0x7aefc5[_0xb5c9('0x24')](_0x1799b5)[_0xb5c9('0x25')](function(_0x4cf456){return _0x4cf456;});}return null;};}function removeEntity(_0x17595d,_0x312880){return function(_0x4e99e){if(_0x4e99e){return _0x4e99e[_0xb5c9('0x26')]()[_0xb5c9('0x25')](function(){var _0x13f74b=_0x4e99e[_0xb5c9('0x27')]({'plain':!![]});var _0x5ab2c0=_0xb5c9('0x28');return db[_0xb5c9('0x29')][_0xb5c9('0x26')]({'where':{'type':_0x5ab2c0,'resourceId':_0x13f74b['id']}})[_0xb5c9('0x25')](function(){return _0x4e99e;});})[_0xb5c9('0x25')](function(){_0x17595d[_0xb5c9('0x1b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x4aa935,_0x4664dd){return function(_0x3c0b1b){if(!_0x3c0b1b){_0x4aa935[_0xb5c9('0x1a')](0x194);}return _0x3c0b1b;};}function handleError(_0x14fb5b,_0x14b881){_0x14b881=_0x14b881||0x1f4;return function(_0x3d2fb4){logger[_0xb5c9('0x2a')](_0x3d2fb4[_0xb5c9('0x2b')]);if(_0x3d2fb4[_0xb5c9('0x2c')]){delete _0x3d2fb4[_0xb5c9('0x2c')];}_0x14fb5b[_0xb5c9('0x1b')](_0x14b881)['send'](_0x3d2fb4);};}exports['index']=function(_0x513ab1,_0x2b065a){var _0x1960bb={},_0x350e5f={},_0x1ca2b5={'count':0x0,'rows':[]};var _0x2d1e52=_['map'](db[_0xb5c9('0x2d')][_0xb5c9('0x2e')],function(_0x1c6f50){return{'name':_0x1c6f50[_0xb5c9('0x2f')],'type':_0x1c6f50[_0xb5c9('0x30')][_0xb5c9('0x31')]};});_0x350e5f[_0xb5c9('0x32')]=_[_0xb5c9('0x33')](_0x2d1e52,_0xb5c9('0x2c'));_0x350e5f[_0xb5c9('0x34')]=_['keys'](_0x513ab1['query']);_0x350e5f[_0xb5c9('0x35')]=_[_0xb5c9('0x36')](_0x350e5f[_0xb5c9('0x32')],_0x350e5f[_0xb5c9('0x34')]);_0x1960bb[_0xb5c9('0x37')]=_[_0xb5c9('0x36')](_0x350e5f[_0xb5c9('0x32')],qs[_0xb5c9('0x38')](_0x513ab1[_0xb5c9('0x34')][_0xb5c9('0x38')]));_0x1960bb[_0xb5c9('0x37')]=_0x1960bb['attributes'][_0xb5c9('0x39')]?_0x1960bb[_0xb5c9('0x37')]:_0x350e5f[_0xb5c9('0x32')];if(!_0x513ab1[_0xb5c9('0x34')][_0xb5c9('0x3a')](_0xb5c9('0x3b'))){_0x1960bb[_0xb5c9('0x1c')]=qs[_0xb5c9('0x1c')](_0x513ab1['query']['limit']);_0x1960bb['offset']=qs[_0xb5c9('0x1f')](_0x513ab1[_0xb5c9('0x34')]['offset']);}_0x1960bb[_0xb5c9('0x3c')]=qs[_0xb5c9('0x3d')](_0x513ab1[_0xb5c9('0x34')][_0xb5c9('0x3d')]);_0x1960bb['where']=qs[_0xb5c9('0x35')](_[_0xb5c9('0x3e')](_0x513ab1['query'],_0x350e5f['filters']),_0x2d1e52);if(_0x513ab1[_0xb5c9('0x34')][_0xb5c9('0x3f')]){_0x1960bb[_0xb5c9('0x40')]=_['merge'](_0x1960bb[_0xb5c9('0x40')],{'$or':_[_0xb5c9('0x33')](_0x2d1e52,function(_0x46e082){if(_0x46e082[_0xb5c9('0x30')]!=='VIRTUAL'){var _0x2b6383={};_0x2b6383[_0x46e082[_0xb5c9('0x2c')]]={'$like':'%'+_0x513ab1['query']['filter']+'%'};return _0x2b6383;}})});}_0x1960bb=_[_0xb5c9('0x41')]({},_0x1960bb,_0x513ab1['options']);var _0x3d5402={'where':_0x1960bb['where']};return db[_0xb5c9('0x2d')][_0xb5c9('0x1e')](_0x3d5402)[_0xb5c9('0x25')](function(_0x4405fd){_0x1ca2b5['count']=_0x4405fd;if(_0x513ab1[_0xb5c9('0x34')][_0xb5c9('0x42')]){_0x1960bb['include']=[{'all':!![]}];}return db['Interval'][_0xb5c9('0x43')](_0x1960bb);})[_0xb5c9('0x25')](function(_0x14d05e){_0x1ca2b5[_0xb5c9('0x44')]=_0x14d05e;return _0x1ca2b5;})[_0xb5c9('0x25')](respondWithFilteredResult(_0x2b065a,_0x1960bb))['catch'](handleError(_0x2b065a,null));};exports[_0xb5c9('0x45')]=function(_0x4855a3,_0x29d5af){var _0x1316da={'raw':!![],'where':{'id':_0x4855a3[_0xb5c9('0x46')]['id']}},_0x252803={};_0x252803[_0xb5c9('0x32')]=_[_0xb5c9('0x47')](db[_0xb5c9('0x2d')][_0xb5c9('0x2e')]);_0x252803[_0xb5c9('0x34')]=_[_0xb5c9('0x47')](_0x4855a3['query']);_0x252803[_0xb5c9('0x35')]=_[_0xb5c9('0x36')](_0x252803[_0xb5c9('0x32')],_0x252803[_0xb5c9('0x34')]);_0x1316da['attributes']=_[_0xb5c9('0x36')](_0x252803[_0xb5c9('0x32')],qs[_0xb5c9('0x38')](_0x4855a3[_0xb5c9('0x34')][_0xb5c9('0x38')]));_0x1316da[_0xb5c9('0x37')]=_0x1316da[_0xb5c9('0x37')][_0xb5c9('0x39')]?_0x1316da[_0xb5c9('0x37')]:_0x252803[_0xb5c9('0x32')];if(_0x4855a3[_0xb5c9('0x34')]['includeAll']){_0x1316da['include']=[{'all':!![]}];}_0x1316da=_[_0xb5c9('0x41')]({},_0x1316da,_0x4855a3['options']);return db[_0xb5c9('0x2d')][_0xb5c9('0x48')](_0x1316da)['then'](handleEntityNotFound(_0x29d5af,null))[_0xb5c9('0x25')](respondWithResult(_0x29d5af,null))['catch'](handleError(_0x29d5af,null));};exports[_0xb5c9('0x49')]=function(_0x12c008,_0x7c946f){return db[_0xb5c9('0x2d')][_0xb5c9('0x49')](_0x12c008[_0xb5c9('0x4a')],{})[_0xb5c9('0x25')](function(_0x3c304c){var _0x4e4bd5=_0x12c008[_0xb5c9('0x4b')]['get']({'plain':!![]});if(!_0x4e4bd5)throw new Error(_0xb5c9('0x4c'));if(_0x4e4bd5[_0xb5c9('0x4d')]===_0xb5c9('0x4b')){var _0x31eaa4=_0x3c304c[_0xb5c9('0x27')]({'plain':!![]});var _0x56416e=_0xb5c9('0x28');return db[_0xb5c9('0x4e')][_0xb5c9('0x48')]({'where':{'name':_0x56416e,'userProfileId':_0x4e4bd5['userProfileId']},'raw':!![]})[_0xb5c9('0x25')](function(_0x81ce4c){if(_0x81ce4c&&_0x81ce4c[_0xb5c9('0x4f')]===0x0){return db[_0xb5c9('0x29')]['create']({'name':_0x31eaa4['name'],'resourceId':_0x31eaa4['id'],'type':_0x81ce4c[_0xb5c9('0x2c')],'sectionId':_0x81ce4c['id']},{})['then'](function(){return _0x3c304c;});}else{return _0x3c304c;}})[_0xb5c9('0x50')](function(_0x1d0e6b){logger[_0xb5c9('0x2a')](_0xb5c9('0x51'),_0x1d0e6b);throw _0x1d0e6b;});}return _0x3c304c;})['then'](respondWithResult(_0x7c946f,0xc9))[_0xb5c9('0x50')](handleError(_0x7c946f,null));};exports['update']=function(_0xba5c76,_0x4e4fcc){if(_0xba5c76[_0xb5c9('0x4a')]['id']){delete _0xba5c76['body']['id'];}return db['Interval'][_0xb5c9('0x48')]({'where':{'id':_0xba5c76[_0xb5c9('0x46')]['id']}})[_0xb5c9('0x25')](handleEntityNotFound(_0x4e4fcc,null))[_0xb5c9('0x25')](saveUpdates(_0xba5c76[_0xb5c9('0x4a')],null))['then'](respondWithResult(_0x4e4fcc,null))[_0xb5c9('0x50')](handleError(_0x4e4fcc,null));};exports[_0xb5c9('0x26')]=function(_0x20e5fa,_0xd2657){return db[_0xb5c9('0x2d')][_0xb5c9('0x48')]({'where':{'id':_0x20e5fa[_0xb5c9('0x46')]['id']}})['then'](handleEntityNotFound(_0xd2657,null))[_0xb5c9('0x25')](removeEntity(_0xd2657,null))[_0xb5c9('0x50')](handleError(_0xd2657,null));};exports['addInterval']=function(_0x270213,_0x52e901,_0x124d74){if(_0x270213['body']['id']){delete _0x270213[_0xb5c9('0x4a')]['id'];}return db[_0xb5c9('0x2d')][_0xb5c9('0x48')]({'where':{'id':_0x270213['params']['id']}})['then'](handleEntityNotFound(_0x52e901,null))[_0xb5c9('0x25')](function(_0x395893){if(_0x395893){_0x270213[_0xb5c9('0x4a')][_0xb5c9('0x52')]=_0x395893['id'];return db[_0xb5c9('0x2d')][_0xb5c9('0x49')](_0x270213[_0xb5c9('0x4a')]);}})[_0xb5c9('0x25')](respondWithResult(_0x52e901,null))[_0xb5c9('0x50')](handleError(_0x52e901,null));};exports[_0xb5c9('0x53')]=function(_0x435f95,_0x5466c1,_0x5b4ffd){var _0x1cf515={};var _0x376c71={};var _0x2382bd;var _0x1a1907;return db['Interval']['findOne']({'where':{'id':_0x435f95[_0xb5c9('0x46')]['id']}})[_0xb5c9('0x25')](handleEntityNotFound(_0x5466c1,null))[_0xb5c9('0x25')](function(_0x288e7c){if(_0x288e7c){_0x2382bd=_0x288e7c;_0x376c71['model']=_['keys'](db[_0xb5c9('0x2d')][_0xb5c9('0x2e')]);_0x376c71[_0xb5c9('0x34')]=_[_0xb5c9('0x47')](_0x435f95[_0xb5c9('0x34')]);_0x376c71[_0xb5c9('0x35')]=_[_0xb5c9('0x36')](_0x376c71[_0xb5c9('0x32')],_0x376c71[_0xb5c9('0x34')]);_0x1cf515[_0xb5c9('0x37')]=_[_0xb5c9('0x36')](_0x376c71[_0xb5c9('0x32')],qs[_0xb5c9('0x38')](_0x435f95[_0xb5c9('0x34')][_0xb5c9('0x38')]));_0x1cf515[_0xb5c9('0x37')]=_0x1cf515[_0xb5c9('0x37')]['length']?_0x1cf515['attributes']:_0x376c71[_0xb5c9('0x32')];_0x1cf515[_0xb5c9('0x3c')]=qs['sort'](_0x435f95[_0xb5c9('0x34')][_0xb5c9('0x3d')]);_0x1cf515['where']=qs[_0xb5c9('0x35')](_[_0xb5c9('0x3e')](_0x435f95['query'],_0x376c71['filters']));if(_0x435f95[_0xb5c9('0x34')][_0xb5c9('0x3f')]){_0x1cf515[_0xb5c9('0x40')]=_['merge'](_0x1cf515['where'],{'$or':_['map'](_0x1cf515[_0xb5c9('0x37')],function(_0x57a3e3){var _0x2c9e5c={};_0x2c9e5c[_0x57a3e3]={'$like':'%'+_0x435f95[_0xb5c9('0x34')]['filter']+'%'};return _0x2c9e5c;})});}_0x1cf515=_[_0xb5c9('0x41')]({},_0x1cf515,_0x435f95['options']);return _0x2382bd[_0xb5c9('0x53')](_0x1cf515);}})[_0xb5c9('0x25')](function(_0x13d4dd){if(_0x13d4dd){_0x1a1907=_0x13d4dd[_0xb5c9('0x39')];if(!_0x435f95[_0xb5c9('0x34')][_0xb5c9('0x3a')](_0xb5c9('0x3b'))){_0x1cf515[_0xb5c9('0x1c')]=qs['limit'](_0x435f95['query'][_0xb5c9('0x1c')]);_0x1cf515[_0xb5c9('0x1f')]=qs[_0xb5c9('0x1f')](_0x435f95[_0xb5c9('0x34')][_0xb5c9('0x1f')]);}return _0x2382bd[_0xb5c9('0x53')](_0x1cf515);}})['then'](function(_0x232436){if(_0x232436){return _0x232436?{'count':_0x1a1907,'rows':_0x232436}:null;}})[_0xb5c9('0x25')](respondWithResult(_0x5466c1,null))[_0xb5c9('0x50')](handleError(_0x5466c1,null));};exports[_0xb5c9('0x54')]=function(_0x18f4f0,_0x52de4a,_0x4660b8){return db[_0xb5c9('0x2d')][_0xb5c9('0x55')]({'where':{'id':_0x18f4f0[_0xb5c9('0x46')]['id']}})[_0xb5c9('0x25')](handleEntityNotFound(_0x52de4a,null))[_0xb5c9('0x25')](function(_0x2f3baf){if(_0x2f3baf){return db[_0xb5c9('0x56')][_0xb5c9('0x57')](function(_0x949abb){return db[_0xb5c9('0x2d')][_0xb5c9('0x26')]({'where':{'IntervalId':_0x18f4f0[_0xb5c9('0x46')]['id']},'transaction':_0x949abb})['then'](function(_0x3dbdf9){var _0x2301c7=_[_0xb5c9('0x33')](_0x18f4f0['body'],function(_0x2f33bb){delete _0x2f33bb['id'];_0x2f33bb[_0xb5c9('0x52')]=_0x18f4f0['params']['id'];return _0x2f33bb;});return db[_0xb5c9('0x2d')][_0xb5c9('0x58')](_0x2301c7,{'transaction':_0x949abb});});})[_0xb5c9('0x25')](function(){return db[_0xb5c9('0x2d')][_0xb5c9('0x43')]({'where':{'IntervalId':_0x18f4f0[_0xb5c9('0x46')]['id']}});});}})[_0xb5c9('0x25')](respondWithResult(_0x52de4a,null))[_0xb5c9('0x50')](handleError(_0x52de4a,null));}; \ No newline at end of file +var _0xe715=['fs-extra','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','../../components/extensions/rewrite','sendStatus','status','end','json','offset','undefined','limit','set','Content-Range','apply','then','get','Intervals','UserProfileResource','destroy','error','stack','name','send','index','map','rawAttributes','fieldName','type','key','query','keys','filters','model','attributes','intersection','fields','length','nolimit','order','sort','pick','where','merge','VIRTUAL','options','Interval','count','include','findAll','rows','catch','params','includeAll','find','create','body','role','user','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','addInterval','getIntervals','findOne','filter','hasOwnProperty','addIntervals','sequelize','transaction','IntervalId','bulkCreate','rimraf','zip-dir','fast-json-patch','bluebird','mustache','util','sox','to-csv','ejs'];(function(_0x314815,_0x4bd2a5){var _0x29c93c=function(_0x14bc41){while(--_0x14bc41){_0x314815['push'](_0x314815['shift']());}};_0x29c93c(++_0x4bd2a5);}(_0xe715,0x1c8));var _0x5e71=function(_0x17428d,_0x41bc42){_0x17428d=_0x17428d-0x0;var _0x36bf22=_0xe715[_0x17428d];return _0x36bf22;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x5e71('0x0'));var zipdir=require(_0x5e71('0x1'));var jsonpatch=require(_0x5e71('0x2'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x5e71('0x3'));var Mustache=require(_0x5e71('0x4'));var util=require(_0x5e71('0x5'));var path=require('path');var sox=require(_0x5e71('0x6'));var csv=require(_0x5e71('0x7'));var ejs=require(_0x5e71('0x8'));var fs=require('fs');var fs_extra=require(_0x5e71('0x9'));var _=require(_0x5e71('0xa'));var squel=require(_0x5e71('0xb'));var crypto=require(_0x5e71('0xc'));var jsforce=require(_0x5e71('0xd'));var deskjs=require('desk.js');var toCsv=require(_0x5e71('0x7'));var querystring=require(_0x5e71('0xe'));var Papa=require(_0x5e71('0xf'));var Redis=require(_0x5e71('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x5e71('0x11'));var as=require(_0x5e71('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x5e71('0x13'));var utils=require(_0x5e71('0x14'));var config=require(_0x5e71('0x15'));var licenseUtil=require(_0x5e71('0x16'));var db=require(_0x5e71('0x17'))['db'];var extensions=require(_0x5e71('0x18'));function respondWithStatusCode(_0x104e98,_0x223629){_0x223629=_0x223629||0xcc;return function(_0x335e6d){if(_0x335e6d){return _0x104e98[_0x5e71('0x19')](_0x223629);}return _0x104e98[_0x5e71('0x1a')](_0x223629)[_0x5e71('0x1b')]();};}function respondWithResult(_0x1c66bb,_0x242619){_0x242619=_0x242619||0xc8;return function(_0x377fe1){if(_0x377fe1){return _0x1c66bb['status'](_0x242619)[_0x5e71('0x1c')](_0x377fe1);}};}function respondWithFilteredResult(_0x2d8b51,_0x303a68){return function(_0x13bfb6){if(_0x13bfb6){var _0x53a6bc=typeof _0x303a68[_0x5e71('0x1d')]===_0x5e71('0x1e')&&typeof _0x303a68[_0x5e71('0x1f')]===_0x5e71('0x1e');var _0x47861e=_0x13bfb6['count'];var _0x3600af=_0x53a6bc?0x0:_0x303a68[_0x5e71('0x1d')];var _0x64a21d=_0x53a6bc?_0x13bfb6['count']:_0x303a68[_0x5e71('0x1d')]+_0x303a68[_0x5e71('0x1f')];var _0x2a301;if(_0x64a21d>=_0x47861e){_0x64a21d=_0x47861e;_0x2a301=0xc8;}else{_0x2a301=0xce;}_0x2d8b51['status'](_0x2a301);return _0x2d8b51[_0x5e71('0x20')](_0x5e71('0x21'),_0x3600af+'-'+_0x64a21d+'/'+_0x47861e)[_0x5e71('0x1c')](_0x13bfb6);}return null;};}function patchUpdates(_0x37a714){return function(_0x1da15e){try{jsonpatch[_0x5e71('0x22')](_0x1da15e,_0x37a714,!![]);}catch(_0x29f0e5){return BPromise['reject'](_0x29f0e5);}return _0x1da15e['save']();};}function saveUpdates(_0x90d3ca,_0x1422a3){return function(_0x33f79c){if(_0x33f79c){return _0x33f79c['update'](_0x90d3ca)['then'](function(_0x4a7da2){return _0x4a7da2;});}return null;};}function removeEntity(_0x1fee5f,_0x3c73fc){return function(_0x830c19){if(_0x830c19){return _0x830c19['destroy']()[_0x5e71('0x23')](function(){var _0x17e03e=_0x830c19[_0x5e71('0x24')]({'plain':!![]});var _0x98e6da=_0x5e71('0x25');return db[_0x5e71('0x26')][_0x5e71('0x27')]({'where':{'type':_0x98e6da,'resourceId':_0x17e03e['id']}})[_0x5e71('0x23')](function(){return _0x830c19;});})[_0x5e71('0x23')](function(){_0x1fee5f[_0x5e71('0x1a')](0xcc)[_0x5e71('0x1b')]();});}};}function handleEntityNotFound(_0x5f1117,_0x19bd1a){return function(_0x36c0ef){if(!_0x36c0ef){_0x5f1117['sendStatus'](0x194);}return _0x36c0ef;};}function handleError(_0x2508d1,_0x41b285){_0x41b285=_0x41b285||0x1f4;return function(_0x4192ff){logger[_0x5e71('0x28')](_0x4192ff[_0x5e71('0x29')]);if(_0x4192ff['name']){delete _0x4192ff[_0x5e71('0x2a')];}_0x2508d1['status'](_0x41b285)[_0x5e71('0x2b')](_0x4192ff);};}exports[_0x5e71('0x2c')]=function(_0x4a7b16,_0x14230c){var _0xc497f8={},_0x1c9e8a={},_0x53c5c1={'count':0x0,'rows':[]};var _0x51b061=_[_0x5e71('0x2d')](db['Interval'][_0x5e71('0x2e')],function(_0x10aac5){return{'name':_0x10aac5[_0x5e71('0x2f')],'type':_0x10aac5[_0x5e71('0x30')][_0x5e71('0x31')]};});_0x1c9e8a['model']=_[_0x5e71('0x2d')](_0x51b061,_0x5e71('0x2a'));_0x1c9e8a[_0x5e71('0x32')]=_[_0x5e71('0x33')](_0x4a7b16['query']);_0x1c9e8a[_0x5e71('0x34')]=_['intersection'](_0x1c9e8a[_0x5e71('0x35')],_0x1c9e8a[_0x5e71('0x32')]);_0xc497f8[_0x5e71('0x36')]=_[_0x5e71('0x37')](_0x1c9e8a['model'],qs[_0x5e71('0x38')](_0x4a7b16[_0x5e71('0x32')][_0x5e71('0x38')]));_0xc497f8[_0x5e71('0x36')]=_0xc497f8[_0x5e71('0x36')][_0x5e71('0x39')]?_0xc497f8[_0x5e71('0x36')]:_0x1c9e8a[_0x5e71('0x35')];if(!_0x4a7b16[_0x5e71('0x32')]['hasOwnProperty'](_0x5e71('0x3a'))){_0xc497f8[_0x5e71('0x1f')]=qs[_0x5e71('0x1f')](_0x4a7b16['query']['limit']);_0xc497f8[_0x5e71('0x1d')]=qs[_0x5e71('0x1d')](_0x4a7b16['query'][_0x5e71('0x1d')]);}_0xc497f8[_0x5e71('0x3b')]=qs[_0x5e71('0x3c')](_0x4a7b16[_0x5e71('0x32')][_0x5e71('0x3c')]);_0xc497f8['where']=qs['filters'](_[_0x5e71('0x3d')](_0x4a7b16['query'],_0x1c9e8a[_0x5e71('0x34')]),_0x51b061);if(_0x4a7b16['query']['filter']){_0xc497f8[_0x5e71('0x3e')]=_[_0x5e71('0x3f')](_0xc497f8[_0x5e71('0x3e')],{'$or':_[_0x5e71('0x2d')](_0x51b061,function(_0x24fac9){if(_0x24fac9[_0x5e71('0x30')]!==_0x5e71('0x40')){var _0x541a4c={};_0x541a4c[_0x24fac9[_0x5e71('0x2a')]]={'$like':'%'+_0x4a7b16[_0x5e71('0x32')]['filter']+'%'};return _0x541a4c;}})});}_0xc497f8=_[_0x5e71('0x3f')]({},_0xc497f8,_0x4a7b16[_0x5e71('0x41')]);var _0x1ecded={'where':_0xc497f8[_0x5e71('0x3e')]};return db[_0x5e71('0x42')][_0x5e71('0x43')](_0x1ecded)['then'](function(_0x208a7b){_0x53c5c1[_0x5e71('0x43')]=_0x208a7b;if(_0x4a7b16[_0x5e71('0x32')]['includeAll']){_0xc497f8[_0x5e71('0x44')]=[{'all':!![]}];}return db[_0x5e71('0x42')][_0x5e71('0x45')](_0xc497f8);})[_0x5e71('0x23')](function(_0x2385f5){_0x53c5c1[_0x5e71('0x46')]=_0x2385f5;return _0x53c5c1;})['then'](respondWithFilteredResult(_0x14230c,_0xc497f8))[_0x5e71('0x47')](handleError(_0x14230c,null));};exports['show']=function(_0x49fe21,_0x243843){var _0x2a6ad0={'raw':!![],'where':{'id':_0x49fe21[_0x5e71('0x48')]['id']}},_0x28bf2e={};_0x28bf2e[_0x5e71('0x35')]=_['keys'](db[_0x5e71('0x42')][_0x5e71('0x2e')]);_0x28bf2e[_0x5e71('0x32')]=_[_0x5e71('0x33')](_0x49fe21[_0x5e71('0x32')]);_0x28bf2e[_0x5e71('0x34')]=_[_0x5e71('0x37')](_0x28bf2e['model'],_0x28bf2e['query']);_0x2a6ad0['attributes']=_[_0x5e71('0x37')](_0x28bf2e['model'],qs['fields'](_0x49fe21[_0x5e71('0x32')][_0x5e71('0x38')]));_0x2a6ad0[_0x5e71('0x36')]=_0x2a6ad0['attributes'][_0x5e71('0x39')]?_0x2a6ad0[_0x5e71('0x36')]:_0x28bf2e[_0x5e71('0x35')];if(_0x49fe21['query'][_0x5e71('0x49')]){_0x2a6ad0[_0x5e71('0x44')]=[{'all':!![]}];}_0x2a6ad0=_[_0x5e71('0x3f')]({},_0x2a6ad0,_0x49fe21[_0x5e71('0x41')]);return db[_0x5e71('0x42')][_0x5e71('0x4a')](_0x2a6ad0)['then'](handleEntityNotFound(_0x243843,null))[_0x5e71('0x23')](respondWithResult(_0x243843,null))['catch'](handleError(_0x243843,null));};exports[_0x5e71('0x4b')]=function(_0x55d768,_0x4d569b){return db[_0x5e71('0x42')]['create'](_0x55d768[_0x5e71('0x4c')],{})[_0x5e71('0x23')](function(_0x214651){var _0x1c04ae=_0x55d768['user'][_0x5e71('0x24')]({'plain':!![]});if(!_0x1c04ae)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x1c04ae[_0x5e71('0x4d')]===_0x5e71('0x4e')){var _0x3de96d=_0x214651[_0x5e71('0x24')]({'plain':!![]});var _0x1491a8=_0x5e71('0x25');return db[_0x5e71('0x4f')][_0x5e71('0x4a')]({'where':{'name':_0x1491a8,'userProfileId':_0x1c04ae[_0x5e71('0x50')]},'raw':!![]})[_0x5e71('0x23')](function(_0x417f91){if(_0x417f91&&_0x417f91[_0x5e71('0x51')]===0x0){return db[_0x5e71('0x26')][_0x5e71('0x4b')]({'name':_0x3de96d[_0x5e71('0x2a')],'resourceId':_0x3de96d['id'],'type':_0x417f91['name'],'sectionId':_0x417f91['id']},{})['then'](function(){return _0x214651;});}else{return _0x214651;}})[_0x5e71('0x47')](function(_0x3d4888){logger[_0x5e71('0x28')](_0x5e71('0x52'),_0x3d4888);throw _0x3d4888;});}return _0x214651;})['then'](respondWithResult(_0x4d569b,0xc9))[_0x5e71('0x47')](handleError(_0x4d569b,null));};exports['update']=function(_0x98a071,_0x19bb0d){if(_0x98a071[_0x5e71('0x4c')]['id']){delete _0x98a071['body']['id'];}return db[_0x5e71('0x42')][_0x5e71('0x4a')]({'where':{'id':_0x98a071[_0x5e71('0x48')]['id']}})['then'](handleEntityNotFound(_0x19bb0d,null))[_0x5e71('0x23')](saveUpdates(_0x98a071['body'],null))['then'](respondWithResult(_0x19bb0d,null))[_0x5e71('0x47')](handleError(_0x19bb0d,null));};exports['destroy']=function(_0x1b468f,_0x13474a){return db['Interval'][_0x5e71('0x4a')]({'where':{'id':_0x1b468f[_0x5e71('0x48')]['id']}})[_0x5e71('0x23')](handleEntityNotFound(_0x13474a,null))['then'](removeEntity(_0x13474a,null))[_0x5e71('0x47')](handleError(_0x13474a,null));};exports[_0x5e71('0x53')]=function(_0x3a920a,_0x36a075,_0x5827b0){if(_0x3a920a['body']['id']){delete _0x3a920a[_0x5e71('0x4c')]['id'];}return db[_0x5e71('0x42')][_0x5e71('0x4a')]({'where':{'id':_0x3a920a[_0x5e71('0x48')]['id']}})['then'](handleEntityNotFound(_0x36a075,null))[_0x5e71('0x23')](function(_0x1118e4){if(_0x1118e4){_0x3a920a[_0x5e71('0x4c')]['IntervalId']=_0x1118e4['id'];return db[_0x5e71('0x42')][_0x5e71('0x4b')](_0x3a920a[_0x5e71('0x4c')]);}})[_0x5e71('0x23')](respondWithResult(_0x36a075,null))[_0x5e71('0x47')](handleError(_0x36a075,null));};exports[_0x5e71('0x54')]=function(_0x31579d,_0x2e96e3,_0x260b9d){var _0x5a9b3c={};var _0x3afbcd={};var _0x55d6d0;var _0x3a3ac0;return db['Interval'][_0x5e71('0x55')]({'where':{'id':_0x31579d[_0x5e71('0x48')]['id']}})['then'](handleEntityNotFound(_0x2e96e3,null))[_0x5e71('0x23')](function(_0x220fba){if(_0x220fba){_0x55d6d0=_0x220fba;_0x3afbcd['model']=_[_0x5e71('0x33')](db[_0x5e71('0x42')][_0x5e71('0x2e')]);_0x3afbcd[_0x5e71('0x32')]=_['keys'](_0x31579d[_0x5e71('0x32')]);_0x3afbcd[_0x5e71('0x34')]=_[_0x5e71('0x37')](_0x3afbcd[_0x5e71('0x35')],_0x3afbcd[_0x5e71('0x32')]);_0x5a9b3c[_0x5e71('0x36')]=_['intersection'](_0x3afbcd[_0x5e71('0x35')],qs['fields'](_0x31579d['query'][_0x5e71('0x38')]));_0x5a9b3c[_0x5e71('0x36')]=_0x5a9b3c[_0x5e71('0x36')][_0x5e71('0x39')]?_0x5a9b3c[_0x5e71('0x36')]:_0x3afbcd[_0x5e71('0x35')];_0x5a9b3c[_0x5e71('0x3b')]=qs[_0x5e71('0x3c')](_0x31579d[_0x5e71('0x32')][_0x5e71('0x3c')]);_0x5a9b3c[_0x5e71('0x3e')]=qs[_0x5e71('0x34')](_[_0x5e71('0x3d')](_0x31579d[_0x5e71('0x32')],_0x3afbcd[_0x5e71('0x34')]));if(_0x31579d['query'][_0x5e71('0x56')]){_0x5a9b3c[_0x5e71('0x3e')]=_['merge'](_0x5a9b3c['where'],{'$or':_[_0x5e71('0x2d')](_0x5a9b3c[_0x5e71('0x36')],function(_0x509bb0){var _0x2dee65={};_0x2dee65[_0x509bb0]={'$like':'%'+_0x31579d[_0x5e71('0x32')][_0x5e71('0x56')]+'%'};return _0x2dee65;})});}_0x5a9b3c=_[_0x5e71('0x3f')]({},_0x5a9b3c,_0x31579d[_0x5e71('0x41')]);return _0x55d6d0[_0x5e71('0x54')](_0x5a9b3c);}})[_0x5e71('0x23')](function(_0x2246dc){if(_0x2246dc){_0x3a3ac0=_0x2246dc[_0x5e71('0x39')];if(!_0x31579d['query'][_0x5e71('0x57')](_0x5e71('0x3a'))){_0x5a9b3c[_0x5e71('0x1f')]=qs[_0x5e71('0x1f')](_0x31579d[_0x5e71('0x32')][_0x5e71('0x1f')]);_0x5a9b3c[_0x5e71('0x1d')]=qs['offset'](_0x31579d[_0x5e71('0x32')][_0x5e71('0x1d')]);}return _0x55d6d0[_0x5e71('0x54')](_0x5a9b3c);}})['then'](function(_0x339332){if(_0x339332){return _0x339332?{'count':_0x3a3ac0,'rows':_0x339332}:null;}})[_0x5e71('0x23')](respondWithResult(_0x2e96e3,null))[_0x5e71('0x47')](handleError(_0x2e96e3,null));};exports[_0x5e71('0x58')]=function(_0x42804c,_0x38db81,_0x4b5f78){return db[_0x5e71('0x42')][_0x5e71('0x55')]({'where':{'id':_0x42804c['params']['id']}})['then'](handleEntityNotFound(_0x38db81,null))[_0x5e71('0x23')](function(_0x36050a){if(_0x36050a){return db[_0x5e71('0x59')][_0x5e71('0x5a')](function(_0x5aa348){return db['Interval']['destroy']({'where':{'IntervalId':_0x42804c['params']['id']},'transaction':_0x5aa348})[_0x5e71('0x23')](function(_0x18d9c2){var _0x10af00=_['map'](_0x42804c[_0x5e71('0x4c')],function(_0x5df60e){delete _0x5df60e['id'];_0x5df60e[_0x5e71('0x5b')]=_0x42804c['params']['id'];return _0x5df60e;});return db['Interval'][_0x5e71('0x5c')](_0x10af00,{'transaction':_0x5aa348});});})[_0x5e71('0x23')](function(){return db['Interval'][_0x5e71('0x45')]({'where':{'IntervalId':_0x42804c['params']['id']}});});}})[_0x5e71('0x23')](respondWithResult(_0x38db81,null))[_0x5e71('0x47')](handleError(_0x38db81,null));}; \ No newline at end of file diff --git a/server/api/interval/interval.model.js b/server/api/interval/interval.model.js index 5be5eb3..970876c 100644 --- a/server/api/interval/interval.model.js +++ b/server/api/interval/interval.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xcd8d=['util','api','moment','request-promise','path','rimraf','../../config/environment','./interval.attributes','../../components/extensions/rewrite','exports','define','Interval','tools_intervals','rewrite'];(function(_0x30d0ab,_0x3da691){var _0xc4f5bc=function(_0x210fd8){while(--_0x210fd8){_0x30d0ab['push'](_0x30d0ab['shift']());}};_0xc4f5bc(++_0x3da691);}(_0xcd8d,0x1c0));var _0xdcd8=function(_0x5c7e53,_0x174ce5){_0x5c7e53=_0x5c7e53-0x0;var _0x1c9af9=_0xcd8d[_0x5c7e53];return _0x1c9af9;};'use strict';var _=require('lodash');var util=require(_0xdcd8('0x0'));var logger=require('../../config/logger')(_0xdcd8('0x1'));var moment=require(_0xdcd8('0x2'));var BPromise=require('bluebird');var rp=require(_0xdcd8('0x3'));var fs=require('fs');var path=require(_0xdcd8('0x4'));var rimraf=require(_0xdcd8('0x5'));var config=require(_0xdcd8('0x6'));var attributes=require(_0xdcd8('0x7'));var extensions=require(_0xdcd8('0x8'));module[_0xdcd8('0x9')]=function(_0x3ff536,_0x39f8d3){return _0x3ff536[_0xdcd8('0xa')](_0xdcd8('0xb'),attributes,{'tableName':_0xdcd8('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x1c7643,_0xc4551a){extensions[_0xdcd8('0xd')](_0x3ff536,_0x1c7643);},'afterBulkCreate':function(_0x2a468d,_0x2d4d1f,_0x383ab5){_0x383ab5();extensions[_0xdcd8('0xd')](_0x3ff536,_0x2a468d[0x0]);},'afterUpdate':function(_0x21dcd0,_0x34aba7){extensions[_0xdcd8('0xd')](_0x3ff536,_0x21dcd0);},'afterDestroy':function(_0x62f5c0,_0x849599){extensions['rewrite'](_0x3ff536,_0x62f5c0);}}});}; \ No newline at end of file +var _0x9f8d=['lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./interval.attributes','../../components/extensions/rewrite','exports','define','Interval','rewrite'];(function(_0x517f75,_0x47fe52){var _0x20694a=function(_0x2f61bd){while(--_0x2f61bd){_0x517f75['push'](_0x517f75['shift']());}};_0x20694a(++_0x47fe52);}(_0x9f8d,0xb0));var _0xd9f8=function(_0x9e7084,_0x1d910c){_0x9e7084=_0x9e7084-0x0;var _0x3b3a77=_0x9f8d[_0x9e7084];return _0x3b3a77;};'use strict';var _=require(_0xd9f8('0x0'));var util=require(_0xd9f8('0x1'));var logger=require(_0xd9f8('0x2'))(_0xd9f8('0x3'));var moment=require(_0xd9f8('0x4'));var BPromise=require(_0xd9f8('0x5'));var rp=require(_0xd9f8('0x6'));var fs=require('fs');var path=require(_0xd9f8('0x7'));var rimraf=require(_0xd9f8('0x8'));var config=require(_0xd9f8('0x9'));var attributes=require(_0xd9f8('0xa'));var extensions=require(_0xd9f8('0xb'));module[_0xd9f8('0xc')]=function(_0x3f6156,_0x18fee4){return _0x3f6156[_0xd9f8('0xd')](_0xd9f8('0xe'),attributes,{'tableName':'tools_intervals','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x327109,_0x5dae2e){extensions[_0xd9f8('0xf')](_0x3f6156,_0x327109);},'afterBulkCreate':function(_0x1c911b,_0x322b9,_0x2c96e5){_0x2c96e5();extensions[_0xd9f8('0xf')](_0x3f6156,_0x1c911b[0x0]);},'afterUpdate':function(_0x5319f5,_0x27588d){extensions['rewrite'](_0x3f6156,_0x5319f5);},'afterDestroy':function(_0x1efd10,_0x3b4c81){extensions['rewrite'](_0x3f6156,_0x1efd10);}}});}; \ No newline at end of file diff --git a/server/api/interval/interval.rpc.js b/server/api/interval/interval.rpc.js index 0b9dd68..07d134f 100644 --- a/server/api/interval/interval.rpc.js +++ b/server/api/interval/interval.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['code','error','message','result','catch','Interval','findAll','options','raw','where','attributes','include','map','model','GetInterval','stringify','ShowInterval','find','then','lodash','util','moment','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','info','Interval,\x20%s,\x20%s','request\x20sent','debug','Interval,\x20%s,\x20%s,\x20%s'];(function(_0xdefbc3,_0x1ea49a){var _0x367798=function(_0x594678){while(--_0x594678){_0xdefbc3['push'](_0xdefbc3['shift']());}};_0x367798(++_0x1ea49a);}(_0xa9e0,0x123));var _0x0a9e=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xa9e0[_0x14add3];return _0x4a174f;};'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);});});}exports['GetInterval']=function(_0x459eb1){var _0x478723=this;return new Promise(function(_0x106033,_0x205fd6){return db[_0x0a9e('0x14')][_0x0a9e('0x15')]({'raw':_0x459eb1[_0x0a9e('0x16')]?_0x459eb1[_0x0a9e('0x16')][_0x0a9e('0x17')]===undefined?!![]:![]:!![],'where':_0x459eb1[_0x0a9e('0x16')]?_0x459eb1[_0x0a9e('0x16')][_0x0a9e('0x18')]||null:null,'attributes':_0x459eb1['options']?_0x459eb1[_0x0a9e('0x16')][_0x0a9e('0x19')]||null:null,'limit':_0x459eb1['options']?_0x459eb1[_0x0a9e('0x16')]['limit']||null:null,'include':_0x459eb1['options']?_0x459eb1[_0x0a9e('0x16')][_0x0a9e('0x1a')]?_[_0x0a9e('0x1b')](_0x459eb1[_0x0a9e('0x16')]['include'],function(_0xfb6e48){return{'model':db[_0xfb6e48[_0x0a9e('0x1c')]],'as':_0xfb6e48['as'],'attributes':_0xfb6e48[_0x0a9e('0x19')],'include':_0xfb6e48[_0x0a9e('0x1a')]?_[_0x0a9e('0x1b')](_0xfb6e48[_0x0a9e('0x1a')],function(_0x16b1ca){return{'model':db[_0x16b1ca['model']],'as':_0x16b1ca['as'],'attributes':_0x16b1ca['attributes'],'include':_0x16b1ca[_0x0a9e('0x1a')]?_[_0x0a9e('0x1b')](_0x16b1ca[_0x0a9e('0x1a')],function(_0x33161b){return{'model':db[_0x33161b['model']],'as':_0x33161b['as'],'attributes':_0x33161b[_0x0a9e('0x19')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x45a1e7){logger['info'](_0x0a9e('0x1d'),_0x459eb1);logger[_0x0a9e('0xd')](_0x0a9e('0x1d'),_0x459eb1,JSON[_0x0a9e('0x1e')](_0x45a1e7));_0x106033(_0x45a1e7);})[_0x0a9e('0x13')](function(_0x1538a4){logger[_0x0a9e('0x10')](_0x0a9e('0x1d'),_0x1538a4['message'],_0x459eb1);_0x205fd6(_0x478723[_0x0a9e('0x10')](0x1f4,_0x1538a4[_0x0a9e('0x11')]));});});};exports[_0x0a9e('0x1f')]=function(_0x2ec755){var _0x5c877d=this;return new Promise(function(_0x15b200,_0x40e7a3){return db[_0x0a9e('0x14')][_0x0a9e('0x20')]({'raw':_0x2ec755[_0x0a9e('0x16')]?_0x2ec755[_0x0a9e('0x16')][_0x0a9e('0x17')]===undefined?!![]:![]:!![],'where':_0x2ec755[_0x0a9e('0x16')]?_0x2ec755[_0x0a9e('0x16')]['where']||null:null,'attributes':_0x2ec755[_0x0a9e('0x16')]?_0x2ec755['options'][_0x0a9e('0x19')]||null:null,'include':_0x2ec755[_0x0a9e('0x16')]?_0x2ec755[_0x0a9e('0x16')][_0x0a9e('0x1a')]?_[_0x0a9e('0x1b')](_0x2ec755['options'][_0x0a9e('0x1a')],function(_0x46f0a5){return{'model':db[_0x46f0a5[_0x0a9e('0x1c')]],'as':_0x46f0a5['as'],'attributes':_0x46f0a5[_0x0a9e('0x19')],'include':_0x46f0a5[_0x0a9e('0x1a')]?_[_0x0a9e('0x1b')](_0x46f0a5[_0x0a9e('0x1a')],function(_0x39e565){return{'model':db[_0x39e565['model']],'as':_0x39e565['as'],'attributes':_0x39e565[_0x0a9e('0x19')],'include':_0x39e565['include']?_[_0x0a9e('0x1b')](_0x39e565[_0x0a9e('0x1a')],function(_0x2b7e7f){return{'model':db[_0x2b7e7f[_0x0a9e('0x1c')]],'as':_0x2b7e7f['as'],'attributes':_0x2b7e7f['attributes']};}):[]};}):[]};}):[]:[]})[_0x0a9e('0x21')](function(_0xd1836d){logger[_0x0a9e('0xa')](_0x0a9e('0x1f'),_0x2ec755);logger['debug']('ShowInterval',_0x2ec755,JSON[_0x0a9e('0x1e')](_0xd1836d));_0x15b200(_0xd1836d);})['catch'](function(_0x24936a){logger[_0x0a9e('0x10')](_0x0a9e('0x1f'),_0x24936a[_0x0a9e('0x11')],_0x2ec755);_0x40e7a3(_0x5c877d['error'](0x1f4,_0x24936a[_0x0a9e('0x11')]));});});}; \ No newline at end of file +var _0xa9e0=['code','error','message','result','catch','Interval','findAll','options','raw','where','attributes','include','map','model','GetInterval','stringify','ShowInterval','find','then','lodash','util','moment','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','info','Interval,\x20%s,\x20%s','request\x20sent','debug','Interval,\x20%s,\x20%s,\x20%s'];(function(_0x4c440b,_0x3ea627){var _0x2d48cf=function(_0x56bac7){while(--_0x56bac7){_0x4c440b['push'](_0x4c440b['shift']());}};_0x2d48cf(++_0x3ea627);}(_0xa9e0,0x123));var _0x0a9e=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xa9e0[_0x14add3];return _0x4a174f;};'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);});});}exports['GetInterval']=function(_0x459eb1){var _0x478723=this;return new Promise(function(_0x106033,_0x205fd6){return db[_0x0a9e('0x14')][_0x0a9e('0x15')]({'raw':_0x459eb1[_0x0a9e('0x16')]?_0x459eb1[_0x0a9e('0x16')][_0x0a9e('0x17')]===undefined?!![]:![]:!![],'where':_0x459eb1[_0x0a9e('0x16')]?_0x459eb1[_0x0a9e('0x16')][_0x0a9e('0x18')]||null:null,'attributes':_0x459eb1['options']?_0x459eb1[_0x0a9e('0x16')][_0x0a9e('0x19')]||null:null,'limit':_0x459eb1['options']?_0x459eb1[_0x0a9e('0x16')]['limit']||null:null,'include':_0x459eb1['options']?_0x459eb1[_0x0a9e('0x16')][_0x0a9e('0x1a')]?_[_0x0a9e('0x1b')](_0x459eb1[_0x0a9e('0x16')]['include'],function(_0xfb6e48){return{'model':db[_0xfb6e48[_0x0a9e('0x1c')]],'as':_0xfb6e48['as'],'attributes':_0xfb6e48[_0x0a9e('0x19')],'include':_0xfb6e48[_0x0a9e('0x1a')]?_[_0x0a9e('0x1b')](_0xfb6e48[_0x0a9e('0x1a')],function(_0x16b1ca){return{'model':db[_0x16b1ca['model']],'as':_0x16b1ca['as'],'attributes':_0x16b1ca['attributes'],'include':_0x16b1ca[_0x0a9e('0x1a')]?_[_0x0a9e('0x1b')](_0x16b1ca[_0x0a9e('0x1a')],function(_0x33161b){return{'model':db[_0x33161b['model']],'as':_0x33161b['as'],'attributes':_0x33161b[_0x0a9e('0x19')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x45a1e7){logger['info'](_0x0a9e('0x1d'),_0x459eb1);logger[_0x0a9e('0xd')](_0x0a9e('0x1d'),_0x459eb1,JSON[_0x0a9e('0x1e')](_0x45a1e7));_0x106033(_0x45a1e7);})[_0x0a9e('0x13')](function(_0x1538a4){logger[_0x0a9e('0x10')](_0x0a9e('0x1d'),_0x1538a4['message'],_0x459eb1);_0x205fd6(_0x478723[_0x0a9e('0x10')](0x1f4,_0x1538a4[_0x0a9e('0x11')]));});});};exports[_0x0a9e('0x1f')]=function(_0x2ec755){var _0x5c877d=this;return new Promise(function(_0x15b200,_0x40e7a3){return db[_0x0a9e('0x14')][_0x0a9e('0x20')]({'raw':_0x2ec755[_0x0a9e('0x16')]?_0x2ec755[_0x0a9e('0x16')][_0x0a9e('0x17')]===undefined?!![]:![]:!![],'where':_0x2ec755[_0x0a9e('0x16')]?_0x2ec755[_0x0a9e('0x16')]['where']||null:null,'attributes':_0x2ec755[_0x0a9e('0x16')]?_0x2ec755['options'][_0x0a9e('0x19')]||null:null,'include':_0x2ec755[_0x0a9e('0x16')]?_0x2ec755[_0x0a9e('0x16')][_0x0a9e('0x1a')]?_[_0x0a9e('0x1b')](_0x2ec755['options'][_0x0a9e('0x1a')],function(_0x46f0a5){return{'model':db[_0x46f0a5[_0x0a9e('0x1c')]],'as':_0x46f0a5['as'],'attributes':_0x46f0a5[_0x0a9e('0x19')],'include':_0x46f0a5[_0x0a9e('0x1a')]?_[_0x0a9e('0x1b')](_0x46f0a5[_0x0a9e('0x1a')],function(_0x39e565){return{'model':db[_0x39e565['model']],'as':_0x39e565['as'],'attributes':_0x39e565[_0x0a9e('0x19')],'include':_0x39e565['include']?_[_0x0a9e('0x1b')](_0x39e565[_0x0a9e('0x1a')],function(_0x2b7e7f){return{'model':db[_0x2b7e7f[_0x0a9e('0x1c')]],'as':_0x2b7e7f['as'],'attributes':_0x2b7e7f['attributes']};}):[]};}):[]};}):[]:[]})[_0x0a9e('0x21')](function(_0xd1836d){logger[_0x0a9e('0xa')](_0x0a9e('0x1f'),_0x2ec755);logger['debug']('ShowInterval',_0x2ec755,JSON[_0x0a9e('0x1e')](_0xd1836d));_0x15b200(_0xd1836d);})['catch'](function(_0x24936a){logger[_0x0a9e('0x10')](_0x0a9e('0x1f'),_0x24936a[_0x0a9e('0x11')],_0x2ec755);_0x40e7a3(_0x5c877d['error'](0x1f4,_0x24936a[_0x0a9e('0x11')]));});});}; \ No newline at end of file diff --git a/server/api/jira/index.js b/server/api/jira/index.js index b2b10f8..9c42b6a 100644 --- a/server/api/jira/index.js +++ b/server/api/jira/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xdb28=['isAuthenticated','send','exports','express','Router','../../components/auth/service','./jira.controller'];(function(_0x563730,_0x61dcec){var _0x4f6151=function(_0x4bd0b7){while(--_0x4bd0b7){_0x563730['push'](_0x563730['shift']());}};_0x4f6151(++_0x61dcec);}(_0xdb28,0x106));var _0x8db2=function(_0x5c9c83,_0x4eb9d2){_0x5c9c83=_0x5c9c83-0x0;var _0x3fe089=_0xdb28[_0x5c9c83];return _0x3fe089;};'use strict';var express=require(_0x8db2('0x0'));var router=express[_0x8db2('0x1')]();var auth=require(_0x8db2('0x2'));var controller=require(_0x8db2('0x3'));router['post']('/',auth[_0x8db2('0x4')](),controller[_0x8db2('0x5')]);module[_0x8db2('0x6')]=router; \ No newline at end of file +var _0x0b0e=['exports','express','../../components/auth/service','post','isAuthenticated','send'];(function(_0x1deb03,_0xd05ad8){var _0x189fe7=function(_0x321225){while(--_0x321225){_0x1deb03['push'](_0x1deb03['shift']());}};_0x189fe7(++_0xd05ad8);}(_0x0b0e,0x187));var _0xe0b0=function(_0x1ca890,_0x21d0d3){_0x1ca890=_0x1ca890-0x0;var _0x3f8e01=_0x0b0e[_0x1ca890];return _0x3f8e01;};'use strict';var express=require(_0xe0b0('0x0'));var router=express['Router']();var auth=require(_0xe0b0('0x1'));var controller=require('./jira.controller');router[_0xe0b0('0x2')]('/',auth[_0xe0b0('0x3')](),controller[_0xe0b0('0x4')]);module[_0xe0b0('0x5')]=router; \ No newline at end of file diff --git a/server/api/jira/jira.controller.js b/server/api/jira/jira.controller.js index 2d01b3b..bbcf8d6 100644 --- a/server/api/jira/jira.controller.js +++ b/server/api/jira/jira.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xeb91=['status','statusCode','json','parse','error','Error\x20during\x20license\x20request.\x20Please\x20contact\x20our\x20license\x20team\x20at\x20license@xcally.com\x20with\x20your\x20request','api.jira','write','openIssue','headers','x-forwarded-for','connection','remoteAddress','socket','body','bluebird','https','../../config/logger','api','support','3eAmWpBVP0','key','summary','Report','\x20from\x20','description','stringify','issuetype','fields','customfield_11500','email','oldToken','customfield_11502','newToken','customfield_11503','name','reason','customfield_10102','/rest/api/2/issue','POST','application/json','toString','base64','request','setEncoding','utf8','data'];(function(_0x2b78f7,_0xd8d7b0){var _0x3b4fd3=function(_0x46f7d5){while(--_0x46f7d5){_0x2b78f7['push'](_0x2b78f7['shift']());}};_0x3b4fd3(++_0xd8d7b0);}(_0xeb91,0x129));var _0x1eb9=function(_0x1c8c28,_0x3ee093){_0x1c8c28=_0x1c8c28-0x0;var _0x1f59b4=_0xeb91[_0x1c8c28];return _0x1f59b4;};'use strict';var BPromise=require(_0x1eb9('0x0'));var https=require(_0x1eb9('0x1'));var logger=require(_0x1eb9('0x2'))(_0x1eb9('0x3'));var USERNAME=_0x1eb9('0x4');var PASSWORD=_0x1eb9('0x5');function openIssue(_0x1a2c93,_0x469e60){var _0xda5756={'fields':{'project':{'key':_0x1a2c93[_0x1eb9('0x6')]||'MOTGUI'},'summary':(_0x1a2c93[_0x1eb9('0x7')]||_0x1eb9('0x8'))+_0x1eb9('0x9')+_0x1a2c93['ip'],'description':_0x1a2c93[_0x1eb9('0xa')]||JSON[_0x1eb9('0xb')](_0x1a2c93),'issuetype':{'name':_0x1a2c93[_0x1eb9('0xc')]||'Bug'}}};_0xda5756[_0x1eb9('0xd')][_0x1eb9('0xe')]=_0x1a2c93[_0x1eb9('0xf')];_0xda5756[_0x1eb9('0xd')]['customfield_11501']=_0x1a2c93[_0x1eb9('0x10')];_0xda5756['fields'][_0x1eb9('0x11')]=_0x1a2c93[_0x1eb9('0x12')];_0xda5756[_0x1eb9('0xd')][_0x1eb9('0x13')]=_0x1a2c93[_0x1eb9('0x14')];_0xda5756[_0x1eb9('0xd')]['customfield_11504']=_0x1a2c93[_0x1eb9('0x15')];_0xda5756['fields'][_0x1eb9('0x16')]=_0x1a2c93['ip'];var _0x343a29={'host':'track.xcallymotion.com','port':0x1bb,'path':_0x1eb9('0x17'),'method':_0x1eb9('0x18'),'timeout':0x4e20,'headers':{'Content-Type':_0x1eb9('0x19'),'Authorization':'Basic\x20'+new Buffer(USERNAME+':'+PASSWORD)[_0x1eb9('0x1a')](_0x1eb9('0x1b'))}};var _0x311ee4=JSON[_0x1eb9('0xb')](_0xda5756);var _0x892353=https[_0x1eb9('0x1c')](_0x343a29,function(_0x55567f){_0x55567f[_0x1eb9('0x1d')](_0x1eb9('0x1e'));var _0x20ee69='';_0x55567f['on'](_0x1eb9('0x1f'),function(_0x522297){_0x20ee69+=_0x522297;});_0x55567f['on']('end',function(){if(_0x469e60){return _0x469e60[_0x1eb9('0x20')](_0x55567f[_0x1eb9('0x21')])[_0x1eb9('0x22')](JSON[_0x1eb9('0x23')](_0x20ee69));}});});_0x892353['on'](_0x1eb9('0x24'),function(_0x401e61){if(_0x469e60){return _0x469e60['status'](0x1f4)['json']({'errors':[{'message':_0x1eb9('0x25'),'type':_0x1eb9('0x26')}]});}});_0x892353[_0x1eb9('0x27')](_0x311ee4);_0x892353['end']();}exports[_0x1eb9('0x28')]=openIssue;exports['send']=function(_0x57a129,_0x4bcf7b){_0x57a129['body']['ip']=_0x57a129[_0x1eb9('0x29')][_0x1eb9('0x2a')]||_0x57a129[_0x1eb9('0x2b')][_0x1eb9('0x2c')]||_0x57a129['socket'][_0x1eb9('0x2c')]||_0x57a129[_0x1eb9('0x2b')][_0x1eb9('0x2d')]['remoteAddress'];return openIssue(_0x57a129[_0x1eb9('0x2e')],_0x4bcf7b);}; \ No newline at end of file +var _0xdc59=['issuetype','Bug','customfield_11500','email','customfield_11501','oldToken','newToken','customfield_11503','name','customfield_11504','reason','customfield_10102','application/json','Basic\x20','toString','base64','stringify','request','setEncoding','data','end','status','json','parse','error','Error\x20during\x20license\x20request.\x20Please\x20contact\x20our\x20license\x20team\x20at\x20license@xcally.com\x20with\x20your\x20request','api.jira','write','openIssue','send','body','headers','connection','remoteAddress','socket','bluebird','api','support','3eAmWpBVP0','key','Report','\x20from\x20','description'];(function(_0x1b7368,_0x3286ed){var _0x25d54c=function(_0x2366da){while(--_0x2366da){_0x1b7368['push'](_0x1b7368['shift']());}};_0x25d54c(++_0x3286ed);}(_0xdc59,0x1d1));var _0x9dc5=function(_0x12ca5f,_0x223d98){_0x12ca5f=_0x12ca5f-0x0;var _0xfc3ae9=_0xdc59[_0x12ca5f];return _0xfc3ae9;};'use strict';var BPromise=require(_0x9dc5('0x0'));var https=require('https');var logger=require('../../config/logger')(_0x9dc5('0x1'));var USERNAME=_0x9dc5('0x2');var PASSWORD=_0x9dc5('0x3');function openIssue(_0x1ffc3f,_0x5a7192){var _0xa16444={'fields':{'project':{'key':_0x1ffc3f[_0x9dc5('0x4')]||'MOTGUI'},'summary':(_0x1ffc3f['summary']||_0x9dc5('0x5'))+_0x9dc5('0x6')+_0x1ffc3f['ip'],'description':_0x1ffc3f[_0x9dc5('0x7')]||JSON['stringify'](_0x1ffc3f),'issuetype':{'name':_0x1ffc3f[_0x9dc5('0x8')]||_0x9dc5('0x9')}}};_0xa16444['fields'][_0x9dc5('0xa')]=_0x1ffc3f[_0x9dc5('0xb')];_0xa16444['fields'][_0x9dc5('0xc')]=_0x1ffc3f[_0x9dc5('0xd')];_0xa16444['fields']['customfield_11502']=_0x1ffc3f[_0x9dc5('0xe')];_0xa16444['fields'][_0x9dc5('0xf')]=_0x1ffc3f[_0x9dc5('0x10')];_0xa16444['fields'][_0x9dc5('0x11')]=_0x1ffc3f[_0x9dc5('0x12')];_0xa16444['fields'][_0x9dc5('0x13')]=_0x1ffc3f['ip'];var _0x5e1b99={'host':'track.xcallymotion.com','port':0x1bb,'path':'/rest/api/2/issue','method':'POST','timeout':0x4e20,'headers':{'Content-Type':_0x9dc5('0x14'),'Authorization':_0x9dc5('0x15')+new Buffer(USERNAME+':'+PASSWORD)[_0x9dc5('0x16')](_0x9dc5('0x17'))}};var _0x4ef668=JSON[_0x9dc5('0x18')](_0xa16444);var _0x5c7d75=https[_0x9dc5('0x19')](_0x5e1b99,function(_0x399abb){_0x399abb[_0x9dc5('0x1a')]('utf8');var _0x83c88d='';_0x399abb['on'](_0x9dc5('0x1b'),function(_0x1a83dd){_0x83c88d+=_0x1a83dd;});_0x399abb['on'](_0x9dc5('0x1c'),function(){if(_0x5a7192){return _0x5a7192[_0x9dc5('0x1d')](_0x399abb['statusCode'])[_0x9dc5('0x1e')](JSON[_0x9dc5('0x1f')](_0x83c88d));}});});_0x5c7d75['on'](_0x9dc5('0x20'),function(_0x37b50c){if(_0x5a7192){return _0x5a7192[_0x9dc5('0x1d')](0x1f4)['json']({'errors':[{'message':_0x9dc5('0x21'),'type':_0x9dc5('0x22')}]});}});_0x5c7d75[_0x9dc5('0x23')](_0x4ef668);_0x5c7d75[_0x9dc5('0x1c')]();}exports[_0x9dc5('0x24')]=openIssue;exports[_0x9dc5('0x25')]=function(_0x411a67,_0x89b2ca){_0x411a67[_0x9dc5('0x26')]['ip']=_0x411a67[_0x9dc5('0x27')]['x-forwarded-for']||_0x411a67[_0x9dc5('0x28')][_0x9dc5('0x29')]||_0x411a67[_0x9dc5('0x2a')]['remoteAddress']||_0x411a67['connection'][_0x9dc5('0x2a')]['remoteAddress'];return openIssue(_0x411a67['body'],_0x89b2ca);}; \ No newline at end of file diff --git a/server/api/jscriptyAnswerReport/index.js b/server/api/jscriptyAnswerReport/index.js index 22af1f3..c76fbae 100644 --- a/server/api/jscriptyAnswerReport/index.js +++ b/server/api/jscriptyAnswerReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xec56=['put','update','delete','destroy','exports','multer','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./jscriptyAnswerReport.controller','get','isAuthenticated','index','/describe','describe','/:id','show','create'];(function(_0x16841e,_0x2d1cd0){var _0x1d1c3f=function(_0x17f1fe){while(--_0x17f1fe){_0x16841e['push'](_0x16841e['shift']());}};_0x1d1c3f(++_0x2d1cd0);}(_0xec56,0x1bd));var _0x6ec5=function(_0xb9463b,_0xe6bca4){_0xb9463b=_0xb9463b-0x0;var _0x31a95e=_0xec56[_0xb9463b];return _0x31a95e;};'use strict';var multer=require(_0x6ec5('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x6ec5('0x1'));var express=require(_0x6ec5('0x2'));var router=express[_0x6ec5('0x3')]();var fs_extra=require(_0x6ec5('0x4'));var auth=require(_0x6ec5('0x5'));var interaction=require(_0x6ec5('0x6'));var config=require(_0x6ec5('0x7'));var controller=require(_0x6ec5('0x8'));router[_0x6ec5('0x9')]('/',auth[_0x6ec5('0xa')](),controller[_0x6ec5('0xb')]);router[_0x6ec5('0x9')](_0x6ec5('0xc'),auth[_0x6ec5('0xa')](),controller[_0x6ec5('0xd')]);router[_0x6ec5('0x9')](_0x6ec5('0xe'),auth[_0x6ec5('0xa')](),controller[_0x6ec5('0xf')]);router['post']('/',auth[_0x6ec5('0xa')](),controller[_0x6ec5('0x10')]);router[_0x6ec5('0x11')](_0x6ec5('0xe'),auth[_0x6ec5('0xa')](),controller[_0x6ec5('0x12')]);router[_0x6ec5('0x13')]('/:id',auth[_0x6ec5('0xa')](),controller[_0x6ec5('0x14')]);module[_0x6ec5('0x15')]=router; \ No newline at end of file +var _0x54ef=['/describe','describe','/:id','isAuthenticated','post','create','put','update','delete','destroy','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./jscriptyAnswerReport.controller','index','get'];(function(_0x15ad68,_0x40fca1){var _0x32823b=function(_0x1bf7f1){while(--_0x1bf7f1){_0x15ad68['push'](_0x15ad68['shift']());}};_0x32823b(++_0x40fca1);}(_0x54ef,0x112));var _0xf54e=function(_0x2c6a57,_0x2162dd){_0x2c6a57=_0x2c6a57-0x0;var _0x13b6cb=_0x54ef[_0x2c6a57];return _0x13b6cb;};'use strict';var multer=require(_0xf54e('0x0'));var util=require(_0xf54e('0x1'));var path=require(_0xf54e('0x2'));var timeout=require('connect-timeout');var express=require(_0xf54e('0x3'));var router=express[_0xf54e('0x4')]();var fs_extra=require(_0xf54e('0x5'));var auth=require(_0xf54e('0x6'));var interaction=require(_0xf54e('0x7'));var config=require(_0xf54e('0x8'));var controller=require(_0xf54e('0x9'));router['get']('/',auth['isAuthenticated'](),controller[_0xf54e('0xa')]);router[_0xf54e('0xb')](_0xf54e('0xc'),auth['isAuthenticated'](),controller[_0xf54e('0xd')]);router['get'](_0xf54e('0xe'),auth[_0xf54e('0xf')](),controller['show']);router[_0xf54e('0x10')]('/',auth[_0xf54e('0xf')](),controller[_0xf54e('0x11')]);router[_0xf54e('0x12')]('/:id',auth[_0xf54e('0xf')](),controller[_0xf54e('0x13')]);router[_0xf54e('0x14')](_0xf54e('0xe'),auth['isAuthenticated'](),controller[_0xf54e('0x15')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/jscriptyAnswerReport/jscriptyAnswerReport.attributes.js b/server/api/jscriptyAnswerReport/jscriptyAnswerReport.attributes.js index 7d1a408..c872862 100644 --- a/server/api/jscriptyAnswerReport/jscriptyAnswerReport.attributes.js +++ b/server/api/jscriptyAnswerReport/jscriptyAnswerReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7a54=['long','STRING','sequelize','exports','TEXT'];(function(_0x346737,_0x3e6081){var _0x1ade2e=function(_0x15e50e){while(--_0x15e50e){_0x346737['push'](_0x346737['shift']());}};_0x1ade2e(++_0x3e6081);}(_0x7a54,0x106));var _0x47a5=function(_0x21a470,_0xe69379){_0x21a470=_0x21a470-0x0;var _0x58445c=_0x7a54[_0x21a470];return _0x58445c;};'use strict';var Sequelize=require(_0x47a5('0x0'));module[_0x47a5('0x1')]={'question':{'type':Sequelize[_0x47a5('0x2')]},'answer':{'type':Sequelize['TEXT'](_0x47a5('0x3'))},'membername':{'type':Sequelize[_0x47a5('0x4')]},'projectname':{'type':Sequelize['STRING']},'queue':{'type':Sequelize[_0x47a5('0x4')]},'uniqueid':{'type':Sequelize[_0x47a5('0x4')]},'calleridname':{'type':Sequelize[_0x47a5('0x4')]},'calleridnum':{'type':Sequelize[_0x47a5('0x4')]},'questionId':{'type':Sequelize[_0x47a5('0x4')]}}; \ No newline at end of file +var _0x7a54=['long','STRING','sequelize','exports','TEXT'];(function(_0x17b6e3,_0x4522ed){var _0x3906f3=function(_0x430f87){while(--_0x430f87){_0x17b6e3['push'](_0x17b6e3['shift']());}};_0x3906f3(++_0x4522ed);}(_0x7a54,0x106));var _0x47a5=function(_0xa0182c,_0x5060d3){_0xa0182c=_0xa0182c-0x0;var _0x427979=_0x7a54[_0xa0182c];return _0x427979;};'use strict';var Sequelize=require(_0x47a5('0x0'));module[_0x47a5('0x1')]={'question':{'type':Sequelize[_0x47a5('0x2')]},'answer':{'type':Sequelize['TEXT'](_0x47a5('0x3'))},'membername':{'type':Sequelize[_0x47a5('0x4')]},'projectname':{'type':Sequelize['STRING']},'queue':{'type':Sequelize[_0x47a5('0x4')]},'uniqueid':{'type':Sequelize[_0x47a5('0x4')]},'calleridname':{'type':Sequelize[_0x47a5('0x4')]},'calleridnum':{'type':Sequelize[_0x47a5('0x4')]},'questionId':{'type':Sequelize[_0x47a5('0x4')]}}; \ No newline at end of file diff --git a/server/api/jscriptyAnswerReport/jscriptyAnswerReport.controller.js b/server/api/jscriptyAnswerReport/jscriptyAnswerReport.controller.js index 640ecb8..bd3da12 100644 --- a/server/api/jscriptyAnswerReport/jscriptyAnswerReport.controller.js +++ b/server/api/jscriptyAnswerReport/jscriptyAnswerReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8ca9=['show','params','rawAttributes','find','create','body','update','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','path','to-csv','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','api','../../config/utils','../../config/environment','../../mysqldb','status','end','json','offset','limit','undefined','count','set','reject','save','then','destroy','sendStatus','stack','index','map','JscriptyAnswerReport','type','key','name','keys','filters','model','query','intersection','fields','attributes','length','nolimit','order','sort','where','merge','VIRTUAL','options','includeAll','include','findAll','catch'];(function(_0x173113,_0x316a7c){var _0x3bea89=function(_0xd33ac1){while(--_0xd33ac1){_0x173113['push'](_0x173113['shift']());}};_0x3bea89(++_0x316a7c);}(_0x8ca9,0x9c));var _0x98ca=function(_0x443761,_0x27fb3f){_0x443761=_0x443761-0x0;var _0x37ebd8=_0x8ca9[_0x443761];return _0x37ebd8;};'use strict';var emlformat=require(_0x98ca('0x0'));var rimraf=require(_0x98ca('0x1'));var zipdir=require(_0x98ca('0x2'));var jsonpatch=require(_0x98ca('0x3'));var rp=require(_0x98ca('0x4'));var moment=require(_0x98ca('0x5'));var BPromise=require(_0x98ca('0x6'));var Mustache=require('mustache');var util=require('util');var path=require(_0x98ca('0x7'));var sox=require('sox');var csv=require(_0x98ca('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x98ca('0x9'));var _=require(_0x98ca('0xa'));var squel=require(_0x98ca('0xb'));var crypto=require(_0x98ca('0xc'));var jsforce=require(_0x98ca('0xd'));var deskjs=require(_0x98ca('0xe'));var toCsv=require(_0x98ca('0x8'));var querystring=require(_0x98ca('0xf'));var Papa=require(_0x98ca('0x10'));var Redis=require(_0x98ca('0x11'));var authService=require(_0x98ca('0x12'));var qs=require(_0x98ca('0x13'));var as=require(_0x98ca('0x14'));var hardwareService=require(_0x98ca('0x15'));var logger=require(_0x98ca('0x16'))(_0x98ca('0x17'));var utils=require(_0x98ca('0x18'));var config=require(_0x98ca('0x19'));var licenseUtil=require('../../config/license/util');var db=require(_0x98ca('0x1a'))['db'];function respondWithStatusCode(_0x44b65b,_0xba3887){_0xba3887=_0xba3887||0xcc;return function(_0x472e13){if(_0x472e13){return _0x44b65b['sendStatus'](_0xba3887);}return _0x44b65b[_0x98ca('0x1b')](_0xba3887)[_0x98ca('0x1c')]();};}function respondWithResult(_0x9a230e,_0xa2bab4){_0xa2bab4=_0xa2bab4||0xc8;return function(_0x3df0ef){if(_0x3df0ef){return _0x9a230e[_0x98ca('0x1b')](_0xa2bab4)[_0x98ca('0x1d')](_0x3df0ef);}};}function respondWithFilteredResult(_0x4940ca,_0x330713){return function(_0x29df1b){if(_0x29df1b){var _0x29f46b=typeof _0x330713[_0x98ca('0x1e')]==='undefined'&&typeof _0x330713[_0x98ca('0x1f')]===_0x98ca('0x20');var _0xe9f8ad=_0x29df1b[_0x98ca('0x21')];var _0x4523bb=_0x29f46b?0x0:_0x330713[_0x98ca('0x1e')];var _0x28c8a6=_0x29f46b?_0x29df1b[_0x98ca('0x21')]:_0x330713[_0x98ca('0x1e')]+_0x330713[_0x98ca('0x1f')];var _0x1b2c69;if(_0x28c8a6>=_0xe9f8ad){_0x28c8a6=_0xe9f8ad;_0x1b2c69=0xc8;}else{_0x1b2c69=0xce;}_0x4940ca['status'](_0x1b2c69);return _0x4940ca[_0x98ca('0x22')]('Content-Range',_0x4523bb+'-'+_0x28c8a6+'/'+_0xe9f8ad)[_0x98ca('0x1d')](_0x29df1b);}return null;};}function patchUpdates(_0x2fe568){return function(_0x50f8b4){try{jsonpatch['apply'](_0x50f8b4,_0x2fe568,!![]);}catch(_0x4620e3){return BPromise[_0x98ca('0x23')](_0x4620e3);}return _0x50f8b4[_0x98ca('0x24')]();};}function saveUpdates(_0x519927,_0x2f7742){return function(_0xc23332){if(_0xc23332){return _0xc23332['update'](_0x519927)[_0x98ca('0x25')](function(_0x5dc400){return _0x5dc400;});}return null;};}function removeEntity(_0x3fd0bd,_0x323cdb){return function(_0x430d16){if(_0x430d16){return _0x430d16[_0x98ca('0x26')]()[_0x98ca('0x25')](function(){_0x3fd0bd[_0x98ca('0x1b')](0xcc)[_0x98ca('0x1c')]();});}};}function handleEntityNotFound(_0x50b1a2,_0x2029cb){return function(_0x4fc3c9){if(!_0x4fc3c9){_0x50b1a2[_0x98ca('0x27')](0x194);}return _0x4fc3c9;};}function handleError(_0x1bdb75,_0x5eb829){_0x5eb829=_0x5eb829||0x1f4;return function(_0x1f569b){logger['error'](_0x1f569b[_0x98ca('0x28')]);if(_0x1f569b['name']){delete _0x1f569b['name'];}_0x1bdb75[_0x98ca('0x1b')](_0x5eb829)['send'](_0x1f569b);};}exports[_0x98ca('0x29')]=function(_0x35b920,_0x13f766){var _0x21a12a={},_0x3b3e60={},_0x1e7fcf={'count':0x0,'rows':[]};var _0x11389a=_[_0x98ca('0x2a')](db[_0x98ca('0x2b')]['rawAttributes'],function(_0x2ebf28){return{'name':_0x2ebf28['fieldName'],'type':_0x2ebf28[_0x98ca('0x2c')][_0x98ca('0x2d')]};});_0x3b3e60['model']=_['map'](_0x11389a,_0x98ca('0x2e'));_0x3b3e60['query']=_[_0x98ca('0x2f')](_0x35b920['query']);_0x3b3e60[_0x98ca('0x30')]=_['intersection'](_0x3b3e60[_0x98ca('0x31')],_0x3b3e60[_0x98ca('0x32')]);_0x21a12a['attributes']=_[_0x98ca('0x33')](_0x3b3e60[_0x98ca('0x31')],qs['fields'](_0x35b920[_0x98ca('0x32')][_0x98ca('0x34')]));_0x21a12a['attributes']=_0x21a12a[_0x98ca('0x35')][_0x98ca('0x36')]?_0x21a12a[_0x98ca('0x35')]:_0x3b3e60[_0x98ca('0x31')];if(!_0x35b920[_0x98ca('0x32')]['hasOwnProperty'](_0x98ca('0x37'))){_0x21a12a[_0x98ca('0x1f')]=qs['limit'](_0x35b920[_0x98ca('0x32')][_0x98ca('0x1f')]);_0x21a12a[_0x98ca('0x1e')]=qs['offset'](_0x35b920[_0x98ca('0x32')][_0x98ca('0x1e')]);}_0x21a12a[_0x98ca('0x38')]=qs['sort'](_0x35b920[_0x98ca('0x32')][_0x98ca('0x39')]);_0x21a12a[_0x98ca('0x3a')]=qs['filters'](_['pick'](_0x35b920[_0x98ca('0x32')],_0x3b3e60[_0x98ca('0x30')]),_0x11389a);if(_0x35b920[_0x98ca('0x32')]['filter']){_0x21a12a[_0x98ca('0x3a')]=_[_0x98ca('0x3b')](_0x21a12a[_0x98ca('0x3a')],{'$or':_['map'](_0x11389a,function(_0x1f513b){if(_0x1f513b[_0x98ca('0x2c')]!==_0x98ca('0x3c')){var _0x450745={};_0x450745[_0x1f513b[_0x98ca('0x2e')]]={'$like':'%'+_0x35b920['query']['filter']+'%'};return _0x450745;}})});}_0x21a12a=_['merge']({},_0x21a12a,_0x35b920[_0x98ca('0x3d')]);var _0x2ef2f4={'where':_0x21a12a[_0x98ca('0x3a')]};return db[_0x98ca('0x2b')][_0x98ca('0x21')](_0x2ef2f4)[_0x98ca('0x25')](function(_0x29801f){_0x1e7fcf['count']=_0x29801f;if(_0x35b920['query'][_0x98ca('0x3e')]){_0x21a12a[_0x98ca('0x3f')]=[{'all':!![]}];}return db[_0x98ca('0x2b')][_0x98ca('0x40')](_0x21a12a);})[_0x98ca('0x25')](function(_0x535fdc){_0x1e7fcf['rows']=_0x535fdc;return _0x1e7fcf;})['then'](respondWithFilteredResult(_0x13f766,_0x21a12a))[_0x98ca('0x41')](handleError(_0x13f766,null));};exports[_0x98ca('0x42')]=function(_0x914606,_0x3f260b){var _0x4ede34={'raw':!![],'where':{'id':_0x914606[_0x98ca('0x43')]['id']}},_0x4c2515={};_0x4c2515[_0x98ca('0x31')]=_[_0x98ca('0x2f')](db[_0x98ca('0x2b')][_0x98ca('0x44')]);_0x4c2515[_0x98ca('0x32')]=_[_0x98ca('0x2f')](_0x914606[_0x98ca('0x32')]);_0x4c2515[_0x98ca('0x30')]=_[_0x98ca('0x33')](_0x4c2515[_0x98ca('0x31')],_0x4c2515['query']);_0x4ede34[_0x98ca('0x35')]=_[_0x98ca('0x33')](_0x4c2515[_0x98ca('0x31')],qs[_0x98ca('0x34')](_0x914606[_0x98ca('0x32')][_0x98ca('0x34')]));_0x4ede34[_0x98ca('0x35')]=_0x4ede34[_0x98ca('0x35')][_0x98ca('0x36')]?_0x4ede34['attributes']:_0x4c2515[_0x98ca('0x31')];if(_0x914606[_0x98ca('0x32')]['includeAll']){_0x4ede34[_0x98ca('0x3f')]=[{'all':!![]}];}_0x4ede34=_['merge']({},_0x4ede34,_0x914606[_0x98ca('0x3d')]);return db[_0x98ca('0x2b')][_0x98ca('0x45')](_0x4ede34)[_0x98ca('0x25')](handleEntityNotFound(_0x3f260b,null))[_0x98ca('0x25')](respondWithResult(_0x3f260b,null))[_0x98ca('0x41')](handleError(_0x3f260b,null));};exports[_0x98ca('0x46')]=function(_0x15ed74,_0x2c7d53){return db[_0x98ca('0x2b')][_0x98ca('0x46')](_0x15ed74[_0x98ca('0x47')],{})['then'](respondWithResult(_0x2c7d53,0xc9))[_0x98ca('0x41')](handleError(_0x2c7d53,null));};exports[_0x98ca('0x48')]=function(_0x40498f,_0x19dc39){if(_0x40498f['body']['id']){delete _0x40498f[_0x98ca('0x47')]['id'];}return db[_0x98ca('0x2b')][_0x98ca('0x45')]({'where':{'id':_0x40498f[_0x98ca('0x43')]['id']}})[_0x98ca('0x25')](handleEntityNotFound(_0x19dc39,null))[_0x98ca('0x25')](saveUpdates(_0x40498f[_0x98ca('0x47')],null))['then'](respondWithResult(_0x19dc39,null))['catch'](handleError(_0x19dc39,null));};exports['destroy']=function(_0x3247af,_0x3715cb){return db[_0x98ca('0x2b')][_0x98ca('0x45')]({'where':{'id':_0x3247af['params']['id']}})['then'](handleEntityNotFound(_0x3715cb,null))[_0x98ca('0x25')](removeEntity(_0x3715cb,null))[_0x98ca('0x41')](handleError(_0x3715cb,null));};exports[_0x98ca('0x49')]=function(_0x408266,_0x46bb13){return db[_0x98ca('0x2b')][_0x98ca('0x49')]()[_0x98ca('0x25')](respondWithResult(_0x46bb13,null))[_0x98ca('0x41')](handleError(_0x46bb13,null));}; \ No newline at end of file +var _0xd13e=['limit','count','Content-Range','reject','save','update','destroy','then','end','sendStatus','error','name','index','map','JscriptyAnswerReport','fieldName','key','model','query','keys','intersection','attributes','fields','length','nolimit','order','sort','filters','where','merge','includeAll','include','findAll','rows','catch','show','params','rawAttributes','options','find','create','body','describe','eml-format','rimraf','zip-dir','fast-json-patch','moment','mustache','path','sox','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','status','json','offset','undefined'];(function(_0x46e363,_0x45d7e2){var _0x3fb059=function(_0x5e6274){while(--_0x5e6274){_0x46e363['push'](_0x46e363['shift']());}};_0x3fb059(++_0x45d7e2);}(_0xd13e,0x193));var _0xed13=function(_0x1b0ba4,_0x5cd601){_0x1b0ba4=_0x1b0ba4-0x0;var _0x4184b5=_0xd13e[_0x1b0ba4];return _0x4184b5;};'use strict';var emlformat=require(_0xed13('0x0'));var rimraf=require(_0xed13('0x1'));var zipdir=require(_0xed13('0x2'));var jsonpatch=require(_0xed13('0x3'));var rp=require('request-promise');var moment=require(_0xed13('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xed13('0x5'));var util=require('util');var path=require(_0xed13('0x6'));var sox=require(_0xed13('0x7'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xed13('0x8'));var squel=require(_0xed13('0x9'));var crypto=require(_0xed13('0xa'));var jsforce=require(_0xed13('0xb'));var deskjs=require(_0xed13('0xc'));var toCsv=require(_0xed13('0xd'));var querystring=require(_0xed13('0xe'));var Papa=require(_0xed13('0xf'));var Redis=require(_0xed13('0x10'));var authService=require('../../components/auth/service');var qs=require(_0xed13('0x11'));var as=require(_0xed13('0x12'));var hardwareService=require(_0xed13('0x13'));var logger=require(_0xed13('0x14'))(_0xed13('0x15'));var utils=require('../../config/utils');var config=require(_0xed13('0x16'));var licenseUtil=require(_0xed13('0x17'));var db=require(_0xed13('0x18'))['db'];function respondWithStatusCode(_0x3c0b22,_0x936103){_0x936103=_0x936103||0xcc;return function(_0x3295ba){if(_0x3295ba){return _0x3c0b22['sendStatus'](_0x936103);}return _0x3c0b22[_0xed13('0x19')](_0x936103)['end']();};}function respondWithResult(_0x257074,_0x56fdc6){_0x56fdc6=_0x56fdc6||0xc8;return function(_0x6e2978){if(_0x6e2978){return _0x257074['status'](_0x56fdc6)[_0xed13('0x1a')](_0x6e2978);}};}function respondWithFilteredResult(_0x4d5435,_0x38901a){return function(_0xf900d2){if(_0xf900d2){var _0x1d3d67=typeof _0x38901a[_0xed13('0x1b')]===_0xed13('0x1c')&&typeof _0x38901a[_0xed13('0x1d')]===_0xed13('0x1c');var _0x1148a3=_0xf900d2[_0xed13('0x1e')];var _0x1e161f=_0x1d3d67?0x0:_0x38901a[_0xed13('0x1b')];var _0x31de07=_0x1d3d67?_0xf900d2[_0xed13('0x1e')]:_0x38901a[_0xed13('0x1b')]+_0x38901a[_0xed13('0x1d')];var _0x2f38c9;if(_0x31de07>=_0x1148a3){_0x31de07=_0x1148a3;_0x2f38c9=0xc8;}else{_0x2f38c9=0xce;}_0x4d5435['status'](_0x2f38c9);return _0x4d5435['set'](_0xed13('0x1f'),_0x1e161f+'-'+_0x31de07+'/'+_0x1148a3)[_0xed13('0x1a')](_0xf900d2);}return null;};}function patchUpdates(_0x4f455b){return function(_0x40dd86){try{jsonpatch['apply'](_0x40dd86,_0x4f455b,!![]);}catch(_0x4e9e3b){return BPromise[_0xed13('0x20')](_0x4e9e3b);}return _0x40dd86[_0xed13('0x21')]();};}function saveUpdates(_0x2d62cd,_0x192d12){return function(_0x1d7621){if(_0x1d7621){return _0x1d7621[_0xed13('0x22')](_0x2d62cd)['then'](function(_0x5c0daf){return _0x5c0daf;});}return null;};}function removeEntity(_0x5d7ae1,_0x19d51b){return function(_0x3b1f23){if(_0x3b1f23){return _0x3b1f23[_0xed13('0x23')]()[_0xed13('0x24')](function(){_0x5d7ae1[_0xed13('0x19')](0xcc)[_0xed13('0x25')]();});}};}function handleEntityNotFound(_0x1f0405,_0x276c57){return function(_0x2410e2){if(!_0x2410e2){_0x1f0405[_0xed13('0x26')](0x194);}return _0x2410e2;};}function handleError(_0x1f064c,_0x3bc666){_0x3bc666=_0x3bc666||0x1f4;return function(_0x2c6c33){logger[_0xed13('0x27')](_0x2c6c33['stack']);if(_0x2c6c33['name']){delete _0x2c6c33[_0xed13('0x28')];}_0x1f064c[_0xed13('0x19')](_0x3bc666)['send'](_0x2c6c33);};}exports[_0xed13('0x29')]=function(_0x40444a,_0x4ed119){var _0x7ce996={},_0x2066ca={},_0x323156={'count':0x0,'rows':[]};var _0x570929=_[_0xed13('0x2a')](db[_0xed13('0x2b')]['rawAttributes'],function(_0x433665){return{'name':_0x433665[_0xed13('0x2c')],'type':_0x433665['type'][_0xed13('0x2d')]};});_0x2066ca[_0xed13('0x2e')]=_[_0xed13('0x2a')](_0x570929,_0xed13('0x28'));_0x2066ca[_0xed13('0x2f')]=_[_0xed13('0x30')](_0x40444a[_0xed13('0x2f')]);_0x2066ca['filters']=_[_0xed13('0x31')](_0x2066ca['model'],_0x2066ca['query']);_0x7ce996[_0xed13('0x32')]=_[_0xed13('0x31')](_0x2066ca[_0xed13('0x2e')],qs['fields'](_0x40444a[_0xed13('0x2f')][_0xed13('0x33')]));_0x7ce996[_0xed13('0x32')]=_0x7ce996['attributes'][_0xed13('0x34')]?_0x7ce996[_0xed13('0x32')]:_0x2066ca[_0xed13('0x2e')];if(!_0x40444a[_0xed13('0x2f')]['hasOwnProperty'](_0xed13('0x35'))){_0x7ce996[_0xed13('0x1d')]=qs[_0xed13('0x1d')](_0x40444a[_0xed13('0x2f')][_0xed13('0x1d')]);_0x7ce996[_0xed13('0x1b')]=qs[_0xed13('0x1b')](_0x40444a[_0xed13('0x2f')][_0xed13('0x1b')]);}_0x7ce996[_0xed13('0x36')]=qs['sort'](_0x40444a[_0xed13('0x2f')][_0xed13('0x37')]);_0x7ce996['where']=qs['filters'](_['pick'](_0x40444a[_0xed13('0x2f')],_0x2066ca[_0xed13('0x38')]),_0x570929);if(_0x40444a['query']['filter']){_0x7ce996[_0xed13('0x39')]=_[_0xed13('0x3a')](_0x7ce996[_0xed13('0x39')],{'$or':_[_0xed13('0x2a')](_0x570929,function(_0x358098){if(_0x358098['type']!=='VIRTUAL'){var _0x1e943a={};_0x1e943a[_0x358098['name']]={'$like':'%'+_0x40444a[_0xed13('0x2f')]['filter']+'%'};return _0x1e943a;}})});}_0x7ce996=_[_0xed13('0x3a')]({},_0x7ce996,_0x40444a['options']);var _0x4d6429={'where':_0x7ce996['where']};return db[_0xed13('0x2b')][_0xed13('0x1e')](_0x4d6429)[_0xed13('0x24')](function(_0x42d5f7){_0x323156[_0xed13('0x1e')]=_0x42d5f7;if(_0x40444a['query'][_0xed13('0x3b')]){_0x7ce996[_0xed13('0x3c')]=[{'all':!![]}];}return db[_0xed13('0x2b')][_0xed13('0x3d')](_0x7ce996);})[_0xed13('0x24')](function(_0x5a8cfb){_0x323156[_0xed13('0x3e')]=_0x5a8cfb;return _0x323156;})[_0xed13('0x24')](respondWithFilteredResult(_0x4ed119,_0x7ce996))[_0xed13('0x3f')](handleError(_0x4ed119,null));};exports[_0xed13('0x40')]=function(_0x187e28,_0x2e43b5){var _0x535de7={'raw':!![],'where':{'id':_0x187e28[_0xed13('0x41')]['id']}},_0x2f04ef={};_0x2f04ef[_0xed13('0x2e')]=_[_0xed13('0x30')](db[_0xed13('0x2b')][_0xed13('0x42')]);_0x2f04ef[_0xed13('0x2f')]=_[_0xed13('0x30')](_0x187e28[_0xed13('0x2f')]);_0x2f04ef[_0xed13('0x38')]=_[_0xed13('0x31')](_0x2f04ef[_0xed13('0x2e')],_0x2f04ef[_0xed13('0x2f')]);_0x535de7[_0xed13('0x32')]=_['intersection'](_0x2f04ef[_0xed13('0x2e')],qs[_0xed13('0x33')](_0x187e28['query'][_0xed13('0x33')]));_0x535de7[_0xed13('0x32')]=_0x535de7[_0xed13('0x32')]['length']?_0x535de7[_0xed13('0x32')]:_0x2f04ef[_0xed13('0x2e')];if(_0x187e28[_0xed13('0x2f')]['includeAll']){_0x535de7['include']=[{'all':!![]}];}_0x535de7=_[_0xed13('0x3a')]({},_0x535de7,_0x187e28[_0xed13('0x43')]);return db['JscriptyAnswerReport'][_0xed13('0x44')](_0x535de7)[_0xed13('0x24')](handleEntityNotFound(_0x2e43b5,null))[_0xed13('0x24')](respondWithResult(_0x2e43b5,null))[_0xed13('0x3f')](handleError(_0x2e43b5,null));};exports['create']=function(_0x1df911,_0xf4ea89){return db[_0xed13('0x2b')][_0xed13('0x45')](_0x1df911['body'],{})[_0xed13('0x24')](respondWithResult(_0xf4ea89,0xc9))['catch'](handleError(_0xf4ea89,null));};exports[_0xed13('0x22')]=function(_0x50d12f,_0x5a0828){if(_0x50d12f[_0xed13('0x46')]['id']){delete _0x50d12f[_0xed13('0x46')]['id'];}return db['JscriptyAnswerReport'][_0xed13('0x44')]({'where':{'id':_0x50d12f[_0xed13('0x41')]['id']}})[_0xed13('0x24')](handleEntityNotFound(_0x5a0828,null))[_0xed13('0x24')](saveUpdates(_0x50d12f['body'],null))[_0xed13('0x24')](respondWithResult(_0x5a0828,null))['catch'](handleError(_0x5a0828,null));};exports[_0xed13('0x23')]=function(_0x365e50,_0x19762a){return db[_0xed13('0x2b')][_0xed13('0x44')]({'where':{'id':_0x365e50[_0xed13('0x41')]['id']}})[_0xed13('0x24')](handleEntityNotFound(_0x19762a,null))[_0xed13('0x24')](removeEntity(_0x19762a,null))['catch'](handleError(_0x19762a,null));};exports[_0xed13('0x47')]=function(_0x38f66d,_0x372deb){return db[_0xed13('0x2b')]['describe']()[_0xed13('0x24')](respondWithResult(_0x372deb,null))['catch'](handleError(_0x372deb,null));}; \ No newline at end of file diff --git a/server/api/jscriptyAnswerReport/jscriptyAnswerReport.model.js b/server/api/jscriptyAnswerReport/jscriptyAnswerReport.model.js index bf15ad8..4cbaa45 100644 --- a/server/api/jscriptyAnswerReport/jscriptyAnswerReport.model.js +++ b/server/api/jscriptyAnswerReport/jscriptyAnswerReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc5dc=['api','moment','bluebird','path','rimraf','./jscriptyAnswerReport.attributes','exports','define','JscriptyAnswerReport','util','../../config/logger'];(function(_0x264291,_0x58eb1f){var _0x445dff=function(_0x28d337){while(--_0x28d337){_0x264291['push'](_0x264291['shift']());}};_0x445dff(++_0x58eb1f);}(_0xc5dc,0xc4));var _0xcc5d=function(_0x3a696a,_0x1470ca){_0x3a696a=_0x3a696a-0x0;var _0x1c0d18=_0xc5dc[_0x3a696a];return _0x1c0d18;};'use strict';var _=require('lodash');var util=require(_0xcc5d('0x0'));var logger=require(_0xcc5d('0x1'))(_0xcc5d('0x2'));var moment=require(_0xcc5d('0x3'));var BPromise=require(_0xcc5d('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xcc5d('0x5'));var rimraf=require(_0xcc5d('0x6'));var config=require('../../config/environment');var attributes=require(_0xcc5d('0x7'));module[_0xcc5d('0x8')]=function(_0x5a7d7b,_0x1b2c86){return _0x5a7d7b[_0xcc5d('0x9')](_0xcc5d('0xa'),attributes,{'tableName':'report_jscripty_answers','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xf23c=['exports','report_jscripty_answers','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./jscriptyAnswerReport.attributes'];(function(_0x490ecb,_0x4f1683){var _0x3835ba=function(_0x592903){while(--_0x592903){_0x490ecb['push'](_0x490ecb['shift']());}};_0x3835ba(++_0x4f1683);}(_0xf23c,0x77));var _0xcf23=function(_0x4c2623,_0x4838bb){_0x4c2623=_0x4c2623-0x0;var _0x2be431=_0xf23c[_0x4c2623];return _0x2be431;};'use strict';var _=require(_0xcf23('0x0'));var util=require(_0xcf23('0x1'));var logger=require(_0xcf23('0x2'))(_0xcf23('0x3'));var moment=require(_0xcf23('0x4'));var BPromise=require(_0xcf23('0x5'));var rp=require(_0xcf23('0x6'));var fs=require('fs');var path=require(_0xcf23('0x7'));var rimraf=require(_0xcf23('0x8'));var config=require(_0xcf23('0x9'));var attributes=require(_0xcf23('0xa'));module[_0xcf23('0xb')]=function(_0x29d89c,_0x208604){return _0x29d89c['define']('JscriptyAnswerReport',attributes,{'tableName':_0xcf23('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/jscriptyAnswerReport/jscriptyAnswerReport.rpc.js b/server/api/jscriptyAnswerReport/jscriptyAnswerReport.rpc.js index d39056e..fcc026d 100644 --- a/server/api/jscriptyAnswerReport/jscriptyAnswerReport.rpc.js +++ b/server/api/jscriptyAnswerReport/jscriptyAnswerReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x82ab=['request','then','info','JscriptyAnswerReport,\x20%s,\x20%s','request\x20sent','JscriptyAnswerReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','util','moment','ioredis','../../mysqldb','../../config/logger','../../config/environment','client','http'];(function(_0x4d5152,_0x5de872){var _0x49f896=function(_0x55d68c){while(--_0x55d68c){_0x4d5152['push'](_0x4d5152['shift']());}};_0x49f896(++_0x5de872);}(_0x82ab,0x124));var _0xb82a=function(_0x39ce5a,_0x260622){_0x39ce5a=_0x39ce5a-0x0;var _0x46cd9a=_0x82ab[_0x39ce5a];return _0x46cd9a;};'use strict';var _=require('lodash');var util=require(_0xb82a('0x0'));var moment=require(_0xb82a('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xb82a('0x2'));var db=require(_0xb82a('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0xb82a('0x4'))('rpc');var config=require(_0xb82a('0x5'));var jayson=require('jayson/promise');var client=jayson[_0xb82a('0x6')][_0xb82a('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x4b2c53,_0x34e26d,_0x14f395){return new BPromise(function(_0x463f04,_0x283bcc){return client[_0xb82a('0x8')](_0x4b2c53,_0x14f395)[_0xb82a('0x9')](function(_0x30e389){logger[_0xb82a('0xa')](_0xb82a('0xb'),_0x34e26d,_0xb82a('0xc'));logger['debug'](_0xb82a('0xd'),_0x34e26d,_0xb82a('0xc'),JSON[_0xb82a('0xe')](_0x30e389));if(_0x30e389[_0xb82a('0xf')]){if(_0x30e389['error'][_0xb82a('0x10')]===0x1f4){logger[_0xb82a('0xf')](_0xb82a('0xb'),_0x34e26d,_0x30e389[_0xb82a('0xf')][_0xb82a('0x11')]);return _0x283bcc(_0x30e389['error'][_0xb82a('0x11')]);}logger[_0xb82a('0xf')]('JscriptyAnswerReport,\x20%s,\x20%s',_0x34e26d,_0x30e389[_0xb82a('0xf')][_0xb82a('0x11')]);return _0x463f04(_0x30e389[_0xb82a('0xf')][_0xb82a('0x11')]);}else{logger[_0xb82a('0xa')](_0xb82a('0xb'),_0x34e26d,_0xb82a('0xc'));_0x463f04(_0x30e389[_0xb82a('0x12')][_0xb82a('0x11')]);}})[_0xb82a('0x13')](function(_0x9ede0d){logger[_0xb82a('0xf')](_0xb82a('0xb'),_0x34e26d,_0x9ede0d);_0x283bcc(_0x9ede0d);});});} \ No newline at end of file +var _0x2587=['randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','request','then','info','JscriptyAnswerReport,\x20%s,\x20%s','request\x20sent','JscriptyAnswerReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','bluebird'];(function(_0x530efe,_0x471ba7){var _0x171188=function(_0x1a7419){while(--_0x1a7419){_0x530efe['push'](_0x530efe['shift']());}};_0x171188(++_0x471ba7);}(_0x2587,0x1e1));var _0x7258=function(_0x587439,_0x153c32){_0x587439=_0x587439-0x0;var _0x138c81=_0x2587[_0x587439];return _0x138c81;};'use strict';var _=require(_0x7258('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x7258('0x1'));var rs=require(_0x7258('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x7258('0x3'))['db'];var utils=require(_0x7258('0x4'));var logger=require(_0x7258('0x5'))('rpc');var config=require(_0x7258('0x6'));var jayson=require(_0x7258('0x7'));var client=jayson[_0x7258('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x5aa4ea,_0x3b1a3a,_0x266622){return new BPromise(function(_0x564fa2,_0x26dc51){return client[_0x7258('0x9')](_0x5aa4ea,_0x266622)[_0x7258('0xa')](function(_0x7e881f){logger[_0x7258('0xb')](_0x7258('0xc'),_0x3b1a3a,_0x7258('0xd'));logger['debug'](_0x7258('0xe'),_0x3b1a3a,'request\x20sent',JSON[_0x7258('0xf')](_0x7e881f));if(_0x7e881f[_0x7258('0x10')]){if(_0x7e881f[_0x7258('0x10')][_0x7258('0x11')]===0x1f4){logger['error']('JscriptyAnswerReport,\x20%s,\x20%s',_0x3b1a3a,_0x7e881f['error']['message']);return _0x26dc51(_0x7e881f[_0x7258('0x10')]['message']);}logger[_0x7258('0x10')]('JscriptyAnswerReport,\x20%s,\x20%s',_0x3b1a3a,_0x7e881f[_0x7258('0x10')]['message']);return _0x564fa2(_0x7e881f[_0x7258('0x10')][_0x7258('0x12')]);}else{logger[_0x7258('0xb')]('JscriptyAnswerReport,\x20%s,\x20%s',_0x3b1a3a,_0x7258('0xd'));_0x564fa2(_0x7e881f[_0x7258('0x13')][_0x7258('0x12')]);}})[_0x7258('0x14')](function(_0x52beea){logger[_0x7258('0x10')](_0x7258('0xc'),_0x3b1a3a,_0x52beea);_0x26dc51(_0x52beea);});});} \ No newline at end of file diff --git a/server/api/jscriptyProject/index.js b/server/api/jscriptyProject/index.js index 404a8f9..1653d17 100644 --- a/server/api/jscriptyProject/index.js +++ b/server/api/jscriptyProject/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xff7c=['connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./jscriptyProject.controller','get','index','/:id','/:id/sessions','isAuthenticated','getSessions','/:id/answers','getAnswers','/:id/summary','30s','getSummary','post','update','delete','destroy','exports','util','path'];(function(_0x48b02c,_0x2b365c){var _0xef40ea=function(_0x22f004){while(--_0x22f004){_0x48b02c['push'](_0x48b02c['shift']());}};_0xef40ea(++_0x2b365c);}(_0xff7c,0x19e));var _0xcff7=function(_0xc8a931,_0x260690){_0xc8a931=_0xc8a931-0x0;var _0x28bd27=_0xff7c[_0xc8a931];return _0x28bd27;};'use strict';var multer=require('multer');var util=require(_0xcff7('0x0'));var path=require(_0xcff7('0x1'));var timeout=require(_0xcff7('0x2'));var express=require(_0xcff7('0x3'));var router=express[_0xcff7('0x4')]();var fs_extra=require(_0xcff7('0x5'));var auth=require(_0xcff7('0x6'));var interaction=require(_0xcff7('0x7'));var config=require(_0xcff7('0x8'));var controller=require(_0xcff7('0x9'));router[_0xcff7('0xa')]('/',auth['isAuthenticated'](),controller[_0xcff7('0xb')]);router['get'](_0xcff7('0xc'),auth['isAuthenticated'](),controller['show']);router['get'](_0xcff7('0xd'),auth[_0xcff7('0xe')](),controller[_0xcff7('0xf')]);router[_0xcff7('0xa')](_0xcff7('0x10'),auth[_0xcff7('0xe')](),controller[_0xcff7('0x11')]);router['get'](_0xcff7('0x12'),auth[_0xcff7('0xe')](),timeout(_0xcff7('0x13')),controller[_0xcff7('0x14')]);router[_0xcff7('0x15')]('/',auth[_0xcff7('0xe')](),controller['create']);router[_0xcff7('0x15')]('/:id/clone',auth['isAuthenticated'](),controller['clone']);router['put'](_0xcff7('0xc'),auth[_0xcff7('0xe')](),controller[_0xcff7('0x16')]);router[_0xcff7('0x17')]('/:id',auth[_0xcff7('0xe')](),controller[_0xcff7('0x18')]);module[_0xcff7('0x19')]=router; \ No newline at end of file +var _0xcea3=['fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./jscriptyProject.controller','get','isAuthenticated','index','/:id','show','/:id/sessions','getSessions','/:id/summary','30s','getSummary','post','create','clone','put','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router'];(function(_0x323430,_0x3d2b6d){var _0x9eecd1=function(_0xab855a){while(--_0xab855a){_0x323430['push'](_0x323430['shift']());}};_0x9eecd1(++_0x3d2b6d);}(_0xcea3,0xe2));var _0x3cea=function(_0xd3fd8,_0x55a6f0){_0xd3fd8=_0xd3fd8-0x0;var _0x2fa1af=_0xcea3[_0xd3fd8];return _0x2fa1af;};'use strict';var multer=require(_0x3cea('0x0'));var util=require(_0x3cea('0x1'));var path=require(_0x3cea('0x2'));var timeout=require(_0x3cea('0x3'));var express=require(_0x3cea('0x4'));var router=express[_0x3cea('0x5')]();var fs_extra=require(_0x3cea('0x6'));var auth=require(_0x3cea('0x7'));var interaction=require(_0x3cea('0x8'));var config=require(_0x3cea('0x9'));var controller=require(_0x3cea('0xa'));router[_0x3cea('0xb')]('/',auth[_0x3cea('0xc')](),controller[_0x3cea('0xd')]);router['get'](_0x3cea('0xe'),auth['isAuthenticated'](),controller[_0x3cea('0xf')]);router[_0x3cea('0xb')](_0x3cea('0x10'),auth[_0x3cea('0xc')](),controller[_0x3cea('0x11')]);router[_0x3cea('0xb')]('/:id/answers',auth['isAuthenticated'](),controller['getAnswers']);router[_0x3cea('0xb')](_0x3cea('0x12'),auth['isAuthenticated'](),timeout(_0x3cea('0x13')),controller[_0x3cea('0x14')]);router[_0x3cea('0x15')]('/',auth[_0x3cea('0xc')](),controller[_0x3cea('0x16')]);router['post']('/:id/clone',auth['isAuthenticated'](),controller[_0x3cea('0x17')]);router[_0x3cea('0x18')]('/:id',auth[_0x3cea('0xc')](),controller[_0x3cea('0x19')]);router[_0x3cea('0x1a')](_0x3cea('0xe'),auth[_0x3cea('0xc')](),controller[_0x3cea('0x1b')]);module[_0x3cea('0x1c')]=router; \ No newline at end of file diff --git a/server/api/jscriptyProject/jscriptyProject.attributes.js b/server/api/jscriptyProject/jscriptyProject.attributes.js index 16758a6..bd3d524 100644 --- a/server/api/jscriptyProject/jscriptyProject.attributes.js +++ b/server/api/jscriptyProject/jscriptyProject.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb384=['lodash','util','exports','STRING','name','TEXT','long','isObjectLike','formData','stringify','isString','setDataValue','format','{\x22name\x22:\x22%s\x22,\x22description\x22:\x22%s\x22,\x22pages\x22:[]}','getDataValue','description','sequelize'];(function(_0x186d6c,_0x1ce00a){var _0x3db931=function(_0x1050b7){while(--_0x1050b7){_0x186d6c['push'](_0x186d6c['shift']());}};_0x3db931(++_0x1ce00a);}(_0xb384,0x10f));var _0x4b38=function(_0x52bd59,_0x2468ed){_0x52bd59=_0x52bd59-0x0;var _0x25a353=_0xb384[_0x52bd59];return _0x25a353;};'use strict';var Sequelize=require(_0x4b38('0x0'));var _=require(_0x4b38('0x1'));var util=require(_0x4b38('0x2'));module[_0x4b38('0x3')]={'name':{'type':Sequelize[_0x4b38('0x4')],'unique':_0x4b38('0x5')},'description':{'type':Sequelize[_0x4b38('0x4')]},'formData':{'type':Sequelize[_0x4b38('0x6')](_0x4b38('0x7')),'set':function(_0x3d3940){if(_[_0x4b38('0x8')](_0x3d3940)){this['setDataValue'](_0x4b38('0x9'),JSON[_0x4b38('0xa')](_0x3d3940));}else if(_[_0x4b38('0xb')](_0x3d3940)){this[_0x4b38('0xc')](_0x4b38('0x9'),_0x3d3940);}else{this['setDataValue'](_0x4b38('0x9'),util[_0x4b38('0xd')](_0x4b38('0xe'),this[_0x4b38('0xf')](_0x4b38('0x5'))||'',this[_0x4b38('0xf')](_0x4b38('0x10'))||''));}}},'enableUncompleteSave':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'sendUnpauseOnSubmit':{'type':Sequelize['BOOLEAN'],'defaultValue':![]}}; \ No newline at end of file +var _0xef66=['name','long','formData','stringify','isString','setDataValue','format','{\x22name\x22:\x22%s\x22,\x22description\x22:\x22%s\x22,\x22pages\x22:[]}','getDataValue','BOOLEAN','sequelize','util','STRING'];(function(_0x3e6ead,_0x61f91a){var _0x28f590=function(_0x1e2242){while(--_0x1e2242){_0x3e6ead['push'](_0x3e6ead['shift']());}};_0x28f590(++_0x61f91a);}(_0xef66,0xb3));var _0x6ef6=function(_0x17730f,_0x5b8bd0){_0x17730f=_0x17730f-0x0;var _0x43ebf2=_0xef66[_0x17730f];return _0x43ebf2;};'use strict';var Sequelize=require(_0x6ef6('0x0'));var _=require('lodash');var util=require(_0x6ef6('0x1'));module['exports']={'name':{'type':Sequelize[_0x6ef6('0x2')],'unique':_0x6ef6('0x3')},'description':{'type':Sequelize[_0x6ef6('0x2')]},'formData':{'type':Sequelize['TEXT'](_0x6ef6('0x4')),'set':function(_0x558858){if(_['isObjectLike'](_0x558858)){this['setDataValue'](_0x6ef6('0x5'),JSON[_0x6ef6('0x6')](_0x558858));}else if(_[_0x6ef6('0x7')](_0x558858)){this[_0x6ef6('0x8')](_0x6ef6('0x5'),_0x558858);}else{this[_0x6ef6('0x8')](_0x6ef6('0x5'),util[_0x6ef6('0x9')](_0x6ef6('0xa'),this['getDataValue']('name')||'',this[_0x6ef6('0xb')]('description')||''));}}},'enableUncompleteSave':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'sendUnpauseOnSubmit':{'type':Sequelize[_0x6ef6('0xc')],'defaultValue':![]}}; \ No newline at end of file diff --git a/server/api/jscriptyProject/jscriptyProject.controller.js b/server/api/jscriptyProject/jscriptyProject.controller.js index 453fb26..aedf619 100644 --- a/server/api/jscriptyProject/jscriptyProject.controller.js +++ b/server/api/jscriptyProject/jscriptyProject.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0abf=['util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','get','Projects','UserProfileResource','error','stack','name','send','index','rawAttributes','fieldName','model','keys','query','attributes','intersection','fields','length','nolimit','sort','where','filters','pick','filter','map','type','VIRTUAL','merge','options','JscriptyProject','includeAll','include','findAll','rows','catch','show','params','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','userProfileId','autoAssociation','clone','omit','updatedAt','createdAt','UserProfileSection','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','findOne','JscriptySessionReport','ProjectId','getAnswers','JscriptyAnswerReport','order','number','toString','indexOf','replace','getSummary','startTime','starttime','parse','JscriptyQuestionReport','hasOwnProperty','question','format','YYYY-MM-DD\x20HH:mm:ss','questionId','answer','isEmpty','now','writeFileSync','setHeader','Content-disposition','attachment;\x20filename=','Jscripty_Project_%d_Summary_%s.csv','text/csv','/tmp/Jscripty_Project_%d_Summary_%s.csv','eml-format','zip-dir','fast-json-patch','bluebird'];(function(_0x16eb13,_0x3d592f){var _0x2b6230=function(_0x1f963a){while(--_0x1f963a){_0x16eb13['push'](_0x16eb13['shift']());}};_0x2b6230(++_0x3d592f);}(_0x0abf,0xe8));var _0xf0ab=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0x0abf[_0x501510];return _0x1e6ee5;};'use strict';var emlformat=require(_0xf0ab('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xf0ab('0x1'));var jsonpatch=require(_0xf0ab('0x2'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0xf0ab('0x3'));var Mustache=require('mustache');var util=require(_0xf0ab('0x4'));var path=require(_0xf0ab('0x5'));var sox=require(_0xf0ab('0x6'));var csv=require(_0xf0ab('0x7'));var ejs=require(_0xf0ab('0x8'));var fs=require('fs');var fs_extra=require(_0xf0ab('0x9'));var _=require(_0xf0ab('0xa'));var squel=require('squel');var crypto=require(_0xf0ab('0xb'));var jsforce=require(_0xf0ab('0xc'));var deskjs=require(_0xf0ab('0xd'));var toCsv=require(_0xf0ab('0x7'));var querystring=require('querystring');var Papa=require(_0xf0ab('0xe'));var Redis=require(_0xf0ab('0xf'));var authService=require(_0xf0ab('0x10'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xf0ab('0x11'));var logger=require('../../config/logger')(_0xf0ab('0x12'));var utils=require(_0xf0ab('0x13'));var config=require(_0xf0ab('0x14'));var licenseUtil=require(_0xf0ab('0x15'));var db=require(_0xf0ab('0x16'))['db'];function respondWithStatusCode(_0x38ca67,_0x34ccdc){_0x34ccdc=_0x34ccdc||0xcc;return function(_0x4fdd5f){if(_0x4fdd5f){return _0x38ca67[_0xf0ab('0x17')](_0x34ccdc);}return _0x38ca67[_0xf0ab('0x18')](_0x34ccdc)[_0xf0ab('0x19')]();};}function respondWithResult(_0x35c75f,_0x1824ef){_0x1824ef=_0x1824ef||0xc8;return function(_0x36cabe){if(_0x36cabe){return _0x35c75f[_0xf0ab('0x18')](_0x1824ef)[_0xf0ab('0x1a')](_0x36cabe);}};}function respondWithFilteredResult(_0x180d0b,_0x3c5bfd){return function(_0x20f453){if(_0x20f453){var _0x221bac=typeof _0x3c5bfd[_0xf0ab('0x1b')]===_0xf0ab('0x1c')&&typeof _0x3c5bfd[_0xf0ab('0x1d')]==='undefined';var _0x457465=_0x20f453[_0xf0ab('0x1e')];var _0x1803f0=_0x221bac?0x0:_0x3c5bfd[_0xf0ab('0x1b')];var _0x776619=_0x221bac?_0x20f453[_0xf0ab('0x1e')]:_0x3c5bfd[_0xf0ab('0x1b')]+_0x3c5bfd[_0xf0ab('0x1d')];var _0x1713d6;if(_0x776619>=_0x457465){_0x776619=_0x457465;_0x1713d6=0xc8;}else{_0x1713d6=0xce;}_0x180d0b[_0xf0ab('0x18')](_0x1713d6);return _0x180d0b[_0xf0ab('0x1f')](_0xf0ab('0x20'),_0x1803f0+'-'+_0x776619+'/'+_0x457465)[_0xf0ab('0x1a')](_0x20f453);}return null;};}function patchUpdates(_0x22a205){return function(_0x2cd961){try{jsonpatch[_0xf0ab('0x21')](_0x2cd961,_0x22a205,!![]);}catch(_0x537673){return BPromise[_0xf0ab('0x22')](_0x537673);}return _0x2cd961[_0xf0ab('0x23')]();};}function saveUpdates(_0x1e1483,_0x11ab3a){return function(_0x3bf6a1){if(_0x3bf6a1){return _0x3bf6a1[_0xf0ab('0x24')](_0x1e1483)[_0xf0ab('0x25')](function(_0x20140b){return _0x20140b;});}return null;};}function removeEntity(_0x36ad01,_0x18bb37){return function(_0x43119f){if(_0x43119f){return _0x43119f['destroy']()['then'](function(){var _0x4eee21=_0x43119f[_0xf0ab('0x26')]({'plain':!![]});var _0x4f0caf=_0xf0ab('0x27');return db[_0xf0ab('0x28')]['destroy']({'where':{'type':_0x4f0caf,'resourceId':_0x4eee21['id']}})[_0xf0ab('0x25')](function(){return _0x43119f;});})[_0xf0ab('0x25')](function(){_0x36ad01[_0xf0ab('0x18')](0xcc)[_0xf0ab('0x19')]();});}};}function handleEntityNotFound(_0x7d4ff9,_0x502921){return function(_0x2d0da7){if(!_0x2d0da7){_0x7d4ff9['sendStatus'](0x194);}return _0x2d0da7;};}function handleError(_0x55d799,_0x1dcd2e){_0x1dcd2e=_0x1dcd2e||0x1f4;return function(_0x4306c6){logger[_0xf0ab('0x29')](_0x4306c6[_0xf0ab('0x2a')]);if(_0x4306c6[_0xf0ab('0x2b')]){delete _0x4306c6[_0xf0ab('0x2b')];}_0x55d799[_0xf0ab('0x18')](_0x1dcd2e)[_0xf0ab('0x2c')](_0x4306c6);};}exports[_0xf0ab('0x2d')]=function(_0x2f0fcd,_0x21e8ac){var _0x199753={},_0x58cbe1={},_0x1e1ffb={'count':0x0,'rows':[]};var _0x35973a=_['map'](db['JscriptyProject'][_0xf0ab('0x2e')],function(_0x1dc84e){return{'name':_0x1dc84e[_0xf0ab('0x2f')],'type':_0x1dc84e['type']['key']};});_0x58cbe1[_0xf0ab('0x30')]=_['map'](_0x35973a,_0xf0ab('0x2b'));_0x58cbe1['query']=_[_0xf0ab('0x31')](_0x2f0fcd[_0xf0ab('0x32')]);_0x58cbe1['filters']=_['intersection'](_0x58cbe1[_0xf0ab('0x30')],_0x58cbe1[_0xf0ab('0x32')]);_0x199753[_0xf0ab('0x33')]=_[_0xf0ab('0x34')](_0x58cbe1[_0xf0ab('0x30')],qs[_0xf0ab('0x35')](_0x2f0fcd[_0xf0ab('0x32')][_0xf0ab('0x35')]));_0x199753[_0xf0ab('0x33')]=_0x199753[_0xf0ab('0x33')][_0xf0ab('0x36')]?_0x199753[_0xf0ab('0x33')]:_0x58cbe1[_0xf0ab('0x30')];if(!_0x2f0fcd[_0xf0ab('0x32')]['hasOwnProperty'](_0xf0ab('0x37'))){_0x199753[_0xf0ab('0x1d')]=qs[_0xf0ab('0x1d')](_0x2f0fcd['query'][_0xf0ab('0x1d')]);_0x199753[_0xf0ab('0x1b')]=qs[_0xf0ab('0x1b')](_0x2f0fcd['query'][_0xf0ab('0x1b')]);}_0x199753['order']=qs[_0xf0ab('0x38')](_0x2f0fcd['query'][_0xf0ab('0x38')]);_0x199753[_0xf0ab('0x39')]=qs[_0xf0ab('0x3a')](_[_0xf0ab('0x3b')](_0x2f0fcd[_0xf0ab('0x32')],_0x58cbe1[_0xf0ab('0x3a')]),_0x35973a);if(_0x2f0fcd['query'][_0xf0ab('0x3c')]){_0x199753[_0xf0ab('0x39')]=_['merge'](_0x199753[_0xf0ab('0x39')],{'$or':_[_0xf0ab('0x3d')](_0x35973a,function(_0x1d4eec){if(_0x1d4eec[_0xf0ab('0x3e')]!==_0xf0ab('0x3f')){var _0x11e3b7={};_0x11e3b7[_0x1d4eec[_0xf0ab('0x2b')]]={'$like':'%'+_0x2f0fcd['query'][_0xf0ab('0x3c')]+'%'};return _0x11e3b7;}})});}_0x199753=_[_0xf0ab('0x40')]({},_0x199753,_0x2f0fcd[_0xf0ab('0x41')]);var _0x4bd6d1={'where':_0x199753[_0xf0ab('0x39')]};return db[_0xf0ab('0x42')][_0xf0ab('0x1e')](_0x4bd6d1)[_0xf0ab('0x25')](function(_0x2b7ed5){_0x1e1ffb['count']=_0x2b7ed5;if(_0x2f0fcd[_0xf0ab('0x32')][_0xf0ab('0x43')]){_0x199753[_0xf0ab('0x44')]=[{'all':!![]}];}return db[_0xf0ab('0x42')][_0xf0ab('0x45')](_0x199753);})[_0xf0ab('0x25')](function(_0x45849c){_0x1e1ffb[_0xf0ab('0x46')]=_0x45849c;return _0x1e1ffb;})[_0xf0ab('0x25')](respondWithFilteredResult(_0x21e8ac,_0x199753))[_0xf0ab('0x47')](handleError(_0x21e8ac,null));};exports[_0xf0ab('0x48')]=function(_0x32ec93,_0x22a265){var _0x5e6b6b={'raw':![],'where':{'id':_0x32ec93[_0xf0ab('0x49')]['id']}},_0x4c4ab9={};_0x4c4ab9['model']=_[_0xf0ab('0x31')](db[_0xf0ab('0x42')]['rawAttributes']);_0x4c4ab9[_0xf0ab('0x32')]=_[_0xf0ab('0x31')](_0x32ec93['query']);_0x4c4ab9[_0xf0ab('0x3a')]=_[_0xf0ab('0x34')](_0x4c4ab9[_0xf0ab('0x30')],_0x4c4ab9[_0xf0ab('0x32')]);_0x5e6b6b[_0xf0ab('0x33')]=_[_0xf0ab('0x34')](_0x4c4ab9[_0xf0ab('0x30')],qs[_0xf0ab('0x35')](_0x32ec93[_0xf0ab('0x32')][_0xf0ab('0x35')]));_0x5e6b6b[_0xf0ab('0x33')]=_0x5e6b6b[_0xf0ab('0x33')][_0xf0ab('0x36')]?_0x5e6b6b[_0xf0ab('0x33')]:_0x4c4ab9['model'];if(_0x32ec93['query'][_0xf0ab('0x43')]){_0x5e6b6b['include']=[{'all':!![]}];}_0x5e6b6b=_['merge']({},_0x5e6b6b,_0x32ec93['options']);return db[_0xf0ab('0x42')][_0xf0ab('0x4a')](_0x5e6b6b)[_0xf0ab('0x25')](handleEntityNotFound(_0x22a265,null))[_0xf0ab('0x25')](respondWithResult(_0x22a265,null))[_0xf0ab('0x47')](handleError(_0x22a265,null));};exports[_0xf0ab('0x4b')]=function(_0x472c1b,_0x1a0f21){return db[_0xf0ab('0x42')][_0xf0ab('0x4b')](_0x472c1b[_0xf0ab('0x4c')],{})[_0xf0ab('0x25')](function(_0x4e6c9b){var _0x393c9a=_0x472c1b[_0xf0ab('0x4d')][_0xf0ab('0x26')]({'plain':!![]});if(!_0x393c9a)throw new Error(_0xf0ab('0x4e'));if(_0x393c9a[_0xf0ab('0x4f')]===_0xf0ab('0x4d')){var _0x430921=_0x4e6c9b[_0xf0ab('0x26')]({'plain':!![]});var _0x47f564='Projects';return db['UserProfileSection'][_0xf0ab('0x4a')]({'where':{'name':_0x47f564,'userProfileId':_0x393c9a[_0xf0ab('0x50')]},'raw':!![]})['then'](function(_0xa1a416){if(_0xa1a416&&_0xa1a416[_0xf0ab('0x51')]===0x0){return db['UserProfileResource'][_0xf0ab('0x4b')]({'name':_0x430921[_0xf0ab('0x2b')],'resourceId':_0x430921['id'],'type':_0xa1a416[_0xf0ab('0x2b')],'sectionId':_0xa1a416['id']},{})[_0xf0ab('0x25')](function(){return _0x4e6c9b;});}else{return _0x4e6c9b;}})[_0xf0ab('0x47')](function(_0x33112b){logger[_0xf0ab('0x29')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x33112b);throw _0x33112b;});}return _0x4e6c9b;})[_0xf0ab('0x25')](respondWithResult(_0x1a0f21,0xc9))['catch'](handleError(_0x1a0f21,null));};exports[_0xf0ab('0x52')]=function(_0x4c9d2b,_0x1a402b){var _0x5c721a={'where':{'id':_0x4c9d2b[_0xf0ab('0x49')]['id']}},_0x535274={};_0x535274['model']=_[_0xf0ab('0x31')](db['JscriptyProject'][_0xf0ab('0x2e')]);_0x5c721a['attributes']=_[_0xf0ab('0x34')](_0x535274[_0xf0ab('0x30')],qs[_0xf0ab('0x35')](_0x4c9d2b['query']['fields']));_0x5c721a['attributes']=_0x5c721a[_0xf0ab('0x33')][_0xf0ab('0x36')]?_0x5c721a['attributes']:_0x535274['model'];if(_0x4c9d2b[_0xf0ab('0x32')][_0xf0ab('0x43')]){_0x5c721a[_0xf0ab('0x44')]=[{'all':!![]}];}_0x5c721a=_[_0xf0ab('0x40')]({},_0x5c721a,_0x4c9d2b[_0xf0ab('0x41')]);return db[_0xf0ab('0x42')][_0xf0ab('0x4a')](_0x5c721a)[_0xf0ab('0x25')](handleEntityNotFound(_0x1a402b,null))[_0xf0ab('0x25')](function(_0x1f180f){if(_0x1f180f){var _0x1e6a4e=_0x1f180f['get']({'plain':!![]});_0x1e6a4e=qs[_0xf0ab('0x53')](_0x1e6a4e,['id','createdAt',_0xf0ab('0x54')]);_0x4c9d2b[_0xf0ab('0x4c')]=_[_0xf0ab('0x53')](_0x4c9d2b[_0xf0ab('0x4c')],['id',_0xf0ab('0x55'),_0xf0ab('0x54')]);return db[_0xf0ab('0x42')][_0xf0ab('0x4b')](_[_0xf0ab('0x40')](_0x1e6a4e,_0x4c9d2b[_0xf0ab('0x4c')]),{'include':_0x4c9d2b['query'][_0xf0ab('0x43')]?[{'all':!![]}]:undefined})[_0xf0ab('0x25')](function(_0x4062b7){var _0x1d4a72=_0x4c9d2b[_0xf0ab('0x4d')][_0xf0ab('0x26')]({'plain':!![]});if(!_0x1d4a72)throw new Error(_0xf0ab('0x4e'));if(_0x1d4a72[_0xf0ab('0x4f')]===_0xf0ab('0x4d')){var _0x570379=_0x4062b7['get']({'plain':!![]});var _0x7e0318=_0xf0ab('0x27');return db[_0xf0ab('0x56')]['find']({'where':{'name':_0x7e0318,'userProfileId':_0x1d4a72[_0xf0ab('0x50')]},'raw':!![]})[_0xf0ab('0x25')](function(_0xd61dcf){if(_0xd61dcf&&_0xd61dcf['autoAssociation']===0x0){return db[_0xf0ab('0x28')][_0xf0ab('0x4b')]({'name':_0x570379[_0xf0ab('0x2b')],'resourceId':_0x570379['id'],'type':_0xd61dcf[_0xf0ab('0x2b')],'sectionId':_0xd61dcf['id']},{})[_0xf0ab('0x25')](function(){return _0x4062b7;});}else{return _0x4062b7;}})['catch'](function(_0x3f0e11){logger[_0xf0ab('0x29')](_0xf0ab('0x57'),_0x3f0e11);throw _0x3f0e11;});}return _0x4062b7;});}})[_0xf0ab('0x25')](respondWithResult(_0x1a402b,0xc9))[_0xf0ab('0x47')](handleError(_0x1a402b,null));};exports[_0xf0ab('0x24')]=function(_0xe3fc19,_0x2b0b89){if(_0xe3fc19[_0xf0ab('0x4c')]['id']){delete _0xe3fc19[_0xf0ab('0x4c')]['id'];}return db[_0xf0ab('0x42')][_0xf0ab('0x4a')]({'where':{'id':_0xe3fc19[_0xf0ab('0x49')]['id']}})['then'](handleEntityNotFound(_0x2b0b89,null))['then'](saveUpdates(_0xe3fc19[_0xf0ab('0x4c')],null))[_0xf0ab('0x25')](respondWithResult(_0x2b0b89,null))[_0xf0ab('0x47')](handleError(_0x2b0b89,null));};exports['destroy']=function(_0x416ebf,_0x4b8496){return db[_0xf0ab('0x42')][_0xf0ab('0x4a')]({'where':{'id':_0x416ebf[_0xf0ab('0x49')]['id']}})['then'](handleEntityNotFound(_0x4b8496,null))[_0xf0ab('0x25')](removeEntity(_0x4b8496,null))['catch'](handleError(_0x4b8496,null));};exports['getSessions']=function(_0x43f9c0,_0x461c7a,_0x283426){var _0x549c70={'raw':!![],'where':{}};var _0x300424={};var _0x92ade0={'count':0x0,'rows':[]};return db[_0xf0ab('0x42')][_0xf0ab('0x58')]({'where':{'id':_0x43f9c0['params']['id']}})['then'](handleEntityNotFound(_0x461c7a,null))['then'](function(_0x3fddb4){if(_0x3fddb4){_0x300424[_0xf0ab('0x30')]=_[_0xf0ab('0x31')](db[_0xf0ab('0x59')][_0xf0ab('0x2e')]);_0x300424[_0xf0ab('0x32')]=_[_0xf0ab('0x31')](_0x43f9c0[_0xf0ab('0x32')]);_0x300424[_0xf0ab('0x3a')]=_[_0xf0ab('0x34')](_0x300424[_0xf0ab('0x30')],_0x300424['query']);_0x549c70[_0xf0ab('0x33')]=_[_0xf0ab('0x34')](_0x300424[_0xf0ab('0x30')],qs[_0xf0ab('0x35')](_0x43f9c0[_0xf0ab('0x32')][_0xf0ab('0x35')]));_0x549c70[_0xf0ab('0x33')]=_0x549c70[_0xf0ab('0x33')]['length']?_0x549c70[_0xf0ab('0x33')]:_0x300424[_0xf0ab('0x30')];if(!_0x43f9c0['query']['hasOwnProperty']('nolimit')){_0x549c70[_0xf0ab('0x1d')]=qs[_0xf0ab('0x1d')](_0x43f9c0[_0xf0ab('0x32')][_0xf0ab('0x1d')]);_0x549c70[_0xf0ab('0x1b')]=qs[_0xf0ab('0x1b')](_0x43f9c0['query'][_0xf0ab('0x1b')]);}_0x549c70['order']=qs[_0xf0ab('0x38')](_0x43f9c0['query'][_0xf0ab('0x38')]);_0x549c70['where']=qs[_0xf0ab('0x3a')](_['pick'](_0x43f9c0['query'],_0x300424[_0xf0ab('0x3a')]));_0x549c70[_0xf0ab('0x39')][_0xf0ab('0x5a')]=_0x3fddb4['id'];if(_0x43f9c0[_0xf0ab('0x32')][_0xf0ab('0x3c')]){_0x549c70[_0xf0ab('0x39')]=_[_0xf0ab('0x40')](_0x549c70[_0xf0ab('0x39')],{'$or':_[_0xf0ab('0x3d')](_0x549c70[_0xf0ab('0x33')],function(_0x1650c0){var _0x31f464={};_0x31f464[_0x1650c0]={'$like':'%'+_0x43f9c0[_0xf0ab('0x32')]['filter']+'%'};return _0x31f464;})});}_0x549c70=_[_0xf0ab('0x40')]({},_0x549c70,_0x43f9c0[_0xf0ab('0x41')]);return db[_0xf0ab('0x59')][_0xf0ab('0x1e')]({'where':_0x549c70[_0xf0ab('0x39')]})[_0xf0ab('0x25')](function(_0x465f99){_0x92ade0[_0xf0ab('0x1e')]=_0x465f99;if(_0x43f9c0[_0xf0ab('0x32')][_0xf0ab('0x43')]){_0x549c70[_0xf0ab('0x44')]=[{'all':!![]}];}return db[_0xf0ab('0x59')]['findAll'](_0x549c70);})[_0xf0ab('0x25')](function(_0x1f18cd){_0x92ade0[_0xf0ab('0x46')]=_0x1f18cd;return _0x92ade0;});}})[_0xf0ab('0x25')](respondWithFilteredResult(_0x461c7a,_0x549c70))['catch'](handleError(_0x461c7a,null));};exports[_0xf0ab('0x5b')]=function(_0x177f79,_0x4463cc,_0x318e89){var _0x29f010={'raw':!![],'where':{}};var _0x478860={};var _0x17251d={'count':0x0,'rows':[]};return db[_0xf0ab('0x42')]['findOne']({'where':{'id':_0x177f79[_0xf0ab('0x49')]['id']}})['then'](handleEntityNotFound(_0x4463cc,null))[_0xf0ab('0x25')](function(_0x277cec){if(_0x277cec){_0x478860['model']=_[_0xf0ab('0x31')](db[_0xf0ab('0x5c')]['rawAttributes']);_0x478860['query']=_[_0xf0ab('0x31')](_0x177f79['query']);_0x478860[_0xf0ab('0x3a')]=_[_0xf0ab('0x34')](_0x478860['model'],_0x478860['query']);_0x29f010['attributes']=_[_0xf0ab('0x34')](_0x478860[_0xf0ab('0x30')],qs[_0xf0ab('0x35')](_0x177f79[_0xf0ab('0x32')]['fields']));_0x29f010[_0xf0ab('0x33')]=_0x29f010[_0xf0ab('0x33')][_0xf0ab('0x36')]?_0x29f010[_0xf0ab('0x33')]:_0x478860[_0xf0ab('0x30')];if(!_0x177f79['query']['hasOwnProperty'](_0xf0ab('0x37'))){_0x29f010[_0xf0ab('0x1d')]=qs['limit'](_0x177f79['query'][_0xf0ab('0x1d')]);_0x29f010[_0xf0ab('0x1b')]=qs[_0xf0ab('0x1b')](_0x177f79[_0xf0ab('0x32')][_0xf0ab('0x1b')]);}_0x29f010[_0xf0ab('0x5d')]=qs[_0xf0ab('0x38')](_0x177f79[_0xf0ab('0x32')][_0xf0ab('0x38')]);_0x29f010[_0xf0ab('0x39')]=qs[_0xf0ab('0x3a')](_['pick'](_0x177f79['query'],_0x478860[_0xf0ab('0x3a')]));_0x29f010['where'][_0xf0ab('0x5a')]=_0x277cec['id'];if(_0x177f79[_0xf0ab('0x32')][_0xf0ab('0x3c')]){_0x29f010[_0xf0ab('0x39')]=_['merge'](_0x29f010[_0xf0ab('0x39')],{'$or':_[_0xf0ab('0x3d')](_0x29f010[_0xf0ab('0x33')],function(_0xde9d9a){var _0x392f83={};_0x392f83[_0xde9d9a]={'$like':'%'+_0x177f79[_0xf0ab('0x32')][_0xf0ab('0x3c')]+'%'};return _0x392f83;})});}_0x29f010=_[_0xf0ab('0x40')]({},_0x29f010,_0x177f79[_0xf0ab('0x41')]);return db[_0xf0ab('0x5c')][_0xf0ab('0x1e')]({'where':_0x29f010[_0xf0ab('0x39')]})[_0xf0ab('0x25')](function(_0x4211a1){_0x17251d['count']=_0x4211a1;if(_0x177f79[_0xf0ab('0x32')][_0xf0ab('0x43')]){_0x29f010[_0xf0ab('0x44')]=[{'all':!![]}];}return db[_0xf0ab('0x5c')][_0xf0ab('0x45')](_0x29f010);})[_0xf0ab('0x25')](function(_0x611cf7){_0x17251d['rows']=_0x611cf7;return _0x17251d;});}})['then'](respondWithFilteredResult(_0x4463cc,_0x29f010))[_0xf0ab('0x47')](handleError(_0x4463cc,null));};function char(_0x200a20){return _0xf0ab('0x5e')===typeof _0x200a20?String['fromCharCode'][_0xf0ab('0x21')](null,arguments):_0x200a20;}function needsEncapsulation(_0x405b34){return!!_0x405b34&&(_0x405b34[_0xf0ab('0x5f')]()[_0xf0ab('0x60')](char(0xd))>=0x0||_0x405b34[_0xf0ab('0x5f')]()['indexOf'](char(0xa))>=0x0||_0x405b34['toString']()[_0xf0ab('0x60')](char(0x2c))>=0x0||_0x405b34['toString']()[_0xf0ab('0x60')](char(0x22))>=0x0);}function encapsulate(_0x3867b3){var _0x48012a=char(0x22),_0x319c9f='\x5c'+char(0x22),_0x223090=_0x3867b3[_0xf0ab('0x5f')]()[_0xf0ab('0x61')](new RegExp(_0x48012a,'g'),_0x319c9f);return _0x48012a+_0x223090+_0x48012a;}exports[_0xf0ab('0x62')]=function(_0x4de6ba,_0x327321,_0x3cf980){var _0x28cead,_0x2e1783;var _0x39b32b={'where':{'ProjectId':_0x4de6ba['params']['id']}};if(_0x4de6ba[_0xf0ab('0x32')][_0xf0ab('0x63')]){_0x39b32b[_0xf0ab('0x39')][_0xf0ab('0x64')]=JSON[_0xf0ab('0x65')](_0x4de6ba['query'][_0xf0ab('0x63')]);}return db[_0xf0ab('0x59')][_0xf0ab('0x45')](_0x39b32b)['then'](handleEntityNotFound(_0x327321,null))[_0xf0ab('0x25')](function(_0x48aaa1){if(_0x48aaa1){_0x28cead=_0x48aaa1;return db[_0xf0ab('0x66')][_0xf0ab('0x45')]({'where':{'SessionId':{'$in':_[_0xf0ab('0x3d')](_0x28cead,'id')},'ProjectId':_0x4de6ba[_0xf0ab('0x49')]['id']},'order':'-createdAt'});}})[_0xf0ab('0x25')](handleEntityNotFound(_0x327321,null))['then'](function(_0x542d27){if(_0x542d27){_0x2e1783=_0x542d27;var _0x426da1={};for(var _0x5578bb=0x0,_0x533590=_0x2e1783[_0xf0ab('0x36')];_0x5578bb<_0x533590;_0x5578bb++){if(!_0x426da1[_0xf0ab('0x67')](_0x2e1783[_0x5578bb]['questionId'])){_0x426da1[_0x2e1783[_0x5578bb]['questionId']]=needsEncapsulation(_0x2e1783[_0x5578bb]['question'])?encapsulate(_0x2e1783[_0x5578bb]['question']):_0x2e1783[_0x5578bb][_0xf0ab('0x68')];}}var _0x12d9b6=[],_0x3c7162={};for(var _0x11a975=0x0,_0xf93478=_0x28cead['length'];_0x11a975<_0xf93478;_0x11a975++){_0x3c7162={'ProjectId':_0x4de6ba[_0xf0ab('0x49')]['id'],'SessionId':_0x28cead[_0x11a975]['id'],'StartTime':moment(_0x28cead[_0x11a975][_0xf0ab('0x64')])[_0xf0ab('0x69')](_0xf0ab('0x6a'))};for(var _0x84eab9=0x0,_0x27cd98=_0x2e1783[_0xf0ab('0x36')];_0x84eab9<_0x27cd98;_0x84eab9++){if(_0x2e1783[_0x84eab9]['SessionId']==_0x28cead[_0x11a975]['id']&&_0x426da1[_0xf0ab('0x67')](_0x2e1783[_0x84eab9][_0xf0ab('0x6b')])){_0x3c7162[_0x426da1[_0x2e1783[_0x84eab9][_0xf0ab('0x6b')]]]=_0x2e1783[_0x84eab9][_0xf0ab('0x6c')];}}for(var _0x375813 in _0x426da1){if(!_0x3c7162[_0xf0ab('0x67')](_0x426da1[_0x375813])){_0x3c7162[_0x426da1[_0x375813]]=null;}}_0x12d9b6['push'](_0x3c7162);}return _0x12d9b6;}})[_0xf0ab('0x25')](function(_0x45a3f3){if(!_[_0xf0ab('0x6d')](_0x45a3f3)){var _0x16cd4c=toCsv(_0x45a3f3);var _0x4ca7a3=Date[_0xf0ab('0x6e')]();fs[_0xf0ab('0x6f')](util['format']('/tmp/Jscripty_Project_%d_Summary_%s.csv',_0x4de6ba[_0xf0ab('0x49')]['id'],_0x4ca7a3),_0x16cd4c);_0x327321[_0xf0ab('0x70')](_0xf0ab('0x71'),_0xf0ab('0x72')+util[_0xf0ab('0x69')](_0xf0ab('0x73'),_0x4de6ba[_0xf0ab('0x49')]['id'],_0x4ca7a3));_0x327321[_0xf0ab('0x70')]('Content-type',_0xf0ab('0x74'));return _0x327321['download'](util['format'](_0xf0ab('0x75'),_0x4de6ba[_0xf0ab('0x49')]['id'],_0x4ca7a3));}else{return _0x327321[_0xf0ab('0x17')](0xcc);}})[_0xf0ab('0x47')](handleError(_0x327321,null));}; \ No newline at end of file +var _0x39d7=['fieldName','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','merge','VIRTUAL','options','includeAll','rows','catch','show','params','find','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','Projects','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','clone','include','omit','createdAt','updatedAt','JscriptySessionReport','pick','ProjectId','filter','getAnswers','findOne','JscriptyAnswerReport','findAll','number','fromCharCode','apply','toString','indexOf','replace','getSummary','startTime','starttime','JscriptyQuestionReport','questionId','question','format','YYYY-MM-DD\x20HH:mm:ss','push','isEmpty','now','writeFileSync','/tmp/Jscripty_Project_%d_Summary_%s.csv','setHeader','Content-disposition','Content-type','text/csv','download','eml-format','rimraf','zip-dir','request-promise','moment','mustache','sox','to-csv','ejs','lodash','jsforce','querystring','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','limit','undefined','count','set','reject','save','update','then','destroy','get','UserProfileResource','error','name','send','map','JscriptyProject','rawAttributes'];(function(_0x412694,_0xcdb2d0){var _0xe0008b=function(_0x5855d9){while(--_0x5855d9){_0x412694['push'](_0x412694['shift']());}};_0xe0008b(++_0xcdb2d0);}(_0x39d7,0x12d));var _0x739d=function(_0x47ec99,_0x4beb8f){_0x47ec99=_0x47ec99-0x0;var _0x52413b=_0x39d7[_0x47ec99];return _0x52413b;};'use strict';var emlformat=require(_0x739d('0x0'));var rimraf=require(_0x739d('0x1'));var zipdir=require(_0x739d('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x739d('0x3'));var moment=require(_0x739d('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x739d('0x5'));var util=require('util');var path=require('path');var sox=require(_0x739d('0x6'));var csv=require(_0x739d('0x7'));var ejs=require(_0x739d('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x739d('0x9'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x739d('0xa'));var deskjs=require('desk.js');var toCsv=require(_0x739d('0x7'));var querystring=require(_0x739d('0xb'));var Papa=require(_0x739d('0xc'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x739d('0xd'));var as=require(_0x739d('0xe'));var hardwareService=require(_0x739d('0xf'));var logger=require(_0x739d('0x10'))(_0x739d('0x11'));var utils=require(_0x739d('0x12'));var config=require(_0x739d('0x13'));var licenseUtil=require(_0x739d('0x14'));var db=require(_0x739d('0x15'))['db'];function respondWithStatusCode(_0xb2dc6b,_0x24dc90){_0x24dc90=_0x24dc90||0xcc;return function(_0x138870){if(_0x138870){return _0xb2dc6b[_0x739d('0x16')](_0x24dc90);}return _0xb2dc6b[_0x739d('0x17')](_0x24dc90)[_0x739d('0x18')]();};}function respondWithResult(_0x305bfc,_0x8c5a89){_0x8c5a89=_0x8c5a89||0xc8;return function(_0x4c06af){if(_0x4c06af){return _0x305bfc[_0x739d('0x17')](_0x8c5a89)[_0x739d('0x19')](_0x4c06af);}};}function respondWithFilteredResult(_0x1f168f,_0x152325){return function(_0x48fd2a){if(_0x48fd2a){var _0x1873f8=typeof _0x152325[_0x739d('0x1a')]==='undefined'&&typeof _0x152325[_0x739d('0x1b')]===_0x739d('0x1c');var _0x264fba=_0x48fd2a[_0x739d('0x1d')];var _0x25be90=_0x1873f8?0x0:_0x152325[_0x739d('0x1a')];var _0x21ab84=_0x1873f8?_0x48fd2a['count']:_0x152325['offset']+_0x152325[_0x739d('0x1b')];var _0x3c2706;if(_0x21ab84>=_0x264fba){_0x21ab84=_0x264fba;_0x3c2706=0xc8;}else{_0x3c2706=0xce;}_0x1f168f[_0x739d('0x17')](_0x3c2706);return _0x1f168f[_0x739d('0x1e')]('Content-Range',_0x25be90+'-'+_0x21ab84+'/'+_0x264fba)['json'](_0x48fd2a);}return null;};}function patchUpdates(_0x526942){return function(_0x1ff78a){try{jsonpatch['apply'](_0x1ff78a,_0x526942,!![]);}catch(_0x210b20){return BPromise[_0x739d('0x1f')](_0x210b20);}return _0x1ff78a[_0x739d('0x20')]();};}function saveUpdates(_0x448eba,_0x5c6ff8){return function(_0x5172ff){if(_0x5172ff){return _0x5172ff[_0x739d('0x21')](_0x448eba)[_0x739d('0x22')](function(_0x34b9a2){return _0x34b9a2;});}return null;};}function removeEntity(_0x50c293,_0x100ae1){return function(_0x442dd6){if(_0x442dd6){return _0x442dd6[_0x739d('0x23')]()[_0x739d('0x22')](function(){var _0x24ed83=_0x442dd6[_0x739d('0x24')]({'plain':!![]});var _0x32b583='Projects';return db[_0x739d('0x25')][_0x739d('0x23')]({'where':{'type':_0x32b583,'resourceId':_0x24ed83['id']}})[_0x739d('0x22')](function(){return _0x442dd6;});})['then'](function(){_0x50c293[_0x739d('0x17')](0xcc)[_0x739d('0x18')]();});}};}function handleEntityNotFound(_0x5ba672,_0x14e0b4){return function(_0x166c18){if(!_0x166c18){_0x5ba672['sendStatus'](0x194);}return _0x166c18;};}function handleError(_0x54ee9c,_0x4a1208){_0x4a1208=_0x4a1208||0x1f4;return function(_0xa700bb){logger[_0x739d('0x26')](_0xa700bb['stack']);if(_0xa700bb[_0x739d('0x27')]){delete _0xa700bb[_0x739d('0x27')];}_0x54ee9c['status'](_0x4a1208)[_0x739d('0x28')](_0xa700bb);};}exports['index']=function(_0x5a615a,_0x24b701){var _0x25655b={},_0x36a098={},_0x2bc8ce={'count':0x0,'rows':[]};var _0x598578=_[_0x739d('0x29')](db[_0x739d('0x2a')][_0x739d('0x2b')],function(_0x124b8f){return{'name':_0x124b8f[_0x739d('0x2c')],'type':_0x124b8f['type'][_0x739d('0x2d')]};});_0x36a098[_0x739d('0x2e')]=_[_0x739d('0x29')](_0x598578,_0x739d('0x27'));_0x36a098[_0x739d('0x2f')]=_[_0x739d('0x30')](_0x5a615a[_0x739d('0x2f')]);_0x36a098[_0x739d('0x31')]=_[_0x739d('0x32')](_0x36a098['model'],_0x36a098[_0x739d('0x2f')]);_0x25655b[_0x739d('0x33')]=_[_0x739d('0x32')](_0x36a098['model'],qs[_0x739d('0x34')](_0x5a615a[_0x739d('0x2f')][_0x739d('0x34')]));_0x25655b[_0x739d('0x33')]=_0x25655b[_0x739d('0x33')][_0x739d('0x35')]?_0x25655b['attributes']:_0x36a098[_0x739d('0x2e')];if(!_0x5a615a['query'][_0x739d('0x36')](_0x739d('0x37'))){_0x25655b['limit']=qs[_0x739d('0x1b')](_0x5a615a[_0x739d('0x2f')]['limit']);_0x25655b['offset']=qs[_0x739d('0x1a')](_0x5a615a[_0x739d('0x2f')][_0x739d('0x1a')]);}_0x25655b[_0x739d('0x38')]=qs[_0x739d('0x39')](_0x5a615a[_0x739d('0x2f')][_0x739d('0x39')]);_0x25655b[_0x739d('0x3a')]=qs['filters'](_['pick'](_0x5a615a['query'],_0x36a098[_0x739d('0x31')]),_0x598578);if(_0x5a615a[_0x739d('0x2f')]['filter']){_0x25655b[_0x739d('0x3a')]=_[_0x739d('0x3b')](_0x25655b[_0x739d('0x3a')],{'$or':_[_0x739d('0x29')](_0x598578,function(_0x5e26e1){if(_0x5e26e1['type']!==_0x739d('0x3c')){var _0x1a7c5d={};_0x1a7c5d[_0x5e26e1[_0x739d('0x27')]]={'$like':'%'+_0x5a615a[_0x739d('0x2f')]['filter']+'%'};return _0x1a7c5d;}})});}_0x25655b=_[_0x739d('0x3b')]({},_0x25655b,_0x5a615a[_0x739d('0x3d')]);var _0x133fca={'where':_0x25655b[_0x739d('0x3a')]};return db[_0x739d('0x2a')][_0x739d('0x1d')](_0x133fca)[_0x739d('0x22')](function(_0x243949){_0x2bc8ce[_0x739d('0x1d')]=_0x243949;if(_0x5a615a[_0x739d('0x2f')][_0x739d('0x3e')]){_0x25655b['include']=[{'all':!![]}];}return db[_0x739d('0x2a')]['findAll'](_0x25655b);})[_0x739d('0x22')](function(_0x584bd0){_0x2bc8ce[_0x739d('0x3f')]=_0x584bd0;return _0x2bc8ce;})[_0x739d('0x22')](respondWithFilteredResult(_0x24b701,_0x25655b))[_0x739d('0x40')](handleError(_0x24b701,null));};exports[_0x739d('0x41')]=function(_0x3cbc82,_0x3f424c){var _0x29ef56={'raw':![],'where':{'id':_0x3cbc82[_0x739d('0x42')]['id']}},_0x171a07={};_0x171a07[_0x739d('0x2e')]=_[_0x739d('0x30')](db[_0x739d('0x2a')][_0x739d('0x2b')]);_0x171a07[_0x739d('0x2f')]=_['keys'](_0x3cbc82[_0x739d('0x2f')]);_0x171a07[_0x739d('0x31')]=_[_0x739d('0x32')](_0x171a07[_0x739d('0x2e')],_0x171a07['query']);_0x29ef56[_0x739d('0x33')]=_[_0x739d('0x32')](_0x171a07['model'],qs[_0x739d('0x34')](_0x3cbc82[_0x739d('0x2f')]['fields']));_0x29ef56[_0x739d('0x33')]=_0x29ef56[_0x739d('0x33')]['length']?_0x29ef56['attributes']:_0x171a07[_0x739d('0x2e')];if(_0x3cbc82['query'][_0x739d('0x3e')]){_0x29ef56['include']=[{'all':!![]}];}_0x29ef56=_[_0x739d('0x3b')]({},_0x29ef56,_0x3cbc82['options']);return db['JscriptyProject'][_0x739d('0x43')](_0x29ef56)[_0x739d('0x22')](handleEntityNotFound(_0x3f424c,null))['then'](respondWithResult(_0x3f424c,null))['catch'](handleError(_0x3f424c,null));};exports[_0x739d('0x44')]=function(_0x1745ee,_0x3b9d21){return db[_0x739d('0x2a')]['create'](_0x1745ee[_0x739d('0x45')],{})[_0x739d('0x22')](function(_0x1a38da){var _0x2f341d=_0x1745ee['user']['get']({'plain':!![]});if(!_0x2f341d)throw new Error(_0x739d('0x46'));if(_0x2f341d[_0x739d('0x47')]===_0x739d('0x48')){var _0x5d061d=_0x1a38da[_0x739d('0x24')]({'plain':!![]});var _0x31b2cb=_0x739d('0x49');return db[_0x739d('0x4a')][_0x739d('0x43')]({'where':{'name':_0x31b2cb,'userProfileId':_0x2f341d[_0x739d('0x4b')]},'raw':!![]})[_0x739d('0x22')](function(_0x572cd5){if(_0x572cd5&&_0x572cd5[_0x739d('0x4c')]===0x0){return db[_0x739d('0x25')][_0x739d('0x44')]({'name':_0x5d061d[_0x739d('0x27')],'resourceId':_0x5d061d['id'],'type':_0x572cd5[_0x739d('0x27')],'sectionId':_0x572cd5['id']},{})[_0x739d('0x22')](function(){return _0x1a38da;});}else{return _0x1a38da;}})['catch'](function(_0x9c2a9e){logger[_0x739d('0x26')](_0x739d('0x4d'),_0x9c2a9e);throw _0x9c2a9e;});}return _0x1a38da;})[_0x739d('0x22')](respondWithResult(_0x3b9d21,0xc9))[_0x739d('0x40')](handleError(_0x3b9d21,null));};exports[_0x739d('0x4e')]=function(_0x425bb3,_0x26a627){var _0x48eff0={'where':{'id':_0x425bb3[_0x739d('0x42')]['id']}},_0x1b24ea={};_0x1b24ea['model']=_[_0x739d('0x30')](db[_0x739d('0x2a')]['rawAttributes']);_0x48eff0['attributes']=_[_0x739d('0x32')](_0x1b24ea[_0x739d('0x2e')],qs['fields'](_0x425bb3[_0x739d('0x2f')][_0x739d('0x34')]));_0x48eff0[_0x739d('0x33')]=_0x48eff0[_0x739d('0x33')][_0x739d('0x35')]?_0x48eff0['attributes']:_0x1b24ea['model'];if(_0x425bb3[_0x739d('0x2f')]['includeAll']){_0x48eff0[_0x739d('0x4f')]=[{'all':!![]}];}_0x48eff0=_[_0x739d('0x3b')]({},_0x48eff0,_0x425bb3['options']);return db['JscriptyProject'][_0x739d('0x43')](_0x48eff0)['then'](handleEntityNotFound(_0x26a627,null))[_0x739d('0x22')](function(_0x481128){if(_0x481128){var _0x1bf5e3=_0x481128[_0x739d('0x24')]({'plain':!![]});_0x1bf5e3=qs[_0x739d('0x50')](_0x1bf5e3,['id',_0x739d('0x51'),_0x739d('0x52')]);_0x425bb3[_0x739d('0x45')]=_['omit'](_0x425bb3[_0x739d('0x45')],['id',_0x739d('0x51'),_0x739d('0x52')]);return db[_0x739d('0x2a')]['create'](_[_0x739d('0x3b')](_0x1bf5e3,_0x425bb3[_0x739d('0x45')]),{'include':_0x425bb3[_0x739d('0x2f')][_0x739d('0x3e')]?[{'all':!![]}]:undefined})['then'](function(_0x5a1db4){var _0x27110c=_0x425bb3[_0x739d('0x48')][_0x739d('0x24')]({'plain':!![]});if(!_0x27110c)throw new Error(_0x739d('0x46'));if(_0x27110c[_0x739d('0x47')]===_0x739d('0x48')){var _0x1b7c1f=_0x5a1db4[_0x739d('0x24')]({'plain':!![]});var _0x5a2e46='Projects';return db['UserProfileSection'][_0x739d('0x43')]({'where':{'name':_0x5a2e46,'userProfileId':_0x27110c['userProfileId']},'raw':!![]})[_0x739d('0x22')](function(_0x17f158){if(_0x17f158&&_0x17f158['autoAssociation']===0x0){return db['UserProfileResource'][_0x739d('0x44')]({'name':_0x1b7c1f['name'],'resourceId':_0x1b7c1f['id'],'type':_0x17f158['name'],'sectionId':_0x17f158['id']},{})['then'](function(){return _0x5a1db4;});}else{return _0x5a1db4;}})[_0x739d('0x40')](function(_0x3a9cee){logger['error'](_0x739d('0x4d'),_0x3a9cee);throw _0x3a9cee;});}return _0x5a1db4;});}})[_0x739d('0x22')](respondWithResult(_0x26a627,0xc9))[_0x739d('0x40')](handleError(_0x26a627,null));};exports[_0x739d('0x21')]=function(_0x1e5896,_0x28ff3f){if(_0x1e5896['body']['id']){delete _0x1e5896[_0x739d('0x45')]['id'];}return db[_0x739d('0x2a')]['find']({'where':{'id':_0x1e5896['params']['id']}})['then'](handleEntityNotFound(_0x28ff3f,null))[_0x739d('0x22')](saveUpdates(_0x1e5896['body'],null))[_0x739d('0x22')](respondWithResult(_0x28ff3f,null))['catch'](handleError(_0x28ff3f,null));};exports[_0x739d('0x23')]=function(_0x3d139a,_0x251b55){return db[_0x739d('0x2a')]['find']({'where':{'id':_0x3d139a[_0x739d('0x42')]['id']}})[_0x739d('0x22')](handleEntityNotFound(_0x251b55,null))[_0x739d('0x22')](removeEntity(_0x251b55,null))[_0x739d('0x40')](handleError(_0x251b55,null));};exports['getSessions']=function(_0x45b13c,_0x1b6712,_0x4561ed){var _0x15bbbd={'raw':!![],'where':{}};var _0x910e28={};var _0x3c84eb={'count':0x0,'rows':[]};return db[_0x739d('0x2a')]['findOne']({'where':{'id':_0x45b13c[_0x739d('0x42')]['id']}})[_0x739d('0x22')](handleEntityNotFound(_0x1b6712,null))[_0x739d('0x22')](function(_0x412999){if(_0x412999){_0x910e28[_0x739d('0x2e')]=_[_0x739d('0x30')](db[_0x739d('0x53')]['rawAttributes']);_0x910e28['query']=_[_0x739d('0x30')](_0x45b13c[_0x739d('0x2f')]);_0x910e28['filters']=_[_0x739d('0x32')](_0x910e28[_0x739d('0x2e')],_0x910e28[_0x739d('0x2f')]);_0x15bbbd['attributes']=_[_0x739d('0x32')](_0x910e28[_0x739d('0x2e')],qs['fields'](_0x45b13c[_0x739d('0x2f')][_0x739d('0x34')]));_0x15bbbd['attributes']=_0x15bbbd['attributes'][_0x739d('0x35')]?_0x15bbbd[_0x739d('0x33')]:_0x910e28[_0x739d('0x2e')];if(!_0x45b13c[_0x739d('0x2f')][_0x739d('0x36')]('nolimit')){_0x15bbbd[_0x739d('0x1b')]=qs[_0x739d('0x1b')](_0x45b13c[_0x739d('0x2f')][_0x739d('0x1b')]);_0x15bbbd[_0x739d('0x1a')]=qs['offset'](_0x45b13c[_0x739d('0x2f')]['offset']);}_0x15bbbd[_0x739d('0x38')]=qs[_0x739d('0x39')](_0x45b13c[_0x739d('0x2f')][_0x739d('0x39')]);_0x15bbbd[_0x739d('0x3a')]=qs['filters'](_[_0x739d('0x54')](_0x45b13c[_0x739d('0x2f')],_0x910e28[_0x739d('0x31')]));_0x15bbbd[_0x739d('0x3a')][_0x739d('0x55')]=_0x412999['id'];if(_0x45b13c[_0x739d('0x2f')][_0x739d('0x56')]){_0x15bbbd['where']=_['merge'](_0x15bbbd[_0x739d('0x3a')],{'$or':_['map'](_0x15bbbd['attributes'],function(_0x501705){var _0x56a3f5={};_0x56a3f5[_0x501705]={'$like':'%'+_0x45b13c[_0x739d('0x2f')][_0x739d('0x56')]+'%'};return _0x56a3f5;})});}_0x15bbbd=_[_0x739d('0x3b')]({},_0x15bbbd,_0x45b13c[_0x739d('0x3d')]);return db['JscriptySessionReport'][_0x739d('0x1d')]({'where':_0x15bbbd[_0x739d('0x3a')]})[_0x739d('0x22')](function(_0x17199b){_0x3c84eb[_0x739d('0x1d')]=_0x17199b;if(_0x45b13c[_0x739d('0x2f')][_0x739d('0x3e')]){_0x15bbbd[_0x739d('0x4f')]=[{'all':!![]}];}return db[_0x739d('0x53')]['findAll'](_0x15bbbd);})['then'](function(_0x2351ac){_0x3c84eb[_0x739d('0x3f')]=_0x2351ac;return _0x3c84eb;});}})[_0x739d('0x22')](respondWithFilteredResult(_0x1b6712,_0x15bbbd))[_0x739d('0x40')](handleError(_0x1b6712,null));};exports[_0x739d('0x57')]=function(_0x129b08,_0x2fd9af,_0x3116eb){var _0x31ca4e={'raw':!![],'where':{}};var _0x68db23={};var _0x208e6f={'count':0x0,'rows':[]};return db[_0x739d('0x2a')][_0x739d('0x58')]({'where':{'id':_0x129b08[_0x739d('0x42')]['id']}})[_0x739d('0x22')](handleEntityNotFound(_0x2fd9af,null))[_0x739d('0x22')](function(_0x3c0333){if(_0x3c0333){_0x68db23['model']=_[_0x739d('0x30')](db[_0x739d('0x59')][_0x739d('0x2b')]);_0x68db23[_0x739d('0x2f')]=_[_0x739d('0x30')](_0x129b08[_0x739d('0x2f')]);_0x68db23[_0x739d('0x31')]=_['intersection'](_0x68db23['model'],_0x68db23[_0x739d('0x2f')]);_0x31ca4e[_0x739d('0x33')]=_[_0x739d('0x32')](_0x68db23[_0x739d('0x2e')],qs[_0x739d('0x34')](_0x129b08[_0x739d('0x2f')][_0x739d('0x34')]));_0x31ca4e[_0x739d('0x33')]=_0x31ca4e[_0x739d('0x33')][_0x739d('0x35')]?_0x31ca4e['attributes']:_0x68db23[_0x739d('0x2e')];if(!_0x129b08[_0x739d('0x2f')][_0x739d('0x36')](_0x739d('0x37'))){_0x31ca4e['limit']=qs[_0x739d('0x1b')](_0x129b08['query']['limit']);_0x31ca4e[_0x739d('0x1a')]=qs[_0x739d('0x1a')](_0x129b08['query']['offset']);}_0x31ca4e[_0x739d('0x38')]=qs['sort'](_0x129b08[_0x739d('0x2f')][_0x739d('0x39')]);_0x31ca4e[_0x739d('0x3a')]=qs[_0x739d('0x31')](_[_0x739d('0x54')](_0x129b08[_0x739d('0x2f')],_0x68db23['filters']));_0x31ca4e[_0x739d('0x3a')][_0x739d('0x55')]=_0x3c0333['id'];if(_0x129b08[_0x739d('0x2f')][_0x739d('0x56')]){_0x31ca4e[_0x739d('0x3a')]=_[_0x739d('0x3b')](_0x31ca4e['where'],{'$or':_[_0x739d('0x29')](_0x31ca4e[_0x739d('0x33')],function(_0x43b32b){var _0x4a873f={};_0x4a873f[_0x43b32b]={'$like':'%'+_0x129b08[_0x739d('0x2f')][_0x739d('0x56')]+'%'};return _0x4a873f;})});}_0x31ca4e=_[_0x739d('0x3b')]({},_0x31ca4e,_0x129b08['options']);return db[_0x739d('0x59')][_0x739d('0x1d')]({'where':_0x31ca4e[_0x739d('0x3a')]})[_0x739d('0x22')](function(_0x361792){_0x208e6f[_0x739d('0x1d')]=_0x361792;if(_0x129b08[_0x739d('0x2f')][_0x739d('0x3e')]){_0x31ca4e[_0x739d('0x4f')]=[{'all':!![]}];}return db[_0x739d('0x59')][_0x739d('0x5a')](_0x31ca4e);})[_0x739d('0x22')](function(_0x35fb6e){_0x208e6f[_0x739d('0x3f')]=_0x35fb6e;return _0x208e6f;});}})[_0x739d('0x22')](respondWithFilteredResult(_0x2fd9af,_0x31ca4e))['catch'](handleError(_0x2fd9af,null));};function char(_0x535926){return _0x739d('0x5b')===typeof _0x535926?String[_0x739d('0x5c')][_0x739d('0x5d')](null,arguments):_0x535926;}function needsEncapsulation(_0x4dd152){return!!_0x4dd152&&(_0x4dd152[_0x739d('0x5e')]()[_0x739d('0x5f')](char(0xd))>=0x0||_0x4dd152[_0x739d('0x5e')]()[_0x739d('0x5f')](char(0xa))>=0x0||_0x4dd152[_0x739d('0x5e')]()['indexOf'](char(0x2c))>=0x0||_0x4dd152[_0x739d('0x5e')]()[_0x739d('0x5f')](char(0x22))>=0x0);}function encapsulate(_0x198b25){var _0x1d91f3=char(0x22),_0x134fc6='\x5c'+char(0x22),_0x2c3d7b=_0x198b25['toString']()[_0x739d('0x60')](new RegExp(_0x1d91f3,'g'),_0x134fc6);return _0x1d91f3+_0x2c3d7b+_0x1d91f3;}exports[_0x739d('0x61')]=function(_0x4d5fcc,_0x525700,_0x4ab3fb){var _0x34e2e0,_0x2cab06;var _0x4e15ca={'where':{'ProjectId':_0x4d5fcc[_0x739d('0x42')]['id']}};if(_0x4d5fcc[_0x739d('0x2f')][_0x739d('0x62')]){_0x4e15ca[_0x739d('0x3a')][_0x739d('0x63')]=JSON['parse'](_0x4d5fcc[_0x739d('0x2f')][_0x739d('0x62')]);}return db['JscriptySessionReport'][_0x739d('0x5a')](_0x4e15ca)['then'](handleEntityNotFound(_0x525700,null))['then'](function(_0x531b81){if(_0x531b81){_0x34e2e0=_0x531b81;return db[_0x739d('0x64')]['findAll']({'where':{'SessionId':{'$in':_[_0x739d('0x29')](_0x34e2e0,'id')},'ProjectId':_0x4d5fcc['params']['id']},'order':'-createdAt'});}})[_0x739d('0x22')](handleEntityNotFound(_0x525700,null))[_0x739d('0x22')](function(_0x42d72e){if(_0x42d72e){_0x2cab06=_0x42d72e;var _0x2268b5={};for(var _0x4e16bb=0x0,_0x3dd697=_0x2cab06[_0x739d('0x35')];_0x4e16bb<_0x3dd697;_0x4e16bb++){if(!_0x2268b5[_0x739d('0x36')](_0x2cab06[_0x4e16bb]['questionId'])){_0x2268b5[_0x2cab06[_0x4e16bb][_0x739d('0x65')]]=needsEncapsulation(_0x2cab06[_0x4e16bb][_0x739d('0x66')])?encapsulate(_0x2cab06[_0x4e16bb][_0x739d('0x66')]):_0x2cab06[_0x4e16bb][_0x739d('0x66')];}}var _0x263b59=[],_0x198b49={};for(var _0x5b4185=0x0,_0x1a0ad8=_0x34e2e0[_0x739d('0x35')];_0x5b4185<_0x1a0ad8;_0x5b4185++){_0x198b49={'ProjectId':_0x4d5fcc[_0x739d('0x42')]['id'],'SessionId':_0x34e2e0[_0x5b4185]['id'],'StartTime':moment(_0x34e2e0[_0x5b4185][_0x739d('0x63')])[_0x739d('0x67')](_0x739d('0x68'))};for(var _0x19d851=0x0,_0x288ab9=_0x2cab06[_0x739d('0x35')];_0x19d851<_0x288ab9;_0x19d851++){if(_0x2cab06[_0x19d851]['SessionId']==_0x34e2e0[_0x5b4185]['id']&&_0x2268b5[_0x739d('0x36')](_0x2cab06[_0x19d851][_0x739d('0x65')])){_0x198b49[_0x2268b5[_0x2cab06[_0x19d851][_0x739d('0x65')]]]=_0x2cab06[_0x19d851]['answer'];}}for(var _0x23139d in _0x2268b5){if(!_0x198b49[_0x739d('0x36')](_0x2268b5[_0x23139d])){_0x198b49[_0x2268b5[_0x23139d]]=null;}}_0x263b59[_0x739d('0x69')](_0x198b49);}return _0x263b59;}})['then'](function(_0x1c663e){if(!_[_0x739d('0x6a')](_0x1c663e)){var _0x334a6f=toCsv(_0x1c663e);var _0x2b1ab6=Date[_0x739d('0x6b')]();fs[_0x739d('0x6c')](util[_0x739d('0x67')](_0x739d('0x6d'),_0x4d5fcc[_0x739d('0x42')]['id'],_0x2b1ab6),_0x334a6f);_0x525700[_0x739d('0x6e')](_0x739d('0x6f'),'attachment;\x20filename='+util[_0x739d('0x67')]('Jscripty_Project_%d_Summary_%s.csv',_0x4d5fcc[_0x739d('0x42')]['id'],_0x2b1ab6));_0x525700[_0x739d('0x6e')](_0x739d('0x70'),_0x739d('0x71'));return _0x525700[_0x739d('0x72')](util[_0x739d('0x67')]('/tmp/Jscripty_Project_%d_Summary_%s.csv',_0x4d5fcc['params']['id'],_0x2b1ab6));}else{return _0x525700[_0x739d('0x16')](0xcc);}})[_0x739d('0x40')](handleError(_0x525700,null));}; \ No newline at end of file diff --git a/server/api/jscriptyProject/jscriptyProject.model.js b/server/api/jscriptyProject/jscriptyProject.model.js index 6915d3f..efee33a 100644 --- a/server/api/jscriptyProject/jscriptyProject.model.js +++ b/server/api/jscriptyProject/jscriptyProject.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbeea=['jscripty_projects','lodash','../../config/logger','api','moment','request-promise','rimraf','../../config/environment','./jscriptyProject.attributes','exports','JscriptyProject'];(function(_0xcbdfa3,_0x21c7d4){var _0x491daa=function(_0x4e56b6){while(--_0x4e56b6){_0xcbdfa3['push'](_0xcbdfa3['shift']());}};_0x491daa(++_0x21c7d4);}(_0xbeea,0xb1));var _0xabee=function(_0x500711,_0x4c69ea){_0x500711=_0x500711-0x0;var _0x30efa2=_0xbeea[_0x500711];return _0x30efa2;};'use strict';var _=require(_0xabee('0x0'));var util=require('util');var logger=require(_0xabee('0x1'))(_0xabee('0x2'));var moment=require(_0xabee('0x3'));var BPromise=require('bluebird');var rp=require(_0xabee('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xabee('0x5'));var config=require(_0xabee('0x6'));var attributes=require(_0xabee('0x7'));module[_0xabee('0x8')]=function(_0x1ea258,_0x58c9ef){return _0x1ea258['define'](_0xabee('0x9'),attributes,{'tableName':_0xabee('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x46cb=['bluebird','request-promise','path','rimraf','../../config/environment','./jscriptyProject.attributes','exports','define','JscriptyProject','jscripty_projects','api','moment'];(function(_0x34752a,_0x1e97ee){var _0x299906=function(_0x34b719){while(--_0x34b719){_0x34752a['push'](_0x34752a['shift']());}};_0x299906(++_0x1e97ee);}(_0x46cb,0xd6));var _0xb46c=function(_0x5d37d1,_0x2a8a4d){_0x5d37d1=_0x5d37d1-0x0;var _0x37683b=_0x46cb[_0x5d37d1];return _0x37683b;};'use strict';var _=require('lodash');var util=require('util');var logger=require('../../config/logger')(_0xb46c('0x0'));var moment=require(_0xb46c('0x1'));var BPromise=require(_0xb46c('0x2'));var rp=require(_0xb46c('0x3'));var fs=require('fs');var path=require(_0xb46c('0x4'));var rimraf=require(_0xb46c('0x5'));var config=require(_0xb46c('0x6'));var attributes=require(_0xb46c('0x7'));module[_0xb46c('0x8')]=function(_0xf4f306,_0x2e3704){return _0xf4f306[_0xb46c('0x9')](_0xb46c('0xa'),attributes,{'tableName':_0xb46c('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/jscriptyProject/jscriptyProject.rpc.js b/server/api/jscriptyProject/jscriptyProject.rpc.js index 47f9b2a..acfb607 100644 --- a/server/api/jscriptyProject/jscriptyProject.rpc.js +++ b/server/api/jscriptyProject/jscriptyProject.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['http','info','JscriptyProject,\x20%s,\x20%s','request\x20sent','debug','JscriptyProject,\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(_0xf79c7d,_0x204d9d){var _0x4adceb=function(_0xb726e2){while(--_0xb726e2){_0xf79c7d['push'](_0xf79c7d['shift']());}};_0x4adceb(++_0x204d9d);}(_0xa9e0,0x123));var _0x0a9e=function(_0x5037ab,_0x43209e){_0x5037ab=_0x5037ab-0x0;var _0x512adb=_0xa9e0[_0x5037ab];return _0x512adb;};'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 _0x9bde=['code','message','JscriptyProject,\x20%s,\x20%s','result','catch','util','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','debug','JscriptyProject,\x20%s,\x20%s,\x20%s','request\x20sent','error'];(function(_0x4d8bd5,_0x26e07e){var _0x3a7a03=function(_0x17f2f4){while(--_0x17f2f4){_0x4d8bd5['push'](_0x4d8bd5['shift']());}};_0x3a7a03(++_0x26e07e);}(_0x9bde,0xe1));var _0xe9bd=function(_0x372e7b,_0x2acc9b){_0x372e7b=_0x372e7b-0x0;var _0x5369d8=_0x9bde[_0x372e7b];return _0x5369d8;};'use strict';var _=require('lodash');var util=require(_0xe9bd('0x0'));var moment=require('moment');var BPromise=require(_0xe9bd('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xe9bd('0x2'));var db=require(_0xe9bd('0x3'))['db'];var utils=require(_0xe9bd('0x4'));var logger=require(_0xe9bd('0x5'))(_0xe9bd('0x6'));var config=require(_0xe9bd('0x7'));var jayson=require(_0xe9bd('0x8'));var client=jayson['client'][_0xe9bd('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x5f18fe,_0x22a438,_0xa66ae2){return new BPromise(function(_0x2d5c75,_0x3ef9e3){return client[_0xe9bd('0xa')](_0x5f18fe,_0xa66ae2)[_0xe9bd('0xb')](function(_0x439abc){logger[_0xe9bd('0xc')]('JscriptyProject,\x20%s,\x20%s',_0x22a438,'request\x20sent');logger[_0xe9bd('0xd')](_0xe9bd('0xe'),_0x22a438,_0xe9bd('0xf'),JSON['stringify'](_0x439abc));if(_0x439abc[_0xe9bd('0x10')]){if(_0x439abc[_0xe9bd('0x10')][_0xe9bd('0x11')]===0x1f4){logger[_0xe9bd('0x10')]('JscriptyProject,\x20%s,\x20%s',_0x22a438,_0x439abc[_0xe9bd('0x10')]['message']);return _0x3ef9e3(_0x439abc[_0xe9bd('0x10')][_0xe9bd('0x12')]);}logger[_0xe9bd('0x10')]('JscriptyProject,\x20%s,\x20%s',_0x22a438,_0x439abc['error'][_0xe9bd('0x12')]);return _0x2d5c75(_0x439abc[_0xe9bd('0x10')][_0xe9bd('0x12')]);}else{logger[_0xe9bd('0xc')](_0xe9bd('0x13'),_0x22a438,_0xe9bd('0xf'));_0x2d5c75(_0x439abc[_0xe9bd('0x14')]['message']);}})[_0xe9bd('0x15')](function(_0x464a1b){logger[_0xe9bd('0x10')]('JscriptyProject,\x20%s,\x20%s',_0x22a438,_0x464a1b);_0x3ef9e3(_0x464a1b);});});} \ No newline at end of file diff --git a/server/api/jscriptyQuestionReport/index.js b/server/api/jscriptyQuestionReport/index.js index 21b8890..9eb7b10 100644 --- a/server/api/jscriptyQuestionReport/index.js +++ b/server/api/jscriptyQuestionReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x06df=['util','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','./jscriptyQuestionReport.controller','get','isAuthenticated','index','/describe','describe','/:id','show','post','create','destroy','exports','multer'];(function(_0x14c257,_0x5c8cb3){var _0x14d71d=function(_0x23b7e2){while(--_0x23b7e2){_0x14c257['push'](_0x14c257['shift']());}};_0x14d71d(++_0x5c8cb3);}(_0x06df,0x1c7));var _0xf06d=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x06df[_0x20a584];return _0x4b41a8;};'use strict';var multer=require(_0xf06d('0x0'));var util=require(_0xf06d('0x1'));var path=require('path');var timeout=require(_0xf06d('0x2'));var express=require(_0xf06d('0x3'));var router=express[_0xf06d('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0xf06d('0x5'));var interaction=require(_0xf06d('0x6'));var config=require('../../config/environment');var controller=require(_0xf06d('0x7'));router[_0xf06d('0x8')]('/',auth[_0xf06d('0x9')](),controller[_0xf06d('0xa')]);router[_0xf06d('0x8')](_0xf06d('0xb'),auth['isAuthenticated'](),controller[_0xf06d('0xc')]);router['get'](_0xf06d('0xd'),auth[_0xf06d('0x9')](),controller[_0xf06d('0xe')]);router[_0xf06d('0xf')]('/',auth[_0xf06d('0x9')](),controller[_0xf06d('0x10')]);router['put'](_0xf06d('0xd'),auth[_0xf06d('0x9')](),controller['update']);router['delete'](_0xf06d('0xd'),auth['isAuthenticated'](),controller[_0xf06d('0x11')]);module[_0xf06d('0x12')]=router; \ No newline at end of file +var _0x83a1=['Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./jscriptyQuestionReport.controller','get','isAuthenticated','index','/describe','describe','show','put','/:id','update','exports','multer','util','path','connect-timeout','express'];(function(_0x4d07cc,_0x587613){var _0x42de3b=function(_0x201f78){while(--_0x201f78){_0x4d07cc['push'](_0x4d07cc['shift']());}};_0x42de3b(++_0x587613);}(_0x83a1,0x64));var _0x183a=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x83a1[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require(_0x183a('0x0'));var util=require(_0x183a('0x1'));var path=require(_0x183a('0x2'));var timeout=require(_0x183a('0x3'));var express=require(_0x183a('0x4'));var router=express[_0x183a('0x5')]();var fs_extra=require(_0x183a('0x6'));var auth=require(_0x183a('0x7'));var interaction=require(_0x183a('0x8'));var config=require(_0x183a('0x9'));var controller=require(_0x183a('0xa'));router[_0x183a('0xb')]('/',auth[_0x183a('0xc')](),controller[_0x183a('0xd')]);router['get'](_0x183a('0xe'),auth[_0x183a('0xc')](),controller[_0x183a('0xf')]);router[_0x183a('0xb')]('/:id',auth[_0x183a('0xc')](),controller[_0x183a('0x10')]);router['post']('/',auth[_0x183a('0xc')](),controller['create']);router[_0x183a('0x11')](_0x183a('0x12'),auth[_0x183a('0xc')](),controller[_0x183a('0x13')]);router['delete']('/:id',auth[_0x183a('0xc')](),controller['destroy']);module[_0x183a('0x14')]=router; \ No newline at end of file diff --git a/server/api/jscriptyQuestionReport/jscriptyQuestionReport.attributes.js b/server/api/jscriptyQuestionReport/jscriptyQuestionReport.attributes.js index b0049fd..01548af 100644 --- a/server/api/jscriptyQuestionReport/jscriptyQuestionReport.attributes.js +++ b/server/api/jscriptyQuestionReport/jscriptyQuestionReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7a54=['long','STRING','sequelize','exports','TEXT'];(function(_0x36c5b0,_0x5001da){var _0xf19333=function(_0x1e880a){while(--_0x1e880a){_0x36c5b0['push'](_0x36c5b0['shift']());}};_0xf19333(++_0x5001da);}(_0x7a54,0x106));var _0x47a5=function(_0x432ca3,_0x3c1fcf){_0x432ca3=_0x432ca3-0x0;var _0x5f5d1f=_0x7a54[_0x432ca3];return _0x5f5d1f;};'use strict';var Sequelize=require(_0x47a5('0x0'));module[_0x47a5('0x1')]={'question':{'type':Sequelize[_0x47a5('0x2')]},'answer':{'type':Sequelize['TEXT'](_0x47a5('0x3'))},'membername':{'type':Sequelize[_0x47a5('0x4')]},'projectname':{'type':Sequelize['STRING']},'queue':{'type':Sequelize[_0x47a5('0x4')]},'uniqueid':{'type':Sequelize[_0x47a5('0x4')]},'calleridname':{'type':Sequelize[_0x47a5('0x4')]},'calleridnum':{'type':Sequelize[_0x47a5('0x4')]},'questionId':{'type':Sequelize[_0x47a5('0x4')]}}; \ No newline at end of file +var _0x7a54=['long','STRING','sequelize','exports','TEXT'];(function(_0x8c43de,_0x90ff31){var _0xa6591b=function(_0x469716){while(--_0x469716){_0x8c43de['push'](_0x8c43de['shift']());}};_0xa6591b(++_0x90ff31);}(_0x7a54,0x106));var _0x47a5=function(_0x540840,_0x37858a){_0x540840=_0x540840-0x0;var _0x1135ce=_0x7a54[_0x540840];return _0x1135ce;};'use strict';var Sequelize=require(_0x47a5('0x0'));module[_0x47a5('0x1')]={'question':{'type':Sequelize[_0x47a5('0x2')]},'answer':{'type':Sequelize['TEXT'](_0x47a5('0x3'))},'membername':{'type':Sequelize[_0x47a5('0x4')]},'projectname':{'type':Sequelize['STRING']},'queue':{'type':Sequelize[_0x47a5('0x4')]},'uniqueid':{'type':Sequelize[_0x47a5('0x4')]},'calleridname':{'type':Sequelize[_0x47a5('0x4')]},'calleridnum':{'type':Sequelize[_0x47a5('0x4')]},'questionId':{'type':Sequelize[_0x47a5('0x4')]}}; \ No newline at end of file diff --git a/server/api/jscriptyQuestionReport/jscriptyQuestionReport.controller.js b/server/api/jscriptyQuestionReport/jscriptyQuestionReport.controller.js index 8d124b2..bdb75c6 100644 --- a/server/api/jscriptyQuestionReport/jscriptyQuestionReport.controller.js +++ b/server/api/jscriptyQuestionReport/jscriptyQuestionReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x62a9=['../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','undefined','limit','count','offset','set','Content-Range','apply','reject','save','update','then','destroy','error','name','send','map','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','where','pick','merge','VIRTUAL','filter','options','JscriptyQuestionReport','findAll','rows','show','params','include','find','catch','create','body','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service'];(function(_0x469b78,_0x537ed3){var _0x212d7a=function(_0x3986f5){while(--_0x3986f5){_0x469b78['push'](_0x469b78['shift']());}};_0x212d7a(++_0x537ed3);}(_0x62a9,0x8b));var _0x962a=function(_0x4c0abe,_0x4647a2){_0x4c0abe=_0x4c0abe-0x0;var _0x5dbe93=_0x62a9[_0x4c0abe];return _0x5dbe93;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x962a('0x0'));var zipdir=require(_0x962a('0x1'));var jsonpatch=require(_0x962a('0x2'));var rp=require(_0x962a('0x3'));var moment=require(_0x962a('0x4'));var BPromise=require(_0x962a('0x5'));var Mustache=require(_0x962a('0x6'));var util=require(_0x962a('0x7'));var path=require(_0x962a('0x8'));var sox=require(_0x962a('0x9'));var csv=require(_0x962a('0xa'));var ejs=require(_0x962a('0xb'));var fs=require('fs');var fs_extra=require(_0x962a('0xc'));var _=require(_0x962a('0xd'));var squel=require(_0x962a('0xe'));var crypto=require(_0x962a('0xf'));var jsforce=require(_0x962a('0x10'));var deskjs=require(_0x962a('0x11'));var toCsv=require('to-csv');var querystring=require(_0x962a('0x12'));var Papa=require(_0x962a('0x13'));var Redis=require('ioredis');var authService=require(_0x962a('0x14'));var qs=require(_0x962a('0x15'));var as=require(_0x962a('0x16'));var hardwareService=require(_0x962a('0x17'));var logger=require(_0x962a('0x18'))(_0x962a('0x19'));var utils=require('../../config/utils');var config=require(_0x962a('0x1a'));var licenseUtil=require(_0x962a('0x1b'));var db=require(_0x962a('0x1c'))['db'];function respondWithStatusCode(_0x59c031,_0x167b12){_0x167b12=_0x167b12||0xcc;return function(_0x4c0fe8){if(_0x4c0fe8){return _0x59c031[_0x962a('0x1d')](_0x167b12);}return _0x59c031[_0x962a('0x1e')](_0x167b12)[_0x962a('0x1f')]();};}function respondWithResult(_0x4aefaa,_0x27f144){_0x27f144=_0x27f144||0xc8;return function(_0x62fc1c){if(_0x62fc1c){return _0x4aefaa[_0x962a('0x1e')](_0x27f144)[_0x962a('0x20')](_0x62fc1c);}};}function respondWithFilteredResult(_0x42982a,_0x4e0a4e){return function(_0x3a7a0b){if(_0x3a7a0b){var _0x542601=typeof _0x4e0a4e['offset']===_0x962a('0x21')&&typeof _0x4e0a4e[_0x962a('0x22')]===_0x962a('0x21');var _0x2e0f82=_0x3a7a0b[_0x962a('0x23')];var _0x26f233=_0x542601?0x0:_0x4e0a4e[_0x962a('0x24')];var _0x567391=_0x542601?_0x3a7a0b[_0x962a('0x23')]:_0x4e0a4e[_0x962a('0x24')]+_0x4e0a4e[_0x962a('0x22')];var _0x234168;if(_0x567391>=_0x2e0f82){_0x567391=_0x2e0f82;_0x234168=0xc8;}else{_0x234168=0xce;}_0x42982a['status'](_0x234168);return _0x42982a[_0x962a('0x25')](_0x962a('0x26'),_0x26f233+'-'+_0x567391+'/'+_0x2e0f82)['json'](_0x3a7a0b);}return null;};}function patchUpdates(_0x526e28){return function(_0x360adb){try{jsonpatch[_0x962a('0x27')](_0x360adb,_0x526e28,!![]);}catch(_0x3728d1){return BPromise[_0x962a('0x28')](_0x3728d1);}return _0x360adb[_0x962a('0x29')]();};}function saveUpdates(_0x342cdd,_0x52926a){return function(_0x3c4c14){if(_0x3c4c14){return _0x3c4c14[_0x962a('0x2a')](_0x342cdd)[_0x962a('0x2b')](function(_0x1bc406){return _0x1bc406;});}return null;};}function removeEntity(_0x3f84aa,_0x2bc610){return function(_0x466d9d){if(_0x466d9d){return _0x466d9d[_0x962a('0x2c')]()[_0x962a('0x2b')](function(){_0x3f84aa[_0x962a('0x1e')](0xcc)[_0x962a('0x1f')]();});}};}function handleEntityNotFound(_0x4922f1,_0x120709){return function(_0xf5db89){if(!_0xf5db89){_0x4922f1[_0x962a('0x1d')](0x194);}return _0xf5db89;};}function handleError(_0x5c5425,_0xbf61fb){_0xbf61fb=_0xbf61fb||0x1f4;return function(_0x584056){logger[_0x962a('0x2d')](_0x584056['stack']);if(_0x584056[_0x962a('0x2e')]){delete _0x584056[_0x962a('0x2e')];}_0x5c5425[_0x962a('0x1e')](_0xbf61fb)[_0x962a('0x2f')](_0x584056);};}exports['index']=function(_0x591aeb,_0x2366f4){var _0x2bd800={},_0x1f510c={},_0x588a2b={'count':0x0,'rows':[]};var _0x2a0c3c=_[_0x962a('0x30')](db['JscriptyQuestionReport'][_0x962a('0x31')],function(_0xcfd13b){return{'name':_0xcfd13b[_0x962a('0x32')],'type':_0xcfd13b[_0x962a('0x33')][_0x962a('0x34')]};});_0x1f510c[_0x962a('0x35')]=_[_0x962a('0x30')](_0x2a0c3c,_0x962a('0x2e'));_0x1f510c[_0x962a('0x36')]=_[_0x962a('0x37')](_0x591aeb[_0x962a('0x36')]);_0x1f510c[_0x962a('0x38')]=_[_0x962a('0x39')](_0x1f510c[_0x962a('0x35')],_0x1f510c[_0x962a('0x36')]);_0x2bd800[_0x962a('0x3a')]=_[_0x962a('0x39')](_0x1f510c[_0x962a('0x35')],qs[_0x962a('0x3b')](_0x591aeb['query']['fields']));_0x2bd800['attributes']=_0x2bd800[_0x962a('0x3a')][_0x962a('0x3c')]?_0x2bd800[_0x962a('0x3a')]:_0x1f510c[_0x962a('0x35')];if(!_0x591aeb[_0x962a('0x36')][_0x962a('0x3d')](_0x962a('0x3e'))){_0x2bd800[_0x962a('0x22')]=qs['limit'](_0x591aeb[_0x962a('0x36')]['limit']);_0x2bd800[_0x962a('0x24')]=qs['offset'](_0x591aeb[_0x962a('0x36')][_0x962a('0x24')]);}_0x2bd800['order']=qs[_0x962a('0x3f')](_0x591aeb[_0x962a('0x36')]['sort']);_0x2bd800[_0x962a('0x40')]=qs[_0x962a('0x38')](_[_0x962a('0x41')](_0x591aeb[_0x962a('0x36')],_0x1f510c[_0x962a('0x38')]),_0x2a0c3c);if(_0x591aeb[_0x962a('0x36')]['filter']){_0x2bd800[_0x962a('0x40')]=_[_0x962a('0x42')](_0x2bd800[_0x962a('0x40')],{'$or':_['map'](_0x2a0c3c,function(_0x1bf669){if(_0x1bf669[_0x962a('0x33')]!==_0x962a('0x43')){var _0x42d40f={};_0x42d40f[_0x1bf669[_0x962a('0x2e')]]={'$like':'%'+_0x591aeb[_0x962a('0x36')][_0x962a('0x44')]+'%'};return _0x42d40f;}})});}_0x2bd800=_['merge']({},_0x2bd800,_0x591aeb[_0x962a('0x45')]);var _0x3f79dd={'where':_0x2bd800[_0x962a('0x40')]};return db[_0x962a('0x46')][_0x962a('0x23')](_0x3f79dd)[_0x962a('0x2b')](function(_0x3ed0c3){_0x588a2b[_0x962a('0x23')]=_0x3ed0c3;if(_0x591aeb[_0x962a('0x36')]['includeAll']){_0x2bd800['include']=[{'all':!![]}];}return db[_0x962a('0x46')][_0x962a('0x47')](_0x2bd800);})['then'](function(_0x3efcf0){_0x588a2b[_0x962a('0x48')]=_0x3efcf0;return _0x588a2b;})[_0x962a('0x2b')](respondWithFilteredResult(_0x2366f4,_0x2bd800))['catch'](handleError(_0x2366f4,null));};exports[_0x962a('0x49')]=function(_0x1365a0,_0x56a542){var _0x1bb521={'raw':!![],'where':{'id':_0x1365a0[_0x962a('0x4a')]['id']}},_0x42422a={};_0x42422a['model']=_['keys'](db[_0x962a('0x46')][_0x962a('0x31')]);_0x42422a[_0x962a('0x36')]=_[_0x962a('0x37')](_0x1365a0[_0x962a('0x36')]);_0x42422a[_0x962a('0x38')]=_[_0x962a('0x39')](_0x42422a[_0x962a('0x35')],_0x42422a[_0x962a('0x36')]);_0x1bb521[_0x962a('0x3a')]=_[_0x962a('0x39')](_0x42422a[_0x962a('0x35')],qs[_0x962a('0x3b')](_0x1365a0['query'][_0x962a('0x3b')]));_0x1bb521[_0x962a('0x3a')]=_0x1bb521[_0x962a('0x3a')]['length']?_0x1bb521[_0x962a('0x3a')]:_0x42422a[_0x962a('0x35')];if(_0x1365a0[_0x962a('0x36')]['includeAll']){_0x1bb521[_0x962a('0x4b')]=[{'all':!![]}];}_0x1bb521=_[_0x962a('0x42')]({},_0x1bb521,_0x1365a0['options']);return db['JscriptyQuestionReport'][_0x962a('0x4c')](_0x1bb521)[_0x962a('0x2b')](handleEntityNotFound(_0x56a542,null))[_0x962a('0x2b')](respondWithResult(_0x56a542,null))[_0x962a('0x4d')](handleError(_0x56a542,null));};exports['create']=function(_0x554ba2,_0x48ad89){return db[_0x962a('0x46')][_0x962a('0x4e')](_0x554ba2[_0x962a('0x4f')],{})[_0x962a('0x2b')](respondWithResult(_0x48ad89,0xc9))[_0x962a('0x4d')](handleError(_0x48ad89,null));};exports[_0x962a('0x2a')]=function(_0x160c58,_0x12d9f8){if(_0x160c58[_0x962a('0x4f')]['id']){delete _0x160c58[_0x962a('0x4f')]['id'];}return db[_0x962a('0x46')]['find']({'where':{'id':_0x160c58[_0x962a('0x4a')]['id']}})['then'](handleEntityNotFound(_0x12d9f8,null))[_0x962a('0x2b')](saveUpdates(_0x160c58[_0x962a('0x4f')],null))[_0x962a('0x2b')](respondWithResult(_0x12d9f8,null))['catch'](handleError(_0x12d9f8,null));};exports[_0x962a('0x2c')]=function(_0x2525fb,_0x248836){return db[_0x962a('0x46')]['find']({'where':{'id':_0x2525fb[_0x962a('0x4a')]['id']}})[_0x962a('0x2b')](handleEntityNotFound(_0x248836,null))['then'](removeEntity(_0x248836,null))[_0x962a('0x4d')](handleError(_0x248836,null));};exports['describe']=function(_0x1198bb,_0x41077d){return db['JscriptyQuestionReport']['describe']()[_0x962a('0x2b')](respondWithResult(_0x41077d,null))[_0x962a('0x4d')](handleError(_0x41077d,null));}; \ No newline at end of file +var _0x7bef=['apply','reject','save','update','destroy','then','error','stack','name','send','map','JscriptyQuestionReport','fieldName','type','key','query','filters','model','attributes','intersection','fields','length','hasOwnProperty','order','sort','pick','filter','where','merge','options','include','findAll','show','params','keys','rawAttributes','includeAll','find','catch','create','body','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','ejs','fs-extra','lodash','squel','crypto','jsforce','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/license/util','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range'];(function(_0x13b02f,_0x462a53){var _0x12e9a6=function(_0x187d57){while(--_0x187d57){_0x13b02f['push'](_0x13b02f['shift']());}};_0x12e9a6(++_0x462a53);}(_0x7bef,0xc6));var _0xf7be=function(_0x233d00,_0x41a7bb){_0x233d00=_0x233d00-0x0;var _0x4296f7=_0x7bef[_0x233d00];return _0x4296f7;};'use strict';var emlformat=require(_0xf7be('0x0'));var rimraf=require(_0xf7be('0x1'));var zipdir=require(_0xf7be('0x2'));var jsonpatch=require(_0xf7be('0x3'));var rp=require(_0xf7be('0x4'));var moment=require(_0xf7be('0x5'));var BPromise=require(_0xf7be('0x6'));var Mustache=require(_0xf7be('0x7'));var util=require(_0xf7be('0x8'));var path=require('path');var sox=require('sox');var csv=require('to-csv');var ejs=require(_0xf7be('0x9'));var fs=require('fs');var fs_extra=require(_0xf7be('0xa'));var _=require(_0xf7be('0xb'));var squel=require(_0xf7be('0xc'));var crypto=require(_0xf7be('0xd'));var jsforce=require(_0xf7be('0xe'));var deskjs=require('desk.js');var toCsv=require(_0xf7be('0xf'));var querystring=require(_0xf7be('0x10'));var Papa=require(_0xf7be('0x11'));var Redis=require(_0xf7be('0x12'));var authService=require(_0xf7be('0x13'));var qs=require(_0xf7be('0x14'));var as=require(_0xf7be('0x15'));var hardwareService=require(_0xf7be('0x16'));var logger=require(_0xf7be('0x17'))(_0xf7be('0x18'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0xf7be('0x19'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x3c6f63,_0x5059d1){_0x5059d1=_0x5059d1||0xcc;return function(_0x49d362){if(_0x49d362){return _0x3c6f63[_0xf7be('0x1a')](_0x5059d1);}return _0x3c6f63[_0xf7be('0x1b')](_0x5059d1)[_0xf7be('0x1c')]();};}function respondWithResult(_0x4a0bd3,_0x5e288c){_0x5e288c=_0x5e288c||0xc8;return function(_0x2fb7bc){if(_0x2fb7bc){return _0x4a0bd3[_0xf7be('0x1b')](_0x5e288c)[_0xf7be('0x1d')](_0x2fb7bc);}};}function respondWithFilteredResult(_0x392037,_0x16558f){return function(_0x213f52){if(_0x213f52){var _0x21de27=typeof _0x16558f[_0xf7be('0x1e')]===_0xf7be('0x1f')&&typeof _0x16558f[_0xf7be('0x20')]===_0xf7be('0x1f');var _0x527aa4=_0x213f52[_0xf7be('0x21')];var _0x2404f5=_0x21de27?0x0:_0x16558f[_0xf7be('0x1e')];var _0x20bd79=_0x21de27?_0x213f52[_0xf7be('0x21')]:_0x16558f[_0xf7be('0x1e')]+_0x16558f['limit'];var _0x174bc6;if(_0x20bd79>=_0x527aa4){_0x20bd79=_0x527aa4;_0x174bc6=0xc8;}else{_0x174bc6=0xce;}_0x392037[_0xf7be('0x1b')](_0x174bc6);return _0x392037[_0xf7be('0x22')](_0xf7be('0x23'),_0x2404f5+'-'+_0x20bd79+'/'+_0x527aa4)['json'](_0x213f52);}return null;};}function patchUpdates(_0x1ad047){return function(_0x3e37cd){try{jsonpatch[_0xf7be('0x24')](_0x3e37cd,_0x1ad047,!![]);}catch(_0x2f6799){return BPromise[_0xf7be('0x25')](_0x2f6799);}return _0x3e37cd[_0xf7be('0x26')]();};}function saveUpdates(_0x1931a4,_0xc1b4e4){return function(_0x58e7f7){if(_0x58e7f7){return _0x58e7f7[_0xf7be('0x27')](_0x1931a4)['then'](function(_0x187712){return _0x187712;});}return null;};}function removeEntity(_0x385c8f,_0x1b6e7d){return function(_0x50a070){if(_0x50a070){return _0x50a070[_0xf7be('0x28')]()[_0xf7be('0x29')](function(){_0x385c8f[_0xf7be('0x1b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x4131ec,_0x6bb03a){return function(_0x498d4b){if(!_0x498d4b){_0x4131ec['sendStatus'](0x194);}return _0x498d4b;};}function handleError(_0x3627ff,_0x430dd1){_0x430dd1=_0x430dd1||0x1f4;return function(_0x5caa24){logger[_0xf7be('0x2a')](_0x5caa24[_0xf7be('0x2b')]);if(_0x5caa24[_0xf7be('0x2c')]){delete _0x5caa24[_0xf7be('0x2c')];}_0x3627ff['status'](_0x430dd1)[_0xf7be('0x2d')](_0x5caa24);};}exports['index']=function(_0x3cb061,_0x56b35d){var _0x196606={},_0xbaec35={},_0x3cd759={'count':0x0,'rows':[]};var _0x17d43c=_[_0xf7be('0x2e')](db[_0xf7be('0x2f')]['rawAttributes'],function(_0x484aa2){return{'name':_0x484aa2[_0xf7be('0x30')],'type':_0x484aa2[_0xf7be('0x31')][_0xf7be('0x32')]};});_0xbaec35['model']=_['map'](_0x17d43c,'name');_0xbaec35[_0xf7be('0x33')]=_['keys'](_0x3cb061[_0xf7be('0x33')]);_0xbaec35[_0xf7be('0x34')]=_['intersection'](_0xbaec35[_0xf7be('0x35')],_0xbaec35['query']);_0x196606[_0xf7be('0x36')]=_[_0xf7be('0x37')](_0xbaec35[_0xf7be('0x35')],qs[_0xf7be('0x38')](_0x3cb061[_0xf7be('0x33')][_0xf7be('0x38')]));_0x196606[_0xf7be('0x36')]=_0x196606[_0xf7be('0x36')][_0xf7be('0x39')]?_0x196606[_0xf7be('0x36')]:_0xbaec35['model'];if(!_0x3cb061[_0xf7be('0x33')][_0xf7be('0x3a')]('nolimit')){_0x196606[_0xf7be('0x20')]=qs[_0xf7be('0x20')](_0x3cb061[_0xf7be('0x33')][_0xf7be('0x20')]);_0x196606[_0xf7be('0x1e')]=qs[_0xf7be('0x1e')](_0x3cb061[_0xf7be('0x33')][_0xf7be('0x1e')]);}_0x196606[_0xf7be('0x3b')]=qs[_0xf7be('0x3c')](_0x3cb061[_0xf7be('0x33')][_0xf7be('0x3c')]);_0x196606['where']=qs[_0xf7be('0x34')](_[_0xf7be('0x3d')](_0x3cb061[_0xf7be('0x33')],_0xbaec35['filters']),_0x17d43c);if(_0x3cb061['query'][_0xf7be('0x3e')]){_0x196606[_0xf7be('0x3f')]=_['merge'](_0x196606[_0xf7be('0x3f')],{'$or':_[_0xf7be('0x2e')](_0x17d43c,function(_0x134ee3){if(_0x134ee3[_0xf7be('0x31')]!=='VIRTUAL'){var _0x44f6a6={};_0x44f6a6[_0x134ee3[_0xf7be('0x2c')]]={'$like':'%'+_0x3cb061[_0xf7be('0x33')][_0xf7be('0x3e')]+'%'};return _0x44f6a6;}})});}_0x196606=_[_0xf7be('0x40')]({},_0x196606,_0x3cb061[_0xf7be('0x41')]);var _0x3f9191={'where':_0x196606[_0xf7be('0x3f')]};return db[_0xf7be('0x2f')][_0xf7be('0x21')](_0x3f9191)[_0xf7be('0x29')](function(_0x1aaaa2){_0x3cd759[_0xf7be('0x21')]=_0x1aaaa2;if(_0x3cb061['query']['includeAll']){_0x196606[_0xf7be('0x42')]=[{'all':!![]}];}return db[_0xf7be('0x2f')][_0xf7be('0x43')](_0x196606);})[_0xf7be('0x29')](function(_0x3e1b0c){_0x3cd759['rows']=_0x3e1b0c;return _0x3cd759;})[_0xf7be('0x29')](respondWithFilteredResult(_0x56b35d,_0x196606))['catch'](handleError(_0x56b35d,null));};exports[_0xf7be('0x44')]=function(_0x24f413,_0x5c221d){var _0x9ee1cc={'raw':!![],'where':{'id':_0x24f413[_0xf7be('0x45')]['id']}},_0x292cca={};_0x292cca[_0xf7be('0x35')]=_[_0xf7be('0x46')](db[_0xf7be('0x2f')][_0xf7be('0x47')]);_0x292cca[_0xf7be('0x33')]=_[_0xf7be('0x46')](_0x24f413[_0xf7be('0x33')]);_0x292cca[_0xf7be('0x34')]=_[_0xf7be('0x37')](_0x292cca[_0xf7be('0x35')],_0x292cca[_0xf7be('0x33')]);_0x9ee1cc[_0xf7be('0x36')]=_[_0xf7be('0x37')](_0x292cca[_0xf7be('0x35')],qs['fields'](_0x24f413['query'][_0xf7be('0x38')]));_0x9ee1cc[_0xf7be('0x36')]=_0x9ee1cc['attributes'][_0xf7be('0x39')]?_0x9ee1cc[_0xf7be('0x36')]:_0x292cca[_0xf7be('0x35')];if(_0x24f413[_0xf7be('0x33')][_0xf7be('0x48')]){_0x9ee1cc['include']=[{'all':!![]}];}_0x9ee1cc=_[_0xf7be('0x40')]({},_0x9ee1cc,_0x24f413[_0xf7be('0x41')]);return db[_0xf7be('0x2f')][_0xf7be('0x49')](_0x9ee1cc)[_0xf7be('0x29')](handleEntityNotFound(_0x5c221d,null))[_0xf7be('0x29')](respondWithResult(_0x5c221d,null))[_0xf7be('0x4a')](handleError(_0x5c221d,null));};exports[_0xf7be('0x4b')]=function(_0xe4f816,_0x485bb1){return db[_0xf7be('0x2f')][_0xf7be('0x4b')](_0xe4f816[_0xf7be('0x4c')],{})['then'](respondWithResult(_0x485bb1,0xc9))[_0xf7be('0x4a')](handleError(_0x485bb1,null));};exports[_0xf7be('0x27')]=function(_0x5ac965,_0xcb2406){if(_0x5ac965[_0xf7be('0x4c')]['id']){delete _0x5ac965['body']['id'];}return db[_0xf7be('0x2f')][_0xf7be('0x49')]({'where':{'id':_0x5ac965[_0xf7be('0x45')]['id']}})[_0xf7be('0x29')](handleEntityNotFound(_0xcb2406,null))[_0xf7be('0x29')](saveUpdates(_0x5ac965[_0xf7be('0x4c')],null))[_0xf7be('0x29')](respondWithResult(_0xcb2406,null))['catch'](handleError(_0xcb2406,null));};exports[_0xf7be('0x28')]=function(_0x5cd205,_0x58256e){return db[_0xf7be('0x2f')][_0xf7be('0x49')]({'where':{'id':_0x5cd205[_0xf7be('0x45')]['id']}})[_0xf7be('0x29')](handleEntityNotFound(_0x58256e,null))[_0xf7be('0x29')](removeEntity(_0x58256e,null))['catch'](handleError(_0x58256e,null));};exports[_0xf7be('0x4d')]=function(_0x49bfec,_0x1c0ed9){return db[_0xf7be('0x2f')][_0xf7be('0x4d')]()[_0xf7be('0x29')](respondWithResult(_0x1c0ed9,null))['catch'](handleError(_0x1c0ed9,null));}; \ No newline at end of file diff --git a/server/api/jscriptyQuestionReport/jscriptyQuestionReport.model.js b/server/api/jscriptyQuestionReport/jscriptyQuestionReport.model.js index db58c93..494ff06 100644 --- a/server/api/jscriptyQuestionReport/jscriptyQuestionReport.model.js +++ b/server/api/jscriptyQuestionReport/jscriptyQuestionReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x06a4=['exports','define','report_jscripty_questions','lodash','util','api','moment','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x1deb03,_0xd05ad8){var _0x189fe7=function(_0x321225){while(--_0x321225){_0x1deb03['push'](_0x1deb03['shift']());}};_0x189fe7(++_0xd05ad8);}(_0x06a4,0x10b));var _0x406a=function(_0x14dd10,_0x4900d6){_0x14dd10=_0x14dd10-0x0;var _0x5cb641=_0x06a4[_0x14dd10];return _0x5cb641;};'use strict';var _=require(_0x406a('0x0'));var util=require(_0x406a('0x1'));var logger=require('../../config/logger')(_0x406a('0x2'));var moment=require(_0x406a('0x3'));var BPromise=require(_0x406a('0x4'));var rp=require(_0x406a('0x5'));var fs=require('fs');var path=require(_0x406a('0x6'));var rimraf=require(_0x406a('0x7'));var config=require(_0x406a('0x8'));var attributes=require('./jscriptyQuestionReport.attributes');module[_0x406a('0x9')]=function(_0x1360d8,_0x20d210){return _0x1360d8[_0x406a('0xa')]('JscriptyQuestionReport',attributes,{'tableName':_0x406a('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x915c=['define','JscriptyQuestionReport','lodash','../../config/logger','api','moment','request-promise','path','rimraf','./jscriptyQuestionReport.attributes','exports'];(function(_0x13a7ca,_0x4ebfb1){var _0x253a6d=function(_0x454d0f){while(--_0x454d0f){_0x13a7ca['push'](_0x13a7ca['shift']());}};_0x253a6d(++_0x4ebfb1);}(_0x915c,0xe9));var _0xc915=function(_0x3dea63,_0x25b3b0){_0x3dea63=_0x3dea63-0x0;var _0x5ac228=_0x915c[_0x3dea63];return _0x5ac228;};'use strict';var _=require(_0xc915('0x0'));var util=require('util');var logger=require(_0xc915('0x1'))(_0xc915('0x2'));var moment=require(_0xc915('0x3'));var BPromise=require('bluebird');var rp=require(_0xc915('0x4'));var fs=require('fs');var path=require(_0xc915('0x5'));var rimraf=require(_0xc915('0x6'));var config=require('../../config/environment');var attributes=require(_0xc915('0x7'));module[_0xc915('0x8')]=function(_0x241280,_0x17d6f2){return _0x241280[_0xc915('0x9')](_0xc915('0xa'),attributes,{'tableName':'report_jscripty_questions','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/jscriptyQuestionReport/jscriptyQuestionReport.rpc.js b/server/api/jscriptyQuestionReport/jscriptyQuestionReport.rpc.js index 309103c..3244cb4 100644 --- a/server/api/jscriptyQuestionReport/jscriptyQuestionReport.rpc.js +++ b/server/api/jscriptyQuestionReport/jscriptyQuestionReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3798=['result','catch','lodash','util','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','request','then','info','JscriptyQuestionReport,\x20%s,\x20%s','debug','request\x20sent','error','code','message'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x3798,0x7a));var _0x8379=function(_0x45fac7,_0x85fb4f){_0x45fac7=_0x45fac7-0x0;var _0x5d4759=_0x3798[_0x45fac7];return _0x5d4759;};'use strict';var _=require(_0x8379('0x0'));var util=require(_0x8379('0x1'));var moment=require(_0x8379('0x2'));var BPromise=require(_0x8379('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x8379('0x4'))['db'];var utils=require(_0x8379('0x5'));var logger=require(_0x8379('0x6'))(_0x8379('0x7'));var config=require(_0x8379('0x8'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x338b98,_0x2e7dd9,_0x42bea6){return new BPromise(function(_0x5602ee,_0x52d47f){return client[_0x8379('0x9')](_0x338b98,_0x42bea6)[_0x8379('0xa')](function(_0x13b8ef){logger[_0x8379('0xb')](_0x8379('0xc'),_0x2e7dd9,'request\x20sent');logger[_0x8379('0xd')]('JscriptyQuestionReport,\x20%s,\x20%s,\x20%s',_0x2e7dd9,_0x8379('0xe'),JSON['stringify'](_0x13b8ef));if(_0x13b8ef[_0x8379('0xf')]){if(_0x13b8ef[_0x8379('0xf')][_0x8379('0x10')]===0x1f4){logger[_0x8379('0xf')](_0x8379('0xc'),_0x2e7dd9,_0x13b8ef[_0x8379('0xf')][_0x8379('0x11')]);return _0x52d47f(_0x13b8ef[_0x8379('0xf')][_0x8379('0x11')]);}logger[_0x8379('0xf')]('JscriptyQuestionReport,\x20%s,\x20%s',_0x2e7dd9,_0x13b8ef[_0x8379('0xf')][_0x8379('0x11')]);return _0x5602ee(_0x13b8ef[_0x8379('0xf')][_0x8379('0x11')]);}else{logger['info'](_0x8379('0xc'),_0x2e7dd9,_0x8379('0xe'));_0x5602ee(_0x13b8ef[_0x8379('0x12')][_0x8379('0x11')]);}})[_0x8379('0x13')](function(_0xc20e68){logger[_0x8379('0xf')](_0x8379('0xc'),_0x2e7dd9,_0xc20e68);_0x52d47f(_0xc20e68);});});} \ No newline at end of file +var _0xd1a2=['stringify','code','error','message','result','catch','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','info','JscriptyQuestionReport,\x20%s,\x20%s','request\x20sent'];(function(_0x467488,_0x38c7ae){var _0x56107f=function(_0x4992b3){while(--_0x4992b3){_0x467488['push'](_0x467488['shift']());}};_0x56107f(++_0x38c7ae);}(_0xd1a2,0x1d4));var _0x2d1a=function(_0x40d1b8,_0x133b72){_0x40d1b8=_0x40d1b8-0x0;var _0x19b3d3=_0xd1a2[_0x40d1b8];return _0x19b3d3;};'use strict';var _=require('lodash');var util=require(_0x2d1a('0x0'));var moment=require(_0x2d1a('0x1'));var BPromise=require(_0x2d1a('0x2'));var rs=require(_0x2d1a('0x3'));var fs=require('fs');var Redis=require(_0x2d1a('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x2d1a('0x5'));var logger=require(_0x2d1a('0x6'))(_0x2d1a('0x7'));var config=require('../../config/environment');var jayson=require(_0x2d1a('0x8'));var client=jayson[_0x2d1a('0x9')][_0x2d1a('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xda2f5a,_0x1366b5,_0x2c8e5){return new BPromise(function(_0x1025ad,_0xad5201){return client[_0x2d1a('0xb')](_0xda2f5a,_0x2c8e5)[_0x2d1a('0xc')](function(_0x373a77){logger[_0x2d1a('0xd')](_0x2d1a('0xe'),_0x1366b5,_0x2d1a('0xf'));logger['debug']('JscriptyQuestionReport,\x20%s,\x20%s,\x20%s',_0x1366b5,_0x2d1a('0xf'),JSON[_0x2d1a('0x10')](_0x373a77));if(_0x373a77['error']){if(_0x373a77['error'][_0x2d1a('0x11')]===0x1f4){logger[_0x2d1a('0x12')](_0x2d1a('0xe'),_0x1366b5,_0x373a77[_0x2d1a('0x12')][_0x2d1a('0x13')]);return _0xad5201(_0x373a77[_0x2d1a('0x12')][_0x2d1a('0x13')]);}logger[_0x2d1a('0x12')](_0x2d1a('0xe'),_0x1366b5,_0x373a77[_0x2d1a('0x12')][_0x2d1a('0x13')]);return _0x1025ad(_0x373a77[_0x2d1a('0x12')]['message']);}else{logger[_0x2d1a('0xd')](_0x2d1a('0xe'),_0x1366b5,_0x2d1a('0xf'));_0x1025ad(_0x373a77[_0x2d1a('0x14')][_0x2d1a('0x13')]);}})[_0x2d1a('0x15')](function(_0x4ba414){logger[_0x2d1a('0x12')](_0x2d1a('0xe'),_0x1366b5,_0x4ba414);_0xad5201(_0x4ba414);});});} \ No newline at end of file diff --git a/server/api/jscriptySessionReport/index.js b/server/api/jscriptySessionReport/index.js index 465b83e..6b0942a 100644 --- a/server/api/jscriptySessionReport/index.js +++ b/server/api/jscriptySessionReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x720a=['get','isAuthenticated','index','/describe','/:id','show','/:id/questions','getQuestions','post','create','put','delete','destroy','exports','multer','util','connect-timeout','express','fs-extra','../../config/environment'];(function(_0x5a9b65,_0x2e41c3){var _0x50cfd9=function(_0x4d0266){while(--_0x4d0266){_0x5a9b65['push'](_0x5a9b65['shift']());}};_0x50cfd9(++_0x2e41c3);}(_0x720a,0x1c6));var _0xa720=function(_0x1206e7,_0x43310d){_0x1206e7=_0x1206e7-0x0;var _0x2367d6=_0x720a[_0x1206e7];return _0x2367d6;};'use strict';var multer=require(_0xa720('0x0'));var util=require(_0xa720('0x1'));var path=require('path');var timeout=require(_0xa720('0x2'));var express=require(_0xa720('0x3'));var router=express['Router']();var fs_extra=require(_0xa720('0x4'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0xa720('0x5'));var controller=require('./jscriptySessionReport.controller');router[_0xa720('0x6')]('/',auth[_0xa720('0x7')](),controller[_0xa720('0x8')]);router[_0xa720('0x6')](_0xa720('0x9'),auth[_0xa720('0x7')](),controller['describe']);router[_0xa720('0x6')](_0xa720('0xa'),auth['isAuthenticated'](),controller[_0xa720('0xb')]);router['get'](_0xa720('0xc'),auth[_0xa720('0x7')](),controller[_0xa720('0xd')]);router[_0xa720('0xe')]('/',auth[_0xa720('0x7')](),controller[_0xa720('0xf')]);router[_0xa720('0x10')](_0xa720('0xa'),auth[_0xa720('0x7')](),controller['update']);router[_0xa720('0x11')](_0xa720('0xa'),auth['isAuthenticated'](),controller[_0xa720('0x12')]);module[_0xa720('0x13')]=router; \ No newline at end of file +var _0x8397=['delete','destroy','multer','path','connect-timeout','express','Router','fs-extra','index','/describe','isAuthenticated','describe','/:id','show','/:id/questions','post','create','put','update'];(function(_0x2641f9,_0x26715f){var _0x585741=function(_0x2d1462){while(--_0x2d1462){_0x2641f9['push'](_0x2641f9['shift']());}};_0x585741(++_0x26715f);}(_0x8397,0x145));var _0x7839=function(_0x3a6acc,_0x4f51a1){_0x3a6acc=_0x3a6acc-0x0;var _0xeba8db=_0x8397[_0x3a6acc];return _0xeba8db;};'use strict';var multer=require(_0x7839('0x0'));var util=require('util');var path=require(_0x7839('0x1'));var timeout=require(_0x7839('0x2'));var express=require(_0x7839('0x3'));var router=express[_0x7839('0x4')]();var fs_extra=require(_0x7839('0x5'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require('./jscriptySessionReport.controller');router['get']('/',auth['isAuthenticated'](),controller[_0x7839('0x6')]);router['get'](_0x7839('0x7'),auth[_0x7839('0x8')](),controller[_0x7839('0x9')]);router['get'](_0x7839('0xa'),auth[_0x7839('0x8')](),controller[_0x7839('0xb')]);router['get'](_0x7839('0xc'),auth['isAuthenticated'](),controller['getQuestions']);router[_0x7839('0xd')]('/',auth['isAuthenticated'](),controller[_0x7839('0xe')]);router[_0x7839('0xf')]('/:id',auth[_0x7839('0x8')](),controller[_0x7839('0x10')]);router[_0x7839('0x11')](_0x7839('0xa'),auth[_0x7839('0x8')](),controller[_0x7839('0x12')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/jscriptySessionReport/jscriptySessionReport.attributes.js b/server/api/jscriptySessionReport/jscriptySessionReport.attributes.js index fe70ea6..246c758 100644 --- a/server/api/jscriptySessionReport/jscriptySessionReport.attributes.js +++ b/server/api/jscriptySessionReport/jscriptySessionReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7bd5=['STRING','BOOLEAN','moment','exports','DATE','setDataValue','format'];(function(_0x585738,_0xcab72a){var _0x2454fe=function(_0xb53a8e){while(--_0xb53a8e){_0x585738['push'](_0x585738['shift']());}};_0x2454fe(++_0xcab72a);}(_0x7bd5,0x8e));var _0x57bd=function(_0x3dd3b1,_0x4588d9){_0x3dd3b1=_0x3dd3b1-0x0;var _0x1ef554=_0x7bd5[_0x3dd3b1];return _0x1ef554;};'use strict';var moment=require(_0x57bd('0x0'));var Sequelize=require('sequelize');module[_0x57bd('0x1')]={'starttime':{'type':Sequelize[_0x57bd('0x2')],'set':function(_0x467218){this[_0x57bd('0x3')]('starttime',_0x467218);this[_0x57bd('0x3')]('endtime',moment()[_0x57bd('0x4')]('YYYY-MM-DD\x20HH:mm:ss'));}},'endtime':{'type':Sequelize[_0x57bd('0x2')]},'membername':{'type':Sequelize[_0x57bd('0x5')]},'projectname':{'type':Sequelize[_0x57bd('0x5')]},'queue':{'type':Sequelize['STRING']},'uniqueid':{'type':Sequelize[_0x57bd('0x5')]},'calleridname':{'type':Sequelize[_0x57bd('0x5')]},'calleridnum':{'type':Sequelize[_0x57bd('0x5')]},'completed':{'type':Sequelize[_0x57bd('0x6')],'defaultValue':![]}}; \ No newline at end of file +var _0xd142=['setDataValue','starttime','format','YYYY-MM-DD\x20HH:mm:ss','DATE','STRING','BOOLEAN','moment'];(function(_0x4b26b5,_0x4f71fd){var _0x4dec71=function(_0x184329){while(--_0x184329){_0x4b26b5['push'](_0x4b26b5['shift']());}};_0x4dec71(++_0x4f71fd);}(_0xd142,0x6f));var _0x2d14=function(_0x3460c9,_0x565510){_0x3460c9=_0x3460c9-0x0;var _0x1d8283=_0xd142[_0x3460c9];return _0x1d8283;};'use strict';var moment=require(_0x2d14('0x0'));var Sequelize=require('sequelize');module['exports']={'starttime':{'type':Sequelize['DATE'],'set':function(_0x2deca6){this[_0x2d14('0x1')](_0x2d14('0x2'),_0x2deca6);this[_0x2d14('0x1')]('endtime',moment()[_0x2d14('0x3')](_0x2d14('0x4')));}},'endtime':{'type':Sequelize[_0x2d14('0x5')]},'membername':{'type':Sequelize['STRING']},'projectname':{'type':Sequelize['STRING']},'queue':{'type':Sequelize['STRING']},'uniqueid':{'type':Sequelize[_0x2d14('0x6')]},'calleridname':{'type':Sequelize[_0x2d14('0x6')]},'calleridnum':{'type':Sequelize[_0x2d14('0x6')]},'completed':{'type':Sequelize[_0x2d14('0x7')],'defaultValue':![]}}; \ No newline at end of file diff --git a/server/api/jscriptySessionReport/jscriptySessionReport.controller.js b/server/api/jscriptySessionReport/jscriptySessionReport.controller.js index bc879c9..c180e45 100644 --- a/server/api/jscriptySessionReport/jscriptySessionReport.controller.js +++ b/server/api/jscriptySessionReport/jscriptySessionReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x09e7=['catch','params','create','body','find','describe','findOne','SessionId','JscriptyQuestionReport','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','path','sox','ejs','fs-extra','jsforce','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','count','Content-Range','apply','save','update','then','destroy','end','error','stack','name','index','map','JscriptySessionReport','rawAttributes','fieldName','model','keys','query','filters','intersection','fields','attributes','length','hasOwnProperty','limit','order','sort','where','pick','filter','merge','type','VIRTUAL','options','includeAll','include','findAll','rows'];(function(_0x2e9187,_0x3763f6){var _0x1fc3a8=function(_0xb30d96){while(--_0xb30d96){_0x2e9187['push'](_0x2e9187['shift']());}};_0x1fc3a8(++_0x3763f6);}(_0x09e7,0x1e3));var _0x709e=function(_0x43776a,_0x4eb74c){_0x43776a=_0x43776a-0x0;var _0x18eb8f=_0x09e7[_0x43776a];return _0x18eb8f;};'use strict';var emlformat=require(_0x709e('0x0'));var rimraf=require(_0x709e('0x1'));var zipdir=require(_0x709e('0x2'));var jsonpatch=require(_0x709e('0x3'));var rp=require(_0x709e('0x4'));var moment=require(_0x709e('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x709e('0x6'));var util=require('util');var path=require(_0x709e('0x7'));var sox=require(_0x709e('0x8'));var csv=require('to-csv');var ejs=require(_0x709e('0x9'));var fs=require('fs');var fs_extra=require(_0x709e('0xa'));var _=require('lodash');var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x709e('0xb'));var deskjs=require('desk.js');var toCsv=require(_0x709e('0xc'));var querystring=require(_0x709e('0xd'));var Papa=require(_0x709e('0xe'));var Redis=require(_0x709e('0xf'));var authService=require(_0x709e('0x10'));var qs=require(_0x709e('0x11'));var as=require(_0x709e('0x12'));var hardwareService=require(_0x709e('0x13'));var logger=require(_0x709e('0x14'))(_0x709e('0x15'));var utils=require(_0x709e('0x16'));var config=require(_0x709e('0x17'));var licenseUtil=require(_0x709e('0x18'));var db=require(_0x709e('0x19'))['db'];function respondWithStatusCode(_0x4fd515,_0x297311){_0x297311=_0x297311||0xcc;return function(_0x3c4f0e){if(_0x3c4f0e){return _0x4fd515[_0x709e('0x1a')](_0x297311);}return _0x4fd515[_0x709e('0x1b')](_0x297311)['end']();};}function respondWithResult(_0x125268,_0x1ae7ff){_0x1ae7ff=_0x1ae7ff||0xc8;return function(_0x5542d7){if(_0x5542d7){return _0x125268[_0x709e('0x1b')](_0x1ae7ff)[_0x709e('0x1c')](_0x5542d7);}};}function respondWithFilteredResult(_0x320f21,_0xd8d0ac){return function(_0x1ca7a3){if(_0x1ca7a3){var _0x403a92=typeof _0xd8d0ac[_0x709e('0x1d')]==='undefined'&&typeof _0xd8d0ac['limit']===_0x709e('0x1e');var _0x2bbd82=_0x1ca7a3[_0x709e('0x1f')];var _0x21f28f=_0x403a92?0x0:_0xd8d0ac[_0x709e('0x1d')];var _0x1630f2=_0x403a92?_0x1ca7a3['count']:_0xd8d0ac[_0x709e('0x1d')]+_0xd8d0ac['limit'];var _0x16c882;if(_0x1630f2>=_0x2bbd82){_0x1630f2=_0x2bbd82;_0x16c882=0xc8;}else{_0x16c882=0xce;}_0x320f21[_0x709e('0x1b')](_0x16c882);return _0x320f21['set'](_0x709e('0x20'),_0x21f28f+'-'+_0x1630f2+'/'+_0x2bbd82)[_0x709e('0x1c')](_0x1ca7a3);}return null;};}function patchUpdates(_0x4c9cdd){return function(_0x345422){try{jsonpatch[_0x709e('0x21')](_0x345422,_0x4c9cdd,!![]);}catch(_0x206f3d){return BPromise['reject'](_0x206f3d);}return _0x345422[_0x709e('0x22')]();};}function saveUpdates(_0x41bbd6,_0x2f8f7f){return function(_0x593dc2){if(_0x593dc2){return _0x593dc2[_0x709e('0x23')](_0x41bbd6)[_0x709e('0x24')](function(_0x4a1f4c){return _0x4a1f4c;});}return null;};}function removeEntity(_0xbf3703,_0x4ed4ed){return function(_0x5d793d){if(_0x5d793d){return _0x5d793d[_0x709e('0x25')]()[_0x709e('0x24')](function(){_0xbf3703[_0x709e('0x1b')](0xcc)[_0x709e('0x26')]();});}};}function handleEntityNotFound(_0x414ae4,_0x486ebe){return function(_0x14668c){if(!_0x14668c){_0x414ae4[_0x709e('0x1a')](0x194);}return _0x14668c;};}function handleError(_0x4efef4,_0x2cfdf5){_0x2cfdf5=_0x2cfdf5||0x1f4;return function(_0x434397){logger[_0x709e('0x27')](_0x434397[_0x709e('0x28')]);if(_0x434397[_0x709e('0x29')]){delete _0x434397[_0x709e('0x29')];}_0x4efef4[_0x709e('0x1b')](_0x2cfdf5)['send'](_0x434397);};}exports[_0x709e('0x2a')]=function(_0x6e15e9,_0x564e77){var _0x213c7c={},_0x53529d={},_0xe36da9={'count':0x0,'rows':[]};var _0x5cbb91=_[_0x709e('0x2b')](db[_0x709e('0x2c')][_0x709e('0x2d')],function(_0x42915d){return{'name':_0x42915d[_0x709e('0x2e')],'type':_0x42915d['type']['key']};});_0x53529d[_0x709e('0x2f')]=_[_0x709e('0x2b')](_0x5cbb91,'name');_0x53529d['query']=_[_0x709e('0x30')](_0x6e15e9[_0x709e('0x31')]);_0x53529d[_0x709e('0x32')]=_[_0x709e('0x33')](_0x53529d['model'],_0x53529d[_0x709e('0x31')]);_0x213c7c['attributes']=_[_0x709e('0x33')](_0x53529d['model'],qs[_0x709e('0x34')](_0x6e15e9[_0x709e('0x31')]['fields']));_0x213c7c[_0x709e('0x35')]=_0x213c7c[_0x709e('0x35')][_0x709e('0x36')]?_0x213c7c[_0x709e('0x35')]:_0x53529d[_0x709e('0x2f')];if(!_0x6e15e9[_0x709e('0x31')][_0x709e('0x37')]('nolimit')){_0x213c7c['limit']=qs[_0x709e('0x38')](_0x6e15e9[_0x709e('0x31')][_0x709e('0x38')]);_0x213c7c[_0x709e('0x1d')]=qs[_0x709e('0x1d')](_0x6e15e9[_0x709e('0x31')][_0x709e('0x1d')]);}_0x213c7c[_0x709e('0x39')]=qs[_0x709e('0x3a')](_0x6e15e9[_0x709e('0x31')]['sort']);_0x213c7c[_0x709e('0x3b')]=qs['filters'](_[_0x709e('0x3c')](_0x6e15e9[_0x709e('0x31')],_0x53529d[_0x709e('0x32')]),_0x5cbb91);if(_0x6e15e9[_0x709e('0x31')][_0x709e('0x3d')]){_0x213c7c[_0x709e('0x3b')]=_[_0x709e('0x3e')](_0x213c7c[_0x709e('0x3b')],{'$or':_[_0x709e('0x2b')](_0x5cbb91,function(_0x4aeb15){if(_0x4aeb15[_0x709e('0x3f')]!==_0x709e('0x40')){var _0x3b9e94={};_0x3b9e94[_0x4aeb15['name']]={'$like':'%'+_0x6e15e9[_0x709e('0x31')][_0x709e('0x3d')]+'%'};return _0x3b9e94;}})});}_0x213c7c=_['merge']({},_0x213c7c,_0x6e15e9[_0x709e('0x41')]);var _0x32595c={'where':_0x213c7c[_0x709e('0x3b')]};return db[_0x709e('0x2c')][_0x709e('0x1f')](_0x32595c)[_0x709e('0x24')](function(_0x5024f3){_0xe36da9[_0x709e('0x1f')]=_0x5024f3;if(_0x6e15e9[_0x709e('0x31')][_0x709e('0x42')]){_0x213c7c[_0x709e('0x43')]=[{'all':!![]}];}return db[_0x709e('0x2c')][_0x709e('0x44')](_0x213c7c);})['then'](function(_0x4b1a50){_0xe36da9[_0x709e('0x45')]=_0x4b1a50;return _0xe36da9;})[_0x709e('0x24')](respondWithFilteredResult(_0x564e77,_0x213c7c))[_0x709e('0x46')](handleError(_0x564e77,null));};exports['show']=function(_0x52b5d3,_0xe9e26b){var _0x249ba5={'raw':!![],'where':{'id':_0x52b5d3[_0x709e('0x47')]['id']}},_0xb566cd={};_0xb566cd[_0x709e('0x2f')]=_[_0x709e('0x30')](db[_0x709e('0x2c')][_0x709e('0x2d')]);_0xb566cd[_0x709e('0x31')]=_['keys'](_0x52b5d3[_0x709e('0x31')]);_0xb566cd['filters']=_['intersection'](_0xb566cd[_0x709e('0x2f')],_0xb566cd[_0x709e('0x31')]);_0x249ba5[_0x709e('0x35')]=_[_0x709e('0x33')](_0xb566cd[_0x709e('0x2f')],qs[_0x709e('0x34')](_0x52b5d3[_0x709e('0x31')][_0x709e('0x34')]));_0x249ba5['attributes']=_0x249ba5[_0x709e('0x35')][_0x709e('0x36')]?_0x249ba5['attributes']:_0xb566cd[_0x709e('0x2f')];if(_0x52b5d3[_0x709e('0x31')][_0x709e('0x42')]){_0x249ba5['include']=[{'all':!![]}];}_0x249ba5=_[_0x709e('0x3e')]({},_0x249ba5,_0x52b5d3['options']);return db[_0x709e('0x2c')]['find'](_0x249ba5)['then'](handleEntityNotFound(_0xe9e26b,null))[_0x709e('0x24')](respondWithResult(_0xe9e26b,null))[_0x709e('0x46')](handleError(_0xe9e26b,null));};exports[_0x709e('0x48')]=function(_0x53e040,_0x102a01){return db[_0x709e('0x2c')][_0x709e('0x48')](_0x53e040['body'],{})[_0x709e('0x24')](respondWithResult(_0x102a01,0xc9))[_0x709e('0x46')](handleError(_0x102a01,null));};exports[_0x709e('0x23')]=function(_0x1ebd03,_0x2e4282){if(_0x1ebd03['body']['id']){delete _0x1ebd03[_0x709e('0x49')]['id'];}return db[_0x709e('0x2c')][_0x709e('0x4a')]({'where':{'id':_0x1ebd03[_0x709e('0x47')]['id']}})[_0x709e('0x24')](handleEntityNotFound(_0x2e4282,null))[_0x709e('0x24')](saveUpdates(_0x1ebd03[_0x709e('0x49')],null))[_0x709e('0x24')](respondWithResult(_0x2e4282,null))[_0x709e('0x46')](handleError(_0x2e4282,null));};exports[_0x709e('0x25')]=function(_0x5f40cf,_0xc57504){return db[_0x709e('0x2c')][_0x709e('0x4a')]({'where':{'id':_0x5f40cf[_0x709e('0x47')]['id']}})[_0x709e('0x24')](handleEntityNotFound(_0xc57504,null))[_0x709e('0x24')](removeEntity(_0xc57504,null))[_0x709e('0x46')](handleError(_0xc57504,null));};exports[_0x709e('0x4b')]=function(_0x1b0586,_0x2491c5){return db['JscriptySessionReport'][_0x709e('0x4b')]()['then'](respondWithResult(_0x2491c5,null))['catch'](handleError(_0x2491c5,null));};exports['getQuestions']=function(_0x5e6c77,_0x46cbac,_0x58919a){var _0x2d9dd9={'raw':!![],'where':{}};var _0x461a35={};var _0x4fd73c={'count':0x0,'rows':[]};return db[_0x709e('0x2c')][_0x709e('0x4c')]({'where':{'id':_0x5e6c77[_0x709e('0x47')]['id']}})['then'](handleEntityNotFound(_0x46cbac,null))[_0x709e('0x24')](function(_0x18c38e){if(_0x18c38e){_0x461a35[_0x709e('0x2f')]=_['keys'](db['JscriptyQuestionReport'][_0x709e('0x2d')]);_0x461a35['query']=_[_0x709e('0x30')](_0x5e6c77['query']);_0x461a35[_0x709e('0x32')]=_[_0x709e('0x33')](_0x461a35[_0x709e('0x2f')],_0x461a35[_0x709e('0x31')]);_0x2d9dd9[_0x709e('0x35')]=_['intersection'](_0x461a35[_0x709e('0x2f')],qs[_0x709e('0x34')](_0x5e6c77[_0x709e('0x31')]['fields']));_0x2d9dd9['attributes']=_0x2d9dd9['attributes'][_0x709e('0x36')]?_0x2d9dd9['attributes']:_0x461a35['model'];if(!_0x5e6c77[_0x709e('0x31')][_0x709e('0x37')]('nolimit')){_0x2d9dd9[_0x709e('0x38')]=qs[_0x709e('0x38')](_0x5e6c77['query'][_0x709e('0x38')]);_0x2d9dd9[_0x709e('0x1d')]=qs[_0x709e('0x1d')](_0x5e6c77[_0x709e('0x31')]['offset']);}_0x2d9dd9['order']=qs[_0x709e('0x3a')](_0x5e6c77['query']['sort']);_0x2d9dd9['where']=qs['filters'](_['pick'](_0x5e6c77[_0x709e('0x31')],_0x461a35[_0x709e('0x32')]));_0x2d9dd9['where'][_0x709e('0x4d')]=_0x18c38e['id'];if(_0x5e6c77['query']['filter']){_0x2d9dd9[_0x709e('0x3b')]=_[_0x709e('0x3e')](_0x2d9dd9[_0x709e('0x3b')],{'$or':_[_0x709e('0x2b')](_0x2d9dd9[_0x709e('0x35')],function(_0xfb930e){var _0x20e93c={};_0x20e93c[_0xfb930e]={'$like':'%'+_0x5e6c77['query'][_0x709e('0x3d')]+'%'};return _0x20e93c;})});}_0x2d9dd9=_[_0x709e('0x3e')]({},_0x2d9dd9,_0x5e6c77[_0x709e('0x41')]);return db[_0x709e('0x4e')][_0x709e('0x1f')]({'where':_0x2d9dd9[_0x709e('0x3b')]})[_0x709e('0x24')](function(_0x4a0e14){_0x4fd73c[_0x709e('0x1f')]=_0x4a0e14;if(_0x5e6c77[_0x709e('0x31')][_0x709e('0x42')]){_0x2d9dd9[_0x709e('0x43')]=[{'all':!![]}];}return db[_0x709e('0x4e')]['findAll'](_0x2d9dd9);})[_0x709e('0x24')](function(_0x1a5b36){_0x4fd73c[_0x709e('0x45')]=_0x1a5b36;return _0x4fd73c;});}})['then'](respondWithFilteredResult(_0x46cbac,_0x2d9dd9))[_0x709e('0x46')](handleError(_0x46cbac,null));}; \ No newline at end of file +var _0x6bcf=['update','then','error','stack','name','send','index','map','rawAttributes','fieldName','model','query','keys','attributes','intersection','fields','length','hasOwnProperty','order','sort','where','filters','filter','merge','type','VIRTUAL','options','JscriptySessionReport','includeAll','include','rows','catch','params','create','body','find','destroy','getQuestions','JscriptyQuestionReport','pick','SessionId','findAll','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','util','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/parsers/qs','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end','json','offset','undefined','limit','count','status','Content-Range','apply','reject','save'];(function(_0x20d025,_0x114c8c){var _0x4578c0=function(_0x18c973){while(--_0x18c973){_0x20d025['push'](_0x20d025['shift']());}};_0x4578c0(++_0x114c8c);}(_0x6bcf,0x1f2));var _0xf6bc=function(_0x125f8b,_0x481138){_0x125f8b=_0x125f8b-0x0;var _0x15435d=_0x6bcf[_0x125f8b];return _0x15435d;};'use strict';var emlformat=require(_0xf6bc('0x0'));var rimraf=require(_0xf6bc('0x1'));var zipdir=require(_0xf6bc('0x2'));var jsonpatch=require(_0xf6bc('0x3'));var rp=require(_0xf6bc('0x4'));var moment=require(_0xf6bc('0x5'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0xf6bc('0x6'));var path=require('path');var sox=require('sox');var csv=require(_0xf6bc('0x7'));var ejs=require(_0xf6bc('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xf6bc('0x9'));var squel=require(_0xf6bc('0xa'));var crypto=require(_0xf6bc('0xb'));var jsforce=require(_0xf6bc('0xc'));var deskjs=require(_0xf6bc('0xd'));var toCsv=require('to-csv');var querystring=require(_0xf6bc('0xe'));var Papa=require(_0xf6bc('0xf'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0xf6bc('0x10'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0xf6bc('0x11'))('api');var utils=require(_0xf6bc('0x12'));var config=require(_0xf6bc('0x13'));var licenseUtil=require(_0xf6bc('0x14'));var db=require(_0xf6bc('0x15'))['db'];function respondWithStatusCode(_0x3afd9a,_0x3a4bad){_0x3a4bad=_0x3a4bad||0xcc;return function(_0x282a07){if(_0x282a07){return _0x3afd9a[_0xf6bc('0x16')](_0x3a4bad);}return _0x3afd9a['status'](_0x3a4bad)[_0xf6bc('0x17')]();};}function respondWithResult(_0x338cf6,_0x1ad886){_0x1ad886=_0x1ad886||0xc8;return function(_0x1fc4f1){if(_0x1fc4f1){return _0x338cf6['status'](_0x1ad886)[_0xf6bc('0x18')](_0x1fc4f1);}};}function respondWithFilteredResult(_0x37fcd0,_0xe7e21d){return function(_0x1d6316){if(_0x1d6316){var _0x5a14b5=typeof _0xe7e21d[_0xf6bc('0x19')]===_0xf6bc('0x1a')&&typeof _0xe7e21d[_0xf6bc('0x1b')]===_0xf6bc('0x1a');var _0x1ba0c9=_0x1d6316[_0xf6bc('0x1c')];var _0xf0a41a=_0x5a14b5?0x0:_0xe7e21d[_0xf6bc('0x19')];var _0x184f6b=_0x5a14b5?_0x1d6316[_0xf6bc('0x1c')]:_0xe7e21d[_0xf6bc('0x19')]+_0xe7e21d[_0xf6bc('0x1b')];var _0x4f8fbe;if(_0x184f6b>=_0x1ba0c9){_0x184f6b=_0x1ba0c9;_0x4f8fbe=0xc8;}else{_0x4f8fbe=0xce;}_0x37fcd0[_0xf6bc('0x1d')](_0x4f8fbe);return _0x37fcd0['set'](_0xf6bc('0x1e'),_0xf0a41a+'-'+_0x184f6b+'/'+_0x1ba0c9)[_0xf6bc('0x18')](_0x1d6316);}return null;};}function patchUpdates(_0x2e63a9){return function(_0x4aec14){try{jsonpatch[_0xf6bc('0x1f')](_0x4aec14,_0x2e63a9,!![]);}catch(_0x53d4b1){return BPromise[_0xf6bc('0x20')](_0x53d4b1);}return _0x4aec14[_0xf6bc('0x21')]();};}function saveUpdates(_0xf1abe8,_0x2196ba){return function(_0x58a0d6){if(_0x58a0d6){return _0x58a0d6[_0xf6bc('0x22')](_0xf1abe8)[_0xf6bc('0x23')](function(_0x3de237){return _0x3de237;});}return null;};}function removeEntity(_0x5da9e6,_0x2ecd31){return function(_0x318c7c){if(_0x318c7c){return _0x318c7c['destroy']()[_0xf6bc('0x23')](function(){_0x5da9e6[_0xf6bc('0x1d')](0xcc)[_0xf6bc('0x17')]();});}};}function handleEntityNotFound(_0x5a6360,_0x200898){return function(_0xe2d81e){if(!_0xe2d81e){_0x5a6360[_0xf6bc('0x16')](0x194);}return _0xe2d81e;};}function handleError(_0x36e54a,_0x106150){_0x106150=_0x106150||0x1f4;return function(_0x42d843){logger[_0xf6bc('0x24')](_0x42d843[_0xf6bc('0x25')]);if(_0x42d843[_0xf6bc('0x26')]){delete _0x42d843['name'];}_0x36e54a[_0xf6bc('0x1d')](_0x106150)[_0xf6bc('0x27')](_0x42d843);};}exports[_0xf6bc('0x28')]=function(_0x5e24db,_0x146a0b){var _0x38bd32={},_0x6bbfe1={},_0x588898={'count':0x0,'rows':[]};var _0x824ec5=_[_0xf6bc('0x29')](db['JscriptySessionReport'][_0xf6bc('0x2a')],function(_0x390fb3){return{'name':_0x390fb3[_0xf6bc('0x2b')],'type':_0x390fb3['type']['key']};});_0x6bbfe1[_0xf6bc('0x2c')]=_[_0xf6bc('0x29')](_0x824ec5,_0xf6bc('0x26'));_0x6bbfe1[_0xf6bc('0x2d')]=_[_0xf6bc('0x2e')](_0x5e24db[_0xf6bc('0x2d')]);_0x6bbfe1['filters']=_['intersection'](_0x6bbfe1['model'],_0x6bbfe1[_0xf6bc('0x2d')]);_0x38bd32[_0xf6bc('0x2f')]=_[_0xf6bc('0x30')](_0x6bbfe1[_0xf6bc('0x2c')],qs['fields'](_0x5e24db['query'][_0xf6bc('0x31')]));_0x38bd32['attributes']=_0x38bd32[_0xf6bc('0x2f')][_0xf6bc('0x32')]?_0x38bd32[_0xf6bc('0x2f')]:_0x6bbfe1[_0xf6bc('0x2c')];if(!_0x5e24db[_0xf6bc('0x2d')][_0xf6bc('0x33')]('nolimit')){_0x38bd32[_0xf6bc('0x1b')]=qs[_0xf6bc('0x1b')](_0x5e24db[_0xf6bc('0x2d')]['limit']);_0x38bd32[_0xf6bc('0x19')]=qs['offset'](_0x5e24db[_0xf6bc('0x2d')]['offset']);}_0x38bd32[_0xf6bc('0x34')]=qs[_0xf6bc('0x35')](_0x5e24db['query']['sort']);_0x38bd32[_0xf6bc('0x36')]=qs[_0xf6bc('0x37')](_['pick'](_0x5e24db[_0xf6bc('0x2d')],_0x6bbfe1[_0xf6bc('0x37')]),_0x824ec5);if(_0x5e24db[_0xf6bc('0x2d')][_0xf6bc('0x38')]){_0x38bd32['where']=_[_0xf6bc('0x39')](_0x38bd32['where'],{'$or':_[_0xf6bc('0x29')](_0x824ec5,function(_0x2440c7){if(_0x2440c7[_0xf6bc('0x3a')]!==_0xf6bc('0x3b')){var _0x369f51={};_0x369f51[_0x2440c7[_0xf6bc('0x26')]]={'$like':'%'+_0x5e24db[_0xf6bc('0x2d')][_0xf6bc('0x38')]+'%'};return _0x369f51;}})});}_0x38bd32=_[_0xf6bc('0x39')]({},_0x38bd32,_0x5e24db[_0xf6bc('0x3c')]);var _0x2672ae={'where':_0x38bd32[_0xf6bc('0x36')]};return db[_0xf6bc('0x3d')][_0xf6bc('0x1c')](_0x2672ae)[_0xf6bc('0x23')](function(_0x4d2f1c){_0x588898[_0xf6bc('0x1c')]=_0x4d2f1c;if(_0x5e24db[_0xf6bc('0x2d')][_0xf6bc('0x3e')]){_0x38bd32[_0xf6bc('0x3f')]=[{'all':!![]}];}return db[_0xf6bc('0x3d')]['findAll'](_0x38bd32);})[_0xf6bc('0x23')](function(_0x5a6607){_0x588898[_0xf6bc('0x40')]=_0x5a6607;return _0x588898;})[_0xf6bc('0x23')](respondWithFilteredResult(_0x146a0b,_0x38bd32))[_0xf6bc('0x41')](handleError(_0x146a0b,null));};exports['show']=function(_0x57bf6c,_0x4dd37f){var _0x182abb={'raw':!![],'where':{'id':_0x57bf6c[_0xf6bc('0x42')]['id']}},_0x13eef8={};_0x13eef8[_0xf6bc('0x2c')]=_[_0xf6bc('0x2e')](db[_0xf6bc('0x3d')]['rawAttributes']);_0x13eef8['query']=_[_0xf6bc('0x2e')](_0x57bf6c[_0xf6bc('0x2d')]);_0x13eef8[_0xf6bc('0x37')]=_[_0xf6bc('0x30')](_0x13eef8[_0xf6bc('0x2c')],_0x13eef8[_0xf6bc('0x2d')]);_0x182abb[_0xf6bc('0x2f')]=_[_0xf6bc('0x30')](_0x13eef8[_0xf6bc('0x2c')],qs['fields'](_0x57bf6c['query'][_0xf6bc('0x31')]));_0x182abb[_0xf6bc('0x2f')]=_0x182abb[_0xf6bc('0x2f')][_0xf6bc('0x32')]?_0x182abb['attributes']:_0x13eef8[_0xf6bc('0x2c')];if(_0x57bf6c[_0xf6bc('0x2d')][_0xf6bc('0x3e')]){_0x182abb['include']=[{'all':!![]}];}_0x182abb=_[_0xf6bc('0x39')]({},_0x182abb,_0x57bf6c[_0xf6bc('0x3c')]);return db[_0xf6bc('0x3d')]['find'](_0x182abb)[_0xf6bc('0x23')](handleEntityNotFound(_0x4dd37f,null))[_0xf6bc('0x23')](respondWithResult(_0x4dd37f,null))[_0xf6bc('0x41')](handleError(_0x4dd37f,null));};exports[_0xf6bc('0x43')]=function(_0x5975af,_0x4e1001){return db[_0xf6bc('0x3d')]['create'](_0x5975af[_0xf6bc('0x44')],{})['then'](respondWithResult(_0x4e1001,0xc9))['catch'](handleError(_0x4e1001,null));};exports[_0xf6bc('0x22')]=function(_0x41d46a,_0x5c461b){if(_0x41d46a[_0xf6bc('0x44')]['id']){delete _0x41d46a[_0xf6bc('0x44')]['id'];}return db[_0xf6bc('0x3d')][_0xf6bc('0x45')]({'where':{'id':_0x41d46a[_0xf6bc('0x42')]['id']}})['then'](handleEntityNotFound(_0x5c461b,null))['then'](saveUpdates(_0x41d46a[_0xf6bc('0x44')],null))['then'](respondWithResult(_0x5c461b,null))[_0xf6bc('0x41')](handleError(_0x5c461b,null));};exports[_0xf6bc('0x46')]=function(_0x32edb7,_0x112ff8){return db[_0xf6bc('0x3d')]['find']({'where':{'id':_0x32edb7['params']['id']}})[_0xf6bc('0x23')](handleEntityNotFound(_0x112ff8,null))[_0xf6bc('0x23')](removeEntity(_0x112ff8,null))[_0xf6bc('0x41')](handleError(_0x112ff8,null));};exports['describe']=function(_0x24d7bd,_0x981aed){return db[_0xf6bc('0x3d')]['describe']()['then'](respondWithResult(_0x981aed,null))[_0xf6bc('0x41')](handleError(_0x981aed,null));};exports[_0xf6bc('0x47')]=function(_0x5896d0,_0x291556,_0x2d2676){var _0x3bd802={'raw':!![],'where':{}};var _0x1b7c7f={};var _0x1fcc9d={'count':0x0,'rows':[]};return db[_0xf6bc('0x3d')]['findOne']({'where':{'id':_0x5896d0[_0xf6bc('0x42')]['id']}})[_0xf6bc('0x23')](handleEntityNotFound(_0x291556,null))[_0xf6bc('0x23')](function(_0x3854d4){if(_0x3854d4){_0x1b7c7f[_0xf6bc('0x2c')]=_[_0xf6bc('0x2e')](db[_0xf6bc('0x48')][_0xf6bc('0x2a')]);_0x1b7c7f[_0xf6bc('0x2d')]=_['keys'](_0x5896d0[_0xf6bc('0x2d')]);_0x1b7c7f[_0xf6bc('0x37')]=_[_0xf6bc('0x30')](_0x1b7c7f[_0xf6bc('0x2c')],_0x1b7c7f[_0xf6bc('0x2d')]);_0x3bd802[_0xf6bc('0x2f')]=_['intersection'](_0x1b7c7f[_0xf6bc('0x2c')],qs[_0xf6bc('0x31')](_0x5896d0[_0xf6bc('0x2d')]['fields']));_0x3bd802[_0xf6bc('0x2f')]=_0x3bd802['attributes']['length']?_0x3bd802[_0xf6bc('0x2f')]:_0x1b7c7f[_0xf6bc('0x2c')];if(!_0x5896d0['query'][_0xf6bc('0x33')]('nolimit')){_0x3bd802['limit']=qs[_0xf6bc('0x1b')](_0x5896d0[_0xf6bc('0x2d')][_0xf6bc('0x1b')]);_0x3bd802[_0xf6bc('0x19')]=qs[_0xf6bc('0x19')](_0x5896d0['query'][_0xf6bc('0x19')]);}_0x3bd802[_0xf6bc('0x34')]=qs[_0xf6bc('0x35')](_0x5896d0[_0xf6bc('0x2d')][_0xf6bc('0x35')]);_0x3bd802[_0xf6bc('0x36')]=qs[_0xf6bc('0x37')](_[_0xf6bc('0x49')](_0x5896d0[_0xf6bc('0x2d')],_0x1b7c7f[_0xf6bc('0x37')]));_0x3bd802[_0xf6bc('0x36')][_0xf6bc('0x4a')]=_0x3854d4['id'];if(_0x5896d0[_0xf6bc('0x2d')][_0xf6bc('0x38')]){_0x3bd802['where']=_['merge'](_0x3bd802[_0xf6bc('0x36')],{'$or':_[_0xf6bc('0x29')](_0x3bd802['attributes'],function(_0x310eb4){var _0x385730={};_0x385730[_0x310eb4]={'$like':'%'+_0x5896d0['query'][_0xf6bc('0x38')]+'%'};return _0x385730;})});}_0x3bd802=_['merge']({},_0x3bd802,_0x5896d0[_0xf6bc('0x3c')]);return db[_0xf6bc('0x48')][_0xf6bc('0x1c')]({'where':_0x3bd802[_0xf6bc('0x36')]})[_0xf6bc('0x23')](function(_0x4a2f69){_0x1fcc9d[_0xf6bc('0x1c')]=_0x4a2f69;if(_0x5896d0[_0xf6bc('0x2d')][_0xf6bc('0x3e')]){_0x3bd802[_0xf6bc('0x3f')]=[{'all':!![]}];}return db[_0xf6bc('0x48')][_0xf6bc('0x4b')](_0x3bd802);})['then'](function(_0x199577){_0x1fcc9d[_0xf6bc('0x40')]=_0x199577;return _0x1fcc9d;});}})[_0xf6bc('0x23')](respondWithFilteredResult(_0x291556,_0x3bd802))[_0xf6bc('0x41')](handleError(_0x291556,null));}; \ No newline at end of file diff --git a/server/api/jscriptySessionReport/jscriptySessionReport.model.js b/server/api/jscriptySessionReport/jscriptySessionReport.model.js index 149b43f..2509984 100644 --- a/server/api/jscriptySessionReport/jscriptySessionReport.model.js +++ b/server/api/jscriptySessionReport/jscriptySessionReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf072=['path','rimraf','./jscriptySessionReport.attributes','exports','define','JscriptySessionReport','report_jscripty_sessions','lodash','util','../../config/logger','moment','request-promise'];(function(_0x2c2ded,_0x583cab){var _0xeb160d=function(_0x459c21){while(--_0x459c21){_0x2c2ded['push'](_0x2c2ded['shift']());}};_0xeb160d(++_0x583cab);}(_0xf072,0x1cf));var _0x2f07=function(_0x2f6057,_0x1bf849){_0x2f6057=_0x2f6057-0x0;var _0x5012f7=_0xf072[_0x2f6057];return _0x5012f7;};'use strict';var _=require(_0x2f07('0x0'));var util=require(_0x2f07('0x1'));var logger=require(_0x2f07('0x2'))('api');var moment=require(_0x2f07('0x3'));var BPromise=require('bluebird');var rp=require(_0x2f07('0x4'));var fs=require('fs');var path=require(_0x2f07('0x5'));var rimraf=require(_0x2f07('0x6'));var config=require('../../config/environment');var attributes=require(_0x2f07('0x7'));module[_0x2f07('0x8')]=function(_0x3643bb,_0x2e6422){return _0x3643bb[_0x2f07('0x9')](_0x2f07('0xa'),attributes,{'tableName':_0x2f07('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x5d58=['request-promise','rimraf','../../config/environment','exports','define','report_jscripty_sessions','bluebird'];(function(_0x1ca29f,_0x318ac5){var _0x576c3b=function(_0x40caab){while(--_0x40caab){_0x1ca29f['push'](_0x1ca29f['shift']());}};_0x576c3b(++_0x318ac5);}(_0x5d58,0x187));var _0x85d5=function(_0x467aa0,_0x589b5f){_0x467aa0=_0x467aa0-0x0;var _0x158ff9=_0x5d58[_0x467aa0];return _0x158ff9;};'use strict';var _=require('lodash');var util=require('util');var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0x85d5('0x0'));var rp=require(_0x85d5('0x1'));var fs=require('fs');var path=require('path');var rimraf=require(_0x85d5('0x2'));var config=require(_0x85d5('0x3'));var attributes=require('./jscriptySessionReport.attributes');module[_0x85d5('0x4')]=function(_0x2d457a,_0x578fad){return _0x2d457a[_0x85d5('0x5')]('JscriptySessionReport',attributes,{'tableName':_0x85d5('0x6'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/jscriptySessionReport/jscriptySessionReport.rpc.js b/server/api/jscriptySessionReport/jscriptySessionReport.rpc.js index c6438e7..a2fdcce 100644 --- a/server/api/jscriptySessionReport/jscriptySessionReport.rpc.js +++ b/server/api/jscriptySessionReport/jscriptySessionReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xafc4=['error','code','message','request\x20sent','catch','lodash','moment','randomstring','ioredis','../../mysqldb','../../config/utils','jayson/promise','client','http','request','then','info','JscriptySessionReport,\x20%s,\x20%s','JscriptySessionReport,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x2a1133,_0x281ea2){var _0x2f9fcc=function(_0x5d5877){while(--_0x5d5877){_0x2a1133['push'](_0x2a1133['shift']());}};_0x2f9fcc(++_0x281ea2);}(_0xafc4,0x69));var _0x4afc=function(_0x452801,_0xbca0ed){_0x452801=_0x452801-0x0;var _0x170d34=_0xafc4[_0x452801];return _0x170d34;};'use strict';var _=require(_0x4afc('0x0'));var util=require('util');var moment=require(_0x4afc('0x1'));var BPromise=require('bluebird');var rs=require(_0x4afc('0x2'));var fs=require('fs');var Redis=require(_0x4afc('0x3'));var db=require(_0x4afc('0x4'))['db'];var utils=require(_0x4afc('0x5'));var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require(_0x4afc('0x6'));var client=jayson[_0x4afc('0x7')][_0x4afc('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x1bb281,_0xc828d9,_0xaf053d){return new BPromise(function(_0x5e1e29,_0x31e165){return client[_0x4afc('0x9')](_0x1bb281,_0xaf053d)[_0x4afc('0xa')](function(_0x1e6bf5){logger[_0x4afc('0xb')](_0x4afc('0xc'),_0xc828d9,'request\x20sent');logger['debug'](_0x4afc('0xd'),_0xc828d9,'request\x20sent',JSON[_0x4afc('0xe')](_0x1e6bf5));if(_0x1e6bf5[_0x4afc('0xf')]){if(_0x1e6bf5['error'][_0x4afc('0x10')]===0x1f4){logger[_0x4afc('0xf')](_0x4afc('0xc'),_0xc828d9,_0x1e6bf5[_0x4afc('0xf')][_0x4afc('0x11')]);return _0x31e165(_0x1e6bf5[_0x4afc('0xf')][_0x4afc('0x11')]);}logger[_0x4afc('0xf')]('JscriptySessionReport,\x20%s,\x20%s',_0xc828d9,_0x1e6bf5[_0x4afc('0xf')][_0x4afc('0x11')]);return _0x5e1e29(_0x1e6bf5[_0x4afc('0xf')][_0x4afc('0x11')]);}else{logger['info']('JscriptySessionReport,\x20%s,\x20%s',_0xc828d9,_0x4afc('0x12'));_0x5e1e29(_0x1e6bf5['result'][_0x4afc('0x11')]);}})[_0x4afc('0x13')](function(_0x2b928b){logger[_0x4afc('0xf')](_0x4afc('0xc'),_0xc828d9,_0x2b928b);_0x31e165(_0x2b928b);});});} \ No newline at end of file +var _0x5464=['info','JscriptySessionReport,\x20%s,\x20%s','debug','JscriptySessionReport,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','catch','lodash','util','moment','randomstring','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','request','then'];(function(_0x3ad947,_0xcf7f4e){var _0x1c4d2f=function(_0x18f43d){while(--_0x18f43d){_0x3ad947['push'](_0x3ad947['shift']());}};_0x1c4d2f(++_0xcf7f4e);}(_0x5464,0x15d));var _0x4546=function(_0x57fad2,_0x37b848){_0x57fad2=_0x57fad2-0x0;var _0x3c3cfb=_0x5464[_0x57fad2];return _0x3c3cfb;};'use strict';var _=require(_0x4546('0x0'));var util=require(_0x4546('0x1'));var moment=require(_0x4546('0x2'));var BPromise=require('bluebird');var rs=require(_0x4546('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x4546('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x4546('0x5'))(_0x4546('0x6'));var config=require(_0x4546('0x7'));var jayson=require(_0x4546('0x8'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x5c5e09,_0x224c7c,_0x36c875){return new BPromise(function(_0x1a76c1,_0x2e860a){return client[_0x4546('0x9')](_0x5c5e09,_0x36c875)[_0x4546('0xa')](function(_0x11d63e){logger[_0x4546('0xb')](_0x4546('0xc'),_0x224c7c,'request\x20sent');logger[_0x4546('0xd')](_0x4546('0xe'),_0x224c7c,_0x4546('0xf'),JSON['stringify'](_0x11d63e));if(_0x11d63e[_0x4546('0x10')]){if(_0x11d63e[_0x4546('0x10')][_0x4546('0x11')]===0x1f4){logger[_0x4546('0x10')]('JscriptySessionReport,\x20%s,\x20%s',_0x224c7c,_0x11d63e['error'][_0x4546('0x12')]);return _0x2e860a(_0x11d63e['error']['message']);}logger['error']('JscriptySessionReport,\x20%s,\x20%s',_0x224c7c,_0x11d63e['error']['message']);return _0x1a76c1(_0x11d63e[_0x4546('0x10')]['message']);}else{logger[_0x4546('0xb')]('JscriptySessionReport,\x20%s,\x20%s',_0x224c7c,_0x4546('0xf'));_0x1a76c1(_0x11d63e['result'][_0x4546('0x12')]);}})[_0x4546('0x13')](function(_0x24b32a){logger[_0x4546('0x10')](_0x4546('0xc'),_0x224c7c,_0x24b32a);_0x2e860a(_0x24b32a);});});} \ No newline at end of file diff --git a/server/api/license/index.js b/server/api/license/index.js index 390d1bc..3c0d62f 100644 --- a/server/api/license/index.js +++ b/server/api/license/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xdfe7=['index','put','/:id','isAuthenticated','exports','util','path','express','Router','fs-extra','../../components/auth/service','../../config/environment','./license.controller'];(function(_0xbe1f7a,_0x5a340b){var _0x360577=function(_0x23815c){while(--_0x23815c){_0xbe1f7a['push'](_0xbe1f7a['shift']());}};_0x360577(++_0x5a340b);}(_0xdfe7,0xc8));var _0x7dfe=function(_0x335615,_0x4fb4fa){_0x335615=_0x335615-0x0;var _0x1a05e7=_0xdfe7[_0x335615];return _0x1a05e7;};'use strict';var multer=require('multer');var util=require(_0x7dfe('0x0'));var path=require(_0x7dfe('0x1'));var timeout=require('connect-timeout');var express=require(_0x7dfe('0x2'));var router=express[_0x7dfe('0x3')]();var fs_extra=require(_0x7dfe('0x4'));var auth=require(_0x7dfe('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x7dfe('0x6'));var controller=require(_0x7dfe('0x7'));router['get']('/',controller[_0x7dfe('0x8')]);router[_0x7dfe('0x9')](_0x7dfe('0xa'),auth[_0x7dfe('0xb')](),controller['update']);module[_0x7dfe('0xc')]=router; \ No newline at end of file +var _0x078c=['../../components/auth/service','../../components/interaction/service','./license.controller','get','index','put','/:id','isAuthenticated','update','exports','multer','path','connect-timeout','Router','fs-extra'];(function(_0x258b93,_0x188ccc){var _0x35484b=function(_0x2563ea){while(--_0x2563ea){_0x258b93['push'](_0x258b93['shift']());}};_0x35484b(++_0x188ccc);}(_0x078c,0x19f));var _0xc078=function(_0x5037ab,_0x43209e){_0x5037ab=_0x5037ab-0x0;var _0x512adb=_0x078c[_0x5037ab];return _0x512adb;};'use strict';var multer=require(_0xc078('0x0'));var util=require('util');var path=require(_0xc078('0x1'));var timeout=require(_0xc078('0x2'));var express=require('express');var router=express[_0xc078('0x3')]();var fs_extra=require(_0xc078('0x4'));var auth=require(_0xc078('0x5'));var interaction=require(_0xc078('0x6'));var config=require('../../config/environment');var controller=require(_0xc078('0x7'));router[_0xc078('0x8')]('/',controller[_0xc078('0x9')]);router[_0xc078('0xa')](_0xc078('0xb'),auth[_0xc078('0xc')](),controller[_0xc078('0xd')]);module[_0xc078('0xe')]=router; \ No newline at end of file diff --git a/server/api/license/license.attributes.js b/server/api/license/license.attributes.js index 66f0d70..3a55a87 100644 --- a/server/api/license/license.attributes.js +++ b/server/api/license/license.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6e08=['sequelize','TEXT','STRING','INTEGER'];(function(_0x284807,_0x4be925){var _0x50c774=function(_0xf56cf7){while(--_0xf56cf7){_0x284807['push'](_0x284807['shift']());}};_0x50c774(++_0x4be925);}(_0x6e08,0x160));var _0x86e0=function(_0x9d73ab,_0x1817de){_0x9d73ab=_0x9d73ab-0x0;var _0x1df342=_0x6e08[_0x9d73ab];return _0x1df342;};'use strict';var Sequelize=require(_0x86e0('0x0'));module['exports']={'license':{'type':Sequelize[_0x86e0('0x1')]},'data1':{'type':Sequelize[_0x86e0('0x2')]},'data2':{'type':Sequelize[_0x86e0('0x2')]},'chatLicenseExceeded':{'type':Sequelize[_0x86e0('0x3')],'defaultValue':0x0}}; \ No newline at end of file +var _0xa40a=['STRING','sequelize','exports','TEXT'];(function(_0x5db46f,_0xcaea39){var _0x14bbfb=function(_0x48f6fa){while(--_0x48f6fa){_0x5db46f['push'](_0x5db46f['shift']());}};_0x14bbfb(++_0xcaea39);}(_0xa40a,0x1d9));var _0xaa40=function(_0x2e6cfd,_0x15e71c){_0x2e6cfd=_0x2e6cfd-0x0;var _0x32309c=_0xa40a[_0x2e6cfd];return _0x32309c;};'use strict';var Sequelize=require(_0xaa40('0x0'));module[_0xaa40('0x1')]={'license':{'type':Sequelize[_0xaa40('0x2')]},'data1':{'type':Sequelize[_0xaa40('0x3')]},'data2':{'type':Sequelize[_0xaa40('0x3')]},'chatLicenseExceeded':{'type':Sequelize['INTEGER'],'defaultValue':0x0}}; \ No newline at end of file diff --git a/server/api/license/license.controller.js b/server/api/license/license.controller.js index 2e6526d..af82a97 100644 --- a/server/api/license/license.controller.js +++ b/server/api/license/license.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf494=['fields','length','merge','options','getLicense','body','License','find','params','get','key','demo','catch','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','undefined','limit','count','set','apply','save','update','then','error','stack','name','../../config/license/util','index','model','rawAttributes','query','keys','filters','intersection','attributes'];(function(_0xa1e3e3,_0x29fe0e){var _0xc980e9=function(_0x1f5adc){while(--_0x1f5adc){_0xa1e3e3['push'](_0xa1e3e3['shift']());}};_0xc980e9(++_0x29fe0e);}(_0xf494,0x1c6));var _0x4f49=function(_0x4c0db6,_0x19bba6){_0x4c0db6=_0x4c0db6-0x0;var _0x4b2c33=_0xf494[_0x4c0db6];return _0x4b2c33;};'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'];function respondWithStatusCode(_0x12527d,_0x4bf89f){_0x4bf89f=_0x4bf89f||0xcc;return function(_0x1e1c37){if(_0x1e1c37){return _0x12527d[_0x4f49('0x19')](_0x4bf89f);}return _0x12527d[_0x4f49('0x1a')](_0x4bf89f)[_0x4f49('0x1b')]();};}function respondWithResult(_0x1a0f1e,_0x2f0131){_0x2f0131=_0x2f0131||0xc8;return function(_0xfdb477){if(_0xfdb477){return _0x1a0f1e['status'](_0x2f0131)[_0x4f49('0x1c')](_0xfdb477);}};}function respondWithFilteredResult(_0x1f2d0d,_0x415e83){return function(_0x5878f4){if(_0x5878f4){var _0x5bdfaf=typeof _0x415e83[_0x4f49('0x1d')]===_0x4f49('0x1e')&&typeof _0x415e83[_0x4f49('0x1f')]==='undefined';var _0x1dccfd=_0x5878f4[_0x4f49('0x20')];var _0x4e85df=_0x5bdfaf?0x0:_0x415e83['offset'];var _0x5bb23b=_0x5bdfaf?_0x5878f4['count']:_0x415e83['offset']+_0x415e83[_0x4f49('0x1f')];var _0x1834f4;if(_0x5bb23b>=_0x1dccfd){_0x5bb23b=_0x1dccfd;_0x1834f4=0xc8;}else{_0x1834f4=0xce;}_0x1f2d0d[_0x4f49('0x1a')](_0x1834f4);return _0x1f2d0d[_0x4f49('0x21')]('Content-Range',_0x4e85df+'-'+_0x5bb23b+'/'+_0x1dccfd)[_0x4f49('0x1c')](_0x5878f4);}return null;};}function patchUpdates(_0x2aed27){return function(_0x197a49){try{jsonpatch[_0x4f49('0x22')](_0x197a49,_0x2aed27,!![]);}catch(_0xea82f8){return BPromise['reject'](_0xea82f8);}return _0x197a49[_0x4f49('0x23')]();};}function saveUpdates(_0x357446,_0x3ae590){return function(_0x53b57d){if(_0x53b57d){return _0x53b57d[_0x4f49('0x24')](_0x357446)[_0x4f49('0x25')](function(_0x32ca7b){return _0x32ca7b;});}return null;};}function removeEntity(_0x43c458,_0x9d30aa){return function(_0x36187b){if(_0x36187b){return _0x36187b['destroy']()['then'](function(){_0x43c458[_0x4f49('0x1a')](0xcc)[_0x4f49('0x1b')]();});}};}function handleEntityNotFound(_0x4fedbb,_0x408552){return function(_0x2c1519){if(!_0x2c1519){_0x4fedbb[_0x4f49('0x19')](0x194);}return _0x2c1519;};}function handleError(_0x525950,_0xc54070){_0xc54070=_0xc54070||0x1f4;return function(_0x2eed1c){logger[_0x4f49('0x26')](_0x2eed1c[_0x4f49('0x27')]);if(_0x2eed1c[_0x4f49('0x28')]){delete _0x2eed1c[_0x4f49('0x28')];}_0x525950['status'](_0xc54070)['send'](_0x2eed1c);};}var utilLicense=require(_0x4f49('0x29'));exports[_0x4f49('0x2a')]=function(_0x605c91,_0x560050){var _0x3cbfbd={'raw':!![],'where':{'id':0x1}},_0x206203={};_0x206203[_0x4f49('0x2b')]=_['keys'](db['License'][_0x4f49('0x2c')]);_0x206203[_0x4f49('0x2d')]=_[_0x4f49('0x2e')](_0x605c91['query']);_0x206203[_0x4f49('0x2f')]=_[_0x4f49('0x30')](_0x206203[_0x4f49('0x2b')],_0x206203[_0x4f49('0x2d')]);_0x3cbfbd[_0x4f49('0x31')]=_[_0x4f49('0x30')](_0x206203[_0x4f49('0x2b')],qs[_0x4f49('0x32')](_0x605c91[_0x4f49('0x2d')][_0x4f49('0x32')]));_0x3cbfbd[_0x4f49('0x31')]=_0x3cbfbd[_0x4f49('0x31')][_0x4f49('0x33')]?_0x3cbfbd[_0x4f49('0x31')]:_0x206203[_0x4f49('0x2b')];_0x3cbfbd=_[_0x4f49('0x34')]({},_0x3cbfbd,_0x605c91[_0x4f49('0x35')]);return utilLicense[_0x4f49('0x36')](_0x3cbfbd)[_0x4f49('0x25')](respondWithResult(_0x560050,null))['catch'](handleError(_0x560050,null));};exports[_0x4f49('0x24')]=function(_0x46b7ba,_0x24f568){if(_0x46b7ba[_0x4f49('0x37')]['id']){delete _0x46b7ba[_0x4f49('0x37')]['id'];}return db[_0x4f49('0x38')][_0x4f49('0x39')]({'where':{'id':_0x46b7ba[_0x4f49('0x3a')]['id']}})[_0x4f49('0x25')](handleEntityNotFound(_0x24f568,null))[_0x4f49('0x25')](function(_0x44e6a0){var _0x343365=_0x44e6a0[_0x4f49('0x3b')]({'plain':!![]});return utilLicense['checkLicense'](_0x343365,_0x46b7ba[_0x4f49('0x37')][_0x4f49('0x3c')]);})[_0x4f49('0x25')](function(_0x26014f){if(!_0x26014f[_0x4f49('0x3d')]){return saveUpdates(_0x46b7ba[_0x4f49('0x37')],null);}return _0x26014f;})[_0x4f49('0x25')](respondWithResult(_0x24f568,null))[_0x4f49('0x3e')](handleError(_0x24f568,null));}; \ No newline at end of file +var _0x326f=['sendStatus','status','end','offset','undefined','limit','count','set','Content-Range','reject','save','update','destroy','then','stack','name','send','model','keys','rawAttributes','query','filters','intersection','attributes','fields','length','options','getLicense','catch','body','License','find','checkLicense','key','demo','eml-format','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/license/util'];(function(_0x18cd5b,_0x10240b){var _0x5eaa52=function(_0x2bccad){while(--_0x2bccad){_0x18cd5b['push'](_0x18cd5b['shift']());}};_0x5eaa52(++_0x10240b);}(_0x326f,0xd1));var _0xf326=function(_0x32e9c4,_0x45c621){_0x32e9c4=_0x32e9c4-0x0;var _0x41e551=_0x326f[_0x32e9c4];return _0x41e551;};'use strict';var emlformat=require(_0xf326('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0xf326('0x1'));var rp=require(_0xf326('0x2'));var moment=require(_0xf326('0x3'));var BPromise=require(_0xf326('0x4'));var Mustache=require(_0xf326('0x5'));var util=require(_0xf326('0x6'));var path=require(_0xf326('0x7'));var sox=require(_0xf326('0x8'));var csv=require(_0xf326('0x9'));var ejs=require(_0xf326('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xf326('0xb'));var squel=require(_0xf326('0xc'));var crypto=require(_0xf326('0xd'));var jsforce=require(_0xf326('0xe'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xf326('0xf'));var Redis=require(_0xf326('0x10'));var authService=require(_0xf326('0x11'));var qs=require(_0xf326('0x12'));var as=require(_0xf326('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xf326('0x14'))('api');var utils=require(_0xf326('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0xf326('0x16'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x3162f9,_0x9ed463){_0x9ed463=_0x9ed463||0xcc;return function(_0x4b3966){if(_0x4b3966){return _0x3162f9[_0xf326('0x17')](_0x9ed463);}return _0x3162f9[_0xf326('0x18')](_0x9ed463)[_0xf326('0x19')]();};}function respondWithResult(_0x17a098,_0x5c8483){_0x5c8483=_0x5c8483||0xc8;return function(_0x45c1b6){if(_0x45c1b6){return _0x17a098['status'](_0x5c8483)['json'](_0x45c1b6);}};}function respondWithFilteredResult(_0xdf21d9,_0x11f6d2){return function(_0x1f2e5a){if(_0x1f2e5a){var _0xa63d1a=typeof _0x11f6d2[_0xf326('0x1a')]===_0xf326('0x1b')&&typeof _0x11f6d2[_0xf326('0x1c')]===_0xf326('0x1b');var _0x5a682a=_0x1f2e5a[_0xf326('0x1d')];var _0x453100=_0xa63d1a?0x0:_0x11f6d2[_0xf326('0x1a')];var _0x31ffb9=_0xa63d1a?_0x1f2e5a[_0xf326('0x1d')]:_0x11f6d2[_0xf326('0x1a')]+_0x11f6d2['limit'];var _0x4a5b6c;if(_0x31ffb9>=_0x5a682a){_0x31ffb9=_0x5a682a;_0x4a5b6c=0xc8;}else{_0x4a5b6c=0xce;}_0xdf21d9['status'](_0x4a5b6c);return _0xdf21d9[_0xf326('0x1e')](_0xf326('0x1f'),_0x453100+'-'+_0x31ffb9+'/'+_0x5a682a)['json'](_0x1f2e5a);}return null;};}function patchUpdates(_0x4cabce){return function(_0x128c68){try{jsonpatch['apply'](_0x128c68,_0x4cabce,!![]);}catch(_0x5b6d3c){return BPromise[_0xf326('0x20')](_0x5b6d3c);}return _0x128c68[_0xf326('0x21')]();};}function saveUpdates(_0x549b46,_0x5aa184){return function(_0x19b8ba){if(_0x19b8ba){return _0x19b8ba[_0xf326('0x22')](_0x549b46)['then'](function(_0x337ed5){return _0x337ed5;});}return null;};}function removeEntity(_0x1b9039,_0x43c53e){return function(_0x295752){if(_0x295752){return _0x295752[_0xf326('0x23')]()[_0xf326('0x24')](function(){_0x1b9039['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x4f31f6,_0x520d85){return function(_0x1a2c4e){if(!_0x1a2c4e){_0x4f31f6[_0xf326('0x17')](0x194);}return _0x1a2c4e;};}function handleError(_0x1ff2b5,_0x148953){_0x148953=_0x148953||0x1f4;return function(_0x410237){logger['error'](_0x410237[_0xf326('0x25')]);if(_0x410237[_0xf326('0x26')]){delete _0x410237[_0xf326('0x26')];}_0x1ff2b5['status'](_0x148953)[_0xf326('0x27')](_0x410237);};}var utilLicense=require('../../config/license/util');exports['index']=function(_0x6a8e89,_0x1ae23a){var _0x2fa28e={'raw':!![],'where':{'id':0x1}},_0x5dbe63={};_0x5dbe63[_0xf326('0x28')]=_[_0xf326('0x29')](db['License'][_0xf326('0x2a')]);_0x5dbe63[_0xf326('0x2b')]=_[_0xf326('0x29')](_0x6a8e89[_0xf326('0x2b')]);_0x5dbe63[_0xf326('0x2c')]=_[_0xf326('0x2d')](_0x5dbe63[_0xf326('0x28')],_0x5dbe63[_0xf326('0x2b')]);_0x2fa28e[_0xf326('0x2e')]=_[_0xf326('0x2d')](_0x5dbe63['model'],qs[_0xf326('0x2f')](_0x6a8e89[_0xf326('0x2b')][_0xf326('0x2f')]));_0x2fa28e['attributes']=_0x2fa28e[_0xf326('0x2e')][_0xf326('0x30')]?_0x2fa28e[_0xf326('0x2e')]:_0x5dbe63['model'];_0x2fa28e=_['merge']({},_0x2fa28e,_0x6a8e89[_0xf326('0x31')]);return utilLicense[_0xf326('0x32')](_0x2fa28e)[_0xf326('0x24')](respondWithResult(_0x1ae23a,null))[_0xf326('0x33')](handleError(_0x1ae23a,null));};exports[_0xf326('0x22')]=function(_0x2e8a64,_0x62585a){if(_0x2e8a64[_0xf326('0x34')]['id']){delete _0x2e8a64['body']['id'];}return db[_0xf326('0x35')][_0xf326('0x36')]({'where':{'id':_0x2e8a64['params']['id']}})[_0xf326('0x24')](handleEntityNotFound(_0x62585a,null))['then'](function(_0xce1cbb){var _0x481b64=_0xce1cbb['get']({'plain':!![]});return utilLicense[_0xf326('0x37')](_0x481b64,_0x2e8a64['body'][_0xf326('0x38')]);})['then'](function(_0x310dbb){if(!_0x310dbb[_0xf326('0x39')]){return saveUpdates(_0x2e8a64[_0xf326('0x34')],null);}return _0x310dbb;})['then'](respondWithResult(_0x62585a,null))[_0xf326('0x33')](handleError(_0x62585a,null));}; \ No newline at end of file diff --git a/server/api/license/license.model.js b/server/api/license/license.model.js index 3e679d1..d71af72 100644 --- a/server/api/license/license.model.js +++ b/server/api/license/license.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4a95=['./license.attributes','exports','define','License','license','util','api','moment','bluebird','request-promise','path','rimraf'];(function(_0x1d697d,_0x4ad045){var _0x216365=function(_0x2e98df){while(--_0x2e98df){_0x1d697d['push'](_0x1d697d['shift']());}};_0x216365(++_0x4ad045);}(_0x4a95,0x19d));var _0x54a9=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x4a95[_0x14add3];return _0x4a174f;};'use strict';var _=require('lodash');var util=require(_0x54a9('0x0'));var logger=require('../../config/logger')(_0x54a9('0x1'));var moment=require(_0x54a9('0x2'));var BPromise=require(_0x54a9('0x3'));var rp=require(_0x54a9('0x4'));var fs=require('fs');var path=require(_0x54a9('0x5'));var rimraf=require(_0x54a9('0x6'));var config=require('../../config/environment');var attributes=require(_0x54a9('0x7'));module[_0x54a9('0x8')]=function(_0x2e7b7f,_0x120b00){return _0x2e7b7f[_0x54a9('0x9')](_0x54a9('0xa'),attributes,{'tableName':_0x54a9('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xd9d0=['exports','define','License','lodash','util','../../config/logger','api','path','rimraf'];(function(_0x2d4218,_0x193588){var _0x55dd5e=function(_0x38ae02){while(--_0x38ae02){_0x2d4218['push'](_0x2d4218['shift']());}};_0x55dd5e(++_0x193588);}(_0xd9d0,0x11a));var _0x0d9d=function(_0x3e3c73,_0x2c8583){_0x3e3c73=_0x3e3c73-0x0;var _0x5d4cb4=_0xd9d0[_0x3e3c73];return _0x5d4cb4;};'use strict';var _=require(_0x0d9d('0x0'));var util=require(_0x0d9d('0x1'));var logger=require(_0x0d9d('0x2'))(_0x0d9d('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x0d9d('0x4'));var rimraf=require(_0x0d9d('0x5'));var config=require('../../config/environment');var attributes=require('./license.attributes');module[_0x0d9d('0x6')]=function(_0x178fe3,_0x19a692){return _0x178fe3[_0x0d9d('0x7')](_0x0d9d('0x8'),attributes,{'tableName':'license','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/license/license.rpc.js b/server/api/license/license.rpc.js index 05923ed..9a7eb46 100644 --- a/server/api/license/license.rpc.js +++ b/server/api/license/license.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8a8b=['info','request\x20sent','debug','License,\x20%s,\x20%s,\x20%s','error','License,\x20%s,\x20%s','message','result','catch','lodash','util','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then'];(function(_0x15d18f,_0x126b0e){var _0xd12bf7=function(_0x19e661){while(--_0x19e661){_0x15d18f['push'](_0x15d18f['shift']());}};_0xd12bf7(++_0x126b0e);}(_0x8a8b,0x111));var _0xb8a8=function(_0x5d7f11,_0x469aec){_0x5d7f11=_0x5d7f11-0x0;var _0xb87e3c=_0x8a8b[_0x5d7f11];return _0xb87e3c;};'use strict';var _=require(_0xb8a8('0x0'));var util=require(_0xb8a8('0x1'));var moment=require('moment');var BPromise=require(_0xb8a8('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xb8a8('0x3'));var db=require(_0xb8a8('0x4'))['db'];var utils=require(_0xb8a8('0x5'));var logger=require(_0xb8a8('0x6'))(_0xb8a8('0x7'));var config=require(_0xb8a8('0x8'));var jayson=require(_0xb8a8('0x9'));var client=jayson['client'][_0xb8a8('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x31dc66,_0x23b2e5,_0x213c4a){return new BPromise(function(_0x18f7b7,_0x333369){return client[_0xb8a8('0xb')](_0x31dc66,_0x213c4a)[_0xb8a8('0xc')](function(_0x51614a){logger[_0xb8a8('0xd')]('License,\x20%s,\x20%s',_0x23b2e5,_0xb8a8('0xe'));logger[_0xb8a8('0xf')](_0xb8a8('0x10'),_0x23b2e5,'request\x20sent',JSON['stringify'](_0x51614a));if(_0x51614a[_0xb8a8('0x11')]){if(_0x51614a[_0xb8a8('0x11')]['code']===0x1f4){logger[_0xb8a8('0x11')](_0xb8a8('0x12'),_0x23b2e5,_0x51614a[_0xb8a8('0x11')][_0xb8a8('0x13')]);return _0x333369(_0x51614a[_0xb8a8('0x11')]['message']);}logger[_0xb8a8('0x11')](_0xb8a8('0x12'),_0x23b2e5,_0x51614a[_0xb8a8('0x11')][_0xb8a8('0x13')]);return _0x18f7b7(_0x51614a[_0xb8a8('0x11')][_0xb8a8('0x13')]);}else{logger[_0xb8a8('0xd')](_0xb8a8('0x12'),_0x23b2e5,_0xb8a8('0xe'));_0x18f7b7(_0x51614a[_0xb8a8('0x14')][_0xb8a8('0x13')]);}})[_0xb8a8('0x15')](function(_0x388a44){logger[_0xb8a8('0x11')](_0xb8a8('0x12'),_0x23b2e5,_0x388a44);_0x333369(_0x388a44);});});} \ No newline at end of file +var _0x35e4=['request\x20sent','stringify','error','code','message','result','catch','util','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','info','License,\x20%s,\x20%s','debug','License,\x20%s,\x20%s,\x20%s'];(function(_0x4e71a2,_0x299d64){var _0x45e27b=function(_0x401a5f){while(--_0x401a5f){_0x4e71a2['push'](_0x4e71a2['shift']());}};_0x45e27b(++_0x299d64);}(_0x35e4,0xb7));var _0x435e=function(_0x55b9f0,_0x537789){_0x55b9f0=_0x55b9f0-0x0;var _0x16ad0c=_0x35e4[_0x55b9f0];return _0x16ad0c;};'use strict';var _=require('lodash');var util=require(_0x435e('0x0'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x435e('0x1'));var fs=require('fs');var Redis=require(_0x435e('0x2'));var db=require(_0x435e('0x3'))['db'];var utils=require(_0x435e('0x4'));var logger=require(_0x435e('0x5'))(_0x435e('0x6'));var config=require(_0x435e('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x435e('0x8')][_0x435e('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x343ae5,_0x11b36a,_0xe48de3){return new BPromise(function(_0x27a1f2,_0xeb9849){return client[_0x435e('0xa')](_0x343ae5,_0xe48de3)['then'](function(_0x1bbab9){logger[_0x435e('0xb')](_0x435e('0xc'),_0x11b36a,'request\x20sent');logger[_0x435e('0xd')](_0x435e('0xe'),_0x11b36a,_0x435e('0xf'),JSON[_0x435e('0x10')](_0x1bbab9));if(_0x1bbab9['error']){if(_0x1bbab9[_0x435e('0x11')][_0x435e('0x12')]===0x1f4){logger[_0x435e('0x11')]('License,\x20%s,\x20%s',_0x11b36a,_0x1bbab9['error']['message']);return _0xeb9849(_0x1bbab9[_0x435e('0x11')][_0x435e('0x13')]);}logger['error'](_0x435e('0xc'),_0x11b36a,_0x1bbab9[_0x435e('0x11')]['message']);return _0x27a1f2(_0x1bbab9['error']['message']);}else{logger[_0x435e('0xb')](_0x435e('0xc'),_0x11b36a,_0x435e('0xf'));_0x27a1f2(_0x1bbab9[_0x435e('0x14')]['message']);}})[_0x435e('0x15')](function(_0xadb65b){logger[_0x435e('0x11')](_0x435e('0xc'),_0x11b36a,_0xadb65b);_0xeb9849(_0xadb65b);});});} \ No newline at end of file diff --git a/server/api/mailAccount/index.js b/server/api/mailAccount/index.js index bde7153..b3237c3 100644 --- a/server/api/mailAccount/index.js +++ b/server/api/mailAccount/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x01e4=['addInteraction','addApplications','/:id/send','send','/:id/users','addAgents','put','update','delete','removeDispositions','removeAnswers','removeSmtp','destroy','removeAgents','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/describe','describe','/:id','show','/:id/dispositions','getDispositions','getAnswers','/:id/in_servers','getImap','/:id/out_servers','getSmtp','/:id/interactions','/:id/applications','getApplications','/:id/messages','getMessages','/:id/verify','verifySmtp','getAgents','post','/:id/canned_answers','create','addImap','addSmtp'];(function(_0x1622a0,_0x2b55a9){var _0x2a2308=function(_0x38d05b){while(--_0x38d05b){_0x1622a0['push'](_0x1622a0['shift']());}};_0x2a2308(++_0x2b55a9);}(_0x01e4,0x108));var _0x401e=function(_0xa587a,_0xc7ebc7){_0xa587a=_0xa587a-0x0;var _0x2af6f3=_0x01e4[_0xa587a];return _0x2af6f3;};'use strict';var multer=require(_0x401e('0x0'));var util=require(_0x401e('0x1'));var path=require(_0x401e('0x2'));var timeout=require('connect-timeout');var express=require(_0x401e('0x3'));var router=express[_0x401e('0x4')]();var fs_extra=require(_0x401e('0x5'));var auth=require(_0x401e('0x6'));var interaction=require(_0x401e('0x7'));var config=require(_0x401e('0x8'));var controller=require('./mailAccount.controller');router[_0x401e('0x9')]('/',auth[_0x401e('0xa')](),controller[_0x401e('0xb')]);router[_0x401e('0x9')](_0x401e('0xc'),auth[_0x401e('0xa')](),controller[_0x401e('0xd')]);router['get'](_0x401e('0xe'),auth[_0x401e('0xa')](),controller[_0x401e('0xf')]);router[_0x401e('0x9')](_0x401e('0x10'),auth['isAuthenticated'](),controller[_0x401e('0x11')]);router[_0x401e('0x9')]('/:id/canned_answers',auth['isAuthenticated'](),controller[_0x401e('0x12')]);router[_0x401e('0x9')](_0x401e('0x13'),auth[_0x401e('0xa')](),controller[_0x401e('0x14')]);router[_0x401e('0x9')](_0x401e('0x15'),auth[_0x401e('0xa')](),controller[_0x401e('0x16')]);router[_0x401e('0x9')](_0x401e('0x17'),auth[_0x401e('0xa')](),controller['getInteractions']);router[_0x401e('0x9')](_0x401e('0x18'),auth[_0x401e('0xa')](),controller[_0x401e('0x19')]);router[_0x401e('0x9')](_0x401e('0x1a'),auth[_0x401e('0xa')](),controller[_0x401e('0x1b')]);router[_0x401e('0x9')](_0x401e('0x1c'),auth[_0x401e('0xa')](),controller[_0x401e('0x1d')]);router[_0x401e('0x9')]('/:id/users',auth[_0x401e('0xa')](),controller[_0x401e('0x1e')]);router[_0x401e('0x1f')](_0x401e('0x10'),auth[_0x401e('0xa')](),controller['addDisposition']);router[_0x401e('0x1f')](_0x401e('0x20'),auth[_0x401e('0xa')](),controller['addAnswer']);router[_0x401e('0x1f')]('/',auth['isAuthenticated'](),controller[_0x401e('0x21')]);router[_0x401e('0x1f')](_0x401e('0x13'),auth[_0x401e('0xa')](),controller[_0x401e('0x22')]);router[_0x401e('0x1f')](_0x401e('0x15'),auth[_0x401e('0xa')](),controller[_0x401e('0x23')]);router[_0x401e('0x1f')](_0x401e('0x17'),auth[_0x401e('0xa')](),controller[_0x401e('0x24')]);router[_0x401e('0x1f')](_0x401e('0x18'),auth[_0x401e('0xa')](),controller[_0x401e('0x25')]);router['post'](_0x401e('0x26'),auth[_0x401e('0xa')](),controller[_0x401e('0x27')]);router['post'](_0x401e('0x28'),auth[_0x401e('0xa')](),controller[_0x401e('0x29')]);router[_0x401e('0x2a')]('/:id',auth[_0x401e('0xa')](),controller[_0x401e('0x2b')]);router[_0x401e('0x2c')](_0x401e('0x10'),auth[_0x401e('0xa')](),controller[_0x401e('0x2d')]);router[_0x401e('0x2c')](_0x401e('0x20'),auth[_0x401e('0xa')](),controller[_0x401e('0x2e')]);router[_0x401e('0x2c')](_0x401e('0x13'),auth['isAuthenticated'](),controller['removeImap']);router['delete'](_0x401e('0x15'),auth[_0x401e('0xa')](),controller[_0x401e('0x2f')]);router[_0x401e('0x2c')](_0x401e('0xe'),auth[_0x401e('0xa')](),controller[_0x401e('0x30')]);router[_0x401e('0x2c')](_0x401e('0x28'),auth['isAuthenticated'](),controller[_0x401e('0x31')]);module['exports']=router; \ No newline at end of file +var _0xdb0b=['addSmtp','addInteraction','/:id/send','send','/:id/users','addAgents','put','/:id','update','delete','removeDispositions','removeAnswers','removeImap','removeSmtp','destroy','exports','multer','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','./mailAccount.controller','get','isAuthenticated','index','/describe','describe','show','/:id/dispositions','getDispositions','/:id/canned_answers','getAnswers','/:id/in_servers','getImap','getSmtp','/:id/interactions','/:id/applications','getApplications','/:id/messages','getMessages','getAgents','addDisposition','addAnswer','post','create','addImap','/:id/out_servers'];(function(_0x4f86f6,_0xd9a4a1){var _0x5177c5=function(_0x40c767){while(--_0x40c767){_0x4f86f6['push'](_0x4f86f6['shift']());}};_0x5177c5(++_0xd9a4a1);}(_0xdb0b,0x1a0));var _0xbdb0=function(_0x5801f9,_0x3d95dd){_0x5801f9=_0x5801f9-0x0;var _0x34230d=_0xdb0b[_0x5801f9];return _0x34230d;};'use strict';var multer=require(_0xbdb0('0x0'));var util=require(_0xbdb0('0x1'));var path=require('path');var timeout=require(_0xbdb0('0x2'));var express=require(_0xbdb0('0x3'));var router=express[_0xbdb0('0x4')]();var fs_extra=require(_0xbdb0('0x5'));var auth=require(_0xbdb0('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0xbdb0('0x7'));var controller=require(_0xbdb0('0x8'));router[_0xbdb0('0x9')]('/',auth[_0xbdb0('0xa')](),controller[_0xbdb0('0xb')]);router[_0xbdb0('0x9')](_0xbdb0('0xc'),auth[_0xbdb0('0xa')](),controller[_0xbdb0('0xd')]);router[_0xbdb0('0x9')]('/:id',auth[_0xbdb0('0xa')](),controller[_0xbdb0('0xe')]);router[_0xbdb0('0x9')](_0xbdb0('0xf'),auth[_0xbdb0('0xa')](),controller[_0xbdb0('0x10')]);router[_0xbdb0('0x9')](_0xbdb0('0x11'),auth[_0xbdb0('0xa')](),controller[_0xbdb0('0x12')]);router[_0xbdb0('0x9')](_0xbdb0('0x13'),auth[_0xbdb0('0xa')](),controller[_0xbdb0('0x14')]);router[_0xbdb0('0x9')]('/:id/out_servers',auth[_0xbdb0('0xa')](),controller[_0xbdb0('0x15')]);router[_0xbdb0('0x9')](_0xbdb0('0x16'),auth[_0xbdb0('0xa')](),controller['getInteractions']);router[_0xbdb0('0x9')](_0xbdb0('0x17'),auth[_0xbdb0('0xa')](),controller[_0xbdb0('0x18')]);router[_0xbdb0('0x9')](_0xbdb0('0x19'),auth[_0xbdb0('0xa')](),controller[_0xbdb0('0x1a')]);router['get']('/:id/verify',auth[_0xbdb0('0xa')](),controller['verifySmtp']);router[_0xbdb0('0x9')]('/:id/users',auth[_0xbdb0('0xa')](),controller[_0xbdb0('0x1b')]);router['post'](_0xbdb0('0xf'),auth[_0xbdb0('0xa')](),controller[_0xbdb0('0x1c')]);router['post'](_0xbdb0('0x11'),auth['isAuthenticated'](),controller[_0xbdb0('0x1d')]);router[_0xbdb0('0x1e')]('/',auth['isAuthenticated'](),controller[_0xbdb0('0x1f')]);router['post']('/:id/in_servers',auth[_0xbdb0('0xa')](),controller[_0xbdb0('0x20')]);router[_0xbdb0('0x1e')](_0xbdb0('0x21'),auth[_0xbdb0('0xa')](),controller[_0xbdb0('0x22')]);router[_0xbdb0('0x1e')](_0xbdb0('0x16'),auth[_0xbdb0('0xa')](),controller[_0xbdb0('0x23')]);router[_0xbdb0('0x1e')](_0xbdb0('0x17'),auth[_0xbdb0('0xa')](),controller['addApplications']);router['post'](_0xbdb0('0x24'),auth[_0xbdb0('0xa')](),controller[_0xbdb0('0x25')]);router[_0xbdb0('0x1e')](_0xbdb0('0x26'),auth[_0xbdb0('0xa')](),controller[_0xbdb0('0x27')]);router[_0xbdb0('0x28')](_0xbdb0('0x29'),auth['isAuthenticated'](),controller[_0xbdb0('0x2a')]);router[_0xbdb0('0x2b')](_0xbdb0('0xf'),auth[_0xbdb0('0xa')](),controller[_0xbdb0('0x2c')]);router[_0xbdb0('0x2b')](_0xbdb0('0x11'),auth[_0xbdb0('0xa')](),controller[_0xbdb0('0x2d')]);router['delete'](_0xbdb0('0x13'),auth[_0xbdb0('0xa')](),controller[_0xbdb0('0x2e')]);router[_0xbdb0('0x2b')]('/:id/out_servers',auth[_0xbdb0('0xa')](),controller[_0xbdb0('0x2f')]);router[_0xbdb0('0x2b')](_0xbdb0('0x29'),auth[_0xbdb0('0xa')](),controller[_0xbdb0('0x30')]);router['delete'](_0xbdb0('0x26'),auth[_0xbdb0('0xa')](),controller['removeAgents']);module[_0xbdb0('0x31')]=router; \ No newline at end of file diff --git a/server/api/mailAccount/mailAccount.attributes.js b/server/api/mailAccount/mailAccount.attributes.js index da98fad..3ff0392 100644 --- a/server/api/mailAccount/mailAccount.attributes.js +++ b/server/api/mailAccount/mailAccount.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x34f8=['STRING','BOOLEAN','TEXT','Arial,Helvetica,sans-serif','INTEGER','UNSIGNED','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','setDataValue','mandatoryDispositionPauseId','mandatoryDisposition','sequelize','exports'];(function(_0x1e1167,_0x55db77){var _0x4b668d=function(_0x84c915){while(--_0x84c915){_0x1e1167['push'](_0x1e1167['shift']());}};_0x4b668d(++_0x55db77);}(_0x34f8,0x80));var _0x834f=function(_0x5c36ab,_0x406b6b){_0x5c36ab=_0x5c36ab-0x0;var _0x568d30=_0x34f8[_0x5c36ab];return _0x568d30;};'use strict';var Sequelize=require(_0x834f('0x0'));module[_0x834f('0x1')]={'description':{'type':Sequelize[_0x834f('0x2')]},'name':{'type':Sequelize[_0x834f('0x2')],'allowNull':![]},'service':{'type':Sequelize[_0x834f('0x3')],'defaultValue':![]},'email':{'type':Sequelize['STRING'],'validate':{'isEmail':!![]}},'active':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'key':{'type':Sequelize[_0x834f('0x2')],'allowNull':![]},'template':{'type':Sequelize[_0x834f('0x4')]},'markAsUnread':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'fontFamily':{'type':Sequelize[_0x834f('0x2')],'allowNull':![],'defaultValue':_0x834f('0x5')},'fontSize':{'type':Sequelize[_0x834f('0x6')](0x2)[_0x834f('0x7')],'defaultValue':0xd,'validate':{'min':0x8,'max':0x48}},'notificationTemplate':{'type':Sequelize['TEXT'],'defaultValue':function(){return'Account:\x20{{account.name}}
{{#queue}}Queue:\x20{{queue.name}}
{{/queue}}From\x20:\x20{{from}}
Subject\x20:\x20{{message.subject}}';}},'notificationSound':{'type':Sequelize[_0x834f('0x3')],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x834f('0x3')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0x834f('0x6')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize[_0x834f('0x3')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x834f('0x3')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x834f('0x6')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize['INTEGER'],'allowNull':!![],'defaultValue':null,'comment':_0x834f('0x8')},'mandatoryDisposition':{'type':Sequelize[_0x834f('0x3')],'defaultValue':![],'comment':_0x834f('0x9'),'set':function(_0x2fbfe7){if(!_0x2fbfe7)this[_0x834f('0xa')](_0x834f('0xb'),null);this[_0x834f('0xa')](_0x834f('0xc'),_0x2fbfe7);}}}; \ No newline at end of file +var _0x8c25=['STRING','BOOLEAN','Arial,Helvetica,sans-serif','UNSIGNED','INTEGER','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','setDataValue','mandatoryDispositionPauseId','sequelize','exports'];(function(_0xbb4101,_0x3b354e){var _0x2326aa=function(_0x4e486a){while(--_0x4e486a){_0xbb4101['push'](_0xbb4101['shift']());}};_0x2326aa(++_0x3b354e);}(_0x8c25,0x15e));var _0x58c2=function(_0x5ebaa7,_0x4c0f52){_0x5ebaa7=_0x5ebaa7-0x0;var _0x2522b3=_0x8c25[_0x5ebaa7];return _0x2522b3;};'use strict';var Sequelize=require(_0x58c2('0x0'));module[_0x58c2('0x1')]={'description':{'type':Sequelize[_0x58c2('0x2')]},'name':{'type':Sequelize[_0x58c2('0x2')],'allowNull':![]},'service':{'type':Sequelize[_0x58c2('0x3')],'defaultValue':![]},'email':{'type':Sequelize[_0x58c2('0x2')],'validate':{'isEmail':!![]}},'active':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'key':{'type':Sequelize[_0x58c2('0x2')],'allowNull':![]},'template':{'type':Sequelize['TEXT']},'markAsUnread':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'fontFamily':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x58c2('0x4')},'fontSize':{'type':Sequelize['INTEGER'](0x2)[_0x58c2('0x5')],'defaultValue':0xd,'validate':{'min':0x8,'max':0x48}},'notificationTemplate':{'type':Sequelize['TEXT'],'defaultValue':function(){return'Account:\x20{{account.name}}
{{#queue}}Queue:\x20{{queue.name}}
{{/queue}}From\x20:\x20{{from}}
Subject\x20:\x20{{message.subject}}';}},'notificationSound':{'type':Sequelize[_0x58c2('0x3')],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x58c2('0x3')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize[_0x58c2('0x3')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x58c2('0x6')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x58c2('0x3')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x58c2('0x6')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize[_0x58c2('0x6')],'allowNull':!![],'defaultValue':null,'comment':_0x58c2('0x7')},'mandatoryDisposition':{'type':Sequelize[_0x58c2('0x3')],'defaultValue':![],'comment':_0x58c2('0x8'),'set':function(_0x4f1dfc){if(!_0x4f1dfc)this[_0x58c2('0x9')](_0x58c2('0xa'),null);this[_0x58c2('0x9')]('mandatoryDisposition',_0x4f1dfc);}}}; \ No newline at end of file diff --git a/server/api/mailAccount/mailAccount.controller.js b/server/api/mailAccount/mailAccount.controller.js index 107ce68..4f232d2 100644 --- a/server/api/mailAccount/mailAccount.controller.js +++ b/server/api/mailAccount/mailAccount.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6ec2=['filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','limit','order','sort','where','pick','filter','merge','options','include','findAll','show','params','MailServerIn','includeAll','find','update','body','describe','MailAccountId','Disposition','create','findOne','removeDispositions','ids','addAnswer','CannedAnswer','getAnswers','removeAnswers','email','ListId','active','description','isNil','cservice','cauthentication','user','password','cpassword','authentication','host','port','service','cuser','pass','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','addImap','removeImap','setImap','getSmtp','addSmtp','removeSmtp','setSmtp','addInteraction','MailInteraction','omit','getInteractions','CmContact','Contact','User','Owner','fullname','Tag','Tags','color','tag','rows','addApplications','transaction','MailApplication','bulkCreate','findAndCountAll','getApplications','getMessages','MailMessage','$gte','split','format','CmList','Contacts','updatedAt','DESC','from','%s\x20<%s>','attachments','join','root','server/files/attachments','basename','auth','secure','SendMail','List\x20not\x20found','List','messageId','subject','out','YYYY-MM-DD\x20HH:mm:ss','Interaction','Messages','verifySmtp','VerifySmtp','Sequelize','You\x20can\x27t\x20remove\x20the\x20mail\x20service\x20account','addAgents','spread','emit','userMailAccount:save','removeAgents','userMailAccount:remove','getAgents','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','fs-extra','crypto','jsforce','desk.js','querystring','html-to-text','juice','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','redis','defaults','localhost','socket.io-emitter','register','jayson/promise','client','http','request','then','request\x20sent','debug','MailAccount,\x20%s,\x20%s,\x20%s','error','code','MailAccount,\x20%s,\x20%s','message','info','catch','end','status','json','offset','undefined','count','set','Content-Range','apply','reject','save','destroy','get','MailAccounts','UserProfileResource','sendStatus','stack','name','index','Imap','MailServerOut','Smtp','Pause','mandatoryDispositionPause','map','MailAccount','rawAttributes','fieldName','type','key','model','query','keys'];(function(_0x53afa0,_0x42ca4c){var _0x250550=function(_0x563cb5){while(--_0x563cb5){_0x53afa0['push'](_0x53afa0['shift']());}};_0x250550(++_0x42ca4c);}(_0x6ec2,0x78));var _0x26ec=function(_0x696adb,_0x50fc85){_0x696adb=_0x696adb-0x0;var _0x312565=_0x6ec2[_0x696adb];return _0x312565;};'use strict';var emlformat=require(_0x26ec('0x0'));var rimraf=require(_0x26ec('0x1'));var zipdir=require(_0x26ec('0x2'));var jsonpatch=require(_0x26ec('0x3'));var rp=require(_0x26ec('0x4'));var moment=require(_0x26ec('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x26ec('0x6'));var util=require(_0x26ec('0x7'));var path=require(_0x26ec('0x8'));var sox=require(_0x26ec('0x9'));var csv=require(_0x26ec('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x26ec('0xb'));var _=require('lodash');var squel=require('squel');var crypto=require(_0x26ec('0xc'));var jsforce=require(_0x26ec('0xd'));var deskjs=require(_0x26ec('0xe'));var toCsv=require('to-csv');var querystring=require(_0x26ec('0xf'));var Papa=require('papaparse');var htmlToText=require(_0x26ec('0x10'));var juice=require(_0x26ec('0x11'));var Redis=require(_0x26ec('0x12'));var authService=require(_0x26ec('0x13'));var qs=require(_0x26ec('0x14'));var as=require(_0x26ec('0x15'));var hardwareService=require(_0x26ec('0x16'));var logger=require(_0x26ec('0x17'))(_0x26ec('0x18'));var utils=require(_0x26ec('0x19'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x26ec('0x1a'))['db'];config[_0x26ec('0x1b')]=_[_0x26ec('0x1c')](config[_0x26ec('0x1b')],{'host':_0x26ec('0x1d'),'port':0x18eb});var socket=require(_0x26ec('0x1e'))(new Redis(config[_0x26ec('0x1b')]));require('./mailAccount.socket')[_0x26ec('0x1f')](socket);var jayson=require(_0x26ec('0x20'));var client=jayson[_0x26ec('0x21')][_0x26ec('0x22')]({'port':0x232b});function respondWithRpcPromise(_0x4f9950,_0x4d366c,_0x438985,_0x127385){return new BPromise(function(_0x4bdced,_0x20c407){var _0x49dc68=_0x127385||client;return _0x49dc68[_0x26ec('0x23')](_0x4f9950,_0x438985)[_0x26ec('0x24')](function(_0x50c9de){logger['info']('MailAccount,\x20%s,\x20%s',_0x4d366c,_0x26ec('0x25'));logger[_0x26ec('0x26')](_0x26ec('0x27'),_0x4d366c,'request\x20sent',JSON['stringify'](_0x50c9de));if(_0x50c9de[_0x26ec('0x28')]){if(_0x50c9de[_0x26ec('0x28')][_0x26ec('0x29')]===0x1f4){logger[_0x26ec('0x28')](_0x26ec('0x2a'),_0x4d366c,_0x50c9de[_0x26ec('0x28')]['message']);return _0x20c407(_0x50c9de[_0x26ec('0x28')][_0x26ec('0x2b')]);}logger[_0x26ec('0x28')](_0x26ec('0x2a'),_0x4d366c,_0x50c9de[_0x26ec('0x28')]['message']);return _0x4bdced(_0x50c9de['error'][_0x26ec('0x2b')]);}else{logger[_0x26ec('0x2c')](_0x26ec('0x2a'),_0x4d366c,'request\x20sent');_0x4bdced(_0x50c9de['result'][_0x26ec('0x2b')]);}})[_0x26ec('0x2d')](function(_0x16aba4){logger[_0x26ec('0x28')](_0x26ec('0x2a'),_0x4d366c,_0x16aba4);_0x20c407(_0x16aba4);});});}function respondWithStatusCode(_0x89bd5f,_0x439f78){_0x439f78=_0x439f78||0xcc;return function(_0x4e9cf8){if(_0x4e9cf8){return _0x89bd5f['sendStatus'](_0x439f78);}return _0x89bd5f['status'](_0x439f78)[_0x26ec('0x2e')]();};}function respondWithResult(_0xddd5fc,_0x352bef){_0x352bef=_0x352bef||0xc8;return function(_0x3fd842){if(_0x3fd842){return _0xddd5fc[_0x26ec('0x2f')](_0x352bef)[_0x26ec('0x30')](_0x3fd842);}};}function respondWithFilteredResult(_0x3268e9,_0x4a1371){return function(_0x30231e){if(_0x30231e){var _0x5d10ba=typeof _0x4a1371[_0x26ec('0x31')]===_0x26ec('0x32')&&typeof _0x4a1371['limit']===_0x26ec('0x32');var _0x2d30e6=_0x30231e[_0x26ec('0x33')];var _0x18999a=_0x5d10ba?0x0:_0x4a1371[_0x26ec('0x31')];var _0x24d390=_0x5d10ba?_0x30231e['count']:_0x4a1371[_0x26ec('0x31')]+_0x4a1371['limit'];var _0x3d8b89;if(_0x24d390>=_0x2d30e6){_0x24d390=_0x2d30e6;_0x3d8b89=0xc8;}else{_0x3d8b89=0xce;}_0x3268e9['status'](_0x3d8b89);return _0x3268e9[_0x26ec('0x34')](_0x26ec('0x35'),_0x18999a+'-'+_0x24d390+'/'+_0x2d30e6)['json'](_0x30231e);}return null;};}function patchUpdates(_0x4555ea){return function(_0x13c4c3){try{jsonpatch[_0x26ec('0x36')](_0x13c4c3,_0x4555ea,!![]);}catch(_0x5fe57f){return BPromise[_0x26ec('0x37')](_0x5fe57f);}return _0x13c4c3[_0x26ec('0x38')]();};}function saveUpdates(_0x4f1806,_0x5bf0b8){return function(_0x56e03c){if(_0x56e03c){return _0x56e03c['update'](_0x4f1806)['then'](function(_0x187e7d){return _0x187e7d;});}return null;};}function removeEntity(_0x2543a6,_0x2737c6){return function(_0x27652d){if(_0x27652d){return _0x27652d[_0x26ec('0x39')]()['then'](function(){var _0xfdd95=_0x27652d[_0x26ec('0x3a')]({'plain':!![]});var _0x35a745=_0x26ec('0x3b');return db[_0x26ec('0x3c')]['destroy']({'where':{'type':_0x35a745,'resourceId':_0xfdd95['id']}})[_0x26ec('0x24')](function(){return _0x27652d;});})[_0x26ec('0x24')](function(){_0x2543a6[_0x26ec('0x2f')](0xcc)[_0x26ec('0x2e')]();});}};}function handleEntityNotFound(_0x6b217f,_0x171118){return function(_0x39c514){if(!_0x39c514){_0x6b217f[_0x26ec('0x3d')](0x194);}return _0x39c514;};}function handleError(_0x354adf,_0x16c0ee){_0x16c0ee=_0x16c0ee||0x1f4;return function(_0x48d7cf){logger['error'](_0x48d7cf[_0x26ec('0x3e')]);if(_0x48d7cf[_0x26ec('0x3f')]){delete _0x48d7cf['name'];}_0x354adf[_0x26ec('0x2f')](_0x16c0ee)['send'](_0x48d7cf);};}exports[_0x26ec('0x40')]=function(_0x1244aa,_0x11fc8c){var _0xb4942e={'include':[{'model':db['MailServerIn'],'as':_0x26ec('0x41')},{'model':db[_0x26ec('0x42')],'as':_0x26ec('0x43')},{'model':db[_0x26ec('0x44')],'as':_0x26ec('0x45')}]},_0x2a0c92={},_0xfb68c9={'count':0x0,'rows':[]};var _0x304194=_[_0x26ec('0x46')](db[_0x26ec('0x47')][_0x26ec('0x48')],function(_0x2ca4b4){return{'name':_0x2ca4b4[_0x26ec('0x49')],'type':_0x2ca4b4[_0x26ec('0x4a')][_0x26ec('0x4b')]};});_0x2a0c92[_0x26ec('0x4c')]=_[_0x26ec('0x46')](_0x304194,'name');_0x2a0c92[_0x26ec('0x4d')]=_[_0x26ec('0x4e')](_0x1244aa[_0x26ec('0x4d')]);_0x2a0c92[_0x26ec('0x4f')]=_[_0x26ec('0x50')](_0x2a0c92[_0x26ec('0x4c')],_0x2a0c92['query']);_0xb4942e['attributes']=_[_0x26ec('0x50')](_0x2a0c92['model'],qs[_0x26ec('0x51')](_0x1244aa[_0x26ec('0x4d')][_0x26ec('0x51')]));_0xb4942e[_0x26ec('0x52')]=_0xb4942e[_0x26ec('0x52')][_0x26ec('0x53')]?_0xb4942e[_0x26ec('0x52')]:_0x2a0c92[_0x26ec('0x4c')];if(!_0x1244aa['query'][_0x26ec('0x54')](_0x26ec('0x55'))){_0xb4942e[_0x26ec('0x56')]=qs['limit'](_0x1244aa[_0x26ec('0x4d')][_0x26ec('0x56')]);_0xb4942e[_0x26ec('0x31')]=qs[_0x26ec('0x31')](_0x1244aa[_0x26ec('0x4d')][_0x26ec('0x31')]);}_0xb4942e[_0x26ec('0x57')]=qs[_0x26ec('0x58')](_0x1244aa[_0x26ec('0x4d')][_0x26ec('0x58')]);_0xb4942e[_0x26ec('0x59')]=qs[_0x26ec('0x4f')](_[_0x26ec('0x5a')](_0x1244aa[_0x26ec('0x4d')],_0x2a0c92['filters']),_0x304194);if(_0x1244aa['query'][_0x26ec('0x5b')]){_0xb4942e['where']=_['merge'](_0xb4942e[_0x26ec('0x59')],{'$or':_[_0x26ec('0x46')](_0x304194,function(_0xcd057a){if(_0xcd057a['type']!=='VIRTUAL'){var _0x5edd85={};_0x5edd85[_0xcd057a['name']]={'$like':'%'+_0x1244aa[_0x26ec('0x4d')]['filter']+'%'};return _0x5edd85;}})});}_0xb4942e=_[_0x26ec('0x5c')]({},_0xb4942e,_0x1244aa[_0x26ec('0x5d')]);var _0x5e7cf1={'where':_0xb4942e['where']};return db[_0x26ec('0x47')][_0x26ec('0x33')](_0x5e7cf1)['then'](function(_0x45673f){_0xfb68c9[_0x26ec('0x33')]=_0x45673f;if(_0x1244aa['query']['includeAll']){_0xb4942e[_0x26ec('0x5e')]=[{'all':!![]}];}return db[_0x26ec('0x47')][_0x26ec('0x5f')](_0xb4942e);})['then'](function(_0x452397){_0xfb68c9['rows']=_0x452397;return _0xfb68c9;})[_0x26ec('0x24')](respondWithFilteredResult(_0x11fc8c,_0xb4942e))[_0x26ec('0x2d')](handleError(_0x11fc8c,null));};exports[_0x26ec('0x60')]=function(_0x4750a2,_0x43f2fe){var _0x2ce65f={'raw':![],'where':{'id':_0x4750a2[_0x26ec('0x61')]['id']},'include':[{'model':db[_0x26ec('0x62')],'as':'Imap'},{'model':db[_0x26ec('0x42')],'as':_0x26ec('0x43')},{'model':db['Pause'],'as':_0x26ec('0x45')}]},_0x501386={};_0x501386['model']=_['keys'](db[_0x26ec('0x47')][_0x26ec('0x48')]);_0x501386[_0x26ec('0x4d')]=_['keys'](_0x4750a2['query']);_0x501386[_0x26ec('0x4f')]=_[_0x26ec('0x50')](_0x501386[_0x26ec('0x4c')],_0x501386['query']);_0x2ce65f[_0x26ec('0x52')]=_[_0x26ec('0x50')](_0x501386['model'],qs['fields'](_0x4750a2[_0x26ec('0x4d')]['fields']));_0x2ce65f[_0x26ec('0x52')]=_0x2ce65f[_0x26ec('0x52')][_0x26ec('0x53')]?_0x2ce65f[_0x26ec('0x52')]:_0x501386['model'];if(_0x4750a2['query'][_0x26ec('0x63')]){_0x2ce65f[_0x26ec('0x5e')]=[{'all':!![]}];}_0x2ce65f=_[_0x26ec('0x5c')]({},_0x2ce65f,_0x4750a2[_0x26ec('0x5d')]);return db[_0x26ec('0x47')][_0x26ec('0x64')](_0x2ce65f)[_0x26ec('0x24')](handleEntityNotFound(_0x43f2fe,null))['then'](respondWithResult(_0x43f2fe,null))[_0x26ec('0x2d')](handleError(_0x43f2fe,null));};exports[_0x26ec('0x65')]=function(_0x41d0fa,_0x2e77a9){if(_0x41d0fa[_0x26ec('0x66')]['id']){delete _0x41d0fa[_0x26ec('0x66')]['id'];}return db[_0x26ec('0x47')]['find']({'where':{'id':_0x41d0fa[_0x26ec('0x61')]['id']},'include':[{'model':db[_0x26ec('0x62')],'as':_0x26ec('0x41')},{'model':db[_0x26ec('0x42')],'as':'Smtp'},{'model':db[_0x26ec('0x44')],'as':_0x26ec('0x45')}]})['then'](handleEntityNotFound(_0x2e77a9,null))[_0x26ec('0x24')](saveUpdates(_0x41d0fa[_0x26ec('0x66')],null))[_0x26ec('0x24')](function(_0x29e8bf){if(_0x29e8bf&&_0x41d0fa[_0x26ec('0x66')][_0x26ec('0x41')]){return db[_0x26ec('0x62')]['update'](_0x41d0fa[_0x26ec('0x66')][_0x26ec('0x41')],{'where':{'MailAccountId':_0x29e8bf['id']}})['then'](function(){return _0x29e8bf;});}return _0x29e8bf;})[_0x26ec('0x24')](function(_0x34b5a7){if(_0x34b5a7&&_0x41d0fa[_0x26ec('0x66')][_0x26ec('0x43')]){return db[_0x26ec('0x42')][_0x26ec('0x65')](_0x41d0fa[_0x26ec('0x66')][_0x26ec('0x43')],{'where':{'MailAccountId':_0x34b5a7['id']}})[_0x26ec('0x24')](function(){return _0x34b5a7;});}return _0x34b5a7;})[_0x26ec('0x24')](respondWithResult(_0x2e77a9,null))[_0x26ec('0x2d')](handleError(_0x2e77a9,null));};exports[_0x26ec('0x67')]=function(_0x34e604,_0x35bac1){return db[_0x26ec('0x47')]['describe']()['then'](respondWithResult(_0x35bac1,null))['catch'](handleError(_0x35bac1,null));};exports['addDisposition']=function(_0x263bce,_0x15eb27,_0xcf0055){if(_0x263bce['body']['id']){delete _0x263bce[_0x26ec('0x66')]['id'];}return db['MailAccount'][_0x26ec('0x64')]({'where':{'id':_0x263bce[_0x26ec('0x61')]['id']}})[_0x26ec('0x24')](handleEntityNotFound(_0x15eb27,null))['then'](function(_0x14b4e5){if(_0x14b4e5){_0x263bce[_0x26ec('0x66')][_0x26ec('0x68')]=_0x14b4e5['id'];return db[_0x26ec('0x69')][_0x26ec('0x6a')](_0x263bce['body']);}})[_0x26ec('0x24')](respondWithResult(_0x15eb27,null))[_0x26ec('0x2d')](handleError(_0x15eb27,null));};exports['getDispositions']=function(_0x141119,_0x32addf,_0x37c253){var _0x4e109c={'raw':![],'where':{}};var _0x29aac1={};var _0xb64f7a={'count':0x0,'rows':[]};return db[_0x26ec('0x47')][_0x26ec('0x6b')]({'where':{'id':_0x141119[_0x26ec('0x61')]['id']}})[_0x26ec('0x24')](handleEntityNotFound(_0x32addf,null))[_0x26ec('0x24')](function(_0x311762){if(_0x311762){_0x29aac1[_0x26ec('0x4c')]=_[_0x26ec('0x4e')](db[_0x26ec('0x69')][_0x26ec('0x48')]);_0x29aac1[_0x26ec('0x4d')]=_[_0x26ec('0x4e')](_0x141119[_0x26ec('0x4d')]);_0x29aac1[_0x26ec('0x4f')]=_['intersection'](_0x29aac1['model'],_0x29aac1[_0x26ec('0x4d')]);_0x4e109c[_0x26ec('0x52')]=_[_0x26ec('0x50')](_0x29aac1[_0x26ec('0x4c')],qs[_0x26ec('0x51')](_0x141119[_0x26ec('0x4d')]['fields']));_0x4e109c[_0x26ec('0x52')]=_0x4e109c[_0x26ec('0x52')][_0x26ec('0x53')]?_0x4e109c[_0x26ec('0x52')]:_0x29aac1[_0x26ec('0x4c')];if(!_0x141119[_0x26ec('0x4d')][_0x26ec('0x54')](_0x26ec('0x55'))){_0x4e109c[_0x26ec('0x56')]=qs[_0x26ec('0x56')](_0x141119[_0x26ec('0x4d')]['limit']);_0x4e109c[_0x26ec('0x31')]=qs[_0x26ec('0x31')](_0x141119[_0x26ec('0x4d')]['offset']);}_0x4e109c[_0x26ec('0x57')]=qs[_0x26ec('0x58')](_0x141119['query'][_0x26ec('0x58')]);_0x4e109c['where']=qs[_0x26ec('0x4f')](_[_0x26ec('0x5a')](_0x141119[_0x26ec('0x4d')],_0x29aac1[_0x26ec('0x4f')]));_0x4e109c[_0x26ec('0x59')][_0x26ec('0x68')]=_0x311762['id'];if(_0x141119['query'][_0x26ec('0x5b')]){_0x4e109c[_0x26ec('0x59')]=_['merge'](_0x4e109c[_0x26ec('0x59')],{'$or':_[_0x26ec('0x46')](_0x4e109c['attributes'],function(_0x23b621){var _0x4cc4ec={};_0x4cc4ec[_0x23b621]={'$like':'%'+_0x141119[_0x26ec('0x4d')][_0x26ec('0x5b')]+'%'};return _0x4cc4ec;})});}_0x4e109c=_['merge']({},_0x4e109c,_0x141119[_0x26ec('0x5d')]);return db[_0x26ec('0x69')]['count']({'where':_0x4e109c[_0x26ec('0x59')]})[_0x26ec('0x24')](function(_0x1bbfbf){_0xb64f7a[_0x26ec('0x33')]=_0x1bbfbf;if(_0x141119[_0x26ec('0x4d')][_0x26ec('0x63')]){_0x4e109c[_0x26ec('0x5e')]=[{'all':!![]}];}return db['Disposition'][_0x26ec('0x5f')](_0x4e109c);})[_0x26ec('0x24')](function(_0x5781bb){_0xb64f7a['rows']=_0x5781bb;return _0xb64f7a;});}})['then'](respondWithFilteredResult(_0x32addf,_0x4e109c))[_0x26ec('0x2d')](handleError(_0x32addf,null));};exports[_0x26ec('0x6c')]=function(_0x285a00,_0x51cf47,_0x391b21){return db[_0x26ec('0x47')][_0x26ec('0x64')]({'where':{'id':_0x285a00[_0x26ec('0x61')]['id']}})[_0x26ec('0x24')](handleEntityNotFound(_0x51cf47,null))[_0x26ec('0x24')](function(_0x38734d){if(_0x38734d){return _0x38734d['removeDispositions'](_0x285a00[_0x26ec('0x4d')][_0x26ec('0x6d')]);}})[_0x26ec('0x24')](respondWithStatusCode(_0x51cf47,null))[_0x26ec('0x2d')](handleError(_0x51cf47,null));};exports[_0x26ec('0x6e')]=function(_0x457b03,_0x3bbd9c,_0x3d1a27){if(_0x457b03[_0x26ec('0x66')]['id']){delete _0x457b03[_0x26ec('0x66')]['id'];}return db[_0x26ec('0x47')][_0x26ec('0x64')]({'where':{'id':_0x457b03[_0x26ec('0x61')]['id']}})[_0x26ec('0x24')](handleEntityNotFound(_0x3bbd9c,null))[_0x26ec('0x24')](function(_0x9100a8){if(_0x9100a8){_0x457b03[_0x26ec('0x66')][_0x26ec('0x68')]=_0x9100a8['id'];return db[_0x26ec('0x6f')][_0x26ec('0x6a')](_0x457b03[_0x26ec('0x66')]);}})[_0x26ec('0x24')](respondWithResult(_0x3bbd9c,null))[_0x26ec('0x2d')](handleError(_0x3bbd9c,null));};exports[_0x26ec('0x70')]=function(_0x45bd95,_0x1e942d,_0x58928f){var _0x2df4de={'raw':![],'where':{}};var _0x6bb743={};var _0x42ae13={'count':0x0,'rows':[]};return db[_0x26ec('0x47')][_0x26ec('0x6b')]({'where':{'id':_0x45bd95[_0x26ec('0x61')]['id']}})[_0x26ec('0x24')](handleEntityNotFound(_0x1e942d,null))[_0x26ec('0x24')](function(_0x3c1f1c){if(_0x3c1f1c){_0x6bb743['model']=_[_0x26ec('0x4e')](db[_0x26ec('0x6f')][_0x26ec('0x48')]);_0x6bb743[_0x26ec('0x4d')]=_[_0x26ec('0x4e')](_0x45bd95[_0x26ec('0x4d')]);_0x6bb743[_0x26ec('0x4f')]=_[_0x26ec('0x50')](_0x6bb743['model'],_0x6bb743[_0x26ec('0x4d')]);_0x2df4de[_0x26ec('0x52')]=_['intersection'](_0x6bb743[_0x26ec('0x4c')],qs[_0x26ec('0x51')](_0x45bd95['query']['fields']));_0x2df4de[_0x26ec('0x52')]=_0x2df4de[_0x26ec('0x52')][_0x26ec('0x53')]?_0x2df4de[_0x26ec('0x52')]:_0x6bb743[_0x26ec('0x4c')];if(!_0x45bd95[_0x26ec('0x4d')][_0x26ec('0x54')](_0x26ec('0x55'))){_0x2df4de[_0x26ec('0x56')]=qs[_0x26ec('0x56')](_0x45bd95[_0x26ec('0x4d')][_0x26ec('0x56')]);_0x2df4de['offset']=qs[_0x26ec('0x31')](_0x45bd95['query']['offset']);}_0x2df4de['order']=qs['sort'](_0x45bd95[_0x26ec('0x4d')][_0x26ec('0x58')]);_0x2df4de[_0x26ec('0x59')]=qs[_0x26ec('0x4f')](_[_0x26ec('0x5a')](_0x45bd95['query'],_0x6bb743['filters']));_0x2df4de['where'][_0x26ec('0x68')]=_0x3c1f1c['id'];if(_0x45bd95[_0x26ec('0x4d')][_0x26ec('0x5b')]){_0x2df4de[_0x26ec('0x59')]=_['merge'](_0x2df4de[_0x26ec('0x59')],{'$or':_['map'](_0x2df4de[_0x26ec('0x52')],function(_0x11fafb){var _0x2e8011={};_0x2e8011[_0x11fafb]={'$like':'%'+_0x45bd95[_0x26ec('0x4d')][_0x26ec('0x5b')]+'%'};return _0x2e8011;})});}_0x2df4de=_['merge']({},_0x2df4de,_0x45bd95[_0x26ec('0x5d')]);return db['CannedAnswer'][_0x26ec('0x33')]({'where':_0x2df4de[_0x26ec('0x59')]})[_0x26ec('0x24')](function(_0x554a01){_0x42ae13[_0x26ec('0x33')]=_0x554a01;if(_0x45bd95['query'][_0x26ec('0x63')]){_0x2df4de['include']=[{'all':!![]}];}return db[_0x26ec('0x6f')][_0x26ec('0x5f')](_0x2df4de);})[_0x26ec('0x24')](function(_0x1c49d7){_0x42ae13['rows']=_0x1c49d7;return _0x42ae13;});}})[_0x26ec('0x24')](respondWithFilteredResult(_0x1e942d,_0x2df4de))['catch'](handleError(_0x1e942d,null));};exports[_0x26ec('0x71')]=function(_0x39b8df,_0x1f3972,_0x4bf4ac){return db['MailAccount'][_0x26ec('0x64')]({'where':{'id':_0x39b8df[_0x26ec('0x61')]['id']}})[_0x26ec('0x24')](handleEntityNotFound(_0x1f3972,null))[_0x26ec('0x24')](function(_0x4f3bbb){if(_0x4f3bbb){return _0x4f3bbb['removeAnswers'](_0x39b8df[_0x26ec('0x4d')]['ids']);}})[_0x26ec('0x24')](respondWithStatusCode(_0x1f3972,null))['catch'](handleError(_0x1f3972,null));};exports[_0x26ec('0x6a')]=function(_0x4da032,_0x136140){var _0x37862d={'name':_0x4da032[_0x26ec('0x66')][_0x26ec('0x3f')],'key':_0x4da032['body'][_0x26ec('0x4b')],'email':_0x4da032[_0x26ec('0x66')][_0x26ec('0x72')],'ListId':_0x4da032['body'][_0x26ec('0x73')],'active':!_['isNil'](_0x4da032[_0x26ec('0x66')][_0x26ec('0x74')])?_0x4da032[_0x26ec('0x66')]['active']:!![],'description':_0x4da032[_0x26ec('0x66')][_0x26ec('0x75')]||null,'Imap':{},'Smtp':{}};if(_[_0x26ec('0x76')](_0x4da032[_0x26ec('0x66')][_0x26ec('0x77')])){if(_0x4da032['body'][_0x26ec('0x78')]){_0x37862d[_0x26ec('0x41')][_0x26ec('0x79')]=_0x37862d['Smtp'][_0x26ec('0x79')]=_0x4da032['body']['cuser'];_0x37862d[_0x26ec('0x41')][_0x26ec('0x7a')]=_0x37862d['Smtp']['pass']=_0x4da032[_0x26ec('0x66')][_0x26ec('0x7b')];}else{_0x37862d[_0x26ec('0x41')]['authentication']=_0x37862d[_0x26ec('0x43')][_0x26ec('0x7c')]=![];}_0x37862d[_0x26ec('0x41')]['host']=_0x4da032[_0x26ec('0x66')]['Imap'][_0x26ec('0x7d')];_0x37862d[_0x26ec('0x41')][_0x26ec('0x7e')]=_0x4da032['body'][_0x26ec('0x41')][_0x26ec('0x7e')];_0x37862d[_0x26ec('0x43')][_0x26ec('0x7d')]=_0x4da032['body'][_0x26ec('0x43')][_0x26ec('0x7d')];_0x37862d[_0x26ec('0x43')]['port']=_0x4da032[_0x26ec('0x66')][_0x26ec('0x43')][_0x26ec('0x7e')];}else{_0x37862d['Imap'][_0x26ec('0x7f')]=_0x37862d[_0x26ec('0x43')][_0x26ec('0x7f')]=_0x4da032[_0x26ec('0x66')][_0x26ec('0x77')];_0x37862d[_0x26ec('0x41')][_0x26ec('0x79')]=_0x37862d[_0x26ec('0x43')][_0x26ec('0x79')]=_0x4da032[_0x26ec('0x66')][_0x26ec('0x80')];_0x37862d[_0x26ec('0x41')][_0x26ec('0x7a')]=_0x37862d['Smtp'][_0x26ec('0x81')]=_0x4da032['body'][_0x26ec('0x7b')];}return db[_0x26ec('0x47')]['create'](_0x37862d,{'include':[{'model':db[_0x26ec('0x42')],'as':_0x26ec('0x43')},{'model':db[_0x26ec('0x62')],'as':_0x26ec('0x41')}]})[_0x26ec('0x24')](function(_0x18874f){var _0x32af2a=_0x4da032[_0x26ec('0x79')]['get']({'plain':!![]});if(!_0x32af2a)throw new Error(_0x26ec('0x82'));if(_0x32af2a['role']==='user'){var _0x25cc57=_0x18874f['get']({'plain':!![]});return db[_0x26ec('0x83')][_0x26ec('0x64')]({'where':{'name':_0x26ec('0x3b'),'userProfileId':_0x32af2a[_0x26ec('0x84')]},'raw':!![]})[_0x26ec('0x24')](function(_0x57ded5){if(_0x57ded5&&_0x57ded5['autoAssociation']===0x0){return db['UserProfileResource'][_0x26ec('0x6a')]({'name':_0x25cc57[_0x26ec('0x3f')],'resourceId':_0x25cc57['id'],'type':_0x57ded5[_0x26ec('0x3f')],'sectionId':_0x57ded5['id']},{})[_0x26ec('0x24')](function(){return _0x18874f;});}else{return _0x18874f;}})[_0x26ec('0x2d')](function(_0xfc8b4){logger[_0x26ec('0x28')](_0x26ec('0x85'),_0xfc8b4);throw _0xfc8b4;});}return _0x18874f;})[_0x26ec('0x24')](respondWithResult(_0x136140,0xc9))[_0x26ec('0x2d')](handleError(_0x136140,null));};exports['getImap']=function(_0x486a4e,_0x583e1f,_0xbab3c1){return db['MailAccount']['findOne']({'where':{'id':_0x486a4e[_0x26ec('0x61')]['id']}})[_0x26ec('0x24')](handleEntityNotFound(_0x583e1f,null))[_0x26ec('0x24')](function(_0x43245a){if(_0x43245a){return _0x43245a['getImap']();}return null;})[_0x26ec('0x24')](respondWithResult(_0x583e1f,null))['catch'](handleError(_0x583e1f,null));};exports[_0x26ec('0x86')]=function(_0x437fbe,_0x33a744,_0x31af76){if(_0x437fbe['body']['id']){delete _0x437fbe['body']['id'];}return db['MailAccount']['find']({'where':{'id':_0x437fbe[_0x26ec('0x61')]['id']}})['then'](handleEntityNotFound(_0x33a744,null))[_0x26ec('0x24')](function(_0x4842fd){if(_0x4842fd){_0x437fbe[_0x26ec('0x66')][_0x26ec('0x68')]=_0x4842fd['id'];return db['MailServerIn'][_0x26ec('0x6a')](_0x437fbe[_0x26ec('0x66')]);}})[_0x26ec('0x24')](respondWithResult(_0x33a744,null))[_0x26ec('0x2d')](handleError(_0x33a744,null));};exports[_0x26ec('0x87')]=function(_0x3613c7,_0x33fe19,_0x43f6ea){return db['MailAccount'][_0x26ec('0x6b')]({'where':{'id':_0x3613c7[_0x26ec('0x61')]['id']}})['then'](handleEntityNotFound(_0x33fe19,null))['then'](function(_0x2b0b3e){if(_0x2b0b3e){return _0x2b0b3e[_0x26ec('0x88')](null);}return null;})[_0x26ec('0x24')](respondWithStatusCode(_0x33fe19,null))['catch'](handleError(_0x33fe19,null));};exports['getSmtp']=function(_0x55358a,_0x50e1ab,_0x5be539){return db[_0x26ec('0x47')][_0x26ec('0x6b')]({'where':{'id':_0x55358a[_0x26ec('0x61')]['id']}})[_0x26ec('0x24')](handleEntityNotFound(_0x50e1ab,null))[_0x26ec('0x24')](function(_0x3f6943){if(_0x3f6943){return _0x3f6943[_0x26ec('0x89')]();}return null;})['then'](respondWithResult(_0x50e1ab,null))[_0x26ec('0x2d')](handleError(_0x50e1ab,null));};exports[_0x26ec('0x8a')]=function(_0x44bade,_0x94a15c,_0x10b326){if(_0x44bade[_0x26ec('0x66')]['id']){delete _0x44bade[_0x26ec('0x66')]['id'];}return db['MailAccount']['find']({'where':{'id':_0x44bade['params']['id']}})['then'](handleEntityNotFound(_0x94a15c,null))[_0x26ec('0x24')](function(_0x194ccd){if(_0x194ccd){_0x44bade['body'][_0x26ec('0x68')]=_0x194ccd['id'];return db['MailServerOut'][_0x26ec('0x6a')](_0x44bade['body']);}})[_0x26ec('0x24')](respondWithResult(_0x94a15c,null))[_0x26ec('0x2d')](handleError(_0x94a15c,null));};exports[_0x26ec('0x8b')]=function(_0x5847a7,_0x243add,_0x345a38){return db[_0x26ec('0x47')][_0x26ec('0x6b')]({'where':{'id':_0x5847a7[_0x26ec('0x61')]['id']}})['then'](handleEntityNotFound(_0x243add,null))['then'](function(_0x3cf58c){if(_0x3cf58c){return _0x3cf58c[_0x26ec('0x8c')](null);}return null;})[_0x26ec('0x24')](respondWithStatusCode(_0x243add,null))[_0x26ec('0x2d')](handleError(_0x243add,null));};exports[_0x26ec('0x8d')]=function(_0x5efc26,_0x4c6565,_0x385f48){return db[_0x26ec('0x8e')][_0x26ec('0x64')]({'where':{'id':_0x5efc26[_0x26ec('0x61')]['id']}})[_0x26ec('0x24')](handleEntityNotFound(_0x4c6565,null))[_0x26ec('0x24')](function(_0x388241){if(_0x388241){return _0x388241['addInteraction'](_0x5efc26[_0x26ec('0x66')]['ids'],_[_0x26ec('0x8f')](_0x5efc26[_0x26ec('0x66')],[_0x26ec('0x6d'),'id'])||{});}})['then'](respondWithResult(_0x4c6565,null))[_0x26ec('0x2d')](handleError(_0x4c6565,null));};exports[_0x26ec('0x90')]=function(_0x20fad0,_0x17bc58,_0x4118c0){var _0x4ecf8d={'raw':![],'where':{}};var _0x272499={};var _0xd76cee={'count':0x0,'rows':[]};return db[_0x26ec('0x47')][_0x26ec('0x6b')]({'where':{'id':_0x20fad0[_0x26ec('0x61')]['id']}})[_0x26ec('0x24')](handleEntityNotFound(_0x17bc58,null))['then'](function(_0x1c5a13){if(_0x1c5a13){_0x272499[_0x26ec('0x4c')]=_[_0x26ec('0x4e')](db[_0x26ec('0x8e')][_0x26ec('0x48')]);_0x272499['query']=_[_0x26ec('0x4e')](_0x20fad0[_0x26ec('0x4d')]);_0x272499[_0x26ec('0x4f')]=_[_0x26ec('0x50')](_0x272499[_0x26ec('0x4c')],_0x272499[_0x26ec('0x4d')]);_0x4ecf8d[_0x26ec('0x52')]=_['intersection'](_0x272499[_0x26ec('0x4c')],qs[_0x26ec('0x51')](_0x20fad0[_0x26ec('0x4d')][_0x26ec('0x51')]));_0x4ecf8d['attributes']=_0x4ecf8d[_0x26ec('0x52')][_0x26ec('0x53')]?_0x4ecf8d[_0x26ec('0x52')]:_0x272499[_0x26ec('0x4c')];if(!_0x20fad0[_0x26ec('0x4d')][_0x26ec('0x54')]('nolimit')){_0x4ecf8d['limit']=qs[_0x26ec('0x56')](_0x20fad0['query'][_0x26ec('0x56')]);_0x4ecf8d[_0x26ec('0x31')]=qs['offset'](_0x20fad0['query'][_0x26ec('0x31')]);}_0x4ecf8d[_0x26ec('0x57')]=qs[_0x26ec('0x58')](_0x20fad0[_0x26ec('0x4d')]['sort']);_0x4ecf8d[_0x26ec('0x59')]=qs[_0x26ec('0x4f')](_[_0x26ec('0x5a')](_0x20fad0[_0x26ec('0x4d')],_0x272499[_0x26ec('0x4f')]));_0x4ecf8d[_0x26ec('0x59')][_0x26ec('0x68')]=_0x1c5a13['id'];if(_0x20fad0[_0x26ec('0x4d')][_0x26ec('0x5b')]){_0x4ecf8d[_0x26ec('0x59')]=_[_0x26ec('0x5c')](_0x4ecf8d['where'],{'$or':_[_0x26ec('0x46')](_0x4ecf8d[_0x26ec('0x52')],function(_0x1d4006){var _0x5da1c8={};_0x5da1c8[_0x1d4006]={'$like':'%'+_0x20fad0[_0x26ec('0x4d')]['filter']+'%'};return _0x5da1c8;})});}_0x4ecf8d=_[_0x26ec('0x5c')]({},_0x4ecf8d,_0x20fad0[_0x26ec('0x5d')]);return db[_0x26ec('0x8e')]['count']({'where':_0x4ecf8d['where']})['then'](function(_0x5240b2){_0xd76cee[_0x26ec('0x33')]=_0x5240b2;if(_0x20fad0[_0x26ec('0x4d')]['includeAll']){_0x4ecf8d[_0x26ec('0x5e')]=[{'model':db[_0x26ec('0x91')],'as':_0x26ec('0x92'),'required':![]},{'model':db[_0x26ec('0x93')],'as':_0x26ec('0x94'),'attributes':[_0x26ec('0x3f'),_0x26ec('0x95'),'internal'],'required':![]},{'model':db[_0x26ec('0x96')],'as':_0x26ec('0x97'),'attributes':['id',_0x26ec('0x3f'),_0x26ec('0x98')],'where':_0x20fad0[_0x26ec('0x4d')][_0x26ec('0x99')]?{'id':_0x20fad0['query'][_0x26ec('0x99')]}:undefined,'required':_0x20fad0[_0x26ec('0x4d')]['tag']?!![]:![]}];}return db['MailInteraction']['findAll'](_0x4ecf8d);})[_0x26ec('0x24')](function(_0x569597){_0xd76cee[_0x26ec('0x9a')]=_0x569597;return _0xd76cee;});}})[_0x26ec('0x24')](respondWithFilteredResult(_0x17bc58,_0x4ecf8d))[_0x26ec('0x2d')](handleError(_0x17bc58,null));};exports[_0x26ec('0x9b')]=function(_0xd6a0f6,_0x1dcae4,_0x37974c){return db['MailAccount'][_0x26ec('0x6b')]({'where':{'id':_0xd6a0f6[_0x26ec('0x61')]['id']}})[_0x26ec('0x24')](handleEntityNotFound(_0x1dcae4,null))[_0x26ec('0x24')](function(_0x319aea){if(_0x319aea){return db['sequelize'][_0x26ec('0x9c')](function(_0x234156){return db[_0x26ec('0x9d')][_0x26ec('0x39')]({'where':{'MailAccountId':_0xd6a0f6[_0x26ec('0x61')]['id']},'transaction':_0x234156})[_0x26ec('0x24')](function(_0x49858a){var _0x60df2a=_['map'](_0xd6a0f6[_0x26ec('0x66')],function(_0x577d23){_0x577d23[_0x26ec('0x68')]=_0xd6a0f6['params']['id'];return _0x577d23;});return db[_0x26ec('0x9d')][_0x26ec('0x9e')](_0x60df2a,{'transaction':_0x234156});});})['then'](function(){return db['MailApplication'][_0x26ec('0x9f')]({'where':{'MailAccountId':_0xd6a0f6[_0x26ec('0x61')]['id']},'order':'priority'});});}})[_0x26ec('0x24')](respondWithResult(_0x1dcae4,null))[_0x26ec('0x2d')](handleError(_0x1dcae4,null));};exports['getApplications']=function(_0x536b43,_0xe9928f,_0x56f31b){var _0x21089c={};var _0x5245e0={};var _0x2adf9c;var _0x2ab673;return db[_0x26ec('0x47')]['findOne']({'where':{'id':_0x536b43['params']['id']}})[_0x26ec('0x24')](handleEntityNotFound(_0xe9928f,null))[_0x26ec('0x24')](function(_0x132443){if(_0x132443){_0x2adf9c=_0x132443;_0x5245e0[_0x26ec('0x4c')]=_['keys'](db[_0x26ec('0x9d')][_0x26ec('0x48')]);_0x5245e0[_0x26ec('0x4d')]=_[_0x26ec('0x4e')](_0x536b43[_0x26ec('0x4d')]);_0x5245e0[_0x26ec('0x4f')]=_[_0x26ec('0x50')](_0x5245e0[_0x26ec('0x4c')],_0x5245e0[_0x26ec('0x4d')]);_0x21089c[_0x26ec('0x52')]=_['intersection'](_0x5245e0[_0x26ec('0x4c')],qs[_0x26ec('0x51')](_0x536b43[_0x26ec('0x4d')]['fields']));_0x21089c[_0x26ec('0x52')]=_0x21089c[_0x26ec('0x52')][_0x26ec('0x53')]?_0x21089c['attributes']:_0x5245e0[_0x26ec('0x4c')];_0x21089c['order']=qs['sort'](_0x536b43[_0x26ec('0x4d')]['sort']);_0x21089c[_0x26ec('0x59')]=qs[_0x26ec('0x4f')](_[_0x26ec('0x5a')](_0x536b43[_0x26ec('0x4d')],_0x5245e0[_0x26ec('0x4f')]));if(_0x536b43[_0x26ec('0x4d')][_0x26ec('0x5b')]){_0x21089c[_0x26ec('0x59')]=_[_0x26ec('0x5c')](_0x21089c[_0x26ec('0x59')],{'$or':_[_0x26ec('0x46')](_0x21089c[_0x26ec('0x52')],function(_0x4a7094){var _0xe337ee={};_0xe337ee[_0x4a7094]={'$like':'%'+_0x536b43[_0x26ec('0x4d')][_0x26ec('0x5b')]+'%'};return _0xe337ee;})});}_0x21089c=_[_0x26ec('0x5c')]({},_0x21089c,_0x536b43[_0x26ec('0x5d')]);return _0x2adf9c[_0x26ec('0xa0')](_0x21089c);}})[_0x26ec('0x24')](function(_0x19c99a){if(_0x19c99a){_0x2ab673=_0x19c99a['length'];if(!_0x536b43['query'][_0x26ec('0x54')]('nolimit')){_0x21089c[_0x26ec('0x56')]=qs['limit'](_0x536b43[_0x26ec('0x4d')][_0x26ec('0x56')]);_0x21089c[_0x26ec('0x31')]=qs['offset'](_0x536b43[_0x26ec('0x4d')][_0x26ec('0x31')]);}return _0x2adf9c[_0x26ec('0xa0')](_0x21089c);}})[_0x26ec('0x24')](function(_0x3ef3d0){if(_0x3ef3d0){return _0x3ef3d0?{'count':_0x2ab673,'rows':_0x3ef3d0}:null;}})[_0x26ec('0x24')](respondWithResult(_0xe9928f,null))[_0x26ec('0x2d')](handleError(_0xe9928f,null));};exports[_0x26ec('0xa1')]=function(_0x5209f8,_0x3d8fd9,_0x48d49a){var _0x3231b8={'raw':!![],'where':{}};var _0x5aa711={};var _0x1df04f={'count':0x0,'rows':[]};return db[_0x26ec('0x47')][_0x26ec('0x6b')]({'where':{'id':_0x5209f8[_0x26ec('0x61')]['id']}})['then'](handleEntityNotFound(_0x3d8fd9,null))[_0x26ec('0x24')](function(_0x406988){if(_0x406988){_0x5aa711['model']=_[_0x26ec('0x4e')](db[_0x26ec('0xa2')][_0x26ec('0x48')]);_0x5aa711['query']=_[_0x26ec('0x4e')](_0x5209f8['query']);_0x5aa711[_0x26ec('0x4f')]=_['intersection'](_0x5aa711[_0x26ec('0x4c')],_0x5aa711[_0x26ec('0x4d')]);_0x3231b8[_0x26ec('0x52')]=_['intersection'](_0x5aa711[_0x26ec('0x4c')],qs[_0x26ec('0x51')](_0x5209f8[_0x26ec('0x4d')][_0x26ec('0x51')]));_0x3231b8[_0x26ec('0x52')]=_0x3231b8[_0x26ec('0x52')]['length']?_0x3231b8[_0x26ec('0x52')]:_0x5aa711[_0x26ec('0x4c')];if(!_0x5209f8[_0x26ec('0x4d')][_0x26ec('0x54')]('nolimit')){_0x3231b8[_0x26ec('0x56')]=qs[_0x26ec('0x56')](_0x5209f8['query'][_0x26ec('0x56')]);_0x3231b8[_0x26ec('0x31')]=qs['offset'](_0x5209f8[_0x26ec('0x4d')]['offset']);}_0x3231b8['order']=qs[_0x26ec('0x58')](_0x5209f8[_0x26ec('0x4d')][_0x26ec('0x58')]);_0x3231b8[_0x26ec('0x59')]=qs[_0x26ec('0x4f')](_[_0x26ec('0x5a')](_0x5209f8['query'],_0x5aa711[_0x26ec('0x4f')]));_0x3231b8[_0x26ec('0x59')][_0x26ec('0x68')]=_0x406988['id'];if(_0x5209f8[_0x26ec('0x4d')][_0x26ec('0x5b')]){_0x3231b8[_0x26ec('0x59')]=_[_0x26ec('0x5c')](_0x3231b8['where'],{'$or':_[_0x26ec('0x46')](_0x3231b8[_0x26ec('0x52')],function(_0x55747d){var _0x50ef82={};_0x50ef82[_0x55747d]={'$like':'%'+_0x5209f8[_0x26ec('0x4d')]['filter']+'%'};return _0x50ef82;})});}if(_0x5209f8['query'][_0x26ec('0xa3')]){var _0x56a1fe=_0x5209f8[_0x26ec('0x4d')][_0x26ec('0xa3')][_0x26ec('0xa4')](',');var _0x1e0701={};_0x1e0701[_0x56a1fe[0x0]]={'$gte':moment(_0x56a1fe[0x1])[_0x26ec('0xa5')]('YYYY-MM-DD\x20HH:mm:ss')};_0x3231b8['where']=_[_0x26ec('0x5c')](_0x3231b8[_0x26ec('0x59')],_0x1e0701);}_0x3231b8=_[_0x26ec('0x5c')]({},_0x3231b8,_0x5209f8['options']);return db[_0x26ec('0xa2')][_0x26ec('0x33')]({'where':_0x3231b8[_0x26ec('0x59')]})[_0x26ec('0x24')](function(_0x9c8047){_0x1df04f[_0x26ec('0x33')]=_0x9c8047;if(_0x5209f8[_0x26ec('0x4d')][_0x26ec('0x63')]){_0x3231b8[_0x26ec('0x5e')]=[{'all':!![]}];}return db[_0x26ec('0xa2')][_0x26ec('0x5f')](_0x3231b8);})['then'](function(_0x234fc6){if(_0x5209f8['query']['inlineCss']==='true'){for(var _0x423422=0x0;_0x423422<_0x234fc6[_0x26ec('0x53')];_0x423422++){_0x234fc6[_0x423422][_0x26ec('0x66')]=juice(_0x234fc6[_0x423422][_0x26ec('0x66')]);}}_0x1df04f['rows']=_0x234fc6;return _0x1df04f;});}})[_0x26ec('0x24')](respondWithFilteredResult(_0x3d8fd9,_0x3231b8))['catch'](handleError(_0x3d8fd9,null));};exports['send']=function(_0xb59f2,_0x56d207,_0x5ea6bb){var _0x1a4b3e,_0x4c0f82={},_0x2d060e;if(_0xb59f2[_0x26ec('0x66')]['to']){_0x2d060e=_0xb59f2[_0x26ec('0x66')]['to']['split'](',')[0x0];}return db[_0x26ec('0x47')]['find']({'where':{'id':_0xb59f2['params']['id']},'include':[{'model':db[_0x26ec('0xa6')],'as':'List','include':[{'model':db['CmContact'],'as':_0x26ec('0xa7'),'where':{'email':_0x2d060e},'limit':0x1,'order':[[_0x26ec('0xa8'),_0x26ec('0xa9')]]}]},{'model':db['MailServerOut'],'as':_0x26ec('0x43'),'raw':!![]}]})[_0x26ec('0x24')](handleEntityNotFound(_0x56d207,null))[_0x26ec('0x24')](function(_0x3eb922){if(_0x3eb922){_0x1a4b3e=_0x3eb922;if(_0x3eb922[_0x26ec('0x43')]){if(_[_0x26ec('0x76')](_0xb59f2['body'][_0x26ec('0xaa')])){_0xb59f2[_0x26ec('0x66')]['from']=util[_0x26ec('0xa5')](_0x26ec('0xab'),_0x3eb922[_0x26ec('0x3f')],_0x3eb922[_0x26ec('0x72')]||_0x3eb922['Smtp'][_0x26ec('0x79')]);}if(_0xb59f2['body']['attachments']&&_0xb59f2['body'][_0x26ec('0xac')][_0x26ec('0x53')]){for(var _0x1b5003=0x0;_0x1b5003<_0xb59f2['body'][_0x26ec('0xac')][_0x26ec('0x53')];_0x1b5003+=0x1){_0xb59f2[_0x26ec('0x66')]['attachments'][_0x1b5003]={'filename':_0xb59f2['body'][_0x26ec('0xac')][_0x1b5003]['name'],'path':path[_0x26ec('0xad')](config[_0x26ec('0xae')],_0x26ec('0xaf'),_0xb59f2[_0x26ec('0x66')][_0x26ec('0xac')][_0x1b5003][_0x26ec('0xb0')])};}}var _0x106f13={'tls':{'rejectUnauthorized':![]}};if(_[_0x26ec('0x76')](_0x3eb922['Smtp']['service'])){if(_0x3eb922[_0x26ec('0x43')]['authentication']){_0x106f13[_0x26ec('0xb1')]={'user':_0x3eb922[_0x26ec('0x43')][_0x26ec('0x79')],'pass':_0x3eb922[_0x26ec('0x43')][_0x26ec('0x81')]};}_0x106f13[_0x26ec('0x7d')]=_0x3eb922[_0x26ec('0x43')]['host'];_0x106f13[_0x26ec('0x7e')]=_0x3eb922['Smtp'][_0x26ec('0x7e')];_0x106f13[_0x26ec('0xb2')]=_0x3eb922[_0x26ec('0x43')][_0x26ec('0xb2')];}else{_0x106f13[_0x26ec('0x7f')]=_0x3eb922['Smtp'][_0x26ec('0x7f')];_0x106f13['auth']={'user':_0x3eb922[_0x26ec('0x43')][_0x26ec('0x79')],'pass':_0x3eb922['Smtp']['pass']};}return respondWithRpcPromise(_0x26ec('0xb3'),'sendMail',{'account':_0x106f13,'message':_0xb59f2[_0x26ec('0x66')]});}else{throw new Error(_0x26ec('0xb4'));}}})[_0x26ec('0x24')](function(_0x7e3a3e){if(_0x7e3a3e){_0x4c0f82=_0x7e3a3e;if(_0x1a4b3e[_0x26ec('0xb5')]){if(_0x1a4b3e['List'][_0x26ec('0xa7')]['length']){return _0x1a4b3e[_0x26ec('0xb5')][_0x26ec('0xa7')][0x0];}else{return db[_0x26ec('0x91')]['create'](_[_0x26ec('0x1c')](_0xb59f2[_0x26ec('0x66')],{'firstName':_0xb59f2[_0x26ec('0x66')]['to'],'email':_0xb59f2[_0x26ec('0x66')]['to'],'phone':_0xb59f2[_0x26ec('0x66')]['to'],'ListId':_0x1a4b3e[_0x26ec('0x73')]}));}}else{throw new Error(_0x26ec('0xb4'));}}})[_0x26ec('0x24')](function(_0x3d3a51){if(_0x3d3a51){var _0xed341e={'UserId':_0xb59f2[_0x26ec('0x79')]['id'],'ContactId':_0x3d3a51['id'],'MailAccountId':_0x1a4b3e['id'],'inReplyTo':_0x4c0f82[_0x26ec('0xb6')],'to':_0xb59f2[_0x26ec('0x66')]['from'],'cc':_0xb59f2[_0x26ec('0x66')]['cc'],'subject':_0xb59f2[_0x26ec('0x66')][_0x26ec('0xb7')],'attach':_0xb59f2[_0x26ec('0x66')]['attach'],'firstMsgDirection':_0x26ec('0xb8'),'lastMsgAt':moment()[_0x26ec('0xa5')](_0x26ec('0xb9')),'lastMsgDirection':_0x26ec('0xb8'),'Messages':[_[_0x26ec('0x5c')](_0xb59f2[_0x26ec('0x66')],{'messageId':_0x4c0f82['messageId'],'sentAt':moment()['format'](_0x26ec('0xb9')),'read':!![],'MailAccountId':_0x1a4b3e['id'],'UserId':_0xb59f2[_0x26ec('0x79')]['id'],'ContactId':_0x3d3a51['id']})]};if(_0xb59f2[_0x26ec('0x66')][_0x26ec('0xba')]){_0xed341e=_['merge'](_0xed341e,_0xb59f2[_0x26ec('0x66')][_0x26ec('0xba')]);}return db['MailInteraction'][_0x26ec('0x6a')](_0xed341e,{'include':[{'model':db['MailMessage'],'as':_0x26ec('0xbb')}]});}})[_0x26ec('0x24')](respondWithResult(_0x56d207,null))[_0x26ec('0x2d')](handleError(_0x56d207,null));};exports[_0x26ec('0xbc')]=function(_0x2e7581,_0x2533e5,_0x3d1835){return db[_0x26ec('0x47')][_0x26ec('0x64')]({'where':{'id':_0x2e7581[_0x26ec('0x61')]['id']},'include':[{'model':db[_0x26ec('0x42')],'as':_0x26ec('0x43'),'raw':!![]}]})[_0x26ec('0x24')](handleEntityNotFound(_0x2533e5,null))[_0x26ec('0x24')](function(_0x5733a5){if(_0x5733a5&&_0x5733a5[_0x26ec('0x43')]){var _0x1b4d60={'id':_0x5733a5['id'],'tls':{'rejectUnauthorized':![]}};if(_0x5733a5[_0x26ec('0x43')][_0x26ec('0x7f')]){_0x1b4d60[_0x26ec('0x7f')]=_0x5733a5['Smtp'][_0x26ec('0x7f')];}else{_0x1b4d60['host']=_0x5733a5[_0x26ec('0x43')][_0x26ec('0x7d')];_0x1b4d60['port']=_0x5733a5[_0x26ec('0x43')]['port'];_0x1b4d60[_0x26ec('0xb2')]=_0x5733a5['Smtp'][_0x26ec('0xb2')];}if(_0x5733a5[_0x26ec('0x43')][_0x26ec('0x7c')]){_0x1b4d60[_0x26ec('0xb1')]={'user':_0x5733a5['Smtp'][_0x26ec('0x79')],'pass':_0x5733a5[_0x26ec('0x43')][_0x26ec('0x81')]};}return respondWithRpcPromise(_0x26ec('0xbd'),_0x26ec('0xbc'),{'account':_0x1b4d60});}})[_0x26ec('0x24')](respondWithResult(_0x2533e5,null))[_0x26ec('0x2d')](handleError(_0x2533e5,null));};exports['destroy']=function(_0x520726,_0x41119e){return db['MailAccount'][_0x26ec('0x64')]({'where':{'id':_0x520726[_0x26ec('0x61')]['id']}})[_0x26ec('0x24')](handleEntityNotFound(_0x41119e,null))[_0x26ec('0x24')](function(_0x129c1e){if(_0x129c1e&&_0x129c1e['service']){throw new db[(_0x26ec('0xbe'))]['ValidationError'](_0x26ec('0xbf'));}return _0x129c1e;})['then'](removeEntity(_0x41119e,null))[_0x26ec('0x2d')](handleError(_0x41119e,null));};exports[_0x26ec('0xc0')]=function(_0xaf22e0,_0x221edf,_0x42b6b0){return db[_0x26ec('0x47')]['find']({'where':{'id':_0xaf22e0[_0x26ec('0x61')]['id']}})[_0x26ec('0x24')](handleEntityNotFound(_0x221edf,null))[_0x26ec('0x24')](function(_0x310503){if(_0x310503){return _0x310503[_0x26ec('0xc0')](_0xaf22e0[_0x26ec('0x66')][_0x26ec('0x6d')],_[_0x26ec('0x8f')](_0xaf22e0[_0x26ec('0x66')],[_0x26ec('0x6d'),'id'])||{})[_0x26ec('0xc1')](function(_0x5c6100){for(var _0x5e65f9=0x0;_0x5e65f9<_0xaf22e0[_0x26ec('0x66')]['ids'][_0x26ec('0x53')];_0x5e65f9+=0x1){socket[_0x26ec('0xc2')](_0x26ec('0xc3'),{'UserId':_0xaf22e0[_0x26ec('0x66')]['ids'][_0x5e65f9],'MailAccountId':_0xaf22e0[_0x26ec('0x61')]['id']});}return _0x5c6100;});}})[_0x26ec('0x24')](respondWithResult(_0x221edf,null))[_0x26ec('0x2d')](handleError(_0x221edf,null));};exports[_0x26ec('0xc4')]=function(_0x2b03fa,_0x5666b2,_0xd5b0e){return db[_0x26ec('0x47')][_0x26ec('0x64')]({'where':{'id':_0x2b03fa['params']['id']}})['then'](handleEntityNotFound(_0x5666b2,null))[_0x26ec('0x24')](function(_0x546b2c){if(_0x546b2c){return _0x546b2c[_0x26ec('0xc4')](_0x2b03fa[_0x26ec('0x4d')][_0x26ec('0x6d')])['then'](function(){if(_['isArray'](_0x2b03fa['query'][_0x26ec('0x6d')])){for(var _0x4d0963=0x0;_0x4d0963<_0x2b03fa['query'][_0x26ec('0x6d')][_0x26ec('0x53')];_0x4d0963+=0x1){socket['emit'](_0x26ec('0xc5'),{'UserId':Number(_0x2b03fa['query'][_0x26ec('0x6d')][_0x4d0963]),'MailAccountId':Number(_0x2b03fa[_0x26ec('0x61')]['id'])});}}else{socket[_0x26ec('0xc2')](_0x26ec('0xc5'),{'UserId':Number(_0x2b03fa['query'][_0x26ec('0x6d')]),'MailAccountId':Number(_0x2b03fa[_0x26ec('0x61')]['id'])});}});}})[_0x26ec('0x24')](respondWithStatusCode(_0x5666b2,null))[_0x26ec('0x2d')](handleError(_0x5666b2,null));};exports[_0x26ec('0xc6')]=function(_0x3136e6,_0x5604b4,_0x3e3a1d){var _0x5d2928={};var _0x220f49={};var _0x2a35b2;var _0x4fd548;return db[_0x26ec('0x47')][_0x26ec('0x6b')]({'where':{'id':_0x3136e6[_0x26ec('0x61')]['id']}})[_0x26ec('0x24')](handleEntityNotFound(_0x5604b4,null))[_0x26ec('0x24')](function(_0x5399cf){if(_0x5399cf){_0x2a35b2=_0x5399cf;_0x220f49['model']=_[_0x26ec('0x4e')](db['User'][_0x26ec('0x48')]);_0x220f49['query']=_['keys'](_0x3136e6[_0x26ec('0x4d')]);_0x220f49[_0x26ec('0x4f')]=_[_0x26ec('0x50')](_0x220f49['model'],_0x220f49['query']);_0x5d2928[_0x26ec('0x52')]=_[_0x26ec('0x50')](_0x220f49[_0x26ec('0x4c')],qs[_0x26ec('0x51')](_0x3136e6[_0x26ec('0x4d')][_0x26ec('0x51')]));_0x5d2928['attributes']=_0x5d2928['attributes'][_0x26ec('0x53')]?_0x5d2928[_0x26ec('0x52')]:_0x220f49[_0x26ec('0x4c')];_0x5d2928[_0x26ec('0x57')]=qs[_0x26ec('0x58')](_0x3136e6[_0x26ec('0x4d')][_0x26ec('0x58')]);_0x5d2928[_0x26ec('0x59')]=qs['filters'](_[_0x26ec('0x5a')](_0x3136e6[_0x26ec('0x4d')],_0x220f49['filters']));if(_0x3136e6[_0x26ec('0x4d')][_0x26ec('0x5b')]){_0x5d2928[_0x26ec('0x59')]=_[_0x26ec('0x5c')](_0x5d2928[_0x26ec('0x59')],{'$or':_[_0x26ec('0x46')](_0x5d2928[_0x26ec('0x52')],function(_0x455f8e){var _0x559fcb={};_0x559fcb[_0x455f8e]={'$like':'%'+_0x3136e6[_0x26ec('0x4d')][_0x26ec('0x5b')]+'%'};return _0x559fcb;})});}_0x5d2928=_[_0x26ec('0x5c')]({},_0x5d2928,_0x3136e6[_0x26ec('0x5d')]);return _0x2a35b2[_0x26ec('0xc6')](_0x5d2928);}})[_0x26ec('0x24')](function(_0x24b171){if(_0x24b171){_0x4fd548=_0x24b171[_0x26ec('0x53')];if(!_0x3136e6['query']['hasOwnProperty'](_0x26ec('0x55'))){_0x5d2928[_0x26ec('0x56')]=qs[_0x26ec('0x56')](_0x3136e6[_0x26ec('0x4d')][_0x26ec('0x56')]);_0x5d2928[_0x26ec('0x31')]=qs[_0x26ec('0x31')](_0x3136e6['query'][_0x26ec('0x31')]);}return _0x2a35b2[_0x26ec('0xc6')](_0x5d2928);}})[_0x26ec('0x24')](function(_0x2a890){if(_0x2a890){return _0x2a890?{'count':_0x4fd548,'rows':_0x2a890}:null;}})[_0x26ec('0x24')](respondWithResult(_0x5604b4,null))[_0x26ec('0x2d')](handleError(_0x5604b4,null));}; \ No newline at end of file +var _0x5334=['index','MailServerIn','Imap','MailServerOut','mandatoryDispositionPause','map','MailAccount','rawAttributes','fieldName','type','key','model','query','keys','intersection','fields','attributes','length','hasOwnProperty','nolimit','where','filters','merge','options','includeAll','findAll','rows','show','params','Pause','include','find','update','body','Smtp','describe','addDisposition','Disposition','create','order','sort','pick','MailAccountId','filter','removeDispositions','addAnswer','CannedAnswer','getAnswers','findOne','removeAnswers','ids','email','ListId','isNil','active','description','cservice','cauthentication','user','cuser','password','cpassword','authentication','host','port','service','pass','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','getImap','removeImap','getSmtp','removeSmtp','setSmtp','MailInteraction','addInteraction','omit','Contact','User','fullname','Tag','color','tag','addApplications','transaction','destroy','MailApplication','priority','getApplications','getMessages','MailMessage','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','inlineCss','true','List','CmContact','updatedAt','from','%s\x20<%s>','attachments','join','root','server/files/attachments','basename','auth','secure','SendMail','sendMail','List\x20not\x20found','defaults','messageId','subject','attach','out','Interaction','Messages','verifySmtp','VerifySmtp','ValidationError','addAgents','emit','userMailAccount:save','removeAgents','userMailAccount:remove','getAgents','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','util','path','fs-extra','jsforce','desk.js','to-csv','querystring','papaparse','html-to-text','juice','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/environment','../../config/license/util','../../mysqldb','redis','localhost','socket.io-emitter','register','http','then','MailAccount,\x20%s,\x20%s','MailAccount,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','info','result','catch','sendStatus','status','end','offset','undefined','limit','count','set','Content-Range','json','apply','reject','save','get','MailAccounts','UserProfileResource','stack','name','send'];(function(_0x3e112d,_0x2bb132){var _0x531c31=function(_0x1954bc){while(--_0x1954bc){_0x3e112d['push'](_0x3e112d['shift']());}};_0x531c31(++_0x2bb132);}(_0x5334,0x84));var _0x4533=function(_0x104608,_0x5d19af){_0x104608=_0x104608-0x0;var _0x3eca37=_0x5334[_0x104608];return _0x3eca37;};'use strict';var emlformat=require(_0x4533('0x0'));var rimraf=require(_0x4533('0x1'));var zipdir=require(_0x4533('0x2'));var jsonpatch=require(_0x4533('0x3'));var rp=require(_0x4533('0x4'));var moment=require('moment');var BPromise=require(_0x4533('0x5'));var Mustache=require('mustache');var util=require(_0x4533('0x6'));var path=require(_0x4533('0x7'));var sox=require('sox');var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x4533('0x8'));var _=require('lodash');var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x4533('0x9'));var deskjs=require(_0x4533('0xa'));var toCsv=require(_0x4533('0xb'));var querystring=require(_0x4533('0xc'));var Papa=require(_0x4533('0xd'));var htmlToText=require(_0x4533('0xe'));var juice=require(_0x4533('0xf'));var Redis=require('ioredis');var authService=require(_0x4533('0x10'));var qs=require(_0x4533('0x11'));var as=require(_0x4533('0x12'));var hardwareService=require(_0x4533('0x13'));var logger=require('../../config/logger')(_0x4533('0x14'));var utils=require('../../config/utils');var config=require(_0x4533('0x15'));var licenseUtil=require(_0x4533('0x16'));var db=require(_0x4533('0x17'))['db'];config[_0x4533('0x18')]=_['defaults'](config[_0x4533('0x18')],{'host':_0x4533('0x19'),'port':0x18eb});var socket=require(_0x4533('0x1a'))(new Redis(config[_0x4533('0x18')]));require('./mailAccount.socket')[_0x4533('0x1b')](socket);var jayson=require('jayson/promise');var client=jayson['client'][_0x4533('0x1c')]({'port':0x232b});function respondWithRpcPromise(_0x34dea9,_0x5da8b8,_0x30c68c,_0x1e6a1a){return new BPromise(function(_0x2a9877,_0x551b0d){var _0x3ed873=_0x1e6a1a||client;return _0x3ed873['request'](_0x34dea9,_0x30c68c)[_0x4533('0x1d')](function(_0x3d16a2){logger['info'](_0x4533('0x1e'),_0x5da8b8,'request\x20sent');logger['debug'](_0x4533('0x1f'),_0x5da8b8,_0x4533('0x20'),JSON['stringify'](_0x3d16a2));if(_0x3d16a2['error']){if(_0x3d16a2[_0x4533('0x21')][_0x4533('0x22')]===0x1f4){logger[_0x4533('0x21')](_0x4533('0x1e'),_0x5da8b8,_0x3d16a2[_0x4533('0x21')][_0x4533('0x23')]);return _0x551b0d(_0x3d16a2[_0x4533('0x21')]['message']);}logger[_0x4533('0x21')](_0x4533('0x1e'),_0x5da8b8,_0x3d16a2[_0x4533('0x21')]['message']);return _0x2a9877(_0x3d16a2['error'][_0x4533('0x23')]);}else{logger[_0x4533('0x24')]('MailAccount,\x20%s,\x20%s',_0x5da8b8,'request\x20sent');_0x2a9877(_0x3d16a2[_0x4533('0x25')][_0x4533('0x23')]);}})[_0x4533('0x26')](function(_0x4d8189){logger[_0x4533('0x21')](_0x4533('0x1e'),_0x5da8b8,_0x4d8189);_0x551b0d(_0x4d8189);});});}function respondWithStatusCode(_0x43eaa8,_0x3fba67){_0x3fba67=_0x3fba67||0xcc;return function(_0x19ab4d){if(_0x19ab4d){return _0x43eaa8[_0x4533('0x27')](_0x3fba67);}return _0x43eaa8[_0x4533('0x28')](_0x3fba67)[_0x4533('0x29')]();};}function respondWithResult(_0x45ad98,_0x5f16bb){_0x5f16bb=_0x5f16bb||0xc8;return function(_0x5c1e24){if(_0x5c1e24){return _0x45ad98[_0x4533('0x28')](_0x5f16bb)['json'](_0x5c1e24);}};}function respondWithFilteredResult(_0x3fd76a,_0x4e2b80){return function(_0x159fea){if(_0x159fea){var _0x42ba2d=typeof _0x4e2b80[_0x4533('0x2a')]===_0x4533('0x2b')&&typeof _0x4e2b80[_0x4533('0x2c')]===_0x4533('0x2b');var _0xe584a2=_0x159fea[_0x4533('0x2d')];var _0x130566=_0x42ba2d?0x0:_0x4e2b80[_0x4533('0x2a')];var _0x728791=_0x42ba2d?_0x159fea[_0x4533('0x2d')]:_0x4e2b80[_0x4533('0x2a')]+_0x4e2b80['limit'];var _0x2489ce;if(_0x728791>=_0xe584a2){_0x728791=_0xe584a2;_0x2489ce=0xc8;}else{_0x2489ce=0xce;}_0x3fd76a['status'](_0x2489ce);return _0x3fd76a[_0x4533('0x2e')](_0x4533('0x2f'),_0x130566+'-'+_0x728791+'/'+_0xe584a2)[_0x4533('0x30')](_0x159fea);}return null;};}function patchUpdates(_0x3b89f0){return function(_0x24acf5){try{jsonpatch[_0x4533('0x31')](_0x24acf5,_0x3b89f0,!![]);}catch(_0x3246c6){return BPromise[_0x4533('0x32')](_0x3246c6);}return _0x24acf5[_0x4533('0x33')]();};}function saveUpdates(_0x24b806,_0xc3de12){return function(_0x23c089){if(_0x23c089){return _0x23c089['update'](_0x24b806)[_0x4533('0x1d')](function(_0xc49f39){return _0xc49f39;});}return null;};}function removeEntity(_0x402024,_0xb8a0e9){return function(_0x42bc08){if(_0x42bc08){return _0x42bc08['destroy']()[_0x4533('0x1d')](function(){var _0x35aefe=_0x42bc08[_0x4533('0x34')]({'plain':!![]});var _0x3865d3=_0x4533('0x35');return db[_0x4533('0x36')]['destroy']({'where':{'type':_0x3865d3,'resourceId':_0x35aefe['id']}})[_0x4533('0x1d')](function(){return _0x42bc08;});})[_0x4533('0x1d')](function(){_0x402024['status'](0xcc)[_0x4533('0x29')]();});}};}function handleEntityNotFound(_0x1e028a,_0x42807e){return function(_0x2f4943){if(!_0x2f4943){_0x1e028a[_0x4533('0x27')](0x194);}return _0x2f4943;};}function handleError(_0x41fb9b,_0x424924){_0x424924=_0x424924||0x1f4;return function(_0x603753){logger[_0x4533('0x21')](_0x603753[_0x4533('0x37')]);if(_0x603753['name']){delete _0x603753[_0x4533('0x38')];}_0x41fb9b[_0x4533('0x28')](_0x424924)[_0x4533('0x39')](_0x603753);};}exports[_0x4533('0x3a')]=function(_0x154ca3,_0x17af88){var _0x16fda0={'include':[{'model':db[_0x4533('0x3b')],'as':_0x4533('0x3c')},{'model':db[_0x4533('0x3d')],'as':'Smtp'},{'model':db['Pause'],'as':_0x4533('0x3e')}]},_0x1e01d9={},_0x2e493e={'count':0x0,'rows':[]};var _0x561709=_[_0x4533('0x3f')](db[_0x4533('0x40')][_0x4533('0x41')],function(_0x3562de){return{'name':_0x3562de[_0x4533('0x42')],'type':_0x3562de[_0x4533('0x43')][_0x4533('0x44')]};});_0x1e01d9[_0x4533('0x45')]=_[_0x4533('0x3f')](_0x561709,_0x4533('0x38'));_0x1e01d9[_0x4533('0x46')]=_[_0x4533('0x47')](_0x154ca3[_0x4533('0x46')]);_0x1e01d9['filters']=_[_0x4533('0x48')](_0x1e01d9['model'],_0x1e01d9['query']);_0x16fda0['attributes']=_['intersection'](_0x1e01d9[_0x4533('0x45')],qs[_0x4533('0x49')](_0x154ca3[_0x4533('0x46')][_0x4533('0x49')]));_0x16fda0['attributes']=_0x16fda0[_0x4533('0x4a')][_0x4533('0x4b')]?_0x16fda0[_0x4533('0x4a')]:_0x1e01d9[_0x4533('0x45')];if(!_0x154ca3[_0x4533('0x46')][_0x4533('0x4c')](_0x4533('0x4d'))){_0x16fda0['limit']=qs[_0x4533('0x2c')](_0x154ca3['query']['limit']);_0x16fda0[_0x4533('0x2a')]=qs[_0x4533('0x2a')](_0x154ca3[_0x4533('0x46')][_0x4533('0x2a')]);}_0x16fda0['order']=qs['sort'](_0x154ca3[_0x4533('0x46')]['sort']);_0x16fda0[_0x4533('0x4e')]=qs[_0x4533('0x4f')](_['pick'](_0x154ca3['query'],_0x1e01d9['filters']),_0x561709);if(_0x154ca3['query']['filter']){_0x16fda0[_0x4533('0x4e')]=_['merge'](_0x16fda0[_0x4533('0x4e')],{'$or':_['map'](_0x561709,function(_0x2e70b7){if(_0x2e70b7['type']!=='VIRTUAL'){var _0xb46cca={};_0xb46cca[_0x2e70b7['name']]={'$like':'%'+_0x154ca3[_0x4533('0x46')]['filter']+'%'};return _0xb46cca;}})});}_0x16fda0=_[_0x4533('0x50')]({},_0x16fda0,_0x154ca3[_0x4533('0x51')]);var _0x48de62={'where':_0x16fda0[_0x4533('0x4e')]};return db[_0x4533('0x40')][_0x4533('0x2d')](_0x48de62)[_0x4533('0x1d')](function(_0x35fb4d){_0x2e493e['count']=_0x35fb4d;if(_0x154ca3[_0x4533('0x46')][_0x4533('0x52')]){_0x16fda0['include']=[{'all':!![]}];}return db[_0x4533('0x40')][_0x4533('0x53')](_0x16fda0);})[_0x4533('0x1d')](function(_0x22509c){_0x2e493e[_0x4533('0x54')]=_0x22509c;return _0x2e493e;})[_0x4533('0x1d')](respondWithFilteredResult(_0x17af88,_0x16fda0))[_0x4533('0x26')](handleError(_0x17af88,null));};exports[_0x4533('0x55')]=function(_0x717187,_0xc55ddf){var _0x26dcee={'raw':![],'where':{'id':_0x717187[_0x4533('0x56')]['id']},'include':[{'model':db[_0x4533('0x3b')],'as':_0x4533('0x3c')},{'model':db[_0x4533('0x3d')],'as':'Smtp'},{'model':db[_0x4533('0x57')],'as':'mandatoryDispositionPause'}]},_0x32a971={};_0x32a971['model']=_[_0x4533('0x47')](db[_0x4533('0x40')][_0x4533('0x41')]);_0x32a971[_0x4533('0x46')]=_['keys'](_0x717187[_0x4533('0x46')]);_0x32a971['filters']=_['intersection'](_0x32a971[_0x4533('0x45')],_0x32a971['query']);_0x26dcee[_0x4533('0x4a')]=_['intersection'](_0x32a971[_0x4533('0x45')],qs[_0x4533('0x49')](_0x717187[_0x4533('0x46')][_0x4533('0x49')]));_0x26dcee[_0x4533('0x4a')]=_0x26dcee['attributes'][_0x4533('0x4b')]?_0x26dcee[_0x4533('0x4a')]:_0x32a971[_0x4533('0x45')];if(_0x717187['query'][_0x4533('0x52')]){_0x26dcee[_0x4533('0x58')]=[{'all':!![]}];}_0x26dcee=_['merge']({},_0x26dcee,_0x717187[_0x4533('0x51')]);return db[_0x4533('0x40')][_0x4533('0x59')](_0x26dcee)[_0x4533('0x1d')](handleEntityNotFound(_0xc55ddf,null))[_0x4533('0x1d')](respondWithResult(_0xc55ddf,null))['catch'](handleError(_0xc55ddf,null));};exports[_0x4533('0x5a')]=function(_0x507391,_0x542c0a){if(_0x507391[_0x4533('0x5b')]['id']){delete _0x507391[_0x4533('0x5b')]['id'];}return db[_0x4533('0x40')][_0x4533('0x59')]({'where':{'id':_0x507391[_0x4533('0x56')]['id']},'include':[{'model':db[_0x4533('0x3b')],'as':_0x4533('0x3c')},{'model':db[_0x4533('0x3d')],'as':_0x4533('0x5c')},{'model':db[_0x4533('0x57')],'as':_0x4533('0x3e')}]})['then'](handleEntityNotFound(_0x542c0a,null))[_0x4533('0x1d')](saveUpdates(_0x507391['body'],null))[_0x4533('0x1d')](function(_0x592d99){if(_0x592d99&&_0x507391[_0x4533('0x5b')]['Imap']){return db[_0x4533('0x3b')][_0x4533('0x5a')](_0x507391[_0x4533('0x5b')][_0x4533('0x3c')],{'where':{'MailAccountId':_0x592d99['id']}})[_0x4533('0x1d')](function(){return _0x592d99;});}return _0x592d99;})[_0x4533('0x1d')](function(_0x1c7258){if(_0x1c7258&&_0x507391[_0x4533('0x5b')]['Smtp']){return db['MailServerOut'][_0x4533('0x5a')](_0x507391[_0x4533('0x5b')]['Smtp'],{'where':{'MailAccountId':_0x1c7258['id']}})[_0x4533('0x1d')](function(){return _0x1c7258;});}return _0x1c7258;})[_0x4533('0x1d')](respondWithResult(_0x542c0a,null))['catch'](handleError(_0x542c0a,null));};exports['describe']=function(_0x56d9a3,_0x51d6b6){return db[_0x4533('0x40')][_0x4533('0x5d')]()[_0x4533('0x1d')](respondWithResult(_0x51d6b6,null))[_0x4533('0x26')](handleError(_0x51d6b6,null));};exports[_0x4533('0x5e')]=function(_0xbf35f7,_0x323e54,_0x2b5d57){if(_0xbf35f7['body']['id']){delete _0xbf35f7[_0x4533('0x5b')]['id'];}return db[_0x4533('0x40')][_0x4533('0x59')]({'where':{'id':_0xbf35f7[_0x4533('0x56')]['id']}})['then'](handleEntityNotFound(_0x323e54,null))['then'](function(_0x4954a3){if(_0x4954a3){_0xbf35f7[_0x4533('0x5b')]['MailAccountId']=_0x4954a3['id'];return db[_0x4533('0x5f')][_0x4533('0x60')](_0xbf35f7[_0x4533('0x5b')]);}})['then'](respondWithResult(_0x323e54,null))[_0x4533('0x26')](handleError(_0x323e54,null));};exports['getDispositions']=function(_0x360063,_0x48f790,_0x170012){var _0x3fd36d={'raw':![],'where':{}};var _0x18a4de={};var _0x251924={'count':0x0,'rows':[]};return db[_0x4533('0x40')]['findOne']({'where':{'id':_0x360063[_0x4533('0x56')]['id']}})['then'](handleEntityNotFound(_0x48f790,null))[_0x4533('0x1d')](function(_0xffae1f){if(_0xffae1f){_0x18a4de['model']=_['keys'](db['Disposition']['rawAttributes']);_0x18a4de[_0x4533('0x46')]=_[_0x4533('0x47')](_0x360063['query']);_0x18a4de[_0x4533('0x4f')]=_[_0x4533('0x48')](_0x18a4de[_0x4533('0x45')],_0x18a4de[_0x4533('0x46')]);_0x3fd36d[_0x4533('0x4a')]=_[_0x4533('0x48')](_0x18a4de[_0x4533('0x45')],qs[_0x4533('0x49')](_0x360063[_0x4533('0x46')][_0x4533('0x49')]));_0x3fd36d[_0x4533('0x4a')]=_0x3fd36d[_0x4533('0x4a')][_0x4533('0x4b')]?_0x3fd36d[_0x4533('0x4a')]:_0x18a4de[_0x4533('0x45')];if(!_0x360063['query'][_0x4533('0x4c')](_0x4533('0x4d'))){_0x3fd36d[_0x4533('0x2c')]=qs['limit'](_0x360063[_0x4533('0x46')][_0x4533('0x2c')]);_0x3fd36d[_0x4533('0x2a')]=qs[_0x4533('0x2a')](_0x360063['query'][_0x4533('0x2a')]);}_0x3fd36d[_0x4533('0x61')]=qs[_0x4533('0x62')](_0x360063['query']['sort']);_0x3fd36d[_0x4533('0x4e')]=qs[_0x4533('0x4f')](_[_0x4533('0x63')](_0x360063[_0x4533('0x46')],_0x18a4de[_0x4533('0x4f')]));_0x3fd36d[_0x4533('0x4e')][_0x4533('0x64')]=_0xffae1f['id'];if(_0x360063[_0x4533('0x46')][_0x4533('0x65')]){_0x3fd36d['where']=_['merge'](_0x3fd36d['where'],{'$or':_[_0x4533('0x3f')](_0x3fd36d[_0x4533('0x4a')],function(_0x46da1b){var _0x52c35e={};_0x52c35e[_0x46da1b]={'$like':'%'+_0x360063[_0x4533('0x46')][_0x4533('0x65')]+'%'};return _0x52c35e;})});}_0x3fd36d=_[_0x4533('0x50')]({},_0x3fd36d,_0x360063[_0x4533('0x51')]);return db[_0x4533('0x5f')][_0x4533('0x2d')]({'where':_0x3fd36d['where']})[_0x4533('0x1d')](function(_0xb32ab){_0x251924[_0x4533('0x2d')]=_0xb32ab;if(_0x360063['query'][_0x4533('0x52')]){_0x3fd36d[_0x4533('0x58')]=[{'all':!![]}];}return db[_0x4533('0x5f')]['findAll'](_0x3fd36d);})[_0x4533('0x1d')](function(_0x8228a8){_0x251924['rows']=_0x8228a8;return _0x251924;});}})[_0x4533('0x1d')](respondWithFilteredResult(_0x48f790,_0x3fd36d))[_0x4533('0x26')](handleError(_0x48f790,null));};exports[_0x4533('0x66')]=function(_0x563a3a,_0x157b6e,_0x544786){return db[_0x4533('0x40')][_0x4533('0x59')]({'where':{'id':_0x563a3a['params']['id']}})[_0x4533('0x1d')](handleEntityNotFound(_0x157b6e,null))[_0x4533('0x1d')](function(_0x18c805){if(_0x18c805){return _0x18c805[_0x4533('0x66')](_0x563a3a[_0x4533('0x46')]['ids']);}})[_0x4533('0x1d')](respondWithStatusCode(_0x157b6e,null))[_0x4533('0x26')](handleError(_0x157b6e,null));};exports[_0x4533('0x67')]=function(_0x324291,_0x4e183a,_0xe76cc8){if(_0x324291[_0x4533('0x5b')]['id']){delete _0x324291[_0x4533('0x5b')]['id'];}return db[_0x4533('0x40')][_0x4533('0x59')]({'where':{'id':_0x324291[_0x4533('0x56')]['id']}})['then'](handleEntityNotFound(_0x4e183a,null))[_0x4533('0x1d')](function(_0x18c2f3){if(_0x18c2f3){_0x324291[_0x4533('0x5b')][_0x4533('0x64')]=_0x18c2f3['id'];return db[_0x4533('0x68')][_0x4533('0x60')](_0x324291[_0x4533('0x5b')]);}})['then'](respondWithResult(_0x4e183a,null))[_0x4533('0x26')](handleError(_0x4e183a,null));};exports[_0x4533('0x69')]=function(_0x2c1095,_0x13005a,_0x510440){var _0x4e74d5={'raw':![],'where':{}};var _0x3596de={};var _0x54eea5={'count':0x0,'rows':[]};return db['MailAccount'][_0x4533('0x6a')]({'where':{'id':_0x2c1095[_0x4533('0x56')]['id']}})[_0x4533('0x1d')](handleEntityNotFound(_0x13005a,null))[_0x4533('0x1d')](function(_0x1b40e6){if(_0x1b40e6){_0x3596de[_0x4533('0x45')]=_[_0x4533('0x47')](db[_0x4533('0x68')]['rawAttributes']);_0x3596de[_0x4533('0x46')]=_[_0x4533('0x47')](_0x2c1095[_0x4533('0x46')]);_0x3596de[_0x4533('0x4f')]=_[_0x4533('0x48')](_0x3596de[_0x4533('0x45')],_0x3596de[_0x4533('0x46')]);_0x4e74d5[_0x4533('0x4a')]=_[_0x4533('0x48')](_0x3596de[_0x4533('0x45')],qs[_0x4533('0x49')](_0x2c1095[_0x4533('0x46')]['fields']));_0x4e74d5['attributes']=_0x4e74d5[_0x4533('0x4a')][_0x4533('0x4b')]?_0x4e74d5[_0x4533('0x4a')]:_0x3596de[_0x4533('0x45')];if(!_0x2c1095['query'][_0x4533('0x4c')](_0x4533('0x4d'))){_0x4e74d5[_0x4533('0x2c')]=qs[_0x4533('0x2c')](_0x2c1095[_0x4533('0x46')][_0x4533('0x2c')]);_0x4e74d5['offset']=qs[_0x4533('0x2a')](_0x2c1095['query'][_0x4533('0x2a')]);}_0x4e74d5['order']=qs['sort'](_0x2c1095[_0x4533('0x46')][_0x4533('0x62')]);_0x4e74d5['where']=qs['filters'](_[_0x4533('0x63')](_0x2c1095[_0x4533('0x46')],_0x3596de['filters']));_0x4e74d5[_0x4533('0x4e')]['MailAccountId']=_0x1b40e6['id'];if(_0x2c1095[_0x4533('0x46')][_0x4533('0x65')]){_0x4e74d5[_0x4533('0x4e')]=_[_0x4533('0x50')](_0x4e74d5['where'],{'$or':_[_0x4533('0x3f')](_0x4e74d5[_0x4533('0x4a')],function(_0x361b78){var _0xcd12ad={};_0xcd12ad[_0x361b78]={'$like':'%'+_0x2c1095['query'][_0x4533('0x65')]+'%'};return _0xcd12ad;})});}_0x4e74d5=_[_0x4533('0x50')]({},_0x4e74d5,_0x2c1095[_0x4533('0x51')]);return db['CannedAnswer'][_0x4533('0x2d')]({'where':_0x4e74d5[_0x4533('0x4e')]})['then'](function(_0x4f4d8b){_0x54eea5['count']=_0x4f4d8b;if(_0x2c1095[_0x4533('0x46')][_0x4533('0x52')]){_0x4e74d5[_0x4533('0x58')]=[{'all':!![]}];}return db[_0x4533('0x68')][_0x4533('0x53')](_0x4e74d5);})['then'](function(_0x1e3a46){_0x54eea5['rows']=_0x1e3a46;return _0x54eea5;});}})[_0x4533('0x1d')](respondWithFilteredResult(_0x13005a,_0x4e74d5))[_0x4533('0x26')](handleError(_0x13005a,null));};exports[_0x4533('0x6b')]=function(_0x861d17,_0x32112e,_0x43a0f1){return db[_0x4533('0x40')][_0x4533('0x59')]({'where':{'id':_0x861d17['params']['id']}})[_0x4533('0x1d')](handleEntityNotFound(_0x32112e,null))[_0x4533('0x1d')](function(_0x24ef0b){if(_0x24ef0b){return _0x24ef0b[_0x4533('0x6b')](_0x861d17['query'][_0x4533('0x6c')]);}})[_0x4533('0x1d')](respondWithStatusCode(_0x32112e,null))[_0x4533('0x26')](handleError(_0x32112e,null));};exports[_0x4533('0x60')]=function(_0x23c139,_0x3e7b9f){var _0x4b710b={'name':_0x23c139[_0x4533('0x5b')][_0x4533('0x38')],'key':_0x23c139[_0x4533('0x5b')][_0x4533('0x44')],'email':_0x23c139[_0x4533('0x5b')][_0x4533('0x6d')],'ListId':_0x23c139[_0x4533('0x5b')][_0x4533('0x6e')],'active':!_[_0x4533('0x6f')](_0x23c139[_0x4533('0x5b')][_0x4533('0x70')])?_0x23c139['body'][_0x4533('0x70')]:!![],'description':_0x23c139['body'][_0x4533('0x71')]||null,'Imap':{},'Smtp':{}};if(_[_0x4533('0x6f')](_0x23c139['body'][_0x4533('0x72')])){if(_0x23c139[_0x4533('0x5b')][_0x4533('0x73')]){_0x4b710b[_0x4533('0x3c')][_0x4533('0x74')]=_0x4b710b[_0x4533('0x5c')][_0x4533('0x74')]=_0x23c139['body'][_0x4533('0x75')];_0x4b710b[_0x4533('0x3c')][_0x4533('0x76')]=_0x4b710b['Smtp']['pass']=_0x23c139[_0x4533('0x5b')][_0x4533('0x77')];}else{_0x4b710b[_0x4533('0x3c')][_0x4533('0x78')]=_0x4b710b[_0x4533('0x5c')][_0x4533('0x78')]=![];}_0x4b710b[_0x4533('0x3c')][_0x4533('0x79')]=_0x23c139[_0x4533('0x5b')][_0x4533('0x3c')][_0x4533('0x79')];_0x4b710b['Imap']['port']=_0x23c139['body'][_0x4533('0x3c')]['port'];_0x4b710b['Smtp'][_0x4533('0x79')]=_0x23c139['body']['Smtp'][_0x4533('0x79')];_0x4b710b[_0x4533('0x5c')]['port']=_0x23c139[_0x4533('0x5b')][_0x4533('0x5c')][_0x4533('0x7a')];}else{_0x4b710b['Imap'][_0x4533('0x7b')]=_0x4b710b[_0x4533('0x5c')][_0x4533('0x7b')]=_0x23c139[_0x4533('0x5b')][_0x4533('0x72')];_0x4b710b['Imap'][_0x4533('0x74')]=_0x4b710b[_0x4533('0x5c')][_0x4533('0x74')]=_0x23c139[_0x4533('0x5b')][_0x4533('0x75')];_0x4b710b['Imap'][_0x4533('0x76')]=_0x4b710b[_0x4533('0x5c')][_0x4533('0x7c')]=_0x23c139[_0x4533('0x5b')][_0x4533('0x77')];}return db[_0x4533('0x40')][_0x4533('0x60')](_0x4b710b,{'include':[{'model':db[_0x4533('0x3d')],'as':'Smtp'},{'model':db[_0x4533('0x3b')],'as':_0x4533('0x3c')}]})[_0x4533('0x1d')](function(_0x49be7f){var _0x4e3094=_0x23c139[_0x4533('0x74')][_0x4533('0x34')]({'plain':!![]});if(!_0x4e3094)throw new Error(_0x4533('0x7d'));if(_0x4e3094[_0x4533('0x7e')]==='user'){var _0x4f8ad4=_0x49be7f[_0x4533('0x34')]({'plain':!![]});return db[_0x4533('0x7f')][_0x4533('0x59')]({'where':{'name':_0x4533('0x35'),'userProfileId':_0x4e3094[_0x4533('0x80')]},'raw':!![]})['then'](function(_0x88a275){if(_0x88a275&&_0x88a275[_0x4533('0x81')]===0x0){return db[_0x4533('0x36')]['create']({'name':_0x4f8ad4[_0x4533('0x38')],'resourceId':_0x4f8ad4['id'],'type':_0x88a275[_0x4533('0x38')],'sectionId':_0x88a275['id']},{})[_0x4533('0x1d')](function(){return _0x49be7f;});}else{return _0x49be7f;}})[_0x4533('0x26')](function(_0x53b552){logger[_0x4533('0x21')](_0x4533('0x82'),_0x53b552);throw _0x53b552;});}return _0x49be7f;})['then'](respondWithResult(_0x3e7b9f,0xc9))[_0x4533('0x26')](handleError(_0x3e7b9f,null));};exports[_0x4533('0x83')]=function(_0x221d07,_0x5b9b58,_0x5012ac){return db[_0x4533('0x40')][_0x4533('0x6a')]({'where':{'id':_0x221d07['params']['id']}})[_0x4533('0x1d')](handleEntityNotFound(_0x5b9b58,null))['then'](function(_0x5967d4){if(_0x5967d4){return _0x5967d4['getImap']();}return null;})[_0x4533('0x1d')](respondWithResult(_0x5b9b58,null))[_0x4533('0x26')](handleError(_0x5b9b58,null));};exports['addImap']=function(_0x1f451a,_0x2f18ed,_0x15be2b){if(_0x1f451a[_0x4533('0x5b')]['id']){delete _0x1f451a[_0x4533('0x5b')]['id'];}return db['MailAccount'][_0x4533('0x59')]({'where':{'id':_0x1f451a[_0x4533('0x56')]['id']}})['then'](handleEntityNotFound(_0x2f18ed,null))[_0x4533('0x1d')](function(_0x465611){if(_0x465611){_0x1f451a['body'][_0x4533('0x64')]=_0x465611['id'];return db[_0x4533('0x3b')]['create'](_0x1f451a[_0x4533('0x5b')]);}})[_0x4533('0x1d')](respondWithResult(_0x2f18ed,null))[_0x4533('0x26')](handleError(_0x2f18ed,null));};exports[_0x4533('0x84')]=function(_0x599413,_0x1e6aec,_0x59ec71){return db['MailAccount']['findOne']({'where':{'id':_0x599413[_0x4533('0x56')]['id']}})[_0x4533('0x1d')](handleEntityNotFound(_0x1e6aec,null))['then'](function(_0x549b7f){if(_0x549b7f){return _0x549b7f['setImap'](null);}return null;})[_0x4533('0x1d')](respondWithStatusCode(_0x1e6aec,null))[_0x4533('0x26')](handleError(_0x1e6aec,null));};exports[_0x4533('0x85')]=function(_0x365db3,_0x1e69b0,_0x213475){return db[_0x4533('0x40')][_0x4533('0x6a')]({'where':{'id':_0x365db3[_0x4533('0x56')]['id']}})[_0x4533('0x1d')](handleEntityNotFound(_0x1e69b0,null))['then'](function(_0x17b9e2){if(_0x17b9e2){return _0x17b9e2[_0x4533('0x85')]();}return null;})[_0x4533('0x1d')](respondWithResult(_0x1e69b0,null))[_0x4533('0x26')](handleError(_0x1e69b0,null));};exports['addSmtp']=function(_0x367a97,_0x5c5e97,_0x194c48){if(_0x367a97[_0x4533('0x5b')]['id']){delete _0x367a97[_0x4533('0x5b')]['id'];}return db['MailAccount'][_0x4533('0x59')]({'where':{'id':_0x367a97[_0x4533('0x56')]['id']}})[_0x4533('0x1d')](handleEntityNotFound(_0x5c5e97,null))['then'](function(_0x4ed312){if(_0x4ed312){_0x367a97['body'][_0x4533('0x64')]=_0x4ed312['id'];return db['MailServerOut']['create'](_0x367a97[_0x4533('0x5b')]);}})[_0x4533('0x1d')](respondWithResult(_0x5c5e97,null))['catch'](handleError(_0x5c5e97,null));};exports[_0x4533('0x86')]=function(_0x17fe19,_0x217bf9,_0x423b8b){return db[_0x4533('0x40')][_0x4533('0x6a')]({'where':{'id':_0x17fe19[_0x4533('0x56')]['id']}})[_0x4533('0x1d')](handleEntityNotFound(_0x217bf9,null))['then'](function(_0x34d6d9){if(_0x34d6d9){return _0x34d6d9[_0x4533('0x87')](null);}return null;})[_0x4533('0x1d')](respondWithStatusCode(_0x217bf9,null))[_0x4533('0x26')](handleError(_0x217bf9,null));};exports['addInteraction']=function(_0x33f23f,_0x56f6d8,_0x180412){return db[_0x4533('0x88')][_0x4533('0x59')]({'where':{'id':_0x33f23f[_0x4533('0x56')]['id']}})[_0x4533('0x1d')](handleEntityNotFound(_0x56f6d8,null))['then'](function(_0x3bc9c8){if(_0x3bc9c8){return _0x3bc9c8[_0x4533('0x89')](_0x33f23f[_0x4533('0x5b')][_0x4533('0x6c')],_[_0x4533('0x8a')](_0x33f23f[_0x4533('0x5b')],[_0x4533('0x6c'),'id'])||{});}})[_0x4533('0x1d')](respondWithResult(_0x56f6d8,null))['catch'](handleError(_0x56f6d8,null));};exports['getInteractions']=function(_0x493114,_0x5884c0,_0x2819af){var _0x534437={'raw':![],'where':{}};var _0x4d9667={};var _0x3f9ad5={'count':0x0,'rows':[]};return db[_0x4533('0x40')][_0x4533('0x6a')]({'where':{'id':_0x493114[_0x4533('0x56')]['id']}})[_0x4533('0x1d')](handleEntityNotFound(_0x5884c0,null))[_0x4533('0x1d')](function(_0x4923ab){if(_0x4923ab){_0x4d9667[_0x4533('0x45')]=_['keys'](db[_0x4533('0x88')][_0x4533('0x41')]);_0x4d9667[_0x4533('0x46')]=_['keys'](_0x493114[_0x4533('0x46')]);_0x4d9667['filters']=_[_0x4533('0x48')](_0x4d9667[_0x4533('0x45')],_0x4d9667[_0x4533('0x46')]);_0x534437[_0x4533('0x4a')]=_['intersection'](_0x4d9667[_0x4533('0x45')],qs[_0x4533('0x49')](_0x493114[_0x4533('0x46')][_0x4533('0x49')]));_0x534437['attributes']=_0x534437['attributes'][_0x4533('0x4b')]?_0x534437[_0x4533('0x4a')]:_0x4d9667['model'];if(!_0x493114[_0x4533('0x46')][_0x4533('0x4c')](_0x4533('0x4d'))){_0x534437[_0x4533('0x2c')]=qs[_0x4533('0x2c')](_0x493114[_0x4533('0x46')][_0x4533('0x2c')]);_0x534437[_0x4533('0x2a')]=qs['offset'](_0x493114['query']['offset']);}_0x534437[_0x4533('0x61')]=qs[_0x4533('0x62')](_0x493114[_0x4533('0x46')][_0x4533('0x62')]);_0x534437[_0x4533('0x4e')]=qs[_0x4533('0x4f')](_[_0x4533('0x63')](_0x493114[_0x4533('0x46')],_0x4d9667[_0x4533('0x4f')]));_0x534437[_0x4533('0x4e')][_0x4533('0x64')]=_0x4923ab['id'];if(_0x493114[_0x4533('0x46')]['filter']){_0x534437[_0x4533('0x4e')]=_['merge'](_0x534437[_0x4533('0x4e')],{'$or':_[_0x4533('0x3f')](_0x534437[_0x4533('0x4a')],function(_0x8168f2){var _0x53730e={};_0x53730e[_0x8168f2]={'$like':'%'+_0x493114['query'][_0x4533('0x65')]+'%'};return _0x53730e;})});}_0x534437=_[_0x4533('0x50')]({},_0x534437,_0x493114[_0x4533('0x51')]);return db['MailInteraction'][_0x4533('0x2d')]({'where':_0x534437[_0x4533('0x4e')]})['then'](function(_0x274bb1){_0x3f9ad5[_0x4533('0x2d')]=_0x274bb1;if(_0x493114[_0x4533('0x46')][_0x4533('0x52')]){_0x534437[_0x4533('0x58')]=[{'model':db['CmContact'],'as':_0x4533('0x8b'),'required':![]},{'model':db[_0x4533('0x8c')],'as':'Owner','attributes':['name',_0x4533('0x8d'),'internal'],'required':![]},{'model':db[_0x4533('0x8e')],'as':'Tags','attributes':['id',_0x4533('0x38'),_0x4533('0x8f')],'where':_0x493114[_0x4533('0x46')][_0x4533('0x90')]?{'id':_0x493114[_0x4533('0x46')][_0x4533('0x90')]}:undefined,'required':_0x493114['query']['tag']?!![]:![]}];}return db['MailInteraction'][_0x4533('0x53')](_0x534437);})[_0x4533('0x1d')](function(_0x1c7f3d){_0x3f9ad5['rows']=_0x1c7f3d;return _0x3f9ad5;});}})[_0x4533('0x1d')](respondWithFilteredResult(_0x5884c0,_0x534437))['catch'](handleError(_0x5884c0,null));};exports[_0x4533('0x91')]=function(_0x1fbbba,_0x14b5e6,_0xa7f64f){return db['MailAccount'][_0x4533('0x6a')]({'where':{'id':_0x1fbbba[_0x4533('0x56')]['id']}})[_0x4533('0x1d')](handleEntityNotFound(_0x14b5e6,null))[_0x4533('0x1d')](function(_0x224f7e){if(_0x224f7e){return db['sequelize'][_0x4533('0x92')](function(_0x273f53){return db['MailApplication'][_0x4533('0x93')]({'where':{'MailAccountId':_0x1fbbba[_0x4533('0x56')]['id']},'transaction':_0x273f53})[_0x4533('0x1d')](function(_0x196816){var _0x2e21ef=_[_0x4533('0x3f')](_0x1fbbba['body'],function(_0x87cc02){_0x87cc02[_0x4533('0x64')]=_0x1fbbba[_0x4533('0x56')]['id'];return _0x87cc02;});return db[_0x4533('0x94')]['bulkCreate'](_0x2e21ef,{'transaction':_0x273f53});});})['then'](function(){return db[_0x4533('0x94')]['findAndCountAll']({'where':{'MailAccountId':_0x1fbbba[_0x4533('0x56')]['id']},'order':_0x4533('0x95')});});}})[_0x4533('0x1d')](respondWithResult(_0x14b5e6,null))[_0x4533('0x26')](handleError(_0x14b5e6,null));};exports[_0x4533('0x96')]=function(_0x400129,_0x89d96,_0x21784e){var _0xdeb451={};var _0x5f145c={};var _0x18e8ed;var _0xdffa2b;return db[_0x4533('0x40')][_0x4533('0x6a')]({'where':{'id':_0x400129[_0x4533('0x56')]['id']}})['then'](handleEntityNotFound(_0x89d96,null))[_0x4533('0x1d')](function(_0x4907ac){if(_0x4907ac){_0x18e8ed=_0x4907ac;_0x5f145c[_0x4533('0x45')]=_[_0x4533('0x47')](db[_0x4533('0x94')]['rawAttributes']);_0x5f145c[_0x4533('0x46')]=_[_0x4533('0x47')](_0x400129[_0x4533('0x46')]);_0x5f145c[_0x4533('0x4f')]=_[_0x4533('0x48')](_0x5f145c[_0x4533('0x45')],_0x5f145c[_0x4533('0x46')]);_0xdeb451[_0x4533('0x4a')]=_['intersection'](_0x5f145c[_0x4533('0x45')],qs[_0x4533('0x49')](_0x400129['query'][_0x4533('0x49')]));_0xdeb451[_0x4533('0x4a')]=_0xdeb451[_0x4533('0x4a')][_0x4533('0x4b')]?_0xdeb451[_0x4533('0x4a')]:_0x5f145c['model'];_0xdeb451[_0x4533('0x61')]=qs[_0x4533('0x62')](_0x400129[_0x4533('0x46')][_0x4533('0x62')]);_0xdeb451[_0x4533('0x4e')]=qs[_0x4533('0x4f')](_['pick'](_0x400129[_0x4533('0x46')],_0x5f145c[_0x4533('0x4f')]));if(_0x400129[_0x4533('0x46')][_0x4533('0x65')]){_0xdeb451[_0x4533('0x4e')]=_['merge'](_0xdeb451[_0x4533('0x4e')],{'$or':_[_0x4533('0x3f')](_0xdeb451['attributes'],function(_0x5dfa73){var _0x3dac13={};_0x3dac13[_0x5dfa73]={'$like':'%'+_0x400129[_0x4533('0x46')][_0x4533('0x65')]+'%'};return _0x3dac13;})});}_0xdeb451=_[_0x4533('0x50')]({},_0xdeb451,_0x400129[_0x4533('0x51')]);return _0x18e8ed[_0x4533('0x96')](_0xdeb451);}})[_0x4533('0x1d')](function(_0x2c3efc){if(_0x2c3efc){_0xdffa2b=_0x2c3efc[_0x4533('0x4b')];if(!_0x400129['query']['hasOwnProperty'](_0x4533('0x4d'))){_0xdeb451[_0x4533('0x2c')]=qs[_0x4533('0x2c')](_0x400129['query'][_0x4533('0x2c')]);_0xdeb451[_0x4533('0x2a')]=qs[_0x4533('0x2a')](_0x400129[_0x4533('0x46')][_0x4533('0x2a')]);}return _0x18e8ed[_0x4533('0x96')](_0xdeb451);}})['then'](function(_0x1e60aa){if(_0x1e60aa){return _0x1e60aa?{'count':_0xdffa2b,'rows':_0x1e60aa}:null;}})[_0x4533('0x1d')](respondWithResult(_0x89d96,null))[_0x4533('0x26')](handleError(_0x89d96,null));};exports[_0x4533('0x97')]=function(_0x21dea5,_0x26cdab,_0x4a38f8){var _0x4175b2={'raw':!![],'where':{}};var _0x8c77f={};var _0x570e55={'count':0x0,'rows':[]};return db[_0x4533('0x40')][_0x4533('0x6a')]({'where':{'id':_0x21dea5[_0x4533('0x56')]['id']}})[_0x4533('0x1d')](handleEntityNotFound(_0x26cdab,null))['then'](function(_0x5c6dc0){if(_0x5c6dc0){_0x8c77f[_0x4533('0x45')]=_[_0x4533('0x47')](db[_0x4533('0x98')][_0x4533('0x41')]);_0x8c77f[_0x4533('0x46')]=_[_0x4533('0x47')](_0x21dea5[_0x4533('0x46')]);_0x8c77f[_0x4533('0x4f')]=_[_0x4533('0x48')](_0x8c77f['model'],_0x8c77f[_0x4533('0x46')]);_0x4175b2['attributes']=_[_0x4533('0x48')](_0x8c77f[_0x4533('0x45')],qs[_0x4533('0x49')](_0x21dea5[_0x4533('0x46')]['fields']));_0x4175b2[_0x4533('0x4a')]=_0x4175b2['attributes']['length']?_0x4175b2[_0x4533('0x4a')]:_0x8c77f[_0x4533('0x45')];if(!_0x21dea5['query']['hasOwnProperty']('nolimit')){_0x4175b2['limit']=qs[_0x4533('0x2c')](_0x21dea5[_0x4533('0x46')]['limit']);_0x4175b2[_0x4533('0x2a')]=qs[_0x4533('0x2a')](_0x21dea5[_0x4533('0x46')]['offset']);}_0x4175b2[_0x4533('0x61')]=qs[_0x4533('0x62')](_0x21dea5[_0x4533('0x46')][_0x4533('0x62')]);_0x4175b2[_0x4533('0x4e')]=qs[_0x4533('0x4f')](_[_0x4533('0x63')](_0x21dea5[_0x4533('0x46')],_0x8c77f[_0x4533('0x4f')]));_0x4175b2['where'][_0x4533('0x64')]=_0x5c6dc0['id'];if(_0x21dea5[_0x4533('0x46')][_0x4533('0x65')]){_0x4175b2['where']=_['merge'](_0x4175b2[_0x4533('0x4e')],{'$or':_[_0x4533('0x3f')](_0x4175b2['attributes'],function(_0x52bfa4){var _0x525ae8={};_0x525ae8[_0x52bfa4]={'$like':'%'+_0x21dea5['query'][_0x4533('0x65')]+'%'};return _0x525ae8;})});}if(_0x21dea5[_0x4533('0x46')][_0x4533('0x99')]){var _0xd1cb22=_0x21dea5[_0x4533('0x46')]['$gte'][_0x4533('0x9a')](',');var _0x1f6d77={};_0x1f6d77[_0xd1cb22[0x0]]={'$gte':moment(_0xd1cb22[0x1])[_0x4533('0x9b')](_0x4533('0x9c'))};_0x4175b2[_0x4533('0x4e')]=_[_0x4533('0x50')](_0x4175b2[_0x4533('0x4e')],_0x1f6d77);}_0x4175b2=_[_0x4533('0x50')]({},_0x4175b2,_0x21dea5[_0x4533('0x51')]);return db[_0x4533('0x98')][_0x4533('0x2d')]({'where':_0x4175b2['where']})[_0x4533('0x1d')](function(_0x170a54){_0x570e55[_0x4533('0x2d')]=_0x170a54;if(_0x21dea5['query'][_0x4533('0x52')]){_0x4175b2['include']=[{'all':!![]}];}return db[_0x4533('0x98')][_0x4533('0x53')](_0x4175b2);})[_0x4533('0x1d')](function(_0x2331b9){if(_0x21dea5[_0x4533('0x46')][_0x4533('0x9d')]===_0x4533('0x9e')){for(var _0x360b7c=0x0;_0x360b7c<_0x2331b9[_0x4533('0x4b')];_0x360b7c++){_0x2331b9[_0x360b7c][_0x4533('0x5b')]=juice(_0x2331b9[_0x360b7c]['body']);}}_0x570e55['rows']=_0x2331b9;return _0x570e55;});}})['then'](respondWithFilteredResult(_0x26cdab,_0x4175b2))[_0x4533('0x26')](handleError(_0x26cdab,null));};exports[_0x4533('0x39')]=function(_0x272ed1,_0x120fd0,_0x21e4eb){var _0x17f1c2,_0x13e066={},_0x355f4c;if(_0x272ed1['body']['to']){_0x355f4c=_0x272ed1[_0x4533('0x5b')]['to']['split'](',')[0x0];}return db[_0x4533('0x40')][_0x4533('0x59')]({'where':{'id':_0x272ed1[_0x4533('0x56')]['id']},'include':[{'model':db['CmList'],'as':_0x4533('0x9f'),'include':[{'model':db[_0x4533('0xa0')],'as':'Contacts','where':{'email':_0x355f4c},'limit':0x1,'order':[[_0x4533('0xa1'),'DESC']]}]},{'model':db[_0x4533('0x3d')],'as':_0x4533('0x5c'),'raw':!![]}]})[_0x4533('0x1d')](handleEntityNotFound(_0x120fd0,null))[_0x4533('0x1d')](function(_0xbed84b){if(_0xbed84b){_0x17f1c2=_0xbed84b;if(_0xbed84b[_0x4533('0x5c')]){if(_[_0x4533('0x6f')](_0x272ed1['body'][_0x4533('0xa2')])){_0x272ed1[_0x4533('0x5b')][_0x4533('0xa2')]=util[_0x4533('0x9b')](_0x4533('0xa3'),_0xbed84b[_0x4533('0x38')],_0xbed84b[_0x4533('0x6d')]||_0xbed84b[_0x4533('0x5c')]['user']);}if(_0x272ed1[_0x4533('0x5b')][_0x4533('0xa4')]&&_0x272ed1[_0x4533('0x5b')]['attachments'][_0x4533('0x4b')]){for(var _0x3abcc3=0x0;_0x3abcc3<_0x272ed1[_0x4533('0x5b')]['attachments'][_0x4533('0x4b')];_0x3abcc3+=0x1){_0x272ed1['body'][_0x4533('0xa4')][_0x3abcc3]={'filename':_0x272ed1[_0x4533('0x5b')][_0x4533('0xa4')][_0x3abcc3][_0x4533('0x38')],'path':path[_0x4533('0xa5')](config[_0x4533('0xa6')],_0x4533('0xa7'),_0x272ed1[_0x4533('0x5b')][_0x4533('0xa4')][_0x3abcc3][_0x4533('0xa8')])};}}var _0x4f85a9={'tls':{'rejectUnauthorized':![]}};if(_[_0x4533('0x6f')](_0xbed84b[_0x4533('0x5c')][_0x4533('0x7b')])){if(_0xbed84b['Smtp'][_0x4533('0x78')]){_0x4f85a9[_0x4533('0xa9')]={'user':_0xbed84b['Smtp'][_0x4533('0x74')],'pass':_0xbed84b['Smtp'][_0x4533('0x7c')]};}_0x4f85a9[_0x4533('0x79')]=_0xbed84b[_0x4533('0x5c')][_0x4533('0x79')];_0x4f85a9[_0x4533('0x7a')]=_0xbed84b['Smtp']['port'];_0x4f85a9['secure']=_0xbed84b[_0x4533('0x5c')][_0x4533('0xaa')];}else{_0x4f85a9[_0x4533('0x7b')]=_0xbed84b[_0x4533('0x5c')][_0x4533('0x7b')];_0x4f85a9[_0x4533('0xa9')]={'user':_0xbed84b[_0x4533('0x5c')][_0x4533('0x74')],'pass':_0xbed84b['Smtp'][_0x4533('0x7c')]};}return respondWithRpcPromise(_0x4533('0xab'),_0x4533('0xac'),{'account':_0x4f85a9,'message':_0x272ed1['body']});}else{throw new Error(_0x4533('0xad'));}}})['then'](function(_0x12e84a){if(_0x12e84a){_0x13e066=_0x12e84a;if(_0x17f1c2['List']){if(_0x17f1c2[_0x4533('0x9f')]['Contacts'][_0x4533('0x4b')]){return _0x17f1c2[_0x4533('0x9f')]['Contacts'][0x0];}else{return db[_0x4533('0xa0')]['create'](_[_0x4533('0xae')](_0x272ed1['body'],{'firstName':_0x272ed1[_0x4533('0x5b')]['to'],'email':_0x272ed1[_0x4533('0x5b')]['to'],'phone':_0x272ed1['body']['to'],'ListId':_0x17f1c2[_0x4533('0x6e')]}));}}else{throw new Error('List\x20not\x20found');}}})['then'](function(_0x1dfe0d){if(_0x1dfe0d){var _0xbf0aea={'UserId':_0x272ed1['user']['id'],'ContactId':_0x1dfe0d['id'],'MailAccountId':_0x17f1c2['id'],'inReplyTo':_0x13e066[_0x4533('0xaf')],'to':_0x272ed1[_0x4533('0x5b')][_0x4533('0xa2')],'cc':_0x272ed1[_0x4533('0x5b')]['cc'],'subject':_0x272ed1[_0x4533('0x5b')][_0x4533('0xb0')],'attach':_0x272ed1[_0x4533('0x5b')][_0x4533('0xb1')],'firstMsgDirection':'out','lastMsgAt':moment()[_0x4533('0x9b')](_0x4533('0x9c')),'lastMsgDirection':_0x4533('0xb2'),'Messages':[_[_0x4533('0x50')](_0x272ed1[_0x4533('0x5b')],{'messageId':_0x13e066[_0x4533('0xaf')],'sentAt':moment()[_0x4533('0x9b')](_0x4533('0x9c')),'read':!![],'MailAccountId':_0x17f1c2['id'],'UserId':_0x272ed1[_0x4533('0x74')]['id'],'ContactId':_0x1dfe0d['id']})]};if(_0x272ed1[_0x4533('0x5b')][_0x4533('0xb3')]){_0xbf0aea=_[_0x4533('0x50')](_0xbf0aea,_0x272ed1[_0x4533('0x5b')][_0x4533('0xb3')]);}return db[_0x4533('0x88')][_0x4533('0x60')](_0xbf0aea,{'include':[{'model':db[_0x4533('0x98')],'as':_0x4533('0xb4')}]});}})[_0x4533('0x1d')](respondWithResult(_0x120fd0,null))[_0x4533('0x26')](handleError(_0x120fd0,null));};exports[_0x4533('0xb5')]=function(_0xbb550e,_0x179c9a,_0x56dbba){return db[_0x4533('0x40')]['find']({'where':{'id':_0xbb550e[_0x4533('0x56')]['id']},'include':[{'model':db[_0x4533('0x3d')],'as':_0x4533('0x5c'),'raw':!![]}]})['then'](handleEntityNotFound(_0x179c9a,null))['then'](function(_0x5a6525){if(_0x5a6525&&_0x5a6525['Smtp']){var _0xcedc6e={'id':_0x5a6525['id'],'tls':{'rejectUnauthorized':![]}};if(_0x5a6525['Smtp']['service']){_0xcedc6e[_0x4533('0x7b')]=_0x5a6525[_0x4533('0x5c')]['service'];}else{_0xcedc6e[_0x4533('0x79')]=_0x5a6525['Smtp']['host'];_0xcedc6e[_0x4533('0x7a')]=_0x5a6525[_0x4533('0x5c')][_0x4533('0x7a')];_0xcedc6e[_0x4533('0xaa')]=_0x5a6525['Smtp'][_0x4533('0xaa')];}if(_0x5a6525['Smtp']['authentication']){_0xcedc6e[_0x4533('0xa9')]={'user':_0x5a6525[_0x4533('0x5c')][_0x4533('0x74')],'pass':_0x5a6525[_0x4533('0x5c')][_0x4533('0x7c')]};}return respondWithRpcPromise(_0x4533('0xb6'),_0x4533('0xb5'),{'account':_0xcedc6e});}})['then'](respondWithResult(_0x179c9a,null))[_0x4533('0x26')](handleError(_0x179c9a,null));};exports['destroy']=function(_0x412be0,_0x4a1b3e){return db[_0x4533('0x40')]['find']({'where':{'id':_0x412be0[_0x4533('0x56')]['id']}})[_0x4533('0x1d')](handleEntityNotFound(_0x4a1b3e,null))[_0x4533('0x1d')](function(_0x52f245){if(_0x52f245&&_0x52f245[_0x4533('0x7b')]){throw new db['Sequelize'][(_0x4533('0xb7'))]('You\x20can\x27t\x20remove\x20the\x20mail\x20service\x20account');}return _0x52f245;})[_0x4533('0x1d')](removeEntity(_0x4a1b3e,null))[_0x4533('0x26')](handleError(_0x4a1b3e,null));};exports[_0x4533('0xb8')]=function(_0x47afae,_0x1a2268,_0x26ef63){return db['MailAccount'][_0x4533('0x59')]({'where':{'id':_0x47afae[_0x4533('0x56')]['id']}})[_0x4533('0x1d')](handleEntityNotFound(_0x1a2268,null))[_0x4533('0x1d')](function(_0x389328){if(_0x389328){return _0x389328[_0x4533('0xb8')](_0x47afae[_0x4533('0x5b')][_0x4533('0x6c')],_['omit'](_0x47afae[_0x4533('0x5b')],[_0x4533('0x6c'),'id'])||{})['spread'](function(_0x40284d){for(var _0x38ec2e=0x0;_0x38ec2e<_0x47afae[_0x4533('0x5b')]['ids'][_0x4533('0x4b')];_0x38ec2e+=0x1){socket[_0x4533('0xb9')](_0x4533('0xba'),{'UserId':_0x47afae[_0x4533('0x5b')][_0x4533('0x6c')][_0x38ec2e],'MailAccountId':_0x47afae['params']['id']});}return _0x40284d;});}})[_0x4533('0x1d')](respondWithResult(_0x1a2268,null))[_0x4533('0x26')](handleError(_0x1a2268,null));};exports[_0x4533('0xbb')]=function(_0x42ce59,_0x583459,_0x3bedc3){return db[_0x4533('0x40')]['find']({'where':{'id':_0x42ce59[_0x4533('0x56')]['id']}})['then'](handleEntityNotFound(_0x583459,null))[_0x4533('0x1d')](function(_0x3254cd){if(_0x3254cd){return _0x3254cd['removeAgents'](_0x42ce59[_0x4533('0x46')][_0x4533('0x6c')])['then'](function(){if(_['isArray'](_0x42ce59[_0x4533('0x46')]['ids'])){for(var _0x14e2ff=0x0;_0x14e2ff<_0x42ce59['query'][_0x4533('0x6c')][_0x4533('0x4b')];_0x14e2ff+=0x1){socket['emit']('userMailAccount:remove',{'UserId':Number(_0x42ce59['query']['ids'][_0x14e2ff]),'MailAccountId':Number(_0x42ce59[_0x4533('0x56')]['id'])});}}else{socket[_0x4533('0xb9')](_0x4533('0xbc'),{'UserId':Number(_0x42ce59[_0x4533('0x46')][_0x4533('0x6c')]),'MailAccountId':Number(_0x42ce59[_0x4533('0x56')]['id'])});}});}})['then'](respondWithStatusCode(_0x583459,null))[_0x4533('0x26')](handleError(_0x583459,null));};exports[_0x4533('0xbd')]=function(_0x1c23d0,_0x435c25,_0x4e55ee){var _0x51c1cc={};var _0x174893={};var _0x373ab2;var _0x3d3aad;return db[_0x4533('0x40')]['findOne']({'where':{'id':_0x1c23d0[_0x4533('0x56')]['id']}})[_0x4533('0x1d')](handleEntityNotFound(_0x435c25,null))[_0x4533('0x1d')](function(_0x1e5a46){if(_0x1e5a46){_0x373ab2=_0x1e5a46;_0x174893[_0x4533('0x45')]=_[_0x4533('0x47')](db[_0x4533('0x8c')]['rawAttributes']);_0x174893[_0x4533('0x46')]=_[_0x4533('0x47')](_0x1c23d0['query']);_0x174893[_0x4533('0x4f')]=_[_0x4533('0x48')](_0x174893[_0x4533('0x45')],_0x174893[_0x4533('0x46')]);_0x51c1cc[_0x4533('0x4a')]=_['intersection'](_0x174893[_0x4533('0x45')],qs[_0x4533('0x49')](_0x1c23d0['query'][_0x4533('0x49')]));_0x51c1cc[_0x4533('0x4a')]=_0x51c1cc[_0x4533('0x4a')]['length']?_0x51c1cc[_0x4533('0x4a')]:_0x174893[_0x4533('0x45')];_0x51c1cc[_0x4533('0x61')]=qs[_0x4533('0x62')](_0x1c23d0[_0x4533('0x46')][_0x4533('0x62')]);_0x51c1cc[_0x4533('0x4e')]=qs['filters'](_[_0x4533('0x63')](_0x1c23d0[_0x4533('0x46')],_0x174893[_0x4533('0x4f')]));if(_0x1c23d0[_0x4533('0x46')][_0x4533('0x65')]){_0x51c1cc[_0x4533('0x4e')]=_[_0x4533('0x50')](_0x51c1cc['where'],{'$or':_[_0x4533('0x3f')](_0x51c1cc[_0x4533('0x4a')],function(_0xe3b06d){var _0x1bd9ae={};_0x1bd9ae[_0xe3b06d]={'$like':'%'+_0x1c23d0['query'][_0x4533('0x65')]+'%'};return _0x1bd9ae;})});}_0x51c1cc=_['merge']({},_0x51c1cc,_0x1c23d0[_0x4533('0x51')]);return _0x373ab2['getAgents'](_0x51c1cc);}})[_0x4533('0x1d')](function(_0x439855){if(_0x439855){_0x3d3aad=_0x439855[_0x4533('0x4b')];if(!_0x1c23d0[_0x4533('0x46')][_0x4533('0x4c')](_0x4533('0x4d'))){_0x51c1cc['limit']=qs[_0x4533('0x2c')](_0x1c23d0[_0x4533('0x46')][_0x4533('0x2c')]);_0x51c1cc[_0x4533('0x2a')]=qs[_0x4533('0x2a')](_0x1c23d0[_0x4533('0x46')][_0x4533('0x2a')]);}return _0x373ab2[_0x4533('0xbd')](_0x51c1cc);}})['then'](function(_0x562b76){if(_0x562b76){return _0x562b76?{'count':_0x3d3aad,'rows':_0x562b76}:null;}})['then'](respondWithResult(_0x435c25,null))['catch'](handleError(_0x435c25,null));}; \ No newline at end of file diff --git a/server/api/mailAccount/mailAccount.events.js b/server/api/mailAccount/mailAccount.events.js index 7486201..977a2be 100644 --- a/server/api/mailAccount/mailAccount.events.js +++ b/server/api/mailAccount/mailAccount.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe944=['events','setMaxListeners','remove','emit','hook','exports'];(function(_0x46698a,_0x8de1e4){var _0x356db0=function(_0x19e83c){while(--_0x19e83c){_0x46698a['push'](_0x46698a['shift']());}};_0x356db0(++_0x8de1e4);}(_0xe944,0x174));var _0x4e94=function(_0xae8ff3,_0x24825f){_0xae8ff3=_0xae8ff3-0x0;var _0x41266d=_0xe944[_0xae8ff3];return _0x41266d;};'use strict';var EventEmitter=require(_0x4e94('0x0'));var MailAccount=require('../../mysqldb')['db']['MailAccount'];var MailAccountEvents=new EventEmitter();MailAccountEvents[_0x4e94('0x1')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0x4e94('0x2')};function emitEvent(_0x4d19d3){return function(_0x4edb6f,_0x10029f,_0xe47674){MailAccountEvents[_0x4e94('0x3')](_0x4d19d3+':'+_0x4edb6f['id'],_0x4edb6f);MailAccountEvents[_0x4e94('0x3')](_0x4d19d3,_0x4edb6f);_0xe47674(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];MailAccount[_0x4e94('0x4')](e,emitEvent(event));}}module[_0x4e94('0x5')]=MailAccountEvents; \ No newline at end of file +var _0x2d85=['events','../../mysqldb','MailAccount','setMaxListeners','save','remove','hasOwnProperty','hook','exports'];(function(_0x5d3dd5,_0x22d160){var _0x41c2b5=function(_0xc84276){while(--_0xc84276){_0x5d3dd5['push'](_0x5d3dd5['shift']());}};_0x41c2b5(++_0x22d160);}(_0x2d85,0xd8));var _0x52d8=function(_0x568e4d,_0x58602e){_0x568e4d=_0x568e4d-0x0;var _0x1820ed=_0x2d85[_0x568e4d];return _0x1820ed;};'use strict';var EventEmitter=require(_0x52d8('0x0'));var MailAccount=require(_0x52d8('0x1'))['db'][_0x52d8('0x2')];var MailAccountEvents=new EventEmitter();MailAccountEvents[_0x52d8('0x3')](0x0);var events={'afterCreate':_0x52d8('0x4'),'afterUpdate':'update','afterDestroy':_0x52d8('0x5')};function emitEvent(_0x543d20){return function(_0x406f82,_0x1607d6,_0x5f2076){MailAccountEvents['emit'](_0x543d20+':'+_0x406f82['id'],_0x406f82);MailAccountEvents['emit'](_0x543d20,_0x406f82);_0x5f2076(null);};}for(var e in events){if(events[_0x52d8('0x6')](e)){var event=events[e];MailAccount[_0x52d8('0x7')](e,emitEvent(event));}}module[_0x52d8('0x8')]=MailAccountEvents; \ No newline at end of file diff --git a/server/api/mailAccount/mailAccount.model.js b/server/api/mailAccount/mailAccount.model.js index d3a1cf0..02f2397 100644 --- a/server/api/mailAccount/mailAccount.model.js +++ b/server/api/mailAccount/mailAccount.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd3b2=['moment','request-promise','path','rimraf','./mailAccount.attributes','exports','define','MailAccount','mail_accounts','lodash','../../config/logger','api'];(function(_0x45aca3,_0x2dc880){var _0x540d06=function(_0x1ca425){while(--_0x1ca425){_0x45aca3['push'](_0x45aca3['shift']());}};_0x540d06(++_0x2dc880);}(_0xd3b2,0x1ad));var _0x2d3b=function(_0x587aa3,_0x4e097d){_0x587aa3=_0x587aa3-0x0;var _0x50cb3c=_0xd3b2[_0x587aa3];return _0x50cb3c;};'use strict';var _=require(_0x2d3b('0x0'));var util=require('util');var logger=require(_0x2d3b('0x1'))(_0x2d3b('0x2'));var moment=require(_0x2d3b('0x3'));var BPromise=require('bluebird');var rp=require(_0x2d3b('0x4'));var fs=require('fs');var path=require(_0x2d3b('0x5'));var rimraf=require(_0x2d3b('0x6'));var config=require('../../config/environment');var attributes=require(_0x2d3b('0x7'));module[_0x2d3b('0x8')]=function(_0x3fd710,_0x25c539){return _0x3fd710[_0x2d3b('0x9')](_0x2d3b('0xa'),attributes,{'tableName':_0x2d3b('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xfb68=['path','rimraf','../../config/environment','./mailAccount.attributes','exports','mail_accounts','lodash','util','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x2a6472,_0x5ec3f0){var _0x211721=function(_0xcc26ae){while(--_0xcc26ae){_0x2a6472['push'](_0x2a6472['shift']());}};_0x211721(++_0x5ec3f0);}(_0xfb68,0x1e7));var _0x8fb6=function(_0x183bc2,_0x53f80b){_0x183bc2=_0x183bc2-0x0;var _0x3bdeb3=_0xfb68[_0x183bc2];return _0x3bdeb3;};'use strict';var _=require(_0x8fb6('0x0'));var util=require(_0x8fb6('0x1'));var logger=require(_0x8fb6('0x2'))(_0x8fb6('0x3'));var moment=require(_0x8fb6('0x4'));var BPromise=require(_0x8fb6('0x5'));var rp=require(_0x8fb6('0x6'));var fs=require('fs');var path=require(_0x8fb6('0x7'));var rimraf=require(_0x8fb6('0x8'));var config=require(_0x8fb6('0x9'));var attributes=require(_0x8fb6('0xa'));module[_0x8fb6('0xb')]=function(_0x5ae98c,_0x2b7acf){return _0x5ae98c['define']('MailAccount',attributes,{'tableName':_0x8fb6('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/mailAccount/mailAccount.rpc.js b/server/api/mailAccount/mailAccount.rpc.js index 3d9350a..97df84f 100644 --- a/server/api/mailAccount/mailAccount.rpc.js +++ b/server/api/mailAccount/mailAccount.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x93dc=['attachments','originTo','originCc','ChatWebsiteId','originChannel','Email','Attachments','interaction','UserId','name','unshift','agent','Start','startRouting','moment','bluebird','randomstring','ioredis','../../config/utils','rpc','../../config/environment','client','redis','defaults','localhost','socket.io-emitter','./mailAccount.socket','request','then','info','request\x20sent','stringify','error','MailAccount,\x20%s,\x20%s','message','result','catch','GetMailAccount','MailAccount','findAll','options','raw','where','attributes','limit','include','map','model','debug','ShowMailAccount','find','NotifyMailAccount','mail','difference','keys','createdAt','updatedAt','ListId','body','from','from\x20is\x20mandatory','body\x20is\x20mandatory\x20and\x20not\x20empty','isNil','mapKey','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','account','List','Contacts','DESC','MailApplication','Applications','MailServerOut','Smtp','get','omit','applications','list','asc','autoclose','push','length','close','*,*,*,*','create','List\x20not\x20found','messageId','subject','attach','format','YYYY-MM-DD\x20HH:mm:ss','MailInteraction','MailMessage','Messages','Contact\x20not\x20found','spread'];(function(_0x521d75,_0x30100c){var _0x272438=function(_0x47f1ca){while(--_0x47f1ca){_0x521d75['push'](_0x521d75['shift']());}};_0x272438(++_0x30100c);}(_0x93dc,0x1f3));var _0xc93d=function(_0x5e4a21,_0x2699d0){_0x5e4a21=_0x5e4a21-0x0;var _0x333346=_0x93dc[_0x5e4a21];return _0x333346;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xc93d('0x0'));var BPromise=require(_0xc93d('0x1'));var rs=require(_0xc93d('0x2'));var fs=require('fs');var Redis=require(_0xc93d('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0xc93d('0x4'));var logger=require('../../config/logger')(_0xc93d('0x5'));var config=require(_0xc93d('0x6'));var jayson=require('jayson/promise');var client=jayson[_0xc93d('0x7')]['http']({'port':0x232c});config[_0xc93d('0x8')]=_[_0xc93d('0x9')](config[_0xc93d('0x8')],{'host':_0xc93d('0xa'),'port':0x18eb});var socket=require(_0xc93d('0xb'))(new Redis(config[_0xc93d('0x8')]));require(_0xc93d('0xc'))['register'](socket);function respondWithRpcPromise(_0x1a1549,_0x216b4a,_0x188ad0){return new BPromise(function(_0xef7ac9,_0x21799e){return client[_0xc93d('0xd')](_0x1a1549,_0x188ad0)[_0xc93d('0xe')](function(_0x16d90e){logger[_0xc93d('0xf')]('MailAccount,\x20%s,\x20%s',_0x216b4a,_0xc93d('0x10'));logger['debug']('MailAccount,\x20%s,\x20%s,\x20%s',_0x216b4a,_0xc93d('0x10'),JSON[_0xc93d('0x11')](_0x16d90e));if(_0x16d90e[_0xc93d('0x12')]){if(_0x16d90e[_0xc93d('0x12')]['code']===0x1f4){logger['error'](_0xc93d('0x13'),_0x216b4a,_0x16d90e[_0xc93d('0x12')][_0xc93d('0x14')]);return _0x21799e(_0x16d90e[_0xc93d('0x12')][_0xc93d('0x14')]);}logger[_0xc93d('0x12')](_0xc93d('0x13'),_0x216b4a,_0x16d90e[_0xc93d('0x12')][_0xc93d('0x14')]);return _0xef7ac9(_0x16d90e[_0xc93d('0x12')][_0xc93d('0x14')]);}else{logger[_0xc93d('0xf')]('MailAccount,\x20%s,\x20%s',_0x216b4a,'request\x20sent');_0xef7ac9(_0x16d90e[_0xc93d('0x15')][_0xc93d('0x14')]);}})[_0xc93d('0x16')](function(_0x11781d){logger[_0xc93d('0x12')]('MailAccount,\x20%s,\x20%s',_0x216b4a,_0x11781d);_0x21799e(_0x11781d);});});}exports[_0xc93d('0x17')]=function(_0x31e2cf){var _0x5f1ad0=this;return new Promise(function(_0x24c24e,_0x221a5b){return db[_0xc93d('0x18')][_0xc93d('0x19')]({'raw':_0x31e2cf[_0xc93d('0x1a')]?_0x31e2cf[_0xc93d('0x1a')][_0xc93d('0x1b')]===undefined?!![]:![]:!![],'where':_0x31e2cf[_0xc93d('0x1a')]?_0x31e2cf[_0xc93d('0x1a')][_0xc93d('0x1c')]||null:null,'attributes':_0x31e2cf[_0xc93d('0x1a')]?_0x31e2cf['options'][_0xc93d('0x1d')]||null:null,'limit':_0x31e2cf[_0xc93d('0x1a')]?_0x31e2cf[_0xc93d('0x1a')][_0xc93d('0x1e')]||null:null,'include':_0x31e2cf[_0xc93d('0x1a')]?_0x31e2cf[_0xc93d('0x1a')][_0xc93d('0x1f')]?_[_0xc93d('0x20')](_0x31e2cf[_0xc93d('0x1a')]['include'],function(_0x3ed111){return{'model':db[_0x3ed111[_0xc93d('0x21')]],'as':_0x3ed111['as'],'attributes':_0x3ed111[_0xc93d('0x1d')],'include':_0x3ed111[_0xc93d('0x1f')]?_[_0xc93d('0x20')](_0x3ed111['include'],function(_0xd11bf8){return{'model':db[_0xd11bf8[_0xc93d('0x21')]],'as':_0xd11bf8['as'],'attributes':_0xd11bf8[_0xc93d('0x1d')],'include':_0xd11bf8[_0xc93d('0x1f')]?_[_0xc93d('0x20')](_0xd11bf8['include'],function(_0x4c89ed){return{'model':db[_0x4c89ed['model']],'as':_0x4c89ed['as'],'attributes':_0x4c89ed[_0xc93d('0x1d')]};}):[]};}):[]};}):[]:[]})[_0xc93d('0xe')](function(_0x235db1){logger['info'](_0xc93d('0x17'),_0x31e2cf);logger[_0xc93d('0x22')]('GetMailAccount',_0x31e2cf,JSON['stringify'](_0x235db1));_0x24c24e(_0x235db1);})[_0xc93d('0x16')](function(_0x10e259){logger['error'](_0xc93d('0x17'),_0x10e259['message'],_0x31e2cf);_0x221a5b(_0x5f1ad0['error'](0x1f4,_0x10e259['message']));});});};exports[_0xc93d('0x23')]=function(_0x35d10f){var _0x36d23=this;return new Promise(function(_0x7c88c9,_0x14b66e){return db['MailAccount'][_0xc93d('0x24')]({'raw':_0x35d10f[_0xc93d('0x1a')]?_0x35d10f[_0xc93d('0x1a')][_0xc93d('0x1b')]===undefined?!![]:![]:!![],'where':_0x35d10f[_0xc93d('0x1a')]?_0x35d10f[_0xc93d('0x1a')][_0xc93d('0x1c')]||null:null,'attributes':_0x35d10f[_0xc93d('0x1a')]?_0x35d10f[_0xc93d('0x1a')][_0xc93d('0x1d')]||null:null,'include':_0x35d10f[_0xc93d('0x1a')]?_0x35d10f[_0xc93d('0x1a')][_0xc93d('0x1f')]?_[_0xc93d('0x20')](_0x35d10f['options'][_0xc93d('0x1f')],function(_0x167345){return{'model':db[_0x167345['model']],'as':_0x167345['as'],'attributes':_0x167345['attributes'],'include':_0x167345[_0xc93d('0x1f')]?_[_0xc93d('0x20')](_0x167345[_0xc93d('0x1f')],function(_0x900f63){return{'model':db[_0x900f63[_0xc93d('0x21')]],'as':_0x900f63['as'],'attributes':_0x900f63[_0xc93d('0x1d')],'include':_0x900f63['include']?_[_0xc93d('0x20')](_0x900f63[_0xc93d('0x1f')],function(_0x215641){return{'model':db[_0x215641['model']],'as':_0x215641['as'],'attributes':_0x215641['attributes']};}):[]};}):[]};}):[]:[]})[_0xc93d('0xe')](function(_0x2df0a1){logger[_0xc93d('0xf')](_0xc93d('0x23'),_0x35d10f);logger[_0xc93d('0x22')](_0xc93d('0x23'),_0x35d10f,JSON[_0xc93d('0x11')](_0x2df0a1));_0x7c88c9(_0x2df0a1);})[_0xc93d('0x16')](function(_0x463153){logger[_0xc93d('0x12')]('ShowMailAccount',_0x463153[_0xc93d('0x14')],_0x35d10f);_0x14b66e(_0x36d23[_0xc93d('0x12')](0x1f4,_0x463153['message']));});});};exports[_0xc93d('0x25')]=function(_0x50d084){var _0x207519=this;return new Promise(function(_0xd42f78,_0x138463){var _0x3f8dea={'body':_0x50d084['body'],'channel':_0xc93d('0x26')};var _0x1a0994=_[_0xc93d('0x27')](_[_0xc93d('0x28')](db['CmContact']['rawAttributes']),[_0xc93d('0x29'),_0xc93d('0x2a'),'CompanyId',_0xc93d('0x2b')]);var _0x5907c1=![];if(_0x50d084[_0xc93d('0x2c')]['id']){delete _0x50d084[_0xc93d('0x2c')]['id'];}if(_['isNil'](_0x50d084[_0xc93d('0x2c')][_0xc93d('0x2d')])){return _0x138463(_0x207519[_0xc93d('0x12')](0x1f4,_0xc93d('0x2e')));}if(_['isNil'](_0x50d084[_0xc93d('0x2c')]['body'])||_0x50d084[_0xc93d('0x2c')][_0xc93d('0x2c')]===''){return _0x138463(_0x207519[_0xc93d('0x12')](0x1f4,_0xc93d('0x2f')));}if(_[_0xc93d('0x30')](_0x50d084[_0xc93d('0x2c')][_0xc93d('0x31')])){return _0x138463(_0x207519[_0xc93d('0x12')](0x1f4,_0xc93d('0x32')+_0x1a0994));}if(!_[_0xc93d('0x33')](_0x1a0994,_0x50d084['body'][_0xc93d('0x31')])){return _0x138463(_0x207519[_0xc93d('0x12')](0x1f4,_0xc93d('0x34')+_0x1a0994));}var _0x1af540={};_0x1af540[_0x50d084['body'][_0xc93d('0x31')]]=_0x50d084[_0xc93d('0x2c')][_0xc93d('0x2d')];return db['MailAccount'][_0xc93d('0x24')]({'where':{'id':_0x50d084[_0xc93d('0x35')]['id']},'include':[{'model':db['CmList'],'as':_0xc93d('0x36'),'include':[{'model':db['CmContact'],'as':_0xc93d('0x37'),'where':_0x1af540,'limit':0x1,'order':[[_0xc93d('0x2a'),_0xc93d('0x38')]]}]},{'model':db[_0xc93d('0x39')],'as':_0xc93d('0x3a')},{'model':db[_0xc93d('0x3b')],'as':_0xc93d('0x3c')}]})['then'](function(_0x38ae53){if(_0x38ae53&&_0x38ae53[_0xc93d('0x36')]){var _0x325f81=_0x38ae53[_0xc93d('0x3d')]({'plain':!![]});_0x3f8dea[_0xc93d('0x35')]=_[_0xc93d('0x3e')](_0x325f81,[_0xc93d('0x3a'),_0xc93d('0x36')]);_0x3f8dea[_0xc93d('0x3f')]=_0x325f81[_0xc93d('0x3a')];_0x3f8dea[_0xc93d('0x40')]=_0x325f81[_0xc93d('0x36')];_0x3f8dea['applications']=_['orderBy'](_0x3f8dea[_0xc93d('0x3f')],['priority'],[_0xc93d('0x41')]);if(_0x3f8dea['account']&&_0x3f8dea['account'][_0xc93d('0x42')]){_0x3f8dea[_0xc93d('0x3f')][_0xc93d('0x43')]({'id':0x0,'priority':_0x3f8dea['applications'][_0xc93d('0x44')]+0x1,'app':_0xc93d('0x45'),'appdata':_0xc93d('0x42'),'interval':_0xc93d('0x46')});}if(_0x3f8dea[_0xc93d('0x35')]['Applications']){delete _0x3f8dea['account'][_0xc93d('0x3a')];}if(_0x3f8dea[_0xc93d('0x35')][_0xc93d('0x36')]){delete _0x3f8dea[_0xc93d('0x35')][_0xc93d('0x36')];}if(_0x325f81[_0xc93d('0x36')][_0xc93d('0x37')][_0xc93d('0x44')]){return _0x325f81['List']['Contacts'][0x0];}var _0x5395c6=_[_0xc93d('0x9')](_0x50d084[_0xc93d('0x2c')],{'firstName':_0x50d084[_0xc93d('0x2c')][_0xc93d('0x2d')],'ListId':_0x325f81[_0xc93d('0x2b')]});_0x5395c6[_0x50d084[_0xc93d('0x2c')][_0xc93d('0x31')]]=_0x50d084[_0xc93d('0x2c')]['from'];return db['CmContact'][_0xc93d('0x47')](_0x5395c6);}else{throw new Error(_0xc93d('0x48'));}})[_0xc93d('0xe')](function(_0xaa02d6){_0x3f8dea['contact']=_0xaa02d6;if(_0xaa02d6){if(!_0x50d084[_0xc93d('0x2c')][_0xc93d('0x14')][_0xc93d('0x49')]){_0x50d084['body']['message']['messageId']=rs['generate']()+'\x20'+_0x50d084[_0xc93d('0x2c')][_0xc93d('0x14')]['from'];}var _0x575c63={'ContactId':_0xaa02d6['id'],'MailAccountId':_0x50d084[_0xc93d('0x35')]['id'],'inReplyTo':_0x50d084[_0xc93d('0x2c')][_0xc93d('0x14')]['messageId'],'to':_0x50d084[_0xc93d('0x2c')][_0xc93d('0x14')][_0xc93d('0x2d')],'cc':_0x50d084['body'][_0xc93d('0x14')]['cc'],'subject':_0x50d084[_0xc93d('0x2c')][_0xc93d('0x14')][_0xc93d('0x4a')],'attach':_0x50d084[_0xc93d('0x2c')][_0xc93d('0x14')][_0xc93d('0x4b')],'lastMsgAt':moment()[_0xc93d('0x4c')](_0xc93d('0x4d')),'lastMsgDirection':'in'};return db[_0xc93d('0x4e')][_0xc93d('0x24')]({'where':{'closed':![],'MailAccountId':_0x50d084['account']['id']},'include':[{'model':db[_0xc93d('0x4f')],'as':_0xc93d('0x50'),'attributes':[_0xc93d('0x49')],'where':{'messageId':_0x50d084[_0xc93d('0x2c')][_0xc93d('0x14')]['inReplyTo']}}]})[_0xc93d('0xe')](function(_0x102be8){if(_0x102be8){return[_0x102be8,![]];}return db[_0xc93d('0x4e')][_0xc93d('0x47')](_0x575c63)[_0xc93d('0xe')](function(_0x4ad5d4){return[_0x4ad5d4,!![]];});});}else{throw new Error(_0xc93d('0x51'));}})[_0xc93d('0x52')](function(_0x2f6276,_0x3d3a25){if(_0x2f6276){_0x5907c1=_0x3d3a25;if(!_0x3d3a25){return _0x2f6276['update']({'inReplyTo':_0x50d084['body'][_0xc93d('0x14')][_0xc93d('0x49')],'to':_0x50d084[_0xc93d('0x2c')]['message']['from'],'cc':_0x50d084[_0xc93d('0x2c')][_0xc93d('0x14')]['cc'],'subject':_0x50d084[_0xc93d('0x2c')][_0xc93d('0x14')][_0xc93d('0x4a')],'attach':_0x2f6276['attach']?_0x2f6276[_0xc93d('0x4b')]:_0x50d084['body'][_0xc93d('0x14')]['attach'],'substatus':null,'substatusAt':moment()['format'](_0xc93d('0x4d')),'lastMsgAt':moment()[_0xc93d('0x4c')](_0xc93d('0x4d')),'lastMsgDirection':'in'});}else{return _0x2f6276;}}})[_0xc93d('0xe')](function(_0x2de017){_0x3f8dea['interaction']=_0x2de017[_0xc93d('0x3d')]({'plain':!![]});_0x3f8dea['interaction']['created']=_0x5907c1;return db[_0xc93d('0x4f')][_0xc93d('0x47')]({'body':_0x50d084[_0xc93d('0x2c')][_0xc93d('0x2c')],'MailAccountId':_0x50d084['account']['id'],'MailInteractionId':_0x2de017['id'],'direction':'in','ContactId':_0x3f8dea['contact']['id'],'messageId':_0x50d084[_0xc93d('0x2c')][_0xc93d('0x14')][_0xc93d('0x49')],'from':_0x50d084[_0xc93d('0x2c')][_0xc93d('0x14')][_0xc93d('0x2d')],'to':_0x50d084['body'][_0xc93d('0x14')]['to'],'cc':_0x50d084[_0xc93d('0x2c')]['message']['cc'],'subject':_0x50d084[_0xc93d('0x2c')][_0xc93d('0x14')][_0xc93d('0x4a')],'attach':_0x50d084[_0xc93d('0x2c')]['message'][_0xc93d('0x4b')],'Attachments':_0x50d084['body'][_0xc93d('0x14')][_0xc93d('0x53')],'originTo':_0x50d084[_0xc93d('0x2c')][_0xc93d('0x14')][_0xc93d('0x54')],'originCc':_0x50d084['body'][_0xc93d('0x14')][_0xc93d('0x55')],'bcc':_0x50d084[_0xc93d('0x2c')][_0xc93d('0x14')]['bcc'],'ChatWebsiteId':_0x50d084[_0xc93d('0x2c')][_0xc93d('0x14')][_0xc93d('0x56')]||null,'originChannel':_0x50d084['body'][_0xc93d('0x14')][_0xc93d('0x57')]||_0xc93d('0x58'),'ChatOfflineMessageId':_0x50d084['body'][_0xc93d('0x14')]['ChatOfflineMessageId']||null},{'include':[{'model':db['Attachment'],'as':_0xc93d('0x59')}]});})[_0xc93d('0xe')](function(_0xe89b4b){_0x3f8dea[_0xc93d('0x14')]=_0xe89b4b;if(_0x3f8dea[_0xc93d('0x5a')][_0xc93d('0x5b')]){return db['User']['find']({'attributes':['id',_0xc93d('0x5c')],'where':{'id':_0x3f8dea[_0xc93d('0x5a')]['UserId']}})[_0xc93d('0xe')](function(_0x265498){if(_0x265498){_0x3f8dea[_0xc93d('0x3f')][_0xc93d('0x5d')]({'id':0x0,'priority':0x0,'app':_0xc93d('0x5e'),'appdata':_0x265498[_0xc93d('0x5c')]+','+(_0x3f8dea['account']['waitForTheAssignedAgent']||0xa),'interval':_0xc93d('0x46')});}return respondWithRpcPromise(_0xc93d('0x5f'),_0xc93d('0x60'),_0x3f8dea);});}return respondWithRpcPromise(_0xc93d('0x5f'),_0xc93d('0x60'),_0x3f8dea);})['then'](function(_0x34196e){_0xd42f78(_0x34196e);})[_0xc93d('0x16')](function(_0x5bdbb4){_0x138463(_0x207519['error'](0x1f4,_0x5bdbb4[_0xc93d('0x14')]));});});}; \ No newline at end of file +var _0x57b9=['agent','waitForTheAssignedAgent','startRouting','Start','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','register','request','then','request\x20sent','debug','error','code','MailAccount,\x20%s,\x20%s','message','info','catch','MailAccount','options','raw','where','attributes','limit','include','map','model','GetMailAccount','stringify','ShowMailAccount','find','NotifyMailAccount','body','mail','keys','rawAttributes','createdAt','updatedAt','ListId','from','isNil','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','account','CmContact','Contacts','MailApplication','MailServerOut','Smtp','List','omit','Applications','applications','orderBy','asc','autoclose','push','length','close','*,*,*,*','create','contact','messageId','format','MailInteraction','MailMessage','Messages','Contact\x20not\x20found','spread','update','subject','attach','YYYY-MM-DD\x20HH:mm:ss','interaction','get','attachments','originTo','originCc','bcc','ChatWebsiteId','originChannel','Email','ChatOfflineMessageId','UserId','User','name','unshift'];(function(_0x286bfb,_0x46ac3c){var _0x52b683=function(_0x3e7fb1){while(--_0x3e7fb1){_0x286bfb['push'](_0x286bfb['shift']());}};_0x52b683(++_0x46ac3c);}(_0x57b9,0x198));var _0x957b=function(_0x5c2e3e,_0x26ecd3){_0x5c2e3e=_0x5c2e3e-0x0;var _0x53f64a=_0x57b9[_0x5c2e3e];return _0x53f64a;};'use strict';var _=require(_0x957b('0x0'));var util=require('util');var moment=require(_0x957b('0x1'));var BPromise=require(_0x957b('0x2'));var rs=require(_0x957b('0x3'));var fs=require('fs');var Redis=require(_0x957b('0x4'));var db=require(_0x957b('0x5'))['db'];var utils=require(_0x957b('0x6'));var logger=require(_0x957b('0x7'))('rpc');var config=require(_0x957b('0x8'));var jayson=require(_0x957b('0x9'));var client=jayson[_0x957b('0xa')][_0x957b('0xb')]({'port':0x232c});config[_0x957b('0xc')]=_[_0x957b('0xd')](config[_0x957b('0xc')],{'host':_0x957b('0xe'),'port':0x18eb});var socket=require(_0x957b('0xf'))(new Redis(config['redis']));require('./mailAccount.socket')[_0x957b('0x10')](socket);function respondWithRpcPromise(_0xbc2974,_0x547edf,_0x17111f){return new BPromise(function(_0xc95fac,_0x2d5cd9){return client[_0x957b('0x11')](_0xbc2974,_0x17111f)[_0x957b('0x12')](function(_0x488808){logger['info']('MailAccount,\x20%s,\x20%s',_0x547edf,_0x957b('0x13'));logger[_0x957b('0x14')]('MailAccount,\x20%s,\x20%s,\x20%s',_0x547edf,'request\x20sent',JSON['stringify'](_0x488808));if(_0x488808[_0x957b('0x15')]){if(_0x488808[_0x957b('0x15')][_0x957b('0x16')]===0x1f4){logger[_0x957b('0x15')](_0x957b('0x17'),_0x547edf,_0x488808[_0x957b('0x15')][_0x957b('0x18')]);return _0x2d5cd9(_0x488808[_0x957b('0x15')][_0x957b('0x18')]);}logger[_0x957b('0x15')](_0x957b('0x17'),_0x547edf,_0x488808[_0x957b('0x15')]['message']);return _0xc95fac(_0x488808['error'][_0x957b('0x18')]);}else{logger[_0x957b('0x19')](_0x957b('0x17'),_0x547edf,'request\x20sent');_0xc95fac(_0x488808['result'][_0x957b('0x18')]);}})[_0x957b('0x1a')](function(_0x136673){logger[_0x957b('0x15')](_0x957b('0x17'),_0x547edf,_0x136673);_0x2d5cd9(_0x136673);});});}exports['GetMailAccount']=function(_0x3fb056){var _0x7a38e7=this;return new Promise(function(_0x11563d,_0x414725){return db[_0x957b('0x1b')]['findAll']({'raw':_0x3fb056[_0x957b('0x1c')]?_0x3fb056[_0x957b('0x1c')][_0x957b('0x1d')]===undefined?!![]:![]:!![],'where':_0x3fb056['options']?_0x3fb056['options'][_0x957b('0x1e')]||null:null,'attributes':_0x3fb056[_0x957b('0x1c')]?_0x3fb056[_0x957b('0x1c')][_0x957b('0x1f')]||null:null,'limit':_0x3fb056[_0x957b('0x1c')]?_0x3fb056['options'][_0x957b('0x20')]||null:null,'include':_0x3fb056[_0x957b('0x1c')]?_0x3fb056[_0x957b('0x1c')]['include']?_['map'](_0x3fb056[_0x957b('0x1c')]['include'],function(_0x1dc1a2){return{'model':db[_0x1dc1a2['model']],'as':_0x1dc1a2['as'],'attributes':_0x1dc1a2[_0x957b('0x1f')],'include':_0x1dc1a2[_0x957b('0x21')]?_[_0x957b('0x22')](_0x1dc1a2[_0x957b('0x21')],function(_0x55d619){return{'model':db[_0x55d619[_0x957b('0x23')]],'as':_0x55d619['as'],'attributes':_0x55d619[_0x957b('0x1f')],'include':_0x55d619[_0x957b('0x21')]?_[_0x957b('0x22')](_0x55d619[_0x957b('0x21')],function(_0x16f282){return{'model':db[_0x16f282[_0x957b('0x23')]],'as':_0x16f282['as'],'attributes':_0x16f282[_0x957b('0x1f')]};}):[]};}):[]};}):[]:[]})[_0x957b('0x12')](function(_0x4a6c46){logger['info'](_0x957b('0x24'),_0x3fb056);logger[_0x957b('0x14')](_0x957b('0x24'),_0x3fb056,JSON[_0x957b('0x25')](_0x4a6c46));_0x11563d(_0x4a6c46);})[_0x957b('0x1a')](function(_0xc44b53){logger['error'](_0x957b('0x24'),_0xc44b53[_0x957b('0x18')],_0x3fb056);_0x414725(_0x7a38e7[_0x957b('0x15')](0x1f4,_0xc44b53[_0x957b('0x18')]));});});};exports[_0x957b('0x26')]=function(_0x1ac6ce){var _0x3c7926=this;return new Promise(function(_0x53e4c2,_0x5bf6cd){return db[_0x957b('0x1b')][_0x957b('0x27')]({'raw':_0x1ac6ce['options']?_0x1ac6ce[_0x957b('0x1c')]['raw']===undefined?!![]:![]:!![],'where':_0x1ac6ce[_0x957b('0x1c')]?_0x1ac6ce[_0x957b('0x1c')][_0x957b('0x1e')]||null:null,'attributes':_0x1ac6ce[_0x957b('0x1c')]?_0x1ac6ce['options'][_0x957b('0x1f')]||null:null,'include':_0x1ac6ce[_0x957b('0x1c')]?_0x1ac6ce['options'][_0x957b('0x21')]?_[_0x957b('0x22')](_0x1ac6ce['options'][_0x957b('0x21')],function(_0x576ae7){return{'model':db[_0x576ae7[_0x957b('0x23')]],'as':_0x576ae7['as'],'attributes':_0x576ae7['attributes'],'include':_0x576ae7['include']?_[_0x957b('0x22')](_0x576ae7['include'],function(_0x40dfc5){return{'model':db[_0x40dfc5['model']],'as':_0x40dfc5['as'],'attributes':_0x40dfc5[_0x957b('0x1f')],'include':_0x40dfc5[_0x957b('0x21')]?_[_0x957b('0x22')](_0x40dfc5[_0x957b('0x21')],function(_0xebeb1c){return{'model':db[_0xebeb1c['model']],'as':_0xebeb1c['as'],'attributes':_0xebeb1c[_0x957b('0x1f')]};}):[]};}):[]};}):[]:[]})[_0x957b('0x12')](function(_0x49e6f7){logger[_0x957b('0x19')](_0x957b('0x26'),_0x1ac6ce);logger[_0x957b('0x14')](_0x957b('0x26'),_0x1ac6ce,JSON[_0x957b('0x25')](_0x49e6f7));_0x53e4c2(_0x49e6f7);})[_0x957b('0x1a')](function(_0x2fc454){logger[_0x957b('0x15')](_0x957b('0x26'),_0x2fc454[_0x957b('0x18')],_0x1ac6ce);_0x5bf6cd(_0x3c7926[_0x957b('0x15')](0x1f4,_0x2fc454['message']));});});};exports[_0x957b('0x28')]=function(_0x5b3691){var _0x5e194c=this;return new Promise(function(_0x49e678,_0x5f367f){var _0x75a392={'body':_0x5b3691[_0x957b('0x29')],'channel':_0x957b('0x2a')};var _0x13711b=_['difference'](_[_0x957b('0x2b')](db['CmContact'][_0x957b('0x2c')]),[_0x957b('0x2d'),_0x957b('0x2e'),'CompanyId',_0x957b('0x2f')]);var _0x278654=![];if(_0x5b3691[_0x957b('0x29')]['id']){delete _0x5b3691[_0x957b('0x29')]['id'];}if(_['isNil'](_0x5b3691['body'][_0x957b('0x30')])){return _0x5f367f(_0x5e194c[_0x957b('0x15')](0x1f4,'from\x20is\x20mandatory'));}if(_[_0x957b('0x31')](_0x5b3691[_0x957b('0x29')][_0x957b('0x29')])||_0x5b3691['body'][_0x957b('0x29')]===''){return _0x5f367f(_0x5e194c['error'](0x1f4,_0x957b('0x32')));}if(_[_0x957b('0x31')](_0x5b3691[_0x957b('0x29')]['mapKey'])){return _0x5f367f(_0x5e194c[_0x957b('0x15')](0x1f4,'mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x13711b));}if(!_['includes'](_0x13711b,_0x5b3691['body'][_0x957b('0x33')])){return _0x5f367f(_0x5e194c[_0x957b('0x15')](0x1f4,_0x957b('0x34')+_0x13711b));}var _0x18e61a={};_0x18e61a[_0x5b3691[_0x957b('0x29')][_0x957b('0x33')]]=_0x5b3691['body'][_0x957b('0x30')];return db['MailAccount'][_0x957b('0x27')]({'where':{'id':_0x5b3691[_0x957b('0x35')]['id']},'include':[{'model':db['CmList'],'as':'List','include':[{'model':db[_0x957b('0x36')],'as':_0x957b('0x37'),'where':_0x18e61a,'limit':0x1,'order':[['updatedAt','DESC']]}]},{'model':db[_0x957b('0x38')],'as':'Applications'},{'model':db[_0x957b('0x39')],'as':_0x957b('0x3a')}]})[_0x957b('0x12')](function(_0x440c60){if(_0x440c60&&_0x440c60[_0x957b('0x3b')]){var _0x15d81a=_0x440c60['get']({'plain':!![]});_0x75a392['account']=_[_0x957b('0x3c')](_0x15d81a,[_0x957b('0x3d'),_0x957b('0x3b')]);_0x75a392['applications']=_0x15d81a[_0x957b('0x3d')];_0x75a392['list']=_0x15d81a[_0x957b('0x3b')];_0x75a392[_0x957b('0x3e')]=_[_0x957b('0x3f')](_0x75a392[_0x957b('0x3e')],['priority'],[_0x957b('0x40')]);if(_0x75a392['account']&&_0x75a392[_0x957b('0x35')][_0x957b('0x41')]){_0x75a392[_0x957b('0x3e')][_0x957b('0x42')]({'id':0x0,'priority':_0x75a392[_0x957b('0x3e')][_0x957b('0x43')]+0x1,'app':_0x957b('0x44'),'appdata':_0x957b('0x41'),'interval':_0x957b('0x45')});}if(_0x75a392[_0x957b('0x35')][_0x957b('0x3d')]){delete _0x75a392['account'][_0x957b('0x3d')];}if(_0x75a392[_0x957b('0x35')][_0x957b('0x3b')]){delete _0x75a392[_0x957b('0x35')][_0x957b('0x3b')];}if(_0x15d81a[_0x957b('0x3b')]['Contacts']['length']){return _0x15d81a[_0x957b('0x3b')][_0x957b('0x37')][0x0];}var _0x2569de=_[_0x957b('0xd')](_0x5b3691['body'],{'firstName':_0x5b3691[_0x957b('0x29')][_0x957b('0x30')],'ListId':_0x15d81a[_0x957b('0x2f')]});_0x2569de[_0x5b3691[_0x957b('0x29')]['mapKey']]=_0x5b3691[_0x957b('0x29')][_0x957b('0x30')];return db[_0x957b('0x36')][_0x957b('0x46')](_0x2569de);}else{throw new Error('List\x20not\x20found');}})[_0x957b('0x12')](function(_0x22d7b2){_0x75a392[_0x957b('0x47')]=_0x22d7b2;if(_0x22d7b2){if(!_0x5b3691[_0x957b('0x29')][_0x957b('0x18')][_0x957b('0x48')]){_0x5b3691[_0x957b('0x29')]['message'][_0x957b('0x48')]=rs['generate']()+'\x20'+_0x5b3691[_0x957b('0x29')][_0x957b('0x18')][_0x957b('0x30')];}var _0xc7bcb0={'ContactId':_0x22d7b2['id'],'MailAccountId':_0x5b3691[_0x957b('0x35')]['id'],'inReplyTo':_0x5b3691[_0x957b('0x29')][_0x957b('0x18')][_0x957b('0x48')],'to':_0x5b3691[_0x957b('0x29')]['message'][_0x957b('0x30')],'cc':_0x5b3691[_0x957b('0x29')]['message']['cc'],'subject':_0x5b3691[_0x957b('0x29')]['message']['subject'],'attach':_0x5b3691[_0x957b('0x29')][_0x957b('0x18')]['attach'],'lastMsgAt':moment()[_0x957b('0x49')]('YYYY-MM-DD\x20HH:mm:ss'),'lastMsgDirection':'in'};return db[_0x957b('0x4a')][_0x957b('0x27')]({'where':{'closed':![],'MailAccountId':_0x5b3691[_0x957b('0x35')]['id']},'include':[{'model':db[_0x957b('0x4b')],'as':_0x957b('0x4c'),'attributes':[_0x957b('0x48')],'where':{'messageId':_0x5b3691[_0x957b('0x29')]['message']['inReplyTo']}}]})[_0x957b('0x12')](function(_0x117065){if(_0x117065){return[_0x117065,![]];}return db[_0x957b('0x4a')][_0x957b('0x46')](_0xc7bcb0)[_0x957b('0x12')](function(_0x1b2bed){return[_0x1b2bed,!![]];});});}else{throw new Error(_0x957b('0x4d'));}})[_0x957b('0x4e')](function(_0x24961e,_0x3b9112){if(_0x24961e){_0x278654=_0x3b9112;if(!_0x3b9112){return _0x24961e[_0x957b('0x4f')]({'inReplyTo':_0x5b3691[_0x957b('0x29')][_0x957b('0x18')]['messageId'],'to':_0x5b3691[_0x957b('0x29')][_0x957b('0x18')]['from'],'cc':_0x5b3691['body'][_0x957b('0x18')]['cc'],'subject':_0x5b3691[_0x957b('0x29')][_0x957b('0x18')][_0x957b('0x50')],'attach':_0x24961e['attach']?_0x24961e[_0x957b('0x51')]:_0x5b3691[_0x957b('0x29')][_0x957b('0x18')][_0x957b('0x51')],'substatus':null,'substatusAt':moment()[_0x957b('0x49')](_0x957b('0x52')),'lastMsgAt':moment()[_0x957b('0x49')](_0x957b('0x52')),'lastMsgDirection':'in'});}else{return _0x24961e;}}})['then'](function(_0x463a69){_0x75a392[_0x957b('0x53')]=_0x463a69[_0x957b('0x54')]({'plain':!![]});_0x75a392[_0x957b('0x53')]['created']=_0x278654;return db['MailMessage'][_0x957b('0x46')]({'body':_0x5b3691[_0x957b('0x29')][_0x957b('0x29')],'MailAccountId':_0x5b3691[_0x957b('0x35')]['id'],'MailInteractionId':_0x463a69['id'],'direction':'in','ContactId':_0x75a392[_0x957b('0x47')]['id'],'messageId':_0x5b3691[_0x957b('0x29')]['message'][_0x957b('0x48')],'from':_0x5b3691[_0x957b('0x29')][_0x957b('0x18')][_0x957b('0x30')],'to':_0x5b3691[_0x957b('0x29')][_0x957b('0x18')]['to'],'cc':_0x5b3691[_0x957b('0x29')][_0x957b('0x18')]['cc'],'subject':_0x5b3691[_0x957b('0x29')][_0x957b('0x18')][_0x957b('0x50')],'attach':_0x5b3691[_0x957b('0x29')][_0x957b('0x18')][_0x957b('0x51')],'Attachments':_0x5b3691[_0x957b('0x29')]['message'][_0x957b('0x55')],'originTo':_0x5b3691[_0x957b('0x29')][_0x957b('0x18')][_0x957b('0x56')],'originCc':_0x5b3691[_0x957b('0x29')][_0x957b('0x18')][_0x957b('0x57')],'bcc':_0x5b3691[_0x957b('0x29')]['message'][_0x957b('0x58')],'ChatWebsiteId':_0x5b3691[_0x957b('0x29')][_0x957b('0x18')][_0x957b('0x59')]||null,'originChannel':_0x5b3691[_0x957b('0x29')]['message'][_0x957b('0x5a')]||_0x957b('0x5b'),'ChatOfflineMessageId':_0x5b3691[_0x957b('0x29')][_0x957b('0x18')][_0x957b('0x5c')]||null},{'include':[{'model':db['Attachment'],'as':'Attachments'}]});})[_0x957b('0x12')](function(_0x2e306d){_0x75a392[_0x957b('0x18')]=_0x2e306d;if(_0x75a392[_0x957b('0x53')][_0x957b('0x5d')]){return db[_0x957b('0x5e')][_0x957b('0x27')]({'attributes':['id',_0x957b('0x5f')],'where':{'id':_0x75a392[_0x957b('0x53')][_0x957b('0x5d')]}})[_0x957b('0x12')](function(_0x3bdf76){if(_0x3bdf76){_0x75a392[_0x957b('0x3e')][_0x957b('0x60')]({'id':0x0,'priority':0x0,'app':_0x957b('0x61'),'appdata':_0x3bdf76[_0x957b('0x5f')]+','+(_0x75a392[_0x957b('0x35')][_0x957b('0x62')]||0xa),'interval':_0x957b('0x45')});}return respondWithRpcPromise('Start',_0x957b('0x63'),_0x75a392);});}return respondWithRpcPromise(_0x957b('0x64'),_0x957b('0x63'),_0x75a392);})[_0x957b('0x12')](function(_0x550f5b){_0x49e678(_0x550f5b);})['catch'](function(_0xf90e51){_0x5f367f(_0x5e194c['error'](0x1f4,_0xf90e51[_0x957b('0x18')]));});});}; \ No newline at end of file diff --git a/server/api/mailAccount/mailAccount.socket.js b/server/api/mailAccount/mailAccount.socket.js index f5a65ce..1c5fe4b 100644 --- a/server/api/mailAccount/mailAccount.socket.js +++ b/server/api/mailAccount/mailAccount.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7daf=['update','emit','removeListener','register','length','mailAccount:','./mailAccount.events','save','remove'];(function(_0x5006ab,_0xab2912){var _0x575da8=function(_0x4d7abd){while(--_0x4d7abd){_0x5006ab['push'](_0x5006ab['shift']());}};_0x575da8(++_0xab2912);}(_0x7daf,0x84));var _0xf7da=function(_0xa43518,_0x2a4c6b){_0xa43518=_0xa43518-0x0;var _0x5e9b94=_0x7daf[_0xa43518];return _0x5e9b94;};'use strict';var MailAccountEvents=require(_0xf7da('0x0'));var events=[_0xf7da('0x1'),_0xf7da('0x2'),_0xf7da('0x3')];function createListener(_0x4bad84,_0x95c493){return function(_0x1406b9){_0x95c493[_0xf7da('0x4')](_0x4bad84,_0x1406b9);};}function removeListener(_0x422da9,_0x52283d){return function(){MailAccountEvents[_0xf7da('0x5')](_0x422da9,_0x52283d);};}exports[_0xf7da('0x6')]=function(_0xeb9382){for(var _0x3149fb=0x0,_0x3bf9c4=events[_0xf7da('0x7')];_0x3149fb<_0x3bf9c4;_0x3149fb++){var _0x1be3ad=events[_0x3149fb];var _0x2b9cb9=createListener(_0xf7da('0x8')+_0x1be3ad,_0xeb9382);MailAccountEvents['on'](_0x1be3ad,_0x2b9cb9);}}; \ No newline at end of file +var _0x502a=['removeListener','length','mailAccount:','save','remove','update','emit'];(function(_0xb4947e,_0x39de27){var _0x2af6df=function(_0x308271){while(--_0x308271){_0xb4947e['push'](_0xb4947e['shift']());}};_0x2af6df(++_0x39de27);}(_0x502a,0x1df));var _0xa502=function(_0x367309,_0x3597c3){_0x367309=_0x367309-0x0;var _0x3867bb=_0x502a[_0x367309];return _0x3867bb;};'use strict';var MailAccountEvents=require('./mailAccount.events');var events=[_0xa502('0x0'),_0xa502('0x1'),_0xa502('0x2')];function createListener(_0x10043e,_0x3fb9c2){return function(_0x43629e){_0x3fb9c2[_0xa502('0x3')](_0x10043e,_0x43629e);};}function removeListener(_0xd957f8,_0x21fc32){return function(){MailAccountEvents[_0xa502('0x4')](_0xd957f8,_0x21fc32);};}exports['register']=function(_0x3f6081){for(var _0x2c4a08=0x0,_0x39df41=events[_0xa502('0x5')];_0x2c4a08<_0x39df41;_0x2c4a08++){var _0x2e102b=events[_0x2c4a08];var _0x5f463a=createListener(_0xa502('0x6')+_0x2e102b,_0x3f6081);MailAccountEvents['on'](_0x2e102b,_0x5f463a);}}; \ No newline at end of file diff --git a/server/api/mailApplication/index.js b/server/api/mailApplication/index.js index ea90fb6..851cb63 100644 --- a/server/api/mailApplication/index.js +++ b/server/api/mailApplication/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x952e=['/:id','update','delete','destroy','exports','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./mailApplication.controller','get','isAuthenticated','show','put'];(function(_0x29d1ba,_0x226787){var _0x57d765=function(_0x992b11){while(--_0x992b11){_0x29d1ba['push'](_0x29d1ba['shift']());}};_0x57d765(++_0x226787);}(_0x952e,0x1f3));var _0xe952=function(_0x5a1b1c,_0x1ad335){_0x5a1b1c=_0x5a1b1c-0x0;var _0x10f859=_0x952e[_0x5a1b1c];return _0x10f859;};'use strict';var multer=require(_0xe952('0x0'));var util=require(_0xe952('0x1'));var path=require(_0xe952('0x2'));var timeout=require(_0xe952('0x3'));var express=require(_0xe952('0x4'));var router=express['Router']();var fs_extra=require(_0xe952('0x5'));var auth=require(_0xe952('0x6'));var interaction=require(_0xe952('0x7'));var config=require(_0xe952('0x8'));var controller=require(_0xe952('0x9'));router[_0xe952('0xa')]('/:id',auth[_0xe952('0xb')](),controller[_0xe952('0xc')]);router[_0xe952('0xd')](_0xe952('0xe'),auth[_0xe952('0xb')](),controller[_0xe952('0xf')]);router[_0xe952('0x10')](_0xe952('0xe'),auth[_0xe952('0xb')](),controller[_0xe952('0x11')]);module[_0xe952('0x12')]=router; \ No newline at end of file +var _0x92a8=['../../components/interaction/service','get','/:id','put','isAuthenticated','destroy','exports','util','path','connect-timeout','fs-extra','../../components/auth/service'];(function(_0x4e2745,_0x203e2d){var _0x131e85=function(_0x536587){while(--_0x536587){_0x4e2745['push'](_0x4e2745['shift']());}};_0x131e85(++_0x203e2d);}(_0x92a8,0xf7));var _0x892a=function(_0x510b98,_0x4c4cbb){_0x510b98=_0x510b98-0x0;var _0x45e775=_0x92a8[_0x510b98];return _0x45e775;};'use strict';var multer=require('multer');var util=require(_0x892a('0x0'));var path=require(_0x892a('0x1'));var timeout=require(_0x892a('0x2'));var express=require('express');var router=express['Router']();var fs_extra=require(_0x892a('0x3'));var auth=require(_0x892a('0x4'));var interaction=require(_0x892a('0x5'));var config=require('../../config/environment');var controller=require('./mailApplication.controller');router[_0x892a('0x6')](_0x892a('0x7'),auth['isAuthenticated'](),controller['show']);router[_0x892a('0x8')]('/:id',auth['isAuthenticated'](),controller['update']);router['delete'](_0x892a('0x7'),auth[_0x892a('0x9')](),controller[_0x892a('0xa')]);module[_0x892a('0xb')]=router; \ No newline at end of file diff --git a/server/api/mailApplication/mailApplication.attributes.js b/server/api/mailApplication/mailApplication.attributes.js index 6b97043..724fb4f 100644 --- a/server/api/mailApplication/mailApplication.attributes.js +++ b/server/api/mailApplication/mailApplication.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6e27=['STRING','noop','TEXT','*,*,*,*','sequelize','exports','INTEGER'];(function(_0x40695c,_0x440203){var _0x1360e8=function(_0x33c321){while(--_0x33c321){_0x40695c['push'](_0x40695c['shift']());}};_0x1360e8(++_0x440203);}(_0x6e27,0x14d));var _0x76e2=function(_0x30a1e1,_0x5743be){_0x30a1e1=_0x30a1e1-0x0;var _0x44b892=_0x6e27[_0x30a1e1];return _0x44b892;};'use strict';var Sequelize=require(_0x76e2('0x0'));module[_0x76e2('0x1')]={'priority':{'type':Sequelize[_0x76e2('0x2')],'allowNull':![]},'app':{'type':Sequelize[_0x76e2('0x3')],'allowNull':![],'defaultValue':_0x76e2('0x4')},'appdata':{'type':Sequelize[_0x76e2('0x5')]()},'description':{'type':Sequelize['STRING']},'interval':{'type':Sequelize[_0x76e2('0x3')],'defaultValue':_0x76e2('0x6')}}; \ No newline at end of file +var _0x26b2=['noop','STRING','*,*,*,*','sequelize','exports','INTEGER'];(function(_0x1faf9c,_0x304338){var _0xda6ddc=function(_0x5a099d){while(--_0x5a099d){_0x1faf9c['push'](_0x1faf9c['shift']());}};_0xda6ddc(++_0x304338);}(_0x26b2,0x141));var _0x226b=function(_0x475e5e,_0x1359ef){_0x475e5e=_0x475e5e-0x0;var _0x1d13f7=_0x26b2[_0x475e5e];return _0x1d13f7;};'use strict';var Sequelize=require(_0x226b('0x0'));module[_0x226b('0x1')]={'priority':{'type':Sequelize[_0x226b('0x2')],'allowNull':![]},'app':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x226b('0x3')},'appdata':{'type':Sequelize['TEXT']()},'description':{'type':Sequelize[_0x226b('0x4')]},'interval':{'type':Sequelize['STRING'],'defaultValue':_0x226b('0x5')}}; \ No newline at end of file diff --git a/server/api/mailApplication/mailApplication.controller.js b/server/api/mailApplication/mailApplication.controller.js index 8d029c4..fdc1c7a 100644 --- a/server/api/mailApplication/mailApplication.controller.js +++ b/server/api/mailApplication/mailApplication.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9c44=['Content-Range','apply','reject','save','update','destroy','sendStatus','stack','name','send','show','params','model','keys','MailApplication','rawAttributes','query','attributes','intersection','fields','length','includeAll','include','merge','options','find','then','body','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','sox','ejs','fs-extra','lodash','squel','crypto','desk.js','to-csv','querystring','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/license/util','../../mysqldb','status','end','json','offset','undefined','limit','count','set'];(function(_0x33bc64,_0x4d1e92){var _0x3fdd34=function(_0x4b40a4){while(--_0x4b40a4){_0x33bc64['push'](_0x33bc64['shift']());}};_0x3fdd34(++_0x4d1e92);}(_0x9c44,0x178));var _0x49c4=function(_0x1d9aa0,_0x272488){_0x1d9aa0=_0x1d9aa0-0x0;var _0x226868=_0x9c44[_0x1d9aa0];return _0x226868;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x49c4('0x0'));var jsonpatch=require(_0x49c4('0x1'));var rp=require(_0x49c4('0x2'));var moment=require(_0x49c4('0x3'));var BPromise=require(_0x49c4('0x4'));var Mustache=require(_0x49c4('0x5'));var util=require('util');var path=require('path');var sox=require(_0x49c4('0x6'));var csv=require('to-csv');var ejs=require(_0x49c4('0x7'));var fs=require('fs');var fs_extra=require(_0x49c4('0x8'));var _=require(_0x49c4('0x9'));var squel=require(_0x49c4('0xa'));var crypto=require(_0x49c4('0xb'));var jsforce=require('jsforce');var deskjs=require(_0x49c4('0xc'));var toCsv=require(_0x49c4('0xd'));var querystring=require(_0x49c4('0xe'));var Papa=require(_0x49c4('0xf'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x49c4('0x10'));var as=require(_0x49c4('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x49c4('0x12'))(_0x49c4('0x13'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x49c4('0x14'));var db=require(_0x49c4('0x15'))['db'];function respondWithStatusCode(_0x5487cd,_0x7df3a9){_0x7df3a9=_0x7df3a9||0xcc;return function(_0x403bfb){if(_0x403bfb){return _0x5487cd['sendStatus'](_0x7df3a9);}return _0x5487cd[_0x49c4('0x16')](_0x7df3a9)[_0x49c4('0x17')]();};}function respondWithResult(_0x21f15a,_0x2decee){_0x2decee=_0x2decee||0xc8;return function(_0x12777c){if(_0x12777c){return _0x21f15a[_0x49c4('0x16')](_0x2decee)[_0x49c4('0x18')](_0x12777c);}};}function respondWithFilteredResult(_0x3de397,_0x58d177){return function(_0x3acd06){if(_0x3acd06){var _0x141003=typeof _0x58d177[_0x49c4('0x19')]===_0x49c4('0x1a')&&typeof _0x58d177[_0x49c4('0x1b')]==='undefined';var _0x44e607=_0x3acd06[_0x49c4('0x1c')];var _0x4c3253=_0x141003?0x0:_0x58d177['offset'];var _0x3c782d=_0x141003?_0x3acd06[_0x49c4('0x1c')]:_0x58d177[_0x49c4('0x19')]+_0x58d177['limit'];var _0x24856d;if(_0x3c782d>=_0x44e607){_0x3c782d=_0x44e607;_0x24856d=0xc8;}else{_0x24856d=0xce;}_0x3de397['status'](_0x24856d);return _0x3de397[_0x49c4('0x1d')](_0x49c4('0x1e'),_0x4c3253+'-'+_0x3c782d+'/'+_0x44e607)[_0x49c4('0x18')](_0x3acd06);}return null;};}function patchUpdates(_0x291526){return function(_0x382040){try{jsonpatch[_0x49c4('0x1f')](_0x382040,_0x291526,!![]);}catch(_0x280893){return BPromise[_0x49c4('0x20')](_0x280893);}return _0x382040[_0x49c4('0x21')]();};}function saveUpdates(_0x578447,_0x527126){return function(_0x57f502){if(_0x57f502){return _0x57f502[_0x49c4('0x22')](_0x578447)['then'](function(_0x592bb8){return _0x592bb8;});}return null;};}function removeEntity(_0x2263ae,_0x15581b){return function(_0x26c640){if(_0x26c640){return _0x26c640[_0x49c4('0x23')]()['then'](function(){_0x2263ae['status'](0xcc)[_0x49c4('0x17')]();});}};}function handleEntityNotFound(_0x9cb797,_0x565423){return function(_0x207358){if(!_0x207358){_0x9cb797[_0x49c4('0x24')](0x194);}return _0x207358;};}function handleError(_0x210159,_0xa7a826){_0xa7a826=_0xa7a826||0x1f4;return function(_0x531d92){logger['error'](_0x531d92[_0x49c4('0x25')]);if(_0x531d92['name']){delete _0x531d92[_0x49c4('0x26')];}_0x210159[_0x49c4('0x16')](_0xa7a826)[_0x49c4('0x27')](_0x531d92);};}exports[_0x49c4('0x28')]=function(_0x5987ae,_0x889909){var _0x2b2793={'raw':!![],'where':{'id':_0x5987ae[_0x49c4('0x29')]['id']}},_0x46e04d={};_0x46e04d[_0x49c4('0x2a')]=_[_0x49c4('0x2b')](db[_0x49c4('0x2c')][_0x49c4('0x2d')]);_0x46e04d[_0x49c4('0x2e')]=_[_0x49c4('0x2b')](_0x5987ae[_0x49c4('0x2e')]);_0x46e04d['filters']=_['intersection'](_0x46e04d['model'],_0x46e04d[_0x49c4('0x2e')]);_0x2b2793[_0x49c4('0x2f')]=_[_0x49c4('0x30')](_0x46e04d[_0x49c4('0x2a')],qs[_0x49c4('0x31')](_0x5987ae['query'][_0x49c4('0x31')]));_0x2b2793[_0x49c4('0x2f')]=_0x2b2793[_0x49c4('0x2f')][_0x49c4('0x32')]?_0x2b2793['attributes']:_0x46e04d['model'];if(_0x5987ae[_0x49c4('0x2e')][_0x49c4('0x33')]){_0x2b2793[_0x49c4('0x34')]=[{'all':!![]}];}_0x2b2793=_[_0x49c4('0x35')]({},_0x2b2793,_0x5987ae[_0x49c4('0x36')]);return db['MailApplication'][_0x49c4('0x37')](_0x2b2793)[_0x49c4('0x38')](handleEntityNotFound(_0x889909,null))[_0x49c4('0x38')](respondWithResult(_0x889909,null))['catch'](handleError(_0x889909,null));};exports['update']=function(_0x85dce2,_0x1991e9){if(_0x85dce2[_0x49c4('0x39')]['id']){delete _0x85dce2[_0x49c4('0x39')]['id'];}return db[_0x49c4('0x2c')][_0x49c4('0x37')]({'where':{'id':_0x85dce2[_0x49c4('0x29')]['id']}})[_0x49c4('0x38')](handleEntityNotFound(_0x1991e9,null))[_0x49c4('0x38')](saveUpdates(_0x85dce2['body'],null))[_0x49c4('0x38')](respondWithResult(_0x1991e9,null))['catch'](handleError(_0x1991e9,null));};exports[_0x49c4('0x23')]=function(_0x349791,_0x2625a6){return db[_0x49c4('0x2c')]['find']({'where':{'id':_0x349791[_0x49c4('0x29')]['id']}})[_0x49c4('0x38')](handleEntityNotFound(_0x2625a6,null))[_0x49c4('0x38')](removeEntity(_0x2625a6,null))['catch'](handleError(_0x2625a6,null));}; \ No newline at end of file +var _0xb43b=['name','status','send','show','params','keys','MailApplication','rawAttributes','query','intersection','model','fields','attributes','length','includeAll','merge','options','find','then','catch','body','eml-format','rimraf','fast-json-patch','request-promise','moment','mustache','util','path','sox','fs-extra','squel','crypto','jsforce','desk.js','to-csv','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','end','undefined','count','offset','limit','set','Content-Range','json','apply','reject','update','destroy','sendStatus'];(function(_0xa53449,_0x4b872c){var _0x5e5679=function(_0x108196){while(--_0x108196){_0xa53449['push'](_0xa53449['shift']());}};_0x5e5679(++_0x4b872c);}(_0xb43b,0x1b2));var _0xbb43=function(_0x420940,_0x381f7e){_0x420940=_0x420940-0x0;var _0x2ba454=_0xb43b[_0x420940];return _0x2ba454;};'use strict';var emlformat=require(_0xbb43('0x0'));var rimraf=require(_0xbb43('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xbb43('0x2'));var rp=require(_0xbb43('0x3'));var moment=require(_0xbb43('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xbb43('0x5'));var util=require(_0xbb43('0x6'));var path=require(_0xbb43('0x7'));var sox=require(_0xbb43('0x8'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xbb43('0x9'));var _=require('lodash');var squel=require(_0xbb43('0xa'));var crypto=require(_0xbb43('0xb'));var jsforce=require(_0xbb43('0xc'));var deskjs=require(_0xbb43('0xd'));var toCsv=require(_0xbb43('0xe'));var querystring=require('querystring');var Papa=require(_0xbb43('0xf'));var Redis=require(_0xbb43('0x10'));var authService=require('../../components/auth/service');var qs=require(_0xbb43('0x11'));var as=require(_0xbb43('0x12'));var hardwareService=require(_0xbb43('0x13'));var logger=require(_0xbb43('0x14'))(_0xbb43('0x15'));var utils=require(_0xbb43('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0xbb43('0x17'));var db=require(_0xbb43('0x18'))['db'];function respondWithStatusCode(_0x50e2c0,_0x578392){_0x578392=_0x578392||0xcc;return function(_0x41e7e5){if(_0x41e7e5){return _0x50e2c0['sendStatus'](_0x578392);}return _0x50e2c0['status'](_0x578392)[_0xbb43('0x19')]();};}function respondWithResult(_0x5a509f,_0x68d45d){_0x68d45d=_0x68d45d||0xc8;return function(_0x43021d){if(_0x43021d){return _0x5a509f['status'](_0x68d45d)['json'](_0x43021d);}};}function respondWithFilteredResult(_0x4d5bcf,_0x338120){return function(_0x2abce0){if(_0x2abce0){var _0x57bd1d=typeof _0x338120['offset']===_0xbb43('0x1a')&&typeof _0x338120['limit']==='undefined';var _0x2b0797=_0x2abce0[_0xbb43('0x1b')];var _0x2e3b43=_0x57bd1d?0x0:_0x338120['offset'];var _0x1c16d7=_0x57bd1d?_0x2abce0['count']:_0x338120[_0xbb43('0x1c')]+_0x338120[_0xbb43('0x1d')];var _0x4dfc54;if(_0x1c16d7>=_0x2b0797){_0x1c16d7=_0x2b0797;_0x4dfc54=0xc8;}else{_0x4dfc54=0xce;}_0x4d5bcf['status'](_0x4dfc54);return _0x4d5bcf[_0xbb43('0x1e')](_0xbb43('0x1f'),_0x2e3b43+'-'+_0x1c16d7+'/'+_0x2b0797)[_0xbb43('0x20')](_0x2abce0);}return null;};}function patchUpdates(_0x2bf2d4){return function(_0x5bcce7){try{jsonpatch[_0xbb43('0x21')](_0x5bcce7,_0x2bf2d4,!![]);}catch(_0x5f4416){return BPromise[_0xbb43('0x22')](_0x5f4416);}return _0x5bcce7['save']();};}function saveUpdates(_0x2f5e31,_0x565256){return function(_0x3f323e){if(_0x3f323e){return _0x3f323e[_0xbb43('0x23')](_0x2f5e31)['then'](function(_0x1d0768){return _0x1d0768;});}return null;};}function removeEntity(_0x4dfb7f,_0xf24e60){return function(_0x298ce2){if(_0x298ce2){return _0x298ce2[_0xbb43('0x24')]()['then'](function(){_0x4dfb7f['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x269ca5,_0x32d7f0){return function(_0x5d8310){if(!_0x5d8310){_0x269ca5[_0xbb43('0x25')](0x194);}return _0x5d8310;};}function handleError(_0x2da653,_0x226827){_0x226827=_0x226827||0x1f4;return function(_0x3874fb){logger['error'](_0x3874fb['stack']);if(_0x3874fb[_0xbb43('0x26')]){delete _0x3874fb[_0xbb43('0x26')];}_0x2da653[_0xbb43('0x27')](_0x226827)[_0xbb43('0x28')](_0x3874fb);};}exports[_0xbb43('0x29')]=function(_0x40b04b,_0x21d386){var _0x473828={'raw':!![],'where':{'id':_0x40b04b[_0xbb43('0x2a')]['id']}},_0x539730={};_0x539730['model']=_[_0xbb43('0x2b')](db[_0xbb43('0x2c')][_0xbb43('0x2d')]);_0x539730[_0xbb43('0x2e')]=_['keys'](_0x40b04b[_0xbb43('0x2e')]);_0x539730['filters']=_['intersection'](_0x539730['model'],_0x539730[_0xbb43('0x2e')]);_0x473828['attributes']=_[_0xbb43('0x2f')](_0x539730[_0xbb43('0x30')],qs[_0xbb43('0x31')](_0x40b04b['query'][_0xbb43('0x31')]));_0x473828[_0xbb43('0x32')]=_0x473828[_0xbb43('0x32')][_0xbb43('0x33')]?_0x473828[_0xbb43('0x32')]:_0x539730[_0xbb43('0x30')];if(_0x40b04b[_0xbb43('0x2e')][_0xbb43('0x34')]){_0x473828['include']=[{'all':!![]}];}_0x473828=_[_0xbb43('0x35')]({},_0x473828,_0x40b04b[_0xbb43('0x36')]);return db[_0xbb43('0x2c')][_0xbb43('0x37')](_0x473828)[_0xbb43('0x38')](handleEntityNotFound(_0x21d386,null))[_0xbb43('0x38')](respondWithResult(_0x21d386,null))[_0xbb43('0x39')](handleError(_0x21d386,null));};exports[_0xbb43('0x23')]=function(_0x349a83,_0x57105c){if(_0x349a83[_0xbb43('0x3a')]['id']){delete _0x349a83[_0xbb43('0x3a')]['id'];}return db[_0xbb43('0x2c')][_0xbb43('0x37')]({'where':{'id':_0x349a83[_0xbb43('0x2a')]['id']}})[_0xbb43('0x38')](handleEntityNotFound(_0x57105c,null))['then'](saveUpdates(_0x349a83[_0xbb43('0x3a')],null))[_0xbb43('0x38')](respondWithResult(_0x57105c,null))['catch'](handleError(_0x57105c,null));};exports[_0xbb43('0x24')]=function(_0x2c9a7c,_0x11d384){return db['MailApplication']['find']({'where':{'id':_0x2c9a7c['params']['id']}})[_0xbb43('0x38')](handleEntityNotFound(_0x11d384,null))[_0xbb43('0x38')](removeEntity(_0x11d384,null))['catch'](handleError(_0x11d384,null));}; \ No newline at end of file diff --git a/server/api/mailApplication/mailApplication.model.js b/server/api/mailApplication/mailApplication.model.js index 36f0f4d..8fd74b3 100644 --- a/server/api/mailApplication/mailApplication.model.js +++ b/server/api/mailApplication/mailApplication.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x24ec=['define','mail_applications','utf8mb4','utf8mb4_unicode_ci','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','exports'];(function(_0xe502ae,_0x1b6e67){var _0x32d7c1=function(_0x35d200){while(--_0x35d200){_0xe502ae['push'](_0xe502ae['shift']());}};_0x32d7c1(++_0x1b6e67);}(_0x24ec,0x74));var _0xc24e=function(_0x5240f1,_0x223650){_0x5240f1=_0x5240f1-0x0;var _0xa18c04=_0x24ec[_0x5240f1];return _0xa18c04;};'use strict';var _=require('lodash');var util=require(_0xc24e('0x0'));var logger=require(_0xc24e('0x1'))(_0xc24e('0x2'));var moment=require(_0xc24e('0x3'));var BPromise=require(_0xc24e('0x4'));var rp=require(_0xc24e('0x5'));var fs=require('fs');var path=require(_0xc24e('0x6'));var rimraf=require(_0xc24e('0x7'));var config=require(_0xc24e('0x8'));var attributes=require('./mailApplication.attributes');module[_0xc24e('0x9')]=function(_0x6bca2c,_0x492b78){return _0x6bca2c[_0xc24e('0xa')]('MailApplication',attributes,{'tableName':_0xc24e('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xc24e('0xc'),'collate':_0xc24e('0xd')});}; \ No newline at end of file +var _0x2d54=['api','moment','bluebird','request-promise','rimraf','./mailApplication.attributes','exports','define','MailApplication','mail_applications','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger'];(function(_0x3ddafe,_0x5729b4){var _0x43fd58=function(_0x132f24){while(--_0x132f24){_0x3ddafe['push'](_0x3ddafe['shift']());}};_0x43fd58(++_0x5729b4);}(_0x2d54,0x1ce));var _0x42d5=function(_0x5ec61d,_0x36c73c){_0x5ec61d=_0x5ec61d-0x0;var _0x2e0e5c=_0x2d54[_0x5ec61d];return _0x2e0e5c;};'use strict';var _=require(_0x42d5('0x0'));var util=require(_0x42d5('0x1'));var logger=require(_0x42d5('0x2'))(_0x42d5('0x3'));var moment=require(_0x42d5('0x4'));var BPromise=require(_0x42d5('0x5'));var rp=require(_0x42d5('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0x42d5('0x7'));var config=require('../../config/environment');var attributes=require(_0x42d5('0x8'));module[_0x42d5('0x9')]=function(_0x476d95,_0x2193eb){return _0x476d95[_0x42d5('0xa')](_0x42d5('0xb'),attributes,{'tableName':_0x42d5('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x42d5('0xd'),'collate':_0x42d5('0xe')});}; \ No newline at end of file diff --git a/server/api/mailApplication/mailApplication.rpc.js b/server/api/mailApplication/mailApplication.rpc.js index e7b3f78..72a4942 100644 --- a/server/api/mailApplication/mailApplication.rpc.js +++ b/server/api/mailApplication/mailApplication.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6a8b=['MailApplication,\x20%s,\x20%s','message','result','catch','UpdateMailApplication','MailApplication','update','body','options','raw','where','attributes','limit','then','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','info','debug','request\x20sent','stringify','error','code'];(function(_0x20234e,_0x384a42){var _0x4df7c4=function(_0x30f2db){while(--_0x30f2db){_0x20234e['push'](_0x20234e['shift']());}};_0x4df7c4(++_0x384a42);}(_0x6a8b,0x71));var _0xb6a8=function(_0x3bf83f,_0x181cac){_0x3bf83f=_0x3bf83f-0x0;var _0x22c4a9=_0x6a8b[_0x3bf83f];return _0x22c4a9;};'use strict';var _=require('lodash');var util=require(_0xb6a8('0x0'));var moment=require(_0xb6a8('0x1'));var BPromise=require(_0xb6a8('0x2'));var rs=require(_0xb6a8('0x3'));var fs=require('fs');var Redis=require(_0xb6a8('0x4'));var db=require(_0xb6a8('0x5'))['db'];var utils=require(_0xb6a8('0x6'));var logger=require(_0xb6a8('0x7'))(_0xb6a8('0x8'));var config=require('../../config/environment');var jayson=require(_0xb6a8('0x9'));var client=jayson[_0xb6a8('0xa')][_0xb6a8('0xb')]({'port':0x232a});function respondWithRpcPromise(_0xbc33be,_0x7bed0,_0xd18f5c){return new BPromise(function(_0x13c818,_0x13a5f8){return client[_0xb6a8('0xc')](_0xbc33be,_0xd18f5c)['then'](function(_0xe6b018){logger[_0xb6a8('0xd')]('MailApplication,\x20%s,\x20%s',_0x7bed0,'request\x20sent');logger[_0xb6a8('0xe')]('MailApplication,\x20%s,\x20%s,\x20%s',_0x7bed0,_0xb6a8('0xf'),JSON[_0xb6a8('0x10')](_0xe6b018));if(_0xe6b018[_0xb6a8('0x11')]){if(_0xe6b018[_0xb6a8('0x11')][_0xb6a8('0x12')]===0x1f4){logger[_0xb6a8('0x11')](_0xb6a8('0x13'),_0x7bed0,_0xe6b018[_0xb6a8('0x11')][_0xb6a8('0x14')]);return _0x13a5f8(_0xe6b018[_0xb6a8('0x11')][_0xb6a8('0x14')]);}logger[_0xb6a8('0x11')](_0xb6a8('0x13'),_0x7bed0,_0xe6b018[_0xb6a8('0x11')][_0xb6a8('0x14')]);return _0x13c818(_0xe6b018[_0xb6a8('0x11')][_0xb6a8('0x14')]);}else{logger['info'](_0xb6a8('0x13'),_0x7bed0,'request\x20sent');_0x13c818(_0xe6b018[_0xb6a8('0x15')][_0xb6a8('0x14')]);}})[_0xb6a8('0x16')](function(_0x463a0b){logger[_0xb6a8('0x11')](_0xb6a8('0x13'),_0x7bed0,_0x463a0b);_0x13a5f8(_0x463a0b);});});}exports[_0xb6a8('0x17')]=function(_0x4ca697){var _0x14c296=this;return new Promise(function(_0x2ca0e8,_0x5c4be6){return db[_0xb6a8('0x18')][_0xb6a8('0x19')](_0x4ca697[_0xb6a8('0x1a')],{'raw':_0x4ca697['options']?_0x4ca697[_0xb6a8('0x1b')][_0xb6a8('0x1c')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x4ca697[_0xb6a8('0x1b')]?_0x4ca697[_0xb6a8('0x1b')][_0xb6a8('0x1d')]||null:null,'attributes':_0x4ca697['options']?_0x4ca697['options'][_0xb6a8('0x1e')]||null:null,'limit':_0x4ca697['options']?_0x4ca697['options'][_0xb6a8('0x1f')]||null:null})[_0xb6a8('0x20')](function(_0x597a4b){logger['info'](_0xb6a8('0x17'),_0x4ca697);logger[_0xb6a8('0xe')]('UpdateMailApplication',_0x4ca697,JSON[_0xb6a8('0x10')](_0x597a4b));_0x2ca0e8(_0x597a4b);})[_0xb6a8('0x16')](function(_0x58bb5c){logger[_0xb6a8('0x11')](_0xb6a8('0x17'),_0x58bb5c[_0xb6a8('0x14')],_0x4ca697);_0x5c4be6(_0x14c296[_0xb6a8('0x11')](0x1f4,_0x58bb5c[_0xb6a8('0x14')]));});});}; \ No newline at end of file +var _0x9132=['client','http','request','then','info','MailApplication,\x20%s,\x20%s','request\x20sent','debug','MailApplication,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','UpdateMailApplication','MailApplication','body','options','raw','where','attributes','limit','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment'];(function(_0xc6f991,_0x81682c){var _0x491b39=function(_0x3d72b6){while(--_0x3d72b6){_0xc6f991['push'](_0xc6f991['shift']());}};_0x491b39(++_0x81682c);}(_0x9132,0xd0));var _0x2913=function(_0x36de60,_0x1f61b8){_0x36de60=_0x36de60-0x0;var _0x219c3b=_0x9132[_0x36de60];return _0x219c3b;};'use strict';var _=require('lodash');var util=require(_0x2913('0x0'));var moment=require(_0x2913('0x1'));var BPromise=require(_0x2913('0x2'));var rs=require(_0x2913('0x3'));var fs=require('fs');var Redis=require(_0x2913('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x2913('0x5'));var logger=require(_0x2913('0x6'))(_0x2913('0x7'));var config=require(_0x2913('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x2913('0x9')][_0x2913('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x155b78,_0x16910b,_0x3ac71c){return new BPromise(function(_0x47211a,_0x31a326){return client[_0x2913('0xb')](_0x155b78,_0x3ac71c)[_0x2913('0xc')](function(_0x2a215b){logger[_0x2913('0xd')](_0x2913('0xe'),_0x16910b,_0x2913('0xf'));logger[_0x2913('0x10')](_0x2913('0x11'),_0x16910b,'request\x20sent',JSON[_0x2913('0x12')](_0x2a215b));if(_0x2a215b[_0x2913('0x13')]){if(_0x2a215b[_0x2913('0x13')]['code']===0x1f4){logger[_0x2913('0x13')](_0x2913('0xe'),_0x16910b,_0x2a215b[_0x2913('0x13')]['message']);return _0x31a326(_0x2a215b['error']['message']);}logger[_0x2913('0x13')](_0x2913('0xe'),_0x16910b,_0x2a215b[_0x2913('0x13')][_0x2913('0x14')]);return _0x47211a(_0x2a215b['error']['message']);}else{logger['info'](_0x2913('0xe'),_0x16910b,_0x2913('0xf'));_0x47211a(_0x2a215b[_0x2913('0x15')][_0x2913('0x14')]);}})[_0x2913('0x16')](function(_0x502f4e){logger[_0x2913('0x13')]('MailApplication,\x20%s,\x20%s',_0x16910b,_0x502f4e);_0x31a326(_0x502f4e);});});}exports[_0x2913('0x17')]=function(_0x445d65){var _0x184675=this;return new Promise(function(_0x179040,_0x344d87){return db[_0x2913('0x18')]['update'](_0x445d65[_0x2913('0x19')],{'raw':_0x445d65[_0x2913('0x1a')]?_0x445d65[_0x2913('0x1a')][_0x2913('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x445d65[_0x2913('0x1a')]?_0x445d65['options'][_0x2913('0x1c')]||null:null,'attributes':_0x445d65[_0x2913('0x1a')]?_0x445d65[_0x2913('0x1a')][_0x2913('0x1d')]||null:null,'limit':_0x445d65[_0x2913('0x1a')]?_0x445d65[_0x2913('0x1a')][_0x2913('0x1e')]||null:null})['then'](function(_0x2b4c56){logger[_0x2913('0xd')](_0x2913('0x17'),_0x445d65);logger[_0x2913('0x10')](_0x2913('0x17'),_0x445d65,JSON[_0x2913('0x12')](_0x2b4c56));_0x179040(_0x2b4c56);})[_0x2913('0x16')](function(_0x104ce4){logger[_0x2913('0x13')](_0x2913('0x17'),_0x104ce4[_0x2913('0x14')],_0x445d65);_0x344d87(_0x184675[_0x2913('0x13')](0x1f4,_0x104ce4[_0x2913('0x14')]));});});}; \ No newline at end of file diff --git a/server/api/mailInteraction/index.js b/server/api/mailInteraction/index.js index db890ce..c17e4d8 100644 --- a/server/api/mailInteraction/index.js +++ b/server/api/mailInteraction/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0ca2=['download','post','create','/:id/tags','tracked','mail','mailinteraction:addtags','mailinteraction:update','update','delete','mailinteraction:destroy','destroy','removeTags','exports','multer','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','get','/describe','isAuthenticated','describe','/:id','/:id/download'];(function(_0x2484ad,_0x1b7050){var _0x432e28=function(_0x22dbc4){while(--_0x22dbc4){_0x2484ad['push'](_0x2484ad['shift']());}};_0x432e28(++_0x1b7050);}(_0x0ca2,0x142));var _0x20ca=function(_0x17ebe2,_0x1072c9){_0x17ebe2=_0x17ebe2-0x0;var _0x2694d7=_0x0ca2[_0x17ebe2];return _0x2694d7;};'use strict';var multer=require(_0x20ca('0x0'));var util=require(_0x20ca('0x1'));var path=require('path');var timeout=require(_0x20ca('0x2'));var express=require(_0x20ca('0x3'));var router=express[_0x20ca('0x4')]();var fs_extra=require(_0x20ca('0x5'));var auth=require(_0x20ca('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x20ca('0x7'));var controller=require('./mailInteraction.controller');router['get']('/',auth['isAuthenticated'](),controller['index']);router[_0x20ca('0x8')](_0x20ca('0x9'),auth[_0x20ca('0xa')](),controller[_0x20ca('0xb')]);router[_0x20ca('0x8')](_0x20ca('0xc'),auth[_0x20ca('0xa')](),controller['show']);router['get']('/:id/messages',auth[_0x20ca('0xa')](),controller['getMessages']);router[_0x20ca('0x8')](_0x20ca('0xd'),auth[_0x20ca('0xa')](),controller[_0x20ca('0xe')]);router[_0x20ca('0xf')]('/',auth['isAuthenticated'](),controller[_0x20ca('0x10')]);router['post']('/:id/messages',auth[_0x20ca('0xa')](),controller['addMessage']);router[_0x20ca('0xf')](_0x20ca('0x11'),auth[_0x20ca('0xa')](),interaction[_0x20ca('0x12')](_0x20ca('0x13'),_0x20ca('0x14')),controller['addTags']);router['put'](_0x20ca('0xc'),auth[_0x20ca('0xa')](),interaction[_0x20ca('0x12')](_0x20ca('0x13'),_0x20ca('0x15')),controller[_0x20ca('0x16')]);router[_0x20ca('0x17')](_0x20ca('0xc'),auth[_0x20ca('0xa')](),interaction['tracked'](_0x20ca('0x13'),_0x20ca('0x18')),controller[_0x20ca('0x19')]);router[_0x20ca('0x17')](_0x20ca('0x11'),auth[_0x20ca('0xa')](),controller[_0x20ca('0x1a')]);module[_0x20ca('0x1b')]=router; \ No newline at end of file +var _0xd02d=['/describe','isAuthenticated','describe','/:id','post','/:id/messages','addMessage','tracked','mail','addTags','put','mailinteraction:update','update','delete','mailinteraction:destroy','/:id/tags','removeTags','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./mailInteraction.controller','get','index'];(function(_0x543084,_0x4337f5){var _0x306a57=function(_0x2769ed){while(--_0x2769ed){_0x543084['push'](_0x543084['shift']());}};_0x306a57(++_0x4337f5);}(_0xd02d,0xd5));var _0xdd02=function(_0x533513,_0x503fc8){_0x533513=_0x533513-0x0;var _0x5cbce7=_0xd02d[_0x533513];return _0x5cbce7;};'use strict';var multer=require(_0xdd02('0x0'));var util=require(_0xdd02('0x1'));var path=require(_0xdd02('0x2'));var timeout=require(_0xdd02('0x3'));var express=require('express');var router=express[_0xdd02('0x4')]();var fs_extra=require(_0xdd02('0x5'));var auth=require(_0xdd02('0x6'));var interaction=require(_0xdd02('0x7'));var config=require('../../config/environment');var controller=require(_0xdd02('0x8'));router[_0xdd02('0x9')]('/',auth['isAuthenticated'](),controller[_0xdd02('0xa')]);router[_0xdd02('0x9')](_0xdd02('0xb'),auth[_0xdd02('0xc')](),controller[_0xdd02('0xd')]);router[_0xdd02('0x9')](_0xdd02('0xe'),auth[_0xdd02('0xc')](),controller['show']);router[_0xdd02('0x9')]('/:id/messages',auth['isAuthenticated'](),controller['getMessages']);router[_0xdd02('0x9')]('/:id/download',auth[_0xdd02('0xc')](),controller['download']);router[_0xdd02('0xf')]('/',auth['isAuthenticated'](),controller['create']);router[_0xdd02('0xf')](_0xdd02('0x10'),auth[_0xdd02('0xc')](),controller[_0xdd02('0x11')]);router[_0xdd02('0xf')]('/:id/tags',auth[_0xdd02('0xc')](),interaction[_0xdd02('0x12')](_0xdd02('0x13'),'mailinteraction:addtags'),controller[_0xdd02('0x14')]);router[_0xdd02('0x15')](_0xdd02('0xe'),auth[_0xdd02('0xc')](),interaction['tracked'](_0xdd02('0x13'),_0xdd02('0x16')),controller[_0xdd02('0x17')]);router[_0xdd02('0x18')](_0xdd02('0xe'),auth[_0xdd02('0xc')](),interaction[_0xdd02('0x12')](_0xdd02('0x13'),_0xdd02('0x19')),controller['destroy']);router[_0xdd02('0x18')](_0xdd02('0x1a'),auth[_0xdd02('0xc')](),controller[_0xdd02('0x1b')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/mailInteraction/mailInteraction.attributes.js b/server/api/mailInteraction/mailInteraction.attributes.js index 7da1ba2..69f0679 100644 --- a/server/api/mailInteraction/mailInteraction.attributes.js +++ b/server/api/mailInteraction/mailInteraction.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2630=['TEXT','long','ENUM','out','iconv','exports','BOOLEAN','DATE','STRING'];(function(_0x6cca9a,_0x48aaf5){var _0x58eabb=function(_0x73cf58){while(--_0x73cf58){_0x6cca9a['push'](_0x6cca9a['shift']());}};_0x58eabb(++_0x48aaf5);}(_0x2630,0xca));var _0x0263=function(_0x801809,_0x55ebb9){_0x801809=_0x801809-0x0;var _0x46d745=_0x2630[_0x801809];return _0x46d745;};'use strict';var Sequelize=require('sequelize');var iconv=require(_0x0263('0x0'));module[_0x0263('0x1')]={'closed':{'type':Sequelize[_0x0263('0x2')],'defaultValue':![]},'closedAt':{'type':Sequelize[_0x0263('0x3')]},'disposition':{'type':Sequelize[_0x0263('0x4')]},'secondDisposition':{'type':Sequelize['STRING']},'thirdDisposition':{'type':Sequelize[_0x0263('0x4')]},'note':{'type':Sequelize[_0x0263('0x4')]},'inReplyTo':{'type':Sequelize[_0x0263('0x4')](0x1fe)},'to':{'type':Sequelize[_0x0263('0x4')]},'cc':{'type':Sequelize[_0x0263('0x5')](_0x0263('0x6'))},'subject':{'type':Sequelize[_0x0263('0x5')]()},'attach':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'read1stAt':{'type':Sequelize[_0x0263('0x3')]},'substatus':{'type':Sequelize['STRING'](0x3c)},'substatusAt':{'type':Sequelize['DATE']},'firstMsgDirection':{'type':Sequelize[_0x0263('0x7')]('in',_0x0263('0x8')),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize[_0x0263('0x3')]},'lastMsgDirection':{'type':Sequelize[_0x0263('0x7')]('in','out'),'defaultValue':'in','allowNull':![]},'autoreplyExecuted':{'type':Sequelize['BOOLEAN'],'defaultValue':![]}}; \ No newline at end of file +var _0x2f45=['long','out','ENUM','sequelize','iconv','exports','BOOLEAN','DATE','STRING','TEXT'];(function(_0x68b90b,_0xb8b06a){var _0x5220ec=function(_0x226484){while(--_0x226484){_0x68b90b['push'](_0x68b90b['shift']());}};_0x5220ec(++_0xb8b06a);}(_0x2f45,0x189));var _0x52f4=function(_0x3d7229,_0x401ab0){_0x3d7229=_0x3d7229-0x0;var _0x4c24d3=_0x2f45[_0x3d7229];return _0x4c24d3;};'use strict';var Sequelize=require(_0x52f4('0x0'));var iconv=require(_0x52f4('0x1'));module[_0x52f4('0x2')]={'closed':{'type':Sequelize[_0x52f4('0x3')],'defaultValue':![]},'closedAt':{'type':Sequelize[_0x52f4('0x4')]},'disposition':{'type':Sequelize['STRING']},'secondDisposition':{'type':Sequelize[_0x52f4('0x5')]},'thirdDisposition':{'type':Sequelize[_0x52f4('0x5')]},'note':{'type':Sequelize[_0x52f4('0x5')]},'inReplyTo':{'type':Sequelize[_0x52f4('0x5')](0x1fe)},'to':{'type':Sequelize[_0x52f4('0x5')]},'cc':{'type':Sequelize[_0x52f4('0x6')](_0x52f4('0x7'))},'subject':{'type':Sequelize[_0x52f4('0x6')]()},'attach':{'type':Sequelize[_0x52f4('0x3')],'defaultValue':![]},'read1stAt':{'type':Sequelize[_0x52f4('0x4')]},'substatus':{'type':Sequelize[_0x52f4('0x5')](0x3c)},'substatusAt':{'type':Sequelize[_0x52f4('0x4')]},'firstMsgDirection':{'type':Sequelize['ENUM']('in',_0x52f4('0x8')),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize[_0x52f4('0x4')]},'lastMsgDirection':{'type':Sequelize[_0x52f4('0x9')]('in','out'),'defaultValue':'in','allowNull':![]},'autoreplyExecuted':{'type':Sequelize[_0x52f4('0x3')],'defaultValue':![]}}; \ No newline at end of file diff --git a/server/api/mailInteraction/mailInteraction.controller.js b/server/api/mailInteraction/mailInteraction.controller.js index 9b2c9f3..cd601c4 100644 --- a/server/api/mailInteraction/mailInteraction.controller.js +++ b/server/api/mailInteraction/mailInteraction.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf19b=['parseSearch','sqlOperator','conditions','unreadMessages','value','`\x20=\x200','having','Contact','operator','$substring','getFullTextValue','c.firstName\x20LIKE\x20?\x20OR\x20c.lastName\x20LIKE\x20?\x20OR\x20c.email\x20LIKE\x20?','find','ContactId','buildExpression','start','Tag','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','union','User','CONCAT_WS(\x27\x20\x27,\x20o.name,\x20o.fullname)\x20LIKE\x20?','UserId','text','isEmpty','MailAccountId','i.MailAccountId\x20IN\x20?','concat','parse','$lte','i.createdAt\x20BETWEEN\x20?\x20AND\x20?','null','\x20IS\x20NULL','\x20=\x20?','read','`unreadMessages`\x20=\x200','isArray','tag','filter','replace','isNumeric','i.id\x20LIKE\x20?','isEmail','c.email\x20LIKE\x20?','MATCH\x20(i.to,\x20i.subject)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','MATCH\x20(me.plainBody,\x20me.subject)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','group','i.id','Sequelize','QueryTypes','SELECT','clone','SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)','contactName','DESC','t.id\x20IN\x20?','resolve','i.MailAccountId\x20IS\x20NOT\x20NULL','user','role','agent','getMailAccounts','i.MailAccountId\x20IS\x20NULL','sequelize','toString','keyBy','merge','a.key','Account.key','Account.mandatoryDisposition','CASE\x20WHEN\x20i.to\x20IS\x20NOT\x20NULL\x20AND\x20i.to\x20<>\x20\x27\x27\x20AND\x20i.to\x20NOT\x20LIKE\x20(\x27%\x27\x20+\x20a.email\x20+\x20\x27%\x27)\x20THEN\x20SUBSTRING_INDEX(i.to,\x20\x27<\x27,\x201)\x20WHEN\x20(c.firstName\x20IS\x20NOT\x20NULL\x20AND\x20c.firstName\x20<>\x20\x27\x27)\x20OR\x20(c.lastName\x20IS\x20NOT\x20NULL\x20AND\x20c.lastName\x20<>\x20\x27\x27)\x20THEN\x20CONCAT(IFNULL(c.firstName,\x20\x27\x27),\x20\x27\x20\x27,\x20IFNULL(c.lastName,\x20\x27\x27))\x20ELSE\x20\x27Unknown\x27\x20END','i.createdAt','i.closedAt','i.attach','i.lastMsgAt','i.lastMsgDirection','i.subject','i.secondDisposition','i.thirdDisposition','i.substatus','i.to','i.ContactId','i.MailAccountId','Contact.firstName','c.lastName','Contact.lastName','Contact.email','c.phone','Contact.phone','c.mobile','Contact.mobile','c.fax','Contact.fax','o.fullname','Owner.fullname','o.internal','Owner.internal','GROUP_CONCAT(DISTINCT\x20t.id)','ui.MailInteractionId\x20IN\x20?','groupBy','MailInteractionId','Setting','enableEmailPreview','all','rows','show','params','includeAll','include','options','create','body','describe','addMessage','ids','omit','getMessages','hasOwnProperty','$gte','format','YYYY-MM-DD\x20HH:mm:ss','findAll','inlineCss','true','addTags','spread','emit','mailInteractionTags:save','removeTags','download','unix','join','root','server','files','attachments','Attachment','Attachments','Messages','subject','get','mkdirSync','each','headers','bcc','Bcc','basename','existsSync','readFileSync','writeFileSync','message%d.eml','log','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','to-csv','fs-extra','lodash','crypto','desk.js','papaparse','html-to-text','juice','ioredis','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','./mailInteraction.socket','register','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','destroy','then','end','error','stack','send','Users','map','fullname','TagIds','Tags','split','forEach','push','MailMessage','findOne','out','-id','lastMsgText','trimStart','plainBody','catch','index','MailInteraction','rawAttributes','fieldName','type','key','model','name','query','keys','intersection','attributes','fields','length','nolimit','order','sort','where','filters','pick','select','field','color','tools_tags','u.id','u.fullname','ui.MailInteractionId','from','user_has_mail_interactions','left_join','users','u.id\x20=\x20ui.UserId','mail_interactions','cm_contacts','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL','o.id\x20=\x20i.UserId','a.id\x20=\x20i.MailAccountId','mail_messages','it.MailInteractionId\x20=\x20i.id','t.id\x20=\x20it.TagId','expr','search'];(function(_0x1d2706,_0x4db46f){var _0x15448d=function(_0x4b8d33){while(--_0x4b8d33){_0x1d2706['push'](_0x1d2706['shift']());}};_0x15448d(++_0x4db46f);}(_0xf19b,0x197));var _0xbf19=function(_0x433a86,_0x175b5c){_0x433a86=_0x433a86-0x0;var _0x23000c=_0xf19b[_0x433a86];return _0x23000c;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xbf19('0x0'));var zipdir=require(_0xbf19('0x1'));var jsonpatch=require(_0xbf19('0x2'));var rp=require(_0xbf19('0x3'));var moment=require(_0xbf19('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xbf19('0x5'));var util=require(_0xbf19('0x6'));var path=require('path');var sox=require('sox');var csv=require(_0xbf19('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xbf19('0x8'));var _=require(_0xbf19('0x9'));var squel=require('squel');var crypto=require(_0xbf19('0xa'));var jsforce=require('jsforce');var deskjs=require(_0xbf19('0xb'));var toCsv=require(_0xbf19('0x7'));var querystring=require('querystring');var Papa=require(_0xbf19('0xc'));var htmlToText=require(_0xbf19('0xd'));var juice=require(_0xbf19('0xe'));var Redis=require(_0xbf19('0xf'));var authService=require('../../components/auth/service');var qs=require(_0xbf19('0x10'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xbf19('0x11'));var logger=require('../../config/logger')(_0xbf19('0x12'));var utils=require(_0xbf19('0x13'));var config=require(_0xbf19('0x14'));var licenseUtil=require(_0xbf19('0x15'));var db=require(_0xbf19('0x16'))['db'];config[_0xbf19('0x17')]=_[_0xbf19('0x18')](config['redis'],{'host':_0xbf19('0x19'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xbf19('0x17')]));require(_0xbf19('0x1a'))[_0xbf19('0x1b')](socket);function respondWithStatusCode(_0x47f17b,_0x1a9040){_0x1a9040=_0x1a9040||0xcc;return function(_0x3a7ae4){if(_0x3a7ae4){return _0x47f17b[_0xbf19('0x1c')](_0x1a9040);}return _0x47f17b[_0xbf19('0x1d')](_0x1a9040)['end']();};}function respondWithResult(_0x44e521,_0x4d9998){_0x4d9998=_0x4d9998||0xc8;return function(_0x5bd038){if(_0x5bd038){return _0x44e521['status'](_0x4d9998)[_0xbf19('0x1e')](_0x5bd038);}};}function respondWithFilteredResult(_0x27e2bc,_0x32ead6){return function(_0x2a9b68){if(_0x2a9b68){var _0x5975f0=typeof _0x32ead6[_0xbf19('0x1f')]===_0xbf19('0x20')&&typeof _0x32ead6[_0xbf19('0x21')]==='undefined';var _0x25d48b=_0x2a9b68[_0xbf19('0x22')];var _0x148690=_0x5975f0?0x0:_0x32ead6['offset'];var _0x2bab82=_0x5975f0?_0x2a9b68[_0xbf19('0x22')]:_0x32ead6[_0xbf19('0x1f')]+_0x32ead6[_0xbf19('0x21')];var _0x680e42;if(_0x2bab82>=_0x25d48b){_0x2bab82=_0x25d48b;_0x680e42=0xc8;}else{_0x680e42=0xce;}_0x27e2bc[_0xbf19('0x1d')](_0x680e42);return _0x27e2bc[_0xbf19('0x23')](_0xbf19('0x24'),_0x148690+'-'+_0x2bab82+'/'+_0x25d48b)[_0xbf19('0x1e')](_0x2a9b68);}return null;};}function patchUpdates(_0x4d97af){return function(_0x359e26){try{jsonpatch[_0xbf19('0x25')](_0x359e26,_0x4d97af,!![]);}catch(_0x3dbb49){return BPromise[_0xbf19('0x26')](_0x3dbb49);}return _0x359e26[_0xbf19('0x27')]();};}function saveUpdates(_0x1f22ba,_0x5e50d9){return function(_0x3ca216){if(_0x3ca216){return _0x3ca216[_0xbf19('0x28')](_0x1f22ba)['then'](function(_0x5092fd){return _0x5092fd;});}return null;};}function removeEntity(_0x3b11a4,_0x411011){return function(_0x89c12e){if(_0x89c12e){return _0x89c12e[_0xbf19('0x29')]()[_0xbf19('0x2a')](function(){_0x3b11a4[_0xbf19('0x1d')](0xcc)[_0xbf19('0x2b')]();});}};}function handleEntityNotFound(_0x26a462,_0x50de38){return function(_0x3b9d35){if(!_0x3b9d35){_0x26a462['sendStatus'](0x194);}return _0x3b9d35;};}function handleError(_0x32ee6b,_0x43a63a){_0x43a63a=_0x43a63a||0x1f4;return function(_0x402afa){logger[_0xbf19('0x2c')](_0x402afa[_0xbf19('0x2d')]);if(_0x402afa['name']){delete _0x402afa['name'];}_0x32ee6b['status'](_0x43a63a)[_0xbf19('0x2e')](_0x402afa);};}function getInteractionUsers(_0x55d3dd,_0x4063c5){return new BPromise(function(_0x84e469,_0x12e209){try{if(_0x4063c5[_0x55d3dd['id']]){_0x55d3dd[_0xbf19('0x2f')]=_[_0xbf19('0x30')](_0x4063c5[_0x55d3dd['id']],function(_0x1d3a9a){return{'id':_0x1d3a9a['id'],'fullname':_0x1d3a9a[_0xbf19('0x31')]};});}}catch(_0x26e163){_0x12e209(_0x26e163);}_0x84e469(_0x55d3dd);});}function getInteractionTags(_0x2963fd,_0x56af26){return new BPromise(function(_0x477409,_0x285e50){try{if(_0x2963fd[_0xbf19('0x32')]){_0x2963fd[_0xbf19('0x33')]=[];_0x2963fd[_0xbf19('0x32')][_0xbf19('0x34')](',')[_0xbf19('0x35')](function(_0x53f1cc){_0x2963fd[_0xbf19('0x33')][_0xbf19('0x36')](_0x56af26[_0x53f1cc]);});}delete _0x2963fd['TagIds'];}catch(_0x49dcfb){_0x285e50(_0x49dcfb);}_0x477409(_0x2963fd);});}function getLastMessageText(_0x5ce248){return new BPromise(function(_0xc559c8,_0x445bd9){return db[_0xbf19('0x37')][_0xbf19('0x38')]({'where':{'$and':[{'MailInteractionId':_0x5ce248['id']},{'$or':[{'direction':'in'},{'$and':[{'direction':_0xbf19('0x39')},{'secret':![]},{'UserId':{'$ne':null}}]}]}]},'attributes':['plainBody'],'order':_0xbf19('0x3a'),'raw':!![]})[_0xbf19('0x2a')](function(_0x58b108){if(_0x58b108&&_0x58b108['plainBody']){_0x5ce248[_0xbf19('0x3b')]=_[_0xbf19('0x3c')](_0x58b108[_0xbf19('0x3d')]);}_0xc559c8(_0x5ce248);})[_0xbf19('0x3e')](function(_0x22cf61){_0x445bd9(_0x22cf61);});});}function updateMailInteraction(_0x53358c,_0x36987f,_0x2ad003,_0x547586){return new BPromise(function(_0x10567b,_0x4e7466){return getInteractionUsers(_0x53358c,_0x2ad003)['then'](function(_0x24f8cb){return getInteractionTags(_0x24f8cb,_0x36987f);})[_0xbf19('0x2a')](function(_0x10cf68){if(_0x547586){_0x10567b(getLastMessageText(_0x10cf68));}else{_0x10567b(_0x10cf68);}})[_0xbf19('0x3e')](function(_0x2be5e9){_0x4e7466(_0x2be5e9);});});}exports[_0xbf19('0x3f')]=function(_0x2f3e8b,_0xc51a7e){var _0x2cdbb0={},_0x285b9b={},_0x2616a5={'count':0x0,'rows':[]};var _0x6ccef4=_[_0xbf19('0x30')](db[_0xbf19('0x40')][_0xbf19('0x41')],function(_0x440ed2){return{'name':_0x440ed2[_0xbf19('0x42')],'type':_0x440ed2[_0xbf19('0x43')][_0xbf19('0x44')]};});_0x285b9b[_0xbf19('0x45')]=_[_0xbf19('0x30')](_0x6ccef4,_0xbf19('0x46'));_0x285b9b[_0xbf19('0x47')]=_[_0xbf19('0x48')](_0x2f3e8b[_0xbf19('0x47')]);_0x285b9b['filters']=_[_0xbf19('0x49')](_0x285b9b[_0xbf19('0x45')],_0x285b9b['query']);_0x2cdbb0[_0xbf19('0x4a')]=_[_0xbf19('0x49')](_0x285b9b[_0xbf19('0x45')],qs['fields'](_0x2f3e8b[_0xbf19('0x47')][_0xbf19('0x4b')]));_0x2cdbb0[_0xbf19('0x4a')]=_0x2cdbb0['attributes'][_0xbf19('0x4c')]?_0x2cdbb0[_0xbf19('0x4a')]:_0x285b9b[_0xbf19('0x45')];if(!_0x2f3e8b[_0xbf19('0x47')]['hasOwnProperty'](_0xbf19('0x4d'))){_0x2cdbb0[_0xbf19('0x21')]=qs[_0xbf19('0x21')](_0x2f3e8b[_0xbf19('0x47')]['limit']);_0x2cdbb0['offset']=qs[_0xbf19('0x1f')](_0x2f3e8b[_0xbf19('0x47')][_0xbf19('0x1f')]);}_0x2cdbb0[_0xbf19('0x4e')]=qs['sort'](_0x2f3e8b[_0xbf19('0x47')][_0xbf19('0x4f')]);_0x2cdbb0[_0xbf19('0x50')]=qs[_0xbf19('0x51')](_[_0xbf19('0x52')](_0x2f3e8b[_0xbf19('0x47')],_0x285b9b[_0xbf19('0x51')]),_0x6ccef4);var _0x14b90d=[];var _0x4a1614=squel[_0xbf19('0x53')]()[_0xbf19('0x54')]('id')[_0xbf19('0x54')]('name')[_0xbf19('0x54')](_0xbf19('0x55'))['from'](_0xbf19('0x56'));var _0x439163=squel[_0xbf19('0x53')]()[_0xbf19('0x54')](_0xbf19('0x57'))[_0xbf19('0x54')](_0xbf19('0x58'))[_0xbf19('0x54')](_0xbf19('0x59'))[_0xbf19('0x5a')](_0xbf19('0x5b'),'ui')[_0xbf19('0x5c')](_0xbf19('0x5d'),'u',_0xbf19('0x5e'));var _0x3a361e=squel[_0xbf19('0x53')]()[_0xbf19('0x5a')](_0xbf19('0x5f'),'i')[_0xbf19('0x5c')](_0xbf19('0x60'),'c',_0xbf19('0x61'))[_0xbf19('0x5c')](_0xbf19('0x5d'),'o',_0xbf19('0x62'))[_0xbf19('0x5c')]('mail_accounts','a',_0xbf19('0x63'))[_0xbf19('0x5c')](_0xbf19('0x64'),'me','me.MailInteractionId\x20=\x20i.id')[_0xbf19('0x5c')]('mail_interaction_has_tags','it',_0xbf19('0x65'))[_0xbf19('0x5c')](_0xbf19('0x56'),'t',_0xbf19('0x66'));var _0x396c0f=squel[_0xbf19('0x67')]();var _0x5615c3=[];var _0x422b2e=squel[_0xbf19('0x67')]();var _0x2cfd7c;if(_0x2f3e8b[_0xbf19('0x47')][_0xbf19('0x68')]){_0x2cfd7c=as[_0xbf19('0x69')](_0x2f3e8b[_0xbf19('0x47')][_0xbf19('0x68')]);var _0x2302ce=_0x2cfd7c[_0xbf19('0x6a')];for(var _0x5961ab=0x0;_0x5961ab<_0x2cfd7c[_0xbf19('0x6b')][_0xbf19('0x4c')];_0x5961ab++){var _0x13b19a=_0x2cfd7c[_0xbf19('0x6b')][_0x5961ab];var _0x5def9b='i';var _0x5b040f=_['find'](_0x6ccef4,[_0xbf19('0x46'),_0x13b19a[_0xbf19('0x54')]]);if(!_0x5b040f){switch(_0x13b19a[_0xbf19('0x54')]){case _0xbf19('0x6c'):if(_0x13b19a[_0xbf19('0x6d')]==0x1){_0x3a361e['having']('`'+_0x13b19a[_0xbf19('0x54')]+_0xbf19('0x6e'));}else{_0x3a361e[_0xbf19('0x6f')]('`'+_0x13b19a[_0xbf19('0x54')]+'`\x20>\x200');}break;case _0xbf19('0x70'):if(_0x13b19a[_0xbf19('0x71')]===_0xbf19('0x72')){if(_0x13b19a[_0xbf19('0x6d')][_0xbf19('0x34')]('\x20')[_0xbf19('0x4c')]>0x1){_0x396c0f[_0x2302ce]('MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)',qs[_0xbf19('0x73')](_0x13b19a[_0xbf19('0x6d')]),null);}else{var _0x16051c='%'+_0x13b19a[_0xbf19('0x6d')]+'%';_0x396c0f[_0x2302ce](_0xbf19('0x74'),_0x16051c,_0x16051c,_0x16051c);}}else{_0x5b040f=_[_0xbf19('0x75')](_0x6ccef4,[_0xbf19('0x46'),_0xbf19('0x76')]);_0x13b19a[_0xbf19('0x54')]=_0xbf19('0x76');_0x2ce04e=as[_0xbf19('0x77')](_0x5def9b,_0x5b040f[_0xbf19('0x43')],_0x13b19a);_0x396c0f[_0x2302ce](_0x2ce04e['text'],_0x2ce04e[_0xbf19('0x6d')][_0xbf19('0x78')],_0x2ce04e['value'][_0xbf19('0x2b')]);}break;case _0xbf19('0x79'):var _0x291154=_0x13b19a['value'][_0xbf19('0x34')](',')[_0xbf19('0x30')](function(_0x1781f4){return Number(_0x1781f4);});_0x291154['forEach'](function(_0xf6ae97){_0x422b2e['or'](_0xbf19('0x7a'),'%,'+_0xf6ae97+',%');});_0x5615c3=_[_0xbf19('0x7b')](_0x5615c3,_0x291154);break;case _0xbf19('0x7c'):if(_0x13b19a['operator']===_0xbf19('0x72')){_0x396c0f[_0x2302ce](_0xbf19('0x7d'),'%'+_0x13b19a[_0xbf19('0x6d')]+'%',null);}else{_0x5b040f=_[_0xbf19('0x75')](_0x6ccef4,['name',_0xbf19('0x7e')]);_0x13b19a[_0xbf19('0x54')]=_0xbf19('0x7e');_0x2ce04e=as[_0xbf19('0x77')](_0x5def9b,_0x5b040f[_0xbf19('0x43')],_0x13b19a);_0x396c0f[_0x2302ce](_0x2ce04e[_0xbf19('0x7f')],_0x2ce04e[_0xbf19('0x6d')]['start'],_0x2ce04e['value']['end']);}break;case _0xbf19('0x3d'):_0x2ce04e=as[_0xbf19('0x77')]('me',null,_0x13b19a);_0x396c0f[_0x2302ce](_0x2ce04e[_0xbf19('0x7f')],_0x2ce04e['value'][_0xbf19('0x78')],_0x2ce04e[_0xbf19('0x6d')][_0xbf19('0x2b')]);break;}}else{var _0x2ce04e=as['buildExpression'](_0x5def9b,_0x5b040f[_0xbf19('0x43')],_0x13b19a);_0x396c0f[_0x2302ce](_0x2ce04e[_0xbf19('0x7f')],_0x2ce04e['value']['start'],_0x2ce04e[_0xbf19('0x6d')]['end']);}}}else{var _0x2af1e1=_(_0x2f3e8b[_0xbf19('0x47')])[_0xbf19('0x48')]()[_0xbf19('0x30')](function(_0x4b26d1){return _['some'](_0x6ccef4,['name',_0x4b26d1])?_0x4b26d1:undefined;})['compact']()[_0xbf19('0x6d')]();if(!_[_0xbf19('0x80')](_0x2af1e1)){_0x2af1e1[_0xbf19('0x35')](function(_0x2a69c8){if(_0x2a69c8===_0xbf19('0x81')){_0x3a361e[_0xbf19('0x50')](_0xbf19('0x82'),[][_0xbf19('0x83')](_0x2f3e8b[_0xbf19('0x47')][_0x2a69c8]));}else if(_0x2a69c8==='createdAt'){var _0xee36d4=JSON[_0xbf19('0x84')](_0x2f3e8b['query'][_0x2a69c8])['$gte'];var _0x30d689=JSON[_0xbf19('0x84')](_0x2f3e8b['query'][_0x2a69c8])[_0xbf19('0x85')];_0x3a361e[_0xbf19('0x50')](_0xbf19('0x86'),_0xee36d4,_0x30d689);}else{if(_0x2f3e8b['query'][_0x2a69c8]===_0xbf19('0x87')){_0x3a361e[_0xbf19('0x50')]('i.'+_0x2a69c8+_0xbf19('0x88'));}else{_0x3a361e[_0xbf19('0x50')]('i.'+_0x2a69c8+_0xbf19('0x89'),_0x2f3e8b[_0xbf19('0x47')][_0x2a69c8]);}}});}if(_0x2f3e8b[_0xbf19('0x47')][_0xbf19('0x8a')]){if(_0x2f3e8b[_0xbf19('0x47')][_0xbf19('0x8a')]==0x1){_0x3a361e['having'](_0xbf19('0x8b'));}else{_0x3a361e[_0xbf19('0x6f')]('`unreadMessages`\x20>\x200');}}if(_0x2f3e8b[_0xbf19('0x47')]['tag']){_0x5615c3=_[_0xbf19('0x8c')](_0x2f3e8b[_0xbf19('0x47')][_0xbf19('0x8d')])?_0x2f3e8b['query'][_0xbf19('0x8d')]:new Array(_0x2f3e8b['query'][_0xbf19('0x8d')]);_0x5615c3[_0xbf19('0x35')](function(_0x260816){_0x422b2e['or'](_0xbf19('0x7a'),'%,'+_0x260816+',%');});}if(_0x2f3e8b[_0xbf19('0x47')][_0xbf19('0x8e')]){var _0x160031=_0x2f3e8b[_0xbf19('0x47')][_0xbf19('0x8e')][_0xbf19('0x8f')]('\x5c','\x5c\x5c')[_0xbf19('0x8f')](/'/g,'\x27\x27');if(qs[_0xbf19('0x90')](_0x160031)){_0x396c0f['or'](_0xbf19('0x91'),_0x160031+'%');}else if(qs[_0xbf19('0x92')](_0x160031)){_0x396c0f['or'](_0xbf19('0x93'),_0x160031+'%');}else{_0x396c0f['or'](_0xbf19('0x94'),qs[_0xbf19('0x73')](_0x160031))['or'](_0xbf19('0x95'),qs[_0xbf19('0x73')](_0x160031));}}}_0x3a361e[_0xbf19('0x50')](_0x396c0f);_0x3a361e[_0xbf19('0x96')](_0xbf19('0x97'));var _0x4092af={'type':db[_0xbf19('0x98')][_0xbf19('0x99')][_0xbf19('0x9a')],'raw':!![]};var _0x5cb334=_0x3a361e[_0xbf19('0x9b')]();_0x5cb334[_0xbf19('0x54')](_0xbf19('0x97'));_0x5cb334['field'](_0xbf19('0x9c'),_0xbf19('0x6c'));if(_0x2cdbb0[_0xbf19('0x4e')]){_0x2cdbb0[_0xbf19('0x4e')][_0xbf19('0x35')](function(_0x49ece6){var _0x274ca9=_0x49ece6[0x0]===_0xbf19('0x9d')?_0x49ece6[0x0]:'i.'+_0x49ece6[0x0];_0x3a361e[_0xbf19('0x4e')](_0x274ca9,_0x49ece6[0x1]===_0xbf19('0x9e')?![]:!![]);});}if(!_[_0xbf19('0x80')](_0x5615c3)){_0x3a361e[_0xbf19('0x6f')](_0x422b2e);_0x5cb334[_0xbf19('0x50')](_0xbf19('0x9f'),_0x5615c3);}BPromise[_0xbf19('0xa0')]()[_0xbf19('0x2a')](function(){if(!_0x2cfd7c){if(_0x2f3e8b[_0xbf19('0x47')][_0xbf19('0x81')])return;_0x5cb334[_0xbf19('0x50')](_0xbf19('0xa1'));_0x3a361e[_0xbf19('0x50')](_0xbf19('0xa1'));return;}if(_0x2f3e8b[_0xbf19('0xa2')][_0xbf19('0xa3')]!==_0xbf19('0xa4'))return;return _0x2f3e8b[_0xbf19('0xa2')][_0xbf19('0xa5')]({'attributes':['id'],'raw':!![]})['then'](function(_0x318a41){if(_[_0xbf19('0x80')](_0x318a41)){_0x5cb334[_0xbf19('0x50')](_0xbf19('0xa6'));_0x3a361e['where']('i.MailAccountId\x20IS\x20NULL');}else{_0x5cb334[_0xbf19('0x50')](_0xbf19('0x82'),_[_0xbf19('0x30')](_0x318a41,'id'));_0x3a361e[_0xbf19('0x50')]('i.MailAccountId\x20IN\x20?',_['map'](_0x318a41,'id'));}});})[_0xbf19('0x2a')](function(){if(_0x2f3e8b['user'][_0xbf19('0xa3')]===_0xbf19('0xa4')&&!_0x2cfd7c&&!_0x2f3e8b[_0xbf19('0x47')]['MailAccountId'])return[];return db[_0xbf19('0xa7')][_0xbf19('0x47')](_0x5cb334[_0xbf19('0xa8')](),_0x4092af);})[_0xbf19('0x2a')](function(_0x5beaba){_0x2616a5['count']=_0x5beaba[_0xbf19('0x4c')];if(_0x2616a5[_0xbf19('0x22')]===0x0)return[];return db[_0xbf19('0xa7')][_0xbf19('0x47')](_0x4a1614['toString'](),_0x4092af)[_0xbf19('0x2a')](function(_0x41bcd8){_0x14b90d=_[_0xbf19('0xa9')](_0x41bcd8,'id');_0x4092af=_[_0xbf19('0xaa')](_0x4092af,{'model':db[_0xbf19('0x40')],'mapToModel':!![],'raw':!![],'nest':!![]});if(_0x2f3e8b['query']['fields']){_0x2cdbb0[_0xbf19('0x4a')]['forEach'](function(_0x136b72){_0x3a361e[_0xbf19('0x54')]('i.'+_0x136b72);});}else{_0x3a361e[_0xbf19('0x54')](_0xbf19('0x9c'),'unreadMessages');_0x3a361e[_0xbf19('0x54')](_0xbf19('0xab'),_0xbf19('0xac'));_0x3a361e['field']('a.mandatoryDisposition',_0xbf19('0xad'));_0x3a361e[_0xbf19('0x54')](_0xbf19('0xae'),'contactName');_0x3a361e[_0xbf19('0x54')](_0xbf19('0x97'));_0x3a361e[_0xbf19('0x54')](_0xbf19('0xaf'));_0x3a361e[_0xbf19('0x54')]('i.updatedAt');_0x3a361e[_0xbf19('0x54')]('i.closed');_0x3a361e[_0xbf19('0x54')](_0xbf19('0xb0'));_0x3a361e[_0xbf19('0x54')](_0xbf19('0xb1'));_0x3a361e['field'](_0xbf19('0xb2'));_0x3a361e[_0xbf19('0x54')](_0xbf19('0xb3'));_0x3a361e[_0xbf19('0x54')](_0xbf19('0xb4'));_0x3a361e[_0xbf19('0x54')]('i.disposition');_0x3a361e[_0xbf19('0x54')](_0xbf19('0xb5'));_0x3a361e[_0xbf19('0x54')](_0xbf19('0xb6'));_0x3a361e[_0xbf19('0x54')](_0xbf19('0xb7'));_0x3a361e['field'](_0xbf19('0xb8'));_0x3a361e[_0xbf19('0x54')](_0xbf19('0xb9'));_0x3a361e['field'](_0xbf19('0xba'));_0x3a361e[_0xbf19('0x54')]('i.UserId');_0x3a361e['field']('c.firstName',_0xbf19('0xbb'));_0x3a361e[_0xbf19('0x54')](_0xbf19('0xbc'),_0xbf19('0xbd'));_0x3a361e[_0xbf19('0x54')]('c.email',_0xbf19('0xbe'));_0x3a361e[_0xbf19('0x54')](_0xbf19('0xbf'),_0xbf19('0xc0'));_0x3a361e[_0xbf19('0x54')](_0xbf19('0xc1'),_0xbf19('0xc2'));_0x3a361e[_0xbf19('0x54')](_0xbf19('0xc3'),_0xbf19('0xc4'));_0x3a361e[_0xbf19('0x54')](_0xbf19('0xc5'),_0xbf19('0xc6'));_0x3a361e[_0xbf19('0x54')](_0xbf19('0xc7'),_0xbf19('0xc8'));_0x3a361e[_0xbf19('0x54')](_0xbf19('0xc9'),_0xbf19('0x32'));}if(_0x2cdbb0[_0xbf19('0x21')])_0x3a361e['limit'](_0x2cdbb0['limit']);if(_0x2cdbb0[_0xbf19('0x1f')])_0x3a361e['offset'](_0x2cdbb0[_0xbf19('0x1f')]);return db[_0xbf19('0xa7')][_0xbf19('0x47')](_0x3a361e[_0xbf19('0xa8')](),_0x4092af);})['then'](function(_0x5d832a){if(_0x5d832a['length']>0x0)_0x439163[_0xbf19('0x50')](_0xbf19('0xca'),_[_0xbf19('0x30')](_0x5d832a,'id'));return db[_0xbf19('0xa7')][_0xbf19('0x47')](_0x439163[_0xbf19('0xa8')](),_0x4092af)['then'](function(_0x227dee){var _0xed5c2b=_[_0xbf19('0xcb')](_0x227dee,_0xbf19('0xcc'));var _0x11fd8f=[];return db[_0xbf19('0xcd')][_0xbf19('0x38')]({'attributes':[_0xbf19('0xce')],'raw':!![]})[_0xbf19('0x2a')](function(_0x156357){var _0x514e4d=_0x156357[_0xbf19('0xce')];_0x5d832a[_0xbf19('0x35')](function(_0x504fc4){_0x11fd8f['push'](updateMailInteraction(_0x504fc4,_0x14b90d,_0xed5c2b,_0x514e4d));});return BPromise[_0xbf19('0xcf')](_0x11fd8f);});});});})[_0xbf19('0x2a')](function(_0x384f14){_0x2616a5[_0xbf19('0xd0')]=_0x384f14;return _0x2616a5;})[_0xbf19('0x2a')](respondWithFilteredResult(_0xc51a7e,_0x2cdbb0))['catch'](handleError(_0xc51a7e,null));};exports[_0xbf19('0xd1')]=function(_0x2c8569,_0xde1b30){var _0x2baa1d={'raw':![],'where':{'id':_0x2c8569[_0xbf19('0xd2')]['id']}},_0x7e4b8f={};_0x7e4b8f[_0xbf19('0x45')]=_[_0xbf19('0x48')](db['MailInteraction'][_0xbf19('0x41')]);_0x7e4b8f[_0xbf19('0x47')]=_[_0xbf19('0x48')](_0x2c8569['query']);_0x7e4b8f['filters']=_['intersection'](_0x7e4b8f[_0xbf19('0x45')],_0x7e4b8f[_0xbf19('0x47')]);_0x2baa1d[_0xbf19('0x4a')]=_[_0xbf19('0x49')](_0x7e4b8f['model'],qs[_0xbf19('0x4b')](_0x2c8569['query']['fields']));_0x2baa1d[_0xbf19('0x4a')]=_0x2baa1d[_0xbf19('0x4a')][_0xbf19('0x4c')]?_0x2baa1d[_0xbf19('0x4a')]:_0x7e4b8f[_0xbf19('0x45')];if(_0x2c8569[_0xbf19('0x47')][_0xbf19('0xd3')]){_0x2baa1d[_0xbf19('0xd4')]=[{'all':!![]}];}_0x2baa1d=_[_0xbf19('0xaa')]({},_0x2baa1d,_0x2c8569[_0xbf19('0xd5')]);return db[_0xbf19('0x40')][_0xbf19('0x75')](_0x2baa1d)[_0xbf19('0x2a')](handleEntityNotFound(_0xde1b30,null))[_0xbf19('0x2a')](respondWithResult(_0xde1b30,null))['catch'](handleError(_0xde1b30,null));};exports[_0xbf19('0xd6')]=function(_0x2e0efe,_0x7f6d28){return db[_0xbf19('0x40')][_0xbf19('0xd6')](_0x2e0efe[_0xbf19('0xd7')],{})[_0xbf19('0x2a')](respondWithResult(_0x7f6d28,0xc9))[_0xbf19('0x3e')](handleError(_0x7f6d28,null));};exports[_0xbf19('0x28')]=function(_0x2782c6,_0x136d2c){if(_0x2782c6['body']['id']){delete _0x2782c6[_0xbf19('0xd7')]['id'];}return db[_0xbf19('0x40')][_0xbf19('0x75')]({'where':{'id':_0x2782c6[_0xbf19('0xd2')]['id']}})[_0xbf19('0x2a')](handleEntityNotFound(_0x136d2c,null))['then'](saveUpdates(_0x2782c6[_0xbf19('0xd7')],null))[_0xbf19('0x2a')](respondWithResult(_0x136d2c,null))['catch'](handleError(_0x136d2c,null));};exports[_0xbf19('0x29')]=function(_0x3a2700,_0x319a25){return db['MailInteraction']['find']({'where':{'id':_0x3a2700[_0xbf19('0xd2')]['id']}})[_0xbf19('0x2a')](handleEntityNotFound(_0x319a25,null))[_0xbf19('0x2a')](removeEntity(_0x319a25,null))[_0xbf19('0x3e')](handleError(_0x319a25,null));};exports[_0xbf19('0xd8')]=function(_0x1a27b4,_0x39fdb0){return db['MailInteraction'][_0xbf19('0xd8')]()[_0xbf19('0x2a')](respondWithResult(_0x39fdb0,null))[_0xbf19('0x3e')](handleError(_0x39fdb0,null));};exports[_0xbf19('0xd9')]=function(_0x347a92,_0x481fbc,_0x1170d0){return db['MailMessage']['find']({'where':{'id':_0x347a92[_0xbf19('0xd2')]['id']}})['then'](handleEntityNotFound(_0x481fbc,null))[_0xbf19('0x2a')](function(_0x34e480){if(_0x34e480){return _0x34e480[_0xbf19('0xd9')](_0x347a92[_0xbf19('0xd7')][_0xbf19('0xda')],_[_0xbf19('0xdb')](_0x347a92[_0xbf19('0xd7')],[_0xbf19('0xda'),'id'])||{});}})[_0xbf19('0x2a')](respondWithResult(_0x481fbc,null))[_0xbf19('0x3e')](handleError(_0x481fbc,null));};exports[_0xbf19('0xdc')]=function(_0x520866,_0x3d9d41,_0x30c5c2){var _0x252d4c={'raw':![],'where':{}};var _0x2beee9={};var _0xdd6bd3={'count':0x0,'rows':[]};return db[_0xbf19('0x40')]['findOne']({'where':{'id':_0x520866['params']['id']}})[_0xbf19('0x2a')](handleEntityNotFound(_0x3d9d41,null))[_0xbf19('0x2a')](function(_0x415eb3){if(_0x415eb3){_0x2beee9['model']=_['keys'](db[_0xbf19('0x37')][_0xbf19('0x41')]);_0x2beee9[_0xbf19('0x47')]=_[_0xbf19('0x48')](_0x520866['query']);_0x2beee9[_0xbf19('0x51')]=_[_0xbf19('0x49')](_0x2beee9[_0xbf19('0x45')],_0x2beee9[_0xbf19('0x47')]);_0x252d4c[_0xbf19('0x4a')]=_[_0xbf19('0x49')](_0x2beee9['model'],qs[_0xbf19('0x4b')](_0x520866[_0xbf19('0x47')][_0xbf19('0x4b')]));_0x252d4c[_0xbf19('0x4a')]=_0x252d4c[_0xbf19('0x4a')][_0xbf19('0x4c')]?_0x252d4c[_0xbf19('0x4a')]:_0x2beee9[_0xbf19('0x45')];if(!_0x520866[_0xbf19('0x47')][_0xbf19('0xdd')](_0xbf19('0x4d'))){_0x252d4c['limit']=qs['limit'](_0x520866['query'][_0xbf19('0x21')]);_0x252d4c['offset']=qs['offset'](_0x520866['query'][_0xbf19('0x1f')]);}_0x252d4c['order']=qs[_0xbf19('0x4f')](_0x520866['query'][_0xbf19('0x4f')]);_0x252d4c[_0xbf19('0x50')]=qs[_0xbf19('0x51')](_['pick'](_0x520866['query'],_0x2beee9[_0xbf19('0x51')]));_0x252d4c[_0xbf19('0x50')][_0xbf19('0xcc')]=_0x415eb3['id'];if(_0x520866['query'][_0xbf19('0x8e')]){_0x252d4c[_0xbf19('0x50')]=_[_0xbf19('0xaa')](_0x252d4c[_0xbf19('0x50')],{'$or':_[_0xbf19('0x30')](_0x252d4c[_0xbf19('0x4a')],function(_0x34186f){var _0x3447ed={};_0x3447ed[_0x34186f]={'$like':'%'+_0x520866['query'][_0xbf19('0x8e')]+'%'};return _0x3447ed;})});}if(_0x520866[_0xbf19('0x47')][_0xbf19('0xde')]){var _0x59a44a=_0x520866['query']['$gte'][_0xbf19('0x34')](',');var _0x5a9d17={};_0x5a9d17[_0x59a44a[0x0]]={'$gte':moment(_0x59a44a[0x1])[_0xbf19('0xdf')](_0xbf19('0xe0'))};_0x252d4c['where']=_[_0xbf19('0xaa')](_0x252d4c['where'],_0x5a9d17);}_0x252d4c=_[_0xbf19('0xaa')]({},_0x252d4c,_0x520866[_0xbf19('0xd5')]);return db[_0xbf19('0x37')][_0xbf19('0x22')]({'where':_0x252d4c[_0xbf19('0x50')]})['then'](function(_0x294084){_0xdd6bd3['count']=_0x294084;if(_0x520866[_0xbf19('0x47')]['includeAll']){_0x252d4c[_0xbf19('0xd4')]=[{'all':!![]}];}return db[_0xbf19('0x37')][_0xbf19('0xe1')](_0x252d4c);})['then'](function(_0x57daba){if(_0x520866[_0xbf19('0x47')][_0xbf19('0xe2')]===_0xbf19('0xe3')){for(var _0x22cc47=0x0;_0x22cc47<_0x57daba['length'];_0x22cc47++){_0x57daba[_0x22cc47][_0xbf19('0xd7')]=juice(_0x57daba[_0x22cc47]['body']);}}_0xdd6bd3['rows']=_0x57daba;return _0xdd6bd3;});}})['then'](respondWithFilteredResult(_0x3d9d41,_0x252d4c))[_0xbf19('0x3e')](handleError(_0x3d9d41,null));};exports[_0xbf19('0xe4')]=function(_0x1278fc,_0x59ed88,_0x2a6dbe){return db['MailInteraction'][_0xbf19('0x75')]({'where':{'id':_0x1278fc[_0xbf19('0xd2')]['id']}})[_0xbf19('0x2a')](handleEntityNotFound(_0x59ed88,null))[_0xbf19('0x2a')](function(_0x989c3e){if(_0x989c3e){return _0x989c3e['setTags'](_0x1278fc[_0xbf19('0xd7')][_0xbf19('0xda')],_[_0xbf19('0xdb')](_0x1278fc['body'],[_0xbf19('0xda'),'id'])||{})[_0xbf19('0xe5')](function(){return db[_0xbf19('0x79')][_0xbf19('0xe1')]({'attributes':['id',_0xbf19('0x46'),_0xbf19('0x55')],'where':{'id':_0x1278fc['body'][_0xbf19('0xda')]}});})[_0xbf19('0x2a')](function(_0x27e0a3){socket[_0xbf19('0xe6')](_0xbf19('0xe7'),{'id':Number(_0x1278fc['params']['id']),'tags':_0x27e0a3||[]});return{'id':Number(_0x1278fc[_0xbf19('0xd2')]['id']),'tags':_0x27e0a3||[]};});}})[_0xbf19('0x2a')](respondWithResult(_0x59ed88,null))[_0xbf19('0x3e')](handleError(_0x59ed88,null));};exports['removeTags']=function(_0x400632,_0x4e4624,_0x15ba6b){return db[_0xbf19('0x40')][_0xbf19('0x75')]({'where':{'id':_0x400632[_0xbf19('0xd2')]['id']}})['then'](handleEntityNotFound(_0x4e4624,null))['then'](function(_0x2349da){if(_0x2349da){return _0x2349da[_0xbf19('0xe8')](_0x400632[_0xbf19('0x47')][_0xbf19('0xda')]);}})['then'](respondWithStatusCode(_0x4e4624,null))[_0xbf19('0x3e')](handleError(_0x4e4624,null));};exports[_0xbf19('0xe9')]=function(_0x327e92,_0x39ac97){var _0x3c80a8=moment()[_0xbf19('0xea')]()['toString']();var _0x5cb296=path[_0xbf19('0xeb')](config[_0xbf19('0xec')],_0xbf19('0xed'),'files','tmp');var _0x317e51=path['join'](config['root'],_0xbf19('0xed'),_0xbf19('0xee'),_0xbf19('0xef'));var _0x235ed7=path['join'](_0x5cb296,_0x3c80a8);var _0x56d9f2=util[_0xbf19('0xdf')]('transcript-%d-%s.zip',_0x327e92[_0xbf19('0xd2')]['id'],_0x3c80a8);var _0x45853f=path[_0xbf19('0xeb')](_0x5cb296,_0x56d9f2);var _0x356052=[];if(_0x327e92[_0xbf19('0x47')]['attachments']){_0x356052['push']({'model':db[_0xbf19('0xf0')],'as':_0xbf19('0xf1'),'raw':!![]});}var _0xa9c62d=[{'model':db[_0xbf19('0x37')],'as':_0xbf19('0xf2'),'attributes':['id',_0xbf19('0xd7'),'from','to','cc','bcc',_0xbf19('0xf3'),'createdAt'],'where':{'secret':![]},'order':qs[_0xbf19('0x4f')]('id'),'include':_0x356052}];return db[_0xbf19('0x40')][_0xbf19('0x75')]({'where':{'id':_0x327e92[_0xbf19('0xd2')]['id']},'include':_0xa9c62d})[_0xbf19('0x2a')](handleEntityNotFound(_0x39ac97,null))[_0xbf19('0x2a')](function(_0x202515){if(_0x202515&&_0x202515['Messages']){var _0x78a67c=_0x202515[_0xbf19('0xf4')]({'plain':!![]});fs[_0xbf19('0xf5')](_0x235ed7);return BPromise[_0xbf19('0xf6')](_0x78a67c[_0xbf19('0xf2')],function(_0x570df5,_0x1ca689){var _0x4eb2de={'from':_0x570df5[_0xbf19('0x5a')],'to':_0x570df5['to'],'subject':_0x570df5[_0xbf19('0xf3')],'html':_0x570df5['body'],'headers':{'Date':moment(_0x570df5['createdAt'])[_0xbf19('0xdf')]('ddd,\x20DD\x20MMM\x20YYYY\x20HH:mm:ss\x20ZZ')},'attachments':[]};if(_0x570df5['cc']){_0x4eb2de[_0xbf19('0xf7')]['Cc']=_0x570df5['cc'];}if(_0x570df5[_0xbf19('0xf8')]){_0x4eb2de[_0xbf19('0xf7')][_0xbf19('0xf9')]=_0x570df5[_0xbf19('0xf8')];}return new BPromise(function(_0x513f0e,_0x4e9eb7){if(_0x570df5[_0xbf19('0xf1')]){for(var _0x21031c=0x0;_0x21031c<_0x570df5['Attachments'][_0xbf19('0x4c')];_0x21031c++){var _0x5a0863=_0x570df5[_0xbf19('0xf1')][_0x21031c];var _0x2c18c1=path[_0xbf19('0xeb')](_0x317e51,_0x5a0863[_0xbf19('0xfa')]);if(fs[_0xbf19('0xfb')](_0x2c18c1)){_0x4eb2de[_0xbf19('0xef')][_0xbf19('0x36')]({'name':_0x5a0863[_0xbf19('0x46')],'contentType':_0x5a0863[_0xbf19('0x43')],'data':fs[_0xbf19('0xfc')](_0x2c18c1)});}}}emlformat['build'](_0x4eb2de,function(_0x506487,_0x2f5279){if(_0x506487)return _0x4e9eb7(_0x506487);fs[_0xbf19('0xfd')](path[_0xbf19('0xeb')](_0x235ed7,util[_0xbf19('0xdf')](_0xbf19('0xfe'),_0x1ca689)),_0x2f5279);return _0x513f0e(_0x2f5279);});});})['then'](function(){return new BPromise(function(_0x1fbcad,_0x550040){zipdir(_0x235ed7,{'saveTo':_0x45853f},function(_0x29ef47,_0x2c6387){if(_0x29ef47)return _0x550040(_0x29ef47);return _0x1fbcad(_0x2c6387);});})[_0xbf19('0x2a')](function(){return new BPromise(function(_0x70c50f,_0x1e7e25){rimraf(_0x235ed7,function(_0x5503c0){if(_0x5503c0)_0x1e7e25(_0x5503c0);return _0x70c50f();});});})[_0xbf19('0x2a')](function(){return _0x39ac97[_0xbf19('0xe9')](_0x45853f,_0x56d9f2,function(_0x2bc1bb){if(_0x2bc1bb){console[_0xbf19('0xff')]('err',_0x2bc1bb);}else{fs['unlinkSync'](_0x45853f);}});});});}else{return _0x39ac97['sendStatus'](0xc8);}})[_0xbf19('0x3e')](handleError(_0x39ac97,null));}; \ No newline at end of file +var _0x727a=['path','to-csv','ejs','fs-extra','lodash','jsforce','desk.js','querystring','juice','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','defaults','redis','localhost','socket.io-emitter','./mailInteraction.socket','register','sendStatus','status','end','offset','undefined','limit','count','set','Content-Range','json','apply','reject','save','update','then','destroy','error','stack','name','send','Users','map','TagIds','split','forEach','Tags','findOne','out','plainBody','trimStart','catch','index','MailInteraction','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','select','field','color','from','tools_tags','u.fullname','ui.MailInteractionId','user_has_mail_interactions','left_join','users','u.id\x20=\x20ui.UserId','cm_contacts','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL','o.id\x20=\x20i.UserId','mail_accounts','a.id\x20=\x20i.MailAccountId','mail_messages','me.MailInteractionId\x20=\x20i.id','expr','search','parseSearch','sqlOperator','conditions','find','unreadMessages','having','`\x20=\x200','`\x20>\x200','operator','$substring','value','length','c.firstName\x20LIKE\x20?\x20OR\x20c.lastName\x20LIKE\x20?\x20OR\x20c.email\x20LIKE\x20?','ContactId','buildExpression','start','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','union','User','CONCAT_WS(\x27\x20\x27,\x20o.name,\x20o.fullname)\x20LIKE\x20?','UserId','text','some','compact','isEmpty','MailAccountId','i.MailAccountId\x20IN\x20?','concat','createdAt','parse','$gte','$lte','i.createdAt\x20BETWEEN\x20?\x20AND\x20?','null','read','`unreadMessages`\x20>\x200','tag','isArray','filter','replace','i.id\x20LIKE\x20?','isEmail','c.email\x20LIKE\x20?','MATCH\x20(i.to,\x20i.subject)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','getFullTextValue','MATCH\x20(me.plainBody,\x20me.subject)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','i.id','QueryTypes','SELECT','clone','SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)','contactName','DESC','t.id\x20IN\x20?','resolve','i.MailAccountId\x20IS\x20NOT\x20NULL','user','agent','getMailAccounts','sequelize','toString','keyBy','merge','a.key','Account.key','a.mandatoryDisposition','CASE\x20WHEN\x20i.to\x20IS\x20NOT\x20NULL\x20AND\x20i.to\x20<>\x20\x27\x27\x20AND\x20i.to\x20NOT\x20LIKE\x20(\x27%\x27\x20+\x20a.email\x20+\x20\x27%\x27)\x20THEN\x20SUBSTRING_INDEX(i.to,\x20\x27<\x27,\x201)\x20WHEN\x20(c.firstName\x20IS\x20NOT\x20NULL\x20AND\x20c.firstName\x20<>\x20\x27\x27)\x20OR\x20(c.lastName\x20IS\x20NOT\x20NULL\x20AND\x20c.lastName\x20<>\x20\x27\x27)\x20THEN\x20CONCAT(IFNULL(c.firstName,\x20\x27\x27),\x20\x27\x20\x27,\x20IFNULL(c.lastName,\x20\x27\x27))\x20ELSE\x20\x27Unknown\x27\x20END','i.createdAt','i.updatedAt','i.closed','i.closedAt','i.attach','i.lastMsgAt','i.lastMsgDirection','i.subject','i.secondDisposition','i.thirdDisposition','i.substatus','i.to','i.MailAccountId','i.UserId','c.firstName','Contact.firstName','Contact.lastName','c.email','Contact.email','c.phone','Contact.phone','c.mobile','Contact.mobile','c.fax','Owner.fullname','o.internal','Owner.internal','ui.MailInteractionId\x20IN\x20?','groupBy','MailInteractionId','Setting','enableEmailPreview','push','all','params','includeAll','include','options','create','body','describe','addMessage','MailMessage','ids','omit','getMessages','pick','format','YYYY-MM-DD\x20HH:mm:ss','findAll','inlineCss','true','addTags','setTags','spread','Tag','emit','mailInteractionTags:save','removeTags','download','join','tmp','root','server','files','attachments','transcript-%d-%s.zip','Attachments','Messages','bcc','subject','get','each','ddd,\x20DD\x20MMM\x20YYYY\x20HH:mm:ss\x20ZZ','headers','Bcc','basename','existsSync','readFileSync','build','writeFileSync','log','err','unlinkSync','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util'];(function(_0x1897fd,_0x355ba7){var _0x1787a5=function(_0x285d6c){while(--_0x285d6c){_0x1897fd['push'](_0x1897fd['shift']());}};_0x1787a5(++_0x355ba7);}(_0x727a,0x1f0));var _0xa727=function(_0x2be243,_0x237476){_0x2be243=_0x2be243-0x0;var _0x5ce50c=_0x727a[_0x2be243];return _0x5ce50c;};'use strict';var emlformat=require(_0xa727('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xa727('0x1'));var jsonpatch=require(_0xa727('0x2'));var rp=require(_0xa727('0x3'));var moment=require(_0xa727('0x4'));var BPromise=require(_0xa727('0x5'));var Mustache=require(_0xa727('0x6'));var util=require(_0xa727('0x7'));var path=require(_0xa727('0x8'));var sox=require('sox');var csv=require(_0xa727('0x9'));var ejs=require(_0xa727('0xa'));var fs=require('fs');var fs_extra=require(_0xa727('0xb'));var _=require(_0xa727('0xc'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xa727('0xd'));var deskjs=require(_0xa727('0xe'));var toCsv=require('to-csv');var querystring=require(_0xa727('0xf'));var Papa=require('papaparse');var htmlToText=require('html-to-text');var juice=require(_0xa727('0x10'));var Redis=require(_0xa727('0x11'));var authService=require(_0xa727('0x12'));var qs=require(_0xa727('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xa727('0x14'));var logger=require(_0xa727('0x15'))(_0xa727('0x16'));var utils=require(_0xa727('0x17'));var config=require('../../config/environment');var licenseUtil=require(_0xa727('0x18'));var db=require(_0xa727('0x19'))['db'];config['redis']=_[_0xa727('0x1a')](config[_0xa727('0x1b')],{'host':_0xa727('0x1c'),'port':0x18eb});var socket=require(_0xa727('0x1d'))(new Redis(config[_0xa727('0x1b')]));require(_0xa727('0x1e'))[_0xa727('0x1f')](socket);function respondWithStatusCode(_0x5032f2,_0x5349cd){_0x5349cd=_0x5349cd||0xcc;return function(_0x9488f7){if(_0x9488f7){return _0x5032f2[_0xa727('0x20')](_0x5349cd);}return _0x5032f2[_0xa727('0x21')](_0x5349cd)[_0xa727('0x22')]();};}function respondWithResult(_0x3ff9ed,_0x43e1cc){_0x43e1cc=_0x43e1cc||0xc8;return function(_0x40e97f){if(_0x40e97f){return _0x3ff9ed[_0xa727('0x21')](_0x43e1cc)['json'](_0x40e97f);}};}function respondWithFilteredResult(_0x5170fc,_0x390c12){return function(_0x337f9e){if(_0x337f9e){var _0x580823=typeof _0x390c12[_0xa727('0x23')]===_0xa727('0x24')&&typeof _0x390c12[_0xa727('0x25')]===_0xa727('0x24');var _0x212b11=_0x337f9e[_0xa727('0x26')];var _0x1894bc=_0x580823?0x0:_0x390c12[_0xa727('0x23')];var _0x24d8f8=_0x580823?_0x337f9e[_0xa727('0x26')]:_0x390c12['offset']+_0x390c12[_0xa727('0x25')];var _0x1f0ddf;if(_0x24d8f8>=_0x212b11){_0x24d8f8=_0x212b11;_0x1f0ddf=0xc8;}else{_0x1f0ddf=0xce;}_0x5170fc[_0xa727('0x21')](_0x1f0ddf);return _0x5170fc[_0xa727('0x27')](_0xa727('0x28'),_0x1894bc+'-'+_0x24d8f8+'/'+_0x212b11)[_0xa727('0x29')](_0x337f9e);}return null;};}function patchUpdates(_0x3bb1f8){return function(_0x43255c){try{jsonpatch[_0xa727('0x2a')](_0x43255c,_0x3bb1f8,!![]);}catch(_0x40a536){return BPromise[_0xa727('0x2b')](_0x40a536);}return _0x43255c[_0xa727('0x2c')]();};}function saveUpdates(_0x316796,_0x4466dd){return function(_0x2fbc6b){if(_0x2fbc6b){return _0x2fbc6b[_0xa727('0x2d')](_0x316796)[_0xa727('0x2e')](function(_0x1d6d22){return _0x1d6d22;});}return null;};}function removeEntity(_0x77a07,_0x124baf){return function(_0x18f1d9){if(_0x18f1d9){return _0x18f1d9[_0xa727('0x2f')]()[_0xa727('0x2e')](function(){_0x77a07[_0xa727('0x21')](0xcc)[_0xa727('0x22')]();});}};}function handleEntityNotFound(_0x45267d,_0x8285c6){return function(_0x7b6c01){if(!_0x7b6c01){_0x45267d[_0xa727('0x20')](0x194);}return _0x7b6c01;};}function handleError(_0x5a45da,_0x32deef){_0x32deef=_0x32deef||0x1f4;return function(_0x5663ef){logger[_0xa727('0x30')](_0x5663ef[_0xa727('0x31')]);if(_0x5663ef[_0xa727('0x32')]){delete _0x5663ef[_0xa727('0x32')];}_0x5a45da[_0xa727('0x21')](_0x32deef)[_0xa727('0x33')](_0x5663ef);};}function getInteractionUsers(_0x3b2df3,_0x14c087){return new BPromise(function(_0xe822c0,_0x3f01b2){try{if(_0x14c087[_0x3b2df3['id']]){_0x3b2df3[_0xa727('0x34')]=_[_0xa727('0x35')](_0x14c087[_0x3b2df3['id']],function(_0x543685){return{'id':_0x543685['id'],'fullname':_0x543685['fullname']};});}}catch(_0x202480){_0x3f01b2(_0x202480);}_0xe822c0(_0x3b2df3);});}function getInteractionTags(_0x36d482,_0x396a30){return new BPromise(function(_0x1076e3,_0x455340){try{if(_0x36d482[_0xa727('0x36')]){_0x36d482['Tags']=[];_0x36d482[_0xa727('0x36')][_0xa727('0x37')](',')[_0xa727('0x38')](function(_0x56cea6){_0x36d482[_0xa727('0x39')]['push'](_0x396a30[_0x56cea6]);});}delete _0x36d482['TagIds'];}catch(_0x34ad0b){_0x455340(_0x34ad0b);}_0x1076e3(_0x36d482);});}function getLastMessageText(_0x47b576){return new BPromise(function(_0x96c743,_0x2e12e7){return db['MailMessage'][_0xa727('0x3a')]({'where':{'$and':[{'MailInteractionId':_0x47b576['id']},{'$or':[{'direction':'in'},{'$and':[{'direction':_0xa727('0x3b')},{'secret':![]},{'UserId':{'$ne':null}}]}]}]},'attributes':[_0xa727('0x3c')],'order':'-id','raw':!![]})[_0xa727('0x2e')](function(_0x4a879f){if(_0x4a879f&&_0x4a879f['plainBody']){_0x47b576['lastMsgText']=_[_0xa727('0x3d')](_0x4a879f['plainBody']);}_0x96c743(_0x47b576);})[_0xa727('0x3e')](function(_0x4c43b2){_0x2e12e7(_0x4c43b2);});});}function updateMailInteraction(_0x45f550,_0x3fdef3,_0x15d20f,_0x52c9de){return new BPromise(function(_0x13ae61,_0x6809cb){return getInteractionUsers(_0x45f550,_0x15d20f)[_0xa727('0x2e')](function(_0x3387f3){return getInteractionTags(_0x3387f3,_0x3fdef3);})[_0xa727('0x2e')](function(_0xb80e79){if(_0x52c9de){_0x13ae61(getLastMessageText(_0xb80e79));}else{_0x13ae61(_0xb80e79);}})['catch'](function(_0x25f933){_0x6809cb(_0x25f933);});});}exports[_0xa727('0x3f')]=function(_0x48683c,_0x20271a){var _0x24ea94={},_0x384175={},_0x50ff55={'count':0x0,'rows':[]};var _0x316642=_[_0xa727('0x35')](db[_0xa727('0x40')][_0xa727('0x41')],function(_0x2f8184){return{'name':_0x2f8184[_0xa727('0x42')],'type':_0x2f8184[_0xa727('0x43')][_0xa727('0x44')]};});_0x384175[_0xa727('0x45')]=_[_0xa727('0x35')](_0x316642,'name');_0x384175[_0xa727('0x46')]=_[_0xa727('0x47')](_0x48683c[_0xa727('0x46')]);_0x384175[_0xa727('0x48')]=_[_0xa727('0x49')](_0x384175['model'],_0x384175[_0xa727('0x46')]);_0x24ea94[_0xa727('0x4a')]=_[_0xa727('0x49')](_0x384175[_0xa727('0x45')],qs['fields'](_0x48683c['query'][_0xa727('0x4b')]));_0x24ea94[_0xa727('0x4a')]=_0x24ea94[_0xa727('0x4a')]['length']?_0x24ea94[_0xa727('0x4a')]:_0x384175[_0xa727('0x45')];if(!_0x48683c[_0xa727('0x46')][_0xa727('0x4c')](_0xa727('0x4d'))){_0x24ea94[_0xa727('0x25')]=qs[_0xa727('0x25')](_0x48683c['query']['limit']);_0x24ea94['offset']=qs['offset'](_0x48683c['query'][_0xa727('0x23')]);}_0x24ea94[_0xa727('0x4e')]=qs[_0xa727('0x4f')](_0x48683c[_0xa727('0x46')]['sort']);_0x24ea94[_0xa727('0x50')]=qs[_0xa727('0x48')](_['pick'](_0x48683c[_0xa727('0x46')],_0x384175['filters']),_0x316642);var _0x5c7f4b=[];var _0x4c0a40=squel[_0xa727('0x51')]()[_0xa727('0x52')]('id')['field'](_0xa727('0x32'))['field'](_0xa727('0x53'))[_0xa727('0x54')](_0xa727('0x55'));var _0x55066f=squel[_0xa727('0x51')]()[_0xa727('0x52')]('u.id')['field'](_0xa727('0x56'))['field'](_0xa727('0x57'))['from'](_0xa727('0x58'),'ui')[_0xa727('0x59')](_0xa727('0x5a'),'u',_0xa727('0x5b'));var _0x198faf=squel[_0xa727('0x51')]()[_0xa727('0x54')]('mail_interactions','i')['left_join'](_0xa727('0x5c'),'c',_0xa727('0x5d'))['left_join']('users','o',_0xa727('0x5e'))[_0xa727('0x59')](_0xa727('0x5f'),'a',_0xa727('0x60'))[_0xa727('0x59')](_0xa727('0x61'),'me',_0xa727('0x62'))[_0xa727('0x59')]('mail_interaction_has_tags','it','it.MailInteractionId\x20=\x20i.id')[_0xa727('0x59')](_0xa727('0x55'),'t','t.id\x20=\x20it.TagId');var _0x3b0948=squel[_0xa727('0x63')]();var _0x11e71a=[];var _0x5a3a9e=squel[_0xa727('0x63')]();var _0x82c12f;if(_0x48683c[_0xa727('0x46')][_0xa727('0x64')]){_0x82c12f=as[_0xa727('0x65')](_0x48683c[_0xa727('0x46')]['search']);var _0x13bf4e=_0x82c12f[_0xa727('0x66')];for(var _0x3df1ef=0x0;_0x3df1ef<_0x82c12f['conditions']['length'];_0x3df1ef++){var _0x1a2bc6=_0x82c12f[_0xa727('0x67')][_0x3df1ef];var _0x1a8f34='i';var _0x572582=_[_0xa727('0x68')](_0x316642,[_0xa727('0x32'),_0x1a2bc6[_0xa727('0x52')]]);if(!_0x572582){switch(_0x1a2bc6[_0xa727('0x52')]){case _0xa727('0x69'):if(_0x1a2bc6['value']==0x1){_0x198faf[_0xa727('0x6a')]('`'+_0x1a2bc6[_0xa727('0x52')]+_0xa727('0x6b'));}else{_0x198faf[_0xa727('0x6a')]('`'+_0x1a2bc6['field']+_0xa727('0x6c'));}break;case'Contact':if(_0x1a2bc6[_0xa727('0x6d')]===_0xa727('0x6e')){if(_0x1a2bc6[_0xa727('0x6f')][_0xa727('0x37')]('\x20')[_0xa727('0x70')]>0x1){_0x3b0948[_0x13bf4e]('MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)',qs['getFullTextValue'](_0x1a2bc6['value']),null);}else{var _0x723ec7='%'+_0x1a2bc6[_0xa727('0x6f')]+'%';_0x3b0948[_0x13bf4e](_0xa727('0x71'),_0x723ec7,_0x723ec7,_0x723ec7);}}else{_0x572582=_['find'](_0x316642,[_0xa727('0x32'),_0xa727('0x72')]);_0x1a2bc6[_0xa727('0x52')]=_0xa727('0x72');_0x4d4b19=as[_0xa727('0x73')](_0x1a8f34,_0x572582[_0xa727('0x43')],_0x1a2bc6);_0x3b0948[_0x13bf4e](_0x4d4b19['text'],_0x4d4b19[_0xa727('0x6f')][_0xa727('0x74')],_0x4d4b19[_0xa727('0x6f')][_0xa727('0x22')]);}break;case'Tag':var _0x3d584d=_0x1a2bc6[_0xa727('0x6f')]['split'](',')[_0xa727('0x35')](function(_0x1e19a8){return Number(_0x1e19a8);});_0x3d584d[_0xa727('0x38')](function(_0x4fb20a){_0x5a3a9e['or'](_0xa727('0x75'),'%,'+_0x4fb20a+',%');});_0x11e71a=_[_0xa727('0x76')](_0x11e71a,_0x3d584d);break;case _0xa727('0x77'):if(_0x1a2bc6[_0xa727('0x6d')]===_0xa727('0x6e')){_0x3b0948[_0x13bf4e](_0xa727('0x78'),'%'+_0x1a2bc6[_0xa727('0x6f')]+'%',null);}else{_0x572582=_[_0xa727('0x68')](_0x316642,[_0xa727('0x32'),_0xa727('0x79')]);_0x1a2bc6[_0xa727('0x52')]=_0xa727('0x79');_0x4d4b19=as[_0xa727('0x73')](_0x1a8f34,_0x572582[_0xa727('0x43')],_0x1a2bc6);_0x3b0948[_0x13bf4e](_0x4d4b19[_0xa727('0x7a')],_0x4d4b19[_0xa727('0x6f')]['start'],_0x4d4b19[_0xa727('0x6f')][_0xa727('0x22')]);}break;case _0xa727('0x3c'):_0x4d4b19=as['buildExpression']('me',null,_0x1a2bc6);_0x3b0948[_0x13bf4e](_0x4d4b19['text'],_0x4d4b19[_0xa727('0x6f')][_0xa727('0x74')],_0x4d4b19[_0xa727('0x6f')][_0xa727('0x22')]);break;}}else{var _0x4d4b19=as[_0xa727('0x73')](_0x1a8f34,_0x572582[_0xa727('0x43')],_0x1a2bc6);_0x3b0948[_0x13bf4e](_0x4d4b19[_0xa727('0x7a')],_0x4d4b19[_0xa727('0x6f')][_0xa727('0x74')],_0x4d4b19[_0xa727('0x6f')]['end']);}}}else{var _0x1ce2ce=_(_0x48683c[_0xa727('0x46')])['keys']()[_0xa727('0x35')](function(_0x473152){return _[_0xa727('0x7b')](_0x316642,['name',_0x473152])?_0x473152:undefined;})[_0xa727('0x7c')]()[_0xa727('0x6f')]();if(!_[_0xa727('0x7d')](_0x1ce2ce)){_0x1ce2ce[_0xa727('0x38')](function(_0x337cd0){if(_0x337cd0===_0xa727('0x7e')){_0x198faf[_0xa727('0x50')](_0xa727('0x7f'),[][_0xa727('0x80')](_0x48683c['query'][_0x337cd0]));}else if(_0x337cd0===_0xa727('0x81')){var _0x1a2b3f=JSON[_0xa727('0x82')](_0x48683c['query'][_0x337cd0])[_0xa727('0x83')];var _0x59fd1a=JSON[_0xa727('0x82')](_0x48683c['query'][_0x337cd0])[_0xa727('0x84')];_0x198faf[_0xa727('0x50')](_0xa727('0x85'),_0x1a2b3f,_0x59fd1a);}else{if(_0x48683c[_0xa727('0x46')][_0x337cd0]===_0xa727('0x86')){_0x198faf[_0xa727('0x50')]('i.'+_0x337cd0+'\x20IS\x20NULL');}else{_0x198faf[_0xa727('0x50')]('i.'+_0x337cd0+'\x20=\x20?',_0x48683c['query'][_0x337cd0]);}}});}if(_0x48683c[_0xa727('0x46')][_0xa727('0x87')]){if(_0x48683c[_0xa727('0x46')]['read']==0x1){_0x198faf[_0xa727('0x6a')]('`unreadMessages`\x20=\x200');}else{_0x198faf[_0xa727('0x6a')](_0xa727('0x88'));}}if(_0x48683c[_0xa727('0x46')][_0xa727('0x89')]){_0x11e71a=_[_0xa727('0x8a')](_0x48683c[_0xa727('0x46')]['tag'])?_0x48683c[_0xa727('0x46')]['tag']:new Array(_0x48683c['query'][_0xa727('0x89')]);_0x11e71a['forEach'](function(_0x26696d){_0x5a3a9e['or']('CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','%,'+_0x26696d+',%');});}if(_0x48683c[_0xa727('0x46')]['filter']){var _0x5c49bd=_0x48683c[_0xa727('0x46')][_0xa727('0x8b')][_0xa727('0x8c')]('\x5c','\x5c\x5c')[_0xa727('0x8c')](/'/g,'\x27\x27');if(qs['isNumeric'](_0x5c49bd)){_0x3b0948['or'](_0xa727('0x8d'),_0x5c49bd+'%');}else if(qs[_0xa727('0x8e')](_0x5c49bd)){_0x3b0948['or'](_0xa727('0x8f'),_0x5c49bd+'%');}else{_0x3b0948['or'](_0xa727('0x90'),qs[_0xa727('0x91')](_0x5c49bd))['or'](_0xa727('0x92'),qs[_0xa727('0x91')](_0x5c49bd));}}}_0x198faf[_0xa727('0x50')](_0x3b0948);_0x198faf['group'](_0xa727('0x93'));var _0x17a669={'type':db['Sequelize'][_0xa727('0x94')][_0xa727('0x95')],'raw':!![]};var _0x280f30=_0x198faf[_0xa727('0x96')]();_0x280f30[_0xa727('0x52')](_0xa727('0x93'));_0x280f30['field'](_0xa727('0x97'),_0xa727('0x69'));if(_0x24ea94['order']){_0x24ea94[_0xa727('0x4e')][_0xa727('0x38')](function(_0x3df16d){var _0x58e166=_0x3df16d[0x0]===_0xa727('0x98')?_0x3df16d[0x0]:'i.'+_0x3df16d[0x0];_0x198faf[_0xa727('0x4e')](_0x58e166,_0x3df16d[0x1]===_0xa727('0x99')?![]:!![]);});}if(!_[_0xa727('0x7d')](_0x11e71a)){_0x198faf['having'](_0x5a3a9e);_0x280f30[_0xa727('0x50')](_0xa727('0x9a'),_0x11e71a);}BPromise[_0xa727('0x9b')]()[_0xa727('0x2e')](function(){if(!_0x82c12f){if(_0x48683c[_0xa727('0x46')][_0xa727('0x7e')])return;_0x280f30[_0xa727('0x50')](_0xa727('0x9c'));_0x198faf[_0xa727('0x50')](_0xa727('0x9c'));return;}if(_0x48683c[_0xa727('0x9d')]['role']!==_0xa727('0x9e'))return;return _0x48683c['user'][_0xa727('0x9f')]({'attributes':['id'],'raw':!![]})[_0xa727('0x2e')](function(_0x2eea6d){if(_['isEmpty'](_0x2eea6d)){_0x280f30['where']('i.MailAccountId\x20IS\x20NULL');_0x198faf[_0xa727('0x50')]('i.MailAccountId\x20IS\x20NULL');}else{_0x280f30[_0xa727('0x50')](_0xa727('0x7f'),_[_0xa727('0x35')](_0x2eea6d,'id'));_0x198faf[_0xa727('0x50')](_0xa727('0x7f'),_[_0xa727('0x35')](_0x2eea6d,'id'));}});})[_0xa727('0x2e')](function(){if(_0x48683c[_0xa727('0x9d')]['role']===_0xa727('0x9e')&&!_0x82c12f&&!_0x48683c[_0xa727('0x46')][_0xa727('0x7e')])return[];return db[_0xa727('0xa0')][_0xa727('0x46')](_0x280f30[_0xa727('0xa1')](),_0x17a669);})[_0xa727('0x2e')](function(_0x3e6785){_0x50ff55[_0xa727('0x26')]=_0x3e6785[_0xa727('0x70')];if(_0x50ff55['count']===0x0)return[];return db['sequelize']['query'](_0x4c0a40[_0xa727('0xa1')](),_0x17a669)[_0xa727('0x2e')](function(_0xcddc82){_0x5c7f4b=_[_0xa727('0xa2')](_0xcddc82,'id');_0x17a669=_[_0xa727('0xa3')](_0x17a669,{'model':db['MailInteraction'],'mapToModel':!![],'raw':!![],'nest':!![]});if(_0x48683c[_0xa727('0x46')]['fields']){_0x24ea94[_0xa727('0x4a')][_0xa727('0x38')](function(_0x568ce3){_0x198faf['field']('i.'+_0x568ce3);});}else{_0x198faf[_0xa727('0x52')](_0xa727('0x97'),'unreadMessages');_0x198faf[_0xa727('0x52')](_0xa727('0xa4'),_0xa727('0xa5'));_0x198faf[_0xa727('0x52')](_0xa727('0xa6'),'Account.mandatoryDisposition');_0x198faf['field'](_0xa727('0xa7'),_0xa727('0x98'));_0x198faf[_0xa727('0x52')](_0xa727('0x93'));_0x198faf['field'](_0xa727('0xa8'));_0x198faf[_0xa727('0x52')](_0xa727('0xa9'));_0x198faf[_0xa727('0x52')](_0xa727('0xaa'));_0x198faf[_0xa727('0x52')](_0xa727('0xab'));_0x198faf['field'](_0xa727('0xac'));_0x198faf[_0xa727('0x52')](_0xa727('0xad'));_0x198faf[_0xa727('0x52')](_0xa727('0xae'));_0x198faf[_0xa727('0x52')](_0xa727('0xaf'));_0x198faf[_0xa727('0x52')]('i.disposition');_0x198faf[_0xa727('0x52')](_0xa727('0xb0'));_0x198faf[_0xa727('0x52')](_0xa727('0xb1'));_0x198faf[_0xa727('0x52')](_0xa727('0xb2'));_0x198faf[_0xa727('0x52')](_0xa727('0xb3'));_0x198faf[_0xa727('0x52')]('i.ContactId');_0x198faf[_0xa727('0x52')](_0xa727('0xb4'));_0x198faf['field'](_0xa727('0xb5'));_0x198faf[_0xa727('0x52')](_0xa727('0xb6'),_0xa727('0xb7'));_0x198faf[_0xa727('0x52')]('c.lastName',_0xa727('0xb8'));_0x198faf[_0xa727('0x52')](_0xa727('0xb9'),_0xa727('0xba'));_0x198faf[_0xa727('0x52')](_0xa727('0xbb'),_0xa727('0xbc'));_0x198faf['field'](_0xa727('0xbd'),_0xa727('0xbe'));_0x198faf[_0xa727('0x52')](_0xa727('0xbf'),'Contact.fax');_0x198faf[_0xa727('0x52')]('o.fullname',_0xa727('0xc0'));_0x198faf[_0xa727('0x52')](_0xa727('0xc1'),_0xa727('0xc2'));_0x198faf[_0xa727('0x52')]('GROUP_CONCAT(DISTINCT\x20t.id)',_0xa727('0x36'));}if(_0x24ea94[_0xa727('0x25')])_0x198faf[_0xa727('0x25')](_0x24ea94[_0xa727('0x25')]);if(_0x24ea94['offset'])_0x198faf[_0xa727('0x23')](_0x24ea94['offset']);return db[_0xa727('0xa0')][_0xa727('0x46')](_0x198faf[_0xa727('0xa1')](),_0x17a669);})[_0xa727('0x2e')](function(_0x2418e0){if(_0x2418e0[_0xa727('0x70')]>0x0)_0x55066f[_0xa727('0x50')](_0xa727('0xc3'),_[_0xa727('0x35')](_0x2418e0,'id'));return db['sequelize'][_0xa727('0x46')](_0x55066f[_0xa727('0xa1')](),_0x17a669)[_0xa727('0x2e')](function(_0x44af61){var _0x398f97=_[_0xa727('0xc4')](_0x44af61,_0xa727('0xc5'));var _0x4456a8=[];return db[_0xa727('0xc6')][_0xa727('0x3a')]({'attributes':[_0xa727('0xc7')],'raw':!![]})['then'](function(_0x52ce30){var _0x133bba=_0x52ce30[_0xa727('0xc7')];_0x2418e0[_0xa727('0x38')](function(_0x25c138){_0x4456a8[_0xa727('0xc8')](updateMailInteraction(_0x25c138,_0x5c7f4b,_0x398f97,_0x133bba));});return BPromise[_0xa727('0xc9')](_0x4456a8);});});});})['then'](function(_0x446dac){_0x50ff55['rows']=_0x446dac;return _0x50ff55;})['then'](respondWithFilteredResult(_0x20271a,_0x24ea94))[_0xa727('0x3e')](handleError(_0x20271a,null));};exports['show']=function(_0x29260c,_0x2531d9){var _0x59d5aa={'raw':![],'where':{'id':_0x29260c[_0xa727('0xca')]['id']}},_0x416feb={};_0x416feb['model']=_['keys'](db[_0xa727('0x40')][_0xa727('0x41')]);_0x416feb['query']=_[_0xa727('0x47')](_0x29260c[_0xa727('0x46')]);_0x416feb[_0xa727('0x48')]=_[_0xa727('0x49')](_0x416feb[_0xa727('0x45')],_0x416feb[_0xa727('0x46')]);_0x59d5aa[_0xa727('0x4a')]=_['intersection'](_0x416feb[_0xa727('0x45')],qs['fields'](_0x29260c['query'][_0xa727('0x4b')]));_0x59d5aa[_0xa727('0x4a')]=_0x59d5aa[_0xa727('0x4a')][_0xa727('0x70')]?_0x59d5aa[_0xa727('0x4a')]:_0x416feb[_0xa727('0x45')];if(_0x29260c[_0xa727('0x46')][_0xa727('0xcb')]){_0x59d5aa[_0xa727('0xcc')]=[{'all':!![]}];}_0x59d5aa=_[_0xa727('0xa3')]({},_0x59d5aa,_0x29260c[_0xa727('0xcd')]);return db[_0xa727('0x40')][_0xa727('0x68')](_0x59d5aa)['then'](handleEntityNotFound(_0x2531d9,null))['then'](respondWithResult(_0x2531d9,null))['catch'](handleError(_0x2531d9,null));};exports[_0xa727('0xce')]=function(_0x577215,_0x37caa7){return db[_0xa727('0x40')][_0xa727('0xce')](_0x577215['body'],{})['then'](respondWithResult(_0x37caa7,0xc9))['catch'](handleError(_0x37caa7,null));};exports[_0xa727('0x2d')]=function(_0x26dc16,_0x30c55b){if(_0x26dc16[_0xa727('0xcf')]['id']){delete _0x26dc16[_0xa727('0xcf')]['id'];}return db[_0xa727('0x40')][_0xa727('0x68')]({'where':{'id':_0x26dc16[_0xa727('0xca')]['id']}})[_0xa727('0x2e')](handleEntityNotFound(_0x30c55b,null))[_0xa727('0x2e')](saveUpdates(_0x26dc16[_0xa727('0xcf')],null))[_0xa727('0x2e')](respondWithResult(_0x30c55b,null))['catch'](handleError(_0x30c55b,null));};exports[_0xa727('0x2f')]=function(_0x228122,_0x19a350){return db[_0xa727('0x40')]['find']({'where':{'id':_0x228122[_0xa727('0xca')]['id']}})[_0xa727('0x2e')](handleEntityNotFound(_0x19a350,null))[_0xa727('0x2e')](removeEntity(_0x19a350,null))[_0xa727('0x3e')](handleError(_0x19a350,null));};exports[_0xa727('0xd0')]=function(_0x42f019,_0x576285){return db['MailInteraction'][_0xa727('0xd0')]()[_0xa727('0x2e')](respondWithResult(_0x576285,null))[_0xa727('0x3e')](handleError(_0x576285,null));};exports[_0xa727('0xd1')]=function(_0x3b8e24,_0x542b51,_0xae355c){return db[_0xa727('0xd2')][_0xa727('0x68')]({'where':{'id':_0x3b8e24[_0xa727('0xca')]['id']}})['then'](handleEntityNotFound(_0x542b51,null))[_0xa727('0x2e')](function(_0x230c8a){if(_0x230c8a){return _0x230c8a[_0xa727('0xd1')](_0x3b8e24[_0xa727('0xcf')][_0xa727('0xd3')],_[_0xa727('0xd4')](_0x3b8e24[_0xa727('0xcf')],[_0xa727('0xd3'),'id'])||{});}})[_0xa727('0x2e')](respondWithResult(_0x542b51,null))[_0xa727('0x3e')](handleError(_0x542b51,null));};exports[_0xa727('0xd5')]=function(_0x207020,_0xd57c11,_0x45766f){var _0x4de314={'raw':![],'where':{}};var _0x1bfe71={};var _0x43e2d3={'count':0x0,'rows':[]};return db['MailInteraction'][_0xa727('0x3a')]({'where':{'id':_0x207020[_0xa727('0xca')]['id']}})[_0xa727('0x2e')](handleEntityNotFound(_0xd57c11,null))[_0xa727('0x2e')](function(_0xf83c1a){if(_0xf83c1a){_0x1bfe71['model']=_['keys'](db[_0xa727('0xd2')]['rawAttributes']);_0x1bfe71[_0xa727('0x46')]=_[_0xa727('0x47')](_0x207020['query']);_0x1bfe71[_0xa727('0x48')]=_[_0xa727('0x49')](_0x1bfe71[_0xa727('0x45')],_0x1bfe71[_0xa727('0x46')]);_0x4de314[_0xa727('0x4a')]=_[_0xa727('0x49')](_0x1bfe71[_0xa727('0x45')],qs[_0xa727('0x4b')](_0x207020[_0xa727('0x46')][_0xa727('0x4b')]));_0x4de314[_0xa727('0x4a')]=_0x4de314[_0xa727('0x4a')][_0xa727('0x70')]?_0x4de314[_0xa727('0x4a')]:_0x1bfe71[_0xa727('0x45')];if(!_0x207020[_0xa727('0x46')][_0xa727('0x4c')](_0xa727('0x4d'))){_0x4de314['limit']=qs[_0xa727('0x25')](_0x207020[_0xa727('0x46')][_0xa727('0x25')]);_0x4de314['offset']=qs[_0xa727('0x23')](_0x207020['query'][_0xa727('0x23')]);}_0x4de314[_0xa727('0x4e')]=qs[_0xa727('0x4f')](_0x207020[_0xa727('0x46')][_0xa727('0x4f')]);_0x4de314[_0xa727('0x50')]=qs[_0xa727('0x48')](_[_0xa727('0xd6')](_0x207020[_0xa727('0x46')],_0x1bfe71[_0xa727('0x48')]));_0x4de314[_0xa727('0x50')][_0xa727('0xc5')]=_0xf83c1a['id'];if(_0x207020[_0xa727('0x46')][_0xa727('0x8b')]){_0x4de314[_0xa727('0x50')]=_[_0xa727('0xa3')](_0x4de314[_0xa727('0x50')],{'$or':_[_0xa727('0x35')](_0x4de314[_0xa727('0x4a')],function(_0x338568){var _0x4dbda1={};_0x4dbda1[_0x338568]={'$like':'%'+_0x207020[_0xa727('0x46')][_0xa727('0x8b')]+'%'};return _0x4dbda1;})});}if(_0x207020[_0xa727('0x46')][_0xa727('0x83')]){var _0xcbe676=_0x207020[_0xa727('0x46')][_0xa727('0x83')][_0xa727('0x37')](',');var _0x51f9a8={};_0x51f9a8[_0xcbe676[0x0]]={'$gte':moment(_0xcbe676[0x1])[_0xa727('0xd7')](_0xa727('0xd8'))};_0x4de314['where']=_[_0xa727('0xa3')](_0x4de314[_0xa727('0x50')],_0x51f9a8);}_0x4de314=_[_0xa727('0xa3')]({},_0x4de314,_0x207020[_0xa727('0xcd')]);return db[_0xa727('0xd2')][_0xa727('0x26')]({'where':_0x4de314['where']})[_0xa727('0x2e')](function(_0x184a27){_0x43e2d3[_0xa727('0x26')]=_0x184a27;if(_0x207020['query'][_0xa727('0xcb')]){_0x4de314['include']=[{'all':!![]}];}return db[_0xa727('0xd2')][_0xa727('0xd9')](_0x4de314);})['then'](function(_0x36bd95){if(_0x207020[_0xa727('0x46')][_0xa727('0xda')]===_0xa727('0xdb')){for(var _0x4f7df3=0x0;_0x4f7df3<_0x36bd95['length'];_0x4f7df3++){_0x36bd95[_0x4f7df3][_0xa727('0xcf')]=juice(_0x36bd95[_0x4f7df3][_0xa727('0xcf')]);}}_0x43e2d3['rows']=_0x36bd95;return _0x43e2d3;});}})['then'](respondWithFilteredResult(_0xd57c11,_0x4de314))[_0xa727('0x3e')](handleError(_0xd57c11,null));};exports[_0xa727('0xdc')]=function(_0x140760,_0x639370,_0x4b1849){return db[_0xa727('0x40')]['find']({'where':{'id':_0x140760['params']['id']}})[_0xa727('0x2e')](handleEntityNotFound(_0x639370,null))[_0xa727('0x2e')](function(_0x1d85c6){if(_0x1d85c6){return _0x1d85c6[_0xa727('0xdd')](_0x140760['body'][_0xa727('0xd3')],_['omit'](_0x140760[_0xa727('0xcf')],[_0xa727('0xd3'),'id'])||{})[_0xa727('0xde')](function(){return db[_0xa727('0xdf')][_0xa727('0xd9')]({'attributes':['id','name',_0xa727('0x53')],'where':{'id':_0x140760[_0xa727('0xcf')]['ids']}});})[_0xa727('0x2e')](function(_0x2cb583){socket[_0xa727('0xe0')](_0xa727('0xe1'),{'id':Number(_0x140760['params']['id']),'tags':_0x2cb583||[]});return{'id':Number(_0x140760[_0xa727('0xca')]['id']),'tags':_0x2cb583||[]};});}})[_0xa727('0x2e')](respondWithResult(_0x639370,null))['catch'](handleError(_0x639370,null));};exports[_0xa727('0xe2')]=function(_0x59acf4,_0x3c48b6,_0x5bc3e4){return db[_0xa727('0x40')]['find']({'where':{'id':_0x59acf4['params']['id']}})[_0xa727('0x2e')](handleEntityNotFound(_0x3c48b6,null))['then'](function(_0x38b894){if(_0x38b894){return _0x38b894[_0xa727('0xe2')](_0x59acf4[_0xa727('0x46')][_0xa727('0xd3')]);}})[_0xa727('0x2e')](respondWithStatusCode(_0x3c48b6,null))[_0xa727('0x3e')](handleError(_0x3c48b6,null));};exports[_0xa727('0xe3')]=function(_0x149745,_0x1ea367){var _0x65524a=moment()['unix']()[_0xa727('0xa1')]();var _0x4ca3e3=path[_0xa727('0xe4')](config['root'],'server','files',_0xa727('0xe5'));var _0x53e675=path[_0xa727('0xe4')](config[_0xa727('0xe6')],_0xa727('0xe7'),_0xa727('0xe8'),_0xa727('0xe9'));var _0x54cfa3=path[_0xa727('0xe4')](_0x4ca3e3,_0x65524a);var _0x2f2b2f=util[_0xa727('0xd7')](_0xa727('0xea'),_0x149745[_0xa727('0xca')]['id'],_0x65524a);var _0x18f752=path[_0xa727('0xe4')](_0x4ca3e3,_0x2f2b2f);var _0x2f154b=[];if(_0x149745[_0xa727('0x46')][_0xa727('0xe9')]){_0x2f154b['push']({'model':db['Attachment'],'as':_0xa727('0xeb'),'raw':!![]});}var _0x1f5952=[{'model':db[_0xa727('0xd2')],'as':_0xa727('0xec'),'attributes':['id','body',_0xa727('0x54'),'to','cc',_0xa727('0xed'),_0xa727('0xee'),_0xa727('0x81')],'where':{'secret':![]},'order':qs[_0xa727('0x4f')]('id'),'include':_0x2f154b}];return db[_0xa727('0x40')][_0xa727('0x68')]({'where':{'id':_0x149745['params']['id']},'include':_0x1f5952})[_0xa727('0x2e')](handleEntityNotFound(_0x1ea367,null))[_0xa727('0x2e')](function(_0x3959ff){if(_0x3959ff&&_0x3959ff['Messages']){var _0x2efc68=_0x3959ff[_0xa727('0xef')]({'plain':!![]});fs['mkdirSync'](_0x54cfa3);return BPromise[_0xa727('0xf0')](_0x2efc68[_0xa727('0xec')],function(_0x3c6cbd,_0xd4b220){var _0x50db7f={'from':_0x3c6cbd[_0xa727('0x54')],'to':_0x3c6cbd['to'],'subject':_0x3c6cbd[_0xa727('0xee')],'html':_0x3c6cbd[_0xa727('0xcf')],'headers':{'Date':moment(_0x3c6cbd[_0xa727('0x81')])[_0xa727('0xd7')](_0xa727('0xf1'))},'attachments':[]};if(_0x3c6cbd['cc']){_0x50db7f[_0xa727('0xf2')]['Cc']=_0x3c6cbd['cc'];}if(_0x3c6cbd[_0xa727('0xed')]){_0x50db7f[_0xa727('0xf2')][_0xa727('0xf3')]=_0x3c6cbd[_0xa727('0xed')];}return new BPromise(function(_0x440ba3,_0x2a8f5b){if(_0x3c6cbd[_0xa727('0xeb')]){for(var _0x3afcdd=0x0;_0x3afcdd<_0x3c6cbd[_0xa727('0xeb')]['length'];_0x3afcdd++){var _0x4b53c0=_0x3c6cbd[_0xa727('0xeb')][_0x3afcdd];var _0xb10986=path['join'](_0x53e675,_0x4b53c0[_0xa727('0xf4')]);if(fs[_0xa727('0xf5')](_0xb10986)){_0x50db7f[_0xa727('0xe9')][_0xa727('0xc8')]({'name':_0x4b53c0[_0xa727('0x32')],'contentType':_0x4b53c0[_0xa727('0x43')],'data':fs[_0xa727('0xf6')](_0xb10986)});}}}emlformat[_0xa727('0xf7')](_0x50db7f,function(_0x458d72,_0x1a1e9a){if(_0x458d72)return _0x2a8f5b(_0x458d72);fs[_0xa727('0xf8')](path['join'](_0x54cfa3,util[_0xa727('0xd7')]('message%d.eml',_0xd4b220)),_0x1a1e9a);return _0x440ba3(_0x1a1e9a);});});})[_0xa727('0x2e')](function(){return new BPromise(function(_0x19908f,_0x1e5afd){zipdir(_0x54cfa3,{'saveTo':_0x18f752},function(_0x1fef80,_0x4dec24){if(_0x1fef80)return _0x1e5afd(_0x1fef80);return _0x19908f(_0x4dec24);});})['then'](function(){return new BPromise(function(_0x54503f,_0x4fefee){rimraf(_0x54cfa3,function(_0x207b9f){if(_0x207b9f)_0x4fefee(_0x207b9f);return _0x54503f();});});})['then'](function(){return _0x1ea367[_0xa727('0xe3')](_0x18f752,_0x2f2b2f,function(_0xe30a2){if(_0xe30a2){console[_0xa727('0xf9')](_0xa727('0xfa'),_0xe30a2);}else{fs[_0xa727('0xfb')](_0x18f752);}});});});}else{return _0x1ea367[_0xa727('0x20')](0xc8);}})[_0xa727('0x3e')](handleError(_0x1ea367,null));}; \ No newline at end of file diff --git a/server/api/mailInteraction/mailInteraction.events.js b/server/api/mailInteraction/mailInteraction.events.js index fd7c7bf..1e47569 100644 --- a/server/api/mailInteraction/mailInteraction.events.js +++ b/server/api/mailInteraction/mailInteraction.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1b00=['Users','findAll','setDataValue','length','emit','catch','hasOwnProperty','hook','exports','events','../../mysqldb','MailInteraction','MailMessage','setMaxListeners','remove','getUsers','then'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x1b00,0x80));var _0x01b0=function(_0x2931ca,_0x614236){_0x2931ca=_0x2931ca-0x0;var _0x270b89=_0x1b00[_0x2931ca];return _0x270b89;};'use strict';var EventEmitter=require(_0x01b0('0x0'));var MailInteraction=require(_0x01b0('0x1'))['db'][_0x01b0('0x2')];var MailMessage=require(_0x01b0('0x1'))['db'][_0x01b0('0x3')];var MailInteractionEvents=new EventEmitter();MailInteractionEvents[_0x01b0('0x4')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0x01b0('0x5')};function emitEvent(_0x4ac1a4){return function(_0x5bed4f,_0x33c54b,_0x33829e){_0x5bed4f[_0x01b0('0x6')]({'attributes':['id'],'raw':!![]})[_0x01b0('0x7')](function(_0x430ef2){_0x5bed4f['setDataValue'](_0x01b0('0x8'),_0x430ef2['map'](function(_0x36baa1){return{'id':_0x36baa1['id']};}));return MailMessage[_0x01b0('0x9')]({'where':{'MailInteractionId':_0x5bed4f['id'],'direction':'in','read':![]},'raw':!![]});})[_0x01b0('0x7')](function(_0x206d54){_0x5bed4f[_0x01b0('0xa')]('unreadMessages',_0x206d54[_0x01b0('0xb')]);MailInteractionEvents[_0x01b0('0xc')](_0x4ac1a4+':'+_0x5bed4f['id'],_0x5bed4f);MailInteractionEvents[_0x01b0('0xc')](_0x4ac1a4,_0x5bed4f);_0x33829e(null);})[_0x01b0('0xd')](_0x33829e(null));};}for(var e in events){if(events[_0x01b0('0xe')](e)){var event=events[e];MailInteraction[_0x01b0('0xf')](e,emitEvent(event));}}module[_0x01b0('0x10')]=MailInteractionEvents; \ No newline at end of file +var _0x1da8=['MailInteraction','MailMessage','setMaxListeners','save','remove','getUsers','then','setDataValue','findAll','length','emit','catch','hasOwnProperty','hook','exports','../../mysqldb'];(function(_0x49a442,_0x2fafd7){var _0x1a9a64=function(_0x32d5c1){while(--_0x32d5c1){_0x49a442['push'](_0x49a442['shift']());}};_0x1a9a64(++_0x2fafd7);}(_0x1da8,0x18f));var _0x81da=function(_0x24eef1,_0x210951){_0x24eef1=_0x24eef1-0x0;var _0x42569f=_0x1da8[_0x24eef1];return _0x42569f;};'use strict';var EventEmitter=require('events');var MailInteraction=require(_0x81da('0x0'))['db'][_0x81da('0x1')];var MailMessage=require('../../mysqldb')['db'][_0x81da('0x2')];var MailInteractionEvents=new EventEmitter();MailInteractionEvents[_0x81da('0x3')](0x0);var events={'afterCreate':_0x81da('0x4'),'afterUpdate':'update','afterDestroy':_0x81da('0x5')};function emitEvent(_0x518204){return function(_0x384b55,_0x4f7ae6,_0x47bd53){_0x384b55[_0x81da('0x6')]({'attributes':['id'],'raw':!![]})[_0x81da('0x7')](function(_0x1aacf5){_0x384b55[_0x81da('0x8')]('Users',_0x1aacf5['map'](function(_0x1eed34){return{'id':_0x1eed34['id']};}));return MailMessage[_0x81da('0x9')]({'where':{'MailInteractionId':_0x384b55['id'],'direction':'in','read':![]},'raw':!![]});})[_0x81da('0x7')](function(_0x4b35b8){_0x384b55[_0x81da('0x8')]('unreadMessages',_0x4b35b8[_0x81da('0xa')]);MailInteractionEvents[_0x81da('0xb')](_0x518204+':'+_0x384b55['id'],_0x384b55);MailInteractionEvents[_0x81da('0xb')](_0x518204,_0x384b55);_0x47bd53(null);})[_0x81da('0xc')](_0x47bd53(null));};}for(var e in events){if(events[_0x81da('0xd')](e)){var event=events[e];MailInteraction[_0x81da('0xe')](e,emitEvent(event));}}module[_0x81da('0xf')]=MailInteractionEvents; \ No newline at end of file diff --git a/server/api/mailInteraction/mailInteraction.model.js b/server/api/mailInteraction/mailInteraction.model.js index 8d1a534..1587764 100644 --- a/server/api/mailInteraction/mailInteraction.model.js +++ b/server/api/mailInteraction/mailInteraction.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa694=['YYYY-MM-DD\x20HH:mm:ss','closed','closedAt','changed','substatusAt','models','get','catch','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','moment','bluebird','request-promise','path','rimraf','./mailInteraction.attributes','MailInteraction','mail_interactions','fti_mail_interactions','subject','FULLTEXT','substatus','format'];(function(_0x501510,_0x61caa9){var _0x1e6ee5=function(_0x32845b){while(--_0x32845b){_0x501510['push'](_0x501510['shift']());}};_0x1e6ee5(++_0x61caa9);}(_0xa694,0xa6));var _0x4a69=function(_0x48bc83,_0x241ccd){_0x48bc83=_0x48bc83-0x0;var _0x14250e=_0xa694[_0x48bc83];return _0x14250e;};'use strict';var _=require(_0x4a69('0x0'));var util=require(_0x4a69('0x1'));var logger=require(_0x4a69('0x2'))('api');var moment=require(_0x4a69('0x3'));var BPromise=require(_0x4a69('0x4'));var rp=require(_0x4a69('0x5'));var fs=require('fs');var path=require(_0x4a69('0x6'));var rimraf=require(_0x4a69('0x7'));var config=require('../../config/environment');var attributes=require(_0x4a69('0x8'));module['exports']=function(_0x3237d1,_0x2d1454){return _0x3237d1['define'](_0x4a69('0x9'),attributes,{'tableName':_0x4a69('0xa'),'paranoid':![],'indexes':[{'name':_0x4a69('0xb'),'fields':[_0x4a69('0xc'),'to'],'type':_0x4a69('0xd')}],'timestamps':!![],'hooks':{'beforeCreate':function(_0x1ca91f,_0x1060b4,_0xb1d68a){if(_0x1ca91f[_0x4a69('0xe')]){_0x1ca91f['substatusAt']=moment()[_0x4a69('0xf')](_0x4a69('0x10'));}if(_0x1ca91f[_0x4a69('0x11')]){_0x1ca91f[_0x4a69('0x12')]=moment()[_0x4a69('0xf')](_0x4a69('0x10'));}_0xb1d68a(null,_0x1060b4);},'beforeUpdate':function(_0x1aae91,_0x13256e,_0x5b756f){if(_0x1aae91[_0x4a69('0x13')]('substatus')){_0x1aae91[_0x4a69('0x14')]=_0x1aae91[_0x4a69('0xe')]?moment()[_0x4a69('0xf')](_0x4a69('0x10')):null;}if(_0x1aae91[_0x4a69('0x13')]('closed')){_0x1aae91['closedAt']=moment()[_0x4a69('0xf')](_0x4a69('0x10'));_0x1aae91[_0x4a69('0xe')]=null;_0x1aae91[_0x4a69('0x14')]=null;}_0x5b756f(null,_0x1aae91);},'afterUpdate':function(_0x58208a,_0x170376,_0x484676){var _0x1c6fb6=_0x3237d1[_0x4a69('0x15')];var _0x57ca59=_0x58208a[_0x4a69('0x16')]({'plain':!![]});if(_0x57ca59[_0x4a69('0x11')]){return _0x1c6fb6['MailMessage']['update']({'read':!![]},{'where':{'MailInteractionId':_0x57ca59['id']}})['then'](function(){_0x484676();})[_0x4a69('0x17')](function(_0x231b76){_0x484676(_0x231b76);});}else{_0x484676();}}},'charset':_0x4a69('0x18'),'collate':_0x4a69('0x19')});}; \ No newline at end of file +var _0x0125=['define','MailInteraction','mail_interactions','fti_mail_interactions','FULLTEXT','substatus','substatusAt','format','YYYY-MM-DD\x20HH:mm:ss','closedAt','changed','closed','models','MailMessage','update','catch','utf8mb4','lodash','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./mailInteraction.attributes','exports'];(function(_0x34d98c,_0x4e7523){var _0x430ed4=function(_0x1992a1){while(--_0x1992a1){_0x34d98c['push'](_0x34d98c['shift']());}};_0x430ed4(++_0x4e7523);}(_0x0125,0xb9));var _0x5012=function(_0x1bfe2b,_0x34856e){_0x1bfe2b=_0x1bfe2b-0x0;var _0x1477d4=_0x0125[_0x1bfe2b];return _0x1477d4;};'use strict';var _=require(_0x5012('0x0'));var util=require('util');var logger=require(_0x5012('0x1'))(_0x5012('0x2'));var moment=require(_0x5012('0x3'));var BPromise=require(_0x5012('0x4'));var rp=require(_0x5012('0x5'));var fs=require('fs');var path=require(_0x5012('0x6'));var rimraf=require(_0x5012('0x7'));var config=require(_0x5012('0x8'));var attributes=require(_0x5012('0x9'));module[_0x5012('0xa')]=function(_0x90809,_0x388d6f){return _0x90809[_0x5012('0xb')](_0x5012('0xc'),attributes,{'tableName':_0x5012('0xd'),'paranoid':![],'indexes':[{'name':_0x5012('0xe'),'fields':['subject','to'],'type':_0x5012('0xf')}],'timestamps':!![],'hooks':{'beforeCreate':function(_0x14cdba,_0x26d338,_0x2e91f2){if(_0x14cdba[_0x5012('0x10')]){_0x14cdba[_0x5012('0x11')]=moment()[_0x5012('0x12')](_0x5012('0x13'));}if(_0x14cdba['closed']){_0x14cdba[_0x5012('0x14')]=moment()[_0x5012('0x12')]('YYYY-MM-DD\x20HH:mm:ss');}_0x2e91f2(null,_0x26d338);},'beforeUpdate':function(_0x178762,_0x563bda,_0x12f995){if(_0x178762[_0x5012('0x15')](_0x5012('0x10'))){_0x178762[_0x5012('0x11')]=_0x178762['substatus']?moment()[_0x5012('0x12')]('YYYY-MM-DD\x20HH:mm:ss'):null;}if(_0x178762[_0x5012('0x15')](_0x5012('0x16'))){_0x178762[_0x5012('0x14')]=moment()[_0x5012('0x12')](_0x5012('0x13'));_0x178762[_0x5012('0x10')]=null;_0x178762[_0x5012('0x11')]=null;}_0x12f995(null,_0x178762);},'afterUpdate':function(_0x5d26e7,_0x55f15e,_0x1d8064){var _0x2682ac=_0x90809[_0x5012('0x17')];var _0x1da3bb=_0x5d26e7['get']({'plain':!![]});if(_0x1da3bb[_0x5012('0x16')]){return _0x2682ac[_0x5012('0x18')][_0x5012('0x19')]({'read':!![]},{'where':{'MailInteractionId':_0x1da3bb['id']}})['then'](function(){_0x1d8064();})[_0x5012('0x1a')](function(_0x1f963e){_0x1d8064(_0x1f963e);});}else{_0x1d8064();}}},'charset':_0x5012('0x1b'),'collate':'utf8mb4_unicode_ci'});}; \ No newline at end of file diff --git a/server/api/mailInteraction/mailInteraction.rpc.js b/server/api/mailInteraction/mailInteraction.rpc.js index ed0c1ed..cca709a 100644 --- a/server/api/mailInteraction/mailInteraction.rpc.js +++ b/server/api/mailInteraction/mailInteraction.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x02ed=['where','attributes','limit','debug','AddTagsToMailInteraction','find','addTags','ids','AddTags','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','defaults','localhost','redis','register','request','then','info','MailInteraction,\x20%s,\x20%s','request\x20sent','MailInteraction,\x20%s,\x20%s,\x20%s','stringify','error','code','message','UpdateMailInteraction','MailInteraction','update','body','options','raw'];(function(_0x581d17,_0x951b0a){var _0x2014bb=function(_0x44fb08){while(--_0x44fb08){_0x581d17['push'](_0x581d17['shift']());}};_0x2014bb(++_0x951b0a);}(_0x02ed,0x152));var _0xd02e=function(_0x3056ab,_0x42abdb){_0x3056ab=_0x3056ab-0x0;var _0x38f56b=_0x02ed[_0x3056ab];return _0x38f56b;};'use strict';var _=require(_0xd02e('0x0'));var util=require(_0xd02e('0x1'));var moment=require(_0xd02e('0x2'));var BPromise=require(_0xd02e('0x3'));var rs=require(_0xd02e('0x4'));var fs=require('fs');var Redis=require(_0xd02e('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xd02e('0x6'));var logger=require(_0xd02e('0x7'))(_0xd02e('0x8'));var config=require(_0xd02e('0x9'));var jayson=require(_0xd02e('0xa'));var client=jayson['client']['http']({'port':0x232a});config['redis']=_[_0xd02e('0xb')](config['redis'],{'host':_0xd02e('0xc'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xd02e('0xd')]));require('./mailInteraction.socket')[_0xd02e('0xe')](socket);function respondWithRpcPromise(_0x10e090,_0x176e6e,_0x6207d6){return new BPromise(function(_0x358288,_0x3cb4cb){return client[_0xd02e('0xf')](_0x10e090,_0x6207d6)[_0xd02e('0x10')](function(_0x50f92a){logger[_0xd02e('0x11')](_0xd02e('0x12'),_0x176e6e,_0xd02e('0x13'));logger['debug'](_0xd02e('0x14'),_0x176e6e,'request\x20sent',JSON[_0xd02e('0x15')](_0x50f92a));if(_0x50f92a['error']){if(_0x50f92a[_0xd02e('0x16')][_0xd02e('0x17')]===0x1f4){logger[_0xd02e('0x16')](_0xd02e('0x12'),_0x176e6e,_0x50f92a[_0xd02e('0x16')]['message']);return _0x3cb4cb(_0x50f92a[_0xd02e('0x16')][_0xd02e('0x18')]);}logger[_0xd02e('0x16')](_0xd02e('0x12'),_0x176e6e,_0x50f92a[_0xd02e('0x16')][_0xd02e('0x18')]);return _0x358288(_0x50f92a[_0xd02e('0x16')]['message']);}else{logger[_0xd02e('0x11')](_0xd02e('0x12'),_0x176e6e,_0xd02e('0x13'));_0x358288(_0x50f92a['result'][_0xd02e('0x18')]);}})['catch'](function(_0x184293){logger[_0xd02e('0x16')](_0xd02e('0x12'),_0x176e6e,_0x184293);_0x3cb4cb(_0x184293);});});}exports[_0xd02e('0x19')]=function(_0x3497e8){var _0x4bdd33=this;return new Promise(function(_0x5e3a28,_0x20532b){return db[_0xd02e('0x1a')][_0xd02e('0x1b')](_0x3497e8[_0xd02e('0x1c')],{'raw':_0x3497e8[_0xd02e('0x1d')]?_0x3497e8[_0xd02e('0x1d')][_0xd02e('0x1e')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3497e8[_0xd02e('0x1d')]?_0x3497e8[_0xd02e('0x1d')][_0xd02e('0x1f')]||null:null,'attributes':_0x3497e8[_0xd02e('0x1d')]?_0x3497e8['options'][_0xd02e('0x20')]||null:null,'limit':_0x3497e8[_0xd02e('0x1d')]?_0x3497e8['options'][_0xd02e('0x21')]||null:null})[_0xd02e('0x10')](function(_0x1791a0){logger[_0xd02e('0x11')]('UpdateMailInteraction',_0x3497e8);logger[_0xd02e('0x22')](_0xd02e('0x19'),_0x3497e8,JSON[_0xd02e('0x15')](_0x1791a0));_0x5e3a28(_0x1791a0);})['catch'](function(_0x36d7d3){logger[_0xd02e('0x16')](_0xd02e('0x19'),_0x36d7d3[_0xd02e('0x18')],_0x3497e8);_0x20532b(_0x4bdd33[_0xd02e('0x16')](0x1f4,_0x36d7d3[_0xd02e('0x18')]));});});};exports[_0xd02e('0x23')]=function(_0x284218){return new Promise(function(_0x76a867,_0x125feb){return db[_0xd02e('0x1a')][_0xd02e('0x24')]({'where':_0x284218[_0xd02e('0x1d')]?_0x284218[_0xd02e('0x1d')][_0xd02e('0x1f')]||null:null})[_0xd02e('0x10')](function(_0x2804c1){if(_0x2804c1){return _0x2804c1[_0xd02e('0x25')](_0x284218[_0xd02e('0x1c')]['ids'],_['omit'](_0x284218[_0xd02e('0x1c')],[_0xd02e('0x26'),'id'])||{});}})['spread'](function(_0x1f1826){logger[_0xd02e('0x11')](_0xd02e('0x27'),_0x284218);logger['debug'](_0xd02e('0x27'),_0x284218,JSON[_0xd02e('0x15')](_0x1f1826));_0x76a867(_0x1f1826);})[_0xd02e('0x28')](function(_0xca3956){logger[_0xd02e('0x16')]('AddTags',_0xca3956[_0xd02e('0x18')],_0x284218);_0x125feb(_this[_0xd02e('0x16')](0x1f4,_0xca3956[_0xd02e('0x18')]));});});}; \ No newline at end of file +var _0x4f43=['spread','AddTags','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','http','redis','localhost','socket.io-emitter','./mailInteraction.socket','register','then','info','MailInteraction,\x20%s,\x20%s','request\x20sent','debug','error','message','catch','MailInteraction','body','options','raw','where','attributes','limit','UpdateMailInteraction','stringify','AddTagsToMailInteraction','find','addTags','omit','ids'];(function(_0x2b8f2b,_0x3e41ac){var _0x12b3ff=function(_0x179f1f){while(--_0x179f1f){_0x2b8f2b['push'](_0x2b8f2b['shift']());}};_0x12b3ff(++_0x3e41ac);}(_0x4f43,0x192));var _0x34f4=function(_0x3c619c,_0x1f0629){_0x3c619c=_0x3c619c-0x0;var _0x2128e3=_0x4f43[_0x3c619c];return _0x2128e3;};'use strict';var _=require(_0x34f4('0x0'));var util=require(_0x34f4('0x1'));var moment=require(_0x34f4('0x2'));var BPromise=require(_0x34f4('0x3'));var rs=require(_0x34f4('0x4'));var fs=require('fs');var Redis=require(_0x34f4('0x5'));var db=require(_0x34f4('0x6'))['db'];var utils=require(_0x34f4('0x7'));var logger=require(_0x34f4('0x8'))(_0x34f4('0x9'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client'][_0x34f4('0xa')]({'port':0x232a});config[_0x34f4('0xb')]=_['defaults'](config[_0x34f4('0xb')],{'host':_0x34f4('0xc'),'port':0x18eb});var socket=require(_0x34f4('0xd'))(new Redis(config['redis']));require(_0x34f4('0xe'))[_0x34f4('0xf')](socket);function respondWithRpcPromise(_0x4d8cfe,_0xc2474b,_0x4362e6){return new BPromise(function(_0x4d8086,_0x412daf){return client['request'](_0x4d8cfe,_0x4362e6)[_0x34f4('0x10')](function(_0x580c72){logger[_0x34f4('0x11')](_0x34f4('0x12'),_0xc2474b,_0x34f4('0x13'));logger[_0x34f4('0x14')]('MailInteraction,\x20%s,\x20%s,\x20%s',_0xc2474b,_0x34f4('0x13'),JSON['stringify'](_0x580c72));if(_0x580c72[_0x34f4('0x15')]){if(_0x580c72[_0x34f4('0x15')]['code']===0x1f4){logger[_0x34f4('0x15')](_0x34f4('0x12'),_0xc2474b,_0x580c72['error']['message']);return _0x412daf(_0x580c72[_0x34f4('0x15')][_0x34f4('0x16')]);}logger[_0x34f4('0x15')](_0x34f4('0x12'),_0xc2474b,_0x580c72[_0x34f4('0x15')]['message']);return _0x4d8086(_0x580c72[_0x34f4('0x15')][_0x34f4('0x16')]);}else{logger[_0x34f4('0x11')](_0x34f4('0x12'),_0xc2474b,_0x34f4('0x13'));_0x4d8086(_0x580c72['result']['message']);}})[_0x34f4('0x17')](function(_0x5baa3f){logger[_0x34f4('0x15')](_0x34f4('0x12'),_0xc2474b,_0x5baa3f);_0x412daf(_0x5baa3f);});});}exports['UpdateMailInteraction']=function(_0x289f4e){var _0x300d5b=this;return new Promise(function(_0x3ddbbf,_0x4a7388){return db[_0x34f4('0x18')]['update'](_0x289f4e[_0x34f4('0x19')],{'raw':_0x289f4e['options']?_0x289f4e[_0x34f4('0x1a')][_0x34f4('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x289f4e[_0x34f4('0x1a')]?_0x289f4e[_0x34f4('0x1a')][_0x34f4('0x1c')]||null:null,'attributes':_0x289f4e[_0x34f4('0x1a')]?_0x289f4e[_0x34f4('0x1a')][_0x34f4('0x1d')]||null:null,'limit':_0x289f4e[_0x34f4('0x1a')]?_0x289f4e[_0x34f4('0x1a')][_0x34f4('0x1e')]||null:null})[_0x34f4('0x10')](function(_0x5d7076){logger[_0x34f4('0x11')]('UpdateMailInteraction',_0x289f4e);logger['debug'](_0x34f4('0x1f'),_0x289f4e,JSON[_0x34f4('0x20')](_0x5d7076));_0x3ddbbf(_0x5d7076);})['catch'](function(_0x2ae959){logger[_0x34f4('0x15')](_0x34f4('0x1f'),_0x2ae959['message'],_0x289f4e);_0x4a7388(_0x300d5b['error'](0x1f4,_0x2ae959[_0x34f4('0x16')]));});});};exports[_0x34f4('0x21')]=function(_0x2be9a5){return new Promise(function(_0x51ce8f,_0x61a426){return db[_0x34f4('0x18')][_0x34f4('0x22')]({'where':_0x2be9a5['options']?_0x2be9a5['options'][_0x34f4('0x1c')]||null:null})['then'](function(_0x2f6684){if(_0x2f6684){return _0x2f6684[_0x34f4('0x23')](_0x2be9a5[_0x34f4('0x19')]['ids'],_[_0x34f4('0x24')](_0x2be9a5[_0x34f4('0x19')],[_0x34f4('0x25'),'id'])||{});}})[_0x34f4('0x26')](function(_0x242df9){logger[_0x34f4('0x11')]('AddTags',_0x2be9a5);logger[_0x34f4('0x14')](_0x34f4('0x27'),_0x2be9a5,JSON[_0x34f4('0x20')](_0x242df9));_0x51ce8f(_0x242df9);})[_0x34f4('0x17')](function(_0x755846){logger[_0x34f4('0x15')]('AddTags',_0x755846[_0x34f4('0x16')],_0x2be9a5);_0x61a426(_this[_0x34f4('0x15')](0x1f4,_0x755846['message']));});});}; \ No newline at end of file diff --git a/server/api/mailInteraction/mailInteraction.socket.js b/server/api/mailInteraction/mailInteraction.socket.js index e0c2f2b..ec35f9d 100644 --- a/server/api/mailInteraction/mailInteraction.socket.js +++ b/server/api/mailInteraction/mailInteraction.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0dfd=['remove','update','emit','register','length','./mailInteraction.events'];(function(_0x4ae6ef,_0xc2af80){var _0x3cbb4e=function(_0x569ad5){while(--_0x569ad5){_0x4ae6ef['push'](_0x4ae6ef['shift']());}};_0x3cbb4e(++_0xc2af80);}(_0x0dfd,0x197));var _0xd0df=function(_0x471fd8,_0x44407b){_0x471fd8=_0x471fd8-0x0;var _0x539acd=_0x0dfd[_0x471fd8];return _0x539acd;};'use strict';var MailInteractionEvents=require(_0xd0df('0x0'));var events=['save',_0xd0df('0x1'),_0xd0df('0x2')];function createListener(_0x4caea8,_0x2dbd40){return function(_0x5a1810){_0x2dbd40[_0xd0df('0x3')](_0x4caea8,_0x5a1810);};}function removeListener(_0x3945ea,_0x20975c){return function(){MailInteractionEvents['removeListener'](_0x3945ea,_0x20975c);};}exports[_0xd0df('0x4')]=function(_0x4a0205){for(var _0x4f7d52=0x0,_0x8e797b=events[_0xd0df('0x5')];_0x4f7d52<_0x8e797b;_0x4f7d52++){var _0x3a8061=events[_0x4f7d52];var _0x4275fb=createListener('mailInteraction:'+_0x3a8061,_0x4a0205);MailInteractionEvents['on'](_0x3a8061,_0x4275fb);}}; \ No newline at end of file +var _0x58ab=['./mailInteraction.events','save','update','emit','removeListener','length'];(function(_0x5b6906,_0x2d3776){var _0x5ec2b3=function(_0x5226a1){while(--_0x5226a1){_0x5b6906['push'](_0x5b6906['shift']());}};_0x5ec2b3(++_0x2d3776);}(_0x58ab,0x156));var _0xb58a=function(_0x1e8522,_0x516bdc){_0x1e8522=_0x1e8522-0x0;var _0x4672b6=_0x58ab[_0x1e8522];return _0x4672b6;};'use strict';var MailInteractionEvents=require(_0xb58a('0x0'));var events=[_0xb58a('0x1'),'remove',_0xb58a('0x2')];function createListener(_0xf4247d,_0x520ac9){return function(_0x47627c){_0x520ac9[_0xb58a('0x3')](_0xf4247d,_0x47627c);};}function removeListener(_0x476880,_0x744c06){return function(){MailInteractionEvents[_0xb58a('0x4')](_0x476880,_0x744c06);};}exports['register']=function(_0x2bb6e1){for(var _0x133b6f=0x0,_0x4affb7=events[_0xb58a('0x5')];_0x133b6f<_0x4affb7;_0x133b6f++){var _0x29016e=events[_0x133b6f];var _0x4f680b=createListener('mailInteraction:'+_0x29016e,_0x2bb6e1);MailInteractionEvents['on'](_0x29016e,_0x4f680b);}}; \ No newline at end of file diff --git a/server/api/mailMessage/index.js b/server/api/mailMessage/index.js index a6f2df6..bcfacbd 100644 --- a/server/api/mailMessage/index.js +++ b/server/api/mailMessage/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9755=['connect-timeout','express','../../components/interaction/service','../../config/environment','./mailMessage.controller','get','isAuthenticated','index','describe','/:id','show','/:id/download','post','tracked','mailmessage:create','create','put','update','/:id/accept','/:id/reject','delete','exports','multer','path'];(function(_0x297b7b,_0xf34fec){var _0x30ab76=function(_0x2c8bc8){while(--_0x2c8bc8){_0x297b7b['push'](_0x297b7b['shift']());}};_0x30ab76(++_0xf34fec);}(_0x9755,0x1c6));var _0x5975=function(_0x2af009,_0x5432ee){_0x2af009=_0x2af009-0x0;var _0x46d15f=_0x9755[_0x2af009];return _0x46d15f;};'use strict';var multer=require(_0x5975('0x0'));var util=require('util');var path=require(_0x5975('0x1'));var timeout=require(_0x5975('0x2'));var express=require(_0x5975('0x3'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0x5975('0x4'));var config=require(_0x5975('0x5'));var controller=require(_0x5975('0x6'));router[_0x5975('0x7')]('/',auth[_0x5975('0x8')](),controller[_0x5975('0x9')]);router[_0x5975('0x7')]('/describe',auth[_0x5975('0x8')](),controller[_0x5975('0xa')]);router['get'](_0x5975('0xb'),auth[_0x5975('0x8')](),controller[_0x5975('0xc')]);router['get'](_0x5975('0xd'),auth['isAuthenticated'](),controller['download']);router[_0x5975('0xe')]('/',auth[_0x5975('0x8')](),interaction[_0x5975('0xf')]('mail',_0x5975('0x10')),controller[_0x5975('0x11')]);router[_0x5975('0x12')]('/:id',auth[_0x5975('0x8')](),controller[_0x5975('0x13')]);router[_0x5975('0x12')](_0x5975('0x14'),auth['isAuthenticated'](),controller['accept']);router[_0x5975('0x12')](_0x5975('0x15'),auth[_0x5975('0x8')](),controller['reject']);router[_0x5975('0x16')]('/:id',auth[_0x5975('0x8')](),controller['destroy']);module[_0x5975('0x17')]=router; \ No newline at end of file +var _0x18e0=['get','isAuthenticated','/describe','/:id','show','/:id/download','download','mail','mailmessage:create','create','put','update','/:id/accept','accept','/:id/reject','reject','destroy','exports','util','connect-timeout','express','Router','../../components/auth/service','./mailMessage.controller'];(function(_0x106e42,_0x5d9caa){var _0x55af86=function(_0x39a0f4){while(--_0x39a0f4){_0x106e42['push'](_0x106e42['shift']());}};_0x55af86(++_0x5d9caa);}(_0x18e0,0xa2));var _0x018e=function(_0x24f31b,_0x44b8f3){_0x24f31b=_0x24f31b-0x0;var _0x488401=_0x18e0[_0x24f31b];return _0x488401;};'use strict';var multer=require('multer');var util=require(_0x018e('0x0'));var path=require('path');var timeout=require(_0x018e('0x1'));var express=require(_0x018e('0x2'));var router=express[_0x018e('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x018e('0x4'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x018e('0x5'));router[_0x018e('0x6')]('/',auth[_0x018e('0x7')](),controller['index']);router['get'](_0x018e('0x8'),auth[_0x018e('0x7')](),controller['describe']);router[_0x018e('0x6')](_0x018e('0x9'),auth[_0x018e('0x7')](),controller[_0x018e('0xa')]);router[_0x018e('0x6')](_0x018e('0xb'),auth['isAuthenticated'](),controller[_0x018e('0xc')]);router['post']('/',auth['isAuthenticated'](),interaction['tracked'](_0x018e('0xd'),_0x018e('0xe')),controller[_0x018e('0xf')]);router[_0x018e('0x10')](_0x018e('0x9'),auth[_0x018e('0x7')](),controller[_0x018e('0x11')]);router[_0x018e('0x10')](_0x018e('0x12'),auth['isAuthenticated'](),controller[_0x018e('0x13')]);router[_0x018e('0x10')](_0x018e('0x14'),auth[_0x018e('0x7')](),controller[_0x018e('0x15')]);router['delete'](_0x018e('0x9'),auth[_0x018e('0x7')](),controller[_0x018e('0x16')]);module[_0x018e('0x17')]=router; \ No newline at end of file diff --git a/server/api/mailMessage/mailMessage.attributes.js b/server/api/mailMessage/mailMessage.attributes.js index a3a8215..7e6be27 100644 --- a/server/api/mailMessage/mailMessage.attributes.js +++ b/server/api/mailMessage/mailMessage.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x52a7=['STRING','TEXT','INTEGER','BOOLEAN','Email','sequelize','lodash','exports','long','medium','ENUM','out'];(function(_0x42b030,_0x252cb6){var _0x112303=function(_0x261838){while(--_0x261838){_0x42b030['push'](_0x42b030['shift']());}};_0x112303(++_0x252cb6);}(_0x52a7,0x119));var _0x752a=function(_0x59ee6f,_0x450239){_0x59ee6f=_0x59ee6f-0x0;var _0x4c0979=_0x52a7[_0x59ee6f];return _0x4c0979;};'use strict';var Sequelize=require(_0x752a('0x0'));var _=require(_0x752a('0x1'));module[_0x752a('0x2')]={'body':{'type':Sequelize['TEXT'](_0x752a('0x3')),'allowNull':![]},'plainBody':{'type':Sequelize['TEXT'](_0x752a('0x4'))},'read':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'direction':{'type':Sequelize[_0x752a('0x5')]('in',_0x752a('0x6')),'defaultValue':_0x752a('0x6'),'allowNull':![]},'messageId':{'type':Sequelize[_0x752a('0x7')](0x1fe)},'from':{'type':Sequelize[_0x752a('0x7')]},'to':{'type':Sequelize[_0x752a('0x8')](_0x752a('0x3'))},'cc':{'type':Sequelize[_0x752a('0x8')](_0x752a('0x3'))},'bcc':{'type':Sequelize[_0x752a('0x8')](_0x752a('0x3'))},'subject':{'type':Sequelize[_0x752a('0x8')]},'sentAt':{'type':Sequelize['DATE']},'attach':{'type':Sequelize[_0x752a('0x9')],'defaultValue':0x0},'secret':{'type':Sequelize[_0x752a('0xa')],'defaultValue':![]},'readAt':{'type':Sequelize['DATE']},'originTo':{'type':Sequelize[_0x752a('0x8')](_0x752a('0x3'))},'originCc':{'type':Sequelize[_0x752a('0x8')](_0x752a('0x3'))},'originChannel':{'type':Sequelize[_0x752a('0x5')]('Email','Chat'),'defaultValue':_0x752a('0xb'),'allowNull':![]}}; \ No newline at end of file +var _0xff73=['sequelize','lodash','TEXT','long','medium','BOOLEAN','ENUM','out','STRING','DATE','INTEGER','Chat','Email'];(function(_0x27438b,_0x978ecd){var _0xec6b=function(_0x31977b){while(--_0x31977b){_0x27438b['push'](_0x27438b['shift']());}};_0xec6b(++_0x978ecd);}(_0xff73,0x1d4));var _0x3ff7=function(_0x3db5fd,_0x3ba738){_0x3db5fd=_0x3db5fd-0x0;var _0xbf7e0e=_0xff73[_0x3db5fd];return _0xbf7e0e;};'use strict';var Sequelize=require(_0x3ff7('0x0'));var _=require(_0x3ff7('0x1'));module['exports']={'body':{'type':Sequelize[_0x3ff7('0x2')](_0x3ff7('0x3')),'allowNull':![]},'plainBody':{'type':Sequelize[_0x3ff7('0x2')](_0x3ff7('0x4'))},'read':{'type':Sequelize[_0x3ff7('0x5')],'defaultValue':![]},'direction':{'type':Sequelize[_0x3ff7('0x6')]('in','out'),'defaultValue':_0x3ff7('0x7'),'allowNull':![]},'messageId':{'type':Sequelize[_0x3ff7('0x8')](0x1fe)},'from':{'type':Sequelize['STRING']},'to':{'type':Sequelize[_0x3ff7('0x2')](_0x3ff7('0x3'))},'cc':{'type':Sequelize[_0x3ff7('0x2')](_0x3ff7('0x3'))},'bcc':{'type':Sequelize[_0x3ff7('0x2')]('long')},'subject':{'type':Sequelize['TEXT']},'sentAt':{'type':Sequelize[_0x3ff7('0x9')]},'attach':{'type':Sequelize[_0x3ff7('0xa')],'defaultValue':0x0},'secret':{'type':Sequelize[_0x3ff7('0x5')],'defaultValue':![]},'readAt':{'type':Sequelize['DATE']},'originTo':{'type':Sequelize[_0x3ff7('0x2')](_0x3ff7('0x3'))},'originCc':{'type':Sequelize['TEXT']('long')},'originChannel':{'type':Sequelize[_0x3ff7('0x6')]('Email',_0x3ff7('0xb')),'defaultValue':_0x3ff7('0xc'),'allowNull':![]}}; \ No newline at end of file diff --git a/server/api/mailMessage/mailMessage.controller.js b/server/api/mailMessage/mailMessage.controller.js index 8b30b52..a9040b1 100644 --- a/server/api/mailMessage/mailMessage.controller.js +++ b/server/api/mailMessage/mailMessage.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfe91=['user','pass','secure','attachments','join','root','server/files/attachments','basename','ListId','List\x20not\x20found','SendMail','sendMail','messageId','format','YYYY-MM-DD\x20HH:mm:ss','accept','mail','readAt','UserId','agent','Contact','get','MailInteraction','MailInteractionId','interaction','role','null','AcceptMessage','acceptMessage','startsWith','push','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','Sequelize','contact','manual','interface','SIP/%s','channel','event','EventManager','acceptmessage','mail-interactions','[MAILMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','RejectMessage','rejectMessage','cf_','sequelize','SELECT','rejectmessage','download','toString','server','tmp','files','message-%s.eml','from','Attachment','Attachments','subject','createdAt','headers','bcc','Bcc','existsSync','readFileSync','build','log','unlinkSync','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','fs-extra','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./mailMessage.socket','client','http','request','then','request\x20sent','MailMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','MailMessage,\x20%s,\x20%s','info','result','sendStatus','status','end','offset','limit','undefined','count','set','Content-Range','apply','reject','save','update','stack','name','send','index','MailMessage','rawAttributes','type','key','map','query','keys','filters','intersection','attributes','model','fields','length','nolimit','where','pick','filter','VIRTUAL','merge','options','includeAll','include','findAll','rows','catch','show','params','find','body','destroy','describe','create','direction','out','secret','split','findOne','MailAccountId','CmList','List','CmContact','Contacts','MailServerOut','Smtp','isNil','service','host','port','authentication','auth'];(function(_0x43751f,_0x159d7f){var _0xd4e571=function(_0x42c6bd){while(--_0x42c6bd){_0x43751f['push'](_0x43751f['shift']());}};_0xd4e571(++_0x159d7f);}(_0xfe91,0x1a6));var _0x1fe9=function(_0x1d9aa0,_0x272488){_0x1d9aa0=_0x1d9aa0-0x0;var _0x226868=_0xfe91[_0x1d9aa0];return _0x226868;};'use strict';var emlformat=require(_0x1fe9('0x0'));var rimraf=require(_0x1fe9('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x1fe9('0x2'));var rp=require(_0x1fe9('0x3'));var moment=require(_0x1fe9('0x4'));var BPromise=require(_0x1fe9('0x5'));var Mustache=require(_0x1fe9('0x6'));var util=require('util');var path=require(_0x1fe9('0x7'));var sox=require(_0x1fe9('0x8'));var csv=require(_0x1fe9('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x1fe9('0xa'));var _=require('lodash');var squel=require('squel');var crypto=require(_0x1fe9('0xb'));var jsforce=require(_0x1fe9('0xc'));var deskjs=require(_0x1fe9('0xd'));var toCsv=require(_0x1fe9('0x9'));var querystring=require(_0x1fe9('0xe'));var Papa=require(_0x1fe9('0xf'));var Redis=require(_0x1fe9('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x1fe9('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x1fe9('0x12'));var logger=require(_0x1fe9('0x13'))('api');var utils=require(_0x1fe9('0x14'));var config=require(_0x1fe9('0x15'));var licenseUtil=require(_0x1fe9('0x16'));var db=require(_0x1fe9('0x17'))['db'];config[_0x1fe9('0x18')]=_[_0x1fe9('0x19')](config[_0x1fe9('0x18')],{'host':_0x1fe9('0x1a'),'port':0x18eb});var socket=require(_0x1fe9('0x1b'))(new Redis(config['redis']));require(_0x1fe9('0x1c'))['register'](socket);var jayson=require('jayson/promise');var client=jayson[_0x1fe9('0x1d')]['http']({'port':0x232c});var client9003=jayson[_0x1fe9('0x1d')]['http']({'port':0x232b});var client9002=jayson[_0x1fe9('0x1d')][_0x1fe9('0x1e')]({'port':0x232a});function respondWithRpcPromise(_0x3b3d29,_0x3aa34b,_0x4d1aa3,_0x4631fe){return new BPromise(function(_0x1323e7,_0x3a7418){var _0x25427e=_0x4631fe||client;return _0x25427e[_0x1fe9('0x1f')](_0x3b3d29,_0x4d1aa3)[_0x1fe9('0x20')](function(_0x16fb1e){logger['info']('MailMessage,\x20%s,\x20%s',_0x3aa34b,_0x1fe9('0x21'));logger['debug'](_0x1fe9('0x22'),_0x3aa34b,_0x1fe9('0x21'),JSON[_0x1fe9('0x23')](_0x16fb1e));if(_0x16fb1e[_0x1fe9('0x24')]){if(_0x16fb1e[_0x1fe9('0x24')][_0x1fe9('0x25')]===0x1f4){logger[_0x1fe9('0x24')]('MailMessage,\x20%s,\x20%s',_0x3aa34b,_0x16fb1e[_0x1fe9('0x24')][_0x1fe9('0x26')]);return _0x3a7418(_0x16fb1e['error'][_0x1fe9('0x26')]);}logger['error'](_0x1fe9('0x27'),_0x3aa34b,_0x16fb1e[_0x1fe9('0x24')][_0x1fe9('0x26')]);return _0x1323e7(_0x16fb1e[_0x1fe9('0x24')][_0x1fe9('0x26')]);}else{logger[_0x1fe9('0x28')]('MailMessage,\x20%s,\x20%s',_0x3aa34b,_0x1fe9('0x21'));_0x1323e7(_0x16fb1e[_0x1fe9('0x29')][_0x1fe9('0x26')]);}})['catch'](function(_0x17407c){logger['error'](_0x1fe9('0x27'),_0x3aa34b,_0x17407c);_0x3a7418(_0x17407c);});});}function respondWithStatusCode(_0x18755f,_0x555309){_0x555309=_0x555309||0xcc;return function(_0x25935d){if(_0x25935d){return _0x18755f[_0x1fe9('0x2a')](_0x555309);}return _0x18755f[_0x1fe9('0x2b')](_0x555309)[_0x1fe9('0x2c')]();};}function respondWithResult(_0x306444,_0x502200){_0x502200=_0x502200||0xc8;return function(_0x1cf955){if(_0x1cf955){return _0x306444[_0x1fe9('0x2b')](_0x502200)['json'](_0x1cf955);}};}function respondWithFilteredResult(_0x3daa51,_0x25e3b5){return function(_0x3b7a9f){if(_0x3b7a9f){var _0x27e286=typeof _0x25e3b5[_0x1fe9('0x2d')]==='undefined'&&typeof _0x25e3b5[_0x1fe9('0x2e')]===_0x1fe9('0x2f');var _0x554e3c=_0x3b7a9f[_0x1fe9('0x30')];var _0x473f12=_0x27e286?0x0:_0x25e3b5[_0x1fe9('0x2d')];var _0x57c0d1=_0x27e286?_0x3b7a9f['count']:_0x25e3b5[_0x1fe9('0x2d')]+_0x25e3b5[_0x1fe9('0x2e')];var _0x3c800c;if(_0x57c0d1>=_0x554e3c){_0x57c0d1=_0x554e3c;_0x3c800c=0xc8;}else{_0x3c800c=0xce;}_0x3daa51[_0x1fe9('0x2b')](_0x3c800c);return _0x3daa51[_0x1fe9('0x31')](_0x1fe9('0x32'),_0x473f12+'-'+_0x57c0d1+'/'+_0x554e3c)['json'](_0x3b7a9f);}return null;};}function patchUpdates(_0x31ddfa){return function(_0x3f7291){try{jsonpatch[_0x1fe9('0x33')](_0x3f7291,_0x31ddfa,!![]);}catch(_0x8dfdaa){return BPromise[_0x1fe9('0x34')](_0x8dfdaa);}return _0x3f7291[_0x1fe9('0x35')]();};}function saveUpdates(_0x1a37c3,_0x19fa7b){return function(_0x436e9b){if(_0x436e9b){return _0x436e9b[_0x1fe9('0x36')](_0x1a37c3)[_0x1fe9('0x20')](function(_0x1e5e19){return _0x1e5e19;});}return null;};}function removeEntity(_0x1de351,_0x36b688){return function(_0x3a0b68){if(_0x3a0b68){return _0x3a0b68['destroy']()[_0x1fe9('0x20')](function(){_0x1de351[_0x1fe9('0x2b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x587b01,_0x3fa68b){return function(_0x36b22b){if(!_0x36b22b){_0x587b01[_0x1fe9('0x2a')](0x194);}return _0x36b22b;};}function handleError(_0x2b80f4,_0x275f1b){_0x275f1b=_0x275f1b||0x1f4;return function(_0x189c9c){logger[_0x1fe9('0x24')](_0x189c9c[_0x1fe9('0x37')]);if(_0x189c9c[_0x1fe9('0x38')]){delete _0x189c9c['name'];}_0x2b80f4[_0x1fe9('0x2b')](_0x275f1b)[_0x1fe9('0x39')](_0x189c9c);};}exports[_0x1fe9('0x3a')]=function(_0x15f714,_0x1b98d7){var _0x162099={},_0x481c35={},_0x5d34ff={'count':0x0,'rows':[]};var _0x1ac7d7=_['map'](db[_0x1fe9('0x3b')][_0x1fe9('0x3c')],function(_0x17ca48){return{'name':_0x17ca48['fieldName'],'type':_0x17ca48[_0x1fe9('0x3d')][_0x1fe9('0x3e')]};});_0x481c35['model']=_[_0x1fe9('0x3f')](_0x1ac7d7,_0x1fe9('0x38'));_0x481c35[_0x1fe9('0x40')]=_[_0x1fe9('0x41')](_0x15f714[_0x1fe9('0x40')]);_0x481c35[_0x1fe9('0x42')]=_[_0x1fe9('0x43')](_0x481c35['model'],_0x481c35['query']);_0x162099[_0x1fe9('0x44')]=_[_0x1fe9('0x43')](_0x481c35[_0x1fe9('0x45')],qs[_0x1fe9('0x46')](_0x15f714[_0x1fe9('0x40')][_0x1fe9('0x46')]));_0x162099[_0x1fe9('0x44')]=_0x162099[_0x1fe9('0x44')][_0x1fe9('0x47')]?_0x162099[_0x1fe9('0x44')]:_0x481c35[_0x1fe9('0x45')];if(!_0x15f714['query']['hasOwnProperty'](_0x1fe9('0x48'))){_0x162099[_0x1fe9('0x2e')]=qs[_0x1fe9('0x2e')](_0x15f714[_0x1fe9('0x40')][_0x1fe9('0x2e')]);_0x162099['offset']=qs[_0x1fe9('0x2d')](_0x15f714['query'][_0x1fe9('0x2d')]);}_0x162099['order']=qs['sort'](_0x15f714[_0x1fe9('0x40')]['sort']);_0x162099[_0x1fe9('0x49')]=qs[_0x1fe9('0x42')](_[_0x1fe9('0x4a')](_0x15f714[_0x1fe9('0x40')],_0x481c35[_0x1fe9('0x42')]),_0x1ac7d7);if(_0x15f714[_0x1fe9('0x40')][_0x1fe9('0x4b')]){_0x162099[_0x1fe9('0x49')]=_['merge'](_0x162099[_0x1fe9('0x49')],{'$or':_[_0x1fe9('0x3f')](_0x1ac7d7,function(_0x2487c7){if(_0x2487c7[_0x1fe9('0x3d')]!==_0x1fe9('0x4c')){var _0x14770f={};_0x14770f[_0x2487c7[_0x1fe9('0x38')]]={'$like':'%'+_0x15f714[_0x1fe9('0x40')][_0x1fe9('0x4b')]+'%'};return _0x14770f;}})});}_0x162099=_[_0x1fe9('0x4d')]({},_0x162099,_0x15f714[_0x1fe9('0x4e')]);var _0x4d5fec={'where':_0x162099[_0x1fe9('0x49')]};return db['MailMessage'][_0x1fe9('0x30')](_0x4d5fec)[_0x1fe9('0x20')](function(_0x541b33){_0x5d34ff[_0x1fe9('0x30')]=_0x541b33;if(_0x15f714[_0x1fe9('0x40')][_0x1fe9('0x4f')]){_0x162099[_0x1fe9('0x50')]=[{'all':!![]}];}return db[_0x1fe9('0x3b')][_0x1fe9('0x51')](_0x162099);})[_0x1fe9('0x20')](function(_0x430a2a){_0x5d34ff[_0x1fe9('0x52')]=_0x430a2a;return _0x5d34ff;})[_0x1fe9('0x20')](respondWithFilteredResult(_0x1b98d7,_0x162099))[_0x1fe9('0x53')](handleError(_0x1b98d7,null));};exports[_0x1fe9('0x54')]=function(_0x1c4be6,_0x1fc755){var _0x4a1c82={'raw':!![],'where':{'id':_0x1c4be6[_0x1fe9('0x55')]['id']}},_0xed1c64={};_0xed1c64[_0x1fe9('0x45')]=_[_0x1fe9('0x41')](db[_0x1fe9('0x3b')]['rawAttributes']);_0xed1c64['query']=_[_0x1fe9('0x41')](_0x1c4be6['query']);_0xed1c64['filters']=_[_0x1fe9('0x43')](_0xed1c64['model'],_0xed1c64[_0x1fe9('0x40')]);_0x4a1c82['attributes']=_[_0x1fe9('0x43')](_0xed1c64[_0x1fe9('0x45')],qs[_0x1fe9('0x46')](_0x1c4be6[_0x1fe9('0x40')]['fields']));_0x4a1c82['attributes']=_0x4a1c82[_0x1fe9('0x44')][_0x1fe9('0x47')]?_0x4a1c82[_0x1fe9('0x44')]:_0xed1c64['model'];if(_0x1c4be6[_0x1fe9('0x40')][_0x1fe9('0x4f')]){_0x4a1c82[_0x1fe9('0x50')]=[{'all':!![]}];}_0x4a1c82=_[_0x1fe9('0x4d')]({},_0x4a1c82,_0x1c4be6[_0x1fe9('0x4e')]);return db[_0x1fe9('0x3b')][_0x1fe9('0x56')](_0x4a1c82)['then'](handleEntityNotFound(_0x1fc755,null))[_0x1fe9('0x20')](respondWithResult(_0x1fc755,null))['catch'](handleError(_0x1fc755,null));};exports[_0x1fe9('0x36')]=function(_0x5b4863,_0x3d2410){if(_0x5b4863[_0x1fe9('0x57')]['id']){delete _0x5b4863[_0x1fe9('0x57')]['id'];}return db['MailMessage'][_0x1fe9('0x56')]({'where':{'id':_0x5b4863['params']['id']}})[_0x1fe9('0x20')](handleEntityNotFound(_0x3d2410,null))[_0x1fe9('0x20')](saveUpdates(_0x5b4863['body'],null))[_0x1fe9('0x20')](respondWithResult(_0x3d2410,null))[_0x1fe9('0x53')](handleError(_0x3d2410,null));};exports[_0x1fe9('0x58')]=function(_0x479bad,_0x1de078){return db[_0x1fe9('0x3b')][_0x1fe9('0x56')]({'where':{'id':_0x479bad[_0x1fe9('0x55')]['id']}})['then'](handleEntityNotFound(_0x1de078,null))[_0x1fe9('0x20')](removeEntity(_0x1de078,null))[_0x1fe9('0x53')](handleError(_0x1de078,null));};exports[_0x1fe9('0x59')]=function(_0x577cd4,_0x47f00b){return db[_0x1fe9('0x3b')]['describe']()[_0x1fe9('0x20')](respondWithResult(_0x47f00b,null))[_0x1fe9('0x53')](handleError(_0x47f00b,null));};exports[_0x1fe9('0x5a')]=function(_0x3efe44,_0x4bd008){return db[_0x1fe9('0x3b')][_0x1fe9('0x5a')](_0x3efe44['body'])[_0x1fe9('0x20')](function(_0x59427b){if(_0x59427b){if(_0x59427b[_0x1fe9('0x5b')]===_0x1fe9('0x5c')&&!_0x59427b[_0x1fe9('0x5d')]){var _0x31def7,_0x5d90d9,_0xd0136a;if(_0x3efe44[_0x1fe9('0x57')]['to']){_0x5d90d9=_0x3efe44[_0x1fe9('0x57')]['to'][_0x1fe9('0x5e')](',')[0x0];}return db['MailAccount'][_0x1fe9('0x5f')]({'where':{'id':_0x59427b[_0x1fe9('0x60')]},'include':[{'model':db[_0x1fe9('0x61')],'as':_0x1fe9('0x62'),'include':[{'model':db[_0x1fe9('0x63')],'as':_0x1fe9('0x64'),'where':{'email':_0x5d90d9},'limit':0x1,'order':[['updatedAt','DESC']]}]},{'model':db[_0x1fe9('0x65')],'as':_0x1fe9('0x66'),'raw':!![]}]})[_0x1fe9('0x20')](function(_0x157bbb){_0x31def7=_0x157bbb;if(_0x31def7&&_0x31def7[_0x1fe9('0x66')]){var _0x4280c3={'tls':{'rejectUnauthorized':![]}};if(_[_0x1fe9('0x67')](_0x31def7[_0x1fe9('0x66')][_0x1fe9('0x68')])){_0x4280c3['host']=_0x31def7['Smtp'][_0x1fe9('0x69')];_0x4280c3[_0x1fe9('0x6a')]=_0x31def7[_0x1fe9('0x66')][_0x1fe9('0x6a')];_0x4280c3['secure']=_0x31def7['Smtp']['secure'];if(_0x31def7['Smtp'][_0x1fe9('0x6b')]){_0x4280c3[_0x1fe9('0x6c')]={'user':_0x31def7[_0x1fe9('0x66')][_0x1fe9('0x6d')],'pass':_0x31def7['Smtp'][_0x1fe9('0x6e')]};}}else{_0x4280c3[_0x1fe9('0x68')]=_0x31def7[_0x1fe9('0x66')]['service'];_0x4280c3[_0x1fe9('0x6c')]={'user':_0x31def7[_0x1fe9('0x66')][_0x1fe9('0x6d')],'pass':_0x31def7[_0x1fe9('0x66')][_0x1fe9('0x6e')]};_0x4280c3['secure']=_0x31def7[_0x1fe9('0x66')][_0x1fe9('0x6f')];}if(_0x3efe44[_0x1fe9('0x57')][_0x1fe9('0x70')]&&_0x3efe44[_0x1fe9('0x57')][_0x1fe9('0x70')]['length']){for(var _0xaf8b67=0x0;_0xaf8b67<_0x3efe44['body']['attachments'][_0x1fe9('0x47')];_0xaf8b67+=0x1){_0x3efe44[_0x1fe9('0x57')]['attachments'][_0xaf8b67]={'filename':_0x3efe44[_0x1fe9('0x57')][_0x1fe9('0x70')][_0xaf8b67][_0x1fe9('0x38')],'path':path[_0x1fe9('0x71')](config[_0x1fe9('0x72')],_0x1fe9('0x73'),_0x3efe44[_0x1fe9('0x57')]['attachments'][_0xaf8b67][_0x1fe9('0x74')])};}}_0xd0136a={'account':_0x4280c3,'message':_0x3efe44[_0x1fe9('0x57')]};return;}})[_0x1fe9('0x20')](function(){if(_0x31def7[_0x1fe9('0x62')]){if(_0x31def7[_0x1fe9('0x62')][_0x1fe9('0x64')][_0x1fe9('0x47')]){return _0x31def7['List'][_0x1fe9('0x64')][0x0];}else{return db[_0x1fe9('0x63')]['create'](_['defaults'](_0x3efe44[_0x1fe9('0x57')],{'firstName':_0x3efe44[_0x1fe9('0x57')]['to'],'email':_0x3efe44[_0x1fe9('0x57')]['to'],'phone':_0x3efe44[_0x1fe9('0x57')]['to'],'ListId':_0x31def7[_0x1fe9('0x75')]}));}}else{throw new Error(_0x1fe9('0x76'));}})[_0x1fe9('0x20')](function(){if(_0xd0136a){return respondWithRpcPromise(_0x1fe9('0x77'),_0x1fe9('0x78'),_0xd0136a,client9003)[_0x1fe9('0x20')](function(_0x22ae35){return _0x59427b['update']({'read':!![],'messageId':_0x22ae35[_0x1fe9('0x79')],'sentAt':moment()[_0x1fe9('0x7a')](_0x1fe9('0x7b'))});})[_0x1fe9('0x53')](function(_0x1de851){logger[_0x1fe9('0x24')]('%s',JSON[_0x1fe9('0x23')](_0x1de851));return _0x59427b;});}return _0x59427b;});}return _0x59427b;}})[_0x1fe9('0x20')](respondWithResult(_0x4bd008,0xc9))[_0x1fe9('0x53')](handleError(_0x4bd008,null));};var interaction_log=require('../../config/logger')('mail-interactions');exports[_0x1fe9('0x7c')]=function(_0x40a13a,_0x4b7371,_0x4977c9){var _0x3fcd54={'agent':{},'channel':_0x1fe9('0x7d')};if(_0x40a13a['body']['id']){delete _0x40a13a[_0x1fe9('0x57')]['id'];}_0x40a13a[_0x1fe9('0x57')]['read']=!![];_0x40a13a['body'][_0x1fe9('0x7e')]=moment()[_0x1fe9('0x7a')](_0x1fe9('0x7b'));_0x40a13a['body']['UserId']=_0x40a13a[_0x1fe9('0x57')][_0x1fe9('0x7f')]||_0x40a13a[_0x1fe9('0x6d')]['id'];_0x3fcd54[_0x1fe9('0x80')]['id']=_0x40a13a[_0x1fe9('0x57')][_0x1fe9('0x7f')];return db[_0x1fe9('0x3b')][_0x1fe9('0x56')]({'where':{'id':_0x40a13a[_0x1fe9('0x55')]['id'],'UserId':null},'include':[{'model':db[_0x1fe9('0x63')],'as':_0x1fe9('0x81')}]})[_0x1fe9('0x20')](handleEntityNotFound(_0x4b7371,null))['then'](saveUpdates(_0x40a13a['body'],null))[_0x1fe9('0x20')](function(_0xcefeaa){if(_0xcefeaa){_0x3fcd54[_0x1fe9('0x26')]=_0xcefeaa[_0x1fe9('0x82')]({'plain':!![]});return db[_0x1fe9('0x83')]['find']({'where':{'id':_0xcefeaa[_0x1fe9('0x84')]}});}return null;})['then'](handleEntityNotFound(_0x4b7371,null))[_0x1fe9('0x20')](function(_0x43c758){if(_0x43c758){return _0x43c758['update']({'UserId':_0x40a13a[_0x1fe9('0x57')][_0x1fe9('0x7f')],'read1stAt':_[_0x1fe9('0x67')](_0x43c758['read1stAt'])?moment()[_0x1fe9('0x7a')]('YYYY-MM-DD\x20HH:mm:ss'):undefined});}return null;})[_0x1fe9('0x20')](function(_0x22b8f4){if(_0x22b8f4){_0x3fcd54[_0x1fe9('0x85')]=_0x22b8f4[_0x1fe9('0x82')]({'plain':!![]});interaction_log[_0x1fe9('0x28')]('[MAILMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x40a13a[_0x1fe9('0x6d')]['id'],_0x40a13a[_0x1fe9('0x6d')][_0x1fe9('0x38')],_0x40a13a[_0x1fe9('0x6d')][_0x1fe9('0x86')],_0x3fcd54[_0x1fe9('0x85')]['id'],_0x40a13a['body']?JSON['stringify'](_0x40a13a['body']):_0x1fe9('0x87'));return respondWithRpcPromise(_0x1fe9('0x88'),_0x1fe9('0x89'),_0x3fcd54);}return null;})[_0x1fe9('0x20')](function(_0x428a87){return db[_0x1fe9('0x63')]['describe']()[_0x1fe9('0x20')](function(_0x2cafc8){var _0x26d403=[];for(var _0x210953=0x0;_0x210953=_0x3897a0){_0x36625a=_0x3897a0;_0x37d9ab=0xc8;}else{_0x37d9ab=0xce;}_0x2949e3[_0xb21e('0x28')](_0x37d9ab);return _0x2949e3[_0xb21e('0x2e')](_0xb21e('0x2f'),_0x23b85c+'-'+_0x36625a+'/'+_0x3897a0)['json'](_0x52ac80);}return null;};}function patchUpdates(_0x587935){return function(_0x3d3bce){try{jsonpatch[_0xb21e('0x30')](_0x3d3bce,_0x587935,!![]);}catch(_0xecd69c){return BPromise[_0xb21e('0x31')](_0xecd69c);}return _0x3d3bce[_0xb21e('0x32')]();};}function saveUpdates(_0x1eb047,_0x2e7f2d){return function(_0x34edc1){if(_0x34edc1){return _0x34edc1[_0xb21e('0x33')](_0x1eb047)[_0xb21e('0x34')](function(_0x3f90dd){return _0x3f90dd;});}return null;};}function removeEntity(_0x48584c,_0x279219){return function(_0x4e0c56){if(_0x4e0c56){return _0x4e0c56[_0xb21e('0x35')]()['then'](function(){_0x48584c[_0xb21e('0x28')](0xcc)[_0xb21e('0x36')]();});}};}function handleEntityNotFound(_0x46962e,_0x3b23fc){return function(_0x2d7b71){if(!_0x2d7b71){_0x46962e[_0xb21e('0x27')](0x194);}return _0x2d7b71;};}function handleError(_0x25938e,_0x341ebf){_0x341ebf=_0x341ebf||0x1f4;return function(_0x3f55cd){logger[_0xb21e('0x25')](_0x3f55cd[_0xb21e('0x37')]);if(_0x3f55cd['name']){delete _0x3f55cd[_0xb21e('0x38')];}_0x25938e[_0xb21e('0x28')](_0x341ebf)['send'](_0x3f55cd);};}exports[_0xb21e('0x39')]=function(_0x4600e7,_0x3489c4){var _0x4eea85={},_0xbe4f97={},_0x52a71c={'count':0x0,'rows':[]};var _0x1b1d4a=_[_0xb21e('0x3a')](db['MailMessage'][_0xb21e('0x3b')],function(_0x5de2b8){return{'name':_0x5de2b8['fieldName'],'type':_0x5de2b8[_0xb21e('0x3c')][_0xb21e('0x3d')]};});_0xbe4f97[_0xb21e('0x3e')]=_[_0xb21e('0x3a')](_0x1b1d4a,_0xb21e('0x38'));_0xbe4f97[_0xb21e('0x3f')]=_[_0xb21e('0x40')](_0x4600e7[_0xb21e('0x3f')]);_0xbe4f97['filters']=_['intersection'](_0xbe4f97[_0xb21e('0x3e')],_0xbe4f97[_0xb21e('0x3f')]);_0x4eea85[_0xb21e('0x41')]=_[_0xb21e('0x42')](_0xbe4f97['model'],qs[_0xb21e('0x43')](_0x4600e7['query'][_0xb21e('0x43')]));_0x4eea85['attributes']=_0x4eea85['attributes'][_0xb21e('0x44')]?_0x4eea85['attributes']:_0xbe4f97['model'];if(!_0x4600e7['query']['hasOwnProperty']('nolimit')){_0x4eea85[_0xb21e('0x2c')]=qs[_0xb21e('0x2c')](_0x4600e7['query'][_0xb21e('0x2c')]);_0x4eea85['offset']=qs[_0xb21e('0x2a')](_0x4600e7[_0xb21e('0x3f')]['offset']);}_0x4eea85[_0xb21e('0x45')]=qs[_0xb21e('0x46')](_0x4600e7[_0xb21e('0x3f')]['sort']);_0x4eea85[_0xb21e('0x47')]=qs[_0xb21e('0x48')](_[_0xb21e('0x49')](_0x4600e7[_0xb21e('0x3f')],_0xbe4f97[_0xb21e('0x48')]),_0x1b1d4a);if(_0x4600e7[_0xb21e('0x3f')]['filter']){_0x4eea85[_0xb21e('0x47')]=_[_0xb21e('0x4a')](_0x4eea85[_0xb21e('0x47')],{'$or':_['map'](_0x1b1d4a,function(_0x29b305){if(_0x29b305[_0xb21e('0x3c')]!=='VIRTUAL'){var _0x23a5cb={};_0x23a5cb[_0x29b305[_0xb21e('0x38')]]={'$like':'%'+_0x4600e7[_0xb21e('0x3f')][_0xb21e('0x4b')]+'%'};return _0x23a5cb;}})});}_0x4eea85=_[_0xb21e('0x4a')]({},_0x4eea85,_0x4600e7[_0xb21e('0x4c')]);var _0x394ffe={'where':_0x4eea85[_0xb21e('0x47')]};return db[_0xb21e('0x4d')][_0xb21e('0x2d')](_0x394ffe)[_0xb21e('0x34')](function(_0x5167e3){_0x52a71c[_0xb21e('0x2d')]=_0x5167e3;if(_0x4600e7['query'][_0xb21e('0x4e')]){_0x4eea85[_0xb21e('0x4f')]=[{'all':!![]}];}return db[_0xb21e('0x4d')]['findAll'](_0x4eea85);})[_0xb21e('0x34')](function(_0x2de38d){_0x52a71c[_0xb21e('0x50')]=_0x2de38d;return _0x52a71c;})[_0xb21e('0x34')](respondWithFilteredResult(_0x3489c4,_0x4eea85))[_0xb21e('0x51')](handleError(_0x3489c4,null));};exports[_0xb21e('0x52')]=function(_0x16eab9,_0x2a3608){var _0xa9c7e3={'raw':!![],'where':{'id':_0x16eab9[_0xb21e('0x53')]['id']}},_0x4486f3={};_0x4486f3[_0xb21e('0x3e')]=_['keys'](db[_0xb21e('0x4d')]['rawAttributes']);_0x4486f3[_0xb21e('0x3f')]=_[_0xb21e('0x40')](_0x16eab9['query']);_0x4486f3[_0xb21e('0x48')]=_['intersection'](_0x4486f3[_0xb21e('0x3e')],_0x4486f3[_0xb21e('0x3f')]);_0xa9c7e3['attributes']=_['intersection'](_0x4486f3[_0xb21e('0x3e')],qs[_0xb21e('0x43')](_0x16eab9[_0xb21e('0x3f')]['fields']));_0xa9c7e3['attributes']=_0xa9c7e3[_0xb21e('0x41')][_0xb21e('0x44')]?_0xa9c7e3[_0xb21e('0x41')]:_0x4486f3[_0xb21e('0x3e')];if(_0x16eab9[_0xb21e('0x3f')][_0xb21e('0x4e')]){_0xa9c7e3[_0xb21e('0x4f')]=[{'all':!![]}];}_0xa9c7e3=_[_0xb21e('0x4a')]({},_0xa9c7e3,_0x16eab9[_0xb21e('0x4c')]);return db[_0xb21e('0x4d')][_0xb21e('0x54')](_0xa9c7e3)[_0xb21e('0x34')](handleEntityNotFound(_0x2a3608,null))[_0xb21e('0x34')](respondWithResult(_0x2a3608,null))[_0xb21e('0x51')](handleError(_0x2a3608,null));};exports[_0xb21e('0x33')]=function(_0x40d8b7,_0x33212f){if(_0x40d8b7[_0xb21e('0x55')]['id']){delete _0x40d8b7[_0xb21e('0x55')]['id'];}return db[_0xb21e('0x4d')][_0xb21e('0x54')]({'where':{'id':_0x40d8b7[_0xb21e('0x53')]['id']}})[_0xb21e('0x34')](handleEntityNotFound(_0x33212f,null))[_0xb21e('0x34')](saveUpdates(_0x40d8b7['body'],null))[_0xb21e('0x34')](respondWithResult(_0x33212f,null))[_0xb21e('0x51')](handleError(_0x33212f,null));};exports[_0xb21e('0x35')]=function(_0x3fdd17,_0xa0c8ed){return db[_0xb21e('0x4d')][_0xb21e('0x54')]({'where':{'id':_0x3fdd17['params']['id']}})[_0xb21e('0x34')](handleEntityNotFound(_0xa0c8ed,null))[_0xb21e('0x34')](removeEntity(_0xa0c8ed,null))[_0xb21e('0x51')](handleError(_0xa0c8ed,null));};exports[_0xb21e('0x56')]=function(_0x58f0c1,_0x3821b2){return db[_0xb21e('0x4d')]['describe']()[_0xb21e('0x34')](respondWithResult(_0x3821b2,null))[_0xb21e('0x51')](handleError(_0x3821b2,null));};exports[_0xb21e('0x57')]=function(_0x3e3ea6,_0x34733b){return db[_0xb21e('0x4d')]['create'](_0x3e3ea6['body'])[_0xb21e('0x34')](function(_0x4ad21f){if(_0x4ad21f){if(_0x4ad21f[_0xb21e('0x58')]===_0xb21e('0x59')&&!_0x4ad21f['secret']){var _0x4f763d,_0x2e83fa,_0x4ebae7;if(_0x3e3ea6[_0xb21e('0x55')]['to']){_0x2e83fa=_0x3e3ea6[_0xb21e('0x55')]['to'][_0xb21e('0x5a')](',')[0x0];}return db['MailAccount']['findOne']({'where':{'id':_0x4ad21f[_0xb21e('0x5b')]},'include':[{'model':db['CmList'],'as':_0xb21e('0x5c'),'include':[{'model':db[_0xb21e('0x5d')],'as':_0xb21e('0x5e'),'where':{'email':_0x2e83fa},'limit':0x1,'order':[[_0xb21e('0x5f'),_0xb21e('0x60')]]}]},{'model':db[_0xb21e('0x61')],'as':_0xb21e('0x62'),'raw':!![]}]})[_0xb21e('0x34')](function(_0x173b92){_0x4f763d=_0x173b92;if(_0x4f763d&&_0x4f763d[_0xb21e('0x62')]){var _0xc67032={'tls':{'rejectUnauthorized':![]}};if(_['isNil'](_0x4f763d[_0xb21e('0x62')][_0xb21e('0x63')])){_0xc67032[_0xb21e('0x64')]=_0x4f763d[_0xb21e('0x62')][_0xb21e('0x64')];_0xc67032[_0xb21e('0x65')]=_0x4f763d[_0xb21e('0x62')][_0xb21e('0x65')];_0xc67032[_0xb21e('0x66')]=_0x4f763d[_0xb21e('0x62')][_0xb21e('0x66')];if(_0x4f763d['Smtp']['authentication']){_0xc67032['auth']={'user':_0x4f763d[_0xb21e('0x62')][_0xb21e('0x67')],'pass':_0x4f763d[_0xb21e('0x62')][_0xb21e('0x68')]};}}else{_0xc67032[_0xb21e('0x63')]=_0x4f763d['Smtp']['service'];_0xc67032[_0xb21e('0x69')]={'user':_0x4f763d['Smtp']['user'],'pass':_0x4f763d[_0xb21e('0x62')][_0xb21e('0x68')]};_0xc67032['secure']=_0x4f763d[_0xb21e('0x62')]['secure'];}if(_0x3e3ea6[_0xb21e('0x55')][_0xb21e('0x6a')]&&_0x3e3ea6[_0xb21e('0x55')]['attachments']['length']){for(var _0x27da83=0x0;_0x27da83<_0x3e3ea6[_0xb21e('0x55')][_0xb21e('0x6a')][_0xb21e('0x44')];_0x27da83+=0x1){_0x3e3ea6['body'][_0xb21e('0x6a')][_0x27da83]={'filename':_0x3e3ea6[_0xb21e('0x55')][_0xb21e('0x6a')][_0x27da83]['name'],'path':path[_0xb21e('0x6b')](config['root'],'server/files/attachments',_0x3e3ea6[_0xb21e('0x55')][_0xb21e('0x6a')][_0x27da83]['basename'])};}}_0x4ebae7={'account':_0xc67032,'message':_0x3e3ea6[_0xb21e('0x55')]};return;}})[_0xb21e('0x34')](function(){if(_0x4f763d[_0xb21e('0x5c')]){if(_0x4f763d[_0xb21e('0x5c')][_0xb21e('0x5e')][_0xb21e('0x44')]){return _0x4f763d[_0xb21e('0x5c')]['Contacts'][0x0];}else{return db[_0xb21e('0x5d')]['create'](_[_0xb21e('0x6c')](_0x3e3ea6['body'],{'firstName':_0x3e3ea6[_0xb21e('0x55')]['to'],'email':_0x3e3ea6[_0xb21e('0x55')]['to'],'phone':_0x3e3ea6[_0xb21e('0x55')]['to'],'ListId':_0x4f763d[_0xb21e('0x6d')]}));}}else{throw new Error(_0xb21e('0x6e'));}})[_0xb21e('0x34')](function(){if(_0x4ebae7){return respondWithRpcPromise('SendMail',_0xb21e('0x6f'),_0x4ebae7,client9003)[_0xb21e('0x34')](function(_0xe93162){return _0x4ad21f['update']({'read':!![],'messageId':_0xe93162[_0xb21e('0x70')],'sentAt':moment()[_0xb21e('0x71')](_0xb21e('0x72'))});})[_0xb21e('0x51')](function(_0x3b03e5){logger[_0xb21e('0x25')]('%s',JSON[_0xb21e('0x24')](_0x3b03e5));return _0x4ad21f;});}return _0x4ad21f;});}return _0x4ad21f;}})['then'](respondWithResult(_0x34733b,0xc9))[_0xb21e('0x51')](handleError(_0x34733b,null));};var interaction_log=require(_0xb21e('0x12'))(_0xb21e('0x73'));exports['accept']=function(_0x101a3d,_0x363605,_0x5d80f1){var _0x16bff7={'agent':{},'channel':_0xb21e('0x74')};if(_0x101a3d[_0xb21e('0x55')]['id']){delete _0x101a3d[_0xb21e('0x55')]['id'];}_0x101a3d[_0xb21e('0x55')][_0xb21e('0x75')]=!![];_0x101a3d[_0xb21e('0x55')][_0xb21e('0x76')]=moment()['format'](_0xb21e('0x72'));_0x101a3d[_0xb21e('0x55')][_0xb21e('0x77')]=_0x101a3d[_0xb21e('0x55')][_0xb21e('0x77')]||_0x101a3d[_0xb21e('0x67')]['id'];_0x16bff7[_0xb21e('0x78')]['id']=_0x101a3d[_0xb21e('0x55')][_0xb21e('0x77')];return db[_0xb21e('0x4d')]['find']({'where':{'id':_0x101a3d[_0xb21e('0x53')]['id'],'UserId':null},'include':[{'model':db[_0xb21e('0x5d')],'as':_0xb21e('0x79')}]})['then'](handleEntityNotFound(_0x363605,null))[_0xb21e('0x34')](saveUpdates(_0x101a3d[_0xb21e('0x55')],null))[_0xb21e('0x34')](function(_0x47793f){if(_0x47793f){_0x16bff7[_0xb21e('0x26')]=_0x47793f[_0xb21e('0x7a')]({'plain':!![]});return db[_0xb21e('0x7b')][_0xb21e('0x54')]({'where':{'id':_0x47793f[_0xb21e('0x7c')]}});}return null;})[_0xb21e('0x34')](handleEntityNotFound(_0x363605,null))[_0xb21e('0x34')](function(_0x7e8c06){if(_0x7e8c06){return _0x7e8c06[_0xb21e('0x33')]({'UserId':_0x101a3d['body'][_0xb21e('0x77')],'read1stAt':_[_0xb21e('0x7d')](_0x7e8c06[_0xb21e('0x7e')])?moment()[_0xb21e('0x71')](_0xb21e('0x72')):undefined});}return null;})[_0xb21e('0x34')](function(_0x27e54c){if(_0x27e54c){_0x16bff7[_0xb21e('0x7f')]=_0x27e54c[_0xb21e('0x7a')]({'plain':!![]});interaction_log[_0xb21e('0x1f')]('[MAILMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x101a3d[_0xb21e('0x67')]['id'],_0x101a3d['user']['name'],_0x101a3d['user'][_0xb21e('0x80')],_0x16bff7[_0xb21e('0x7f')]['id'],_0x101a3d['body']?JSON[_0xb21e('0x24')](_0x101a3d['body']):_0xb21e('0x81'));return respondWithRpcPromise(_0xb21e('0x82'),'acceptMessage',_0x16bff7);}return null;})[_0xb21e('0x34')](function(_0x59874d){return db[_0xb21e('0x5d')][_0xb21e('0x56')]()['then'](function(_0x112740){var _0x2b4ac3=[];for(var _0x4554de=0x0;_0x4554de=_0x452363){_0x31c906=_0x452363;_0x3f3c0=0xc8;}else{_0x3f3c0=0xce;}_0x39ecaa[_0xbea5('0x20')](_0x3f3c0);return _0x39ecaa[_0xbea5('0x26')](_0xbea5('0x27'),_0x4931c8+'-'+_0x31c906+'/'+_0x452363)[_0xbea5('0x21')](_0x495e9c);}return null;};}function patchUpdates(_0x2e8b3c){return function(_0x2f3867){try{jsonpatch['apply'](_0x2f3867,_0x2e8b3c,!![]);}catch(_0x485daa){return BPromise[_0xbea5('0x28')](_0x485daa);}return _0x2f3867[_0xbea5('0x29')]();};}function saveUpdates(_0x137cbc,_0x3422c0){return function(_0x4b58d6){if(_0x4b58d6){return _0x4b58d6[_0xbea5('0x2a')](_0x137cbc)[_0xbea5('0x2b')](function(_0x507b8c){return _0x507b8c;});}return null;};}function removeEntity(_0x1307ff,_0x810ef0){return function(_0x35a9bc){if(_0x35a9bc){return _0x35a9bc['destroy']()[_0xbea5('0x2b')](function(){var _0x112d81=_0x35a9bc[_0xbea5('0x2c')]({'plain':!![]});var _0x367928=_0xbea5('0x2d');return db[_0xbea5('0x2e')][_0xbea5('0x2f')]({'where':{'type':_0x367928,'resourceId':_0x112d81['id']}})[_0xbea5('0x2b')](function(){return _0x35a9bc;});})[_0xbea5('0x2b')](function(){_0x1307ff[_0xbea5('0x20')](0xcc)[_0xbea5('0x30')]();});}};}function handleEntityNotFound(_0x4c2196,_0x4984ef){return function(_0x503c9c){if(!_0x503c9c){_0x4c2196[_0xbea5('0x1f')](0x194);}return _0x503c9c;};}function handleError(_0x2392d0,_0xb43dcf){_0xb43dcf=_0xb43dcf||0x1f4;return function(_0x406efe){logger[_0xbea5('0x31')](_0x406efe[_0xbea5('0x32')]);if(_0x406efe[_0xbea5('0x33')]){delete _0x406efe['name'];}_0x2392d0[_0xbea5('0x20')](_0xb43dcf)['send'](_0x406efe);};}exports['index']=function(_0xa942e5,_0x5c1482){var _0x4aca82={},_0x136285={},_0xb2abdf={'count':0x0,'rows':[]};var _0x117896=_['map'](db[_0xbea5('0x34')][_0xbea5('0x35')],function(_0x47dc44){return{'name':_0x47dc44[_0xbea5('0x36')],'type':_0x47dc44[_0xbea5('0x37')]['key']};});_0x136285[_0xbea5('0x38')]=_['map'](_0x117896,_0xbea5('0x33'));_0x136285[_0xbea5('0x39')]=_[_0xbea5('0x3a')](_0xa942e5['query']);_0x136285['filters']=_['intersection'](_0x136285[_0xbea5('0x38')],_0x136285[_0xbea5('0x39')]);_0x4aca82['attributes']=_[_0xbea5('0x3b')](_0x136285[_0xbea5('0x38')],qs[_0xbea5('0x3c')](_0xa942e5[_0xbea5('0x39')]['fields']));_0x4aca82[_0xbea5('0x3d')]=_0x4aca82[_0xbea5('0x3d')][_0xbea5('0x3e')]?_0x4aca82[_0xbea5('0x3d')]:_0x136285['model'];if(!_0xa942e5[_0xbea5('0x39')][_0xbea5('0x3f')](_0xbea5('0x40'))){_0x4aca82['limit']=qs['limit'](_0xa942e5[_0xbea5('0x39')][_0xbea5('0x25')]);_0x4aca82[_0xbea5('0x22')]=qs[_0xbea5('0x22')](_0xa942e5[_0xbea5('0x39')]['offset']);}_0x4aca82['order']=qs[_0xbea5('0x41')](_0xa942e5['query'][_0xbea5('0x41')]);_0x4aca82[_0xbea5('0x42')]=qs[_0xbea5('0x43')](_[_0xbea5('0x44')](_0xa942e5[_0xbea5('0x39')],_0x136285[_0xbea5('0x43')]),_0x117896);if(_0xa942e5[_0xbea5('0x39')][_0xbea5('0x45')]){_0x4aca82[_0xbea5('0x42')]=_[_0xbea5('0x46')](_0x4aca82[_0xbea5('0x42')],{'$or':_[_0xbea5('0x47')](_0x117896,function(_0x1ef49f){if(_0x1ef49f[_0xbea5('0x37')]!==_0xbea5('0x48')){var _0x51dcec={};_0x51dcec[_0x1ef49f['name']]={'$like':'%'+_0xa942e5['query'][_0xbea5('0x45')]+'%'};return _0x51dcec;}})});}_0x4aca82=_[_0xbea5('0x46')]({},_0x4aca82,_0xa942e5[_0xbea5('0x49')]);var _0x111593={'where':_0x4aca82[_0xbea5('0x42')]};return db[_0xbea5('0x34')][_0xbea5('0x24')](_0x111593)[_0xbea5('0x2b')](function(_0x4b799a){_0xb2abdf[_0xbea5('0x24')]=_0x4b799a;if(_0xa942e5[_0xbea5('0x39')][_0xbea5('0x4a')]){_0x4aca82[_0xbea5('0x4b')]=[{'all':!![]}];}return db[_0xbea5('0x34')][_0xbea5('0x4c')](_0x4aca82);})[_0xbea5('0x2b')](function(_0xe7d2e3){_0xb2abdf['rows']=_0xe7d2e3;return _0xb2abdf;})[_0xbea5('0x2b')](respondWithFilteredResult(_0x5c1482,_0x4aca82))[_0xbea5('0x4d')](handleError(_0x5c1482,null));};exports[_0xbea5('0x4e')]=function(_0x385cd0,_0x46d194){var _0x436c4d={'raw':!![],'where':{'id':_0x385cd0['params']['id']}},_0x452ae6={};_0x452ae6[_0xbea5('0x38')]=_[_0xbea5('0x3a')](db[_0xbea5('0x34')][_0xbea5('0x35')]);_0x452ae6[_0xbea5('0x39')]=_[_0xbea5('0x3a')](_0x385cd0[_0xbea5('0x39')]);_0x452ae6[_0xbea5('0x43')]=_[_0xbea5('0x3b')](_0x452ae6['model'],_0x452ae6[_0xbea5('0x39')]);_0x436c4d[_0xbea5('0x3d')]=_[_0xbea5('0x3b')](_0x452ae6[_0xbea5('0x38')],qs[_0xbea5('0x3c')](_0x385cd0[_0xbea5('0x39')][_0xbea5('0x3c')]));_0x436c4d[_0xbea5('0x3d')]=_0x436c4d[_0xbea5('0x3d')][_0xbea5('0x3e')]?_0x436c4d[_0xbea5('0x3d')]:_0x452ae6[_0xbea5('0x38')];if(_0x385cd0[_0xbea5('0x39')][_0xbea5('0x4a')]){_0x436c4d[_0xbea5('0x4b')]=[{'all':!![]}];}_0x436c4d=_[_0xbea5('0x46')]({},_0x436c4d,_0x385cd0['options']);return db['MailQueue']['find'](_0x436c4d)[_0xbea5('0x2b')](handleEntityNotFound(_0x46d194,null))[_0xbea5('0x2b')](respondWithResult(_0x46d194,null))[_0xbea5('0x4d')](handleError(_0x46d194,null));};exports[_0xbea5('0x4f')]=function(_0x39f914,_0xc787cf){return db[_0xbea5('0x34')]['create'](_0x39f914['body'],{})[_0xbea5('0x2b')](function(_0x11e34b){var _0x353295=_0x39f914['user'][_0xbea5('0x2c')]({'plain':!![]});if(!_0x353295)throw new Error(_0xbea5('0x50'));if(_0x353295[_0xbea5('0x51')]===_0xbea5('0x52')){var _0x184a78=_0x11e34b[_0xbea5('0x2c')]({'plain':!![]});var _0x3ec750=_0xbea5('0x2d');return db[_0xbea5('0x53')][_0xbea5('0x54')]({'where':{'name':_0x3ec750,'userProfileId':_0x353295[_0xbea5('0x55')]},'raw':!![]})[_0xbea5('0x2b')](function(_0x4f81ce){if(_0x4f81ce&&_0x4f81ce[_0xbea5('0x56')]===0x0){return db['UserProfileResource'][_0xbea5('0x4f')]({'name':_0x184a78[_0xbea5('0x33')],'resourceId':_0x184a78['id'],'type':_0x4f81ce['name'],'sectionId':_0x4f81ce['id']},{})[_0xbea5('0x2b')](function(){return _0x11e34b;});}else{return _0x11e34b;}})[_0xbea5('0x4d')](function(_0x468417){logger[_0xbea5('0x31')](_0xbea5('0x57'),_0x468417);throw _0x468417;});}return _0x11e34b;})[_0xbea5('0x2b')](respondWithResult(_0xc787cf,0xc9))[_0xbea5('0x4d')](handleError(_0xc787cf,null));};exports[_0xbea5('0x2a')]=function(_0x344bc0,_0x50ab6c){if(_0x344bc0['body']['id']){delete _0x344bc0[_0xbea5('0x58')]['id'];}return db['MailQueue'][_0xbea5('0x54')]({'where':{'id':_0x344bc0['params']['id']}})[_0xbea5('0x2b')](handleEntityNotFound(_0x50ab6c,null))[_0xbea5('0x2b')](saveUpdates(_0x344bc0[_0xbea5('0x58')],null))['then'](respondWithResult(_0x50ab6c,null))[_0xbea5('0x4d')](handleError(_0x50ab6c,null));};exports[_0xbea5('0x2f')]=function(_0x1a83fb,_0x28e257){return db[_0xbea5('0x34')][_0xbea5('0x54')]({'where':{'id':_0x1a83fb[_0xbea5('0x59')]['id']}})[_0xbea5('0x2b')](handleEntityNotFound(_0x28e257,null))[_0xbea5('0x2b')](removeEntity(_0x28e257,null))[_0xbea5('0x4d')](handleError(_0x28e257,null));};exports[_0xbea5('0x5a')]=function(_0x16bbb8,_0x2f263e){return db['MailQueue'][_0xbea5('0x5a')]()['then'](respondWithResult(_0x2f263e,null))[_0xbea5('0x4d')](handleError(_0x2f263e,null));};exports[_0xbea5('0x5b')]=function(_0x199b5f,_0x5b8ba7,_0x48bd8c){var _0x387812={'raw':!![],'where':{}},_0x26694d={},_0xea3aa0;return db['MailQueue'][_0xbea5('0x5c')]({'where':{'id':_0x199b5f[_0xbea5('0x59')]['id']}})[_0xbea5('0x2b')](handleEntityNotFound(_0x5b8ba7,null))[_0xbea5('0x2b')](function(_0x157de5){if(_0x157de5){_0xea3aa0=_0x157de5['get']({'plain':!![]});_0x26694d['model']=_[_0xbea5('0x3a')](db[_0xbea5('0x5d')]['rawAttributes']);_0x26694d[_0xbea5('0x39')]=_['keys'](_0x199b5f[_0xbea5('0x39')]);_0x26694d[_0xbea5('0x43')]=_[_0xbea5('0x3b')](_0x26694d[_0xbea5('0x38')],_0x26694d[_0xbea5('0x39')]);_0x387812[_0xbea5('0x3d')]=_[_0xbea5('0x3b')](_0x26694d[_0xbea5('0x38')],qs['fields'](_0x199b5f['query'][_0xbea5('0x3c')]));_0x387812[_0xbea5('0x3d')]=_0x387812[_0xbea5('0x3d')][_0xbea5('0x3e')]?_0x387812[_0xbea5('0x3d')]:_0x26694d[_0xbea5('0x38')];if(!_0x199b5f[_0xbea5('0x39')]['hasOwnProperty'](_0xbea5('0x40'))){_0x387812['limit']=qs[_0xbea5('0x25')](_0x199b5f[_0xbea5('0x39')]['limit']);_0x387812['offset']=qs[_0xbea5('0x22')](_0x199b5f[_0xbea5('0x39')][_0xbea5('0x22')]);}_0x387812[_0xbea5('0x5e')]=qs[_0xbea5('0x41')](_0x199b5f[_0xbea5('0x39')][_0xbea5('0x41')]);_0x387812[_0xbea5('0x42')]=qs['filters'](_[_0xbea5('0x44')](_0x199b5f[_0xbea5('0x39')],_0x26694d[_0xbea5('0x43')]));_0x387812[_0xbea5('0x42')][_0xbea5('0x5f')]=_0x157de5['id'];if(_0x199b5f[_0xbea5('0x39')][_0xbea5('0x45')]){_0x387812[_0xbea5('0x42')]=_[_0xbea5('0x46')](_0x387812['where'],{'$or':_['map'](_0x387812[_0xbea5('0x3d')],function(_0x5f0f6a){var _0x327a76={};_0x327a76[_0x5f0f6a]={'$like':'%'+_0x199b5f[_0xbea5('0x39')][_0xbea5('0x45')]+'%'};return _0x327a76;})});}_0x387812=_[_0xbea5('0x46')]({},_0x387812,_0x199b5f['options']);return db[_0xbea5('0x5d')][_0xbea5('0x4c')](_0x387812);}})['then'](function(_0x20453f){if(_0x20453f){return db['User']['findAndCountAll']({'where':{'id':_['map'](_0x20453f,'UserId'),'role':'agent'},'attributes':['id',_0xbea5('0x33'),_0xbea5('0x60'),_0xbea5('0x61'),_0xbea5('0x62')]});}})[_0xbea5('0x2b')](function(_0x2a36f1){if(_0x2a36f1){return{'count':_0x2a36f1[_0xbea5('0x24')],'rows':_[_0xbea5('0x47')](_0x2a36f1[_0xbea5('0x63')],function(_0x3d84fb){return{'membername':_0x3d84fb['name'],'UserId':_0x3d84fb['id'],'queue_name':_0xea3aa0[_0xbea5('0x33')],'MailQueueId':_0xea3aa0['id'],'interface':util['format'](_0xbea5('0x64'),_0xbea5('0x65'),_0x3d84fb['name']),'penalty':0x0,'paused':_0x3d84fb[_0xbea5('0x60')],'createdAt':_0x3d84fb[_0xbea5('0x62')],'updatedAt':_0x3d84fb[_0xbea5('0x61')]};})};}else{return{'count':0x0,'rows':[]};}})['then'](respondWithFilteredResult(_0x5b8ba7,_0x387812))['catch'](handleError(_0x5b8ba7,null));};exports[_0xbea5('0x66')]=function(_0x7dec5d,_0x27ec79,_0x33001a){var _0x6279c={};var _0x29b5e4={};var _0x1d3491;var _0x528b71;return db['MailQueue']['findOne']({'where':{'id':_0x7dec5d[_0xbea5('0x59')]['id']}})[_0xbea5('0x2b')](handleEntityNotFound(_0x27ec79,null))[_0xbea5('0x2b')](function(_0x2f28b7){if(_0x2f28b7){_0x1d3491=_0x2f28b7;_0x29b5e4[_0xbea5('0x38')]=_[_0xbea5('0x3a')](db[_0xbea5('0x67')][_0xbea5('0x35')]);_0x29b5e4['query']=_[_0xbea5('0x3a')](_0x7dec5d[_0xbea5('0x39')]);_0x29b5e4[_0xbea5('0x43')]=_[_0xbea5('0x3b')](_0x29b5e4['model'],_0x29b5e4[_0xbea5('0x39')]);_0x6279c[_0xbea5('0x3d')]=_[_0xbea5('0x3b')](_0x29b5e4[_0xbea5('0x38')],qs[_0xbea5('0x3c')](_0x7dec5d['query'][_0xbea5('0x3c')]));_0x6279c[_0xbea5('0x3d')]=_0x6279c[_0xbea5('0x3d')][_0xbea5('0x3e')]?_0x6279c[_0xbea5('0x3d')]:_0x29b5e4[_0xbea5('0x38')];_0x6279c[_0xbea5('0x5e')]=qs[_0xbea5('0x41')](_0x7dec5d[_0xbea5('0x39')]['sort']);_0x6279c[_0xbea5('0x42')]=qs[_0xbea5('0x43')](_['pick'](_0x7dec5d['query'],_0x29b5e4[_0xbea5('0x43')]));if(_0x7dec5d[_0xbea5('0x39')]['filter']){_0x6279c[_0xbea5('0x42')]=_[_0xbea5('0x46')](_0x6279c[_0xbea5('0x42')],{'$or':_[_0xbea5('0x47')](_0x6279c[_0xbea5('0x3d')],function(_0x5bc81d){var _0x13860d={};_0x13860d[_0x5bc81d]={'$like':'%'+_0x7dec5d[_0xbea5('0x39')][_0xbea5('0x45')]+'%'};return _0x13860d;})});}_0x6279c=_[_0xbea5('0x46')]({},_0x6279c,_0x7dec5d[_0xbea5('0x49')]);return _0x1d3491['getTeams'](_0x6279c);}})['then'](function(_0x4ddd1a){if(_0x4ddd1a){_0x528b71=_0x4ddd1a[_0xbea5('0x3e')];if(!_0x7dec5d[_0xbea5('0x39')][_0xbea5('0x3f')](_0xbea5('0x40'))){_0x6279c[_0xbea5('0x25')]=qs[_0xbea5('0x25')](_0x7dec5d[_0xbea5('0x39')][_0xbea5('0x25')]);_0x6279c['offset']=qs[_0xbea5('0x22')](_0x7dec5d[_0xbea5('0x39')]['offset']);}return _0x1d3491[_0xbea5('0x66')](_0x6279c);}})[_0xbea5('0x2b')](function(_0x20db43){if(_0x20db43){return _0x20db43?{'count':_0x528b71,'rows':_0x20db43}:null;}})[_0xbea5('0x2b')](respondWithResult(_0x27ec79,null))['catch'](handleError(_0x27ec79,null));};exports[_0xbea5('0x68')]=function(_0x111805,_0x28f8a2,_0x25ad1c){var _0x35625c=_0x111805[_0xbea5('0x58')]['ids'];return db['Team'][_0xbea5('0x4c')]({'where':{'id':_0x35625c},'attributes':['id'],'include':[{'model':db['User'],'as':_0xbea5('0x69'),'attributes':['id','name',_0xbea5('0x6a'),_0xbea5('0x6b'),_0xbea5('0x6c')],'raw':!![]}]})[_0xbea5('0x2b')](function(_0x5df45d){if(_0x5df45d){var _0x366fac=_['flatMap'](_0x5df45d,function(_0x2d5c47){var _0x12721e=_0x2d5c47[_0xbea5('0x2c')]({'plain':!![]});return _0x12721e['Agents'];});return db[_0xbea5('0x34')][_0xbea5('0x54')]({'where':{'id':_0x111805[_0xbea5('0x59')]['id']}})[_0xbea5('0x2b')](function(_0x4bef50){return db[_0xbea5('0x6d')][_0xbea5('0x6e')](function(_0x37f641){return _0x4bef50[_0xbea5('0x68')](_0x35625c,{'transaction':_0x37f641})[_0xbea5('0x2b')](function(){return BPromise[_0xbea5('0x6f')](_0x366fac,function(_0x512068){return db[_0xbea5('0x5d')][_0xbea5('0x70')]({'where':{'UserId':_0x512068['id'],'MailQueueId':_0x111805[_0xbea5('0x59')]['id']},'transaction':_0x37f641});});})[_0xbea5('0x2b')](function(){_0x366fac['forEach'](function(_0x2f524c){socket[_0xbea5('0x71')](_0xbea5('0x72'),{'UserId':_0x2f524c['id'],'MailQueueId':_0x4bef50['id']});});});});});}})['then'](respondWithStatusCode(_0x28f8a2,null))[_0xbea5('0x4d')](handleError(_0x28f8a2,null));};exports[_0xbea5('0x73')]=function(_0x2706bb,_0x315ecc,_0x1794e3){return db[_0xbea5('0x67')][_0xbea5('0x4c')]({'where':{'id':_0x2706bb['query'][_0xbea5('0x74')]},'attributes':['id'],'include':[{'model':db[_0xbea5('0x75')],'as':'Agents','attributes':['id'],'raw':!![]}]})[_0xbea5('0x2b')](handleEntityNotFound(_0x315ecc,null))['then'](function(_0x250edc){var _0x336fdd=_[_0xbea5('0x47')](_0x250edc,'id');var _0x58a518=[];var _0x27c3d4=[];var _0x4d27ba=squel[_0xbea5('0x76')]();_0x4d27ba[_0xbea5('0x77')](_0xbea5('0x78'))[_0xbea5('0x79')]('team_has_mail_queues','tq')['join'](_0xbea5('0x7a'),'ut',_0xbea5('0x7b'))['where'](_0xbea5('0x7c'),_0x2706bb['params']['id']);for(var _0x2f8545=0x0;_0x2f8545<_0x250edc['length'];_0x2f8545+=0x1){let _0x4825f3=_0x250edc[_0x2f8545];for(var _0x22cf89=0x0;_0x22cf89<_0x4825f3[_0xbea5('0x69')][_0xbea5('0x3e')];_0x22cf89+=0x1){let _0x7188bc=_0x4825f3[_0xbea5('0x69')][_0x22cf89];var _0x8f0618=_0x4d27ba[_0xbea5('0x7d')]();_0x8f0618[_0xbea5('0x42')]('ut.UserId\x20=\x20?',_0x7188bc['id']);_0x27c3d4['push'](db[_0xbea5('0x6d')][_0xbea5('0x39')](_0x8f0618[_0xbea5('0x7e')](),{'type':db['sequelize'][_0xbea5('0x7f')][_0xbea5('0x80')]})[_0xbea5('0x2b')](function(_0x298d63){if(_0x298d63[_0xbea5('0x3e')]===0x1){return _0x7188bc['id'];}else{var _0x17f73c=_['every'](_[_0xbea5('0x47')](_0x298d63,'TeamId'),function(_0x957da9){return _[_0xbea5('0x81')](_0x336fdd,_0x957da9);});if(_0x17f73c){return _0x7188bc['id'];}}}));}}return BPromise[_0xbea5('0x82')](_0x27c3d4)[_0xbea5('0x2b')](function(_0x1ca600){_0x58a518=_(_0x58a518)[_0xbea5('0x83')](_0x1ca600)[_0xbea5('0x84')]()[_0xbea5('0x85')]();return db[_0xbea5('0x34')]['find']({'where':{'id':_0x2706bb['params']['id']}})[_0xbea5('0x2b')](function(_0x2d7662){return db[_0xbea5('0x6d')][_0xbea5('0x6e')](function(_0x35b5f4){return _0x2d7662['removeTeams'](_0x2706bb[_0xbea5('0x39')][_0xbea5('0x74')],{'transaction':_0x35b5f4})[_0xbea5('0x2b')](function(){if(!_[_0xbea5('0x86')](_0x58a518)){return _0x2d7662[_0xbea5('0x87')](_0x58a518,{'transaction':_0x35b5f4});}})['then'](function(){_0x58a518['forEach'](function(_0x61b385){socket[_0xbea5('0x71')](_0xbea5('0x88'),{'UserId':_0x61b385,'MailQueueId':_0x2d7662['id']});});});});});});})['then'](respondWithStatusCode(_0x315ecc,null))[_0xbea5('0x4d')](handleError(_0x315ecc,null));};exports[_0xbea5('0x89')]=function(_0x2c1fa8,_0x45449b,_0x50a22c){return db[_0xbea5('0x34')][_0xbea5('0x54')]({'where':{'id':_0x2c1fa8[_0xbea5('0x59')]['id']}})['then'](handleEntityNotFound(_0x45449b,null))['then'](function(_0x446065){if(_0x446065){return _0x446065[_0xbea5('0x89')](_0x2c1fa8[_0xbea5('0x58')][_0xbea5('0x74')],_[_0xbea5('0x8a')](_0x2c1fa8[_0xbea5('0x58')],[_0xbea5('0x74'),'id'])||{})[_0xbea5('0x8b')](function(_0x34b812){for(var _0x1ff79b=0x0;_0x1ff79b<_0x2c1fa8[_0xbea5('0x58')][_0xbea5('0x74')][_0xbea5('0x3e')];_0x1ff79b+=0x1){socket['emit'](_0xbea5('0x72'),{'UserId':_0x2c1fa8[_0xbea5('0x58')][_0xbea5('0x74')][_0x1ff79b],'MailQueueId':_0x2c1fa8[_0xbea5('0x59')]['id']});}return _0x34b812;});}})[_0xbea5('0x2b')](respondWithResult(_0x45449b,null))[_0xbea5('0x4d')](handleError(_0x45449b,null));};exports[_0xbea5('0x87')]=function(_0x3b309d,_0x3e5df6,_0x138178){return db['MailQueue'][_0xbea5('0x54')]({'where':{'id':_0x3b309d[_0xbea5('0x59')]['id']}})['then'](handleEntityNotFound(_0x3e5df6,null))['then'](function(_0x35818d){if(_0x35818d){return _0x35818d[_0xbea5('0x87')](_0x3b309d[_0xbea5('0x39')][_0xbea5('0x74')])[_0xbea5('0x2b')](function(){if(_[_0xbea5('0x8c')](_0x3b309d[_0xbea5('0x39')]['ids'])){for(var _0x15c101=0x0;_0x15c101<_0x3b309d[_0xbea5('0x39')][_0xbea5('0x74')][_0xbea5('0x3e')];_0x15c101+=0x1){socket['emit'](_0xbea5('0x88'),{'UserId':Number(_0x3b309d[_0xbea5('0x39')]['ids'][_0x15c101]),'MailQueueId':Number(_0x3b309d[_0xbea5('0x59')]['id'])});}}else{socket[_0xbea5('0x71')](_0xbea5('0x88'),{'UserId':Number(_0x3b309d[_0xbea5('0x39')]['ids']),'MailQueueId':Number(_0x3b309d['params']['id'])});}});}})['then'](respondWithStatusCode(_0x3e5df6,null))['catch'](handleError(_0x3e5df6,null));};exports[_0xbea5('0x8d')]=function(_0x42a18b,_0x3ce6b9,_0x2f992d){var _0x5d920f={};var _0x2f91a4={};var _0x15b990;var _0x3abc9b;return db[_0xbea5('0x34')][_0xbea5('0x5c')]({'where':{'id':_0x42a18b[_0xbea5('0x59')]['id']}})[_0xbea5('0x2b')](handleEntityNotFound(_0x3ce6b9,null))[_0xbea5('0x2b')](function(_0x2f810a){if(_0x2f810a){_0x15b990=_0x2f810a;_0x2f91a4[_0xbea5('0x38')]=_['keys'](db[_0xbea5('0x75')][_0xbea5('0x35')]);_0x2f91a4[_0xbea5('0x39')]=_[_0xbea5('0x3a')](_0x42a18b[_0xbea5('0x39')]);_0x2f91a4['filters']=_[_0xbea5('0x3b')](_0x2f91a4['model'],_0x2f91a4['query']);_0x5d920f[_0xbea5('0x3d')]=_[_0xbea5('0x3b')](_0x2f91a4['model'],qs[_0xbea5('0x3c')](_0x42a18b['query'][_0xbea5('0x3c')]));_0x5d920f[_0xbea5('0x3d')]=_0x5d920f[_0xbea5('0x3d')]['length']?_0x5d920f[_0xbea5('0x3d')]:_0x2f91a4[_0xbea5('0x38')];_0x5d920f['order']=qs[_0xbea5('0x41')](_0x42a18b[_0xbea5('0x39')][_0xbea5('0x41')]);_0x5d920f[_0xbea5('0x42')]=qs[_0xbea5('0x43')](_[_0xbea5('0x44')](_0x42a18b[_0xbea5('0x39')],_0x2f91a4['filters']));if(_0x42a18b[_0xbea5('0x39')][_0xbea5('0x45')]){_0x5d920f[_0xbea5('0x42')]=_[_0xbea5('0x46')](_0x5d920f['where'],{'$or':_[_0xbea5('0x47')](_0x5d920f[_0xbea5('0x3d')],function(_0x304d1b){var _0x22dab1={};_0x22dab1[_0x304d1b]={'$like':'%'+_0x42a18b['query'][_0xbea5('0x45')]+'%'};return _0x22dab1;})});}_0x5d920f=_[_0xbea5('0x46')]({},_0x5d920f,_0x42a18b[_0xbea5('0x49')]);return _0x15b990[_0xbea5('0x8d')](_0x5d920f);}})['then'](function(_0x569fb8){if(_0x569fb8){_0x3abc9b=_0x569fb8[_0xbea5('0x3e')];if(!_0x42a18b[_0xbea5('0x39')]['hasOwnProperty']('nolimit')){_0x5d920f[_0xbea5('0x25')]=qs['limit'](_0x42a18b[_0xbea5('0x39')][_0xbea5('0x25')]);_0x5d920f[_0xbea5('0x22')]=qs[_0xbea5('0x22')](_0x42a18b[_0xbea5('0x39')]['offset']);}return _0x15b990[_0xbea5('0x8d')](_0x5d920f);}})[_0xbea5('0x2b')](function(_0x59b025){if(_0x59b025){return _0x59b025?{'count':_0x3abc9b,'rows':_0x59b025}:null;}})[_0xbea5('0x2b')](respondWithResult(_0x3ce6b9,null))[_0xbea5('0x4d')](handleError(_0x3ce6b9,null));}; \ No newline at end of file +var _0x0d5d=['isEmpty','removeAgents','userMailQueue:remove','addAgents','omit','userMailQueue:save','isArray','getAgents','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','redis','localhost','socket.io-emitter','./mailQueue.socket','register','sendStatus','end','status','json','offset','limit','undefined','count','set','Content-Range','apply','reject','then','get','MailQueues','UserProfileResource','destroy','error','stack','name','index','MailQueue','rawAttributes','fieldName','key','model','map','query','keys','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','type','VIRTUAL','includeAll','findAll','rows','catch','show','params','length','options','find','create','user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','body','describe','UserMailQueue','User','findAndCountAll','agent','mailPause','createdAt','format','%s/%s','SIP','updatedAt','getTeams','findOne','Team','addTeams','ids','Agents','voicePause','interface','transaction','each','findOrCreate','forEach','emit','removeTeams','select','tq.TeamId','from','team_has_mail_queues','join','ut.TeamId\x20=\x20tq.TeamId','MailQueueId\x20=\x20?','clone','sequelize','toString','QueryTypes','SELECT','every','TeamId','includes','union','compact','value'];(function(_0x32351e,_0x25d53a){var _0xcc55=function(_0x1ce0dd){while(--_0x1ce0dd){_0x32351e['push'](_0x32351e['shift']());}};_0xcc55(++_0x25d53a);}(_0x0d5d,0x97));var _0xd0d5=function(_0x54d799,_0x4aaeab){_0x54d799=_0x54d799-0x0;var _0x3d68c8=_0x0d5d[_0x54d799];return _0x3d68c8;};'use strict';var emlformat=require(_0xd0d5('0x0'));var rimraf=require(_0xd0d5('0x1'));var zipdir=require(_0xd0d5('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xd0d5('0x3'));var moment=require(_0xd0d5('0x4'));var BPromise=require(_0xd0d5('0x5'));var Mustache=require(_0xd0d5('0x6'));var util=require(_0xd0d5('0x7'));var path=require(_0xd0d5('0x8'));var sox=require(_0xd0d5('0x9'));var csv=require(_0xd0d5('0xa'));var ejs=require(_0xd0d5('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xd0d5('0xc'));var squel=require(_0xd0d5('0xd'));var crypto=require(_0xd0d5('0xe'));var jsforce=require('jsforce');var deskjs=require(_0xd0d5('0xf'));var toCsv=require('to-csv');var querystring=require(_0xd0d5('0x10'));var Papa=require(_0xd0d5('0x11'));var Redis=require(_0xd0d5('0x12'));var authService=require('../../components/auth/service');var qs=require(_0xd0d5('0x13'));var as=require(_0xd0d5('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xd0d5('0x15'))(_0xd0d5('0x16'));var utils=require('../../config/utils');var config=require(_0xd0d5('0x17'));var licenseUtil=require(_0xd0d5('0x18'));var db=require(_0xd0d5('0x19'))['db'];config[_0xd0d5('0x1a')]=_['defaults'](config[_0xd0d5('0x1a')],{'host':_0xd0d5('0x1b'),'port':0x18eb});var socket=require(_0xd0d5('0x1c'))(new Redis(config['redis']));require(_0xd0d5('0x1d'))[_0xd0d5('0x1e')](socket);function respondWithStatusCode(_0x2b9f5e,_0x490d3e){_0x490d3e=_0x490d3e||0xcc;return function(_0x430832){if(_0x430832){return _0x2b9f5e[_0xd0d5('0x1f')](_0x490d3e);}return _0x2b9f5e['status'](_0x490d3e)[_0xd0d5('0x20')]();};}function respondWithResult(_0x192990,_0x1c3348){_0x1c3348=_0x1c3348||0xc8;return function(_0x50d64b){if(_0x50d64b){return _0x192990[_0xd0d5('0x21')](_0x1c3348)[_0xd0d5('0x22')](_0x50d64b);}};}function respondWithFilteredResult(_0x58a49a,_0x33bc53){return function(_0x14e7c2){if(_0x14e7c2){var _0x43e4ed=typeof _0x33bc53[_0xd0d5('0x23')]==='undefined'&&typeof _0x33bc53[_0xd0d5('0x24')]===_0xd0d5('0x25');var _0x41533b=_0x14e7c2['count'];var _0x4a4f79=_0x43e4ed?0x0:_0x33bc53[_0xd0d5('0x23')];var _0x170346=_0x43e4ed?_0x14e7c2[_0xd0d5('0x26')]:_0x33bc53[_0xd0d5('0x23')]+_0x33bc53['limit'];var _0x4de73e;if(_0x170346>=_0x41533b){_0x170346=_0x41533b;_0x4de73e=0xc8;}else{_0x4de73e=0xce;}_0x58a49a['status'](_0x4de73e);return _0x58a49a[_0xd0d5('0x27')](_0xd0d5('0x28'),_0x4a4f79+'-'+_0x170346+'/'+_0x41533b)[_0xd0d5('0x22')](_0x14e7c2);}return null;};}function patchUpdates(_0x2daf69){return function(_0x464392){try{jsonpatch[_0xd0d5('0x29')](_0x464392,_0x2daf69,!![]);}catch(_0x4ba26b){return BPromise[_0xd0d5('0x2a')](_0x4ba26b);}return _0x464392['save']();};}function saveUpdates(_0xe8d19c,_0x3df217){return function(_0x44ce39){if(_0x44ce39){return _0x44ce39['update'](_0xe8d19c)[_0xd0d5('0x2b')](function(_0x243218){return _0x243218;});}return null;};}function removeEntity(_0x5b506d,_0x15342f){return function(_0x321752){if(_0x321752){return _0x321752['destroy']()['then'](function(){var _0x4e0a53=_0x321752[_0xd0d5('0x2c')]({'plain':!![]});var _0x377c4e=_0xd0d5('0x2d');return db[_0xd0d5('0x2e')][_0xd0d5('0x2f')]({'where':{'type':_0x377c4e,'resourceId':_0x4e0a53['id']}})[_0xd0d5('0x2b')](function(){return _0x321752;});})[_0xd0d5('0x2b')](function(){_0x5b506d[_0xd0d5('0x21')](0xcc)[_0xd0d5('0x20')]();});}};}function handleEntityNotFound(_0x588d79,_0x2a7bc6){return function(_0x1e8c71){if(!_0x1e8c71){_0x588d79[_0xd0d5('0x1f')](0x194);}return _0x1e8c71;};}function handleError(_0x5c5dd2,_0x57a593){_0x57a593=_0x57a593||0x1f4;return function(_0x64c89f){logger[_0xd0d5('0x30')](_0x64c89f[_0xd0d5('0x31')]);if(_0x64c89f[_0xd0d5('0x32')]){delete _0x64c89f[_0xd0d5('0x32')];}_0x5c5dd2[_0xd0d5('0x21')](_0x57a593)['send'](_0x64c89f);};}exports[_0xd0d5('0x33')]=function(_0x1f9dd2,_0x274480){var _0x58e9f2={},_0x10e3ea={},_0x535368={'count':0x0,'rows':[]};var _0x27b908=_['map'](db[_0xd0d5('0x34')][_0xd0d5('0x35')],function(_0x59fd2e){return{'name':_0x59fd2e[_0xd0d5('0x36')],'type':_0x59fd2e['type'][_0xd0d5('0x37')]};});_0x10e3ea[_0xd0d5('0x38')]=_[_0xd0d5('0x39')](_0x27b908,_0xd0d5('0x32'));_0x10e3ea[_0xd0d5('0x3a')]=_[_0xd0d5('0x3b')](_0x1f9dd2[_0xd0d5('0x3a')]);_0x10e3ea[_0xd0d5('0x3c')]=_[_0xd0d5('0x3d')](_0x10e3ea[_0xd0d5('0x38')],_0x10e3ea['query']);_0x58e9f2[_0xd0d5('0x3e')]=_[_0xd0d5('0x3d')](_0x10e3ea['model'],qs['fields'](_0x1f9dd2[_0xd0d5('0x3a')][_0xd0d5('0x3f')]));_0x58e9f2['attributes']=_0x58e9f2[_0xd0d5('0x3e')]['length']?_0x58e9f2[_0xd0d5('0x3e')]:_0x10e3ea[_0xd0d5('0x38')];if(!_0x1f9dd2[_0xd0d5('0x3a')][_0xd0d5('0x40')](_0xd0d5('0x41'))){_0x58e9f2[_0xd0d5('0x24')]=qs[_0xd0d5('0x24')](_0x1f9dd2[_0xd0d5('0x3a')]['limit']);_0x58e9f2[_0xd0d5('0x23')]=qs[_0xd0d5('0x23')](_0x1f9dd2['query']['offset']);}_0x58e9f2[_0xd0d5('0x42')]=qs[_0xd0d5('0x43')](_0x1f9dd2['query'][_0xd0d5('0x43')]);_0x58e9f2[_0xd0d5('0x44')]=qs[_0xd0d5('0x3c')](_[_0xd0d5('0x45')](_0x1f9dd2[_0xd0d5('0x3a')],_0x10e3ea[_0xd0d5('0x3c')]),_0x27b908);if(_0x1f9dd2[_0xd0d5('0x3a')][_0xd0d5('0x46')]){_0x58e9f2[_0xd0d5('0x44')]=_[_0xd0d5('0x47')](_0x58e9f2[_0xd0d5('0x44')],{'$or':_[_0xd0d5('0x39')](_0x27b908,function(_0x20fff4){if(_0x20fff4[_0xd0d5('0x48')]!==_0xd0d5('0x49')){var _0x18618e={};_0x18618e[_0x20fff4[_0xd0d5('0x32')]]={'$like':'%'+_0x1f9dd2[_0xd0d5('0x3a')][_0xd0d5('0x46')]+'%'};return _0x18618e;}})});}_0x58e9f2=_['merge']({},_0x58e9f2,_0x1f9dd2['options']);var _0x4e7e3a={'where':_0x58e9f2[_0xd0d5('0x44')]};return db[_0xd0d5('0x34')][_0xd0d5('0x26')](_0x4e7e3a)[_0xd0d5('0x2b')](function(_0x282864){_0x535368[_0xd0d5('0x26')]=_0x282864;if(_0x1f9dd2[_0xd0d5('0x3a')][_0xd0d5('0x4a')]){_0x58e9f2['include']=[{'all':!![]}];}return db[_0xd0d5('0x34')][_0xd0d5('0x4b')](_0x58e9f2);})[_0xd0d5('0x2b')](function(_0x5cce51){_0x535368[_0xd0d5('0x4c')]=_0x5cce51;return _0x535368;})['then'](respondWithFilteredResult(_0x274480,_0x58e9f2))[_0xd0d5('0x4d')](handleError(_0x274480,null));};exports[_0xd0d5('0x4e')]=function(_0x5c1801,_0x306f29){var _0x26f0af={'raw':!![],'where':{'id':_0x5c1801[_0xd0d5('0x4f')]['id']}},_0x33fedb={};_0x33fedb[_0xd0d5('0x38')]=_[_0xd0d5('0x3b')](db['MailQueue'][_0xd0d5('0x35')]);_0x33fedb[_0xd0d5('0x3a')]=_[_0xd0d5('0x3b')](_0x5c1801[_0xd0d5('0x3a')]);_0x33fedb[_0xd0d5('0x3c')]=_[_0xd0d5('0x3d')](_0x33fedb['model'],_0x33fedb[_0xd0d5('0x3a')]);_0x26f0af[_0xd0d5('0x3e')]=_['intersection'](_0x33fedb[_0xd0d5('0x38')],qs['fields'](_0x5c1801[_0xd0d5('0x3a')][_0xd0d5('0x3f')]));_0x26f0af[_0xd0d5('0x3e')]=_0x26f0af['attributes'][_0xd0d5('0x50')]?_0x26f0af[_0xd0d5('0x3e')]:_0x33fedb[_0xd0d5('0x38')];if(_0x5c1801[_0xd0d5('0x3a')][_0xd0d5('0x4a')]){_0x26f0af['include']=[{'all':!![]}];}_0x26f0af=_[_0xd0d5('0x47')]({},_0x26f0af,_0x5c1801[_0xd0d5('0x51')]);return db[_0xd0d5('0x34')][_0xd0d5('0x52')](_0x26f0af)['then'](handleEntityNotFound(_0x306f29,null))[_0xd0d5('0x2b')](respondWithResult(_0x306f29,null))[_0xd0d5('0x4d')](handleError(_0x306f29,null));};exports[_0xd0d5('0x53')]=function(_0x5cddd0,_0x508527){return db[_0xd0d5('0x34')][_0xd0d5('0x53')](_0x5cddd0['body'],{})[_0xd0d5('0x2b')](function(_0x2484e1){var _0x39585f=_0x5cddd0[_0xd0d5('0x54')]['get']({'plain':!![]});if(!_0x39585f)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x39585f[_0xd0d5('0x55')]===_0xd0d5('0x54')){var _0x1e2a0f=_0x2484e1[_0xd0d5('0x2c')]({'plain':!![]});var _0x3102ad=_0xd0d5('0x2d');return db[_0xd0d5('0x56')]['find']({'where':{'name':_0x3102ad,'userProfileId':_0x39585f[_0xd0d5('0x57')]},'raw':!![]})[_0xd0d5('0x2b')](function(_0x1eca03){if(_0x1eca03&&_0x1eca03[_0xd0d5('0x58')]===0x0){return db[_0xd0d5('0x2e')][_0xd0d5('0x53')]({'name':_0x1e2a0f[_0xd0d5('0x32')],'resourceId':_0x1e2a0f['id'],'type':_0x1eca03[_0xd0d5('0x32')],'sectionId':_0x1eca03['id']},{})[_0xd0d5('0x2b')](function(){return _0x2484e1;});}else{return _0x2484e1;}})[_0xd0d5('0x4d')](function(_0x464a48){logger[_0xd0d5('0x30')](_0xd0d5('0x59'),_0x464a48);throw _0x464a48;});}return _0x2484e1;})[_0xd0d5('0x2b')](respondWithResult(_0x508527,0xc9))['catch'](handleError(_0x508527,null));};exports[_0xd0d5('0x5a')]=function(_0x59350f,_0x52bb25){if(_0x59350f[_0xd0d5('0x5b')]['id']){delete _0x59350f[_0xd0d5('0x5b')]['id'];}return db['MailQueue'][_0xd0d5('0x52')]({'where':{'id':_0x59350f[_0xd0d5('0x4f')]['id']}})[_0xd0d5('0x2b')](handleEntityNotFound(_0x52bb25,null))['then'](saveUpdates(_0x59350f[_0xd0d5('0x5b')],null))['then'](respondWithResult(_0x52bb25,null))[_0xd0d5('0x4d')](handleError(_0x52bb25,null));};exports[_0xd0d5('0x2f')]=function(_0x32f840,_0x23b15a){return db[_0xd0d5('0x34')][_0xd0d5('0x52')]({'where':{'id':_0x32f840[_0xd0d5('0x4f')]['id']}})[_0xd0d5('0x2b')](handleEntityNotFound(_0x23b15a,null))[_0xd0d5('0x2b')](removeEntity(_0x23b15a,null))[_0xd0d5('0x4d')](handleError(_0x23b15a,null));};exports[_0xd0d5('0x5c')]=function(_0x4a5bff,_0x55dd8a){return db['MailQueue'][_0xd0d5('0x5c')]()['then'](respondWithResult(_0x55dd8a,null))[_0xd0d5('0x4d')](handleError(_0x55dd8a,null));};exports['getMembers']=function(_0x1fb5d3,_0x7b49fb,_0x4a0d94){var _0x2c76b6={'raw':!![],'where':{}},_0x1a8822={},_0x2752e7;return db[_0xd0d5('0x34')]['findOne']({'where':{'id':_0x1fb5d3['params']['id']}})[_0xd0d5('0x2b')](handleEntityNotFound(_0x7b49fb,null))[_0xd0d5('0x2b')](function(_0x4bcb98){if(_0x4bcb98){_0x2752e7=_0x4bcb98[_0xd0d5('0x2c')]({'plain':!![]});_0x1a8822[_0xd0d5('0x38')]=_['keys'](db[_0xd0d5('0x5d')][_0xd0d5('0x35')]);_0x1a8822[_0xd0d5('0x3a')]=_[_0xd0d5('0x3b')](_0x1fb5d3[_0xd0d5('0x3a')]);_0x1a8822[_0xd0d5('0x3c')]=_[_0xd0d5('0x3d')](_0x1a8822[_0xd0d5('0x38')],_0x1a8822[_0xd0d5('0x3a')]);_0x2c76b6['attributes']=_[_0xd0d5('0x3d')](_0x1a8822[_0xd0d5('0x38')],qs[_0xd0d5('0x3f')](_0x1fb5d3[_0xd0d5('0x3a')][_0xd0d5('0x3f')]));_0x2c76b6['attributes']=_0x2c76b6['attributes'][_0xd0d5('0x50')]?_0x2c76b6[_0xd0d5('0x3e')]:_0x1a8822[_0xd0d5('0x38')];if(!_0x1fb5d3[_0xd0d5('0x3a')][_0xd0d5('0x40')](_0xd0d5('0x41'))){_0x2c76b6['limit']=qs['limit'](_0x1fb5d3[_0xd0d5('0x3a')][_0xd0d5('0x24')]);_0x2c76b6[_0xd0d5('0x23')]=qs[_0xd0d5('0x23')](_0x1fb5d3[_0xd0d5('0x3a')][_0xd0d5('0x23')]);}_0x2c76b6['order']=qs[_0xd0d5('0x43')](_0x1fb5d3['query'][_0xd0d5('0x43')]);_0x2c76b6[_0xd0d5('0x44')]=qs['filters'](_['pick'](_0x1fb5d3[_0xd0d5('0x3a')],_0x1a8822[_0xd0d5('0x3c')]));_0x2c76b6['where']['MailQueueId']=_0x4bcb98['id'];if(_0x1fb5d3[_0xd0d5('0x3a')][_0xd0d5('0x46')]){_0x2c76b6[_0xd0d5('0x44')]=_[_0xd0d5('0x47')](_0x2c76b6['where'],{'$or':_[_0xd0d5('0x39')](_0x2c76b6[_0xd0d5('0x3e')],function(_0x2c8fa1){var _0x30b89a={};_0x30b89a[_0x2c8fa1]={'$like':'%'+_0x1fb5d3[_0xd0d5('0x3a')][_0xd0d5('0x46')]+'%'};return _0x30b89a;})});}_0x2c76b6=_[_0xd0d5('0x47')]({},_0x2c76b6,_0x1fb5d3[_0xd0d5('0x51')]);return db[_0xd0d5('0x5d')][_0xd0d5('0x4b')](_0x2c76b6);}})[_0xd0d5('0x2b')](function(_0x242e57){if(_0x242e57){return db[_0xd0d5('0x5e')][_0xd0d5('0x5f')]({'where':{'id':_[_0xd0d5('0x39')](_0x242e57,'UserId'),'role':_0xd0d5('0x60')},'attributes':['id',_0xd0d5('0x32'),_0xd0d5('0x61'),'updatedAt',_0xd0d5('0x62')]});}})['then'](function(_0x3a3358){if(_0x3a3358){return{'count':_0x3a3358[_0xd0d5('0x26')],'rows':_[_0xd0d5('0x39')](_0x3a3358[_0xd0d5('0x4c')],function(_0x10ef55){return{'membername':_0x10ef55[_0xd0d5('0x32')],'UserId':_0x10ef55['id'],'queue_name':_0x2752e7[_0xd0d5('0x32')],'MailQueueId':_0x2752e7['id'],'interface':util[_0xd0d5('0x63')](_0xd0d5('0x64'),_0xd0d5('0x65'),_0x10ef55[_0xd0d5('0x32')]),'penalty':0x0,'paused':_0x10ef55[_0xd0d5('0x61')],'createdAt':_0x10ef55['createdAt'],'updatedAt':_0x10ef55[_0xd0d5('0x66')]};})};}else{return{'count':0x0,'rows':[]};}})[_0xd0d5('0x2b')](respondWithFilteredResult(_0x7b49fb,_0x2c76b6))[_0xd0d5('0x4d')](handleError(_0x7b49fb,null));};exports[_0xd0d5('0x67')]=function(_0x5cb278,_0x1c5585,_0x430727){var _0x416890={};var _0xd84ff7={};var _0x4b43f9;var _0x24add4;return db[_0xd0d5('0x34')][_0xd0d5('0x68')]({'where':{'id':_0x5cb278['params']['id']}})['then'](handleEntityNotFound(_0x1c5585,null))[_0xd0d5('0x2b')](function(_0x260b80){if(_0x260b80){_0x4b43f9=_0x260b80;_0xd84ff7[_0xd0d5('0x38')]=_[_0xd0d5('0x3b')](db[_0xd0d5('0x69')][_0xd0d5('0x35')]);_0xd84ff7['query']=_[_0xd0d5('0x3b')](_0x5cb278[_0xd0d5('0x3a')]);_0xd84ff7[_0xd0d5('0x3c')]=_[_0xd0d5('0x3d')](_0xd84ff7['model'],_0xd84ff7[_0xd0d5('0x3a')]);_0x416890['attributes']=_[_0xd0d5('0x3d')](_0xd84ff7[_0xd0d5('0x38')],qs['fields'](_0x5cb278[_0xd0d5('0x3a')][_0xd0d5('0x3f')]));_0x416890['attributes']=_0x416890['attributes'][_0xd0d5('0x50')]?_0x416890[_0xd0d5('0x3e')]:_0xd84ff7[_0xd0d5('0x38')];_0x416890['order']=qs[_0xd0d5('0x43')](_0x5cb278[_0xd0d5('0x3a')]['sort']);_0x416890[_0xd0d5('0x44')]=qs[_0xd0d5('0x3c')](_[_0xd0d5('0x45')](_0x5cb278[_0xd0d5('0x3a')],_0xd84ff7[_0xd0d5('0x3c')]));if(_0x5cb278['query'][_0xd0d5('0x46')]){_0x416890['where']=_[_0xd0d5('0x47')](_0x416890[_0xd0d5('0x44')],{'$or':_[_0xd0d5('0x39')](_0x416890[_0xd0d5('0x3e')],function(_0x315f65){var _0x26767a={};_0x26767a[_0x315f65]={'$like':'%'+_0x5cb278[_0xd0d5('0x3a')][_0xd0d5('0x46')]+'%'};return _0x26767a;})});}_0x416890=_[_0xd0d5('0x47')]({},_0x416890,_0x5cb278[_0xd0d5('0x51')]);return _0x4b43f9[_0xd0d5('0x67')](_0x416890);}})[_0xd0d5('0x2b')](function(_0x162a82){if(_0x162a82){_0x24add4=_0x162a82[_0xd0d5('0x50')];if(!_0x5cb278[_0xd0d5('0x3a')]['hasOwnProperty']('nolimit')){_0x416890[_0xd0d5('0x24')]=qs[_0xd0d5('0x24')](_0x5cb278[_0xd0d5('0x3a')]['limit']);_0x416890[_0xd0d5('0x23')]=qs[_0xd0d5('0x23')](_0x5cb278['query'][_0xd0d5('0x23')]);}return _0x4b43f9[_0xd0d5('0x67')](_0x416890);}})['then'](function(_0x15f968){if(_0x15f968){return _0x15f968?{'count':_0x24add4,'rows':_0x15f968}:null;}})[_0xd0d5('0x2b')](respondWithResult(_0x1c5585,null))[_0xd0d5('0x4d')](handleError(_0x1c5585,null));};exports[_0xd0d5('0x6a')]=function(_0x2e9b68,_0x209e4e,_0x49bb9a){var _0xd8e0a0=_0x2e9b68[_0xd0d5('0x5b')][_0xd0d5('0x6b')];return db[_0xd0d5('0x69')][_0xd0d5('0x4b')]({'where':{'id':_0xd8e0a0},'attributes':['id'],'include':[{'model':db[_0xd0d5('0x5e')],'as':_0xd0d5('0x6c'),'attributes':['id',_0xd0d5('0x32'),'online',_0xd0d5('0x6d'),_0xd0d5('0x6e')],'raw':!![]}]})[_0xd0d5('0x2b')](function(_0x3b2923){if(_0x3b2923){var _0x547223=_['flatMap'](_0x3b2923,function(_0x20d08a){var _0x5d6d41=_0x20d08a[_0xd0d5('0x2c')]({'plain':!![]});return _0x5d6d41[_0xd0d5('0x6c')];});return db[_0xd0d5('0x34')][_0xd0d5('0x52')]({'where':{'id':_0x2e9b68[_0xd0d5('0x4f')]['id']}})[_0xd0d5('0x2b')](function(_0x235076){return db['sequelize'][_0xd0d5('0x6f')](function(_0x3c7ea3){return _0x235076[_0xd0d5('0x6a')](_0xd8e0a0,{'transaction':_0x3c7ea3})[_0xd0d5('0x2b')](function(){return BPromise[_0xd0d5('0x70')](_0x547223,function(_0x36f56c){return db[_0xd0d5('0x5d')][_0xd0d5('0x71')]({'where':{'UserId':_0x36f56c['id'],'MailQueueId':_0x2e9b68['params']['id']},'transaction':_0x3c7ea3});});})[_0xd0d5('0x2b')](function(){_0x547223[_0xd0d5('0x72')](function(_0x2197e8){socket[_0xd0d5('0x73')]('userMailQueue:save',{'UserId':_0x2197e8['id'],'MailQueueId':_0x235076['id']});});});});});}})['then'](respondWithStatusCode(_0x209e4e,null))[_0xd0d5('0x4d')](handleError(_0x209e4e,null));};exports[_0xd0d5('0x74')]=function(_0x3c4c8d,_0x462d76,_0x965cbb){return db[_0xd0d5('0x69')][_0xd0d5('0x4b')]({'where':{'id':_0x3c4c8d[_0xd0d5('0x3a')][_0xd0d5('0x6b')]},'attributes':['id'],'include':[{'model':db[_0xd0d5('0x5e')],'as':_0xd0d5('0x6c'),'attributes':['id'],'raw':!![]}]})[_0xd0d5('0x2b')](handleEntityNotFound(_0x462d76,null))[_0xd0d5('0x2b')](function(_0x148c1c){var _0x23dc9f=_[_0xd0d5('0x39')](_0x148c1c,'id');var _0x25d517=[];var _0x88f69e=[];var _0xe964d7=squel[_0xd0d5('0x75')]();_0xe964d7['field'](_0xd0d5('0x76'))[_0xd0d5('0x77')](_0xd0d5('0x78'),'tq')[_0xd0d5('0x79')]('user_has_teams','ut',_0xd0d5('0x7a'))[_0xd0d5('0x44')](_0xd0d5('0x7b'),_0x3c4c8d['params']['id']);for(var _0x30e740=0x0;_0x30e740<_0x148c1c[_0xd0d5('0x50')];_0x30e740+=0x1){let _0x3b16e1=_0x148c1c[_0x30e740];for(var _0x5a25e5=0x0;_0x5a25e5<_0x3b16e1[_0xd0d5('0x6c')]['length'];_0x5a25e5+=0x1){let _0x9827a8=_0x3b16e1[_0xd0d5('0x6c')][_0x5a25e5];var _0x14b1e5=_0xe964d7[_0xd0d5('0x7c')]();_0x14b1e5[_0xd0d5('0x44')]('ut.UserId\x20=\x20?',_0x9827a8['id']);_0x88f69e['push'](db[_0xd0d5('0x7d')][_0xd0d5('0x3a')](_0x14b1e5[_0xd0d5('0x7e')](),{'type':db[_0xd0d5('0x7d')][_0xd0d5('0x7f')][_0xd0d5('0x80')]})[_0xd0d5('0x2b')](function(_0x1436df){if(_0x1436df['length']===0x1){return _0x9827a8['id'];}else{var _0x455de4=_[_0xd0d5('0x81')](_[_0xd0d5('0x39')](_0x1436df,_0xd0d5('0x82')),function(_0x26c6d8){return _[_0xd0d5('0x83')](_0x23dc9f,_0x26c6d8);});if(_0x455de4){return _0x9827a8['id'];}}}));}}return BPromise['all'](_0x88f69e)['then'](function(_0x50d758){_0x25d517=_(_0x25d517)[_0xd0d5('0x84')](_0x50d758)[_0xd0d5('0x85')]()[_0xd0d5('0x86')]();return db[_0xd0d5('0x34')][_0xd0d5('0x52')]({'where':{'id':_0x3c4c8d[_0xd0d5('0x4f')]['id']}})['then'](function(_0x579d8d){return db['sequelize'][_0xd0d5('0x6f')](function(_0x18f9e0){return _0x579d8d[_0xd0d5('0x74')](_0x3c4c8d[_0xd0d5('0x3a')][_0xd0d5('0x6b')],{'transaction':_0x18f9e0})[_0xd0d5('0x2b')](function(){if(!_[_0xd0d5('0x87')](_0x25d517)){return _0x579d8d[_0xd0d5('0x88')](_0x25d517,{'transaction':_0x18f9e0});}})[_0xd0d5('0x2b')](function(){_0x25d517[_0xd0d5('0x72')](function(_0xa67388){socket['emit'](_0xd0d5('0x89'),{'UserId':_0xa67388,'MailQueueId':_0x579d8d['id']});});});});});});})[_0xd0d5('0x2b')](respondWithStatusCode(_0x462d76,null))[_0xd0d5('0x4d')](handleError(_0x462d76,null));};exports[_0xd0d5('0x8a')]=function(_0x3d97bd,_0x14facc,_0x1a8e39){return db[_0xd0d5('0x34')]['find']({'where':{'id':_0x3d97bd[_0xd0d5('0x4f')]['id']}})[_0xd0d5('0x2b')](handleEntityNotFound(_0x14facc,null))['then'](function(_0x251307){if(_0x251307){return _0x251307['addAgents'](_0x3d97bd[_0xd0d5('0x5b')][_0xd0d5('0x6b')],_[_0xd0d5('0x8b')](_0x3d97bd['body'],[_0xd0d5('0x6b'),'id'])||{})['spread'](function(_0x1dbc7c){for(var _0x75090e=0x0;_0x75090e<_0x3d97bd[_0xd0d5('0x5b')][_0xd0d5('0x6b')][_0xd0d5('0x50')];_0x75090e+=0x1){socket[_0xd0d5('0x73')](_0xd0d5('0x8c'),{'UserId':_0x3d97bd[_0xd0d5('0x5b')]['ids'][_0x75090e],'MailQueueId':_0x3d97bd[_0xd0d5('0x4f')]['id']});}return _0x1dbc7c;});}})[_0xd0d5('0x2b')](respondWithResult(_0x14facc,null))[_0xd0d5('0x4d')](handleError(_0x14facc,null));};exports[_0xd0d5('0x88')]=function(_0x50d69c,_0xd68136,_0x48a431){return db[_0xd0d5('0x34')]['find']({'where':{'id':_0x50d69c[_0xd0d5('0x4f')]['id']}})[_0xd0d5('0x2b')](handleEntityNotFound(_0xd68136,null))[_0xd0d5('0x2b')](function(_0x3f3dd7){if(_0x3f3dd7){return _0x3f3dd7[_0xd0d5('0x88')](_0x50d69c[_0xd0d5('0x3a')]['ids'])[_0xd0d5('0x2b')](function(){if(_[_0xd0d5('0x8d')](_0x50d69c[_0xd0d5('0x3a')][_0xd0d5('0x6b')])){for(var _0x1ca64c=0x0;_0x1ca64c<_0x50d69c[_0xd0d5('0x3a')][_0xd0d5('0x6b')]['length'];_0x1ca64c+=0x1){socket[_0xd0d5('0x73')](_0xd0d5('0x89'),{'UserId':Number(_0x50d69c[_0xd0d5('0x3a')][_0xd0d5('0x6b')][_0x1ca64c]),'MailQueueId':Number(_0x50d69c[_0xd0d5('0x4f')]['id'])});}}else{socket[_0xd0d5('0x73')]('userMailQueue:remove',{'UserId':Number(_0x50d69c[_0xd0d5('0x3a')][_0xd0d5('0x6b')]),'MailQueueId':Number(_0x50d69c[_0xd0d5('0x4f')]['id'])});}});}})['then'](respondWithStatusCode(_0xd68136,null))[_0xd0d5('0x4d')](handleError(_0xd68136,null));};exports[_0xd0d5('0x8e')]=function(_0x589370,_0x3ba856,_0x403167){var _0x16549b={};var _0x5df6a9={};var _0x2ceaf7;var _0x16f0a8;return db['MailQueue']['findOne']({'where':{'id':_0x589370[_0xd0d5('0x4f')]['id']}})['then'](handleEntityNotFound(_0x3ba856,null))['then'](function(_0x2a5114){if(_0x2a5114){_0x2ceaf7=_0x2a5114;_0x5df6a9[_0xd0d5('0x38')]=_['keys'](db[_0xd0d5('0x5e')][_0xd0d5('0x35')]);_0x5df6a9[_0xd0d5('0x3a')]=_['keys'](_0x589370[_0xd0d5('0x3a')]);_0x5df6a9[_0xd0d5('0x3c')]=_[_0xd0d5('0x3d')](_0x5df6a9[_0xd0d5('0x38')],_0x5df6a9[_0xd0d5('0x3a')]);_0x16549b[_0xd0d5('0x3e')]=_[_0xd0d5('0x3d')](_0x5df6a9[_0xd0d5('0x38')],qs[_0xd0d5('0x3f')](_0x589370['query'][_0xd0d5('0x3f')]));_0x16549b[_0xd0d5('0x3e')]=_0x16549b['attributes'][_0xd0d5('0x50')]?_0x16549b[_0xd0d5('0x3e')]:_0x5df6a9['model'];_0x16549b['order']=qs[_0xd0d5('0x43')](_0x589370['query'][_0xd0d5('0x43')]);_0x16549b[_0xd0d5('0x44')]=qs[_0xd0d5('0x3c')](_['pick'](_0x589370[_0xd0d5('0x3a')],_0x5df6a9[_0xd0d5('0x3c')]));if(_0x589370[_0xd0d5('0x3a')][_0xd0d5('0x46')]){_0x16549b['where']=_['merge'](_0x16549b[_0xd0d5('0x44')],{'$or':_[_0xd0d5('0x39')](_0x16549b[_0xd0d5('0x3e')],function(_0xa402de){var _0x3e1ccb={};_0x3e1ccb[_0xa402de]={'$like':'%'+_0x589370[_0xd0d5('0x3a')]['filter']+'%'};return _0x3e1ccb;})});}_0x16549b=_[_0xd0d5('0x47')]({},_0x16549b,_0x589370['options']);return _0x2ceaf7[_0xd0d5('0x8e')](_0x16549b);}})[_0xd0d5('0x2b')](function(_0x539f9b){if(_0x539f9b){_0x16f0a8=_0x539f9b[_0xd0d5('0x50')];if(!_0x589370[_0xd0d5('0x3a')][_0xd0d5('0x40')](_0xd0d5('0x41'))){_0x16549b[_0xd0d5('0x24')]=qs[_0xd0d5('0x24')](_0x589370['query']['limit']);_0x16549b['offset']=qs[_0xd0d5('0x23')](_0x589370[_0xd0d5('0x3a')][_0xd0d5('0x23')]);}return _0x2ceaf7[_0xd0d5('0x8e')](_0x16549b);}})[_0xd0d5('0x2b')](function(_0x1be4a3){if(_0x1be4a3){return _0x1be4a3?{'count':_0x16f0a8,'rows':_0x1be4a3}:null;}})['then'](respondWithResult(_0x3ba856,null))['catch'](handleError(_0x3ba856,null));}; \ No newline at end of file diff --git a/server/api/mailQueue/mailQueue.events.js b/server/api/mailQueue/mailQueue.events.js index d13d491..cffdd7a 100644 --- a/server/api/mailQueue/mailQueue.events.js +++ b/server/api/mailQueue/mailQueue.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1b1c=['update','emit','hasOwnProperty','hook','exports','../../mysqldb','MailQueue','setMaxListeners'];(function(_0x28bc30,_0x427323){var _0x5b5d95=function(_0x114663){while(--_0x114663){_0x28bc30['push'](_0x28bc30['shift']());}};_0x5b5d95(++_0x427323);}(_0x1b1c,0x15d));var _0xc1b1=function(_0x1c0f3d,_0x55a9e2){_0x1c0f3d=_0x1c0f3d-0x0;var _0x4d71a8=_0x1b1c[_0x1c0f3d];return _0x4d71a8;};'use strict';var EventEmitter=require('events');var MailQueue=require(_0xc1b1('0x0'))['db'][_0xc1b1('0x1')];var MailQueueEvents=new EventEmitter();MailQueueEvents[_0xc1b1('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0xc1b1('0x3'),'afterDestroy':'remove'};function emitEvent(_0x3ac445){return function(_0x36de62,_0x2362cd,_0x33150d){MailQueueEvents[_0xc1b1('0x4')](_0x3ac445+':'+_0x36de62['id'],_0x36de62);MailQueueEvents[_0xc1b1('0x4')](_0x3ac445,_0x36de62);_0x33150d(null);};}for(var e in events){if(events[_0xc1b1('0x5')](e)){var event=events[e];MailQueue[_0xc1b1('0x6')](e,emitEvent(event));}}module[_0xc1b1('0x7')]=MailQueueEvents; \ No newline at end of file +var _0x873f=['hook','exports','events','../../mysqldb','MailQueue','setMaxListeners','update','remove','emit','hasOwnProperty'];(function(_0x11d95f,_0x34f442){var _0x2b1a14=function(_0x3a4fa5){while(--_0x3a4fa5){_0x11d95f['push'](_0x11d95f['shift']());}};_0x2b1a14(++_0x34f442);}(_0x873f,0x7a));var _0xf873=function(_0x4f76e8,_0x557c24){_0x4f76e8=_0x4f76e8-0x0;var _0x2163a0=_0x873f[_0x4f76e8];return _0x2163a0;};'use strict';var EventEmitter=require(_0xf873('0x0'));var MailQueue=require(_0xf873('0x1'))['db'][_0xf873('0x2')];var MailQueueEvents=new EventEmitter();MailQueueEvents[_0xf873('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0xf873('0x4'),'afterDestroy':_0xf873('0x5')};function emitEvent(_0x176285){return function(_0x9ed268,_0x1387f0,_0x795dc7){MailQueueEvents[_0xf873('0x6')](_0x176285+':'+_0x9ed268['id'],_0x9ed268);MailQueueEvents[_0xf873('0x6')](_0x176285,_0x9ed268);_0x795dc7(null);};}for(var e in events){if(events[_0xf873('0x7')](e)){var event=events[e];MailQueue[_0xf873('0x8')](e,emitEvent(event));}}module[_0xf873('0x9')]=MailQueueEvents; \ No newline at end of file diff --git a/server/api/mailQueue/mailQueue.model.js b/server/api/mailQueue/mailQueue.model.js index 96db00b..7de0f3e 100644 --- a/server/api/mailQueue/mailQueue.model.js +++ b/server/api/mailQueue/mailQueue.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x957b=['util','../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment','./mailQueue.attributes','exports','define','MailQueue','mail_queues','lodash'];(function(_0x257b0e,_0x563d7e){var _0x27ac2a=function(_0x3a4bbc){while(--_0x3a4bbc){_0x257b0e['push'](_0x257b0e['shift']());}};_0x27ac2a(++_0x563d7e);}(_0x957b,0x117));var _0xb957=function(_0x3400ca,_0x27c04d){_0x3400ca=_0x3400ca-0x0;var _0x26e8d1=_0x957b[_0x3400ca];return _0x26e8d1;};'use strict';var _=require(_0xb957('0x0'));var util=require(_0xb957('0x1'));var logger=require(_0xb957('0x2'))(_0xb957('0x3'));var moment=require(_0xb957('0x4'));var BPromise=require('bluebird');var rp=require(_0xb957('0x5'));var fs=require('fs');var path=require(_0xb957('0x6'));var rimraf=require(_0xb957('0x7'));var config=require(_0xb957('0x8'));var attributes=require(_0xb957('0x9'));module[_0xb957('0xa')]=function(_0x1789dc,_0x4bc9b5){return _0x1789dc[_0xb957('0xb')](_0xb957('0xc'),attributes,{'tableName':_0xb957('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xf7a4=['path','rimraf','../../config/environment','./mailQueue.attributes','exports','MailQueue','mail_queues','../../config/logger','api','moment','bluebird'];(function(_0x318128,_0x1a6da2){var _0x26c098=function(_0x236306){while(--_0x236306){_0x318128['push'](_0x318128['shift']());}};_0x26c098(++_0x1a6da2);}(_0xf7a4,0x188));var _0x4f7a=function(_0x2c7618,_0x26be9c){_0x2c7618=_0x2c7618-0x0;var _0x5ce3f0=_0xf7a4[_0x2c7618];return _0x5ce3f0;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x4f7a('0x0'))(_0x4f7a('0x1'));var moment=require(_0x4f7a('0x2'));var BPromise=require(_0x4f7a('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x4f7a('0x4'));var rimraf=require(_0x4f7a('0x5'));var config=require(_0x4f7a('0x6'));var attributes=require(_0x4f7a('0x7'));module[_0x4f7a('0x8')]=function(_0x1ee264,_0x260a67){return _0x1ee264['define'](_0x4f7a('0x9'),attributes,{'tableName':_0x4f7a('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/mailQueue/mailQueue.rpc.js b/server/api/mailQueue/mailQueue.rpc.js index 152618e..e741fba 100644 --- a/server/api/mailQueue/mailQueue.rpc.js +++ b/server/api/mailQueue/mailQueue.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6460=['../../config/logger','rpc','../../config/environment','jayson/promise','redis','localhost','./mailQueue.socket','register','request','then','info','MailQueue,\x20%s,\x20%s','debug','MailQueue,\x20%s,\x20%s,\x20%s','stringify','error','message','request\x20sent','result','catch','GetMailQueue','MailQueue','options','raw','limit','map','include','model','attributes','ShowMailQueue','find','where','lodash','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x397e5f,_0x454c8f){var _0x5302b8=function(_0x1a29ef){while(--_0x1a29ef){_0x397e5f['push'](_0x397e5f['shift']());}};_0x5302b8(++_0x454c8f);}(_0x6460,0xb4));var _0x0646=function(_0x1ae8ab,_0x6e5c2a){_0x1ae8ab=_0x1ae8ab-0x0;var _0x1ad705=_0x6460[_0x1ae8ab];return _0x1ad705;};'use strict';var _=require(_0x0646('0x0'));var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x0646('0x1'));var fs=require('fs');var Redis=require(_0x0646('0x2'));var db=require(_0x0646('0x3'))['db'];var utils=require(_0x0646('0x4'));var logger=require(_0x0646('0x5'))(_0x0646('0x6'));var config=require(_0x0646('0x7'));var jayson=require(_0x0646('0x8'));var client=jayson['client']['http']({'port':0x232a});config['redis']=_['defaults'](config[_0x0646('0x9')],{'host':_0x0646('0xa'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x0646('0x9')]));require(_0x0646('0xb'))[_0x0646('0xc')](socket);function respondWithRpcPromise(_0x31cea5,_0x5e8e2c,_0x5e7b5f){return new BPromise(function(_0x244054,_0x1d64b2){return client[_0x0646('0xd')](_0x31cea5,_0x5e7b5f)[_0x0646('0xe')](function(_0x102891){logger[_0x0646('0xf')](_0x0646('0x10'),_0x5e8e2c,'request\x20sent');logger[_0x0646('0x11')](_0x0646('0x12'),_0x5e8e2c,'request\x20sent',JSON[_0x0646('0x13')](_0x102891));if(_0x102891[_0x0646('0x14')]){if(_0x102891['error']['code']===0x1f4){logger[_0x0646('0x14')](_0x0646('0x10'),_0x5e8e2c,_0x102891[_0x0646('0x14')][_0x0646('0x15')]);return _0x1d64b2(_0x102891['error'][_0x0646('0x15')]);}logger[_0x0646('0x14')](_0x0646('0x10'),_0x5e8e2c,_0x102891[_0x0646('0x14')]['message']);return _0x244054(_0x102891[_0x0646('0x14')]['message']);}else{logger[_0x0646('0xf')](_0x0646('0x10'),_0x5e8e2c,_0x0646('0x16'));_0x244054(_0x102891[_0x0646('0x17')][_0x0646('0x15')]);}})[_0x0646('0x18')](function(_0xe215f8){logger[_0x0646('0x14')](_0x0646('0x10'),_0x5e8e2c,_0xe215f8);_0x1d64b2(_0xe215f8);});});}exports[_0x0646('0x19')]=function(_0x176e3b){var _0x4ea26f=this;return new Promise(function(_0x36926c,_0x1e0fe1){return db[_0x0646('0x1a')]['findAll']({'raw':_0x176e3b[_0x0646('0x1b')]?_0x176e3b['options'][_0x0646('0x1c')]===undefined?!![]:![]:!![],'where':_0x176e3b[_0x0646('0x1b')]?_0x176e3b[_0x0646('0x1b')]['where']||null:null,'attributes':_0x176e3b[_0x0646('0x1b')]?_0x176e3b[_0x0646('0x1b')]['attributes']||null:null,'limit':_0x176e3b['options']?_0x176e3b[_0x0646('0x1b')][_0x0646('0x1d')]||null:null,'include':_0x176e3b[_0x0646('0x1b')]?_0x176e3b[_0x0646('0x1b')]['include']?_[_0x0646('0x1e')](_0x176e3b['options'][_0x0646('0x1f')],function(_0xca7879){return{'model':db[_0xca7879[_0x0646('0x20')]],'as':_0xca7879['as'],'attributes':_0xca7879[_0x0646('0x21')],'include':_0xca7879[_0x0646('0x1f')]?_[_0x0646('0x1e')](_0xca7879[_0x0646('0x1f')],function(_0x1ad04e){return{'model':db[_0x1ad04e[_0x0646('0x20')]],'as':_0x1ad04e['as'],'attributes':_0x1ad04e[_0x0646('0x21')],'include':_0x1ad04e[_0x0646('0x1f')]?_[_0x0646('0x1e')](_0x1ad04e['include'],function(_0x225f50){return{'model':db[_0x225f50[_0x0646('0x20')]],'as':_0x225f50['as'],'attributes':_0x225f50[_0x0646('0x21')]};}):[]};}):[]};}):[]:[]})['then'](function(_0xe82a17){logger['info']('GetMailQueue',_0x176e3b);logger['debug'](_0x0646('0x19'),_0x176e3b,JSON[_0x0646('0x13')](_0xe82a17));_0x36926c(_0xe82a17);})[_0x0646('0x18')](function(_0x3861d5){logger[_0x0646('0x14')](_0x0646('0x19'),_0x3861d5['message'],_0x176e3b);_0x1e0fe1(_0x4ea26f[_0x0646('0x14')](0x1f4,_0x3861d5[_0x0646('0x15')]));});});};exports[_0x0646('0x22')]=function(_0x248c13){var _0x5abbfb=this;return new Promise(function(_0x42aa7c,_0x29bef5){return db['MailQueue'][_0x0646('0x23')]({'raw':_0x248c13['options']?_0x248c13[_0x0646('0x1b')]['raw']===undefined?!![]:![]:!![],'where':_0x248c13[_0x0646('0x1b')]?_0x248c13['options'][_0x0646('0x24')]||null:null,'attributes':_0x248c13[_0x0646('0x1b')]?_0x248c13['options'][_0x0646('0x21')]||null:null,'include':_0x248c13['options']?_0x248c13[_0x0646('0x1b')]['include']?_[_0x0646('0x1e')](_0x248c13[_0x0646('0x1b')][_0x0646('0x1f')],function(_0x9b0627){return{'model':db[_0x9b0627[_0x0646('0x20')]],'as':_0x9b0627['as'],'attributes':_0x9b0627[_0x0646('0x21')],'include':_0x9b0627[_0x0646('0x1f')]?_[_0x0646('0x1e')](_0x9b0627[_0x0646('0x1f')],function(_0x35e3a9){return{'model':db[_0x35e3a9[_0x0646('0x20')]],'as':_0x35e3a9['as'],'attributes':_0x35e3a9[_0x0646('0x21')],'include':_0x35e3a9[_0x0646('0x1f')]?_['map'](_0x35e3a9[_0x0646('0x1f')],function(_0x471bfb){return{'model':db[_0x471bfb[_0x0646('0x20')]],'as':_0x471bfb['as'],'attributes':_0x471bfb[_0x0646('0x21')]};}):[]};}):[]};}):[]:[]})[_0x0646('0xe')](function(_0x49e99d){logger[_0x0646('0xf')](_0x0646('0x22'),_0x248c13);logger[_0x0646('0x11')](_0x0646('0x22'),_0x248c13,JSON[_0x0646('0x13')](_0x49e99d));_0x42aa7c(_0x49e99d);})[_0x0646('0x18')](function(_0x38b61f){logger[_0x0646('0x14')](_0x0646('0x22'),_0x38b61f['message'],_0x248c13);_0x29bef5(_0x5abbfb[_0x0646('0x14')](0x1f4,_0x38b61f[_0x0646('0x15')]));});});}; \ No newline at end of file +var _0x4c90=['bluebird','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment','client','http','redis','defaults','localhost','./mailQueue.socket','register','request','request\x20sent','MailQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','MailQueue,\x20%s,\x20%s','message','info','result','catch','GetMailQueue','MailQueue','findAll','options','raw','where','attributes','include','map','model','then','debug','ShowMailQueue','find','lodash','util','moment'];(function(_0x21a2f0,_0x216e65){var _0x349e6d=function(_0x499749){while(--_0x499749){_0x21a2f0['push'](_0x21a2f0['shift']());}};_0x349e6d(++_0x216e65);}(_0x4c90,0x78));var _0x04c9=function(_0x81fa4a,_0x2f47e9){_0x81fa4a=_0x81fa4a-0x0;var _0x23672d=_0x4c90[_0x81fa4a];return _0x23672d;};'use strict';var _=require(_0x04c9('0x0'));var util=require(_0x04c9('0x1'));var moment=require(_0x04c9('0x2'));var BPromise=require(_0x04c9('0x3'));var rs=require(_0x04c9('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x04c9('0x5'))['db'];var utils=require(_0x04c9('0x6'));var logger=require('../../config/logger')(_0x04c9('0x7'));var config=require(_0x04c9('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x04c9('0x9')][_0x04c9('0xa')]({'port':0x232a});config[_0x04c9('0xb')]=_[_0x04c9('0xc')](config[_0x04c9('0xb')],{'host':_0x04c9('0xd'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x04c9('0xb')]));require(_0x04c9('0xe'))[_0x04c9('0xf')](socket);function respondWithRpcPromise(_0x441190,_0x22c19a,_0x146dcb){return new BPromise(function(_0xcc426e,_0x5a3372){return client[_0x04c9('0x10')](_0x441190,_0x146dcb)['then'](function(_0x1d0923){logger['info']('MailQueue,\x20%s,\x20%s',_0x22c19a,_0x04c9('0x11'));logger['debug'](_0x04c9('0x12'),_0x22c19a,_0x04c9('0x11'),JSON[_0x04c9('0x13')](_0x1d0923));if(_0x1d0923[_0x04c9('0x14')]){if(_0x1d0923['error'][_0x04c9('0x15')]===0x1f4){logger[_0x04c9('0x14')](_0x04c9('0x16'),_0x22c19a,_0x1d0923['error'][_0x04c9('0x17')]);return _0x5a3372(_0x1d0923[_0x04c9('0x14')]['message']);}logger['error']('MailQueue,\x20%s,\x20%s',_0x22c19a,_0x1d0923[_0x04c9('0x14')][_0x04c9('0x17')]);return _0xcc426e(_0x1d0923[_0x04c9('0x14')][_0x04c9('0x17')]);}else{logger[_0x04c9('0x18')](_0x04c9('0x16'),_0x22c19a,_0x04c9('0x11'));_0xcc426e(_0x1d0923[_0x04c9('0x19')][_0x04c9('0x17')]);}})[_0x04c9('0x1a')](function(_0x7998d1){logger['error'](_0x04c9('0x16'),_0x22c19a,_0x7998d1);_0x5a3372(_0x7998d1);});});}exports[_0x04c9('0x1b')]=function(_0x13758c){var _0x1f9cfa=this;return new Promise(function(_0x158af0,_0xbaca97){return db[_0x04c9('0x1c')][_0x04c9('0x1d')]({'raw':_0x13758c[_0x04c9('0x1e')]?_0x13758c[_0x04c9('0x1e')][_0x04c9('0x1f')]===undefined?!![]:![]:!![],'where':_0x13758c[_0x04c9('0x1e')]?_0x13758c[_0x04c9('0x1e')][_0x04c9('0x20')]||null:null,'attributes':_0x13758c[_0x04c9('0x1e')]?_0x13758c['options'][_0x04c9('0x21')]||null:null,'limit':_0x13758c[_0x04c9('0x1e')]?_0x13758c[_0x04c9('0x1e')]['limit']||null:null,'include':_0x13758c[_0x04c9('0x1e')]?_0x13758c['options'][_0x04c9('0x22')]?_[_0x04c9('0x23')](_0x13758c[_0x04c9('0x1e')][_0x04c9('0x22')],function(_0x11fc7d){return{'model':db[_0x11fc7d[_0x04c9('0x24')]],'as':_0x11fc7d['as'],'attributes':_0x11fc7d[_0x04c9('0x21')],'include':_0x11fc7d[_0x04c9('0x22')]?_[_0x04c9('0x23')](_0x11fc7d[_0x04c9('0x22')],function(_0x773f2a){return{'model':db[_0x773f2a[_0x04c9('0x24')]],'as':_0x773f2a['as'],'attributes':_0x773f2a[_0x04c9('0x21')],'include':_0x773f2a[_0x04c9('0x22')]?_[_0x04c9('0x23')](_0x773f2a['include'],function(_0x546ee0){return{'model':db[_0x546ee0[_0x04c9('0x24')]],'as':_0x546ee0['as'],'attributes':_0x546ee0[_0x04c9('0x21')]};}):[]};}):[]};}):[]:[]})[_0x04c9('0x25')](function(_0x4f9a23){logger[_0x04c9('0x18')](_0x04c9('0x1b'),_0x13758c);logger[_0x04c9('0x26')]('GetMailQueue',_0x13758c,JSON['stringify'](_0x4f9a23));_0x158af0(_0x4f9a23);})['catch'](function(_0x341078){logger[_0x04c9('0x14')](_0x04c9('0x1b'),_0x341078[_0x04c9('0x17')],_0x13758c);_0xbaca97(_0x1f9cfa['error'](0x1f4,_0x341078[_0x04c9('0x17')]));});});};exports[_0x04c9('0x27')]=function(_0x552e39){var _0x24262a=this;return new Promise(function(_0x526a66,_0x1438fa){return db[_0x04c9('0x1c')][_0x04c9('0x28')]({'raw':_0x552e39['options']?_0x552e39[_0x04c9('0x1e')][_0x04c9('0x1f')]===undefined?!![]:![]:!![],'where':_0x552e39[_0x04c9('0x1e')]?_0x552e39[_0x04c9('0x1e')][_0x04c9('0x20')]||null:null,'attributes':_0x552e39[_0x04c9('0x1e')]?_0x552e39['options'][_0x04c9('0x21')]||null:null,'include':_0x552e39[_0x04c9('0x1e')]?_0x552e39[_0x04c9('0x1e')][_0x04c9('0x22')]?_['map'](_0x552e39['options'][_0x04c9('0x22')],function(_0x558bae){return{'model':db[_0x558bae[_0x04c9('0x24')]],'as':_0x558bae['as'],'attributes':_0x558bae['attributes'],'include':_0x558bae[_0x04c9('0x22')]?_['map'](_0x558bae[_0x04c9('0x22')],function(_0x429d85){return{'model':db[_0x429d85[_0x04c9('0x24')]],'as':_0x429d85['as'],'attributes':_0x429d85[_0x04c9('0x21')],'include':_0x429d85['include']?_[_0x04c9('0x23')](_0x429d85['include'],function(_0x2d3403){return{'model':db[_0x2d3403[_0x04c9('0x24')]],'as':_0x2d3403['as'],'attributes':_0x2d3403[_0x04c9('0x21')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x52ee88){logger[_0x04c9('0x18')]('ShowMailQueue',_0x552e39);logger[_0x04c9('0x26')](_0x04c9('0x27'),_0x552e39,JSON[_0x04c9('0x13')](_0x52ee88));_0x526a66(_0x52ee88);})['catch'](function(_0x2e74c5){logger[_0x04c9('0x14')](_0x04c9('0x27'),_0x2e74c5[_0x04c9('0x17')],_0x552e39);_0x1438fa(_0x24262a['error'](0x1f4,_0x2e74c5[_0x04c9('0x17')]));});});}; \ No newline at end of file diff --git a/server/api/mailQueue/mailQueue.socket.js b/server/api/mailQueue/mailQueue.socket.js index 6f51c99..b96dd47 100644 --- a/server/api/mailQueue/mailQueue.socket.js +++ b/server/api/mailQueue/mailQueue.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1bfd=['save','emit','removeListener','register','length','mailQueue:','./mailQueue.events'];(function(_0x1ead78,_0x3af07b){var _0x457d72=function(_0x2d3c7b){while(--_0x2d3c7b){_0x1ead78['push'](_0x1ead78['shift']());}};_0x457d72(++_0x3af07b);}(_0x1bfd,0xbc));var _0xd1bf=function(_0x2e0b3b,_0x26a6e3){_0x2e0b3b=_0x2e0b3b-0x0;var _0x5a667f=_0x1bfd[_0x2e0b3b];return _0x5a667f;};'use strict';var MailQueueEvents=require(_0xd1bf('0x0'));var events=[_0xd1bf('0x1'),'remove','update'];function createListener(_0x23f4fd,_0x431313){return function(_0x36d20c){_0x431313[_0xd1bf('0x2')](_0x23f4fd,_0x36d20c);};}function removeListener(_0x2b6830,_0x1a9edd){return function(){MailQueueEvents[_0xd1bf('0x3')](_0x2b6830,_0x1a9edd);};}exports[_0xd1bf('0x4')]=function(_0x4c86c1){for(var _0x4e62e5=0x0,_0x283346=events[_0xd1bf('0x5')];_0x4e62e5<_0x283346;_0x4e62e5++){var _0x589301=events[_0x4e62e5];var _0x529369=createListener(_0xd1bf('0x6')+_0x589301,_0x4c86c1);MailQueueEvents['on'](_0x589301,_0x529369);}}; \ No newline at end of file +var _0x3152=['remove','update','emit','length','mailQueue:','./mailQueue.events','save'];(function(_0x5a2228,_0x1e45ee){var _0x8b4aac=function(_0x2065c5){while(--_0x2065c5){_0x5a2228['push'](_0x5a2228['shift']());}};_0x8b4aac(++_0x1e45ee);}(_0x3152,0x147));var _0x2315=function(_0x25e7cb,_0x3579b7){_0x25e7cb=_0x25e7cb-0x0;var _0x375d92=_0x3152[_0x25e7cb];return _0x375d92;};'use strict';var MailQueueEvents=require(_0x2315('0x0'));var events=[_0x2315('0x1'),_0x2315('0x2'),_0x2315('0x3')];function createListener(_0x239ff0,_0x5a6c05){return function(_0x2a4c58){_0x5a6c05[_0x2315('0x4')](_0x239ff0,_0x2a4c58);};}function removeListener(_0x34ba9d,_0x5812b1){return function(){MailQueueEvents['removeListener'](_0x34ba9d,_0x5812b1);};}exports['register']=function(_0x580366){for(var _0x3cf1c6=0x0,_0x5066d1=events[_0x2315('0x5')];_0x3cf1c6<_0x5066d1;_0x3cf1c6++){var _0x16087b=events[_0x3cf1c6];var _0x2b1597=createListener(_0x2315('0x6')+_0x16087b,_0x580366);MailQueueEvents['on'](_0x16087b,_0x2b1597);}}; \ No newline at end of file diff --git a/server/api/mailQueueReport/index.js b/server/api/mailQueueReport/index.js index 753280d..b4208c9 100644 --- a/server/api/mailQueueReport/index.js +++ b/server/api/mailQueueReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x365e=['connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./mailQueueReport.controller','get','isAuthenticated','index','describe','show','post','create','/:id','update','delete','destroy','multer','util','path'];(function(_0x18d9d1,_0x1e5c91){var _0x26f1f4=function(_0x1dab45){while(--_0x1dab45){_0x18d9d1['push'](_0x18d9d1['shift']());}};_0x26f1f4(++_0x1e5c91);}(_0x365e,0x1a1));var _0xe365=function(_0x299e05,_0x464032){_0x299e05=_0x299e05-0x0;var _0x594078=_0x365e[_0x299e05];return _0x594078;};'use strict';var multer=require(_0xe365('0x0'));var util=require(_0xe365('0x1'));var path=require(_0xe365('0x2'));var timeout=require(_0xe365('0x3'));var express=require('express');var router=express[_0xe365('0x4')]();var fs_extra=require(_0xe365('0x5'));var auth=require(_0xe365('0x6'));var interaction=require(_0xe365('0x7'));var config=require(_0xe365('0x8'));var controller=require(_0xe365('0x9'));router[_0xe365('0xa')]('/',auth[_0xe365('0xb')](),controller[_0xe365('0xc')]);router[_0xe365('0xa')]('/describe',auth['isAuthenticated'](),controller[_0xe365('0xd')]);router['get']('/:id',auth[_0xe365('0xb')](),controller[_0xe365('0xe')]);router[_0xe365('0xf')]('/',auth[_0xe365('0xb')](),controller[_0xe365('0x10')]);router['put'](_0xe365('0x11'),auth[_0xe365('0xb')](),controller[_0xe365('0x12')]);router[_0xe365('0x13')](_0xe365('0x11'),auth[_0xe365('0xb')](),controller[_0xe365('0x14')]);module['exports']=router; \ No newline at end of file +var _0x222f=['exports','multer','util','path','connect-timeout','express','fs-extra','./mailQueueReport.controller','index','get','/describe','describe','/:id','post','put','isAuthenticated','update','delete','destroy'];(function(_0x5816bf,_0x3f0cd7){var _0x1cd8a3=function(_0x410f91){while(--_0x410f91){_0x5816bf['push'](_0x5816bf['shift']());}};_0x1cd8a3(++_0x3f0cd7);}(_0x222f,0xac));var _0xf222=function(_0x1e8461,_0x5e1500){_0x1e8461=_0x1e8461-0x0;var _0x528f4d=_0x222f[_0x1e8461];return _0x528f4d;};'use strict';var multer=require(_0xf222('0x0'));var util=require(_0xf222('0x1'));var path=require(_0xf222('0x2'));var timeout=require(_0xf222('0x3'));var express=require(_0xf222('0x4'));var router=express['Router']();var fs_extra=require(_0xf222('0x5'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xf222('0x6'));router['get']('/',auth['isAuthenticated'](),controller[_0xf222('0x7')]);router[_0xf222('0x8')](_0xf222('0x9'),auth['isAuthenticated'](),controller[_0xf222('0xa')]);router['get'](_0xf222('0xb'),auth['isAuthenticated'](),controller['show']);router[_0xf222('0xc')]('/',auth['isAuthenticated'](),controller['create']);router[_0xf222('0xd')](_0xf222('0xb'),auth[_0xf222('0xe')](),controller[_0xf222('0xf')]);router[_0xf222('0x10')](_0xf222('0xb'),auth[_0xf222('0xe')](),controller[_0xf222('0x11')]);module[_0xf222('0x12')]=router; \ No newline at end of file diff --git a/server/api/mailQueueReport/mailQueueReport.attributes.js b/server/api/mailQueueReport/mailQueueReport.attributes.js index dac5dde..8e34054 100644 --- a/server/api/mailQueueReport/mailQueueReport.attributes.js +++ b/server/api/mailQueueReport/mailQueueReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe531=['moment','sequelize','exports','STRING','DATE'];(function(_0x5cf1ac,_0x16f623){var _0x46fe59=function(_0x3518eb){while(--_0x3518eb){_0x5cf1ac['push'](_0x5cf1ac['shift']());}};_0x46fe59(++_0x16f623);}(_0xe531,0x64));var _0x1e53=function(_0x1edb91,_0x11d20e){_0x1edb91=_0x1edb91-0x0;var _0x5f061e=_0xe531[_0x1edb91];return _0x5f061e;};'use strict';var moment=require(_0x1e53('0x0'));var Sequelize=require(_0x1e53('0x1'));module[_0x1e53('0x2')]={'uniqueid':{'type':Sequelize['STRING'],'allowNull':![]},'from':{'type':Sequelize[_0x1e53('0x3')]},'joinAt':{'type':Sequelize[_0x1e53('0x4')]},'leaveAt':{'type':Sequelize[_0x1e53('0x4')]},'acceptAt':{'type':Sequelize[_0x1e53('0x4')]},'exitAt':{'type':Sequelize['DATE']},'reason':{'type':Sequelize['STRING']}}; \ No newline at end of file +var _0xd363=['STRING','DATE','moment','sequelize'];(function(_0x40905c,_0xfd3e00){var _0x12d54d=function(_0x4993f3){while(--_0x4993f3){_0x40905c['push'](_0x40905c['shift']());}};_0x12d54d(++_0xfd3e00);}(_0xd363,0xd6));var _0x3d36=function(_0x2866c7,_0x197fdd){_0x2866c7=_0x2866c7-0x0;var _0x3c5db2=_0xd363[_0x2866c7];return _0x3c5db2;};'use strict';var moment=require(_0x3d36('0x0'));var Sequelize=require(_0x3d36('0x1'));module['exports']={'uniqueid':{'type':Sequelize[_0x3d36('0x2')],'allowNull':![]},'from':{'type':Sequelize['STRING']},'joinAt':{'type':Sequelize[_0x3d36('0x3')]},'leaveAt':{'type':Sequelize['DATE']},'acceptAt':{'type':Sequelize[_0x3d36('0x3')]},'exitAt':{'type':Sequelize[_0x3d36('0x3')]},'reason':{'type':Sequelize['STRING']}}; \ No newline at end of file diff --git a/server/api/mailQueueReport/mailQueueReport.controller.js b/server/api/mailQueueReport/mailQueueReport.controller.js index 2d89226..858d9c8 100644 --- a/server/api/mailQueueReport/mailQueueReport.controller.js +++ b/server/api/mailQueueReport/mailQueueReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xdb28=['index','MailQueueReport','fieldName','type','key','map','query','keys','model','fields','attributes','length','nolimit','order','sort','filters','filter','where','VIRTUAL','merge','options','includeAll','findAll','rows','catch','show','params','rawAttributes','intersection','include','find','create','body','describe','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','to-csv','ejs','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','status','end','json','offset','undefined','count','limit','set','apply','save','update','then','sendStatus','error','stack','name','send'];(function(_0x4b97c6,_0x21017c){var _0x342ead=function(_0x3675e0){while(--_0x3675e0){_0x4b97c6['push'](_0x4b97c6['shift']());}};_0x342ead(++_0x21017c);}(_0xdb28,0x106));var _0x8db2=function(_0x52e1f3,_0x5753ce){_0x52e1f3=_0x52e1f3-0x0;var _0x1f3ca3=_0xdb28[_0x52e1f3];return _0x1f3ca3;};'use strict';var emlformat=require(_0x8db2('0x0'));var rimraf=require(_0x8db2('0x1'));var zipdir=require(_0x8db2('0x2'));var jsonpatch=require(_0x8db2('0x3'));var rp=require('request-promise');var moment=require(_0x8db2('0x4'));var BPromise=require(_0x8db2('0x5'));var Mustache=require(_0x8db2('0x6'));var util=require(_0x8db2('0x7'));var path=require(_0x8db2('0x8'));var sox=require('sox');var csv=require(_0x8db2('0x9'));var ejs=require(_0x8db2('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x8db2('0xb'));var crypto=require(_0x8db2('0xc'));var jsforce=require(_0x8db2('0xd'));var deskjs=require(_0x8db2('0xe'));var toCsv=require(_0x8db2('0x9'));var querystring=require(_0x8db2('0xf'));var Papa=require(_0x8db2('0x10'));var Redis=require('ioredis');var authService=require(_0x8db2('0x11'));var qs=require(_0x8db2('0x12'));var as=require(_0x8db2('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x8db2('0x14'))(_0x8db2('0x15'));var utils=require('../../config/utils');var config=require(_0x8db2('0x16'));var licenseUtil=require(_0x8db2('0x17'));var db=require(_0x8db2('0x18'))['db'];function respondWithStatusCode(_0x204f49,_0x37d017){_0x37d017=_0x37d017||0xcc;return function(_0x559fb1){if(_0x559fb1){return _0x204f49['sendStatus'](_0x37d017);}return _0x204f49[_0x8db2('0x19')](_0x37d017)[_0x8db2('0x1a')]();};}function respondWithResult(_0x350d61,_0x1d6a15){_0x1d6a15=_0x1d6a15||0xc8;return function(_0x227355){if(_0x227355){return _0x350d61[_0x8db2('0x19')](_0x1d6a15)[_0x8db2('0x1b')](_0x227355);}};}function respondWithFilteredResult(_0x3c96a7,_0x131252){return function(_0x16c8c2){if(_0x16c8c2){var _0x5489a9=typeof _0x131252[_0x8db2('0x1c')]===_0x8db2('0x1d')&&typeof _0x131252['limit']===_0x8db2('0x1d');var _0x44957d=_0x16c8c2[_0x8db2('0x1e')];var _0x3fddc2=_0x5489a9?0x0:_0x131252[_0x8db2('0x1c')];var _0x46ce14=_0x5489a9?_0x16c8c2['count']:_0x131252['offset']+_0x131252[_0x8db2('0x1f')];var _0x104e33;if(_0x46ce14>=_0x44957d){_0x46ce14=_0x44957d;_0x104e33=0xc8;}else{_0x104e33=0xce;}_0x3c96a7[_0x8db2('0x19')](_0x104e33);return _0x3c96a7[_0x8db2('0x20')]('Content-Range',_0x3fddc2+'-'+_0x46ce14+'/'+_0x44957d)[_0x8db2('0x1b')](_0x16c8c2);}return null;};}function patchUpdates(_0x36a9ff){return function(_0x260940){try{jsonpatch[_0x8db2('0x21')](_0x260940,_0x36a9ff,!![]);}catch(_0x3dbe8e){return BPromise['reject'](_0x3dbe8e);}return _0x260940[_0x8db2('0x22')]();};}function saveUpdates(_0x3e30e6,_0x18f69c){return function(_0x125be2){if(_0x125be2){return _0x125be2[_0x8db2('0x23')](_0x3e30e6)[_0x8db2('0x24')](function(_0x796ec1){return _0x796ec1;});}return null;};}function removeEntity(_0x5c6614,_0x256202){return function(_0x4f6516){if(_0x4f6516){return _0x4f6516['destroy']()['then'](function(){_0x5c6614['status'](0xcc)[_0x8db2('0x1a')]();});}};}function handleEntityNotFound(_0x29b5cd,_0x3be281){return function(_0x2baed0){if(!_0x2baed0){_0x29b5cd[_0x8db2('0x25')](0x194);}return _0x2baed0;};}function handleError(_0x8d4f54,_0x58cd9d){_0x58cd9d=_0x58cd9d||0x1f4;return function(_0x3544ba){logger[_0x8db2('0x26')](_0x3544ba[_0x8db2('0x27')]);if(_0x3544ba[_0x8db2('0x28')]){delete _0x3544ba['name'];}_0x8d4f54[_0x8db2('0x19')](_0x58cd9d)[_0x8db2('0x29')](_0x3544ba);};}exports[_0x8db2('0x2a')]=function(_0x1687ed,_0xbe5ece){var _0x21bae5={},_0xa54ea3={},_0x3124d5={'count':0x0,'rows':[]};var _0xbc5366=_['map'](db[_0x8db2('0x2b')]['rawAttributes'],function(_0x59cb77){return{'name':_0x59cb77[_0x8db2('0x2c')],'type':_0x59cb77[_0x8db2('0x2d')][_0x8db2('0x2e')]};});_0xa54ea3['model']=_[_0x8db2('0x2f')](_0xbc5366,'name');_0xa54ea3[_0x8db2('0x30')]=_[_0x8db2('0x31')](_0x1687ed[_0x8db2('0x30')]);_0xa54ea3['filters']=_['intersection'](_0xa54ea3[_0x8db2('0x32')],_0xa54ea3[_0x8db2('0x30')]);_0x21bae5['attributes']=_['intersection'](_0xa54ea3[_0x8db2('0x32')],qs[_0x8db2('0x33')](_0x1687ed[_0x8db2('0x30')][_0x8db2('0x33')]));_0x21bae5[_0x8db2('0x34')]=_0x21bae5[_0x8db2('0x34')][_0x8db2('0x35')]?_0x21bae5[_0x8db2('0x34')]:_0xa54ea3[_0x8db2('0x32')];if(!_0x1687ed[_0x8db2('0x30')]['hasOwnProperty'](_0x8db2('0x36'))){_0x21bae5[_0x8db2('0x1f')]=qs['limit'](_0x1687ed[_0x8db2('0x30')][_0x8db2('0x1f')]);_0x21bae5['offset']=qs['offset'](_0x1687ed[_0x8db2('0x30')]['offset']);}_0x21bae5[_0x8db2('0x37')]=qs[_0x8db2('0x38')](_0x1687ed[_0x8db2('0x30')][_0x8db2('0x38')]);_0x21bae5['where']=qs[_0x8db2('0x39')](_['pick'](_0x1687ed[_0x8db2('0x30')],_0xa54ea3[_0x8db2('0x39')]),_0xbc5366);if(_0x1687ed[_0x8db2('0x30')][_0x8db2('0x3a')]){_0x21bae5['where']=_['merge'](_0x21bae5[_0x8db2('0x3b')],{'$or':_[_0x8db2('0x2f')](_0xbc5366,function(_0x5dc2b4){if(_0x5dc2b4[_0x8db2('0x2d')]!==_0x8db2('0x3c')){var _0x656dd2={};_0x656dd2[_0x5dc2b4['name']]={'$like':'%'+_0x1687ed[_0x8db2('0x30')][_0x8db2('0x3a')]+'%'};return _0x656dd2;}})});}_0x21bae5=_[_0x8db2('0x3d')]({},_0x21bae5,_0x1687ed[_0x8db2('0x3e')]);var _0x2e6f0c={'where':_0x21bae5[_0x8db2('0x3b')]};return db[_0x8db2('0x2b')][_0x8db2('0x1e')](_0x2e6f0c)[_0x8db2('0x24')](function(_0x63c561){_0x3124d5[_0x8db2('0x1e')]=_0x63c561;if(_0x1687ed[_0x8db2('0x30')][_0x8db2('0x3f')]){_0x21bae5['include']=[{'all':!![]}];}return db[_0x8db2('0x2b')][_0x8db2('0x40')](_0x21bae5);})['then'](function(_0x49a7ae){_0x3124d5[_0x8db2('0x41')]=_0x49a7ae;return _0x3124d5;})['then'](respondWithFilteredResult(_0xbe5ece,_0x21bae5))[_0x8db2('0x42')](handleError(_0xbe5ece,null));};exports[_0x8db2('0x43')]=function(_0x313130,_0x307783){var _0xb4fe2c={'raw':!![],'where':{'id':_0x313130[_0x8db2('0x44')]['id']}},_0x30d606={};_0x30d606['model']=_[_0x8db2('0x31')](db[_0x8db2('0x2b')][_0x8db2('0x45')]);_0x30d606[_0x8db2('0x30')]=_['keys'](_0x313130[_0x8db2('0x30')]);_0x30d606[_0x8db2('0x39')]=_[_0x8db2('0x46')](_0x30d606[_0x8db2('0x32')],_0x30d606['query']);_0xb4fe2c[_0x8db2('0x34')]=_['intersection'](_0x30d606[_0x8db2('0x32')],qs[_0x8db2('0x33')](_0x313130[_0x8db2('0x30')]['fields']));_0xb4fe2c['attributes']=_0xb4fe2c[_0x8db2('0x34')]['length']?_0xb4fe2c[_0x8db2('0x34')]:_0x30d606[_0x8db2('0x32')];if(_0x313130[_0x8db2('0x30')][_0x8db2('0x3f')]){_0xb4fe2c[_0x8db2('0x47')]=[{'all':!![]}];}_0xb4fe2c=_[_0x8db2('0x3d')]({},_0xb4fe2c,_0x313130[_0x8db2('0x3e')]);return db[_0x8db2('0x2b')][_0x8db2('0x48')](_0xb4fe2c)[_0x8db2('0x24')](handleEntityNotFound(_0x307783,null))[_0x8db2('0x24')](respondWithResult(_0x307783,null))[_0x8db2('0x42')](handleError(_0x307783,null));};exports['create']=function(_0x449109,_0x2ada52){return db[_0x8db2('0x2b')][_0x8db2('0x49')](_0x449109['body'],{})['then'](respondWithResult(_0x2ada52,0xc9))[_0x8db2('0x42')](handleError(_0x2ada52,null));};exports[_0x8db2('0x23')]=function(_0x164020,_0x4c66e5){if(_0x164020['body']['id']){delete _0x164020['body']['id'];}return db[_0x8db2('0x2b')][_0x8db2('0x48')]({'where':{'id':_0x164020[_0x8db2('0x44')]['id']}})[_0x8db2('0x24')](handleEntityNotFound(_0x4c66e5,null))[_0x8db2('0x24')](saveUpdates(_0x164020[_0x8db2('0x4a')],null))[_0x8db2('0x24')](respondWithResult(_0x4c66e5,null))['catch'](handleError(_0x4c66e5,null));};exports['destroy']=function(_0x3d29bc,_0x18c6ef){return db[_0x8db2('0x2b')][_0x8db2('0x48')]({'where':{'id':_0x3d29bc[_0x8db2('0x44')]['id']}})[_0x8db2('0x24')](handleEntityNotFound(_0x18c6ef,null))[_0x8db2('0x24')](removeEntity(_0x18c6ef,null))[_0x8db2('0x42')](handleError(_0x18c6ef,null));};exports[_0x8db2('0x4b')]=function(_0x426ae0,_0x3bc632){return db[_0x8db2('0x2b')][_0x8db2('0x4b')]()[_0x8db2('0x24')](respondWithResult(_0x3bc632,null))[_0x8db2('0x42')](handleError(_0x3bc632,null));}; \ No newline at end of file +var _0x4e2e=['name','send','map','MailQueueReport','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','merge','filter','options','includeAll','findAll','rows','catch','show','params','rawAttributes','include','find','create','body','update','describe','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','status','end','offset','limit','undefined','count','set','Content-Range','json','apply','reject','save','then','destroy','stack'];(function(_0x1623ef,_0x3596b1){var _0x34db75=function(_0xf5f62c){while(--_0xf5f62c){_0x1623ef['push'](_0x1623ef['shift']());}};_0x34db75(++_0x3596b1);}(_0x4e2e,0x1f2));var _0xe4e2=function(_0xda6216,_0x5df838){_0xda6216=_0xda6216-0x0;var _0x4ea8b1=_0x4e2e[_0xda6216];return _0x4ea8b1;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xe4e2('0x0'));var zipdir=require(_0xe4e2('0x1'));var jsonpatch=require(_0xe4e2('0x2'));var rp=require(_0xe4e2('0x3'));var moment=require(_0xe4e2('0x4'));var BPromise=require(_0xe4e2('0x5'));var Mustache=require('mustache');var util=require(_0xe4e2('0x6'));var path=require(_0xe4e2('0x7'));var sox=require(_0xe4e2('0x8'));var csv=require(_0xe4e2('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xe4e2('0xa'));var _=require(_0xe4e2('0xb'));var squel=require(_0xe4e2('0xc'));var crypto=require(_0xe4e2('0xd'));var jsforce=require(_0xe4e2('0xe'));var deskjs=require(_0xe4e2('0xf'));var toCsv=require(_0xe4e2('0x9'));var querystring=require(_0xe4e2('0x10'));var Papa=require('papaparse');var Redis=require(_0xe4e2('0x11'));var authService=require(_0xe4e2('0x12'));var qs=require(_0xe4e2('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xe4e2('0x14'));var logger=require(_0xe4e2('0x15'))(_0xe4e2('0x16'));var utils=require(_0xe4e2('0x17'));var config=require(_0xe4e2('0x18'));var licenseUtil=require('../../config/license/util');var db=require(_0xe4e2('0x19'))['db'];function respondWithStatusCode(_0x20d34e,_0x19c6ef){_0x19c6ef=_0x19c6ef||0xcc;return function(_0x13657c){if(_0x13657c){return _0x20d34e['sendStatus'](_0x19c6ef);}return _0x20d34e[_0xe4e2('0x1a')](_0x19c6ef)[_0xe4e2('0x1b')]();};}function respondWithResult(_0xb45217,_0x4e0bc2){_0x4e0bc2=_0x4e0bc2||0xc8;return function(_0x202486){if(_0x202486){return _0xb45217['status'](_0x4e0bc2)['json'](_0x202486);}};}function respondWithFilteredResult(_0x117a2a,_0x2d2018){return function(_0x1f9b2d){if(_0x1f9b2d){var _0x28ee12=typeof _0x2d2018[_0xe4e2('0x1c')]==='undefined'&&typeof _0x2d2018[_0xe4e2('0x1d')]===_0xe4e2('0x1e');var _0x340935=_0x1f9b2d['count'];var _0x196f16=_0x28ee12?0x0:_0x2d2018['offset'];var _0x1d5e9d=_0x28ee12?_0x1f9b2d[_0xe4e2('0x1f')]:_0x2d2018[_0xe4e2('0x1c')]+_0x2d2018[_0xe4e2('0x1d')];var _0x3dfbdf;if(_0x1d5e9d>=_0x340935){_0x1d5e9d=_0x340935;_0x3dfbdf=0xc8;}else{_0x3dfbdf=0xce;}_0x117a2a[_0xe4e2('0x1a')](_0x3dfbdf);return _0x117a2a[_0xe4e2('0x20')](_0xe4e2('0x21'),_0x196f16+'-'+_0x1d5e9d+'/'+_0x340935)[_0xe4e2('0x22')](_0x1f9b2d);}return null;};}function patchUpdates(_0x362741){return function(_0x5a84c5){try{jsonpatch[_0xe4e2('0x23')](_0x5a84c5,_0x362741,!![]);}catch(_0x2e7ecd){return BPromise[_0xe4e2('0x24')](_0x2e7ecd);}return _0x5a84c5[_0xe4e2('0x25')]();};}function saveUpdates(_0xbdf1ad,_0x23b466){return function(_0x16f14b){if(_0x16f14b){return _0x16f14b['update'](_0xbdf1ad)[_0xe4e2('0x26')](function(_0x2ab435){return _0x2ab435;});}return null;};}function removeEntity(_0x2088b9,_0x5373c0){return function(_0x353030){if(_0x353030){return _0x353030[_0xe4e2('0x27')]()['then'](function(){_0x2088b9[_0xe4e2('0x1a')](0xcc)[_0xe4e2('0x1b')]();});}};}function handleEntityNotFound(_0x29143c,_0x3f5265){return function(_0x249b7e){if(!_0x249b7e){_0x29143c['sendStatus'](0x194);}return _0x249b7e;};}function handleError(_0x166610,_0x357903){_0x357903=_0x357903||0x1f4;return function(_0x1f6d1f){logger['error'](_0x1f6d1f[_0xe4e2('0x28')]);if(_0x1f6d1f[_0xe4e2('0x29')]){delete _0x1f6d1f[_0xe4e2('0x29')];}_0x166610['status'](_0x357903)[_0xe4e2('0x2a')](_0x1f6d1f);};}exports['index']=function(_0x477b5c,_0x1e21c0){var _0x52c849={},_0x46926a={},_0x18e2e5={'count':0x0,'rows':[]};var _0x135116=_[_0xe4e2('0x2b')](db[_0xe4e2('0x2c')]['rawAttributes'],function(_0x5f30dc){return{'name':_0x5f30dc[_0xe4e2('0x2d')],'type':_0x5f30dc[_0xe4e2('0x2e')][_0xe4e2('0x2f')]};});_0x46926a[_0xe4e2('0x30')]=_[_0xe4e2('0x2b')](_0x135116,_0xe4e2('0x29'));_0x46926a[_0xe4e2('0x31')]=_[_0xe4e2('0x32')](_0x477b5c[_0xe4e2('0x31')]);_0x46926a[_0xe4e2('0x33')]=_[_0xe4e2('0x34')](_0x46926a[_0xe4e2('0x30')],_0x46926a['query']);_0x52c849[_0xe4e2('0x35')]=_[_0xe4e2('0x34')](_0x46926a[_0xe4e2('0x30')],qs[_0xe4e2('0x36')](_0x477b5c[_0xe4e2('0x31')][_0xe4e2('0x36')]));_0x52c849['attributes']=_0x52c849[_0xe4e2('0x35')][_0xe4e2('0x37')]?_0x52c849[_0xe4e2('0x35')]:_0x46926a[_0xe4e2('0x30')];if(!_0x477b5c[_0xe4e2('0x31')][_0xe4e2('0x38')](_0xe4e2('0x39'))){_0x52c849[_0xe4e2('0x1d')]=qs[_0xe4e2('0x1d')](_0x477b5c[_0xe4e2('0x31')][_0xe4e2('0x1d')]);_0x52c849['offset']=qs[_0xe4e2('0x1c')](_0x477b5c['query'][_0xe4e2('0x1c')]);}_0x52c849[_0xe4e2('0x3a')]=qs['sort'](_0x477b5c[_0xe4e2('0x31')][_0xe4e2('0x3b')]);_0x52c849[_0xe4e2('0x3c')]=qs[_0xe4e2('0x33')](_['pick'](_0x477b5c[_0xe4e2('0x31')],_0x46926a['filters']),_0x135116);if(_0x477b5c[_0xe4e2('0x31')]['filter']){_0x52c849[_0xe4e2('0x3c')]=_[_0xe4e2('0x3d')](_0x52c849[_0xe4e2('0x3c')],{'$or':_['map'](_0x135116,function(_0x2f5576){if(_0x2f5576[_0xe4e2('0x2e')]!=='VIRTUAL'){var _0x2b0f61={};_0x2b0f61[_0x2f5576[_0xe4e2('0x29')]]={'$like':'%'+_0x477b5c[_0xe4e2('0x31')][_0xe4e2('0x3e')]+'%'};return _0x2b0f61;}})});}_0x52c849=_[_0xe4e2('0x3d')]({},_0x52c849,_0x477b5c[_0xe4e2('0x3f')]);var _0x18fa94={'where':_0x52c849[_0xe4e2('0x3c')]};return db[_0xe4e2('0x2c')]['count'](_0x18fa94)['then'](function(_0xf4f15f){_0x18e2e5[_0xe4e2('0x1f')]=_0xf4f15f;if(_0x477b5c[_0xe4e2('0x31')][_0xe4e2('0x40')]){_0x52c849['include']=[{'all':!![]}];}return db['MailQueueReport'][_0xe4e2('0x41')](_0x52c849);})[_0xe4e2('0x26')](function(_0x3080d5){_0x18e2e5[_0xe4e2('0x42')]=_0x3080d5;return _0x18e2e5;})['then'](respondWithFilteredResult(_0x1e21c0,_0x52c849))[_0xe4e2('0x43')](handleError(_0x1e21c0,null));};exports[_0xe4e2('0x44')]=function(_0x385572,_0x577d4c){var _0x1b54f6={'raw':!![],'where':{'id':_0x385572[_0xe4e2('0x45')]['id']}},_0x4789cf={};_0x4789cf[_0xe4e2('0x30')]=_['keys'](db['MailQueueReport'][_0xe4e2('0x46')]);_0x4789cf[_0xe4e2('0x31')]=_[_0xe4e2('0x32')](_0x385572['query']);_0x4789cf[_0xe4e2('0x33')]=_[_0xe4e2('0x34')](_0x4789cf['model'],_0x4789cf[_0xe4e2('0x31')]);_0x1b54f6[_0xe4e2('0x35')]=_[_0xe4e2('0x34')](_0x4789cf[_0xe4e2('0x30')],qs[_0xe4e2('0x36')](_0x385572[_0xe4e2('0x31')][_0xe4e2('0x36')]));_0x1b54f6[_0xe4e2('0x35')]=_0x1b54f6['attributes'][_0xe4e2('0x37')]?_0x1b54f6[_0xe4e2('0x35')]:_0x4789cf['model'];if(_0x385572['query'][_0xe4e2('0x40')]){_0x1b54f6[_0xe4e2('0x47')]=[{'all':!![]}];}_0x1b54f6=_[_0xe4e2('0x3d')]({},_0x1b54f6,_0x385572['options']);return db[_0xe4e2('0x2c')][_0xe4e2('0x48')](_0x1b54f6)[_0xe4e2('0x26')](handleEntityNotFound(_0x577d4c,null))[_0xe4e2('0x26')](respondWithResult(_0x577d4c,null))['catch'](handleError(_0x577d4c,null));};exports[_0xe4e2('0x49')]=function(_0x918c17,_0x32a7c6){return db[_0xe4e2('0x2c')]['create'](_0x918c17[_0xe4e2('0x4a')],{})[_0xe4e2('0x26')](respondWithResult(_0x32a7c6,0xc9))['catch'](handleError(_0x32a7c6,null));};exports[_0xe4e2('0x4b')]=function(_0xedcd86,_0x21e5d7){if(_0xedcd86['body']['id']){delete _0xedcd86[_0xe4e2('0x4a')]['id'];}return db[_0xe4e2('0x2c')][_0xe4e2('0x48')]({'where':{'id':_0xedcd86['params']['id']}})['then'](handleEntityNotFound(_0x21e5d7,null))[_0xe4e2('0x26')](saveUpdates(_0xedcd86['body'],null))[_0xe4e2('0x26')](respondWithResult(_0x21e5d7,null))['catch'](handleError(_0x21e5d7,null));};exports[_0xe4e2('0x27')]=function(_0x2125df,_0x2a2e76){return db['MailQueueReport'][_0xe4e2('0x48')]({'where':{'id':_0x2125df['params']['id']}})[_0xe4e2('0x26')](handleEntityNotFound(_0x2a2e76,null))[_0xe4e2('0x26')](removeEntity(_0x2a2e76,null))['catch'](handleError(_0x2a2e76,null));};exports[_0xe4e2('0x4c')]=function(_0x582674,_0x169251){return db[_0xe4e2('0x2c')]['describe']()[_0xe4e2('0x26')](respondWithResult(_0x169251,null))[_0xe4e2('0x43')](handleError(_0x169251,null));}; \ No newline at end of file diff --git a/server/api/mailQueueReport/mailQueueReport.model.js b/server/api/mailQueueReport/mailQueueReport.model.js index 9a9e01d..98176f9 100644 --- a/server/api/mailQueueReport/mailQueueReport.model.js +++ b/server/api/mailQueueReport/mailQueueReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2275=['bluebird','request-promise','path','rimraf','../../config/environment','./mailQueueReport.attributes','exports','MailQueueReport','report_mail_queue','uniqueid','lodash','util','../../config/logger','api','moment'];(function(_0x4a17f0,_0x4f33cb){var _0x26bc7e=function(_0x17fdb3){while(--_0x17fdb3){_0x4a17f0['push'](_0x4a17f0['shift']());}};_0x26bc7e(++_0x4f33cb);}(_0x2275,0xfa));var _0x5227=function(_0x31af8b,_0x4393f8){_0x31af8b=_0x31af8b-0x0;var _0x179594=_0x2275[_0x31af8b];return _0x179594;};'use strict';var _=require(_0x5227('0x0'));var util=require(_0x5227('0x1'));var logger=require(_0x5227('0x2'))(_0x5227('0x3'));var moment=require(_0x5227('0x4'));var BPromise=require(_0x5227('0x5'));var rp=require(_0x5227('0x6'));var fs=require('fs');var path=require(_0x5227('0x7'));var rimraf=require(_0x5227('0x8'));var config=require(_0x5227('0x9'));var attributes=require(_0x5227('0xa'));module[_0x5227('0xb')]=function(_0x351ad1,_0x2abf3c){return _0x351ad1['define'](_0x5227('0xc'),attributes,{'tableName':_0x5227('0xd'),'paranoid':![],'indexes':[{'name':_0x5227('0xe'),'fields':[_0x5227('0xe')]}],'timestamps':!![]});}; \ No newline at end of file +var _0xc5e4=['define','report_mail_queue','uniqueid','util','../../config/logger','moment','bluebird','path','rimraf','../../config/environment','./mailQueueReport.attributes','exports'];(function(_0x16fefc,_0x299d76){var _0x1836f8=function(_0x32d3f1){while(--_0x32d3f1){_0x16fefc['push'](_0x16fefc['shift']());}};_0x1836f8(++_0x299d76);}(_0xc5e4,0x117));var _0x4c5e=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xc5e4[_0x321bb2];return _0x9c12ed;};'use strict';var _=require('lodash');var util=require(_0x4c5e('0x0'));var logger=require(_0x4c5e('0x1'))('api');var moment=require(_0x4c5e('0x2'));var BPromise=require(_0x4c5e('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x4c5e('0x4'));var rimraf=require(_0x4c5e('0x5'));var config=require(_0x4c5e('0x6'));var attributes=require(_0x4c5e('0x7'));module[_0x4c5e('0x8')]=function(_0x278244,_0x2c1a62){return _0x278244[_0x4c5e('0x9')]('MailQueueReport',attributes,{'tableName':_0x4c5e('0xa'),'paranoid':![],'indexes':[{'name':'uniqueid','fields':[_0x4c5e('0xb')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/mailQueueReport/mailQueueReport.rpc.js b/server/api/mailQueueReport/mailQueueReport.rpc.js index bb9288f..5115288 100644 --- a/server/api/mailQueueReport/mailQueueReport.rpc.js +++ b/server/api/mailQueueReport/mailQueueReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x326f=['error','code','message','result','catch','CreateMailQueueReport','MailQueueReport','options','raw','stringify','UpdateMailQueueReport','body','attributes','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','info','MailQueueReport,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x1bd4ee,_0x46aaaf){var _0x13d55e=function(_0x38df05){while(--_0x38df05){_0x1bd4ee['push'](_0x1bd4ee['shift']());}};_0x13d55e(++_0x46aaaf);}(_0x326f,0xd1));var _0xf326=function(_0x6f5338,_0x4e1986){_0x6f5338=_0x6f5338-0x0;var _0x5f0f33=_0x326f[_0x6f5338];return _0x5f0f33;};'use strict';var _=require(_0xf326('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xf326('0x1'));var rs=require(_0xf326('0x2'));var fs=require('fs');var Redis=require(_0xf326('0x3'));var db=require(_0xf326('0x4'))['db'];var utils=require(_0xf326('0x5'));var logger=require(_0xf326('0x6'))(_0xf326('0x7'));var config=require(_0xf326('0x8'));var jayson=require(_0xf326('0x9'));var client=jayson[_0xf326('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x3c254d,_0x3851eb,_0x165f95){return new BPromise(function(_0x1e7b8a,_0x515bfa){return client['request'](_0x3c254d,_0x165f95)['then'](function(_0x3bacf2){logger[_0xf326('0xb')](_0xf326('0xc'),_0x3851eb,_0xf326('0xd'));logger[_0xf326('0xe')]('MailQueueReport,\x20%s,\x20%s,\x20%s',_0x3851eb,_0xf326('0xd'),JSON['stringify'](_0x3bacf2));if(_0x3bacf2[_0xf326('0xf')]){if(_0x3bacf2['error'][_0xf326('0x10')]===0x1f4){logger['error'](_0xf326('0xc'),_0x3851eb,_0x3bacf2[_0xf326('0xf')]['message']);return _0x515bfa(_0x3bacf2[_0xf326('0xf')][_0xf326('0x11')]);}logger[_0xf326('0xf')](_0xf326('0xc'),_0x3851eb,_0x3bacf2['error'][_0xf326('0x11')]);return _0x1e7b8a(_0x3bacf2['error']['message']);}else{logger[_0xf326('0xb')](_0xf326('0xc'),_0x3851eb,_0xf326('0xd'));_0x1e7b8a(_0x3bacf2[_0xf326('0x12')][_0xf326('0x11')]);}})[_0xf326('0x13')](function(_0x34128e){logger[_0xf326('0xf')]('MailQueueReport,\x20%s,\x20%s',_0x3851eb,_0x34128e);_0x515bfa(_0x34128e);});});}exports[_0xf326('0x14')]=function(_0x453100){var _0x18bee3=this;return new Promise(function(_0x31ffb9,_0xcef2b5){return db[_0xf326('0x15')]['create'](_0x453100['body'],{'raw':_0x453100['options']?_0x453100[_0xf326('0x16')][_0xf326('0x17')]===undefined?!![]:![]:!![]})['then'](function(_0x4cabce){logger[_0xf326('0xb')]('CreateMailQueueReport',_0x453100);logger['debug'](_0xf326('0x14'),_0x453100,JSON[_0xf326('0x18')](_0x4cabce));_0x31ffb9(_0x4cabce);})['catch'](function(_0x5aa184){logger[_0xf326('0xf')](_0xf326('0x14'),_0x5aa184['message'],_0x453100);_0xcef2b5(_0x18bee3[_0xf326('0xf')](0x1f4,_0x5aa184[_0xf326('0x11')]));});});};exports[_0xf326('0x19')]=function(_0x295752){var _0x17c157=this;return new Promise(function(_0x2049ec,_0x5ce532){return db['MailQueueReport']['update'](_0x295752[_0xf326('0x1a')],{'raw':_0x295752[_0xf326('0x16')]?_0x295752[_0xf326('0x16')][_0xf326('0x17')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x295752[_0xf326('0x16')]?_0x295752[_0xf326('0x16')]['where']||null:null,'attributes':_0x295752[_0xf326('0x16')]?_0x295752[_0xf326('0x16')][_0xf326('0x1b')]||null:null,'limit':_0x295752['options']?_0x295752[_0xf326('0x16')]['limit']||null:null})['then'](function(_0x6a8e89){logger[_0xf326('0xb')](_0xf326('0x19'),_0x295752);logger['debug'](_0xf326('0x19'),_0x295752,JSON[_0xf326('0x18')](_0x6a8e89));_0x2049ec(_0x6a8e89);})['catch'](function(_0x225776){logger[_0xf326('0xf')](_0xf326('0x19'),_0x225776[_0xf326('0x11')],_0x295752);_0x5ce532(_0x17c157[_0xf326('0xf')](0x1f4,_0x225776[_0xf326('0x11')]));});});}; \ No newline at end of file +var _0x7a54=['moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','info','MailQueueReport,\x20%s,\x20%s','debug','stringify','error','code','message','request\x20sent','result','catch','MailQueueReport','create','body','options','raw','CreateMailQueueReport','UpdateMailQueueReport','update','where','attributes','limit','then','lodash','util'];(function(_0x593a84,_0x5df6d9){var _0x56c47b=function(_0x1b41b0){while(--_0x1b41b0){_0x593a84['push'](_0x593a84['shift']());}};_0x56c47b(++_0x5df6d9);}(_0x7a54,0x106));var _0x47a5=function(_0xb8c677,_0x1e9d0d){_0xb8c677=_0xb8c677-0x0;var _0x54b827=_0x7a54[_0xb8c677];return _0x54b827;};'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')]('MailQueueReport,\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);});});}exports['CreateMailQueueReport']=function(_0x5247fd){var _0x423a81=this;return new Promise(function(_0xaf70a6,_0x2ce454){return db[_0x47a5('0x15')][_0x47a5('0x16')](_0x5247fd[_0x47a5('0x17')],{'raw':_0x5247fd[_0x47a5('0x18')]?_0x5247fd[_0x47a5('0x18')][_0x47a5('0x19')]===undefined?!![]:![]:!![]})['then'](function(_0x1570bc){logger[_0x47a5('0xb')]('CreateMailQueueReport',_0x5247fd);logger[_0x47a5('0xd')](_0x47a5('0x1a'),_0x5247fd,JSON[_0x47a5('0xe')](_0x1570bc));_0xaf70a6(_0x1570bc);})['catch'](function(_0xb8ae6c){logger[_0x47a5('0xf')](_0x47a5('0x1a'),_0xb8ae6c[_0x47a5('0x11')],_0x5247fd);_0x2ce454(_0x423a81['error'](0x1f4,_0xb8ae6c[_0x47a5('0x11')]));});});};exports[_0x47a5('0x1b')]=function(_0x513981){var _0x28747d=this;return new Promise(function(_0xc4cd63,_0x4437f1){return db[_0x47a5('0x15')][_0x47a5('0x1c')](_0x513981['body'],{'raw':_0x513981['options']?_0x513981[_0x47a5('0x18')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x513981[_0x47a5('0x18')]?_0x513981['options'][_0x47a5('0x1d')]||null:null,'attributes':_0x513981[_0x47a5('0x18')]?_0x513981[_0x47a5('0x18')][_0x47a5('0x1e')]||null:null,'limit':_0x513981[_0x47a5('0x18')]?_0x513981[_0x47a5('0x18')][_0x47a5('0x1f')]||null:null})[_0x47a5('0x20')](function(_0x16631f){logger[_0x47a5('0xb')](_0x47a5('0x1b'),_0x513981);logger[_0x47a5('0xd')](_0x47a5('0x1b'),_0x513981,JSON['stringify'](_0x16631f));_0xc4cd63(_0x16631f);})[_0x47a5('0x14')](function(_0x51833b){logger[_0x47a5('0xf')](_0x47a5('0x1b'),_0x51833b[_0x47a5('0x11')],_0x513981);_0x4437f1(_0x28747d['error'](0x1f4,_0x51833b[_0x47a5('0x11')]));});});}; \ No newline at end of file diff --git a/server/api/mailServerIn/index.js b/server/api/mailServerIn/index.js index 8311ff0..d4ada1b 100644 --- a/server/api/mailServerIn/index.js +++ b/server/api/mailServerIn/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe706=['../../components/interaction/service','../../config/environment','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service'];(function(_0x28a3d1,_0x39e411){var _0x2a1a56=function(_0x285a4b){while(--_0x285a4b){_0x28a3d1['push'](_0x28a3d1['shift']());}};_0x2a1a56(++_0x39e411);}(_0xe706,0xa3));var _0x6e70=function(_0x28e4ec,_0x22f691){_0x28e4ec=_0x28e4ec-0x0;var _0x161a64=_0xe706[_0x28e4ec];return _0x161a64;};'use strict';var multer=require(_0x6e70('0x0'));var util=require(_0x6e70('0x1'));var path=require(_0x6e70('0x2'));var timeout=require('connect-timeout');var express=require(_0x6e70('0x3'));var router=express[_0x6e70('0x4')]();var fs_extra=require(_0x6e70('0x5'));var auth=require(_0x6e70('0x6'));var interaction=require(_0x6e70('0x7'));var config=require(_0x6e70('0x8'));module[_0x6e70('0x9')]=router; \ No newline at end of file +var _0xa9e0=['../../components/interaction/service','../../config/environment','exports','multer','util','path','Router','../../components/auth/service'];(function(_0x52d543,_0x4982e1){var _0x572ca0=function(_0x4af633){while(--_0x4af633){_0x52d543['push'](_0x52d543['shift']());}};_0x572ca0(++_0x4982e1);}(_0xa9e0,0x123));var _0x0a9e=function(_0x2d8fc2,_0x1c461d){_0x2d8fc2=_0x2d8fc2-0x0;var _0x3a9e53=_0xa9e0[_0x2d8fc2];return _0x3a9e53;};'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'));module[_0x0a9e('0x7')]=router; \ No newline at end of file diff --git a/server/api/mailServerIn/mailServerIn.attributes.js b/server/api/mailServerIn/mailServerIn.attributes.js index 56a1b68..94b768c 100644 --- a/server/api/mailServerIn/mailServerIn.attributes.js +++ b/server/api/mailServerIn/mailServerIn.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x06ef=['INTEGER','BOOLEAN','STRING'];(function(_0x378347,_0x59db26){var _0x145634=function(_0x6a38aa){while(--_0x6a38aa){_0x378347['push'](_0x378347['shift']());}};_0x145634(++_0x59db26);}(_0x06ef,0x185));var _0xf06e=function(_0x5a32fe,_0x2a038e){_0x5a32fe=_0x5a32fe-0x0;var _0x57d7f7=_0x06ef[_0x5a32fe];return _0x57d7f7;};'use strict';var Sequelize=require('sequelize');module['exports']={'description':{'type':Sequelize[_0xf06e('0x0')]},'host':{'type':Sequelize['STRING']},'authentication':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'user':{'type':Sequelize['STRING']},'password':{'type':Sequelize['STRING']},'port':{'type':Sequelize[_0xf06e('0x1')]},'tls':{'type':Sequelize[_0xf06e('0x2')],'defaultValue':!![]},'mailbox':{'type':Sequelize[_0xf06e('0x0')],'defaultValue':'INBOX'},'connTimeout':{'type':Sequelize[_0xf06e('0x1')],'defaultValue':0xa},'authTimeout':{'type':Sequelize[_0xf06e('0x1')],'defaultValue':0x5},'service':{'type':Sequelize['STRING']}}; \ No newline at end of file +var _0x1339=['INTEGER','STRING','BOOLEAN'];(function(_0xf61d62,_0x5e1ce1){var _0x1b8b00=function(_0x21dbba){while(--_0x21dbba){_0xf61d62['push'](_0xf61d62['shift']());}};_0x1b8b00(++_0x5e1ce1);}(_0x1339,0x1ed));var _0x9133=function(_0x21ab38,_0x5ab895){_0x21ab38=_0x21ab38-0x0;var _0x1884f8=_0x1339[_0x21ab38];return _0x1884f8;};'use strict';var Sequelize=require('sequelize');module['exports']={'description':{'type':Sequelize[_0x9133('0x0')]},'host':{'type':Sequelize[_0x9133('0x0')]},'authentication':{'type':Sequelize[_0x9133('0x1')],'defaultValue':!![]},'user':{'type':Sequelize[_0x9133('0x0')]},'password':{'type':Sequelize[_0x9133('0x0')]},'port':{'type':Sequelize[_0x9133('0x2')]},'tls':{'type':Sequelize[_0x9133('0x1')],'defaultValue':!![]},'mailbox':{'type':Sequelize[_0x9133('0x0')],'defaultValue':'INBOX'},'connTimeout':{'type':Sequelize[_0x9133('0x2')],'defaultValue':0xa},'authTimeout':{'type':Sequelize[_0x9133('0x2')],'defaultValue':0x5},'service':{'type':Sequelize[_0x9133('0x0')]}}; \ No newline at end of file diff --git a/server/api/mailServerIn/mailServerIn.model.js b/server/api/mailServerIn/mailServerIn.model.js index 01d7cbf..fbb8ec0 100644 --- a/server/api/mailServerIn/mailServerIn.model.js +++ b/server/api/mailServerIn/mailServerIn.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbfa9=['define','MailServerIn','mail_servers_in','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment','./mailServerIn.attributes'];(function(_0x2ad67f,_0x51738e){var _0x4d65fe=function(_0x25a506){while(--_0x25a506){_0x2ad67f['push'](_0x2ad67f['shift']());}};_0x4d65fe(++_0x51738e);}(_0xbfa9,0x162));var _0x9bfa=function(_0x1e24b1,_0x14ab30){_0x1e24b1=_0x1e24b1-0x0;var _0x212baf=_0xbfa9[_0x1e24b1];return _0x212baf;};'use strict';var _=require(_0x9bfa('0x0'));var util=require(_0x9bfa('0x1'));var logger=require(_0x9bfa('0x2'))(_0x9bfa('0x3'));var moment=require(_0x9bfa('0x4'));var BPromise=require(_0x9bfa('0x5'));var rp=require(_0x9bfa('0x6'));var fs=require('fs');var path=require(_0x9bfa('0x7'));var rimraf=require('rimraf');var config=require(_0x9bfa('0x8'));var attributes=require(_0x9bfa('0x9'));module['exports']=function(_0x5c8333,_0x3ad150){return _0x5c8333[_0x9bfa('0xa')](_0x9bfa('0xb'),attributes,{'tableName':_0x9bfa('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x001b=['util','../../config/logger','api','moment','rimraf','../../config/environment','exports','define','MailServerIn','lodash'];(function(_0x467e9a,_0x3f060b){var _0x54ab51=function(_0x275f7c){while(--_0x275f7c){_0x467e9a['push'](_0x467e9a['shift']());}};_0x54ab51(++_0x3f060b);}(_0x001b,0x1cb));var _0xb001=function(_0x28943b,_0x3ed46f){_0x28943b=_0x28943b-0x0;var _0x13fb21=_0x001b[_0x28943b];return _0x13fb21;};'use strict';var _=require(_0xb001('0x0'));var util=require(_0xb001('0x1'));var logger=require(_0xb001('0x2'))(_0xb001('0x3'));var moment=require(_0xb001('0x4'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xb001('0x5'));var config=require(_0xb001('0x6'));var attributes=require('./mailServerIn.attributes');module[_0xb001('0x7')]=function(_0x383986,_0x118104){return _0x383986[_0xb001('0x8')](_0xb001('0x9'),attributes,{'tableName':'mail_servers_in','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/mailServerIn/mailServerIn.rpc.js b/server/api/mailServerIn/mailServerIn.rpc.js index 1c6c072..1f63c3e 100644 --- a/server/api/mailServerIn/mailServerIn.rpc.js +++ b/server/api/mailServerIn/mailServerIn.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe3e5=['debug','MailServerIn,\x20%s,\x20%s,\x20%s','error','code','message','MailServerIn,\x20%s,\x20%s','result','catch','GetMailServerIn','findAll','options','raw','where','attributes','limit','include','map','model','then','stringify','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','info'];(function(_0x165c4e,_0x205034){var _0x2ee5a1=function(_0x23e900){while(--_0x23e900){_0x165c4e['push'](_0x165c4e['shift']());}};_0x2ee5a1(++_0x205034);}(_0xe3e5,0x77));var _0x5e3e=function(_0x26e7a3,_0x5bf88d){_0x26e7a3=_0x26e7a3-0x0;var _0x52f782=_0xe3e5[_0x26e7a3];return _0x52f782;};'use strict';var _=require(_0x5e3e('0x0'));var util=require(_0x5e3e('0x1'));var moment=require(_0x5e3e('0x2'));var BPromise=require(_0x5e3e('0x3'));var rs=require(_0x5e3e('0x4'));var fs=require('fs');var Redis=require(_0x5e3e('0x5'));var db=require(_0x5e3e('0x6'))['db'];var utils=require(_0x5e3e('0x7'));var logger=require(_0x5e3e('0x8'))(_0x5e3e('0x9'));var config=require(_0x5e3e('0xa'));var jayson=require(_0x5e3e('0xb'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x588af1,_0x4b528f,_0x1c2f12){return new BPromise(function(_0x1a6094,_0x2435e6){return client['request'](_0x588af1,_0x1c2f12)['then'](function(_0x4a0edd){logger[_0x5e3e('0xc')]('MailServerIn,\x20%s,\x20%s',_0x4b528f,'request\x20sent');logger[_0x5e3e('0xd')](_0x5e3e('0xe'),_0x4b528f,'request\x20sent',JSON['stringify'](_0x4a0edd));if(_0x4a0edd[_0x5e3e('0xf')]){if(_0x4a0edd[_0x5e3e('0xf')][_0x5e3e('0x10')]===0x1f4){logger[_0x5e3e('0xf')]('MailServerIn,\x20%s,\x20%s',_0x4b528f,_0x4a0edd['error']['message']);return _0x2435e6(_0x4a0edd[_0x5e3e('0xf')][_0x5e3e('0x11')]);}logger['error'](_0x5e3e('0x12'),_0x4b528f,_0x4a0edd['error'][_0x5e3e('0x11')]);return _0x1a6094(_0x4a0edd['error'][_0x5e3e('0x11')]);}else{logger[_0x5e3e('0xc')](_0x5e3e('0x12'),_0x4b528f,'request\x20sent');_0x1a6094(_0x4a0edd[_0x5e3e('0x13')][_0x5e3e('0x11')]);}})[_0x5e3e('0x14')](function(_0x5474cb){logger[_0x5e3e('0xf')](_0x5e3e('0x12'),_0x4b528f,_0x5474cb);_0x2435e6(_0x5474cb);});});}exports[_0x5e3e('0x15')]=function(_0x14ac67){var _0x294af0=this;return new Promise(function(_0x12cf69,_0x2115ba){return db['MailServerIn'][_0x5e3e('0x16')]({'raw':_0x14ac67[_0x5e3e('0x17')]?_0x14ac67[_0x5e3e('0x17')][_0x5e3e('0x18')]===undefined?!![]:![]:!![],'where':_0x14ac67['options']?_0x14ac67['options'][_0x5e3e('0x19')]||null:null,'attributes':_0x14ac67[_0x5e3e('0x17')]?_0x14ac67[_0x5e3e('0x17')][_0x5e3e('0x1a')]||null:null,'limit':_0x14ac67[_0x5e3e('0x17')]?_0x14ac67[_0x5e3e('0x17')][_0x5e3e('0x1b')]||null:null,'include':_0x14ac67[_0x5e3e('0x17')]?_0x14ac67[_0x5e3e('0x17')][_0x5e3e('0x1c')]?_[_0x5e3e('0x1d')](_0x14ac67['options'][_0x5e3e('0x1c')],function(_0x1ecde4){return{'model':db[_0x1ecde4[_0x5e3e('0x1e')]],'as':_0x1ecde4['as'],'attributes':_0x1ecde4['attributes'],'include':_0x1ecde4[_0x5e3e('0x1c')]?_['map'](_0x1ecde4[_0x5e3e('0x1c')],function(_0x250930){return{'model':db[_0x250930[_0x5e3e('0x1e')]],'as':_0x250930['as'],'attributes':_0x250930[_0x5e3e('0x1a')],'include':_0x250930[_0x5e3e('0x1c')]?_['map'](_0x250930[_0x5e3e('0x1c')],function(_0x3d9b64){return{'model':db[_0x3d9b64['model']],'as':_0x3d9b64['as'],'attributes':_0x3d9b64[_0x5e3e('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x5e3e('0x1f')](function(_0x46d8a9){logger[_0x5e3e('0xc')](_0x5e3e('0x15'),_0x14ac67);logger['debug'](_0x5e3e('0x15'),_0x14ac67,JSON[_0x5e3e('0x20')](_0x46d8a9));_0x12cf69(_0x46d8a9);})[_0x5e3e('0x14')](function(_0x5b0937){logger['error'](_0x5e3e('0x15'),_0x5b0937[_0x5e3e('0x11')],_0x14ac67);_0x2115ba(_0x294af0[_0x5e3e('0xf')](0x1f4,_0x5b0937[_0x5e3e('0x11')]));});});}; \ No newline at end of file +var _0xfac4=['http','request','then','MailServerIn,\x20%s,\x20%s','request\x20sent','stringify','message','error','result','catch','GetMailServerIn','MailServerIn','findAll','options','raw','attributes','limit','include','map','model','info','debug','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','client'];(function(_0x377a6e,_0x59b99d){var _0x37f751=function(_0x2ed25c){while(--_0x2ed25c){_0x377a6e['push'](_0x377a6e['shift']());}};_0x37f751(++_0x59b99d);}(_0xfac4,0xb1));var _0x4fac=function(_0x34f89e,_0x3d525d){_0x34f89e=_0x34f89e-0x0;var _0x80fea=_0xfac4[_0x34f89e];return _0x80fea;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x4fac('0x0'));var BPromise=require(_0x4fac('0x1'));var rs=require(_0x4fac('0x2'));var fs=require('fs');var Redis=require(_0x4fac('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x4fac('0x4'));var logger=require(_0x4fac('0x5'))(_0x4fac('0x6'));var config=require(_0x4fac('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x4fac('0x8')][_0x4fac('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2c624e,_0x183254,_0x357d34){return new BPromise(function(_0x3b5c0f,_0xa0e95e){return client[_0x4fac('0xa')](_0x2c624e,_0x357d34)[_0x4fac('0xb')](function(_0x5aabcb){logger['info'](_0x4fac('0xc'),_0x183254,_0x4fac('0xd'));logger['debug']('MailServerIn,\x20%s,\x20%s,\x20%s',_0x183254,_0x4fac('0xd'),JSON[_0x4fac('0xe')](_0x5aabcb));if(_0x5aabcb['error']){if(_0x5aabcb['error']['code']===0x1f4){logger['error'](_0x4fac('0xc'),_0x183254,_0x5aabcb['error'][_0x4fac('0xf')]);return _0xa0e95e(_0x5aabcb[_0x4fac('0x10')][_0x4fac('0xf')]);}logger['error'](_0x4fac('0xc'),_0x183254,_0x5aabcb[_0x4fac('0x10')][_0x4fac('0xf')]);return _0x3b5c0f(_0x5aabcb['error'][_0x4fac('0xf')]);}else{logger['info'](_0x4fac('0xc'),_0x183254,_0x4fac('0xd'));_0x3b5c0f(_0x5aabcb[_0x4fac('0x11')][_0x4fac('0xf')]);}})[_0x4fac('0x12')](function(_0x5ace99){logger[_0x4fac('0x10')](_0x4fac('0xc'),_0x183254,_0x5ace99);_0xa0e95e(_0x5ace99);});});}exports[_0x4fac('0x13')]=function(_0x46ffb4){var _0xdc76a9=this;return new Promise(function(_0x3bf5d7,_0x4a1f4d){return db[_0x4fac('0x14')][_0x4fac('0x15')]({'raw':_0x46ffb4[_0x4fac('0x16')]?_0x46ffb4[_0x4fac('0x16')][_0x4fac('0x17')]===undefined?!![]:![]:!![],'where':_0x46ffb4[_0x4fac('0x16')]?_0x46ffb4[_0x4fac('0x16')]['where']||null:null,'attributes':_0x46ffb4['options']?_0x46ffb4[_0x4fac('0x16')][_0x4fac('0x18')]||null:null,'limit':_0x46ffb4[_0x4fac('0x16')]?_0x46ffb4[_0x4fac('0x16')][_0x4fac('0x19')]||null:null,'include':_0x46ffb4[_0x4fac('0x16')]?_0x46ffb4[_0x4fac('0x16')][_0x4fac('0x1a')]?_[_0x4fac('0x1b')](_0x46ffb4['options'][_0x4fac('0x1a')],function(_0x262f0e){return{'model':db[_0x262f0e[_0x4fac('0x1c')]],'as':_0x262f0e['as'],'attributes':_0x262f0e['attributes'],'include':_0x262f0e[_0x4fac('0x1a')]?_[_0x4fac('0x1b')](_0x262f0e['include'],function(_0x47e886){return{'model':db[_0x47e886[_0x4fac('0x1c')]],'as':_0x47e886['as'],'attributes':_0x47e886['attributes'],'include':_0x47e886['include']?_['map'](_0x47e886[_0x4fac('0x1a')],function(_0x3e7b0d){return{'model':db[_0x3e7b0d[_0x4fac('0x1c')]],'as':_0x3e7b0d['as'],'attributes':_0x3e7b0d[_0x4fac('0x18')]};}):[]};}):[]};}):[]:[]})[_0x4fac('0xb')](function(_0x58d827){logger[_0x4fac('0x1d')](_0x4fac('0x13'),_0x46ffb4);logger[_0x4fac('0x1e')](_0x4fac('0x13'),_0x46ffb4,JSON[_0x4fac('0xe')](_0x58d827));_0x3bf5d7(_0x58d827);})[_0x4fac('0x12')](function(_0x56e602){logger[_0x4fac('0x10')](_0x4fac('0x13'),_0x56e602[_0x4fac('0xf')],_0x46ffb4);_0x4a1f4d(_0xdc76a9[_0x4fac('0x10')](0x1f4,_0x56e602[_0x4fac('0xf')]));});});}; \ No newline at end of file diff --git a/server/api/mailServerOut/index.js b/server/api/mailServerOut/index.js index 5f4c6cc..8b16c97 100644 --- a/server/api/mailServerOut/index.js +++ b/server/api/mailServerOut/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7a54=['index','/:id','isAuthenticated','post','delete','destroy','exports','multer','util','path','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./mailServerOut.controller','get'];(function(_0x47e7cb,_0x4c1b8d){var _0x2a8874=function(_0x36498f){while(--_0x36498f){_0x47e7cb['push'](_0x47e7cb['shift']());}};_0x2a8874(++_0x4c1b8d);}(_0x7a54,0x106));var _0x47a5=function(_0x41848e,_0x243919){_0x41848e=_0x41848e-0x0;var _0x495a23=_0x7a54[_0x41848e];return _0x495a23;};'use strict';var multer=require(_0x47a5('0x0'));var util=require(_0x47a5('0x1'));var path=require(_0x47a5('0x2'));var timeout=require('connect-timeout');var express=require(_0x47a5('0x3'));var router=express[_0x47a5('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x47a5('0x5'));var interaction=require(_0x47a5('0x6'));var config=require(_0x47a5('0x7'));var controller=require(_0x47a5('0x8'));router[_0x47a5('0x9')]('/',auth['isAuthenticated'](),controller[_0x47a5('0xa')]);router['get'](_0x47a5('0xb'),auth[_0x47a5('0xc')](),controller['show']);router[_0x47a5('0xd')]('/',auth['isAuthenticated'](),controller['create']);router['put'](_0x47a5('0xb'),auth[_0x47a5('0xc')](),controller['update']);router[_0x47a5('0xe')]('/:id',auth['isAuthenticated'](),controller[_0x47a5('0xf')]);module[_0x47a5('0x10')]=router; \ No newline at end of file +var _0x9957=['multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./mailServerOut.controller','get','isAuthenticated','index','/:id','show','post','create','put','update','delete','destroy','exports'];(function(_0x2576d7,_0x167624){var _0x16a08c=function(_0x19de1e){while(--_0x19de1e){_0x2576d7['push'](_0x2576d7['shift']());}};_0x16a08c(++_0x167624);}(_0x9957,0x93));var _0x7995=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0x9957[_0x2dafbe];return _0x58a45a;};'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('0xe')]('/',auth['isAuthenticated'](),controller[_0x7995('0xf')]);router[_0x7995('0x10')](_0x7995('0xc'),auth[_0x7995('0xa')](),controller[_0x7995('0x11')]);router[_0x7995('0x12')](_0x7995('0xc'),auth['isAuthenticated'](),controller[_0x7995('0x13')]);module[_0x7995('0x14')]=router; \ No newline at end of file diff --git a/server/api/mailServerOut/mailServerOut.attributes.js b/server/api/mailServerOut/mailServerOut.attributes.js index 9790a5b..84834eb 100644 --- a/server/api/mailServerOut/mailServerOut.attributes.js +++ b/server/api/mailServerOut/mailServerOut.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5c25=['STRING','INTEGER','BOOLEAN'];(function(_0x2f3b90,_0x567ebd){var _0x32907d=function(_0x4698bb){while(--_0x4698bb){_0x2f3b90['push'](_0x2f3b90['shift']());}};_0x32907d(++_0x567ebd);}(_0x5c25,0xf9));var _0x55c2=function(_0x1f0fb8,_0x295ad6){_0x1f0fb8=_0x1f0fb8-0x0;var _0x300ee2=_0x5c25[_0x1f0fb8];return _0x300ee2;};'use strict';var Sequelize=require('sequelize');module['exports']={'description':{'type':Sequelize[_0x55c2('0x0')]},'host':{'type':Sequelize['STRING']},'user':{'type':Sequelize[_0x55c2('0x0')]},'pass':{'type':Sequelize[_0x55c2('0x0')]},'port':{'type':Sequelize[_0x55c2('0x1')]},'secure':{'type':Sequelize[_0x55c2('0x2')],'defaultValue':![]},'service':{'type':Sequelize[_0x55c2('0x0')]},'authentication':{'type':Sequelize[_0x55c2('0x2')],'defaultValue':!![]}}; \ No newline at end of file +var _0x3ef6=['STRING','BOOLEAN','sequelize'];(function(_0x51beba,_0x202d19){var _0x167ee0=function(_0x2d5b21){while(--_0x2d5b21){_0x51beba['push'](_0x51beba['shift']());}};_0x167ee0(++_0x202d19);}(_0x3ef6,0x143));var _0x63ef=function(_0x3b4922,_0x2fa365){_0x3b4922=_0x3b4922-0x0;var _0x239729=_0x3ef6[_0x3b4922];return _0x239729;};'use strict';var Sequelize=require(_0x63ef('0x0'));module['exports']={'description':{'type':Sequelize[_0x63ef('0x1')]},'host':{'type':Sequelize[_0x63ef('0x1')]},'user':{'type':Sequelize['STRING']},'pass':{'type':Sequelize[_0x63ef('0x1')]},'port':{'type':Sequelize['INTEGER']},'secure':{'type':Sequelize[_0x63ef('0x2')],'defaultValue':![]},'service':{'type':Sequelize[_0x63ef('0x1')]},'authentication':{'type':Sequelize[_0x63ef('0x2')],'defaultValue':!![]}}; \ No newline at end of file diff --git a/server/api/mailServerOut/mailServerOut.controller.js b/server/api/mailServerOut/mailServerOut.controller.js index 1dfe73a..d4fc6d4 100644 --- a/server/api/mailServerOut/mailServerOut.controller.js +++ b/server/api/mailServerOut/mailServerOut.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x10d4=['eml-format','rimraf','zip-dir','moment','bluebird','mustache','util','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','end','limit','undefined','count','offset','set','Content-Range','json','apply','reject','save','update','then','destroy','error','stack','name','send','index','map','MailServerOut','rawAttributes','fieldName','type','key','model','query','keys','attributes','intersection','fields','hasOwnProperty','nolimit','order','sort','where','filters','filter','merge','VIRTUAL','options','include','rows','show','length','includeAll','find','catch','create','body','params'];(function(_0x9c495b,_0xf44a33){var _0x1faacb=function(_0x287ea0){while(--_0x287ea0){_0x9c495b['push'](_0x9c495b['shift']());}};_0x1faacb(++_0xf44a33);}(_0x10d4,0x1ce));var _0x410d=function(_0x3aa6ab,_0x3b5f7c){_0x3aa6ab=_0x3aa6ab-0x0;var _0x5789d7=_0x10d4[_0x3aa6ab];return _0x5789d7;};'use strict';var emlformat=require(_0x410d('0x0'));var rimraf=require(_0x410d('0x1'));var zipdir=require(_0x410d('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x410d('0x3'));var BPromise=require(_0x410d('0x4'));var Mustache=require(_0x410d('0x5'));var util=require(_0x410d('0x6'));var path=require('path');var sox=require('sox');var csv=require(_0x410d('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x410d('0x8'));var _=require(_0x410d('0x9'));var squel=require(_0x410d('0xa'));var crypto=require(_0x410d('0xb'));var jsforce=require(_0x410d('0xc'));var deskjs=require(_0x410d('0xd'));var toCsv=require('to-csv');var querystring=require(_0x410d('0xe'));var Papa=require(_0x410d('0xf'));var Redis=require('ioredis');var authService=require(_0x410d('0x10'));var qs=require(_0x410d('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x410d('0x12'));var logger=require(_0x410d('0x13'))(_0x410d('0x14'));var utils=require(_0x410d('0x15'));var config=require(_0x410d('0x16'));var licenseUtil=require(_0x410d('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x1ec152,_0x11f561){_0x11f561=_0x11f561||0xcc;return function(_0x2763bf){if(_0x2763bf){return _0x1ec152[_0x410d('0x18')](_0x11f561);}return _0x1ec152[_0x410d('0x19')](_0x11f561)[_0x410d('0x1a')]();};}function respondWithResult(_0x2fffc5,_0x2b36f3){_0x2b36f3=_0x2b36f3||0xc8;return function(_0x32f5a1){if(_0x32f5a1){return _0x2fffc5['status'](_0x2b36f3)['json'](_0x32f5a1);}};}function respondWithFilteredResult(_0x4faf26,_0x554b53){return function(_0x21fc88){if(_0x21fc88){var _0x8f8368=typeof _0x554b53['offset']==='undefined'&&typeof _0x554b53[_0x410d('0x1b')]===_0x410d('0x1c');var _0x59b1f9=_0x21fc88[_0x410d('0x1d')];var _0x4eb801=_0x8f8368?0x0:_0x554b53[_0x410d('0x1e')];var _0x43a168=_0x8f8368?_0x21fc88[_0x410d('0x1d')]:_0x554b53[_0x410d('0x1e')]+_0x554b53[_0x410d('0x1b')];var _0x20ef97;if(_0x43a168>=_0x59b1f9){_0x43a168=_0x59b1f9;_0x20ef97=0xc8;}else{_0x20ef97=0xce;}_0x4faf26[_0x410d('0x19')](_0x20ef97);return _0x4faf26[_0x410d('0x1f')](_0x410d('0x20'),_0x4eb801+'-'+_0x43a168+'/'+_0x59b1f9)[_0x410d('0x21')](_0x21fc88);}return null;};}function patchUpdates(_0x1dfbab){return function(_0x1c0b0d){try{jsonpatch[_0x410d('0x22')](_0x1c0b0d,_0x1dfbab,!![]);}catch(_0x39d4d6){return BPromise[_0x410d('0x23')](_0x39d4d6);}return _0x1c0b0d[_0x410d('0x24')]();};}function saveUpdates(_0x8f295a,_0x351bb6){return function(_0x226c15){if(_0x226c15){return _0x226c15[_0x410d('0x25')](_0x8f295a)[_0x410d('0x26')](function(_0x229659){return _0x229659;});}return null;};}function removeEntity(_0x3ed0f2,_0x46425a){return function(_0x5803cb){if(_0x5803cb){return _0x5803cb[_0x410d('0x27')]()[_0x410d('0x26')](function(){_0x3ed0f2[_0x410d('0x19')](0xcc)[_0x410d('0x1a')]();});}};}function handleEntityNotFound(_0x2ec82e,_0x56e3c5){return function(_0x32ffb3){if(!_0x32ffb3){_0x2ec82e[_0x410d('0x18')](0x194);}return _0x32ffb3;};}function handleError(_0x2a74aa,_0x491b76){_0x491b76=_0x491b76||0x1f4;return function(_0x29cdae){logger[_0x410d('0x28')](_0x29cdae[_0x410d('0x29')]);if(_0x29cdae[_0x410d('0x2a')]){delete _0x29cdae[_0x410d('0x2a')];}_0x2a74aa[_0x410d('0x19')](_0x491b76)[_0x410d('0x2b')](_0x29cdae);};}exports[_0x410d('0x2c')]=function(_0x34b341,_0x1edae6){var _0x43036c={},_0x45f5ef={},_0x3b8b41={'count':0x0,'rows':[]};var _0x253baf=_[_0x410d('0x2d')](db[_0x410d('0x2e')][_0x410d('0x2f')],function(_0x1e604b){return{'name':_0x1e604b[_0x410d('0x30')],'type':_0x1e604b[_0x410d('0x31')][_0x410d('0x32')]};});_0x45f5ef[_0x410d('0x33')]=_[_0x410d('0x2d')](_0x253baf,_0x410d('0x2a'));_0x45f5ef[_0x410d('0x34')]=_[_0x410d('0x35')](_0x34b341[_0x410d('0x34')]);_0x45f5ef['filters']=_['intersection'](_0x45f5ef[_0x410d('0x33')],_0x45f5ef['query']);_0x43036c[_0x410d('0x36')]=_[_0x410d('0x37')](_0x45f5ef['model'],qs['fields'](_0x34b341[_0x410d('0x34')][_0x410d('0x38')]));_0x43036c[_0x410d('0x36')]=_0x43036c[_0x410d('0x36')]['length']?_0x43036c[_0x410d('0x36')]:_0x45f5ef[_0x410d('0x33')];if(!_0x34b341[_0x410d('0x34')][_0x410d('0x39')](_0x410d('0x3a'))){_0x43036c[_0x410d('0x1b')]=qs[_0x410d('0x1b')](_0x34b341[_0x410d('0x34')][_0x410d('0x1b')]);_0x43036c['offset']=qs['offset'](_0x34b341['query'][_0x410d('0x1e')]);}_0x43036c[_0x410d('0x3b')]=qs[_0x410d('0x3c')](_0x34b341[_0x410d('0x34')][_0x410d('0x3c')]);_0x43036c[_0x410d('0x3d')]=qs[_0x410d('0x3e')](_['pick'](_0x34b341[_0x410d('0x34')],_0x45f5ef[_0x410d('0x3e')]),_0x253baf);if(_0x34b341[_0x410d('0x34')][_0x410d('0x3f')]){_0x43036c[_0x410d('0x3d')]=_[_0x410d('0x40')](_0x43036c['where'],{'$or':_[_0x410d('0x2d')](_0x253baf,function(_0x57e0b4){if(_0x57e0b4['type']!==_0x410d('0x41')){var _0x2c9f0e={};_0x2c9f0e[_0x57e0b4[_0x410d('0x2a')]]={'$like':'%'+_0x34b341['query'][_0x410d('0x3f')]+'%'};return _0x2c9f0e;}})});}_0x43036c=_[_0x410d('0x40')]({},_0x43036c,_0x34b341[_0x410d('0x42')]);var _0x28fc81={'where':_0x43036c[_0x410d('0x3d')]};return db[_0x410d('0x2e')][_0x410d('0x1d')](_0x28fc81)[_0x410d('0x26')](function(_0x52cf84){_0x3b8b41[_0x410d('0x1d')]=_0x52cf84;if(_0x34b341[_0x410d('0x34')]['includeAll']){_0x43036c[_0x410d('0x43')]=[{'all':!![]}];}return db['MailServerOut']['findAll'](_0x43036c);})[_0x410d('0x26')](function(_0x43a001){_0x3b8b41[_0x410d('0x44')]=_0x43a001;return _0x3b8b41;})[_0x410d('0x26')](respondWithFilteredResult(_0x1edae6,_0x43036c))['catch'](handleError(_0x1edae6,null));};exports[_0x410d('0x45')]=function(_0x5c5b13,_0x41f8bf){var _0x59efd2={'raw':!![],'where':{'id':_0x5c5b13['params']['id']}},_0x50886b={};_0x50886b[_0x410d('0x33')]=_[_0x410d('0x35')](db[_0x410d('0x2e')][_0x410d('0x2f')]);_0x50886b['query']=_[_0x410d('0x35')](_0x5c5b13[_0x410d('0x34')]);_0x50886b[_0x410d('0x3e')]=_[_0x410d('0x37')](_0x50886b[_0x410d('0x33')],_0x50886b[_0x410d('0x34')]);_0x59efd2[_0x410d('0x36')]=_['intersection'](_0x50886b[_0x410d('0x33')],qs[_0x410d('0x38')](_0x5c5b13[_0x410d('0x34')][_0x410d('0x38')]));_0x59efd2[_0x410d('0x36')]=_0x59efd2[_0x410d('0x36')][_0x410d('0x46')]?_0x59efd2[_0x410d('0x36')]:_0x50886b[_0x410d('0x33')];if(_0x5c5b13[_0x410d('0x34')][_0x410d('0x47')]){_0x59efd2['include']=[{'all':!![]}];}_0x59efd2=_[_0x410d('0x40')]({},_0x59efd2,_0x5c5b13[_0x410d('0x42')]);return db[_0x410d('0x2e')][_0x410d('0x48')](_0x59efd2)['then'](handleEntityNotFound(_0x41f8bf,null))[_0x410d('0x26')](respondWithResult(_0x41f8bf,null))[_0x410d('0x49')](handleError(_0x41f8bf,null));};exports['create']=function(_0x562fbc,_0x5dabd9){return db[_0x410d('0x2e')][_0x410d('0x4a')](_0x562fbc[_0x410d('0x4b')],{})['then'](respondWithResult(_0x5dabd9,0xc9))[_0x410d('0x49')](handleError(_0x5dabd9,null));};exports[_0x410d('0x25')]=function(_0x50dec0,_0x108af2){if(_0x50dec0[_0x410d('0x4b')]['id']){delete _0x50dec0[_0x410d('0x4b')]['id'];}return db['MailServerOut'][_0x410d('0x48')]({'where':{'id':_0x50dec0[_0x410d('0x4c')]['id']}})[_0x410d('0x26')](handleEntityNotFound(_0x108af2,null))[_0x410d('0x26')](saveUpdates(_0x50dec0['body'],null))[_0x410d('0x26')](respondWithResult(_0x108af2,null))[_0x410d('0x49')](handleError(_0x108af2,null));};exports[_0x410d('0x27')]=function(_0x32f410,_0x46ba4e){return db['MailServerOut']['find']({'where':{'id':_0x32f410[_0x410d('0x4c')]['id']}})[_0x410d('0x26')](handleEntityNotFound(_0x46ba4e,null))[_0x410d('0x26')](removeEntity(_0x46ba4e,null))[_0x410d('0x49')](handleError(_0x46ba4e,null));}; \ No newline at end of file +var _0xcdc2=['ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','json','offset','undefined','limit','count','Content-Range','update','destroy','then','end','error','stack','name','send','MailServerOut','fieldName','key','query','keys','filters','intersection','attributes','model','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','map','type','options','includeAll','findAll','rows','catch','show','params','rawAttributes','create','body','find','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv'];(function(_0x2fe243,_0x378bc9){var _0x85f231=function(_0x4989d){while(--_0x4989d){_0x2fe243['push'](_0x2fe243['shift']());}};_0x85f231(++_0x378bc9);}(_0xcdc2,0x172));var _0x2cdc=function(_0x2d71de,_0x3e5649){_0x2d71de=_0x2d71de-0x0;var _0x342f08=_0xcdc2[_0x2d71de];return _0x342f08;};'use strict';var emlformat=require(_0x2cdc('0x0'));var rimraf=require(_0x2cdc('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x2cdc('0x2'));var rp=require(_0x2cdc('0x3'));var moment=require(_0x2cdc('0x4'));var BPromise=require(_0x2cdc('0x5'));var Mustache=require(_0x2cdc('0x6'));var util=require('util');var path=require(_0x2cdc('0x7'));var sox=require(_0x2cdc('0x8'));var csv=require(_0x2cdc('0x9'));var ejs=require(_0x2cdc('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x2cdc('0xb'));var squel=require(_0x2cdc('0xc'));var crypto=require(_0x2cdc('0xd'));var jsforce=require(_0x2cdc('0xe'));var deskjs=require(_0x2cdc('0xf'));var toCsv=require('to-csv');var querystring=require(_0x2cdc('0x10'));var Papa=require(_0x2cdc('0x11'));var Redis=require(_0x2cdc('0x12'));var authService=require(_0x2cdc('0x13'));var qs=require(_0x2cdc('0x14'));var as=require(_0x2cdc('0x15'));var hardwareService=require(_0x2cdc('0x16'));var logger=require(_0x2cdc('0x17'))(_0x2cdc('0x18'));var utils=require(_0x2cdc('0x19'));var config=require(_0x2cdc('0x1a'));var licenseUtil=require(_0x2cdc('0x1b'));var db=require(_0x2cdc('0x1c'))['db'];function respondWithStatusCode(_0x553ee9,_0x5ad7cf){_0x5ad7cf=_0x5ad7cf||0xcc;return function(_0x140bae){if(_0x140bae){return _0x553ee9['sendStatus'](_0x5ad7cf);}return _0x553ee9[_0x2cdc('0x1d')](_0x5ad7cf)['end']();};}function respondWithResult(_0x9fc7ce,_0x3b5387){_0x3b5387=_0x3b5387||0xc8;return function(_0x41feaf){if(_0x41feaf){return _0x9fc7ce[_0x2cdc('0x1d')](_0x3b5387)[_0x2cdc('0x1e')](_0x41feaf);}};}function respondWithFilteredResult(_0x5604bf,_0x4e8fe7){return function(_0x378a2e){if(_0x378a2e){var _0x2574f4=typeof _0x4e8fe7[_0x2cdc('0x1f')]===_0x2cdc('0x20')&&typeof _0x4e8fe7[_0x2cdc('0x21')]===_0x2cdc('0x20');var _0x1ab4d4=_0x378a2e[_0x2cdc('0x22')];var _0x24e6d5=_0x2574f4?0x0:_0x4e8fe7[_0x2cdc('0x1f')];var _0x156103=_0x2574f4?_0x378a2e['count']:_0x4e8fe7['offset']+_0x4e8fe7[_0x2cdc('0x21')];var _0x12564f;if(_0x156103>=_0x1ab4d4){_0x156103=_0x1ab4d4;_0x12564f=0xc8;}else{_0x12564f=0xce;}_0x5604bf[_0x2cdc('0x1d')](_0x12564f);return _0x5604bf['set'](_0x2cdc('0x23'),_0x24e6d5+'-'+_0x156103+'/'+_0x1ab4d4)[_0x2cdc('0x1e')](_0x378a2e);}return null;};}function patchUpdates(_0x5cb239){return function(_0xd822b3){try{jsonpatch['apply'](_0xd822b3,_0x5cb239,!![]);}catch(_0x44ae1f){return BPromise['reject'](_0x44ae1f);}return _0xd822b3['save']();};}function saveUpdates(_0x362cae,_0x1b14f5){return function(_0x4ace56){if(_0x4ace56){return _0x4ace56[_0x2cdc('0x24')](_0x362cae)['then'](function(_0x270c9c){return _0x270c9c;});}return null;};}function removeEntity(_0x20ed3d,_0x3ca647){return function(_0xc39722){if(_0xc39722){return _0xc39722[_0x2cdc('0x25')]()[_0x2cdc('0x26')](function(){_0x20ed3d[_0x2cdc('0x1d')](0xcc)[_0x2cdc('0x27')]();});}};}function handleEntityNotFound(_0x59cf3f,_0x296d39){return function(_0x472ca4){if(!_0x472ca4){_0x59cf3f['sendStatus'](0x194);}return _0x472ca4;};}function handleError(_0x3c1704,_0x243c6c){_0x243c6c=_0x243c6c||0x1f4;return function(_0x339572){logger[_0x2cdc('0x28')](_0x339572[_0x2cdc('0x29')]);if(_0x339572[_0x2cdc('0x2a')]){delete _0x339572[_0x2cdc('0x2a')];}_0x3c1704[_0x2cdc('0x1d')](_0x243c6c)[_0x2cdc('0x2b')](_0x339572);};}exports['index']=function(_0x4e8b1b,_0xbea89e){var _0x346bf7={},_0x2f62b5={},_0x5dc0bc={'count':0x0,'rows':[]};var _0x2972c7=_['map'](db[_0x2cdc('0x2c')]['rawAttributes'],function(_0x699ee){return{'name':_0x699ee[_0x2cdc('0x2d')],'type':_0x699ee['type'][_0x2cdc('0x2e')]};});_0x2f62b5['model']=_['map'](_0x2972c7,_0x2cdc('0x2a'));_0x2f62b5[_0x2cdc('0x2f')]=_[_0x2cdc('0x30')](_0x4e8b1b[_0x2cdc('0x2f')]);_0x2f62b5[_0x2cdc('0x31')]=_[_0x2cdc('0x32')](_0x2f62b5['model'],_0x2f62b5[_0x2cdc('0x2f')]);_0x346bf7[_0x2cdc('0x33')]=_[_0x2cdc('0x32')](_0x2f62b5[_0x2cdc('0x34')],qs[_0x2cdc('0x35')](_0x4e8b1b['query']['fields']));_0x346bf7[_0x2cdc('0x33')]=_0x346bf7[_0x2cdc('0x33')][_0x2cdc('0x36')]?_0x346bf7[_0x2cdc('0x33')]:_0x2f62b5[_0x2cdc('0x34')];if(!_0x4e8b1b[_0x2cdc('0x2f')][_0x2cdc('0x37')](_0x2cdc('0x38'))){_0x346bf7[_0x2cdc('0x21')]=qs[_0x2cdc('0x21')](_0x4e8b1b[_0x2cdc('0x2f')][_0x2cdc('0x21')]);_0x346bf7[_0x2cdc('0x1f')]=qs[_0x2cdc('0x1f')](_0x4e8b1b[_0x2cdc('0x2f')][_0x2cdc('0x1f')]);}_0x346bf7[_0x2cdc('0x39')]=qs[_0x2cdc('0x3a')](_0x4e8b1b['query'][_0x2cdc('0x3a')]);_0x346bf7[_0x2cdc('0x3b')]=qs[_0x2cdc('0x31')](_[_0x2cdc('0x3c')](_0x4e8b1b[_0x2cdc('0x2f')],_0x2f62b5[_0x2cdc('0x31')]),_0x2972c7);if(_0x4e8b1b[_0x2cdc('0x2f')][_0x2cdc('0x3d')]){_0x346bf7[_0x2cdc('0x3b')]=_[_0x2cdc('0x3e')](_0x346bf7[_0x2cdc('0x3b')],{'$or':_[_0x2cdc('0x3f')](_0x2972c7,function(_0x2c33a4){if(_0x2c33a4[_0x2cdc('0x40')]!=='VIRTUAL'){var _0x3110e5={};_0x3110e5[_0x2c33a4[_0x2cdc('0x2a')]]={'$like':'%'+_0x4e8b1b[_0x2cdc('0x2f')][_0x2cdc('0x3d')]+'%'};return _0x3110e5;}})});}_0x346bf7=_['merge']({},_0x346bf7,_0x4e8b1b[_0x2cdc('0x41')]);var _0x5caf62={'where':_0x346bf7['where']};return db[_0x2cdc('0x2c')][_0x2cdc('0x22')](_0x5caf62)['then'](function(_0x1c21a1){_0x5dc0bc[_0x2cdc('0x22')]=_0x1c21a1;if(_0x4e8b1b['query'][_0x2cdc('0x42')]){_0x346bf7['include']=[{'all':!![]}];}return db[_0x2cdc('0x2c')][_0x2cdc('0x43')](_0x346bf7);})[_0x2cdc('0x26')](function(_0x214b1a){_0x5dc0bc[_0x2cdc('0x44')]=_0x214b1a;return _0x5dc0bc;})[_0x2cdc('0x26')](respondWithFilteredResult(_0xbea89e,_0x346bf7))[_0x2cdc('0x45')](handleError(_0xbea89e,null));};exports[_0x2cdc('0x46')]=function(_0xeed75b,_0x4af025){var _0x3e69c3={'raw':!![],'where':{'id':_0xeed75b[_0x2cdc('0x47')]['id']}},_0x2e2da9={};_0x2e2da9['model']=_['keys'](db['MailServerOut'][_0x2cdc('0x48')]);_0x2e2da9[_0x2cdc('0x2f')]=_['keys'](_0xeed75b[_0x2cdc('0x2f')]);_0x2e2da9['filters']=_['intersection'](_0x2e2da9[_0x2cdc('0x34')],_0x2e2da9[_0x2cdc('0x2f')]);_0x3e69c3['attributes']=_[_0x2cdc('0x32')](_0x2e2da9['model'],qs[_0x2cdc('0x35')](_0xeed75b[_0x2cdc('0x2f')][_0x2cdc('0x35')]));_0x3e69c3['attributes']=_0x3e69c3[_0x2cdc('0x33')][_0x2cdc('0x36')]?_0x3e69c3[_0x2cdc('0x33')]:_0x2e2da9[_0x2cdc('0x34')];if(_0xeed75b[_0x2cdc('0x2f')][_0x2cdc('0x42')]){_0x3e69c3['include']=[{'all':!![]}];}_0x3e69c3=_['merge']({},_0x3e69c3,_0xeed75b[_0x2cdc('0x41')]);return db[_0x2cdc('0x2c')]['find'](_0x3e69c3)['then'](handleEntityNotFound(_0x4af025,null))[_0x2cdc('0x26')](respondWithResult(_0x4af025,null))['catch'](handleError(_0x4af025,null));};exports[_0x2cdc('0x49')]=function(_0x394b0e,_0xea7ef3){return db[_0x2cdc('0x2c')][_0x2cdc('0x49')](_0x394b0e[_0x2cdc('0x4a')],{})['then'](respondWithResult(_0xea7ef3,0xc9))[_0x2cdc('0x45')](handleError(_0xea7ef3,null));};exports[_0x2cdc('0x24')]=function(_0x16eee8,_0x5a08d5){if(_0x16eee8[_0x2cdc('0x4a')]['id']){delete _0x16eee8['body']['id'];}return db[_0x2cdc('0x2c')][_0x2cdc('0x4b')]({'where':{'id':_0x16eee8[_0x2cdc('0x47')]['id']}})[_0x2cdc('0x26')](handleEntityNotFound(_0x5a08d5,null))[_0x2cdc('0x26')](saveUpdates(_0x16eee8['body'],null))[_0x2cdc('0x26')](respondWithResult(_0x5a08d5,null))[_0x2cdc('0x45')](handleError(_0x5a08d5,null));};exports[_0x2cdc('0x25')]=function(_0x20b5ff,_0xad63e3){return db[_0x2cdc('0x2c')]['find']({'where':{'id':_0x20b5ff[_0x2cdc('0x47')]['id']}})['then'](handleEntityNotFound(_0xad63e3,null))[_0x2cdc('0x26')](removeEntity(_0xad63e3,null))['catch'](handleError(_0xad63e3,null));}; \ No newline at end of file diff --git a/server/api/mailServerOut/mailServerOut.model.js b/server/api/mailServerOut/mailServerOut.model.js index 3e6ec28..915b770 100644 --- a/server/api/mailServerOut/mailServerOut.model.js +++ b/server/api/mailServerOut/mailServerOut.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbb26=['bluebird','rimraf','../../config/environment','exports','define','mail_servers_out','util','api'];(function(_0x36ed48,_0x1ee0d4){var _0x51c63a=function(_0x2d0a40){while(--_0x2d0a40){_0x36ed48['push'](_0x36ed48['shift']());}};_0x51c63a(++_0x1ee0d4);}(_0xbb26,0x106));var _0x6bb2=function(_0x166273,_0x168bb9){_0x166273=_0x166273-0x0;var _0x32cf35=_0xbb26[_0x166273];return _0x32cf35;};'use strict';var _=require('lodash');var util=require(_0x6bb2('0x0'));var logger=require('../../config/logger')(_0x6bb2('0x1'));var moment=require('moment');var BPromise=require(_0x6bb2('0x2'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x6bb2('0x3'));var config=require(_0x6bb2('0x4'));var attributes=require('./mailServerOut.attributes');module[_0x6bb2('0x5')]=function(_0x4e1431,_0xc0f87d){return _0x4e1431[_0x6bb2('0x6')]('MailServerOut',attributes,{'tableName':_0x6bb2('0x7'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x5e21=['exports','define','MailServerOut','mail_servers_out','lodash','util','../../config/logger','api','moment','bluebird','request-promise','rimraf','./mailServerOut.attributes'];(function(_0x44f63a,_0x2d17ca){var _0x4e7019=function(_0x49a47a){while(--_0x49a47a){_0x44f63a['push'](_0x44f63a['shift']());}};_0x4e7019(++_0x2d17ca);}(_0x5e21,0x93));var _0x15e2=function(_0x1d73eb,_0x13c82b){_0x1d73eb=_0x1d73eb-0x0;var _0x23db6e=_0x5e21[_0x1d73eb];return _0x23db6e;};'use strict';var _=require(_0x15e2('0x0'));var util=require(_0x15e2('0x1'));var logger=require(_0x15e2('0x2'))(_0x15e2('0x3'));var moment=require(_0x15e2('0x4'));var BPromise=require(_0x15e2('0x5'));var rp=require(_0x15e2('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0x15e2('0x7'));var config=require('../../config/environment');var attributes=require(_0x15e2('0x8'));module[_0x15e2('0x9')]=function(_0x5bb84b,_0x5a3161){return _0x5bb84b[_0x15e2('0xa')](_0x15e2('0xb'),attributes,{'tableName':_0x15e2('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/mailServerOut/mailServerOut.rpc.js b/server/api/mailServerOut/mailServerOut.rpc.js index b28a0b3..dffa83d 100644 --- a/server/api/mailServerOut/mailServerOut.rpc.js +++ b/server/api/mailServerOut/mailServerOut.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2ef3=['bluebird','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','request','then','info','MailServerOut,\x20%s,\x20%s','MailServerOut,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','catch','lodash','util','moment'];(function(_0x4f6259,_0x35094b){var _0x35f1bb=function(_0x2ecb4e){while(--_0x2ecb4e){_0x4f6259['push'](_0x4f6259['shift']());}};_0x35f1bb(++_0x35094b);}(_0x2ef3,0xba));var _0x32ef=function(_0x21cb1d,_0x5d8694){_0x21cb1d=_0x21cb1d-0x0;var _0x549d4e=_0x2ef3[_0x21cb1d];return _0x549d4e;};'use strict';var _=require(_0x32ef('0x0'));var util=require(_0x32ef('0x1'));var moment=require(_0x32ef('0x2'));var BPromise=require(_0x32ef('0x3'));var rs=require(_0x32ef('0x4'));var fs=require('fs');var Redis=require(_0x32ef('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x32ef('0x6'));var logger=require(_0x32ef('0x7'))('rpc');var config=require(_0x32ef('0x8'));var jayson=require(_0x32ef('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x2c0089,_0x4bfcf8,_0x367c39){return new BPromise(function(_0x2fb8eb,_0x234863){return client[_0x32ef('0xa')](_0x2c0089,_0x367c39)[_0x32ef('0xb')](function(_0x2bbb50){logger[_0x32ef('0xc')](_0x32ef('0xd'),_0x4bfcf8,'request\x20sent');logger['debug'](_0x32ef('0xe'),_0x4bfcf8,_0x32ef('0xf'),JSON[_0x32ef('0x10')](_0x2bbb50));if(_0x2bbb50[_0x32ef('0x11')]){if(_0x2bbb50['error'][_0x32ef('0x12')]===0x1f4){logger['error'](_0x32ef('0xd'),_0x4bfcf8,_0x2bbb50['error'][_0x32ef('0x13')]);return _0x234863(_0x2bbb50[_0x32ef('0x11')]['message']);}logger['error'](_0x32ef('0xd'),_0x4bfcf8,_0x2bbb50['error'][_0x32ef('0x13')]);return _0x2fb8eb(_0x2bbb50[_0x32ef('0x11')][_0x32ef('0x13')]);}else{logger[_0x32ef('0xc')]('MailServerOut,\x20%s,\x20%s',_0x4bfcf8,'request\x20sent');_0x2fb8eb(_0x2bbb50['result'][_0x32ef('0x13')]);}})[_0x32ef('0x14')](function(_0xb5aed2){logger['error']('MailServerOut,\x20%s,\x20%s',_0x4bfcf8,_0xb5aed2);_0x234863(_0xb5aed2);});});} \ No newline at end of file +var _0x5f2f=['lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','client','http','request','info','MailServerOut,\x20%s,\x20%s','debug','stringify','error','code','message','request\x20sent','result','catch'];(function(_0x2fa82c,_0x2cac3a){var _0x598cd5=function(_0x40ce00){while(--_0x40ce00){_0x2fa82c['push'](_0x2fa82c['shift']());}};_0x598cd5(++_0x2cac3a);}(_0x5f2f,0x73));var _0xf5f2=function(_0x3af3b3,_0x545689){_0x3af3b3=_0x3af3b3-0x0;var _0x5bd063=_0x5f2f[_0x3af3b3];return _0x5bd063;};'use strict';var _=require(_0xf5f2('0x0'));var util=require(_0xf5f2('0x1'));var moment=require(_0xf5f2('0x2'));var BPromise=require(_0xf5f2('0x3'));var rs=require(_0xf5f2('0x4'));var fs=require('fs');var Redis=require(_0xf5f2('0x5'));var db=require(_0xf5f2('0x6'))['db'];var utils=require(_0xf5f2('0x7'));var logger=require('../../config/logger')('rpc');var config=require(_0xf5f2('0x8'));var jayson=require(_0xf5f2('0x9'));var client=jayson[_0xf5f2('0xa')][_0xf5f2('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x3133bc,_0x473100,_0x5907aa){return new BPromise(function(_0x466882,_0x46cd9c){return client[_0xf5f2('0xc')](_0x3133bc,_0x5907aa)['then'](function(_0x375da4){logger[_0xf5f2('0xd')](_0xf5f2('0xe'),_0x473100,'request\x20sent');logger[_0xf5f2('0xf')]('MailServerOut,\x20%s,\x20%s,\x20%s',_0x473100,'request\x20sent',JSON[_0xf5f2('0x10')](_0x375da4));if(_0x375da4[_0xf5f2('0x11')]){if(_0x375da4['error'][_0xf5f2('0x12')]===0x1f4){logger[_0xf5f2('0x11')](_0xf5f2('0xe'),_0x473100,_0x375da4[_0xf5f2('0x11')][_0xf5f2('0x13')]);return _0x46cd9c(_0x375da4[_0xf5f2('0x11')]['message']);}logger[_0xf5f2('0x11')](_0xf5f2('0xe'),_0x473100,_0x375da4[_0xf5f2('0x11')][_0xf5f2('0x13')]);return _0x466882(_0x375da4[_0xf5f2('0x11')]['message']);}else{logger[_0xf5f2('0xd')](_0xf5f2('0xe'),_0x473100,_0xf5f2('0x14'));_0x466882(_0x375da4[_0xf5f2('0x15')][_0xf5f2('0x13')]);}})[_0xf5f2('0x16')](function(_0xdb61b3){logger[_0xf5f2('0x11')](_0xf5f2('0xe'),_0x473100,_0xdb61b3);_0x46cd9c(_0xdb61b3);});});} \ No newline at end of file diff --git a/server/api/mailSubstatus/index.js b/server/api/mailSubstatus/index.js index ce02f70..d2039ab 100644 --- a/server/api/mailSubstatus/index.js +++ b/server/api/mailSubstatus/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1e4e=['describe','/:id','show','create','put','update','delete','multer','util','path','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./mailSubstatus.controller','get','isAuthenticated','/describe'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0x1e4e,0x79));var _0xe1e4=function(_0x31c522,_0x458db5){_0x31c522=_0x31c522-0x0;var _0x4092c2=_0x1e4e[_0x31c522];return _0x4092c2;};'use strict';var multer=require(_0xe1e4('0x0'));var util=require(_0xe1e4('0x1'));var path=require(_0xe1e4('0x2'));var timeout=require('connect-timeout');var express=require(_0xe1e4('0x3'));var router=express[_0xe1e4('0x4')]();var fs_extra=require(_0xe1e4('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0xe1e4('0x6'));var config=require(_0xe1e4('0x7'));var controller=require(_0xe1e4('0x8'));router[_0xe1e4('0x9')]('/',auth[_0xe1e4('0xa')](),controller['index']);router['get'](_0xe1e4('0xb'),auth['isAuthenticated'](),controller[_0xe1e4('0xc')]);router['get'](_0xe1e4('0xd'),auth['isAuthenticated'](),controller[_0xe1e4('0xe')]);router['post']('/',auth[_0xe1e4('0xa')](),controller[_0xe1e4('0xf')]);router[_0xe1e4('0x10')](_0xe1e4('0xd'),auth['isAuthenticated'](),controller[_0xe1e4('0x11')]);router[_0xe1e4('0x12')](_0xe1e4('0xd'),auth['isAuthenticated'](),controller['destroy']);module['exports']=router; \ No newline at end of file +var _0x8211=['destroy','exports','multer','util','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./mailSubstatus.controller','get','isAuthenticated','index','describe','/:id','show','post','create','put','update','delete'];(function(_0x67434a,_0x398c91){var _0x38f56e=function(_0x272f0d){while(--_0x272f0d){_0x67434a['push'](_0x67434a['shift']());}};_0x38f56e(++_0x398c91);}(_0x8211,0x9c));var _0x1821=function(_0x3cbf96,_0x3f5443){_0x3cbf96=_0x3cbf96-0x0;var _0xa37f74=_0x8211[_0x3cbf96];return _0xa37f74;};'use strict';var multer=require(_0x1821('0x0'));var util=require(_0x1821('0x1'));var path=require('path');var timeout=require(_0x1821('0x2'));var express=require('express');var router=express[_0x1821('0x3')]();var fs_extra=require(_0x1821('0x4'));var auth=require(_0x1821('0x5'));var interaction=require(_0x1821('0x6'));var config=require(_0x1821('0x7'));var controller=require(_0x1821('0x8'));router[_0x1821('0x9')]('/',auth[_0x1821('0xa')](),controller[_0x1821('0xb')]);router[_0x1821('0x9')]('/describe',auth['isAuthenticated'](),controller[_0x1821('0xc')]);router[_0x1821('0x9')](_0x1821('0xd'),auth['isAuthenticated'](),controller[_0x1821('0xe')]);router[_0x1821('0xf')]('/',auth['isAuthenticated'](),controller[_0x1821('0x10')]);router[_0x1821('0x11')]('/:id',auth[_0x1821('0xa')](),controller[_0x1821('0x12')]);router[_0x1821('0x13')](_0x1821('0xd'),auth['isAuthenticated'](),controller[_0x1821('0x14')]);module[_0x1821('0x15')]=router; \ No newline at end of file diff --git a/server/api/mailSubstatus/mailSubstatus.attributes.js b/server/api/mailSubstatus/mailSubstatus.attributes.js index bbdfb3c..1dc280b 100644 --- a/server/api/mailSubstatus/mailSubstatus.attributes.js +++ b/server/api/mailSubstatus/mailSubstatus.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9fd4=['sequelize','exports','STRING','name'];(function(_0x13b8f3,_0x442821){var _0x1a6d06=function(_0x5126f2){while(--_0x5126f2){_0x13b8f3['push'](_0x13b8f3['shift']());}};_0x1a6d06(++_0x442821);}(_0x9fd4,0x16c));var _0x49fd=function(_0x54cef6,_0x146b0e){_0x54cef6=_0x54cef6-0x0;var _0x39aacf=_0x9fd4[_0x54cef6];return _0x39aacf;};'use strict';var Sequelize=require(_0x49fd('0x0'));module[_0x49fd('0x1')]={'name':{'type':Sequelize[_0x49fd('0x2')],'unique':_0x49fd('0x3'),'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0x49fd('0x2')]}}; \ No newline at end of file +var _0x36c3=['name','STRING','sequelize','exports'];(function(_0xe8d631,_0x3d89f4){var _0x4e9099=function(_0x5e9a2e){while(--_0x5e9a2e){_0xe8d631['push'](_0xe8d631['shift']());}};_0x4e9099(++_0x3d89f4);}(_0x36c3,0x1a6));var _0x336c=function(_0x3abce4,_0x34e488){_0x3abce4=_0x3abce4-0x0;var _0x2c25db=_0x36c3[_0x3abce4];return _0x2c25db;};'use strict';var Sequelize=require(_0x336c('0x0'));module[_0x336c('0x1')]={'name':{'type':Sequelize['STRING'],'unique':_0x336c('0x2'),'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0x336c('0x3')]}}; \ No newline at end of file diff --git a/server/api/mailSubstatus/mailSubstatus.controller.js b/server/api/mailSubstatus/mailSubstatus.controller.js index 1bb828f..df4e75b 100644 --- a/server/api/mailSubstatus/mailSubstatus.controller.js +++ b/server/api/mailSubstatus/mailSubstatus.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb498=['catch','params','includeAll','options','find','create','body','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','ejs','fs-extra','lodash','crypto','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','status','end','offset','undefined','limit','count','set','Content-Range','json','apply','reject','save','update','then','destroy','sendStatus','error','name','send','index','MailSubstatus','fieldName','type','key','model','map','query','keys','intersection','attributes','fields','length','nolimit','sort','where','filters','pick','filter','merge','include','findAll'];(function(_0x43576f,_0x1356ed){var _0x4d2466=function(_0x865deb){while(--_0x865deb){_0x43576f['push'](_0x43576f['shift']());}};_0x4d2466(++_0x1356ed);}(_0xb498,0x17a));var _0x8b49=function(_0x3a40c7,_0x3484bb){_0x3a40c7=_0x3a40c7-0x0;var _0x58f942=_0xb498[_0x3a40c7];return _0x58f942;};'use strict';var emlformat=require(_0x8b49('0x0'));var rimraf=require(_0x8b49('0x1'));var zipdir=require(_0x8b49('0x2'));var jsonpatch=require(_0x8b49('0x3'));var rp=require(_0x8b49('0x4'));var moment=require(_0x8b49('0x5'));var BPromise=require(_0x8b49('0x6'));var Mustache=require(_0x8b49('0x7'));var util=require(_0x8b49('0x8'));var path=require('path');var sox=require(_0x8b49('0x9'));var csv=require('to-csv');var ejs=require(_0x8b49('0xa'));var fs=require('fs');var fs_extra=require(_0x8b49('0xb'));var _=require(_0x8b49('0xc'));var squel=require('squel');var crypto=require(_0x8b49('0xd'));var jsforce=require('jsforce');var deskjs=require(_0x8b49('0xe'));var toCsv=require(_0x8b49('0xf'));var querystring=require(_0x8b49('0x10'));var Papa=require(_0x8b49('0x11'));var Redis=require(_0x8b49('0x12'));var authService=require(_0x8b49('0x13'));var qs=require(_0x8b49('0x14'));var as=require(_0x8b49('0x15'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x8b49('0x16'))(_0x8b49('0x17'));var utils=require(_0x8b49('0x18'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x33ae9b,_0x4ba172){_0x4ba172=_0x4ba172||0xcc;return function(_0x5a2f30){if(_0x5a2f30){return _0x33ae9b['sendStatus'](_0x4ba172);}return _0x33ae9b[_0x8b49('0x19')](_0x4ba172)[_0x8b49('0x1a')]();};}function respondWithResult(_0xe711a7,_0x3f843a){_0x3f843a=_0x3f843a||0xc8;return function(_0x27949e){if(_0x27949e){return _0xe711a7['status'](_0x3f843a)['json'](_0x27949e);}};}function respondWithFilteredResult(_0x4ab97e,_0x109339){return function(_0x42a9b3){if(_0x42a9b3){var _0x550e2c=typeof _0x109339[_0x8b49('0x1b')]===_0x8b49('0x1c')&&typeof _0x109339[_0x8b49('0x1d')]===_0x8b49('0x1c');var _0x1850e8=_0x42a9b3[_0x8b49('0x1e')];var _0xc4822f=_0x550e2c?0x0:_0x109339['offset'];var _0x207fd4=_0x550e2c?_0x42a9b3[_0x8b49('0x1e')]:_0x109339[_0x8b49('0x1b')]+_0x109339[_0x8b49('0x1d')];var _0x45f970;if(_0x207fd4>=_0x1850e8){_0x207fd4=_0x1850e8;_0x45f970=0xc8;}else{_0x45f970=0xce;}_0x4ab97e['status'](_0x45f970);return _0x4ab97e[_0x8b49('0x1f')](_0x8b49('0x20'),_0xc4822f+'-'+_0x207fd4+'/'+_0x1850e8)[_0x8b49('0x21')](_0x42a9b3);}return null;};}function patchUpdates(_0x37ffc5){return function(_0x194e53){try{jsonpatch[_0x8b49('0x22')](_0x194e53,_0x37ffc5,!![]);}catch(_0x353113){return BPromise[_0x8b49('0x23')](_0x353113);}return _0x194e53[_0x8b49('0x24')]();};}function saveUpdates(_0x8a75ef,_0x1684c1){return function(_0x2f0fe2){if(_0x2f0fe2){return _0x2f0fe2[_0x8b49('0x25')](_0x8a75ef)[_0x8b49('0x26')](function(_0x31a447){return _0x31a447;});}return null;};}function removeEntity(_0x257fb9,_0x27963c){return function(_0x2c4428){if(_0x2c4428){return _0x2c4428[_0x8b49('0x27')]()[_0x8b49('0x26')](function(){_0x257fb9['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x1d99b8,_0x16fd84){return function(_0x2d620d){if(!_0x2d620d){_0x1d99b8[_0x8b49('0x28')](0x194);}return _0x2d620d;};}function handleError(_0x3d9f5e,_0x5a111c){_0x5a111c=_0x5a111c||0x1f4;return function(_0x19b172){logger[_0x8b49('0x29')](_0x19b172['stack']);if(_0x19b172[_0x8b49('0x2a')]){delete _0x19b172[_0x8b49('0x2a')];}_0x3d9f5e[_0x8b49('0x19')](_0x5a111c)[_0x8b49('0x2b')](_0x19b172);};}exports[_0x8b49('0x2c')]=function(_0x4f245a,_0x226ccc){var _0x1fc813={},_0x1dfea0={},_0xece996={'count':0x0,'rows':[]};var _0x5a1249=_['map'](db[_0x8b49('0x2d')]['rawAttributes'],function(_0x1f634e){return{'name':_0x1f634e[_0x8b49('0x2e')],'type':_0x1f634e[_0x8b49('0x2f')][_0x8b49('0x30')]};});_0x1dfea0[_0x8b49('0x31')]=_[_0x8b49('0x32')](_0x5a1249,_0x8b49('0x2a'));_0x1dfea0[_0x8b49('0x33')]=_[_0x8b49('0x34')](_0x4f245a[_0x8b49('0x33')]);_0x1dfea0['filters']=_[_0x8b49('0x35')](_0x1dfea0[_0x8b49('0x31')],_0x1dfea0['query']);_0x1fc813[_0x8b49('0x36')]=_['intersection'](_0x1dfea0['model'],qs[_0x8b49('0x37')](_0x4f245a[_0x8b49('0x33')][_0x8b49('0x37')]));_0x1fc813[_0x8b49('0x36')]=_0x1fc813[_0x8b49('0x36')][_0x8b49('0x38')]?_0x1fc813[_0x8b49('0x36')]:_0x1dfea0[_0x8b49('0x31')];if(!_0x4f245a[_0x8b49('0x33')]['hasOwnProperty'](_0x8b49('0x39'))){_0x1fc813['limit']=qs[_0x8b49('0x1d')](_0x4f245a[_0x8b49('0x33')][_0x8b49('0x1d')]);_0x1fc813[_0x8b49('0x1b')]=qs[_0x8b49('0x1b')](_0x4f245a['query'][_0x8b49('0x1b')]);}_0x1fc813['order']=qs[_0x8b49('0x3a')](_0x4f245a[_0x8b49('0x33')][_0x8b49('0x3a')]);_0x1fc813[_0x8b49('0x3b')]=qs[_0x8b49('0x3c')](_[_0x8b49('0x3d')](_0x4f245a[_0x8b49('0x33')],_0x1dfea0[_0x8b49('0x3c')]),_0x5a1249);if(_0x4f245a[_0x8b49('0x33')][_0x8b49('0x3e')]){_0x1fc813[_0x8b49('0x3b')]=_[_0x8b49('0x3f')](_0x1fc813[_0x8b49('0x3b')],{'$or':_['map'](_0x5a1249,function(_0x1b8743){if(_0x1b8743['type']!=='VIRTUAL'){var _0x555ecd={};_0x555ecd[_0x1b8743[_0x8b49('0x2a')]]={'$like':'%'+_0x4f245a['query']['filter']+'%'};return _0x555ecd;}})});}_0x1fc813=_[_0x8b49('0x3f')]({},_0x1fc813,_0x4f245a['options']);var _0x3238c7={'where':_0x1fc813[_0x8b49('0x3b')]};return db[_0x8b49('0x2d')][_0x8b49('0x1e')](_0x3238c7)[_0x8b49('0x26')](function(_0x3d5a05){_0xece996['count']=_0x3d5a05;if(_0x4f245a['query']['includeAll']){_0x1fc813[_0x8b49('0x40')]=[{'all':!![]}];}return db[_0x8b49('0x2d')][_0x8b49('0x41')](_0x1fc813);})['then'](function(_0x2808b5){_0xece996['rows']=_0x2808b5;return _0xece996;})[_0x8b49('0x26')](respondWithFilteredResult(_0x226ccc,_0x1fc813))[_0x8b49('0x42')](handleError(_0x226ccc,null));};exports['show']=function(_0x14e8dc,_0x24fe88){var _0x3a7aa5={'raw':!![],'where':{'id':_0x14e8dc[_0x8b49('0x43')]['id']}},_0x480578={};_0x480578['model']=_['keys'](db['MailSubstatus']['rawAttributes']);_0x480578[_0x8b49('0x33')]=_[_0x8b49('0x34')](_0x14e8dc[_0x8b49('0x33')]);_0x480578[_0x8b49('0x3c')]=_[_0x8b49('0x35')](_0x480578[_0x8b49('0x31')],_0x480578['query']);_0x3a7aa5['attributes']=_[_0x8b49('0x35')](_0x480578['model'],qs['fields'](_0x14e8dc[_0x8b49('0x33')][_0x8b49('0x37')]));_0x3a7aa5[_0x8b49('0x36')]=_0x3a7aa5['attributes'][_0x8b49('0x38')]?_0x3a7aa5[_0x8b49('0x36')]:_0x480578[_0x8b49('0x31')];if(_0x14e8dc[_0x8b49('0x33')][_0x8b49('0x44')]){_0x3a7aa5[_0x8b49('0x40')]=[{'all':!![]}];}_0x3a7aa5=_[_0x8b49('0x3f')]({},_0x3a7aa5,_0x14e8dc[_0x8b49('0x45')]);return db['MailSubstatus'][_0x8b49('0x46')](_0x3a7aa5)[_0x8b49('0x26')](handleEntityNotFound(_0x24fe88,null))[_0x8b49('0x26')](respondWithResult(_0x24fe88,null))[_0x8b49('0x42')](handleError(_0x24fe88,null));};exports[_0x8b49('0x47')]=function(_0xff182,_0x46e6e1){return db[_0x8b49('0x2d')][_0x8b49('0x47')](_0xff182[_0x8b49('0x48')],{})['then'](respondWithResult(_0x46e6e1,0xc9))[_0x8b49('0x42')](handleError(_0x46e6e1,null));};exports[_0x8b49('0x25')]=function(_0x5f638c,_0x582a95){if(_0x5f638c['body']['id']){delete _0x5f638c[_0x8b49('0x48')]['id'];}return db['MailSubstatus'][_0x8b49('0x46')]({'where':{'id':_0x5f638c[_0x8b49('0x43')]['id']}})['then'](handleEntityNotFound(_0x582a95,null))['then'](saveUpdates(_0x5f638c[_0x8b49('0x48')],null))['then'](respondWithResult(_0x582a95,null))[_0x8b49('0x42')](handleError(_0x582a95,null));};exports[_0x8b49('0x27')]=function(_0x31c279,_0x50e05a){return db[_0x8b49('0x2d')]['find']({'where':{'id':_0x31c279[_0x8b49('0x43')]['id']}})[_0x8b49('0x26')](handleEntityNotFound(_0x50e05a,null))[_0x8b49('0x26')](removeEntity(_0x50e05a,null))[_0x8b49('0x42')](handleError(_0x50e05a,null));};exports[_0x8b49('0x49')]=function(_0x137e14,_0x439bc1){return db['MailSubstatus'][_0x8b49('0x49')]()['then'](respondWithResult(_0x439bc1,null))['catch'](handleError(_0x439bc1,null));}; \ No newline at end of file +var _0x55b4=['rows','catch','show','params','rawAttributes','find','create','body','describe','rimraf','zip-dir','moment','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','desk.js','papaparse','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end','status','json','offset','undefined','limit','count','Content-Range','apply','reject','save','update','then','destroy','error','stack','send','index','MailSubstatus','fieldName','type','key','model','map','name','query','keys','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick','filters','filter','merge','VIRTUAL','options','includeAll','findAll'];(function(_0x355a83,_0x23cfd0){var _0xead550=function(_0x32198a){while(--_0x32198a){_0x355a83['push'](_0x355a83['shift']());}};_0xead550(++_0x23cfd0);}(_0x55b4,0x135));var _0x455b=function(_0x3ee15b,_0x2832bf){_0x3ee15b=_0x3ee15b-0x0;var _0x27a2dd=_0x55b4[_0x3ee15b];return _0x27a2dd;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x455b('0x0'));var zipdir=require(_0x455b('0x1'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x455b('0x2'));var BPromise=require('bluebird');var Mustache=require(_0x455b('0x3'));var util=require(_0x455b('0x4'));var path=require(_0x455b('0x5'));var sox=require(_0x455b('0x6'));var csv=require(_0x455b('0x7'));var ejs=require(_0x455b('0x8'));var fs=require('fs');var fs_extra=require(_0x455b('0x9'));var _=require(_0x455b('0xa'));var squel=require(_0x455b('0xb'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x455b('0xc'));var toCsv=require(_0x455b('0x7'));var querystring=require('querystring');var Papa=require(_0x455b('0xd'));var Redis=require(_0x455b('0xe'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x455b('0xf'));var hardwareService=require(_0x455b('0x10'));var logger=require(_0x455b('0x11'))('api');var utils=require(_0x455b('0x12'));var config=require(_0x455b('0x13'));var licenseUtil=require(_0x455b('0x14'));var db=require(_0x455b('0x15'))['db'];function respondWithStatusCode(_0x8d5e55,_0x136d3b){_0x136d3b=_0x136d3b||0xcc;return function(_0x306b62){if(_0x306b62){return _0x8d5e55[_0x455b('0x16')](_0x136d3b);}return _0x8d5e55['status'](_0x136d3b)[_0x455b('0x17')]();};}function respondWithResult(_0x2c42d4,_0x422b11){_0x422b11=_0x422b11||0xc8;return function(_0x21a9aa){if(_0x21a9aa){return _0x2c42d4[_0x455b('0x18')](_0x422b11)[_0x455b('0x19')](_0x21a9aa);}};}function respondWithFilteredResult(_0x5405d8,_0x4820fa){return function(_0x4a446c){if(_0x4a446c){var _0x11afcb=typeof _0x4820fa[_0x455b('0x1a')]===_0x455b('0x1b')&&typeof _0x4820fa[_0x455b('0x1c')]===_0x455b('0x1b');var _0x230d64=_0x4a446c[_0x455b('0x1d')];var _0x50e4f1=_0x11afcb?0x0:_0x4820fa['offset'];var _0x5a7614=_0x11afcb?_0x4a446c[_0x455b('0x1d')]:_0x4820fa[_0x455b('0x1a')]+_0x4820fa[_0x455b('0x1c')];var _0xf926a9;if(_0x5a7614>=_0x230d64){_0x5a7614=_0x230d64;_0xf926a9=0xc8;}else{_0xf926a9=0xce;}_0x5405d8['status'](_0xf926a9);return _0x5405d8['set'](_0x455b('0x1e'),_0x50e4f1+'-'+_0x5a7614+'/'+_0x230d64)[_0x455b('0x19')](_0x4a446c);}return null;};}function patchUpdates(_0x3f593e){return function(_0x536fcc){try{jsonpatch[_0x455b('0x1f')](_0x536fcc,_0x3f593e,!![]);}catch(_0x5680bc){return BPromise[_0x455b('0x20')](_0x5680bc);}return _0x536fcc[_0x455b('0x21')]();};}function saveUpdates(_0xf1e99,_0x573cab){return function(_0x10f434){if(_0x10f434){return _0x10f434[_0x455b('0x22')](_0xf1e99)[_0x455b('0x23')](function(_0x839452){return _0x839452;});}return null;};}function removeEntity(_0x1c98f0,_0x1153e6){return function(_0x14d65f){if(_0x14d65f){return _0x14d65f[_0x455b('0x24')]()[_0x455b('0x23')](function(){_0x1c98f0[_0x455b('0x18')](0xcc)[_0x455b('0x17')]();});}};}function handleEntityNotFound(_0x48c2dc,_0x146c71){return function(_0x35047c){if(!_0x35047c){_0x48c2dc[_0x455b('0x16')](0x194);}return _0x35047c;};}function handleError(_0x3ca609,_0x277c6d){_0x277c6d=_0x277c6d||0x1f4;return function(_0x131116){logger[_0x455b('0x25')](_0x131116[_0x455b('0x26')]);if(_0x131116['name']){delete _0x131116['name'];}_0x3ca609['status'](_0x277c6d)[_0x455b('0x27')](_0x131116);};}exports[_0x455b('0x28')]=function(_0x235c9f,_0x5599f6){var _0x3fb460={},_0x4acfb8={},_0x1d2a7e={'count':0x0,'rows':[]};var _0x22067b=_['map'](db[_0x455b('0x29')]['rawAttributes'],function(_0x20edfd){return{'name':_0x20edfd[_0x455b('0x2a')],'type':_0x20edfd[_0x455b('0x2b')][_0x455b('0x2c')]};});_0x4acfb8[_0x455b('0x2d')]=_[_0x455b('0x2e')](_0x22067b,_0x455b('0x2f'));_0x4acfb8[_0x455b('0x30')]=_[_0x455b('0x31')](_0x235c9f[_0x455b('0x30')]);_0x4acfb8['filters']=_[_0x455b('0x32')](_0x4acfb8[_0x455b('0x2d')],_0x4acfb8[_0x455b('0x30')]);_0x3fb460[_0x455b('0x33')]=_[_0x455b('0x32')](_0x4acfb8[_0x455b('0x2d')],qs[_0x455b('0x34')](_0x235c9f['query'][_0x455b('0x34')]));_0x3fb460[_0x455b('0x33')]=_0x3fb460['attributes']['length']?_0x3fb460[_0x455b('0x33')]:_0x4acfb8['model'];if(!_0x235c9f[_0x455b('0x30')][_0x455b('0x35')](_0x455b('0x36'))){_0x3fb460[_0x455b('0x1c')]=qs['limit'](_0x235c9f[_0x455b('0x30')][_0x455b('0x1c')]);_0x3fb460[_0x455b('0x1a')]=qs[_0x455b('0x1a')](_0x235c9f[_0x455b('0x30')][_0x455b('0x1a')]);}_0x3fb460[_0x455b('0x37')]=qs[_0x455b('0x38')](_0x235c9f[_0x455b('0x30')][_0x455b('0x38')]);_0x3fb460[_0x455b('0x39')]=qs['filters'](_[_0x455b('0x3a')](_0x235c9f[_0x455b('0x30')],_0x4acfb8[_0x455b('0x3b')]),_0x22067b);if(_0x235c9f[_0x455b('0x30')][_0x455b('0x3c')]){_0x3fb460[_0x455b('0x39')]=_[_0x455b('0x3d')](_0x3fb460[_0x455b('0x39')],{'$or':_['map'](_0x22067b,function(_0x1fd7cb){if(_0x1fd7cb[_0x455b('0x2b')]!==_0x455b('0x3e')){var _0x10e6d9={};_0x10e6d9[_0x1fd7cb[_0x455b('0x2f')]]={'$like':'%'+_0x235c9f['query'][_0x455b('0x3c')]+'%'};return _0x10e6d9;}})});}_0x3fb460=_[_0x455b('0x3d')]({},_0x3fb460,_0x235c9f[_0x455b('0x3f')]);var _0x5bc342={'where':_0x3fb460[_0x455b('0x39')]};return db[_0x455b('0x29')][_0x455b('0x1d')](_0x5bc342)[_0x455b('0x23')](function(_0x3d9b69){_0x1d2a7e[_0x455b('0x1d')]=_0x3d9b69;if(_0x235c9f[_0x455b('0x30')][_0x455b('0x40')]){_0x3fb460['include']=[{'all':!![]}];}return db[_0x455b('0x29')][_0x455b('0x41')](_0x3fb460);})[_0x455b('0x23')](function(_0x3d57b5){_0x1d2a7e[_0x455b('0x42')]=_0x3d57b5;return _0x1d2a7e;})['then'](respondWithFilteredResult(_0x5599f6,_0x3fb460))[_0x455b('0x43')](handleError(_0x5599f6,null));};exports[_0x455b('0x44')]=function(_0x6a40c7,_0x19d830){var _0x2f69d2={'raw':!![],'where':{'id':_0x6a40c7[_0x455b('0x45')]['id']}},_0x3d6da7={};_0x3d6da7['model']=_[_0x455b('0x31')](db[_0x455b('0x29')][_0x455b('0x46')]);_0x3d6da7[_0x455b('0x30')]=_[_0x455b('0x31')](_0x6a40c7[_0x455b('0x30')]);_0x3d6da7[_0x455b('0x3b')]=_[_0x455b('0x32')](_0x3d6da7[_0x455b('0x2d')],_0x3d6da7[_0x455b('0x30')]);_0x2f69d2[_0x455b('0x33')]=_['intersection'](_0x3d6da7[_0x455b('0x2d')],qs[_0x455b('0x34')](_0x6a40c7[_0x455b('0x30')]['fields']));_0x2f69d2['attributes']=_0x2f69d2['attributes']['length']?_0x2f69d2[_0x455b('0x33')]:_0x3d6da7['model'];if(_0x6a40c7['query']['includeAll']){_0x2f69d2['include']=[{'all':!![]}];}_0x2f69d2=_[_0x455b('0x3d')]({},_0x2f69d2,_0x6a40c7[_0x455b('0x3f')]);return db[_0x455b('0x29')][_0x455b('0x47')](_0x2f69d2)[_0x455b('0x23')](handleEntityNotFound(_0x19d830,null))['then'](respondWithResult(_0x19d830,null))[_0x455b('0x43')](handleError(_0x19d830,null));};exports[_0x455b('0x48')]=function(_0xf90507,_0x2fc4b1){return db['MailSubstatus'][_0x455b('0x48')](_0xf90507['body'],{})[_0x455b('0x23')](respondWithResult(_0x2fc4b1,0xc9))['catch'](handleError(_0x2fc4b1,null));};exports[_0x455b('0x22')]=function(_0x2f34dc,_0x45e8aa){if(_0x2f34dc['body']['id']){delete _0x2f34dc[_0x455b('0x49')]['id'];}return db['MailSubstatus'][_0x455b('0x47')]({'where':{'id':_0x2f34dc[_0x455b('0x45')]['id']}})[_0x455b('0x23')](handleEntityNotFound(_0x45e8aa,null))[_0x455b('0x23')](saveUpdates(_0x2f34dc[_0x455b('0x49')],null))[_0x455b('0x23')](respondWithResult(_0x45e8aa,null))['catch'](handleError(_0x45e8aa,null));};exports[_0x455b('0x24')]=function(_0x3e983e,_0x400ca7){return db[_0x455b('0x29')][_0x455b('0x47')]({'where':{'id':_0x3e983e[_0x455b('0x45')]['id']}})['then'](handleEntityNotFound(_0x400ca7,null))['then'](removeEntity(_0x400ca7,null))[_0x455b('0x43')](handleError(_0x400ca7,null));};exports['describe']=function(_0x3ab6f,_0x160802){return db[_0x455b('0x29')][_0x455b('0x4a')]()[_0x455b('0x23')](respondWithResult(_0x160802,null))[_0x455b('0x43')](handleError(_0x160802,null));}; \ No newline at end of file diff --git a/server/api/mailSubstatus/mailSubstatus.model.js b/server/api/mailSubstatus/mailSubstatus.model.js index e76f270..53de25d 100644 --- a/server/api/mailSubstatus/mailSubstatus.model.js +++ b/server/api/mailSubstatus/mailSubstatus.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xcc7f=['bluebird','./mailSubstatus.attributes','define','MailSubstatus','mail_substatuses','lodash','util','../../config/logger','api','moment'];(function(_0x54d4fe,_0x55e869){var _0x1ab5bb=function(_0x5b1af2){while(--_0x5b1af2){_0x54d4fe['push'](_0x54d4fe['shift']());}};_0x1ab5bb(++_0x55e869);}(_0xcc7f,0x113));var _0xfcc7=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xcc7f[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0xfcc7('0x0'));var util=require(_0xfcc7('0x1'));var logger=require(_0xfcc7('0x2'))(_0xfcc7('0x3'));var moment=require(_0xfcc7('0x4'));var BPromise=require(_0xfcc7('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0xfcc7('0x6'));module['exports']=function(_0x18c006,_0x4e4dc9){return _0x18c006[_0xfcc7('0x7')](_0xfcc7('0x8'),attributes,{'tableName':_0xfcc7('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x6edc=['request-promise','rimraf','../../config/environment','./mailSubstatus.attributes','exports','define','MailSubstatus','mail_substatuses','lodash','util','../../config/logger','api','moment','bluebird'];(function(_0x1bdd71,_0xbbc0b){var _0x2c70a7=function(_0x2e6abc){while(--_0x2e6abc){_0x1bdd71['push'](_0x1bdd71['shift']());}};_0x2c70a7(++_0xbbc0b);}(_0x6edc,0x1e4));var _0xc6ed=function(_0x2ad1ef,_0xbe79dc){_0x2ad1ef=_0x2ad1ef-0x0;var _0x47f5df=_0x6edc[_0x2ad1ef];return _0x47f5df;};'use strict';var _=require(_0xc6ed('0x0'));var util=require(_0xc6ed('0x1'));var logger=require(_0xc6ed('0x2'))(_0xc6ed('0x3'));var moment=require(_0xc6ed('0x4'));var BPromise=require(_0xc6ed('0x5'));var rp=require(_0xc6ed('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0xc6ed('0x7'));var config=require(_0xc6ed('0x8'));var attributes=require(_0xc6ed('0x9'));module[_0xc6ed('0xa')]=function(_0xf51770,_0x59fd46){return _0xf51770[_0xc6ed('0xb')](_0xc6ed('0xc'),attributes,{'tableName':_0xc6ed('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/mailSubstatus/mailSubstatus.rpc.js b/server/api/mailSubstatus/mailSubstatus.rpc.js index 560690a..3e48e3e 100644 --- a/server/api/mailSubstatus/mailSubstatus.rpc.js +++ b/server/api/mailSubstatus/mailSubstatus.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb43b=['catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','then','info','MailSubstatus,\x20%s,\x20%s','request\x20sent','debug','MailSubstatus,\x20%s,\x20%s,\x20%s','stringify','error','message','result'];(function(_0x3947c9,_0x4d6c97){var _0x2e7871=function(_0x1236cc){while(--_0x1236cc){_0x3947c9['push'](_0x3947c9['shift']());}};_0x2e7871(++_0x4d6c97);}(_0xb43b,0x1ba));var _0xbb43=function(_0x448337,_0x4a7306){_0x448337=_0x448337-0x0;var _0x3a2121=_0xb43b[_0x448337];return _0x3a2121;};'use strict';var _=require(_0xbb43('0x0'));var util=require('util');var moment=require(_0xbb43('0x1'));var BPromise=require(_0xbb43('0x2'));var rs=require(_0xbb43('0x3'));var fs=require('fs');var Redis=require(_0xbb43('0x4'));var db=require(_0xbb43('0x5'))['db'];var utils=require(_0xbb43('0x6'));var logger=require('../../config/logger')(_0xbb43('0x7'));var config=require(_0xbb43('0x8'));var jayson=require(_0xbb43('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x5d4c2c,_0x3d7e27,_0x36e1a1){return new BPromise(function(_0x454b7d,_0x2cc6df){return client['request'](_0x5d4c2c,_0x36e1a1)[_0xbb43('0xa')](function(_0x1d5360){logger[_0xbb43('0xb')](_0xbb43('0xc'),_0x3d7e27,_0xbb43('0xd'));logger[_0xbb43('0xe')](_0xbb43('0xf'),_0x3d7e27,_0xbb43('0xd'),JSON[_0xbb43('0x10')](_0x1d5360));if(_0x1d5360[_0xbb43('0x11')]){if(_0x1d5360[_0xbb43('0x11')]['code']===0x1f4){logger['error'](_0xbb43('0xc'),_0x3d7e27,_0x1d5360[_0xbb43('0x11')]['message']);return _0x2cc6df(_0x1d5360['error'][_0xbb43('0x12')]);}logger[_0xbb43('0x11')](_0xbb43('0xc'),_0x3d7e27,_0x1d5360[_0xbb43('0x11')]['message']);return _0x454b7d(_0x1d5360[_0xbb43('0x11')]['message']);}else{logger[_0xbb43('0xb')]('MailSubstatus,\x20%s,\x20%s',_0x3d7e27,_0xbb43('0xd'));_0x454b7d(_0x1d5360[_0xbb43('0x13')]['message']);}})[_0xbb43('0x14')](function(_0x3be9dc){logger[_0xbb43('0x11')]('MailSubstatus,\x20%s,\x20%s',_0x3d7e27,_0x3be9dc);_0x2cc6df(_0x3be9dc);});});} \ No newline at end of file +var _0x0d71=['error','message','util','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','info','MailSubstatus,\x20%s,\x20%s','request\x20sent','debug','MailSubstatus,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x46698a,_0x8de1e4){var _0x356db0=function(_0x19e83c){while(--_0x19e83c){_0x46698a['push'](_0x46698a['shift']());}};_0x356db0(++_0x8de1e4);}(_0x0d71,0x74));var _0x10d7=function(_0xdd4787,_0xee62ca){_0xdd4787=_0xdd4787-0x0;var _0x4d534d=_0x0d71[_0xdd4787];return _0x4d534d;};'use strict';var _=require('lodash');var util=require(_0x10d7('0x0'));var moment=require('moment');var BPromise=require(_0x10d7('0x1'));var rs=require(_0x10d7('0x2'));var fs=require('fs');var Redis=require(_0x10d7('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x10d7('0x4'));var logger=require(_0x10d7('0x5'))('rpc');var config=require(_0x10d7('0x6'));var jayson=require(_0x10d7('0x7'));var client=jayson[_0x10d7('0x8')][_0x10d7('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2d7794,_0x5a6298,_0x504618){return new BPromise(function(_0x3f6d6e,_0x418d5b){return client[_0x10d7('0xa')](_0x2d7794,_0x504618)['then'](function(_0x12df74){logger[_0x10d7('0xb')](_0x10d7('0xc'),_0x5a6298,_0x10d7('0xd'));logger[_0x10d7('0xe')](_0x10d7('0xf'),_0x5a6298,_0x10d7('0xd'),JSON[_0x10d7('0x10')](_0x12df74));if(_0x12df74['error']){if(_0x12df74[_0x10d7('0x11')]['code']===0x1f4){logger[_0x10d7('0x11')](_0x10d7('0xc'),_0x5a6298,_0x12df74[_0x10d7('0x11')][_0x10d7('0x12')]);return _0x418d5b(_0x12df74['error'][_0x10d7('0x12')]);}logger[_0x10d7('0x11')](_0x10d7('0xc'),_0x5a6298,_0x12df74[_0x10d7('0x11')][_0x10d7('0x12')]);return _0x3f6d6e(_0x12df74[_0x10d7('0x11')][_0x10d7('0x12')]);}else{logger[_0x10d7('0xb')](_0x10d7('0xc'),_0x5a6298,_0x10d7('0xd'));_0x3f6d6e(_0x12df74['result']['message']);}})['catch'](function(_0x4ed15c){logger[_0x10d7('0x11')]('MailSubstatus,\x20%s,\x20%s',_0x5a6298,_0x4ed15c);_0x418d5b(_0x4ed15c);});});} \ No newline at end of file diff --git a/server/api/mailTransferReport/index.js b/server/api/mailTransferReport/index.js index 7b913cb..ea8f19b 100644 --- a/server/api/mailTransferReport/index.js +++ b/server/api/mailTransferReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe16b=['util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','./mailTransferReport.controller','get','index','/describe','describe','isAuthenticated','post','create','put','/:id','update','delete','exports','multer'];(function(_0x565c49,_0x54acd0){var _0x20ca34=function(_0x42f7e1){while(--_0x42f7e1){_0x565c49['push'](_0x565c49['shift']());}};_0x20ca34(++_0x54acd0);}(_0xe16b,0x7d));var _0xbe16=function(_0x5b28c2,_0x808665){_0x5b28c2=_0x5b28c2-0x0;var _0x15d58d=_0xe16b[_0x5b28c2];return _0x15d58d;};'use strict';var multer=require(_0xbe16('0x0'));var util=require(_0xbe16('0x1'));var path=require(_0xbe16('0x2'));var timeout=require(_0xbe16('0x3'));var express=require(_0xbe16('0x4'));var router=express[_0xbe16('0x5')]();var fs_extra=require(_0xbe16('0x6'));var auth=require(_0xbe16('0x7'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xbe16('0x8'));router[_0xbe16('0x9')]('/',auth['isAuthenticated'](),controller[_0xbe16('0xa')]);router[_0xbe16('0x9')](_0xbe16('0xb'),auth['isAuthenticated'](),controller[_0xbe16('0xc')]);router[_0xbe16('0x9')]('/:id',auth[_0xbe16('0xd')](),controller['show']);router[_0xbe16('0xe')]('/',auth[_0xbe16('0xd')](),controller[_0xbe16('0xf')]);router[_0xbe16('0x10')](_0xbe16('0x11'),auth['isAuthenticated'](),controller[_0xbe16('0x12')]);router[_0xbe16('0x13')](_0xbe16('0x11'),auth['isAuthenticated'](),controller['destroy']);module[_0xbe16('0x14')]=router; \ No newline at end of file +var _0x0ee0=['show','post','put','update','delete','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../config/environment','./mailTransferReport.controller','index','get','isAuthenticated','/:id'];(function(_0x30ce23,_0xa1d182){var _0x73adee=function(_0x458f2e){while(--_0x458f2e){_0x30ce23['push'](_0x30ce23['shift']());}};_0x73adee(++_0xa1d182);}(_0x0ee0,0xcb));var _0x00ee=function(_0x2db05c,_0xfbf562){_0x2db05c=_0x2db05c-0x0;var _0x7869cc=_0x0ee0[_0x2db05c];return _0x7869cc;};'use strict';var multer=require(_0x00ee('0x0'));var util=require(_0x00ee('0x1'));var path=require(_0x00ee('0x2'));var timeout=require(_0x00ee('0x3'));var express=require(_0x00ee('0x4'));var router=express[_0x00ee('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0x00ee('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x00ee('0x7'));var controller=require(_0x00ee('0x8'));router['get']('/',auth['isAuthenticated'](),controller[_0x00ee('0x9')]);router[_0x00ee('0xa')]('/describe',auth[_0x00ee('0xb')](),controller['describe']);router[_0x00ee('0xa')](_0x00ee('0xc'),auth['isAuthenticated'](),controller[_0x00ee('0xd')]);router[_0x00ee('0xe')]('/',auth[_0x00ee('0xb')](),controller['create']);router[_0x00ee('0xf')](_0x00ee('0xc'),auth[_0x00ee('0xb')](),controller[_0x00ee('0x10')]);router[_0x00ee('0x11')](_0x00ee('0xc'),auth['isAuthenticated'](),controller['destroy']);module['exports']=router; \ No newline at end of file diff --git a/server/api/mailTransferReport/mailTransferReport.attributes.js b/server/api/mailTransferReport/mailTransferReport.attributes.js index be164f3..ea03a74 100644 --- a/server/api/mailTransferReport/mailTransferReport.attributes.js +++ b/server/api/mailTransferReport/mailTransferReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf3cd=['exports','STRING','ENUM','account','queue','DATE','moment','sequelize'];(function(_0x202ec8,_0x38ea63){var _0x501b2e=function(_0x4cc08f){while(--_0x4cc08f){_0x202ec8['push'](_0x202ec8['shift']());}};_0x501b2e(++_0x38ea63);}(_0xf3cd,0xfe));var _0xdf3c=function(_0x16a637,_0x5eb627){_0x16a637=_0x16a637-0x0;var _0x25126d=_0xf3cd[_0x16a637];return _0x25126d;};'use strict';var moment=require(_0xdf3c('0x0'));var Sequelize=require(_0xdf3c('0x1'));module[_0xdf3c('0x2')]={'uniqueid':{'type':Sequelize[_0xdf3c('0x3')],'allowNull':![]},'type':{'type':Sequelize[_0xdf3c('0x4')](_0xdf3c('0x5'),'agent',_0xdf3c('0x6')),'allowNull':![],'defaultValue':_0xdf3c('0x6')},'transferredAt':{'type':Sequelize[_0xdf3c('0x7')],'allowNull':![],'defaultValue':Sequelize['NOW']}}; \ No newline at end of file +var _0xa9e0=['account','queue','DATE','NOW','moment','sequelize','exports'];(function(_0x2ee01d,_0x48f7a7){var _0x24bc9f=function(_0x2c23fd){while(--_0x2c23fd){_0x2ee01d['push'](_0x2ee01d['shift']());}};_0x24bc9f(++_0x48f7a7);}(_0xa9e0,0x123));var _0x0a9e=function(_0x187ee1,_0x3fd1e6){_0x187ee1=_0x187ee1-0x0;var _0x388160=_0xa9e0[_0x187ee1];return _0x388160;};'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/mailTransferReport/mailTransferReport.controller.js b/server/api/mailTransferReport/mailTransferReport.controller.js index 9fa380f..9716fa4 100644 --- a/server/api/mailTransferReport/mailTransferReport.controller.js +++ b/server/api/mailTransferReport/mailTransferReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb729=['order','sort','where','filter','merge','options','MailTransferReport','include','findAll','rows','catch','show','params','find','create','body','describe','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','util','path','sox','to-csv','lodash','squel','crypto','desk.js','papaparse','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/environment','../../config/license/util','../../mysqldb','end','json','offset','undefined','limit','count','status','Content-Range','reject','save','update','destroy','then','stack','name','send','index','map','rawAttributes','type','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty'];(function(_0x2be8c2,_0x14a4b5){var _0x97f531=function(_0xcee58d){while(--_0xcee58d){_0x2be8c2['push'](_0x2be8c2['shift']());}};_0x97f531(++_0x14a4b5);}(_0xb729,0x1a9));var _0x9b72=function(_0x3574c6,_0x255210){_0x3574c6=_0x3574c6-0x0;var _0xf4ab93=_0xb729[_0x3574c6];return _0xf4ab93;};'use strict';var emlformat=require(_0x9b72('0x0'));var rimraf=require(_0x9b72('0x1'));var zipdir=require(_0x9b72('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x9b72('0x3'));var moment=require(_0x9b72('0x4'));var BPromise=require(_0x9b72('0x5'));var Mustache=require('mustache');var util=require(_0x9b72('0x6'));var path=require(_0x9b72('0x7'));var sox=require(_0x9b72('0x8'));var csv=require(_0x9b72('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x9b72('0xa'));var squel=require(_0x9b72('0xb'));var crypto=require(_0x9b72('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x9b72('0xd'));var toCsv=require(_0x9b72('0x9'));var querystring=require('querystring');var Papa=require(_0x9b72('0xe'));var Redis=require(_0x9b72('0xf'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x9b72('0x10'));var hardwareService=require(_0x9b72('0x11'));var logger=require('../../config/logger')(_0x9b72('0x12'));var utils=require('../../config/utils');var config=require(_0x9b72('0x13'));var licenseUtil=require(_0x9b72('0x14'));var db=require(_0x9b72('0x15'))['db'];function respondWithStatusCode(_0x4bb57f,_0x1e7246){_0x1e7246=_0x1e7246||0xcc;return function(_0x3e74dc){if(_0x3e74dc){return _0x4bb57f['sendStatus'](_0x1e7246);}return _0x4bb57f['status'](_0x1e7246)[_0x9b72('0x16')]();};}function respondWithResult(_0x2ca198,_0x110ff3){_0x110ff3=_0x110ff3||0xc8;return function(_0x3454b7){if(_0x3454b7){return _0x2ca198['status'](_0x110ff3)[_0x9b72('0x17')](_0x3454b7);}};}function respondWithFilteredResult(_0x34ac8f,_0x16c2ec){return function(_0x16afe8){if(_0x16afe8){var _0x627f64=typeof _0x16c2ec[_0x9b72('0x18')]===_0x9b72('0x19')&&typeof _0x16c2ec[_0x9b72('0x1a')]===_0x9b72('0x19');var _0x464b7a=_0x16afe8['count'];var _0x58de08=_0x627f64?0x0:_0x16c2ec[_0x9b72('0x18')];var _0x53806c=_0x627f64?_0x16afe8[_0x9b72('0x1b')]:_0x16c2ec[_0x9b72('0x18')]+_0x16c2ec['limit'];var _0xbfce5;if(_0x53806c>=_0x464b7a){_0x53806c=_0x464b7a;_0xbfce5=0xc8;}else{_0xbfce5=0xce;}_0x34ac8f[_0x9b72('0x1c')](_0xbfce5);return _0x34ac8f['set'](_0x9b72('0x1d'),_0x58de08+'-'+_0x53806c+'/'+_0x464b7a)[_0x9b72('0x17')](_0x16afe8);}return null;};}function patchUpdates(_0x1c137a){return function(_0x15b335){try{jsonpatch['apply'](_0x15b335,_0x1c137a,!![]);}catch(_0x151fa7){return BPromise[_0x9b72('0x1e')](_0x151fa7);}return _0x15b335[_0x9b72('0x1f')]();};}function saveUpdates(_0x2de509,_0x496a45){return function(_0x45f3a4){if(_0x45f3a4){return _0x45f3a4[_0x9b72('0x20')](_0x2de509)['then'](function(_0x226a40){return _0x226a40;});}return null;};}function removeEntity(_0x501ac3,_0x3fd066){return function(_0x58cc09){if(_0x58cc09){return _0x58cc09[_0x9b72('0x21')]()[_0x9b72('0x22')](function(){_0x501ac3[_0x9b72('0x1c')](0xcc)['end']();});}};}function handleEntityNotFound(_0x241a24,_0xc4bf2d){return function(_0x391579){if(!_0x391579){_0x241a24['sendStatus'](0x194);}return _0x391579;};}function handleError(_0x1b702b,_0x3ba985){_0x3ba985=_0x3ba985||0x1f4;return function(_0x43df4c){logger['error'](_0x43df4c[_0x9b72('0x23')]);if(_0x43df4c[_0x9b72('0x24')]){delete _0x43df4c[_0x9b72('0x24')];}_0x1b702b[_0x9b72('0x1c')](_0x3ba985)[_0x9b72('0x25')](_0x43df4c);};}exports[_0x9b72('0x26')]=function(_0x2d7c37,_0x21b7bb){var _0x3dde46={},_0x2e7b2b={},_0x2c9740={'count':0x0,'rows':[]};var _0x206758=_[_0x9b72('0x27')](db['MailTransferReport'][_0x9b72('0x28')],function(_0x2ce786){return{'name':_0x2ce786['fieldName'],'type':_0x2ce786[_0x9b72('0x29')]['key']};});_0x2e7b2b[_0x9b72('0x2a')]=_[_0x9b72('0x27')](_0x206758,_0x9b72('0x24'));_0x2e7b2b[_0x9b72('0x2b')]=_[_0x9b72('0x2c')](_0x2d7c37['query']);_0x2e7b2b[_0x9b72('0x2d')]=_[_0x9b72('0x2e')](_0x2e7b2b[_0x9b72('0x2a')],_0x2e7b2b[_0x9b72('0x2b')]);_0x3dde46[_0x9b72('0x2f')]=_[_0x9b72('0x2e')](_0x2e7b2b[_0x9b72('0x2a')],qs[_0x9b72('0x30')](_0x2d7c37[_0x9b72('0x2b')][_0x9b72('0x30')]));_0x3dde46['attributes']=_0x3dde46['attributes'][_0x9b72('0x31')]?_0x3dde46[_0x9b72('0x2f')]:_0x2e7b2b[_0x9b72('0x2a')];if(!_0x2d7c37[_0x9b72('0x2b')][_0x9b72('0x32')]('nolimit')){_0x3dde46[_0x9b72('0x1a')]=qs[_0x9b72('0x1a')](_0x2d7c37[_0x9b72('0x2b')]['limit']);_0x3dde46[_0x9b72('0x18')]=qs[_0x9b72('0x18')](_0x2d7c37[_0x9b72('0x2b')][_0x9b72('0x18')]);}_0x3dde46[_0x9b72('0x33')]=qs[_0x9b72('0x34')](_0x2d7c37[_0x9b72('0x2b')][_0x9b72('0x34')]);_0x3dde46[_0x9b72('0x35')]=qs[_0x9b72('0x2d')](_['pick'](_0x2d7c37[_0x9b72('0x2b')],_0x2e7b2b['filters']),_0x206758);if(_0x2d7c37[_0x9b72('0x2b')][_0x9b72('0x36')]){_0x3dde46[_0x9b72('0x35')]=_[_0x9b72('0x37')](_0x3dde46[_0x9b72('0x35')],{'$or':_[_0x9b72('0x27')](_0x206758,function(_0xfb92b7){if(_0xfb92b7[_0x9b72('0x29')]!=='VIRTUAL'){var _0x37d6c4={};_0x37d6c4[_0xfb92b7[_0x9b72('0x24')]]={'$like':'%'+_0x2d7c37[_0x9b72('0x2b')][_0x9b72('0x36')]+'%'};return _0x37d6c4;}})});}_0x3dde46=_[_0x9b72('0x37')]({},_0x3dde46,_0x2d7c37[_0x9b72('0x38')]);var _0x32179d={'where':_0x3dde46[_0x9b72('0x35')]};return db[_0x9b72('0x39')][_0x9b72('0x1b')](_0x32179d)['then'](function(_0x2dbd95){_0x2c9740[_0x9b72('0x1b')]=_0x2dbd95;if(_0x2d7c37[_0x9b72('0x2b')]['includeAll']){_0x3dde46[_0x9b72('0x3a')]=[{'all':!![]}];}return db[_0x9b72('0x39')][_0x9b72('0x3b')](_0x3dde46);})['then'](function(_0x398640){_0x2c9740[_0x9b72('0x3c')]=_0x398640;return _0x2c9740;})[_0x9b72('0x22')](respondWithFilteredResult(_0x21b7bb,_0x3dde46))[_0x9b72('0x3d')](handleError(_0x21b7bb,null));};exports[_0x9b72('0x3e')]=function(_0x2bd15c,_0x16046e){var _0x9e655={'raw':!![],'where':{'id':_0x2bd15c[_0x9b72('0x3f')]['id']}},_0x57f163={};_0x57f163[_0x9b72('0x2a')]=_[_0x9b72('0x2c')](db[_0x9b72('0x39')][_0x9b72('0x28')]);_0x57f163['query']=_[_0x9b72('0x2c')](_0x2bd15c[_0x9b72('0x2b')]);_0x57f163[_0x9b72('0x2d')]=_['intersection'](_0x57f163[_0x9b72('0x2a')],_0x57f163[_0x9b72('0x2b')]);_0x9e655[_0x9b72('0x2f')]=_[_0x9b72('0x2e')](_0x57f163[_0x9b72('0x2a')],qs[_0x9b72('0x30')](_0x2bd15c[_0x9b72('0x2b')][_0x9b72('0x30')]));_0x9e655[_0x9b72('0x2f')]=_0x9e655[_0x9b72('0x2f')][_0x9b72('0x31')]?_0x9e655[_0x9b72('0x2f')]:_0x57f163['model'];if(_0x2bd15c[_0x9b72('0x2b')]['includeAll']){_0x9e655[_0x9b72('0x3a')]=[{'all':!![]}];}_0x9e655=_[_0x9b72('0x37')]({},_0x9e655,_0x2bd15c[_0x9b72('0x38')]);return db['MailTransferReport'][_0x9b72('0x40')](_0x9e655)[_0x9b72('0x22')](handleEntityNotFound(_0x16046e,null))[_0x9b72('0x22')](respondWithResult(_0x16046e,null))['catch'](handleError(_0x16046e,null));};exports[_0x9b72('0x41')]=function(_0x44113f,_0x20e1e6){return db[_0x9b72('0x39')]['create'](_0x44113f[_0x9b72('0x42')],{})['then'](respondWithResult(_0x20e1e6,0xc9))[_0x9b72('0x3d')](handleError(_0x20e1e6,null));};exports[_0x9b72('0x20')]=function(_0x356122,_0x18f7bf){if(_0x356122[_0x9b72('0x42')]['id']){delete _0x356122[_0x9b72('0x42')]['id'];}return db[_0x9b72('0x39')][_0x9b72('0x40')]({'where':{'id':_0x356122[_0x9b72('0x3f')]['id']}})[_0x9b72('0x22')](handleEntityNotFound(_0x18f7bf,null))[_0x9b72('0x22')](saveUpdates(_0x356122['body'],null))[_0x9b72('0x22')](respondWithResult(_0x18f7bf,null))[_0x9b72('0x3d')](handleError(_0x18f7bf,null));};exports['destroy']=function(_0x30fa0e,_0x5f51d1){return db[_0x9b72('0x39')][_0x9b72('0x40')]({'where':{'id':_0x30fa0e[_0x9b72('0x3f')]['id']}})[_0x9b72('0x22')](handleEntityNotFound(_0x5f51d1,null))[_0x9b72('0x22')](removeEntity(_0x5f51d1,null))[_0x9b72('0x3d')](handleError(_0x5f51d1,null));};exports[_0x9b72('0x43')]=function(_0x43043e,_0x2c3268){return db[_0x9b72('0x39')]['describe']()[_0x9b72('0x22')](respondWithResult(_0x2c3268,null))[_0x9b72('0x3d')](handleError(_0x2c3268,null));}; \ No newline at end of file +var _0x711f=['includeAll','include','catch','show','params','keys','rawAttributes','find','create','body','describe','rimraf','zip-dir','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','querystring','papaparse','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','status','offset','limit','undefined','count','set','Content-Range','apply','reject','save','update','then','destroy','sendStatus','error','stack','name','send','index','map','MailTransferReport','fieldName','type','key','model','query','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','filters','pick','filter','where','VIRTUAL','merge','options'];(function(_0x2e4aa2,_0x11956a){var _0x5e6092=function(_0x4c12c2){while(--_0x4c12c2){_0x2e4aa2['push'](_0x2e4aa2['shift']());}};_0x5e6092(++_0x11956a);}(_0x711f,0x9b));var _0xf711=function(_0x3bbbd2,_0x506692){_0x3bbbd2=_0x3bbbd2-0x0;var _0x18ad2e=_0x711f[_0x3bbbd2];return _0x18ad2e;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xf711('0x0'));var zipdir=require(_0xf711('0x1'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xf711('0x2'));var util=require(_0xf711('0x3'));var path=require(_0xf711('0x4'));var sox=require(_0xf711('0x5'));var csv=require(_0xf711('0x6'));var ejs=require(_0xf711('0x7'));var fs=require('fs');var fs_extra=require(_0xf711('0x8'));var _=require(_0xf711('0x9'));var squel=require('squel');var crypto=require(_0xf711('0xa'));var jsforce=require(_0xf711('0xb'));var deskjs=require('desk.js');var toCsv=require(_0xf711('0x6'));var querystring=require(_0xf711('0xc'));var Papa=require(_0xf711('0xd'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0xf711('0xe'));var hardwareService=require(_0xf711('0xf'));var logger=require('../../config/logger')(_0xf711('0x10'));var utils=require(_0xf711('0x11'));var config=require(_0xf711('0x12'));var licenseUtil=require(_0xf711('0x13'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x256a33,_0xe64814){_0xe64814=_0xe64814||0xcc;return function(_0x315793){if(_0x315793){return _0x256a33['sendStatus'](_0xe64814);}return _0x256a33[_0xf711('0x14')](_0xe64814)['end']();};}function respondWithResult(_0x20f026,_0x8ce2d1){_0x8ce2d1=_0x8ce2d1||0xc8;return function(_0x44e21e){if(_0x44e21e){return _0x20f026[_0xf711('0x14')](_0x8ce2d1)['json'](_0x44e21e);}};}function respondWithFilteredResult(_0x69a8de,_0x198ecf){return function(_0x15ec60){if(_0x15ec60){var _0x1833ca=typeof _0x198ecf[_0xf711('0x15')]==='undefined'&&typeof _0x198ecf[_0xf711('0x16')]===_0xf711('0x17');var _0x4dec2d=_0x15ec60[_0xf711('0x18')];var _0x3abd55=_0x1833ca?0x0:_0x198ecf[_0xf711('0x15')];var _0x3d41cc=_0x1833ca?_0x15ec60['count']:_0x198ecf[_0xf711('0x15')]+_0x198ecf[_0xf711('0x16')];var _0x4b0187;if(_0x3d41cc>=_0x4dec2d){_0x3d41cc=_0x4dec2d;_0x4b0187=0xc8;}else{_0x4b0187=0xce;}_0x69a8de[_0xf711('0x14')](_0x4b0187);return _0x69a8de[_0xf711('0x19')](_0xf711('0x1a'),_0x3abd55+'-'+_0x3d41cc+'/'+_0x4dec2d)['json'](_0x15ec60);}return null;};}function patchUpdates(_0x450e7f){return function(_0x29bbe0){try{jsonpatch[_0xf711('0x1b')](_0x29bbe0,_0x450e7f,!![]);}catch(_0x3b63ea){return BPromise[_0xf711('0x1c')](_0x3b63ea);}return _0x29bbe0[_0xf711('0x1d')]();};}function saveUpdates(_0x1268d4,_0x10c90a){return function(_0x1dfbe0){if(_0x1dfbe0){return _0x1dfbe0[_0xf711('0x1e')](_0x1268d4)[_0xf711('0x1f')](function(_0x476fe0){return _0x476fe0;});}return null;};}function removeEntity(_0x194e9b,_0x2192de){return function(_0x2d2eeb){if(_0x2d2eeb){return _0x2d2eeb[_0xf711('0x20')]()[_0xf711('0x1f')](function(){_0x194e9b[_0xf711('0x14')](0xcc)['end']();});}};}function handleEntityNotFound(_0x1a499e,_0x4aac94){return function(_0x3e23f7){if(!_0x3e23f7){_0x1a499e[_0xf711('0x21')](0x194);}return _0x3e23f7;};}function handleError(_0x50d884,_0x14a6ea){_0x14a6ea=_0x14a6ea||0x1f4;return function(_0xfb5d59){logger[_0xf711('0x22')](_0xfb5d59[_0xf711('0x23')]);if(_0xfb5d59[_0xf711('0x24')]){delete _0xfb5d59[_0xf711('0x24')];}_0x50d884[_0xf711('0x14')](_0x14a6ea)[_0xf711('0x25')](_0xfb5d59);};}exports[_0xf711('0x26')]=function(_0x3904c2,_0x49b7e5){var _0x5b9070={},_0x2fc62e={},_0x3b064e={'count':0x0,'rows':[]};var _0x2f2871=_[_0xf711('0x27')](db[_0xf711('0x28')]['rawAttributes'],function(_0x6cbe8){return{'name':_0x6cbe8[_0xf711('0x29')],'type':_0x6cbe8[_0xf711('0x2a')][_0xf711('0x2b')]};});_0x2fc62e[_0xf711('0x2c')]=_[_0xf711('0x27')](_0x2f2871,'name');_0x2fc62e[_0xf711('0x2d')]=_['keys'](_0x3904c2[_0xf711('0x2d')]);_0x2fc62e['filters']=_[_0xf711('0x2e')](_0x2fc62e[_0xf711('0x2c')],_0x2fc62e['query']);_0x5b9070[_0xf711('0x2f')]=_[_0xf711('0x2e')](_0x2fc62e[_0xf711('0x2c')],qs[_0xf711('0x30')](_0x3904c2[_0xf711('0x2d')][_0xf711('0x30')]));_0x5b9070[_0xf711('0x2f')]=_0x5b9070[_0xf711('0x2f')][_0xf711('0x31')]?_0x5b9070[_0xf711('0x2f')]:_0x2fc62e['model'];if(!_0x3904c2['query'][_0xf711('0x32')](_0xf711('0x33'))){_0x5b9070[_0xf711('0x16')]=qs['limit'](_0x3904c2['query'][_0xf711('0x16')]);_0x5b9070[_0xf711('0x15')]=qs[_0xf711('0x15')](_0x3904c2['query'][_0xf711('0x15')]);}_0x5b9070[_0xf711('0x34')]=qs[_0xf711('0x35')](_0x3904c2['query']['sort']);_0x5b9070['where']=qs[_0xf711('0x36')](_[_0xf711('0x37')](_0x3904c2[_0xf711('0x2d')],_0x2fc62e[_0xf711('0x36')]),_0x2f2871);if(_0x3904c2[_0xf711('0x2d')][_0xf711('0x38')]){_0x5b9070[_0xf711('0x39')]=_['merge'](_0x5b9070[_0xf711('0x39')],{'$or':_['map'](_0x2f2871,function(_0x186586){if(_0x186586['type']!==_0xf711('0x3a')){var _0x7678fe={};_0x7678fe[_0x186586[_0xf711('0x24')]]={'$like':'%'+_0x3904c2[_0xf711('0x2d')][_0xf711('0x38')]+'%'};return _0x7678fe;}})});}_0x5b9070=_[_0xf711('0x3b')]({},_0x5b9070,_0x3904c2[_0xf711('0x3c')]);var _0x2ebdef={'where':_0x5b9070['where']};return db[_0xf711('0x28')][_0xf711('0x18')](_0x2ebdef)[_0xf711('0x1f')](function(_0x350ba4){_0x3b064e['count']=_0x350ba4;if(_0x3904c2['query'][_0xf711('0x3d')]){_0x5b9070[_0xf711('0x3e')]=[{'all':!![]}];}return db['MailTransferReport']['findAll'](_0x5b9070);})[_0xf711('0x1f')](function(_0x4ab104){_0x3b064e['rows']=_0x4ab104;return _0x3b064e;})[_0xf711('0x1f')](respondWithFilteredResult(_0x49b7e5,_0x5b9070))[_0xf711('0x3f')](handleError(_0x49b7e5,null));};exports[_0xf711('0x40')]=function(_0x296af9,_0xa439d9){var _0x329546={'raw':!![],'where':{'id':_0x296af9[_0xf711('0x41')]['id']}},_0x1ea7b7={};_0x1ea7b7[_0xf711('0x2c')]=_[_0xf711('0x42')](db[_0xf711('0x28')][_0xf711('0x43')]);_0x1ea7b7[_0xf711('0x2d')]=_['keys'](_0x296af9[_0xf711('0x2d')]);_0x1ea7b7[_0xf711('0x36')]=_[_0xf711('0x2e')](_0x1ea7b7[_0xf711('0x2c')],_0x1ea7b7[_0xf711('0x2d')]);_0x329546[_0xf711('0x2f')]=_[_0xf711('0x2e')](_0x1ea7b7['model'],qs[_0xf711('0x30')](_0x296af9['query'][_0xf711('0x30')]));_0x329546[_0xf711('0x2f')]=_0x329546[_0xf711('0x2f')][_0xf711('0x31')]?_0x329546['attributes']:_0x1ea7b7[_0xf711('0x2c')];if(_0x296af9[_0xf711('0x2d')][_0xf711('0x3d')]){_0x329546[_0xf711('0x3e')]=[{'all':!![]}];}_0x329546=_[_0xf711('0x3b')]({},_0x329546,_0x296af9[_0xf711('0x3c')]);return db[_0xf711('0x28')][_0xf711('0x44')](_0x329546)[_0xf711('0x1f')](handleEntityNotFound(_0xa439d9,null))['then'](respondWithResult(_0xa439d9,null))['catch'](handleError(_0xa439d9,null));};exports['create']=function(_0x36597f,_0x4c0cca){return db[_0xf711('0x28')][_0xf711('0x45')](_0x36597f[_0xf711('0x46')],{})[_0xf711('0x1f')](respondWithResult(_0x4c0cca,0xc9))[_0xf711('0x3f')](handleError(_0x4c0cca,null));};exports['update']=function(_0x30c978,_0x5a5831){if(_0x30c978['body']['id']){delete _0x30c978[_0xf711('0x46')]['id'];}return db[_0xf711('0x28')][_0xf711('0x44')]({'where':{'id':_0x30c978['params']['id']}})[_0xf711('0x1f')](handleEntityNotFound(_0x5a5831,null))['then'](saveUpdates(_0x30c978[_0xf711('0x46')],null))[_0xf711('0x1f')](respondWithResult(_0x5a5831,null))[_0xf711('0x3f')](handleError(_0x5a5831,null));};exports[_0xf711('0x20')]=function(_0x58ead7,_0x2a429f){return db[_0xf711('0x28')][_0xf711('0x44')]({'where':{'id':_0x58ead7[_0xf711('0x41')]['id']}})[_0xf711('0x1f')](handleEntityNotFound(_0x2a429f,null))['then'](removeEntity(_0x2a429f,null))['catch'](handleError(_0x2a429f,null));};exports[_0xf711('0x47')]=function(_0xd4e81a,_0x40df0b){return db['MailTransferReport'][_0xf711('0x47')]()[_0xf711('0x1f')](respondWithResult(_0x40df0b,null))[_0xf711('0x3f')](handleError(_0x40df0b,null));}; \ No newline at end of file diff --git a/server/api/mailTransferReport/mailTransferReport.model.js b/server/api/mailTransferReport/mailTransferReport.model.js index b198b0c..05712e2 100644 --- a/server/api/mailTransferReport/mailTransferReport.model.js +++ b/server/api/mailTransferReport/mailTransferReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x861c=['bluebird','request-promise','path','rimraf','../../config/environment','./mailTransferReport.attributes','exports','define','MailTransferReport','report_mail_transfer','uniqueid','lodash','util','../../config/logger','api','moment'];(function(_0x562354,_0x2868e4){var _0x20d31e=function(_0x545754){while(--_0x545754){_0x562354['push'](_0x562354['shift']());}};_0x20d31e(++_0x2868e4);}(_0x861c,0xdb));var _0xc861=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x861c[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0xc861('0x0'));var util=require(_0xc861('0x1'));var logger=require(_0xc861('0x2'))(_0xc861('0x3'));var moment=require(_0xc861('0x4'));var BPromise=require(_0xc861('0x5'));var rp=require(_0xc861('0x6'));var fs=require('fs');var path=require(_0xc861('0x7'));var rimraf=require(_0xc861('0x8'));var config=require(_0xc861('0x9'));var attributes=require(_0xc861('0xa'));module[_0xc861('0xb')]=function(_0x562f12,_0xc3b5fd){return _0x562f12[_0xc861('0xc')](_0xc861('0xd'),attributes,{'tableName':_0xc861('0xe'),'paranoid':![],'indexes':[{'name':_0xc861('0xf'),'fields':[_0xc861('0xf')]}],'timestamps':!![]});}; \ No newline at end of file +var _0xece0=['moment','request-promise','path','rimraf','exports','define','MailTransferReport','report_mail_transfer','uniqueid','lodash','util','api'];(function(_0x1f95f7,_0x361b99){var _0x1a0a51=function(_0x49275e){while(--_0x49275e){_0x1f95f7['push'](_0x1f95f7['shift']());}};_0x1a0a51(++_0x361b99);}(_0xece0,0xa5));var _0x0ece=function(_0x54fddc,_0x2399b0){_0x54fddc=_0x54fddc-0x0;var _0x16fbe1=_0xece0[_0x54fddc];return _0x16fbe1;};'use strict';var _=require(_0x0ece('0x0'));var util=require(_0x0ece('0x1'));var logger=require('../../config/logger')(_0x0ece('0x2'));var moment=require(_0x0ece('0x3'));var BPromise=require('bluebird');var rp=require(_0x0ece('0x4'));var fs=require('fs');var path=require(_0x0ece('0x5'));var rimraf=require(_0x0ece('0x6'));var config=require('../../config/environment');var attributes=require('./mailTransferReport.attributes');module[_0x0ece('0x7')]=function(_0x3a107d,_0xb736f9){return _0x3a107d[_0x0ece('0x8')](_0x0ece('0x9'),attributes,{'tableName':_0x0ece('0xa'),'paranoid':![],'indexes':[{'name':_0x0ece('0xb'),'fields':[_0x0ece('0xb')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/mailTransferReport/mailTransferReport.rpc.js b/server/api/mailTransferReport/mailTransferReport.rpc.js index 4a23361..67cb505 100644 --- a/server/api/mailTransferReport/mailTransferReport.rpc.js +++ b/server/api/mailTransferReport/mailTransferReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xea83=['jayson/promise','client','http','request','then','info','request\x20sent','debug','MailTransferReport,\x20%s,\x20%s,\x20%s','error','code','MailTransferReport,\x20%s,\x20%s','message','result','catch','lodash','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment'];(function(_0x160e25,_0x562b96){var _0x52e7b8=function(_0x40fc88){while(--_0x40fc88){_0x160e25['push'](_0x160e25['shift']());}};_0x52e7b8(++_0x562b96);}(_0xea83,0x10c));var _0x3ea8=function(_0x447af3,_0x381c44){_0x447af3=_0x447af3-0x0;var _0x202e95=_0xea83[_0x447af3];return _0x202e95;};'use strict';var _=require(_0x3ea8('0x0'));var util=require('util');var moment=require(_0x3ea8('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x3ea8('0x2'));var db=require(_0x3ea8('0x3'))['db'];var utils=require(_0x3ea8('0x4'));var logger=require(_0x3ea8('0x5'))(_0x3ea8('0x6'));var config=require(_0x3ea8('0x7'));var jayson=require(_0x3ea8('0x8'));var client=jayson[_0x3ea8('0x9')][_0x3ea8('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x96dc66,_0x323159,_0x5002a4){return new BPromise(function(_0x105752,_0xafef8b){return client[_0x3ea8('0xb')](_0x96dc66,_0x5002a4)[_0x3ea8('0xc')](function(_0x409dfb){logger[_0x3ea8('0xd')]('MailTransferReport,\x20%s,\x20%s',_0x323159,_0x3ea8('0xe'));logger[_0x3ea8('0xf')](_0x3ea8('0x10'),_0x323159,_0x3ea8('0xe'),JSON['stringify'](_0x409dfb));if(_0x409dfb[_0x3ea8('0x11')]){if(_0x409dfb[_0x3ea8('0x11')][_0x3ea8('0x12')]===0x1f4){logger[_0x3ea8('0x11')](_0x3ea8('0x13'),_0x323159,_0x409dfb[_0x3ea8('0x11')]['message']);return _0xafef8b(_0x409dfb[_0x3ea8('0x11')][_0x3ea8('0x14')]);}logger['error'](_0x3ea8('0x13'),_0x323159,_0x409dfb[_0x3ea8('0x11')][_0x3ea8('0x14')]);return _0x105752(_0x409dfb[_0x3ea8('0x11')]['message']);}else{logger[_0x3ea8('0xd')](_0x3ea8('0x13'),_0x323159,_0x3ea8('0xe'));_0x105752(_0x409dfb[_0x3ea8('0x15')]['message']);}})[_0x3ea8('0x16')](function(_0x497560){logger[_0x3ea8('0x11')]('MailTransferReport,\x20%s,\x20%s',_0x323159,_0x497560);_0xafef8b(_0x497560);});});} \ No newline at end of file +var _0xdadf=['then','info','MailTransferReport,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','catch','lodash','moment','bluebird','randomstring','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request'];(function(_0x4f668f,_0x15c85e){var _0x2693e9=function(_0x3b1c0e){while(--_0x3b1c0e){_0x4f668f['push'](_0x4f668f['shift']());}};_0x2693e9(++_0x15c85e);}(_0xdadf,0x159));var _0xfdad=function(_0x2f11df,_0x128253){_0x2f11df=_0x2f11df-0x0;var _0x206d5c=_0xdadf[_0x2f11df];return _0x206d5c;};'use strict';var _=require(_0xfdad('0x0'));var util=require('util');var moment=require(_0xfdad('0x1'));var BPromise=require(_0xfdad('0x2'));var rs=require(_0xfdad('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xfdad('0x4'));var logger=require(_0xfdad('0x5'))(_0xfdad('0x6'));var config=require(_0xfdad('0x7'));var jayson=require(_0xfdad('0x8'));var client=jayson[_0xfdad('0x9')][_0xfdad('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x35476a,_0x402f2e,_0x212f6b){return new BPromise(function(_0x31d833,_0xa4f3ea){return client[_0xfdad('0xb')](_0x35476a,_0x212f6b)[_0xfdad('0xc')](function(_0x58d8ce){logger[_0xfdad('0xd')](_0xfdad('0xe'),_0x402f2e,_0xfdad('0xf'));logger['debug']('MailTransferReport,\x20%s,\x20%s,\x20%s',_0x402f2e,_0xfdad('0xf'),JSON[_0xfdad('0x10')](_0x58d8ce));if(_0x58d8ce['error']){if(_0x58d8ce[_0xfdad('0x11')][_0xfdad('0x12')]===0x1f4){logger['error'](_0xfdad('0xe'),_0x402f2e,_0x58d8ce['error']['message']);return _0xa4f3ea(_0x58d8ce[_0xfdad('0x11')][_0xfdad('0x13')]);}logger[_0xfdad('0x11')](_0xfdad('0xe'),_0x402f2e,_0x58d8ce[_0xfdad('0x11')][_0xfdad('0x13')]);return _0x31d833(_0x58d8ce[_0xfdad('0x11')][_0xfdad('0x13')]);}else{logger[_0xfdad('0xd')](_0xfdad('0xe'),_0x402f2e,_0xfdad('0xf'));_0x31d833(_0x58d8ce['result'][_0xfdad('0x13')]);}})[_0xfdad('0x14')](function(_0xb25626){logger[_0xfdad('0x11')](_0xfdad('0xe'),_0x402f2e,_0xb25626);_0xa4f3ea(_0xb25626);});});} \ No newline at end of file diff --git a/server/api/memberReport/index.js b/server/api/memberReport/index.js index 56fe32f..01f823a 100644 --- a/server/api/memberReport/index.js +++ b/server/api/memberReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x21f7=['update','delete','destroy','util','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','index','/describe','describe','/:id','show','post','isAuthenticated','create'];(function(_0x4ccde3,_0x38ca57){var _0x3348ac=function(_0x5433f0){while(--_0x5433f0){_0x4ccde3['push'](_0x4ccde3['shift']());}};_0x3348ac(++_0x38ca57);}(_0x21f7,0x93));var _0x721f=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0x21f7[_0x2dafbe];return _0x58a45a;};'use strict';var multer=require('multer');var util=require(_0x721f('0x0'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x721f('0x1'));var router=express[_0x721f('0x2')]();var fs_extra=require('fs-extra');var auth=require(_0x721f('0x3'));var interaction=require(_0x721f('0x4'));var config=require(_0x721f('0x5'));var controller=require('./memberReport.controller');router[_0x721f('0x6')]('/',auth['isAuthenticated'](),controller[_0x721f('0x7')]);router['get'](_0x721f('0x8'),auth['isAuthenticated'](),controller[_0x721f('0x9')]);router[_0x721f('0x6')](_0x721f('0xa'),auth['isAuthenticated'](),controller[_0x721f('0xb')]);router[_0x721f('0xc')]('/',auth[_0x721f('0xd')](),controller[_0x721f('0xe')]);router['put'](_0x721f('0xa'),auth[_0x721f('0xd')](),controller[_0x721f('0xf')]);router[_0x721f('0x10')](_0x721f('0xa'),auth[_0x721f('0xd')](),controller[_0x721f('0x11')]);module['exports']=router; \ No newline at end of file +var _0x8ec8=['/describe','/:id','post','create','update','destroy','exports','util','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./memberReport.controller','isAuthenticated','index','get'];(function(_0x27c3a7,_0x11244d){var _0x298838=function(_0x6319fe){while(--_0x6319fe){_0x27c3a7['push'](_0x27c3a7['shift']());}};_0x298838(++_0x11244d);}(_0x8ec8,0x1e3));var _0x88ec=function(_0x46698a,_0x8de1e4){_0x46698a=_0x46698a-0x0;var _0x356db0=_0x8ec8[_0x46698a];return _0x356db0;};'use strict';var multer=require('multer');var util=require(_0x88ec('0x0'));var path=require('path');var timeout=require(_0x88ec('0x1'));var express=require('express');var router=express[_0x88ec('0x2')]();var fs_extra=require(_0x88ec('0x3'));var auth=require(_0x88ec('0x4'));var interaction=require(_0x88ec('0x5'));var config=require('../../config/environment');var controller=require(_0x88ec('0x6'));router['get']('/',auth[_0x88ec('0x7')](),controller[_0x88ec('0x8')]);router[_0x88ec('0x9')](_0x88ec('0xa'),auth['isAuthenticated'](),controller['describe']);router[_0x88ec('0x9')](_0x88ec('0xb'),auth[_0x88ec('0x7')](),controller['show']);router[_0x88ec('0xc')]('/',auth[_0x88ec('0x7')](),controller[_0x88ec('0xd')]);router['put'](_0x88ec('0xb'),auth['isAuthenticated'](),controller[_0x88ec('0xe')]);router['delete'](_0x88ec('0xb'),auth[_0x88ec('0x7')](),controller[_0x88ec('0xf')]);module[_0x88ec('0x10')]=router; \ No newline at end of file diff --git a/server/api/memberReport/memberReport.attributes.js b/server/api/memberReport/memberReport.attributes.js index b97b1d7..d018cc3 100644 --- a/server/api/memberReport/memberReport.attributes.js +++ b/server/api/memberReport/memberReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5ff3=['LOGIN,\x20PAUSE,\x20TALKING','DATE','enterAt','diff','seconds','setDataValue','talk:[inbound,\x20outbound],\x20pause:[reason]','talk:[queue]','INTEGER','moment','STRING','DEFAULT\x20PAUSE'];(function(_0x2de737,_0xa50432){var _0x4a899a=function(_0x48d139){while(--_0x48d139){_0x2de737['push'](_0x2de737['shift']());}};_0x4a899a(++_0xa50432);}(_0x5ff3,0x17d));var _0x35ff=function(_0x47cbc5,_0x3f695f){_0x47cbc5=_0x47cbc5-0x0;var _0x12cba1=_0x5ff3[_0x47cbc5];return _0x12cba1;};'use strict';var Sequelize=require('sequelize');var moment=require(_0x35ff('0x0'));module['exports']={'channel':{'type':Sequelize[_0x35ff('0x1')]},'membername':{'type':Sequelize['STRING']},'interface':{'type':Sequelize[_0x35ff('0x1')]},'type':{'type':Sequelize[_0x35ff('0x1')],'defaultValue':_0x35ff('0x2'),'comment':_0x35ff('0x3')},'duration':{'type':Sequelize['INTEGER']},'enterAt':{'type':Sequelize[_0x35ff('0x4')]},'exitAt':{'type':Sequelize[_0x35ff('0x4')],'set':function(_0x2e9873){var _0x11e738=moment(_0x2e9873);var _0x30c3ff=moment(this['getDataValue'](_0x35ff('0x5')));var _0x4c9fab=_0x11e738[_0x35ff('0x6')](_0x30c3ff,_0x35ff('0x7'));this[_0x35ff('0x8')]('exitAt',_0x2e9873);this[_0x35ff('0x8')]('duration',_0x4c9fab||null);}},'data1':{'type':Sequelize[_0x35ff('0x1')],'comment':_0x35ff('0x9')},'data2':{'type':Sequelize['STRING'],'comment':'talk:[start]'},'data3':{'type':Sequelize[_0x35ff('0x1')],'comment':'talk:[destination]'},'data4':{'type':Sequelize['STRING'],'comment':'talk:[dial\x20string]'},'data5':{'type':Sequelize[_0x35ff('0x1')],'comment':_0x35ff('0xa')},'role':{'type':Sequelize[_0x35ff('0x1')]},'internal':{'type':Sequelize[_0x35ff('0xb')]},'uniqueid':{'type':Sequelize['STRING']}}; \ No newline at end of file +var _0x5668=['duration','talk:[inbound,\x20outbound],\x20pause:[reason]','talk:[start]','talk:[queue]','sequelize','moment','exports','STRING','DEFAULT\x20PAUSE','LOGIN,\x20PAUSE,\x20TALKING','INTEGER','DATE','getDataValue','diff','exitAt'];(function(_0xfc5050,_0x158740){var _0x3b92ce=function(_0x5f23a0){while(--_0x5f23a0){_0xfc5050['push'](_0xfc5050['shift']());}};_0x3b92ce(++_0x158740);}(_0x5668,0x8b));var _0x8566=function(_0x511043,_0x4ad772){_0x511043=_0x511043-0x0;var _0x15cb1b=_0x5668[_0x511043];return _0x15cb1b;};'use strict';var Sequelize=require(_0x8566('0x0'));var moment=require(_0x8566('0x1'));module[_0x8566('0x2')]={'channel':{'type':Sequelize[_0x8566('0x3')]},'membername':{'type':Sequelize[_0x8566('0x3')]},'interface':{'type':Sequelize[_0x8566('0x3')]},'type':{'type':Sequelize[_0x8566('0x3')],'defaultValue':_0x8566('0x4'),'comment':_0x8566('0x5')},'duration':{'type':Sequelize[_0x8566('0x6')]},'enterAt':{'type':Sequelize[_0x8566('0x7')]},'exitAt':{'type':Sequelize[_0x8566('0x7')],'set':function(_0x2f958c){var _0x4885d6=moment(_0x2f958c);var _0x355fce=moment(this[_0x8566('0x8')]('enterAt'));var _0x4aaf3f=_0x4885d6[_0x8566('0x9')](_0x355fce,'seconds');this['setDataValue'](_0x8566('0xa'),_0x2f958c);this['setDataValue'](_0x8566('0xb'),_0x4aaf3f||null);}},'data1':{'type':Sequelize[_0x8566('0x3')],'comment':_0x8566('0xc')},'data2':{'type':Sequelize['STRING'],'comment':_0x8566('0xd')},'data3':{'type':Sequelize[_0x8566('0x3')],'comment':'talk:[destination]'},'data4':{'type':Sequelize['STRING'],'comment':'talk:[dial\x20string]'},'data5':{'type':Sequelize['STRING'],'comment':_0x8566('0xe')},'role':{'type':Sequelize[_0x8566('0x3')]},'internal':{'type':Sequelize[_0x8566('0x6')]},'uniqueid':{'type':Sequelize[_0x8566('0x3')]}}; \ No newline at end of file diff --git a/server/api/memberReport/memberReport.controller.js b/server/api/memberReport/memberReport.controller.js index c6f6899..46e65c4 100644 --- a/server/api/memberReport/memberReport.controller.js +++ b/server/api/memberReport/memberReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9957=['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','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','MemberReport','findAll','rows','show','rawAttributes','includeAll','include','find','create','catch','body','params','describe','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache'];(function(_0x2b0113,_0x2fcc52){var _0x16c5e4=function(_0x13c00d){while(--_0x13c00d){_0x2b0113['push'](_0x2b0113['shift']());}};_0x16c5e4(++_0x2fcc52);}(_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['MemberReport']['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['MemberReport'][_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['MemberReport'][_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('0x40')][_0x7995('0x47')]({'where':{'id':_0x4ffc8a['params']['id']}})['then'](handleEntityNotFound(_0x19da63,null))['then'](removeEntity(_0x19da63,null))[_0x7995('0x49')](handleError(_0x19da63,null));};exports[_0x7995('0x4c')]=function(_0x4cf5db,_0x1cd85){return db[_0x7995('0x40')][_0x7995('0x4c')]()[_0x7995('0x26')](respondWithResult(_0x1cd85,null))[_0x7995('0x49')](handleError(_0x1cd85,null));}; \ No newline at end of file +var _0x008c=['destroy','sendStatus','send','index','MemberReport','rawAttributes','key','model','map','name','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','where','type','VIRTUAL','filter','merge','options','includeAll','include','findAll','rows','show','catch','create','body','find','params','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','desk.js','papaparse','ioredis','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','end','status','json','offset','undefined','limit','count','save','update','then'];(function(_0x5202d3,_0x24d569){var _0x360f3d=function(_0x12d19e){while(--_0x12d19e){_0x5202d3['push'](_0x5202d3['shift']());}};_0x360f3d(++_0x24d569);}(_0x008c,0x188));var _0xc008=function(_0x22d655,_0x3941dd){_0x22d655=_0x22d655-0x0;var _0x257739=_0x008c[_0x22d655];return _0x257739;};'use strict';var emlformat=require(_0xc008('0x0'));var rimraf=require(_0xc008('0x1'));var zipdir=require(_0xc008('0x2'));var jsonpatch=require(_0xc008('0x3'));var rp=require(_0xc008('0x4'));var moment=require('moment');var BPromise=require(_0xc008('0x5'));var Mustache=require(_0xc008('0x6'));var util=require(_0xc008('0x7'));var path=require(_0xc008('0x8'));var sox=require(_0xc008('0x9'));var csv=require(_0xc008('0xa'));var ejs=require(_0xc008('0xb'));var fs=require('fs');var fs_extra=require(_0xc008('0xc'));var _=require(_0xc008('0xd'));var squel=require('squel');var crypto=require(_0xc008('0xe'));var jsforce=require('jsforce');var deskjs=require(_0xc008('0xf'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xc008('0x10'));var Redis=require(_0xc008('0x11'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xc008('0x12'));var logger=require(_0xc008('0x13'))('api');var utils=require(_0xc008('0x14'));var config=require(_0xc008('0x15'));var licenseUtil=require(_0xc008('0x16'));var db=require(_0xc008('0x17'))['db'];function respondWithStatusCode(_0x9ffa93,_0x1819c6){_0x1819c6=_0x1819c6||0xcc;return function(_0x69726e){if(_0x69726e){return _0x9ffa93['sendStatus'](_0x1819c6);}return _0x9ffa93['status'](_0x1819c6)[_0xc008('0x18')]();};}function respondWithResult(_0x50c1ab,_0x25e13f){_0x25e13f=_0x25e13f||0xc8;return function(_0x4584e1){if(_0x4584e1){return _0x50c1ab[_0xc008('0x19')](_0x25e13f)[_0xc008('0x1a')](_0x4584e1);}};}function respondWithFilteredResult(_0x3f0ecf,_0x5ee00b){return function(_0x5e894e){if(_0x5e894e){var _0x4bd0f4=typeof _0x5ee00b[_0xc008('0x1b')]===_0xc008('0x1c')&&typeof _0x5ee00b[_0xc008('0x1d')]===_0xc008('0x1c');var _0x4fe771=_0x5e894e['count'];var _0x540e45=_0x4bd0f4?0x0:_0x5ee00b['offset'];var _0x46042b=_0x4bd0f4?_0x5e894e[_0xc008('0x1e')]:_0x5ee00b['offset']+_0x5ee00b[_0xc008('0x1d')];var _0x5906e6;if(_0x46042b>=_0x4fe771){_0x46042b=_0x4fe771;_0x5906e6=0xc8;}else{_0x5906e6=0xce;}_0x3f0ecf['status'](_0x5906e6);return _0x3f0ecf['set']('Content-Range',_0x540e45+'-'+_0x46042b+'/'+_0x4fe771)[_0xc008('0x1a')](_0x5e894e);}return null;};}function patchUpdates(_0x4b9726){return function(_0x5560b1){try{jsonpatch['apply'](_0x5560b1,_0x4b9726,!![]);}catch(_0x4a582d){return BPromise['reject'](_0x4a582d);}return _0x5560b1[_0xc008('0x1f')]();};}function saveUpdates(_0x4777a6,_0x251db2){return function(_0x415af3){if(_0x415af3){return _0x415af3[_0xc008('0x20')](_0x4777a6)[_0xc008('0x21')](function(_0x4f43e2){return _0x4f43e2;});}return null;};}function removeEntity(_0x459fd9,_0x5c85f2){return function(_0x58a6ea){if(_0x58a6ea){return _0x58a6ea[_0xc008('0x22')]()[_0xc008('0x21')](function(){_0x459fd9[_0xc008('0x19')](0xcc)[_0xc008('0x18')]();});}};}function handleEntityNotFound(_0x5410f5,_0x48582b){return function(_0x5de1e9){if(!_0x5de1e9){_0x5410f5[_0xc008('0x23')](0x194);}return _0x5de1e9;};}function handleError(_0x15dade,_0x92c582){_0x92c582=_0x92c582||0x1f4;return function(_0x2e31c2){logger['error'](_0x2e31c2['stack']);if(_0x2e31c2['name']){delete _0x2e31c2['name'];}_0x15dade['status'](_0x92c582)[_0xc008('0x24')](_0x2e31c2);};}exports[_0xc008('0x25')]=function(_0x25eae4,_0x529961){var _0x24c14c={},_0x32390d={},_0x209591={'count':0x0,'rows':[]};var _0x2a7d4f=_['map'](db[_0xc008('0x26')][_0xc008('0x27')],function(_0x53ed35){return{'name':_0x53ed35['fieldName'],'type':_0x53ed35['type'][_0xc008('0x28')]};});_0x32390d[_0xc008('0x29')]=_[_0xc008('0x2a')](_0x2a7d4f,_0xc008('0x2b'));_0x32390d[_0xc008('0x2c')]=_[_0xc008('0x2d')](_0x25eae4[_0xc008('0x2c')]);_0x32390d[_0xc008('0x2e')]=_[_0xc008('0x2f')](_0x32390d[_0xc008('0x29')],_0x32390d[_0xc008('0x2c')]);_0x24c14c[_0xc008('0x30')]=_['intersection'](_0x32390d[_0xc008('0x29')],qs[_0xc008('0x31')](_0x25eae4['query'][_0xc008('0x31')]));_0x24c14c[_0xc008('0x30')]=_0x24c14c[_0xc008('0x30')][_0xc008('0x32')]?_0x24c14c[_0xc008('0x30')]:_0x32390d[_0xc008('0x29')];if(!_0x25eae4[_0xc008('0x2c')][_0xc008('0x33')](_0xc008('0x34'))){_0x24c14c['limit']=qs[_0xc008('0x1d')](_0x25eae4[_0xc008('0x2c')][_0xc008('0x1d')]);_0x24c14c[_0xc008('0x1b')]=qs[_0xc008('0x1b')](_0x25eae4[_0xc008('0x2c')][_0xc008('0x1b')]);}_0x24c14c['order']=qs[_0xc008('0x35')](_0x25eae4[_0xc008('0x2c')]['sort']);_0x24c14c[_0xc008('0x36')]=qs[_0xc008('0x2e')](_['pick'](_0x25eae4[_0xc008('0x2c')],_0x32390d[_0xc008('0x2e')]),_0x2a7d4f);if(_0x25eae4[_0xc008('0x2c')]['filter']){_0x24c14c['where']=_['merge'](_0x24c14c[_0xc008('0x36')],{'$or':_['map'](_0x2a7d4f,function(_0x3dd0ac){if(_0x3dd0ac[_0xc008('0x37')]!==_0xc008('0x38')){var _0x440459={};_0x440459[_0x3dd0ac[_0xc008('0x2b')]]={'$like':'%'+_0x25eae4[_0xc008('0x2c')][_0xc008('0x39')]+'%'};return _0x440459;}})});}_0x24c14c=_[_0xc008('0x3a')]({},_0x24c14c,_0x25eae4[_0xc008('0x3b')]);var _0x387dfd={'where':_0x24c14c[_0xc008('0x36')]};return db[_0xc008('0x26')][_0xc008('0x1e')](_0x387dfd)[_0xc008('0x21')](function(_0x4cace5){_0x209591[_0xc008('0x1e')]=_0x4cace5;if(_0x25eae4[_0xc008('0x2c')][_0xc008('0x3c')]){_0x24c14c[_0xc008('0x3d')]=[{'all':!![]}];}return db['MemberReport'][_0xc008('0x3e')](_0x24c14c);})[_0xc008('0x21')](function(_0xc8cb91){_0x209591[_0xc008('0x3f')]=_0xc8cb91;return _0x209591;})[_0xc008('0x21')](respondWithFilteredResult(_0x529961,_0x24c14c))['catch'](handleError(_0x529961,null));};exports[_0xc008('0x40')]=function(_0x3323f4,_0x3794b0){var _0x3e9a99={'raw':!![],'where':{'id':_0x3323f4['params']['id']}},_0x7279e8={};_0x7279e8[_0xc008('0x29')]=_[_0xc008('0x2d')](db[_0xc008('0x26')][_0xc008('0x27')]);_0x7279e8['query']=_[_0xc008('0x2d')](_0x3323f4[_0xc008('0x2c')]);_0x7279e8[_0xc008('0x2e')]=_['intersection'](_0x7279e8[_0xc008('0x29')],_0x7279e8['query']);_0x3e9a99[_0xc008('0x30')]=_['intersection'](_0x7279e8[_0xc008('0x29')],qs[_0xc008('0x31')](_0x3323f4['query'][_0xc008('0x31')]));_0x3e9a99[_0xc008('0x30')]=_0x3e9a99[_0xc008('0x30')]['length']?_0x3e9a99[_0xc008('0x30')]:_0x7279e8[_0xc008('0x29')];if(_0x3323f4[_0xc008('0x2c')][_0xc008('0x3c')]){_0x3e9a99[_0xc008('0x3d')]=[{'all':!![]}];}_0x3e9a99=_[_0xc008('0x3a')]({},_0x3e9a99,_0x3323f4['options']);return db['MemberReport']['find'](_0x3e9a99)[_0xc008('0x21')](handleEntityNotFound(_0x3794b0,null))[_0xc008('0x21')](respondWithResult(_0x3794b0,null))[_0xc008('0x41')](handleError(_0x3794b0,null));};exports[_0xc008('0x42')]=function(_0x25289f,_0x24f6a4){return db[_0xc008('0x26')][_0xc008('0x42')](_0x25289f['body'],{})['then'](respondWithResult(_0x24f6a4,0xc9))['catch'](handleError(_0x24f6a4,null));};exports[_0xc008('0x20')]=function(_0x2651cf,_0x158eae){if(_0x2651cf['body']['id']){delete _0x2651cf[_0xc008('0x43')]['id'];}return db[_0xc008('0x26')][_0xc008('0x44')]({'where':{'id':_0x2651cf[_0xc008('0x45')]['id']}})[_0xc008('0x21')](handleEntityNotFound(_0x158eae,null))[_0xc008('0x21')](saveUpdates(_0x2651cf[_0xc008('0x43')],null))[_0xc008('0x21')](respondWithResult(_0x158eae,null))[_0xc008('0x41')](handleError(_0x158eae,null));};exports[_0xc008('0x22')]=function(_0x52c444,_0x4c63d4){return db[_0xc008('0x26')]['find']({'where':{'id':_0x52c444[_0xc008('0x45')]['id']}})[_0xc008('0x21')](handleEntityNotFound(_0x4c63d4,null))[_0xc008('0x21')](removeEntity(_0x4c63d4,null))['catch'](handleError(_0x4c63d4,null));};exports[_0xc008('0x46')]=function(_0x32b435,_0xee64){return db[_0xc008('0x26')][_0xc008('0x46')]()['then'](respondWithResult(_0xee64,null))[_0xc008('0x41')](handleError(_0xee64,null));}; \ No newline at end of file diff --git a/server/api/memberReport/memberReport.model.js b/server/api/memberReport/memberReport.model.js index 2a35146..33f4e4c 100644 --- a/server/api/memberReport/memberReport.model.js +++ b/server/api/memberReport/memberReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa527=['membername','interface','util','../../config/logger','bluebird','request-promise','path','rimraf','define','MemberReport','report_member','membername_interface'];(function(_0xaedc8f,_0x2487db){var _0x2e1d6f=function(_0x2e3b2a){while(--_0x2e3b2a){_0xaedc8f['push'](_0xaedc8f['shift']());}};_0x2e1d6f(++_0x2487db);}(_0xa527,0x182));var _0x7a52=function(_0x1df68b,_0x5aa0a7){_0x1df68b=_0x1df68b-0x0;var _0xa0c9d0=_0xa527[_0x1df68b];return _0xa0c9d0;};'use strict';var _=require('lodash');var util=require(_0x7a52('0x0'));var logger=require(_0x7a52('0x1'))('api');var moment=require('moment');var BPromise=require(_0x7a52('0x2'));var rp=require(_0x7a52('0x3'));var fs=require('fs');var path=require(_0x7a52('0x4'));var rimraf=require(_0x7a52('0x5'));var config=require('../../config/environment');var attributes=require('./memberReport.attributes');module['exports']=function(_0x505661,_0x3db141){return _0x505661[_0x7a52('0x6')](_0x7a52('0x7'),attributes,{'tableName':_0x7a52('0x8'),'paranoid':![],'indexes':[{'name':_0x7a52('0x9'),'fields':[_0x7a52('0xa'),_0x7a52('0xb')]}],'timestamps':!![]});}; \ No newline at end of file +var _0x077e=['path','../../config/environment','./memberReport.attributes','exports','define','MemberReport','report_member','membername_interface','membername','interface','lodash','util','../../config/logger','api','bluebird','request-promise'];(function(_0x1676eb,_0x1a37c4){var _0x5ba4d5=function(_0x21676e){while(--_0x21676e){_0x1676eb['push'](_0x1676eb['shift']());}};_0x5ba4d5(++_0x1a37c4);}(_0x077e,0x14a));var _0xe077=function(_0x4dd06d,_0x343ed0){_0x4dd06d=_0x4dd06d-0x0;var _0x147cb4=_0x077e[_0x4dd06d];return _0x147cb4;};'use strict';var _=require(_0xe077('0x0'));var util=require(_0xe077('0x1'));var logger=require(_0xe077('0x2'))(_0xe077('0x3'));var moment=require('moment');var BPromise=require(_0xe077('0x4'));var rp=require(_0xe077('0x5'));var fs=require('fs');var path=require(_0xe077('0x6'));var rimraf=require('rimraf');var config=require(_0xe077('0x7'));var attributes=require(_0xe077('0x8'));module[_0xe077('0x9')]=function(_0xe4430c,_0x3a9d18){return _0xe4430c[_0xe077('0xa')](_0xe077('0xb'),attributes,{'tableName':_0xe077('0xc'),'paranoid':![],'indexes':[{'name':_0xe077('0xd'),'fields':[_0xe077('0xe'),_0xe077('0xf')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/memberReport/memberReport.rpc.js b/server/api/memberReport/memberReport.rpc.js index f79f1d5..996e9c0 100644 --- a/server/api/memberReport/memberReport.rpc.js +++ b/server/api/memberReport/memberReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbf25=['lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','jayson/promise','client','request','then','info','MemberReport,\x20%s,\x20%s','request\x20sent','debug','MemberReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','options','raw','where','attributes','limit','include','map','model','GetMemberReport','CreateMemberReport','MemberReport','UpdateMemberReport'];(function(_0x4442c8,_0x2d95c9){var _0x553848=function(_0x30a907){while(--_0x30a907){_0x4442c8['push'](_0x4442c8['shift']());}};_0x553848(++_0x2d95c9);}(_0xbf25,0x15e));var _0x5bf2=function(_0x29d558,_0x496cb3){_0x29d558=_0x29d558-0x0;var _0x4122c5=_0xbf25[_0x29d558];return _0x4122c5;};'use strict';var _=require(_0x5bf2('0x0'));var util=require('util');var moment=require(_0x5bf2('0x1'));var BPromise=require(_0x5bf2('0x2'));var rs=require(_0x5bf2('0x3'));var fs=require('fs');var Redis=require(_0x5bf2('0x4'));var db=require(_0x5bf2('0x5'))['db'];var utils=require(_0x5bf2('0x6'));var logger=require('../../config/logger')(_0x5bf2('0x7'));var config=require('../../config/environment');var jayson=require(_0x5bf2('0x8'));var client=jayson[_0x5bf2('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x29c6c8,_0x382b52,_0x3fa095){return new BPromise(function(_0x53acc6,_0x45af34){return client[_0x5bf2('0xa')](_0x29c6c8,_0x3fa095)[_0x5bf2('0xb')](function(_0x4b8772){logger[_0x5bf2('0xc')](_0x5bf2('0xd'),_0x382b52,_0x5bf2('0xe'));logger[_0x5bf2('0xf')](_0x5bf2('0x10'),_0x382b52,_0x5bf2('0xe'),JSON[_0x5bf2('0x11')](_0x4b8772));if(_0x4b8772[_0x5bf2('0x12')]){if(_0x4b8772[_0x5bf2('0x12')][_0x5bf2('0x13')]===0x1f4){logger[_0x5bf2('0x12')](_0x5bf2('0xd'),_0x382b52,_0x4b8772[_0x5bf2('0x12')]['message']);return _0x45af34(_0x4b8772['error'][_0x5bf2('0x14')]);}logger[_0x5bf2('0x12')]('MemberReport,\x20%s,\x20%s',_0x382b52,_0x4b8772[_0x5bf2('0x12')][_0x5bf2('0x14')]);return _0x53acc6(_0x4b8772[_0x5bf2('0x12')][_0x5bf2('0x14')]);}else{logger[_0x5bf2('0xc')](_0x5bf2('0xd'),_0x382b52,_0x5bf2('0xe'));_0x53acc6(_0x4b8772[_0x5bf2('0x15')][_0x5bf2('0x14')]);}})[_0x5bf2('0x16')](function(_0x271a6d){logger[_0x5bf2('0x12')]('MemberReport,\x20%s,\x20%s',_0x382b52,_0x271a6d);_0x45af34(_0x271a6d);});});}exports['GetMemberReport']=function(_0x2f87ff){var _0x4af54a=this;return new Promise(function(_0x3df0cd,_0x300834){return db['MemberReport']['findAll']({'raw':_0x2f87ff[_0x5bf2('0x17')]?_0x2f87ff[_0x5bf2('0x17')][_0x5bf2('0x18')]===undefined?!![]:![]:!![],'where':_0x2f87ff[_0x5bf2('0x17')]?_0x2f87ff[_0x5bf2('0x17')][_0x5bf2('0x19')]||null:null,'attributes':_0x2f87ff[_0x5bf2('0x17')]?_0x2f87ff[_0x5bf2('0x17')][_0x5bf2('0x1a')]||null:null,'limit':_0x2f87ff['options']?_0x2f87ff['options'][_0x5bf2('0x1b')]||null:null,'include':_0x2f87ff[_0x5bf2('0x17')]?_0x2f87ff[_0x5bf2('0x17')][_0x5bf2('0x1c')]?_[_0x5bf2('0x1d')](_0x2f87ff[_0x5bf2('0x17')][_0x5bf2('0x1c')],function(_0x2eea63){return{'model':db[_0x2eea63[_0x5bf2('0x1e')]],'as':_0x2eea63['as'],'attributes':_0x2eea63[_0x5bf2('0x1a')],'include':_0x2eea63[_0x5bf2('0x1c')]?_[_0x5bf2('0x1d')](_0x2eea63[_0x5bf2('0x1c')],function(_0x5ae161){return{'model':db[_0x5ae161[_0x5bf2('0x1e')]],'as':_0x5ae161['as'],'attributes':_0x5ae161['attributes'],'include':_0x5ae161[_0x5bf2('0x1c')]?_[_0x5bf2('0x1d')](_0x5ae161['include'],function(_0xc028a0){return{'model':db[_0xc028a0[_0x5bf2('0x1e')]],'as':_0xc028a0['as'],'attributes':_0xc028a0['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x8c54cd){logger[_0x5bf2('0xc')](_0x5bf2('0x1f'),_0x2f87ff);logger[_0x5bf2('0xf')]('GetMemberReport',_0x2f87ff,JSON[_0x5bf2('0x11')](_0x8c54cd));_0x3df0cd(_0x8c54cd);})[_0x5bf2('0x16')](function(_0x3cb9e6){logger[_0x5bf2('0x12')](_0x5bf2('0x1f'),_0x3cb9e6[_0x5bf2('0x14')],_0x2f87ff);_0x300834(_0x4af54a['error'](0x1f4,_0x3cb9e6[_0x5bf2('0x14')]));});});};exports[_0x5bf2('0x20')]=function(_0x44a6a3){var _0x59ac8b=this;return new Promise(function(_0x7023ae,_0x432de6){return db[_0x5bf2('0x21')]['create'](_0x44a6a3['body'],{'raw':_0x44a6a3['options']?_0x44a6a3[_0x5bf2('0x17')][_0x5bf2('0x18')]===undefined?!![]:![]:!![]})[_0x5bf2('0xb')](function(_0x36e535){logger[_0x5bf2('0xc')]('CreateMemberReport',_0x44a6a3);logger['debug'](_0x5bf2('0x20'),_0x44a6a3,JSON[_0x5bf2('0x11')](_0x36e535));_0x7023ae(_0x36e535);})[_0x5bf2('0x16')](function(_0x39303a){logger[_0x5bf2('0x12')](_0x5bf2('0x20'),_0x39303a[_0x5bf2('0x14')],_0x44a6a3);_0x432de6(_0x59ac8b[_0x5bf2('0x12')](0x1f4,_0x39303a[_0x5bf2('0x14')]));});});};exports[_0x5bf2('0x22')]=function(_0x3673f3){var _0x1a22c2=this;return new Promise(function(_0x4076de,_0x4d4d33){return db[_0x5bf2('0x21')]['update'](_0x3673f3['body'],{'raw':_0x3673f3['options']?_0x3673f3['options'][_0x5bf2('0x18')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3673f3[_0x5bf2('0x17')]?_0x3673f3[_0x5bf2('0x17')][_0x5bf2('0x19')]||null:null,'attributes':_0x3673f3[_0x5bf2('0x17')]?_0x3673f3['options']['attributes']||null:null,'limit':_0x3673f3['options']?_0x3673f3[_0x5bf2('0x17')][_0x5bf2('0x1b')]||null:null})['then'](function(_0x4db032){logger['info']('UpdateMemberReport',_0x3673f3);logger[_0x5bf2('0xf')]('UpdateMemberReport',_0x3673f3,JSON[_0x5bf2('0x11')](_0x4db032));_0x4076de(_0x4db032);})[_0x5bf2('0x16')](function(_0x1e845e){logger[_0x5bf2('0x12')](_0x5bf2('0x22'),_0x1e845e['message'],_0x3673f3);_0x4d4d33(_0x1a22c2['error'](0x1f4,_0x1e845e[_0x5bf2('0x14')]));});});}; \ No newline at end of file +var _0xcd59=['error','message','result','catch','GetMemberReport','MemberReport','options','raw','attributes','limit','include','model','map','CreateMemberReport','create','body','UpdateMemberReport','update','where','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','MemberReport,\x20%s,\x20%s','request\x20sent','debug','stringify'];(function(_0x211a4,_0x3ae479){var _0xb4c6bf=function(_0x5cc6d5){while(--_0x5cc6d5){_0x211a4['push'](_0x211a4['shift']());}};_0xb4c6bf(++_0x3ae479);}(_0xcd59,0x14b));var _0x9cd5=function(_0x4f140e,_0x574bee){_0x4f140e=_0x4f140e-0x0;var _0x357343=_0xcd59[_0x4f140e];return _0x357343;};'use strict';var _=require(_0x9cd5('0x0'));var util=require(_0x9cd5('0x1'));var moment=require(_0x9cd5('0x2'));var BPromise=require(_0x9cd5('0x3'));var rs=require(_0x9cd5('0x4'));var fs=require('fs');var Redis=require(_0x9cd5('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x9cd5('0x6'));var logger=require(_0x9cd5('0x7'))(_0x9cd5('0x8'));var config=require(_0x9cd5('0x9'));var jayson=require(_0x9cd5('0xa'));var client=jayson[_0x9cd5('0xb')][_0x9cd5('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x2cd19a,_0x214256,_0x3f888f){return new BPromise(function(_0x545407,_0x10162d){return client[_0x9cd5('0xd')](_0x2cd19a,_0x3f888f)[_0x9cd5('0xe')](function(_0x23e524){logger[_0x9cd5('0xf')](_0x9cd5('0x10'),_0x214256,_0x9cd5('0x11'));logger[_0x9cd5('0x12')]('MemberReport,\x20%s,\x20%s,\x20%s',_0x214256,_0x9cd5('0x11'),JSON[_0x9cd5('0x13')](_0x23e524));if(_0x23e524[_0x9cd5('0x14')]){if(_0x23e524[_0x9cd5('0x14')]['code']===0x1f4){logger['error'](_0x9cd5('0x10'),_0x214256,_0x23e524[_0x9cd5('0x14')][_0x9cd5('0x15')]);return _0x10162d(_0x23e524[_0x9cd5('0x14')][_0x9cd5('0x15')]);}logger[_0x9cd5('0x14')]('MemberReport,\x20%s,\x20%s',_0x214256,_0x23e524[_0x9cd5('0x14')][_0x9cd5('0x15')]);return _0x545407(_0x23e524[_0x9cd5('0x14')]['message']);}else{logger['info']('MemberReport,\x20%s,\x20%s',_0x214256,_0x9cd5('0x11'));_0x545407(_0x23e524[_0x9cd5('0x16')]['message']);}})[_0x9cd5('0x17')](function(_0x11a7d2){logger[_0x9cd5('0x14')]('MemberReport,\x20%s,\x20%s',_0x214256,_0x11a7d2);_0x10162d(_0x11a7d2);});});}exports[_0x9cd5('0x18')]=function(_0x2d1863){var _0x3a364f=this;return new Promise(function(_0x3a6f01,_0x21da57){return db[_0x9cd5('0x19')]['findAll']({'raw':_0x2d1863[_0x9cd5('0x1a')]?_0x2d1863[_0x9cd5('0x1a')][_0x9cd5('0x1b')]===undefined?!![]:![]:!![],'where':_0x2d1863[_0x9cd5('0x1a')]?_0x2d1863[_0x9cd5('0x1a')]['where']||null:null,'attributes':_0x2d1863[_0x9cd5('0x1a')]?_0x2d1863[_0x9cd5('0x1a')][_0x9cd5('0x1c')]||null:null,'limit':_0x2d1863[_0x9cd5('0x1a')]?_0x2d1863[_0x9cd5('0x1a')][_0x9cd5('0x1d')]||null:null,'include':_0x2d1863[_0x9cd5('0x1a')]?_0x2d1863[_0x9cd5('0x1a')][_0x9cd5('0x1e')]?_['map'](_0x2d1863[_0x9cd5('0x1a')][_0x9cd5('0x1e')],function(_0x1a88e3){return{'model':db[_0x1a88e3[_0x9cd5('0x1f')]],'as':_0x1a88e3['as'],'attributes':_0x1a88e3['attributes'],'include':_0x1a88e3[_0x9cd5('0x1e')]?_[_0x9cd5('0x20')](_0x1a88e3[_0x9cd5('0x1e')],function(_0xe36f86){return{'model':db[_0xe36f86[_0x9cd5('0x1f')]],'as':_0xe36f86['as'],'attributes':_0xe36f86[_0x9cd5('0x1c')],'include':_0xe36f86[_0x9cd5('0x1e')]?_['map'](_0xe36f86[_0x9cd5('0x1e')],function(_0x64a1c4){return{'model':db[_0x64a1c4[_0x9cd5('0x1f')]],'as':_0x64a1c4['as'],'attributes':_0x64a1c4['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x2e45a3){logger['info']('GetMemberReport',_0x2d1863);logger[_0x9cd5('0x12')](_0x9cd5('0x18'),_0x2d1863,JSON[_0x9cd5('0x13')](_0x2e45a3));_0x3a6f01(_0x2e45a3);})['catch'](function(_0x40461a){logger[_0x9cd5('0x14')](_0x9cd5('0x18'),_0x40461a[_0x9cd5('0x15')],_0x2d1863);_0x21da57(_0x3a364f[_0x9cd5('0x14')](0x1f4,_0x40461a[_0x9cd5('0x15')]));});});};exports[_0x9cd5('0x21')]=function(_0x9d054d){var _0x36b0ad=this;return new Promise(function(_0x1c81fd,_0x3dc2c0){return db[_0x9cd5('0x19')][_0x9cd5('0x22')](_0x9d054d[_0x9cd5('0x23')],{'raw':_0x9d054d['options']?_0x9d054d[_0x9cd5('0x1a')][_0x9cd5('0x1b')]===undefined?!![]:![]:!![]})['then'](function(_0x589958){logger[_0x9cd5('0xf')](_0x9cd5('0x21'),_0x9d054d);logger['debug'](_0x9cd5('0x21'),_0x9d054d,JSON['stringify'](_0x589958));_0x1c81fd(_0x589958);})['catch'](function(_0x7622d8){logger[_0x9cd5('0x14')](_0x9cd5('0x21'),_0x7622d8[_0x9cd5('0x15')],_0x9d054d);_0x3dc2c0(_0x36b0ad['error'](0x1f4,_0x7622d8[_0x9cd5('0x15')]));});});};exports[_0x9cd5('0x24')]=function(_0x403779){var _0x5362f1=this;return new Promise(function(_0x201a54,_0x1f15fa){return db[_0x9cd5('0x19')][_0x9cd5('0x25')](_0x403779[_0x9cd5('0x23')],{'raw':_0x403779[_0x9cd5('0x1a')]?_0x403779[_0x9cd5('0x1a')][_0x9cd5('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x403779[_0x9cd5('0x1a')]?_0x403779[_0x9cd5('0x1a')][_0x9cd5('0x26')]||null:null,'attributes':_0x403779['options']?_0x403779[_0x9cd5('0x1a')]['attributes']||null:null,'limit':_0x403779['options']?_0x403779[_0x9cd5('0x1a')][_0x9cd5('0x1d')]||null:null})[_0x9cd5('0xe')](function(_0x18e616){logger['info'](_0x9cd5('0x24'),_0x403779);logger[_0x9cd5('0x12')](_0x9cd5('0x24'),_0x403779,JSON[_0x9cd5('0x13')](_0x18e616));_0x201a54(_0x18e616);})['catch'](function(_0x36e22c){logger[_0x9cd5('0x14')](_0x9cd5('0x24'),_0x36e22c[_0x9cd5('0x15')],_0x403779);_0x1f15fa(_0x5362f1[_0x9cd5('0x14')](0x1f4,_0x36e22c[_0x9cd5('0x15')]));});});}; \ No newline at end of file diff --git a/server/api/migration/index.js b/server/api/migration/index.js index ae374be..dbf6e40 100644 --- a/server/api/migration/index.js +++ b/server/api/migration/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xea1c=['./migration.controller','get','index','exports','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment'];(function(_0x5eca50,_0xc1e3f8){var _0x41fb84=function(_0x4ce3f3){while(--_0x4ce3f3){_0x5eca50['push'](_0x5eca50['shift']());}};_0x41fb84(++_0xc1e3f8);}(_0xea1c,0x117));var _0xcea1=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xea1c[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0xcea1('0x0'));var timeout=require(_0xcea1('0x1'));var express=require(_0xcea1('0x2'));var router=express[_0xcea1('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0xcea1('0x4'));var interaction=require(_0xcea1('0x5'));var config=require(_0xcea1('0x6'));var controller=require(_0xcea1('0x7'));router[_0xcea1('0x8')]('/',controller[_0xcea1('0x9')]);module[_0xcea1('0xa')]=router; \ No newline at end of file +var _0x67fa=['../../components/auth/service','../../components/interaction/service','../../config/environment','./migration.controller','get','index','exports','util','path','connect-timeout','Router','fs-extra'];(function(_0x372c3c,_0x3d7da5){var _0x297a76=function(_0x5d9937){while(--_0x5d9937){_0x372c3c['push'](_0x372c3c['shift']());}};_0x297a76(++_0x3d7da5);}(_0x67fa,0xc7));var _0xa67f=function(_0x1d49c3,_0x55e9dc){_0x1d49c3=_0x1d49c3-0x0;var _0x4a2b6c=_0x67fa[_0x1d49c3];return _0x4a2b6c;};'use strict';var multer=require('multer');var util=require(_0xa67f('0x0'));var path=require(_0xa67f('0x1'));var timeout=require(_0xa67f('0x2'));var express=require('express');var router=express[_0xa67f('0x3')]();var fs_extra=require(_0xa67f('0x4'));var auth=require(_0xa67f('0x5'));var interaction=require(_0xa67f('0x6'));var config=require(_0xa67f('0x7'));var controller=require(_0xa67f('0x8'));router[_0xa67f('0x9')]('/',controller[_0xa67f('0xa')]);module[_0xa67f('0xb')]=router; \ No newline at end of file diff --git a/server/api/migration/migration.attributes.js b/server/api/migration/migration.attributes.js index 56728ab..1a3cf0d 100644 --- a/server/api/migration/migration.attributes.js +++ b/server/api/migration/migration.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb53e=['exports','STRING','sequelize'];(function(_0x4b1188,_0x41e027){var _0x395b92=function(_0x5f3fa4){while(--_0x5f3fa4){_0x4b1188['push'](_0x4b1188['shift']());}};_0x395b92(++_0x41e027);}(_0xb53e,0x14f));var _0xeb53=function(_0x313049,_0x3935fc){_0x313049=_0x313049-0x0;var _0x197ce8=_0xb53e[_0x313049];return _0x197ce8;};'use strict';var Sequelize=require(_0xeb53('0x0'));module[_0xeb53('0x1')]={'version':{'type':Sequelize[_0xeb53('0x2')],'unique':'version'}}; \ No newline at end of file +var _0xe031=['sequelize','STRING','version'];(function(_0x47e7dd,_0x51b041){var _0x38501f=function(_0x5ba66d){while(--_0x5ba66d){_0x47e7dd['push'](_0x47e7dd['shift']());}};_0x38501f(++_0x51b041);}(_0xe031,0xf0));var _0x1e03=function(_0x275694,_0xf781a9){_0x275694=_0x275694-0x0;var _0x50a311=_0xe031[_0x275694];return _0x50a311;};'use strict';var Sequelize=require(_0x1e03('0x0'));module['exports']={'version':{'type':Sequelize[_0x1e03('0x1')],'unique':_0x1e03('0x2')}}; \ No newline at end of file diff --git a/server/api/migration/migration.controller.js b/server/api/migration/migration.controller.js index 17b954d..ba8c1d1 100644 --- a/server/api/migration/migration.controller.js +++ b/server/api/migration/migration.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xdc16=['includeAll','include','findAll','rows','catch','eml-format','rimraf','zip-dir','request-promise','moment','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','api','../../config/environment','../../mysqldb','sendStatus','status','json','offset','undefined','count','limit','set','Content-Range','apply','reject','update','then','destroy','end','error','stack','name','send','index','map','Migration','rawAttributes','fieldName','type','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','pick','filter','where','VIRTUAL','options'];(function(_0x57966a,_0x477964){var _0x191765=function(_0x106a01){while(--_0x106a01){_0x57966a['push'](_0x57966a['shift']());}};_0x191765(++_0x477964);}(_0xdc16,0x1a9));var _0x6dc1=function(_0x571a17,_0x63fb3d){_0x571a17=_0x571a17-0x0;var _0x3ef337=_0xdc16[_0x571a17];return _0x3ef337;};'use strict';var emlformat=require(_0x6dc1('0x0'));var rimraf=require(_0x6dc1('0x1'));var zipdir=require(_0x6dc1('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x6dc1('0x3'));var moment=require(_0x6dc1('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x6dc1('0x5'));var util=require(_0x6dc1('0x6'));var path=require(_0x6dc1('0x7'));var sox=require(_0x6dc1('0x8'));var csv=require(_0x6dc1('0x9'));var ejs=require(_0x6dc1('0xa'));var fs=require('fs');var fs_extra=require(_0x6dc1('0xb'));var _=require(_0x6dc1('0xc'));var squel=require(_0x6dc1('0xd'));var crypto=require(_0x6dc1('0xe'));var jsforce=require(_0x6dc1('0xf'));var deskjs=require(_0x6dc1('0x10'));var toCsv=require(_0x6dc1('0x9'));var querystring=require(_0x6dc1('0x11'));var Papa=require('papaparse');var Redis=require(_0x6dc1('0x12'));var authService=require(_0x6dc1('0x13'));var qs=require(_0x6dc1('0x14'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x6dc1('0x15'));var utils=require('../../config/utils');var config=require(_0x6dc1('0x16'));var licenseUtil=require('../../config/license/util');var db=require(_0x6dc1('0x17'))['db'];function respondWithStatusCode(_0x22083d,_0x40c14c){_0x40c14c=_0x40c14c||0xcc;return function(_0x144b0a){if(_0x144b0a){return _0x22083d[_0x6dc1('0x18')](_0x40c14c);}return _0x22083d['status'](_0x40c14c)['end']();};}function respondWithResult(_0x12946e,_0xb562be){_0xb562be=_0xb562be||0xc8;return function(_0x49a5cc){if(_0x49a5cc){return _0x12946e[_0x6dc1('0x19')](_0xb562be)[_0x6dc1('0x1a')](_0x49a5cc);}};}function respondWithFilteredResult(_0x1a0840,_0x366af5){return function(_0x40073a){if(_0x40073a){var _0x3dd2b8=typeof _0x366af5[_0x6dc1('0x1b')]===_0x6dc1('0x1c')&&typeof _0x366af5['limit']==='undefined';var _0x53292c=_0x40073a[_0x6dc1('0x1d')];var _0x7e5fa6=_0x3dd2b8?0x0:_0x366af5[_0x6dc1('0x1b')];var _0x1b42f8=_0x3dd2b8?_0x40073a[_0x6dc1('0x1d')]:_0x366af5[_0x6dc1('0x1b')]+_0x366af5[_0x6dc1('0x1e')];var _0x387134;if(_0x1b42f8>=_0x53292c){_0x1b42f8=_0x53292c;_0x387134=0xc8;}else{_0x387134=0xce;}_0x1a0840[_0x6dc1('0x19')](_0x387134);return _0x1a0840[_0x6dc1('0x1f')](_0x6dc1('0x20'),_0x7e5fa6+'-'+_0x1b42f8+'/'+_0x53292c)[_0x6dc1('0x1a')](_0x40073a);}return null;};}function patchUpdates(_0xac07dc){return function(_0x24603c){try{jsonpatch[_0x6dc1('0x21')](_0x24603c,_0xac07dc,!![]);}catch(_0x496ea3){return BPromise[_0x6dc1('0x22')](_0x496ea3);}return _0x24603c['save']();};}function saveUpdates(_0x30a7ac,_0x3a445c){return function(_0x15ee24){if(_0x15ee24){return _0x15ee24[_0x6dc1('0x23')](_0x30a7ac)[_0x6dc1('0x24')](function(_0xad593b){return _0xad593b;});}return null;};}function removeEntity(_0x5b113d,_0x2d780b){return function(_0x15844f){if(_0x15844f){return _0x15844f[_0x6dc1('0x25')]()[_0x6dc1('0x24')](function(){_0x5b113d[_0x6dc1('0x19')](0xcc)[_0x6dc1('0x26')]();});}};}function handleEntityNotFound(_0x3ee12e,_0x50a81f){return function(_0x4ce2bb){if(!_0x4ce2bb){_0x3ee12e[_0x6dc1('0x18')](0x194);}return _0x4ce2bb;};}function handleError(_0x2522f0,_0xd05fde){_0xd05fde=_0xd05fde||0x1f4;return function(_0x1bb5be){logger[_0x6dc1('0x27')](_0x1bb5be[_0x6dc1('0x28')]);if(_0x1bb5be[_0x6dc1('0x29')]){delete _0x1bb5be[_0x6dc1('0x29')];}_0x2522f0[_0x6dc1('0x19')](_0xd05fde)[_0x6dc1('0x2a')](_0x1bb5be);};}exports[_0x6dc1('0x2b')]=function(_0x3c41c4,_0x3dc63c){var _0x15cdce={},_0x400faa={},_0x45a9da={'count':0x0,'rows':[]};var _0x11ef63=_[_0x6dc1('0x2c')](db[_0x6dc1('0x2d')][_0x6dc1('0x2e')],function(_0xd4df9e){return{'name':_0xd4df9e[_0x6dc1('0x2f')],'type':_0xd4df9e[_0x6dc1('0x30')]['key']};});_0x400faa[_0x6dc1('0x31')]=_['map'](_0x11ef63,_0x6dc1('0x29'));_0x400faa[_0x6dc1('0x32')]=_['keys'](_0x3c41c4[_0x6dc1('0x32')]);_0x400faa[_0x6dc1('0x33')]=_[_0x6dc1('0x34')](_0x400faa[_0x6dc1('0x31')],_0x400faa[_0x6dc1('0x32')]);_0x15cdce[_0x6dc1('0x35')]=_[_0x6dc1('0x34')](_0x400faa[_0x6dc1('0x31')],qs[_0x6dc1('0x36')](_0x3c41c4[_0x6dc1('0x32')][_0x6dc1('0x36')]));_0x15cdce[_0x6dc1('0x35')]=_0x15cdce['attributes'][_0x6dc1('0x37')]?_0x15cdce[_0x6dc1('0x35')]:_0x400faa[_0x6dc1('0x31')];if(!_0x3c41c4[_0x6dc1('0x32')][_0x6dc1('0x38')](_0x6dc1('0x39'))){_0x15cdce[_0x6dc1('0x1e')]=qs[_0x6dc1('0x1e')](_0x3c41c4[_0x6dc1('0x32')][_0x6dc1('0x1e')]);_0x15cdce[_0x6dc1('0x1b')]=qs[_0x6dc1('0x1b')](_0x3c41c4[_0x6dc1('0x32')][_0x6dc1('0x1b')]);}_0x15cdce[_0x6dc1('0x3a')]=qs[_0x6dc1('0x3b')](_0x3c41c4[_0x6dc1('0x32')][_0x6dc1('0x3b')]);_0x15cdce['where']=qs[_0x6dc1('0x33')](_[_0x6dc1('0x3c')](_0x3c41c4[_0x6dc1('0x32')],_0x400faa[_0x6dc1('0x33')]),_0x11ef63);if(_0x3c41c4['query'][_0x6dc1('0x3d')]){_0x15cdce[_0x6dc1('0x3e')]=_['merge'](_0x15cdce[_0x6dc1('0x3e')],{'$or':_[_0x6dc1('0x2c')](_0x11ef63,function(_0x20841b){if(_0x20841b[_0x6dc1('0x30')]!==_0x6dc1('0x3f')){var _0xd93543={};_0xd93543[_0x20841b[_0x6dc1('0x29')]]={'$like':'%'+_0x3c41c4['query']['filter']+'%'};return _0xd93543;}})});}_0x15cdce=_['merge']({},_0x15cdce,_0x3c41c4[_0x6dc1('0x40')]);var _0x17b8eb={'where':_0x15cdce[_0x6dc1('0x3e')]};return db[_0x6dc1('0x2d')]['count'](_0x17b8eb)['then'](function(_0x4f89a0){_0x45a9da[_0x6dc1('0x1d')]=_0x4f89a0;if(_0x3c41c4[_0x6dc1('0x32')][_0x6dc1('0x41')]){_0x15cdce[_0x6dc1('0x42')]=[{'all':!![]}];}return db[_0x6dc1('0x2d')][_0x6dc1('0x43')](_0x15cdce);})['then'](function(_0x3719c3){_0x45a9da[_0x6dc1('0x44')]=_0x3719c3;return _0x45a9da;})['then'](respondWithFilteredResult(_0x3dc63c,_0x15cdce))[_0x6dc1('0x45')](handleError(_0x3dc63c,null));}; \ No newline at end of file +var _0x53f7=['request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','papaparse','../../components/auth/service','../../config/license/hardware','../../config/logger','../../config/environment','sendStatus','status','end','json','offset','undefined','limit','set','Content-Range','apply','save','update','then','destroy','name','send','index','map','Migration','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','where','pick','filter','merge','VIRTUAL','options','count','includeAll','eml-format','rimraf','zip-dir','fast-json-patch'];(function(_0x3d7cb9,_0x461b02){var _0x9c20ec=function(_0x52d138){while(--_0x52d138){_0x3d7cb9['push'](_0x3d7cb9['shift']());}};_0x9c20ec(++_0x461b02);}(_0x53f7,0x80));var _0x753f=function(_0x2b47ad,_0x55c7cc){_0x2b47ad=_0x2b47ad-0x0;var _0x1a2426=_0x53f7[_0x2b47ad];return _0x1a2426;};'use strict';var emlformat=require(_0x753f('0x0'));var rimraf=require(_0x753f('0x1'));var zipdir=require(_0x753f('0x2'));var jsonpatch=require(_0x753f('0x3'));var rp=require(_0x753f('0x4'));var moment=require(_0x753f('0x5'));var BPromise=require(_0x753f('0x6'));var Mustache=require(_0x753f('0x7'));var util=require(_0x753f('0x8'));var path=require(_0x753f('0x9'));var sox=require(_0x753f('0xa'));var csv=require(_0x753f('0xb'));var ejs=require(_0x753f('0xc'));var fs=require('fs');var fs_extra=require(_0x753f('0xd'));var _=require(_0x753f('0xe'));var squel=require(_0x753f('0xf'));var crypto=require(_0x753f('0x10'));var jsforce=require(_0x753f('0x11'));var deskjs=require(_0x753f('0x12'));var toCsv=require(_0x753f('0xb'));var querystring=require('querystring');var Papa=require(_0x753f('0x13'));var Redis=require('ioredis');var authService=require(_0x753f('0x14'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x753f('0x15'));var logger=require(_0x753f('0x16'))('api');var utils=require('../../config/utils');var config=require(_0x753f('0x17'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0xfecd4a,_0x2ca624){_0x2ca624=_0x2ca624||0xcc;return function(_0x10b7da){if(_0x10b7da){return _0xfecd4a[_0x753f('0x18')](_0x2ca624);}return _0xfecd4a[_0x753f('0x19')](_0x2ca624)[_0x753f('0x1a')]();};}function respondWithResult(_0x55e2d4,_0x566641){_0x566641=_0x566641||0xc8;return function(_0x302a8a){if(_0x302a8a){return _0x55e2d4['status'](_0x566641)[_0x753f('0x1b')](_0x302a8a);}};}function respondWithFilteredResult(_0x588f3a,_0x206846){return function(_0x5e97a5){if(_0x5e97a5){var _0x16ac77=typeof _0x206846[_0x753f('0x1c')]===_0x753f('0x1d')&&typeof _0x206846['limit']===_0x753f('0x1d');var _0x1882ba=_0x5e97a5['count'];var _0x4a5cde=_0x16ac77?0x0:_0x206846[_0x753f('0x1c')];var _0x424ce4=_0x16ac77?_0x5e97a5['count']:_0x206846[_0x753f('0x1c')]+_0x206846[_0x753f('0x1e')];var _0x27da1c;if(_0x424ce4>=_0x1882ba){_0x424ce4=_0x1882ba;_0x27da1c=0xc8;}else{_0x27da1c=0xce;}_0x588f3a['status'](_0x27da1c);return _0x588f3a[_0x753f('0x1f')](_0x753f('0x20'),_0x4a5cde+'-'+_0x424ce4+'/'+_0x1882ba)[_0x753f('0x1b')](_0x5e97a5);}return null;};}function patchUpdates(_0x43f7da){return function(_0x3edfb9){try{jsonpatch[_0x753f('0x21')](_0x3edfb9,_0x43f7da,!![]);}catch(_0x1ff2cc){return BPromise['reject'](_0x1ff2cc);}return _0x3edfb9[_0x753f('0x22')]();};}function saveUpdates(_0x1e7b41,_0x47a9ef){return function(_0x3d4407){if(_0x3d4407){return _0x3d4407[_0x753f('0x23')](_0x1e7b41)[_0x753f('0x24')](function(_0x3a4b10){return _0x3a4b10;});}return null;};}function removeEntity(_0x1cdcc1,_0x5a97d5){return function(_0x46edf){if(_0x46edf){return _0x46edf[_0x753f('0x25')]()['then'](function(){_0x1cdcc1[_0x753f('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0x474c0c,_0x476ec7){return function(_0x4a55d7){if(!_0x4a55d7){_0x474c0c['sendStatus'](0x194);}return _0x4a55d7;};}function handleError(_0x161d25,_0x44f11b){_0x44f11b=_0x44f11b||0x1f4;return function(_0x1037a2){logger['error'](_0x1037a2['stack']);if(_0x1037a2[_0x753f('0x26')]){delete _0x1037a2['name'];}_0x161d25[_0x753f('0x19')](_0x44f11b)[_0x753f('0x27')](_0x1037a2);};}exports[_0x753f('0x28')]=function(_0x366944,_0x1ef444){var _0x58a0b2={},_0x4bf9f6={},_0x3e8fd5={'count':0x0,'rows':[]};var _0x4049eb=_[_0x753f('0x29')](db[_0x753f('0x2a')][_0x753f('0x2b')],function(_0x2c7339){return{'name':_0x2c7339[_0x753f('0x2c')],'type':_0x2c7339[_0x753f('0x2d')][_0x753f('0x2e')]};});_0x4bf9f6[_0x753f('0x2f')]=_[_0x753f('0x29')](_0x4049eb,_0x753f('0x26'));_0x4bf9f6[_0x753f('0x30')]=_[_0x753f('0x31')](_0x366944[_0x753f('0x30')]);_0x4bf9f6[_0x753f('0x32')]=_[_0x753f('0x33')](_0x4bf9f6[_0x753f('0x2f')],_0x4bf9f6[_0x753f('0x30')]);_0x58a0b2[_0x753f('0x34')]=_['intersection'](_0x4bf9f6[_0x753f('0x2f')],qs[_0x753f('0x35')](_0x366944[_0x753f('0x30')][_0x753f('0x35')]));_0x58a0b2[_0x753f('0x34')]=_0x58a0b2[_0x753f('0x34')][_0x753f('0x36')]?_0x58a0b2[_0x753f('0x34')]:_0x4bf9f6['model'];if(!_0x366944[_0x753f('0x30')][_0x753f('0x37')](_0x753f('0x38'))){_0x58a0b2[_0x753f('0x1e')]=qs[_0x753f('0x1e')](_0x366944[_0x753f('0x30')][_0x753f('0x1e')]);_0x58a0b2['offset']=qs[_0x753f('0x1c')](_0x366944[_0x753f('0x30')][_0x753f('0x1c')]);}_0x58a0b2['order']=qs[_0x753f('0x39')](_0x366944[_0x753f('0x30')][_0x753f('0x39')]);_0x58a0b2[_0x753f('0x3a')]=qs[_0x753f('0x32')](_[_0x753f('0x3b')](_0x366944[_0x753f('0x30')],_0x4bf9f6['filters']),_0x4049eb);if(_0x366944[_0x753f('0x30')][_0x753f('0x3c')]){_0x58a0b2[_0x753f('0x3a')]=_[_0x753f('0x3d')](_0x58a0b2[_0x753f('0x3a')],{'$or':_[_0x753f('0x29')](_0x4049eb,function(_0x1ae2e4){if(_0x1ae2e4[_0x753f('0x2d')]!==_0x753f('0x3e')){var _0x2b482b={};_0x2b482b[_0x1ae2e4['name']]={'$like':'%'+_0x366944['query'][_0x753f('0x3c')]+'%'};return _0x2b482b;}})});}_0x58a0b2=_[_0x753f('0x3d')]({},_0x58a0b2,_0x366944[_0x753f('0x3f')]);var _0x2e26f9={'where':_0x58a0b2[_0x753f('0x3a')]};return db['Migration'][_0x753f('0x40')](_0x2e26f9)[_0x753f('0x24')](function(_0x292668){_0x3e8fd5[_0x753f('0x40')]=_0x292668;if(_0x366944[_0x753f('0x30')][_0x753f('0x41')]){_0x58a0b2['include']=[{'all':!![]}];}return db['Migration']['findAll'](_0x58a0b2);})[_0x753f('0x24')](function(_0x3e5d7){_0x3e8fd5['rows']=_0x3e5d7;return _0x3e8fd5;})[_0x753f('0x24')](respondWithFilteredResult(_0x1ef444,_0x58a0b2))['catch'](handleError(_0x1ef444,null));}; \ No newline at end of file diff --git a/server/api/migration/migration.model.js b/server/api/migration/migration.model.js index 2d0d4b2..eaaf3ba 100644 --- a/server/api/migration/migration.model.js +++ b/server/api/migration/migration.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe2fe=['migrations','lodash','util','../../config/logger','moment','bluebird','request-promise','./migration.attributes','define','Migration'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xe2fe,0xf1));var _0xee2f=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xe2fe[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0xee2f('0x0'));var util=require(_0xee2f('0x1'));var logger=require(_0xee2f('0x2'))('api');var moment=require(_0xee2f('0x3'));var BPromise=require(_0xee2f('0x4'));var rp=require(_0xee2f('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0xee2f('0x6'));module['exports']=function(_0x1c5003,_0x52f680){return _0x1c5003[_0xee2f('0x7')](_0xee2f('0x8'),attributes,{'tableName':_0xee2f('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x6bac=['api','moment','path','rimraf','../../config/environment','./migration.attributes','exports','define','Migration','migrations','lodash','util','../../config/logger'];(function(_0x578afb,_0x5c6f0c){var _0x4965b1=function(_0x27238a){while(--_0x27238a){_0x578afb['push'](_0x578afb['shift']());}};_0x4965b1(++_0x5c6f0c);}(_0x6bac,0x19d));var _0xc6ba=function(_0x16b9cb,_0x4d8d4e){_0x16b9cb=_0x16b9cb-0x0;var _0x24a21f=_0x6bac[_0x16b9cb];return _0x24a21f;};'use strict';var _=require(_0xc6ba('0x0'));var util=require(_0xc6ba('0x1'));var logger=require(_0xc6ba('0x2'))(_0xc6ba('0x3'));var moment=require(_0xc6ba('0x4'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xc6ba('0x5'));var rimraf=require(_0xc6ba('0x6'));var config=require(_0xc6ba('0x7'));var attributes=require(_0xc6ba('0x8'));module[_0xc6ba('0x9')]=function(_0x17fe8e,_0x40403f){return _0x17fe8e[_0xc6ba('0xa')](_0xc6ba('0xb'),attributes,{'tableName':_0xc6ba('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/migration/migration.rpc.js b/server/api/migration/migration.rpc.js index 10443b2..85d36be 100644 --- a/server/api/migration/migration.rpc.js +++ b/server/api/migration/migration.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb910=['util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','Migration,\x20%s,\x20%s','debug','request\x20sent','error','code','message','result','catch','lodash'];(function(_0x10b518,_0x48181b){var _0x5cb26a=function(_0x5e8a1f){while(--_0x5e8a1f){_0x10b518['push'](_0x10b518['shift']());}};_0x5cb26a(++_0x48181b);}(_0xb910,0x12b));var _0x0b91=function(_0x21a9d9,_0x4d5ac8){_0x21a9d9=_0x21a9d9-0x0;var _0x46adce=_0xb910[_0x21a9d9];return _0x46adce;};'use strict';var _=require(_0x0b91('0x0'));var util=require(_0x0b91('0x1'));var moment=require(_0x0b91('0x2'));var BPromise=require(_0x0b91('0x3'));var rs=require(_0x0b91('0x4'));var fs=require('fs');var Redis=require(_0x0b91('0x5'));var db=require(_0x0b91('0x6'))['db'];var utils=require(_0x0b91('0x7'));var logger=require(_0x0b91('0x8'))(_0x0b91('0x9'));var config=require(_0x0b91('0xa'));var jayson=require(_0x0b91('0xb'));var client=jayson[_0x0b91('0xc')][_0x0b91('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x5a22b6,_0x156fd1,_0xc65d86){return new BPromise(function(_0x3e8800,_0x41cc32){return client[_0x0b91('0xe')](_0x5a22b6,_0xc65d86)[_0x0b91('0xf')](function(_0x4118b8){logger[_0x0b91('0x10')](_0x0b91('0x11'),_0x156fd1,'request\x20sent');logger[_0x0b91('0x12')]('Migration,\x20%s,\x20%s,\x20%s',_0x156fd1,_0x0b91('0x13'),JSON['stringify'](_0x4118b8));if(_0x4118b8['error']){if(_0x4118b8[_0x0b91('0x14')][_0x0b91('0x15')]===0x1f4){logger[_0x0b91('0x14')](_0x0b91('0x11'),_0x156fd1,_0x4118b8['error'][_0x0b91('0x16')]);return _0x41cc32(_0x4118b8[_0x0b91('0x14')][_0x0b91('0x16')]);}logger[_0x0b91('0x14')]('Migration,\x20%s,\x20%s',_0x156fd1,_0x4118b8[_0x0b91('0x14')][_0x0b91('0x16')]);return _0x3e8800(_0x4118b8[_0x0b91('0x14')][_0x0b91('0x16')]);}else{logger[_0x0b91('0x10')](_0x0b91('0x11'),_0x156fd1,'request\x20sent');_0x3e8800(_0x4118b8[_0x0b91('0x17')][_0x0b91('0x16')]);}})[_0x0b91('0x18')](function(_0x17d6fd){logger[_0x0b91('0x14')](_0x0b91('0x11'),_0x156fd1,_0x17d6fd);_0x41cc32(_0x17d6fd);});});} \ No newline at end of file +var _0xa1fd=['Migration,\x20%s,\x20%s','debug','Migration,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','code','error','message','result','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','info'];(function(_0x5cdf5d,_0x616e66){var _0x2b947a=function(_0x15243a){while(--_0x15243a){_0x5cdf5d['push'](_0x5cdf5d['shift']());}};_0x2b947a(++_0x616e66);}(_0xa1fd,0x1b9));var _0xda1f=function(_0x2ce08c,_0x58ce90){_0x2ce08c=_0x2ce08c-0x0;var _0x3db6bd=_0xa1fd[_0x2ce08c];return _0x3db6bd;};'use strict';var _=require(_0xda1f('0x0'));var util=require(_0xda1f('0x1'));var moment=require(_0xda1f('0x2'));var BPromise=require(_0xda1f('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xda1f('0x4'));var db=require(_0xda1f('0x5'))['db'];var utils=require(_0xda1f('0x6'));var logger=require(_0xda1f('0x7'))(_0xda1f('0x8'));var config=require('../../config/environment');var jayson=require(_0xda1f('0x9'));var client=jayson[_0xda1f('0xa')][_0xda1f('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x552ba4,_0x33502e,_0x46a29e){return new BPromise(function(_0x199a8d,_0x338463){return client[_0xda1f('0xc')](_0x552ba4,_0x46a29e)[_0xda1f('0xd')](function(_0x1493f8){logger[_0xda1f('0xe')](_0xda1f('0xf'),_0x33502e,'request\x20sent');logger[_0xda1f('0x10')](_0xda1f('0x11'),_0x33502e,_0xda1f('0x12'),JSON[_0xda1f('0x13')](_0x1493f8));if(_0x1493f8['error']){if(_0x1493f8['error'][_0xda1f('0x14')]===0x1f4){logger[_0xda1f('0x15')](_0xda1f('0xf'),_0x33502e,_0x1493f8[_0xda1f('0x15')][_0xda1f('0x16')]);return _0x338463(_0x1493f8['error'][_0xda1f('0x16')]);}logger[_0xda1f('0x15')](_0xda1f('0xf'),_0x33502e,_0x1493f8[_0xda1f('0x15')][_0xda1f('0x16')]);return _0x199a8d(_0x1493f8[_0xda1f('0x15')]['message']);}else{logger[_0xda1f('0xe')](_0xda1f('0xf'),_0x33502e,_0xda1f('0x12'));_0x199a8d(_0x1493f8[_0xda1f('0x17')]['message']);}})['catch'](function(_0x3020ea){logger['error'](_0xda1f('0xf'),_0x33502e,_0x3020ea);_0x338463(_0x3020ea);});});} \ No newline at end of file diff --git a/server/api/network/index.js b/server/api/network/index.js index 004f1f2..40b3f37 100644 --- a/server/api/network/index.js +++ b/server/api/network/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x984b=['post','create','put','update','delete','destroy','exports','multer','util','path','connect-timeout','Router','../../config/environment','./network.controller','isAuthenticated','get','/:id'];(function(_0x59ee6f,_0x450239){var _0x4c0979=function(_0x565e92){while(--_0x565e92){_0x59ee6f['push'](_0x59ee6f['shift']());}};_0x4c0979(++_0x450239);}(_0x984b,0x15b));var _0xb984=function(_0x3903d0,_0x7d06b1){_0x3903d0=_0x3903d0-0x0;var _0x3c9c83=_0x984b[_0x3903d0];return _0x3c9c83;};'use strict';var multer=require(_0xb984('0x0'));var util=require(_0xb984('0x1'));var path=require(_0xb984('0x2'));var timeout=require(_0xb984('0x3'));var express=require('express');var router=express[_0xb984('0x4')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0xb984('0x5'));var controller=require(_0xb984('0x6'));router['get']('/',auth[_0xb984('0x7')](),controller['index']);router[_0xb984('0x8')](_0xb984('0x9'),auth['isAuthenticated'](),controller['show']);router[_0xb984('0xa')]('/',auth[_0xb984('0x7')](),controller[_0xb984('0xb')]);router[_0xb984('0xc')](_0xb984('0x9'),auth[_0xb984('0x7')](),controller[_0xb984('0xd')]);router[_0xb984('0xe')](_0xb984('0x9'),auth[_0xb984('0x7')](),controller[_0xb984('0xf')]);module[_0xb984('0x10')]=router; \ No newline at end of file +var _0x75dd=['connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./network.controller','get','isAuthenticated','index','show','post','put','/:id','update','delete','destroy','multer','util','path'];(function(_0x56911b,_0x47935b){var _0x1a924b=function(_0x263058){while(--_0x263058){_0x56911b['push'](_0x56911b['shift']());}};_0x1a924b(++_0x47935b);}(_0x75dd,0x1c9));var _0xd75d=function(_0x1cb62a,_0x3904c0){_0x1cb62a=_0x1cb62a-0x0;var _0x10705e=_0x75dd[_0x1cb62a];return _0x10705e;};'use strict';var multer=require(_0xd75d('0x0'));var util=require(_0xd75d('0x1'));var path=require(_0xd75d('0x2'));var timeout=require(_0xd75d('0x3'));var express=require(_0xd75d('0x4'));var router=express[_0xd75d('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0xd75d('0x6'));var interaction=require(_0xd75d('0x7'));var config=require(_0xd75d('0x8'));var controller=require(_0xd75d('0x9'));router[_0xd75d('0xa')]('/',auth[_0xd75d('0xb')](),controller[_0xd75d('0xc')]);router[_0xd75d('0xa')]('/:id',auth[_0xd75d('0xb')](),controller[_0xd75d('0xd')]);router[_0xd75d('0xe')]('/',auth[_0xd75d('0xb')](),controller['create']);router[_0xd75d('0xf')](_0xd75d('0x10'),auth[_0xd75d('0xb')](),controller[_0xd75d('0x11')]);router[_0xd75d('0x12')](_0xd75d('0x10'),auth[_0xd75d('0xb')](),controller[_0xd75d('0x13')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/network/network.attributes.js b/server/api/network/network.attributes.js index d839f23..374f954 100644 --- a/server/api/network/network.attributes.js +++ b/server/api/network/network.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7796=['turn','STRING','sequelize','ENUM','externip','stun'];(function(_0x1dae9e,_0x313e0c){var _0x119dc0=function(_0x314709){while(--_0x314709){_0x1dae9e['push'](_0x1dae9e['shift']());}};_0x119dc0(++_0x313e0c);}(_0x7796,0xda));var _0x6779=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x7796[_0x3dd15e];return _0x231fd0;};'use strict';var Sequelize=require(_0x6779('0x0'));module['exports']={'type':{'type':Sequelize[_0x6779('0x1')]('localnet',_0x6779('0x2'),_0x6779('0x3'),_0x6779('0x4'))},'value':{'type':Sequelize[_0x6779('0x5')]},'username':{'type':Sequelize[_0x6779('0x5')]},'password':{'type':Sequelize['STRING']}}; \ No newline at end of file +var _0xc20a=['externip','stun','STRING','sequelize','ENUM'];(function(_0x4e90b8,_0xe091e4){var _0x17d998=function(_0x91cdf1){while(--_0x91cdf1){_0x4e90b8['push'](_0x4e90b8['shift']());}};_0x17d998(++_0xe091e4);}(_0xc20a,0x17f));var _0xac20=function(_0x1bdda0,_0x29dedf){_0x1bdda0=_0x1bdda0-0x0;var _0x269a8f=_0xc20a[_0x1bdda0];return _0x269a8f;};'use strict';var Sequelize=require(_0xac20('0x0'));module['exports']={'type':{'type':Sequelize[_0xac20('0x1')]('localnet',_0xac20('0x2'),_0xac20('0x3'),'turn')},'value':{'type':Sequelize['STRING']},'username':{'type':Sequelize[_0xac20('0x4')]},'password':{'type':Sequelize[_0xac20('0x4')]}}; \ No newline at end of file diff --git a/server/api/network/network.controller.js b/server/api/network/network.controller.js index 1ac60f3..9cc9373 100644 --- a/server/api/network/network.controller.js +++ b/server/api/network/network.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x602c=['Network,\x20%s,\x20%s','request\x20sent','error','code','message','sendStatus','status','end','offset','undefined','count','limit','set','Content-Range','apply','reject','save','update','destroy','stack','name','send','index','map','rawAttributes','fieldName','type','model','query','keys','filters','intersection','attributes','fields','order','sort','where','filter','VIRTUAL','merge','options','Network','include','findAll','rows','catch','show','params','includeAll','sequelize','transaction','create','body','toUpperCase','STUN','readFileSync','root','utf8','render','writeFileSync','Reload','res_stun_monitor.so','TURN','server/files/templates/turn_multiple.ejs','/etc/asterisk/turn_xcally.conf','join','server/files/templates/network.ejs','format','/etc/asterisk/sip_xcally_%s.conf','toLowerCase','server/files/templates/stun_multiple.ejs','/etc/asterisk/stun_xcally.conf','chan_sip.so','find','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','path','sox','to-csv','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','jayson/promise','client','http','request','then','info'];(function(_0x2148cf,_0x5b7524){var _0x2162eb=function(_0x4425c9){while(--_0x4425c9){_0x2148cf['push'](_0x2148cf['shift']());}};_0x2162eb(++_0x5b7524);}(_0x602c,0x11a));var _0xc602=function(_0x28ac06,_0x1f3433){_0x28ac06=_0x28ac06-0x0;var _0x1765de=_0x602c[_0x28ac06];return _0x1765de;};'use strict';var emlformat=require(_0xc602('0x0'));var rimraf=require(_0xc602('0x1'));var zipdir=require(_0xc602('0x2'));var jsonpatch=require(_0xc602('0x3'));var rp=require(_0xc602('0x4'));var moment=require(_0xc602('0x5'));var BPromise=require(_0xc602('0x6'));var Mustache=require('mustache');var util=require('util');var path=require(_0xc602('0x7'));var sox=require(_0xc602('0x8'));var csv=require(_0xc602('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0xc602('0xa'));var crypto=require(_0xc602('0xb'));var jsforce=require('jsforce');var deskjs=require(_0xc602('0xc'));var toCsv=require(_0xc602('0x9'));var querystring=require(_0xc602('0xd'));var Papa=require(_0xc602('0xe'));var Redis=require(_0xc602('0xf'));var authService=require(_0xc602('0x10'));var qs=require(_0xc602('0x11'));var as=require(_0xc602('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xc602('0x13'))(_0xc602('0x14'));var utils=require(_0xc602('0x15'));var config=require(_0xc602('0x16'));var licenseUtil=require('../../config/license/util');var db=require(_0xc602('0x17'))['db'];var jayson=require(_0xc602('0x18'));var client=jayson[_0xc602('0x19')][_0xc602('0x1a')]({'port':0x232a});function respondWithRpcPromise(_0x2ee64a,_0x476eb3,_0x4f1623,_0x416e3a){return new BPromise(function(_0x457ea6,_0x9c6a97){var _0x219717=_0x416e3a||client;return _0x219717[_0xc602('0x1b')](_0x2ee64a,_0x4f1623)[_0xc602('0x1c')](function(_0x29cbc2){logger[_0xc602('0x1d')](_0xc602('0x1e'),_0x476eb3,_0xc602('0x1f'));logger['debug']('Network,\x20%s,\x20%s,\x20%s',_0x476eb3,_0xc602('0x1f'),JSON['stringify'](_0x29cbc2));if(_0x29cbc2[_0xc602('0x20')]){if(_0x29cbc2[_0xc602('0x20')][_0xc602('0x21')]===0x1f4){logger[_0xc602('0x20')](_0xc602('0x1e'),_0x476eb3,_0x29cbc2[_0xc602('0x20')][_0xc602('0x22')]);return _0x9c6a97(_0x29cbc2[_0xc602('0x20')][_0xc602('0x22')]);}logger[_0xc602('0x20')](_0xc602('0x1e'),_0x476eb3,_0x29cbc2[_0xc602('0x20')][_0xc602('0x22')]);return _0x457ea6(_0x29cbc2['error']['message']);}else{logger[_0xc602('0x1d')](_0xc602('0x1e'),_0x476eb3,_0xc602('0x1f'));_0x457ea6(_0x29cbc2['result'][_0xc602('0x22')]);}})['catch'](function(_0x14208b){logger[_0xc602('0x20')]('Network,\x20%s,\x20%s',_0x476eb3,_0x14208b);_0x9c6a97(_0x14208b);});});}function respondWithStatusCode(_0x4d810b,_0x3a4005){_0x3a4005=_0x3a4005||0xcc;return function(_0x5e9e34){if(_0x5e9e34){return _0x4d810b[_0xc602('0x23')](_0x3a4005);}return _0x4d810b[_0xc602('0x24')](_0x3a4005)[_0xc602('0x25')]();};}function respondWithResult(_0x578351,_0x42d620){_0x42d620=_0x42d620||0xc8;return function(_0x18a4af){if(_0x18a4af){return _0x578351['status'](_0x42d620)['json'](_0x18a4af);}};}function respondWithFilteredResult(_0x39ff8b,_0x5bc389){return function(_0x2ad3ad){if(_0x2ad3ad){var _0x463c34=typeof _0x5bc389[_0xc602('0x26')]===_0xc602('0x27')&&typeof _0x5bc389['limit']==='undefined';var _0x3dff66=_0x2ad3ad['count'];var _0x4641a0=_0x463c34?0x0:_0x5bc389[_0xc602('0x26')];var _0x18f75a=_0x463c34?_0x2ad3ad[_0xc602('0x28')]:_0x5bc389[_0xc602('0x26')]+_0x5bc389[_0xc602('0x29')];var _0x4b5309;if(_0x18f75a>=_0x3dff66){_0x18f75a=_0x3dff66;_0x4b5309=0xc8;}else{_0x4b5309=0xce;}_0x39ff8b[_0xc602('0x24')](_0x4b5309);return _0x39ff8b[_0xc602('0x2a')](_0xc602('0x2b'),_0x4641a0+'-'+_0x18f75a+'/'+_0x3dff66)['json'](_0x2ad3ad);}return null;};}function patchUpdates(_0x5910ef){return function(_0x2f7a19){try{jsonpatch[_0xc602('0x2c')](_0x2f7a19,_0x5910ef,!![]);}catch(_0x378d34){return BPromise[_0xc602('0x2d')](_0x378d34);}return _0x2f7a19[_0xc602('0x2e')]();};}function saveUpdates(_0x533327,_0x35c865){return function(_0x4bd0a3){if(_0x4bd0a3){return _0x4bd0a3[_0xc602('0x2f')](_0x533327)[_0xc602('0x1c')](function(_0x22bedd){return _0x22bedd;});}return null;};}function removeEntity(_0x3f6875,_0x458f0d){return function(_0x80d5cc){if(_0x80d5cc){return _0x80d5cc[_0xc602('0x30')]()[_0xc602('0x1c')](function(){_0x3f6875[_0xc602('0x24')](0xcc)[_0xc602('0x25')]();});}};}function handleEntityNotFound(_0x3daa21,_0x16aacf){return function(_0x532d65){if(!_0x532d65){_0x3daa21[_0xc602('0x23')](0x194);}return _0x532d65;};}function handleError(_0xb1175e,_0x337857){_0x337857=_0x337857||0x1f4;return function(_0x4e7acf){logger['error'](_0x4e7acf[_0xc602('0x31')]);if(_0x4e7acf[_0xc602('0x32')]){delete _0x4e7acf[_0xc602('0x32')];}_0xb1175e[_0xc602('0x24')](_0x337857)[_0xc602('0x33')](_0x4e7acf);};}exports[_0xc602('0x34')]=function(_0x5a7f0d,_0x214d0e){var _0x48c458={},_0x15b1ea={},_0x41f620={'count':0x0,'rows':[]};var _0x1ffa8f=_[_0xc602('0x35')](db['Network'][_0xc602('0x36')],function(_0x516b81){return{'name':_0x516b81[_0xc602('0x37')],'type':_0x516b81[_0xc602('0x38')]['key']};});_0x15b1ea[_0xc602('0x39')]=_[_0xc602('0x35')](_0x1ffa8f,_0xc602('0x32'));_0x15b1ea[_0xc602('0x3a')]=_[_0xc602('0x3b')](_0x5a7f0d['query']);_0x15b1ea[_0xc602('0x3c')]=_[_0xc602('0x3d')](_0x15b1ea[_0xc602('0x39')],_0x15b1ea['query']);_0x48c458[_0xc602('0x3e')]=_['intersection'](_0x15b1ea[_0xc602('0x39')],qs['fields'](_0x5a7f0d['query'][_0xc602('0x3f')]));_0x48c458['attributes']=_0x48c458[_0xc602('0x3e')]['length']?_0x48c458['attributes']:_0x15b1ea[_0xc602('0x39')];if(!_0x5a7f0d[_0xc602('0x3a')]['hasOwnProperty']('nolimit')){_0x48c458[_0xc602('0x29')]=qs[_0xc602('0x29')](_0x5a7f0d[_0xc602('0x3a')][_0xc602('0x29')]);_0x48c458['offset']=qs[_0xc602('0x26')](_0x5a7f0d[_0xc602('0x3a')][_0xc602('0x26')]);}_0x48c458[_0xc602('0x40')]=qs[_0xc602('0x41')](_0x5a7f0d[_0xc602('0x3a')][_0xc602('0x41')]);_0x48c458[_0xc602('0x42')]=qs[_0xc602('0x3c')](_['pick'](_0x5a7f0d[_0xc602('0x3a')],_0x15b1ea[_0xc602('0x3c')]),_0x1ffa8f);if(_0x5a7f0d[_0xc602('0x3a')][_0xc602('0x43')]){_0x48c458[_0xc602('0x42')]=_['merge'](_0x48c458[_0xc602('0x42')],{'$or':_['map'](_0x1ffa8f,function(_0x542b6c){if(_0x542b6c[_0xc602('0x38')]!==_0xc602('0x44')){var _0x54a8ce={};_0x54a8ce[_0x542b6c[_0xc602('0x32')]]={'$like':'%'+_0x5a7f0d[_0xc602('0x3a')]['filter']+'%'};return _0x54a8ce;}})});}_0x48c458=_[_0xc602('0x45')]({},_0x48c458,_0x5a7f0d[_0xc602('0x46')]);var _0x505df3={'where':_0x48c458[_0xc602('0x42')]};return db[_0xc602('0x47')][_0xc602('0x28')](_0x505df3)[_0xc602('0x1c')](function(_0x45ad7f){_0x41f620['count']=_0x45ad7f;if(_0x5a7f0d[_0xc602('0x3a')]['includeAll']){_0x48c458[_0xc602('0x48')]=[{'all':!![]}];}return db[_0xc602('0x47')][_0xc602('0x49')](_0x48c458);})[_0xc602('0x1c')](function(_0x249ed2){_0x41f620[_0xc602('0x4a')]=_0x249ed2;return _0x41f620;})['then'](respondWithFilteredResult(_0x214d0e,_0x48c458))[_0xc602('0x4b')](handleError(_0x214d0e,null));};exports[_0xc602('0x4c')]=function(_0xed78ed,_0x68dab5){var _0x2212cc={'raw':!![],'where':{'id':_0xed78ed[_0xc602('0x4d')]['id']}},_0x442ad9={};_0x442ad9[_0xc602('0x39')]=_['keys'](db[_0xc602('0x47')][_0xc602('0x36')]);_0x442ad9['query']=_['keys'](_0xed78ed[_0xc602('0x3a')]);_0x442ad9[_0xc602('0x3c')]=_[_0xc602('0x3d')](_0x442ad9['model'],_0x442ad9[_0xc602('0x3a')]);_0x2212cc[_0xc602('0x3e')]=_['intersection'](_0x442ad9[_0xc602('0x39')],qs[_0xc602('0x3f')](_0xed78ed[_0xc602('0x3a')]['fields']));_0x2212cc[_0xc602('0x3e')]=_0x2212cc[_0xc602('0x3e')]['length']?_0x2212cc[_0xc602('0x3e')]:_0x442ad9[_0xc602('0x39')];if(_0xed78ed['query'][_0xc602('0x4e')]){_0x2212cc['include']=[{'all':!![]}];}_0x2212cc=_[_0xc602('0x45')]({},_0x2212cc,_0xed78ed[_0xc602('0x46')]);return db['Network']['find'](_0x2212cc)[_0xc602('0x1c')](handleEntityNotFound(_0x68dab5,null))[_0xc602('0x1c')](respondWithResult(_0x68dab5,null))[_0xc602('0x4b')](handleError(_0x68dab5,null));};exports['create']=function(_0x533a79,_0x6ccf5b,_0x406bad){var _0x2f0553;return db[_0xc602('0x4f')][_0xc602('0x50')](function(_0x47a92b){return db[_0xc602('0x47')][_0xc602('0x51')](_0x533a79[_0xc602('0x52')],{'raw':!![]})[_0xc602('0x1c')](function(_0x383075){_0x2f0553=_0x383075;return db[_0xc602('0x47')][_0xc602('0x49')]({'where':{'type':_0x533a79[_0xc602('0x52')][_0xc602('0x38')]},'raw':!![]});})[_0xc602('0x1c')](function(_0x2144bf){if(_0x2f0553['type'][_0xc602('0x53')]()==_0xc602('0x54')){var _0x5a5074=fs[_0xc602('0x55')](path['join'](config[_0xc602('0x56')],'server/files/templates/stun_multiple.ejs'),_0xc602('0x57'));var _0x22d038=ejs[_0xc602('0x58')](_0x5a5074,{'networks':_0x2144bf||[]});fs[_0xc602('0x59')]('/etc/asterisk/stun_xcally.conf',_0x22d038);return respondWithRpcPromise(_0xc602('0x5a'),_0xc602('0x51'),{'module':_0xc602('0x5b')});}else if(_0x2f0553[_0xc602('0x38')][_0xc602('0x53')]()==_0xc602('0x5c')){var _0x3d4b42=fs[_0xc602('0x55')](path['join'](config[_0xc602('0x56')],_0xc602('0x5d')),'utf8');var _0x274a00=ejs[_0xc602('0x58')](_0x3d4b42,{'networks':_0x2144bf||[]});fs['writeFileSync'](_0xc602('0x5e'),_0x274a00);return respondWithRpcPromise(_0xc602('0x5a'),'create',{'module':_0xc602('0x5b')});}else{var _0x441ef8=fs['readFileSync'](path[_0xc602('0x5f')](config[_0xc602('0x56')],_0xc602('0x60')),'utf8');var _0x42922d=ejs[_0xc602('0x58')](_0x441ef8,{'networks':_0x2144bf||[]});fs[_0xc602('0x59')](util[_0xc602('0x61')](_0xc602('0x62'),_0x533a79['body']['type'][_0xc602('0x63')]()),_0x42922d);return respondWithRpcPromise(_0xc602('0x5a'),_0xc602('0x51'),{'module':'chan_sip.so'});}return null;})[_0xc602('0x1c')](function(){return _0x2f0553;});})[_0xc602('0x1c')](respondWithResult(_0x6ccf5b,0xc9))['catch'](handleError(_0x6ccf5b,null));};exports[_0xc602('0x2f')]=function(_0x2ec9f5,_0x8be2e1,_0xba58a5){var _0x13ff0a;return db[_0xc602('0x4f')][_0xc602('0x50')](function(_0x50caf6){return db[_0xc602('0x47')]['find']({'where':{'id':_0x2ec9f5[_0xc602('0x4d')]['id']}})[_0xc602('0x1c')](handleEntityNotFound(_0x8be2e1,null))[_0xc602('0x1c')](saveUpdates(_0x2ec9f5[_0xc602('0x52')],null))['then'](function(_0x5667b2){if(_0x5667b2){_0x13ff0a=_0x5667b2;return db[_0xc602('0x47')][_0xc602('0x49')]({'where':{'type':_0x13ff0a[_0xc602('0x38')]},'raw':!![]});}return null;})['then'](function(_0x52851d){if(_0x13ff0a[_0xc602('0x38')][_0xc602('0x53')]()==_0xc602('0x54')){var _0x525983=fs[_0xc602('0x55')](path[_0xc602('0x5f')](config['root'],_0xc602('0x64')),_0xc602('0x57'));var _0x31983f=ejs[_0xc602('0x58')](_0x525983,{'networks':_0x52851d||[]});fs[_0xc602('0x59')](_0xc602('0x65'),_0x31983f);return respondWithRpcPromise('Reload',_0xc602('0x2f'),{'module':'res_stun_monitor.so'});}else if(_0x13ff0a['type'][_0xc602('0x53')]()=='TURN'){var _0x571191=fs[_0xc602('0x55')](path[_0xc602('0x5f')](config[_0xc602('0x56')],_0xc602('0x5d')),_0xc602('0x57'));var _0x4fe035=ejs['render'](_0x571191,{'networks':_0x52851d||[]});fs[_0xc602('0x59')](_0xc602('0x5e'),_0x4fe035);return respondWithRpcPromise(_0xc602('0x5a'),_0xc602('0x2f'),{'module':_0xc602('0x5b')});}else{var _0x5db893=fs[_0xc602('0x55')](path[_0xc602('0x5f')](config[_0xc602('0x56')],_0xc602('0x60')),_0xc602('0x57'));var _0xb36c76=ejs[_0xc602('0x58')](_0x5db893,{'networks':_0x52851d||[]});fs[_0xc602('0x59')](util[_0xc602('0x61')](_0xc602('0x62'),_0x2ec9f5['body'][_0xc602('0x38')][_0xc602('0x63')]()),_0xb36c76);return respondWithRpcPromise(_0xc602('0x5a'),_0xc602('0x2f'),{'module':_0xc602('0x66')});}return null;})['then'](function(_0x578602){if(_0x578602){return _0x13ff0a;}return null;});})[_0xc602('0x1c')](respondWithResult(_0x8be2e1,null))[_0xc602('0x4b')](handleError(_0x8be2e1,null));};exports['destroy']=function(_0x2728a7,_0x561aff,_0x5d4abf){var _0x14e6ba;return db[_0xc602('0x47')][_0xc602('0x67')]({'where':{'id':_0x2728a7[_0xc602('0x4d')]['id']}})[_0xc602('0x1c')](function(_0x5282fa){_0x14e6ba=_0x5282fa;return _0x5282fa;})[_0xc602('0x1c')](handleEntityNotFound(_0x561aff,null))[_0xc602('0x1c')](removeEntity(_0x561aff,null))['then'](function(){if(_0x14e6ba){return db[_0xc602('0x47')][_0xc602('0x49')]({'where':{'type':_0x14e6ba[_0xc602('0x38')]},'raw':!![]});}})['then'](function(_0x54b515){if(_0x14e6ba[_0xc602('0x38')][_0xc602('0x53')]()==_0xc602('0x54')){var _0x5edf67=fs[_0xc602('0x55')](path[_0xc602('0x5f')](config['root'],_0xc602('0x64')),_0xc602('0x57'));var _0x2d8d77=ejs[_0xc602('0x58')](_0x5edf67,{'networks':_0x54b515||[]});fs[_0xc602('0x59')](_0xc602('0x65'),_0x2d8d77);return respondWithRpcPromise(_0xc602('0x5a'),_0xc602('0x30'),{'module':'res_stun_monitor.so'});}else if(_0x14e6ba['type'][_0xc602('0x53')]()==_0xc602('0x5c')){var _0x58ac01=fs['readFileSync'](path[_0xc602('0x5f')](config[_0xc602('0x56')],_0xc602('0x5d')),_0xc602('0x57'));var _0x31fceb=ejs[_0xc602('0x58')](_0x58ac01,{'networks':_0x54b515||[]});fs[_0xc602('0x59')]('/etc/asterisk/turn_xcally.conf',_0x31fceb);return respondWithRpcPromise(_0xc602('0x5a'),'destroy',{'module':_0xc602('0x5b')});}else{var _0x52f8c3=fs['readFileSync'](path['join'](config[_0xc602('0x56')],_0xc602('0x60')),_0xc602('0x57'));var _0x16b479=ejs['render'](_0x52f8c3,{'networks':_0x54b515||[]});fs['writeFileSync'](util[_0xc602('0x61')]('/etc/asterisk/sip_xcally_%s.conf',_0x2728a7['body']['type'][_0xc602('0x63')]()),_0x16b479);return respondWithRpcPromise(_0xc602('0x5a'),_0xc602('0x30'),{'module':_0xc602('0x66')});}return null;})['catch'](handleError(_0x561aff,null));}; \ No newline at end of file +var _0xef89=['filter','merge','VIRTUAL','options','includeAll','include','show','params','find','sequelize','create','body','findAll','STUN','readFileSync','join','root','server/files/templates/stun_multiple.ejs','utf8','render','/etc/asterisk/stun_xcally.conf','Reload','res_stun_monitor.so','toUpperCase','TURN','writeFileSync','/etc/asterisk/turn_xcally.conf','server/files/templates/network.ejs','format','/etc/asterisk/sip_xcally_%s.conf','toLowerCase','transaction','server/files/templates/turn_multiple.ejs','chan_sip.so','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','ejs','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','jayson/promise','client','http','request','then','request\x20sent','debug','Network,\x20%s,\x20%s,\x20%s','stringify','error','Network,\x20%s,\x20%s','message','info','result','catch','sendStatus','status','end','json','offset','undefined','limit','count','set','apply','update','destroy','stack','name','send','index','Network','rawAttributes','fieldName','type','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','pick'];(function(_0x2641f9,_0x26715f){var _0x585741=function(_0x2d1462){while(--_0x2d1462){_0x2641f9['push'](_0x2641f9['shift']());}};_0x585741(++_0x26715f);}(_0xef89,0xf6));var _0x9ef8=function(_0x1a09d2,_0x4db49c){_0x1a09d2=_0x1a09d2-0x0;var _0x4c5433=_0xef89[_0x1a09d2];return _0x4c5433;};'use strict';var emlformat=require(_0x9ef8('0x0'));var rimraf=require(_0x9ef8('0x1'));var zipdir=require(_0x9ef8('0x2'));var jsonpatch=require(_0x9ef8('0x3'));var rp=require(_0x9ef8('0x4'));var moment=require('moment');var BPromise=require(_0x9ef8('0x5'));var Mustache=require(_0x9ef8('0x6'));var util=require(_0x9ef8('0x7'));var path=require(_0x9ef8('0x8'));var sox=require(_0x9ef8('0x9'));var csv=require('to-csv');var ejs=require(_0x9ef8('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require('squel');var crypto=require(_0x9ef8('0xb'));var jsforce=require(_0x9ef8('0xc'));var deskjs=require(_0x9ef8('0xd'));var toCsv=require(_0x9ef8('0xe'));var querystring=require(_0x9ef8('0xf'));var Papa=require(_0x9ef8('0x10'));var Redis=require(_0x9ef8('0x11'));var authService=require('../../components/auth/service');var qs=require(_0x9ef8('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x9ef8('0x13'))(_0x9ef8('0x14'));var utils=require('../../config/utils');var config=require(_0x9ef8('0x15'));var licenseUtil=require(_0x9ef8('0x16'));var db=require(_0x9ef8('0x17'))['db'];var jayson=require(_0x9ef8('0x18'));var client=jayson[_0x9ef8('0x19')][_0x9ef8('0x1a')]({'port':0x232a});function respondWithRpcPromise(_0x4c13fb,_0x5b4ff7,_0x1fa362,_0x1fe8c9){return new BPromise(function(_0x14611d,_0x3a0c2b){var _0x462444=_0x1fe8c9||client;return _0x462444[_0x9ef8('0x1b')](_0x4c13fb,_0x1fa362)[_0x9ef8('0x1c')](function(_0x146075){logger['info']('Network,\x20%s,\x20%s',_0x5b4ff7,_0x9ef8('0x1d'));logger[_0x9ef8('0x1e')](_0x9ef8('0x1f'),_0x5b4ff7,'request\x20sent',JSON[_0x9ef8('0x20')](_0x146075));if(_0x146075[_0x9ef8('0x21')]){if(_0x146075[_0x9ef8('0x21')]['code']===0x1f4){logger['error'](_0x9ef8('0x22'),_0x5b4ff7,_0x146075[_0x9ef8('0x21')][_0x9ef8('0x23')]);return _0x3a0c2b(_0x146075[_0x9ef8('0x21')]['message']);}logger['error'](_0x9ef8('0x22'),_0x5b4ff7,_0x146075[_0x9ef8('0x21')][_0x9ef8('0x23')]);return _0x14611d(_0x146075[_0x9ef8('0x21')]['message']);}else{logger[_0x9ef8('0x24')](_0x9ef8('0x22'),_0x5b4ff7,_0x9ef8('0x1d'));_0x14611d(_0x146075[_0x9ef8('0x25')]['message']);}})[_0x9ef8('0x26')](function(_0x83d172){logger[_0x9ef8('0x21')](_0x9ef8('0x22'),_0x5b4ff7,_0x83d172);_0x3a0c2b(_0x83d172);});});}function respondWithStatusCode(_0x420058,_0x19ce3a){_0x19ce3a=_0x19ce3a||0xcc;return function(_0x160ae7){if(_0x160ae7){return _0x420058[_0x9ef8('0x27')](_0x19ce3a);}return _0x420058[_0x9ef8('0x28')](_0x19ce3a)[_0x9ef8('0x29')]();};}function respondWithResult(_0x51dc27,_0x4afe14){_0x4afe14=_0x4afe14||0xc8;return function(_0x5cb6f0){if(_0x5cb6f0){return _0x51dc27[_0x9ef8('0x28')](_0x4afe14)[_0x9ef8('0x2a')](_0x5cb6f0);}};}function respondWithFilteredResult(_0x56edab,_0x29bd66){return function(_0x4e8142){if(_0x4e8142){var _0x2ac1ce=typeof _0x29bd66[_0x9ef8('0x2b')]===_0x9ef8('0x2c')&&typeof _0x29bd66[_0x9ef8('0x2d')]===_0x9ef8('0x2c');var _0x56e2d2=_0x4e8142['count'];var _0x4644f7=_0x2ac1ce?0x0:_0x29bd66[_0x9ef8('0x2b')];var _0x357728=_0x2ac1ce?_0x4e8142[_0x9ef8('0x2e')]:_0x29bd66[_0x9ef8('0x2b')]+_0x29bd66['limit'];var _0x434813;if(_0x357728>=_0x56e2d2){_0x357728=_0x56e2d2;_0x434813=0xc8;}else{_0x434813=0xce;}_0x56edab[_0x9ef8('0x28')](_0x434813);return _0x56edab[_0x9ef8('0x2f')]('Content-Range',_0x4644f7+'-'+_0x357728+'/'+_0x56e2d2)['json'](_0x4e8142);}return null;};}function patchUpdates(_0x3945fa){return function(_0x46e6bb){try{jsonpatch[_0x9ef8('0x30')](_0x46e6bb,_0x3945fa,!![]);}catch(_0x3c4730){return BPromise['reject'](_0x3c4730);}return _0x46e6bb['save']();};}function saveUpdates(_0x24d2f5,_0x177088){return function(_0x43d8dc){if(_0x43d8dc){return _0x43d8dc[_0x9ef8('0x31')](_0x24d2f5)[_0x9ef8('0x1c')](function(_0x45fec3){return _0x45fec3;});}return null;};}function removeEntity(_0x1fef44,_0x495110){return function(_0x3b94d9){if(_0x3b94d9){return _0x3b94d9[_0x9ef8('0x32')]()[_0x9ef8('0x1c')](function(){_0x1fef44['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x3170c2,_0x4d8fb7){return function(_0x3ab3d7){if(!_0x3ab3d7){_0x3170c2[_0x9ef8('0x27')](0x194);}return _0x3ab3d7;};}function handleError(_0x842db2,_0x27982d){_0x27982d=_0x27982d||0x1f4;return function(_0xe43696){logger[_0x9ef8('0x21')](_0xe43696[_0x9ef8('0x33')]);if(_0xe43696[_0x9ef8('0x34')]){delete _0xe43696[_0x9ef8('0x34')];}_0x842db2['status'](_0x27982d)[_0x9ef8('0x35')](_0xe43696);};}exports[_0x9ef8('0x36')]=function(_0x1bbbd3,_0x539e3f){var _0x3f322d={},_0x35addd={},_0x38d0fe={'count':0x0,'rows':[]};var _0x359d91=_['map'](db[_0x9ef8('0x37')][_0x9ef8('0x38')],function(_0x4fad31){return{'name':_0x4fad31[_0x9ef8('0x39')],'type':_0x4fad31[_0x9ef8('0x3a')]['key']};});_0x35addd[_0x9ef8('0x3b')]=_['map'](_0x359d91,_0x9ef8('0x34'));_0x35addd[_0x9ef8('0x3c')]=_[_0x9ef8('0x3d')](_0x1bbbd3[_0x9ef8('0x3c')]);_0x35addd[_0x9ef8('0x3e')]=_[_0x9ef8('0x3f')](_0x35addd[_0x9ef8('0x3b')],_0x35addd[_0x9ef8('0x3c')]);_0x3f322d[_0x9ef8('0x40')]=_[_0x9ef8('0x3f')](_0x35addd[_0x9ef8('0x3b')],qs[_0x9ef8('0x41')](_0x1bbbd3[_0x9ef8('0x3c')][_0x9ef8('0x41')]));_0x3f322d[_0x9ef8('0x40')]=_0x3f322d[_0x9ef8('0x40')][_0x9ef8('0x42')]?_0x3f322d['attributes']:_0x35addd[_0x9ef8('0x3b')];if(!_0x1bbbd3['query'][_0x9ef8('0x43')](_0x9ef8('0x44'))){_0x3f322d[_0x9ef8('0x2d')]=qs[_0x9ef8('0x2d')](_0x1bbbd3[_0x9ef8('0x3c')][_0x9ef8('0x2d')]);_0x3f322d['offset']=qs['offset'](_0x1bbbd3['query']['offset']);}_0x3f322d[_0x9ef8('0x45')]=qs[_0x9ef8('0x46')](_0x1bbbd3[_0x9ef8('0x3c')]['sort']);_0x3f322d['where']=qs[_0x9ef8('0x3e')](_[_0x9ef8('0x47')](_0x1bbbd3[_0x9ef8('0x3c')],_0x35addd[_0x9ef8('0x3e')]),_0x359d91);if(_0x1bbbd3[_0x9ef8('0x3c')][_0x9ef8('0x48')]){_0x3f322d['where']=_[_0x9ef8('0x49')](_0x3f322d['where'],{'$or':_['map'](_0x359d91,function(_0x6d0749){if(_0x6d0749['type']!==_0x9ef8('0x4a')){var _0x412dad={};_0x412dad[_0x6d0749[_0x9ef8('0x34')]]={'$like':'%'+_0x1bbbd3['query'][_0x9ef8('0x48')]+'%'};return _0x412dad;}})});}_0x3f322d=_[_0x9ef8('0x49')]({},_0x3f322d,_0x1bbbd3[_0x9ef8('0x4b')]);var _0x5cd71e={'where':_0x3f322d['where']};return db[_0x9ef8('0x37')][_0x9ef8('0x2e')](_0x5cd71e)[_0x9ef8('0x1c')](function(_0x5b4fb7){_0x38d0fe[_0x9ef8('0x2e')]=_0x5b4fb7;if(_0x1bbbd3[_0x9ef8('0x3c')][_0x9ef8('0x4c')]){_0x3f322d[_0x9ef8('0x4d')]=[{'all':!![]}];}return db[_0x9ef8('0x37')]['findAll'](_0x3f322d);})[_0x9ef8('0x1c')](function(_0x243476){_0x38d0fe['rows']=_0x243476;return _0x38d0fe;})[_0x9ef8('0x1c')](respondWithFilteredResult(_0x539e3f,_0x3f322d))[_0x9ef8('0x26')](handleError(_0x539e3f,null));};exports[_0x9ef8('0x4e')]=function(_0x56b603,_0x2d44ea){var _0x451e17={'raw':!![],'where':{'id':_0x56b603[_0x9ef8('0x4f')]['id']}},_0x3e203d={};_0x3e203d[_0x9ef8('0x3b')]=_['keys'](db['Network'][_0x9ef8('0x38')]);_0x3e203d[_0x9ef8('0x3c')]=_[_0x9ef8('0x3d')](_0x56b603[_0x9ef8('0x3c')]);_0x3e203d['filters']=_[_0x9ef8('0x3f')](_0x3e203d['model'],_0x3e203d[_0x9ef8('0x3c')]);_0x451e17[_0x9ef8('0x40')]=_[_0x9ef8('0x3f')](_0x3e203d[_0x9ef8('0x3b')],qs[_0x9ef8('0x41')](_0x56b603['query']['fields']));_0x451e17[_0x9ef8('0x40')]=_0x451e17[_0x9ef8('0x40')][_0x9ef8('0x42')]?_0x451e17['attributes']:_0x3e203d[_0x9ef8('0x3b')];if(_0x56b603[_0x9ef8('0x3c')][_0x9ef8('0x4c')]){_0x451e17['include']=[{'all':!![]}];}_0x451e17=_['merge']({},_0x451e17,_0x56b603[_0x9ef8('0x4b')]);return db[_0x9ef8('0x37')][_0x9ef8('0x50')](_0x451e17)[_0x9ef8('0x1c')](handleEntityNotFound(_0x2d44ea,null))[_0x9ef8('0x1c')](respondWithResult(_0x2d44ea,null))['catch'](handleError(_0x2d44ea,null));};exports['create']=function(_0x2dfcbc,_0x1af52a,_0x15289a){var _0x411274;return db[_0x9ef8('0x51')]['transaction'](function(_0x8f77a3){return db['Network'][_0x9ef8('0x52')](_0x2dfcbc[_0x9ef8('0x53')],{'raw':!![]})[_0x9ef8('0x1c')](function(_0x3ef6e6){_0x411274=_0x3ef6e6;return db[_0x9ef8('0x37')][_0x9ef8('0x54')]({'where':{'type':_0x2dfcbc[_0x9ef8('0x53')][_0x9ef8('0x3a')]},'raw':!![]});})[_0x9ef8('0x1c')](function(_0x16d269){if(_0x411274[_0x9ef8('0x3a')]['toUpperCase']()==_0x9ef8('0x55')){var _0x19b6e0=fs[_0x9ef8('0x56')](path[_0x9ef8('0x57')](config[_0x9ef8('0x58')],_0x9ef8('0x59')),_0x9ef8('0x5a'));var _0x53cc07=ejs[_0x9ef8('0x5b')](_0x19b6e0,{'networks':_0x16d269||[]});fs['writeFileSync'](_0x9ef8('0x5c'),_0x53cc07);return respondWithRpcPromise(_0x9ef8('0x5d'),_0x9ef8('0x52'),{'module':_0x9ef8('0x5e')});}else if(_0x411274['type'][_0x9ef8('0x5f')]()==_0x9ef8('0x60')){var _0x141dd8=fs['readFileSync'](path[_0x9ef8('0x57')](config[_0x9ef8('0x58')],'server/files/templates/turn_multiple.ejs'),_0x9ef8('0x5a'));var _0x1cd96a=ejs[_0x9ef8('0x5b')](_0x141dd8,{'networks':_0x16d269||[]});fs[_0x9ef8('0x61')](_0x9ef8('0x62'),_0x1cd96a);return respondWithRpcPromise(_0x9ef8('0x5d'),_0x9ef8('0x52'),{'module':_0x9ef8('0x5e')});}else{var _0x54e52c=fs['readFileSync'](path[_0x9ef8('0x57')](config[_0x9ef8('0x58')],_0x9ef8('0x63')),_0x9ef8('0x5a'));var _0x9057ae=ejs[_0x9ef8('0x5b')](_0x54e52c,{'networks':_0x16d269||[]});fs[_0x9ef8('0x61')](util[_0x9ef8('0x64')](_0x9ef8('0x65'),_0x2dfcbc[_0x9ef8('0x53')][_0x9ef8('0x3a')][_0x9ef8('0x66')]()),_0x9057ae);return respondWithRpcPromise(_0x9ef8('0x5d'),_0x9ef8('0x52'),{'module':'chan_sip.so'});}return null;})['then'](function(){return _0x411274;});})[_0x9ef8('0x1c')](respondWithResult(_0x1af52a,0xc9))[_0x9ef8('0x26')](handleError(_0x1af52a,null));};exports[_0x9ef8('0x31')]=function(_0x145207,_0x2e9db2,_0x1831c7){var _0x1bd284;return db[_0x9ef8('0x51')][_0x9ef8('0x67')](function(_0x2cc0fd){return db[_0x9ef8('0x37')]['find']({'where':{'id':_0x145207[_0x9ef8('0x4f')]['id']}})['then'](handleEntityNotFound(_0x2e9db2,null))[_0x9ef8('0x1c')](saveUpdates(_0x145207['body'],null))[_0x9ef8('0x1c')](function(_0x591465){if(_0x591465){_0x1bd284=_0x591465;return db[_0x9ef8('0x37')][_0x9ef8('0x54')]({'where':{'type':_0x1bd284['type']},'raw':!![]});}return null;})[_0x9ef8('0x1c')](function(_0x3cf304){if(_0x1bd284['type'][_0x9ef8('0x5f')]()==_0x9ef8('0x55')){var _0x3a3b0d=fs[_0x9ef8('0x56')](path[_0x9ef8('0x57')](config[_0x9ef8('0x58')],'server/files/templates/stun_multiple.ejs'),_0x9ef8('0x5a'));var _0x19e9e1=ejs[_0x9ef8('0x5b')](_0x3a3b0d,{'networks':_0x3cf304||[]});fs[_0x9ef8('0x61')](_0x9ef8('0x5c'),_0x19e9e1);return respondWithRpcPromise('Reload',_0x9ef8('0x31'),{'module':_0x9ef8('0x5e')});}else if(_0x1bd284[_0x9ef8('0x3a')]['toUpperCase']()==_0x9ef8('0x60')){var _0x357e27=fs[_0x9ef8('0x56')](path[_0x9ef8('0x57')](config['root'],_0x9ef8('0x68')),_0x9ef8('0x5a'));var _0x5987bb=ejs[_0x9ef8('0x5b')](_0x357e27,{'networks':_0x3cf304||[]});fs['writeFileSync'](_0x9ef8('0x62'),_0x5987bb);return respondWithRpcPromise(_0x9ef8('0x5d'),_0x9ef8('0x31'),{'module':'res_stun_monitor.so'});}else{var _0x445ce3=fs['readFileSync'](path[_0x9ef8('0x57')](config[_0x9ef8('0x58')],_0x9ef8('0x63')),'utf8');var _0x745417=ejs[_0x9ef8('0x5b')](_0x445ce3,{'networks':_0x3cf304||[]});fs[_0x9ef8('0x61')](util[_0x9ef8('0x64')](_0x9ef8('0x65'),_0x145207[_0x9ef8('0x53')][_0x9ef8('0x3a')]['toLowerCase']()),_0x745417);return respondWithRpcPromise(_0x9ef8('0x5d'),_0x9ef8('0x31'),{'module':_0x9ef8('0x69')});}return null;})[_0x9ef8('0x1c')](function(_0x5c99d8){if(_0x5c99d8){return _0x1bd284;}return null;});})['then'](respondWithResult(_0x2e9db2,null))[_0x9ef8('0x26')](handleError(_0x2e9db2,null));};exports[_0x9ef8('0x32')]=function(_0x126fa3,_0x39dbe3,_0x576eff){var _0x57a770;return db[_0x9ef8('0x37')][_0x9ef8('0x50')]({'where':{'id':_0x126fa3[_0x9ef8('0x4f')]['id']}})['then'](function(_0x289642){_0x57a770=_0x289642;return _0x289642;})[_0x9ef8('0x1c')](handleEntityNotFound(_0x39dbe3,null))[_0x9ef8('0x1c')](removeEntity(_0x39dbe3,null))[_0x9ef8('0x1c')](function(){if(_0x57a770){return db[_0x9ef8('0x37')][_0x9ef8('0x54')]({'where':{'type':_0x57a770['type']},'raw':!![]});}})[_0x9ef8('0x1c')](function(_0x59a5a2){if(_0x57a770['type'][_0x9ef8('0x5f')]()=='STUN'){var _0x5cdb6e=fs[_0x9ef8('0x56')](path[_0x9ef8('0x57')](config['root'],'server/files/templates/stun_multiple.ejs'),_0x9ef8('0x5a'));var _0x50b7be=ejs[_0x9ef8('0x5b')](_0x5cdb6e,{'networks':_0x59a5a2||[]});fs[_0x9ef8('0x61')](_0x9ef8('0x5c'),_0x50b7be);return respondWithRpcPromise(_0x9ef8('0x5d'),'destroy',{'module':_0x9ef8('0x5e')});}else if(_0x57a770[_0x9ef8('0x3a')][_0x9ef8('0x5f')]()==_0x9ef8('0x60')){var _0x23b691=fs[_0x9ef8('0x56')](path[_0x9ef8('0x57')](config['root'],_0x9ef8('0x68')),_0x9ef8('0x5a'));var _0x231df3=ejs[_0x9ef8('0x5b')](_0x23b691,{'networks':_0x59a5a2||[]});fs[_0x9ef8('0x61')](_0x9ef8('0x62'),_0x231df3);return respondWithRpcPromise('Reload',_0x9ef8('0x32'),{'module':'res_stun_monitor.so'});}else{var _0x2d8f86=fs[_0x9ef8('0x56')](path[_0x9ef8('0x57')](config[_0x9ef8('0x58')],'server/files/templates/network.ejs'),_0x9ef8('0x5a'));var _0x33fba0=ejs[_0x9ef8('0x5b')](_0x2d8f86,{'networks':_0x59a5a2||[]});fs['writeFileSync'](util[_0x9ef8('0x64')](_0x9ef8('0x65'),_0x126fa3[_0x9ef8('0x53')]['type'][_0x9ef8('0x66')]()),_0x33fba0);return respondWithRpcPromise(_0x9ef8('0x5d'),_0x9ef8('0x32'),{'module':_0x9ef8('0x69')});}return null;})[_0x9ef8('0x26')](handleError(_0x39dbe3,null));}; \ No newline at end of file diff --git a/server/api/network/network.model.js b/server/api/network/network.model.js index 375d10e..fff2458 100644 --- a/server/api/network/network.model.js +++ b/server/api/network/network.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9099=['../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./network.attributes','exports','define','Network','lodash'];(function(_0x137b3a,_0x11a274){var _0x32f9ce=function(_0x1557d6){while(--_0x1557d6){_0x137b3a['push'](_0x137b3a['shift']());}};_0x32f9ce(++_0x11a274);}(_0x9099,0x1ac));var _0x9909=function(_0x3a0c4f,_0x5dd1a3){_0x3a0c4f=_0x3a0c4f-0x0;var _0x247049=_0x9099[_0x3a0c4f];return _0x247049;};'use strict';var _=require(_0x9909('0x0'));var util=require('util');var logger=require(_0x9909('0x1'))(_0x9909('0x2'));var moment=require(_0x9909('0x3'));var BPromise=require(_0x9909('0x4'));var rp=require(_0x9909('0x5'));var fs=require('fs');var path=require(_0x9909('0x6'));var rimraf=require(_0x9909('0x7'));var config=require(_0x9909('0x8'));var attributes=require(_0x9909('0x9'));module[_0x9909('0xa')]=function(_0x3947ed,_0x41c07e){return _0x3947ed[_0x9909('0xb')](_0x9909('0xc'),attributes,{'tableName':'network','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x91a7=['bluebird','path','./network.attributes','exports','Network','network','util','../../config/logger','api'];(function(_0x33b259,_0x2036be){var _0xf95548=function(_0x5b3424){while(--_0x5b3424){_0x33b259['push'](_0x33b259['shift']());}};_0xf95548(++_0x2036be);}(_0x91a7,0xe7));var _0x791a=function(_0x2b37bb,_0x51eb92){_0x2b37bb=_0x2b37bb-0x0;var _0x5cf003=_0x91a7[_0x2b37bb];return _0x5cf003;};'use strict';var _=require('lodash');var util=require(_0x791a('0x0'));var logger=require(_0x791a('0x1'))(_0x791a('0x2'));var moment=require('moment');var BPromise=require(_0x791a('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x791a('0x4'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x791a('0x5'));module[_0x791a('0x6')]=function(_0x49a9b7,_0x361f53){return _0x49a9b7['define'](_0x791a('0x7'),attributes,{'tableName':_0x791a('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/network/network.rpc.js b/server/api/network/network.rpc.js index 841f478..e6381ec 100644 --- a/server/api/network/network.rpc.js +++ b/server/api/network/network.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9957=['message','result','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','then','info','Network,\x20%s,\x20%s','request\x20sent','debug','Network,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0xd447a,_0x1d8ed8){var _0x53a09c=function(_0x2e053b){while(--_0x2e053b){_0xd447a['push'](_0xd447a['shift']());}};_0x53a09c(++_0x1d8ed8);}(_0x9957,0x93));var _0x7995=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x9957[_0x14add3];return _0x4a174f;};'use strict';var _=require(_0x7995('0x0'));var util=require(_0x7995('0x1'));var moment=require(_0x7995('0x2'));var BPromise=require(_0x7995('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x7995('0x4'));var db=require(_0x7995('0x5'))['db'];var utils=require(_0x7995('0x6'));var logger=require(_0x7995('0x7'))('rpc');var config=require(_0x7995('0x8'));var jayson=require(_0x7995('0x9'));var client=jayson[_0x7995('0xa')][_0x7995('0xb')]({'port':0x232a});function respondWithRpcPromise(_0xbda126,_0x326741,_0x4996ca){return new BPromise(function(_0x465276,_0x1cad37){return client['request'](_0xbda126,_0x4996ca)[_0x7995('0xc')](function(_0x3116fb){logger[_0x7995('0xd')](_0x7995('0xe'),_0x326741,_0x7995('0xf'));logger[_0x7995('0x10')](_0x7995('0x11'),_0x326741,'request\x20sent',JSON[_0x7995('0x12')](_0x3116fb));if(_0x3116fb[_0x7995('0x13')]){if(_0x3116fb['error'][_0x7995('0x14')]===0x1f4){logger[_0x7995('0x13')](_0x7995('0xe'),_0x326741,_0x3116fb[_0x7995('0x13')][_0x7995('0x15')]);return _0x1cad37(_0x3116fb[_0x7995('0x13')][_0x7995('0x15')]);}logger['error']('Network,\x20%s,\x20%s',_0x326741,_0x3116fb[_0x7995('0x13')][_0x7995('0x15')]);return _0x465276(_0x3116fb[_0x7995('0x13')][_0x7995('0x15')]);}else{logger[_0x7995('0xd')](_0x7995('0xe'),_0x326741,_0x7995('0xf'));_0x465276(_0x3116fb[_0x7995('0x16')]['message']);}})[_0x7995('0x17')](function(_0x565d97){logger[_0x7995('0x13')](_0x7995('0xe'),_0x326741,_0x565d97);_0x1cad37(_0x565d97);});});} \ No newline at end of file +var _0x7a54=['info','Network,\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(_0x2dafbe,_0x5d04de){var _0x58a45a=function(_0x50ac96){while(--_0x50ac96){_0x2dafbe['push'](_0x2dafbe['shift']());}};_0x58a45a(++_0x5d04de);}(_0x7a54,0x106));var _0x47a5=function(_0x365c93,_0x1978a4){_0x365c93=_0x365c93-0x0;var _0x36e9e2=_0x7a54[_0x365c93];return _0x36e9e2;};'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')]('Network,\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/openchannelAccount/index.js b/server/api/openchannelAccount/index.js index 64efefb..f5e6a53 100644 --- a/server/api/openchannelAccount/index.js +++ b/server/api/openchannelAccount/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4588=['removeAgents','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./openchannelAccount.controller','get','index','/describe','isAuthenticated','describe','show','/:id/dispositions','getDispositions','/:id/applications','getApplications','/:id/interactions','getInteractions','getAgents','post','create','addDisposition','/:id/canned_answers','addAnswer','/:id/notify','notify','addApplications','/:id/users','addAgents','/:id/send','send','put','/:id','update','delete','destroy','removeDispositions','removeAnswers'];(function(_0x1c4a34,_0x585268){var _0x53de0c=function(_0x1c6fbd){while(--_0x1c6fbd){_0x1c4a34['push'](_0x1c4a34['shift']());}};_0x53de0c(++_0x585268);}(_0x4588,0x10a));var _0x8458=function(_0x2b31a8,_0x28b862){_0x2b31a8=_0x2b31a8-0x0;var _0x1175a5=_0x4588[_0x2b31a8];return _0x1175a5;};'use strict';var multer=require('multer');var util=require(_0x8458('0x0'));var path=require(_0x8458('0x1'));var timeout=require(_0x8458('0x2'));var express=require(_0x8458('0x3'));var router=express[_0x8458('0x4')]();var fs_extra=require(_0x8458('0x5'));var auth=require(_0x8458('0x6'));var interaction=require(_0x8458('0x7'));var config=require(_0x8458('0x8'));var controller=require(_0x8458('0x9'));router[_0x8458('0xa')]('/',auth['isAuthenticated'](),controller[_0x8458('0xb')]);router[_0x8458('0xa')](_0x8458('0xc'),auth[_0x8458('0xd')](),controller[_0x8458('0xe')]);router[_0x8458('0xa')]('/:id',auth[_0x8458('0xd')](),controller[_0x8458('0xf')]);router['get'](_0x8458('0x10'),auth[_0x8458('0xd')](),controller[_0x8458('0x11')]);router['get']('/:id/canned_answers',auth[_0x8458('0xd')](),controller['getAnswers']);router[_0x8458('0xa')](_0x8458('0x12'),auth[_0x8458('0xd')](),controller[_0x8458('0x13')]);router[_0x8458('0xa')](_0x8458('0x14'),auth['isAuthenticated'](),controller[_0x8458('0x15')]);router[_0x8458('0xa')]('/:id/users',auth['isAuthenticated'](),controller[_0x8458('0x16')]);router[_0x8458('0x17')]('/',auth[_0x8458('0xd')](),controller[_0x8458('0x18')]);router[_0x8458('0x17')](_0x8458('0x10'),auth['isAuthenticated'](),controller[_0x8458('0x19')]);router['post'](_0x8458('0x1a'),auth[_0x8458('0xd')](),controller[_0x8458('0x1b')]);router['post'](_0x8458('0x1c'),controller[_0x8458('0x1d')]);router['post']('/:id/applications',auth[_0x8458('0xd')](),controller[_0x8458('0x1e')]);router[_0x8458('0x17')](_0x8458('0x1f'),auth['isAuthenticated'](),controller[_0x8458('0x20')]);router['post'](_0x8458('0x21'),auth[_0x8458('0xd')](),controller[_0x8458('0x22')]);router[_0x8458('0x23')](_0x8458('0x24'),auth['isAuthenticated'](),controller[_0x8458('0x25')]);router[_0x8458('0x26')](_0x8458('0x24'),auth[_0x8458('0xd')](),controller[_0x8458('0x27')]);router[_0x8458('0x26')](_0x8458('0x10'),auth[_0x8458('0xd')](),controller[_0x8458('0x28')]);router[_0x8458('0x26')]('/:id/canned_answers',auth['isAuthenticated'](),controller[_0x8458('0x29')]);router[_0x8458('0x26')](_0x8458('0x1f'),auth[_0x8458('0xd')](),controller[_0x8458('0x2a')]);module[_0x8458('0x2b')]=router; \ No newline at end of file +var _0xa51f=['util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./openchannelAccount.controller','get','isAuthenticated','index','/describe','describe','/:id','/:id/dispositions','getDispositions','getAnswers','/:id/applications','getApplications','/:id/interactions','getInteractions','post','addDisposition','/:id/canned_answers','addAnswer','/:id/notify','addApplications','/:id/users','addAgents','send','put','delete','removeDispositions','removeAgents','multer'];(function(_0x261566,_0x58b9f4){var _0xc69a09=function(_0x3e203e){while(--_0x3e203e){_0x261566['push'](_0x261566['shift']());}};_0xc69a09(++_0x58b9f4);}(_0xa51f,0x1d3));var _0xfa51=function(_0x554047,_0x46ec41){_0x554047=_0x554047-0x0;var _0x5d11e4=_0xa51f[_0x554047];return _0x5d11e4;};'use strict';var multer=require(_0xfa51('0x0'));var util=require(_0xfa51('0x1'));var path=require(_0xfa51('0x2'));var timeout=require(_0xfa51('0x3'));var express=require(_0xfa51('0x4'));var router=express['Router']();var fs_extra=require(_0xfa51('0x5'));var auth=require(_0xfa51('0x6'));var interaction=require(_0xfa51('0x7'));var config=require(_0xfa51('0x8'));var controller=require(_0xfa51('0x9'));router[_0xfa51('0xa')]('/',auth[_0xfa51('0xb')](),controller[_0xfa51('0xc')]);router['get'](_0xfa51('0xd'),auth[_0xfa51('0xb')](),controller[_0xfa51('0xe')]);router[_0xfa51('0xa')](_0xfa51('0xf'),auth[_0xfa51('0xb')](),controller['show']);router[_0xfa51('0xa')](_0xfa51('0x10'),auth[_0xfa51('0xb')](),controller[_0xfa51('0x11')]);router[_0xfa51('0xa')]('/:id/canned_answers',auth[_0xfa51('0xb')](),controller[_0xfa51('0x12')]);router[_0xfa51('0xa')](_0xfa51('0x13'),auth[_0xfa51('0xb')](),controller[_0xfa51('0x14')]);router[_0xfa51('0xa')](_0xfa51('0x15'),auth[_0xfa51('0xb')](),controller[_0xfa51('0x16')]);router[_0xfa51('0xa')]('/:id/users',auth['isAuthenticated'](),controller['getAgents']);router[_0xfa51('0x17')]('/',auth['isAuthenticated'](),controller['create']);router[_0xfa51('0x17')](_0xfa51('0x10'),auth[_0xfa51('0xb')](),controller[_0xfa51('0x18')]);router['post'](_0xfa51('0x19'),auth[_0xfa51('0xb')](),controller[_0xfa51('0x1a')]);router[_0xfa51('0x17')](_0xfa51('0x1b'),controller['notify']);router['post'](_0xfa51('0x13'),auth[_0xfa51('0xb')](),controller[_0xfa51('0x1c')]);router['post'](_0xfa51('0x1d'),auth[_0xfa51('0xb')](),controller[_0xfa51('0x1e')]);router[_0xfa51('0x17')]('/:id/send',auth[_0xfa51('0xb')](),controller[_0xfa51('0x1f')]);router[_0xfa51('0x20')](_0xfa51('0xf'),auth[_0xfa51('0xb')](),controller['update']);router['delete'](_0xfa51('0xf'),auth[_0xfa51('0xb')](),controller['destroy']);router[_0xfa51('0x21')](_0xfa51('0x10'),auth['isAuthenticated'](),controller[_0xfa51('0x22')]);router[_0xfa51('0x21')](_0xfa51('0x19'),auth[_0xfa51('0xb')](),controller['removeAnswers']);router['delete'](_0xfa51('0x1d'),auth[_0xfa51('0xb')](),controller[_0xfa51('0x23')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/openchannelAccount/openchannelAccount.attributes.js b/server/api/openchannelAccount/openchannelAccount.attributes.js index 2a51d3e..3d16764 100644 --- a/server/api/openchannelAccount/openchannelAccount.attributes.js +++ b/server/api/openchannelAccount/openchannelAccount.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xdbc1=['exports','name','STRING','generate','TEXT','Account:\x20{{account.name}}
{{#queue}}Queue:\x20{{queue.name}}
{{/queue}}From\x20:\x20{{from}}','BOOLEAN','INTEGER','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','mandatoryDispositionPauseId','mandatoryDisposition','sequelize','randomstring'];(function(_0xdc5d2c,_0x500cb4){var _0x14ed63=function(_0x388b4f){while(--_0x388b4f){_0xdc5d2c['push'](_0xdc5d2c['shift']());}};_0x14ed63(++_0x500cb4);}(_0xdbc1,0x14e));var _0x1dbc=function(_0x3a15ce,_0x5f0345){_0x3a15ce=_0x3a15ce-0x0;var _0x57cd6b=_0xdbc1[_0x3a15ce];return _0x57cd6b;};'use strict';var Sequelize=require(_0x1dbc('0x0'));var rs=require(_0x1dbc('0x1'));module[_0x1dbc('0x2')]={'name':{'type':Sequelize['STRING'],'unique':_0x1dbc('0x3'),'allowNull':![]},'description':{'type':Sequelize[_0x1dbc('0x4')]},'token':{'type':Sequelize['STRING'],'defaultValue':function(){return rs[_0x1dbc('0x5')]();}},'replyUri':{'type':Sequelize[_0x1dbc('0x4')],'validate':{'isUrl':!![]}},'key':{'type':Sequelize[_0x1dbc('0x4')],'allowNull':![]},'notificationTemplate':{'type':Sequelize[_0x1dbc('0x6')],'defaultValue':function(){return _0x1dbc('0x7');}},'notificationSound':{'type':Sequelize[_0x1dbc('0x8')],'defaultValue':!![]},'notificationShake':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0x1dbc('0x9')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'mapKey':{'type':Sequelize[_0x1dbc('0x4')]},'queueTransfer':{'type':Sequelize[_0x1dbc('0x8')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x1dbc('0x8')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x1dbc('0x9')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize['INTEGER'],'allowNull':!![],'defaultValue':null,'comment':_0x1dbc('0xa')},'mandatoryDisposition':{'type':Sequelize[_0x1dbc('0x8')],'defaultValue':![],'comment':_0x1dbc('0xb'),'set':function(_0xd22a58){if(!_0xd22a58)this['setDataValue'](_0x1dbc('0xc'),null);this['setDataValue'](_0x1dbc('0xd'),_0xd22a58);}}}; \ No newline at end of file +var _0xb418=['Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','setDataValue','mandatoryDisposition','sequelize','randomstring','STRING','generate','TEXT','BOOLEAN','INTEGER'];(function(_0x19babd,_0x1d4ef7){var _0x314eaf=function(_0x24ea35){while(--_0x24ea35){_0x19babd['push'](_0x19babd['shift']());}};_0x314eaf(++_0x1d4ef7);}(_0xb418,0x1bc));var _0x8b41=function(_0x3e5086,_0x48f4a2){_0x3e5086=_0x3e5086-0x0;var _0xfeb102=_0xb418[_0x3e5086];return _0xfeb102;};'use strict';var Sequelize=require(_0x8b41('0x0'));var rs=require(_0x8b41('0x1'));module['exports']={'name':{'type':Sequelize[_0x8b41('0x2')],'unique':'name','allowNull':![]},'description':{'type':Sequelize[_0x8b41('0x2')]},'token':{'type':Sequelize[_0x8b41('0x2')],'defaultValue':function(){return rs[_0x8b41('0x3')]();}},'replyUri':{'type':Sequelize['STRING'],'validate':{'isUrl':!![]}},'key':{'type':Sequelize['STRING'],'allowNull':![]},'notificationTemplate':{'type':Sequelize[_0x8b41('0x4')],'defaultValue':function(){return'Account:\x20{{account.name}}
{{#queue}}Queue:\x20{{queue.name}}
{{/queue}}From\x20:\x20{{from}}';}},'notificationSound':{'type':Sequelize[_0x8b41('0x5')],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x8b41('0x5')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0x8b41('0x6')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'mapKey':{'type':Sequelize[_0x8b41('0x2')]},'queueTransfer':{'type':Sequelize[_0x8b41('0x5')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x8b41('0x5')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize[_0x8b41('0x6')],'allowNull':!![],'defaultValue':null,'comment':_0x8b41('0x7')},'mandatoryDisposition':{'type':Sequelize[_0x8b41('0x5')],'defaultValue':![],'comment':_0x8b41('0x8'),'set':function(_0x10fac6){if(!_0x10fac6)this[_0x8b41('0x9')]('mandatoryDispositionPauseId',null);this[_0x8b41('0x9')](_0x8b41('0xa'),_0x10fac6);}}}; \ No newline at end of file diff --git a/server/api/openchannelAccount/openchannelAccount.controller.js b/server/api/openchannelAccount/openchannelAccount.controller.js index be0f001..008689d 100644 --- a/server/api/openchannelAccount/openchannelAccount.controller.js +++ b/server/api/openchannelAccount/openchannelAccount.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8b91=['*,*,*,*','OpenchannelMessage','UserId','User','unshift','waitForTheAssignedAgent','forcedOwnership','startRouting','Start','EventManager','sequelize','bulkCreate','findAndCountAll','getApplications','getInteractions','Contact','fullname','Tag','tag','addAgents','userOpenchannelAccount:save','removeAgents','isArray','userOpenchannelAccount:remove','emit','getAgents','out','Messages','dataValues','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','to-csv','fs-extra','squel','crypto','jsforce','desk.js','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./openchannelAccount.socket','register','jayson/promise','http','client','then','info','OpenchannelAccount,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','result','sendStatus','status','end','json','offset','undefined','limit','count','Content-Range','reject','save','update','destroy','get','OpenchannelAccounts','stack','name','send','mandatoryDispositionPause','OpenchannelAccount','rawAttributes','fieldName','type','key','model','map','query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','sort','where','filter','merge','VIRTUAL','options','include','findAll','rows','params','Pause','keys','length','includeAll','find','catch','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','describe','addDisposition','Disposition','order','pick','OpenchannelAccountId','ids','CannedAnswer','getAnswers','findOne','removeAnswers','notify','openchannel','ValidationError','no\x20available\x20attributes','difference','createdAt','updatedAt','CompanyId','ListId','isNil','from','Sequelize','from\x20is\x20mandatory','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','CmList','List','Contacts','DESC','OpenchannelApplication','Applications','account','applications','list','orderBy','priority','asc','CmContact','contact','firstName','lastName','OpenchannelInteraction','threadId','externalUrl','ContactId','messageId','interaction','created','autoclose','push','close','unmanaged'];(function(_0xf95fdc,_0x4bd00b){var _0x41b278=function(_0x4b80e7){while(--_0x4b80e7){_0xf95fdc['push'](_0xf95fdc['shift']());}};_0x41b278(++_0x4bd00b);}(_0x8b91,0xd4));var _0x18b9=function(_0x20b3ba,_0x47b3fd){_0x20b3ba=_0x20b3ba-0x0;var _0x1e786c=_0x8b91[_0x20b3ba];return _0x1e786c;};'use strict';var emlformat=require(_0x18b9('0x0'));var rimraf=require(_0x18b9('0x1'));var zipdir=require(_0x18b9('0x2'));var jsonpatch=require(_0x18b9('0x3'));var rp=require(_0x18b9('0x4'));var moment=require(_0x18b9('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x18b9('0x6'));var util=require(_0x18b9('0x7'));var path=require(_0x18b9('0x8'));var sox=require('sox');var csv=require(_0x18b9('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x18b9('0xa'));var _=require('lodash');var squel=require(_0x18b9('0xb'));var crypto=require(_0x18b9('0xc'));var jsforce=require(_0x18b9('0xd'));var deskjs=require(_0x18b9('0xe'));var toCsv=require(_0x18b9('0x9'));var querystring=require('querystring');var Papa=require(_0x18b9('0xf'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x18b9('0x10'));var as=require(_0x18b9('0x11'));var hardwareService=require(_0x18b9('0x12'));var logger=require(_0x18b9('0x13'))(_0x18b9('0x14'));var utils=require(_0x18b9('0x15'));var config=require(_0x18b9('0x16'));var licenseUtil=require(_0x18b9('0x17'));var db=require(_0x18b9('0x18'))['db'];config[_0x18b9('0x19')]=_[_0x18b9('0x1a')](config['redis'],{'host':_0x18b9('0x1b'),'port':0x18eb});var socket=require(_0x18b9('0x1c'))(new Redis(config[_0x18b9('0x19')]));require(_0x18b9('0x1d'))[_0x18b9('0x1e')](socket);var jayson=require(_0x18b9('0x1f'));var client=jayson['client'][_0x18b9('0x20')]({'port':0x232c});var client9002=jayson[_0x18b9('0x21')][_0x18b9('0x20')]({'port':0x232a});function respondWithRpcPromise(_0x431c15,_0x4811a5,_0x26c6f8,_0x2a4815){return new BPromise(function(_0x28401f,_0x204bd5){var _0x146996=_0x2a4815||client;return _0x146996['request'](_0x431c15,_0x26c6f8)[_0x18b9('0x22')](function(_0x8c578e){logger[_0x18b9('0x23')](_0x18b9('0x24'),_0x4811a5,_0x18b9('0x25'));logger[_0x18b9('0x26')]('OpenchannelAccount,\x20%s,\x20%s,\x20%s',_0x4811a5,'request\x20sent',JSON[_0x18b9('0x27')](_0x8c578e));if(_0x8c578e['error']){if(_0x8c578e['error']['code']===0x1f4){logger[_0x18b9('0x28')](_0x18b9('0x24'),_0x4811a5,_0x8c578e['error']['message']);return _0x204bd5(_0x8c578e[_0x18b9('0x28')][_0x18b9('0x29')]);}logger[_0x18b9('0x28')](_0x18b9('0x24'),_0x4811a5,_0x8c578e['error'][_0x18b9('0x29')]);return _0x28401f(_0x8c578e['error'][_0x18b9('0x29')]);}else{logger[_0x18b9('0x23')]('OpenchannelAccount,\x20%s,\x20%s',_0x4811a5,_0x18b9('0x25'));_0x28401f(_0x8c578e[_0x18b9('0x2a')][_0x18b9('0x29')]);}})['catch'](function(_0x14872b){logger['error'](_0x18b9('0x24'),_0x4811a5,_0x14872b);_0x204bd5(_0x14872b);});});}function respondWithStatusCode(_0x2af548,_0x4a70cd){_0x4a70cd=_0x4a70cd||0xcc;return function(_0x3b8e13){if(_0x3b8e13){return _0x2af548[_0x18b9('0x2b')](_0x4a70cd);}return _0x2af548[_0x18b9('0x2c')](_0x4a70cd)[_0x18b9('0x2d')]();};}function respondWithResult(_0x4a30ae,_0x4a8b0a){_0x4a8b0a=_0x4a8b0a||0xc8;return function(_0x57dc77){if(_0x57dc77){return _0x4a30ae[_0x18b9('0x2c')](_0x4a8b0a)[_0x18b9('0x2e')](_0x57dc77);}};}function respondWithFilteredResult(_0x5ccb5b,_0x1319f7){return function(_0x3a54fb){if(_0x3a54fb){var _0x427433=typeof _0x1319f7[_0x18b9('0x2f')]===_0x18b9('0x30')&&typeof _0x1319f7[_0x18b9('0x31')]===_0x18b9('0x30');var _0x4dbb80=_0x3a54fb[_0x18b9('0x32')];var _0x3e4005=_0x427433?0x0:_0x1319f7[_0x18b9('0x2f')];var _0x39d806=_0x427433?_0x3a54fb[_0x18b9('0x32')]:_0x1319f7[_0x18b9('0x2f')]+_0x1319f7[_0x18b9('0x31')];var _0x550d86;if(_0x39d806>=_0x4dbb80){_0x39d806=_0x4dbb80;_0x550d86=0xc8;}else{_0x550d86=0xce;}_0x5ccb5b[_0x18b9('0x2c')](_0x550d86);return _0x5ccb5b['set'](_0x18b9('0x33'),_0x3e4005+'-'+_0x39d806+'/'+_0x4dbb80)[_0x18b9('0x2e')](_0x3a54fb);}return null;};}function patchUpdates(_0x36bd6a){return function(_0x8a86c6){try{jsonpatch['apply'](_0x8a86c6,_0x36bd6a,!![]);}catch(_0xa9d006){return BPromise[_0x18b9('0x34')](_0xa9d006);}return _0x8a86c6[_0x18b9('0x35')]();};}function saveUpdates(_0x5c25bb,_0x557cff){return function(_0x7ca6f3){if(_0x7ca6f3){return _0x7ca6f3[_0x18b9('0x36')](_0x5c25bb)['then'](function(_0x4646fb){return _0x4646fb;});}return null;};}function removeEntity(_0x49c365,_0x150fed){return function(_0x4949b7){if(_0x4949b7){return _0x4949b7[_0x18b9('0x37')]()[_0x18b9('0x22')](function(){var _0x7b0093=_0x4949b7[_0x18b9('0x38')]({'plain':!![]});var _0x502dc7=_0x18b9('0x39');return db['UserProfileResource'][_0x18b9('0x37')]({'where':{'type':_0x502dc7,'resourceId':_0x7b0093['id']}})[_0x18b9('0x22')](function(){return _0x4949b7;});})[_0x18b9('0x22')](function(){_0x49c365['status'](0xcc)[_0x18b9('0x2d')]();});}};}function handleEntityNotFound(_0x3136d5,_0x241460){return function(_0x4fa0cf){if(!_0x4fa0cf){_0x3136d5[_0x18b9('0x2b')](0x194);}return _0x4fa0cf;};}function handleError(_0x51b7ae,_0x2eac92){_0x2eac92=_0x2eac92||0x1f4;return function(_0x3d86ee){logger[_0x18b9('0x28')](_0x3d86ee[_0x18b9('0x3a')]);if(_0x3d86ee[_0x18b9('0x3b')]){delete _0x3d86ee[_0x18b9('0x3b')];}_0x51b7ae[_0x18b9('0x2c')](_0x2eac92)[_0x18b9('0x3c')](_0x3d86ee);};}exports['index']=function(_0x34204a,_0x47f850){var _0x44f756={'include':[{'model':db['Pause'],'as':_0x18b9('0x3d')}]},_0xe00a58={},_0x97001e={'count':0x0,'rows':[]};var _0x1b3394=_['map'](db[_0x18b9('0x3e')][_0x18b9('0x3f')],function(_0x43fb09){return{'name':_0x43fb09[_0x18b9('0x40')],'type':_0x43fb09[_0x18b9('0x41')][_0x18b9('0x42')]};});_0xe00a58[_0x18b9('0x43')]=_[_0x18b9('0x44')](_0x1b3394,'name');_0xe00a58[_0x18b9('0x45')]=_['keys'](_0x34204a[_0x18b9('0x45')]);_0xe00a58[_0x18b9('0x46')]=_[_0x18b9('0x47')](_0xe00a58[_0x18b9('0x43')],_0xe00a58[_0x18b9('0x45')]);_0x44f756[_0x18b9('0x48')]=_[_0x18b9('0x47')](_0xe00a58[_0x18b9('0x43')],qs[_0x18b9('0x49')](_0x34204a[_0x18b9('0x45')][_0x18b9('0x49')]));_0x44f756['attributes']=_0x44f756[_0x18b9('0x48')]['length']?_0x44f756[_0x18b9('0x48')]:_0xe00a58['model'];if(!_0x34204a['query'][_0x18b9('0x4a')](_0x18b9('0x4b'))){_0x44f756['limit']=qs[_0x18b9('0x31')](_0x34204a[_0x18b9('0x45')][_0x18b9('0x31')]);_0x44f756[_0x18b9('0x2f')]=qs['offset'](_0x34204a[_0x18b9('0x45')][_0x18b9('0x2f')]);}_0x44f756['order']=qs[_0x18b9('0x4c')](_0x34204a['query'][_0x18b9('0x4c')]);_0x44f756[_0x18b9('0x4d')]=qs[_0x18b9('0x46')](_['pick'](_0x34204a['query'],_0xe00a58[_0x18b9('0x46')]),_0x1b3394);if(_0x34204a[_0x18b9('0x45')][_0x18b9('0x4e')]){_0x44f756['where']=_[_0x18b9('0x4f')](_0x44f756['where'],{'$or':_[_0x18b9('0x44')](_0x1b3394,function(_0x1ebafe){if(_0x1ebafe[_0x18b9('0x41')]!==_0x18b9('0x50')){var _0x1c4f24={};_0x1c4f24[_0x1ebafe[_0x18b9('0x3b')]]={'$like':'%'+_0x34204a[_0x18b9('0x45')][_0x18b9('0x4e')]+'%'};return _0x1c4f24;}})});}_0x44f756=_['merge']({},_0x44f756,_0x34204a[_0x18b9('0x51')]);var _0x2dabeb={'where':_0x44f756[_0x18b9('0x4d')]};return db['OpenchannelAccount']['count'](_0x2dabeb)['then'](function(_0x2b38c4){_0x97001e['count']=_0x2b38c4;if(_0x34204a[_0x18b9('0x45')]['includeAll']){_0x44f756[_0x18b9('0x52')]=[{'all':!![]}];}return db[_0x18b9('0x3e')][_0x18b9('0x53')](_0x44f756);})[_0x18b9('0x22')](function(_0x2b1798){_0x97001e[_0x18b9('0x54')]=_0x2b1798;return _0x97001e;})[_0x18b9('0x22')](respondWithFilteredResult(_0x47f850,_0x44f756))['catch'](handleError(_0x47f850,null));};exports['show']=function(_0x503310,_0x1700b9){var _0x48d29a={'raw':![],'where':{'id':_0x503310[_0x18b9('0x55')]['id']},'include':[{'model':db[_0x18b9('0x56')],'as':_0x18b9('0x3d')}]},_0x2e8f0f={};_0x2e8f0f[_0x18b9('0x43')]=_['keys'](db[_0x18b9('0x3e')][_0x18b9('0x3f')]);_0x2e8f0f[_0x18b9('0x45')]=_[_0x18b9('0x57')](_0x503310[_0x18b9('0x45')]);_0x2e8f0f[_0x18b9('0x46')]=_[_0x18b9('0x47')](_0x2e8f0f['model'],_0x2e8f0f[_0x18b9('0x45')]);_0x48d29a[_0x18b9('0x48')]=_[_0x18b9('0x47')](_0x2e8f0f[_0x18b9('0x43')],qs[_0x18b9('0x49')](_0x503310['query'][_0x18b9('0x49')]));_0x48d29a[_0x18b9('0x48')]=_0x48d29a[_0x18b9('0x48')][_0x18b9('0x58')]?_0x48d29a[_0x18b9('0x48')]:_0x2e8f0f[_0x18b9('0x43')];if(_0x503310[_0x18b9('0x45')][_0x18b9('0x59')]){_0x48d29a['include']=[{'all':!![]}];}_0x48d29a=_[_0x18b9('0x4f')]({},_0x48d29a,_0x503310[_0x18b9('0x51')]);return db[_0x18b9('0x3e')][_0x18b9('0x5a')](_0x48d29a)[_0x18b9('0x22')](handleEntityNotFound(_0x1700b9,null))[_0x18b9('0x22')](respondWithResult(_0x1700b9,null))[_0x18b9('0x5b')](handleError(_0x1700b9,null));};exports[_0x18b9('0x5c')]=function(_0x7bdf32,_0x5e187e){return db[_0x18b9('0x3e')][_0x18b9('0x5c')](_0x7bdf32['body'],{})[_0x18b9('0x22')](function(_0x20109c){var _0x351ab4=_0x7bdf32[_0x18b9('0x5d')][_0x18b9('0x38')]({'plain':!![]});if(!_0x351ab4)throw new Error(_0x18b9('0x5e'));if(_0x351ab4[_0x18b9('0x5f')]===_0x18b9('0x5d')){var _0x118c84=_0x20109c[_0x18b9('0x38')]({'plain':!![]});var _0x38f86d=_0x18b9('0x39');return db[_0x18b9('0x60')][_0x18b9('0x5a')]({'where':{'name':_0x38f86d,'userProfileId':_0x351ab4['userProfileId']},'raw':!![]})[_0x18b9('0x22')](function(_0x5b0639){if(_0x5b0639&&_0x5b0639['autoAssociation']===0x0){return db['UserProfileResource'][_0x18b9('0x5c')]({'name':_0x118c84[_0x18b9('0x3b')],'resourceId':_0x118c84['id'],'type':_0x5b0639[_0x18b9('0x3b')],'sectionId':_0x5b0639['id']},{})[_0x18b9('0x22')](function(){return _0x20109c;});}else{return _0x20109c;}})[_0x18b9('0x5b')](function(_0x2c979c){logger[_0x18b9('0x28')](_0x18b9('0x61'),_0x2c979c);throw _0x2c979c;});}return _0x20109c;})[_0x18b9('0x22')](respondWithResult(_0x5e187e,0xc9))[_0x18b9('0x5b')](handleError(_0x5e187e,null));};exports['update']=function(_0x229999,_0x4ed26e){if(_0x229999[_0x18b9('0x62')]['id']){delete _0x229999[_0x18b9('0x62')]['id'];}return db[_0x18b9('0x3e')]['find']({'where':{'id':_0x229999['params']['id']},'include':[{'model':db[_0x18b9('0x56')],'as':_0x18b9('0x3d')}]})['then'](handleEntityNotFound(_0x4ed26e,null))[_0x18b9('0x22')](saveUpdates(_0x229999[_0x18b9('0x62')],null))[_0x18b9('0x22')](respondWithResult(_0x4ed26e,null))['catch'](handleError(_0x4ed26e,null));};exports[_0x18b9('0x37')]=function(_0x1ef549,_0x2c1ae0){return db[_0x18b9('0x3e')][_0x18b9('0x5a')]({'where':{'id':_0x1ef549[_0x18b9('0x55')]['id']}})[_0x18b9('0x22')](handleEntityNotFound(_0x2c1ae0,null))[_0x18b9('0x22')](removeEntity(_0x2c1ae0,null))[_0x18b9('0x5b')](handleError(_0x2c1ae0,null));};exports[_0x18b9('0x63')]=function(_0x12ddbb,_0x5c576c){return db[_0x18b9('0x3e')][_0x18b9('0x63')]()['then'](respondWithResult(_0x5c576c,null))[_0x18b9('0x5b')](handleError(_0x5c576c,null));};exports[_0x18b9('0x64')]=function(_0x4e586c,_0x498b88,_0x538b94){if(_0x4e586c['body']['id']){delete _0x4e586c[_0x18b9('0x62')]['id'];}return db[_0x18b9('0x3e')]['find']({'where':{'id':_0x4e586c[_0x18b9('0x55')]['id']}})[_0x18b9('0x22')](handleEntityNotFound(_0x498b88,null))[_0x18b9('0x22')](function(_0x350383){if(_0x350383){_0x4e586c[_0x18b9('0x62')]['OpenchannelAccountId']=_0x350383['id'];return db[_0x18b9('0x65')][_0x18b9('0x5c')](_0x4e586c[_0x18b9('0x62')]);}})[_0x18b9('0x22')](respondWithResult(_0x498b88,null))['catch'](handleError(_0x498b88,null));};exports['getDispositions']=function(_0x7ec1,_0x5b79f0,_0x3c2191){var _0xc6fb29={'raw':![],'where':{}};var _0x2b0a2e={};var _0x68f1a={'count':0x0,'rows':[]};return db[_0x18b9('0x3e')]['findOne']({'where':{'id':_0x7ec1[_0x18b9('0x55')]['id']}})[_0x18b9('0x22')](handleEntityNotFound(_0x5b79f0,null))[_0x18b9('0x22')](function(_0x54cc16){if(_0x54cc16){_0x2b0a2e[_0x18b9('0x43')]=_['keys'](db[_0x18b9('0x65')]['rawAttributes']);_0x2b0a2e[_0x18b9('0x45')]=_[_0x18b9('0x57')](_0x7ec1[_0x18b9('0x45')]);_0x2b0a2e[_0x18b9('0x46')]=_[_0x18b9('0x47')](_0x2b0a2e['model'],_0x2b0a2e[_0x18b9('0x45')]);_0xc6fb29[_0x18b9('0x48')]=_[_0x18b9('0x47')](_0x2b0a2e[_0x18b9('0x43')],qs[_0x18b9('0x49')](_0x7ec1[_0x18b9('0x45')][_0x18b9('0x49')]));_0xc6fb29[_0x18b9('0x48')]=_0xc6fb29[_0x18b9('0x48')][_0x18b9('0x58')]?_0xc6fb29[_0x18b9('0x48')]:_0x2b0a2e['model'];if(!_0x7ec1[_0x18b9('0x45')][_0x18b9('0x4a')](_0x18b9('0x4b'))){_0xc6fb29['limit']=qs[_0x18b9('0x31')](_0x7ec1['query']['limit']);_0xc6fb29['offset']=qs[_0x18b9('0x2f')](_0x7ec1[_0x18b9('0x45')]['offset']);}_0xc6fb29[_0x18b9('0x66')]=qs[_0x18b9('0x4c')](_0x7ec1[_0x18b9('0x45')]['sort']);_0xc6fb29['where']=qs[_0x18b9('0x46')](_[_0x18b9('0x67')](_0x7ec1[_0x18b9('0x45')],_0x2b0a2e[_0x18b9('0x46')]));_0xc6fb29['where'][_0x18b9('0x68')]=_0x54cc16['id'];if(_0x7ec1[_0x18b9('0x45')][_0x18b9('0x4e')]){_0xc6fb29[_0x18b9('0x4d')]=_['merge'](_0xc6fb29['where'],{'$or':_[_0x18b9('0x44')](_0xc6fb29[_0x18b9('0x48')],function(_0x16a10a){var _0x233f4a={};_0x233f4a[_0x16a10a]={'$like':'%'+_0x7ec1[_0x18b9('0x45')][_0x18b9('0x4e')]+'%'};return _0x233f4a;})});}_0xc6fb29=_['merge']({},_0xc6fb29,_0x7ec1[_0x18b9('0x51')]);return db[_0x18b9('0x65')][_0x18b9('0x32')]({'where':_0xc6fb29['where']})[_0x18b9('0x22')](function(_0x345e31){_0x68f1a[_0x18b9('0x32')]=_0x345e31;if(_0x7ec1[_0x18b9('0x45')][_0x18b9('0x59')]){_0xc6fb29[_0x18b9('0x52')]=[{'all':!![]}];}return db[_0x18b9('0x65')][_0x18b9('0x53')](_0xc6fb29);})['then'](function(_0x36bb3a){_0x68f1a[_0x18b9('0x54')]=_0x36bb3a;return _0x68f1a;});}})[_0x18b9('0x22')](respondWithFilteredResult(_0x5b79f0,_0xc6fb29))[_0x18b9('0x5b')](handleError(_0x5b79f0,null));};exports['removeDispositions']=function(_0x29aabd,_0x280076,_0x4b8310){return db['OpenchannelAccount'][_0x18b9('0x5a')]({'where':{'id':_0x29aabd[_0x18b9('0x55')]['id']}})[_0x18b9('0x22')](handleEntityNotFound(_0x280076,null))['then'](function(_0x10c4d5){if(_0x10c4d5){return _0x10c4d5['removeDispositions'](_0x29aabd[_0x18b9('0x45')][_0x18b9('0x69')]);}})['then'](respondWithStatusCode(_0x280076,null))[_0x18b9('0x5b')](handleError(_0x280076,null));};exports['addAnswer']=function(_0x5bf337,_0x12037e,_0x396a2d){if(_0x5bf337[_0x18b9('0x62')]['id']){delete _0x5bf337['body']['id'];}return db['OpenchannelAccount'][_0x18b9('0x5a')]({'where':{'id':_0x5bf337[_0x18b9('0x55')]['id']}})[_0x18b9('0x22')](handleEntityNotFound(_0x12037e,null))[_0x18b9('0x22')](function(_0x16222e){if(_0x16222e){_0x5bf337[_0x18b9('0x62')][_0x18b9('0x68')]=_0x16222e['id'];return db[_0x18b9('0x6a')][_0x18b9('0x5c')](_0x5bf337[_0x18b9('0x62')]);}})['then'](respondWithResult(_0x12037e,null))[_0x18b9('0x5b')](handleError(_0x12037e,null));};exports[_0x18b9('0x6b')]=function(_0x1007e8,_0x5bdcf4,_0x3f3316){var _0x47b30b={'raw':![],'where':{}};var _0x13aaff={};var _0xc56996={'count':0x0,'rows':[]};return db[_0x18b9('0x3e')][_0x18b9('0x6c')]({'where':{'id':_0x1007e8[_0x18b9('0x55')]['id']}})[_0x18b9('0x22')](handleEntityNotFound(_0x5bdcf4,null))[_0x18b9('0x22')](function(_0x3abf24){if(_0x3abf24){_0x13aaff[_0x18b9('0x43')]=_[_0x18b9('0x57')](db[_0x18b9('0x6a')][_0x18b9('0x3f')]);_0x13aaff[_0x18b9('0x45')]=_[_0x18b9('0x57')](_0x1007e8[_0x18b9('0x45')]);_0x13aaff[_0x18b9('0x46')]=_['intersection'](_0x13aaff['model'],_0x13aaff[_0x18b9('0x45')]);_0x47b30b[_0x18b9('0x48')]=_[_0x18b9('0x47')](_0x13aaff[_0x18b9('0x43')],qs[_0x18b9('0x49')](_0x1007e8[_0x18b9('0x45')][_0x18b9('0x49')]));_0x47b30b[_0x18b9('0x48')]=_0x47b30b[_0x18b9('0x48')][_0x18b9('0x58')]?_0x47b30b[_0x18b9('0x48')]:_0x13aaff[_0x18b9('0x43')];if(!_0x1007e8[_0x18b9('0x45')][_0x18b9('0x4a')](_0x18b9('0x4b'))){_0x47b30b[_0x18b9('0x31')]=qs['limit'](_0x1007e8[_0x18b9('0x45')]['limit']);_0x47b30b['offset']=qs[_0x18b9('0x2f')](_0x1007e8[_0x18b9('0x45')][_0x18b9('0x2f')]);}_0x47b30b[_0x18b9('0x66')]=qs[_0x18b9('0x4c')](_0x1007e8['query'][_0x18b9('0x4c')]);_0x47b30b['where']=qs['filters'](_['pick'](_0x1007e8[_0x18b9('0x45')],_0x13aaff[_0x18b9('0x46')]));_0x47b30b[_0x18b9('0x4d')][_0x18b9('0x68')]=_0x3abf24['id'];if(_0x1007e8[_0x18b9('0x45')][_0x18b9('0x4e')]){_0x47b30b[_0x18b9('0x4d')]=_[_0x18b9('0x4f')](_0x47b30b[_0x18b9('0x4d')],{'$or':_[_0x18b9('0x44')](_0x47b30b['attributes'],function(_0x3c28c1){var _0x27acec={};_0x27acec[_0x3c28c1]={'$like':'%'+_0x1007e8[_0x18b9('0x45')][_0x18b9('0x4e')]+'%'};return _0x27acec;})});}_0x47b30b=_[_0x18b9('0x4f')]({},_0x47b30b,_0x1007e8[_0x18b9('0x51')]);return db[_0x18b9('0x6a')][_0x18b9('0x32')]({'where':_0x47b30b[_0x18b9('0x4d')]})['then'](function(_0x198bbd){_0xc56996[_0x18b9('0x32')]=_0x198bbd;if(_0x1007e8[_0x18b9('0x45')][_0x18b9('0x59')]){_0x47b30b[_0x18b9('0x52')]=[{'all':!![]}];}return db[_0x18b9('0x6a')][_0x18b9('0x53')](_0x47b30b);})['then'](function(_0x23765a){_0xc56996[_0x18b9('0x54')]=_0x23765a;return _0xc56996;});}})[_0x18b9('0x22')](respondWithFilteredResult(_0x5bdcf4,_0x47b30b))[_0x18b9('0x5b')](handleError(_0x5bdcf4,null));};exports[_0x18b9('0x6d')]=function(_0x454f61,_0xa24128,_0x486025){return db[_0x18b9('0x3e')]['find']({'where':{'id':_0x454f61[_0x18b9('0x55')]['id']}})[_0x18b9('0x22')](handleEntityNotFound(_0xa24128,null))['then'](function(_0x77b33d){if(_0x77b33d){return _0x77b33d[_0x18b9('0x6d')](_0x454f61['query'][_0x18b9('0x69')]);}})['then'](respondWithStatusCode(_0xa24128,null))['catch'](handleError(_0xa24128,null));};exports[_0x18b9('0x6e')]=function(_0x2f96c2,_0x1f993c,_0x431c9b){var _0x1da438={'body':_0x2f96c2[_0x18b9('0x62')],'channel':_0x18b9('0x6f')};var _0xcf49de=[];var _0xc30d6e=[];var _0x56a267={};var _0x5407d6=![];return db['CmContact'][_0x18b9('0x63')]()['then'](function(_0x5327d4){if(!_0x5327d4){throw new db['Sequelize'][(_0x18b9('0x70'))](_0x18b9('0x71'));}_0xcf49de=_[_0x18b9('0x72')](_[_0x18b9('0x57')](_0x5327d4),[_0x18b9('0x73'),_0x18b9('0x74')]);_0xc30d6e=_['difference'](_['keys'](_0x5327d4),[_0x18b9('0x73'),'updatedAt',_0x18b9('0x75'),_0x18b9('0x76')]);if(_0x2f96c2['body']['id']){delete _0x2f96c2[_0x18b9('0x62')]['id'];}if(_[_0x18b9('0x77')](_0x2f96c2[_0x18b9('0x62')][_0x18b9('0x78')])){throw new db[(_0x18b9('0x79'))][(_0x18b9('0x70'))](_0x18b9('0x7a'));}if(_[_0x18b9('0x77')](_0x2f96c2['body'][_0x18b9('0x62')])||_0x2f96c2[_0x18b9('0x62')]['body']===''){throw new db[(_0x18b9('0x79'))][(_0x18b9('0x70'))](_0x18b9('0x7b'));}if(_[_0x18b9('0x77')](_0x2f96c2['body'][_0x18b9('0x7c')])){throw new db[(_0x18b9('0x79'))][(_0x18b9('0x70'))](_0x18b9('0x7d')+_0xc30d6e);}if(!_[_0x18b9('0x7e')](_0xc30d6e,_0x2f96c2[_0x18b9('0x62')]['mapKey'])){throw new db[(_0x18b9('0x79'))]['ValidationError']('mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20'+_0xc30d6e);}_0x56a267[_0x2f96c2[_0x18b9('0x62')][_0x18b9('0x7c')]]=_0x2f96c2[_0x18b9('0x62')][_0x18b9('0x78')];})[_0x18b9('0x22')](function(){return db[_0x18b9('0x3e')][_0x18b9('0x5a')]({'where':{'id':_0x2f96c2[_0x18b9('0x55')]['id']},'include':[{'model':db[_0x18b9('0x7f')],'as':_0x18b9('0x80'),'include':[{'model':db['CmContact'],'as':_0x18b9('0x81'),'where':_0x56a267,'limit':0x1,'order':[['updatedAt',_0x18b9('0x82')]]}]},{'model':db[_0x18b9('0x83')],'as':_0x18b9('0x84')}]});})[_0x18b9('0x22')](handleEntityNotFound(_0x1f993c,null))['then'](function(_0x2c19e2){if(_0x2c19e2&&_0x2c19e2[_0x18b9('0x80')]){_0x1da438[_0x18b9('0x85')]=_0x2c19e2;_0x1da438[_0x18b9('0x86')]=_0x2c19e2[_0x18b9('0x84')];_0x1da438[_0x18b9('0x87')]=_0x2c19e2[_0x18b9('0x80')];_0x1da438[_0x18b9('0x86')]=_[_0x18b9('0x88')](_0x1da438[_0x18b9('0x86')],[_0x18b9('0x89')],[_0x18b9('0x8a')]);if(_0x1da438['account']['Applications']){delete _0x1da438[_0x18b9('0x85')]['Applications'];}if(_0x1da438[_0x18b9('0x85')][_0x18b9('0x80')]&&_0x1da438[_0x18b9('0x85')][_0x18b9('0x80')][_0x18b9('0x81')][_0x18b9('0x58')]){return _0x1da438[_0x18b9('0x85')][_0x18b9('0x80')][_0x18b9('0x81')][0x0];}var _0x4b5cd9=_[_0x18b9('0x1a')](_0x2f96c2[_0x18b9('0x62')],{'firstName':_0x2f96c2[_0x18b9('0x62')][_0x18b9('0x78')],'ListId':_0x2c19e2[_0x18b9('0x76')]});_0x4b5cd9[_0x2f96c2['body']['mapKey']]=_0x2f96c2[_0x18b9('0x62')][_0x18b9('0x78')];return db[_0x18b9('0x8b')][_0x18b9('0x5c')](_0x4b5cd9,{'fields':_0xcf49de,'raw':!![]});}})[_0x18b9('0x22')](handleEntityNotFound(_0x1f993c,null))[_0x18b9('0x22')](function(_0x4f026a){_0x1da438[_0x18b9('0x8c')]=_0x4f026a;if(_0x4f026a){var _0xf5eccb={'ContactId':_0x4f026a['id'],'OpenchannelAccountId':_0x2f96c2[_0x18b9('0x55')]['id'],'from':(_0x4f026a[_0x18b9('0x8d')]||'')+'\x20'+(_0x4f026a[_0x18b9('0x8e')]||'')};var _0x3eef49={'OpenchannelAccountId':_0x2f96c2['params']['id'],'closed':![]};if(_0x2f96c2[_0x18b9('0x62')]['threadId']){_0x3eef49['threadId']=_0x2f96c2['body']['threadId'];return db[_0x18b9('0x8f')][_0x18b9('0x5a')]({'where':_0x3eef49})[_0x18b9('0x22')](function(_0x414b72){if(_0x414b72){return[_0x414b72,![]];}_0xf5eccb[_0x18b9('0x90')]=_0x2f96c2[_0x18b9('0x62')][_0x18b9('0x90')];_0xf5eccb[_0x18b9('0x91')]=_0x2f96c2['body'][_0x18b9('0x91')];return db[_0x18b9('0x8f')]['create'](_0xf5eccb)[_0x18b9('0x22')](function(_0x1cac14){return[_0x1cac14,!![]];});});}else{_0x3eef49[_0x18b9('0x90')]=null;}_0x3eef49[_0x18b9('0x92')]=_0x4f026a['id'];return db[_0x18b9('0x8f')][_0x18b9('0x5a')]({'where':_0x3eef49})[_0x18b9('0x22')](function(_0x3847e7){if(_0x3847e7){return[_0x3847e7,![]];}return db[_0x18b9('0x8f')][_0x18b9('0x5c')](_0xf5eccb)[_0x18b9('0x22')](function(_0x31b9d2){return[_0x31b9d2,!![]];});});}})['spread'](function(_0x26ae29,_0x3e154f){if(_0x26ae29){_0x5407d6=_0x3e154f;if(!_0x3e154f){var _0x3d6fa2={'from':(_0x1da438['contact'][_0x18b9('0x8d')]||'')+'\x20'+(_0x1da438[_0x18b9('0x8c')]['lastName']||'')};if(_0x2f96c2['body'][_0x18b9('0x90')]&&_0x2f96c2[_0x18b9('0x62')][_0x18b9('0x93')]&&_0x2f96c2['body'][_0x18b9('0x90')]!=_0x2f96c2['body'][_0x18b9('0x93')]){_0x3d6fa2['threadId']=_0x2f96c2['body'][_0x18b9('0x93')];}return _0x26ae29['update'](_0x3d6fa2);}else{return _0x26ae29;}}})[_0x18b9('0x22')](function(_0x44aac9){_0x1da438[_0x18b9('0x94')]=_0x44aac9[_0x18b9('0x38')]({'plain':!![]});_0x1da438[_0x18b9('0x94')][_0x18b9('0x95')]=_0x5407d6;if(_0x1da438[_0x18b9('0x94')][_0x18b9('0x95')]){if(_0x1da438['account'][_0x18b9('0x96')]){_0x1da438[_0x18b9('0x86')][_0x18b9('0x97')]({'id':0x0,'priority':_0x1da438[_0x18b9('0x86')][_0x18b9('0x58')]+0x1,'app':_0x18b9('0x98'),'appdata':_0x18b9('0x99'),'interval':_0x18b9('0x9a')});}}return db[_0x18b9('0x9b')][_0x18b9('0x5c')]({'body':_0x2f96c2['body'][_0x18b9('0x62')],'OpenchannelAccountId':_0x2f96c2[_0x18b9('0x55')]['id'],'OpenchannelInteractionId':_0x44aac9['id'],'direction':'in','ContactId':_0x1da438[_0x18b9('0x8c')]['id'],'AttachmentId':_0x2f96c2['body']['AttachmentId']});})[_0x18b9('0x22')](function(_0x49b26f){_0x1da438[_0x18b9('0x29')]=_0x49b26f;if(_0x1da438[_0x18b9('0x94')][_0x18b9('0x9c')]){return db[_0x18b9('0x9d')][_0x18b9('0x5a')]({'attributes':['id',_0x18b9('0x3b')],'where':{'id':_0x1da438['interaction'][_0x18b9('0x9c')]}})[_0x18b9('0x22')](function(_0x2f00af){if(_0x2f00af){_0x1da438[_0x18b9('0x86')][_0x18b9('0x9e')]({'id':0x0,'priority':0x0,'app':'agent','appdata':_0x2f00af[_0x18b9('0x3b')]+','+(_0x1da438['account'][_0x18b9('0x9f')]||0xa),'interval':'*,*,*,*'});_0x1da438[_0x18b9('0xa0')]=![];}return respondWithRpcPromise('Start',_0x18b9('0xa1'),_0x1da438);});}return respondWithRpcPromise(_0x18b9('0xa2'),_0x18b9('0xa1'),_0x1da438);})['then'](function(_0x21609c){respondWithRpcPromise(_0x18b9('0xa3'),_0x18b9('0xa3'),{'event':_0x18b9('0x6e'),'message':_0x21609c},client9002);return _0x21609c;})[_0x18b9('0x22')](respondWithResult(_0x1f993c,null))['catch'](handleError(_0x1f993c,null));};exports['addApplications']=function(_0x9465c0,_0x45c36b,_0x2b44e5){return db[_0x18b9('0x3e')]['findOne']({'where':{'id':_0x9465c0[_0x18b9('0x55')]['id']}})['then'](handleEntityNotFound(_0x45c36b,null))[_0x18b9('0x22')](function(_0x276758){if(_0x276758){return db[_0x18b9('0xa4')]['transaction'](function(_0x4c24ae){return db[_0x18b9('0x83')][_0x18b9('0x37')]({'where':{'OpenchannelAccountId':_0x9465c0[_0x18b9('0x55')]['id']},'transaction':_0x4c24ae})[_0x18b9('0x22')](function(_0x375840){var _0x3a46bd=_[_0x18b9('0x44')](_0x9465c0['body'],function(_0x1980f7){_0x1980f7[_0x18b9('0x68')]=_0x9465c0[_0x18b9('0x55')]['id'];return _0x1980f7;});return db['OpenchannelApplication'][_0x18b9('0xa5')](_0x3a46bd,{'transaction':_0x4c24ae});});})[_0x18b9('0x22')](function(){return db[_0x18b9('0x83')][_0x18b9('0xa6')]({'where':{'OpenchannelAccountId':_0x9465c0[_0x18b9('0x55')]['id']},'order':_0x18b9('0x89')});});}})[_0x18b9('0x22')](respondWithResult(_0x45c36b,null))['catch'](handleError(_0x45c36b,null));};exports['getApplications']=function(_0x26e2ee,_0x349466,_0x93e76e){var _0x157067={};var _0x514252={};var _0x4eda79;var _0xa48e6f;return db['OpenchannelAccount'][_0x18b9('0x6c')]({'where':{'id':_0x26e2ee[_0x18b9('0x55')]['id']}})[_0x18b9('0x22')](handleEntityNotFound(_0x349466,null))['then'](function(_0x3f6b3b){if(_0x3f6b3b){_0x4eda79=_0x3f6b3b;_0x514252[_0x18b9('0x43')]=_[_0x18b9('0x57')](db[_0x18b9('0x83')]['rawAttributes']);_0x514252[_0x18b9('0x45')]=_[_0x18b9('0x57')](_0x26e2ee[_0x18b9('0x45')]);_0x514252[_0x18b9('0x46')]=_[_0x18b9('0x47')](_0x514252[_0x18b9('0x43')],_0x514252[_0x18b9('0x45')]);_0x157067['attributes']=_[_0x18b9('0x47')](_0x514252[_0x18b9('0x43')],qs[_0x18b9('0x49')](_0x26e2ee['query'][_0x18b9('0x49')]));_0x157067[_0x18b9('0x48')]=_0x157067[_0x18b9('0x48')][_0x18b9('0x58')]?_0x157067[_0x18b9('0x48')]:_0x514252[_0x18b9('0x43')];_0x157067[_0x18b9('0x66')]=qs[_0x18b9('0x4c')](_0x26e2ee[_0x18b9('0x45')][_0x18b9('0x4c')]);_0x157067[_0x18b9('0x4d')]=qs[_0x18b9('0x46')](_['pick'](_0x26e2ee[_0x18b9('0x45')],_0x514252[_0x18b9('0x46')]));if(_0x26e2ee['query'][_0x18b9('0x4e')]){_0x157067[_0x18b9('0x4d')]=_[_0x18b9('0x4f')](_0x157067[_0x18b9('0x4d')],{'$or':_[_0x18b9('0x44')](_0x157067[_0x18b9('0x48')],function(_0x48ac52){var _0x4aea52={};_0x4aea52[_0x48ac52]={'$like':'%'+_0x26e2ee[_0x18b9('0x45')][_0x18b9('0x4e')]+'%'};return _0x4aea52;})});}_0x157067=_['merge']({},_0x157067,_0x26e2ee[_0x18b9('0x51')]);return _0x4eda79[_0x18b9('0xa7')](_0x157067);}})[_0x18b9('0x22')](function(_0x312863){if(_0x312863){_0xa48e6f=_0x312863['length'];if(!_0x26e2ee[_0x18b9('0x45')]['hasOwnProperty'](_0x18b9('0x4b'))){_0x157067[_0x18b9('0x31')]=qs['limit'](_0x26e2ee[_0x18b9('0x45')][_0x18b9('0x31')]);_0x157067[_0x18b9('0x2f')]=qs[_0x18b9('0x2f')](_0x26e2ee[_0x18b9('0x45')][_0x18b9('0x2f')]);}return _0x4eda79[_0x18b9('0xa7')](_0x157067);}})['then'](function(_0x3f3d38){if(_0x3f3d38){return _0x3f3d38?{'count':_0xa48e6f,'rows':_0x3f3d38}:null;}})[_0x18b9('0x22')](respondWithResult(_0x349466,null))['catch'](handleError(_0x349466,null));};exports[_0x18b9('0xa8')]=function(_0x51b0a5,_0x559a82,_0x13e56e){var _0x258e47={'raw':![],'where':{}};var _0x212387={};var _0x49f79={'count':0x0,'rows':[]};return db[_0x18b9('0x3e')][_0x18b9('0x6c')]({'where':{'id':_0x51b0a5[_0x18b9('0x55')]['id']}})[_0x18b9('0x22')](handleEntityNotFound(_0x559a82,null))[_0x18b9('0x22')](function(_0x5092fb){if(_0x5092fb){_0x212387[_0x18b9('0x43')]=_[_0x18b9('0x57')](db[_0x18b9('0x8f')][_0x18b9('0x3f')]);_0x212387[_0x18b9('0x45')]=_[_0x18b9('0x57')](_0x51b0a5[_0x18b9('0x45')]);_0x212387[_0x18b9('0x46')]=_['intersection'](_0x212387['model'],_0x212387['query']);_0x258e47[_0x18b9('0x48')]=_[_0x18b9('0x47')](_0x212387['model'],qs[_0x18b9('0x49')](_0x51b0a5[_0x18b9('0x45')][_0x18b9('0x49')]));_0x258e47['attributes']=_0x258e47[_0x18b9('0x48')]['length']?_0x258e47[_0x18b9('0x48')]:_0x212387['model'];if(!_0x51b0a5['query'][_0x18b9('0x4a')](_0x18b9('0x4b'))){_0x258e47[_0x18b9('0x31')]=qs[_0x18b9('0x31')](_0x51b0a5[_0x18b9('0x45')][_0x18b9('0x31')]);_0x258e47[_0x18b9('0x2f')]=qs['offset'](_0x51b0a5[_0x18b9('0x45')][_0x18b9('0x2f')]);}_0x258e47[_0x18b9('0x66')]=qs[_0x18b9('0x4c')](_0x51b0a5[_0x18b9('0x45')][_0x18b9('0x4c')]);_0x258e47[_0x18b9('0x4d')]=qs[_0x18b9('0x46')](_[_0x18b9('0x67')](_0x51b0a5['query'],_0x212387[_0x18b9('0x46')]));_0x258e47[_0x18b9('0x4d')][_0x18b9('0x68')]=_0x5092fb['id'];if(_0x51b0a5[_0x18b9('0x45')][_0x18b9('0x4e')]){_0x258e47[_0x18b9('0x4d')]=_[_0x18b9('0x4f')](_0x258e47[_0x18b9('0x4d')],{'$or':_[_0x18b9('0x44')](_0x258e47[_0x18b9('0x48')],function(_0xfa6d){var _0x16e2a9={};_0x16e2a9[_0xfa6d]={'$like':'%'+_0x51b0a5[_0x18b9('0x45')][_0x18b9('0x4e')]+'%'};return _0x16e2a9;})});}_0x258e47=_[_0x18b9('0x4f')]({},_0x258e47,_0x51b0a5[_0x18b9('0x51')]);return db[_0x18b9('0x8f')][_0x18b9('0x32')]({'where':_0x258e47['where']})[_0x18b9('0x22')](function(_0x137e2e){_0x49f79['count']=_0x137e2e;if(_0x51b0a5[_0x18b9('0x45')]['includeAll']){_0x258e47['include']=[{'model':db[_0x18b9('0x8b')],'as':_0x18b9('0xa9'),'required':![]},{'model':db[_0x18b9('0x9d')],'as':'Owner','attributes':[_0x18b9('0x3b'),_0x18b9('0xaa'),'internal'],'required':![]},{'model':db[_0x18b9('0xab')],'as':'Tags','attributes':['id','name','color'],'where':_0x51b0a5[_0x18b9('0x45')][_0x18b9('0xac')]?{'id':_0x51b0a5[_0x18b9('0x45')][_0x18b9('0xac')]}:undefined,'required':_0x51b0a5[_0x18b9('0x45')][_0x18b9('0xac')]?!![]:![]}];}return db[_0x18b9('0x8f')][_0x18b9('0x53')](_0x258e47);})[_0x18b9('0x22')](function(_0x3a21d5){_0x49f79[_0x18b9('0x54')]=_0x3a21d5;return _0x49f79;});}})['then'](respondWithFilteredResult(_0x559a82,_0x258e47))[_0x18b9('0x5b')](handleError(_0x559a82,null));};exports[_0x18b9('0xad')]=function(_0x2f6208,_0x58e66b,_0x542825){return db[_0x18b9('0x3e')]['find']({'where':{'id':_0x2f6208[_0x18b9('0x55')]['id']}})[_0x18b9('0x22')](handleEntityNotFound(_0x58e66b,null))['then'](function(_0x54cd14){if(_0x54cd14){return _0x54cd14[_0x18b9('0xad')](_0x2f6208[_0x18b9('0x62')][_0x18b9('0x69')],_['omit'](_0x2f6208[_0x18b9('0x62')],[_0x18b9('0x69'),'id'])||{})['spread'](function(_0x2e5e70){for(var _0x5584e3=0x0;_0x5584e3<_0x2f6208[_0x18b9('0x62')][_0x18b9('0x69')][_0x18b9('0x58')];_0x5584e3+=0x1){socket['emit'](_0x18b9('0xae'),{'UserId':_0x2f6208[_0x18b9('0x62')][_0x18b9('0x69')][_0x5584e3],'OpenchannelAccountId':_0x2f6208['params']['id']});}return _0x2e5e70;});}})[_0x18b9('0x22')](respondWithResult(_0x58e66b,null))[_0x18b9('0x5b')](handleError(_0x58e66b,null));};exports[_0x18b9('0xaf')]=function(_0x5948bc,_0x1baa4c,_0x585dfd){return db[_0x18b9('0x3e')][_0x18b9('0x5a')]({'where':{'id':_0x5948bc['params']['id']}})[_0x18b9('0x22')](handleEntityNotFound(_0x1baa4c,null))[_0x18b9('0x22')](function(_0x7d144b){if(_0x7d144b){return _0x7d144b['removeAgents'](_0x5948bc[_0x18b9('0x45')][_0x18b9('0x69')])[_0x18b9('0x22')](function(){if(_[_0x18b9('0xb0')](_0x5948bc[_0x18b9('0x45')][_0x18b9('0x69')])){for(var _0x20530a=0x0;_0x20530a<_0x5948bc['query']['ids'][_0x18b9('0x58')];_0x20530a+=0x1){socket['emit'](_0x18b9('0xb1'),{'UserId':Number(_0x5948bc[_0x18b9('0x45')][_0x18b9('0x69')][_0x20530a]),'OpenchannelAccountId':Number(_0x5948bc[_0x18b9('0x55')]['id'])});}}else{socket[_0x18b9('0xb2')]('userOpenchannelAccount:remove',{'UserId':Number(_0x5948bc['query'][_0x18b9('0x69')]),'OpenchannelAccountId':Number(_0x5948bc[_0x18b9('0x55')]['id'])});}});}})['then'](respondWithStatusCode(_0x1baa4c,null))['catch'](handleError(_0x1baa4c,null));};exports['getAgents']=function(_0x1d2702,_0x4349f8,_0xb0aece){var _0x16930d={};var _0x44034d={};var _0x10afac;var _0x1da1f5;return db[_0x18b9('0x3e')][_0x18b9('0x6c')]({'where':{'id':_0x1d2702[_0x18b9('0x55')]['id']}})[_0x18b9('0x22')](handleEntityNotFound(_0x4349f8,null))[_0x18b9('0x22')](function(_0xe80bc8){if(_0xe80bc8){_0x10afac=_0xe80bc8;_0x44034d[_0x18b9('0x43')]=_['keys'](db['User'][_0x18b9('0x3f')]);_0x44034d['query']=_[_0x18b9('0x57')](_0x1d2702[_0x18b9('0x45')]);_0x44034d[_0x18b9('0x46')]=_[_0x18b9('0x47')](_0x44034d[_0x18b9('0x43')],_0x44034d[_0x18b9('0x45')]);_0x16930d[_0x18b9('0x48')]=_[_0x18b9('0x47')](_0x44034d[_0x18b9('0x43')],qs[_0x18b9('0x49')](_0x1d2702[_0x18b9('0x45')][_0x18b9('0x49')]));_0x16930d[_0x18b9('0x48')]=_0x16930d[_0x18b9('0x48')]['length']?_0x16930d['attributes']:_0x44034d[_0x18b9('0x43')];_0x16930d[_0x18b9('0x66')]=qs[_0x18b9('0x4c')](_0x1d2702[_0x18b9('0x45')]['sort']);_0x16930d[_0x18b9('0x4d')]=qs[_0x18b9('0x46')](_[_0x18b9('0x67')](_0x1d2702[_0x18b9('0x45')],_0x44034d[_0x18b9('0x46')]));if(_0x1d2702['query'][_0x18b9('0x4e')]){_0x16930d[_0x18b9('0x4d')]=_[_0x18b9('0x4f')](_0x16930d['where'],{'$or':_[_0x18b9('0x44')](_0x16930d[_0x18b9('0x48')],function(_0x1ca800){var _0x79f893={};_0x79f893[_0x1ca800]={'$like':'%'+_0x1d2702[_0x18b9('0x45')][_0x18b9('0x4e')]+'%'};return _0x79f893;})});}_0x16930d=_['merge']({},_0x16930d,_0x1d2702[_0x18b9('0x51')]);return _0x10afac[_0x18b9('0xb3')](_0x16930d);}})[_0x18b9('0x22')](function(_0x1fca25){if(_0x1fca25){_0x1da1f5=_0x1fca25[_0x18b9('0x58')];if(!_0x1d2702['query'][_0x18b9('0x4a')]('nolimit')){_0x16930d[_0x18b9('0x31')]=qs[_0x18b9('0x31')](_0x1d2702[_0x18b9('0x45')][_0x18b9('0x31')]);_0x16930d['offset']=qs[_0x18b9('0x2f')](_0x1d2702['query'][_0x18b9('0x2f')]);}return _0x10afac[_0x18b9('0xb3')](_0x16930d);}})['then'](function(_0x33cf6a){if(_0x33cf6a){return _0x33cf6a?{'count':_0x1da1f5,'rows':_0x33cf6a}:null;}})[_0x18b9('0x22')](respondWithResult(_0x4349f8,null))[_0x18b9('0x5b')](handleError(_0x4349f8,null));};exports['send']=function(_0x5958b4,_0x26dfb8,_0x29029c){var _0x217836,_0x37f27f,_0xbcd17a;if(_['isNil'](_0x5958b4['body'][_0x18b9('0x62')])||_0x5958b4[_0x18b9('0x62')][_0x18b9('0x62')]===''){throw new db[(_0x18b9('0x79'))][(_0x18b9('0x70'))](_0x18b9('0x7b'));}if(_[_0x18b9('0x77')](_0x5958b4[_0x18b9('0x62')]['to'])){}_0x217836=_0x5958b4[_0x18b9('0x62')]['to'];return db['OpenchannelAccount'][_0x18b9('0x6c')]({'where':{'id':_0x5958b4[_0x18b9('0x55')]['id']}})['then'](handleEntityNotFound(_0x26dfb8,null))['then'](function(_0x4b927e){if(_0x4b927e){return db[_0x18b9('0x3e')][_0x18b9('0x5a')]({'where':{'id':_0x4b927e['id']},'include':[{'model':db[_0x18b9('0x7f')],'as':'List','include':[{'model':db[_0x18b9('0x8b')],'as':_0x18b9('0x81'),'where':{[_0x4b927e['mapKey']]:_0x217836},'limit':0x1,'order':[[_0x18b9('0x74'),_0x18b9('0x82')]]}]}]})['then'](handleEntityNotFound(_0x26dfb8,null))['then'](function(_0x2347b2){if(_0x2347b2&&_0x2347b2[_0x18b9('0x80')]){_0x37f27f=_0x2347b2[_0x18b9('0x38')]({'plain':!![]});if(_0x37f27f[_0x18b9('0x80')]&&_0x37f27f[_0x18b9('0x80')][_0x18b9('0x81')]['length']){return _0x37f27f[_0x18b9('0x80')][_0x18b9('0x81')][0x0];}return db['CmContact'][_0x18b9('0x5c')](_[_0x18b9('0x1a')](_0x5958b4['body'],{'firstName':_0x217836,[_0x2347b2[_0x18b9('0x7c')]]:_0x217836,'phone':_0x217836,'ListId':_0x37f27f['ListId']}));}})[_0x18b9('0x22')](handleEntityNotFound(_0x26dfb8,null))[_0x18b9('0x22')](function(_0x30d958){if(_0x30d958){_0xbcd17a=_0x30d958;return db[_0x18b9('0x8f')]['find']({'where':{'ContactId':_0xbcd17a['id'],'closed':![],'OpenchannelAccountId':_0x37f27f['id']}})[_0x18b9('0x22')](function(_0x413cbf){if(_0x413cbf){return[_0x413cbf,![]];}return db['OpenchannelInteraction']['create']({'UserId':_0x5958b4[_0x18b9('0x5d')]['id'],'ContactId':_0xbcd17a['id'],'OpenchannelAccountId':_0x37f27f['id'],'lastMsgDirection':_0x18b9('0xb4'),'Messages':[_[_0x18b9('0x4f')](_0x5958b4[_0x18b9('0x62')],{'read':![],'body':_0x5958b4[_0x18b9('0x62')][_0x18b9('0x62')],'OpenchannelAccountId':_0x37f27f['id'],'UserId':_0x5958b4['user']['id'],'ContactId':_0xbcd17a['id']})]},{'include':[{'model':db['OpenchannelMessage'],'as':_0x18b9('0xb5')}]})['then'](function(_0x239cf5){return[_0x239cf5,!![]];});});}})['spread'](function(_0x4e8898,_0x47466b){if(_0x47466b){return _0x4e8898;}return db['OpenchannelMessage'][_0x18b9('0x5c')](_[_0x18b9('0x4f')](_0x5958b4[_0x18b9('0x62')],{'read':![],'body':_0x5958b4[_0x18b9('0x62')][_0x18b9('0x62')],'OpenchannelAccountId':_0x37f27f['id'],'OpenchannelInteractionId':_0x4e8898['id'],'UserId':_0x5958b4[_0x18b9('0x5d')]['id'],'ContactId':_0xbcd17a['id']}))['then'](function(_0x9a025){_0x4e8898[_0x18b9('0xb6')][_0x18b9('0xb5')]=[];_0x4e8898['dataValues'][_0x18b9('0xb5')][_0x18b9('0x97')](_0x9a025['dataValues']);return _0x4e8898;});});}})[_0x18b9('0x22')](respondWithResult(_0x26dfb8,null))[_0x18b9('0x5b')](handleError(_0x26dfb8,null));}; \ No newline at end of file +var _0x945d=['lastName','messageId','interaction','created','autoclose','close','unmanaged','*,*,*,*','OpenchannelMessage','AttachmentId','UserId','waitForTheAssignedAgent','forcedOwnership','Start','startRouting','EventManager','transaction','OpenchannelApplication','bulkCreate','priority','getApplications','Contact','User','fullname','internal','Tag','Tags','color','tag','addAgents','omit','spread','userOpenchannelAccount:save','isArray','emit','userOpenchannelAccount:remove','getAgents','body\x20is\x20mandatory\x20and\x20not\x20empty','ListId','out','Messages','dataValues','push','eml-format','rimraf','fast-json-patch','mustache','util','path','sox','to-csv','ejs','squel','jsforce','desk.js','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./openchannelAccount.socket','client','request','OpenchannelAccount,\x20%s,\x20%s','OpenchannelAccount,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','catch','sendStatus','end','json','offset','undefined','count','limit','set','Content-Range','reject','save','update','then','destroy','get','UserProfileResource','status','stack','name','send','index','Pause','map','OpenchannelAccount','rawAttributes','type','key','model','keys','query','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','filters','merge','VIRTUAL','options','includeAll','include','findAll','show','params','length','create','body','role','user','OpenchannelAccounts','find','userProfileId','autoAssociation','mandatoryDispositionPause','describe','addDisposition','OpenchannelAccountId','Disposition','findOne','pick','filter','rows','removeDispositions','ids','CannedAnswer','getAnswers','removeAnswers','notify','openchannel','CmContact','ValidationError','no\x20available\x20attributes','difference','createdAt','updatedAt','CompanyId','isNil','from','Sequelize','from\x20is\x20mandatory','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','mapKey','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','CmList','DESC','Applications','List','account','orderBy','applications','asc','Contacts','contact','firstName','threadId','OpenchannelInteraction','externalUrl','ContactId'];(function(_0x2c69a1,_0x201903){var _0x24bb91=function(_0x3131ac){while(--_0x3131ac){_0x2c69a1['push'](_0x2c69a1['shift']());}};_0x24bb91(++_0x201903);}(_0x945d,0xe2));var _0xd945=function(_0x490006,_0x568358){_0x490006=_0x490006-0x0;var _0x54e046=_0x945d[_0x490006];return _0x54e046;};'use strict';var emlformat=require(_0xd945('0x0'));var rimraf=require(_0xd945('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xd945('0x2'));var rp=require('request-promise');var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xd945('0x3'));var util=require(_0xd945('0x4'));var path=require(_0xd945('0x5'));var sox=require(_0xd945('0x6'));var csv=require(_0xd945('0x7'));var ejs=require(_0xd945('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0xd945('0x9'));var crypto=require('crypto');var jsforce=require(_0xd945('0xa'));var deskjs=require(_0xd945('0xb'));var toCsv=require(_0xd945('0x7'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0xd945('0xc'));var authService=require(_0xd945('0xd'));var qs=require(_0xd945('0xe'));var as=require(_0xd945('0xf'));var hardwareService=require(_0xd945('0x10'));var logger=require(_0xd945('0x11'))(_0xd945('0x12'));var utils=require('../../config/utils');var config=require(_0xd945('0x13'));var licenseUtil=require(_0xd945('0x14'));var db=require(_0xd945('0x15'))['db'];config[_0xd945('0x16')]=_[_0xd945('0x17')](config[_0xd945('0x16')],{'host':_0xd945('0x18'),'port':0x18eb});var socket=require(_0xd945('0x19'))(new Redis(config[_0xd945('0x16')]));require(_0xd945('0x1a'))['register'](socket);var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232c});var client9002=jayson[_0xd945('0x1b')]['http']({'port':0x232a});function respondWithRpcPromise(_0x322b16,_0x5dde99,_0x1403eb,_0x10091c){return new BPromise(function(_0x4cf287,_0x547d5a){var _0x41abc5=_0x10091c||client;return _0x41abc5[_0xd945('0x1c')](_0x322b16,_0x1403eb)['then'](function(_0x14da37){logger['info'](_0xd945('0x1d'),_0x5dde99,'request\x20sent');logger['debug'](_0xd945('0x1e'),_0x5dde99,_0xd945('0x1f'),JSON[_0xd945('0x20')](_0x14da37));if(_0x14da37[_0xd945('0x21')]){if(_0x14da37[_0xd945('0x21')][_0xd945('0x22')]===0x1f4){logger[_0xd945('0x21')](_0xd945('0x1d'),_0x5dde99,_0x14da37['error'][_0xd945('0x23')]);return _0x547d5a(_0x14da37[_0xd945('0x21')][_0xd945('0x23')]);}logger['error'](_0xd945('0x1d'),_0x5dde99,_0x14da37[_0xd945('0x21')]['message']);return _0x4cf287(_0x14da37[_0xd945('0x21')][_0xd945('0x23')]);}else{logger[_0xd945('0x24')]('OpenchannelAccount,\x20%s,\x20%s',_0x5dde99,_0xd945('0x1f'));_0x4cf287(_0x14da37['result'][_0xd945('0x23')]);}})[_0xd945('0x25')](function(_0x48520e){logger[_0xd945('0x21')](_0xd945('0x1d'),_0x5dde99,_0x48520e);_0x547d5a(_0x48520e);});});}function respondWithStatusCode(_0x5d966b,_0x3008d9){_0x3008d9=_0x3008d9||0xcc;return function(_0x4f9a2e){if(_0x4f9a2e){return _0x5d966b[_0xd945('0x26')](_0x3008d9);}return _0x5d966b['status'](_0x3008d9)[_0xd945('0x27')]();};}function respondWithResult(_0x93dc17,_0x5032c2){_0x5032c2=_0x5032c2||0xc8;return function(_0x4e183a){if(_0x4e183a){return _0x93dc17['status'](_0x5032c2)[_0xd945('0x28')](_0x4e183a);}};}function respondWithFilteredResult(_0x2da25b,_0xedb53){return function(_0x47fc2b){if(_0x47fc2b){var _0x2bfd9c=typeof _0xedb53[_0xd945('0x29')]===_0xd945('0x2a')&&typeof _0xedb53['limit']==='undefined';var _0x56a054=_0x47fc2b[_0xd945('0x2b')];var _0x41fd31=_0x2bfd9c?0x0:_0xedb53[_0xd945('0x29')];var _0x20a32e=_0x2bfd9c?_0x47fc2b[_0xd945('0x2b')]:_0xedb53[_0xd945('0x29')]+_0xedb53[_0xd945('0x2c')];var _0x53deb3;if(_0x20a32e>=_0x56a054){_0x20a32e=_0x56a054;_0x53deb3=0xc8;}else{_0x53deb3=0xce;}_0x2da25b['status'](_0x53deb3);return _0x2da25b[_0xd945('0x2d')](_0xd945('0x2e'),_0x41fd31+'-'+_0x20a32e+'/'+_0x56a054)[_0xd945('0x28')](_0x47fc2b);}return null;};}function patchUpdates(_0x4141ac){return function(_0x5ef2dd){try{jsonpatch['apply'](_0x5ef2dd,_0x4141ac,!![]);}catch(_0xfc76bf){return BPromise[_0xd945('0x2f')](_0xfc76bf);}return _0x5ef2dd[_0xd945('0x30')]();};}function saveUpdates(_0xa123c4,_0x1de03c){return function(_0x215bb6){if(_0x215bb6){return _0x215bb6[_0xd945('0x31')](_0xa123c4)[_0xd945('0x32')](function(_0x3b8990){return _0x3b8990;});}return null;};}function removeEntity(_0x479ddb,_0x1d0edb){return function(_0xe480c){if(_0xe480c){return _0xe480c[_0xd945('0x33')]()[_0xd945('0x32')](function(){var _0x4588fb=_0xe480c[_0xd945('0x34')]({'plain':!![]});var _0x1c1751='OpenchannelAccounts';return db[_0xd945('0x35')][_0xd945('0x33')]({'where':{'type':_0x1c1751,'resourceId':_0x4588fb['id']}})[_0xd945('0x32')](function(){return _0xe480c;});})[_0xd945('0x32')](function(){_0x479ddb[_0xd945('0x36')](0xcc)[_0xd945('0x27')]();});}};}function handleEntityNotFound(_0x382d79,_0x2869a3){return function(_0x1f4374){if(!_0x1f4374){_0x382d79[_0xd945('0x26')](0x194);}return _0x1f4374;};}function handleError(_0x5e88e5,_0x524453){_0x524453=_0x524453||0x1f4;return function(_0x328e27){logger[_0xd945('0x21')](_0x328e27[_0xd945('0x37')]);if(_0x328e27[_0xd945('0x38')]){delete _0x328e27['name'];}_0x5e88e5[_0xd945('0x36')](_0x524453)[_0xd945('0x39')](_0x328e27);};}exports[_0xd945('0x3a')]=function(_0x5b8b55,_0x539688){var _0x327a3d={'include':[{'model':db[_0xd945('0x3b')],'as':'mandatoryDispositionPause'}]},_0x4bf72c={},_0x3c8efe={'count':0x0,'rows':[]};var _0x4d318d=_[_0xd945('0x3c')](db[_0xd945('0x3d')][_0xd945('0x3e')],function(_0x5e6fc3){return{'name':_0x5e6fc3['fieldName'],'type':_0x5e6fc3[_0xd945('0x3f')][_0xd945('0x40')]};});_0x4bf72c[_0xd945('0x41')]=_[_0xd945('0x3c')](_0x4d318d,'name');_0x4bf72c['query']=_[_0xd945('0x42')](_0x5b8b55[_0xd945('0x43')]);_0x4bf72c['filters']=_[_0xd945('0x44')](_0x4bf72c[_0xd945('0x41')],_0x4bf72c['query']);_0x327a3d[_0xd945('0x45')]=_[_0xd945('0x44')](_0x4bf72c[_0xd945('0x41')],qs[_0xd945('0x46')](_0x5b8b55[_0xd945('0x43')][_0xd945('0x46')]));_0x327a3d[_0xd945('0x45')]=_0x327a3d[_0xd945('0x45')]['length']?_0x327a3d['attributes']:_0x4bf72c['model'];if(!_0x5b8b55[_0xd945('0x43')][_0xd945('0x47')](_0xd945('0x48'))){_0x327a3d[_0xd945('0x2c')]=qs[_0xd945('0x2c')](_0x5b8b55[_0xd945('0x43')]['limit']);_0x327a3d[_0xd945('0x29')]=qs[_0xd945('0x29')](_0x5b8b55['query'][_0xd945('0x29')]);}_0x327a3d[_0xd945('0x49')]=qs[_0xd945('0x4a')](_0x5b8b55[_0xd945('0x43')][_0xd945('0x4a')]);_0x327a3d[_0xd945('0x4b')]=qs['filters'](_['pick'](_0x5b8b55['query'],_0x4bf72c[_0xd945('0x4c')]),_0x4d318d);if(_0x5b8b55['query']['filter']){_0x327a3d[_0xd945('0x4b')]=_[_0xd945('0x4d')](_0x327a3d[_0xd945('0x4b')],{'$or':_['map'](_0x4d318d,function(_0x1edde3){if(_0x1edde3[_0xd945('0x3f')]!==_0xd945('0x4e')){var _0x591967={};_0x591967[_0x1edde3[_0xd945('0x38')]]={'$like':'%'+_0x5b8b55[_0xd945('0x43')]['filter']+'%'};return _0x591967;}})});}_0x327a3d=_[_0xd945('0x4d')]({},_0x327a3d,_0x5b8b55[_0xd945('0x4f')]);var _0xa794b1={'where':_0x327a3d[_0xd945('0x4b')]};return db[_0xd945('0x3d')][_0xd945('0x2b')](_0xa794b1)[_0xd945('0x32')](function(_0x2f8a4c){_0x3c8efe[_0xd945('0x2b')]=_0x2f8a4c;if(_0x5b8b55[_0xd945('0x43')][_0xd945('0x50')]){_0x327a3d[_0xd945('0x51')]=[{'all':!![]}];}return db[_0xd945('0x3d')][_0xd945('0x52')](_0x327a3d);})[_0xd945('0x32')](function(_0xa40220){_0x3c8efe['rows']=_0xa40220;return _0x3c8efe;})[_0xd945('0x32')](respondWithFilteredResult(_0x539688,_0x327a3d))[_0xd945('0x25')](handleError(_0x539688,null));};exports[_0xd945('0x53')]=function(_0x5d7655,_0x350d5c){var _0x5a4dbe={'raw':![],'where':{'id':_0x5d7655[_0xd945('0x54')]['id']},'include':[{'model':db['Pause'],'as':'mandatoryDispositionPause'}]},_0x13b9ea={};_0x13b9ea[_0xd945('0x41')]=_[_0xd945('0x42')](db[_0xd945('0x3d')][_0xd945('0x3e')]);_0x13b9ea[_0xd945('0x43')]=_[_0xd945('0x42')](_0x5d7655['query']);_0x13b9ea[_0xd945('0x4c')]=_[_0xd945('0x44')](_0x13b9ea['model'],_0x13b9ea['query']);_0x5a4dbe[_0xd945('0x45')]=_[_0xd945('0x44')](_0x13b9ea[_0xd945('0x41')],qs[_0xd945('0x46')](_0x5d7655[_0xd945('0x43')][_0xd945('0x46')]));_0x5a4dbe[_0xd945('0x45')]=_0x5a4dbe[_0xd945('0x45')][_0xd945('0x55')]?_0x5a4dbe[_0xd945('0x45')]:_0x13b9ea[_0xd945('0x41')];if(_0x5d7655[_0xd945('0x43')][_0xd945('0x50')]){_0x5a4dbe[_0xd945('0x51')]=[{'all':!![]}];}_0x5a4dbe=_[_0xd945('0x4d')]({},_0x5a4dbe,_0x5d7655[_0xd945('0x4f')]);return db[_0xd945('0x3d')]['find'](_0x5a4dbe)['then'](handleEntityNotFound(_0x350d5c,null))[_0xd945('0x32')](respondWithResult(_0x350d5c,null))['catch'](handleError(_0x350d5c,null));};exports[_0xd945('0x56')]=function(_0x13242a,_0x3460b8){return db[_0xd945('0x3d')][_0xd945('0x56')](_0x13242a[_0xd945('0x57')],{})[_0xd945('0x32')](function(_0x13e6ce){var _0x8e84fb=_0x13242a['user'][_0xd945('0x34')]({'plain':!![]});if(!_0x8e84fb)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x8e84fb[_0xd945('0x58')]===_0xd945('0x59')){var _0x43fa16=_0x13e6ce[_0xd945('0x34')]({'plain':!![]});var _0x23f1a9=_0xd945('0x5a');return db['UserProfileSection'][_0xd945('0x5b')]({'where':{'name':_0x23f1a9,'userProfileId':_0x8e84fb[_0xd945('0x5c')]},'raw':!![]})[_0xd945('0x32')](function(_0x2955f3){if(_0x2955f3&&_0x2955f3[_0xd945('0x5d')]===0x0){return db[_0xd945('0x35')][_0xd945('0x56')]({'name':_0x43fa16['name'],'resourceId':_0x43fa16['id'],'type':_0x2955f3['name'],'sectionId':_0x2955f3['id']},{})[_0xd945('0x32')](function(){return _0x13e6ce;});}else{return _0x13e6ce;}})[_0xd945('0x25')](function(_0x558b9e){logger[_0xd945('0x21')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x558b9e);throw _0x558b9e;});}return _0x13e6ce;})[_0xd945('0x32')](respondWithResult(_0x3460b8,0xc9))[_0xd945('0x25')](handleError(_0x3460b8,null));};exports[_0xd945('0x31')]=function(_0x55e6f5,_0x5d3500){if(_0x55e6f5['body']['id']){delete _0x55e6f5['body']['id'];}return db[_0xd945('0x3d')][_0xd945('0x5b')]({'where':{'id':_0x55e6f5['params']['id']},'include':[{'model':db[_0xd945('0x3b')],'as':_0xd945('0x5e')}]})['then'](handleEntityNotFound(_0x5d3500,null))[_0xd945('0x32')](saveUpdates(_0x55e6f5[_0xd945('0x57')],null))['then'](respondWithResult(_0x5d3500,null))[_0xd945('0x25')](handleError(_0x5d3500,null));};exports[_0xd945('0x33')]=function(_0x32a54a,_0x114cb9){return db['OpenchannelAccount'][_0xd945('0x5b')]({'where':{'id':_0x32a54a[_0xd945('0x54')]['id']}})[_0xd945('0x32')](handleEntityNotFound(_0x114cb9,null))[_0xd945('0x32')](removeEntity(_0x114cb9,null))[_0xd945('0x25')](handleError(_0x114cb9,null));};exports['describe']=function(_0x577edc,_0x1506a1){return db[_0xd945('0x3d')][_0xd945('0x5f')]()['then'](respondWithResult(_0x1506a1,null))[_0xd945('0x25')](handleError(_0x1506a1,null));};exports[_0xd945('0x60')]=function(_0x4b6fb2,_0x306ac3,_0x45185e){if(_0x4b6fb2[_0xd945('0x57')]['id']){delete _0x4b6fb2['body']['id'];}return db['OpenchannelAccount']['find']({'where':{'id':_0x4b6fb2[_0xd945('0x54')]['id']}})[_0xd945('0x32')](handleEntityNotFound(_0x306ac3,null))['then'](function(_0x57831a){if(_0x57831a){_0x4b6fb2['body'][_0xd945('0x61')]=_0x57831a['id'];return db[_0xd945('0x62')][_0xd945('0x56')](_0x4b6fb2[_0xd945('0x57')]);}})[_0xd945('0x32')](respondWithResult(_0x306ac3,null))[_0xd945('0x25')](handleError(_0x306ac3,null));};exports['getDispositions']=function(_0x5aa12c,_0x3c6556,_0x499c3a){var _0x15991c={'raw':![],'where':{}};var _0x2b6ba5={};var _0x3f0ef2={'count':0x0,'rows':[]};return db[_0xd945('0x3d')][_0xd945('0x63')]({'where':{'id':_0x5aa12c[_0xd945('0x54')]['id']}})[_0xd945('0x32')](handleEntityNotFound(_0x3c6556,null))[_0xd945('0x32')](function(_0x4bea68){if(_0x4bea68){_0x2b6ba5[_0xd945('0x41')]=_[_0xd945('0x42')](db[_0xd945('0x62')][_0xd945('0x3e')]);_0x2b6ba5[_0xd945('0x43')]=_[_0xd945('0x42')](_0x5aa12c['query']);_0x2b6ba5['filters']=_[_0xd945('0x44')](_0x2b6ba5[_0xd945('0x41')],_0x2b6ba5[_0xd945('0x43')]);_0x15991c[_0xd945('0x45')]=_['intersection'](_0x2b6ba5[_0xd945('0x41')],qs[_0xd945('0x46')](_0x5aa12c[_0xd945('0x43')][_0xd945('0x46')]));_0x15991c[_0xd945('0x45')]=_0x15991c[_0xd945('0x45')][_0xd945('0x55')]?_0x15991c[_0xd945('0x45')]:_0x2b6ba5[_0xd945('0x41')];if(!_0x5aa12c[_0xd945('0x43')][_0xd945('0x47')](_0xd945('0x48'))){_0x15991c['limit']=qs[_0xd945('0x2c')](_0x5aa12c[_0xd945('0x43')][_0xd945('0x2c')]);_0x15991c[_0xd945('0x29')]=qs['offset'](_0x5aa12c[_0xd945('0x43')][_0xd945('0x29')]);}_0x15991c[_0xd945('0x49')]=qs[_0xd945('0x4a')](_0x5aa12c[_0xd945('0x43')]['sort']);_0x15991c[_0xd945('0x4b')]=qs[_0xd945('0x4c')](_[_0xd945('0x64')](_0x5aa12c[_0xd945('0x43')],_0x2b6ba5[_0xd945('0x4c')]));_0x15991c['where'][_0xd945('0x61')]=_0x4bea68['id'];if(_0x5aa12c[_0xd945('0x43')][_0xd945('0x65')]){_0x15991c[_0xd945('0x4b')]=_[_0xd945('0x4d')](_0x15991c[_0xd945('0x4b')],{'$or':_[_0xd945('0x3c')](_0x15991c['attributes'],function(_0x303308){var _0x5648eb={};_0x5648eb[_0x303308]={'$like':'%'+_0x5aa12c['query'][_0xd945('0x65')]+'%'};return _0x5648eb;})});}_0x15991c=_['merge']({},_0x15991c,_0x5aa12c[_0xd945('0x4f')]);return db['Disposition'][_0xd945('0x2b')]({'where':_0x15991c[_0xd945('0x4b')]})[_0xd945('0x32')](function(_0x4fc92b){_0x3f0ef2[_0xd945('0x2b')]=_0x4fc92b;if(_0x5aa12c[_0xd945('0x43')]['includeAll']){_0x15991c[_0xd945('0x51')]=[{'all':!![]}];}return db['Disposition']['findAll'](_0x15991c);})[_0xd945('0x32')](function(_0x42ed2c){_0x3f0ef2[_0xd945('0x66')]=_0x42ed2c;return _0x3f0ef2;});}})[_0xd945('0x32')](respondWithFilteredResult(_0x3c6556,_0x15991c))[_0xd945('0x25')](handleError(_0x3c6556,null));};exports[_0xd945('0x67')]=function(_0x36e95b,_0x5b050e,_0x620b59){return db['OpenchannelAccount']['find']({'where':{'id':_0x36e95b['params']['id']}})['then'](handleEntityNotFound(_0x5b050e,null))['then'](function(_0x373805){if(_0x373805){return _0x373805[_0xd945('0x67')](_0x36e95b[_0xd945('0x43')][_0xd945('0x68')]);}})[_0xd945('0x32')](respondWithStatusCode(_0x5b050e,null))[_0xd945('0x25')](handleError(_0x5b050e,null));};exports['addAnswer']=function(_0x4863fd,_0x56a005,_0x14dd0b){if(_0x4863fd[_0xd945('0x57')]['id']){delete _0x4863fd[_0xd945('0x57')]['id'];}return db[_0xd945('0x3d')][_0xd945('0x5b')]({'where':{'id':_0x4863fd[_0xd945('0x54')]['id']}})[_0xd945('0x32')](handleEntityNotFound(_0x56a005,null))[_0xd945('0x32')](function(_0x140cea){if(_0x140cea){_0x4863fd[_0xd945('0x57')]['OpenchannelAccountId']=_0x140cea['id'];return db[_0xd945('0x69')][_0xd945('0x56')](_0x4863fd[_0xd945('0x57')]);}})[_0xd945('0x32')](respondWithResult(_0x56a005,null))['catch'](handleError(_0x56a005,null));};exports[_0xd945('0x6a')]=function(_0x5b4095,_0x57f3c4,_0x40a96b){var _0x513312={'raw':![],'where':{}};var _0x47b2d4={};var _0xd9c662={'count':0x0,'rows':[]};return db[_0xd945('0x3d')][_0xd945('0x63')]({'where':{'id':_0x5b4095[_0xd945('0x54')]['id']}})[_0xd945('0x32')](handleEntityNotFound(_0x57f3c4,null))[_0xd945('0x32')](function(_0x83e935){if(_0x83e935){_0x47b2d4[_0xd945('0x41')]=_[_0xd945('0x42')](db[_0xd945('0x69')][_0xd945('0x3e')]);_0x47b2d4[_0xd945('0x43')]=_[_0xd945('0x42')](_0x5b4095[_0xd945('0x43')]);_0x47b2d4[_0xd945('0x4c')]=_['intersection'](_0x47b2d4[_0xd945('0x41')],_0x47b2d4[_0xd945('0x43')]);_0x513312[_0xd945('0x45')]=_['intersection'](_0x47b2d4[_0xd945('0x41')],qs[_0xd945('0x46')](_0x5b4095['query'][_0xd945('0x46')]));_0x513312[_0xd945('0x45')]=_0x513312[_0xd945('0x45')][_0xd945('0x55')]?_0x513312[_0xd945('0x45')]:_0x47b2d4[_0xd945('0x41')];if(!_0x5b4095[_0xd945('0x43')][_0xd945('0x47')](_0xd945('0x48'))){_0x513312[_0xd945('0x2c')]=qs[_0xd945('0x2c')](_0x5b4095[_0xd945('0x43')][_0xd945('0x2c')]);_0x513312[_0xd945('0x29')]=qs[_0xd945('0x29')](_0x5b4095['query'][_0xd945('0x29')]);}_0x513312['order']=qs['sort'](_0x5b4095['query'][_0xd945('0x4a')]);_0x513312[_0xd945('0x4b')]=qs[_0xd945('0x4c')](_[_0xd945('0x64')](_0x5b4095[_0xd945('0x43')],_0x47b2d4['filters']));_0x513312['where'][_0xd945('0x61')]=_0x83e935['id'];if(_0x5b4095[_0xd945('0x43')]['filter']){_0x513312[_0xd945('0x4b')]=_['merge'](_0x513312[_0xd945('0x4b')],{'$or':_[_0xd945('0x3c')](_0x513312[_0xd945('0x45')],function(_0x39e44b){var _0x5aba5a={};_0x5aba5a[_0x39e44b]={'$like':'%'+_0x5b4095['query']['filter']+'%'};return _0x5aba5a;})});}_0x513312=_[_0xd945('0x4d')]({},_0x513312,_0x5b4095['options']);return db['CannedAnswer'][_0xd945('0x2b')]({'where':_0x513312['where']})[_0xd945('0x32')](function(_0x3522db){_0xd9c662[_0xd945('0x2b')]=_0x3522db;if(_0x5b4095['query'][_0xd945('0x50')]){_0x513312[_0xd945('0x51')]=[{'all':!![]}];}return db['CannedAnswer'][_0xd945('0x52')](_0x513312);})[_0xd945('0x32')](function(_0x22b44b){_0xd9c662['rows']=_0x22b44b;return _0xd9c662;});}})[_0xd945('0x32')](respondWithFilteredResult(_0x57f3c4,_0x513312))[_0xd945('0x25')](handleError(_0x57f3c4,null));};exports[_0xd945('0x6b')]=function(_0x36edb9,_0x52a88c,_0x10102d){return db[_0xd945('0x3d')]['find']({'where':{'id':_0x36edb9[_0xd945('0x54')]['id']}})['then'](handleEntityNotFound(_0x52a88c,null))['then'](function(_0x5d0725){if(_0x5d0725){return _0x5d0725[_0xd945('0x6b')](_0x36edb9['query'][_0xd945('0x68')]);}})['then'](respondWithStatusCode(_0x52a88c,null))[_0xd945('0x25')](handleError(_0x52a88c,null));};exports[_0xd945('0x6c')]=function(_0x122e9e,_0xf25031,_0x31d678){var _0x5ddfc4={'body':_0x122e9e[_0xd945('0x57')],'channel':_0xd945('0x6d')};var _0x12847f=[];var _0xa9744b=[];var _0x2dce4f={};var _0x3b4bc2=![];return db[_0xd945('0x6e')][_0xd945('0x5f')]()[_0xd945('0x32')](function(_0x243496){if(!_0x243496){throw new db['Sequelize'][(_0xd945('0x6f'))](_0xd945('0x70'));}_0x12847f=_[_0xd945('0x71')](_[_0xd945('0x42')](_0x243496),[_0xd945('0x72'),_0xd945('0x73')]);_0xa9744b=_[_0xd945('0x71')](_[_0xd945('0x42')](_0x243496),[_0xd945('0x72'),_0xd945('0x73'),_0xd945('0x74'),'ListId']);if(_0x122e9e[_0xd945('0x57')]['id']){delete _0x122e9e[_0xd945('0x57')]['id'];}if(_[_0xd945('0x75')](_0x122e9e[_0xd945('0x57')][_0xd945('0x76')])){throw new db[(_0xd945('0x77'))][(_0xd945('0x6f'))](_0xd945('0x78'));}if(_['isNil'](_0x122e9e[_0xd945('0x57')]['body'])||_0x122e9e['body'][_0xd945('0x57')]===''){throw new db['Sequelize'][(_0xd945('0x6f'))]('body\x20is\x20mandatory\x20and\x20not\x20empty');}if(_[_0xd945('0x75')](_0x122e9e[_0xd945('0x57')]['mapKey'])){throw new db['Sequelize'][(_0xd945('0x6f'))](_0xd945('0x79')+_0xa9744b);}if(!_[_0xd945('0x7a')](_0xa9744b,_0x122e9e['body'][_0xd945('0x7b')])){throw new db[(_0xd945('0x77'))][(_0xd945('0x6f'))](_0xd945('0x7c')+_0xa9744b);}_0x2dce4f[_0x122e9e[_0xd945('0x57')][_0xd945('0x7b')]]=_0x122e9e[_0xd945('0x57')][_0xd945('0x76')];})[_0xd945('0x32')](function(){return db[_0xd945('0x3d')][_0xd945('0x5b')]({'where':{'id':_0x122e9e[_0xd945('0x54')]['id']},'include':[{'model':db[_0xd945('0x7d')],'as':'List','include':[{'model':db['CmContact'],'as':'Contacts','where':_0x2dce4f,'limit':0x1,'order':[['updatedAt',_0xd945('0x7e')]]}]},{'model':db['OpenchannelApplication'],'as':_0xd945('0x7f')}]});})[_0xd945('0x32')](handleEntityNotFound(_0xf25031,null))['then'](function(_0x3a588a){if(_0x3a588a&&_0x3a588a[_0xd945('0x80')]){_0x5ddfc4[_0xd945('0x81')]=_0x3a588a;_0x5ddfc4['applications']=_0x3a588a[_0xd945('0x7f')];_0x5ddfc4['list']=_0x3a588a['List'];_0x5ddfc4['applications']=_[_0xd945('0x82')](_0x5ddfc4[_0xd945('0x83')],['priority'],[_0xd945('0x84')]);if(_0x5ddfc4[_0xd945('0x81')][_0xd945('0x7f')]){delete _0x5ddfc4[_0xd945('0x81')][_0xd945('0x7f')];}if(_0x5ddfc4[_0xd945('0x81')][_0xd945('0x80')]&&_0x5ddfc4['account'][_0xd945('0x80')][_0xd945('0x85')][_0xd945('0x55')]){return _0x5ddfc4[_0xd945('0x81')][_0xd945('0x80')]['Contacts'][0x0];}var _0x67cc49=_[_0xd945('0x17')](_0x122e9e[_0xd945('0x57')],{'firstName':_0x122e9e[_0xd945('0x57')][_0xd945('0x76')],'ListId':_0x3a588a['ListId']});_0x67cc49[_0x122e9e['body'][_0xd945('0x7b')]]=_0x122e9e[_0xd945('0x57')][_0xd945('0x76')];return db[_0xd945('0x6e')][_0xd945('0x56')](_0x67cc49,{'fields':_0x12847f,'raw':!![]});}})[_0xd945('0x32')](handleEntityNotFound(_0xf25031,null))['then'](function(_0x3d7a3f){_0x5ddfc4[_0xd945('0x86')]=_0x3d7a3f;if(_0x3d7a3f){var _0xdd2404={'ContactId':_0x3d7a3f['id'],'OpenchannelAccountId':_0x122e9e[_0xd945('0x54')]['id'],'from':(_0x3d7a3f[_0xd945('0x87')]||'')+'\x20'+(_0x3d7a3f['lastName']||'')};var _0x13f12e={'OpenchannelAccountId':_0x122e9e['params']['id'],'closed':![]};if(_0x122e9e['body'][_0xd945('0x88')]){_0x13f12e[_0xd945('0x88')]=_0x122e9e[_0xd945('0x57')][_0xd945('0x88')];return db[_0xd945('0x89')][_0xd945('0x5b')]({'where':_0x13f12e})[_0xd945('0x32')](function(_0x1fae56){if(_0x1fae56){return[_0x1fae56,![]];}_0xdd2404['threadId']=_0x122e9e[_0xd945('0x57')][_0xd945('0x88')];_0xdd2404[_0xd945('0x8a')]=_0x122e9e[_0xd945('0x57')][_0xd945('0x8a')];return db[_0xd945('0x89')][_0xd945('0x56')](_0xdd2404)[_0xd945('0x32')](function(_0x4617f9){return[_0x4617f9,!![]];});});}else{_0x13f12e[_0xd945('0x88')]=null;}_0x13f12e[_0xd945('0x8b')]=_0x3d7a3f['id'];return db[_0xd945('0x89')][_0xd945('0x5b')]({'where':_0x13f12e})[_0xd945('0x32')](function(_0x337d96){if(_0x337d96){return[_0x337d96,![]];}return db[_0xd945('0x89')][_0xd945('0x56')](_0xdd2404)[_0xd945('0x32')](function(_0x3495df){return[_0x3495df,!![]];});});}})['spread'](function(_0x1ef1c0,_0x2c1d60){if(_0x1ef1c0){_0x3b4bc2=_0x2c1d60;if(!_0x2c1d60){var _0x21f46e={'from':(_0x5ddfc4['contact'][_0xd945('0x87')]||'')+'\x20'+(_0x5ddfc4[_0xd945('0x86')][_0xd945('0x8c')]||'')};if(_0x122e9e['body'][_0xd945('0x88')]&&_0x122e9e['body'][_0xd945('0x8d')]&&_0x122e9e[_0xd945('0x57')]['threadId']!=_0x122e9e[_0xd945('0x57')][_0xd945('0x8d')]){_0x21f46e[_0xd945('0x88')]=_0x122e9e['body']['messageId'];}return _0x1ef1c0[_0xd945('0x31')](_0x21f46e);}else{return _0x1ef1c0;}}})[_0xd945('0x32')](function(_0x24026e){_0x5ddfc4[_0xd945('0x8e')]=_0x24026e[_0xd945('0x34')]({'plain':!![]});_0x5ddfc4[_0xd945('0x8e')][_0xd945('0x8f')]=_0x3b4bc2;if(_0x5ddfc4[_0xd945('0x8e')][_0xd945('0x8f')]){if(_0x5ddfc4['account'][_0xd945('0x90')]){_0x5ddfc4[_0xd945('0x83')]['push']({'id':0x0,'priority':_0x5ddfc4[_0xd945('0x83')][_0xd945('0x55')]+0x1,'app':_0xd945('0x91'),'appdata':_0xd945('0x92'),'interval':_0xd945('0x93')});}}return db[_0xd945('0x94')][_0xd945('0x56')]({'body':_0x122e9e[_0xd945('0x57')][_0xd945('0x57')],'OpenchannelAccountId':_0x122e9e['params']['id'],'OpenchannelInteractionId':_0x24026e['id'],'direction':'in','ContactId':_0x5ddfc4[_0xd945('0x86')]['id'],'AttachmentId':_0x122e9e[_0xd945('0x57')][_0xd945('0x95')]});})['then'](function(_0x32054d){_0x5ddfc4[_0xd945('0x23')]=_0x32054d;if(_0x5ddfc4[_0xd945('0x8e')][_0xd945('0x96')]){return db['User']['find']({'attributes':['id',_0xd945('0x38')],'where':{'id':_0x5ddfc4[_0xd945('0x8e')][_0xd945('0x96')]}})['then'](function(_0x4367a6){if(_0x4367a6){_0x5ddfc4[_0xd945('0x83')]['unshift']({'id':0x0,'priority':0x0,'app':'agent','appdata':_0x4367a6[_0xd945('0x38')]+','+(_0x5ddfc4[_0xd945('0x81')][_0xd945('0x97')]||0xa),'interval':_0xd945('0x93')});_0x5ddfc4[_0xd945('0x98')]=![];}return respondWithRpcPromise(_0xd945('0x99'),_0xd945('0x9a'),_0x5ddfc4);});}return respondWithRpcPromise(_0xd945('0x99'),_0xd945('0x9a'),_0x5ddfc4);})['then'](function(_0x4d0036){respondWithRpcPromise('EventManager',_0xd945('0x9b'),{'event':_0xd945('0x6c'),'message':_0x4d0036},client9002);return _0x4d0036;})[_0xd945('0x32')](respondWithResult(_0xf25031,null))[_0xd945('0x25')](handleError(_0xf25031,null));};exports['addApplications']=function(_0x2c137b,_0x138b8c,_0x5de0b5){return db[_0xd945('0x3d')]['findOne']({'where':{'id':_0x2c137b[_0xd945('0x54')]['id']}})[_0xd945('0x32')](handleEntityNotFound(_0x138b8c,null))[_0xd945('0x32')](function(_0x560c30){if(_0x560c30){return db['sequelize'][_0xd945('0x9c')](function(_0x2b51ba){return db['OpenchannelApplication'][_0xd945('0x33')]({'where':{'OpenchannelAccountId':_0x2c137b[_0xd945('0x54')]['id']},'transaction':_0x2b51ba})[_0xd945('0x32')](function(_0x539243){var _0x41f61d=_[_0xd945('0x3c')](_0x2c137b['body'],function(_0x30831c){_0x30831c[_0xd945('0x61')]=_0x2c137b[_0xd945('0x54')]['id'];return _0x30831c;});return db[_0xd945('0x9d')][_0xd945('0x9e')](_0x41f61d,{'transaction':_0x2b51ba});});})['then'](function(){return db[_0xd945('0x9d')]['findAndCountAll']({'where':{'OpenchannelAccountId':_0x2c137b[_0xd945('0x54')]['id']},'order':_0xd945('0x9f')});});}})[_0xd945('0x32')](respondWithResult(_0x138b8c,null))[_0xd945('0x25')](handleError(_0x138b8c,null));};exports[_0xd945('0xa0')]=function(_0x35d83b,_0x36634a,_0x3799d4){var _0x17973b={};var _0x421f6a={};var _0x2ae299;var _0x106903;return db['OpenchannelAccount'][_0xd945('0x63')]({'where':{'id':_0x35d83b['params']['id']}})[_0xd945('0x32')](handleEntityNotFound(_0x36634a,null))[_0xd945('0x32')](function(_0x33b133){if(_0x33b133){_0x2ae299=_0x33b133;_0x421f6a[_0xd945('0x41')]=_[_0xd945('0x42')](db[_0xd945('0x9d')][_0xd945('0x3e')]);_0x421f6a[_0xd945('0x43')]=_[_0xd945('0x42')](_0x35d83b['query']);_0x421f6a[_0xd945('0x4c')]=_[_0xd945('0x44')](_0x421f6a[_0xd945('0x41')],_0x421f6a[_0xd945('0x43')]);_0x17973b['attributes']=_[_0xd945('0x44')](_0x421f6a['model'],qs[_0xd945('0x46')](_0x35d83b[_0xd945('0x43')][_0xd945('0x46')]));_0x17973b['attributes']=_0x17973b['attributes'][_0xd945('0x55')]?_0x17973b[_0xd945('0x45')]:_0x421f6a[_0xd945('0x41')];_0x17973b[_0xd945('0x49')]=qs['sort'](_0x35d83b[_0xd945('0x43')][_0xd945('0x4a')]);_0x17973b[_0xd945('0x4b')]=qs['filters'](_[_0xd945('0x64')](_0x35d83b['query'],_0x421f6a[_0xd945('0x4c')]));if(_0x35d83b[_0xd945('0x43')][_0xd945('0x65')]){_0x17973b['where']=_['merge'](_0x17973b['where'],{'$or':_[_0xd945('0x3c')](_0x17973b[_0xd945('0x45')],function(_0x4b676c){var _0x31ea4c={};_0x31ea4c[_0x4b676c]={'$like':'%'+_0x35d83b[_0xd945('0x43')][_0xd945('0x65')]+'%'};return _0x31ea4c;})});}_0x17973b=_[_0xd945('0x4d')]({},_0x17973b,_0x35d83b[_0xd945('0x4f')]);return _0x2ae299[_0xd945('0xa0')](_0x17973b);}})[_0xd945('0x32')](function(_0x1aee44){if(_0x1aee44){_0x106903=_0x1aee44[_0xd945('0x55')];if(!_0x35d83b[_0xd945('0x43')][_0xd945('0x47')](_0xd945('0x48'))){_0x17973b[_0xd945('0x2c')]=qs[_0xd945('0x2c')](_0x35d83b[_0xd945('0x43')][_0xd945('0x2c')]);_0x17973b[_0xd945('0x29')]=qs[_0xd945('0x29')](_0x35d83b['query']['offset']);}return _0x2ae299[_0xd945('0xa0')](_0x17973b);}})[_0xd945('0x32')](function(_0x16d6b4){if(_0x16d6b4){return _0x16d6b4?{'count':_0x106903,'rows':_0x16d6b4}:null;}})[_0xd945('0x32')](respondWithResult(_0x36634a,null))[_0xd945('0x25')](handleError(_0x36634a,null));};exports['getInteractions']=function(_0x4de78d,_0x8fe7ac,_0xe8c647){var _0xff7f49={'raw':![],'where':{}};var _0x45f099={};var _0x2e1d87={'count':0x0,'rows':[]};return db['OpenchannelAccount'][_0xd945('0x63')]({'where':{'id':_0x4de78d['params']['id']}})[_0xd945('0x32')](handleEntityNotFound(_0x8fe7ac,null))[_0xd945('0x32')](function(_0x598c21){if(_0x598c21){_0x45f099[_0xd945('0x41')]=_[_0xd945('0x42')](db['OpenchannelInteraction'][_0xd945('0x3e')]);_0x45f099[_0xd945('0x43')]=_[_0xd945('0x42')](_0x4de78d[_0xd945('0x43')]);_0x45f099[_0xd945('0x4c')]=_[_0xd945('0x44')](_0x45f099[_0xd945('0x41')],_0x45f099['query']);_0xff7f49[_0xd945('0x45')]=_[_0xd945('0x44')](_0x45f099['model'],qs[_0xd945('0x46')](_0x4de78d[_0xd945('0x43')]['fields']));_0xff7f49[_0xd945('0x45')]=_0xff7f49[_0xd945('0x45')][_0xd945('0x55')]?_0xff7f49[_0xd945('0x45')]:_0x45f099[_0xd945('0x41')];if(!_0x4de78d[_0xd945('0x43')]['hasOwnProperty'](_0xd945('0x48'))){_0xff7f49['limit']=qs[_0xd945('0x2c')](_0x4de78d[_0xd945('0x43')][_0xd945('0x2c')]);_0xff7f49[_0xd945('0x29')]=qs[_0xd945('0x29')](_0x4de78d[_0xd945('0x43')][_0xd945('0x29')]);}_0xff7f49[_0xd945('0x49')]=qs[_0xd945('0x4a')](_0x4de78d[_0xd945('0x43')][_0xd945('0x4a')]);_0xff7f49[_0xd945('0x4b')]=qs[_0xd945('0x4c')](_[_0xd945('0x64')](_0x4de78d[_0xd945('0x43')],_0x45f099['filters']));_0xff7f49[_0xd945('0x4b')][_0xd945('0x61')]=_0x598c21['id'];if(_0x4de78d[_0xd945('0x43')][_0xd945('0x65')]){_0xff7f49[_0xd945('0x4b')]=_[_0xd945('0x4d')](_0xff7f49[_0xd945('0x4b')],{'$or':_[_0xd945('0x3c')](_0xff7f49[_0xd945('0x45')],function(_0x50c3b9){var _0x284990={};_0x284990[_0x50c3b9]={'$like':'%'+_0x4de78d[_0xd945('0x43')][_0xd945('0x65')]+'%'};return _0x284990;})});}_0xff7f49=_['merge']({},_0xff7f49,_0x4de78d[_0xd945('0x4f')]);return db[_0xd945('0x89')][_0xd945('0x2b')]({'where':_0xff7f49[_0xd945('0x4b')]})['then'](function(_0xd97943){_0x2e1d87[_0xd945('0x2b')]=_0xd97943;if(_0x4de78d['query'][_0xd945('0x50')]){_0xff7f49[_0xd945('0x51')]=[{'model':db['CmContact'],'as':_0xd945('0xa1'),'required':![]},{'model':db[_0xd945('0xa2')],'as':'Owner','attributes':['name',_0xd945('0xa3'),_0xd945('0xa4')],'required':![]},{'model':db[_0xd945('0xa5')],'as':_0xd945('0xa6'),'attributes':['id',_0xd945('0x38'),_0xd945('0xa7')],'where':_0x4de78d['query'][_0xd945('0xa8')]?{'id':_0x4de78d[_0xd945('0x43')]['tag']}:undefined,'required':_0x4de78d['query']['tag']?!![]:![]}];}return db[_0xd945('0x89')][_0xd945('0x52')](_0xff7f49);})['then'](function(_0x57e4f1){_0x2e1d87[_0xd945('0x66')]=_0x57e4f1;return _0x2e1d87;});}})[_0xd945('0x32')](respondWithFilteredResult(_0x8fe7ac,_0xff7f49))[_0xd945('0x25')](handleError(_0x8fe7ac,null));};exports['addAgents']=function(_0x3b18c6,_0x7d3feb,_0x9699d1){return db[_0xd945('0x3d')]['find']({'where':{'id':_0x3b18c6['params']['id']}})[_0xd945('0x32')](handleEntityNotFound(_0x7d3feb,null))[_0xd945('0x32')](function(_0x5d80df){if(_0x5d80df){return _0x5d80df[_0xd945('0xa9')](_0x3b18c6[_0xd945('0x57')][_0xd945('0x68')],_[_0xd945('0xaa')](_0x3b18c6['body'],[_0xd945('0x68'),'id'])||{})[_0xd945('0xab')](function(_0x8b15dd){for(var _0x5f2ac9=0x0;_0x5f2ac9<_0x3b18c6['body']['ids']['length'];_0x5f2ac9+=0x1){socket['emit'](_0xd945('0xac'),{'UserId':_0x3b18c6['body']['ids'][_0x5f2ac9],'OpenchannelAccountId':_0x3b18c6[_0xd945('0x54')]['id']});}return _0x8b15dd;});}})[_0xd945('0x32')](respondWithResult(_0x7d3feb,null))[_0xd945('0x25')](handleError(_0x7d3feb,null));};exports['removeAgents']=function(_0x55ace2,_0x38e380,_0x108009){return db[_0xd945('0x3d')][_0xd945('0x5b')]({'where':{'id':_0x55ace2[_0xd945('0x54')]['id']}})['then'](handleEntityNotFound(_0x38e380,null))[_0xd945('0x32')](function(_0x3de540){if(_0x3de540){return _0x3de540['removeAgents'](_0x55ace2[_0xd945('0x43')][_0xd945('0x68')])[_0xd945('0x32')](function(){if(_[_0xd945('0xad')](_0x55ace2[_0xd945('0x43')][_0xd945('0x68')])){for(var _0x1f673e=0x0;_0x1f673e<_0x55ace2['query'][_0xd945('0x68')][_0xd945('0x55')];_0x1f673e+=0x1){socket[_0xd945('0xae')](_0xd945('0xaf'),{'UserId':Number(_0x55ace2[_0xd945('0x43')]['ids'][_0x1f673e]),'OpenchannelAccountId':Number(_0x55ace2[_0xd945('0x54')]['id'])});}}else{socket['emit'](_0xd945('0xaf'),{'UserId':Number(_0x55ace2['query']['ids']),'OpenchannelAccountId':Number(_0x55ace2[_0xd945('0x54')]['id'])});}});}})[_0xd945('0x32')](respondWithStatusCode(_0x38e380,null))['catch'](handleError(_0x38e380,null));};exports[_0xd945('0xb0')]=function(_0x5bfa66,_0x30fac3,_0x3b7d96){var _0x56d37b={};var _0x1a8122={};var _0x722885;var _0xdc3b8d;return db['OpenchannelAccount'][_0xd945('0x63')]({'where':{'id':_0x5bfa66[_0xd945('0x54')]['id']}})[_0xd945('0x32')](handleEntityNotFound(_0x30fac3,null))['then'](function(_0x538ca5){if(_0x538ca5){_0x722885=_0x538ca5;_0x1a8122[_0xd945('0x41')]=_['keys'](db['User'][_0xd945('0x3e')]);_0x1a8122[_0xd945('0x43')]=_[_0xd945('0x42')](_0x5bfa66[_0xd945('0x43')]);_0x1a8122[_0xd945('0x4c')]=_[_0xd945('0x44')](_0x1a8122[_0xd945('0x41')],_0x1a8122[_0xd945('0x43')]);_0x56d37b[_0xd945('0x45')]=_['intersection'](_0x1a8122['model'],qs[_0xd945('0x46')](_0x5bfa66[_0xd945('0x43')][_0xd945('0x46')]));_0x56d37b['attributes']=_0x56d37b['attributes'][_0xd945('0x55')]?_0x56d37b[_0xd945('0x45')]:_0x1a8122['model'];_0x56d37b[_0xd945('0x49')]=qs['sort'](_0x5bfa66[_0xd945('0x43')][_0xd945('0x4a')]);_0x56d37b['where']=qs['filters'](_[_0xd945('0x64')](_0x5bfa66[_0xd945('0x43')],_0x1a8122[_0xd945('0x4c')]));if(_0x5bfa66[_0xd945('0x43')][_0xd945('0x65')]){_0x56d37b[_0xd945('0x4b')]=_[_0xd945('0x4d')](_0x56d37b[_0xd945('0x4b')],{'$or':_['map'](_0x56d37b[_0xd945('0x45')],function(_0x4bc235){var _0x5084c7={};_0x5084c7[_0x4bc235]={'$like':'%'+_0x5bfa66[_0xd945('0x43')][_0xd945('0x65')]+'%'};return _0x5084c7;})});}_0x56d37b=_[_0xd945('0x4d')]({},_0x56d37b,_0x5bfa66[_0xd945('0x4f')]);return _0x722885['getAgents'](_0x56d37b);}})[_0xd945('0x32')](function(_0x1dc610){if(_0x1dc610){_0xdc3b8d=_0x1dc610[_0xd945('0x55')];if(!_0x5bfa66[_0xd945('0x43')][_0xd945('0x47')]('nolimit')){_0x56d37b[_0xd945('0x2c')]=qs[_0xd945('0x2c')](_0x5bfa66[_0xd945('0x43')]['limit']);_0x56d37b['offset']=qs[_0xd945('0x29')](_0x5bfa66[_0xd945('0x43')][_0xd945('0x29')]);}return _0x722885[_0xd945('0xb0')](_0x56d37b);}})[_0xd945('0x32')](function(_0x1bb7a0){if(_0x1bb7a0){return _0x1bb7a0?{'count':_0xdc3b8d,'rows':_0x1bb7a0}:null;}})[_0xd945('0x32')](respondWithResult(_0x30fac3,null))[_0xd945('0x25')](handleError(_0x30fac3,null));};exports[_0xd945('0x39')]=function(_0x1e9b73,_0x607fd8,_0xcd7b9d){var _0x41e3f8,_0x17d58f,_0x69429f;if(_[_0xd945('0x75')](_0x1e9b73[_0xd945('0x57')][_0xd945('0x57')])||_0x1e9b73[_0xd945('0x57')][_0xd945('0x57')]===''){throw new db[(_0xd945('0x77'))]['ValidationError'](_0xd945('0xb1'));}if(_[_0xd945('0x75')](_0x1e9b73[_0xd945('0x57')]['to'])){}_0x41e3f8=_0x1e9b73[_0xd945('0x57')]['to'];return db[_0xd945('0x3d')][_0xd945('0x63')]({'where':{'id':_0x1e9b73[_0xd945('0x54')]['id']}})[_0xd945('0x32')](handleEntityNotFound(_0x607fd8,null))[_0xd945('0x32')](function(_0x2683b4){if(_0x2683b4){return db[_0xd945('0x3d')][_0xd945('0x5b')]({'where':{'id':_0x2683b4['id']},'include':[{'model':db[_0xd945('0x7d')],'as':_0xd945('0x80'),'include':[{'model':db[_0xd945('0x6e')],'as':_0xd945('0x85'),'where':{[_0x2683b4[_0xd945('0x7b')]]:_0x41e3f8},'limit':0x1,'order':[[_0xd945('0x73'),_0xd945('0x7e')]]}]}]})[_0xd945('0x32')](handleEntityNotFound(_0x607fd8,null))['then'](function(_0x4afd82){if(_0x4afd82&&_0x4afd82[_0xd945('0x80')]){_0x17d58f=_0x4afd82['get']({'plain':!![]});if(_0x17d58f[_0xd945('0x80')]&&_0x17d58f[_0xd945('0x80')]['Contacts'][_0xd945('0x55')]){return _0x17d58f[_0xd945('0x80')]['Contacts'][0x0];}return db[_0xd945('0x6e')]['create'](_[_0xd945('0x17')](_0x1e9b73['body'],{'firstName':_0x41e3f8,[_0x4afd82[_0xd945('0x7b')]]:_0x41e3f8,'phone':_0x41e3f8,'ListId':_0x17d58f[_0xd945('0xb2')]}));}})['then'](handleEntityNotFound(_0x607fd8,null))[_0xd945('0x32')](function(_0x581a1f){if(_0x581a1f){_0x69429f=_0x581a1f;return db[_0xd945('0x89')][_0xd945('0x5b')]({'where':{'ContactId':_0x69429f['id'],'closed':![],'OpenchannelAccountId':_0x17d58f['id']}})[_0xd945('0x32')](function(_0x53e364){if(_0x53e364){return[_0x53e364,![]];}return db[_0xd945('0x89')][_0xd945('0x56')]({'UserId':_0x1e9b73[_0xd945('0x59')]['id'],'ContactId':_0x69429f['id'],'OpenchannelAccountId':_0x17d58f['id'],'lastMsgDirection':_0xd945('0xb3'),'Messages':[_[_0xd945('0x4d')](_0x1e9b73['body'],{'read':![],'body':_0x1e9b73[_0xd945('0x57')][_0xd945('0x57')],'OpenchannelAccountId':_0x17d58f['id'],'UserId':_0x1e9b73[_0xd945('0x59')]['id'],'ContactId':_0x69429f['id']})]},{'include':[{'model':db['OpenchannelMessage'],'as':_0xd945('0xb4')}]})[_0xd945('0x32')](function(_0x42c169){return[_0x42c169,!![]];});});}})[_0xd945('0xab')](function(_0x1ef321,_0xff4fee){if(_0xff4fee){return _0x1ef321;}return db[_0xd945('0x94')][_0xd945('0x56')](_[_0xd945('0x4d')](_0x1e9b73[_0xd945('0x57')],{'read':![],'body':_0x1e9b73[_0xd945('0x57')][_0xd945('0x57')],'OpenchannelAccountId':_0x17d58f['id'],'OpenchannelInteractionId':_0x1ef321['id'],'UserId':_0x1e9b73[_0xd945('0x59')]['id'],'ContactId':_0x69429f['id']}))['then'](function(_0x576076){_0x1ef321[_0xd945('0xb5')][_0xd945('0xb4')]=[];_0x1ef321['dataValues'][_0xd945('0xb4')][_0xd945('0xb6')](_0x576076['dataValues']);return _0x1ef321;});});}})[_0xd945('0x32')](respondWithResult(_0x607fd8,null))[_0xd945('0x25')](handleError(_0x607fd8,null));}; \ No newline at end of file diff --git a/server/api/openchannelAccount/openchannelAccount.events.js b/server/api/openchannelAccount/openchannelAccount.events.js index 206de3a..92ccaab 100644 --- a/server/api/openchannelAccount/openchannelAccount.events.js +++ b/server/api/openchannelAccount/openchannelAccount.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x54ef=['remove','hasOwnProperty','hook','exports','events','../../mysqldb','OpenchannelAccount','save','update'];(function(_0x1356a4,_0x4d80f3){var _0x52514a=function(_0x474aaf){while(--_0x474aaf){_0x1356a4['push'](_0x1356a4['shift']());}};_0x52514a(++_0x4d80f3);}(_0x54ef,0x112));var _0xf54e=function(_0x1bc040,_0x579dea){_0x1bc040=_0x1bc040-0x0;var _0x10ac34=_0x54ef[_0x1bc040];return _0x10ac34;};'use strict';var EventEmitter=require(_0xf54e('0x0'));var OpenchannelAccount=require(_0xf54e('0x1'))['db'][_0xf54e('0x2')];var OpenchannelAccountEvents=new EventEmitter();OpenchannelAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xf54e('0x3'),'afterUpdate':_0xf54e('0x4'),'afterDestroy':_0xf54e('0x5')};function emitEvent(_0x42b9b2){return function(_0x8b6bb6,_0x431e36,_0x12d43f){OpenchannelAccountEvents['emit'](_0x42b9b2+':'+_0x8b6bb6['id'],_0x8b6bb6);OpenchannelAccountEvents['emit'](_0x42b9b2,_0x8b6bb6);_0x12d43f(null);};}for(var e in events){if(events[_0xf54e('0x6')](e)){var event=events[e];OpenchannelAccount[_0xf54e('0x7')](e,emitEvent(event));}}module[_0xf54e('0x8')]=OpenchannelAccountEvents; \ No newline at end of file +var _0xb688=['../../mysqldb','OpenchannelAccount','setMaxListeners','save','update','remove','emit','hasOwnProperty','exports'];(function(_0x13c779,_0x5a82a8){var _0xcaa0e0=function(_0x37fef3){while(--_0x37fef3){_0x13c779['push'](_0x13c779['shift']());}};_0xcaa0e0(++_0x5a82a8);}(_0xb688,0xcf));var _0x8b68=function(_0x3ac527,_0xaf5872){_0x3ac527=_0x3ac527-0x0;var _0x28887b=_0xb688[_0x3ac527];return _0x28887b;};'use strict';var EventEmitter=require('events');var OpenchannelAccount=require(_0x8b68('0x0'))['db'][_0x8b68('0x1')];var OpenchannelAccountEvents=new EventEmitter();OpenchannelAccountEvents[_0x8b68('0x2')](0x0);var events={'afterCreate':_0x8b68('0x3'),'afterUpdate':_0x8b68('0x4'),'afterDestroy':_0x8b68('0x5')};function emitEvent(_0x4e281c){return function(_0x41030e,_0x27925d,_0x30f33d){OpenchannelAccountEvents[_0x8b68('0x6')](_0x4e281c+':'+_0x41030e['id'],_0x41030e);OpenchannelAccountEvents['emit'](_0x4e281c,_0x41030e);_0x30f33d(null);};}for(var e in events){if(events[_0x8b68('0x7')](e)){var event=events[e];OpenchannelAccount['hook'](e,emitEvent(event));}}module[_0x8b68('0x8')]=OpenchannelAccountEvents; \ No newline at end of file diff --git a/server/api/openchannelAccount/openchannelAccount.model.js b/server/api/openchannelAccount/openchannelAccount.model.js index c18ff12..92a3bf5 100644 --- a/server/api/openchannelAccount/openchannelAccount.model.js +++ b/server/api/openchannelAccount/openchannelAccount.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['../../config/environment','./openchannelAccount.attributes','exports','define','OpenchannelAccount','lodash','util','../../config/logger','bluebird','path','rimraf'];(function(_0x14490d,_0xcbc98f){var _0x4f9df1=function(_0x70fb6c){while(--_0x70fb6c){_0x14490d['push'](_0x14490d['shift']());}};_0x4f9df1(++_0xcbc98f);}(_0xa9e0,0x123));var _0x0a9e=function(_0x92c450,_0x41f1e3){_0x92c450=_0x92c450-0x0;var _0x2a9599=_0xa9e0[_0x92c450];return _0x2a9599;};'use strict';var _=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var logger=require(_0x0a9e('0x2'))('api');var moment=require('moment');var BPromise=require(_0x0a9e('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x0a9e('0x4'));var rimraf=require(_0x0a9e('0x5'));var config=require(_0x0a9e('0x6'));var attributes=require(_0x0a9e('0x7'));module[_0x0a9e('0x8')]=function(_0x57b080,_0x219af0){return _0x57b080[_0x0a9e('0x9')](_0x0a9e('0xa'),attributes,{'tableName':'openchannel_accounts','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xa9e0=['../../config/environment','./openchannelAccount.attributes','exports','define','OpenchannelAccount','lodash','util','../../config/logger','bluebird','path','rimraf'];(function(_0x569ab4,_0x126aee){var _0x5c9bcf=function(_0x4d0fb1){while(--_0x4d0fb1){_0x569ab4['push'](_0x569ab4['shift']());}};_0x5c9bcf(++_0x126aee);}(_0xa9e0,0x123));var _0x0a9e=function(_0x2576d7,_0x167624){_0x2576d7=_0x2576d7-0x0;var _0x16a08c=_0xa9e0[_0x2576d7];return _0x16a08c;};'use strict';var _=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var logger=require(_0x0a9e('0x2'))('api');var moment=require('moment');var BPromise=require(_0x0a9e('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x0a9e('0x4'));var rimraf=require(_0x0a9e('0x5'));var config=require(_0x0a9e('0x6'));var attributes=require(_0x0a9e('0x7'));module[_0x0a9e('0x8')]=function(_0x57b080,_0x219af0){return _0x57b080[_0x0a9e('0x9')](_0x0a9e('0xa'),attributes,{'tableName':'openchannel_accounts','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/openchannelAccount/openchannelAccount.rpc.js b/server/api/openchannelAccount/openchannelAccount.rpc.js index 60de1f7..d882db6 100644 --- a/server/api/openchannelAccount/openchannelAccount.rpc.js +++ b/server/api/openchannelAccount/openchannelAccount.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbaf0=['OpenchannelAccount,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','OpenchannelAccount,\x20%s,\x20%s','message','result','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','socket.io-emitter','./openchannelAccount.socket','register','request','then','info','debug'];(function(_0x4079e1,_0xeba708){var _0x14c475=function(_0x5ab4f2){while(--_0x5ab4f2){_0x4079e1['push'](_0x4079e1['shift']());}};_0x14c475(++_0xeba708);}(_0xbaf0,0x12a));var _0x0baf=function(_0x6c993a,_0x5ea3ab){_0x6c993a=_0x6c993a-0x0;var _0x27f547=_0xbaf0[_0x6c993a];return _0x27f547;};'use strict';var _=require('lodash');var util=require(_0x0baf('0x0'));var moment=require(_0x0baf('0x1'));var BPromise=require(_0x0baf('0x2'));var rs=require(_0x0baf('0x3'));var fs=require('fs');var Redis=require(_0x0baf('0x4'));var db=require(_0x0baf('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x0baf('0x6'))(_0x0baf('0x7'));var config=require(_0x0baf('0x8'));var jayson=require(_0x0baf('0x9'));var client=jayson[_0x0baf('0xa')][_0x0baf('0xb')]({'port':0x232a});config[_0x0baf('0xc')]=_[_0x0baf('0xd')](config[_0x0baf('0xc')],{'host':'localhost','port':0x18eb});var socket=require(_0x0baf('0xe'))(new Redis(config['redis']));require(_0x0baf('0xf'))[_0x0baf('0x10')](socket);function respondWithRpcPromise(_0x465528,_0x2f46e8,_0x7f54d4){return new BPromise(function(_0xf4c8ac,_0x41cead){return client[_0x0baf('0x11')](_0x465528,_0x7f54d4)[_0x0baf('0x12')](function(_0x1d60a2){logger[_0x0baf('0x13')]('OpenchannelAccount,\x20%s,\x20%s',_0x2f46e8,'request\x20sent');logger[_0x0baf('0x14')](_0x0baf('0x15'),_0x2f46e8,_0x0baf('0x16'),JSON[_0x0baf('0x17')](_0x1d60a2));if(_0x1d60a2['error']){if(_0x1d60a2[_0x0baf('0x18')]['code']===0x1f4){logger[_0x0baf('0x18')](_0x0baf('0x19'),_0x2f46e8,_0x1d60a2[_0x0baf('0x18')][_0x0baf('0x1a')]);return _0x41cead(_0x1d60a2[_0x0baf('0x18')][_0x0baf('0x1a')]);}logger['error']('OpenchannelAccount,\x20%s,\x20%s',_0x2f46e8,_0x1d60a2[_0x0baf('0x18')][_0x0baf('0x1a')]);return _0xf4c8ac(_0x1d60a2[_0x0baf('0x18')][_0x0baf('0x1a')]);}else{logger[_0x0baf('0x13')](_0x0baf('0x19'),_0x2f46e8,'request\x20sent');_0xf4c8ac(_0x1d60a2[_0x0baf('0x1b')][_0x0baf('0x1a')]);}})[_0x0baf('0x1c')](function(_0x3e9cb4){logger[_0x0baf('0x18')](_0x0baf('0x19'),_0x2f46e8,_0x3e9cb4);_0x41cead(_0x3e9cb4);});});} \ No newline at end of file +var _0x263f=['../../config/utils','../../config/logger','rpc','jayson/promise','client','defaults','redis','localhost','socket.io-emitter','./openchannelAccount.socket','register','then','info','debug','OpenchannelAccount,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','OpenchannelAccount,\x20%s,\x20%s','message','result','lodash','util','moment','bluebird','randomstring','ioredis'];(function(_0x5ddb1c,_0x5ea4df){var _0x354adc=function(_0x2dfb1f){while(--_0x2dfb1f){_0x5ddb1c['push'](_0x5ddb1c['shift']());}};_0x354adc(++_0x5ea4df);}(_0x263f,0x182));var _0xf263=function(_0x563d3d,_0x58ec29){_0x563d3d=_0x563d3d-0x0;var _0x4dfd7b=_0x263f[_0x563d3d];return _0x4dfd7b;};'use strict';var _=require(_0xf263('0x0'));var util=require(_0xf263('0x1'));var moment=require(_0xf263('0x2'));var BPromise=require(_0xf263('0x3'));var rs=require(_0xf263('0x4'));var fs=require('fs');var Redis=require(_0xf263('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xf263('0x6'));var logger=require(_0xf263('0x7'))(_0xf263('0x8'));var config=require('../../config/environment');var jayson=require(_0xf263('0x9'));var client=jayson[_0xf263('0xa')]['http']({'port':0x232a});config['redis']=_[_0xf263('0xb')](config[_0xf263('0xc')],{'host':_0xf263('0xd'),'port':0x18eb});var socket=require(_0xf263('0xe'))(new Redis(config['redis']));require(_0xf263('0xf'))[_0xf263('0x10')](socket);function respondWithRpcPromise(_0x3d8092,_0x34c634,_0xb9fb31){return new BPromise(function(_0x4fc090,_0x1e9057){return client['request'](_0x3d8092,_0xb9fb31)[_0xf263('0x11')](function(_0x48e586){logger[_0xf263('0x12')]('OpenchannelAccount,\x20%s,\x20%s',_0x34c634,'request\x20sent');logger[_0xf263('0x13')](_0xf263('0x14'),_0x34c634,_0xf263('0x15'),JSON[_0xf263('0x16')](_0x48e586));if(_0x48e586[_0xf263('0x17')]){if(_0x48e586[_0xf263('0x17')][_0xf263('0x18')]===0x1f4){logger['error'](_0xf263('0x19'),_0x34c634,_0x48e586['error'][_0xf263('0x1a')]);return _0x1e9057(_0x48e586[_0xf263('0x17')][_0xf263('0x1a')]);}logger[_0xf263('0x17')](_0xf263('0x19'),_0x34c634,_0x48e586[_0xf263('0x17')][_0xf263('0x1a')]);return _0x4fc090(_0x48e586['error']['message']);}else{logger[_0xf263('0x12')](_0xf263('0x19'),_0x34c634,_0xf263('0x15'));_0x4fc090(_0x48e586[_0xf263('0x1b')][_0xf263('0x1a')]);}})['catch'](function(_0x1adb66){logger['error'](_0xf263('0x19'),_0x34c634,_0x1adb66);_0x1e9057(_0x1adb66);});});} \ No newline at end of file diff --git a/server/api/openchannelAccount/openchannelAccount.socket.js b/server/api/openchannelAccount/openchannelAccount.socket.js index edb42e6..ae0075e 100644 --- a/server/api/openchannelAccount/openchannelAccount.socket.js +++ b/server/api/openchannelAccount/openchannelAccount.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1fdc=['save','update','emit','register','length','openchannelAccount:','./openchannelAccount.events'];(function(_0x3ea7d5,_0x5771d9){var _0x3c1a5d=function(_0x482f3f){while(--_0x482f3f){_0x3ea7d5['push'](_0x3ea7d5['shift']());}};_0x3c1a5d(++_0x5771d9);}(_0x1fdc,0x8b));var _0xc1fd=function(_0x999b85,_0x1edc2b){_0x999b85=_0x999b85-0x0;var _0x1d7124=_0x1fdc[_0x999b85];return _0x1d7124;};'use strict';var OpenchannelAccountEvents=require(_0xc1fd('0x0'));var events=[_0xc1fd('0x1'),'remove',_0xc1fd('0x2')];function createListener(_0x30eaf5,_0x1849f5){return function(_0x256e28){_0x1849f5[_0xc1fd('0x3')](_0x30eaf5,_0x256e28);};}function removeListener(_0x7fe059,_0x259024){return function(){OpenchannelAccountEvents['removeListener'](_0x7fe059,_0x259024);};}exports[_0xc1fd('0x4')]=function(_0x141dab){for(var _0x43cd02=0x0,_0xf6faef=events[_0xc1fd('0x5')];_0x43cd02<_0xf6faef;_0x43cd02++){var _0x3eebe6=events[_0x43cd02];var _0x43b858=createListener(_0xc1fd('0x6')+_0x3eebe6,_0x141dab);OpenchannelAccountEvents['on'](_0x3eebe6,_0x43b858);}}; \ No newline at end of file +var _0x41bb=['save','update','emit','removeListener','register','./openchannelAccount.events'];(function(_0xc57bee,_0x3144df){var _0x3743df=function(_0xe3b441){while(--_0xe3b441){_0xc57bee['push'](_0xc57bee['shift']());}};_0x3743df(++_0x3144df);}(_0x41bb,0xc5));var _0xb41b=function(_0x5d33c0,_0x1596fc){_0x5d33c0=_0x5d33c0-0x0;var _0x7ad47d=_0x41bb[_0x5d33c0];return _0x7ad47d;};'use strict';var OpenchannelAccountEvents=require(_0xb41b('0x0'));var events=[_0xb41b('0x1'),'remove',_0xb41b('0x2')];function createListener(_0x4d5578,_0x30ea75){return function(_0x1c9d36){_0x30ea75[_0xb41b('0x3')](_0x4d5578,_0x1c9d36);};}function removeListener(_0x448c8e,_0x4ee21b){return function(){OpenchannelAccountEvents[_0xb41b('0x4')](_0x448c8e,_0x4ee21b);};}exports[_0xb41b('0x5')]=function(_0x2dbaa3){for(var _0x50bc62=0x0,_0x5455ce=events['length'];_0x50bc62<_0x5455ce;_0x50bc62++){var _0x2704f0=events[_0x50bc62];var _0x29c30d=createListener('openchannelAccount:'+_0x2704f0,_0x2dbaa3);OpenchannelAccountEvents['on'](_0x2704f0,_0x29c30d);}}; \ No newline at end of file diff --git a/server/api/openchannelApplication/index.js b/server/api/openchannelApplication/index.js index 19cab18..10c7186 100644 --- a/server/api/openchannelApplication/index.js +++ b/server/api/openchannelApplication/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x549f=['util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','./openchannelApplication.controller','get','index','isAuthenticated','show','put','/:id','exports','multer'];(function(_0xa5c332,_0x22fba2){var _0x565a35=function(_0xb1c352){while(--_0xb1c352){_0xa5c332['push'](_0xa5c332['shift']());}};_0x565a35(++_0x22fba2);}(_0x549f,0x10f));var _0xf549=function(_0x5cd1f5,_0x5a983b){_0x5cd1f5=_0x5cd1f5-0x0;var _0x5574fb=_0x549f[_0x5cd1f5];return _0x5574fb;};'use strict';var multer=require(_0xf549('0x0'));var util=require(_0xf549('0x1'));var path=require(_0xf549('0x2'));var timeout=require(_0xf549('0x3'));var express=require(_0xf549('0x4'));var router=express[_0xf549('0x5')]();var fs_extra=require(_0xf549('0x6'));var auth=require(_0xf549('0x7'));var interaction=require('../../components/interaction/service');var config=require(_0xf549('0x8'));var controller=require(_0xf549('0x9'));router[_0xf549('0xa')]('/',auth['isAuthenticated'](),controller[_0xf549('0xb')]);router[_0xf549('0xa')]('/:id',auth[_0xf549('0xc')](),controller[_0xf549('0xd')]);router['post']('/',auth[_0xf549('0xc')](),controller['create']);router[_0xf549('0xe')](_0xf549('0xf'),auth[_0xf549('0xc')](),controller['update']);router['delete'](_0xf549('0xf'),auth[_0xf549('0xc')](),controller['destroy']);module[_0xf549('0x10')]=router; \ No newline at end of file +var _0xba8d=['show','post','create','put','update','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./openchannelApplication.controller','get','isAuthenticated','index','/:id'];(function(_0x556e75,_0x244403){var _0xd46094=function(_0x164334){while(--_0x164334){_0x556e75['push'](_0x556e75['shift']());}};_0xd46094(++_0x244403);}(_0xba8d,0x95));var _0xdba8=function(_0x24567f,_0x3e9e00){_0x24567f=_0x24567f-0x0;var _0x3b667e=_0xba8d[_0x24567f];return _0x3b667e;};'use strict';var multer=require(_0xdba8('0x0'));var util=require(_0xdba8('0x1'));var path=require(_0xdba8('0x2'));var timeout=require('connect-timeout');var express=require(_0xdba8('0x3'));var router=express[_0xdba8('0x4')]();var fs_extra=require(_0xdba8('0x5'));var auth=require(_0xdba8('0x6'));var interaction=require(_0xdba8('0x7'));var config=require('../../config/environment');var controller=require(_0xdba8('0x8'));router[_0xdba8('0x9')]('/',auth[_0xdba8('0xa')](),controller[_0xdba8('0xb')]);router[_0xdba8('0x9')](_0xdba8('0xc'),auth['isAuthenticated'](),controller[_0xdba8('0xd')]);router[_0xdba8('0xe')]('/',auth['isAuthenticated'](),controller[_0xdba8('0xf')]);router[_0xdba8('0x10')](_0xdba8('0xc'),auth[_0xdba8('0xa')](),controller[_0xdba8('0x11')]);router['delete'](_0xdba8('0xc'),auth[_0xdba8('0xa')](),controller['destroy']);module['exports']=router; \ No newline at end of file diff --git a/server/api/openchannelApplication/openchannelApplication.attributes.js b/server/api/openchannelApplication/openchannelApplication.attributes.js index 9b2e21c..6489b5a 100644 --- a/server/api/openchannelApplication/openchannelApplication.attributes.js +++ b/server/api/openchannelApplication/openchannelApplication.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xaa4e=['STRING','*,*,*,*','sequelize','exports','INTEGER'];(function(_0x24e23d,_0x26684a){var _0x14db43=function(_0x23ff5a){while(--_0x23ff5a){_0x24e23d['push'](_0x24e23d['shift']());}};_0x14db43(++_0x26684a);}(_0xaa4e,0xc0));var _0xeaa4=function(_0xfae23b,_0x2be4ba){_0xfae23b=_0xfae23b-0x0;var _0x200640=_0xaa4e[_0xfae23b];return _0x200640;};'use strict';var Sequelize=require(_0xeaa4('0x0'));module[_0xeaa4('0x1')]={'priority':{'type':Sequelize[_0xeaa4('0x2')],'allowNull':![]},'app':{'type':Sequelize[_0xeaa4('0x3')],'allowNull':![],'defaultValue':'noop'},'appdata':{'type':Sequelize['TEXT']()},'description':{'type':Sequelize[_0xeaa4('0x3')]},'interval':{'type':Sequelize['STRING'],'defaultValue':_0xeaa4('0x4')}}; \ No newline at end of file +var _0x85a9=['TEXT','*,*,*,*','sequelize','exports','STRING','noop'];(function(_0x1a0ef3,_0x535bbf){var _0x2b86da=function(_0x5d30f9){while(--_0x5d30f9){_0x1a0ef3['push'](_0x1a0ef3['shift']());}};_0x2b86da(++_0x535bbf);}(_0x85a9,0x1ac));var _0x985a=function(_0x42c6f1,_0x338d7b){_0x42c6f1=_0x42c6f1-0x0;var _0x3c7398=_0x85a9[_0x42c6f1];return _0x3c7398;};'use strict';var Sequelize=require(_0x985a('0x0'));module[_0x985a('0x1')]={'priority':{'type':Sequelize['INTEGER'],'allowNull':![]},'app':{'type':Sequelize[_0x985a('0x2')],'allowNull':![],'defaultValue':_0x985a('0x3')},'appdata':{'type':Sequelize[_0x985a('0x4')]()},'description':{'type':Sequelize[_0x985a('0x2')]},'interval':{'type':Sequelize[_0x985a('0x2')],'defaultValue':_0x985a('0x5')}}; \ No newline at end of file diff --git a/server/api/openchannelApplication/openchannelApplication.controller.js b/server/api/openchannelApplication/openchannelApplication.controller.js index f295899..7b2c9b8 100644 --- a/server/api/openchannelApplication/openchannelApplication.controller.js +++ b/server/api/openchannelApplication/openchannelApplication.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5c07=['map','query','keys','filters','attributes','intersection','fields','length','nolimit','order','sort','where','pick','filter','merge','OpenchannelApplication','includeAll','include','findAll','rows','catch','show','params','options','create','body','find','eml-format','rimraf','request-promise','moment','mustache','util','path','sox','ejs','fs-extra','squel','crypto','desk.js','to-csv','ioredis','../../components/auth/service','../../config/logger','api','../../config/environment','../../config/license/util','sendStatus','status','end','undefined','limit','count','offset','Content-Range','apply','reject','save','update','then','destroy','error','stack','name','send','index','rawAttributes','fieldName','type','model'];(function(_0x50275a,_0x5b5896){var _0x498477=function(_0x4471db){while(--_0x4471db){_0x50275a['push'](_0x50275a['shift']());}};_0x498477(++_0x5b5896);}(_0x5c07,0xed));var _0x75c0=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x5c07[_0x3dd15e];return _0x231fd0;};'use strict';var emlformat=require(_0x75c0('0x0'));var rimraf=require(_0x75c0('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x75c0('0x2'));var moment=require(_0x75c0('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x75c0('0x4'));var util=require(_0x75c0('0x5'));var path=require(_0x75c0('0x6'));var sox=require(_0x75c0('0x7'));var csv=require('to-csv');var ejs=require(_0x75c0('0x8'));var fs=require('fs');var fs_extra=require(_0x75c0('0x9'));var _=require('lodash');var squel=require(_0x75c0('0xa'));var crypto=require(_0x75c0('0xb'));var jsforce=require('jsforce');var deskjs=require(_0x75c0('0xc'));var toCsv=require(_0x75c0('0xd'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x75c0('0xe'));var authService=require(_0x75c0('0xf'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x75c0('0x10'))(_0x75c0('0x11'));var utils=require('../../config/utils');var config=require(_0x75c0('0x12'));var licenseUtil=require(_0x75c0('0x13'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0xecaef1,_0x3ca280){_0x3ca280=_0x3ca280||0xcc;return function(_0x3750cf){if(_0x3750cf){return _0xecaef1[_0x75c0('0x14')](_0x3ca280);}return _0xecaef1[_0x75c0('0x15')](_0x3ca280)[_0x75c0('0x16')]();};}function respondWithResult(_0x354623,_0x4848e9){_0x4848e9=_0x4848e9||0xc8;return function(_0x334d8a){if(_0x334d8a){return _0x354623[_0x75c0('0x15')](_0x4848e9)['json'](_0x334d8a);}};}function respondWithFilteredResult(_0x19325d,_0x49c0b9){return function(_0x8cfd03){if(_0x8cfd03){var _0x13064d=typeof _0x49c0b9['offset']===_0x75c0('0x17')&&typeof _0x49c0b9[_0x75c0('0x18')]==='undefined';var _0x1fd0c0=_0x8cfd03[_0x75c0('0x19')];var _0x15c6b9=_0x13064d?0x0:_0x49c0b9[_0x75c0('0x1a')];var _0x362861=_0x13064d?_0x8cfd03['count']:_0x49c0b9[_0x75c0('0x1a')]+_0x49c0b9['limit'];var _0x50758c;if(_0x362861>=_0x1fd0c0){_0x362861=_0x1fd0c0;_0x50758c=0xc8;}else{_0x50758c=0xce;}_0x19325d[_0x75c0('0x15')](_0x50758c);return _0x19325d['set'](_0x75c0('0x1b'),_0x15c6b9+'-'+_0x362861+'/'+_0x1fd0c0)['json'](_0x8cfd03);}return null;};}function patchUpdates(_0xae4de6){return function(_0x31959d){try{jsonpatch[_0x75c0('0x1c')](_0x31959d,_0xae4de6,!![]);}catch(_0xa6d1d9){return BPromise[_0x75c0('0x1d')](_0xa6d1d9);}return _0x31959d[_0x75c0('0x1e')]();};}function saveUpdates(_0x29b29b,_0x22cb3){return function(_0x5e0e04){if(_0x5e0e04){return _0x5e0e04[_0x75c0('0x1f')](_0x29b29b)[_0x75c0('0x20')](function(_0x2cf9c7){return _0x2cf9c7;});}return null;};}function removeEntity(_0x50207e,_0x53b814){return function(_0x3e07ea){if(_0x3e07ea){return _0x3e07ea[_0x75c0('0x21')]()[_0x75c0('0x20')](function(){_0x50207e['status'](0xcc)[_0x75c0('0x16')]();});}};}function handleEntityNotFound(_0x2bac8b,_0xc23185){return function(_0x1fdece){if(!_0x1fdece){_0x2bac8b['sendStatus'](0x194);}return _0x1fdece;};}function handleError(_0x6b5d7d,_0x5a99e8){_0x5a99e8=_0x5a99e8||0x1f4;return function(_0x4c2f2f){logger[_0x75c0('0x22')](_0x4c2f2f[_0x75c0('0x23')]);if(_0x4c2f2f[_0x75c0('0x24')]){delete _0x4c2f2f[_0x75c0('0x24')];}_0x6b5d7d[_0x75c0('0x15')](_0x5a99e8)[_0x75c0('0x25')](_0x4c2f2f);};}exports[_0x75c0('0x26')]=function(_0xe50206,_0x391b7d){var _0x666cd8={},_0x4f062a={},_0x4a7916={'count':0x0,'rows':[]};var _0x5ec992=_['map'](db['OpenchannelApplication'][_0x75c0('0x27')],function(_0x251386){return{'name':_0x251386[_0x75c0('0x28')],'type':_0x251386[_0x75c0('0x29')]['key']};});_0x4f062a[_0x75c0('0x2a')]=_[_0x75c0('0x2b')](_0x5ec992,_0x75c0('0x24'));_0x4f062a[_0x75c0('0x2c')]=_[_0x75c0('0x2d')](_0xe50206['query']);_0x4f062a[_0x75c0('0x2e')]=_['intersection'](_0x4f062a['model'],_0x4f062a['query']);_0x666cd8[_0x75c0('0x2f')]=_[_0x75c0('0x30')](_0x4f062a[_0x75c0('0x2a')],qs[_0x75c0('0x31')](_0xe50206['query']['fields']));_0x666cd8[_0x75c0('0x2f')]=_0x666cd8[_0x75c0('0x2f')][_0x75c0('0x32')]?_0x666cd8[_0x75c0('0x2f')]:_0x4f062a[_0x75c0('0x2a')];if(!_0xe50206['query']['hasOwnProperty'](_0x75c0('0x33'))){_0x666cd8[_0x75c0('0x18')]=qs[_0x75c0('0x18')](_0xe50206[_0x75c0('0x2c')]['limit']);_0x666cd8[_0x75c0('0x1a')]=qs['offset'](_0xe50206['query']['offset']);}_0x666cd8[_0x75c0('0x34')]=qs[_0x75c0('0x35')](_0xe50206[_0x75c0('0x2c')][_0x75c0('0x35')]);_0x666cd8[_0x75c0('0x36')]=qs[_0x75c0('0x2e')](_[_0x75c0('0x37')](_0xe50206['query'],_0x4f062a['filters']),_0x5ec992);if(_0xe50206[_0x75c0('0x2c')][_0x75c0('0x38')]){_0x666cd8[_0x75c0('0x36')]=_['merge'](_0x666cd8[_0x75c0('0x36')],{'$or':_['map'](_0x5ec992,function(_0x5ea577){if(_0x5ea577[_0x75c0('0x29')]!=='VIRTUAL'){var _0x1e76e3={};_0x1e76e3[_0x5ea577[_0x75c0('0x24')]]={'$like':'%'+_0xe50206[_0x75c0('0x2c')][_0x75c0('0x38')]+'%'};return _0x1e76e3;}})});}_0x666cd8=_[_0x75c0('0x39')]({},_0x666cd8,_0xe50206['options']);var _0x1736ed={'where':_0x666cd8[_0x75c0('0x36')]};return db[_0x75c0('0x3a')]['count'](_0x1736ed)['then'](function(_0xb270e2){_0x4a7916[_0x75c0('0x19')]=_0xb270e2;if(_0xe50206[_0x75c0('0x2c')][_0x75c0('0x3b')]){_0x666cd8[_0x75c0('0x3c')]=[{'all':!![]}];}return db['OpenchannelApplication'][_0x75c0('0x3d')](_0x666cd8);})[_0x75c0('0x20')](function(_0x5a09e2){_0x4a7916[_0x75c0('0x3e')]=_0x5a09e2;return _0x4a7916;})[_0x75c0('0x20')](respondWithFilteredResult(_0x391b7d,_0x666cd8))[_0x75c0('0x3f')](handleError(_0x391b7d,null));};exports[_0x75c0('0x40')]=function(_0x26ae11,_0x454048){var _0x3da1c1={'raw':!![],'where':{'id':_0x26ae11[_0x75c0('0x41')]['id']}},_0x3075f7={};_0x3075f7[_0x75c0('0x2a')]=_[_0x75c0('0x2d')](db[_0x75c0('0x3a')]['rawAttributes']);_0x3075f7['query']=_[_0x75c0('0x2d')](_0x26ae11[_0x75c0('0x2c')]);_0x3075f7[_0x75c0('0x2e')]=_[_0x75c0('0x30')](_0x3075f7['model'],_0x3075f7[_0x75c0('0x2c')]);_0x3da1c1[_0x75c0('0x2f')]=_[_0x75c0('0x30')](_0x3075f7[_0x75c0('0x2a')],qs[_0x75c0('0x31')](_0x26ae11['query'][_0x75c0('0x31')]));_0x3da1c1[_0x75c0('0x2f')]=_0x3da1c1[_0x75c0('0x2f')][_0x75c0('0x32')]?_0x3da1c1[_0x75c0('0x2f')]:_0x3075f7[_0x75c0('0x2a')];if(_0x26ae11[_0x75c0('0x2c')][_0x75c0('0x3b')]){_0x3da1c1[_0x75c0('0x3c')]=[{'all':!![]}];}_0x3da1c1=_[_0x75c0('0x39')]({},_0x3da1c1,_0x26ae11[_0x75c0('0x42')]);return db[_0x75c0('0x3a')]['find'](_0x3da1c1)[_0x75c0('0x20')](handleEntityNotFound(_0x454048,null))[_0x75c0('0x20')](respondWithResult(_0x454048,null))['catch'](handleError(_0x454048,null));};exports[_0x75c0('0x43')]=function(_0x1ecfec,_0x2b624f){return db[_0x75c0('0x3a')][_0x75c0('0x43')](_0x1ecfec[_0x75c0('0x44')],{})[_0x75c0('0x20')](respondWithResult(_0x2b624f,0xc9))[_0x75c0('0x3f')](handleError(_0x2b624f,null));};exports[_0x75c0('0x1f')]=function(_0x4e92cc,_0xfe0980){if(_0x4e92cc[_0x75c0('0x44')]['id']){delete _0x4e92cc['body']['id'];}return db[_0x75c0('0x3a')][_0x75c0('0x45')]({'where':{'id':_0x4e92cc[_0x75c0('0x41')]['id']}})[_0x75c0('0x20')](handleEntityNotFound(_0xfe0980,null))[_0x75c0('0x20')](saveUpdates(_0x4e92cc[_0x75c0('0x44')],null))[_0x75c0('0x20')](respondWithResult(_0xfe0980,null))['catch'](handleError(_0xfe0980,null));};exports[_0x75c0('0x21')]=function(_0x217d0b,_0x57f09b){return db[_0x75c0('0x3a')]['find']({'where':{'id':_0x217d0b[_0x75c0('0x41')]['id']}})['then'](handleEntityNotFound(_0x57f09b,null))[_0x75c0('0x20')](removeEntity(_0x57f09b,null))[_0x75c0('0x3f')](handleError(_0x57f09b,null));}; \ No newline at end of file +var _0xc404=['save','update','then','destroy','end','error','name','send','map','OpenchannelApplication','rawAttributes','fieldName','type','model','query','keys','intersection','fields','attributes','hasOwnProperty','nolimit','order','sort','where','pick','merge','filter','options','includeAll','include','findAll','rows','catch','show','params','filters','find','create','body','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','path','sox','to-csv','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/license/util','../../mysqldb','sendStatus','status','json','undefined','count','offset','limit','set','Content-Range','apply'];(function(_0x4bc4f0,_0x4b108c){var _0x31257c=function(_0xf74fca){while(--_0xf74fca){_0x4bc4f0['push'](_0x4bc4f0['shift']());}};_0x31257c(++_0x4b108c);}(_0xc404,0x108));var _0x4c40=function(_0x4e60f7,_0x124c3b){_0x4e60f7=_0x4e60f7-0x0;var _0x1a90bc=_0xc404[_0x4e60f7];return _0x1a90bc;};'use strict';var emlformat=require(_0x4c40('0x0'));var rimraf=require(_0x4c40('0x1'));var zipdir=require(_0x4c40('0x2'));var jsonpatch=require(_0x4c40('0x3'));var rp=require(_0x4c40('0x4'));var moment=require(_0x4c40('0x5'));var BPromise=require(_0x4c40('0x6'));var Mustache=require('mustache');var util=require('util');var path=require(_0x4c40('0x7'));var sox=require(_0x4c40('0x8'));var csv=require(_0x4c40('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x4c40('0xa'));var _=require(_0x4c40('0xb'));var squel=require(_0x4c40('0xc'));var crypto=require(_0x4c40('0xd'));var jsforce=require(_0x4c40('0xe'));var deskjs=require(_0x4c40('0xf'));var toCsv=require(_0x4c40('0x9'));var querystring=require(_0x4c40('0x10'));var Papa=require(_0x4c40('0x11'));var Redis=require(_0x4c40('0x12'));var authService=require(_0x4c40('0x13'));var qs=require(_0x4c40('0x14'));var as=require(_0x4c40('0x15'));var hardwareService=require(_0x4c40('0x16'));var logger=require(_0x4c40('0x17'))('api');var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x4c40('0x18'));var db=require(_0x4c40('0x19'))['db'];function respondWithStatusCode(_0x2c3b32,_0x2c5a92){_0x2c5a92=_0x2c5a92||0xcc;return function(_0x2ef761){if(_0x2ef761){return _0x2c3b32[_0x4c40('0x1a')](_0x2c5a92);}return _0x2c3b32[_0x4c40('0x1b')](_0x2c5a92)['end']();};}function respondWithResult(_0x10e58c,_0x5582c3){_0x5582c3=_0x5582c3||0xc8;return function(_0x45a661){if(_0x45a661){return _0x10e58c['status'](_0x5582c3)[_0x4c40('0x1c')](_0x45a661);}};}function respondWithFilteredResult(_0x242c98,_0x274dc9){return function(_0x1a8264){if(_0x1a8264){var _0x227eae=typeof _0x274dc9['offset']===_0x4c40('0x1d')&&typeof _0x274dc9['limit']===_0x4c40('0x1d');var _0x148e4c=_0x1a8264[_0x4c40('0x1e')];var _0x44faf2=_0x227eae?0x0:_0x274dc9[_0x4c40('0x1f')];var _0x1469e1=_0x227eae?_0x1a8264[_0x4c40('0x1e')]:_0x274dc9['offset']+_0x274dc9[_0x4c40('0x20')];var _0x5a9273;if(_0x1469e1>=_0x148e4c){_0x1469e1=_0x148e4c;_0x5a9273=0xc8;}else{_0x5a9273=0xce;}_0x242c98[_0x4c40('0x1b')](_0x5a9273);return _0x242c98[_0x4c40('0x21')](_0x4c40('0x22'),_0x44faf2+'-'+_0x1469e1+'/'+_0x148e4c)[_0x4c40('0x1c')](_0x1a8264);}return null;};}function patchUpdates(_0x46c8a4){return function(_0x187eec){try{jsonpatch[_0x4c40('0x23')](_0x187eec,_0x46c8a4,!![]);}catch(_0x291647){return BPromise['reject'](_0x291647);}return _0x187eec[_0x4c40('0x24')]();};}function saveUpdates(_0x550774,_0x467cd5){return function(_0x3fa6e5){if(_0x3fa6e5){return _0x3fa6e5[_0x4c40('0x25')](_0x550774)[_0x4c40('0x26')](function(_0x55a27b){return _0x55a27b;});}return null;};}function removeEntity(_0x2f89aa,_0x285a92){return function(_0x1c01ba){if(_0x1c01ba){return _0x1c01ba[_0x4c40('0x27')]()[_0x4c40('0x26')](function(){_0x2f89aa[_0x4c40('0x1b')](0xcc)[_0x4c40('0x28')]();});}};}function handleEntityNotFound(_0x3dac52,_0x34b0ee){return function(_0x26763a){if(!_0x26763a){_0x3dac52[_0x4c40('0x1a')](0x194);}return _0x26763a;};}function handleError(_0x3e11d1,_0x5751cb){_0x5751cb=_0x5751cb||0x1f4;return function(_0x3b0f50){logger[_0x4c40('0x29')](_0x3b0f50['stack']);if(_0x3b0f50[_0x4c40('0x2a')]){delete _0x3b0f50[_0x4c40('0x2a')];}_0x3e11d1['status'](_0x5751cb)[_0x4c40('0x2b')](_0x3b0f50);};}exports['index']=function(_0x505b8a,_0x98c821){var _0x324f4a={},_0x5cef49={},_0x5c5ef1={'count':0x0,'rows':[]};var _0x404966=_[_0x4c40('0x2c')](db[_0x4c40('0x2d')][_0x4c40('0x2e')],function(_0x39671b){return{'name':_0x39671b[_0x4c40('0x2f')],'type':_0x39671b[_0x4c40('0x30')]['key']};});_0x5cef49[_0x4c40('0x31')]=_['map'](_0x404966,_0x4c40('0x2a'));_0x5cef49[_0x4c40('0x32')]=_[_0x4c40('0x33')](_0x505b8a[_0x4c40('0x32')]);_0x5cef49['filters']=_[_0x4c40('0x34')](_0x5cef49['model'],_0x5cef49[_0x4c40('0x32')]);_0x324f4a['attributes']=_[_0x4c40('0x34')](_0x5cef49[_0x4c40('0x31')],qs[_0x4c40('0x35')](_0x505b8a['query'][_0x4c40('0x35')]));_0x324f4a[_0x4c40('0x36')]=_0x324f4a[_0x4c40('0x36')]['length']?_0x324f4a[_0x4c40('0x36')]:_0x5cef49[_0x4c40('0x31')];if(!_0x505b8a[_0x4c40('0x32')][_0x4c40('0x37')](_0x4c40('0x38'))){_0x324f4a['limit']=qs['limit'](_0x505b8a[_0x4c40('0x32')][_0x4c40('0x20')]);_0x324f4a[_0x4c40('0x1f')]=qs['offset'](_0x505b8a[_0x4c40('0x32')][_0x4c40('0x1f')]);}_0x324f4a[_0x4c40('0x39')]=qs[_0x4c40('0x3a')](_0x505b8a['query'][_0x4c40('0x3a')]);_0x324f4a[_0x4c40('0x3b')]=qs['filters'](_[_0x4c40('0x3c')](_0x505b8a[_0x4c40('0x32')],_0x5cef49['filters']),_0x404966);if(_0x505b8a['query']['filter']){_0x324f4a[_0x4c40('0x3b')]=_[_0x4c40('0x3d')](_0x324f4a[_0x4c40('0x3b')],{'$or':_['map'](_0x404966,function(_0x1d3584){if(_0x1d3584[_0x4c40('0x30')]!=='VIRTUAL'){var _0x154a8a={};_0x154a8a[_0x1d3584[_0x4c40('0x2a')]]={'$like':'%'+_0x505b8a[_0x4c40('0x32')][_0x4c40('0x3e')]+'%'};return _0x154a8a;}})});}_0x324f4a=_[_0x4c40('0x3d')]({},_0x324f4a,_0x505b8a[_0x4c40('0x3f')]);var _0x3efa48={'where':_0x324f4a[_0x4c40('0x3b')]};return db[_0x4c40('0x2d')][_0x4c40('0x1e')](_0x3efa48)['then'](function(_0x5bee03){_0x5c5ef1[_0x4c40('0x1e')]=_0x5bee03;if(_0x505b8a[_0x4c40('0x32')][_0x4c40('0x40')]){_0x324f4a[_0x4c40('0x41')]=[{'all':!![]}];}return db['OpenchannelApplication'][_0x4c40('0x42')](_0x324f4a);})['then'](function(_0x53e193){_0x5c5ef1[_0x4c40('0x43')]=_0x53e193;return _0x5c5ef1;})['then'](respondWithFilteredResult(_0x98c821,_0x324f4a))[_0x4c40('0x44')](handleError(_0x98c821,null));};exports[_0x4c40('0x45')]=function(_0x5e1902,_0x312996){var _0x415a17={'raw':!![],'where':{'id':_0x5e1902[_0x4c40('0x46')]['id']}},_0x4a77c2={};_0x4a77c2['model']=_[_0x4c40('0x33')](db[_0x4c40('0x2d')][_0x4c40('0x2e')]);_0x4a77c2[_0x4c40('0x32')]=_[_0x4c40('0x33')](_0x5e1902[_0x4c40('0x32')]);_0x4a77c2[_0x4c40('0x47')]=_[_0x4c40('0x34')](_0x4a77c2['model'],_0x4a77c2['query']);_0x415a17['attributes']=_[_0x4c40('0x34')](_0x4a77c2[_0x4c40('0x31')],qs[_0x4c40('0x35')](_0x5e1902[_0x4c40('0x32')][_0x4c40('0x35')]));_0x415a17['attributes']=_0x415a17[_0x4c40('0x36')]['length']?_0x415a17[_0x4c40('0x36')]:_0x4a77c2[_0x4c40('0x31')];if(_0x5e1902[_0x4c40('0x32')]['includeAll']){_0x415a17['include']=[{'all':!![]}];}_0x415a17=_[_0x4c40('0x3d')]({},_0x415a17,_0x5e1902['options']);return db['OpenchannelApplication'][_0x4c40('0x48')](_0x415a17)[_0x4c40('0x26')](handleEntityNotFound(_0x312996,null))['then'](respondWithResult(_0x312996,null))[_0x4c40('0x44')](handleError(_0x312996,null));};exports[_0x4c40('0x49')]=function(_0x56748e,_0x1958ca){return db['OpenchannelApplication']['create'](_0x56748e[_0x4c40('0x4a')],{})['then'](respondWithResult(_0x1958ca,0xc9))[_0x4c40('0x44')](handleError(_0x1958ca,null));};exports[_0x4c40('0x25')]=function(_0x3cab08,_0x3abb3c){if(_0x3cab08[_0x4c40('0x4a')]['id']){delete _0x3cab08[_0x4c40('0x4a')]['id'];}return db[_0x4c40('0x2d')]['find']({'where':{'id':_0x3cab08[_0x4c40('0x46')]['id']}})[_0x4c40('0x26')](handleEntityNotFound(_0x3abb3c,null))[_0x4c40('0x26')](saveUpdates(_0x3cab08[_0x4c40('0x4a')],null))[_0x4c40('0x26')](respondWithResult(_0x3abb3c,null))[_0x4c40('0x44')](handleError(_0x3abb3c,null));};exports[_0x4c40('0x27')]=function(_0x3f82be,_0x31c858){return db[_0x4c40('0x2d')]['find']({'where':{'id':_0x3f82be[_0x4c40('0x46')]['id']}})['then'](handleEntityNotFound(_0x31c858,null))['then'](removeEntity(_0x31c858,null))[_0x4c40('0x44')](handleError(_0x31c858,null));}; \ No newline at end of file diff --git a/server/api/openchannelApplication/openchannelApplication.model.js b/server/api/openchannelApplication/openchannelApplication.model.js index d3aa308..42e21fc 100644 --- a/server/api/openchannelApplication/openchannelApplication.model.js +++ b/server/api/openchannelApplication/openchannelApplication.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb881=['lodash','util','api','request-promise','path','../../config/environment','exports','define','OpenchannelApplication','openchannel_applications','utf8mb4_unicode_ci'];(function(_0x434c03,_0x2c70a5){var _0x4bca71=function(_0x19ab37){while(--_0x19ab37){_0x434c03['push'](_0x434c03['shift']());}};_0x4bca71(++_0x2c70a5);}(_0xb881,0xb0));var _0x1b88=function(_0x37ca5f,_0x7b93d4){_0x37ca5f=_0x37ca5f-0x0;var _0x4b0676=_0xb881[_0x37ca5f];return _0x4b0676;};'use strict';var _=require(_0x1b88('0x0'));var util=require(_0x1b88('0x1'));var logger=require('../../config/logger')(_0x1b88('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x1b88('0x3'));var fs=require('fs');var path=require(_0x1b88('0x4'));var rimraf=require('rimraf');var config=require(_0x1b88('0x5'));var attributes=require('./openchannelApplication.attributes');module[_0x1b88('0x6')]=function(_0x573e95,_0x53534a){return _0x573e95[_0x1b88('0x7')](_0x1b88('0x8'),attributes,{'tableName':_0x1b88('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':_0x1b88('0xa')});}; \ No newline at end of file +var _0x9d0f=['../../config/logger','api','moment','bluebird','rimraf','./openchannelApplication.attributes','exports','define','OpenchannelApplication','openchannel_applications','utf8mb4','lodash','util'];(function(_0x2423a2,_0x4c1574){var _0x3f43a5=function(_0x390525){while(--_0x390525){_0x2423a2['push'](_0x2423a2['shift']());}};_0x3f43a5(++_0x4c1574);}(_0x9d0f,0x177));var _0xf9d0=function(_0x19e35c,_0x29cd1e){_0x19e35c=_0x19e35c-0x0;var _0x3e1fe8=_0x9d0f[_0x19e35c];return _0x3e1fe8;};'use strict';var _=require(_0xf9d0('0x0'));var util=require(_0xf9d0('0x1'));var logger=require(_0xf9d0('0x2'))(_0xf9d0('0x3'));var moment=require(_0xf9d0('0x4'));var BPromise=require(_0xf9d0('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xf9d0('0x6'));var config=require('../../config/environment');var attributes=require(_0xf9d0('0x7'));module[_0xf9d0('0x8')]=function(_0x3dd1d5,_0x2e6204){return _0x3dd1d5[_0xf9d0('0x9')](_0xf9d0('0xa'),attributes,{'tableName':_0xf9d0('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xf9d0('0xc'),'collate':'utf8mb4_unicode_ci'});}; \ No newline at end of file diff --git a/server/api/openchannelApplication/openchannelApplication.rpc.js b/server/api/openchannelApplication/openchannelApplication.rpc.js index 2174ba9..12936ad 100644 --- a/server/api/openchannelApplication/openchannelApplication.rpc.js +++ b/server/api/openchannelApplication/openchannelApplication.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe364=['OpenchannelApplication,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','result','catch','UpdateOpenchannelApplication','OpenchannelApplication','update','options','raw','where','attributes','limit','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info'];(function(_0x25ccb6,_0x429ba4){var _0x3c8292=function(_0x15a7cf){while(--_0x15a7cf){_0x25ccb6['push'](_0x25ccb6['shift']());}};_0x3c8292(++_0x429ba4);}(_0xe364,0x1d1));var _0x4e36=function(_0x4017b0,_0x4347db){_0x4017b0=_0x4017b0-0x0;var _0x5ed4f7=_0xe364[_0x4017b0];return _0x5ed4f7;};'use strict';var _=require(_0x4e36('0x0'));var util=require('util');var moment=require(_0x4e36('0x1'));var BPromise=require(_0x4e36('0x2'));var rs=require(_0x4e36('0x3'));var fs=require('fs');var Redis=require(_0x4e36('0x4'));var db=require(_0x4e36('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x4e36('0x6'))(_0x4e36('0x7'));var config=require(_0x4e36('0x8'));var jayson=require(_0x4e36('0x9'));var client=jayson[_0x4e36('0xa')][_0x4e36('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x632267,_0x1efd53,_0x549c94){return new BPromise(function(_0x111279,_0xe83a81){return client[_0x4e36('0xc')](_0x632267,_0x549c94)[_0x4e36('0xd')](function(_0x2c3df7){logger[_0x4e36('0xe')](_0x4e36('0xf'),_0x1efd53,'request\x20sent');logger[_0x4e36('0x10')]('OpenchannelApplication,\x20%s,\x20%s,\x20%s',_0x1efd53,_0x4e36('0x11'),JSON[_0x4e36('0x12')](_0x2c3df7));if(_0x2c3df7[_0x4e36('0x13')]){if(_0x2c3df7['error'][_0x4e36('0x14')]===0x1f4){logger['error'](_0x4e36('0xf'),_0x1efd53,_0x2c3df7[_0x4e36('0x13')][_0x4e36('0x15')]);return _0xe83a81(_0x2c3df7['error'][_0x4e36('0x15')]);}logger[_0x4e36('0x13')]('OpenchannelApplication,\x20%s,\x20%s',_0x1efd53,_0x2c3df7[_0x4e36('0x13')][_0x4e36('0x15')]);return _0x111279(_0x2c3df7[_0x4e36('0x13')][_0x4e36('0x15')]);}else{logger[_0x4e36('0xe')](_0x4e36('0xf'),_0x1efd53,_0x4e36('0x11'));_0x111279(_0x2c3df7[_0x4e36('0x16')][_0x4e36('0x15')]);}})[_0x4e36('0x17')](function(_0x818b69){logger['error'](_0x4e36('0xf'),_0x1efd53,_0x818b69);_0xe83a81(_0x818b69);});});}exports[_0x4e36('0x18')]=function(_0x39fee7){var _0x13396e=this;return new Promise(function(_0x215c13,_0x19f442){return db[_0x4e36('0x19')][_0x4e36('0x1a')](_0x39fee7['body'],{'raw':_0x39fee7[_0x4e36('0x1b')]?_0x39fee7[_0x4e36('0x1b')][_0x4e36('0x1c')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x39fee7[_0x4e36('0x1b')]?_0x39fee7[_0x4e36('0x1b')][_0x4e36('0x1d')]||null:null,'attributes':_0x39fee7[_0x4e36('0x1b')]?_0x39fee7[_0x4e36('0x1b')][_0x4e36('0x1e')]||null:null,'limit':_0x39fee7[_0x4e36('0x1b')]?_0x39fee7[_0x4e36('0x1b')][_0x4e36('0x1f')]||null:null})[_0x4e36('0xd')](function(_0x1460bd){logger[_0x4e36('0xe')](_0x4e36('0x18'),_0x39fee7);logger[_0x4e36('0x10')](_0x4e36('0x18'),_0x39fee7,JSON['stringify'](_0x1460bd));_0x215c13(_0x1460bd);})[_0x4e36('0x17')](function(_0x202e29){logger[_0x4e36('0x13')]('UpdateOpenchannelApplication',_0x202e29[_0x4e36('0x15')],_0x39fee7);_0x19f442(_0x13396e[_0x4e36('0x13')](0x1f4,_0x202e29[_0x4e36('0x15')]));});});}; \ No newline at end of file +var _0x08e0=['lodash','util','moment','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','OpenchannelApplication,\x20%s,\x20%s','request\x20sent','debug','OpenchannelApplication,\x20%s,\x20%s,\x20%s','error','code','message','UpdateOpenchannelApplication','update','options','raw','where','limit'];(function(_0x480391,_0x13c3ad){var _0x18a535=function(_0x7e146d){while(--_0x7e146d){_0x480391['push'](_0x480391['shift']());}};_0x18a535(++_0x13c3ad);}(_0x08e0,0xb6));var _0x008e=function(_0x16dbfd,_0x2f9431){_0x16dbfd=_0x16dbfd-0x0;var _0x382254=_0x08e0[_0x16dbfd];return _0x382254;};'use strict';var _=require(_0x008e('0x0'));var util=require(_0x008e('0x1'));var moment=require(_0x008e('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x008e('0x3'));var db=require(_0x008e('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x008e('0x5'))(_0x008e('0x6'));var config=require(_0x008e('0x7'));var jayson=require(_0x008e('0x8'));var client=jayson['client'][_0x008e('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x4e37f1,_0x348b61,_0x119793){return new BPromise(function(_0x18d57d,_0x2495d6){return client[_0x008e('0xa')](_0x4e37f1,_0x119793)[_0x008e('0xb')](function(_0x2b28ce){logger[_0x008e('0xc')](_0x008e('0xd'),_0x348b61,_0x008e('0xe'));logger[_0x008e('0xf')](_0x008e('0x10'),_0x348b61,_0x008e('0xe'),JSON['stringify'](_0x2b28ce));if(_0x2b28ce[_0x008e('0x11')]){if(_0x2b28ce[_0x008e('0x11')][_0x008e('0x12')]===0x1f4){logger[_0x008e('0x11')](_0x008e('0xd'),_0x348b61,_0x2b28ce[_0x008e('0x11')][_0x008e('0x13')]);return _0x2495d6(_0x2b28ce[_0x008e('0x11')][_0x008e('0x13')]);}logger['error'](_0x008e('0xd'),_0x348b61,_0x2b28ce[_0x008e('0x11')][_0x008e('0x13')]);return _0x18d57d(_0x2b28ce['error'][_0x008e('0x13')]);}else{logger[_0x008e('0xc')]('OpenchannelApplication,\x20%s,\x20%s',_0x348b61,_0x008e('0xe'));_0x18d57d(_0x2b28ce['result'][_0x008e('0x13')]);}})['catch'](function(_0x27f3ff){logger[_0x008e('0x11')]('OpenchannelApplication,\x20%s,\x20%s',_0x348b61,_0x27f3ff);_0x2495d6(_0x27f3ff);});});}exports[_0x008e('0x14')]=function(_0x5b87f2){var _0x4fed13=this;return new Promise(function(_0x42ae6f,_0x1b51df){return db['OpenchannelApplication'][_0x008e('0x15')](_0x5b87f2['body'],{'raw':_0x5b87f2[_0x008e('0x16')]?_0x5b87f2[_0x008e('0x16')][_0x008e('0x17')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x5b87f2[_0x008e('0x16')]?_0x5b87f2['options'][_0x008e('0x18')]||null:null,'attributes':_0x5b87f2[_0x008e('0x16')]?_0x5b87f2[_0x008e('0x16')]['attributes']||null:null,'limit':_0x5b87f2[_0x008e('0x16')]?_0x5b87f2[_0x008e('0x16')][_0x008e('0x19')]||null:null})['then'](function(_0x86ac13){logger['info'](_0x008e('0x14'),_0x5b87f2);logger[_0x008e('0xf')](_0x008e('0x14'),_0x5b87f2,JSON['stringify'](_0x86ac13));_0x42ae6f(_0x86ac13);})['catch'](function(_0x4aae46){logger[_0x008e('0x11')](_0x008e('0x14'),_0x4aae46[_0x008e('0x13')],_0x5b87f2);_0x1b51df(_0x4fed13['error'](0x1f4,_0x4aae46[_0x008e('0x13')]));});});}; \ No newline at end of file diff --git a/server/api/openchannelInteraction/index.js b/server/api/openchannelInteraction/index.js index 7699a0a..420b730 100644 --- a/server/api/openchannelInteraction/index.js +++ b/server/api/openchannelInteraction/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x847a=['tracked','openchannel','openchannelinteraction:addtags','put','delete','openchannelinteraction:destroy','destroy','removeTags','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','./openchannelInteraction.controller','get','index','isAuthenticated','/:id','show','/:id/messages','getMessages','download','post','addMessage','/:id/tags'];(function(_0x4b3f71,_0x5187ab){var _0x4aa5d3=function(_0x405195){while(--_0x405195){_0x4b3f71['push'](_0x4b3f71['shift']());}};_0x4aa5d3(++_0x5187ab);}(_0x847a,0xb7));var _0xa847=function(_0x1af35f,_0x5cf516){_0x1af35f=_0x1af35f-0x0;var _0x4f2c75=_0x847a[_0x1af35f];return _0x4f2c75;};'use strict';var multer=require('multer');var util=require(_0xa847('0x0'));var path=require(_0xa847('0x1'));var timeout=require(_0xa847('0x2'));var express=require(_0xa847('0x3'));var router=express[_0xa847('0x4')]();var fs_extra=require(_0xa847('0x5'));var auth=require(_0xa847('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0xa847('0x7'));var controller=require(_0xa847('0x8'));router[_0xa847('0x9')]('/',auth['isAuthenticated'](),controller[_0xa847('0xa')]);router[_0xa847('0x9')]('/describe',auth[_0xa847('0xb')](),controller['describe']);router['get'](_0xa847('0xc'),auth['isAuthenticated'](),controller[_0xa847('0xd')]);router[_0xa847('0x9')](_0xa847('0xe'),auth[_0xa847('0xb')](),controller[_0xa847('0xf')]);router[_0xa847('0x9')]('/:id/download',auth['isAuthenticated'](),controller[_0xa847('0x10')]);router[_0xa847('0x11')]('/',auth[_0xa847('0xb')](),controller['create']);router['post'](_0xa847('0xe'),auth[_0xa847('0xb')](),controller[_0xa847('0x12')]);router[_0xa847('0x11')](_0xa847('0x13'),auth[_0xa847('0xb')](),interaction[_0xa847('0x14')](_0xa847('0x15'),_0xa847('0x16')),controller['addTags']);router[_0xa847('0x17')](_0xa847('0xc'),auth[_0xa847('0xb')](),interaction[_0xa847('0x14')](_0xa847('0x15'),'openchannelinteraction:update'),controller['update']);router[_0xa847('0x18')](_0xa847('0xc'),auth['isAuthenticated'](),interaction[_0xa847('0x14')](_0xa847('0x15'),_0xa847('0x19')),controller[_0xa847('0x1a')]);router[_0xa847('0x18')]('/:id/tags',auth[_0xa847('0xb')](),controller[_0xa847('0x1b')]);module[_0xa847('0x1c')]=router; \ No newline at end of file +var _0x3fa7=['create','addMessage','/:id/tags','tracked','openchannel','openchannelinteraction:addtags','addTags','openchannelinteraction:update','update','delete','openchannelinteraction:destroy','destroy','removeTags','exports','multer','util','path','connect-timeout','express','Router','../../components/interaction/service','./openchannelInteraction.controller','get','isAuthenticated','index','/describe','describe','/:id','/:id/messages','getMessages','/:id/download','download','post'];(function(_0xb9eaa1,_0x141007){var _0x3ce5d3=function(_0x395c28){while(--_0x395c28){_0xb9eaa1['push'](_0xb9eaa1['shift']());}};_0x3ce5d3(++_0x141007);}(_0x3fa7,0x116));var _0x73fa=function(_0x410066,_0x421fba){_0x410066=_0x410066-0x0;var _0x216f0b=_0x3fa7[_0x410066];return _0x216f0b;};'use strict';var multer=require(_0x73fa('0x0'));var util=require(_0x73fa('0x1'));var path=require(_0x73fa('0x2'));var timeout=require(_0x73fa('0x3'));var express=require(_0x73fa('0x4'));var router=express[_0x73fa('0x5')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0x73fa('0x6'));var config=require('../../config/environment');var controller=require(_0x73fa('0x7'));router[_0x73fa('0x8')]('/',auth[_0x73fa('0x9')](),controller[_0x73fa('0xa')]);router[_0x73fa('0x8')](_0x73fa('0xb'),auth[_0x73fa('0x9')](),controller[_0x73fa('0xc')]);router[_0x73fa('0x8')](_0x73fa('0xd'),auth[_0x73fa('0x9')](),controller['show']);router[_0x73fa('0x8')](_0x73fa('0xe'),auth['isAuthenticated'](),controller[_0x73fa('0xf')]);router[_0x73fa('0x8')](_0x73fa('0x10'),auth[_0x73fa('0x9')](),controller[_0x73fa('0x11')]);router[_0x73fa('0x12')]('/',auth[_0x73fa('0x9')](),controller[_0x73fa('0x13')]);router[_0x73fa('0x12')](_0x73fa('0xe'),auth[_0x73fa('0x9')](),controller[_0x73fa('0x14')]);router['post'](_0x73fa('0x15'),auth['isAuthenticated'](),interaction[_0x73fa('0x16')](_0x73fa('0x17'),_0x73fa('0x18')),controller[_0x73fa('0x19')]);router['put'](_0x73fa('0xd'),auth[_0x73fa('0x9')](),interaction[_0x73fa('0x16')]('openchannel',_0x73fa('0x1a')),controller[_0x73fa('0x1b')]);router[_0x73fa('0x1c')](_0x73fa('0xd'),auth[_0x73fa('0x9')](),interaction[_0x73fa('0x16')](_0x73fa('0x17'),_0x73fa('0x1d')),controller[_0x73fa('0x1e')]);router[_0x73fa('0x1c')]('/:id/tags',auth[_0x73fa('0x9')](),controller[_0x73fa('0x1f')]);module[_0x73fa('0x20')]=router; \ No newline at end of file diff --git a/server/api/openchannelInteraction/openchannelInteraction.attributes.js b/server/api/openchannelInteraction/openchannelInteraction.attributes.js index 1be1ee4..6bf6061 100644 --- a/server/api/openchannelInteraction/openchannelInteraction.attributes.js +++ b/server/api/openchannelInteraction/openchannelInteraction.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xcddd=['DATE','STRING','out','sequelize','exports','BOOLEAN'];(function(_0x2771fe,_0x537e3e){var _0x599d6e=function(_0x19904c){while(--_0x19904c){_0x2771fe['push'](_0x2771fe['shift']());}};_0x599d6e(++_0x537e3e);}(_0xcddd,0x1a1));var _0xdcdd=function(_0x187d2f,_0xa7aad){_0x187d2f=_0x187d2f-0x0;var _0x1c9a3d=_0xcddd[_0x187d2f];return _0x1c9a3d;};'use strict';var Sequelize=require(_0xdcdd('0x0'));module[_0xdcdd('0x1')]={'closed':{'type':Sequelize[_0xdcdd('0x2')],'defaultValue':![]},'closedAt':{'type':Sequelize[_0xdcdd('0x3')]},'disposition':{'type':Sequelize[_0xdcdd('0x4')]},'secondDisposition':{'type':Sequelize[_0xdcdd('0x4')]},'thirdDisposition':{'type':Sequelize[_0xdcdd('0x4')]},'note':{'type':Sequelize[_0xdcdd('0x4')]},'read1stAt':{'type':Sequelize[_0xdcdd('0x3')]},'threadId':{'type':Sequelize[_0xdcdd('0x4')]},'externalUrl':{'type':Sequelize[_0xdcdd('0x4')]},'lastMsgAt':{'type':Sequelize[_0xdcdd('0x3')]},'lastMsgDirection':{'type':Sequelize['ENUM']('in',_0xdcdd('0x5')),'defaultValue':'in','allowNull':![]},'from':{'type':Sequelize[_0xdcdd('0x4')]},'autoreplyExecuted':{'type':Sequelize['BOOLEAN'],'defaultValue':![]}}; \ No newline at end of file +var _0x2427=['STRING','out','BOOLEAN','sequelize','exports','DATE'];(function(_0x1c3352,_0x590db5){var _0x48863f=function(_0x287ca0){while(--_0x287ca0){_0x1c3352['push'](_0x1c3352['shift']());}};_0x48863f(++_0x590db5);}(_0x2427,0x165));var _0x7242=function(_0x2e6eff,_0x45637e){_0x2e6eff=_0x2e6eff-0x0;var _0x4224f1=_0x2427[_0x2e6eff];return _0x4224f1;};'use strict';var Sequelize=require(_0x7242('0x0'));module[_0x7242('0x1')]={'closed':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'closedAt':{'type':Sequelize[_0x7242('0x2')]},'disposition':{'type':Sequelize['STRING']},'secondDisposition':{'type':Sequelize[_0x7242('0x3')]},'thirdDisposition':{'type':Sequelize['STRING']},'note':{'type':Sequelize[_0x7242('0x3')]},'read1stAt':{'type':Sequelize[_0x7242('0x2')]},'threadId':{'type':Sequelize[_0x7242('0x3')]},'externalUrl':{'type':Sequelize['STRING']},'lastMsgAt':{'type':Sequelize[_0x7242('0x2')]},'lastMsgDirection':{'type':Sequelize['ENUM']('in',_0x7242('0x4')),'defaultValue':'in','allowNull':![]},'from':{'type':Sequelize[_0x7242('0x3')]},'autoreplyExecuted':{'type':Sequelize[_0x7242('0x5')],'defaultValue':![]}}; \ No newline at end of file diff --git a/server/api/openchannelInteraction/openchannelInteraction.controller.js b/server/api/openchannelInteraction/openchannelInteraction.controller.js index 6cf823d..4861999 100644 --- a/server/api/openchannelInteraction/openchannelInteraction.controller.js +++ b/server/api/openchannelInteraction/openchannelInteraction.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x08da=['MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','getFullTextValue','ContactId','buildExpression','text','start','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','union','User','body','some','compact','isEmpty','OpenchannelAccountId','where','i.OpenchannelAccountId\x20IN\x20?','concat','createdAt','parse','$lte','\x20=\x20?','read','`unreadMessages`\x20=\x200','`unreadMessages`\x20>\x200','tag','filter','replace','isNumeric','i.id\x20LIKE\x20?','MATCH\x20(me.body)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','i.from\x20LIKE\x20?','CONCAT(c.firstName,\x20\x27\x20\x27,\x20c.lastName)\x20LIKE\x20?','group','QueryTypes','i.id','SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)','unreadMessages','contactName','DESC','i.OpenchannelAccountId\x20IS\x20NOT\x20NULL','role','agent','user','getOpenchannelAccounts','i.OpenchannelAccountId\x20IS\x20NULL','sequelize','toString','keyBy','merge','a.key','Account.mandatoryDisposition','CASE\x20WHEN\x20i.from\x20IS\x20NOT\x20NULL\x20AND\x20i.from\x20<>\x20\x27\x27\x20THEN\x20i.from\x20WHEN\x20(c.firstName\x20IS\x20NOT\x20NULL\x20AND\x20c.firstName\x20<>\x20\x27\x27)\x20OR\x20(c.lastName\x20IS\x20NOT\x20NULL\x20AND\x20c.lastName\x20<>\x20\x27\x27)\x20THEN\x20CONCAT(IFNULL(c.firstName,\x20\x27\x27),\x20\x27\x20\x27,\x20IFNULL(c.lastName,\x20\x27\x27))\x20ELSE\x20\x27Unknown\x27\x20END','c.firstName','Contact.firstName','c.lastName','Contact.lastName','c.email','c.phone','Contact.phone','c.mobile','Contact.mobile','c.fax','Contact.fax','o.fullname','o.internal','Owner.internal','GROUP_CONCAT(DISTINCT\x20t.id)','groupBy','OpenchannelInteractionId','all','rows','params','include','options','OpenchannelInteraction','describe','addMessage','OpenchannelMessage','omit','ids','getMessages','findOne','$gte','split','includeAll','findAll','Tag','color','emit','openchannelInteractionTags:save','removeTags','unix','root','server','files','join','attachments','format','transcript-%d-%s.zip','CmContact','lastName','Attachment','direction','Owner','get','mkdirSync','Openchannel','Account','N.A.','YYYY-MM-DD\x20HH:mm:ss','disposition','Public','Messages','basename','createReadStream','createWriteStream','System','firstName','secret','renderFile','views','downloadInteraction.ejs','transcript-','createPdfFromHTML','download','log','err','unlinkSync','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../components/export/pdf','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','socket.io-emitter','./openchannelInteraction.socket','sendStatus','end','status','offset','undefined','limit','count','set','Content-Range','json','save','update','then','destroy','error','stack','name','Users','map','fullname','TagIds','Tags','forEach','push','catch','rawAttributes','type','key','model','query','keys','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','pick','select','field','from','tools_tags','u.id','u.fullname','ui.OpenchannelInteractionId','user_has_openchannel_interactions','left_join','users','openchannel_interactions','cm_contacts','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL','o.id\x20=\x20i.UserId','a.id\x20=\x20i.OpenchannelAccountId','openchannel_messages','me.OpenchannelInteractionId\x20=\x20i.id','openchannel_interaction_has_tags','t.id\x20=\x20it.TagId','expr','search','parseSearch','conditions','find','value','having','`\x20>\x200','Contact','operator','$substring','length'];(function(_0x24b5bc,_0x2f2d50){var _0x3f3db7=function(_0x45d413){while(--_0x45d413){_0x24b5bc['push'](_0x24b5bc['shift']());}};_0x3f3db7(++_0x2f2d50);}(_0x08da,0x80));var _0xa08d=function(_0x1f9f37,_0x18776e){_0x1f9f37=_0x1f9f37-0x0;var _0x21c080=_0x08da[_0x1f9f37];return _0x21c080;};'use strict';var emlformat=require(_0xa08d('0x0'));var rimraf=require(_0xa08d('0x1'));var zipdir=require(_0xa08d('0x2'));var jsonpatch=require(_0xa08d('0x3'));var rp=require(_0xa08d('0x4'));var moment=require(_0xa08d('0x5'));var BPromise=require(_0xa08d('0x6'));var Mustache=require(_0xa08d('0x7'));var util=require(_0xa08d('0x8'));var path=require(_0xa08d('0x9'));var sox=require(_0xa08d('0xa'));var csv=require(_0xa08d('0xb'));var ejs=require(_0xa08d('0xc'));var fs=require('fs');var fs_extra=require(_0xa08d('0xd'));var _=require(_0xa08d('0xe'));var squel=require('squel');var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0xa08d('0xf'));var toCsv=require(_0xa08d('0xb'));var querystring=require(_0xa08d('0x10'));var Papa=require('papaparse');var Redis=require(_0xa08d('0x11'));var authService=require(_0xa08d('0x12'));var qs=require(_0xa08d('0x13'));var as=require(_0xa08d('0x14'));var pdf=require(_0xa08d('0x15'));var hardwareService=require(_0xa08d('0x16'));var logger=require(_0xa08d('0x17'))('api');var utils=require(_0xa08d('0x18'));var config=require(_0xa08d('0x19'));var licenseUtil=require(_0xa08d('0x1a'));var db=require(_0xa08d('0x1b'))['db'];config[_0xa08d('0x1c')]=_[_0xa08d('0x1d')](config[_0xa08d('0x1c')],{'host':'localhost','port':0x18eb});var socket=require(_0xa08d('0x1e'))(new Redis(config['redis']));require(_0xa08d('0x1f'))['register'](socket);function respondWithStatusCode(_0x4e1112,_0x14b08d){_0x14b08d=_0x14b08d||0xcc;return function(_0x284387){if(_0x284387){return _0x4e1112[_0xa08d('0x20')](_0x14b08d);}return _0x4e1112['status'](_0x14b08d)[_0xa08d('0x21')]();};}function respondWithResult(_0x51f8ff,_0x4bb05a){_0x4bb05a=_0x4bb05a||0xc8;return function(_0x594d05){if(_0x594d05){return _0x51f8ff[_0xa08d('0x22')](_0x4bb05a)['json'](_0x594d05);}};}function respondWithFilteredResult(_0x169d7a,_0x3884ac){return function(_0x525ccb){if(_0x525ccb){var _0x25817c=typeof _0x3884ac[_0xa08d('0x23')]===_0xa08d('0x24')&&typeof _0x3884ac[_0xa08d('0x25')]==='undefined';var _0x1528d7=_0x525ccb[_0xa08d('0x26')];var _0x49853f=_0x25817c?0x0:_0x3884ac[_0xa08d('0x23')];var _0x5722ed=_0x25817c?_0x525ccb[_0xa08d('0x26')]:_0x3884ac[_0xa08d('0x23')]+_0x3884ac[_0xa08d('0x25')];var _0x4c81ce;if(_0x5722ed>=_0x1528d7){_0x5722ed=_0x1528d7;_0x4c81ce=0xc8;}else{_0x4c81ce=0xce;}_0x169d7a[_0xa08d('0x22')](_0x4c81ce);return _0x169d7a[_0xa08d('0x27')](_0xa08d('0x28'),_0x49853f+'-'+_0x5722ed+'/'+_0x1528d7)[_0xa08d('0x29')](_0x525ccb);}return null;};}function patchUpdates(_0x442c7){return function(_0x1f70e3){try{jsonpatch['apply'](_0x1f70e3,_0x442c7,!![]);}catch(_0x1106f2){return BPromise['reject'](_0x1106f2);}return _0x1f70e3[_0xa08d('0x2a')]();};}function saveUpdates(_0x5b8f61,_0x1e1f58){return function(_0x5dece8){if(_0x5dece8){return _0x5dece8[_0xa08d('0x2b')](_0x5b8f61)[_0xa08d('0x2c')](function(_0x2c0b87){return _0x2c0b87;});}return null;};}function removeEntity(_0xd282b2,_0x134aef){return function(_0x154193){if(_0x154193){return _0x154193[_0xa08d('0x2d')]()[_0xa08d('0x2c')](function(){_0xd282b2[_0xa08d('0x22')](0xcc)[_0xa08d('0x21')]();});}};}function handleEntityNotFound(_0x23fdc2,_0x32ee96){return function(_0x46b432){if(!_0x46b432){_0x23fdc2[_0xa08d('0x20')](0x194);}return _0x46b432;};}function handleError(_0x111431,_0x23db66){_0x23db66=_0x23db66||0x1f4;return function(_0x708c01){logger[_0xa08d('0x2e')](_0x708c01[_0xa08d('0x2f')]);if(_0x708c01[_0xa08d('0x30')]){delete _0x708c01['name'];}_0x111431[_0xa08d('0x22')](_0x23db66)['send'](_0x708c01);};}function getInteractionUsers(_0x2e049e,_0x4cfe3d){return new BPromise(function(_0x941a0e,_0x3593a5){try{if(_0x4cfe3d[_0x2e049e['id']]){_0x2e049e[_0xa08d('0x31')]=_[_0xa08d('0x32')](_0x4cfe3d[_0x2e049e['id']],function(_0x217f52){return{'id':_0x217f52['id'],'fullname':_0x217f52[_0xa08d('0x33')]};});}}catch(_0x5fbf64){_0x3593a5(_0x5fbf64);}_0x941a0e(_0x2e049e);});}function getInteractionTags(_0x4a26ce,_0x151ac0){return new BPromise(function(_0x4b041b,_0x4c5360){try{if(_0x4a26ce[_0xa08d('0x34')]){_0x4a26ce[_0xa08d('0x35')]=[];_0x4a26ce[_0xa08d('0x34')]['split'](',')[_0xa08d('0x36')](function(_0x191001){_0x4a26ce[_0xa08d('0x35')][_0xa08d('0x37')](_0x151ac0[_0x191001]);});}delete _0x4a26ce['TagIds'];}catch(_0x462231){_0x4c5360(_0x462231);}_0x4b041b(_0x4a26ce);});}function updateOpenchannelInteraction(_0x19c250,_0x283d5c,_0x37ea10){return new BPromise(function(_0x4192fb,_0x6f1ed7){return getInteractionUsers(_0x19c250,_0x37ea10)[_0xa08d('0x2c')](function(_0x11a403){return getInteractionTags(_0x11a403,_0x283d5c);})[_0xa08d('0x2c')](function(_0x305e57){_0x4192fb(_0x305e57);})[_0xa08d('0x38')](function(_0x49e3e7){_0x6f1ed7(_0x49e3e7);});});}exports['index']=function(_0x335ed8,_0x25f30d){var _0x4f3fcb={},_0x13d73e={},_0x393934={'count':0x0,'rows':[]};var _0x46a369=_['map'](db['OpenchannelInteraction'][_0xa08d('0x39')],function(_0x2c7765){return{'name':_0x2c7765['fieldName'],'type':_0x2c7765[_0xa08d('0x3a')][_0xa08d('0x3b')]};});_0x13d73e[_0xa08d('0x3c')]=_[_0xa08d('0x32')](_0x46a369,_0xa08d('0x30'));_0x13d73e[_0xa08d('0x3d')]=_[_0xa08d('0x3e')](_0x335ed8[_0xa08d('0x3d')]);_0x13d73e[_0xa08d('0x3f')]=_[_0xa08d('0x40')](_0x13d73e[_0xa08d('0x3c')],_0x13d73e[_0xa08d('0x3d')]);_0x4f3fcb[_0xa08d('0x41')]=_[_0xa08d('0x40')](_0x13d73e[_0xa08d('0x3c')],qs['fields'](_0x335ed8[_0xa08d('0x3d')][_0xa08d('0x42')]));_0x4f3fcb[_0xa08d('0x41')]=_0x4f3fcb[_0xa08d('0x41')]['length']?_0x4f3fcb[_0xa08d('0x41')]:_0x13d73e['model'];if(!_0x335ed8[_0xa08d('0x3d')][_0xa08d('0x43')](_0xa08d('0x44'))){_0x4f3fcb[_0xa08d('0x25')]=qs[_0xa08d('0x25')](_0x335ed8[_0xa08d('0x3d')]['limit']);_0x4f3fcb['offset']=qs[_0xa08d('0x23')](_0x335ed8[_0xa08d('0x3d')][_0xa08d('0x23')]);}_0x4f3fcb[_0xa08d('0x45')]=qs['sort'](_0x335ed8['query'][_0xa08d('0x46')]);_0x4f3fcb['where']=qs[_0xa08d('0x3f')](_[_0xa08d('0x47')](_0x335ed8[_0xa08d('0x3d')],_0x13d73e[_0xa08d('0x3f')]),_0x46a369);var _0x57ca19=[];var _0x1fc3dd=squel[_0xa08d('0x48')]()[_0xa08d('0x49')]('id')[_0xa08d('0x49')](_0xa08d('0x30'))[_0xa08d('0x49')]('color')[_0xa08d('0x4a')](_0xa08d('0x4b'));var _0x11b300=squel[_0xa08d('0x48')]()[_0xa08d('0x49')](_0xa08d('0x4c'))[_0xa08d('0x49')](_0xa08d('0x4d'))[_0xa08d('0x49')](_0xa08d('0x4e'))[_0xa08d('0x4a')](_0xa08d('0x4f'),'ui')[_0xa08d('0x50')](_0xa08d('0x51'),'u','u.id\x20=\x20ui.UserId');var _0x36fba9=squel[_0xa08d('0x48')]()[_0xa08d('0x4a')](_0xa08d('0x52'),'i')[_0xa08d('0x50')](_0xa08d('0x53'),'c',_0xa08d('0x54'))['left_join']('users','o',_0xa08d('0x55'))[_0xa08d('0x50')]('openchannel_accounts','a',_0xa08d('0x56'))['left_join'](_0xa08d('0x57'),'me',_0xa08d('0x58'))[_0xa08d('0x50')](_0xa08d('0x59'),'it','it.OpenchannelInteractionId\x20=\x20i.id')[_0xa08d('0x50')](_0xa08d('0x4b'),'t',_0xa08d('0x5a'));var _0x20c068=squel[_0xa08d('0x5b')]();var _0x2bd684=[];var _0x3bf6ce=squel[_0xa08d('0x5b')]();var _0x45e2a6;if(_0x335ed8[_0xa08d('0x3d')][_0xa08d('0x5c')]){_0x45e2a6=as[_0xa08d('0x5d')](_0x335ed8[_0xa08d('0x3d')][_0xa08d('0x5c')]);var _0x38271e=_0x45e2a6['sqlOperator'];for(var _0x201349=0x0;_0x201349<_0x45e2a6['conditions']['length'];_0x201349++){var _0x48aa03=_0x45e2a6[_0xa08d('0x5e')][_0x201349];var _0x4f6fea='i';var _0x30ca0b=_[_0xa08d('0x5f')](_0x46a369,[_0xa08d('0x30'),_0x48aa03[_0xa08d('0x49')]]);if(!_0x30ca0b){switch(_0x48aa03[_0xa08d('0x49')]){case'unreadMessages':if(_0x48aa03[_0xa08d('0x60')]==0x1){_0x36fba9[_0xa08d('0x61')]('`'+_0x48aa03[_0xa08d('0x49')]+'`\x20=\x200');}else{_0x36fba9[_0xa08d('0x61')]('`'+_0x48aa03[_0xa08d('0x49')]+_0xa08d('0x62'));}break;case _0xa08d('0x63'):if(_0x48aa03[_0xa08d('0x64')]===_0xa08d('0x65')){if(_0x48aa03[_0xa08d('0x60')]['split']('\x20')[_0xa08d('0x66')]>0x1){_0x20c068[_0x38271e](_0xa08d('0x67'),qs[_0xa08d('0x68')](_0x48aa03[_0xa08d('0x60')]),null);}else{var _0x3dda8d='%'+_0x48aa03[_0xa08d('0x60')]+'%';_0x20c068[_0x38271e]('c.firstName\x20LIKE\x20?\x20OR\x20c.lastName\x20LIKE\x20?\x20OR\x20c.email\x20LIKE\x20?',_0x3dda8d,_0x3dda8d,_0x3dda8d);}}else{_0x30ca0b=_[_0xa08d('0x5f')](_0x46a369,[_0xa08d('0x30'),_0xa08d('0x69')]);_0x48aa03['field']=_0xa08d('0x69');_0x23539e=as[_0xa08d('0x6a')](_0x4f6fea,_0x30ca0b['type'],_0x48aa03);_0x20c068[_0x38271e](_0x23539e[_0xa08d('0x6b')],_0x23539e['value'][_0xa08d('0x6c')],_0x23539e[_0xa08d('0x60')][_0xa08d('0x21')]);}break;case'Tag':var _0x159917=_0x48aa03[_0xa08d('0x60')]['split'](',')['map'](function(_0x4aa9e4){return Number(_0x4aa9e4);});_0x159917[_0xa08d('0x36')](function(_0x3a3069){_0x3bf6ce['or'](_0xa08d('0x6d'),'%,'+_0x3a3069+',%');});_0x2bd684=_[_0xa08d('0x6e')](_0x2bd684,_0x159917);break;case _0xa08d('0x6f'):if(_0x48aa03['operator']===_0xa08d('0x65')){_0x20c068[_0x38271e]('CONCAT_WS(\x27\x20\x27,\x20o.name,\x20o.fullname)\x20LIKE\x20?','%'+_0x48aa03[_0xa08d('0x60')]+'%',null);}else{_0x30ca0b=_[_0xa08d('0x5f')](_0x46a369,['name','UserId']);_0x48aa03[_0xa08d('0x49')]='UserId';_0x23539e=as[_0xa08d('0x6a')](_0x4f6fea,_0x30ca0b[_0xa08d('0x3a')],_0x48aa03);_0x20c068[_0x38271e](_0x23539e['text'],_0x23539e[_0xa08d('0x60')][_0xa08d('0x6c')],_0x23539e[_0xa08d('0x60')][_0xa08d('0x21')]);}break;case _0xa08d('0x70'):_0x23539e=as['buildExpression']('me',null,_0x48aa03);_0x20c068[_0x38271e](_0x23539e['text'],_0x23539e[_0xa08d('0x60')]['start'],_0x23539e[_0xa08d('0x60')][_0xa08d('0x21')]);break;}}else{var _0x23539e=as[_0xa08d('0x6a')](_0x4f6fea,_0x30ca0b[_0xa08d('0x3a')],_0x48aa03);_0x20c068[_0x38271e](_0x23539e[_0xa08d('0x6b')],_0x23539e[_0xa08d('0x60')][_0xa08d('0x6c')],_0x23539e[_0xa08d('0x60')]['end']);}}}else{var _0x559249=_(_0x335ed8[_0xa08d('0x3d')])[_0xa08d('0x3e')]()['map'](function(_0x825a11){return _[_0xa08d('0x71')](_0x46a369,['name',_0x825a11])?_0x825a11:undefined;})[_0xa08d('0x72')]()[_0xa08d('0x60')]();if(!_[_0xa08d('0x73')](_0x559249)){_0x559249[_0xa08d('0x36')](function(_0x31a9fa){if(_0x31a9fa===_0xa08d('0x74')){_0x36fba9[_0xa08d('0x75')](_0xa08d('0x76'),[][_0xa08d('0x77')](_0x335ed8[_0xa08d('0x3d')][_0x31a9fa]));}else if(_0x31a9fa===_0xa08d('0x78')){var _0x2ec26c=JSON['parse'](_0x335ed8['query'][_0x31a9fa])['$gte'];var _0x1b07ed=JSON[_0xa08d('0x79')](_0x335ed8[_0xa08d('0x3d')][_0x31a9fa])[_0xa08d('0x7a')];_0x36fba9[_0xa08d('0x75')]('i.createdAt\x20BETWEEN\x20?\x20AND\x20?',_0x2ec26c,_0x1b07ed);}else{if(_0x335ed8['query'][_0x31a9fa]==='null'){_0x36fba9[_0xa08d('0x75')]('i.'+_0x31a9fa+'\x20IS\x20NULL');}else{_0x36fba9[_0xa08d('0x75')]('i.'+_0x31a9fa+_0xa08d('0x7b'),_0x335ed8[_0xa08d('0x3d')][_0x31a9fa]);}}});}if(_0x335ed8[_0xa08d('0x3d')][_0xa08d('0x7c')]){if(_0x335ed8[_0xa08d('0x3d')][_0xa08d('0x7c')]==0x1){_0x36fba9[_0xa08d('0x61')](_0xa08d('0x7d'));}else{_0x36fba9[_0xa08d('0x61')](_0xa08d('0x7e'));}}if(_0x335ed8[_0xa08d('0x3d')][_0xa08d('0x7f')]){_0x2bd684=_['isArray'](_0x335ed8['query']['tag'])?_0x335ed8['query'][_0xa08d('0x7f')]:new Array(_0x335ed8['query'][_0xa08d('0x7f')]);_0x2bd684['forEach'](function(_0x2e0841){_0x3bf6ce['or'](_0xa08d('0x6d'),'%,'+_0x2e0841+',%');});}if(_0x335ed8['query'][_0xa08d('0x80')]){var _0x1de6ff=_0x335ed8['query'][_0xa08d('0x80')]['replace']('\x5c','\x5c\x5c')[_0xa08d('0x81')](/'/g,'\x27\x27');if(qs[_0xa08d('0x82')](_0x1de6ff)){_0x20c068['or'](_0xa08d('0x83'),_0x1de6ff+'%');}else{_0x20c068['or'](_0xa08d('0x84'),qs['getFullTextValue'](_0x1de6ff))['or'](_0xa08d('0x85'),_0x1de6ff+'%')['or'](_0xa08d('0x86'),_0x1de6ff+'%');}}}_0x36fba9[_0xa08d('0x75')](_0x20c068);_0x36fba9[_0xa08d('0x87')]('i.id');var _0x11f769={'type':db['Sequelize'][_0xa08d('0x88')]['SELECT'],'raw':!![]};var _0x27ed64=_0x36fba9['clone']();_0x27ed64[_0xa08d('0x49')](_0xa08d('0x89'));_0x27ed64[_0xa08d('0x49')](_0xa08d('0x8a'),_0xa08d('0x8b'));if(_0x4f3fcb['order']){_0x4f3fcb['order']['forEach'](function(_0x5e49ed){var _0x31c103=_0x5e49ed[0x0]===_0xa08d('0x8c')?_0x5e49ed[0x0]:'i.'+_0x5e49ed[0x0];_0x36fba9['order'](_0x31c103,_0x5e49ed[0x1]===_0xa08d('0x8d')?![]:!![]);});}if(!_[_0xa08d('0x73')](_0x2bd684)){_0x36fba9[_0xa08d('0x61')](_0x3bf6ce);_0x27ed64[_0xa08d('0x75')]('t.id\x20IN\x20?',_0x2bd684);}BPromise['resolve']()[_0xa08d('0x2c')](function(){if(!_0x45e2a6){if(_0x335ed8[_0xa08d('0x3d')][_0xa08d('0x74')])return;_0x27ed64['where'](_0xa08d('0x8e'));_0x36fba9[_0xa08d('0x75')](_0xa08d('0x8e'));return;}if(_0x335ed8['user'][_0xa08d('0x8f')]!==_0xa08d('0x90'))return;return _0x335ed8[_0xa08d('0x91')][_0xa08d('0x92')]({'attributes':['id'],'raw':!![]})[_0xa08d('0x2c')](function(_0xe538bb){if(_['isEmpty'](_0xe538bb)){_0x27ed64[_0xa08d('0x75')](_0xa08d('0x93'));_0x36fba9[_0xa08d('0x75')](_0xa08d('0x93'));}else{_0x27ed64[_0xa08d('0x75')](_0xa08d('0x76'),_['map'](_0xe538bb,'id'));_0x36fba9[_0xa08d('0x75')](_0xa08d('0x76'),_[_0xa08d('0x32')](_0xe538bb,'id'));}});})[_0xa08d('0x2c')](function(){if(_0x335ed8['user'][_0xa08d('0x8f')]===_0xa08d('0x90')&&!_0x45e2a6&&!_0x335ed8[_0xa08d('0x3d')][_0xa08d('0x74')])return[];return db[_0xa08d('0x94')]['query'](_0x27ed64[_0xa08d('0x95')](),_0x11f769);})[_0xa08d('0x2c')](function(_0x155739){_0x393934[_0xa08d('0x26')]=_0x155739[_0xa08d('0x66')];if(_0x393934[_0xa08d('0x26')]===0x0)return[];return db[_0xa08d('0x94')]['query'](_0x1fc3dd['toString'](),_0x11f769)[_0xa08d('0x2c')](function(_0x248331){_0x57ca19=_[_0xa08d('0x96')](_0x248331,'id');_0x11f769=_[_0xa08d('0x97')](_0x11f769,{'model':db['OpenchannelInteraction'],'mapToModel':!![],'raw':!![],'nest':!![]});if(_0x335ed8[_0xa08d('0x3d')][_0xa08d('0x42')]){_0x4f3fcb[_0xa08d('0x41')][_0xa08d('0x36')](function(_0x4a6d1a){_0x36fba9[_0xa08d('0x49')]('i.'+_0x4a6d1a);});}else{_0x36fba9[_0xa08d('0x49')](_0xa08d('0x8a'),'unreadMessages');_0x36fba9[_0xa08d('0x49')](_0xa08d('0x98'),'Account.key');_0x36fba9[_0xa08d('0x49')]('a.mandatoryDisposition',_0xa08d('0x99'));_0x36fba9['field'](_0xa08d('0x9a'),'contactName');_0x36fba9[_0xa08d('0x49')]('i.*');_0x36fba9['field'](_0xa08d('0x9b'),_0xa08d('0x9c'));_0x36fba9[_0xa08d('0x49')](_0xa08d('0x9d'),_0xa08d('0x9e'));_0x36fba9[_0xa08d('0x49')](_0xa08d('0x9f'),'Contact.email');_0x36fba9['field'](_0xa08d('0xa0'),_0xa08d('0xa1'));_0x36fba9['field'](_0xa08d('0xa2'),_0xa08d('0xa3'));_0x36fba9['field'](_0xa08d('0xa4'),_0xa08d('0xa5'));_0x36fba9[_0xa08d('0x49')](_0xa08d('0xa6'),'Owner.fullname');_0x36fba9[_0xa08d('0x49')](_0xa08d('0xa7'),_0xa08d('0xa8'));_0x36fba9[_0xa08d('0x49')](_0xa08d('0xa9'),'TagIds');}if(_0x4f3fcb[_0xa08d('0x25')])_0x36fba9[_0xa08d('0x25')](_0x4f3fcb[_0xa08d('0x25')]);if(_0x4f3fcb['offset'])_0x36fba9[_0xa08d('0x23')](_0x4f3fcb[_0xa08d('0x23')]);return db[_0xa08d('0x94')][_0xa08d('0x3d')](_0x36fba9[_0xa08d('0x95')](),_0x11f769);})[_0xa08d('0x2c')](function(_0x488285){if(_0x488285[_0xa08d('0x66')]>0x0)_0x11b300[_0xa08d('0x75')]('ui.OpenchannelInteractionId\x20IN\x20?',_[_0xa08d('0x32')](_0x488285,'id'));return db['sequelize'][_0xa08d('0x3d')](_0x11b300[_0xa08d('0x95')](),_0x11f769)[_0xa08d('0x2c')](function(_0x36fc3f){var _0x50eff2=_[_0xa08d('0xaa')](_0x36fc3f,_0xa08d('0xab'));var _0x16c344=[];_0x488285[_0xa08d('0x36')](function(_0x2f04d2){_0x16c344[_0xa08d('0x37')](updateOpenchannelInteraction(_0x2f04d2,_0x57ca19,_0x50eff2));});return BPromise[_0xa08d('0xac')](_0x16c344);});});})[_0xa08d('0x2c')](function(_0xb549c2){_0x393934[_0xa08d('0xad')]=_0xb549c2;return _0x393934;})[_0xa08d('0x2c')](respondWithFilteredResult(_0x25f30d,_0x4f3fcb))[_0xa08d('0x38')](handleError(_0x25f30d,null));};exports['show']=function(_0x36c9b8,_0x74ef24){var _0x105fc3={};if(_0x36c9b8[_0xa08d('0x3d')][_0xa08d('0x3a')]&&_0x36c9b8['query'][_0xa08d('0x3a')]===_0xa08d('0x4a')){_0x105fc3[_0xa08d('0x4a')]=_0x36c9b8['params']['id'];}else{_0x105fc3['id']=_0x36c9b8[_0xa08d('0xae')]['id'];}var _0x3f41ae={'raw':![],'where':_0x105fc3},_0x50af9e={};_0x50af9e[_0xa08d('0x3c')]=_['keys'](db['OpenchannelInteraction'][_0xa08d('0x39')]);_0x50af9e[_0xa08d('0x3d')]=_[_0xa08d('0x3e')](_0x36c9b8[_0xa08d('0x3d')]);_0x50af9e['filters']=_['intersection'](_0x50af9e[_0xa08d('0x3c')],_0x50af9e[_0xa08d('0x3d')]);_0x3f41ae[_0xa08d('0x41')]=_[_0xa08d('0x40')](_0x50af9e[_0xa08d('0x3c')],qs[_0xa08d('0x42')](_0x36c9b8[_0xa08d('0x3d')][_0xa08d('0x42')]));_0x3f41ae[_0xa08d('0x41')]=_0x3f41ae[_0xa08d('0x41')][_0xa08d('0x66')]?_0x3f41ae['attributes']:_0x50af9e[_0xa08d('0x3c')];if(_0x36c9b8['query']['includeAll']){_0x3f41ae[_0xa08d('0xaf')]=[{'all':!![]}];}_0x3f41ae=_[_0xa08d('0x97')]({},_0x3f41ae,_0x36c9b8[_0xa08d('0xb0')]);return db[_0xa08d('0xb1')][_0xa08d('0x5f')](_0x3f41ae)['then'](handleEntityNotFound(_0x74ef24,null))['then'](respondWithResult(_0x74ef24,null))[_0xa08d('0x38')](handleError(_0x74ef24,null));};exports['create']=function(_0x8d4c80,_0x4534d9){return db['OpenchannelInteraction']['create'](_0x8d4c80[_0xa08d('0x70')],{})[_0xa08d('0x2c')](respondWithResult(_0x4534d9,0xc9))[_0xa08d('0x38')](handleError(_0x4534d9,null));};exports[_0xa08d('0x2b')]=function(_0x366415,_0x25b870){if(_0x366415['body']['id']){delete _0x366415['body']['id'];}return db[_0xa08d('0xb1')][_0xa08d('0x5f')]({'where':{'id':_0x366415['params']['id']}})[_0xa08d('0x2c')](handleEntityNotFound(_0x25b870,null))[_0xa08d('0x2c')](saveUpdates(_0x366415[_0xa08d('0x70')],null))[_0xa08d('0x2c')](respondWithResult(_0x25b870,null))[_0xa08d('0x38')](handleError(_0x25b870,null));};exports['destroy']=function(_0x290dc3,_0x4e1bf3){return db['OpenchannelInteraction']['find']({'where':{'id':_0x290dc3['params']['id']}})[_0xa08d('0x2c')](handleEntityNotFound(_0x4e1bf3,null))[_0xa08d('0x2c')](removeEntity(_0x4e1bf3,null))[_0xa08d('0x38')](handleError(_0x4e1bf3,null));};exports[_0xa08d('0xb2')]=function(_0x22dc52,_0x2300e1){return db[_0xa08d('0xb1')]['describe']()[_0xa08d('0x2c')](respondWithResult(_0x2300e1,null))[_0xa08d('0x38')](handleError(_0x2300e1,null));};exports[_0xa08d('0xb3')]=function(_0x258536,_0x316530,_0x45ef29){return db[_0xa08d('0xb4')][_0xa08d('0x5f')]({'where':{'id':_0x258536[_0xa08d('0xae')]['id']}})[_0xa08d('0x2c')](handleEntityNotFound(_0x316530,null))['then'](function(_0x1ea9a1){if(_0x1ea9a1){return _0x1ea9a1[_0xa08d('0xb3')](_0x258536[_0xa08d('0x70')]['ids'],_[_0xa08d('0xb5')](_0x258536[_0xa08d('0x70')],[_0xa08d('0xb6'),'id'])||{});}})['then'](respondWithResult(_0x316530,null))[_0xa08d('0x38')](handleError(_0x316530,null));};exports[_0xa08d('0xb7')]=function(_0x451075,_0x2fb741,_0x35da0d){var _0x51e8ea={'raw':![],'where':{}};var _0x5dec19={};var _0x2309c4={'count':0x0,'rows':[]};return db['OpenchannelInteraction'][_0xa08d('0xb8')]({'where':{'id':_0x451075[_0xa08d('0xae')]['id']}})[_0xa08d('0x2c')](handleEntityNotFound(_0x2fb741,null))['then'](function(_0x55a2d5){if(_0x55a2d5){_0x5dec19[_0xa08d('0x3c')]=_['keys'](db['OpenchannelMessage']['rawAttributes']);_0x5dec19[_0xa08d('0x3d')]=_['keys'](_0x451075[_0xa08d('0x3d')]);_0x5dec19['filters']=_[_0xa08d('0x40')](_0x5dec19[_0xa08d('0x3c')],_0x5dec19[_0xa08d('0x3d')]);_0x51e8ea[_0xa08d('0x41')]=_[_0xa08d('0x40')](_0x5dec19[_0xa08d('0x3c')],qs['fields'](_0x451075[_0xa08d('0x3d')][_0xa08d('0x42')]));_0x51e8ea[_0xa08d('0x41')]=_0x51e8ea['attributes']['length']?_0x51e8ea[_0xa08d('0x41')]:_0x5dec19[_0xa08d('0x3c')];if(!_0x451075[_0xa08d('0x3d')][_0xa08d('0x43')](_0xa08d('0x44'))){_0x51e8ea[_0xa08d('0x25')]=qs[_0xa08d('0x25')](_0x451075[_0xa08d('0x3d')][_0xa08d('0x25')]);_0x51e8ea['offset']=qs['offset'](_0x451075[_0xa08d('0x3d')][_0xa08d('0x23')]);}_0x51e8ea[_0xa08d('0x45')]=qs['sort'](_0x451075[_0xa08d('0x3d')][_0xa08d('0x46')]);_0x51e8ea[_0xa08d('0x75')]=qs[_0xa08d('0x3f')](_['pick'](_0x451075['query'],_0x5dec19[_0xa08d('0x3f')]));_0x51e8ea[_0xa08d('0x75')][_0xa08d('0xab')]=_0x55a2d5['id'];if(_0x451075[_0xa08d('0x3d')][_0xa08d('0x80')]){_0x51e8ea['where']=_['merge'](_0x51e8ea[_0xa08d('0x75')],{'$or':_[_0xa08d('0x32')](_0x51e8ea[_0xa08d('0x41')],function(_0x4913f1){var _0x30fca7={};_0x30fca7[_0x4913f1]={'$like':'%'+_0x451075[_0xa08d('0x3d')]['filter']+'%'};return _0x30fca7;})});}if(_0x451075[_0xa08d('0x3d')][_0xa08d('0xb9')]){var _0x5d5c98=_0x451075[_0xa08d('0x3d')][_0xa08d('0xb9')][_0xa08d('0xba')](',');var _0x5955d7={};_0x5955d7[_0x5d5c98[0x0]]={'$gte':moment(_0x5d5c98[0x1])['format']('YYYY-MM-DD\x20HH:mm:ss')};_0x51e8ea[_0xa08d('0x75')]=_['merge'](_0x51e8ea['where'],_0x5955d7);}_0x51e8ea=_[_0xa08d('0x97')]({},_0x51e8ea,_0x451075[_0xa08d('0xb0')]);return db[_0xa08d('0xb4')][_0xa08d('0x26')]({'where':_0x51e8ea['where']})[_0xa08d('0x2c')](function(_0x1d1d9c){_0x2309c4[_0xa08d('0x26')]=_0x1d1d9c;if(_0x451075[_0xa08d('0x3d')][_0xa08d('0xbb')]){_0x51e8ea['include']=[{'all':!![]}];}return db[_0xa08d('0xb4')][_0xa08d('0xbc')](_0x51e8ea);})[_0xa08d('0x2c')](function(_0x25a2c4){_0x2309c4['rows']=_0x25a2c4;return _0x2309c4;});}})['then'](respondWithFilteredResult(_0x2fb741,_0x51e8ea))[_0xa08d('0x38')](handleError(_0x2fb741,null));};exports['addTags']=function(_0x23b92f,_0x42bc35,_0x5d226b){return db['OpenchannelInteraction'][_0xa08d('0x5f')]({'where':{'id':_0x23b92f[_0xa08d('0xae')]['id']}})['then'](handleEntityNotFound(_0x42bc35,null))['then'](function(_0x279dd8){if(_0x279dd8){return _0x279dd8['setTags'](_0x23b92f[_0xa08d('0x70')][_0xa08d('0xb6')],_[_0xa08d('0xb5')](_0x23b92f[_0xa08d('0x70')],[_0xa08d('0xb6'),'id'])||{})['spread'](function(){return db[_0xa08d('0xbd')][_0xa08d('0xbc')]({'attributes':['id',_0xa08d('0x30'),_0xa08d('0xbe')],'where':{'id':_0x23b92f[_0xa08d('0x70')][_0xa08d('0xb6')]}});})[_0xa08d('0x2c')](function(_0x3540f7){socket[_0xa08d('0xbf')](_0xa08d('0xc0'),{'id':Number(_0x23b92f[_0xa08d('0xae')]['id']),'tags':_0x3540f7||[]});return{'id':Number(_0x23b92f[_0xa08d('0xae')]['id']),'tags':_0x3540f7||[]};});}})[_0xa08d('0x2c')](respondWithResult(_0x42bc35,null))['catch'](handleError(_0x42bc35,null));};exports[_0xa08d('0xc1')]=function(_0x1f9049,_0x1c07b4,_0x449990){return db[_0xa08d('0xb1')][_0xa08d('0x5f')]({'where':{'id':_0x1f9049[_0xa08d('0xae')]['id']}})[_0xa08d('0x2c')](handleEntityNotFound(_0x1c07b4,null))[_0xa08d('0x2c')](function(_0x35ec58){if(_0x35ec58){return _0x35ec58[_0xa08d('0xc1')](_0x1f9049[_0xa08d('0x3d')]['ids']);}})['then'](respondWithStatusCode(_0x1c07b4,null))[_0xa08d('0x38')](handleError(_0x1c07b4,null));};exports['download']=function(_0x5f1096,_0x4aec17){var _0x21eaeb=moment()[_0xa08d('0xc2')]()[_0xa08d('0x95')]();var _0x3a1cce=path['join'](config[_0xa08d('0xc3')],_0xa08d('0xc4'),_0xa08d('0xc5'),'tmp');var _0x1c3c82=path[_0xa08d('0xc6')](config[_0xa08d('0xc3')],_0xa08d('0xc4'),'files',_0xa08d('0xc7'));var _0x5a4aec=path[_0xa08d('0xc6')](_0x3a1cce,_0x21eaeb);var _0x4be22e=util[_0xa08d('0xc8')](_0xa08d('0xc9'),_0x5f1096[_0xa08d('0xae')]['id'],_0x21eaeb);var _0x7b0753=path['join'](_0x3a1cce,_0x4be22e);var _0x382298=[];_0x382298[_0xa08d('0x37')]({'model':db[_0xa08d('0x6f')],'as':_0xa08d('0x6f'),'attributes':['id',_0xa08d('0x33')],'raw':!![]});_0x382298['push']({'model':db[_0xa08d('0xca')],'as':'Contact','attributes':['id','firstName',_0xa08d('0xcb')],'raw':!![]});if(_0x5f1096[_0xa08d('0x3d')][_0xa08d('0xc7')]){_0x382298[_0xa08d('0x37')]({'model':db[_0xa08d('0xcc')],'as':_0xa08d('0xcc'),'raw':!![]});}var _0x3d30c6=[{'model':db['OpenchannelMessage'],'as':'Messages','attributes':['id',_0xa08d('0x70'),_0xa08d('0x78'),_0xa08d('0xcd'),'secret',_0xa08d('0x7c')],'include':_0x382298}];_0x3d30c6[_0xa08d('0x37')]({'model':db['OpenchannelAccount'],'as':'Account','attributes':['id',_0xa08d('0x30')]});_0x3d30c6[_0xa08d('0x37')]({'model':db[_0xa08d('0x6f')],'as':_0xa08d('0xce'),'attributes':['id','fullname']});return db[_0xa08d('0xb1')]['find']({'where':{'id':_0x5f1096[_0xa08d('0xae')]['id']},'include':_0x3d30c6})[_0xa08d('0x2c')](handleEntityNotFound(_0x4aec17,null))['then'](function(_0xb10689){if(_0xb10689){var _0x45e391=_0xb10689[_0xa08d('0xcf')]({'plain':!![]});fs[_0xa08d('0xd0')](_0x5a4aec);var _0x2cd63e={'channel':_0xa08d('0xd1'),'account':_0x45e391[_0xa08d('0xd2')][_0xa08d('0x30')],'agent':_0x45e391['Owner']?_0x45e391[_0xa08d('0xce')][_0xa08d('0x33')]:_0xa08d('0xd3'),'createdAt':moment(_0x45e391['createdAt'])[_0xa08d('0xc8')]('YYYY-MM-DD\x20HH:mm:ss')[_0xa08d('0x95')](),'closedAt':_0x45e391['closed']?moment(_0x45e391['closedAt'])[_0xa08d('0xc8')](_0xa08d('0xd4'))[_0xa08d('0x95')]():'','disposition':_0x45e391[_0xa08d('0xd5')],'visibility':_0x45e391['threadId']?_0xa08d('0xd6'):'Private','messages':_(_0x45e391[_0xa08d('0xd7')])[_0xa08d('0x80')]({'secret':![]})[_0xa08d('0x32')](function(_0x48c46e){if(_0x48c46e[_0xa08d('0xcc')]){var _0x40bfde=path[_0xa08d('0xc6')](_0x1c3c82,_0x48c46e['Attachment'][_0xa08d('0xd8')]);if(fs['existsSync'](_0x40bfde)){fs[_0xa08d('0xd9')](_0x40bfde)['pipe'](fs[_0xa08d('0xda')](path[_0xa08d('0xc6')](_0x5a4aec,_0x48c46e[_0xa08d('0xcc')][_0xa08d('0xd8')])));}}return{'date':moment(_0x48c46e[_0xa08d('0x78')])[_0xa08d('0xc8')]('YYYY-MM-DD\x20HH:mm:ss')[_0xa08d('0x95')](),'sender':_0x48c46e[_0xa08d('0xcd')]==='out'?_0x48c46e[_0xa08d('0x6f')]?_0x48c46e[_0xa08d('0x6f')][_0xa08d('0x33')]:_0xa08d('0xdb'):_0x48c46e[_0xa08d('0x63')][_0xa08d('0xdc')]+(_0x48c46e['Contact']['lastName']?'\x20'+_0x48c46e[_0xa08d('0x63')]['lastName']:''),'body':_0x48c46e[_0xa08d('0xcc')]?_0x48c46e[_0xa08d('0xcc')][_0xa08d('0xd8')]:_0x48c46e[_0xa08d('0x70')],'direction':_0x48c46e['direction']==='out'?'A':'C','secret':_0x48c46e[_0xa08d('0xdd')],'read':_0x48c46e['read'],'attachment':_0x48c46e[_0xa08d('0xcc')]};})['value']()};return ejs[_0xa08d('0xde')](path[_0xa08d('0xc6')](config['root'],_0xa08d('0xc4'),_0xa08d('0xdf'),_0xa08d('0xe0')),{'interaction':_0x2cd63e})['then'](function(_0x2b44d6){var _0x4fdda7=path[_0xa08d('0xc6')](_0x5a4aec,_0xa08d('0xe1')+_0x45e391['id']+'-'+_0x21eaeb+'.pdf');var _0x20d4fe={'path':_0x4fdda7,'channel':_0xa08d('0xd1'),'interactionId':_0x45e391['id']};return pdf[_0xa08d('0xe2')](_0x2b44d6,_0x20d4fe);})[_0xa08d('0x2c')](function(){return new BPromise(function(_0x85649f,_0x10e614){zipdir(_0x5a4aec,{'saveTo':_0x7b0753},function(_0x2dbc7a,_0x5c8004){if(_0x2dbc7a)return _0x10e614(_0x2dbc7a);return _0x85649f(_0x5c8004);});})[_0xa08d('0x2c')](function(){return new BPromise(function(_0xa57599,_0x33c750){rimraf(_0x5a4aec,function(_0x5795b5){if(_0x5795b5)_0x33c750(_0x5795b5);return _0xa57599();});});})[_0xa08d('0x2c')](function(){return _0x4aec17[_0xa08d('0xe3')](_0x7b0753,_0x4be22e,function(_0x4ec0b9){if(_0x4ec0b9){console[_0xa08d('0xe4')](_0xa08d('0xe5'),_0x4ec0b9);}else{fs[_0xa08d('0xe6')](_0x7b0753);}});});});}else{return _0x4aec17[_0xa08d('0x20')](0xc8);}})[_0xa08d('0x38')](handleError(_0x4aec17,null));}; \ No newline at end of file +var _0x63e7=['forEach','push','catch','OpenchannelInteraction','fieldName','type','key','model','name','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','field','color','from','tools_tags','u.fullname','user_has_openchannel_interactions','left_join','users','u.id\x20=\x20ui.UserId','select','openchannel_interactions','cm_contacts','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL','o.id\x20=\x20i.UserId','openchannel_accounts','a.id\x20=\x20i.OpenchannelAccountId','openchannel_messages','me.OpenchannelInteractionId\x20=\x20i.id','openchannel_interaction_has_tags','it.OpenchannelInteractionId\x20=\x20i.id','t.id\x20=\x20it.TagId','expr','search','parseSearch','sqlOperator','conditions','find','unreadMessages','value','having','`\x20=\x200','`\x20>\x200','operator','$substring','MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','c.firstName\x20LIKE\x20?\x20OR\x20c.lastName\x20LIKE\x20?\x20OR\x20c.email\x20LIKE\x20?','ContactId','buildExpression','text','start','Tag','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','union','CONCAT_WS(\x27\x20\x27,\x20o.name,\x20o.fullname)\x20LIKE\x20?','UserId','some','compact','isEmpty','OpenchannelAccountId','i.OpenchannelAccountId\x20IN\x20?','concat','createdAt','parse','$lte','i.createdAt\x20BETWEEN\x20?\x20AND\x20?','\x20=\x20?','read','tag','filter','replace','isNumeric','i.id\x20LIKE\x20?','MATCH\x20(me.body)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','getFullTextValue','i.from\x20LIKE\x20?','group','Sequelize','QueryTypes','clone','i.id','SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)','contactName','DESC','i.OpenchannelAccountId\x20IS\x20NOT\x20NULL','user','role','getOpenchannelAccounts','i.OpenchannelAccountId\x20IS\x20NULL','sequelize','toString','keyBy','merge','Account.key','i.*','c.firstName','Contact.firstName','c.lastName','Contact.lastName','c.phone','Contact.phone','Contact.mobile','c.fax','Contact.fax','o.fullname','Owner.internal','GROUP_CONCAT(DISTINCT\x20t.id)','ui.OpenchannelInteractionId\x20IN\x20?','groupBy','OpenchannelInteractionId','all','rows','params','rawAttributes','includeAll','include','options','create','describe','OpenchannelMessage','addMessage','body','ids','omit','findOne','pick','$gte','format','findAll','addTags','emit','openchannelInteractionTags:save','removeTags','download','unix','join','root','server','files','tmp','attachments','transcript-%d-%s.zip','User','CmContact','Contact','firstName','lastName','Attachment','Messages','direction','secret','OpenchannelAccount','Owner','get','mkdirSync','N.A.','YYYY-MM-DD\x20HH:mm:ss','closed','disposition','threadId','basename','pipe','createWriteStream','out','System','views','Openchannel','createPdfFromHTML','log','err','unlinkSync','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','mustache','util','sox','ejs','fs-extra','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','register','sendStatus','status','end','json','offset','limit','count','set','apply','reject','save','update','then','destroy','error','stack','map','fullname','TagIds','Tags','split'];(function(_0x508a09,_0x30a4da){var _0x55fc84=function(_0x2fdcc3){while(--_0x2fdcc3){_0x508a09['push'](_0x508a09['shift']());}};_0x55fc84(++_0x30a4da);}(_0x63e7,0xb5));var _0x763e=function(_0x126558,_0x143c9a){_0x126558=_0x126558-0x0;var _0x1f6d14=_0x63e7[_0x126558];return _0x1f6d14;};'use strict';var emlformat=require(_0x763e('0x0'));var rimraf=require(_0x763e('0x1'));var zipdir=require(_0x763e('0x2'));var jsonpatch=require(_0x763e('0x3'));var rp=require(_0x763e('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x763e('0x5'));var util=require(_0x763e('0x6'));var path=require('path');var sox=require(_0x763e('0x7'));var csv=require('to-csv');var ejs=require(_0x763e('0x8'));var fs=require('fs');var fs_extra=require(_0x763e('0x9'));var _=require('lodash');var squel=require(_0x763e('0xa'));var crypto=require(_0x763e('0xb'));var jsforce=require(_0x763e('0xc'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x763e('0xd'));var Papa=require(_0x763e('0xe'));var Redis=require(_0x763e('0xf'));var authService=require(_0x763e('0x10'));var qs=require(_0x763e('0x11'));var as=require('../../components/parsers/advancedSearch');var pdf=require('../../components/export/pdf');var hardwareService=require(_0x763e('0x12'));var logger=require(_0x763e('0x13'))(_0x763e('0x14'));var utils=require('../../config/utils');var config=require(_0x763e('0x15'));var licenseUtil=require(_0x763e('0x16'));var db=require(_0x763e('0x17'))['db'];config[_0x763e('0x18')]=_[_0x763e('0x19')](config[_0x763e('0x18')],{'host':_0x763e('0x1a'),'port':0x18eb});var socket=require(_0x763e('0x1b'))(new Redis(config[_0x763e('0x18')]));require('./openchannelInteraction.socket')[_0x763e('0x1c')](socket);function respondWithStatusCode(_0x222e27,_0x32ab9b){_0x32ab9b=_0x32ab9b||0xcc;return function(_0x23c580){if(_0x23c580){return _0x222e27[_0x763e('0x1d')](_0x32ab9b);}return _0x222e27[_0x763e('0x1e')](_0x32ab9b)[_0x763e('0x1f')]();};}function respondWithResult(_0x26514f,_0x182e5c){_0x182e5c=_0x182e5c||0xc8;return function(_0x2ad383){if(_0x2ad383){return _0x26514f['status'](_0x182e5c)[_0x763e('0x20')](_0x2ad383);}};}function respondWithFilteredResult(_0x567c65,_0x3c9f31){return function(_0x1aab77){if(_0x1aab77){var _0x27c439=typeof _0x3c9f31[_0x763e('0x21')]==='undefined'&&typeof _0x3c9f31[_0x763e('0x22')]==='undefined';var _0x2ced60=_0x1aab77[_0x763e('0x23')];var _0x57b797=_0x27c439?0x0:_0x3c9f31[_0x763e('0x21')];var _0x44a515=_0x27c439?_0x1aab77[_0x763e('0x23')]:_0x3c9f31[_0x763e('0x21')]+_0x3c9f31['limit'];var _0x6dcce6;if(_0x44a515>=_0x2ced60){_0x44a515=_0x2ced60;_0x6dcce6=0xc8;}else{_0x6dcce6=0xce;}_0x567c65[_0x763e('0x1e')](_0x6dcce6);return _0x567c65[_0x763e('0x24')]('Content-Range',_0x57b797+'-'+_0x44a515+'/'+_0x2ced60)[_0x763e('0x20')](_0x1aab77);}return null;};}function patchUpdates(_0x3bba2c){return function(_0x533ca2){try{jsonpatch[_0x763e('0x25')](_0x533ca2,_0x3bba2c,!![]);}catch(_0x317ec6){return BPromise[_0x763e('0x26')](_0x317ec6);}return _0x533ca2[_0x763e('0x27')]();};}function saveUpdates(_0x3e80ee,_0x2af483){return function(_0x37acbc){if(_0x37acbc){return _0x37acbc[_0x763e('0x28')](_0x3e80ee)[_0x763e('0x29')](function(_0x56c14e){return _0x56c14e;});}return null;};}function removeEntity(_0x2fc185,_0x447a04){return function(_0x5e584c){if(_0x5e584c){return _0x5e584c[_0x763e('0x2a')]()[_0x763e('0x29')](function(){_0x2fc185[_0x763e('0x1e')](0xcc)[_0x763e('0x1f')]();});}};}function handleEntityNotFound(_0x164dcd,_0x424774){return function(_0x34bbfd){if(!_0x34bbfd){_0x164dcd[_0x763e('0x1d')](0x194);}return _0x34bbfd;};}function handleError(_0x1a1683,_0x2011fa){_0x2011fa=_0x2011fa||0x1f4;return function(_0x2e4605){logger[_0x763e('0x2b')](_0x2e4605[_0x763e('0x2c')]);if(_0x2e4605['name']){delete _0x2e4605['name'];}_0x1a1683[_0x763e('0x1e')](_0x2011fa)['send'](_0x2e4605);};}function getInteractionUsers(_0xe6cdbd,_0x43e6a2){return new BPromise(function(_0xb64316,_0x5760fa){try{if(_0x43e6a2[_0xe6cdbd['id']]){_0xe6cdbd['Users']=_[_0x763e('0x2d')](_0x43e6a2[_0xe6cdbd['id']],function(_0x369969){return{'id':_0x369969['id'],'fullname':_0x369969[_0x763e('0x2e')]};});}}catch(_0x5a5493){_0x5760fa(_0x5a5493);}_0xb64316(_0xe6cdbd);});}function getInteractionTags(_0x39ce52,_0xb43ce4){return new BPromise(function(_0x13a6a0,_0x7895e1){try{if(_0x39ce52[_0x763e('0x2f')]){_0x39ce52[_0x763e('0x30')]=[];_0x39ce52[_0x763e('0x2f')][_0x763e('0x31')](',')[_0x763e('0x32')](function(_0x19e891){_0x39ce52['Tags'][_0x763e('0x33')](_0xb43ce4[_0x19e891]);});}delete _0x39ce52[_0x763e('0x2f')];}catch(_0xb8947b){_0x7895e1(_0xb8947b);}_0x13a6a0(_0x39ce52);});}function updateOpenchannelInteraction(_0x5e2fb3,_0x342994,_0x461b63){return new BPromise(function(_0x31bb2b,_0x2b92cd){return getInteractionUsers(_0x5e2fb3,_0x461b63)[_0x763e('0x29')](function(_0x19c59a){return getInteractionTags(_0x19c59a,_0x342994);})[_0x763e('0x29')](function(_0x3dd1c3){_0x31bb2b(_0x3dd1c3);})[_0x763e('0x34')](function(_0x2963ee){_0x2b92cd(_0x2963ee);});});}exports['index']=function(_0x214ebf,_0x2fda2b){var _0x5f11c4={},_0x28ce9a={},_0x1b2ff4={'count':0x0,'rows':[]};var _0xd8303c=_[_0x763e('0x2d')](db[_0x763e('0x35')]['rawAttributes'],function(_0x187a76){return{'name':_0x187a76[_0x763e('0x36')],'type':_0x187a76[_0x763e('0x37')][_0x763e('0x38')]};});_0x28ce9a[_0x763e('0x39')]=_[_0x763e('0x2d')](_0xd8303c,_0x763e('0x3a'));_0x28ce9a[_0x763e('0x3b')]=_[_0x763e('0x3c')](_0x214ebf[_0x763e('0x3b')]);_0x28ce9a[_0x763e('0x3d')]=_[_0x763e('0x3e')](_0x28ce9a['model'],_0x28ce9a[_0x763e('0x3b')]);_0x5f11c4['attributes']=_['intersection'](_0x28ce9a[_0x763e('0x39')],qs[_0x763e('0x3f')](_0x214ebf[_0x763e('0x3b')][_0x763e('0x3f')]));_0x5f11c4[_0x763e('0x40')]=_0x5f11c4['attributes'][_0x763e('0x41')]?_0x5f11c4[_0x763e('0x40')]:_0x28ce9a[_0x763e('0x39')];if(!_0x214ebf['query'][_0x763e('0x42')](_0x763e('0x43'))){_0x5f11c4['limit']=qs[_0x763e('0x22')](_0x214ebf[_0x763e('0x3b')][_0x763e('0x22')]);_0x5f11c4[_0x763e('0x21')]=qs[_0x763e('0x21')](_0x214ebf[_0x763e('0x3b')]['offset']);}_0x5f11c4[_0x763e('0x44')]=qs[_0x763e('0x45')](_0x214ebf['query'][_0x763e('0x45')]);_0x5f11c4[_0x763e('0x46')]=qs[_0x763e('0x3d')](_['pick'](_0x214ebf[_0x763e('0x3b')],_0x28ce9a[_0x763e('0x3d')]),_0xd8303c);var _0x1de7c9=[];var _0x40e724=squel['select']()[_0x763e('0x47')]('id')[_0x763e('0x47')]('name')[_0x763e('0x47')](_0x763e('0x48'))[_0x763e('0x49')](_0x763e('0x4a'));var _0x5bf1d9=squel['select']()[_0x763e('0x47')]('u.id')['field'](_0x763e('0x4b'))[_0x763e('0x47')]('ui.OpenchannelInteractionId')['from'](_0x763e('0x4c'),'ui')[_0x763e('0x4d')](_0x763e('0x4e'),'u',_0x763e('0x4f'));var _0x3c4268=squel[_0x763e('0x50')]()[_0x763e('0x49')](_0x763e('0x51'),'i')[_0x763e('0x4d')](_0x763e('0x52'),'c',_0x763e('0x53'))[_0x763e('0x4d')](_0x763e('0x4e'),'o',_0x763e('0x54'))[_0x763e('0x4d')](_0x763e('0x55'),'a',_0x763e('0x56'))['left_join'](_0x763e('0x57'),'me',_0x763e('0x58'))[_0x763e('0x4d')](_0x763e('0x59'),'it',_0x763e('0x5a'))['left_join'](_0x763e('0x4a'),'t',_0x763e('0x5b'));var _0x16cff1=squel[_0x763e('0x5c')]();var _0x38217a=[];var _0xc02857=squel[_0x763e('0x5c')]();var _0x5d15b4;if(_0x214ebf[_0x763e('0x3b')][_0x763e('0x5d')]){_0x5d15b4=as[_0x763e('0x5e')](_0x214ebf[_0x763e('0x3b')][_0x763e('0x5d')]);var _0x45ccec=_0x5d15b4[_0x763e('0x5f')];for(var _0x56d91f=0x0;_0x56d91f<_0x5d15b4[_0x763e('0x60')][_0x763e('0x41')];_0x56d91f++){var _0x50101a=_0x5d15b4[_0x763e('0x60')][_0x56d91f];var _0x4ea1aa='i';var _0x25c850=_[_0x763e('0x61')](_0xd8303c,[_0x763e('0x3a'),_0x50101a[_0x763e('0x47')]]);if(!_0x25c850){switch(_0x50101a['field']){case _0x763e('0x62'):if(_0x50101a[_0x763e('0x63')]==0x1){_0x3c4268[_0x763e('0x64')]('`'+_0x50101a[_0x763e('0x47')]+_0x763e('0x65'));}else{_0x3c4268['having']('`'+_0x50101a[_0x763e('0x47')]+_0x763e('0x66'));}break;case'Contact':if(_0x50101a[_0x763e('0x67')]===_0x763e('0x68')){if(_0x50101a['value'][_0x763e('0x31')]('\x20')[_0x763e('0x41')]>0x1){_0x16cff1[_0x45ccec](_0x763e('0x69'),qs['getFullTextValue'](_0x50101a[_0x763e('0x63')]),null);}else{var _0x405dc2='%'+_0x50101a[_0x763e('0x63')]+'%';_0x16cff1[_0x45ccec](_0x763e('0x6a'),_0x405dc2,_0x405dc2,_0x405dc2);}}else{_0x25c850=_['find'](_0xd8303c,[_0x763e('0x3a'),_0x763e('0x6b')]);_0x50101a[_0x763e('0x47')]=_0x763e('0x6b');_0x2c6d00=as[_0x763e('0x6c')](_0x4ea1aa,_0x25c850[_0x763e('0x37')],_0x50101a);_0x16cff1[_0x45ccec](_0x2c6d00[_0x763e('0x6d')],_0x2c6d00[_0x763e('0x63')][_0x763e('0x6e')],_0x2c6d00[_0x763e('0x63')]['end']);}break;case _0x763e('0x6f'):var _0x4c4f5e=_0x50101a[_0x763e('0x63')][_0x763e('0x31')](',')[_0x763e('0x2d')](function(_0x11d8fe){return Number(_0x11d8fe);});_0x4c4f5e[_0x763e('0x32')](function(_0x1cd793){_0xc02857['or'](_0x763e('0x70'),'%,'+_0x1cd793+',%');});_0x38217a=_[_0x763e('0x71')](_0x38217a,_0x4c4f5e);break;case'User':if(_0x50101a['operator']===_0x763e('0x68')){_0x16cff1[_0x45ccec](_0x763e('0x72'),'%'+_0x50101a[_0x763e('0x63')]+'%',null);}else{_0x25c850=_['find'](_0xd8303c,[_0x763e('0x3a'),_0x763e('0x73')]);_0x50101a['field']=_0x763e('0x73');_0x2c6d00=as[_0x763e('0x6c')](_0x4ea1aa,_0x25c850[_0x763e('0x37')],_0x50101a);_0x16cff1[_0x45ccec](_0x2c6d00[_0x763e('0x6d')],_0x2c6d00[_0x763e('0x63')]['start'],_0x2c6d00[_0x763e('0x63')][_0x763e('0x1f')]);}break;case'body':_0x2c6d00=as[_0x763e('0x6c')]('me',null,_0x50101a);_0x16cff1[_0x45ccec](_0x2c6d00[_0x763e('0x6d')],_0x2c6d00[_0x763e('0x63')][_0x763e('0x6e')],_0x2c6d00[_0x763e('0x63')][_0x763e('0x1f')]);break;}}else{var _0x2c6d00=as[_0x763e('0x6c')](_0x4ea1aa,_0x25c850[_0x763e('0x37')],_0x50101a);_0x16cff1[_0x45ccec](_0x2c6d00['text'],_0x2c6d00[_0x763e('0x63')][_0x763e('0x6e')],_0x2c6d00[_0x763e('0x63')]['end']);}}}else{var _0x2aba6d=_(_0x214ebf[_0x763e('0x3b')])[_0x763e('0x3c')]()['map'](function(_0x3954e8){return _[_0x763e('0x74')](_0xd8303c,[_0x763e('0x3a'),_0x3954e8])?_0x3954e8:undefined;})[_0x763e('0x75')]()[_0x763e('0x63')]();if(!_[_0x763e('0x76')](_0x2aba6d)){_0x2aba6d['forEach'](function(_0x22c511){if(_0x22c511===_0x763e('0x77')){_0x3c4268[_0x763e('0x46')](_0x763e('0x78'),[][_0x763e('0x79')](_0x214ebf[_0x763e('0x3b')][_0x22c511]));}else if(_0x22c511===_0x763e('0x7a')){var _0x4a908e=JSON[_0x763e('0x7b')](_0x214ebf[_0x763e('0x3b')][_0x22c511])['$gte'];var _0x5c4b36=JSON[_0x763e('0x7b')](_0x214ebf['query'][_0x22c511])[_0x763e('0x7c')];_0x3c4268[_0x763e('0x46')](_0x763e('0x7d'),_0x4a908e,_0x5c4b36);}else{if(_0x214ebf[_0x763e('0x3b')][_0x22c511]==='null'){_0x3c4268[_0x763e('0x46')]('i.'+_0x22c511+'\x20IS\x20NULL');}else{_0x3c4268[_0x763e('0x46')]('i.'+_0x22c511+_0x763e('0x7e'),_0x214ebf[_0x763e('0x3b')][_0x22c511]);}}});}if(_0x214ebf[_0x763e('0x3b')][_0x763e('0x7f')]){if(_0x214ebf[_0x763e('0x3b')][_0x763e('0x7f')]==0x1){_0x3c4268[_0x763e('0x64')]('`unreadMessages`\x20=\x200');}else{_0x3c4268[_0x763e('0x64')]('`unreadMessages`\x20>\x200');}}if(_0x214ebf[_0x763e('0x3b')]['tag']){_0x38217a=_['isArray'](_0x214ebf[_0x763e('0x3b')][_0x763e('0x80')])?_0x214ebf[_0x763e('0x3b')][_0x763e('0x80')]:new Array(_0x214ebf[_0x763e('0x3b')][_0x763e('0x80')]);_0x38217a[_0x763e('0x32')](function(_0xa3cfb8){_0xc02857['or'](_0x763e('0x70'),'%,'+_0xa3cfb8+',%');});}if(_0x214ebf[_0x763e('0x3b')][_0x763e('0x81')]){var _0x4dcfe3=_0x214ebf[_0x763e('0x3b')][_0x763e('0x81')][_0x763e('0x82')]('\x5c','\x5c\x5c')['replace'](/'/g,'\x27\x27');if(qs[_0x763e('0x83')](_0x4dcfe3)){_0x16cff1['or'](_0x763e('0x84'),_0x4dcfe3+'%');}else{_0x16cff1['or'](_0x763e('0x85'),qs[_0x763e('0x86')](_0x4dcfe3))['or'](_0x763e('0x87'),_0x4dcfe3+'%')['or']('CONCAT(c.firstName,\x20\x27\x20\x27,\x20c.lastName)\x20LIKE\x20?',_0x4dcfe3+'%');}}}_0x3c4268[_0x763e('0x46')](_0x16cff1);_0x3c4268[_0x763e('0x88')]('i.id');var _0x222835={'type':db[_0x763e('0x89')][_0x763e('0x8a')]['SELECT'],'raw':!![]};var _0x401256=_0x3c4268[_0x763e('0x8b')]();_0x401256[_0x763e('0x47')](_0x763e('0x8c'));_0x401256['field'](_0x763e('0x8d'),_0x763e('0x62'));if(_0x5f11c4[_0x763e('0x44')]){_0x5f11c4['order'][_0x763e('0x32')](function(_0x3ce048){var _0x2d261e=_0x3ce048[0x0]===_0x763e('0x8e')?_0x3ce048[0x0]:'i.'+_0x3ce048[0x0];_0x3c4268[_0x763e('0x44')](_0x2d261e,_0x3ce048[0x1]===_0x763e('0x8f')?![]:!![]);});}if(!_[_0x763e('0x76')](_0x38217a)){_0x3c4268[_0x763e('0x64')](_0xc02857);_0x401256[_0x763e('0x46')]('t.id\x20IN\x20?',_0x38217a);}BPromise['resolve']()[_0x763e('0x29')](function(){if(!_0x5d15b4){if(_0x214ebf['query'][_0x763e('0x77')])return;_0x401256[_0x763e('0x46')](_0x763e('0x90'));_0x3c4268[_0x763e('0x46')](_0x763e('0x90'));return;}if(_0x214ebf[_0x763e('0x91')][_0x763e('0x92')]!=='agent')return;return _0x214ebf[_0x763e('0x91')][_0x763e('0x93')]({'attributes':['id'],'raw':!![]})['then'](function(_0x5cd35a){if(_[_0x763e('0x76')](_0x5cd35a)){_0x401256[_0x763e('0x46')](_0x763e('0x94'));_0x3c4268[_0x763e('0x46')]('i.OpenchannelAccountId\x20IS\x20NULL');}else{_0x401256[_0x763e('0x46')](_0x763e('0x78'),_['map'](_0x5cd35a,'id'));_0x3c4268[_0x763e('0x46')](_0x763e('0x78'),_[_0x763e('0x2d')](_0x5cd35a,'id'));}});})[_0x763e('0x29')](function(){if(_0x214ebf[_0x763e('0x91')][_0x763e('0x92')]==='agent'&&!_0x5d15b4&&!_0x214ebf['query'][_0x763e('0x77')])return[];return db[_0x763e('0x95')]['query'](_0x401256[_0x763e('0x96')](),_0x222835);})['then'](function(_0x4ef5d0){_0x1b2ff4[_0x763e('0x23')]=_0x4ef5d0[_0x763e('0x41')];if(_0x1b2ff4[_0x763e('0x23')]===0x0)return[];return db[_0x763e('0x95')][_0x763e('0x3b')](_0x40e724[_0x763e('0x96')](),_0x222835)[_0x763e('0x29')](function(_0x3d43f2){_0x1de7c9=_[_0x763e('0x97')](_0x3d43f2,'id');_0x222835=_[_0x763e('0x98')](_0x222835,{'model':db[_0x763e('0x35')],'mapToModel':!![],'raw':!![],'nest':!![]});if(_0x214ebf[_0x763e('0x3b')][_0x763e('0x3f')]){_0x5f11c4[_0x763e('0x40')]['forEach'](function(_0x21798f){_0x3c4268[_0x763e('0x47')]('i.'+_0x21798f);});}else{_0x3c4268['field'](_0x763e('0x8d'),_0x763e('0x62'));_0x3c4268[_0x763e('0x47')]('a.key',_0x763e('0x99'));_0x3c4268[_0x763e('0x47')]('a.mandatoryDisposition','Account.mandatoryDisposition');_0x3c4268[_0x763e('0x47')]('CASE\x20WHEN\x20i.from\x20IS\x20NOT\x20NULL\x20AND\x20i.from\x20<>\x20\x27\x27\x20THEN\x20i.from\x20WHEN\x20(c.firstName\x20IS\x20NOT\x20NULL\x20AND\x20c.firstName\x20<>\x20\x27\x27)\x20OR\x20(c.lastName\x20IS\x20NOT\x20NULL\x20AND\x20c.lastName\x20<>\x20\x27\x27)\x20THEN\x20CONCAT(IFNULL(c.firstName,\x20\x27\x27),\x20\x27\x20\x27,\x20IFNULL(c.lastName,\x20\x27\x27))\x20ELSE\x20\x27Unknown\x27\x20END',_0x763e('0x8e'));_0x3c4268['field'](_0x763e('0x9a'));_0x3c4268[_0x763e('0x47')](_0x763e('0x9b'),_0x763e('0x9c'));_0x3c4268['field'](_0x763e('0x9d'),_0x763e('0x9e'));_0x3c4268['field']('c.email','Contact.email');_0x3c4268[_0x763e('0x47')](_0x763e('0x9f'),_0x763e('0xa0'));_0x3c4268[_0x763e('0x47')]('c.mobile',_0x763e('0xa1'));_0x3c4268[_0x763e('0x47')](_0x763e('0xa2'),_0x763e('0xa3'));_0x3c4268[_0x763e('0x47')](_0x763e('0xa4'),'Owner.fullname');_0x3c4268[_0x763e('0x47')]('o.internal',_0x763e('0xa5'));_0x3c4268[_0x763e('0x47')](_0x763e('0xa6'),_0x763e('0x2f'));}if(_0x5f11c4[_0x763e('0x22')])_0x3c4268[_0x763e('0x22')](_0x5f11c4[_0x763e('0x22')]);if(_0x5f11c4[_0x763e('0x21')])_0x3c4268['offset'](_0x5f11c4[_0x763e('0x21')]);return db[_0x763e('0x95')][_0x763e('0x3b')](_0x3c4268[_0x763e('0x96')](),_0x222835);})['then'](function(_0x36ca7c){if(_0x36ca7c['length']>0x0)_0x5bf1d9[_0x763e('0x46')](_0x763e('0xa7'),_[_0x763e('0x2d')](_0x36ca7c,'id'));return db[_0x763e('0x95')][_0x763e('0x3b')](_0x5bf1d9[_0x763e('0x96')](),_0x222835)[_0x763e('0x29')](function(_0x287e2e){var _0x93c357=_[_0x763e('0xa8')](_0x287e2e,_0x763e('0xa9'));var _0x100d75=[];_0x36ca7c[_0x763e('0x32')](function(_0x3801d9){_0x100d75['push'](updateOpenchannelInteraction(_0x3801d9,_0x1de7c9,_0x93c357));});return BPromise[_0x763e('0xaa')](_0x100d75);});});})[_0x763e('0x29')](function(_0x2e527f){_0x1b2ff4[_0x763e('0xab')]=_0x2e527f;return _0x1b2ff4;})[_0x763e('0x29')](respondWithFilteredResult(_0x2fda2b,_0x5f11c4))[_0x763e('0x34')](handleError(_0x2fda2b,null));};exports['show']=function(_0xb1a1ad,_0xcad0a0){var _0x5db81d={};if(_0xb1a1ad['query'][_0x763e('0x37')]&&_0xb1a1ad[_0x763e('0x3b')][_0x763e('0x37')]===_0x763e('0x49')){_0x5db81d[_0x763e('0x49')]=_0xb1a1ad[_0x763e('0xac')]['id'];}else{_0x5db81d['id']=_0xb1a1ad[_0x763e('0xac')]['id'];}var _0x4f2497={'raw':![],'where':_0x5db81d},_0x5eb9e6={};_0x5eb9e6['model']=_['keys'](db[_0x763e('0x35')][_0x763e('0xad')]);_0x5eb9e6['query']=_[_0x763e('0x3c')](_0xb1a1ad['query']);_0x5eb9e6[_0x763e('0x3d')]=_['intersection'](_0x5eb9e6[_0x763e('0x39')],_0x5eb9e6['query']);_0x4f2497[_0x763e('0x40')]=_[_0x763e('0x3e')](_0x5eb9e6[_0x763e('0x39')],qs[_0x763e('0x3f')](_0xb1a1ad[_0x763e('0x3b')][_0x763e('0x3f')]));_0x4f2497['attributes']=_0x4f2497[_0x763e('0x40')][_0x763e('0x41')]?_0x4f2497[_0x763e('0x40')]:_0x5eb9e6[_0x763e('0x39')];if(_0xb1a1ad[_0x763e('0x3b')][_0x763e('0xae')]){_0x4f2497[_0x763e('0xaf')]=[{'all':!![]}];}_0x4f2497=_[_0x763e('0x98')]({},_0x4f2497,_0xb1a1ad[_0x763e('0xb0')]);return db[_0x763e('0x35')][_0x763e('0x61')](_0x4f2497)['then'](handleEntityNotFound(_0xcad0a0,null))['then'](respondWithResult(_0xcad0a0,null))[_0x763e('0x34')](handleError(_0xcad0a0,null));};exports[_0x763e('0xb1')]=function(_0x5a8962,_0x351f67){return db[_0x763e('0x35')][_0x763e('0xb1')](_0x5a8962['body'],{})[_0x763e('0x29')](respondWithResult(_0x351f67,0xc9))['catch'](handleError(_0x351f67,null));};exports[_0x763e('0x28')]=function(_0x32a8a6,_0x4e3934){if(_0x32a8a6['body']['id']){delete _0x32a8a6['body']['id'];}return db['OpenchannelInteraction'][_0x763e('0x61')]({'where':{'id':_0x32a8a6[_0x763e('0xac')]['id']}})[_0x763e('0x29')](handleEntityNotFound(_0x4e3934,null))[_0x763e('0x29')](saveUpdates(_0x32a8a6['body'],null))[_0x763e('0x29')](respondWithResult(_0x4e3934,null))[_0x763e('0x34')](handleError(_0x4e3934,null));};exports['destroy']=function(_0x394da7,_0x33625a){return db[_0x763e('0x35')][_0x763e('0x61')]({'where':{'id':_0x394da7[_0x763e('0xac')]['id']}})['then'](handleEntityNotFound(_0x33625a,null))['then'](removeEntity(_0x33625a,null))['catch'](handleError(_0x33625a,null));};exports[_0x763e('0xb2')]=function(_0x8de60f,_0x262a98){return db[_0x763e('0x35')][_0x763e('0xb2')]()['then'](respondWithResult(_0x262a98,null))[_0x763e('0x34')](handleError(_0x262a98,null));};exports['addMessage']=function(_0x6f0d1b,_0x5cad6c,_0x3499f3){return db[_0x763e('0xb3')][_0x763e('0x61')]({'where':{'id':_0x6f0d1b[_0x763e('0xac')]['id']}})[_0x763e('0x29')](handleEntityNotFound(_0x5cad6c,null))[_0x763e('0x29')](function(_0x5e5e51){if(_0x5e5e51){return _0x5e5e51[_0x763e('0xb4')](_0x6f0d1b[_0x763e('0xb5')][_0x763e('0xb6')],_[_0x763e('0xb7')](_0x6f0d1b[_0x763e('0xb5')],[_0x763e('0xb6'),'id'])||{});}})['then'](respondWithResult(_0x5cad6c,null))['catch'](handleError(_0x5cad6c,null));};exports['getMessages']=function(_0x402d8a,_0x30a769,_0x365220){var _0x259c7b={'raw':![],'where':{}};var _0x169594={};var _0x2a4dfa={'count':0x0,'rows':[]};return db[_0x763e('0x35')][_0x763e('0xb8')]({'where':{'id':_0x402d8a[_0x763e('0xac')]['id']}})[_0x763e('0x29')](handleEntityNotFound(_0x30a769,null))[_0x763e('0x29')](function(_0xbad4d6){if(_0xbad4d6){_0x169594[_0x763e('0x39')]=_['keys'](db['OpenchannelMessage'][_0x763e('0xad')]);_0x169594['query']=_[_0x763e('0x3c')](_0x402d8a[_0x763e('0x3b')]);_0x169594['filters']=_['intersection'](_0x169594[_0x763e('0x39')],_0x169594[_0x763e('0x3b')]);_0x259c7b[_0x763e('0x40')]=_[_0x763e('0x3e')](_0x169594['model'],qs['fields'](_0x402d8a[_0x763e('0x3b')]['fields']));_0x259c7b[_0x763e('0x40')]=_0x259c7b[_0x763e('0x40')][_0x763e('0x41')]?_0x259c7b['attributes']:_0x169594[_0x763e('0x39')];if(!_0x402d8a[_0x763e('0x3b')][_0x763e('0x42')](_0x763e('0x43'))){_0x259c7b['limit']=qs[_0x763e('0x22')](_0x402d8a[_0x763e('0x3b')]['limit']);_0x259c7b[_0x763e('0x21')]=qs[_0x763e('0x21')](_0x402d8a[_0x763e('0x3b')]['offset']);}_0x259c7b['order']=qs['sort'](_0x402d8a[_0x763e('0x3b')][_0x763e('0x45')]);_0x259c7b[_0x763e('0x46')]=qs['filters'](_[_0x763e('0xb9')](_0x402d8a['query'],_0x169594[_0x763e('0x3d')]));_0x259c7b[_0x763e('0x46')][_0x763e('0xa9')]=_0xbad4d6['id'];if(_0x402d8a['query'][_0x763e('0x81')]){_0x259c7b[_0x763e('0x46')]=_[_0x763e('0x98')](_0x259c7b[_0x763e('0x46')],{'$or':_[_0x763e('0x2d')](_0x259c7b[_0x763e('0x40')],function(_0x6ab469){var _0x39b7f4={};_0x39b7f4[_0x6ab469]={'$like':'%'+_0x402d8a[_0x763e('0x3b')][_0x763e('0x81')]+'%'};return _0x39b7f4;})});}if(_0x402d8a[_0x763e('0x3b')][_0x763e('0xba')]){var _0x21a9c4=_0x402d8a['query']['$gte']['split'](',');var _0x954c82={};_0x954c82[_0x21a9c4[0x0]]={'$gte':moment(_0x21a9c4[0x1])[_0x763e('0xbb')]('YYYY-MM-DD\x20HH:mm:ss')};_0x259c7b[_0x763e('0x46')]=_[_0x763e('0x98')](_0x259c7b[_0x763e('0x46')],_0x954c82);}_0x259c7b=_[_0x763e('0x98')]({},_0x259c7b,_0x402d8a[_0x763e('0xb0')]);return db[_0x763e('0xb3')][_0x763e('0x23')]({'where':_0x259c7b[_0x763e('0x46')]})[_0x763e('0x29')](function(_0x3b29db){_0x2a4dfa[_0x763e('0x23')]=_0x3b29db;if(_0x402d8a[_0x763e('0x3b')][_0x763e('0xae')]){_0x259c7b[_0x763e('0xaf')]=[{'all':!![]}];}return db[_0x763e('0xb3')][_0x763e('0xbc')](_0x259c7b);})[_0x763e('0x29')](function(_0x2db347){_0x2a4dfa['rows']=_0x2db347;return _0x2a4dfa;});}})[_0x763e('0x29')](respondWithFilteredResult(_0x30a769,_0x259c7b))[_0x763e('0x34')](handleError(_0x30a769,null));};exports[_0x763e('0xbd')]=function(_0x4bdcd6,_0x45e1ab,_0x42d7b8){return db[_0x763e('0x35')][_0x763e('0x61')]({'where':{'id':_0x4bdcd6[_0x763e('0xac')]['id']}})[_0x763e('0x29')](handleEntityNotFound(_0x45e1ab,null))[_0x763e('0x29')](function(_0x1bdd83){if(_0x1bdd83){return _0x1bdd83['setTags'](_0x4bdcd6['body'][_0x763e('0xb6')],_[_0x763e('0xb7')](_0x4bdcd6[_0x763e('0xb5')],[_0x763e('0xb6'),'id'])||{})['spread'](function(){return db[_0x763e('0x6f')]['findAll']({'attributes':['id','name',_0x763e('0x48')],'where':{'id':_0x4bdcd6[_0x763e('0xb5')][_0x763e('0xb6')]}});})[_0x763e('0x29')](function(_0x1386db){socket[_0x763e('0xbe')](_0x763e('0xbf'),{'id':Number(_0x4bdcd6['params']['id']),'tags':_0x1386db||[]});return{'id':Number(_0x4bdcd6[_0x763e('0xac')]['id']),'tags':_0x1386db||[]};});}})[_0x763e('0x29')](respondWithResult(_0x45e1ab,null))['catch'](handleError(_0x45e1ab,null));};exports[_0x763e('0xc0')]=function(_0x4d11fb,_0x3997fa,_0x3e0d85){return db[_0x763e('0x35')][_0x763e('0x61')]({'where':{'id':_0x4d11fb[_0x763e('0xac')]['id']}})[_0x763e('0x29')](handleEntityNotFound(_0x3997fa,null))[_0x763e('0x29')](function(_0xa12475){if(_0xa12475){return _0xa12475['removeTags'](_0x4d11fb[_0x763e('0x3b')][_0x763e('0xb6')]);}})[_0x763e('0x29')](respondWithStatusCode(_0x3997fa,null))[_0x763e('0x34')](handleError(_0x3997fa,null));};exports[_0x763e('0xc1')]=function(_0x1c7259,_0x559df2){var _0x47c09e=moment()[_0x763e('0xc2')]()[_0x763e('0x96')]();var _0x20abcc=path[_0x763e('0xc3')](config[_0x763e('0xc4')],_0x763e('0xc5'),_0x763e('0xc6'),_0x763e('0xc7'));var _0x565617=path[_0x763e('0xc3')](config[_0x763e('0xc4')],_0x763e('0xc5'),_0x763e('0xc6'),_0x763e('0xc8'));var _0x467495=path[_0x763e('0xc3')](_0x20abcc,_0x47c09e);var _0x4a300c=util[_0x763e('0xbb')](_0x763e('0xc9'),_0x1c7259['params']['id'],_0x47c09e);var _0x4e8c17=path[_0x763e('0xc3')](_0x20abcc,_0x4a300c);var _0x391ea6=[];_0x391ea6[_0x763e('0x33')]({'model':db[_0x763e('0xca')],'as':_0x763e('0xca'),'attributes':['id',_0x763e('0x2e')],'raw':!![]});_0x391ea6[_0x763e('0x33')]({'model':db[_0x763e('0xcb')],'as':_0x763e('0xcc'),'attributes':['id',_0x763e('0xcd'),_0x763e('0xce')],'raw':!![]});if(_0x1c7259['query'][_0x763e('0xc8')]){_0x391ea6[_0x763e('0x33')]({'model':db[_0x763e('0xcf')],'as':_0x763e('0xcf'),'raw':!![]});}var _0x33455e=[{'model':db['OpenchannelMessage'],'as':_0x763e('0xd0'),'attributes':['id',_0x763e('0xb5'),_0x763e('0x7a'),_0x763e('0xd1'),_0x763e('0xd2'),_0x763e('0x7f')],'include':_0x391ea6}];_0x33455e[_0x763e('0x33')]({'model':db[_0x763e('0xd3')],'as':'Account','attributes':['id',_0x763e('0x3a')]});_0x33455e[_0x763e('0x33')]({'model':db[_0x763e('0xca')],'as':_0x763e('0xd4'),'attributes':['id',_0x763e('0x2e')]});return db[_0x763e('0x35')][_0x763e('0x61')]({'where':{'id':_0x1c7259[_0x763e('0xac')]['id']},'include':_0x33455e})[_0x763e('0x29')](handleEntityNotFound(_0x559df2,null))[_0x763e('0x29')](function(_0x42d769){if(_0x42d769){var _0x524e60=_0x42d769[_0x763e('0xd5')]({'plain':!![]});fs[_0x763e('0xd6')](_0x467495);var _0x30c70d={'channel':'Openchannel','account':_0x524e60['Account']['name'],'agent':_0x524e60['Owner']?_0x524e60[_0x763e('0xd4')][_0x763e('0x2e')]:_0x763e('0xd7'),'createdAt':moment(_0x524e60[_0x763e('0x7a')])[_0x763e('0xbb')](_0x763e('0xd8'))[_0x763e('0x96')](),'closedAt':_0x524e60[_0x763e('0xd9')]?moment(_0x524e60['closedAt'])[_0x763e('0xbb')](_0x763e('0xd8'))[_0x763e('0x96')]():'','disposition':_0x524e60[_0x763e('0xda')],'visibility':_0x524e60[_0x763e('0xdb')]?'Public':'Private','messages':_(_0x524e60[_0x763e('0xd0')])[_0x763e('0x81')]({'secret':![]})[_0x763e('0x2d')](function(_0x32450f){if(_0x32450f[_0x763e('0xcf')]){var _0x537f28=path[_0x763e('0xc3')](_0x565617,_0x32450f[_0x763e('0xcf')][_0x763e('0xdc')]);if(fs['existsSync'](_0x537f28)){fs['createReadStream'](_0x537f28)[_0x763e('0xdd')](fs[_0x763e('0xde')](path['join'](_0x467495,_0x32450f['Attachment'][_0x763e('0xdc')])));}}return{'date':moment(_0x32450f[_0x763e('0x7a')])[_0x763e('0xbb')]('YYYY-MM-DD\x20HH:mm:ss')[_0x763e('0x96')](),'sender':_0x32450f[_0x763e('0xd1')]===_0x763e('0xdf')?_0x32450f[_0x763e('0xca')]?_0x32450f[_0x763e('0xca')]['fullname']:_0x763e('0xe0'):_0x32450f[_0x763e('0xcc')][_0x763e('0xcd')]+(_0x32450f['Contact'][_0x763e('0xce')]?'\x20'+_0x32450f[_0x763e('0xcc')][_0x763e('0xce')]:''),'body':_0x32450f['Attachment']?_0x32450f[_0x763e('0xcf')]['basename']:_0x32450f[_0x763e('0xb5')],'direction':_0x32450f[_0x763e('0xd1')]===_0x763e('0xdf')?'A':'C','secret':_0x32450f[_0x763e('0xd2')],'read':_0x32450f[_0x763e('0x7f')],'attachment':_0x32450f['Attachment']};})[_0x763e('0x63')]()};return ejs['renderFile'](path[_0x763e('0xc3')](config['root'],_0x763e('0xc5'),_0x763e('0xe1'),'downloadInteraction.ejs'),{'interaction':_0x30c70d})['then'](function(_0x47eec2){var _0x2637ff=path[_0x763e('0xc3')](_0x467495,'transcript-'+_0x524e60['id']+'-'+_0x47c09e+'.pdf');var _0x9433e5={'path':_0x2637ff,'channel':_0x763e('0xe2'),'interactionId':_0x524e60['id']};return pdf[_0x763e('0xe3')](_0x47eec2,_0x9433e5);})[_0x763e('0x29')](function(){return new BPromise(function(_0x111f0f,_0x3e41fd){zipdir(_0x467495,{'saveTo':_0x4e8c17},function(_0x17a96a,_0x27c355){if(_0x17a96a)return _0x3e41fd(_0x17a96a);return _0x111f0f(_0x27c355);});})[_0x763e('0x29')](function(){return new BPromise(function(_0x2662c8,_0x2bebf8){rimraf(_0x467495,function(_0x5aa15a){if(_0x5aa15a)_0x2bebf8(_0x5aa15a);return _0x2662c8();});});})['then'](function(){return _0x559df2[_0x763e('0xc1')](_0x4e8c17,_0x4a300c,function(_0x4d769f){if(_0x4d769f){console[_0x763e('0xe4')](_0x763e('0xe5'),_0x4d769f);}else{fs[_0x763e('0xe6')](_0x4e8c17);}});});});}else{return _0x559df2[_0x763e('0x1d')](0xc8);}})[_0x763e('0x34')](handleError(_0x559df2,null));}; \ No newline at end of file diff --git a/server/api/openchannelInteraction/openchannelInteraction.events.js b/server/api/openchannelInteraction/openchannelInteraction.events.js index cbcabeb..8883912 100644 --- a/server/api/openchannelInteraction/openchannelInteraction.events.js +++ b/server/api/openchannelInteraction/openchannelInteraction.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5fa5=['catch','hook','exports','events','../../mysqldb','OpenchannelMessage','setMaxListeners','update','setDataValue','map','findAll','then','length','emit'];(function(_0x6a633d,_0x1a972c){var _0x20fc42=function(_0x287720){while(--_0x287720){_0x6a633d['push'](_0x6a633d['shift']());}};_0x20fc42(++_0x1a972c);}(_0x5fa5,0x153));var _0x55fa=function(_0x45bf86,_0x75586e){_0x45bf86=_0x45bf86-0x0;var _0x1f02b7=_0x5fa5[_0x45bf86];return _0x1f02b7;};'use strict';var EventEmitter=require(_0x55fa('0x0'));var OpenchannelInteraction=require(_0x55fa('0x1'))['db']['OpenchannelInteraction'];var OpenchannelMessage=require(_0x55fa('0x1'))['db'][_0x55fa('0x2')];var OpenchannelInteractionEvents=new EventEmitter();OpenchannelInteractionEvents[_0x55fa('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x55fa('0x4'),'afterDestroy':'remove'};function emitEvent(_0x1fe0fd){return function(_0x50b4a8,_0x49d1f5,_0x3a613b){_0x50b4a8['getUsers']({'attributes':['id'],'raw':!![]})['then'](function(_0x3cc14a){_0x50b4a8[_0x55fa('0x5')]('Users',_0x3cc14a[_0x55fa('0x6')](function(_0x49f992){return{'id':_0x49f992['id']};}));return OpenchannelMessage[_0x55fa('0x7')]({'where':{'OpenchannelInteractionId':_0x50b4a8['id'],'direction':'in','read':![]},'raw':!![]});})[_0x55fa('0x8')](function(_0x5b6380){_0x50b4a8[_0x55fa('0x5')]('unreadMessages',_0x5b6380[_0x55fa('0x9')]);OpenchannelInteractionEvents[_0x55fa('0xa')](_0x1fe0fd+':'+_0x50b4a8['id'],_0x50b4a8);OpenchannelInteractionEvents[_0x55fa('0xa')](_0x1fe0fd,_0x50b4a8);_0x3a613b(null);})[_0x55fa('0xb')](_0x3a613b(null));};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];OpenchannelInteraction[_0x55fa('0xc')](e,emitEvent(event));}}module[_0x55fa('0xd')]=OpenchannelInteractionEvents; \ No newline at end of file +var _0xf846=['then','setDataValue','unreadMessages','length','catch','hasOwnProperty','hook','exports','OpenchannelInteraction','../../mysqldb','setMaxListeners','save','update','remove','getUsers','Users','map','findAll'];(function(_0x1e7e92,_0x5b9905){var _0x430f89=function(_0x5b12f1){while(--_0x5b12f1){_0x1e7e92['push'](_0x1e7e92['shift']());}};_0x430f89(++_0x5b9905);}(_0xf846,0xaa));var _0x6f84=function(_0x13082d,_0x4a9aef){_0x13082d=_0x13082d-0x0;var _0x4bdfb1=_0xf846[_0x13082d];return _0x4bdfb1;};'use strict';var EventEmitter=require('events');var OpenchannelInteraction=require('../../mysqldb')['db'][_0x6f84('0x0')];var OpenchannelMessage=require(_0x6f84('0x1'))['db']['OpenchannelMessage'];var OpenchannelInteractionEvents=new EventEmitter();OpenchannelInteractionEvents[_0x6f84('0x2')](0x0);var events={'afterCreate':_0x6f84('0x3'),'afterUpdate':_0x6f84('0x4'),'afterDestroy':_0x6f84('0x5')};function emitEvent(_0x4c6c10){return function(_0x39cd30,_0x29131a,_0x134e0c){_0x39cd30[_0x6f84('0x6')]({'attributes':['id'],'raw':!![]})['then'](function(_0x54de03){_0x39cd30['setDataValue'](_0x6f84('0x7'),_0x54de03[_0x6f84('0x8')](function(_0xe02dee){return{'id':_0xe02dee['id']};}));return OpenchannelMessage[_0x6f84('0x9')]({'where':{'OpenchannelInteractionId':_0x39cd30['id'],'direction':'in','read':![]},'raw':!![]});})[_0x6f84('0xa')](function(_0x5b9e62){_0x39cd30[_0x6f84('0xb')](_0x6f84('0xc'),_0x5b9e62[_0x6f84('0xd')]);OpenchannelInteractionEvents['emit'](_0x4c6c10+':'+_0x39cd30['id'],_0x39cd30);OpenchannelInteractionEvents['emit'](_0x4c6c10,_0x39cd30);_0x134e0c(null);})[_0x6f84('0xe')](_0x134e0c(null));};}for(var e in events){if(events[_0x6f84('0xf')](e)){var event=events[e];OpenchannelInteraction[_0x6f84('0x10')](e,emitEvent(event));}}module[_0x6f84('0x11')]=OpenchannelInteractionEvents; \ No newline at end of file diff --git a/server/api/openchannelInteraction/openchannelInteraction.model.js b/server/api/openchannelInteraction/openchannelInteraction.model.js index 9e1b273..333e427 100644 --- a/server/api/openchannelInteraction/openchannelInteraction.model.js +++ b/server/api/openchannelInteraction/openchannelInteraction.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xedba=['request-promise','path','../../config/environment','./openchannelInteraction.attributes','define','closed','format','YYYY-MM-DD\x20HH:mm:ss','lodash','util','../../config/logger','api','bluebird'];(function(_0x14ec6b,_0x40f8bc){var _0x4aa1b6=function(_0x26d0e7){while(--_0x26d0e7){_0x14ec6b['push'](_0x14ec6b['shift']());}};_0x4aa1b6(++_0x40f8bc);}(_0xedba,0xe5));var _0xaedb=function(_0x2b6eed,_0x243b55){_0x2b6eed=_0x2b6eed-0x0;var _0x40f2d9=_0xedba[_0x2b6eed];return _0x40f2d9;};'use strict';var _=require(_0xaedb('0x0'));var util=require(_0xaedb('0x1'));var logger=require(_0xaedb('0x2'))(_0xaedb('0x3'));var moment=require('moment');var BPromise=require(_0xaedb('0x4'));var rp=require(_0xaedb('0x5'));var fs=require('fs');var path=require(_0xaedb('0x6'));var rimraf=require('rimraf');var config=require(_0xaedb('0x7'));var attributes=require(_0xaedb('0x8'));module['exports']=function(_0x13bdba,_0x2420f3){return _0x13bdba[_0xaedb('0x9')]('OpenchannelInteraction',attributes,{'tableName':'openchannel_interactions','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x3f3ebc,_0xcff0b6,_0x528f4a){if(_0x3f3ebc['changed'](_0xaedb('0xa'))){_0x3f3ebc['closedAt']=moment()[_0xaedb('0xb')](_0xaedb('0xc'));}_0x528f4a(null,_0x3f3ebc);}}});}; \ No newline at end of file +var _0xb252=['closed','closedAt','format','lodash','util','../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment','./openchannelInteraction.attributes','exports','define','OpenchannelInteraction','openchannel_interactions','changed'];(function(_0x55940c,_0x5cceb7){var _0x37a6a2=function(_0x1d0bee){while(--_0x1d0bee){_0x55940c['push'](_0x55940c['shift']());}};_0x37a6a2(++_0x5cceb7);}(_0xb252,0x135));var _0x2b25=function(_0x1d432d,_0x7c085a){_0x1d432d=_0x1d432d-0x0;var _0x5ad094=_0xb252[_0x1d432d];return _0x5ad094;};'use strict';var _=require(_0x2b25('0x0'));var util=require(_0x2b25('0x1'));var logger=require(_0x2b25('0x2'))(_0x2b25('0x3'));var moment=require(_0x2b25('0x4'));var BPromise=require(_0x2b25('0x5'));var rp=require(_0x2b25('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0x2b25('0x7'));var config=require(_0x2b25('0x8'));var attributes=require(_0x2b25('0x9'));module[_0x2b25('0xa')]=function(_0x1020fc,_0x3fd7b2){return _0x1020fc[_0x2b25('0xb')](_0x2b25('0xc'),attributes,{'tableName':_0x2b25('0xd'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x328d12,_0x58cbfa,_0x5305f7){if(_0x328d12[_0x2b25('0xe')](_0x2b25('0xf'))){_0x328d12[_0x2b25('0x10')]=moment()[_0x2b25('0x11')]('YYYY-MM-DD\x20HH:mm:ss');}_0x5305f7(null,_0x328d12);}}});}; \ No newline at end of file diff --git a/server/api/openchannelInteraction/openchannelInteraction.rpc.js b/server/api/openchannelInteraction/openchannelInteraction.rpc.js index 521370c..e56541c 100644 --- a/server/api/openchannelInteraction/openchannelInteraction.rpc.js +++ b/server/api/openchannelInteraction/openchannelInteraction.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd788=['localhost','socket.io-emitter','register','request','then','info','OpenchannelInteraction,\x20%s,\x20%s','debug','OpenchannelInteraction,\x20%s,\x20%s,\x20%s','error','code','message','request\x20sent','result','catch','UpdateOpenchannelInteraction','OpenchannelInteraction','body','options','where','attributes','limit','stringify','AddTagsToOpenchannelInteraction','find','addTags','ids','spread','AddTags','lodash','util','moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults'];(function(_0x1724e6,_0x7bfcf2){var _0x3b2ff8=function(_0x17b9b5){while(--_0x17b9b5){_0x1724e6['push'](_0x1724e6['shift']());}};_0x3b2ff8(++_0x7bfcf2);}(_0xd788,0x11f));var _0x8d78=function(_0x34ed48,_0x2cc995){_0x34ed48=_0x34ed48-0x0;var _0x37da5c=_0xd788[_0x34ed48];return _0x37da5c;};'use strict';var _=require(_0x8d78('0x0'));var util=require(_0x8d78('0x1'));var moment=require(_0x8d78('0x2'));var BPromise=require('bluebird');var rs=require(_0x8d78('0x3'));var fs=require('fs');var Redis=require(_0x8d78('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x8d78('0x5'));var logger=require(_0x8d78('0x6'))(_0x8d78('0x7'));var config=require(_0x8d78('0x8'));var jayson=require(_0x8d78('0x9'));var client=jayson[_0x8d78('0xa')][_0x8d78('0xb')]({'port':0x232a});config[_0x8d78('0xc')]=_[_0x8d78('0xd')](config[_0x8d78('0xc')],{'host':_0x8d78('0xe'),'port':0x18eb});var socket=require(_0x8d78('0xf'))(new Redis(config['redis']));require('./openchannelInteraction.socket')[_0x8d78('0x10')](socket);function respondWithRpcPromise(_0x3a1468,_0xedb696,_0x9a3355){return new BPromise(function(_0x3e30fc,_0x5cddb6){return client[_0x8d78('0x11')](_0x3a1468,_0x9a3355)[_0x8d78('0x12')](function(_0x28156c){logger[_0x8d78('0x13')](_0x8d78('0x14'),_0xedb696,'request\x20sent');logger[_0x8d78('0x15')](_0x8d78('0x16'),_0xedb696,'request\x20sent',JSON['stringify'](_0x28156c));if(_0x28156c[_0x8d78('0x17')]){if(_0x28156c['error'][_0x8d78('0x18')]===0x1f4){logger[_0x8d78('0x17')]('OpenchannelInteraction,\x20%s,\x20%s',_0xedb696,_0x28156c[_0x8d78('0x17')]['message']);return _0x5cddb6(_0x28156c[_0x8d78('0x17')][_0x8d78('0x19')]);}logger[_0x8d78('0x17')](_0x8d78('0x14'),_0xedb696,_0x28156c[_0x8d78('0x17')][_0x8d78('0x19')]);return _0x3e30fc(_0x28156c[_0x8d78('0x17')]['message']);}else{logger[_0x8d78('0x13')]('OpenchannelInteraction,\x20%s,\x20%s',_0xedb696,_0x8d78('0x1a'));_0x3e30fc(_0x28156c[_0x8d78('0x1b')]['message']);}})[_0x8d78('0x1c')](function(_0x26aac6){logger[_0x8d78('0x17')](_0x8d78('0x14'),_0xedb696,_0x26aac6);_0x5cddb6(_0x26aac6);});});}exports[_0x8d78('0x1d')]=function(_0x499656){var _0x43e872=this;return new Promise(function(_0x3d88a3,_0x8df964){return db[_0x8d78('0x1e')]['update'](_0x499656[_0x8d78('0x1f')],{'raw':_0x499656[_0x8d78('0x20')]?_0x499656['options']['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x499656['options']?_0x499656[_0x8d78('0x20')][_0x8d78('0x21')]||null:null,'attributes':_0x499656[_0x8d78('0x20')]?_0x499656['options'][_0x8d78('0x22')]||null:null,'limit':_0x499656[_0x8d78('0x20')]?_0x499656[_0x8d78('0x20')][_0x8d78('0x23')]||null:null})['then'](function(_0x59b23b){logger['info']('UpdateOpenchannelInteraction',_0x499656);logger['debug'](_0x8d78('0x1d'),_0x499656,JSON[_0x8d78('0x24')](_0x59b23b));_0x3d88a3(_0x59b23b);})['catch'](function(_0x10fab9){logger['error']('UpdateOpenchannelInteraction',_0x10fab9[_0x8d78('0x19')],_0x499656);_0x8df964(_0x43e872[_0x8d78('0x17')](0x1f4,_0x10fab9['message']));});});};exports[_0x8d78('0x25')]=function(_0x55d3cb){return new Promise(function(_0x45e09e,_0x4f8200){return db['OpenchannelInteraction'][_0x8d78('0x26')]({'where':_0x55d3cb[_0x8d78('0x20')]?_0x55d3cb[_0x8d78('0x20')][_0x8d78('0x21')]||null:null})[_0x8d78('0x12')](function(_0x240a76){if(_0x240a76){return _0x240a76[_0x8d78('0x27')](_0x55d3cb[_0x8d78('0x1f')][_0x8d78('0x28')],_['omit'](_0x55d3cb['body'],[_0x8d78('0x28'),'id'])||{});}})[_0x8d78('0x29')](function(_0x5a4e8c){logger[_0x8d78('0x13')]('AddTags',_0x55d3cb);logger[_0x8d78('0x15')](_0x8d78('0x2a'),_0x55d3cb,JSON[_0x8d78('0x24')](_0x5a4e8c));_0x45e09e(_0x5a4e8c);})['catch'](function(_0x234c5e){logger[_0x8d78('0x17')](_0x8d78('0x2a'),_0x234c5e['message'],_0x55d3cb);_0x4f8200(_this[_0x8d78('0x17')](0x1f4,_0x234c5e[_0x8d78('0x19')]));});});}; \ No newline at end of file +var _0xc10e=['rpc','../../config/environment','jayson/promise','client','http','redis','defaults','socket.io-emitter','./openchannelInteraction.socket','register','then','info','request\x20sent','debug','OpenchannelInteraction,\x20%s,\x20%s,\x20%s','stringify','error','code','message','OpenchannelInteraction,\x20%s,\x20%s','catch','UpdateOpenchannelInteraction','update','options','raw','where','attributes','limit','AddTagsToOpenchannelInteraction','OpenchannelInteraction','find','body','ids','omit','spread','AddTags','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x51d3ac,_0x2cdcfc){var _0x29b333=function(_0xd4e32){while(--_0xd4e32){_0x51d3ac['push'](_0x51d3ac['shift']());}};_0x29b333(++_0x2cdcfc);}(_0xc10e,0x174));var _0xec10=function(_0x1999ca,_0x2951ea){_0x1999ca=_0x1999ca-0x0;var _0xfcfdf6=_0xc10e[_0x1999ca];return _0xfcfdf6;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xec10('0x0'));var BPromise=require(_0xec10('0x1'));var rs=require(_0xec10('0x2'));var fs=require('fs');var Redis=require(_0xec10('0x3'));var db=require(_0xec10('0x4'))['db'];var utils=require(_0xec10('0x5'));var logger=require('../../config/logger')(_0xec10('0x6'));var config=require(_0xec10('0x7'));var jayson=require(_0xec10('0x8'));var client=jayson[_0xec10('0x9')][_0xec10('0xa')]({'port':0x232a});config[_0xec10('0xb')]=_[_0xec10('0xc')](config[_0xec10('0xb')],{'host':'localhost','port':0x18eb});var socket=require(_0xec10('0xd'))(new Redis(config['redis']));require(_0xec10('0xe'))[_0xec10('0xf')](socket);function respondWithRpcPromise(_0x27ab5f,_0x27e6c8,_0x1facf4){return new BPromise(function(_0x504ba4,_0x3b1b6a){return client['request'](_0x27ab5f,_0x1facf4)[_0xec10('0x10')](function(_0x43196e){logger[_0xec10('0x11')]('OpenchannelInteraction,\x20%s,\x20%s',_0x27e6c8,_0xec10('0x12'));logger[_0xec10('0x13')](_0xec10('0x14'),_0x27e6c8,'request\x20sent',JSON[_0xec10('0x15')](_0x43196e));if(_0x43196e['error']){if(_0x43196e[_0xec10('0x16')][_0xec10('0x17')]===0x1f4){logger[_0xec10('0x16')]('OpenchannelInteraction,\x20%s,\x20%s',_0x27e6c8,_0x43196e[_0xec10('0x16')][_0xec10('0x18')]);return _0x3b1b6a(_0x43196e[_0xec10('0x16')][_0xec10('0x18')]);}logger[_0xec10('0x16')]('OpenchannelInteraction,\x20%s,\x20%s',_0x27e6c8,_0x43196e[_0xec10('0x16')][_0xec10('0x18')]);return _0x504ba4(_0x43196e['error']['message']);}else{logger[_0xec10('0x11')](_0xec10('0x19'),_0x27e6c8,_0xec10('0x12'));_0x504ba4(_0x43196e['result'][_0xec10('0x18')]);}})[_0xec10('0x1a')](function(_0x22bc80){logger[_0xec10('0x16')](_0xec10('0x19'),_0x27e6c8,_0x22bc80);_0x3b1b6a(_0x22bc80);});});}exports[_0xec10('0x1b')]=function(_0x5b9ec2){var _0xeb4b0e=this;return new Promise(function(_0x3a0ea0,_0x84b998){return db['OpenchannelInteraction'][_0xec10('0x1c')](_0x5b9ec2['body'],{'raw':_0x5b9ec2[_0xec10('0x1d')]?_0x5b9ec2[_0xec10('0x1d')][_0xec10('0x1e')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x5b9ec2['options']?_0x5b9ec2[_0xec10('0x1d')][_0xec10('0x1f')]||null:null,'attributes':_0x5b9ec2[_0xec10('0x1d')]?_0x5b9ec2[_0xec10('0x1d')][_0xec10('0x20')]||null:null,'limit':_0x5b9ec2[_0xec10('0x1d')]?_0x5b9ec2['options'][_0xec10('0x21')]||null:null})[_0xec10('0x10')](function(_0x65377d){logger[_0xec10('0x11')](_0xec10('0x1b'),_0x5b9ec2);logger['debug'](_0xec10('0x1b'),_0x5b9ec2,JSON[_0xec10('0x15')](_0x65377d));_0x3a0ea0(_0x65377d);})[_0xec10('0x1a')](function(_0x45b064){logger[_0xec10('0x16')](_0xec10('0x1b'),_0x45b064['message'],_0x5b9ec2);_0x84b998(_0xeb4b0e[_0xec10('0x16')](0x1f4,_0x45b064[_0xec10('0x18')]));});});};exports[_0xec10('0x22')]=function(_0xcdb27){return new Promise(function(_0x43f77e,_0x20e06d){return db[_0xec10('0x23')][_0xec10('0x24')]({'where':_0xcdb27[_0xec10('0x1d')]?_0xcdb27[_0xec10('0x1d')][_0xec10('0x1f')]||null:null})[_0xec10('0x10')](function(_0x3ef27f){if(_0x3ef27f){return _0x3ef27f['addTags'](_0xcdb27[_0xec10('0x25')][_0xec10('0x26')],_[_0xec10('0x27')](_0xcdb27[_0xec10('0x25')],[_0xec10('0x26'),'id'])||{});}})[_0xec10('0x28')](function(_0x41733d){logger[_0xec10('0x11')](_0xec10('0x29'),_0xcdb27);logger[_0xec10('0x13')]('AddTags',_0xcdb27,JSON[_0xec10('0x15')](_0x41733d));_0x43f77e(_0x41733d);})['catch'](function(_0x2680b2){logger[_0xec10('0x16')](_0xec10('0x29'),_0x2680b2[_0xec10('0x18')],_0xcdb27);_0x20e06d(_this[_0xec10('0x16')](0x1f4,_0x2680b2['message']));});});}; \ No newline at end of file diff --git a/server/api/openchannelInteraction/openchannelInteraction.socket.js b/server/api/openchannelInteraction/openchannelInteraction.socket.js index ee36403..d18df79 100644 --- a/server/api/openchannelInteraction/openchannelInteraction.socket.js +++ b/server/api/openchannelInteraction/openchannelInteraction.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5031=['save','update','emit','removeListener','register','length','openchannelInteraction:','./openchannelInteraction.events'];(function(_0x1c73ef,_0x2bbb02){var _0x398965=function(_0x5ccc83){while(--_0x5ccc83){_0x1c73ef['push'](_0x1c73ef['shift']());}};_0x398965(++_0x2bbb02);}(_0x5031,0x147));var _0x1503=function(_0x15f789,_0x52c83a){_0x15f789=_0x15f789-0x0;var _0x4d7673=_0x5031[_0x15f789];return _0x4d7673;};'use strict';var OpenchannelInteractionEvents=require(_0x1503('0x0'));var events=[_0x1503('0x1'),'remove',_0x1503('0x2')];function createListener(_0x4031db,_0xf68b74){return function(_0x110c2e){_0xf68b74[_0x1503('0x3')](_0x4031db,_0x110c2e);};}function removeListener(_0x2100b6,_0x272458){return function(){OpenchannelInteractionEvents[_0x1503('0x4')](_0x2100b6,_0x272458);};}exports[_0x1503('0x5')]=function(_0xae57eb){for(var _0x268a58=0x0,_0x544ed6=events[_0x1503('0x6')];_0x268a58<_0x544ed6;_0x268a58++){var _0xd4b7ee=events[_0x268a58];var _0x12c80e=createListener(_0x1503('0x7')+_0xd4b7ee,_0xae57eb);OpenchannelInteractionEvents['on'](_0xd4b7ee,_0x12c80e);}}; \ No newline at end of file +var _0x3ff8=['removeListener','register','length','./openchannelInteraction.events','save','remove','update','emit'];(function(_0x39e073,_0x4e9ad9){var _0xb75f9b=function(_0x34c343){while(--_0x34c343){_0x39e073['push'](_0x39e073['shift']());}};_0xb75f9b(++_0x4e9ad9);}(_0x3ff8,0xd3));var _0x83ff=function(_0x44d28c,_0x3a197b){_0x44d28c=_0x44d28c-0x0;var _0x754673=_0x3ff8[_0x44d28c];return _0x754673;};'use strict';var OpenchannelInteractionEvents=require(_0x83ff('0x0'));var events=[_0x83ff('0x1'),_0x83ff('0x2'),_0x83ff('0x3')];function createListener(_0x20a451,_0x252b0e){return function(_0xb48f8c){_0x252b0e[_0x83ff('0x4')](_0x20a451,_0xb48f8c);};}function removeListener(_0x4d95c8,_0x13145d){return function(){OpenchannelInteractionEvents[_0x83ff('0x5')](_0x4d95c8,_0x13145d);};}exports[_0x83ff('0x6')]=function(_0x152729){for(var _0x56c92b=0x0,_0x3d1252=events[_0x83ff('0x7')];_0x56c92b<_0x3d1252;_0x56c92b++){var _0x2c7663=events[_0x56c92b];var _0x17db0f=createListener('openchannelInteraction:'+_0x2c7663,_0x152729);OpenchannelInteractionEvents['on'](_0x2c7663,_0x17db0f);}}; \ No newline at end of file diff --git a/server/api/openchannelMessage/index.js b/server/api/openchannelMessage/index.js index 6b6f034..f88e55a 100644 --- a/server/api/openchannelMessage/index.js +++ b/server/api/openchannelMessage/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd8b0=['Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','isAuthenticated','index','get','describe','/:id','show','post','tracked','openchannel','openchannelmessage:create','put','update','/:id/accept','accept','/:id/reject','reject','delete','destroy','multer','util'];(function(_0x3f29b4,_0x2b5b02){var _0x4d8893=function(_0x464c1c){while(--_0x464c1c){_0x3f29b4['push'](_0x3f29b4['shift']());}};_0x4d8893(++_0x2b5b02);}(_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('./openchannelMessage.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')](),interaction[_0x0d8b('0xe')](_0x0d8b('0xf'),_0x0d8b('0x10')),controller['create']);router[_0x0d8b('0x11')]('/:id',auth[_0x0d8b('0x7')](),controller[_0x0d8b('0x12')]);router[_0x0d8b('0x11')](_0x0d8b('0x13'),auth[_0x0d8b('0x7')](),controller[_0x0d8b('0x14')]);router[_0x0d8b('0x11')](_0x0d8b('0x15'),auth[_0x0d8b('0x7')](),controller[_0x0d8b('0x16')]);router[_0x0d8b('0x17')](_0x0d8b('0xb'),auth[_0x0d8b('0x7')](),controller[_0x0d8b('0x18')]);module['exports']=router; \ No newline at end of file +var _0x0713=['get','isAuthenticated','index','/describe','describe','/:id','post','tracked','openchannel','openchannelmessage:create','put','update','accept','/:id/reject','delete','destroy','exports','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./openchannelMessage.controller'];(function(_0x42cae2,_0x284ef8){var _0x5f256f=function(_0x41abc8){while(--_0x41abc8){_0x42cae2['push'](_0x42cae2['shift']());}};_0x5f256f(++_0x284ef8);}(_0x0713,0x1ba));var _0x3071=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0713[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x3071('0x0'));var timeout=require(_0x3071('0x1'));var express=require(_0x3071('0x2'));var router=express[_0x3071('0x3')]();var fs_extra=require(_0x3071('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x3071('0x5'));var config=require(_0x3071('0x6'));var controller=require(_0x3071('0x7'));router[_0x3071('0x8')]('/',auth[_0x3071('0x9')](),controller[_0x3071('0xa')]);router[_0x3071('0x8')](_0x3071('0xb'),auth[_0x3071('0x9')](),controller[_0x3071('0xc')]);router[_0x3071('0x8')](_0x3071('0xd'),auth[_0x3071('0x9')](),controller['show']);router[_0x3071('0xe')]('/',auth[_0x3071('0x9')](),interaction[_0x3071('0xf')](_0x3071('0x10'),_0x3071('0x11')),controller['create']);router[_0x3071('0x12')](_0x3071('0xd'),auth[_0x3071('0x9')](),controller[_0x3071('0x13')]);router[_0x3071('0x12')]('/:id/accept',auth['isAuthenticated'](),controller[_0x3071('0x14')]);router['put'](_0x3071('0x15'),auth[_0x3071('0x9')](),controller['reject']);router[_0x3071('0x16')]('/:id',auth[_0x3071('0x9')](),controller[_0x3071('0x17')]);module[_0x3071('0x18')]=router; \ No newline at end of file diff --git a/server/api/openchannelMessage/openchannelMessage.attributes.js b/server/api/openchannelMessage/openchannelMessage.attributes.js index 3b21ddf..d56d87f 100644 --- a/server/api/openchannelMessage/openchannelMessage.attributes.js +++ b/server/api/openchannelMessage/openchannelMessage.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x38d0=['BOOLEAN','ENUM','DATE','exports','TEXT','medium'];(function(_0x57a5b5,_0x460674){var _0x4ff474=function(_0x7c351f){while(--_0x7c351f){_0x57a5b5['push'](_0x57a5b5['shift']());}};_0x4ff474(++_0x460674);}(_0x38d0,0x123));var _0x038d=function(_0x3d42d8,_0x4cffaa){_0x3d42d8=_0x3d42d8-0x0;var _0x27fc41=_0x38d0[_0x3d42d8];return _0x27fc41;};'use strict';var Sequelize=require('sequelize');module[_0x038d('0x0')]={'body':{'type':Sequelize[_0x038d('0x1')](_0x038d('0x2')),'allowNull':![]},'read':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'secret':{'type':Sequelize[_0x038d('0x3')],'defaultValue':![]},'direction':{'type':Sequelize[_0x038d('0x4')]('in','out'),'defaultValue':'out','allowNull':![]},'readAt':{'type':Sequelize[_0x038d('0x5')]},'providerName':{'type':Sequelize['STRING']},'providerResponse':{'type':Sequelize[_0x038d('0x1')]}}; \ No newline at end of file +var _0x8164=['out','DATE','sequelize','exports','TEXT','BOOLEAN'];(function(_0x419faf,_0x290ab8){var _0x49a055=function(_0x2104cd){while(--_0x2104cd){_0x419faf['push'](_0x419faf['shift']());}};_0x49a055(++_0x290ab8);}(_0x8164,0x170));var _0x4816=function(_0x23ca4d,_0x5c2a32){_0x23ca4d=_0x23ca4d-0x0;var _0x435432=_0x8164[_0x23ca4d];return _0x435432;};'use strict';var Sequelize=require(_0x4816('0x0'));module[_0x4816('0x1')]={'body':{'type':Sequelize[_0x4816('0x2')]('medium'),'allowNull':![]},'read':{'type':Sequelize[_0x4816('0x3')],'defaultValue':![]},'secret':{'type':Sequelize[_0x4816('0x3')],'defaultValue':![]},'direction':{'type':Sequelize['ENUM']('in',_0x4816('0x4')),'defaultValue':'out','allowNull':![]},'readAt':{'type':Sequelize[_0x4816('0x5')]},'providerName':{'type':Sequelize['STRING']},'providerResponse':{'type':Sequelize['TEXT']}}; \ No newline at end of file diff --git a/server/api/openchannelMessage/openchannelMessage.controller.js b/server/api/openchannelMessage/openchannelMessage.controller.js index 5c89444..18bc482 100644 --- a/server/api/openchannelMessage/openchannelMessage.controller.js +++ b/server/api/openchannelMessage/openchannelMessage.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7f15=['QueryTypes','SELECT','contact','manual','SIP/%s','channel','event','EventManager','acceptmessage','agent','OpenchannelInteractionId','[OPENCHANNELMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','RejectMessage','rejectMessage','cf_','interface','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','defaults','redis','localhost','socket.io-emitter','./openchannelMessage.socket','register','jayson/promise','client','http','request','then','info','OpenchannelMessage,\x20%s,\x20%s','request\x20sent','debug','OpenchannelMessage,\x20%s,\x20%s,\x20%s','stringify','error','message','result','sendStatus','status','end','json','undefined','count','offset','limit','set','apply','reject','save','update','destroy','stack','name','index','OpenchannelMessage','rawAttributes','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','pick','filter','map','VIRTUAL','includeAll','include','findAll','rows','catch','params','find','create','body','openchannel-interactions','accept','openchannel','read','readAt','YYYY-MM-DD\x20HH:mm:ss','UserId','CmContact','Contact','get','OpenchannelInteraction','isNil','format','interaction','[OPENCHANNELMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','user','role','null','acceptMessage','describe','startsWith','push','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','ContactId','sequelize','Sequelize'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0x7f15,0x1a8));var _0x57f1=function(_0x4550b6,_0x4fbe0e){_0x4550b6=_0x4550b6-0x0;var _0x49291f=_0x7f15[_0x4550b6];return _0x49291f;};'use strict';var emlformat=require(_0x57f1('0x0'));var rimraf=require(_0x57f1('0x1'));var zipdir=require(_0x57f1('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x57f1('0x3'));var moment=require(_0x57f1('0x4'));var BPromise=require(_0x57f1('0x5'));var Mustache=require(_0x57f1('0x6'));var util=require('util');var path=require(_0x57f1('0x7'));var sox=require(_0x57f1('0x8'));var csv=require(_0x57f1('0x9'));var ejs=require(_0x57f1('0xa'));var fs=require('fs');var fs_extra=require(_0x57f1('0xb'));var _=require(_0x57f1('0xc'));var squel=require(_0x57f1('0xd'));var crypto=require(_0x57f1('0xe'));var jsforce=require(_0x57f1('0xf'));var deskjs=require(_0x57f1('0x10'));var toCsv=require('to-csv');var querystring=require(_0x57f1('0x11'));var Papa=require(_0x57f1('0x12'));var Redis=require('ioredis');var authService=require(_0x57f1('0x13'));var qs=require(_0x57f1('0x14'));var as=require(_0x57f1('0x15'));var hardwareService=require(_0x57f1('0x16'));var logger=require(_0x57f1('0x17'))(_0x57f1('0x18'));var utils=require(_0x57f1('0x19'));var config=require('../../config/environment');var licenseUtil=require(_0x57f1('0x1a'));var db=require(_0x57f1('0x1b'))['db'];config['redis']=_[_0x57f1('0x1c')](config[_0x57f1('0x1d')],{'host':_0x57f1('0x1e'),'port':0x18eb});var socket=require(_0x57f1('0x1f'))(new Redis(config[_0x57f1('0x1d')]));require(_0x57f1('0x20'))[_0x57f1('0x21')](socket);var jayson=require(_0x57f1('0x22'));var client=jayson[_0x57f1('0x23')][_0x57f1('0x24')]({'port':0x232c});var client9002=jayson[_0x57f1('0x23')][_0x57f1('0x24')]({'port':0x232a});function respondWithRpcPromise(_0x14b1c7,_0x18b5b4,_0x288eb5,_0x2d8e12){return new BPromise(function(_0x40bf0f,_0x27c8e0){var _0x383b4c=_0x2d8e12||client;return _0x383b4c[_0x57f1('0x25')](_0x14b1c7,_0x288eb5)[_0x57f1('0x26')](function(_0x2f7032){logger[_0x57f1('0x27')](_0x57f1('0x28'),_0x18b5b4,_0x57f1('0x29'));logger[_0x57f1('0x2a')](_0x57f1('0x2b'),_0x18b5b4,_0x57f1('0x29'),JSON[_0x57f1('0x2c')](_0x2f7032));if(_0x2f7032[_0x57f1('0x2d')]){if(_0x2f7032['error']['code']===0x1f4){logger[_0x57f1('0x2d')](_0x57f1('0x28'),_0x18b5b4,_0x2f7032[_0x57f1('0x2d')][_0x57f1('0x2e')]);return _0x27c8e0(_0x2f7032['error']['message']);}logger[_0x57f1('0x2d')](_0x57f1('0x28'),_0x18b5b4,_0x2f7032[_0x57f1('0x2d')][_0x57f1('0x2e')]);return _0x40bf0f(_0x2f7032[_0x57f1('0x2d')]['message']);}else{logger[_0x57f1('0x27')](_0x57f1('0x28'),_0x18b5b4,_0x57f1('0x29'));_0x40bf0f(_0x2f7032[_0x57f1('0x2f')][_0x57f1('0x2e')]);}})['catch'](function(_0x374cbc){logger[_0x57f1('0x2d')]('OpenchannelMessage,\x20%s,\x20%s',_0x18b5b4,_0x374cbc);_0x27c8e0(_0x374cbc);});});}function respondWithStatusCode(_0x6401a9,_0x5ea2d6){_0x5ea2d6=_0x5ea2d6||0xcc;return function(_0xb137a8){if(_0xb137a8){return _0x6401a9[_0x57f1('0x30')](_0x5ea2d6);}return _0x6401a9[_0x57f1('0x31')](_0x5ea2d6)[_0x57f1('0x32')]();};}function respondWithResult(_0x2d716e,_0x55ca81){_0x55ca81=_0x55ca81||0xc8;return function(_0x11dd11){if(_0x11dd11){return _0x2d716e[_0x57f1('0x31')](_0x55ca81)[_0x57f1('0x33')](_0x11dd11);}};}function respondWithFilteredResult(_0x52f4be,_0x1634ec){return function(_0x310009){if(_0x310009){var _0x284028=typeof _0x1634ec['offset']===_0x57f1('0x34')&&typeof _0x1634ec['limit']===_0x57f1('0x34');var _0x293d39=_0x310009[_0x57f1('0x35')];var _0x1907fa=_0x284028?0x0:_0x1634ec[_0x57f1('0x36')];var _0x554c1f=_0x284028?_0x310009[_0x57f1('0x35')]:_0x1634ec[_0x57f1('0x36')]+_0x1634ec[_0x57f1('0x37')];var _0x49711f;if(_0x554c1f>=_0x293d39){_0x554c1f=_0x293d39;_0x49711f=0xc8;}else{_0x49711f=0xce;}_0x52f4be[_0x57f1('0x31')](_0x49711f);return _0x52f4be[_0x57f1('0x38')]('Content-Range',_0x1907fa+'-'+_0x554c1f+'/'+_0x293d39)[_0x57f1('0x33')](_0x310009);}return null;};}function patchUpdates(_0x2a3991){return function(_0x16c4d7){try{jsonpatch[_0x57f1('0x39')](_0x16c4d7,_0x2a3991,!![]);}catch(_0x499567){return BPromise[_0x57f1('0x3a')](_0x499567);}return _0x16c4d7[_0x57f1('0x3b')]();};}function saveUpdates(_0x19f632,_0x2c07fd){return function(_0x31a255){if(_0x31a255){return _0x31a255[_0x57f1('0x3c')](_0x19f632)[_0x57f1('0x26')](function(_0x499644){return _0x499644;});}return null;};}function removeEntity(_0x4c6d7a,_0x481b88){return function(_0x51591c){if(_0x51591c){return _0x51591c[_0x57f1('0x3d')]()['then'](function(){_0x4c6d7a[_0x57f1('0x31')](0xcc)[_0x57f1('0x32')]();});}};}function handleEntityNotFound(_0x2ecaa6,_0x5ab964){return function(_0x17674b){if(!_0x17674b){_0x2ecaa6['sendStatus'](0x194);}return _0x17674b;};}function handleError(_0xde23ac,_0x5ac62b){_0x5ac62b=_0x5ac62b||0x1f4;return function(_0x4442ba){logger[_0x57f1('0x2d')](_0x4442ba[_0x57f1('0x3e')]);if(_0x4442ba[_0x57f1('0x3f')]){delete _0x4442ba[_0x57f1('0x3f')];}_0xde23ac[_0x57f1('0x31')](_0x5ac62b)['send'](_0x4442ba);};}exports[_0x57f1('0x40')]=function(_0x5b08a0,_0x171314){var _0x4eda89={},_0x441267={},_0x3fee05={'count':0x0,'rows':[]};var _0x36b949=_['map'](db[_0x57f1('0x41')][_0x57f1('0x42')],function(_0x26d947){return{'name':_0x26d947['fieldName'],'type':_0x26d947[_0x57f1('0x43')][_0x57f1('0x44')]};});_0x441267[_0x57f1('0x45')]=_['map'](_0x36b949,_0x57f1('0x3f'));_0x441267[_0x57f1('0x46')]=_[_0x57f1('0x47')](_0x5b08a0[_0x57f1('0x46')]);_0x441267[_0x57f1('0x48')]=_[_0x57f1('0x49')](_0x441267['model'],_0x441267[_0x57f1('0x46')]);_0x4eda89[_0x57f1('0x4a')]=_[_0x57f1('0x49')](_0x441267[_0x57f1('0x45')],qs[_0x57f1('0x4b')](_0x5b08a0['query']['fields']));_0x4eda89[_0x57f1('0x4a')]=_0x4eda89[_0x57f1('0x4a')][_0x57f1('0x4c')]?_0x4eda89['attributes']:_0x441267[_0x57f1('0x45')];if(!_0x5b08a0[_0x57f1('0x46')][_0x57f1('0x4d')]('nolimit')){_0x4eda89[_0x57f1('0x37')]=qs[_0x57f1('0x37')](_0x5b08a0['query'][_0x57f1('0x37')]);_0x4eda89['offset']=qs['offset'](_0x5b08a0['query'][_0x57f1('0x36')]);}_0x4eda89[_0x57f1('0x4e')]=qs[_0x57f1('0x4f')](_0x5b08a0[_0x57f1('0x46')][_0x57f1('0x4f')]);_0x4eda89[_0x57f1('0x50')]=qs['filters'](_[_0x57f1('0x51')](_0x5b08a0['query'],_0x441267[_0x57f1('0x48')]),_0x36b949);if(_0x5b08a0['query'][_0x57f1('0x52')]){_0x4eda89[_0x57f1('0x50')]=_['merge'](_0x4eda89[_0x57f1('0x50')],{'$or':_[_0x57f1('0x53')](_0x36b949,function(_0x7188e4){if(_0x7188e4[_0x57f1('0x43')]!==_0x57f1('0x54')){var _0x492f35={};_0x492f35[_0x7188e4[_0x57f1('0x3f')]]={'$like':'%'+_0x5b08a0[_0x57f1('0x46')][_0x57f1('0x52')]+'%'};return _0x492f35;}})});}_0x4eda89=_['merge']({},_0x4eda89,_0x5b08a0['options']);var _0x452104={'where':_0x4eda89['where']};return db[_0x57f1('0x41')][_0x57f1('0x35')](_0x452104)['then'](function(_0x15ec96){_0x3fee05['count']=_0x15ec96;if(_0x5b08a0[_0x57f1('0x46')][_0x57f1('0x55')]){_0x4eda89[_0x57f1('0x56')]=[{'all':!![]}];}return db[_0x57f1('0x41')][_0x57f1('0x57')](_0x4eda89);})[_0x57f1('0x26')](function(_0xb12d44){_0x3fee05[_0x57f1('0x58')]=_0xb12d44;return _0x3fee05;})[_0x57f1('0x26')](respondWithFilteredResult(_0x171314,_0x4eda89))[_0x57f1('0x59')](handleError(_0x171314,null));};exports['show']=function(_0x36460e,_0x4c14ce){var _0x576364={'raw':!![],'where':{'id':_0x36460e[_0x57f1('0x5a')]['id']}},_0x2d36e0={};_0x2d36e0['model']=_['keys'](db[_0x57f1('0x41')][_0x57f1('0x42')]);_0x2d36e0[_0x57f1('0x46')]=_[_0x57f1('0x47')](_0x36460e[_0x57f1('0x46')]);_0x2d36e0[_0x57f1('0x48')]=_[_0x57f1('0x49')](_0x2d36e0['model'],_0x2d36e0[_0x57f1('0x46')]);_0x576364['attributes']=_[_0x57f1('0x49')](_0x2d36e0['model'],qs[_0x57f1('0x4b')](_0x36460e[_0x57f1('0x46')][_0x57f1('0x4b')]));_0x576364['attributes']=_0x576364[_0x57f1('0x4a')]['length']?_0x576364[_0x57f1('0x4a')]:_0x2d36e0[_0x57f1('0x45')];if(_0x36460e[_0x57f1('0x46')][_0x57f1('0x55')]){_0x576364[_0x57f1('0x56')]=[{'all':!![]}];}_0x576364=_['merge']({},_0x576364,_0x36460e['options']);return db[_0x57f1('0x41')][_0x57f1('0x5b')](_0x576364)[_0x57f1('0x26')](handleEntityNotFound(_0x4c14ce,null))[_0x57f1('0x26')](respondWithResult(_0x4c14ce,null))[_0x57f1('0x59')](handleError(_0x4c14ce,null));};exports[_0x57f1('0x5c')]=function(_0x2aceab,_0x2d0fc9){return db[_0x57f1('0x41')][_0x57f1('0x5c')](_0x2aceab[_0x57f1('0x5d')],{})[_0x57f1('0x26')](respondWithResult(_0x2d0fc9,0xc9))[_0x57f1('0x59')](handleError(_0x2d0fc9,null));};exports['update']=function(_0x3266f8,_0x2d37e9){if(_0x3266f8[_0x57f1('0x5d')]['id']){delete _0x3266f8[_0x57f1('0x5d')]['id'];}return db[_0x57f1('0x41')]['find']({'where':{'id':_0x3266f8[_0x57f1('0x5a')]['id']}})[_0x57f1('0x26')](handleEntityNotFound(_0x2d37e9,null))[_0x57f1('0x26')](saveUpdates(_0x3266f8[_0x57f1('0x5d')],null))['then'](respondWithResult(_0x2d37e9,null))[_0x57f1('0x59')](handleError(_0x2d37e9,null));};exports[_0x57f1('0x3d')]=function(_0x5aaca7,_0x10861d){return db[_0x57f1('0x41')]['find']({'where':{'id':_0x5aaca7[_0x57f1('0x5a')]['id']}})[_0x57f1('0x26')](handleEntityNotFound(_0x10861d,null))[_0x57f1('0x26')](removeEntity(_0x10861d,null))[_0x57f1('0x59')](handleError(_0x10861d,null));};exports['describe']=function(_0x5cee64,_0x33eb74){return db[_0x57f1('0x41')]['describe']()[_0x57f1('0x26')](respondWithResult(_0x33eb74,null))[_0x57f1('0x59')](handleError(_0x33eb74,null));};var interaction_log=require(_0x57f1('0x17'))(_0x57f1('0x5e'));exports[_0x57f1('0x5f')]=function(_0x3a81f9,_0x41333b,_0x56caba){var _0x1c705d={'agent':{},'channel':_0x57f1('0x60')};if(_0x3a81f9['body']['id']){delete _0x3a81f9['body']['id'];}_0x3a81f9['body'][_0x57f1('0x61')]=!![];_0x3a81f9[_0x57f1('0x5d')][_0x57f1('0x62')]=moment()['format'](_0x57f1('0x63'));_0x3a81f9[_0x57f1('0x5d')][_0x57f1('0x64')]=_0x3a81f9[_0x57f1('0x5d')][_0x57f1('0x64')]||_0x3a81f9['user']['id'];_0x1c705d['agent']['id']=_0x3a81f9[_0x57f1('0x5d')][_0x57f1('0x64')];return db[_0x57f1('0x41')][_0x57f1('0x5b')]({'where':{'id':_0x3a81f9[_0x57f1('0x5a')]['id'],'UserId':null},'include':[{'model':db[_0x57f1('0x65')],'as':_0x57f1('0x66')}]})[_0x57f1('0x26')](handleEntityNotFound(_0x41333b,null))[_0x57f1('0x26')](saveUpdates(_0x3a81f9[_0x57f1('0x5d')],null))[_0x57f1('0x26')](function(_0x13558d){if(_0x13558d){_0x1c705d[_0x57f1('0x2e')]=_0x13558d[_0x57f1('0x67')]({'plain':!![]});return db[_0x57f1('0x68')][_0x57f1('0x5b')]({'where':{'id':_0x13558d['OpenchannelInteractionId']}});}return null;})[_0x57f1('0x26')](handleEntityNotFound(_0x41333b,null))[_0x57f1('0x26')](function(_0x1d1985){if(_0x1d1985){return _0x1d1985[_0x57f1('0x3c')]({'UserId':_0x3a81f9[_0x57f1('0x5d')][_0x57f1('0x64')],'read1stAt':_[_0x57f1('0x69')](_0x1d1985['read1stAt'])?moment()[_0x57f1('0x6a')](_0x57f1('0x63')):undefined});}return null;})['then'](function(_0x2e2e26){if(_0x2e2e26){_0x1c705d[_0x57f1('0x6b')]=_0x2e2e26['get']({'plain':!![]});interaction_log[_0x57f1('0x27')](_0x57f1('0x6c'),_0x3a81f9[_0x57f1('0x6d')]['id'],_0x3a81f9[_0x57f1('0x6d')][_0x57f1('0x3f')],_0x3a81f9['user'][_0x57f1('0x6e')],_0x1c705d[_0x57f1('0x6b')]['id'],_0x3a81f9[_0x57f1('0x5d')]?JSON['stringify'](_0x3a81f9[_0x57f1('0x5d')]):_0x57f1('0x6f'));return respondWithRpcPromise('AcceptMessage',_0x57f1('0x70'),_0x1c705d);}return null;})[_0x57f1('0x26')](function(_0x4c5706){return db[_0x57f1('0x65')][_0x57f1('0x71')]()[_0x57f1('0x26')](function(_0x4fa78b){var _0x308199=[];for(var _0x356743=0x0;_0x356743=_0x418b39){_0x3074c9=_0x418b39;_0x4842ff=0xc8;}else{_0x4842ff=0xce;}_0xef264f['status'](_0x4842ff);return _0xef264f[_0x0f50('0x2e')]('Content-Range',_0x3fdb50+'-'+_0x3074c9+'/'+_0x418b39)[_0x0f50('0x29')](_0x28d0f1);}return null;};}function patchUpdates(_0x5d5e38){return function(_0x42926a){try{jsonpatch[_0x0f50('0x2f')](_0x42926a,_0x5d5e38,!![]);}catch(_0x3e8489){return BPromise[_0x0f50('0x30')](_0x3e8489);}return _0x42926a[_0x0f50('0x31')]();};}function saveUpdates(_0x1c9644,_0x52d103){return function(_0x435926){if(_0x435926){return _0x435926[_0x0f50('0x32')](_0x1c9644)[_0x0f50('0x1d')](function(_0x2f0179){return _0x2f0179;});}return null;};}function removeEntity(_0x4145bc,_0x249987){return function(_0xd29cd1){if(_0xd29cd1){return _0xd29cd1[_0x0f50('0x33')]()[_0x0f50('0x1d')](function(){_0x4145bc[_0x0f50('0x28')](0xcc)['end']();});}};}function handleEntityNotFound(_0x57319a,_0x17587e){return function(_0x43f658){if(!_0x43f658){_0x57319a[_0x0f50('0x27')](0x194);}return _0x43f658;};}function handleError(_0x31a6e3,_0xfdc62d){_0xfdc62d=_0xfdc62d||0x1f4;return function(_0x38f3d0){logger[_0x0f50('0x23')](_0x38f3d0['stack']);if(_0x38f3d0['name']){delete _0x38f3d0[_0x0f50('0x34')];}_0x31a6e3[_0x0f50('0x28')](_0xfdc62d)[_0x0f50('0x35')](_0x38f3d0);};}exports['index']=function(_0x5199f6,_0x1cd2c1){var _0x3061f7={},_0x94bb7a={},_0x2e53f9={'count':0x0,'rows':[]};var _0x133e14=_['map'](db[_0x0f50('0x36')][_0x0f50('0x37')],function(_0xdb617c){return{'name':_0xdb617c[_0x0f50('0x38')],'type':_0xdb617c['type']['key']};});_0x94bb7a[_0x0f50('0x39')]=_['map'](_0x133e14,_0x0f50('0x34'));_0x94bb7a['query']=_['keys'](_0x5199f6['query']);_0x94bb7a[_0x0f50('0x3a')]=_[_0x0f50('0x3b')](_0x94bb7a['model'],_0x94bb7a[_0x0f50('0x3c')]);_0x3061f7[_0x0f50('0x3d')]=_[_0x0f50('0x3b')](_0x94bb7a[_0x0f50('0x39')],qs[_0x0f50('0x3e')](_0x5199f6[_0x0f50('0x3c')][_0x0f50('0x3e')]));_0x3061f7['attributes']=_0x3061f7['attributes'][_0x0f50('0x3f')]?_0x3061f7[_0x0f50('0x3d')]:_0x94bb7a[_0x0f50('0x39')];if(!_0x5199f6[_0x0f50('0x3c')][_0x0f50('0x40')](_0x0f50('0x41'))){_0x3061f7['limit']=qs[_0x0f50('0x2c')](_0x5199f6['query']['limit']);_0x3061f7[_0x0f50('0x2a')]=qs['offset'](_0x5199f6[_0x0f50('0x3c')][_0x0f50('0x2a')]);}_0x3061f7[_0x0f50('0x42')]=qs[_0x0f50('0x43')](_0x5199f6[_0x0f50('0x3c')][_0x0f50('0x43')]);_0x3061f7['where']=qs[_0x0f50('0x3a')](_[_0x0f50('0x44')](_0x5199f6[_0x0f50('0x3c')],_0x94bb7a[_0x0f50('0x3a')]),_0x133e14);if(_0x5199f6['query']['filter']){_0x3061f7[_0x0f50('0x45')]=_[_0x0f50('0x46')](_0x3061f7[_0x0f50('0x45')],{'$or':_[_0x0f50('0x47')](_0x133e14,function(_0x5a89af){if(_0x5a89af[_0x0f50('0x48')]!==_0x0f50('0x49')){var _0x26a7ec={};_0x26a7ec[_0x5a89af[_0x0f50('0x34')]]={'$like':'%'+_0x5199f6[_0x0f50('0x3c')][_0x0f50('0x4a')]+'%'};return _0x26a7ec;}})});}_0x3061f7=_[_0x0f50('0x46')]({},_0x3061f7,_0x5199f6[_0x0f50('0x4b')]);var _0x3ad739={'where':_0x3061f7['where']};return db[_0x0f50('0x36')][_0x0f50('0x2d')](_0x3ad739)[_0x0f50('0x1d')](function(_0x2f144f){_0x2e53f9[_0x0f50('0x2d')]=_0x2f144f;if(_0x5199f6[_0x0f50('0x3c')][_0x0f50('0x4c')]){_0x3061f7[_0x0f50('0x4d')]=[{'all':!![]}];}return db[_0x0f50('0x36')]['findAll'](_0x3061f7);})[_0x0f50('0x1d')](function(_0x4caaaf){_0x2e53f9['rows']=_0x4caaaf;return _0x2e53f9;})[_0x0f50('0x1d')](respondWithFilteredResult(_0x1cd2c1,_0x3061f7))[_0x0f50('0x26')](handleError(_0x1cd2c1,null));};exports[_0x0f50('0x4e')]=function(_0xeeb6f2,_0x167620){var _0xea3de3={'raw':!![],'where':{'id':_0xeeb6f2['params']['id']}},_0x5dfcb9={};_0x5dfcb9[_0x0f50('0x39')]=_['keys'](db[_0x0f50('0x36')][_0x0f50('0x37')]);_0x5dfcb9['query']=_[_0x0f50('0x4f')](_0xeeb6f2[_0x0f50('0x3c')]);_0x5dfcb9['filters']=_[_0x0f50('0x3b')](_0x5dfcb9['model'],_0x5dfcb9[_0x0f50('0x3c')]);_0xea3de3[_0x0f50('0x3d')]=_[_0x0f50('0x3b')](_0x5dfcb9[_0x0f50('0x39')],qs[_0x0f50('0x3e')](_0xeeb6f2[_0x0f50('0x3c')][_0x0f50('0x3e')]));_0xea3de3[_0x0f50('0x3d')]=_0xea3de3['attributes']['length']?_0xea3de3[_0x0f50('0x3d')]:_0x5dfcb9[_0x0f50('0x39')];if(_0xeeb6f2[_0x0f50('0x3c')][_0x0f50('0x4c')]){_0xea3de3[_0x0f50('0x4d')]=[{'all':!![]}];}_0xea3de3=_[_0x0f50('0x46')]({},_0xea3de3,_0xeeb6f2['options']);return db[_0x0f50('0x36')][_0x0f50('0x50')](_0xea3de3)['then'](handleEntityNotFound(_0x167620,null))[_0x0f50('0x1d')](respondWithResult(_0x167620,null))[_0x0f50('0x26')](handleError(_0x167620,null));};exports[_0x0f50('0x51')]=function(_0x5808fa,_0x54b956){return db[_0x0f50('0x36')]['create'](_0x5808fa['body'],{})['then'](respondWithResult(_0x54b956,0xc9))[_0x0f50('0x26')](handleError(_0x54b956,null));};exports[_0x0f50('0x32')]=function(_0x483117,_0x55f044){if(_0x483117[_0x0f50('0x52')]['id']){delete _0x483117['body']['id'];}return db[_0x0f50('0x36')][_0x0f50('0x50')]({'where':{'id':_0x483117['params']['id']}})[_0x0f50('0x1d')](handleEntityNotFound(_0x55f044,null))[_0x0f50('0x1d')](saveUpdates(_0x483117[_0x0f50('0x52')],null))[_0x0f50('0x1d')](respondWithResult(_0x55f044,null))[_0x0f50('0x26')](handleError(_0x55f044,null));};exports['destroy']=function(_0x1f660c,_0x15fe9e){return db[_0x0f50('0x36')][_0x0f50('0x50')]({'where':{'id':_0x1f660c['params']['id']}})[_0x0f50('0x1d')](handleEntityNotFound(_0x15fe9e,null))[_0x0f50('0x1d')](removeEntity(_0x15fe9e,null))['catch'](handleError(_0x15fe9e,null));};exports['describe']=function(_0x4ba3b5,_0x4c73ef){return db[_0x0f50('0x36')]['describe']()[_0x0f50('0x1d')](respondWithResult(_0x4c73ef,null))[_0x0f50('0x26')](handleError(_0x4c73ef,null));};var interaction_log=require(_0x0f50('0xf'))(_0x0f50('0x53'));exports['accept']=function(_0x25b040,_0x1fc305,_0x2f972a){var _0x4de925={'agent':{},'channel':_0x0f50('0x54')};if(_0x25b040[_0x0f50('0x52')]['id']){delete _0x25b040[_0x0f50('0x52')]['id'];}_0x25b040['body'][_0x0f50('0x55')]=!![];_0x25b040[_0x0f50('0x52')][_0x0f50('0x56')]=moment()[_0x0f50('0x57')]('YYYY-MM-DD\x20HH:mm:ss');_0x25b040[_0x0f50('0x52')][_0x0f50('0x58')]=_0x25b040[_0x0f50('0x52')]['UserId']||_0x25b040['user']['id'];_0x4de925[_0x0f50('0x59')]['id']=_0x25b040[_0x0f50('0x52')]['UserId'];return db['OpenchannelMessage']['find']({'where':{'id':_0x25b040[_0x0f50('0x5a')]['id'],'UserId':null},'include':[{'model':db['CmContact'],'as':_0x0f50('0x5b')}]})[_0x0f50('0x1d')](handleEntityNotFound(_0x1fc305,null))[_0x0f50('0x1d')](saveUpdates(_0x25b040[_0x0f50('0x52')],null))['then'](function(_0x4d9ae9){if(_0x4d9ae9){_0x4de925[_0x0f50('0x24')]=_0x4d9ae9[_0x0f50('0x5c')]({'plain':!![]});return db[_0x0f50('0x5d')][_0x0f50('0x50')]({'where':{'id':_0x4d9ae9[_0x0f50('0x5e')]}});}return null;})['then'](handleEntityNotFound(_0x1fc305,null))[_0x0f50('0x1d')](function(_0x59750d){if(_0x59750d){return _0x59750d[_0x0f50('0x32')]({'UserId':_0x25b040[_0x0f50('0x52')][_0x0f50('0x58')],'read1stAt':_[_0x0f50('0x5f')](_0x59750d[_0x0f50('0x60')])?moment()['format'](_0x0f50('0x61')):undefined});}return null;})[_0x0f50('0x1d')](function(_0x3e61fa){if(_0x3e61fa){_0x4de925[_0x0f50('0x62')]=_0x3e61fa[_0x0f50('0x5c')]({'plain':!![]});interaction_log['info']('[OPENCHANNELMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x25b040[_0x0f50('0x63')]['id'],_0x25b040[_0x0f50('0x63')]['name'],_0x25b040['user']['role'],_0x4de925[_0x0f50('0x62')]['id'],_0x25b040['body']?JSON[_0x0f50('0x22')](_0x25b040['body']):_0x0f50('0x64'));return respondWithRpcPromise(_0x0f50('0x65'),'acceptMessage',_0x4de925);}return null;})[_0x0f50('0x1d')](function(_0x7a6d36){return db['CmContact'][_0x0f50('0x66')]()[_0x0f50('0x1d')](function(_0x30a83d){var _0x337324=[];for(var _0x2922e5=0x0;_0x2922e5=_0x5b7de3){_0x599171=_0x5b7de3;_0x22ef80=0xc8;}else{_0x22ef80=0xce;}_0x2e6729[_0x0e5f('0x1d')](_0x22ef80);return _0x2e6729[_0x0e5f('0x24')](_0x0e5f('0x25'),_0x1a172c+'-'+_0x599171+'/'+_0x5b7de3)[_0x0e5f('0x1f')](_0x54f2c0);}return null;};}function patchUpdates(_0x2a4753){return function(_0x4c5eb4){try{jsonpatch['apply'](_0x4c5eb4,_0x2a4753,!![]);}catch(_0x513366){return BPromise['reject'](_0x513366);}return _0x4c5eb4[_0x0e5f('0x26')]();};}function saveUpdates(_0xcd8c5e,_0x46fc57){return function(_0x1c6259){if(_0x1c6259){return _0x1c6259[_0x0e5f('0x27')](_0xcd8c5e)[_0x0e5f('0x28')](function(_0x60fb3a){return _0x60fb3a;});}return null;};}function removeEntity(_0x3666dd,_0xd04408){return function(_0x5b169a){if(_0x5b169a){return _0x5b169a[_0x0e5f('0x29')]()[_0x0e5f('0x28')](function(){var _0x20aca3=_0x5b169a[_0x0e5f('0x2a')]({'plain':!![]});var _0x47385f=_0x0e5f('0x2b');return db[_0x0e5f('0x2c')][_0x0e5f('0x29')]({'where':{'type':_0x47385f,'resourceId':_0x20aca3['id']}})[_0x0e5f('0x28')](function(){return _0x5b169a;});})[_0x0e5f('0x28')](function(){_0x3666dd[_0x0e5f('0x1d')](0xcc)[_0x0e5f('0x1e')]();});}};}function handleEntityNotFound(_0xbb945a,_0xff3b2b){return function(_0x3b9749){if(!_0x3b9749){_0xbb945a[_0x0e5f('0x1c')](0x194);}return _0x3b9749;};}function handleError(_0xb39cae,_0x85012d){_0x85012d=_0x85012d||0x1f4;return function(_0x47efab){logger[_0x0e5f('0x2d')](_0x47efab[_0x0e5f('0x2e')]);if(_0x47efab[_0x0e5f('0x2f')]){delete _0x47efab[_0x0e5f('0x2f')];}_0xb39cae[_0x0e5f('0x1d')](_0x85012d)[_0x0e5f('0x30')](_0x47efab);};}exports[_0x0e5f('0x31')]=function(_0x153d71,_0x133236){var _0x30f178={},_0x20ab89={},_0x19452a={'count':0x0,'rows':[]};var _0x5ca8fc=_[_0x0e5f('0x32')](db['OpenchannelQueue'][_0x0e5f('0x33')],function(_0x3bdce8){return{'name':_0x3bdce8[_0x0e5f('0x34')],'type':_0x3bdce8['type'][_0x0e5f('0x35')]};});_0x20ab89[_0x0e5f('0x36')]=_[_0x0e5f('0x32')](_0x5ca8fc,_0x0e5f('0x2f'));_0x20ab89[_0x0e5f('0x37')]=_[_0x0e5f('0x38')](_0x153d71['query']);_0x20ab89[_0x0e5f('0x39')]=_[_0x0e5f('0x3a')](_0x20ab89[_0x0e5f('0x36')],_0x20ab89[_0x0e5f('0x37')]);_0x30f178[_0x0e5f('0x3b')]=_[_0x0e5f('0x3a')](_0x20ab89['model'],qs[_0x0e5f('0x3c')](_0x153d71['query'][_0x0e5f('0x3c')]));_0x30f178[_0x0e5f('0x3b')]=_0x30f178[_0x0e5f('0x3b')][_0x0e5f('0x3d')]?_0x30f178[_0x0e5f('0x3b')]:_0x20ab89[_0x0e5f('0x36')];if(!_0x153d71[_0x0e5f('0x37')][_0x0e5f('0x3e')](_0x0e5f('0x3f'))){_0x30f178[_0x0e5f('0x21')]=qs[_0x0e5f('0x21')](_0x153d71['query']['limit']);_0x30f178[_0x0e5f('0x20')]=qs['offset'](_0x153d71[_0x0e5f('0x37')][_0x0e5f('0x20')]);}_0x30f178['order']=qs['sort'](_0x153d71[_0x0e5f('0x37')][_0x0e5f('0x40')]);_0x30f178[_0x0e5f('0x41')]=qs[_0x0e5f('0x39')](_['pick'](_0x153d71['query'],_0x20ab89[_0x0e5f('0x39')]),_0x5ca8fc);if(_0x153d71[_0x0e5f('0x37')][_0x0e5f('0x42')]){_0x30f178[_0x0e5f('0x41')]=_[_0x0e5f('0x43')](_0x30f178[_0x0e5f('0x41')],{'$or':_['map'](_0x5ca8fc,function(_0x512620){if(_0x512620['type']!==_0x0e5f('0x44')){var _0x353c1a={};_0x353c1a[_0x512620[_0x0e5f('0x2f')]]={'$like':'%'+_0x153d71[_0x0e5f('0x37')][_0x0e5f('0x42')]+'%'};return _0x353c1a;}})});}_0x30f178=_['merge']({},_0x30f178,_0x153d71['options']);var _0x1d0bef={'where':_0x30f178['where']};return db['OpenchannelQueue'][_0x0e5f('0x23')](_0x1d0bef)[_0x0e5f('0x28')](function(_0x15a9d3){_0x19452a[_0x0e5f('0x23')]=_0x15a9d3;if(_0x153d71[_0x0e5f('0x37')]['includeAll']){_0x30f178[_0x0e5f('0x45')]=[{'all':!![]}];}return db['OpenchannelQueue'][_0x0e5f('0x46')](_0x30f178);})[_0x0e5f('0x28')](function(_0x3daa59){_0x19452a[_0x0e5f('0x47')]=_0x3daa59;return _0x19452a;})[_0x0e5f('0x28')](respondWithFilteredResult(_0x133236,_0x30f178))[_0x0e5f('0x48')](handleError(_0x133236,null));};exports['show']=function(_0x508e98,_0x2df29b){var _0x5674ae={'raw':!![],'where':{'id':_0x508e98[_0x0e5f('0x49')]['id']}},_0x5ca7aa={};_0x5ca7aa['model']=_[_0x0e5f('0x38')](db['OpenchannelQueue'][_0x0e5f('0x33')]);_0x5ca7aa[_0x0e5f('0x37')]=_[_0x0e5f('0x38')](_0x508e98['query']);_0x5ca7aa[_0x0e5f('0x39')]=_[_0x0e5f('0x3a')](_0x5ca7aa[_0x0e5f('0x36')],_0x5ca7aa[_0x0e5f('0x37')]);_0x5674ae[_0x0e5f('0x3b')]=_[_0x0e5f('0x3a')](_0x5ca7aa[_0x0e5f('0x36')],qs['fields'](_0x508e98[_0x0e5f('0x37')][_0x0e5f('0x3c')]));_0x5674ae[_0x0e5f('0x3b')]=_0x5674ae[_0x0e5f('0x3b')][_0x0e5f('0x3d')]?_0x5674ae['attributes']:_0x5ca7aa[_0x0e5f('0x36')];if(_0x508e98[_0x0e5f('0x37')][_0x0e5f('0x4a')]){_0x5674ae['include']=[{'all':!![]}];}_0x5674ae=_[_0x0e5f('0x43')]({},_0x5674ae,_0x508e98[_0x0e5f('0x4b')]);return db[_0x0e5f('0x4c')][_0x0e5f('0x4d')](_0x5674ae)[_0x0e5f('0x28')](handleEntityNotFound(_0x2df29b,null))[_0x0e5f('0x28')](respondWithResult(_0x2df29b,null))[_0x0e5f('0x48')](handleError(_0x2df29b,null));};exports['create']=function(_0x519b0e,_0x1e0339){return db[_0x0e5f('0x4c')][_0x0e5f('0x4e')](_0x519b0e[_0x0e5f('0x4f')],{})[_0x0e5f('0x28')](function(_0x2a2276){var _0x25d5d2=_0x519b0e[_0x0e5f('0x50')][_0x0e5f('0x2a')]({'plain':!![]});if(!_0x25d5d2)throw new Error(_0x0e5f('0x51'));if(_0x25d5d2[_0x0e5f('0x52')]===_0x0e5f('0x50')){var _0xcb81c6=_0x2a2276[_0x0e5f('0x2a')]({'plain':!![]});var _0x3c955b=_0x0e5f('0x2b');return db[_0x0e5f('0x53')][_0x0e5f('0x4d')]({'where':{'name':_0x3c955b,'userProfileId':_0x25d5d2[_0x0e5f('0x54')]},'raw':!![]})['then'](function(_0x1d0579){if(_0x1d0579&&_0x1d0579['autoAssociation']===0x0){return db[_0x0e5f('0x2c')]['create']({'name':_0xcb81c6['name'],'resourceId':_0xcb81c6['id'],'type':_0x1d0579[_0x0e5f('0x2f')],'sectionId':_0x1d0579['id']},{})[_0x0e5f('0x28')](function(){return _0x2a2276;});}else{return _0x2a2276;}})[_0x0e5f('0x48')](function(_0x25e65c){logger[_0x0e5f('0x2d')](_0x0e5f('0x55'),_0x25e65c);throw _0x25e65c;});}return _0x2a2276;})[_0x0e5f('0x28')](respondWithResult(_0x1e0339,0xc9))[_0x0e5f('0x48')](handleError(_0x1e0339,null));};exports[_0x0e5f('0x27')]=function(_0x8f2d87,_0x268402){if(_0x8f2d87[_0x0e5f('0x4f')]['id']){delete _0x8f2d87['body']['id'];}return db[_0x0e5f('0x4c')]['find']({'where':{'id':_0x8f2d87[_0x0e5f('0x49')]['id']}})[_0x0e5f('0x28')](handleEntityNotFound(_0x268402,null))[_0x0e5f('0x28')](saveUpdates(_0x8f2d87['body'],null))['then'](respondWithResult(_0x268402,null))[_0x0e5f('0x48')](handleError(_0x268402,null));};exports[_0x0e5f('0x29')]=function(_0x598d82,_0x569a81){return db[_0x0e5f('0x4c')]['find']({'where':{'id':_0x598d82[_0x0e5f('0x49')]['id']}})[_0x0e5f('0x28')](handleEntityNotFound(_0x569a81,null))['then'](removeEntity(_0x569a81,null))[_0x0e5f('0x48')](handleError(_0x569a81,null));};exports[_0x0e5f('0x56')]=function(_0x161da6,_0xa87088){return db['OpenchannelQueue'][_0x0e5f('0x56')]()[_0x0e5f('0x28')](respondWithResult(_0xa87088,null))['catch'](handleError(_0xa87088,null));};exports[_0x0e5f('0x57')]=function(_0xc4d6dd,_0x3d95bf,_0x594cea){var _0x53294d={'raw':!![],'where':{}},_0x1697f5={},_0x3fcec7;return db[_0x0e5f('0x4c')][_0x0e5f('0x58')]({'where':{'id':_0xc4d6dd['params']['id']}})[_0x0e5f('0x28')](handleEntityNotFound(_0x3d95bf,null))['then'](function(_0x5405a0){if(_0x5405a0){_0x3fcec7=_0x5405a0['get']({'plain':!![]});_0x1697f5['model']=_[_0x0e5f('0x38')](db[_0x0e5f('0x59')]['rawAttributes']);_0x1697f5[_0x0e5f('0x37')]=_[_0x0e5f('0x38')](_0xc4d6dd[_0x0e5f('0x37')]);_0x1697f5['filters']=_[_0x0e5f('0x3a')](_0x1697f5[_0x0e5f('0x36')],_0x1697f5[_0x0e5f('0x37')]);_0x53294d[_0x0e5f('0x3b')]=_[_0x0e5f('0x3a')](_0x1697f5['model'],qs[_0x0e5f('0x3c')](_0xc4d6dd[_0x0e5f('0x37')][_0x0e5f('0x3c')]));_0x53294d[_0x0e5f('0x3b')]=_0x53294d[_0x0e5f('0x3b')][_0x0e5f('0x3d')]?_0x53294d['attributes']:_0x1697f5[_0x0e5f('0x36')];if(!_0xc4d6dd[_0x0e5f('0x37')]['hasOwnProperty'](_0x0e5f('0x3f'))){_0x53294d['limit']=qs[_0x0e5f('0x21')](_0xc4d6dd[_0x0e5f('0x37')]['limit']);_0x53294d[_0x0e5f('0x20')]=qs['offset'](_0xc4d6dd['query'][_0x0e5f('0x20')]);}_0x53294d[_0x0e5f('0x5a')]=qs[_0x0e5f('0x40')](_0xc4d6dd[_0x0e5f('0x37')][_0x0e5f('0x40')]);_0x53294d[_0x0e5f('0x41')]=qs[_0x0e5f('0x39')](_[_0x0e5f('0x5b')](_0xc4d6dd['query'],_0x1697f5[_0x0e5f('0x39')]));_0x53294d[_0x0e5f('0x41')][_0x0e5f('0x5c')]=_0x5405a0['id'];if(_0xc4d6dd[_0x0e5f('0x37')][_0x0e5f('0x42')]){_0x53294d[_0x0e5f('0x41')]=_[_0x0e5f('0x43')](_0x53294d[_0x0e5f('0x41')],{'$or':_['map'](_0x53294d[_0x0e5f('0x3b')],function(_0x18bd46){var _0x309442={};_0x309442[_0x18bd46]={'$like':'%'+_0xc4d6dd['query']['filter']+'%'};return _0x309442;})});}_0x53294d=_[_0x0e5f('0x43')]({},_0x53294d,_0xc4d6dd[_0x0e5f('0x4b')]);return db[_0x0e5f('0x59')][_0x0e5f('0x46')](_0x53294d);}})[_0x0e5f('0x28')](function(_0x5a9cc7){if(_0x5a9cc7){return db[_0x0e5f('0x5d')]['findAndCountAll']({'where':{'id':_[_0x0e5f('0x32')](_0x5a9cc7,_0x0e5f('0x5e')),'role':'agent'},'attributes':['id',_0x0e5f('0x2f'),'openchannelPause','updatedAt',_0x0e5f('0x5f')]});}})[_0x0e5f('0x28')](function(_0x2d1271){if(_0x2d1271){return{'count':_0x2d1271['count'],'rows':_[_0x0e5f('0x32')](_0x2d1271['rows'],function(_0x43e24d){return{'membername':_0x43e24d[_0x0e5f('0x2f')],'UserId':_0x43e24d['id'],'queue_name':_0x3fcec7[_0x0e5f('0x2f')],'OpenchannelQueueId':_0x3fcec7['id'],'interface':util['format'](_0x0e5f('0x60'),'SIP',_0x43e24d['name']),'penalty':0x0,'paused':_0x43e24d[_0x0e5f('0x61')],'createdAt':_0x43e24d[_0x0e5f('0x5f')],'updatedAt':_0x43e24d[_0x0e5f('0x62')]};})};}else{return{'count':0x0,'rows':[]};}})['then'](respondWithFilteredResult(_0x3d95bf,_0x53294d))['catch'](handleError(_0x3d95bf,null));};exports[_0x0e5f('0x63')]=function(_0x244324,_0x21c6d2,_0x116cbd){var _0x3a8940={};var _0x231e2d={};var _0x1c3919;var _0x3d74b9;return db[_0x0e5f('0x4c')]['findOne']({'where':{'id':_0x244324[_0x0e5f('0x49')]['id']}})[_0x0e5f('0x28')](handleEntityNotFound(_0x21c6d2,null))['then'](function(_0x5914ee){if(_0x5914ee){_0x1c3919=_0x5914ee;_0x231e2d[_0x0e5f('0x36')]=_[_0x0e5f('0x38')](db[_0x0e5f('0x64')]['rawAttributes']);_0x231e2d[_0x0e5f('0x37')]=_['keys'](_0x244324['query']);_0x231e2d[_0x0e5f('0x39')]=_[_0x0e5f('0x3a')](_0x231e2d[_0x0e5f('0x36')],_0x231e2d['query']);_0x3a8940[_0x0e5f('0x3b')]=_[_0x0e5f('0x3a')](_0x231e2d[_0x0e5f('0x36')],qs['fields'](_0x244324[_0x0e5f('0x37')][_0x0e5f('0x3c')]));_0x3a8940[_0x0e5f('0x3b')]=_0x3a8940[_0x0e5f('0x3b')][_0x0e5f('0x3d')]?_0x3a8940[_0x0e5f('0x3b')]:_0x231e2d[_0x0e5f('0x36')];_0x3a8940['order']=qs[_0x0e5f('0x40')](_0x244324['query'][_0x0e5f('0x40')]);_0x3a8940[_0x0e5f('0x41')]=qs[_0x0e5f('0x39')](_['pick'](_0x244324[_0x0e5f('0x37')],_0x231e2d[_0x0e5f('0x39')]));if(_0x244324[_0x0e5f('0x37')][_0x0e5f('0x42')]){_0x3a8940[_0x0e5f('0x41')]=_['merge'](_0x3a8940[_0x0e5f('0x41')],{'$or':_[_0x0e5f('0x32')](_0x3a8940['attributes'],function(_0x590db){var _0x517546={};_0x517546[_0x590db]={'$like':'%'+_0x244324['query']['filter']+'%'};return _0x517546;})});}_0x3a8940=_[_0x0e5f('0x43')]({},_0x3a8940,_0x244324[_0x0e5f('0x4b')]);return _0x1c3919[_0x0e5f('0x63')](_0x3a8940);}})['then'](function(_0x21b474){if(_0x21b474){_0x3d74b9=_0x21b474[_0x0e5f('0x3d')];if(!_0x244324[_0x0e5f('0x37')]['hasOwnProperty']('nolimit')){_0x3a8940[_0x0e5f('0x21')]=qs[_0x0e5f('0x21')](_0x244324[_0x0e5f('0x37')][_0x0e5f('0x21')]);_0x3a8940['offset']=qs[_0x0e5f('0x20')](_0x244324['query']['offset']);}return _0x1c3919[_0x0e5f('0x63')](_0x3a8940);}})['then'](function(_0x4cbfc4){if(_0x4cbfc4){return _0x4cbfc4?{'count':_0x3d74b9,'rows':_0x4cbfc4}:null;}})[_0x0e5f('0x28')](respondWithResult(_0x21c6d2,null))[_0x0e5f('0x48')](handleError(_0x21c6d2,null));};exports[_0x0e5f('0x65')]=function(_0x5798f7,_0x10bdf6,_0x1ccfcd){var _0x558799=_0x5798f7[_0x0e5f('0x4f')][_0x0e5f('0x66')];return db['Team'][_0x0e5f('0x46')]({'where':{'id':_0x558799},'attributes':['id'],'include':[{'model':db[_0x0e5f('0x5d')],'as':'Agents','attributes':['id',_0x0e5f('0x2f'),_0x0e5f('0x67'),_0x0e5f('0x68'),_0x0e5f('0x69')],'raw':!![]}]})[_0x0e5f('0x28')](function(_0x2a9bac){if(_0x2a9bac){var _0x200f38=_['flatMap'](_0x2a9bac,function(_0x223397){var _0x3f31b=_0x223397[_0x0e5f('0x2a')]({'plain':!![]});return _0x3f31b['Agents'];});return db['OpenchannelQueue'][_0x0e5f('0x4d')]({'where':{'id':_0x5798f7[_0x0e5f('0x49')]['id']}})['then'](function(_0x3a8b39){return db[_0x0e5f('0x6a')][_0x0e5f('0x6b')](function(_0x26e81f){return _0x3a8b39[_0x0e5f('0x65')](_0x558799,{'transaction':_0x26e81f})['then'](function(){return BPromise[_0x0e5f('0x6c')](_0x200f38,function(_0x2a66d8){return db[_0x0e5f('0x59')][_0x0e5f('0x6d')]({'where':{'UserId':_0x2a66d8['id'],'OpenchannelQueueId':_0x5798f7[_0x0e5f('0x49')]['id']},'transaction':_0x26e81f});});})[_0x0e5f('0x28')](function(){_0x200f38['forEach'](function(_0x5d4f77){socket[_0x0e5f('0x6e')]('userOpenchannelQueue:save',{'UserId':_0x5d4f77['id'],'OpenchannelQueueId':_0x3a8b39['id']});});});});});}})[_0x0e5f('0x28')](respondWithStatusCode(_0x10bdf6,null))['catch'](handleError(_0x10bdf6,null));};exports[_0x0e5f('0x6f')]=function(_0x56dbe6,_0x319f3d,_0x104323){return db[_0x0e5f('0x64')][_0x0e5f('0x46')]({'where':{'id':_0x56dbe6[_0x0e5f('0x37')]['ids']},'attributes':['id'],'include':[{'model':db['User'],'as':_0x0e5f('0x70'),'attributes':['id'],'raw':!![]}]})['then'](handleEntityNotFound(_0x319f3d,null))[_0x0e5f('0x28')](function(_0x24f6d6){var _0x506c71=_[_0x0e5f('0x32')](_0x24f6d6,'id');var _0x2bb75b=[];var _0x472757=[];var _0xfcb280=squel[_0x0e5f('0x71')]();_0xfcb280['field'](_0x0e5f('0x72'))[_0x0e5f('0x73')](_0x0e5f('0x74'),'tq')['join'](_0x0e5f('0x75'),'ut',_0x0e5f('0x76'))['where'](_0x0e5f('0x77'),_0x56dbe6[_0x0e5f('0x49')]['id']);for(var _0x12a383=0x0;_0x12a383<_0x24f6d6[_0x0e5f('0x3d')];_0x12a383+=0x1){let _0x4f4c2f=_0x24f6d6[_0x12a383];for(var _0xc7c0ed=0x0;_0xc7c0ed<_0x4f4c2f['Agents']['length'];_0xc7c0ed+=0x1){let _0x1991bf=_0x4f4c2f[_0x0e5f('0x70')][_0xc7c0ed];var _0x126f6=_0xfcb280[_0x0e5f('0x78')]();_0x126f6[_0x0e5f('0x41')](_0x0e5f('0x79'),_0x1991bf['id']);_0x472757[_0x0e5f('0x7a')](db[_0x0e5f('0x6a')][_0x0e5f('0x37')](_0x126f6[_0x0e5f('0x7b')](),{'type':db[_0x0e5f('0x6a')][_0x0e5f('0x7c')][_0x0e5f('0x7d')]})[_0x0e5f('0x28')](function(_0x199b47){if(_0x199b47[_0x0e5f('0x3d')]===0x1){return _0x1991bf['id'];}else{var _0x10ce51=_[_0x0e5f('0x7e')](_[_0x0e5f('0x32')](_0x199b47,_0x0e5f('0x7f')),function(_0x171c78){return _['includes'](_0x506c71,_0x171c78);});if(_0x10ce51){return _0x1991bf['id'];}}}));}}return BPromise['all'](_0x472757)[_0x0e5f('0x28')](function(_0x5d2285){_0x2bb75b=_(_0x2bb75b)['union'](_0x5d2285)[_0x0e5f('0x80')]()[_0x0e5f('0x81')]();return db[_0x0e5f('0x4c')]['find']({'where':{'id':_0x56dbe6['params']['id']}})[_0x0e5f('0x28')](function(_0x25cf06){return db['sequelize']['transaction'](function(_0x58dac6){return _0x25cf06['removeTeams'](_0x56dbe6[_0x0e5f('0x37')]['ids'],{'transaction':_0x58dac6})['then'](function(){if(!_[_0x0e5f('0x82')](_0x2bb75b)){return _0x25cf06[_0x0e5f('0x83')](_0x2bb75b,{'transaction':_0x58dac6});}})[_0x0e5f('0x28')](function(){_0x2bb75b['forEach'](function(_0xfb781b){socket[_0x0e5f('0x6e')]('userOpenchannelQueue:remove',{'UserId':_0xfb781b,'OpenchannelQueueId':_0x25cf06['id']});});});});});});})['then'](respondWithStatusCode(_0x319f3d,null))['catch'](handleError(_0x319f3d,null));};exports[_0x0e5f('0x84')]=function(_0x35acfd,_0x569f96,_0x4113c1){return db['OpenchannelQueue'][_0x0e5f('0x4d')]({'where':{'id':_0x35acfd[_0x0e5f('0x49')]['id']}})[_0x0e5f('0x28')](handleEntityNotFound(_0x569f96,null))[_0x0e5f('0x28')](function(_0x54b07f){if(_0x54b07f){return _0x54b07f[_0x0e5f('0x84')](_0x35acfd[_0x0e5f('0x4f')]['ids'],_[_0x0e5f('0x85')](_0x35acfd['body'],['ids','id'])||{})[_0x0e5f('0x86')](function(_0x93a323){for(var _0x39e0bf=0x0;_0x39e0bf<_0x35acfd['body'][_0x0e5f('0x66')][_0x0e5f('0x3d')];_0x39e0bf+=0x1){socket[_0x0e5f('0x6e')](_0x0e5f('0x87'),{'UserId':_0x35acfd[_0x0e5f('0x4f')][_0x0e5f('0x66')][_0x39e0bf],'OpenchannelQueueId':_0x35acfd[_0x0e5f('0x49')]['id']});}return _0x93a323;});}})[_0x0e5f('0x28')](respondWithResult(_0x569f96,null))[_0x0e5f('0x48')](handleError(_0x569f96,null));};exports[_0x0e5f('0x83')]=function(_0x216b2f,_0x3c4434,_0x6a487){return db['OpenchannelQueue']['find']({'where':{'id':_0x216b2f[_0x0e5f('0x49')]['id']}})[_0x0e5f('0x28')](handleEntityNotFound(_0x3c4434,null))[_0x0e5f('0x28')](function(_0x2ec62b){if(_0x2ec62b){return _0x2ec62b[_0x0e5f('0x83')](_0x216b2f['query'][_0x0e5f('0x66')])[_0x0e5f('0x28')](function(){if(_[_0x0e5f('0x88')](_0x216b2f[_0x0e5f('0x37')][_0x0e5f('0x66')])){for(var _0x4d8b68=0x0;_0x4d8b68<_0x216b2f[_0x0e5f('0x37')][_0x0e5f('0x66')][_0x0e5f('0x3d')];_0x4d8b68+=0x1){socket[_0x0e5f('0x6e')](_0x0e5f('0x89'),{'UserId':Number(_0x216b2f[_0x0e5f('0x37')][_0x0e5f('0x66')][_0x4d8b68]),'OpenchannelQueueId':Number(_0x216b2f[_0x0e5f('0x49')]['id'])});}}else{socket[_0x0e5f('0x6e')](_0x0e5f('0x89'),{'UserId':Number(_0x216b2f[_0x0e5f('0x37')]['ids']),'OpenchannelQueueId':Number(_0x216b2f[_0x0e5f('0x49')]['id'])});}});}})['then'](respondWithStatusCode(_0x3c4434,null))[_0x0e5f('0x48')](handleError(_0x3c4434,null));};exports['getAgents']=function(_0x3854c6,_0x1ac5f0,_0x248f1f){var _0x5399c4={};var _0x1fab8d={};var _0x5deeeb;var _0xca0d09;return db[_0x0e5f('0x4c')]['findOne']({'where':{'id':_0x3854c6[_0x0e5f('0x49')]['id']}})[_0x0e5f('0x28')](handleEntityNotFound(_0x1ac5f0,null))[_0x0e5f('0x28')](function(_0x5e0877){if(_0x5e0877){_0x5deeeb=_0x5e0877;_0x1fab8d[_0x0e5f('0x36')]=_[_0x0e5f('0x38')](db[_0x0e5f('0x5d')][_0x0e5f('0x33')]);_0x1fab8d['query']=_[_0x0e5f('0x38')](_0x3854c6[_0x0e5f('0x37')]);_0x1fab8d[_0x0e5f('0x39')]=_[_0x0e5f('0x3a')](_0x1fab8d[_0x0e5f('0x36')],_0x1fab8d[_0x0e5f('0x37')]);_0x5399c4[_0x0e5f('0x3b')]=_[_0x0e5f('0x3a')](_0x1fab8d[_0x0e5f('0x36')],qs['fields'](_0x3854c6[_0x0e5f('0x37')]['fields']));_0x5399c4[_0x0e5f('0x3b')]=_0x5399c4[_0x0e5f('0x3b')][_0x0e5f('0x3d')]?_0x5399c4['attributes']:_0x1fab8d[_0x0e5f('0x36')];_0x5399c4[_0x0e5f('0x5a')]=qs['sort'](_0x3854c6[_0x0e5f('0x37')][_0x0e5f('0x40')]);_0x5399c4[_0x0e5f('0x41')]=qs[_0x0e5f('0x39')](_[_0x0e5f('0x5b')](_0x3854c6['query'],_0x1fab8d[_0x0e5f('0x39')]));if(_0x3854c6['query'][_0x0e5f('0x42')]){_0x5399c4[_0x0e5f('0x41')]=_['merge'](_0x5399c4[_0x0e5f('0x41')],{'$or':_['map'](_0x5399c4[_0x0e5f('0x3b')],function(_0x316762){var _0x289dbc={};_0x289dbc[_0x316762]={'$like':'%'+_0x3854c6['query'][_0x0e5f('0x42')]+'%'};return _0x289dbc;})});}_0x5399c4=_[_0x0e5f('0x43')]({},_0x5399c4,_0x3854c6[_0x0e5f('0x4b')]);return _0x5deeeb[_0x0e5f('0x8a')](_0x5399c4);}})['then'](function(_0x37cb19){if(_0x37cb19){_0xca0d09=_0x37cb19['length'];if(!_0x3854c6[_0x0e5f('0x37')]['hasOwnProperty'](_0x0e5f('0x3f'))){_0x5399c4[_0x0e5f('0x21')]=qs['limit'](_0x3854c6[_0x0e5f('0x37')]['limit']);_0x5399c4['offset']=qs[_0x0e5f('0x20')](_0x3854c6[_0x0e5f('0x37')][_0x0e5f('0x20')]);}return _0x5deeeb[_0x0e5f('0x8a')](_0x5399c4);}})['then'](function(_0x40adc1){if(_0x40adc1){return _0x40adc1?{'count':_0xca0d09,'rows':_0x40adc1}:null;}})[_0x0e5f('0x28')](respondWithResult(_0x1ac5f0,null))['catch'](handleError(_0x1ac5f0,null));}; \ No newline at end of file +var _0x8f08=['../../config/utils','../../config/environment','../../mysqldb','redis','localhost','./openchannelQueue.socket','sendStatus','end','status','json','limit','offset','count','set','apply','reject','save','then','destroy','OpenchannelQueues','error','stack','name','send','index','map','OpenchannelQueue','rawAttributes','fieldName','type','model','filters','intersection','attributes','query','fields','hasOwnProperty','nolimit','order','sort','pick','filter','where','merge','options','includeAll','include','findAll','catch','show','keys','length','find','create','body','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','user','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','params','describe','getMembers','OpenchannelQueueId','User','findAndCountAll','agent','openchannelPause','updatedAt','createdAt','format','%s/%s','SIP','getTeams','Team','Agents','online','voicePause','interface','flatMap','sequelize','addTeams','each','findOrCreate','forEach','emit','userOpenchannelQueue:save','removeTeams','ids','field','tq.TeamId','from','team_has_openchannel_queues','join','user_has_teams','OpenchannelQueueId\x20=\x20?','clone','ut.UserId\x20=\x20?','push','every','TeamId','includes','all','union','compact','value','isEmpty','removeAgents','addAgents','spread','isArray','userOpenchannelQueue:remove','getAgents','findOne','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','to-csv','ejs','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger'];(function(_0x348879,_0x51df2a){var _0x33d13f=function(_0x212fd2){while(--_0x212fd2){_0x348879['push'](_0x348879['shift']());}};_0x33d13f(++_0x51df2a);}(_0x8f08,0x187));var _0x88f0=function(_0x413727,_0x17adb1){_0x413727=_0x413727-0x0;var _0x5f46d7=_0x8f08[_0x413727];return _0x5f46d7;};'use strict';var emlformat=require(_0x88f0('0x0'));var rimraf=require(_0x88f0('0x1'));var zipdir=require(_0x88f0('0x2'));var jsonpatch=require(_0x88f0('0x3'));var rp=require(_0x88f0('0x4'));var moment=require(_0x88f0('0x5'));var BPromise=require(_0x88f0('0x6'));var Mustache=require(_0x88f0('0x7'));var util=require(_0x88f0('0x8'));var path=require('path');var sox=require('sox');var csv=require(_0x88f0('0x9'));var ejs=require(_0x88f0('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x88f0('0xb'));var crypto=require(_0x88f0('0xc'));var jsforce=require(_0x88f0('0xd'));var deskjs=require(_0x88f0('0xe'));var toCsv=require(_0x88f0('0x9'));var querystring=require(_0x88f0('0xf'));var Papa=require('papaparse');var Redis=require(_0x88f0('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x88f0('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x88f0('0x12'));var logger=require(_0x88f0('0x13'))('api');var utils=require(_0x88f0('0x14'));var config=require(_0x88f0('0x15'));var licenseUtil=require('../../config/license/util');var db=require(_0x88f0('0x16'))['db'];config[_0x88f0('0x17')]=_['defaults'](config[_0x88f0('0x17')],{'host':_0x88f0('0x18'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x88f0('0x17')]));require(_0x88f0('0x19'))['register'](socket);function respondWithStatusCode(_0x5f3b43,_0x3752b1){_0x3752b1=_0x3752b1||0xcc;return function(_0x248938){if(_0x248938){return _0x5f3b43[_0x88f0('0x1a')](_0x3752b1);}return _0x5f3b43['status'](_0x3752b1)[_0x88f0('0x1b')]();};}function respondWithResult(_0x304c36,_0x439f17){_0x439f17=_0x439f17||0xc8;return function(_0x2ccc30){if(_0x2ccc30){return _0x304c36[_0x88f0('0x1c')](_0x439f17)[_0x88f0('0x1d')](_0x2ccc30);}};}function respondWithFilteredResult(_0x335447,_0x355168){return function(_0x1305fa){if(_0x1305fa){var _0x480093=typeof _0x355168['offset']==='undefined'&&typeof _0x355168[_0x88f0('0x1e')]==='undefined';var _0x493b32=_0x1305fa['count'];var _0x47d5a6=_0x480093?0x0:_0x355168[_0x88f0('0x1f')];var _0x5ee4f4=_0x480093?_0x1305fa[_0x88f0('0x20')]:_0x355168[_0x88f0('0x1f')]+_0x355168[_0x88f0('0x1e')];var _0x7cd639;if(_0x5ee4f4>=_0x493b32){_0x5ee4f4=_0x493b32;_0x7cd639=0xc8;}else{_0x7cd639=0xce;}_0x335447[_0x88f0('0x1c')](_0x7cd639);return _0x335447[_0x88f0('0x21')]('Content-Range',_0x47d5a6+'-'+_0x5ee4f4+'/'+_0x493b32)[_0x88f0('0x1d')](_0x1305fa);}return null;};}function patchUpdates(_0xebffdd){return function(_0x4f3c20){try{jsonpatch[_0x88f0('0x22')](_0x4f3c20,_0xebffdd,!![]);}catch(_0x442000){return BPromise[_0x88f0('0x23')](_0x442000);}return _0x4f3c20[_0x88f0('0x24')]();};}function saveUpdates(_0x150e2a,_0x1336d0){return function(_0xba76cb){if(_0xba76cb){return _0xba76cb['update'](_0x150e2a)[_0x88f0('0x25')](function(_0x2cda71){return _0x2cda71;});}return null;};}function removeEntity(_0x3ed9d7,_0x546b02){return function(_0x1efb2a){if(_0x1efb2a){return _0x1efb2a[_0x88f0('0x26')]()[_0x88f0('0x25')](function(){var _0xb7f10=_0x1efb2a['get']({'plain':!![]});var _0x5e89ed=_0x88f0('0x27');return db['UserProfileResource'][_0x88f0('0x26')]({'where':{'type':_0x5e89ed,'resourceId':_0xb7f10['id']}})['then'](function(){return _0x1efb2a;});})['then'](function(){_0x3ed9d7[_0x88f0('0x1c')](0xcc)[_0x88f0('0x1b')]();});}};}function handleEntityNotFound(_0xadfca,_0x1005a1){return function(_0x1f0288){if(!_0x1f0288){_0xadfca[_0x88f0('0x1a')](0x194);}return _0x1f0288;};}function handleError(_0x5298e0,_0x4edc00){_0x4edc00=_0x4edc00||0x1f4;return function(_0x37b490){logger[_0x88f0('0x28')](_0x37b490[_0x88f0('0x29')]);if(_0x37b490[_0x88f0('0x2a')]){delete _0x37b490[_0x88f0('0x2a')];}_0x5298e0[_0x88f0('0x1c')](_0x4edc00)[_0x88f0('0x2b')](_0x37b490);};}exports[_0x88f0('0x2c')]=function(_0x329258,_0x243551){var _0x2c37be={},_0x365124={},_0x16bd11={'count':0x0,'rows':[]};var _0x1bf5ae=_[_0x88f0('0x2d')](db[_0x88f0('0x2e')][_0x88f0('0x2f')],function(_0x4a500d){return{'name':_0x4a500d[_0x88f0('0x30')],'type':_0x4a500d[_0x88f0('0x31')]['key']};});_0x365124[_0x88f0('0x32')]=_[_0x88f0('0x2d')](_0x1bf5ae,_0x88f0('0x2a'));_0x365124['query']=_['keys'](_0x329258['query']);_0x365124[_0x88f0('0x33')]=_[_0x88f0('0x34')](_0x365124['model'],_0x365124['query']);_0x2c37be[_0x88f0('0x35')]=_[_0x88f0('0x34')](_0x365124[_0x88f0('0x32')],qs['fields'](_0x329258[_0x88f0('0x36')][_0x88f0('0x37')]));_0x2c37be['attributes']=_0x2c37be[_0x88f0('0x35')]['length']?_0x2c37be[_0x88f0('0x35')]:_0x365124[_0x88f0('0x32')];if(!_0x329258[_0x88f0('0x36')][_0x88f0('0x38')](_0x88f0('0x39'))){_0x2c37be[_0x88f0('0x1e')]=qs[_0x88f0('0x1e')](_0x329258[_0x88f0('0x36')][_0x88f0('0x1e')]);_0x2c37be[_0x88f0('0x1f')]=qs['offset'](_0x329258['query']['offset']);}_0x2c37be[_0x88f0('0x3a')]=qs[_0x88f0('0x3b')](_0x329258[_0x88f0('0x36')][_0x88f0('0x3b')]);_0x2c37be['where']=qs['filters'](_[_0x88f0('0x3c')](_0x329258[_0x88f0('0x36')],_0x365124[_0x88f0('0x33')]),_0x1bf5ae);if(_0x329258[_0x88f0('0x36')][_0x88f0('0x3d')]){_0x2c37be[_0x88f0('0x3e')]=_[_0x88f0('0x3f')](_0x2c37be[_0x88f0('0x3e')],{'$or':_[_0x88f0('0x2d')](_0x1bf5ae,function(_0x4e7d9e){if(_0x4e7d9e[_0x88f0('0x31')]!=='VIRTUAL'){var _0x463ad0={};_0x463ad0[_0x4e7d9e[_0x88f0('0x2a')]]={'$like':'%'+_0x329258['query'][_0x88f0('0x3d')]+'%'};return _0x463ad0;}})});}_0x2c37be=_[_0x88f0('0x3f')]({},_0x2c37be,_0x329258[_0x88f0('0x40')]);var _0x531de7={'where':_0x2c37be['where']};return db[_0x88f0('0x2e')]['count'](_0x531de7)[_0x88f0('0x25')](function(_0x1ed0b5){_0x16bd11[_0x88f0('0x20')]=_0x1ed0b5;if(_0x329258['query'][_0x88f0('0x41')]){_0x2c37be[_0x88f0('0x42')]=[{'all':!![]}];}return db['OpenchannelQueue'][_0x88f0('0x43')](_0x2c37be);})[_0x88f0('0x25')](function(_0x565e19){_0x16bd11['rows']=_0x565e19;return _0x16bd11;})[_0x88f0('0x25')](respondWithFilteredResult(_0x243551,_0x2c37be))[_0x88f0('0x44')](handleError(_0x243551,null));};exports[_0x88f0('0x45')]=function(_0x26869c,_0x143568){var _0x6f234a={'raw':!![],'where':{'id':_0x26869c['params']['id']}},_0x16d5b8={};_0x16d5b8[_0x88f0('0x32')]=_[_0x88f0('0x46')](db[_0x88f0('0x2e')][_0x88f0('0x2f')]);_0x16d5b8[_0x88f0('0x36')]=_[_0x88f0('0x46')](_0x26869c['query']);_0x16d5b8[_0x88f0('0x33')]=_[_0x88f0('0x34')](_0x16d5b8['model'],_0x16d5b8['query']);_0x6f234a[_0x88f0('0x35')]=_[_0x88f0('0x34')](_0x16d5b8[_0x88f0('0x32')],qs[_0x88f0('0x37')](_0x26869c['query'][_0x88f0('0x37')]));_0x6f234a[_0x88f0('0x35')]=_0x6f234a[_0x88f0('0x35')][_0x88f0('0x47')]?_0x6f234a[_0x88f0('0x35')]:_0x16d5b8[_0x88f0('0x32')];if(_0x26869c[_0x88f0('0x36')][_0x88f0('0x41')]){_0x6f234a[_0x88f0('0x42')]=[{'all':!![]}];}_0x6f234a=_['merge']({},_0x6f234a,_0x26869c[_0x88f0('0x40')]);return db['OpenchannelQueue'][_0x88f0('0x48')](_0x6f234a)['then'](handleEntityNotFound(_0x143568,null))['then'](respondWithResult(_0x143568,null))['catch'](handleError(_0x143568,null));};exports['create']=function(_0x26df93,_0x911217){return db[_0x88f0('0x2e')][_0x88f0('0x49')](_0x26df93[_0x88f0('0x4a')],{})['then'](function(_0x268763){var _0x69135c=_0x26df93['user'][_0x88f0('0x4b')]({'plain':!![]});if(!_0x69135c)throw new Error(_0x88f0('0x4c'));if(_0x69135c['role']===_0x88f0('0x4d')){var _0x21e858=_0x268763['get']({'plain':!![]});var _0x2685df=_0x88f0('0x27');return db[_0x88f0('0x4e')][_0x88f0('0x48')]({'where':{'name':_0x2685df,'userProfileId':_0x69135c[_0x88f0('0x4f')]},'raw':!![]})[_0x88f0('0x25')](function(_0x680572){if(_0x680572&&_0x680572[_0x88f0('0x50')]===0x0){return db['UserProfileResource']['create']({'name':_0x21e858[_0x88f0('0x2a')],'resourceId':_0x21e858['id'],'type':_0x680572[_0x88f0('0x2a')],'sectionId':_0x680572['id']},{})[_0x88f0('0x25')](function(){return _0x268763;});}else{return _0x268763;}})[_0x88f0('0x44')](function(_0x3cedf5){logger[_0x88f0('0x28')](_0x88f0('0x51'),_0x3cedf5);throw _0x3cedf5;});}return _0x268763;})[_0x88f0('0x25')](respondWithResult(_0x911217,0xc9))[_0x88f0('0x44')](handleError(_0x911217,null));};exports[_0x88f0('0x52')]=function(_0x226264,_0x382254){if(_0x226264[_0x88f0('0x4a')]['id']){delete _0x226264[_0x88f0('0x4a')]['id'];}return db[_0x88f0('0x2e')]['find']({'where':{'id':_0x226264[_0x88f0('0x53')]['id']}})[_0x88f0('0x25')](handleEntityNotFound(_0x382254,null))[_0x88f0('0x25')](saveUpdates(_0x226264[_0x88f0('0x4a')],null))['then'](respondWithResult(_0x382254,null))[_0x88f0('0x44')](handleError(_0x382254,null));};exports[_0x88f0('0x26')]=function(_0x5d46b0,_0x904aa4){return db[_0x88f0('0x2e')][_0x88f0('0x48')]({'where':{'id':_0x5d46b0['params']['id']}})[_0x88f0('0x25')](handleEntityNotFound(_0x904aa4,null))[_0x88f0('0x25')](removeEntity(_0x904aa4,null))['catch'](handleError(_0x904aa4,null));};exports[_0x88f0('0x54')]=function(_0x223aae,_0x122dbd){return db[_0x88f0('0x2e')][_0x88f0('0x54')]()['then'](respondWithResult(_0x122dbd,null))[_0x88f0('0x44')](handleError(_0x122dbd,null));};exports[_0x88f0('0x55')]=function(_0x477ed5,_0x52c3a4,_0x5beb5c){var _0x3014de={'raw':!![],'where':{}},_0x31de3f={},_0x1b6b29;return db[_0x88f0('0x2e')]['findOne']({'where':{'id':_0x477ed5['params']['id']}})[_0x88f0('0x25')](handleEntityNotFound(_0x52c3a4,null))['then'](function(_0x1cf628){if(_0x1cf628){_0x1b6b29=_0x1cf628[_0x88f0('0x4b')]({'plain':!![]});_0x31de3f['model']=_[_0x88f0('0x46')](db['UserOpenchannelQueue'][_0x88f0('0x2f')]);_0x31de3f[_0x88f0('0x36')]=_[_0x88f0('0x46')](_0x477ed5[_0x88f0('0x36')]);_0x31de3f[_0x88f0('0x33')]=_[_0x88f0('0x34')](_0x31de3f[_0x88f0('0x32')],_0x31de3f[_0x88f0('0x36')]);_0x3014de[_0x88f0('0x35')]=_[_0x88f0('0x34')](_0x31de3f[_0x88f0('0x32')],qs[_0x88f0('0x37')](_0x477ed5[_0x88f0('0x36')][_0x88f0('0x37')]));_0x3014de['attributes']=_0x3014de[_0x88f0('0x35')][_0x88f0('0x47')]?_0x3014de[_0x88f0('0x35')]:_0x31de3f['model'];if(!_0x477ed5[_0x88f0('0x36')][_0x88f0('0x38')](_0x88f0('0x39'))){_0x3014de[_0x88f0('0x1e')]=qs['limit'](_0x477ed5[_0x88f0('0x36')][_0x88f0('0x1e')]);_0x3014de[_0x88f0('0x1f')]=qs[_0x88f0('0x1f')](_0x477ed5['query'][_0x88f0('0x1f')]);}_0x3014de[_0x88f0('0x3a')]=qs[_0x88f0('0x3b')](_0x477ed5[_0x88f0('0x36')]['sort']);_0x3014de[_0x88f0('0x3e')]=qs['filters'](_['pick'](_0x477ed5[_0x88f0('0x36')],_0x31de3f[_0x88f0('0x33')]));_0x3014de[_0x88f0('0x3e')][_0x88f0('0x56')]=_0x1cf628['id'];if(_0x477ed5[_0x88f0('0x36')]['filter']){_0x3014de[_0x88f0('0x3e')]=_[_0x88f0('0x3f')](_0x3014de[_0x88f0('0x3e')],{'$or':_[_0x88f0('0x2d')](_0x3014de[_0x88f0('0x35')],function(_0xeb2431){var _0x1ef2ba={};_0x1ef2ba[_0xeb2431]={'$like':'%'+_0x477ed5['query'][_0x88f0('0x3d')]+'%'};return _0x1ef2ba;})});}_0x3014de=_['merge']({},_0x3014de,_0x477ed5['options']);return db['UserOpenchannelQueue']['findAll'](_0x3014de);}})['then'](function(_0x9d3a13){if(_0x9d3a13){return db[_0x88f0('0x57')][_0x88f0('0x58')]({'where':{'id':_[_0x88f0('0x2d')](_0x9d3a13,'UserId'),'role':_0x88f0('0x59')},'attributes':['id',_0x88f0('0x2a'),_0x88f0('0x5a'),_0x88f0('0x5b'),_0x88f0('0x5c')]});}})[_0x88f0('0x25')](function(_0x50fe56){if(_0x50fe56){return{'count':_0x50fe56[_0x88f0('0x20')],'rows':_[_0x88f0('0x2d')](_0x50fe56['rows'],function(_0xb40f7d){return{'membername':_0xb40f7d['name'],'UserId':_0xb40f7d['id'],'queue_name':_0x1b6b29['name'],'OpenchannelQueueId':_0x1b6b29['id'],'interface':util[_0x88f0('0x5d')](_0x88f0('0x5e'),_0x88f0('0x5f'),_0xb40f7d['name']),'penalty':0x0,'paused':_0xb40f7d[_0x88f0('0x5a')],'createdAt':_0xb40f7d[_0x88f0('0x5c')],'updatedAt':_0xb40f7d['updatedAt']};})};}else{return{'count':0x0,'rows':[]};}})['then'](respondWithFilteredResult(_0x52c3a4,_0x3014de))[_0x88f0('0x44')](handleError(_0x52c3a4,null));};exports[_0x88f0('0x60')]=function(_0x51c86f,_0x3f93b0,_0x117bd4){var _0xd7fead={};var _0x253951={};var _0x3a744e;var _0x11c6d0;return db[_0x88f0('0x2e')]['findOne']({'where':{'id':_0x51c86f[_0x88f0('0x53')]['id']}})['then'](handleEntityNotFound(_0x3f93b0,null))['then'](function(_0x5e83b2){if(_0x5e83b2){_0x3a744e=_0x5e83b2;_0x253951[_0x88f0('0x32')]=_[_0x88f0('0x46')](db[_0x88f0('0x61')][_0x88f0('0x2f')]);_0x253951[_0x88f0('0x36')]=_['keys'](_0x51c86f['query']);_0x253951['filters']=_['intersection'](_0x253951['model'],_0x253951[_0x88f0('0x36')]);_0xd7fead[_0x88f0('0x35')]=_[_0x88f0('0x34')](_0x253951['model'],qs[_0x88f0('0x37')](_0x51c86f['query'][_0x88f0('0x37')]));_0xd7fead[_0x88f0('0x35')]=_0xd7fead[_0x88f0('0x35')][_0x88f0('0x47')]?_0xd7fead[_0x88f0('0x35')]:_0x253951[_0x88f0('0x32')];_0xd7fead['order']=qs[_0x88f0('0x3b')](_0x51c86f[_0x88f0('0x36')][_0x88f0('0x3b')]);_0xd7fead[_0x88f0('0x3e')]=qs[_0x88f0('0x33')](_['pick'](_0x51c86f[_0x88f0('0x36')],_0x253951[_0x88f0('0x33')]));if(_0x51c86f['query'][_0x88f0('0x3d')]){_0xd7fead[_0x88f0('0x3e')]=_['merge'](_0xd7fead[_0x88f0('0x3e')],{'$or':_['map'](_0xd7fead[_0x88f0('0x35')],function(_0x22314d){var _0x5b2622={};_0x5b2622[_0x22314d]={'$like':'%'+_0x51c86f[_0x88f0('0x36')]['filter']+'%'};return _0x5b2622;})});}_0xd7fead=_[_0x88f0('0x3f')]({},_0xd7fead,_0x51c86f[_0x88f0('0x40')]);return _0x3a744e[_0x88f0('0x60')](_0xd7fead);}})['then'](function(_0x6363d1){if(_0x6363d1){_0x11c6d0=_0x6363d1['length'];if(!_0x51c86f['query'][_0x88f0('0x38')]('nolimit')){_0xd7fead[_0x88f0('0x1e')]=qs['limit'](_0x51c86f[_0x88f0('0x36')]['limit']);_0xd7fead['offset']=qs[_0x88f0('0x1f')](_0x51c86f[_0x88f0('0x36')][_0x88f0('0x1f')]);}return _0x3a744e[_0x88f0('0x60')](_0xd7fead);}})[_0x88f0('0x25')](function(_0x6ba4c6){if(_0x6ba4c6){return _0x6ba4c6?{'count':_0x11c6d0,'rows':_0x6ba4c6}:null;}})[_0x88f0('0x25')](respondWithResult(_0x3f93b0,null))[_0x88f0('0x44')](handleError(_0x3f93b0,null));};exports['addTeams']=function(_0x59e274,_0x448abd,_0x15099f){var _0x1e4ffb=_0x59e274[_0x88f0('0x4a')]['ids'];return db[_0x88f0('0x61')]['findAll']({'where':{'id':_0x1e4ffb},'attributes':['id'],'include':[{'model':db[_0x88f0('0x57')],'as':_0x88f0('0x62'),'attributes':['id',_0x88f0('0x2a'),_0x88f0('0x63'),_0x88f0('0x64'),_0x88f0('0x65')],'raw':!![]}]})[_0x88f0('0x25')](function(_0x8de255){if(_0x8de255){var _0x43f47e=_[_0x88f0('0x66')](_0x8de255,function(_0x22b465){var _0x316236=_0x22b465[_0x88f0('0x4b')]({'plain':!![]});return _0x316236[_0x88f0('0x62')];});return db[_0x88f0('0x2e')][_0x88f0('0x48')]({'where':{'id':_0x59e274[_0x88f0('0x53')]['id']}})[_0x88f0('0x25')](function(_0x4159b5){return db[_0x88f0('0x67')]['transaction'](function(_0x13dd33){return _0x4159b5[_0x88f0('0x68')](_0x1e4ffb,{'transaction':_0x13dd33})['then'](function(){return BPromise[_0x88f0('0x69')](_0x43f47e,function(_0x1dd5f4){return db['UserOpenchannelQueue'][_0x88f0('0x6a')]({'where':{'UserId':_0x1dd5f4['id'],'OpenchannelQueueId':_0x59e274['params']['id']},'transaction':_0x13dd33});});})['then'](function(){_0x43f47e[_0x88f0('0x6b')](function(_0x8df574){socket[_0x88f0('0x6c')](_0x88f0('0x6d'),{'UserId':_0x8df574['id'],'OpenchannelQueueId':_0x4159b5['id']});});});});});}})[_0x88f0('0x25')](respondWithStatusCode(_0x448abd,null))[_0x88f0('0x44')](handleError(_0x448abd,null));};exports[_0x88f0('0x6e')]=function(_0x44e08f,_0x16b7ba,_0x18285a){return db[_0x88f0('0x61')][_0x88f0('0x43')]({'where':{'id':_0x44e08f[_0x88f0('0x36')][_0x88f0('0x6f')]},'attributes':['id'],'include':[{'model':db[_0x88f0('0x57')],'as':_0x88f0('0x62'),'attributes':['id'],'raw':!![]}]})[_0x88f0('0x25')](handleEntityNotFound(_0x16b7ba,null))['then'](function(_0x3fd148){var _0x2bd945=_['map'](_0x3fd148,'id');var _0x37b66a=[];var _0x153d0b=[];var _0xf3be67=squel['select']();_0xf3be67[_0x88f0('0x70')](_0x88f0('0x71'))[_0x88f0('0x72')](_0x88f0('0x73'),'tq')[_0x88f0('0x74')](_0x88f0('0x75'),'ut','ut.TeamId\x20=\x20tq.TeamId')[_0x88f0('0x3e')](_0x88f0('0x76'),_0x44e08f[_0x88f0('0x53')]['id']);for(var _0x1832f6=0x0;_0x1832f6<_0x3fd148[_0x88f0('0x47')];_0x1832f6+=0x1){let _0x46dcc5=_0x3fd148[_0x1832f6];for(var _0x4382b7=0x0;_0x4382b7<_0x46dcc5[_0x88f0('0x62')]['length'];_0x4382b7+=0x1){let _0x54486d=_0x46dcc5['Agents'][_0x4382b7];var _0x468f06=_0xf3be67[_0x88f0('0x77')]();_0x468f06[_0x88f0('0x3e')](_0x88f0('0x78'),_0x54486d['id']);_0x153d0b[_0x88f0('0x79')](db[_0x88f0('0x67')]['query'](_0x468f06['toString'](),{'type':db['sequelize']['QueryTypes']['SELECT']})[_0x88f0('0x25')](function(_0x11ba8d){if(_0x11ba8d[_0x88f0('0x47')]===0x1){return _0x54486d['id'];}else{var _0x21bcce=_[_0x88f0('0x7a')](_['map'](_0x11ba8d,_0x88f0('0x7b')),function(_0x5e580d){return _[_0x88f0('0x7c')](_0x2bd945,_0x5e580d);});if(_0x21bcce){return _0x54486d['id'];}}}));}}return BPromise[_0x88f0('0x7d')](_0x153d0b)[_0x88f0('0x25')](function(_0xe2de42){_0x37b66a=_(_0x37b66a)[_0x88f0('0x7e')](_0xe2de42)[_0x88f0('0x7f')]()[_0x88f0('0x80')]();return db[_0x88f0('0x2e')][_0x88f0('0x48')]({'where':{'id':_0x44e08f[_0x88f0('0x53')]['id']}})[_0x88f0('0x25')](function(_0x4b1819){return db[_0x88f0('0x67')]['transaction'](function(_0x243201){return _0x4b1819[_0x88f0('0x6e')](_0x44e08f[_0x88f0('0x36')][_0x88f0('0x6f')],{'transaction':_0x243201})[_0x88f0('0x25')](function(){if(!_[_0x88f0('0x81')](_0x37b66a)){return _0x4b1819[_0x88f0('0x82')](_0x37b66a,{'transaction':_0x243201});}})['then'](function(){_0x37b66a['forEach'](function(_0x1c942d){socket[_0x88f0('0x6c')]('userOpenchannelQueue:remove',{'UserId':_0x1c942d,'OpenchannelQueueId':_0x4b1819['id']});});});});});});})['then'](respondWithStatusCode(_0x16b7ba,null))[_0x88f0('0x44')](handleError(_0x16b7ba,null));};exports[_0x88f0('0x83')]=function(_0xd19caf,_0x3ec81f,_0x59c07a){return db[_0x88f0('0x2e')][_0x88f0('0x48')]({'where':{'id':_0xd19caf[_0x88f0('0x53')]['id']}})[_0x88f0('0x25')](handleEntityNotFound(_0x3ec81f,null))['then'](function(_0xbc447a){if(_0xbc447a){return _0xbc447a[_0x88f0('0x83')](_0xd19caf[_0x88f0('0x4a')][_0x88f0('0x6f')],_['omit'](_0xd19caf[_0x88f0('0x4a')],['ids','id'])||{})[_0x88f0('0x84')](function(_0x24640b){for(var _0x1d65ab=0x0;_0x1d65ab<_0xd19caf[_0x88f0('0x4a')][_0x88f0('0x6f')]['length'];_0x1d65ab+=0x1){socket[_0x88f0('0x6c')](_0x88f0('0x6d'),{'UserId':_0xd19caf[_0x88f0('0x4a')][_0x88f0('0x6f')][_0x1d65ab],'OpenchannelQueueId':_0xd19caf[_0x88f0('0x53')]['id']});}return _0x24640b;});}})[_0x88f0('0x25')](respondWithResult(_0x3ec81f,null))['catch'](handleError(_0x3ec81f,null));};exports[_0x88f0('0x82')]=function(_0x254986,_0x593ef4,_0xf402a0){return db['OpenchannelQueue'][_0x88f0('0x48')]({'where':{'id':_0x254986[_0x88f0('0x53')]['id']}})[_0x88f0('0x25')](handleEntityNotFound(_0x593ef4,null))[_0x88f0('0x25')](function(_0x38f6fd){if(_0x38f6fd){return _0x38f6fd[_0x88f0('0x82')](_0x254986[_0x88f0('0x36')][_0x88f0('0x6f')])['then'](function(){if(_[_0x88f0('0x85')](_0x254986[_0x88f0('0x36')][_0x88f0('0x6f')])){for(var _0x32a8b3=0x0;_0x32a8b3<_0x254986[_0x88f0('0x36')][_0x88f0('0x6f')][_0x88f0('0x47')];_0x32a8b3+=0x1){socket['emit'](_0x88f0('0x86'),{'UserId':Number(_0x254986[_0x88f0('0x36')][_0x88f0('0x6f')][_0x32a8b3]),'OpenchannelQueueId':Number(_0x254986[_0x88f0('0x53')]['id'])});}}else{socket[_0x88f0('0x6c')](_0x88f0('0x86'),{'UserId':Number(_0x254986[_0x88f0('0x36')][_0x88f0('0x6f')]),'OpenchannelQueueId':Number(_0x254986[_0x88f0('0x53')]['id'])});}});}})[_0x88f0('0x25')](respondWithStatusCode(_0x593ef4,null))['catch'](handleError(_0x593ef4,null));};exports[_0x88f0('0x87')]=function(_0x5691d,_0x2be21e,_0x506fc3){var _0x445fa3={};var _0x3ecdf8={};var _0x34037a;var _0x3a5853;return db[_0x88f0('0x2e')][_0x88f0('0x88')]({'where':{'id':_0x5691d['params']['id']}})[_0x88f0('0x25')](handleEntityNotFound(_0x2be21e,null))[_0x88f0('0x25')](function(_0xae8044){if(_0xae8044){_0x34037a=_0xae8044;_0x3ecdf8['model']=_['keys'](db[_0x88f0('0x57')]['rawAttributes']);_0x3ecdf8[_0x88f0('0x36')]=_[_0x88f0('0x46')](_0x5691d[_0x88f0('0x36')]);_0x3ecdf8[_0x88f0('0x33')]=_['intersection'](_0x3ecdf8[_0x88f0('0x32')],_0x3ecdf8['query']);_0x445fa3[_0x88f0('0x35')]=_['intersection'](_0x3ecdf8[_0x88f0('0x32')],qs[_0x88f0('0x37')](_0x5691d[_0x88f0('0x36')][_0x88f0('0x37')]));_0x445fa3[_0x88f0('0x35')]=_0x445fa3[_0x88f0('0x35')][_0x88f0('0x47')]?_0x445fa3[_0x88f0('0x35')]:_0x3ecdf8[_0x88f0('0x32')];_0x445fa3[_0x88f0('0x3a')]=qs[_0x88f0('0x3b')](_0x5691d[_0x88f0('0x36')][_0x88f0('0x3b')]);_0x445fa3['where']=qs[_0x88f0('0x33')](_[_0x88f0('0x3c')](_0x5691d[_0x88f0('0x36')],_0x3ecdf8[_0x88f0('0x33')]));if(_0x5691d['query']['filter']){_0x445fa3[_0x88f0('0x3e')]=_[_0x88f0('0x3f')](_0x445fa3[_0x88f0('0x3e')],{'$or':_[_0x88f0('0x2d')](_0x445fa3[_0x88f0('0x35')],function(_0xbab4f0){var _0x2f0554={};_0x2f0554[_0xbab4f0]={'$like':'%'+_0x5691d['query'][_0x88f0('0x3d')]+'%'};return _0x2f0554;})});}_0x445fa3=_[_0x88f0('0x3f')]({},_0x445fa3,_0x5691d['options']);return _0x34037a[_0x88f0('0x87')](_0x445fa3);}})['then'](function(_0x2a0652){if(_0x2a0652){_0x3a5853=_0x2a0652[_0x88f0('0x47')];if(!_0x5691d[_0x88f0('0x36')][_0x88f0('0x38')](_0x88f0('0x39'))){_0x445fa3[_0x88f0('0x1e')]=qs[_0x88f0('0x1e')](_0x5691d['query'][_0x88f0('0x1e')]);_0x445fa3[_0x88f0('0x1f')]=qs[_0x88f0('0x1f')](_0x5691d['query']['offset']);}return _0x34037a[_0x88f0('0x87')](_0x445fa3);}})[_0x88f0('0x25')](function(_0xfef2d4){if(_0xfef2d4){return _0xfef2d4?{'count':_0x3a5853,'rows':_0xfef2d4}:null;}})[_0x88f0('0x25')](respondWithResult(_0x2be21e,null))[_0x88f0('0x44')](handleError(_0x2be21e,null));}; \ No newline at end of file diff --git a/server/api/openchannelQueue/openchannelQueue.events.js b/server/api/openchannelQueue/openchannelQueue.events.js index 346afe0..0729de3 100644 --- a/server/api/openchannelQueue/openchannelQueue.events.js +++ b/server/api/openchannelQueue/openchannelQueue.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2eae=['emit','hasOwnProperty','exports','events','../../mysqldb','save','update','remove'];(function(_0x4be834,_0x2442d1){var _0x1568d1=function(_0x204ff0){while(--_0x204ff0){_0x4be834['push'](_0x4be834['shift']());}};_0x1568d1(++_0x2442d1);}(_0x2eae,0x14b));var _0xe2ea=function(_0x313c97,_0x194958){_0x313c97=_0x313c97-0x0;var _0x26cb65=_0x2eae[_0x313c97];return _0x26cb65;};'use strict';var EventEmitter=require(_0xe2ea('0x0'));var OpenchannelQueue=require(_0xe2ea('0x1'))['db']['OpenchannelQueue'];var OpenchannelQueueEvents=new EventEmitter();OpenchannelQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xe2ea('0x2'),'afterUpdate':_0xe2ea('0x3'),'afterDestroy':_0xe2ea('0x4')};function emitEvent(_0x2ce0ef){return function(_0x128870,_0x32437c,_0x481181){OpenchannelQueueEvents[_0xe2ea('0x5')](_0x2ce0ef+':'+_0x128870['id'],_0x128870);OpenchannelQueueEvents[_0xe2ea('0x5')](_0x2ce0ef,_0x128870);_0x481181(null);};}for(var e in events){if(events[_0xe2ea('0x6')](e)){var event=events[e];OpenchannelQueue['hook'](e,emitEvent(event));}}module[_0xe2ea('0x7')]=OpenchannelQueueEvents; \ No newline at end of file +var _0x28cd=['../../mysqldb','OpenchannelQueue','save','update','remove','emit','hook','exports'];(function(_0x9a8464,_0x239acc){var _0x43b6=function(_0x59e3a6){while(--_0x59e3a6){_0x9a8464['push'](_0x9a8464['shift']());}};_0x43b6(++_0x239acc);}(_0x28cd,0x150));var _0xd28c=function(_0x589998,_0xddb502){_0x589998=_0x589998-0x0;var _0x389aad=_0x28cd[_0x589998];return _0x389aad;};'use strict';var EventEmitter=require('events');var OpenchannelQueue=require(_0xd28c('0x0'))['db'][_0xd28c('0x1')];var OpenchannelQueueEvents=new EventEmitter();OpenchannelQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xd28c('0x2'),'afterUpdate':_0xd28c('0x3'),'afterDestroy':_0xd28c('0x4')};function emitEvent(_0x3dbf70){return function(_0xeb07a1,_0x2d6f05,_0x1f1698){OpenchannelQueueEvents[_0xd28c('0x5')](_0x3dbf70+':'+_0xeb07a1['id'],_0xeb07a1);OpenchannelQueueEvents[_0xd28c('0x5')](_0x3dbf70,_0xeb07a1);_0x1f1698(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];OpenchannelQueue[_0xd28c('0x6')](e,emitEvent(event));}}module[_0xd28c('0x7')]=OpenchannelQueueEvents; \ No newline at end of file diff --git a/server/api/openchannelQueue/openchannelQueue.model.js b/server/api/openchannelQueue/openchannelQueue.model.js index a0a4337..f2663cd 100644 --- a/server/api/openchannelQueue/openchannelQueue.model.js +++ b/server/api/openchannelQueue/openchannelQueue.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb72d=['./openchannelQueue.attributes','exports','define','OpenchannelQueue','openchannel_queues','../../config/logger','api','moment','bluebird','path','rimraf'];(function(_0x47d29b,_0x337fa5){var _0x45ae15=function(_0x59d6a9){while(--_0x59d6a9){_0x47d29b['push'](_0x47d29b['shift']());}};_0x45ae15(++_0x337fa5);}(_0xb72d,0x1b2));var _0xdb72=function(_0x30aa74,_0x216286){_0x30aa74=_0x30aa74-0x0;var _0x3e2ccf=_0xb72d[_0x30aa74];return _0x3e2ccf;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xdb72('0x0'))(_0xdb72('0x1'));var moment=require(_0xdb72('0x2'));var BPromise=require(_0xdb72('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xdb72('0x4'));var rimraf=require(_0xdb72('0x5'));var config=require('../../config/environment');var attributes=require(_0xdb72('0x6'));module[_0xdb72('0x7')]=function(_0x4f3795,_0x4e8e10){return _0x4f3795[_0xdb72('0x8')](_0xdb72('0x9'),attributes,{'tableName':_0xdb72('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xc959=['api','request-promise','path','rimraf','../../config/environment','./openchannelQueue.attributes','exports','define','OpenchannelQueue','openchannel_queues','lodash','../../config/logger'];(function(_0x5f3333,_0x4ac4ec){var _0x4f6560=function(_0x3bb52d){while(--_0x3bb52d){_0x5f3333['push'](_0x5f3333['shift']());}};_0x4f6560(++_0x4ac4ec);}(_0xc959,0x14e));var _0x9c95=function(_0x580647,_0x43d2c3){_0x580647=_0x580647-0x0;var _0x5f0792=_0xc959[_0x580647];return _0x5f0792;};'use strict';var _=require(_0x9c95('0x0'));var util=require('util');var logger=require(_0x9c95('0x1'))(_0x9c95('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x9c95('0x3'));var fs=require('fs');var path=require(_0x9c95('0x4'));var rimraf=require(_0x9c95('0x5'));var config=require(_0x9c95('0x6'));var attributes=require(_0x9c95('0x7'));module[_0x9c95('0x8')]=function(_0x475033,_0x4e3a47){return _0x475033[_0x9c95('0x9')](_0x9c95('0xa'),attributes,{'tableName':_0x9c95('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/openchannelQueue/openchannelQueue.rpc.js b/server/api/openchannelQueue/openchannelQueue.rpc.js index a9bb652..fbb5669 100644 --- a/server/api/openchannelQueue/openchannelQueue.rpc.js +++ b/server/api/openchannelQueue/openchannelQueue.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf0d8=['redis','localhost','socket.io-emitter','./openchannelQueue.socket','register','OpenchannelQueue,\x20%s,\x20%s','request\x20sent','debug','code','error','message','info','catch','GetOpenchannelQueue','OpenchannelQueue','findAll','options','where','limit','map','include','model','attributes','then','stringify','ShowOpenchannelQueue','raw','util','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http'];(function(_0x3fb9dd,_0x174fff){var _0x20136a=function(_0x480081){while(--_0x480081){_0x3fb9dd['push'](_0x3fb9dd['shift']());}};_0x20136a(++_0x174fff);}(_0xf0d8,0xff));var _0x8f0d=function(_0x45a9c2,_0x5d61f5){_0x45a9c2=_0x45a9c2-0x0;var _0x2d94e4=_0xf0d8[_0x45a9c2];return _0x2d94e4;};'use strict';var _=require('lodash');var util=require(_0x8f0d('0x0'));var moment=require(_0x8f0d('0x1'));var BPromise=require(_0x8f0d('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x8f0d('0x3'))['db'];var utils=require(_0x8f0d('0x4'));var logger=require(_0x8f0d('0x5'))(_0x8f0d('0x6'));var config=require(_0x8f0d('0x7'));var jayson=require(_0x8f0d('0x8'));var client=jayson[_0x8f0d('0x9')][_0x8f0d('0xa')]({'port':0x232a});config[_0x8f0d('0xb')]=_['defaults'](config['redis'],{'host':_0x8f0d('0xc'),'port':0x18eb});var socket=require(_0x8f0d('0xd'))(new Redis(config[_0x8f0d('0xb')]));require(_0x8f0d('0xe'))[_0x8f0d('0xf')](socket);function respondWithRpcPromise(_0x32e4b5,_0x5009cb,_0xc1cdf){return new BPromise(function(_0x529932,_0x22ab02){return client['request'](_0x32e4b5,_0xc1cdf)['then'](function(_0xffbf47){logger['info'](_0x8f0d('0x10'),_0x5009cb,_0x8f0d('0x11'));logger[_0x8f0d('0x12')]('OpenchannelQueue,\x20%s,\x20%s,\x20%s',_0x5009cb,_0x8f0d('0x11'),JSON['stringify'](_0xffbf47));if(_0xffbf47['error']){if(_0xffbf47['error'][_0x8f0d('0x13')]===0x1f4){logger['error'](_0x8f0d('0x10'),_0x5009cb,_0xffbf47[_0x8f0d('0x14')][_0x8f0d('0x15')]);return _0x22ab02(_0xffbf47[_0x8f0d('0x14')]['message']);}logger[_0x8f0d('0x14')](_0x8f0d('0x10'),_0x5009cb,_0xffbf47[_0x8f0d('0x14')][_0x8f0d('0x15')]);return _0x529932(_0xffbf47[_0x8f0d('0x14')][_0x8f0d('0x15')]);}else{logger[_0x8f0d('0x16')]('OpenchannelQueue,\x20%s,\x20%s',_0x5009cb,_0x8f0d('0x11'));_0x529932(_0xffbf47['result'][_0x8f0d('0x15')]);}})[_0x8f0d('0x17')](function(_0xcc311){logger[_0x8f0d('0x14')](_0x8f0d('0x10'),_0x5009cb,_0xcc311);_0x22ab02(_0xcc311);});});}exports[_0x8f0d('0x18')]=function(_0x1086d7){var _0xfd8c79=this;return new Promise(function(_0x23b5b6,_0x1789d4){return db[_0x8f0d('0x19')][_0x8f0d('0x1a')]({'raw':_0x1086d7[_0x8f0d('0x1b')]?_0x1086d7[_0x8f0d('0x1b')]['raw']===undefined?!![]:![]:!![],'where':_0x1086d7['options']?_0x1086d7[_0x8f0d('0x1b')][_0x8f0d('0x1c')]||null:null,'attributes':_0x1086d7[_0x8f0d('0x1b')]?_0x1086d7[_0x8f0d('0x1b')]['attributes']||null:null,'limit':_0x1086d7[_0x8f0d('0x1b')]?_0x1086d7['options'][_0x8f0d('0x1d')]||null:null,'include':_0x1086d7['options']?_0x1086d7[_0x8f0d('0x1b')]['include']?_[_0x8f0d('0x1e')](_0x1086d7[_0x8f0d('0x1b')][_0x8f0d('0x1f')],function(_0x5a6e9a){return{'model':db[_0x5a6e9a[_0x8f0d('0x20')]],'as':_0x5a6e9a['as'],'attributes':_0x5a6e9a[_0x8f0d('0x21')],'include':_0x5a6e9a[_0x8f0d('0x1f')]?_[_0x8f0d('0x1e')](_0x5a6e9a['include'],function(_0xf29c01){return{'model':db[_0xf29c01[_0x8f0d('0x20')]],'as':_0xf29c01['as'],'attributes':_0xf29c01[_0x8f0d('0x21')],'include':_0xf29c01[_0x8f0d('0x1f')]?_['map'](_0xf29c01[_0x8f0d('0x1f')],function(_0x36e1f6){return{'model':db[_0x36e1f6[_0x8f0d('0x20')]],'as':_0x36e1f6['as'],'attributes':_0x36e1f6[_0x8f0d('0x21')]};}):[]};}):[]};}):[]:[]})[_0x8f0d('0x22')](function(_0x5028ec){logger[_0x8f0d('0x16')]('GetOpenchannelQueue',_0x1086d7);logger[_0x8f0d('0x12')](_0x8f0d('0x18'),_0x1086d7,JSON[_0x8f0d('0x23')](_0x5028ec));_0x23b5b6(_0x5028ec);})[_0x8f0d('0x17')](function(_0x22a91e){logger[_0x8f0d('0x14')](_0x8f0d('0x18'),_0x22a91e[_0x8f0d('0x15')],_0x1086d7);_0x1789d4(_0xfd8c79['error'](0x1f4,_0x22a91e['message']));});});};exports[_0x8f0d('0x24')]=function(_0x43ce61){var _0x18855e=this;return new Promise(function(_0x47f84f,_0x44ccbb){return db[_0x8f0d('0x19')]['find']({'raw':_0x43ce61[_0x8f0d('0x1b')]?_0x43ce61[_0x8f0d('0x1b')][_0x8f0d('0x25')]===undefined?!![]:![]:!![],'where':_0x43ce61[_0x8f0d('0x1b')]?_0x43ce61[_0x8f0d('0x1b')][_0x8f0d('0x1c')]||null:null,'attributes':_0x43ce61[_0x8f0d('0x1b')]?_0x43ce61[_0x8f0d('0x1b')][_0x8f0d('0x21')]||null:null,'include':_0x43ce61[_0x8f0d('0x1b')]?_0x43ce61[_0x8f0d('0x1b')][_0x8f0d('0x1f')]?_['map'](_0x43ce61[_0x8f0d('0x1b')]['include'],function(_0x46cb9b){return{'model':db[_0x46cb9b[_0x8f0d('0x20')]],'as':_0x46cb9b['as'],'attributes':_0x46cb9b[_0x8f0d('0x21')],'include':_0x46cb9b[_0x8f0d('0x1f')]?_[_0x8f0d('0x1e')](_0x46cb9b[_0x8f0d('0x1f')],function(_0x428dac){return{'model':db[_0x428dac['model']],'as':_0x428dac['as'],'attributes':_0x428dac['attributes'],'include':_0x428dac[_0x8f0d('0x1f')]?_[_0x8f0d('0x1e')](_0x428dac[_0x8f0d('0x1f')],function(_0x8635c7){return{'model':db[_0x8635c7[_0x8f0d('0x20')]],'as':_0x8635c7['as'],'attributes':_0x8635c7[_0x8f0d('0x21')]};}):[]};}):[]};}):[]:[]})[_0x8f0d('0x22')](function(_0x5dc01b){logger[_0x8f0d('0x16')](_0x8f0d('0x24'),_0x43ce61);logger[_0x8f0d('0x12')](_0x8f0d('0x24'),_0x43ce61,JSON[_0x8f0d('0x23')](_0x5dc01b));_0x47f84f(_0x5dc01b);})[_0x8f0d('0x17')](function(_0x54ac54){logger[_0x8f0d('0x14')](_0x8f0d('0x24'),_0x54ac54['message'],_0x43ce61);_0x44ccbb(_0x18855e['error'](0x1f4,_0x54ac54['message']));});});}; \ No newline at end of file +var _0xdd64=['./openchannelQueue.socket','register','then','info','OpenchannelQueue,\x20%s,\x20%s','request\x20sent','OpenchannelQueue,\x20%s,\x20%s,\x20%s','error','code','message','result','GetOpenchannelQueue','OpenchannelQueue','findAll','raw','options','where','attributes','limit','include','map','model','debug','stringify','catch','ShowOpenchannelQueue','find','util','moment','bluebird','randomstring','../../mysqldb','../../config/logger','rpc','../../config/environment','client','http','redis','defaults','localhost','socket.io-emitter'];(function(_0x54d4fe,_0x55e869){var _0x1ab5bb=function(_0x5b1af2){while(--_0x5b1af2){_0x54d4fe['push'](_0x54d4fe['shift']());}};_0x1ab5bb(++_0x55e869);}(_0xdd64,0x1de));var _0x4dd6=function(_0x5e0c6d,_0x3a2402){_0x5e0c6d=_0x5e0c6d-0x0;var _0x15a1c4=_0xdd64[_0x5e0c6d];return _0x15a1c4;};'use strict';var _=require('lodash');var util=require(_0x4dd6('0x0'));var moment=require(_0x4dd6('0x1'));var BPromise=require(_0x4dd6('0x2'));var rs=require(_0x4dd6('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x4dd6('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x4dd6('0x5'))(_0x4dd6('0x6'));var config=require(_0x4dd6('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x4dd6('0x8')][_0x4dd6('0x9')]({'port':0x232a});config[_0x4dd6('0xa')]=_[_0x4dd6('0xb')](config[_0x4dd6('0xa')],{'host':_0x4dd6('0xc'),'port':0x18eb});var socket=require(_0x4dd6('0xd'))(new Redis(config[_0x4dd6('0xa')]));require(_0x4dd6('0xe'))[_0x4dd6('0xf')](socket);function respondWithRpcPromise(_0x17b712,_0xbd4d57,_0x2e2267){return new BPromise(function(_0x170a45,_0x186abd){return client['request'](_0x17b712,_0x2e2267)[_0x4dd6('0x10')](function(_0x3f0e2d){logger[_0x4dd6('0x11')](_0x4dd6('0x12'),_0xbd4d57,_0x4dd6('0x13'));logger['debug'](_0x4dd6('0x14'),_0xbd4d57,_0x4dd6('0x13'),JSON['stringify'](_0x3f0e2d));if(_0x3f0e2d[_0x4dd6('0x15')]){if(_0x3f0e2d[_0x4dd6('0x15')][_0x4dd6('0x16')]===0x1f4){logger['error'](_0x4dd6('0x12'),_0xbd4d57,_0x3f0e2d[_0x4dd6('0x15')][_0x4dd6('0x17')]);return _0x186abd(_0x3f0e2d['error'][_0x4dd6('0x17')]);}logger['error'](_0x4dd6('0x12'),_0xbd4d57,_0x3f0e2d['error'][_0x4dd6('0x17')]);return _0x170a45(_0x3f0e2d['error'][_0x4dd6('0x17')]);}else{logger[_0x4dd6('0x11')](_0x4dd6('0x12'),_0xbd4d57,_0x4dd6('0x13'));_0x170a45(_0x3f0e2d[_0x4dd6('0x18')][_0x4dd6('0x17')]);}})['catch'](function(_0x2009c4){logger['error'](_0x4dd6('0x12'),_0xbd4d57,_0x2009c4);_0x186abd(_0x2009c4);});});}exports[_0x4dd6('0x19')]=function(_0x4ac60a){var _0x5e5c10=this;return new Promise(function(_0x356a37,_0x5a0ba0){return db[_0x4dd6('0x1a')][_0x4dd6('0x1b')]({'raw':_0x4ac60a['options']?_0x4ac60a['options'][_0x4dd6('0x1c')]===undefined?!![]:![]:!![],'where':_0x4ac60a['options']?_0x4ac60a[_0x4dd6('0x1d')][_0x4dd6('0x1e')]||null:null,'attributes':_0x4ac60a[_0x4dd6('0x1d')]?_0x4ac60a[_0x4dd6('0x1d')][_0x4dd6('0x1f')]||null:null,'limit':_0x4ac60a[_0x4dd6('0x1d')]?_0x4ac60a[_0x4dd6('0x1d')][_0x4dd6('0x20')]||null:null,'include':_0x4ac60a[_0x4dd6('0x1d')]?_0x4ac60a[_0x4dd6('0x1d')][_0x4dd6('0x21')]?_[_0x4dd6('0x22')](_0x4ac60a[_0x4dd6('0x1d')]['include'],function(_0xe9bc10){return{'model':db[_0xe9bc10[_0x4dd6('0x23')]],'as':_0xe9bc10['as'],'attributes':_0xe9bc10[_0x4dd6('0x1f')],'include':_0xe9bc10[_0x4dd6('0x21')]?_[_0x4dd6('0x22')](_0xe9bc10[_0x4dd6('0x21')],function(_0x1c4eb6){return{'model':db[_0x1c4eb6[_0x4dd6('0x23')]],'as':_0x1c4eb6['as'],'attributes':_0x1c4eb6[_0x4dd6('0x1f')],'include':_0x1c4eb6['include']?_[_0x4dd6('0x22')](_0x1c4eb6['include'],function(_0x4abbeb){return{'model':db[_0x4abbeb[_0x4dd6('0x23')]],'as':_0x4abbeb['as'],'attributes':_0x4abbeb['attributes']};}):[]};}):[]};}):[]:[]})[_0x4dd6('0x10')](function(_0x5f5128){logger[_0x4dd6('0x11')]('GetOpenchannelQueue',_0x4ac60a);logger[_0x4dd6('0x24')](_0x4dd6('0x19'),_0x4ac60a,JSON[_0x4dd6('0x25')](_0x5f5128));_0x356a37(_0x5f5128);})[_0x4dd6('0x26')](function(_0x563357){logger[_0x4dd6('0x15')]('GetOpenchannelQueue',_0x563357[_0x4dd6('0x17')],_0x4ac60a);_0x5a0ba0(_0x5e5c10['error'](0x1f4,_0x563357['message']));});});};exports[_0x4dd6('0x27')]=function(_0x31e730){var _0x2fdaa6=this;return new Promise(function(_0x54ada1,_0x128f43){return db['OpenchannelQueue'][_0x4dd6('0x28')]({'raw':_0x31e730[_0x4dd6('0x1d')]?_0x31e730[_0x4dd6('0x1d')][_0x4dd6('0x1c')]===undefined?!![]:![]:!![],'where':_0x31e730[_0x4dd6('0x1d')]?_0x31e730[_0x4dd6('0x1d')][_0x4dd6('0x1e')]||null:null,'attributes':_0x31e730[_0x4dd6('0x1d')]?_0x31e730[_0x4dd6('0x1d')]['attributes']||null:null,'include':_0x31e730[_0x4dd6('0x1d')]?_0x31e730['options'][_0x4dd6('0x21')]?_[_0x4dd6('0x22')](_0x31e730[_0x4dd6('0x1d')][_0x4dd6('0x21')],function(_0x258522){return{'model':db[_0x258522[_0x4dd6('0x23')]],'as':_0x258522['as'],'attributes':_0x258522['attributes'],'include':_0x258522[_0x4dd6('0x21')]?_[_0x4dd6('0x22')](_0x258522[_0x4dd6('0x21')],function(_0x266a90){return{'model':db[_0x266a90[_0x4dd6('0x23')]],'as':_0x266a90['as'],'attributes':_0x266a90[_0x4dd6('0x1f')],'include':_0x266a90[_0x4dd6('0x21')]?_[_0x4dd6('0x22')](_0x266a90['include'],function(_0x509733){return{'model':db[_0x509733[_0x4dd6('0x23')]],'as':_0x509733['as'],'attributes':_0x509733[_0x4dd6('0x1f')]};}):[]};}):[]};}):[]:[]})[_0x4dd6('0x10')](function(_0x46ef5f){logger[_0x4dd6('0x11')](_0x4dd6('0x27'),_0x31e730);logger['debug'](_0x4dd6('0x27'),_0x31e730,JSON['stringify'](_0x46ef5f));_0x54ada1(_0x46ef5f);})[_0x4dd6('0x26')](function(_0x214ecc){logger[_0x4dd6('0x15')](_0x4dd6('0x27'),_0x214ecc[_0x4dd6('0x17')],_0x31e730);_0x128f43(_0x2fdaa6['error'](0x1f4,_0x214ecc['message']));});});}; \ No newline at end of file diff --git a/server/api/openchannelQueue/openchannelQueue.socket.js b/server/api/openchannelQueue/openchannelQueue.socket.js index e83f918..20f5fce 100644 --- a/server/api/openchannelQueue/openchannelQueue.socket.js +++ b/server/api/openchannelQueue/openchannelQueue.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd564=['openchannelQueue:','save','update','removeListener','length'];(function(_0x3f5a71,_0x279f1d){var _0x1792dc=function(_0x5df231){while(--_0x5df231){_0x3f5a71['push'](_0x3f5a71['shift']());}};_0x1792dc(++_0x279f1d);}(_0xd564,0x19b));var _0x4d56=function(_0x2dfd11,_0x4b6559){_0x2dfd11=_0x2dfd11-0x0;var _0x33f99b=_0xd564[_0x2dfd11];return _0x33f99b;};'use strict';var OpenchannelQueueEvents=require('./openchannelQueue.events');var events=[_0x4d56('0x0'),'remove',_0x4d56('0x1')];function createListener(_0x4e28f3,_0x1e3840){return function(_0x2a7dba){_0x1e3840['emit'](_0x4e28f3,_0x2a7dba);};}function removeListener(_0x557923,_0x250917){return function(){OpenchannelQueueEvents[_0x4d56('0x2')](_0x557923,_0x250917);};}exports['register']=function(_0x25e9ba){for(var _0x1cb33f=0x0,_0x524a8c=events[_0x4d56('0x3')];_0x1cb33f<_0x524a8c;_0x1cb33f++){var _0x336385=events[_0x1cb33f];var _0x62bc79=createListener(_0x4d56('0x4')+_0x336385,_0x25e9ba);OpenchannelQueueEvents['on'](_0x336385,_0x62bc79);}}; \ No newline at end of file +var _0x6c19=['openchannelQueue:','./openchannelQueue.events','save','remove','update','emit','removeListener','length'];(function(_0x106895,_0xf6b6be){var _0x3ee675=function(_0x14d789){while(--_0x14d789){_0x106895['push'](_0x106895['shift']());}};_0x3ee675(++_0xf6b6be);}(_0x6c19,0x159));var _0x96c1=function(_0x1d5ba8,_0x412a52){_0x1d5ba8=_0x1d5ba8-0x0;var _0x1022a2=_0x6c19[_0x1d5ba8];return _0x1022a2;};'use strict';var OpenchannelQueueEvents=require(_0x96c1('0x0'));var events=[_0x96c1('0x1'),_0x96c1('0x2'),_0x96c1('0x3')];function createListener(_0x1cfb82,_0x2760d2){return function(_0x3e0667){_0x2760d2[_0x96c1('0x4')](_0x1cfb82,_0x3e0667);};}function removeListener(_0x5814a8,_0xbc742a){return function(){OpenchannelQueueEvents[_0x96c1('0x5')](_0x5814a8,_0xbc742a);};}exports['register']=function(_0xe82f90){for(var _0x5463b9=0x0,_0x5ce3bb=events[_0x96c1('0x6')];_0x5463b9<_0x5ce3bb;_0x5463b9++){var _0x15115f=events[_0x5463b9];var _0x233465=createListener(_0x96c1('0x7')+_0x15115f,_0xe82f90);OpenchannelQueueEvents['on'](_0x15115f,_0x233465);}}; \ No newline at end of file diff --git a/server/api/openchannelQueueReport/index.js b/server/api/openchannelQueueReport/index.js index a20cd1e..e217c81 100644 --- a/server/api/openchannelQueueReport/index.js +++ b/server/api/openchannelQueueReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf5ab=['/:id','show','create','put','update','destroy','exports','util','path','connect-timeout','express','../../components/auth/service','../../config/environment','isAuthenticated','index','/describe','describe'];(function(_0x754ab4,_0x56daa7){var _0x34079a=function(_0x295ec1){while(--_0x295ec1){_0x754ab4['push'](_0x754ab4['shift']());}};_0x34079a(++_0x56daa7);}(_0xf5ab,0x17d));var _0xbf5a=function(_0x6c301,_0xc397e3){_0x6c301=_0x6c301-0x0;var _0x57018c=_0xf5ab[_0x6c301];return _0x57018c;};'use strict';var multer=require('multer');var util=require(_0xbf5a('0x0'));var path=require(_0xbf5a('0x1'));var timeout=require(_0xbf5a('0x2'));var express=require(_0xbf5a('0x3'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0xbf5a('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0xbf5a('0x5'));var controller=require('./openchannelQueueReport.controller');router['get']('/',auth[_0xbf5a('0x6')](),controller[_0xbf5a('0x7')]);router['get'](_0xbf5a('0x8'),auth[_0xbf5a('0x6')](),controller[_0xbf5a('0x9')]);router['get'](_0xbf5a('0xa'),auth[_0xbf5a('0x6')](),controller[_0xbf5a('0xb')]);router['post']('/',auth[_0xbf5a('0x6')](),controller[_0xbf5a('0xc')]);router[_0xbf5a('0xd')](_0xbf5a('0xa'),auth[_0xbf5a('0x6')](),controller[_0xbf5a('0xe')]);router['delete']('/:id',auth[_0xbf5a('0x6')](),controller[_0xbf5a('0xf')]);module[_0xbf5a('0x10')]=router; \ No newline at end of file +var _0xca17=['destroy','multer','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../config/environment','./openchannelQueueReport.controller','get','isAuthenticated','index','/describe','describe','show','post','create','put','update','delete','/:id'];(function(_0x1dbc09,_0x4c6a0a){var _0x4a206b=function(_0x46c020){while(--_0x46c020){_0x1dbc09['push'](_0x1dbc09['shift']());}};_0x4a206b(++_0x4c6a0a);}(_0xca17,0x1ba));var _0x7ca1=function(_0x4f51f9,_0x5d5613){_0x4f51f9=_0x4f51f9-0x0;var _0x533984=_0xca17[_0x4f51f9];return _0x533984;};'use strict';var multer=require(_0x7ca1('0x0'));var util=require('util');var path=require(_0x7ca1('0x1'));var timeout=require(_0x7ca1('0x2'));var express=require('express');var router=express[_0x7ca1('0x3')]();var fs_extra=require(_0x7ca1('0x4'));var auth=require(_0x7ca1('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x7ca1('0x6'));var controller=require(_0x7ca1('0x7'));router[_0x7ca1('0x8')]('/',auth[_0x7ca1('0x9')](),controller[_0x7ca1('0xa')]);router[_0x7ca1('0x8')](_0x7ca1('0xb'),auth['isAuthenticated'](),controller[_0x7ca1('0xc')]);router[_0x7ca1('0x8')]('/:id',auth[_0x7ca1('0x9')](),controller[_0x7ca1('0xd')]);router[_0x7ca1('0xe')]('/',auth[_0x7ca1('0x9')](),controller[_0x7ca1('0xf')]);router[_0x7ca1('0x10')]('/:id',auth['isAuthenticated'](),controller[_0x7ca1('0x11')]);router[_0x7ca1('0x12')](_0x7ca1('0x13'),auth[_0x7ca1('0x9')](),controller[_0x7ca1('0x14')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/openchannelQueueReport/openchannelQueueReport.attributes.js b/server/api/openchannelQueueReport/openchannelQueueReport.attributes.js index a1b8ee2..a96e702 100644 --- a/server/api/openchannelQueueReport/openchannelQueueReport.attributes.js +++ b/server/api/openchannelQueueReport/openchannelQueueReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6a15=['moment','sequelize','exports','STRING','DATE'];(function(_0x527349,_0x1cf613){var _0x5c270c=function(_0x116a5f){while(--_0x116a5f){_0x527349['push'](_0x527349['shift']());}};_0x5c270c(++_0x1cf613);}(_0x6a15,0x159));var _0x56a1=function(_0x117926,_0x268445){_0x117926=_0x117926-0x0;var _0xc34604=_0x6a15[_0x117926];return _0xc34604;};'use strict';var moment=require(_0x56a1('0x0'));var Sequelize=require(_0x56a1('0x1'));module[_0x56a1('0x2')]={'uniqueid':{'type':Sequelize[_0x56a1('0x3')],'allowNull':![]},'from':{'type':Sequelize[_0x56a1('0x3')]},'joinAt':{'type':Sequelize[_0x56a1('0x4')]},'leaveAt':{'type':Sequelize[_0x56a1('0x4')]},'acceptAt':{'type':Sequelize['DATE']},'exitAt':{'type':Sequelize['DATE']},'reason':{'type':Sequelize['STRING']}}; \ No newline at end of file +var _0xc928=['sequelize','exports','STRING','DATE','moment'];(function(_0x5600f4,_0x542d94){var _0x3160d6=function(_0x5cc5f0){while(--_0x5cc5f0){_0x5600f4['push'](_0x5600f4['shift']());}};_0x3160d6(++_0x542d94);}(_0xc928,0xe0));var _0x8c92=function(_0x55687f,_0xb2d22e){_0x55687f=_0x55687f-0x0;var _0x1852b6=_0xc928[_0x55687f];return _0x1852b6;};'use strict';var moment=require(_0x8c92('0x0'));var Sequelize=require(_0x8c92('0x1'));module[_0x8c92('0x2')]={'uniqueid':{'type':Sequelize[_0x8c92('0x3')],'allowNull':![]},'from':{'type':Sequelize[_0x8c92('0x3')]},'joinAt':{'type':Sequelize[_0x8c92('0x4')]},'leaveAt':{'type':Sequelize[_0x8c92('0x4')]},'acceptAt':{'type':Sequelize['DATE']},'exitAt':{'type':Sequelize[_0x8c92('0x4')]},'reason':{'type':Sequelize[_0x8c92('0x3')]}}; \ No newline at end of file diff --git a/server/api/openchannelQueueReport/openchannelQueueReport.controller.js b/server/api/openchannelQueueReport/openchannelQueueReport.controller.js index d6097a5..2693c30 100644 --- a/server/api/openchannelQueueReport/openchannelQueueReport.controller.js +++ b/server/api/openchannelQueueReport/openchannelQueueReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x65a2=['create','body','find','describe','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','undefined','count','offset','limit','set','Content-Range','reject','update','then','destroy','error','stack','name','send','index','map','rawAttributes','keys','query','filters','intersection','attributes','fields','length','model','hasOwnProperty','nolimit','order','sort','filter','where','merge','type','VIRTUAL','options','OpenchannelQueueReport','includeAll','include','findAll','rows','show','params','catch'];(function(_0x3938cf,_0x294088){var _0x2c368b=function(_0x242337){while(--_0x242337){_0x3938cf['push'](_0x3938cf['shift']());}};_0x2c368b(++_0x294088);}(_0x65a2,0x1cc));var _0x265a=function(_0x45972b,_0x123ebd){_0x45972b=_0x45972b-0x0;var _0x3e6a7c=_0x65a2[_0x45972b];return _0x3e6a7c;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x265a('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0x265a('0x1'));var rp=require(_0x265a('0x2'));var moment=require(_0x265a('0x3'));var BPromise=require(_0x265a('0x4'));var Mustache=require(_0x265a('0x5'));var util=require(_0x265a('0x6'));var path=require(_0x265a('0x7'));var sox=require(_0x265a('0x8'));var csv=require(_0x265a('0x9'));var ejs=require(_0x265a('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x265a('0xb'));var crypto=require(_0x265a('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x265a('0xd'));var toCsv=require(_0x265a('0x9'));var querystring=require(_0x265a('0xe'));var Papa=require(_0x265a('0xf'));var Redis=require(_0x265a('0x10'));var authService=require(_0x265a('0x11'));var qs=require(_0x265a('0x12'));var as=require(_0x265a('0x13'));var hardwareService=require(_0x265a('0x14'));var logger=require('../../config/logger')(_0x265a('0x15'));var utils=require(_0x265a('0x16'));var config=require(_0x265a('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0x265a('0x18'))['db'];function respondWithStatusCode(_0x2610db,_0x17164a){_0x17164a=_0x17164a||0xcc;return function(_0x53078f){if(_0x53078f){return _0x2610db[_0x265a('0x19')](_0x17164a);}return _0x2610db[_0x265a('0x1a')](_0x17164a)[_0x265a('0x1b')]();};}function respondWithResult(_0x3de8f7,_0x3a7419){_0x3a7419=_0x3a7419||0xc8;return function(_0x153519){if(_0x153519){return _0x3de8f7[_0x265a('0x1a')](_0x3a7419)[_0x265a('0x1c')](_0x153519);}};}function respondWithFilteredResult(_0x4f29e0,_0x53ffe0){return function(_0x19fda4){if(_0x19fda4){var _0xebe717=typeof _0x53ffe0['offset']===_0x265a('0x1d')&&typeof _0x53ffe0['limit']==='undefined';var _0x43fc76=_0x19fda4[_0x265a('0x1e')];var _0x559300=_0xebe717?0x0:_0x53ffe0[_0x265a('0x1f')];var _0xeff058=_0xebe717?_0x19fda4[_0x265a('0x1e')]:_0x53ffe0[_0x265a('0x1f')]+_0x53ffe0[_0x265a('0x20')];var _0x2849f6;if(_0xeff058>=_0x43fc76){_0xeff058=_0x43fc76;_0x2849f6=0xc8;}else{_0x2849f6=0xce;}_0x4f29e0[_0x265a('0x1a')](_0x2849f6);return _0x4f29e0[_0x265a('0x21')](_0x265a('0x22'),_0x559300+'-'+_0xeff058+'/'+_0x43fc76)['json'](_0x19fda4);}return null;};}function patchUpdates(_0x4ec7b6){return function(_0x279e3a){try{jsonpatch['apply'](_0x279e3a,_0x4ec7b6,!![]);}catch(_0x19f1ab){return BPromise[_0x265a('0x23')](_0x19f1ab);}return _0x279e3a['save']();};}function saveUpdates(_0x239a62,_0x4836af){return function(_0x3ace46){if(_0x3ace46){return _0x3ace46[_0x265a('0x24')](_0x239a62)[_0x265a('0x25')](function(_0x1239cc){return _0x1239cc;});}return null;};}function removeEntity(_0x55013e,_0x16dcea){return function(_0xc6f1a0){if(_0xc6f1a0){return _0xc6f1a0[_0x265a('0x26')]()['then'](function(){_0x55013e[_0x265a('0x1a')](0xcc)[_0x265a('0x1b')]();});}};}function handleEntityNotFound(_0xf16920,_0x40331c){return function(_0x368f89){if(!_0x368f89){_0xf16920[_0x265a('0x19')](0x194);}return _0x368f89;};}function handleError(_0x4ff762,_0x8a64ad){_0x8a64ad=_0x8a64ad||0x1f4;return function(_0x4a5b34){logger[_0x265a('0x27')](_0x4a5b34[_0x265a('0x28')]);if(_0x4a5b34[_0x265a('0x29')]){delete _0x4a5b34[_0x265a('0x29')];}_0x4ff762[_0x265a('0x1a')](_0x8a64ad)[_0x265a('0x2a')](_0x4a5b34);};}exports[_0x265a('0x2b')]=function(_0x27d3f4,_0x141c4b){var _0x2dbacd={},_0x5dbce7={},_0x154767={'count':0x0,'rows':[]};var _0x1c586b=_[_0x265a('0x2c')](db['OpenchannelQueueReport'][_0x265a('0x2d')],function(_0xab37e4){return{'name':_0xab37e4['fieldName'],'type':_0xab37e4['type']['key']};});_0x5dbce7['model']=_[_0x265a('0x2c')](_0x1c586b,'name');_0x5dbce7['query']=_[_0x265a('0x2e')](_0x27d3f4[_0x265a('0x2f')]);_0x5dbce7[_0x265a('0x30')]=_[_0x265a('0x31')](_0x5dbce7['model'],_0x5dbce7[_0x265a('0x2f')]);_0x2dbacd[_0x265a('0x32')]=_[_0x265a('0x31')](_0x5dbce7['model'],qs[_0x265a('0x33')](_0x27d3f4[_0x265a('0x2f')][_0x265a('0x33')]));_0x2dbacd[_0x265a('0x32')]=_0x2dbacd[_0x265a('0x32')][_0x265a('0x34')]?_0x2dbacd[_0x265a('0x32')]:_0x5dbce7[_0x265a('0x35')];if(!_0x27d3f4[_0x265a('0x2f')][_0x265a('0x36')](_0x265a('0x37'))){_0x2dbacd[_0x265a('0x20')]=qs[_0x265a('0x20')](_0x27d3f4['query'][_0x265a('0x20')]);_0x2dbacd[_0x265a('0x1f')]=qs[_0x265a('0x1f')](_0x27d3f4[_0x265a('0x2f')][_0x265a('0x1f')]);}_0x2dbacd[_0x265a('0x38')]=qs[_0x265a('0x39')](_0x27d3f4[_0x265a('0x2f')][_0x265a('0x39')]);_0x2dbacd['where']=qs[_0x265a('0x30')](_['pick'](_0x27d3f4[_0x265a('0x2f')],_0x5dbce7['filters']),_0x1c586b);if(_0x27d3f4[_0x265a('0x2f')][_0x265a('0x3a')]){_0x2dbacd[_0x265a('0x3b')]=_[_0x265a('0x3c')](_0x2dbacd['where'],{'$or':_[_0x265a('0x2c')](_0x1c586b,function(_0x317be6){if(_0x317be6[_0x265a('0x3d')]!==_0x265a('0x3e')){var _0x579cc8={};_0x579cc8[_0x317be6[_0x265a('0x29')]]={'$like':'%'+_0x27d3f4[_0x265a('0x2f')][_0x265a('0x3a')]+'%'};return _0x579cc8;}})});}_0x2dbacd=_[_0x265a('0x3c')]({},_0x2dbacd,_0x27d3f4[_0x265a('0x3f')]);var _0x16a6af={'where':_0x2dbacd[_0x265a('0x3b')]};return db[_0x265a('0x40')]['count'](_0x16a6af)['then'](function(_0x47cedf){_0x154767[_0x265a('0x1e')]=_0x47cedf;if(_0x27d3f4[_0x265a('0x2f')][_0x265a('0x41')]){_0x2dbacd[_0x265a('0x42')]=[{'all':!![]}];}return db[_0x265a('0x40')][_0x265a('0x43')](_0x2dbacd);})[_0x265a('0x25')](function(_0x52bfc3){_0x154767[_0x265a('0x44')]=_0x52bfc3;return _0x154767;})[_0x265a('0x25')](respondWithFilteredResult(_0x141c4b,_0x2dbacd))['catch'](handleError(_0x141c4b,null));};exports[_0x265a('0x45')]=function(_0x1151a9,_0x16287c){var _0x1ea1e9={'raw':!![],'where':{'id':_0x1151a9[_0x265a('0x46')]['id']}},_0x3ee426={};_0x3ee426[_0x265a('0x35')]=_[_0x265a('0x2e')](db[_0x265a('0x40')][_0x265a('0x2d')]);_0x3ee426[_0x265a('0x2f')]=_['keys'](_0x1151a9['query']);_0x3ee426[_0x265a('0x30')]=_[_0x265a('0x31')](_0x3ee426['model'],_0x3ee426[_0x265a('0x2f')]);_0x1ea1e9[_0x265a('0x32')]=_[_0x265a('0x31')](_0x3ee426[_0x265a('0x35')],qs[_0x265a('0x33')](_0x1151a9[_0x265a('0x2f')][_0x265a('0x33')]));_0x1ea1e9[_0x265a('0x32')]=_0x1ea1e9[_0x265a('0x32')][_0x265a('0x34')]?_0x1ea1e9[_0x265a('0x32')]:_0x3ee426[_0x265a('0x35')];if(_0x1151a9[_0x265a('0x2f')][_0x265a('0x41')]){_0x1ea1e9['include']=[{'all':!![]}];}_0x1ea1e9=_['merge']({},_0x1ea1e9,_0x1151a9[_0x265a('0x3f')]);return db[_0x265a('0x40')]['find'](_0x1ea1e9)[_0x265a('0x25')](handleEntityNotFound(_0x16287c,null))['then'](respondWithResult(_0x16287c,null))[_0x265a('0x47')](handleError(_0x16287c,null));};exports['create']=function(_0x38a35c,_0xeee06){return db['OpenchannelQueueReport'][_0x265a('0x48')](_0x38a35c[_0x265a('0x49')],{})[_0x265a('0x25')](respondWithResult(_0xeee06,0xc9))['catch'](handleError(_0xeee06,null));};exports['update']=function(_0x3d5d29,_0xf88185){if(_0x3d5d29[_0x265a('0x49')]['id']){delete _0x3d5d29[_0x265a('0x49')]['id'];}return db[_0x265a('0x40')][_0x265a('0x4a')]({'where':{'id':_0x3d5d29[_0x265a('0x46')]['id']}})[_0x265a('0x25')](handleEntityNotFound(_0xf88185,null))[_0x265a('0x25')](saveUpdates(_0x3d5d29[_0x265a('0x49')],null))[_0x265a('0x25')](respondWithResult(_0xf88185,null))[_0x265a('0x47')](handleError(_0xf88185,null));};exports['destroy']=function(_0x4a4cf0,_0x14abc3){return db['OpenchannelQueueReport'][_0x265a('0x4a')]({'where':{'id':_0x4a4cf0[_0x265a('0x46')]['id']}})['then'](handleEntityNotFound(_0x14abc3,null))[_0x265a('0x25')](removeEntity(_0x14abc3,null))[_0x265a('0x47')](handleError(_0x14abc3,null));};exports[_0x265a('0x4b')]=function(_0x2d7104,_0x435139){return db['OpenchannelQueueReport'][_0x265a('0x4b')]()[_0x265a('0x25')](respondWithResult(_0x435139,null))[_0x265a('0x47')](handleError(_0x435139,null));}; \ No newline at end of file +var _0xcc91=['pick','filter','type','VIRTUAL','merge','options','includeAll','show','params','keys','rawAttributes','intersection','include','catch','create','update','body','find','describe','eml-format','zip-dir','bluebird','path','sox','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','sendStatus','end','status','json','offset','limit','count','set','Content-Range','apply','reject','save','then','destroy','error','name','index','map','OpenchannelQueueReport','fieldName','key','model','query','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filters'];(function(_0x414f68,_0x1e92ba){var _0x2a8171=function(_0x3fccd6){while(--_0x3fccd6){_0x414f68['push'](_0x414f68['shift']());}};_0x2a8171(++_0x1e92ba);}(_0xcc91,0xa3));var _0x1cc9=function(_0x400322,_0x4353a8){_0x400322=_0x400322-0x0;var _0xfdd597=_0xcc91[_0x400322];return _0xfdd597;};'use strict';var emlformat=require(_0x1cc9('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x1cc9('0x1'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x1cc9('0x2'));var Mustache=require('mustache');var util=require('util');var path=require(_0x1cc9('0x3'));var sox=require(_0x1cc9('0x4'));var csv=require('to-csv');var ejs=require(_0x1cc9('0x5'));var fs=require('fs');var fs_extra=require(_0x1cc9('0x6'));var _=require(_0x1cc9('0x7'));var squel=require(_0x1cc9('0x8'));var crypto=require(_0x1cc9('0x9'));var jsforce=require(_0x1cc9('0xa'));var deskjs=require(_0x1cc9('0xb'));var toCsv=require(_0x1cc9('0xc'));var querystring=require(_0x1cc9('0xd'));var Papa=require('papaparse');var Redis=require(_0x1cc9('0xe'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x1cc9('0xf'));var hardwareService=require(_0x1cc9('0x10'));var logger=require(_0x1cc9('0x11'))(_0x1cc9('0x12'));var utils=require(_0x1cc9('0x13'));var config=require(_0x1cc9('0x14'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x669922,_0x48d91f){_0x48d91f=_0x48d91f||0xcc;return function(_0xebca4e){if(_0xebca4e){return _0x669922[_0x1cc9('0x15')](_0x48d91f);}return _0x669922['status'](_0x48d91f)[_0x1cc9('0x16')]();};}function respondWithResult(_0x542fd6,_0x43fd42){_0x43fd42=_0x43fd42||0xc8;return function(_0x354efa){if(_0x354efa){return _0x542fd6[_0x1cc9('0x17')](_0x43fd42)[_0x1cc9('0x18')](_0x354efa);}};}function respondWithFilteredResult(_0x4cfc72,_0x15b704){return function(_0x9a7fc3){if(_0x9a7fc3){var _0x2eeda5=typeof _0x15b704[_0x1cc9('0x19')]==='undefined'&&typeof _0x15b704[_0x1cc9('0x1a')]==='undefined';var _0x38c6f9=_0x9a7fc3[_0x1cc9('0x1b')];var _0x582018=_0x2eeda5?0x0:_0x15b704[_0x1cc9('0x19')];var _0x3240ba=_0x2eeda5?_0x9a7fc3[_0x1cc9('0x1b')]:_0x15b704[_0x1cc9('0x19')]+_0x15b704[_0x1cc9('0x1a')];var _0x2f590b;if(_0x3240ba>=_0x38c6f9){_0x3240ba=_0x38c6f9;_0x2f590b=0xc8;}else{_0x2f590b=0xce;}_0x4cfc72['status'](_0x2f590b);return _0x4cfc72[_0x1cc9('0x1c')](_0x1cc9('0x1d'),_0x582018+'-'+_0x3240ba+'/'+_0x38c6f9)['json'](_0x9a7fc3);}return null;};}function patchUpdates(_0x26944f){return function(_0x58d6e0){try{jsonpatch[_0x1cc9('0x1e')](_0x58d6e0,_0x26944f,!![]);}catch(_0x6bfd5){return BPromise[_0x1cc9('0x1f')](_0x6bfd5);}return _0x58d6e0[_0x1cc9('0x20')]();};}function saveUpdates(_0x5c4a7e,_0x43c0d1){return function(_0x32e975){if(_0x32e975){return _0x32e975['update'](_0x5c4a7e)[_0x1cc9('0x21')](function(_0x1834fb){return _0x1834fb;});}return null;};}function removeEntity(_0x36c95f,_0xce231a){return function(_0x4d9b0a){if(_0x4d9b0a){return _0x4d9b0a[_0x1cc9('0x22')]()[_0x1cc9('0x21')](function(){_0x36c95f[_0x1cc9('0x17')](0xcc)[_0x1cc9('0x16')]();});}};}function handleEntityNotFound(_0x268d7a,_0x599c54){return function(_0x2e496e){if(!_0x2e496e){_0x268d7a[_0x1cc9('0x15')](0x194);}return _0x2e496e;};}function handleError(_0x225470,_0x2ab2c7){_0x2ab2c7=_0x2ab2c7||0x1f4;return function(_0x130de8){logger[_0x1cc9('0x23')](_0x130de8['stack']);if(_0x130de8['name']){delete _0x130de8[_0x1cc9('0x24')];}_0x225470[_0x1cc9('0x17')](_0x2ab2c7)['send'](_0x130de8);};}exports[_0x1cc9('0x25')]=function(_0x3b8dde,_0xce780e){var _0x8153b3={},_0x12f19c={},_0x117ada={'count':0x0,'rows':[]};var _0x47eac4=_[_0x1cc9('0x26')](db[_0x1cc9('0x27')]['rawAttributes'],function(_0x473d4e){return{'name':_0x473d4e[_0x1cc9('0x28')],'type':_0x473d4e['type'][_0x1cc9('0x29')]};});_0x12f19c[_0x1cc9('0x2a')]=_[_0x1cc9('0x26')](_0x47eac4,_0x1cc9('0x24'));_0x12f19c[_0x1cc9('0x2b')]=_['keys'](_0x3b8dde[_0x1cc9('0x2b')]);_0x12f19c['filters']=_['intersection'](_0x12f19c['model'],_0x12f19c[_0x1cc9('0x2b')]);_0x8153b3[_0x1cc9('0x2c')]=_['intersection'](_0x12f19c[_0x1cc9('0x2a')],qs[_0x1cc9('0x2d')](_0x3b8dde[_0x1cc9('0x2b')]['fields']));_0x8153b3['attributes']=_0x8153b3[_0x1cc9('0x2c')][_0x1cc9('0x2e')]?_0x8153b3[_0x1cc9('0x2c')]:_0x12f19c[_0x1cc9('0x2a')];if(!_0x3b8dde[_0x1cc9('0x2b')][_0x1cc9('0x2f')](_0x1cc9('0x30'))){_0x8153b3[_0x1cc9('0x1a')]=qs[_0x1cc9('0x1a')](_0x3b8dde[_0x1cc9('0x2b')][_0x1cc9('0x1a')]);_0x8153b3['offset']=qs[_0x1cc9('0x19')](_0x3b8dde[_0x1cc9('0x2b')]['offset']);}_0x8153b3[_0x1cc9('0x31')]=qs[_0x1cc9('0x32')](_0x3b8dde[_0x1cc9('0x2b')][_0x1cc9('0x32')]);_0x8153b3[_0x1cc9('0x33')]=qs[_0x1cc9('0x34')](_[_0x1cc9('0x35')](_0x3b8dde['query'],_0x12f19c[_0x1cc9('0x34')]),_0x47eac4);if(_0x3b8dde[_0x1cc9('0x2b')][_0x1cc9('0x36')]){_0x8153b3[_0x1cc9('0x33')]=_['merge'](_0x8153b3[_0x1cc9('0x33')],{'$or':_['map'](_0x47eac4,function(_0x3d0e77){if(_0x3d0e77[_0x1cc9('0x37')]!==_0x1cc9('0x38')){var _0x50b33d={};_0x50b33d[_0x3d0e77[_0x1cc9('0x24')]]={'$like':'%'+_0x3b8dde[_0x1cc9('0x2b')][_0x1cc9('0x36')]+'%'};return _0x50b33d;}})});}_0x8153b3=_[_0x1cc9('0x39')]({},_0x8153b3,_0x3b8dde[_0x1cc9('0x3a')]);var _0x3505df={'where':_0x8153b3[_0x1cc9('0x33')]};return db[_0x1cc9('0x27')]['count'](_0x3505df)['then'](function(_0x179fbc){_0x117ada[_0x1cc9('0x1b')]=_0x179fbc;if(_0x3b8dde[_0x1cc9('0x2b')][_0x1cc9('0x3b')]){_0x8153b3['include']=[{'all':!![]}];}return db['OpenchannelQueueReport']['findAll'](_0x8153b3);})[_0x1cc9('0x21')](function(_0x2200cd){_0x117ada['rows']=_0x2200cd;return _0x117ada;})[_0x1cc9('0x21')](respondWithFilteredResult(_0xce780e,_0x8153b3))['catch'](handleError(_0xce780e,null));};exports[_0x1cc9('0x3c')]=function(_0x29b887,_0x37a3cf){var _0x17ecee={'raw':!![],'where':{'id':_0x29b887[_0x1cc9('0x3d')]['id']}},_0x65d434={};_0x65d434[_0x1cc9('0x2a')]=_[_0x1cc9('0x3e')](db[_0x1cc9('0x27')][_0x1cc9('0x3f')]);_0x65d434[_0x1cc9('0x2b')]=_['keys'](_0x29b887['query']);_0x65d434['filters']=_[_0x1cc9('0x40')](_0x65d434[_0x1cc9('0x2a')],_0x65d434[_0x1cc9('0x2b')]);_0x17ecee[_0x1cc9('0x2c')]=_['intersection'](_0x65d434[_0x1cc9('0x2a')],qs[_0x1cc9('0x2d')](_0x29b887[_0x1cc9('0x2b')]['fields']));_0x17ecee[_0x1cc9('0x2c')]=_0x17ecee[_0x1cc9('0x2c')]['length']?_0x17ecee[_0x1cc9('0x2c')]:_0x65d434['model'];if(_0x29b887[_0x1cc9('0x2b')][_0x1cc9('0x3b')]){_0x17ecee[_0x1cc9('0x41')]=[{'all':!![]}];}_0x17ecee=_['merge']({},_0x17ecee,_0x29b887[_0x1cc9('0x3a')]);return db['OpenchannelQueueReport']['find'](_0x17ecee)[_0x1cc9('0x21')](handleEntityNotFound(_0x37a3cf,null))[_0x1cc9('0x21')](respondWithResult(_0x37a3cf,null))[_0x1cc9('0x42')](handleError(_0x37a3cf,null));};exports[_0x1cc9('0x43')]=function(_0x46b720,_0x8067f8){return db[_0x1cc9('0x27')][_0x1cc9('0x43')](_0x46b720['body'],{})[_0x1cc9('0x21')](respondWithResult(_0x8067f8,0xc9))[_0x1cc9('0x42')](handleError(_0x8067f8,null));};exports[_0x1cc9('0x44')]=function(_0x655c6c,_0x287120){if(_0x655c6c['body']['id']){delete _0x655c6c[_0x1cc9('0x45')]['id'];}return db[_0x1cc9('0x27')]['find']({'where':{'id':_0x655c6c[_0x1cc9('0x3d')]['id']}})[_0x1cc9('0x21')](handleEntityNotFound(_0x287120,null))[_0x1cc9('0x21')](saveUpdates(_0x655c6c['body'],null))[_0x1cc9('0x21')](respondWithResult(_0x287120,null))[_0x1cc9('0x42')](handleError(_0x287120,null));};exports[_0x1cc9('0x22')]=function(_0x3ff722,_0x2dedcb){return db[_0x1cc9('0x27')][_0x1cc9('0x46')]({'where':{'id':_0x3ff722['params']['id']}})[_0x1cc9('0x21')](handleEntityNotFound(_0x2dedcb,null))['then'](removeEntity(_0x2dedcb,null))[_0x1cc9('0x42')](handleError(_0x2dedcb,null));};exports[_0x1cc9('0x47')]=function(_0x348297,_0x281898){return db[_0x1cc9('0x27')][_0x1cc9('0x47')]()[_0x1cc9('0x21')](respondWithResult(_0x281898,null))[_0x1cc9('0x42')](handleError(_0x281898,null));}; \ No newline at end of file diff --git a/server/api/openchannelQueueReport/openchannelQueueReport.model.js b/server/api/openchannelQueueReport/openchannelQueueReport.model.js index c8d0ad1..233c944 100644 --- a/server/api/openchannelQueueReport/openchannelQueueReport.model.js +++ b/server/api/openchannelQueueReport/openchannelQueueReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7a54=['report_openchannel_queue','uniqueid','lodash','util','../../config/logger','moment','bluebird','path','rimraf','../../config/environment','./openchannelQueueReport.attributes','exports','OpenchannelQueueReport'];(function(_0x1ac5a3,_0x35f65f){var _0x59e3fc=function(_0x5291b8){while(--_0x5291b8){_0x1ac5a3['push'](_0x1ac5a3['shift']());}};_0x59e3fc(++_0x35f65f);}(_0x7a54,0x106));var _0x47a5=function(_0x255a0b,_0x5023a7){_0x255a0b=_0x255a0b-0x0;var _0x4f83d2=_0x7a54[_0x255a0b];return _0x4f83d2;};'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':'uniqueid','fields':[_0x47a5('0xc')]}],'timestamps':!![]});}; \ No newline at end of file +var _0x326f=['api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./openchannelQueueReport.attributes','exports','define','OpenchannelQueueReport','report_openchannel_queue','uniqueid','lodash'];(function(_0x58ab8a,_0x55401c){var _0x30385d=function(_0x3c9fca){while(--_0x3c9fca){_0x58ab8a['push'](_0x58ab8a['shift']());}};_0x30385d(++_0x55401c);}(_0x326f,0xd1));var _0xf326=function(_0x16636c,_0x13466c){_0x16636c=_0x16636c-0x0;var _0x3eedf1=_0x326f[_0x16636c];return _0x3eedf1;};'use strict';var _=require(_0xf326('0x0'));var util=require('util');var logger=require('../../config/logger')(_0xf326('0x1'));var moment=require(_0xf326('0x2'));var BPromise=require(_0xf326('0x3'));var rp=require(_0xf326('0x4'));var fs=require('fs');var path=require(_0xf326('0x5'));var rimraf=require(_0xf326('0x6'));var config=require(_0xf326('0x7'));var attributes=require(_0xf326('0x8'));module[_0xf326('0x9')]=function(_0x3ace29,_0x4c2249){return _0x3ace29[_0xf326('0xa')](_0xf326('0xb'),attributes,{'tableName':_0xf326('0xc'),'paranoid':![],'indexes':[{'name':_0xf326('0xd'),'fields':['uniqueid']}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/openchannelQueueReport/openchannelQueueReport.rpc.js b/server/api/openchannelQueueReport/openchannelQueueReport.rpc.js index 97457b6..c9d5197 100644 --- a/server/api/openchannelQueueReport/openchannelQueueReport.rpc.js +++ b/server/api/openchannelQueueReport/openchannelQueueReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xcf66=['jayson/promise','client','http','request','then','request\x20sent','OpenchannelQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','OpenchannelQueueReport,\x20%s,\x20%s','message','result','catch','CreateOpenchannelQueueReport','OpenchannelQueueReport','body','options','raw','info','debug','UpdateOpenchannelQueueReport','update','attributes','lodash','util','moment','randomstring','ioredis','../../config/logger','rpc'];(function(_0x13b02f,_0x462a53){var _0x12e9a6=function(_0x187d57){while(--_0x187d57){_0x13b02f['push'](_0x13b02f['shift']());}};_0x12e9a6(++_0x462a53);}(_0xcf66,0x71));var _0x6cf6=function(_0x4ba252,_0xedfe6c){_0x4ba252=_0x4ba252-0x0;var _0x10a08d=_0xcf66[_0x4ba252];return _0x10a08d;};'use strict';var _=require(_0x6cf6('0x0'));var util=require(_0x6cf6('0x1'));var moment=require(_0x6cf6('0x2'));var BPromise=require('bluebird');var rs=require(_0x6cf6('0x3'));var fs=require('fs');var Redis=require(_0x6cf6('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x6cf6('0x5'))(_0x6cf6('0x6'));var config=require('../../config/environment');var jayson=require(_0x6cf6('0x7'));var client=jayson[_0x6cf6('0x8')][_0x6cf6('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x5eb082,_0x94c6a9,_0x308d0d){return new BPromise(function(_0x36b892,_0x748c93){return client[_0x6cf6('0xa')](_0x5eb082,_0x308d0d)[_0x6cf6('0xb')](function(_0x5b3827){logger['info']('OpenchannelQueueReport,\x20%s,\x20%s',_0x94c6a9,_0x6cf6('0xc'));logger['debug'](_0x6cf6('0xd'),_0x94c6a9,_0x6cf6('0xc'),JSON[_0x6cf6('0xe')](_0x5b3827));if(_0x5b3827[_0x6cf6('0xf')]){if(_0x5b3827['error']['code']===0x1f4){logger['error'](_0x6cf6('0x10'),_0x94c6a9,_0x5b3827[_0x6cf6('0xf')][_0x6cf6('0x11')]);return _0x748c93(_0x5b3827[_0x6cf6('0xf')][_0x6cf6('0x11')]);}logger[_0x6cf6('0xf')]('OpenchannelQueueReport,\x20%s,\x20%s',_0x94c6a9,_0x5b3827[_0x6cf6('0xf')]['message']);return _0x36b892(_0x5b3827[_0x6cf6('0xf')][_0x6cf6('0x11')]);}else{logger['info'](_0x6cf6('0x10'),_0x94c6a9,_0x6cf6('0xc'));_0x36b892(_0x5b3827[_0x6cf6('0x12')][_0x6cf6('0x11')]);}})[_0x6cf6('0x13')](function(_0x2bdb12){logger[_0x6cf6('0xf')](_0x6cf6('0x10'),_0x94c6a9,_0x2bdb12);_0x748c93(_0x2bdb12);});});}exports[_0x6cf6('0x14')]=function(_0x2ca2b1){var _0x5e8b11=this;return new Promise(function(_0x11d994,_0x22915c){return db[_0x6cf6('0x15')]['create'](_0x2ca2b1[_0x6cf6('0x16')],{'raw':_0x2ca2b1[_0x6cf6('0x17')]?_0x2ca2b1[_0x6cf6('0x17')][_0x6cf6('0x18')]===undefined?!![]:![]:!![]})[_0x6cf6('0xb')](function(_0x21e903){logger[_0x6cf6('0x19')]('CreateOpenchannelQueueReport',_0x2ca2b1);logger[_0x6cf6('0x1a')](_0x6cf6('0x14'),_0x2ca2b1,JSON[_0x6cf6('0xe')](_0x21e903));_0x11d994(_0x21e903);})[_0x6cf6('0x13')](function(_0x5cba3a){logger[_0x6cf6('0xf')](_0x6cf6('0x14'),_0x5cba3a[_0x6cf6('0x11')],_0x2ca2b1);_0x22915c(_0x5e8b11['error'](0x1f4,_0x5cba3a['message']));});});};exports[_0x6cf6('0x1b')]=function(_0x59f838){var _0x45ce6e=this;return new Promise(function(_0x18c8cd,_0x14ae3e){return db[_0x6cf6('0x15')][_0x6cf6('0x1c')](_0x59f838[_0x6cf6('0x16')],{'raw':_0x59f838[_0x6cf6('0x17')]?_0x59f838['options'][_0x6cf6('0x18')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x59f838[_0x6cf6('0x17')]?_0x59f838[_0x6cf6('0x17')]['where']||null:null,'attributes':_0x59f838[_0x6cf6('0x17')]?_0x59f838[_0x6cf6('0x17')][_0x6cf6('0x1d')]||null:null,'limit':_0x59f838[_0x6cf6('0x17')]?_0x59f838['options']['limit']||null:null})[_0x6cf6('0xb')](function(_0x4521af){logger[_0x6cf6('0x19')](_0x6cf6('0x1b'),_0x59f838);logger['debug'](_0x6cf6('0x1b'),_0x59f838,JSON['stringify'](_0x4521af));_0x18c8cd(_0x4521af);})['catch'](function(_0x519a70){logger[_0x6cf6('0xf')](_0x6cf6('0x1b'),_0x519a70[_0x6cf6('0x11')],_0x59f838);_0x14ae3e(_0x45ce6e[_0x6cf6('0xf')](0x1f4,_0x519a70[_0x6cf6('0x11')]));});});}; \ No newline at end of file +var _0x94df=['moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','OpenchannelQueueReport,\x20%s,\x20%s','request\x20sent','OpenchannelQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','CreateOpenchannelQueueReport','OpenchannelQueueReport','body','options','raw','update','where','UpdateOpenchannelQueueReport','debug','lodash','util'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x94df,0xa3));var _0xf94d=function(_0x3e3a7e,_0x13a5b8){_0x3e3a7e=_0x3e3a7e-0x0;var _0x44489f=_0x94df[_0x3e3a7e];return _0x44489f;};'use strict';var _=require(_0xf94d('0x0'));var util=require(_0xf94d('0x1'));var moment=require(_0xf94d('0x2'));var BPromise=require(_0xf94d('0x3'));var rs=require(_0xf94d('0x4'));var fs=require('fs');var Redis=require(_0xf94d('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xf94d('0x6'));var logger=require(_0xf94d('0x7'))(_0xf94d('0x8'));var config=require(_0xf94d('0x9'));var jayson=require(_0xf94d('0xa'));var client=jayson[_0xf94d('0xb')][_0xf94d('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x18a11a,_0x1ebc19,_0xf285b5){return new BPromise(function(_0x1832e9,_0x504670){return client[_0xf94d('0xd')](_0x18a11a,_0xf285b5)[_0xf94d('0xe')](function(_0x145f5b){logger[_0xf94d('0xf')](_0xf94d('0x10'),_0x1ebc19,_0xf94d('0x11'));logger['debug'](_0xf94d('0x12'),_0x1ebc19,_0xf94d('0x11'),JSON[_0xf94d('0x13')](_0x145f5b));if(_0x145f5b[_0xf94d('0x14')]){if(_0x145f5b[_0xf94d('0x14')]['code']===0x1f4){logger['error'](_0xf94d('0x10'),_0x1ebc19,_0x145f5b[_0xf94d('0x14')][_0xf94d('0x15')]);return _0x504670(_0x145f5b[_0xf94d('0x14')][_0xf94d('0x15')]);}logger[_0xf94d('0x14')]('OpenchannelQueueReport,\x20%s,\x20%s',_0x1ebc19,_0x145f5b[_0xf94d('0x14')][_0xf94d('0x15')]);return _0x1832e9(_0x145f5b[_0xf94d('0x14')][_0xf94d('0x15')]);}else{logger[_0xf94d('0xf')](_0xf94d('0x10'),_0x1ebc19,_0xf94d('0x11'));_0x1832e9(_0x145f5b[_0xf94d('0x16')]['message']);}})[_0xf94d('0x17')](function(_0x5cd967){logger[_0xf94d('0x14')]('OpenchannelQueueReport,\x20%s,\x20%s',_0x1ebc19,_0x5cd967);_0x504670(_0x5cd967);});});}exports[_0xf94d('0x18')]=function(_0x559e0c){var _0x30d231=this;return new Promise(function(_0x3bf001,_0x510eef){return db[_0xf94d('0x19')]['create'](_0x559e0c[_0xf94d('0x1a')],{'raw':_0x559e0c['options']?_0x559e0c[_0xf94d('0x1b')][_0xf94d('0x1c')]===undefined?!![]:![]:!![]})[_0xf94d('0xe')](function(_0x2ede5b){logger['info'](_0xf94d('0x18'),_0x559e0c);logger['debug'](_0xf94d('0x18'),_0x559e0c,JSON[_0xf94d('0x13')](_0x2ede5b));_0x3bf001(_0x2ede5b);})[_0xf94d('0x17')](function(_0x56e5f5){logger[_0xf94d('0x14')](_0xf94d('0x18'),_0x56e5f5[_0xf94d('0x15')],_0x559e0c);_0x510eef(_0x30d231[_0xf94d('0x14')](0x1f4,_0x56e5f5[_0xf94d('0x15')]));});});};exports['UpdateOpenchannelQueueReport']=function(_0x301d2e){var _0x51f7f8=this;return new Promise(function(_0x4701e1,_0x2564a3){return db[_0xf94d('0x19')][_0xf94d('0x1d')](_0x301d2e[_0xf94d('0x1a')],{'raw':_0x301d2e[_0xf94d('0x1b')]?_0x301d2e[_0xf94d('0x1b')][_0xf94d('0x1c')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x301d2e[_0xf94d('0x1b')]?_0x301d2e[_0xf94d('0x1b')][_0xf94d('0x1e')]||null:null,'attributes':_0x301d2e[_0xf94d('0x1b')]?_0x301d2e[_0xf94d('0x1b')]['attributes']||null:null,'limit':_0x301d2e['options']?_0x301d2e['options']['limit']||null:null})[_0xf94d('0xe')](function(_0x1e8242){logger['info'](_0xf94d('0x1f'),_0x301d2e);logger[_0xf94d('0x20')](_0xf94d('0x1f'),_0x301d2e,JSON['stringify'](_0x1e8242));_0x4701e1(_0x1e8242);})[_0xf94d('0x17')](function(_0x5ab0c8){logger[_0xf94d('0x14')](_0xf94d('0x1f'),_0x5ab0c8['message'],_0x301d2e);_0x2564a3(_0x51f7f8[_0xf94d('0x14')](0x1f4,_0x5ab0c8['message']));});});}; \ No newline at end of file diff --git a/server/api/openchannelTransferReport/index.js b/server/api/openchannelTransferReport/index.js index 75c7ac2..21c1030 100644 --- a/server/api/openchannelTransferReport/index.js +++ b/server/api/openchannelTransferReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe636=['index','describe','/:id','show','post','isAuthenticated','put','destroy','exports','multer','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','get'];(function(_0x2e641b,_0x1b03ae){var _0x3f15a9=function(_0x2ba7db){while(--_0x2ba7db){_0x2e641b['push'](_0x2e641b['shift']());}};_0x3f15a9(++_0x1b03ae);}(_0xe636,0x6f));var _0x6e63=function(_0xdbe2de,_0x3bdc5a){_0xdbe2de=_0xdbe2de-0x0;var _0x2facd7=_0xe636[_0xdbe2de];return _0x2facd7;};'use strict';var multer=require(_0x6e63('0x0'));var util=require('util');var path=require(_0x6e63('0x1'));var timeout=require(_0x6e63('0x2'));var express=require(_0x6e63('0x3'));var router=express[_0x6e63('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x6e63('0x5'));var interaction=require(_0x6e63('0x6'));var config=require('../../config/environment');var controller=require('./openchannelTransferReport.controller');router[_0x6e63('0x7')]('/',auth['isAuthenticated'](),controller[_0x6e63('0x8')]);router[_0x6e63('0x7')]('/describe',auth['isAuthenticated'](),controller[_0x6e63('0x9')]);router[_0x6e63('0x7')](_0x6e63('0xa'),auth['isAuthenticated'](),controller[_0x6e63('0xb')]);router[_0x6e63('0xc')]('/',auth[_0x6e63('0xd')](),controller['create']);router[_0x6e63('0xe')](_0x6e63('0xa'),auth['isAuthenticated'](),controller['update']);router['delete'](_0x6e63('0xa'),auth['isAuthenticated'](),controller[_0x6e63('0xf')]);module[_0x6e63('0x10')]=router; \ No newline at end of file +var _0x07cf=['post','create','put','update','delete','exports','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','isAuthenticated','index','get','/describe','describe','/:id','show'];(function(_0x1909f1,_0x3f78fd){var _0x591620=function(_0x565b47){while(--_0x565b47){_0x1909f1['push'](_0x1909f1['shift']());}};_0x591620(++_0x3f78fd);}(_0x07cf,0x166));var _0xf07c=function(_0xc8a11,_0x347a33){_0xc8a11=_0xc8a11-0x0;var _0x55a500=_0x07cf[_0xc8a11];return _0x55a500;};'use strict';var multer=require(_0xf07c('0x0'));var util=require(_0xf07c('0x1'));var path=require(_0xf07c('0x2'));var timeout=require(_0xf07c('0x3'));var express=require('express');var router=express[_0xf07c('0x4')]();var fs_extra=require(_0xf07c('0x5'));var auth=require(_0xf07c('0x6'));var interaction=require(_0xf07c('0x7'));var config=require(_0xf07c('0x8'));var controller=require('./openchannelTransferReport.controller');router['get']('/',auth[_0xf07c('0x9')](),controller[_0xf07c('0xa')]);router[_0xf07c('0xb')](_0xf07c('0xc'),auth['isAuthenticated'](),controller[_0xf07c('0xd')]);router[_0xf07c('0xb')](_0xf07c('0xe'),auth['isAuthenticated'](),controller[_0xf07c('0xf')]);router[_0xf07c('0x10')]('/',auth[_0xf07c('0x9')](),controller[_0xf07c('0x11')]);router[_0xf07c('0x12')]('/:id',auth['isAuthenticated'](),controller[_0xf07c('0x13')]);router[_0xf07c('0x14')](_0xf07c('0xe'),auth[_0xf07c('0x9')](),controller['destroy']);module[_0xf07c('0x15')]=router; \ No newline at end of file diff --git a/server/api/openchannelTransferReport/openchannelTransferReport.attributes.js b/server/api/openchannelTransferReport/openchannelTransferReport.attributes.js index 880af8e..f4aaec6 100644 --- a/server/api/openchannelTransferReport/openchannelTransferReport.attributes.js +++ b/server/api/openchannelTransferReport/openchannelTransferReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x54ef=['agent','queue','DATE','NOW','moment','sequelize','exports','ENUM','account'];(function(_0x355e8e,_0x4313f0){var _0x52cb43=function(_0x2feb45){while(--_0x2feb45){_0x355e8e['push'](_0x355e8e['shift']());}};_0x52cb43(++_0x4313f0);}(_0x54ef,0x112));var _0xf54e=function(_0x3ebaf2,_0x4df411){_0x3ebaf2=_0x3ebaf2-0x0;var _0x407078=_0x54ef[_0x3ebaf2];return _0x407078;};'use strict';var moment=require(_0xf54e('0x0'));var Sequelize=require(_0xf54e('0x1'));module[_0xf54e('0x2')]={'uniqueid':{'type':Sequelize['STRING'],'allowNull':![]},'type':{'type':Sequelize[_0xf54e('0x3')](_0xf54e('0x4'),_0xf54e('0x5'),_0xf54e('0x6')),'allowNull':![],'defaultValue':_0xf54e('0x6')},'transferredAt':{'type':Sequelize[_0xf54e('0x7')],'allowNull':![],'defaultValue':Sequelize[_0xf54e('0x8')]}}; \ No newline at end of file +var _0xb43b=['DATE','NOW','moment','sequelize','STRING','ENUM','account','queue'];(function(_0x22c684,_0x753309){var _0x39fcbb=function(_0x38b631){while(--_0x38b631){_0x22c684['push'](_0x22c684['shift']());}};_0x39fcbb(++_0x753309);}(_0xb43b,0x1b2));var _0xbb43=function(_0x9e9afe,_0xcee442){_0x9e9afe=_0x9e9afe-0x0;var _0x4b7358=_0xb43b[_0x9e9afe];return _0x4b7358;};'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 diff --git a/server/api/openchannelTransferReport/openchannelTransferReport.controller.js b/server/api/openchannelTransferReport/openchannelTransferReport.controller.js index 480cd86..c0059a8 100644 --- a/server/api/openchannelTransferReport/openchannelTransferReport.controller.js +++ b/server/api/openchannelTransferReport/openchannelTransferReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2e9a=['VIRTUAL','options','include','rows','show','params','fields','includeAll','find','catch','create','body','destroy','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','lodash','crypto','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../config/license/util','sendStatus','status','json','limit','undefined','count','offset','set','apply','reject','save','update','then','end','error','stack','name','send','index','map','OpenchannelTransferReport','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','length','nolimit','order','sort','where','pick','filter','merge'];(function(_0x19950b,_0x53d0d7){var _0x3c6b41=function(_0x3924ad){while(--_0x3924ad){_0x19950b['push'](_0x19950b['shift']());}};_0x3c6b41(++_0x53d0d7);}(_0x2e9a,0x18f));var _0xa2e9=function(_0x4a43d8,_0x11077e){_0x4a43d8=_0x4a43d8-0x0;var _0x20c1ac=_0x2e9a[_0x4a43d8];return _0x20c1ac;};'use strict';var emlformat=require(_0xa2e9('0x0'));var rimraf=require(_0xa2e9('0x1'));var zipdir=require(_0xa2e9('0x2'));var jsonpatch=require(_0xa2e9('0x3'));var rp=require(_0xa2e9('0x4'));var moment=require(_0xa2e9('0x5'));var BPromise=require(_0xa2e9('0x6'));var Mustache=require(_0xa2e9('0x7'));var util=require('util');var path=require(_0xa2e9('0x8'));var sox=require(_0xa2e9('0x9'));var csv=require(_0xa2e9('0xa'));var ejs=require(_0xa2e9('0xb'));var fs=require('fs');var fs_extra=require(_0xa2e9('0xc'));var _=require(_0xa2e9('0xd'));var squel=require('squel');var crypto=require(_0xa2e9('0xe'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0xa2e9('0xa'));var querystring=require(_0xa2e9('0xf'));var Papa=require(_0xa2e9('0x10'));var Redis=require(_0xa2e9('0x11'));var authService=require(_0xa2e9('0x12'));var qs=require(_0xa2e9('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xa2e9('0x14'));var logger=require('../../config/logger')(_0xa2e9('0x15'));var utils=require(_0xa2e9('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0xa2e9('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0xb5d987,_0x4aad96){_0x4aad96=_0x4aad96||0xcc;return function(_0x326f0d){if(_0x326f0d){return _0xb5d987[_0xa2e9('0x18')](_0x4aad96);}return _0xb5d987['status'](_0x4aad96)['end']();};}function respondWithResult(_0x2f2c4e,_0x451cea){_0x451cea=_0x451cea||0xc8;return function(_0x23f23a){if(_0x23f23a){return _0x2f2c4e[_0xa2e9('0x19')](_0x451cea)[_0xa2e9('0x1a')](_0x23f23a);}};}function respondWithFilteredResult(_0x1fbb0a,_0x30d778){return function(_0x5950a3){if(_0x5950a3){var _0x16426d=typeof _0x30d778['offset']==='undefined'&&typeof _0x30d778[_0xa2e9('0x1b')]===_0xa2e9('0x1c');var _0x502e5b=_0x5950a3[_0xa2e9('0x1d')];var _0x29ec8a=_0x16426d?0x0:_0x30d778['offset'];var _0x38574d=_0x16426d?_0x5950a3[_0xa2e9('0x1d')]:_0x30d778[_0xa2e9('0x1e')]+_0x30d778[_0xa2e9('0x1b')];var _0x4d3371;if(_0x38574d>=_0x502e5b){_0x38574d=_0x502e5b;_0x4d3371=0xc8;}else{_0x4d3371=0xce;}_0x1fbb0a[_0xa2e9('0x19')](_0x4d3371);return _0x1fbb0a[_0xa2e9('0x1f')]('Content-Range',_0x29ec8a+'-'+_0x38574d+'/'+_0x502e5b)[_0xa2e9('0x1a')](_0x5950a3);}return null;};}function patchUpdates(_0x4e23b3){return function(_0x438c15){try{jsonpatch[_0xa2e9('0x20')](_0x438c15,_0x4e23b3,!![]);}catch(_0xd42ede){return BPromise[_0xa2e9('0x21')](_0xd42ede);}return _0x438c15[_0xa2e9('0x22')]();};}function saveUpdates(_0x277b5a,_0x27e487){return function(_0x11d6e8){if(_0x11d6e8){return _0x11d6e8[_0xa2e9('0x23')](_0x277b5a)['then'](function(_0x11beb0){return _0x11beb0;});}return null;};}function removeEntity(_0x368e9b,_0x52b4bc){return function(_0x3aa6ae){if(_0x3aa6ae){return _0x3aa6ae['destroy']()[_0xa2e9('0x24')](function(){_0x368e9b['status'](0xcc)[_0xa2e9('0x25')]();});}};}function handleEntityNotFound(_0x112a52,_0x1cb299){return function(_0x14e00a){if(!_0x14e00a){_0x112a52[_0xa2e9('0x18')](0x194);}return _0x14e00a;};}function handleError(_0x23ed32,_0x5789f4){_0x5789f4=_0x5789f4||0x1f4;return function(_0x5ed9bc){logger[_0xa2e9('0x26')](_0x5ed9bc[_0xa2e9('0x27')]);if(_0x5ed9bc[_0xa2e9('0x28')]){delete _0x5ed9bc[_0xa2e9('0x28')];}_0x23ed32['status'](_0x5789f4)[_0xa2e9('0x29')](_0x5ed9bc);};}exports[_0xa2e9('0x2a')]=function(_0xc701c8,_0x45d93e){var _0x3f2acd={},_0x31d8a4={},_0x29bb57={'count':0x0,'rows':[]};var _0x59224c=_[_0xa2e9('0x2b')](db[_0xa2e9('0x2c')][_0xa2e9('0x2d')],function(_0xe3c454){return{'name':_0xe3c454[_0xa2e9('0x2e')],'type':_0xe3c454[_0xa2e9('0x2f')][_0xa2e9('0x30')]};});_0x31d8a4[_0xa2e9('0x31')]=_[_0xa2e9('0x2b')](_0x59224c,'name');_0x31d8a4[_0xa2e9('0x32')]=_[_0xa2e9('0x33')](_0xc701c8[_0xa2e9('0x32')]);_0x31d8a4[_0xa2e9('0x34')]=_[_0xa2e9('0x35')](_0x31d8a4[_0xa2e9('0x31')],_0x31d8a4[_0xa2e9('0x32')]);_0x3f2acd[_0xa2e9('0x36')]=_['intersection'](_0x31d8a4[_0xa2e9('0x31')],qs['fields'](_0xc701c8[_0xa2e9('0x32')]['fields']));_0x3f2acd[_0xa2e9('0x36')]=_0x3f2acd[_0xa2e9('0x36')][_0xa2e9('0x37')]?_0x3f2acd['attributes']:_0x31d8a4[_0xa2e9('0x31')];if(!_0xc701c8[_0xa2e9('0x32')]['hasOwnProperty'](_0xa2e9('0x38'))){_0x3f2acd['limit']=qs[_0xa2e9('0x1b')](_0xc701c8[_0xa2e9('0x32')]['limit']);_0x3f2acd[_0xa2e9('0x1e')]=qs[_0xa2e9('0x1e')](_0xc701c8[_0xa2e9('0x32')]['offset']);}_0x3f2acd[_0xa2e9('0x39')]=qs[_0xa2e9('0x3a')](_0xc701c8[_0xa2e9('0x32')][_0xa2e9('0x3a')]);_0x3f2acd[_0xa2e9('0x3b')]=qs['filters'](_[_0xa2e9('0x3c')](_0xc701c8[_0xa2e9('0x32')],_0x31d8a4[_0xa2e9('0x34')]),_0x59224c);if(_0xc701c8[_0xa2e9('0x32')][_0xa2e9('0x3d')]){_0x3f2acd[_0xa2e9('0x3b')]=_[_0xa2e9('0x3e')](_0x3f2acd['where'],{'$or':_['map'](_0x59224c,function(_0x1c0f07){if(_0x1c0f07[_0xa2e9('0x2f')]!==_0xa2e9('0x3f')){var _0x59c968={};_0x59c968[_0x1c0f07[_0xa2e9('0x28')]]={'$like':'%'+_0xc701c8['query'][_0xa2e9('0x3d')]+'%'};return _0x59c968;}})});}_0x3f2acd=_[_0xa2e9('0x3e')]({},_0x3f2acd,_0xc701c8[_0xa2e9('0x40')]);var _0x517086={'where':_0x3f2acd['where']};return db[_0xa2e9('0x2c')][_0xa2e9('0x1d')](_0x517086)[_0xa2e9('0x24')](function(_0x4cde21){_0x29bb57[_0xa2e9('0x1d')]=_0x4cde21;if(_0xc701c8[_0xa2e9('0x32')]['includeAll']){_0x3f2acd[_0xa2e9('0x41')]=[{'all':!![]}];}return db[_0xa2e9('0x2c')]['findAll'](_0x3f2acd);})[_0xa2e9('0x24')](function(_0x10482e){_0x29bb57[_0xa2e9('0x42')]=_0x10482e;return _0x29bb57;})['then'](respondWithFilteredResult(_0x45d93e,_0x3f2acd))['catch'](handleError(_0x45d93e,null));};exports[_0xa2e9('0x43')]=function(_0x29664b,_0x4034be){var _0x18aa3f={'raw':!![],'where':{'id':_0x29664b[_0xa2e9('0x44')]['id']}},_0x37ce60={};_0x37ce60[_0xa2e9('0x31')]=_[_0xa2e9('0x33')](db[_0xa2e9('0x2c')][_0xa2e9('0x2d')]);_0x37ce60[_0xa2e9('0x32')]=_[_0xa2e9('0x33')](_0x29664b[_0xa2e9('0x32')]);_0x37ce60['filters']=_['intersection'](_0x37ce60[_0xa2e9('0x31')],_0x37ce60[_0xa2e9('0x32')]);_0x18aa3f[_0xa2e9('0x36')]=_[_0xa2e9('0x35')](_0x37ce60[_0xa2e9('0x31')],qs[_0xa2e9('0x45')](_0x29664b[_0xa2e9('0x32')]['fields']));_0x18aa3f[_0xa2e9('0x36')]=_0x18aa3f[_0xa2e9('0x36')][_0xa2e9('0x37')]?_0x18aa3f[_0xa2e9('0x36')]:_0x37ce60[_0xa2e9('0x31')];if(_0x29664b[_0xa2e9('0x32')][_0xa2e9('0x46')]){_0x18aa3f['include']=[{'all':!![]}];}_0x18aa3f=_[_0xa2e9('0x3e')]({},_0x18aa3f,_0x29664b[_0xa2e9('0x40')]);return db[_0xa2e9('0x2c')][_0xa2e9('0x47')](_0x18aa3f)['then'](handleEntityNotFound(_0x4034be,null))['then'](respondWithResult(_0x4034be,null))[_0xa2e9('0x48')](handleError(_0x4034be,null));};exports[_0xa2e9('0x49')]=function(_0x595843,_0x2b1bad){return db[_0xa2e9('0x2c')][_0xa2e9('0x49')](_0x595843[_0xa2e9('0x4a')],{})[_0xa2e9('0x24')](respondWithResult(_0x2b1bad,0xc9))[_0xa2e9('0x48')](handleError(_0x2b1bad,null));};exports[_0xa2e9('0x23')]=function(_0x3a2d3a,_0x45c9d2){if(_0x3a2d3a[_0xa2e9('0x4a')]['id']){delete _0x3a2d3a[_0xa2e9('0x4a')]['id'];}return db[_0xa2e9('0x2c')]['find']({'where':{'id':_0x3a2d3a[_0xa2e9('0x44')]['id']}})[_0xa2e9('0x24')](handleEntityNotFound(_0x45c9d2,null))[_0xa2e9('0x24')](saveUpdates(_0x3a2d3a[_0xa2e9('0x4a')],null))[_0xa2e9('0x24')](respondWithResult(_0x45c9d2,null))['catch'](handleError(_0x45c9d2,null));};exports[_0xa2e9('0x4b')]=function(_0x492ec8,_0x4d0efd){return db[_0xa2e9('0x2c')][_0xa2e9('0x47')]({'where':{'id':_0x492ec8[_0xa2e9('0x44')]['id']}})[_0xa2e9('0x24')](handleEntityNotFound(_0x4d0efd,null))[_0xa2e9('0x24')](removeEntity(_0x4d0efd,null))[_0xa2e9('0x48')](handleError(_0x4d0efd,null));};exports[_0xa2e9('0x4c')]=function(_0x2669eb,_0x4ac334){return db[_0xa2e9('0x2c')][_0xa2e9('0x4c')]()[_0xa2e9('0x24')](respondWithResult(_0x4ac334,null))[_0xa2e9('0x48')](handleError(_0x4ac334,null));}; \ No newline at end of file +var _0x64a0=['query','keys','filters','intersection','fields','attributes','hasOwnProperty','nolimit','limit','order','sort','where','pick','filter','type','VIRTUAL','merge','OpenchannelTransferReport','includeAll','findAll','rows','catch','show','params','length','include','options','create','body','find','destroy','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','offset','undefined','count','Content-Range','apply','reject','save','update','then','error','stack','name','send','index','map','rawAttributes','key','model'];(function(_0x2a7553,_0x285712){var _0x7d73e6=function(_0x3044f0){while(--_0x3044f0){_0x2a7553['push'](_0x2a7553['shift']());}};_0x7d73e6(++_0x285712);}(_0x64a0,0x70));var _0x064a=function(_0x5537e6,_0xddf3dc){_0x5537e6=_0x5537e6-0x0;var _0x44115a=_0x64a0[_0x5537e6];return _0x44115a;};'use strict';var emlformat=require(_0x064a('0x0'));var rimraf=require(_0x064a('0x1'));var zipdir=require(_0x064a('0x2'));var jsonpatch=require(_0x064a('0x3'));var rp=require(_0x064a('0x4'));var moment=require(_0x064a('0x5'));var BPromise=require(_0x064a('0x6'));var Mustache=require(_0x064a('0x7'));var util=require('util');var path=require(_0x064a('0x8'));var sox=require(_0x064a('0x9'));var csv=require(_0x064a('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x064a('0xb'));var _=require(_0x064a('0xc'));var squel=require(_0x064a('0xd'));var crypto=require(_0x064a('0xe'));var jsforce=require(_0x064a('0xf'));var deskjs=require(_0x064a('0x10'));var toCsv=require(_0x064a('0xa'));var querystring=require('querystring');var Papa=require(_0x064a('0x11'));var Redis=require('ioredis');var authService=require(_0x064a('0x12'));var qs=require(_0x064a('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x064a('0x14'));var logger=require(_0x064a('0x15'))(_0x064a('0x16'));var utils=require(_0x064a('0x17'));var config=require(_0x064a('0x18'));var licenseUtil=require(_0x064a('0x19'));var db=require(_0x064a('0x1a'))['db'];function respondWithStatusCode(_0x1de640,_0x1d17c4){_0x1d17c4=_0x1d17c4||0xcc;return function(_0x5a5a97){if(_0x5a5a97){return _0x1de640[_0x064a('0x1b')](_0x1d17c4);}return _0x1de640[_0x064a('0x1c')](_0x1d17c4)[_0x064a('0x1d')]();};}function respondWithResult(_0xb845b2,_0x3bc331){_0x3bc331=_0x3bc331||0xc8;return function(_0x326e19){if(_0x326e19){return _0xb845b2[_0x064a('0x1c')](_0x3bc331)['json'](_0x326e19);}};}function respondWithFilteredResult(_0x3e8107,_0x2af440){return function(_0x4293ef){if(_0x4293ef){var _0x4b3fe9=typeof _0x2af440[_0x064a('0x1e')]===_0x064a('0x1f')&&typeof _0x2af440['limit']===_0x064a('0x1f');var _0x3d15ac=_0x4293ef['count'];var _0x3cff10=_0x4b3fe9?0x0:_0x2af440[_0x064a('0x1e')];var _0x1de191=_0x4b3fe9?_0x4293ef[_0x064a('0x20')]:_0x2af440['offset']+_0x2af440['limit'];var _0x1e29c9;if(_0x1de191>=_0x3d15ac){_0x1de191=_0x3d15ac;_0x1e29c9=0xc8;}else{_0x1e29c9=0xce;}_0x3e8107[_0x064a('0x1c')](_0x1e29c9);return _0x3e8107['set'](_0x064a('0x21'),_0x3cff10+'-'+_0x1de191+'/'+_0x3d15ac)['json'](_0x4293ef);}return null;};}function patchUpdates(_0x4a148f){return function(_0x10a522){try{jsonpatch[_0x064a('0x22')](_0x10a522,_0x4a148f,!![]);}catch(_0x1c7ecb){return BPromise[_0x064a('0x23')](_0x1c7ecb);}return _0x10a522[_0x064a('0x24')]();};}function saveUpdates(_0x30935b,_0xe4fd7f){return function(_0x4f420e){if(_0x4f420e){return _0x4f420e[_0x064a('0x25')](_0x30935b)[_0x064a('0x26')](function(_0x284ed4){return _0x284ed4;});}return null;};}function removeEntity(_0x5c4e30,_0x298be7){return function(_0xe6f0e6){if(_0xe6f0e6){return _0xe6f0e6['destroy']()[_0x064a('0x26')](function(){_0x5c4e30['status'](0xcc)[_0x064a('0x1d')]();});}};}function handleEntityNotFound(_0x49d66c,_0x19e853){return function(_0x3ea22c){if(!_0x3ea22c){_0x49d66c['sendStatus'](0x194);}return _0x3ea22c;};}function handleError(_0x3734e7,_0x47aba3){_0x47aba3=_0x47aba3||0x1f4;return function(_0x54fdbb){logger[_0x064a('0x27')](_0x54fdbb[_0x064a('0x28')]);if(_0x54fdbb[_0x064a('0x29')]){delete _0x54fdbb[_0x064a('0x29')];}_0x3734e7[_0x064a('0x1c')](_0x47aba3)[_0x064a('0x2a')](_0x54fdbb);};}exports[_0x064a('0x2b')]=function(_0x2c4d0c,_0x1af64b){var _0x456fc1={},_0x3558f0={},_0x27710a={'count':0x0,'rows':[]};var _0x20b1e7=_[_0x064a('0x2c')](db['OpenchannelTransferReport'][_0x064a('0x2d')],function(_0x3561c7){return{'name':_0x3561c7['fieldName'],'type':_0x3561c7['type'][_0x064a('0x2e')]};});_0x3558f0[_0x064a('0x2f')]=_['map'](_0x20b1e7,_0x064a('0x29'));_0x3558f0[_0x064a('0x30')]=_[_0x064a('0x31')](_0x2c4d0c['query']);_0x3558f0[_0x064a('0x32')]=_['intersection'](_0x3558f0[_0x064a('0x2f')],_0x3558f0[_0x064a('0x30')]);_0x456fc1['attributes']=_[_0x064a('0x33')](_0x3558f0['model'],qs[_0x064a('0x34')](_0x2c4d0c[_0x064a('0x30')]['fields']));_0x456fc1['attributes']=_0x456fc1[_0x064a('0x35')]['length']?_0x456fc1['attributes']:_0x3558f0[_0x064a('0x2f')];if(!_0x2c4d0c[_0x064a('0x30')][_0x064a('0x36')](_0x064a('0x37'))){_0x456fc1[_0x064a('0x38')]=qs[_0x064a('0x38')](_0x2c4d0c[_0x064a('0x30')][_0x064a('0x38')]);_0x456fc1[_0x064a('0x1e')]=qs[_0x064a('0x1e')](_0x2c4d0c['query'][_0x064a('0x1e')]);}_0x456fc1[_0x064a('0x39')]=qs[_0x064a('0x3a')](_0x2c4d0c[_0x064a('0x30')][_0x064a('0x3a')]);_0x456fc1[_0x064a('0x3b')]=qs['filters'](_[_0x064a('0x3c')](_0x2c4d0c[_0x064a('0x30')],_0x3558f0['filters']),_0x20b1e7);if(_0x2c4d0c[_0x064a('0x30')][_0x064a('0x3d')]){_0x456fc1[_0x064a('0x3b')]=_['merge'](_0x456fc1[_0x064a('0x3b')],{'$or':_[_0x064a('0x2c')](_0x20b1e7,function(_0x1f7879){if(_0x1f7879[_0x064a('0x3e')]!==_0x064a('0x3f')){var _0x1a8a87={};_0x1a8a87[_0x1f7879['name']]={'$like':'%'+_0x2c4d0c[_0x064a('0x30')]['filter']+'%'};return _0x1a8a87;}})});}_0x456fc1=_[_0x064a('0x40')]({},_0x456fc1,_0x2c4d0c['options']);var _0x4e0940={'where':_0x456fc1[_0x064a('0x3b')]};return db[_0x064a('0x41')][_0x064a('0x20')](_0x4e0940)[_0x064a('0x26')](function(_0x2e2586){_0x27710a['count']=_0x2e2586;if(_0x2c4d0c[_0x064a('0x30')][_0x064a('0x42')]){_0x456fc1['include']=[{'all':!![]}];}return db['OpenchannelTransferReport'][_0x064a('0x43')](_0x456fc1);})[_0x064a('0x26')](function(_0x42c19c){_0x27710a[_0x064a('0x44')]=_0x42c19c;return _0x27710a;})['then'](respondWithFilteredResult(_0x1af64b,_0x456fc1))[_0x064a('0x45')](handleError(_0x1af64b,null));};exports[_0x064a('0x46')]=function(_0x3a871c,_0x1f1cc2){var _0x5a38ef={'raw':!![],'where':{'id':_0x3a871c[_0x064a('0x47')]['id']}},_0x46d8c1={};_0x46d8c1[_0x064a('0x2f')]=_[_0x064a('0x31')](db['OpenchannelTransferReport'][_0x064a('0x2d')]);_0x46d8c1[_0x064a('0x30')]=_[_0x064a('0x31')](_0x3a871c['query']);_0x46d8c1['filters']=_[_0x064a('0x33')](_0x46d8c1['model'],_0x46d8c1[_0x064a('0x30')]);_0x5a38ef[_0x064a('0x35')]=_[_0x064a('0x33')](_0x46d8c1[_0x064a('0x2f')],qs[_0x064a('0x34')](_0x3a871c[_0x064a('0x30')]['fields']));_0x5a38ef[_0x064a('0x35')]=_0x5a38ef[_0x064a('0x35')][_0x064a('0x48')]?_0x5a38ef[_0x064a('0x35')]:_0x46d8c1[_0x064a('0x2f')];if(_0x3a871c['query']['includeAll']){_0x5a38ef[_0x064a('0x49')]=[{'all':!![]}];}_0x5a38ef=_[_0x064a('0x40')]({},_0x5a38ef,_0x3a871c[_0x064a('0x4a')]);return db[_0x064a('0x41')]['find'](_0x5a38ef)['then'](handleEntityNotFound(_0x1f1cc2,null))[_0x064a('0x26')](respondWithResult(_0x1f1cc2,null))[_0x064a('0x45')](handleError(_0x1f1cc2,null));};exports[_0x064a('0x4b')]=function(_0x4ecd93,_0x240315){return db[_0x064a('0x41')][_0x064a('0x4b')](_0x4ecd93['body'],{})['then'](respondWithResult(_0x240315,0xc9))[_0x064a('0x45')](handleError(_0x240315,null));};exports[_0x064a('0x25')]=function(_0x4f6f21,_0x36dbbc){if(_0x4f6f21[_0x064a('0x4c')]['id']){delete _0x4f6f21[_0x064a('0x4c')]['id'];}return db[_0x064a('0x41')][_0x064a('0x4d')]({'where':{'id':_0x4f6f21[_0x064a('0x47')]['id']}})['then'](handleEntityNotFound(_0x36dbbc,null))[_0x064a('0x26')](saveUpdates(_0x4f6f21[_0x064a('0x4c')],null))[_0x064a('0x26')](respondWithResult(_0x36dbbc,null))[_0x064a('0x45')](handleError(_0x36dbbc,null));};exports[_0x064a('0x4e')]=function(_0x3ca7a6,_0x26493c){return db['OpenchannelTransferReport'][_0x064a('0x4d')]({'where':{'id':_0x3ca7a6[_0x064a('0x47')]['id']}})['then'](handleEntityNotFound(_0x26493c,null))[_0x064a('0x26')](removeEntity(_0x26493c,null))[_0x064a('0x45')](handleError(_0x26493c,null));};exports[_0x064a('0x4f')]=function(_0x5272eb,_0x38c15e){return db['OpenchannelTransferReport'][_0x064a('0x4f')]()[_0x064a('0x26')](respondWithResult(_0x38c15e,null))[_0x064a('0x45')](handleError(_0x38c15e,null));}; \ No newline at end of file diff --git a/server/api/openchannelTransferReport/openchannelTransferReport.model.js b/server/api/openchannelTransferReport/openchannelTransferReport.model.js index fc03072..c2f45a6 100644 --- a/server/api/openchannelTransferReport/openchannelTransferReport.model.js +++ b/server/api/openchannelTransferReport/openchannelTransferReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa488=['lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','exports','define','OpenchannelTransferReport','uniqueid'];(function(_0x5d4607,_0x6b5e7b){var _0x5e4a86=function(_0x46891a){while(--_0x46891a){_0x5d4607['push'](_0x5d4607['shift']());}};_0x5e4a86(++_0x6b5e7b);}(_0xa488,0x179));var _0x8a48=function(_0xc5c4fd,_0x1464e6){_0xc5c4fd=_0xc5c4fd-0x0;var _0x25247e=_0xa488[_0xc5c4fd];return _0x25247e;};'use strict';var _=require(_0x8a48('0x0'));var util=require(_0x8a48('0x1'));var logger=require(_0x8a48('0x2'))(_0x8a48('0x3'));var moment=require(_0x8a48('0x4'));var BPromise=require(_0x8a48('0x5'));var rp=require(_0x8a48('0x6'));var fs=require('fs');var path=require(_0x8a48('0x7'));var rimraf=require(_0x8a48('0x8'));var config=require('../../config/environment');var attributes=require('./openchannelTransferReport.attributes');module[_0x8a48('0x9')]=function(_0x23df4f,_0x3a5851){return _0x23df4f[_0x8a48('0xa')](_0x8a48('0xb'),attributes,{'tableName':'report_openchannel_transfer','paranoid':![],'indexes':[{'name':_0x8a48('0xc'),'fields':[_0x8a48('0xc')]}],'timestamps':!![]});}; \ No newline at end of file +var _0x8d6b=['uniqueid','lodash','util','../../config/logger','api','moment','bluebird','path','../../config/environment','define','OpenchannelTransferReport','report_openchannel_transfer'];(function(_0x31210e,_0x1785ff){var _0x2167db=function(_0x11470f){while(--_0x11470f){_0x31210e['push'](_0x31210e['shift']());}};_0x2167db(++_0x1785ff);}(_0x8d6b,0x9d));var _0xb8d6=function(_0x2e681e,_0x47fc7a){_0x2e681e=_0x2e681e-0x0;var _0x3aa685=_0x8d6b[_0x2e681e];return _0x3aa685;};'use strict';var _=require(_0xb8d6('0x0'));var util=require(_0xb8d6('0x1'));var logger=require(_0xb8d6('0x2'))(_0xb8d6('0x3'));var moment=require(_0xb8d6('0x4'));var BPromise=require(_0xb8d6('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xb8d6('0x6'));var rimraf=require('rimraf');var config=require(_0xb8d6('0x7'));var attributes=require('./openchannelTransferReport.attributes');module['exports']=function(_0x38a16b,_0x2ff1c4){return _0x38a16b[_0xb8d6('0x8')](_0xb8d6('0x9'),attributes,{'tableName':_0xb8d6('0xa'),'paranoid':![],'indexes':[{'name':_0xb8d6('0xb'),'fields':[_0xb8d6('0xb')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/openchannelTransferReport/openchannelTransferReport.rpc.js b/server/api/openchannelTransferReport/openchannelTransferReport.rpc.js index 13f5f79..71d63cd 100644 --- a/server/api/openchannelTransferReport/openchannelTransferReport.rpc.js +++ b/server/api/openchannelTransferReport/openchannelTransferReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7fbe=['request','then','OpenchannelTransferReport,\x20%s,\x20%s','request\x20sent','debug','OpenchannelTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http'];(function(_0x42ea74,_0x1939a2){var _0x563463=function(_0x49406d){while(--_0x49406d){_0x42ea74['push'](_0x42ea74['shift']());}};_0x563463(++_0x1939a2);}(_0x7fbe,0x1ec));var _0xe7fb=function(_0x253476,_0x16b31a){_0x253476=_0x253476-0x0;var _0x134271=_0x7fbe[_0x253476];return _0x134271;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xe7fb('0x0'));var BPromise=require(_0xe7fb('0x1'));var rs=require(_0xe7fb('0x2'));var fs=require('fs');var Redis=require(_0xe7fb('0x3'));var db=require(_0xe7fb('0x4'))['db'];var utils=require(_0xe7fb('0x5'));var logger=require(_0xe7fb('0x6'))(_0xe7fb('0x7'));var config=require(_0xe7fb('0x8'));var jayson=require(_0xe7fb('0x9'));var client=jayson[_0xe7fb('0xa')][_0xe7fb('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x24cd67,_0x1f943f,_0x5ad75b){return new BPromise(function(_0x213ebc,_0x228f6b){return client[_0xe7fb('0xc')](_0x24cd67,_0x5ad75b)[_0xe7fb('0xd')](function(_0x4ba197){logger['info'](_0xe7fb('0xe'),_0x1f943f,_0xe7fb('0xf'));logger[_0xe7fb('0x10')](_0xe7fb('0x11'),_0x1f943f,_0xe7fb('0xf'),JSON[_0xe7fb('0x12')](_0x4ba197));if(_0x4ba197[_0xe7fb('0x13')]){if(_0x4ba197[_0xe7fb('0x13')][_0xe7fb('0x14')]===0x1f4){logger[_0xe7fb('0x13')](_0xe7fb('0xe'),_0x1f943f,_0x4ba197[_0xe7fb('0x13')][_0xe7fb('0x15')]);return _0x228f6b(_0x4ba197[_0xe7fb('0x13')][_0xe7fb('0x15')]);}logger['error'](_0xe7fb('0xe'),_0x1f943f,_0x4ba197[_0xe7fb('0x13')]['message']);return _0x213ebc(_0x4ba197[_0xe7fb('0x13')][_0xe7fb('0x15')]);}else{logger['info'](_0xe7fb('0xe'),_0x1f943f,'request\x20sent');_0x213ebc(_0x4ba197[_0xe7fb('0x16')][_0xe7fb('0x15')]);}})[_0xe7fb('0x17')](function(_0x17e8a8){logger['error'](_0xe7fb('0xe'),_0x1f943f,_0x17e8a8);_0x228f6b(_0x17e8a8);});});} \ No newline at end of file +var _0x7b27=['../../config/logger','../../config/environment','jayson/promise','client','request','then','info','OpenchannelTransferReport,\x20%s,\x20%s','request\x20sent','debug','OpenchannelTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','lodash','moment','bluebird','randomstring','ioredis','../../config/utils'];(function(_0x4c73ac,_0x46b73c){var _0x9839ee=function(_0x2076fb){while(--_0x2076fb){_0x4c73ac['push'](_0x4c73ac['shift']());}};_0x9839ee(++_0x46b73c);}(_0x7b27,0x186));var _0x77b2=function(_0x35ce61,_0x4cc160){_0x35ce61=_0x35ce61-0x0;var _0x20d459=_0x7b27[_0x35ce61];return _0x20d459;};'use strict';var _=require(_0x77b2('0x0'));var util=require('util');var moment=require(_0x77b2('0x1'));var BPromise=require(_0x77b2('0x2'));var rs=require(_0x77b2('0x3'));var fs=require('fs');var Redis=require(_0x77b2('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x77b2('0x5'));var logger=require(_0x77b2('0x6'))('rpc');var config=require(_0x77b2('0x7'));var jayson=require(_0x77b2('0x8'));var client=jayson[_0x77b2('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x22bdcf,_0x2a97d8,_0x2f01a2){return new BPromise(function(_0x1308f7,_0x5139eb){return client[_0x77b2('0xa')](_0x22bdcf,_0x2f01a2)[_0x77b2('0xb')](function(_0x734122){logger[_0x77b2('0xc')](_0x77b2('0xd'),_0x2a97d8,_0x77b2('0xe'));logger[_0x77b2('0xf')](_0x77b2('0x10'),_0x2a97d8,'request\x20sent',JSON[_0x77b2('0x11')](_0x734122));if(_0x734122[_0x77b2('0x12')]){if(_0x734122['error'][_0x77b2('0x13')]===0x1f4){logger['error'](_0x77b2('0xd'),_0x2a97d8,_0x734122[_0x77b2('0x12')]['message']);return _0x5139eb(_0x734122[_0x77b2('0x12')]['message']);}logger[_0x77b2('0x12')](_0x77b2('0xd'),_0x2a97d8,_0x734122[_0x77b2('0x12')][_0x77b2('0x14')]);return _0x1308f7(_0x734122[_0x77b2('0x12')][_0x77b2('0x14')]);}else{logger[_0x77b2('0xc')](_0x77b2('0xd'),_0x2a97d8,_0x77b2('0xe'));_0x1308f7(_0x734122['result']['message']);}})[_0x77b2('0x15')](function(_0x2a85a3){logger[_0x77b2('0x12')](_0x77b2('0xd'),_0x2a97d8,_0x2a85a3);_0x5139eb(_0x2a85a3);});});} \ No newline at end of file diff --git a/server/api/pause/index.js b/server/api/pause/index.js index 6d681d2..bc7fee6 100644 --- a/server/api/pause/index.js +++ b/server/api/pause/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xed8a=['show','post','create','put','update','delete','destroy','multer','util','path','connect-timeout','Router','fs-extra','../../components/interaction/service','../../config/environment','isAuthenticated','index','get','/:id'];(function(_0x3a6242,_0x113235){var _0x530e4e=function(_0x596174){while(--_0x596174){_0x3a6242['push'](_0x3a6242['shift']());}};_0x530e4e(++_0x113235);}(_0xed8a,0xc5));var _0xaed8=function(_0x164423,_0x4ec296){_0x164423=_0x164423-0x0;var _0x583bb9=_0xed8a[_0x164423];return _0x583bb9;};'use strict';var multer=require(_0xaed8('0x0'));var util=require(_0xaed8('0x1'));var path=require(_0xaed8('0x2'));var timeout=require(_0xaed8('0x3'));var express=require('express');var router=express[_0xaed8('0x4')]();var fs_extra=require(_0xaed8('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0xaed8('0x6'));var config=require(_0xaed8('0x7'));var controller=require('./pause.controller');router['get']('/',auth[_0xaed8('0x8')](),controller[_0xaed8('0x9')]);router[_0xaed8('0xa')](_0xaed8('0xb'),auth[_0xaed8('0x8')](),controller[_0xaed8('0xc')]);router[_0xaed8('0xd')]('/',auth['isAuthenticated'](),controller[_0xaed8('0xe')]);router[_0xaed8('0xf')](_0xaed8('0xb'),auth['isAuthenticated'](),controller[_0xaed8('0x10')]);router[_0xaed8('0x11')](_0xaed8('0xb'),auth[_0xaed8('0x8')](),controller[_0xaed8('0x12')]);module['exports']=router; \ No newline at end of file +var _0xa710=['isAuthenticated','index','/:id','show','create','put','update','delete','destroy','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./pause.controller','get'];(function(_0x2f46c4,_0x29a61e){var _0x158375=function(_0x5cde85){while(--_0x5cde85){_0x2f46c4['push'](_0x2f46c4['shift']());}};_0x158375(++_0x29a61e);}(_0xa710,0x145));var _0x0a71=function(_0x2b0690,_0x4f742f){_0x2b0690=_0x2b0690-0x0;var _0x82be1=_0xa710[_0x2b0690];return _0x82be1;};'use strict';var multer=require(_0x0a71('0x0'));var util=require(_0x0a71('0x1'));var path=require(_0x0a71('0x2'));var timeout=require('connect-timeout');var express=require(_0x0a71('0x3'));var router=express[_0x0a71('0x4')]();var fs_extra=require(_0x0a71('0x5'));var auth=require(_0x0a71('0x6'));var interaction=require(_0x0a71('0x7'));var config=require(_0x0a71('0x8'));var controller=require(_0x0a71('0x9'));router[_0x0a71('0xa')]('/',auth[_0x0a71('0xb')](),controller[_0x0a71('0xc')]);router[_0x0a71('0xa')](_0x0a71('0xd'),auth[_0x0a71('0xb')](),controller[_0x0a71('0xe')]);router['post']('/',auth[_0x0a71('0xb')](),controller[_0x0a71('0xf')]);router[_0x0a71('0x10')](_0x0a71('0xd'),auth[_0x0a71('0xb')](),controller[_0x0a71('0x11')]);router[_0x0a71('0x12')]('/:id',auth[_0x0a71('0xb')](),controller[_0x0a71('0x13')]);module[_0x0a71('0x14')]=router; \ No newline at end of file diff --git a/server/api/pause/pause.attributes.js b/server/api/pause/pause.attributes.js index ce1329c..5018adf 100644 --- a/server/api/pause/pause.attributes.js +++ b/server/api/pause/pause.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa95b=['exports','STRING','name'];(function(_0xc4d88,_0x474107){var _0x3ee9aa=function(_0x463d06){while(--_0x463d06){_0xc4d88['push'](_0xc4d88['shift']());}};_0x3ee9aa(++_0x474107);}(_0xa95b,0xf3));var _0xba95=function(_0x202a9d,_0x30155e){_0x202a9d=_0x202a9d-0x0;var _0x682ac2=_0xa95b[_0x202a9d];return _0x682ac2;};'use strict';var Sequelize=require('sequelize');module[_0xba95('0x0')]={'name':{'type':Sequelize[_0xba95('0x1')],'unique':_0xba95('0x2'),'allowNull':![]},'description':{'type':Sequelize['STRING']}}; \ No newline at end of file +var _0xd0ce=['exports','STRING'];(function(_0x1087b3,_0x1c98cd){var _0x5e6756=function(_0x13e6af){while(--_0x13e6af){_0x1087b3['push'](_0x1087b3['shift']());}};_0x5e6756(++_0x1c98cd);}(_0xd0ce,0x1c6));var _0xed0c=function(_0x1a635e,_0x241651){_0x1a635e=_0x1a635e-0x0;var _0x5b3345=_0xd0ce[_0x1a635e];return _0x5b3345;};'use strict';var Sequelize=require('sequelize');module[_0xed0c('0x0')]={'name':{'type':Sequelize[_0xed0c('0x1')],'unique':'name','allowNull':![]},'description':{'type':Sequelize[_0xed0c('0x1')]}}; \ No newline at end of file diff --git a/server/api/pause/pause.controller.js b/server/api/pause/pause.controller.js index f1b377c..1576ab7 100644 --- a/server/api/pause/pause.controller.js +++ b/server/api/pause/pause.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa6a6=['then','get','Pauses','UserProfileResource','destroy','error','stack','name','index','Pause','rawAttributes','fieldName','type','query','keys','filters','intersection','attributes','fields','model','hasOwnProperty','nolimit','order','where','pick','merge','map','VIRTUAL','filter','include','findAll','rows','catch','length','includeAll','options','find','create','body','role','user','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','ejs','fs-extra','lodash','jsforce','desk.js','to-csv','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end','status','json','offset','limit','undefined','count','Content-Range','apply','reject','save','update'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xa6a6,0xd4));var _0x6a6a=function(_0xb0f7c3,_0x4eae95){_0xb0f7c3=_0xb0f7c3-0x0;var _0x28ea68=_0xa6a6[_0xb0f7c3];return _0x28ea68;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x6a6a('0x0'));var zipdir=require(_0x6a6a('0x1'));var jsonpatch=require(_0x6a6a('0x2'));var rp=require(_0x6a6a('0x3'));var moment=require('moment');var BPromise=require(_0x6a6a('0x4'));var Mustache=require(_0x6a6a('0x5'));var util=require(_0x6a6a('0x6'));var path=require(_0x6a6a('0x7'));var sox=require(_0x6a6a('0x8'));var csv=require('to-csv');var ejs=require(_0x6a6a('0x9'));var fs=require('fs');var fs_extra=require(_0x6a6a('0xa'));var _=require(_0x6a6a('0xb'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x6a6a('0xc'));var deskjs=require(_0x6a6a('0xd'));var toCsv=require(_0x6a6a('0xe'));var querystring=require('querystring');var Papa=require(_0x6a6a('0xf'));var Redis=require(_0x6a6a('0x10'));var authService=require(_0x6a6a('0x11'));var qs=require(_0x6a6a('0x12'));var as=require(_0x6a6a('0x13'));var hardwareService=require(_0x6a6a('0x14'));var logger=require(_0x6a6a('0x15'))(_0x6a6a('0x16'));var utils=require(_0x6a6a('0x17'));var config=require(_0x6a6a('0x18'));var licenseUtil=require(_0x6a6a('0x19'));var db=require(_0x6a6a('0x1a'))['db'];function respondWithStatusCode(_0x543033,_0x48cac3){_0x48cac3=_0x48cac3||0xcc;return function(_0x1c0194){if(_0x1c0194){return _0x543033[_0x6a6a('0x1b')](_0x48cac3);}return _0x543033['status'](_0x48cac3)[_0x6a6a('0x1c')]();};}function respondWithResult(_0x37fffe,_0x4d95d3){_0x4d95d3=_0x4d95d3||0xc8;return function(_0x28587f){if(_0x28587f){return _0x37fffe[_0x6a6a('0x1d')](_0x4d95d3)[_0x6a6a('0x1e')](_0x28587f);}};}function respondWithFilteredResult(_0x22530d,_0x461505){return function(_0x5c22e7){if(_0x5c22e7){var _0x1f822b=typeof _0x461505[_0x6a6a('0x1f')]==='undefined'&&typeof _0x461505[_0x6a6a('0x20')]===_0x6a6a('0x21');var _0x3b536c=_0x5c22e7[_0x6a6a('0x22')];var _0x3bec97=_0x1f822b?0x0:_0x461505['offset'];var _0x3c5d4d=_0x1f822b?_0x5c22e7[_0x6a6a('0x22')]:_0x461505['offset']+_0x461505['limit'];var _0x311b68;if(_0x3c5d4d>=_0x3b536c){_0x3c5d4d=_0x3b536c;_0x311b68=0xc8;}else{_0x311b68=0xce;}_0x22530d[_0x6a6a('0x1d')](_0x311b68);return _0x22530d['set'](_0x6a6a('0x23'),_0x3bec97+'-'+_0x3c5d4d+'/'+_0x3b536c)[_0x6a6a('0x1e')](_0x5c22e7);}return null;};}function patchUpdates(_0x59efda){return function(_0x9817af){try{jsonpatch[_0x6a6a('0x24')](_0x9817af,_0x59efda,!![]);}catch(_0x58e746){return BPromise[_0x6a6a('0x25')](_0x58e746);}return _0x9817af[_0x6a6a('0x26')]();};}function saveUpdates(_0x220b6a,_0x3ee9df){return function(_0x8aaa61){if(_0x8aaa61){return _0x8aaa61[_0x6a6a('0x27')](_0x220b6a)['then'](function(_0x4b27f0){return _0x4b27f0;});}return null;};}function removeEntity(_0x5a46e4,_0x35fbd5){return function(_0x2f0545){if(_0x2f0545){return _0x2f0545['destroy']()[_0x6a6a('0x28')](function(){var _0x10cfd7=_0x2f0545[_0x6a6a('0x29')]({'plain':!![]});var _0x283ad4=_0x6a6a('0x2a');return db[_0x6a6a('0x2b')][_0x6a6a('0x2c')]({'where':{'type':_0x283ad4,'resourceId':_0x10cfd7['id']}})['then'](function(){return _0x2f0545;});})[_0x6a6a('0x28')](function(){_0x5a46e4['status'](0xcc)[_0x6a6a('0x1c')]();});}};}function handleEntityNotFound(_0x359f89,_0x6e5456){return function(_0x251581){if(!_0x251581){_0x359f89[_0x6a6a('0x1b')](0x194);}return _0x251581;};}function handleError(_0x547d23,_0x1c8bf6){_0x1c8bf6=_0x1c8bf6||0x1f4;return function(_0x47d274){logger[_0x6a6a('0x2d')](_0x47d274[_0x6a6a('0x2e')]);if(_0x47d274['name']){delete _0x47d274[_0x6a6a('0x2f')];}_0x547d23['status'](_0x1c8bf6)['send'](_0x47d274);};}exports[_0x6a6a('0x30')]=function(_0x2d2fc,_0x1e2566){var _0x4bd4d6={},_0x5ae3e3={},_0x208441={'count':0x0,'rows':[]};var _0x2c3f95=_['map'](db[_0x6a6a('0x31')][_0x6a6a('0x32')],function(_0x3c62e4){return{'name':_0x3c62e4[_0x6a6a('0x33')],'type':_0x3c62e4[_0x6a6a('0x34')]['key']};});_0x5ae3e3['model']=_['map'](_0x2c3f95,_0x6a6a('0x2f'));_0x5ae3e3[_0x6a6a('0x35')]=_[_0x6a6a('0x36')](_0x2d2fc[_0x6a6a('0x35')]);_0x5ae3e3[_0x6a6a('0x37')]=_[_0x6a6a('0x38')](_0x5ae3e3['model'],_0x5ae3e3['query']);_0x4bd4d6[_0x6a6a('0x39')]=_[_0x6a6a('0x38')](_0x5ae3e3['model'],qs['fields'](_0x2d2fc[_0x6a6a('0x35')][_0x6a6a('0x3a')]));_0x4bd4d6[_0x6a6a('0x39')]=_0x4bd4d6['attributes']['length']?_0x4bd4d6[_0x6a6a('0x39')]:_0x5ae3e3[_0x6a6a('0x3b')];if(!_0x2d2fc['query'][_0x6a6a('0x3c')](_0x6a6a('0x3d'))){_0x4bd4d6[_0x6a6a('0x20')]=qs['limit'](_0x2d2fc['query'][_0x6a6a('0x20')]);_0x4bd4d6[_0x6a6a('0x1f')]=qs[_0x6a6a('0x1f')](_0x2d2fc['query'][_0x6a6a('0x1f')]);}_0x4bd4d6[_0x6a6a('0x3e')]=qs['sort'](_0x2d2fc[_0x6a6a('0x35')]['sort']);_0x4bd4d6[_0x6a6a('0x3f')]=qs[_0x6a6a('0x37')](_[_0x6a6a('0x40')](_0x2d2fc['query'],_0x5ae3e3[_0x6a6a('0x37')]),_0x2c3f95);if(_0x2d2fc[_0x6a6a('0x35')]['filter']){_0x4bd4d6[_0x6a6a('0x3f')]=_[_0x6a6a('0x41')](_0x4bd4d6[_0x6a6a('0x3f')],{'$or':_[_0x6a6a('0x42')](_0x2c3f95,function(_0x264638){if(_0x264638[_0x6a6a('0x34')]!==_0x6a6a('0x43')){var _0x43deae={};_0x43deae[_0x264638[_0x6a6a('0x2f')]]={'$like':'%'+_0x2d2fc[_0x6a6a('0x35')][_0x6a6a('0x44')]+'%'};return _0x43deae;}})});}_0x4bd4d6=_[_0x6a6a('0x41')]({},_0x4bd4d6,_0x2d2fc['options']);var _0x5edb26={'where':_0x4bd4d6[_0x6a6a('0x3f')]};return db['Pause'][_0x6a6a('0x22')](_0x5edb26)['then'](function(_0x2a20e7){_0x208441[_0x6a6a('0x22')]=_0x2a20e7;if(_0x2d2fc[_0x6a6a('0x35')]['includeAll']){_0x4bd4d6[_0x6a6a('0x45')]=[{'all':!![]}];}return db[_0x6a6a('0x31')][_0x6a6a('0x46')](_0x4bd4d6);})[_0x6a6a('0x28')](function(_0x32f802){_0x208441[_0x6a6a('0x47')]=_0x32f802;return _0x208441;})[_0x6a6a('0x28')](respondWithFilteredResult(_0x1e2566,_0x4bd4d6))[_0x6a6a('0x48')](handleError(_0x1e2566,null));};exports['show']=function(_0x5416cd,_0x4252e9){var _0x1687f8={'raw':!![],'where':{'id':_0x5416cd['params']['id']}},_0x1354a8={};_0x1354a8[_0x6a6a('0x3b')]=_['keys'](db['Pause']['rawAttributes']);_0x1354a8[_0x6a6a('0x35')]=_[_0x6a6a('0x36')](_0x5416cd[_0x6a6a('0x35')]);_0x1354a8[_0x6a6a('0x37')]=_[_0x6a6a('0x38')](_0x1354a8[_0x6a6a('0x3b')],_0x1354a8[_0x6a6a('0x35')]);_0x1687f8[_0x6a6a('0x39')]=_[_0x6a6a('0x38')](_0x1354a8['model'],qs[_0x6a6a('0x3a')](_0x5416cd[_0x6a6a('0x35')]['fields']));_0x1687f8[_0x6a6a('0x39')]=_0x1687f8[_0x6a6a('0x39')][_0x6a6a('0x49')]?_0x1687f8['attributes']:_0x1354a8[_0x6a6a('0x3b')];if(_0x5416cd['query'][_0x6a6a('0x4a')]){_0x1687f8['include']=[{'all':!![]}];}_0x1687f8=_[_0x6a6a('0x41')]({},_0x1687f8,_0x5416cd[_0x6a6a('0x4b')]);return db['Pause'][_0x6a6a('0x4c')](_0x1687f8)[_0x6a6a('0x28')](handleEntityNotFound(_0x4252e9,null))['then'](respondWithResult(_0x4252e9,null))[_0x6a6a('0x48')](handleError(_0x4252e9,null));};exports[_0x6a6a('0x4d')]=function(_0x8d5d72,_0x6664c3){return db[_0x6a6a('0x31')][_0x6a6a('0x4d')](_0x8d5d72[_0x6a6a('0x4e')],{})['then'](function(_0x469792){var _0x3a0bb5=_0x8d5d72['user'][_0x6a6a('0x29')]({'plain':!![]});if(!_0x3a0bb5)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x3a0bb5[_0x6a6a('0x4f')]===_0x6a6a('0x50')){var _0x318c93=_0x469792[_0x6a6a('0x29')]({'plain':!![]});var _0x8ef75b=_0x6a6a('0x2a');return db['UserProfileSection']['find']({'where':{'name':_0x8ef75b,'userProfileId':_0x3a0bb5[_0x6a6a('0x51')]},'raw':!![]})[_0x6a6a('0x28')](function(_0x30eb7a){if(_0x30eb7a&&_0x30eb7a['autoAssociation']===0x0){return db[_0x6a6a('0x2b')][_0x6a6a('0x4d')]({'name':_0x318c93[_0x6a6a('0x2f')],'resourceId':_0x318c93['id'],'type':_0x30eb7a[_0x6a6a('0x2f')],'sectionId':_0x30eb7a['id']},{})[_0x6a6a('0x28')](function(){return _0x469792;});}else{return _0x469792;}})[_0x6a6a('0x48')](function(_0x579536){logger[_0x6a6a('0x2d')](_0x6a6a('0x52'),_0x579536);throw _0x579536;});}return _0x469792;})[_0x6a6a('0x28')](respondWithResult(_0x6664c3,0xc9))[_0x6a6a('0x48')](handleError(_0x6664c3,null));};exports[_0x6a6a('0x27')]=function(_0x4b1a90,_0x256b70){if(_0x4b1a90[_0x6a6a('0x4e')]['id']){delete _0x4b1a90['body']['id'];}return db[_0x6a6a('0x31')][_0x6a6a('0x4c')]({'where':{'id':_0x4b1a90[_0x6a6a('0x53')]['id']}})[_0x6a6a('0x28')](handleEntityNotFound(_0x256b70,null))['then'](saveUpdates(_0x4b1a90['body'],null))[_0x6a6a('0x28')](respondWithResult(_0x256b70,null))[_0x6a6a('0x48')](handleError(_0x256b70,null));};exports['destroy']=function(_0x5be97e,_0x26b579){return db[_0x6a6a('0x31')][_0x6a6a('0x4c')]({'where':{'id':_0x5be97e[_0x6a6a('0x53')]['id']}})['then'](handleEntityNotFound(_0x26b579,null))[_0x6a6a('0x28')](removeEntity(_0x26b579,null))['catch'](handleError(_0x26b579,null));}; \ No newline at end of file +var _0x92b7=['get','Pauses','UserProfileResource','destroy','sendStatus','error','stack','name','send','index','map','fieldName','type','keys','filters','intersection','query','attributes','fields','model','hasOwnProperty','nolimit','sort','where','pick','filter','VIRTUAL','merge','options','Pause','includeAll','findAll','catch','show','params','rawAttributes','length','include','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','userProfileId','autoAssociation','update','eml-format','zip-dir','fast-json-patch','moment','bluebird','mustache','util','to-csv','ejs','fs-extra','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','status','end','json','offset','limit','count','set','Content-Range','apply','save','then'];(function(_0x339ec8,_0x10c64c){var _0x56a11f=function(_0x9ea856){while(--_0x9ea856){_0x339ec8['push'](_0x339ec8['shift']());}};_0x56a11f(++_0x10c64c);}(_0x92b7,0x125));var _0x792b=function(_0x123f6c,_0x3e34bc){_0x123f6c=_0x123f6c-0x0;var _0x1a35d0=_0x92b7[_0x123f6c];return _0x1a35d0;};'use strict';var emlformat=require(_0x792b('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x792b('0x1'));var jsonpatch=require(_0x792b('0x2'));var rp=require('request-promise');var moment=require(_0x792b('0x3'));var BPromise=require(_0x792b('0x4'));var Mustache=require(_0x792b('0x5'));var util=require(_0x792b('0x6'));var path=require('path');var sox=require('sox');var csv=require(_0x792b('0x7'));var ejs=require(_0x792b('0x8'));var fs=require('fs');var fs_extra=require(_0x792b('0x9'));var _=require('lodash');var squel=require(_0x792b('0xa'));var crypto=require(_0x792b('0xb'));var jsforce=require(_0x792b('0xc'));var deskjs=require(_0x792b('0xd'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x792b('0xe'));var Redis=require(_0x792b('0xf'));var authService=require(_0x792b('0x10'));var qs=require(_0x792b('0x11'));var as=require(_0x792b('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x792b('0x13'))(_0x792b('0x14'));var utils=require(_0x792b('0x15'));var config=require(_0x792b('0x16'));var licenseUtil=require(_0x792b('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x4b95e3,_0x368055){_0x368055=_0x368055||0xcc;return function(_0x4d3937){if(_0x4d3937){return _0x4b95e3['sendStatus'](_0x368055);}return _0x4b95e3[_0x792b('0x18')](_0x368055)[_0x792b('0x19')]();};}function respondWithResult(_0x4b1d92,_0x1403be){_0x1403be=_0x1403be||0xc8;return function(_0x4cbe30){if(_0x4cbe30){return _0x4b1d92['status'](_0x1403be)[_0x792b('0x1a')](_0x4cbe30);}};}function respondWithFilteredResult(_0x485122,_0x1bb3c0){return function(_0x38e63b){if(_0x38e63b){var _0x2b9197=typeof _0x1bb3c0[_0x792b('0x1b')]==='undefined'&&typeof _0x1bb3c0[_0x792b('0x1c')]==='undefined';var _0x29a4d0=_0x38e63b[_0x792b('0x1d')];var _0x119cb1=_0x2b9197?0x0:_0x1bb3c0[_0x792b('0x1b')];var _0xec620c=_0x2b9197?_0x38e63b[_0x792b('0x1d')]:_0x1bb3c0[_0x792b('0x1b')]+_0x1bb3c0['limit'];var _0x2e3de1;if(_0xec620c>=_0x29a4d0){_0xec620c=_0x29a4d0;_0x2e3de1=0xc8;}else{_0x2e3de1=0xce;}_0x485122[_0x792b('0x18')](_0x2e3de1);return _0x485122[_0x792b('0x1e')](_0x792b('0x1f'),_0x119cb1+'-'+_0xec620c+'/'+_0x29a4d0)[_0x792b('0x1a')](_0x38e63b);}return null;};}function patchUpdates(_0x4c1a6b){return function(_0x3a77a2){try{jsonpatch[_0x792b('0x20')](_0x3a77a2,_0x4c1a6b,!![]);}catch(_0x250abd){return BPromise['reject'](_0x250abd);}return _0x3a77a2[_0x792b('0x21')]();};}function saveUpdates(_0x397464,_0x2caba9){return function(_0x4152cc){if(_0x4152cc){return _0x4152cc['update'](_0x397464)[_0x792b('0x22')](function(_0x21119e){return _0x21119e;});}return null;};}function removeEntity(_0x4869fb,_0x219d74){return function(_0x589e79){if(_0x589e79){return _0x589e79['destroy']()[_0x792b('0x22')](function(){var _0x57e7e4=_0x589e79[_0x792b('0x23')]({'plain':!![]});var _0x1a826b=_0x792b('0x24');return db[_0x792b('0x25')][_0x792b('0x26')]({'where':{'type':_0x1a826b,'resourceId':_0x57e7e4['id']}})[_0x792b('0x22')](function(){return _0x589e79;});})[_0x792b('0x22')](function(){_0x4869fb['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x4156b5,_0x3664cc){return function(_0x38a365){if(!_0x38a365){_0x4156b5[_0x792b('0x27')](0x194);}return _0x38a365;};}function handleError(_0x49da32,_0x48466b){_0x48466b=_0x48466b||0x1f4;return function(_0xacf27c){logger[_0x792b('0x28')](_0xacf27c[_0x792b('0x29')]);if(_0xacf27c[_0x792b('0x2a')]){delete _0xacf27c[_0x792b('0x2a')];}_0x49da32['status'](_0x48466b)[_0x792b('0x2b')](_0xacf27c);};}exports[_0x792b('0x2c')]=function(_0x30cfef,_0x15d156){var _0x2cb54e={},_0x251ec9={},_0x3c9ee6={'count':0x0,'rows':[]};var _0x186b02=_[_0x792b('0x2d')](db['Pause']['rawAttributes'],function(_0x2b37b9){return{'name':_0x2b37b9[_0x792b('0x2e')],'type':_0x2b37b9[_0x792b('0x2f')]['key']};});_0x251ec9['model']=_[_0x792b('0x2d')](_0x186b02,_0x792b('0x2a'));_0x251ec9['query']=_[_0x792b('0x30')](_0x30cfef['query']);_0x251ec9[_0x792b('0x31')]=_[_0x792b('0x32')](_0x251ec9['model'],_0x251ec9[_0x792b('0x33')]);_0x2cb54e[_0x792b('0x34')]=_[_0x792b('0x32')](_0x251ec9['model'],qs['fields'](_0x30cfef[_0x792b('0x33')][_0x792b('0x35')]));_0x2cb54e['attributes']=_0x2cb54e[_0x792b('0x34')]['length']?_0x2cb54e[_0x792b('0x34')]:_0x251ec9[_0x792b('0x36')];if(!_0x30cfef[_0x792b('0x33')][_0x792b('0x37')](_0x792b('0x38'))){_0x2cb54e[_0x792b('0x1c')]=qs[_0x792b('0x1c')](_0x30cfef['query'][_0x792b('0x1c')]);_0x2cb54e[_0x792b('0x1b')]=qs[_0x792b('0x1b')](_0x30cfef[_0x792b('0x33')][_0x792b('0x1b')]);}_0x2cb54e['order']=qs[_0x792b('0x39')](_0x30cfef['query'][_0x792b('0x39')]);_0x2cb54e[_0x792b('0x3a')]=qs[_0x792b('0x31')](_[_0x792b('0x3b')](_0x30cfef[_0x792b('0x33')],_0x251ec9['filters']),_0x186b02);if(_0x30cfef[_0x792b('0x33')][_0x792b('0x3c')]){_0x2cb54e['where']=_['merge'](_0x2cb54e['where'],{'$or':_['map'](_0x186b02,function(_0x24af64){if(_0x24af64[_0x792b('0x2f')]!==_0x792b('0x3d')){var _0x155193={};_0x155193[_0x24af64[_0x792b('0x2a')]]={'$like':'%'+_0x30cfef[_0x792b('0x33')][_0x792b('0x3c')]+'%'};return _0x155193;}})});}_0x2cb54e=_[_0x792b('0x3e')]({},_0x2cb54e,_0x30cfef[_0x792b('0x3f')]);var _0x2213f4={'where':_0x2cb54e[_0x792b('0x3a')]};return db[_0x792b('0x40')][_0x792b('0x1d')](_0x2213f4)[_0x792b('0x22')](function(_0x4d1294){_0x3c9ee6[_0x792b('0x1d')]=_0x4d1294;if(_0x30cfef[_0x792b('0x33')][_0x792b('0x41')]){_0x2cb54e['include']=[{'all':!![]}];}return db[_0x792b('0x40')][_0x792b('0x42')](_0x2cb54e);})['then'](function(_0x25ad4d){_0x3c9ee6['rows']=_0x25ad4d;return _0x3c9ee6;})[_0x792b('0x22')](respondWithFilteredResult(_0x15d156,_0x2cb54e))[_0x792b('0x43')](handleError(_0x15d156,null));};exports[_0x792b('0x44')]=function(_0x459a18,_0x5cc9d8){var _0x14ac20={'raw':!![],'where':{'id':_0x459a18[_0x792b('0x45')]['id']}},_0x1ce2e3={};_0x1ce2e3[_0x792b('0x36')]=_[_0x792b('0x30')](db['Pause'][_0x792b('0x46')]);_0x1ce2e3[_0x792b('0x33')]=_[_0x792b('0x30')](_0x459a18[_0x792b('0x33')]);_0x1ce2e3['filters']=_[_0x792b('0x32')](_0x1ce2e3[_0x792b('0x36')],_0x1ce2e3[_0x792b('0x33')]);_0x14ac20[_0x792b('0x34')]=_[_0x792b('0x32')](_0x1ce2e3[_0x792b('0x36')],qs[_0x792b('0x35')](_0x459a18[_0x792b('0x33')][_0x792b('0x35')]));_0x14ac20[_0x792b('0x34')]=_0x14ac20[_0x792b('0x34')][_0x792b('0x47')]?_0x14ac20['attributes']:_0x1ce2e3[_0x792b('0x36')];if(_0x459a18[_0x792b('0x33')][_0x792b('0x41')]){_0x14ac20[_0x792b('0x48')]=[{'all':!![]}];}_0x14ac20=_[_0x792b('0x3e')]({},_0x14ac20,_0x459a18[_0x792b('0x3f')]);return db[_0x792b('0x40')][_0x792b('0x49')](_0x14ac20)[_0x792b('0x22')](handleEntityNotFound(_0x5cc9d8,null))[_0x792b('0x22')](respondWithResult(_0x5cc9d8,null))[_0x792b('0x43')](handleError(_0x5cc9d8,null));};exports[_0x792b('0x4a')]=function(_0x286025,_0x3a5161){return db[_0x792b('0x40')][_0x792b('0x4a')](_0x286025[_0x792b('0x4b')],{})[_0x792b('0x22')](function(_0x3ed3c1){var _0x120902=_0x286025[_0x792b('0x4c')]['get']({'plain':!![]});if(!_0x120902)throw new Error(_0x792b('0x4d'));if(_0x120902['role']===_0x792b('0x4c')){var _0x11295b=_0x3ed3c1[_0x792b('0x23')]({'plain':!![]});var _0x116627='Pauses';return db[_0x792b('0x4e')][_0x792b('0x49')]({'where':{'name':_0x116627,'userProfileId':_0x120902[_0x792b('0x4f')]},'raw':!![]})['then'](function(_0x5e2a9b){if(_0x5e2a9b&&_0x5e2a9b[_0x792b('0x50')]===0x0){return db[_0x792b('0x25')][_0x792b('0x4a')]({'name':_0x11295b[_0x792b('0x2a')],'resourceId':_0x11295b['id'],'type':_0x5e2a9b['name'],'sectionId':_0x5e2a9b['id']},{})[_0x792b('0x22')](function(){return _0x3ed3c1;});}else{return _0x3ed3c1;}})[_0x792b('0x43')](function(_0x3cb722){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x3cb722);throw _0x3cb722;});}return _0x3ed3c1;})[_0x792b('0x22')](respondWithResult(_0x3a5161,0xc9))[_0x792b('0x43')](handleError(_0x3a5161,null));};exports[_0x792b('0x51')]=function(_0x1e74bf,_0x21f248){if(_0x1e74bf[_0x792b('0x4b')]['id']){delete _0x1e74bf[_0x792b('0x4b')]['id'];}return db[_0x792b('0x40')][_0x792b('0x49')]({'where':{'id':_0x1e74bf[_0x792b('0x45')]['id']}})[_0x792b('0x22')](handleEntityNotFound(_0x21f248,null))[_0x792b('0x22')](saveUpdates(_0x1e74bf[_0x792b('0x4b')],null))[_0x792b('0x22')](respondWithResult(_0x21f248,null))['catch'](handleError(_0x21f248,null));};exports[_0x792b('0x26')]=function(_0x236bd7,_0x13c496){return db['Pause'][_0x792b('0x49')]({'where':{'id':_0x236bd7[_0x792b('0x45')]['id']}})[_0x792b('0x22')](handleEntityNotFound(_0x13c496,null))[_0x792b('0x22')](removeEntity(_0x13c496,null))[_0x792b('0x43')](handleError(_0x13c496,null));}; \ No newline at end of file diff --git a/server/api/pause/pause.model.js b/server/api/pause/pause.model.js index ba6fe35..7769f8d 100644 --- a/server/api/pause/pause.model.js +++ b/server/api/pause/pause.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5fc3=['lodash','util','api','moment','bluebird','request-promise','path','../../config/environment','./pause.attributes','exports','define','tools_pauses'];(function(_0xf6d312,_0x546239){var _0x36a95e=function(_0x249a6a){while(--_0x249a6a){_0xf6d312['push'](_0xf6d312['shift']());}};_0x36a95e(++_0x546239);}(_0x5fc3,0xa8));var _0x35fc=function(_0x53abe5,_0x33a9e5){_0x53abe5=_0x53abe5-0x0;var _0xc1c37e=_0x5fc3[_0x53abe5];return _0xc1c37e;};'use strict';var _=require(_0x35fc('0x0'));var util=require(_0x35fc('0x1'));var logger=require('../../config/logger')(_0x35fc('0x2'));var moment=require(_0x35fc('0x3'));var BPromise=require(_0x35fc('0x4'));var rp=require(_0x35fc('0x5'));var fs=require('fs');var path=require(_0x35fc('0x6'));var rimraf=require('rimraf');var config=require(_0x35fc('0x7'));var attributes=require(_0x35fc('0x8'));module[_0x35fc('0x9')]=function(_0x5b85ad,_0x5754be){return _0x5b85ad[_0x35fc('0xa')]('Pause',attributes,{'tableName':_0x35fc('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xabce=['util','../../config/logger','api','moment','path','rimraf','../../config/environment','define','tools_pauses','lodash'];(function(_0x3a4f3a,_0x3466a7){var _0x11e586=function(_0x222b0a){while(--_0x222b0a){_0x3a4f3a['push'](_0x3a4f3a['shift']());}};_0x11e586(++_0x3466a7);}(_0xabce,0x103));var _0xeabc=function(_0x20c9b2,_0x55d7b1){_0x20c9b2=_0x20c9b2-0x0;var _0x2c6030=_0xabce[_0x20c9b2];return _0x2c6030;};'use strict';var _=require(_0xeabc('0x0'));var util=require(_0xeabc('0x1'));var logger=require(_0xeabc('0x2'))(_0xeabc('0x3'));var moment=require(_0xeabc('0x4'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xeabc('0x5'));var rimraf=require(_0xeabc('0x6'));var config=require(_0xeabc('0x7'));var attributes=require('./pause.attributes');module['exports']=function(_0x1b07a8,_0x52a4d7){return _0x1b07a8[_0xeabc('0x8')]('Pause',attributes,{'tableName':_0xeabc('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/pause/pause.rpc.js b/server/api/pause/pause.rpc.js index c312ac4..24db7b2 100644 --- a/server/api/pause/pause.rpc.js +++ b/server/api/pause/pause.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb10b=['catch','lodash','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','Pause,\x20%s,\x20%s','Pause,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','ShowPause','Pause','find','options','raw','where','attributes','map','include','model','debug'];(function(_0x205674,_0x46b352){var _0x368299=function(_0x2bf8b5){while(--_0x2bf8b5){_0x205674['push'](_0x205674['shift']());}};_0x368299(++_0x46b352);}(_0xb10b,0x12a));var _0xbb10=function(_0x1b5cc2,_0x4321c2){_0x1b5cc2=_0x1b5cc2-0x0;var _0x375f3b=_0xb10b[_0x1b5cc2];return _0x375f3b;};'use strict';var _=require(_0xbb10('0x0'));var util=require('util');var moment=require(_0xbb10('0x1'));var BPromise=require(_0xbb10('0x2'));var rs=require(_0xbb10('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xbb10('0x4'))['db'];var utils=require(_0xbb10('0x5'));var logger=require(_0xbb10('0x6'))(_0xbb10('0x7'));var config=require(_0xbb10('0x8'));var jayson=require(_0xbb10('0x9'));var client=jayson['client'][_0xbb10('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3cdd53,_0x513741,_0x1b9e94){return new BPromise(function(_0x3fb675,_0x21370f){return client[_0xbb10('0xb')](_0x3cdd53,_0x1b9e94)[_0xbb10('0xc')](function(_0x1ce33e){logger[_0xbb10('0xd')](_0xbb10('0xe'),_0x513741,'request\x20sent');logger['debug'](_0xbb10('0xf'),_0x513741,_0xbb10('0x10'),JSON[_0xbb10('0x11')](_0x1ce33e));if(_0x1ce33e['error']){if(_0x1ce33e[_0xbb10('0x12')]['code']===0x1f4){logger[_0xbb10('0x12')](_0xbb10('0xe'),_0x513741,_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);return _0x21370f(_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);}logger['error'](_0xbb10('0xe'),_0x513741,_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);return _0x3fb675(_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);}else{logger[_0xbb10('0xd')](_0xbb10('0xe'),_0x513741,_0xbb10('0x10'));_0x3fb675(_0x1ce33e[_0xbb10('0x14')][_0xbb10('0x13')]);}})['catch'](function(_0x2eca0f){logger[_0xbb10('0x12')](_0xbb10('0xe'),_0x513741,_0x2eca0f);_0x21370f(_0x2eca0f);});});}exports[_0xbb10('0x15')]=function(_0x378da8){var _0x1682a4=this;return new Promise(function(_0x575cca,_0x30efc6){return db[_0xbb10('0x16')][_0xbb10('0x17')]({'raw':_0x378da8['options']?_0x378da8[_0xbb10('0x18')][_0xbb10('0x19')]===undefined?!![]:![]:!![],'where':_0x378da8[_0xbb10('0x18')]?_0x378da8[_0xbb10('0x18')][_0xbb10('0x1a')]||null:null,'attributes':_0x378da8[_0xbb10('0x18')]?_0x378da8['options'][_0xbb10('0x1b')]||null:null,'include':_0x378da8[_0xbb10('0x18')]?_0x378da8['options']['include']?_[_0xbb10('0x1c')](_0x378da8[_0xbb10('0x18')][_0xbb10('0x1d')],function(_0x317da4){return{'model':db[_0x317da4[_0xbb10('0x1e')]],'as':_0x317da4['as'],'attributes':_0x317da4[_0xbb10('0x1b')],'include':_0x317da4[_0xbb10('0x1d')]?_[_0xbb10('0x1c')](_0x317da4[_0xbb10('0x1d')],function(_0x395404){return{'model':db[_0x395404[_0xbb10('0x1e')]],'as':_0x395404['as'],'attributes':_0x395404[_0xbb10('0x1b')],'include':_0x395404['include']?_['map'](_0x395404['include'],function(_0xc93a04){return{'model':db[_0xc93a04[_0xbb10('0x1e')]],'as':_0xc93a04['as'],'attributes':_0xc93a04[_0xbb10('0x1b')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x2fdde9){logger[_0xbb10('0xd')](_0xbb10('0x15'),_0x378da8);logger[_0xbb10('0x1f')](_0xbb10('0x15'),_0x378da8,JSON[_0xbb10('0x11')](_0x2fdde9));_0x575cca(_0x2fdde9);})[_0xbb10('0x20')](function(_0x4aabb9){logger[_0xbb10('0x12')](_0xbb10('0x15'),_0x4aabb9[_0xbb10('0x13')],_0x378da8);_0x30efc6(_0x1682a4[_0xbb10('0x12')](0x1f4,_0x4aabb9[_0xbb10('0x13')]));});});}; \ No newline at end of file +var _0xb10b=['catch','lodash','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','Pause,\x20%s,\x20%s','Pause,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','ShowPause','Pause','find','options','raw','where','attributes','map','include','model','debug'];(function(_0x30eb69,_0x5d5405){var _0x14772=function(_0x4a47a4){while(--_0x4a47a4){_0x30eb69['push'](_0x30eb69['shift']());}};_0x14772(++_0x5d5405);}(_0xb10b,0x12a));var _0xbb10=function(_0x3ae34a,_0x143082){_0x3ae34a=_0x3ae34a-0x0;var _0x4c9edc=_0xb10b[_0x3ae34a];return _0x4c9edc;};'use strict';var _=require(_0xbb10('0x0'));var util=require('util');var moment=require(_0xbb10('0x1'));var BPromise=require(_0xbb10('0x2'));var rs=require(_0xbb10('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xbb10('0x4'))['db'];var utils=require(_0xbb10('0x5'));var logger=require(_0xbb10('0x6'))(_0xbb10('0x7'));var config=require(_0xbb10('0x8'));var jayson=require(_0xbb10('0x9'));var client=jayson['client'][_0xbb10('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3cdd53,_0x513741,_0x1b9e94){return new BPromise(function(_0x3fb675,_0x21370f){return client[_0xbb10('0xb')](_0x3cdd53,_0x1b9e94)[_0xbb10('0xc')](function(_0x1ce33e){logger[_0xbb10('0xd')](_0xbb10('0xe'),_0x513741,'request\x20sent');logger['debug'](_0xbb10('0xf'),_0x513741,_0xbb10('0x10'),JSON[_0xbb10('0x11')](_0x1ce33e));if(_0x1ce33e['error']){if(_0x1ce33e[_0xbb10('0x12')]['code']===0x1f4){logger[_0xbb10('0x12')](_0xbb10('0xe'),_0x513741,_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);return _0x21370f(_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);}logger['error'](_0xbb10('0xe'),_0x513741,_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);return _0x3fb675(_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);}else{logger[_0xbb10('0xd')](_0xbb10('0xe'),_0x513741,_0xbb10('0x10'));_0x3fb675(_0x1ce33e[_0xbb10('0x14')][_0xbb10('0x13')]);}})['catch'](function(_0x2eca0f){logger[_0xbb10('0x12')](_0xbb10('0xe'),_0x513741,_0x2eca0f);_0x21370f(_0x2eca0f);});});}exports[_0xbb10('0x15')]=function(_0x378da8){var _0x1682a4=this;return new Promise(function(_0x575cca,_0x30efc6){return db[_0xbb10('0x16')][_0xbb10('0x17')]({'raw':_0x378da8['options']?_0x378da8[_0xbb10('0x18')][_0xbb10('0x19')]===undefined?!![]:![]:!![],'where':_0x378da8[_0xbb10('0x18')]?_0x378da8[_0xbb10('0x18')][_0xbb10('0x1a')]||null:null,'attributes':_0x378da8[_0xbb10('0x18')]?_0x378da8['options'][_0xbb10('0x1b')]||null:null,'include':_0x378da8[_0xbb10('0x18')]?_0x378da8['options']['include']?_[_0xbb10('0x1c')](_0x378da8[_0xbb10('0x18')][_0xbb10('0x1d')],function(_0x317da4){return{'model':db[_0x317da4[_0xbb10('0x1e')]],'as':_0x317da4['as'],'attributes':_0x317da4[_0xbb10('0x1b')],'include':_0x317da4[_0xbb10('0x1d')]?_[_0xbb10('0x1c')](_0x317da4[_0xbb10('0x1d')],function(_0x395404){return{'model':db[_0x395404[_0xbb10('0x1e')]],'as':_0x395404['as'],'attributes':_0x395404[_0xbb10('0x1b')],'include':_0x395404['include']?_['map'](_0x395404['include'],function(_0xc93a04){return{'model':db[_0xc93a04[_0xbb10('0x1e')]],'as':_0xc93a04['as'],'attributes':_0xc93a04[_0xbb10('0x1b')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x2fdde9){logger[_0xbb10('0xd')](_0xbb10('0x15'),_0x378da8);logger[_0xbb10('0x1f')](_0xbb10('0x15'),_0x378da8,JSON[_0xbb10('0x11')](_0x2fdde9));_0x575cca(_0x2fdde9);})[_0xbb10('0x20')](function(_0x4aabb9){logger[_0xbb10('0x12')](_0xbb10('0x15'),_0x4aabb9[_0xbb10('0x13')],_0x378da8);_0x30efc6(_0x1682a4[_0xbb10('0x12')](0x1f4,_0x4aabb9[_0xbb10('0x13')]));});});}; \ No newline at end of file diff --git a/server/api/plugin/index.js b/server/api/plugin/index.js index 9bbe437..3ed420f 100644 --- a/server/api/plugin/index.js +++ b/server/api/plugin/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9bde=['exports','util','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./plugin.controller','get','index','/webhook','webhookGet','/:id','isAuthenticated','show','/:id/download','diskStorage','join','root','server/files/plugins','originalname','replace','format','extname','now','post','file','upload','webhookPost','put','delete'];(function(_0x2109e5,_0x34ec5e){var _0x504a76=function(_0x2f6dc7){while(--_0x2f6dc7){_0x2109e5['push'](_0x2109e5['shift']());}};_0x504a76(++_0x34ec5e);}(_0x9bde,0xe1));var _0xe9bd=function(_0x1f6973,_0x4edaed){_0x1f6973=_0x1f6973-0x0;var _0x8236d1=_0x9bde[_0x1f6973];return _0x8236d1;};'use strict';var multer=require('multer');var util=require(_0xe9bd('0x0'));var path=require('path');var timeout=require(_0xe9bd('0x1'));var express=require('express');var router=express[_0xe9bd('0x2')]();var fs_extra=require(_0xe9bd('0x3'));var auth=require(_0xe9bd('0x4'));var interaction=require(_0xe9bd('0x5'));var config=require(_0xe9bd('0x6'));var controller=require(_0xe9bd('0x7'));router[_0xe9bd('0x8')]('/',auth['isAuthenticated'](),controller[_0xe9bd('0x9')]);router[_0xe9bd('0x8')](_0xe9bd('0xa'),controller[_0xe9bd('0xb')]);router[_0xe9bd('0x8')](_0xe9bd('0xc'),auth[_0xe9bd('0xd')](),controller[_0xe9bd('0xe')]);router[_0xe9bd('0x8')](_0xe9bd('0xf'),auth['isAuthenticated'](),controller['download']);var upload=multer({'storage':multer[_0xe9bd('0x10')]({'destination':function(_0x145521,_0x2601ac,_0x581ab9){_0x581ab9(null,path[_0xe9bd('0x11')](config[_0xe9bd('0x12')],_0xe9bd('0x13')));},'filename':function(_0x141587,_0x5e022a,_0x2c1d98){_0x5e022a['originalname']=_0x5e022a[_0xe9bd('0x14')][_0xe9bd('0x15')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x2c1d98(null,util[_0xe9bd('0x16')]('%s-%s%s',path['basename'](_0x5e022a[_0xe9bd('0x14')],path[_0xe9bd('0x17')](_0x5e022a[_0xe9bd('0x14')])),Date[_0xe9bd('0x18')](),path[_0xe9bd('0x17')](_0x5e022a[_0xe9bd('0x14')])));}})});router[_0xe9bd('0x19')]('/',upload['single'](_0xe9bd('0x1a')),controller[_0xe9bd('0x1b')]);router[_0xe9bd('0x19')]('/webhook',controller[_0xe9bd('0x1c')]);router[_0xe9bd('0x1d')](_0xe9bd('0xc'),auth[_0xe9bd('0xd')](),controller['update']);router[_0xe9bd('0x1e')]('/:id',auth[_0xe9bd('0xd')](),controller['delete']);module[_0xe9bd('0x1f')]=router; \ No newline at end of file +var _0x6334=['../../components/interaction/service','../../config/environment','./plugin.controller','get','isAuthenticated','index','/webhook','/:id','show','/:id/download','download','diskStorage','join','root','format','%s-%s%s','extname','now','originalname','post','file','upload','webhookPost','put','update','multer','util','path','connect-timeout','express','Router','../../components/auth/service'];(function(_0x447e1d,_0x16deca){var _0x58cacd=function(_0x170d32){while(--_0x170d32){_0x447e1d['push'](_0x447e1d['shift']());}};_0x58cacd(++_0x16deca);}(_0x6334,0x119));var _0x4633=function(_0xd0b415,_0x149675){_0xd0b415=_0xd0b415-0x0;var _0x2bdf2c=_0x6334[_0xd0b415];return _0x2bdf2c;};'use strict';var multer=require(_0x4633('0x0'));var util=require(_0x4633('0x1'));var path=require(_0x4633('0x2'));var timeout=require(_0x4633('0x3'));var express=require(_0x4633('0x4'));var router=express[_0x4633('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0x4633('0x6'));var interaction=require(_0x4633('0x7'));var config=require(_0x4633('0x8'));var controller=require(_0x4633('0x9'));router[_0x4633('0xa')]('/',auth[_0x4633('0xb')](),controller[_0x4633('0xc')]);router['get'](_0x4633('0xd'),controller['webhookGet']);router[_0x4633('0xa')](_0x4633('0xe'),auth['isAuthenticated'](),controller[_0x4633('0xf')]);router[_0x4633('0xa')](_0x4633('0x10'),auth['isAuthenticated'](),controller[_0x4633('0x11')]);var upload=multer({'storage':multer[_0x4633('0x12')]({'destination':function(_0x5157a7,_0x6a63b,_0x3d5182){_0x3d5182(null,path[_0x4633('0x13')](config[_0x4633('0x14')],'server/files/plugins'));},'filename':function(_0x73b5e4,_0xad405,_0x438e87){_0xad405['originalname']=_0xad405['originalname']['replace'](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x438e87(null,util[_0x4633('0x15')](_0x4633('0x16'),path['basename'](_0xad405['originalname'],path[_0x4633('0x17')](_0xad405['originalname'])),Date[_0x4633('0x18')](),path[_0x4633('0x17')](_0xad405[_0x4633('0x19')])));}})});router[_0x4633('0x1a')]('/',upload['single'](_0x4633('0x1b')),controller[_0x4633('0x1c')]);router[_0x4633('0x1a')]('/webhook',controller[_0x4633('0x1d')]);router[_0x4633('0x1e')](_0x4633('0xe'),auth[_0x4633('0xb')](),controller[_0x4633('0x1f')]);router['delete'](_0x4633('0xe'),auth[_0x4633('0xb')](),controller['delete']);module['exports']=router; \ No newline at end of file diff --git a/server/api/plugin/plugin.attributes.js b/server/api/plugin/plugin.attributes.js index 05e44fc..2fc18ea 100644 --- a/server/api/plugin/plugin.attributes.js +++ b/server/api/plugin/plugin.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1179=['The\x20physical\x20path\x20where\x20the\x20plugin\x20is\x20stored.','BOOLEAN','Indicates\x20whether\x20the\x20plugin\x20is\x20installed.\x20Updated\x20when\x20the\x20plugin\x20is\x20installed/uninstalled.','adminOnly','agentOnly','never','always','exports','STRING','ENUM','html','TEXT'];(function(_0x4c2854,_0xd1b0d8){var _0x19104a=function(_0x3a9d09){while(--_0x3a9d09){_0x4c2854['push'](_0x4c2854['shift']());}};_0x19104a(++_0xd1b0d8);}(_0x1179,0x133));var _0x9117=function(_0x11b1b3,_0xf3cc69){_0x11b1b3=_0x11b1b3-0x0;var _0x437029=_0x1179[_0x11b1b3];return _0x437029;};'use strict';var Sequelize=require('sequelize');module[_0x9117('0x0')]={'name':{'type':Sequelize[_0x9117('0x1')]},'type':{'type':Sequelize[_0x9117('0x2')](_0x9117('0x3'),'script')},'description':{'type':Sequelize[_0x9117('0x4')]},'version':{'type':Sequelize[_0x9117('0x4')]},'path':{'type':Sequelize[_0x9117('0x1')],'comment':_0x9117('0x5')},'active':{'type':Sequelize[_0x9117('0x6')],'defaultValue':0x0,'comment':_0x9117('0x7')},'sidebar':{'type':Sequelize[_0x9117('0x2')](_0x9117('0x8'),_0x9117('0x9'),'always',_0x9117('0xa')),'defaultValue':_0x9117('0xb'),'comment':'Indicates\x20whether\x20to\x20display\x20the\x20plugin\x20in\x20the\x20sidebar.'},'icon':{'type':Sequelize[_0x9117('0x1')]},'adminUrl':{'type':Sequelize[_0x9117('0x1')]},'agentUrl':{'type':Sequelize[_0x9117('0x1')]},'scriptName':{'type':Sequelize['STRING']},'scriptPath':{'type':Sequelize[_0x9117('0x1')]}}; \ No newline at end of file +var _0x46d7=['html','TEXT','STRING','The\x20physical\x20path\x20where\x20the\x20plugin\x20is\x20stored.','Indicates\x20whether\x20the\x20plugin\x20is\x20installed.\x20Updated\x20when\x20the\x20plugin\x20is\x20installed/uninstalled.','ENUM','adminOnly','agentOnly','always','never','Indicates\x20whether\x20to\x20display\x20the\x20plugin\x20in\x20the\x20sidebar.','sequelize'];(function(_0x4a4a66,_0x553351){var _0x3bb5b8=function(_0x3e9cc9){while(--_0x3e9cc9){_0x4a4a66['push'](_0x4a4a66['shift']());}};_0x3bb5b8(++_0x553351);}(_0x46d7,0x143));var _0x746d=function(_0x11dca1,_0x10d6b9){_0x11dca1=_0x11dca1-0x0;var _0x3153eb=_0x46d7[_0x11dca1];return _0x3153eb;};'use strict';var Sequelize=require(_0x746d('0x0'));module['exports']={'name':{'type':Sequelize['STRING']},'type':{'type':Sequelize['ENUM'](_0x746d('0x1'),'script')},'description':{'type':Sequelize[_0x746d('0x2')]},'version':{'type':Sequelize[_0x746d('0x2')]},'path':{'type':Sequelize[_0x746d('0x3')],'comment':_0x746d('0x4')},'active':{'type':Sequelize['BOOLEAN'],'defaultValue':0x0,'comment':_0x746d('0x5')},'sidebar':{'type':Sequelize[_0x746d('0x6')](_0x746d('0x7'),_0x746d('0x8'),_0x746d('0x9'),_0x746d('0xa')),'defaultValue':_0x746d('0x9'),'comment':_0x746d('0xb')},'icon':{'type':Sequelize[_0x746d('0x3')]},'adminUrl':{'type':Sequelize[_0x746d('0x3')]},'agentUrl':{'type':Sequelize[_0x746d('0x3')]},'scriptName':{'type':Sequelize['STRING']},'scriptPath':{'type':Sequelize['STRING']}}; \ No newline at end of file diff --git a/server/api/plugin/plugin.controller.js b/server/api/plugin/plugin.controller.js index cd13fea..32c21bd 100644 --- a/server/api/plugin/plugin.controller.js +++ b/server/api/plugin/plugin.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc93b=['webhookGet','\x27PATH\x27\x20parameter\x20not\x20specified','port','\x27PORT\x27\x20parameter\x20not\x20specified','hostname','http://localhost:','encoding','%s%s','headers','content-length','content-type','set','endsWith','statusCode','send','webhookPost','resolve','rimraf','fast-json-patch','moment','bluebird','mustache','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','extract-zip','archiver','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/license/util','defaults','redis','localhost','socket.io-emitter','register','sendStatus','end','json','undefined','limit','count','offset','apply','update','destroy','then','Plugins','UserProfileResource','status','error','name','index','Plugin','rawAttributes','fieldName','type','key','model','map','query','filters','intersection','attributes','fields','length','nolimit','order','sort','pick','filter','where','merge','options','includeAll','include','findAll','rows','catch','show','params','keys','find','download','join','root','server/files/plugins','%s.zip','basename','createWriteStream','zip','code','ENOENT','Sequelize','Error','Error\x20while\x20generating\x20the\x20zip\x20archive','pipe','glob','**/*','path','attachments/**/*','close','existsSync','format','Error\x20while\x20downloading\x20the\x20plugin','info','Download\x20completed','upload','file','filename','Plugin\x20upload\x20filepath:\x20%s','Plugin\x20upload\x20destination:\x20%s','chmodSync','0777','readdirSync','Invalid\x20plugin\x20structure','lstatSync','isFile','isDirectory','manifest.json','Plugin\x20manifest\x20missing','readFileSync','parse','Invalid\x20manifest:\x20type\x20missing','Invalid\x20manifest:\x20parameters\x20missing','html','parameters','Invalid\x20manifest:\x20views\x20missing','views','admin','agent','Invalid\x20manifest:\x20no\x20view\x20specified','scriptName','Invalid\x20manifest:\x20script\x20name\x20missing','Invalid\x20manifest:\x20script\x20path\x20missing','description','sidebar','always','icon','icon-apps','version','Warning:\x20admin\x20view\x20not\x20specified','test','plugins','Warning:\x20agent\x20view\x20not\x20specified','script','scriptPath','create','body','role','Unable\x20to\x20retrieve\x20the\x20current\x20user','user','UserProfileSection','autoAssociation','unlinkSync','Zip\x20archive\x20removed','delete','dirname'];(function(_0x232c55,_0xca886f){var _0x3394b1=function(_0x4a436a){while(--_0x4a436a){_0x232c55['push'](_0x232c55['shift']());}};_0x3394b1(++_0xca886f);}(_0xc93b,0xb9));var _0xbc93=function(_0x17c64b,_0x38ae9c){_0x17c64b=_0x17c64b-0x0;var _0x5ca37f=_0xc93b[_0x17c64b];return _0x5ca37f;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xbc93('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0xbc93('0x1'));var rp=require('request-promise');var moment=require(_0xbc93('0x2'));var BPromise=require(_0xbc93('0x3'));var Mustache=require(_0xbc93('0x4'));var util=require('util');var path=require('path');var sox=require(_0xbc93('0x5'));var csv=require(_0xbc93('0x6'));var ejs=require(_0xbc93('0x7'));var fs=require('fs');var fs_extra=require(_0xbc93('0x8'));var _=require(_0xbc93('0x9'));var squel=require('squel');var crypto=require(_0xbc93('0xa'));var jsforce=require(_0xbc93('0xb'));var deskjs=require(_0xbc93('0xc'));var toCsv=require(_0xbc93('0x6'));var querystring=require(_0xbc93('0xd'));var Papa=require('papaparse');var extract=require(_0xbc93('0xe'));var rimraf=require(_0xbc93('0x0'));var archiver=require(_0xbc93('0xf'));var Redis=require(_0xbc93('0x10'));var authService=require(_0xbc93('0x11'));var qs=require(_0xbc93('0x12'));var as=require(_0xbc93('0x13'));var hardwareService=require(_0xbc93('0x14'));var logger=require(_0xbc93('0x15'))('api');var utils=require(_0xbc93('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0xbc93('0x17'));var db=require('../../mysqldb')['db'];config['redis']=_[_0xbc93('0x18')](config[_0xbc93('0x19')],{'host':_0xbc93('0x1a'),'port':0x18eb});var socket=require(_0xbc93('0x1b'))(new Redis(config[_0xbc93('0x19')]));require('./plugin.socket')[_0xbc93('0x1c')](socket);function respondWithStatusCode(_0x25759b,_0xd5b42c){_0xd5b42c=_0xd5b42c||0xcc;return function(_0x2f66f4){if(_0x2f66f4){return _0x25759b[_0xbc93('0x1d')](_0xd5b42c);}return _0x25759b['status'](_0xd5b42c)[_0xbc93('0x1e')]();};}function respondWithResult(_0x39a9c9,_0x22959d){_0x22959d=_0x22959d||0xc8;return function(_0x38092d){if(_0x38092d){return _0x39a9c9['status'](_0x22959d)[_0xbc93('0x1f')](_0x38092d);}};}function respondWithFilteredResult(_0x2c5201,_0x3213f4){return function(_0x13fdbc){if(_0x13fdbc){var _0x3ef154=typeof _0x3213f4['offset']===_0xbc93('0x20')&&typeof _0x3213f4[_0xbc93('0x21')]===_0xbc93('0x20');var _0x4856b0=_0x13fdbc[_0xbc93('0x22')];var _0x425f01=_0x3ef154?0x0:_0x3213f4[_0xbc93('0x23')];var _0x37055f=_0x3ef154?_0x13fdbc['count']:_0x3213f4[_0xbc93('0x23')]+_0x3213f4[_0xbc93('0x21')];var _0x487581;if(_0x37055f>=_0x4856b0){_0x37055f=_0x4856b0;_0x487581=0xc8;}else{_0x487581=0xce;}_0x2c5201['status'](_0x487581);return _0x2c5201['set']('Content-Range',_0x425f01+'-'+_0x37055f+'/'+_0x4856b0)[_0xbc93('0x1f')](_0x13fdbc);}return null;};}function patchUpdates(_0x59df12){return function(_0x3051ef){try{jsonpatch[_0xbc93('0x24')](_0x3051ef,_0x59df12,!![]);}catch(_0x2fa212){return BPromise['reject'](_0x2fa212);}return _0x3051ef['save']();};}function saveUpdates(_0xfd03ee,_0x54a143){return function(_0x108dc0){if(_0x108dc0){return _0x108dc0[_0xbc93('0x25')](_0xfd03ee)['then'](function(_0xa049cb){return _0xa049cb;});}return null;};}function removeEntity(_0xd58a3d,_0x2e4155){return function(_0x400ef9){if(_0x400ef9){return _0x400ef9[_0xbc93('0x26')]()[_0xbc93('0x27')](function(){var _0x47ac5d=_0x400ef9['get']({'plain':!![]});var _0x14f035=_0xbc93('0x28');return db[_0xbc93('0x29')][_0xbc93('0x26')]({'where':{'type':_0x14f035,'resourceId':_0x47ac5d['id']}})[_0xbc93('0x27')](function(){return _0x400ef9;});})[_0xbc93('0x27')](function(){_0xd58a3d[_0xbc93('0x2a')](0xcc)[_0xbc93('0x1e')]();});}};}function handleEntityNotFound(_0x148e2d,_0x1b7c66){return function(_0x710e54){if(!_0x710e54){_0x148e2d[_0xbc93('0x1d')](0x194);}return _0x710e54;};}function handleError(_0x7b0fe4,_0x2495b6){_0x2495b6=_0x2495b6||0x1f4;return function(_0x465723){logger[_0xbc93('0x2b')](_0x465723['stack']);if(_0x465723[_0xbc93('0x2c')]){delete _0x465723[_0xbc93('0x2c')];}_0x7b0fe4['status'](_0x2495b6)['send'](_0x465723);};}exports[_0xbc93('0x2d')]=function(_0x3bb857,_0xeabcd8){var _0x4f29d8={},_0x3fde0d={},_0x722863={'count':0x0,'rows':[]};var _0x59936c=_['map'](db[_0xbc93('0x2e')][_0xbc93('0x2f')],function(_0x351adb){return{'name':_0x351adb[_0xbc93('0x30')],'type':_0x351adb[_0xbc93('0x31')][_0xbc93('0x32')]};});_0x3fde0d[_0xbc93('0x33')]=_[_0xbc93('0x34')](_0x59936c,_0xbc93('0x2c'));_0x3fde0d[_0xbc93('0x35')]=_['keys'](_0x3bb857[_0xbc93('0x35')]);_0x3fde0d[_0xbc93('0x36')]=_[_0xbc93('0x37')](_0x3fde0d[_0xbc93('0x33')],_0x3fde0d[_0xbc93('0x35')]);_0x4f29d8[_0xbc93('0x38')]=_[_0xbc93('0x37')](_0x3fde0d[_0xbc93('0x33')],qs[_0xbc93('0x39')](_0x3bb857[_0xbc93('0x35')][_0xbc93('0x39')]));_0x4f29d8[_0xbc93('0x38')]=_0x4f29d8[_0xbc93('0x38')][_0xbc93('0x3a')]?_0x4f29d8['attributes']:_0x3fde0d['model'];if(!_0x3bb857[_0xbc93('0x35')]['hasOwnProperty'](_0xbc93('0x3b'))){_0x4f29d8[_0xbc93('0x21')]=qs['limit'](_0x3bb857['query']['limit']);_0x4f29d8['offset']=qs[_0xbc93('0x23')](_0x3bb857[_0xbc93('0x35')][_0xbc93('0x23')]);}_0x4f29d8[_0xbc93('0x3c')]=qs['sort'](_0x3bb857['query'][_0xbc93('0x3d')]);_0x4f29d8['where']=qs[_0xbc93('0x36')](_[_0xbc93('0x3e')](_0x3bb857['query'],_0x3fde0d[_0xbc93('0x36')]),_0x59936c);if(_0x3bb857['query'][_0xbc93('0x3f')]){_0x4f29d8[_0xbc93('0x40')]=_[_0xbc93('0x41')](_0x4f29d8[_0xbc93('0x40')],{'$or':_[_0xbc93('0x34')](_0x59936c,function(_0x347acc){if(_0x347acc[_0xbc93('0x31')]!=='VIRTUAL'){var _0x4666fa={};_0x4666fa[_0x347acc[_0xbc93('0x2c')]]={'$like':'%'+_0x3bb857[_0xbc93('0x35')][_0xbc93('0x3f')]+'%'};return _0x4666fa;}})});}_0x4f29d8=_[_0xbc93('0x41')]({},_0x4f29d8,_0x3bb857[_0xbc93('0x42')]);var _0x1ab693={'where':_0x4f29d8[_0xbc93('0x40')]};return db[_0xbc93('0x2e')][_0xbc93('0x22')](_0x1ab693)[_0xbc93('0x27')](function(_0x5b5660){_0x722863[_0xbc93('0x22')]=_0x5b5660;if(_0x3bb857[_0xbc93('0x35')][_0xbc93('0x43')]){_0x4f29d8[_0xbc93('0x44')]=[{'all':!![]}];}return db[_0xbc93('0x2e')][_0xbc93('0x45')](_0x4f29d8);})[_0xbc93('0x27')](function(_0x2c5d25){_0x722863[_0xbc93('0x46')]=_0x2c5d25;return _0x722863;})[_0xbc93('0x27')](respondWithFilteredResult(_0xeabcd8,_0x4f29d8))[_0xbc93('0x47')](handleError(_0xeabcd8,null));};exports[_0xbc93('0x48')]=function(_0x50ec3a,_0x488df0){var _0x315ac1={'raw':!![],'where':{'id':_0x50ec3a[_0xbc93('0x49')]['id']}},_0x5cbe3b={};_0x5cbe3b[_0xbc93('0x33')]=_['keys'](db[_0xbc93('0x2e')][_0xbc93('0x2f')]);_0x5cbe3b[_0xbc93('0x35')]=_[_0xbc93('0x4a')](_0x50ec3a[_0xbc93('0x35')]);_0x5cbe3b[_0xbc93('0x36')]=_[_0xbc93('0x37')](_0x5cbe3b[_0xbc93('0x33')],_0x5cbe3b[_0xbc93('0x35')]);_0x315ac1['attributes']=_[_0xbc93('0x37')](_0x5cbe3b[_0xbc93('0x33')],qs[_0xbc93('0x39')](_0x50ec3a[_0xbc93('0x35')][_0xbc93('0x39')]));_0x315ac1[_0xbc93('0x38')]=_0x315ac1['attributes'][_0xbc93('0x3a')]?_0x315ac1['attributes']:_0x5cbe3b[_0xbc93('0x33')];if(_0x50ec3a[_0xbc93('0x35')][_0xbc93('0x43')]){_0x315ac1[_0xbc93('0x44')]=[{'all':!![]}];}_0x315ac1=_[_0xbc93('0x41')]({},_0x315ac1,_0x50ec3a[_0xbc93('0x42')]);return db['Plugin'][_0xbc93('0x4b')](_0x315ac1)[_0xbc93('0x27')](handleEntityNotFound(_0x488df0,null))[_0xbc93('0x27')](respondWithResult(_0x488df0,null))[_0xbc93('0x47')](handleError(_0x488df0,null));};exports[_0xbc93('0x4c')]=function(_0x2c55f1,_0xa8dd62,_0x108e24){return db[_0xbc93('0x2e')][_0xbc93('0x4b')]({'where':{'id':_0x2c55f1[_0xbc93('0x49')]['id']},'attributes':[_0xbc93('0x2c'),'path'],'raw':!![]})['then'](handleEntityNotFound(_0xa8dd62,null))['then'](function(_0x684ca8){if(_0x684ca8){var _0x4249ef=path[_0xbc93('0x4d')](config[_0xbc93('0x4e')],_0xbc93('0x4f'),util['format'](_0xbc93('0x50'),path[_0xbc93('0x51')](_0x684ca8['path'])));var _0x37e94d=fs[_0xbc93('0x52')](_0x4249ef);var _0xc3947d=archiver(_0xbc93('0x53'),{'zlib':{'level':0x9}});_0xc3947d['on']('warning',function(_0x1e097b){if(_0x1e097b[_0xbc93('0x54')]===_0xbc93('0x55')){logger[_0xbc93('0x2b')](_0x1e097b);}else{throw new db[(_0xbc93('0x56'))][(_0xbc93('0x57'))](_0xbc93('0x58'));}});_0xc3947d['on'](_0xbc93('0x2b'),function(_0x1cb1e8){throw new db[(_0xbc93('0x56'))][(_0xbc93('0x57'))](_0xbc93('0x58'));});_0xc3947d[_0xbc93('0x59')](_0x37e94d);_0xc3947d[_0xbc93('0x5a')](_0xbc93('0x5b'),{'cwd':path['join'](config[_0xbc93('0x4e')],_0xbc93('0x4f'),path['dirname'](_0x684ca8[_0xbc93('0x5c')])),'ignore':[path[_0xbc93('0x4d')](path[_0xbc93('0x51')](_0x684ca8['path']),'node_modules/**/*'),path[_0xbc93('0x4d')](path['basename'](_0x684ca8[_0xbc93('0x5c')]),_0xbc93('0x5d'))],'nodir':!![]})['finalize']();_0x37e94d['on'](_0xbc93('0x5e'),function(){if(!fs[_0xbc93('0x5f')](_0x4249ef)){throw new db[(_0xbc93('0x56'))][(_0xbc93('0x57'))]('Plugin\x20not\x20found');}return _0xa8dd62[_0xbc93('0x4c')](_0x4249ef,util[_0xbc93('0x60')](_0xbc93('0x50'),path[_0xbc93('0x51')](_0x684ca8[_0xbc93('0x5c')])),function(_0x34cee0){if(_0x34cee0){throw new db['Sequelize'][(_0xbc93('0x57'))](_0xbc93('0x61'));}fs['unlinkSync'](_0x4249ef);logger[_0xbc93('0x62')](_0xbc93('0x63'));logger[_0xbc93('0x62')]('Temporary\x20file\x20removed');});});}return null;})['catch'](handleError(_0xa8dd62,null));};exports[_0xbc93('0x64')]=function(_0x5b5f82,_0x21de1f,_0x1d078b){var _0x488a78=path[_0xbc93('0x51')](_0x5b5f82[_0xbc93('0x65')][_0xbc93('0x66')],path['extname'](_0x5b5f82['file'][_0xbc93('0x66')]));var _0x43c8f3=path[_0xbc93('0x4d')](config[_0xbc93('0x4e')],'server/files/plugins',_0x5b5f82[_0xbc93('0x65')][_0xbc93('0x66')]);var _0x8d3674=path[_0xbc93('0x4d')](config[_0xbc93('0x4e')],_0xbc93('0x4f'),_0x488a78);logger['info'](_0xbc93('0x67'),_0x43c8f3);logger[_0xbc93('0x62')](_0xbc93('0x68'),_0x8d3674);try{fs[_0xbc93('0x69')](_0x43c8f3,parseInt(_0xbc93('0x6a'),0x8));extract(_0x43c8f3,{'dir':_0x8d3674},function(_0x469f40){if(_0x469f40){logger[_0xbc93('0x2b')](_0x469f40);handleError(_0x469f40,!![]);};var _0x21b391=fs[_0xbc93('0x6b')](_0x8d3674);if(_0x21b391[_0xbc93('0x3a')]>0x1){removeReferences(_0x43c8f3,_0x8d3674);logger[_0xbc93('0x2b')](_0xbc93('0x6c'));return _0x1d078b(new Error(_0xbc93('0x6c')));}var _0x437067=fs[_0xbc93('0x6d')](path['join'](_0x8d3674,_0x21b391[0x0]));if(_0x437067[_0xbc93('0x6e')]()){removeReferences(_0x43c8f3,_0x8d3674);logger[_0xbc93('0x2b')](_0xbc93('0x6c'));return _0x1d078b(new Error(_0xbc93('0x6c')));}if(_0x437067[_0xbc93('0x6f')]()){var _0x4da7f9=fs[_0xbc93('0x6b')](path['join'](_0x8d3674,_0x21b391[0x0]));if(_0x4da7f9[_0xbc93('0x3a')]===0x0){removeReferences(_0x43c8f3,_0x8d3674);logger[_0xbc93('0x2b')](_0xbc93('0x6c'));return _0x1d078b(new Error(_0xbc93('0x6c')));}var _0x29d806=_0x4da7f9['some'](function(_0x2e7de7){return _0x2e7de7===_0xbc93('0x70');});if(!_0x29d806){return _0x1d078b(new Error(_0xbc93('0x71')));}var _0x56e709=fs[_0xbc93('0x72')](path[_0xbc93('0x4d')](_0x8d3674,_0x21b391[0x0],_0xbc93('0x70')));var _0x534bd8=JSON[_0xbc93('0x73')](_0x56e709);if('undefined'==typeof _0x534bd8[_0xbc93('0x2c')]){return _0x1d078b(new Error('Invalid\x20manifest:\x20name\x20missing'));}if('undefined'==typeof _0x534bd8[_0xbc93('0x31')]){return _0x1d078b(new Error(_0xbc93('0x74')));}if('undefined'==typeof _0x534bd8['version']){return _0x1d078b(new Error('Invalid\x20manifest:\x20version\x20not\x20specified'));}if(_0xbc93('0x20')==typeof _0x534bd8['parameters']){return _0x1d078b(new Error(_0xbc93('0x75')));}if(_0x534bd8['type']===_0xbc93('0x76')){if(_0xbc93('0x20')==typeof _0x534bd8[_0xbc93('0x77')]['views']){return _0x1d078b(new Error(_0xbc93('0x78')));}if(_0xbc93('0x20')==typeof _0x534bd8[_0xbc93('0x77')][_0xbc93('0x79')][_0xbc93('0x7a')]&&_0xbc93('0x20')==typeof _0x534bd8['parameters'][_0xbc93('0x79')][_0xbc93('0x7b')]){return _0x1d078b(new Error(_0xbc93('0x7c')));}}else if(_0x534bd8[_0xbc93('0x31')]==='script'){if(_0xbc93('0x20')==typeof _0x534bd8['parameters'][_0xbc93('0x7d')]){return _0x1d078b(new Error(_0xbc93('0x7e')));}if('undefined'==typeof _0x534bd8[_0xbc93('0x77')]['scriptPath']){return _0x1d078b(new Error(_0xbc93('0x7f')));}}else{return _0x1d078b(new Error('Invalid\x20manifest:\x20invalid\x20type'));}var _0x21c7ab=_0x534bd8[_0xbc93('0x2c')];var _0x2c6210=_0x534bd8[_0xbc93('0x80')];var _0x5619fa=_0x534bd8[_0xbc93('0x31')];var _0x5d24a1=_0x534bd8[_0xbc93('0x81')]?_0x534bd8['sidebar']:_0xbc93('0x82');var _0x1958d5=_0x534bd8['icon']?_0x534bd8[_0xbc93('0x83')]:_0xbc93('0x84');var _0x47fafb='';var _0x40fb64='';var _0x324484='';var _0x49505d='';var _0x247f58=_0x534bd8[_0xbc93('0x85')];if(_0x5619fa===_0xbc93('0x76')){if('undefined'!=typeof _0x534bd8[_0xbc93('0x77')][_0xbc93('0x79')]['admin']){var _0x2e2b89=_0x534bd8[_0xbc93('0x77')][_0xbc93('0x79')][_0xbc93('0x7a')];if(!/^(f|ht)tps?:\/\//i['test'](_0x2e2b89)){_0x47fafb=path[_0xbc93('0x4d')]('plugins',_0x488a78,_0x21b391[0x0],_0x2e2b89);}else{_0x47fafb=_0x2e2b89;}}else{logger[_0xbc93('0x62')](_0xbc93('0x86'));}if('undefined'!=typeof _0x534bd8[_0xbc93('0x77')]['views'][_0xbc93('0x7b')]){var _0xbea94c=_0x534bd8[_0xbc93('0x77')]['views'][_0xbc93('0x7b')];if(!/^(f|ht)tps?:\/\//i[_0xbc93('0x87')](_0xbea94c)){_0x40fb64=path[_0xbc93('0x4d')](_0xbc93('0x88'),_0x488a78,_0x21b391[0x0],_0xbea94c);}else{_0x40fb64=_0xbea94c;}}else{logger[_0xbc93('0x62')](_0xbc93('0x89'));}}else if(_0x5619fa===_0xbc93('0x8a')){_0x324484=_0x534bd8[_0xbc93('0x77')][_0xbc93('0x7d')];_0x49505d=_0x534bd8[_0xbc93('0x77')][_0xbc93('0x8b')];if(_0xbc93('0x20')!=typeof _0x534bd8[_0xbc93('0x77')][_0xbc93('0x79')]){if('undefined'!=typeof _0x534bd8[_0xbc93('0x77')][_0xbc93('0x79')][_0xbc93('0x7a')]){var _0x2e2b89=_0x534bd8['parameters'][_0xbc93('0x79')][_0xbc93('0x7a')];if(!/^(f|ht)tps?:\/\//i[_0xbc93('0x87')](_0x2e2b89)){_0x47fafb=path[_0xbc93('0x4d')](_0xbc93('0x88'),_0x488a78,_0x21b391[0x0],_0x2e2b89);}else{_0x47fafb=_0x2e2b89;}}if(_0xbc93('0x20')!=typeof _0x534bd8[_0xbc93('0x77')][_0xbc93('0x79')][_0xbc93('0x7b')]){var _0xbea94c=_0x534bd8[_0xbc93('0x77')][_0xbc93('0x79')][_0xbc93('0x7b')];if(!/^(f|ht)tps?:\/\//i[_0xbc93('0x87')](_0xbea94c)){_0x40fb64=path['join'](_0xbc93('0x88'),_0x488a78,_0x21b391[0x0],_0xbea94c);}else{_0x40fb64=_0xbea94c;}}}}var _0x521495={'name':_0x21c7ab,'description':_0x2c6210,'path':path[_0xbc93('0x4d')](_0x488a78,_0x21b391[0x0]),'type':_0x5619fa,'sidebar':_0x5d24a1,'icon':_0x1958d5,'adminUrl':_0x47fafb,'agentUrl':_0x40fb64,'scriptName':_0x324484,'scriptPath':_0x49505d,'version':_0x247f58};removeReferences(_0x43c8f3,null);return db['Plugin'][_0xbc93('0x8c')](_0x521495)[_0xbc93('0x27')](function(_0x34886c){var _0x3aa0cc={'role':_0x5b5f82[_0xbc93('0x8d')][_0xbc93('0x8e')],'userProfileId':_0x5b5f82[_0xbc93('0x8d')]['userProfileId']};if(!_0x3aa0cc)throw new Error(_0xbc93('0x8f'));if(_0x3aa0cc[_0xbc93('0x8e')]===_0xbc93('0x90')){var _0xd8ef65=_0x34886c['get']({'plain':!![]});return db[_0xbc93('0x91')]['find']({'where':{'name':_0xbc93('0x28'),'userProfileId':_0x3aa0cc['userProfileId']},'raw':!![]})[_0xbc93('0x27')](function(_0x294ce0){if(_0x294ce0&&_0x294ce0[_0xbc93('0x92')]===0x0){return db['UserProfileResource'][_0xbc93('0x8c')]({'name':_0xd8ef65['name'],'resourceId':_0xd8ef65['id'],'type':_0x294ce0[_0xbc93('0x2c')],'sectionId':_0x294ce0['id']},{})[_0xbc93('0x27')](function(){return _0x34886c;});}else{return _0x34886c;}})[_0xbc93('0x47')](function(_0x15e27b){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x15e27b);throw _0x15e27b;});}return _0x34886c;})[_0xbc93('0x27')](respondWithResult(_0x21de1f,null))[_0xbc93('0x47')](handleError(_0x21de1f,null));}});}catch(_0x59c837){_0x21de1f[_0xbc93('0x2a')](0x1f4)['send'](_0x59c837);}};function removeReferences(_0x490f72,_0x84a2fd){try{if(_0x490f72){fs[_0xbc93('0x93')](_0x490f72);logger[_0xbc93('0x62')](_0xbc93('0x94'));}if(_0x84a2fd){rimraf(_0x84a2fd,function(){});logger[_0xbc93('0x62')]('Extracted\x20folder\x20removed');}}catch(_0x2e1931){logger[_0xbc93('0x2b')](_0x2e1931);}}exports[_0xbc93('0x25')]=function(_0x3fa9f1,_0x2ec8b1,_0x3d5684){return db[_0xbc93('0x2e')][_0xbc93('0x4b')]({'where':{'id':_0x3fa9f1[_0xbc93('0x49')]['id']}})['then'](handleEntityNotFound(_0x2ec8b1,null))[_0xbc93('0x27')](saveUpdates(_0x3fa9f1[_0xbc93('0x8d')],null))[_0xbc93('0x27')](respondWithResult(_0x2ec8b1,null))[_0xbc93('0x47')](handleError(_0x2ec8b1,null));};exports[_0xbc93('0x95')]=function(_0x17b337,_0x20a677,_0x72344e){return db[_0xbc93('0x2e')][_0xbc93('0x4b')]({'where':{'id':_0x17b337[_0xbc93('0x49')]['id']}})[_0xbc93('0x27')](function(_0x15ba39){if(_0x15ba39){return _0x15ba39[_0xbc93('0x26')]();}})[_0xbc93('0x27')](function(_0x1b4956){rimraf(path[_0xbc93('0x4d')](config[_0xbc93('0x4e')],'server/files/plugins',path[_0xbc93('0x96')](_0x1b4956['path'])),function(){});return _0x1b4956;})['then'](handleEntityNotFound(_0x20a677,null))['then'](respondWithStatusCode(_0x20a677,null))[_0xbc93('0x47')](handleError(_0x20a677,null));};exports[_0xbc93('0x97')]=function(_0x4a34e0,_0x49e1be,_0x27168f){return BPromise['resolve']()[_0xbc93('0x27')](function(){if(!_0x4a34e0['query']['path']){throw new Error(_0xbc93('0x98'));}if(!_0x4a34e0['query'][_0xbc93('0x99')]){throw new Error(_0xbc93('0x9a'));}var _0x2e97f5=_0x4a34e0['query'][_0xbc93('0x9b')]?_0x4a34e0[_0xbc93('0x35')][_0xbc93('0x9b')]+':'+_0x4a34e0[_0xbc93('0x35')][_0xbc93('0x99')]:_0xbc93('0x9c')+_0x4a34e0[_0xbc93('0x35')][_0xbc93('0x99')];var _0x5ef5e4=_0x4a34e0[_0xbc93('0x35')][_0xbc93('0x1f')]?_0x4a34e0['query'][_0xbc93('0x1f')]:!![];var _0x276f1b=_0x4a34e0['query']['encoding']?_0x4a34e0[_0xbc93('0x35')][_0xbc93('0x9d')]:null;var _0x235e5c={'method':_0x4a34e0['method'],'uri':util[_0xbc93('0x60')](_0xbc93('0x9e'),_0x2e97f5,_0x4a34e0[_0xbc93('0x35')][_0xbc93('0x5c')]),'json':_0x5ef5e4,'resolveWithFullResponse':!![],'encoding':_0x276f1b,'qs':_0x4a34e0[_0xbc93('0x35')]};if(_0x4a34e0[_0xbc93('0x9f')]){_0x235e5c[_0xbc93('0x9f')]=_0x4a34e0[_0xbc93('0x9f')];if(_0x235e5c['headers'][_0xbc93('0xa0')]){delete _0x235e5c[_0xbc93('0x9f')][_0xbc93('0xa0')];}}if(_0x235e5c['headers'][_0xbc93('0xa1')]){delete _0x235e5c[_0xbc93('0x9f')]['content-type'];}return rp(_0x235e5c);})[_0xbc93('0x27')](function(_0x3bd658){if(_0x3bd658){_0x49e1be[_0xbc93('0xa2')](_0x3bd658[_0xbc93('0x9f')]);logger['info'](_0x3bd658[_0xbc93('0x8d')]);if(_[_0xbc93('0xa3')](_0x4a34e0[_0xbc93('0x35')][_0xbc93('0x5c')],_0xbc93('0x4c'))&&_0x3bd658[_0xbc93('0xa4')]==0x1f4){return _0x49e1be[_0xbc93('0x1d')](_0x3bd658[_0xbc93('0xa4')]);}else{return _0x49e1be['status'](_0x3bd658[_0xbc93('0xa4')])[_0xbc93('0xa5')](_0x3bd658[_0xbc93('0x8d')]);}}else{return _0x49e1be[_0xbc93('0x1d')](0xc8);}})['catch'](handleError(_0x49e1be,null));};exports[_0xbc93('0xa6')]=function(_0x2f92c7,_0x4b72b5,_0x3370aa){return BPromise[_0xbc93('0xa7')]()[_0xbc93('0x27')](function(){if(!_0x2f92c7[_0xbc93('0x35')][_0xbc93('0x5c')]){throw new Error('\x27PATH\x27\x20parameter\x20not\x20specified');}if(!_0x2f92c7[_0xbc93('0x35')][_0xbc93('0x99')]){throw new Error(_0xbc93('0x9a'));}var _0x5e524d=_0x2f92c7['query'][_0xbc93('0x9b')]?_0x2f92c7['query'][_0xbc93('0x9b')]+':'+_0x2f92c7['query'][_0xbc93('0x99')]:_0xbc93('0x9c')+_0x2f92c7[_0xbc93('0x35')][_0xbc93('0x99')];var _0x54522a=_0x2f92c7[_0xbc93('0x35')][_0xbc93('0x1f')]?_0x2f92c7[_0xbc93('0x35')][_0xbc93('0x1f')]:!![];var _0x52ef06=_0x2f92c7[_0xbc93('0x35')]['encoding']?_0x2f92c7[_0xbc93('0x35')][_0xbc93('0x9d')]:null;var _0x352610={'method':_0x2f92c7['method'],'uri':util[_0xbc93('0x60')](_0xbc93('0x9e'),_0x5e524d,_0x2f92c7[_0xbc93('0x35')][_0xbc93('0x5c')]),'json':_0x54522a,'resolveWithFullResponse':!![],'encoding':_0x52ef06,'body':_0x2f92c7[_0xbc93('0x8d')]};if(_0x2f92c7['headers']){_0x352610[_0xbc93('0x9f')]=_0x2f92c7[_0xbc93('0x9f')];if(_0x352610[_0xbc93('0x9f')]['content-length']){delete _0x352610['headers'][_0xbc93('0xa0')];}}if(_0x352610[_0xbc93('0x9f')][_0xbc93('0xa1')]){delete _0x352610[_0xbc93('0x9f')][_0xbc93('0xa1')];}return rp(_0x352610);})[_0xbc93('0x27')](function(_0x5293ee){if(_0x5293ee){_0x4b72b5[_0xbc93('0xa2')](_0x5293ee[_0xbc93('0x9f')]);logger[_0xbc93('0x62')](_0x5293ee[_0xbc93('0x8d')]);return _0x4b72b5['status'](_0x5293ee[_0xbc93('0xa4')])[_0xbc93('0xa5')](_0x5293ee[_0xbc93('0x8d')]);}else{return _0x4b72b5[_0xbc93('0x1d')](0xc8);}})[_0xbc93('0x47')](handleError(_0x4b72b5,null));}; \ No newline at end of file +var _0x6080=['%s.zip','basename','createWriteStream','zip','warning','Sequelize','Error','Error\x20while\x20generating\x20the\x20zip\x20archive','glob','**/*','server/files/plugins','dirname','node_modules/**/*','existsSync','Plugin\x20not\x20found','unlinkSync','info','Download\x20completed','file','filename','extname','Plugin\x20upload\x20filepath:\x20%s','0777','Invalid\x20plugin\x20structure','lstatSync','some','manifest.json','Plugin\x20manifest\x20missing','readFileSync','parse','Invalid\x20manifest:\x20name\x20missing','version','Invalid\x20manifest:\x20parameters\x20missing','html','parameters','views','agent','script','scriptName','Invalid\x20manifest:\x20script\x20name\x20missing','Invalid\x20manifest:\x20script\x20path\x20missing','Invalid\x20manifest:\x20invalid\x20type','sidebar','always','icon','admin','test','plugins','Warning:\x20admin\x20view\x20not\x20specified','scriptPath','body','role','userProfileId','Unable\x20to\x20retrieve\x20the\x20current\x20user','user','UserProfileSection','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','Zip\x20archive\x20removed','Extracted\x20folder\x20removed','delete','webhookGet','\x27PATH\x27\x20parameter\x20not\x20specified','port','\x27PORT\x27\x20parameter\x20not\x20specified','hostname','encoding','method','headers','content-length','content-type','endsWith','statusCode','webhookPost','resolve','%s%s','set','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','util','path','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','papaparse','archiver','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','localhost','socket.io-emitter','./plugin.socket','register','sendStatus','status','json','offset','undefined','limit','count','Content-Range','apply','reject','update','then','get','Plugins','UserProfileResource','destroy','end','error','stack','name','send','index','Plugin','rawAttributes','fieldName','type','key','model','map','query','keys','attributes','intersection','fields','length','nolimit','order','sort','filters','pick','filter','where','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','find','download','params','join','root','format'];(function(_0x11d05d,_0x2e8a5d){var _0x399684=function(_0x25008a){while(--_0x25008a){_0x11d05d['push'](_0x11d05d['shift']());}};_0x399684(++_0x2e8a5d);}(_0x6080,0x196));var _0x0608=function(_0x32c4c1,_0x1b648f){_0x32c4c1=_0x32c4c1-0x0;var _0x394208=_0x6080[_0x32c4c1];return _0x394208;};'use strict';var emlformat=require(_0x0608('0x0'));var rimraf=require(_0x0608('0x1'));var zipdir=require(_0x0608('0x2'));var jsonpatch=require(_0x0608('0x3'));var rp=require('request-promise');var moment=require(_0x0608('0x4'));var BPromise=require(_0x0608('0x5'));var Mustache=require('mustache');var util=require(_0x0608('0x6'));var path=require(_0x0608('0x7'));var sox=require('sox');var csv=require(_0x0608('0x8'));var ejs=require(_0x0608('0x9'));var fs=require('fs');var fs_extra=require(_0x0608('0xa'));var _=require(_0x0608('0xb'));var squel=require(_0x0608('0xc'));var crypto=require(_0x0608('0xd'));var jsforce=require(_0x0608('0xe'));var deskjs=require(_0x0608('0xf'));var toCsv=require(_0x0608('0x8'));var querystring=require('querystring');var Papa=require(_0x0608('0x10'));var extract=require('extract-zip');var rimraf=require('rimraf');var archiver=require(_0x0608('0x11'));var Redis=require(_0x0608('0x12'));var authService=require(_0x0608('0x13'));var qs=require('../../components/parsers/qs');var as=require(_0x0608('0x14'));var hardwareService=require(_0x0608('0x15'));var logger=require('../../config/logger')(_0x0608('0x16'));var utils=require(_0x0608('0x17'));var config=require(_0x0608('0x18'));var licenseUtil=require(_0x0608('0x19'));var db=require(_0x0608('0x1a'))['db'];config[_0x0608('0x1b')]=_['defaults'](config[_0x0608('0x1b')],{'host':_0x0608('0x1c'),'port':0x18eb});var socket=require(_0x0608('0x1d'))(new Redis(config[_0x0608('0x1b')]));require(_0x0608('0x1e'))[_0x0608('0x1f')](socket);function respondWithStatusCode(_0x34a5ad,_0x5f3f4f){_0x5f3f4f=_0x5f3f4f||0xcc;return function(_0x14066a){if(_0x14066a){return _0x34a5ad[_0x0608('0x20')](_0x5f3f4f);}return _0x34a5ad[_0x0608('0x21')](_0x5f3f4f)['end']();};}function respondWithResult(_0x2a2363,_0x42d175){_0x42d175=_0x42d175||0xc8;return function(_0x5212c2){if(_0x5212c2){return _0x2a2363[_0x0608('0x21')](_0x42d175)[_0x0608('0x22')](_0x5212c2);}};}function respondWithFilteredResult(_0xe80a12,_0x5a6d1d){return function(_0x32c429){if(_0x32c429){var _0x3a3b5c=typeof _0x5a6d1d[_0x0608('0x23')]===_0x0608('0x24')&&typeof _0x5a6d1d[_0x0608('0x25')]===_0x0608('0x24');var _0x51c643=_0x32c429['count'];var _0x6566a1=_0x3a3b5c?0x0:_0x5a6d1d[_0x0608('0x23')];var _0x12b501=_0x3a3b5c?_0x32c429[_0x0608('0x26')]:_0x5a6d1d[_0x0608('0x23')]+_0x5a6d1d[_0x0608('0x25')];var _0xa5e1e;if(_0x12b501>=_0x51c643){_0x12b501=_0x51c643;_0xa5e1e=0xc8;}else{_0xa5e1e=0xce;}_0xe80a12[_0x0608('0x21')](_0xa5e1e);return _0xe80a12['set'](_0x0608('0x27'),_0x6566a1+'-'+_0x12b501+'/'+_0x51c643)['json'](_0x32c429);}return null;};}function patchUpdates(_0x2c7887){return function(_0x25350d){try{jsonpatch[_0x0608('0x28')](_0x25350d,_0x2c7887,!![]);}catch(_0x27a05c){return BPromise[_0x0608('0x29')](_0x27a05c);}return _0x25350d['save']();};}function saveUpdates(_0x33744d,_0x4c7388){return function(_0x380a26){if(_0x380a26){return _0x380a26[_0x0608('0x2a')](_0x33744d)[_0x0608('0x2b')](function(_0x3d0a9a){return _0x3d0a9a;});}return null;};}function removeEntity(_0x438769,_0xba95bd){return function(_0x55d7ae){if(_0x55d7ae){return _0x55d7ae['destroy']()[_0x0608('0x2b')](function(){var _0x338bb8=_0x55d7ae[_0x0608('0x2c')]({'plain':!![]});var _0x1870f8=_0x0608('0x2d');return db[_0x0608('0x2e')][_0x0608('0x2f')]({'where':{'type':_0x1870f8,'resourceId':_0x338bb8['id']}})[_0x0608('0x2b')](function(){return _0x55d7ae;});})[_0x0608('0x2b')](function(){_0x438769['status'](0xcc)[_0x0608('0x30')]();});}};}function handleEntityNotFound(_0x1a8de4,_0x3fa4d0){return function(_0x264ec8){if(!_0x264ec8){_0x1a8de4[_0x0608('0x20')](0x194);}return _0x264ec8;};}function handleError(_0x58fbca,_0x2fa9c2){_0x2fa9c2=_0x2fa9c2||0x1f4;return function(_0x4d6c12){logger[_0x0608('0x31')](_0x4d6c12[_0x0608('0x32')]);if(_0x4d6c12[_0x0608('0x33')]){delete _0x4d6c12[_0x0608('0x33')];}_0x58fbca[_0x0608('0x21')](_0x2fa9c2)[_0x0608('0x34')](_0x4d6c12);};}exports[_0x0608('0x35')]=function(_0x573988,_0x3ed720){var _0x92756e={},_0x8f7200={},_0x5a55ae={'count':0x0,'rows':[]};var _0x5671d0=_['map'](db[_0x0608('0x36')][_0x0608('0x37')],function(_0x5d0cec){return{'name':_0x5d0cec[_0x0608('0x38')],'type':_0x5d0cec[_0x0608('0x39')][_0x0608('0x3a')]};});_0x8f7200[_0x0608('0x3b')]=_[_0x0608('0x3c')](_0x5671d0,_0x0608('0x33'));_0x8f7200[_0x0608('0x3d')]=_[_0x0608('0x3e')](_0x573988[_0x0608('0x3d')]);_0x8f7200['filters']=_['intersection'](_0x8f7200[_0x0608('0x3b')],_0x8f7200[_0x0608('0x3d')]);_0x92756e[_0x0608('0x3f')]=_[_0x0608('0x40')](_0x8f7200[_0x0608('0x3b')],qs[_0x0608('0x41')](_0x573988[_0x0608('0x3d')]['fields']));_0x92756e['attributes']=_0x92756e[_0x0608('0x3f')][_0x0608('0x42')]?_0x92756e[_0x0608('0x3f')]:_0x8f7200[_0x0608('0x3b')];if(!_0x573988[_0x0608('0x3d')]['hasOwnProperty'](_0x0608('0x43'))){_0x92756e[_0x0608('0x25')]=qs['limit'](_0x573988['query'][_0x0608('0x25')]);_0x92756e[_0x0608('0x23')]=qs['offset'](_0x573988['query'][_0x0608('0x23')]);}_0x92756e[_0x0608('0x44')]=qs[_0x0608('0x45')](_0x573988[_0x0608('0x3d')]['sort']);_0x92756e['where']=qs[_0x0608('0x46')](_[_0x0608('0x47')](_0x573988[_0x0608('0x3d')],_0x8f7200[_0x0608('0x46')]),_0x5671d0);if(_0x573988[_0x0608('0x3d')][_0x0608('0x48')]){_0x92756e[_0x0608('0x49')]=_[_0x0608('0x4a')](_0x92756e[_0x0608('0x49')],{'$or':_[_0x0608('0x3c')](_0x5671d0,function(_0x2e13e0){if(_0x2e13e0[_0x0608('0x39')]!==_0x0608('0x4b')){var _0x195b5b={};_0x195b5b[_0x2e13e0[_0x0608('0x33')]]={'$like':'%'+_0x573988[_0x0608('0x3d')]['filter']+'%'};return _0x195b5b;}})});}_0x92756e=_['merge']({},_0x92756e,_0x573988[_0x0608('0x4c')]);var _0x1a548a={'where':_0x92756e[_0x0608('0x49')]};return db[_0x0608('0x36')][_0x0608('0x26')](_0x1a548a)[_0x0608('0x2b')](function(_0x2a6b7a){_0x5a55ae[_0x0608('0x26')]=_0x2a6b7a;if(_0x573988['query'][_0x0608('0x4d')]){_0x92756e[_0x0608('0x4e')]=[{'all':!![]}];}return db[_0x0608('0x36')][_0x0608('0x4f')](_0x92756e);})[_0x0608('0x2b')](function(_0x4788f1){_0x5a55ae[_0x0608('0x50')]=_0x4788f1;return _0x5a55ae;})['then'](respondWithFilteredResult(_0x3ed720,_0x92756e))[_0x0608('0x51')](handleError(_0x3ed720,null));};exports[_0x0608('0x52')]=function(_0x2b9206,_0x2f467e){var _0x5244b8={'raw':!![],'where':{'id':_0x2b9206['params']['id']}},_0x3dd027={};_0x3dd027[_0x0608('0x3b')]=_[_0x0608('0x3e')](db[_0x0608('0x36')][_0x0608('0x37')]);_0x3dd027[_0x0608('0x3d')]=_[_0x0608('0x3e')](_0x2b9206[_0x0608('0x3d')]);_0x3dd027[_0x0608('0x46')]=_['intersection'](_0x3dd027['model'],_0x3dd027[_0x0608('0x3d')]);_0x5244b8[_0x0608('0x3f')]=_[_0x0608('0x40')](_0x3dd027[_0x0608('0x3b')],qs[_0x0608('0x41')](_0x2b9206['query']['fields']));_0x5244b8[_0x0608('0x3f')]=_0x5244b8[_0x0608('0x3f')][_0x0608('0x42')]?_0x5244b8['attributes']:_0x3dd027[_0x0608('0x3b')];if(_0x2b9206[_0x0608('0x3d')][_0x0608('0x4d')]){_0x5244b8[_0x0608('0x4e')]=[{'all':!![]}];}_0x5244b8=_[_0x0608('0x4a')]({},_0x5244b8,_0x2b9206[_0x0608('0x4c')]);return db[_0x0608('0x36')][_0x0608('0x53')](_0x5244b8)[_0x0608('0x2b')](handleEntityNotFound(_0x2f467e,null))[_0x0608('0x2b')](respondWithResult(_0x2f467e,null))[_0x0608('0x51')](handleError(_0x2f467e,null));};exports[_0x0608('0x54')]=function(_0x3b8813,_0x6eb08a,_0x186cf4){return db[_0x0608('0x36')][_0x0608('0x53')]({'where':{'id':_0x3b8813[_0x0608('0x55')]['id']},'attributes':[_0x0608('0x33'),_0x0608('0x7')],'raw':!![]})[_0x0608('0x2b')](handleEntityNotFound(_0x6eb08a,null))['then'](function(_0x49a884){if(_0x49a884){var _0x4dad58=path[_0x0608('0x56')](config[_0x0608('0x57')],'server/files/plugins',util[_0x0608('0x58')](_0x0608('0x59'),path[_0x0608('0x5a')](_0x49a884[_0x0608('0x7')])));var _0x579775=fs[_0x0608('0x5b')](_0x4dad58);var _0x5bc148=archiver(_0x0608('0x5c'),{'zlib':{'level':0x9}});_0x5bc148['on'](_0x0608('0x5d'),function(_0x378405){if(_0x378405['code']==='ENOENT'){logger[_0x0608('0x31')](_0x378405);}else{throw new db[(_0x0608('0x5e'))][(_0x0608('0x5f'))](_0x0608('0x60'));}});_0x5bc148['on'](_0x0608('0x31'),function(_0x3716f0){throw new db[(_0x0608('0x5e'))]['Error']('Error\x20while\x20generating\x20the\x20zip\x20archive');});_0x5bc148['pipe'](_0x579775);_0x5bc148[_0x0608('0x61')](_0x0608('0x62'),{'cwd':path[_0x0608('0x56')](config['root'],_0x0608('0x63'),path[_0x0608('0x64')](_0x49a884[_0x0608('0x7')])),'ignore':[path[_0x0608('0x56')](path['basename'](_0x49a884[_0x0608('0x7')]),_0x0608('0x65')),path[_0x0608('0x56')](path['basename'](_0x49a884[_0x0608('0x7')]),'attachments/**/*')],'nodir':!![]})['finalize']();_0x579775['on']('close',function(){if(!fs[_0x0608('0x66')](_0x4dad58)){throw new db[(_0x0608('0x5e'))][(_0x0608('0x5f'))](_0x0608('0x67'));}return _0x6eb08a[_0x0608('0x54')](_0x4dad58,util[_0x0608('0x58')](_0x0608('0x59'),path['basename'](_0x49a884[_0x0608('0x7')])),function(_0x4112aa){if(_0x4112aa){throw new db[(_0x0608('0x5e'))]['Error']('Error\x20while\x20downloading\x20the\x20plugin');}fs[_0x0608('0x68')](_0x4dad58);logger[_0x0608('0x69')](_0x0608('0x6a'));logger['info']('Temporary\x20file\x20removed');});});}return null;})[_0x0608('0x51')](handleError(_0x6eb08a,null));};exports['upload']=function(_0x582d3c,_0x348e2c,_0x4b776a){var _0x296125=path['basename'](_0x582d3c[_0x0608('0x6b')][_0x0608('0x6c')],path[_0x0608('0x6d')](_0x582d3c[_0x0608('0x6b')][_0x0608('0x6c')]));var _0x25b0ac=path[_0x0608('0x56')](config[_0x0608('0x57')],'server/files/plugins',_0x582d3c['file'][_0x0608('0x6c')]);var _0x2472c5=path[_0x0608('0x56')](config[_0x0608('0x57')],_0x0608('0x63'),_0x296125);logger[_0x0608('0x69')](_0x0608('0x6e'),_0x25b0ac);logger['info']('Plugin\x20upload\x20destination:\x20%s',_0x2472c5);try{fs['chmodSync'](_0x25b0ac,parseInt(_0x0608('0x6f'),0x8));extract(_0x25b0ac,{'dir':_0x2472c5},function(_0x316163){if(_0x316163){logger['error'](_0x316163);handleError(_0x316163,!![]);};var _0x1a1726=fs['readdirSync'](_0x2472c5);if(_0x1a1726[_0x0608('0x42')]>0x1){removeReferences(_0x25b0ac,_0x2472c5);logger['error']('Invalid\x20plugin\x20structure');return _0x4b776a(new Error(_0x0608('0x70')));}var _0x5da762=fs[_0x0608('0x71')](path['join'](_0x2472c5,_0x1a1726[0x0]));if(_0x5da762['isFile']()){removeReferences(_0x25b0ac,_0x2472c5);logger[_0x0608('0x31')](_0x0608('0x70'));return _0x4b776a(new Error(_0x0608('0x70')));}if(_0x5da762['isDirectory']()){var _0x48bc9c=fs['readdirSync'](path['join'](_0x2472c5,_0x1a1726[0x0]));if(_0x48bc9c[_0x0608('0x42')]===0x0){removeReferences(_0x25b0ac,_0x2472c5);logger['error'](_0x0608('0x70'));return _0x4b776a(new Error(_0x0608('0x70')));}var _0x5c9e53=_0x48bc9c[_0x0608('0x72')](function(_0x24a2cd){return _0x24a2cd===_0x0608('0x73');});if(!_0x5c9e53){return _0x4b776a(new Error(_0x0608('0x74')));}var _0x328123=fs[_0x0608('0x75')](path[_0x0608('0x56')](_0x2472c5,_0x1a1726[0x0],'manifest.json'));var _0x399b24=JSON[_0x0608('0x76')](_0x328123);if(_0x0608('0x24')==typeof _0x399b24[_0x0608('0x33')]){return _0x4b776a(new Error(_0x0608('0x77')));}if(_0x0608('0x24')==typeof _0x399b24[_0x0608('0x39')]){return _0x4b776a(new Error('Invalid\x20manifest:\x20type\x20missing'));}if('undefined'==typeof _0x399b24[_0x0608('0x78')]){return _0x4b776a(new Error('Invalid\x20manifest:\x20version\x20not\x20specified'));}if(_0x0608('0x24')==typeof _0x399b24['parameters']){return _0x4b776a(new Error(_0x0608('0x79')));}if(_0x399b24['type']===_0x0608('0x7a')){if(_0x0608('0x24')==typeof _0x399b24[_0x0608('0x7b')][_0x0608('0x7c')]){return _0x4b776a(new Error('Invalid\x20manifest:\x20views\x20missing'));}if(_0x0608('0x24')==typeof _0x399b24[_0x0608('0x7b')][_0x0608('0x7c')]['admin']&&'undefined'==typeof _0x399b24['parameters']['views'][_0x0608('0x7d')]){return _0x4b776a(new Error('Invalid\x20manifest:\x20no\x20view\x20specified'));}}else if(_0x399b24[_0x0608('0x39')]===_0x0608('0x7e')){if(_0x0608('0x24')==typeof _0x399b24[_0x0608('0x7b')][_0x0608('0x7f')]){return _0x4b776a(new Error(_0x0608('0x80')));}if(_0x0608('0x24')==typeof _0x399b24[_0x0608('0x7b')]['scriptPath']){return _0x4b776a(new Error(_0x0608('0x81')));}}else{return _0x4b776a(new Error(_0x0608('0x82')));}var _0x916c4a=_0x399b24[_0x0608('0x33')];var _0x1911d7=_0x399b24['description'];var _0x5811c2=_0x399b24[_0x0608('0x39')];var _0x2bfec6=_0x399b24[_0x0608('0x83')]?_0x399b24[_0x0608('0x83')]:_0x0608('0x84');var _0x580767=_0x399b24[_0x0608('0x85')]?_0x399b24[_0x0608('0x85')]:'icon-apps';var _0x2879df='';var _0x1836fa='';var _0x26a079='';var _0x1ca565='';var _0x25cf03=_0x399b24['version'];if(_0x5811c2==='html'){if(_0x0608('0x24')!=typeof _0x399b24[_0x0608('0x7b')][_0x0608('0x7c')][_0x0608('0x86')]){var _0x32c957=_0x399b24['parameters']['views'][_0x0608('0x86')];if(!/^(f|ht)tps?:\/\//i[_0x0608('0x87')](_0x32c957)){_0x2879df=path[_0x0608('0x56')](_0x0608('0x88'),_0x296125,_0x1a1726[0x0],_0x32c957);}else{_0x2879df=_0x32c957;}}else{logger[_0x0608('0x69')](_0x0608('0x89'));}if(_0x0608('0x24')!=typeof _0x399b24[_0x0608('0x7b')][_0x0608('0x7c')][_0x0608('0x7d')]){var _0x34dd38=_0x399b24['parameters']['views']['agent'];if(!/^(f|ht)tps?:\/\//i[_0x0608('0x87')](_0x34dd38)){_0x1836fa=path[_0x0608('0x56')](_0x0608('0x88'),_0x296125,_0x1a1726[0x0],_0x34dd38);}else{_0x1836fa=_0x34dd38;}}else{logger['info']('Warning:\x20agent\x20view\x20not\x20specified');}}else if(_0x5811c2===_0x0608('0x7e')){_0x26a079=_0x399b24[_0x0608('0x7b')][_0x0608('0x7f')];_0x1ca565=_0x399b24[_0x0608('0x7b')][_0x0608('0x8a')];if(_0x0608('0x24')!=typeof _0x399b24[_0x0608('0x7b')]['views']){if('undefined'!=typeof _0x399b24[_0x0608('0x7b')][_0x0608('0x7c')]['admin']){var _0x32c957=_0x399b24[_0x0608('0x7b')][_0x0608('0x7c')]['admin'];if(!/^(f|ht)tps?:\/\//i['test'](_0x32c957)){_0x2879df=path[_0x0608('0x56')](_0x0608('0x88'),_0x296125,_0x1a1726[0x0],_0x32c957);}else{_0x2879df=_0x32c957;}}if('undefined'!=typeof _0x399b24[_0x0608('0x7b')]['views']['agent']){var _0x34dd38=_0x399b24[_0x0608('0x7b')][_0x0608('0x7c')][_0x0608('0x7d')];if(!/^(f|ht)tps?:\/\//i['test'](_0x34dd38)){_0x1836fa=path[_0x0608('0x56')](_0x0608('0x88'),_0x296125,_0x1a1726[0x0],_0x34dd38);}else{_0x1836fa=_0x34dd38;}}}}var _0x15e738={'name':_0x916c4a,'description':_0x1911d7,'path':path[_0x0608('0x56')](_0x296125,_0x1a1726[0x0]),'type':_0x5811c2,'sidebar':_0x2bfec6,'icon':_0x580767,'adminUrl':_0x2879df,'agentUrl':_0x1836fa,'scriptName':_0x26a079,'scriptPath':_0x1ca565,'version':_0x25cf03};removeReferences(_0x25b0ac,null);return db['Plugin']['create'](_0x15e738)[_0x0608('0x2b')](function(_0x1c0db9){var _0x3ebb43={'role':_0x582d3c[_0x0608('0x8b')][_0x0608('0x8c')],'userProfileId':_0x582d3c['body'][_0x0608('0x8d')]};if(!_0x3ebb43)throw new Error(_0x0608('0x8e'));if(_0x3ebb43['role']===_0x0608('0x8f')){var _0x1d8b05=_0x1c0db9['get']({'plain':!![]});return db[_0x0608('0x90')]['find']({'where':{'name':_0x0608('0x2d'),'userProfileId':_0x3ebb43['userProfileId']},'raw':!![]})['then'](function(_0x560c45){if(_0x560c45&&_0x560c45['autoAssociation']===0x0){return db['UserProfileResource']['create']({'name':_0x1d8b05['name'],'resourceId':_0x1d8b05['id'],'type':_0x560c45[_0x0608('0x33')],'sectionId':_0x560c45['id']},{})[_0x0608('0x2b')](function(){return _0x1c0db9;});}else{return _0x1c0db9;}})[_0x0608('0x51')](function(_0x10ea21){logger['error'](_0x0608('0x91'),_0x10ea21);throw _0x10ea21;});}return _0x1c0db9;})[_0x0608('0x2b')](respondWithResult(_0x348e2c,null))[_0x0608('0x51')](handleError(_0x348e2c,null));}});}catch(_0x42e656){_0x348e2c[_0x0608('0x21')](0x1f4)['send'](_0x42e656);}};function removeReferences(_0x1ccf41,_0x4c5320){try{if(_0x1ccf41){fs[_0x0608('0x68')](_0x1ccf41);logger[_0x0608('0x69')](_0x0608('0x92'));}if(_0x4c5320){rimraf(_0x4c5320,function(){});logger['info'](_0x0608('0x93'));}}catch(_0x326cae){logger['error'](_0x326cae);}}exports['update']=function(_0x517f6c,_0x237cec,_0x419a45){return db[_0x0608('0x36')][_0x0608('0x53')]({'where':{'id':_0x517f6c[_0x0608('0x55')]['id']}})[_0x0608('0x2b')](handleEntityNotFound(_0x237cec,null))[_0x0608('0x2b')](saveUpdates(_0x517f6c[_0x0608('0x8b')],null))[_0x0608('0x2b')](respondWithResult(_0x237cec,null))[_0x0608('0x51')](handleError(_0x237cec,null));};exports[_0x0608('0x94')]=function(_0x643b34,_0x12ddaf,_0x1bd4f5){return db[_0x0608('0x36')][_0x0608('0x53')]({'where':{'id':_0x643b34[_0x0608('0x55')]['id']}})[_0x0608('0x2b')](function(_0x51b36a){if(_0x51b36a){return _0x51b36a[_0x0608('0x2f')]();}})[_0x0608('0x2b')](function(_0x1c435a){rimraf(path[_0x0608('0x56')](config[_0x0608('0x57')],'server/files/plugins',path[_0x0608('0x64')](_0x1c435a[_0x0608('0x7')])),function(){});return _0x1c435a;})[_0x0608('0x2b')](handleEntityNotFound(_0x12ddaf,null))[_0x0608('0x2b')](respondWithStatusCode(_0x12ddaf,null))[_0x0608('0x51')](handleError(_0x12ddaf,null));};exports[_0x0608('0x95')]=function(_0x1c9b27,_0x352a6b,_0x109d92){return BPromise['resolve']()[_0x0608('0x2b')](function(){if(!_0x1c9b27[_0x0608('0x3d')]['path']){throw new Error(_0x0608('0x96'));}if(!_0x1c9b27['query'][_0x0608('0x97')]){throw new Error(_0x0608('0x98'));}var _0x38163a=_0x1c9b27['query'][_0x0608('0x99')]?_0x1c9b27[_0x0608('0x3d')][_0x0608('0x99')]+':'+_0x1c9b27['query']['port']:'http://localhost:'+_0x1c9b27['query'][_0x0608('0x97')];var _0x3ef23e=_0x1c9b27[_0x0608('0x3d')]['json']?_0x1c9b27['query'][_0x0608('0x22')]:!![];var _0x38724f=_0x1c9b27['query'][_0x0608('0x9a')]?_0x1c9b27[_0x0608('0x3d')]['encoding']:null;var _0x2b8f89={'method':_0x1c9b27[_0x0608('0x9b')],'uri':util[_0x0608('0x58')]('%s%s',_0x38163a,_0x1c9b27[_0x0608('0x3d')][_0x0608('0x7')]),'json':_0x3ef23e,'resolveWithFullResponse':!![],'encoding':_0x38724f,'qs':_0x1c9b27[_0x0608('0x3d')]};if(_0x1c9b27[_0x0608('0x9c')]){_0x2b8f89[_0x0608('0x9c')]=_0x1c9b27[_0x0608('0x9c')];if(_0x2b8f89[_0x0608('0x9c')][_0x0608('0x9d')]){delete _0x2b8f89[_0x0608('0x9c')][_0x0608('0x9d')];}}if(_0x2b8f89[_0x0608('0x9c')][_0x0608('0x9e')]){delete _0x2b8f89[_0x0608('0x9c')][_0x0608('0x9e')];}return rp(_0x2b8f89);})['then'](function(_0x487464){if(_0x487464){_0x352a6b['set'](_0x487464['headers']);logger['info'](_0x487464['body']);if(_[_0x0608('0x9f')](_0x1c9b27[_0x0608('0x3d')][_0x0608('0x7')],_0x0608('0x54'))&&_0x487464[_0x0608('0xa0')]==0x1f4){return _0x352a6b['sendStatus'](_0x487464[_0x0608('0xa0')]);}else{return _0x352a6b[_0x0608('0x21')](_0x487464[_0x0608('0xa0')])[_0x0608('0x34')](_0x487464['body']);}}else{return _0x352a6b['sendStatus'](0xc8);}})[_0x0608('0x51')](handleError(_0x352a6b,null));};exports[_0x0608('0xa1')]=function(_0x3f880b,_0x123771,_0x51ea89){return BPromise[_0x0608('0xa2')]()[_0x0608('0x2b')](function(){if(!_0x3f880b[_0x0608('0x3d')][_0x0608('0x7')]){throw new Error(_0x0608('0x96'));}if(!_0x3f880b[_0x0608('0x3d')][_0x0608('0x97')]){throw new Error(_0x0608('0x98'));}var _0x2b01f1=_0x3f880b[_0x0608('0x3d')][_0x0608('0x99')]?_0x3f880b[_0x0608('0x3d')]['hostname']+':'+_0x3f880b[_0x0608('0x3d')][_0x0608('0x97')]:'http://localhost:'+_0x3f880b[_0x0608('0x3d')][_0x0608('0x97')];var _0x3752a9=_0x3f880b['query']['json']?_0x3f880b[_0x0608('0x3d')]['json']:!![];var _0x281f4b=_0x3f880b['query'][_0x0608('0x9a')]?_0x3f880b[_0x0608('0x3d')][_0x0608('0x9a')]:null;var _0x3247cb={'method':_0x3f880b['method'],'uri':util[_0x0608('0x58')](_0x0608('0xa3'),_0x2b01f1,_0x3f880b[_0x0608('0x3d')][_0x0608('0x7')]),'json':_0x3752a9,'resolveWithFullResponse':!![],'encoding':_0x281f4b,'body':_0x3f880b[_0x0608('0x8b')]};if(_0x3f880b[_0x0608('0x9c')]){_0x3247cb['headers']=_0x3f880b[_0x0608('0x9c')];if(_0x3247cb['headers']['content-length']){delete _0x3247cb[_0x0608('0x9c')][_0x0608('0x9d')];}}if(_0x3247cb[_0x0608('0x9c')][_0x0608('0x9e')]){delete _0x3247cb['headers'][_0x0608('0x9e')];}return rp(_0x3247cb);})[_0x0608('0x2b')](function(_0x50f579){if(_0x50f579){_0x123771[_0x0608('0xa4')](_0x50f579[_0x0608('0x9c')]);logger['info'](_0x50f579[_0x0608('0x8b')]);return _0x123771[_0x0608('0x21')](_0x50f579[_0x0608('0xa0')])[_0x0608('0x34')](_0x50f579[_0x0608('0x8b')]);}else{return _0x123771[_0x0608('0x20')](0xc8);}})[_0x0608('0x51')](handleError(_0x123771,null));}; \ No newline at end of file diff --git a/server/api/plugin/plugin.events.js b/server/api/plugin/plugin.events.js index 80d89cf..6249fbf 100644 --- a/server/api/plugin/plugin.events.js +++ b/server/api/plugin/plugin.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfdbd=['setMaxListeners','save','update','remove','emit','hasOwnProperty','events','../../mysqldb','Plugin'];(function(_0x5130e1,_0x1084ce){var _0x273207=function(_0x5247e5){while(--_0x5247e5){_0x5130e1['push'](_0x5130e1['shift']());}};_0x273207(++_0x1084ce);}(_0xfdbd,0xf0));var _0xdfdb=function(_0x3c6741,_0x24c6f0){_0x3c6741=_0x3c6741-0x0;var _0x5d3310=_0xfdbd[_0x3c6741];return _0x5d3310;};'use strict';var EventEmitter=require(_0xdfdb('0x0'));var Plugin=require(_0xdfdb('0x1'))['db'][_0xdfdb('0x2')];var PluginEvents=new EventEmitter();PluginEvents[_0xdfdb('0x3')](0x0);var events={'afterCreate':_0xdfdb('0x4'),'afterUpdate':_0xdfdb('0x5'),'afterDestroy':_0xdfdb('0x6')};function emitEvent(_0x66533b){return function(_0x330ad3,_0x5945e0,_0x3f5b2d){PluginEvents['emit'](_0x66533b+':'+_0x330ad3['id'],_0x330ad3);PluginEvents[_0xdfdb('0x7')](_0x66533b,_0x330ad3);_0x3f5b2d(null);};}for(var e in events){if(events[_0xdfdb('0x8')](e)){var event=events[e];Plugin['hook'](e,emitEvent(event));}}module['exports']=PluginEvents; \ No newline at end of file +var _0x5353=['save','update','remove','emit','hasOwnProperty','exports','events','Plugin','setMaxListeners'];(function(_0xcadf4c,_0x32eb3b){var _0x29001e=function(_0x4a71f1){while(--_0x4a71f1){_0xcadf4c['push'](_0xcadf4c['shift']());}};_0x29001e(++_0x32eb3b);}(_0x5353,0x12f));var _0x3535=function(_0x6fa231,_0x10ef7a){_0x6fa231=_0x6fa231-0x0;var _0x2641dd=_0x5353[_0x6fa231];return _0x2641dd;};'use strict';var EventEmitter=require(_0x3535('0x0'));var Plugin=require('../../mysqldb')['db'][_0x3535('0x1')];var PluginEvents=new EventEmitter();PluginEvents[_0x3535('0x2')](0x0);var events={'afterCreate':_0x3535('0x3'),'afterUpdate':_0x3535('0x4'),'afterDestroy':_0x3535('0x5')};function emitEvent(_0x2b65db){return function(_0x21ad15,_0xd6adad,_0x24286e){PluginEvents[_0x3535('0x6')](_0x2b65db+':'+_0x21ad15['id'],_0x21ad15);PluginEvents['emit'](_0x2b65db,_0x21ad15);_0x24286e(null);};}for(var e in events){if(events[_0x3535('0x7')](e)){var event=events[e];Plugin['hook'](e,emitEvent(event));}}module[_0x3535('0x8')]=PluginEvents; \ No newline at end of file diff --git a/server/api/plugin/plugin.model.js b/server/api/plugin/plugin.model.js index 4e2608f..9f3e603 100644 --- a/server/api/plugin/plugin.model.js +++ b/server/api/plugin/plugin.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfbdb=['moment','bluebird','request-promise','rimraf','../../config/environment','./plugin.attributes','exports','define','Plugin','plugins','lodash','../../config/logger'];(function(_0x508d8c,_0x407466){var _0x29f7a1=function(_0x4ffaaf){while(--_0x4ffaaf){_0x508d8c['push'](_0x508d8c['shift']());}};_0x29f7a1(++_0x407466);}(_0xfbdb,0x1ba));var _0xbfbd=function(_0x2b9ca9,_0x124d3b){_0x2b9ca9=_0x2b9ca9-0x0;var _0x3f659d=_0xfbdb[_0x2b9ca9];return _0x3f659d;};'use strict';var _=require(_0xbfbd('0x0'));var util=require('util');var logger=require(_0xbfbd('0x1'))('api');var moment=require(_0xbfbd('0x2'));var BPromise=require(_0xbfbd('0x3'));var rp=require(_0xbfbd('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xbfbd('0x5'));var config=require(_0xbfbd('0x6'));var attributes=require(_0xbfbd('0x7'));module[_0xbfbd('0x8')]=function(_0x400458,_0x17c125){return _0x400458[_0xbfbd('0x9')](_0xbfbd('0xa'),attributes,{'tableName':_0xbfbd('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xdcee=['exports','define','Plugin','util','../../config/logger','moment','bluebird','path','../../config/environment','./plugin.attributes'];(function(_0x4adc2b,_0x409f9c){var _0x391449=function(_0x29b2cb){while(--_0x29b2cb){_0x4adc2b['push'](_0x4adc2b['shift']());}};_0x391449(++_0x409f9c);}(_0xdcee,0xb7));var _0xedce=function(_0x4bfd95,_0x1c3b3b){_0x4bfd95=_0x4bfd95-0x0;var _0x1484cd=_0xdcee[_0x4bfd95];return _0x1484cd;};'use strict';var _=require('lodash');var util=require(_0xedce('0x0'));var logger=require(_0xedce('0x1'))('api');var moment=require(_0xedce('0x2'));var BPromise=require(_0xedce('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xedce('0x4'));var rimraf=require('rimraf');var config=require(_0xedce('0x5'));var attributes=require(_0xedce('0x6'));module[_0xedce('0x7')]=function(_0x2d88a1,_0x144a55){return _0x2d88a1[_0xedce('0x8')](_0xedce('0x9'),attributes,{'tableName':'plugins','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/plugin/plugin.rpc.js b/server/api/plugin/plugin.rpc.js index f777ded..de6063e 100644 --- a/server/api/plugin/plugin.rpc.js +++ b/server/api/plugin/plugin.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xdfd9=['register','request','Plugin,\x20%s,\x20%s','request\x20sent','debug','Plugin,\x20%s,\x20%s,\x20%s','error','code','message','info','Plugin','create','options','raw','then','CreatePlugin','stringify','catch','util','moment','bluebird','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','http','redis','defaults','socket.io-emitter','./plugin.socket'];(function(_0x4b369d,_0x265eb8){var _0x571a98=function(_0x56341a){while(--_0x56341a){_0x4b369d['push'](_0x4b369d['shift']());}};_0x571a98(++_0x265eb8);}(_0xdfd9,0xcc));var _0x9dfd=function(_0x3ba5c9,_0x226e7f){_0x3ba5c9=_0x3ba5c9-0x0;var _0x574f97=_0xdfd9[_0x3ba5c9];return _0x574f97;};'use strict';var _=require('lodash');var util=require(_0x9dfd('0x0'));var moment=require(_0x9dfd('0x1'));var BPromise=require(_0x9dfd('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x9dfd('0x3'));var db=require(_0x9dfd('0x4'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x9dfd('0x5'));var config=require(_0x9dfd('0x6'));var jayson=require(_0x9dfd('0x7'));var client=jayson['client'][_0x9dfd('0x8')]({'port':0x232a});config[_0x9dfd('0x9')]=_[_0x9dfd('0xa')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0x9dfd('0xb'))(new Redis(config['redis']));require(_0x9dfd('0xc'))[_0x9dfd('0xd')](socket);function respondWithRpcPromise(_0x19959d,_0x1e359f,_0x4b215a){return new BPromise(function(_0x19404a,_0xc3e973){return client[_0x9dfd('0xe')](_0x19959d,_0x4b215a)['then'](function(_0x2ea259){logger['info'](_0x9dfd('0xf'),_0x1e359f,_0x9dfd('0x10'));logger[_0x9dfd('0x11')](_0x9dfd('0x12'),_0x1e359f,_0x9dfd('0x10'),JSON['stringify'](_0x2ea259));if(_0x2ea259[_0x9dfd('0x13')]){if(_0x2ea259[_0x9dfd('0x13')][_0x9dfd('0x14')]===0x1f4){logger[_0x9dfd('0x13')](_0x9dfd('0xf'),_0x1e359f,_0x2ea259[_0x9dfd('0x13')][_0x9dfd('0x15')]);return _0xc3e973(_0x2ea259['error'][_0x9dfd('0x15')]);}logger['error'](_0x9dfd('0xf'),_0x1e359f,_0x2ea259[_0x9dfd('0x13')][_0x9dfd('0x15')]);return _0x19404a(_0x2ea259['error'][_0x9dfd('0x15')]);}else{logger[_0x9dfd('0x16')]('Plugin,\x20%s,\x20%s',_0x1e359f,_0x9dfd('0x10'));_0x19404a(_0x2ea259['result'][_0x9dfd('0x15')]);}})['catch'](function(_0x3cee4a){logger[_0x9dfd('0x13')](_0x9dfd('0xf'),_0x1e359f,_0x3cee4a);_0xc3e973(_0x3cee4a);});});}exports['CreatePlugin']=function(_0x136dbc){var _0xf8d0aa=this;return new Promise(function(_0x10c695,_0x2bd53a){return db[_0x9dfd('0x17')][_0x9dfd('0x18')](_0x136dbc['body'],{'raw':_0x136dbc[_0x9dfd('0x19')]?_0x136dbc[_0x9dfd('0x19')][_0x9dfd('0x1a')]===undefined?!![]:![]:!![]})[_0x9dfd('0x1b')](function(_0x246467){logger[_0x9dfd('0x16')](_0x9dfd('0x1c'),_0x136dbc);logger[_0x9dfd('0x11')](_0x9dfd('0x1c'),_0x136dbc,JSON[_0x9dfd('0x1d')](_0x246467));_0x10c695(_0x246467);})[_0x9dfd('0x1e')](function(_0x5e1bfd){logger['error'](_0x9dfd('0x1c'),_0x5e1bfd[_0x9dfd('0x15')],_0x136dbc);_0x2bd53a(_0xf8d0aa[_0x9dfd('0x13')](0x1f4,_0x5e1bfd[_0x9dfd('0x15')]));});});}; \ No newline at end of file +var _0xa928=['ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./plugin.socket','request','then','Plugin,\x20%s,\x20%s','request\x20sent','debug','Plugin,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','CreatePlugin','options','raw','lodash','util','bluebird','randomstring'];(function(_0x568c01,_0xa3fd52){var _0x4b8f43=function(_0x5325da){while(--_0x5325da){_0x568c01['push'](_0x568c01['shift']());}};_0x4b8f43(++_0xa3fd52);}(_0xa928,0xe3));var _0x8a92=function(_0x49ed8a,_0x206bdd){_0x49ed8a=_0x49ed8a-0x0;var _0x2ba373=_0xa928[_0x49ed8a];return _0x2ba373;};'use strict';var _=require(_0x8a92('0x0'));var util=require(_0x8a92('0x1'));var moment=require('moment');var BPromise=require(_0x8a92('0x2'));var rs=require(_0x8a92('0x3'));var fs=require('fs');var Redis=require(_0x8a92('0x4'));var db=require(_0x8a92('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x8a92('0x6'))(_0x8a92('0x7'));var config=require(_0x8a92('0x8'));var jayson=require(_0x8a92('0x9'));var client=jayson[_0x8a92('0xa')][_0x8a92('0xb')]({'port':0x232a});config[_0x8a92('0xc')]=_[_0x8a92('0xd')](config[_0x8a92('0xc')],{'host':_0x8a92('0xe'),'port':0x18eb});var socket=require(_0x8a92('0xf'))(new Redis(config[_0x8a92('0xc')]));require(_0x8a92('0x10'))['register'](socket);function respondWithRpcPromise(_0x5a2982,_0x2d87c5,_0x2cfade){return new BPromise(function(_0x3e6f1b,_0x4ed86f){return client[_0x8a92('0x11')](_0x5a2982,_0x2cfade)[_0x8a92('0x12')](function(_0x48ff63){logger['info'](_0x8a92('0x13'),_0x2d87c5,_0x8a92('0x14'));logger[_0x8a92('0x15')](_0x8a92('0x16'),_0x2d87c5,'request\x20sent',JSON[_0x8a92('0x17')](_0x48ff63));if(_0x48ff63[_0x8a92('0x18')]){if(_0x48ff63[_0x8a92('0x18')][_0x8a92('0x19')]===0x1f4){logger[_0x8a92('0x18')]('Plugin,\x20%s,\x20%s',_0x2d87c5,_0x48ff63['error'][_0x8a92('0x1a')]);return _0x4ed86f(_0x48ff63[_0x8a92('0x18')][_0x8a92('0x1a')]);}logger[_0x8a92('0x18')](_0x8a92('0x13'),_0x2d87c5,_0x48ff63[_0x8a92('0x18')][_0x8a92('0x1a')]);return _0x3e6f1b(_0x48ff63[_0x8a92('0x18')]['message']);}else{logger[_0x8a92('0x1b')]('Plugin,\x20%s,\x20%s',_0x2d87c5,_0x8a92('0x14'));_0x3e6f1b(_0x48ff63[_0x8a92('0x1c')][_0x8a92('0x1a')]);}})[_0x8a92('0x1d')](function(_0x40a6e0){logger[_0x8a92('0x18')]('Plugin,\x20%s,\x20%s',_0x2d87c5,_0x40a6e0);_0x4ed86f(_0x40a6e0);});});}exports[_0x8a92('0x1e')]=function(_0x5540e7){var _0x2b9639=this;return new Promise(function(_0xd4de6b,_0x1a05bc){return db['Plugin']['create'](_0x5540e7['body'],{'raw':_0x5540e7[_0x8a92('0x1f')]?_0x5540e7['options'][_0x8a92('0x20')]===undefined?!![]:![]:!![]})['then'](function(_0x5bdc4f){logger[_0x8a92('0x1b')](_0x8a92('0x1e'),_0x5540e7);logger[_0x8a92('0x15')]('CreatePlugin',_0x5540e7,JSON[_0x8a92('0x17')](_0x5bdc4f));_0xd4de6b(_0x5bdc4f);})[_0x8a92('0x1d')](function(_0x2972be){logger[_0x8a92('0x18')](_0x8a92('0x1e'),_0x2972be[_0x8a92('0x1a')],_0x5540e7);_0x1a05bc(_0x2b9639[_0x8a92('0x18')](0x1f4,_0x2972be['message']));});});}; \ No newline at end of file diff --git a/server/api/plugin/plugin.socket.js b/server/api/plugin/plugin.socket.js index c6bdc2c..2d28a99 100644 --- a/server/api/plugin/plugin.socket.js +++ b/server/api/plugin/plugin.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2494=['length','save','remove','update','emit','removeListener','register'];(function(_0x49f913,_0x12ccd8){var _0xf48ea5=function(_0xfd48b0){while(--_0xfd48b0){_0x49f913['push'](_0x49f913['shift']());}};_0xf48ea5(++_0x12ccd8);}(_0x2494,0x15f));var _0x4249=function(_0x2304d8,_0x2e706f){_0x2304d8=_0x2304d8-0x0;var _0x58732f=_0x2494[_0x2304d8];return _0x58732f;};'use strict';var PluginEvents=require('./plugin.events');var events=[_0x4249('0x0'),_0x4249('0x1'),_0x4249('0x2')];function createListener(_0x5ee0b3,_0x301b28){return function(_0x3e8b35){_0x301b28[_0x4249('0x3')](_0x5ee0b3,_0x3e8b35);};}function removeListener(_0x43f2df,_0x14b54c){return function(){PluginEvents[_0x4249('0x4')](_0x43f2df,_0x14b54c);};}exports[_0x4249('0x5')]=function(_0x4f4d23){for(var _0x1b25b4=0x0,_0x374821=events[_0x4249('0x6')];_0x1b25b4<_0x374821;_0x1b25b4++){var _0x5b9c89=events[_0x1b25b4];var _0x3c77a1=createListener('plugin:'+_0x5b9c89,_0x4f4d23);PluginEvents['on'](_0x5b9c89,_0x3c77a1);}}; \ No newline at end of file +var _0x540f=['./plugin.events','save','remove','update','emit','removeListener','register'];(function(_0x40d637,_0x18ebbd){var _0x1bdbfb=function(_0x41b664){while(--_0x41b664){_0x40d637['push'](_0x40d637['shift']());}};_0x1bdbfb(++_0x18ebbd);}(_0x540f,0x196));var _0xf540=function(_0xb24a3e,_0x4a3594){_0xb24a3e=_0xb24a3e-0x0;var _0x4038d7=_0x540f[_0xb24a3e];return _0x4038d7;};'use strict';var PluginEvents=require(_0xf540('0x0'));var events=[_0xf540('0x1'),_0xf540('0x2'),_0xf540('0x3')];function createListener(_0xb70a72,_0x4b5360){return function(_0x24f26d){_0x4b5360[_0xf540('0x4')](_0xb70a72,_0x24f26d);};}function removeListener(_0xd39c26,_0x2ea2ef){return function(){PluginEvents[_0xf540('0x5')](_0xd39c26,_0x2ea2ef);};}exports[_0xf540('0x6')]=function(_0x35203b){for(var _0x30320d=0x0,_0x170ac8=events['length'];_0x30320d<_0x170ac8;_0x30320d++){var _0x331b6f=events[_0x30320d];var _0x30c7b7=createListener('plugin:'+_0x331b6f,_0x35203b);PluginEvents['on'](_0x331b6f,_0x30c7b7);}}; \ No newline at end of file diff --git a/server/api/pm2/index.js b/server/api/pm2/index.js index 1e92ec8..d92d945 100644 --- a/server/api/pm2/index.js +++ b/server/api/pm2/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['create','put','delete','destroy','exports','express','Router','../../components/auth/service','isAuthenticated','get','/:id','show','post'];(function(_0x369f9f,_0x5b2284){var _0xa144e7=function(_0x2bd7e9){while(--_0x2bd7e9){_0x369f9f['push'](_0x369f9f['shift']());}};_0xa144e7(++_0x5b2284);}(_0xa9e0,0x123));var _0x0a9e=function(_0xbb091,_0x3fe7ee){_0xbb091=_0xbb091-0x0;var _0x467a04=_0xa9e0[_0xbb091];return _0x467a04;};'use strict';var express=require(_0x0a9e('0x0'));var router=express[_0x0a9e('0x1')]();var auth=require(_0x0a9e('0x2'));var controller=require('./pm2.controller');router['get']('/',auth[_0x0a9e('0x3')](),controller['index']);router[_0x0a9e('0x4')](_0x0a9e('0x5'),auth[_0x0a9e('0x3')](),controller[_0x0a9e('0x6')]);router[_0x0a9e('0x7')]('/',auth['isAuthenticated'](),controller[_0x0a9e('0x8')]);router[_0x0a9e('0x9')](_0x0a9e('0x5'),auth['isAuthenticated'](),controller['update']);router[_0x0a9e('0xa')]('/:id',auth['isAuthenticated'](),controller[_0x0a9e('0xb')]);module[_0x0a9e('0xc')]=router; \ No newline at end of file +var _0xa9e0=['create','put','delete','destroy','exports','express','Router','../../components/auth/service','isAuthenticated','get','/:id','show','post'];(function(_0x54ab30,_0x5db6ed){var _0x44c68b=function(_0x2d8f55){while(--_0x2d8f55){_0x54ab30['push'](_0x54ab30['shift']());}};_0x44c68b(++_0x5db6ed);}(_0xa9e0,0x123));var _0x0a9e=function(_0x4dbaad,_0x730318){_0x4dbaad=_0x4dbaad-0x0;var _0x226c72=_0xa9e0[_0x4dbaad];return _0x226c72;};'use strict';var express=require(_0x0a9e('0x0'));var router=express[_0x0a9e('0x1')]();var auth=require(_0x0a9e('0x2'));var controller=require('./pm2.controller');router['get']('/',auth[_0x0a9e('0x3')](),controller['index']);router[_0x0a9e('0x4')](_0x0a9e('0x5'),auth[_0x0a9e('0x3')](),controller[_0x0a9e('0x6')]);router[_0x0a9e('0x7')]('/',auth['isAuthenticated'](),controller[_0x0a9e('0x8')]);router[_0x0a9e('0x9')](_0x0a9e('0x5'),auth['isAuthenticated'](),controller['update']);router[_0x0a9e('0xa')]('/:id',auth['isAuthenticated'](),controller[_0x0a9e('0xb')]);module[_0x0a9e('0xc')]=router; \ No newline at end of file diff --git a/server/api/pm2/pm2.controller.js b/server/api/pm2/pm2.controller.js index 28767e9..7be5387 100644 --- a/server/api/pm2/pm2.controller.js +++ b/server/api/pm2/pm2.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd64b=['dump','send','Missing\x20name\x20and/or\x20path','update','stop','Unknown\x20status','delete','Unknown\x20id','lodash','../../config/logger','path','child_process','exec','bluebird','status','json','name','npm\x20install','info','error','index','list','then','express','motion2','show','describe','params','catch','body','script','join','../../files/plugins','cwd','chdir','dirname','start'];(function(_0x16b46c,_0x462496){var _0x8bca36=function(_0x4f2451){while(--_0x4f2451){_0x16b46c['push'](_0x16b46c['shift']());}};_0x8bca36(++_0x462496);}(_0xd64b,0xc1));var _0xbd64=function(_0x1e7526,_0x4bcb67){_0x1e7526=_0x1e7526-0x0;var _0x95a89b=_0xd64b[_0x1e7526];return _0x95a89b;};'use strict';var _=require(_0xbd64('0x0'));var pm2=require('../../config/pm2');var logger=require(_0xbd64('0x1'))('api');var path=require(_0xbd64('0x2'));var exec=require(_0xbd64('0x3'))[_0xbd64('0x4')];var BPromise=require(_0xbd64('0x5'));function handleEntityNotFound(_0x30fe29,_0x5458d8){return function(_0x5446e4){if(!_0x5446e4){_0x30fe29['sendStatus'](0x194);;}return _0x5446e4;};}function respondWithResult(_0x51e87d,_0x58e9e7){_0x58e9e7=_0x58e9e7||0xc8;return function(_0x32995f){if(_0x32995f){return _0x51e87d[_0xbd64('0x6')](_0x58e9e7)[_0xbd64('0x7')](_0x32995f);}return null;};}function handleError(_0x3f1f17,_0x2b8543){_0x2b8543=_0x2b8543||0x1f4;return function(_0x197a84){logger['error'](_0x197a84['stack']);if(_0x197a84[_0xbd64('0x8')]){delete _0x197a84[_0xbd64('0x8')];}_0x3f1f17[_0xbd64('0x6')](_0x2b8543)['send'](_0x197a84);};}function execChildProcess(){return new BPromise(function(_0xc80599,_0x3f908a){exec(_0xbd64('0x9'),function(_0x18bde8,_0x593c79,_0x431b29){logger['info'](_0x593c79);logger[_0xbd64('0xa')](_0x431b29);if(_0x18bde8){logger[_0xbd64('0xb')](_0x18bde8);return _0x3f908a(_0x18bde8);}return _0xc80599(_0x593c79);});});}exports[_0xbd64('0xc')]=function(_0x2183e2,_0x367824){return pm2[_0xbd64('0xd')]()[_0xbd64('0xe')](function(_0x269e2f){if(_0x269e2f){var _0x2b5808=_['reject'](_0x269e2f,function(_0x2d1159){return _0x2d1159[_0xbd64('0x8')]===_0xbd64('0xf')||_0x2d1159[_0xbd64('0x8')]===_0xbd64('0x10');});return{'rows':_0x2b5808,'count':_0x2b5808['length']};}return null;})[_0xbd64('0xe')](respondWithResult(_0x367824,null))['catch'](handleError(_0x367824,null));};exports[_0xbd64('0x11')]=function(_0x1432a6,_0x3aef70){return pm2[_0xbd64('0x12')](_0x1432a6[_0xbd64('0x13')]['id'])[_0xbd64('0xe')](respondWithResult(_0x3aef70,null))[_0xbd64('0xe')](handleEntityNotFound(_0x3aef70,null))[_0xbd64('0x14')](handleError(_0x3aef70,null));};exports['create']=function(_0x305545,_0x1f618b){if(_0x305545['body']['name']&&_0x305545[_0xbd64('0x15')][_0xbd64('0x16')]){var _0x196d21=path[_0xbd64('0x17')](__dirname,_0xbd64('0x18'),_0x305545[_0xbd64('0x15')]['script']);var _0x4d4a16=process[_0xbd64('0x19')]();process[_0xbd64('0x1a')](path[_0xbd64('0x1b')](_0x196d21));return execChildProcess()[_0xbd64('0xe')](function(_0x55e74c){process['chdir'](_0x4d4a16);return pm2[_0xbd64('0x1c')]({'name':_0x305545['body'][_0xbd64('0x8')],'script':_0x196d21});})['then'](function(_0x33452d){pm2[_0xbd64('0x1d')]();return _0x33452d[0x0];})[_0xbd64('0xe')](respondWithResult(_0x1f618b,0xc9))[_0xbd64('0x14')](handleError(_0x1f618b,null));}else{return _0x1f618b['status'](0x1f4)[_0xbd64('0x1e')]({'message':_0xbd64('0x1f')});}};exports[_0xbd64('0x20')]=function(_0x2a44d0,_0x4d1563){if(_0x2a44d0['body']['id']){delete _0x2a44d0[_0xbd64('0x15')]['id'];}var _0x49eac5={'online':'restart','stopped':_0xbd64('0x21')};if(_0x49eac5['hasOwnProperty'](_0x2a44d0[_0xbd64('0x15')]['status'])){return pm2[_0x49eac5[_0x2a44d0[_0xbd64('0x15')]['status']]](_0x2a44d0[_0xbd64('0x13')]['id'])[_0xbd64('0xe')](respondWithResult(_0x4d1563,0xc8))[_0xbd64('0x14')](handleError(_0x4d1563,null));}else{return _0x4d1563[_0xbd64('0x6')](0x1f4)[_0xbd64('0x1e')]({'message':_0xbd64('0x22')});}};exports['destroy']=function(_0x35bdd5,_0xe876c9){if(_0x35bdd5[_0xbd64('0x15')]['id']){delete _0x35bdd5[_0xbd64('0x15')]['id'];}if(_0x35bdd5[_0xbd64('0x13')]['id']){return pm2[_0xbd64('0x23')](_0x35bdd5['params']['id'])['then'](function(_0x1e4593){pm2['dump']();return _0x1e4593[0x0];})[_0xbd64('0xe')](respondWithResult(_0xe876c9,null))[_0xbd64('0x14')](handleError(_0xe876c9,null));}else{return _0xe876c9['status'](0x1f4)['send']({'message':_0xbd64('0x24')});}}; \ No newline at end of file +var _0x6f0d=['../../files/plugins','chdir','dirname','dump','Missing\x20name\x20and/or\x20path','update','restart','hasOwnProperty','send','Unknown\x20status','destroy','delete','Unknown\x20id','../../config/pm2','../../config/logger','api','path','exec','bluebird','status','json','error','stack','name','npm\x20install','info','index','list','then','reject','motion2','length','catch','show','describe','params','create','body','script'];(function(_0x51836a,_0x5dd5ca){var _0x218839=function(_0x28c0b7){while(--_0x28c0b7){_0x51836a['push'](_0x51836a['shift']());}};_0x218839(++_0x5dd5ca);}(_0x6f0d,0x16c));var _0xd6f0=function(_0x55c21f,_0x493624){_0x55c21f=_0x55c21f-0x0;var _0x308ba3=_0x6f0d[_0x55c21f];return _0x308ba3;};'use strict';var _=require('lodash');var pm2=require(_0xd6f0('0x0'));var logger=require(_0xd6f0('0x1'))(_0xd6f0('0x2'));var path=require(_0xd6f0('0x3'));var exec=require('child_process')[_0xd6f0('0x4')];var BPromise=require(_0xd6f0('0x5'));function handleEntityNotFound(_0x2f78fb,_0x25344b){return function(_0x3a757f){if(!_0x3a757f){_0x2f78fb['sendStatus'](0x194);;}return _0x3a757f;};}function respondWithResult(_0x2d2ce6,_0x4a8b0c){_0x4a8b0c=_0x4a8b0c||0xc8;return function(_0xe21ac4){if(_0xe21ac4){return _0x2d2ce6[_0xd6f0('0x6')](_0x4a8b0c)[_0xd6f0('0x7')](_0xe21ac4);}return null;};}function handleError(_0x1a48a0,_0x4c4916){_0x4c4916=_0x4c4916||0x1f4;return function(_0x507048){logger[_0xd6f0('0x8')](_0x507048[_0xd6f0('0x9')]);if(_0x507048[_0xd6f0('0xa')]){delete _0x507048[_0xd6f0('0xa')];}_0x1a48a0[_0xd6f0('0x6')](_0x4c4916)['send'](_0x507048);};}function execChildProcess(){return new BPromise(function(_0x136eee,_0xee144c){exec(_0xd6f0('0xb'),function(_0x44bba6,_0x4d10a1,_0x1ce8d5){logger[_0xd6f0('0xc')](_0x4d10a1);logger[_0xd6f0('0xc')](_0x1ce8d5);if(_0x44bba6){logger[_0xd6f0('0x8')](_0x44bba6);return _0xee144c(_0x44bba6);}return _0x136eee(_0x4d10a1);});});}exports[_0xd6f0('0xd')]=function(_0x409549,_0x2bf5b8){return pm2[_0xd6f0('0xe')]()[_0xd6f0('0xf')](function(_0x4ab979){if(_0x4ab979){var _0x2b3f32=_[_0xd6f0('0x10')](_0x4ab979,function(_0x4c1559){return _0x4c1559[_0xd6f0('0xa')]==='express'||_0x4c1559[_0xd6f0('0xa')]===_0xd6f0('0x11');});return{'rows':_0x2b3f32,'count':_0x2b3f32[_0xd6f0('0x12')]};}return null;})[_0xd6f0('0xf')](respondWithResult(_0x2bf5b8,null))[_0xd6f0('0x13')](handleError(_0x2bf5b8,null));};exports[_0xd6f0('0x14')]=function(_0x25da0c,_0x29fbb9){return pm2[_0xd6f0('0x15')](_0x25da0c[_0xd6f0('0x16')]['id'])[_0xd6f0('0xf')](respondWithResult(_0x29fbb9,null))[_0xd6f0('0xf')](handleEntityNotFound(_0x29fbb9,null))[_0xd6f0('0x13')](handleError(_0x29fbb9,null));};exports[_0xd6f0('0x17')]=function(_0x1f43d7,_0xde87d4){if(_0x1f43d7['body']['name']&&_0x1f43d7[_0xd6f0('0x18')][_0xd6f0('0x19')]){var _0x1158dc=path['join'](__dirname,_0xd6f0('0x1a'),_0x1f43d7[_0xd6f0('0x18')]['script']);var _0x86dde0=process['cwd']();process[_0xd6f0('0x1b')](path[_0xd6f0('0x1c')](_0x1158dc));return execChildProcess()['then'](function(_0xb9e820){process[_0xd6f0('0x1b')](_0x86dde0);return pm2['start']({'name':_0x1f43d7[_0xd6f0('0x18')][_0xd6f0('0xa')],'script':_0x1158dc});})[_0xd6f0('0xf')](function(_0x5b1a62){pm2[_0xd6f0('0x1d')]();return _0x5b1a62[0x0];})[_0xd6f0('0xf')](respondWithResult(_0xde87d4,0xc9))['catch'](handleError(_0xde87d4,null));}else{return _0xde87d4[_0xd6f0('0x6')](0x1f4)['send']({'message':_0xd6f0('0x1e')});}};exports[_0xd6f0('0x1f')]=function(_0x1630dc,_0x3c1bff){if(_0x1630dc[_0xd6f0('0x18')]['id']){delete _0x1630dc[_0xd6f0('0x18')]['id'];}var _0x12d6ec={'online':_0xd6f0('0x20'),'stopped':'stop'};if(_0x12d6ec[_0xd6f0('0x21')](_0x1630dc[_0xd6f0('0x18')]['status'])){return pm2[_0x12d6ec[_0x1630dc[_0xd6f0('0x18')][_0xd6f0('0x6')]]](_0x1630dc[_0xd6f0('0x16')]['id'])[_0xd6f0('0xf')](respondWithResult(_0x3c1bff,0xc8))[_0xd6f0('0x13')](handleError(_0x3c1bff,null));}else{return _0x3c1bff[_0xd6f0('0x6')](0x1f4)[_0xd6f0('0x22')]({'message':_0xd6f0('0x23')});}};exports[_0xd6f0('0x24')]=function(_0x43f72f,_0x1dff9b){if(_0x43f72f[_0xd6f0('0x18')]['id']){delete _0x43f72f[_0xd6f0('0x18')]['id'];}if(_0x43f72f[_0xd6f0('0x16')]['id']){return pm2[_0xd6f0('0x25')](_0x43f72f[_0xd6f0('0x16')]['id'])[_0xd6f0('0xf')](function(_0x376890){pm2[_0xd6f0('0x1d')]();return _0x376890[0x0];})[_0xd6f0('0xf')](respondWithResult(_0x1dff9b,null))[_0xd6f0('0x13')](handleError(_0x1dff9b,null));}else{return _0x1dff9b[_0xd6f0('0x6')](0x1f4)['send']({'message':_0xd6f0('0x26')});}}; \ No newline at end of file diff --git a/server/api/reportAgentPreview/index.js b/server/api/reportAgentPreview/index.js index 93db01e..69f8555 100644 --- a/server/api/reportAgentPreview/index.js +++ b/server/api/reportAgentPreview/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x70e0=['../../components/auth/service','../../components/interaction/service','exports','multer','util','path','Router','fs-extra'];(function(_0x3af332,_0x3e7915){var _0x2ded8f=function(_0x1c7015){while(--_0x1c7015){_0x3af332['push'](_0x3af332['shift']());}};_0x2ded8f(++_0x3e7915);}(_0x70e0,0x17b));var _0x070e=function(_0x3d0310,_0x309149){_0x3d0310=_0x3d0310-0x0;var _0x548981=_0x70e0[_0x3d0310];return _0x548981;};'use strict';var multer=require(_0x070e('0x0'));var util=require(_0x070e('0x1'));var path=require(_0x070e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x070e('0x3')]();var fs_extra=require(_0x070e('0x4'));var auth=require(_0x070e('0x5'));var interaction=require(_0x070e('0x6'));var config=require('../../config/environment');module[_0x070e('0x7')]=router; \ No newline at end of file +var _0xa9e0=['../../components/interaction/service','../../config/environment','exports','multer','util','path','Router','../../components/auth/service'];(function(_0x2a193f,_0x10ab8e){var _0x579e2c=function(_0x492111){while(--_0x492111){_0x2a193f['push'](_0x2a193f['shift']());}};_0x579e2c(++_0x10ab8e);}(_0xa9e0,0x123));var _0x0a9e=function(_0x110c3d,_0x12ee06){_0x110c3d=_0x110c3d-0x0;var _0x226d67=_0xa9e0[_0x110c3d];return _0x226d67;};'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'));module[_0x0a9e('0x7')]=router; \ No newline at end of file diff --git a/server/api/reportAgentPreview/reportAgentPreview.attributes.js b/server/api/reportAgentPreview/reportAgentPreview.attributes.js index 5c0cb72..9c97ff1 100644 --- a/server/api/reportAgentPreview/reportAgentPreview.attributes.js +++ b/server/api/reportAgentPreview/reportAgentPreview.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6dac=['DATE','sequelize','exports','INTEGER','STRING'];(function(_0x4c03e6,_0x229a05){var _0x4fc59a=function(_0x2bb446){while(--_0x2bb446){_0x4c03e6['push'](_0x4c03e6['shift']());}};_0x4fc59a(++_0x229a05);}(_0x6dac,0x16e));var _0xc6da=function(_0x33d78b,_0xfe9512){_0x33d78b=_0x33d78b-0x0;var _0x139bc4=_0x6dac[_0x33d78b];return _0x139bc4;};'use strict';var Sequelize=require(_0xc6da('0x0'));module[_0xc6da('0x1')]={'state':{'type':Sequelize[_0xc6da('0x2')](0x2)},'statedesc':{'type':Sequelize[_0xc6da('0x3')]},'scheduledat':{'type':Sequelize[_0xc6da('0x4')]},'uniqueid':{'type':Sequelize[_0xc6da('0x3')]},'starttime':{'type':Sequelize[_0xc6da('0x4')]},'responsetime':{'type':Sequelize[_0xc6da('0x4')]},'ringtime':{'type':Sequelize[_0xc6da('0x2')],'defaultValue':0x0},'campaign':{'type':Sequelize[_0xc6da('0x3')]},'campaigntype':{'type':Sequelize[_0xc6da('0x3')]},'membername':{'type':Sequelize[_0xc6da('0x3')]}}; \ No newline at end of file +var _0x38e4=['STRING','DATE','INTEGER','sequelize','exports'];(function(_0x1b1389,_0x213f8d){var _0x4f5e73=function(_0x31214e){while(--_0x31214e){_0x1b1389['push'](_0x1b1389['shift']());}};_0x4f5e73(++_0x213f8d);}(_0x38e4,0x9e));var _0x438e=function(_0x397e5f,_0x454c8f){_0x397e5f=_0x397e5f-0x0;var _0x5302b8=_0x38e4[_0x397e5f];return _0x5302b8;};'use strict';var Sequelize=require(_0x438e('0x0'));module[_0x438e('0x1')]={'state':{'type':Sequelize['INTEGER'](0x2)},'statedesc':{'type':Sequelize[_0x438e('0x2')]},'scheduledat':{'type':Sequelize[_0x438e('0x3')]},'uniqueid':{'type':Sequelize['STRING']},'starttime':{'type':Sequelize[_0x438e('0x3')]},'responsetime':{'type':Sequelize[_0x438e('0x3')]},'ringtime':{'type':Sequelize[_0x438e('0x4')],'defaultValue':0x0},'campaign':{'type':Sequelize['STRING']},'campaigntype':{'type':Sequelize[_0x438e('0x2')]},'membername':{'type':Sequelize[_0x438e('0x2')]}}; \ No newline at end of file diff --git a/server/api/reportAgentPreview/reportAgentPreview.model.js b/server/api/reportAgentPreview/reportAgentPreview.model.js index 382eca2..9e13f2c 100644 --- a/server/api/reportAgentPreview/reportAgentPreview.model.js +++ b/server/api/reportAgentPreview/reportAgentPreview.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd99c=['ReportAgentPreview','report_agent_preview','lodash','util','api','moment','rimraf','../../config/environment','./reportAgentPreview.attributes','exports'];(function(_0x2db09e,_0x192eae){var _0x4656ac=function(_0x1ac202){while(--_0x1ac202){_0x2db09e['push'](_0x2db09e['shift']());}};_0x4656ac(++_0x192eae);}(_0xd99c,0x1c4));var _0xcd99=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xd99c[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0xcd99('0x0'));var util=require(_0xcd99('0x1'));var logger=require('../../config/logger')(_0xcd99('0x2'));var moment=require(_0xcd99('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xcd99('0x4'));var config=require(_0xcd99('0x5'));var attributes=require(_0xcd99('0x6'));module[_0xcd99('0x7')]=function(_0x5a09d3,_0x5985e7){return _0x5a09d3['define'](_0xcd99('0x8'),attributes,{'tableName':_0xcd99('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xb0da=['api','moment','bluebird','request-promise','rimraf','../../config/environment','./reportAgentPreview.attributes','exports','define','ReportAgentPreview','report_agent_preview','lodash'];(function(_0x1989e4,_0x2fa0f8){var _0x5ede7f=function(_0x2e29a1){while(--_0x2e29a1){_0x1989e4['push'](_0x1989e4['shift']());}};_0x5ede7f(++_0x2fa0f8);}(_0xb0da,0x1c7));var _0xab0d=function(_0x3c1f41,_0x27ea02){_0x3c1f41=_0x3c1f41-0x0;var _0x43341c=_0xb0da[_0x3c1f41];return _0x43341c;};'use strict';var _=require(_0xab0d('0x0'));var util=require('util');var logger=require('../../config/logger')(_0xab0d('0x1'));var moment=require(_0xab0d('0x2'));var BPromise=require(_0xab0d('0x3'));var rp=require(_0xab0d('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xab0d('0x5'));var config=require(_0xab0d('0x6'));var attributes=require(_0xab0d('0x7'));module[_0xab0d('0x8')]=function(_0x2ffa70,_0x1bbba){return _0x2ffa70[_0xab0d('0x9')](_0xab0d('0xa'),attributes,{'tableName':_0xab0d('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/reportAgentPreview/reportAgentPreview.rpc.js b/server/api/reportAgentPreview/reportAgentPreview.rpc.js index cace245..e9c83f7 100644 --- a/server/api/reportAgentPreview/reportAgentPreview.rpc.js +++ b/server/api/reportAgentPreview/reportAgentPreview.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3956=['result','catch','CreateReportAgentPreview','create','body','options','raw','then','lodash','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','request','info','ReportAgentPreview,\x20%s,\x20%s','request\x20sent','debug','ReportAgentPreview,\x20%s,\x20%s,\x20%s','error','message'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x3956,0x11b));var _0x6395=function(_0x4629ee,_0x5802d8){_0x4629ee=_0x4629ee-0x0;var _0x47fb5b=_0x3956[_0x4629ee];return _0x47fb5b;};'use strict';var _=require(_0x6395('0x0'));var util=require('util');var moment=require(_0x6395('0x1'));var BPromise=require(_0x6395('0x2'));var rs=require(_0x6395('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x6395('0x4'))['db'];var utils=require(_0x6395('0x5'));var logger=require(_0x6395('0x6'))(_0x6395('0x7'));var config=require('../../config/environment');var jayson=require(_0x6395('0x8'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x4b60bd,_0x480099,_0xd56c77){return new BPromise(function(_0x3011e9,_0x18ced0){return client[_0x6395('0x9')](_0x4b60bd,_0xd56c77)['then'](function(_0x211ae6){logger[_0x6395('0xa')](_0x6395('0xb'),_0x480099,_0x6395('0xc'));logger[_0x6395('0xd')](_0x6395('0xe'),_0x480099,_0x6395('0xc'),JSON['stringify'](_0x211ae6));if(_0x211ae6[_0x6395('0xf')]){if(_0x211ae6['error']['code']===0x1f4){logger[_0x6395('0xf')](_0x6395('0xb'),_0x480099,_0x211ae6[_0x6395('0xf')][_0x6395('0x10')]);return _0x18ced0(_0x211ae6[_0x6395('0xf')]['message']);}logger[_0x6395('0xf')]('ReportAgentPreview,\x20%s,\x20%s',_0x480099,_0x211ae6[_0x6395('0xf')][_0x6395('0x10')]);return _0x3011e9(_0x211ae6[_0x6395('0xf')][_0x6395('0x10')]);}else{logger[_0x6395('0xa')]('ReportAgentPreview,\x20%s,\x20%s',_0x480099,'request\x20sent');_0x3011e9(_0x211ae6[_0x6395('0x11')]['message']);}})[_0x6395('0x12')](function(_0x3bda83){logger[_0x6395('0xf')](_0x6395('0xb'),_0x480099,_0x3bda83);_0x18ced0(_0x3bda83);});});}exports[_0x6395('0x13')]=function(_0x3e0a90){var _0x296cf1=this;return new Promise(function(_0x40b487,_0x7ec41a){return db['ReportAgentPreview'][_0x6395('0x14')](_0x3e0a90[_0x6395('0x15')],{'raw':_0x3e0a90['options']?_0x3e0a90[_0x6395('0x16')][_0x6395('0x17')]===undefined?!![]:![]:!![]})[_0x6395('0x18')](function(_0x344d38){logger[_0x6395('0xa')](_0x6395('0x13'),_0x3e0a90);logger[_0x6395('0xd')](_0x6395('0x13'),_0x3e0a90,JSON['stringify'](_0x344d38));_0x40b487(_0x344d38);})[_0x6395('0x12')](function(_0x391112){logger[_0x6395('0xf')](_0x6395('0x13'),_0x391112[_0x6395('0x10')],_0x3e0a90);_0x7ec41a(_0x296cf1[_0x6395('0xf')](0x1f4,_0x391112['message']));});});}; \ No newline at end of file +var _0x956b=['debug','request\x20sent','stringify','error','ReportAgentPreview,\x20%s,\x20%s','message','catch','CreateReportAgentPreview','ReportAgentPreview','create','body','options','raw','lodash','util','moment','bluebird','randomstring','../../mysqldb','rpc','../../config/environment','http','request','then','info'];(function(_0x2850b5,_0x3bd650){var _0x4fc437=function(_0x1f8a37){while(--_0x1f8a37){_0x2850b5['push'](_0x2850b5['shift']());}};_0x4fc437(++_0x3bd650);}(_0x956b,0x71));var _0xb956=function(_0x39e3f8,_0x22c60e){_0x39e3f8=_0x39e3f8-0x0;var _0x56ff53=_0x956b[_0x39e3f8];return _0x56ff53;};'use strict';var _=require(_0xb956('0x0'));var util=require(_0xb956('0x1'));var moment=require(_0xb956('0x2'));var BPromise=require(_0xb956('0x3'));var rs=require(_0xb956('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xb956('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xb956('0x6'));var config=require(_0xb956('0x7'));var jayson=require('jayson/promise');var client=jayson['client'][_0xb956('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x3bfaef,_0x3ddd79,_0x30d5e2){return new BPromise(function(_0x1a3ca5,_0xe8a9ec){return client[_0xb956('0x9')](_0x3bfaef,_0x30d5e2)[_0xb956('0xa')](function(_0x562d52){logger[_0xb956('0xb')]('ReportAgentPreview,\x20%s,\x20%s',_0x3ddd79,'request\x20sent');logger[_0xb956('0xc')]('ReportAgentPreview,\x20%s,\x20%s,\x20%s',_0x3ddd79,_0xb956('0xd'),JSON[_0xb956('0xe')](_0x562d52));if(_0x562d52[_0xb956('0xf')]){if(_0x562d52['error']['code']===0x1f4){logger[_0xb956('0xf')](_0xb956('0x10'),_0x3ddd79,_0x562d52[_0xb956('0xf')]['message']);return _0xe8a9ec(_0x562d52[_0xb956('0xf')]['message']);}logger[_0xb956('0xf')]('ReportAgentPreview,\x20%s,\x20%s',_0x3ddd79,_0x562d52['error']['message']);return _0x1a3ca5(_0x562d52[_0xb956('0xf')]['message']);}else{logger['info'](_0xb956('0x10'),_0x3ddd79,_0xb956('0xd'));_0x1a3ca5(_0x562d52['result'][_0xb956('0x11')]);}})[_0xb956('0x12')](function(_0x41918c){logger[_0xb956('0xf')](_0xb956('0x10'),_0x3ddd79,_0x41918c);_0xe8a9ec(_0x41918c);});});}exports[_0xb956('0x13')]=function(_0x597d6d){var _0x15d419=this;return new Promise(function(_0x16cd40,_0x357c5b){return db[_0xb956('0x14')][_0xb956('0x15')](_0x597d6d[_0xb956('0x16')],{'raw':_0x597d6d[_0xb956('0x17')]?_0x597d6d[_0xb956('0x17')][_0xb956('0x18')]===undefined?!![]:![]:!![]})[_0xb956('0xa')](function(_0x25f17f){logger[_0xb956('0xb')]('CreateReportAgentPreview',_0x597d6d);logger[_0xb956('0xc')](_0xb956('0x13'),_0x597d6d,JSON[_0xb956('0xe')](_0x25f17f));_0x16cd40(_0x25f17f);})[_0xb956('0x12')](function(_0x4e5375){logger[_0xb956('0xf')]('CreateReportAgentPreview',_0x4e5375[_0xb956('0x11')],_0x597d6d);_0x357c5b(_0x15d419['error'](0x1f4,_0x4e5375[_0xb956('0x11')]));});});}; \ No newline at end of file diff --git a/server/api/rpc/index.js b/server/api/rpc/index.js index 1fa92f8..abe3d04 100644 --- a/server/api/rpc/index.js +++ b/server/api/rpc/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7eff=['post','queueNotify','mail','/mail/queues/:id','chat','/chat/queues/:id','showChatQueues','/fax/queues/:id/notify','fax','/fax/queues/:id','/openchannel/queues/:id/notify','openchannel','showOpenchannelQueues','/whatsapp/queues/:id/notify','whatsapp','/sms/queues/:id','showSmsQueues','/whatsapp/queues/:id','showWhatsappQueues','agentNotify','util','path','express','../../components/auth/service','./rpc.controller','get','/voice/channels','isAuthenticated','voiceChannelMixMonitor','voiceChannelStopMixMonitor','/voice/queues','voiceQueues','/chat/queues','chatQueues','/mail/queues','mailQueues','openchannelQueues','/sms/queues','smsQueues','whatsappQueues','/fax/queues','faxQueues','voiceQueuesChannels','/voice/queues/channels/:uniqueid','voiceQueuesChannel','/voice/queues/channels/:uniqueid/hangup','voiceQueuesChannelHangup','/voice/queues/channels/:uniqueid/redirect/:exten','/voice/queues/:id','showVoiceQueues','/outbound','outbound','/outbound/channels','/agents','agents','put','telephones','/trunks','trunks','/campaigns','/fax/accounts','faxAccounts','/chat/queues/waitinginteractions','/mail/queues/waitinginteractions','mailQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','/openchannel/queues/:id/waitinginteractions','openchannelQueuesIdWaitingInteractions','/sms/queues/waitinginteractions','smsQueuesWaitingInteractions','/whatsapp/queues/waitinginteractions','whatsappQueuesWaitingInteractions','/fax/queues/waitinginteractions','faxQueuesWaitingInteractions'];(function(_0x402c1a,_0x51e956){var _0xdca581=function(_0x327a5e){while(--_0x327a5e){_0x402c1a['push'](_0x402c1a['shift']());}};_0xdca581(++_0x51e956);}(_0x7eff,0x13c));var _0xf7ef=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x7eff[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require('multer');var util=require(_0xf7ef('0x0'));var path=require(_0xf7ef('0x1'));var express=require(_0xf7ef('0x2'));var router=express['Router']();var auth=require(_0xf7ef('0x3'));var controller=require(_0xf7ef('0x4'));router[_0xf7ef('0x5')](_0xf7ef('0x6'),auth['isAuthenticated'](),controller['voiceChannels']);router['get']('/voice/channels/:uniqueid/mixmonitor',auth[_0xf7ef('0x7')](),controller[_0xf7ef('0x8')]);router['get']('/voice/channels/:uniqueid/stopmixmonitor',auth[_0xf7ef('0x7')](),controller[_0xf7ef('0x9')]);router[_0xf7ef('0x5')](_0xf7ef('0xa'),auth[_0xf7ef('0x7')](),controller[_0xf7ef('0xb')]);router['get'](_0xf7ef('0xc'),auth['isAuthenticated'](),controller[_0xf7ef('0xd')]);router[_0xf7ef('0x5')](_0xf7ef('0xe'),auth[_0xf7ef('0x7')](),controller[_0xf7ef('0xf')]);router[_0xf7ef('0x5')]('/mail/accounts',auth[_0xf7ef('0x7')](),controller['mailAccounts']);router[_0xf7ef('0x5')]('/openchannel/queues',auth[_0xf7ef('0x7')](),controller[_0xf7ef('0x10')]);router[_0xf7ef('0x5')](_0xf7ef('0x11'),auth['isAuthenticated'](),controller[_0xf7ef('0x12')]);router['get']('/whatsapp/queues',auth[_0xf7ef('0x7')](),controller[_0xf7ef('0x13')]);router[_0xf7ef('0x5')](_0xf7ef('0x14'),auth[_0xf7ef('0x7')](),controller[_0xf7ef('0x15')]);router['get']('/voice/queues/preview/:id',auth[_0xf7ef('0x7')](),controller['voiceQueuesPreview']);router[_0xf7ef('0x5')]('/voice/queues/channels',auth['isAuthenticated'](),controller[_0xf7ef('0x16')]);router['get'](_0xf7ef('0x17'),auth[_0xf7ef('0x7')](),controller[_0xf7ef('0x18')]);router[_0xf7ef('0x5')](_0xf7ef('0x19'),auth[_0xf7ef('0x7')](),controller[_0xf7ef('0x1a')]);router['get'](_0xf7ef('0x1b'),auth[_0xf7ef('0x7')](),controller['voiceQueuesChannelRedirect']);router[_0xf7ef('0x5')](_0xf7ef('0x1c'),auth['isAuthenticated'](),controller[_0xf7ef('0x1d')]);router['put'](_0xf7ef('0x1c'),auth[_0xf7ef('0x7')](),controller['updateVoiceQueue']);router['get'](_0xf7ef('0x1e'),auth[_0xf7ef('0x7')](),controller[_0xf7ef('0x1f')]);router[_0xf7ef('0x5')](_0xf7ef('0x20'),auth[_0xf7ef('0x7')](),controller['outboundChannels']);router[_0xf7ef('0x5')](_0xf7ef('0x21'),auth[_0xf7ef('0x7')](),controller[_0xf7ef('0x22')]);router[_0xf7ef('0x23')]('/agents/:id/capacity',auth[_0xf7ef('0x7')](),controller['agentCapacity']);router[_0xf7ef('0x5')]('/telephones',auth[_0xf7ef('0x7')](),controller[_0xf7ef('0x24')]);router[_0xf7ef('0x5')](_0xf7ef('0x25'),auth['isAuthenticated'](),controller[_0xf7ef('0x26')]);router[_0xf7ef('0x5')](_0xf7ef('0x27'),auth[_0xf7ef('0x7')](),controller['campaigns']);router['get'](_0xf7ef('0x28'),auth[_0xf7ef('0x7')](),controller[_0xf7ef('0x29')]);router[_0xf7ef('0x5')](_0xf7ef('0x2a'),auth[_0xf7ef('0x7')](),controller['chatQueuesWaitingInteractions']);router[_0xf7ef('0x5')](_0xf7ef('0x2b'),auth[_0xf7ef('0x7')](),controller[_0xf7ef('0x2c')]);router[_0xf7ef('0x5')]('/openchannel/queues/waitinginteractions',auth[_0xf7ef('0x7')](),controller[_0xf7ef('0x2d')]);router[_0xf7ef('0x5')](_0xf7ef('0x2e'),auth[_0xf7ef('0x7')](),controller[_0xf7ef('0x2f')]);router[_0xf7ef('0x5')](_0xf7ef('0x30'),auth['isAuthenticated'](),controller[_0xf7ef('0x31')]);router[_0xf7ef('0x5')](_0xf7ef('0x32'),auth[_0xf7ef('0x7')](),controller[_0xf7ef('0x33')]);router['get'](_0xf7ef('0x34'),auth[_0xf7ef('0x7')](),controller[_0xf7ef('0x35')]);router[_0xf7ef('0x36')]('/mail/queues/:id/notify',auth[_0xf7ef('0x7')](),controller[_0xf7ef('0x37')](_0xf7ef('0x38')));router['get'](_0xf7ef('0x39'),auth[_0xf7ef('0x7')](),controller['showMailQueues']);router[_0xf7ef('0x36')]('/chat/queues/:id/notify',auth['isAuthenticated'](),controller['queueNotify'](_0xf7ef('0x3a')));router['get'](_0xf7ef('0x3b'),auth[_0xf7ef('0x7')](),controller[_0xf7ef('0x3c')]);router['post'](_0xf7ef('0x3d'),auth[_0xf7ef('0x7')](),controller[_0xf7ef('0x37')](_0xf7ef('0x3e')));router[_0xf7ef('0x5')](_0xf7ef('0x3f'),auth[_0xf7ef('0x7')](),controller['showFaxQueues']);router[_0xf7ef('0x36')](_0xf7ef('0x40'),auth[_0xf7ef('0x7')](),controller[_0xf7ef('0x37')](_0xf7ef('0x41')));router[_0xf7ef('0x5')]('/openchannel/queues/:id',auth[_0xf7ef('0x7')](),controller[_0xf7ef('0x42')]);router['post']('/sms/queues/:id/notify',auth['isAuthenticated'](),controller[_0xf7ef('0x37')]('sms'));router[_0xf7ef('0x36')](_0xf7ef('0x43'),auth['isAuthenticated'](),controller[_0xf7ef('0x37')](_0xf7ef('0x44')));router[_0xf7ef('0x5')](_0xf7ef('0x45'),auth[_0xf7ef('0x7')](),controller[_0xf7ef('0x46')]);router[_0xf7ef('0x5')](_0xf7ef('0x47'),auth['isAuthenticated'](),controller[_0xf7ef('0x48')]);router[_0xf7ef('0x36')]('/agents/:id/notify',auth[_0xf7ef('0x7')](),controller[_0xf7ef('0x49')]);module['exports']=router; \ No newline at end of file +var _0x8882=['updateVoiceQueue','/outbound','outbound','/outbound/channels','outboundChannels','/agents','agents','/agents/:id/capacity','/telephones','telephones','/trunks','/campaigns','campaigns','/fax/accounts','faxAccounts','/chat/queues/waitinginteractions','/openchannel/queues/:id/waitinginteractions','openchannelQueuesIdWaitingInteractions','/sms/queues/waitinginteractions','/whatsapp/queues/waitinginteractions','whatsappQueuesWaitingInteractions','/fax/queues/waitinginteractions','faxQueuesWaitingInteractions','post','/mail/queues/:id/notify','queueNotify','mail','showMailQueues','chat','/chat/queues/:id','showChatQueues','/fax/queues/:id/notify','showFaxQueues','/openchannel/queues/:id/notify','openchannel','/openchannel/queues/:id','showOpenchannelQueues','/sms/queues/:id/notify','sms','/sms/queues/:id','showSmsQueues','/whatsapp/queues/:id','showWhatsappQueues','agentNotify','exports','multer','util','path','express','../../components/auth/service','get','/voice/channels','isAuthenticated','voiceChannels','/voice/channels/:uniqueid/mixmonitor','voiceChannelMixMonitor','voiceChannelStopMixMonitor','/voice/queues','voiceQueues','chatQueues','/mail/queues','mailQueues','/openchannel/queues','openchannelQueues','smsQueues','/whatsapp/queues','whatsappQueues','/fax/queues','/voice/queues/preview/:id','voiceQueuesPreview','/voice/queues/channels','voiceQueuesChannels','voiceQueuesChannel','/voice/queues/channels/:uniqueid/hangup','/voice/queues/channels/:uniqueid/redirect/:exten','voiceQueuesChannelRedirect','/voice/queues/:id','showVoiceQueues','put'];(function(_0x8afdd0,_0x548ad1){var _0x3de7ac=function(_0x2dc2c4){while(--_0x2dc2c4){_0x8afdd0['push'](_0x8afdd0['shift']());}};_0x3de7ac(++_0x548ad1);}(_0x8882,0x169));var _0x2888=function(_0x29702e,_0x5c0678){_0x29702e=_0x29702e-0x0;var _0x4567ca=_0x8882[_0x29702e];return _0x4567ca;};'use strict';var multer=require(_0x2888('0x0'));var util=require(_0x2888('0x1'));var path=require(_0x2888('0x2'));var express=require(_0x2888('0x3'));var router=express['Router']();var auth=require(_0x2888('0x4'));var controller=require('./rpc.controller');router[_0x2888('0x5')](_0x2888('0x6'),auth[_0x2888('0x7')](),controller[_0x2888('0x8')]);router['get'](_0x2888('0x9'),auth[_0x2888('0x7')](),controller[_0x2888('0xa')]);router[_0x2888('0x5')]('/voice/channels/:uniqueid/stopmixmonitor',auth[_0x2888('0x7')](),controller[_0x2888('0xb')]);router[_0x2888('0x5')](_0x2888('0xc'),auth[_0x2888('0x7')](),controller[_0x2888('0xd')]);router[_0x2888('0x5')]('/chat/queues',auth[_0x2888('0x7')](),controller[_0x2888('0xe')]);router['get'](_0x2888('0xf'),auth[_0x2888('0x7')](),controller[_0x2888('0x10')]);router[_0x2888('0x5')]('/mail/accounts',auth[_0x2888('0x7')](),controller['mailAccounts']);router['get'](_0x2888('0x11'),auth[_0x2888('0x7')](),controller[_0x2888('0x12')]);router[_0x2888('0x5')]('/sms/queues',auth[_0x2888('0x7')](),controller[_0x2888('0x13')]);router[_0x2888('0x5')](_0x2888('0x14'),auth[_0x2888('0x7')](),controller[_0x2888('0x15')]);router['get'](_0x2888('0x16'),auth[_0x2888('0x7')](),controller['faxQueues']);router[_0x2888('0x5')](_0x2888('0x17'),auth['isAuthenticated'](),controller[_0x2888('0x18')]);router[_0x2888('0x5')](_0x2888('0x19'),auth[_0x2888('0x7')](),controller[_0x2888('0x1a')]);router[_0x2888('0x5')]('/voice/queues/channels/:uniqueid',auth['isAuthenticated'](),controller[_0x2888('0x1b')]);router['get'](_0x2888('0x1c'),auth[_0x2888('0x7')](),controller['voiceQueuesChannelHangup']);router['get'](_0x2888('0x1d'),auth[_0x2888('0x7')](),controller[_0x2888('0x1e')]);router['get'](_0x2888('0x1f'),auth[_0x2888('0x7')](),controller[_0x2888('0x20')]);router[_0x2888('0x21')](_0x2888('0x1f'),auth[_0x2888('0x7')](),controller[_0x2888('0x22')]);router['get'](_0x2888('0x23'),auth[_0x2888('0x7')](),controller[_0x2888('0x24')]);router[_0x2888('0x5')](_0x2888('0x25'),auth['isAuthenticated'](),controller[_0x2888('0x26')]);router[_0x2888('0x5')](_0x2888('0x27'),auth['isAuthenticated'](),controller[_0x2888('0x28')]);router['put'](_0x2888('0x29'),auth['isAuthenticated'](),controller['agentCapacity']);router[_0x2888('0x5')](_0x2888('0x2a'),auth[_0x2888('0x7')](),controller[_0x2888('0x2b')]);router[_0x2888('0x5')](_0x2888('0x2c'),auth[_0x2888('0x7')](),controller['trunks']);router[_0x2888('0x5')](_0x2888('0x2d'),auth[_0x2888('0x7')](),controller[_0x2888('0x2e')]);router[_0x2888('0x5')](_0x2888('0x2f'),auth[_0x2888('0x7')](),controller[_0x2888('0x30')]);router[_0x2888('0x5')](_0x2888('0x31'),auth[_0x2888('0x7')](),controller['chatQueuesWaitingInteractions']);router[_0x2888('0x5')]('/mail/queues/waitinginteractions',auth[_0x2888('0x7')](),controller['mailQueuesWaitingInteractions']);router[_0x2888('0x5')]('/openchannel/queues/waitinginteractions',auth[_0x2888('0x7')](),controller['openchannelQueuesWaitingInteractions']);router[_0x2888('0x5')](_0x2888('0x32'),auth['isAuthenticated'](),controller[_0x2888('0x33')]);router[_0x2888('0x5')](_0x2888('0x34'),auth['isAuthenticated'](),controller['smsQueuesWaitingInteractions']);router[_0x2888('0x5')](_0x2888('0x35'),auth['isAuthenticated'](),controller[_0x2888('0x36')]);router['get'](_0x2888('0x37'),auth['isAuthenticated'](),controller[_0x2888('0x38')]);router[_0x2888('0x39')](_0x2888('0x3a'),auth[_0x2888('0x7')](),controller[_0x2888('0x3b')](_0x2888('0x3c')));router[_0x2888('0x5')]('/mail/queues/:id',auth[_0x2888('0x7')](),controller[_0x2888('0x3d')]);router[_0x2888('0x39')]('/chat/queues/:id/notify',auth['isAuthenticated'](),controller['queueNotify'](_0x2888('0x3e')));router[_0x2888('0x5')](_0x2888('0x3f'),auth[_0x2888('0x7')](),controller[_0x2888('0x40')]);router[_0x2888('0x39')](_0x2888('0x41'),auth[_0x2888('0x7')](),controller['queueNotify']('fax'));router[_0x2888('0x5')]('/fax/queues/:id',auth[_0x2888('0x7')](),controller[_0x2888('0x42')]);router[_0x2888('0x39')](_0x2888('0x43'),auth[_0x2888('0x7')](),controller[_0x2888('0x3b')](_0x2888('0x44')));router[_0x2888('0x5')](_0x2888('0x45'),auth[_0x2888('0x7')](),controller[_0x2888('0x46')]);router[_0x2888('0x39')](_0x2888('0x47'),auth[_0x2888('0x7')](),controller[_0x2888('0x3b')](_0x2888('0x48')));router['post']('/whatsapp/queues/:id/notify',auth[_0x2888('0x7')](),controller['queueNotify']('whatsapp'));router[_0x2888('0x5')](_0x2888('0x49'),auth[_0x2888('0x7')](),controller[_0x2888('0x4a')]);router[_0x2888('0x5')](_0x2888('0x4b'),auth[_0x2888('0x7')](),controller[_0x2888('0x4c')]);router[_0x2888('0x39')]('/agents/:id/notify',auth[_0x2888('0x7')](),controller[_0x2888('0x4d')]);module[_0x2888('0x4e')]=router; \ No newline at end of file diff --git a/server/api/rpc/rpc.controller.js b/server/api/rpc/rpc.controller.js index 4e0fd65..9f4ba18 100644 --- a/server/api/rpc/rpc.controller.js +++ b/server/api/rpc/rpc.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2d17=['jayson/promise','http','request','then','error','code','message','result','catch','status','json','sendStatus','stack','name','send','isNil','find','rows','VoiceChannels','query','voiceChannelMixMonitor','VoiceChannelMixMonitor','voiceChannelStopMixMonitor','VoiceChannelStopMixMonitor','merge','params','voiceQueues','VoiceQueues','UpdateVoiceQueue','voiceQueuesPreview','VoiceQueuesPreview','voiceQueuesChannels','VoiceQueuesChannels','voiceQueuesChannel','VoiceQueuesChannel','voiceQueuesChannelHangup','VoiceQueuesChannelHangup','voiceQueuesChannelRedirect','outbound','Outbound','outboundChannels','OutboundChannels','Agents','agentCapacity','interaction','user','body','MemberReport','findAll','length','findOrCreate','INTERACTION','interface','SIP/%s','format','YYYY-MM-DD\x20HH:mm:ss','internal','capacity','telephones','Telephones','trunks','Trunks','campaigns','Campaigns','chatQueues','ChatQueues','mailQueues','MailQueues','showMailQueues','mailAccounts','MailAccounts','openchannelQueues','OpenchannelQueues','showOpenchannelQueues','smsQueues','whatsappQueues','WhatsappQueues','faxQueues','FaxQueues','faxAccounts','chatQueuesWaitingInteractions','ChatQueuesWaitingInteractions','mailQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','OpenchannelQueuesWaitingInteractions','openchannelQueuesIdWaitingInteractions','type','filter','map','queue_id','uniq','indexOf','smsQueuesWaitingInteractions','SmsQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','WhatsappQueuesWaitingInteractions','FaxQueuesWaitingInteractions','capitalize','chat','Account','Queue','\x20Queue\x20not\x20found','findOne','messageId','Interaction','\x20Message\x20not\x20found','update','queue','InteractionId','From','QueueId','TransferReport','create','Start','queueTransferTimeout','*,*,*,*','agentNotify','channel','Website','User','agent','Agent\x20not\x20found','Message','agentTransferTimeout','bluebird','moment','util','../../mysqldb','api'];(function(_0x102d4c,_0x362d01){var _0x21a4b3=function(_0x487a59){while(--_0x487a59){_0x102d4c['push'](_0x102d4c['shift']());}};_0x21a4b3(++_0x362d01);}(_0x2d17,0x17e));var _0x72d1=function(_0x2a50f8,_0x59be38){_0x2a50f8=_0x2a50f8-0x0;var _0x2b88dd=_0x2d17[_0x2a50f8];return _0x2b88dd;};'use strict';var BPromise=require(_0x72d1('0x0'));var moment=require(_0x72d1('0x1'));var _=require('lodash');var util=require(_0x72d1('0x2'));var db=require(_0x72d1('0x3'))['db'];var logger=require('../../config/logger')(_0x72d1('0x4'));var jayson=require(_0x72d1('0x5'));var amiClient=jayson['client'][_0x72d1('0x6')]({'port':0x232a});var mailClient=jayson['client'][_0x72d1('0x6')]({'port':0x232b});var routingClient=jayson['client'][_0x72d1('0x6')]({'port':0x232c});function respondWithRpcPromise(_0x239d1f,_0x5b40a9,_0x477264){return new BPromise(function(_0x422f5a,_0x19e248){var _0x4e7f3e=_0x477264?_0x477264:amiClient;return _0x4e7f3e[_0x72d1('0x7')](_0x239d1f,_0x5b40a9)[_0x72d1('0x8')](function(_0x283775){if(_0x283775['error']){if(_0x283775[_0x72d1('0x9')][_0x72d1('0xa')]===0x1f4){return _0x19e248(_0x283775[_0x72d1('0x9')][_0x72d1('0xb')]);}return _0x422f5a(_0x283775[_0x72d1('0x9')][_0x72d1('0xb')]);}else{_0x422f5a(_0x283775[_0x72d1('0xc')]);}})[_0x72d1('0xd')](function(_0x273ccf){_0x19e248(_0x273ccf);});});}function respondWithResult(_0x2f5a78,_0x5ad4df){_0x5ad4df=_0x5ad4df||0xc8;return function(_0x3cd1ae){if(_0x3cd1ae){return _0x2f5a78[_0x72d1('0xe')](_0x5ad4df)[_0x72d1('0xf')](_0x3cd1ae);}return _0x2f5a78[_0x72d1('0x10')](0x194);};}function handleError(_0x22ac6f,_0x685a27){_0x685a27=_0x685a27||0x1f4;return function(_0x143718){logger[_0x72d1('0x9')](_0x143718[_0x72d1('0x11')]);if(_0x143718[_0x72d1('0x12')]){delete _0x143718[_0x72d1('0x12')];}_0x22ac6f[_0x72d1('0xe')](_0x685a27)[_0x72d1('0x13')](_0x143718);};}function findById(_0x491af4){return function(_0x46fa3d){if(!_['isNil'](_0x491af4)&&!_[_0x72d1('0x14')](_0x46fa3d)&&!_[_0x72d1('0x14')](_0x46fa3d['rows'])){return _[_0x72d1('0x15')](_0x46fa3d[_0x72d1('0x16')],function(_0x1ca18d){return _0x1ca18d['id']==_0x491af4;});}return null;};}exports['voiceChannels']=function(_0x4925f6,_0x313d7b){return respondWithRpcPromise(_0x72d1('0x17'),_0x4925f6[_0x72d1('0x18')])[_0x72d1('0x8')](respondWithResult(_0x313d7b,null))[_0x72d1('0xd')](handleError(_0x313d7b,null));};exports[_0x72d1('0x19')]=function(_0x1e2411,_0x5c7982){return respondWithRpcPromise(_0x72d1('0x1a'),_['merge'](_0x1e2411['query'],_0x1e2411['params']))['then'](respondWithResult(_0x5c7982,null))[_0x72d1('0xd')](handleError(_0x5c7982,null));};exports[_0x72d1('0x1b')]=function(_0x573c98,_0x2a421a){return respondWithRpcPromise(_0x72d1('0x1c'),_[_0x72d1('0x1d')](_0x573c98[_0x72d1('0x18')],_0x573c98[_0x72d1('0x1e')]))['then'](respondWithResult(_0x2a421a,null))['catch'](handleError(_0x2a421a,null));};exports[_0x72d1('0x1f')]=function(_0x36bc65,_0x2f661){return respondWithRpcPromise(_0x72d1('0x20'),_0x36bc65[_0x72d1('0x18')])[_0x72d1('0x8')](respondWithResult(_0x2f661,null))[_0x72d1('0xd')](handleError(_0x2f661,null));};exports['showVoiceQueues']=function(_0x57ec9e,_0x1ba258){return respondWithRpcPromise('VoiceQueues',_0x57ec9e[_0x72d1('0x18')])[_0x72d1('0x8')](findById(_0x57ec9e[_0x72d1('0x1e')]['id']))['then'](respondWithResult(_0x1ba258,null))[_0x72d1('0xd')](handleError(_0x1ba258,null));};exports['updateVoiceQueue']=function(_0x707cd0,_0x20055f){return respondWithRpcPromise(_0x72d1('0x21'),_[_0x72d1('0x1d')](_0x707cd0['body'],_0x707cd0[_0x72d1('0x1e')]))['then'](respondWithResult(_0x20055f,null))[_0x72d1('0xd')](handleError(_0x20055f,null));};exports[_0x72d1('0x22')]=function(_0x5cec3f,_0x14d653){return respondWithRpcPromise(_0x72d1('0x23'),_[_0x72d1('0x1d')](_0x5cec3f[_0x72d1('0x18')],_0x5cec3f[_0x72d1('0x1e')]))['then'](respondWithResult(_0x14d653,null))[_0x72d1('0xd')](handleError(_0x14d653,null));};exports[_0x72d1('0x24')]=function(_0x9efc2f,_0x482033){return respondWithRpcPromise(_0x72d1('0x25'),_0x9efc2f[_0x72d1('0x18')])['then'](respondWithResult(_0x482033,null))[_0x72d1('0xd')](handleError(_0x482033,null));};exports[_0x72d1('0x26')]=function(_0x437d79,_0x5a63d9){return respondWithRpcPromise(_0x72d1('0x27'),_['merge'](_0x437d79[_0x72d1('0x18')],_0x437d79[_0x72d1('0x1e')]))[_0x72d1('0x8')](respondWithResult(_0x5a63d9,null))[_0x72d1('0xd')](handleError(_0x5a63d9,null));};exports[_0x72d1('0x28')]=function(_0xc9798a,_0x3ed5de){return respondWithRpcPromise(_0x72d1('0x29'),_[_0x72d1('0x1d')](_0xc9798a[_0x72d1('0x18')],_0xc9798a[_0x72d1('0x1e')]))['then'](respondWithResult(_0x3ed5de,null))[_0x72d1('0xd')](handleError(_0x3ed5de,null));};exports[_0x72d1('0x2a')]=function(_0x4acab,_0x325209){return respondWithRpcPromise('VoiceQueuesChannelRedirect',_[_0x72d1('0x1d')](_0x4acab[_0x72d1('0x18')],_0x4acab[_0x72d1('0x1e')]))['then'](respondWithResult(_0x325209,null))[_0x72d1('0xd')](handleError(_0x325209,null));};exports[_0x72d1('0x2b')]=function(_0x163538,_0x5b897f){return respondWithRpcPromise(_0x72d1('0x2c'),_0x163538[_0x72d1('0x18')])[_0x72d1('0x8')](respondWithResult(_0x5b897f,null))['catch'](handleError(_0x5b897f,null));};exports[_0x72d1('0x2d')]=function(_0x40cdbd,_0x1e083e){return respondWithRpcPromise(_0x72d1('0x2e'),_0x40cdbd[_0x72d1('0x18')])[_0x72d1('0x8')](respondWithResult(_0x1e083e,null))[_0x72d1('0xd')](handleError(_0x1e083e,null));};exports['agents']=function(_0x12646c,_0x3ae4b5){var _0x440ac5;return respondWithRpcPromise(_0x72d1('0x2f'),_0x12646c[_0x72d1('0x18')])[_0x72d1('0x8')](function(_0x2f3080){_0x440ac5=_0x2f3080;return respondWithRpcPromise(_0x72d1('0x2f'),_0x12646c['query'],routingClient);})[_0x72d1('0x8')](function(_0x1a6dd4){return _[_0x72d1('0x1d')]({},_0x1a6dd4,_0x440ac5);})[_0x72d1('0x8')](respondWithResult(_0x3ae4b5,null))[_0x72d1('0xd')](handleError(_0x3ae4b5,null));};exports[_0x72d1('0x30')]=function(_0xb911fa,_0x3620df){if(_0xb911fa['body']&&_0xb911fa['body'][_0x72d1('0x31')]&&_0xb911fa[_0x72d1('0x32')]&&_0xb911fa[_0x72d1('0x32')][_0x72d1('0x12')]){for(var _0x5a6bc4 in _0xb911fa[_0x72d1('0x33')][_0x72d1('0x31')]){if(_0xb911fa['body'][_0x72d1('0x31')]['hasOwnProperty'](_0x5a6bc4)){db[_0x72d1('0x34')][_0x72d1('0x35')]({'where':{'channel':_0x5a6bc4,'membername':_0xb911fa['user'][_0x72d1('0x12')],'type':'INTERACTION','exitAt':null,'uniqueid':_0xb911fa['body']['interaction'][_0x5a6bc4]&&_0xb911fa[_0x72d1('0x33')]['interaction'][_0x5a6bc4][_0x72d1('0x36')]?{'$notIn':_0xb911fa[_0x72d1('0x33')][_0x72d1('0x31')][_0x5a6bc4]}:{'$ne':null}}})['then'](function(_0x4a5c1c){var _0x263fcb=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');for(var _0x2cb03d=0x0,_0x397f31=_0x4a5c1c[_0x72d1('0x36')];_0x2cb03d<_0x397f31;_0x2cb03d+=0x1){_0x4a5c1c[_0x2cb03d]['updateAttributes']({'exitAt':_0x263fcb});}});for(var _0x4f772d=0x0;_0x4f772d<_0xb911fa['body']['interaction'][_0x5a6bc4][_0x72d1('0x36')];_0x4f772d+=0x1){db[_0x72d1('0x34')][_0x72d1('0x37')]({'where':{'channel':_0x5a6bc4,'membername':_0xb911fa[_0x72d1('0x32')][_0x72d1('0x12')],'type':_0x72d1('0x38'),'uniqueid':_0xb911fa[_0x72d1('0x33')][_0x72d1('0x31')][_0x5a6bc4][_0x4f772d],'exitAt':null},'defaults':{'channel':_0x5a6bc4,'membername':_0xb911fa[_0x72d1('0x32')]['name'],'interface':_[_0x72d1('0x14')](_0xb911fa[_0x72d1('0x32')][_0x72d1('0x39')])?util['format'](_0x72d1('0x3a'),_0xb911fa[_0x72d1('0x32')][_0x72d1('0x12')]):_0xb911fa['user'][_0x72d1('0x39')],'type':_0x72d1('0x38'),'enterAt':moment()[_0x72d1('0x3b')](_0x72d1('0x3c')),'role':'agent','internal':_0xb911fa['user'][_0x72d1('0x3d')],'uniqueid':_0xb911fa[_0x72d1('0x33')][_0x72d1('0x31')][_0x5a6bc4][_0x4f772d]}});}}}}return respondWithRpcPromise('AgentCapacity',{'id':_0xb911fa[_0x72d1('0x1e')]['id'],'capacity':_0xb911fa[_0x72d1('0x33')][_0x72d1('0x3e')]},routingClient)[_0x72d1('0x8')](respondWithResult(_0x3620df,null))[_0x72d1('0xd')](handleError(_0x3620df,null));};exports[_0x72d1('0x3f')]=function(_0x3146cf,_0xebe855){return respondWithRpcPromise(_0x72d1('0x40'),_0x3146cf[_0x72d1('0x18')])[_0x72d1('0x8')](respondWithResult(_0xebe855,null))['catch'](handleError(_0xebe855,null));};exports[_0x72d1('0x41')]=function(_0x50d4d4,_0x5dd7b0){return respondWithRpcPromise(_0x72d1('0x42'),_0x50d4d4['query'])[_0x72d1('0x8')](respondWithResult(_0x5dd7b0,null))[_0x72d1('0xd')](handleError(_0x5dd7b0,null));};exports[_0x72d1('0x43')]=function(_0x162248,_0x473a7b){return respondWithRpcPromise(_0x72d1('0x44'),_0x162248[_0x72d1('0x18')])[_0x72d1('0x8')](respondWithResult(_0x473a7b,null))[_0x72d1('0xd')](handleError(_0x473a7b,null));};exports[_0x72d1('0x45')]=function(_0x14f9de,_0x52102e){return respondWithRpcPromise(_0x72d1('0x46'),_0x14f9de[_0x72d1('0x18')],routingClient)[_0x72d1('0x8')](respondWithResult(_0x52102e,null))['catch'](handleError(_0x52102e,null));};exports['showChatQueues']=function(_0x32f1ea,_0x140f0b){return respondWithRpcPromise(_0x72d1('0x46'),_0x32f1ea[_0x72d1('0x18')],routingClient)[_0x72d1('0x8')](findById(_0x32f1ea['params']['id']))[_0x72d1('0x8')](respondWithResult(_0x140f0b,null))['catch'](handleError(_0x140f0b,null));};exports[_0x72d1('0x47')]=function(_0x41c6a6,_0x20daf0){return respondWithRpcPromise(_0x72d1('0x48'),_0x41c6a6[_0x72d1('0x18')],routingClient)[_0x72d1('0x8')](respondWithResult(_0x20daf0,null))[_0x72d1('0xd')](handleError(_0x20daf0,null));};exports[_0x72d1('0x49')]=function(_0x384f0a,_0x3a2dfe){return respondWithRpcPromise(_0x72d1('0x48'),_0x384f0a[_0x72d1('0x18')],routingClient)[_0x72d1('0x8')](findById(_0x384f0a[_0x72d1('0x1e')]['id']))[_0x72d1('0x8')](respondWithResult(_0x3a2dfe,null))[_0x72d1('0xd')](handleError(_0x3a2dfe,null));};exports[_0x72d1('0x4a')]=function(_0x5e63cc,_0x1b40e8){return respondWithRpcPromise(_0x72d1('0x4b'),_0x5e63cc[_0x72d1('0x18')],mailClient)[_0x72d1('0x8')](respondWithResult(_0x1b40e8,null))[_0x72d1('0xd')](handleError(_0x1b40e8,null));};exports[_0x72d1('0x4c')]=function(_0x4e2d85,_0x1aec3d){return respondWithRpcPromise(_0x72d1('0x4d'),_0x4e2d85[_0x72d1('0x18')],routingClient)['then'](respondWithResult(_0x1aec3d,null))['catch'](handleError(_0x1aec3d,null));};exports[_0x72d1('0x4e')]=function(_0x5f4614,_0x28896f){return respondWithRpcPromise(_0x72d1('0x4d'),_0x5f4614[_0x72d1('0x18')],routingClient)[_0x72d1('0x8')](findById(_0x5f4614[_0x72d1('0x1e')]['id']))[_0x72d1('0x8')](respondWithResult(_0x28896f,null))[_0x72d1('0xd')](handleError(_0x28896f,null));};exports[_0x72d1('0x4f')]=function(_0x28e42b,_0x48cd1e){return respondWithRpcPromise('SmsQueues',_0x28e42b[_0x72d1('0x18')],routingClient)[_0x72d1('0x8')](respondWithResult(_0x48cd1e,null))[_0x72d1('0xd')](handleError(_0x48cd1e,null));};exports['showSmsQueues']=function(_0x31bfda,_0x333671){return respondWithRpcPromise('SmsQueues',_0x31bfda[_0x72d1('0x18')],routingClient)[_0x72d1('0x8')](findById(_0x31bfda[_0x72d1('0x1e')]['id']))[_0x72d1('0x8')](respondWithResult(_0x333671,null))[_0x72d1('0xd')](handleError(_0x333671,null));};exports[_0x72d1('0x50')]=function(_0x102574,_0x7925ec){return respondWithRpcPromise(_0x72d1('0x51'),_0x102574[_0x72d1('0x18')],routingClient)[_0x72d1('0x8')](respondWithResult(_0x7925ec,null))[_0x72d1('0xd')](handleError(_0x7925ec,null));};exports['showWhatsappQueues']=function(_0x55f49f,_0x15e0e0){return respondWithRpcPromise(_0x72d1('0x51'),_0x55f49f[_0x72d1('0x18')],routingClient)[_0x72d1('0x8')](findById(_0x55f49f[_0x72d1('0x1e')]['id']))[_0x72d1('0x8')](respondWithResult(_0x15e0e0,null))[_0x72d1('0xd')](handleError(_0x15e0e0,null));};exports[_0x72d1('0x52')]=function(_0x488a14,_0x837b6b){return respondWithRpcPromise('FaxQueues',_0x488a14[_0x72d1('0x18')],routingClient)[_0x72d1('0x8')](respondWithResult(_0x837b6b,null))['catch'](handleError(_0x837b6b,null));};exports['showFaxQueues']=function(_0xfd39ab,_0x14d59b){return respondWithRpcPromise(_0x72d1('0x53'),_0xfd39ab[_0x72d1('0x18')],routingClient)[_0x72d1('0x8')](findById(_0xfd39ab[_0x72d1('0x1e')]['id']))[_0x72d1('0x8')](respondWithResult(_0x14d59b,null))['catch'](handleError(_0x14d59b,null));};exports[_0x72d1('0x54')]=function(_0x24bd82,_0x336ca3){return respondWithRpcPromise('FaxAccounts',_0x24bd82[_0x72d1('0x18')])['then'](respondWithResult(_0x336ca3,null))[_0x72d1('0xd')](handleError(_0x336ca3,null));};exports[_0x72d1('0x55')]=function(_0x5158ff,_0x3c0a7e){return respondWithRpcPromise(_0x72d1('0x56'),_0x5158ff['query'],routingClient)[_0x72d1('0x8')](respondWithResult(_0x3c0a7e,null))[_0x72d1('0xd')](handleError(_0x3c0a7e,null));};exports[_0x72d1('0x57')]=function(_0x132a43,_0x4a52ec){return respondWithRpcPromise('MailQueuesWaitingInteractions',_0x132a43['query'],routingClient)[_0x72d1('0x8')](respondWithResult(_0x4a52ec,null))[_0x72d1('0xd')](handleError(_0x4a52ec,null));};exports[_0x72d1('0x58')]=function(_0x240159,_0x146b06){return respondWithRpcPromise(_0x72d1('0x59'),_0x240159['query'],routingClient)['then'](respondWithResult(_0x146b06,null))[_0x72d1('0xd')](handleError(_0x146b06,null));};exports[_0x72d1('0x5a')]=function(_0x36827e,_0x3ef7a3){return respondWithRpcPromise(_0x72d1('0x59'),_0x36827e[_0x72d1('0x18')],routingClient)['then'](function(_0x23f0e3){if(_0x36827e[_0x72d1('0x18')][_0x72d1('0x5b')]!==undefined){var _0x53e57b=_(_0x23f0e3[_0x72d1('0x16')])[_0x72d1('0x5c')]([_0x36827e[_0x72d1('0x18')][_0x72d1('0x5b')],_0x36827e[_0x72d1('0x1e')]['id']])[_0x72d1('0x5d')](_0x72d1('0x5e'))[_0x72d1('0x5f')]()['value']();return _0x23f0e3[_0x72d1('0x16')][_0x72d1('0x5c')](function(_0x24f5eb){return _0x53e57b[_0x72d1('0x60')](_0x24f5eb['queue_id'])>-0x1;});}else{return _0x23f0e3['rows'][_0x72d1('0x5c')](function(_0x2932bb){return _0x2932bb['queue_id']===parseInt(_0x36827e[_0x72d1('0x1e')]['id']);});}})[_0x72d1('0x8')](respondWithResult(_0x3ef7a3,null))[_0x72d1('0xd')](handleError(_0x3ef7a3,null));};exports[_0x72d1('0x61')]=function(_0x35b9bb,_0x1d1e22){return respondWithRpcPromise(_0x72d1('0x62'),_0x35b9bb[_0x72d1('0x18')],routingClient)['then'](respondWithResult(_0x1d1e22,null))[_0x72d1('0xd')](handleError(_0x1d1e22,null));};exports[_0x72d1('0x63')]=function(_0x38bfd3,_0x3cbe00){return respondWithRpcPromise(_0x72d1('0x64'),_0x38bfd3[_0x72d1('0x18')],routingClient)[_0x72d1('0x8')](respondWithResult(_0x3cbe00,null))[_0x72d1('0xd')](handleError(_0x3cbe00,null));};exports['faxQueuesWaitingInteractions']=function(_0x47585e,_0x466634){return respondWithRpcPromise(_0x72d1('0x65'),_0x47585e[_0x72d1('0x18')],routingClient)[_0x72d1('0x8')](respondWithResult(_0x466634,null))[_0x72d1('0xd')](handleError(_0x466634,null));};exports['queueNotify']=function(_0x1c6547){return function(_0x369153,_0x4a6607){var _0x266fbc,_0x4057ec;var _0x239cdb=_[_0x72d1('0x66')](_0x1c6547);var _0x27c651=_0x1c6547===_0x72d1('0x67')?'Website':_0x72d1('0x68');return db[_0x239cdb+_0x72d1('0x69')]['findOne']({'raw':!![],'where':{'id':_0x369153['params']['id']}})[_0x72d1('0x8')](function(_0x291b67){if(_[_0x72d1('0x14')](_0x291b67)){throw new Error(_0x239cdb+_0x72d1('0x6a'));}_0x266fbc=_0x291b67;return db[_0x239cdb+'Message'][_0x72d1('0x6b')]({'where':{'id':_0x369153[_0x72d1('0x33')][_0x72d1('0x6c')]},'include':[{'model':db[_0x239cdb+_0x72d1('0x6d')],'as':_0x72d1('0x6d')},{'model':db[_0x239cdb+_0x27c651],'as':_0x72d1('0x68')}]});})[_0x72d1('0x8')](function(_0x14a215){if(_['isNil'](_0x14a215)){throw new Error(_0x239cdb+_0x72d1('0x6e'));}_0x4057ec=_0x14a215;return _0x14a215[_0x72d1('0x6f')]({'read':0x0,'readAt':null,'UserId':null});})[_0x72d1('0x8')](function(){var _0x1b06f3={'uniqueid':_0x1c6547+'.'+_0x4057ec['id']+'.'+_0x4057ec['Interaction']['id'],'FromUserId':_0x369153[_0x72d1('0x32')]['id'],'type':_0x72d1('0x70')};_0x1b06f3[_0x239cdb+'MessageId']=_0x4057ec['id'];_0x1b06f3[_0x239cdb+_0x72d1('0x71')]=_0x4057ec['Interaction']['id'];_0x1b06f3[_0x72d1('0x72')+_0x239cdb+_0x27c651+'Id']=_0x4057ec['Account']['id'];_0x1b06f3['To'+_0x239cdb+_0x72d1('0x73')]=_0x266fbc['id'];return db[_0x239cdb+_0x72d1('0x74')][_0x72d1('0x75')](_0x1b06f3);})[_0x72d1('0x8')](function(){return respondWithRpcPromise(_0x72d1('0x76'),{'channel':_0x1c6547,'interaction':_0x4057ec['Interaction'],'message':_0x4057ec,'account':_0x4057ec[_0x72d1('0x68')],'applications':[{'id':0x0,'priority':0x1,'app':_0x72d1('0x70'),'appdata':_0x266fbc[_0x72d1('0x12')]+','+(_0x4057ec['Account'][_0x72d1('0x77')]||0x12c),'interval':_0x72d1('0x78')}]},routingClient);})['then'](respondWithResult(_0x4a6607,null))[_0x72d1('0xd')](handleError(_0x4a6607,null));};};exports[_0x72d1('0x79')]=function(_0x8d4f0d,_0x5c262e){var _0x1d0db0,_0x39d961;if(_[_0x72d1('0x14')](_0x8d4f0d['body'][_0x72d1('0x7a')])){throw new Error('Channel\x20field\x20is\x20mandatory');}var _0x38a32c=_0x8d4f0d['body'][_0x72d1('0x7a')];var _0x2d45c9=_[_0x72d1('0x66')](_0x38a32c);var _0x21ad86=_0x38a32c==='chat'?_0x72d1('0x7b'):_0x72d1('0x68');return db[_0x72d1('0x7c')][_0x72d1('0x6b')]({'raw':!![],'where':{'id':_0x8d4f0d['params']['id'],'role':_0x72d1('0x7d')}})[_0x72d1('0x8')](function(_0x430905){if(_[_0x72d1('0x14')](_0x430905)){throw new Error(_0x72d1('0x7e'));}_0x1d0db0=_0x430905;return db[_0x2d45c9+_0x72d1('0x7f')][_0x72d1('0x6b')]({'where':{'id':_0x8d4f0d['body']['messageId']},'include':[{'model':db[_0x2d45c9+'Interaction'],'as':_0x72d1('0x6d')},{'model':db[_0x2d45c9+_0x21ad86],'as':'Account'}]});})[_0x72d1('0x8')](function(_0x8f4603){if(_['isNil'](_0x8f4603)){throw new Error(_0x2d45c9+_0x72d1('0x6e'));}_0x39d961=_0x8f4603;return _0x8f4603['update']({'read':0x0,'readAt':null,'UserId':null});})[_0x72d1('0x8')](function(){var _0x378cf0={'uniqueid':_0x38a32c+'.'+_0x39d961['id']+'.'+_0x39d961[_0x72d1('0x6d')]['id'],'FromUserId':_0x8d4f0d[_0x72d1('0x32')]['id'],'type':'queue','ToUserId':_0x1d0db0['id']};_0x378cf0[_0x2d45c9+'MessageId']=_0x39d961['id'];_0x378cf0[_0x2d45c9+_0x72d1('0x71')]=_0x39d961['Interaction']['id'];_0x378cf0['From'+_0x2d45c9+_0x21ad86+'Id']=_0x39d961['Account']['id'];return db[_0x2d45c9+_0x72d1('0x74')][_0x72d1('0x75')](_0x378cf0);})[_0x72d1('0x8')](function(){return respondWithRpcPromise(_0x72d1('0x76'),{'channel':_0x38a32c,'interaction':_0x39d961[_0x72d1('0x6d')],'message':_0x39d961,'account':_0x39d961[_0x72d1('0x68')],'applications':[{'id':0x0,'priority':0x1,'app':_0x72d1('0x7d'),'appdata':_0x1d0db0['name']+','+(_0x39d961['Account'][_0x72d1('0x80')]||0x12c),'interval':_0x72d1('0x78')}]},routingClient);})['then'](respondWithResult(_0x5c262e,null))[_0x72d1('0xd')](handleError(_0x5c262e,null));}; \ No newline at end of file +var _0x55ca=['ChatQueuesWaitingInteractions','mailQueuesWaitingInteractions','MailQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','OpenchannelQueuesWaitingInteractions','type','filter','map','uniq','value','indexOf','queue_id','smsQueuesWaitingInteractions','SmsQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','FaxQueuesWaitingInteractions','queueNotify','capitalize','chat','Account','Queue','findOne','\x20Queue\x20not\x20found','messageId','Interaction','update','MessageId','InteractionId','From','QueueId','create','Start','queue','*,*,*,*','agentNotify','channel','Website','User','Agent\x20not\x20found','Message','\x20Message\x20not\x20found','agentTransferTimeout','bluebird','moment','../../config/logger','api','client','http','request','error','code','message','result','catch','stack','name','status','send','isNil','rows','find','voiceChannels','VoiceChannels','query','voiceChannelMixMonitor','merge','then','voiceChannelStopMixMonitor','VoiceQueues','showVoiceQueues','params','updateVoiceQueue','UpdateVoiceQueue','body','voiceQueuesPreview','VoiceQueuesPreview','voiceQueuesChannels','VoiceQueuesChannels','voiceQueuesChannel','voiceQueuesChannelHangup','VoiceQueuesChannelHangup','VoiceQueuesChannelRedirect','outbound','outboundChannels','agents','Agents','agentCapacity','user','interaction','hasOwnProperty','findAll','INTERACTION','length','YYYY-MM-DD\x20HH:mm:ss','updateAttributes','MemberReport','findOrCreate','interface','SIP/%s','agent','internal','AgentCapacity','capacity','telephones','Telephones','Trunks','campaigns','Campaigns','ChatQueues','showChatQueues','MailQueues','showMailQueues','mailAccounts','MailAccounts','openchannelQueues','OpenchannelQueues','smsQueues','SmsQueues','WhatsappQueues','showWhatsappQueues','faxQueues','FaxQueues','showFaxQueues','faxAccounts','FaxAccounts','chatQueuesWaitingInteractions'];(function(_0x23ad48,_0x104b01){var _0x199a20=function(_0x4805d0){while(--_0x4805d0){_0x23ad48['push'](_0x23ad48['shift']());}};_0x199a20(++_0x104b01);}(_0x55ca,0x126));var _0xa55c=function(_0x2f02d4,_0x27b24a){_0x2f02d4=_0x2f02d4-0x0;var _0x4b707d=_0x55ca[_0x2f02d4];return _0x4b707d;};'use strict';var BPromise=require(_0xa55c('0x0'));var moment=require(_0xa55c('0x1'));var _=require('lodash');var util=require('util');var db=require('../../mysqldb')['db'];var logger=require(_0xa55c('0x2'))(_0xa55c('0x3'));var jayson=require('jayson/promise');var amiClient=jayson[_0xa55c('0x4')][_0xa55c('0x5')]({'port':0x232a});var mailClient=jayson[_0xa55c('0x4')][_0xa55c('0x5')]({'port':0x232b});var routingClient=jayson[_0xa55c('0x4')][_0xa55c('0x5')]({'port':0x232c});function respondWithRpcPromise(_0x36b623,_0x4d0624,_0x2121fd){return new BPromise(function(_0x2537f0,_0x57e069){var _0x291996=_0x2121fd?_0x2121fd:amiClient;return _0x291996[_0xa55c('0x6')](_0x36b623,_0x4d0624)['then'](function(_0x5849ad){if(_0x5849ad[_0xa55c('0x7')]){if(_0x5849ad[_0xa55c('0x7')][_0xa55c('0x8')]===0x1f4){return _0x57e069(_0x5849ad[_0xa55c('0x7')][_0xa55c('0x9')]);}return _0x2537f0(_0x5849ad[_0xa55c('0x7')][_0xa55c('0x9')]);}else{_0x2537f0(_0x5849ad[_0xa55c('0xa')]);}})[_0xa55c('0xb')](function(_0x15eec8){_0x57e069(_0x15eec8);});});}function respondWithResult(_0x5d47ff,_0x59d84a){_0x59d84a=_0x59d84a||0xc8;return function(_0x2a35be){if(_0x2a35be){return _0x5d47ff['status'](_0x59d84a)['json'](_0x2a35be);}return _0x5d47ff['sendStatus'](0x194);};}function handleError(_0x18ee85,_0x3930e4){_0x3930e4=_0x3930e4||0x1f4;return function(_0x462cd6){logger[_0xa55c('0x7')](_0x462cd6[_0xa55c('0xc')]);if(_0x462cd6[_0xa55c('0xd')]){delete _0x462cd6['name'];}_0x18ee85[_0xa55c('0xe')](_0x3930e4)[_0xa55c('0xf')](_0x462cd6);};}function findById(_0x25934f){return function(_0x31e10d){if(!_[_0xa55c('0x10')](_0x25934f)&&!_[_0xa55c('0x10')](_0x31e10d)&&!_[_0xa55c('0x10')](_0x31e10d[_0xa55c('0x11')])){return _[_0xa55c('0x12')](_0x31e10d['rows'],function(_0x3d4c9e){return _0x3d4c9e['id']==_0x25934f;});}return null;};}exports[_0xa55c('0x13')]=function(_0x461284,_0x358b61){return respondWithRpcPromise(_0xa55c('0x14'),_0x461284[_0xa55c('0x15')])['then'](respondWithResult(_0x358b61,null))['catch'](handleError(_0x358b61,null));};exports[_0xa55c('0x16')]=function(_0x3776ac,_0xade4c4){return respondWithRpcPromise('VoiceChannelMixMonitor',_[_0xa55c('0x17')](_0x3776ac[_0xa55c('0x15')],_0x3776ac['params']))[_0xa55c('0x18')](respondWithResult(_0xade4c4,null))[_0xa55c('0xb')](handleError(_0xade4c4,null));};exports[_0xa55c('0x19')]=function(_0x1965f1,_0x234372){return respondWithRpcPromise('VoiceChannelStopMixMonitor',_[_0xa55c('0x17')](_0x1965f1['query'],_0x1965f1['params']))['then'](respondWithResult(_0x234372,null))[_0xa55c('0xb')](handleError(_0x234372,null));};exports['voiceQueues']=function(_0x3ecbe7,_0x190757){return respondWithRpcPromise(_0xa55c('0x1a'),_0x3ecbe7[_0xa55c('0x15')])[_0xa55c('0x18')](respondWithResult(_0x190757,null))[_0xa55c('0xb')](handleError(_0x190757,null));};exports[_0xa55c('0x1b')]=function(_0x11e7f7,_0x192df2){return respondWithRpcPromise(_0xa55c('0x1a'),_0x11e7f7[_0xa55c('0x15')])['then'](findById(_0x11e7f7[_0xa55c('0x1c')]['id']))[_0xa55c('0x18')](respondWithResult(_0x192df2,null))[_0xa55c('0xb')](handleError(_0x192df2,null));};exports[_0xa55c('0x1d')]=function(_0x5d940d,_0x1377b0){return respondWithRpcPromise(_0xa55c('0x1e'),_[_0xa55c('0x17')](_0x5d940d[_0xa55c('0x1f')],_0x5d940d[_0xa55c('0x1c')]))[_0xa55c('0x18')](respondWithResult(_0x1377b0,null))['catch'](handleError(_0x1377b0,null));};exports[_0xa55c('0x20')]=function(_0x490b7d,_0x35c9c2){return respondWithRpcPromise(_0xa55c('0x21'),_[_0xa55c('0x17')](_0x490b7d[_0xa55c('0x15')],_0x490b7d['params']))[_0xa55c('0x18')](respondWithResult(_0x35c9c2,null))[_0xa55c('0xb')](handleError(_0x35c9c2,null));};exports[_0xa55c('0x22')]=function(_0x20da31,_0x10f4b7){return respondWithRpcPromise(_0xa55c('0x23'),_0x20da31[_0xa55c('0x15')])[_0xa55c('0x18')](respondWithResult(_0x10f4b7,null))[_0xa55c('0xb')](handleError(_0x10f4b7,null));};exports[_0xa55c('0x24')]=function(_0x197099,_0x4eb7c4){return respondWithRpcPromise('VoiceQueuesChannel',_[_0xa55c('0x17')](_0x197099[_0xa55c('0x15')],_0x197099['params']))[_0xa55c('0x18')](respondWithResult(_0x4eb7c4,null))[_0xa55c('0xb')](handleError(_0x4eb7c4,null));};exports[_0xa55c('0x25')]=function(_0x1839ac,_0x30d4f8){return respondWithRpcPromise(_0xa55c('0x26'),_[_0xa55c('0x17')](_0x1839ac[_0xa55c('0x15')],_0x1839ac[_0xa55c('0x1c')]))['then'](respondWithResult(_0x30d4f8,null))['catch'](handleError(_0x30d4f8,null));};exports['voiceQueuesChannelRedirect']=function(_0x3fd75f,_0x18e00e){return respondWithRpcPromise(_0xa55c('0x27'),_['merge'](_0x3fd75f[_0xa55c('0x15')],_0x3fd75f['params']))[_0xa55c('0x18')](respondWithResult(_0x18e00e,null))['catch'](handleError(_0x18e00e,null));};exports[_0xa55c('0x28')]=function(_0x39267c,_0x3c0ec1){return respondWithRpcPromise('Outbound',_0x39267c[_0xa55c('0x15')])[_0xa55c('0x18')](respondWithResult(_0x3c0ec1,null))['catch'](handleError(_0x3c0ec1,null));};exports[_0xa55c('0x29')]=function(_0x194e78,_0x4d9083){return respondWithRpcPromise('OutboundChannels',_0x194e78[_0xa55c('0x15')])['then'](respondWithResult(_0x4d9083,null))[_0xa55c('0xb')](handleError(_0x4d9083,null));};exports[_0xa55c('0x2a')]=function(_0x5427bf,_0x542d76){var _0x5e50b6;return respondWithRpcPromise('Agents',_0x5427bf[_0xa55c('0x15')])[_0xa55c('0x18')](function(_0x429336){_0x5e50b6=_0x429336;return respondWithRpcPromise(_0xa55c('0x2b'),_0x5427bf[_0xa55c('0x15')],routingClient);})['then'](function(_0x3d52d8){return _[_0xa55c('0x17')]({},_0x3d52d8,_0x5e50b6);})[_0xa55c('0x18')](respondWithResult(_0x542d76,null))[_0xa55c('0xb')](handleError(_0x542d76,null));};exports[_0xa55c('0x2c')]=function(_0x23cef5,_0x554620){if(_0x23cef5[_0xa55c('0x1f')]&&_0x23cef5['body']['interaction']&&_0x23cef5[_0xa55c('0x2d')]&&_0x23cef5[_0xa55c('0x2d')]['name']){for(var _0x2bd98b in _0x23cef5['body']['interaction']){if(_0x23cef5[_0xa55c('0x1f')][_0xa55c('0x2e')][_0xa55c('0x2f')](_0x2bd98b)){db['MemberReport'][_0xa55c('0x30')]({'where':{'channel':_0x2bd98b,'membername':_0x23cef5[_0xa55c('0x2d')]['name'],'type':_0xa55c('0x31'),'exitAt':null,'uniqueid':_0x23cef5['body'][_0xa55c('0x2e')][_0x2bd98b]&&_0x23cef5[_0xa55c('0x1f')]['interaction'][_0x2bd98b][_0xa55c('0x32')]?{'$notIn':_0x23cef5[_0xa55c('0x1f')]['interaction'][_0x2bd98b]}:{'$ne':null}}})[_0xa55c('0x18')](function(_0x187e09){var _0x204767=moment()['format'](_0xa55c('0x33'));for(var _0x582901=0x0,_0x2f9717=_0x187e09[_0xa55c('0x32')];_0x582901<_0x2f9717;_0x582901+=0x1){_0x187e09[_0x582901][_0xa55c('0x34')]({'exitAt':_0x204767});}});for(var _0x51d663=0x0;_0x51d663<_0x23cef5[_0xa55c('0x1f')][_0xa55c('0x2e')][_0x2bd98b]['length'];_0x51d663+=0x1){db[_0xa55c('0x35')][_0xa55c('0x36')]({'where':{'channel':_0x2bd98b,'membername':_0x23cef5['user'][_0xa55c('0xd')],'type':_0xa55c('0x31'),'uniqueid':_0x23cef5['body'][_0xa55c('0x2e')][_0x2bd98b][_0x51d663],'exitAt':null},'defaults':{'channel':_0x2bd98b,'membername':_0x23cef5[_0xa55c('0x2d')][_0xa55c('0xd')],'interface':_[_0xa55c('0x10')](_0x23cef5['user'][_0xa55c('0x37')])?util['format'](_0xa55c('0x38'),_0x23cef5[_0xa55c('0x2d')][_0xa55c('0xd')]):_0x23cef5['user'][_0xa55c('0x37')],'type':_0xa55c('0x31'),'enterAt':moment()['format'](_0xa55c('0x33')),'role':_0xa55c('0x39'),'internal':_0x23cef5[_0xa55c('0x2d')][_0xa55c('0x3a')],'uniqueid':_0x23cef5[_0xa55c('0x1f')][_0xa55c('0x2e')][_0x2bd98b][_0x51d663]}});}}}}return respondWithRpcPromise(_0xa55c('0x3b'),{'id':_0x23cef5[_0xa55c('0x1c')]['id'],'capacity':_0x23cef5[_0xa55c('0x1f')][_0xa55c('0x3c')]},routingClient)['then'](respondWithResult(_0x554620,null))[_0xa55c('0xb')](handleError(_0x554620,null));};exports[_0xa55c('0x3d')]=function(_0x216de8,_0x4f73b6){return respondWithRpcPromise(_0xa55c('0x3e'),_0x216de8[_0xa55c('0x15')])['then'](respondWithResult(_0x4f73b6,null))[_0xa55c('0xb')](handleError(_0x4f73b6,null));};exports['trunks']=function(_0x2b6a0e,_0x228df4){return respondWithRpcPromise(_0xa55c('0x3f'),_0x2b6a0e[_0xa55c('0x15')])[_0xa55c('0x18')](respondWithResult(_0x228df4,null))['catch'](handleError(_0x228df4,null));};exports[_0xa55c('0x40')]=function(_0x4607ca,_0x4b85cc){return respondWithRpcPromise(_0xa55c('0x41'),_0x4607ca[_0xa55c('0x15')])[_0xa55c('0x18')](respondWithResult(_0x4b85cc,null))[_0xa55c('0xb')](handleError(_0x4b85cc,null));};exports['chatQueues']=function(_0x4def35,_0x267965){return respondWithRpcPromise(_0xa55c('0x42'),_0x4def35[_0xa55c('0x15')],routingClient)[_0xa55c('0x18')](respondWithResult(_0x267965,null))['catch'](handleError(_0x267965,null));};exports[_0xa55c('0x43')]=function(_0x5ce463,_0x2742e4){return respondWithRpcPromise(_0xa55c('0x42'),_0x5ce463[_0xa55c('0x15')],routingClient)[_0xa55c('0x18')](findById(_0x5ce463[_0xa55c('0x1c')]['id']))['then'](respondWithResult(_0x2742e4,null))[_0xa55c('0xb')](handleError(_0x2742e4,null));};exports['mailQueues']=function(_0x23f67f,_0x157afe){return respondWithRpcPromise(_0xa55c('0x44'),_0x23f67f[_0xa55c('0x15')],routingClient)[_0xa55c('0x18')](respondWithResult(_0x157afe,null))[_0xa55c('0xb')](handleError(_0x157afe,null));};exports[_0xa55c('0x45')]=function(_0x53e2be,_0x450567){return respondWithRpcPromise(_0xa55c('0x44'),_0x53e2be[_0xa55c('0x15')],routingClient)[_0xa55c('0x18')](findById(_0x53e2be[_0xa55c('0x1c')]['id']))['then'](respondWithResult(_0x450567,null))[_0xa55c('0xb')](handleError(_0x450567,null));};exports[_0xa55c('0x46')]=function(_0x28bac4,_0x20e53c){return respondWithRpcPromise(_0xa55c('0x47'),_0x28bac4['query'],mailClient)[_0xa55c('0x18')](respondWithResult(_0x20e53c,null))[_0xa55c('0xb')](handleError(_0x20e53c,null));};exports[_0xa55c('0x48')]=function(_0x16d9b2,_0x3ba56d){return respondWithRpcPromise('OpenchannelQueues',_0x16d9b2[_0xa55c('0x15')],routingClient)['then'](respondWithResult(_0x3ba56d,null))[_0xa55c('0xb')](handleError(_0x3ba56d,null));};exports['showOpenchannelQueues']=function(_0x3495a7,_0x5a8897){return respondWithRpcPromise(_0xa55c('0x49'),_0x3495a7[_0xa55c('0x15')],routingClient)[_0xa55c('0x18')](findById(_0x3495a7[_0xa55c('0x1c')]['id']))[_0xa55c('0x18')](respondWithResult(_0x5a8897,null))[_0xa55c('0xb')](handleError(_0x5a8897,null));};exports[_0xa55c('0x4a')]=function(_0x2f2226,_0x14b515){return respondWithRpcPromise(_0xa55c('0x4b'),_0x2f2226['query'],routingClient)[_0xa55c('0x18')](respondWithResult(_0x14b515,null))[_0xa55c('0xb')](handleError(_0x14b515,null));};exports['showSmsQueues']=function(_0x18b928,_0x2b8b88){return respondWithRpcPromise(_0xa55c('0x4b'),_0x18b928[_0xa55c('0x15')],routingClient)[_0xa55c('0x18')](findById(_0x18b928[_0xa55c('0x1c')]['id']))[_0xa55c('0x18')](respondWithResult(_0x2b8b88,null))[_0xa55c('0xb')](handleError(_0x2b8b88,null));};exports['whatsappQueues']=function(_0x1dfaf7,_0x475131){return respondWithRpcPromise(_0xa55c('0x4c'),_0x1dfaf7[_0xa55c('0x15')],routingClient)[_0xa55c('0x18')](respondWithResult(_0x475131,null))[_0xa55c('0xb')](handleError(_0x475131,null));};exports[_0xa55c('0x4d')]=function(_0x4249c1,_0x25d5a1){return respondWithRpcPromise('WhatsappQueues',_0x4249c1[_0xa55c('0x15')],routingClient)[_0xa55c('0x18')](findById(_0x4249c1[_0xa55c('0x1c')]['id']))[_0xa55c('0x18')](respondWithResult(_0x25d5a1,null))[_0xa55c('0xb')](handleError(_0x25d5a1,null));};exports[_0xa55c('0x4e')]=function(_0x3ea755,_0x3606b2){return respondWithRpcPromise(_0xa55c('0x4f'),_0x3ea755[_0xa55c('0x15')],routingClient)[_0xa55c('0x18')](respondWithResult(_0x3606b2,null))['catch'](handleError(_0x3606b2,null));};exports[_0xa55c('0x50')]=function(_0x531eee,_0x1228a4){return respondWithRpcPromise(_0xa55c('0x4f'),_0x531eee[_0xa55c('0x15')],routingClient)['then'](findById(_0x531eee['params']['id']))[_0xa55c('0x18')](respondWithResult(_0x1228a4,null))[_0xa55c('0xb')](handleError(_0x1228a4,null));};exports[_0xa55c('0x51')]=function(_0x42529f,_0x4c7ee1){return respondWithRpcPromise(_0xa55c('0x52'),_0x42529f[_0xa55c('0x15')])[_0xa55c('0x18')](respondWithResult(_0x4c7ee1,null))[_0xa55c('0xb')](handleError(_0x4c7ee1,null));};exports[_0xa55c('0x53')]=function(_0x500968,_0x4b090c){return respondWithRpcPromise(_0xa55c('0x54'),_0x500968[_0xa55c('0x15')],routingClient)[_0xa55c('0x18')](respondWithResult(_0x4b090c,null))[_0xa55c('0xb')](handleError(_0x4b090c,null));};exports[_0xa55c('0x55')]=function(_0x4b2032,_0x14febc){return respondWithRpcPromise(_0xa55c('0x56'),_0x4b2032['query'],routingClient)[_0xa55c('0x18')](respondWithResult(_0x14febc,null))[_0xa55c('0xb')](handleError(_0x14febc,null));};exports[_0xa55c('0x57')]=function(_0x4dcb93,_0x1521d5){return respondWithRpcPromise(_0xa55c('0x58'),_0x4dcb93[_0xa55c('0x15')],routingClient)[_0xa55c('0x18')](respondWithResult(_0x1521d5,null))[_0xa55c('0xb')](handleError(_0x1521d5,null));};exports['openchannelQueuesIdWaitingInteractions']=function(_0x25bd5b,_0x2e2cf6){return respondWithRpcPromise('OpenchannelQueuesWaitingInteractions',_0x25bd5b['query'],routingClient)[_0xa55c('0x18')](function(_0x4e1cbd){if(_0x25bd5b[_0xa55c('0x15')][_0xa55c('0x59')]!==undefined){var _0x2f13db=_(_0x4e1cbd[_0xa55c('0x11')])[_0xa55c('0x5a')]([_0x25bd5b[_0xa55c('0x15')][_0xa55c('0x59')],_0x25bd5b[_0xa55c('0x1c')]['id']])[_0xa55c('0x5b')]('queue_id')[_0xa55c('0x5c')]()[_0xa55c('0x5d')]();return _0x4e1cbd[_0xa55c('0x11')][_0xa55c('0x5a')](function(_0x4f0a26){return _0x2f13db[_0xa55c('0x5e')](_0x4f0a26[_0xa55c('0x5f')])>-0x1;});}else{return _0x4e1cbd[_0xa55c('0x11')][_0xa55c('0x5a')](function(_0x5d766e){return _0x5d766e['queue_id']===parseInt(_0x25bd5b[_0xa55c('0x1c')]['id']);});}})[_0xa55c('0x18')](respondWithResult(_0x2e2cf6,null))[_0xa55c('0xb')](handleError(_0x2e2cf6,null));};exports[_0xa55c('0x60')]=function(_0x5e87cb,_0x55ee0d){return respondWithRpcPromise(_0xa55c('0x61'),_0x5e87cb[_0xa55c('0x15')],routingClient)[_0xa55c('0x18')](respondWithResult(_0x55ee0d,null))[_0xa55c('0xb')](handleError(_0x55ee0d,null));};exports[_0xa55c('0x62')]=function(_0x346060,_0x239269){return respondWithRpcPromise('WhatsappQueuesWaitingInteractions',_0x346060[_0xa55c('0x15')],routingClient)['then'](respondWithResult(_0x239269,null))[_0xa55c('0xb')](handleError(_0x239269,null));};exports['faxQueuesWaitingInteractions']=function(_0x36ded7,_0x313cdc){return respondWithRpcPromise(_0xa55c('0x63'),_0x36ded7[_0xa55c('0x15')],routingClient)[_0xa55c('0x18')](respondWithResult(_0x313cdc,null))[_0xa55c('0xb')](handleError(_0x313cdc,null));};exports[_0xa55c('0x64')]=function(_0x2c71ca){return function(_0x576a1b,_0x59414d){var _0x14cb74,_0x2948b1;var _0xc2ad5c=_[_0xa55c('0x65')](_0x2c71ca);var _0x1622cb=_0x2c71ca===_0xa55c('0x66')?'Website':_0xa55c('0x67');return db[_0xc2ad5c+_0xa55c('0x68')][_0xa55c('0x69')]({'raw':!![],'where':{'id':_0x576a1b[_0xa55c('0x1c')]['id']}})[_0xa55c('0x18')](function(_0x3b1cd7){if(_[_0xa55c('0x10')](_0x3b1cd7)){throw new Error(_0xc2ad5c+_0xa55c('0x6a'));}_0x14cb74=_0x3b1cd7;return db[_0xc2ad5c+'Message'][_0xa55c('0x69')]({'where':{'id':_0x576a1b[_0xa55c('0x1f')][_0xa55c('0x6b')]},'include':[{'model':db[_0xc2ad5c+_0xa55c('0x6c')],'as':_0xa55c('0x6c')},{'model':db[_0xc2ad5c+_0x1622cb],'as':'Account'}]});})[_0xa55c('0x18')](function(_0x2ab1f2){if(_['isNil'](_0x2ab1f2)){throw new Error(_0xc2ad5c+'\x20Message\x20not\x20found');}_0x2948b1=_0x2ab1f2;return _0x2ab1f2[_0xa55c('0x6d')]({'read':0x0,'readAt':null,'UserId':null});})[_0xa55c('0x18')](function(){var _0x5c2229={'uniqueid':_0x2c71ca+'.'+_0x2948b1['id']+'.'+_0x2948b1['Interaction']['id'],'FromUserId':_0x576a1b['user']['id'],'type':'queue'};_0x5c2229[_0xc2ad5c+_0xa55c('0x6e')]=_0x2948b1['id'];_0x5c2229[_0xc2ad5c+_0xa55c('0x6f')]=_0x2948b1[_0xa55c('0x6c')]['id'];_0x5c2229[_0xa55c('0x70')+_0xc2ad5c+_0x1622cb+'Id']=_0x2948b1[_0xa55c('0x67')]['id'];_0x5c2229['To'+_0xc2ad5c+_0xa55c('0x71')]=_0x14cb74['id'];return db[_0xc2ad5c+'TransferReport'][_0xa55c('0x72')](_0x5c2229);})[_0xa55c('0x18')](function(){return respondWithRpcPromise(_0xa55c('0x73'),{'channel':_0x2c71ca,'interaction':_0x2948b1[_0xa55c('0x6c')],'message':_0x2948b1,'account':_0x2948b1['Account'],'applications':[{'id':0x0,'priority':0x1,'app':_0xa55c('0x74'),'appdata':_0x14cb74[_0xa55c('0xd')]+','+(_0x2948b1[_0xa55c('0x67')]['queueTransferTimeout']||0x12c),'interval':_0xa55c('0x75')}]},routingClient);})['then'](respondWithResult(_0x59414d,null))['catch'](handleError(_0x59414d,null));};};exports[_0xa55c('0x76')]=function(_0x413b45,_0x1e298d){var _0x249b0c,_0x2544c1;if(_[_0xa55c('0x10')](_0x413b45[_0xa55c('0x1f')]['channel'])){throw new Error('Channel\x20field\x20is\x20mandatory');}var _0x71bd0d=_0x413b45[_0xa55c('0x1f')][_0xa55c('0x77')];var _0x1f4bc8=_[_0xa55c('0x65')](_0x71bd0d);var _0x2a0805=_0x71bd0d===_0xa55c('0x66')?_0xa55c('0x78'):_0xa55c('0x67');return db[_0xa55c('0x79')]['findOne']({'raw':!![],'where':{'id':_0x413b45[_0xa55c('0x1c')]['id'],'role':_0xa55c('0x39')}})['then'](function(_0xb9708){if(_['isNil'](_0xb9708)){throw new Error(_0xa55c('0x7a'));}_0x249b0c=_0xb9708;return db[_0x1f4bc8+_0xa55c('0x7b')][_0xa55c('0x69')]({'where':{'id':_0x413b45[_0xa55c('0x1f')][_0xa55c('0x6b')]},'include':[{'model':db[_0x1f4bc8+'Interaction'],'as':_0xa55c('0x6c')},{'model':db[_0x1f4bc8+_0x2a0805],'as':_0xa55c('0x67')}]});})[_0xa55c('0x18')](function(_0x376c1f){if(_[_0xa55c('0x10')](_0x376c1f)){throw new Error(_0x1f4bc8+_0xa55c('0x7c'));}_0x2544c1=_0x376c1f;return _0x376c1f[_0xa55c('0x6d')]({'read':0x0,'readAt':null,'UserId':null});})['then'](function(){var _0x49a307={'uniqueid':_0x71bd0d+'.'+_0x2544c1['id']+'.'+_0x2544c1['Interaction']['id'],'FromUserId':_0x413b45[_0xa55c('0x2d')]['id'],'type':'queue','ToUserId':_0x249b0c['id']};_0x49a307[_0x1f4bc8+_0xa55c('0x6e')]=_0x2544c1['id'];_0x49a307[_0x1f4bc8+_0xa55c('0x6f')]=_0x2544c1[_0xa55c('0x6c')]['id'];_0x49a307[_0xa55c('0x70')+_0x1f4bc8+_0x2a0805+'Id']=_0x2544c1[_0xa55c('0x67')]['id'];return db[_0x1f4bc8+'TransferReport'][_0xa55c('0x72')](_0x49a307);})['then'](function(){return respondWithRpcPromise(_0xa55c('0x73'),{'channel':_0x71bd0d,'interaction':_0x2544c1[_0xa55c('0x6c')],'message':_0x2544c1,'account':_0x2544c1[_0xa55c('0x67')],'applications':[{'id':0x0,'priority':0x1,'app':_0xa55c('0x39'),'appdata':_0x249b0c['name']+','+(_0x2544c1[_0xa55c('0x67')][_0xa55c('0x7d')]||0x12c),'interval':_0xa55c('0x75')}]},routingClient);})[_0xa55c('0x18')](respondWithResult(_0x1e298d,null))[_0xa55c('0xb')](handleError(_0x1e298d,null));}; \ No newline at end of file diff --git a/server/api/schedule/index.js b/server/api/schedule/index.js index 5139ca7..8c940cf 100644 --- a/server/api/schedule/index.js +++ b/server/api/schedule/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc4b2=['put','/:id','update','delete','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./schedule.controller','get','isAuthenticated','index','show','/:id/run','post','create'];(function(_0xb1d7ab,_0x540793){var _0x539c3b=function(_0x10f11c){while(--_0x10f11c){_0xb1d7ab['push'](_0xb1d7ab['shift']());}};_0x539c3b(++_0x540793);}(_0xc4b2,0xcb));var _0x2c4b=function(_0x339eaa,_0xbc2f72){_0x339eaa=_0x339eaa-0x0;var _0x4985b6=_0xc4b2[_0x339eaa];return _0x4985b6;};'use strict';var multer=require('multer');var util=require(_0x2c4b('0x0'));var path=require(_0x2c4b('0x1'));var timeout=require(_0x2c4b('0x2'));var express=require(_0x2c4b('0x3'));var router=express[_0x2c4b('0x4')]();var fs_extra=require(_0x2c4b('0x5'));var auth=require(_0x2c4b('0x6'));var interaction=require(_0x2c4b('0x7'));var config=require(_0x2c4b('0x8'));var controller=require(_0x2c4b('0x9'));router[_0x2c4b('0xa')]('/',auth[_0x2c4b('0xb')](),controller[_0x2c4b('0xc')]);router[_0x2c4b('0xa')]('/:id',auth[_0x2c4b('0xb')](),controller[_0x2c4b('0xd')]);router['get'](_0x2c4b('0xe'),auth['isAuthenticated'](),controller['run']);router[_0x2c4b('0xf')]('/',auth['isAuthenticated'](),controller[_0x2c4b('0x10')]);router[_0x2c4b('0x11')](_0x2c4b('0x12'),auth[_0x2c4b('0xb')](),controller[_0x2c4b('0x13')]);router[_0x2c4b('0x14')]('/:id',auth[_0x2c4b('0xb')](),controller['destroy']);module[_0x2c4b('0x15')]=router; \ No newline at end of file +var _0x5b72=['Router','fs-extra','../../components/auth/service','../../config/environment','get','isAuthenticated','index','/:id','show','/:id/run','post','put','update','destroy','exports','multer','util','path'];(function(_0x3e0a57,_0x1f24f8){var _0x463fb9=function(_0x4a696d){while(--_0x4a696d){_0x3e0a57['push'](_0x3e0a57['shift']());}};_0x463fb9(++_0x1f24f8);}(_0x5b72,0x177));var _0x25b7=function(_0xbafb3c,_0x2d8a85){_0xbafb3c=_0xbafb3c-0x0;var _0x3225e7=_0x5b72[_0xbafb3c];return _0x3225e7;};'use strict';var multer=require(_0x25b7('0x0'));var util=require(_0x25b7('0x1'));var path=require(_0x25b7('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x25b7('0x3')]();var fs_extra=require(_0x25b7('0x4'));var auth=require(_0x25b7('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x25b7('0x6'));var controller=require('./schedule.controller');router[_0x25b7('0x7')]('/',auth[_0x25b7('0x8')](),controller[_0x25b7('0x9')]);router[_0x25b7('0x7')](_0x25b7('0xa'),auth[_0x25b7('0x8')](),controller[_0x25b7('0xb')]);router[_0x25b7('0x7')](_0x25b7('0xc'),auth[_0x25b7('0x8')](),controller['run']);router[_0x25b7('0xd')]('/',auth[_0x25b7('0x8')](),controller['create']);router[_0x25b7('0xe')](_0x25b7('0xa'),auth[_0x25b7('0x8')](),controller[_0x25b7('0xf')]);router['delete'](_0x25b7('0xa'),auth[_0x25b7('0x8')](),controller[_0x25b7('0x10')]);module[_0x25b7('0x11')]=router; \ No newline at end of file diff --git a/server/api/schedule/schedule.attributes.js b/server/api/schedule/schedule.attributes.js index a0dfeb9..cb430ce 100644 --- a/server/api/schedule/schedule.attributes.js +++ b/server/api/schedule/schedule.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x30db=['months','weeks','days','hours','csv','pdf','xlsx','custom','TEXT','sequelize','STRING','BOOLEAN','0\x200\x20*\x20*\x20*','DATE','INTEGER','ENUM','years','quarters'];(function(_0x380e5b,_0x16c7ff){var _0x1c2860=function(_0x528014){while(--_0x528014){_0x380e5b['push'](_0x380e5b['shift']());}};_0x1c2860(++_0x16c7ff);}(_0x30db,0x13b));var _0xb30d=function(_0x40a045,_0x516f0e){_0x40a045=_0x40a045-0x0;var _0x1a687c=_0x30db[_0x40a045];return _0x1a687c;};'use strict';var Sequelize=require(_0xb30d('0x0'));module['exports']={'name':{'type':Sequelize['STRING'],'allowNull':![]},'description':{'type':Sequelize[_0xb30d('0x1')]},'active':{'type':Sequelize[_0xb30d('0x2')],'allowNull':![],'defaultValue':![]},'cron':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0xb30d('0x3')},'startAt':{'type':Sequelize[_0xb30d('0x4')],'allowNull':![]},'endAt':{'type':Sequelize[_0xb30d('0x4')],'allowNull':![]},'subtractNumber':{'type':Sequelize[_0xb30d('0x5')],'allowNull':![],'defaultValue':0x1,'validate':{'min':0x1}},'subtractUnit':{'type':Sequelize[_0xb30d('0x6')](_0xb30d('0x7'),_0xb30d('0x8'),_0xb30d('0x9'),_0xb30d('0xa'),_0xb30d('0xb'),_0xb30d('0xc'),'minutes'),'allowNull':![],'defaultValue':'days'},'output':{'type':Sequelize['ENUM'](_0xb30d('0xd'),_0xb30d('0xe'),_0xb30d('0xf')),'allowNull':![],'defaultValue':'csv'},'type':{'type':Sequelize[_0xb30d('0x6')](_0xb30d('0x10'),'default'),'allowNull':![],'defaultValue':_0xb30d('0x10')},'sendMail':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'email':{'type':Sequelize[_0xb30d('0x1')]},'cc':{'type':Sequelize[_0xb30d('0x11')]},'bcc':{'type':Sequelize['TEXT']},'sendIfEmpty':{'type':Sequelize[_0xb30d('0x2')],'defaultValue':!![]}}; \ No newline at end of file +var _0x479e=['0\x200\x20*\x20*\x20*','DATE','INTEGER','ENUM','years','quarters','weeks','days','minutes','csv','xlsx','custom','default','TEXT','sequelize','exports','STRING','BOOLEAN'];(function(_0x2cf6de,_0x44f295){var _0x1ca22e=function(_0x3d0444){while(--_0x3d0444){_0x2cf6de['push'](_0x2cf6de['shift']());}};_0x1ca22e(++_0x44f295);}(_0x479e,0x1be));var _0xe479=function(_0x126558,_0x1c93a9){_0x126558=_0x126558-0x0;var _0x3c70db=_0x479e[_0x126558];return _0x3c70db;};'use strict';var Sequelize=require(_0xe479('0x0'));module[_0xe479('0x1')]={'name':{'type':Sequelize[_0xe479('0x2')],'allowNull':![]},'description':{'type':Sequelize[_0xe479('0x2')]},'active':{'type':Sequelize[_0xe479('0x3')],'allowNull':![],'defaultValue':![]},'cron':{'type':Sequelize[_0xe479('0x2')],'allowNull':![],'defaultValue':_0xe479('0x4')},'startAt':{'type':Sequelize['DATE'],'allowNull':![]},'endAt':{'type':Sequelize[_0xe479('0x5')],'allowNull':![]},'subtractNumber':{'type':Sequelize[_0xe479('0x6')],'allowNull':![],'defaultValue':0x1,'validate':{'min':0x1}},'subtractUnit':{'type':Sequelize[_0xe479('0x7')](_0xe479('0x8'),_0xe479('0x9'),'months',_0xe479('0xa'),_0xe479('0xb'),'hours',_0xe479('0xc')),'allowNull':![],'defaultValue':'days'},'output':{'type':Sequelize[_0xe479('0x7')](_0xe479('0xd'),'pdf',_0xe479('0xe')),'allowNull':![],'defaultValue':'csv'},'type':{'type':Sequelize[_0xe479('0x7')](_0xe479('0xf'),_0xe479('0x10')),'allowNull':![],'defaultValue':_0xe479('0xf')},'sendMail':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'email':{'type':Sequelize[_0xe479('0x2')]},'cc':{'type':Sequelize[_0xe479('0x11')]},'bcc':{'type':Sequelize[_0xe479('0x11')]},'sendIfEmpty':{'type':Sequelize[_0xe479('0x3')],'defaultValue':!![]}}; \ No newline at end of file diff --git a/server/api/schedule/schedule.controller.js b/server/api/schedule/schedule.controller.js index a60e75c..0aed536 100644 --- a/server/api/schedule/schedule.controller.js +++ b/server/api/schedule/schedule.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x31a9=['offset','undefined','count','set','Content-Range','apply','reject','save','update','then','get','Scheduler','UserProfileResource','destroy','end','name','send','index','Schedule','fieldName','type','model','map','query','keys','filters','intersection','fields','length','attributes','hasOwnProperty','nolimit','limit','order','sort','where','pick','filter','VIRTUAL','merge','includeAll','include','findAll','rows','show','params','rawAttributes','options','find','catch','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','run','../../config/schedule','eml-format','rimraf','moment','bluebird','mustache','util','path','to-csv','ejs','fs-extra','lodash','crypto','desk.js','querystring','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'];(function(_0x4c05da,_0x414720){var _0x1614db=function(_0xa19cf6){while(--_0xa19cf6){_0x4c05da['push'](_0x4c05da['shift']());}};_0x1614db(++_0x414720);}(_0x31a9,0x19e));var _0x931a=function(_0x2826c6,_0x481561){_0x2826c6=_0x2826c6-0x0;var _0x2f1996=_0x31a9[_0x2826c6];return _0x2f1996;};'use strict';var emlformat=require(_0x931a('0x0'));var rimraf=require(_0x931a('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x931a('0x2'));var BPromise=require(_0x931a('0x3'));var Mustache=require(_0x931a('0x4'));var util=require(_0x931a('0x5'));var path=require(_0x931a('0x6'));var sox=require('sox');var csv=require(_0x931a('0x7'));var ejs=require(_0x931a('0x8'));var fs=require('fs');var fs_extra=require(_0x931a('0x9'));var _=require(_0x931a('0xa'));var squel=require('squel');var crypto=require(_0x931a('0xb'));var jsforce=require('jsforce');var deskjs=require(_0x931a('0xc'));var toCsv=require('to-csv');var querystring=require(_0x931a('0xd'));var Papa=require('papaparse');var Redis=require(_0x931a('0xe'));var authService=require(_0x931a('0xf'));var qs=require(_0x931a('0x10'));var as=require(_0x931a('0x11'));var hardwareService=require(_0x931a('0x12'));var logger=require(_0x931a('0x13'))('api');var utils=require(_0x931a('0x14'));var config=require(_0x931a('0x15'));var licenseUtil=require(_0x931a('0x16'));var db=require(_0x931a('0x17'))['db'];function respondWithStatusCode(_0x1046a3,_0x4ac2f0){_0x4ac2f0=_0x4ac2f0||0xcc;return function(_0x1cd012){if(_0x1cd012){return _0x1046a3[_0x931a('0x18')](_0x4ac2f0);}return _0x1046a3[_0x931a('0x19')](_0x4ac2f0)['end']();};}function respondWithResult(_0x4b6dd5,_0x21f8d8){_0x21f8d8=_0x21f8d8||0xc8;return function(_0x523aa7){if(_0x523aa7){return _0x4b6dd5['status'](_0x21f8d8)['json'](_0x523aa7);}};}function respondWithFilteredResult(_0x6f2b31,_0x185f24){return function(_0x458d0a){if(_0x458d0a){var _0xc5dd00=typeof _0x185f24[_0x931a('0x1a')]===_0x931a('0x1b')&&typeof _0x185f24['limit']===_0x931a('0x1b');var _0x5e5a26=_0x458d0a[_0x931a('0x1c')];var _0x3fec0f=_0xc5dd00?0x0:_0x185f24[_0x931a('0x1a')];var _0x3beff0=_0xc5dd00?_0x458d0a[_0x931a('0x1c')]:_0x185f24[_0x931a('0x1a')]+_0x185f24['limit'];var _0x4e75b9;if(_0x3beff0>=_0x5e5a26){_0x3beff0=_0x5e5a26;_0x4e75b9=0xc8;}else{_0x4e75b9=0xce;}_0x6f2b31[_0x931a('0x19')](_0x4e75b9);return _0x6f2b31[_0x931a('0x1d')](_0x931a('0x1e'),_0x3fec0f+'-'+_0x3beff0+'/'+_0x5e5a26)['json'](_0x458d0a);}return null;};}function patchUpdates(_0x40cbff){return function(_0x15cb8e){try{jsonpatch[_0x931a('0x1f')](_0x15cb8e,_0x40cbff,!![]);}catch(_0x2ebfba){return BPromise[_0x931a('0x20')](_0x2ebfba);}return _0x15cb8e[_0x931a('0x21')]();};}function saveUpdates(_0x17311a,_0x1a02b7){return function(_0x2a5cb){if(_0x2a5cb){return _0x2a5cb[_0x931a('0x22')](_0x17311a)['then'](function(_0x486db4){return _0x486db4;});}return null;};}function removeEntity(_0x1deffb,_0x42606c){return function(_0x3e3497){if(_0x3e3497){return _0x3e3497['destroy']()[_0x931a('0x23')](function(){var _0x16721e=_0x3e3497[_0x931a('0x24')]({'plain':!![]});var _0x10046b=_0x931a('0x25');return db[_0x931a('0x26')][_0x931a('0x27')]({'where':{'type':_0x10046b,'resourceId':_0x16721e['id']}})['then'](function(){return _0x3e3497;});})[_0x931a('0x23')](function(){_0x1deffb[_0x931a('0x19')](0xcc)[_0x931a('0x28')]();});}};}function handleEntityNotFound(_0x1ff134,_0x259348){return function(_0x9bdbee){if(!_0x9bdbee){_0x1ff134[_0x931a('0x18')](0x194);}return _0x9bdbee;};}function handleError(_0x10c2d3,_0x1d5a9e){_0x1d5a9e=_0x1d5a9e||0x1f4;return function(_0x3787b3){logger['error'](_0x3787b3['stack']);if(_0x3787b3[_0x931a('0x29')]){delete _0x3787b3[_0x931a('0x29')];}_0x10c2d3[_0x931a('0x19')](_0x1d5a9e)[_0x931a('0x2a')](_0x3787b3);};}exports[_0x931a('0x2b')]=function(_0x1bd829,_0x5d5fc7){var _0x1e6b74={},_0x54c8f3={},_0x15a716={'count':0x0,'rows':[]};var _0x102327=_['map'](db[_0x931a('0x2c')]['rawAttributes'],function(_0x31d863){return{'name':_0x31d863[_0x931a('0x2d')],'type':_0x31d863[_0x931a('0x2e')]['key']};});_0x54c8f3[_0x931a('0x2f')]=_[_0x931a('0x30')](_0x102327,_0x931a('0x29'));_0x54c8f3[_0x931a('0x31')]=_[_0x931a('0x32')](_0x1bd829[_0x931a('0x31')]);_0x54c8f3[_0x931a('0x33')]=_['intersection'](_0x54c8f3[_0x931a('0x2f')],_0x54c8f3[_0x931a('0x31')]);_0x1e6b74['attributes']=_[_0x931a('0x34')](_0x54c8f3[_0x931a('0x2f')],qs[_0x931a('0x35')](_0x1bd829[_0x931a('0x31')][_0x931a('0x35')]));_0x1e6b74['attributes']=_0x1e6b74['attributes'][_0x931a('0x36')]?_0x1e6b74[_0x931a('0x37')]:_0x54c8f3['model'];if(!_0x1bd829['query'][_0x931a('0x38')](_0x931a('0x39'))){_0x1e6b74[_0x931a('0x3a')]=qs[_0x931a('0x3a')](_0x1bd829['query'][_0x931a('0x3a')]);_0x1e6b74['offset']=qs['offset'](_0x1bd829['query'][_0x931a('0x1a')]);}_0x1e6b74[_0x931a('0x3b')]=qs[_0x931a('0x3c')](_0x1bd829[_0x931a('0x31')][_0x931a('0x3c')]);_0x1e6b74[_0x931a('0x3d')]=qs['filters'](_[_0x931a('0x3e')](_0x1bd829[_0x931a('0x31')],_0x54c8f3[_0x931a('0x33')]),_0x102327);if(_0x1bd829['query'][_0x931a('0x3f')]){_0x1e6b74[_0x931a('0x3d')]=_['merge'](_0x1e6b74[_0x931a('0x3d')],{'$or':_['map'](_0x102327,function(_0x5b7e7d){if(_0x5b7e7d['type']!==_0x931a('0x40')){var _0x4c39d7={};_0x4c39d7[_0x5b7e7d[_0x931a('0x29')]]={'$like':'%'+_0x1bd829[_0x931a('0x31')]['filter']+'%'};return _0x4c39d7;}})});}_0x1e6b74=_[_0x931a('0x41')]({},_0x1e6b74,_0x1bd829['options']);var _0x238a52={'where':_0x1e6b74[_0x931a('0x3d')]};return db[_0x931a('0x2c')][_0x931a('0x1c')](_0x238a52)[_0x931a('0x23')](function(_0x30de55){_0x15a716[_0x931a('0x1c')]=_0x30de55;if(_0x1bd829[_0x931a('0x31')][_0x931a('0x42')]){_0x1e6b74[_0x931a('0x43')]=[{'all':!![]}];}return db[_0x931a('0x2c')][_0x931a('0x44')](_0x1e6b74);})[_0x931a('0x23')](function(_0x1a11d4){_0x15a716[_0x931a('0x45')]=_0x1a11d4;return _0x15a716;})[_0x931a('0x23')](respondWithFilteredResult(_0x5d5fc7,_0x1e6b74))['catch'](handleError(_0x5d5fc7,null));};exports[_0x931a('0x46')]=function(_0x1e141d,_0x34e7ca){var _0x49d31f={'raw':![],'where':{'id':_0x1e141d[_0x931a('0x47')]['id']}},_0x27ae04={};_0x27ae04[_0x931a('0x2f')]=_[_0x931a('0x32')](db['Schedule'][_0x931a('0x48')]);_0x27ae04[_0x931a('0x31')]=_[_0x931a('0x32')](_0x1e141d[_0x931a('0x31')]);_0x27ae04[_0x931a('0x33')]=_['intersection'](_0x27ae04[_0x931a('0x2f')],_0x27ae04[_0x931a('0x31')]);_0x49d31f[_0x931a('0x37')]=_['intersection'](_0x27ae04[_0x931a('0x2f')],qs[_0x931a('0x35')](_0x1e141d[_0x931a('0x31')][_0x931a('0x35')]));_0x49d31f['attributes']=_0x49d31f[_0x931a('0x37')][_0x931a('0x36')]?_0x49d31f['attributes']:_0x27ae04[_0x931a('0x2f')];if(_0x1e141d[_0x931a('0x31')][_0x931a('0x42')]){_0x49d31f[_0x931a('0x43')]=[{'all':!![]}];}_0x49d31f=_[_0x931a('0x41')]({},_0x49d31f,_0x1e141d[_0x931a('0x49')]);return db['Schedule'][_0x931a('0x4a')](_0x49d31f)['then'](handleEntityNotFound(_0x34e7ca,null))[_0x931a('0x23')](respondWithResult(_0x34e7ca,null))[_0x931a('0x4b')](handleError(_0x34e7ca,null));};exports['create']=function(_0x3c7356,_0x54bde0){return db['Schedule'][_0x931a('0x4c')](_0x3c7356[_0x931a('0x4d')],{})['then'](function(_0x21b5a6){var _0x16c71f=_0x3c7356[_0x931a('0x4e')][_0x931a('0x24')]({'plain':!![]});if(!_0x16c71f)throw new Error(_0x931a('0x4f'));if(_0x16c71f[_0x931a('0x50')]===_0x931a('0x4e')){var _0x19eec7=_0x21b5a6[_0x931a('0x24')]({'plain':!![]});var _0x854a50=_0x931a('0x25');return db[_0x931a('0x51')][_0x931a('0x4a')]({'where':{'name':_0x854a50,'userProfileId':_0x16c71f[_0x931a('0x52')]},'raw':!![]})['then'](function(_0x49ab5c){if(_0x49ab5c&&_0x49ab5c[_0x931a('0x53')]===0x0){return db[_0x931a('0x26')]['create']({'name':_0x19eec7[_0x931a('0x29')],'resourceId':_0x19eec7['id'],'type':_0x49ab5c[_0x931a('0x29')],'sectionId':_0x49ab5c['id']},{})[_0x931a('0x23')](function(){return _0x21b5a6;});}else{return _0x21b5a6;}})[_0x931a('0x4b')](function(_0x23a7d5){logger[_0x931a('0x54')](_0x931a('0x55'),_0x23a7d5);throw _0x23a7d5;});}return _0x21b5a6;})[_0x931a('0x23')](respondWithResult(_0x54bde0,0xc9))[_0x931a('0x4b')](handleError(_0x54bde0,null));};exports[_0x931a('0x22')]=function(_0x30a419,_0x122f4f){if(_0x30a419['body']['id']){delete _0x30a419['body']['id'];}return db[_0x931a('0x2c')][_0x931a('0x4a')]({'where':{'id':_0x30a419[_0x931a('0x47')]['id']}})[_0x931a('0x23')](handleEntityNotFound(_0x122f4f,null))['then'](saveUpdates(_0x30a419[_0x931a('0x4d')],null))[_0x931a('0x23')](respondWithResult(_0x122f4f,null))[_0x931a('0x4b')](handleError(_0x122f4f,null));};exports[_0x931a('0x27')]=function(_0x58a394,_0x37d432){return db['Schedule'][_0x931a('0x4a')]({'where':{'id':_0x58a394[_0x931a('0x47')]['id']}})['then'](handleEntityNotFound(_0x37d432,null))[_0x931a('0x23')](removeEntity(_0x37d432,null))['catch'](handleError(_0x37d432,null));};exports[_0x931a('0x56')]=function(_0x8622d5,_0x4c6460,_0x328c3d){var _0x224f36=require(_0x931a('0x57'));return db[_0x931a('0x2c')]['find']({'where':{'id':_0x8622d5[_0x931a('0x47')]['id']},'raw':!![]})[_0x931a('0x23')](handleEntityNotFound(_0x4c6460,null))[_0x931a('0x23')](function(){_0x224f36[_0x931a('0x56')](_0x8622d5['params']['id']);})[_0x931a('0x23')](respondWithStatusCode(_0x4c6460,null))[_0x931a('0x4b')](handleError(_0x4c6460,null));}; \ No newline at end of file +var _0x8f64=['rows','catch','params','keys','include','find','create','body','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','userProfileId','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','run','../../config/schedule','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','fs-extra','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','reject','update','then','destroy','Scheduler','error','name','send','index','map','Schedule','rawAttributes','type','key','model','query','filters','intersection','fields','attributes','length','nolimit','sort','where','pick','filter','merge','VIRTUAL','includeAll','findAll'];(function(_0x4a4f57,_0x38cee2){var _0xb1a4ec=function(_0x3fc3cb){while(--_0x3fc3cb){_0x4a4f57['push'](_0x4a4f57['shift']());}};_0xb1a4ec(++_0x38cee2);}(_0x8f64,0x15a));var _0x48f6=function(_0x5450a2,_0x5cb917){_0x5450a2=_0x5450a2-0x0;var _0x1191cf=_0x8f64[_0x5450a2];return _0x1191cf;};'use strict';var emlformat=require(_0x48f6('0x0'));var rimraf=require(_0x48f6('0x1'));var zipdir=require(_0x48f6('0x2'));var jsonpatch=require(_0x48f6('0x3'));var rp=require(_0x48f6('0x4'));var moment=require(_0x48f6('0x5'));var BPromise=require(_0x48f6('0x6'));var Mustache=require('mustache');var util=require(_0x48f6('0x7'));var path=require(_0x48f6('0x8'));var sox=require('sox');var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x48f6('0x9'));var _=require(_0x48f6('0xa'));var squel=require(_0x48f6('0xb'));var crypto=require(_0x48f6('0xc'));var jsforce=require(_0x48f6('0xd'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x48f6('0xe'));var Papa=require(_0x48f6('0xf'));var Redis=require(_0x48f6('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x48f6('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x48f6('0x12'));var logger=require(_0x48f6('0x13'))(_0x48f6('0x14'));var utils=require('../../config/utils');var config=require(_0x48f6('0x15'));var licenseUtil=require(_0x48f6('0x16'));var db=require(_0x48f6('0x17'))['db'];function respondWithStatusCode(_0xddf138,_0x5ddc12){_0x5ddc12=_0x5ddc12||0xcc;return function(_0x3fb45c){if(_0x3fb45c){return _0xddf138[_0x48f6('0x18')](_0x5ddc12);}return _0xddf138[_0x48f6('0x19')](_0x5ddc12)[_0x48f6('0x1a')]();};}function respondWithResult(_0x51c62e,_0x213a2e){_0x213a2e=_0x213a2e||0xc8;return function(_0x1ec54e){if(_0x1ec54e){return _0x51c62e[_0x48f6('0x19')](_0x213a2e)[_0x48f6('0x1b')](_0x1ec54e);}};}function respondWithFilteredResult(_0x42d714,_0x54c215){return function(_0x3f7f0a){if(_0x3f7f0a){var _0x49b81f=typeof _0x54c215[_0x48f6('0x1c')]===_0x48f6('0x1d')&&typeof _0x54c215[_0x48f6('0x1e')]===_0x48f6('0x1d');var _0x18e982=_0x3f7f0a[_0x48f6('0x1f')];var _0xf6bb7e=_0x49b81f?0x0:_0x54c215['offset'];var _0x3d0e87=_0x49b81f?_0x3f7f0a['count']:_0x54c215[_0x48f6('0x1c')]+_0x54c215[_0x48f6('0x1e')];var _0x5ae233;if(_0x3d0e87>=_0x18e982){_0x3d0e87=_0x18e982;_0x5ae233=0xc8;}else{_0x5ae233=0xce;}_0x42d714[_0x48f6('0x19')](_0x5ae233);return _0x42d714[_0x48f6('0x20')](_0x48f6('0x21'),_0xf6bb7e+'-'+_0x3d0e87+'/'+_0x18e982)[_0x48f6('0x1b')](_0x3f7f0a);}return null;};}function patchUpdates(_0x4c355b){return function(_0x7019e9){try{jsonpatch['apply'](_0x7019e9,_0x4c355b,!![]);}catch(_0x56d7fd){return BPromise[_0x48f6('0x22')](_0x56d7fd);}return _0x7019e9['save']();};}function saveUpdates(_0x412169,_0x574aa0){return function(_0x1f231e){if(_0x1f231e){return _0x1f231e[_0x48f6('0x23')](_0x412169)[_0x48f6('0x24')](function(_0x4ba89c){return _0x4ba89c;});}return null;};}function removeEntity(_0x37dca0,_0x26f073){return function(_0xfb09d9){if(_0xfb09d9){return _0xfb09d9[_0x48f6('0x25')]()['then'](function(){var _0x30794e=_0xfb09d9['get']({'plain':!![]});var _0x50d642=_0x48f6('0x26');return db['UserProfileResource'][_0x48f6('0x25')]({'where':{'type':_0x50d642,'resourceId':_0x30794e['id']}})['then'](function(){return _0xfb09d9;});})[_0x48f6('0x24')](function(){_0x37dca0['status'](0xcc)[_0x48f6('0x1a')]();});}};}function handleEntityNotFound(_0x6c8069,_0x4304a9){return function(_0x50f212){if(!_0x50f212){_0x6c8069[_0x48f6('0x18')](0x194);}return _0x50f212;};}function handleError(_0xa0144d,_0x4cbfd5){_0x4cbfd5=_0x4cbfd5||0x1f4;return function(_0x523450){logger[_0x48f6('0x27')](_0x523450['stack']);if(_0x523450[_0x48f6('0x28')]){delete _0x523450[_0x48f6('0x28')];}_0xa0144d[_0x48f6('0x19')](_0x4cbfd5)[_0x48f6('0x29')](_0x523450);};}exports[_0x48f6('0x2a')]=function(_0xb84041,_0x458cd5){var _0x5a8e8e={},_0x2579f2={},_0x4f1cb0={'count':0x0,'rows':[]};var _0x52c688=_[_0x48f6('0x2b')](db[_0x48f6('0x2c')][_0x48f6('0x2d')],function(_0x23ccd6){return{'name':_0x23ccd6['fieldName'],'type':_0x23ccd6[_0x48f6('0x2e')][_0x48f6('0x2f')]};});_0x2579f2[_0x48f6('0x30')]=_['map'](_0x52c688,_0x48f6('0x28'));_0x2579f2[_0x48f6('0x31')]=_['keys'](_0xb84041[_0x48f6('0x31')]);_0x2579f2[_0x48f6('0x32')]=_[_0x48f6('0x33')](_0x2579f2[_0x48f6('0x30')],_0x2579f2['query']);_0x5a8e8e['attributes']=_['intersection'](_0x2579f2['model'],qs['fields'](_0xb84041[_0x48f6('0x31')][_0x48f6('0x34')]));_0x5a8e8e[_0x48f6('0x35')]=_0x5a8e8e[_0x48f6('0x35')][_0x48f6('0x36')]?_0x5a8e8e[_0x48f6('0x35')]:_0x2579f2[_0x48f6('0x30')];if(!_0xb84041[_0x48f6('0x31')]['hasOwnProperty'](_0x48f6('0x37'))){_0x5a8e8e[_0x48f6('0x1e')]=qs[_0x48f6('0x1e')](_0xb84041[_0x48f6('0x31')][_0x48f6('0x1e')]);_0x5a8e8e[_0x48f6('0x1c')]=qs['offset'](_0xb84041[_0x48f6('0x31')][_0x48f6('0x1c')]);}_0x5a8e8e['order']=qs[_0x48f6('0x38')](_0xb84041[_0x48f6('0x31')][_0x48f6('0x38')]);_0x5a8e8e[_0x48f6('0x39')]=qs[_0x48f6('0x32')](_[_0x48f6('0x3a')](_0xb84041['query'],_0x2579f2['filters']),_0x52c688);if(_0xb84041['query'][_0x48f6('0x3b')]){_0x5a8e8e[_0x48f6('0x39')]=_[_0x48f6('0x3c')](_0x5a8e8e[_0x48f6('0x39')],{'$or':_[_0x48f6('0x2b')](_0x52c688,function(_0x50e4bb){if(_0x50e4bb[_0x48f6('0x2e')]!==_0x48f6('0x3d')){var _0x3c1d26={};_0x3c1d26[_0x50e4bb['name']]={'$like':'%'+_0xb84041[_0x48f6('0x31')][_0x48f6('0x3b')]+'%'};return _0x3c1d26;}})});}_0x5a8e8e=_['merge']({},_0x5a8e8e,_0xb84041['options']);var _0x500a0d={'where':_0x5a8e8e['where']};return db[_0x48f6('0x2c')][_0x48f6('0x1f')](_0x500a0d)['then'](function(_0x2a2f5c){_0x4f1cb0[_0x48f6('0x1f')]=_0x2a2f5c;if(_0xb84041['query'][_0x48f6('0x3e')]){_0x5a8e8e['include']=[{'all':!![]}];}return db['Schedule'][_0x48f6('0x3f')](_0x5a8e8e);})['then'](function(_0x8e75d5){_0x4f1cb0[_0x48f6('0x40')]=_0x8e75d5;return _0x4f1cb0;})[_0x48f6('0x24')](respondWithFilteredResult(_0x458cd5,_0x5a8e8e))[_0x48f6('0x41')](handleError(_0x458cd5,null));};exports['show']=function(_0x55484a,_0x56dc52){var _0x3ca874={'raw':![],'where':{'id':_0x55484a[_0x48f6('0x42')]['id']}},_0x12f422={};_0x12f422['model']=_['keys'](db[_0x48f6('0x2c')][_0x48f6('0x2d')]);_0x12f422[_0x48f6('0x31')]=_[_0x48f6('0x43')](_0x55484a[_0x48f6('0x31')]);_0x12f422[_0x48f6('0x32')]=_[_0x48f6('0x33')](_0x12f422[_0x48f6('0x30')],_0x12f422[_0x48f6('0x31')]);_0x3ca874[_0x48f6('0x35')]=_[_0x48f6('0x33')](_0x12f422['model'],qs[_0x48f6('0x34')](_0x55484a[_0x48f6('0x31')][_0x48f6('0x34')]));_0x3ca874[_0x48f6('0x35')]=_0x3ca874[_0x48f6('0x35')]['length']?_0x3ca874[_0x48f6('0x35')]:_0x12f422[_0x48f6('0x30')];if(_0x55484a['query'][_0x48f6('0x3e')]){_0x3ca874[_0x48f6('0x44')]=[{'all':!![]}];}_0x3ca874=_['merge']({},_0x3ca874,_0x55484a['options']);return db[_0x48f6('0x2c')][_0x48f6('0x45')](_0x3ca874)[_0x48f6('0x24')](handleEntityNotFound(_0x56dc52,null))['then'](respondWithResult(_0x56dc52,null))[_0x48f6('0x41')](handleError(_0x56dc52,null));};exports[_0x48f6('0x46')]=function(_0xbc72a0,_0x20095e){return db[_0x48f6('0x2c')][_0x48f6('0x46')](_0xbc72a0[_0x48f6('0x47')],{})[_0x48f6('0x24')](function(_0x1df375){var _0x14933e=_0xbc72a0[_0x48f6('0x48')][_0x48f6('0x49')]({'plain':!![]});if(!_0x14933e)throw new Error(_0x48f6('0x4a'));if(_0x14933e['role']===_0x48f6('0x48')){var _0x4e410c=_0x1df375[_0x48f6('0x49')]({'plain':!![]});var _0x1f1fef=_0x48f6('0x26');return db[_0x48f6('0x4b')][_0x48f6('0x45')]({'where':{'name':_0x1f1fef,'userProfileId':_0x14933e[_0x48f6('0x4c')]},'raw':!![]})[_0x48f6('0x24')](function(_0x7fe4cd){if(_0x7fe4cd&&_0x7fe4cd[_0x48f6('0x4d')]===0x0){return db[_0x48f6('0x4e')]['create']({'name':_0x4e410c[_0x48f6('0x28')],'resourceId':_0x4e410c['id'],'type':_0x7fe4cd[_0x48f6('0x28')],'sectionId':_0x7fe4cd['id']},{})[_0x48f6('0x24')](function(){return _0x1df375;});}else{return _0x1df375;}})[_0x48f6('0x41')](function(_0x550b90){logger[_0x48f6('0x27')](_0x48f6('0x4f'),_0x550b90);throw _0x550b90;});}return _0x1df375;})['then'](respondWithResult(_0x20095e,0xc9))[_0x48f6('0x41')](handleError(_0x20095e,null));};exports[_0x48f6('0x23')]=function(_0x2c260d,_0x577d36){if(_0x2c260d['body']['id']){delete _0x2c260d['body']['id'];}return db['Schedule'][_0x48f6('0x45')]({'where':{'id':_0x2c260d[_0x48f6('0x42')]['id']}})[_0x48f6('0x24')](handleEntityNotFound(_0x577d36,null))['then'](saveUpdates(_0x2c260d[_0x48f6('0x47')],null))[_0x48f6('0x24')](respondWithResult(_0x577d36,null))['catch'](handleError(_0x577d36,null));};exports[_0x48f6('0x25')]=function(_0x416414,_0x226126){return db[_0x48f6('0x2c')]['find']({'where':{'id':_0x416414[_0x48f6('0x42')]['id']}})[_0x48f6('0x24')](handleEntityNotFound(_0x226126,null))['then'](removeEntity(_0x226126,null))[_0x48f6('0x41')](handleError(_0x226126,null));};exports[_0x48f6('0x50')]=function(_0x5c8351,_0x29af1e,_0x3fb3fc){var _0x4a5a78=require(_0x48f6('0x51'));return db[_0x48f6('0x2c')][_0x48f6('0x45')]({'where':{'id':_0x5c8351['params']['id']},'raw':!![]})[_0x48f6('0x24')](handleEntityNotFound(_0x29af1e,null))[_0x48f6('0x24')](function(){_0x4a5a78[_0x48f6('0x50')](_0x5c8351[_0x48f6('0x42')]['id']);})[_0x48f6('0x24')](respondWithStatusCode(_0x29af1e,null))['catch'](handleError(_0x29af1e,null));}; \ No newline at end of file diff --git a/server/api/schedule/schedule.model.js b/server/api/schedule/schedule.model.js index 1ef4126..28a924f 100644 --- a/server/api/schedule/schedule.model.js +++ b/server/api/schedule/schedule.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x10c9=['define','Schedule','tools_schedules','../../config/logger','api','moment','request-promise','rimraf','./schedule.attributes'];(function(_0x2c8dbc,_0xafeeb){var _0x487501=function(_0x5135f0){while(--_0x5135f0){_0x2c8dbc['push'](_0x2c8dbc['shift']());}};_0x487501(++_0xafeeb);}(_0x10c9,0x1aa));var _0x910c=function(_0x2027f5,_0x5a68c1){_0x2027f5=_0x2027f5-0x0;var _0x346d21=_0x10c9[_0x2027f5];return _0x346d21;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x910c('0x0'))(_0x910c('0x1'));var moment=require(_0x910c('0x2'));var BPromise=require('bluebird');var rp=require(_0x910c('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0x910c('0x4'));var config=require('../../config/environment');var attributes=require(_0x910c('0x5'));module['exports']=function(_0x561b9b,_0x5ef7b5){return _0x561b9b[_0x910c('0x6')](_0x910c('0x7'),attributes,{'tableName':_0x910c('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x5bd1=['api','request-promise','path','rimraf','../../config/environment','./schedule.attributes','exports','Schedule','tools_schedules','lodash','util','../../config/logger'];(function(_0x27e42a,_0x59b0da){var _0x1eeb06=function(_0x3d2b4c){while(--_0x3d2b4c){_0x27e42a['push'](_0x27e42a['shift']());}};_0x1eeb06(++_0x59b0da);}(_0x5bd1,0x165));var _0x15bd=function(_0x32f05c,_0x273aef){_0x32f05c=_0x32f05c-0x0;var _0x4307ed=_0x5bd1[_0x32f05c];return _0x4307ed;};'use strict';var _=require(_0x15bd('0x0'));var util=require(_0x15bd('0x1'));var logger=require(_0x15bd('0x2'))(_0x15bd('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x15bd('0x4'));var fs=require('fs');var path=require(_0x15bd('0x5'));var rimraf=require(_0x15bd('0x6'));var config=require(_0x15bd('0x7'));var attributes=require(_0x15bd('0x8'));module[_0x15bd('0x9')]=function(_0x38879f,_0x2ab414){return _0x38879f['define'](_0x15bd('0xa'),attributes,{'tableName':_0x15bd('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/schedule/schedule.rpc.js b/server/api/schedule/schedule.rpc.js index a5efb41..a9c2844 100644 --- a/server/api/schedule/schedule.rpc.js +++ b/server/api/schedule/schedule.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x071c=['result','catch','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info','Schedule,\x20%s,\x20%s','Schedule,\x20%s,\x20%s,\x20%s','stringify','error','code','message','request\x20sent'];(function(_0x36b7cf,_0x5ef3e5){var _0x5c3629=function(_0x2ba0c5){while(--_0x2ba0c5){_0x36b7cf['push'](_0x36b7cf['shift']());}};_0x5c3629(++_0x5ef3e5);}(_0x071c,0x75));var _0xc071=function(_0x36e367,_0x1f4509){_0x36e367=_0x36e367-0x0;var _0x16dc7c=_0x071c[_0x36e367];return _0x16dc7c;};'use strict';var _=require(_0xc071('0x0'));var util=require(_0xc071('0x1'));var moment=require(_0xc071('0x2'));var BPromise=require(_0xc071('0x3'));var rs=require(_0xc071('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xc071('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xc071('0x6'))(_0xc071('0x7'));var config=require(_0xc071('0x8'));var jayson=require(_0xc071('0x9'));var client=jayson[_0xc071('0xa')][_0xc071('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x91958d,_0x1c12b2,_0x53e3e9){return new BPromise(function(_0x4ca2ec,_0x2a17ef){return client[_0xc071('0xc')](_0x91958d,_0x53e3e9)['then'](function(_0x43ac41){logger[_0xc071('0xd')](_0xc071('0xe'),_0x1c12b2,'request\x20sent');logger['debug'](_0xc071('0xf'),_0x1c12b2,'request\x20sent',JSON[_0xc071('0x10')](_0x43ac41));if(_0x43ac41[_0xc071('0x11')]){if(_0x43ac41[_0xc071('0x11')][_0xc071('0x12')]===0x1f4){logger[_0xc071('0x11')]('Schedule,\x20%s,\x20%s',_0x1c12b2,_0x43ac41[_0xc071('0x11')][_0xc071('0x13')]);return _0x2a17ef(_0x43ac41[_0xc071('0x11')]['message']);}logger[_0xc071('0x11')](_0xc071('0xe'),_0x1c12b2,_0x43ac41['error'][_0xc071('0x13')]);return _0x4ca2ec(_0x43ac41[_0xc071('0x11')][_0xc071('0x13')]);}else{logger[_0xc071('0xd')]('Schedule,\x20%s,\x20%s',_0x1c12b2,_0xc071('0x14'));_0x4ca2ec(_0x43ac41[_0xc071('0x15')][_0xc071('0x13')]);}})[_0xc071('0x16')](function(_0x47540f){logger[_0xc071('0x11')]('Schedule,\x20%s,\x20%s',_0x1c12b2,_0x47540f);_0x2a17ef(_0x47540f);});});} \ No newline at end of file +var _0x57ca=['request\x20sent','debug','Schedule,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','Schedule,\x20%s,\x20%s'];(function(_0x2c24df,_0x2e46a3){var _0x309b15=function(_0x5d525b){while(--_0x5d525b){_0x2c24df['push'](_0x2c24df['shift']());}};_0x309b15(++_0x2e46a3);}(_0x57ca,0x171));var _0xa57c=function(_0x2cf1aa,_0x155b50){_0x2cf1aa=_0x2cf1aa-0x0;var _0x3aac2d=_0x57ca[_0x2cf1aa];return _0x3aac2d;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xa57c('0x0'));var BPromise=require(_0xa57c('0x1'));var rs=require(_0xa57c('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xa57c('0x3'))['db'];var utils=require(_0xa57c('0x4'));var logger=require(_0xa57c('0x5'))(_0xa57c('0x6'));var config=require(_0xa57c('0x7'));var jayson=require(_0xa57c('0x8'));var client=jayson[_0xa57c('0x9')][_0xa57c('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x222507,_0x15ea7f,_0x35f229){return new BPromise(function(_0x429b47,_0x3c1e4a){return client[_0xa57c('0xb')](_0x222507,_0x35f229)[_0xa57c('0xc')](function(_0x499ed8){logger[_0xa57c('0xd')](_0xa57c('0xe'),_0x15ea7f,_0xa57c('0xf'));logger[_0xa57c('0x10')](_0xa57c('0x11'),_0x15ea7f,_0xa57c('0xf'),JSON[_0xa57c('0x12')](_0x499ed8));if(_0x499ed8[_0xa57c('0x13')]){if(_0x499ed8[_0xa57c('0x13')][_0xa57c('0x14')]===0x1f4){logger[_0xa57c('0x13')]('Schedule,\x20%s,\x20%s',_0x15ea7f,_0x499ed8[_0xa57c('0x13')]['message']);return _0x3c1e4a(_0x499ed8[_0xa57c('0x13')][_0xa57c('0x15')]);}logger[_0xa57c('0x13')](_0xa57c('0xe'),_0x15ea7f,_0x499ed8[_0xa57c('0x13')][_0xa57c('0x15')]);return _0x429b47(_0x499ed8[_0xa57c('0x13')]['message']);}else{logger[_0xa57c('0xd')](_0xa57c('0xe'),_0x15ea7f,'request\x20sent');_0x429b47(_0x499ed8[_0xa57c('0x16')][_0xa57c('0x15')]);}})[_0xa57c('0x17')](function(_0x5df977){logger[_0xa57c('0x13')](_0xa57c('0xe'),_0x15ea7f,_0x5df977);_0x3c1e4a(_0x5df977);});});} \ No newline at end of file diff --git a/server/api/screenRecording/index.js b/server/api/screenRecording/index.js index d7dce03..8ee1d75 100644 --- a/server/api/screenRecording/index.js +++ b/server/api/screenRecording/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6ccc=['util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/describe','/:id','show','/:id/download','download','post','create','put','update','delete','destroy','exports','multer'];(function(_0x44c14b,_0x29b7e4){var _0xcf6b96=function(_0x5eef5b){while(--_0x5eef5b){_0x44c14b['push'](_0x44c14b['shift']());}};_0xcf6b96(++_0x29b7e4);}(_0x6ccc,0x197));var _0xc6cc=function(_0x597e38,_0x551ac2){_0x597e38=_0x597e38-0x0;var _0x5305d2=_0x6ccc[_0x597e38];return _0x5305d2;};'use strict';var multer=require(_0xc6cc('0x0'));var util=require(_0xc6cc('0x1'));var path=require('path');var timeout=require(_0xc6cc('0x2'));var express=require(_0xc6cc('0x3'));var router=express[_0xc6cc('0x4')]();var fs_extra=require(_0xc6cc('0x5'));var auth=require(_0xc6cc('0x6'));var interaction=require(_0xc6cc('0x7'));var config=require(_0xc6cc('0x8'));var controller=require('./screenRecording.controller');router[_0xc6cc('0x9')]('/',auth[_0xc6cc('0xa')](),controller[_0xc6cc('0xb')]);router[_0xc6cc('0x9')](_0xc6cc('0xc'),auth[_0xc6cc('0xa')](),controller['describe']);router[_0xc6cc('0x9')](_0xc6cc('0xd'),auth[_0xc6cc('0xa')](),controller[_0xc6cc('0xe')]);router[_0xc6cc('0x9')](_0xc6cc('0xf'),auth[_0xc6cc('0xa')](),controller[_0xc6cc('0x10')]);router[_0xc6cc('0x11')]('/',auth[_0xc6cc('0xa')](),controller[_0xc6cc('0x12')]);router[_0xc6cc('0x13')](_0xc6cc('0xd'),auth['isAuthenticated'](),controller[_0xc6cc('0x14')]);router[_0xc6cc('0x15')](_0xc6cc('0xd'),auth[_0xc6cc('0xa')](),controller[_0xc6cc('0x16')]);module[_0xc6cc('0x17')]=router; \ No newline at end of file +var _0x3f86=['fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','/describe','isAuthenticated','/:id','show','/:id/download','download','post','create','put','delete','util','path','connect-timeout','express'];(function(_0x5d4607,_0x6b5e7b){var _0x5e4a86=function(_0x46891a){while(--_0x46891a){_0x5d4607['push'](_0x5d4607['shift']());}};_0x5e4a86(++_0x6b5e7b);}(_0x3f86,0xa7));var _0x63f8=function(_0x3d9b8a,_0x2d16cc){_0x3d9b8a=_0x3d9b8a-0x0;var _0x2b4b92=_0x3f86[_0x3d9b8a];return _0x2b4b92;};'use strict';var multer=require('multer');var util=require(_0x63f8('0x0'));var path=require(_0x63f8('0x1'));var timeout=require(_0x63f8('0x2'));var express=require(_0x63f8('0x3'));var router=express['Router']();var fs_extra=require(_0x63f8('0x4'));var auth=require(_0x63f8('0x5'));var interaction=require(_0x63f8('0x6'));var config=require(_0x63f8('0x7'));var controller=require('./screenRecording.controller');router[_0x63f8('0x8')]('/',auth['isAuthenticated'](),controller['index']);router[_0x63f8('0x8')](_0x63f8('0x9'),auth[_0x63f8('0xa')](),controller['describe']);router[_0x63f8('0x8')](_0x63f8('0xb'),auth['isAuthenticated'](),controller[_0x63f8('0xc')]);router[_0x63f8('0x8')](_0x63f8('0xd'),auth[_0x63f8('0xa')](),controller[_0x63f8('0xe')]);router[_0x63f8('0xf')]('/',auth[_0x63f8('0xa')](),controller[_0x63f8('0x10')]);router[_0x63f8('0x11')](_0x63f8('0xb'),auth['isAuthenticated'](),controller['update']);router[_0x63f8('0x12')](_0x63f8('0xb'),auth[_0x63f8('0xa')](),controller['destroy']);module['exports']=router; \ No newline at end of file diff --git a/server/api/screenRecording/screenRecording.attributes.js b/server/api/screenRecording/screenRecording.attributes.js index 62f1eb2..7049f4c 100644 --- a/server/api/screenRecording/screenRecording.attributes.js +++ b/server/api/screenRecording/screenRecording.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6372=['closedAt','duration','DATE','startedAt','format','MM-DD-YYYY\x20HH:mm','toString','updatedAt','sequelize','path','exports','VIRTUAL','value','extname','getDataValue','STRING','setDataValue','INTEGER'];(function(_0x2aad02,_0x556ae7){var _0x546e5b=function(_0x129356){while(--_0x129356){_0x2aad02['push'](_0x2aad02['shift']());}};_0x546e5b(++_0x556ae7);}(_0x6372,0x1b8));var _0x2637=function(_0x3a0f49,_0x580b00){_0x3a0f49=_0x3a0f49-0x0;var _0x5e179e=_0x6372[_0x3a0f49];return _0x5e179e;};'use strict';var Sequelize=require(_0x2637('0x0'));var moment=require('moment');var path=require(_0x2637('0x1'));var config=require('../../config/environment');module[_0x2637('0x2')]={'format':{'type':Sequelize[_0x2637('0x3')],'get':function(){return this['getDataValue'](_0x2637('0x4'))?path[_0x2637('0x5')](this[_0x2637('0x6')](_0x2637('0x4'))):undefined;}},'interactionid':{'type':Sequelize[_0x2637('0x7')]},'channel':{'type':Sequelize['STRING']},'value':{'type':Sequelize[_0x2637('0x7')],'set':function(_0x54bdd1){var _0x4f8521=_0x54bdd1['replace'](/\\/g,'/');this[_0x2637('0x8')]('value',_0x4f8521);}},'rating':{'type':Sequelize['INTEGER'],'validate':{'max':0x5,'min':0x0}},'duration':{'type':Sequelize[_0x2637('0x9')],'set':function(_0x2dbcb5){this[_0x2637('0x8')]('startedAt',moment()['subtract'](_0x2dbcb5,'ms'));this[_0x2637('0x8')](_0x2637('0xa'),moment());this[_0x2637('0x8')](_0x2637('0xb'),_0x2dbcb5);}},'startedAt':{'type':Sequelize[_0x2637('0xc')],'get':function(){return moment(this[_0x2637('0x6')](_0x2637('0xd')))[_0x2637('0xe')](_0x2637('0xf'))['toString']();}},'closedAt':{'type':Sequelize[_0x2637('0xc')],'get':function(){return moment(this[_0x2637('0x6')](_0x2637('0xa')))['format'](_0x2637('0xf'))[_0x2637('0x10')]();}},'createdAt':{'type':Sequelize[_0x2637('0xc')],'get':function(){return moment(this[_0x2637('0x6')]('createdAt'))[_0x2637('0xe')](_0x2637('0xf'))[_0x2637('0x10')]();}},'updatedAt':{'type':Sequelize[_0x2637('0xc')],'get':function(){return moment(this[_0x2637('0x6')](_0x2637('0x11')))['format']('MM-DD-YYYY\x20HH:mm')[_0x2637('0x10')]();}}}; \ No newline at end of file +var _0x3c8e=['INTEGER','startedAt','subtract','closedAt','duration','format','DATE','MM-DD-YYYY\x20HH:mm','toString','createdAt','updatedAt','sequelize','moment','exports','VIRTUAL','getDataValue','extname','value','STRING','replace','setDataValue'];(function(_0x49b592,_0x30d2ce){var _0x5124df=function(_0x28b87e){while(--_0x28b87e){_0x49b592['push'](_0x49b592['shift']());}};_0x5124df(++_0x30d2ce);}(_0x3c8e,0x89));var _0xe3c8=function(_0x408d6b,_0x3fd54f){_0x408d6b=_0x408d6b-0x0;var _0x3da35f=_0x3c8e[_0x408d6b];return _0x3da35f;};'use strict';var Sequelize=require(_0xe3c8('0x0'));var moment=require(_0xe3c8('0x1'));var path=require('path');var config=require('../../config/environment');module[_0xe3c8('0x2')]={'format':{'type':Sequelize[_0xe3c8('0x3')],'get':function(){return this[_0xe3c8('0x4')]('value')?path[_0xe3c8('0x5')](this[_0xe3c8('0x4')](_0xe3c8('0x6'))):undefined;}},'interactionid':{'type':Sequelize[_0xe3c8('0x7')]},'channel':{'type':Sequelize['STRING']},'value':{'type':Sequelize[_0xe3c8('0x7')],'set':function(_0x16acf1){var _0x2fe9e5=_0x16acf1[_0xe3c8('0x8')](/\\/g,'/');this[_0xe3c8('0x9')]('value',_0x2fe9e5);}},'rating':{'type':Sequelize[_0xe3c8('0xa')],'validate':{'max':0x5,'min':0x0}},'duration':{'type':Sequelize['INTEGER'],'set':function(_0x1b6e5e){this[_0xe3c8('0x9')](_0xe3c8('0xb'),moment()[_0xe3c8('0xc')](_0x1b6e5e,'ms'));this['setDataValue'](_0xe3c8('0xd'),moment());this[_0xe3c8('0x9')](_0xe3c8('0xe'),_0x1b6e5e);}},'startedAt':{'type':Sequelize['DATE'],'get':function(){return moment(this[_0xe3c8('0x4')]('startedAt'))[_0xe3c8('0xf')]('MM-DD-YYYY\x20HH:mm')['toString']();}},'closedAt':{'type':Sequelize[_0xe3c8('0x10')],'get':function(){return moment(this[_0xe3c8('0x4')](_0xe3c8('0xd')))['format'](_0xe3c8('0x11'))[_0xe3c8('0x12')]();}},'createdAt':{'type':Sequelize[_0xe3c8('0x10')],'get':function(){return moment(this[_0xe3c8('0x4')](_0xe3c8('0x13')))[_0xe3c8('0xf')]('MM-DD-YYYY\x20HH:mm')[_0xe3c8('0x12')]();}},'updatedAt':{'type':Sequelize[_0xe3c8('0x10')],'get':function(){return moment(this['getDataValue'](_0xe3c8('0x14')))[_0xe3c8('0xf')](_0xe3c8('0x11'))['toString']();}}}; \ No newline at end of file diff --git a/server/api/screenRecording/screenRecording.controller.js b/server/api/screenRecording/screenRecording.controller.js index 56b0dff..efadd55 100644 --- a/server/api/screenRecording/screenRecording.controller.js +++ b/server/api/screenRecording/screenRecording.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2d17=['apply','then','error','name','index','map','rawAttributes','type','key','model','differenceBy','format','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','ScreenRecording','count','includeAll','include','findAll','catch','show','find','create','body','update','duration','closedAt','value','params','describe','../../components/encryptor','uniqueid','join','root','%s.cypher','existsSync','decryptFile','secrets','recording','server/files/screen_recordings','Sequelize','ValidationError','filename','download','extname','unlink','Not\x20found','destroy','info','cancellazione\x20fisica\x20documento\x20%s','isNil','File:\x20\x22','\x22\x20trovato\x20eseguo\x20la\x20cancellazione','unlinkSync','.cypher','eml-format','rimraf','fast-json-patch','request-promise','bluebird','mustache','path','to-csv','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','undefined','offset','limit','set','Content-Range'];(function(_0x1dab4e,_0x10fd45){var _0x13ad18=function(_0x18c7e9){while(--_0x18c7e9){_0x1dab4e['push'](_0x1dab4e['shift']());}};_0x13ad18(++_0x10fd45);}(_0x2d17,0x17e));var _0x72d1=function(_0x435b1f,_0x4ae07b){_0x435b1f=_0x435b1f-0x0;var _0x487248=_0x2d17[_0x435b1f];return _0x487248;};'use strict';var emlformat=require(_0x72d1('0x0'));var rimraf=require(_0x72d1('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x72d1('0x2'));var rp=require(_0x72d1('0x3'));var moment=require('moment');var BPromise=require(_0x72d1('0x4'));var Mustache=require(_0x72d1('0x5'));var util=require('util');var path=require(_0x72d1('0x6'));var sox=require('sox');var csv=require(_0x72d1('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x72d1('0x8'));var _=require(_0x72d1('0x9'));var squel=require('squel');var crypto=require(_0x72d1('0xa'));var jsforce=require(_0x72d1('0xb'));var deskjs=require(_0x72d1('0xc'));var toCsv=require('to-csv');var querystring=require(_0x72d1('0xd'));var Papa=require(_0x72d1('0xe'));var Redis=require(_0x72d1('0xf'));var authService=require('../../components/auth/service');var qs=require(_0x72d1('0x10'));var as=require(_0x72d1('0x11'));var hardwareService=require(_0x72d1('0x12'));var logger=require(_0x72d1('0x13'))(_0x72d1('0x14'));var utils=require(_0x72d1('0x15'));var config=require(_0x72d1('0x16'));var licenseUtil=require(_0x72d1('0x17'));var db=require(_0x72d1('0x18'))['db'];function respondWithStatusCode(_0x2f5a78,_0x5ad4df){_0x5ad4df=_0x5ad4df||0xcc;return function(_0x3cd1ae){if(_0x3cd1ae){return _0x2f5a78[_0x72d1('0x19')](_0x5ad4df);}return _0x2f5a78[_0x72d1('0x1a')](_0x5ad4df)[_0x72d1('0x1b')]();};}function respondWithResult(_0x22ac6f,_0x685a27){_0x685a27=_0x685a27||0xc8;return function(_0x143718){if(_0x143718){return _0x22ac6f[_0x72d1('0x1a')](_0x685a27)[_0x72d1('0x1c')](_0x143718);}};}function respondWithFilteredResult(_0x3f190f,_0x21c85e){return function(_0x23a238){if(_0x23a238){var _0x8d458=typeof _0x21c85e['offset']===_0x72d1('0x1d')&&typeof _0x21c85e['limit']===_0x72d1('0x1d');var _0x2c9851=_0x23a238['count'];var _0x1061b7=_0x8d458?0x0:_0x21c85e[_0x72d1('0x1e')];var _0x1ca18d=_0x8d458?_0x23a238['count']:_0x21c85e['offset']+_0x21c85e[_0x72d1('0x1f')];var _0x10d464;if(_0x1ca18d>=_0x2c9851){_0x1ca18d=_0x2c9851;_0x10d464=0xc8;}else{_0x10d464=0xce;}_0x3f190f[_0x72d1('0x1a')](_0x10d464);return _0x3f190f[_0x72d1('0x20')](_0x72d1('0x21'),_0x1061b7+'-'+_0x1ca18d+'/'+_0x2c9851)[_0x72d1('0x1c')](_0x23a238);}return null;};}function patchUpdates(_0x1e2411){return function(_0x5c7982){try{jsonpatch[_0x72d1('0x22')](_0x5c7982,_0x1e2411,!![]);}catch(_0x56e8d3){return BPromise['reject'](_0x56e8d3);}return _0x5c7982['save']();};}function saveUpdates(_0x585243,_0x445985){return function(_0x374602){if(_0x374602){return _0x374602['update'](_0x585243)[_0x72d1('0x23')](function(_0x256dc1){return _0x256dc1;});}return null;};}function removeEntity(_0x492086,_0x1431ee){return function(_0x26fa35){if(_0x26fa35){return _0x26fa35['destroy']()['then'](function(){_0x492086[_0x72d1('0x1a')](0xcc)[_0x72d1('0x1b')]();});}};}function handleEntityNotFound(_0x2f661,_0x2f879f){return function(_0xdf6a69){if(!_0xdf6a69){_0x2f661[_0x72d1('0x19')](0x194);}return _0xdf6a69;};}function handleError(_0x163bec,_0x589f7c){_0x589f7c=_0x589f7c||0x1f4;return function(_0x57ec9e){logger[_0x72d1('0x24')](_0x57ec9e['stack']);if(_0x57ec9e[_0x72d1('0x25')]){delete _0x57ec9e[_0x72d1('0x25')];}_0x163bec[_0x72d1('0x1a')](_0x589f7c)['send'](_0x57ec9e);};}exports[_0x72d1('0x26')]=function(_0x4c4c41,_0x707cd0){var _0x20055f={},_0x32588f={},_0x2cc0c8={'count':0x0,'rows':[]};var _0x51242b=_[_0x72d1('0x27')](db['ScreenRecording'][_0x72d1('0x28')],function(_0x32dc5e){return{'name':_0x32dc5e['fieldName'],'type':_0x32dc5e[_0x72d1('0x29')][_0x72d1('0x2a')]};});_0x32588f[_0x72d1('0x2b')]=_[_0x72d1('0x2c')](_[_0x72d1('0x27')](_0x51242b,'name'),[_0x72d1('0x2d')]);_0x32588f[_0x72d1('0x2e')]=_[_0x72d1('0x2f')](_0x4c4c41['query']);_0x32588f[_0x72d1('0x30')]=_[_0x72d1('0x31')](_0x32588f['model'],_0x32588f[_0x72d1('0x2e')]);_0x20055f[_0x72d1('0x32')]=_[_0x72d1('0x31')](_0x32588f['model'],qs[_0x72d1('0x33')](_0x4c4c41['query'][_0x72d1('0x33')]));_0x20055f[_0x72d1('0x32')]=_0x20055f[_0x72d1('0x32')][_0x72d1('0x34')]?_0x20055f[_0x72d1('0x32')]:_0x32588f[_0x72d1('0x2b')];if(!_0x4c4c41[_0x72d1('0x2e')][_0x72d1('0x35')](_0x72d1('0x36'))){_0x20055f[_0x72d1('0x1f')]=qs[_0x72d1('0x1f')](_0x4c4c41['query'][_0x72d1('0x1f')]);_0x20055f[_0x72d1('0x1e')]=qs[_0x72d1('0x1e')](_0x4c4c41[_0x72d1('0x2e')]['offset']);}_0x20055f[_0x72d1('0x37')]=qs[_0x72d1('0x38')](_0x4c4c41[_0x72d1('0x2e')]['sort']);_0x20055f[_0x72d1('0x39')]=qs[_0x72d1('0x30')](_[_0x72d1('0x3a')](_0x4c4c41['query'],_0x32588f[_0x72d1('0x30')]),_0x51242b);if(_0x4c4c41[_0x72d1('0x2e')][_0x72d1('0x3b')]){_0x20055f['where']=_[_0x72d1('0x3c')](_0x20055f[_0x72d1('0x39')],{'$or':_[_0x72d1('0x27')](_0x51242b,function(_0x14cb3d){if(_0x14cb3d[_0x72d1('0x29')]!==_0x72d1('0x3d')){var _0xd7ec0f={};_0xd7ec0f[_0x14cb3d['name']]={'$like':'%'+_0x4c4c41[_0x72d1('0x2e')][_0x72d1('0x3b')]+'%'};return _0xd7ec0f;}})});}_0x20055f=_[_0x72d1('0x3c')]({},_0x20055f,_0x4c4c41[_0x72d1('0x3e')]);var _0x20fb2f={'where':_0x20055f[_0x72d1('0x39')]};return db[_0x72d1('0x3f')][_0x72d1('0x40')](_0x20fb2f)['then'](function(_0x44d5b2){_0x2cc0c8[_0x72d1('0x40')]=_0x44d5b2;if(_0x4c4c41[_0x72d1('0x2e')][_0x72d1('0x41')]){_0x20055f[_0x72d1('0x42')]=[{'all':!![]}];}return db[_0x72d1('0x3f')][_0x72d1('0x43')](_0x20055f);})[_0x72d1('0x23')](function(_0x5620f0){_0x2cc0c8['rows']=_0x5620f0;return _0x2cc0c8;})[_0x72d1('0x23')](respondWithFilteredResult(_0x707cd0,_0x20055f))[_0x72d1('0x44')](handleError(_0x707cd0,null));};exports[_0x72d1('0x45')]=function(_0x21d361,_0x5a6bc4){var _0x3fe286={'raw':![],'where':{'id':_0x21d361['params']['id']}},_0x3e80e0={};_0x3e80e0[_0x72d1('0x2b')]=_['keys'](db[_0x72d1('0x3f')][_0x72d1('0x28')]);_0x3e80e0['query']=_[_0x72d1('0x2f')](_0x21d361['query']);_0x3e80e0['filters']=_['intersection'](_0x3e80e0[_0x72d1('0x2b')],_0x3e80e0['query']);_0x3fe286[_0x72d1('0x32')]=_[_0x72d1('0x31')](_0x3e80e0[_0x72d1('0x2b')],qs['fields'](_0x21d361['query'][_0x72d1('0x33')]));_0x3fe286['attributes']=_0x3fe286['attributes'][_0x72d1('0x34')]?_0x3fe286[_0x72d1('0x32')]:_0x3e80e0[_0x72d1('0x2b')];if(_0x21d361['query']['includeAll']){_0x3fe286['include']=[{'all':!![]}];}_0x3fe286=_['merge']({},_0x3fe286,_0x21d361[_0x72d1('0x3e')]);return db[_0x72d1('0x3f')][_0x72d1('0x46')](_0x3fe286)[_0x72d1('0x23')](handleEntityNotFound(_0x5a6bc4,null))[_0x72d1('0x23')](respondWithResult(_0x5a6bc4,null))[_0x72d1('0x44')](handleError(_0x5a6bc4,null));};exports[_0x72d1('0x47')]=function(_0x5924c,_0x1e2c11){return db['ScreenRecording'][_0x72d1('0x47')](_0x5924c[_0x72d1('0x48')],{})[_0x72d1('0x23')](respondWithResult(_0x1e2c11,0xc9))['catch'](handleError(_0x1e2c11,null));};exports[_0x72d1('0x49')]=function(_0x29c88f,_0x12ad75){if(_0x29c88f['body']['id']){delete _0x29c88f[_0x72d1('0x48')]['id'];}delete _0x29c88f[_0x72d1('0x48')][_0x72d1('0x4a')];delete _0x29c88f[_0x72d1('0x48')]['createdAt'];delete _0x29c88f['body'][_0x72d1('0x4b')];delete _0x29c88f[_0x72d1('0x48')][_0x72d1('0x4c')];return db['ScreenRecording'][_0x72d1('0x46')]({'where':{'id':_0x29c88f[_0x72d1('0x4d')]['id']}})[_0x72d1('0x23')](handleEntityNotFound(_0x12ad75,null))[_0x72d1('0x23')](saveUpdates(_0x29c88f[_0x72d1('0x48')],null))[_0x72d1('0x23')](respondWithResult(_0x12ad75,null))[_0x72d1('0x44')](handleError(_0x12ad75,null));};exports[_0x72d1('0x4e')]=function(_0x12870c,_0x18f986){return db[_0x72d1('0x3f')]['describe']()[_0x72d1('0x23')](respondWithResult(_0x18f986,null))['catch'](handleError(_0x18f986,null));};exports['download']=function(_0x356196,_0x5f2bba,_0x3c880e){var _0x7e401b=require(_0x72d1('0x4f'));var _0x162248=![];var _0x473a7b={};if(_0x356196[_0x72d1('0x2e')][_0x72d1('0x29')]&&_0x356196[_0x72d1('0x2e')][_0x72d1('0x29')]===_0x72d1('0x50')){_0x473a7b[_0x72d1('0x50')]=_0x356196['params']['id'];}else{_0x473a7b['id']=_0x356196[_0x72d1('0x4d')]['id'];}return db[_0x72d1('0x3f')][_0x72d1('0x46')]({'where':_0x473a7b,'attributes':['id','value'],'raw':!![]})['then'](handleEntityNotFound(_0x5f2bba,null))[_0x72d1('0x23')](function(_0x140f0b){if(_0x140f0b){var _0x16e9e7=path[_0x72d1('0x51')](config[_0x72d1('0x52')],'server/files/screen_recordings',_0x140f0b[_0x72d1('0x4c')]);var _0x48f4a7=util[_0x72d1('0x2d')](_0x72d1('0x53'),_0x16e9e7);if(fs[_0x72d1('0x54')](_0x48f4a7)){_0x162248=!![];return _0x7e401b[_0x72d1('0x55')](_0x48f4a7,_0x16e9e7,config[_0x72d1('0x56')][_0x72d1('0x57')])[_0x72d1('0x23')](function(){return _0x140f0b;});}return _0x140f0b;}})[_0x72d1('0x23')](function(_0x384f0a){if(_0x384f0a){var _0x3a2dfe=path[_0x72d1('0x51')](config[_0x72d1('0x52')],_0x72d1('0x58'),_0x384f0a[_0x72d1('0x4c')]);if(!fs[_0x72d1('0x54')](_0x3a2dfe)){throw new db[(_0x72d1('0x59'))][(_0x72d1('0x5a'))]('ScreenRecording\x20not\x20found');}if(_0x384f0a[_0x72d1('0x5b')]){return _0x5f2bba[_0x72d1('0x5c')](_0x3a2dfe,_0x384f0a[_0x72d1('0x5b')]+path[_0x72d1('0x5d')](_0x3a2dfe),function(){if(_0x162248){fs[_0x72d1('0x5e')](_0x3a2dfe);}});}else{return _0x5f2bba[_0x72d1('0x5c')](_0x3a2dfe,function(_0x4e2d85){if(_0x162248){fs[_0x72d1('0x5e')](_0x3a2dfe);}});}}})[_0x72d1('0x44')](function(_0xb05cd9){if(_0xb05cd9['message']==='ScreenRecording\x20not\x20found'){_0x5f2bba[_0x72d1('0x1a')](0x194)['send'](_0x72d1('0x5f'));}else{return handleError(_0x5f2bba,null);}});};exports[_0x72d1('0x60')]=function(_0x201810,_0x41525c){return db[_0x72d1('0x3f')][_0x72d1('0x46')]({'where':{'id':_0x201810[_0x72d1('0x4d')]['id']}})[_0x72d1('0x23')](function(_0x28e42b){if(_['isNil'](_0x28e42b)){throw new ReferenceError('Entity\x20not\x20found');}return _0x28e42b;})[_0x72d1('0x23')](function(_0x1d44f0){var _0x1bd80b=path['join'](config[_0x72d1('0x52')],_0x72d1('0x58'),_0x1d44f0['value']);logger[_0x72d1('0x61')](_0x72d1('0x62'),_0x1bd80b);if(!_[_0x72d1('0x63')](_0x1d44f0[_0x72d1('0x4c')])&&fs[_0x72d1('0x54')](_0x1bd80b)){logger[_0x72d1('0x61')](_0x72d1('0x64')+_0x1bd80b+_0x72d1('0x65'));fs[_0x72d1('0x66')](_0x1bd80b);}_0x1bd80b=_0x1bd80b+_0x72d1('0x67');if(!_[_0x72d1('0x63')](_0x1d44f0[_0x72d1('0x4c')])&&fs['existsSync'](_0x1bd80b)){logger['info'](_0x72d1('0x64')+_0x1bd80b+_0x72d1('0x65'));fs[_0x72d1('0x66')](_0x1bd80b);}return _0x1d44f0;})[_0x72d1('0x23')](function(_0x2ae8c9){if(!_0x2ae8c9)throw new InternalError();return _0x2ae8c9[_0x72d1('0x60')]();})[_0x72d1('0x23')](function(){_0x41525c[_0x72d1('0x1a')](0xcc)['end']();})[_0x72d1('0x44')](handleError(_0x41525c,null));}; \ No newline at end of file +var _0xb4c7=['rawAttributes','fieldName','type','format','query','filters','model','attributes','intersection','fields','length','nolimit','order','sort','where','pick','merge','VIRTUAL','filter','options','includeAll','findAll','rows','catch','show','keys','include','find','create','body','duration','createdAt','closedAt','value','describe','../../components/encryptor','uniqueid','params','join','server/files/screen_recordings','%s.cypher','existsSync','decryptFile','secrets','recording','root','ValidationError','download','filename','extname','unlink','message','Not\x20found','isNil','info','File:\x20\x22','\x22\x20trovato\x20eseguo\x20la\x20cancellazione','unlinkSync','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','ejs','fs-extra','lodash','crypto','jsforce','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','count','limit','set','Content-Range','apply','reject','save','update','then','destroy','error','stack','name','send','index','map','ScreenRecording'];(function(_0x9e05d1,_0x3cef4a){var _0x4f7e97=function(_0x402f40){while(--_0x402f40){_0x9e05d1['push'](_0x9e05d1['shift']());}};_0x4f7e97(++_0x3cef4a);}(_0xb4c7,0x1ea));var _0x7b4c=function(_0x3281d8,_0x549f6f){_0x3281d8=_0x3281d8-0x0;var _0x280bd1=_0xb4c7[_0x3281d8];return _0x280bd1;};'use strict';var emlformat=require(_0x7b4c('0x0'));var rimraf=require(_0x7b4c('0x1'));var zipdir=require(_0x7b4c('0x2'));var jsonpatch=require(_0x7b4c('0x3'));var rp=require(_0x7b4c('0x4'));var moment=require('moment');var BPromise=require(_0x7b4c('0x5'));var Mustache=require(_0x7b4c('0x6'));var util=require(_0x7b4c('0x7'));var path=require(_0x7b4c('0x8'));var sox=require(_0x7b4c('0x9'));var csv=require('to-csv');var ejs=require(_0x7b4c('0xa'));var fs=require('fs');var fs_extra=require(_0x7b4c('0xb'));var _=require(_0x7b4c('0xc'));var squel=require('squel');var crypto=require(_0x7b4c('0xd'));var jsforce=require(_0x7b4c('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x7b4c('0xf'));var querystring=require(_0x7b4c('0x10'));var Papa=require(_0x7b4c('0x11'));var Redis=require(_0x7b4c('0x12'));var authService=require(_0x7b4c('0x13'));var qs=require(_0x7b4c('0x14'));var as=require(_0x7b4c('0x15'));var hardwareService=require(_0x7b4c('0x16'));var logger=require(_0x7b4c('0x17'))(_0x7b4c('0x18'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x7b4c('0x19'));var db=require(_0x7b4c('0x1a'))['db'];function respondWithStatusCode(_0x38656b,_0x1722ad){_0x1722ad=_0x1722ad||0xcc;return function(_0x3e1558){if(_0x3e1558){return _0x38656b[_0x7b4c('0x1b')](_0x1722ad);}return _0x38656b[_0x7b4c('0x1c')](_0x1722ad)[_0x7b4c('0x1d')]();};}function respondWithResult(_0x25b90b,_0x387488){_0x387488=_0x387488||0xc8;return function(_0x593a19){if(_0x593a19){return _0x25b90b[_0x7b4c('0x1c')](_0x387488)[_0x7b4c('0x1e')](_0x593a19);}};}function respondWithFilteredResult(_0xdc71cd,_0x2a0e2f){return function(_0xa0a812){if(_0xa0a812){var _0x2471b3=typeof _0x2a0e2f[_0x7b4c('0x1f')]===_0x7b4c('0x20')&&typeof _0x2a0e2f['limit']===_0x7b4c('0x20');var _0xe71d88=_0xa0a812[_0x7b4c('0x21')];var _0x36c02a=_0x2471b3?0x0:_0x2a0e2f['offset'];var _0x3ce10c=_0x2471b3?_0xa0a812[_0x7b4c('0x21')]:_0x2a0e2f[_0x7b4c('0x1f')]+_0x2a0e2f[_0x7b4c('0x22')];var _0x2d4c72;if(_0x3ce10c>=_0xe71d88){_0x3ce10c=_0xe71d88;_0x2d4c72=0xc8;}else{_0x2d4c72=0xce;}_0xdc71cd[_0x7b4c('0x1c')](_0x2d4c72);return _0xdc71cd[_0x7b4c('0x23')](_0x7b4c('0x24'),_0x36c02a+'-'+_0x3ce10c+'/'+_0xe71d88)[_0x7b4c('0x1e')](_0xa0a812);}return null;};}function patchUpdates(_0x55e3df){return function(_0x1f06ec){try{jsonpatch[_0x7b4c('0x25')](_0x1f06ec,_0x55e3df,!![]);}catch(_0x11996d){return BPromise[_0x7b4c('0x26')](_0x11996d);}return _0x1f06ec[_0x7b4c('0x27')]();};}function saveUpdates(_0x168ac9,_0x176704){return function(_0x3d4826){if(_0x3d4826){return _0x3d4826[_0x7b4c('0x28')](_0x168ac9)[_0x7b4c('0x29')](function(_0x5eec1e){return _0x5eec1e;});}return null;};}function removeEntity(_0x45438c,_0x4350c9){return function(_0x276271){if(_0x276271){return _0x276271[_0x7b4c('0x2a')]()[_0x7b4c('0x29')](function(){_0x45438c[_0x7b4c('0x1c')](0xcc)[_0x7b4c('0x1d')]();});}};}function handleEntityNotFound(_0x459eb4,_0x1f311e){return function(_0x1a69db){if(!_0x1a69db){_0x459eb4[_0x7b4c('0x1b')](0x194);}return _0x1a69db;};}function handleError(_0x257da2,_0x316e5f){_0x316e5f=_0x316e5f||0x1f4;return function(_0x501f75){logger[_0x7b4c('0x2b')](_0x501f75[_0x7b4c('0x2c')]);if(_0x501f75[_0x7b4c('0x2d')]){delete _0x501f75[_0x7b4c('0x2d')];}_0x257da2[_0x7b4c('0x1c')](_0x316e5f)[_0x7b4c('0x2e')](_0x501f75);};}exports[_0x7b4c('0x2f')]=function(_0x2552f9,_0x3e4a46){var _0x9a799b={},_0x3585cd={},_0x130ace={'count':0x0,'rows':[]};var _0x3544bc=_[_0x7b4c('0x30')](db[_0x7b4c('0x31')][_0x7b4c('0x32')],function(_0x1d0724){return{'name':_0x1d0724[_0x7b4c('0x33')],'type':_0x1d0724[_0x7b4c('0x34')]['key']};});_0x3585cd['model']=_['differenceBy'](_[_0x7b4c('0x30')](_0x3544bc,_0x7b4c('0x2d')),[_0x7b4c('0x35')]);_0x3585cd[_0x7b4c('0x36')]=_['keys'](_0x2552f9[_0x7b4c('0x36')]);_0x3585cd[_0x7b4c('0x37')]=_['intersection'](_0x3585cd[_0x7b4c('0x38')],_0x3585cd['query']);_0x9a799b[_0x7b4c('0x39')]=_[_0x7b4c('0x3a')](_0x3585cd[_0x7b4c('0x38')],qs['fields'](_0x2552f9[_0x7b4c('0x36')][_0x7b4c('0x3b')]));_0x9a799b['attributes']=_0x9a799b[_0x7b4c('0x39')][_0x7b4c('0x3c')]?_0x9a799b[_0x7b4c('0x39')]:_0x3585cd[_0x7b4c('0x38')];if(!_0x2552f9['query']['hasOwnProperty'](_0x7b4c('0x3d'))){_0x9a799b[_0x7b4c('0x22')]=qs['limit'](_0x2552f9[_0x7b4c('0x36')]['limit']);_0x9a799b['offset']=qs[_0x7b4c('0x1f')](_0x2552f9[_0x7b4c('0x36')][_0x7b4c('0x1f')]);}_0x9a799b[_0x7b4c('0x3e')]=qs['sort'](_0x2552f9[_0x7b4c('0x36')][_0x7b4c('0x3f')]);_0x9a799b[_0x7b4c('0x40')]=qs[_0x7b4c('0x37')](_[_0x7b4c('0x41')](_0x2552f9[_0x7b4c('0x36')],_0x3585cd[_0x7b4c('0x37')]),_0x3544bc);if(_0x2552f9['query']['filter']){_0x9a799b[_0x7b4c('0x40')]=_[_0x7b4c('0x42')](_0x9a799b[_0x7b4c('0x40')],{'$or':_[_0x7b4c('0x30')](_0x3544bc,function(_0xb8486d){if(_0xb8486d['type']!==_0x7b4c('0x43')){var _0x902367={};_0x902367[_0xb8486d[_0x7b4c('0x2d')]]={'$like':'%'+_0x2552f9[_0x7b4c('0x36')][_0x7b4c('0x44')]+'%'};return _0x902367;}})});}_0x9a799b=_[_0x7b4c('0x42')]({},_0x9a799b,_0x2552f9[_0x7b4c('0x45')]);var _0x1080fc={'where':_0x9a799b[_0x7b4c('0x40')]};return db['ScreenRecording'][_0x7b4c('0x21')](_0x1080fc)['then'](function(_0x2a3a74){_0x130ace['count']=_0x2a3a74;if(_0x2552f9[_0x7b4c('0x36')][_0x7b4c('0x46')]){_0x9a799b['include']=[{'all':!![]}];}return db['ScreenRecording'][_0x7b4c('0x47')](_0x9a799b);})[_0x7b4c('0x29')](function(_0x1def44){_0x130ace[_0x7b4c('0x48')]=_0x1def44;return _0x130ace;})['then'](respondWithFilteredResult(_0x3e4a46,_0x9a799b))[_0x7b4c('0x49')](handleError(_0x3e4a46,null));};exports[_0x7b4c('0x4a')]=function(_0x100774,_0x5d4ed8){var _0x45ad59={'raw':![],'where':{'id':_0x100774['params']['id']}},_0x4b4757={};_0x4b4757[_0x7b4c('0x38')]=_['keys'](db[_0x7b4c('0x31')][_0x7b4c('0x32')]);_0x4b4757[_0x7b4c('0x36')]=_[_0x7b4c('0x4b')](_0x100774[_0x7b4c('0x36')]);_0x4b4757[_0x7b4c('0x37')]=_[_0x7b4c('0x3a')](_0x4b4757[_0x7b4c('0x38')],_0x4b4757[_0x7b4c('0x36')]);_0x45ad59['attributes']=_[_0x7b4c('0x3a')](_0x4b4757['model'],qs['fields'](_0x100774[_0x7b4c('0x36')][_0x7b4c('0x3b')]));_0x45ad59['attributes']=_0x45ad59['attributes'][_0x7b4c('0x3c')]?_0x45ad59[_0x7b4c('0x39')]:_0x4b4757[_0x7b4c('0x38')];if(_0x100774[_0x7b4c('0x36')][_0x7b4c('0x46')]){_0x45ad59[_0x7b4c('0x4c')]=[{'all':!![]}];}_0x45ad59=_[_0x7b4c('0x42')]({},_0x45ad59,_0x100774[_0x7b4c('0x45')]);return db['ScreenRecording'][_0x7b4c('0x4d')](_0x45ad59)[_0x7b4c('0x29')](handleEntityNotFound(_0x5d4ed8,null))[_0x7b4c('0x29')](respondWithResult(_0x5d4ed8,null))[_0x7b4c('0x49')](handleError(_0x5d4ed8,null));};exports[_0x7b4c('0x4e')]=function(_0x379f15,_0x11a6f9){return db[_0x7b4c('0x31')][_0x7b4c('0x4e')](_0x379f15['body'],{})['then'](respondWithResult(_0x11a6f9,0xc9))[_0x7b4c('0x49')](handleError(_0x11a6f9,null));};exports[_0x7b4c('0x28')]=function(_0x97eadf,_0x5d4192){if(_0x97eadf[_0x7b4c('0x4f')]['id']){delete _0x97eadf[_0x7b4c('0x4f')]['id'];}delete _0x97eadf['body'][_0x7b4c('0x50')];delete _0x97eadf['body'][_0x7b4c('0x51')];delete _0x97eadf['body'][_0x7b4c('0x52')];delete _0x97eadf['body'][_0x7b4c('0x53')];return db[_0x7b4c('0x31')]['find']({'where':{'id':_0x97eadf['params']['id']}})[_0x7b4c('0x29')](handleEntityNotFound(_0x5d4192,null))[_0x7b4c('0x29')](saveUpdates(_0x97eadf[_0x7b4c('0x4f')],null))['then'](respondWithResult(_0x5d4192,null))['catch'](handleError(_0x5d4192,null));};exports[_0x7b4c('0x54')]=function(_0x1c118a,_0x4cbf1b){return db['ScreenRecording'][_0x7b4c('0x54')]()[_0x7b4c('0x29')](respondWithResult(_0x4cbf1b,null))[_0x7b4c('0x49')](handleError(_0x4cbf1b,null));};exports['download']=function(_0x1d017d,_0x2f009a,_0x4aaf57){var _0x484e80=require(_0x7b4c('0x55'));var _0x4d8491=![];var _0x59db20={};if(_0x1d017d[_0x7b4c('0x36')]['type']&&_0x1d017d['query'][_0x7b4c('0x34')]===_0x7b4c('0x56')){_0x59db20[_0x7b4c('0x56')]=_0x1d017d[_0x7b4c('0x57')]['id'];}else{_0x59db20['id']=_0x1d017d['params']['id'];}return db['ScreenRecording'][_0x7b4c('0x4d')]({'where':_0x59db20,'attributes':['id',_0x7b4c('0x53')],'raw':!![]})[_0x7b4c('0x29')](handleEntityNotFound(_0x2f009a,null))['then'](function(_0x255262){if(_0x255262){var _0x3d81fb=path[_0x7b4c('0x58')](config['root'],_0x7b4c('0x59'),_0x255262[_0x7b4c('0x53')]);var _0x529803=util[_0x7b4c('0x35')](_0x7b4c('0x5a'),_0x3d81fb);if(fs[_0x7b4c('0x5b')](_0x529803)){_0x4d8491=!![];return _0x484e80[_0x7b4c('0x5c')](_0x529803,_0x3d81fb,config[_0x7b4c('0x5d')][_0x7b4c('0x5e')])[_0x7b4c('0x29')](function(){return _0x255262;});}return _0x255262;}})['then'](function(_0x4443d0){if(_0x4443d0){var _0x2dc79a=path['join'](config[_0x7b4c('0x5f')],_0x7b4c('0x59'),_0x4443d0[_0x7b4c('0x53')]);if(!fs[_0x7b4c('0x5b')](_0x2dc79a)){throw new db['Sequelize'][(_0x7b4c('0x60'))]('ScreenRecording\x20not\x20found');}if(_0x4443d0['filename']){return _0x2f009a[_0x7b4c('0x61')](_0x2dc79a,_0x4443d0[_0x7b4c('0x62')]+path[_0x7b4c('0x63')](_0x2dc79a),function(){if(_0x4d8491){fs[_0x7b4c('0x64')](_0x2dc79a);}});}else{return _0x2f009a[_0x7b4c('0x61')](_0x2dc79a,function(_0x5b24f6){if(_0x4d8491){fs['unlink'](_0x2dc79a);}});}}})[_0x7b4c('0x49')](function(_0x3c84af){if(_0x3c84af[_0x7b4c('0x65')]==='ScreenRecording\x20not\x20found'){_0x2f009a[_0x7b4c('0x1c')](0x194)[_0x7b4c('0x2e')](_0x7b4c('0x66'));}else{return handleError(_0x2f009a,null);}});};exports['destroy']=function(_0x222b47,_0x3b2144){return db[_0x7b4c('0x31')]['find']({'where':{'id':_0x222b47[_0x7b4c('0x57')]['id']}})[_0x7b4c('0x29')](function(_0x4ac03e){if(_[_0x7b4c('0x67')](_0x4ac03e)){throw new ReferenceError('Entity\x20not\x20found');}return _0x4ac03e;})[_0x7b4c('0x29')](function(_0x11ae6e){var _0x3a3713=path['join'](config['root'],_0x7b4c('0x59'),_0x11ae6e[_0x7b4c('0x53')]);logger[_0x7b4c('0x68')]('cancellazione\x20fisica\x20documento\x20%s',_0x3a3713);if(!_[_0x7b4c('0x67')](_0x11ae6e['value'])&&fs[_0x7b4c('0x5b')](_0x3a3713)){logger[_0x7b4c('0x68')](_0x7b4c('0x69')+_0x3a3713+_0x7b4c('0x6a'));fs[_0x7b4c('0x6b')](_0x3a3713);}_0x3a3713=_0x3a3713+'.cypher';if(!_[_0x7b4c('0x67')](_0x11ae6e[_0x7b4c('0x53')])&&fs['existsSync'](_0x3a3713)){logger[_0x7b4c('0x68')](_0x7b4c('0x69')+_0x3a3713+_0x7b4c('0x6a'));fs[_0x7b4c('0x6b')](_0x3a3713);}return _0x11ae6e;})[_0x7b4c('0x29')](function(_0x2befd7){if(!_0x2befd7)throw new InternalError();return _0x2befd7[_0x7b4c('0x2a')]();})[_0x7b4c('0x29')](function(){_0x3b2144['status'](0xcc)[_0x7b4c('0x1d')]();})[_0x7b4c('0x49')](handleError(_0x3b2144,null));}; \ No newline at end of file diff --git a/server/api/screenRecording/screenRecording.model.js b/server/api/screenRecording/screenRecording.model.js index bf5586b..6828a89 100644 --- a/server/api/screenRecording/screenRecording.model.js +++ b/server/api/screenRecording/screenRecording.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x36f5=['./screenRecording.attributes','exports','define','ScreenRecording','screen_recordings','interactionid','lodash','util','../../config/logger','bluebird','path','../../config/environment'];(function(_0x5f02ba,_0x5c4427){var _0x45b6d9=function(_0x5b35b8){while(--_0x5b35b8){_0x5f02ba['push'](_0x5f02ba['shift']());}};_0x45b6d9(++_0x5c4427);}(_0x36f5,0x186));var _0x536f=function(_0x50a10c,_0x5ce931){_0x50a10c=_0x50a10c-0x0;var _0x4a1697=_0x36f5[_0x50a10c];return _0x4a1697;};'use strict';var _=require(_0x536f('0x0'));var util=require(_0x536f('0x1'));var logger=require(_0x536f('0x2'))('api');var moment=require('moment');var BPromise=require(_0x536f('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x536f('0x4'));var rimraf=require('rimraf');var config=require(_0x536f('0x5'));var attributes=require(_0x536f('0x6'));module[_0x536f('0x7')]=function(_0xe358d6,_0x44ab39){return _0xe358d6[_0x536f('0x8')](_0x536f('0x9'),attributes,{'tableName':_0x536f('0xa'),'paranoid':![],'indexes':[{'name':_0x536f('0xb'),'fields':[_0x536f('0xb')]}],'timestamps':!![]});}; \ No newline at end of file +var _0xcf75=['define','ScreenRecording','interactionid','lodash','util','api','path','rimraf','../../config/environment','./screenRecording.attributes','exports'];(function(_0x50c9b3,_0xa96abe){var _0x28ccfb=function(_0x24e3c0){while(--_0x24e3c0){_0x50c9b3['push'](_0x50c9b3['shift']());}};_0x28ccfb(++_0xa96abe);}(_0xcf75,0xc9));var _0x5cf7=function(_0x449b1a,_0xeb5814){_0x449b1a=_0x449b1a-0x0;var _0x448e17=_0xcf75[_0x449b1a];return _0x448e17;};'use strict';var _=require(_0x5cf7('0x0'));var util=require(_0x5cf7('0x1'));var logger=require('../../config/logger')(_0x5cf7('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x5cf7('0x3'));var rimraf=require(_0x5cf7('0x4'));var config=require(_0x5cf7('0x5'));var attributes=require(_0x5cf7('0x6'));module[_0x5cf7('0x7')]=function(_0x1abb60,_0x1dc047){return _0x1abb60[_0x5cf7('0x8')](_0x5cf7('0x9'),attributes,{'tableName':'screen_recordings','paranoid':![],'indexes':[{'name':_0x5cf7('0xa'),'fields':['interactionid']}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/screenRecording/screenRecording.rpc.js b/server/api/screenRecording/screenRecording.rpc.js index 030bd3f..dda06e1 100644 --- a/server/api/screenRecording/screenRecording.rpc.js +++ b/server/api/screenRecording/screenRecording.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xeca6=['request\x20sent','error','code','message','result','catch','lodash','util','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','client','http','request','then','info','ScreenRecording,\x20%s,\x20%s','debug','ScreenRecording,\x20%s,\x20%s,\x20%s'];(function(_0x3449bc,_0x3f6ef5){var _0x361678=function(_0x115809){while(--_0x115809){_0x3449bc['push'](_0x3449bc['shift']());}};_0x361678(++_0x3f6ef5);}(_0xeca6,0x150));var _0x6eca=function(_0x577e45,_0x436a15){_0x577e45=_0x577e45-0x0;var _0x37a4fa=_0xeca6[_0x577e45];return _0x37a4fa;};'use strict';var _=require(_0x6eca('0x0'));var util=require(_0x6eca('0x1'));var moment=require('moment');var BPromise=require(_0x6eca('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x6eca('0x3'));var db=require(_0x6eca('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x6eca('0x5'))(_0x6eca('0x6'));var config=require(_0x6eca('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x6eca('0x8')][_0x6eca('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x5061d5,_0x1f82f1,_0x4bb832){return new BPromise(function(_0x16815c,_0x6653fa){return client[_0x6eca('0xa')](_0x5061d5,_0x4bb832)[_0x6eca('0xb')](function(_0x235d23){logger[_0x6eca('0xc')](_0x6eca('0xd'),_0x1f82f1,'request\x20sent');logger[_0x6eca('0xe')](_0x6eca('0xf'),_0x1f82f1,_0x6eca('0x10'),JSON['stringify'](_0x235d23));if(_0x235d23[_0x6eca('0x11')]){if(_0x235d23[_0x6eca('0x11')][_0x6eca('0x12')]===0x1f4){logger[_0x6eca('0x11')]('ScreenRecording,\x20%s,\x20%s',_0x1f82f1,_0x235d23['error'][_0x6eca('0x13')]);return _0x6653fa(_0x235d23[_0x6eca('0x11')][_0x6eca('0x13')]);}logger['error'](_0x6eca('0xd'),_0x1f82f1,_0x235d23[_0x6eca('0x11')]['message']);return _0x16815c(_0x235d23[_0x6eca('0x11')][_0x6eca('0x13')]);}else{logger[_0x6eca('0xc')]('ScreenRecording,\x20%s,\x20%s',_0x1f82f1,_0x6eca('0x10'));_0x16815c(_0x235d23[_0x6eca('0x14')][_0x6eca('0x13')]);}})[_0x6eca('0x15')](function(_0x1717bd){logger[_0x6eca('0x11')](_0x6eca('0xd'),_0x1f82f1,_0x1717bd);_0x6653fa(_0x1717bd);});});} \ No newline at end of file +var _0x6ca4=['stringify','error','code','ScreenRecording,\x20%s,\x20%s','message','lodash','util','moment','ioredis','rpc','client','then','info','debug','ScreenRecording,\x20%s,\x20%s,\x20%s','request\x20sent'];(function(_0x37d2b0,_0x3d792b){var _0xfdbed5=function(_0x2477c2){while(--_0x2477c2){_0x37d2b0['push'](_0x37d2b0['shift']());}};_0xfdbed5(++_0x3d792b);}(_0x6ca4,0xe5));var _0x46ca=function(_0x50f6ec,_0x32efb0){_0x50f6ec=_0x50f6ec-0x0;var _0x340cd6=_0x6ca4[_0x50f6ec];return _0x340cd6;};'use strict';var _=require(_0x46ca('0x0'));var util=require(_0x46ca('0x1'));var moment=require(_0x46ca('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x46ca('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x46ca('0x4'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x46ca('0x5')]['http']({'port':0x232a});function respondWithRpcPromise(_0x173728,_0x148c88,_0x4f3c87){return new BPromise(function(_0x4231d2,_0x5e550d){return client['request'](_0x173728,_0x4f3c87)[_0x46ca('0x6')](function(_0x10cf1d){logger[_0x46ca('0x7')]('ScreenRecording,\x20%s,\x20%s',_0x148c88,'request\x20sent');logger[_0x46ca('0x8')](_0x46ca('0x9'),_0x148c88,_0x46ca('0xa'),JSON[_0x46ca('0xb')](_0x10cf1d));if(_0x10cf1d[_0x46ca('0xc')]){if(_0x10cf1d[_0x46ca('0xc')][_0x46ca('0xd')]===0x1f4){logger[_0x46ca('0xc')](_0x46ca('0xe'),_0x148c88,_0x10cf1d['error'][_0x46ca('0xf')]);return _0x5e550d(_0x10cf1d[_0x46ca('0xc')][_0x46ca('0xf')]);}logger[_0x46ca('0xc')](_0x46ca('0xe'),_0x148c88,_0x10cf1d['error'][_0x46ca('0xf')]);return _0x4231d2(_0x10cf1d[_0x46ca('0xc')]['message']);}else{logger[_0x46ca('0x7')](_0x46ca('0xe'),_0x148c88,_0x46ca('0xa'));_0x4231d2(_0x10cf1d['result'][_0x46ca('0xf')]);}})['catch'](function(_0x50dabb){logger[_0x46ca('0xc')](_0x46ca('0xe'),_0x148c88,_0x50dabb);_0x5e550d(_0x50dabb);});});} \ No newline at end of file diff --git a/server/api/setting/index.js b/server/api/setting/index.js index 8ca9d7c..b8d3f6b 100644 --- a/server/api/setting/index.js +++ b/server/api/setting/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1ec6=['getFavicon','diskStorage','server/files/images/logos/','format','logo','extname','post','file','addLogo','join','root','%s%s','logologin','originalname','/:id/logo_login','single','addLogoLogin','preferred','addPreferred','favicon','addFavicon','/:id','isAuthenticated','update','multer','util','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./setting.controller','get','/now','getDate','/:id/logo','/:id/gdpr','gdpr','/:id/preferred','getPreferred','/:id/favicon'];(function(_0x2feb53,_0x264ef7){var _0x5700ee=function(_0x700c98){while(--_0x700c98){_0x2feb53['push'](_0x2feb53['shift']());}};_0x5700ee(++_0x264ef7);}(_0x1ec6,0x1bc));var _0x61ec=function(_0x643e3d,_0x53262a){_0x643e3d=_0x643e3d-0x0;var _0x2fb4fe=_0x1ec6[_0x643e3d];return _0x2fb4fe;};'use strict';var multer=require(_0x61ec('0x0'));var util=require(_0x61ec('0x1'));var path=require('path');var timeout=require(_0x61ec('0x2'));var express=require(_0x61ec('0x3'));var router=express[_0x61ec('0x4')]();var fs_extra=require(_0x61ec('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x61ec('0x6'));var config=require(_0x61ec('0x7'));var controller=require(_0x61ec('0x8'));router[_0x61ec('0x9')]('/',auth['isAuthenticated'](),controller['index']);router[_0x61ec('0x9')](_0x61ec('0xa'),controller[_0x61ec('0xb')]);router[_0x61ec('0x9')]('/:id',controller['show']);router[_0x61ec('0x9')](_0x61ec('0xc'),controller['getLogo']);router[_0x61ec('0x9')]('/:id/logo_login',controller['getLogoLogin']);router[_0x61ec('0x9')](_0x61ec('0xd'),controller[_0x61ec('0xe')]);router[_0x61ec('0x9')](_0x61ec('0xf'),controller[_0x61ec('0x10')]);router['get'](_0x61ec('0x11'),controller[_0x61ec('0x12')]);var upload=multer({'storage':multer[_0x61ec('0x13')]({'destination':function(_0x28dce1,_0x27b192,_0x256b10){_0x256b10(null,path['join'](config['root'],_0x61ec('0x14')));},'filename':function(_0x14b2b2,_0x57c7e,_0x10e517){_0x10e517(null,util[_0x61ec('0x15')]('%s%s',_0x61ec('0x16'),path[_0x61ec('0x17')](_0x57c7e['originalname'])));}})});router[_0x61ec('0x18')](_0x61ec('0xc'),upload['single'](_0x61ec('0x19')),controller[_0x61ec('0x1a')]);var upload=multer({'storage':multer[_0x61ec('0x13')]({'destination':function(_0x3fd228,_0x3a0fe1,_0x545464){_0x545464(null,path[_0x61ec('0x1b')](config[_0x61ec('0x1c')],_0x61ec('0x14')));},'filename':function(_0x5506cf,_0x1bdac6,_0x235cb2){_0x235cb2(null,util['format'](_0x61ec('0x1d'),_0x61ec('0x1e'),path[_0x61ec('0x17')](_0x1bdac6[_0x61ec('0x1f')])));}})});router['post'](_0x61ec('0x20'),upload[_0x61ec('0x21')](_0x61ec('0x19')),controller[_0x61ec('0x22')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x162445,_0x2f8947,_0x2d8f72){_0x2d8f72(null,path[_0x61ec('0x1b')](config[_0x61ec('0x1c')],_0x61ec('0x14')));},'filename':function(_0x96a212,_0x50b153,_0x299e3e){_0x299e3e(null,util[_0x61ec('0x15')]('%s%s',_0x61ec('0x23'),path[_0x61ec('0x17')](_0x50b153[_0x61ec('0x1f')])));}})});router['post'](_0x61ec('0xf'),upload[_0x61ec('0x21')](_0x61ec('0x19')),controller[_0x61ec('0x24')]);var upload=multer({'storage':multer[_0x61ec('0x13')]({'destination':function(_0x1427de,_0x246943,_0x2ce027){_0x2ce027(null,path[_0x61ec('0x1b')](config[_0x61ec('0x1c')],_0x61ec('0x14')));},'filename':function(_0x5dc299,_0x5bc6f8,_0x13bca1){_0x13bca1(null,util['format'](_0x61ec('0x1d'),_0x61ec('0x25'),path['extname'](_0x5bc6f8[_0x61ec('0x1f')])));}})});router[_0x61ec('0x18')](_0x61ec('0x11'),upload[_0x61ec('0x21')](_0x61ec('0x19')),controller[_0x61ec('0x26')]);router['put'](_0x61ec('0x27'),auth[_0x61ec('0x28')](),controller[_0x61ec('0x29')]);module['exports']=router; \ No newline at end of file +var _0x1b56=['getLogo','getLogoLogin','gdpr','getPreferred','getFavicon','diskStorage','join','root','server/files/images/logos/','format','%s%s','extname','single','file','addLogo','originalname','/:id/logo_login','addLogoLogin','preferred','post','favicon','/:id/favicon','addFavicon','/:id','update','exports','multer','connect-timeout','express','Router','fs-extra','../../components/auth/service','./setting.controller','get','isAuthenticated','index','/now','getDate','show','/:id/logo'];(function(_0x4b2863,_0x494899){var _0x567d67=function(_0x751f03){while(--_0x751f03){_0x4b2863['push'](_0x4b2863['shift']());}};_0x567d67(++_0x494899);}(_0x1b56,0x1aa));var _0x61b5=function(_0xd09668,_0x1435b2){_0xd09668=_0xd09668-0x0;var _0x68726=_0x1b56[_0xd09668];return _0x68726;};'use strict';var multer=require(_0x61b5('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x61b5('0x1'));var express=require(_0x61b5('0x2'));var router=express[_0x61b5('0x3')]();var fs_extra=require(_0x61b5('0x4'));var auth=require(_0x61b5('0x5'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x61b5('0x6'));router[_0x61b5('0x7')]('/',auth[_0x61b5('0x8')](),controller[_0x61b5('0x9')]);router[_0x61b5('0x7')](_0x61b5('0xa'),controller[_0x61b5('0xb')]);router[_0x61b5('0x7')]('/:id',controller[_0x61b5('0xc')]);router[_0x61b5('0x7')](_0x61b5('0xd'),controller[_0x61b5('0xe')]);router[_0x61b5('0x7')]('/:id/logo_login',controller[_0x61b5('0xf')]);router['get']('/:id/gdpr',controller[_0x61b5('0x10')]);router[_0x61b5('0x7')]('/:id/preferred',controller[_0x61b5('0x11')]);router['get']('/:id/favicon',controller[_0x61b5('0x12')]);var upload=multer({'storage':multer[_0x61b5('0x13')]({'destination':function(_0x412ac1,_0x3929af,_0x24c675){_0x24c675(null,path[_0x61b5('0x14')](config[_0x61b5('0x15')],_0x61b5('0x16')));},'filename':function(_0x52082c,_0x2e1b21,_0x296dc8){_0x296dc8(null,util[_0x61b5('0x17')](_0x61b5('0x18'),'logo',path[_0x61b5('0x19')](_0x2e1b21['originalname'])));}})});router['post'](_0x61b5('0xd'),upload[_0x61b5('0x1a')](_0x61b5('0x1b')),controller[_0x61b5('0x1c')]);var upload=multer({'storage':multer[_0x61b5('0x13')]({'destination':function(_0x462c02,_0x15a798,_0x4584e5){_0x4584e5(null,path[_0x61b5('0x14')](config[_0x61b5('0x15')],_0x61b5('0x16')));},'filename':function(_0x496470,_0x262860,_0x52edda){_0x52edda(null,util[_0x61b5('0x17')]('%s%s','logologin',path[_0x61b5('0x19')](_0x262860[_0x61b5('0x1d')])));}})});router['post'](_0x61b5('0x1e'),upload[_0x61b5('0x1a')](_0x61b5('0x1b')),controller[_0x61b5('0x1f')]);var upload=multer({'storage':multer[_0x61b5('0x13')]({'destination':function(_0x1af9ff,_0x594b29,_0x1d9772){_0x1d9772(null,path[_0x61b5('0x14')](config['root'],'server/files/images/logos/'));},'filename':function(_0x416ac7,_0x40308c,_0x3c94b9){_0x3c94b9(null,util['format'](_0x61b5('0x18'),_0x61b5('0x20'),path[_0x61b5('0x19')](_0x40308c[_0x61b5('0x1d')])));}})});router[_0x61b5('0x21')]('/:id/preferred',upload['single'](_0x61b5('0x1b')),controller['addPreferred']);var upload=multer({'storage':multer[_0x61b5('0x13')]({'destination':function(_0x42f3f2,_0x37aa9e,_0xbca57b){_0xbca57b(null,path[_0x61b5('0x14')](config[_0x61b5('0x15')],_0x61b5('0x16')));},'filename':function(_0x4f1568,_0x4a28c6,_0x50b58b){_0x50b58b(null,util[_0x61b5('0x17')](_0x61b5('0x18'),_0x61b5('0x22'),path[_0x61b5('0x19')](_0x4a28c6['originalname'])));}})});router['post'](_0x61b5('0x23'),upload[_0x61b5('0x1a')](_0x61b5('0x1b')),controller[_0x61b5('0x24')]);router['put'](_0x61b5('0x25'),auth[_0x61b5('0x8')](),controller[_0x61b5('0x26')]);module[_0x61b5('0x27')]=router; \ No newline at end of file diff --git a/server/api/setting/setting.attributes.js b/server/api/setting/setting.attributes.js index 81b8d69..cce23a5 100644 --- a/server/api/setting/setting.attributes.js +++ b/server/api/setting/setting.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5f66=['STRING','BOOLEAN','UNSIGNED','exports','min_internal','INTEGER','min_mailbox'];(function(_0x5bd426,_0x4878e5){var _0x23a7eb=function(_0x594b42){while(--_0x594b42){_0x5bd426['push'](_0x5bd426['shift']());}};_0x23a7eb(++_0x4878e5);}(_0x5f66,0x1a0));var _0x65f6=function(_0x4154a6,_0x2c0b8e){_0x4154a6=_0x4154a6-0x0;var _0x3b2786=_0x5f66[_0x4154a6];return _0x3b2786;};'use strict';var Sequelize=require('sequelize');module[_0x65f6('0x0')]={'min_internal':{'type':Sequelize['INTEGER'](0xb),'unique':_0x65f6('0x1'),'defaultValue':0x3e8},'min_mailbox':{'type':Sequelize[_0x65f6('0x2')](0xb),'unique':_0x65f6('0x3'),'defaultValue':0x3e8},'agi_port':{'type':Sequelize[_0x65f6('0x2')](0xb),'defaultValue':0x11dd},'soundPath':{'type':Sequelize[_0x65f6('0x4')],'defaultValue':'/var/opt/motion2/server/files/sounds/converted'},'logo':{'type':Sequelize[_0x65f6('0x4')]},'defaultLogo':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'loginLogo':{'type':Sequelize[_0x65f6('0x4')]},'defaultLoginLogo':{'type':Sequelize[_0x65f6('0x5')],'defaultValue':!![]},'headerWhiteLabel':{'type':Sequelize['STRING']},'defaultHeaderWhiteLabel':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'securePassword':{'type':Sequelize[_0x65f6('0x5')],'defaultValue':!![]},'firstSetup':{'type':Sequelize[_0x65f6('0x5')],'defaultValue':!![]},'stunaddr':{'type':Sequelize[_0x65f6('0x4')]},'turnaddr':{'type':Sequelize[_0x65f6('0x4')]},'turnusername':{'type':Sequelize[_0x65f6('0x4')]},'turnpassword':{'type':Sequelize[_0x65f6('0x4')]},'pageTitle':{'type':Sequelize['STRING']},'defaultPageTitle':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'callRecordingEncryption':{'type':Sequelize[_0x65f6('0x5')],'defaultValue':![]},'passwordExpiresDays':{'type':Sequelize[_0x65f6('0x2')](0xb),'defaultValue':0x5a},'phoneBarAutoUpdater':{'type':Sequelize[_0x65f6('0x5')],'defaultValue':!![]},'phoneBarAutoUpdaterUrl':{'type':Sequelize[_0x65f6('0x4')],'defaultValue':'https://www.xcally.com/bar/phonebar/autoupdater.xml'},'enableEmailPreview':{'type':Sequelize[_0x65f6('0x5')],'defaultValue':![]},'split':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'splitSizeCsv':{'type':Sequelize['INTEGER'],'defaultValue':0x1388},'splitSizePdf':{'type':Sequelize[_0x65f6('0x2')],'defaultValue':0x1388},'splitSizeXlsx':{'type':Sequelize['INTEGER'],'defaultValue':0x1388},'messagesAlignment':{'type':Sequelize[_0x65f6('0x4')],'defaultValue':'alternate'},'chatTimeout':{'type':Sequelize[_0x65f6('0x2')],'defaultValue':0x1e},'phoneBarRememberMeEnabled':{'type':Sequelize[_0x65f6('0x5')],'defaultValue':!![]},'preferred':{'type':Sequelize[_0x65f6('0x4')]},'defaultPreferred':{'type':Sequelize[_0x65f6('0x5')],'defaultValue':!![]},'rtlSupport':{'type':Sequelize[_0x65f6('0x5')],'defaultValue':![]},'defaultScreenRecordingPath':{'type':Sequelize[_0x65f6('0x4')]},'allowedLoginAttempts':{'type':Sequelize[_0x65f6('0x2')],'defaultValue':0x5},'blockDuration':{'type':Sequelize[_0x65f6('0x2')],'defaultValue':0xa},'favicon':{'type':Sequelize[_0x65f6('0x4')]},'defaultFavicon':{'type':Sequelize[_0x65f6('0x5')],'defaultValue':!![]},'loginMailFrequency':{'type':Sequelize['INTEGER'],'defaultValue':0xa,'validate':{'min':0xa}},'transcribe':{'type':Sequelize[_0x65f6('0x5')],'defaultValue':![]},'automaticTranscribe':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'transcribeAccountId':{'type':Sequelize['INTEGER']},'transcribeRegion':{'type':Sequelize[_0x65f6('0x4')]},'sentiment':{'type':Sequelize[_0x65f6('0x5')],'defaultValue':![]},'automaticSentiment':{'type':Sequelize[_0x65f6('0x5')],'defaultValue':![]},'sentimentAccountId':{'type':Sequelize[_0x65f6('0x2')]},'sentimentRegion':{'type':Sequelize[_0x65f6('0x4')]},'language':{'type':Sequelize[_0x65f6('0x4')]},'bucket':{'type':Sequelize[_0x65f6('0x4')]},'googleSsoEnabled':{'type':Sequelize[_0x65f6('0x5')],'defaultValue':![]},'enforcePasswordHistory':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'passwordHistoryLimit':{'type':Sequelize['INTEGER'](0x2)[_0x65f6('0x6')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x5}},'privacyPolicyEmail':{'type':Sequelize['INTEGER'](0x2)['UNSIGNED'],'defaultValue':0x0},'privacyPolicyName':{'type':Sequelize['INTEGER'](0x2)[_0x65f6('0x6')],'defaultValue':0x0},'privacyPolicyNumber':{'type':Sequelize[_0x65f6('0x2')](0x2)['UNSIGNED'],'defaultValue':0x0},'searchOnEnterKey':{'type':Sequelize[_0x65f6('0x5')],'defaultValue':!![]},'chatInteractionsReloadTimeout':{'type':Sequelize[_0x65f6('0x2')],'defaultValue':0x0},'mailInteractionsReloadTimeout':{'type':Sequelize[_0x65f6('0x2')],'defaultValue':0x0},'openchannelInteractionsReloadTimeout':{'type':Sequelize[_0x65f6('0x2')],'defaultValue':0x0},'smsInteractionsReloadTimeout':{'type':Sequelize[_0x65f6('0x2')],'defaultValue':0x0},'whatsappInteractionsReloadTimeout':{'type':Sequelize[_0x65f6('0x2')],'defaultValue':0x0},'stopRecordingOnTransfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]}}; \ No newline at end of file +var _0x1261=['exports','INTEGER','min_internal','min_mailbox','STRING','/var/opt/motion2/server/files/sounds/converted','BOOLEAN','alternate','UNSIGNED'];(function(_0x117f15,_0x394c04){var _0x1a87c5=function(_0x5c48c7){while(--_0x5c48c7){_0x117f15['push'](_0x117f15['shift']());}};_0x1a87c5(++_0x394c04);}(_0x1261,0x144));var _0x1126=function(_0x5a8269,_0xfb2f54){_0x5a8269=_0x5a8269-0x0;var _0x539ed7=_0x1261[_0x5a8269];return _0x539ed7;};'use strict';var Sequelize=require('sequelize');module[_0x1126('0x0')]={'min_internal':{'type':Sequelize[_0x1126('0x1')](0xb),'unique':_0x1126('0x2'),'defaultValue':0x3e8},'min_mailbox':{'type':Sequelize[_0x1126('0x1')](0xb),'unique':_0x1126('0x3'),'defaultValue':0x3e8},'agi_port':{'type':Sequelize[_0x1126('0x1')](0xb),'defaultValue':0x11dd},'soundPath':{'type':Sequelize[_0x1126('0x4')],'defaultValue':_0x1126('0x5')},'logo':{'type':Sequelize[_0x1126('0x4')]},'defaultLogo':{'type':Sequelize[_0x1126('0x6')],'defaultValue':!![]},'loginLogo':{'type':Sequelize['STRING']},'defaultLoginLogo':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'headerWhiteLabel':{'type':Sequelize[_0x1126('0x4')]},'defaultHeaderWhiteLabel':{'type':Sequelize[_0x1126('0x6')],'defaultValue':!![]},'securePassword':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'firstSetup':{'type':Sequelize[_0x1126('0x6')],'defaultValue':!![]},'stunaddr':{'type':Sequelize[_0x1126('0x4')]},'turnaddr':{'type':Sequelize[_0x1126('0x4')]},'turnusername':{'type':Sequelize[_0x1126('0x4')]},'turnpassword':{'type':Sequelize[_0x1126('0x4')]},'pageTitle':{'type':Sequelize['STRING']},'defaultPageTitle':{'type':Sequelize[_0x1126('0x6')],'defaultValue':!![]},'callRecordingEncryption':{'type':Sequelize[_0x1126('0x6')],'defaultValue':![]},'passwordExpiresDays':{'type':Sequelize[_0x1126('0x1')](0xb),'defaultValue':0x5a},'phoneBarAutoUpdater':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'phoneBarAutoUpdaterUrl':{'type':Sequelize[_0x1126('0x4')],'defaultValue':'https://www.xcally.com/bar/phonebar/autoupdater.xml'},'enableEmailPreview':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'split':{'type':Sequelize[_0x1126('0x6')],'defaultValue':!![]},'splitSizeCsv':{'type':Sequelize['INTEGER'],'defaultValue':0x1388},'splitSizePdf':{'type':Sequelize[_0x1126('0x1')],'defaultValue':0x1388},'splitSizeXlsx':{'type':Sequelize[_0x1126('0x1')],'defaultValue':0x1388},'messagesAlignment':{'type':Sequelize[_0x1126('0x4')],'defaultValue':_0x1126('0x7')},'chatTimeout':{'type':Sequelize[_0x1126('0x1')],'defaultValue':0x1e},'phoneBarRememberMeEnabled':{'type':Sequelize[_0x1126('0x6')],'defaultValue':!![]},'preferred':{'type':Sequelize[_0x1126('0x4')]},'defaultPreferred':{'type':Sequelize[_0x1126('0x6')],'defaultValue':!![]},'rtlSupport':{'type':Sequelize[_0x1126('0x6')],'defaultValue':![]},'defaultScreenRecordingPath':{'type':Sequelize['STRING']},'allowedLoginAttempts':{'type':Sequelize['INTEGER'],'defaultValue':0x5},'blockDuration':{'type':Sequelize[_0x1126('0x1')],'defaultValue':0xa},'favicon':{'type':Sequelize[_0x1126('0x4')]},'defaultFavicon':{'type':Sequelize[_0x1126('0x6')],'defaultValue':!![]},'loginMailFrequency':{'type':Sequelize['INTEGER'],'defaultValue':0xa,'validate':{'min':0xa}},'transcribe':{'type':Sequelize[_0x1126('0x6')],'defaultValue':![]},'automaticTranscribe':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'transcribeAccountId':{'type':Sequelize[_0x1126('0x1')]},'transcribeRegion':{'type':Sequelize[_0x1126('0x4')]},'sentiment':{'type':Sequelize[_0x1126('0x6')],'defaultValue':![]},'automaticSentiment':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'sentimentAccountId':{'type':Sequelize[_0x1126('0x1')]},'sentimentRegion':{'type':Sequelize[_0x1126('0x4')]},'language':{'type':Sequelize['STRING']},'bucket':{'type':Sequelize['STRING']},'googleSsoEnabled':{'type':Sequelize[_0x1126('0x6')],'defaultValue':![]},'enforcePasswordHistory':{'type':Sequelize[_0x1126('0x6')],'defaultValue':!![]},'passwordHistoryLimit':{'type':Sequelize['INTEGER'](0x2)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x5}},'privacyPolicyEmail':{'type':Sequelize[_0x1126('0x1')](0x2)['UNSIGNED'],'defaultValue':0x0},'privacyPolicyName':{'type':Sequelize[_0x1126('0x1')](0x2)[_0x1126('0x8')],'defaultValue':0x0},'privacyPolicyNumber':{'type':Sequelize[_0x1126('0x1')](0x2)['UNSIGNED'],'defaultValue':0x0},'searchOnEnterKey':{'type':Sequelize[_0x1126('0x6')],'defaultValue':!![]},'chatInteractionsReloadTimeout':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'mailInteractionsReloadTimeout':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'openchannelInteractionsReloadTimeout':{'type':Sequelize[_0x1126('0x1')],'defaultValue':0x0},'smsInteractionsReloadTimeout':{'type':Sequelize[_0x1126('0x1')],'defaultValue':0x0},'whatsappInteractionsReloadTimeout':{'type':Sequelize[_0x1126('0x1')],'defaultValue':0x0},'stopRecordingOnTransfer':{'type':Sequelize[_0x1126('0x6')],'defaultValue':![]}}; \ No newline at end of file diff --git a/server/api/setting/setting.controller.js b/server/api/setting/setting.controller.js index aab746e..ab09fb9 100644 --- a/server/api/setting/setting.controller.js +++ b/server/api/setting/setting.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0ad1=['send','index','Setting','rawAttributes','type','key','model','map','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','merge','VIRTUAL','filter','options','include','findAll','rows','show','params','includeAll','find','body','addLogo','file','logo','filename','loginLogo','getLogo','server/files/images/logos','getLicense','preferred','favicon','defaultLogo','defaultLoginLogo','defaultFavicon','join','root','toLower','default_logo.svg','default','custom','existsSync','ValidationError','getLogoLogin','defaultPreferred','default_loginLogo.svg','Sequelize','upperFirst','\x20not\x20found','download','gdpr','securePassword','addPreferred','getPreferred','default_preferred.png','addFavicon','getFavicon','default_favicon.ico','getDate','utcOffset','now','format','YYYY-MM-DD\x20HH:mm:ss:SSS','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','querystring','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','jayson/promise','client','http','then','Setting,\x20%s,\x20%s','request\x20sent','Setting,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','end','status','offset','undefined','limit','count','set','Content-Range','json','apply','reject','save','update','destroy','stack','name'];(function(_0x12c78a,_0x24cb20){var _0x575f77=function(_0x34579e){while(--_0x34579e){_0x12c78a['push'](_0x12c78a['shift']());}};_0x575f77(++_0x24cb20);}(_0x0ad1,0x149));var _0x10ad=function(_0x5da62b,_0x24527d){_0x5da62b=_0x5da62b-0x0;var _0x430719=_0x0ad1[_0x5da62b];return _0x430719;};'use strict';var emlformat=require(_0x10ad('0x0'));var rimraf=require(_0x10ad('0x1'));var zipdir=require(_0x10ad('0x2'));var jsonpatch=require(_0x10ad('0x3'));var rp=require(_0x10ad('0x4'));var moment=require(_0x10ad('0x5'));var BPromise=require(_0x10ad('0x6'));var Mustache=require(_0x10ad('0x7'));var util=require(_0x10ad('0x8'));var path=require('path');var sox=require(_0x10ad('0x9'));var csv=require(_0x10ad('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x10ad('0xb'));var _=require(_0x10ad('0xc'));var squel=require(_0x10ad('0xd'));var crypto=require(_0x10ad('0xe'));var jsforce=require(_0x10ad('0xf'));var deskjs=require('desk.js');var toCsv=require(_0x10ad('0xa'));var querystring=require(_0x10ad('0x10'));var Papa=require('papaparse');var Redis=require(_0x10ad('0x11'));var authService=require(_0x10ad('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0x10ad('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x10ad('0x14'))('api');var utils=require(_0x10ad('0x15'));var config=require(_0x10ad('0x16'));var licenseUtil=require(_0x10ad('0x17'));var db=require(_0x10ad('0x18'))['db'];var jayson=require(_0x10ad('0x19'));var client=jayson[_0x10ad('0x1a')][_0x10ad('0x1b')]({'port':0x232a});function respondWithRpcPromise(_0x4110d3,_0x4ac12a,_0x6da9f7,_0x523156){return new BPromise(function(_0x30dd2c,_0x37823a){var _0x4d7b6b=_0x523156||client;return _0x4d7b6b['request'](_0x4110d3,_0x6da9f7)[_0x10ad('0x1c')](function(_0xe14d85){logger['info'](_0x10ad('0x1d'),_0x4ac12a,_0x10ad('0x1e'));logger['debug'](_0x10ad('0x1f'),_0x4ac12a,_0x10ad('0x1e'),JSON[_0x10ad('0x20')](_0xe14d85));if(_0xe14d85[_0x10ad('0x21')]){if(_0xe14d85[_0x10ad('0x21')][_0x10ad('0x22')]===0x1f4){logger['error'](_0x10ad('0x1d'),_0x4ac12a,_0xe14d85[_0x10ad('0x21')][_0x10ad('0x23')]);return _0x37823a(_0xe14d85[_0x10ad('0x21')][_0x10ad('0x23')]);}logger[_0x10ad('0x21')]('Setting,\x20%s,\x20%s',_0x4ac12a,_0xe14d85[_0x10ad('0x21')][_0x10ad('0x23')]);return _0x30dd2c(_0xe14d85[_0x10ad('0x21')][_0x10ad('0x23')]);}else{logger[_0x10ad('0x24')]('Setting,\x20%s,\x20%s',_0x4ac12a,_0x10ad('0x1e'));_0x30dd2c(_0xe14d85[_0x10ad('0x25')][_0x10ad('0x23')]);}})[_0x10ad('0x26')](function(_0x245104){logger[_0x10ad('0x21')]('Setting,\x20%s,\x20%s',_0x4ac12a,_0x245104);_0x37823a(_0x245104);});});}function respondWithStatusCode(_0x41ce85,_0x4fcb17){_0x4fcb17=_0x4fcb17||0xcc;return function(_0x351b93){if(_0x351b93){return _0x41ce85['sendStatus'](_0x4fcb17);}return _0x41ce85['status'](_0x4fcb17)[_0x10ad('0x27')]();};}function respondWithResult(_0x2af63a,_0x4315a0){_0x4315a0=_0x4315a0||0xc8;return function(_0x4d4608){if(_0x4d4608){return _0x2af63a[_0x10ad('0x28')](_0x4315a0)['json'](_0x4d4608);}};}function respondWithFilteredResult(_0x19234f,_0x1089a2){return function(_0x16520e){if(_0x16520e){var _0x279ccf=typeof _0x1089a2[_0x10ad('0x29')]===_0x10ad('0x2a')&&typeof _0x1089a2[_0x10ad('0x2b')]===_0x10ad('0x2a');var _0x42cf42=_0x16520e['count'];var _0x502aab=_0x279ccf?0x0:_0x1089a2[_0x10ad('0x29')];var _0x18bb07=_0x279ccf?_0x16520e[_0x10ad('0x2c')]:_0x1089a2[_0x10ad('0x29')]+_0x1089a2['limit'];var _0x4a1795;if(_0x18bb07>=_0x42cf42){_0x18bb07=_0x42cf42;_0x4a1795=0xc8;}else{_0x4a1795=0xce;}_0x19234f[_0x10ad('0x28')](_0x4a1795);return _0x19234f[_0x10ad('0x2d')](_0x10ad('0x2e'),_0x502aab+'-'+_0x18bb07+'/'+_0x42cf42)[_0x10ad('0x2f')](_0x16520e);}return null;};}function patchUpdates(_0x454c71){return function(_0x4459b6){try{jsonpatch[_0x10ad('0x30')](_0x4459b6,_0x454c71,!![]);}catch(_0x19947f){return BPromise[_0x10ad('0x31')](_0x19947f);}return _0x4459b6[_0x10ad('0x32')]();};}function saveUpdates(_0x3d91d2,_0x5b4394){return function(_0x370b8b){if(_0x370b8b){return _0x370b8b[_0x10ad('0x33')](_0x3d91d2)['then'](function(_0x1d4369){return _0x1d4369;});}return null;};}function removeEntity(_0x52a58c,_0x9698fe){return function(_0x391a55){if(_0x391a55){return _0x391a55[_0x10ad('0x34')]()[_0x10ad('0x1c')](function(){_0x52a58c[_0x10ad('0x28')](0xcc)[_0x10ad('0x27')]();});}};}function handleEntityNotFound(_0x47c0b7,_0x8c511){return function(_0x1b112f){if(!_0x1b112f){_0x47c0b7['sendStatus'](0x194);}return _0x1b112f;};}function handleError(_0x235cf6,_0xb4384c){_0xb4384c=_0xb4384c||0x1f4;return function(_0x85a3d6){logger['error'](_0x85a3d6[_0x10ad('0x35')]);if(_0x85a3d6[_0x10ad('0x36')]){delete _0x85a3d6[_0x10ad('0x36')];}_0x235cf6[_0x10ad('0x28')](_0xb4384c)[_0x10ad('0x37')](_0x85a3d6);};}exports[_0x10ad('0x38')]=function(_0x3777f6,_0x26604f){var _0x56b525={},_0x537afc={},_0x4a9734={'count':0x0,'rows':[]};var _0x4d7d88=_['map'](db[_0x10ad('0x39')][_0x10ad('0x3a')],function(_0x25ef52){return{'name':_0x25ef52['fieldName'],'type':_0x25ef52[_0x10ad('0x3b')][_0x10ad('0x3c')]};});_0x537afc[_0x10ad('0x3d')]=_[_0x10ad('0x3e')](_0x4d7d88,_0x10ad('0x36'));_0x537afc[_0x10ad('0x3f')]=_[_0x10ad('0x40')](_0x3777f6[_0x10ad('0x3f')]);_0x537afc[_0x10ad('0x41')]=_[_0x10ad('0x42')](_0x537afc[_0x10ad('0x3d')],_0x537afc[_0x10ad('0x3f')]);_0x56b525[_0x10ad('0x43')]=_[_0x10ad('0x42')](_0x537afc[_0x10ad('0x3d')],qs[_0x10ad('0x44')](_0x3777f6[_0x10ad('0x3f')][_0x10ad('0x44')]));_0x56b525[_0x10ad('0x43')]=_0x56b525['attributes'][_0x10ad('0x45')]?_0x56b525['attributes']:_0x537afc[_0x10ad('0x3d')];if(!_0x3777f6[_0x10ad('0x3f')][_0x10ad('0x46')](_0x10ad('0x47'))){_0x56b525['limit']=qs[_0x10ad('0x2b')](_0x3777f6['query'][_0x10ad('0x2b')]);_0x56b525[_0x10ad('0x29')]=qs[_0x10ad('0x29')](_0x3777f6[_0x10ad('0x3f')][_0x10ad('0x29')]);}_0x56b525[_0x10ad('0x48')]=qs[_0x10ad('0x49')](_0x3777f6[_0x10ad('0x3f')][_0x10ad('0x49')]);_0x56b525[_0x10ad('0x4a')]=qs[_0x10ad('0x41')](_['pick'](_0x3777f6[_0x10ad('0x3f')],_0x537afc['filters']),_0x4d7d88);if(_0x3777f6[_0x10ad('0x3f')]['filter']){_0x56b525[_0x10ad('0x4a')]=_[_0x10ad('0x4b')](_0x56b525[_0x10ad('0x4a')],{'$or':_[_0x10ad('0x3e')](_0x4d7d88,function(_0x22c491){if(_0x22c491[_0x10ad('0x3b')]!==_0x10ad('0x4c')){var _0x313ace={};_0x313ace[_0x22c491[_0x10ad('0x36')]]={'$like':'%'+_0x3777f6[_0x10ad('0x3f')][_0x10ad('0x4d')]+'%'};return _0x313ace;}})});}_0x56b525=_[_0x10ad('0x4b')]({},_0x56b525,_0x3777f6[_0x10ad('0x4e')]);var _0x40abfb={'where':_0x56b525['where']};return db['Setting'][_0x10ad('0x2c')](_0x40abfb)['then'](function(_0x20c380){_0x4a9734['count']=_0x20c380;if(_0x3777f6[_0x10ad('0x3f')]['includeAll']){_0x56b525[_0x10ad('0x4f')]=[{'all':!![]}];}return db['Setting'][_0x10ad('0x50')](_0x56b525);})[_0x10ad('0x1c')](function(_0x31724a){_0x4a9734[_0x10ad('0x51')]=_0x31724a;return _0x4a9734;})[_0x10ad('0x1c')](respondWithFilteredResult(_0x26604f,_0x56b525))[_0x10ad('0x26')](handleError(_0x26604f,null));};exports[_0x10ad('0x52')]=function(_0x5bccbb,_0x45b016){var _0x286b96={'raw':![],'where':{'id':_0x5bccbb[_0x10ad('0x53')]['id']}},_0x1a459c={};_0x1a459c[_0x10ad('0x3d')]=_['keys'](db['Setting'][_0x10ad('0x3a')]);_0x1a459c[_0x10ad('0x3f')]=_[_0x10ad('0x40')](_0x5bccbb[_0x10ad('0x3f')]);_0x1a459c[_0x10ad('0x41')]=_[_0x10ad('0x42')](_0x1a459c[_0x10ad('0x3d')],_0x1a459c[_0x10ad('0x3f')]);_0x286b96[_0x10ad('0x43')]=_[_0x10ad('0x42')](_0x1a459c[_0x10ad('0x3d')],qs[_0x10ad('0x44')](_0x5bccbb[_0x10ad('0x3f')][_0x10ad('0x44')]));_0x286b96[_0x10ad('0x43')]=_0x286b96[_0x10ad('0x43')]['length']?_0x286b96[_0x10ad('0x43')]:_0x1a459c['model'];if(_0x5bccbb[_0x10ad('0x3f')][_0x10ad('0x54')]){_0x286b96['include']=[{'all':!![]}];}_0x286b96=_[_0x10ad('0x4b')]({},_0x286b96,_0x5bccbb[_0x10ad('0x4e')]);return db[_0x10ad('0x39')][_0x10ad('0x55')](_0x286b96)[_0x10ad('0x1c')](handleEntityNotFound(_0x45b016,null))['then'](respondWithResult(_0x45b016,null))['catch'](handleError(_0x45b016,null));};exports[_0x10ad('0x33')]=function(_0x421b98,_0x22b103){if(_0x421b98[_0x10ad('0x56')]['id']){delete _0x421b98[_0x10ad('0x56')]['id'];}return db[_0x10ad('0x39')][_0x10ad('0x55')]({'where':{'id':_0x421b98[_0x10ad('0x53')]['id']}})['then'](handleEntityNotFound(_0x22b103,null))[_0x10ad('0x1c')](saveUpdates(_0x421b98[_0x10ad('0x56')],null))[_0x10ad('0x1c')](respondWithResult(_0x22b103,null))[_0x10ad('0x26')](handleError(_0x22b103,null));};exports[_0x10ad('0x57')]=function(_0x19cd86,_0x311c8e,_0x19fe4b){if(_0x19cd86[_0x10ad('0x58')]&&_0x19cd86[_0x10ad('0x58')]['filename']){_0x19cd86[_0x10ad('0x56')][_0x10ad('0x59')]=_0x19cd86[_0x10ad('0x58')]['filename'];}return db[_0x10ad('0x39')][_0x10ad('0x55')]({'where':{'id':_0x19cd86['params']['id']}})['then'](handleEntityNotFound(_0x311c8e,null))[_0x10ad('0x1c')](saveUpdates(_0x19cd86[_0x10ad('0x56')],null))[_0x10ad('0x1c')](respondWithResult(_0x311c8e,null))['catch'](handleError(_0x311c8e,null));};exports['addLogoLogin']=function(_0xfd9dbd,_0x346dd6,_0x190f98){if(_0xfd9dbd['file']&&_0xfd9dbd['file'][_0x10ad('0x5a')]){_0xfd9dbd[_0x10ad('0x56')][_0x10ad('0x5b')]=_0xfd9dbd[_0x10ad('0x58')][_0x10ad('0x5a')];}return db[_0x10ad('0x39')]['find']({'where':{'id':_0xfd9dbd['params']['id']}})['then'](handleEntityNotFound(_0x346dd6,null))['then'](saveUpdates(_0xfd9dbd['body'],null))['then'](respondWithResult(_0x346dd6,null))[_0x10ad('0x26')](handleError(_0x346dd6,null));};var utilLicense=require('../../config/license/util');exports[_0x10ad('0x5c')]=function(_0x358bf9,_0x8ca1d6,_0x34d472){var _0x39f001=_0x10ad('0x5d');var _0x3066ce={'custom':![]};return utilLicense[_0x10ad('0x5e')]()['then'](function(_0x5f50e8){if(_0x5f50e8){_0x3066ce=_0x5f50e8;}return db[_0x10ad('0x39')]['find']({'where':{'id':_0x358bf9[_0x10ad('0x53')]['id']},'attributes':['logo',_0x10ad('0x5b'),_0x10ad('0x5f'),_0x10ad('0x60'),_0x10ad('0x61'),_0x10ad('0x62'),'defaultPreferred',_0x10ad('0x63')],'raw':!![]});})[_0x10ad('0x1c')](handleEntityNotFound(_0x8ca1d6,null))[_0x10ad('0x1c')](function(_0x3abfba){if(_0x3abfba){var _0x2dbaa2=_0x3abfba[_0x10ad('0x59')]&&fs['existsSync'](path[_0x10ad('0x64')](config[_0x10ad('0x65')],_0x39f001,_[_0x10ad('0x66')](_0x3abfba[_0x10ad('0x59')])))?path['join'](config[_0x10ad('0x65')],_0x39f001,_['toLower'](_0x3abfba[_0x10ad('0x59')])):path[_0x10ad('0x64')](config[_0x10ad('0x65')],_0x39f001,_[_0x10ad('0x66')](_0x10ad('0x67')));var _0x588fae=_0x10ad('0x68')+_['upperFirst'](_0x10ad('0x59'));if(_0x3abfba[_0x588fae]||!_0x3066ce[_0x10ad('0x69')]){_0x2dbaa2=path['join'](config[_0x10ad('0x65')],_0x39f001,_['toLower'](_0x10ad('0x67')));}if(!fs[_0x10ad('0x6a')](_0x2dbaa2)){throw new db['Sequelize'][(_0x10ad('0x6b'))](_['upperFirst'](_0x10ad('0x59'))+'\x20not\x20found');}return _0x8ca1d6['download'](_0x2dbaa2);}})[_0x10ad('0x26')](handleError(_0x8ca1d6,null));};var utilLicense=require('../../config/license/util');exports[_0x10ad('0x6c')]=function(_0x5aad53,_0x296fac,_0x3de2ee){var _0xcf6e65='server/files/images/logos';var _0x50b560={'custom':![]};return utilLicense[_0x10ad('0x5e')]()['then'](function(_0x12a54a){if(_0x12a54a){_0x50b560=_0x12a54a;}return db[_0x10ad('0x39')][_0x10ad('0x55')]({'where':{'id':_0x5aad53['params']['id']},'attributes':[_0x10ad('0x59'),_0x10ad('0x5b'),'preferred',_0x10ad('0x60'),_0x10ad('0x61'),_0x10ad('0x62'),_0x10ad('0x6d'),_0x10ad('0x63')],'raw':!![]});})[_0x10ad('0x1c')](handleEntityNotFound(_0x296fac,null))['then'](function(_0x3b5981){if(_0x3b5981){var _0x2891a7=_0x3b5981[_0x10ad('0x5b')]&&fs['existsSync'](path['join'](config['root'],_0xcf6e65,_[_0x10ad('0x66')](_0x3b5981['loginLogo'])))?path[_0x10ad('0x64')](config[_0x10ad('0x65')],_0xcf6e65,_[_0x10ad('0x66')](_0x3b5981[_0x10ad('0x5b')])):path[_0x10ad('0x64')](config['root'],_0xcf6e65,_['toLower'](_0x10ad('0x6e')));var _0x1f67e4=_0x10ad('0x68')+_['upperFirst'](_0x10ad('0x5b'));if(_0x3b5981[_0x1f67e4]||!_0x50b560[_0x10ad('0x69')]){_0x2891a7=path[_0x10ad('0x64')](config[_0x10ad('0x65')],_0xcf6e65,_[_0x10ad('0x66')](_0x10ad('0x6e')));}if(!fs[_0x10ad('0x6a')](_0x2891a7)){throw new db[(_0x10ad('0x6f'))][(_0x10ad('0x6b'))](_[_0x10ad('0x70')](_0x10ad('0x5b'))+_0x10ad('0x71'));}return _0x296fac[_0x10ad('0x72')](_0x2891a7);}})[_0x10ad('0x26')](handleError(_0x296fac,null));};exports[_0x10ad('0x73')]=function(_0x1ec2fb,_0x105b6c){return db[_0x10ad('0x39')][_0x10ad('0x55')]({'where':{'id':_0x1ec2fb['params']['id']},'attributes':[_0x10ad('0x74')]})[_0x10ad('0x1c')](respondWithResult(_0x105b6c,null))[_0x10ad('0x26')](handleError(_0x105b6c,null));};exports[_0x10ad('0x75')]=function(_0x189589,_0x4c2bc9,_0x371bf6){if(_0x189589[_0x10ad('0x58')]&&_0x189589[_0x10ad('0x58')][_0x10ad('0x5a')]){_0x189589['body'][_0x10ad('0x5f')]=_0x189589[_0x10ad('0x58')][_0x10ad('0x5a')];}return db[_0x10ad('0x39')][_0x10ad('0x55')]({'where':{'id':_0x189589[_0x10ad('0x53')]['id']}})[_0x10ad('0x1c')](handleEntityNotFound(_0x4c2bc9,null))['then'](saveUpdates(_0x189589['body'],null))[_0x10ad('0x1c')](respondWithResult(_0x4c2bc9,null))['catch'](handleError(_0x4c2bc9,null));};var utilLicense=require('../../config/license/util');exports[_0x10ad('0x76')]=function(_0x59e6f2,_0x4120ed,_0x2a31f2){var _0x119eda=_0x10ad('0x5d');var _0x28358f={'custom':![]};return utilLicense[_0x10ad('0x5e')]()['then'](function(_0x241154){if(_0x241154){_0x28358f=_0x241154;}return db['Setting'][_0x10ad('0x55')]({'where':{'id':_0x59e6f2[_0x10ad('0x53')]['id']},'attributes':[_0x10ad('0x59'),_0x10ad('0x5b'),_0x10ad('0x5f'),_0x10ad('0x60'),_0x10ad('0x61'),_0x10ad('0x62'),_0x10ad('0x6d'),_0x10ad('0x63')],'raw':!![]});})[_0x10ad('0x1c')](handleEntityNotFound(_0x4120ed,null))['then'](function(_0x9e2bba){if(_0x9e2bba){var _0x38bef1=_0x9e2bba[_0x10ad('0x5f')]&&fs['existsSync'](path[_0x10ad('0x64')](config[_0x10ad('0x65')],_0x119eda,_['toLower'](_0x9e2bba['preferred'])))?path[_0x10ad('0x64')](config[_0x10ad('0x65')],_0x119eda,_[_0x10ad('0x66')](_0x9e2bba[_0x10ad('0x5f')])):path[_0x10ad('0x64')](config['root'],_0x119eda,_[_0x10ad('0x66')](_0x10ad('0x77')));var _0x315ffb=_0x10ad('0x68')+_[_0x10ad('0x70')](_0x10ad('0x5f'));if(_0x9e2bba[_0x315ffb]||!_0x28358f[_0x10ad('0x69')]||!_0x28358f[_0x10ad('0x5f')]){_0x38bef1=path[_0x10ad('0x64')](config[_0x10ad('0x65')],_0x119eda,_['toLower'](_0x10ad('0x77')));}if(!fs[_0x10ad('0x6a')](_0x38bef1)){throw new db[(_0x10ad('0x6f'))][(_0x10ad('0x6b'))](_[_0x10ad('0x70')](_0x10ad('0x5f'))+_0x10ad('0x71'));}return _0x4120ed[_0x10ad('0x72')](_0x38bef1);}})[_0x10ad('0x26')](handleError(_0x4120ed,null));};exports[_0x10ad('0x78')]=function(_0xf1d676,_0x48638a,_0x3d2800){if(_0xf1d676[_0x10ad('0x58')]&&_0xf1d676['file'][_0x10ad('0x5a')]){_0xf1d676['body'][_0x10ad('0x60')]=_0xf1d676[_0x10ad('0x58')][_0x10ad('0x5a')];}return db[_0x10ad('0x39')]['find']({'where':{'id':_0xf1d676[_0x10ad('0x53')]['id']}})[_0x10ad('0x1c')](handleEntityNotFound(_0x48638a,null))[_0x10ad('0x1c')](saveUpdates(_0xf1d676[_0x10ad('0x56')],null))[_0x10ad('0x1c')](respondWithResult(_0x48638a,null))['catch'](handleError(_0x48638a,null));};var utilLicense=require(_0x10ad('0x17'));exports[_0x10ad('0x79')]=function(_0x43a89b,_0x49a37e,_0x537d90){var _0x27ae93=_0x10ad('0x5d');var _0x424599={'custom':![]};return utilLicense[_0x10ad('0x5e')]()[_0x10ad('0x1c')](function(_0xb7fc10){if(_0xb7fc10){_0x424599=_0xb7fc10;}return db[_0x10ad('0x39')][_0x10ad('0x55')]({'where':{'id':_0x43a89b[_0x10ad('0x53')]['id']},'attributes':['logo','loginLogo',_0x10ad('0x5f'),_0x10ad('0x60'),_0x10ad('0x61'),'defaultLoginLogo',_0x10ad('0x6d'),'defaultFavicon'],'raw':!![]});})['then'](handleEntityNotFound(_0x49a37e,null))[_0x10ad('0x1c')](function(_0x270cb2){if(_0x270cb2){var _0x50874e=_0x270cb2[_0x10ad('0x60')]&&fs[_0x10ad('0x6a')](path[_0x10ad('0x64')](config[_0x10ad('0x65')],_0x27ae93,_[_0x10ad('0x66')](_0x270cb2['favicon'])))?path[_0x10ad('0x64')](config['root'],_0x27ae93,_[_0x10ad('0x66')](_0x270cb2[_0x10ad('0x60')])):path[_0x10ad('0x64')](config[_0x10ad('0x65')],_0x27ae93,_[_0x10ad('0x66')](_0x10ad('0x7a')));var _0x17a864=_0x10ad('0x68')+_[_0x10ad('0x70')]('favicon');if(_0x270cb2[_0x17a864]||!_0x424599[_0x10ad('0x69')]){_0x50874e=path['join'](config[_0x10ad('0x65')],_0x27ae93,_[_0x10ad('0x66')](_0x10ad('0x7a')));}if(!fs[_0x10ad('0x6a')](_0x50874e)){throw new db['Sequelize'][(_0x10ad('0x6b'))](_[_0x10ad('0x70')](_0x10ad('0x60'))+'\x20not\x20found');}return _0x49a37e[_0x10ad('0x72')](_0x50874e);}})[_0x10ad('0x26')](handleError(_0x49a37e,null));};exports[_0x10ad('0x7b')]=function(_0x53676e,_0x3fdae0){var _0x2655d8={'offset':moment()[_0x10ad('0x7c')]()};_0x2655d8[_0x10ad('0x7d')]=moment()[_0x10ad('0x7c')](_0x2655d8['offset'])[_0x10ad('0x7e')](_0x10ad('0x7f'));return _0x3fdae0['status'](0xc8)[_0x10ad('0x37')](_0x2655d8);}; \ No newline at end of file +var _0x9fdc=['../../config/license/util','getLogo','server/files/images/logos','getLicense','preferred','favicon','defaultLogo','defaultLoginLogo','defaultPreferred','defaultFavicon','existsSync','toLower','join','root','upperFirst','custom','Sequelize','\x20not\x20found','download','default_loginLogo.svg','default','ValidationError','gdpr','addPreferred','getPreferred','default_preferred.png','addFavicon','getFavicon','default_favicon.ico','utcOffset','now','format','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','desk.js','querystring','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','jayson/promise','client','request','then','Setting,\x20%s,\x20%s','request\x20sent','Setting,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','catch','sendStatus','end','json','offset','undefined','count','limit','set','Content-Range','apply','reject','save','update','destroy','stack','name','status','index','map','Setting','fieldName','key','model','keys','query','filters','intersection','attributes','fields','hasOwnProperty','order','sort','pick','merge','where','type','VIRTUAL','options','includeAll','include','findAll','rows','show','params','length','find','body','addLogo','file','filename','logo','addLogoLogin','loginLogo'];(function(_0x2112d4,_0x3c863c){var _0x434972=function(_0x477020){while(--_0x477020){_0x2112d4['push'](_0x2112d4['shift']());}};_0x434972(++_0x3c863c);}(_0x9fdc,0x18e));var _0xc9fd=function(_0x420b24,_0x382adc){_0x420b24=_0x420b24-0x0;var _0x4da552=_0x9fdc[_0x420b24];return _0x4da552;};'use strict';var emlformat=require(_0xc9fd('0x0'));var rimraf=require(_0xc9fd('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xc9fd('0x2'));var rp=require(_0xc9fd('0x3'));var moment=require(_0xc9fd('0x4'));var BPromise=require(_0xc9fd('0x5'));var Mustache=require(_0xc9fd('0x6'));var util=require(_0xc9fd('0x7'));var path=require(_0xc9fd('0x8'));var sox=require(_0xc9fd('0x9'));var csv=require(_0xc9fd('0xa'));var ejs=require(_0xc9fd('0xb'));var fs=require('fs');var fs_extra=require(_0xc9fd('0xc'));var _=require(_0xc9fd('0xd'));var squel=require(_0xc9fd('0xe'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0xc9fd('0xf'));var toCsv=require(_0xc9fd('0xa'));var querystring=require(_0xc9fd('0x10'));var Papa=require('papaparse');var Redis=require(_0xc9fd('0x11'));var authService=require('../../components/auth/service');var qs=require(_0xc9fd('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xc9fd('0x13'));var logger=require(_0xc9fd('0x14'))(_0xc9fd('0x15'));var utils=require(_0xc9fd('0x16'));var config=require(_0xc9fd('0x17'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];var jayson=require(_0xc9fd('0x18'));var client=jayson[_0xc9fd('0x19')]['http']({'port':0x232a});function respondWithRpcPromise(_0x43514a,_0x572039,_0x3ce7a5,_0x17e98e){return new BPromise(function(_0xca7c18,_0x4dfb70){var _0xc97cd4=_0x17e98e||client;return _0xc97cd4[_0xc9fd('0x1a')](_0x43514a,_0x3ce7a5)[_0xc9fd('0x1b')](function(_0x4581a2){logger['info'](_0xc9fd('0x1c'),_0x572039,_0xc9fd('0x1d'));logger['debug'](_0xc9fd('0x1e'),_0x572039,_0xc9fd('0x1d'),JSON[_0xc9fd('0x1f')](_0x4581a2));if(_0x4581a2[_0xc9fd('0x20')]){if(_0x4581a2[_0xc9fd('0x20')][_0xc9fd('0x21')]===0x1f4){logger[_0xc9fd('0x20')]('Setting,\x20%s,\x20%s',_0x572039,_0x4581a2[_0xc9fd('0x20')]['message']);return _0x4dfb70(_0x4581a2[_0xc9fd('0x20')][_0xc9fd('0x22')]);}logger[_0xc9fd('0x20')](_0xc9fd('0x1c'),_0x572039,_0x4581a2[_0xc9fd('0x20')][_0xc9fd('0x22')]);return _0xca7c18(_0x4581a2['error'][_0xc9fd('0x22')]);}else{logger[_0xc9fd('0x23')](_0xc9fd('0x1c'),_0x572039,_0xc9fd('0x1d'));_0xca7c18(_0x4581a2['result']['message']);}})[_0xc9fd('0x24')](function(_0x1e005a){logger[_0xc9fd('0x20')]('Setting,\x20%s,\x20%s',_0x572039,_0x1e005a);_0x4dfb70(_0x1e005a);});});}function respondWithStatusCode(_0x414e6f,_0x3adaa2){_0x3adaa2=_0x3adaa2||0xcc;return function(_0x324f81){if(_0x324f81){return _0x414e6f[_0xc9fd('0x25')](_0x3adaa2);}return _0x414e6f['status'](_0x3adaa2)[_0xc9fd('0x26')]();};}function respondWithResult(_0x4f3496,_0x56af05){_0x56af05=_0x56af05||0xc8;return function(_0x5809d2){if(_0x5809d2){return _0x4f3496['status'](_0x56af05)[_0xc9fd('0x27')](_0x5809d2);}};}function respondWithFilteredResult(_0x1bf579,_0x5299ae){return function(_0x40ffa7){if(_0x40ffa7){var _0x1cbb44=typeof _0x5299ae[_0xc9fd('0x28')]===_0xc9fd('0x29')&&typeof _0x5299ae['limit']===_0xc9fd('0x29');var _0x43ae1c=_0x40ffa7[_0xc9fd('0x2a')];var _0xb4634d=_0x1cbb44?0x0:_0x5299ae[_0xc9fd('0x28')];var _0x381d43=_0x1cbb44?_0x40ffa7[_0xc9fd('0x2a')]:_0x5299ae['offset']+_0x5299ae[_0xc9fd('0x2b')];var _0x18896a;if(_0x381d43>=_0x43ae1c){_0x381d43=_0x43ae1c;_0x18896a=0xc8;}else{_0x18896a=0xce;}_0x1bf579['status'](_0x18896a);return _0x1bf579[_0xc9fd('0x2c')](_0xc9fd('0x2d'),_0xb4634d+'-'+_0x381d43+'/'+_0x43ae1c)[_0xc9fd('0x27')](_0x40ffa7);}return null;};}function patchUpdates(_0x574194){return function(_0x56ecbe){try{jsonpatch[_0xc9fd('0x2e')](_0x56ecbe,_0x574194,!![]);}catch(_0x218bc6){return BPromise[_0xc9fd('0x2f')](_0x218bc6);}return _0x56ecbe[_0xc9fd('0x30')]();};}function saveUpdates(_0x59a402,_0x37c5e7){return function(_0x19d1cb){if(_0x19d1cb){return _0x19d1cb[_0xc9fd('0x31')](_0x59a402)['then'](function(_0x5edff1){return _0x5edff1;});}return null;};}function removeEntity(_0xf5d6af,_0x18d89d){return function(_0x4ab16e){if(_0x4ab16e){return _0x4ab16e[_0xc9fd('0x32')]()[_0xc9fd('0x1b')](function(){_0xf5d6af['status'](0xcc)[_0xc9fd('0x26')]();});}};}function handleEntityNotFound(_0x3e598e,_0x4d6ad6){return function(_0x5e7bb9){if(!_0x5e7bb9){_0x3e598e[_0xc9fd('0x25')](0x194);}return _0x5e7bb9;};}function handleError(_0x3c3b54,_0x240947){_0x240947=_0x240947||0x1f4;return function(_0x381452){logger[_0xc9fd('0x20')](_0x381452[_0xc9fd('0x33')]);if(_0x381452[_0xc9fd('0x34')]){delete _0x381452[_0xc9fd('0x34')];}_0x3c3b54[_0xc9fd('0x35')](_0x240947)['send'](_0x381452);};}exports[_0xc9fd('0x36')]=function(_0x374685,_0x5592eb){var _0x51bfcb={},_0x2e53df={},_0x3a303f={'count':0x0,'rows':[]};var _0x37f8a1=_[_0xc9fd('0x37')](db[_0xc9fd('0x38')]['rawAttributes'],function(_0x2eda7a){return{'name':_0x2eda7a[_0xc9fd('0x39')],'type':_0x2eda7a['type'][_0xc9fd('0x3a')]};});_0x2e53df[_0xc9fd('0x3b')]=_[_0xc9fd('0x37')](_0x37f8a1,'name');_0x2e53df['query']=_[_0xc9fd('0x3c')](_0x374685[_0xc9fd('0x3d')]);_0x2e53df[_0xc9fd('0x3e')]=_[_0xc9fd('0x3f')](_0x2e53df[_0xc9fd('0x3b')],_0x2e53df[_0xc9fd('0x3d')]);_0x51bfcb[_0xc9fd('0x40')]=_[_0xc9fd('0x3f')](_0x2e53df['model'],qs['fields'](_0x374685[_0xc9fd('0x3d')][_0xc9fd('0x41')]));_0x51bfcb['attributes']=_0x51bfcb['attributes']['length']?_0x51bfcb[_0xc9fd('0x40')]:_0x2e53df[_0xc9fd('0x3b')];if(!_0x374685['query'][_0xc9fd('0x42')]('nolimit')){_0x51bfcb[_0xc9fd('0x2b')]=qs[_0xc9fd('0x2b')](_0x374685[_0xc9fd('0x3d')][_0xc9fd('0x2b')]);_0x51bfcb['offset']=qs[_0xc9fd('0x28')](_0x374685[_0xc9fd('0x3d')][_0xc9fd('0x28')]);}_0x51bfcb[_0xc9fd('0x43')]=qs[_0xc9fd('0x44')](_0x374685[_0xc9fd('0x3d')][_0xc9fd('0x44')]);_0x51bfcb['where']=qs[_0xc9fd('0x3e')](_[_0xc9fd('0x45')](_0x374685[_0xc9fd('0x3d')],_0x2e53df[_0xc9fd('0x3e')]),_0x37f8a1);if(_0x374685[_0xc9fd('0x3d')]['filter']){_0x51bfcb['where']=_[_0xc9fd('0x46')](_0x51bfcb[_0xc9fd('0x47')],{'$or':_[_0xc9fd('0x37')](_0x37f8a1,function(_0x11a125){if(_0x11a125[_0xc9fd('0x48')]!==_0xc9fd('0x49')){var _0x37b213={};_0x37b213[_0x11a125[_0xc9fd('0x34')]]={'$like':'%'+_0x374685[_0xc9fd('0x3d')]['filter']+'%'};return _0x37b213;}})});}_0x51bfcb=_[_0xc9fd('0x46')]({},_0x51bfcb,_0x374685[_0xc9fd('0x4a')]);var _0x1f0aa9={'where':_0x51bfcb['where']};return db['Setting']['count'](_0x1f0aa9)['then'](function(_0x3cff09){_0x3a303f[_0xc9fd('0x2a')]=_0x3cff09;if(_0x374685[_0xc9fd('0x3d')][_0xc9fd('0x4b')]){_0x51bfcb[_0xc9fd('0x4c')]=[{'all':!![]}];}return db[_0xc9fd('0x38')][_0xc9fd('0x4d')](_0x51bfcb);})[_0xc9fd('0x1b')](function(_0x3d7460){_0x3a303f[_0xc9fd('0x4e')]=_0x3d7460;return _0x3a303f;})[_0xc9fd('0x1b')](respondWithFilteredResult(_0x5592eb,_0x51bfcb))[_0xc9fd('0x24')](handleError(_0x5592eb,null));};exports[_0xc9fd('0x4f')]=function(_0x1f96fe,_0x20f2f1){var _0x42427e={'raw':![],'where':{'id':_0x1f96fe[_0xc9fd('0x50')]['id']}},_0x1ee818={};_0x1ee818[_0xc9fd('0x3b')]=_[_0xc9fd('0x3c')](db['Setting']['rawAttributes']);_0x1ee818['query']=_[_0xc9fd('0x3c')](_0x1f96fe[_0xc9fd('0x3d')]);_0x1ee818[_0xc9fd('0x3e')]=_[_0xc9fd('0x3f')](_0x1ee818['model'],_0x1ee818[_0xc9fd('0x3d')]);_0x42427e[_0xc9fd('0x40')]=_[_0xc9fd('0x3f')](_0x1ee818[_0xc9fd('0x3b')],qs[_0xc9fd('0x41')](_0x1f96fe[_0xc9fd('0x3d')][_0xc9fd('0x41')]));_0x42427e[_0xc9fd('0x40')]=_0x42427e[_0xc9fd('0x40')][_0xc9fd('0x51')]?_0x42427e[_0xc9fd('0x40')]:_0x1ee818[_0xc9fd('0x3b')];if(_0x1f96fe['query'][_0xc9fd('0x4b')]){_0x42427e[_0xc9fd('0x4c')]=[{'all':!![]}];}_0x42427e=_['merge']({},_0x42427e,_0x1f96fe[_0xc9fd('0x4a')]);return db[_0xc9fd('0x38')][_0xc9fd('0x52')](_0x42427e)[_0xc9fd('0x1b')](handleEntityNotFound(_0x20f2f1,null))[_0xc9fd('0x1b')](respondWithResult(_0x20f2f1,null))['catch'](handleError(_0x20f2f1,null));};exports[_0xc9fd('0x31')]=function(_0x2b2308,_0x5d4454){if(_0x2b2308['body']['id']){delete _0x2b2308['body']['id'];}return db['Setting']['find']({'where':{'id':_0x2b2308[_0xc9fd('0x50')]['id']}})[_0xc9fd('0x1b')](handleEntityNotFound(_0x5d4454,null))['then'](saveUpdates(_0x2b2308[_0xc9fd('0x53')],null))[_0xc9fd('0x1b')](respondWithResult(_0x5d4454,null))[_0xc9fd('0x24')](handleError(_0x5d4454,null));};exports[_0xc9fd('0x54')]=function(_0x147a11,_0x5055a0,_0x520d15){if(_0x147a11[_0xc9fd('0x55')]&&_0x147a11[_0xc9fd('0x55')][_0xc9fd('0x56')]){_0x147a11[_0xc9fd('0x53')][_0xc9fd('0x57')]=_0x147a11[_0xc9fd('0x55')][_0xc9fd('0x56')];}return db['Setting'][_0xc9fd('0x52')]({'where':{'id':_0x147a11[_0xc9fd('0x50')]['id']}})[_0xc9fd('0x1b')](handleEntityNotFound(_0x5055a0,null))['then'](saveUpdates(_0x147a11[_0xc9fd('0x53')],null))[_0xc9fd('0x1b')](respondWithResult(_0x5055a0,null))[_0xc9fd('0x24')](handleError(_0x5055a0,null));};exports[_0xc9fd('0x58')]=function(_0x5464c2,_0x1b0c81,_0x159525){if(_0x5464c2[_0xc9fd('0x55')]&&_0x5464c2[_0xc9fd('0x55')][_0xc9fd('0x56')]){_0x5464c2[_0xc9fd('0x53')][_0xc9fd('0x59')]=_0x5464c2[_0xc9fd('0x55')][_0xc9fd('0x56')];}return db[_0xc9fd('0x38')][_0xc9fd('0x52')]({'where':{'id':_0x5464c2[_0xc9fd('0x50')]['id']}})[_0xc9fd('0x1b')](handleEntityNotFound(_0x1b0c81,null))[_0xc9fd('0x1b')](saveUpdates(_0x5464c2[_0xc9fd('0x53')],null))[_0xc9fd('0x1b')](respondWithResult(_0x1b0c81,null))[_0xc9fd('0x24')](handleError(_0x1b0c81,null));};var utilLicense=require(_0xc9fd('0x5a'));exports[_0xc9fd('0x5b')]=function(_0x25572d,_0x1dbf79,_0x31ba15){var _0x50e8ee=_0xc9fd('0x5c');var _0x1bcfc8={'custom':![]};return utilLicense[_0xc9fd('0x5d')]()[_0xc9fd('0x1b')](function(_0x56b2bc){if(_0x56b2bc){_0x1bcfc8=_0x56b2bc;}return db[_0xc9fd('0x38')]['find']({'where':{'id':_0x25572d[_0xc9fd('0x50')]['id']},'attributes':['logo',_0xc9fd('0x59'),_0xc9fd('0x5e'),_0xc9fd('0x5f'),_0xc9fd('0x60'),_0xc9fd('0x61'),_0xc9fd('0x62'),_0xc9fd('0x63')],'raw':!![]});})['then'](handleEntityNotFound(_0x1dbf79,null))['then'](function(_0x41b06a){if(_0x41b06a){var _0x38410a=_0x41b06a['logo']&&fs[_0xc9fd('0x64')](path['join'](config['root'],_0x50e8ee,_[_0xc9fd('0x65')](_0x41b06a['logo'])))?path[_0xc9fd('0x66')](config[_0xc9fd('0x67')],_0x50e8ee,_[_0xc9fd('0x65')](_0x41b06a['logo'])):path['join'](config['root'],_0x50e8ee,_[_0xc9fd('0x65')]('default_logo.svg'));var _0x31f684='default'+_[_0xc9fd('0x68')](_0xc9fd('0x57'));if(_0x41b06a[_0x31f684]||!_0x1bcfc8[_0xc9fd('0x69')]){_0x38410a=path[_0xc9fd('0x66')](config[_0xc9fd('0x67')],_0x50e8ee,_[_0xc9fd('0x65')]('default_logo.svg'));}if(!fs[_0xc9fd('0x64')](_0x38410a)){throw new db[(_0xc9fd('0x6a'))]['ValidationError'](_['upperFirst'](_0xc9fd('0x57'))+_0xc9fd('0x6b'));}return _0x1dbf79[_0xc9fd('0x6c')](_0x38410a);}})[_0xc9fd('0x24')](handleError(_0x1dbf79,null));};var utilLicense=require(_0xc9fd('0x5a'));exports['getLogoLogin']=function(_0x5a150c,_0xc3de30,_0x2b0f0e){var _0x4780a8=_0xc9fd('0x5c');var _0x308987={'custom':![]};return utilLicense[_0xc9fd('0x5d')]()[_0xc9fd('0x1b')](function(_0x2fef90){if(_0x2fef90){_0x308987=_0x2fef90;}return db[_0xc9fd('0x38')]['find']({'where':{'id':_0x5a150c[_0xc9fd('0x50')]['id']},'attributes':[_0xc9fd('0x57'),_0xc9fd('0x59'),_0xc9fd('0x5e'),_0xc9fd('0x5f'),'defaultLogo',_0xc9fd('0x61'),_0xc9fd('0x62'),'defaultFavicon'],'raw':!![]});})[_0xc9fd('0x1b')](handleEntityNotFound(_0xc3de30,null))['then'](function(_0x2898f0){if(_0x2898f0){var _0x4b1487=_0x2898f0[_0xc9fd('0x59')]&&fs[_0xc9fd('0x64')](path['join'](config[_0xc9fd('0x67')],_0x4780a8,_[_0xc9fd('0x65')](_0x2898f0[_0xc9fd('0x59')])))?path[_0xc9fd('0x66')](config[_0xc9fd('0x67')],_0x4780a8,_[_0xc9fd('0x65')](_0x2898f0['loginLogo'])):path[_0xc9fd('0x66')](config[_0xc9fd('0x67')],_0x4780a8,_[_0xc9fd('0x65')](_0xc9fd('0x6d')));var _0x3b8fb6=_0xc9fd('0x6e')+_[_0xc9fd('0x68')]('loginLogo');if(_0x2898f0[_0x3b8fb6]||!_0x308987[_0xc9fd('0x69')]){_0x4b1487=path['join'](config[_0xc9fd('0x67')],_0x4780a8,_[_0xc9fd('0x65')]('default_loginLogo.svg'));}if(!fs[_0xc9fd('0x64')](_0x4b1487)){throw new db[(_0xc9fd('0x6a'))][(_0xc9fd('0x6f'))](_['upperFirst'](_0xc9fd('0x59'))+_0xc9fd('0x6b'));}return _0xc3de30[_0xc9fd('0x6c')](_0x4b1487);}})[_0xc9fd('0x24')](handleError(_0xc3de30,null));};exports[_0xc9fd('0x70')]=function(_0x24ef23,_0x44c0be){return db[_0xc9fd('0x38')][_0xc9fd('0x52')]({'where':{'id':_0x24ef23[_0xc9fd('0x50')]['id']},'attributes':['securePassword']})[_0xc9fd('0x1b')](respondWithResult(_0x44c0be,null))[_0xc9fd('0x24')](handleError(_0x44c0be,null));};exports[_0xc9fd('0x71')]=function(_0x50067b,_0x4d054b,_0x1c69cc){if(_0x50067b[_0xc9fd('0x55')]&&_0x50067b['file'][_0xc9fd('0x56')]){_0x50067b[_0xc9fd('0x53')][_0xc9fd('0x5e')]=_0x50067b[_0xc9fd('0x55')][_0xc9fd('0x56')];}return db['Setting'][_0xc9fd('0x52')]({'where':{'id':_0x50067b[_0xc9fd('0x50')]['id']}})['then'](handleEntityNotFound(_0x4d054b,null))['then'](saveUpdates(_0x50067b[_0xc9fd('0x53')],null))['then'](respondWithResult(_0x4d054b,null))[_0xc9fd('0x24')](handleError(_0x4d054b,null));};var utilLicense=require(_0xc9fd('0x5a'));exports[_0xc9fd('0x72')]=function(_0x278a89,_0x25b766,_0x5b5d6e){var _0x8c59cf=_0xc9fd('0x5c');var _0x24fc8a={'custom':![]};return utilLicense[_0xc9fd('0x5d')]()[_0xc9fd('0x1b')](function(_0x133774){if(_0x133774){_0x24fc8a=_0x133774;}return db['Setting'][_0xc9fd('0x52')]({'where':{'id':_0x278a89['params']['id']},'attributes':['logo',_0xc9fd('0x59'),_0xc9fd('0x5e'),_0xc9fd('0x5f'),_0xc9fd('0x60'),_0xc9fd('0x61'),_0xc9fd('0x62'),_0xc9fd('0x63')],'raw':!![]});})[_0xc9fd('0x1b')](handleEntityNotFound(_0x25b766,null))[_0xc9fd('0x1b')](function(_0x167aaa){if(_0x167aaa){var _0x5e588e=_0x167aaa[_0xc9fd('0x5e')]&&fs[_0xc9fd('0x64')](path[_0xc9fd('0x66')](config['root'],_0x8c59cf,_[_0xc9fd('0x65')](_0x167aaa[_0xc9fd('0x5e')])))?path[_0xc9fd('0x66')](config[_0xc9fd('0x67')],_0x8c59cf,_[_0xc9fd('0x65')](_0x167aaa['preferred'])):path['join'](config['root'],_0x8c59cf,_[_0xc9fd('0x65')](_0xc9fd('0x73')));var _0xeadc98=_0xc9fd('0x6e')+_[_0xc9fd('0x68')]('preferred');if(_0x167aaa[_0xeadc98]||!_0x24fc8a[_0xc9fd('0x69')]||!_0x24fc8a[_0xc9fd('0x5e')]){_0x5e588e=path[_0xc9fd('0x66')](config[_0xc9fd('0x67')],_0x8c59cf,_[_0xc9fd('0x65')]('default_preferred.png'));}if(!fs[_0xc9fd('0x64')](_0x5e588e)){throw new db['Sequelize'][(_0xc9fd('0x6f'))](_['upperFirst'](_0xc9fd('0x5e'))+_0xc9fd('0x6b'));}return _0x25b766[_0xc9fd('0x6c')](_0x5e588e);}})[_0xc9fd('0x24')](handleError(_0x25b766,null));};exports[_0xc9fd('0x74')]=function(_0x159034,_0x78f5b9,_0x4964f3){if(_0x159034['file']&&_0x159034[_0xc9fd('0x55')]['filename']){_0x159034['body'][_0xc9fd('0x5f')]=_0x159034[_0xc9fd('0x55')][_0xc9fd('0x56')];}return db[_0xc9fd('0x38')]['find']({'where':{'id':_0x159034[_0xc9fd('0x50')]['id']}})[_0xc9fd('0x1b')](handleEntityNotFound(_0x78f5b9,null))[_0xc9fd('0x1b')](saveUpdates(_0x159034[_0xc9fd('0x53')],null))[_0xc9fd('0x1b')](respondWithResult(_0x78f5b9,null))[_0xc9fd('0x24')](handleError(_0x78f5b9,null));};var utilLicense=require('../../config/license/util');exports[_0xc9fd('0x75')]=function(_0x407b64,_0x5e4fe5,_0x4597dc){var _0x1aa9e5=_0xc9fd('0x5c');var _0x56f573={'custom':![]};return utilLicense['getLicense']()[_0xc9fd('0x1b')](function(_0xdaaae2){if(_0xdaaae2){_0x56f573=_0xdaaae2;}return db[_0xc9fd('0x38')]['find']({'where':{'id':_0x407b64[_0xc9fd('0x50')]['id']},'attributes':['logo',_0xc9fd('0x59'),_0xc9fd('0x5e'),_0xc9fd('0x5f'),_0xc9fd('0x60'),_0xc9fd('0x61'),'defaultPreferred',_0xc9fd('0x63')],'raw':!![]});})[_0xc9fd('0x1b')](handleEntityNotFound(_0x5e4fe5,null))[_0xc9fd('0x1b')](function(_0x20b290){if(_0x20b290){var _0x2a6dc6=_0x20b290[_0xc9fd('0x5f')]&&fs[_0xc9fd('0x64')](path[_0xc9fd('0x66')](config[_0xc9fd('0x67')],_0x1aa9e5,_[_0xc9fd('0x65')](_0x20b290[_0xc9fd('0x5f')])))?path[_0xc9fd('0x66')](config[_0xc9fd('0x67')],_0x1aa9e5,_[_0xc9fd('0x65')](_0x20b290[_0xc9fd('0x5f')])):path['join'](config[_0xc9fd('0x67')],_0x1aa9e5,_['toLower'](_0xc9fd('0x76')));var _0x4fdcb0=_0xc9fd('0x6e')+_[_0xc9fd('0x68')](_0xc9fd('0x5f'));if(_0x20b290[_0x4fdcb0]||!_0x56f573['custom']){_0x2a6dc6=path['join'](config[_0xc9fd('0x67')],_0x1aa9e5,_[_0xc9fd('0x65')](_0xc9fd('0x76')));}if(!fs['existsSync'](_0x2a6dc6)){throw new db[(_0xc9fd('0x6a'))]['ValidationError'](_[_0xc9fd('0x68')](_0xc9fd('0x5f'))+'\x20not\x20found');}return _0x5e4fe5[_0xc9fd('0x6c')](_0x2a6dc6);}})[_0xc9fd('0x24')](handleError(_0x5e4fe5,null));};exports['getDate']=function(_0x5be5f,_0x52c65b){var _0x556f64={'offset':moment()[_0xc9fd('0x77')]()};_0x556f64[_0xc9fd('0x78')]=moment()[_0xc9fd('0x77')](_0x556f64[_0xc9fd('0x28')])[_0xc9fd('0x79')]('YYYY-MM-DD\x20HH:mm:ss:SSS');return _0x52c65b[_0xc9fd('0x35')](0xc8)['send'](_0x556f64);}; \ No newline at end of file diff --git a/server/api/setting/setting.model.js b/server/api/setting/setting.model.js index 79a86dd..c6deda9 100644 --- a/server/api/setting/setting.model.js +++ b/server/api/setting/setting.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xedd9=['../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./setting.attributes','exports','Setting','util'];(function(_0x15f09e,_0xbfdacc){var _0x54ff07=function(_0x3d5be6){while(--_0x3d5be6){_0x15f09e['push'](_0x15f09e['shift']());}};_0x54ff07(++_0xbfdacc);}(_0xedd9,0xfc));var _0x9edd=function(_0x33d353,_0x975f90){_0x33d353=_0x33d353-0x0;var _0x3b02ff=_0xedd9[_0x33d353];return _0x3b02ff;};'use strict';var _=require('lodash');var util=require(_0x9edd('0x0'));var logger=require(_0x9edd('0x1'))(_0x9edd('0x2'));var moment=require(_0x9edd('0x3'));var BPromise=require(_0x9edd('0x4'));var rp=require(_0x9edd('0x5'));var fs=require('fs');var path=require(_0x9edd('0x6'));var rimraf=require(_0x9edd('0x7'));var config=require('../../config/environment');var attributes=require(_0x9edd('0x8'));module[_0x9edd('0x9')]=function(_0x268f9e,_0x34c1a7){return _0x268f9e['define'](_0x9edd('0xa'),attributes,{'tableName':'settings','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x7217=['../../config/environment','./setting.attributes','exports','define','Setting','settings','lodash','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x29d623,_0x1a5c9c){var _0x242e59=function(_0x2c78ab){while(--_0x2c78ab){_0x29d623['push'](_0x29d623['shift']());}};_0x242e59(++_0x1a5c9c);}(_0x7217,0x19e));var _0x7721=function(_0x1b349a,_0x22222c){_0x1b349a=_0x1b349a-0x0;var _0x5d1f7c=_0x7217[_0x1b349a];return _0x5d1f7c;};'use strict';var _=require(_0x7721('0x0'));var util=require('util');var logger=require(_0x7721('0x1'))(_0x7721('0x2'));var moment=require(_0x7721('0x3'));var BPromise=require(_0x7721('0x4'));var rp=require(_0x7721('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x7721('0x6'));var attributes=require(_0x7721('0x7'));module[_0x7721('0x8')]=function(_0x3fe47c,_0xb239e0){return _0x3fe47c[_0x7721('0x9')](_0x7721('0xa'),attributes,{'tableName':_0x7721('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/setting/setting.rpc.js b/server/api/setting/setting.rpc.js index ad7c16b..eb3979e 100644 --- a/server/api/setting/setting.rpc.js +++ b/server/api/setting/setting.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0166=['../../config/environment','client','http','then','info','Setting,\x20%s,\x20%s','request\x20sent','debug','Setting,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','ShowSetting','Setting','find','options','raw','where','attributes','include','map','model','catch','util','ioredis','../../config/utils','../../config/logger','rpc'];(function(_0x271060,_0x3f86b1){var _0x40540b=function(_0x1735a7){while(--_0x1735a7){_0x271060['push'](_0x271060['shift']());}};_0x40540b(++_0x3f86b1);}(_0x0166,0x1bd));var _0x6016=function(_0x3f2e1f,_0x550427){_0x3f2e1f=_0x3f2e1f-0x0;var _0x3fa050=_0x0166[_0x3f2e1f];return _0x3fa050;};'use strict';var _=require('lodash');var util=require(_0x6016('0x0'));var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x6016('0x1'));var db=require('../../mysqldb')['db'];var utils=require(_0x6016('0x2'));var logger=require(_0x6016('0x3'))(_0x6016('0x4'));var config=require(_0x6016('0x5'));var jayson=require('jayson/promise');var client=jayson[_0x6016('0x6')][_0x6016('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x4e15e8,_0x8060f5,_0x103fda){return new BPromise(function(_0x4b7c64,_0x23eee5){return client['request'](_0x4e15e8,_0x103fda)[_0x6016('0x8')](function(_0x2e2e82){logger[_0x6016('0x9')](_0x6016('0xa'),_0x8060f5,_0x6016('0xb'));logger[_0x6016('0xc')](_0x6016('0xd'),_0x8060f5,_0x6016('0xb'),JSON[_0x6016('0xe')](_0x2e2e82));if(_0x2e2e82[_0x6016('0xf')]){if(_0x2e2e82['error'][_0x6016('0x10')]===0x1f4){logger['error'](_0x6016('0xa'),_0x8060f5,_0x2e2e82[_0x6016('0xf')][_0x6016('0x11')]);return _0x23eee5(_0x2e2e82[_0x6016('0xf')]['message']);}logger['error'](_0x6016('0xa'),_0x8060f5,_0x2e2e82[_0x6016('0xf')][_0x6016('0x11')]);return _0x4b7c64(_0x2e2e82['error'][_0x6016('0x11')]);}else{logger[_0x6016('0x9')](_0x6016('0xa'),_0x8060f5,'request\x20sent');_0x4b7c64(_0x2e2e82[_0x6016('0x12')]['message']);}})['catch'](function(_0x5eb515){logger[_0x6016('0xf')](_0x6016('0xa'),_0x8060f5,_0x5eb515);_0x23eee5(_0x5eb515);});});}exports[_0x6016('0x13')]=function(_0x183057){var _0x443cce=this;return new Promise(function(_0x2616c0,_0x3ec077){return db[_0x6016('0x14')][_0x6016('0x15')]({'raw':_0x183057[_0x6016('0x16')]?_0x183057[_0x6016('0x16')][_0x6016('0x17')]===undefined?!![]:![]:!![],'where':_0x183057[_0x6016('0x16')]?_0x183057[_0x6016('0x16')][_0x6016('0x18')]||null:null,'attributes':_0x183057[_0x6016('0x16')]?_0x183057['options'][_0x6016('0x19')]||null:null,'include':_0x183057[_0x6016('0x16')]?_0x183057[_0x6016('0x16')][_0x6016('0x1a')]?_[_0x6016('0x1b')](_0x183057[_0x6016('0x16')]['include'],function(_0x959b01){return{'model':db[_0x959b01[_0x6016('0x1c')]],'as':_0x959b01['as'],'attributes':_0x959b01[_0x6016('0x19')],'include':_0x959b01['include']?_[_0x6016('0x1b')](_0x959b01[_0x6016('0x1a')],function(_0x190e5d){return{'model':db[_0x190e5d[_0x6016('0x1c')]],'as':_0x190e5d['as'],'attributes':_0x190e5d[_0x6016('0x19')],'include':_0x190e5d['include']?_[_0x6016('0x1b')](_0x190e5d[_0x6016('0x1a')],function(_0x3eccf6){return{'model':db[_0x3eccf6[_0x6016('0x1c')]],'as':_0x3eccf6['as'],'attributes':_0x3eccf6[_0x6016('0x19')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x235c28){logger['info'](_0x6016('0x13'),_0x183057);logger['debug'](_0x6016('0x13'),_0x183057,JSON[_0x6016('0xe')](_0x235c28));_0x2616c0(_0x235c28);})[_0x6016('0x1d')](function(_0x144d7a){logger['error']('ShowSetting',_0x144d7a[_0x6016('0x11')],_0x183057);_0x3ec077(_0x443cce[_0x6016('0xf')](0x1f4,_0x144d7a[_0x6016('0x11')]));});});}; \ No newline at end of file +var _0x3cf4=['then','info','Setting,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','ShowSetting','Setting','find','options','raw','where','attributes','map','include','model','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request'];(function(_0x3875e5,_0x3c3306){var _0x31bb84=function(_0x2b1d42){while(--_0x2b1d42){_0x3875e5['push'](_0x3875e5['shift']());}};_0x31bb84(++_0x3c3306);}(_0x3cf4,0xbf));var _0x43cf=function(_0x4b6912,_0x7de2c5){_0x4b6912=_0x4b6912-0x0;var _0x54d1f8=_0x3cf4[_0x4b6912];return _0x54d1f8;};'use strict';var _=require(_0x43cf('0x0'));var util=require(_0x43cf('0x1'));var moment=require(_0x43cf('0x2'));var BPromise=require(_0x43cf('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x43cf('0x4'));var db=require(_0x43cf('0x5'))['db'];var utils=require(_0x43cf('0x6'));var logger=require(_0x43cf('0x7'))(_0x43cf('0x8'));var config=require(_0x43cf('0x9'));var jayson=require(_0x43cf('0xa'));var client=jayson[_0x43cf('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x108166,_0x4d1289,_0x320c32){return new BPromise(function(_0x29abd5,_0x306562){return client[_0x43cf('0xc')](_0x108166,_0x320c32)[_0x43cf('0xd')](function(_0xea44b7){logger[_0x43cf('0xe')](_0x43cf('0xf'),_0x4d1289,_0x43cf('0x10'));logger[_0x43cf('0x11')]('Setting,\x20%s,\x20%s,\x20%s',_0x4d1289,'request\x20sent',JSON[_0x43cf('0x12')](_0xea44b7));if(_0xea44b7[_0x43cf('0x13')]){if(_0xea44b7[_0x43cf('0x13')][_0x43cf('0x14')]===0x1f4){logger[_0x43cf('0x13')](_0x43cf('0xf'),_0x4d1289,_0xea44b7[_0x43cf('0x13')]['message']);return _0x306562(_0xea44b7['error'][_0x43cf('0x15')]);}logger['error'](_0x43cf('0xf'),_0x4d1289,_0xea44b7[_0x43cf('0x13')][_0x43cf('0x15')]);return _0x29abd5(_0xea44b7[_0x43cf('0x13')][_0x43cf('0x15')]);}else{logger[_0x43cf('0xe')](_0x43cf('0xf'),_0x4d1289,_0x43cf('0x10'));_0x29abd5(_0xea44b7[_0x43cf('0x16')][_0x43cf('0x15')]);}})[_0x43cf('0x17')](function(_0x1f3527){logger[_0x43cf('0x13')](_0x43cf('0xf'),_0x4d1289,_0x1f3527);_0x306562(_0x1f3527);});});}exports[_0x43cf('0x18')]=function(_0x497e50){var _0x1b5b52=this;return new Promise(function(_0x5a9e7d,_0x2d4f76){return db[_0x43cf('0x19')][_0x43cf('0x1a')]({'raw':_0x497e50['options']?_0x497e50[_0x43cf('0x1b')][_0x43cf('0x1c')]===undefined?!![]:![]:!![],'where':_0x497e50[_0x43cf('0x1b')]?_0x497e50[_0x43cf('0x1b')][_0x43cf('0x1d')]||null:null,'attributes':_0x497e50[_0x43cf('0x1b')]?_0x497e50[_0x43cf('0x1b')][_0x43cf('0x1e')]||null:null,'include':_0x497e50['options']?_0x497e50[_0x43cf('0x1b')]['include']?_[_0x43cf('0x1f')](_0x497e50[_0x43cf('0x1b')][_0x43cf('0x20')],function(_0x12164b){return{'model':db[_0x12164b['model']],'as':_0x12164b['as'],'attributes':_0x12164b[_0x43cf('0x1e')],'include':_0x12164b[_0x43cf('0x20')]?_[_0x43cf('0x1f')](_0x12164b[_0x43cf('0x20')],function(_0xc99cce){return{'model':db[_0xc99cce[_0x43cf('0x21')]],'as':_0xc99cce['as'],'attributes':_0xc99cce['attributes'],'include':_0xc99cce[_0x43cf('0x20')]?_[_0x43cf('0x1f')](_0xc99cce[_0x43cf('0x20')],function(_0x4ef02e){return{'model':db[_0x4ef02e[_0x43cf('0x21')]],'as':_0x4ef02e['as'],'attributes':_0x4ef02e['attributes']};}):[]};}):[]};}):[]:[]})[_0x43cf('0xd')](function(_0x2f4fd0){logger['info'](_0x43cf('0x18'),_0x497e50);logger[_0x43cf('0x11')]('ShowSetting',_0x497e50,JSON[_0x43cf('0x12')](_0x2f4fd0));_0x5a9e7d(_0x2f4fd0);})[_0x43cf('0x17')](function(_0x4faf5b){logger[_0x43cf('0x13')](_0x43cf('0x18'),_0x4faf5b['message'],_0x497e50);_0x2d4f76(_0x1b5b52[_0x43cf('0x13')](0x1f4,_0x4faf5b[_0x43cf('0x15')]));});});}; \ No newline at end of file diff --git a/server/api/smsAccount/index.js b/server/api/smsAccount/index.js index 4482e87..5683fd0 100644 --- a/server/api/smsAccount/index.js +++ b/server/api/smsAccount/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9957=['getInteractions','statusGet','/:id/users','getAgents','post','create','addDisposition','/:id/canned_answers','addAnswer','addApplications','/:id/status','status','addAgents','/:id','update','delete','destroy','removeDispositions','removeAnswers','removeAgents','exports','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./smsAccount.controller','get','isAuthenticated','index','/describe','describe','show','/:id/dispositions','getDispositions','getAnswers','/:id/applications','getApplications','/:id/interactions'];(function(_0x1e1509,_0x31b119){var _0x37106f=function(_0x286432){while(--_0x286432){_0x1e1509['push'](_0x1e1509['shift']());}};_0x37106f(++_0x31b119);}(_0x9957,0x93));var _0x7995=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0x9957[_0x2dafbe];return _0x58a45a;};'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/canned_answers',auth[_0x7995('0xa')](),controller[_0x7995('0x11')]);router['get'](_0x7995('0x12'),auth[_0x7995('0xa')](),controller[_0x7995('0x13')]);router[_0x7995('0x9')](_0x7995('0x14'),auth[_0x7995('0xa')](),controller[_0x7995('0x15')]);router['get']('/:id/status',controller[_0x7995('0x16')]);router[_0x7995('0x9')](_0x7995('0x17'),auth[_0x7995('0xa')](),controller[_0x7995('0x18')]);router[_0x7995('0x19')]('/',auth[_0x7995('0xa')](),controller[_0x7995('0x1a')]);router['post'](_0x7995('0xf'),auth['isAuthenticated'](),controller[_0x7995('0x1b')]);router[_0x7995('0x19')](_0x7995('0x1c'),auth[_0x7995('0xa')](),controller[_0x7995('0x1d')]);router[_0x7995('0x19')]('/:id/notify',controller['notify']);router[_0x7995('0x19')]('/:id/applications',auth['isAuthenticated'](),controller[_0x7995('0x1e')]);router[_0x7995('0x19')]('/:id/send',auth[_0x7995('0xa')](),controller['send']);router['post'](_0x7995('0x1f'),controller[_0x7995('0x20')]);router[_0x7995('0x19')](_0x7995('0x17'),auth[_0x7995('0xa')](),controller[_0x7995('0x21')]);router['put'](_0x7995('0x22'),auth[_0x7995('0xa')](),controller[_0x7995('0x23')]);router[_0x7995('0x24')](_0x7995('0x22'),auth[_0x7995('0xa')](),controller[_0x7995('0x25')]);router[_0x7995('0x24')]('/:id/dispositions',auth[_0x7995('0xa')](),controller[_0x7995('0x26')]);router[_0x7995('0x24')](_0x7995('0x1c'),auth[_0x7995('0xa')](),controller[_0x7995('0x27')]);router['delete'](_0x7995('0x17'),auth['isAuthenticated'](),controller[_0x7995('0x28')]);module[_0x7995('0x29')]=router; \ No newline at end of file +var _0x53ec=['send','status','update','delete','removeDispositions','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../config/environment','./smsAccount.controller','isAuthenticated','get','/describe','describe','/:id','show','/:id/dispositions','getDispositions','/:id/applications','getApplications','getInteractions','/:id/status','statusGet','/:id/users','getAgents','post','addDisposition','/:id/canned_answers','addAnswer','addApplications','/:id/send'];(function(_0x49e820,_0x441ec5){var _0x1f32ae=function(_0x39d699){while(--_0x39d699){_0x49e820['push'](_0x49e820['shift']());}};_0x1f32ae(++_0x441ec5);}(_0x53ec,0x192));var _0xc53e=function(_0x20025e,_0x44c8e1){_0x20025e=_0x20025e-0x0;var _0x4a5ac4=_0x53ec[_0x20025e];return _0x4a5ac4;};'use strict';var multer=require(_0xc53e('0x0'));var util=require(_0xc53e('0x1'));var path=require(_0xc53e('0x2'));var timeout=require(_0xc53e('0x3'));var express=require(_0xc53e('0x4'));var router=express[_0xc53e('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0xc53e('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0xc53e('0x7'));var controller=require(_0xc53e('0x8'));router['get']('/',auth[_0xc53e('0x9')](),controller['index']);router[_0xc53e('0xa')](_0xc53e('0xb'),auth['isAuthenticated'](),controller[_0xc53e('0xc')]);router[_0xc53e('0xa')](_0xc53e('0xd'),auth[_0xc53e('0x9')](),controller[_0xc53e('0xe')]);router[_0xc53e('0xa')](_0xc53e('0xf'),auth[_0xc53e('0x9')](),controller[_0xc53e('0x10')]);router['get']('/:id/canned_answers',auth[_0xc53e('0x9')](),controller['getAnswers']);router['get'](_0xc53e('0x11'),auth[_0xc53e('0x9')](),controller[_0xc53e('0x12')]);router[_0xc53e('0xa')]('/:id/interactions',auth['isAuthenticated'](),controller[_0xc53e('0x13')]);router[_0xc53e('0xa')](_0xc53e('0x14'),controller[_0xc53e('0x15')]);router[_0xc53e('0xa')](_0xc53e('0x16'),auth[_0xc53e('0x9')](),controller[_0xc53e('0x17')]);router[_0xc53e('0x18')]('/',auth[_0xc53e('0x9')](),controller['create']);router[_0xc53e('0x18')](_0xc53e('0xf'),auth[_0xc53e('0x9')](),controller[_0xc53e('0x19')]);router[_0xc53e('0x18')](_0xc53e('0x1a'),auth[_0xc53e('0x9')](),controller[_0xc53e('0x1b')]);router[_0xc53e('0x18')]('/:id/notify',controller['notify']);router[_0xc53e('0x18')](_0xc53e('0x11'),auth[_0xc53e('0x9')](),controller[_0xc53e('0x1c')]);router[_0xc53e('0x18')](_0xc53e('0x1d'),auth[_0xc53e('0x9')](),controller[_0xc53e('0x1e')]);router[_0xc53e('0x18')](_0xc53e('0x14'),controller[_0xc53e('0x1f')]);router[_0xc53e('0x18')](_0xc53e('0x16'),auth['isAuthenticated'](),controller['addAgents']);router['put'](_0xc53e('0xd'),auth[_0xc53e('0x9')](),controller[_0xc53e('0x20')]);router[_0xc53e('0x21')](_0xc53e('0xd'),auth['isAuthenticated'](),controller['destroy']);router[_0xc53e('0x21')]('/:id/dispositions',auth[_0xc53e('0x9')](),controller[_0xc53e('0x22')]);router[_0xc53e('0x21')](_0xc53e('0x1a'),auth[_0xc53e('0x9')](),controller['removeAnswers']);router[_0xc53e('0x21')]('/:id/users',auth['isAuthenticated'](),controller['removeAgents']);module[_0xc53e('0x23')]=router; \ No newline at end of file diff --git a/server/api/smsAccount/smsAccount.attributes.js b/server/api/smsAccount/smsAccount.attributes.js index e594531..e549e80 100644 --- a/server/api/smsAccount/smsAccount.attributes.js +++ b/server/api/smsAccount/smsAccount.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8c62=['intelepeer','BOOLEAN','TEXT','Account:\x20{{account.name}}
{{#queue}}Queue:\x20{{queue.name}}
{{/queue}}From\x20:\x20{{from}}','INTEGER','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','mandatoryDispositionPauseId','setDataValue','sequelize','randomstring','exports','STRING','ENUM','twilio','skebby','connectel','clicksend','plivo','clickatell','csc','infobip'];(function(_0x46a7f0,_0x598179){var _0x11e2a1=function(_0x46aaa8){while(--_0x46aaa8){_0x46a7f0['push'](_0x46a7f0['shift']());}};_0x11e2a1(++_0x598179);}(_0x8c62,0x111));var _0x28c6=function(_0x4bcbcd,_0x172890){_0x4bcbcd=_0x4bcbcd-0x0;var _0x16b6c5=_0x8c62[_0x4bcbcd];return _0x16b6c5;};'use strict';var Sequelize=require(_0x28c6('0x0'));var rs=require(_0x28c6('0x1'));module[_0x28c6('0x2')]={'name':{'type':Sequelize['STRING'],'unique':'name','allowNull':![]},'key':{'type':Sequelize[_0x28c6('0x3')],'allowNull':![]},'remote':{'type':Sequelize[_0x28c6('0x3')],'allowNull':![]},'token':{'type':Sequelize['STRING'],'defaultValue':function(){return rs['generate']();}},'phone':{'type':Sequelize[_0x28c6('0x3')]},'type':{'type':Sequelize[_0x28c6('0x4')](_0x28c6('0x5'),_0x28c6('0x6'),_0x28c6('0x7'),_0x28c6('0x8'),_0x28c6('0x9'),_0x28c6('0xa'),'bandwidth',_0x28c6('0xb'),_0x28c6('0xc'),_0x28c6('0xd'))},'accountSid':{'type':Sequelize[_0x28c6('0x3')]},'authId':{'type':Sequelize[_0x28c6('0x3')]},'authToken':{'type':Sequelize['STRING']},'smsMethod':{'type':Sequelize[_0x28c6('0x4')]('SI','TI','GP')},'username':{'type':Sequelize[_0x28c6('0x3')]},'password':{'type':Sequelize[_0x28c6('0x3')]},'apiKey':{'type':Sequelize[_0x28c6('0x3')]},'applicationId':{'type':Sequelize[_0x28c6('0x3')]},'accountId':{'type':Sequelize['STRING']},'senderString':{'type':Sequelize[_0x28c6('0x3')]},'deliveryReport':{'type':Sequelize[_0x28c6('0xe')],'defaultValue':![]},'description':{'type':Sequelize[_0x28c6('0x3')]},'notificationTemplate':{'type':Sequelize[_0x28c6('0xf')],'defaultValue':function(){return _0x28c6('0x10');}},'notificationSound':{'type':Sequelize[_0x28c6('0xe')],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x28c6('0xe')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize[_0x28c6('0xe')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x28c6('0x11')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x28c6('0xe')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x28c6('0x11')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'baseUrl':{'type':Sequelize[_0x28c6('0x3')]},'mandatoryDispositionPauseId':{'type':Sequelize[_0x28c6('0x11')],'comment':_0x28c6('0x12')},'mandatoryDisposition':{'type':Sequelize[_0x28c6('0xe')],'defaultValue':![],'comment':_0x28c6('0x13'),'set':function(_0x277634){if(!_0x277634)this['setDataValue'](_0x28c6('0x14'),null);this[_0x28c6('0x15')]('mandatoryDisposition',_0x277634);}}}; \ No newline at end of file +var _0x7461=['TEXT','Account:\x20{{account.name}}
{{#queue}}Queue:\x20{{queue.name}}
{{/queue}}From\x20:\x20{{from}}','INTEGER','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','setDataValue','mandatoryDispositionPauseId','mandatoryDisposition','sequelize','randomstring','exports','STRING','name','generate','ENUM','twilio','skebby','plivo','clickatell','bandwidth','csc','infobip','intelepeer','BOOLEAN'];(function(_0x5ec61d,_0x36c73c){var _0x2e0e5c=function(_0x1da225){while(--_0x1da225){_0x5ec61d['push'](_0x5ec61d['shift']());}};_0x2e0e5c(++_0x36c73c);}(_0x7461,0x80));var _0x1746=function(_0x1d5ba8,_0x412a52){_0x1d5ba8=_0x1d5ba8-0x0;var _0x1022a2=_0x7461[_0x1d5ba8];return _0x1022a2;};'use strict';var Sequelize=require(_0x1746('0x0'));var rs=require(_0x1746('0x1'));module[_0x1746('0x2')]={'name':{'type':Sequelize[_0x1746('0x3')],'unique':_0x1746('0x4'),'allowNull':![]},'key':{'type':Sequelize[_0x1746('0x3')],'allowNull':![]},'remote':{'type':Sequelize[_0x1746('0x3')],'allowNull':![]},'token':{'type':Sequelize['STRING'],'defaultValue':function(){return rs[_0x1746('0x5')]();}},'phone':{'type':Sequelize[_0x1746('0x3')]},'type':{'type':Sequelize[_0x1746('0x6')](_0x1746('0x7'),_0x1746('0x8'),'connectel','clicksend',_0x1746('0x9'),_0x1746('0xa'),_0x1746('0xb'),_0x1746('0xc'),_0x1746('0xd'),_0x1746('0xe'))},'accountSid':{'type':Sequelize[_0x1746('0x3')]},'authId':{'type':Sequelize[_0x1746('0x3')]},'authToken':{'type':Sequelize[_0x1746('0x3')]},'smsMethod':{'type':Sequelize[_0x1746('0x6')]('SI','TI','GP')},'username':{'type':Sequelize[_0x1746('0x3')]},'password':{'type':Sequelize[_0x1746('0x3')]},'apiKey':{'type':Sequelize['STRING']},'applicationId':{'type':Sequelize[_0x1746('0x3')]},'accountId':{'type':Sequelize['STRING']},'senderString':{'type':Sequelize[_0x1746('0x3')]},'deliveryReport':{'type':Sequelize[_0x1746('0xf')],'defaultValue':![]},'description':{'type':Sequelize['STRING']},'notificationTemplate':{'type':Sequelize[_0x1746('0x10')],'defaultValue':function(){return _0x1746('0x11');}},'notificationSound':{'type':Sequelize[_0x1746('0xf')],'defaultValue':!![]},'notificationShake':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0x1746('0x12')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize[_0x1746('0xf')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x1746('0xf')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x1746('0x12')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'baseUrl':{'type':Sequelize[_0x1746('0x3')]},'mandatoryDispositionPauseId':{'type':Sequelize[_0x1746('0x12')],'comment':_0x1746('0x13')},'mandatoryDisposition':{'type':Sequelize[_0x1746('0xf')],'defaultValue':![],'comment':_0x1746('0x14'),'set':function(_0x10793f){if(!_0x10793f)this[_0x1746('0x15')](_0x1746('0x16'),null);this['setDataValue'](_0x1746('0x17'),_0x10793f);}}}; \ No newline at end of file diff --git a/server/api/smsAccount/smsAccount.controller.js b/server/api/smsAccount/smsAccount.controller.js index 8e1afea..ae4c900 100644 --- a/server/api/smsAccount/smsAccount.controller.js +++ b/server/api/smsAccount/smsAccount.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1674=['CmContact','Sequelize','difference','updatedAt','createdAt','CompanyId','ListId','mobile','twilio','from','From','Body','messageId','MessageSid','connectel','message_id','Text','MessageUUID','infobip','results','csc','originatingAddress','segmentedMessage','clickatell','fromNumber','replyMessageId','bandwidth','text','intelepeer','refid','isNil','ValidationError','from\x20is\x20mandatory','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','CmList','Contacts','list','omit','contact','SmsInteraction','spread','interaction','created','autoclose','close','unmanaged','*,*,*,*','SmsMessage','UserId','unshift','waitForTheAssignedAgent','Start','startRouting','receiveMessage','SmsAccount,\x20%s,\x20%s,\x20%s,\x20%s','entity\x20found','set','text/xml','\x0a','addApplications','sequelize','transaction','SmsApplication','findAndCountAll','getApplications','getInteractions','Contact','User','Owner','internal','Tag','Tags','color','tag','to\x20is\x20mandatory','List','DESC','out','Messages','dataValues','push','inspect','skebby','requestid','statusInt','clicksend','status_code','DELIVERED','groupName','redif','error_code','DELIVERED_TO_GATEWAY','message-delivered','DELIVRD','ACCEPTD','statusGet','received\x20delivery\x20report\x20from','message-id','state','addAgents','emit','userSmsAccount:save','removeAgents','isArray','userSmsAccount:remove','getAgents','rimraf','zip-dir','bluebird','mustache','util','path','sox','ejs','lodash','squel','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','defaults','localhost','socket.io-emitter','redis','register','jayson/promise','client','then','info','SmsAccount,\x20%s,\x20%s','debug','SmsAccount,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','sendStatus','status','end','json','offset','undefined','limit','count','Content-Range','reject','save','update','destroy','SmsAccounts','UserProfileResource','stack','name','send','index','Pause','mandatoryDispositionPause','map','SmsAccount','rawAttributes','fieldName','type','query','keys','intersection','attributes','model','fields','length','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','VIRTUAL','merge','options','include','rows','show','params','includeAll','find','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','get','UserProfileSection','userProfileId','autoAssociation','create','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','addDisposition','Disposition','getDispositions','findOne','SmsAccountId','removeDispositions','ids','addAnswer','getAnswers','CannedAnswer','findAll','removeAnswers','Applications','account','applications','orderBy','asc'];(function(_0x58e469,_0x95ee3e){var _0x4c01c5=function(_0x1ef7ae){while(--_0x1ef7ae){_0x58e469['push'](_0x58e469['shift']());}};_0x4c01c5(++_0x95ee3e);}(_0x1674,0x6e));var _0x4167=function(_0x37fa39,_0x3656d1){_0x37fa39=_0x37fa39-0x0;var _0x344b41=_0x1674[_0x37fa39];return _0x344b41;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x4167('0x0'));var zipdir=require(_0x4167('0x1'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x4167('0x2'));var Mustache=require(_0x4167('0x3'));var util=require(_0x4167('0x4'));var path=require(_0x4167('0x5'));var sox=require(_0x4167('0x6'));var csv=require('to-csv');var ejs=require(_0x4167('0x7'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x4167('0x8'));var squel=require(_0x4167('0x9'));var crypto=require('crypto');var jsforce=require(_0x4167('0xa'));var deskjs=require(_0x4167('0xb'));var toCsv=require(_0x4167('0xc'));var querystring=require(_0x4167('0xd'));var Papa=require(_0x4167('0xe'));var Redis=require(_0x4167('0xf'));var authService=require('../../components/auth/service');var qs=require(_0x4167('0x10'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x4167('0x11'))(_0x4167('0x12'));var utils=require(_0x4167('0x13'));var config=require('../../config/environment');var licenseUtil=require(_0x4167('0x14'));var db=require(_0x4167('0x15'))['db'];config['redis']=_[_0x4167('0x16')](config['redis'],{'host':_0x4167('0x17'),'port':0x18eb});var socket=require(_0x4167('0x18'))(new Redis(config[_0x4167('0x19')]));require('./smsAccount.socket')[_0x4167('0x1a')](socket);var jayson=require(_0x4167('0x1b'));var client=jayson[_0x4167('0x1c')]['http']({'port':0x232c});function respondWithRpcPromise(_0x54f4a5,_0xe68da,_0x3a7594,_0x2995e5){return new BPromise(function(_0x2b3a21,_0x13b38a){var _0x14348a=_0x2995e5||client;return _0x14348a['request'](_0x54f4a5,_0x3a7594)[_0x4167('0x1d')](function(_0x3de49d){logger[_0x4167('0x1e')](_0x4167('0x1f'),_0xe68da,'request\x20sent');logger[_0x4167('0x20')](_0x4167('0x21'),_0xe68da,_0x4167('0x22'),JSON[_0x4167('0x23')](_0x3de49d));if(_0x3de49d[_0x4167('0x24')]){if(_0x3de49d[_0x4167('0x24')][_0x4167('0x25')]===0x1f4){logger['error'](_0x4167('0x1f'),_0xe68da,_0x3de49d[_0x4167('0x24')][_0x4167('0x26')]);return _0x13b38a(_0x3de49d[_0x4167('0x24')][_0x4167('0x26')]);}logger[_0x4167('0x24')]('SmsAccount,\x20%s,\x20%s',_0xe68da,_0x3de49d[_0x4167('0x24')]['message']);return _0x2b3a21(_0x3de49d[_0x4167('0x24')][_0x4167('0x26')]);}else{logger[_0x4167('0x1e')]('SmsAccount,\x20%s,\x20%s',_0xe68da,_0x4167('0x22'));_0x2b3a21(_0x3de49d[_0x4167('0x27')][_0x4167('0x26')]);}})[_0x4167('0x28')](function(_0x9d7cc0){logger[_0x4167('0x24')](_0x4167('0x1f'),_0xe68da,_0x9d7cc0);_0x13b38a(_0x9d7cc0);});});}function respondWithStatusCode(_0x387033,_0x508dfc){_0x508dfc=_0x508dfc||0xcc;return function(_0x2e1ed6){if(_0x2e1ed6){return _0x387033[_0x4167('0x29')](_0x508dfc);}return _0x387033[_0x4167('0x2a')](_0x508dfc)[_0x4167('0x2b')]();};}function respondWithResult(_0x26080c,_0x2dc1ac){_0x2dc1ac=_0x2dc1ac||0xc8;return function(_0x1ff570){if(_0x1ff570){return _0x26080c[_0x4167('0x2a')](_0x2dc1ac)[_0x4167('0x2c')](_0x1ff570);}};}function respondWithFilteredResult(_0x11a2ec,_0x4cee04){return function(_0x584790){if(_0x584790){var _0x32d6ef=typeof _0x4cee04[_0x4167('0x2d')]===_0x4167('0x2e')&&typeof _0x4cee04[_0x4167('0x2f')]===_0x4167('0x2e');var _0x3a5a0d=_0x584790[_0x4167('0x30')];var _0x46400e=_0x32d6ef?0x0:_0x4cee04[_0x4167('0x2d')];var _0x497d54=_0x32d6ef?_0x584790[_0x4167('0x30')]:_0x4cee04[_0x4167('0x2d')]+_0x4cee04[_0x4167('0x2f')];var _0x2fa719;if(_0x497d54>=_0x3a5a0d){_0x497d54=_0x3a5a0d;_0x2fa719=0xc8;}else{_0x2fa719=0xce;}_0x11a2ec[_0x4167('0x2a')](_0x2fa719);return _0x11a2ec['set'](_0x4167('0x31'),_0x46400e+'-'+_0x497d54+'/'+_0x3a5a0d)[_0x4167('0x2c')](_0x584790);}return null;};}function patchUpdates(_0x1613e6){return function(_0x505e7f){try{jsonpatch['apply'](_0x505e7f,_0x1613e6,!![]);}catch(_0x4305a2){return BPromise[_0x4167('0x32')](_0x4305a2);}return _0x505e7f[_0x4167('0x33')]();};}function saveUpdates(_0x4ecff0,_0x535762){return function(_0x5bdd18){if(_0x5bdd18){return _0x5bdd18[_0x4167('0x34')](_0x4ecff0)[_0x4167('0x1d')](function(_0x585790){return _0x585790;});}return null;};}function removeEntity(_0x41d774,_0x386850){return function(_0x53aa79){if(_0x53aa79){return _0x53aa79[_0x4167('0x35')]()[_0x4167('0x1d')](function(){var _0x104455=_0x53aa79['get']({'plain':!![]});var _0x25d79=_0x4167('0x36');return db[_0x4167('0x37')]['destroy']({'where':{'type':_0x25d79,'resourceId':_0x104455['id']}})[_0x4167('0x1d')](function(){return _0x53aa79;});})[_0x4167('0x1d')](function(){_0x41d774[_0x4167('0x2a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x22e214,_0xd25557){return function(_0x62db40){if(!_0x62db40){_0x22e214[_0x4167('0x29')](0x194);}return _0x62db40;};}function handleError(_0x97037,_0x44156c){_0x44156c=_0x44156c||0x1f4;return function(_0x2c7849){logger['error'](_0x2c7849[_0x4167('0x38')]);if(_0x2c7849['name']){delete _0x2c7849[_0x4167('0x39')];}_0x97037['status'](_0x44156c)[_0x4167('0x3a')](_0x2c7849);};}exports[_0x4167('0x3b')]=function(_0x416ebe,_0x3a2634){var _0x8c7f02={'include':[{'model':db[_0x4167('0x3c')],'as':_0x4167('0x3d')}]},_0x459a10={},_0x575bf5={'count':0x0,'rows':[]};var _0x10c8b8=_[_0x4167('0x3e')](db[_0x4167('0x3f')][_0x4167('0x40')],function(_0x2186d9){return{'name':_0x2186d9[_0x4167('0x41')],'type':_0x2186d9[_0x4167('0x42')]['key']};});_0x459a10['model']=_['map'](_0x10c8b8,_0x4167('0x39'));_0x459a10[_0x4167('0x43')]=_[_0x4167('0x44')](_0x416ebe['query']);_0x459a10['filters']=_[_0x4167('0x45')](_0x459a10['model'],_0x459a10['query']);_0x8c7f02[_0x4167('0x46')]=_['intersection'](_0x459a10[_0x4167('0x47')],qs[_0x4167('0x48')](_0x416ebe[_0x4167('0x43')]['fields']));_0x8c7f02[_0x4167('0x46')]=_0x8c7f02['attributes'][_0x4167('0x49')]?_0x8c7f02[_0x4167('0x46')]:_0x459a10[_0x4167('0x47')];if(!_0x416ebe[_0x4167('0x43')][_0x4167('0x4a')](_0x4167('0x4b'))){_0x8c7f02['limit']=qs[_0x4167('0x2f')](_0x416ebe[_0x4167('0x43')][_0x4167('0x2f')]);_0x8c7f02[_0x4167('0x2d')]=qs[_0x4167('0x2d')](_0x416ebe[_0x4167('0x43')][_0x4167('0x2d')]);}_0x8c7f02[_0x4167('0x4c')]=qs[_0x4167('0x4d')](_0x416ebe[_0x4167('0x43')]['sort']);_0x8c7f02[_0x4167('0x4e')]=qs[_0x4167('0x4f')](_[_0x4167('0x50')](_0x416ebe[_0x4167('0x43')],_0x459a10[_0x4167('0x4f')]),_0x10c8b8);if(_0x416ebe['query'][_0x4167('0x51')]){_0x8c7f02[_0x4167('0x4e')]=_['merge'](_0x8c7f02[_0x4167('0x4e')],{'$or':_[_0x4167('0x3e')](_0x10c8b8,function(_0x289edb){if(_0x289edb[_0x4167('0x42')]!==_0x4167('0x52')){var _0x322206={};_0x322206[_0x289edb[_0x4167('0x39')]]={'$like':'%'+_0x416ebe[_0x4167('0x43')][_0x4167('0x51')]+'%'};return _0x322206;}})});}_0x8c7f02=_[_0x4167('0x53')]({},_0x8c7f02,_0x416ebe[_0x4167('0x54')]);var _0x405816={'where':_0x8c7f02[_0x4167('0x4e')]};return db[_0x4167('0x3f')]['count'](_0x405816)[_0x4167('0x1d')](function(_0x2b65b8){_0x575bf5[_0x4167('0x30')]=_0x2b65b8;if(_0x416ebe[_0x4167('0x43')]['includeAll']){_0x8c7f02[_0x4167('0x55')]=[{'all':!![]}];}return db[_0x4167('0x3f')]['findAll'](_0x8c7f02);})[_0x4167('0x1d')](function(_0x21be71){_0x575bf5[_0x4167('0x56')]=_0x21be71;return _0x575bf5;})['then'](respondWithFilteredResult(_0x3a2634,_0x8c7f02))[_0x4167('0x28')](handleError(_0x3a2634,null));};exports[_0x4167('0x57')]=function(_0x283158,_0x242fae){var _0x5c6b8f={'raw':![],'where':{'id':_0x283158[_0x4167('0x58')]['id']},'include':[{'model':db['Pause'],'as':'mandatoryDispositionPause'}]},_0x197e6a={};_0x197e6a['model']=_[_0x4167('0x44')](db[_0x4167('0x3f')][_0x4167('0x40')]);_0x197e6a[_0x4167('0x43')]=_[_0x4167('0x44')](_0x283158[_0x4167('0x43')]);_0x197e6a[_0x4167('0x4f')]=_[_0x4167('0x45')](_0x197e6a['model'],_0x197e6a[_0x4167('0x43')]);_0x5c6b8f['attributes']=_['intersection'](_0x197e6a['model'],qs[_0x4167('0x48')](_0x283158[_0x4167('0x43')][_0x4167('0x48')]));_0x5c6b8f[_0x4167('0x46')]=_0x5c6b8f[_0x4167('0x46')][_0x4167('0x49')]?_0x5c6b8f[_0x4167('0x46')]:_0x197e6a['model'];if(_0x283158[_0x4167('0x43')][_0x4167('0x59')]){_0x5c6b8f[_0x4167('0x55')]=[{'all':!![]}];}_0x5c6b8f=_[_0x4167('0x53')]({},_0x5c6b8f,_0x283158[_0x4167('0x54')]);return db[_0x4167('0x3f')][_0x4167('0x5a')](_0x5c6b8f)[_0x4167('0x1d')](handleEntityNotFound(_0x242fae,null))['then'](respondWithResult(_0x242fae,null))[_0x4167('0x28')](handleError(_0x242fae,null));};exports['create']=function(_0x195cdb,_0xdbf2db){return db[_0x4167('0x3f')]['create'](_0x195cdb[_0x4167('0x5b')],{})[_0x4167('0x1d')](function(_0x3a15c6){var _0x21291c=_0x195cdb[_0x4167('0x5c')]['get']({'plain':!![]});if(!_0x21291c)throw new Error(_0x4167('0x5d'));if(_0x21291c[_0x4167('0x5e')]===_0x4167('0x5c')){var _0xc57bd8=_0x3a15c6[_0x4167('0x5f')]({'plain':!![]});var _0x3f4d9c=_0x4167('0x36');return db[_0x4167('0x60')]['find']({'where':{'name':_0x3f4d9c,'userProfileId':_0x21291c[_0x4167('0x61')]},'raw':!![]})['then'](function(_0x3ab082){if(_0x3ab082&&_0x3ab082[_0x4167('0x62')]===0x0){return db['UserProfileResource'][_0x4167('0x63')]({'name':_0xc57bd8[_0x4167('0x39')],'resourceId':_0xc57bd8['id'],'type':_0x3ab082[_0x4167('0x39')],'sectionId':_0x3ab082['id']},{})[_0x4167('0x1d')](function(){return _0x3a15c6;});}else{return _0x3a15c6;}})[_0x4167('0x28')](function(_0x5b92eb){logger[_0x4167('0x24')](_0x4167('0x64'),_0x5b92eb);throw _0x5b92eb;});}return _0x3a15c6;})['then'](respondWithResult(_0xdbf2db,0xc9))['catch'](handleError(_0xdbf2db,null));};exports['update']=function(_0x4ebb78,_0x438d53){if(_0x4ebb78[_0x4167('0x5b')]['id']){delete _0x4ebb78['body']['id'];}return db[_0x4167('0x3f')][_0x4167('0x5a')]({'where':{'id':_0x4ebb78[_0x4167('0x58')]['id']},'include':[{'model':db[_0x4167('0x3c')],'as':_0x4167('0x3d')}]})[_0x4167('0x1d')](handleEntityNotFound(_0x438d53,null))['then'](saveUpdates(_0x4ebb78['body'],null))[_0x4167('0x1d')](respondWithResult(_0x438d53,null))[_0x4167('0x28')](handleError(_0x438d53,null));};exports['destroy']=function(_0x5834e4,_0x1ed33d){return db[_0x4167('0x3f')][_0x4167('0x5a')]({'where':{'id':_0x5834e4[_0x4167('0x58')]['id']}})[_0x4167('0x1d')](handleEntityNotFound(_0x1ed33d,null))[_0x4167('0x1d')](removeEntity(_0x1ed33d,null))[_0x4167('0x28')](handleError(_0x1ed33d,null));};exports['describe']=function(_0x5ad79a,_0x1dd483){return db['SmsAccount'][_0x4167('0x65')]()['then'](respondWithResult(_0x1dd483,null))['catch'](handleError(_0x1dd483,null));};exports[_0x4167('0x66')]=function(_0x5d530f,_0x3213ab,_0x2820b0){if(_0x5d530f[_0x4167('0x5b')]['id']){delete _0x5d530f[_0x4167('0x5b')]['id'];}return db[_0x4167('0x3f')]['find']({'where':{'id':_0x5d530f[_0x4167('0x58')]['id']}})[_0x4167('0x1d')](handleEntityNotFound(_0x3213ab,null))[_0x4167('0x1d')](function(_0x4c6d92){if(_0x4c6d92){_0x5d530f['body']['SmsAccountId']=_0x4c6d92['id'];return db[_0x4167('0x67')][_0x4167('0x63')](_0x5d530f['body']);}})[_0x4167('0x1d')](respondWithResult(_0x3213ab,null))[_0x4167('0x28')](handleError(_0x3213ab,null));};exports[_0x4167('0x68')]=function(_0x5a47e7,_0xde944b,_0x2fc78c){var _0x130b71={'raw':![],'where':{}};var _0x6c3d6f={};var _0x528a34={'count':0x0,'rows':[]};return db[_0x4167('0x3f')][_0x4167('0x69')]({'where':{'id':_0x5a47e7[_0x4167('0x58')]['id']}})[_0x4167('0x1d')](handleEntityNotFound(_0xde944b,null))[_0x4167('0x1d')](function(_0x16c114){if(_0x16c114){_0x6c3d6f[_0x4167('0x47')]=_['keys'](db[_0x4167('0x67')][_0x4167('0x40')]);_0x6c3d6f[_0x4167('0x43')]=_[_0x4167('0x44')](_0x5a47e7[_0x4167('0x43')]);_0x6c3d6f['filters']=_[_0x4167('0x45')](_0x6c3d6f[_0x4167('0x47')],_0x6c3d6f[_0x4167('0x43')]);_0x130b71[_0x4167('0x46')]=_[_0x4167('0x45')](_0x6c3d6f[_0x4167('0x47')],qs[_0x4167('0x48')](_0x5a47e7[_0x4167('0x43')][_0x4167('0x48')]));_0x130b71['attributes']=_0x130b71[_0x4167('0x46')][_0x4167('0x49')]?_0x130b71[_0x4167('0x46')]:_0x6c3d6f[_0x4167('0x47')];if(!_0x5a47e7['query'][_0x4167('0x4a')]('nolimit')){_0x130b71['limit']=qs[_0x4167('0x2f')](_0x5a47e7[_0x4167('0x43')][_0x4167('0x2f')]);_0x130b71[_0x4167('0x2d')]=qs[_0x4167('0x2d')](_0x5a47e7['query'][_0x4167('0x2d')]);}_0x130b71[_0x4167('0x4c')]=qs[_0x4167('0x4d')](_0x5a47e7[_0x4167('0x43')][_0x4167('0x4d')]);_0x130b71[_0x4167('0x4e')]=qs['filters'](_[_0x4167('0x50')](_0x5a47e7['query'],_0x6c3d6f[_0x4167('0x4f')]));_0x130b71[_0x4167('0x4e')][_0x4167('0x6a')]=_0x16c114['id'];if(_0x5a47e7[_0x4167('0x43')][_0x4167('0x51')]){_0x130b71['where']=_['merge'](_0x130b71[_0x4167('0x4e')],{'$or':_['map'](_0x130b71['attributes'],function(_0x48aa3e){var _0x4ad4ff={};_0x4ad4ff[_0x48aa3e]={'$like':'%'+_0x5a47e7[_0x4167('0x43')][_0x4167('0x51')]+'%'};return _0x4ad4ff;})});}_0x130b71=_[_0x4167('0x53')]({},_0x130b71,_0x5a47e7[_0x4167('0x54')]);return db['Disposition'][_0x4167('0x30')]({'where':_0x130b71[_0x4167('0x4e')]})['then'](function(_0x9b5ba2){_0x528a34[_0x4167('0x30')]=_0x9b5ba2;if(_0x5a47e7[_0x4167('0x43')][_0x4167('0x59')]){_0x130b71[_0x4167('0x55')]=[{'all':!![]}];}return db['Disposition']['findAll'](_0x130b71);})[_0x4167('0x1d')](function(_0x533143){_0x528a34[_0x4167('0x56')]=_0x533143;return _0x528a34;});}})[_0x4167('0x1d')](respondWithFilteredResult(_0xde944b,_0x130b71))['catch'](handleError(_0xde944b,null));};exports[_0x4167('0x6b')]=function(_0x2c67a7,_0x36c490,_0x5c8f21){return db[_0x4167('0x3f')][_0x4167('0x5a')]({'where':{'id':_0x2c67a7[_0x4167('0x58')]['id']}})[_0x4167('0x1d')](handleEntityNotFound(_0x36c490,null))['then'](function(_0x31a5e2){if(_0x31a5e2){return _0x31a5e2[_0x4167('0x6b')](_0x2c67a7[_0x4167('0x43')][_0x4167('0x6c')]);}})[_0x4167('0x1d')](respondWithStatusCode(_0x36c490,null))[_0x4167('0x28')](handleError(_0x36c490,null));};exports[_0x4167('0x6d')]=function(_0x474385,_0x4d9274,_0x274cbb){if(_0x474385[_0x4167('0x5b')]['id']){delete _0x474385[_0x4167('0x5b')]['id'];}return db[_0x4167('0x3f')]['find']({'where':{'id':_0x474385[_0x4167('0x58')]['id']}})[_0x4167('0x1d')](handleEntityNotFound(_0x4d9274,null))[_0x4167('0x1d')](function(_0xf51c82){if(_0xf51c82){_0x474385[_0x4167('0x5b')][_0x4167('0x6a')]=_0xf51c82['id'];return db['CannedAnswer'][_0x4167('0x63')](_0x474385[_0x4167('0x5b')]);}})[_0x4167('0x1d')](respondWithResult(_0x4d9274,null))[_0x4167('0x28')](handleError(_0x4d9274,null));};exports[_0x4167('0x6e')]=function(_0x3c93ea,_0x2ac249,_0x39732a){var _0x56ec68={'raw':![],'where':{}};var _0x1b97f3={};var _0x28630b={'count':0x0,'rows':[]};return db['SmsAccount'][_0x4167('0x69')]({'where':{'id':_0x3c93ea[_0x4167('0x58')]['id']}})[_0x4167('0x1d')](handleEntityNotFound(_0x2ac249,null))[_0x4167('0x1d')](function(_0x4e8952){if(_0x4e8952){_0x1b97f3[_0x4167('0x47')]=_['keys'](db[_0x4167('0x6f')][_0x4167('0x40')]);_0x1b97f3[_0x4167('0x43')]=_[_0x4167('0x44')](_0x3c93ea[_0x4167('0x43')]);_0x1b97f3[_0x4167('0x4f')]=_['intersection'](_0x1b97f3[_0x4167('0x47')],_0x1b97f3['query']);_0x56ec68['attributes']=_[_0x4167('0x45')](_0x1b97f3[_0x4167('0x47')],qs['fields'](_0x3c93ea[_0x4167('0x43')][_0x4167('0x48')]));_0x56ec68['attributes']=_0x56ec68[_0x4167('0x46')][_0x4167('0x49')]?_0x56ec68['attributes']:_0x1b97f3[_0x4167('0x47')];if(!_0x3c93ea[_0x4167('0x43')][_0x4167('0x4a')](_0x4167('0x4b'))){_0x56ec68[_0x4167('0x2f')]=qs[_0x4167('0x2f')](_0x3c93ea[_0x4167('0x43')][_0x4167('0x2f')]);_0x56ec68[_0x4167('0x2d')]=qs[_0x4167('0x2d')](_0x3c93ea[_0x4167('0x43')][_0x4167('0x2d')]);}_0x56ec68[_0x4167('0x4c')]=qs['sort'](_0x3c93ea[_0x4167('0x43')][_0x4167('0x4d')]);_0x56ec68[_0x4167('0x4e')]=qs[_0x4167('0x4f')](_[_0x4167('0x50')](_0x3c93ea[_0x4167('0x43')],_0x1b97f3[_0x4167('0x4f')]));_0x56ec68[_0x4167('0x4e')]['SmsAccountId']=_0x4e8952['id'];if(_0x3c93ea[_0x4167('0x43')][_0x4167('0x51')]){_0x56ec68[_0x4167('0x4e')]=_[_0x4167('0x53')](_0x56ec68[_0x4167('0x4e')],{'$or':_[_0x4167('0x3e')](_0x56ec68[_0x4167('0x46')],function(_0x1a63b8){var _0x132250={};_0x132250[_0x1a63b8]={'$like':'%'+_0x3c93ea[_0x4167('0x43')][_0x4167('0x51')]+'%'};return _0x132250;})});}_0x56ec68=_['merge']({},_0x56ec68,_0x3c93ea[_0x4167('0x54')]);return db[_0x4167('0x6f')]['count']({'where':_0x56ec68[_0x4167('0x4e')]})[_0x4167('0x1d')](function(_0x331522){_0x28630b[_0x4167('0x30')]=_0x331522;if(_0x3c93ea[_0x4167('0x43')][_0x4167('0x59')]){_0x56ec68[_0x4167('0x55')]=[{'all':!![]}];}return db['CannedAnswer'][_0x4167('0x70')](_0x56ec68);})[_0x4167('0x1d')](function(_0x5a1d4d){_0x28630b[_0x4167('0x56')]=_0x5a1d4d;return _0x28630b;});}})['then'](respondWithFilteredResult(_0x2ac249,_0x56ec68))[_0x4167('0x28')](handleError(_0x2ac249,null));};exports['removeAnswers']=function(_0x2c0148,_0x2d01e5,_0x27c396){return db[_0x4167('0x3f')][_0x4167('0x5a')]({'where':{'id':_0x2c0148[_0x4167('0x58')]['id']}})[_0x4167('0x1d')](handleEntityNotFound(_0x2d01e5,null))['then'](function(_0x1c14bc){if(_0x1c14bc){return _0x1c14bc[_0x4167('0x71')](_0x2c0148[_0x4167('0x43')]['ids']);}})[_0x4167('0x1d')](respondWithStatusCode(_0x2d01e5,null))[_0x4167('0x28')](handleError(_0x2d01e5,null));};exports['notify']=function(_0x53e6a6,_0x42884e,_0x2d50f7){var _0xf29560={'channel':'sms'};var _0x1dde22=[];var _0x3a99a8=[];var _0x4639ee={};return db[_0x4167('0x3f')]['find']({'where':{'id':_0x53e6a6[_0x4167('0x58')]['id']},'include':[{'model':db['SmsApplication'],'as':_0x4167('0x72')}]})[_0x4167('0x1d')](handleEntityNotFound(_0x42884e,null))['then'](function(_0x2c60c4){_0xf29560[_0x4167('0x73')]=_0x2c60c4;_0xf29560[_0x4167('0x74')]=_[_0x4167('0x75')](_0x2c60c4[_0x4167('0x72')],['priority'],[_0x4167('0x76')]);if(_0xf29560[_0x4167('0x73')][_0x4167('0x72')]){delete _0xf29560[_0x4167('0x73')]['Applications'];}return db[_0x4167('0x77')]['describe']();})[_0x4167('0x1d')](function(_0x457785){if(!_0x457785){throw new db[(_0x4167('0x78'))]['ValidationError']('no\x20available\x20attributes');}_0x1dde22=_[_0x4167('0x79')](_[_0x4167('0x44')](_0x457785),['createdAt',_0x4167('0x7a')]);_0x3a99a8=_['difference'](_[_0x4167('0x44')](_0x457785),[_0x4167('0x7b'),_0x4167('0x7a'),_0x4167('0x7c'),_0x4167('0x7d')]);_0xf29560[_0x4167('0x5b')]={'mapKey':_0x4167('0x7e')};if(_0xf29560['account'][_0x4167('0x42')]){switch(_0xf29560[_0x4167('0x73')][_0x4167('0x42')]){case _0x4167('0x7f'):_0xf29560[_0x4167('0x5b')][_0x4167('0x80')]=_0x53e6a6['body'][_0x4167('0x81')];_0xf29560['body'][_0x4167('0x5b')]=_0x53e6a6[_0x4167('0x5b')][_0x4167('0x82')];_0xf29560[_0x4167('0x5b')][_0x4167('0x83')]=_0x53e6a6[_0x4167('0x5b')][_0x4167('0x84')];break;case'skebby':_0xf29560[_0x4167('0x5b')][_0x4167('0x80')]='+'+_0x53e6a6[_0x4167('0x5b')]['sender'];_0xf29560['body'][_0x4167('0x5b')]=_0x53e6a6[_0x4167('0x5b')]['text'];break;case _0x4167('0x85'):_0xf29560[_0x4167('0x5b')][_0x4167('0x80')]=_0x53e6a6['body'][_0x4167('0x80')];_0xf29560[_0x4167('0x5b')][_0x4167('0x5b')]=_0x53e6a6[_0x4167('0x5b')]['message'];break;case'clicksend':_0xf29560[_0x4167('0x5b')]['from']=_0x53e6a6[_0x4167('0x5b')][_0x4167('0x80')];_0xf29560[_0x4167('0x5b')][_0x4167('0x5b')]=_0x53e6a6[_0x4167('0x5b')][_0x4167('0x5b')];_0xf29560[_0x4167('0x5b')]['messageId']=_0x53e6a6['body'][_0x4167('0x86')];break;case'plivo':_0xf29560[_0x4167('0x5b')]['from']=_0x53e6a6[_0x4167('0x5b')]['From'];_0xf29560['body']['body']=_0x53e6a6[_0x4167('0x5b')][_0x4167('0x87')];_0xf29560[_0x4167('0x5b')][_0x4167('0x83')]=_0x53e6a6['body'][_0x4167('0x88')];break;case _0x4167('0x89'):_0xf29560[_0x4167('0x5b')][_0x4167('0x80')]='+'+_0x53e6a6[_0x4167('0x5b')][_0x4167('0x8a')][0x0][_0x4167('0x80')];_0xf29560[_0x4167('0x5b')]['body']=_0x53e6a6['body'][_0x4167('0x8a')][0x0]['text'];_0xf29560[_0x4167('0x5b')][_0x4167('0x83')]=_0x53e6a6[_0x4167('0x5b')]['results'][0x0][_0x4167('0x83')];break;case _0x4167('0x8b'):_0xf29560['body']['from']=_0x53e6a6['body'][_0x4167('0x8c')];_0xf29560['body'][_0x4167('0x5b')]=_0x53e6a6[_0x4167('0x5b')][_0x4167('0x8d')]['message'];break;case _0x4167('0x8e'):_0xf29560['body']['from']=_0x53e6a6[_0x4167('0x5b')][_0x4167('0x8f')];_0xf29560[_0x4167('0x5b')][_0x4167('0x5b')]=_0x53e6a6[_0x4167('0x5b')]['text'];_0xf29560[_0x4167('0x5b')][_0x4167('0x83')]=_0x53e6a6[_0x4167('0x5b')][_0x4167('0x90')];break;case _0x4167('0x91'):_0xf29560[_0x4167('0x5b')]['messageId']=_0x53e6a6[_0x4167('0x5b')][0x0][_0x4167('0x26')]['id'];_0xf29560['body'][_0x4167('0x80')]=_0x53e6a6[_0x4167('0x5b')][0x0][_0x4167('0x26')][_0x4167('0x80')];_0xf29560['body'][_0x4167('0x5b')]=_0x53e6a6['body'][0x0]['message'][_0x4167('0x92')];break;case _0x4167('0x93'):_0xf29560[_0x4167('0x5b')]['from']=_0x53e6a6[_0x4167('0x5b')]['from'];_0xf29560[_0x4167('0x5b')][_0x4167('0x5b')]=_0x53e6a6[_0x4167('0x5b')]['message'];_0xf29560[_0x4167('0x5b')][_0x4167('0x83')]=_0x53e6a6[_0x4167('0x5b')][_0x4167('0x94')];break;}}if(_0xf29560[_0x4167('0x5b')]['id']){delete _0xf29560[_0x4167('0x5b')]['id'];}if(_[_0x4167('0x95')](_0xf29560[_0x4167('0x5b')][_0x4167('0x80')])){throw new db[(_0x4167('0x78'))][(_0x4167('0x96'))](_0x4167('0x97'));}if(_[_0x4167('0x95')](_0xf29560[_0x4167('0x5b')]['body'])||_0xf29560[_0x4167('0x5b')][_0x4167('0x5b')]===''){throw new db[(_0x4167('0x78'))][(_0x4167('0x96'))](_0x4167('0x98'));}if(_['isNil'](_0xf29560['body'][_0x4167('0x99')])){throw new db[(_0x4167('0x78'))]['ValidationError'](_0x4167('0x9a')+_0x3a99a8);}if(!_[_0x4167('0x9b')](_0x3a99a8,_0xf29560[_0x4167('0x5b')]['mapKey'])){throw new db['Sequelize'][(_0x4167('0x96'))](_0x4167('0x9c')+_0x3a99a8);}_0x4639ee[_0xf29560[_0x4167('0x5b')][_0x4167('0x99')]]=_0xf29560[_0x4167('0x5b')][_0x4167('0x80')];return db[_0x4167('0x9d')][_0x4167('0x5a')]({'where':{'id':_0xf29560['account'][_0x4167('0x7d')]},'include':[{'model':db[_0x4167('0x77')],'as':_0x4167('0x9e'),'where':_0x4639ee,'limit':0x1,'order':[[_0x4167('0x7a'),'DESC']]}]});})[_0x4167('0x1d')](handleEntityNotFound(_0x42884e,null))[_0x4167('0x1d')](function(_0x5849c7){if(_0x5849c7){_0xf29560[_0x4167('0x9f')]=_[_0x4167('0xa0')](_0x5849c7,[_0x4167('0x9e')]);if(_0x5849c7[_0x4167('0x9e')][_0x4167('0x49')]){return _0x5849c7[_0x4167('0x9e')][0x0];}var _0x33b1fd=_[_0x4167('0x16')](_0xf29560[_0x4167('0x5b')],{'firstName':_0xf29560[_0x4167('0x5b')][_0x4167('0x80')],'ListId':_0x5849c7['id']});_0x33b1fd[_0xf29560['body']['mapKey']]=_0xf29560['body'][_0x4167('0x80')];return db[_0x4167('0x77')][_0x4167('0x63')](_0x33b1fd,{'fields':_0x1dde22,'raw':!![]});}})[_0x4167('0x1d')](handleEntityNotFound(_0x42884e,null))[_0x4167('0x1d')](function(_0x1e224e){if(_0x1e224e){_0xf29560[_0x4167('0xa1')]=_0x1e224e;var _0x1a3f97={'ContactId':_0x1e224e['id'],'phone':_0xf29560['body'][_0x4167('0x80')],'SmsAccountId':_0x53e6a6[_0x4167('0x58')]['id']};var _0x1cea52={'ContactId':_0x1e224e['id'],'SmsAccountId':_0x53e6a6[_0x4167('0x58')]['id'],'closed':![]};return db[_0x4167('0xa2')]['find']({'where':_0x1cea52})['then'](function(_0xbdd006){if(_0xbdd006){return[_0xbdd006,![]];}return db[_0x4167('0xa2')][_0x4167('0x63')](_0x1a3f97)[_0x4167('0x1d')](function(_0x3ddd28){return[_0x3ddd28,!![]];});});}})[_0x4167('0xa3')](function(_0xd0561b,_0x3d7ca6){_0xf29560[_0x4167('0xa4')]=_0xd0561b[_0x4167('0x5f')]({'plain':!![]});_0xf29560[_0x4167('0xa4')][_0x4167('0xa5')]=![];if(_0x3d7ca6){if(_0xf29560[_0x4167('0x73')][_0x4167('0xa6')]){_0xf29560['applications']['push']({'id':0x0,'priority':_0xf29560[_0x4167('0x74')][_0x4167('0x49')]+0x1,'app':_0x4167('0xa7'),'appdata':_0x4167('0xa8'),'interval':_0x4167('0xa9')});}_0xf29560[_0x4167('0xa4')][_0x4167('0xa5')]=!![];}return db[_0x4167('0xaa')][_0x4167('0x63')]({'phone':_0xf29560['body'][_0x4167('0x80')],'messageId':_0xf29560[_0x4167('0x5b')]['messageId'],'body':_0xf29560['body'][_0x4167('0x5b')],'SmsAccountId':_0x53e6a6[_0x4167('0x58')]['id'],'SmsInteractionId':_0xd0561b['id'],'direction':'in','ContactId':_0xd0561b['ContactId'],'AttachmentId':_0xf29560[_0x4167('0x5b')]['AttachmentId']});})['then'](function(_0xc40d85){_0xf29560[_0x4167('0x26')]=_0xc40d85;if(_0xf29560['interaction'][_0x4167('0xab')]){return db['User'][_0x4167('0x5a')]({'attributes':['id',_0x4167('0x39')],'where':{'id':_0xf29560[_0x4167('0xa4')][_0x4167('0xab')]}})['then'](function(_0x380595){if(_0x380595){_0xf29560[_0x4167('0x74')][_0x4167('0xac')]({'id':0x0,'priority':0x0,'app':'agent','appdata':_0x380595[_0x4167('0x39')]+','+(_0xf29560[_0x4167('0x73')][_0x4167('0xad')]||0xa),'interval':_0x4167('0xa9')});}return respondWithRpcPromise(_0x4167('0xae'),_0x4167('0xaf'),_0xf29560);});}return respondWithRpcPromise('Start','startRouting',_0xf29560);})[_0x4167('0x1d')](function(_0x62010b){if(_0x62010b){var _0x3a3aa6=0xc8;var _0x5b57c8=_0x4167('0xb0');logger['info'](_0x4167('0x21'),_0x5b57c8,_0x3a3aa6,'entity\x20found');logger[_0x4167('0x20')](_0x4167('0xb1'),_0x5b57c8,_0x3a3aa6,_0x4167('0xb2'),JSON[_0x4167('0x23')](_0x62010b));if(_0xf29560[_0x4167('0x73')][_0x4167('0x42')]===_0x4167('0x7f')){return _0x42884e[_0x4167('0x2a')](_0x3a3aa6)[_0x4167('0xb3')]('Content-Type',_0x4167('0xb4'))[_0x4167('0x3a')](_0x4167('0xb5'));}else{return _0x42884e[_0x4167('0x2a')](_0x3a3aa6)['json'](_0x62010b);}}})[_0x4167('0x28')](handleError(_0x42884e,null));};exports[_0x4167('0xb6')]=function(_0x4eccee,_0x329210,_0x46db71){return db[_0x4167('0x3f')][_0x4167('0x69')]({'where':{'id':_0x4eccee[_0x4167('0x58')]['id']}})[_0x4167('0x1d')](handleEntityNotFound(_0x329210,null))['then'](function(_0x549087){if(_0x549087){return db[_0x4167('0xb7')][_0x4167('0xb8')](function(_0xbff062){return db['SmsApplication']['destroy']({'where':{'SmsAccountId':_0x4eccee[_0x4167('0x58')]['id']},'transaction':_0xbff062})['then'](function(_0x5a3759){var _0x4c3e45=_[_0x4167('0x3e')](_0x4eccee[_0x4167('0x5b')],function(_0x28b5b2){_0x28b5b2['SmsAccountId']=_0x4eccee[_0x4167('0x58')]['id'];return _0x28b5b2;});return db['SmsApplication']['bulkCreate'](_0x4c3e45,{'transaction':_0xbff062});});})[_0x4167('0x1d')](function(){return db[_0x4167('0xb9')][_0x4167('0xba')]({'where':{'SmsAccountId':_0x4eccee[_0x4167('0x58')]['id']},'order':'priority'});});}})[_0x4167('0x1d')](respondWithResult(_0x329210,null))[_0x4167('0x28')](handleError(_0x329210,null));};exports['getApplications']=function(_0x10da1,_0x42b34a,_0x5d93d9){var _0x258943={};var _0x432958={};var _0x8a724f;var _0x1fbcf1;return db['SmsAccount'][_0x4167('0x69')]({'where':{'id':_0x10da1[_0x4167('0x58')]['id']}})[_0x4167('0x1d')](handleEntityNotFound(_0x42b34a,null))[_0x4167('0x1d')](function(_0x517c6f){if(_0x517c6f){_0x8a724f=_0x517c6f;_0x432958[_0x4167('0x47')]=_[_0x4167('0x44')](db['SmsApplication'][_0x4167('0x40')]);_0x432958[_0x4167('0x43')]=_['keys'](_0x10da1[_0x4167('0x43')]);_0x432958[_0x4167('0x4f')]=_['intersection'](_0x432958[_0x4167('0x47')],_0x432958['query']);_0x258943['attributes']=_['intersection'](_0x432958[_0x4167('0x47')],qs[_0x4167('0x48')](_0x10da1['query'][_0x4167('0x48')]));_0x258943[_0x4167('0x46')]=_0x258943[_0x4167('0x46')][_0x4167('0x49')]?_0x258943[_0x4167('0x46')]:_0x432958[_0x4167('0x47')];_0x258943[_0x4167('0x4c')]=qs[_0x4167('0x4d')](_0x10da1[_0x4167('0x43')][_0x4167('0x4d')]);_0x258943[_0x4167('0x4e')]=qs[_0x4167('0x4f')](_[_0x4167('0x50')](_0x10da1[_0x4167('0x43')],_0x432958['filters']));if(_0x10da1[_0x4167('0x43')]['filter']){_0x258943[_0x4167('0x4e')]=_['merge'](_0x258943[_0x4167('0x4e')],{'$or':_[_0x4167('0x3e')](_0x258943[_0x4167('0x46')],function(_0x590d6b){var _0x7fa4f5={};_0x7fa4f5[_0x590d6b]={'$like':'%'+_0x10da1['query'][_0x4167('0x51')]+'%'};return _0x7fa4f5;})});}_0x258943=_[_0x4167('0x53')]({},_0x258943,_0x10da1[_0x4167('0x54')]);return _0x8a724f['getApplications'](_0x258943);}})[_0x4167('0x1d')](function(_0x14bdbd){if(_0x14bdbd){_0x1fbcf1=_0x14bdbd[_0x4167('0x49')];if(!_0x10da1[_0x4167('0x43')]['hasOwnProperty'](_0x4167('0x4b'))){_0x258943[_0x4167('0x2f')]=qs['limit'](_0x10da1['query']['limit']);_0x258943[_0x4167('0x2d')]=qs[_0x4167('0x2d')](_0x10da1[_0x4167('0x43')][_0x4167('0x2d')]);}return _0x8a724f[_0x4167('0xbb')](_0x258943);}})[_0x4167('0x1d')](function(_0x4551be){if(_0x4551be){return _0x4551be?{'count':_0x1fbcf1,'rows':_0x4551be}:null;}})[_0x4167('0x1d')](respondWithResult(_0x42b34a,null))[_0x4167('0x28')](handleError(_0x42b34a,null));};exports[_0x4167('0xbc')]=function(_0xa6fe3e,_0x50cb27,_0x279d02){var _0x524d99={'raw':![],'where':{}};var _0x4b75c2={};var _0x5e8157={'count':0x0,'rows':[]};return db[_0x4167('0x3f')]['findOne']({'where':{'id':_0xa6fe3e['params']['id']}})[_0x4167('0x1d')](handleEntityNotFound(_0x50cb27,null))[_0x4167('0x1d')](function(_0x42fd92){if(_0x42fd92){_0x4b75c2[_0x4167('0x47')]=_[_0x4167('0x44')](db[_0x4167('0xa2')][_0x4167('0x40')]);_0x4b75c2[_0x4167('0x43')]=_[_0x4167('0x44')](_0xa6fe3e[_0x4167('0x43')]);_0x4b75c2[_0x4167('0x4f')]=_[_0x4167('0x45')](_0x4b75c2[_0x4167('0x47')],_0x4b75c2[_0x4167('0x43')]);_0x524d99[_0x4167('0x46')]=_[_0x4167('0x45')](_0x4b75c2[_0x4167('0x47')],qs['fields'](_0xa6fe3e[_0x4167('0x43')]['fields']));_0x524d99[_0x4167('0x46')]=_0x524d99[_0x4167('0x46')]['length']?_0x524d99[_0x4167('0x46')]:_0x4b75c2[_0x4167('0x47')];if(!_0xa6fe3e[_0x4167('0x43')][_0x4167('0x4a')](_0x4167('0x4b'))){_0x524d99[_0x4167('0x2f')]=qs[_0x4167('0x2f')](_0xa6fe3e['query'][_0x4167('0x2f')]);_0x524d99[_0x4167('0x2d')]=qs[_0x4167('0x2d')](_0xa6fe3e[_0x4167('0x43')]['offset']);}_0x524d99[_0x4167('0x4c')]=qs['sort'](_0xa6fe3e[_0x4167('0x43')][_0x4167('0x4d')]);_0x524d99[_0x4167('0x4e')]=qs[_0x4167('0x4f')](_[_0x4167('0x50')](_0xa6fe3e['query'],_0x4b75c2[_0x4167('0x4f')]));_0x524d99[_0x4167('0x4e')][_0x4167('0x6a')]=_0x42fd92['id'];if(_0xa6fe3e['query'][_0x4167('0x51')]){_0x524d99[_0x4167('0x4e')]=_[_0x4167('0x53')](_0x524d99[_0x4167('0x4e')],{'$or':_[_0x4167('0x3e')](_0x524d99[_0x4167('0x46')],function(_0x5ae49d){var _0xa94b53={};_0xa94b53[_0x5ae49d]={'$like':'%'+_0xa6fe3e['query'][_0x4167('0x51')]+'%'};return _0xa94b53;})});}_0x524d99=_[_0x4167('0x53')]({},_0x524d99,_0xa6fe3e['options']);return db[_0x4167('0xa2')][_0x4167('0x30')]({'where':_0x524d99[_0x4167('0x4e')]})[_0x4167('0x1d')](function(_0x5cb9f8){_0x5e8157[_0x4167('0x30')]=_0x5cb9f8;if(_0xa6fe3e[_0x4167('0x43')]['includeAll']){_0x524d99[_0x4167('0x55')]=[{'model':db[_0x4167('0x77')],'as':_0x4167('0xbd'),'required':![]},{'model':db[_0x4167('0xbe')],'as':_0x4167('0xbf'),'attributes':['name','fullname',_0x4167('0xc0')],'required':![]},{'model':db[_0x4167('0xc1')],'as':_0x4167('0xc2'),'attributes':['id',_0x4167('0x39'),_0x4167('0xc3')],'where':_0xa6fe3e[_0x4167('0x43')][_0x4167('0xc4')]?{'id':_0xa6fe3e[_0x4167('0x43')][_0x4167('0xc4')]}:undefined,'required':_0xa6fe3e[_0x4167('0x43')][_0x4167('0xc4')]?!![]:![]}];}return db[_0x4167('0xa2')][_0x4167('0x70')](_0x524d99);})[_0x4167('0x1d')](function(_0x215cc0){_0x5e8157['rows']=_0x215cc0;return _0x5e8157;});}})['then'](respondWithFilteredResult(_0x50cb27,_0x524d99))[_0x4167('0x28')](handleError(_0x50cb27,null));};exports[_0x4167('0x3a')]=function(_0x5129bb,_0x510817,_0x475862){var _0x342068,_0x59bc3c,_0x2ba0fb;if(_[_0x4167('0x95')](_0x5129bb[_0x4167('0x5b')][_0x4167('0x5b')])||_0x5129bb[_0x4167('0x5b')][_0x4167('0x5b')]===''){throw new db[(_0x4167('0x78'))][(_0x4167('0x96'))]('body\x20is\x20mandatory\x20and\x20not\x20empty');}if(_[_0x4167('0x95')](_0x5129bb[_0x4167('0x5b')]['to'])){throw new db[(_0x4167('0x78'))][(_0x4167('0x96'))](_0x4167('0xc5'));}_0x342068=_0x5129bb[_0x4167('0x5b')]['to'];return db[_0x4167('0x3f')][_0x4167('0x5a')]({'where':{'id':_0x5129bb['params']['id']},'include':[{'model':db[_0x4167('0x9d')],'as':_0x4167('0xc6'),'include':[{'model':db[_0x4167('0x77')],'as':_0x4167('0x9e'),'where':{'mobile':_0x342068},'limit':0x1,'order':[[_0x4167('0x7a'),_0x4167('0xc7')]]}]}]})[_0x4167('0x1d')](handleEntityNotFound(_0x510817,null))[_0x4167('0x1d')](function(_0x45da0a){if(_0x45da0a&&_0x45da0a[_0x4167('0xc6')]){_0x59bc3c=_0x45da0a[_0x4167('0x5f')]({'plain':!![]});if(_0x59bc3c[_0x4167('0xc6')]&&_0x59bc3c[_0x4167('0xc6')][_0x4167('0x9e')]['length']){return _0x59bc3c[_0x4167('0xc6')][_0x4167('0x9e')][0x0];}return db['CmContact'][_0x4167('0x63')](_[_0x4167('0x16')](_0x5129bb[_0x4167('0x5b')],{'firstName':_0x342068,'mobile':_0x342068,'phone':_0x342068,'ListId':_0x59bc3c[_0x4167('0x7d')]}));}})[_0x4167('0x1d')](handleEntityNotFound(_0x510817,null))[_0x4167('0x1d')](function(_0x52fa07){if(_0x52fa07){_0x2ba0fb=_0x52fa07;return db[_0x4167('0xa2')][_0x4167('0x5a')]({'where':{'ContactId':_0x2ba0fb['id'],'closed':![],'SmsAccountId':_0x59bc3c['id']}})['then'](function(_0x3915d0){if(_0x3915d0){return[_0x3915d0,![]];}return db[_0x4167('0xa2')][_0x4167('0x63')]({'UserId':_0x5129bb[_0x4167('0x5c')]['id'],'ContactId':_0x2ba0fb['id'],'SmsAccountId':_0x59bc3c['id'],'phone':_0x342068,'firstMsgDirection':_0x4167('0xc8'),'Messages':[_['merge'](_0x5129bb[_0x4167('0x5b')],{'read':![],'body':_0x5129bb[_0x4167('0x5b')]['body'],'phone':_0x342068,'SmsAccountId':_0x59bc3c['id'],'UserId':_0x5129bb[_0x4167('0x5c')]['id'],'ContactId':_0x2ba0fb['id']})]},{'include':[{'model':db[_0x4167('0xaa')],'as':_0x4167('0xc9')}]})[_0x4167('0x1d')](function(_0x5351eb){return[_0x5351eb,!![]];});});}})[_0x4167('0xa3')](function(_0x233505,_0x4e8c24){if(_0x4e8c24){return _0x233505;}return db[_0x4167('0xaa')]['create'](_[_0x4167('0x53')](_0x5129bb[_0x4167('0x5b')],{'read':![],'body':_0x5129bb[_0x4167('0x5b')][_0x4167('0x5b')],'phone':_0x342068,'SmsAccountId':_0x59bc3c['id'],'SmsInteractionId':_0x233505['id'],'UserId':_0x5129bb[_0x4167('0x5c')]['id'],'ContactId':_0x2ba0fb['id']}))[_0x4167('0x1d')](function(_0x5a3c99){_0x233505[_0x4167('0xca')][_0x4167('0xc9')]=[];_0x233505['dataValues'][_0x4167('0xc9')][_0x4167('0xcb')](_0x5a3c99['dataValues']);return _0x233505;});})['then'](respondWithResult(_0x510817,null))[_0x4167('0x28')](handleError(_0x510817,null));};exports['status']=function(_0x3ec2e3,_0x343a15,_0x24ee4c){if(_0x3ec2e3['body']['id']){delete _0x3ec2e3[_0x4167('0x5b')]['id'];}var _0x295576,_0x1f49a0,_0x47e636;return db['SmsAccount'][_0x4167('0x5a')]({'where':{'id':_0x3ec2e3[_0x4167('0x58')]['id']}})['then'](handleEntityNotFound(_0x343a15,null))[_0x4167('0x1d')](function(_0x7e4358){if(_0x7e4358){_0x47e636=_0x7e4358;logger[_0x4167('0x20')]('SmsAccount,\x20%s,\x20%s,\x20%s',_0x4167('0x2a'),'received\x20delivery\x20report\x20from',_0x7e4358[_0x4167('0x42')],util[_0x4167('0xcc')](_0x3ec2e3[_0x4167('0x5b')],{'showHidden':![],'depth':null}));switch(_0x7e4358[_0x4167('0x42')]){case _0x4167('0xcd'):if(_0x3ec2e3['body']['skebby_dispatch_id']&&_0x3ec2e3['body'][_0x4167('0x2a')]){_0x1f49a0=_0x3ec2e3[_0x4167('0x5b')]['status'];return db[_0x4167('0xaa')][_0x4167('0x5a')]({'where':{'messageId':_0x3ec2e3[_0x4167('0x5b')]['skebby_dispatch_id']}});}break;case _0x4167('0x85'):if(_0x3ec2e3[_0x4167('0x5b')][_0x4167('0xce')]&&_0x3ec2e3['body'][_0x4167('0xcf')]){_0x1f49a0=_0x3ec2e3['body'][_0x4167('0xcf')];return db['SmsMessage']['find']({'where':{'messageId':_0x3ec2e3[_0x4167('0x5b')][_0x4167('0xce')]}});}break;case _0x4167('0xd0'):if(_0x3ec2e3['body'][_0x4167('0x86')]&&_0x3ec2e3[_0x4167('0x5b')][_0x4167('0xd1')]){_0x1f49a0=_0x3ec2e3[_0x4167('0x5b')][_0x4167('0xd1')];return db[_0x4167('0xaa')]['find']({'where':{'messageId':_0x3ec2e3[_0x4167('0x5b')][_0x4167('0x86')]}});}break;case'infobip':var _0x7ce76b=_0x3ec2e3[_0x4167('0x5b')][_0x4167('0x8a')][0x0];if(_0x7ce76b['messageId']&&_0x7ce76b[_0x4167('0x2a')]['groupName']===_0x4167('0xd2')){_0x1f49a0=_0x7ce76b[_0x4167('0x2a')][_0x4167('0xd3')];return db['SmsMessage']['find']({'where':{'messageId':_0x7ce76b[_0x4167('0x83')]}});}break;case _0x4167('0x8e'):if(_0x3ec2e3['body'][_0x4167('0x83')]&&_0x3ec2e3[_0x4167('0x5b')][_0x4167('0x2a')]){_0x1f49a0=_0x3ec2e3[_0x4167('0x5b')][_0x4167('0x2a')];return db[_0x4167('0xaa')]['find']({'where':{'messageId':_0x3ec2e3['body'][_0x4167('0x83')]}});}break;case'bandwidth':if(_0x3ec2e3[_0x4167('0x5b')][0x0]['message']['id']){_0x1f49a0=_0x3ec2e3[_0x4167('0x5b')][0x0]['type'];return db[_0x4167('0xaa')][_0x4167('0x5a')]({'where':{'messageId':_0x3ec2e3['body'][0x0][_0x4167('0x26')]['id']}});}break;case'intelepeer':if(_0x3ec2e3[_0x4167('0x5b')][_0x4167('0xd4')]&&_0x3ec2e3[_0x4167('0x5b')][_0x4167('0x2a')]){_0x1f49a0=_0x3ec2e3[_0x4167('0x5b')][_0x4167('0x2a')];return db[_0x4167('0xaa')][_0x4167('0x5a')]({'where':{'messageId':_0x3ec2e3[_0x4167('0x5b')][_0x4167('0xd4')]}});}break;}}})[_0x4167('0x1d')](handleEntityNotFound(_0x343a15,null))['then'](function(_0x2eb87a){if(_0x2eb87a){_0x295576=_0x2eb87a;switch(_0x47e636['type']){case _0x4167('0xcd'):if(_0x1f49a0===_0x4167('0xd2')){return _0x295576[_0x4167('0x34')]({'read':!![]});}else{logger[_0x4167('0x24')](_0x4167('0x21'),'status','skebby',util[_0x4167('0xcc')](_0x3ec2e3['body'],{'showHidden':![],'depth':null}));}break;case _0x4167('0x85'):if(_0x1f49a0==='1'){return _0x295576[_0x4167('0x34')]({'read':!![]});}else{logger[_0x4167('0x24')](_0x4167('0x21'),_0x4167('0x2a'),_0x4167('0xcd'),util[_0x4167('0xcc')](_0x3ec2e3[_0x4167('0x5b')],{'showHidden':![],'depth':null}));}break;case _0x4167('0xd0'):if(!_0x3ec2e3['body'][_0x4167('0xd5')]&&_0x1f49a0>=0xc8&&_0x1f49a0<=0xce){return _0x295576[_0x4167('0x34')]({'read':!![]});}else{logger[_0x4167('0x24')](_0x4167('0x21'),_0x4167('0x2a'),'clicksend',util['inspect'](_0x3ec2e3['body'],{'showHidden':![],'depth':null}));}break;case'infobip':var _0x37c6b2=_0x3ec2e3[_0x4167('0x5b')][_0x4167('0x8a')][0x0];if(_0x37c6b2[_0x4167('0x2a')]['groupName']===_0x4167('0xd2')){return _0x295576[_0x4167('0x34')]({'read':!![]});}else{logger[_0x4167('0x24')]('SmsAccount,\x20%s,\x20%s,\x20%s','status','infobip',util[_0x4167('0xcc')](_0x3ec2e3['body'],{'showHidden':![],'depth':null}));}break;case _0x4167('0x8e'):if(_0x1f49a0==_0x4167('0xd6')||_0x1f49a0=='RECEIVED_BY_RECIPIENT'){return _0x295576[_0x4167('0x34')]({'read':!![]});}else{logger[_0x4167('0x24')]('SmsAccount,\x20%s,\x20%s,\x20%s',_0x4167('0x2a'),_0x4167('0x8e'),util[_0x4167('0xcc')](_0x3ec2e3[_0x4167('0x5b')],{'showHidden':![],'depth':null}));}break;case'bandwidth':if(_0x1f49a0==_0x4167('0xd7')){return _0x295576['update']({'read':!![]});}else{logger['error']('SmsAccount,\x20%s,\x20%s,\x20%s',_0x4167('0x2a'),_0x4167('0x91'),util[_0x4167('0xcc')](_0x3ec2e3['body'],{'showHidden':![],'depth':null}));}break;case'intelepeer':if(_0x1f49a0===_0x4167('0xd8')||_0x1f49a0===_0x4167('0xd9')){return _0x295576[_0x4167('0x34')]({'read':!![]});}else{logger[_0x4167('0x24')](_0x4167('0x21'),_0x4167('0x2a'),'intelepeer',util[_0x4167('0xcc')](_0x3ec2e3[_0x4167('0x5b')],{'showHidden':![],'depth':null}));}break;}return _0x295576;}})[_0x4167('0x1d')](respondWithResult(_0x343a15,null))[_0x4167('0x28')](handleError(_0x343a15,null));};exports[_0x4167('0xda')]=function(_0x1a03e9,_0x1e7267,_0x1e1be4){var _0x6c34c,_0x2041f0,_0xab500d;return db['SmsAccount'][_0x4167('0x5a')]({'where':{'id':_0x1a03e9['params']['id']}})['then'](handleEntityNotFound(_0x1e7267,null))[_0x4167('0x1d')](function(_0x5637c8){if(_0x5637c8){_0xab500d=_0x5637c8;logger['debug'](_0x4167('0x21'),_0x4167('0x2a'),_0x4167('0xdb'),_0x5637c8[_0x4167('0x42')],util[_0x4167('0xcc')](_0x1a03e9[_0x4167('0x43')],{'showHidden':![],'depth':null}));switch(_0x5637c8[_0x4167('0x42')]){case _0x4167('0x8b'):if(_0x1a03e9[_0x4167('0x43')][_0x4167('0xdc')]&&_0x1a03e9['query'][_0x4167('0xdd')]){_0x2041f0=_0x1a03e9[_0x4167('0x43')]['state'];return db[_0x4167('0xaa')][_0x4167('0x5a')]({'where':{'messageId':_0x1a03e9['query'][_0x4167('0xdc')]}});}break;}}})[_0x4167('0x1d')](handleEntityNotFound(_0x1e7267,null))[_0x4167('0x1d')](function(_0x197acf){if(_0x197acf){_0x6c34c=_0x197acf;switch(_0xab500d[_0x4167('0x42')]){case _0x4167('0x8b'):if(_0x2041f0==='2'||_0x2041f0==='6'){return _0x6c34c[_0x4167('0x34')]({'read':!![]});}else{logger[_0x4167('0x24')](_0x4167('0x21'),_0x4167('0x2a'),_0x4167('0x8b'),util[_0x4167('0xcc')](_0x1a03e9['query'],{'showHidden':![],'depth':null}));};break;}return _0x6c34c;}})[_0x4167('0x1d')](respondWithResult(_0x1e7267,null))[_0x4167('0x28')](handleError(_0x1e7267,null));};exports[_0x4167('0xde')]=function(_0xdb9123,_0x964de3,_0x253348){return db['SmsAccount'][_0x4167('0x5a')]({'where':{'id':_0xdb9123[_0x4167('0x58')]['id']}})[_0x4167('0x1d')](handleEntityNotFound(_0x964de3,null))[_0x4167('0x1d')](function(_0xcf7546){if(_0xcf7546){return _0xcf7546[_0x4167('0xde')](_0xdb9123[_0x4167('0x5b')][_0x4167('0x6c')],_[_0x4167('0xa0')](_0xdb9123[_0x4167('0x5b')],[_0x4167('0x6c'),'id'])||{})[_0x4167('0xa3')](function(_0x1c46de){for(var _0x269360=0x0;_0x269360<_0xdb9123[_0x4167('0x5b')]['ids'][_0x4167('0x49')];_0x269360+=0x1){socket[_0x4167('0xdf')](_0x4167('0xe0'),{'UserId':_0xdb9123[_0x4167('0x5b')]['ids'][_0x269360],'SmsAccountId':_0xdb9123[_0x4167('0x58')]['id']});}return _0x1c46de;});}})[_0x4167('0x1d')](respondWithResult(_0x964de3,null))[_0x4167('0x28')](handleError(_0x964de3,null));};exports[_0x4167('0xe1')]=function(_0x2d359e,_0x4befc9,_0x6c54d9){return db['SmsAccount'][_0x4167('0x5a')]({'where':{'id':_0x2d359e['params']['id']}})[_0x4167('0x1d')](handleEntityNotFound(_0x4befc9,null))[_0x4167('0x1d')](function(_0x30879c){if(_0x30879c){return _0x30879c[_0x4167('0xe1')](_0x2d359e['query'][_0x4167('0x6c')])['then'](function(){if(_[_0x4167('0xe2')](_0x2d359e[_0x4167('0x43')][_0x4167('0x6c')])){for(var _0x39b500=0x0;_0x39b500<_0x2d359e[_0x4167('0x43')][_0x4167('0x6c')]['length'];_0x39b500+=0x1){socket[_0x4167('0xdf')](_0x4167('0xe3'),{'UserId':Number(_0x2d359e['query'][_0x4167('0x6c')][_0x39b500]),'SmsAccountId':Number(_0x2d359e[_0x4167('0x58')]['id'])});}}else{socket[_0x4167('0xdf')](_0x4167('0xe3'),{'UserId':Number(_0x2d359e[_0x4167('0x43')][_0x4167('0x6c')]),'SmsAccountId':Number(_0x2d359e[_0x4167('0x58')]['id'])});}});}})[_0x4167('0x1d')](respondWithStatusCode(_0x4befc9,null))[_0x4167('0x28')](handleError(_0x4befc9,null));};exports['getAgents']=function(_0x24ce00,_0x47b4f4,_0x1703d6){var _0x33e95f={};var _0x4041de={};var _0x4f83b0;var _0x2f93aa;return db['SmsAccount'][_0x4167('0x69')]({'where':{'id':_0x24ce00[_0x4167('0x58')]['id']}})[_0x4167('0x1d')](handleEntityNotFound(_0x47b4f4,null))['then'](function(_0x520531){if(_0x520531){_0x4f83b0=_0x520531;_0x4041de[_0x4167('0x47')]=_[_0x4167('0x44')](db[_0x4167('0xbe')][_0x4167('0x40')]);_0x4041de['query']=_[_0x4167('0x44')](_0x24ce00['query']);_0x4041de[_0x4167('0x4f')]=_[_0x4167('0x45')](_0x4041de[_0x4167('0x47')],_0x4041de[_0x4167('0x43')]);_0x33e95f[_0x4167('0x46')]=_['intersection'](_0x4041de[_0x4167('0x47')],qs[_0x4167('0x48')](_0x24ce00[_0x4167('0x43')][_0x4167('0x48')]));_0x33e95f[_0x4167('0x46')]=_0x33e95f[_0x4167('0x46')][_0x4167('0x49')]?_0x33e95f[_0x4167('0x46')]:_0x4041de['model'];_0x33e95f[_0x4167('0x4c')]=qs[_0x4167('0x4d')](_0x24ce00[_0x4167('0x43')]['sort']);_0x33e95f[_0x4167('0x4e')]=qs[_0x4167('0x4f')](_[_0x4167('0x50')](_0x24ce00[_0x4167('0x43')],_0x4041de['filters']));if(_0x24ce00[_0x4167('0x43')][_0x4167('0x51')]){_0x33e95f['where']=_['merge'](_0x33e95f[_0x4167('0x4e')],{'$or':_['map'](_0x33e95f[_0x4167('0x46')],function(_0x351c76){var _0x318ea9={};_0x318ea9[_0x351c76]={'$like':'%'+_0x24ce00[_0x4167('0x43')][_0x4167('0x51')]+'%'};return _0x318ea9;})});}_0x33e95f=_[_0x4167('0x53')]({},_0x33e95f,_0x24ce00[_0x4167('0x54')]);return _0x4f83b0['getAgents'](_0x33e95f);}})[_0x4167('0x1d')](function(_0x3acf13){if(_0x3acf13){_0x2f93aa=_0x3acf13[_0x4167('0x49')];if(!_0x24ce00['query'][_0x4167('0x4a')]('nolimit')){_0x33e95f['limit']=qs[_0x4167('0x2f')](_0x24ce00['query']['limit']);_0x33e95f['offset']=qs[_0x4167('0x2d')](_0x24ce00[_0x4167('0x43')][_0x4167('0x2d')]);}return _0x4f83b0[_0x4167('0xe4')](_0x33e95f);}})[_0x4167('0x1d')](function(_0x2efb69){if(_0x2efb69){return _0x2efb69?{'count':_0x2f93aa,'rows':_0x2efb69}:null;}})[_0x4167('0x1d')](respondWithResult(_0x47b4f4,null))[_0x4167('0x28')](handleError(_0x47b4f4,null));}; \ No newline at end of file +var _0x39cf=['redif','DELIVERED','error_code','groupName','DELIVERED_TO_GATEWAY','RECEIVED_BY_RECIPIENT','message-delivered','DELIVRD','ACCEPTD','received\x20delivery\x20report\x20from','message-id','addAgents','emit','userSmsAccount:save','removeAgents','userSmsAccount:remove','eml-format','rimraf','fast-json-patch','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','squel','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','localhost','socket.io-emitter','./smsAccount.socket','register','client','http','request','then','info','request\x20sent','debug','stringify','error','SmsAccount,\x20%s,\x20%s','message','result','sendStatus','status','end','json','offset','limit','set','Content-Range','reject','update','destroy','get','SmsAccounts','UserProfileResource','stack','name','send','index','Pause','mandatoryDispositionPause','map','SmsAccount','rawAttributes','fieldName','type','model','keys','filters','attributes','intersection','fields','query','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','VIRTUAL','merge','options','count','includeAll','include','rows','catch','show','params','find','body','user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','addDisposition','Disposition','create','getDispositions','findOne','SmsAccountId','findAll','removeDispositions','ids','addAnswer','CannedAnswer','getAnswers','removeAnswers','sms','SmsApplication','account','orderBy','Applications','priority','asc','CmContact','Sequelize','ValidationError','no\x20available\x20attributes','difference','createdAt','updatedAt','ListId','mobile','twilio','from','From','Body','messageId','MessageSid','sender','text','clicksend','message_id','plivo','Text','infobip','results','csc','originatingAddress','segmentedMessage','fromNumber','replyMessageId','intelepeer','refid','isNil','from\x20is\x20mandatory','mapKey','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','CmList','Contacts','DESC','omit','defaults','SmsInteraction','interaction','autoclose','push','close','unmanaged','*,*,*,*','SmsMessage','UserId','User','applications','unshift','agent','Start','startRouting','receiveMessage','SmsAccount,\x20%s,\x20%s,\x20%s','entity\x20found','SmsAccount,\x20%s,\x20%s,\x20%s,\x20%s','Content-Type','text/xml','addApplications','sequelize','bulkCreate','findAndCountAll','getApplications','getInteractions','Contact','Owner','fullname','internal','Tags','color','tag','body\x20is\x20mandatory\x20and\x20not\x20empty','to\x20is\x20mandatory','List','out','Messages','spread','dataValues','inspect','skebby','skebby_dispatch_id','connectel','requestid','statusInt','status_code','clickatell','bandwidth'];(function(_0x4792c8,_0x5158a1){var _0x35edb1=function(_0x2472d3){while(--_0x2472d3){_0x4792c8['push'](_0x4792c8['shift']());}};_0x35edb1(++_0x5158a1);}(_0x39cf,0xf3));var _0xf39c=function(_0x101a17,_0x5d047a){_0x101a17=_0x101a17-0x0;var _0x3b76ee=_0x39cf[_0x101a17];return _0x3b76ee;};'use strict';var emlformat=require(_0xf39c('0x0'));var rimraf=require(_0xf39c('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xf39c('0x2'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0xf39c('0x3'));var Mustache=require(_0xf39c('0x4'));var util=require(_0xf39c('0x5'));var path=require(_0xf39c('0x6'));var sox=require(_0xf39c('0x7'));var csv=require(_0xf39c('0x8'));var ejs=require(_0xf39c('0x9'));var fs=require('fs');var fs_extra=require(_0xf39c('0xa'));var _=require('lodash');var squel=require(_0xf39c('0xb'));var crypto=require('crypto');var jsforce=require(_0xf39c('0xc'));var deskjs=require(_0xf39c('0xd'));var toCsv=require(_0xf39c('0x8'));var querystring=require(_0xf39c('0xe'));var Papa=require('papaparse');var Redis=require(_0xf39c('0xf'));var authService=require(_0xf39c('0x10'));var qs=require(_0xf39c('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xf39c('0x12'));var logger=require(_0xf39c('0x13'))(_0xf39c('0x14'));var utils=require(_0xf39c('0x15'));var config=require(_0xf39c('0x16'));var licenseUtil=require(_0xf39c('0x17'));var db=require(_0xf39c('0x18'))['db'];config[_0xf39c('0x19')]=_['defaults'](config['redis'],{'host':_0xf39c('0x1a'),'port':0x18eb});var socket=require(_0xf39c('0x1b'))(new Redis(config['redis']));require(_0xf39c('0x1c'))[_0xf39c('0x1d')](socket);var jayson=require('jayson/promise');var client=jayson[_0xf39c('0x1e')][_0xf39c('0x1f')]({'port':0x232c});function respondWithRpcPromise(_0x367579,_0x488e99,_0x553147,_0x1581f4){return new BPromise(function(_0x24660e,_0x3e18e5){var _0x158a6c=_0x1581f4||client;return _0x158a6c[_0xf39c('0x20')](_0x367579,_0x553147)[_0xf39c('0x21')](function(_0x4e56dd){logger[_0xf39c('0x22')]('SmsAccount,\x20%s,\x20%s',_0x488e99,_0xf39c('0x23'));logger[_0xf39c('0x24')]('SmsAccount,\x20%s,\x20%s,\x20%s',_0x488e99,_0xf39c('0x23'),JSON[_0xf39c('0x25')](_0x4e56dd));if(_0x4e56dd['error']){if(_0x4e56dd[_0xf39c('0x26')]['code']===0x1f4){logger['error'](_0xf39c('0x27'),_0x488e99,_0x4e56dd[_0xf39c('0x26')][_0xf39c('0x28')]);return _0x3e18e5(_0x4e56dd[_0xf39c('0x26')][_0xf39c('0x28')]);}logger['error'](_0xf39c('0x27'),_0x488e99,_0x4e56dd['error'][_0xf39c('0x28')]);return _0x24660e(_0x4e56dd[_0xf39c('0x26')][_0xf39c('0x28')]);}else{logger[_0xf39c('0x22')](_0xf39c('0x27'),_0x488e99,_0xf39c('0x23'));_0x24660e(_0x4e56dd[_0xf39c('0x29')][_0xf39c('0x28')]);}})['catch'](function(_0x1c8674){logger[_0xf39c('0x26')]('SmsAccount,\x20%s,\x20%s',_0x488e99,_0x1c8674);_0x3e18e5(_0x1c8674);});});}function respondWithStatusCode(_0x4353e1,_0xe382af){_0xe382af=_0xe382af||0xcc;return function(_0x30338c){if(_0x30338c){return _0x4353e1[_0xf39c('0x2a')](_0xe382af);}return _0x4353e1[_0xf39c('0x2b')](_0xe382af)[_0xf39c('0x2c')]();};}function respondWithResult(_0x29b381,_0x5e27a3){_0x5e27a3=_0x5e27a3||0xc8;return function(_0x1b1a50){if(_0x1b1a50){return _0x29b381[_0xf39c('0x2b')](_0x5e27a3)[_0xf39c('0x2d')](_0x1b1a50);}};}function respondWithFilteredResult(_0x4c4b4e,_0x1c1204){return function(_0x273b6f){if(_0x273b6f){var _0x2982dc=typeof _0x1c1204[_0xf39c('0x2e')]==='undefined'&&typeof _0x1c1204[_0xf39c('0x2f')]==='undefined';var _0x5d7081=_0x273b6f['count'];var _0x3d4de5=_0x2982dc?0x0:_0x1c1204[_0xf39c('0x2e')];var _0xe6d549=_0x2982dc?_0x273b6f['count']:_0x1c1204[_0xf39c('0x2e')]+_0x1c1204[_0xf39c('0x2f')];var _0x3c7371;if(_0xe6d549>=_0x5d7081){_0xe6d549=_0x5d7081;_0x3c7371=0xc8;}else{_0x3c7371=0xce;}_0x4c4b4e[_0xf39c('0x2b')](_0x3c7371);return _0x4c4b4e[_0xf39c('0x30')](_0xf39c('0x31'),_0x3d4de5+'-'+_0xe6d549+'/'+_0x5d7081)[_0xf39c('0x2d')](_0x273b6f);}return null;};}function patchUpdates(_0x312cb4){return function(_0x1709e8){try{jsonpatch['apply'](_0x1709e8,_0x312cb4,!![]);}catch(_0x316f01){return BPromise[_0xf39c('0x32')](_0x316f01);}return _0x1709e8['save']();};}function saveUpdates(_0xf3166a,_0x1e08bc){return function(_0x3f9d49){if(_0x3f9d49){return _0x3f9d49[_0xf39c('0x33')](_0xf3166a)[_0xf39c('0x21')](function(_0x5883be){return _0x5883be;});}return null;};}function removeEntity(_0x2d94f8,_0x57f9e9){return function(_0x747d4f){if(_0x747d4f){return _0x747d4f[_0xf39c('0x34')]()['then'](function(){var _0x5ac39d=_0x747d4f[_0xf39c('0x35')]({'plain':!![]});var _0x502719=_0xf39c('0x36');return db[_0xf39c('0x37')]['destroy']({'where':{'type':_0x502719,'resourceId':_0x5ac39d['id']}})[_0xf39c('0x21')](function(){return _0x747d4f;});})[_0xf39c('0x21')](function(){_0x2d94f8[_0xf39c('0x2b')](0xcc)[_0xf39c('0x2c')]();});}};}function handleEntityNotFound(_0x464df6,_0x52145f){return function(_0x5288bc){if(!_0x5288bc){_0x464df6[_0xf39c('0x2a')](0x194);}return _0x5288bc;};}function handleError(_0x3ff020,_0x542099){_0x542099=_0x542099||0x1f4;return function(_0x363f9e){logger[_0xf39c('0x26')](_0x363f9e[_0xf39c('0x38')]);if(_0x363f9e[_0xf39c('0x39')]){delete _0x363f9e['name'];}_0x3ff020[_0xf39c('0x2b')](_0x542099)[_0xf39c('0x3a')](_0x363f9e);};}exports[_0xf39c('0x3b')]=function(_0x40d34d,_0x4ac578){var _0x14c3f4={'include':[{'model':db[_0xf39c('0x3c')],'as':_0xf39c('0x3d')}]},_0x44e1bb={},_0x1484eb={'count':0x0,'rows':[]};var _0x829a55=_[_0xf39c('0x3e')](db[_0xf39c('0x3f')][_0xf39c('0x40')],function(_0x29288b){return{'name':_0x29288b[_0xf39c('0x41')],'type':_0x29288b[_0xf39c('0x42')]['key']};});_0x44e1bb[_0xf39c('0x43')]=_[_0xf39c('0x3e')](_0x829a55,'name');_0x44e1bb['query']=_[_0xf39c('0x44')](_0x40d34d['query']);_0x44e1bb[_0xf39c('0x45')]=_['intersection'](_0x44e1bb['model'],_0x44e1bb['query']);_0x14c3f4[_0xf39c('0x46')]=_[_0xf39c('0x47')](_0x44e1bb[_0xf39c('0x43')],qs[_0xf39c('0x48')](_0x40d34d[_0xf39c('0x49')]['fields']));_0x14c3f4['attributes']=_0x14c3f4[_0xf39c('0x46')][_0xf39c('0x4a')]?_0x14c3f4[_0xf39c('0x46')]:_0x44e1bb[_0xf39c('0x43')];if(!_0x40d34d[_0xf39c('0x49')][_0xf39c('0x4b')](_0xf39c('0x4c'))){_0x14c3f4[_0xf39c('0x2f')]=qs[_0xf39c('0x2f')](_0x40d34d[_0xf39c('0x49')]['limit']);_0x14c3f4[_0xf39c('0x2e')]=qs[_0xf39c('0x2e')](_0x40d34d[_0xf39c('0x49')][_0xf39c('0x2e')]);}_0x14c3f4[_0xf39c('0x4d')]=qs['sort'](_0x40d34d['query'][_0xf39c('0x4e')]);_0x14c3f4[_0xf39c('0x4f')]=qs[_0xf39c('0x45')](_[_0xf39c('0x50')](_0x40d34d[_0xf39c('0x49')],_0x44e1bb[_0xf39c('0x45')]),_0x829a55);if(_0x40d34d['query'][_0xf39c('0x51')]){_0x14c3f4[_0xf39c('0x4f')]=_['merge'](_0x14c3f4[_0xf39c('0x4f')],{'$or':_[_0xf39c('0x3e')](_0x829a55,function(_0x344881){if(_0x344881[_0xf39c('0x42')]!==_0xf39c('0x52')){var _0x3e2f98={};_0x3e2f98[_0x344881[_0xf39c('0x39')]]={'$like':'%'+_0x40d34d['query'][_0xf39c('0x51')]+'%'};return _0x3e2f98;}})});}_0x14c3f4=_[_0xf39c('0x53')]({},_0x14c3f4,_0x40d34d[_0xf39c('0x54')]);var _0x59983f={'where':_0x14c3f4[_0xf39c('0x4f')]};return db[_0xf39c('0x3f')][_0xf39c('0x55')](_0x59983f)['then'](function(_0x29a228){_0x1484eb['count']=_0x29a228;if(_0x40d34d[_0xf39c('0x49')][_0xf39c('0x56')]){_0x14c3f4[_0xf39c('0x57')]=[{'all':!![]}];}return db[_0xf39c('0x3f')]['findAll'](_0x14c3f4);})[_0xf39c('0x21')](function(_0x1aed6d){_0x1484eb[_0xf39c('0x58')]=_0x1aed6d;return _0x1484eb;})[_0xf39c('0x21')](respondWithFilteredResult(_0x4ac578,_0x14c3f4))[_0xf39c('0x59')](handleError(_0x4ac578,null));};exports[_0xf39c('0x5a')]=function(_0x3e4851,_0x1bf74d){var _0x2cf271={'raw':![],'where':{'id':_0x3e4851[_0xf39c('0x5b')]['id']},'include':[{'model':db[_0xf39c('0x3c')],'as':_0xf39c('0x3d')}]},_0x1872b1={};_0x1872b1[_0xf39c('0x43')]=_[_0xf39c('0x44')](db[_0xf39c('0x3f')][_0xf39c('0x40')]);_0x1872b1[_0xf39c('0x49')]=_['keys'](_0x3e4851[_0xf39c('0x49')]);_0x1872b1[_0xf39c('0x45')]=_[_0xf39c('0x47')](_0x1872b1[_0xf39c('0x43')],_0x1872b1[_0xf39c('0x49')]);_0x2cf271[_0xf39c('0x46')]=_[_0xf39c('0x47')](_0x1872b1[_0xf39c('0x43')],qs[_0xf39c('0x48')](_0x3e4851[_0xf39c('0x49')]['fields']));_0x2cf271[_0xf39c('0x46')]=_0x2cf271['attributes'][_0xf39c('0x4a')]?_0x2cf271['attributes']:_0x1872b1[_0xf39c('0x43')];if(_0x3e4851[_0xf39c('0x49')]['includeAll']){_0x2cf271['include']=[{'all':!![]}];}_0x2cf271=_[_0xf39c('0x53')]({},_0x2cf271,_0x3e4851[_0xf39c('0x54')]);return db[_0xf39c('0x3f')][_0xf39c('0x5c')](_0x2cf271)[_0xf39c('0x21')](handleEntityNotFound(_0x1bf74d,null))['then'](respondWithResult(_0x1bf74d,null))[_0xf39c('0x59')](handleError(_0x1bf74d,null));};exports['create']=function(_0x129438,_0x2604af){return db[_0xf39c('0x3f')]['create'](_0x129438[_0xf39c('0x5d')],{})[_0xf39c('0x21')](function(_0x2e72b4){var _0x545ccc=_0x129438[_0xf39c('0x5e')][_0xf39c('0x35')]({'plain':!![]});if(!_0x545ccc)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x545ccc[_0xf39c('0x5f')]===_0xf39c('0x5e')){var _0x556a67=_0x2e72b4[_0xf39c('0x35')]({'plain':!![]});var _0x473a04='SmsAccounts';return db[_0xf39c('0x60')][_0xf39c('0x5c')]({'where':{'name':_0x473a04,'userProfileId':_0x545ccc[_0xf39c('0x61')]},'raw':!![]})[_0xf39c('0x21')](function(_0x5294c7){if(_0x5294c7&&_0x5294c7[_0xf39c('0x62')]===0x0){return db[_0xf39c('0x37')]['create']({'name':_0x556a67['name'],'resourceId':_0x556a67['id'],'type':_0x5294c7[_0xf39c('0x39')],'sectionId':_0x5294c7['id']},{})['then'](function(){return _0x2e72b4;});}else{return _0x2e72b4;}})[_0xf39c('0x59')](function(_0x36b3d6){logger[_0xf39c('0x26')](_0xf39c('0x63'),_0x36b3d6);throw _0x36b3d6;});}return _0x2e72b4;})[_0xf39c('0x21')](respondWithResult(_0x2604af,0xc9))[_0xf39c('0x59')](handleError(_0x2604af,null));};exports[_0xf39c('0x33')]=function(_0x1c6c2d,_0x656ab1){if(_0x1c6c2d[_0xf39c('0x5d')]['id']){delete _0x1c6c2d[_0xf39c('0x5d')]['id'];}return db[_0xf39c('0x3f')]['find']({'where':{'id':_0x1c6c2d['params']['id']},'include':[{'model':db[_0xf39c('0x3c')],'as':_0xf39c('0x3d')}]})[_0xf39c('0x21')](handleEntityNotFound(_0x656ab1,null))[_0xf39c('0x21')](saveUpdates(_0x1c6c2d[_0xf39c('0x5d')],null))['then'](respondWithResult(_0x656ab1,null))['catch'](handleError(_0x656ab1,null));};exports['destroy']=function(_0x261485,_0x154441){return db[_0xf39c('0x3f')][_0xf39c('0x5c')]({'where':{'id':_0x261485['params']['id']}})[_0xf39c('0x21')](handleEntityNotFound(_0x154441,null))['then'](removeEntity(_0x154441,null))[_0xf39c('0x59')](handleError(_0x154441,null));};exports[_0xf39c('0x64')]=function(_0x2837ba,_0x5a543d){return db[_0xf39c('0x3f')][_0xf39c('0x64')]()[_0xf39c('0x21')](respondWithResult(_0x5a543d,null))[_0xf39c('0x59')](handleError(_0x5a543d,null));};exports[_0xf39c('0x65')]=function(_0x1d7eb7,_0x580433,_0x4c4282){if(_0x1d7eb7['body']['id']){delete _0x1d7eb7[_0xf39c('0x5d')]['id'];}return db[_0xf39c('0x3f')][_0xf39c('0x5c')]({'where':{'id':_0x1d7eb7[_0xf39c('0x5b')]['id']}})[_0xf39c('0x21')](handleEntityNotFound(_0x580433,null))[_0xf39c('0x21')](function(_0x2751a4){if(_0x2751a4){_0x1d7eb7[_0xf39c('0x5d')]['SmsAccountId']=_0x2751a4['id'];return db[_0xf39c('0x66')][_0xf39c('0x67')](_0x1d7eb7[_0xf39c('0x5d')]);}})[_0xf39c('0x21')](respondWithResult(_0x580433,null))[_0xf39c('0x59')](handleError(_0x580433,null));};exports[_0xf39c('0x68')]=function(_0x305b4,_0x47e7f5,_0x2aa183){var _0x312da5={'raw':![],'where':{}};var _0x435b0a={};var _0x364b4d={'count':0x0,'rows':[]};return db['SmsAccount'][_0xf39c('0x69')]({'where':{'id':_0x305b4[_0xf39c('0x5b')]['id']}})[_0xf39c('0x21')](handleEntityNotFound(_0x47e7f5,null))['then'](function(_0x3b39fb){if(_0x3b39fb){_0x435b0a[_0xf39c('0x43')]=_[_0xf39c('0x44')](db['Disposition'][_0xf39c('0x40')]);_0x435b0a[_0xf39c('0x49')]=_[_0xf39c('0x44')](_0x305b4[_0xf39c('0x49')]);_0x435b0a[_0xf39c('0x45')]=_['intersection'](_0x435b0a['model'],_0x435b0a[_0xf39c('0x49')]);_0x312da5['attributes']=_[_0xf39c('0x47')](_0x435b0a[_0xf39c('0x43')],qs[_0xf39c('0x48')](_0x305b4[_0xf39c('0x49')]['fields']));_0x312da5['attributes']=_0x312da5[_0xf39c('0x46')][_0xf39c('0x4a')]?_0x312da5['attributes']:_0x435b0a[_0xf39c('0x43')];if(!_0x305b4[_0xf39c('0x49')][_0xf39c('0x4b')](_0xf39c('0x4c'))){_0x312da5[_0xf39c('0x2f')]=qs[_0xf39c('0x2f')](_0x305b4[_0xf39c('0x49')][_0xf39c('0x2f')]);_0x312da5[_0xf39c('0x2e')]=qs[_0xf39c('0x2e')](_0x305b4['query'][_0xf39c('0x2e')]);}_0x312da5[_0xf39c('0x4d')]=qs['sort'](_0x305b4[_0xf39c('0x49')][_0xf39c('0x4e')]);_0x312da5[_0xf39c('0x4f')]=qs[_0xf39c('0x45')](_[_0xf39c('0x50')](_0x305b4['query'],_0x435b0a[_0xf39c('0x45')]));_0x312da5[_0xf39c('0x4f')][_0xf39c('0x6a')]=_0x3b39fb['id'];if(_0x305b4[_0xf39c('0x49')][_0xf39c('0x51')]){_0x312da5[_0xf39c('0x4f')]=_[_0xf39c('0x53')](_0x312da5[_0xf39c('0x4f')],{'$or':_[_0xf39c('0x3e')](_0x312da5['attributes'],function(_0xa12938){var _0x5d2c4a={};_0x5d2c4a[_0xa12938]={'$like':'%'+_0x305b4['query']['filter']+'%'};return _0x5d2c4a;})});}_0x312da5=_[_0xf39c('0x53')]({},_0x312da5,_0x305b4[_0xf39c('0x54')]);return db[_0xf39c('0x66')][_0xf39c('0x55')]({'where':_0x312da5[_0xf39c('0x4f')]})[_0xf39c('0x21')](function(_0x5ae95c){_0x364b4d[_0xf39c('0x55')]=_0x5ae95c;if(_0x305b4['query'][_0xf39c('0x56')]){_0x312da5[_0xf39c('0x57')]=[{'all':!![]}];}return db[_0xf39c('0x66')][_0xf39c('0x6b')](_0x312da5);})['then'](function(_0x352ee6){_0x364b4d['rows']=_0x352ee6;return _0x364b4d;});}})[_0xf39c('0x21')](respondWithFilteredResult(_0x47e7f5,_0x312da5))[_0xf39c('0x59')](handleError(_0x47e7f5,null));};exports['removeDispositions']=function(_0x4fd728,_0x4f889f,_0x47c69f){return db[_0xf39c('0x3f')][_0xf39c('0x5c')]({'where':{'id':_0x4fd728['params']['id']}})[_0xf39c('0x21')](handleEntityNotFound(_0x4f889f,null))[_0xf39c('0x21')](function(_0x252be3){if(_0x252be3){return _0x252be3[_0xf39c('0x6c')](_0x4fd728[_0xf39c('0x49')][_0xf39c('0x6d')]);}})[_0xf39c('0x21')](respondWithStatusCode(_0x4f889f,null))[_0xf39c('0x59')](handleError(_0x4f889f,null));};exports[_0xf39c('0x6e')]=function(_0x360f79,_0x35d086,_0x183290){if(_0x360f79['body']['id']){delete _0x360f79['body']['id'];}return db[_0xf39c('0x3f')][_0xf39c('0x5c')]({'where':{'id':_0x360f79[_0xf39c('0x5b')]['id']}})[_0xf39c('0x21')](handleEntityNotFound(_0x35d086,null))[_0xf39c('0x21')](function(_0x39a1b5){if(_0x39a1b5){_0x360f79[_0xf39c('0x5d')][_0xf39c('0x6a')]=_0x39a1b5['id'];return db[_0xf39c('0x6f')][_0xf39c('0x67')](_0x360f79[_0xf39c('0x5d')]);}})[_0xf39c('0x21')](respondWithResult(_0x35d086,null))[_0xf39c('0x59')](handleError(_0x35d086,null));};exports[_0xf39c('0x70')]=function(_0x2f78b3,_0x5f5086,_0x2f81f6){var _0x4481c5={'raw':![],'where':{}};var _0x50db45={};var _0x59824f={'count':0x0,'rows':[]};return db[_0xf39c('0x3f')]['findOne']({'where':{'id':_0x2f78b3[_0xf39c('0x5b')]['id']}})[_0xf39c('0x21')](handleEntityNotFound(_0x5f5086,null))[_0xf39c('0x21')](function(_0x1813f8){if(_0x1813f8){_0x50db45[_0xf39c('0x43')]=_['keys'](db['CannedAnswer']['rawAttributes']);_0x50db45[_0xf39c('0x49')]=_[_0xf39c('0x44')](_0x2f78b3[_0xf39c('0x49')]);_0x50db45['filters']=_[_0xf39c('0x47')](_0x50db45[_0xf39c('0x43')],_0x50db45[_0xf39c('0x49')]);_0x4481c5[_0xf39c('0x46')]=_[_0xf39c('0x47')](_0x50db45[_0xf39c('0x43')],qs[_0xf39c('0x48')](_0x2f78b3[_0xf39c('0x49')][_0xf39c('0x48')]));_0x4481c5[_0xf39c('0x46')]=_0x4481c5['attributes'][_0xf39c('0x4a')]?_0x4481c5[_0xf39c('0x46')]:_0x50db45[_0xf39c('0x43')];if(!_0x2f78b3[_0xf39c('0x49')][_0xf39c('0x4b')]('nolimit')){_0x4481c5[_0xf39c('0x2f')]=qs[_0xf39c('0x2f')](_0x2f78b3[_0xf39c('0x49')][_0xf39c('0x2f')]);_0x4481c5['offset']=qs[_0xf39c('0x2e')](_0x2f78b3['query'][_0xf39c('0x2e')]);}_0x4481c5['order']=qs[_0xf39c('0x4e')](_0x2f78b3[_0xf39c('0x49')][_0xf39c('0x4e')]);_0x4481c5['where']=qs['filters'](_[_0xf39c('0x50')](_0x2f78b3['query'],_0x50db45['filters']));_0x4481c5[_0xf39c('0x4f')][_0xf39c('0x6a')]=_0x1813f8['id'];if(_0x2f78b3['query'][_0xf39c('0x51')]){_0x4481c5[_0xf39c('0x4f')]=_[_0xf39c('0x53')](_0x4481c5['where'],{'$or':_[_0xf39c('0x3e')](_0x4481c5[_0xf39c('0x46')],function(_0x83de19){var _0x208327={};_0x208327[_0x83de19]={'$like':'%'+_0x2f78b3[_0xf39c('0x49')][_0xf39c('0x51')]+'%'};return _0x208327;})});}_0x4481c5=_[_0xf39c('0x53')]({},_0x4481c5,_0x2f78b3[_0xf39c('0x54')]);return db[_0xf39c('0x6f')][_0xf39c('0x55')]({'where':_0x4481c5['where']})[_0xf39c('0x21')](function(_0x18a8bb){_0x59824f[_0xf39c('0x55')]=_0x18a8bb;if(_0x2f78b3['query'][_0xf39c('0x56')]){_0x4481c5[_0xf39c('0x57')]=[{'all':!![]}];}return db['CannedAnswer'][_0xf39c('0x6b')](_0x4481c5);})[_0xf39c('0x21')](function(_0x33101d){_0x59824f['rows']=_0x33101d;return _0x59824f;});}})['then'](respondWithFilteredResult(_0x5f5086,_0x4481c5))[_0xf39c('0x59')](handleError(_0x5f5086,null));};exports[_0xf39c('0x71')]=function(_0x184204,_0x274f5f,_0x5a9467){return db[_0xf39c('0x3f')][_0xf39c('0x5c')]({'where':{'id':_0x184204[_0xf39c('0x5b')]['id']}})[_0xf39c('0x21')](handleEntityNotFound(_0x274f5f,null))[_0xf39c('0x21')](function(_0x1309ee){if(_0x1309ee){return _0x1309ee[_0xf39c('0x71')](_0x184204[_0xf39c('0x49')][_0xf39c('0x6d')]);}})[_0xf39c('0x21')](respondWithStatusCode(_0x274f5f,null))[_0xf39c('0x59')](handleError(_0x274f5f,null));};exports['notify']=function(_0x31e37c,_0x56cf63,_0x3605d9){var _0x5ef4b={'channel':_0xf39c('0x72')};var _0x51647d=[];var _0x1c0fba=[];var _0xa2f6a1={};return db[_0xf39c('0x3f')]['find']({'where':{'id':_0x31e37c[_0xf39c('0x5b')]['id']},'include':[{'model':db[_0xf39c('0x73')],'as':'Applications'}]})[_0xf39c('0x21')](handleEntityNotFound(_0x56cf63,null))[_0xf39c('0x21')](function(_0x22f868){_0x5ef4b[_0xf39c('0x74')]=_0x22f868;_0x5ef4b['applications']=_[_0xf39c('0x75')](_0x22f868[_0xf39c('0x76')],[_0xf39c('0x77')],[_0xf39c('0x78')]);if(_0x5ef4b['account'][_0xf39c('0x76')]){delete _0x5ef4b['account'][_0xf39c('0x76')];}return db[_0xf39c('0x79')][_0xf39c('0x64')]();})['then'](function(_0x3f25e9){if(!_0x3f25e9){throw new db[(_0xf39c('0x7a'))][(_0xf39c('0x7b'))](_0xf39c('0x7c'));}_0x51647d=_[_0xf39c('0x7d')](_[_0xf39c('0x44')](_0x3f25e9),[_0xf39c('0x7e'),_0xf39c('0x7f')]);_0x1c0fba=_[_0xf39c('0x7d')](_[_0xf39c('0x44')](_0x3f25e9),[_0xf39c('0x7e'),_0xf39c('0x7f'),'CompanyId',_0xf39c('0x80')]);_0x5ef4b[_0xf39c('0x5d')]={'mapKey':_0xf39c('0x81')};if(_0x5ef4b[_0xf39c('0x74')][_0xf39c('0x42')]){switch(_0x5ef4b[_0xf39c('0x74')][_0xf39c('0x42')]){case _0xf39c('0x82'):_0x5ef4b[_0xf39c('0x5d')][_0xf39c('0x83')]=_0x31e37c[_0xf39c('0x5d')][_0xf39c('0x84')];_0x5ef4b['body'][_0xf39c('0x5d')]=_0x31e37c[_0xf39c('0x5d')][_0xf39c('0x85')];_0x5ef4b['body'][_0xf39c('0x86')]=_0x31e37c[_0xf39c('0x5d')][_0xf39c('0x87')];break;case'skebby':_0x5ef4b['body'][_0xf39c('0x83')]='+'+_0x31e37c['body'][_0xf39c('0x88')];_0x5ef4b[_0xf39c('0x5d')][_0xf39c('0x5d')]=_0x31e37c[_0xf39c('0x5d')][_0xf39c('0x89')];break;case'connectel':_0x5ef4b[_0xf39c('0x5d')][_0xf39c('0x83')]=_0x31e37c[_0xf39c('0x5d')][_0xf39c('0x83')];_0x5ef4b['body'][_0xf39c('0x5d')]=_0x31e37c[_0xf39c('0x5d')]['message'];break;case _0xf39c('0x8a'):_0x5ef4b[_0xf39c('0x5d')][_0xf39c('0x83')]=_0x31e37c['body'][_0xf39c('0x83')];_0x5ef4b['body'][_0xf39c('0x5d')]=_0x31e37c['body']['body'];_0x5ef4b[_0xf39c('0x5d')][_0xf39c('0x86')]=_0x31e37c[_0xf39c('0x5d')][_0xf39c('0x8b')];break;case _0xf39c('0x8c'):_0x5ef4b[_0xf39c('0x5d')]['from']=_0x31e37c[_0xf39c('0x5d')]['From'];_0x5ef4b[_0xf39c('0x5d')][_0xf39c('0x5d')]=_0x31e37c[_0xf39c('0x5d')][_0xf39c('0x8d')];_0x5ef4b['body'][_0xf39c('0x86')]=_0x31e37c[_0xf39c('0x5d')]['MessageUUID'];break;case _0xf39c('0x8e'):_0x5ef4b[_0xf39c('0x5d')][_0xf39c('0x83')]='+'+_0x31e37c['body'][_0xf39c('0x8f')][0x0][_0xf39c('0x83')];_0x5ef4b[_0xf39c('0x5d')][_0xf39c('0x5d')]=_0x31e37c[_0xf39c('0x5d')][_0xf39c('0x8f')][0x0][_0xf39c('0x89')];_0x5ef4b[_0xf39c('0x5d')][_0xf39c('0x86')]=_0x31e37c[_0xf39c('0x5d')]['results'][0x0][_0xf39c('0x86')];break;case _0xf39c('0x90'):_0x5ef4b[_0xf39c('0x5d')][_0xf39c('0x83')]=_0x31e37c['body'][_0xf39c('0x91')];_0x5ef4b['body'][_0xf39c('0x5d')]=_0x31e37c['body'][_0xf39c('0x92')][_0xf39c('0x28')];break;case'clickatell':_0x5ef4b['body'][_0xf39c('0x83')]=_0x31e37c[_0xf39c('0x5d')][_0xf39c('0x93')];_0x5ef4b[_0xf39c('0x5d')][_0xf39c('0x5d')]=_0x31e37c[_0xf39c('0x5d')][_0xf39c('0x89')];_0x5ef4b[_0xf39c('0x5d')][_0xf39c('0x86')]=_0x31e37c[_0xf39c('0x5d')][_0xf39c('0x94')];break;case'bandwidth':_0x5ef4b[_0xf39c('0x5d')][_0xf39c('0x86')]=_0x31e37c['body'][0x0][_0xf39c('0x28')]['id'];_0x5ef4b[_0xf39c('0x5d')]['from']=_0x31e37c['body'][0x0][_0xf39c('0x28')]['from'];_0x5ef4b[_0xf39c('0x5d')][_0xf39c('0x5d')]=_0x31e37c[_0xf39c('0x5d')][0x0][_0xf39c('0x28')][_0xf39c('0x89')];break;case _0xf39c('0x95'):_0x5ef4b['body'][_0xf39c('0x83')]=_0x31e37c[_0xf39c('0x5d')][_0xf39c('0x83')];_0x5ef4b[_0xf39c('0x5d')][_0xf39c('0x5d')]=_0x31e37c[_0xf39c('0x5d')][_0xf39c('0x28')];_0x5ef4b[_0xf39c('0x5d')]['messageId']=_0x31e37c[_0xf39c('0x5d')][_0xf39c('0x96')];break;}}if(_0x5ef4b[_0xf39c('0x5d')]['id']){delete _0x5ef4b[_0xf39c('0x5d')]['id'];}if(_[_0xf39c('0x97')](_0x5ef4b['body'][_0xf39c('0x83')])){throw new db[(_0xf39c('0x7a'))][(_0xf39c('0x7b'))](_0xf39c('0x98'));}if(_['isNil'](_0x5ef4b[_0xf39c('0x5d')][_0xf39c('0x5d')])||_0x5ef4b[_0xf39c('0x5d')][_0xf39c('0x5d')]===''){throw new db[(_0xf39c('0x7a'))][(_0xf39c('0x7b'))]('body\x20is\x20mandatory\x20and\x20not\x20empty');}if(_[_0xf39c('0x97')](_0x5ef4b[_0xf39c('0x5d')][_0xf39c('0x99')])){throw new db['Sequelize'][(_0xf39c('0x7b'))](_0xf39c('0x9a')+_0x1c0fba);}if(!_['includes'](_0x1c0fba,_0x5ef4b[_0xf39c('0x5d')][_0xf39c('0x99')])){throw new db[(_0xf39c('0x7a'))]['ValidationError'](_0xf39c('0x9b')+_0x1c0fba);}_0xa2f6a1[_0x5ef4b[_0xf39c('0x5d')][_0xf39c('0x99')]]=_0x5ef4b[_0xf39c('0x5d')][_0xf39c('0x83')];return db[_0xf39c('0x9c')]['find']({'where':{'id':_0x5ef4b[_0xf39c('0x74')][_0xf39c('0x80')]},'include':[{'model':db[_0xf39c('0x79')],'as':_0xf39c('0x9d'),'where':_0xa2f6a1,'limit':0x1,'order':[[_0xf39c('0x7f'),_0xf39c('0x9e')]]}]});})['then'](handleEntityNotFound(_0x56cf63,null))[_0xf39c('0x21')](function(_0x868ee0){if(_0x868ee0){_0x5ef4b['list']=_[_0xf39c('0x9f')](_0x868ee0,[_0xf39c('0x9d')]);if(_0x868ee0['Contacts'][_0xf39c('0x4a')]){return _0x868ee0['Contacts'][0x0];}var _0x47b864=_[_0xf39c('0xa0')](_0x5ef4b[_0xf39c('0x5d')],{'firstName':_0x5ef4b[_0xf39c('0x5d')][_0xf39c('0x83')],'ListId':_0x868ee0['id']});_0x47b864[_0x5ef4b['body'][_0xf39c('0x99')]]=_0x5ef4b[_0xf39c('0x5d')]['from'];return db['CmContact']['create'](_0x47b864,{'fields':_0x51647d,'raw':!![]});}})[_0xf39c('0x21')](handleEntityNotFound(_0x56cf63,null))[_0xf39c('0x21')](function(_0x592ea1){if(_0x592ea1){_0x5ef4b['contact']=_0x592ea1;var _0x2239f6={'ContactId':_0x592ea1['id'],'phone':_0x5ef4b[_0xf39c('0x5d')][_0xf39c('0x83')],'SmsAccountId':_0x31e37c[_0xf39c('0x5b')]['id']};var _0x25b1f9={'ContactId':_0x592ea1['id'],'SmsAccountId':_0x31e37c['params']['id'],'closed':![]};return db[_0xf39c('0xa1')]['find']({'where':_0x25b1f9})[_0xf39c('0x21')](function(_0x99e41){if(_0x99e41){return[_0x99e41,![]];}return db[_0xf39c('0xa1')][_0xf39c('0x67')](_0x2239f6)[_0xf39c('0x21')](function(_0x4c79a5){return[_0x4c79a5,!![]];});});}})['spread'](function(_0x198437,_0x119d49){_0x5ef4b[_0xf39c('0xa2')]=_0x198437[_0xf39c('0x35')]({'plain':!![]});_0x5ef4b[_0xf39c('0xa2')]['created']=![];if(_0x119d49){if(_0x5ef4b[_0xf39c('0x74')][_0xf39c('0xa3')]){_0x5ef4b['applications'][_0xf39c('0xa4')]({'id':0x0,'priority':_0x5ef4b['applications'][_0xf39c('0x4a')]+0x1,'app':_0xf39c('0xa5'),'appdata':_0xf39c('0xa6'),'interval':_0xf39c('0xa7')});}_0x5ef4b[_0xf39c('0xa2')]['created']=!![];}return db[_0xf39c('0xa8')][_0xf39c('0x67')]({'phone':_0x5ef4b[_0xf39c('0x5d')][_0xf39c('0x83')],'messageId':_0x5ef4b[_0xf39c('0x5d')]['messageId'],'body':_0x5ef4b['body'][_0xf39c('0x5d')],'SmsAccountId':_0x31e37c[_0xf39c('0x5b')]['id'],'SmsInteractionId':_0x198437['id'],'direction':'in','ContactId':_0x198437['ContactId'],'AttachmentId':_0x5ef4b[_0xf39c('0x5d')]['AttachmentId']});})['then'](function(_0x556f72){_0x5ef4b[_0xf39c('0x28')]=_0x556f72;if(_0x5ef4b[_0xf39c('0xa2')][_0xf39c('0xa9')]){return db[_0xf39c('0xaa')][_0xf39c('0x5c')]({'attributes':['id','name'],'where':{'id':_0x5ef4b['interaction']['UserId']}})[_0xf39c('0x21')](function(_0x413c3c){if(_0x413c3c){_0x5ef4b[_0xf39c('0xab')][_0xf39c('0xac')]({'id':0x0,'priority':0x0,'app':_0xf39c('0xad'),'appdata':_0x413c3c[_0xf39c('0x39')]+','+(_0x5ef4b[_0xf39c('0x74')]['waitForTheAssignedAgent']||0xa),'interval':_0xf39c('0xa7')});}return respondWithRpcPromise(_0xf39c('0xae'),'startRouting',_0x5ef4b);});}return respondWithRpcPromise(_0xf39c('0xae'),_0xf39c('0xaf'),_0x5ef4b);})[_0xf39c('0x21')](function(_0x3dd869){if(_0x3dd869){var _0x447e2b=0xc8;var _0x4ae272=_0xf39c('0xb0');logger[_0xf39c('0x22')](_0xf39c('0xb1'),_0x4ae272,_0x447e2b,_0xf39c('0xb2'));logger[_0xf39c('0x24')](_0xf39c('0xb3'),_0x4ae272,_0x447e2b,_0xf39c('0xb2'),JSON['stringify'](_0x3dd869));if(_0x5ef4b[_0xf39c('0x74')][_0xf39c('0x42')]===_0xf39c('0x82')){return _0x56cf63[_0xf39c('0x2b')](_0x447e2b)[_0xf39c('0x30')](_0xf39c('0xb4'),_0xf39c('0xb5'))['send']('\x0a');}else{return _0x56cf63['status'](_0x447e2b)[_0xf39c('0x2d')](_0x3dd869);}}})[_0xf39c('0x59')](handleError(_0x56cf63,null));};exports[_0xf39c('0xb6')]=function(_0x2fec5a,_0x34b4d1,_0x2bc65b){return db[_0xf39c('0x3f')][_0xf39c('0x69')]({'where':{'id':_0x2fec5a['params']['id']}})[_0xf39c('0x21')](handleEntityNotFound(_0x34b4d1,null))[_0xf39c('0x21')](function(_0x8f6172){if(_0x8f6172){return db[_0xf39c('0xb7')]['transaction'](function(_0x462fee){return db[_0xf39c('0x73')][_0xf39c('0x34')]({'where':{'SmsAccountId':_0x2fec5a[_0xf39c('0x5b')]['id']},'transaction':_0x462fee})[_0xf39c('0x21')](function(_0x45597d){var _0x3db88f=_[_0xf39c('0x3e')](_0x2fec5a[_0xf39c('0x5d')],function(_0x7f690b){_0x7f690b['SmsAccountId']=_0x2fec5a[_0xf39c('0x5b')]['id'];return _0x7f690b;});return db['SmsApplication'][_0xf39c('0xb8')](_0x3db88f,{'transaction':_0x462fee});});})['then'](function(){return db['SmsApplication'][_0xf39c('0xb9')]({'where':{'SmsAccountId':_0x2fec5a[_0xf39c('0x5b')]['id']},'order':_0xf39c('0x77')});});}})[_0xf39c('0x21')](respondWithResult(_0x34b4d1,null))[_0xf39c('0x59')](handleError(_0x34b4d1,null));};exports[_0xf39c('0xba')]=function(_0x438149,_0x3c79d0,_0x3cb5e4){var _0x30382b={};var _0x5ee8c6={};var _0x50bd29;var _0xa0858c;return db[_0xf39c('0x3f')][_0xf39c('0x69')]({'where':{'id':_0x438149[_0xf39c('0x5b')]['id']}})['then'](handleEntityNotFound(_0x3c79d0,null))[_0xf39c('0x21')](function(_0x1b7db5){if(_0x1b7db5){_0x50bd29=_0x1b7db5;_0x5ee8c6['model']=_[_0xf39c('0x44')](db[_0xf39c('0x73')][_0xf39c('0x40')]);_0x5ee8c6[_0xf39c('0x49')]=_['keys'](_0x438149[_0xf39c('0x49')]);_0x5ee8c6[_0xf39c('0x45')]=_[_0xf39c('0x47')](_0x5ee8c6[_0xf39c('0x43')],_0x5ee8c6['query']);_0x30382b['attributes']=_[_0xf39c('0x47')](_0x5ee8c6['model'],qs['fields'](_0x438149['query'][_0xf39c('0x48')]));_0x30382b[_0xf39c('0x46')]=_0x30382b['attributes'][_0xf39c('0x4a')]?_0x30382b[_0xf39c('0x46')]:_0x5ee8c6['model'];_0x30382b[_0xf39c('0x4d')]=qs[_0xf39c('0x4e')](_0x438149['query'][_0xf39c('0x4e')]);_0x30382b[_0xf39c('0x4f')]=qs[_0xf39c('0x45')](_[_0xf39c('0x50')](_0x438149[_0xf39c('0x49')],_0x5ee8c6['filters']));if(_0x438149['query'][_0xf39c('0x51')]){_0x30382b[_0xf39c('0x4f')]=_[_0xf39c('0x53')](_0x30382b[_0xf39c('0x4f')],{'$or':_[_0xf39c('0x3e')](_0x30382b[_0xf39c('0x46')],function(_0x4b1907){var _0x17547c={};_0x17547c[_0x4b1907]={'$like':'%'+_0x438149['query'][_0xf39c('0x51')]+'%'};return _0x17547c;})});}_0x30382b=_['merge']({},_0x30382b,_0x438149[_0xf39c('0x54')]);return _0x50bd29[_0xf39c('0xba')](_0x30382b);}})['then'](function(_0x1de3af){if(_0x1de3af){_0xa0858c=_0x1de3af[_0xf39c('0x4a')];if(!_0x438149['query'][_0xf39c('0x4b')]('nolimit')){_0x30382b[_0xf39c('0x2f')]=qs[_0xf39c('0x2f')](_0x438149[_0xf39c('0x49')][_0xf39c('0x2f')]);_0x30382b[_0xf39c('0x2e')]=qs['offset'](_0x438149['query'][_0xf39c('0x2e')]);}return _0x50bd29[_0xf39c('0xba')](_0x30382b);}})[_0xf39c('0x21')](function(_0x216d01){if(_0x216d01){return _0x216d01?{'count':_0xa0858c,'rows':_0x216d01}:null;}})['then'](respondWithResult(_0x3c79d0,null))['catch'](handleError(_0x3c79d0,null));};exports[_0xf39c('0xbb')]=function(_0x2b9a51,_0x239183,_0x3b405d){var _0x963495={'raw':![],'where':{}};var _0x1c3e6c={};var _0xed6c3={'count':0x0,'rows':[]};return db['SmsAccount'][_0xf39c('0x69')]({'where':{'id':_0x2b9a51[_0xf39c('0x5b')]['id']}})[_0xf39c('0x21')](handleEntityNotFound(_0x239183,null))[_0xf39c('0x21')](function(_0x119e9a){if(_0x119e9a){_0x1c3e6c['model']=_[_0xf39c('0x44')](db[_0xf39c('0xa1')][_0xf39c('0x40')]);_0x1c3e6c['query']=_[_0xf39c('0x44')](_0x2b9a51[_0xf39c('0x49')]);_0x1c3e6c[_0xf39c('0x45')]=_[_0xf39c('0x47')](_0x1c3e6c['model'],_0x1c3e6c[_0xf39c('0x49')]);_0x963495['attributes']=_[_0xf39c('0x47')](_0x1c3e6c['model'],qs[_0xf39c('0x48')](_0x2b9a51[_0xf39c('0x49')][_0xf39c('0x48')]));_0x963495['attributes']=_0x963495[_0xf39c('0x46')]['length']?_0x963495[_0xf39c('0x46')]:_0x1c3e6c['model'];if(!_0x2b9a51[_0xf39c('0x49')][_0xf39c('0x4b')](_0xf39c('0x4c'))){_0x963495['limit']=qs[_0xf39c('0x2f')](_0x2b9a51[_0xf39c('0x49')][_0xf39c('0x2f')]);_0x963495[_0xf39c('0x2e')]=qs['offset'](_0x2b9a51['query']['offset']);}_0x963495[_0xf39c('0x4d')]=qs[_0xf39c('0x4e')](_0x2b9a51['query'][_0xf39c('0x4e')]);_0x963495[_0xf39c('0x4f')]=qs[_0xf39c('0x45')](_[_0xf39c('0x50')](_0x2b9a51[_0xf39c('0x49')],_0x1c3e6c[_0xf39c('0x45')]));_0x963495['where'][_0xf39c('0x6a')]=_0x119e9a['id'];if(_0x2b9a51['query'][_0xf39c('0x51')]){_0x963495['where']=_['merge'](_0x963495['where'],{'$or':_[_0xf39c('0x3e')](_0x963495['attributes'],function(_0x462121){var _0x30df18={};_0x30df18[_0x462121]={'$like':'%'+_0x2b9a51[_0xf39c('0x49')]['filter']+'%'};return _0x30df18;})});}_0x963495=_[_0xf39c('0x53')]({},_0x963495,_0x2b9a51[_0xf39c('0x54')]);return db[_0xf39c('0xa1')][_0xf39c('0x55')]({'where':_0x963495[_0xf39c('0x4f')]})[_0xf39c('0x21')](function(_0x4b3156){_0xed6c3['count']=_0x4b3156;if(_0x2b9a51['query'][_0xf39c('0x56')]){_0x963495[_0xf39c('0x57')]=[{'model':db['CmContact'],'as':_0xf39c('0xbc'),'required':![]},{'model':db[_0xf39c('0xaa')],'as':_0xf39c('0xbd'),'attributes':[_0xf39c('0x39'),_0xf39c('0xbe'),_0xf39c('0xbf')],'required':![]},{'model':db['Tag'],'as':_0xf39c('0xc0'),'attributes':['id',_0xf39c('0x39'),_0xf39c('0xc1')],'where':_0x2b9a51[_0xf39c('0x49')][_0xf39c('0xc2')]?{'id':_0x2b9a51['query']['tag']}:undefined,'required':_0x2b9a51['query'][_0xf39c('0xc2')]?!![]:![]}];}return db['SmsInteraction'][_0xf39c('0x6b')](_0x963495);})['then'](function(_0x5c5d11){_0xed6c3['rows']=_0x5c5d11;return _0xed6c3;});}})[_0xf39c('0x21')](respondWithFilteredResult(_0x239183,_0x963495))[_0xf39c('0x59')](handleError(_0x239183,null));};exports[_0xf39c('0x3a')]=function(_0x3dd9cd,_0x155ba4,_0x1ccca2){var _0x5a0c6b,_0x4feef9,_0x33828f;if(_[_0xf39c('0x97')](_0x3dd9cd[_0xf39c('0x5d')][_0xf39c('0x5d')])||_0x3dd9cd[_0xf39c('0x5d')][_0xf39c('0x5d')]===''){throw new db[(_0xf39c('0x7a'))]['ValidationError'](_0xf39c('0xc3'));}if(_[_0xf39c('0x97')](_0x3dd9cd[_0xf39c('0x5d')]['to'])){throw new db[(_0xf39c('0x7a'))][(_0xf39c('0x7b'))](_0xf39c('0xc4'));}_0x5a0c6b=_0x3dd9cd[_0xf39c('0x5d')]['to'];return db[_0xf39c('0x3f')][_0xf39c('0x5c')]({'where':{'id':_0x3dd9cd[_0xf39c('0x5b')]['id']},'include':[{'model':db[_0xf39c('0x9c')],'as':_0xf39c('0xc5'),'include':[{'model':db['CmContact'],'as':_0xf39c('0x9d'),'where':{'mobile':_0x5a0c6b},'limit':0x1,'order':[[_0xf39c('0x7f'),'DESC']]}]}]})['then'](handleEntityNotFound(_0x155ba4,null))[_0xf39c('0x21')](function(_0xbb94ea){if(_0xbb94ea&&_0xbb94ea['List']){_0x4feef9=_0xbb94ea[_0xf39c('0x35')]({'plain':!![]});if(_0x4feef9[_0xf39c('0xc5')]&&_0x4feef9[_0xf39c('0xc5')][_0xf39c('0x9d')][_0xf39c('0x4a')]){return _0x4feef9[_0xf39c('0xc5')]['Contacts'][0x0];}return db[_0xf39c('0x79')][_0xf39c('0x67')](_[_0xf39c('0xa0')](_0x3dd9cd[_0xf39c('0x5d')],{'firstName':_0x5a0c6b,'mobile':_0x5a0c6b,'phone':_0x5a0c6b,'ListId':_0x4feef9['ListId']}));}})['then'](handleEntityNotFound(_0x155ba4,null))['then'](function(_0x69f80a){if(_0x69f80a){_0x33828f=_0x69f80a;return db[_0xf39c('0xa1')][_0xf39c('0x5c')]({'where':{'ContactId':_0x33828f['id'],'closed':![],'SmsAccountId':_0x4feef9['id']}})[_0xf39c('0x21')](function(_0x350ff0){if(_0x350ff0){return[_0x350ff0,![]];}return db['SmsInteraction']['create']({'UserId':_0x3dd9cd[_0xf39c('0x5e')]['id'],'ContactId':_0x33828f['id'],'SmsAccountId':_0x4feef9['id'],'phone':_0x5a0c6b,'firstMsgDirection':_0xf39c('0xc6'),'Messages':[_[_0xf39c('0x53')](_0x3dd9cd['body'],{'read':![],'body':_0x3dd9cd['body'][_0xf39c('0x5d')],'phone':_0x5a0c6b,'SmsAccountId':_0x4feef9['id'],'UserId':_0x3dd9cd['user']['id'],'ContactId':_0x33828f['id']})]},{'include':[{'model':db[_0xf39c('0xa8')],'as':_0xf39c('0xc7')}]})[_0xf39c('0x21')](function(_0x54d366){return[_0x54d366,!![]];});});}})[_0xf39c('0xc8')](function(_0x27a3a9,_0xef60d7){if(_0xef60d7){return _0x27a3a9;}return db[_0xf39c('0xa8')][_0xf39c('0x67')](_[_0xf39c('0x53')](_0x3dd9cd[_0xf39c('0x5d')],{'read':![],'body':_0x3dd9cd['body'][_0xf39c('0x5d')],'phone':_0x5a0c6b,'SmsAccountId':_0x4feef9['id'],'SmsInteractionId':_0x27a3a9['id'],'UserId':_0x3dd9cd[_0xf39c('0x5e')]['id'],'ContactId':_0x33828f['id']}))[_0xf39c('0x21')](function(_0x29a1f4){_0x27a3a9[_0xf39c('0xc9')][_0xf39c('0xc7')]=[];_0x27a3a9[_0xf39c('0xc9')][_0xf39c('0xc7')][_0xf39c('0xa4')](_0x29a1f4['dataValues']);return _0x27a3a9;});})[_0xf39c('0x21')](respondWithResult(_0x155ba4,null))[_0xf39c('0x59')](handleError(_0x155ba4,null));};exports[_0xf39c('0x2b')]=function(_0x3c061c,_0x570a74,_0x22bf3a){if(_0x3c061c[_0xf39c('0x5d')]['id']){delete _0x3c061c['body']['id'];}var _0x716b69,_0x1f82c9,_0x27cfdf;return db['SmsAccount'][_0xf39c('0x5c')]({'where':{'id':_0x3c061c[_0xf39c('0x5b')]['id']}})[_0xf39c('0x21')](handleEntityNotFound(_0x570a74,null))['then'](function(_0x3052c0){if(_0x3052c0){_0x27cfdf=_0x3052c0;logger[_0xf39c('0x24')](_0xf39c('0xb1'),'status','received\x20delivery\x20report\x20from',_0x3052c0['type'],util[_0xf39c('0xca')](_0x3c061c['body'],{'showHidden':![],'depth':null}));switch(_0x3052c0[_0xf39c('0x42')]){case _0xf39c('0xcb'):if(_0x3c061c['body'][_0xf39c('0xcc')]&&_0x3c061c[_0xf39c('0x5d')][_0xf39c('0x2b')]){_0x1f82c9=_0x3c061c[_0xf39c('0x5d')]['status'];return db[_0xf39c('0xa8')]['find']({'where':{'messageId':_0x3c061c[_0xf39c('0x5d')][_0xf39c('0xcc')]}});}break;case _0xf39c('0xcd'):if(_0x3c061c[_0xf39c('0x5d')][_0xf39c('0xce')]&&_0x3c061c['body']['statusInt']){_0x1f82c9=_0x3c061c[_0xf39c('0x5d')][_0xf39c('0xcf')];return db[_0xf39c('0xa8')][_0xf39c('0x5c')]({'where':{'messageId':_0x3c061c[_0xf39c('0x5d')][_0xf39c('0xce')]}});}break;case _0xf39c('0x8a'):if(_0x3c061c[_0xf39c('0x5d')][_0xf39c('0x8b')]&&_0x3c061c[_0xf39c('0x5d')][_0xf39c('0xd0')]){_0x1f82c9=_0x3c061c[_0xf39c('0x5d')][_0xf39c('0xd0')];return db[_0xf39c('0xa8')]['find']({'where':{'messageId':_0x3c061c[_0xf39c('0x5d')][_0xf39c('0x8b')]}});}break;case _0xf39c('0x8e'):var _0x18b872=_0x3c061c[_0xf39c('0x5d')][_0xf39c('0x8f')][0x0];if(_0x18b872[_0xf39c('0x86')]&&_0x18b872[_0xf39c('0x2b')]['groupName']==='DELIVERED'){_0x1f82c9=_0x18b872['status']['groupName'];return db[_0xf39c('0xa8')][_0xf39c('0x5c')]({'where':{'messageId':_0x18b872[_0xf39c('0x86')]}});}break;case _0xf39c('0xd1'):if(_0x3c061c[_0xf39c('0x5d')]['messageId']&&_0x3c061c[_0xf39c('0x5d')][_0xf39c('0x2b')]){_0x1f82c9=_0x3c061c[_0xf39c('0x5d')][_0xf39c('0x2b')];return db[_0xf39c('0xa8')][_0xf39c('0x5c')]({'where':{'messageId':_0x3c061c[_0xf39c('0x5d')][_0xf39c('0x86')]}});}break;case _0xf39c('0xd2'):if(_0x3c061c[_0xf39c('0x5d')][0x0][_0xf39c('0x28')]['id']){_0x1f82c9=_0x3c061c['body'][0x0][_0xf39c('0x42')];return db[_0xf39c('0xa8')]['find']({'where':{'messageId':_0x3c061c[_0xf39c('0x5d')][0x0][_0xf39c('0x28')]['id']}});}break;case _0xf39c('0x95'):if(_0x3c061c[_0xf39c('0x5d')][_0xf39c('0xd3')]&&_0x3c061c[_0xf39c('0x5d')]['status']){_0x1f82c9=_0x3c061c[_0xf39c('0x5d')][_0xf39c('0x2b')];return db[_0xf39c('0xa8')]['find']({'where':{'messageId':_0x3c061c[_0xf39c('0x5d')][_0xf39c('0xd3')]}});}break;}}})['then'](handleEntityNotFound(_0x570a74,null))[_0xf39c('0x21')](function(_0x2b03b5){if(_0x2b03b5){_0x716b69=_0x2b03b5;switch(_0x27cfdf[_0xf39c('0x42')]){case _0xf39c('0xcb'):if(_0x1f82c9===_0xf39c('0xd4')){return _0x716b69[_0xf39c('0x33')]({'read':!![]});}else{logger[_0xf39c('0x26')](_0xf39c('0xb1'),_0xf39c('0x2b'),_0xf39c('0xcb'),util['inspect'](_0x3c061c[_0xf39c('0x5d')],{'showHidden':![],'depth':null}));}break;case _0xf39c('0xcd'):if(_0x1f82c9==='1'){return _0x716b69[_0xf39c('0x33')]({'read':!![]});}else{logger['error'](_0xf39c('0xb1'),_0xf39c('0x2b'),_0xf39c('0xcb'),util[_0xf39c('0xca')](_0x3c061c[_0xf39c('0x5d')],{'showHidden':![],'depth':null}));}break;case _0xf39c('0x8a'):if(!_0x3c061c[_0xf39c('0x5d')][_0xf39c('0xd5')]&&_0x1f82c9>=0xc8&&_0x1f82c9<=0xce){return _0x716b69[_0xf39c('0x33')]({'read':!![]});}else{logger[_0xf39c('0x26')](_0xf39c('0xb1'),_0xf39c('0x2b'),_0xf39c('0x8a'),util['inspect'](_0x3c061c[_0xf39c('0x5d')],{'showHidden':![],'depth':null}));}break;case _0xf39c('0x8e'):var _0x329a61=_0x3c061c[_0xf39c('0x5d')][_0xf39c('0x8f')][0x0];if(_0x329a61[_0xf39c('0x2b')][_0xf39c('0xd6')]===_0xf39c('0xd4')){return _0x716b69[_0xf39c('0x33')]({'read':!![]});}else{logger[_0xf39c('0x26')](_0xf39c('0xb1'),'status',_0xf39c('0x8e'),util['inspect'](_0x3c061c[_0xf39c('0x5d')],{'showHidden':![],'depth':null}));}break;case _0xf39c('0xd1'):if(_0x1f82c9==_0xf39c('0xd7')||_0x1f82c9==_0xf39c('0xd8')){return _0x716b69['update']({'read':!![]});}else{logger[_0xf39c('0x26')](_0xf39c('0xb1'),'status','clickatell',util[_0xf39c('0xca')](_0x3c061c[_0xf39c('0x5d')],{'showHidden':![],'depth':null}));}break;case _0xf39c('0xd2'):if(_0x1f82c9==_0xf39c('0xd9')){return _0x716b69[_0xf39c('0x33')]({'read':!![]});}else{logger['error'](_0xf39c('0xb1'),_0xf39c('0x2b'),_0xf39c('0xd2'),util[_0xf39c('0xca')](_0x3c061c['body'],{'showHidden':![],'depth':null}));}break;case _0xf39c('0x95'):if(_0x1f82c9===_0xf39c('0xda')||_0x1f82c9===_0xf39c('0xdb')){return _0x716b69[_0xf39c('0x33')]({'read':!![]});}else{logger['error']('SmsAccount,\x20%s,\x20%s,\x20%s',_0xf39c('0x2b'),_0xf39c('0x95'),util[_0xf39c('0xca')](_0x3c061c['body'],{'showHidden':![],'depth':null}));}break;}return _0x716b69;}})[_0xf39c('0x21')](respondWithResult(_0x570a74,null))[_0xf39c('0x59')](handleError(_0x570a74,null));};exports['statusGet']=function(_0x5389bd,_0x3fd5b5,_0x43ea58){var _0x470a2f,_0x48eec6,_0x430abc;return db['SmsAccount'][_0xf39c('0x5c')]({'where':{'id':_0x5389bd[_0xf39c('0x5b')]['id']}})[_0xf39c('0x21')](handleEntityNotFound(_0x3fd5b5,null))['then'](function(_0x49dd97){if(_0x49dd97){_0x430abc=_0x49dd97;logger['debug']('SmsAccount,\x20%s,\x20%s,\x20%s',_0xf39c('0x2b'),_0xf39c('0xdc'),_0x49dd97[_0xf39c('0x42')],util[_0xf39c('0xca')](_0x5389bd[_0xf39c('0x49')],{'showHidden':![],'depth':null}));switch(_0x49dd97[_0xf39c('0x42')]){case _0xf39c('0x90'):if(_0x5389bd['query'][_0xf39c('0xdd')]&&_0x5389bd[_0xf39c('0x49')]['state']){_0x48eec6=_0x5389bd[_0xf39c('0x49')]['state'];return db[_0xf39c('0xa8')]['find']({'where':{'messageId':_0x5389bd[_0xf39c('0x49')][_0xf39c('0xdd')]}});}break;}}})[_0xf39c('0x21')](handleEntityNotFound(_0x3fd5b5,null))['then'](function(_0x546005){if(_0x546005){_0x470a2f=_0x546005;switch(_0x430abc['type']){case _0xf39c('0x90'):if(_0x48eec6==='2'||_0x48eec6==='6'){return _0x470a2f['update']({'read':!![]});}else{logger['error']('SmsAccount,\x20%s,\x20%s,\x20%s',_0xf39c('0x2b'),_0xf39c('0x90'),util[_0xf39c('0xca')](_0x5389bd[_0xf39c('0x49')],{'showHidden':![],'depth':null}));};break;}return _0x470a2f;}})['then'](respondWithResult(_0x3fd5b5,null))['catch'](handleError(_0x3fd5b5,null));};exports[_0xf39c('0xde')]=function(_0x12ef9d,_0x1aed3f,_0x4ed03a){return db[_0xf39c('0x3f')][_0xf39c('0x5c')]({'where':{'id':_0x12ef9d['params']['id']}})[_0xf39c('0x21')](handleEntityNotFound(_0x1aed3f,null))['then'](function(_0x2c2686){if(_0x2c2686){return _0x2c2686[_0xf39c('0xde')](_0x12ef9d[_0xf39c('0x5d')][_0xf39c('0x6d')],_[_0xf39c('0x9f')](_0x12ef9d['body'],[_0xf39c('0x6d'),'id'])||{})['spread'](function(_0x56c3ed){for(var _0x4994ee=0x0;_0x4994ee<_0x12ef9d[_0xf39c('0x5d')][_0xf39c('0x6d')][_0xf39c('0x4a')];_0x4994ee+=0x1){socket[_0xf39c('0xdf')](_0xf39c('0xe0'),{'UserId':_0x12ef9d[_0xf39c('0x5d')][_0xf39c('0x6d')][_0x4994ee],'SmsAccountId':_0x12ef9d[_0xf39c('0x5b')]['id']});}return _0x56c3ed;});}})['then'](respondWithResult(_0x1aed3f,null))['catch'](handleError(_0x1aed3f,null));};exports[_0xf39c('0xe1')]=function(_0x3c7dbe,_0x5088a0,_0x67a571){return db['SmsAccount'][_0xf39c('0x5c')]({'where':{'id':_0x3c7dbe[_0xf39c('0x5b')]['id']}})[_0xf39c('0x21')](handleEntityNotFound(_0x5088a0,null))[_0xf39c('0x21')](function(_0x578416){if(_0x578416){return _0x578416['removeAgents'](_0x3c7dbe['query']['ids'])[_0xf39c('0x21')](function(){if(_['isArray'](_0x3c7dbe['query']['ids'])){for(var _0x13ebf2=0x0;_0x13ebf2<_0x3c7dbe[_0xf39c('0x49')][_0xf39c('0x6d')][_0xf39c('0x4a')];_0x13ebf2+=0x1){socket[_0xf39c('0xdf')](_0xf39c('0xe2'),{'UserId':Number(_0x3c7dbe['query'][_0xf39c('0x6d')][_0x13ebf2]),'SmsAccountId':Number(_0x3c7dbe[_0xf39c('0x5b')]['id'])});}}else{socket[_0xf39c('0xdf')](_0xf39c('0xe2'),{'UserId':Number(_0x3c7dbe[_0xf39c('0x49')][_0xf39c('0x6d')]),'SmsAccountId':Number(_0x3c7dbe['params']['id'])});}});}})['then'](respondWithStatusCode(_0x5088a0,null))[_0xf39c('0x59')](handleError(_0x5088a0,null));};exports['getAgents']=function(_0x48f21e,_0x342bb0,_0x506722){var _0x5de4ee={};var _0x134e05={};var _0x54ddf5;var _0x50403c;return db[_0xf39c('0x3f')][_0xf39c('0x69')]({'where':{'id':_0x48f21e[_0xf39c('0x5b')]['id']}})[_0xf39c('0x21')](handleEntityNotFound(_0x342bb0,null))[_0xf39c('0x21')](function(_0x19f5d3){if(_0x19f5d3){_0x54ddf5=_0x19f5d3;_0x134e05[_0xf39c('0x43')]=_[_0xf39c('0x44')](db['User'][_0xf39c('0x40')]);_0x134e05[_0xf39c('0x49')]=_[_0xf39c('0x44')](_0x48f21e[_0xf39c('0x49')]);_0x134e05[_0xf39c('0x45')]=_[_0xf39c('0x47')](_0x134e05[_0xf39c('0x43')],_0x134e05[_0xf39c('0x49')]);_0x5de4ee[_0xf39c('0x46')]=_[_0xf39c('0x47')](_0x134e05[_0xf39c('0x43')],qs[_0xf39c('0x48')](_0x48f21e['query'][_0xf39c('0x48')]));_0x5de4ee[_0xf39c('0x46')]=_0x5de4ee['attributes'][_0xf39c('0x4a')]?_0x5de4ee['attributes']:_0x134e05['model'];_0x5de4ee[_0xf39c('0x4d')]=qs[_0xf39c('0x4e')](_0x48f21e[_0xf39c('0x49')][_0xf39c('0x4e')]);_0x5de4ee['where']=qs[_0xf39c('0x45')](_[_0xf39c('0x50')](_0x48f21e[_0xf39c('0x49')],_0x134e05[_0xf39c('0x45')]));if(_0x48f21e['query'][_0xf39c('0x51')]){_0x5de4ee['where']=_[_0xf39c('0x53')](_0x5de4ee[_0xf39c('0x4f')],{'$or':_[_0xf39c('0x3e')](_0x5de4ee[_0xf39c('0x46')],function(_0x26eee0){var _0x29a22a={};_0x29a22a[_0x26eee0]={'$like':'%'+_0x48f21e[_0xf39c('0x49')][_0xf39c('0x51')]+'%'};return _0x29a22a;})});}_0x5de4ee=_[_0xf39c('0x53')]({},_0x5de4ee,_0x48f21e[_0xf39c('0x54')]);return _0x54ddf5['getAgents'](_0x5de4ee);}})[_0xf39c('0x21')](function(_0x10c485){if(_0x10c485){_0x50403c=_0x10c485['length'];if(!_0x48f21e[_0xf39c('0x49')]['hasOwnProperty']('nolimit')){_0x5de4ee['limit']=qs[_0xf39c('0x2f')](_0x48f21e[_0xf39c('0x49')][_0xf39c('0x2f')]);_0x5de4ee['offset']=qs[_0xf39c('0x2e')](_0x48f21e[_0xf39c('0x49')]['offset']);}return _0x54ddf5['getAgents'](_0x5de4ee);}})['then'](function(_0x19a436){if(_0x19a436){return _0x19a436?{'count':_0x50403c,'rows':_0x19a436}:null;}})[_0xf39c('0x21')](respondWithResult(_0x342bb0,null))[_0xf39c('0x59')](handleError(_0x342bb0,null));}; \ No newline at end of file diff --git a/server/api/smsAccount/smsAccount.events.js b/server/api/smsAccount/smsAccount.events.js index 3b4d99b..4cc353f 100644 --- a/server/api/smsAccount/smsAccount.events.js +++ b/server/api/smsAccount/smsAccount.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2e36=['update','remove','emit','exports','setMaxListeners','save'];(function(_0x10d68e,_0x43f513){var _0x521d7b=function(_0x376e09){while(--_0x376e09){_0x10d68e['push'](_0x10d68e['shift']());}};_0x521d7b(++_0x43f513);}(_0x2e36,0x1f0));var _0x62e3=function(_0x575578,_0x36db03){_0x575578=_0x575578-0x0;var _0x1a8437=_0x2e36[_0x575578];return _0x1a8437;};'use strict';var EventEmitter=require('events');var SmsAccount=require('../../mysqldb')['db']['SmsAccount'];var SmsAccountEvents=new EventEmitter();SmsAccountEvents[_0x62e3('0x0')](0x0);var events={'afterCreate':_0x62e3('0x1'),'afterUpdate':_0x62e3('0x2'),'afterDestroy':_0x62e3('0x3')};function emitEvent(_0x51b62c){return function(_0x2a04c9,_0x1aae3d,_0x42f01f){SmsAccountEvents[_0x62e3('0x4')](_0x51b62c+':'+_0x2a04c9['id'],_0x2a04c9);SmsAccountEvents['emit'](_0x51b62c,_0x2a04c9);_0x42f01f(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];SmsAccount['hook'](e,emitEvent(event));}}module[_0x62e3('0x5')]=SmsAccountEvents; \ No newline at end of file +var _0x5e68=['emit','hasOwnProperty','hook','exports','../../mysqldb','SmsAccount','setMaxListeners','save','update'];(function(_0x2818d6,_0x2abafb){var _0x308370=function(_0x36ea64){while(--_0x36ea64){_0x2818d6['push'](_0x2818d6['shift']());}};_0x308370(++_0x2abafb);}(_0x5e68,0x1c6));var _0x85e6=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0x5e68[_0x501510];return _0x1e6ee5;};'use strict';var EventEmitter=require('events');var SmsAccount=require(_0x85e6('0x0'))['db'][_0x85e6('0x1')];var SmsAccountEvents=new EventEmitter();SmsAccountEvents[_0x85e6('0x2')](0x0);var events={'afterCreate':_0x85e6('0x3'),'afterUpdate':_0x85e6('0x4'),'afterDestroy':'remove'};function emitEvent(_0x1b3c98){return function(_0x5c6655,_0x492e5d,_0x2e54d7){SmsAccountEvents[_0x85e6('0x5')](_0x1b3c98+':'+_0x5c6655['id'],_0x5c6655);SmsAccountEvents[_0x85e6('0x5')](_0x1b3c98,_0x5c6655);_0x2e54d7(null);};}for(var e in events){if(events[_0x85e6('0x6')](e)){var event=events[e];SmsAccount[_0x85e6('0x7')](e,emitEvent(event));}}module[_0x85e6('0x8')]=SmsAccountEvents; \ No newline at end of file diff --git a/server/api/smsAccount/smsAccount.model.js b/server/api/smsAccount/smsAccount.model.js index b8dab6e..ead9cae 100644 --- a/server/api/smsAccount/smsAccount.model.js +++ b/server/api/smsAccount/smsAccount.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbade=['SmsAccount','sms_accounts','lodash','util','../../config/logger','api','bluebird','request-promise','path','exports'];(function(_0x46cd97,_0x1d7f12){var _0x4eeb8a=function(_0x46d6bf){while(--_0x46d6bf){_0x46cd97['push'](_0x46cd97['shift']());}};_0x4eeb8a(++_0x1d7f12);}(_0xbade,0x1ce));var _0xebad=function(_0x4e0a03,_0x5eb6b0){_0x4e0a03=_0x4e0a03-0x0;var _0x2478fc=_0xbade[_0x4e0a03];return _0x2478fc;};'use strict';var _=require(_0xebad('0x0'));var util=require(_0xebad('0x1'));var logger=require(_0xebad('0x2'))(_0xebad('0x3'));var moment=require('moment');var BPromise=require(_0xebad('0x4'));var rp=require(_0xebad('0x5'));var fs=require('fs');var path=require(_0xebad('0x6'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require('./smsAccount.attributes');module[_0xebad('0x7')]=function(_0x50be6c,_0x565498){return _0x50be6c['define'](_0xebad('0x8'),attributes,{'tableName':_0xebad('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x8727=['request-promise','rimraf','../../config/environment','./smsAccount.attributes','exports','SmsAccount','sms_accounts','util','../../config/logger','api','moment','bluebird'];(function(_0x4b87ab,_0x997398){var _0x3cb238=function(_0x5baaf5){while(--_0x5baaf5){_0x4b87ab['push'](_0x4b87ab['shift']());}};_0x3cb238(++_0x997398);}(_0x8727,0x127));var _0x7872=function(_0xf1293b,_0x465909){_0xf1293b=_0xf1293b-0x0;var _0x5e71d7=_0x8727[_0xf1293b];return _0x5e71d7;};'use strict';var _=require('lodash');var util=require(_0x7872('0x0'));var logger=require(_0x7872('0x1'))(_0x7872('0x2'));var moment=require(_0x7872('0x3'));var BPromise=require(_0x7872('0x4'));var rp=require(_0x7872('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x7872('0x6'));var config=require(_0x7872('0x7'));var attributes=require(_0x7872('0x8'));module[_0x7872('0x9')]=function(_0x43b378,_0x43b7dc){return _0x43b378['define'](_0x7872('0xa'),attributes,{'tableName':_0x7872('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/smsAccount/smsAccount.rpc.js b/server/api/smsAccount/smsAccount.rpc.js index 6b41af7..f3d93ae 100644 --- a/server/api/smsAccount/smsAccount.rpc.js +++ b/server/api/smsAccount/smsAccount.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6810=['debug','SmsAccount,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','SmsAccount,\x20%s,\x20%s','SmsAccount','options','raw','where','attributes','include','map','model','ShowSmsAccount','lodash','moment','ioredis','../../mysqldb','../../config/logger','../../config/environment','client','http','redis','defaults','localhost','./smsAccount.socket','register','request','then','info','request\x20sent'];(function(_0xcdf6cd,_0x419419){var _0x58baa8=function(_0x1000f2){while(--_0x1000f2){_0xcdf6cd['push'](_0xcdf6cd['shift']());}};_0x58baa8(++_0x419419);}(_0x6810,0x77));var _0x0681=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x6810[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x0681('0x0'));var util=require('util');var moment=require(_0x0681('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0681('0x2'));var db=require(_0x0681('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0x0681('0x4'))('rpc');var config=require(_0x0681('0x5'));var jayson=require('jayson/promise');var client=jayson[_0x0681('0x6')][_0x0681('0x7')]({'port':0x232a});config[_0x0681('0x8')]=_[_0x0681('0x9')](config[_0x0681('0x8')],{'host':_0x0681('0xa'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x0681('0x8')]));require(_0x0681('0xb'))[_0x0681('0xc')](socket);function respondWithRpcPromise(_0x319293,_0x27ce49,_0x423f16){return new BPromise(function(_0x2622b3,_0x3ba0dd){return client[_0x0681('0xd')](_0x319293,_0x423f16)[_0x0681('0xe')](function(_0x383aaa){logger[_0x0681('0xf')]('SmsAccount,\x20%s,\x20%s',_0x27ce49,_0x0681('0x10'));logger[_0x0681('0x11')](_0x0681('0x12'),_0x27ce49,_0x0681('0x10'),JSON[_0x0681('0x13')](_0x383aaa));if(_0x383aaa[_0x0681('0x14')]){if(_0x383aaa[_0x0681('0x14')]['code']===0x1f4){logger['error']('SmsAccount,\x20%s,\x20%s',_0x27ce49,_0x383aaa[_0x0681('0x14')][_0x0681('0x15')]);return _0x3ba0dd(_0x383aaa[_0x0681('0x14')][_0x0681('0x15')]);}logger[_0x0681('0x14')]('SmsAccount,\x20%s,\x20%s',_0x27ce49,_0x383aaa[_0x0681('0x14')][_0x0681('0x15')]);return _0x2622b3(_0x383aaa[_0x0681('0x14')][_0x0681('0x15')]);}else{logger[_0x0681('0xf')]('SmsAccount,\x20%s,\x20%s',_0x27ce49,'request\x20sent');_0x2622b3(_0x383aaa[_0x0681('0x16')][_0x0681('0x15')]);}})[_0x0681('0x17')](function(_0x2b8fa0){logger[_0x0681('0x14')](_0x0681('0x18'),_0x27ce49,_0x2b8fa0);_0x3ba0dd(_0x2b8fa0);});});}exports['ShowSmsAccount']=function(_0x2f1470){var _0x54077a=this;return new Promise(function(_0x476a7d,_0x3fe4dd){return db[_0x0681('0x19')]['find']({'raw':_0x2f1470[_0x0681('0x1a')]?_0x2f1470['options'][_0x0681('0x1b')]===undefined?!![]:![]:!![],'where':_0x2f1470[_0x0681('0x1a')]?_0x2f1470['options'][_0x0681('0x1c')]||null:null,'attributes':_0x2f1470['options']?_0x2f1470[_0x0681('0x1a')][_0x0681('0x1d')]||null:null,'include':_0x2f1470[_0x0681('0x1a')]?_0x2f1470['options'][_0x0681('0x1e')]?_[_0x0681('0x1f')](_0x2f1470[_0x0681('0x1a')]['include'],function(_0x5b1f61){return{'model':db[_0x5b1f61['model']],'as':_0x5b1f61['as'],'attributes':_0x5b1f61['attributes'],'include':_0x5b1f61[_0x0681('0x1e')]?_[_0x0681('0x1f')](_0x5b1f61[_0x0681('0x1e')],function(_0x1e0677){return{'model':db[_0x1e0677[_0x0681('0x20')]],'as':_0x1e0677['as'],'attributes':_0x1e0677[_0x0681('0x1d')],'include':_0x1e0677[_0x0681('0x1e')]?_[_0x0681('0x1f')](_0x1e0677['include'],function(_0x37c6e7){return{'model':db[_0x37c6e7['model']],'as':_0x37c6e7['as'],'attributes':_0x37c6e7[_0x0681('0x1d')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x3cb9ef){logger[_0x0681('0xf')](_0x0681('0x21'),_0x2f1470);logger[_0x0681('0x11')](_0x0681('0x21'),_0x2f1470,JSON[_0x0681('0x13')](_0x3cb9ef));_0x476a7d(_0x3cb9ef);})[_0x0681('0x17')](function(_0x4bdddf){logger['error'](_0x0681('0x21'),_0x4bdddf[_0x0681('0x15')],_0x2f1470);_0x3fe4dd(_0x54077a[_0x0681('0x14')](0x1f4,_0x4bdddf['message']));});});}; \ No newline at end of file +var _0x14a1=['register','request','then','info','SmsAccount,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','ShowSmsAccount','options','where','attributes','include','map','model','catch','lodash','util','moment','bluebird','ioredis','../../config/utils','../../config/logger','../../config/environment','client','redis','defaults','localhost','socket.io-emitter'];(function(_0x590b67,_0x5c47ee){var _0x1b8be3=function(_0x53cec1){while(--_0x53cec1){_0x590b67['push'](_0x590b67['shift']());}};_0x1b8be3(++_0x5c47ee);}(_0x14a1,0x6f));var _0x114a=function(_0x60d7ec,_0x999712){_0x60d7ec=_0x60d7ec-0x0;var _0x4a94e3=_0x14a1[_0x60d7ec];return _0x4a94e3;};'use strict';var _=require(_0x114a('0x0'));var util=require(_0x114a('0x1'));var moment=require(_0x114a('0x2'));var BPromise=require(_0x114a('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x114a('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x114a('0x5'));var logger=require(_0x114a('0x6'))('rpc');var config=require(_0x114a('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x114a('0x8')]['http']({'port':0x232a});config[_0x114a('0x9')]=_[_0x114a('0xa')](config[_0x114a('0x9')],{'host':_0x114a('0xb'),'port':0x18eb});var socket=require(_0x114a('0xc'))(new Redis(config['redis']));require('./smsAccount.socket')[_0x114a('0xd')](socket);function respondWithRpcPromise(_0x137619,_0x3f8b9f,_0x2d5a1c){return new BPromise(function(_0x38fb6c,_0x19703a){return client[_0x114a('0xe')](_0x137619,_0x2d5a1c)[_0x114a('0xf')](function(_0x52c24c){logger[_0x114a('0x10')](_0x114a('0x11'),_0x3f8b9f,_0x114a('0x12'));logger[_0x114a('0x13')]('SmsAccount,\x20%s,\x20%s,\x20%s',_0x3f8b9f,_0x114a('0x12'),JSON[_0x114a('0x14')](_0x52c24c));if(_0x52c24c[_0x114a('0x15')]){if(_0x52c24c[_0x114a('0x15')]['code']===0x1f4){logger[_0x114a('0x15')](_0x114a('0x11'),_0x3f8b9f,_0x52c24c[_0x114a('0x15')]['message']);return _0x19703a(_0x52c24c[_0x114a('0x15')][_0x114a('0x16')]);}logger[_0x114a('0x15')](_0x114a('0x11'),_0x3f8b9f,_0x52c24c[_0x114a('0x15')][_0x114a('0x16')]);return _0x38fb6c(_0x52c24c[_0x114a('0x15')][_0x114a('0x16')]);}else{logger[_0x114a('0x10')](_0x114a('0x11'),_0x3f8b9f,_0x114a('0x12'));_0x38fb6c(_0x52c24c['result'][_0x114a('0x16')]);}})['catch'](function(_0x10828c){logger[_0x114a('0x15')](_0x114a('0x11'),_0x3f8b9f,_0x10828c);_0x19703a(_0x10828c);});});}exports[_0x114a('0x17')]=function(_0x4bfaef){var _0x571a37=this;return new Promise(function(_0x16defd,_0x546560){return db['SmsAccount']['find']({'raw':_0x4bfaef['options']?_0x4bfaef[_0x114a('0x18')]['raw']===undefined?!![]:![]:!![],'where':_0x4bfaef[_0x114a('0x18')]?_0x4bfaef[_0x114a('0x18')][_0x114a('0x19')]||null:null,'attributes':_0x4bfaef[_0x114a('0x18')]?_0x4bfaef[_0x114a('0x18')][_0x114a('0x1a')]||null:null,'include':_0x4bfaef[_0x114a('0x18')]?_0x4bfaef[_0x114a('0x18')][_0x114a('0x1b')]?_[_0x114a('0x1c')](_0x4bfaef[_0x114a('0x18')][_0x114a('0x1b')],function(_0x2107cc){return{'model':db[_0x2107cc[_0x114a('0x1d')]],'as':_0x2107cc['as'],'attributes':_0x2107cc[_0x114a('0x1a')],'include':_0x2107cc[_0x114a('0x1b')]?_[_0x114a('0x1c')](_0x2107cc[_0x114a('0x1b')],function(_0xfc9bef){return{'model':db[_0xfc9bef[_0x114a('0x1d')]],'as':_0xfc9bef['as'],'attributes':_0xfc9bef[_0x114a('0x1a')],'include':_0xfc9bef[_0x114a('0x1b')]?_['map'](_0xfc9bef['include'],function(_0x27d971){return{'model':db[_0x27d971[_0x114a('0x1d')]],'as':_0x27d971['as'],'attributes':_0x27d971[_0x114a('0x1a')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x425cde){logger[_0x114a('0x10')](_0x114a('0x17'),_0x4bfaef);logger['debug'](_0x114a('0x17'),_0x4bfaef,JSON[_0x114a('0x14')](_0x425cde));_0x16defd(_0x425cde);})[_0x114a('0x1e')](function(_0x4221d8){logger[_0x114a('0x15')]('ShowSmsAccount',_0x4221d8['message'],_0x4bfaef);_0x546560(_0x571a37[_0x114a('0x15')](0x1f4,_0x4221d8[_0x114a('0x16')]));});});}; \ No newline at end of file diff --git a/server/api/smsAccount/smsAccount.socket.js b/server/api/smsAccount/smsAccount.socket.js index 93b1628..b703f4a 100644 --- a/server/api/smsAccount/smsAccount.socket.js +++ b/server/api/smsAccount/smsAccount.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['register','length','smsAccount:','./smsAccount.events','save','remove','emit','removeListener'];(function(_0x40a045,_0x516f0e){var _0x1a687c=function(_0x48c9fe){while(--_0x48c9fe){_0x40a045['push'](_0x40a045['shift']());}};_0x1a687c(++_0x516f0e);}(_0xa9e0,0x123));var _0x0a9e=function(_0xc6be3a,_0x540e05){_0xc6be3a=_0xc6be3a-0x0;var _0x56a310=_0xa9e0[_0xc6be3a];return _0x56a310;};'use strict';var SmsAccountEvents=require(_0x0a9e('0x0'));var events=[_0x0a9e('0x1'),_0x0a9e('0x2'),'update'];function createListener(_0x550fbc,_0x18d5c9){return function(_0x4ce2f1){_0x18d5c9[_0x0a9e('0x3')](_0x550fbc,_0x4ce2f1);};}function removeListener(_0x432180,_0x2ab90b){return function(){SmsAccountEvents[_0x0a9e('0x4')](_0x432180,_0x2ab90b);};}exports[_0x0a9e('0x5')]=function(_0x57b080){for(var _0x219af0=0x0,_0x441e3a=events[_0x0a9e('0x6')];_0x219af0<_0x441e3a;_0x219af0++){var _0x5f41ea=events[_0x219af0];var _0x503809=createListener(_0x0a9e('0x7')+_0x5f41ea,_0x57b080);SmsAccountEvents['on'](_0x5f41ea,_0x503809);}}; \ No newline at end of file +var _0xa9e0=['register','length','smsAccount:','./smsAccount.events','save','remove','emit','removeListener'];(function(_0x57b54c,_0x54ce0d){var _0x59cc19=function(_0xa33bc6){while(--_0xa33bc6){_0x57b54c['push'](_0x57b54c['shift']());}};_0x59cc19(++_0x54ce0d);}(_0xa9e0,0x123));var _0x0a9e=function(_0x433a86,_0x175b5c){_0x433a86=_0x433a86-0x0;var _0x23000c=_0xa9e0[_0x433a86];return _0x23000c;};'use strict';var SmsAccountEvents=require(_0x0a9e('0x0'));var events=[_0x0a9e('0x1'),_0x0a9e('0x2'),'update'];function createListener(_0x550fbc,_0x18d5c9){return function(_0x4ce2f1){_0x18d5c9[_0x0a9e('0x3')](_0x550fbc,_0x4ce2f1);};}function removeListener(_0x432180,_0x2ab90b){return function(){SmsAccountEvents[_0x0a9e('0x4')](_0x432180,_0x2ab90b);};}exports[_0x0a9e('0x5')]=function(_0x57b080){for(var _0x219af0=0x0,_0x441e3a=events[_0x0a9e('0x6')];_0x219af0<_0x441e3a;_0x219af0++){var _0x5f41ea=events[_0x219af0];var _0x503809=createListener(_0x0a9e('0x7')+_0x5f41ea,_0x57b080);SmsAccountEvents['on'](_0x5f41ea,_0x503809);}}; \ No newline at end of file diff --git a/server/api/smsApplication/index.js b/server/api/smsApplication/index.js index a3da0a3..f60487c 100644 --- a/server/api/smsApplication/index.js +++ b/server/api/smsApplication/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9957=['multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./smsApplication.controller','get','isAuthenticated','index','/:id','show','post','create','put','update','delete','destroy','exports'];(function(_0x92c450,_0x41f1e3){var _0x2a9599=function(_0x4f27df){while(--_0x4f27df){_0x92c450['push'](_0x92c450['shift']());}};_0x2a9599(++_0x41f1e3);}(_0x9957,0x93));var _0x7995=function(_0x3b380d,_0x4bf247){_0x3b380d=_0x3b380d-0x0;var _0x54502b=_0x9957[_0x3b380d];return _0x54502b;};'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('0xe')]('/',auth['isAuthenticated'](),controller[_0x7995('0xf')]);router[_0x7995('0x10')](_0x7995('0xc'),auth[_0x7995('0xa')](),controller[_0x7995('0x11')]);router[_0x7995('0x12')](_0x7995('0xc'),auth['isAuthenticated'](),controller[_0x7995('0x13')]);module[_0x7995('0x14')]=router; \ No newline at end of file +var _0x7217=['Router','fs-extra','../../config/environment','./smsApplication.controller','get','isAuthenticated','index','/:id','show','post','create','put','delete','destroy','exports','multer','path','connect-timeout','express'];(function(_0x3fcbcc,_0x2da6c2){var _0x2fd405=function(_0x3a69ac){while(--_0x3a69ac){_0x3fcbcc['push'](_0x3fcbcc['shift']());}};_0x2fd405(++_0x2da6c2);}(_0x7217,0x19e));var _0x7721=function(_0x4709c0,_0x3396c7){_0x4709c0=_0x4709c0-0x0;var _0x13348b=_0x7217[_0x4709c0];return _0x13348b;};'use strict';var multer=require(_0x7721('0x0'));var util=require('util');var path=require(_0x7721('0x1'));var timeout=require(_0x7721('0x2'));var express=require(_0x7721('0x3'));var router=express[_0x7721('0x4')]();var fs_extra=require(_0x7721('0x5'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x7721('0x6'));var controller=require(_0x7721('0x7'));router[_0x7721('0x8')]('/',auth[_0x7721('0x9')](),controller[_0x7721('0xa')]);router[_0x7721('0x8')](_0x7721('0xb'),auth[_0x7721('0x9')](),controller[_0x7721('0xc')]);router[_0x7721('0xd')]('/',auth[_0x7721('0x9')](),controller[_0x7721('0xe')]);router[_0x7721('0xf')](_0x7721('0xb'),auth[_0x7721('0x9')](),controller['update']);router[_0x7721('0x10')](_0x7721('0xb'),auth[_0x7721('0x9')](),controller[_0x7721('0x11')]);module[_0x7721('0x12')]=router; \ No newline at end of file diff --git a/server/api/smsApplication/smsApplication.attributes.js b/server/api/smsApplication/smsApplication.attributes.js index 007fc4f..adf01d6 100644 --- a/server/api/smsApplication/smsApplication.attributes.js +++ b/server/api/smsApplication/smsApplication.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd705=['exports','INTEGER','STRING','noop','TEXT','*,*,*,*'];(function(_0x18f12c,_0x407111){var _0x4637e3=function(_0x570a82){while(--_0x570a82){_0x18f12c['push'](_0x18f12c['shift']());}};_0x4637e3(++_0x407111);}(_0xd705,0x6c));var _0x5d70=function(_0x556f20,_0x262ee3){_0x556f20=_0x556f20-0x0;var _0x31ddcd=_0xd705[_0x556f20];return _0x31ddcd;};'use strict';var Sequelize=require('sequelize');module[_0x5d70('0x0')]={'priority':{'type':Sequelize[_0x5d70('0x1')],'allowNull':![]},'app':{'type':Sequelize[_0x5d70('0x2')],'allowNull':![],'defaultValue':_0x5d70('0x3')},'appdata':{'type':Sequelize[_0x5d70('0x4')]()},'description':{'type':Sequelize[_0x5d70('0x2')]},'interval':{'type':Sequelize[_0x5d70('0x2')],'defaultValue':_0x5d70('0x5')}}; \ No newline at end of file +var _0x9ce4=['*,*,*,*','sequelize','exports','INTEGER','STRING','noop','TEXT'];(function(_0xda24e7,_0x32fae1){var _0x4f732a=function(_0x204e30){while(--_0x204e30){_0xda24e7['push'](_0xda24e7['shift']());}};_0x4f732a(++_0x32fae1);}(_0x9ce4,0x182));var _0x49ce=function(_0x16848e,_0x8effbf){_0x16848e=_0x16848e-0x0;var _0x1c459c=_0x9ce4[_0x16848e];return _0x1c459c;};'use strict';var Sequelize=require(_0x49ce('0x0'));module[_0x49ce('0x1')]={'priority':{'type':Sequelize[_0x49ce('0x2')],'allowNull':![]},'app':{'type':Sequelize[_0x49ce('0x3')],'allowNull':![],'defaultValue':_0x49ce('0x4')},'appdata':{'type':Sequelize[_0x49ce('0x5')]()},'description':{'type':Sequelize[_0x49ce('0x3')]},'interval':{'type':Sequelize[_0x49ce('0x3')],'defaultValue':_0x49ce('0x6')}}; \ No newline at end of file diff --git a/server/api/smsApplication/smsApplication.controller.js b/server/api/smsApplication/smsApplication.controller.js index 2479198..d21fba6 100644 --- a/server/api/smsApplication/smsApplication.controller.js +++ b/server/api/smsApplication/smsApplication.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xea76=['json','undefined','count','offset','limit','set','reject','save','update','destroy','then','error','stack','name','index','map','SmsApplication','fieldName','type','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','where','merge','VIRTUAL','filter','includeAll','findAll','rawAttributes','include','catch','create','body','params','find','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end'];(function(_0x4ae829,_0x2c842c){var _0x256b31=function(_0x34f104){while(--_0x34f104){_0x4ae829['push'](_0x4ae829['shift']());}};_0x256b31(++_0x2c842c);}(_0xea76,0x74));var _0x6ea7=function(_0xcc3bf9,_0x40d4a8){_0xcc3bf9=_0xcc3bf9-0x0;var _0x5d3b54=_0xea76[_0xcc3bf9];return _0x5d3b54;};'use strict';var emlformat=require(_0x6ea7('0x0'));var rimraf=require(_0x6ea7('0x1'));var zipdir=require(_0x6ea7('0x2'));var jsonpatch=require(_0x6ea7('0x3'));var rp=require(_0x6ea7('0x4'));var moment=require(_0x6ea7('0x5'));var BPromise=require(_0x6ea7('0x6'));var Mustache=require(_0x6ea7('0x7'));var util=require(_0x6ea7('0x8'));var path=require(_0x6ea7('0x9'));var sox=require(_0x6ea7('0xa'));var csv=require(_0x6ea7('0xb'));var ejs=require(_0x6ea7('0xc'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x6ea7('0xd'));var squel=require(_0x6ea7('0xe'));var crypto=require(_0x6ea7('0xf'));var jsforce=require(_0x6ea7('0x10'));var deskjs=require(_0x6ea7('0x11'));var toCsv=require('to-csv');var querystring=require(_0x6ea7('0x12'));var Papa=require(_0x6ea7('0x13'));var Redis=require(_0x6ea7('0x14'));var authService=require('../../components/auth/service');var qs=require(_0x6ea7('0x15'));var as=require(_0x6ea7('0x16'));var hardwareService=require(_0x6ea7('0x17'));var logger=require('../../config/logger')(_0x6ea7('0x18'));var utils=require(_0x6ea7('0x19'));var config=require(_0x6ea7('0x1a'));var licenseUtil=require(_0x6ea7('0x1b'));var db=require(_0x6ea7('0x1c'))['db'];function respondWithStatusCode(_0x244fa4,_0x3e55d6){_0x3e55d6=_0x3e55d6||0xcc;return function(_0x505b56){if(_0x505b56){return _0x244fa4[_0x6ea7('0x1d')](_0x3e55d6);}return _0x244fa4[_0x6ea7('0x1e')](_0x3e55d6)[_0x6ea7('0x1f')]();};}function respondWithResult(_0x17d1e5,_0x4831c6){_0x4831c6=_0x4831c6||0xc8;return function(_0x1afb2e){if(_0x1afb2e){return _0x17d1e5[_0x6ea7('0x1e')](_0x4831c6)[_0x6ea7('0x20')](_0x1afb2e);}};}function respondWithFilteredResult(_0x5930c1,_0x403460){return function(_0x5d26aa){if(_0x5d26aa){var _0x33a07d=typeof _0x403460['offset']===_0x6ea7('0x21')&&typeof _0x403460['limit']==='undefined';var _0x4949fa=_0x5d26aa[_0x6ea7('0x22')];var _0x35fc40=_0x33a07d?0x0:_0x403460[_0x6ea7('0x23')];var _0x5b0974=_0x33a07d?_0x5d26aa['count']:_0x403460[_0x6ea7('0x23')]+_0x403460[_0x6ea7('0x24')];var _0x8f61e;if(_0x5b0974>=_0x4949fa){_0x5b0974=_0x4949fa;_0x8f61e=0xc8;}else{_0x8f61e=0xce;}_0x5930c1['status'](_0x8f61e);return _0x5930c1[_0x6ea7('0x25')]('Content-Range',_0x35fc40+'-'+_0x5b0974+'/'+_0x4949fa)['json'](_0x5d26aa);}return null;};}function patchUpdates(_0x5dd307){return function(_0x31816b){try{jsonpatch['apply'](_0x31816b,_0x5dd307,!![]);}catch(_0x6a1b88){return BPromise[_0x6ea7('0x26')](_0x6a1b88);}return _0x31816b[_0x6ea7('0x27')]();};}function saveUpdates(_0x534d89,_0x29c545){return function(_0x360cac){if(_0x360cac){return _0x360cac[_0x6ea7('0x28')](_0x534d89)['then'](function(_0x500a50){return _0x500a50;});}return null;};}function removeEntity(_0x4d11ab,_0x26d75b){return function(_0x267251){if(_0x267251){return _0x267251[_0x6ea7('0x29')]()[_0x6ea7('0x2a')](function(){_0x4d11ab[_0x6ea7('0x1e')](0xcc)['end']();});}};}function handleEntityNotFound(_0x82ab5b,_0x50b6e8){return function(_0xe2222e){if(!_0xe2222e){_0x82ab5b[_0x6ea7('0x1d')](0x194);}return _0xe2222e;};}function handleError(_0x37e09b,_0x213315){_0x213315=_0x213315||0x1f4;return function(_0x5864a8){logger[_0x6ea7('0x2b')](_0x5864a8[_0x6ea7('0x2c')]);if(_0x5864a8[_0x6ea7('0x2d')]){delete _0x5864a8[_0x6ea7('0x2d')];}_0x37e09b[_0x6ea7('0x1e')](_0x213315)['send'](_0x5864a8);};}exports[_0x6ea7('0x2e')]=function(_0xf2ff36,_0x17e3c7){var _0x166f51={},_0x47ec10={},_0x3b9e8c={'count':0x0,'rows':[]};var _0xf72876=_[_0x6ea7('0x2f')](db[_0x6ea7('0x30')]['rawAttributes'],function(_0x5d18b9){return{'name':_0x5d18b9[_0x6ea7('0x31')],'type':_0x5d18b9[_0x6ea7('0x32')]['key']};});_0x47ec10[_0x6ea7('0x33')]=_[_0x6ea7('0x2f')](_0xf72876,_0x6ea7('0x2d'));_0x47ec10[_0x6ea7('0x34')]=_[_0x6ea7('0x35')](_0xf2ff36[_0x6ea7('0x34')]);_0x47ec10[_0x6ea7('0x36')]=_[_0x6ea7('0x37')](_0x47ec10[_0x6ea7('0x33')],_0x47ec10['query']);_0x166f51['attributes']=_[_0x6ea7('0x37')](_0x47ec10[_0x6ea7('0x33')],qs[_0x6ea7('0x38')](_0xf2ff36['query'][_0x6ea7('0x38')]));_0x166f51[_0x6ea7('0x39')]=_0x166f51[_0x6ea7('0x39')][_0x6ea7('0x3a')]?_0x166f51[_0x6ea7('0x39')]:_0x47ec10[_0x6ea7('0x33')];if(!_0xf2ff36['query'][_0x6ea7('0x3b')](_0x6ea7('0x3c'))){_0x166f51[_0x6ea7('0x24')]=qs['limit'](_0xf2ff36[_0x6ea7('0x34')][_0x6ea7('0x24')]);_0x166f51[_0x6ea7('0x23')]=qs[_0x6ea7('0x23')](_0xf2ff36[_0x6ea7('0x34')][_0x6ea7('0x23')]);}_0x166f51['order']=qs['sort'](_0xf2ff36[_0x6ea7('0x34')]['sort']);_0x166f51['where']=qs[_0x6ea7('0x36')](_['pick'](_0xf2ff36[_0x6ea7('0x34')],_0x47ec10[_0x6ea7('0x36')]),_0xf72876);if(_0xf2ff36[_0x6ea7('0x34')]['filter']){_0x166f51[_0x6ea7('0x3d')]=_[_0x6ea7('0x3e')](_0x166f51['where'],{'$or':_[_0x6ea7('0x2f')](_0xf72876,function(_0x4a2269){if(_0x4a2269[_0x6ea7('0x32')]!==_0x6ea7('0x3f')){var _0xf92b85={};_0xf92b85[_0x4a2269['name']]={'$like':'%'+_0xf2ff36[_0x6ea7('0x34')][_0x6ea7('0x40')]+'%'};return _0xf92b85;}})});}_0x166f51=_[_0x6ea7('0x3e')]({},_0x166f51,_0xf2ff36['options']);var _0x18d251={'where':_0x166f51[_0x6ea7('0x3d')]};return db[_0x6ea7('0x30')]['count'](_0x18d251)[_0x6ea7('0x2a')](function(_0x4bf695){_0x3b9e8c[_0x6ea7('0x22')]=_0x4bf695;if(_0xf2ff36[_0x6ea7('0x34')][_0x6ea7('0x41')]){_0x166f51['include']=[{'all':!![]}];}return db['SmsApplication'][_0x6ea7('0x42')](_0x166f51);})[_0x6ea7('0x2a')](function(_0x14a69a){_0x3b9e8c['rows']=_0x14a69a;return _0x3b9e8c;})[_0x6ea7('0x2a')](respondWithFilteredResult(_0x17e3c7,_0x166f51))['catch'](handleError(_0x17e3c7,null));};exports['show']=function(_0xf4d43a,_0x5e58c7){var _0x3acb95={'raw':!![],'where':{'id':_0xf4d43a['params']['id']}},_0x24ac77={};_0x24ac77[_0x6ea7('0x33')]=_[_0x6ea7('0x35')](db[_0x6ea7('0x30')][_0x6ea7('0x43')]);_0x24ac77['query']=_[_0x6ea7('0x35')](_0xf4d43a[_0x6ea7('0x34')]);_0x24ac77[_0x6ea7('0x36')]=_[_0x6ea7('0x37')](_0x24ac77['model'],_0x24ac77[_0x6ea7('0x34')]);_0x3acb95[_0x6ea7('0x39')]=_[_0x6ea7('0x37')](_0x24ac77[_0x6ea7('0x33')],qs[_0x6ea7('0x38')](_0xf4d43a[_0x6ea7('0x34')]['fields']));_0x3acb95['attributes']=_0x3acb95[_0x6ea7('0x39')][_0x6ea7('0x3a')]?_0x3acb95[_0x6ea7('0x39')]:_0x24ac77[_0x6ea7('0x33')];if(_0xf4d43a[_0x6ea7('0x34')][_0x6ea7('0x41')]){_0x3acb95[_0x6ea7('0x44')]=[{'all':!![]}];}_0x3acb95=_['merge']({},_0x3acb95,_0xf4d43a['options']);return db[_0x6ea7('0x30')]['find'](_0x3acb95)[_0x6ea7('0x2a')](handleEntityNotFound(_0x5e58c7,null))['then'](respondWithResult(_0x5e58c7,null))[_0x6ea7('0x45')](handleError(_0x5e58c7,null));};exports[_0x6ea7('0x46')]=function(_0x1cb180,_0x17c758){return db[_0x6ea7('0x30')]['create'](_0x1cb180[_0x6ea7('0x47')],{})[_0x6ea7('0x2a')](respondWithResult(_0x17c758,0xc9))['catch'](handleError(_0x17c758,null));};exports['update']=function(_0x5b3f43,_0xc8d67b){if(_0x5b3f43['body']['id']){delete _0x5b3f43['body']['id'];}return db[_0x6ea7('0x30')]['find']({'where':{'id':_0x5b3f43[_0x6ea7('0x48')]['id']}})[_0x6ea7('0x2a')](handleEntityNotFound(_0xc8d67b,null))[_0x6ea7('0x2a')](saveUpdates(_0x5b3f43['body'],null))[_0x6ea7('0x2a')](respondWithResult(_0xc8d67b,null))[_0x6ea7('0x45')](handleError(_0xc8d67b,null));};exports['destroy']=function(_0x2e10c9,_0x172a38){return db[_0x6ea7('0x30')][_0x6ea7('0x49')]({'where':{'id':_0x2e10c9[_0x6ea7('0x48')]['id']}})[_0x6ea7('0x2a')](handleEntityNotFound(_0x172a38,null))['then'](removeEntity(_0x172a38,null))[_0x6ea7('0x45')](handleError(_0x172a38,null));}; \ No newline at end of file +var _0x56f0=['attributes','fields','length','hasOwnProperty','nolimit','order','sort','pick','where','type','VIRTUAL','filter','merge','options','count','include','findAll','rows','catch','show','params','body','find','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','squel','crypto','jsforce','desk.js','querystring','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','status','end','json','undefined','limit','offset','set','Content-Range','apply','reject','save','then','destroy','sendStatus','error','stack','name','send','index','SmsApplication','rawAttributes','fieldName','key','model','map','query','keys','filters','intersection'];(function(_0x130d3b,_0x2b6918){var _0x3cba4d=function(_0x17316f){while(--_0x17316f){_0x130d3b['push'](_0x130d3b['shift']());}};_0x3cba4d(++_0x2b6918);}(_0x56f0,0xb5));var _0x056f=function(_0x551ece,_0x23d845){_0x551ece=_0x551ece-0x0;var _0x24ac88=_0x56f0[_0x551ece];return _0x24ac88;};'use strict';var emlformat=require(_0x056f('0x0'));var rimraf=require(_0x056f('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x056f('0x2'));var rp=require(_0x056f('0x3'));var moment=require(_0x056f('0x4'));var BPromise=require(_0x056f('0x5'));var Mustache=require(_0x056f('0x6'));var util=require(_0x056f('0x7'));var path=require(_0x056f('0x8'));var sox=require(_0x056f('0x9'));var csv=require(_0x056f('0xa'));var ejs=require(_0x056f('0xb'));var fs=require('fs');var fs_extra=require(_0x056f('0xc'));var _=require('lodash');var squel=require(_0x056f('0xd'));var crypto=require(_0x056f('0xe'));var jsforce=require(_0x056f('0xf'));var deskjs=require(_0x056f('0x10'));var toCsv=require(_0x056f('0xa'));var querystring=require(_0x056f('0x11'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x056f('0x12'));var qs=require(_0x056f('0x13'));var as=require(_0x056f('0x14'));var hardwareService=require(_0x056f('0x15'));var logger=require(_0x056f('0x16'))(_0x056f('0x17'));var utils=require('../../config/utils');var config=require(_0x056f('0x18'));var licenseUtil=require(_0x056f('0x19'));var db=require(_0x056f('0x1a'))['db'];function respondWithStatusCode(_0x5c6a61,_0xb37c3d){_0xb37c3d=_0xb37c3d||0xcc;return function(_0x4d38f9){if(_0x4d38f9){return _0x5c6a61['sendStatus'](_0xb37c3d);}return _0x5c6a61[_0x056f('0x1b')](_0xb37c3d)[_0x056f('0x1c')]();};}function respondWithResult(_0x318ad9,_0x590f97){_0x590f97=_0x590f97||0xc8;return function(_0x1b86ce){if(_0x1b86ce){return _0x318ad9[_0x056f('0x1b')](_0x590f97)[_0x056f('0x1d')](_0x1b86ce);}};}function respondWithFilteredResult(_0x452388,_0x36c6d9){return function(_0x1b32af){if(_0x1b32af){var _0x480388=typeof _0x36c6d9['offset']===_0x056f('0x1e')&&typeof _0x36c6d9[_0x056f('0x1f')]===_0x056f('0x1e');var _0xe97bde=_0x1b32af['count'];var _0x828929=_0x480388?0x0:_0x36c6d9[_0x056f('0x20')];var _0x5a7e48=_0x480388?_0x1b32af['count']:_0x36c6d9[_0x056f('0x20')]+_0x36c6d9['limit'];var _0x4b0b3c;if(_0x5a7e48>=_0xe97bde){_0x5a7e48=_0xe97bde;_0x4b0b3c=0xc8;}else{_0x4b0b3c=0xce;}_0x452388[_0x056f('0x1b')](_0x4b0b3c);return _0x452388[_0x056f('0x21')](_0x056f('0x22'),_0x828929+'-'+_0x5a7e48+'/'+_0xe97bde)[_0x056f('0x1d')](_0x1b32af);}return null;};}function patchUpdates(_0x2b695d){return function(_0x2d04b3){try{jsonpatch[_0x056f('0x23')](_0x2d04b3,_0x2b695d,!![]);}catch(_0x3494b6){return BPromise[_0x056f('0x24')](_0x3494b6);}return _0x2d04b3[_0x056f('0x25')]();};}function saveUpdates(_0x266704,_0x4867d2){return function(_0x22dd1e){if(_0x22dd1e){return _0x22dd1e['update'](_0x266704)[_0x056f('0x26')](function(_0x157d14){return _0x157d14;});}return null;};}function removeEntity(_0x16fa1e,_0x308358){return function(_0x4d04a5){if(_0x4d04a5){return _0x4d04a5[_0x056f('0x27')]()[_0x056f('0x26')](function(){_0x16fa1e[_0x056f('0x1b')](0xcc)[_0x056f('0x1c')]();});}};}function handleEntityNotFound(_0x4ab11c,_0x5c4a5c){return function(_0x3d853c){if(!_0x3d853c){_0x4ab11c[_0x056f('0x28')](0x194);}return _0x3d853c;};}function handleError(_0x559510,_0x37128e){_0x37128e=_0x37128e||0x1f4;return function(_0x10cae6){logger[_0x056f('0x29')](_0x10cae6[_0x056f('0x2a')]);if(_0x10cae6[_0x056f('0x2b')]){delete _0x10cae6['name'];}_0x559510[_0x056f('0x1b')](_0x37128e)[_0x056f('0x2c')](_0x10cae6);};}exports[_0x056f('0x2d')]=function(_0x4976fd,_0x2db2eb){var _0x31d2e5={},_0x50cd3e={},_0x35efea={'count':0x0,'rows':[]};var _0x1c61f6=_['map'](db[_0x056f('0x2e')][_0x056f('0x2f')],function(_0x480fb1){return{'name':_0x480fb1[_0x056f('0x30')],'type':_0x480fb1['type'][_0x056f('0x31')]};});_0x50cd3e[_0x056f('0x32')]=_[_0x056f('0x33')](_0x1c61f6,_0x056f('0x2b'));_0x50cd3e[_0x056f('0x34')]=_[_0x056f('0x35')](_0x4976fd[_0x056f('0x34')]);_0x50cd3e[_0x056f('0x36')]=_[_0x056f('0x37')](_0x50cd3e[_0x056f('0x32')],_0x50cd3e['query']);_0x31d2e5[_0x056f('0x38')]=_[_0x056f('0x37')](_0x50cd3e[_0x056f('0x32')],qs[_0x056f('0x39')](_0x4976fd[_0x056f('0x34')][_0x056f('0x39')]));_0x31d2e5[_0x056f('0x38')]=_0x31d2e5[_0x056f('0x38')][_0x056f('0x3a')]?_0x31d2e5[_0x056f('0x38')]:_0x50cd3e[_0x056f('0x32')];if(!_0x4976fd[_0x056f('0x34')][_0x056f('0x3b')](_0x056f('0x3c'))){_0x31d2e5[_0x056f('0x1f')]=qs['limit'](_0x4976fd[_0x056f('0x34')]['limit']);_0x31d2e5['offset']=qs[_0x056f('0x20')](_0x4976fd['query']['offset']);}_0x31d2e5[_0x056f('0x3d')]=qs[_0x056f('0x3e')](_0x4976fd['query'][_0x056f('0x3e')]);_0x31d2e5['where']=qs[_0x056f('0x36')](_[_0x056f('0x3f')](_0x4976fd[_0x056f('0x34')],_0x50cd3e[_0x056f('0x36')]),_0x1c61f6);if(_0x4976fd[_0x056f('0x34')]['filter']){_0x31d2e5[_0x056f('0x40')]=_['merge'](_0x31d2e5['where'],{'$or':_[_0x056f('0x33')](_0x1c61f6,function(_0x1b888b){if(_0x1b888b[_0x056f('0x41')]!==_0x056f('0x42')){var _0x4792d0={};_0x4792d0[_0x1b888b[_0x056f('0x2b')]]={'$like':'%'+_0x4976fd[_0x056f('0x34')][_0x056f('0x43')]+'%'};return _0x4792d0;}})});}_0x31d2e5=_[_0x056f('0x44')]({},_0x31d2e5,_0x4976fd[_0x056f('0x45')]);var _0x3c12df={'where':_0x31d2e5[_0x056f('0x40')]};return db[_0x056f('0x2e')]['count'](_0x3c12df)[_0x056f('0x26')](function(_0x5ba0ce){_0x35efea[_0x056f('0x46')]=_0x5ba0ce;if(_0x4976fd[_0x056f('0x34')]['includeAll']){_0x31d2e5[_0x056f('0x47')]=[{'all':!![]}];}return db[_0x056f('0x2e')][_0x056f('0x48')](_0x31d2e5);})['then'](function(_0xa50b39){_0x35efea[_0x056f('0x49')]=_0xa50b39;return _0x35efea;})[_0x056f('0x26')](respondWithFilteredResult(_0x2db2eb,_0x31d2e5))[_0x056f('0x4a')](handleError(_0x2db2eb,null));};exports[_0x056f('0x4b')]=function(_0x5b384d,_0x33bff8){var _0x5d9433={'raw':!![],'where':{'id':_0x5b384d[_0x056f('0x4c')]['id']}},_0x3501f8={};_0x3501f8[_0x056f('0x32')]=_[_0x056f('0x35')](db[_0x056f('0x2e')][_0x056f('0x2f')]);_0x3501f8[_0x056f('0x34')]=_[_0x056f('0x35')](_0x5b384d[_0x056f('0x34')]);_0x3501f8[_0x056f('0x36')]=_['intersection'](_0x3501f8['model'],_0x3501f8[_0x056f('0x34')]);_0x5d9433[_0x056f('0x38')]=_['intersection'](_0x3501f8[_0x056f('0x32')],qs[_0x056f('0x39')](_0x5b384d[_0x056f('0x34')][_0x056f('0x39')]));_0x5d9433[_0x056f('0x38')]=_0x5d9433['attributes'][_0x056f('0x3a')]?_0x5d9433[_0x056f('0x38')]:_0x3501f8['model'];if(_0x5b384d['query']['includeAll']){_0x5d9433[_0x056f('0x47')]=[{'all':!![]}];}_0x5d9433=_[_0x056f('0x44')]({},_0x5d9433,_0x5b384d[_0x056f('0x45')]);return db['SmsApplication']['find'](_0x5d9433)[_0x056f('0x26')](handleEntityNotFound(_0x33bff8,null))[_0x056f('0x26')](respondWithResult(_0x33bff8,null))['catch'](handleError(_0x33bff8,null));};exports['create']=function(_0x1e9996,_0x12aff2){return db[_0x056f('0x2e')]['create'](_0x1e9996['body'],{})[_0x056f('0x26')](respondWithResult(_0x12aff2,0xc9))[_0x056f('0x4a')](handleError(_0x12aff2,null));};exports['update']=function(_0x2465d5,_0x46d3de){if(_0x2465d5[_0x056f('0x4d')]['id']){delete _0x2465d5[_0x056f('0x4d')]['id'];}return db[_0x056f('0x2e')][_0x056f('0x4e')]({'where':{'id':_0x2465d5[_0x056f('0x4c')]['id']}})[_0x056f('0x26')](handleEntityNotFound(_0x46d3de,null))[_0x056f('0x26')](saveUpdates(_0x2465d5[_0x056f('0x4d')],null))[_0x056f('0x26')](respondWithResult(_0x46d3de,null))[_0x056f('0x4a')](handleError(_0x46d3de,null));};exports[_0x056f('0x27')]=function(_0x5bf19,_0x139739){return db['SmsApplication'][_0x056f('0x4e')]({'where':{'id':_0x5bf19[_0x056f('0x4c')]['id']}})['then'](handleEntityNotFound(_0x139739,null))[_0x056f('0x26')](removeEntity(_0x139739,null))[_0x056f('0x4a')](handleError(_0x139739,null));}; \ No newline at end of file diff --git a/server/api/smsApplication/smsApplication.model.js b/server/api/smsApplication/smsApplication.model.js index 330d007..71ac170 100644 --- a/server/api/smsApplication/smsApplication.model.js +++ b/server/api/smsApplication/smsApplication.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1332=['../../config/logger','bluebird','request-promise','path','../../config/environment','./smsApplication.attributes','define','SmsApplication','sms_applications','utf8mb4_unicode_ci','lodash','util'];(function(_0x312b77,_0x312735){var _0x41efbf=function(_0x48484d){while(--_0x48484d){_0x312b77['push'](_0x312b77['shift']());}};_0x41efbf(++_0x312735);}(_0x1332,0x76));var _0x2133=function(_0x5b62ec,_0x3458dd){_0x5b62ec=_0x5b62ec-0x0;var _0x3c3085=_0x1332[_0x5b62ec];return _0x3c3085;};'use strict';var _=require(_0x2133('0x0'));var util=require(_0x2133('0x1'));var logger=require(_0x2133('0x2'))('api');var moment=require('moment');var BPromise=require(_0x2133('0x3'));var rp=require(_0x2133('0x4'));var fs=require('fs');var path=require(_0x2133('0x5'));var rimraf=require('rimraf');var config=require(_0x2133('0x6'));var attributes=require(_0x2133('0x7'));module['exports']=function(_0x134956,_0x571794){return _0x134956[_0x2133('0x8')](_0x2133('0x9'),attributes,{'tableName':_0x2133('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':_0x2133('0xb')});}; \ No newline at end of file +var _0x6921=['request-promise','rimraf','./smsApplication.attributes','exports','define','SmsApplication','sms_applications','utf8mb4','utf8mb4_unicode_ci','util','api','bluebird'];(function(_0x22b881,_0x7f8753){var _0x13ff99=function(_0x70bcb5){while(--_0x70bcb5){_0x22b881['push'](_0x22b881['shift']());}};_0x13ff99(++_0x7f8753);}(_0x6921,0x1d1));var _0x1692=function(_0x2e3c06,_0x3108dc){_0x2e3c06=_0x2e3c06-0x0;var _0x62416=_0x6921[_0x2e3c06];return _0x62416;};'use strict';var _=require('lodash');var util=require(_0x1692('0x0'));var logger=require('../../config/logger')(_0x1692('0x1'));var moment=require('moment');var BPromise=require(_0x1692('0x2'));var rp=require(_0x1692('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0x1692('0x4'));var config=require('../../config/environment');var attributes=require(_0x1692('0x5'));module[_0x1692('0x6')]=function(_0x15f20e,_0x14fbfe){return _0x15f20e[_0x1692('0x7')](_0x1692('0x8'),attributes,{'tableName':_0x1692('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x1692('0xa'),'collate':_0x1692('0xb')});}; \ No newline at end of file diff --git a/server/api/smsApplication/smsApplication.rpc.js b/server/api/smsApplication/smsApplication.rpc.js index cf30c48..f9b947a 100644 --- a/server/api/smsApplication/smsApplication.rpc.js +++ b/server/api/smsApplication/smsApplication.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8a21=['client','http','request','info','SmsApplication,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','lodash','bluebird','randomstring','ioredis','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x5ce14c,_0x4df126){var _0x30dcc4=function(_0x37d8b1){while(--_0x37d8b1){_0x5ce14c['push'](_0x5ce14c['shift']());}};_0x30dcc4(++_0x4df126);}(_0x8a21,0x1d8));var _0x18a2=function(_0x34e46d,_0x5df86a){_0x34e46d=_0x34e46d-0x0;var _0x1cc6aa=_0x8a21[_0x34e46d];return _0x1cc6aa;};'use strict';var _=require(_0x18a2('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x18a2('0x1'));var rs=require(_0x18a2('0x2'));var fs=require('fs');var Redis=require(_0x18a2('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x18a2('0x4'))(_0x18a2('0x5'));var config=require(_0x18a2('0x6'));var jayson=require(_0x18a2('0x7'));var client=jayson[_0x18a2('0x8')][_0x18a2('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x372e5e,_0x10bc0f,_0x5d030e){return new BPromise(function(_0x40d23c,_0x2ed80f){return client[_0x18a2('0xa')](_0x372e5e,_0x5d030e)['then'](function(_0x29031a){logger[_0x18a2('0xb')](_0x18a2('0xc'),_0x10bc0f,_0x18a2('0xd'));logger[_0x18a2('0xe')]('SmsApplication,\x20%s,\x20%s,\x20%s',_0x10bc0f,_0x18a2('0xd'),JSON[_0x18a2('0xf')](_0x29031a));if(_0x29031a['error']){if(_0x29031a[_0x18a2('0x10')][_0x18a2('0x11')]===0x1f4){logger['error'](_0x18a2('0xc'),_0x10bc0f,_0x29031a[_0x18a2('0x10')]['message']);return _0x2ed80f(_0x29031a[_0x18a2('0x10')][_0x18a2('0x12')]);}logger[_0x18a2('0x10')](_0x18a2('0xc'),_0x10bc0f,_0x29031a['error']['message']);return _0x40d23c(_0x29031a[_0x18a2('0x10')]['message']);}else{logger[_0x18a2('0xb')]('SmsApplication,\x20%s,\x20%s',_0x10bc0f,_0x18a2('0xd'));_0x40d23c(_0x29031a[_0x18a2('0x13')][_0x18a2('0x12')]);}})['catch'](function(_0x12b11f){logger[_0x18a2('0x10')](_0x18a2('0xc'),_0x10bc0f,_0x12b11f);_0x2ed80f(_0x12b11f);});});} \ No newline at end of file +var _0x9805=['message','result','catch','lodash','util','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','client','http','request','then','info','SmsApplication,\x20%s,\x20%s','SmsApplication,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code'];(function(_0x252171,_0x106ecc){var _0x3e558c=function(_0x803e4a){while(--_0x803e4a){_0x252171['push'](_0x252171['shift']());}};_0x3e558c(++_0x106ecc);}(_0x9805,0x18f));var _0x5980=function(_0x142a07,_0x251e3c){_0x142a07=_0x142a07-0x0;var _0x101b6d=_0x9805[_0x142a07];return _0x101b6d;};'use strict';var _=require(_0x5980('0x0'));var util=require(_0x5980('0x1'));var moment=require(_0x5980('0x2'));var BPromise=require(_0x5980('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x5980('0x4'))['db'];var utils=require(_0x5980('0x5'));var logger=require(_0x5980('0x6'))(_0x5980('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x5980('0x8')][_0x5980('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x326b9b,_0x1d6536,_0x175728){return new BPromise(function(_0x3399a9,_0xf8b3c0){return client[_0x5980('0xa')](_0x326b9b,_0x175728)[_0x5980('0xb')](function(_0x35b0ad){logger[_0x5980('0xc')](_0x5980('0xd'),_0x1d6536,'request\x20sent');logger['debug'](_0x5980('0xe'),_0x1d6536,_0x5980('0xf'),JSON[_0x5980('0x10')](_0x35b0ad));if(_0x35b0ad[_0x5980('0x11')]){if(_0x35b0ad['error'][_0x5980('0x12')]===0x1f4){logger[_0x5980('0x11')]('SmsApplication,\x20%s,\x20%s',_0x1d6536,_0x35b0ad['error'][_0x5980('0x13')]);return _0xf8b3c0(_0x35b0ad[_0x5980('0x11')][_0x5980('0x13')]);}logger[_0x5980('0x11')](_0x5980('0xd'),_0x1d6536,_0x35b0ad[_0x5980('0x11')][_0x5980('0x13')]);return _0x3399a9(_0x35b0ad[_0x5980('0x11')]['message']);}else{logger[_0x5980('0xc')]('SmsApplication,\x20%s,\x20%s',_0x1d6536,_0x5980('0xf'));_0x3399a9(_0x35b0ad[_0x5980('0x14')][_0x5980('0x13')]);}})[_0x5980('0x15')](function(_0x183261){logger['error'](_0x5980('0xd'),_0x1d6536,_0x183261);_0xf8b3c0(_0x183261);});});} \ No newline at end of file diff --git a/server/api/smsInteraction/index.js b/server/api/smsInteraction/index.js index 4433ead..c6c2fb7 100644 --- a/server/api/smsInteraction/index.js +++ b/server/api/smsInteraction/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4cf8=['/:id','/:id/messages','getMessages','/:id/download','create','post','addMessage','/:id/tags','tracked','sms','smsinteraction:addtags','addTags','put','smsinteraction:update','delete','smsinteraction:destroy','destroy','removeTags','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./smsInteraction.controller','get','isAuthenticated','describe'];(function(_0x37f8f7,_0x3437ad){var _0x2acaca=function(_0x4ac3cb){while(--_0x4ac3cb){_0x37f8f7['push'](_0x37f8f7['shift']());}};_0x2acaca(++_0x3437ad);}(_0x4cf8,0x1e1));var _0x84cf=function(_0x5d4876,_0x11e6b0){_0x5d4876=_0x5d4876-0x0;var _0x6927ac=_0x4cf8[_0x5d4876];return _0x6927ac;};'use strict';var multer=require(_0x84cf('0x0'));var util=require(_0x84cf('0x1'));var path=require(_0x84cf('0x2'));var timeout=require(_0x84cf('0x3'));var express=require(_0x84cf('0x4'));var router=express[_0x84cf('0x5')]();var fs_extra=require(_0x84cf('0x6'));var auth=require(_0x84cf('0x7'));var interaction=require(_0x84cf('0x8'));var config=require(_0x84cf('0x9'));var controller=require(_0x84cf('0xa'));router[_0x84cf('0xb')]('/',auth['isAuthenticated'](),controller['index']);router[_0x84cf('0xb')]('/describe',auth[_0x84cf('0xc')](),controller[_0x84cf('0xd')]);router['get'](_0x84cf('0xe'),auth[_0x84cf('0xc')](),controller['show']);router[_0x84cf('0xb')](_0x84cf('0xf'),auth[_0x84cf('0xc')](),controller[_0x84cf('0x10')]);router['get'](_0x84cf('0x11'),auth[_0x84cf('0xc')](),controller['download']);router['post']('/',auth[_0x84cf('0xc')](),controller[_0x84cf('0x12')]);router[_0x84cf('0x13')](_0x84cf('0xf'),auth[_0x84cf('0xc')](),controller[_0x84cf('0x14')]);router[_0x84cf('0x13')](_0x84cf('0x15'),auth[_0x84cf('0xc')](),interaction[_0x84cf('0x16')](_0x84cf('0x17'),_0x84cf('0x18')),controller[_0x84cf('0x19')]);router[_0x84cf('0x1a')](_0x84cf('0xe'),auth[_0x84cf('0xc')](),interaction[_0x84cf('0x16')](_0x84cf('0x17'),_0x84cf('0x1b')),controller['update']);router[_0x84cf('0x1c')](_0x84cf('0xe'),auth[_0x84cf('0xc')](),interaction[_0x84cf('0x16')](_0x84cf('0x17'),_0x84cf('0x1d')),controller[_0x84cf('0x1e')]);router['delete']('/:id/tags',auth[_0x84cf('0xc')](),controller[_0x84cf('0x1f')]);module[_0x84cf('0x20')]=router; \ No newline at end of file +var _0x6324=['isAuthenticated','index','describe','show','getMessages','/:id/download','download','post','addMessage','/:id/tags','tracked','sms','smsinteraction:addtags','addTags','put','smsinteraction:update','update','/:id','smsinteraction:destroy','destroy','removeTags','exports','multer','util','path','connect-timeout','Router','../../components/auth/service','../../config/environment','get'];(function(_0x342af1,_0x22c396){var _0x585593=function(_0x54f2b8){while(--_0x54f2b8){_0x342af1['push'](_0x342af1['shift']());}};_0x585593(++_0x22c396);}(_0x6324,0x142));var _0x4632=function(_0x1e3c02,_0x5c07a2){_0x1e3c02=_0x1e3c02-0x0;var _0x4d26d7=_0x6324[_0x1e3c02];return _0x4d26d7;};'use strict';var multer=require(_0x4632('0x0'));var util=require(_0x4632('0x1'));var path=require(_0x4632('0x2'));var timeout=require(_0x4632('0x3'));var express=require('express');var router=express[_0x4632('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x4632('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x4632('0x6'));var controller=require('./smsInteraction.controller');router[_0x4632('0x7')]('/',auth[_0x4632('0x8')](),controller[_0x4632('0x9')]);router[_0x4632('0x7')]('/describe',auth[_0x4632('0x8')](),controller[_0x4632('0xa')]);router[_0x4632('0x7')]('/:id',auth[_0x4632('0x8')](),controller[_0x4632('0xb')]);router['get']('/:id/messages',auth[_0x4632('0x8')](),controller[_0x4632('0xc')]);router[_0x4632('0x7')](_0x4632('0xd'),auth[_0x4632('0x8')](),controller[_0x4632('0xe')]);router[_0x4632('0xf')]('/',auth[_0x4632('0x8')](),controller['create']);router[_0x4632('0xf')]('/:id/messages',auth[_0x4632('0x8')](),controller[_0x4632('0x10')]);router[_0x4632('0xf')](_0x4632('0x11'),auth['isAuthenticated'](),interaction[_0x4632('0x12')](_0x4632('0x13'),_0x4632('0x14')),controller[_0x4632('0x15')]);router[_0x4632('0x16')]('/:id',auth['isAuthenticated'](),interaction[_0x4632('0x12')](_0x4632('0x13'),_0x4632('0x17')),controller[_0x4632('0x18')]);router['delete'](_0x4632('0x19'),auth[_0x4632('0x8')](),interaction[_0x4632('0x12')]('sms',_0x4632('0x1a')),controller[_0x4632('0x1b')]);router['delete']('/:id/tags',auth[_0x4632('0x8')](),controller[_0x4632('0x1c')]);module[_0x4632('0x1d')]=router; \ No newline at end of file diff --git a/server/api/smsInteraction/smsInteraction.attributes.js b/server/api/smsInteraction/smsInteraction.attributes.js index 2104a7e..48da20e 100644 --- a/server/api/smsInteraction/smsInteraction.attributes.js +++ b/server/api/smsInteraction/smsInteraction.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xdf98=['DATE','ENUM','out','BOOLEAN','sequelize','exports','STRING'];(function(_0x33bbee,_0x4b0ac5){var _0x55e83c=function(_0x4cc676){while(--_0x4cc676){_0x33bbee['push'](_0x33bbee['shift']());}};_0x55e83c(++_0x4b0ac5);}(_0xdf98,0xcf));var _0x8df9=function(_0x48381d,_0x4ee067){_0x48381d=_0x48381d-0x0;var _0x1431d3=_0xdf98[_0x48381d];return _0x1431d3;};'use strict';var Sequelize=require(_0x8df9('0x0'));var moment=require('moment');module[_0x8df9('0x1')]={'closed':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'closedAt':{'type':Sequelize['DATE']},'disposition':{'type':Sequelize[_0x8df9('0x2')]},'secondDisposition':{'type':Sequelize[_0x8df9('0x2')]},'thirdDisposition':{'type':Sequelize[_0x8df9('0x2')]},'note':{'type':Sequelize[_0x8df9('0x2')]},'phone':{'type':Sequelize[_0x8df9('0x2')]},'read1stAt':{'type':Sequelize[_0x8df9('0x3')]},'firstMsgDirection':{'type':Sequelize[_0x8df9('0x4')]('in',_0x8df9('0x5')),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize[_0x8df9('0x3')]},'lastMsgDirection':{'type':Sequelize['ENUM']('in',_0x8df9('0x5')),'defaultValue':'in','allowNull':![]},'autoreplyExecuted':{'type':Sequelize[_0x8df9('0x6')],'defaultValue':![]}}; \ No newline at end of file +var _0x4f0d=['STRING','out','ENUM'];(function(_0x33c580,_0x2e1dbb){var _0x122dfb=function(_0x385273){while(--_0x385273){_0x33c580['push'](_0x33c580['shift']());}};_0x122dfb(++_0x2e1dbb);}(_0x4f0d,0x1c2));var _0xd4f0=function(_0x7aad15,_0x5e7f){_0x7aad15=_0x7aad15-0x0;var _0x420c7e=_0x4f0d[_0x7aad15];return _0x420c7e;};'use strict';var Sequelize=require('sequelize');var moment=require('moment');module['exports']={'closed':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'closedAt':{'type':Sequelize['DATE']},'disposition':{'type':Sequelize[_0xd4f0('0x0')]},'secondDisposition':{'type':Sequelize[_0xd4f0('0x0')]},'thirdDisposition':{'type':Sequelize[_0xd4f0('0x0')]},'note':{'type':Sequelize['STRING']},'phone':{'type':Sequelize[_0xd4f0('0x0')]},'read1stAt':{'type':Sequelize['DATE']},'firstMsgDirection':{'type':Sequelize['ENUM']('in',_0xd4f0('0x1')),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize['DATE']},'lastMsgDirection':{'type':Sequelize[_0xd4f0('0x2')]('in',_0xd4f0('0x1')),'defaultValue':'in','allowNull':![]},'autoreplyExecuted':{'type':Sequelize['BOOLEAN'],'defaultValue':![]}}; \ No newline at end of file diff --git a/server/api/smsInteraction/smsInteraction.controller.js b/server/api/smsInteraction/smsInteraction.controller.js index fc06a48..2b11387 100644 --- a/server/api/smsInteraction/smsInteraction.controller.js +++ b/server/api/smsInteraction/smsInteraction.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfd77=['Contact','$substring','split','MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','getFullTextValue','value','ContactId','buildExpression','text','start','Tag','union','User','operator','CONCAT_WS(\x27\x20\x27,\x20o.name,\x20o.fullname)\x20LIKE\x20?','UserId','body','compact','isEmpty','i.SmsAccountId\x20IN\x20?','parse','$gte','i.createdAt\x20BETWEEN\x20?\x20AND\x20?','null','\x20=\x20?','read','`unreadMessages`\x20=\x200','`unreadMessages`\x20>\x200','tag','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','filter','replace','isNumeric','i.id\x20LIKE\x20?','i.phone\x20LIKE\x20?','MATCH\x20(me.body)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','CONCAT(c.firstName,\x20\x27\x20\x27,\x20c.lastName)\x20LIKE\x20?','group','Sequelize','QueryTypes','clone','i.id','order','DESC','t.id\x20IN\x20?','SmsAccountId','i.SmsAccountId\x20IS\x20NOT\x20NULL','user','role','getSmsAccounts','i.SmsAccountId\x20IS\x20NULL','agent','sequelize','toString','keyBy','SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)','a.key','Account.key','Account.mandatoryDisposition','CASE\x20WHEN\x20(c.firstName\x20IS\x20NOT\x20NULL\x20AND\x20c.firstName\x20<>\x20\x27\x27)\x20OR\x20(c.lastName\x20IS\x20NOT\x20NULL\x20AND\x20c.lastName\x20<>\x20\x27\x27)\x20THEN\x20CONCAT(IFNULL(c.firstName,\x20\x27\x27),\x20\x27\x20\x27,\x20IFNULL(c.lastName,\x20\x27\x27))\x20ELSE\x20\x27Unknown\x27\x20END','contactName','i.*','c.firstName','Contact.firstName','c.lastName','Contact.lastName','c.phone','c.mobile','Contact.mobile','o.fullname','Owner.fullname','Owner.internal','GROUP_CONCAT(DISTINCT\x20t.id)','groupBy','SmsInteractionId','push','all','rows','show','params','includeAll','include','merge','options','create','describe','addMessage','SmsMessage','omit','ids','getMessages','hasOwnProperty','nolimit','format','addTags','setTags','findAll','emit','smsInteractionTags:save','removeTags','download','unix','join','root','server','files','tmp','attachments','fullname','CmContact','firstName','lastName','createdAt','direction','secret','SmsAccount','Account','Owner','get','mkdirSync','Sms','N.A.','YYYY-MM-DD\x20HH:mm:ss','closed','disposition','Messages','out','System','renderFile','downloadInteraction.ejs','transcript-','.pdf','log','err','unlinkSync','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../components/export/pdf','../../config/license/hardware','../../config/environment','redis','defaults','socket.io-emitter','./smsInteraction.socket','register','sendStatus','end','status','offset','undefined','limit','count','Content-Range','json','apply','reject','update','then','destroy','stack','name','send','Users','TagIds','forEach','Tags','catch','index','map','SmsInteraction','rawAttributes','fieldName','type','model','keys','query','filters','intersection','attributes','fields','length','sort','where','pick','field','color','from','tools_tags','select','u.id','u.fullname','ui.SmsInteractionId','user_has_sms_interactions','users','sms_interactions','left_join','cm_contacts','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL','o.id\x20=\x20i.UserId','sms_accounts','sms_messages','sms_interaction_has_tags','it.SmsInteractionId\x20=\x20i.id','expr','search','conditions','find','unreadMessages','having','`\x20=\x200','`\x20>\x200'];(function(_0x36985b,_0x50096e){var _0x357d34=function(_0x52e96f){while(--_0x52e96f){_0x36985b['push'](_0x36985b['shift']());}};_0x357d34(++_0x50096e);}(_0xfd77,0x170));var _0x7fd7=function(_0x13292b,_0x53d23d){_0x13292b=_0x13292b-0x0;var _0x20d5e9=_0xfd77[_0x13292b];return _0x20d5e9;};'use strict';var emlformat=require(_0x7fd7('0x0'));var rimraf=require(_0x7fd7('0x1'));var zipdir=require(_0x7fd7('0x2'));var jsonpatch=require(_0x7fd7('0x3'));var rp=require(_0x7fd7('0x4'));var moment=require('moment');var BPromise=require(_0x7fd7('0x5'));var Mustache=require(_0x7fd7('0x6'));var util=require(_0x7fd7('0x7'));var path=require(_0x7fd7('0x8'));var sox=require(_0x7fd7('0x9'));var csv=require(_0x7fd7('0xa'));var ejs=require(_0x7fd7('0xb'));var fs=require('fs');var fs_extra=require(_0x7fd7('0xc'));var _=require(_0x7fd7('0xd'));var squel=require(_0x7fd7('0xe'));var crypto=require(_0x7fd7('0xf'));var jsforce=require(_0x7fd7('0x10'));var deskjs=require(_0x7fd7('0x11'));var toCsv=require(_0x7fd7('0xa'));var querystring=require(_0x7fd7('0x12'));var Papa=require(_0x7fd7('0x13'));var Redis=require(_0x7fd7('0x14'));var authService=require(_0x7fd7('0x15'));var qs=require(_0x7fd7('0x16'));var as=require(_0x7fd7('0x17'));var pdf=require(_0x7fd7('0x18'));var hardwareService=require(_0x7fd7('0x19'));var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require(_0x7fd7('0x1a'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];config[_0x7fd7('0x1b')]=_[_0x7fd7('0x1c')](config[_0x7fd7('0x1b')],{'host':'localhost','port':0x18eb});var socket=require(_0x7fd7('0x1d'))(new Redis(config[_0x7fd7('0x1b')]));require(_0x7fd7('0x1e'))[_0x7fd7('0x1f')](socket);function respondWithStatusCode(_0x5de7e9,_0x3425e3){_0x3425e3=_0x3425e3||0xcc;return function(_0x15aa77){if(_0x15aa77){return _0x5de7e9[_0x7fd7('0x20')](_0x3425e3);}return _0x5de7e9['status'](_0x3425e3)[_0x7fd7('0x21')]();};}function respondWithResult(_0x18c851,_0xe4f88a){_0xe4f88a=_0xe4f88a||0xc8;return function(_0xa11be6){if(_0xa11be6){return _0x18c851[_0x7fd7('0x22')](_0xe4f88a)['json'](_0xa11be6);}};}function respondWithFilteredResult(_0x411fd3,_0x2fc0a8){return function(_0x55f6f9){if(_0x55f6f9){var _0x148c08=typeof _0x2fc0a8[_0x7fd7('0x23')]===_0x7fd7('0x24')&&typeof _0x2fc0a8[_0x7fd7('0x25')]===_0x7fd7('0x24');var _0x37df11=_0x55f6f9[_0x7fd7('0x26')];var _0x2a0de2=_0x148c08?0x0:_0x2fc0a8[_0x7fd7('0x23')];var _0x5e8813=_0x148c08?_0x55f6f9['count']:_0x2fc0a8[_0x7fd7('0x23')]+_0x2fc0a8[_0x7fd7('0x25')];var _0x5356a4;if(_0x5e8813>=_0x37df11){_0x5e8813=_0x37df11;_0x5356a4=0xc8;}else{_0x5356a4=0xce;}_0x411fd3[_0x7fd7('0x22')](_0x5356a4);return _0x411fd3['set'](_0x7fd7('0x27'),_0x2a0de2+'-'+_0x5e8813+'/'+_0x37df11)[_0x7fd7('0x28')](_0x55f6f9);}return null;};}function patchUpdates(_0x2e4aa0){return function(_0x1baa70){try{jsonpatch[_0x7fd7('0x29')](_0x1baa70,_0x2e4aa0,!![]);}catch(_0x1dc5a3){return BPromise[_0x7fd7('0x2a')](_0x1dc5a3);}return _0x1baa70['save']();};}function saveUpdates(_0x5448ea,_0x1cb1c5){return function(_0x1e2ba6){if(_0x1e2ba6){return _0x1e2ba6[_0x7fd7('0x2b')](_0x5448ea)[_0x7fd7('0x2c')](function(_0x1fe463){return _0x1fe463;});}return null;};}function removeEntity(_0x42dc2c,_0x415636){return function(_0x25372f){if(_0x25372f){return _0x25372f[_0x7fd7('0x2d')]()[_0x7fd7('0x2c')](function(){_0x42dc2c[_0x7fd7('0x22')](0xcc)[_0x7fd7('0x21')]();});}};}function handleEntityNotFound(_0x274786,_0x6a5562){return function(_0x5bd88e){if(!_0x5bd88e){_0x274786[_0x7fd7('0x20')](0x194);}return _0x5bd88e;};}function handleError(_0x150045,_0x1ccf9f){_0x1ccf9f=_0x1ccf9f||0x1f4;return function(_0x2030ab){logger['error'](_0x2030ab[_0x7fd7('0x2e')]);if(_0x2030ab[_0x7fd7('0x2f')]){delete _0x2030ab[_0x7fd7('0x2f')];}_0x150045[_0x7fd7('0x22')](_0x1ccf9f)[_0x7fd7('0x30')](_0x2030ab);};}function getInteractionUsers(_0x1364f9,_0x3b99c2){return new BPromise(function(_0x44919e,_0x5bc5ac){try{if(_0x3b99c2[_0x1364f9['id']]){_0x1364f9[_0x7fd7('0x31')]=_['map'](_0x3b99c2[_0x1364f9['id']],function(_0x31bb5f){return{'id':_0x31bb5f['id'],'fullname':_0x31bb5f['fullname']};});}}catch(_0x35639b){_0x5bc5ac(_0x35639b);}_0x44919e(_0x1364f9);});}function getInteractionTags(_0x3fb166,_0xcea71f){return new BPromise(function(_0x166119,_0x55d612){try{if(_0x3fb166[_0x7fd7('0x32')]){_0x3fb166['Tags']=[];_0x3fb166[_0x7fd7('0x32')]['split'](',')[_0x7fd7('0x33')](function(_0x9470c4){_0x3fb166[_0x7fd7('0x34')]['push'](_0xcea71f[_0x9470c4]);});}delete _0x3fb166[_0x7fd7('0x32')];}catch(_0x38c7aa){_0x55d612(_0x38c7aa);}_0x166119(_0x3fb166);});}function updateSmsInteraction(_0x3dee76,_0x5d45a8,_0x11bebc){return new BPromise(function(_0x20f4d3,_0x121956){return getInteractionUsers(_0x3dee76,_0x11bebc)['then'](function(_0x2a4d48){return getInteractionTags(_0x2a4d48,_0x5d45a8);})['then'](function(_0x266a94){_0x20f4d3(_0x266a94);})[_0x7fd7('0x35')](function(_0x28810f){_0x121956(_0x28810f);});});}exports[_0x7fd7('0x36')]=function(_0x54c4b1,_0x227b61){var _0x4ad529={},_0x5300c0={},_0x37d9db={'count':0x0,'rows':[]};var _0x1665cc=_[_0x7fd7('0x37')](db[_0x7fd7('0x38')][_0x7fd7('0x39')],function(_0x49189c){return{'name':_0x49189c[_0x7fd7('0x3a')],'type':_0x49189c[_0x7fd7('0x3b')]['key']};});_0x5300c0[_0x7fd7('0x3c')]=_['map'](_0x1665cc,'name');_0x5300c0['query']=_[_0x7fd7('0x3d')](_0x54c4b1[_0x7fd7('0x3e')]);_0x5300c0[_0x7fd7('0x3f')]=_[_0x7fd7('0x40')](_0x5300c0[_0x7fd7('0x3c')],_0x5300c0[_0x7fd7('0x3e')]);_0x4ad529[_0x7fd7('0x41')]=_[_0x7fd7('0x40')](_0x5300c0[_0x7fd7('0x3c')],qs[_0x7fd7('0x42')](_0x54c4b1[_0x7fd7('0x3e')][_0x7fd7('0x42')]));_0x4ad529['attributes']=_0x4ad529[_0x7fd7('0x41')][_0x7fd7('0x43')]?_0x4ad529[_0x7fd7('0x41')]:_0x5300c0['model'];if(!_0x54c4b1['query']['hasOwnProperty']('nolimit')){_0x4ad529['limit']=qs[_0x7fd7('0x25')](_0x54c4b1[_0x7fd7('0x3e')][_0x7fd7('0x25')]);_0x4ad529[_0x7fd7('0x23')]=qs[_0x7fd7('0x23')](_0x54c4b1[_0x7fd7('0x3e')][_0x7fd7('0x23')]);}_0x4ad529['order']=qs[_0x7fd7('0x44')](_0x54c4b1[_0x7fd7('0x3e')]['sort']);_0x4ad529[_0x7fd7('0x45')]=qs[_0x7fd7('0x3f')](_[_0x7fd7('0x46')](_0x54c4b1[_0x7fd7('0x3e')],_0x5300c0[_0x7fd7('0x3f')]),_0x1665cc);var _0x13d7b1=[];var _0x314f57=squel['select']()[_0x7fd7('0x47')]('id')['field'](_0x7fd7('0x2f'))[_0x7fd7('0x47')](_0x7fd7('0x48'))[_0x7fd7('0x49')](_0x7fd7('0x4a'));var _0x182143=squel[_0x7fd7('0x4b')]()[_0x7fd7('0x47')](_0x7fd7('0x4c'))[_0x7fd7('0x47')](_0x7fd7('0x4d'))[_0x7fd7('0x47')](_0x7fd7('0x4e'))['from'](_0x7fd7('0x4f'),'ui')['left_join'](_0x7fd7('0x50'),'u','u.id\x20=\x20ui.UserId');var _0x552d9c=squel['select']()[_0x7fd7('0x49')](_0x7fd7('0x51'),'i')[_0x7fd7('0x52')](_0x7fd7('0x53'),'c',_0x7fd7('0x54'))['left_join'](_0x7fd7('0x50'),'o',_0x7fd7('0x55'))['left_join'](_0x7fd7('0x56'),'a','a.id\x20=\x20i.SmsAccountId')[_0x7fd7('0x52')](_0x7fd7('0x57'),'me','me.SmsInteractionId\x20=\x20i.id')['left_join'](_0x7fd7('0x58'),'it',_0x7fd7('0x59'))['left_join'](_0x7fd7('0x4a'),'t','t.id\x20=\x20it.TagId');var _0x474e83=squel[_0x7fd7('0x5a')]();var _0x1a1c39=[];var _0x19cec8=squel[_0x7fd7('0x5a')]();var _0x5bfac2;if(_0x54c4b1['query'][_0x7fd7('0x5b')]){_0x5bfac2=as['parseSearch'](_0x54c4b1[_0x7fd7('0x3e')][_0x7fd7('0x5b')]);var _0x1f34f6=_0x5bfac2['sqlOperator'];for(var _0x48a725=0x0;_0x48a725<_0x5bfac2[_0x7fd7('0x5c')][_0x7fd7('0x43')];_0x48a725++){var _0x462166=_0x5bfac2['conditions'][_0x48a725];var _0x3a0f64='i';var _0x183148=_[_0x7fd7('0x5d')](_0x1665cc,[_0x7fd7('0x2f'),_0x462166[_0x7fd7('0x47')]]);if(!_0x183148){switch(_0x462166[_0x7fd7('0x47')]){case _0x7fd7('0x5e'):if(_0x462166['value']==0x1){_0x552d9c[_0x7fd7('0x5f')]('`'+_0x462166[_0x7fd7('0x47')]+_0x7fd7('0x60'));}else{_0x552d9c[_0x7fd7('0x5f')]('`'+_0x462166['field']+_0x7fd7('0x61'));}break;case _0x7fd7('0x62'):if(_0x462166['operator']===_0x7fd7('0x63')){if(_0x462166['value'][_0x7fd7('0x64')]('\x20')[_0x7fd7('0x43')]>0x1){_0x474e83[_0x1f34f6](_0x7fd7('0x65'),qs[_0x7fd7('0x66')](_0x462166[_0x7fd7('0x67')]),null);}else{var _0x2c9812='%'+_0x462166[_0x7fd7('0x67')]+'%';_0x474e83[_0x1f34f6]('c.firstName\x20LIKE\x20?\x20OR\x20c.lastName\x20LIKE\x20?\x20OR\x20c.email\x20LIKE\x20?',_0x2c9812,_0x2c9812,_0x2c9812);}}else{_0x183148=_[_0x7fd7('0x5d')](_0x1665cc,[_0x7fd7('0x2f'),_0x7fd7('0x68')]);_0x462166[_0x7fd7('0x47')]=_0x7fd7('0x68');_0x28fe84=as[_0x7fd7('0x69')](_0x3a0f64,_0x183148[_0x7fd7('0x3b')],_0x462166);_0x474e83[_0x1f34f6](_0x28fe84[_0x7fd7('0x6a')],_0x28fe84[_0x7fd7('0x67')][_0x7fd7('0x6b')],_0x28fe84[_0x7fd7('0x67')]['end']);}break;case _0x7fd7('0x6c'):var _0x7a4afe=_0x462166[_0x7fd7('0x67')][_0x7fd7('0x64')](',')[_0x7fd7('0x37')](function(_0x126fe5){return Number(_0x126fe5);});_0x7a4afe[_0x7fd7('0x33')](function(_0x49da0f){_0x19cec8['or']('CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','%,'+_0x49da0f+',%');});_0x1a1c39=_[_0x7fd7('0x6d')](_0x1a1c39,_0x7a4afe);break;case _0x7fd7('0x6e'):if(_0x462166[_0x7fd7('0x6f')]==='$substring'){_0x474e83[_0x1f34f6](_0x7fd7('0x70'),'%'+_0x462166['value']+'%',null);}else{_0x183148=_[_0x7fd7('0x5d')](_0x1665cc,[_0x7fd7('0x2f'),_0x7fd7('0x71')]);_0x462166[_0x7fd7('0x47')]=_0x7fd7('0x71');_0x28fe84=as[_0x7fd7('0x69')](_0x3a0f64,_0x183148[_0x7fd7('0x3b')],_0x462166);_0x474e83[_0x1f34f6](_0x28fe84[_0x7fd7('0x6a')],_0x28fe84[_0x7fd7('0x67')]['start'],_0x28fe84[_0x7fd7('0x67')][_0x7fd7('0x21')]);}break;case _0x7fd7('0x72'):_0x28fe84=as[_0x7fd7('0x69')]('me',null,_0x462166);_0x474e83[_0x1f34f6](_0x28fe84[_0x7fd7('0x6a')],_0x28fe84['value']['start'],_0x28fe84['value'][_0x7fd7('0x21')]);break;}}else{var _0x28fe84=as[_0x7fd7('0x69')](_0x3a0f64,_0x183148[_0x7fd7('0x3b')],_0x462166);_0x474e83[_0x1f34f6](_0x28fe84[_0x7fd7('0x6a')],_0x28fe84[_0x7fd7('0x67')][_0x7fd7('0x6b')],_0x28fe84[_0x7fd7('0x67')][_0x7fd7('0x21')]);}}}else{var _0x357b71=_(_0x54c4b1[_0x7fd7('0x3e')])[_0x7fd7('0x3d')]()['map'](function(_0x12b623){return _['some'](_0x1665cc,[_0x7fd7('0x2f'),_0x12b623])?_0x12b623:undefined;})[_0x7fd7('0x73')]()[_0x7fd7('0x67')]();if(!_[_0x7fd7('0x74')](_0x357b71)){_0x357b71[_0x7fd7('0x33')](function(_0x50eb4d){if(_0x50eb4d==='SmsAccountId'){_0x552d9c[_0x7fd7('0x45')](_0x7fd7('0x75'),[]['concat'](_0x54c4b1[_0x7fd7('0x3e')][_0x50eb4d]));}else if(_0x50eb4d==='createdAt'){var _0x2693f9=JSON[_0x7fd7('0x76')](_0x54c4b1[_0x7fd7('0x3e')][_0x50eb4d])[_0x7fd7('0x77')];var _0x349cf7=JSON[_0x7fd7('0x76')](_0x54c4b1[_0x7fd7('0x3e')][_0x50eb4d])['$lte'];_0x552d9c['where'](_0x7fd7('0x78'),_0x2693f9,_0x349cf7);}else{if(_0x54c4b1[_0x7fd7('0x3e')][_0x50eb4d]===_0x7fd7('0x79')){_0x552d9c[_0x7fd7('0x45')]('i.'+_0x50eb4d+'\x20IS\x20NULL');}else{_0x552d9c[_0x7fd7('0x45')]('i.'+_0x50eb4d+_0x7fd7('0x7a'),_0x54c4b1[_0x7fd7('0x3e')][_0x50eb4d]);}}});}if(_0x54c4b1[_0x7fd7('0x3e')][_0x7fd7('0x7b')]){if(_0x54c4b1[_0x7fd7('0x3e')][_0x7fd7('0x7b')]==0x1){_0x552d9c['having'](_0x7fd7('0x7c'));}else{_0x552d9c[_0x7fd7('0x5f')](_0x7fd7('0x7d'));}}if(_0x54c4b1[_0x7fd7('0x3e')]['tag']){_0x1a1c39=_['isArray'](_0x54c4b1[_0x7fd7('0x3e')][_0x7fd7('0x7e')])?_0x54c4b1[_0x7fd7('0x3e')][_0x7fd7('0x7e')]:new Array(_0x54c4b1[_0x7fd7('0x3e')][_0x7fd7('0x7e')]);_0x1a1c39[_0x7fd7('0x33')](function(_0x16e8cd){_0x19cec8['or'](_0x7fd7('0x7f'),'%,'+_0x16e8cd+',%');});}if(_0x54c4b1[_0x7fd7('0x3e')][_0x7fd7('0x80')]){var _0x4a9269=_0x54c4b1[_0x7fd7('0x3e')][_0x7fd7('0x80')][_0x7fd7('0x81')]('\x5c','\x5c\x5c')[_0x7fd7('0x81')](/'/g,'\x27\x27');if(qs[_0x7fd7('0x82')](_0x4a9269)){_0x474e83['or'](_0x7fd7('0x83'),_0x4a9269+'%')['or'](_0x7fd7('0x84'),_0x4a9269+'%');}else{_0x474e83['or'](_0x7fd7('0x85'),qs[_0x7fd7('0x66')](_0x4a9269))['or'](_0x7fd7('0x86'),_0x4a9269+'%');}}}_0x552d9c['where'](_0x474e83);_0x552d9c[_0x7fd7('0x87')]('i.id');var _0x13f5ac={'type':db[_0x7fd7('0x88')][_0x7fd7('0x89')]['SELECT'],'raw':!![]};var _0x552140=_0x552d9c[_0x7fd7('0x8a')]();_0x552140[_0x7fd7('0x47')](_0x7fd7('0x8b'));_0x552140[_0x7fd7('0x47')]('SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)',_0x7fd7('0x5e'));if(_0x4ad529['order']){_0x4ad529['order'][_0x7fd7('0x33')](function(_0x51a349){var _0x4dbdf2=_0x51a349[0x0]==='contactName'?_0x51a349[0x0]:'i.'+_0x51a349[0x0];_0x552d9c[_0x7fd7('0x8c')](_0x4dbdf2,_0x51a349[0x1]===_0x7fd7('0x8d')?![]:!![]);});}if(!_[_0x7fd7('0x74')](_0x1a1c39)){_0x552d9c[_0x7fd7('0x5f')](_0x19cec8);_0x552140[_0x7fd7('0x45')](_0x7fd7('0x8e'),_0x1a1c39);}BPromise['resolve']()[_0x7fd7('0x2c')](function(){if(!_0x5bfac2){if(_0x54c4b1['query'][_0x7fd7('0x8f')])return;_0x552140['where'](_0x7fd7('0x90'));_0x552d9c[_0x7fd7('0x45')](_0x7fd7('0x90'));return;}if(_0x54c4b1[_0x7fd7('0x91')][_0x7fd7('0x92')]!=='agent')return;return _0x54c4b1[_0x7fd7('0x91')][_0x7fd7('0x93')]({'attributes':['id'],'raw':!![]})['then'](function(_0x712470){if(_[_0x7fd7('0x74')](_0x712470)){_0x552140[_0x7fd7('0x45')]('i.SmsAccountId\x20IS\x20NULL');_0x552d9c[_0x7fd7('0x45')](_0x7fd7('0x94'));}else{_0x552140[_0x7fd7('0x45')](_0x7fd7('0x75'),_[_0x7fd7('0x37')](_0x712470,'id'));_0x552d9c[_0x7fd7('0x45')](_0x7fd7('0x75'),_['map'](_0x712470,'id'));}});})['then'](function(){if(_0x54c4b1[_0x7fd7('0x91')][_0x7fd7('0x92')]===_0x7fd7('0x95')&&!_0x5bfac2&&!_0x54c4b1[_0x7fd7('0x3e')]['SmsAccountId'])return[];return db[_0x7fd7('0x96')]['query'](_0x552140['toString'](),_0x13f5ac);})[_0x7fd7('0x2c')](function(_0x2d6f3b){_0x37d9db['count']=_0x2d6f3b[_0x7fd7('0x43')];if(_0x37d9db['count']===0x0)return[];return db[_0x7fd7('0x96')][_0x7fd7('0x3e')](_0x314f57[_0x7fd7('0x97')](),_0x13f5ac)[_0x7fd7('0x2c')](function(_0x5baf6b){_0x13d7b1=_[_0x7fd7('0x98')](_0x5baf6b,'id');_0x13f5ac=_['merge'](_0x13f5ac,{'model':db[_0x7fd7('0x38')],'mapToModel':!![],'raw':!![],'nest':!![]});if(_0x54c4b1[_0x7fd7('0x3e')][_0x7fd7('0x42')]){_0x4ad529[_0x7fd7('0x41')][_0x7fd7('0x33')](function(_0x1fd4c2){_0x552d9c[_0x7fd7('0x47')]('i.'+_0x1fd4c2);});}else{_0x552d9c[_0x7fd7('0x47')](_0x7fd7('0x99'),_0x7fd7('0x5e'));_0x552d9c[_0x7fd7('0x47')](_0x7fd7('0x9a'),_0x7fd7('0x9b'));_0x552d9c[_0x7fd7('0x47')]('a.mandatoryDisposition',_0x7fd7('0x9c'));_0x552d9c[_0x7fd7('0x47')](_0x7fd7('0x9d'),_0x7fd7('0x9e'));_0x552d9c['field'](_0x7fd7('0x9f'));_0x552d9c[_0x7fd7('0x47')](_0x7fd7('0xa0'),_0x7fd7('0xa1'));_0x552d9c[_0x7fd7('0x47')](_0x7fd7('0xa2'),_0x7fd7('0xa3'));_0x552d9c[_0x7fd7('0x47')]('c.email','Contact.email');_0x552d9c[_0x7fd7('0x47')](_0x7fd7('0xa4'),'Contact.phone');_0x552d9c['field'](_0x7fd7('0xa5'),_0x7fd7('0xa6'));_0x552d9c[_0x7fd7('0x47')]('c.fax','Contact.fax');_0x552d9c[_0x7fd7('0x47')](_0x7fd7('0xa7'),_0x7fd7('0xa8'));_0x552d9c[_0x7fd7('0x47')]('o.internal',_0x7fd7('0xa9'));_0x552d9c['field'](_0x7fd7('0xaa'),_0x7fd7('0x32'));}if(_0x4ad529[_0x7fd7('0x25')])_0x552d9c['limit'](_0x4ad529['limit']);if(_0x4ad529[_0x7fd7('0x23')])_0x552d9c['offset'](_0x4ad529[_0x7fd7('0x23')]);return db[_0x7fd7('0x96')][_0x7fd7('0x3e')](_0x552d9c['toString'](),_0x13f5ac);})[_0x7fd7('0x2c')](function(_0x421ac5){if(_0x421ac5[_0x7fd7('0x43')]>0x0)_0x182143[_0x7fd7('0x45')]('ui.SmsInteractionId\x20IN\x20?',_[_0x7fd7('0x37')](_0x421ac5,'id'));return db[_0x7fd7('0x96')][_0x7fd7('0x3e')](_0x182143[_0x7fd7('0x97')](),_0x13f5ac)[_0x7fd7('0x2c')](function(_0x2fa852){var _0x315053=_[_0x7fd7('0xab')](_0x2fa852,_0x7fd7('0xac'));var _0x48a87f=[];_0x421ac5['forEach'](function(_0x655f6c){_0x48a87f[_0x7fd7('0xad')](updateSmsInteraction(_0x655f6c,_0x13d7b1,_0x315053));});return BPromise[_0x7fd7('0xae')](_0x48a87f);});});})[_0x7fd7('0x2c')](function(_0x2bb315){_0x37d9db[_0x7fd7('0xaf')]=_0x2bb315;return _0x37d9db;})[_0x7fd7('0x2c')](respondWithFilteredResult(_0x227b61,_0x4ad529))['catch'](handleError(_0x227b61,null));};exports[_0x7fd7('0xb0')]=function(_0x41f443,_0x1b5ca4){var _0xe2b3c2={'raw':![],'where':{'id':_0x41f443[_0x7fd7('0xb1')]['id']}},_0x160e2a={};_0x160e2a[_0x7fd7('0x3c')]=_[_0x7fd7('0x3d')](db[_0x7fd7('0x38')][_0x7fd7('0x39')]);_0x160e2a[_0x7fd7('0x3e')]=_['keys'](_0x41f443['query']);_0x160e2a[_0x7fd7('0x3f')]=_['intersection'](_0x160e2a['model'],_0x160e2a['query']);_0xe2b3c2[_0x7fd7('0x41')]=_[_0x7fd7('0x40')](_0x160e2a['model'],qs['fields'](_0x41f443[_0x7fd7('0x3e')]['fields']));_0xe2b3c2[_0x7fd7('0x41')]=_0xe2b3c2['attributes'][_0x7fd7('0x43')]?_0xe2b3c2[_0x7fd7('0x41')]:_0x160e2a['model'];if(_0x41f443[_0x7fd7('0x3e')][_0x7fd7('0xb2')]){_0xe2b3c2[_0x7fd7('0xb3')]=[{'all':!![]}];}_0xe2b3c2=_[_0x7fd7('0xb4')]({},_0xe2b3c2,_0x41f443[_0x7fd7('0xb5')]);return db['SmsInteraction'][_0x7fd7('0x5d')](_0xe2b3c2)[_0x7fd7('0x2c')](handleEntityNotFound(_0x1b5ca4,null))[_0x7fd7('0x2c')](respondWithResult(_0x1b5ca4,null))[_0x7fd7('0x35')](handleError(_0x1b5ca4,null));};exports[_0x7fd7('0xb6')]=function(_0x3b1599,_0x56eec7){return db[_0x7fd7('0x38')][_0x7fd7('0xb6')](_0x3b1599['body'],{})[_0x7fd7('0x2c')](respondWithResult(_0x56eec7,0xc9))[_0x7fd7('0x35')](handleError(_0x56eec7,null));};exports[_0x7fd7('0x2b')]=function(_0x3e1674,_0x4428e6){if(_0x3e1674[_0x7fd7('0x72')]['id']){delete _0x3e1674[_0x7fd7('0x72')]['id'];}return db[_0x7fd7('0x38')][_0x7fd7('0x5d')]({'where':{'id':_0x3e1674['params']['id']}})[_0x7fd7('0x2c')](handleEntityNotFound(_0x4428e6,null))['then'](saveUpdates(_0x3e1674['body'],null))[_0x7fd7('0x2c')](respondWithResult(_0x4428e6,null))[_0x7fd7('0x35')](handleError(_0x4428e6,null));};exports[_0x7fd7('0x2d')]=function(_0x430801,_0x5ed27c){return db[_0x7fd7('0x38')]['find']({'where':{'id':_0x430801['params']['id']}})['then'](handleEntityNotFound(_0x5ed27c,null))[_0x7fd7('0x2c')](removeEntity(_0x5ed27c,null))[_0x7fd7('0x35')](handleError(_0x5ed27c,null));};exports[_0x7fd7('0xb7')]=function(_0x4f01cf,_0x102671){return db[_0x7fd7('0x38')][_0x7fd7('0xb7')]()[_0x7fd7('0x2c')](respondWithResult(_0x102671,null))[_0x7fd7('0x35')](handleError(_0x102671,null));};exports[_0x7fd7('0xb8')]=function(_0x170a55,_0x17ba80,_0x3000ca){return db[_0x7fd7('0xb9')][_0x7fd7('0x5d')]({'where':{'id':_0x170a55[_0x7fd7('0xb1')]['id']}})[_0x7fd7('0x2c')](handleEntityNotFound(_0x17ba80,null))[_0x7fd7('0x2c')](function(_0x17dff8){if(_0x17dff8){return _0x17dff8[_0x7fd7('0xb8')](_0x170a55[_0x7fd7('0x72')]['ids'],_[_0x7fd7('0xba')](_0x170a55['body'],[_0x7fd7('0xbb'),'id'])||{});}})[_0x7fd7('0x2c')](respondWithResult(_0x17ba80,null))[_0x7fd7('0x35')](handleError(_0x17ba80,null));};exports[_0x7fd7('0xbc')]=function(_0x31688d,_0x3593a0,_0x221628){var _0x122555={'raw':![],'where':{}};var _0x4f884e={};var _0x3561a7={'count':0x0,'rows':[]};return db[_0x7fd7('0x38')]['findOne']({'where':{'id':_0x31688d[_0x7fd7('0xb1')]['id']}})[_0x7fd7('0x2c')](handleEntityNotFound(_0x3593a0,null))[_0x7fd7('0x2c')](function(_0x5d3e65){if(_0x5d3e65){_0x4f884e['model']=_[_0x7fd7('0x3d')](db[_0x7fd7('0xb9')][_0x7fd7('0x39')]);_0x4f884e[_0x7fd7('0x3e')]=_[_0x7fd7('0x3d')](_0x31688d['query']);_0x4f884e[_0x7fd7('0x3f')]=_[_0x7fd7('0x40')](_0x4f884e[_0x7fd7('0x3c')],_0x4f884e[_0x7fd7('0x3e')]);_0x122555['attributes']=_[_0x7fd7('0x40')](_0x4f884e[_0x7fd7('0x3c')],qs[_0x7fd7('0x42')](_0x31688d[_0x7fd7('0x3e')][_0x7fd7('0x42')]));_0x122555[_0x7fd7('0x41')]=_0x122555[_0x7fd7('0x41')][_0x7fd7('0x43')]?_0x122555['attributes']:_0x4f884e[_0x7fd7('0x3c')];if(!_0x31688d[_0x7fd7('0x3e')][_0x7fd7('0xbd')](_0x7fd7('0xbe'))){_0x122555[_0x7fd7('0x25')]=qs['limit'](_0x31688d[_0x7fd7('0x3e')][_0x7fd7('0x25')]);_0x122555[_0x7fd7('0x23')]=qs[_0x7fd7('0x23')](_0x31688d[_0x7fd7('0x3e')][_0x7fd7('0x23')]);}_0x122555[_0x7fd7('0x8c')]=qs[_0x7fd7('0x44')](_0x31688d[_0x7fd7('0x3e')][_0x7fd7('0x44')]);_0x122555['where']=qs[_0x7fd7('0x3f')](_[_0x7fd7('0x46')](_0x31688d['query'],_0x4f884e[_0x7fd7('0x3f')]));_0x122555[_0x7fd7('0x45')][_0x7fd7('0xac')]=_0x5d3e65['id'];if(_0x31688d['query'][_0x7fd7('0x80')]){_0x122555[_0x7fd7('0x45')]=_['merge'](_0x122555[_0x7fd7('0x45')],{'$or':_[_0x7fd7('0x37')](_0x122555[_0x7fd7('0x41')],function(_0x3b1352){var _0x47ffc3={};_0x47ffc3[_0x3b1352]={'$like':'%'+_0x31688d[_0x7fd7('0x3e')][_0x7fd7('0x80')]+'%'};return _0x47ffc3;})});}if(_0x31688d[_0x7fd7('0x3e')][_0x7fd7('0x77')]){var _0x3cf1cb=_0x31688d['query'][_0x7fd7('0x77')][_0x7fd7('0x64')](',');var _0x39d958={};_0x39d958[_0x3cf1cb[0x0]]={'$gte':moment(_0x3cf1cb[0x1])[_0x7fd7('0xbf')]('YYYY-MM-DD\x20HH:mm:ss')};_0x122555[_0x7fd7('0x45')]=_['merge'](_0x122555[_0x7fd7('0x45')],_0x39d958);}_0x122555=_[_0x7fd7('0xb4')]({},_0x122555,_0x31688d['options']);return db[_0x7fd7('0xb9')][_0x7fd7('0x26')]({'where':_0x122555[_0x7fd7('0x45')]})[_0x7fd7('0x2c')](function(_0x56d6c0){_0x3561a7[_0x7fd7('0x26')]=_0x56d6c0;if(_0x31688d['query'][_0x7fd7('0xb2')]){_0x122555['include']=[{'all':!![]}];}return db[_0x7fd7('0xb9')]['findAll'](_0x122555);})[_0x7fd7('0x2c')](function(_0x28a22d){_0x3561a7[_0x7fd7('0xaf')]=_0x28a22d;return _0x3561a7;});}})['then'](respondWithFilteredResult(_0x3593a0,_0x122555))[_0x7fd7('0x35')](handleError(_0x3593a0,null));};exports[_0x7fd7('0xc0')]=function(_0x1305af,_0x1af244,_0x44a5c4){return db[_0x7fd7('0x38')][_0x7fd7('0x5d')]({'where':{'id':_0x1305af['params']['id']}})[_0x7fd7('0x2c')](handleEntityNotFound(_0x1af244,null))['then'](function(_0x3f8b89){if(_0x3f8b89){return _0x3f8b89[_0x7fd7('0xc1')](_0x1305af[_0x7fd7('0x72')][_0x7fd7('0xbb')],_['omit'](_0x1305af[_0x7fd7('0x72')],[_0x7fd7('0xbb'),'id'])||{})['spread'](function(){return db[_0x7fd7('0x6c')][_0x7fd7('0xc2')]({'attributes':['id',_0x7fd7('0x2f'),_0x7fd7('0x48')],'where':{'id':_0x1305af[_0x7fd7('0x72')][_0x7fd7('0xbb')]}});})[_0x7fd7('0x2c')](function(_0x4957cc){socket[_0x7fd7('0xc3')](_0x7fd7('0xc4'),{'id':Number(_0x1305af[_0x7fd7('0xb1')]['id']),'tags':_0x4957cc||[]});return{'id':Number(_0x1305af[_0x7fd7('0xb1')]['id']),'tags':_0x4957cc||[]};});}})[_0x7fd7('0x2c')](respondWithResult(_0x1af244,null))[_0x7fd7('0x35')](handleError(_0x1af244,null));};exports['removeTags']=function(_0x2e81e5,_0x22c336,_0x29a507){return db[_0x7fd7('0x38')][_0x7fd7('0x5d')]({'where':{'id':_0x2e81e5[_0x7fd7('0xb1')]['id']}})[_0x7fd7('0x2c')](handleEntityNotFound(_0x22c336,null))[_0x7fd7('0x2c')](function(_0x5217be){if(_0x5217be){return _0x5217be[_0x7fd7('0xc5')](_0x2e81e5['query'][_0x7fd7('0xbb')]);}})[_0x7fd7('0x2c')](respondWithStatusCode(_0x22c336,null))[_0x7fd7('0x35')](handleError(_0x22c336,null));};exports[_0x7fd7('0xc6')]=function(_0x24e127,_0x53fe1b){var _0x5bce85=moment()[_0x7fd7('0xc7')]()[_0x7fd7('0x97')]();var _0x425cfd=path[_0x7fd7('0xc8')](config[_0x7fd7('0xc9')],_0x7fd7('0xca'),_0x7fd7('0xcb'),_0x7fd7('0xcc'));var _0x34e0f9=path['join'](config[_0x7fd7('0xc9')],_0x7fd7('0xca'),_0x7fd7('0xcb'),_0x7fd7('0xcd'));var _0x5b4bb5=path[_0x7fd7('0xc8')](_0x425cfd,_0x5bce85);var _0x28436c=util[_0x7fd7('0xbf')]('transcript-%d-%s.zip',_0x24e127['params']['id'],_0x5bce85);var _0xf2a11a=path['join'](_0x425cfd,_0x28436c);var _0x4a5d38=[];_0x4a5d38['push']({'model':db[_0x7fd7('0x6e')],'as':_0x7fd7('0x6e'),'attributes':['id',_0x7fd7('0xce')],'raw':!![]});_0x4a5d38['push']({'model':db[_0x7fd7('0xcf')],'as':_0x7fd7('0x62'),'attributes':['id',_0x7fd7('0xd0'),_0x7fd7('0xd1')],'raw':!![]});var _0x103a3e=[{'model':db['SmsMessage'],'as':'Messages','attributes':['id',_0x7fd7('0x72'),_0x7fd7('0xd2'),_0x7fd7('0xd3'),_0x7fd7('0xd4'),'read'],'include':_0x4a5d38}];_0x103a3e['push']({'model':db[_0x7fd7('0xd5')],'as':_0x7fd7('0xd6'),'attributes':['id',_0x7fd7('0x2f')]});_0x103a3e[_0x7fd7('0xad')]({'model':db[_0x7fd7('0x6e')],'as':_0x7fd7('0xd7'),'attributes':['id','fullname']});return db[_0x7fd7('0x38')][_0x7fd7('0x5d')]({'where':{'id':_0x24e127[_0x7fd7('0xb1')]['id']},'include':_0x103a3e})[_0x7fd7('0x2c')](handleEntityNotFound(_0x53fe1b,null))[_0x7fd7('0x2c')](function(_0x5557ab){if(_0x5557ab){var _0x2fd5c6=_0x5557ab[_0x7fd7('0xd8')]({'plain':!![]});fs[_0x7fd7('0xd9')](_0x5b4bb5);var _0x30d1a1={'channel':_0x7fd7('0xda'),'account':_0x2fd5c6[_0x7fd7('0xd6')][_0x7fd7('0x2f')],'agent':_0x2fd5c6['Owner']?_0x2fd5c6[_0x7fd7('0xd7')][_0x7fd7('0xce')]:_0x7fd7('0xdb'),'createdAt':moment(_0x2fd5c6[_0x7fd7('0xd2')])['format'](_0x7fd7('0xdc'))[_0x7fd7('0x97')](),'closedAt':_0x2fd5c6[_0x7fd7('0xdd')]?moment(_0x2fd5c6['closedAt'])[_0x7fd7('0xbf')](_0x7fd7('0xdc'))[_0x7fd7('0x97')]():'','disposition':_0x2fd5c6[_0x7fd7('0xde')],'messages':_(_0x2fd5c6[_0x7fd7('0xdf')])[_0x7fd7('0x80')]({'secret':![]})[_0x7fd7('0x37')](function(_0x39747b){return{'date':moment(_0x39747b[_0x7fd7('0xd2')])[_0x7fd7('0xbf')]('YYYY-MM-DD\x20HH:mm:ss')[_0x7fd7('0x97')](),'sender':_0x39747b[_0x7fd7('0xd3')]===_0x7fd7('0xe0')?_0x39747b[_0x7fd7('0x6e')]?_0x39747b[_0x7fd7('0x6e')][_0x7fd7('0xce')]:_0x7fd7('0xe1'):_0x39747b[_0x7fd7('0x62')][_0x7fd7('0xd0')]+(_0x39747b[_0x7fd7('0x62')][_0x7fd7('0xd1')]?'\x20'+_0x39747b['Contact']['lastName']:''),'body':_0x39747b[_0x7fd7('0x72')],'direction':_0x39747b['direction']==='out'?'A':'C','secret':_0x39747b[_0x7fd7('0xd4')],'read':_0x39747b[_0x7fd7('0x7b')]};})[_0x7fd7('0x67')]()};return ejs[_0x7fd7('0xe2')](path[_0x7fd7('0xc8')](config[_0x7fd7('0xc9')],_0x7fd7('0xca'),'views',_0x7fd7('0xe3')),{'interaction':_0x30d1a1})[_0x7fd7('0x2c')](function(_0xe3542c){var _0xef4080=path[_0x7fd7('0xc8')](_0x5b4bb5,_0x7fd7('0xe4')+_0x2fd5c6['id']+'-'+_0x5bce85+_0x7fd7('0xe5'));var _0x225974={'path':_0xef4080,'channel':_0x7fd7('0xda'),'interactionId':_0x2fd5c6['id']};return pdf['createPdfFromHTML'](_0xe3542c,_0x225974);})[_0x7fd7('0x2c')](function(){return new BPromise(function(_0x21ec5a,_0x146a73){zipdir(_0x5b4bb5,{'saveTo':_0xf2a11a},function(_0x3d5a86,_0x29219e){if(_0x3d5a86)return _0x146a73(_0x3d5a86);return _0x21ec5a(_0x29219e);});})[_0x7fd7('0x2c')](function(){return new BPromise(function(_0x593bec,_0xaa087){rimraf(_0x5b4bb5,function(_0x2bca56){if(_0x2bca56)_0xaa087(_0x2bca56);return _0x593bec();});});})['then'](function(){return _0x53fe1b[_0x7fd7('0xc6')](_0xf2a11a,_0x28436c,function(_0x55e6bd){if(_0x55e6bd){console[_0x7fd7('0xe6')](_0x7fd7('0xe7'),_0x55e6bd);}else{fs[_0x7fd7('0xe8')](_0xf2a11a);}});});});}else{return _0x53fe1b[_0x7fd7('0x20')](0xc8);}})[_0x7fd7('0x35')](handleError(_0x53fe1b,null));}; \ No newline at end of file +var _0xbe33=['from','tools_tags','u.id','u.fullname','user_has_sms_interactions','left_join','sms_interactions','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL','users','me.SmsInteractionId\x20=\x20i.id','it.SmsInteractionId\x20=\x20i.id','t.id\x20=\x20it.TagId','expr','search','parseSearch','conditions','unreadMessages','value','having','`\x20=\x200','`\x20>\x200','Contact','operator','$substring','MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','getFullTextValue','c.firstName\x20LIKE\x20?\x20OR\x20c.lastName\x20LIKE\x20?\x20OR\x20c.email\x20LIKE\x20?','find','ContactId','buildExpression','text','start','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','User','CONCAT_WS(\x27\x20\x27,\x20o.name,\x20o.fullname)\x20LIKE\x20?','UserId','body','some','compact','SmsAccountId','i.SmsAccountId\x20IN\x20?','createdAt','parse','$lte','null','\x20=\x20?','read','`unreadMessages`\x20=\x200','`unreadMessages`\x20>\x200','tag','filter','replace','isNumeric','i.phone\x20LIKE\x20?','MATCH\x20(me.body)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','group','Sequelize','QueryTypes','SELECT','clone','order','contactName','DESC','isEmpty','resolve','i.SmsAccountId\x20IS\x20NOT\x20NULL','user','role','agent','getSmsAccounts','i.SmsAccountId\x20IS\x20NULL','sequelize','toString','keyBy','merge','a.key','Account.key','a.mandatoryDisposition','Account.mandatoryDisposition','CASE\x20WHEN\x20(c.firstName\x20IS\x20NOT\x20NULL\x20AND\x20c.firstName\x20<>\x20\x27\x27)\x20OR\x20(c.lastName\x20IS\x20NOT\x20NULL\x20AND\x20c.lastName\x20<>\x20\x27\x27)\x20THEN\x20CONCAT(IFNULL(c.firstName,\x20\x27\x27),\x20\x27\x20\x27,\x20IFNULL(c.lastName,\x20\x27\x27))\x20ELSE\x20\x27Unknown\x27\x20END','i.*','c.firstName','Contact.firstName','c.lastName','Contact.lastName','c.email','Contact.email','c.phone','Contact.phone','c.mobile','Contact.mobile','Contact.fax','o.fullname','Owner.fullname','Owner.internal','GROUP_CONCAT(DISTINCT\x20t.id)','ui.SmsInteractionId\x20IN\x20?','SmsInteractionId','rows','catch','show','params','rawAttributes','includeAll','options','create','describe','addMessage','SmsMessage','ids','omit','getMessages','$gte','format','YYYY-MM-DD\x20HH:mm:ss','include','findAll','addTags','setTags','spread','Tag','emit','smsInteractionTags:save','removeTags','download','unix','join','server','root','files','attachments','transcript-%d-%s.zip','CmContact','firstName','lastName','SmsAccount','Owner','mkdirSync','Sms','Account','fullname','closed','closedAt','disposition','Messages','System','direction','out','secret','renderFile','views','downloadInteraction.ejs','transcript-','.pdf','log','unlinkSync','zip-dir','request-promise','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../components/export/pdf','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./smsInteraction.socket','register','sendStatus','status','json','offset','undefined','limit','count','Content-Range','apply','reject','save','update','then','destroy','end','error','stack','name','send','TagIds','Tags','split','forEach','push','index','map','SmsInteraction','type','key','model','query','keys','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','where','filters','pick','select','field'];(function(_0x48b810,_0x173a5e){var _0x23c17d=function(_0x38531e){while(--_0x38531e){_0x48b810['push'](_0x48b810['shift']());}};_0x23c17d(++_0x173a5e);}(_0xbe33,0x183));var _0x3be3=function(_0x375e6,_0x2648f7){_0x375e6=_0x375e6-0x0;var _0xa290d8=_0xbe33[_0x375e6];return _0xa290d8;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x3be3('0x0'));var jsonpatch=require('fast-json-patch');var rp=require(_0x3be3('0x1'));var moment=require('moment');var BPromise=require(_0x3be3('0x2'));var Mustache=require(_0x3be3('0x3'));var util=require(_0x3be3('0x4'));var path=require('path');var sox=require(_0x3be3('0x5'));var csv=require(_0x3be3('0x6'));var ejs=require(_0x3be3('0x7'));var fs=require('fs');var fs_extra=require(_0x3be3('0x8'));var _=require(_0x3be3('0x9'));var squel=require(_0x3be3('0xa'));var crypto=require(_0x3be3('0xb'));var jsforce=require(_0x3be3('0xc'));var deskjs=require(_0x3be3('0xd'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x3be3('0xe'));var Redis=require(_0x3be3('0xf'));var authService=require(_0x3be3('0x10'));var qs=require(_0x3be3('0x11'));var as=require(_0x3be3('0x12'));var pdf=require(_0x3be3('0x13'));var hardwareService=require(_0x3be3('0x14'));var logger=require(_0x3be3('0x15'))('api');var utils=require(_0x3be3('0x16'));var config=require(_0x3be3('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0x3be3('0x18'))['db'];config[_0x3be3('0x19')]=_[_0x3be3('0x1a')](config[_0x3be3('0x19')],{'host':_0x3be3('0x1b'),'port':0x18eb});var socket=require(_0x3be3('0x1c'))(new Redis(config['redis']));require(_0x3be3('0x1d'))[_0x3be3('0x1e')](socket);function respondWithStatusCode(_0x339eef,_0x210af3){_0x210af3=_0x210af3||0xcc;return function(_0x5425cb){if(_0x5425cb){return _0x339eef[_0x3be3('0x1f')](_0x210af3);}return _0x339eef['status'](_0x210af3)['end']();};}function respondWithResult(_0xdb3074,_0x25371d){_0x25371d=_0x25371d||0xc8;return function(_0x5ad1ee){if(_0x5ad1ee){return _0xdb3074[_0x3be3('0x20')](_0x25371d)[_0x3be3('0x21')](_0x5ad1ee);}};}function respondWithFilteredResult(_0x2ee756,_0x81ae33){return function(_0x404fc1){if(_0x404fc1){var _0x594365=typeof _0x81ae33[_0x3be3('0x22')]===_0x3be3('0x23')&&typeof _0x81ae33[_0x3be3('0x24')]==='undefined';var _0x29af12=_0x404fc1[_0x3be3('0x25')];var _0x343853=_0x594365?0x0:_0x81ae33[_0x3be3('0x22')];var _0x537046=_0x594365?_0x404fc1[_0x3be3('0x25')]:_0x81ae33['offset']+_0x81ae33[_0x3be3('0x24')];var _0x474f9f;if(_0x537046>=_0x29af12){_0x537046=_0x29af12;_0x474f9f=0xc8;}else{_0x474f9f=0xce;}_0x2ee756[_0x3be3('0x20')](_0x474f9f);return _0x2ee756['set'](_0x3be3('0x26'),_0x343853+'-'+_0x537046+'/'+_0x29af12)['json'](_0x404fc1);}return null;};}function patchUpdates(_0x45cc3f){return function(_0x58d639){try{jsonpatch[_0x3be3('0x27')](_0x58d639,_0x45cc3f,!![]);}catch(_0x4af7a2){return BPromise[_0x3be3('0x28')](_0x4af7a2);}return _0x58d639[_0x3be3('0x29')]();};}function saveUpdates(_0x533db6,_0x1e12c2){return function(_0x307490){if(_0x307490){return _0x307490[_0x3be3('0x2a')](_0x533db6)[_0x3be3('0x2b')](function(_0x2656f4){return _0x2656f4;});}return null;};}function removeEntity(_0x5a6131,_0x323711){return function(_0x176815){if(_0x176815){return _0x176815[_0x3be3('0x2c')]()[_0x3be3('0x2b')](function(){_0x5a6131[_0x3be3('0x20')](0xcc)[_0x3be3('0x2d')]();});}};}function handleEntityNotFound(_0x951437,_0x2b0d69){return function(_0x63883f){if(!_0x63883f){_0x951437[_0x3be3('0x1f')](0x194);}return _0x63883f;};}function handleError(_0x15daae,_0x2c268){_0x2c268=_0x2c268||0x1f4;return function(_0xa21c1){logger[_0x3be3('0x2e')](_0xa21c1[_0x3be3('0x2f')]);if(_0xa21c1['name']){delete _0xa21c1[_0x3be3('0x30')];}_0x15daae[_0x3be3('0x20')](_0x2c268)[_0x3be3('0x31')](_0xa21c1);};}function getInteractionUsers(_0x4c2e03,_0x374a13){return new BPromise(function(_0x26453f,_0x4c7e9d){try{if(_0x374a13[_0x4c2e03['id']]){_0x4c2e03['Users']=_['map'](_0x374a13[_0x4c2e03['id']],function(_0x403e71){return{'id':_0x403e71['id'],'fullname':_0x403e71['fullname']};});}}catch(_0x275370){_0x4c7e9d(_0x275370);}_0x26453f(_0x4c2e03);});}function getInteractionTags(_0x3bed6e,_0x73b641){return new BPromise(function(_0x22dfd8,_0x4670cd){try{if(_0x3bed6e[_0x3be3('0x32')]){_0x3bed6e[_0x3be3('0x33')]=[];_0x3bed6e[_0x3be3('0x32')][_0x3be3('0x34')](',')[_0x3be3('0x35')](function(_0x5b8985){_0x3bed6e['Tags'][_0x3be3('0x36')](_0x73b641[_0x5b8985]);});}delete _0x3bed6e[_0x3be3('0x32')];}catch(_0x1720d3){_0x4670cd(_0x1720d3);}_0x22dfd8(_0x3bed6e);});}function updateSmsInteraction(_0x347083,_0x1f7c38,_0x30feb4){return new BPromise(function(_0x53f66f,_0x2635fd){return getInteractionUsers(_0x347083,_0x30feb4)[_0x3be3('0x2b')](function(_0x1bf08c){return getInteractionTags(_0x1bf08c,_0x1f7c38);})[_0x3be3('0x2b')](function(_0x5ddb16){_0x53f66f(_0x5ddb16);})['catch'](function(_0x2fcda0){_0x2635fd(_0x2fcda0);});});}exports[_0x3be3('0x37')]=function(_0x4a3de4,_0x266a64){var _0x3b670a={},_0x4bca99={},_0x4d2a0c={'count':0x0,'rows':[]};var _0xc68639=_[_0x3be3('0x38')](db[_0x3be3('0x39')]['rawAttributes'],function(_0xd94b53){return{'name':_0xd94b53['fieldName'],'type':_0xd94b53[_0x3be3('0x3a')][_0x3be3('0x3b')]};});_0x4bca99[_0x3be3('0x3c')]=_[_0x3be3('0x38')](_0xc68639,_0x3be3('0x30'));_0x4bca99[_0x3be3('0x3d')]=_[_0x3be3('0x3e')](_0x4a3de4[_0x3be3('0x3d')]);_0x4bca99['filters']=_[_0x3be3('0x3f')](_0x4bca99[_0x3be3('0x3c')],_0x4bca99[_0x3be3('0x3d')]);_0x3b670a[_0x3be3('0x40')]=_[_0x3be3('0x3f')](_0x4bca99['model'],qs[_0x3be3('0x41')](_0x4a3de4[_0x3be3('0x3d')]['fields']));_0x3b670a['attributes']=_0x3b670a[_0x3be3('0x40')][_0x3be3('0x42')]?_0x3b670a[_0x3be3('0x40')]:_0x4bca99[_0x3be3('0x3c')];if(!_0x4a3de4[_0x3be3('0x3d')][_0x3be3('0x43')](_0x3be3('0x44'))){_0x3b670a[_0x3be3('0x24')]=qs[_0x3be3('0x24')](_0x4a3de4[_0x3be3('0x3d')][_0x3be3('0x24')]);_0x3b670a['offset']=qs[_0x3be3('0x22')](_0x4a3de4['query'][_0x3be3('0x22')]);}_0x3b670a['order']=qs[_0x3be3('0x45')](_0x4a3de4[_0x3be3('0x3d')][_0x3be3('0x45')]);_0x3b670a[_0x3be3('0x46')]=qs[_0x3be3('0x47')](_[_0x3be3('0x48')](_0x4a3de4[_0x3be3('0x3d')],_0x4bca99[_0x3be3('0x47')]),_0xc68639);var _0xb8f870=[];var _0xa5e61e=squel[_0x3be3('0x49')]()[_0x3be3('0x4a')]('id')[_0x3be3('0x4a')](_0x3be3('0x30'))[_0x3be3('0x4a')]('color')[_0x3be3('0x4b')](_0x3be3('0x4c'));var _0x312392=squel[_0x3be3('0x49')]()[_0x3be3('0x4a')](_0x3be3('0x4d'))[_0x3be3('0x4a')](_0x3be3('0x4e'))[_0x3be3('0x4a')]('ui.SmsInteractionId')['from'](_0x3be3('0x4f'),'ui')[_0x3be3('0x50')]('users','u','u.id\x20=\x20ui.UserId');var _0x5df015=squel['select']()['from'](_0x3be3('0x51'),'i')[_0x3be3('0x50')]('cm_contacts','c',_0x3be3('0x52'))[_0x3be3('0x50')](_0x3be3('0x53'),'o','o.id\x20=\x20i.UserId')[_0x3be3('0x50')]('sms_accounts','a','a.id\x20=\x20i.SmsAccountId')[_0x3be3('0x50')]('sms_messages','me',_0x3be3('0x54'))['left_join']('sms_interaction_has_tags','it',_0x3be3('0x55'))['left_join'](_0x3be3('0x4c'),'t',_0x3be3('0x56'));var _0x4e80ac=squel[_0x3be3('0x57')]();var _0x362fef=[];var _0x451177=squel[_0x3be3('0x57')]();var _0x178390;if(_0x4a3de4['query'][_0x3be3('0x58')]){_0x178390=as[_0x3be3('0x59')](_0x4a3de4[_0x3be3('0x3d')][_0x3be3('0x58')]);var _0x28da28=_0x178390['sqlOperator'];for(var _0xfb967f=0x0;_0xfb967f<_0x178390[_0x3be3('0x5a')][_0x3be3('0x42')];_0xfb967f++){var _0xcffc3c=_0x178390['conditions'][_0xfb967f];var _0x42ed23='i';var _0x5c146e=_['find'](_0xc68639,[_0x3be3('0x30'),_0xcffc3c['field']]);if(!_0x5c146e){switch(_0xcffc3c[_0x3be3('0x4a')]){case _0x3be3('0x5b'):if(_0xcffc3c[_0x3be3('0x5c')]==0x1){_0x5df015[_0x3be3('0x5d')]('`'+_0xcffc3c[_0x3be3('0x4a')]+_0x3be3('0x5e'));}else{_0x5df015[_0x3be3('0x5d')]('`'+_0xcffc3c[_0x3be3('0x4a')]+_0x3be3('0x5f'));}break;case _0x3be3('0x60'):if(_0xcffc3c[_0x3be3('0x61')]===_0x3be3('0x62')){if(_0xcffc3c[_0x3be3('0x5c')]['split']('\x20')[_0x3be3('0x42')]>0x1){_0x4e80ac[_0x28da28](_0x3be3('0x63'),qs[_0x3be3('0x64')](_0xcffc3c['value']),null);}else{var _0x58ce66='%'+_0xcffc3c[_0x3be3('0x5c')]+'%';_0x4e80ac[_0x28da28](_0x3be3('0x65'),_0x58ce66,_0x58ce66,_0x58ce66);}}else{_0x5c146e=_[_0x3be3('0x66')](_0xc68639,[_0x3be3('0x30'),_0x3be3('0x67')]);_0xcffc3c['field']=_0x3be3('0x67');_0x3ba23b=as[_0x3be3('0x68')](_0x42ed23,_0x5c146e['type'],_0xcffc3c);_0x4e80ac[_0x28da28](_0x3ba23b[_0x3be3('0x69')],_0x3ba23b[_0x3be3('0x5c')][_0x3be3('0x6a')],_0x3ba23b[_0x3be3('0x5c')][_0x3be3('0x2d')]);}break;case'Tag':var _0x4ba2c0=_0xcffc3c[_0x3be3('0x5c')][_0x3be3('0x34')](',')[_0x3be3('0x38')](function(_0x2931bc){return Number(_0x2931bc);});_0x4ba2c0[_0x3be3('0x35')](function(_0x1aeda9){_0x451177['or'](_0x3be3('0x6b'),'%,'+_0x1aeda9+',%');});_0x362fef=_['union'](_0x362fef,_0x4ba2c0);break;case _0x3be3('0x6c'):if(_0xcffc3c[_0x3be3('0x61')]===_0x3be3('0x62')){_0x4e80ac[_0x28da28](_0x3be3('0x6d'),'%'+_0xcffc3c[_0x3be3('0x5c')]+'%',null);}else{_0x5c146e=_[_0x3be3('0x66')](_0xc68639,[_0x3be3('0x30'),'UserId']);_0xcffc3c[_0x3be3('0x4a')]=_0x3be3('0x6e');_0x3ba23b=as['buildExpression'](_0x42ed23,_0x5c146e[_0x3be3('0x3a')],_0xcffc3c);_0x4e80ac[_0x28da28](_0x3ba23b['text'],_0x3ba23b[_0x3be3('0x5c')][_0x3be3('0x6a')],_0x3ba23b[_0x3be3('0x5c')][_0x3be3('0x2d')]);}break;case _0x3be3('0x6f'):_0x3ba23b=as[_0x3be3('0x68')]('me',null,_0xcffc3c);_0x4e80ac[_0x28da28](_0x3ba23b[_0x3be3('0x69')],_0x3ba23b[_0x3be3('0x5c')][_0x3be3('0x6a')],_0x3ba23b[_0x3be3('0x5c')][_0x3be3('0x2d')]);break;}}else{var _0x3ba23b=as[_0x3be3('0x68')](_0x42ed23,_0x5c146e[_0x3be3('0x3a')],_0xcffc3c);_0x4e80ac[_0x28da28](_0x3ba23b['text'],_0x3ba23b[_0x3be3('0x5c')][_0x3be3('0x6a')],_0x3ba23b[_0x3be3('0x5c')]['end']);}}}else{var _0x3c149c=_(_0x4a3de4['query'])['keys']()[_0x3be3('0x38')](function(_0xbda309){return _[_0x3be3('0x70')](_0xc68639,['name',_0xbda309])?_0xbda309:undefined;})[_0x3be3('0x71')]()[_0x3be3('0x5c')]();if(!_['isEmpty'](_0x3c149c)){_0x3c149c[_0x3be3('0x35')](function(_0x561da7){if(_0x561da7===_0x3be3('0x72')){_0x5df015[_0x3be3('0x46')](_0x3be3('0x73'),[]['concat'](_0x4a3de4[_0x3be3('0x3d')][_0x561da7]));}else if(_0x561da7===_0x3be3('0x74')){var _0x57e397=JSON[_0x3be3('0x75')](_0x4a3de4[_0x3be3('0x3d')][_0x561da7])['$gte'];var _0x538fd4=JSON['parse'](_0x4a3de4[_0x3be3('0x3d')][_0x561da7])[_0x3be3('0x76')];_0x5df015[_0x3be3('0x46')]('i.createdAt\x20BETWEEN\x20?\x20AND\x20?',_0x57e397,_0x538fd4);}else{if(_0x4a3de4[_0x3be3('0x3d')][_0x561da7]===_0x3be3('0x77')){_0x5df015['where']('i.'+_0x561da7+'\x20IS\x20NULL');}else{_0x5df015[_0x3be3('0x46')]('i.'+_0x561da7+_0x3be3('0x78'),_0x4a3de4['query'][_0x561da7]);}}});}if(_0x4a3de4[_0x3be3('0x3d')][_0x3be3('0x79')]){if(_0x4a3de4[_0x3be3('0x3d')][_0x3be3('0x79')]==0x1){_0x5df015[_0x3be3('0x5d')](_0x3be3('0x7a'));}else{_0x5df015[_0x3be3('0x5d')](_0x3be3('0x7b'));}}if(_0x4a3de4['query'][_0x3be3('0x7c')]){_0x362fef=_['isArray'](_0x4a3de4['query']['tag'])?_0x4a3de4[_0x3be3('0x3d')][_0x3be3('0x7c')]:new Array(_0x4a3de4[_0x3be3('0x3d')]['tag']);_0x362fef[_0x3be3('0x35')](function(_0x4e7101){_0x451177['or'](_0x3be3('0x6b'),'%,'+_0x4e7101+',%');});}if(_0x4a3de4[_0x3be3('0x3d')][_0x3be3('0x7d')]){var _0x293afc=_0x4a3de4[_0x3be3('0x3d')]['filter'][_0x3be3('0x7e')]('\x5c','\x5c\x5c')[_0x3be3('0x7e')](/'/g,'\x27\x27');if(qs[_0x3be3('0x7f')](_0x293afc)){_0x4e80ac['or']('i.id\x20LIKE\x20?',_0x293afc+'%')['or'](_0x3be3('0x80'),_0x293afc+'%');}else{_0x4e80ac['or'](_0x3be3('0x81'),qs[_0x3be3('0x64')](_0x293afc))['or']('CONCAT(c.firstName,\x20\x27\x20\x27,\x20c.lastName)\x20LIKE\x20?',_0x293afc+'%');}}}_0x5df015[_0x3be3('0x46')](_0x4e80ac);_0x5df015[_0x3be3('0x82')]('i.id');var _0x3ae792={'type':db[_0x3be3('0x83')][_0x3be3('0x84')][_0x3be3('0x85')],'raw':!![]};var _0x1b5723=_0x5df015[_0x3be3('0x86')]();_0x1b5723[_0x3be3('0x4a')]('i.id');_0x1b5723['field']('SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)',_0x3be3('0x5b'));if(_0x3b670a[_0x3be3('0x87')]){_0x3b670a[_0x3be3('0x87')][_0x3be3('0x35')](function(_0x1c58d4){var _0x529fd5=_0x1c58d4[0x0]===_0x3be3('0x88')?_0x1c58d4[0x0]:'i.'+_0x1c58d4[0x0];_0x5df015['order'](_0x529fd5,_0x1c58d4[0x1]===_0x3be3('0x89')?![]:!![]);});}if(!_[_0x3be3('0x8a')](_0x362fef)){_0x5df015[_0x3be3('0x5d')](_0x451177);_0x1b5723['where']('t.id\x20IN\x20?',_0x362fef);}BPromise[_0x3be3('0x8b')]()[_0x3be3('0x2b')](function(){if(!_0x178390){if(_0x4a3de4[_0x3be3('0x3d')]['SmsAccountId'])return;_0x1b5723[_0x3be3('0x46')]('i.SmsAccountId\x20IS\x20NOT\x20NULL');_0x5df015[_0x3be3('0x46')](_0x3be3('0x8c'));return;}if(_0x4a3de4[_0x3be3('0x8d')][_0x3be3('0x8e')]!==_0x3be3('0x8f'))return;return _0x4a3de4['user'][_0x3be3('0x90')]({'attributes':['id'],'raw':!![]})[_0x3be3('0x2b')](function(_0xc5c513){if(_[_0x3be3('0x8a')](_0xc5c513)){_0x1b5723['where'](_0x3be3('0x91'));_0x5df015[_0x3be3('0x46')](_0x3be3('0x91'));}else{_0x1b5723[_0x3be3('0x46')](_0x3be3('0x73'),_[_0x3be3('0x38')](_0xc5c513,'id'));_0x5df015['where'](_0x3be3('0x73'),_['map'](_0xc5c513,'id'));}});})['then'](function(){if(_0x4a3de4[_0x3be3('0x8d')][_0x3be3('0x8e')]==='agent'&&!_0x178390&&!_0x4a3de4['query']['SmsAccountId'])return[];return db[_0x3be3('0x92')][_0x3be3('0x3d')](_0x1b5723[_0x3be3('0x93')](),_0x3ae792);})[_0x3be3('0x2b')](function(_0x4587a0){_0x4d2a0c[_0x3be3('0x25')]=_0x4587a0[_0x3be3('0x42')];if(_0x4d2a0c['count']===0x0)return[];return db[_0x3be3('0x92')][_0x3be3('0x3d')](_0xa5e61e[_0x3be3('0x93')](),_0x3ae792)['then'](function(_0x4a1a10){_0xb8f870=_[_0x3be3('0x94')](_0x4a1a10,'id');_0x3ae792=_[_0x3be3('0x95')](_0x3ae792,{'model':db['SmsInteraction'],'mapToModel':!![],'raw':!![],'nest':!![]});if(_0x4a3de4[_0x3be3('0x3d')][_0x3be3('0x41')]){_0x3b670a[_0x3be3('0x40')][_0x3be3('0x35')](function(_0x43eb47){_0x5df015[_0x3be3('0x4a')]('i.'+_0x43eb47);});}else{_0x5df015['field']('SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)',_0x3be3('0x5b'));_0x5df015[_0x3be3('0x4a')](_0x3be3('0x96'),_0x3be3('0x97'));_0x5df015[_0x3be3('0x4a')](_0x3be3('0x98'),_0x3be3('0x99'));_0x5df015[_0x3be3('0x4a')](_0x3be3('0x9a'),_0x3be3('0x88'));_0x5df015[_0x3be3('0x4a')](_0x3be3('0x9b'));_0x5df015[_0x3be3('0x4a')](_0x3be3('0x9c'),_0x3be3('0x9d'));_0x5df015[_0x3be3('0x4a')](_0x3be3('0x9e'),_0x3be3('0x9f'));_0x5df015[_0x3be3('0x4a')](_0x3be3('0xa0'),_0x3be3('0xa1'));_0x5df015[_0x3be3('0x4a')](_0x3be3('0xa2'),_0x3be3('0xa3'));_0x5df015['field'](_0x3be3('0xa4'),_0x3be3('0xa5'));_0x5df015[_0x3be3('0x4a')]('c.fax',_0x3be3('0xa6'));_0x5df015[_0x3be3('0x4a')](_0x3be3('0xa7'),_0x3be3('0xa8'));_0x5df015['field']('o.internal',_0x3be3('0xa9'));_0x5df015['field'](_0x3be3('0xaa'),'TagIds');}if(_0x3b670a[_0x3be3('0x24')])_0x5df015['limit'](_0x3b670a[_0x3be3('0x24')]);if(_0x3b670a[_0x3be3('0x22')])_0x5df015['offset'](_0x3b670a[_0x3be3('0x22')]);return db[_0x3be3('0x92')][_0x3be3('0x3d')](_0x5df015[_0x3be3('0x93')](),_0x3ae792);})[_0x3be3('0x2b')](function(_0x599d6f){if(_0x599d6f[_0x3be3('0x42')]>0x0)_0x312392['where'](_0x3be3('0xab'),_['map'](_0x599d6f,'id'));return db[_0x3be3('0x92')]['query'](_0x312392[_0x3be3('0x93')](),_0x3ae792)['then'](function(_0x4d86bb){var _0x300a3a=_['groupBy'](_0x4d86bb,_0x3be3('0xac'));var _0x1bad31=[];_0x599d6f[_0x3be3('0x35')](function(_0x1d9856){_0x1bad31['push'](updateSmsInteraction(_0x1d9856,_0xb8f870,_0x300a3a));});return BPromise['all'](_0x1bad31);});});})['then'](function(_0x15cb3d){_0x4d2a0c[_0x3be3('0xad')]=_0x15cb3d;return _0x4d2a0c;})[_0x3be3('0x2b')](respondWithFilteredResult(_0x266a64,_0x3b670a))[_0x3be3('0xae')](handleError(_0x266a64,null));};exports[_0x3be3('0xaf')]=function(_0x2b0cb0,_0x3147ad){var _0x217610={'raw':![],'where':{'id':_0x2b0cb0[_0x3be3('0xb0')]['id']}},_0x1d0515={};_0x1d0515[_0x3be3('0x3c')]=_['keys'](db[_0x3be3('0x39')][_0x3be3('0xb1')]);_0x1d0515['query']=_['keys'](_0x2b0cb0[_0x3be3('0x3d')]);_0x1d0515['filters']=_['intersection'](_0x1d0515[_0x3be3('0x3c')],_0x1d0515[_0x3be3('0x3d')]);_0x217610[_0x3be3('0x40')]=_[_0x3be3('0x3f')](_0x1d0515[_0x3be3('0x3c')],qs[_0x3be3('0x41')](_0x2b0cb0[_0x3be3('0x3d')][_0x3be3('0x41')]));_0x217610[_0x3be3('0x40')]=_0x217610['attributes'][_0x3be3('0x42')]?_0x217610[_0x3be3('0x40')]:_0x1d0515[_0x3be3('0x3c')];if(_0x2b0cb0[_0x3be3('0x3d')][_0x3be3('0xb2')]){_0x217610['include']=[{'all':!![]}];}_0x217610=_[_0x3be3('0x95')]({},_0x217610,_0x2b0cb0[_0x3be3('0xb3')]);return db[_0x3be3('0x39')][_0x3be3('0x66')](_0x217610)[_0x3be3('0x2b')](handleEntityNotFound(_0x3147ad,null))[_0x3be3('0x2b')](respondWithResult(_0x3147ad,null))[_0x3be3('0xae')](handleError(_0x3147ad,null));};exports[_0x3be3('0xb4')]=function(_0x42ee59,_0x21a94e){return db[_0x3be3('0x39')]['create'](_0x42ee59['body'],{})[_0x3be3('0x2b')](respondWithResult(_0x21a94e,0xc9))[_0x3be3('0xae')](handleError(_0x21a94e,null));};exports[_0x3be3('0x2a')]=function(_0x2dc31c,_0x5f3228){if(_0x2dc31c[_0x3be3('0x6f')]['id']){delete _0x2dc31c[_0x3be3('0x6f')]['id'];}return db[_0x3be3('0x39')]['find']({'where':{'id':_0x2dc31c['params']['id']}})[_0x3be3('0x2b')](handleEntityNotFound(_0x5f3228,null))[_0x3be3('0x2b')](saveUpdates(_0x2dc31c[_0x3be3('0x6f')],null))[_0x3be3('0x2b')](respondWithResult(_0x5f3228,null))[_0x3be3('0xae')](handleError(_0x5f3228,null));};exports[_0x3be3('0x2c')]=function(_0x437d78,_0x547fb5){return db[_0x3be3('0x39')][_0x3be3('0x66')]({'where':{'id':_0x437d78[_0x3be3('0xb0')]['id']}})[_0x3be3('0x2b')](handleEntityNotFound(_0x547fb5,null))[_0x3be3('0x2b')](removeEntity(_0x547fb5,null))['catch'](handleError(_0x547fb5,null));};exports[_0x3be3('0xb5')]=function(_0x14311f,_0x19b0c3){return db['SmsInteraction']['describe']()[_0x3be3('0x2b')](respondWithResult(_0x19b0c3,null))['catch'](handleError(_0x19b0c3,null));};exports[_0x3be3('0xb6')]=function(_0x47bb6c,_0xeb89a8,_0x5a4a35){return db[_0x3be3('0xb7')][_0x3be3('0x66')]({'where':{'id':_0x47bb6c[_0x3be3('0xb0')]['id']}})[_0x3be3('0x2b')](handleEntityNotFound(_0xeb89a8,null))['then'](function(_0x4002a6){if(_0x4002a6){return _0x4002a6[_0x3be3('0xb6')](_0x47bb6c['body'][_0x3be3('0xb8')],_[_0x3be3('0xb9')](_0x47bb6c['body'],['ids','id'])||{});}})[_0x3be3('0x2b')](respondWithResult(_0xeb89a8,null))[_0x3be3('0xae')](handleError(_0xeb89a8,null));};exports[_0x3be3('0xba')]=function(_0x5ad630,_0x554c13,_0x4b621d){var _0x2c34f3={'raw':![],'where':{}};var _0x2923b3={};var _0x24dd46={'count':0x0,'rows':[]};return db[_0x3be3('0x39')]['findOne']({'where':{'id':_0x5ad630['params']['id']}})['then'](handleEntityNotFound(_0x554c13,null))['then'](function(_0x2ce272){if(_0x2ce272){_0x2923b3[_0x3be3('0x3c')]=_[_0x3be3('0x3e')](db[_0x3be3('0xb7')]['rawAttributes']);_0x2923b3[_0x3be3('0x3d')]=_[_0x3be3('0x3e')](_0x5ad630['query']);_0x2923b3[_0x3be3('0x47')]=_[_0x3be3('0x3f')](_0x2923b3['model'],_0x2923b3['query']);_0x2c34f3[_0x3be3('0x40')]=_[_0x3be3('0x3f')](_0x2923b3[_0x3be3('0x3c')],qs['fields'](_0x5ad630['query'][_0x3be3('0x41')]));_0x2c34f3['attributes']=_0x2c34f3['attributes'][_0x3be3('0x42')]?_0x2c34f3[_0x3be3('0x40')]:_0x2923b3['model'];if(!_0x5ad630[_0x3be3('0x3d')][_0x3be3('0x43')](_0x3be3('0x44'))){_0x2c34f3[_0x3be3('0x24')]=qs[_0x3be3('0x24')](_0x5ad630[_0x3be3('0x3d')][_0x3be3('0x24')]);_0x2c34f3[_0x3be3('0x22')]=qs[_0x3be3('0x22')](_0x5ad630[_0x3be3('0x3d')][_0x3be3('0x22')]);}_0x2c34f3[_0x3be3('0x87')]=qs[_0x3be3('0x45')](_0x5ad630[_0x3be3('0x3d')][_0x3be3('0x45')]);_0x2c34f3[_0x3be3('0x46')]=qs['filters'](_['pick'](_0x5ad630[_0x3be3('0x3d')],_0x2923b3[_0x3be3('0x47')]));_0x2c34f3[_0x3be3('0x46')][_0x3be3('0xac')]=_0x2ce272['id'];if(_0x5ad630['query']['filter']){_0x2c34f3[_0x3be3('0x46')]=_[_0x3be3('0x95')](_0x2c34f3[_0x3be3('0x46')],{'$or':_[_0x3be3('0x38')](_0x2c34f3['attributes'],function(_0x54b549){var _0x108c57={};_0x108c57[_0x54b549]={'$like':'%'+_0x5ad630[_0x3be3('0x3d')][_0x3be3('0x7d')]+'%'};return _0x108c57;})});}if(_0x5ad630['query'][_0x3be3('0xbb')]){var _0x177394=_0x5ad630['query']['$gte']['split'](',');var _0x2ce647={};_0x2ce647[_0x177394[0x0]]={'$gte':moment(_0x177394[0x1])[_0x3be3('0xbc')](_0x3be3('0xbd'))};_0x2c34f3['where']=_[_0x3be3('0x95')](_0x2c34f3[_0x3be3('0x46')],_0x2ce647);}_0x2c34f3=_[_0x3be3('0x95')]({},_0x2c34f3,_0x5ad630[_0x3be3('0xb3')]);return db['SmsMessage'][_0x3be3('0x25')]({'where':_0x2c34f3['where']})[_0x3be3('0x2b')](function(_0x118c4b){_0x24dd46['count']=_0x118c4b;if(_0x5ad630[_0x3be3('0x3d')]['includeAll']){_0x2c34f3[_0x3be3('0xbe')]=[{'all':!![]}];}return db['SmsMessage'][_0x3be3('0xbf')](_0x2c34f3);})[_0x3be3('0x2b')](function(_0xac81f9){_0x24dd46[_0x3be3('0xad')]=_0xac81f9;return _0x24dd46;});}})['then'](respondWithFilteredResult(_0x554c13,_0x2c34f3))[_0x3be3('0xae')](handleError(_0x554c13,null));};exports[_0x3be3('0xc0')]=function(_0x4b2871,_0xd7828d,_0x2a5ef){return db[_0x3be3('0x39')]['find']({'where':{'id':_0x4b2871[_0x3be3('0xb0')]['id']}})[_0x3be3('0x2b')](handleEntityNotFound(_0xd7828d,null))['then'](function(_0x390171){if(_0x390171){return _0x390171[_0x3be3('0xc1')](_0x4b2871[_0x3be3('0x6f')][_0x3be3('0xb8')],_[_0x3be3('0xb9')](_0x4b2871[_0x3be3('0x6f')],[_0x3be3('0xb8'),'id'])||{})[_0x3be3('0xc2')](function(){return db[_0x3be3('0xc3')][_0x3be3('0xbf')]({'attributes':['id','name','color'],'where':{'id':_0x4b2871[_0x3be3('0x6f')]['ids']}});})[_0x3be3('0x2b')](function(_0x58dfc4){socket[_0x3be3('0xc4')](_0x3be3('0xc5'),{'id':Number(_0x4b2871[_0x3be3('0xb0')]['id']),'tags':_0x58dfc4||[]});return{'id':Number(_0x4b2871[_0x3be3('0xb0')]['id']),'tags':_0x58dfc4||[]};});}})[_0x3be3('0x2b')](respondWithResult(_0xd7828d,null))[_0x3be3('0xae')](handleError(_0xd7828d,null));};exports[_0x3be3('0xc6')]=function(_0x1827e0,_0x1455af,_0x2ef258){return db['SmsInteraction']['find']({'where':{'id':_0x1827e0[_0x3be3('0xb0')]['id']}})[_0x3be3('0x2b')](handleEntityNotFound(_0x1455af,null))['then'](function(_0x5af818){if(_0x5af818){return _0x5af818[_0x3be3('0xc6')](_0x1827e0[_0x3be3('0x3d')][_0x3be3('0xb8')]);}})['then'](respondWithStatusCode(_0x1455af,null))[_0x3be3('0xae')](handleError(_0x1455af,null));};exports[_0x3be3('0xc7')]=function(_0x25e98a,_0x5a4b26){var _0x4b5bff=moment()[_0x3be3('0xc8')]()[_0x3be3('0x93')]();var _0x3c68d5=path[_0x3be3('0xc9')](config['root'],_0x3be3('0xca'),'files','tmp');var _0xbf8f72=path['join'](config[_0x3be3('0xcb')],_0x3be3('0xca'),_0x3be3('0xcc'),_0x3be3('0xcd'));var _0x22acb7=path[_0x3be3('0xc9')](_0x3c68d5,_0x4b5bff);var _0x30cdd1=util[_0x3be3('0xbc')](_0x3be3('0xce'),_0x25e98a[_0x3be3('0xb0')]['id'],_0x4b5bff);var _0x2a4ddd=path[_0x3be3('0xc9')](_0x3c68d5,_0x30cdd1);var _0x346efa=[];_0x346efa[_0x3be3('0x36')]({'model':db[_0x3be3('0x6c')],'as':_0x3be3('0x6c'),'attributes':['id','fullname'],'raw':!![]});_0x346efa['push']({'model':db[_0x3be3('0xcf')],'as':'Contact','attributes':['id',_0x3be3('0xd0'),_0x3be3('0xd1')],'raw':!![]});var _0x78cf76=[{'model':db[_0x3be3('0xb7')],'as':'Messages','attributes':['id','body',_0x3be3('0x74'),'direction','secret',_0x3be3('0x79')],'include':_0x346efa}];_0x78cf76[_0x3be3('0x36')]({'model':db[_0x3be3('0xd2')],'as':'Account','attributes':['id',_0x3be3('0x30')]});_0x78cf76[_0x3be3('0x36')]({'model':db[_0x3be3('0x6c')],'as':_0x3be3('0xd3'),'attributes':['id','fullname']});return db[_0x3be3('0x39')][_0x3be3('0x66')]({'where':{'id':_0x25e98a[_0x3be3('0xb0')]['id']},'include':_0x78cf76})[_0x3be3('0x2b')](handleEntityNotFound(_0x5a4b26,null))[_0x3be3('0x2b')](function(_0x2d270e){if(_0x2d270e){var _0x2470fa=_0x2d270e['get']({'plain':!![]});fs[_0x3be3('0xd4')](_0x22acb7);var _0x2ee5b2={'channel':_0x3be3('0xd5'),'account':_0x2470fa[_0x3be3('0xd6')][_0x3be3('0x30')],'agent':_0x2470fa[_0x3be3('0xd3')]?_0x2470fa[_0x3be3('0xd3')][_0x3be3('0xd7')]:'N.A.','createdAt':moment(_0x2470fa[_0x3be3('0x74')])[_0x3be3('0xbc')]('YYYY-MM-DD\x20HH:mm:ss')[_0x3be3('0x93')](),'closedAt':_0x2470fa[_0x3be3('0xd8')]?moment(_0x2470fa[_0x3be3('0xd9')])[_0x3be3('0xbc')](_0x3be3('0xbd'))[_0x3be3('0x93')]():'','disposition':_0x2470fa[_0x3be3('0xda')],'messages':_(_0x2470fa[_0x3be3('0xdb')])[_0x3be3('0x7d')]({'secret':![]})[_0x3be3('0x38')](function(_0x46c803){return{'date':moment(_0x46c803[_0x3be3('0x74')])[_0x3be3('0xbc')]('YYYY-MM-DD\x20HH:mm:ss')['toString'](),'sender':_0x46c803['direction']==='out'?_0x46c803[_0x3be3('0x6c')]?_0x46c803[_0x3be3('0x6c')][_0x3be3('0xd7')]:_0x3be3('0xdc'):_0x46c803[_0x3be3('0x60')]['firstName']+(_0x46c803[_0x3be3('0x60')][_0x3be3('0xd1')]?'\x20'+_0x46c803[_0x3be3('0x60')][_0x3be3('0xd1')]:''),'body':_0x46c803[_0x3be3('0x6f')],'direction':_0x46c803[_0x3be3('0xdd')]===_0x3be3('0xde')?'A':'C','secret':_0x46c803[_0x3be3('0xdf')],'read':_0x46c803[_0x3be3('0x79')]};})[_0x3be3('0x5c')]()};return ejs[_0x3be3('0xe0')](path['join'](config['root'],_0x3be3('0xca'),_0x3be3('0xe1'),_0x3be3('0xe2')),{'interaction':_0x2ee5b2})[_0x3be3('0x2b')](function(_0x29e105){var _0x28bf2e=path[_0x3be3('0xc9')](_0x22acb7,_0x3be3('0xe3')+_0x2470fa['id']+'-'+_0x4b5bff+_0x3be3('0xe4'));var _0xf6a8be={'path':_0x28bf2e,'channel':_0x3be3('0xd5'),'interactionId':_0x2470fa['id']};return pdf['createPdfFromHTML'](_0x29e105,_0xf6a8be);})['then'](function(){return new BPromise(function(_0x7517a0,_0x30f0cd){zipdir(_0x22acb7,{'saveTo':_0x2a4ddd},function(_0x399e87,_0x108c46){if(_0x399e87)return _0x30f0cd(_0x399e87);return _0x7517a0(_0x108c46);});})[_0x3be3('0x2b')](function(){return new BPromise(function(_0x51faaa,_0x5af344){rimraf(_0x22acb7,function(_0xba6f72){if(_0xba6f72)_0x5af344(_0xba6f72);return _0x51faaa();});});})[_0x3be3('0x2b')](function(){return _0x5a4b26['download'](_0x2a4ddd,_0x30cdd1,function(_0x52dccc){if(_0x52dccc){console[_0x3be3('0xe5')]('err',_0x52dccc);}else{fs[_0x3be3('0xe6')](_0x2a4ddd);}});});});}else{return _0x5a4b26[_0x3be3('0x1f')](0xc8);}})[_0x3be3('0xae')](handleError(_0x5a4b26,null));}; \ No newline at end of file diff --git a/server/api/smsInteraction/smsInteraction.events.js b/server/api/smsInteraction/smsInteraction.events.js index e260094..bd972cd 100644 --- a/server/api/smsInteraction/smsInteraction.events.js +++ b/server/api/smsInteraction/smsInteraction.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa30a=['update','remove','then','setDataValue','map','findAll','emit','catch','hasOwnProperty','hook','exports','events','../../mysqldb','SmsInteraction','SmsMessage','setMaxListeners','save'];(function(_0xc4217e,_0x3b018c){var _0x1a49eb=function(_0xb7413a){while(--_0xb7413a){_0xc4217e['push'](_0xc4217e['shift']());}};_0x1a49eb(++_0x3b018c);}(_0xa30a,0xd7));var _0xaa30=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xa30a[_0x14add3];return _0x4a174f;};'use strict';var EventEmitter=require(_0xaa30('0x0'));var SmsInteraction=require(_0xaa30('0x1'))['db'][_0xaa30('0x2')];var SmsMessage=require('../../mysqldb')['db'][_0xaa30('0x3')];var SmsInteractionEvents=new EventEmitter();SmsInteractionEvents[_0xaa30('0x4')](0x0);var events={'afterCreate':_0xaa30('0x5'),'afterUpdate':_0xaa30('0x6'),'afterDestroy':_0xaa30('0x7')};function emitEvent(_0x271425){return function(_0x102ad7,_0x555947,_0x347cd5){_0x102ad7['getUsers']({'attributes':['id'],'raw':!![]})[_0xaa30('0x8')](function(_0x14fe09){_0x102ad7[_0xaa30('0x9')]('Users',_0x14fe09[_0xaa30('0xa')](function(_0x40dbda){return{'id':_0x40dbda['id']};}));return SmsMessage[_0xaa30('0xb')]({'where':{'SmsInteractionId':_0x102ad7['id'],'direction':'in','read':![]},'raw':!![]});})[_0xaa30('0x8')](function(_0x14a6a6){_0x102ad7[_0xaa30('0x9')]('unreadMessages',_0x14a6a6['length']);SmsInteractionEvents[_0xaa30('0xc')](_0x271425+':'+_0x102ad7['id'],_0x102ad7);SmsInteractionEvents['emit'](_0x271425,_0x102ad7);_0x347cd5(null);})[_0xaa30('0xd')](_0x347cd5(null));};}for(var e in events){if(events[_0xaa30('0xe')](e)){var event=events[e];SmsInteraction[_0xaa30('0xf')](e,emitEvent(event));}}module[_0xaa30('0x10')]=SmsInteractionEvents; \ No newline at end of file +var _0x0424=['SmsInteraction','../../mysqldb','SmsMessage','setMaxListeners','update','getUsers','then','setDataValue','findAll','unreadMessages','length','emit','catch','hasOwnProperty','hook'];(function(_0x2d64e6,_0x5243e9){var _0x140927=function(_0x76be97){while(--_0x76be97){_0x2d64e6['push'](_0x2d64e6['shift']());}};_0x140927(++_0x5243e9);}(_0x0424,0x159));var _0x4042=function(_0x225f50,_0x48a77d){_0x225f50=_0x225f50-0x0;var _0x19d003=_0x0424[_0x225f50];return _0x19d003;};'use strict';var EventEmitter=require('events');var SmsInteraction=require('../../mysqldb')['db'][_0x4042('0x0')];var SmsMessage=require(_0x4042('0x1'))['db'][_0x4042('0x2')];var SmsInteractionEvents=new EventEmitter();SmsInteractionEvents[_0x4042('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x4042('0x4'),'afterDestroy':'remove'};function emitEvent(_0x491eae){return function(_0x20d8df,_0x24fdfd,_0x472795){_0x20d8df[_0x4042('0x5')]({'attributes':['id'],'raw':!![]})[_0x4042('0x6')](function(_0xa5310f){_0x20d8df[_0x4042('0x7')]('Users',_0xa5310f['map'](function(_0x280cd6){return{'id':_0x280cd6['id']};}));return SmsMessage[_0x4042('0x8')]({'where':{'SmsInteractionId':_0x20d8df['id'],'direction':'in','read':![]},'raw':!![]});})[_0x4042('0x6')](function(_0x4b92d2){_0x20d8df[_0x4042('0x7')](_0x4042('0x9'),_0x4b92d2[_0x4042('0xa')]);SmsInteractionEvents[_0x4042('0xb')](_0x491eae+':'+_0x20d8df['id'],_0x20d8df);SmsInteractionEvents[_0x4042('0xb')](_0x491eae,_0x20d8df);_0x472795(null);})[_0x4042('0xc')](_0x472795(null));};}for(var e in events){if(events[_0x4042('0xd')](e)){var event=events[e];SmsInteraction[_0x4042('0xe')](e,emitEvent(event));}}module['exports']=SmsInteractionEvents; \ No newline at end of file diff --git a/server/api/smsInteraction/smsInteraction.model.js b/server/api/smsInteraction/smsInteraction.model.js index 7f7afc9..06f9dd0 100644 --- a/server/api/smsInteraction/smsInteraction.model.js +++ b/server/api/smsInteraction/smsInteraction.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x170c=['request-promise','path','rimraf','./smsInteraction.attributes','exports','define','SmsInteraction','changed','closed','format','util','../../config/logger','api','bluebird'];(function(_0x1a3c5c,_0x230dcb){var _0x4d31e2=function(_0xd8be83){while(--_0xd8be83){_0x1a3c5c['push'](_0x1a3c5c['shift']());}};_0x4d31e2(++_0x230dcb);}(_0x170c,0xdc));var _0xc170=function(_0x279e4f,_0x44be52){_0x279e4f=_0x279e4f-0x0;var _0x44c61f=_0x170c[_0x279e4f];return _0x44c61f;};'use strict';var _=require('lodash');var util=require(_0xc170('0x0'));var logger=require(_0xc170('0x1'))(_0xc170('0x2'));var moment=require('moment');var BPromise=require(_0xc170('0x3'));var rp=require(_0xc170('0x4'));var fs=require('fs');var path=require(_0xc170('0x5'));var rimraf=require(_0xc170('0x6'));var config=require('../../config/environment');var attributes=require(_0xc170('0x7'));module[_0xc170('0x8')]=function(_0x5debc2,_0x5365f1){return _0x5debc2[_0xc170('0x9')](_0xc170('0xa'),attributes,{'tableName':'sms_interactions','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x1735e6,_0x1dbfd0,_0x53c5a5){if(_0x1735e6[_0xc170('0xb')](_0xc170('0xc'))){_0x1735e6['closedAt']=moment()[_0xc170('0xd')]('YYYY-MM-DD\x20HH:mm:ss');}_0x53c5a5(null,_0x1735e6);}}});}; \ No newline at end of file +var _0x68f5=['closedAt','lodash','../../config/logger','api','moment','request-promise','path','../../config/environment','./smsInteraction.attributes','exports','SmsInteraction','sms_interactions','changed','closed'];(function(_0xd9a9e7,_0x250b8f){var _0x3b8789=function(_0x4f014e){while(--_0x4f014e){_0xd9a9e7['push'](_0xd9a9e7['shift']());}};_0x3b8789(++_0x250b8f);}(_0x68f5,0x9b));var _0x568f=function(_0x1c66ac,_0x1609b1){_0x1c66ac=_0x1c66ac-0x0;var _0x195a7e=_0x68f5[_0x1c66ac];return _0x195a7e;};'use strict';var _=require(_0x568f('0x0'));var util=require('util');var logger=require(_0x568f('0x1'))(_0x568f('0x2'));var moment=require(_0x568f('0x3'));var BPromise=require('bluebird');var rp=require(_0x568f('0x4'));var fs=require('fs');var path=require(_0x568f('0x5'));var rimraf=require('rimraf');var config=require(_0x568f('0x6'));var attributes=require(_0x568f('0x7'));module[_0x568f('0x8')]=function(_0x59f6cc,_0x7d330f){return _0x59f6cc['define'](_0x568f('0x9'),attributes,{'tableName':_0x568f('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x123426,_0x55b0b0,_0x461ae0){if(_0x123426[_0x568f('0xb')](_0x568f('0xc'))){_0x123426[_0x568f('0xd')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');}_0x461ae0(null,_0x123426);}}});}; \ No newline at end of file diff --git a/server/api/smsInteraction/smsInteraction.rpc.js b/server/api/smsInteraction/smsInteraction.rpc.js index 5b9d55c..1282fe4 100644 --- a/server/api/smsInteraction/smsInteraction.rpc.js +++ b/server/api/smsInteraction/smsInteraction.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7bf2=['SmsInteraction,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','UpdateSmsInteraction','SmsInteraction','update','body','options','raw','where','limit','then','debug','AddTagsToSmsInteraction','addTags','ids','spread','AddTags','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','localhost','socket.io-emitter','register','info','SmsInteraction,\x20%s,\x20%s','request\x20sent'];(function(_0x4890fd,_0x494b39){var _0x23c06f=function(_0x1cedda){while(--_0x1cedda){_0x4890fd['push'](_0x4890fd['shift']());}};_0x23c06f(++_0x494b39);}(_0x7bf2,0x1b0));var _0x27bf=function(_0x2c3d4a,_0x4ddcaa){_0x2c3d4a=_0x2c3d4a-0x0;var _0x20e235=_0x7bf2[_0x2c3d4a];return _0x20e235;};'use strict';var _=require(_0x27bf('0x0'));var util=require('util');var moment=require(_0x27bf('0x1'));var BPromise=require(_0x27bf('0x2'));var rs=require(_0x27bf('0x3'));var fs=require('fs');var Redis=require(_0x27bf('0x4'));var db=require(_0x27bf('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x27bf('0x6'))(_0x27bf('0x7'));var config=require(_0x27bf('0x8'));var jayson=require(_0x27bf('0x9'));var client=jayson[_0x27bf('0xa')][_0x27bf('0xb')]({'port':0x232a});config['redis']=_['defaults'](config[_0x27bf('0xc')],{'host':_0x27bf('0xd'),'port':0x18eb});var socket=require(_0x27bf('0xe'))(new Redis(config['redis']));require('./smsInteraction.socket')[_0x27bf('0xf')](socket);function respondWithRpcPromise(_0x1d7b4b,_0x54f01b,_0x3bcfed){return new BPromise(function(_0x26d26c,_0xe62348){return client['request'](_0x1d7b4b,_0x3bcfed)['then'](function(_0x39fbcd){logger[_0x27bf('0x10')](_0x27bf('0x11'),_0x54f01b,_0x27bf('0x12'));logger['debug'](_0x27bf('0x13'),_0x54f01b,_0x27bf('0x12'),JSON[_0x27bf('0x14')](_0x39fbcd));if(_0x39fbcd[_0x27bf('0x15')]){if(_0x39fbcd[_0x27bf('0x15')][_0x27bf('0x16')]===0x1f4){logger[_0x27bf('0x15')]('SmsInteraction,\x20%s,\x20%s',_0x54f01b,_0x39fbcd[_0x27bf('0x15')]['message']);return _0xe62348(_0x39fbcd['error'][_0x27bf('0x17')]);}logger[_0x27bf('0x15')](_0x27bf('0x11'),_0x54f01b,_0x39fbcd['error']['message']);return _0x26d26c(_0x39fbcd[_0x27bf('0x15')][_0x27bf('0x17')]);}else{logger[_0x27bf('0x10')](_0x27bf('0x11'),_0x54f01b,_0x27bf('0x12'));_0x26d26c(_0x39fbcd[_0x27bf('0x18')][_0x27bf('0x17')]);}})[_0x27bf('0x19')](function(_0x33113f){logger['error'](_0x27bf('0x11'),_0x54f01b,_0x33113f);_0xe62348(_0x33113f);});});}exports[_0x27bf('0x1a')]=function(_0x5c8e51){var _0x149772=this;return new Promise(function(_0x966554,_0x45384b){return db[_0x27bf('0x1b')][_0x27bf('0x1c')](_0x5c8e51[_0x27bf('0x1d')],{'raw':_0x5c8e51['options']?_0x5c8e51[_0x27bf('0x1e')][_0x27bf('0x1f')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x5c8e51['options']?_0x5c8e51[_0x27bf('0x1e')][_0x27bf('0x20')]||null:null,'attributes':_0x5c8e51['options']?_0x5c8e51[_0x27bf('0x1e')]['attributes']||null:null,'limit':_0x5c8e51['options']?_0x5c8e51[_0x27bf('0x1e')][_0x27bf('0x21')]||null:null})[_0x27bf('0x22')](function(_0x19b59a){logger[_0x27bf('0x10')](_0x27bf('0x1a'),_0x5c8e51);logger[_0x27bf('0x23')](_0x27bf('0x1a'),_0x5c8e51,JSON[_0x27bf('0x14')](_0x19b59a));_0x966554(_0x19b59a);})[_0x27bf('0x19')](function(_0x62c6ea){logger[_0x27bf('0x15')](_0x27bf('0x1a'),_0x62c6ea[_0x27bf('0x17')],_0x5c8e51);_0x45384b(_0x149772[_0x27bf('0x15')](0x1f4,_0x62c6ea['message']));});});};exports[_0x27bf('0x24')]=function(_0x4c26c7){return new Promise(function(_0x44c7,_0xdfc1b7){return db[_0x27bf('0x1b')]['find']({'where':_0x4c26c7[_0x27bf('0x1e')]?_0x4c26c7['options']['where']||null:null})[_0x27bf('0x22')](function(_0x2753c0){if(_0x2753c0){return _0x2753c0[_0x27bf('0x25')](_0x4c26c7[_0x27bf('0x1d')][_0x27bf('0x26')],_['omit'](_0x4c26c7['body'],['ids','id'])||{});}})[_0x27bf('0x27')](function(_0x34c154){logger[_0x27bf('0x10')](_0x27bf('0x28'),_0x4c26c7);logger[_0x27bf('0x23')](_0x27bf('0x28'),_0x4c26c7,JSON[_0x27bf('0x14')](_0x34c154));_0x44c7(_0x34c154);})[_0x27bf('0x19')](function(_0x500615){logger[_0x27bf('0x15')](_0x27bf('0x28'),_0x500615[_0x27bf('0x17')],_0x4c26c7);_0xdfc1b7(_this['error'](0x1f4,_0x500615[_0x27bf('0x17')]));});});}; \ No newline at end of file +var _0x3299=['redis','socket.io-emitter','./smsInteraction.socket','register','request','then','info','request\x20sent','debug','SmsInteraction,\x20%s,\x20%s,\x20%s','error','code','SmsInteraction,\x20%s,\x20%s','message','result','catch','SmsInteraction','update','body','options','where','attributes','limit','UpdateSmsInteraction','stringify','AddTagsToSmsInteraction','find','addTags','ids','omit','spread','AddTags','lodash','moment','bluebird','ioredis','../../config/utils','../../config/logger','rpc','client','http','defaults'];(function(_0x34c2d4,_0x418ed2){var _0x38796a=function(_0xf017c5){while(--_0xf017c5){_0x34c2d4['push'](_0x34c2d4['shift']());}};_0x38796a(++_0x418ed2);}(_0x3299,0x9e));var _0x9329=function(_0x410ea5,_0x3c705b){_0x410ea5=_0x410ea5-0x0;var _0x175b21=_0x3299[_0x410ea5];return _0x175b21;};'use strict';var _=require(_0x9329('0x0'));var util=require('util');var moment=require(_0x9329('0x1'));var BPromise=require(_0x9329('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x9329('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x9329('0x4'));var logger=require(_0x9329('0x5'))(_0x9329('0x6'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x9329('0x7')][_0x9329('0x8')]({'port':0x232a});config['redis']=_[_0x9329('0x9')](config[_0x9329('0xa')],{'host':'localhost','port':0x18eb});var socket=require(_0x9329('0xb'))(new Redis(config[_0x9329('0xa')]));require(_0x9329('0xc'))[_0x9329('0xd')](socket);function respondWithRpcPromise(_0x271f7c,_0x5dc6f4,_0x63b7d2){return new BPromise(function(_0x2e8e22,_0x25210d){return client[_0x9329('0xe')](_0x271f7c,_0x63b7d2)[_0x9329('0xf')](function(_0x176812){logger[_0x9329('0x10')]('SmsInteraction,\x20%s,\x20%s',_0x5dc6f4,_0x9329('0x11'));logger[_0x9329('0x12')](_0x9329('0x13'),_0x5dc6f4,_0x9329('0x11'),JSON['stringify'](_0x176812));if(_0x176812[_0x9329('0x14')]){if(_0x176812[_0x9329('0x14')][_0x9329('0x15')]===0x1f4){logger[_0x9329('0x14')](_0x9329('0x16'),_0x5dc6f4,_0x176812[_0x9329('0x14')][_0x9329('0x17')]);return _0x25210d(_0x176812['error'][_0x9329('0x17')]);}logger['error'](_0x9329('0x16'),_0x5dc6f4,_0x176812[_0x9329('0x14')][_0x9329('0x17')]);return _0x2e8e22(_0x176812[_0x9329('0x14')]['message']);}else{logger['info'](_0x9329('0x16'),_0x5dc6f4,_0x9329('0x11'));_0x2e8e22(_0x176812[_0x9329('0x18')]['message']);}})[_0x9329('0x19')](function(_0x3ec633){logger[_0x9329('0x14')](_0x9329('0x16'),_0x5dc6f4,_0x3ec633);_0x25210d(_0x3ec633);});});}exports['UpdateSmsInteraction']=function(_0x1430b4){var _0x4e308d=this;return new Promise(function(_0x590ab1,_0x296adb){return db[_0x9329('0x1a')][_0x9329('0x1b')](_0x1430b4[_0x9329('0x1c')],{'raw':_0x1430b4['options']?_0x1430b4[_0x9329('0x1d')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1430b4[_0x9329('0x1d')]?_0x1430b4[_0x9329('0x1d')][_0x9329('0x1e')]||null:null,'attributes':_0x1430b4['options']?_0x1430b4[_0x9329('0x1d')][_0x9329('0x1f')]||null:null,'limit':_0x1430b4[_0x9329('0x1d')]?_0x1430b4[_0x9329('0x1d')][_0x9329('0x20')]||null:null})[_0x9329('0xf')](function(_0x4111a1){logger[_0x9329('0x10')](_0x9329('0x21'),_0x1430b4);logger[_0x9329('0x12')]('UpdateSmsInteraction',_0x1430b4,JSON[_0x9329('0x22')](_0x4111a1));_0x590ab1(_0x4111a1);})[_0x9329('0x19')](function(_0x4a69b4){logger[_0x9329('0x14')](_0x9329('0x21'),_0x4a69b4[_0x9329('0x17')],_0x1430b4);_0x296adb(_0x4e308d[_0x9329('0x14')](0x1f4,_0x4a69b4['message']));});});};exports[_0x9329('0x23')]=function(_0x323781){return new Promise(function(_0x24c757,_0x5f2775){return db[_0x9329('0x1a')][_0x9329('0x24')]({'where':_0x323781[_0x9329('0x1d')]?_0x323781[_0x9329('0x1d')]['where']||null:null})[_0x9329('0xf')](function(_0x5872d3){if(_0x5872d3){return _0x5872d3[_0x9329('0x25')](_0x323781['body'][_0x9329('0x26')],_[_0x9329('0x27')](_0x323781[_0x9329('0x1c')],[_0x9329('0x26'),'id'])||{});}})[_0x9329('0x28')](function(_0x5da5cf){logger[_0x9329('0x10')](_0x9329('0x29'),_0x323781);logger[_0x9329('0x12')](_0x9329('0x29'),_0x323781,JSON[_0x9329('0x22')](_0x5da5cf));_0x24c757(_0x5da5cf);})[_0x9329('0x19')](function(_0x17be41){logger[_0x9329('0x14')](_0x9329('0x29'),_0x17be41[_0x9329('0x17')],_0x323781);_0x5f2775(_this[_0x9329('0x14')](0x1f4,_0x17be41[_0x9329('0x17')]));});});}; \ No newline at end of file diff --git a/server/api/smsInteraction/smsInteraction.socket.js b/server/api/smsInteraction/smsInteraction.socket.js index 3b9cc86..da44129 100644 --- a/server/api/smsInteraction/smsInteraction.socket.js +++ b/server/api/smsInteraction/smsInteraction.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf564=['update','emit','removeListener','register','length','./smsInteraction.events','save'];(function(_0x36bfe3,_0x358938){var _0x9b0436=function(_0x86e47d){while(--_0x86e47d){_0x36bfe3['push'](_0x36bfe3['shift']());}};_0x9b0436(++_0x358938);}(_0xf564,0x1cc));var _0x4f56=function(_0x5447aa,_0x3afc00){_0x5447aa=_0x5447aa-0x0;var _0xb21e53=_0xf564[_0x5447aa];return _0xb21e53;};'use strict';var SmsInteractionEvents=require(_0x4f56('0x0'));var events=[_0x4f56('0x1'),'remove',_0x4f56('0x2')];function createListener(_0x263f48,_0x4e5119){return function(_0x626b39){_0x4e5119[_0x4f56('0x3')](_0x263f48,_0x626b39);};}function removeListener(_0x317d13,_0x5d7742){return function(){SmsInteractionEvents[_0x4f56('0x4')](_0x317d13,_0x5d7742);};}exports[_0x4f56('0x5')]=function(_0x23ba05){for(var _0x3e7ca9=0x0,_0x5bbfec=events[_0x4f56('0x6')];_0x3e7ca9<_0x5bbfec;_0x3e7ca9++){var _0xa577=events[_0x3e7ca9];var _0x291b47=createListener('smsInteraction:'+_0xa577,_0x23ba05);SmsInteractionEvents['on'](_0xa577,_0x291b47);}}; \ No newline at end of file +var _0x3815=['register','smsInteraction:','./smsInteraction.events','remove','update','emit','removeListener'];(function(_0x187ee1,_0x3fd1e6){var _0x388160=function(_0x542dd2){while(--_0x542dd2){_0x187ee1['push'](_0x187ee1['shift']());}};_0x388160(++_0x3fd1e6);}(_0x3815,0x80));var _0x5381=function(_0xb93da8,_0x3a628b){_0xb93da8=_0xb93da8-0x0;var _0x5362fd=_0x3815[_0xb93da8];return _0x5362fd;};'use strict';var SmsInteractionEvents=require(_0x5381('0x0'));var events=['save',_0x5381('0x1'),_0x5381('0x2')];function createListener(_0x460b81,_0x3e5519){return function(_0x35ad85){_0x3e5519[_0x5381('0x3')](_0x460b81,_0x35ad85);};}function removeListener(_0x4954bc,_0x4f242c){return function(){SmsInteractionEvents[_0x5381('0x4')](_0x4954bc,_0x4f242c);};}exports[_0x5381('0x5')]=function(_0x355036){for(var _0x418b6c=0x0,_0x5b2258=events['length'];_0x418b6c<_0x5b2258;_0x418b6c++){var _0x133453=events[_0x418b6c];var _0x20086e=createListener(_0x5381('0x6')+_0x133453,_0x355036);SmsInteractionEvents['on'](_0x133453,_0x20086e);}}; \ No newline at end of file diff --git a/server/api/smsMessage/index.js b/server/api/smsMessage/index.js index 4ca7c8f..311fd6f 100644 --- a/server/api/smsMessage/index.js +++ b/server/api/smsMessage/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7f48=['fs-extra','../../components/auth/service','../../config/environment','./smsMessage.controller','get','/describe','describe','/:id','isAuthenticated','show','post','tracked','sms','smsmessage:create','/:id/status','put','update','accept','reject','delete','destroy','exports','multer','util','connect-timeout'];(function(_0x5a51f5,_0xcbc002){var _0x305ae9=function(_0x146b5a){while(--_0x146b5a){_0x5a51f5['push'](_0x5a51f5['shift']());}};_0x305ae9(++_0xcbc002);}(_0x7f48,0xac));var _0x87f4=function(_0x5c2a2b,_0x22c94e){_0x5c2a2b=_0x5c2a2b-0x0;var _0x19921f=_0x7f48[_0x5c2a2b];return _0x19921f;};'use strict';var multer=require(_0x87f4('0x0'));var util=require(_0x87f4('0x1'));var path=require('path');var timeout=require(_0x87f4('0x2'));var express=require('express');var router=express['Router']();var fs_extra=require(_0x87f4('0x3'));var auth=require(_0x87f4('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x87f4('0x5'));var controller=require(_0x87f4('0x6'));router[_0x87f4('0x7')]('/',auth['isAuthenticated'](),controller['index']);router[_0x87f4('0x7')](_0x87f4('0x8'),auth['isAuthenticated'](),controller[_0x87f4('0x9')]);router[_0x87f4('0x7')](_0x87f4('0xa'),auth[_0x87f4('0xb')](),controller[_0x87f4('0xc')]);router[_0x87f4('0xd')]('/',auth[_0x87f4('0xb')](),interaction[_0x87f4('0xe')](_0x87f4('0xf'),_0x87f4('0x10')),controller['create']);router[_0x87f4('0xd')](_0x87f4('0x11'),controller['status']);router[_0x87f4('0x12')]('/:id',auth[_0x87f4('0xb')](),controller[_0x87f4('0x13')]);router[_0x87f4('0x12')]('/:id/accept',auth[_0x87f4('0xb')](),controller[_0x87f4('0x14')]);router['put']('/:id/reject',auth[_0x87f4('0xb')](),controller[_0x87f4('0x15')]);router[_0x87f4('0x16')]('/:id',auth[_0x87f4('0xb')](),controller[_0x87f4('0x17')]);module[_0x87f4('0x18')]=router; \ No newline at end of file +var _0xc820=['path','connect-timeout','fs-extra','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','index','/describe','describe','/:id','post','tracked','smsmessage:create','/:id/status','put','update','/:id/accept','accept','/:id/reject','reject','delete','exports','multer','util'];(function(_0x4f60d7,_0xe092d1){var _0x5943c5=function(_0x147d8c){while(--_0x147d8c){_0x4f60d7['push'](_0x4f60d7['shift']());}};_0x5943c5(++_0xe092d1);}(_0xc820,0x1d9));var _0x0c82=function(_0x3fb942,_0x18ccdc){_0x3fb942=_0x3fb942-0x0;var _0x429c91=_0xc820[_0x3fb942];return _0x429c91;};'use strict';var multer=require(_0x0c82('0x0'));var util=require(_0x0c82('0x1'));var path=require(_0x0c82('0x2'));var timeout=require(_0x0c82('0x3'));var express=require('express');var router=express['Router']();var fs_extra=require(_0x0c82('0x4'));var auth=require(_0x0c82('0x5'));var interaction=require(_0x0c82('0x6'));var config=require('../../config/environment');var controller=require('./smsMessage.controller');router[_0x0c82('0x7')]('/',auth[_0x0c82('0x8')](),controller[_0x0c82('0x9')]);router[_0x0c82('0x7')](_0x0c82('0xa'),auth[_0x0c82('0x8')](),controller[_0x0c82('0xb')]);router[_0x0c82('0x7')](_0x0c82('0xc'),auth[_0x0c82('0x8')](),controller['show']);router[_0x0c82('0xd')]('/',auth[_0x0c82('0x8')](),interaction[_0x0c82('0xe')]('sms',_0x0c82('0xf')),controller['create']);router[_0x0c82('0xd')](_0x0c82('0x10'),controller['status']);router[_0x0c82('0x11')](_0x0c82('0xc'),auth[_0x0c82('0x8')](),controller[_0x0c82('0x12')]);router[_0x0c82('0x11')](_0x0c82('0x13'),auth[_0x0c82('0x8')](),controller[_0x0c82('0x14')]);router[_0x0c82('0x11')](_0x0c82('0x15'),auth[_0x0c82('0x8')](),controller[_0x0c82('0x16')]);router[_0x0c82('0x17')]('/:id',auth[_0x0c82('0x8')](),controller['destroy']);module[_0x0c82('0x18')]=router; \ No newline at end of file diff --git a/server/api/smsMessage/smsMessage.attributes.js b/server/api/smsMessage/smsMessage.attributes.js index 1142ce6..9be6f32 100644 --- a/server/api/smsMessage/smsMessage.attributes.js +++ b/server/api/smsMessage/smsMessage.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xeb28=['STRING','BOOLEAN','TEXT','medium','ENUM','out'];(function(_0x200045,_0x4e5da1){var _0x566a8d=function(_0x46b5a1){while(--_0x46b5a1){_0x200045['push'](_0x200045['shift']());}};_0x566a8d(++_0x4e5da1);}(_0xeb28,0x1d0));var _0x8eb2=function(_0x167e0e,_0x544b25){_0x167e0e=_0x167e0e-0x0;var _0x44a95d=_0xeb28[_0x167e0e];return _0x44a95d;};'use strict';var Sequelize=require('sequelize');module['exports']={'body':{'type':Sequelize[_0x8eb2('0x0')](_0x8eb2('0x1')),'allowNull':![]},'read':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'direction':{'type':Sequelize[_0x8eb2('0x2')]('in',_0x8eb2('0x3')),'defaultValue':_0x8eb2('0x3'),'allowNull':![]},'messageId':{'type':Sequelize[_0x8eb2('0x4')](0xbe)},'phone':{'type':Sequelize[_0x8eb2('0x4')]},'readAt':{'type':Sequelize['DATE']},'secret':{'type':Sequelize[_0x8eb2('0x5')],'defaultValue':![]},'providerName':{'type':Sequelize[_0x8eb2('0x4')]},'providerResponse':{'type':Sequelize['TEXT']}}; \ No newline at end of file +var _0x5e38=['sequelize','exports','TEXT','BOOLEAN','ENUM','out','STRING','DATE'];(function(_0x3f994d,_0x249d72){var _0x5309b4=function(_0x545307){while(--_0x545307){_0x3f994d['push'](_0x3f994d['shift']());}};_0x5309b4(++_0x249d72);}(_0x5e38,0x1b0));var _0x85e3=function(_0x297bb7,_0x2f9088){_0x297bb7=_0x297bb7-0x0;var _0x4a8b43=_0x5e38[_0x297bb7];return _0x4a8b43;};'use strict';var Sequelize=require(_0x85e3('0x0'));module[_0x85e3('0x1')]={'body':{'type':Sequelize[_0x85e3('0x2')]('medium'),'allowNull':![]},'read':{'type':Sequelize[_0x85e3('0x3')],'defaultValue':![]},'direction':{'type':Sequelize[_0x85e3('0x4')]('in',_0x85e3('0x5')),'defaultValue':_0x85e3('0x5'),'allowNull':![]},'messageId':{'type':Sequelize[_0x85e3('0x6')](0xbe)},'phone':{'type':Sequelize[_0x85e3('0x6')]},'readAt':{'type':Sequelize[_0x85e3('0x7')]},'secret':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'providerName':{'type':Sequelize['STRING']},'providerResponse':{'type':Sequelize['TEXT']}}; \ No newline at end of file diff --git a/server/api/smsMessage/smsMessage.controller.js b/server/api/smsMessage/smsMessage.controller.js index 82709f9..42b5ae1 100644 --- a/server/api/smsMessage/smsMessage.controller.js +++ b/server/api/smsMessage/smsMessage.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7fbe=['QueryTypes','SELECT','contact','manual','interface','SIP/%s','channel','EventManager','acceptmessage','sms-interactions','sms','SmsInteraction','[SMSMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','RejectMessage','rejectMessage','length','sequelize','event','rejectmessage','SmsAccount','SmsAccountId','SmsMessage,\x20%s,\x20%s,\x20%s','received\x20delivery\x20report\x20from','inspect','twilio','MessageSid','messageId','SmsAccount,\x20%s,\x20%s,\x20%s','plivo','MessageUUID','indexOf','delivered','Status','infobip','results','DELIVERED','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','desk.js','querystring','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./smsMessage.socket','register','client','http','then','info','SmsMessage,\x20%s,\x20%s','request\x20sent','debug','error','code','message','catch','sendStatus','status','end','json','offset','undefined','limit','set','Content-Range','apply','reject','save','update','destroy','stack','name','send','index','map','rawAttributes','fieldName','type','model','query','filters','intersection','attributes','fields','nolimit','order','sort','pick','filter','where','merge','VIRTUAL','options','SmsMessage','count','findAll','rows','show','params','keys','include','create','body','find','describe','accept','read','format','UserId','user','agent','CmContact','get','SmsInteractionId','isNil','read1stAt','YYYY-MM-DD\x20HH:mm:ss','interaction','role','stringify','null','AcceptMessage','acceptMessage','startsWith','cf_','push','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','ContactId'];(function(_0x516f4f,_0x29f1c6){var _0x10851d=function(_0x2e6dc8){while(--_0x2e6dc8){_0x516f4f['push'](_0x516f4f['shift']());}};_0x10851d(++_0x29f1c6);}(_0x7fbe,0x1ec));var _0xe7fb=function(_0x10a6c5,_0x3b8168){_0x10a6c5=_0x10a6c5-0x0;var _0x79e4b8=_0x7fbe[_0x10a6c5];return _0x79e4b8;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0xe7fb('0x0'));var jsonpatch=require(_0xe7fb('0x1'));var rp=require(_0xe7fb('0x2'));var moment=require(_0xe7fb('0x3'));var BPromise=require(_0xe7fb('0x4'));var Mustache=require(_0xe7fb('0x5'));var util=require(_0xe7fb('0x6'));var path=require(_0xe7fb('0x7'));var sox=require(_0xe7fb('0x8'));var csv=require(_0xe7fb('0x9'));var ejs=require(_0xe7fb('0xa'));var fs=require('fs');var fs_extra=require(_0xe7fb('0xb'));var _=require(_0xe7fb('0xc'));var squel=require(_0xe7fb('0xd'));var crypto=require('crypto');var jsforce=require(_0xe7fb('0xe'));var deskjs=require(_0xe7fb('0xf'));var toCsv=require(_0xe7fb('0x9'));var querystring=require(_0xe7fb('0x10'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0xe7fb('0x11'));var qs=require(_0xe7fb('0x12'));var as=require(_0xe7fb('0x13'));var hardwareService=require(_0xe7fb('0x14'));var logger=require(_0xe7fb('0x15'))(_0xe7fb('0x16'));var utils=require(_0xe7fb('0x17'));var config=require(_0xe7fb('0x18'));var licenseUtil=require(_0xe7fb('0x19'));var db=require(_0xe7fb('0x1a'))['db'];config[_0xe7fb('0x1b')]=_[_0xe7fb('0x1c')](config[_0xe7fb('0x1b')],{'host':_0xe7fb('0x1d'),'port':0x18eb});var socket=require(_0xe7fb('0x1e'))(new Redis(config['redis']));require(_0xe7fb('0x1f'))[_0xe7fb('0x20')](socket);var jayson=require('jayson/promise');var client=jayson[_0xe7fb('0x21')][_0xe7fb('0x22')]({'port':0x232c});var client9002=jayson['client'][_0xe7fb('0x22')]({'port':0x232a});function respondWithRpcPromise(_0x559129,_0x12fff6,_0x18d23c,_0x12603d){return new BPromise(function(_0x17e8a8,_0x562262){var _0x892b0f=_0x12603d||client;return _0x892b0f['request'](_0x559129,_0x18d23c)[_0xe7fb('0x23')](function(_0x546463){logger[_0xe7fb('0x24')](_0xe7fb('0x25'),_0x12fff6,_0xe7fb('0x26'));logger[_0xe7fb('0x27')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x12fff6,_0xe7fb('0x26'),JSON['stringify'](_0x546463));if(_0x546463[_0xe7fb('0x28')]){if(_0x546463['error'][_0xe7fb('0x29')]===0x1f4){logger['error'](_0xe7fb('0x25'),_0x12fff6,_0x546463[_0xe7fb('0x28')]['message']);return _0x562262(_0x546463[_0xe7fb('0x28')][_0xe7fb('0x2a')]);}logger[_0xe7fb('0x28')]('SmsMessage,\x20%s,\x20%s',_0x12fff6,_0x546463[_0xe7fb('0x28')][_0xe7fb('0x2a')]);return _0x17e8a8(_0x546463['error']['message']);}else{logger['info'](_0xe7fb('0x25'),_0x12fff6,'request\x20sent');_0x17e8a8(_0x546463['result'][_0xe7fb('0x2a')]);}})[_0xe7fb('0x2b')](function(_0x2996ae){logger['error'](_0xe7fb('0x25'),_0x12fff6,_0x2996ae);_0x562262(_0x2996ae);});});}function respondWithStatusCode(_0x2b69c4,_0x390f32){_0x390f32=_0x390f32||0xcc;return function(_0x1ceed8){if(_0x1ceed8){return _0x2b69c4[_0xe7fb('0x2c')](_0x390f32);}return _0x2b69c4[_0xe7fb('0x2d')](_0x390f32)[_0xe7fb('0x2e')]();};}function respondWithResult(_0x59e015,_0x5df9f2){_0x5df9f2=_0x5df9f2||0xc8;return function(_0x1086e6){if(_0x1086e6){return _0x59e015[_0xe7fb('0x2d')](_0x5df9f2)[_0xe7fb('0x2f')](_0x1086e6);}};}function respondWithFilteredResult(_0x4fd290,_0xb1f2f4){return function(_0x251807){if(_0x251807){var _0xd3fffe=typeof _0xb1f2f4[_0xe7fb('0x30')]===_0xe7fb('0x31')&&typeof _0xb1f2f4[_0xe7fb('0x32')]===_0xe7fb('0x31');var _0x3dd0be=_0x251807['count'];var _0x3d1fb5=_0xd3fffe?0x0:_0xb1f2f4[_0xe7fb('0x30')];var _0x29d1ca=_0xd3fffe?_0x251807['count']:_0xb1f2f4['offset']+_0xb1f2f4[_0xe7fb('0x32')];var _0x4a9fea;if(_0x29d1ca>=_0x3dd0be){_0x29d1ca=_0x3dd0be;_0x4a9fea=0xc8;}else{_0x4a9fea=0xce;}_0x4fd290[_0xe7fb('0x2d')](_0x4a9fea);return _0x4fd290[_0xe7fb('0x33')](_0xe7fb('0x34'),_0x3d1fb5+'-'+_0x29d1ca+'/'+_0x3dd0be)[_0xe7fb('0x2f')](_0x251807);}return null;};}function patchUpdates(_0x556368){return function(_0x1af472){try{jsonpatch[_0xe7fb('0x35')](_0x1af472,_0x556368,!![]);}catch(_0x18ed83){return BPromise[_0xe7fb('0x36')](_0x18ed83);}return _0x1af472[_0xe7fb('0x37')]();};}function saveUpdates(_0x480819,_0x256694){return function(_0x121d19){if(_0x121d19){return _0x121d19[_0xe7fb('0x38')](_0x480819)[_0xe7fb('0x23')](function(_0x46f430){return _0x46f430;});}return null;};}function removeEntity(_0x25e925,_0x1bc72d){return function(_0x147eb1){if(_0x147eb1){return _0x147eb1[_0xe7fb('0x39')]()['then'](function(){_0x25e925[_0xe7fb('0x2d')](0xcc)[_0xe7fb('0x2e')]();});}};}function handleEntityNotFound(_0x2593e3,_0x56e17b){return function(_0x1de75a){if(!_0x1de75a){_0x2593e3[_0xe7fb('0x2c')](0x194);}return _0x1de75a;};}function handleError(_0x4218bc,_0x1530b1){_0x1530b1=_0x1530b1||0x1f4;return function(_0x402ca3){logger[_0xe7fb('0x28')](_0x402ca3[_0xe7fb('0x3a')]);if(_0x402ca3[_0xe7fb('0x3b')]){delete _0x402ca3[_0xe7fb('0x3b')];}_0x4218bc[_0xe7fb('0x2d')](_0x1530b1)[_0xe7fb('0x3c')](_0x402ca3);};}exports[_0xe7fb('0x3d')]=function(_0x1544f2,_0x1c81fe){var _0xeb7c29={},_0x41e2d1={},_0x30dd5b={'count':0x0,'rows':[]};var _0x15aad5=_[_0xe7fb('0x3e')](db['SmsMessage'][_0xe7fb('0x3f')],function(_0x23f9f9){return{'name':_0x23f9f9[_0xe7fb('0x40')],'type':_0x23f9f9[_0xe7fb('0x41')]['key']};});_0x41e2d1[_0xe7fb('0x42')]=_[_0xe7fb('0x3e')](_0x15aad5,_0xe7fb('0x3b'));_0x41e2d1[_0xe7fb('0x43')]=_['keys'](_0x1544f2[_0xe7fb('0x43')]);_0x41e2d1[_0xe7fb('0x44')]=_[_0xe7fb('0x45')](_0x41e2d1[_0xe7fb('0x42')],_0x41e2d1[_0xe7fb('0x43')]);_0xeb7c29[_0xe7fb('0x46')]=_['intersection'](_0x41e2d1[_0xe7fb('0x42')],qs[_0xe7fb('0x47')](_0x1544f2[_0xe7fb('0x43')]['fields']));_0xeb7c29[_0xe7fb('0x46')]=_0xeb7c29[_0xe7fb('0x46')]['length']?_0xeb7c29['attributes']:_0x41e2d1['model'];if(!_0x1544f2['query']['hasOwnProperty'](_0xe7fb('0x48'))){_0xeb7c29[_0xe7fb('0x32')]=qs[_0xe7fb('0x32')](_0x1544f2['query'][_0xe7fb('0x32')]);_0xeb7c29['offset']=qs[_0xe7fb('0x30')](_0x1544f2[_0xe7fb('0x43')]['offset']);}_0xeb7c29[_0xe7fb('0x49')]=qs[_0xe7fb('0x4a')](_0x1544f2[_0xe7fb('0x43')][_0xe7fb('0x4a')]);_0xeb7c29['where']=qs[_0xe7fb('0x44')](_[_0xe7fb('0x4b')](_0x1544f2[_0xe7fb('0x43')],_0x41e2d1['filters']),_0x15aad5);if(_0x1544f2[_0xe7fb('0x43')][_0xe7fb('0x4c')]){_0xeb7c29[_0xe7fb('0x4d')]=_[_0xe7fb('0x4e')](_0xeb7c29[_0xe7fb('0x4d')],{'$or':_['map'](_0x15aad5,function(_0x2eb999){if(_0x2eb999['type']!==_0xe7fb('0x4f')){var _0x468c62={};_0x468c62[_0x2eb999[_0xe7fb('0x3b')]]={'$like':'%'+_0x1544f2[_0xe7fb('0x43')][_0xe7fb('0x4c')]+'%'};return _0x468c62;}})});}_0xeb7c29=_['merge']({},_0xeb7c29,_0x1544f2[_0xe7fb('0x50')]);var _0x511542={'where':_0xeb7c29['where']};return db[_0xe7fb('0x51')][_0xe7fb('0x52')](_0x511542)[_0xe7fb('0x23')](function(_0x589555){_0x30dd5b[_0xe7fb('0x52')]=_0x589555;if(_0x1544f2[_0xe7fb('0x43')]['includeAll']){_0xeb7c29['include']=[{'all':!![]}];}return db[_0xe7fb('0x51')][_0xe7fb('0x53')](_0xeb7c29);})[_0xe7fb('0x23')](function(_0x3dd6bf){_0x30dd5b[_0xe7fb('0x54')]=_0x3dd6bf;return _0x30dd5b;})[_0xe7fb('0x23')](respondWithFilteredResult(_0x1c81fe,_0xeb7c29))[_0xe7fb('0x2b')](handleError(_0x1c81fe,null));};exports[_0xe7fb('0x55')]=function(_0x5cd8e3,_0x925a5e){var _0x5cc28f={'raw':!![],'where':{'id':_0x5cd8e3[_0xe7fb('0x56')]['id']}},_0x1cb5d4={};_0x1cb5d4['model']=_[_0xe7fb('0x57')](db['SmsMessage'][_0xe7fb('0x3f')]);_0x1cb5d4['query']=_[_0xe7fb('0x57')](_0x5cd8e3['query']);_0x1cb5d4[_0xe7fb('0x44')]=_['intersection'](_0x1cb5d4[_0xe7fb('0x42')],_0x1cb5d4[_0xe7fb('0x43')]);_0x5cc28f[_0xe7fb('0x46')]=_[_0xe7fb('0x45')](_0x1cb5d4[_0xe7fb('0x42')],qs[_0xe7fb('0x47')](_0x5cd8e3[_0xe7fb('0x43')]['fields']));_0x5cc28f['attributes']=_0x5cc28f[_0xe7fb('0x46')]['length']?_0x5cc28f['attributes']:_0x1cb5d4['model'];if(_0x5cd8e3['query']['includeAll']){_0x5cc28f[_0xe7fb('0x58')]=[{'all':!![]}];}_0x5cc28f=_[_0xe7fb('0x4e')]({},_0x5cc28f,_0x5cd8e3[_0xe7fb('0x50')]);return db[_0xe7fb('0x51')]['find'](_0x5cc28f)[_0xe7fb('0x23')](handleEntityNotFound(_0x925a5e,null))[_0xe7fb('0x23')](respondWithResult(_0x925a5e,null))[_0xe7fb('0x2b')](handleError(_0x925a5e,null));};exports['create']=function(_0x56c512,_0x2f3b72){return db[_0xe7fb('0x51')][_0xe7fb('0x59')](_0x56c512['body'],{})[_0xe7fb('0x23')](respondWithResult(_0x2f3b72,0xc9))[_0xe7fb('0x2b')](handleError(_0x2f3b72,null));};exports[_0xe7fb('0x38')]=function(_0x2a7e4d,_0x548cd4){if(_0x2a7e4d['body']['id']){delete _0x2a7e4d[_0xe7fb('0x5a')]['id'];}return db[_0xe7fb('0x51')][_0xe7fb('0x5b')]({'where':{'id':_0x2a7e4d[_0xe7fb('0x56')]['id']}})[_0xe7fb('0x23')](handleEntityNotFound(_0x548cd4,null))['then'](saveUpdates(_0x2a7e4d[_0xe7fb('0x5a')],null))[_0xe7fb('0x23')](respondWithResult(_0x548cd4,null))[_0xe7fb('0x2b')](handleError(_0x548cd4,null));};exports['destroy']=function(_0x50563b,_0x425bee){return db[_0xe7fb('0x51')][_0xe7fb('0x5b')]({'where':{'id':_0x50563b[_0xe7fb('0x56')]['id']}})[_0xe7fb('0x23')](handleEntityNotFound(_0x425bee,null))[_0xe7fb('0x23')](removeEntity(_0x425bee,null))['catch'](handleError(_0x425bee,null));};exports[_0xe7fb('0x5c')]=function(_0xeb6a44,_0x2cd4e5){return db[_0xe7fb('0x51')][_0xe7fb('0x5c')]()[_0xe7fb('0x23')](respondWithResult(_0x2cd4e5,null))['catch'](handleError(_0x2cd4e5,null));};var interaction_log=require(_0xe7fb('0x15'))('sms-interactions');exports[_0xe7fb('0x5d')]=function(_0x39d99c,_0x116c7e,_0x1b24fd){var _0x5925e6={'agent':{},'channel':'sms'};if(_0x39d99c[_0xe7fb('0x5a')]['id']){delete _0x39d99c[_0xe7fb('0x5a')]['id'];}_0x39d99c[_0xe7fb('0x5a')][_0xe7fb('0x5e')]=!![];_0x39d99c[_0xe7fb('0x5a')]['readAt']=moment()[_0xe7fb('0x5f')]('YYYY-MM-DD\x20HH:mm:ss');_0x39d99c[_0xe7fb('0x5a')]['UserId']=_0x39d99c['body'][_0xe7fb('0x60')]||_0x39d99c[_0xe7fb('0x61')]['id'];_0x5925e6[_0xe7fb('0x62')]['id']=_0x39d99c['body'][_0xe7fb('0x60')];return db[_0xe7fb('0x51')][_0xe7fb('0x5b')]({'where':{'id':_0x39d99c[_0xe7fb('0x56')]['id'],'UserId':null},'include':[{'model':db[_0xe7fb('0x63')],'as':'Contact'}]})[_0xe7fb('0x23')](handleEntityNotFound(_0x116c7e,null))[_0xe7fb('0x23')](saveUpdates(_0x39d99c['body'],null))[_0xe7fb('0x23')](function(_0xbef97d){if(_0xbef97d){_0x5925e6['message']=_0xbef97d[_0xe7fb('0x64')]({'plain':!![]});return db['SmsInteraction'][_0xe7fb('0x5b')]({'where':{'id':_0xbef97d[_0xe7fb('0x65')]}});}return null;})[_0xe7fb('0x23')](handleEntityNotFound(_0x116c7e,null))['then'](function(_0x2cf734){if(_0x2cf734){return _0x2cf734[_0xe7fb('0x38')]({'UserId':_0x39d99c[_0xe7fb('0x5a')][_0xe7fb('0x60')],'read1stAt':_[_0xe7fb('0x66')](_0x2cf734[_0xe7fb('0x67')])?moment()[_0xe7fb('0x5f')](_0xe7fb('0x68')):undefined});}return null;})['then'](function(_0x497998){if(_0x497998){_0x5925e6[_0xe7fb('0x69')]=_0x497998[_0xe7fb('0x64')]({'plain':!![]});interaction_log[_0xe7fb('0x24')]('[SMSMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x39d99c['user']['id'],_0x39d99c[_0xe7fb('0x61')][_0xe7fb('0x3b')],_0x39d99c[_0xe7fb('0x61')][_0xe7fb('0x6a')],_0x5925e6[_0xe7fb('0x69')]['id'],_0x39d99c[_0xe7fb('0x5a')]?JSON[_0xe7fb('0x6b')](_0x39d99c[_0xe7fb('0x5a')]):_0xe7fb('0x6c'));return respondWithRpcPromise(_0xe7fb('0x6d'),_0xe7fb('0x6e'),_0x5925e6);}return null;})[_0xe7fb('0x23')](function(_0x12b91f){return db['CmContact']['describe']()[_0xe7fb('0x23')](function(_0x392dc3){var _0x178395=[];for(var _0x16cd8f=0x0;_0x16cd8f=0x0){return _0x33262f[_0xe7fb('0x38')]({'read':!![]});}else{logger['error'](_0xe7fb('0x8f'),_0xe7fb('0x2d'),'plivio',util[_0xe7fb('0x8b')](_0x2c2126[_0xe7fb('0x5a')],{'showHidden':![],'depth':null}));}break;case _0xe7fb('0x95'):var _0x50af60=_0x2c2126[_0xe7fb('0x5a')][_0xe7fb('0x96')][0x0];if(_0x50af60['status']['groupName']===_0xe7fb('0x97')){return _0x33262f[_0xe7fb('0x38')]({'read':!![]});}else{logger[_0xe7fb('0x28')](_0xe7fb('0x8f'),_0xe7fb('0x2d'),_0xe7fb('0x95'),util['inspect'](_0x2c2126[_0xe7fb('0x5a')],{'showHidden':![],'depth':null}));}break;}return _0x33262f;}})[_0xe7fb('0x23')](respondWithResult(_0x227ff9,null))[_0xe7fb('0x2b')](handleError(_0x227ff9,null));}; \ No newline at end of file +var _0x5292=['SmsMessage,\x20%s,\x20%s,\x20%s','error','code','message','info','result','sendStatus','status','end','json','offset','undefined','count','set','Content-Range','reject','stack','name','map','SmsMessage','rawAttributes','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','limit','where','pick','filter','merge','options','findAll','catch','params','include','find','body','describe','sms-interactions','accept','sms','read','readAt','format','YYYY-MM-DD\x20HH:mm:ss','UserId','user','agent','CmContact','Contact','get','SmsInteractionId','isNil','read1stAt','interaction','[SMSMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','null','acceptMessage','startsWith','cf_','push','ContactId','Sequelize','QueryTypes','SELECT','contact','manual','interface','channel','EventManager','acceptmessage','SmsInteraction','[SMSMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','stringify','RejectMessage','rejectMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','event','rejectmessage','SmsAccount','SmsAccountId','received\x20delivery\x20report\x20from','inspect','MessageSid','update','SmsAccount,\x20%s,\x20%s,\x20%s','twilio','plivo','MessageUUID','messageId','indexOf','sent','delivered','plivio','infobip','results','DELIVERED','eml-format','rimraf','fast-json-patch','moment','bluebird','mustache','util','sox','lodash','squel','desk.js','to-csv','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','redis','defaults','localhost','socket.io-emitter','./smsMessage.socket','jayson/promise','client','http','request','then','SmsMessage,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x599f41,_0x4db732){var _0x2e4d58=function(_0x14c882){while(--_0x14c882){_0x599f41['push'](_0x599f41['shift']());}};_0x2e4d58(++_0x4db732);}(_0x5292,0xf7));var _0x2529=function(_0x21d2a6,_0x44c6cc){_0x21d2a6=_0x21d2a6-0x0;var _0x3a5b9f=_0x5292[_0x21d2a6];return _0x3a5b9f;};'use strict';var emlformat=require(_0x2529('0x0'));var rimraf=require(_0x2529('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x2529('0x2'));var rp=require('request-promise');var moment=require(_0x2529('0x3'));var BPromise=require(_0x2529('0x4'));var Mustache=require(_0x2529('0x5'));var util=require(_0x2529('0x6'));var path=require('path');var sox=require(_0x2529('0x7'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x2529('0x8'));var squel=require(_0x2529('0x9'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x2529('0xa'));var toCsv=require(_0x2529('0xb'));var querystring=require('querystring');var Papa=require(_0x2529('0xc'));var Redis=require(_0x2529('0xd'));var authService=require(_0x2529('0xe'));var qs=require(_0x2529('0xf'));var as=require(_0x2529('0x10'));var hardwareService=require(_0x2529('0x11'));var logger=require(_0x2529('0x12'))(_0x2529('0x13'));var utils=require('../../config/utils');var config=require(_0x2529('0x14'));var licenseUtil=require(_0x2529('0x15'));var db=require('../../mysqldb')['db'];config[_0x2529('0x16')]=_[_0x2529('0x17')](config[_0x2529('0x16')],{'host':_0x2529('0x18'),'port':0x18eb});var socket=require(_0x2529('0x19'))(new Redis(config[_0x2529('0x16')]));require(_0x2529('0x1a'))['register'](socket);var jayson=require(_0x2529('0x1b'));var client=jayson[_0x2529('0x1c')][_0x2529('0x1d')]({'port':0x232c});var client9002=jayson[_0x2529('0x1c')][_0x2529('0x1d')]({'port':0x232a});function respondWithRpcPromise(_0x2598a1,_0x1a1ccc,_0xf10dfb,_0x574975){return new BPromise(function(_0x163bf4,_0x502ea8){var _0x337720=_0x574975||client;return _0x337720[_0x2529('0x1e')](_0x2598a1,_0xf10dfb)[_0x2529('0x1f')](function(_0x49aa27){logger['info'](_0x2529('0x20'),_0x1a1ccc,_0x2529('0x21'));logger[_0x2529('0x22')](_0x2529('0x23'),_0x1a1ccc,_0x2529('0x21'),JSON['stringify'](_0x49aa27));if(_0x49aa27[_0x2529('0x24')]){if(_0x49aa27[_0x2529('0x24')][_0x2529('0x25')]===0x1f4){logger[_0x2529('0x24')]('SmsMessage,\x20%s,\x20%s',_0x1a1ccc,_0x49aa27[_0x2529('0x24')][_0x2529('0x26')]);return _0x502ea8(_0x49aa27[_0x2529('0x24')]['message']);}logger[_0x2529('0x24')](_0x2529('0x20'),_0x1a1ccc,_0x49aa27[_0x2529('0x24')][_0x2529('0x26')]);return _0x163bf4(_0x49aa27['error'][_0x2529('0x26')]);}else{logger[_0x2529('0x27')](_0x2529('0x20'),_0x1a1ccc,_0x2529('0x21'));_0x163bf4(_0x49aa27[_0x2529('0x28')][_0x2529('0x26')]);}})['catch'](function(_0x5539ef){logger[_0x2529('0x24')](_0x2529('0x20'),_0x1a1ccc,_0x5539ef);_0x502ea8(_0x5539ef);});});}function respondWithStatusCode(_0xbd829f,_0x431c40){_0x431c40=_0x431c40||0xcc;return function(_0x24418a){if(_0x24418a){return _0xbd829f[_0x2529('0x29')](_0x431c40);}return _0xbd829f[_0x2529('0x2a')](_0x431c40)[_0x2529('0x2b')]();};}function respondWithResult(_0x20c135,_0x113df6){_0x113df6=_0x113df6||0xc8;return function(_0x5852aa){if(_0x5852aa){return _0x20c135[_0x2529('0x2a')](_0x113df6)[_0x2529('0x2c')](_0x5852aa);}};}function respondWithFilteredResult(_0x4dd0fb,_0x1822ce){return function(_0x3c46c6){if(_0x3c46c6){var _0x5bea2d=typeof _0x1822ce[_0x2529('0x2d')]===_0x2529('0x2e')&&typeof _0x1822ce['limit']===_0x2529('0x2e');var _0x1f2934=_0x3c46c6['count'];var _0x96bd62=_0x5bea2d?0x0:_0x1822ce[_0x2529('0x2d')];var _0x3c2dba=_0x5bea2d?_0x3c46c6[_0x2529('0x2f')]:_0x1822ce[_0x2529('0x2d')]+_0x1822ce['limit'];var _0x3d3b14;if(_0x3c2dba>=_0x1f2934){_0x3c2dba=_0x1f2934;_0x3d3b14=0xc8;}else{_0x3d3b14=0xce;}_0x4dd0fb[_0x2529('0x2a')](_0x3d3b14);return _0x4dd0fb[_0x2529('0x30')](_0x2529('0x31'),_0x96bd62+'-'+_0x3c2dba+'/'+_0x1f2934)[_0x2529('0x2c')](_0x3c46c6);}return null;};}function patchUpdates(_0x3863b5){return function(_0x74c5ad){try{jsonpatch['apply'](_0x74c5ad,_0x3863b5,!![]);}catch(_0x4ab0ed){return BPromise[_0x2529('0x32')](_0x4ab0ed);}return _0x74c5ad['save']();};}function saveUpdates(_0x3f4148,_0x4b610f){return function(_0x4f438a){if(_0x4f438a){return _0x4f438a['update'](_0x3f4148)[_0x2529('0x1f')](function(_0x3c815f){return _0x3c815f;});}return null;};}function removeEntity(_0x2347f6,_0x599c83){return function(_0x11fc09){if(_0x11fc09){return _0x11fc09['destroy']()['then'](function(){_0x2347f6['status'](0xcc)[_0x2529('0x2b')]();});}};}function handleEntityNotFound(_0x182c6b,_0x2f4d44){return function(_0x3d6238){if(!_0x3d6238){_0x182c6b[_0x2529('0x29')](0x194);}return _0x3d6238;};}function handleError(_0x4560f1,_0x56d2d4){_0x56d2d4=_0x56d2d4||0x1f4;return function(_0x15319c){logger[_0x2529('0x24')](_0x15319c[_0x2529('0x33')]);if(_0x15319c[_0x2529('0x34')]){delete _0x15319c[_0x2529('0x34')];}_0x4560f1[_0x2529('0x2a')](_0x56d2d4)['send'](_0x15319c);};}exports['index']=function(_0xadb4a2,_0x1a44fb){var _0x4a762f={},_0x1ea013={},_0x18b4c1={'count':0x0,'rows':[]};var _0x38c995=_[_0x2529('0x35')](db[_0x2529('0x36')][_0x2529('0x37')],function(_0x1b8226){return{'name':_0x1b8226['fieldName'],'type':_0x1b8226[_0x2529('0x38')][_0x2529('0x39')]};});_0x1ea013[_0x2529('0x3a')]=_['map'](_0x38c995,_0x2529('0x34'));_0x1ea013[_0x2529('0x3b')]=_[_0x2529('0x3c')](_0xadb4a2[_0x2529('0x3b')]);_0x1ea013[_0x2529('0x3d')]=_[_0x2529('0x3e')](_0x1ea013[_0x2529('0x3a')],_0x1ea013[_0x2529('0x3b')]);_0x4a762f[_0x2529('0x3f')]=_['intersection'](_0x1ea013[_0x2529('0x3a')],qs[_0x2529('0x40')](_0xadb4a2[_0x2529('0x3b')][_0x2529('0x40')]));_0x4a762f[_0x2529('0x3f')]=_0x4a762f[_0x2529('0x3f')][_0x2529('0x41')]?_0x4a762f['attributes']:_0x1ea013[_0x2529('0x3a')];if(!_0xadb4a2[_0x2529('0x3b')][_0x2529('0x42')](_0x2529('0x43'))){_0x4a762f[_0x2529('0x44')]=qs['limit'](_0xadb4a2[_0x2529('0x3b')][_0x2529('0x44')]);_0x4a762f[_0x2529('0x2d')]=qs[_0x2529('0x2d')](_0xadb4a2[_0x2529('0x3b')][_0x2529('0x2d')]);}_0x4a762f['order']=qs['sort'](_0xadb4a2['query']['sort']);_0x4a762f[_0x2529('0x45')]=qs['filters'](_[_0x2529('0x46')](_0xadb4a2[_0x2529('0x3b')],_0x1ea013[_0x2529('0x3d')]),_0x38c995);if(_0xadb4a2[_0x2529('0x3b')][_0x2529('0x47')]){_0x4a762f['where']=_[_0x2529('0x48')](_0x4a762f['where'],{'$or':_[_0x2529('0x35')](_0x38c995,function(_0x4f29b9){if(_0x4f29b9[_0x2529('0x38')]!=='VIRTUAL'){var _0x4665bd={};_0x4665bd[_0x4f29b9[_0x2529('0x34')]]={'$like':'%'+_0xadb4a2['query'][_0x2529('0x47')]+'%'};return _0x4665bd;}})});}_0x4a762f=_['merge']({},_0x4a762f,_0xadb4a2[_0x2529('0x49')]);var _0x4648d1={'where':_0x4a762f[_0x2529('0x45')]};return db[_0x2529('0x36')][_0x2529('0x2f')](_0x4648d1)[_0x2529('0x1f')](function(_0x41728f){_0x18b4c1[_0x2529('0x2f')]=_0x41728f;if(_0xadb4a2[_0x2529('0x3b')]['includeAll']){_0x4a762f['include']=[{'all':!![]}];}return db[_0x2529('0x36')][_0x2529('0x4a')](_0x4a762f);})[_0x2529('0x1f')](function(_0x2748c5){_0x18b4c1['rows']=_0x2748c5;return _0x18b4c1;})['then'](respondWithFilteredResult(_0x1a44fb,_0x4a762f))[_0x2529('0x4b')](handleError(_0x1a44fb,null));};exports['show']=function(_0x2e5bfc,_0x298647){var _0x229ac8={'raw':!![],'where':{'id':_0x2e5bfc[_0x2529('0x4c')]['id']}},_0xa64852={};_0xa64852[_0x2529('0x3a')]=_[_0x2529('0x3c')](db[_0x2529('0x36')]['rawAttributes']);_0xa64852['query']=_[_0x2529('0x3c')](_0x2e5bfc[_0x2529('0x3b')]);_0xa64852[_0x2529('0x3d')]=_[_0x2529('0x3e')](_0xa64852[_0x2529('0x3a')],_0xa64852[_0x2529('0x3b')]);_0x229ac8[_0x2529('0x3f')]=_[_0x2529('0x3e')](_0xa64852[_0x2529('0x3a')],qs[_0x2529('0x40')](_0x2e5bfc[_0x2529('0x3b')]['fields']));_0x229ac8['attributes']=_0x229ac8[_0x2529('0x3f')][_0x2529('0x41')]?_0x229ac8['attributes']:_0xa64852[_0x2529('0x3a')];if(_0x2e5bfc[_0x2529('0x3b')]['includeAll']){_0x229ac8[_0x2529('0x4d')]=[{'all':!![]}];}_0x229ac8=_[_0x2529('0x48')]({},_0x229ac8,_0x2e5bfc[_0x2529('0x49')]);return db[_0x2529('0x36')][_0x2529('0x4e')](_0x229ac8)[_0x2529('0x1f')](handleEntityNotFound(_0x298647,null))[_0x2529('0x1f')](respondWithResult(_0x298647,null))[_0x2529('0x4b')](handleError(_0x298647,null));};exports['create']=function(_0x3a13ff,_0x55c609){return db[_0x2529('0x36')]['create'](_0x3a13ff[_0x2529('0x4f')],{})[_0x2529('0x1f')](respondWithResult(_0x55c609,0xc9))['catch'](handleError(_0x55c609,null));};exports['update']=function(_0x851c61,_0x21be0e){if(_0x851c61[_0x2529('0x4f')]['id']){delete _0x851c61[_0x2529('0x4f')]['id'];}return db[_0x2529('0x36')]['find']({'where':{'id':_0x851c61[_0x2529('0x4c')]['id']}})['then'](handleEntityNotFound(_0x21be0e,null))['then'](saveUpdates(_0x851c61['body'],null))[_0x2529('0x1f')](respondWithResult(_0x21be0e,null))[_0x2529('0x4b')](handleError(_0x21be0e,null));};exports['destroy']=function(_0x36025a,_0x19d73a){return db['SmsMessage'][_0x2529('0x4e')]({'where':{'id':_0x36025a[_0x2529('0x4c')]['id']}})['then'](handleEntityNotFound(_0x19d73a,null))[_0x2529('0x1f')](removeEntity(_0x19d73a,null))[_0x2529('0x4b')](handleError(_0x19d73a,null));};exports[_0x2529('0x50')]=function(_0xda0452,_0x38ce20){return db[_0x2529('0x36')][_0x2529('0x50')]()[_0x2529('0x1f')](respondWithResult(_0x38ce20,null))[_0x2529('0x4b')](handleError(_0x38ce20,null));};var interaction_log=require('../../config/logger')(_0x2529('0x51'));exports[_0x2529('0x52')]=function(_0x3108c3,_0x1ecf5c,_0x4b546d){var _0x33beb2={'agent':{},'channel':_0x2529('0x53')};if(_0x3108c3[_0x2529('0x4f')]['id']){delete _0x3108c3[_0x2529('0x4f')]['id'];}_0x3108c3['body'][_0x2529('0x54')]=!![];_0x3108c3[_0x2529('0x4f')][_0x2529('0x55')]=moment()[_0x2529('0x56')](_0x2529('0x57'));_0x3108c3[_0x2529('0x4f')][_0x2529('0x58')]=_0x3108c3[_0x2529('0x4f')]['UserId']||_0x3108c3[_0x2529('0x59')]['id'];_0x33beb2[_0x2529('0x5a')]['id']=_0x3108c3['body']['UserId'];return db['SmsMessage'][_0x2529('0x4e')]({'where':{'id':_0x3108c3[_0x2529('0x4c')]['id'],'UserId':null},'include':[{'model':db[_0x2529('0x5b')],'as':_0x2529('0x5c')}]})['then'](handleEntityNotFound(_0x1ecf5c,null))['then'](saveUpdates(_0x3108c3['body'],null))[_0x2529('0x1f')](function(_0x27e41e){if(_0x27e41e){_0x33beb2[_0x2529('0x26')]=_0x27e41e[_0x2529('0x5d')]({'plain':!![]});return db['SmsInteraction']['find']({'where':{'id':_0x27e41e[_0x2529('0x5e')]}});}return null;})[_0x2529('0x1f')](handleEntityNotFound(_0x1ecf5c,null))[_0x2529('0x1f')](function(_0x330998){if(_0x330998){return _0x330998['update']({'UserId':_0x3108c3['body'][_0x2529('0x58')],'read1stAt':_[_0x2529('0x5f')](_0x330998[_0x2529('0x60')])?moment()[_0x2529('0x56')]('YYYY-MM-DD\x20HH:mm:ss'):undefined});}return null;})[_0x2529('0x1f')](function(_0x9dd68c){if(_0x9dd68c){_0x33beb2[_0x2529('0x61')]=_0x9dd68c[_0x2529('0x5d')]({'plain':!![]});interaction_log['info'](_0x2529('0x62'),_0x3108c3['user']['id'],_0x3108c3[_0x2529('0x59')]['name'],_0x3108c3[_0x2529('0x59')]['role'],_0x33beb2[_0x2529('0x61')]['id'],_0x3108c3['body']?JSON['stringify'](_0x3108c3['body']):_0x2529('0x63'));return respondWithRpcPromise('AcceptMessage',_0x2529('0x64'),_0x33beb2);}return null;})[_0x2529('0x1f')](function(_0x34d636){return db['CmContact'][_0x2529('0x50')]()['then'](function(_0x2ecdba){var _0x5ad487=[];for(var _0x2ace6b=0x0;_0x2ace6b=0x0){return _0x33fc87[_0x2529('0x80')]({'read':!![]});}else{logger['error'](_0x2529('0x81'),'status',_0x2529('0x89'),util[_0x2529('0x7e')](_0x9163f2[_0x2529('0x4f')],{'showHidden':![],'depth':null}));}break;case _0x2529('0x8a'):var _0x3844a9=_0x9163f2[_0x2529('0x4f')][_0x2529('0x8b')][0x0];if(_0x3844a9[_0x2529('0x2a')]['groupName']===_0x2529('0x8c')){return _0x33fc87[_0x2529('0x80')]({'read':!![]});}else{logger[_0x2529('0x24')](_0x2529('0x81'),_0x2529('0x2a'),_0x2529('0x8a'),util[_0x2529('0x7e')](_0x9163f2[_0x2529('0x4f')],{'showHidden':![],'depth':null}));}break;}return _0x33fc87;}})[_0x2529('0x1f')](respondWithResult(_0x55d961,null))[_0x2529('0x4b')](handleError(_0x55d961,null));}; \ No newline at end of file diff --git a/server/api/smsMessage/smsMessage.events.js b/server/api/smsMessage/smsMessage.events.js index d63cde0..d7b878f 100644 --- a/server/api/smsMessage/smsMessage.events.js +++ b/server/api/smsMessage/smsMessage.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x295c=['emit','hook','events','../../mysqldb','SmsMessage','setMaxListeners','save','update','remove'];(function(_0x2f5ac5,_0x1ee939){var _0x37c9a8=function(_0x15031f){while(--_0x15031f){_0x2f5ac5['push'](_0x2f5ac5['shift']());}};_0x37c9a8(++_0x1ee939);}(_0x295c,0x65));var _0xc295=function(_0x3fa761,_0x2b6986){_0x3fa761=_0x3fa761-0x0;var _0x42db74=_0x295c[_0x3fa761];return _0x42db74;};'use strict';var EventEmitter=require(_0xc295('0x0'));var SmsMessage=require(_0xc295('0x1'))['db'][_0xc295('0x2')];var SmsMessageEvents=new EventEmitter();SmsMessageEvents[_0xc295('0x3')](0x0);var events={'afterCreate':_0xc295('0x4'),'afterUpdate':_0xc295('0x5'),'afterDestroy':_0xc295('0x6')};function emitEvent(_0x35efed){return function(_0x29a712,_0x27e249,_0x163f9e){SmsMessageEvents['emit'](_0x35efed+':'+_0x29a712['id'],_0x29a712);SmsMessageEvents[_0xc295('0x7')](_0x35efed,_0x29a712);_0x163f9e(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];SmsMessage[_0xc295('0x8')](e,emitEvent(event));}}module['exports']=SmsMessageEvents; \ No newline at end of file +var _0xd76a=['../../mysqldb','SmsMessage','setMaxListeners','save','update','emit','hasOwnProperty','hook','exports'];(function(_0x1fa26c,_0x58f406){var _0x2e72f9=function(_0x3ec8bc){while(--_0x3ec8bc){_0x1fa26c['push'](_0x1fa26c['shift']());}};_0x2e72f9(++_0x58f406);}(_0xd76a,0x1dd));var _0xad76=function(_0x185507,_0x3b4bf7){_0x185507=_0x185507-0x0;var _0x1eac66=_0xd76a[_0x185507];return _0x1eac66;};'use strict';var EventEmitter=require('events');var SmsMessage=require(_0xad76('0x0'))['db'][_0xad76('0x1')];var SmsMessageEvents=new EventEmitter();SmsMessageEvents[_0xad76('0x2')](0x0);var events={'afterCreate':_0xad76('0x3'),'afterUpdate':_0xad76('0x4'),'afterDestroy':'remove'};function emitEvent(_0x2c8d7c){return function(_0x2b9c67,_0x3c0b33,_0x55c7ef){SmsMessageEvents['emit'](_0x2c8d7c+':'+_0x2b9c67['id'],_0x2b9c67);SmsMessageEvents[_0xad76('0x5')](_0x2c8d7c,_0x2b9c67);_0x55c7ef(null);};}for(var e in events){if(events[_0xad76('0x6')](e)){var event=events[e];SmsMessage[_0xad76('0x7')](e,emitEvent(event));}}module[_0xad76('0x8')]=SmsMessageEvents; \ No newline at end of file diff --git a/server/api/smsMessage/smsMessage.model.js b/server/api/smsMessage/smsMessage.model.js index ca1ad76..32ad24f 100644 --- a/server/api/smsMessage/smsMessage.model.js +++ b/server/api/smsMessage/smsMessage.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xcf14=['infobip','csc','crypto','apiKey','keys','length','createHash','md5','digest','signature=','/external/get/send.php?','Missing\x20parameters:\x20apiKey','https://platform.clickatell.com/messages','uuid','UTF-8','apiMessageId','clickatell','bandwidth','%s:%s','https://messaging.bandwidth.com/api/v2/users/','accountId','applicationId','intelepeer','https://api.intelepeer.com/_rest/v4/app/sms/send','Bearer\x20','application/json','code','message','https://api.intelepeer.com/_rest/v4/app/sms/mdr','refid','Token\x20not\x20received','finally','utf8mb4','utf8mb4_unicode_ci','lodash','../../config/logger','api','bluebird','request-promise','path','rimraf','./smsMessage.attributes','exports','define','SmsMessage','sms_messages','messageId','fti_sms_messages','body','FULLTEXT','models','get','direction','toLowerCase','out','secret','isNil','UserId','SmsInteraction','findOne','SmsInteractionId','then','update','createdAt','catch','SmsAccount','find','SmsAccountId','type','twilio','accountSid','authToken','messages','phone','remote','/api/sms/messages/','/status?token=','sid','error','SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate','inspect','Missing\x20parameters:\x20phone,\x20accountSid\x20or\x20authToken','skebby','https://api.skebby.it/API/v1.0/REST/','username','password','smsMethod','sender','login?username=','&password=','GET','sms','POST','user_key','session_key','deliveryReport','read','Missing\x20parameters:\x20username,\x20password','connectel','senderString','https://smsapi.connectel.se/api/v2/send/','requestid','Missing\x20parameters:\x20authToken','clicksend','xCALLY\x20Motion','format','https://rest.clicksend.com/v3/sms/send','Basic\x20%s','toString','base64','http_code','data','queued_count','head','message_id','clickSend','plivo','authId','token','https://api.plivo.com/v1/Account/%s/Message/','message_uuid','Missing\x20parameters:\x20authId,\x20authToken','baseUrl','/auth/1/session','/sms/2/text/advanced','IBSSO\x20'];(function(_0x236f19,_0x11dea9){var _0x3c5ea3=function(_0x2a47ad){while(--_0x2a47ad){_0x236f19['push'](_0x236f19['shift']());}};_0x3c5ea3(++_0x11dea9);}(_0xcf14,0xa1));var _0x4cf1=function(_0x29ccca,_0x79666b){_0x29ccca=_0x29ccca-0x0;var _0x285af1=_0xcf14[_0x29ccca];return _0x285af1;};'use strict';var _=require(_0x4cf1('0x0'));var util=require('util');var logger=require(_0x4cf1('0x1'))(_0x4cf1('0x2'));var moment=require('moment');var BPromise=require(_0x4cf1('0x3'));var rp=require(_0x4cf1('0x4'));var fs=require('fs');var path=require(_0x4cf1('0x5'));var rimraf=require(_0x4cf1('0x6'));var config=require('../../config/environment');var attributes=require(_0x4cf1('0x7'));module[_0x4cf1('0x8')]=function(_0x11a184,_0x12076f){return _0x11a184[_0x4cf1('0x9')](_0x4cf1('0xa'),attributes,{'tableName':_0x4cf1('0xb'),'paranoid':![],'indexes':[{'name':'messageId','fields':[_0x4cf1('0xc')]},{'name':_0x4cf1('0xd'),'fields':[_0x4cf1('0xe')],'type':_0x4cf1('0xf')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x2736c7,_0x3722fa,_0x207aea){var _0xe704e9=_0x11a184[_0x4cf1('0x10')];var _0x28af26=_0x2736c7[_0x4cf1('0x11')]({'plain':!![]});if(_0x28af26[_0x4cf1('0x12')][_0x4cf1('0x13')]()==='in'||_0x28af26[_0x4cf1('0x12')]['toLowerCase']()===_0x4cf1('0x14')&&!_0x28af26[_0x4cf1('0x15')]&&!_[_0x4cf1('0x16')](_0x28af26[_0x4cf1('0x17')])){_0xe704e9[_0x4cf1('0x18')][_0x4cf1('0x19')]({'where':{'id':_0x28af26[_0x4cf1('0x1a')]}})[_0x4cf1('0x1b')](function(_0x25f091){if(_0x25f091){_0x25f091[_0x4cf1('0x1c')]({'lastMsgAt':_0x28af26[_0x4cf1('0x1d')],'lastMsgDirection':_0x28af26[_0x4cf1('0x12')][_0x4cf1('0x13')]()});}})[_0x4cf1('0x1e')](function(_0xe257a5){console['error'](_0xe257a5);});}if(_0x28af26[_0x4cf1('0x12')]==='out'&&!_0x28af26[_0x4cf1('0x15')]){var _0x3c485a;_0xe704e9[_0x4cf1('0x1f')][_0x4cf1('0x20')]({'where':{'id':_0x28af26[_0x4cf1('0x21')]},'raw':!![]})['then'](function(_0x4499f7){_0x3c485a=_0x4499f7;if(_0x3c485a&&_0x3c485a[_0x4cf1('0x22')]){switch(_0x3c485a[_0x4cf1('0x22')]){case _0x4cf1('0x23'):var _0x52b5a2=require('twilio');if(_0x3c485a[_0x4cf1('0x24')]&&_0x3c485a[_0x4cf1('0x25')]&&_0x3c485a['phone']){var _0x85885a=new _0x52b5a2(_0x3c485a[_0x4cf1('0x24')],_0x3c485a[_0x4cf1('0x25')]);_0x85885a[_0x4cf1('0x26')]['create']({'body':_0x28af26[_0x4cf1('0xe')],'to':_0x28af26[_0x4cf1('0x27')],'from':_0x3c485a[_0x4cf1('0x27')],'statusCallback':_0x3c485a[_0x4cf1('0x28')]+_0x4cf1('0x29')+_0x28af26['id']+_0x4cf1('0x2a')+_0x3c485a['token']})[_0x4cf1('0x1b')](function(_0x5bb535){if(_0x5bb535[_0x4cf1('0x2b')]){return _0x2736c7[_0x4cf1('0x1c')]({'messageId':_0x5bb535[_0x4cf1('0x2b')]});}})[_0x4cf1('0x1e')](function(_0x389575){logger[_0x4cf1('0x2c')](_0x4cf1('0x2d'),_0x4cf1('0x2e'),_0x4cf1('0x23'),util[_0x4cf1('0x2f')](_0x389575,{'showHidden':![],'depth':null}));});}else{logger[_0x4cf1('0x2c')](_0x4cf1('0x2d'),_0x4cf1('0x2e'),'twilio',_0x4cf1('0x30'));}break;case _0x4cf1('0x31'):var _0x20d9d9=_0x4cf1('0x32');if(_0x3c485a[_0x4cf1('0x33')]&&_0x3c485a[_0x4cf1('0x34')]){var _0x9c3e13={'recipient':[_0x28af26[_0x4cf1('0x27')]],'message':_0x28af26[_0x4cf1('0xe')],'message_type':_0x3c485a[_0x4cf1('0x35')]};if(_0x3c485a[_0x4cf1('0x35')]&&_0x3c485a['smsMethod']!=='SI'){_0x9c3e13[_0x4cf1('0x36')]=_0x3c485a[_0x4cf1('0x27')];}var _0xfa0ea4={'url':_0x20d9d9+_0x4cf1('0x37')+_0x3c485a[_0x4cf1('0x33')]+_0x4cf1('0x38')+_0x3c485a[_0x4cf1('0x34')],'method':_0x4cf1('0x39')};rp(_0xfa0ea4)[_0x4cf1('0x1b')](function(_0x483f48){var _0x3763f5=_0x483f48['split'](';');var _0x31758b={'user_key':_0x3763f5[0x0],'session_key':_0x3763f5[0x1]};_0xfa0ea4={'url':_0x20d9d9+_0x4cf1('0x3a'),'method':_0x4cf1('0x3b'),'headers':{'user_key':_0x31758b[_0x4cf1('0x3c')],'Session_key':_0x31758b[_0x4cf1('0x3d')]},'json':!![],'body':_0x9c3e13};return rp(_0xfa0ea4);})['then'](function(_0xbfecb4){if(_0xbfecb4['total_sent']>=0x1){var _0x59ba8f={'messageId':_0xbfecb4['internal_order_id']};if(_0x3c485a[_0x4cf1('0x35')]!=='GP'||!_0x3c485a[_0x4cf1('0x3e')]){_0x59ba8f[_0x4cf1('0x3f')]=!![];}return _0x2736c7[_0x4cf1('0x1c')](_0x59ba8f);}else{return logger[_0x4cf1('0x2c')](_0x4cf1('0x2d'),_0x4cf1('0x2e'),_0x4cf1('0x31'),util['inspect'](_0xbfecb4,{'showHidden':![],'depth':null}));}})['catch'](function(_0x48d93a){return logger[_0x4cf1('0x2c')](_0x4cf1('0x2d'),_0x4cf1('0x2e'),_0x4cf1('0x31'),util[_0x4cf1('0x2f')](_0x48d93a,{'showHidden':![],'depth':null}));});}else{logger[_0x4cf1('0x2c')](_0x4cf1('0x2d'),_0x4cf1('0x2e'),_0x4cf1('0x31'),_0x4cf1('0x40'));}break;case _0x4cf1('0x41'):if(_0x3c485a[_0x4cf1('0x25')]){var _0x248fb3={'recipient':_0x28af26['phone'],'message':_0x28af26['body'],'sender':_0x3c485a[_0x4cf1('0x42')]||_0x3c485a[_0x4cf1('0x27')],'authorization':_0x3c485a[_0x4cf1('0x25')]};var _0x3722fa={'method':_0x4cf1('0x3b'),'uri':_0x4cf1('0x43'),'body':_0x248fb3,'json':!![]};rp(_0x3722fa)[_0x4cf1('0x1b')](function(_0x55d265){var _0x3e35b9={'messageId':_0x55d265[_0x4cf1('0x44')]};if(!_0x3c485a[_0x4cf1('0x3e')]){_0x3e35b9[_0x4cf1('0x3f')]=!![];}return _0x2736c7[_0x4cf1('0x1c')](_0x3e35b9);})[_0x4cf1('0x1e')](function(_0x483961){logger['error'](_0x4cf1('0x2d'),_0x4cf1('0x2e'),_0x4cf1('0x41'),util[_0x4cf1('0x2f')](_0x483961,{'showHidden':![],'depth':null}));});}else{logger[_0x4cf1('0x2c')](_0x4cf1('0x2d'),_0x4cf1('0x2e'),_0x4cf1('0x41'),_0x4cf1('0x45'));}break;case _0x4cf1('0x46'):if(_0x3c485a[_0x4cf1('0x33')]&&_0x3c485a['password']){var _0x248fb3={'messages':[{'source':_0x4cf1('0x47'),'to':_0x28af26['phone'],'body':_0x28af26[_0x4cf1('0xe')],'from':_0x3c485a[_0x4cf1('0x42')]||_0x3c485a[_0x4cf1('0x27')]}]};var _0x52cb5c=util[_0x4cf1('0x48')]('%s:%s',_0x3c485a[_0x4cf1('0x33')],_0x3c485a['password']);var _0x3722fa={'method':_0x4cf1('0x3b'),'uri':_0x4cf1('0x49'),'body':_0x248fb3,'headers':{'Authorization':util[_0x4cf1('0x48')](_0x4cf1('0x4a'),new Buffer(_0x52cb5c)[_0x4cf1('0x4b')](_0x4cf1('0x4c')))},'json':!![]};rp(_0x3722fa)[_0x4cf1('0x1b')](function(_0x2eb1c7){if(_0x2eb1c7[_0x4cf1('0x4d')]>=0xc8&&_0x2eb1c7[_0x4cf1('0x4d')]<=0xce){if(_0x2eb1c7[_0x4cf1('0x4e')]&&_0x2eb1c7[_0x4cf1('0x4e')][_0x4cf1('0x4f')]>0x0){var _0x2133fe=_[_0x4cf1('0x50')](_0x2eb1c7[_0x4cf1('0x4e')]['messages']);var _0x13a40e={'messageId':_0x2133fe[_0x4cf1('0x51')]};if(!_0x3c485a[_0x4cf1('0x3e')]){_0x13a40e[_0x4cf1('0x3f')]=!![];}return _0x2736c7[_0x4cf1('0x1c')](_0x13a40e);}else{logger[_0x4cf1('0x2c')](_0x4cf1('0x2d'),'afterCreate',_0x4cf1('0x52'),util['inspect'](_0x2eb1c7,{'showHidden':![],'depth':null}));}}else{logger[_0x4cf1('0x2c')](_0x4cf1('0x2d'),_0x4cf1('0x2e'),_0x4cf1('0x52'),util[_0x4cf1('0x2f')](_0x2eb1c7,{'showHidden':![],'depth':null}));}})[_0x4cf1('0x1e')](function(_0x48b405){logger['error']('SmsMessage,\x20%s,\x20%s,\x20%s',_0x4cf1('0x2e'),_0x4cf1('0x52'),util[_0x4cf1('0x2f')](_0x48b405,{'showHidden':![],'depth':null}));});}else{logger['error'](_0x4cf1('0x2d'),_0x4cf1('0x2e'),'clickSend',_0x4cf1('0x40'));}break;case _0x4cf1('0x53'):if(_0x3c485a[_0x4cf1('0x54')]&&_0x3c485a[_0x4cf1('0x25')]){var _0x248fb3={'dst':_0x28af26['phone'],'text':_0x28af26[_0x4cf1('0xe')],'src':_0x3c485a[_0x4cf1('0x42')]||_0x3c485a[_0x4cf1('0x27')],'url':_0x3c485a[_0x4cf1('0x28')]+_0x4cf1('0x29')+_0x28af26['id']+'/status?token='+_0x3c485a[_0x4cf1('0x55')]};var _0x52cb5c=util['format']('%s:%s',_0x3c485a['authId'],_0x3c485a[_0x4cf1('0x25')]);var _0x3722fa={'method':_0x4cf1('0x3b'),'uri':util['format'](_0x4cf1('0x56'),_0x3c485a[_0x4cf1('0x54')]),'body':_0x248fb3,'headers':{'Authorization':util[_0x4cf1('0x48')]('Basic\x20%s',new Buffer(_0x52cb5c)[_0x4cf1('0x4b')](_0x4cf1('0x4c')))},'json':!![]};rp(_0x3722fa)[_0x4cf1('0x1b')](function(_0x42fda9){var _0x57dfb3={'messageId':_0x42fda9[_0x4cf1('0x57')][0x0]};return _0x2736c7[_0x4cf1('0x1c')](_0x57dfb3);})['catch'](function(_0x43edf1){logger[_0x4cf1('0x2c')](_0x4cf1('0x2d'),'afterCreate',_0x4cf1('0x53'),util[_0x4cf1('0x2f')](_0x43edf1,{'showHidden':![],'depth':null}));});}else{logger[_0x4cf1('0x2c')](_0x4cf1('0x2d'),_0x4cf1('0x2e'),_0x4cf1('0x53'),_0x4cf1('0x58'));}break;case'infobip':if(_0x3c485a['username']&&_0x3c485a[_0x4cf1('0x34')]){if(_0x3c485a['baseUrl']){var _0x3d38c8={'method':_0x4cf1('0x3b'),'uri':_0x3c485a[_0x4cf1('0x59')]+_0x4cf1('0x5a'),'body':{'username':_0x3c485a[_0x4cf1('0x33')],'password':_0x3c485a[_0x4cf1('0x34')]},'json':!![]};return rp(_0x3d38c8)[_0x4cf1('0x1b')](function(_0x4a9bf3){var _0x25b070={'method':_0x4cf1('0x3b'),'uri':_0x3c485a['baseUrl']+_0x4cf1('0x5b'),'body':{'messages':[{'from':_0x3c485a[_0x4cf1('0x27')],'destinations':[{'to':_0x28af26[_0x4cf1('0x27')]}],'text':_0x28af26['body'],'notifyUrl':_0x3c485a[_0x4cf1('0x28')]+_0x4cf1('0x29')+_0x28af26['id']+_0x4cf1('0x2a')+_0x3c485a[_0x4cf1('0x55')],'notifyContentType':'application/json','callbackData':_0x3c485a['phone']+';'+_0x28af26[_0x4cf1('0xe')]}]},'headers':{'Authorization':_0x4cf1('0x5c')+_0x4a9bf3['token']},'json':!![]};return rp(_0x25b070)[_0x4cf1('0x1b')](function(_0xf04cd1){if(_0xf04cd1[_0x4cf1('0x26')]){var _0x567562={'messageId':_0xf04cd1[_0x4cf1('0x26')][0x0][_0x4cf1('0xc')]};if(!_0x3c485a[_0x4cf1('0x3e')]){_0x567562['read']=!![];}return _0x2736c7[_0x4cf1('0x1c')](_0x567562);}else{return logger[_0x4cf1('0x2c')](_0x4cf1('0x2d'),_0x4cf1('0x2e'),'infobip',util[_0x4cf1('0x2f')](_0xf04cd1,{'showHidden':![],'depth':null}));}});})['catch'](function(_0x586662){return logger[_0x4cf1('0x2c')](_0x4cf1('0x2d'),_0x4cf1('0x2e'),_0x4cf1('0x5d'),util['inspect'](_0x586662,{'showHidden':![],'depth':null}));});}else{logger[_0x4cf1('0x2c')](_0x4cf1('0x2d'),_0x4cf1('0x2e'),'infobip','Missing\x20parameters:\x20base_url');}}else{logger[_0x4cf1('0x2c')](_0x4cf1('0x2d'),'afterCreate',_0x4cf1('0x5d'),'Missing\x20parameters:\x20username,\x20password');}break;case _0x4cf1('0x5e'):var _0x7d11f0=require(_0x4cf1('0x5f'));if(_0x3c485a[_0x4cf1('0x60')]){var _0x38faca={};_0x38faca['login']=_0x3c485a[_0x4cf1('0x33')];_0x38faca[_0x4cf1('0x27')]=_0x28af26[_0x4cf1('0x27')];_0x38faca[_0x4cf1('0x36')]=_0x3c485a[_0x4cf1('0x27')];_0x38faca['text']=_0x28af26[_0x4cf1('0xe')];_0x38faca['timestamp']=+new Date();var _0x49603d='';var _0x437131='';var _0x38b26f=Object[_0x4cf1('0x61')](_0x38faca);_0x38b26f['sort']();for(var _0x18e4b1=0x0;_0x18e4b1<_0x38b26f[_0x4cf1('0x62')];_0x18e4b1++){if(_0x49603d!=''){_0x49603d+='&';}_0x49603d+=_0x38b26f[_0x18e4b1]+'='+encodeURIComponent(_0x38faca[_0x38b26f[_0x18e4b1]]);_0x437131+=_0x38faca[_0x38b26f[_0x18e4b1]];}_0x437131+=_0x3c485a[_0x4cf1('0x60')];_0x437131=_0x7d11f0[_0x4cf1('0x63')](_0x4cf1('0x64'))[_0x4cf1('0x1c')](_0x437131)[_0x4cf1('0x65')]('hex');if(_0x49603d!==''){_0x49603d+='&';}_0x49603d+=_0x4cf1('0x66')+_0x437131;var _0xfa0ea4={'method':_0x4cf1('0x39'),'uri':_0x3c485a['baseUrl']+_0x4cf1('0x67')+_0x49603d,'json':!![]};return rp(_0xfa0ea4)[_0x4cf1('0x1b')](function(_0x4210a4){var _0x191ee7=Object['keys'](_0x4210a4);if(_0x4210a4[_0x191ee7[0x0]][_0x4cf1('0x2c')]&&parseInt(_0x4210a4[_0x191ee7[0x0]][_0x4cf1('0x2c')])===0x0){var _0x4b0304={'messageId':_0x4210a4[_0x191ee7[0x0]]['id_sms']};if(!_0x3c485a['deliveryReport']){_0x4b0304[_0x4cf1('0x3f')]=!![];}return _0x2736c7[_0x4cf1('0x1c')](_0x4b0304);}else{return logger[_0x4cf1('0x2c')]('SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate','csc',util[_0x4cf1('0x2f')](_0x4210a4[_0x4cf1('0x2c')],{'showHidden':![],'depth':null}));}})[_0x4cf1('0x1e')](function(_0x21a26b){return logger[_0x4cf1('0x2c')](_0x4cf1('0x2d'),'afterCreate',_0x4cf1('0x5e'),util['inspect'](_0x21a26b,{'showHidden':![],'depth':null}));});}else{logger['error'](_0x4cf1('0x2d'),_0x4cf1('0x2e'),_0x4cf1('0x5e'),_0x4cf1('0x68'));}break;case'clickatell':if(_0x3c485a['apiKey']){var _0x4fc63a={'method':'POST','uri':_0x4cf1('0x69'),'headers':{'Authorization':_0x3c485a[_0x4cf1('0x60')]},'body':{'content':_0x28af26[_0x4cf1('0xe')],'to':[_0x28af26[_0x4cf1('0x27')]],'from':_0x3c485a['phone'],'binary':![],'clientMessageId':_0x4cf1('0x6a'),'charset':_0x4cf1('0x6b')},'json':!![]};rp(_0x4fc63a)['then'](function(_0x5ab7d4){if(!_0x5ab7d4[_0x4cf1('0x2c')]){var _0x43a0aa={'messageId':_0x5ab7d4[_0x4cf1('0x26')][0x0][_0x4cf1('0x6c')]};if(!_0x3c485a[_0x4cf1('0x3e')]){_0x43a0aa[_0x4cf1('0x3f')]=!![];}return _0x2736c7[_0x4cf1('0x1c')](_0x43a0aa);}else{return logger['error']('SmsMessage,\x20%s,\x20%s,\x20%s',_0x4cf1('0x2e'),_0x4cf1('0x6d'),util[_0x4cf1('0x2f')](_0x5ab7d4[_0x4cf1('0x2c')],{'showHidden':![],'depth':null}));}})[_0x4cf1('0x1e')](function(_0x5e5769){return logger[_0x4cf1('0x2c')](_0x4cf1('0x2d'),'afterCreate',_0x4cf1('0x6d'),util[_0x4cf1('0x2f')](_0x5e5769,{'showHidden':![],'depth':null}));});}else{logger[_0x4cf1('0x2c')](_0x4cf1('0x2d'),'afterCreate',_0x4cf1('0x6d'),_0x4cf1('0x68'));}break;case _0x4cf1('0x6e'):if(_0x3c485a[_0x4cf1('0x33')]&&_0x3c485a[_0x4cf1('0x34')]){var _0x52cb5c=util[_0x4cf1('0x48')](_0x4cf1('0x6f'),_0x3c485a[_0x4cf1('0x33')],_0x3c485a[_0x4cf1('0x34')]);var _0x3722fa={'method':_0x4cf1('0x3b'),'uri':_0x4cf1('0x70')+_0x3c485a[_0x4cf1('0x71')]+'/messages','body':{'to':[_0x28af26['phone']],'text':_0x28af26[_0x4cf1('0xe')],'from':_0x3c485a[_0x4cf1('0x27')],'applicationId':_0x3c485a[_0x4cf1('0x72')]},'headers':{'Authorization':util[_0x4cf1('0x48')]('Basic\x20%s',new Buffer(_0x52cb5c)[_0x4cf1('0x4b')](_0x4cf1('0x4c')))},'json':!![]};rp(_0x3722fa)[_0x4cf1('0x1b')](function(_0x250d1e){if(_0x250d1e['id']){var _0x5b6053={'messageId':_0x250d1e['id']};return _0x2736c7[_0x4cf1('0x1c')](_0x5b6053);}else{logger[_0x4cf1('0x2c')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x4cf1('0x2e'),'bandwidth',util[_0x4cf1('0x2f')](_0x250d1e,{'showHidden':![],'depth':null}));}})[_0x4cf1('0x1e')](function(_0x593074){logger[_0x4cf1('0x2c')](_0x4cf1('0x2d'),_0x4cf1('0x2e'),'bandwidth',util[_0x4cf1('0x2f')](_0x593074,{'showHidden':![],'depth':null}));});}else{logger[_0x4cf1('0x2c')](_0x4cf1('0x2d'),'afterCreate',_0x4cf1('0x6e'),_0x4cf1('0x40'));}break;case _0x4cf1('0x73'):if(_0x3c485a[_0x4cf1('0x60')]){var _0x30a035={};var _0xfa0ea4={'method':_0x4cf1('0x3b'),'uri':_0x4cf1('0x74'),'headers':{'Authorization':_0x4cf1('0x75')+_0x3c485a[_0x4cf1('0x60')],'Content-Type':_0x4cf1('0x76')},'body':{'from':_0x3c485a[_0x4cf1('0x27')],'to':_0x28af26['phone'],'text':_0x28af26['body']},'json':!![]};return rp(_0xfa0ea4)['then'](function(_0x56f963){if(_0x56f963[_0x4cf1('0x77')]==0xca){_0x30a035[_0x4cf1('0x78')]=_0x56f963;var _0x213a4f={'method':_0x4cf1('0x3b'),'uri':_0x4cf1('0x79'),'headers':{'Authorization':_0x4cf1('0x75')+_0x3c485a[_0x4cf1('0x60')],'Content-Type':'application/json'},'body':{'refid':_0x30a035[_0x4cf1('0x78')][_0x4cf1('0x7a')]},'json':!![]};return rp(_0x213a4f)[_0x4cf1('0x1b')](function(_0x1023d2){_0x30a035['status']=_0x1023d2;var _0x2dd49a={'messageId':_0x30a035[_0x4cf1('0x78')][_0x4cf1('0x7a')],'read':!![]};return _0x2736c7[_0x4cf1('0x1c')](_0x2dd49a);});}else{return logger[_0x4cf1('0x2c')](_0x4cf1('0x2d'),_0x4cf1('0x2e'),_0x4cf1('0x73'),util[_0x4cf1('0x2f')](_0x56f963,{'showHidden':![],'depth':null}));}})[_0x4cf1('0x1e')](function(_0x3cdaca){return logger[_0x4cf1('0x2c')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x4cf1('0x2e'),_0x4cf1('0x73'),util['inspect'](_0x3cdaca,{'showHidden':![],'depth':null}));});}else{return logger[_0x4cf1('0x2c')](_0x4cf1('0x2d'),'afterCreate',_0x4cf1('0x73'),_0x4cf1('0x7b'));}break;}}})[_0x4cf1('0x7c')](function(){_0x207aea();});}else{_0x207aea();}}},'charset':_0x4cf1('0x7d'),'collate':_0x4cf1('0x7e')});}; \ No newline at end of file +var _0xeddd=['toLowerCase','out','secret','isNil','UserId','SmsInteraction','findOne','SmsInteractionId','then','update','createdAt','catch','error','SmsAccount','SmsAccountId','type','twilio','accountSid','authToken','phone','messages','remote','/api/sms/messages/','/status?token=','token','sid','SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate','inspect','Missing\x20parameters:\x20phone,\x20accountSid\x20or\x20authToken','skebby','https://api.skebby.it/API/v1.0/REST/','username','password','smsMethod','sender','login?username=','&password=','GET','sms','POST','user_key','session_key','total_sent','internal_order_id','deliveryReport','read','Missing\x20parameters:\x20username,\x20password','connectel','senderString','https://smsapi.connectel.se/api/v2/send/','requestid','Missing\x20parameters:\x20authToken','clicksend','xCALLY\x20Motion','format','https://rest.clicksend.com/v3/sms/send','Basic\x20%s','toString','http_code','data','head','message_id','clickSend','plivo','%s:%s','authId','base64','message_uuid','baseUrl','application/json','IBSSO\x20','infobip','csc','crypto','apiKey','text','timestamp','keys','sort','length','createHash','md5','digest','signature=','/external/get/send.php?','id_sms','Missing\x20parameters:\x20apiKey','clickatell','uuid','UTF-8','apiMessageId','bandwidth','https://messaging.bandwidth.com/api/v2/users/','accountId','/messages','applicationId','intelepeer','Bearer\x20','message','https://api.intelepeer.com/_rest/v4/app/sms/mdr','refid','status','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','bluebird','path','rimraf','./smsMessage.attributes','exports','define','SmsMessage','sms_messages','messageId','fti_sms_messages','body','FULLTEXT','models','get','direction'];(function(_0x2fbfa0,_0x1fba71){var _0x13952f=function(_0x5a0fac){while(--_0x5a0fac){_0x2fbfa0['push'](_0x2fbfa0['shift']());}};_0x13952f(++_0x1fba71);}(_0xeddd,0x69));var _0xdedd=function(_0x209941,_0x5c9988){_0x209941=_0x209941-0x0;var _0x1e8729=_0xeddd[_0x209941];return _0x1e8729;};'use strict';var _=require(_0xdedd('0x0'));var util=require(_0xdedd('0x1'));var logger=require(_0xdedd('0x2'))(_0xdedd('0x3'));var moment=require('moment');var BPromise=require(_0xdedd('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xdedd('0x5'));var rimraf=require(_0xdedd('0x6'));var config=require('../../config/environment');var attributes=require(_0xdedd('0x7'));module[_0xdedd('0x8')]=function(_0x16801a,_0x3e6b5a){return _0x16801a[_0xdedd('0x9')](_0xdedd('0xa'),attributes,{'tableName':_0xdedd('0xb'),'paranoid':![],'indexes':[{'name':_0xdedd('0xc'),'fields':[_0xdedd('0xc')]},{'name':_0xdedd('0xd'),'fields':[_0xdedd('0xe')],'type':_0xdedd('0xf')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x5b26ed,_0x3ef3d3,_0x3c2f2b){var _0xf8662f=_0x16801a[_0xdedd('0x10')];var _0x5db016=_0x5b26ed[_0xdedd('0x11')]({'plain':!![]});if(_0x5db016[_0xdedd('0x12')][_0xdedd('0x13')]()==='in'||_0x5db016[_0xdedd('0x12')][_0xdedd('0x13')]()===_0xdedd('0x14')&&!_0x5db016[_0xdedd('0x15')]&&!_[_0xdedd('0x16')](_0x5db016[_0xdedd('0x17')])){_0xf8662f[_0xdedd('0x18')][_0xdedd('0x19')]({'where':{'id':_0x5db016[_0xdedd('0x1a')]}})[_0xdedd('0x1b')](function(_0x27b609){if(_0x27b609){_0x27b609[_0xdedd('0x1c')]({'lastMsgAt':_0x5db016[_0xdedd('0x1d')],'lastMsgDirection':_0x5db016[_0xdedd('0x12')][_0xdedd('0x13')]()});}})[_0xdedd('0x1e')](function(_0x487a8a){console[_0xdedd('0x1f')](_0x487a8a);});}if(_0x5db016[_0xdedd('0x12')]==='out'&&!_0x5db016[_0xdedd('0x15')]){var _0x114694;_0xf8662f[_0xdedd('0x20')]['find']({'where':{'id':_0x5db016[_0xdedd('0x21')]},'raw':!![]})[_0xdedd('0x1b')](function(_0x4054b0){_0x114694=_0x4054b0;if(_0x114694&&_0x114694[_0xdedd('0x22')]){switch(_0x114694[_0xdedd('0x22')]){case'twilio':var _0x2a82a=require(_0xdedd('0x23'));if(_0x114694[_0xdedd('0x24')]&&_0x114694[_0xdedd('0x25')]&&_0x114694[_0xdedd('0x26')]){var _0x1d7807=new _0x2a82a(_0x114694[_0xdedd('0x24')],_0x114694[_0xdedd('0x25')]);_0x1d7807[_0xdedd('0x27')]['create']({'body':_0x5db016['body'],'to':_0x5db016['phone'],'from':_0x114694['phone'],'statusCallback':_0x114694[_0xdedd('0x28')]+_0xdedd('0x29')+_0x5db016['id']+_0xdedd('0x2a')+_0x114694[_0xdedd('0x2b')]})[_0xdedd('0x1b')](function(_0x4e0483){if(_0x4e0483[_0xdedd('0x2c')]){return _0x5b26ed[_0xdedd('0x1c')]({'messageId':_0x4e0483[_0xdedd('0x2c')]});}})[_0xdedd('0x1e')](function(_0x4e8396){logger[_0xdedd('0x1f')](_0xdedd('0x2d'),_0xdedd('0x2e'),_0xdedd('0x23'),util[_0xdedd('0x2f')](_0x4e8396,{'showHidden':![],'depth':null}));});}else{logger[_0xdedd('0x1f')](_0xdedd('0x2d'),_0xdedd('0x2e'),_0xdedd('0x23'),_0xdedd('0x30'));}break;case _0xdedd('0x31'):var _0x10b7d3=_0xdedd('0x32');if(_0x114694[_0xdedd('0x33')]&&_0x114694[_0xdedd('0x34')]){var _0x59015a={'recipient':[_0x5db016['phone']],'message':_0x5db016['body'],'message_type':_0x114694[_0xdedd('0x35')]};if(_0x114694[_0xdedd('0x35')]&&_0x114694[_0xdedd('0x35')]!=='SI'){_0x59015a[_0xdedd('0x36')]=_0x114694[_0xdedd('0x26')];}var _0x1f65c8={'url':_0x10b7d3+_0xdedd('0x37')+_0x114694[_0xdedd('0x33')]+_0xdedd('0x38')+_0x114694['password'],'method':_0xdedd('0x39')};rp(_0x1f65c8)[_0xdedd('0x1b')](function(_0x55a70c){var _0x58a524=_0x55a70c['split'](';');var _0x2f7075={'user_key':_0x58a524[0x0],'session_key':_0x58a524[0x1]};_0x1f65c8={'url':_0x10b7d3+_0xdedd('0x3a'),'method':_0xdedd('0x3b'),'headers':{'user_key':_0x2f7075[_0xdedd('0x3c')],'Session_key':_0x2f7075[_0xdedd('0x3d')]},'json':!![],'body':_0x59015a};return rp(_0x1f65c8);})['then'](function(_0xd857e1){if(_0xd857e1[_0xdedd('0x3e')]>=0x1){var _0x20e59f={'messageId':_0xd857e1[_0xdedd('0x3f')]};if(_0x114694[_0xdedd('0x35')]!=='GP'||!_0x114694[_0xdedd('0x40')]){_0x20e59f[_0xdedd('0x41')]=!![];}return _0x5b26ed['update'](_0x20e59f);}else{return logger['error'](_0xdedd('0x2d'),'afterCreate',_0xdedd('0x31'),util[_0xdedd('0x2f')](_0xd857e1,{'showHidden':![],'depth':null}));}})[_0xdedd('0x1e')](function(_0x24db2c){return logger['error']('SmsMessage,\x20%s,\x20%s,\x20%s',_0xdedd('0x2e'),'skebby',util['inspect'](_0x24db2c,{'showHidden':![],'depth':null}));});}else{logger[_0xdedd('0x1f')](_0xdedd('0x2d'),_0xdedd('0x2e'),_0xdedd('0x31'),_0xdedd('0x42'));}break;case _0xdedd('0x43'):if(_0x114694[_0xdedd('0x25')]){var _0xa060a9={'recipient':_0x5db016[_0xdedd('0x26')],'message':_0x5db016[_0xdedd('0xe')],'sender':_0x114694[_0xdedd('0x44')]||_0x114694[_0xdedd('0x26')],'authorization':_0x114694[_0xdedd('0x25')]};var _0x3ef3d3={'method':_0xdedd('0x3b'),'uri':_0xdedd('0x45'),'body':_0xa060a9,'json':!![]};rp(_0x3ef3d3)[_0xdedd('0x1b')](function(_0x39767d){var _0x40722a={'messageId':_0x39767d[_0xdedd('0x46')]};if(!_0x114694[_0xdedd('0x40')]){_0x40722a[_0xdedd('0x41')]=!![];}return _0x5b26ed[_0xdedd('0x1c')](_0x40722a);})[_0xdedd('0x1e')](function(_0x40eb06){logger[_0xdedd('0x1f')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0xdedd('0x2e'),_0xdedd('0x43'),util[_0xdedd('0x2f')](_0x40eb06,{'showHidden':![],'depth':null}));});}else{logger['error'](_0xdedd('0x2d'),_0xdedd('0x2e'),_0xdedd('0x43'),_0xdedd('0x47'));}break;case _0xdedd('0x48'):if(_0x114694['username']&&_0x114694[_0xdedd('0x34')]){var _0xa060a9={'messages':[{'source':_0xdedd('0x49'),'to':_0x5db016[_0xdedd('0x26')],'body':_0x5db016[_0xdedd('0xe')],'from':_0x114694[_0xdedd('0x44')]||_0x114694['phone']}]};var _0x4a96b2=util[_0xdedd('0x4a')]('%s:%s',_0x114694[_0xdedd('0x33')],_0x114694[_0xdedd('0x34')]);var _0x3ef3d3={'method':_0xdedd('0x3b'),'uri':_0xdedd('0x4b'),'body':_0xa060a9,'headers':{'Authorization':util[_0xdedd('0x4a')](_0xdedd('0x4c'),new Buffer(_0x4a96b2)[_0xdedd('0x4d')]('base64'))},'json':!![]};rp(_0x3ef3d3)[_0xdedd('0x1b')](function(_0xc43a63){if(_0xc43a63[_0xdedd('0x4e')]>=0xc8&&_0xc43a63['http_code']<=0xce){if(_0xc43a63['data']&&_0xc43a63[_0xdedd('0x4f')]['queued_count']>0x0){var _0x28c67b=_[_0xdedd('0x50')](_0xc43a63[_0xdedd('0x4f')][_0xdedd('0x27')]);var _0x2ce380={'messageId':_0x28c67b[_0xdedd('0x51')]};if(!_0x114694[_0xdedd('0x40')]){_0x2ce380[_0xdedd('0x41')]=!![];}return _0x5b26ed[_0xdedd('0x1c')](_0x2ce380);}else{logger[_0xdedd('0x1f')]('SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate','clickSend',util[_0xdedd('0x2f')](_0xc43a63,{'showHidden':![],'depth':null}));}}else{logger[_0xdedd('0x1f')](_0xdedd('0x2d'),_0xdedd('0x2e'),_0xdedd('0x52'),util[_0xdedd('0x2f')](_0xc43a63,{'showHidden':![],'depth':null}));}})[_0xdedd('0x1e')](function(_0x1212ca){logger[_0xdedd('0x1f')](_0xdedd('0x2d'),_0xdedd('0x2e'),_0xdedd('0x52'),util['inspect'](_0x1212ca,{'showHidden':![],'depth':null}));});}else{logger[_0xdedd('0x1f')](_0xdedd('0x2d'),'afterCreate',_0xdedd('0x52'),_0xdedd('0x42'));}break;case _0xdedd('0x53'):if(_0x114694['authId']&&_0x114694['authToken']){var _0xa060a9={'dst':_0x5db016[_0xdedd('0x26')],'text':_0x5db016[_0xdedd('0xe')],'src':_0x114694['senderString']||_0x114694[_0xdedd('0x26')],'url':_0x114694[_0xdedd('0x28')]+'/api/sms/messages/'+_0x5db016['id']+_0xdedd('0x2a')+_0x114694[_0xdedd('0x2b')]};var _0x4a96b2=util[_0xdedd('0x4a')](_0xdedd('0x54'),_0x114694['authId'],_0x114694[_0xdedd('0x25')]);var _0x3ef3d3={'method':_0xdedd('0x3b'),'uri':util[_0xdedd('0x4a')]('https://api.plivo.com/v1/Account/%s/Message/',_0x114694[_0xdedd('0x55')]),'body':_0xa060a9,'headers':{'Authorization':util[_0xdedd('0x4a')]('Basic\x20%s',new Buffer(_0x4a96b2)[_0xdedd('0x4d')](_0xdedd('0x56')))},'json':!![]};rp(_0x3ef3d3)[_0xdedd('0x1b')](function(_0x16ef6f){var _0x1b0604={'messageId':_0x16ef6f[_0xdedd('0x57')][0x0]};return _0x5b26ed[_0xdedd('0x1c')](_0x1b0604);})[_0xdedd('0x1e')](function(_0x1ee268){logger['error'](_0xdedd('0x2d'),_0xdedd('0x2e'),'plivo',util[_0xdedd('0x2f')](_0x1ee268,{'showHidden':![],'depth':null}));});}else{logger[_0xdedd('0x1f')](_0xdedd('0x2d'),_0xdedd('0x2e'),_0xdedd('0x53'),'Missing\x20parameters:\x20authId,\x20authToken');}break;case'infobip':if(_0x114694[_0xdedd('0x33')]&&_0x114694[_0xdedd('0x34')]){if(_0x114694[_0xdedd('0x58')]){var _0x4656={'method':_0xdedd('0x3b'),'uri':_0x114694[_0xdedd('0x58')]+'/auth/1/session','body':{'username':_0x114694['username'],'password':_0x114694[_0xdedd('0x34')]},'json':!![]};return rp(_0x4656)['then'](function(_0x8c97d3){var _0x6667fa={'method':_0xdedd('0x3b'),'uri':_0x114694['baseUrl']+'/sms/2/text/advanced','body':{'messages':[{'from':_0x114694[_0xdedd('0x26')],'destinations':[{'to':_0x5db016[_0xdedd('0x26')]}],'text':_0x5db016['body'],'notifyUrl':_0x114694[_0xdedd('0x28')]+_0xdedd('0x29')+_0x5db016['id']+_0xdedd('0x2a')+_0x114694[_0xdedd('0x2b')],'notifyContentType':_0xdedd('0x59'),'callbackData':_0x114694[_0xdedd('0x26')]+';'+_0x5db016[_0xdedd('0xe')]}]},'headers':{'Authorization':_0xdedd('0x5a')+_0x8c97d3['token']},'json':!![]};return rp(_0x6667fa)[_0xdedd('0x1b')](function(_0x335aaa){if(_0x335aaa[_0xdedd('0x27')]){var _0x1bcb6a={'messageId':_0x335aaa[_0xdedd('0x27')][0x0]['messageId']};if(!_0x114694[_0xdedd('0x40')]){_0x1bcb6a[_0xdedd('0x41')]=!![];}return _0x5b26ed['update'](_0x1bcb6a);}else{return logger[_0xdedd('0x1f')](_0xdedd('0x2d'),_0xdedd('0x2e'),'infobip',util[_0xdedd('0x2f')](_0x335aaa,{'showHidden':![],'depth':null}));}});})[_0xdedd('0x1e')](function(_0x1bec3d){return logger[_0xdedd('0x1f')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0xdedd('0x2e'),_0xdedd('0x5b'),util[_0xdedd('0x2f')](_0x1bec3d,{'showHidden':![],'depth':null}));});}else{logger['error'](_0xdedd('0x2d'),_0xdedd('0x2e'),'infobip','Missing\x20parameters:\x20base_url');}}else{logger[_0xdedd('0x1f')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0xdedd('0x2e'),_0xdedd('0x5b'),_0xdedd('0x42'));}break;case _0xdedd('0x5c'):var _0x11c32e=require(_0xdedd('0x5d'));if(_0x114694[_0xdedd('0x5e')]){var _0x34d32a={};_0x34d32a['login']=_0x114694['username'];_0x34d32a[_0xdedd('0x26')]=_0x5db016[_0xdedd('0x26')];_0x34d32a[_0xdedd('0x36')]=_0x114694[_0xdedd('0x26')];_0x34d32a[_0xdedd('0x5f')]=_0x5db016['body'];_0x34d32a[_0xdedd('0x60')]=+new Date();var _0x5cd34d='';var _0x3e7705='';var _0x3aae94=Object[_0xdedd('0x61')](_0x34d32a);_0x3aae94[_0xdedd('0x62')]();for(var _0x42bb32=0x0;_0x42bb32<_0x3aae94[_0xdedd('0x63')];_0x42bb32++){if(_0x5cd34d!=''){_0x5cd34d+='&';}_0x5cd34d+=_0x3aae94[_0x42bb32]+'='+encodeURIComponent(_0x34d32a[_0x3aae94[_0x42bb32]]);_0x3e7705+=_0x34d32a[_0x3aae94[_0x42bb32]];}_0x3e7705+=_0x114694['apiKey'];_0x3e7705=_0x11c32e[_0xdedd('0x64')](_0xdedd('0x65'))['update'](_0x3e7705)[_0xdedd('0x66')]('hex');if(_0x5cd34d!==''){_0x5cd34d+='&';}_0x5cd34d+=_0xdedd('0x67')+_0x3e7705;var _0x1f65c8={'method':_0xdedd('0x39'),'uri':_0x114694[_0xdedd('0x58')]+_0xdedd('0x68')+_0x5cd34d,'json':!![]};return rp(_0x1f65c8)[_0xdedd('0x1b')](function(_0x477c43){var _0x164c14=Object[_0xdedd('0x61')](_0x477c43);if(_0x477c43[_0x164c14[0x0]][_0xdedd('0x1f')]&&parseInt(_0x477c43[_0x164c14[0x0]][_0xdedd('0x1f')])===0x0){var _0x4582d4={'messageId':_0x477c43[_0x164c14[0x0]][_0xdedd('0x69')]};if(!_0x114694[_0xdedd('0x40')]){_0x4582d4[_0xdedd('0x41')]=!![];}return _0x5b26ed['update'](_0x4582d4);}else{return logger[_0xdedd('0x1f')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0xdedd('0x2e'),_0xdedd('0x5c'),util['inspect'](_0x477c43[_0xdedd('0x1f')],{'showHidden':![],'depth':null}));}})['catch'](function(_0x31a77b){return logger[_0xdedd('0x1f')](_0xdedd('0x2d'),'afterCreate',_0xdedd('0x5c'),util[_0xdedd('0x2f')](_0x31a77b,{'showHidden':![],'depth':null}));});}else{logger[_0xdedd('0x1f')](_0xdedd('0x2d'),_0xdedd('0x2e'),_0xdedd('0x5c'),_0xdedd('0x6a'));}break;case _0xdedd('0x6b'):if(_0x114694['apiKey']){var _0x4d748d={'method':'POST','uri':'https://platform.clickatell.com/messages','headers':{'Authorization':_0x114694['apiKey']},'body':{'content':_0x5db016[_0xdedd('0xe')],'to':[_0x5db016['phone']],'from':_0x114694[_0xdedd('0x26')],'binary':![],'clientMessageId':_0xdedd('0x6c'),'charset':_0xdedd('0x6d')},'json':!![]};rp(_0x4d748d)[_0xdedd('0x1b')](function(_0x15c73a){if(!_0x15c73a[_0xdedd('0x1f')]){var _0xa0a85f={'messageId':_0x15c73a[_0xdedd('0x27')][0x0][_0xdedd('0x6e')]};if(!_0x114694[_0xdedd('0x40')]){_0xa0a85f[_0xdedd('0x41')]=!![];}return _0x5b26ed['update'](_0xa0a85f);}else{return logger[_0xdedd('0x1f')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0xdedd('0x2e'),_0xdedd('0x6b'),util['inspect'](_0x15c73a[_0xdedd('0x1f')],{'showHidden':![],'depth':null}));}})[_0xdedd('0x1e')](function(_0x4727d7){return logger[_0xdedd('0x1f')](_0xdedd('0x2d'),_0xdedd('0x2e'),_0xdedd('0x6b'),util['inspect'](_0x4727d7,{'showHidden':![],'depth':null}));});}else{logger[_0xdedd('0x1f')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0xdedd('0x2e'),_0xdedd('0x6b'),_0xdedd('0x6a'));}break;case _0xdedd('0x6f'):if(_0x114694[_0xdedd('0x33')]&&_0x114694[_0xdedd('0x34')]){var _0x4a96b2=util[_0xdedd('0x4a')](_0xdedd('0x54'),_0x114694['username'],_0x114694[_0xdedd('0x34')]);var _0x3ef3d3={'method':_0xdedd('0x3b'),'uri':_0xdedd('0x70')+_0x114694[_0xdedd('0x71')]+_0xdedd('0x72'),'body':{'to':[_0x5db016[_0xdedd('0x26')]],'text':_0x5db016[_0xdedd('0xe')],'from':_0x114694['phone'],'applicationId':_0x114694[_0xdedd('0x73')]},'headers':{'Authorization':util[_0xdedd('0x4a')](_0xdedd('0x4c'),new Buffer(_0x4a96b2)[_0xdedd('0x4d')](_0xdedd('0x56')))},'json':!![]};rp(_0x3ef3d3)[_0xdedd('0x1b')](function(_0x3633be){if(_0x3633be['id']){var _0x58faef={'messageId':_0x3633be['id']};return _0x5b26ed[_0xdedd('0x1c')](_0x58faef);}else{logger[_0xdedd('0x1f')](_0xdedd('0x2d'),'afterCreate','bandwidth',util[_0xdedd('0x2f')](_0x3633be,{'showHidden':![],'depth':null}));}})[_0xdedd('0x1e')](function(_0x108552){logger['error'](_0xdedd('0x2d'),_0xdedd('0x2e'),_0xdedd('0x6f'),util['inspect'](_0x108552,{'showHidden':![],'depth':null}));});}else{logger[_0xdedd('0x1f')](_0xdedd('0x2d'),_0xdedd('0x2e'),_0xdedd('0x6f'),'Missing\x20parameters:\x20username,\x20password');}break;case _0xdedd('0x74'):if(_0x114694[_0xdedd('0x5e')]){var _0x906124={};var _0x1f65c8={'method':_0xdedd('0x3b'),'uri':'https://api.intelepeer.com/_rest/v4/app/sms/send','headers':{'Authorization':_0xdedd('0x75')+_0x114694[_0xdedd('0x5e')],'Content-Type':'application/json'},'body':{'from':_0x114694[_0xdedd('0x26')],'to':_0x5db016['phone'],'text':_0x5db016[_0xdedd('0xe')]},'json':!![]};return rp(_0x1f65c8)[_0xdedd('0x1b')](function(_0x246c57){if(_0x246c57['code']==0xca){_0x906124[_0xdedd('0x76')]=_0x246c57;var _0x50ea0e={'method':_0xdedd('0x3b'),'uri':_0xdedd('0x77'),'headers':{'Authorization':'Bearer\x20'+_0x114694[_0xdedd('0x5e')],'Content-Type':_0xdedd('0x59')},'body':{'refid':_0x906124[_0xdedd('0x76')][_0xdedd('0x78')]},'json':!![]};return rp(_0x50ea0e)['then'](function(_0x47a5da){_0x906124[_0xdedd('0x79')]=_0x47a5da;var _0x1b5a4f={'messageId':_0x906124[_0xdedd('0x76')][_0xdedd('0x78')],'read':!![]};return _0x5b26ed[_0xdedd('0x1c')](_0x1b5a4f);});}else{return logger[_0xdedd('0x1f')](_0xdedd('0x2d'),_0xdedd('0x2e'),_0xdedd('0x74'),util['inspect'](_0x246c57,{'showHidden':![],'depth':null}));}})[_0xdedd('0x1e')](function(_0x808902){return logger['error'](_0xdedd('0x2d'),_0xdedd('0x2e'),_0xdedd('0x74'),util['inspect'](_0x808902,{'showHidden':![],'depth':null}));});}else{return logger[_0xdedd('0x1f')](_0xdedd('0x2d'),_0xdedd('0x2e'),_0xdedd('0x74'),'Token\x20not\x20received');}break;}}})['finally'](function(){_0x3c2f2b();});}else{_0x3c2f2b();}}},'charset':_0xdedd('0x7a'),'collate':_0xdedd('0x7b')});}; \ No newline at end of file diff --git a/server/api/smsMessage/smsMessage.rpc.js b/server/api/smsMessage/smsMessage.rpc.js index 81d40e6..78e69ca 100644 --- a/server/api/smsMessage/smsMessage.rpc.js +++ b/server/api/smsMessage/smsMessage.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3267=['create','body','options','raw','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','redis','defaults','localhost','socket.io-emitter','register','request','then','info','request\x20sent','debug','stringify','error','code','message','SmsMessage,\x20%s,\x20%s','result','CreateSmsMessage','SmsMessage'];(function(_0x1e9e56,_0x34a74a){var _0x5d5e2e=function(_0x4bfcc2){while(--_0x4bfcc2){_0x1e9e56['push'](_0x1e9e56['shift']());}};_0x5d5e2e(++_0x34a74a);}(_0x3267,0x90));var _0x7326=function(_0xcfd89f,_0x106e8f){_0xcfd89f=_0xcfd89f-0x0;var _0x59acd4=_0x3267[_0xcfd89f];return _0x59acd4;};'use strict';var _=require(_0x7326('0x0'));var util=require(_0x7326('0x1'));var moment=require(_0x7326('0x2'));var BPromise=require(_0x7326('0x3'));var rs=require(_0x7326('0x4'));var fs=require('fs');var Redis=require(_0x7326('0x5'));var db=require(_0x7326('0x6'))['db'];var utils=require(_0x7326('0x7'));var logger=require(_0x7326('0x8'))(_0x7326('0x9'));var config=require(_0x7326('0xa'));var jayson=require(_0x7326('0xb'));var client=jayson[_0x7326('0xc')]['http']({'port':0x232a});config[_0x7326('0xd')]=_[_0x7326('0xe')](config[_0x7326('0xd')],{'host':_0x7326('0xf'),'port':0x18eb});var socket=require(_0x7326('0x10'))(new Redis(config[_0x7326('0xd')]));require('./smsMessage.socket')[_0x7326('0x11')](socket);function respondWithRpcPromise(_0x1e15b0,_0x2f173a,_0x4a102d){return new BPromise(function(_0x13e86e,_0x40f61a){return client[_0x7326('0x12')](_0x1e15b0,_0x4a102d)[_0x7326('0x13')](function(_0x3c8dd7){logger[_0x7326('0x14')]('SmsMessage,\x20%s,\x20%s',_0x2f173a,_0x7326('0x15'));logger[_0x7326('0x16')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x2f173a,_0x7326('0x15'),JSON[_0x7326('0x17')](_0x3c8dd7));if(_0x3c8dd7[_0x7326('0x18')]){if(_0x3c8dd7[_0x7326('0x18')][_0x7326('0x19')]===0x1f4){logger[_0x7326('0x18')]('SmsMessage,\x20%s,\x20%s',_0x2f173a,_0x3c8dd7[_0x7326('0x18')][_0x7326('0x1a')]);return _0x40f61a(_0x3c8dd7[_0x7326('0x18')][_0x7326('0x1a')]);}logger['error']('SmsMessage,\x20%s,\x20%s',_0x2f173a,_0x3c8dd7[_0x7326('0x18')][_0x7326('0x1a')]);return _0x13e86e(_0x3c8dd7['error'][_0x7326('0x1a')]);}else{logger['info'](_0x7326('0x1b'),_0x2f173a,_0x7326('0x15'));_0x13e86e(_0x3c8dd7[_0x7326('0x1c')][_0x7326('0x1a')]);}})['catch'](function(_0x24a898){logger[_0x7326('0x18')](_0x7326('0x1b'),_0x2f173a,_0x24a898);_0x40f61a(_0x24a898);});});}exports[_0x7326('0x1d')]=function(_0x3e7ad8){var _0x479c0b=this;return new Promise(function(_0x240357,_0x15e7b9){return db[_0x7326('0x1e')][_0x7326('0x1f')](_0x3e7ad8[_0x7326('0x20')],{'raw':_0x3e7ad8[_0x7326('0x21')]?_0x3e7ad8[_0x7326('0x21')][_0x7326('0x22')]===undefined?!![]:![]:!![]})[_0x7326('0x13')](function(_0x42eb9b){logger[_0x7326('0x14')]('CreateSmsMessage',_0x3e7ad8);logger[_0x7326('0x16')](_0x7326('0x1d'),_0x3e7ad8,JSON[_0x7326('0x17')](_0x42eb9b));_0x240357(_0x42eb9b);})['catch'](function(_0x63ad20){logger[_0x7326('0x18')]('CreateSmsMessage',_0x63ad20[_0x7326('0x1a')],_0x3e7ad8);_0x15e7b9(_0x479c0b[_0x7326('0x18')](0x1f4,_0x63ad20[_0x7326('0x1a')]));});});}; \ No newline at end of file +var _0x41f2=['rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./smsMessage.socket','register','request','then','SmsMessage,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','info','result','catch','CreateSmsMessage','SmsMessage','create','body','options','raw','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger'];(function(_0x1684dd,_0x13591f){var _0x10895a=function(_0x4badb2){while(--_0x4badb2){_0x1684dd['push'](_0x1684dd['shift']());}};_0x10895a(++_0x13591f);}(_0x41f2,0x8c));var _0x241f=function(_0x324dec,_0x4bff43){_0x324dec=_0x324dec-0x0;var _0x3efc98=_0x41f2[_0x324dec];return _0x3efc98;};'use strict';var _=require(_0x241f('0x0'));var util=require(_0x241f('0x1'));var moment=require(_0x241f('0x2'));var BPromise=require(_0x241f('0x3'));var rs=require(_0x241f('0x4'));var fs=require('fs');var Redis=require(_0x241f('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x241f('0x6'));var logger=require(_0x241f('0x7'))(_0x241f('0x8'));var config=require(_0x241f('0x9'));var jayson=require(_0x241f('0xa'));var client=jayson[_0x241f('0xb')][_0x241f('0xc')]({'port':0x232a});config[_0x241f('0xd')]=_[_0x241f('0xe')](config[_0x241f('0xd')],{'host':_0x241f('0xf'),'port':0x18eb});var socket=require(_0x241f('0x10'))(new Redis(config[_0x241f('0xd')]));require(_0x241f('0x11'))[_0x241f('0x12')](socket);function respondWithRpcPromise(_0xd74323,_0x221404,_0x4f606a){return new BPromise(function(_0x4b0e8a,_0x1d0864){return client[_0x241f('0x13')](_0xd74323,_0x4f606a)[_0x241f('0x14')](function(_0x1cebbf){logger['info'](_0x241f('0x15'),_0x221404,'request\x20sent');logger[_0x241f('0x16')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x221404,_0x241f('0x17'),JSON[_0x241f('0x18')](_0x1cebbf));if(_0x1cebbf[_0x241f('0x19')]){if(_0x1cebbf[_0x241f('0x19')][_0x241f('0x1a')]===0x1f4){logger[_0x241f('0x19')](_0x241f('0x15'),_0x221404,_0x1cebbf[_0x241f('0x19')][_0x241f('0x1b')]);return _0x1d0864(_0x1cebbf[_0x241f('0x19')][_0x241f('0x1b')]);}logger[_0x241f('0x19')](_0x241f('0x15'),_0x221404,_0x1cebbf[_0x241f('0x19')]['message']);return _0x4b0e8a(_0x1cebbf[_0x241f('0x19')][_0x241f('0x1b')]);}else{logger[_0x241f('0x1c')](_0x241f('0x15'),_0x221404,_0x241f('0x17'));_0x4b0e8a(_0x1cebbf[_0x241f('0x1d')][_0x241f('0x1b')]);}})[_0x241f('0x1e')](function(_0x1d124a){logger[_0x241f('0x19')](_0x241f('0x15'),_0x221404,_0x1d124a);_0x1d0864(_0x1d124a);});});}exports[_0x241f('0x1f')]=function(_0x389884){var _0x4e0c40=this;return new Promise(function(_0x196d00,_0xe5862d){return db[_0x241f('0x20')][_0x241f('0x21')](_0x389884[_0x241f('0x22')],{'raw':_0x389884['options']?_0x389884[_0x241f('0x23')][_0x241f('0x24')]===undefined?!![]:![]:!![]})[_0x241f('0x14')](function(_0x357543){logger[_0x241f('0x1c')](_0x241f('0x1f'),_0x389884);logger[_0x241f('0x16')]('CreateSmsMessage',_0x389884,JSON[_0x241f('0x18')](_0x357543));_0x196d00(_0x357543);})[_0x241f('0x1e')](function(_0x2e5a9c){logger['error'](_0x241f('0x1f'),_0x2e5a9c[_0x241f('0x1b')],_0x389884);_0xe5862d(_0x4e0c40[_0x241f('0x19')](0x1f4,_0x2e5a9c['message']));});});}; \ No newline at end of file diff --git a/server/api/smsMessage/smsMessage.socket.js b/server/api/smsMessage/smsMessage.socket.js index 7346b61..af76ef3 100644 --- a/server/api/smsMessage/smsMessage.socket.js +++ b/server/api/smsMessage/smsMessage.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6b87=['length','smsMessage:','./smsMessage.events','save','remove','update','emit','removeListener'];(function(_0x5f4567,_0x3095bd){var _0x64fcdd=function(_0x358502){while(--_0x358502){_0x5f4567['push'](_0x5f4567['shift']());}};_0x64fcdd(++_0x3095bd);}(_0x6b87,0x1c2));var _0x76b8=function(_0x2641f9,_0x26715f){_0x2641f9=_0x2641f9-0x0;var _0x585741=_0x6b87[_0x2641f9];return _0x585741;};'use strict';var SmsMessageEvents=require(_0x76b8('0x0'));var events=[_0x76b8('0x1'),_0x76b8('0x2'),_0x76b8('0x3')];function createListener(_0x5e0325,_0x2ac77e){return function(_0x1763a9){_0x2ac77e[_0x76b8('0x4')](_0x5e0325,_0x1763a9);};}function removeListener(_0x3dafe7,_0xf2126e){return function(){SmsMessageEvents[_0x76b8('0x5')](_0x3dafe7,_0xf2126e);};}exports['register']=function(_0x50ee30){for(var _0x4a8d91=0x0,_0x22611e=events[_0x76b8('0x6')];_0x4a8d91<_0x22611e;_0x4a8d91++){var _0x497da7=events[_0x4a8d91];var _0x53f65f=createListener(_0x76b8('0x7')+_0x497da7,_0x50ee30);SmsMessageEvents['on'](_0x497da7,_0x53f65f);}}; \ No newline at end of file +var _0x2d8d=['remove','emit','removeListener','register','length','smsMessage:','./smsMessage.events'];(function(_0x14acd5,_0x361989){var _0x593ebd=function(_0x1f5f7f){while(--_0x1f5f7f){_0x14acd5['push'](_0x14acd5['shift']());}};_0x593ebd(++_0x361989);}(_0x2d8d,0x84));var _0xd2d8=function(_0x231e16,_0x67347b){_0x231e16=_0x231e16-0x0;var _0x570a7c=_0x2d8d[_0x231e16];return _0x570a7c;};'use strict';var SmsMessageEvents=require(_0xd2d8('0x0'));var events=['save',_0xd2d8('0x1'),'update'];function createListener(_0xf97f4f,_0x18ba0b){return function(_0x9fd83d){_0x18ba0b[_0xd2d8('0x2')](_0xf97f4f,_0x9fd83d);};}function removeListener(_0x5703f3,_0x240d83){return function(){SmsMessageEvents[_0xd2d8('0x3')](_0x5703f3,_0x240d83);};}exports[_0xd2d8('0x4')]=function(_0x4cebdb){for(var _0x434b62=0x0,_0x339939=events[_0xd2d8('0x5')];_0x434b62<_0x339939;_0x434b62++){var _0x535cee=events[_0x434b62];var _0x11b67d=createListener(_0xd2d8('0x6')+_0x535cee,_0x4cebdb);SmsMessageEvents['on'](_0x535cee,_0x11b67d);}}; \ No newline at end of file diff --git a/server/api/smsQueue/index.js b/server/api/smsQueue/index.js index 4ccf1f5..ae09541 100644 --- a/server/api/smsQueue/index.js +++ b/server/api/smsQueue/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4d56=['/:id','show','/:id/members','/:id/teams','getTeams','getAgents','create','post','addTeams','/:id/users','addAgents','put','update','delete','removeAgents','multer','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','./smsQueue.controller','get','isAuthenticated','index','/describe'];(function(_0x3b0cac,_0x489e54){var _0x51736e=function(_0x236cd2){while(--_0x236cd2){_0x3b0cac['push'](_0x3b0cac['shift']());}};_0x51736e(++_0x489e54);}(_0x4d56,0xd3));var _0x64d5=function(_0x1a5fd6,_0x53fe96){_0x1a5fd6=_0x1a5fd6-0x0;var _0x408060=_0x4d56[_0x1a5fd6];return _0x408060;};'use strict';var multer=require(_0x64d5('0x0'));var util=require(_0x64d5('0x1'));var path=require('path');var timeout=require(_0x64d5('0x2'));var express=require(_0x64d5('0x3'));var router=express[_0x64d5('0x4')]();var fs_extra=require(_0x64d5('0x5'));var auth=require(_0x64d5('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x64d5('0x7'));var controller=require(_0x64d5('0x8'));router[_0x64d5('0x9')]('/',auth[_0x64d5('0xa')](),controller[_0x64d5('0xb')]);router[_0x64d5('0x9')](_0x64d5('0xc'),auth[_0x64d5('0xa')](),controller['describe']);router['get'](_0x64d5('0xd'),auth[_0x64d5('0xa')](),controller[_0x64d5('0xe')]);router['get'](_0x64d5('0xf'),auth[_0x64d5('0xa')](),controller['getMembers']);router[_0x64d5('0x9')](_0x64d5('0x10'),auth[_0x64d5('0xa')](),controller[_0x64d5('0x11')]);router[_0x64d5('0x9')]('/:id/users',auth[_0x64d5('0xa')](),controller[_0x64d5('0x12')]);router['post']('/',auth[_0x64d5('0xa')](),controller[_0x64d5('0x13')]);router[_0x64d5('0x14')]('/:id/teams',auth[_0x64d5('0xa')](),controller[_0x64d5('0x15')]);router[_0x64d5('0x14')](_0x64d5('0x16'),auth[_0x64d5('0xa')](),controller[_0x64d5('0x17')]);router[_0x64d5('0x18')](_0x64d5('0xd'),auth[_0x64d5('0xa')](),controller[_0x64d5('0x19')]);router[_0x64d5('0x1a')](_0x64d5('0xd'),auth[_0x64d5('0xa')](),controller['destroy']);router['delete'](_0x64d5('0x10'),auth['isAuthenticated'](),controller['removeTeams']);router['delete']('/:id/users',auth['isAuthenticated'](),controller[_0x64d5('0x1b')]);module['exports']=router; \ No newline at end of file +var _0xf229=['/describe','describe','/:id','show','/:id/members','/:id/teams','getTeams','/:id/users','getAgents','post','create','addTeams','addAgents','put','update','delete','destroy','removeTeams','removeAgents','exports','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','./smsQueue.controller','get','isAuthenticated','index'];(function(_0x437000,_0x4ab4bc){var _0x3b0187=function(_0x30fcec){while(--_0x30fcec){_0x437000['push'](_0x437000['shift']());}};_0x3b0187(++_0x4ab4bc);}(_0xf229,0x17c));var _0x9f22=function(_0x20ed9d,_0x4a80c4){_0x20ed9d=_0x20ed9d-0x0;var _0x50b5e4=_0xf229[_0x20ed9d];return _0x50b5e4;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x9f22('0x0'));var timeout=require(_0x9f22('0x1'));var express=require(_0x9f22('0x2'));var router=express[_0x9f22('0x3')]();var fs_extra=require(_0x9f22('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x9f22('0x5'));var config=require('../../config/environment');var controller=require(_0x9f22('0x6'));router[_0x9f22('0x7')]('/',auth[_0x9f22('0x8')](),controller[_0x9f22('0x9')]);router[_0x9f22('0x7')](_0x9f22('0xa'),auth[_0x9f22('0x8')](),controller[_0x9f22('0xb')]);router[_0x9f22('0x7')](_0x9f22('0xc'),auth[_0x9f22('0x8')](),controller[_0x9f22('0xd')]);router[_0x9f22('0x7')](_0x9f22('0xe'),auth[_0x9f22('0x8')](),controller['getMembers']);router[_0x9f22('0x7')](_0x9f22('0xf'),auth[_0x9f22('0x8')](),controller[_0x9f22('0x10')]);router[_0x9f22('0x7')](_0x9f22('0x11'),auth[_0x9f22('0x8')](),controller[_0x9f22('0x12')]);router[_0x9f22('0x13')]('/',auth[_0x9f22('0x8')](),controller[_0x9f22('0x14')]);router['post'](_0x9f22('0xf'),auth[_0x9f22('0x8')](),controller[_0x9f22('0x15')]);router[_0x9f22('0x13')]('/:id/users',auth[_0x9f22('0x8')](),controller[_0x9f22('0x16')]);router[_0x9f22('0x17')](_0x9f22('0xc'),auth[_0x9f22('0x8')](),controller[_0x9f22('0x18')]);router[_0x9f22('0x19')]('/:id',auth[_0x9f22('0x8')](),controller[_0x9f22('0x1a')]);router[_0x9f22('0x19')](_0x9f22('0xf'),auth[_0x9f22('0x8')](),controller[_0x9f22('0x1b')]);router['delete'](_0x9f22('0x11'),auth['isAuthenticated'](),controller[_0x9f22('0x1c')]);module[_0x9f22('0x1d')]=router; \ No newline at end of file diff --git a/server/api/smsQueue/smsQueue.attributes.js b/server/api/smsQueue/smsQueue.attributes.js index af56a4d..5d4918a 100644 --- a/server/api/smsQueue/smsQueue.attributes.js +++ b/server/api/smsQueue/smsQueue.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1e92=['roundrobin','sequelize','exports','name','STRING','INTEGER','ENUM','beepall'];(function(_0x68f88,_0x20a43d){var _0x78cfed=function(_0x34628c){while(--_0x34628c){_0x68f88['push'](_0x68f88['shift']());}};_0x78cfed(++_0x20a43d);}(_0x1e92,0x189));var _0x21e9=function(_0x4a747d,_0x3b747f){_0x4a747d=_0x4a747d-0x0;var _0x3a5b5c=_0x1e92[_0x4a747d];return _0x3a5b5c;};'use strict';var Sequelize=require(_0x21e9('0x0'));module[_0x21e9('0x1')]={'name':{'type':Sequelize['STRING'],'unique':_0x21e9('0x2'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0x21e9('0x3')]},'timeout':{'type':Sequelize[_0x21e9('0x4')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0x21e9('0x5')]('rrmemory',_0x21e9('0x6'),_0x21e9('0x7'))}}; \ No newline at end of file +var _0xbcfd=['STRING','name','ENUM','rrmemory','roundrobin','sequelize','exports'];(function(_0x4cbe17,_0x300320){var _0x3070ef=function(_0xce193c){while(--_0xce193c){_0x4cbe17['push'](_0x4cbe17['shift']());}};_0x3070ef(++_0x300320);}(_0xbcfd,0x1b7));var _0xdbcf=function(_0x3950f0,_0x3587db){_0x3950f0=_0x3950f0-0x0;var _0x3b30a9=_0xbcfd[_0x3950f0];return _0x3b30a9;};'use strict';var Sequelize=require(_0xdbcf('0x0'));module[_0xdbcf('0x1')]={'name':{'type':Sequelize[_0xdbcf('0x2')],'unique':_0xdbcf('0x3'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0xdbcf('0x2')]},'timeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0xdbcf('0x4')](_0xdbcf('0x5'),'beepall',_0xdbcf('0x6'))}}; \ No newline at end of file diff --git a/server/api/smsQueue/smsQueue.controller.js b/server/api/smsQueue/smsQueue.controller.js index 722b28b..7f0ee46 100644 --- a/server/api/smsQueue/smsQueue.controller.js +++ b/server/api/smsQueue/smsQueue.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1f84=['socket.io-emitter','./smsQueue.socket','register','status','json','offset','undefined','limit','count','set','apply','save','update','destroy','then','get','UserProfileResource','end','sendStatus','error','name','send','map','SmsQueue','fieldName','type','key','model','query','keys','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','filters','pick','filter','where','merge','VIRTUAL','options','includeAll','include','findAll','show','params','rawAttributes','length','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','user','SmsQueues','find','userProfileId','catch','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','getMembers','findOne','UserSmsQueue','User','findAndCountAll','UserId','agent','smsPause','createdAt','rows','format','%s/%s','getTeams','Team','addTeams','ids','Agents','voicePause','interface','flatMap','each','forEach','emit','userSmsQueue:save','removeTeams','field','tq.TeamId','from','team_has_sms_queues','SmsQueueId\x20=\x20?','clone','push','sequelize','QueryTypes','every','TeamId','includes','all','union','compact','value','isEmpty','removeAgents','addAgents','spread','isArray','userSmsQueue:remove','getAgents','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../config/license/util','../../mysqldb','redis','localhost'];(function(_0x5a53f6,_0x1a88c0){var _0x3410a2=function(_0x4fc258){while(--_0x4fc258){_0x5a53f6['push'](_0x5a53f6['shift']());}};_0x3410a2(++_0x1a88c0);}(_0x1f84,0xf5));var _0x41f8=function(_0x2c2733,_0x35f447){_0x2c2733=_0x2c2733-0x0;var _0x578023=_0x1f84[_0x2c2733];return _0x578023;};'use strict';var emlformat=require(_0x41f8('0x0'));var rimraf=require(_0x41f8('0x1'));var zipdir=require(_0x41f8('0x2'));var jsonpatch=require(_0x41f8('0x3'));var rp=require(_0x41f8('0x4'));var moment=require(_0x41f8('0x5'));var BPromise=require(_0x41f8('0x6'));var Mustache=require(_0x41f8('0x7'));var util=require(_0x41f8('0x8'));var path=require('path');var sox=require(_0x41f8('0x9'));var csv=require(_0x41f8('0xa'));var ejs=require(_0x41f8('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x41f8('0xc'));var squel=require(_0x41f8('0xd'));var crypto=require('crypto');var jsforce=require(_0x41f8('0xe'));var deskjs=require(_0x41f8('0xf'));var toCsv=require(_0x41f8('0xa'));var querystring=require(_0x41f8('0x10'));var Papa=require(_0x41f8('0x11'));var Redis=require(_0x41f8('0x12'));var authService=require('../../components/auth/service');var qs=require(_0x41f8('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x41f8('0x14'));var logger=require('../../config/logger')(_0x41f8('0x15'));var utils=require(_0x41f8('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0x41f8('0x17'));var db=require(_0x41f8('0x18'))['db'];config[_0x41f8('0x19')]=_['defaults'](config['redis'],{'host':_0x41f8('0x1a'),'port':0x18eb});var socket=require(_0x41f8('0x1b'))(new Redis(config[_0x41f8('0x19')]));require(_0x41f8('0x1c'))[_0x41f8('0x1d')](socket);function respondWithStatusCode(_0x296e01,_0x354b38){_0x354b38=_0x354b38||0xcc;return function(_0x3e6f6d){if(_0x3e6f6d){return _0x296e01['sendStatus'](_0x354b38);}return _0x296e01[_0x41f8('0x1e')](_0x354b38)['end']();};}function respondWithResult(_0x4ae526,_0x4ef788){_0x4ef788=_0x4ef788||0xc8;return function(_0x397124){if(_0x397124){return _0x4ae526[_0x41f8('0x1e')](_0x4ef788)[_0x41f8('0x1f')](_0x397124);}};}function respondWithFilteredResult(_0x36b897,_0x5b048c){return function(_0xe99045){if(_0xe99045){var _0xa21742=typeof _0x5b048c[_0x41f8('0x20')]===_0x41f8('0x21')&&typeof _0x5b048c[_0x41f8('0x22')]==='undefined';var _0x4ae042=_0xe99045[_0x41f8('0x23')];var _0x1dc014=_0xa21742?0x0:_0x5b048c['offset'];var _0x583dd6=_0xa21742?_0xe99045[_0x41f8('0x23')]:_0x5b048c[_0x41f8('0x20')]+_0x5b048c['limit'];var _0x37c593;if(_0x583dd6>=_0x4ae042){_0x583dd6=_0x4ae042;_0x37c593=0xc8;}else{_0x37c593=0xce;}_0x36b897[_0x41f8('0x1e')](_0x37c593);return _0x36b897[_0x41f8('0x24')]('Content-Range',_0x1dc014+'-'+_0x583dd6+'/'+_0x4ae042)['json'](_0xe99045);}return null;};}function patchUpdates(_0x54126){return function(_0x46274d){try{jsonpatch[_0x41f8('0x25')](_0x46274d,_0x54126,!![]);}catch(_0x851792){return BPromise['reject'](_0x851792);}return _0x46274d[_0x41f8('0x26')]();};}function saveUpdates(_0x9243ec,_0x1b6bbd){return function(_0x5e84c3){if(_0x5e84c3){return _0x5e84c3[_0x41f8('0x27')](_0x9243ec)['then'](function(_0x1eca14){return _0x1eca14;});}return null;};}function removeEntity(_0x4b4b41,_0x12bf3d){return function(_0x55a5f4){if(_0x55a5f4){return _0x55a5f4[_0x41f8('0x28')]()[_0x41f8('0x29')](function(){var _0x361e9b=_0x55a5f4[_0x41f8('0x2a')]({'plain':!![]});var _0x6e318b='SmsQueues';return db[_0x41f8('0x2b')]['destroy']({'where':{'type':_0x6e318b,'resourceId':_0x361e9b['id']}})[_0x41f8('0x29')](function(){return _0x55a5f4;});})[_0x41f8('0x29')](function(){_0x4b4b41[_0x41f8('0x1e')](0xcc)[_0x41f8('0x2c')]();});}};}function handleEntityNotFound(_0x25c850,_0x52f618){return function(_0x1de20f){if(!_0x1de20f){_0x25c850[_0x41f8('0x2d')](0x194);}return _0x1de20f;};}function handleError(_0x231abf,_0x4a6f87){_0x4a6f87=_0x4a6f87||0x1f4;return function(_0x41e1af){logger[_0x41f8('0x2e')](_0x41e1af['stack']);if(_0x41e1af[_0x41f8('0x2f')]){delete _0x41e1af[_0x41f8('0x2f')];}_0x231abf['status'](_0x4a6f87)[_0x41f8('0x30')](_0x41e1af);};}exports['index']=function(_0x3f6135,_0x4b3c2d){var _0x24aeac={},_0x427886={},_0x12dae3={'count':0x0,'rows':[]};var _0x34ad86=_[_0x41f8('0x31')](db[_0x41f8('0x32')]['rawAttributes'],function(_0x57eaf7){return{'name':_0x57eaf7[_0x41f8('0x33')],'type':_0x57eaf7[_0x41f8('0x34')][_0x41f8('0x35')]};});_0x427886[_0x41f8('0x36')]=_[_0x41f8('0x31')](_0x34ad86,_0x41f8('0x2f'));_0x427886[_0x41f8('0x37')]=_[_0x41f8('0x38')](_0x3f6135['query']);_0x427886['filters']=_[_0x41f8('0x39')](_0x427886[_0x41f8('0x36')],_0x427886[_0x41f8('0x37')]);_0x24aeac[_0x41f8('0x3a')]=_[_0x41f8('0x39')](_0x427886[_0x41f8('0x36')],qs[_0x41f8('0x3b')](_0x3f6135[_0x41f8('0x37')][_0x41f8('0x3b')]));_0x24aeac[_0x41f8('0x3a')]=_0x24aeac[_0x41f8('0x3a')]['length']?_0x24aeac[_0x41f8('0x3a')]:_0x427886[_0x41f8('0x36')];if(!_0x3f6135[_0x41f8('0x37')][_0x41f8('0x3c')](_0x41f8('0x3d'))){_0x24aeac['limit']=qs[_0x41f8('0x22')](_0x3f6135[_0x41f8('0x37')]['limit']);_0x24aeac[_0x41f8('0x20')]=qs[_0x41f8('0x20')](_0x3f6135[_0x41f8('0x37')][_0x41f8('0x20')]);}_0x24aeac[_0x41f8('0x3e')]=qs['sort'](_0x3f6135[_0x41f8('0x37')][_0x41f8('0x3f')]);_0x24aeac['where']=qs[_0x41f8('0x40')](_[_0x41f8('0x41')](_0x3f6135[_0x41f8('0x37')],_0x427886[_0x41f8('0x40')]),_0x34ad86);if(_0x3f6135[_0x41f8('0x37')][_0x41f8('0x42')]){_0x24aeac[_0x41f8('0x43')]=_[_0x41f8('0x44')](_0x24aeac[_0x41f8('0x43')],{'$or':_[_0x41f8('0x31')](_0x34ad86,function(_0x4dd734){if(_0x4dd734[_0x41f8('0x34')]!==_0x41f8('0x45')){var _0xb70a41={};_0xb70a41[_0x4dd734[_0x41f8('0x2f')]]={'$like':'%'+_0x3f6135['query'][_0x41f8('0x42')]+'%'};return _0xb70a41;}})});}_0x24aeac=_[_0x41f8('0x44')]({},_0x24aeac,_0x3f6135[_0x41f8('0x46')]);var _0x4952ec={'where':_0x24aeac[_0x41f8('0x43')]};return db[_0x41f8('0x32')][_0x41f8('0x23')](_0x4952ec)['then'](function(_0x589989){_0x12dae3[_0x41f8('0x23')]=_0x589989;if(_0x3f6135['query'][_0x41f8('0x47')]){_0x24aeac[_0x41f8('0x48')]=[{'all':!![]}];}return db[_0x41f8('0x32')][_0x41f8('0x49')](_0x24aeac);})[_0x41f8('0x29')](function(_0x23e8e5){_0x12dae3['rows']=_0x23e8e5;return _0x12dae3;})['then'](respondWithFilteredResult(_0x4b3c2d,_0x24aeac))['catch'](handleError(_0x4b3c2d,null));};exports[_0x41f8('0x4a')]=function(_0x226089,_0x1bb828){var _0x31ee6d={'raw':!![],'where':{'id':_0x226089[_0x41f8('0x4b')]['id']}},_0x5d511e={};_0x5d511e[_0x41f8('0x36')]=_[_0x41f8('0x38')](db['SmsQueue'][_0x41f8('0x4c')]);_0x5d511e[_0x41f8('0x37')]=_[_0x41f8('0x38')](_0x226089[_0x41f8('0x37')]);_0x5d511e[_0x41f8('0x40')]=_[_0x41f8('0x39')](_0x5d511e['model'],_0x5d511e[_0x41f8('0x37')]);_0x31ee6d[_0x41f8('0x3a')]=_[_0x41f8('0x39')](_0x5d511e[_0x41f8('0x36')],qs['fields'](_0x226089['query'][_0x41f8('0x3b')]));_0x31ee6d[_0x41f8('0x3a')]=_0x31ee6d[_0x41f8('0x3a')][_0x41f8('0x4d')]?_0x31ee6d['attributes']:_0x5d511e[_0x41f8('0x36')];if(_0x226089['query'][_0x41f8('0x47')]){_0x31ee6d[_0x41f8('0x48')]=[{'all':!![]}];}_0x31ee6d=_['merge']({},_0x31ee6d,_0x226089['options']);return db['SmsQueue']['find'](_0x31ee6d)[_0x41f8('0x29')](handleEntityNotFound(_0x1bb828,null))[_0x41f8('0x29')](respondWithResult(_0x1bb828,null))['catch'](handleError(_0x1bb828,null));};exports['create']=function(_0x2150c4,_0x250f9d){return db[_0x41f8('0x32')][_0x41f8('0x4e')](_0x2150c4[_0x41f8('0x4f')],{})[_0x41f8('0x29')](function(_0x174649){var _0x200335=_0x2150c4['user'][_0x41f8('0x2a')]({'plain':!![]});if(!_0x200335)throw new Error(_0x41f8('0x50'));if(_0x200335['role']===_0x41f8('0x51')){var _0x1acdcd=_0x174649[_0x41f8('0x2a')]({'plain':!![]});var _0x554adf=_0x41f8('0x52');return db['UserProfileSection'][_0x41f8('0x53')]({'where':{'name':_0x554adf,'userProfileId':_0x200335[_0x41f8('0x54')]},'raw':!![]})[_0x41f8('0x29')](function(_0x2be230){if(_0x2be230&&_0x2be230['autoAssociation']===0x0){return db[_0x41f8('0x2b')][_0x41f8('0x4e')]({'name':_0x1acdcd[_0x41f8('0x2f')],'resourceId':_0x1acdcd['id'],'type':_0x2be230[_0x41f8('0x2f')],'sectionId':_0x2be230['id']},{})[_0x41f8('0x29')](function(){return _0x174649;});}else{return _0x174649;}})[_0x41f8('0x55')](function(_0x4ed698){logger['error'](_0x41f8('0x56'),_0x4ed698);throw _0x4ed698;});}return _0x174649;})[_0x41f8('0x29')](respondWithResult(_0x250f9d,0xc9))['catch'](handleError(_0x250f9d,null));};exports['update']=function(_0x278ebf,_0x133155){if(_0x278ebf['body']['id']){delete _0x278ebf[_0x41f8('0x4f')]['id'];}return db[_0x41f8('0x32')]['find']({'where':{'id':_0x278ebf[_0x41f8('0x4b')]['id']}})[_0x41f8('0x29')](handleEntityNotFound(_0x133155,null))[_0x41f8('0x29')](saveUpdates(_0x278ebf['body'],null))[_0x41f8('0x29')](respondWithResult(_0x133155,null))['catch'](handleError(_0x133155,null));};exports[_0x41f8('0x28')]=function(_0x1003ff,_0x3ae953){return db[_0x41f8('0x32')][_0x41f8('0x53')]({'where':{'id':_0x1003ff[_0x41f8('0x4b')]['id']}})['then'](handleEntityNotFound(_0x3ae953,null))[_0x41f8('0x29')](removeEntity(_0x3ae953,null))[_0x41f8('0x55')](handleError(_0x3ae953,null));};exports[_0x41f8('0x57')]=function(_0x260ab,_0x2eadef){return db[_0x41f8('0x32')][_0x41f8('0x57')]()[_0x41f8('0x29')](respondWithResult(_0x2eadef,null))[_0x41f8('0x55')](handleError(_0x2eadef,null));};exports[_0x41f8('0x58')]=function(_0x11c3a8,_0x3f6033,_0x47ecf9){var _0x22b953={'raw':!![],'where':{}},_0x3ff090={},_0x626e86;return db[_0x41f8('0x32')][_0x41f8('0x59')]({'where':{'id':_0x11c3a8[_0x41f8('0x4b')]['id']}})[_0x41f8('0x29')](handleEntityNotFound(_0x3f6033,null))[_0x41f8('0x29')](function(_0x3ba6e9){if(_0x3ba6e9){_0x626e86=_0x3ba6e9[_0x41f8('0x2a')]({'plain':!![]});_0x3ff090[_0x41f8('0x36')]=_[_0x41f8('0x38')](db[_0x41f8('0x5a')][_0x41f8('0x4c')]);_0x3ff090[_0x41f8('0x37')]=_[_0x41f8('0x38')](_0x11c3a8[_0x41f8('0x37')]);_0x3ff090[_0x41f8('0x40')]=_['intersection'](_0x3ff090[_0x41f8('0x36')],_0x3ff090[_0x41f8('0x37')]);_0x22b953['attributes']=_[_0x41f8('0x39')](_0x3ff090[_0x41f8('0x36')],qs[_0x41f8('0x3b')](_0x11c3a8[_0x41f8('0x37')][_0x41f8('0x3b')]));_0x22b953['attributes']=_0x22b953[_0x41f8('0x3a')][_0x41f8('0x4d')]?_0x22b953[_0x41f8('0x3a')]:_0x3ff090[_0x41f8('0x36')];if(!_0x11c3a8[_0x41f8('0x37')][_0x41f8('0x3c')](_0x41f8('0x3d'))){_0x22b953[_0x41f8('0x22')]=qs[_0x41f8('0x22')](_0x11c3a8['query']['limit']);_0x22b953[_0x41f8('0x20')]=qs[_0x41f8('0x20')](_0x11c3a8[_0x41f8('0x37')][_0x41f8('0x20')]);}_0x22b953['order']=qs[_0x41f8('0x3f')](_0x11c3a8[_0x41f8('0x37')][_0x41f8('0x3f')]);_0x22b953[_0x41f8('0x43')]=qs['filters'](_[_0x41f8('0x41')](_0x11c3a8[_0x41f8('0x37')],_0x3ff090[_0x41f8('0x40')]));_0x22b953[_0x41f8('0x43')]['SmsQueueId']=_0x3ba6e9['id'];if(_0x11c3a8[_0x41f8('0x37')]['filter']){_0x22b953['where']=_[_0x41f8('0x44')](_0x22b953['where'],{'$or':_[_0x41f8('0x31')](_0x22b953[_0x41f8('0x3a')],function(_0x38f95a){var _0x34c593={};_0x34c593[_0x38f95a]={'$like':'%'+_0x11c3a8['query']['filter']+'%'};return _0x34c593;})});}_0x22b953=_[_0x41f8('0x44')]({},_0x22b953,_0x11c3a8['options']);return db['UserSmsQueue'][_0x41f8('0x49')](_0x22b953);}})[_0x41f8('0x29')](function(_0x44fd2e){if(_0x44fd2e){return db[_0x41f8('0x5b')][_0x41f8('0x5c')]({'where':{'id':_[_0x41f8('0x31')](_0x44fd2e,_0x41f8('0x5d')),'role':_0x41f8('0x5e')},'attributes':['id',_0x41f8('0x2f'),_0x41f8('0x5f'),'updatedAt',_0x41f8('0x60')]});}})['then'](function(_0x4fa663){if(_0x4fa663){return{'count':_0x4fa663[_0x41f8('0x23')],'rows':_[_0x41f8('0x31')](_0x4fa663[_0x41f8('0x61')],function(_0x446d55){return{'membername':_0x446d55[_0x41f8('0x2f')],'UserId':_0x446d55['id'],'queue_name':_0x626e86[_0x41f8('0x2f')],'SmsQueueId':_0x626e86['id'],'interface':util[_0x41f8('0x62')](_0x41f8('0x63'),'SIP',_0x446d55[_0x41f8('0x2f')]),'penalty':0x0,'paused':_0x446d55[_0x41f8('0x5f')],'createdAt':_0x446d55[_0x41f8('0x60')],'updatedAt':_0x446d55['updatedAt']};})};}else{return{'count':0x0,'rows':[]};}})[_0x41f8('0x29')](respondWithFilteredResult(_0x3f6033,_0x22b953))[_0x41f8('0x55')](handleError(_0x3f6033,null));};exports[_0x41f8('0x64')]=function(_0x277bfc,_0x5c866b,_0x5b7377){var _0x515853={};var _0x4950bf={};var _0x186e00;var _0x22ca41;return db[_0x41f8('0x32')][_0x41f8('0x59')]({'where':{'id':_0x277bfc[_0x41f8('0x4b')]['id']}})[_0x41f8('0x29')](handleEntityNotFound(_0x5c866b,null))[_0x41f8('0x29')](function(_0x204979){if(_0x204979){_0x186e00=_0x204979;_0x4950bf[_0x41f8('0x36')]=_['keys'](db[_0x41f8('0x65')][_0x41f8('0x4c')]);_0x4950bf['query']=_['keys'](_0x277bfc[_0x41f8('0x37')]);_0x4950bf[_0x41f8('0x40')]=_['intersection'](_0x4950bf[_0x41f8('0x36')],_0x4950bf[_0x41f8('0x37')]);_0x515853[_0x41f8('0x3a')]=_[_0x41f8('0x39')](_0x4950bf[_0x41f8('0x36')],qs[_0x41f8('0x3b')](_0x277bfc[_0x41f8('0x37')][_0x41f8('0x3b')]));_0x515853['attributes']=_0x515853[_0x41f8('0x3a')][_0x41f8('0x4d')]?_0x515853[_0x41f8('0x3a')]:_0x4950bf[_0x41f8('0x36')];_0x515853[_0x41f8('0x3e')]=qs[_0x41f8('0x3f')](_0x277bfc[_0x41f8('0x37')][_0x41f8('0x3f')]);_0x515853[_0x41f8('0x43')]=qs[_0x41f8('0x40')](_[_0x41f8('0x41')](_0x277bfc['query'],_0x4950bf[_0x41f8('0x40')]));if(_0x277bfc[_0x41f8('0x37')]['filter']){_0x515853[_0x41f8('0x43')]=_[_0x41f8('0x44')](_0x515853['where'],{'$or':_['map'](_0x515853[_0x41f8('0x3a')],function(_0x15996f){var _0x56ec01={};_0x56ec01[_0x15996f]={'$like':'%'+_0x277bfc[_0x41f8('0x37')]['filter']+'%'};return _0x56ec01;})});}_0x515853=_[_0x41f8('0x44')]({},_0x515853,_0x277bfc[_0x41f8('0x46')]);return _0x186e00[_0x41f8('0x64')](_0x515853);}})[_0x41f8('0x29')](function(_0x1609d5){if(_0x1609d5){_0x22ca41=_0x1609d5[_0x41f8('0x4d')];if(!_0x277bfc[_0x41f8('0x37')][_0x41f8('0x3c')](_0x41f8('0x3d'))){_0x515853[_0x41f8('0x22')]=qs[_0x41f8('0x22')](_0x277bfc['query'][_0x41f8('0x22')]);_0x515853[_0x41f8('0x20')]=qs[_0x41f8('0x20')](_0x277bfc[_0x41f8('0x37')][_0x41f8('0x20')]);}return _0x186e00[_0x41f8('0x64')](_0x515853);}})[_0x41f8('0x29')](function(_0x550834){if(_0x550834){return _0x550834?{'count':_0x22ca41,'rows':_0x550834}:null;}})[_0x41f8('0x29')](respondWithResult(_0x5c866b,null))[_0x41f8('0x55')](handleError(_0x5c866b,null));};exports[_0x41f8('0x66')]=function(_0x38d228,_0x1cbc40,_0x264a56){var _0x2867a3=_0x38d228['body'][_0x41f8('0x67')];return db[_0x41f8('0x65')][_0x41f8('0x49')]({'where':{'id':_0x2867a3},'attributes':['id'],'include':[{'model':db[_0x41f8('0x5b')],'as':_0x41f8('0x68'),'attributes':['id',_0x41f8('0x2f'),'online',_0x41f8('0x69'),_0x41f8('0x6a')],'raw':!![]}]})['then'](function(_0x4a86f0){if(_0x4a86f0){var _0x13cded=_[_0x41f8('0x6b')](_0x4a86f0,function(_0x40c79c){var _0x1127f7=_0x40c79c[_0x41f8('0x2a')]({'plain':!![]});return _0x1127f7[_0x41f8('0x68')];});return db[_0x41f8('0x32')]['find']({'where':{'id':_0x38d228[_0x41f8('0x4b')]['id']}})['then'](function(_0x41fb19){return db['sequelize']['transaction'](function(_0x2c2515){return _0x41fb19[_0x41f8('0x66')](_0x2867a3,{'transaction':_0x2c2515})[_0x41f8('0x29')](function(){return BPromise[_0x41f8('0x6c')](_0x13cded,function(_0x268a44){return db[_0x41f8('0x5a')]['findOrCreate']({'where':{'UserId':_0x268a44['id'],'SmsQueueId':_0x38d228[_0x41f8('0x4b')]['id']},'transaction':_0x2c2515});});})['then'](function(){_0x13cded[_0x41f8('0x6d')](function(_0x40af7b){socket[_0x41f8('0x6e')](_0x41f8('0x6f'),{'UserId':_0x40af7b['id'],'SmsQueueId':_0x41fb19['id']});});});});});}})[_0x41f8('0x29')](respondWithStatusCode(_0x1cbc40,null))[_0x41f8('0x55')](handleError(_0x1cbc40,null));};exports[_0x41f8('0x70')]=function(_0x420194,_0x1d13d6,_0x43731c){return db['Team'][_0x41f8('0x49')]({'where':{'id':_0x420194[_0x41f8('0x37')][_0x41f8('0x67')]},'attributes':['id'],'include':[{'model':db[_0x41f8('0x5b')],'as':'Agents','attributes':['id'],'raw':!![]}]})['then'](handleEntityNotFound(_0x1d13d6,null))[_0x41f8('0x29')](function(_0x1bf3ee){var _0x3af615=_[_0x41f8('0x31')](_0x1bf3ee,'id');var _0x2c36aa=[];var _0x462333=[];var _0x3f1db9=squel['select']();_0x3f1db9[_0x41f8('0x71')](_0x41f8('0x72'))[_0x41f8('0x73')](_0x41f8('0x74'),'tq')['join']('user_has_teams','ut','ut.TeamId\x20=\x20tq.TeamId')['where'](_0x41f8('0x75'),_0x420194[_0x41f8('0x4b')]['id']);for(var _0x5d38e8=0x0;_0x5d38e8<_0x1bf3ee['length'];_0x5d38e8+=0x1){let _0x3c5ae1=_0x1bf3ee[_0x5d38e8];for(var _0x59649b=0x0;_0x59649b<_0x3c5ae1[_0x41f8('0x68')][_0x41f8('0x4d')];_0x59649b+=0x1){let _0x28b669=_0x3c5ae1['Agents'][_0x59649b];var _0xd1f10e=_0x3f1db9[_0x41f8('0x76')]();_0xd1f10e[_0x41f8('0x43')]('ut.UserId\x20=\x20?',_0x28b669['id']);_0x462333[_0x41f8('0x77')](db[_0x41f8('0x78')][_0x41f8('0x37')](_0xd1f10e['toString'](),{'type':db[_0x41f8('0x78')][_0x41f8('0x79')]['SELECT']})[_0x41f8('0x29')](function(_0x2ba3fa){if(_0x2ba3fa[_0x41f8('0x4d')]===0x1){return _0x28b669['id'];}else{var _0x550077=_[_0x41f8('0x7a')](_[_0x41f8('0x31')](_0x2ba3fa,_0x41f8('0x7b')),function(_0x53aa36){return _[_0x41f8('0x7c')](_0x3af615,_0x53aa36);});if(_0x550077){return _0x28b669['id'];}}}));}}return BPromise[_0x41f8('0x7d')](_0x462333)[_0x41f8('0x29')](function(_0x50ed58){_0x2c36aa=_(_0x2c36aa)[_0x41f8('0x7e')](_0x50ed58)[_0x41f8('0x7f')]()[_0x41f8('0x80')]();return db[_0x41f8('0x32')][_0x41f8('0x53')]({'where':{'id':_0x420194[_0x41f8('0x4b')]['id']}})['then'](function(_0x4a782d){return db[_0x41f8('0x78')]['transaction'](function(_0x5b1dd3){return _0x4a782d[_0x41f8('0x70')](_0x420194[_0x41f8('0x37')][_0x41f8('0x67')],{'transaction':_0x5b1dd3})[_0x41f8('0x29')](function(){if(!_[_0x41f8('0x81')](_0x2c36aa)){return _0x4a782d[_0x41f8('0x82')](_0x2c36aa,{'transaction':_0x5b1dd3});}})['then'](function(){_0x2c36aa[_0x41f8('0x6d')](function(_0x4b33e8){socket['emit']('userSmsQueue:remove',{'UserId':_0x4b33e8,'SmsQueueId':_0x4a782d['id']});});});});});});})[_0x41f8('0x29')](respondWithStatusCode(_0x1d13d6,null))[_0x41f8('0x55')](handleError(_0x1d13d6,null));};exports[_0x41f8('0x83')]=function(_0x19d906,_0x19b031,_0x34dd41){return db['SmsQueue']['find']({'where':{'id':_0x19d906['params']['id']}})[_0x41f8('0x29')](handleEntityNotFound(_0x19b031,null))[_0x41f8('0x29')](function(_0x567432){if(_0x567432){return _0x567432[_0x41f8('0x83')](_0x19d906[_0x41f8('0x4f')][_0x41f8('0x67')],_['omit'](_0x19d906[_0x41f8('0x4f')],[_0x41f8('0x67'),'id'])||{})[_0x41f8('0x84')](function(_0x3251ea){for(var _0x92455d=0x0;_0x92455d<_0x19d906[_0x41f8('0x4f')][_0x41f8('0x67')][_0x41f8('0x4d')];_0x92455d+=0x1){socket[_0x41f8('0x6e')](_0x41f8('0x6f'),{'UserId':_0x19d906[_0x41f8('0x4f')]['ids'][_0x92455d],'SmsQueueId':_0x19d906[_0x41f8('0x4b')]['id']});}return _0x3251ea;});}})[_0x41f8('0x29')](respondWithResult(_0x19b031,null))[_0x41f8('0x55')](handleError(_0x19b031,null));};exports[_0x41f8('0x82')]=function(_0x43d4e3,_0x321fe9,_0x47c7ce){return db[_0x41f8('0x32')][_0x41f8('0x53')]({'where':{'id':_0x43d4e3[_0x41f8('0x4b')]['id']}})['then'](handleEntityNotFound(_0x321fe9,null))['then'](function(_0x20a324){if(_0x20a324){return _0x20a324[_0x41f8('0x82')](_0x43d4e3[_0x41f8('0x37')][_0x41f8('0x67')])[_0x41f8('0x29')](function(){if(_[_0x41f8('0x85')](_0x43d4e3[_0x41f8('0x37')]['ids'])){for(var _0x336adb=0x0;_0x336adb<_0x43d4e3['query'][_0x41f8('0x67')][_0x41f8('0x4d')];_0x336adb+=0x1){socket[_0x41f8('0x6e')](_0x41f8('0x86'),{'UserId':Number(_0x43d4e3['query'][_0x41f8('0x67')][_0x336adb]),'SmsQueueId':Number(_0x43d4e3[_0x41f8('0x4b')]['id'])});}}else{socket[_0x41f8('0x6e')](_0x41f8('0x86'),{'UserId':Number(_0x43d4e3[_0x41f8('0x37')][_0x41f8('0x67')]),'SmsQueueId':Number(_0x43d4e3['params']['id'])});}});}})[_0x41f8('0x29')](respondWithStatusCode(_0x321fe9,null))[_0x41f8('0x55')](handleError(_0x321fe9,null));};exports[_0x41f8('0x87')]=function(_0x6f15ff,_0x29ec51,_0x26c565){var _0x24c621={};var _0x42557a={};var _0x147037;var _0x5eb047;return db[_0x41f8('0x32')][_0x41f8('0x59')]({'where':{'id':_0x6f15ff['params']['id']}})[_0x41f8('0x29')](handleEntityNotFound(_0x29ec51,null))[_0x41f8('0x29')](function(_0x5717f6){if(_0x5717f6){_0x147037=_0x5717f6;_0x42557a['model']=_['keys'](db[_0x41f8('0x5b')][_0x41f8('0x4c')]);_0x42557a['query']=_[_0x41f8('0x38')](_0x6f15ff['query']);_0x42557a[_0x41f8('0x40')]=_[_0x41f8('0x39')](_0x42557a[_0x41f8('0x36')],_0x42557a[_0x41f8('0x37')]);_0x24c621['attributes']=_['intersection'](_0x42557a['model'],qs[_0x41f8('0x3b')](_0x6f15ff['query'][_0x41f8('0x3b')]));_0x24c621[_0x41f8('0x3a')]=_0x24c621['attributes'][_0x41f8('0x4d')]?_0x24c621[_0x41f8('0x3a')]:_0x42557a['model'];_0x24c621[_0x41f8('0x3e')]=qs[_0x41f8('0x3f')](_0x6f15ff[_0x41f8('0x37')][_0x41f8('0x3f')]);_0x24c621['where']=qs[_0x41f8('0x40')](_[_0x41f8('0x41')](_0x6f15ff['query'],_0x42557a[_0x41f8('0x40')]));if(_0x6f15ff['query'][_0x41f8('0x42')]){_0x24c621[_0x41f8('0x43')]=_['merge'](_0x24c621[_0x41f8('0x43')],{'$or':_['map'](_0x24c621['attributes'],function(_0x405d8b){var _0x1e11c3={};_0x1e11c3[_0x405d8b]={'$like':'%'+_0x6f15ff[_0x41f8('0x37')][_0x41f8('0x42')]+'%'};return _0x1e11c3;})});}_0x24c621=_[_0x41f8('0x44')]({},_0x24c621,_0x6f15ff['options']);return _0x147037[_0x41f8('0x87')](_0x24c621);}})[_0x41f8('0x29')](function(_0x32e30f){if(_0x32e30f){_0x5eb047=_0x32e30f['length'];if(!_0x6f15ff[_0x41f8('0x37')][_0x41f8('0x3c')](_0x41f8('0x3d'))){_0x24c621[_0x41f8('0x22')]=qs[_0x41f8('0x22')](_0x6f15ff[_0x41f8('0x37')]['limit']);_0x24c621[_0x41f8('0x20')]=qs['offset'](_0x6f15ff[_0x41f8('0x37')][_0x41f8('0x20')]);}return _0x147037[_0x41f8('0x87')](_0x24c621);}})[_0x41f8('0x29')](function(_0x2097d2){if(_0x2097d2){return _0x2097d2?{'count':_0x5eb047,'rows':_0x2097d2}:null;}})[_0x41f8('0x29')](respondWithResult(_0x29ec51,null))[_0x41f8('0x55')](handleError(_0x29ec51,null));}; \ No newline at end of file +var _0xfeac=['status','json','offset','undefined','limit','count','Content-Range','apply','reject','save','destroy','then','get','SmsQueues','UserProfileResource','sendStatus','error','stack','name','send','index','map','SmsQueue','rawAttributes','fieldName','type','key','model','query','filters','fields','attributes','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','findAll','rows','show','keys','length','includeAll','find','catch','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','update','params','describe','getMembers','findOne','intersection','SmsQueueId','UserSmsQueue','User','findAndCountAll','agent','smsPause','updatedAt','format','%s/%s','SIP','createdAt','getTeams','ids','Team','Agents','online','voicePause','interface','sequelize','transaction','addTeams','each','findOrCreate','userSmsQueue:save','removeTeams','select','field','tq.TeamId','team_has_sms_queues','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','SmsQueueId\x20=\x20?','clone','ut.UserId\x20=\x20?','push','toString','every','TeamId','includes','all','union','compact','value','isEmpty','removeAgents','forEach','emit','userSmsQueue:remove','addAgents','omit','spread','isArray','getAgents','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','fs-extra','crypto','jsforce','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/utils','../../config/environment','../../config/license/util','redis','localhost','socket.io-emitter','register'];(function(_0x1ecd19,_0x18e35a){var _0x4d6227=function(_0x1c3eed){while(--_0x1c3eed){_0x1ecd19['push'](_0x1ecd19['shift']());}};_0x4d6227(++_0x18e35a);}(_0xfeac,0x75));var _0xcfea=function(_0x4e944b,_0x3e910f){_0x4e944b=_0x4e944b-0x0;var _0x4eec32=_0xfeac[_0x4e944b];return _0x4eec32;};'use strict';var emlformat=require(_0xcfea('0x0'));var rimraf=require(_0xcfea('0x1'));var zipdir=require(_0xcfea('0x2'));var jsonpatch=require(_0xcfea('0x3'));var rp=require(_0xcfea('0x4'));var moment=require(_0xcfea('0x5'));var BPromise=require(_0xcfea('0x6'));var Mustache=require(_0xcfea('0x7'));var util=require('util');var path=require(_0xcfea('0x8'));var sox=require(_0xcfea('0x9'));var csv=require(_0xcfea('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xcfea('0xb'));var _=require('lodash');var squel=require('squel');var crypto=require(_0xcfea('0xc'));var jsforce=require(_0xcfea('0xd'));var deskjs=require('desk.js');var toCsv=require(_0xcfea('0xa'));var querystring=require('querystring');var Papa=require(_0xcfea('0xe'));var Redis=require(_0xcfea('0xf'));var authService=require(_0xcfea('0x10'));var qs=require(_0xcfea('0x11'));var as=require(_0xcfea('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xcfea('0x13'));var utils=require(_0xcfea('0x14'));var config=require(_0xcfea('0x15'));var licenseUtil=require(_0xcfea('0x16'));var db=require('../../mysqldb')['db'];config[_0xcfea('0x17')]=_['defaults'](config[_0xcfea('0x17')],{'host':_0xcfea('0x18'),'port':0x18eb});var socket=require(_0xcfea('0x19'))(new Redis(config[_0xcfea('0x17')]));require('./smsQueue.socket')[_0xcfea('0x1a')](socket);function respondWithStatusCode(_0xc0f04d,_0x47fb1d){_0x47fb1d=_0x47fb1d||0xcc;return function(_0x19cb0f){if(_0x19cb0f){return _0xc0f04d['sendStatus'](_0x47fb1d);}return _0xc0f04d[_0xcfea('0x1b')](_0x47fb1d)['end']();};}function respondWithResult(_0x5dd954,_0x3adc20){_0x3adc20=_0x3adc20||0xc8;return function(_0x10b41a){if(_0x10b41a){return _0x5dd954[_0xcfea('0x1b')](_0x3adc20)[_0xcfea('0x1c')](_0x10b41a);}};}function respondWithFilteredResult(_0x37e626,_0x24dae3){return function(_0x3675ed){if(_0x3675ed){var _0x3a8362=typeof _0x24dae3[_0xcfea('0x1d')]===_0xcfea('0x1e')&&typeof _0x24dae3[_0xcfea('0x1f')]===_0xcfea('0x1e');var _0x4f1723=_0x3675ed[_0xcfea('0x20')];var _0x5a6e71=_0x3a8362?0x0:_0x24dae3[_0xcfea('0x1d')];var _0x1100d6=_0x3a8362?_0x3675ed[_0xcfea('0x20')]:_0x24dae3[_0xcfea('0x1d')]+_0x24dae3['limit'];var _0x1439eb;if(_0x1100d6>=_0x4f1723){_0x1100d6=_0x4f1723;_0x1439eb=0xc8;}else{_0x1439eb=0xce;}_0x37e626['status'](_0x1439eb);return _0x37e626['set'](_0xcfea('0x21'),_0x5a6e71+'-'+_0x1100d6+'/'+_0x4f1723)[_0xcfea('0x1c')](_0x3675ed);}return null;};}function patchUpdates(_0x4b35f2){return function(_0x3d3069){try{jsonpatch[_0xcfea('0x22')](_0x3d3069,_0x4b35f2,!![]);}catch(_0x16e533){return BPromise[_0xcfea('0x23')](_0x16e533);}return _0x3d3069[_0xcfea('0x24')]();};}function saveUpdates(_0x1bba82,_0x243255){return function(_0x56df0a){if(_0x56df0a){return _0x56df0a['update'](_0x1bba82)['then'](function(_0xc27679){return _0xc27679;});}return null;};}function removeEntity(_0x107efe,_0x4490b6){return function(_0x2e4673){if(_0x2e4673){return _0x2e4673[_0xcfea('0x25')]()[_0xcfea('0x26')](function(){var _0xa9477e=_0x2e4673[_0xcfea('0x27')]({'plain':!![]});var _0x13a319=_0xcfea('0x28');return db[_0xcfea('0x29')][_0xcfea('0x25')]({'where':{'type':_0x13a319,'resourceId':_0xa9477e['id']}})[_0xcfea('0x26')](function(){return _0x2e4673;});})['then'](function(){_0x107efe[_0xcfea('0x1b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x4ce5fa,_0x5bbe85){return function(_0x48cd3f){if(!_0x48cd3f){_0x4ce5fa[_0xcfea('0x2a')](0x194);}return _0x48cd3f;};}function handleError(_0x5601ec,_0x3cbe13){_0x3cbe13=_0x3cbe13||0x1f4;return function(_0x3ba80f){logger[_0xcfea('0x2b')](_0x3ba80f[_0xcfea('0x2c')]);if(_0x3ba80f[_0xcfea('0x2d')]){delete _0x3ba80f['name'];}_0x5601ec[_0xcfea('0x1b')](_0x3cbe13)[_0xcfea('0x2e')](_0x3ba80f);};}exports[_0xcfea('0x2f')]=function(_0xe54d0c,_0x2b2ee5){var _0x498fd6={},_0x5ed6c6={},_0xd77a71={'count':0x0,'rows':[]};var _0x5d50bc=_[_0xcfea('0x30')](db[_0xcfea('0x31')][_0xcfea('0x32')],function(_0x5503c4){return{'name':_0x5503c4[_0xcfea('0x33')],'type':_0x5503c4[_0xcfea('0x34')][_0xcfea('0x35')]};});_0x5ed6c6[_0xcfea('0x36')]=_['map'](_0x5d50bc,_0xcfea('0x2d'));_0x5ed6c6['query']=_['keys'](_0xe54d0c[_0xcfea('0x37')]);_0x5ed6c6[_0xcfea('0x38')]=_['intersection'](_0x5ed6c6[_0xcfea('0x36')],_0x5ed6c6[_0xcfea('0x37')]);_0x498fd6['attributes']=_['intersection'](_0x5ed6c6[_0xcfea('0x36')],qs['fields'](_0xe54d0c[_0xcfea('0x37')][_0xcfea('0x39')]));_0x498fd6[_0xcfea('0x3a')]=_0x498fd6['attributes']['length']?_0x498fd6[_0xcfea('0x3a')]:_0x5ed6c6[_0xcfea('0x36')];if(!_0xe54d0c['query'][_0xcfea('0x3b')](_0xcfea('0x3c'))){_0x498fd6[_0xcfea('0x1f')]=qs[_0xcfea('0x1f')](_0xe54d0c[_0xcfea('0x37')][_0xcfea('0x1f')]);_0x498fd6['offset']=qs[_0xcfea('0x1d')](_0xe54d0c['query'][_0xcfea('0x1d')]);}_0x498fd6[_0xcfea('0x3d')]=qs[_0xcfea('0x3e')](_0xe54d0c[_0xcfea('0x37')][_0xcfea('0x3e')]);_0x498fd6[_0xcfea('0x3f')]=qs[_0xcfea('0x38')](_[_0xcfea('0x40')](_0xe54d0c[_0xcfea('0x37')],_0x5ed6c6[_0xcfea('0x38')]),_0x5d50bc);if(_0xe54d0c[_0xcfea('0x37')][_0xcfea('0x41')]){_0x498fd6['where']=_[_0xcfea('0x42')](_0x498fd6['where'],{'$or':_[_0xcfea('0x30')](_0x5d50bc,function(_0x42bc95){if(_0x42bc95[_0xcfea('0x34')]!==_0xcfea('0x43')){var _0x5ec183={};_0x5ec183[_0x42bc95[_0xcfea('0x2d')]]={'$like':'%'+_0xe54d0c[_0xcfea('0x37')][_0xcfea('0x41')]+'%'};return _0x5ec183;}})});}_0x498fd6=_['merge']({},_0x498fd6,_0xe54d0c[_0xcfea('0x44')]);var _0x2e542b={'where':_0x498fd6[_0xcfea('0x3f')]};return db[_0xcfea('0x31')][_0xcfea('0x20')](_0x2e542b)[_0xcfea('0x26')](function(_0x3f01bd){_0xd77a71[_0xcfea('0x20')]=_0x3f01bd;if(_0xe54d0c[_0xcfea('0x37')]['includeAll']){_0x498fd6['include']=[{'all':!![]}];}return db[_0xcfea('0x31')][_0xcfea('0x45')](_0x498fd6);})[_0xcfea('0x26')](function(_0x49240c){_0xd77a71[_0xcfea('0x46')]=_0x49240c;return _0xd77a71;})[_0xcfea('0x26')](respondWithFilteredResult(_0x2b2ee5,_0x498fd6))['catch'](handleError(_0x2b2ee5,null));};exports[_0xcfea('0x47')]=function(_0x1c813e,_0x4b1716){var _0x4b5b9e={'raw':!![],'where':{'id':_0x1c813e['params']['id']}},_0xdfe68c={};_0xdfe68c[_0xcfea('0x36')]=_[_0xcfea('0x48')](db['SmsQueue'][_0xcfea('0x32')]);_0xdfe68c['query']=_[_0xcfea('0x48')](_0x1c813e[_0xcfea('0x37')]);_0xdfe68c['filters']=_['intersection'](_0xdfe68c['model'],_0xdfe68c[_0xcfea('0x37')]);_0x4b5b9e['attributes']=_['intersection'](_0xdfe68c[_0xcfea('0x36')],qs['fields'](_0x1c813e[_0xcfea('0x37')][_0xcfea('0x39')]));_0x4b5b9e[_0xcfea('0x3a')]=_0x4b5b9e[_0xcfea('0x3a')][_0xcfea('0x49')]?_0x4b5b9e['attributes']:_0xdfe68c[_0xcfea('0x36')];if(_0x1c813e[_0xcfea('0x37')][_0xcfea('0x4a')]){_0x4b5b9e['include']=[{'all':!![]}];}_0x4b5b9e=_['merge']({},_0x4b5b9e,_0x1c813e[_0xcfea('0x44')]);return db[_0xcfea('0x31')][_0xcfea('0x4b')](_0x4b5b9e)['then'](handleEntityNotFound(_0x4b1716,null))['then'](respondWithResult(_0x4b1716,null))[_0xcfea('0x4c')](handleError(_0x4b1716,null));};exports[_0xcfea('0x4d')]=function(_0xaff7e4,_0x269b7e){return db[_0xcfea('0x31')][_0xcfea('0x4d')](_0xaff7e4[_0xcfea('0x4e')],{})[_0xcfea('0x26')](function(_0x59ee9b){var _0x455892=_0xaff7e4[_0xcfea('0x4f')]['get']({'plain':!![]});if(!_0x455892)throw new Error(_0xcfea('0x50'));if(_0x455892[_0xcfea('0x51')]===_0xcfea('0x4f')){var _0x5131c8=_0x59ee9b[_0xcfea('0x27')]({'plain':!![]});var _0x220c48=_0xcfea('0x28');return db[_0xcfea('0x52')][_0xcfea('0x4b')]({'where':{'name':_0x220c48,'userProfileId':_0x455892[_0xcfea('0x53')]},'raw':!![]})[_0xcfea('0x26')](function(_0x2b43ba){if(_0x2b43ba&&_0x2b43ba[_0xcfea('0x54')]===0x0){return db[_0xcfea('0x29')][_0xcfea('0x4d')]({'name':_0x5131c8['name'],'resourceId':_0x5131c8['id'],'type':_0x2b43ba[_0xcfea('0x2d')],'sectionId':_0x2b43ba['id']},{})[_0xcfea('0x26')](function(){return _0x59ee9b;});}else{return _0x59ee9b;}})[_0xcfea('0x4c')](function(_0x2c2914){logger[_0xcfea('0x2b')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x2c2914);throw _0x2c2914;});}return _0x59ee9b;})[_0xcfea('0x26')](respondWithResult(_0x269b7e,0xc9))[_0xcfea('0x4c')](handleError(_0x269b7e,null));};exports[_0xcfea('0x55')]=function(_0x48e895,_0x32582d){if(_0x48e895[_0xcfea('0x4e')]['id']){delete _0x48e895[_0xcfea('0x4e')]['id'];}return db[_0xcfea('0x31')][_0xcfea('0x4b')]({'where':{'id':_0x48e895[_0xcfea('0x56')]['id']}})[_0xcfea('0x26')](handleEntityNotFound(_0x32582d,null))[_0xcfea('0x26')](saveUpdates(_0x48e895[_0xcfea('0x4e')],null))[_0xcfea('0x26')](respondWithResult(_0x32582d,null))[_0xcfea('0x4c')](handleError(_0x32582d,null));};exports[_0xcfea('0x25')]=function(_0x4bc575,_0x25400b){return db[_0xcfea('0x31')][_0xcfea('0x4b')]({'where':{'id':_0x4bc575[_0xcfea('0x56')]['id']}})[_0xcfea('0x26')](handleEntityNotFound(_0x25400b,null))['then'](removeEntity(_0x25400b,null))['catch'](handleError(_0x25400b,null));};exports[_0xcfea('0x57')]=function(_0x273163,_0x399470){return db[_0xcfea('0x31')]['describe']()[_0xcfea('0x26')](respondWithResult(_0x399470,null))['catch'](handleError(_0x399470,null));};exports[_0xcfea('0x58')]=function(_0x13d9d1,_0x2edd00,_0xd6e7c){var _0xca374e={'raw':!![],'where':{}},_0x35e6e5={},_0x3285ca;return db[_0xcfea('0x31')][_0xcfea('0x59')]({'where':{'id':_0x13d9d1[_0xcfea('0x56')]['id']}})[_0xcfea('0x26')](handleEntityNotFound(_0x2edd00,null))[_0xcfea('0x26')](function(_0xa241e1){if(_0xa241e1){_0x3285ca=_0xa241e1[_0xcfea('0x27')]({'plain':!![]});_0x35e6e5[_0xcfea('0x36')]=_[_0xcfea('0x48')](db['UserSmsQueue'][_0xcfea('0x32')]);_0x35e6e5[_0xcfea('0x37')]=_[_0xcfea('0x48')](_0x13d9d1['query']);_0x35e6e5[_0xcfea('0x38')]=_[_0xcfea('0x5a')](_0x35e6e5[_0xcfea('0x36')],_0x35e6e5[_0xcfea('0x37')]);_0xca374e[_0xcfea('0x3a')]=_[_0xcfea('0x5a')](_0x35e6e5['model'],qs[_0xcfea('0x39')](_0x13d9d1['query'][_0xcfea('0x39')]));_0xca374e[_0xcfea('0x3a')]=_0xca374e['attributes'][_0xcfea('0x49')]?_0xca374e[_0xcfea('0x3a')]:_0x35e6e5[_0xcfea('0x36')];if(!_0x13d9d1[_0xcfea('0x37')][_0xcfea('0x3b')](_0xcfea('0x3c'))){_0xca374e[_0xcfea('0x1f')]=qs[_0xcfea('0x1f')](_0x13d9d1[_0xcfea('0x37')]['limit']);_0xca374e[_0xcfea('0x1d')]=qs['offset'](_0x13d9d1[_0xcfea('0x37')]['offset']);}_0xca374e[_0xcfea('0x3d')]=qs[_0xcfea('0x3e')](_0x13d9d1[_0xcfea('0x37')]['sort']);_0xca374e[_0xcfea('0x3f')]=qs[_0xcfea('0x38')](_[_0xcfea('0x40')](_0x13d9d1[_0xcfea('0x37')],_0x35e6e5[_0xcfea('0x38')]));_0xca374e[_0xcfea('0x3f')][_0xcfea('0x5b')]=_0xa241e1['id'];if(_0x13d9d1['query'][_0xcfea('0x41')]){_0xca374e['where']=_['merge'](_0xca374e[_0xcfea('0x3f')],{'$or':_[_0xcfea('0x30')](_0xca374e[_0xcfea('0x3a')],function(_0x2cf7cd){var _0x28c184={};_0x28c184[_0x2cf7cd]={'$like':'%'+_0x13d9d1[_0xcfea('0x37')][_0xcfea('0x41')]+'%'};return _0x28c184;})});}_0xca374e=_[_0xcfea('0x42')]({},_0xca374e,_0x13d9d1[_0xcfea('0x44')]);return db[_0xcfea('0x5c')][_0xcfea('0x45')](_0xca374e);}})[_0xcfea('0x26')](function(_0x38e2ba){if(_0x38e2ba){return db[_0xcfea('0x5d')][_0xcfea('0x5e')]({'where':{'id':_[_0xcfea('0x30')](_0x38e2ba,'UserId'),'role':_0xcfea('0x5f')},'attributes':['id','name',_0xcfea('0x60'),_0xcfea('0x61'),'createdAt']});}})['then'](function(_0xfc2474){if(_0xfc2474){return{'count':_0xfc2474[_0xcfea('0x20')],'rows':_[_0xcfea('0x30')](_0xfc2474[_0xcfea('0x46')],function(_0x548138){return{'membername':_0x548138[_0xcfea('0x2d')],'UserId':_0x548138['id'],'queue_name':_0x3285ca['name'],'SmsQueueId':_0x3285ca['id'],'interface':util[_0xcfea('0x62')](_0xcfea('0x63'),_0xcfea('0x64'),_0x548138[_0xcfea('0x2d')]),'penalty':0x0,'paused':_0x548138['smsPause'],'createdAt':_0x548138[_0xcfea('0x65')],'updatedAt':_0x548138[_0xcfea('0x61')]};})};}else{return{'count':0x0,'rows':[]};}})[_0xcfea('0x26')](respondWithFilteredResult(_0x2edd00,_0xca374e))['catch'](handleError(_0x2edd00,null));};exports['getTeams']=function(_0x376160,_0x4e3436,_0xd906b2){var _0x35cc79={};var _0x5a0e3a={};var _0x4b9d31;var _0x3c26e6;return db[_0xcfea('0x31')][_0xcfea('0x59')]({'where':{'id':_0x376160[_0xcfea('0x56')]['id']}})[_0xcfea('0x26')](handleEntityNotFound(_0x4e3436,null))[_0xcfea('0x26')](function(_0x24be33){if(_0x24be33){_0x4b9d31=_0x24be33;_0x5a0e3a['model']=_[_0xcfea('0x48')](db['Team']['rawAttributes']);_0x5a0e3a[_0xcfea('0x37')]=_[_0xcfea('0x48')](_0x376160[_0xcfea('0x37')]);_0x5a0e3a[_0xcfea('0x38')]=_[_0xcfea('0x5a')](_0x5a0e3a[_0xcfea('0x36')],_0x5a0e3a[_0xcfea('0x37')]);_0x35cc79[_0xcfea('0x3a')]=_['intersection'](_0x5a0e3a[_0xcfea('0x36')],qs[_0xcfea('0x39')](_0x376160['query'][_0xcfea('0x39')]));_0x35cc79[_0xcfea('0x3a')]=_0x35cc79['attributes']['length']?_0x35cc79[_0xcfea('0x3a')]:_0x5a0e3a[_0xcfea('0x36')];_0x35cc79[_0xcfea('0x3d')]=qs['sort'](_0x376160[_0xcfea('0x37')]['sort']);_0x35cc79['where']=qs['filters'](_[_0xcfea('0x40')](_0x376160[_0xcfea('0x37')],_0x5a0e3a[_0xcfea('0x38')]));if(_0x376160['query'][_0xcfea('0x41')]){_0x35cc79[_0xcfea('0x3f')]=_[_0xcfea('0x42')](_0x35cc79[_0xcfea('0x3f')],{'$or':_[_0xcfea('0x30')](_0x35cc79[_0xcfea('0x3a')],function(_0x1b7057){var _0x568664={};_0x568664[_0x1b7057]={'$like':'%'+_0x376160[_0xcfea('0x37')][_0xcfea('0x41')]+'%'};return _0x568664;})});}_0x35cc79=_['merge']({},_0x35cc79,_0x376160['options']);return _0x4b9d31[_0xcfea('0x66')](_0x35cc79);}})[_0xcfea('0x26')](function(_0x51cace){if(_0x51cace){_0x3c26e6=_0x51cace[_0xcfea('0x49')];if(!_0x376160[_0xcfea('0x37')][_0xcfea('0x3b')](_0xcfea('0x3c'))){_0x35cc79[_0xcfea('0x1f')]=qs['limit'](_0x376160[_0xcfea('0x37')]['limit']);_0x35cc79['offset']=qs[_0xcfea('0x1d')](_0x376160[_0xcfea('0x37')][_0xcfea('0x1d')]);}return _0x4b9d31[_0xcfea('0x66')](_0x35cc79);}})[_0xcfea('0x26')](function(_0x285b74){if(_0x285b74){return _0x285b74?{'count':_0x3c26e6,'rows':_0x285b74}:null;}})[_0xcfea('0x26')](respondWithResult(_0x4e3436,null))['catch'](handleError(_0x4e3436,null));};exports['addTeams']=function(_0x29253e,_0x55c3a0,_0x14f69b){var _0x13645f=_0x29253e['body'][_0xcfea('0x67')];return db[_0xcfea('0x68')][_0xcfea('0x45')]({'where':{'id':_0x13645f},'attributes':['id'],'include':[{'model':db['User'],'as':_0xcfea('0x69'),'attributes':['id',_0xcfea('0x2d'),_0xcfea('0x6a'),_0xcfea('0x6b'),_0xcfea('0x6c')],'raw':!![]}]})[_0xcfea('0x26')](function(_0x4bd421){if(_0x4bd421){var _0x4f68e0=_['flatMap'](_0x4bd421,function(_0x132070){var _0x3c3beb=_0x132070[_0xcfea('0x27')]({'plain':!![]});return _0x3c3beb[_0xcfea('0x69')];});return db[_0xcfea('0x31')][_0xcfea('0x4b')]({'where':{'id':_0x29253e[_0xcfea('0x56')]['id']}})[_0xcfea('0x26')](function(_0x4ae1ec){return db[_0xcfea('0x6d')][_0xcfea('0x6e')](function(_0x1b0b98){return _0x4ae1ec[_0xcfea('0x6f')](_0x13645f,{'transaction':_0x1b0b98})[_0xcfea('0x26')](function(){return BPromise[_0xcfea('0x70')](_0x4f68e0,function(_0xe21b05){return db[_0xcfea('0x5c')][_0xcfea('0x71')]({'where':{'UserId':_0xe21b05['id'],'SmsQueueId':_0x29253e[_0xcfea('0x56')]['id']},'transaction':_0x1b0b98});});})[_0xcfea('0x26')](function(){_0x4f68e0['forEach'](function(_0x339540){socket['emit'](_0xcfea('0x72'),{'UserId':_0x339540['id'],'SmsQueueId':_0x4ae1ec['id']});});});});});}})['then'](respondWithStatusCode(_0x55c3a0,null))[_0xcfea('0x4c')](handleError(_0x55c3a0,null));};exports[_0xcfea('0x73')]=function(_0x447b54,_0x495a64,_0x18dab2){return db[_0xcfea('0x68')][_0xcfea('0x45')]({'where':{'id':_0x447b54[_0xcfea('0x37')]['ids']},'attributes':['id'],'include':[{'model':db[_0xcfea('0x5d')],'as':'Agents','attributes':['id'],'raw':!![]}]})[_0xcfea('0x26')](handleEntityNotFound(_0x495a64,null))[_0xcfea('0x26')](function(_0x463ac5){var _0x398a0f=_[_0xcfea('0x30')](_0x463ac5,'id');var _0x5bffd4=[];var _0x13f89e=[];var _0x38e2f6=squel[_0xcfea('0x74')]();_0x38e2f6[_0xcfea('0x75')](_0xcfea('0x76'))['from'](_0xcfea('0x77'),'tq')['join'](_0xcfea('0x78'),'ut',_0xcfea('0x79'))['where'](_0xcfea('0x7a'),_0x447b54['params']['id']);for(var _0x5ee56c=0x0;_0x5ee56c<_0x463ac5[_0xcfea('0x49')];_0x5ee56c+=0x1){let _0xcb065c=_0x463ac5[_0x5ee56c];for(var _0x55bbdf=0x0;_0x55bbdf<_0xcb065c[_0xcfea('0x69')]['length'];_0x55bbdf+=0x1){let _0x29a26c=_0xcb065c[_0xcfea('0x69')][_0x55bbdf];var _0x295e9e=_0x38e2f6[_0xcfea('0x7b')]();_0x295e9e[_0xcfea('0x3f')](_0xcfea('0x7c'),_0x29a26c['id']);_0x13f89e[_0xcfea('0x7d')](db[_0xcfea('0x6d')][_0xcfea('0x37')](_0x295e9e[_0xcfea('0x7e')](),{'type':db[_0xcfea('0x6d')]['QueryTypes']['SELECT']})[_0xcfea('0x26')](function(_0x423f58){if(_0x423f58['length']===0x1){return _0x29a26c['id'];}else{var _0x43993f=_[_0xcfea('0x7f')](_[_0xcfea('0x30')](_0x423f58,_0xcfea('0x80')),function(_0x49d513){return _[_0xcfea('0x81')](_0x398a0f,_0x49d513);});if(_0x43993f){return _0x29a26c['id'];}}}));}}return BPromise[_0xcfea('0x82')](_0x13f89e)['then'](function(_0x32e09c){_0x5bffd4=_(_0x5bffd4)[_0xcfea('0x83')](_0x32e09c)[_0xcfea('0x84')]()[_0xcfea('0x85')]();return db[_0xcfea('0x31')][_0xcfea('0x4b')]({'where':{'id':_0x447b54[_0xcfea('0x56')]['id']}})['then'](function(_0x500217){return db['sequelize'][_0xcfea('0x6e')](function(_0x36e36f){return _0x500217[_0xcfea('0x73')](_0x447b54[_0xcfea('0x37')][_0xcfea('0x67')],{'transaction':_0x36e36f})[_0xcfea('0x26')](function(){if(!_[_0xcfea('0x86')](_0x5bffd4)){return _0x500217[_0xcfea('0x87')](_0x5bffd4,{'transaction':_0x36e36f});}})['then'](function(){_0x5bffd4[_0xcfea('0x88')](function(_0x3d8dc2){socket[_0xcfea('0x89')](_0xcfea('0x8a'),{'UserId':_0x3d8dc2,'SmsQueueId':_0x500217['id']});});});});});});})['then'](respondWithStatusCode(_0x495a64,null))['catch'](handleError(_0x495a64,null));};exports[_0xcfea('0x8b')]=function(_0x5e6bbd,_0x5520ce,_0x7d89b0){return db['SmsQueue']['find']({'where':{'id':_0x5e6bbd[_0xcfea('0x56')]['id']}})[_0xcfea('0x26')](handleEntityNotFound(_0x5520ce,null))[_0xcfea('0x26')](function(_0x33ed3e){if(_0x33ed3e){return _0x33ed3e[_0xcfea('0x8b')](_0x5e6bbd[_0xcfea('0x4e')]['ids'],_[_0xcfea('0x8c')](_0x5e6bbd[_0xcfea('0x4e')],[_0xcfea('0x67'),'id'])||{})[_0xcfea('0x8d')](function(_0x494dd9){for(var _0x428b49=0x0;_0x428b49<_0x5e6bbd['body'][_0xcfea('0x67')][_0xcfea('0x49')];_0x428b49+=0x1){socket[_0xcfea('0x89')](_0xcfea('0x72'),{'UserId':_0x5e6bbd[_0xcfea('0x4e')][_0xcfea('0x67')][_0x428b49],'SmsQueueId':_0x5e6bbd[_0xcfea('0x56')]['id']});}return _0x494dd9;});}})[_0xcfea('0x26')](respondWithResult(_0x5520ce,null))[_0xcfea('0x4c')](handleError(_0x5520ce,null));};exports['removeAgents']=function(_0x55459b,_0x388692,_0x2039c9){return db[_0xcfea('0x31')][_0xcfea('0x4b')]({'where':{'id':_0x55459b[_0xcfea('0x56')]['id']}})['then'](handleEntityNotFound(_0x388692,null))[_0xcfea('0x26')](function(_0xc9f3f3){if(_0xc9f3f3){return _0xc9f3f3[_0xcfea('0x87')](_0x55459b['query'][_0xcfea('0x67')])[_0xcfea('0x26')](function(){if(_[_0xcfea('0x8e')](_0x55459b[_0xcfea('0x37')][_0xcfea('0x67')])){for(var _0x20b0cf=0x0;_0x20b0cf<_0x55459b[_0xcfea('0x37')][_0xcfea('0x67')][_0xcfea('0x49')];_0x20b0cf+=0x1){socket[_0xcfea('0x89')](_0xcfea('0x8a'),{'UserId':Number(_0x55459b[_0xcfea('0x37')][_0xcfea('0x67')][_0x20b0cf]),'SmsQueueId':Number(_0x55459b['params']['id'])});}}else{socket['emit'](_0xcfea('0x8a'),{'UserId':Number(_0x55459b[_0xcfea('0x37')][_0xcfea('0x67')]),'SmsQueueId':Number(_0x55459b[_0xcfea('0x56')]['id'])});}});}})[_0xcfea('0x26')](respondWithStatusCode(_0x388692,null))[_0xcfea('0x4c')](handleError(_0x388692,null));};exports[_0xcfea('0x8f')]=function(_0xbff46f,_0x42bef3,_0x2d16c8){var _0x422c61={};var _0x4e80c0={};var _0x2fe64e;var _0xc1b177;return db[_0xcfea('0x31')][_0xcfea('0x59')]({'where':{'id':_0xbff46f['params']['id']}})[_0xcfea('0x26')](handleEntityNotFound(_0x42bef3,null))['then'](function(_0x144670){if(_0x144670){_0x2fe64e=_0x144670;_0x4e80c0[_0xcfea('0x36')]=_[_0xcfea('0x48')](db['User'][_0xcfea('0x32')]);_0x4e80c0[_0xcfea('0x37')]=_[_0xcfea('0x48')](_0xbff46f[_0xcfea('0x37')]);_0x4e80c0[_0xcfea('0x38')]=_[_0xcfea('0x5a')](_0x4e80c0[_0xcfea('0x36')],_0x4e80c0[_0xcfea('0x37')]);_0x422c61[_0xcfea('0x3a')]=_['intersection'](_0x4e80c0['model'],qs[_0xcfea('0x39')](_0xbff46f[_0xcfea('0x37')][_0xcfea('0x39')]));_0x422c61[_0xcfea('0x3a')]=_0x422c61[_0xcfea('0x3a')][_0xcfea('0x49')]?_0x422c61[_0xcfea('0x3a')]:_0x4e80c0['model'];_0x422c61['order']=qs[_0xcfea('0x3e')](_0xbff46f[_0xcfea('0x37')][_0xcfea('0x3e')]);_0x422c61['where']=qs[_0xcfea('0x38')](_[_0xcfea('0x40')](_0xbff46f[_0xcfea('0x37')],_0x4e80c0['filters']));if(_0xbff46f[_0xcfea('0x37')][_0xcfea('0x41')]){_0x422c61['where']=_['merge'](_0x422c61[_0xcfea('0x3f')],{'$or':_[_0xcfea('0x30')](_0x422c61[_0xcfea('0x3a')],function(_0x2bc630){var _0x5add22={};_0x5add22[_0x2bc630]={'$like':'%'+_0xbff46f[_0xcfea('0x37')][_0xcfea('0x41')]+'%'};return _0x5add22;})});}_0x422c61=_[_0xcfea('0x42')]({},_0x422c61,_0xbff46f['options']);return _0x2fe64e['getAgents'](_0x422c61);}})[_0xcfea('0x26')](function(_0x304853){if(_0x304853){_0xc1b177=_0x304853[_0xcfea('0x49')];if(!_0xbff46f[_0xcfea('0x37')][_0xcfea('0x3b')](_0xcfea('0x3c'))){_0x422c61['limit']=qs[_0xcfea('0x1f')](_0xbff46f[_0xcfea('0x37')][_0xcfea('0x1f')]);_0x422c61['offset']=qs[_0xcfea('0x1d')](_0xbff46f[_0xcfea('0x37')]['offset']);}return _0x2fe64e[_0xcfea('0x8f')](_0x422c61);}})['then'](function(_0x3bd5a1){if(_0x3bd5a1){return _0x3bd5a1?{'count':_0xc1b177,'rows':_0x3bd5a1}:null;}})[_0xcfea('0x26')](respondWithResult(_0x42bef3,null))['catch'](handleError(_0x42bef3,null));}; \ No newline at end of file diff --git a/server/api/smsQueue/smsQueue.events.js b/server/api/smsQueue/smsQueue.events.js index dee464e..2f32db1 100644 --- a/server/api/smsQueue/smsQueue.events.js +++ b/server/api/smsQueue/smsQueue.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7e5f=['SmsQueue','setMaxListeners','save','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb'];(function(_0x411c7b,_0xa09bb6){var _0x51b4bb=function(_0x2f1af1){while(--_0x2f1af1){_0x411c7b['push'](_0x411c7b['shift']());}};_0x51b4bb(++_0xa09bb6);}(_0x7e5f,0x18e));var _0xf7e5=function(_0x4d1ee9,_0x394a78){_0x4d1ee9=_0x4d1ee9-0x0;var _0x9a5456=_0x7e5f[_0x4d1ee9];return _0x9a5456;};'use strict';var EventEmitter=require(_0xf7e5('0x0'));var SmsQueue=require(_0xf7e5('0x1'))['db'][_0xf7e5('0x2')];var SmsQueueEvents=new EventEmitter();SmsQueueEvents[_0xf7e5('0x3')](0x0);var events={'afterCreate':_0xf7e5('0x4'),'afterUpdate':'update','afterDestroy':_0xf7e5('0x5')};function emitEvent(_0x5813de){return function(_0x30f688,_0x2866e1,_0x2d848e){SmsQueueEvents[_0xf7e5('0x6')](_0x5813de+':'+_0x30f688['id'],_0x30f688);SmsQueueEvents[_0xf7e5('0x6')](_0x5813de,_0x30f688);_0x2d848e(null);};}for(var e in events){if(events[_0xf7e5('0x7')](e)){var event=events[e];SmsQueue[_0xf7e5('0x8')](e,emitEvent(event));}}module[_0xf7e5('0x9')]=SmsQueueEvents; \ No newline at end of file +var _0x5160=['remove','emit','hasOwnProperty','hook','events','../../mysqldb','SmsQueue','setMaxListeners','save','update'];(function(_0x35e7f5,_0x2c52b8){var _0x290a15=function(_0x4df64b){while(--_0x4df64b){_0x35e7f5['push'](_0x35e7f5['shift']());}};_0x290a15(++_0x2c52b8);}(_0x5160,0x194));var _0x0516=function(_0x30456a,_0x41c87c){_0x30456a=_0x30456a-0x0;var _0x130236=_0x5160[_0x30456a];return _0x130236;};'use strict';var EventEmitter=require(_0x0516('0x0'));var SmsQueue=require(_0x0516('0x1'))['db'][_0x0516('0x2')];var SmsQueueEvents=new EventEmitter();SmsQueueEvents[_0x0516('0x3')](0x0);var events={'afterCreate':_0x0516('0x4'),'afterUpdate':_0x0516('0x5'),'afterDestroy':_0x0516('0x6')};function emitEvent(_0x41dca4){return function(_0x2e83d6,_0x2fffce,_0x482e88){SmsQueueEvents[_0x0516('0x7')](_0x41dca4+':'+_0x2e83d6['id'],_0x2e83d6);SmsQueueEvents[_0x0516('0x7')](_0x41dca4,_0x2e83d6);_0x482e88(null);};}for(var e in events){if(events[_0x0516('0x8')](e)){var event=events[e];SmsQueue[_0x0516('0x9')](e,emitEvent(event));}}module['exports']=SmsQueueEvents; \ No newline at end of file diff --git a/server/api/smsQueue/smsQueue.model.js b/server/api/smsQueue/smsQueue.model.js index 7884d38..9d21e30 100644 --- a/server/api/smsQueue/smsQueue.model.js +++ b/server/api/smsQueue/smsQueue.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe18b=['api','moment','bluebird','request-promise','rimraf','exports','define','SmsQueue','sms_queues','lodash','util','../../config/logger'];(function(_0xfae23b,_0x2be4ba){var _0x200640=function(_0x4ae258){while(--_0x4ae258){_0xfae23b['push'](_0xfae23b['shift']());}};_0x200640(++_0x2be4ba);}(_0xe18b,0xd5));var _0xbe18=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xe18b[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0xbe18('0x0'));var util=require(_0xbe18('0x1'));var logger=require(_0xbe18('0x2'))(_0xbe18('0x3'));var moment=require(_0xbe18('0x4'));var BPromise=require(_0xbe18('0x5'));var rp=require(_0xbe18('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0xbe18('0x7'));var config=require('../../config/environment');var attributes=require('./smsQueue.attributes');module[_0xbe18('0x8')]=function(_0x4bc909,_0x1ea538){return _0x4bc909[_0xbe18('0x9')](_0xbe18('0xa'),attributes,{'tableName':_0xbe18('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x9c73=['lodash','util','../../config/logger','api','moment','request-promise','path','rimraf','exports','SmsQueue','sms_queues'];(function(_0x4bed75,_0x211cc7){var _0x2dd8e8=function(_0x6369c7){while(--_0x6369c7){_0x4bed75['push'](_0x4bed75['shift']());}};_0x2dd8e8(++_0x211cc7);}(_0x9c73,0x16b));var _0x39c7=function(_0x51a5c9,_0x10ee43){_0x51a5c9=_0x51a5c9-0x0;var _0x57f54d=_0x9c73[_0x51a5c9];return _0x57f54d;};'use strict';var _=require(_0x39c7('0x0'));var util=require(_0x39c7('0x1'));var logger=require(_0x39c7('0x2'))(_0x39c7('0x3'));var moment=require(_0x39c7('0x4'));var BPromise=require('bluebird');var rp=require(_0x39c7('0x5'));var fs=require('fs');var path=require(_0x39c7('0x6'));var rimraf=require(_0x39c7('0x7'));var config=require('../../config/environment');var attributes=require('./smsQueue.attributes');module[_0x39c7('0x8')]=function(_0x41915c,_0x3567aa){return _0x41915c['define'](_0x39c7('0x9'),attributes,{'tableName':_0x39c7('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/smsQueue/smsQueue.rpc.js b/server/api/smsQueue/smsQueue.rpc.js index 7ad8c74..f9170d9 100644 --- a/server/api/smsQueue/smsQueue.rpc.js +++ b/server/api/smsQueue/smsQueue.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x104b=['attributes','ShowSmsQueue','find','info','lodash','moment','bluebird','../../mysqldb','../../config/utils','rpc','../../config/environment','client','http','redis','defaults','./smsQueue.socket','request','then','debug','request\x20sent','stringify','error','code','message','SmsQueue,\x20%s,\x20%s','result','catch','GetSmsQueue','SmsQueue','findAll','options','raw','where','limit','include','map','model'];(function(_0x1fbc66,_0x941487){var _0x1abb72=function(_0x520024){while(--_0x520024){_0x1fbc66['push'](_0x1fbc66['shift']());}};_0x1abb72(++_0x941487);}(_0x104b,0x98));var _0xb104=function(_0x2cb12a,_0x2a6eea){_0x2cb12a=_0x2cb12a-0x0;var _0x41918e=_0x104b[_0x2cb12a];return _0x41918e;};'use strict';var _=require(_0xb104('0x0'));var util=require('util');var moment=require(_0xb104('0x1'));var BPromise=require(_0xb104('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xb104('0x3'))['db'];var utils=require(_0xb104('0x4'));var logger=require('../../config/logger')(_0xb104('0x5'));var config=require(_0xb104('0x6'));var jayson=require('jayson/promise');var client=jayson[_0xb104('0x7')][_0xb104('0x8')]({'port':0x232a});config[_0xb104('0x9')]=_[_0xb104('0xa')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xb104('0x9')]));require(_0xb104('0xb'))['register'](socket);function respondWithRpcPromise(_0x357a9b,_0x2aa681,_0x57ece4){return new BPromise(function(_0x3ea700,_0x4f7fde){return client[_0xb104('0xc')](_0x357a9b,_0x57ece4)[_0xb104('0xd')](function(_0x1eb556){logger['info']('SmsQueue,\x20%s,\x20%s',_0x2aa681,'request\x20sent');logger[_0xb104('0xe')]('SmsQueue,\x20%s,\x20%s,\x20%s',_0x2aa681,_0xb104('0xf'),JSON[_0xb104('0x10')](_0x1eb556));if(_0x1eb556[_0xb104('0x11')]){if(_0x1eb556[_0xb104('0x11')][_0xb104('0x12')]===0x1f4){logger[_0xb104('0x11')]('SmsQueue,\x20%s,\x20%s',_0x2aa681,_0x1eb556['error']['message']);return _0x4f7fde(_0x1eb556[_0xb104('0x11')][_0xb104('0x13')]);}logger[_0xb104('0x11')]('SmsQueue,\x20%s,\x20%s',_0x2aa681,_0x1eb556['error'][_0xb104('0x13')]);return _0x3ea700(_0x1eb556[_0xb104('0x11')][_0xb104('0x13')]);}else{logger['info'](_0xb104('0x14'),_0x2aa681,_0xb104('0xf'));_0x3ea700(_0x1eb556[_0xb104('0x15')][_0xb104('0x13')]);}})[_0xb104('0x16')](function(_0x1a1f0f){logger['error'](_0xb104('0x14'),_0x2aa681,_0x1a1f0f);_0x4f7fde(_0x1a1f0f);});});}exports[_0xb104('0x17')]=function(_0x271ecc){var _0x8c7adc=this;return new Promise(function(_0x872d2f,_0x32ff78){return db[_0xb104('0x18')][_0xb104('0x19')]({'raw':_0x271ecc[_0xb104('0x1a')]?_0x271ecc[_0xb104('0x1a')][_0xb104('0x1b')]===undefined?!![]:![]:!![],'where':_0x271ecc[_0xb104('0x1a')]?_0x271ecc[_0xb104('0x1a')][_0xb104('0x1c')]||null:null,'attributes':_0x271ecc[_0xb104('0x1a')]?_0x271ecc[_0xb104('0x1a')]['attributes']||null:null,'limit':_0x271ecc[_0xb104('0x1a')]?_0x271ecc[_0xb104('0x1a')][_0xb104('0x1d')]||null:null,'include':_0x271ecc[_0xb104('0x1a')]?_0x271ecc['options'][_0xb104('0x1e')]?_[_0xb104('0x1f')](_0x271ecc[_0xb104('0x1a')]['include'],function(_0x398c85){return{'model':db[_0x398c85[_0xb104('0x20')]],'as':_0x398c85['as'],'attributes':_0x398c85['attributes'],'include':_0x398c85[_0xb104('0x1e')]?_[_0xb104('0x1f')](_0x398c85[_0xb104('0x1e')],function(_0x2ff17d){return{'model':db[_0x2ff17d[_0xb104('0x20')]],'as':_0x2ff17d['as'],'attributes':_0x2ff17d[_0xb104('0x21')],'include':_0x2ff17d[_0xb104('0x1e')]?_[_0xb104('0x1f')](_0x2ff17d[_0xb104('0x1e')],function(_0x3c8270){return{'model':db[_0x3c8270[_0xb104('0x20')]],'as':_0x3c8270['as'],'attributes':_0x3c8270[_0xb104('0x21')]};}):[]};}):[]};}):[]:[]})[_0xb104('0xd')](function(_0x3eff72){logger['info'](_0xb104('0x17'),_0x271ecc);logger[_0xb104('0xe')]('GetSmsQueue',_0x271ecc,JSON[_0xb104('0x10')](_0x3eff72));_0x872d2f(_0x3eff72);})[_0xb104('0x16')](function(_0x50c7bc){logger[_0xb104('0x11')](_0xb104('0x17'),_0x50c7bc[_0xb104('0x13')],_0x271ecc);_0x32ff78(_0x8c7adc['error'](0x1f4,_0x50c7bc[_0xb104('0x13')]));});});};exports[_0xb104('0x22')]=function(_0x1704a1){var _0x118b95=this;return new Promise(function(_0x4e426c,_0x5e0299){return db[_0xb104('0x18')][_0xb104('0x23')]({'raw':_0x1704a1[_0xb104('0x1a')]?_0x1704a1[_0xb104('0x1a')]['raw']===undefined?!![]:![]:!![],'where':_0x1704a1[_0xb104('0x1a')]?_0x1704a1[_0xb104('0x1a')][_0xb104('0x1c')]||null:null,'attributes':_0x1704a1[_0xb104('0x1a')]?_0x1704a1['options'][_0xb104('0x21')]||null:null,'include':_0x1704a1[_0xb104('0x1a')]?_0x1704a1['options'][_0xb104('0x1e')]?_[_0xb104('0x1f')](_0x1704a1[_0xb104('0x1a')]['include'],function(_0x276b99){return{'model':db[_0x276b99[_0xb104('0x20')]],'as':_0x276b99['as'],'attributes':_0x276b99[_0xb104('0x21')],'include':_0x276b99[_0xb104('0x1e')]?_[_0xb104('0x1f')](_0x276b99[_0xb104('0x1e')],function(_0x3fa9ae){return{'model':db[_0x3fa9ae[_0xb104('0x20')]],'as':_0x3fa9ae['as'],'attributes':_0x3fa9ae[_0xb104('0x21')],'include':_0x3fa9ae['include']?_['map'](_0x3fa9ae[_0xb104('0x1e')],function(_0x3ab939){return{'model':db[_0x3ab939[_0xb104('0x20')]],'as':_0x3ab939['as'],'attributes':_0x3ab939[_0xb104('0x21')]};}):[]};}):[]};}):[]:[]})[_0xb104('0xd')](function(_0x7c7c99){logger[_0xb104('0x24')](_0xb104('0x22'),_0x1704a1);logger[_0xb104('0xe')](_0xb104('0x22'),_0x1704a1,JSON[_0xb104('0x10')](_0x7c7c99));_0x4e426c(_0x7c7c99);})[_0xb104('0x16')](function(_0x44da31){logger['error'](_0xb104('0x22'),_0x44da31[_0xb104('0x13')],_0x1704a1);_0x5e0299(_0x118b95[_0xb104('0x11')](0x1f4,_0x44da31[_0xb104('0x13')]));});});}; \ No newline at end of file +var _0xc524=['limit','include','map','model','ShowSmsQueue','find','raw','then','util','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise','http','redis','defaults','localhost','socket.io-emitter','./smsQueue.socket','register','request','SmsQueue,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','info','result','catch','GetSmsQueue','SmsQueue','findAll','options','where','attributes'];(function(_0x808e59,_0x136d89){var _0x2d5af2=function(_0x22fba5){while(--_0x22fba5){_0x808e59['push'](_0x808e59['shift']());}};_0x2d5af2(++_0x136d89);}(_0xc524,0x140));var _0x4c52=function(_0xdb0b0d,_0x372008){_0xdb0b0d=_0xdb0b0d-0x0;var _0x3575ff=_0xc524[_0xdb0b0d];return _0x3575ff;};'use strict';var _=require('lodash');var util=require(_0x4c52('0x0'));var moment=require('moment');var BPromise=require(_0x4c52('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x4c52('0x2'));var db=require(_0x4c52('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0x4c52('0x4'))(_0x4c52('0x5'));var config=require('../../config/environment');var jayson=require(_0x4c52('0x6'));var client=jayson['client'][_0x4c52('0x7')]({'port':0x232a});config[_0x4c52('0x8')]=_[_0x4c52('0x9')](config[_0x4c52('0x8')],{'host':_0x4c52('0xa'),'port':0x18eb});var socket=require(_0x4c52('0xb'))(new Redis(config['redis']));require(_0x4c52('0xc'))[_0x4c52('0xd')](socket);function respondWithRpcPromise(_0x1510f5,_0x3ea4f7,_0x52dde7){return new BPromise(function(_0x7f5ba5,_0x41ac6d){return client[_0x4c52('0xe')](_0x1510f5,_0x52dde7)['then'](function(_0x51a9cb){logger['info'](_0x4c52('0xf'),_0x3ea4f7,_0x4c52('0x10'));logger[_0x4c52('0x11')]('SmsQueue,\x20%s,\x20%s,\x20%s',_0x3ea4f7,_0x4c52('0x10'),JSON[_0x4c52('0x12')](_0x51a9cb));if(_0x51a9cb[_0x4c52('0x13')]){if(_0x51a9cb[_0x4c52('0x13')][_0x4c52('0x14')]===0x1f4){logger[_0x4c52('0x13')](_0x4c52('0xf'),_0x3ea4f7,_0x51a9cb['error'][_0x4c52('0x15')]);return _0x41ac6d(_0x51a9cb[_0x4c52('0x13')][_0x4c52('0x15')]);}logger[_0x4c52('0x13')](_0x4c52('0xf'),_0x3ea4f7,_0x51a9cb['error'][_0x4c52('0x15')]);return _0x7f5ba5(_0x51a9cb[_0x4c52('0x13')][_0x4c52('0x15')]);}else{logger[_0x4c52('0x16')](_0x4c52('0xf'),_0x3ea4f7,_0x4c52('0x10'));_0x7f5ba5(_0x51a9cb[_0x4c52('0x17')][_0x4c52('0x15')]);}})[_0x4c52('0x18')](function(_0x42b270){logger[_0x4c52('0x13')]('SmsQueue,\x20%s,\x20%s',_0x3ea4f7,_0x42b270);_0x41ac6d(_0x42b270);});});}exports[_0x4c52('0x19')]=function(_0x18dd0c){var _0x47c373=this;return new Promise(function(_0x284ab9,_0x4fb603){return db[_0x4c52('0x1a')][_0x4c52('0x1b')]({'raw':_0x18dd0c[_0x4c52('0x1c')]?_0x18dd0c['options']['raw']===undefined?!![]:![]:!![],'where':_0x18dd0c[_0x4c52('0x1c')]?_0x18dd0c[_0x4c52('0x1c')][_0x4c52('0x1d')]||null:null,'attributes':_0x18dd0c['options']?_0x18dd0c[_0x4c52('0x1c')][_0x4c52('0x1e')]||null:null,'limit':_0x18dd0c[_0x4c52('0x1c')]?_0x18dd0c['options'][_0x4c52('0x1f')]||null:null,'include':_0x18dd0c[_0x4c52('0x1c')]?_0x18dd0c[_0x4c52('0x1c')][_0x4c52('0x20')]?_[_0x4c52('0x21')](_0x18dd0c[_0x4c52('0x1c')][_0x4c52('0x20')],function(_0x903c29){return{'model':db[_0x903c29[_0x4c52('0x22')]],'as':_0x903c29['as'],'attributes':_0x903c29[_0x4c52('0x1e')],'include':_0x903c29[_0x4c52('0x20')]?_[_0x4c52('0x21')](_0x903c29[_0x4c52('0x20')],function(_0x30089a){return{'model':db[_0x30089a[_0x4c52('0x22')]],'as':_0x30089a['as'],'attributes':_0x30089a[_0x4c52('0x1e')],'include':_0x30089a[_0x4c52('0x20')]?_[_0x4c52('0x21')](_0x30089a[_0x4c52('0x20')],function(_0x117949){return{'model':db[_0x117949[_0x4c52('0x22')]],'as':_0x117949['as'],'attributes':_0x117949[_0x4c52('0x1e')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x2a9fac){logger[_0x4c52('0x16')]('GetSmsQueue',_0x18dd0c);logger[_0x4c52('0x11')]('GetSmsQueue',_0x18dd0c,JSON[_0x4c52('0x12')](_0x2a9fac));_0x284ab9(_0x2a9fac);})[_0x4c52('0x18')](function(_0x3ba091){logger['error'](_0x4c52('0x19'),_0x3ba091[_0x4c52('0x15')],_0x18dd0c);_0x4fb603(_0x47c373[_0x4c52('0x13')](0x1f4,_0x3ba091[_0x4c52('0x15')]));});});};exports[_0x4c52('0x23')]=function(_0x44602d){var _0x3611f1=this;return new Promise(function(_0x1a5d64,_0x125fc9){return db[_0x4c52('0x1a')][_0x4c52('0x24')]({'raw':_0x44602d[_0x4c52('0x1c')]?_0x44602d[_0x4c52('0x1c')][_0x4c52('0x25')]===undefined?!![]:![]:!![],'where':_0x44602d[_0x4c52('0x1c')]?_0x44602d[_0x4c52('0x1c')][_0x4c52('0x1d')]||null:null,'attributes':_0x44602d[_0x4c52('0x1c')]?_0x44602d[_0x4c52('0x1c')][_0x4c52('0x1e')]||null:null,'include':_0x44602d[_0x4c52('0x1c')]?_0x44602d[_0x4c52('0x1c')][_0x4c52('0x20')]?_['map'](_0x44602d['options'][_0x4c52('0x20')],function(_0x165fad){return{'model':db[_0x165fad['model']],'as':_0x165fad['as'],'attributes':_0x165fad[_0x4c52('0x1e')],'include':_0x165fad[_0x4c52('0x20')]?_[_0x4c52('0x21')](_0x165fad[_0x4c52('0x20')],function(_0x24e613){return{'model':db[_0x24e613['model']],'as':_0x24e613['as'],'attributes':_0x24e613['attributes'],'include':_0x24e613['include']?_[_0x4c52('0x21')](_0x24e613[_0x4c52('0x20')],function(_0x780946){return{'model':db[_0x780946[_0x4c52('0x22')]],'as':_0x780946['as'],'attributes':_0x780946[_0x4c52('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x4c52('0x26')](function(_0xd87af2){logger[_0x4c52('0x16')](_0x4c52('0x23'),_0x44602d);logger['debug'](_0x4c52('0x23'),_0x44602d,JSON[_0x4c52('0x12')](_0xd87af2));_0x1a5d64(_0xd87af2);})[_0x4c52('0x18')](function(_0x4d041a){logger[_0x4c52('0x13')](_0x4c52('0x23'),_0x4d041a[_0x4c52('0x15')],_0x44602d);_0x125fc9(_0x3611f1[_0x4c52('0x13')](0x1f4,_0x4d041a['message']));});});}; \ No newline at end of file diff --git a/server/api/smsQueue/smsQueue.socket.js b/server/api/smsQueue/smsQueue.socket.js index 673299f..8421357 100644 --- a/server/api/smsQueue/smsQueue.socket.js +++ b/server/api/smsQueue/smsQueue.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe6f7=['save','update','emit','removeListener','register','length','smsQueue:','./smsQueue.events'];(function(_0x36c0d5,_0x5c0ba5){var _0x45bfb4=function(_0x3c89ca){while(--_0x3c89ca){_0x36c0d5['push'](_0x36c0d5['shift']());}};_0x45bfb4(++_0x5c0ba5);}(_0xe6f7,0x97));var _0x7e6f=function(_0x43dc7e,_0x49a390){_0x43dc7e=_0x43dc7e-0x0;var _0x21e12d=_0xe6f7[_0x43dc7e];return _0x21e12d;};'use strict';var SmsQueueEvents=require(_0x7e6f('0x0'));var events=[_0x7e6f('0x1'),'remove',_0x7e6f('0x2')];function createListener(_0x448a9b,_0x470eb5){return function(_0x49b9b9){_0x470eb5[_0x7e6f('0x3')](_0x448a9b,_0x49b9b9);};}function removeListener(_0x460a5e,_0x38c3cd){return function(){SmsQueueEvents[_0x7e6f('0x4')](_0x460a5e,_0x38c3cd);};}exports[_0x7e6f('0x5')]=function(_0x27d9df){for(var _0x42ebd9=0x0,_0x20cbdd=events[_0x7e6f('0x6')];_0x42ebd9<_0x20cbdd;_0x42ebd9++){var _0x19032a=events[_0x42ebd9];var _0x535450=createListener(_0x7e6f('0x7')+_0x19032a,_0x27d9df);SmsQueueEvents['on'](_0x19032a,_0x535450);}}; \ No newline at end of file +var _0xca17=['update','emit','register','length','smsQueue:','./smsQueue.events','save'];(function(_0x138adb,_0x193fee){var _0x1b27f2=function(_0x5e97a2){while(--_0x5e97a2){_0x138adb['push'](_0x138adb['shift']());}};_0x1b27f2(++_0x193fee);}(_0xca17,0x163));var _0x7ca1=function(_0x132889,_0x2207a8){_0x132889=_0x132889-0x0;var _0xd93752=_0xca17[_0x132889];return _0xd93752;};'use strict';var SmsQueueEvents=require(_0x7ca1('0x0'));var events=[_0x7ca1('0x1'),'remove',_0x7ca1('0x2')];function createListener(_0x1f21bb,_0x2e3c67){return function(_0xd15556){_0x2e3c67[_0x7ca1('0x3')](_0x1f21bb,_0xd15556);};}function removeListener(_0x409a13,_0x3f847a){return function(){SmsQueueEvents['removeListener'](_0x409a13,_0x3f847a);};}exports[_0x7ca1('0x4')]=function(_0x12359d){for(var _0x4fb471=0x0,_0x566c42=events[_0x7ca1('0x5')];_0x4fb471<_0x566c42;_0x4fb471++){var _0x5acdff=events[_0x4fb471];var _0x4e0f25=createListener(_0x7ca1('0x6')+_0x5acdff,_0x12359d);SmsQueueEvents['on'](_0x5acdff,_0x4e0f25);}}; \ No newline at end of file diff --git a/server/api/smsQueueReport/index.js b/server/api/smsQueueReport/index.js index 9562387..55bd19e 100644 --- a/server/api/smsQueueReport/index.js +++ b/server/api/smsQueueReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfcfc=['express','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/describe','/:id','show','create','put','update','delete','destroy','exports','util','path','connect-timeout'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xfcfc,0xf9));var _0xcfcf=function(_0x1f8905,_0x37c1cf){_0x1f8905=_0x1f8905-0x0;var _0x45a874=_0xfcfc[_0x1f8905];return _0x45a874;};'use strict';var multer=require('multer');var util=require(_0xcfcf('0x0'));var path=require(_0xcfcf('0x1'));var timeout=require(_0xcfcf('0x2'));var express=require(_0xcfcf('0x3'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0xcfcf('0x4'));var config=require(_0xcfcf('0x5'));var controller=require('./smsQueueReport.controller');router[_0xcfcf('0x6')]('/',auth[_0xcfcf('0x7')](),controller[_0xcfcf('0x8')]);router[_0xcfcf('0x6')](_0xcfcf('0x9'),auth[_0xcfcf('0x7')](),controller['describe']);router[_0xcfcf('0x6')](_0xcfcf('0xa'),auth[_0xcfcf('0x7')](),controller[_0xcfcf('0xb')]);router['post']('/',auth['isAuthenticated'](),controller[_0xcfcf('0xc')]);router[_0xcfcf('0xd')]('/:id',auth[_0xcfcf('0x7')](),controller[_0xcfcf('0xe')]);router[_0xcfcf('0xf')]('/:id',auth[_0xcfcf('0x7')](),controller[_0xcfcf('0x10')]);module[_0xcfcf('0x11')]=router; \ No newline at end of file +var _0xe74d=['path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','./smsQueueReport.controller','get','isAuthenticated','index','/describe','show','post','create','update','exports','multer','util'];(function(_0x25171a,_0x17dbba){var _0x149349=function(_0x1eca89){while(--_0x1eca89){_0x25171a['push'](_0x25171a['shift']());}};_0x149349(++_0x17dbba);}(_0xe74d,0x1a0));var _0xde74=function(_0x4f0057,_0x23c77a){_0x4f0057=_0x4f0057-0x0;var _0x45e03a=_0xe74d[_0x4f0057];return _0x45e03a;};'use strict';var multer=require(_0xde74('0x0'));var util=require(_0xde74('0x1'));var path=require(_0xde74('0x2'));var timeout=require(_0xde74('0x3'));var express=require(_0xde74('0x4'));var router=express[_0xde74('0x5')]();var fs_extra=require(_0xde74('0x6'));var auth=require(_0xde74('0x7'));var interaction=require('../../components/interaction/service');var config=require(_0xde74('0x8'));var controller=require(_0xde74('0x9'));router[_0xde74('0xa')]('/',auth[_0xde74('0xb')](),controller[_0xde74('0xc')]);router['get'](_0xde74('0xd'),auth[_0xde74('0xb')](),controller['describe']);router['get']('/:id',auth['isAuthenticated'](),controller[_0xde74('0xe')]);router[_0xde74('0xf')]('/',auth['isAuthenticated'](),controller[_0xde74('0x10')]);router['put']('/:id',auth[_0xde74('0xb')](),controller[_0xde74('0x11')]);router['delete']('/:id',auth['isAuthenticated'](),controller['destroy']);module[_0xde74('0x12')]=router; \ No newline at end of file diff --git a/server/api/smsQueueReport/smsQueueReport.attributes.js b/server/api/smsQueueReport/smsQueueReport.attributes.js index 651b6ba..fc74485 100644 --- a/server/api/smsQueueReport/smsQueueReport.attributes.js +++ b/server/api/smsQueueReport/smsQueueReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf6cd=['DATE','moment','sequelize','STRING'];(function(_0x1c5a59,_0x449d4c){var _0xcc6464=function(_0x5b2fe6){while(--_0x5b2fe6){_0x1c5a59['push'](_0x1c5a59['shift']());}};_0xcc6464(++_0x449d4c);}(_0xf6cd,0x109));var _0xdf6c=function(_0x3c3d59,_0x369b04){_0x3c3d59=_0x3c3d59-0x0;var _0x25d467=_0xf6cd[_0x3c3d59];return _0x25d467;};'use strict';var moment=require(_0xdf6c('0x0'));var Sequelize=require(_0xdf6c('0x1'));module['exports']={'uniqueid':{'type':Sequelize[_0xdf6c('0x2')],'allowNull':![]},'from':{'type':Sequelize[_0xdf6c('0x2')]},'joinAt':{'type':Sequelize[_0xdf6c('0x3')]},'leaveAt':{'type':Sequelize[_0xdf6c('0x3')]},'acceptAt':{'type':Sequelize[_0xdf6c('0x3')]},'exitAt':{'type':Sequelize[_0xdf6c('0x3')]},'reason':{'type':Sequelize[_0xdf6c('0x2')]}}; \ No newline at end of file +var _0x0549=['DATE','moment','sequelize','exports','STRING'];(function(_0x52845c,_0x112881){var _0xa1206f=function(_0x51bb76){while(--_0x51bb76){_0x52845c['push'](_0x52845c['shift']());}};_0xa1206f(++_0x112881);}(_0x0549,0x1a5));var _0x9054=function(_0x22db64,_0x1263d2){_0x22db64=_0x22db64-0x0;var _0x5cceaf=_0x0549[_0x22db64];return _0x5cceaf;};'use strict';var moment=require(_0x9054('0x0'));var Sequelize=require(_0x9054('0x1'));module[_0x9054('0x2')]={'uniqueid':{'type':Sequelize['STRING'],'allowNull':![]},'from':{'type':Sequelize[_0x9054('0x3')]},'joinAt':{'type':Sequelize['DATE']},'leaveAt':{'type':Sequelize[_0x9054('0x4')]},'acceptAt':{'type':Sequelize['DATE']},'exitAt':{'type':Sequelize[_0x9054('0x4')]},'reason':{'type':Sequelize['STRING']}}; \ No newline at end of file diff --git a/server/api/smsQueueReport/smsQueueReport.controller.js b/server/api/smsQueueReport/smsQueueReport.controller.js index 92e23da..76d9a7b 100644 --- a/server/api/smsQueueReport/smsQueueReport.controller.js +++ b/server/api/smsQueueReport/smsQueueReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2aa8=['mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','save','update','then','destroy','error','name','send','map','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','VIRTUAL','options','includeAll','include','rows','SmsQueueReport','create','body','catch','find','params','describe','fast-json-patch','request-promise','moment','bluebird'];(function(_0x13ff53,_0x5e1424){var _0x290228=function(_0x3e3133){while(--_0x3e3133){_0x13ff53['push'](_0x13ff53['shift']());}};_0x290228(++_0x5e1424);}(_0x2aa8,0x92));var _0x82aa=function(_0x2c91e9,_0x2fb965){_0x2c91e9=_0x2c91e9-0x0;var _0x13f0ff=_0x2aa8[_0x2c91e9];return _0x13f0ff;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x82aa('0x0'));var rp=require(_0x82aa('0x1'));var moment=require(_0x82aa('0x2'));var BPromise=require(_0x82aa('0x3'));var Mustache=require(_0x82aa('0x4'));var util=require(_0x82aa('0x5'));var path=require(_0x82aa('0x6'));var sox=require(_0x82aa('0x7'));var csv=require(_0x82aa('0x8'));var ejs=require(_0x82aa('0x9'));var fs=require('fs');var fs_extra=require(_0x82aa('0xa'));var _=require(_0x82aa('0xb'));var squel=require(_0x82aa('0xc'));var crypto=require('crypto');var jsforce=require(_0x82aa('0xd'));var deskjs=require('desk.js');var toCsv=require(_0x82aa('0x8'));var querystring=require(_0x82aa('0xe'));var Papa=require(_0x82aa('0xf'));var Redis=require(_0x82aa('0x10'));var authService=require(_0x82aa('0x11'));var qs=require(_0x82aa('0x12'));var as=require(_0x82aa('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x82aa('0x14'))(_0x82aa('0x15'));var utils=require('../../config/utils');var config=require(_0x82aa('0x16'));var licenseUtil=require(_0x82aa('0x17'));var db=require(_0x82aa('0x18'))['db'];function respondWithStatusCode(_0x2701fe,_0x4a6afd){_0x4a6afd=_0x4a6afd||0xcc;return function(_0x4641f0){if(_0x4641f0){return _0x2701fe[_0x82aa('0x19')](_0x4a6afd);}return _0x2701fe[_0x82aa('0x1a')](_0x4a6afd)[_0x82aa('0x1b')]();};}function respondWithResult(_0x407ce8,_0x393d5d){_0x393d5d=_0x393d5d||0xc8;return function(_0x49a0ed){if(_0x49a0ed){return _0x407ce8[_0x82aa('0x1a')](_0x393d5d)[_0x82aa('0x1c')](_0x49a0ed);}};}function respondWithFilteredResult(_0x7e79a2,_0x311d90){return function(_0x1fec86){if(_0x1fec86){var _0x56cd80=typeof _0x311d90[_0x82aa('0x1d')]===_0x82aa('0x1e')&&typeof _0x311d90[_0x82aa('0x1f')]===_0x82aa('0x1e');var _0x4dc970=_0x1fec86[_0x82aa('0x20')];var _0x3d4b87=_0x56cd80?0x0:_0x311d90[_0x82aa('0x1d')];var _0x2795cf=_0x56cd80?_0x1fec86[_0x82aa('0x20')]:_0x311d90[_0x82aa('0x1d')]+_0x311d90[_0x82aa('0x1f')];var _0x122b13;if(_0x2795cf>=_0x4dc970){_0x2795cf=_0x4dc970;_0x122b13=0xc8;}else{_0x122b13=0xce;}_0x7e79a2[_0x82aa('0x1a')](_0x122b13);return _0x7e79a2[_0x82aa('0x21')](_0x82aa('0x22'),_0x3d4b87+'-'+_0x2795cf+'/'+_0x4dc970)[_0x82aa('0x1c')](_0x1fec86);}return null;};}function patchUpdates(_0x3bf1a9){return function(_0x290a78){try{jsonpatch[_0x82aa('0x23')](_0x290a78,_0x3bf1a9,!![]);}catch(_0x112ed9){return BPromise['reject'](_0x112ed9);}return _0x290a78[_0x82aa('0x24')]();};}function saveUpdates(_0x4fba7e,_0x589a4a){return function(_0x4fa034){if(_0x4fa034){return _0x4fa034[_0x82aa('0x25')](_0x4fba7e)[_0x82aa('0x26')](function(_0x3f47f4){return _0x3f47f4;});}return null;};}function removeEntity(_0x29b766,_0x12342d){return function(_0x35836a){if(_0x35836a){return _0x35836a[_0x82aa('0x27')]()[_0x82aa('0x26')](function(){_0x29b766['status'](0xcc)[_0x82aa('0x1b')]();});}};}function handleEntityNotFound(_0x58efe7,_0xd7afbb){return function(_0x59712d){if(!_0x59712d){_0x58efe7[_0x82aa('0x19')](0x194);}return _0x59712d;};}function handleError(_0x294159,_0x46631b){_0x46631b=_0x46631b||0x1f4;return function(_0x102b58){logger[_0x82aa('0x28')](_0x102b58['stack']);if(_0x102b58[_0x82aa('0x29')]){delete _0x102b58[_0x82aa('0x29')];}_0x294159[_0x82aa('0x1a')](_0x46631b)[_0x82aa('0x2a')](_0x102b58);};}exports['index']=function(_0x2bf83e,_0xd11e5a){var _0x3d2735={},_0x366684={},_0xd274c2={'count':0x0,'rows':[]};var _0x367326=_[_0x82aa('0x2b')](db['SmsQueueReport'][_0x82aa('0x2c')],function(_0x375c57){return{'name':_0x375c57[_0x82aa('0x2d')],'type':_0x375c57[_0x82aa('0x2e')][_0x82aa('0x2f')]};});_0x366684[_0x82aa('0x30')]=_[_0x82aa('0x2b')](_0x367326,_0x82aa('0x29'));_0x366684[_0x82aa('0x31')]=_[_0x82aa('0x32')](_0x2bf83e[_0x82aa('0x31')]);_0x366684[_0x82aa('0x33')]=_[_0x82aa('0x34')](_0x366684['model'],_0x366684['query']);_0x3d2735['attributes']=_['intersection'](_0x366684[_0x82aa('0x30')],qs[_0x82aa('0x35')](_0x2bf83e[_0x82aa('0x31')][_0x82aa('0x35')]));_0x3d2735[_0x82aa('0x36')]=_0x3d2735[_0x82aa('0x36')][_0x82aa('0x37')]?_0x3d2735[_0x82aa('0x36')]:_0x366684['model'];if(!_0x2bf83e['query'][_0x82aa('0x38')](_0x82aa('0x39'))){_0x3d2735['limit']=qs['limit'](_0x2bf83e[_0x82aa('0x31')]['limit']);_0x3d2735[_0x82aa('0x1d')]=qs[_0x82aa('0x1d')](_0x2bf83e[_0x82aa('0x31')][_0x82aa('0x1d')]);}_0x3d2735[_0x82aa('0x3a')]=qs[_0x82aa('0x3b')](_0x2bf83e[_0x82aa('0x31')][_0x82aa('0x3b')]);_0x3d2735[_0x82aa('0x3c')]=qs[_0x82aa('0x33')](_['pick'](_0x2bf83e[_0x82aa('0x31')],_0x366684[_0x82aa('0x33')]),_0x367326);if(_0x2bf83e[_0x82aa('0x31')][_0x82aa('0x3d')]){_0x3d2735[_0x82aa('0x3c')]=_[_0x82aa('0x3e')](_0x3d2735[_0x82aa('0x3c')],{'$or':_[_0x82aa('0x2b')](_0x367326,function(_0x41d8e4){if(_0x41d8e4['type']!==_0x82aa('0x3f')){var _0x2ae741={};_0x2ae741[_0x41d8e4['name']]={'$like':'%'+_0x2bf83e[_0x82aa('0x31')][_0x82aa('0x3d')]+'%'};return _0x2ae741;}})});}_0x3d2735=_[_0x82aa('0x3e')]({},_0x3d2735,_0x2bf83e[_0x82aa('0x40')]);var _0x297e15={'where':_0x3d2735[_0x82aa('0x3c')]};return db['SmsQueueReport'][_0x82aa('0x20')](_0x297e15)[_0x82aa('0x26')](function(_0xcdec23){_0xd274c2[_0x82aa('0x20')]=_0xcdec23;if(_0x2bf83e[_0x82aa('0x31')][_0x82aa('0x41')]){_0x3d2735[_0x82aa('0x42')]=[{'all':!![]}];}return db['SmsQueueReport']['findAll'](_0x3d2735);})[_0x82aa('0x26')](function(_0x13e8dc){_0xd274c2[_0x82aa('0x43')]=_0x13e8dc;return _0xd274c2;})['then'](respondWithFilteredResult(_0xd11e5a,_0x3d2735))['catch'](handleError(_0xd11e5a,null));};exports['show']=function(_0xd0e0d1,_0x1cc649){var _0x5c8a97={'raw':!![],'where':{'id':_0xd0e0d1['params']['id']}},_0x3ee701={};_0x3ee701[_0x82aa('0x30')]=_[_0x82aa('0x32')](db[_0x82aa('0x44')][_0x82aa('0x2c')]);_0x3ee701[_0x82aa('0x31')]=_[_0x82aa('0x32')](_0xd0e0d1[_0x82aa('0x31')]);_0x3ee701[_0x82aa('0x33')]=_['intersection'](_0x3ee701['model'],_0x3ee701['query']);_0x5c8a97[_0x82aa('0x36')]=_['intersection'](_0x3ee701['model'],qs[_0x82aa('0x35')](_0xd0e0d1[_0x82aa('0x31')][_0x82aa('0x35')]));_0x5c8a97[_0x82aa('0x36')]=_0x5c8a97['attributes'][_0x82aa('0x37')]?_0x5c8a97['attributes']:_0x3ee701[_0x82aa('0x30')];if(_0xd0e0d1[_0x82aa('0x31')][_0x82aa('0x41')]){_0x5c8a97[_0x82aa('0x42')]=[{'all':!![]}];}_0x5c8a97=_[_0x82aa('0x3e')]({},_0x5c8a97,_0xd0e0d1[_0x82aa('0x40')]);return db['SmsQueueReport']['find'](_0x5c8a97)['then'](handleEntityNotFound(_0x1cc649,null))[_0x82aa('0x26')](respondWithResult(_0x1cc649,null))['catch'](handleError(_0x1cc649,null));};exports[_0x82aa('0x45')]=function(_0x33081d,_0x2277a8){return db[_0x82aa('0x44')][_0x82aa('0x45')](_0x33081d[_0x82aa('0x46')],{})[_0x82aa('0x26')](respondWithResult(_0x2277a8,0xc9))[_0x82aa('0x47')](handleError(_0x2277a8,null));};exports['update']=function(_0x496c9e,_0x5db565){if(_0x496c9e[_0x82aa('0x46')]['id']){delete _0x496c9e[_0x82aa('0x46')]['id'];}return db[_0x82aa('0x44')][_0x82aa('0x48')]({'where':{'id':_0x496c9e[_0x82aa('0x49')]['id']}})[_0x82aa('0x26')](handleEntityNotFound(_0x5db565,null))[_0x82aa('0x26')](saveUpdates(_0x496c9e[_0x82aa('0x46')],null))[_0x82aa('0x26')](respondWithResult(_0x5db565,null))[_0x82aa('0x47')](handleError(_0x5db565,null));};exports[_0x82aa('0x27')]=function(_0x3aef0f,_0x1c41b1){return db[_0x82aa('0x44')][_0x82aa('0x48')]({'where':{'id':_0x3aef0f[_0x82aa('0x49')]['id']}})[_0x82aa('0x26')](handleEntityNotFound(_0x1c41b1,null))[_0x82aa('0x26')](removeEntity(_0x1c41b1,null))[_0x82aa('0x47')](handleError(_0x1c41b1,null));};exports[_0x82aa('0x4a')]=function(_0x1e626b,_0x2d75cf){return db[_0x82aa('0x44')][_0x82aa('0x4a')]()[_0x82aa('0x26')](respondWithResult(_0x2d75cf,null))[_0x82aa('0x47')](handleError(_0x2d75cf,null));}; \ No newline at end of file +var _0x8e15=['update','then','destroy','error','stack','name','index','map','rawAttributes','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','VIRTUAL','SmsQueueReport','includeAll','include','findAll','rows','show','options','find','create','body','catch','params','describe','eml-format','zip-dir','request-promise','moment','bluebird','mustache','util','path','ejs','fs-extra','squel','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','../../config/utils','../../config/license/util','sendStatus','end','status','json','offset','undefined','count','limit','Content-Range','apply','save'];(function(_0x28a3b2,_0x3b696b){var _0x10ec0c=function(_0x18057c){while(--_0x18057c){_0x28a3b2['push'](_0x28a3b2['shift']());}};_0x10ec0c(++_0x3b696b);}(_0x8e15,0x18f));var _0x58e1=function(_0x39e9f4,_0x7da7be){_0x39e9f4=_0x39e9f4-0x0;var _0x16b495=_0x8e15[_0x39e9f4];return _0x16b495;};'use strict';var emlformat=require(_0x58e1('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x58e1('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x58e1('0x2'));var moment=require(_0x58e1('0x3'));var BPromise=require(_0x58e1('0x4'));var Mustache=require(_0x58e1('0x5'));var util=require(_0x58e1('0x6'));var path=require(_0x58e1('0x7'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x58e1('0x8'));var fs=require('fs');var fs_extra=require(_0x58e1('0x9'));var _=require('lodash');var squel=require(_0x58e1('0xa'));var crypto=require('crypto');var jsforce=require(_0x58e1('0xb'));var deskjs=require(_0x58e1('0xc'));var toCsv=require(_0x58e1('0xd'));var querystring=require(_0x58e1('0xe'));var Papa=require(_0x58e1('0xf'));var Redis=require(_0x58e1('0x10'));var authService=require(_0x58e1('0x11'));var qs=require(_0x58e1('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x58e1('0x13'))('api');var utils=require(_0x58e1('0x14'));var config=require('../../config/environment');var licenseUtil=require(_0x58e1('0x15'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x1802b1,_0x3211a1){_0x3211a1=_0x3211a1||0xcc;return function(_0x17cd68){if(_0x17cd68){return _0x1802b1[_0x58e1('0x16')](_0x3211a1);}return _0x1802b1['status'](_0x3211a1)[_0x58e1('0x17')]();};}function respondWithResult(_0x3a64c0,_0x57ac23){_0x57ac23=_0x57ac23||0xc8;return function(_0x39e19c){if(_0x39e19c){return _0x3a64c0[_0x58e1('0x18')](_0x57ac23)[_0x58e1('0x19')](_0x39e19c);}};}function respondWithFilteredResult(_0x4df5e0,_0x1005c5){return function(_0x3c0f73){if(_0x3c0f73){var _0x179f2d=typeof _0x1005c5[_0x58e1('0x1a')]==='undefined'&&typeof _0x1005c5['limit']===_0x58e1('0x1b');var _0x47584e=_0x3c0f73['count'];var _0x265dcd=_0x179f2d?0x0:_0x1005c5[_0x58e1('0x1a')];var _0x28504f=_0x179f2d?_0x3c0f73[_0x58e1('0x1c')]:_0x1005c5[_0x58e1('0x1a')]+_0x1005c5[_0x58e1('0x1d')];var _0xd30a08;if(_0x28504f>=_0x47584e){_0x28504f=_0x47584e;_0xd30a08=0xc8;}else{_0xd30a08=0xce;}_0x4df5e0['status'](_0xd30a08);return _0x4df5e0['set'](_0x58e1('0x1e'),_0x265dcd+'-'+_0x28504f+'/'+_0x47584e)[_0x58e1('0x19')](_0x3c0f73);}return null;};}function patchUpdates(_0x56a6f3){return function(_0x19c35b){try{jsonpatch[_0x58e1('0x1f')](_0x19c35b,_0x56a6f3,!![]);}catch(_0x1ec7d8){return BPromise['reject'](_0x1ec7d8);}return _0x19c35b[_0x58e1('0x20')]();};}function saveUpdates(_0x4eab39,_0x4b2b0c){return function(_0x18948b){if(_0x18948b){return _0x18948b[_0x58e1('0x21')](_0x4eab39)[_0x58e1('0x22')](function(_0x367441){return _0x367441;});}return null;};}function removeEntity(_0x21f7c4,_0x1dbfed){return function(_0x464952){if(_0x464952){return _0x464952[_0x58e1('0x23')]()['then'](function(){_0x21f7c4[_0x58e1('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0x4ef7a0,_0x2d5ec6){return function(_0x1bc375){if(!_0x1bc375){_0x4ef7a0[_0x58e1('0x16')](0x194);}return _0x1bc375;};}function handleError(_0x5457a3,_0x4025a7){_0x4025a7=_0x4025a7||0x1f4;return function(_0x201846){logger[_0x58e1('0x24')](_0x201846[_0x58e1('0x25')]);if(_0x201846[_0x58e1('0x26')]){delete _0x201846[_0x58e1('0x26')];}_0x5457a3['status'](_0x4025a7)['send'](_0x201846);};}exports[_0x58e1('0x27')]=function(_0x4977af,_0x44c7e0){var _0x52448c={},_0x13dde3={},_0x182bd8={'count':0x0,'rows':[]};var _0x19c5ee=_[_0x58e1('0x28')](db['SmsQueueReport'][_0x58e1('0x29')],function(_0x5d9fbd){return{'name':_0x5d9fbd['fieldName'],'type':_0x5d9fbd['type'][_0x58e1('0x2a')]};});_0x13dde3[_0x58e1('0x2b')]=_['map'](_0x19c5ee,'name');_0x13dde3[_0x58e1('0x2c')]=_[_0x58e1('0x2d')](_0x4977af[_0x58e1('0x2c')]);_0x13dde3[_0x58e1('0x2e')]=_[_0x58e1('0x2f')](_0x13dde3['model'],_0x13dde3[_0x58e1('0x2c')]);_0x52448c['attributes']=_[_0x58e1('0x2f')](_0x13dde3['model'],qs[_0x58e1('0x30')](_0x4977af[_0x58e1('0x2c')][_0x58e1('0x30')]));_0x52448c[_0x58e1('0x31')]=_0x52448c[_0x58e1('0x31')][_0x58e1('0x32')]?_0x52448c[_0x58e1('0x31')]:_0x13dde3[_0x58e1('0x2b')];if(!_0x4977af[_0x58e1('0x2c')][_0x58e1('0x33')](_0x58e1('0x34'))){_0x52448c[_0x58e1('0x1d')]=qs['limit'](_0x4977af[_0x58e1('0x2c')][_0x58e1('0x1d')]);_0x52448c[_0x58e1('0x1a')]=qs[_0x58e1('0x1a')](_0x4977af[_0x58e1('0x2c')]['offset']);}_0x52448c[_0x58e1('0x35')]=qs[_0x58e1('0x36')](_0x4977af[_0x58e1('0x2c')][_0x58e1('0x36')]);_0x52448c[_0x58e1('0x37')]=qs[_0x58e1('0x2e')](_['pick'](_0x4977af['query'],_0x13dde3['filters']),_0x19c5ee);if(_0x4977af['query'][_0x58e1('0x38')]){_0x52448c['where']=_[_0x58e1('0x39')](_0x52448c['where'],{'$or':_['map'](_0x19c5ee,function(_0x53d0c7){if(_0x53d0c7['type']!==_0x58e1('0x3a')){var _0x4403f5={};_0x4403f5[_0x53d0c7['name']]={'$like':'%'+_0x4977af[_0x58e1('0x2c')][_0x58e1('0x38')]+'%'};return _0x4403f5;}})});}_0x52448c=_[_0x58e1('0x39')]({},_0x52448c,_0x4977af['options']);var _0x5e11fb={'where':_0x52448c[_0x58e1('0x37')]};return db[_0x58e1('0x3b')]['count'](_0x5e11fb)[_0x58e1('0x22')](function(_0x58799f){_0x182bd8[_0x58e1('0x1c')]=_0x58799f;if(_0x4977af['query'][_0x58e1('0x3c')]){_0x52448c[_0x58e1('0x3d')]=[{'all':!![]}];}return db[_0x58e1('0x3b')][_0x58e1('0x3e')](_0x52448c);})['then'](function(_0x16cbb0){_0x182bd8[_0x58e1('0x3f')]=_0x16cbb0;return _0x182bd8;})[_0x58e1('0x22')](respondWithFilteredResult(_0x44c7e0,_0x52448c))['catch'](handleError(_0x44c7e0,null));};exports[_0x58e1('0x40')]=function(_0x40dcdc,_0x4a173f){var _0x11237b={'raw':!![],'where':{'id':_0x40dcdc['params']['id']}},_0x598d55={};_0x598d55[_0x58e1('0x2b')]=_['keys'](db['SmsQueueReport'][_0x58e1('0x29')]);_0x598d55['query']=_[_0x58e1('0x2d')](_0x40dcdc[_0x58e1('0x2c')]);_0x598d55[_0x58e1('0x2e')]=_[_0x58e1('0x2f')](_0x598d55['model'],_0x598d55[_0x58e1('0x2c')]);_0x11237b['attributes']=_[_0x58e1('0x2f')](_0x598d55['model'],qs[_0x58e1('0x30')](_0x40dcdc[_0x58e1('0x2c')]['fields']));_0x11237b[_0x58e1('0x31')]=_0x11237b[_0x58e1('0x31')][_0x58e1('0x32')]?_0x11237b[_0x58e1('0x31')]:_0x598d55['model'];if(_0x40dcdc[_0x58e1('0x2c')][_0x58e1('0x3c')]){_0x11237b[_0x58e1('0x3d')]=[{'all':!![]}];}_0x11237b=_[_0x58e1('0x39')]({},_0x11237b,_0x40dcdc[_0x58e1('0x41')]);return db['SmsQueueReport'][_0x58e1('0x42')](_0x11237b)[_0x58e1('0x22')](handleEntityNotFound(_0x4a173f,null))['then'](respondWithResult(_0x4a173f,null))['catch'](handleError(_0x4a173f,null));};exports[_0x58e1('0x43')]=function(_0x3ff69f,_0x15610d){return db[_0x58e1('0x3b')][_0x58e1('0x43')](_0x3ff69f[_0x58e1('0x44')],{})['then'](respondWithResult(_0x15610d,0xc9))[_0x58e1('0x45')](handleError(_0x15610d,null));};exports[_0x58e1('0x21')]=function(_0x212321,_0x337a59){if(_0x212321['body']['id']){delete _0x212321[_0x58e1('0x44')]['id'];}return db[_0x58e1('0x3b')][_0x58e1('0x42')]({'where':{'id':_0x212321[_0x58e1('0x46')]['id']}})[_0x58e1('0x22')](handleEntityNotFound(_0x337a59,null))[_0x58e1('0x22')](saveUpdates(_0x212321[_0x58e1('0x44')],null))[_0x58e1('0x22')](respondWithResult(_0x337a59,null))[_0x58e1('0x45')](handleError(_0x337a59,null));};exports[_0x58e1('0x23')]=function(_0x5b4223,_0x435fec){return db['SmsQueueReport']['find']({'where':{'id':_0x5b4223[_0x58e1('0x46')]['id']}})[_0x58e1('0x22')](handleEntityNotFound(_0x435fec,null))['then'](removeEntity(_0x435fec,null))[_0x58e1('0x45')](handleError(_0x435fec,null));};exports[_0x58e1('0x47')]=function(_0x17bf3f,_0x1a57e6){return db[_0x58e1('0x3b')][_0x58e1('0x47')]()[_0x58e1('0x22')](respondWithResult(_0x1a57e6,null))[_0x58e1('0x45')](handleError(_0x1a57e6,null));}; \ No newline at end of file diff --git a/server/api/smsQueueReport/smsQueueReport.model.js b/server/api/smsQueueReport/smsQueueReport.model.js index 8e1e818..d7d91ff 100644 --- a/server/api/smsQueueReport/smsQueueReport.model.js +++ b/server/api/smsQueueReport/smsQueueReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd8b0=['define','report_sms_queue','uniqueid','lodash','util','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x1cee99,_0x2d8476){var _0x358a19=function(_0x2220ac){while(--_0x2220ac){_0x1cee99['push'](_0x1cee99['shift']());}};_0x358a19(++_0x2d8476);}(_0xd8b0,0xad));var _0x0d8b=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xd8b0[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0x0d8b('0x0'));var util=require(_0x0d8b('0x1'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0x0d8b('0x2'));var rp=require(_0x0d8b('0x3'));var fs=require('fs');var path=require(_0x0d8b('0x4'));var rimraf=require(_0x0d8b('0x5'));var config=require(_0x0d8b('0x6'));var attributes=require('./smsQueueReport.attributes');module['exports']=function(_0x3f8b6f,_0x227c63){return _0x3f8b6f[_0x0d8b('0x7')]('SmsQueueReport',attributes,{'tableName':_0x0d8b('0x8'),'paranoid':![],'indexes':[{'name':_0x0d8b('0x9'),'fields':['uniqueid']}],'timestamps':!![]});}; \ No newline at end of file +var _0x0713=['../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment','./smsQueueReport.attributes','exports','define','SmsQueueReport','report_sms_queue','uniqueid'];(function(_0x2cc711,_0x300328){var _0x31a52e=function(_0x588378){while(--_0x588378){_0x2cc711['push'](_0x2cc711['shift']());}};_0x31a52e(++_0x300328);}(_0x0713,0x1ba));var _0x3071=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0713[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x3071('0x0'))(_0x3071('0x1'));var moment=require(_0x3071('0x2'));var BPromise=require(_0x3071('0x3'));var rp=require(_0x3071('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x3071('0x5'));var config=require(_0x3071('0x6'));var attributes=require(_0x3071('0x7'));module[_0x3071('0x8')]=function(_0xabd7b6,_0x41cf76){return _0xabd7b6[_0x3071('0x9')](_0x3071('0xa'),attributes,{'tableName':_0x3071('0xb'),'paranoid':![],'indexes':[{'name':_0x3071('0xc'),'fields':[_0x3071('0xc')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/smsQueueReport/smsQueueReport.rpc.js b/server/api/smsQueueReport/smsQueueReport.rpc.js index a38cfcf..0c67f42 100644 --- a/server/api/smsQueueReport/smsQueueReport.rpc.js +++ b/server/api/smsQueueReport/smsQueueReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9d35=['SmsQueueReport,\x20%s,\x20%s','request\x20sent','debug','SmsQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','message','catch','CreateSmsQueueReport','SmsQueueReport','body','options','raw','UpdateSmsQueueReport','where','attributes','limit','lodash','util','moment','rpc','../../config/environment','jayson/promise','then','info'];(function(_0x577812,_0x14a2c7){var _0x2b3901=function(_0x2d816a){while(--_0x2d816a){_0x577812['push'](_0x577812['shift']());}};_0x2b3901(++_0x14a2c7);}(_0x9d35,0x124));var _0x59d3=function(_0x26a10d,_0xe5c001){_0x26a10d=_0x26a10d-0x0;var _0xf90201=_0x9d35[_0x26a10d];return _0xf90201;};'use strict';var _=require(_0x59d3('0x0'));var util=require(_0x59d3('0x1'));var moment=require(_0x59d3('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x59d3('0x3'));var config=require(_0x59d3('0x4'));var jayson=require(_0x59d3('0x5'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x50dab5,_0x17de71,_0x3a63a8){return new BPromise(function(_0x15f1bd,_0x25f064){return client['request'](_0x50dab5,_0x3a63a8)[_0x59d3('0x6')](function(_0x2d3e21){logger[_0x59d3('0x7')](_0x59d3('0x8'),_0x17de71,_0x59d3('0x9'));logger[_0x59d3('0xa')](_0x59d3('0xb'),_0x17de71,_0x59d3('0x9'),JSON[_0x59d3('0xc')](_0x2d3e21));if(_0x2d3e21[_0x59d3('0xd')]){if(_0x2d3e21[_0x59d3('0xd')]['code']===0x1f4){logger[_0x59d3('0xd')](_0x59d3('0x8'),_0x17de71,_0x2d3e21[_0x59d3('0xd')][_0x59d3('0xe')]);return _0x25f064(_0x2d3e21[_0x59d3('0xd')][_0x59d3('0xe')]);}logger[_0x59d3('0xd')](_0x59d3('0x8'),_0x17de71,_0x2d3e21[_0x59d3('0xd')][_0x59d3('0xe')]);return _0x15f1bd(_0x2d3e21[_0x59d3('0xd')][_0x59d3('0xe')]);}else{logger[_0x59d3('0x7')](_0x59d3('0x8'),_0x17de71,_0x59d3('0x9'));_0x15f1bd(_0x2d3e21['result'][_0x59d3('0xe')]);}})[_0x59d3('0xf')](function(_0x1ed134){logger[_0x59d3('0xd')]('SmsQueueReport,\x20%s,\x20%s',_0x17de71,_0x1ed134);_0x25f064(_0x1ed134);});});}exports[_0x59d3('0x10')]=function(_0x3d2426){var _0x5d126f=this;return new Promise(function(_0x5777b7,_0x317e84){return db[_0x59d3('0x11')]['create'](_0x3d2426[_0x59d3('0x12')],{'raw':_0x3d2426[_0x59d3('0x13')]?_0x3d2426['options'][_0x59d3('0x14')]===undefined?!![]:![]:!![]})[_0x59d3('0x6')](function(_0x49992c){logger[_0x59d3('0x7')](_0x59d3('0x10'),_0x3d2426);logger['debug']('CreateSmsQueueReport',_0x3d2426,JSON[_0x59d3('0xc')](_0x49992c));_0x5777b7(_0x49992c);})[_0x59d3('0xf')](function(_0x2ffbe8){logger['error']('CreateSmsQueueReport',_0x2ffbe8[_0x59d3('0xe')],_0x3d2426);_0x317e84(_0x5d126f[_0x59d3('0xd')](0x1f4,_0x2ffbe8[_0x59d3('0xe')]));});});};exports[_0x59d3('0x15')]=function(_0x54dcc5){var _0x5028cb=this;return new Promise(function(_0xc55cf8,_0x2b2aab){return db[_0x59d3('0x11')]['update'](_0x54dcc5[_0x59d3('0x12')],{'raw':_0x54dcc5[_0x59d3('0x13')]?_0x54dcc5[_0x59d3('0x13')][_0x59d3('0x14')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x54dcc5['options']?_0x54dcc5[_0x59d3('0x13')][_0x59d3('0x16')]||null:null,'attributes':_0x54dcc5[_0x59d3('0x13')]?_0x54dcc5[_0x59d3('0x13')][_0x59d3('0x17')]||null:null,'limit':_0x54dcc5[_0x59d3('0x13')]?_0x54dcc5[_0x59d3('0x13')][_0x59d3('0x18')]||null:null})[_0x59d3('0x6')](function(_0x520414){logger[_0x59d3('0x7')]('UpdateSmsQueueReport',_0x54dcc5);logger['debug']('UpdateSmsQueueReport',_0x54dcc5,JSON[_0x59d3('0xc')](_0x520414));_0xc55cf8(_0x520414);})[_0x59d3('0xf')](function(_0x3c977a){logger[_0x59d3('0xd')](_0x59d3('0x15'),_0x3c977a[_0x59d3('0xe')],_0x54dcc5);_0x2b2aab(_0x5028cb[_0x59d3('0xd')](0x1f4,_0x3c977a['message']));});});}; \ No newline at end of file +var _0x6911=['client','http','request','then','SmsQueueReport,\x20%s,\x20%s','debug','SmsQueueReport,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','info','result','CreateSmsQueueReport','create','options','stringify','catch','UpdateSmsQueueReport','SmsQueueReport','body','raw','where','limit','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise'];(function(_0x1e98f6,_0x5cf559){var _0x568656=function(_0x3a3cb8){while(--_0x3a3cb8){_0x1e98f6['push'](_0x1e98f6['shift']());}};_0x568656(++_0x5cf559);}(_0x6911,0xe4));var _0x1691=function(_0x2046bb,_0x4fbd9f){_0x2046bb=_0x2046bb-0x0;var _0x5ccacf=_0x6911[_0x2046bb];return _0x5ccacf;};'use strict';var _=require(_0x1691('0x0'));var util=require(_0x1691('0x1'));var moment=require(_0x1691('0x2'));var BPromise=require(_0x1691('0x3'));var rs=require(_0x1691('0x4'));var fs=require('fs');var Redis=require(_0x1691('0x5'));var db=require(_0x1691('0x6'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x1691('0x7'));var config=require(_0x1691('0x8'));var jayson=require(_0x1691('0x9'));var client=jayson[_0x1691('0xa')][_0x1691('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x4ee02d,_0x77daac,_0x343068){return new BPromise(function(_0x5710c1,_0x116d86){return client[_0x1691('0xc')](_0x4ee02d,_0x343068)[_0x1691('0xd')](function(_0x1a3227){logger['info'](_0x1691('0xe'),_0x77daac,'request\x20sent');logger[_0x1691('0xf')](_0x1691('0x10'),_0x77daac,_0x1691('0x11'),JSON['stringify'](_0x1a3227));if(_0x1a3227[_0x1691('0x12')]){if(_0x1a3227['error'][_0x1691('0x13')]===0x1f4){logger[_0x1691('0x12')](_0x1691('0xe'),_0x77daac,_0x1a3227['error'][_0x1691('0x14')]);return _0x116d86(_0x1a3227['error'][_0x1691('0x14')]);}logger[_0x1691('0x12')](_0x1691('0xe'),_0x77daac,_0x1a3227[_0x1691('0x12')][_0x1691('0x14')]);return _0x5710c1(_0x1a3227['error']['message']);}else{logger[_0x1691('0x15')](_0x1691('0xe'),_0x77daac,_0x1691('0x11'));_0x5710c1(_0x1a3227[_0x1691('0x16')][_0x1691('0x14')]);}})['catch'](function(_0x56a829){logger[_0x1691('0x12')]('SmsQueueReport,\x20%s,\x20%s',_0x77daac,_0x56a829);_0x116d86(_0x56a829);});});}exports[_0x1691('0x17')]=function(_0x355c13){var _0x18c2f8=this;return new Promise(function(_0x57e968,_0x26a1c5){return db['SmsQueueReport'][_0x1691('0x18')](_0x355c13['body'],{'raw':_0x355c13[_0x1691('0x19')]?_0x355c13[_0x1691('0x19')]['raw']===undefined?!![]:![]:!![]})['then'](function(_0x4d9ce4){logger[_0x1691('0x15')]('CreateSmsQueueReport',_0x355c13);logger[_0x1691('0xf')](_0x1691('0x17'),_0x355c13,JSON[_0x1691('0x1a')](_0x4d9ce4));_0x57e968(_0x4d9ce4);})[_0x1691('0x1b')](function(_0x26ff7e){logger[_0x1691('0x12')]('CreateSmsQueueReport',_0x26ff7e[_0x1691('0x14')],_0x355c13);_0x26a1c5(_0x18c2f8[_0x1691('0x12')](0x1f4,_0x26ff7e[_0x1691('0x14')]));});});};exports[_0x1691('0x1c')]=function(_0x2f9c6f){var _0x53e55e=this;return new Promise(function(_0x472051,_0x501744){return db[_0x1691('0x1d')]['update'](_0x2f9c6f[_0x1691('0x1e')],{'raw':_0x2f9c6f['options']?_0x2f9c6f[_0x1691('0x19')][_0x1691('0x1f')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x2f9c6f[_0x1691('0x19')]?_0x2f9c6f[_0x1691('0x19')][_0x1691('0x20')]||null:null,'attributes':_0x2f9c6f[_0x1691('0x19')]?_0x2f9c6f[_0x1691('0x19')]['attributes']||null:null,'limit':_0x2f9c6f[_0x1691('0x19')]?_0x2f9c6f[_0x1691('0x19')][_0x1691('0x21')]||null:null})[_0x1691('0xd')](function(_0x209d74){logger[_0x1691('0x15')](_0x1691('0x1c'),_0x2f9c6f);logger[_0x1691('0xf')](_0x1691('0x1c'),_0x2f9c6f,JSON[_0x1691('0x1a')](_0x209d74));_0x472051(_0x209d74);})['catch'](function(_0x3b4cec){logger[_0x1691('0x12')]('UpdateSmsQueueReport',_0x3b4cec[_0x1691('0x14')],_0x2f9c6f);_0x501744(_0x53e55e[_0x1691('0x12')](0x1f4,_0x3b4cec[_0x1691('0x14')]));});});}; \ No newline at end of file diff --git a/server/api/smsTransferReport/index.js b/server/api/smsTransferReport/index.js index d78eb85..ea36046 100644 --- a/server/api/smsTransferReport/index.js +++ b/server/api/smsTransferReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4c4e=['fs-extra','../../components/auth/service','../../components/interaction/service','./smsTransferReport.controller','isAuthenticated','index','get','/describe','describe','/:id','post','create','put','delete','destroy','multer','path','connect-timeout','express'];(function(_0x3bb830,_0xa498c1){var _0x309778=function(_0x3e22b1){while(--_0x3e22b1){_0x3bb830['push'](_0x3bb830['shift']());}};_0x309778(++_0xa498c1);}(_0x4c4e,0x152));var _0xe4c4=function(_0x54ad13,_0x47cc29){_0x54ad13=_0x54ad13-0x0;var _0xd11f97=_0x4c4e[_0x54ad13];return _0xd11f97;};'use strict';var multer=require(_0xe4c4('0x0'));var util=require('util');var path=require(_0xe4c4('0x1'));var timeout=require(_0xe4c4('0x2'));var express=require(_0xe4c4('0x3'));var router=express['Router']();var fs_extra=require(_0xe4c4('0x4'));var auth=require(_0xe4c4('0x5'));var interaction=require(_0xe4c4('0x6'));var config=require('../../config/environment');var controller=require(_0xe4c4('0x7'));router['get']('/',auth[_0xe4c4('0x8')](),controller[_0xe4c4('0x9')]);router[_0xe4c4('0xa')](_0xe4c4('0xb'),auth[_0xe4c4('0x8')](),controller[_0xe4c4('0xc')]);router[_0xe4c4('0xa')](_0xe4c4('0xd'),auth['isAuthenticated'](),controller['show']);router[_0xe4c4('0xe')]('/',auth[_0xe4c4('0x8')](),controller[_0xe4c4('0xf')]);router[_0xe4c4('0x10')](_0xe4c4('0xd'),auth[_0xe4c4('0x8')](),controller['update']);router[_0xe4c4('0x11')](_0xe4c4('0xd'),auth[_0xe4c4('0x8')](),controller[_0xe4c4('0x12')]);module['exports']=router; \ No newline at end of file +var _0x4300=['describe','/:id','show','post','put','update','delete','destroy','multer','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','index','/describe','isAuthenticated'];(function(_0x1c0f3d,_0x55a9e2){var _0x4d71a8=function(_0xeff131){while(--_0xeff131){_0x1c0f3d['push'](_0x1c0f3d['shift']());}};_0x4d71a8(++_0x55a9e2);}(_0x4300,0x1a6));var _0x0430=function(_0x26fecc,_0x4d63d1){_0x26fecc=_0x26fecc-0x0;var _0x21c53a=_0x4300[_0x26fecc];return _0x21c53a;};'use strict';var multer=require(_0x0430('0x0'));var util=require('util');var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0430('0x1')]();var fs_extra=require(_0x0430('0x2'));var auth=require(_0x0430('0x3'));var interaction=require(_0x0430('0x4'));var config=require(_0x0430('0x5'));var controller=require('./smsTransferReport.controller');router[_0x0430('0x6')]('/',auth['isAuthenticated'](),controller[_0x0430('0x7')]);router['get'](_0x0430('0x8'),auth[_0x0430('0x9')](),controller[_0x0430('0xa')]);router[_0x0430('0x6')](_0x0430('0xb'),auth[_0x0430('0x9')](),controller[_0x0430('0xc')]);router[_0x0430('0xd')]('/',auth[_0x0430('0x9')](),controller['create']);router[_0x0430('0xe')](_0x0430('0xb'),auth[_0x0430('0x9')](),controller[_0x0430('0xf')]);router[_0x0430('0x10')](_0x0430('0xb'),auth[_0x0430('0x9')](),controller[_0x0430('0x11')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/smsTransferReport/smsTransferReport.attributes.js b/server/api/smsTransferReport/smsTransferReport.attributes.js index ad86286..3b5b5fe 100644 --- a/server/api/smsTransferReport/smsTransferReport.attributes.js +++ b/server/api/smsTransferReport/smsTransferReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x34e8=['queue','DATE','NOW','moment','sequelize','exports','STRING','account','agent'];(function(_0xb19bc6,_0x2dd9b5){var _0x2e3f77=function(_0x51ef45){while(--_0x51ef45){_0xb19bc6['push'](_0xb19bc6['shift']());}};_0x2e3f77(++_0x2dd9b5);}(_0x34e8,0x12c));var _0x834e=function(_0x18303a,_0x11ff82){_0x18303a=_0x18303a-0x0;var _0x1076a4=_0x34e8[_0x18303a];return _0x1076a4;};'use strict';var moment=require(_0x834e('0x0'));var Sequelize=require(_0x834e('0x1'));module[_0x834e('0x2')]={'uniqueid':{'type':Sequelize[_0x834e('0x3')],'allowNull':![]},'type':{'type':Sequelize['ENUM'](_0x834e('0x4'),_0x834e('0x5'),_0x834e('0x6')),'allowNull':![],'defaultValue':_0x834e('0x6')},'transferredAt':{'type':Sequelize[_0x834e('0x7')],'allowNull':![],'defaultValue':Sequelize[_0x834e('0x8')]}}; \ No newline at end of file +var _0xf3cd=['exports','STRING','ENUM','account','queue','DATE','moment','sequelize'];(function(_0x3eeb6b,_0x176117){var _0x5321a9=function(_0x32028c){while(--_0x32028c){_0x3eeb6b['push'](_0x3eeb6b['shift']());}};_0x5321a9(++_0x176117);}(_0xf3cd,0xfe));var _0xdf3c=function(_0x373dee,_0x1a8c45){_0x373dee=_0x373dee-0x0;var _0x46798f=_0xf3cd[_0x373dee];return _0x46798f;};'use strict';var moment=require(_0xdf3c('0x0'));var Sequelize=require(_0xdf3c('0x1'));module[_0xdf3c('0x2')]={'uniqueid':{'type':Sequelize[_0xdf3c('0x3')],'allowNull':![]},'type':{'type':Sequelize[_0xdf3c('0x4')](_0xdf3c('0x5'),'agent',_0xdf3c('0x6')),'allowNull':![],'defaultValue':_0xdf3c('0x6')},'transferredAt':{'type':Sequelize[_0xdf3c('0x7')],'allowNull':![],'defaultValue':Sequelize['NOW']}}; \ No newline at end of file diff --git a/server/api/smsTransferReport/smsTransferReport.controller.js b/server/api/smsTransferReport/smsTransferReport.controller.js index 18efff9..a9d8890 100644 --- a/server/api/smsTransferReport/smsTransferReport.controller.js +++ b/server/api/smsTransferReport/smsTransferReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x984b=['undefined','limit','count','offset','set','Content-Range','save','update','then','destroy','stack','name','send','index','map','SmsTransferReport','rawAttributes','type','key','model','query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','params','keys','length','find','create','body','describe','eml-format','rimraf','zip-dir','fast-json-patch','moment','path','sox','ejs','lodash','squel','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','end','json'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x984b,0x15b));var _0xb984=function(_0x1803ab,_0x4178a7){_0x1803ab=_0x1803ab-0x0;var _0x52fe5e=_0x984b[_0x1803ab];return _0x52fe5e;};'use strict';var emlformat=require(_0xb984('0x0'));var rimraf=require(_0xb984('0x1'));var zipdir=require(_0xb984('0x2'));var jsonpatch=require(_0xb984('0x3'));var rp=require('request-promise');var moment=require(_0xb984('0x4'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require('util');var path=require(_0xb984('0x5'));var sox=require(_0xb984('0x6'));var csv=require('to-csv');var ejs=require(_0xb984('0x7'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xb984('0x8'));var squel=require(_0xb984('0x9'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0xb984('0xa'));var toCsv=require(_0xb984('0xb'));var querystring=require(_0xb984('0xc'));var Papa=require(_0xb984('0xd'));var Redis=require(_0xb984('0xe'));var authService=require(_0xb984('0xf'));var qs=require(_0xb984('0x10'));var as=require(_0xb984('0x11'));var hardwareService=require(_0xb984('0x12'));var logger=require(_0xb984('0x13'))(_0xb984('0x14'));var utils=require(_0xb984('0x15'));var config=require(_0xb984('0x16'));var licenseUtil=require(_0xb984('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x480570,_0x26f6ab){_0x26f6ab=_0x26f6ab||0xcc;return function(_0x45f451){if(_0x45f451){return _0x480570[_0xb984('0x18')](_0x26f6ab);}return _0x480570[_0xb984('0x19')](_0x26f6ab)[_0xb984('0x1a')]();};}function respondWithResult(_0x1849c9,_0x1038cb){_0x1038cb=_0x1038cb||0xc8;return function(_0x5cc881){if(_0x5cc881){return _0x1849c9[_0xb984('0x19')](_0x1038cb)[_0xb984('0x1b')](_0x5cc881);}};}function respondWithFilteredResult(_0x43d016,_0x56d529){return function(_0x1a8d74){if(_0x1a8d74){var _0x3387b4=typeof _0x56d529['offset']===_0xb984('0x1c')&&typeof _0x56d529[_0xb984('0x1d')]==='undefined';var _0x4972f3=_0x1a8d74[_0xb984('0x1e')];var _0x3dac77=_0x3387b4?0x0:_0x56d529[_0xb984('0x1f')];var _0x30b581=_0x3387b4?_0x1a8d74[_0xb984('0x1e')]:_0x56d529[_0xb984('0x1f')]+_0x56d529[_0xb984('0x1d')];var _0xe3d89e;if(_0x30b581>=_0x4972f3){_0x30b581=_0x4972f3;_0xe3d89e=0xc8;}else{_0xe3d89e=0xce;}_0x43d016[_0xb984('0x19')](_0xe3d89e);return _0x43d016[_0xb984('0x20')](_0xb984('0x21'),_0x3dac77+'-'+_0x30b581+'/'+_0x4972f3)[_0xb984('0x1b')](_0x1a8d74);}return null;};}function patchUpdates(_0x251acd){return function(_0xe8961c){try{jsonpatch['apply'](_0xe8961c,_0x251acd,!![]);}catch(_0x11c4b6){return BPromise['reject'](_0x11c4b6);}return _0xe8961c[_0xb984('0x22')]();};}function saveUpdates(_0x5da6e6,_0x597ac1){return function(_0x4b994d){if(_0x4b994d){return _0x4b994d[_0xb984('0x23')](_0x5da6e6)[_0xb984('0x24')](function(_0xede235){return _0xede235;});}return null;};}function removeEntity(_0x424f8a,_0x14482a){return function(_0x4fc2c2){if(_0x4fc2c2){return _0x4fc2c2[_0xb984('0x25')]()[_0xb984('0x24')](function(){_0x424f8a[_0xb984('0x19')](0xcc)[_0xb984('0x1a')]();});}};}function handleEntityNotFound(_0x263c6d,_0x106f7e){return function(_0x5c40f7){if(!_0x5c40f7){_0x263c6d[_0xb984('0x18')](0x194);}return _0x5c40f7;};}function handleError(_0x235ca6,_0x454ccd){_0x454ccd=_0x454ccd||0x1f4;return function(_0xae99df){logger['error'](_0xae99df[_0xb984('0x26')]);if(_0xae99df['name']){delete _0xae99df[_0xb984('0x27')];}_0x235ca6[_0xb984('0x19')](_0x454ccd)[_0xb984('0x28')](_0xae99df);};}exports[_0xb984('0x29')]=function(_0x55b573,_0x49b0d1){var _0x3f1b10={},_0x2584bc={},_0x329426={'count':0x0,'rows':[]};var _0x420ff5=_[_0xb984('0x2a')](db[_0xb984('0x2b')][_0xb984('0x2c')],function(_0x4a84c0){return{'name':_0x4a84c0['fieldName'],'type':_0x4a84c0[_0xb984('0x2d')][_0xb984('0x2e')]};});_0x2584bc[_0xb984('0x2f')]=_[_0xb984('0x2a')](_0x420ff5,_0xb984('0x27'));_0x2584bc[_0xb984('0x30')]=_['keys'](_0x55b573[_0xb984('0x30')]);_0x2584bc[_0xb984('0x31')]=_[_0xb984('0x32')](_0x2584bc['model'],_0x2584bc[_0xb984('0x30')]);_0x3f1b10[_0xb984('0x33')]=_[_0xb984('0x32')](_0x2584bc[_0xb984('0x2f')],qs[_0xb984('0x34')](_0x55b573[_0xb984('0x30')]['fields']));_0x3f1b10[_0xb984('0x33')]=_0x3f1b10[_0xb984('0x33')]['length']?_0x3f1b10[_0xb984('0x33')]:_0x2584bc[_0xb984('0x2f')];if(!_0x55b573['query'][_0xb984('0x35')](_0xb984('0x36'))){_0x3f1b10[_0xb984('0x1d')]=qs['limit'](_0x55b573[_0xb984('0x30')][_0xb984('0x1d')]);_0x3f1b10[_0xb984('0x1f')]=qs[_0xb984('0x1f')](_0x55b573[_0xb984('0x30')][_0xb984('0x1f')]);}_0x3f1b10[_0xb984('0x37')]=qs[_0xb984('0x38')](_0x55b573[_0xb984('0x30')][_0xb984('0x38')]);_0x3f1b10[_0xb984('0x39')]=qs['filters'](_[_0xb984('0x3a')](_0x55b573[_0xb984('0x30')],_0x2584bc[_0xb984('0x31')]),_0x420ff5);if(_0x55b573[_0xb984('0x30')][_0xb984('0x3b')]){_0x3f1b10[_0xb984('0x39')]=_[_0xb984('0x3c')](_0x3f1b10[_0xb984('0x39')],{'$or':_[_0xb984('0x2a')](_0x420ff5,function(_0x27834a){if(_0x27834a[_0xb984('0x2d')]!==_0xb984('0x3d')){var _0x420d87={};_0x420d87[_0x27834a['name']]={'$like':'%'+_0x55b573[_0xb984('0x30')]['filter']+'%'};return _0x420d87;}})});}_0x3f1b10=_[_0xb984('0x3c')]({},_0x3f1b10,_0x55b573[_0xb984('0x3e')]);var _0x122afe={'where':_0x3f1b10[_0xb984('0x39')]};return db[_0xb984('0x2b')]['count'](_0x122afe)[_0xb984('0x24')](function(_0x182708){_0x329426[_0xb984('0x1e')]=_0x182708;if(_0x55b573[_0xb984('0x30')][_0xb984('0x3f')]){_0x3f1b10[_0xb984('0x40')]=[{'all':!![]}];}return db[_0xb984('0x2b')][_0xb984('0x41')](_0x3f1b10);})[_0xb984('0x24')](function(_0x4e5d2e){_0x329426[_0xb984('0x42')]=_0x4e5d2e;return _0x329426;})[_0xb984('0x24')](respondWithFilteredResult(_0x49b0d1,_0x3f1b10))[_0xb984('0x43')](handleError(_0x49b0d1,null));};exports['show']=function(_0x2c7ef8,_0x3db3b4){var _0x4fc13a={'raw':!![],'where':{'id':_0x2c7ef8[_0xb984('0x44')]['id']}},_0x471f4c={};_0x471f4c[_0xb984('0x2f')]=_[_0xb984('0x45')](db[_0xb984('0x2b')][_0xb984('0x2c')]);_0x471f4c['query']=_['keys'](_0x2c7ef8[_0xb984('0x30')]);_0x471f4c[_0xb984('0x31')]=_['intersection'](_0x471f4c['model'],_0x471f4c['query']);_0x4fc13a['attributes']=_[_0xb984('0x32')](_0x471f4c[_0xb984('0x2f')],qs[_0xb984('0x34')](_0x2c7ef8[_0xb984('0x30')][_0xb984('0x34')]));_0x4fc13a[_0xb984('0x33')]=_0x4fc13a['attributes'][_0xb984('0x46')]?_0x4fc13a[_0xb984('0x33')]:_0x471f4c[_0xb984('0x2f')];if(_0x2c7ef8['query'][_0xb984('0x3f')]){_0x4fc13a[_0xb984('0x40')]=[{'all':!![]}];}_0x4fc13a=_[_0xb984('0x3c')]({},_0x4fc13a,_0x2c7ef8[_0xb984('0x3e')]);return db['SmsTransferReport'][_0xb984('0x47')](_0x4fc13a)[_0xb984('0x24')](handleEntityNotFound(_0x3db3b4,null))[_0xb984('0x24')](respondWithResult(_0x3db3b4,null))[_0xb984('0x43')](handleError(_0x3db3b4,null));};exports[_0xb984('0x48')]=function(_0x560fb7,_0x76c502){return db[_0xb984('0x2b')][_0xb984('0x48')](_0x560fb7[_0xb984('0x49')],{})[_0xb984('0x24')](respondWithResult(_0x76c502,0xc9))['catch'](handleError(_0x76c502,null));};exports[_0xb984('0x23')]=function(_0xb4a2e5,_0x5ca2ff){if(_0xb4a2e5['body']['id']){delete _0xb4a2e5[_0xb984('0x49')]['id'];}return db[_0xb984('0x2b')][_0xb984('0x47')]({'where':{'id':_0xb4a2e5['params']['id']}})['then'](handleEntityNotFound(_0x5ca2ff,null))['then'](saveUpdates(_0xb4a2e5['body'],null))['then'](respondWithResult(_0x5ca2ff,null))[_0xb984('0x43')](handleError(_0x5ca2ff,null));};exports[_0xb984('0x25')]=function(_0x3dfbcd,_0x5a3803){return db[_0xb984('0x2b')][_0xb984('0x47')]({'where':{'id':_0x3dfbcd['params']['id']}})[_0xb984('0x24')](handleEntityNotFound(_0x5a3803,null))[_0xb984('0x24')](removeEntity(_0x5a3803,null))[_0xb984('0x43')](handleError(_0x5a3803,null));};exports[_0xb984('0x4a')]=function(_0x342f8d,_0x39e81f){return db[_0xb984('0x2b')][_0xb984('0x4a')]()[_0xb984('0x24')](respondWithResult(_0x39e81f,null))[_0xb984('0x43')](handleError(_0x39e81f,null));}; \ No newline at end of file +var _0x959d=['set','Content-Range','apply','save','update','then','error','stack','name','send','index','SmsTransferReport','fieldName','type','key','model','map','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','order','sort','pick','filter','merge','where','options','includeAll','params','rawAttributes','include','find','catch','create','body','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','crypto','jsforce','desk.js','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','sendStatus','status','end','undefined','limit','count','offset'];(function(_0x99f96e,_0x32bb60){var _0x115ab6=function(_0x8401f5){while(--_0x8401f5){_0x99f96e['push'](_0x99f96e['shift']());}};_0x115ab6(++_0x32bb60);}(_0x959d,0x71));var _0xd959=function(_0x34933a,_0x327378){_0x34933a=_0x34933a-0x0;var _0x36abb4=_0x959d[_0x34933a];return _0x36abb4;};'use strict';var emlformat=require(_0xd959('0x0'));var rimraf=require(_0xd959('0x1'));var zipdir=require(_0xd959('0x2'));var jsonpatch=require(_0xd959('0x3'));var rp=require(_0xd959('0x4'));var moment=require(_0xd959('0x5'));var BPromise=require(_0xd959('0x6'));var Mustache=require(_0xd959('0x7'));var util=require('util');var path=require(_0xd959('0x8'));var sox=require(_0xd959('0x9'));var csv=require(_0xd959('0xa'));var ejs=require(_0xd959('0xb'));var fs=require('fs');var fs_extra=require(_0xd959('0xc'));var _=require('lodash');var squel=require('squel');var crypto=require(_0xd959('0xd'));var jsforce=require(_0xd959('0xe'));var deskjs=require(_0xd959('0xf'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xd959('0x10'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0xd959('0x11'));var as=require(_0xd959('0x12'));var hardwareService=require(_0xd959('0x13'));var logger=require(_0xd959('0x14'))(_0xd959('0x15'));var utils=require(_0xd959('0x16'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0xd959('0x17'))['db'];function respondWithStatusCode(_0x43db49,_0x34eae8){_0x34eae8=_0x34eae8||0xcc;return function(_0x3a98c2){if(_0x3a98c2){return _0x43db49[_0xd959('0x18')](_0x34eae8);}return _0x43db49[_0xd959('0x19')](_0x34eae8)[_0xd959('0x1a')]();};}function respondWithResult(_0xaeb770,_0x4f7bc2){_0x4f7bc2=_0x4f7bc2||0xc8;return function(_0x156462){if(_0x156462){return _0xaeb770[_0xd959('0x19')](_0x4f7bc2)['json'](_0x156462);}};}function respondWithFilteredResult(_0x350aa8,_0x8fa14a){return function(_0x4a3976){if(_0x4a3976){var _0x4de89f=typeof _0x8fa14a['offset']===_0xd959('0x1b')&&typeof _0x8fa14a[_0xd959('0x1c')]===_0xd959('0x1b');var _0x3653aa=_0x4a3976[_0xd959('0x1d')];var _0x1cf4f2=_0x4de89f?0x0:_0x8fa14a['offset'];var _0x14e93c=_0x4de89f?_0x4a3976['count']:_0x8fa14a[_0xd959('0x1e')]+_0x8fa14a[_0xd959('0x1c')];var _0x45485e;if(_0x14e93c>=_0x3653aa){_0x14e93c=_0x3653aa;_0x45485e=0xc8;}else{_0x45485e=0xce;}_0x350aa8[_0xd959('0x19')](_0x45485e);return _0x350aa8[_0xd959('0x1f')](_0xd959('0x20'),_0x1cf4f2+'-'+_0x14e93c+'/'+_0x3653aa)['json'](_0x4a3976);}return null;};}function patchUpdates(_0x45c40d){return function(_0x361dc2){try{jsonpatch[_0xd959('0x21')](_0x361dc2,_0x45c40d,!![]);}catch(_0x69ea6c){return BPromise['reject'](_0x69ea6c);}return _0x361dc2[_0xd959('0x22')]();};}function saveUpdates(_0x4c9950,_0x1d36b2){return function(_0x458c1f){if(_0x458c1f){return _0x458c1f[_0xd959('0x23')](_0x4c9950)[_0xd959('0x24')](function(_0x2575a8){return _0x2575a8;});}return null;};}function removeEntity(_0xb0c1ab,_0x58d73a){return function(_0x16e16c){if(_0x16e16c){return _0x16e16c['destroy']()[_0xd959('0x24')](function(){_0xb0c1ab['status'](0xcc)[_0xd959('0x1a')]();});}};}function handleEntityNotFound(_0x4c9d3b,_0x29e962){return function(_0x3822cc){if(!_0x3822cc){_0x4c9d3b[_0xd959('0x18')](0x194);}return _0x3822cc;};}function handleError(_0x3301bd,_0x496cab){_0x496cab=_0x496cab||0x1f4;return function(_0x9d666c){logger[_0xd959('0x25')](_0x9d666c[_0xd959('0x26')]);if(_0x9d666c[_0xd959('0x27')]){delete _0x9d666c[_0xd959('0x27')];}_0x3301bd[_0xd959('0x19')](_0x496cab)[_0xd959('0x28')](_0x9d666c);};}exports[_0xd959('0x29')]=function(_0x53e4e4,_0x17d3ce){var _0x45e63a={},_0x4759d8={},_0x4d679b={'count':0x0,'rows':[]};var _0x23c50c=_['map'](db[_0xd959('0x2a')]['rawAttributes'],function(_0x54405b){return{'name':_0x54405b[_0xd959('0x2b')],'type':_0x54405b[_0xd959('0x2c')][_0xd959('0x2d')]};});_0x4759d8[_0xd959('0x2e')]=_[_0xd959('0x2f')](_0x23c50c,_0xd959('0x27'));_0x4759d8[_0xd959('0x30')]=_[_0xd959('0x31')](_0x53e4e4[_0xd959('0x30')]);_0x4759d8[_0xd959('0x32')]=_[_0xd959('0x33')](_0x4759d8['model'],_0x4759d8[_0xd959('0x30')]);_0x45e63a['attributes']=_['intersection'](_0x4759d8[_0xd959('0x2e')],qs[_0xd959('0x34')](_0x53e4e4[_0xd959('0x30')][_0xd959('0x34')]));_0x45e63a[_0xd959('0x35')]=_0x45e63a['attributes'][_0xd959('0x36')]?_0x45e63a[_0xd959('0x35')]:_0x4759d8[_0xd959('0x2e')];if(!_0x53e4e4[_0xd959('0x30')][_0xd959('0x37')]('nolimit')){_0x45e63a[_0xd959('0x1c')]=qs[_0xd959('0x1c')](_0x53e4e4[_0xd959('0x30')][_0xd959('0x1c')]);_0x45e63a[_0xd959('0x1e')]=qs[_0xd959('0x1e')](_0x53e4e4[_0xd959('0x30')][_0xd959('0x1e')]);}_0x45e63a[_0xd959('0x38')]=qs[_0xd959('0x39')](_0x53e4e4[_0xd959('0x30')][_0xd959('0x39')]);_0x45e63a['where']=qs[_0xd959('0x32')](_[_0xd959('0x3a')](_0x53e4e4[_0xd959('0x30')],_0x4759d8['filters']),_0x23c50c);if(_0x53e4e4[_0xd959('0x30')][_0xd959('0x3b')]){_0x45e63a['where']=_[_0xd959('0x3c')](_0x45e63a[_0xd959('0x3d')],{'$or':_[_0xd959('0x2f')](_0x23c50c,function(_0x2e368e){if(_0x2e368e[_0xd959('0x2c')]!=='VIRTUAL'){var _0x5e68f1={};_0x5e68f1[_0x2e368e['name']]={'$like':'%'+_0x53e4e4[_0xd959('0x30')][_0xd959('0x3b')]+'%'};return _0x5e68f1;}})});}_0x45e63a=_['merge']({},_0x45e63a,_0x53e4e4[_0xd959('0x3e')]);var _0x19545b={'where':_0x45e63a[_0xd959('0x3d')]};return db[_0xd959('0x2a')][_0xd959('0x1d')](_0x19545b)[_0xd959('0x24')](function(_0x1bbb94){_0x4d679b[_0xd959('0x1d')]=_0x1bbb94;if(_0x53e4e4[_0xd959('0x30')][_0xd959('0x3f')]){_0x45e63a['include']=[{'all':!![]}];}return db['SmsTransferReport']['findAll'](_0x45e63a);})[_0xd959('0x24')](function(_0x56a6b7){_0x4d679b['rows']=_0x56a6b7;return _0x4d679b;})[_0xd959('0x24')](respondWithFilteredResult(_0x17d3ce,_0x45e63a))['catch'](handleError(_0x17d3ce,null));};exports['show']=function(_0x3b159c,_0x1dcb18){var _0x44a27d={'raw':!![],'where':{'id':_0x3b159c[_0xd959('0x40')]['id']}},_0x6d9227={};_0x6d9227[_0xd959('0x2e')]=_[_0xd959('0x31')](db[_0xd959('0x2a')][_0xd959('0x41')]);_0x6d9227['query']=_[_0xd959('0x31')](_0x3b159c['query']);_0x6d9227[_0xd959('0x32')]=_[_0xd959('0x33')](_0x6d9227[_0xd959('0x2e')],_0x6d9227[_0xd959('0x30')]);_0x44a27d['attributes']=_[_0xd959('0x33')](_0x6d9227[_0xd959('0x2e')],qs[_0xd959('0x34')](_0x3b159c['query'][_0xd959('0x34')]));_0x44a27d[_0xd959('0x35')]=_0x44a27d[_0xd959('0x35')]['length']?_0x44a27d[_0xd959('0x35')]:_0x6d9227[_0xd959('0x2e')];if(_0x3b159c[_0xd959('0x30')]['includeAll']){_0x44a27d[_0xd959('0x42')]=[{'all':!![]}];}_0x44a27d=_[_0xd959('0x3c')]({},_0x44a27d,_0x3b159c[_0xd959('0x3e')]);return db['SmsTransferReport'][_0xd959('0x43')](_0x44a27d)[_0xd959('0x24')](handleEntityNotFound(_0x1dcb18,null))[_0xd959('0x24')](respondWithResult(_0x1dcb18,null))[_0xd959('0x44')](handleError(_0x1dcb18,null));};exports[_0xd959('0x45')]=function(_0x5a514b,_0x40080c){return db['SmsTransferReport']['create'](_0x5a514b[_0xd959('0x46')],{})[_0xd959('0x24')](respondWithResult(_0x40080c,0xc9))[_0xd959('0x44')](handleError(_0x40080c,null));};exports[_0xd959('0x23')]=function(_0x4f42cd,_0x54f6f5){if(_0x4f42cd[_0xd959('0x46')]['id']){delete _0x4f42cd[_0xd959('0x46')]['id'];}return db['SmsTransferReport'][_0xd959('0x43')]({'where':{'id':_0x4f42cd['params']['id']}})[_0xd959('0x24')](handleEntityNotFound(_0x54f6f5,null))['then'](saveUpdates(_0x4f42cd[_0xd959('0x46')],null))[_0xd959('0x24')](respondWithResult(_0x54f6f5,null))[_0xd959('0x44')](handleError(_0x54f6f5,null));};exports['destroy']=function(_0x51bc0f,_0x2c529b){return db['SmsTransferReport'][_0xd959('0x43')]({'where':{'id':_0x51bc0f['params']['id']}})[_0xd959('0x24')](handleEntityNotFound(_0x2c529b,null))[_0xd959('0x24')](removeEntity(_0x2c529b,null))[_0xd959('0x44')](handleError(_0x2c529b,null));};exports[_0xd959('0x47')]=function(_0x398796,_0x4608b3){return db[_0xd959('0x2a')][_0xd959('0x47')]()[_0xd959('0x24')](respondWithResult(_0x4608b3,null))['catch'](handleError(_0x4608b3,null));}; \ No newline at end of file diff --git a/server/api/smsTransferReport/smsTransferReport.model.js b/server/api/smsTransferReport/smsTransferReport.model.js index c9be0cb..bbf5218 100644 --- a/server/api/smsTransferReport/smsTransferReport.model.js +++ b/server/api/smsTransferReport/smsTransferReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9b61=['util','../../config/logger','bluebird','request-promise','path','rimraf','../../config/environment','./smsTransferReport.attributes','SmsTransferReport','report_sms_transfer','uniqueid','lodash'];(function(_0x302e91,_0x1146f5){var _0x3b701a=function(_0x1e6fab){while(--_0x1e6fab){_0x302e91['push'](_0x302e91['shift']());}};_0x3b701a(++_0x1146f5);}(_0x9b61,0x6b));var _0x19b6=function(_0x55a181,_0x399570){_0x55a181=_0x55a181-0x0;var _0x47b157=_0x9b61[_0x55a181];return _0x47b157;};'use strict';var _=require(_0x19b6('0x0'));var util=require(_0x19b6('0x1'));var logger=require(_0x19b6('0x2'))('api');var moment=require('moment');var BPromise=require(_0x19b6('0x3'));var rp=require(_0x19b6('0x4'));var fs=require('fs');var path=require(_0x19b6('0x5'));var rimraf=require(_0x19b6('0x6'));var config=require(_0x19b6('0x7'));var attributes=require(_0x19b6('0x8'));module['exports']=function(_0x3823f6,_0x428666){return _0x3823f6['define'](_0x19b6('0x9'),attributes,{'tableName':_0x19b6('0xa'),'paranoid':![],'indexes':[{'name':_0x19b6('0xb'),'fields':[_0x19b6('0xb')]}],'timestamps':!![]});}; \ No newline at end of file +var _0x6dba=['../../config/environment','./smsTransferReport.attributes','SmsTransferReport','uniqueid','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path'];(function(_0x523832,_0x55520e){var _0x1badfc=function(_0x392fa0){while(--_0x392fa0){_0x523832['push'](_0x523832['shift']());}};_0x1badfc(++_0x55520e);}(_0x6dba,0x13c));var _0xa6db=function(_0xfd5211,_0x490686){_0xfd5211=_0xfd5211-0x0;var _0x19797d=_0x6dba[_0xfd5211];return _0x19797d;};'use strict';var _=require(_0xa6db('0x0'));var util=require(_0xa6db('0x1'));var logger=require(_0xa6db('0x2'))(_0xa6db('0x3'));var moment=require(_0xa6db('0x4'));var BPromise=require(_0xa6db('0x5'));var rp=require(_0xa6db('0x6'));var fs=require('fs');var path=require(_0xa6db('0x7'));var rimraf=require('rimraf');var config=require(_0xa6db('0x8'));var attributes=require(_0xa6db('0x9'));module['exports']=function(_0x5b2799,_0x3e1f92){return _0x5b2799['define'](_0xa6db('0xa'),attributes,{'tableName':'report_sms_transfer','paranoid':![],'indexes':[{'name':'uniqueid','fields':[_0xa6db('0xb')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/smsTransferReport/smsTransferReport.rpc.js b/server/api/smsTransferReport/smsTransferReport.rpc.js index 360eac7..790ce1c 100644 --- a/server/api/smsTransferReport/smsTransferReport.rpc.js +++ b/server/api/smsTransferReport/smsTransferReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x295f=['request\x20sent','debug','SmsTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','util','moment','bluebird','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','client','http','request','then','info','SmsTransferReport,\x20%s,\x20%s'];(function(_0x46fd4d,_0x4b67f3){var _0x47785f=function(_0x35913c){while(--_0x35913c){_0x46fd4d['push'](_0x46fd4d['shift']());}};_0x47785f(++_0x4b67f3);}(_0x295f,0x168));var _0xf295=function(_0x1b6d85,_0x5de836){_0x1b6d85=_0x1b6d85-0x0;var _0x615cfa=_0x295f[_0x1b6d85];return _0x615cfa;};'use strict';var _=require('lodash');var util=require(_0xf295('0x0'));var moment=require(_0xf295('0x1'));var BPromise=require(_0xf295('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xf295('0x3'));var db=require(_0xf295('0x4'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xf295('0x5'));var config=require(_0xf295('0x6'));var jayson=require(_0xf295('0x7'));var client=jayson[_0xf295('0x8')][_0xf295('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x50a890,_0x2b302f,_0x44e292){return new BPromise(function(_0x1f3320,_0x4041d5){return client[_0xf295('0xa')](_0x50a890,_0x44e292)[_0xf295('0xb')](function(_0xaf1853){logger[_0xf295('0xc')](_0xf295('0xd'),_0x2b302f,_0xf295('0xe'));logger[_0xf295('0xf')](_0xf295('0x10'),_0x2b302f,'request\x20sent',JSON[_0xf295('0x11')](_0xaf1853));if(_0xaf1853[_0xf295('0x12')]){if(_0xaf1853['error'][_0xf295('0x13')]===0x1f4){logger[_0xf295('0x12')](_0xf295('0xd'),_0x2b302f,_0xaf1853[_0xf295('0x12')][_0xf295('0x14')]);return _0x4041d5(_0xaf1853[_0xf295('0x12')][_0xf295('0x14')]);}logger[_0xf295('0x12')](_0xf295('0xd'),_0x2b302f,_0xaf1853[_0xf295('0x12')][_0xf295('0x14')]);return _0x1f3320(_0xaf1853[_0xf295('0x12')][_0xf295('0x14')]);}else{logger[_0xf295('0xc')](_0xf295('0xd'),_0x2b302f,_0xf295('0xe'));_0x1f3320(_0xaf1853[_0xf295('0x15')][_0xf295('0x14')]);}})['catch'](function(_0x57e1bc){logger[_0xf295('0x12')](_0xf295('0xd'),_0x2b302f,_0x57e1bc);_0x4041d5(_0x57e1bc);});});} \ No newline at end of file +var _0x1db9=['../../config/utils','../../config/logger','jayson/promise','then','info','SmsTransferReport,\x20%s,\x20%s','request\x20sent','SmsTransferReport,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis'];(function(_0x200e0e,_0x42dcd5){var _0x18a3d7=function(_0x5dac6c){while(--_0x5dac6c){_0x200e0e['push'](_0x200e0e['shift']());}};_0x18a3d7(++_0x42dcd5);}(_0x1db9,0x176));var _0x91db=function(_0x295ba9,_0x40d6ab){_0x295ba9=_0x295ba9-0x0;var _0x45133c=_0x1db9[_0x295ba9];return _0x45133c;};'use strict';var _=require(_0x91db('0x0'));var util=require(_0x91db('0x1'));var moment=require(_0x91db('0x2'));var BPromise=require(_0x91db('0x3'));var rs=require(_0x91db('0x4'));var fs=require('fs');var Redis=require(_0x91db('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x91db('0x6'));var logger=require(_0x91db('0x7'))('rpc');var config=require('../../config/environment');var jayson=require(_0x91db('0x8'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x433c75,_0x3b0c53,_0x45fea0){return new BPromise(function(_0x2330c2,_0x2d89a1){return client['request'](_0x433c75,_0x45fea0)[_0x91db('0x9')](function(_0x58cda2){logger[_0x91db('0xa')](_0x91db('0xb'),_0x3b0c53,_0x91db('0xc'));logger['debug'](_0x91db('0xd'),_0x3b0c53,'request\x20sent',JSON['stringify'](_0x58cda2));if(_0x58cda2['error']){if(_0x58cda2[_0x91db('0xe')][_0x91db('0xf')]===0x1f4){logger['error']('SmsTransferReport,\x20%s,\x20%s',_0x3b0c53,_0x58cda2[_0x91db('0xe')][_0x91db('0x10')]);return _0x2d89a1(_0x58cda2[_0x91db('0xe')][_0x91db('0x10')]);}logger[_0x91db('0xe')]('SmsTransferReport,\x20%s,\x20%s',_0x3b0c53,_0x58cda2[_0x91db('0xe')][_0x91db('0x10')]);return _0x2330c2(_0x58cda2[_0x91db('0xe')][_0x91db('0x10')]);}else{logger[_0x91db('0xa')](_0x91db('0xb'),_0x3b0c53,_0x91db('0xc'));_0x2330c2(_0x58cda2[_0x91db('0x11')][_0x91db('0x10')]);}})[_0x91db('0x12')](function(_0x1e9679){logger[_0x91db('0xe')]('SmsTransferReport,\x20%s,\x20%s',_0x3b0c53,_0x1e9679);_0x2d89a1(_0x1e9679);});});} \ No newline at end of file diff --git a/server/api/sound/index.js b/server/api/sound/index.js index 97c2b05..78f35e2 100644 --- a/server/api/sound/index.js +++ b/server/api/sound/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5387=['basename','now','extname','post','file','put','update','delete','/:id','exports','util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','index','get','isAuthenticated','show','/:id/download','diskStorage','root','server/files/sounds/original/','originalname','replace'];(function(_0x562cd7,_0x5ae8e7){var _0x30f50d=function(_0x43b995){while(--_0x43b995){_0x562cd7['push'](_0x562cd7['shift']());}};_0x30f50d(++_0x5ae8e7);}(_0x5387,0xfd));var _0x7538=function(_0x3c6927,_0xe82e74){_0x3c6927=_0x3c6927-0x0;var _0x4ae48a=_0x5387[_0x3c6927];return _0x4ae48a;};'use strict';var multer=require('multer');var util=require(_0x7538('0x0'));var path=require(_0x7538('0x1'));var timeout=require(_0x7538('0x2'));var express=require('express');var router=express[_0x7538('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x7538('0x4'));var interaction=require(_0x7538('0x5'));var config=require(_0x7538('0x6'));var controller=require('./sound.controller');router['get']('/',auth['isAuthenticated'](),controller[_0x7538('0x7')]);router[_0x7538('0x8')]('/:id',auth[_0x7538('0x9')](),controller[_0x7538('0xa')]);router[_0x7538('0x8')](_0x7538('0xb'),auth['isAuthenticated'](),controller['download']);var upload=multer({'storage':multer[_0x7538('0xc')]({'destination':function(_0x4d264c,_0x3ecf52,_0x2c5b1d){_0x2c5b1d(null,path['join'](config[_0x7538('0xd')],_0x7538('0xe')));},'filename':function(_0x1b34a6,_0x4aeeac,_0x35491e){_0x4aeeac[_0x7538('0xf')]=_0x4aeeac[_0x7538('0xf')][_0x7538('0x10')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x35491e(null,util['format']('%s-%s%s',path[_0x7538('0x11')](_0x4aeeac[_0x7538('0xf')],path['extname'](_0x4aeeac[_0x7538('0xf')])),Date[_0x7538('0x12')](),path[_0x7538('0x13')](_0x4aeeac[_0x7538('0xf')])));}})});router[_0x7538('0x14')]('/',upload['single'](_0x7538('0x15')),controller['create']);router[_0x7538('0x16')]('/:id',auth[_0x7538('0x9')](),controller[_0x7538('0x17')]);router[_0x7538('0x18')](_0x7538('0x19'),auth['isAuthenticated'](),controller[_0x7538('0x18')]);module[_0x7538('0x1a')]=router; \ No newline at end of file +var _0xfb02=['path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','./sound.controller','get','index','show','download','join','root','server/files/sounds/original/','originalname','replace','format','%s-%s%s','basename','now','extname','post','file','/:id','isAuthenticated','delete','exports'];(function(_0x372515,_0xdd11f){var _0xa3bf4e=function(_0x212cc8){while(--_0x212cc8){_0x372515['push'](_0x372515['shift']());}};_0xa3bf4e(++_0xdd11f);}(_0xfb02,0x70));var _0x2fb0=function(_0x48c615,_0x4cc757){_0x48c615=_0x48c615-0x0;var _0x3d9e22=_0xfb02[_0x48c615];return _0x3d9e22;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x2fb0('0x0'));var timeout=require(_0x2fb0('0x1'));var express=require(_0x2fb0('0x2'));var router=express[_0x2fb0('0x3')]();var fs_extra=require(_0x2fb0('0x4'));var auth=require(_0x2fb0('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x2fb0('0x6'));var controller=require(_0x2fb0('0x7'));router[_0x2fb0('0x8')]('/',auth['isAuthenticated'](),controller[_0x2fb0('0x9')]);router['get']('/:id',auth['isAuthenticated'](),controller[_0x2fb0('0xa')]);router['get']('/:id/download',auth['isAuthenticated'](),controller[_0x2fb0('0xb')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x3124bd,_0x277c6c,_0x4839e5){_0x4839e5(null,path[_0x2fb0('0xc')](config[_0x2fb0('0xd')],_0x2fb0('0xe')));},'filename':function(_0x2f968c,_0x4b1b23,_0x4325ce){_0x4b1b23[_0x2fb0('0xf')]=_0x4b1b23[_0x2fb0('0xf')][_0x2fb0('0x10')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x4325ce(null,util[_0x2fb0('0x11')](_0x2fb0('0x12'),path[_0x2fb0('0x13')](_0x4b1b23[_0x2fb0('0xf')],path['extname'](_0x4b1b23['originalname'])),Date[_0x2fb0('0x14')](),path[_0x2fb0('0x15')](_0x4b1b23[_0x2fb0('0xf')])));}})});router[_0x2fb0('0x16')]('/',upload['single'](_0x2fb0('0x17')),controller['create']);router['put'](_0x2fb0('0x18'),auth[_0x2fb0('0x19')](),controller['update']);router[_0x2fb0('0x1a')]('/:id',auth[_0x2fb0('0x19')](),controller[_0x2fb0('0x1a')]);module[_0x2fb0('0x1b')]=router; \ No newline at end of file diff --git a/server/api/sound/sound.attributes.js b/server/api/sound/sound.attributes.js index 3544907..84680e8 100644 --- a/server/api/sound/sound.attributes.js +++ b/server/api/sound/sound.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfa20=['exports','STRING','name','INTEGER','BIGINT','sequelize'];(function(_0x5e9b0e,_0x26a64f){var _0x191032=function(_0xff2034){while(--_0xff2034){_0x5e9b0e['push'](_0x5e9b0e['shift']());}};_0x191032(++_0x26a64f);}(_0xfa20,0x1d9));var _0x0fa2=function(_0x501f4d,_0x51b9d9){_0x501f4d=_0x501f4d-0x0;var _0x199d85=_0xfa20[_0x501f4d];return _0x199d85;};'use strict';var Sequelize=require(_0x0fa2('0x0'));module[_0x0fa2('0x1')]={'name':{'type':Sequelize[_0x0fa2('0x2')],'unique':_0x0fa2('0x3'),'allowNull':![]},'save_name':{'type':Sequelize['STRING']},'display_name':{'type':Sequelize[_0x0fa2('0x2')],'defaultValue':''},'description':{'type':Sequelize[_0x0fa2('0x2')]},'original_format':{'type':Sequelize[_0x0fa2('0x2')]},'original_duration':{'type':Sequelize['FLOAT']},'original_sampleCount':{'type':Sequelize['BIGINT']},'original_channelCount':{'type':Sequelize[_0x0fa2('0x4')]},'original_bitRate':{'type':Sequelize[_0x0fa2('0x5')]},'original_sampleRate':{'type':Sequelize[_0x0fa2('0x4')]},'converted_format':{'type':Sequelize['STRING']},'converted_duration':{'type':Sequelize['FLOAT']},'converted_sampleCount':{'type':Sequelize[_0x0fa2('0x5')]},'converted_channelCount':{'type':Sequelize[_0x0fa2('0x4')]},'converted_bitRate':{'type':Sequelize[_0x0fa2('0x5')]},'converted_sampleRate':{'type':Sequelize[_0x0fa2('0x4')]}}; \ No newline at end of file +var _0x379f=['STRING','FLOAT','INTEGER','BIGINT','name'];(function(_0x4ad37c,_0x2e7490){var _0x288919=function(_0x3988a2){while(--_0x3988a2){_0x4ad37c['push'](_0x4ad37c['shift']());}};_0x288919(++_0x2e7490);}(_0x379f,0x149));var _0xf379=function(_0x48ca9b,_0x38deb1){_0x48ca9b=_0x48ca9b-0x0;var _0x19b43c=_0x379f[_0x48ca9b];return _0x19b43c;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize['STRING'],'unique':_0xf379('0x0'),'allowNull':![]},'save_name':{'type':Sequelize[_0xf379('0x1')]},'display_name':{'type':Sequelize['STRING'],'defaultValue':''},'description':{'type':Sequelize[_0xf379('0x1')]},'original_format':{'type':Sequelize['STRING']},'original_duration':{'type':Sequelize[_0xf379('0x2')]},'original_sampleCount':{'type':Sequelize['BIGINT']},'original_channelCount':{'type':Sequelize[_0xf379('0x3')]},'original_bitRate':{'type':Sequelize[_0xf379('0x4')]},'original_sampleRate':{'type':Sequelize[_0xf379('0x3')]},'converted_format':{'type':Sequelize[_0xf379('0x1')]},'converted_duration':{'type':Sequelize['FLOAT']},'converted_sampleCount':{'type':Sequelize['BIGINT']},'converted_channelCount':{'type':Sequelize[_0xf379('0x3')]},'converted_bitRate':{'type':Sequelize[_0xf379('0x4')]},'converted_sampleRate':{'type':Sequelize[_0xf379('0x3')]}}; \ No newline at end of file diff --git a/server/api/sound/sound.controller.js b/server/api/sound/sound.controller.js index 40b9306..8b8b49c 100644 --- a/server/api/sound/sound.controller.js +++ b/server/api/sound/sound.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb575=['rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','end','status','json','undefined','limit','count','offset','set','Content-Range','apply','reject','save','then','destroy','get','Sounds','UserProfileResource','stack','name','send','index','Sound','fieldName','type','key','model','map','query','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','pick','filter','merge','VIRTUAL','options','include','findAll','catch','show','params','keys','includeAll','find','save_name','converted_format','existsSync','join','server/files/sounds/converted','Sequelize','ValidationError','Sound\x20not\x20found','download','root','format','%s.%s','create','file','originalname','extname','basename','filename','wav','server/files/sounds/original','info','Sound\x20upload\x20filepath:\x20%s','Sound\x20upload\x20destination:\x20%s','chmodSync','transcode','error','unlinkSync','original_duration','duration','original_sampleCount','sampleCount','original_channelCount','channelCount','bitRate','sampleRate','dest','converted_duration','converted_sampleCount','converted_channelCount','converted_bitRate','body','userProfileId','role','user','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','start','description','delete','original_format','eml-format'];(function(_0x27aeb6,_0x5bc3f6){var _0x29b71b=function(_0x1bcbbd){while(--_0x1bcbbd){_0x27aeb6['push'](_0x27aeb6['shift']());}};_0x29b71b(++_0x5bc3f6);}(_0xb575,0xff));var _0x5b57=function(_0x1b5cd0,_0x42f898){_0x1b5cd0=_0x1b5cd0-0x0;var _0x1f8a46=_0xb575[_0x1b5cd0];return _0x1f8a46;};'use strict';var emlformat=require(_0x5b57('0x0'));var rimraf=require(_0x5b57('0x1'));var zipdir=require(_0x5b57('0x2'));var jsonpatch=require(_0x5b57('0x3'));var rp=require(_0x5b57('0x4'));var moment=require('moment');var BPromise=require(_0x5b57('0x5'));var Mustache=require(_0x5b57('0x6'));var util=require(_0x5b57('0x7'));var path=require(_0x5b57('0x8'));var sox=require('sox');var csv=require(_0x5b57('0x9'));var ejs=require(_0x5b57('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x5b57('0xb'));var squel=require(_0x5b57('0xc'));var crypto=require(_0x5b57('0xd'));var jsforce=require(_0x5b57('0xe'));var deskjs=require(_0x5b57('0xf'));var toCsv=require('to-csv');var querystring=require(_0x5b57('0x10'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x5b57('0x11'));var qs=require(_0x5b57('0x12'));var as=require(_0x5b57('0x13'));var hardwareService=require(_0x5b57('0x14'));var logger=require(_0x5b57('0x15'))(_0x5b57('0x16'));var utils=require(_0x5b57('0x17'));var config=require(_0x5b57('0x18'));var licenseUtil=require(_0x5b57('0x19'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x3ade3c,_0x24179b){_0x24179b=_0x24179b||0xcc;return function(_0x20364){if(_0x20364){return _0x3ade3c[_0x5b57('0x1a')](_0x24179b);}return _0x3ade3c['status'](_0x24179b)[_0x5b57('0x1b')]();};}function respondWithResult(_0x381d5b,_0x236b8b){_0x236b8b=_0x236b8b||0xc8;return function(_0x3966d8){if(_0x3966d8){return _0x381d5b[_0x5b57('0x1c')](_0x236b8b)[_0x5b57('0x1d')](_0x3966d8);}};}function respondWithFilteredResult(_0x1c5b15,_0x1ac9d6){return function(_0x5bcd29){if(_0x5bcd29){var _0x4d6887=typeof _0x1ac9d6['offset']===_0x5b57('0x1e')&&typeof _0x1ac9d6[_0x5b57('0x1f')]===_0x5b57('0x1e');var _0xbf275b=_0x5bcd29[_0x5b57('0x20')];var _0x33d45f=_0x4d6887?0x0:_0x1ac9d6[_0x5b57('0x21')];var _0x46da63=_0x4d6887?_0x5bcd29[_0x5b57('0x20')]:_0x1ac9d6[_0x5b57('0x21')]+_0x1ac9d6[_0x5b57('0x1f')];var _0x1511ad;if(_0x46da63>=_0xbf275b){_0x46da63=_0xbf275b;_0x1511ad=0xc8;}else{_0x1511ad=0xce;}_0x1c5b15[_0x5b57('0x1c')](_0x1511ad);return _0x1c5b15[_0x5b57('0x22')](_0x5b57('0x23'),_0x33d45f+'-'+_0x46da63+'/'+_0xbf275b)[_0x5b57('0x1d')](_0x5bcd29);}return null;};}function patchUpdates(_0xc344ee){return function(_0x29c7bb){try{jsonpatch[_0x5b57('0x24')](_0x29c7bb,_0xc344ee,!![]);}catch(_0x42810f){return BPromise[_0x5b57('0x25')](_0x42810f);}return _0x29c7bb[_0x5b57('0x26')]();};}function saveUpdates(_0xa85860,_0x22b904){return function(_0x21afa7){if(_0x21afa7){return _0x21afa7['update'](_0xa85860)[_0x5b57('0x27')](function(_0x473e9c){return _0x473e9c;});}return null;};}function removeEntity(_0x2f4e2d,_0x4a84fa){return function(_0x13da15){if(_0x13da15){return _0x13da15[_0x5b57('0x28')]()['then'](function(){var _0x248219=_0x13da15[_0x5b57('0x29')]({'plain':!![]});var _0x1f3e48=_0x5b57('0x2a');return db[_0x5b57('0x2b')][_0x5b57('0x28')]({'where':{'type':_0x1f3e48,'resourceId':_0x248219['id']}})[_0x5b57('0x27')](function(){return _0x13da15;});})[_0x5b57('0x27')](function(){_0x2f4e2d['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x3b76ed,_0x50d588){return function(_0x448afa){if(!_0x448afa){_0x3b76ed[_0x5b57('0x1a')](0x194);}return _0x448afa;};}function handleError(_0x351907,_0xa8982e){_0xa8982e=_0xa8982e||0x1f4;return function(_0x3a54f4){logger['error'](_0x3a54f4[_0x5b57('0x2c')]);if(_0x3a54f4[_0x5b57('0x2d')]){delete _0x3a54f4[_0x5b57('0x2d')];}_0x351907[_0x5b57('0x1c')](_0xa8982e)[_0x5b57('0x2e')](_0x3a54f4);};}exports[_0x5b57('0x2f')]=function(_0x1a50aa,_0x2034b6){var _0x26399c={},_0x1d41ce={},_0x384461={'count':0x0,'rows':[]};var _0x558c90=_['map'](db[_0x5b57('0x30')]['rawAttributes'],function(_0x3bd345){return{'name':_0x3bd345[_0x5b57('0x31')],'type':_0x3bd345[_0x5b57('0x32')][_0x5b57('0x33')]};});_0x1d41ce[_0x5b57('0x34')]=_[_0x5b57('0x35')](_0x558c90,'name');_0x1d41ce[_0x5b57('0x36')]=_['keys'](_0x1a50aa[_0x5b57('0x36')]);_0x1d41ce[_0x5b57('0x37')]=_[_0x5b57('0x38')](_0x1d41ce[_0x5b57('0x34')],_0x1d41ce[_0x5b57('0x36')]);_0x26399c[_0x5b57('0x39')]=_['intersection'](_0x1d41ce['model'],qs[_0x5b57('0x3a')](_0x1a50aa[_0x5b57('0x36')][_0x5b57('0x3a')]));_0x26399c[_0x5b57('0x39')]=_0x26399c['attributes'][_0x5b57('0x3b')]?_0x26399c[_0x5b57('0x39')]:_0x1d41ce[_0x5b57('0x34')];if(!_0x1a50aa[_0x5b57('0x36')][_0x5b57('0x3c')]('nolimit')){_0x26399c['limit']=qs[_0x5b57('0x1f')](_0x1a50aa[_0x5b57('0x36')]['limit']);_0x26399c[_0x5b57('0x21')]=qs['offset'](_0x1a50aa['query'][_0x5b57('0x21')]);}_0x26399c[_0x5b57('0x3d')]=qs[_0x5b57('0x3e')](_0x1a50aa[_0x5b57('0x36')][_0x5b57('0x3e')]);_0x26399c[_0x5b57('0x3f')]=qs[_0x5b57('0x37')](_[_0x5b57('0x40')](_0x1a50aa[_0x5b57('0x36')],_0x1d41ce[_0x5b57('0x37')]),_0x558c90);if(_0x1a50aa['query'][_0x5b57('0x41')]){_0x26399c['where']=_[_0x5b57('0x42')](_0x26399c[_0x5b57('0x3f')],{'$or':_['map'](_0x558c90,function(_0x520691){if(_0x520691[_0x5b57('0x32')]!==_0x5b57('0x43')){var _0xb59e98={};_0xb59e98[_0x520691[_0x5b57('0x2d')]]={'$like':'%'+_0x1a50aa['query'][_0x5b57('0x41')]+'%'};return _0xb59e98;}})});}_0x26399c=_[_0x5b57('0x42')]({},_0x26399c,_0x1a50aa[_0x5b57('0x44')]);var _0x258e86={'where':_0x26399c[_0x5b57('0x3f')]};return db[_0x5b57('0x30')]['count'](_0x258e86)[_0x5b57('0x27')](function(_0x4c98f2){_0x384461[_0x5b57('0x20')]=_0x4c98f2;if(_0x1a50aa[_0x5b57('0x36')]['includeAll']){_0x26399c[_0x5b57('0x45')]=[{'all':!![]}];}return db[_0x5b57('0x30')][_0x5b57('0x46')](_0x26399c);})['then'](function(_0x4a8ce5){_0x384461['rows']=_0x4a8ce5;return _0x384461;})[_0x5b57('0x27')](respondWithFilteredResult(_0x2034b6,_0x26399c))[_0x5b57('0x47')](handleError(_0x2034b6,null));};exports[_0x5b57('0x48')]=function(_0xc833ec,_0x13959e){var _0x2722fe={'raw':!![],'where':{'id':_0xc833ec[_0x5b57('0x49')]['id']}},_0x555c24={};_0x555c24[_0x5b57('0x34')]=_['keys'](db[_0x5b57('0x30')]['rawAttributes']);_0x555c24[_0x5b57('0x36')]=_[_0x5b57('0x4a')](_0xc833ec['query']);_0x555c24[_0x5b57('0x37')]=_[_0x5b57('0x38')](_0x555c24[_0x5b57('0x34')],_0x555c24[_0x5b57('0x36')]);_0x2722fe['attributes']=_[_0x5b57('0x38')](_0x555c24[_0x5b57('0x34')],qs[_0x5b57('0x3a')](_0xc833ec['query'][_0x5b57('0x3a')]));_0x2722fe[_0x5b57('0x39')]=_0x2722fe['attributes'][_0x5b57('0x3b')]?_0x2722fe['attributes']:_0x555c24[_0x5b57('0x34')];if(_0xc833ec[_0x5b57('0x36')][_0x5b57('0x4b')]){_0x2722fe[_0x5b57('0x45')]=[{'all':!![]}];}_0x2722fe=_[_0x5b57('0x42')]({},_0x2722fe,_0xc833ec['options']);return db['Sound'][_0x5b57('0x4c')](_0x2722fe)[_0x5b57('0x27')](handleEntityNotFound(_0x13959e,null))['then'](respondWithResult(_0x13959e,null))['catch'](handleError(_0x13959e,null));};exports['download']=function(_0x1d636c,_0x17bb0e,_0x4fb284){return db[_0x5b57('0x30')]['find']({'where':{'id':_0x1d636c[_0x5b57('0x49')]['id']},'attributes':['name',_0x5b57('0x4d'),_0x5b57('0x4e')],'raw':!![]})['then'](handleEntityNotFound(_0x17bb0e,null))[_0x5b57('0x27')](function(_0x32a775){if(_0x32a775){if(!fs[_0x5b57('0x4f')](path[_0x5b57('0x50')](config['root'],_0x5b57('0x51'),_0x32a775[_0x5b57('0x4d')]+'.'+_0x32a775[_0x5b57('0x4e')]))){throw new db[(_0x5b57('0x52'))][(_0x5b57('0x53'))](_0x5b57('0x54'));}return _0x17bb0e[_0x5b57('0x55')](path[_0x5b57('0x50')](config[_0x5b57('0x56')],_0x5b57('0x51'),util[_0x5b57('0x57')](_0x5b57('0x58'),_0x32a775[_0x5b57('0x4d')],_0x32a775['converted_format'])),util[_0x5b57('0x57')]('%s.%s',_0x32a775['name'],_0x32a775[_0x5b57('0x4e')]));}return null;})[_0x5b57('0x47')](handleError(_0x17bb0e,null));};exports[_0x5b57('0x59')]=function(_0x336080,_0x26d30d,_0x2174e4){var _0x2040e0={'name':path['basename'](_0x336080[_0x5b57('0x5a')][_0x5b57('0x5b')],path[_0x5b57('0x5c')](_0x336080[_0x5b57('0x5a')][_0x5b57('0x5b')])),'save_name':path[_0x5b57('0x5d')](_0x336080[_0x5b57('0x5a')]['filename'],path['extname'](_0x336080['file'][_0x5b57('0x5e')])),'original_format':path['extname'](_0x336080[_0x5b57('0x5a')][_0x5b57('0x5b')])['substring'](0x1),'converted_format':_0x5b57('0x5f')};var _0x898cdc=path[_0x5b57('0x50')](config[_0x5b57('0x56')],_0x5b57('0x60'),_0x336080['file']['filename']);var _0x5bb6f1=path[_0x5b57('0x50')](config['root'],_0x5b57('0x51'),util[_0x5b57('0x57')](_0x5b57('0x58'),path[_0x5b57('0x5d')](_0x336080[_0x5b57('0x5a')][_0x5b57('0x5e')],path[_0x5b57('0x5c')](_0x336080['file'][_0x5b57('0x5e')])),_0x2040e0[_0x5b57('0x4e')]));logger[_0x5b57('0x61')](_0x5b57('0x62'),_0x898cdc);logger[_0x5b57('0x61')](_0x5b57('0x63'),_0x5bb6f1);try{fs[_0x5b57('0x64')](_0x898cdc,parseInt('0777',0x8));var _0x50b900=sox[_0x5b57('0x65')](_0x898cdc,_0x5bb6f1,{'sampleRate':0x1f40,'format':'wav','channelCount':0x1,'bitRate':0xc0*0x400,'compressionQuality':0x5});_0x50b900['on'](_0x5b57('0x66'),function(_0x41740d){fs[_0x5b57('0x67')](_0x898cdc);_0x26d30d['status'](0x1f4)[_0x5b57('0x2e')](_0x41740d);});_0x50b900['on']('src',function(_0x2a100b){_0x2040e0[_0x5b57('0x68')]=isNaN(_0x2a100b[_0x5b57('0x69')])?null:_0x2a100b['duration']*0x3e8;_0x2040e0[_0x5b57('0x6a')]=isNaN(_0x2a100b['sampleCount'])?null:_0x2a100b[_0x5b57('0x6b')];_0x2040e0[_0x5b57('0x6c')]=isNaN(_0x2a100b[_0x5b57('0x6d')])?null:_0x2a100b['channelCount'];_0x2040e0['original_bitRate']=isNaN(_0x2a100b[_0x5b57('0x6e')])?null:_0x2a100b['bitRate'];_0x2040e0['original_sampleRate']=isNaN(_0x2a100b[_0x5b57('0x6f')])?null:_0x2a100b[_0x5b57('0x6f')];});_0x50b900['on'](_0x5b57('0x70'),function(_0x34c610){_0x2040e0[_0x5b57('0x71')]=isNaN(_0x34c610['duration'])?null:_0x34c610['duration']*0x3e8;_0x2040e0[_0x5b57('0x72')]=isNaN(_0x34c610['sampleCount'])?null:_0x34c610[_0x5b57('0x6b')];_0x2040e0[_0x5b57('0x73')]=isNaN(_0x34c610['channelCount'])?null:_0x34c610[_0x5b57('0x6d')];_0x2040e0[_0x5b57('0x74')]=isNaN(_0x34c610[_0x5b57('0x6e')])?null:_0x34c610[_0x5b57('0x6e')];_0x2040e0['converted_sampleRate']=isNaN(_0x34c610[_0x5b57('0x6f')])?null:_0x34c610[_0x5b57('0x6f')];});_0x50b900['on']('end',function(){fs[_0x5b57('0x64')](_0x5bb6f1,parseInt('0777',0x8));return db[_0x5b57('0x30')][_0x5b57('0x59')](_0x2040e0)[_0x5b57('0x27')](function(_0x4d454f){var _0x285db9={'role':_0x336080[_0x5b57('0x75')]['role'],'userProfileId':_0x336080['body'][_0x5b57('0x76')]};if(!_0x285db9)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x285db9[_0x5b57('0x77')]===_0x5b57('0x78')){var _0xfc5da8=_0x4d454f[_0x5b57('0x29')]({'plain':!![]});return db[_0x5b57('0x79')][_0x5b57('0x4c')]({'where':{'name':_0x5b57('0x2a'),'userProfileId':_0x285db9['userProfileId']},'raw':!![]})['then'](function(_0x1fe8ae){if(_0x1fe8ae&&_0x1fe8ae[_0x5b57('0x7a')]===0x0){return db['UserProfileResource'][_0x5b57('0x59')]({'name':_0xfc5da8['name'],'resourceId':_0xfc5da8['id'],'type':_0x1fe8ae[_0x5b57('0x2d')],'sectionId':_0x1fe8ae['id']},{})[_0x5b57('0x27')](function(){return _0x4d454f;});}else{return _0x4d454f;}})[_0x5b57('0x47')](function(_0xe44ae4){logger[_0x5b57('0x66')](_0x5b57('0x7b'),_0xe44ae4);throw _0xe44ae4;});}return _0x4d454f;})[_0x5b57('0x27')](respondWithResult(_0x26d30d,null))[_0x5b57('0x47')](handleError(_0x26d30d,null));});_0x50b900[_0x5b57('0x7c')]();}catch(_0x3a9ffd){_0x26d30d[_0x5b57('0x1c')](0x1f4)[_0x5b57('0x2e')](_0x3a9ffd);}};exports['update']=function(_0x38a29f,_0x43e785,_0x37453d){return db['Sound'][_0x5b57('0x4c')]({'where':{'id':_0x38a29f[_0x5b57('0x49')]['id']}})['then'](handleEntityNotFound(_0x43e785,null))[_0x5b57('0x27')](saveUpdates(_[_0x5b57('0x40')](_0x38a29f['body'],[_0x5b57('0x2d'),_0x5b57('0x7d')]),null))[_0x5b57('0x27')](respondWithResult(_0x43e785,null))[_0x5b57('0x47')](handleError(_0x43e785,null));};exports[_0x5b57('0x7e')]=function(_0x183c04,_0x17edec,_0x2a936e){return db[_0x5b57('0x30')][_0x5b57('0x4c')]({'where':{'id':_0x183c04['params']['id']}})[_0x5b57('0x27')](function(_0xff708b){if(_0xff708b){return _0xff708b[_0x5b57('0x28')]();}})[_0x5b57('0x27')](function(_0x5e0e69){var _0x49a024=path[_0x5b57('0x50')](config[_0x5b57('0x56')],_0x5b57('0x60'),util[_0x5b57('0x57')](_0x5b57('0x58'),_0x5e0e69[_0x5b57('0x4d')],_0x5e0e69[_0x5b57('0x7f')]));var _0x1ecbf9=path['join'](config[_0x5b57('0x56')],_0x5b57('0x51'),util['format'](_0x5b57('0x58'),_0x5e0e69[_0x5b57('0x4d')],_0x5e0e69['converted_format']));fs[_0x5b57('0x67')](_0x49a024);fs[_0x5b57('0x67')](_0x1ecbf9);return _0x5e0e69;})[_0x5b57('0x27')](function(_0x41a1a0){if(_0x41a1a0){return _0x17edec[_0x5b57('0x1c')](0xcc)[_0x5b57('0x1b')]();}})['then'](handleEntityNotFound(_0x17edec,null))[_0x5b57('0x47')](handleError(_0x17edec,null));}; \ No newline at end of file +var _0xf6a9=['find','catch','download','save_name','converted_format','existsSync','join','server/files/sounds/converted','ValidationError','Sound\x20not\x20found','root','format','%s.%s','create','file','originalname','extname','basename','filename','server/files/sounds/original','info','Sound\x20upload\x20filepath:\x20%s','Sound\x20upload\x20destination:\x20%s','chmodSync','0777','transcode','unlinkSync','original_duration','duration','sampleCount','original_channelCount','channelCount','original_bitRate','bitRate','original_sampleRate','sampleRate','dest','converted_duration','converted_bitRate','converted_sampleRate','body','userProfileId','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','start','update','description','delete','original_format','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','to-csv','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/environment','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','then','destroy','get','Sounds','UserProfileResource','end','error','stack','name','send','index','map','Sound','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','pick','where','VIRTUAL','filter','merge','includeAll','rows','params'];(function(_0x13a3bd,_0x4f39b5){var _0x51932f=function(_0x50b090){while(--_0x50b090){_0x13a3bd['push'](_0x13a3bd['shift']());}};_0x51932f(++_0x4f39b5);}(_0xf6a9,0x1ac));var _0x9f6a=function(_0x43c33e,_0x426fb1){_0x43c33e=_0x43c33e-0x0;var _0x6c0c2c=_0xf6a9[_0x43c33e];return _0x6c0c2c;};'use strict';var emlformat=require(_0x9f6a('0x0'));var rimraf=require(_0x9f6a('0x1'));var zipdir=require(_0x9f6a('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x9f6a('0x3'));var moment=require(_0x9f6a('0x4'));var BPromise=require(_0x9f6a('0x5'));var Mustache=require(_0x9f6a('0x6'));var util=require(_0x9f6a('0x7'));var path=require('path');var sox=require('sox');var csv=require(_0x9f6a('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x9f6a('0x9'));var _=require(_0x9f6a('0xa'));var squel=require('squel');var crypto=require(_0x9f6a('0xb'));var jsforce=require(_0x9f6a('0xc'));var deskjs=require(_0x9f6a('0xd'));var toCsv=require('to-csv');var querystring=require(_0x9f6a('0xe'));var Papa=require(_0x9f6a('0xf'));var Redis=require(_0x9f6a('0x10'));var authService=require(_0x9f6a('0x11'));var qs=require(_0x9f6a('0x12'));var as=require(_0x9f6a('0x13'));var hardwareService=require(_0x9f6a('0x14'));var logger=require(_0x9f6a('0x15'))('api');var utils=require('../../config/utils');var config=require(_0x9f6a('0x16'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x58f8fb,_0x21daf7){_0x21daf7=_0x21daf7||0xcc;return function(_0x256e12){if(_0x256e12){return _0x58f8fb[_0x9f6a('0x17')](_0x21daf7);}return _0x58f8fb[_0x9f6a('0x18')](_0x21daf7)['end']();};}function respondWithResult(_0x275b2e,_0x3fd205){_0x3fd205=_0x3fd205||0xc8;return function(_0x2cfc66){if(_0x2cfc66){return _0x275b2e['status'](_0x3fd205)[_0x9f6a('0x19')](_0x2cfc66);}};}function respondWithFilteredResult(_0x24acb1,_0x3f697d){return function(_0x406a71){if(_0x406a71){var _0x2d2621=typeof _0x3f697d[_0x9f6a('0x1a')]===_0x9f6a('0x1b')&&typeof _0x3f697d[_0x9f6a('0x1c')]===_0x9f6a('0x1b');var _0x5a73e4=_0x406a71[_0x9f6a('0x1d')];var _0x5e8c58=_0x2d2621?0x0:_0x3f697d[_0x9f6a('0x1a')];var _0x38de6a=_0x2d2621?_0x406a71[_0x9f6a('0x1d')]:_0x3f697d['offset']+_0x3f697d['limit'];var _0x10c855;if(_0x38de6a>=_0x5a73e4){_0x38de6a=_0x5a73e4;_0x10c855=0xc8;}else{_0x10c855=0xce;}_0x24acb1[_0x9f6a('0x18')](_0x10c855);return _0x24acb1[_0x9f6a('0x1e')](_0x9f6a('0x1f'),_0x5e8c58+'-'+_0x38de6a+'/'+_0x5a73e4)['json'](_0x406a71);}return null;};}function patchUpdates(_0x3575aa){return function(_0x4b650b){try{jsonpatch[_0x9f6a('0x20')](_0x4b650b,_0x3575aa,!![]);}catch(_0x4a10ba){return BPromise[_0x9f6a('0x21')](_0x4a10ba);}return _0x4b650b[_0x9f6a('0x22')]();};}function saveUpdates(_0x2f3239,_0x568a9a){return function(_0x4521d2){if(_0x4521d2){return _0x4521d2['update'](_0x2f3239)[_0x9f6a('0x23')](function(_0x3d1156){return _0x3d1156;});}return null;};}function removeEntity(_0x36ab83,_0x7cd681){return function(_0x32ed37){if(_0x32ed37){return _0x32ed37[_0x9f6a('0x24')]()[_0x9f6a('0x23')](function(){var _0x5ce0be=_0x32ed37[_0x9f6a('0x25')]({'plain':!![]});var _0xf5c0c5=_0x9f6a('0x26');return db[_0x9f6a('0x27')][_0x9f6a('0x24')]({'where':{'type':_0xf5c0c5,'resourceId':_0x5ce0be['id']}})['then'](function(){return _0x32ed37;});})[_0x9f6a('0x23')](function(){_0x36ab83['status'](0xcc)[_0x9f6a('0x28')]();});}};}function handleEntityNotFound(_0x2268a6,_0x48b038){return function(_0x6a3198){if(!_0x6a3198){_0x2268a6[_0x9f6a('0x17')](0x194);}return _0x6a3198;};}function handleError(_0x185840,_0x46585b){_0x46585b=_0x46585b||0x1f4;return function(_0x15472b){logger[_0x9f6a('0x29')](_0x15472b[_0x9f6a('0x2a')]);if(_0x15472b[_0x9f6a('0x2b')]){delete _0x15472b['name'];}_0x185840[_0x9f6a('0x18')](_0x46585b)[_0x9f6a('0x2c')](_0x15472b);};}exports[_0x9f6a('0x2d')]=function(_0x5d0f98,_0x4927bd){var _0x402091={},_0x35dd63={},_0x30ca24={'count':0x0,'rows':[]};var _0x4e1b3f=_[_0x9f6a('0x2e')](db[_0x9f6a('0x2f')][_0x9f6a('0x30')],function(_0x67ca99){return{'name':_0x67ca99[_0x9f6a('0x31')],'type':_0x67ca99[_0x9f6a('0x32')][_0x9f6a('0x33')]};});_0x35dd63[_0x9f6a('0x34')]=_[_0x9f6a('0x2e')](_0x4e1b3f,_0x9f6a('0x2b'));_0x35dd63[_0x9f6a('0x35')]=_[_0x9f6a('0x36')](_0x5d0f98[_0x9f6a('0x35')]);_0x35dd63[_0x9f6a('0x37')]=_[_0x9f6a('0x38')](_0x35dd63['model'],_0x35dd63['query']);_0x402091['attributes']=_[_0x9f6a('0x38')](_0x35dd63[_0x9f6a('0x34')],qs[_0x9f6a('0x39')](_0x5d0f98[_0x9f6a('0x35')][_0x9f6a('0x39')]));_0x402091[_0x9f6a('0x3a')]=_0x402091['attributes'][_0x9f6a('0x3b')]?_0x402091['attributes']:_0x35dd63[_0x9f6a('0x34')];if(!_0x5d0f98[_0x9f6a('0x35')][_0x9f6a('0x3c')](_0x9f6a('0x3d'))){_0x402091['limit']=qs[_0x9f6a('0x1c')](_0x5d0f98[_0x9f6a('0x35')][_0x9f6a('0x1c')]);_0x402091[_0x9f6a('0x1a')]=qs[_0x9f6a('0x1a')](_0x5d0f98[_0x9f6a('0x35')][_0x9f6a('0x1a')]);}_0x402091[_0x9f6a('0x3e')]=qs[_0x9f6a('0x3f')](_0x5d0f98[_0x9f6a('0x35')][_0x9f6a('0x3f')]);_0x402091['where']=qs[_0x9f6a('0x37')](_[_0x9f6a('0x40')](_0x5d0f98[_0x9f6a('0x35')],_0x35dd63[_0x9f6a('0x37')]),_0x4e1b3f);if(_0x5d0f98[_0x9f6a('0x35')]['filter']){_0x402091[_0x9f6a('0x41')]=_['merge'](_0x402091[_0x9f6a('0x41')],{'$or':_[_0x9f6a('0x2e')](_0x4e1b3f,function(_0x214c32){if(_0x214c32[_0x9f6a('0x32')]!==_0x9f6a('0x42')){var _0x5a0e3b={};_0x5a0e3b[_0x214c32[_0x9f6a('0x2b')]]={'$like':'%'+_0x5d0f98['query'][_0x9f6a('0x43')]+'%'};return _0x5a0e3b;}})});}_0x402091=_[_0x9f6a('0x44')]({},_0x402091,_0x5d0f98['options']);var _0x6cc1e2={'where':_0x402091[_0x9f6a('0x41')]};return db['Sound'][_0x9f6a('0x1d')](_0x6cc1e2)[_0x9f6a('0x23')](function(_0x5eef21){_0x30ca24[_0x9f6a('0x1d')]=_0x5eef21;if(_0x5d0f98[_0x9f6a('0x35')][_0x9f6a('0x45')]){_0x402091['include']=[{'all':!![]}];}return db['Sound']['findAll'](_0x402091);})[_0x9f6a('0x23')](function(_0x59c7e5){_0x30ca24[_0x9f6a('0x46')]=_0x59c7e5;return _0x30ca24;})[_0x9f6a('0x23')](respondWithFilteredResult(_0x4927bd,_0x402091))['catch'](handleError(_0x4927bd,null));};exports['show']=function(_0x168814,_0x46df44){var _0x38c562={'raw':!![],'where':{'id':_0x168814[_0x9f6a('0x47')]['id']}},_0x43956b={};_0x43956b[_0x9f6a('0x34')]=_['keys'](db[_0x9f6a('0x2f')][_0x9f6a('0x30')]);_0x43956b[_0x9f6a('0x35')]=_['keys'](_0x168814[_0x9f6a('0x35')]);_0x43956b['filters']=_[_0x9f6a('0x38')](_0x43956b[_0x9f6a('0x34')],_0x43956b[_0x9f6a('0x35')]);_0x38c562[_0x9f6a('0x3a')]=_[_0x9f6a('0x38')](_0x43956b[_0x9f6a('0x34')],qs['fields'](_0x168814['query'][_0x9f6a('0x39')]));_0x38c562[_0x9f6a('0x3a')]=_0x38c562[_0x9f6a('0x3a')]['length']?_0x38c562[_0x9f6a('0x3a')]:_0x43956b[_0x9f6a('0x34')];if(_0x168814[_0x9f6a('0x35')][_0x9f6a('0x45')]){_0x38c562['include']=[{'all':!![]}];}_0x38c562=_[_0x9f6a('0x44')]({},_0x38c562,_0x168814['options']);return db[_0x9f6a('0x2f')][_0x9f6a('0x48')](_0x38c562)[_0x9f6a('0x23')](handleEntityNotFound(_0x46df44,null))['then'](respondWithResult(_0x46df44,null))[_0x9f6a('0x49')](handleError(_0x46df44,null));};exports[_0x9f6a('0x4a')]=function(_0x39683a,_0x28414f,_0x57304c){return db[_0x9f6a('0x2f')][_0x9f6a('0x48')]({'where':{'id':_0x39683a[_0x9f6a('0x47')]['id']},'attributes':[_0x9f6a('0x2b'),_0x9f6a('0x4b'),_0x9f6a('0x4c')],'raw':!![]})[_0x9f6a('0x23')](handleEntityNotFound(_0x28414f,null))['then'](function(_0x106e29){if(_0x106e29){if(!fs[_0x9f6a('0x4d')](path[_0x9f6a('0x4e')](config['root'],_0x9f6a('0x4f'),_0x106e29[_0x9f6a('0x4b')]+'.'+_0x106e29[_0x9f6a('0x4c')]))){throw new db['Sequelize'][(_0x9f6a('0x50'))](_0x9f6a('0x51'));}return _0x28414f[_0x9f6a('0x4a')](path['join'](config[_0x9f6a('0x52')],_0x9f6a('0x4f'),util[_0x9f6a('0x53')]('%s.%s',_0x106e29['save_name'],_0x106e29[_0x9f6a('0x4c')])),util[_0x9f6a('0x53')](_0x9f6a('0x54'),_0x106e29[_0x9f6a('0x2b')],_0x106e29['converted_format']));}return null;})['catch'](handleError(_0x28414f,null));};exports[_0x9f6a('0x55')]=function(_0x1007b9,_0x945742,_0x55b80e){var _0x50cd3b={'name':path['basename'](_0x1007b9[_0x9f6a('0x56')][_0x9f6a('0x57')],path[_0x9f6a('0x58')](_0x1007b9[_0x9f6a('0x56')][_0x9f6a('0x57')])),'save_name':path[_0x9f6a('0x59')](_0x1007b9['file']['filename'],path['extname'](_0x1007b9[_0x9f6a('0x56')][_0x9f6a('0x5a')])),'original_format':path['extname'](_0x1007b9['file'][_0x9f6a('0x57')])['substring'](0x1),'converted_format':'wav'};var _0x499e45=path[_0x9f6a('0x4e')](config['root'],_0x9f6a('0x5b'),_0x1007b9[_0x9f6a('0x56')][_0x9f6a('0x5a')]);var _0x516b4e=path[_0x9f6a('0x4e')](config[_0x9f6a('0x52')],_0x9f6a('0x4f'),util[_0x9f6a('0x53')]('%s.%s',path[_0x9f6a('0x59')](_0x1007b9[_0x9f6a('0x56')]['filename'],path[_0x9f6a('0x58')](_0x1007b9[_0x9f6a('0x56')]['filename'])),_0x50cd3b[_0x9f6a('0x4c')]));logger[_0x9f6a('0x5c')](_0x9f6a('0x5d'),_0x499e45);logger[_0x9f6a('0x5c')](_0x9f6a('0x5e'),_0x516b4e);try{fs[_0x9f6a('0x5f')](_0x499e45,parseInt(_0x9f6a('0x60'),0x8));var _0x1decf0=sox[_0x9f6a('0x61')](_0x499e45,_0x516b4e,{'sampleRate':0x1f40,'format':'wav','channelCount':0x1,'bitRate':0xc0*0x400,'compressionQuality':0x5});_0x1decf0['on']('error',function(_0x513fe3){fs[_0x9f6a('0x62')](_0x499e45);_0x945742[_0x9f6a('0x18')](0x1f4)[_0x9f6a('0x2c')](_0x513fe3);});_0x1decf0['on']('src',function(_0x34e5b8){_0x50cd3b[_0x9f6a('0x63')]=isNaN(_0x34e5b8[_0x9f6a('0x64')])?null:_0x34e5b8['duration']*0x3e8;_0x50cd3b['original_sampleCount']=isNaN(_0x34e5b8['sampleCount'])?null:_0x34e5b8[_0x9f6a('0x65')];_0x50cd3b[_0x9f6a('0x66')]=isNaN(_0x34e5b8[_0x9f6a('0x67')])?null:_0x34e5b8[_0x9f6a('0x67')];_0x50cd3b[_0x9f6a('0x68')]=isNaN(_0x34e5b8[_0x9f6a('0x69')])?null:_0x34e5b8['bitRate'];_0x50cd3b[_0x9f6a('0x6a')]=isNaN(_0x34e5b8[_0x9f6a('0x6b')])?null:_0x34e5b8[_0x9f6a('0x6b')];});_0x1decf0['on'](_0x9f6a('0x6c'),function(_0x469c4f){_0x50cd3b[_0x9f6a('0x6d')]=isNaN(_0x469c4f[_0x9f6a('0x64')])?null:_0x469c4f['duration']*0x3e8;_0x50cd3b['converted_sampleCount']=isNaN(_0x469c4f[_0x9f6a('0x65')])?null:_0x469c4f[_0x9f6a('0x65')];_0x50cd3b['converted_channelCount']=isNaN(_0x469c4f[_0x9f6a('0x67')])?null:_0x469c4f[_0x9f6a('0x67')];_0x50cd3b[_0x9f6a('0x6e')]=isNaN(_0x469c4f['bitRate'])?null:_0x469c4f[_0x9f6a('0x69')];_0x50cd3b[_0x9f6a('0x6f')]=isNaN(_0x469c4f[_0x9f6a('0x6b')])?null:_0x469c4f[_0x9f6a('0x6b')];});_0x1decf0['on']('end',function(){fs[_0x9f6a('0x5f')](_0x516b4e,parseInt('0777',0x8));return db[_0x9f6a('0x2f')][_0x9f6a('0x55')](_0x50cd3b)[_0x9f6a('0x23')](function(_0x2f1d82){var _0x528c2a={'role':_0x1007b9[_0x9f6a('0x70')]['role'],'userProfileId':_0x1007b9['body'][_0x9f6a('0x71')]};if(!_0x528c2a)throw new Error(_0x9f6a('0x72'));if(_0x528c2a[_0x9f6a('0x73')]===_0x9f6a('0x74')){var _0x443345=_0x2f1d82[_0x9f6a('0x25')]({'plain':!![]});return db[_0x9f6a('0x75')][_0x9f6a('0x48')]({'where':{'name':_0x9f6a('0x26'),'userProfileId':_0x528c2a['userProfileId']},'raw':!![]})[_0x9f6a('0x23')](function(_0x5ad1bc){if(_0x5ad1bc&&_0x5ad1bc[_0x9f6a('0x76')]===0x0){return db['UserProfileResource'][_0x9f6a('0x55')]({'name':_0x443345[_0x9f6a('0x2b')],'resourceId':_0x443345['id'],'type':_0x5ad1bc[_0x9f6a('0x2b')],'sectionId':_0x5ad1bc['id']},{})[_0x9f6a('0x23')](function(){return _0x2f1d82;});}else{return _0x2f1d82;}})['catch'](function(_0x31ac81){logger['error'](_0x9f6a('0x77'),_0x31ac81);throw _0x31ac81;});}return _0x2f1d82;})['then'](respondWithResult(_0x945742,null))[_0x9f6a('0x49')](handleError(_0x945742,null));});_0x1decf0[_0x9f6a('0x78')]();}catch(_0x245216){_0x945742[_0x9f6a('0x18')](0x1f4)['send'](_0x245216);}};exports[_0x9f6a('0x79')]=function(_0x415227,_0x31888a,_0x1a0060){return db['Sound'][_0x9f6a('0x48')]({'where':{'id':_0x415227[_0x9f6a('0x47')]['id']}})[_0x9f6a('0x23')](handleEntityNotFound(_0x31888a,null))[_0x9f6a('0x23')](saveUpdates(_[_0x9f6a('0x40')](_0x415227['body'],[_0x9f6a('0x2b'),_0x9f6a('0x7a')]),null))[_0x9f6a('0x23')](respondWithResult(_0x31888a,null))[_0x9f6a('0x49')](handleError(_0x31888a,null));};exports[_0x9f6a('0x7b')]=function(_0xabd975,_0x3dbe9d,_0x37c713){return db[_0x9f6a('0x2f')]['find']({'where':{'id':_0xabd975[_0x9f6a('0x47')]['id']}})[_0x9f6a('0x23')](function(_0xc8abcc){if(_0xc8abcc){return _0xc8abcc[_0x9f6a('0x24')]();}})[_0x9f6a('0x23')](function(_0x4aeb66){var _0x593b58=path[_0x9f6a('0x4e')](config['root'],_0x9f6a('0x5b'),util[_0x9f6a('0x53')](_0x9f6a('0x54'),_0x4aeb66[_0x9f6a('0x4b')],_0x4aeb66[_0x9f6a('0x7c')]));var _0x4ed3a3=path[_0x9f6a('0x4e')](config['root'],_0x9f6a('0x4f'),util['format'](_0x9f6a('0x54'),_0x4aeb66[_0x9f6a('0x4b')],_0x4aeb66[_0x9f6a('0x4c')]));fs[_0x9f6a('0x62')](_0x593b58);fs[_0x9f6a('0x62')](_0x4ed3a3);return _0x4aeb66;})[_0x9f6a('0x23')](function(_0x1b8bc1){if(_0x1b8bc1){return _0x3dbe9d['status'](0xcc)[_0x9f6a('0x28')]();}})[_0x9f6a('0x23')](handleEntityNotFound(_0x3dbe9d,null))['catch'](handleError(_0x3dbe9d,null));}; \ No newline at end of file diff --git a/server/api/sound/sound.model.js b/server/api/sound/sound.model.js index d6e1d24..59178fc 100644 --- a/server/api/sound/sound.model.js +++ b/server/api/sound/sound.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2e86=['tools_sounds','util','../../config/logger','api','moment','bluebird','path','rimraf','./sound.attributes','exports'];(function(_0x3e0b3e,_0x48dc05){var _0x4a0f30=function(_0xeca08e){while(--_0xeca08e){_0x3e0b3e['push'](_0x3e0b3e['shift']());}};_0x4a0f30(++_0x48dc05);}(_0x2e86,0x141));var _0x62e8=function(_0x691d42,_0x5b25d3){_0x691d42=_0x691d42-0x0;var _0x2fdccf=_0x2e86[_0x691d42];return _0x2fdccf;};'use strict';var _=require('lodash');var util=require(_0x62e8('0x0'));var logger=require(_0x62e8('0x1'))(_0x62e8('0x2'));var moment=require(_0x62e8('0x3'));var BPromise=require(_0x62e8('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x62e8('0x5'));var rimraf=require(_0x62e8('0x6'));var config=require('../../config/environment');var attributes=require(_0x62e8('0x7'));module[_0x62e8('0x8')]=function(_0x5c5b62,_0x5be0a0){return _0x5c5b62['define']('Sound',attributes,{'tableName':_0x62e8('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x335b=['rimraf','../../config/environment','exports','define','lodash','api','moment','bluebird','path'];(function(_0x367313,_0xcd40d5){var _0x2ab828=function(_0x1d0caf){while(--_0x1d0caf){_0x367313['push'](_0x367313['shift']());}};_0x2ab828(++_0xcd40d5);}(_0x335b,0x13f));var _0xb335=function(_0x481c4f,_0x3f2ec1){_0x481c4f=_0x481c4f-0x0;var _0x37c424=_0x335b[_0x481c4f];return _0x37c424;};'use strict';var _=require(_0xb335('0x0'));var util=require('util');var logger=require('../../config/logger')(_0xb335('0x1'));var moment=require(_0xb335('0x2'));var BPromise=require(_0xb335('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xb335('0x4'));var rimraf=require(_0xb335('0x5'));var config=require(_0xb335('0x6'));var attributes=require('./sound.attributes');module[_0xb335('0x7')]=function(_0x5766bc,_0x496299){return _0x5766bc[_0xb335('0x8')]('Sound',attributes,{'tableName':'tools_sounds','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/sound/sound.rpc.js b/server/api/sound/sound.rpc.js index ca8ea13..e9b0bd7 100644 --- a/server/api/sound/sound.rpc.js +++ b/server/api/sound/sound.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x12c3=['client','http','request','info','Sound,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','catch','ShowSound','Sound','find','options','where','attributes','include','map','model','then','debug','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise'];(function(_0xc8f324,_0x3b0ad9){var _0xa3300d=function(_0x3aefad){while(--_0x3aefad){_0xc8f324['push'](_0xc8f324['shift']());}};_0xa3300d(++_0x3b0ad9);}(_0x12c3,0x14c));var _0x312c=function(_0x18497e,_0x74cefb){_0x18497e=_0x18497e-0x0;var _0x14b603=_0x12c3[_0x18497e];return _0x14b603;};'use strict';var _=require('lodash');var util=require(_0x312c('0x0'));var moment=require(_0x312c('0x1'));var BPromise=require(_0x312c('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x312c('0x3'));var db=require(_0x312c('0x4'))['db'];var utils=require(_0x312c('0x5'));var logger=require(_0x312c('0x6'))(_0x312c('0x7'));var config=require('../../config/environment');var jayson=require(_0x312c('0x8'));var client=jayson[_0x312c('0x9')][_0x312c('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x380789,_0x48cbfd,_0x577ef9){return new BPromise(function(_0x136f7d,_0x2a6e42){return client[_0x312c('0xb')](_0x380789,_0x577ef9)['then'](function(_0x19fe3c){logger[_0x312c('0xc')](_0x312c('0xd'),_0x48cbfd,_0x312c('0xe'));logger['debug']('Sound,\x20%s,\x20%s,\x20%s',_0x48cbfd,'request\x20sent',JSON[_0x312c('0xf')](_0x19fe3c));if(_0x19fe3c[_0x312c('0x10')]){if(_0x19fe3c[_0x312c('0x10')][_0x312c('0x11')]===0x1f4){logger[_0x312c('0x10')](_0x312c('0xd'),_0x48cbfd,_0x19fe3c[_0x312c('0x10')][_0x312c('0x12')]);return _0x2a6e42(_0x19fe3c['error']['message']);}logger[_0x312c('0x10')](_0x312c('0xd'),_0x48cbfd,_0x19fe3c[_0x312c('0x10')][_0x312c('0x12')]);return _0x136f7d(_0x19fe3c['error']['message']);}else{logger[_0x312c('0xc')]('Sound,\x20%s,\x20%s',_0x48cbfd,_0x312c('0xe'));_0x136f7d(_0x19fe3c['result'][_0x312c('0x12')]);}})[_0x312c('0x13')](function(_0x6090a9){logger[_0x312c('0x10')](_0x312c('0xd'),_0x48cbfd,_0x6090a9);_0x2a6e42(_0x6090a9);});});}exports[_0x312c('0x14')]=function(_0x3d419c){var _0x55a355=this;return new Promise(function(_0x16d01b,_0x4f0070){return db[_0x312c('0x15')][_0x312c('0x16')]({'raw':_0x3d419c[_0x312c('0x17')]?_0x3d419c[_0x312c('0x17')]['raw']===undefined?!![]:![]:!![],'where':_0x3d419c[_0x312c('0x17')]?_0x3d419c[_0x312c('0x17')][_0x312c('0x18')]||null:null,'attributes':_0x3d419c['options']?_0x3d419c[_0x312c('0x17')][_0x312c('0x19')]||null:null,'include':_0x3d419c[_0x312c('0x17')]?_0x3d419c[_0x312c('0x17')][_0x312c('0x1a')]?_[_0x312c('0x1b')](_0x3d419c[_0x312c('0x17')][_0x312c('0x1a')],function(_0x4c0f49){return{'model':db[_0x4c0f49[_0x312c('0x1c')]],'as':_0x4c0f49['as'],'attributes':_0x4c0f49['attributes'],'include':_0x4c0f49[_0x312c('0x1a')]?_[_0x312c('0x1b')](_0x4c0f49['include'],function(_0xfe4188){return{'model':db[_0xfe4188[_0x312c('0x1c')]],'as':_0xfe4188['as'],'attributes':_0xfe4188[_0x312c('0x19')],'include':_0xfe4188['include']?_[_0x312c('0x1b')](_0xfe4188[_0x312c('0x1a')],function(_0x56acee){return{'model':db[_0x56acee[_0x312c('0x1c')]],'as':_0x56acee['as'],'attributes':_0x56acee[_0x312c('0x19')]};}):[]};}):[]};}):[]:[]})[_0x312c('0x1d')](function(_0x53d479){logger['info']('ShowSound',_0x3d419c);logger[_0x312c('0x1e')]('ShowSound',_0x3d419c,JSON['stringify'](_0x53d479));_0x16d01b(_0x53d479);})[_0x312c('0x13')](function(_0x4213fb){logger[_0x312c('0x10')](_0x312c('0x14'),_0x4213fb[_0x312c('0x12')],_0x3d419c);_0x4f0070(_0x55a355[_0x312c('0x10')](0x1f4,_0x4213fb[_0x312c('0x12')]));});});}; \ No newline at end of file +var _0x36b2=['options','where','include','map','attributes','model','then','lodash','util','bluebird','ioredis','rpc','../../config/environment','jayson/promise','client','http','info','request\x20sent','debug','Sound,\x20%s,\x20%s,\x20%s','stringify','error','code','message','Sound,\x20%s,\x20%s','catch','ShowSound','find'];(function(_0x585219,_0x23ba0b){var _0x32c6fe=function(_0x463370){while(--_0x463370){_0x585219['push'](_0x585219['shift']());}};_0x32c6fe(++_0x23ba0b);}(_0x36b2,0x13b));var _0x236b=function(_0x297ccf,_0x1eeb70){_0x297ccf=_0x297ccf-0x0;var _0xc9066f=_0x36b2[_0x297ccf];return _0xc9066f;};'use strict';var _=require(_0x236b('0x0'));var util=require(_0x236b('0x1'));var moment=require('moment');var BPromise=require(_0x236b('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x236b('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x236b('0x4'));var config=require(_0x236b('0x5'));var jayson=require(_0x236b('0x6'));var client=jayson[_0x236b('0x7')][_0x236b('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x41edcb,_0x187a8c,_0x40ed12){return new BPromise(function(_0xccd658,_0x32ba1a){return client['request'](_0x41edcb,_0x40ed12)['then'](function(_0x5d777d){logger[_0x236b('0x9')]('Sound,\x20%s,\x20%s',_0x187a8c,_0x236b('0xa'));logger[_0x236b('0xb')](_0x236b('0xc'),_0x187a8c,'request\x20sent',JSON[_0x236b('0xd')](_0x5d777d));if(_0x5d777d['error']){if(_0x5d777d[_0x236b('0xe')][_0x236b('0xf')]===0x1f4){logger[_0x236b('0xe')]('Sound,\x20%s,\x20%s',_0x187a8c,_0x5d777d[_0x236b('0xe')][_0x236b('0x10')]);return _0x32ba1a(_0x5d777d[_0x236b('0xe')]['message']);}logger[_0x236b('0xe')](_0x236b('0x11'),_0x187a8c,_0x5d777d['error'][_0x236b('0x10')]);return _0xccd658(_0x5d777d[_0x236b('0xe')][_0x236b('0x10')]);}else{logger['info']('Sound,\x20%s,\x20%s',_0x187a8c,_0x236b('0xa'));_0xccd658(_0x5d777d['result'][_0x236b('0x10')]);}})[_0x236b('0x12')](function(_0x2b30f2){logger[_0x236b('0xe')](_0x236b('0x11'),_0x187a8c,_0x2b30f2);_0x32ba1a(_0x2b30f2);});});}exports[_0x236b('0x13')]=function(_0x3d91d4){var _0x5819f7=this;return new Promise(function(_0x272291,_0x4fe5be){return db['Sound'][_0x236b('0x14')]({'raw':_0x3d91d4['options']?_0x3d91d4[_0x236b('0x15')]['raw']===undefined?!![]:![]:!![],'where':_0x3d91d4[_0x236b('0x15')]?_0x3d91d4[_0x236b('0x15')][_0x236b('0x16')]||null:null,'attributes':_0x3d91d4[_0x236b('0x15')]?_0x3d91d4[_0x236b('0x15')]['attributes']||null:null,'include':_0x3d91d4[_0x236b('0x15')]?_0x3d91d4['options'][_0x236b('0x17')]?_[_0x236b('0x18')](_0x3d91d4[_0x236b('0x15')]['include'],function(_0x5e7ee3){return{'model':db[_0x5e7ee3['model']],'as':_0x5e7ee3['as'],'attributes':_0x5e7ee3[_0x236b('0x19')],'include':_0x5e7ee3[_0x236b('0x17')]?_[_0x236b('0x18')](_0x5e7ee3[_0x236b('0x17')],function(_0xbdb996){return{'model':db[_0xbdb996['model']],'as':_0xbdb996['as'],'attributes':_0xbdb996[_0x236b('0x19')],'include':_0xbdb996['include']?_[_0x236b('0x18')](_0xbdb996[_0x236b('0x17')],function(_0x334ec1){return{'model':db[_0x334ec1[_0x236b('0x1a')]],'as':_0x334ec1['as'],'attributes':_0x334ec1['attributes']};}):[]};}):[]};}):[]:[]})[_0x236b('0x1b')](function(_0x1ac99b){logger['info'](_0x236b('0x13'),_0x3d91d4);logger[_0x236b('0xb')](_0x236b('0x13'),_0x3d91d4,JSON[_0x236b('0xd')](_0x1ac99b));_0x272291(_0x1ac99b);})[_0x236b('0x12')](function(_0x3753a7){logger['error'](_0x236b('0x13'),_0x3753a7[_0x236b('0x10')],_0x3d91d4);_0x4fe5be(_0x5819f7['error'](0x1f4,_0x3753a7['message']));});});}; \ No newline at end of file diff --git a/server/api/squareMessage/index.js b/server/api/squareMessage/index.js index 00d10d2..9eec518 100644 --- a/server/api/squareMessage/index.js +++ b/server/api/squareMessage/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5f66=['util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','get','isAuthenticated','/:id','show','post','create','update','delete','destroy'];(function(_0x2823ed,_0x1972b0){var _0x5f14aa=function(_0x381f94){while(--_0x381f94){_0x2823ed['push'](_0x2823ed['shift']());}};_0x5f14aa(++_0x1972b0);}(_0x5f66,0x1a0));var _0x65f6=function(_0x502c7d,_0x2f1285){_0x502c7d=_0x502c7d-0x0;var _0x30b7ed=_0x5f66[_0x502c7d];return _0x30b7ed;};'use strict';var multer=require('multer');var util=require(_0x65f6('0x0'));var path=require('path');var timeout=require(_0x65f6('0x1'));var express=require(_0x65f6('0x2'));var router=express[_0x65f6('0x3')]();var fs_extra=require(_0x65f6('0x4'));var auth=require(_0x65f6('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x65f6('0x6'));var controller=require('./squareMessage.controller');router[_0x65f6('0x7')]('/',auth[_0x65f6('0x8')](),controller['index']);router['get'](_0x65f6('0x9'),auth[_0x65f6('0x8')](),controller[_0x65f6('0xa')]);router[_0x65f6('0xb')]('/',auth[_0x65f6('0x8')](),controller[_0x65f6('0xc')]);router['put']('/:id',auth[_0x65f6('0x8')](),controller[_0x65f6('0xd')]);router[_0x65f6('0xe')](_0x65f6('0x9'),auth['isAuthenticated'](),controller[_0x65f6('0xf')]);module['exports']=router; \ No newline at end of file +var _0x2032=['exports','util','path','connect-timeout','Router','fs-extra','../../components/interaction/service','../../config/environment','./squareMessage.controller','get','isAuthenticated','index','/:id','show','post','put','update','delete'];(function(_0x57784b,_0x49a858){var _0x4505fa=function(_0x14f13c){while(--_0x14f13c){_0x57784b['push'](_0x57784b['shift']());}};_0x4505fa(++_0x49a858);}(_0x2032,0xd9));var _0x2203=function(_0xd23396,_0x541aa8){_0xd23396=_0xd23396-0x0;var _0x1970b4=_0x2032[_0xd23396];return _0x1970b4;};'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('0xd')]('/',auth['isAuthenticated'](),controller['create']);router[_0x2203('0xe')]('/:id',auth[_0x2203('0x9')](),controller[_0x2203('0xf')]);router[_0x2203('0x10')]('/:id',auth[_0x2203('0x9')](),controller['destroy']);module[_0x2203('0x11')]=router; \ No newline at end of file diff --git a/server/api/squareMessage/squareMessage.attributes.js b/server/api/squareMessage/squareMessage.attributes.js index 1c7fef0..c6b93fa 100644 --- a/server/api/squareMessage/squareMessage.attributes.js +++ b/server/api/squareMessage/squareMessage.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x07a4=['medium','ENUM','out','sequelize','exports','STRING','TEXT'];(function(_0x2ad5c0,_0xc9b9de){var _0x535290=function(_0x29ab10){while(--_0x29ab10){_0x2ad5c0['push'](_0x2ad5c0['shift']());}};_0x535290(++_0xc9b9de);}(_0x07a4,0xff));var _0x407a=function(_0x42f8ff,_0x102d82){_0x42f8ff=_0x42f8ff-0x0;var _0x3e5f24=_0x07a4[_0x42f8ff];return _0x3e5f24;};'use strict';var Sequelize=require(_0x407a('0x0'));module[_0x407a('0x1')]={'uniqueid':{'type':Sequelize[_0x407a('0x2')]},'body':{'type':Sequelize[_0x407a('0x3')](_0x407a('0x4')),'allowNull':![]},'direction':{'type':Sequelize[_0x407a('0x5')]('in',_0x407a('0x6')),'defaultValue':_0x407a('0x6'),'allowNull':![]},'providerName':{'type':Sequelize[_0x407a('0x2')]},'providerResponse':{'type':Sequelize[_0x407a('0x3')]}}; \ No newline at end of file +var _0x488d=['STRING','TEXT','exports','medium','out'];(function(_0x13d07a,_0x41efc3){var _0x5ee0ee=function(_0x4ca94a){while(--_0x4ca94a){_0x13d07a['push'](_0x13d07a['shift']());}};_0x5ee0ee(++_0x41efc3);}(_0x488d,0x115));var _0xd488=function(_0xaa80e6,_0x564991){_0xaa80e6=_0xaa80e6-0x0;var _0x3a219b=_0x488d[_0xaa80e6];return _0x3a219b;};'use strict';var Sequelize=require('sequelize');module[_0xd488('0x0')]={'uniqueid':{'type':Sequelize['STRING']},'body':{'type':Sequelize['TEXT'](_0xd488('0x1')),'allowNull':![]},'direction':{'type':Sequelize['ENUM']('in',_0xd488('0x2')),'defaultValue':_0xd488('0x2'),'allowNull':![]},'providerName':{'type':Sequelize[_0xd488('0x3')]},'providerResponse':{'type':Sequelize[_0xd488('0x4')]}}; \ No newline at end of file diff --git a/server/api/squareMessage/squareMessage.controller.js b/server/api/squareMessage/squareMessage.controller.js index 9a167ad..9ee18a6 100644 --- a/server/api/squareMessage/squareMessage.controller.js +++ b/server/api/squareMessage/squareMessage.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb954=['../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','destroy','end','stack','name','send','index','map','SquareMessage','rawAttributes','fieldName','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','pick','filter','where','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','params','merge','find','create','body','eml-format','rimraf','zip-dir','fast-json-patch','bluebird','util','path','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment'];(function(_0x4e19aa,_0xabe3ad){var _0x5732b7=function(_0x54e05a){while(--_0x54e05a){_0x4e19aa['push'](_0x4e19aa['shift']());}};_0x5732b7(++_0xabe3ad);}(_0xb954,0x115));var _0x4b95=function(_0x59a549,_0x2fe2bb){_0x59a549=_0x59a549-0x0;var _0x12adbe=_0xb954[_0x59a549];return _0x12adbe;};'use strict';var emlformat=require(_0x4b95('0x0'));var rimraf=require(_0x4b95('0x1'));var zipdir=require(_0x4b95('0x2'));var jsonpatch=require(_0x4b95('0x3'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x4b95('0x4'));var Mustache=require('mustache');var util=require(_0x4b95('0x5'));var path=require(_0x4b95('0x6'));var sox=require(_0x4b95('0x7'));var csv=require(_0x4b95('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x4b95('0x9'));var _=require(_0x4b95('0xa'));var squel=require(_0x4b95('0xb'));var crypto=require(_0x4b95('0xc'));var jsforce=require(_0x4b95('0xd'));var deskjs=require(_0x4b95('0xe'));var toCsv=require(_0x4b95('0x8'));var querystring=require(_0x4b95('0xf'));var Papa=require('papaparse');var Redis=require(_0x4b95('0x10'));var authService=require(_0x4b95('0x11'));var qs=require(_0x4b95('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x4b95('0x13'));var logger=require(_0x4b95('0x14'))('api');var utils=require(_0x4b95('0x15'));var config=require(_0x4b95('0x16'));var licenseUtil=require(_0x4b95('0x17'));var db=require(_0x4b95('0x18'))['db'];function respondWithStatusCode(_0x5e27ee,_0x3e1658){_0x3e1658=_0x3e1658||0xcc;return function(_0x1eefad){if(_0x1eefad){return _0x5e27ee[_0x4b95('0x19')](_0x3e1658);}return _0x5e27ee[_0x4b95('0x1a')](_0x3e1658)['end']();};}function respondWithResult(_0x492290,_0x3e9d81){_0x3e9d81=_0x3e9d81||0xc8;return function(_0x3f9291){if(_0x3f9291){return _0x492290[_0x4b95('0x1a')](_0x3e9d81)[_0x4b95('0x1b')](_0x3f9291);}};}function respondWithFilteredResult(_0x13f43d,_0x4c8972){return function(_0x165b98){if(_0x165b98){var _0x2860dd=typeof _0x4c8972[_0x4b95('0x1c')]===_0x4b95('0x1d')&&typeof _0x4c8972[_0x4b95('0x1e')]===_0x4b95('0x1d');var _0x23dfa3=_0x165b98['count'];var _0x2dfe11=_0x2860dd?0x0:_0x4c8972[_0x4b95('0x1c')];var _0x25b037=_0x2860dd?_0x165b98[_0x4b95('0x1f')]:_0x4c8972['offset']+_0x4c8972['limit'];var _0x3c9a98;if(_0x25b037>=_0x23dfa3){_0x25b037=_0x23dfa3;_0x3c9a98=0xc8;}else{_0x3c9a98=0xce;}_0x13f43d[_0x4b95('0x1a')](_0x3c9a98);return _0x13f43d[_0x4b95('0x20')](_0x4b95('0x21'),_0x2dfe11+'-'+_0x25b037+'/'+_0x23dfa3)[_0x4b95('0x1b')](_0x165b98);}return null;};}function patchUpdates(_0x318658){return function(_0x5d2ae7){try{jsonpatch[_0x4b95('0x22')](_0x5d2ae7,_0x318658,!![]);}catch(_0x2e2bb1){return BPromise[_0x4b95('0x23')](_0x2e2bb1);}return _0x5d2ae7[_0x4b95('0x24')]();};}function saveUpdates(_0x33bcad,_0x1a6d32){return function(_0x37a0f1){if(_0x37a0f1){return _0x37a0f1[_0x4b95('0x25')](_0x33bcad)[_0x4b95('0x26')](function(_0x3e3c30){return _0x3e3c30;});}return null;};}function removeEntity(_0x5aeac5,_0x313126){return function(_0x1a505a){if(_0x1a505a){return _0x1a505a[_0x4b95('0x27')]()['then'](function(){_0x5aeac5[_0x4b95('0x1a')](0xcc)[_0x4b95('0x28')]();});}};}function handleEntityNotFound(_0x23c990,_0x5e9163){return function(_0x40347c){if(!_0x40347c){_0x23c990[_0x4b95('0x19')](0x194);}return _0x40347c;};}function handleError(_0x2f64bc,_0x53726f){_0x53726f=_0x53726f||0x1f4;return function(_0x2a9c6e){logger['error'](_0x2a9c6e[_0x4b95('0x29')]);if(_0x2a9c6e['name']){delete _0x2a9c6e[_0x4b95('0x2a')];}_0x2f64bc[_0x4b95('0x1a')](_0x53726f)[_0x4b95('0x2b')](_0x2a9c6e);};}exports[_0x4b95('0x2c')]=function(_0x1e30c6,_0x1d8ad2){var _0x2df898={},_0x47f4c3={},_0x11a103={'count':0x0,'rows':[]};var _0x5ab37d=_[_0x4b95('0x2d')](db[_0x4b95('0x2e')][_0x4b95('0x2f')],function(_0xaff1e4){return{'name':_0xaff1e4[_0x4b95('0x30')],'type':_0xaff1e4['type'][_0x4b95('0x31')]};});_0x47f4c3[_0x4b95('0x32')]=_[_0x4b95('0x2d')](_0x5ab37d,_0x4b95('0x2a'));_0x47f4c3[_0x4b95('0x33')]=_[_0x4b95('0x34')](_0x1e30c6['query']);_0x47f4c3[_0x4b95('0x35')]=_[_0x4b95('0x36')](_0x47f4c3[_0x4b95('0x32')],_0x47f4c3[_0x4b95('0x33')]);_0x2df898[_0x4b95('0x37')]=_[_0x4b95('0x36')](_0x47f4c3[_0x4b95('0x32')],qs[_0x4b95('0x38')](_0x1e30c6['query'][_0x4b95('0x38')]));_0x2df898['attributes']=_0x2df898['attributes'][_0x4b95('0x39')]?_0x2df898[_0x4b95('0x37')]:_0x47f4c3[_0x4b95('0x32')];if(!_0x1e30c6['query'][_0x4b95('0x3a')]('nolimit')){_0x2df898[_0x4b95('0x1e')]=qs['limit'](_0x1e30c6[_0x4b95('0x33')][_0x4b95('0x1e')]);_0x2df898['offset']=qs['offset'](_0x1e30c6['query'][_0x4b95('0x1c')]);}_0x2df898['order']=qs['sort'](_0x1e30c6[_0x4b95('0x33')]['sort']);_0x2df898['where']=qs[_0x4b95('0x35')](_[_0x4b95('0x3b')](_0x1e30c6[_0x4b95('0x33')],_0x47f4c3[_0x4b95('0x35')]),_0x5ab37d);if(_0x1e30c6['query'][_0x4b95('0x3c')]){_0x2df898['where']=_['merge'](_0x2df898[_0x4b95('0x3d')],{'$or':_[_0x4b95('0x2d')](_0x5ab37d,function(_0x4bc604){if(_0x4bc604['type']!==_0x4b95('0x3e')){var _0x38ac0f={};_0x38ac0f[_0x4bc604['name']]={'$like':'%'+_0x1e30c6['query'][_0x4b95('0x3c')]+'%'};return _0x38ac0f;}})});}_0x2df898=_['merge']({},_0x2df898,_0x1e30c6[_0x4b95('0x3f')]);var _0x2bd404={'where':_0x2df898[_0x4b95('0x3d')]};return db[_0x4b95('0x2e')][_0x4b95('0x1f')](_0x2bd404)['then'](function(_0x2f83e7){_0x11a103['count']=_0x2f83e7;if(_0x1e30c6['query'][_0x4b95('0x40')]){_0x2df898[_0x4b95('0x41')]=[{'all':!![]}];}return db['SquareMessage'][_0x4b95('0x42')](_0x2df898);})[_0x4b95('0x26')](function(_0x5b7962){_0x11a103[_0x4b95('0x43')]=_0x5b7962;return _0x11a103;})[_0x4b95('0x26')](respondWithFilteredResult(_0x1d8ad2,_0x2df898))[_0x4b95('0x44')](handleError(_0x1d8ad2,null));};exports[_0x4b95('0x45')]=function(_0x59e239,_0x3bdeba){var _0x4116c5={'raw':!![],'where':{'id':_0x59e239[_0x4b95('0x46')]['id']}},_0x3c0585={};_0x3c0585[_0x4b95('0x32')]=_[_0x4b95('0x34')](db[_0x4b95('0x2e')][_0x4b95('0x2f')]);_0x3c0585[_0x4b95('0x33')]=_[_0x4b95('0x34')](_0x59e239[_0x4b95('0x33')]);_0x3c0585[_0x4b95('0x35')]=_[_0x4b95('0x36')](_0x3c0585[_0x4b95('0x32')],_0x3c0585[_0x4b95('0x33')]);_0x4116c5['attributes']=_[_0x4b95('0x36')](_0x3c0585['model'],qs[_0x4b95('0x38')](_0x59e239[_0x4b95('0x33')][_0x4b95('0x38')]));_0x4116c5[_0x4b95('0x37')]=_0x4116c5[_0x4b95('0x37')][_0x4b95('0x39')]?_0x4116c5['attributes']:_0x3c0585[_0x4b95('0x32')];if(_0x59e239[_0x4b95('0x33')][_0x4b95('0x40')]){_0x4116c5['include']=[{'all':!![]}];}_0x4116c5=_[_0x4b95('0x47')]({},_0x4116c5,_0x59e239['options']);return db['SquareMessage'][_0x4b95('0x48')](_0x4116c5)[_0x4b95('0x26')](handleEntityNotFound(_0x3bdeba,null))[_0x4b95('0x26')](respondWithResult(_0x3bdeba,null))['catch'](handleError(_0x3bdeba,null));};exports['create']=function(_0x3c792d,_0xcdad69){return db['SquareMessage'][_0x4b95('0x49')](_0x3c792d['body'],{})[_0x4b95('0x26')](respondWithResult(_0xcdad69,0xc9))['catch'](handleError(_0xcdad69,null));};exports[_0x4b95('0x25')]=function(_0xe1baff,_0xbb48ba){if(_0xe1baff['body']['id']){delete _0xe1baff[_0x4b95('0x4a')]['id'];}return db['SquareMessage'][_0x4b95('0x48')]({'where':{'id':_0xe1baff[_0x4b95('0x46')]['id']}})[_0x4b95('0x26')](handleEntityNotFound(_0xbb48ba,null))[_0x4b95('0x26')](saveUpdates(_0xe1baff[_0x4b95('0x4a')],null))['then'](respondWithResult(_0xbb48ba,null))[_0x4b95('0x44')](handleError(_0xbb48ba,null));};exports[_0x4b95('0x27')]=function(_0x34a087,_0x3ee49d){return db['SquareMessage'][_0x4b95('0x48')]({'where':{'id':_0x34a087[_0x4b95('0x46')]['id']}})[_0x4b95('0x26')](handleEntityNotFound(_0x3ee49d,null))[_0x4b95('0x26')](removeEntity(_0x3ee49d,null))[_0x4b95('0x44')](handleError(_0x3ee49d,null));}; \ No newline at end of file +var _0xf6f3=['../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','apply','reject','save','update','then','destroy','stack','send','index','map','SquareMessage','fieldName','type','key','query','filters','intersection','model','attributes','fields','length','order','sort','filter','where','VIRTUAL','name','options','includeAll','include','findAll','rows','catch','params','keys','rawAttributes','merge','create','body','find','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','fs-extra','lodash','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service'];(function(_0x10607a,_0x3d3fd5){var _0x5deb2f=function(_0x12a0de){while(--_0x12a0de){_0x10607a['push'](_0x10607a['shift']());}};_0x5deb2f(++_0x3d3fd5);}(_0xf6f3,0xd6));var _0x3f6f=function(_0x290a56,_0x5c540a){_0x290a56=_0x290a56-0x0;var _0x89610=_0xf6f3[_0x290a56];return _0x89610;};'use strict';var emlformat=require(_0x3f6f('0x0'));var rimraf=require(_0x3f6f('0x1'));var zipdir=require(_0x3f6f('0x2'));var jsonpatch=require(_0x3f6f('0x3'));var rp=require(_0x3f6f('0x4'));var moment=require(_0x3f6f('0x5'));var BPromise=require(_0x3f6f('0x6'));var Mustache=require(_0x3f6f('0x7'));var util=require(_0x3f6f('0x8'));var path=require(_0x3f6f('0x9'));var sox=require(_0x3f6f('0xa'));var csv=require(_0x3f6f('0xb'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x3f6f('0xc'));var _=require(_0x3f6f('0xd'));var squel=require('squel');var crypto=require(_0x3f6f('0xe'));var jsforce=require(_0x3f6f('0xf'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x3f6f('0x10'));var Papa=require(_0x3f6f('0x11'));var Redis=require(_0x3f6f('0x12'));var authService=require(_0x3f6f('0x13'));var qs=require(_0x3f6f('0x14'));var as=require(_0x3f6f('0x15'));var hardwareService=require(_0x3f6f('0x16'));var logger=require(_0x3f6f('0x17'))(_0x3f6f('0x18'));var utils=require(_0x3f6f('0x19'));var config=require(_0x3f6f('0x1a'));var licenseUtil=require(_0x3f6f('0x1b'));var db=require(_0x3f6f('0x1c'))['db'];function respondWithStatusCode(_0x3bafb8,_0x209229){_0x209229=_0x209229||0xcc;return function(_0x580fe9){if(_0x580fe9){return _0x3bafb8[_0x3f6f('0x1d')](_0x209229);}return _0x3bafb8[_0x3f6f('0x1e')](_0x209229)[_0x3f6f('0x1f')]();};}function respondWithResult(_0x5cb7a5,_0x2a7e09){_0x2a7e09=_0x2a7e09||0xc8;return function(_0x47452a){if(_0x47452a){return _0x5cb7a5[_0x3f6f('0x1e')](_0x2a7e09)[_0x3f6f('0x20')](_0x47452a);}};}function respondWithFilteredResult(_0x1ffb01,_0xecf26f){return function(_0x44af3c){if(_0x44af3c){var _0x163c9f=typeof _0xecf26f[_0x3f6f('0x21')]===_0x3f6f('0x22')&&typeof _0xecf26f[_0x3f6f('0x23')]==='undefined';var _0x4e2825=_0x44af3c[_0x3f6f('0x24')];var _0x3232f6=_0x163c9f?0x0:_0xecf26f['offset'];var _0xe71226=_0x163c9f?_0x44af3c[_0x3f6f('0x24')]:_0xecf26f['offset']+_0xecf26f['limit'];var _0x569ca7;if(_0xe71226>=_0x4e2825){_0xe71226=_0x4e2825;_0x569ca7=0xc8;}else{_0x569ca7=0xce;}_0x1ffb01['status'](_0x569ca7);return _0x1ffb01[_0x3f6f('0x25')]('Content-Range',_0x3232f6+'-'+_0xe71226+'/'+_0x4e2825)[_0x3f6f('0x20')](_0x44af3c);}return null;};}function patchUpdates(_0x46603b){return function(_0xc9caa3){try{jsonpatch[_0x3f6f('0x26')](_0xc9caa3,_0x46603b,!![]);}catch(_0xfb392e){return BPromise[_0x3f6f('0x27')](_0xfb392e);}return _0xc9caa3[_0x3f6f('0x28')]();};}function saveUpdates(_0x475210,_0x4c5064){return function(_0x47de8e){if(_0x47de8e){return _0x47de8e[_0x3f6f('0x29')](_0x475210)[_0x3f6f('0x2a')](function(_0xd73b2c){return _0xd73b2c;});}return null;};}function removeEntity(_0x684914,_0x3bca75){return function(_0x381b2a){if(_0x381b2a){return _0x381b2a[_0x3f6f('0x2b')]()[_0x3f6f('0x2a')](function(){_0x684914[_0x3f6f('0x1e')](0xcc)[_0x3f6f('0x1f')]();});}};}function handleEntityNotFound(_0x14f2a4,_0x25c2d8){return function(_0x317e92){if(!_0x317e92){_0x14f2a4[_0x3f6f('0x1d')](0x194);}return _0x317e92;};}function handleError(_0x4331aa,_0x1fa453){_0x1fa453=_0x1fa453||0x1f4;return function(_0x2511a3){logger['error'](_0x2511a3[_0x3f6f('0x2c')]);if(_0x2511a3['name']){delete _0x2511a3['name'];}_0x4331aa['status'](_0x1fa453)[_0x3f6f('0x2d')](_0x2511a3);};}exports[_0x3f6f('0x2e')]=function(_0x24bf54,_0xd3afe9){var _0x1b4ef6={},_0x593fe7={},_0x38029e={'count':0x0,'rows':[]};var _0x36262a=_[_0x3f6f('0x2f')](db[_0x3f6f('0x30')]['rawAttributes'],function(_0x3e5c89){return{'name':_0x3e5c89[_0x3f6f('0x31')],'type':_0x3e5c89[_0x3f6f('0x32')][_0x3f6f('0x33')]};});_0x593fe7['model']=_[_0x3f6f('0x2f')](_0x36262a,'name');_0x593fe7[_0x3f6f('0x34')]=_['keys'](_0x24bf54[_0x3f6f('0x34')]);_0x593fe7[_0x3f6f('0x35')]=_[_0x3f6f('0x36')](_0x593fe7[_0x3f6f('0x37')],_0x593fe7[_0x3f6f('0x34')]);_0x1b4ef6[_0x3f6f('0x38')]=_['intersection'](_0x593fe7[_0x3f6f('0x37')],qs[_0x3f6f('0x39')](_0x24bf54[_0x3f6f('0x34')][_0x3f6f('0x39')]));_0x1b4ef6[_0x3f6f('0x38')]=_0x1b4ef6[_0x3f6f('0x38')][_0x3f6f('0x3a')]?_0x1b4ef6['attributes']:_0x593fe7['model'];if(!_0x24bf54[_0x3f6f('0x34')]['hasOwnProperty']('nolimit')){_0x1b4ef6[_0x3f6f('0x23')]=qs['limit'](_0x24bf54['query'][_0x3f6f('0x23')]);_0x1b4ef6[_0x3f6f('0x21')]=qs[_0x3f6f('0x21')](_0x24bf54[_0x3f6f('0x34')][_0x3f6f('0x21')]);}_0x1b4ef6[_0x3f6f('0x3b')]=qs[_0x3f6f('0x3c')](_0x24bf54[_0x3f6f('0x34')][_0x3f6f('0x3c')]);_0x1b4ef6['where']=qs[_0x3f6f('0x35')](_['pick'](_0x24bf54['query'],_0x593fe7[_0x3f6f('0x35')]),_0x36262a);if(_0x24bf54[_0x3f6f('0x34')][_0x3f6f('0x3d')]){_0x1b4ef6[_0x3f6f('0x3e')]=_['merge'](_0x1b4ef6[_0x3f6f('0x3e')],{'$or':_['map'](_0x36262a,function(_0x2f4ff9){if(_0x2f4ff9['type']!==_0x3f6f('0x3f')){var _0x31e42e={};_0x31e42e[_0x2f4ff9[_0x3f6f('0x40')]]={'$like':'%'+_0x24bf54['query'][_0x3f6f('0x3d')]+'%'};return _0x31e42e;}})});}_0x1b4ef6=_['merge']({},_0x1b4ef6,_0x24bf54[_0x3f6f('0x41')]);var _0x3793cb={'where':_0x1b4ef6['where']};return db[_0x3f6f('0x30')][_0x3f6f('0x24')](_0x3793cb)[_0x3f6f('0x2a')](function(_0x199a6f){_0x38029e[_0x3f6f('0x24')]=_0x199a6f;if(_0x24bf54['query'][_0x3f6f('0x42')]){_0x1b4ef6[_0x3f6f('0x43')]=[{'all':!![]}];}return db[_0x3f6f('0x30')][_0x3f6f('0x44')](_0x1b4ef6);})[_0x3f6f('0x2a')](function(_0x106a27){_0x38029e[_0x3f6f('0x45')]=_0x106a27;return _0x38029e;})[_0x3f6f('0x2a')](respondWithFilteredResult(_0xd3afe9,_0x1b4ef6))[_0x3f6f('0x46')](handleError(_0xd3afe9,null));};exports['show']=function(_0x5277e8,_0x3fe85d){var _0x1509e4={'raw':!![],'where':{'id':_0x5277e8[_0x3f6f('0x47')]['id']}},_0x5b10c7={};_0x5b10c7[_0x3f6f('0x37')]=_[_0x3f6f('0x48')](db['SquareMessage'][_0x3f6f('0x49')]);_0x5b10c7[_0x3f6f('0x34')]=_['keys'](_0x5277e8['query']);_0x5b10c7[_0x3f6f('0x35')]=_[_0x3f6f('0x36')](_0x5b10c7[_0x3f6f('0x37')],_0x5b10c7[_0x3f6f('0x34')]);_0x1509e4[_0x3f6f('0x38')]=_[_0x3f6f('0x36')](_0x5b10c7[_0x3f6f('0x37')],qs[_0x3f6f('0x39')](_0x5277e8[_0x3f6f('0x34')][_0x3f6f('0x39')]));_0x1509e4[_0x3f6f('0x38')]=_0x1509e4[_0x3f6f('0x38')][_0x3f6f('0x3a')]?_0x1509e4['attributes']:_0x5b10c7['model'];if(_0x5277e8[_0x3f6f('0x34')]['includeAll']){_0x1509e4[_0x3f6f('0x43')]=[{'all':!![]}];}_0x1509e4=_[_0x3f6f('0x4a')]({},_0x1509e4,_0x5277e8['options']);return db[_0x3f6f('0x30')]['find'](_0x1509e4)[_0x3f6f('0x2a')](handleEntityNotFound(_0x3fe85d,null))[_0x3f6f('0x2a')](respondWithResult(_0x3fe85d,null))[_0x3f6f('0x46')](handleError(_0x3fe85d,null));};exports[_0x3f6f('0x4b')]=function(_0x57bbf2,_0x16515e){return db[_0x3f6f('0x30')][_0x3f6f('0x4b')](_0x57bbf2[_0x3f6f('0x4c')],{})[_0x3f6f('0x2a')](respondWithResult(_0x16515e,0xc9))['catch'](handleError(_0x16515e,null));};exports[_0x3f6f('0x29')]=function(_0x27509a,_0x281839){if(_0x27509a[_0x3f6f('0x4c')]['id']){delete _0x27509a['body']['id'];}return db[_0x3f6f('0x30')][_0x3f6f('0x4d')]({'where':{'id':_0x27509a['params']['id']}})[_0x3f6f('0x2a')](handleEntityNotFound(_0x281839,null))[_0x3f6f('0x2a')](saveUpdates(_0x27509a[_0x3f6f('0x4c')],null))[_0x3f6f('0x2a')](respondWithResult(_0x281839,null))[_0x3f6f('0x46')](handleError(_0x281839,null));};exports[_0x3f6f('0x2b')]=function(_0x38efe6,_0x593adc){return db[_0x3f6f('0x30')]['find']({'where':{'id':_0x38efe6[_0x3f6f('0x47')]['id']}})['then'](handleEntityNotFound(_0x593adc,null))[_0x3f6f('0x2a')](removeEntity(_0x593adc,null))[_0x3f6f('0x46')](handleError(_0x593adc,null));}; \ No newline at end of file diff --git a/server/api/squareMessage/squareMessage.model.js b/server/api/squareMessage/squareMessage.model.js index 3130087..2f8c5c2 100644 --- a/server/api/squareMessage/squareMessage.model.js +++ b/server/api/squareMessage/squareMessage.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbf7b=['bluebird','request-promise','path','rimraf','../../config/environment','./squareMessage.attributes','define','square_messages','lodash','util','../../config/logger','api','moment'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xbf7b,0x10c));var _0xbbf7=function(_0x51ba9a,_0x3c5fb7){_0x51ba9a=_0x51ba9a-0x0;var _0x25eed7=_0xbf7b[_0x51ba9a];return _0x25eed7;};'use strict';var _=require(_0xbbf7('0x0'));var util=require(_0xbbf7('0x1'));var logger=require(_0xbbf7('0x2'))(_0xbbf7('0x3'));var moment=require(_0xbbf7('0x4'));var BPromise=require(_0xbbf7('0x5'));var rp=require(_0xbbf7('0x6'));var fs=require('fs');var path=require(_0xbbf7('0x7'));var rimraf=require(_0xbbf7('0x8'));var config=require(_0xbbf7('0x9'));var attributes=require(_0xbbf7('0xa'));module['exports']=function(_0x59476b,_0x417d1c){return _0x59476b[_0xbbf7('0xb')]('SquareMessage',attributes,{'tableName':_0xbbf7('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xbdc9=['square_messages','../../config/logger','api','moment','path','../../config/environment','./squareMessage.attributes','exports','define','SquareMessage'];(function(_0x590214,_0x12ce6f){var _0x36b3db=function(_0x275fb4){while(--_0x275fb4){_0x590214['push'](_0x590214['shift']());}};_0x36b3db(++_0x12ce6f);}(_0xbdc9,0x187));var _0x9bdc=function(_0x83afe5,_0x3455d1){_0x83afe5=_0x83afe5-0x0;var _0x4d0174=_0xbdc9[_0x83afe5];return _0x4d0174;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x9bdc('0x0'))(_0x9bdc('0x1'));var moment=require(_0x9bdc('0x2'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x9bdc('0x3'));var rimraf=require('rimraf');var config=require(_0x9bdc('0x4'));var attributes=require(_0x9bdc('0x5'));module[_0x9bdc('0x6')]=function(_0x45fc1a,_0x51f504){return _0x45fc1a[_0x9bdc('0x7')](_0x9bdc('0x8'),attributes,{'tableName':_0x9bdc('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/squareMessage/squareMessage.rpc.js b/server/api/squareMessage/squareMessage.rpc.js index 99e354c..e496ea2 100644 --- a/server/api/squareMessage/squareMessage.rpc.js +++ b/server/api/squareMessage/squareMessage.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2012=['catch','SquareMessage','create','body','options','raw','then','debug','CreateSquareMessage','lodash','moment','bluebird','randomstring','ioredis','../../config/utils','rpc','../../config/environment','jayson/promise','client','SquareMessage,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result'];(function(_0x3d8291,_0x560e85){var _0x2bad5c=function(_0x16d94d){while(--_0x16d94d){_0x3d8291['push'](_0x3d8291['shift']());}};_0x2bad5c(++_0x560e85);}(_0x2012,0x75));var _0x2201=function(_0x5becd6,_0x13e651){_0x5becd6=_0x5becd6-0x0;var _0x3b7b78=_0x2012[_0x5becd6];return _0x3b7b78;};'use strict';var _=require(_0x2201('0x0'));var util=require('util');var moment=require(_0x2201('0x1'));var BPromise=require(_0x2201('0x2'));var rs=require(_0x2201('0x3'));var fs=require('fs');var Redis=require(_0x2201('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x2201('0x5'));var logger=require('../../config/logger')(_0x2201('0x6'));var config=require(_0x2201('0x7'));var jayson=require(_0x2201('0x8'));var client=jayson[_0x2201('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x2f82f2,_0x1288e2,_0x2830a8){return new BPromise(function(_0x44ec15,_0x3a8b37){return client['request'](_0x2f82f2,_0x2830a8)['then'](function(_0x289331){logger['info'](_0x2201('0xa'),_0x1288e2,_0x2201('0xb'));logger['debug']('SquareMessage,\x20%s,\x20%s,\x20%s',_0x1288e2,_0x2201('0xb'),JSON[_0x2201('0xc')](_0x289331));if(_0x289331['error']){if(_0x289331[_0x2201('0xd')][_0x2201('0xe')]===0x1f4){logger[_0x2201('0xd')]('SquareMessage,\x20%s,\x20%s',_0x1288e2,_0x289331[_0x2201('0xd')][_0x2201('0xf')]);return _0x3a8b37(_0x289331[_0x2201('0xd')]['message']);}logger[_0x2201('0xd')](_0x2201('0xa'),_0x1288e2,_0x289331[_0x2201('0xd')][_0x2201('0xf')]);return _0x44ec15(_0x289331[_0x2201('0xd')]['message']);}else{logger[_0x2201('0x10')]('SquareMessage,\x20%s,\x20%s',_0x1288e2,_0x2201('0xb'));_0x44ec15(_0x289331[_0x2201('0x11')][_0x2201('0xf')]);}})[_0x2201('0x12')](function(_0x701abe){logger[_0x2201('0xd')](_0x2201('0xa'),_0x1288e2,_0x701abe);_0x3a8b37(_0x701abe);});});}exports['CreateSquareMessage']=function(_0x34e94e){var _0x1a1a9f=this;return new Promise(function(_0x1ac8d2,_0x34c80c){return db[_0x2201('0x13')][_0x2201('0x14')](_0x34e94e[_0x2201('0x15')],{'raw':_0x34e94e['options']?_0x34e94e[_0x2201('0x16')][_0x2201('0x17')]===undefined?!![]:![]:!![]})[_0x2201('0x18')](function(_0x4a0f32){logger[_0x2201('0x10')]('CreateSquareMessage',_0x34e94e);logger[_0x2201('0x19')](_0x2201('0x1a'),_0x34e94e,JSON[_0x2201('0xc')](_0x4a0f32));_0x1ac8d2(_0x4a0f32);})['catch'](function(_0x9d84c5){logger[_0x2201('0xd')]('CreateSquareMessage',_0x9d84c5[_0x2201('0xf')],_0x34e94e);_0x34c80c(_0x1a1a9f[_0x2201('0xd')](0x1f4,_0x9d84c5['message']));});});}; \ No newline at end of file +var _0x9095=['../../mysqldb','rpc','../../config/environment','jayson/promise','client','http','then','info','SquareMessage,\x20%s,\x20%s','debug','SquareMessage,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','SquareMessage','create','body','raw','CreateSquareMessage','util','moment','bluebird','randomstring'];(function(_0x3f8b73,_0x4c772e){var _0x38cbf6=function(_0x6f8b57){while(--_0x6f8b57){_0x3f8b73['push'](_0x3f8b73['shift']());}};_0x38cbf6(++_0x4c772e);}(_0x9095,0x1e2));var _0x5909=function(_0x391c55,_0x168617){_0x391c55=_0x391c55-0x0;var _0xa434e0=_0x9095[_0x391c55];return _0xa434e0;};'use strict';var _=require('lodash');var util=require(_0x5909('0x0'));var moment=require(_0x5909('0x1'));var BPromise=require(_0x5909('0x2'));var rs=require(_0x5909('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x5909('0x4'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x5909('0x5'));var config=require(_0x5909('0x6'));var jayson=require(_0x5909('0x7'));var client=jayson[_0x5909('0x8')][_0x5909('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x5a3278,_0x556837,_0x38854c){return new BPromise(function(_0x4b24e5,_0x5d86d9){return client['request'](_0x5a3278,_0x38854c)[_0x5909('0xa')](function(_0x59a0f9){logger[_0x5909('0xb')](_0x5909('0xc'),_0x556837,'request\x20sent');logger[_0x5909('0xd')](_0x5909('0xe'),_0x556837,_0x5909('0xf'),JSON[_0x5909('0x10')](_0x59a0f9));if(_0x59a0f9['error']){if(_0x59a0f9[_0x5909('0x11')][_0x5909('0x12')]===0x1f4){logger[_0x5909('0x11')](_0x5909('0xc'),_0x556837,_0x59a0f9[_0x5909('0x11')][_0x5909('0x13')]);return _0x5d86d9(_0x59a0f9[_0x5909('0x11')]['message']);}logger['error'](_0x5909('0xc'),_0x556837,_0x59a0f9[_0x5909('0x11')][_0x5909('0x13')]);return _0x4b24e5(_0x59a0f9['error'][_0x5909('0x13')]);}else{logger['info'](_0x5909('0xc'),_0x556837,_0x5909('0xf'));_0x4b24e5(_0x59a0f9[_0x5909('0x14')]['message']);}})[_0x5909('0x15')](function(_0x1c5bb0){logger[_0x5909('0x11')](_0x5909('0xc'),_0x556837,_0x1c5bb0);_0x5d86d9(_0x1c5bb0);});});}exports['CreateSquareMessage']=function(_0x544638){var _0x313419=this;return new Promise(function(_0x577335,_0x28b5f){return db[_0x5909('0x16')][_0x5909('0x17')](_0x544638[_0x5909('0x18')],{'raw':_0x544638['options']?_0x544638['options'][_0x5909('0x19')]===undefined?!![]:![]:!![]})[_0x5909('0xa')](function(_0x2e758e){logger[_0x5909('0xb')](_0x5909('0x1a'),_0x544638);logger['debug'](_0x5909('0x1a'),_0x544638,JSON[_0x5909('0x10')](_0x2e758e));_0x577335(_0x2e758e);})[_0x5909('0x15')](function(_0x1e8419){logger[_0x5909('0x11')](_0x5909('0x1a'),_0x1e8419[_0x5909('0x13')],_0x544638);_0x28b5f(_0x313419[_0x5909('0x11')](0x1f4,_0x1e8419[_0x5909('0x13')]));});});}; \ No newline at end of file diff --git a/server/api/squareOdbc/index.js b/server/api/squareOdbc/index.js index 98eafd0..99096a0 100644 --- a/server/api/squareOdbc/index.js +++ b/server/api/squareOdbc/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0ef0=['../../config/environment','get','isAuthenticated','index','/:id','/:id/test','create','put','update','delete','destroy','util','connect-timeout','express','fs-extra','../../components/auth/service'];(function(_0xdc2d66,_0x38f2b9){var _0x181a60=function(_0x347d0a){while(--_0x347d0a){_0xdc2d66['push'](_0xdc2d66['shift']());}};_0x181a60(++_0x38f2b9);}(_0x0ef0,0x6b));var _0x00ef=function(_0x45495a,_0x353d64){_0x45495a=_0x45495a-0x0;var _0xf6fb7c=_0x0ef0[_0x45495a];return _0xf6fb7c;};'use strict';var multer=require('multer');var util=require(_0x00ef('0x0'));var path=require('path');var timeout=require(_0x00ef('0x1'));var express=require(_0x00ef('0x2'));var router=express['Router']();var fs_extra=require(_0x00ef('0x3'));var auth=require(_0x00ef('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x00ef('0x5'));var controller=require('./squareOdbc.controller');router[_0x00ef('0x6')]('/',auth[_0x00ef('0x7')](),controller[_0x00ef('0x8')]);router[_0x00ef('0x6')](_0x00ef('0x9'),auth['isAuthenticated'](),controller['show']);router[_0x00ef('0x6')](_0x00ef('0xa'),auth[_0x00ef('0x7')](),timeout('15s'),controller['test']);router['post']('/',auth[_0x00ef('0x7')](),controller[_0x00ef('0xb')]);router[_0x00ef('0xc')](_0x00ef('0x9'),auth[_0x00ef('0x7')](),controller[_0x00ef('0xd')]);router[_0x00ef('0xe')]('/:id',auth[_0x00ef('0x7')](),controller[_0x00ef('0xf')]);module['exports']=router; \ No newline at end of file +var _0x777e=['fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./squareOdbc.controller','get','isAuthenticated','/:id','show','/:id/test','test','post','create','put','update','delete','destroy','exports','multer','util','path','connect-timeout','express'];(function(_0x6827c4,_0x521f4b){var _0x9f40a8=function(_0x21da50){while(--_0x21da50){_0x6827c4['push'](_0x6827c4['shift']());}};_0x9f40a8(++_0x521f4b);}(_0x777e,0x85));var _0xe777=function(_0x4e77c6,_0x4c359c){_0x4e77c6=_0x4e77c6-0x0;var _0x3e326c=_0x777e[_0x4e77c6];return _0x3e326c;};'use strict';var multer=require(_0xe777('0x0'));var util=require(_0xe777('0x1'));var path=require(_0xe777('0x2'));var timeout=require(_0xe777('0x3'));var express=require(_0xe777('0x4'));var router=express['Router']();var fs_extra=require(_0xe777('0x5'));var auth=require(_0xe777('0x6'));var interaction=require(_0xe777('0x7'));var config=require(_0xe777('0x8'));var controller=require(_0xe777('0x9'));router[_0xe777('0xa')]('/',auth[_0xe777('0xb')](),controller['index']);router[_0xe777('0xa')](_0xe777('0xc'),auth[_0xe777('0xb')](),controller[_0xe777('0xd')]);router[_0xe777('0xa')](_0xe777('0xe'),auth[_0xe777('0xb')](),timeout('15s'),controller[_0xe777('0xf')]);router[_0xe777('0x10')]('/',auth[_0xe777('0xb')](),controller[_0xe777('0x11')]);router[_0xe777('0x12')](_0xe777('0xc'),auth[_0xe777('0xb')](),controller[_0xe777('0x13')]);router[_0xe777('0x14')](_0xe777('0xc'),auth[_0xe777('0xb')](),controller[_0xe777('0x15')]);module[_0xe777('0x16')]=router; \ No newline at end of file diff --git a/server/api/squareOdbc/squareOdbc.attributes.js b/server/api/squareOdbc/squareOdbc.attributes.js index 58409e6..fe62ce6 100644 --- a/server/api/squareOdbc/squareOdbc.attributes.js +++ b/server/api/squareOdbc/squareOdbc.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1f6c=['exports','STRING'];(function(_0x54496f,_0x305210){var _0x4dd0ca=function(_0x5f46d5){while(--_0x5f46d5){_0x54496f['push'](_0x54496f['shift']());}};_0x4dd0ca(++_0x305210);}(_0x1f6c,0xb6));var _0xc1f6=function(_0x4d3681,_0x136f19){_0x4d3681=_0x4d3681-0x0;var _0x22c7ac=_0x1f6c[_0x4d3681];return _0x22c7ac;};'use strict';var Sequelize=require('sequelize');module[_0xc1f6('0x0')]={'name':{'type':Sequelize[_0xc1f6('0x1')],'unique':'name','allowNull':![]},'dsn':{'type':Sequelize[_0xc1f6('0x1')]},'description':{'type':Sequelize[_0xc1f6('0x1')]}}; \ No newline at end of file +var _0x8f4e=['exports','STRING','name','sequelize'];(function(_0x15762c,_0x48af25){var _0xae6894=function(_0x349e72){while(--_0x349e72){_0x15762c['push'](_0x15762c['shift']());}};_0xae6894(++_0x48af25);}(_0x8f4e,0xab));var _0xe8f4=function(_0xa46a8b,_0x26d0df){_0xa46a8b=_0xa46a8b-0x0;var _0x566986=_0x8f4e[_0xa46a8b];return _0x566986;};'use strict';var Sequelize=require(_0xe8f4('0x0'));module[_0xe8f4('0x1')]={'name':{'type':Sequelize[_0xe8f4('0x2')],'unique':_0xe8f4('0x3'),'allowNull':![]},'dsn':{'type':Sequelize[_0xe8f4('0x2')]},'description':{'type':Sequelize[_0xe8f4('0x2')]}}; \ No newline at end of file diff --git a/server/api/squareOdbc/squareOdbc.controller.js b/server/api/squareOdbc/squareOdbc.controller.js index 8fc8757..94b941b 100644 --- a/server/api/squareOdbc/squareOdbc.controller.js +++ b/server/api/squareOdbc/squareOdbc.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe82a=['where','pick','filter','merge','VIRTUAL','options','includeAll','findAll','rows','catch','show','params','rawAttributes','include','find','create','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','test','dsn','odbc','closeSync','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','to-csv','fs-extra','lodash','squel','crypto','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','status','end','offset','undefined','limit','count','set','Content-Range','json','apply','reject','update','then','destroy','ODBC','UserProfileResource','sendStatus','error','stack','name','send','index','map','SquareOdbc','fieldName','type','model','query','keys','filters','intersection','fields','attributes','hasOwnProperty','nolimit','sort'];(function(_0x7bcf6b,_0x41a57f){var _0x14a86e=function(_0x3f993d){while(--_0x3f993d){_0x7bcf6b['push'](_0x7bcf6b['shift']());}};_0x14a86e(++_0x41a57f);}(_0xe82a,0x16f));var _0xae82=function(_0x58ecd6,_0x27146b){_0x58ecd6=_0x58ecd6-0x0;var _0x46e0cb=_0xe82a[_0x58ecd6];return _0x46e0cb;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0xae82('0x0'));var jsonpatch=require(_0xae82('0x1'));var rp=require(_0xae82('0x2'));var moment=require(_0xae82('0x3'));var BPromise=require('bluebird');var Mustache=require(_0xae82('0x4'));var util=require(_0xae82('0x5'));var path=require(_0xae82('0x6'));var sox=require('sox');var csv=require(_0xae82('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xae82('0x8'));var _=require(_0xae82('0x9'));var squel=require(_0xae82('0xa'));var crypto=require(_0xae82('0xb'));var jsforce=require('jsforce');var deskjs=require(_0xae82('0xc'));var toCsv=require(_0xae82('0x7'));var querystring=require(_0xae82('0xd'));var Papa=require('papaparse');var Redis=require(_0xae82('0xe'));var authService=require(_0xae82('0xf'));var qs=require(_0xae82('0x10'));var as=require(_0xae82('0x11'));var hardwareService=require(_0xae82('0x12'));var logger=require(_0xae82('0x13'))(_0xae82('0x14'));var utils=require('../../config/utils');var config=require(_0xae82('0x15'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x914b3b,_0x3a6f84){_0x3a6f84=_0x3a6f84||0xcc;return function(_0xb30ed5){if(_0xb30ed5){return _0x914b3b['sendStatus'](_0x3a6f84);}return _0x914b3b[_0xae82('0x16')](_0x3a6f84)[_0xae82('0x17')]();};}function respondWithResult(_0x54a1d3,_0x2fa2b7){_0x2fa2b7=_0x2fa2b7||0xc8;return function(_0xadf8a3){if(_0xadf8a3){return _0x54a1d3[_0xae82('0x16')](_0x2fa2b7)['json'](_0xadf8a3);}};}function respondWithFilteredResult(_0xfa1602,_0x4f43ba){return function(_0x50aeb2){if(_0x50aeb2){var _0x3ecdba=typeof _0x4f43ba[_0xae82('0x18')]===_0xae82('0x19')&&typeof _0x4f43ba[_0xae82('0x1a')]===_0xae82('0x19');var _0x414fe9=_0x50aeb2[_0xae82('0x1b')];var _0x456b45=_0x3ecdba?0x0:_0x4f43ba[_0xae82('0x18')];var _0x44f5f9=_0x3ecdba?_0x50aeb2['count']:_0x4f43ba['offset']+_0x4f43ba['limit'];var _0x36285b;if(_0x44f5f9>=_0x414fe9){_0x44f5f9=_0x414fe9;_0x36285b=0xc8;}else{_0x36285b=0xce;}_0xfa1602[_0xae82('0x16')](_0x36285b);return _0xfa1602[_0xae82('0x1c')](_0xae82('0x1d'),_0x456b45+'-'+_0x44f5f9+'/'+_0x414fe9)[_0xae82('0x1e')](_0x50aeb2);}return null;};}function patchUpdates(_0x255e47){return function(_0x503eed){try{jsonpatch[_0xae82('0x1f')](_0x503eed,_0x255e47,!![]);}catch(_0x288ec4){return BPromise[_0xae82('0x20')](_0x288ec4);}return _0x503eed['save']();};}function saveUpdates(_0x2e1650,_0x42119d){return function(_0xb4b5b3){if(_0xb4b5b3){return _0xb4b5b3[_0xae82('0x21')](_0x2e1650)[_0xae82('0x22')](function(_0x51470a){return _0x51470a;});}return null;};}function removeEntity(_0x127555,_0x1046c3){return function(_0x2e5cda){if(_0x2e5cda){return _0x2e5cda[_0xae82('0x23')]()[_0xae82('0x22')](function(){var _0x18568c=_0x2e5cda['get']({'plain':!![]});var _0x64692a=_0xae82('0x24');return db[_0xae82('0x25')][_0xae82('0x23')]({'where':{'type':_0x64692a,'resourceId':_0x18568c['id']}})[_0xae82('0x22')](function(){return _0x2e5cda;});})[_0xae82('0x22')](function(){_0x127555[_0xae82('0x16')](0xcc)[_0xae82('0x17')]();});}};}function handleEntityNotFound(_0xd64b58,_0x1274b8){return function(_0xb5bdab){if(!_0xb5bdab){_0xd64b58[_0xae82('0x26')](0x194);}return _0xb5bdab;};}function handleError(_0x4e3913,_0x2cdba6){_0x2cdba6=_0x2cdba6||0x1f4;return function(_0x2246a3){logger[_0xae82('0x27')](_0x2246a3[_0xae82('0x28')]);if(_0x2246a3['name']){delete _0x2246a3[_0xae82('0x29')];}_0x4e3913['status'](_0x2cdba6)[_0xae82('0x2a')](_0x2246a3);};}exports[_0xae82('0x2b')]=function(_0x592582,_0x28f6ba){var _0x339e3c={},_0x5804c5={},_0x101f6d={'count':0x0,'rows':[]};var _0x57cfd5=_[_0xae82('0x2c')](db[_0xae82('0x2d')]['rawAttributes'],function(_0x3e6b4f){return{'name':_0x3e6b4f[_0xae82('0x2e')],'type':_0x3e6b4f[_0xae82('0x2f')]['key']};});_0x5804c5[_0xae82('0x30')]=_[_0xae82('0x2c')](_0x57cfd5,_0xae82('0x29'));_0x5804c5[_0xae82('0x31')]=_[_0xae82('0x32')](_0x592582[_0xae82('0x31')]);_0x5804c5[_0xae82('0x33')]=_[_0xae82('0x34')](_0x5804c5[_0xae82('0x30')],_0x5804c5[_0xae82('0x31')]);_0x339e3c['attributes']=_[_0xae82('0x34')](_0x5804c5[_0xae82('0x30')],qs[_0xae82('0x35')](_0x592582[_0xae82('0x31')][_0xae82('0x35')]));_0x339e3c[_0xae82('0x36')]=_0x339e3c[_0xae82('0x36')]['length']?_0x339e3c[_0xae82('0x36')]:_0x5804c5['model'];if(!_0x592582[_0xae82('0x31')][_0xae82('0x37')](_0xae82('0x38'))){_0x339e3c[_0xae82('0x1a')]=qs[_0xae82('0x1a')](_0x592582[_0xae82('0x31')][_0xae82('0x1a')]);_0x339e3c['offset']=qs['offset'](_0x592582[_0xae82('0x31')][_0xae82('0x18')]);}_0x339e3c['order']=qs[_0xae82('0x39')](_0x592582[_0xae82('0x31')]['sort']);_0x339e3c[_0xae82('0x3a')]=qs[_0xae82('0x33')](_[_0xae82('0x3b')](_0x592582['query'],_0x5804c5[_0xae82('0x33')]),_0x57cfd5);if(_0x592582[_0xae82('0x31')][_0xae82('0x3c')]){_0x339e3c[_0xae82('0x3a')]=_[_0xae82('0x3d')](_0x339e3c[_0xae82('0x3a')],{'$or':_[_0xae82('0x2c')](_0x57cfd5,function(_0x25b3b9){if(_0x25b3b9[_0xae82('0x2f')]!==_0xae82('0x3e')){var _0x5dfb45={};_0x5dfb45[_0x25b3b9['name']]={'$like':'%'+_0x592582[_0xae82('0x31')][_0xae82('0x3c')]+'%'};return _0x5dfb45;}})});}_0x339e3c=_[_0xae82('0x3d')]({},_0x339e3c,_0x592582[_0xae82('0x3f')]);var _0x29c33d={'where':_0x339e3c[_0xae82('0x3a')]};return db[_0xae82('0x2d')][_0xae82('0x1b')](_0x29c33d)[_0xae82('0x22')](function(_0x37cca2){_0x101f6d['count']=_0x37cca2;if(_0x592582[_0xae82('0x31')][_0xae82('0x40')]){_0x339e3c['include']=[{'all':!![]}];}return db[_0xae82('0x2d')][_0xae82('0x41')](_0x339e3c);})[_0xae82('0x22')](function(_0xd7cb04){_0x101f6d[_0xae82('0x42')]=_0xd7cb04;return _0x101f6d;})[_0xae82('0x22')](respondWithFilteredResult(_0x28f6ba,_0x339e3c))[_0xae82('0x43')](handleError(_0x28f6ba,null));};exports[_0xae82('0x44')]=function(_0x166956,_0x757151){var _0x1aaa9e={'raw':!![],'where':{'id':_0x166956[_0xae82('0x45')]['id']}},_0x3f6d88={};_0x3f6d88[_0xae82('0x30')]=_[_0xae82('0x32')](db[_0xae82('0x2d')][_0xae82('0x46')]);_0x3f6d88[_0xae82('0x31')]=_[_0xae82('0x32')](_0x166956[_0xae82('0x31')]);_0x3f6d88['filters']=_[_0xae82('0x34')](_0x3f6d88[_0xae82('0x30')],_0x3f6d88[_0xae82('0x31')]);_0x1aaa9e[_0xae82('0x36')]=_['intersection'](_0x3f6d88['model'],qs[_0xae82('0x35')](_0x166956[_0xae82('0x31')][_0xae82('0x35')]));_0x1aaa9e[_0xae82('0x36')]=_0x1aaa9e[_0xae82('0x36')]['length']?_0x1aaa9e[_0xae82('0x36')]:_0x3f6d88[_0xae82('0x30')];if(_0x166956[_0xae82('0x31')][_0xae82('0x40')]){_0x1aaa9e[_0xae82('0x47')]=[{'all':!![]}];}_0x1aaa9e=_[_0xae82('0x3d')]({},_0x1aaa9e,_0x166956['options']);return db[_0xae82('0x2d')][_0xae82('0x48')](_0x1aaa9e)[_0xae82('0x22')](handleEntityNotFound(_0x757151,null))[_0xae82('0x22')](respondWithResult(_0x757151,null))['catch'](handleError(_0x757151,null));};exports[_0xae82('0x49')]=function(_0x1ecfd5,_0x403265){return db[_0xae82('0x2d')]['create'](_0x1ecfd5['body'],{})[_0xae82('0x22')](function(_0x237117){var _0x4b0007=_0x1ecfd5[_0xae82('0x4a')][_0xae82('0x4b')]({'plain':!![]});if(!_0x4b0007)throw new Error(_0xae82('0x4c'));if(_0x4b0007['role']===_0xae82('0x4a')){var _0xec3466=_0x237117['get']({'plain':!![]});var _0x253520=_0xae82('0x24');return db['UserProfileSection']['find']({'where':{'name':_0x253520,'userProfileId':_0x4b0007[_0xae82('0x4d')]},'raw':!![]})[_0xae82('0x22')](function(_0x45ced5){if(_0x45ced5&&_0x45ced5[_0xae82('0x4e')]===0x0){return db[_0xae82('0x25')][_0xae82('0x49')]({'name':_0xec3466[_0xae82('0x29')],'resourceId':_0xec3466['id'],'type':_0x45ced5[_0xae82('0x29')],'sectionId':_0x45ced5['id']},{})[_0xae82('0x22')](function(){return _0x237117;});}else{return _0x237117;}})[_0xae82('0x43')](function(_0x42a24a){logger[_0xae82('0x27')](_0xae82('0x4f'),_0x42a24a);throw _0x42a24a;});}return _0x237117;})['then'](respondWithResult(_0x403265,0xc9))[_0xae82('0x43')](handleError(_0x403265,null));};exports['update']=function(_0x3077b5,_0x3f8d4d){if(_0x3077b5[_0xae82('0x50')]['id']){delete _0x3077b5[_0xae82('0x50')]['id'];}return db[_0xae82('0x2d')][_0xae82('0x48')]({'where':{'id':_0x3077b5[_0xae82('0x45')]['id']}})['then'](handleEntityNotFound(_0x3f8d4d,null))[_0xae82('0x22')](saveUpdates(_0x3077b5[_0xae82('0x50')],null))[_0xae82('0x22')](respondWithResult(_0x3f8d4d,null))[_0xae82('0x43')](handleError(_0x3f8d4d,null));};exports[_0xae82('0x23')]=function(_0xd29c2c,_0x70b64d){return db[_0xae82('0x2d')]['find']({'where':{'id':_0xd29c2c[_0xae82('0x45')]['id']}})[_0xae82('0x22')](handleEntityNotFound(_0x70b64d,null))[_0xae82('0x22')](removeEntity(_0x70b64d,null))[_0xae82('0x43')](handleError(_0x70b64d,null));};exports[_0xae82('0x51')]=function(_0x39b10e,_0x5e27e7,_0x1da055){var _0x22491d;return db[_0xae82('0x2d')][_0xae82('0x48')]({'where':{'id':_0x39b10e[_0xae82('0x45')]['id']},'attributes':['id',_0xae82('0x52')]})[_0xae82('0x22')](handleEntityNotFound(_0x5e27e7,null))[_0xae82('0x22')](function(_0x2affc6){if(_0x2affc6){var _0x4425c8=require(_0xae82('0x53'))();_0x4425c8['openSync'](_0x2affc6[_0xae82('0x52')]);_0x4425c8[_0xae82('0x54')]();return _0x2affc6;}})[_0xae82('0x22')](respondWithResult(_0x5e27e7,null))[_0xae82('0x43')](handleError(_0x5e27e7,null));}; \ No newline at end of file +var _0x7311=['save','update','then','destroy','get','ODBC','error','stack','name','index','SquareOdbc','rawAttributes','fieldName','type','model','map','query','keys','filters','attributes','intersection','fields','order','sort','where','pick','VIRTUAL','filter','merge','options','include','findAll','rows','show','params','length','includeAll','find','catch','create','body','user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','test','dsn','openSync','closeSync','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','fs-extra','lodash','crypto','desk.js','querystring','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','status','end','json','offset','undefined','count','limit','set','Content-Range','apply','reject'];(function(_0x8d6918,_0x4ca62c){var _0x32aa05=function(_0x12888f){while(--_0x12888f){_0x8d6918['push'](_0x8d6918['shift']());}};_0x32aa05(++_0x4ca62c);}(_0x7311,0x17f));var _0x1731=function(_0x267d29,_0x27f1fe){_0x267d29=_0x267d29-0x0;var _0x4cd7c9=_0x7311[_0x267d29];return _0x4cd7c9;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x1731('0x0'));var zipdir=require(_0x1731('0x1'));var jsonpatch=require(_0x1731('0x2'));var rp=require(_0x1731('0x3'));var moment=require(_0x1731('0x4'));var BPromise=require(_0x1731('0x5'));var Mustache=require('mustache');var util=require(_0x1731('0x6'));var path=require(_0x1731('0x7'));var sox=require(_0x1731('0x8'));var csv=require(_0x1731('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x1731('0xa'));var _=require(_0x1731('0xb'));var squel=require('squel');var crypto=require(_0x1731('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x1731('0xd'));var toCsv=require('to-csv');var querystring=require(_0x1731('0xe'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x1731('0xf'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x1731('0x10'))(_0x1731('0x11'));var utils=require(_0x1731('0x12'));var config=require(_0x1731('0x13'));var licenseUtil=require('../../config/license/util');var db=require(_0x1731('0x14'))['db'];function respondWithStatusCode(_0x463134,_0x3413d5){_0x3413d5=_0x3413d5||0xcc;return function(_0x14bc36){if(_0x14bc36){return _0x463134['sendStatus'](_0x3413d5);}return _0x463134[_0x1731('0x15')](_0x3413d5)[_0x1731('0x16')]();};}function respondWithResult(_0x5ca03b,_0x47a01a){_0x47a01a=_0x47a01a||0xc8;return function(_0x599b02){if(_0x599b02){return _0x5ca03b['status'](_0x47a01a)[_0x1731('0x17')](_0x599b02);}};}function respondWithFilteredResult(_0x1bc859,_0x489648){return function(_0x4acd3e){if(_0x4acd3e){var _0xb0afd1=typeof _0x489648[_0x1731('0x18')]===_0x1731('0x19')&&typeof _0x489648['limit']==='undefined';var _0x4b0d39=_0x4acd3e[_0x1731('0x1a')];var _0x5bb458=_0xb0afd1?0x0:_0x489648[_0x1731('0x18')];var _0x26610f=_0xb0afd1?_0x4acd3e[_0x1731('0x1a')]:_0x489648[_0x1731('0x18')]+_0x489648[_0x1731('0x1b')];var _0x15f6bc;if(_0x26610f>=_0x4b0d39){_0x26610f=_0x4b0d39;_0x15f6bc=0xc8;}else{_0x15f6bc=0xce;}_0x1bc859[_0x1731('0x15')](_0x15f6bc);return _0x1bc859[_0x1731('0x1c')](_0x1731('0x1d'),_0x5bb458+'-'+_0x26610f+'/'+_0x4b0d39)[_0x1731('0x17')](_0x4acd3e);}return null;};}function patchUpdates(_0x1922ea){return function(_0x242c9d){try{jsonpatch[_0x1731('0x1e')](_0x242c9d,_0x1922ea,!![]);}catch(_0x5a4f49){return BPromise[_0x1731('0x1f')](_0x5a4f49);}return _0x242c9d[_0x1731('0x20')]();};}function saveUpdates(_0x259709,_0x450501){return function(_0x2e7666){if(_0x2e7666){return _0x2e7666[_0x1731('0x21')](_0x259709)[_0x1731('0x22')](function(_0x435291){return _0x435291;});}return null;};}function removeEntity(_0x5531a5,_0x3f02d9){return function(_0x1a2d6f){if(_0x1a2d6f){return _0x1a2d6f[_0x1731('0x23')]()[_0x1731('0x22')](function(){var _0x573e7f=_0x1a2d6f[_0x1731('0x24')]({'plain':!![]});var _0x1ee843=_0x1731('0x25');return db['UserProfileResource']['destroy']({'where':{'type':_0x1ee843,'resourceId':_0x573e7f['id']}})[_0x1731('0x22')](function(){return _0x1a2d6f;});})[_0x1731('0x22')](function(){_0x5531a5[_0x1731('0x15')](0xcc)[_0x1731('0x16')]();});}};}function handleEntityNotFound(_0x24f5de,_0x27f779){return function(_0x9bd1d0){if(!_0x9bd1d0){_0x24f5de['sendStatus'](0x194);}return _0x9bd1d0;};}function handleError(_0x1a2cf1,_0x1f2983){_0x1f2983=_0x1f2983||0x1f4;return function(_0x334dfd){logger[_0x1731('0x26')](_0x334dfd[_0x1731('0x27')]);if(_0x334dfd[_0x1731('0x28')]){delete _0x334dfd[_0x1731('0x28')];}_0x1a2cf1[_0x1731('0x15')](_0x1f2983)['send'](_0x334dfd);};}exports[_0x1731('0x29')]=function(_0x3e8d92,_0x591f0e){var _0x269027={},_0x1a1abc={},_0x122c50={'count':0x0,'rows':[]};var _0x56338b=_['map'](db[_0x1731('0x2a')][_0x1731('0x2b')],function(_0x27934d){return{'name':_0x27934d[_0x1731('0x2c')],'type':_0x27934d[_0x1731('0x2d')]['key']};});_0x1a1abc[_0x1731('0x2e')]=_[_0x1731('0x2f')](_0x56338b,_0x1731('0x28'));_0x1a1abc[_0x1731('0x30')]=_[_0x1731('0x31')](_0x3e8d92[_0x1731('0x30')]);_0x1a1abc[_0x1731('0x32')]=_['intersection'](_0x1a1abc[_0x1731('0x2e')],_0x1a1abc[_0x1731('0x30')]);_0x269027[_0x1731('0x33')]=_[_0x1731('0x34')](_0x1a1abc[_0x1731('0x2e')],qs[_0x1731('0x35')](_0x3e8d92[_0x1731('0x30')]['fields']));_0x269027[_0x1731('0x33')]=_0x269027[_0x1731('0x33')]['length']?_0x269027[_0x1731('0x33')]:_0x1a1abc['model'];if(!_0x3e8d92[_0x1731('0x30')]['hasOwnProperty']('nolimit')){_0x269027[_0x1731('0x1b')]=qs[_0x1731('0x1b')](_0x3e8d92[_0x1731('0x30')][_0x1731('0x1b')]);_0x269027['offset']=qs[_0x1731('0x18')](_0x3e8d92['query'][_0x1731('0x18')]);}_0x269027[_0x1731('0x36')]=qs[_0x1731('0x37')](_0x3e8d92[_0x1731('0x30')][_0x1731('0x37')]);_0x269027[_0x1731('0x38')]=qs['filters'](_[_0x1731('0x39')](_0x3e8d92[_0x1731('0x30')],_0x1a1abc[_0x1731('0x32')]),_0x56338b);if(_0x3e8d92[_0x1731('0x30')]['filter']){_0x269027['where']=_['merge'](_0x269027[_0x1731('0x38')],{'$or':_['map'](_0x56338b,function(_0x2c0720){if(_0x2c0720[_0x1731('0x2d')]!==_0x1731('0x3a')){var _0x5e51fb={};_0x5e51fb[_0x2c0720['name']]={'$like':'%'+_0x3e8d92[_0x1731('0x30')][_0x1731('0x3b')]+'%'};return _0x5e51fb;}})});}_0x269027=_[_0x1731('0x3c')]({},_0x269027,_0x3e8d92[_0x1731('0x3d')]);var _0xc90e0b={'where':_0x269027['where']};return db[_0x1731('0x2a')][_0x1731('0x1a')](_0xc90e0b)[_0x1731('0x22')](function(_0x13aa47){_0x122c50[_0x1731('0x1a')]=_0x13aa47;if(_0x3e8d92[_0x1731('0x30')]['includeAll']){_0x269027[_0x1731('0x3e')]=[{'all':!![]}];}return db[_0x1731('0x2a')][_0x1731('0x3f')](_0x269027);})[_0x1731('0x22')](function(_0x14f8ee){_0x122c50[_0x1731('0x40')]=_0x14f8ee;return _0x122c50;})[_0x1731('0x22')](respondWithFilteredResult(_0x591f0e,_0x269027))['catch'](handleError(_0x591f0e,null));};exports[_0x1731('0x41')]=function(_0x44327b,_0x551d2b){var _0x58bd50={'raw':!![],'where':{'id':_0x44327b[_0x1731('0x42')]['id']}},_0x16ac01={};_0x16ac01[_0x1731('0x2e')]=_[_0x1731('0x31')](db[_0x1731('0x2a')][_0x1731('0x2b')]);_0x16ac01[_0x1731('0x30')]=_['keys'](_0x44327b['query']);_0x16ac01[_0x1731('0x32')]=_['intersection'](_0x16ac01['model'],_0x16ac01['query']);_0x58bd50[_0x1731('0x33')]=_[_0x1731('0x34')](_0x16ac01[_0x1731('0x2e')],qs[_0x1731('0x35')](_0x44327b[_0x1731('0x30')][_0x1731('0x35')]));_0x58bd50[_0x1731('0x33')]=_0x58bd50[_0x1731('0x33')][_0x1731('0x43')]?_0x58bd50[_0x1731('0x33')]:_0x16ac01[_0x1731('0x2e')];if(_0x44327b[_0x1731('0x30')][_0x1731('0x44')]){_0x58bd50[_0x1731('0x3e')]=[{'all':!![]}];}_0x58bd50=_['merge']({},_0x58bd50,_0x44327b['options']);return db['SquareOdbc'][_0x1731('0x45')](_0x58bd50)['then'](handleEntityNotFound(_0x551d2b,null))[_0x1731('0x22')](respondWithResult(_0x551d2b,null))[_0x1731('0x46')](handleError(_0x551d2b,null));};exports[_0x1731('0x47')]=function(_0x4ae680,_0x5c3fdd){return db[_0x1731('0x2a')][_0x1731('0x47')](_0x4ae680[_0x1731('0x48')],{})[_0x1731('0x22')](function(_0x17dc9f){var _0x26e35e=_0x4ae680[_0x1731('0x49')][_0x1731('0x24')]({'plain':!![]});if(!_0x26e35e)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x26e35e[_0x1731('0x4a')]===_0x1731('0x49')){var _0x27617e=_0x17dc9f[_0x1731('0x24')]({'plain':!![]});var _0x166bd2=_0x1731('0x25');return db[_0x1731('0x4b')][_0x1731('0x45')]({'where':{'name':_0x166bd2,'userProfileId':_0x26e35e[_0x1731('0x4c')]},'raw':!![]})[_0x1731('0x22')](function(_0x18ec65){if(_0x18ec65&&_0x18ec65[_0x1731('0x4d')]===0x0){return db['UserProfileResource'][_0x1731('0x47')]({'name':_0x27617e[_0x1731('0x28')],'resourceId':_0x27617e['id'],'type':_0x18ec65['name'],'sectionId':_0x18ec65['id']},{})[_0x1731('0x22')](function(){return _0x17dc9f;});}else{return _0x17dc9f;}})['catch'](function(_0x125382){logger[_0x1731('0x26')](_0x1731('0x4e'),_0x125382);throw _0x125382;});}return _0x17dc9f;})[_0x1731('0x22')](respondWithResult(_0x5c3fdd,0xc9))[_0x1731('0x46')](handleError(_0x5c3fdd,null));};exports[_0x1731('0x21')]=function(_0x303e94,_0x1d0d05){if(_0x303e94[_0x1731('0x48')]['id']){delete _0x303e94[_0x1731('0x48')]['id'];}return db[_0x1731('0x2a')][_0x1731('0x45')]({'where':{'id':_0x303e94[_0x1731('0x42')]['id']}})[_0x1731('0x22')](handleEntityNotFound(_0x1d0d05,null))[_0x1731('0x22')](saveUpdates(_0x303e94[_0x1731('0x48')],null))[_0x1731('0x22')](respondWithResult(_0x1d0d05,null))['catch'](handleError(_0x1d0d05,null));};exports['destroy']=function(_0x1fdb52,_0x37483b){return db[_0x1731('0x2a')][_0x1731('0x45')]({'where':{'id':_0x1fdb52[_0x1731('0x42')]['id']}})['then'](handleEntityNotFound(_0x37483b,null))['then'](removeEntity(_0x37483b,null))['catch'](handleError(_0x37483b,null));};exports[_0x1731('0x4f')]=function(_0x4e186e,_0x243c92,_0x9ed125){var _0x12cd87;return db[_0x1731('0x2a')]['find']({'where':{'id':_0x4e186e[_0x1731('0x42')]['id']},'attributes':['id',_0x1731('0x50')]})['then'](handleEntityNotFound(_0x243c92,null))[_0x1731('0x22')](function(_0x461174){if(_0x461174){var _0x522eeb=require('odbc')();_0x522eeb[_0x1731('0x51')](_0x461174[_0x1731('0x50')]);_0x522eeb[_0x1731('0x52')]();return _0x461174;}})[_0x1731('0x22')](respondWithResult(_0x243c92,null))[_0x1731('0x46')](handleError(_0x243c92,null));}; \ No newline at end of file diff --git a/server/api/squareOdbc/squareOdbc.model.js b/server/api/squareOdbc/squareOdbc.model.js index 94541b1..9a16dea 100644 --- a/server/api/squareOdbc/squareOdbc.model.js +++ b/server/api/squareOdbc/squareOdbc.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb41e=['bluebird','path','rimraf','../../config/environment','./squareOdbc.attributes','square_odbc','lodash','../../config/logger','api'];(function(_0x474bc0,_0x26989c){var _0x4b24cf=function(_0x4be866){while(--_0x4be866){_0x474bc0['push'](_0x474bc0['shift']());}};_0x4b24cf(++_0x26989c);}(_0xb41e,0x1da));var _0xeb41=function(_0x128056,_0x4f314b){_0x128056=_0x128056-0x0;var _0x47da14=_0xb41e[_0x128056];return _0x47da14;};'use strict';var _=require(_0xeb41('0x0'));var util=require('util');var logger=require(_0xeb41('0x1'))(_0xeb41('0x2'));var moment=require('moment');var BPromise=require(_0xeb41('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xeb41('0x4'));var rimraf=require(_0xeb41('0x5'));var config=require(_0xeb41('0x6'));var attributes=require(_0xeb41('0x7'));module['exports']=function(_0x5799bb,_0x3d8418){return _0x5799bb['define']('SquareOdbc',attributes,{'tableName':_0xeb41('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xbd51=['../../config/environment','./squareOdbc.attributes','exports','define','square_odbc','lodash','util','../../config/logger','api','moment','bluebird'];(function(_0x290cc1,_0x5d80a8){var _0x392734=function(_0x16b1f4){while(--_0x16b1f4){_0x290cc1['push'](_0x290cc1['shift']());}};_0x392734(++_0x5d80a8);}(_0xbd51,0xd6));var _0x1bd5=function(_0x1427e6,_0x18af8a){_0x1427e6=_0x1427e6-0x0;var _0x51ca83=_0xbd51[_0x1427e6];return _0x51ca83;};'use strict';var _=require(_0x1bd5('0x0'));var util=require(_0x1bd5('0x1'));var logger=require(_0x1bd5('0x2'))(_0x1bd5('0x3'));var moment=require(_0x1bd5('0x4'));var BPromise=require(_0x1bd5('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x1bd5('0x6'));var attributes=require(_0x1bd5('0x7'));module[_0x1bd5('0x8')]=function(_0x273a95,_0x1f86e4){return _0x273a95[_0x1bd5('0x9')]('SquareOdbc',attributes,{'tableName':_0x1bd5('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/squareOdbc/squareOdbc.rpc.js b/server/api/squareOdbc/squareOdbc.rpc.js index e733d44..13c269b 100644 --- a/server/api/squareOdbc/squareOdbc.rpc.js +++ b/server/api/squareOdbc/squareOdbc.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x19ec=['randomstring','ioredis','../../mysqldb','../../config/utils','rpc','client','http','then','info','SquareOdbc,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','ShowSquareOdbc','SquareOdbc','find','raw','options','attributes','include','map','model','debug','catch','lodash','util','bluebird'];(function(_0x2e0185,_0x4dca6b){var _0x5016df=function(_0x7ed308){while(--_0x7ed308){_0x2e0185['push'](_0x2e0185['shift']());}};_0x5016df(++_0x4dca6b);}(_0x19ec,0x147));var _0xc19e=function(_0x42cae2,_0x284ef8){_0x42cae2=_0x42cae2-0x0;var _0x5f256f=_0x19ec[_0x42cae2];return _0x5f256f;};'use strict';var _=require(_0xc19e('0x0'));var util=require(_0xc19e('0x1'));var moment=require('moment');var BPromise=require(_0xc19e('0x2'));var rs=require(_0xc19e('0x3'));var fs=require('fs');var Redis=require(_0xc19e('0x4'));var db=require(_0xc19e('0x5'))['db'];var utils=require(_0xc19e('0x6'));var logger=require('../../config/logger')(_0xc19e('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xc19e('0x8')][_0xc19e('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x39a980,_0x3652e9,_0x4bb05d){return new BPromise(function(_0x47f56a,_0x3f2cfe){return client['request'](_0x39a980,_0x4bb05d)[_0xc19e('0xa')](function(_0x1e10ce){logger[_0xc19e('0xb')](_0xc19e('0xc'),_0x3652e9,_0xc19e('0xd'));logger['debug']('SquareOdbc,\x20%s,\x20%s,\x20%s',_0x3652e9,_0xc19e('0xd'),JSON[_0xc19e('0xe')](_0x1e10ce));if(_0x1e10ce['error']){if(_0x1e10ce[_0xc19e('0xf')][_0xc19e('0x10')]===0x1f4){logger[_0xc19e('0xf')]('SquareOdbc,\x20%s,\x20%s',_0x3652e9,_0x1e10ce['error']['message']);return _0x3f2cfe(_0x1e10ce[_0xc19e('0xf')]['message']);}logger['error'](_0xc19e('0xc'),_0x3652e9,_0x1e10ce['error'][_0xc19e('0x11')]);return _0x47f56a(_0x1e10ce['error'][_0xc19e('0x11')]);}else{logger['info'](_0xc19e('0xc'),_0x3652e9,_0xc19e('0xd'));_0x47f56a(_0x1e10ce[_0xc19e('0x12')][_0xc19e('0x11')]);}})['catch'](function(_0x13eb85){logger[_0xc19e('0xf')](_0xc19e('0xc'),_0x3652e9,_0x13eb85);_0x3f2cfe(_0x13eb85);});});}exports[_0xc19e('0x13')]=function(_0x18e23f){var _0x145989=this;return new Promise(function(_0x47db88,_0x59cb50){return db[_0xc19e('0x14')][_0xc19e('0x15')]({'raw':_0x18e23f['options']?_0x18e23f['options'][_0xc19e('0x16')]===undefined?!![]:![]:!![],'where':_0x18e23f[_0xc19e('0x17')]?_0x18e23f[_0xc19e('0x17')]['where']||null:null,'attributes':_0x18e23f['options']?_0x18e23f['options'][_0xc19e('0x18')]||null:null,'include':_0x18e23f[_0xc19e('0x17')]?_0x18e23f[_0xc19e('0x17')][_0xc19e('0x19')]?_[_0xc19e('0x1a')](_0x18e23f[_0xc19e('0x17')][_0xc19e('0x19')],function(_0x346cbe){return{'model':db[_0x346cbe[_0xc19e('0x1b')]],'as':_0x346cbe['as'],'attributes':_0x346cbe[_0xc19e('0x18')],'include':_0x346cbe[_0xc19e('0x19')]?_[_0xc19e('0x1a')](_0x346cbe[_0xc19e('0x19')],function(_0x4eabab){return{'model':db[_0x4eabab[_0xc19e('0x1b')]],'as':_0x4eabab['as'],'attributes':_0x4eabab['attributes'],'include':_0x4eabab[_0xc19e('0x19')]?_[_0xc19e('0x1a')](_0x4eabab[_0xc19e('0x19')],function(_0x2c5179){return{'model':db[_0x2c5179[_0xc19e('0x1b')]],'as':_0x2c5179['as'],'attributes':_0x2c5179[_0xc19e('0x18')]};}):[]};}):[]};}):[]:[]})['then'](function(_0xdfe6bc){logger['info'](_0xc19e('0x13'),_0x18e23f);logger[_0xc19e('0x1c')]('ShowSquareOdbc',_0x18e23f,JSON[_0xc19e('0xe')](_0xdfe6bc));_0x47db88(_0xdfe6bc);})[_0xc19e('0x1d')](function(_0x5ef154){logger[_0xc19e('0xf')](_0xc19e('0x13'),_0x5ef154[_0xc19e('0x11')],_0x18e23f);_0x59cb50(_0x145989[_0xc19e('0xf')](0x1f4,_0x5ef154[_0xc19e('0x11')]));});});}; \ No newline at end of file +var _0x19f2=['catch','SquareOdbc','find','options','raw','where','attributes','include','model','map','then','ShowSquareOdbc','lodash','util','moment','randomstring','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','info','request\x20sent','debug','SquareOdbc,\x20%s,\x20%s,\x20%s','stringify','error','code','SquareOdbc,\x20%s,\x20%s','message','result'];(function(_0x59250d,_0x3faa07){var _0x7635eb=function(_0x27ad6b){while(--_0x27ad6b){_0x59250d['push'](_0x59250d['shift']());}};_0x7635eb(++_0x3faa07);}(_0x19f2,0x135));var _0x219f=function(_0x1dd78b,_0x213fd9){_0x1dd78b=_0x1dd78b-0x0;var _0x2d9bf6=_0x19f2[_0x1dd78b];return _0x2d9bf6;};'use strict';var _=require(_0x219f('0x0'));var util=require(_0x219f('0x1'));var moment=require(_0x219f('0x2'));var BPromise=require('bluebird');var rs=require(_0x219f('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x219f('0x4'));var logger=require(_0x219f('0x5'))(_0x219f('0x6'));var config=require(_0x219f('0x7'));var jayson=require(_0x219f('0x8'));var client=jayson[_0x219f('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x5ca545,_0x4b70ee,_0x39d07a){return new BPromise(function(_0x22717b,_0x414e51){return client[_0x219f('0xa')](_0x5ca545,_0x39d07a)['then'](function(_0x30bceb){logger[_0x219f('0xb')]('SquareOdbc,\x20%s,\x20%s',_0x4b70ee,_0x219f('0xc'));logger[_0x219f('0xd')](_0x219f('0xe'),_0x4b70ee,_0x219f('0xc'),JSON[_0x219f('0xf')](_0x30bceb));if(_0x30bceb[_0x219f('0x10')]){if(_0x30bceb['error'][_0x219f('0x11')]===0x1f4){logger[_0x219f('0x10')](_0x219f('0x12'),_0x4b70ee,_0x30bceb[_0x219f('0x10')]['message']);return _0x414e51(_0x30bceb[_0x219f('0x10')][_0x219f('0x13')]);}logger[_0x219f('0x10')](_0x219f('0x12'),_0x4b70ee,_0x30bceb['error'][_0x219f('0x13')]);return _0x22717b(_0x30bceb['error'][_0x219f('0x13')]);}else{logger[_0x219f('0xb')](_0x219f('0x12'),_0x4b70ee,_0x219f('0xc'));_0x22717b(_0x30bceb[_0x219f('0x14')][_0x219f('0x13')]);}})[_0x219f('0x15')](function(_0x3938de){logger[_0x219f('0x10')](_0x219f('0x12'),_0x4b70ee,_0x3938de);_0x414e51(_0x3938de);});});}exports['ShowSquareOdbc']=function(_0x54e82b){var _0x407350=this;return new Promise(function(_0x1a9a76,_0x3d65cc){return db[_0x219f('0x16')][_0x219f('0x17')]({'raw':_0x54e82b[_0x219f('0x18')]?_0x54e82b[_0x219f('0x18')][_0x219f('0x19')]===undefined?!![]:![]:!![],'where':_0x54e82b[_0x219f('0x18')]?_0x54e82b['options'][_0x219f('0x1a')]||null:null,'attributes':_0x54e82b[_0x219f('0x18')]?_0x54e82b['options'][_0x219f('0x1b')]||null:null,'include':_0x54e82b[_0x219f('0x18')]?_0x54e82b[_0x219f('0x18')][_0x219f('0x1c')]?_['map'](_0x54e82b['options']['include'],function(_0x4943c3){return{'model':db[_0x4943c3[_0x219f('0x1d')]],'as':_0x4943c3['as'],'attributes':_0x4943c3[_0x219f('0x1b')],'include':_0x4943c3[_0x219f('0x1c')]?_[_0x219f('0x1e')](_0x4943c3[_0x219f('0x1c')],function(_0x46e746){return{'model':db[_0x46e746[_0x219f('0x1d')]],'as':_0x46e746['as'],'attributes':_0x46e746[_0x219f('0x1b')],'include':_0x46e746[_0x219f('0x1c')]?_[_0x219f('0x1e')](_0x46e746[_0x219f('0x1c')],function(_0x3cbe9f){return{'model':db[_0x3cbe9f['model']],'as':_0x3cbe9f['as'],'attributes':_0x3cbe9f[_0x219f('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x219f('0x1f')](function(_0x37068c){logger[_0x219f('0xb')](_0x219f('0x20'),_0x54e82b);logger[_0x219f('0xd')](_0x219f('0x20'),_0x54e82b,JSON[_0x219f('0xf')](_0x37068c));_0x1a9a76(_0x37068c);})[_0x219f('0x15')](function(_0x5cae92){logger[_0x219f('0x10')](_0x219f('0x20'),_0x5cae92[_0x219f('0x13')],_0x54e82b);_0x3d65cc(_0x407350[_0x219f('0x10')](0x1f4,_0x5cae92[_0x219f('0x13')]));});});}; \ No newline at end of file diff --git a/server/api/squareProject/index.js b/server/api/squareProject/index.js index fd86d7d..3763ca9 100644 --- a/server/api/squareProject/index.js +++ b/server/api/squareProject/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfd49=['put','/:id','update','delete','destroy','removeUsers','exports','multer','util','path','connect-timeout','express','Router','fs-extra','./squareProject.controller','isAuthenticated','index','get','show','/:id/users','getUsers','post','addUsers'];(function(_0x5d0720,_0x238fc5){var _0x2b98b5=function(_0x387cc3){while(--_0x387cc3){_0x5d0720['push'](_0x5d0720['shift']());}};_0x2b98b5(++_0x238fc5);}(_0xfd49,0x91));var _0x9fd4=function(_0x467944,_0x5885e8){_0x467944=_0x467944-0x0;var _0x138583=_0xfd49[_0x467944];return _0x138583;};'use strict';var multer=require(_0x9fd4('0x0'));var util=require(_0x9fd4('0x1'));var path=require(_0x9fd4('0x2'));var timeout=require(_0x9fd4('0x3'));var express=require(_0x9fd4('0x4'));var router=express[_0x9fd4('0x5')]();var fs_extra=require(_0x9fd4('0x6'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x9fd4('0x7'));router['get']('/',auth[_0x9fd4('0x8')](),controller[_0x9fd4('0x9')]);router[_0x9fd4('0xa')]('/:id',auth['isAuthenticated'](),controller[_0x9fd4('0xb')]);router[_0x9fd4('0xa')](_0x9fd4('0xc'),auth[_0x9fd4('0x8')](),controller[_0x9fd4('0xd')]);router['post']('/',auth[_0x9fd4('0x8')](),controller['create']);router[_0x9fd4('0xe')](_0x9fd4('0xc'),auth[_0x9fd4('0x8')](),controller[_0x9fd4('0xf')]);router[_0x9fd4('0x10')](_0x9fd4('0x11'),auth['isAuthenticated'](),controller[_0x9fd4('0x12')]);router[_0x9fd4('0x13')](_0x9fd4('0x11'),auth[_0x9fd4('0x8')](),controller[_0x9fd4('0x14')]);router[_0x9fd4('0x13')]('/:id/users',auth[_0x9fd4('0x8')](),controller[_0x9fd4('0x15')]);module[_0x9fd4('0x16')]=router; \ No newline at end of file +var _0x9158=['create','addUsers','put','update','delete','exports','multer','util','path','express','fs-extra','../../config/environment','./squareProject.controller','get','isAuthenticated','index','/:id','/:id/users','getUsers','post'];(function(_0x57da0a,_0x284aed){var _0x3145d5=function(_0xfe7c3b){while(--_0xfe7c3b){_0x57da0a['push'](_0x57da0a['shift']());}};_0x3145d5(++_0x284aed);}(_0x9158,0x16e));var _0x8915=function(_0x2f7ccc,_0x3a4942){_0x2f7ccc=_0x2f7ccc-0x0;var _0x196a7e=_0x9158[_0x2f7ccc];return _0x196a7e;};'use strict';var multer=require(_0x8915('0x0'));var util=require(_0x8915('0x1'));var path=require(_0x8915('0x2'));var timeout=require('connect-timeout');var express=require(_0x8915('0x3'));var router=express['Router']();var fs_extra=require(_0x8915('0x4'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x8915('0x5'));var controller=require(_0x8915('0x6'));router[_0x8915('0x7')]('/',auth[_0x8915('0x8')](),controller[_0x8915('0x9')]);router[_0x8915('0x7')](_0x8915('0xa'),auth[_0x8915('0x8')](),controller['show']);router[_0x8915('0x7')](_0x8915('0xb'),auth[_0x8915('0x8')](),controller[_0x8915('0xc')]);router[_0x8915('0xd')]('/',auth[_0x8915('0x8')](),controller[_0x8915('0xe')]);router['post']('/:id/users',auth[_0x8915('0x8')](),controller[_0x8915('0xf')]);router[_0x8915('0x10')](_0x8915('0xa'),auth[_0x8915('0x8')](),controller[_0x8915('0x11')]);router['delete'](_0x8915('0xa'),auth[_0x8915('0x8')](),controller['destroy']);router[_0x8915('0x12')]('/:id/users',auth[_0x8915('0x8')](),controller['removeUsers']);module[_0x8915('0x13')]=router; \ No newline at end of file diff --git a/server/api/squareProject/squareProject.attributes.js b/server/api/squareProject/squareProject.attributes.js index 5f3de9e..cf8f766 100644 --- a/server/api/squareProject/squareProject.attributes.js +++ b/server/api/squareProject/squareProject.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd06f=['toString','utf8','production','DATE','sequelize','exports','name','STRING','TEXT','BLOB','long','getDataValue','preproduction'];(function(_0x59870b,_0x23df3c){var _0x2c04b8=function(_0x2a408b){while(--_0x2a408b){_0x59870b['push'](_0x59870b['shift']());}};_0x2c04b8(++_0x23df3c);}(_0xd06f,0x13c));var _0xfd06=function(_0x32b894,_0x14c458){_0x32b894=_0x32b894-0x0;var _0x1f4d76=_0xd06f[_0x32b894];return _0x1f4d76;};'use strict';var Sequelize=require(_0xfd06('0x0'));module[_0xfd06('0x1')]={'name':{'type':Sequelize['STRING'],'unique':_0xfd06('0x2'),'allowNull':![]},'description':{'type':Sequelize[_0xfd06('0x3')]},'notes':{'type':Sequelize[_0xfd06('0x4')]},'preproduction':{'type':Sequelize[_0xfd06('0x5')](_0xfd06('0x6')),'get':function(){if(this[_0xfd06('0x7')](_0xfd06('0x8'))){return this['getDataValue'](_0xfd06('0x8'))[_0xfd06('0x9')](_0xfd06('0xa'));}}},'production':{'type':Sequelize[_0xfd06('0x5')](_0xfd06('0x6')),'get':function(){if(this[_0xfd06('0x7')]('production')){return this['getDataValue'](_0xfd06('0xb'))[_0xfd06('0x9')](_0xfd06('0xa'));}}},'savedAt':{'type':Sequelize['DATE']},'publishedAt':{'type':Sequelize[_0xfd06('0xc')]}}; \ No newline at end of file +var _0x4baf=['preproduction','toString','production','utf8','sequelize','STRING','name','TEXT','BLOB','long','getDataValue'];(function(_0x227a97,_0x143ace){var _0x26cda1=function(_0x10b291){while(--_0x10b291){_0x227a97['push'](_0x227a97['shift']());}};_0x26cda1(++_0x143ace);}(_0x4baf,0xb4));var _0xf4ba=function(_0x5f31f5,_0x7c3615){_0x5f31f5=_0x5f31f5-0x0;var _0x17108b=_0x4baf[_0x5f31f5];return _0x17108b;};'use strict';var Sequelize=require(_0xf4ba('0x0'));module['exports']={'name':{'type':Sequelize[_0xf4ba('0x1')],'unique':_0xf4ba('0x2'),'allowNull':![]},'description':{'type':Sequelize[_0xf4ba('0x1')]},'notes':{'type':Sequelize[_0xf4ba('0x3')]},'preproduction':{'type':Sequelize[_0xf4ba('0x4')](_0xf4ba('0x5')),'get':function(){if(this[_0xf4ba('0x6')](_0xf4ba('0x7'))){return this[_0xf4ba('0x6')]('preproduction')[_0xf4ba('0x8')]('utf8');}}},'production':{'type':Sequelize[_0xf4ba('0x4')](_0xf4ba('0x5')),'get':function(){if(this['getDataValue'](_0xf4ba('0x9'))){return this[_0xf4ba('0x6')](_0xf4ba('0x9'))[_0xf4ba('0x8')](_0xf4ba('0xa'));}}},'savedAt':{'type':Sequelize['DATE']},'publishedAt':{'type':Sequelize['DATE']}}; \ No newline at end of file diff --git a/server/api/squareProject/squareProject.controller.js b/server/api/squareProject/squareProject.controller.js index 8396db4..b5aa49b 100644 --- a/server/api/squareProject/squareProject.controller.js +++ b/server/api/squareProject/squareProject.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5fae=['../../mysqldb','redis','defaults','localhost','./squareProject.socket','register','sendStatus','status','end','json','undefined','count','offset','Content-Range','apply','reject','save','update','then','destroy','get','SquareProjects','UserProfileResource','error','stack','name','send','index','SquareProject','fieldName','type','key','model','map','query','filters','attributes','fields','length','nolimit','limit','sort','where','pick','filter','VIRTUAL','merge','include','findAll','rows','catch','params','rawAttributes','keys','includeAll','options','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','user','UserProfileSection','find','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','addUsers','omit','ids','removeUsers','isArray','emit','userSquareProject:remove','findOne','User','order','eml-format','zip-dir','fast-json-patch','moment','sox','to-csv','fs-extra','lodash','squel','crypto','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/license/util'];(function(_0x117316,_0x404a9e){var _0x169186=function(_0x40b017){while(--_0x40b017){_0x117316['push'](_0x117316['shift']());}};_0x169186(++_0x404a9e);}(_0x5fae,0x165));var _0xe5fa=function(_0x41de9e,_0x44bcee){_0x41de9e=_0x41de9e-0x0;var _0x3e13e8=_0x5fae[_0x41de9e];return _0x3e13e8;};'use strict';var emlformat=require(_0xe5fa('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xe5fa('0x1'));var jsonpatch=require(_0xe5fa('0x2'));var rp=require('request-promise');var moment=require(_0xe5fa('0x3'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require('util');var path=require('path');var sox=require(_0xe5fa('0x4'));var csv=require(_0xe5fa('0x5'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xe5fa('0x6'));var _=require(_0xe5fa('0x7'));var squel=require(_0xe5fa('0x8'));var crypto=require(_0xe5fa('0x9'));var jsforce=require('jsforce');var deskjs=require(_0xe5fa('0xa'));var toCsv=require(_0xe5fa('0x5'));var querystring=require(_0xe5fa('0xb'));var Papa=require('papaparse');var Redis=require(_0xe5fa('0xc'));var authService=require(_0xe5fa('0xd'));var qs=require(_0xe5fa('0xe'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xe5fa('0xf'));var logger=require(_0xe5fa('0x10'))(_0xe5fa('0x11'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0xe5fa('0x12'));var db=require(_0xe5fa('0x13'))['db'];config[_0xe5fa('0x14')]=_[_0xe5fa('0x15')](config[_0xe5fa('0x14')],{'host':_0xe5fa('0x16'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xe5fa('0x14')]));require(_0xe5fa('0x17'))[_0xe5fa('0x18')](socket);function respondWithStatusCode(_0x4fce78,_0x5ec048){_0x5ec048=_0x5ec048||0xcc;return function(_0x3a5dcb){if(_0x3a5dcb){return _0x4fce78[_0xe5fa('0x19')](_0x5ec048);}return _0x4fce78[_0xe5fa('0x1a')](_0x5ec048)[_0xe5fa('0x1b')]();};}function respondWithResult(_0x5f2ae3,_0x55c63c){_0x55c63c=_0x55c63c||0xc8;return function(_0xbdded1){if(_0xbdded1){return _0x5f2ae3['status'](_0x55c63c)[_0xe5fa('0x1c')](_0xbdded1);}};}function respondWithFilteredResult(_0x38e068,_0x3c2970){return function(_0x353fca){if(_0x353fca){var _0x303a42=typeof _0x3c2970['offset']===_0xe5fa('0x1d')&&typeof _0x3c2970['limit']===_0xe5fa('0x1d');var _0x3eb2ad=_0x353fca[_0xe5fa('0x1e')];var _0x5c94fb=_0x303a42?0x0:_0x3c2970[_0xe5fa('0x1f')];var _0x3ebeb4=_0x303a42?_0x353fca['count']:_0x3c2970['offset']+_0x3c2970['limit'];var _0x5d34af;if(_0x3ebeb4>=_0x3eb2ad){_0x3ebeb4=_0x3eb2ad;_0x5d34af=0xc8;}else{_0x5d34af=0xce;}_0x38e068[_0xe5fa('0x1a')](_0x5d34af);return _0x38e068['set'](_0xe5fa('0x20'),_0x5c94fb+'-'+_0x3ebeb4+'/'+_0x3eb2ad)[_0xe5fa('0x1c')](_0x353fca);}return null;};}function patchUpdates(_0x160af0){return function(_0x5dea64){try{jsonpatch[_0xe5fa('0x21')](_0x5dea64,_0x160af0,!![]);}catch(_0x1b81d1){return BPromise[_0xe5fa('0x22')](_0x1b81d1);}return _0x5dea64[_0xe5fa('0x23')]();};}function saveUpdates(_0x4a59ab,_0x14b603){return function(_0x53a87f){if(_0x53a87f){return _0x53a87f[_0xe5fa('0x24')](_0x4a59ab)[_0xe5fa('0x25')](function(_0x1f2014){return _0x1f2014;});}return null;};}function removeEntity(_0x1b601c,_0x320132){return function(_0x1d23a9){if(_0x1d23a9){return _0x1d23a9[_0xe5fa('0x26')]()[_0xe5fa('0x25')](function(){var _0x2ec4f6=_0x1d23a9[_0xe5fa('0x27')]({'plain':!![]});var _0x32ecda=_0xe5fa('0x28');return db[_0xe5fa('0x29')]['destroy']({'where':{'type':_0x32ecda,'resourceId':_0x2ec4f6['id']}})[_0xe5fa('0x25')](function(){return _0x1d23a9;});})['then'](function(){_0x1b601c['status'](0xcc)[_0xe5fa('0x1b')]();});}};}function handleEntityNotFound(_0x3f37f2,_0x28affa){return function(_0x200b91){if(!_0x200b91){_0x3f37f2[_0xe5fa('0x19')](0x194);}return _0x200b91;};}function handleError(_0x300c17,_0x1f3245){_0x1f3245=_0x1f3245||0x1f4;return function(_0x538ae7){logger[_0xe5fa('0x2a')](_0x538ae7[_0xe5fa('0x2b')]);if(_0x538ae7['name']){delete _0x538ae7[_0xe5fa('0x2c')];}_0x300c17['status'](_0x1f3245)[_0xe5fa('0x2d')](_0x538ae7);};}exports[_0xe5fa('0x2e')]=function(_0x176923,_0x3804a7){var _0x153f2d={},_0x34ca54={},_0x4c4a2e={'count':0x0,'rows':[]};var _0xe7d45f=_['map'](db[_0xe5fa('0x2f')]['rawAttributes'],function(_0x8bff85){return{'name':_0x8bff85[_0xe5fa('0x30')],'type':_0x8bff85[_0xe5fa('0x31')][_0xe5fa('0x32')]};});_0x34ca54[_0xe5fa('0x33')]=_[_0xe5fa('0x34')](_0xe7d45f,'name');_0x34ca54[_0xe5fa('0x35')]=_['keys'](_0x176923[_0xe5fa('0x35')]);_0x34ca54[_0xe5fa('0x36')]=_['intersection'](_0x34ca54[_0xe5fa('0x33')],_0x34ca54[_0xe5fa('0x35')]);_0x153f2d[_0xe5fa('0x37')]=_['intersection'](_0x34ca54[_0xe5fa('0x33')],qs['fields'](_0x176923['query'][_0xe5fa('0x38')]));_0x153f2d['attributes']=_0x153f2d[_0xe5fa('0x37')][_0xe5fa('0x39')]?_0x153f2d[_0xe5fa('0x37')]:_0x34ca54[_0xe5fa('0x33')];if(!_0x176923['query']['hasOwnProperty'](_0xe5fa('0x3a'))){_0x153f2d[_0xe5fa('0x3b')]=qs[_0xe5fa('0x3b')](_0x176923[_0xe5fa('0x35')][_0xe5fa('0x3b')]);_0x153f2d[_0xe5fa('0x1f')]=qs[_0xe5fa('0x1f')](_0x176923[_0xe5fa('0x35')]['offset']);}_0x153f2d['order']=qs[_0xe5fa('0x3c')](_0x176923['query'][_0xe5fa('0x3c')]);_0x153f2d[_0xe5fa('0x3d')]=qs[_0xe5fa('0x36')](_[_0xe5fa('0x3e')](_0x176923[_0xe5fa('0x35')],_0x34ca54[_0xe5fa('0x36')]),_0xe7d45f);if(_0x176923[_0xe5fa('0x35')][_0xe5fa('0x3f')]){_0x153f2d[_0xe5fa('0x3d')]=_['merge'](_0x153f2d['where'],{'$or':_[_0xe5fa('0x34')](_0xe7d45f,function(_0x1cad39){if(_0x1cad39['type']!==_0xe5fa('0x40')){var _0x20fd48={};_0x20fd48[_0x1cad39[_0xe5fa('0x2c')]]={'$like':'%'+_0x176923['query']['filter']+'%'};return _0x20fd48;}})});}_0x153f2d=_[_0xe5fa('0x41')]({},_0x153f2d,_0x176923['options']);var _0x1315b8={'where':_0x153f2d[_0xe5fa('0x3d')]};return db[_0xe5fa('0x2f')]['count'](_0x1315b8)[_0xe5fa('0x25')](function(_0x3ef02e){_0x4c4a2e[_0xe5fa('0x1e')]=_0x3ef02e;if(_0x176923[_0xe5fa('0x35')]['includeAll']){_0x153f2d[_0xe5fa('0x42')]=[{'all':!![]}];}return db[_0xe5fa('0x2f')][_0xe5fa('0x43')](_0x153f2d);})[_0xe5fa('0x25')](function(_0x1a98ce){_0x4c4a2e[_0xe5fa('0x44')]=_0x1a98ce;return _0x4c4a2e;})[_0xe5fa('0x25')](respondWithFilteredResult(_0x3804a7,_0x153f2d))[_0xe5fa('0x45')](handleError(_0x3804a7,null));};exports['show']=function(_0x14acd3,_0x2de28b){var _0xd87200={'raw':![],'where':{'id':_0x14acd3[_0xe5fa('0x46')]['id']}},_0xaf79e5={};_0xaf79e5[_0xe5fa('0x33')]=_['keys'](db[_0xe5fa('0x2f')][_0xe5fa('0x47')]);_0xaf79e5['query']=_[_0xe5fa('0x48')](_0x14acd3[_0xe5fa('0x35')]);_0xaf79e5[_0xe5fa('0x36')]=_['intersection'](_0xaf79e5[_0xe5fa('0x33')],_0xaf79e5[_0xe5fa('0x35')]);_0xd87200['attributes']=_['intersection'](_0xaf79e5[_0xe5fa('0x33')],qs[_0xe5fa('0x38')](_0x14acd3['query'][_0xe5fa('0x38')]));_0xd87200['attributes']=_0xd87200[_0xe5fa('0x37')][_0xe5fa('0x39')]?_0xd87200[_0xe5fa('0x37')]:_0xaf79e5['model'];if(_0x14acd3['query'][_0xe5fa('0x49')]){_0xd87200[_0xe5fa('0x42')]=[{'all':!![]}];}_0xd87200=_[_0xe5fa('0x41')]({},_0xd87200,_0x14acd3[_0xe5fa('0x4a')]);return db[_0xe5fa('0x2f')]['find'](_0xd87200)['then'](handleEntityNotFound(_0x2de28b,null))['then'](respondWithResult(_0x2de28b,null))['catch'](handleError(_0x2de28b,null));};exports[_0xe5fa('0x4b')]=function(_0x1459b8,_0x6b2c03){return db['SquareProject'][_0xe5fa('0x4b')](_0x1459b8[_0xe5fa('0x4c')],{})[_0xe5fa('0x25')](function(_0x1e4b44){var _0x9385cd=_0x1459b8['user'][_0xe5fa('0x27')]({'plain':!![]});if(!_0x9385cd)throw new Error(_0xe5fa('0x4d'));if(_0x9385cd['role']===_0xe5fa('0x4e')){var _0x40f9ff=_0x1e4b44['get']({'plain':!![]});var _0x27cf3a='SquareProjects';return db[_0xe5fa('0x4f')][_0xe5fa('0x50')]({'where':{'name':_0x27cf3a,'userProfileId':_0x9385cd[_0xe5fa('0x51')]},'raw':!![]})[_0xe5fa('0x25')](function(_0x544040){if(_0x544040&&_0x544040[_0xe5fa('0x52')]===0x0){return db[_0xe5fa('0x29')][_0xe5fa('0x4b')]({'name':_0x40f9ff['name'],'resourceId':_0x40f9ff['id'],'type':_0x544040[_0xe5fa('0x2c')],'sectionId':_0x544040['id']},{})[_0xe5fa('0x25')](function(){return _0x1e4b44;});}else{return _0x1e4b44;}})[_0xe5fa('0x45')](function(_0x27e61d){logger[_0xe5fa('0x2a')](_0xe5fa('0x53'),_0x27e61d);throw _0x27e61d;});}return _0x1e4b44;})[_0xe5fa('0x25')](respondWithResult(_0x6b2c03,0xc9))[_0xe5fa('0x45')](handleError(_0x6b2c03,null));};exports['update']=function(_0x1878c0,_0x3bc2a4){if(_0x1878c0['body']['id']){delete _0x1878c0[_0xe5fa('0x4c')]['id'];}return db[_0xe5fa('0x2f')][_0xe5fa('0x50')]({'where':{'id':_0x1878c0[_0xe5fa('0x46')]['id']}})[_0xe5fa('0x25')](handleEntityNotFound(_0x3bc2a4,null))['then'](saveUpdates(_0x1878c0[_0xe5fa('0x4c')],null))['then'](respondWithResult(_0x3bc2a4,null))['catch'](handleError(_0x3bc2a4,null));};exports[_0xe5fa('0x26')]=function(_0x592827,_0x44016e){return db[_0xe5fa('0x2f')][_0xe5fa('0x50')]({'where':{'id':_0x592827['params']['id']}})[_0xe5fa('0x25')](handleEntityNotFound(_0x44016e,null))[_0xe5fa('0x25')](removeEntity(_0x44016e,null))[_0xe5fa('0x45')](handleError(_0x44016e,null));};exports['addUsers']=function(_0x3c3289,_0x1366d5,_0x1cffcc){return db[_0xe5fa('0x2f')][_0xe5fa('0x50')]({'where':{'id':_0x3c3289[_0xe5fa('0x46')]['id']}})[_0xe5fa('0x25')](handleEntityNotFound(_0x1366d5,null))[_0xe5fa('0x25')](function(_0x5383d9){if(_0x5383d9){return _0x5383d9[_0xe5fa('0x54')](_0x3c3289[_0xe5fa('0x4c')]['ids'],_[_0xe5fa('0x55')](_0x3c3289[_0xe5fa('0x4c')],[_0xe5fa('0x56'),'id'])||{});}})[_0xe5fa('0x25')](respondWithResult(_0x1366d5,null))[_0xe5fa('0x45')](handleError(_0x1366d5,null));};exports[_0xe5fa('0x57')]=function(_0x3cb665,_0x4a092d,_0x14f0a5){return db[_0xe5fa('0x2f')][_0xe5fa('0x50')]({'where':{'id':_0x3cb665[_0xe5fa('0x46')]['id']}})[_0xe5fa('0x25')](handleEntityNotFound(_0x4a092d,null))[_0xe5fa('0x25')](function(_0x4ee5ef){if(_0x4ee5ef){return _0x4ee5ef['removeUsers'](_0x3cb665[_0xe5fa('0x35')][_0xe5fa('0x56')])['then'](function(){if(_[_0xe5fa('0x58')](_0x3cb665[_0xe5fa('0x35')][_0xe5fa('0x56')])){for(var _0x3071d9=0x0;_0x3071d9<_0x3cb665[_0xe5fa('0x35')][_0xe5fa('0x56')][_0xe5fa('0x39')];_0x3071d9+=0x1){socket[_0xe5fa('0x59')](_0xe5fa('0x5a'),{'UserId':Number(_0x3cb665['query'][_0xe5fa('0x56')][_0x3071d9]),'SquareProjectId':Number(_0x3cb665[_0xe5fa('0x46')]['id'])});}}else{socket['emit'](_0xe5fa('0x5a'),{'UserId':Number(_0x3cb665[_0xe5fa('0x35')][_0xe5fa('0x56')]),'SquareProjectId':Number(_0x3cb665[_0xe5fa('0x46')]['id'])});}});}})[_0xe5fa('0x25')](respondWithStatusCode(_0x4a092d,null))[_0xe5fa('0x45')](handleError(_0x4a092d,null));};exports['getUsers']=function(_0x18dde3,_0x3d9d90,_0xa1bc77){var _0x5d30c7={};var _0x377087={};var _0xec43ca;var _0x4144f4;return db[_0xe5fa('0x2f')][_0xe5fa('0x5b')]({'where':{'id':_0x18dde3[_0xe5fa('0x46')]['id']}})['then'](handleEntityNotFound(_0x3d9d90,null))[_0xe5fa('0x25')](function(_0x81ccc1){if(_0x81ccc1){_0xec43ca=_0x81ccc1;_0x377087[_0xe5fa('0x33')]=_['keys'](db[_0xe5fa('0x5c')]['rawAttributes']);_0x377087[_0xe5fa('0x35')]=_[_0xe5fa('0x48')](_0x18dde3[_0xe5fa('0x35')]);_0x377087['filters']=_['intersection'](_0x377087[_0xe5fa('0x33')],_0x377087[_0xe5fa('0x35')]);_0x5d30c7[_0xe5fa('0x37')]=_['intersection'](_0x377087['model'],qs['fields'](_0x18dde3[_0xe5fa('0x35')][_0xe5fa('0x38')]));_0x5d30c7[_0xe5fa('0x37')]=_0x5d30c7[_0xe5fa('0x37')][_0xe5fa('0x39')]?_0x5d30c7[_0xe5fa('0x37')]:_0x377087['model'];_0x5d30c7[_0xe5fa('0x5d')]=qs[_0xe5fa('0x3c')](_0x18dde3[_0xe5fa('0x35')][_0xe5fa('0x3c')]);_0x5d30c7['where']=qs[_0xe5fa('0x36')](_['pick'](_0x18dde3[_0xe5fa('0x35')],_0x377087[_0xe5fa('0x36')]));if(_0x18dde3[_0xe5fa('0x35')][_0xe5fa('0x3f')]){_0x5d30c7['where']=_[_0xe5fa('0x41')](_0x5d30c7[_0xe5fa('0x3d')],{'$or':_[_0xe5fa('0x34')](_0x5d30c7[_0xe5fa('0x37')],function(_0x501b72){var _0xd73c37={};_0xd73c37[_0x501b72]={'$like':'%'+_0x18dde3[_0xe5fa('0x35')][_0xe5fa('0x3f')]+'%'};return _0xd73c37;})});}_0x5d30c7=_[_0xe5fa('0x41')]({},_0x5d30c7,_0x18dde3[_0xe5fa('0x4a')]);return _0xec43ca['getUsers'](_0x5d30c7);}})[_0xe5fa('0x25')](function(_0x16f3f5){if(_0x16f3f5){_0x4144f4=_0x16f3f5['length'];if(!_0x18dde3[_0xe5fa('0x35')]['hasOwnProperty']('nolimit')){_0x5d30c7[_0xe5fa('0x3b')]=qs[_0xe5fa('0x3b')](_0x18dde3[_0xe5fa('0x35')][_0xe5fa('0x3b')]);_0x5d30c7[_0xe5fa('0x1f')]=qs[_0xe5fa('0x1f')](_0x18dde3[_0xe5fa('0x35')][_0xe5fa('0x1f')]);}return _0xec43ca['getUsers'](_0x5d30c7);}})['then'](function(_0xe00553){if(_0xe00553){return _0xe00553?{'count':_0x4144f4,'rows':_0xe00553}:null;}})[_0xe5fa('0x25')](respondWithResult(_0x3d9d90,null))['catch'](handleError(_0x3d9d90,null));}; \ No newline at end of file +var _0x494a=['emit','userSquareProject:remove','getUsers','findOne','User','pick','eml-format','zip-dir','fast-json-patch','moment','bluebird','util','path','sox','ejs','fs-extra','lodash','crypto','jsforce','desk.js','to-csv','querystring','papaparse','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','redis','localhost','socket.io-emitter','register','status','end','json','offset','limit','undefined','count','set','Content-Range','reject','save','update','destroy','get','SquareProjects','UserProfileResource','then','sendStatus','error','name','send','map','SquareProject','rawAttributes','fieldName','type','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','filter','merge','where','options','includeAll','include','findAll','rows','catch','show','params','find','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','addUsers','ids','omit','removeUsers','isArray'];(function(_0x255194,_0x24709b){var _0x5bdafe=function(_0x545a14){while(--_0x545a14){_0x255194['push'](_0x255194['shift']());}};_0x5bdafe(++_0x24709b);}(_0x494a,0x186));var _0xa494=function(_0x1b2e63,_0x1d7683){_0x1b2e63=_0x1b2e63-0x0;var _0x3d69e5=_0x494a[_0x1b2e63];return _0x3d69e5;};'use strict';var emlformat=require(_0xa494('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xa494('0x1'));var jsonpatch=require(_0xa494('0x2'));var rp=require('request-promise');var moment=require(_0xa494('0x3'));var BPromise=require(_0xa494('0x4'));var Mustache=require('mustache');var util=require(_0xa494('0x5'));var path=require(_0xa494('0x6'));var sox=require(_0xa494('0x7'));var csv=require('to-csv');var ejs=require(_0xa494('0x8'));var fs=require('fs');var fs_extra=require(_0xa494('0x9'));var _=require(_0xa494('0xa'));var squel=require('squel');var crypto=require(_0xa494('0xb'));var jsforce=require(_0xa494('0xc'));var deskjs=require(_0xa494('0xd'));var toCsv=require(_0xa494('0xe'));var querystring=require(_0xa494('0xf'));var Papa=require(_0xa494('0x10'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0xa494('0x11'));var hardwareService=require(_0xa494('0x12'));var logger=require(_0xa494('0x13'))(_0xa494('0x14'));var utils=require(_0xa494('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0xa494('0x16'));var db=require(_0xa494('0x17'))['db'];config['redis']=_['defaults'](config[_0xa494('0x18')],{'host':_0xa494('0x19'),'port':0x18eb});var socket=require(_0xa494('0x1a'))(new Redis(config[_0xa494('0x18')]));require('./squareProject.socket')[_0xa494('0x1b')](socket);function respondWithStatusCode(_0x1d6f9a,_0x53ddb7){_0x53ddb7=_0x53ddb7||0xcc;return function(_0x1ea612){if(_0x1ea612){return _0x1d6f9a['sendStatus'](_0x53ddb7);}return _0x1d6f9a[_0xa494('0x1c')](_0x53ddb7)[_0xa494('0x1d')]();};}function respondWithResult(_0x122ca7,_0x445a41){_0x445a41=_0x445a41||0xc8;return function(_0x5008c4){if(_0x5008c4){return _0x122ca7[_0xa494('0x1c')](_0x445a41)[_0xa494('0x1e')](_0x5008c4);}};}function respondWithFilteredResult(_0x5148fb,_0x496a6e){return function(_0x481590){if(_0x481590){var _0x477301=typeof _0x496a6e[_0xa494('0x1f')]==='undefined'&&typeof _0x496a6e[_0xa494('0x20')]===_0xa494('0x21');var _0x23f67a=_0x481590[_0xa494('0x22')];var _0x47e1f1=_0x477301?0x0:_0x496a6e['offset'];var _0x288bae=_0x477301?_0x481590[_0xa494('0x22')]:_0x496a6e['offset']+_0x496a6e[_0xa494('0x20')];var _0x2ed32a;if(_0x288bae>=_0x23f67a){_0x288bae=_0x23f67a;_0x2ed32a=0xc8;}else{_0x2ed32a=0xce;}_0x5148fb[_0xa494('0x1c')](_0x2ed32a);return _0x5148fb[_0xa494('0x23')](_0xa494('0x24'),_0x47e1f1+'-'+_0x288bae+'/'+_0x23f67a)[_0xa494('0x1e')](_0x481590);}return null;};}function patchUpdates(_0x67b345){return function(_0x4a0c95){try{jsonpatch['apply'](_0x4a0c95,_0x67b345,!![]);}catch(_0x474674){return BPromise[_0xa494('0x25')](_0x474674);}return _0x4a0c95[_0xa494('0x26')]();};}function saveUpdates(_0x1eb9a3,_0x539142){return function(_0x674efd){if(_0x674efd){return _0x674efd[_0xa494('0x27')](_0x1eb9a3)['then'](function(_0x2c459c){return _0x2c459c;});}return null;};}function removeEntity(_0x1d92b4,_0x2cc94e){return function(_0x16a69c){if(_0x16a69c){return _0x16a69c[_0xa494('0x28')]()['then'](function(){var _0x4c4d57=_0x16a69c[_0xa494('0x29')]({'plain':!![]});var _0x5821d9=_0xa494('0x2a');return db[_0xa494('0x2b')][_0xa494('0x28')]({'where':{'type':_0x5821d9,'resourceId':_0x4c4d57['id']}})[_0xa494('0x2c')](function(){return _0x16a69c;});})[_0xa494('0x2c')](function(){_0x1d92b4['status'](0xcc)[_0xa494('0x1d')]();});}};}function handleEntityNotFound(_0x160b37,_0x318e5a){return function(_0x3ccae2){if(!_0x3ccae2){_0x160b37[_0xa494('0x2d')](0x194);}return _0x3ccae2;};}function handleError(_0x4c390e,_0x99fb78){_0x99fb78=_0x99fb78||0x1f4;return function(_0x5c0862){logger[_0xa494('0x2e')](_0x5c0862['stack']);if(_0x5c0862[_0xa494('0x2f')]){delete _0x5c0862[_0xa494('0x2f')];}_0x4c390e[_0xa494('0x1c')](_0x99fb78)[_0xa494('0x30')](_0x5c0862);};}exports['index']=function(_0x237402,_0x543421){var _0x1f7aff={},_0xcdf64b={},_0x5500ba={'count':0x0,'rows':[]};var _0x137195=_[_0xa494('0x31')](db[_0xa494('0x32')][_0xa494('0x33')],function(_0x28e734){return{'name':_0x28e734[_0xa494('0x34')],'type':_0x28e734[_0xa494('0x35')]['key']};});_0xcdf64b[_0xa494('0x36')]=_[_0xa494('0x31')](_0x137195,'name');_0xcdf64b[_0xa494('0x37')]=_[_0xa494('0x38')](_0x237402[_0xa494('0x37')]);_0xcdf64b[_0xa494('0x39')]=_[_0xa494('0x3a')](_0xcdf64b[_0xa494('0x36')],_0xcdf64b['query']);_0x1f7aff[_0xa494('0x3b')]=_['intersection'](_0xcdf64b[_0xa494('0x36')],qs['fields'](_0x237402[_0xa494('0x37')][_0xa494('0x3c')]));_0x1f7aff[_0xa494('0x3b')]=_0x1f7aff[_0xa494('0x3b')][_0xa494('0x3d')]?_0x1f7aff['attributes']:_0xcdf64b['model'];if(!_0x237402[_0xa494('0x37')][_0xa494('0x3e')]('nolimit')){_0x1f7aff[_0xa494('0x20')]=qs[_0xa494('0x20')](_0x237402[_0xa494('0x37')][_0xa494('0x20')]);_0x1f7aff[_0xa494('0x1f')]=qs[_0xa494('0x1f')](_0x237402[_0xa494('0x37')][_0xa494('0x1f')]);}_0x1f7aff[_0xa494('0x3f')]=qs[_0xa494('0x40')](_0x237402[_0xa494('0x37')][_0xa494('0x40')]);_0x1f7aff['where']=qs[_0xa494('0x39')](_['pick'](_0x237402[_0xa494('0x37')],_0xcdf64b[_0xa494('0x39')]),_0x137195);if(_0x237402[_0xa494('0x37')][_0xa494('0x41')]){_0x1f7aff['where']=_[_0xa494('0x42')](_0x1f7aff[_0xa494('0x43')],{'$or':_[_0xa494('0x31')](_0x137195,function(_0x1f0e74){if(_0x1f0e74[_0xa494('0x35')]!=='VIRTUAL'){var _0x295a96={};_0x295a96[_0x1f0e74[_0xa494('0x2f')]]={'$like':'%'+_0x237402[_0xa494('0x37')][_0xa494('0x41')]+'%'};return _0x295a96;}})});}_0x1f7aff=_[_0xa494('0x42')]({},_0x1f7aff,_0x237402[_0xa494('0x44')]);var _0x2a7744={'where':_0x1f7aff[_0xa494('0x43')]};return db['SquareProject'][_0xa494('0x22')](_0x2a7744)[_0xa494('0x2c')](function(_0x37b64c){_0x5500ba[_0xa494('0x22')]=_0x37b64c;if(_0x237402['query'][_0xa494('0x45')]){_0x1f7aff[_0xa494('0x46')]=[{'all':!![]}];}return db['SquareProject'][_0xa494('0x47')](_0x1f7aff);})['then'](function(_0x4835e0){_0x5500ba[_0xa494('0x48')]=_0x4835e0;return _0x5500ba;})[_0xa494('0x2c')](respondWithFilteredResult(_0x543421,_0x1f7aff))[_0xa494('0x49')](handleError(_0x543421,null));};exports[_0xa494('0x4a')]=function(_0xa0ec96,_0x53eabf){var _0x2181df={'raw':![],'where':{'id':_0xa0ec96[_0xa494('0x4b')]['id']}},_0xd5fd10={};_0xd5fd10[_0xa494('0x36')]=_[_0xa494('0x38')](db['SquareProject'][_0xa494('0x33')]);_0xd5fd10[_0xa494('0x37')]=_[_0xa494('0x38')](_0xa0ec96[_0xa494('0x37')]);_0xd5fd10[_0xa494('0x39')]=_['intersection'](_0xd5fd10['model'],_0xd5fd10[_0xa494('0x37')]);_0x2181df[_0xa494('0x3b')]=_['intersection'](_0xd5fd10[_0xa494('0x36')],qs[_0xa494('0x3c')](_0xa0ec96[_0xa494('0x37')]['fields']));_0x2181df[_0xa494('0x3b')]=_0x2181df[_0xa494('0x3b')][_0xa494('0x3d')]?_0x2181df[_0xa494('0x3b')]:_0xd5fd10['model'];if(_0xa0ec96[_0xa494('0x37')][_0xa494('0x45')]){_0x2181df[_0xa494('0x46')]=[{'all':!![]}];}_0x2181df=_[_0xa494('0x42')]({},_0x2181df,_0xa0ec96[_0xa494('0x44')]);return db[_0xa494('0x32')][_0xa494('0x4c')](_0x2181df)[_0xa494('0x2c')](handleEntityNotFound(_0x53eabf,null))[_0xa494('0x2c')](respondWithResult(_0x53eabf,null))[_0xa494('0x49')](handleError(_0x53eabf,null));};exports['create']=function(_0x2f5640,_0x575331){return db['SquareProject']['create'](_0x2f5640[_0xa494('0x4d')],{})[_0xa494('0x2c')](function(_0x3ff3f9){var _0x12887d=_0x2f5640[_0xa494('0x4e')][_0xa494('0x29')]({'plain':!![]});if(!_0x12887d)throw new Error(_0xa494('0x4f'));if(_0x12887d[_0xa494('0x50')]===_0xa494('0x4e')){var _0x348677=_0x3ff3f9[_0xa494('0x29')]({'plain':!![]});var _0x177223='SquareProjects';return db[_0xa494('0x51')][_0xa494('0x4c')]({'where':{'name':_0x177223,'userProfileId':_0x12887d[_0xa494('0x52')]},'raw':!![]})[_0xa494('0x2c')](function(_0x13895){if(_0x13895&&_0x13895[_0xa494('0x53')]===0x0){return db[_0xa494('0x2b')]['create']({'name':_0x348677[_0xa494('0x2f')],'resourceId':_0x348677['id'],'type':_0x13895['name'],'sectionId':_0x13895['id']},{})[_0xa494('0x2c')](function(){return _0x3ff3f9;});}else{return _0x3ff3f9;}})[_0xa494('0x49')](function(_0x4b5c8e){logger[_0xa494('0x2e')](_0xa494('0x54'),_0x4b5c8e);throw _0x4b5c8e;});}return _0x3ff3f9;})[_0xa494('0x2c')](respondWithResult(_0x575331,0xc9))[_0xa494('0x49')](handleError(_0x575331,null));};exports[_0xa494('0x27')]=function(_0x134346,_0x348d71){if(_0x134346[_0xa494('0x4d')]['id']){delete _0x134346[_0xa494('0x4d')]['id'];}return db[_0xa494('0x32')]['find']({'where':{'id':_0x134346[_0xa494('0x4b')]['id']}})[_0xa494('0x2c')](handleEntityNotFound(_0x348d71,null))[_0xa494('0x2c')](saveUpdates(_0x134346[_0xa494('0x4d')],null))[_0xa494('0x2c')](respondWithResult(_0x348d71,null))['catch'](handleError(_0x348d71,null));};exports[_0xa494('0x28')]=function(_0x26bde7,_0x401bab){return db['SquareProject'][_0xa494('0x4c')]({'where':{'id':_0x26bde7[_0xa494('0x4b')]['id']}})['then'](handleEntityNotFound(_0x401bab,null))[_0xa494('0x2c')](removeEntity(_0x401bab,null))['catch'](handleError(_0x401bab,null));};exports['addUsers']=function(_0x8dfc35,_0x2f19d2,_0x57e90d){return db[_0xa494('0x32')][_0xa494('0x4c')]({'where':{'id':_0x8dfc35[_0xa494('0x4b')]['id']}})['then'](handleEntityNotFound(_0x2f19d2,null))[_0xa494('0x2c')](function(_0x5571c8){if(_0x5571c8){return _0x5571c8[_0xa494('0x55')](_0x8dfc35['body'][_0xa494('0x56')],_[_0xa494('0x57')](_0x8dfc35[_0xa494('0x4d')],['ids','id'])||{});}})[_0xa494('0x2c')](respondWithResult(_0x2f19d2,null))[_0xa494('0x49')](handleError(_0x2f19d2,null));};exports['removeUsers']=function(_0x34e6ea,_0x5aebe1,_0x42c9c2){return db[_0xa494('0x32')][_0xa494('0x4c')]({'where':{'id':_0x34e6ea['params']['id']}})['then'](handleEntityNotFound(_0x5aebe1,null))[_0xa494('0x2c')](function(_0x207d7a){if(_0x207d7a){return _0x207d7a[_0xa494('0x58')](_0x34e6ea['query']['ids'])[_0xa494('0x2c')](function(){if(_[_0xa494('0x59')](_0x34e6ea['query'][_0xa494('0x56')])){for(var _0x26f4f4=0x0;_0x26f4f4<_0x34e6ea[_0xa494('0x37')][_0xa494('0x56')][_0xa494('0x3d')];_0x26f4f4+=0x1){socket[_0xa494('0x5a')](_0xa494('0x5b'),{'UserId':Number(_0x34e6ea[_0xa494('0x37')][_0xa494('0x56')][_0x26f4f4]),'SquareProjectId':Number(_0x34e6ea[_0xa494('0x4b')]['id'])});}}else{socket[_0xa494('0x5a')](_0xa494('0x5b'),{'UserId':Number(_0x34e6ea['query'][_0xa494('0x56')]),'SquareProjectId':Number(_0x34e6ea[_0xa494('0x4b')]['id'])});}});}})['then'](respondWithStatusCode(_0x5aebe1,null))[_0xa494('0x49')](handleError(_0x5aebe1,null));};exports[_0xa494('0x5c')]=function(_0x2ae848,_0x3d5f3c,_0x1a591f){var _0x1e035c={};var _0x34299d={};var _0x38375a;var _0x5b3cf3;return db[_0xa494('0x32')][_0xa494('0x5d')]({'where':{'id':_0x2ae848[_0xa494('0x4b')]['id']}})[_0xa494('0x2c')](handleEntityNotFound(_0x3d5f3c,null))[_0xa494('0x2c')](function(_0x5849bb){if(_0x5849bb){_0x38375a=_0x5849bb;_0x34299d[_0xa494('0x36')]=_[_0xa494('0x38')](db[_0xa494('0x5e')]['rawAttributes']);_0x34299d[_0xa494('0x37')]=_[_0xa494('0x38')](_0x2ae848[_0xa494('0x37')]);_0x34299d['filters']=_['intersection'](_0x34299d[_0xa494('0x36')],_0x34299d[_0xa494('0x37')]);_0x1e035c['attributes']=_[_0xa494('0x3a')](_0x34299d[_0xa494('0x36')],qs['fields'](_0x2ae848[_0xa494('0x37')][_0xa494('0x3c')]));_0x1e035c[_0xa494('0x3b')]=_0x1e035c[_0xa494('0x3b')][_0xa494('0x3d')]?_0x1e035c['attributes']:_0x34299d[_0xa494('0x36')];_0x1e035c[_0xa494('0x3f')]=qs[_0xa494('0x40')](_0x2ae848[_0xa494('0x37')][_0xa494('0x40')]);_0x1e035c[_0xa494('0x43')]=qs[_0xa494('0x39')](_[_0xa494('0x5f')](_0x2ae848[_0xa494('0x37')],_0x34299d[_0xa494('0x39')]));if(_0x2ae848[_0xa494('0x37')][_0xa494('0x41')]){_0x1e035c[_0xa494('0x43')]=_[_0xa494('0x42')](_0x1e035c['where'],{'$or':_[_0xa494('0x31')](_0x1e035c['attributes'],function(_0x1616e3){var _0x3641b0={};_0x3641b0[_0x1616e3]={'$like':'%'+_0x2ae848[_0xa494('0x37')][_0xa494('0x41')]+'%'};return _0x3641b0;})});}_0x1e035c=_[_0xa494('0x42')]({},_0x1e035c,_0x2ae848['options']);return _0x38375a[_0xa494('0x5c')](_0x1e035c);}})[_0xa494('0x2c')](function(_0x3f44d3){if(_0x3f44d3){_0x5b3cf3=_0x3f44d3[_0xa494('0x3d')];if(!_0x2ae848[_0xa494('0x37')][_0xa494('0x3e')]('nolimit')){_0x1e035c['limit']=qs[_0xa494('0x20')](_0x2ae848['query'][_0xa494('0x20')]);_0x1e035c[_0xa494('0x1f')]=qs[_0xa494('0x1f')](_0x2ae848[_0xa494('0x37')][_0xa494('0x1f')]);}return _0x38375a[_0xa494('0x5c')](_0x1e035c);}})['then'](function(_0x5a2938){if(_0x5a2938){return _0x5a2938?{'count':_0x5b3cf3,'rows':_0x5a2938}:null;}})['then'](respondWithResult(_0x3d5f3c,null))[_0xa494('0x49')](handleError(_0x3d5f3c,null));}; \ No newline at end of file diff --git a/server/api/squareProject/squareProject.events.js b/server/api/squareProject/squareProject.events.js index 0b73082..d5afb9c 100644 --- a/server/api/squareProject/squareProject.events.js +++ b/server/api/squareProject/squareProject.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xca8c=['SquareProject','setMaxListeners','save','update','remove','emit','hook','exports','events','../../mysqldb'];(function(_0x1ef547,_0x31bfdb){var _0x1d697b=function(_0x57fbdc){while(--_0x57fbdc){_0x1ef547['push'](_0x1ef547['shift']());}};_0x1d697b(++_0x31bfdb);}(_0xca8c,0xe4));var _0xcca8=function(_0x4cc14c,_0x51605b){_0x4cc14c=_0x4cc14c-0x0;var _0x5ac0e3=_0xca8c[_0x4cc14c];return _0x5ac0e3;};'use strict';var EventEmitter=require(_0xcca8('0x0'));var SquareProject=require(_0xcca8('0x1'))['db'][_0xcca8('0x2')];var SquareProjectEvents=new EventEmitter();SquareProjectEvents[_0xcca8('0x3')](0x0);var events={'afterCreate':_0xcca8('0x4'),'afterUpdate':_0xcca8('0x5'),'afterDestroy':_0xcca8('0x6')};function emitEvent(_0x1f3278){return function(_0x55317a,_0x3875ea,_0x187863){SquareProjectEvents[_0xcca8('0x7')](_0x1f3278+':'+_0x55317a['id'],_0x55317a);SquareProjectEvents['emit'](_0x1f3278,_0x55317a);_0x187863(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];SquareProject[_0xcca8('0x8')](e,emitEvent(event));}}module[_0xcca8('0x9')]=SquareProjectEvents; \ No newline at end of file +var _0x03ff=['update','emit','hasOwnProperty','hook','exports','events','SquareProject','setMaxListeners','save'];(function(_0x3f8396,_0x2b703d){var _0xd21fa=function(_0x5bc5f1){while(--_0x5bc5f1){_0x3f8396['push'](_0x3f8396['shift']());}};_0xd21fa(++_0x2b703d);}(_0x03ff,0x11c));var _0xf03f=function(_0x491a7f,_0x28bb80){_0x491a7f=_0x491a7f-0x0;var _0x3d8f44=_0x03ff[_0x491a7f];return _0x3d8f44;};'use strict';var EventEmitter=require(_0xf03f('0x0'));var SquareProject=require('../../mysqldb')['db'][_0xf03f('0x1')];var SquareProjectEvents=new EventEmitter();SquareProjectEvents[_0xf03f('0x2')](0x0);var events={'afterCreate':_0xf03f('0x3'),'afterUpdate':_0xf03f('0x4'),'afterDestroy':'remove'};function emitEvent(_0x1e588a){return function(_0x115bab,_0x47414b,_0x18e575){SquareProjectEvents[_0xf03f('0x5')](_0x1e588a+':'+_0x115bab['id'],_0x115bab);SquareProjectEvents[_0xf03f('0x5')](_0x1e588a,_0x115bab);_0x18e575(null);};}for(var e in events){if(events[_0xf03f('0x6')](e)){var event=events[e];SquareProject[_0xf03f('0x7')](e,emitEvent(event));}}module[_0xf03f('0x8')]=SquareProjectEvents; \ No newline at end of file diff --git a/server/api/squareProject/squareProject.model.js b/server/api/squareProject/squareProject.model.js index 60def05..823b5c7 100644 --- a/server/api/squareProject/squareProject.model.js +++ b/server/api/squareProject/squareProject.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5bb4=['api','bluebird','request-promise','path','../../config/environment','./squareProject.attributes','exports','square_projects','changed','preproduction','savedAt','format','production','publishedAt','lodash','../../config/logger'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x5bb4,0x1ee));var _0x45bb=function(_0x5e96dd,_0xe1405a){_0x5e96dd=_0x5e96dd-0x0;var _0x130088=_0x5bb4[_0x5e96dd];return _0x130088;};'use strict';var _=require(_0x45bb('0x0'));var util=require('util');var logger=require(_0x45bb('0x1'))(_0x45bb('0x2'));var moment=require('moment');var BPromise=require(_0x45bb('0x3'));var rp=require(_0x45bb('0x4'));var fs=require('fs');var path=require(_0x45bb('0x5'));var rimraf=require('rimraf');var config=require(_0x45bb('0x6'));var attributes=require(_0x45bb('0x7'));module[_0x45bb('0x8')]=function(_0x3f380f,_0x20506c){return _0x3f380f['define']('SquareProject',attributes,{'tableName':_0x45bb('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x2650b0,_0x3db249,_0x346a82){if(_0x2650b0[_0x45bb('0xa')](_0x45bb('0xb'))){_0x2650b0[_0x45bb('0xc')]=moment()[_0x45bb('0xd')]('YYYY-MM-DD\x20HH:mm:ss');}if(_0x2650b0[_0x45bb('0xa')](_0x45bb('0xe'))){_0x2650b0[_0x45bb('0xf')]=moment()[_0x45bb('0xd')]('YYYY-MM-DD\x20HH:mm:ss');}_0x346a82(null,_0x2650b0);}}});}; \ No newline at end of file +var _0x8380=['savedAt','format','YYYY-MM-DD\x20HH:mm:ss','production','publishedAt','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./squareProject.attributes','exports','define','SquareProject','square_projects','changed','preproduction'];(function(_0xc23380,_0x18e158){var _0x4b1b26=function(_0x11796b){while(--_0x11796b){_0xc23380['push'](_0xc23380['shift']());}};_0x4b1b26(++_0x18e158);}(_0x8380,0x1d3));var _0x0838=function(_0x19886f,_0x1019d1){_0x19886f=_0x19886f-0x0;var _0x4c0144=_0x8380[_0x19886f];return _0x4c0144;};'use strict';var _=require(_0x0838('0x0'));var util=require(_0x0838('0x1'));var logger=require(_0x0838('0x2'))(_0x0838('0x3'));var moment=require(_0x0838('0x4'));var BPromise=require(_0x0838('0x5'));var rp=require(_0x0838('0x6'));var fs=require('fs');var path=require(_0x0838('0x7'));var rimraf=require(_0x0838('0x8'));var config=require(_0x0838('0x9'));var attributes=require(_0x0838('0xa'));module[_0x0838('0xb')]=function(_0x570eb4,_0x10554c){return _0x570eb4[_0x0838('0xc')](_0x0838('0xd'),attributes,{'tableName':_0x0838('0xe'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x446b7a,_0x484b4e,_0x38bb9a){if(_0x446b7a[_0x0838('0xf')](_0x0838('0x10'))){_0x446b7a[_0x0838('0x11')]=moment()[_0x0838('0x12')](_0x0838('0x13'));}if(_0x446b7a['changed'](_0x0838('0x14'))){_0x446b7a[_0x0838('0x15')]=moment()['format'](_0x0838('0x13'));}_0x38bb9a(null,_0x446b7a);}}});}; \ No newline at end of file diff --git a/server/api/squareProject/squareProject.rpc.js b/server/api/squareProject/squareProject.rpc.js index 3d751f3..46c971d 100644 --- a/server/api/squareProject/squareProject.rpc.js +++ b/server/api/squareProject/squareProject.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0959=['./squareProject.socket','register','then','info','SquareProject,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','ShowSquareProject','SquareProject','options','raw','where','attributes','include','map','model','catch','lodash','util','moment','bluebird','randomstring','../../config/utils','../../config/logger','../../config/environment','jayson/promise','redis','defaults','localhost','socket.io-emitter'];(function(_0x230308,_0x153394){var _0x30563e=function(_0x405284){while(--_0x405284){_0x230308['push'](_0x230308['shift']());}};_0x30563e(++_0x153394);}(_0x0959,0xe8));var _0x9095=function(_0x486788,_0x564a96){_0x486788=_0x486788-0x0;var _0x5729ad=_0x0959[_0x486788];return _0x5729ad;};'use strict';var _=require(_0x9095('0x0'));var util=require(_0x9095('0x1'));var moment=require(_0x9095('0x2'));var BPromise=require(_0x9095('0x3'));var rs=require(_0x9095('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x9095('0x5'));var logger=require(_0x9095('0x6'))('rpc');var config=require(_0x9095('0x7'));var jayson=require(_0x9095('0x8'));var client=jayson['client']['http']({'port':0x232a});config[_0x9095('0x9')]=_[_0x9095('0xa')](config[_0x9095('0x9')],{'host':_0x9095('0xb'),'port':0x18eb});var socket=require(_0x9095('0xc'))(new Redis(config[_0x9095('0x9')]));require(_0x9095('0xd'))[_0x9095('0xe')](socket);function respondWithRpcPromise(_0x4953f2,_0x507ac7,_0x4901cd){return new BPromise(function(_0x48a299,_0xc9a9ed){return client['request'](_0x4953f2,_0x4901cd)[_0x9095('0xf')](function(_0x4347c8){logger[_0x9095('0x10')](_0x9095('0x11'),_0x507ac7,_0x9095('0x12'));logger[_0x9095('0x13')]('SquareProject,\x20%s,\x20%s,\x20%s',_0x507ac7,_0x9095('0x12'),JSON[_0x9095('0x14')](_0x4347c8));if(_0x4347c8['error']){if(_0x4347c8[_0x9095('0x15')][_0x9095('0x16')]===0x1f4){logger[_0x9095('0x15')](_0x9095('0x11'),_0x507ac7,_0x4347c8['error']['message']);return _0xc9a9ed(_0x4347c8[_0x9095('0x15')][_0x9095('0x17')]);}logger[_0x9095('0x15')]('SquareProject,\x20%s,\x20%s',_0x507ac7,_0x4347c8[_0x9095('0x15')][_0x9095('0x17')]);return _0x48a299(_0x4347c8['error']['message']);}else{logger[_0x9095('0x10')](_0x9095('0x11'),_0x507ac7,_0x9095('0x12'));_0x48a299(_0x4347c8[_0x9095('0x18')]['message']);}})['catch'](function(_0x43adfc){logger['error'](_0x9095('0x11'),_0x507ac7,_0x43adfc);_0xc9a9ed(_0x43adfc);});});}exports[_0x9095('0x19')]=function(_0x37ac57){var _0x4ce96f=this;return new Promise(function(_0x528dd6,_0x254ec1){return db[_0x9095('0x1a')]['find']({'raw':_0x37ac57[_0x9095('0x1b')]?_0x37ac57['options'][_0x9095('0x1c')]===undefined?!![]:![]:!![],'where':_0x37ac57[_0x9095('0x1b')]?_0x37ac57['options'][_0x9095('0x1d')]||null:null,'attributes':_0x37ac57[_0x9095('0x1b')]?_0x37ac57[_0x9095('0x1b')][_0x9095('0x1e')]||null:null,'include':_0x37ac57['options']?_0x37ac57['options'][_0x9095('0x1f')]?_[_0x9095('0x20')](_0x37ac57['options'][_0x9095('0x1f')],function(_0x4fff3f){return{'model':db[_0x4fff3f['model']],'as':_0x4fff3f['as'],'attributes':_0x4fff3f[_0x9095('0x1e')],'include':_0x4fff3f[_0x9095('0x1f')]?_[_0x9095('0x20')](_0x4fff3f['include'],function(_0x32372a){return{'model':db[_0x32372a[_0x9095('0x21')]],'as':_0x32372a['as'],'attributes':_0x32372a[_0x9095('0x1e')],'include':_0x32372a[_0x9095('0x1f')]?_[_0x9095('0x20')](_0x32372a[_0x9095('0x1f')],function(_0x3f5b65){return{'model':db[_0x3f5b65[_0x9095('0x21')]],'as':_0x3f5b65['as'],'attributes':_0x3f5b65[_0x9095('0x1e')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x10013a){logger[_0x9095('0x10')](_0x9095('0x19'),_0x37ac57);logger['debug'](_0x9095('0x19'),_0x37ac57,JSON['stringify'](_0x10013a));_0x528dd6(_0x10013a);})[_0x9095('0x22')](function(_0x496262){logger['error']('ShowSquareProject',_0x496262['message'],_0x37ac57);_0x254ec1(_0x4ce96f[_0x9095('0x15')](0x1f4,_0x496262['message']));});});}; \ No newline at end of file +var _0x8af1=['include','map','model','ShowSquareProject','catch','lodash','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','http','defaults','redis','localhost','./squareProject.socket','then','info','SquareProject,\x20%s,\x20%s','debug','stringify','error','message','request\x20sent','SquareProject','find','options','attributes'];(function(_0x2e41e2,_0x4e7250){var _0x2844d6=function(_0x28ce24){while(--_0x28ce24){_0x2e41e2['push'](_0x2e41e2['shift']());}};_0x2844d6(++_0x4e7250);}(_0x8af1,0xa0));var _0x18af=function(_0x3747ae,_0x408e61){_0x3747ae=_0x3747ae-0x0;var _0x339035=_0x8af1[_0x3747ae];return _0x339035;};'use strict';var _=require(_0x18af('0x0'));var util=require('util');var moment=require(_0x18af('0x1'));var BPromise=require(_0x18af('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x18af('0x3'));var db=require(_0x18af('0x4'))['db'];var utils=require(_0x18af('0x5'));var logger=require(_0x18af('0x6'))('rpc');var config=require(_0x18af('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x18af('0x8')][_0x18af('0x9')]({'port':0x232a});config['redis']=_[_0x18af('0xa')](config[_0x18af('0xb')],{'host':_0x18af('0xc'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x18af('0xb')]));require(_0x18af('0xd'))['register'](socket);function respondWithRpcPromise(_0x3114a3,_0x263ea5,_0x568ced){return new BPromise(function(_0x721a14,_0x340d4e){return client['request'](_0x3114a3,_0x568ced)[_0x18af('0xe')](function(_0x39cd07){logger[_0x18af('0xf')](_0x18af('0x10'),_0x263ea5,'request\x20sent');logger[_0x18af('0x11')]('SquareProject,\x20%s,\x20%s,\x20%s',_0x263ea5,'request\x20sent',JSON[_0x18af('0x12')](_0x39cd07));if(_0x39cd07['error']){if(_0x39cd07[_0x18af('0x13')]['code']===0x1f4){logger[_0x18af('0x13')]('SquareProject,\x20%s,\x20%s',_0x263ea5,_0x39cd07[_0x18af('0x13')][_0x18af('0x14')]);return _0x340d4e(_0x39cd07[_0x18af('0x13')]['message']);}logger[_0x18af('0x13')](_0x18af('0x10'),_0x263ea5,_0x39cd07['error'][_0x18af('0x14')]);return _0x721a14(_0x39cd07['error'][_0x18af('0x14')]);}else{logger['info'](_0x18af('0x10'),_0x263ea5,_0x18af('0x15'));_0x721a14(_0x39cd07['result'][_0x18af('0x14')]);}})['catch'](function(_0x58e90b){logger[_0x18af('0x13')](_0x18af('0x10'),_0x263ea5,_0x58e90b);_0x340d4e(_0x58e90b);});});}exports['ShowSquareProject']=function(_0x1cf773){var _0xf525e8=this;return new Promise(function(_0x2ff23f,_0x9e01a8){return db[_0x18af('0x16')][_0x18af('0x17')]({'raw':_0x1cf773[_0x18af('0x18')]?_0x1cf773[_0x18af('0x18')]['raw']===undefined?!![]:![]:!![],'where':_0x1cf773['options']?_0x1cf773[_0x18af('0x18')]['where']||null:null,'attributes':_0x1cf773[_0x18af('0x18')]?_0x1cf773[_0x18af('0x18')][_0x18af('0x19')]||null:null,'include':_0x1cf773[_0x18af('0x18')]?_0x1cf773[_0x18af('0x18')][_0x18af('0x1a')]?_[_0x18af('0x1b')](_0x1cf773[_0x18af('0x18')][_0x18af('0x1a')],function(_0x169609){return{'model':db[_0x169609['model']],'as':_0x169609['as'],'attributes':_0x169609[_0x18af('0x19')],'include':_0x169609[_0x18af('0x1a')]?_[_0x18af('0x1b')](_0x169609[_0x18af('0x1a')],function(_0x2f6fba){return{'model':db[_0x2f6fba[_0x18af('0x1c')]],'as':_0x2f6fba['as'],'attributes':_0x2f6fba[_0x18af('0x19')],'include':_0x2f6fba[_0x18af('0x1a')]?_[_0x18af('0x1b')](_0x2f6fba[_0x18af('0x1a')],function(_0x26ece8){return{'model':db[_0x26ece8[_0x18af('0x1c')]],'as':_0x26ece8['as'],'attributes':_0x26ece8[_0x18af('0x19')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x4de5cd){logger[_0x18af('0xf')](_0x18af('0x1d'),_0x1cf773);logger[_0x18af('0x11')](_0x18af('0x1d'),_0x1cf773,JSON[_0x18af('0x12')](_0x4de5cd));_0x2ff23f(_0x4de5cd);})[_0x18af('0x1e')](function(_0x3e2e11){logger[_0x18af('0x13')]('ShowSquareProject',_0x3e2e11[_0x18af('0x14')],_0x1cf773);_0x9e01a8(_0xf525e8[_0x18af('0x13')](0x1f4,_0x3e2e11[_0x18af('0x14')]));});});}; \ No newline at end of file diff --git a/server/api/squareProject/squareProject.socket.js b/server/api/squareProject/squareProject.socket.js index 9202c3f..6a1a71e 100644 --- a/server/api/squareProject/squareProject.socket.js +++ b/server/api/squareProject/squareProject.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x694c=['remove','register','squareProject:'];(function(_0x193e28,_0x3dac1d){var _0x20ef59=function(_0x48047e){while(--_0x48047e){_0x193e28['push'](_0x193e28['shift']());}};_0x20ef59(++_0x3dac1d);}(_0x694c,0xc0));var _0xc694=function(_0x5b0d0b,_0x3ad844){_0x5b0d0b=_0x5b0d0b-0x0;var _0x45916a=_0x694c[_0x5b0d0b];return _0x45916a;};'use strict';var SquareProjectEvents=require('./squareProject.events');var events=['save',_0xc694('0x0'),'update'];function createListener(_0x3812c2,_0x14563a){return function(_0x1116b5){_0x14563a['emit'](_0x3812c2,_0x1116b5);};}function removeListener(_0x32ca4d,_0xa681fe){return function(){SquareProjectEvents['removeListener'](_0x32ca4d,_0xa681fe);};}exports[_0xc694('0x1')]=function(_0x3f0f94){for(var _0x3d8562=0x0,_0x5b4209=events['length'];_0x3d8562<_0x5b4209;_0x3d8562++){var _0x57a041=events[_0x3d8562];var _0x3dd473=createListener(_0xc694('0x2')+_0x57a041,_0x3f0f94);SquareProjectEvents['on'](_0x57a041,_0x3dd473);}}; \ No newline at end of file +var _0xacd8=['register','length','squareProject:','./squareProject.events','save','remove','update','emit','removeListener'];(function(_0x4853bd,_0x389aab){var _0x15968c=function(_0x1297b2){while(--_0x1297b2){_0x4853bd['push'](_0x4853bd['shift']());}};_0x15968c(++_0x389aab);}(_0xacd8,0x150));var _0x8acd=function(_0x5798a1,_0x52cdc5){_0x5798a1=_0x5798a1-0x0;var _0x156dd9=_0xacd8[_0x5798a1];return _0x156dd9;};'use strict';var SquareProjectEvents=require(_0x8acd('0x0'));var events=[_0x8acd('0x1'),_0x8acd('0x2'),_0x8acd('0x3')];function createListener(_0x2b208a,_0x1a464f){return function(_0x588411){_0x1a464f[_0x8acd('0x4')](_0x2b208a,_0x588411);};}function removeListener(_0x9317d9,_0x4568f9){return function(){SquareProjectEvents[_0x8acd('0x5')](_0x9317d9,_0x4568f9);};}exports[_0x8acd('0x6')]=function(_0x19a10b){for(var _0x546a0f=0x0,_0x1aa490=events[_0x8acd('0x7')];_0x546a0f<_0x1aa490;_0x546a0f++){var _0x2d458d=events[_0x546a0f];var _0x2dc79a=createListener(_0x8acd('0x8')+_0x2d458d,_0x19a10b);SquareProjectEvents['on'](_0x2d458d,_0x2dc79a);}}; \ No newline at end of file diff --git a/server/api/squareRecording/index.js b/server/api/squareRecording/index.js index e9a8e03..ccdd1b6 100644 --- a/server/api/squareRecording/index.js +++ b/server/api/squareRecording/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x326f=['multer','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./squareRecording.controller','get','isAuthenticated','/:id','show','download','post','create','put','delete','exports'];(function(_0x1caf6a,_0x26a5bf){var _0x1bf493=function(_0x3982f5){while(--_0x3982f5){_0x1caf6a['push'](_0x1caf6a['shift']());}};_0x1bf493(++_0x26a5bf);}(_0x326f,0xd1));var _0xf326=function(_0x6333f3,_0x49ea61){_0x6333f3=_0x6333f3-0x0;var _0x5d5150=_0x326f[_0x6333f3];return _0x5d5150;};'use strict';var multer=require(_0xf326('0x0'));var util=require('util');var path=require('path');var timeout=require(_0xf326('0x1'));var express=require(_0xf326('0x2'));var router=express[_0xf326('0x3')]();var fs_extra=require(_0xf326('0x4'));var auth=require(_0xf326('0x5'));var interaction=require(_0xf326('0x6'));var config=require(_0xf326('0x7'));var controller=require(_0xf326('0x8'));router[_0xf326('0x9')]('/',auth[_0xf326('0xa')](),controller['index']);router[_0xf326('0x9')](_0xf326('0xb'),auth[_0xf326('0xa')](),controller[_0xf326('0xc')]);router['get']('/:id/download',auth['isAuthenticated'](),controller[_0xf326('0xd')]);router[_0xf326('0xe')]('/',auth[_0xf326('0xa')](),controller[_0xf326('0xf')]);router[_0xf326('0x10')]('/:id',auth[_0xf326('0xa')](),controller['update']);router[_0xf326('0x11')]('/:id',auth[_0xf326('0xa')](),controller['destroy']);module[_0xf326('0x12')]=router; \ No newline at end of file +var _0x5fab=['express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./squareRecording.controller','get','isAuthenticated','/:id','show','/:id/download','download','create','put','update','delete','destroy','multer','util','connect-timeout'];(function(_0x3097d5,_0x1b40d5){var _0x49edad=function(_0x169e3c){while(--_0x169e3c){_0x3097d5['push'](_0x3097d5['shift']());}};_0x49edad(++_0x1b40d5);}(_0x5fab,0x177));var _0xb5fa=function(_0xebc72a,_0x5a55c5){_0xebc72a=_0xebc72a-0x0;var _0x441d7d=_0x5fab[_0xebc72a];return _0x441d7d;};'use strict';var multer=require(_0xb5fa('0x0'));var util=require(_0xb5fa('0x1'));var path=require('path');var timeout=require(_0xb5fa('0x2'));var express=require(_0xb5fa('0x3'));var router=express[_0xb5fa('0x4')]();var fs_extra=require(_0xb5fa('0x5'));var auth=require(_0xb5fa('0x6'));var interaction=require(_0xb5fa('0x7'));var config=require(_0xb5fa('0x8'));var controller=require(_0xb5fa('0x9'));router[_0xb5fa('0xa')]('/',auth[_0xb5fa('0xb')](),controller['index']);router['get'](_0xb5fa('0xc'),auth[_0xb5fa('0xb')](),controller[_0xb5fa('0xd')]);router['get'](_0xb5fa('0xe'),auth[_0xb5fa('0xb')](),controller[_0xb5fa('0xf')]);router['post']('/',auth['isAuthenticated'](),controller[_0xb5fa('0x10')]);router[_0xb5fa('0x11')](_0xb5fa('0xc'),auth[_0xb5fa('0xb')](),controller[_0xb5fa('0x12')]);router[_0xb5fa('0x13')](_0xb5fa('0xc'),auth[_0xb5fa('0xb')](),controller[_0xb5fa('0x14')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/squareRecording/squareRecording.attributes.js b/server/api/squareRecording/squareRecording.attributes.js index 4817f3b..f499787 100644 --- a/server/api/squareRecording/squareRecording.attributes.js +++ b/server/api/squareRecording/squareRecording.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbd51=['VIRTUAL','getDataValue','savePath','lastIndexOf','sequelize','STRING'];(function(_0x40c18d,_0x5f1455){var _0x1a10b8=function(_0x570824){while(--_0x570824){_0x40c18d['push'](_0x40c18d['shift']());}};_0x1a10b8(++_0x5f1455);}(_0xbd51,0x1a8));var _0x1bd5=function(_0x29d83b,_0x2486e9){_0x29d83b=_0x29d83b-0x0;var _0x21879a=_0xbd51[_0x29d83b];return _0x21879a;};'use strict';var Sequelize=require(_0x1bd5('0x0'));module['exports']={'uniqueid':{'type':Sequelize[_0x1bd5('0x1')]},'callerid':{'type':Sequelize[_0x1bd5('0x1')]},'calleridname':{'type':Sequelize[_0x1bd5('0x1')]},'context':{'type':Sequelize[_0x1bd5('0x1')]},'extension':{'type':Sequelize['STRING']},'priority':{'type':Sequelize['STRING']},'accountcode':{'type':Sequelize['STRING']},'dnid':{'type':Sequelize['STRING']},'projectName':{'type':Sequelize[_0x1bd5('0x1')]},'saveName':{'type':Sequelize[_0x1bd5('0x1')]},'filename':{'type':Sequelize[_0x1bd5('0x1')]},'savePath':{'type':Sequelize['STRING']},'format':{'type':Sequelize[_0x1bd5('0x2')],'get':function(){var _0x30a385='';var _0x19077c=this[_0x1bd5('0x3')](_0x1bd5('0x4'));if(_0x19077c){_0x30a385=_0x19077c['substring'](_0x19077c[_0x1bd5('0x5')]('.'));}return _0x30a385;}}}; \ No newline at end of file +var _0xed1f=['lastIndexOf','sequelize','exports','STRING','VIRTUAL','getDataValue','substring'];(function(_0x12bcf7,_0xc11103){var _0x2825a=function(_0x4452ba){while(--_0x4452ba){_0x12bcf7['push'](_0x12bcf7['shift']());}};_0x2825a(++_0xc11103);}(_0xed1f,0x6a));var _0xfed1=function(_0x4dc7b9,_0x319d5a){_0x4dc7b9=_0x4dc7b9-0x0;var _0x3ab114=_0xed1f[_0x4dc7b9];return _0x3ab114;};'use strict';var Sequelize=require(_0xfed1('0x0'));module[_0xfed1('0x1')]={'uniqueid':{'type':Sequelize[_0xfed1('0x2')]},'callerid':{'type':Sequelize[_0xfed1('0x2')]},'calleridname':{'type':Sequelize[_0xfed1('0x2')]},'context':{'type':Sequelize[_0xfed1('0x2')]},'extension':{'type':Sequelize[_0xfed1('0x2')]},'priority':{'type':Sequelize[_0xfed1('0x2')]},'accountcode':{'type':Sequelize[_0xfed1('0x2')]},'dnid':{'type':Sequelize[_0xfed1('0x2')]},'projectName':{'type':Sequelize[_0xfed1('0x2')]},'saveName':{'type':Sequelize[_0xfed1('0x2')]},'filename':{'type':Sequelize[_0xfed1('0x2')]},'savePath':{'type':Sequelize[_0xfed1('0x2')]},'format':{'type':Sequelize[_0xfed1('0x3')],'get':function(){var _0x612b38='';var _0x2a6082=this[_0xfed1('0x4')]('savePath');if(_0x2a6082){_0x612b38=_0x2a6082[_0xfed1('0x5')](_0x2a6082[_0xfed1('0x6')]('.'));}return _0x612b38;}}}; \ No newline at end of file diff --git a/server/api/squareRecording/squareRecording.controller.js b/server/api/squareRecording/squareRecording.controller.js index f2b6884..f086c45 100644 --- a/server/api/squareRecording/squareRecording.controller.js +++ b/server/api/squareRecording/squareRecording.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x486c=['File:\x20\x22','unlinkSync','.cypher','\x22\x20trovato\x20eseguo\x20la\x20cancellazione','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','fs-extra','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','limit','undefined','count','Content-Range','apply','reject','update','then','error','stack','name','send','index','SquareRecording','rawAttributes','fieldName','type','key','map','query','keys','filters','intersection','model','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','findAll','show','params','include','find','catch','create','body','uniqueid','savePath','filename','format','%s.cypher','secrets','recording','existsSync','Sequelize','ValidationError','SquareRecording\x20not\x20found','download','extname','unlink','message','Not\x20found','isNil','Entity\x20not\x20found','info','cancellazione\x20fisica\x20documento\x20%s'];(function(_0x58331f,_0xe5b334){var _0x33158a=function(_0x76ed16){while(--_0x76ed16){_0x58331f['push'](_0x58331f['shift']());}};_0x33158a(++_0xe5b334);}(_0x486c,0x130));var _0xc486=function(_0x309446,_0x2ca29b){_0x309446=_0x309446-0x0;var _0x3f008a=_0x486c[_0x309446];return _0x3f008a;};'use strict';var emlformat=require(_0xc486('0x0'));var rimraf=require(_0xc486('0x1'));var zipdir=require(_0xc486('0x2'));var jsonpatch=require(_0xc486('0x3'));var rp=require(_0xc486('0x4'));var moment=require(_0xc486('0x5'));var BPromise=require(_0xc486('0x6'));var Mustache=require(_0xc486('0x7'));var util=require(_0xc486('0x8'));var path=require(_0xc486('0x9'));var sox=require('sox');var csv=require(_0xc486('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xc486('0xb'));var _=require('lodash');var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xc486('0xc'));var deskjs=require(_0xc486('0xd'));var toCsv=require(_0xc486('0xa'));var querystring=require(_0xc486('0xe'));var Papa=require(_0xc486('0xf'));var Redis=require(_0xc486('0x10'));var authService=require(_0xc486('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0xc486('0x12'));var hardwareService=require(_0xc486('0x13'));var logger=require(_0xc486('0x14'))(_0xc486('0x15'));var utils=require(_0xc486('0x16'));var config=require(_0xc486('0x17'));var licenseUtil=require(_0xc486('0x18'));var db=require(_0xc486('0x19'))['db'];function respondWithStatusCode(_0x23fa97,_0x1b5fa8){_0x1b5fa8=_0x1b5fa8||0xcc;return function(_0x2f53a6){if(_0x2f53a6){return _0x23fa97[_0xc486('0x1a')](_0x1b5fa8);}return _0x23fa97[_0xc486('0x1b')](_0x1b5fa8)[_0xc486('0x1c')]();};}function respondWithResult(_0x18739c,_0x53bd4e){_0x53bd4e=_0x53bd4e||0xc8;return function(_0xbe8942){if(_0xbe8942){return _0x18739c[_0xc486('0x1b')](_0x53bd4e)[_0xc486('0x1d')](_0xbe8942);}};}function respondWithFilteredResult(_0x721821,_0x264017){return function(_0x356150){if(_0x356150){var _0xae3c48=typeof _0x264017[_0xc486('0x1e')]==='undefined'&&typeof _0x264017[_0xc486('0x1f')]===_0xc486('0x20');var _0x2c557b=_0x356150[_0xc486('0x21')];var _0x51dfab=_0xae3c48?0x0:_0x264017[_0xc486('0x1e')];var _0x395fd3=_0xae3c48?_0x356150[_0xc486('0x21')]:_0x264017[_0xc486('0x1e')]+_0x264017[_0xc486('0x1f')];var _0x3f3680;if(_0x395fd3>=_0x2c557b){_0x395fd3=_0x2c557b;_0x3f3680=0xc8;}else{_0x3f3680=0xce;}_0x721821[_0xc486('0x1b')](_0x3f3680);return _0x721821['set'](_0xc486('0x22'),_0x51dfab+'-'+_0x395fd3+'/'+_0x2c557b)[_0xc486('0x1d')](_0x356150);}return null;};}function patchUpdates(_0x273042){return function(_0x197b93){try{jsonpatch[_0xc486('0x23')](_0x197b93,_0x273042,!![]);}catch(_0x1eaef6){return BPromise[_0xc486('0x24')](_0x1eaef6);}return _0x197b93['save']();};}function saveUpdates(_0x22408d,_0xf0151){return function(_0x286aa8){if(_0x286aa8){return _0x286aa8[_0xc486('0x25')](_0x22408d)[_0xc486('0x26')](function(_0x3309eb){return _0x3309eb;});}return null;};}function removeEntity(_0x40b9ae,_0x170747){return function(_0x1110b5){if(_0x1110b5){return _0x1110b5['destroy']()[_0xc486('0x26')](function(){_0x40b9ae[_0xc486('0x1b')](0xcc)[_0xc486('0x1c')]();});}};}function handleEntityNotFound(_0x2b91fc,_0xa32d3e){return function(_0x2a402e){if(!_0x2a402e){_0x2b91fc[_0xc486('0x1a')](0x194);}return _0x2a402e;};}function handleError(_0x1e2228,_0x3e05d0){_0x3e05d0=_0x3e05d0||0x1f4;return function(_0x22995f){logger[_0xc486('0x27')](_0x22995f[_0xc486('0x28')]);if(_0x22995f[_0xc486('0x29')]){delete _0x22995f[_0xc486('0x29')];}_0x1e2228[_0xc486('0x1b')](_0x3e05d0)[_0xc486('0x2a')](_0x22995f);};}exports[_0xc486('0x2b')]=function(_0xdc203a,_0x16262f){var _0x4072a3={},_0xb3cbbd={},_0x5dc452={'count':0x0,'rows':[]};var _0x112ded=_['map'](db[_0xc486('0x2c')][_0xc486('0x2d')],function(_0x8428b6){return{'name':_0x8428b6[_0xc486('0x2e')],'type':_0x8428b6[_0xc486('0x2f')][_0xc486('0x30')]};});_0xb3cbbd['model']=_[_0xc486('0x31')](_0x112ded,_0xc486('0x29'));_0xb3cbbd[_0xc486('0x32')]=_[_0xc486('0x33')](_0xdc203a[_0xc486('0x32')]);_0xb3cbbd[_0xc486('0x34')]=_[_0xc486('0x35')](_0xb3cbbd[_0xc486('0x36')],_0xb3cbbd['query']);_0x4072a3['attributes']=_[_0xc486('0x35')](_0xb3cbbd[_0xc486('0x36')],qs[_0xc486('0x37')](_0xdc203a[_0xc486('0x32')][_0xc486('0x37')]));_0x4072a3[_0xc486('0x38')]=_0x4072a3['attributes'][_0xc486('0x39')]?_0x4072a3['attributes']:_0xb3cbbd[_0xc486('0x36')];if(!_0xdc203a[_0xc486('0x32')][_0xc486('0x3a')](_0xc486('0x3b'))){_0x4072a3[_0xc486('0x1f')]=qs[_0xc486('0x1f')](_0xdc203a[_0xc486('0x32')][_0xc486('0x1f')]);_0x4072a3['offset']=qs[_0xc486('0x1e')](_0xdc203a[_0xc486('0x32')][_0xc486('0x1e')]);}_0x4072a3[_0xc486('0x3c')]=qs[_0xc486('0x3d')](_0xdc203a[_0xc486('0x32')]['sort']);_0x4072a3[_0xc486('0x3e')]=qs[_0xc486('0x34')](_[_0xc486('0x3f')](_0xdc203a[_0xc486('0x32')],_0xb3cbbd['filters']),_0x112ded);if(_0xdc203a['query'][_0xc486('0x40')]){_0x4072a3['where']=_[_0xc486('0x41')](_0x4072a3['where'],{'$or':_['map'](_0x112ded,function(_0x4b6d6f){if(_0x4b6d6f[_0xc486('0x2f')]!==_0xc486('0x42')){var _0x41a17a={};_0x41a17a[_0x4b6d6f['name']]={'$like':'%'+_0xdc203a[_0xc486('0x32')][_0xc486('0x40')]+'%'};return _0x41a17a;}})});}_0x4072a3=_[_0xc486('0x41')]({},_0x4072a3,_0xdc203a[_0xc486('0x43')]);var _0x4949f1={'where':_0x4072a3['where']};return db[_0xc486('0x2c')][_0xc486('0x21')](_0x4949f1)[_0xc486('0x26')](function(_0x5be801){_0x5dc452[_0xc486('0x21')]=_0x5be801;if(_0xdc203a[_0xc486('0x32')]['includeAll']){_0x4072a3['include']=[{'all':!![]}];}return db[_0xc486('0x2c')][_0xc486('0x44')](_0x4072a3);})['then'](function(_0x4a51d6){_0x5dc452['rows']=_0x4a51d6;return _0x5dc452;})['then'](respondWithFilteredResult(_0x16262f,_0x4072a3))['catch'](handleError(_0x16262f,null));};exports[_0xc486('0x45')]=function(_0x5d41a8,_0x6fd6fc){var _0x5047fb={'raw':!![],'where':{'id':_0x5d41a8[_0xc486('0x46')]['id']}},_0x1c2524={};_0x1c2524[_0xc486('0x36')]=_[_0xc486('0x33')](db[_0xc486('0x2c')][_0xc486('0x2d')]);_0x1c2524[_0xc486('0x32')]=_['keys'](_0x5d41a8['query']);_0x1c2524[_0xc486('0x34')]=_['intersection'](_0x1c2524['model'],_0x1c2524[_0xc486('0x32')]);_0x5047fb[_0xc486('0x38')]=_[_0xc486('0x35')](_0x1c2524['model'],qs[_0xc486('0x37')](_0x5d41a8[_0xc486('0x32')][_0xc486('0x37')]));_0x5047fb[_0xc486('0x38')]=_0x5047fb[_0xc486('0x38')]['length']?_0x5047fb[_0xc486('0x38')]:_0x1c2524[_0xc486('0x36')];if(_0x5d41a8[_0xc486('0x32')]['includeAll']){_0x5047fb[_0xc486('0x47')]=[{'all':!![]}];}_0x5047fb=_[_0xc486('0x41')]({},_0x5047fb,_0x5d41a8[_0xc486('0x43')]);return db[_0xc486('0x2c')][_0xc486('0x48')](_0x5047fb)[_0xc486('0x26')](handleEntityNotFound(_0x6fd6fc,null))[_0xc486('0x26')](respondWithResult(_0x6fd6fc,null))[_0xc486('0x49')](handleError(_0x6fd6fc,null));};exports[_0xc486('0x4a')]=function(_0x524599,_0x41a52e){return db[_0xc486('0x2c')][_0xc486('0x4a')](_0x524599[_0xc486('0x4b')],{})[_0xc486('0x26')](respondWithResult(_0x41a52e,0xc9))[_0xc486('0x49')](handleError(_0x41a52e,null));};exports[_0xc486('0x25')]=function(_0xa7c5cd,_0x11ebb9){if(_0xa7c5cd['body']['id']){delete _0xa7c5cd['body']['id'];}return db[_0xc486('0x2c')][_0xc486('0x48')]({'where':{'id':_0xa7c5cd['params']['id']}})[_0xc486('0x26')](handleEntityNotFound(_0x11ebb9,null))[_0xc486('0x26')](saveUpdates(_0xa7c5cd[_0xc486('0x4b')],null))[_0xc486('0x26')](respondWithResult(_0x11ebb9,null))[_0xc486('0x49')](handleError(_0x11ebb9,null));};exports['download']=function(_0x27dc74,_0x563bac,_0x132a64){var _0x1cdbb2=require('../../components/encryptor');var _0x3a94d9=![];var _0x23b233={};if(_0x27dc74['query'][_0xc486('0x2f')]&&_0x27dc74[_0xc486('0x32')][_0xc486('0x2f')]===_0xc486('0x4c')){_0x23b233[_0xc486('0x4c')]=_0x27dc74[_0xc486('0x46')]['id'];}else{_0x23b233['id']=_0x27dc74[_0xc486('0x46')]['id'];}return db[_0xc486('0x2c')][_0xc486('0x48')]({'where':_0x23b233,'attributes':['id',_0xc486('0x4d'),_0xc486('0x4e')],'raw':!![]})[_0xc486('0x26')](handleEntityNotFound(_0x563bac,null))['then'](function(_0xd80d3c){if(_0xd80d3c){var _0xe74a46=_0xd80d3c[_0xc486('0x4d')];var _0x608579=util[_0xc486('0x4f')](_0xc486('0x50'),_0xe74a46);if(fs['existsSync'](_0x608579)){_0x3a94d9=!![];return _0x1cdbb2['decryptFile'](_0x608579,_0xe74a46,config[_0xc486('0x51')][_0xc486('0x52')])[_0xc486('0x26')](function(){return _0xd80d3c;});}return _0xd80d3c;}})[_0xc486('0x26')](function(_0x298b6a){if(_0x298b6a){var _0x12f056=_0x298b6a[_0xc486('0x4d')];if(!fs[_0xc486('0x53')](_0x12f056)){throw new db[(_0xc486('0x54'))][(_0xc486('0x55'))](_0xc486('0x56'));}if(_0x298b6a[_0xc486('0x4e')]){return _0x563bac[_0xc486('0x57')](_0x12f056,_0x298b6a[_0xc486('0x4e')]+path[_0xc486('0x58')](_0x12f056),function(){if(_0x3a94d9){fs[_0xc486('0x59')](_0x12f056);}});}else{return _0x563bac[_0xc486('0x57')](_0x12f056,function(_0x1b4ffe){if(_0x3a94d9){fs[_0xc486('0x59')](_0x12f056);}});}}})[_0xc486('0x49')](function(_0x4b089b){if(_0x4b089b[_0xc486('0x5a')]===_0xc486('0x56')){_0x563bac[_0xc486('0x1b')](0x194)['send'](_0xc486('0x5b'));}else{return handleError(_0x563bac,null);}});};exports['destroy']=function(_0x2aa47c,_0x3e4b14){return db[_0xc486('0x2c')][_0xc486('0x48')]({'where':{'id':_0x2aa47c['params']['id']}})[_0xc486('0x26')](function(_0x1df28d){if(_[_0xc486('0x5c')](_0x1df28d)){throw new ReferenceError(_0xc486('0x5d'));}return _0x1df28d;})['then'](function(_0x59b9c9){var _0x5130fa=_0x59b9c9[_0xc486('0x4d')];logger[_0xc486('0x5e')](_0xc486('0x5f'),_0x5130fa);if(!_[_0xc486('0x5c')](_0x59b9c9[_0xc486('0x4d')])&&fs[_0xc486('0x53')](_0x5130fa)){logger[_0xc486('0x5e')](_0xc486('0x60')+_0x5130fa+'\x22\x20trovato\x20eseguo\x20la\x20cancellazione');fs[_0xc486('0x61')](_0x5130fa);}_0x5130fa=_0x5130fa+_0xc486('0x62');if(!_[_0xc486('0x5c')](_0x59b9c9[_0xc486('0x4d')])&&fs[_0xc486('0x53')](_0x5130fa)){logger[_0xc486('0x5e')](_0xc486('0x60')+_0x5130fa+_0xc486('0x63'));fs[_0xc486('0x61')](_0x5130fa);}return _0x59b9c9;})[_0xc486('0x26')](function(_0x2ebfad){if(!_0x2ebfad)throw new InternalError();return _0x2ebfad['destroy']();})[_0xc486('0x26')](function(){_0x3e4b14[_0xc486('0x1b')](0xcc)[_0xc486('0x1c')]();})[_0xc486('0x49')](handleError(_0x3e4b14,null));}; \ No newline at end of file +var _0xe3b8=['to-csv','fs-extra','lodash','squel','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','status','end','json','offset','undefined','limit','count','Content-Range','apply','update','then','destroy','sendStatus','error','name','send','index','SquareRecording','rawAttributes','fieldName','type','key','model','keys','query','filters','intersection','fields','attributes','hasOwnProperty','nolimit','sort','where','pick','filter','merge','map','VIRTUAL','options','includeAll','include','rows','catch','show','find','create','body','../../components/encryptor','uniqueid','params','savePath','filename','%s.cypher','existsSync','decryptFile','recording','Sequelize','SquareRecording\x20not\x20found','download','unlink','message','Not\x20found','isNil','Entity\x20not\x20found','info','cancellazione\x20fisica\x20documento\x20%s','\x22\x20trovato\x20eseguo\x20la\x20cancellazione','unlinkSync','.cypher','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox'];(function(_0x3d89ea,_0x55cab2){var _0x582646=function(_0xb63c3){while(--_0xb63c3){_0x3d89ea['push'](_0x3d89ea['shift']());}};_0x582646(++_0x55cab2);}(_0xe3b8,0x10d));var _0x8e3b=function(_0x2fc036,_0x4aac07){_0x2fc036=_0x2fc036-0x0;var _0x26e407=_0xe3b8[_0x2fc036];return _0x26e407;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x8e3b('0x0'));var zipdir=require(_0x8e3b('0x1'));var jsonpatch=require(_0x8e3b('0x2'));var rp=require(_0x8e3b('0x3'));var moment=require(_0x8e3b('0x4'));var BPromise=require(_0x8e3b('0x5'));var Mustache=require(_0x8e3b('0x6'));var util=require(_0x8e3b('0x7'));var path=require(_0x8e3b('0x8'));var sox=require(_0x8e3b('0x9'));var csv=require(_0x8e3b('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x8e3b('0xb'));var _=require(_0x8e3b('0xc'));var squel=require(_0x8e3b('0xd'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x8e3b('0xe'));var toCsv=require(_0x8e3b('0xa'));var querystring=require(_0x8e3b('0xf'));var Papa=require(_0x8e3b('0x10'));var Redis=require('ioredis');var authService=require(_0x8e3b('0x11'));var qs=require(_0x8e3b('0x12'));var as=require(_0x8e3b('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x8e3b('0x14'))(_0x8e3b('0x15'));var utils=require(_0x8e3b('0x16'));var config=require(_0x8e3b('0x17'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x3e4138,_0x572113){_0x572113=_0x572113||0xcc;return function(_0x178288){if(_0x178288){return _0x3e4138['sendStatus'](_0x572113);}return _0x3e4138[_0x8e3b('0x18')](_0x572113)[_0x8e3b('0x19')]();};}function respondWithResult(_0x483547,_0x34f1e6){_0x34f1e6=_0x34f1e6||0xc8;return function(_0x1eead8){if(_0x1eead8){return _0x483547[_0x8e3b('0x18')](_0x34f1e6)[_0x8e3b('0x1a')](_0x1eead8);}};}function respondWithFilteredResult(_0x3e1c5d,_0x5e99c7){return function(_0x3a4ba0){if(_0x3a4ba0){var _0x187c4f=typeof _0x5e99c7[_0x8e3b('0x1b')]===_0x8e3b('0x1c')&&typeof _0x5e99c7[_0x8e3b('0x1d')]===_0x8e3b('0x1c');var _0x221d88=_0x3a4ba0['count'];var _0x5d41f4=_0x187c4f?0x0:_0x5e99c7[_0x8e3b('0x1b')];var _0x51b8a4=_0x187c4f?_0x3a4ba0[_0x8e3b('0x1e')]:_0x5e99c7[_0x8e3b('0x1b')]+_0x5e99c7[_0x8e3b('0x1d')];var _0x5f488f;if(_0x51b8a4>=_0x221d88){_0x51b8a4=_0x221d88;_0x5f488f=0xc8;}else{_0x5f488f=0xce;}_0x3e1c5d[_0x8e3b('0x18')](_0x5f488f);return _0x3e1c5d['set'](_0x8e3b('0x1f'),_0x5d41f4+'-'+_0x51b8a4+'/'+_0x221d88)['json'](_0x3a4ba0);}return null;};}function patchUpdates(_0x1e4bfd){return function(_0x5b04a5){try{jsonpatch[_0x8e3b('0x20')](_0x5b04a5,_0x1e4bfd,!![]);}catch(_0x4a7bfc){return BPromise['reject'](_0x4a7bfc);}return _0x5b04a5['save']();};}function saveUpdates(_0x3fd75c,_0xe232f7){return function(_0x41ae73){if(_0x41ae73){return _0x41ae73[_0x8e3b('0x21')](_0x3fd75c)[_0x8e3b('0x22')](function(_0x41706f){return _0x41706f;});}return null;};}function removeEntity(_0x1aa36f,_0x458880){return function(_0x1f72e7){if(_0x1f72e7){return _0x1f72e7[_0x8e3b('0x23')]()[_0x8e3b('0x22')](function(){_0x1aa36f[_0x8e3b('0x18')](0xcc)[_0x8e3b('0x19')]();});}};}function handleEntityNotFound(_0x3e0db8,_0x348cba){return function(_0x20b9d9){if(!_0x20b9d9){_0x3e0db8[_0x8e3b('0x24')](0x194);}return _0x20b9d9;};}function handleError(_0x188c22,_0x4991cd){_0x4991cd=_0x4991cd||0x1f4;return function(_0x2d257e){logger[_0x8e3b('0x25')](_0x2d257e['stack']);if(_0x2d257e[_0x8e3b('0x26')]){delete _0x2d257e[_0x8e3b('0x26')];}_0x188c22[_0x8e3b('0x18')](_0x4991cd)[_0x8e3b('0x27')](_0x2d257e);};}exports[_0x8e3b('0x28')]=function(_0x2b6fa9,_0x400ca4){var _0x3c5115={},_0x516fc4={},_0xfa4a7f={'count':0x0,'rows':[]};var _0x56a391=_['map'](db[_0x8e3b('0x29')][_0x8e3b('0x2a')],function(_0x1789ad){return{'name':_0x1789ad[_0x8e3b('0x2b')],'type':_0x1789ad[_0x8e3b('0x2c')][_0x8e3b('0x2d')]};});_0x516fc4[_0x8e3b('0x2e')]=_['map'](_0x56a391,_0x8e3b('0x26'));_0x516fc4['query']=_[_0x8e3b('0x2f')](_0x2b6fa9[_0x8e3b('0x30')]);_0x516fc4[_0x8e3b('0x31')]=_[_0x8e3b('0x32')](_0x516fc4[_0x8e3b('0x2e')],_0x516fc4[_0x8e3b('0x30')]);_0x3c5115['attributes']=_[_0x8e3b('0x32')](_0x516fc4[_0x8e3b('0x2e')],qs['fields'](_0x2b6fa9[_0x8e3b('0x30')][_0x8e3b('0x33')]));_0x3c5115[_0x8e3b('0x34')]=_0x3c5115['attributes']['length']?_0x3c5115['attributes']:_0x516fc4[_0x8e3b('0x2e')];if(!_0x2b6fa9[_0x8e3b('0x30')][_0x8e3b('0x35')](_0x8e3b('0x36'))){_0x3c5115[_0x8e3b('0x1d')]=qs[_0x8e3b('0x1d')](_0x2b6fa9[_0x8e3b('0x30')][_0x8e3b('0x1d')]);_0x3c5115[_0x8e3b('0x1b')]=qs['offset'](_0x2b6fa9[_0x8e3b('0x30')][_0x8e3b('0x1b')]);}_0x3c5115['order']=qs['sort'](_0x2b6fa9['query'][_0x8e3b('0x37')]);_0x3c5115[_0x8e3b('0x38')]=qs[_0x8e3b('0x31')](_[_0x8e3b('0x39')](_0x2b6fa9[_0x8e3b('0x30')],_0x516fc4[_0x8e3b('0x31')]),_0x56a391);if(_0x2b6fa9['query'][_0x8e3b('0x3a')]){_0x3c5115[_0x8e3b('0x38')]=_[_0x8e3b('0x3b')](_0x3c5115[_0x8e3b('0x38')],{'$or':_[_0x8e3b('0x3c')](_0x56a391,function(_0x41f189){if(_0x41f189[_0x8e3b('0x2c')]!==_0x8e3b('0x3d')){var _0x3d4826={};_0x3d4826[_0x41f189[_0x8e3b('0x26')]]={'$like':'%'+_0x2b6fa9[_0x8e3b('0x30')]['filter']+'%'};return _0x3d4826;}})});}_0x3c5115=_[_0x8e3b('0x3b')]({},_0x3c5115,_0x2b6fa9[_0x8e3b('0x3e')]);var _0x1a9687={'where':_0x3c5115['where']};return db['SquareRecording'][_0x8e3b('0x1e')](_0x1a9687)['then'](function(_0x11f0fe){_0xfa4a7f[_0x8e3b('0x1e')]=_0x11f0fe;if(_0x2b6fa9['query'][_0x8e3b('0x3f')]){_0x3c5115[_0x8e3b('0x40')]=[{'all':!![]}];}return db[_0x8e3b('0x29')]['findAll'](_0x3c5115);})[_0x8e3b('0x22')](function(_0x2ad338){_0xfa4a7f[_0x8e3b('0x41')]=_0x2ad338;return _0xfa4a7f;})[_0x8e3b('0x22')](respondWithFilteredResult(_0x400ca4,_0x3c5115))[_0x8e3b('0x42')](handleError(_0x400ca4,null));};exports[_0x8e3b('0x43')]=function(_0x4e48dd,_0x29479e){var _0x3dae84={'raw':!![],'where':{'id':_0x4e48dd['params']['id']}},_0x499465={};_0x499465[_0x8e3b('0x2e')]=_[_0x8e3b('0x2f')](db['SquareRecording'][_0x8e3b('0x2a')]);_0x499465['query']=_[_0x8e3b('0x2f')](_0x4e48dd['query']);_0x499465['filters']=_[_0x8e3b('0x32')](_0x499465[_0x8e3b('0x2e')],_0x499465[_0x8e3b('0x30')]);_0x3dae84[_0x8e3b('0x34')]=_[_0x8e3b('0x32')](_0x499465[_0x8e3b('0x2e')],qs['fields'](_0x4e48dd['query'][_0x8e3b('0x33')]));_0x3dae84[_0x8e3b('0x34')]=_0x3dae84[_0x8e3b('0x34')]['length']?_0x3dae84[_0x8e3b('0x34')]:_0x499465[_0x8e3b('0x2e')];if(_0x4e48dd[_0x8e3b('0x30')][_0x8e3b('0x3f')]){_0x3dae84[_0x8e3b('0x40')]=[{'all':!![]}];}_0x3dae84=_[_0x8e3b('0x3b')]({},_0x3dae84,_0x4e48dd[_0x8e3b('0x3e')]);return db[_0x8e3b('0x29')][_0x8e3b('0x44')](_0x3dae84)[_0x8e3b('0x22')](handleEntityNotFound(_0x29479e,null))[_0x8e3b('0x22')](respondWithResult(_0x29479e,null))['catch'](handleError(_0x29479e,null));};exports[_0x8e3b('0x45')]=function(_0x2b29db,_0x113144){return db['SquareRecording'][_0x8e3b('0x45')](_0x2b29db[_0x8e3b('0x46')],{})[_0x8e3b('0x22')](respondWithResult(_0x113144,0xc9))[_0x8e3b('0x42')](handleError(_0x113144,null));};exports[_0x8e3b('0x21')]=function(_0xa368ac,_0x2d0366){if(_0xa368ac[_0x8e3b('0x46')]['id']){delete _0xa368ac[_0x8e3b('0x46')]['id'];}return db[_0x8e3b('0x29')][_0x8e3b('0x44')]({'where':{'id':_0xa368ac['params']['id']}})['then'](handleEntityNotFound(_0x2d0366,null))[_0x8e3b('0x22')](saveUpdates(_0xa368ac['body'],null))[_0x8e3b('0x22')](respondWithResult(_0x2d0366,null))['catch'](handleError(_0x2d0366,null));};exports['download']=function(_0xd60245,_0x4f822e,_0x5053b7){var _0x477991=require(_0x8e3b('0x47'));var _0x2d9dcc=![];var _0x125b1a={};if(_0xd60245[_0x8e3b('0x30')]['type']&&_0xd60245['query']['type']===_0x8e3b('0x48')){_0x125b1a['uniqueid']=_0xd60245[_0x8e3b('0x49')]['id'];}else{_0x125b1a['id']=_0xd60245[_0x8e3b('0x49')]['id'];}return db[_0x8e3b('0x29')]['find']({'where':_0x125b1a,'attributes':['id',_0x8e3b('0x4a'),_0x8e3b('0x4b')],'raw':!![]})[_0x8e3b('0x22')](handleEntityNotFound(_0x4f822e,null))[_0x8e3b('0x22')](function(_0x5dbb00){if(_0x5dbb00){var _0xd7f0a6=_0x5dbb00['savePath'];var _0x383482=util['format'](_0x8e3b('0x4c'),_0xd7f0a6);if(fs[_0x8e3b('0x4d')](_0x383482)){_0x2d9dcc=!![];return _0x477991[_0x8e3b('0x4e')](_0x383482,_0xd7f0a6,config['secrets'][_0x8e3b('0x4f')])[_0x8e3b('0x22')](function(){return _0x5dbb00;});}return _0x5dbb00;}})[_0x8e3b('0x22')](function(_0x457b92){if(_0x457b92){var _0x2732af=_0x457b92[_0x8e3b('0x4a')];if(!fs['existsSync'](_0x2732af)){throw new db[(_0x8e3b('0x50'))]['ValidationError'](_0x8e3b('0x51'));}if(_0x457b92[_0x8e3b('0x4b')]){return _0x4f822e[_0x8e3b('0x52')](_0x2732af,_0x457b92['filename']+path['extname'](_0x2732af),function(){if(_0x2d9dcc){fs[_0x8e3b('0x53')](_0x2732af);}});}else{return _0x4f822e['download'](_0x2732af,function(_0xf89cd3){if(_0x2d9dcc){fs['unlink'](_0x2732af);}});}}})[_0x8e3b('0x42')](function(_0x23d73b){if(_0x23d73b[_0x8e3b('0x54')]==='SquareRecording\x20not\x20found'){_0x4f822e[_0x8e3b('0x18')](0x194)[_0x8e3b('0x27')](_0x8e3b('0x55'));}else{return handleError(_0x4f822e,null);}});};exports['destroy']=function(_0x333d87,_0x4d3e67){return db['SquareRecording'][_0x8e3b('0x44')]({'where':{'id':_0x333d87[_0x8e3b('0x49')]['id']}})[_0x8e3b('0x22')](function(_0x2db734){if(_[_0x8e3b('0x56')](_0x2db734)){throw new ReferenceError(_0x8e3b('0x57'));}return _0x2db734;})[_0x8e3b('0x22')](function(_0x191186){var _0x1159eb=_0x191186[_0x8e3b('0x4a')];logger[_0x8e3b('0x58')](_0x8e3b('0x59'),_0x1159eb);if(!_[_0x8e3b('0x56')](_0x191186[_0x8e3b('0x4a')])&&fs[_0x8e3b('0x4d')](_0x1159eb)){logger[_0x8e3b('0x58')]('File:\x20\x22'+_0x1159eb+_0x8e3b('0x5a'));fs[_0x8e3b('0x5b')](_0x1159eb);}_0x1159eb=_0x1159eb+_0x8e3b('0x5c');if(!_['isNil'](_0x191186[_0x8e3b('0x4a')])&&fs[_0x8e3b('0x4d')](_0x1159eb)){logger[_0x8e3b('0x58')]('File:\x20\x22'+_0x1159eb+_0x8e3b('0x5a'));fs[_0x8e3b('0x5b')](_0x1159eb);}return _0x191186;})['then'](function(_0x37d2f2){if(!_0x37d2f2)throw new InternalError();return _0x37d2f2[_0x8e3b('0x23')]();})[_0x8e3b('0x22')](function(){_0x4d3e67['status'](0xcc)[_0x8e3b('0x19')]();})[_0x8e3b('0x42')](handleError(_0x4d3e67,null));}; \ No newline at end of file diff --git a/server/api/squareRecording/squareRecording.model.js b/server/api/squareRecording/squareRecording.model.js index 6be7496..54ca844 100644 --- a/server/api/squareRecording/squareRecording.model.js +++ b/server/api/squareRecording/squareRecording.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2d78=['define','SquareRecording','square_recordings','lodash','util','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','./squareRecording.attributes','exports'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x2d78,0x199));var _0x82d7=function(_0x1304c6,_0x6bb485){_0x1304c6=_0x1304c6-0x0;var _0x2e6654=_0x2d78[_0x1304c6];return _0x2e6654;};'use strict';var _=require(_0x82d7('0x0'));var util=require(_0x82d7('0x1'));var logger=require(_0x82d7('0x2'))('api');var moment=require(_0x82d7('0x3'));var BPromise=require(_0x82d7('0x4'));var rp=require(_0x82d7('0x5'));var fs=require('fs');var path=require(_0x82d7('0x6'));var rimraf=require(_0x82d7('0x7'));var config=require(_0x82d7('0x8'));var attributes=require(_0x82d7('0x9'));module[_0x82d7('0xa')]=function(_0x19a34c,_0x3c7775){return _0x19a34c[_0x82d7('0xb')](_0x82d7('0xc'),attributes,{'tableName':_0x82d7('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x86b8=['moment','request-promise','path','rimraf','./squareRecording.attributes','define','SquareRecording','square_recordings','lodash','util','../../config/logger'];(function(_0x292de8,_0x6e87b2){var _0x276fb3=function(_0x498a95){while(--_0x498a95){_0x292de8['push'](_0x292de8['shift']());}};_0x276fb3(++_0x6e87b2);}(_0x86b8,0x15d));var _0x886b=function(_0x24a177,_0x500760){_0x24a177=_0x24a177-0x0;var _0x1ad88e=_0x86b8[_0x24a177];return _0x1ad88e;};'use strict';var _=require(_0x886b('0x0'));var util=require(_0x886b('0x1'));var logger=require(_0x886b('0x2'))('api');var moment=require(_0x886b('0x3'));var BPromise=require('bluebird');var rp=require(_0x886b('0x4'));var fs=require('fs');var path=require(_0x886b('0x5'));var rimraf=require(_0x886b('0x6'));var config=require('../../config/environment');var attributes=require(_0x886b('0x7'));module['exports']=function(_0x5b5ff5,_0x2c32bc){return _0x5b5ff5[_0x886b('0x8')](_0x886b('0x9'),attributes,{'tableName':_0x886b('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/squareRecording/squareRecording.rpc.js b/server/api/squareRecording/squareRecording.rpc.js index 79676f8..05cd834 100644 --- a/server/api/squareRecording/squareRecording.rpc.js +++ b/server/api/squareRecording/squareRecording.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc1f4=['SquareRecording,\x20%s,\x20%s','message','result','catch','CreateSquareRecording','SquareRecording','create','body','options','raw','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','http','request','then','info','debug','stringify','error','code'];(function(_0x334c50,_0x1f11d0){var _0x524766=function(_0x5066de){while(--_0x5066de){_0x334c50['push'](_0x334c50['shift']());}};_0x524766(++_0x1f11d0);}(_0xc1f4,0xc7));var _0x4c1f=function(_0x8eb4eb,_0xa70079){_0x8eb4eb=_0x8eb4eb-0x0;var _0x1ff8e3=_0xc1f4[_0x8eb4eb];return _0x1ff8e3;};'use strict';var _=require(_0x4c1f('0x0'));var util=require(_0x4c1f('0x1'));var moment=require('moment');var BPromise=require(_0x4c1f('0x2'));var rs=require(_0x4c1f('0x3'));var fs=require('fs');var Redis=require(_0x4c1f('0x4'));var db=require(_0x4c1f('0x5'))['db'];var utils=require(_0x4c1f('0x6'));var logger=require(_0x4c1f('0x7'))('rpc');var config=require('../../config/environment');var jayson=require(_0x4c1f('0x8'));var client=jayson['client'][_0x4c1f('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x473a3c,_0x5785d6,_0x514418){return new BPromise(function(_0x31107d,_0x3835b9){return client[_0x4c1f('0xa')](_0x473a3c,_0x514418)[_0x4c1f('0xb')](function(_0x46a6cf){logger[_0x4c1f('0xc')]('SquareRecording,\x20%s,\x20%s',_0x5785d6,'request\x20sent');logger[_0x4c1f('0xd')]('SquareRecording,\x20%s,\x20%s,\x20%s',_0x5785d6,'request\x20sent',JSON[_0x4c1f('0xe')](_0x46a6cf));if(_0x46a6cf['error']){if(_0x46a6cf[_0x4c1f('0xf')][_0x4c1f('0x10')]===0x1f4){logger['error'](_0x4c1f('0x11'),_0x5785d6,_0x46a6cf[_0x4c1f('0xf')][_0x4c1f('0x12')]);return _0x3835b9(_0x46a6cf[_0x4c1f('0xf')][_0x4c1f('0x12')]);}logger[_0x4c1f('0xf')]('SquareRecording,\x20%s,\x20%s',_0x5785d6,_0x46a6cf[_0x4c1f('0xf')]['message']);return _0x31107d(_0x46a6cf[_0x4c1f('0xf')][_0x4c1f('0x12')]);}else{logger[_0x4c1f('0xc')](_0x4c1f('0x11'),_0x5785d6,'request\x20sent');_0x31107d(_0x46a6cf[_0x4c1f('0x13')][_0x4c1f('0x12')]);}})[_0x4c1f('0x14')](function(_0x213e2f){logger[_0x4c1f('0xf')](_0x4c1f('0x11'),_0x5785d6,_0x213e2f);_0x3835b9(_0x213e2f);});});}exports[_0x4c1f('0x15')]=function(_0x5c43e7){var _0xdad9ab=this;return new Promise(function(_0x3ce871,_0x4573e6){return db[_0x4c1f('0x16')][_0x4c1f('0x17')](_0x5c43e7[_0x4c1f('0x18')],{'raw':_0x5c43e7[_0x4c1f('0x19')]?_0x5c43e7[_0x4c1f('0x19')][_0x4c1f('0x1a')]===undefined?!![]:![]:!![]})[_0x4c1f('0xb')](function(_0x1088a5){logger[_0x4c1f('0xc')](_0x4c1f('0x15'),_0x5c43e7);logger['debug'](_0x4c1f('0x15'),_0x5c43e7,JSON[_0x4c1f('0xe')](_0x1088a5));_0x3ce871(_0x1088a5);})[_0x4c1f('0x14')](function(_0x298e72){logger['error'](_0x4c1f('0x15'),_0x298e72[_0x4c1f('0x12')],_0x5c43e7);_0x4573e6(_0xdad9ab[_0x4c1f('0xf')](0x1f4,_0x298e72[_0x4c1f('0x12')]));});});}; \ No newline at end of file +var _0xb1fd=['randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','SquareRecording,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','catch','SquareRecording','create','options','raw','CreateSquareRecording','lodash','util','moment','bluebird'];(function(_0x19950b,_0x53d0d7){var _0x3c6b41=function(_0x3924ad){while(--_0x3924ad){_0x19950b['push'](_0x19950b['shift']());}};_0x3c6b41(++_0x53d0d7);}(_0xb1fd,0x1af));var _0xdb1f=function(_0x525e33,_0x34829f){_0x525e33=_0x525e33-0x0;var _0xb2b9f4=_0xb1fd[_0x525e33];return _0xb2b9f4;};'use strict';var _=require(_0xdb1f('0x0'));var util=require(_0xdb1f('0x1'));var moment=require(_0xdb1f('0x2'));var BPromise=require(_0xdb1f('0x3'));var rs=require(_0xdb1f('0x4'));var fs=require('fs');var Redis=require(_0xdb1f('0x5'));var db=require(_0xdb1f('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0xdb1f('0x7'))(_0xdb1f('0x8'));var config=require(_0xdb1f('0x9'));var jayson=require(_0xdb1f('0xa'));var client=jayson[_0xdb1f('0xb')][_0xdb1f('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x5317f2,_0x94ecf,_0xba90ba){return new BPromise(function(_0x4de829,_0x1aaeb5){return client[_0xdb1f('0xd')](_0x5317f2,_0xba90ba)[_0xdb1f('0xe')](function(_0x4138c1){logger[_0xdb1f('0xf')](_0xdb1f('0x10'),_0x94ecf,_0xdb1f('0x11'));logger[_0xdb1f('0x12')]('SquareRecording,\x20%s,\x20%s,\x20%s',_0x94ecf,'request\x20sent',JSON[_0xdb1f('0x13')](_0x4138c1));if(_0x4138c1['error']){if(_0x4138c1[_0xdb1f('0x14')][_0xdb1f('0x15')]===0x1f4){logger[_0xdb1f('0x14')]('SquareRecording,\x20%s,\x20%s',_0x94ecf,_0x4138c1[_0xdb1f('0x14')][_0xdb1f('0x16')]);return _0x1aaeb5(_0x4138c1[_0xdb1f('0x14')][_0xdb1f('0x16')]);}logger[_0xdb1f('0x14')](_0xdb1f('0x10'),_0x94ecf,_0x4138c1[_0xdb1f('0x14')][_0xdb1f('0x16')]);return _0x4de829(_0x4138c1[_0xdb1f('0x14')]['message']);}else{logger['info'](_0xdb1f('0x10'),_0x94ecf,_0xdb1f('0x11'));_0x4de829(_0x4138c1['result'][_0xdb1f('0x16')]);}})[_0xdb1f('0x17')](function(_0x4af226){logger['error'](_0xdb1f('0x10'),_0x94ecf,_0x4af226);_0x1aaeb5(_0x4af226);});});}exports['CreateSquareRecording']=function(_0x1c030c){var _0x54afd4=this;return new Promise(function(_0xd075c6,_0x2d6fd9){return db[_0xdb1f('0x18')][_0xdb1f('0x19')](_0x1c030c['body'],{'raw':_0x1c030c[_0xdb1f('0x1a')]?_0x1c030c[_0xdb1f('0x1a')][_0xdb1f('0x1b')]===undefined?!![]:![]:!![]})[_0xdb1f('0xe')](function(_0x554b87){logger[_0xdb1f('0xf')](_0xdb1f('0x1c'),_0x1c030c);logger[_0xdb1f('0x12')](_0xdb1f('0x1c'),_0x1c030c,JSON[_0xdb1f('0x13')](_0x554b87));_0xd075c6(_0x554b87);})[_0xdb1f('0x17')](function(_0x2310f0){logger['error'](_0xdb1f('0x1c'),_0x2310f0['message'],_0x1c030c);_0x2d6fd9(_0x54afd4[_0xdb1f('0x14')](0x1f4,_0x2310f0[_0xdb1f('0x16')]));});});}; \ No newline at end of file diff --git a/server/api/squareReport/index.js b/server/api/squareReport/index.js index aed041d..759fe43 100644 --- a/server/api/squareReport/index.js +++ b/server/api/squareReport/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(_0x5dc927,_0x49f4a1){var _0x416440=function(_0x752837){while(--_0x752837){_0x5dc927['push'](_0x5dc927['shift']());}};_0x416440(++_0x49f4a1);}(_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('./squareReport.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 _0xbaf0=['/:id','update','delete','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./squareReport.controller','get','isAuthenticated','index','/describe','show','post','create','put'];(function(_0x73540a,_0x32b18c){var _0x1f4d8e=function(_0x15e815){while(--_0x15e815){_0x73540a['push'](_0x73540a['shift']());}};_0x1f4d8e(++_0x32b18c);}(_0xbaf0,0x12a));var _0x0baf=function(_0x2f5ac5,_0x1ee939){_0x2f5ac5=_0x2f5ac5-0x0;var _0x37c9a8=_0xbaf0[_0x2f5ac5];return _0x37c9a8;};'use strict';var multer=require('multer');var util=require(_0x0baf('0x0'));var path=require(_0x0baf('0x1'));var timeout=require(_0x0baf('0x2'));var express=require(_0x0baf('0x3'));var router=express[_0x0baf('0x4')]();var fs_extra=require(_0x0baf('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x0baf('0x6'));var config=require(_0x0baf('0x7'));var controller=require(_0x0baf('0x8'));router[_0x0baf('0x9')]('/',auth[_0x0baf('0xa')](),controller[_0x0baf('0xb')]);router[_0x0baf('0x9')](_0x0baf('0xc'),auth[_0x0baf('0xa')](),controller['describe']);router[_0x0baf('0x9')]('/:id',auth[_0x0baf('0xa')](),controller[_0x0baf('0xd')]);router[_0x0baf('0xe')]('/',auth[_0x0baf('0xa')](),controller[_0x0baf('0xf')]);router[_0x0baf('0x10')](_0x0baf('0x11'),auth[_0x0baf('0xa')](),controller[_0x0baf('0x12')]);router[_0x0baf('0x13')](_0x0baf('0x11'),auth['isAuthenticated'](),controller['destroy']);module[_0x0baf('0x14')]=router; \ No newline at end of file diff --git a/server/api/squareReport/squareReport.attributes.js b/server/api/squareReport/squareReport.attributes.js index 9fb11b1..a0651a2 100644 --- a/server/api/squareReport/squareReport.attributes.js +++ b/server/api/squareReport/squareReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf5c7=['BOOLEAN','sequelize','STRING'];(function(_0x430459,_0x58519c){var _0x3a2439=function(_0x27a0b3){while(--_0x27a0b3){_0x430459['push'](_0x430459['shift']());}};_0x3a2439(++_0x58519c);}(_0xf5c7,0x106));var _0x7f5c=function(_0x4792c8,_0x5158a1){_0x4792c8=_0x4792c8-0x0;var _0x35edb1=_0xf5c7[_0x4792c8];return _0x35edb1;};'use strict';var Sequelize=require(_0x7f5c('0x0'));module['exports']={'network':{'type':Sequelize['STRING']},'network_script':{'type':Sequelize['STRING']},'request':{'type':Sequelize[_0x7f5c('0x1')]},'channel':{'type':Sequelize[_0x7f5c('0x1')]},'language':{'type':Sequelize['STRING']},'type':{'type':Sequelize[_0x7f5c('0x1')]},'uniqueid':{'type':Sequelize[_0x7f5c('0x1')]},'version':{'type':Sequelize[_0x7f5c('0x1')]},'callerid':{'type':Sequelize['STRING']},'calleridname':{'type':Sequelize[_0x7f5c('0x1')]},'callingpres':{'type':Sequelize[_0x7f5c('0x1')]},'callingani2':{'type':Sequelize[_0x7f5c('0x1')]},'callington':{'type':Sequelize[_0x7f5c('0x1')]},'callingtns':{'type':Sequelize[_0x7f5c('0x1')]},'dnid':{'type':Sequelize['STRING']},'rdnis':{'type':Sequelize[_0x7f5c('0x1')]},'context':{'type':Sequelize['STRING']},'extension':{'type':Sequelize['STRING']},'priority':{'type':Sequelize[_0x7f5c('0x1')]},'enhanced':{'type':Sequelize[_0x7f5c('0x1')]},'accountcode':{'type':Sequelize[_0x7f5c('0x1')]},'threadid':{'type':Sequelize[_0x7f5c('0x1')]},'project_name':{'type':Sequelize['STRING']},'joinAt':{'type':Sequelize['DATE']},'leaveAt':{'type':Sequelize['DATE']},'bot':{'type':Sequelize[_0x7f5c('0x2')],'defaultValue':![]}}; \ No newline at end of file +var _0xc5ce=['BOOLEAN','sequelize','exports','STRING','DATE'];(function(_0x386187,_0x1ad2ac){var _0x4abeaa=function(_0x251f63){while(--_0x251f63){_0x386187['push'](_0x386187['shift']());}};_0x4abeaa(++_0x1ad2ac);}(_0xc5ce,0xce));var _0xec5c=function(_0xaa1b3e,_0x47d976){_0xaa1b3e=_0xaa1b3e-0x0;var _0x454d7d=_0xc5ce[_0xaa1b3e];return _0x454d7d;};'use strict';var Sequelize=require(_0xec5c('0x0'));module[_0xec5c('0x1')]={'network':{'type':Sequelize[_0xec5c('0x2')]},'network_script':{'type':Sequelize[_0xec5c('0x2')]},'request':{'type':Sequelize['STRING']},'channel':{'type':Sequelize[_0xec5c('0x2')]},'language':{'type':Sequelize[_0xec5c('0x2')]},'type':{'type':Sequelize[_0xec5c('0x2')]},'uniqueid':{'type':Sequelize[_0xec5c('0x2')]},'version':{'type':Sequelize[_0xec5c('0x2')]},'callerid':{'type':Sequelize[_0xec5c('0x2')]},'calleridname':{'type':Sequelize['STRING']},'callingpres':{'type':Sequelize[_0xec5c('0x2')]},'callingani2':{'type':Sequelize[_0xec5c('0x2')]},'callington':{'type':Sequelize[_0xec5c('0x2')]},'callingtns':{'type':Sequelize['STRING']},'dnid':{'type':Sequelize[_0xec5c('0x2')]},'rdnis':{'type':Sequelize[_0xec5c('0x2')]},'context':{'type':Sequelize[_0xec5c('0x2')]},'extension':{'type':Sequelize[_0xec5c('0x2')]},'priority':{'type':Sequelize[_0xec5c('0x2')]},'enhanced':{'type':Sequelize['STRING']},'accountcode':{'type':Sequelize[_0xec5c('0x2')]},'threadid':{'type':Sequelize['STRING']},'project_name':{'type':Sequelize[_0xec5c('0x2')]},'joinAt':{'type':Sequelize[_0xec5c('0x3')]},'leaveAt':{'type':Sequelize['DATE']},'bot':{'type':Sequelize[_0xec5c('0x4')],'defaultValue':![]}}; \ No newline at end of file diff --git a/server/api/squareReport/squareReport.controller.js b/server/api/squareReport/squareReport.controller.js index a1e788e..3986c88 100644 --- a/server/api/squareReport/squareReport.controller.js +++ b/server/api/squareReport/squareReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfdc0=['set','reject','update','then','destroy','sendStatus','error','name','index','map','SquareReport','rawAttributes','key','model','keys','query','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','type','filter','includeAll','catch','show','params','include','options','find','create','body','describe','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','status','end','json','offset','undefined','count','limit'];(function(_0x17406a,_0x1e2320){var _0x1501ff=function(_0x4b075a){while(--_0x4b075a){_0x17406a['push'](_0x17406a['shift']());}};_0x1501ff(++_0x1e2320);}(_0xfdc0,0x1c6));var _0x0fdc=function(_0x2595a6,_0x48fc45){_0x2595a6=_0x2595a6-0x0;var _0x460197=_0xfdc0[_0x2595a6];return _0x460197;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x0fdc('0x0'));var zipdir=require(_0x0fdc('0x1'));var jsonpatch=require(_0x0fdc('0x2'));var rp=require(_0x0fdc('0x3'));var moment=require('moment');var BPromise=require(_0x0fdc('0x4'));var Mustache=require(_0x0fdc('0x5'));var util=require(_0x0fdc('0x6'));var path=require(_0x0fdc('0x7'));var sox=require(_0x0fdc('0x8'));var csv=require(_0x0fdc('0x9'));var ejs=require(_0x0fdc('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x0fdc('0xb'));var squel=require('squel');var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x0fdc('0xc'));var toCsv=require(_0x0fdc('0x9'));var querystring=require(_0x0fdc('0xd'));var Papa=require(_0x0fdc('0xe'));var Redis=require('ioredis');var authService=require(_0x0fdc('0xf'));var qs=require('../../components/parsers/qs');var as=require(_0x0fdc('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x0fdc('0x11'))(_0x0fdc('0x12'));var utils=require('../../config/utils');var config=require(_0x0fdc('0x13'));var licenseUtil=require(_0x0fdc('0x14'));var db=require(_0x0fdc('0x15'))['db'];function respondWithStatusCode(_0x34ca66,_0x5ec7c6){_0x5ec7c6=_0x5ec7c6||0xcc;return function(_0x5ad127){if(_0x5ad127){return _0x34ca66['sendStatus'](_0x5ec7c6);}return _0x34ca66[_0x0fdc('0x16')](_0x5ec7c6)[_0x0fdc('0x17')]();};}function respondWithResult(_0x4f6c74,_0x21d755){_0x21d755=_0x21d755||0xc8;return function(_0x594e29){if(_0x594e29){return _0x4f6c74[_0x0fdc('0x16')](_0x21d755)[_0x0fdc('0x18')](_0x594e29);}};}function respondWithFilteredResult(_0x236524,_0x4b5229){return function(_0xa286f){if(_0xa286f){var _0x4b2d4a=typeof _0x4b5229[_0x0fdc('0x19')]===_0x0fdc('0x1a')&&typeof _0x4b5229['limit']===_0x0fdc('0x1a');var _0x519123=_0xa286f[_0x0fdc('0x1b')];var _0xc0dd60=_0x4b2d4a?0x0:_0x4b5229[_0x0fdc('0x19')];var _0x2b3f22=_0x4b2d4a?_0xa286f[_0x0fdc('0x1b')]:_0x4b5229[_0x0fdc('0x19')]+_0x4b5229[_0x0fdc('0x1c')];var _0xf6a25b;if(_0x2b3f22>=_0x519123){_0x2b3f22=_0x519123;_0xf6a25b=0xc8;}else{_0xf6a25b=0xce;}_0x236524['status'](_0xf6a25b);return _0x236524[_0x0fdc('0x1d')]('Content-Range',_0xc0dd60+'-'+_0x2b3f22+'/'+_0x519123)[_0x0fdc('0x18')](_0xa286f);}return null;};}function patchUpdates(_0x4dafe8){return function(_0xadfe1f){try{jsonpatch['apply'](_0xadfe1f,_0x4dafe8,!![]);}catch(_0x217cc6){return BPromise[_0x0fdc('0x1e')](_0x217cc6);}return _0xadfe1f['save']();};}function saveUpdates(_0x334150,_0x56945f){return function(_0x22a767){if(_0x22a767){return _0x22a767[_0x0fdc('0x1f')](_0x334150)[_0x0fdc('0x20')](function(_0x4283ba){return _0x4283ba;});}return null;};}function removeEntity(_0x2944a9,_0x2464a8){return function(_0x228f4f){if(_0x228f4f){return _0x228f4f[_0x0fdc('0x21')]()[_0x0fdc('0x20')](function(){_0x2944a9['status'](0xcc)[_0x0fdc('0x17')]();});}};}function handleEntityNotFound(_0x468c33,_0x5497f3){return function(_0x28fcd8){if(!_0x28fcd8){_0x468c33[_0x0fdc('0x22')](0x194);}return _0x28fcd8;};}function handleError(_0x4db3e9,_0xa720c1){_0xa720c1=_0xa720c1||0x1f4;return function(_0x263cd1){logger[_0x0fdc('0x23')](_0x263cd1['stack']);if(_0x263cd1['name']){delete _0x263cd1[_0x0fdc('0x24')];}_0x4db3e9['status'](_0xa720c1)['send'](_0x263cd1);};}exports[_0x0fdc('0x25')]=function(_0x5b838d,_0x5821bc){var _0x4d1ce6={},_0x3ecc99={},_0x4c91d2={'count':0x0,'rows':[]};var _0x4e2a81=_[_0x0fdc('0x26')](db[_0x0fdc('0x27')][_0x0fdc('0x28')],function(_0x43c264){return{'name':_0x43c264['fieldName'],'type':_0x43c264['type'][_0x0fdc('0x29')]};});_0x3ecc99[_0x0fdc('0x2a')]=_['map'](_0x4e2a81,_0x0fdc('0x24'));_0x3ecc99['query']=_[_0x0fdc('0x2b')](_0x5b838d[_0x0fdc('0x2c')]);_0x3ecc99[_0x0fdc('0x2d')]=_['intersection'](_0x3ecc99[_0x0fdc('0x2a')],_0x3ecc99['query']);_0x4d1ce6[_0x0fdc('0x2e')]=_[_0x0fdc('0x2f')](_0x3ecc99[_0x0fdc('0x2a')],qs[_0x0fdc('0x30')](_0x5b838d[_0x0fdc('0x2c')]['fields']));_0x4d1ce6[_0x0fdc('0x2e')]=_0x4d1ce6[_0x0fdc('0x2e')][_0x0fdc('0x31')]?_0x4d1ce6[_0x0fdc('0x2e')]:_0x3ecc99[_0x0fdc('0x2a')];if(!_0x5b838d[_0x0fdc('0x2c')][_0x0fdc('0x32')](_0x0fdc('0x33'))){_0x4d1ce6['limit']=qs['limit'](_0x5b838d[_0x0fdc('0x2c')][_0x0fdc('0x1c')]);_0x4d1ce6['offset']=qs[_0x0fdc('0x19')](_0x5b838d[_0x0fdc('0x2c')]['offset']);}_0x4d1ce6[_0x0fdc('0x34')]=qs[_0x0fdc('0x35')](_0x5b838d[_0x0fdc('0x2c')][_0x0fdc('0x35')]);_0x4d1ce6[_0x0fdc('0x36')]=qs[_0x0fdc('0x2d')](_[_0x0fdc('0x37')](_0x5b838d[_0x0fdc('0x2c')],_0x3ecc99[_0x0fdc('0x2d')]),_0x4e2a81);if(_0x5b838d[_0x0fdc('0x2c')]['filter']){_0x4d1ce6[_0x0fdc('0x36')]=_[_0x0fdc('0x38')](_0x4d1ce6['where'],{'$or':_[_0x0fdc('0x26')](_0x4e2a81,function(_0x153797){if(_0x153797[_0x0fdc('0x39')]!=='VIRTUAL'){var _0x106e12={};_0x106e12[_0x153797[_0x0fdc('0x24')]]={'$like':'%'+_0x5b838d['query'][_0x0fdc('0x3a')]+'%'};return _0x106e12;}})});}_0x4d1ce6=_[_0x0fdc('0x38')]({},_0x4d1ce6,_0x5b838d['options']);var _0x3d955d={'where':_0x4d1ce6[_0x0fdc('0x36')]};return db[_0x0fdc('0x27')][_0x0fdc('0x1b')](_0x3d955d)[_0x0fdc('0x20')](function(_0x3e7548){_0x4c91d2[_0x0fdc('0x1b')]=_0x3e7548;if(_0x5b838d[_0x0fdc('0x2c')][_0x0fdc('0x3b')]){_0x4d1ce6['include']=[{'all':!![]}];}return db[_0x0fdc('0x27')]['findAll'](_0x4d1ce6);})[_0x0fdc('0x20')](function(_0x3c3c2b){_0x4c91d2['rows']=_0x3c3c2b;return _0x4c91d2;})[_0x0fdc('0x20')](respondWithFilteredResult(_0x5821bc,_0x4d1ce6))[_0x0fdc('0x3c')](handleError(_0x5821bc,null));};exports[_0x0fdc('0x3d')]=function(_0x533467,_0x49e341){var _0x2b5ab5={'raw':!![],'where':{'id':_0x533467[_0x0fdc('0x3e')]['id']}},_0x11d610={};_0x11d610[_0x0fdc('0x2a')]=_['keys'](db[_0x0fdc('0x27')]['rawAttributes']);_0x11d610[_0x0fdc('0x2c')]=_[_0x0fdc('0x2b')](_0x533467[_0x0fdc('0x2c')]);_0x11d610[_0x0fdc('0x2d')]=_[_0x0fdc('0x2f')](_0x11d610['model'],_0x11d610[_0x0fdc('0x2c')]);_0x2b5ab5['attributes']=_['intersection'](_0x11d610[_0x0fdc('0x2a')],qs[_0x0fdc('0x30')](_0x533467[_0x0fdc('0x2c')][_0x0fdc('0x30')]));_0x2b5ab5['attributes']=_0x2b5ab5[_0x0fdc('0x2e')][_0x0fdc('0x31')]?_0x2b5ab5['attributes']:_0x11d610['model'];if(_0x533467['query'][_0x0fdc('0x3b')]){_0x2b5ab5[_0x0fdc('0x3f')]=[{'all':!![]}];}_0x2b5ab5=_[_0x0fdc('0x38')]({},_0x2b5ab5,_0x533467[_0x0fdc('0x40')]);return db[_0x0fdc('0x27')][_0x0fdc('0x41')](_0x2b5ab5)[_0x0fdc('0x20')](handleEntityNotFound(_0x49e341,null))[_0x0fdc('0x20')](respondWithResult(_0x49e341,null))[_0x0fdc('0x3c')](handleError(_0x49e341,null));};exports['create']=function(_0x3dbc8a,_0xef3be3){return db[_0x0fdc('0x27')][_0x0fdc('0x42')](_0x3dbc8a[_0x0fdc('0x43')],{})[_0x0fdc('0x20')](respondWithResult(_0xef3be3,0xc9))[_0x0fdc('0x3c')](handleError(_0xef3be3,null));};exports['update']=function(_0x377630,_0x352df7){if(_0x377630['body']['id']){delete _0x377630[_0x0fdc('0x43')]['id'];}return db[_0x0fdc('0x27')][_0x0fdc('0x41')]({'where':{'id':_0x377630[_0x0fdc('0x3e')]['id']}})[_0x0fdc('0x20')](handleEntityNotFound(_0x352df7,null))[_0x0fdc('0x20')](saveUpdates(_0x377630[_0x0fdc('0x43')],null))['then'](respondWithResult(_0x352df7,null))[_0x0fdc('0x3c')](handleError(_0x352df7,null));};exports[_0x0fdc('0x21')]=function(_0xe6d61c,_0x1a255a){return db[_0x0fdc('0x27')][_0x0fdc('0x41')]({'where':{'id':_0xe6d61c[_0x0fdc('0x3e')]['id']}})['then'](handleEntityNotFound(_0x1a255a,null))[_0x0fdc('0x20')](removeEntity(_0x1a255a,null))[_0x0fdc('0x3c')](handleError(_0x1a255a,null));};exports['describe']=function(_0x4025b0,_0x1f7c1b){return db['SquareReport'][_0x0fdc('0x44')]()[_0x0fdc('0x20')](respondWithResult(_0x1f7c1b,null))[_0x0fdc('0x3c')](handleError(_0x1f7c1b,null));}; \ No newline at end of file +var _0xd5be=['nolimit','order','sort','where','merge','options','includeAll','include','findAll','catch','show','params','rawAttributes','find','create','body','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','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/utils','../../config/environment','../../config/license/util','sendStatus','status','json','offset','limit','undefined','count','set','Content-Range','reject','save','update','then','destroy','end','error','stack','name','index','SquareReport','type','key','model','map','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty'];(function(_0xdea41a,_0x552987){var _0x15d0d8=function(_0x1e0d0b){while(--_0x1e0d0b){_0xdea41a['push'](_0xdea41a['shift']());}};_0x15d0d8(++_0x552987);}(_0xd5be,0x192));var _0xed5b=function(_0x1c46c5,_0x41bc70){_0x1c46c5=_0x1c46c5-0x0;var _0x4e403c=_0xd5be[_0x1c46c5];return _0x4e403c;};'use strict';var emlformat=require(_0xed5b('0x0'));var rimraf=require(_0xed5b('0x1'));var zipdir=require(_0xed5b('0x2'));var jsonpatch=require(_0xed5b('0x3'));var rp=require(_0xed5b('0x4'));var moment=require(_0xed5b('0x5'));var BPromise=require(_0xed5b('0x6'));var Mustache=require(_0xed5b('0x7'));var util=require(_0xed5b('0x8'));var path=require(_0xed5b('0x9'));var sox=require('sox');var csv=require(_0xed5b('0xa'));var ejs=require(_0xed5b('0xb'));var fs=require('fs');var fs_extra=require(_0xed5b('0xc'));var _=require(_0xed5b('0xd'));var squel=require(_0xed5b('0xe'));var crypto=require(_0xed5b('0xf'));var jsforce=require(_0xed5b('0x10'));var deskjs=require(_0xed5b('0x11'));var toCsv=require(_0xed5b('0xa'));var querystring=require(_0xed5b('0x12'));var Papa=require(_0xed5b('0x13'));var Redis=require(_0xed5b('0x14'));var authService=require(_0xed5b('0x15'));var qs=require(_0xed5b('0x16'));var as=require(_0xed5b('0x17'));var hardwareService=require(_0xed5b('0x18'));var logger=require('../../config/logger')('api');var utils=require(_0xed5b('0x19'));var config=require(_0xed5b('0x1a'));var licenseUtil=require(_0xed5b('0x1b'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x30cc68,_0x117d39){_0x117d39=_0x117d39||0xcc;return function(_0xb41715){if(_0xb41715){return _0x30cc68[_0xed5b('0x1c')](_0x117d39);}return _0x30cc68['status'](_0x117d39)['end']();};}function respondWithResult(_0x4ca484,_0xfac40e){_0xfac40e=_0xfac40e||0xc8;return function(_0x14ffd5){if(_0x14ffd5){return _0x4ca484[_0xed5b('0x1d')](_0xfac40e)[_0xed5b('0x1e')](_0x14ffd5);}};}function respondWithFilteredResult(_0x131ec8,_0x30d825){return function(_0x6897c0){if(_0x6897c0){var _0x5deeda=typeof _0x30d825[_0xed5b('0x1f')]==='undefined'&&typeof _0x30d825[_0xed5b('0x20')]===_0xed5b('0x21');var _0x1529b4=_0x6897c0[_0xed5b('0x22')];var _0xc77e58=_0x5deeda?0x0:_0x30d825[_0xed5b('0x1f')];var _0x781bc1=_0x5deeda?_0x6897c0[_0xed5b('0x22')]:_0x30d825[_0xed5b('0x1f')]+_0x30d825[_0xed5b('0x20')];var _0x1a2de6;if(_0x781bc1>=_0x1529b4){_0x781bc1=_0x1529b4;_0x1a2de6=0xc8;}else{_0x1a2de6=0xce;}_0x131ec8[_0xed5b('0x1d')](_0x1a2de6);return _0x131ec8[_0xed5b('0x23')](_0xed5b('0x24'),_0xc77e58+'-'+_0x781bc1+'/'+_0x1529b4)[_0xed5b('0x1e')](_0x6897c0);}return null;};}function patchUpdates(_0x11f1fd){return function(_0x4e1715){try{jsonpatch['apply'](_0x4e1715,_0x11f1fd,!![]);}catch(_0x2c824c){return BPromise[_0xed5b('0x25')](_0x2c824c);}return _0x4e1715[_0xed5b('0x26')]();};}function saveUpdates(_0x43b207,_0x3dcb66){return function(_0x440b55){if(_0x440b55){return _0x440b55[_0xed5b('0x27')](_0x43b207)[_0xed5b('0x28')](function(_0x2bfa67){return _0x2bfa67;});}return null;};}function removeEntity(_0x53496a,_0x1fc236){return function(_0x21d175){if(_0x21d175){return _0x21d175[_0xed5b('0x29')]()[_0xed5b('0x28')](function(){_0x53496a[_0xed5b('0x1d')](0xcc)[_0xed5b('0x2a')]();});}};}function handleEntityNotFound(_0xdf6409,_0x4e56ce){return function(_0x3817b9){if(!_0x3817b9){_0xdf6409[_0xed5b('0x1c')](0x194);}return _0x3817b9;};}function handleError(_0x51478d,_0x38d159){_0x38d159=_0x38d159||0x1f4;return function(_0x4ca7fd){logger[_0xed5b('0x2b')](_0x4ca7fd[_0xed5b('0x2c')]);if(_0x4ca7fd[_0xed5b('0x2d')]){delete _0x4ca7fd[_0xed5b('0x2d')];}_0x51478d[_0xed5b('0x1d')](_0x38d159)['send'](_0x4ca7fd);};}exports[_0xed5b('0x2e')]=function(_0x417310,_0x1400d0){var _0x21ebbb={},_0x216bbb={},_0x4d6324={'count':0x0,'rows':[]};var _0x21a24e=_['map'](db[_0xed5b('0x2f')]['rawAttributes'],function(_0x5d028e){return{'name':_0x5d028e['fieldName'],'type':_0x5d028e[_0xed5b('0x30')][_0xed5b('0x31')]};});_0x216bbb[_0xed5b('0x32')]=_[_0xed5b('0x33')](_0x21a24e,_0xed5b('0x2d'));_0x216bbb[_0xed5b('0x34')]=_[_0xed5b('0x35')](_0x417310['query']);_0x216bbb[_0xed5b('0x36')]=_[_0xed5b('0x37')](_0x216bbb['model'],_0x216bbb[_0xed5b('0x34')]);_0x21ebbb[_0xed5b('0x38')]=_[_0xed5b('0x37')](_0x216bbb[_0xed5b('0x32')],qs[_0xed5b('0x39')](_0x417310['query'][_0xed5b('0x39')]));_0x21ebbb[_0xed5b('0x38')]=_0x21ebbb[_0xed5b('0x38')][_0xed5b('0x3a')]?_0x21ebbb[_0xed5b('0x38')]:_0x216bbb[_0xed5b('0x32')];if(!_0x417310[_0xed5b('0x34')][_0xed5b('0x3b')](_0xed5b('0x3c'))){_0x21ebbb[_0xed5b('0x20')]=qs[_0xed5b('0x20')](_0x417310['query'][_0xed5b('0x20')]);_0x21ebbb['offset']=qs[_0xed5b('0x1f')](_0x417310[_0xed5b('0x34')]['offset']);}_0x21ebbb[_0xed5b('0x3d')]=qs['sort'](_0x417310['query'][_0xed5b('0x3e')]);_0x21ebbb[_0xed5b('0x3f')]=qs[_0xed5b('0x36')](_['pick'](_0x417310[_0xed5b('0x34')],_0x216bbb[_0xed5b('0x36')]),_0x21a24e);if(_0x417310['query']['filter']){_0x21ebbb[_0xed5b('0x3f')]=_[_0xed5b('0x40')](_0x21ebbb[_0xed5b('0x3f')],{'$or':_[_0xed5b('0x33')](_0x21a24e,function(_0x391c2e){if(_0x391c2e['type']!=='VIRTUAL'){var _0xd75495={};_0xd75495[_0x391c2e[_0xed5b('0x2d')]]={'$like':'%'+_0x417310[_0xed5b('0x34')]['filter']+'%'};return _0xd75495;}})});}_0x21ebbb=_[_0xed5b('0x40')]({},_0x21ebbb,_0x417310[_0xed5b('0x41')]);var _0x26a917={'where':_0x21ebbb[_0xed5b('0x3f')]};return db['SquareReport'][_0xed5b('0x22')](_0x26a917)[_0xed5b('0x28')](function(_0x1fe37d){_0x4d6324[_0xed5b('0x22')]=_0x1fe37d;if(_0x417310[_0xed5b('0x34')][_0xed5b('0x42')]){_0x21ebbb[_0xed5b('0x43')]=[{'all':!![]}];}return db[_0xed5b('0x2f')][_0xed5b('0x44')](_0x21ebbb);})[_0xed5b('0x28')](function(_0x27ec6b){_0x4d6324['rows']=_0x27ec6b;return _0x4d6324;})[_0xed5b('0x28')](respondWithFilteredResult(_0x1400d0,_0x21ebbb))[_0xed5b('0x45')](handleError(_0x1400d0,null));};exports[_0xed5b('0x46')]=function(_0x12137e,_0xafea94){var _0x4c2b0b={'raw':!![],'where':{'id':_0x12137e[_0xed5b('0x47')]['id']}},_0x227bf2={};_0x227bf2[_0xed5b('0x32')]=_[_0xed5b('0x35')](db['SquareReport'][_0xed5b('0x48')]);_0x227bf2[_0xed5b('0x34')]=_[_0xed5b('0x35')](_0x12137e[_0xed5b('0x34')]);_0x227bf2[_0xed5b('0x36')]=_[_0xed5b('0x37')](_0x227bf2[_0xed5b('0x32')],_0x227bf2[_0xed5b('0x34')]);_0x4c2b0b[_0xed5b('0x38')]=_['intersection'](_0x227bf2[_0xed5b('0x32')],qs['fields'](_0x12137e[_0xed5b('0x34')][_0xed5b('0x39')]));_0x4c2b0b[_0xed5b('0x38')]=_0x4c2b0b[_0xed5b('0x38')][_0xed5b('0x3a')]?_0x4c2b0b[_0xed5b('0x38')]:_0x227bf2[_0xed5b('0x32')];if(_0x12137e[_0xed5b('0x34')]['includeAll']){_0x4c2b0b[_0xed5b('0x43')]=[{'all':!![]}];}_0x4c2b0b=_[_0xed5b('0x40')]({},_0x4c2b0b,_0x12137e[_0xed5b('0x41')]);return db[_0xed5b('0x2f')][_0xed5b('0x49')](_0x4c2b0b)['then'](handleEntityNotFound(_0xafea94,null))[_0xed5b('0x28')](respondWithResult(_0xafea94,null))[_0xed5b('0x45')](handleError(_0xafea94,null));};exports[_0xed5b('0x4a')]=function(_0x48dbd1,_0x30b54a){return db[_0xed5b('0x2f')][_0xed5b('0x4a')](_0x48dbd1[_0xed5b('0x4b')],{})[_0xed5b('0x28')](respondWithResult(_0x30b54a,0xc9))['catch'](handleError(_0x30b54a,null));};exports[_0xed5b('0x27')]=function(_0x19cd46,_0x51e6cb){if(_0x19cd46[_0xed5b('0x4b')]['id']){delete _0x19cd46[_0xed5b('0x4b')]['id'];}return db['SquareReport']['find']({'where':{'id':_0x19cd46[_0xed5b('0x47')]['id']}})['then'](handleEntityNotFound(_0x51e6cb,null))[_0xed5b('0x28')](saveUpdates(_0x19cd46[_0xed5b('0x4b')],null))[_0xed5b('0x28')](respondWithResult(_0x51e6cb,null))[_0xed5b('0x45')](handleError(_0x51e6cb,null));};exports[_0xed5b('0x29')]=function(_0x16c8c2,_0x1a8356){return db['SquareReport'][_0xed5b('0x49')]({'where':{'id':_0x16c8c2[_0xed5b('0x47')]['id']}})[_0xed5b('0x28')](handleEntityNotFound(_0x1a8356,null))[_0xed5b('0x28')](removeEntity(_0x1a8356,null))['catch'](handleError(_0x1a8356,null));};exports[_0xed5b('0x4c')]=function(_0xcfef8a,_0x47c9cf){return db[_0xed5b('0x2f')][_0xed5b('0x4c')]()['then'](respondWithResult(_0x47c9cf,null))[_0xed5b('0x45')](handleError(_0x47c9cf,null));}; \ No newline at end of file diff --git a/server/api/squareReport/squareReport.model.js b/server/api/squareReport/squareReport.model.js index f973302..d0d1ee0 100644 --- a/server/api/squareReport/squareReport.model.js +++ b/server/api/squareReport/squareReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd4a5=['project_name','leaveAt','lodash','util','../../config/logger','moment','bluebird','request-promise','../../config/environment','exports','define','SquareReport','report_square','uid_pname','uniqueid'];(function(_0x2a7b27,_0x251968){var _0x5c7ff1=function(_0x2fc353){while(--_0x2fc353){_0x2a7b27['push'](_0x2a7b27['shift']());}};_0x5c7ff1(++_0x251968);}(_0xd4a5,0xd4));var _0x5d4a=function(_0x2e25a0,_0x5650eb){_0x2e25a0=_0x2e25a0-0x0;var _0x59f113=_0xd4a5[_0x2e25a0];return _0x59f113;};'use strict';var _=require(_0x5d4a('0x0'));var util=require(_0x5d4a('0x1'));var logger=require(_0x5d4a('0x2'))('api');var moment=require(_0x5d4a('0x3'));var BPromise=require(_0x5d4a('0x4'));var rp=require(_0x5d4a('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x5d4a('0x6'));var attributes=require('./squareReport.attributes');module[_0x5d4a('0x7')]=function(_0x7b9454,_0x3cb795){return _0x7b9454[_0x5d4a('0x8')](_0x5d4a('0x9'),attributes,{'tableName':_0x5d4a('0xa'),'paranoid':![],'indexes':[{'name':_0x5d4a('0xb'),'fields':[_0x5d4a('0xc'),_0x5d4a('0xd')]},{'name':_0x5d4a('0xe'),'fields':[_0x5d4a('0xe')]}],'timestamps':!![]});}; \ No newline at end of file +var _0xa74e=['api','moment','path','rimraf','../../config/environment','./squareReport.attributes','exports','define','report_square','uniqueid','project_name','leaveAt','lodash','util'];(function(_0x3b5b2a,_0x7c23a8){var _0x4ed498=function(_0x1b98eb){while(--_0x1b98eb){_0x3b5b2a['push'](_0x3b5b2a['shift']());}};_0x4ed498(++_0x7c23a8);}(_0xa74e,0x1a2));var _0xea74=function(_0x369ab1,_0x196273){_0x369ab1=_0x369ab1-0x0;var _0x54149f=_0xa74e[_0x369ab1];return _0x54149f;};'use strict';var _=require(_0xea74('0x0'));var util=require(_0xea74('0x1'));var logger=require('../../config/logger')(_0xea74('0x2'));var moment=require(_0xea74('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xea74('0x4'));var rimraf=require(_0xea74('0x5'));var config=require(_0xea74('0x6'));var attributes=require(_0xea74('0x7'));module[_0xea74('0x8')]=function(_0x684ea,_0x36f6e2){return _0x684ea[_0xea74('0x9')]('SquareReport',attributes,{'tableName':_0xea74('0xa'),'paranoid':![],'indexes':[{'name':'uid_pname','fields':[_0xea74('0xb'),_0xea74('0xc')]},{'name':_0xea74('0xd'),'fields':[_0xea74('0xd')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/squareReport/squareReport.rpc.js b/server/api/squareReport/squareReport.rpc.js index 0d840ef..9f046ec 100644 --- a/server/api/squareReport/squareReport.rpc.js +++ b/server/api/squareReport/squareReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xea0d=['code','message','catch','CreateSquareReport','SquareReport','options','raw','UpdateSquareReport','body','where','util','moment','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','SquareReport,\x20%s,\x20%s','request\x20sent','debug','SquareReport,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x2dafbe,_0x5d04de){var _0x58a45a=function(_0x50ac96){while(--_0x50ac96){_0x2dafbe['push'](_0x2dafbe['shift']());}};_0x58a45a(++_0x5d04de);}(_0xea0d,0x1ae));var _0xdea0=function(_0x2b93a5,_0x31934c){_0x2b93a5=_0x2b93a5-0x0;var _0x4111dc=_0xea0d[_0x2b93a5];return _0x4111dc;};'use strict';var _=require('lodash');var util=require(_0xdea0('0x0'));var moment=require(_0xdea0('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xdea0('0x2'))['db'];var utils=require(_0xdea0('0x3'));var logger=require(_0xdea0('0x4'))('rpc');var config=require(_0xdea0('0x5'));var jayson=require(_0xdea0('0x6'));var client=jayson[_0xdea0('0x7')][_0xdea0('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x24d6aa,_0x357230,_0x193258){return new BPromise(function(_0x544e9e,_0x4ed4b3){return client[_0xdea0('0x9')](_0x24d6aa,_0x193258)[_0xdea0('0xa')](function(_0x1b816c){logger[_0xdea0('0xb')](_0xdea0('0xc'),_0x357230,_0xdea0('0xd'));logger[_0xdea0('0xe')](_0xdea0('0xf'),_0x357230,_0xdea0('0xd'),JSON[_0xdea0('0x10')](_0x1b816c));if(_0x1b816c[_0xdea0('0x11')]){if(_0x1b816c[_0xdea0('0x11')][_0xdea0('0x12')]===0x1f4){logger[_0xdea0('0x11')](_0xdea0('0xc'),_0x357230,_0x1b816c[_0xdea0('0x11')]['message']);return _0x4ed4b3(_0x1b816c[_0xdea0('0x11')][_0xdea0('0x13')]);}logger[_0xdea0('0x11')]('SquareReport,\x20%s,\x20%s',_0x357230,_0x1b816c['error'][_0xdea0('0x13')]);return _0x544e9e(_0x1b816c[_0xdea0('0x11')]['message']);}else{logger[_0xdea0('0xb')](_0xdea0('0xc'),_0x357230,_0xdea0('0xd'));_0x544e9e(_0x1b816c['result'][_0xdea0('0x13')]);}})[_0xdea0('0x14')](function(_0xd77e39){logger['error'](_0xdea0('0xc'),_0x357230,_0xd77e39);_0x4ed4b3(_0xd77e39);});});}exports[_0xdea0('0x15')]=function(_0x4e5f59){var _0x8d854f=this;return new Promise(function(_0x3f8183,_0x25cac9){return db[_0xdea0('0x16')]['create'](_0x4e5f59['body'],{'raw':_0x4e5f59[_0xdea0('0x17')]?_0x4e5f59[_0xdea0('0x17')][_0xdea0('0x18')]===undefined?!![]:![]:!![]})[_0xdea0('0xa')](function(_0x25290f){logger['info'](_0xdea0('0x15'),_0x4e5f59);logger[_0xdea0('0xe')]('CreateSquareReport',_0x4e5f59,JSON[_0xdea0('0x10')](_0x25290f));_0x3f8183(_0x25290f);})['catch'](function(_0x304369){logger['error'](_0xdea0('0x15'),_0x304369[_0xdea0('0x13')],_0x4e5f59);_0x25cac9(_0x8d854f[_0xdea0('0x11')](0x1f4,_0x304369['message']));});});};exports[_0xdea0('0x19')]=function(_0x1958b7){var _0x1c355e=this;return new Promise(function(_0xf5f297,_0x4f6907){return db[_0xdea0('0x16')]['update'](_0x1958b7[_0xdea0('0x1a')],{'raw':_0x1958b7[_0xdea0('0x17')]?_0x1958b7[_0xdea0('0x17')][_0xdea0('0x18')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1958b7[_0xdea0('0x17')]?_0x1958b7['options'][_0xdea0('0x1b')]||null:null,'attributes':_0x1958b7[_0xdea0('0x17')]?_0x1958b7[_0xdea0('0x17')]['attributes']||null:null,'limit':_0x1958b7['options']?_0x1958b7[_0xdea0('0x17')]['limit']||null:null})['then'](function(_0x4eb679){logger[_0xdea0('0xb')]('UpdateSquareReport',_0x1958b7);logger[_0xdea0('0xe')](_0xdea0('0x19'),_0x1958b7,JSON[_0xdea0('0x10')](_0x4eb679));_0xf5f297(_0x4eb679);})['catch'](function(_0x358541){logger[_0xdea0('0x11')]('UpdateSquareReport',_0x358541[_0xdea0('0x13')],_0x1958b7);_0x4f6907(_0x1c355e[_0xdea0('0x11')](0x1f4,_0x358541[_0xdea0('0x13')]));});});}; \ No newline at end of file +var _0xe239=['code','message','result','catch','SquareReport','create','options','debug','CreateSquareReport','UpdateSquareReport','raw','where','attributes','limit','lodash','util','moment','bluebird','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','http','request','then','info','SquareReport,\x20%s,\x20%s','request\x20sent','stringify','error'];(function(_0x10fcbd,_0x491cb5){var _0x32a970=function(_0x14ad89){while(--_0x14ad89){_0x10fcbd['push'](_0x10fcbd['shift']());}};_0x32a970(++_0x491cb5);}(_0xe239,0xe7));var _0x9e23=function(_0x171086,_0x381396){_0x171086=_0x171086-0x0;var _0x5e844f=_0xe239[_0x171086];return _0x5e844f;};'use strict';var _=require(_0x9e23('0x0'));var util=require(_0x9e23('0x1'));var moment=require(_0x9e23('0x2'));var BPromise=require(_0x9e23('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x9e23('0x4'))['db'];var utils=require(_0x9e23('0x5'));var logger=require('../../config/logger')(_0x9e23('0x6'));var config=require(_0x9e23('0x7'));var jayson=require(_0x9e23('0x8'));var client=jayson['client'][_0x9e23('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x1820f8,_0x59721e,_0x426f52){return new BPromise(function(_0x49395e,_0x5ccbe5){return client[_0x9e23('0xa')](_0x1820f8,_0x426f52)[_0x9e23('0xb')](function(_0x34bc65){logger[_0x9e23('0xc')](_0x9e23('0xd'),_0x59721e,_0x9e23('0xe'));logger['debug']('SquareReport,\x20%s,\x20%s,\x20%s',_0x59721e,_0x9e23('0xe'),JSON[_0x9e23('0xf')](_0x34bc65));if(_0x34bc65[_0x9e23('0x10')]){if(_0x34bc65['error'][_0x9e23('0x11')]===0x1f4){logger['error']('SquareReport,\x20%s,\x20%s',_0x59721e,_0x34bc65[_0x9e23('0x10')][_0x9e23('0x12')]);return _0x5ccbe5(_0x34bc65[_0x9e23('0x10')][_0x9e23('0x12')]);}logger[_0x9e23('0x10')](_0x9e23('0xd'),_0x59721e,_0x34bc65[_0x9e23('0x10')][_0x9e23('0x12')]);return _0x49395e(_0x34bc65[_0x9e23('0x10')][_0x9e23('0x12')]);}else{logger['info'](_0x9e23('0xd'),_0x59721e,_0x9e23('0xe'));_0x49395e(_0x34bc65[_0x9e23('0x13')][_0x9e23('0x12')]);}})[_0x9e23('0x14')](function(_0x3cedd7){logger[_0x9e23('0x10')]('SquareReport,\x20%s,\x20%s',_0x59721e,_0x3cedd7);_0x5ccbe5(_0x3cedd7);});});}exports['CreateSquareReport']=function(_0x49285e){var _0x51b94c=this;return new Promise(function(_0x3a8a9c,_0x4f9266){return db[_0x9e23('0x15')][_0x9e23('0x16')](_0x49285e['body'],{'raw':_0x49285e['options']?_0x49285e[_0x9e23('0x17')]['raw']===undefined?!![]:![]:!![]})[_0x9e23('0xb')](function(_0x5a9d39){logger[_0x9e23('0xc')]('CreateSquareReport',_0x49285e);logger[_0x9e23('0x18')](_0x9e23('0x19'),_0x49285e,JSON['stringify'](_0x5a9d39));_0x3a8a9c(_0x5a9d39);})[_0x9e23('0x14')](function(_0x3a1c19){logger[_0x9e23('0x10')](_0x9e23('0x19'),_0x3a1c19[_0x9e23('0x12')],_0x49285e);_0x4f9266(_0x51b94c[_0x9e23('0x10')](0x1f4,_0x3a1c19[_0x9e23('0x12')]));});});};exports[_0x9e23('0x1a')]=function(_0x532653){var _0x7ea7a=this;return new Promise(function(_0x453db3,_0x579759){return db[_0x9e23('0x15')]['update'](_0x532653['body'],{'raw':_0x532653[_0x9e23('0x17')]?_0x532653[_0x9e23('0x17')][_0x9e23('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x532653[_0x9e23('0x17')]?_0x532653['options'][_0x9e23('0x1c')]||null:null,'attributes':_0x532653[_0x9e23('0x17')]?_0x532653['options'][_0x9e23('0x1d')]||null:null,'limit':_0x532653[_0x9e23('0x17')]?_0x532653[_0x9e23('0x17')][_0x9e23('0x1e')]||null:null})[_0x9e23('0xb')](function(_0x4079db){logger[_0x9e23('0xc')](_0x9e23('0x1a'),_0x532653);logger[_0x9e23('0x18')](_0x9e23('0x1a'),_0x532653,JSON[_0x9e23('0xf')](_0x4079db));_0x453db3(_0x4079db);})['catch'](function(_0x580370){logger[_0x9e23('0x10')](_0x9e23('0x1a'),_0x580370[_0x9e23('0x12')],_0x532653);_0x579759(_0x7ea7a[_0x9e23('0x10')](0x1f4,_0x580370[_0x9e23('0x12')]));});});}; \ No newline at end of file diff --git a/server/api/squareReportDetail/index.js b/server/api/squareReportDetail/index.js index 9fe2328..019d0dc 100644 --- a/server/api/squareReportDetail/index.js +++ b/server/api/squareReportDetail/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x67b0=['post','create','put','delete','destroy','exports','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./squareReportDetail.controller','get','isAuthenticated','index','/describe','describe','/:id','show'];(function(_0x2af37c,_0x2872af){var _0x406df2=function(_0x31be93){while(--_0x31be93){_0x2af37c['push'](_0x2af37c['shift']());}};_0x406df2(++_0x2872af);}(_0x67b0,0x103));var _0x067b=function(_0x5bc363,_0x258c07){_0x5bc363=_0x5bc363-0x0;var _0x27bfe6=_0x67b0[_0x5bc363];return _0x27bfe6;};'use strict';var multer=require(_0x067b('0x0'));var util=require(_0x067b('0x1'));var path=require(_0x067b('0x2'));var timeout=require(_0x067b('0x3'));var express=require(_0x067b('0x4'));var router=express['Router']();var fs_extra=require(_0x067b('0x5'));var auth=require(_0x067b('0x6'));var interaction=require(_0x067b('0x7'));var config=require(_0x067b('0x8'));var controller=require(_0x067b('0x9'));router[_0x067b('0xa')]('/',auth[_0x067b('0xb')](),controller[_0x067b('0xc')]);router[_0x067b('0xa')](_0x067b('0xd'),auth[_0x067b('0xb')](),controller[_0x067b('0xe')]);router[_0x067b('0xa')](_0x067b('0xf'),auth['isAuthenticated'](),controller[_0x067b('0x10')]);router[_0x067b('0x11')]('/',auth[_0x067b('0xb')](),controller[_0x067b('0x12')]);router[_0x067b('0x13')](_0x067b('0xf'),auth[_0x067b('0xb')](),controller['update']);router[_0x067b('0x14')](_0x067b('0xf'),auth[_0x067b('0xb')](),controller[_0x067b('0x15')]);module[_0x067b('0x16')]=router; \ No newline at end of file +var _0xab76=['isAuthenticated','index','/describe','describe','/:id','show','post','create','update','delete','destroy','exports','util','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./squareReportDetail.controller','get'];(function(_0x3721fa,_0x2ffb76){var _0x97184=function(_0x112c25){while(--_0x112c25){_0x3721fa['push'](_0x3721fa['shift']());}};_0x97184(++_0x2ffb76);}(_0xab76,0x14c));var _0x6ab7=function(_0x18ab2a,_0x4debcd){_0x18ab2a=_0x18ab2a-0x0;var _0x16dcee=_0xab76[_0x18ab2a];return _0x16dcee;};'use strict';var multer=require('multer');var util=require(_0x6ab7('0x0'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x6ab7('0x1'));var router=express['Router']();var fs_extra=require(_0x6ab7('0x2'));var auth=require(_0x6ab7('0x3'));var interaction=require(_0x6ab7('0x4'));var config=require(_0x6ab7('0x5'));var controller=require(_0x6ab7('0x6'));router[_0x6ab7('0x7')]('/',auth[_0x6ab7('0x8')](),controller[_0x6ab7('0x9')]);router['get'](_0x6ab7('0xa'),auth['isAuthenticated'](),controller[_0x6ab7('0xb')]);router[_0x6ab7('0x7')](_0x6ab7('0xc'),auth[_0x6ab7('0x8')](),controller[_0x6ab7('0xd')]);router[_0x6ab7('0xe')]('/',auth[_0x6ab7('0x8')](),controller[_0x6ab7('0xf')]);router['put'](_0x6ab7('0xc'),auth['isAuthenticated'](),controller[_0x6ab7('0x10')]);router[_0x6ab7('0x11')]('/:id',auth[_0x6ab7('0x8')](),controller[_0x6ab7('0x12')]);module[_0x6ab7('0x13')]=router; \ No newline at end of file diff --git a/server/api/squareReportDetail/squareReportDetail.attributes.js b/server/api/squareReportDetail/squareReportDetail.attributes.js index 09c1c59..912a295 100644 --- a/server/api/squareReportDetail/squareReportDetail.attributes.js +++ b/server/api/squareReportDetail/squareReportDetail.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb60e=['sequelize','exports','STRING','TEXT'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xb60e,0x118));var _0xeb60=function(_0x5c16e1,_0x12ea72){_0x5c16e1=_0x5c16e1-0x0;var _0x4f59d0=_0xb60e[_0x5c16e1];return _0x4f59d0;};'use strict';var Sequelize=require(_0xeb60('0x0'));module[_0xeb60('0x1')]={'uniqueid':{'type':Sequelize['STRING']},'node':{'type':Sequelize[_0xeb60('0x2')]},'application':{'type':Sequelize[_0xeb60('0x2')]},'data':{'type':Sequelize[_0xeb60('0x3')]},'project_name':{'type':Sequelize[_0xeb60('0x2')]},'callerid':{'type':Sequelize[_0xeb60('0x2')]}}; \ No newline at end of file +var _0xec15=['STRING','sequelize'];(function(_0x127a60,_0x37f33a){var _0xc1f6a3=function(_0x8ed035){while(--_0x8ed035){_0x127a60['push'](_0x127a60['shift']());}};_0xc1f6a3(++_0x37f33a);}(_0xec15,0x10b));var _0x5ec1=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xec15[_0x321bb2];return _0x9c12ed;};'use strict';var Sequelize=require(_0x5ec1('0x0'));module['exports']={'uniqueid':{'type':Sequelize[_0x5ec1('0x1')]},'node':{'type':Sequelize['STRING']},'application':{'type':Sequelize[_0x5ec1('0x1')]},'data':{'type':Sequelize['TEXT']},'project_name':{'type':Sequelize['STRING']},'callerid':{'type':Sequelize[_0x5ec1('0x1')]}}; \ No newline at end of file diff --git a/server/api/squareReportDetail/squareReportDetail.controller.js b/server/api/squareReportDetail/squareReportDetail.controller.js index 467aac4..98aa7cc 100644 --- a/server/api/squareReportDetail/squareReportDetail.controller.js +++ b/server/api/squareReportDetail/squareReportDetail.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x29b2=['apply','reject','save','update','then','destroy','end','sendStatus','error','name','index','SquareDetailsReport','rawAttributes','type','key','model','keys','filters','intersection','query','attributes','length','hasOwnProperty','nolimit','sort','where','filter','merge','map','VIRTUAL','options','catch','show','params','fields','includeAll','include','find','create','body','describe','eml-format','zip-dir','fast-json-patch','request-promise','util','path','sox','to-csv','ejs','fs-extra','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/environment','../../config/license/util','../../mysqldb','status','json','offset','limit','undefined','count','set','Content-Range'];(function(_0x38a7ac,_0x45514b){var _0x53061a=function(_0x1d2469){while(--_0x1d2469){_0x38a7ac['push'](_0x38a7ac['shift']());}};_0x53061a(++_0x45514b);}(_0x29b2,0x104));var _0x229b=function(_0x493137,_0x204ef6){_0x493137=_0x493137-0x0;var _0x45d9eb=_0x29b2[_0x493137];return _0x45d9eb;};'use strict';var emlformat=require(_0x229b('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x229b('0x1'));var jsonpatch=require(_0x229b('0x2'));var rp=require(_0x229b('0x3'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x229b('0x4'));var path=require(_0x229b('0x5'));var sox=require(_0x229b('0x6'));var csv=require(_0x229b('0x7'));var ejs=require(_0x229b('0x8'));var fs=require('fs');var fs_extra=require(_0x229b('0x9'));var _=require('lodash');var squel=require(_0x229b('0xa'));var crypto=require(_0x229b('0xb'));var jsforce=require(_0x229b('0xc'));var deskjs=require(_0x229b('0xd'));var toCsv=require(_0x229b('0x7'));var querystring=require(_0x229b('0xe'));var Papa=require(_0x229b('0xf'));var Redis=require(_0x229b('0x10'));var authService=require(_0x229b('0x11'));var qs=require(_0x229b('0x12'));var as=require(_0x229b('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x229b('0x14'));var utils=require('../../config/utils');var config=require(_0x229b('0x15'));var licenseUtil=require(_0x229b('0x16'));var db=require(_0x229b('0x17'))['db'];function respondWithStatusCode(_0x1082b7,_0x39713b){_0x39713b=_0x39713b||0xcc;return function(_0x29d8a5){if(_0x29d8a5){return _0x1082b7['sendStatus'](_0x39713b);}return _0x1082b7['status'](_0x39713b)['end']();};}function respondWithResult(_0x4e4c5b,_0x351eb9){_0x351eb9=_0x351eb9||0xc8;return function(_0x5226c3){if(_0x5226c3){return _0x4e4c5b[_0x229b('0x18')](_0x351eb9)[_0x229b('0x19')](_0x5226c3);}};}function respondWithFilteredResult(_0xa807ff,_0x4f4892){return function(_0x376118){if(_0x376118){var _0x57ef4e=typeof _0x4f4892[_0x229b('0x1a')]==='undefined'&&typeof _0x4f4892[_0x229b('0x1b')]===_0x229b('0x1c');var _0x5e9dd7=_0x376118[_0x229b('0x1d')];var _0x5b4934=_0x57ef4e?0x0:_0x4f4892[_0x229b('0x1a')];var _0x3eafad=_0x57ef4e?_0x376118['count']:_0x4f4892[_0x229b('0x1a')]+_0x4f4892['limit'];var _0x1df35c;if(_0x3eafad>=_0x5e9dd7){_0x3eafad=_0x5e9dd7;_0x1df35c=0xc8;}else{_0x1df35c=0xce;}_0xa807ff[_0x229b('0x18')](_0x1df35c);return _0xa807ff[_0x229b('0x1e')](_0x229b('0x1f'),_0x5b4934+'-'+_0x3eafad+'/'+_0x5e9dd7)[_0x229b('0x19')](_0x376118);}return null;};}function patchUpdates(_0x449a06){return function(_0x91ac8){try{jsonpatch[_0x229b('0x20')](_0x91ac8,_0x449a06,!![]);}catch(_0x132e6c){return BPromise[_0x229b('0x21')](_0x132e6c);}return _0x91ac8[_0x229b('0x22')]();};}function saveUpdates(_0x22a2e7,_0x39f030){return function(_0x5bbec3){if(_0x5bbec3){return _0x5bbec3[_0x229b('0x23')](_0x22a2e7)[_0x229b('0x24')](function(_0x419f15){return _0x419f15;});}return null;};}function removeEntity(_0x4ec2d4,_0x2e3630){return function(_0xe03ea8){if(_0xe03ea8){return _0xe03ea8[_0x229b('0x25')]()[_0x229b('0x24')](function(){_0x4ec2d4[_0x229b('0x18')](0xcc)[_0x229b('0x26')]();});}};}function handleEntityNotFound(_0x49b389,_0x137ecd){return function(_0x43174d){if(!_0x43174d){_0x49b389[_0x229b('0x27')](0x194);}return _0x43174d;};}function handleError(_0x1e978f,_0x4d71cc){_0x4d71cc=_0x4d71cc||0x1f4;return function(_0x26992c){logger[_0x229b('0x28')](_0x26992c['stack']);if(_0x26992c[_0x229b('0x29')]){delete _0x26992c[_0x229b('0x29')];}_0x1e978f[_0x229b('0x18')](_0x4d71cc)['send'](_0x26992c);};}exports[_0x229b('0x2a')]=function(_0x4f505f,_0x1e6211){var _0x28229a={},_0x39f738={},_0x275e01={'count':0x0,'rows':[]};var _0xe435b7=_['map'](db[_0x229b('0x2b')][_0x229b('0x2c')],function(_0x1d65d4){return{'name':_0x1d65d4['fieldName'],'type':_0x1d65d4[_0x229b('0x2d')][_0x229b('0x2e')]};});_0x39f738[_0x229b('0x2f')]=_['map'](_0xe435b7,'name');_0x39f738['query']=_[_0x229b('0x30')](_0x4f505f['query']);_0x39f738[_0x229b('0x31')]=_[_0x229b('0x32')](_0x39f738['model'],_0x39f738[_0x229b('0x33')]);_0x28229a[_0x229b('0x34')]=_[_0x229b('0x32')](_0x39f738[_0x229b('0x2f')],qs['fields'](_0x4f505f[_0x229b('0x33')]['fields']));_0x28229a[_0x229b('0x34')]=_0x28229a['attributes'][_0x229b('0x35')]?_0x28229a[_0x229b('0x34')]:_0x39f738['model'];if(!_0x4f505f['query'][_0x229b('0x36')](_0x229b('0x37'))){_0x28229a[_0x229b('0x1b')]=qs['limit'](_0x4f505f['query'][_0x229b('0x1b')]);_0x28229a[_0x229b('0x1a')]=qs['offset'](_0x4f505f[_0x229b('0x33')][_0x229b('0x1a')]);}_0x28229a['order']=qs[_0x229b('0x38')](_0x4f505f[_0x229b('0x33')][_0x229b('0x38')]);_0x28229a[_0x229b('0x39')]=qs[_0x229b('0x31')](_['pick'](_0x4f505f['query'],_0x39f738['filters']),_0xe435b7);if(_0x4f505f['query'][_0x229b('0x3a')]){_0x28229a['where']=_[_0x229b('0x3b')](_0x28229a[_0x229b('0x39')],{'$or':_[_0x229b('0x3c')](_0xe435b7,function(_0x3f4fa5){if(_0x3f4fa5[_0x229b('0x2d')]!==_0x229b('0x3d')){var _0x33a1e2={};_0x33a1e2[_0x3f4fa5[_0x229b('0x29')]]={'$like':'%'+_0x4f505f[_0x229b('0x33')][_0x229b('0x3a')]+'%'};return _0x33a1e2;}})});}_0x28229a=_[_0x229b('0x3b')]({},_0x28229a,_0x4f505f[_0x229b('0x3e')]);var _0x4c6319={'where':_0x28229a[_0x229b('0x39')]};return db[_0x229b('0x2b')]['count'](_0x4c6319)[_0x229b('0x24')](function(_0x103200){_0x275e01[_0x229b('0x1d')]=_0x103200;if(_0x4f505f['query']['includeAll']){_0x28229a['include']=[{'all':!![]}];}return db[_0x229b('0x2b')]['findAll'](_0x28229a);})[_0x229b('0x24')](function(_0x4c23e3){_0x275e01['rows']=_0x4c23e3;return _0x275e01;})['then'](respondWithFilteredResult(_0x1e6211,_0x28229a))[_0x229b('0x3f')](handleError(_0x1e6211,null));};exports[_0x229b('0x40')]=function(_0x5c2cbd,_0x575e0a){var _0x44a297={'raw':!![],'where':{'id':_0x5c2cbd[_0x229b('0x41')]['id']}},_0x3ae53b={};_0x3ae53b[_0x229b('0x2f')]=_['keys'](db[_0x229b('0x2b')][_0x229b('0x2c')]);_0x3ae53b['query']=_['keys'](_0x5c2cbd[_0x229b('0x33')]);_0x3ae53b['filters']=_['intersection'](_0x3ae53b[_0x229b('0x2f')],_0x3ae53b['query']);_0x44a297['attributes']=_[_0x229b('0x32')](_0x3ae53b[_0x229b('0x2f')],qs[_0x229b('0x42')](_0x5c2cbd[_0x229b('0x33')]['fields']));_0x44a297[_0x229b('0x34')]=_0x44a297[_0x229b('0x34')][_0x229b('0x35')]?_0x44a297[_0x229b('0x34')]:_0x3ae53b[_0x229b('0x2f')];if(_0x5c2cbd[_0x229b('0x33')][_0x229b('0x43')]){_0x44a297[_0x229b('0x44')]=[{'all':!![]}];}_0x44a297=_[_0x229b('0x3b')]({},_0x44a297,_0x5c2cbd[_0x229b('0x3e')]);return db[_0x229b('0x2b')][_0x229b('0x45')](_0x44a297)[_0x229b('0x24')](handleEntityNotFound(_0x575e0a,null))[_0x229b('0x24')](respondWithResult(_0x575e0a,null))[_0x229b('0x3f')](handleError(_0x575e0a,null));};exports['create']=function(_0x142b78,_0x3cf5fc){return db[_0x229b('0x2b')][_0x229b('0x46')](_0x142b78['body'],{})['then'](respondWithResult(_0x3cf5fc,0xc9))[_0x229b('0x3f')](handleError(_0x3cf5fc,null));};exports[_0x229b('0x23')]=function(_0x31d8e5,_0x82fa89){if(_0x31d8e5[_0x229b('0x47')]['id']){delete _0x31d8e5['body']['id'];}return db['SquareDetailsReport']['find']({'where':{'id':_0x31d8e5[_0x229b('0x41')]['id']}})[_0x229b('0x24')](handleEntityNotFound(_0x82fa89,null))[_0x229b('0x24')](saveUpdates(_0x31d8e5[_0x229b('0x47')],null))['then'](respondWithResult(_0x82fa89,null))['catch'](handleError(_0x82fa89,null));};exports[_0x229b('0x25')]=function(_0x22c2d1,_0xc3c03d){return db[_0x229b('0x2b')][_0x229b('0x45')]({'where':{'id':_0x22c2d1[_0x229b('0x41')]['id']}})[_0x229b('0x24')](handleEntityNotFound(_0xc3c03d,null))[_0x229b('0x24')](removeEntity(_0xc3c03d,null))[_0x229b('0x3f')](handleError(_0xc3c03d,null));};exports['describe']=function(_0x547ce8,_0x56cc92){return db[_0x229b('0x2b')][_0x229b('0x48')]()['then'](respondWithResult(_0x56cc92,null))[_0x229b('0x3f')](handleError(_0x56cc92,null));}; \ No newline at end of file +var _0x45f8=['papaparse','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','sendStatus','status','end','offset','undefined','limit','count','set','Content-Range','json','save','update','then','destroy','error','stack','name','send','index','map','rawAttributes','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','sort','where','pick','filter','merge','SquareDetailsReport','includeAll','include','findAll','rows','catch','show','params','options','create','body','find','describe','eml-format','zip-dir','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','fs-extra','lodash','squel','jsforce','desk.js'];(function(_0xbefd3c,_0xbc56f0){var _0x253ad5=function(_0x284b82){while(--_0x284b82){_0xbefd3c['push'](_0xbefd3c['shift']());}};_0x253ad5(++_0xbc56f0);}(_0x45f8,0x1f0));var _0x845f=function(_0x5bf2b3,_0xfcd364){_0x5bf2b3=_0x5bf2b3-0x0;var _0x5e8a9b=_0x45f8[_0x5bf2b3];return _0x5e8a9b;};'use strict';var emlformat=require(_0x845f('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x845f('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x845f('0x2'));var moment=require(_0x845f('0x3'));var BPromise=require(_0x845f('0x4'));var Mustache=require(_0x845f('0x5'));var util=require(_0x845f('0x6'));var path=require(_0x845f('0x7'));var sox=require('sox');var csv=require(_0x845f('0x8'));var ejs=require(_0x845f('0x9'));var fs=require('fs');var fs_extra=require(_0x845f('0xa'));var _=require(_0x845f('0xb'));var squel=require(_0x845f('0xc'));var crypto=require('crypto');var jsforce=require(_0x845f('0xd'));var deskjs=require(_0x845f('0xe'));var toCsv=require(_0x845f('0x8'));var querystring=require('querystring');var Papa=require(_0x845f('0xf'));var Redis=require(_0x845f('0x10'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x845f('0x11'));var hardwareService=require(_0x845f('0x12'));var logger=require(_0x845f('0x13'))(_0x845f('0x14'));var utils=require(_0x845f('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0x845f('0x16'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x4ebd45,_0x5b1a25){_0x5b1a25=_0x5b1a25||0xcc;return function(_0xdaa8a3){if(_0xdaa8a3){return _0x4ebd45[_0x845f('0x17')](_0x5b1a25);}return _0x4ebd45[_0x845f('0x18')](_0x5b1a25)[_0x845f('0x19')]();};}function respondWithResult(_0x5ea9d6,_0x2c666d){_0x2c666d=_0x2c666d||0xc8;return function(_0x29efa4){if(_0x29efa4){return _0x5ea9d6[_0x845f('0x18')](_0x2c666d)['json'](_0x29efa4);}};}function respondWithFilteredResult(_0x54c8a0,_0x45d15f){return function(_0x43429f){if(_0x43429f){var _0x581685=typeof _0x45d15f[_0x845f('0x1a')]===_0x845f('0x1b')&&typeof _0x45d15f[_0x845f('0x1c')]==='undefined';var _0x58c9ea=_0x43429f[_0x845f('0x1d')];var _0x349e9e=_0x581685?0x0:_0x45d15f[_0x845f('0x1a')];var _0x1ef21c=_0x581685?_0x43429f['count']:_0x45d15f[_0x845f('0x1a')]+_0x45d15f[_0x845f('0x1c')];var _0x479e59;if(_0x1ef21c>=_0x58c9ea){_0x1ef21c=_0x58c9ea;_0x479e59=0xc8;}else{_0x479e59=0xce;}_0x54c8a0[_0x845f('0x18')](_0x479e59);return _0x54c8a0[_0x845f('0x1e')](_0x845f('0x1f'),_0x349e9e+'-'+_0x1ef21c+'/'+_0x58c9ea)[_0x845f('0x20')](_0x43429f);}return null;};}function patchUpdates(_0x43d4b9){return function(_0x2e20d3){try{jsonpatch['apply'](_0x2e20d3,_0x43d4b9,!![]);}catch(_0x45562a){return BPromise['reject'](_0x45562a);}return _0x2e20d3[_0x845f('0x21')]();};}function saveUpdates(_0xbb981d,_0x59f0e3){return function(_0x2d75ab){if(_0x2d75ab){return _0x2d75ab[_0x845f('0x22')](_0xbb981d)[_0x845f('0x23')](function(_0x1c662d){return _0x1c662d;});}return null;};}function removeEntity(_0x3f8404,_0x5ac1e1){return function(_0x82e1a0){if(_0x82e1a0){return _0x82e1a0[_0x845f('0x24')]()[_0x845f('0x23')](function(){_0x3f8404[_0x845f('0x18')](0xcc)[_0x845f('0x19')]();});}};}function handleEntityNotFound(_0x48107f,_0x32315e){return function(_0x2c4290){if(!_0x2c4290){_0x48107f['sendStatus'](0x194);}return _0x2c4290;};}function handleError(_0x5b947f,_0x4a1fe6){_0x4a1fe6=_0x4a1fe6||0x1f4;return function(_0x317cb5){logger[_0x845f('0x25')](_0x317cb5[_0x845f('0x26')]);if(_0x317cb5[_0x845f('0x27')]){delete _0x317cb5['name'];}_0x5b947f[_0x845f('0x18')](_0x4a1fe6)[_0x845f('0x28')](_0x317cb5);};}exports[_0x845f('0x29')]=function(_0x365f6f,_0xbccd09){var _0x595776={},_0x17b675={},_0x394227={'count':0x0,'rows':[]};var _0x202b1b=_[_0x845f('0x2a')](db['SquareDetailsReport'][_0x845f('0x2b')],function(_0x38c180){return{'name':_0x38c180['fieldName'],'type':_0x38c180[_0x845f('0x2c')][_0x845f('0x2d')]};});_0x17b675[_0x845f('0x2e')]=_[_0x845f('0x2a')](_0x202b1b,'name');_0x17b675[_0x845f('0x2f')]=_[_0x845f('0x30')](_0x365f6f[_0x845f('0x2f')]);_0x17b675[_0x845f('0x31')]=_[_0x845f('0x32')](_0x17b675[_0x845f('0x2e')],_0x17b675['query']);_0x595776[_0x845f('0x33')]=_[_0x845f('0x32')](_0x17b675[_0x845f('0x2e')],qs[_0x845f('0x34')](_0x365f6f[_0x845f('0x2f')][_0x845f('0x34')]));_0x595776[_0x845f('0x33')]=_0x595776[_0x845f('0x33')][_0x845f('0x35')]?_0x595776['attributes']:_0x17b675['model'];if(!_0x365f6f['query'][_0x845f('0x36')]('nolimit')){_0x595776[_0x845f('0x1c')]=qs['limit'](_0x365f6f[_0x845f('0x2f')][_0x845f('0x1c')]);_0x595776[_0x845f('0x1a')]=qs[_0x845f('0x1a')](_0x365f6f[_0x845f('0x2f')][_0x845f('0x1a')]);}_0x595776['order']=qs[_0x845f('0x37')](_0x365f6f[_0x845f('0x2f')][_0x845f('0x37')]);_0x595776[_0x845f('0x38')]=qs['filters'](_[_0x845f('0x39')](_0x365f6f[_0x845f('0x2f')],_0x17b675[_0x845f('0x31')]),_0x202b1b);if(_0x365f6f[_0x845f('0x2f')][_0x845f('0x3a')]){_0x595776[_0x845f('0x38')]=_['merge'](_0x595776[_0x845f('0x38')],{'$or':_['map'](_0x202b1b,function(_0x3e05a3){if(_0x3e05a3[_0x845f('0x2c')]!=='VIRTUAL'){var _0x3f696e={};_0x3f696e[_0x3e05a3[_0x845f('0x27')]]={'$like':'%'+_0x365f6f[_0x845f('0x2f')][_0x845f('0x3a')]+'%'};return _0x3f696e;}})});}_0x595776=_[_0x845f('0x3b')]({},_0x595776,_0x365f6f['options']);var _0x5e1e57={'where':_0x595776[_0x845f('0x38')]};return db[_0x845f('0x3c')][_0x845f('0x1d')](_0x5e1e57)[_0x845f('0x23')](function(_0x4389b3){_0x394227[_0x845f('0x1d')]=_0x4389b3;if(_0x365f6f[_0x845f('0x2f')][_0x845f('0x3d')]){_0x595776[_0x845f('0x3e')]=[{'all':!![]}];}return db[_0x845f('0x3c')][_0x845f('0x3f')](_0x595776);})[_0x845f('0x23')](function(_0x3dbf1c){_0x394227[_0x845f('0x40')]=_0x3dbf1c;return _0x394227;})[_0x845f('0x23')](respondWithFilteredResult(_0xbccd09,_0x595776))[_0x845f('0x41')](handleError(_0xbccd09,null));};exports[_0x845f('0x42')]=function(_0x146641,_0x5574b5){var _0x5aa837={'raw':!![],'where':{'id':_0x146641[_0x845f('0x43')]['id']}},_0x1761ce={};_0x1761ce[_0x845f('0x2e')]=_['keys'](db['SquareDetailsReport'][_0x845f('0x2b')]);_0x1761ce[_0x845f('0x2f')]=_[_0x845f('0x30')](_0x146641[_0x845f('0x2f')]);_0x1761ce[_0x845f('0x31')]=_[_0x845f('0x32')](_0x1761ce[_0x845f('0x2e')],_0x1761ce[_0x845f('0x2f')]);_0x5aa837[_0x845f('0x33')]=_['intersection'](_0x1761ce[_0x845f('0x2e')],qs[_0x845f('0x34')](_0x146641[_0x845f('0x2f')][_0x845f('0x34')]));_0x5aa837[_0x845f('0x33')]=_0x5aa837[_0x845f('0x33')]['length']?_0x5aa837[_0x845f('0x33')]:_0x1761ce[_0x845f('0x2e')];if(_0x146641[_0x845f('0x2f')][_0x845f('0x3d')]){_0x5aa837[_0x845f('0x3e')]=[{'all':!![]}];}_0x5aa837=_[_0x845f('0x3b')]({},_0x5aa837,_0x146641[_0x845f('0x44')]);return db[_0x845f('0x3c')]['find'](_0x5aa837)[_0x845f('0x23')](handleEntityNotFound(_0x5574b5,null))['then'](respondWithResult(_0x5574b5,null))[_0x845f('0x41')](handleError(_0x5574b5,null));};exports[_0x845f('0x45')]=function(_0x2a32b0,_0x227aef){return db[_0x845f('0x3c')][_0x845f('0x45')](_0x2a32b0['body'],{})[_0x845f('0x23')](respondWithResult(_0x227aef,0xc9))[_0x845f('0x41')](handleError(_0x227aef,null));};exports[_0x845f('0x22')]=function(_0xb39af0,_0x151be8){if(_0xb39af0[_0x845f('0x46')]['id']){delete _0xb39af0[_0x845f('0x46')]['id'];}return db[_0x845f('0x3c')][_0x845f('0x47')]({'where':{'id':_0xb39af0[_0x845f('0x43')]['id']}})['then'](handleEntityNotFound(_0x151be8,null))[_0x845f('0x23')](saveUpdates(_0xb39af0[_0x845f('0x46')],null))[_0x845f('0x23')](respondWithResult(_0x151be8,null))[_0x845f('0x41')](handleError(_0x151be8,null));};exports[_0x845f('0x24')]=function(_0x39e904,_0x5962e2){return db[_0x845f('0x3c')][_0x845f('0x47')]({'where':{'id':_0x39e904[_0x845f('0x43')]['id']}})['then'](handleEntityNotFound(_0x5962e2,null))[_0x845f('0x23')](removeEntity(_0x5962e2,null))[_0x845f('0x41')](handleError(_0x5962e2,null));};exports[_0x845f('0x48')]=function(_0x4a5b71,_0x1f0881){return db[_0x845f('0x3c')][_0x845f('0x48')]()[_0x845f('0x23')](respondWithResult(_0x1f0881,null))[_0x845f('0x41')](handleError(_0x1f0881,null));}; \ No newline at end of file diff --git a/server/api/squareReportDetail/squareReportDetail.model.js b/server/api/squareReportDetail/squareReportDetail.model.js index 09f5a13..350f228 100644 --- a/server/api/squareReportDetail/squareReportDetail.model.js +++ b/server/api/squareReportDetail/squareReportDetail.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf650=['moment','bluebird','request-promise','./squareReportDetail.attributes','SquareDetailsReport','report_square_details','lodash','util','../../config/logger'];(function(_0x43fdf8,_0x8426b3){var _0x1160c6=function(_0x281fb6){while(--_0x281fb6){_0x43fdf8['push'](_0x43fdf8['shift']());}};_0x1160c6(++_0x8426b3);}(_0xf650,0x138));var _0x0f65=function(_0x4237a4,_0x5b81e2){_0x4237a4=_0x4237a4-0x0;var _0xb85cd=_0xf650[_0x4237a4];return _0xb85cd;};'use strict';var _=require(_0x0f65('0x0'));var util=require(_0x0f65('0x1'));var logger=require(_0x0f65('0x2'))('api');var moment=require(_0x0f65('0x3'));var BPromise=require(_0x0f65('0x4'));var rp=require(_0x0f65('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x0f65('0x6'));module['exports']=function(_0x9acf84,_0x60b41){return _0x9acf84['define'](_0x0f65('0x7'),attributes,{'tableName':_0x0f65('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xc664=['request-promise','path','../../config/environment','./squareReportDetail.attributes','exports','define','SquareDetailsReport','report_square_details','api','moment','bluebird'];(function(_0x54e619,_0x257663){var _0xa6404d=function(_0x24c363){while(--_0x24c363){_0x54e619['push'](_0x54e619['shift']());}};_0xa6404d(++_0x257663);}(_0xc664,0x173));var _0x4c66=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xc664[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require('util');var logger=require('../../config/logger')(_0x4c66('0x0'));var moment=require(_0x4c66('0x1'));var BPromise=require(_0x4c66('0x2'));var rp=require(_0x4c66('0x3'));var fs=require('fs');var path=require(_0x4c66('0x4'));var rimraf=require('rimraf');var config=require(_0x4c66('0x5'));var attributes=require(_0x4c66('0x6'));module[_0x4c66('0x7')]=function(_0x1b49d9,_0x10a121){return _0x1b49d9[_0x4c66('0x8')](_0x4c66('0x9'),attributes,{'tableName':_0x4c66('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/squareReportDetail/squareReportDetail.rpc.js b/server/api/squareReportDetail/squareReportDetail.rpc.js index 05732d0..25faef5 100644 --- a/server/api/squareReportDetail/squareReportDetail.rpc.js +++ b/server/api/squareReportDetail/squareReportDetail.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0447=['SquareDetailsReport','create','raw','then','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info','request\x20sent','debug','SquareDetailsReport,\x20%s,\x20%s,\x20%s','error','SquareDetailsReport,\x20%s,\x20%s','message','result','CreateSquareDetailsReport'];(function(_0x112c28,_0xfe30eb){var _0x22f76d=function(_0x21fdf0){while(--_0x21fdf0){_0x112c28['push'](_0x112c28['shift']());}};_0x22f76d(++_0xfe30eb);}(_0x0447,0x8b));var _0x7044=function(_0x3f958c,_0x368f68){_0x3f958c=_0x3f958c-0x0;var _0x1c42e3=_0x0447[_0x3f958c];return _0x1c42e3;};'use strict';var _=require(_0x7044('0x0'));var util=require(_0x7044('0x1'));var moment=require(_0x7044('0x2'));var BPromise=require(_0x7044('0x3'));var rs=require(_0x7044('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x7044('0x5'))['db'];var utils=require(_0x7044('0x6'));var logger=require(_0x7044('0x7'))(_0x7044('0x8'));var config=require(_0x7044('0x9'));var jayson=require(_0x7044('0xa'));var client=jayson[_0x7044('0xb')][_0x7044('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x66b8cb,_0x51de50,_0x72d341){return new BPromise(function(_0x42d53b,_0x2a2b36){return client[_0x7044('0xd')](_0x66b8cb,_0x72d341)['then'](function(_0x41616d){logger[_0x7044('0xe')]('SquareDetailsReport,\x20%s,\x20%s',_0x51de50,_0x7044('0xf'));logger[_0x7044('0x10')](_0x7044('0x11'),_0x51de50,_0x7044('0xf'),JSON['stringify'](_0x41616d));if(_0x41616d[_0x7044('0x12')]){if(_0x41616d['error']['code']===0x1f4){logger['error'](_0x7044('0x13'),_0x51de50,_0x41616d[_0x7044('0x12')][_0x7044('0x14')]);return _0x2a2b36(_0x41616d[_0x7044('0x12')]['message']);}logger['error'](_0x7044('0x13'),_0x51de50,_0x41616d[_0x7044('0x12')]['message']);return _0x42d53b(_0x41616d['error'][_0x7044('0x14')]);}else{logger[_0x7044('0xe')](_0x7044('0x13'),_0x51de50,_0x7044('0xf'));_0x42d53b(_0x41616d[_0x7044('0x15')][_0x7044('0x14')]);}})['catch'](function(_0xdae8a){logger[_0x7044('0x12')](_0x7044('0x13'),_0x51de50,_0xdae8a);_0x2a2b36(_0xdae8a);});});}exports[_0x7044('0x16')]=function(_0x219486){var _0x3f373c=this;return new Promise(function(_0x4df89b,_0x1f300e){return db[_0x7044('0x17')][_0x7044('0x18')](_0x219486['body'],{'raw':_0x219486['options']?_0x219486['options'][_0x7044('0x19')]===undefined?!![]:![]:!![]})[_0x7044('0x1a')](function(_0x2c5dcb){logger[_0x7044('0xe')](_0x7044('0x16'),_0x219486);logger['debug'](_0x7044('0x16'),_0x219486,JSON['stringify'](_0x2c5dcb));_0x4df89b(_0x2c5dcb);})['catch'](function(_0x3db88b){logger[_0x7044('0x12')](_0x7044('0x16'),_0x3db88b[_0x7044('0x14')],_0x219486);_0x1f300e(_0x3f373c[_0x7044('0x12')](0x1f4,_0x3db88b[_0x7044('0x14')]));});});}; \ No newline at end of file +var _0x0b0e=['info','SquareDetailsReport,\x20%s,\x20%s','debug','SquareDetailsReport,\x20%s,\x20%s,\x20%s','stringify','error','message','request\x20sent','result','catch','create','options','CreateSquareDetailsReport','lodash','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then'];(function(_0x1bdf14,_0x227894){var _0x40620e=function(_0x387c1b){while(--_0x387c1b){_0x1bdf14['push'](_0x1bdf14['shift']());}};_0x40620e(++_0x227894);}(_0x0b0e,0x187));var _0xe0b0=function(_0x36884e,_0x48008f){_0x36884e=_0x36884e-0x0;var _0x1cc367=_0x0b0e[_0x36884e];return _0x1cc367;};'use strict';var _=require(_0xe0b0('0x0'));var util=require('util');var moment=require(_0xe0b0('0x1'));var BPromise=require('bluebird');var rs=require(_0xe0b0('0x2'));var fs=require('fs');var Redis=require(_0xe0b0('0x3'));var db=require(_0xe0b0('0x4'))['db'];var utils=require(_0xe0b0('0x5'));var logger=require(_0xe0b0('0x6'))(_0xe0b0('0x7'));var config=require(_0xe0b0('0x8'));var jayson=require(_0xe0b0('0x9'));var client=jayson[_0xe0b0('0xa')][_0xe0b0('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x219b1c,_0x5cf9cc,_0x50be7f){return new BPromise(function(_0x11effc,_0x435060){return client[_0xe0b0('0xc')](_0x219b1c,_0x50be7f)[_0xe0b0('0xd')](function(_0x4c24f9){logger[_0xe0b0('0xe')](_0xe0b0('0xf'),_0x5cf9cc,'request\x20sent');logger[_0xe0b0('0x10')](_0xe0b0('0x11'),_0x5cf9cc,'request\x20sent',JSON[_0xe0b0('0x12')](_0x4c24f9));if(_0x4c24f9[_0xe0b0('0x13')]){if(_0x4c24f9[_0xe0b0('0x13')]['code']===0x1f4){logger[_0xe0b0('0x13')](_0xe0b0('0xf'),_0x5cf9cc,_0x4c24f9[_0xe0b0('0x13')][_0xe0b0('0x14')]);return _0x435060(_0x4c24f9[_0xe0b0('0x13')]['message']);}logger[_0xe0b0('0x13')](_0xe0b0('0xf'),_0x5cf9cc,_0x4c24f9[_0xe0b0('0x13')][_0xe0b0('0x14')]);return _0x11effc(_0x4c24f9[_0xe0b0('0x13')]['message']);}else{logger[_0xe0b0('0xe')]('SquareDetailsReport,\x20%s,\x20%s',_0x5cf9cc,_0xe0b0('0x15'));_0x11effc(_0x4c24f9[_0xe0b0('0x16')]['message']);}})[_0xe0b0('0x17')](function(_0x4a4cc0){logger[_0xe0b0('0x13')](_0xe0b0('0xf'),_0x5cf9cc,_0x4a4cc0);_0x435060(_0x4a4cc0);});});}exports['CreateSquareDetailsReport']=function(_0x54a3eb){var _0x46bb44=this;return new Promise(function(_0x50a441,_0x4df8da){return db['SquareDetailsReport'][_0xe0b0('0x18')](_0x54a3eb['body'],{'raw':_0x54a3eb['options']?_0x54a3eb[_0xe0b0('0x19')]['raw']===undefined?!![]:![]:!![]})[_0xe0b0('0xd')](function(_0x5dba2f){logger[_0xe0b0('0xe')](_0xe0b0('0x1a'),_0x54a3eb);logger[_0xe0b0('0x10')](_0xe0b0('0x1a'),_0x54a3eb,JSON[_0xe0b0('0x12')](_0x5dba2f));_0x50a441(_0x5dba2f);})['catch'](function(_0x4cae54){logger[_0xe0b0('0x13')]('CreateSquareDetailsReport',_0x4cae54[_0xe0b0('0x14')],_0x54a3eb);_0x4df8da(_0x46bb44[_0xe0b0('0x13')](0x1f4,_0x4cae54['message']));});});}; \ No newline at end of file diff --git a/server/api/system/index.js b/server/api/system/index.js index 1c8b1fb..3946b28 100644 --- a/server/api/system/index.js +++ b/server/api/system/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc989=['isAuthenticated','index','/process/:pid/kill','killProcess','exports','express','Router','../../components/auth/service','./system.controller','get'];(function(_0x5b644e,_0x2e5e07){var _0x49c6bf=function(_0x3032d9){while(--_0x3032d9){_0x5b644e['push'](_0x5b644e['shift']());}};_0x49c6bf(++_0x2e5e07);}(_0xc989,0x1bd));var _0x9c98=function(_0x2641f9,_0x26715f){_0x2641f9=_0x2641f9-0x0;var _0x585741=_0xc989[_0x2641f9];return _0x585741;};'use strict';var express=require(_0x9c98('0x0'));var router=express[_0x9c98('0x1')]();var auth=require(_0x9c98('0x2'));var controller=require(_0x9c98('0x3'));router[_0x9c98('0x4')]('/',auth[_0x9c98('0x5')](),controller[_0x9c98('0x6')]);router['get'](_0x9c98('0x7'),auth['isAuthenticated'](),controller[_0x9c98('0x8')]);module[_0x9c98('0x9')]=router; \ No newline at end of file +var _0x32a0=['killProcess','exports','express','Router','../../components/auth/service','get','isAuthenticated'];(function(_0x1ced2d,_0x5d9d88){var _0x30e791=function(_0x30c9a2){while(--_0x30c9a2){_0x1ced2d['push'](_0x1ced2d['shift']());}};_0x30e791(++_0x5d9d88);}(_0x32a0,0x1bb));var _0x032a=function(_0x30d9bf,_0x359bb6){_0x30d9bf=_0x30d9bf-0x0;var _0x2be61e=_0x32a0[_0x30d9bf];return _0x2be61e;};'use strict';var express=require(_0x032a('0x0'));var router=express[_0x032a('0x1')]();var auth=require(_0x032a('0x2'));var controller=require('./system.controller');router[_0x032a('0x3')]('/',auth[_0x032a('0x4')](),controller['index']);router['get']('/process/:pid/kill',auth[_0x032a('0x4')](),controller[_0x032a('0x5')]);module[_0x032a('0x6')]=router; \ No newline at end of file diff --git a/server/api/system/system.controller.js b/server/api/system/system.controller.js index cba5784..812cf25 100644 --- a/server/api/system/system.controller.js +++ b/server/api/system/system.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4af7=['status','json','components/import/cm','format','params','pid','indexOf','Process\x20with\x20pid\x20%s\x20not\x20found!','SIGINT','Process\x20with\x20pid\x20%s\x20killed\x20correctly','killProcess','systeminformation','child_process','exec','../../config/logger','api','util','lodash','error','<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s','name','send','index','getAllData','then','catch'];(function(_0x3511d3,_0x4107ae){var _0x5d6321=function(_0x1a23da){while(--_0x1a23da){_0x3511d3['push'](_0x3511d3['shift']());}};_0x5d6321(++_0x4107ae);}(_0x4af7,0x191));var _0x74af=function(_0x3f3f40,_0x4c71f4){_0x3f3f40=_0x3f3f40-0x0;var _0x403b7a=_0x4af7[_0x3f3f40];return _0x403b7a;};'use strict';var info=require(_0x74af('0x0'));var exec=require(_0x74af('0x1'))[_0x74af('0x2')];var logger=require(_0x74af('0x3'))(_0x74af('0x4'));var util=require(_0x74af('0x5'));var BPromise=require('bluebird');var _=require(_0x74af('0x6'));function handleError(_0x4ba6f3,_0x2d6e51,_0x47c8f1){_0x2d6e51=_0x2d6e51||0x1f4;return function(_0x7f8925){logger[_0x74af('0x7')](_0x74af('0x8'),_0x47c8f1,_0x2d6e51,util['inspect'](_0x7f8925,{'showHidden':![],'depth':null}));delete _0x7f8925[_0x74af('0x9')];_0x4ba6f3['status'](_0x2d6e51)[_0x74af('0xa')](_0x7f8925);};}exports[_0x74af('0xb')]=function(_0x390545,_0x1de440){return info[_0x74af('0xc')]()[_0x74af('0xd')](function(_0xe90d62){return _0x1de440['status'](0xc8)['json'](_0xe90d62);})[_0x74af('0xe')](function(_0x4f9a32){return _0x1de440[_0x74af('0xf')](0x1f4)[_0x74af('0x10')](_0x4f9a32);});};exports['killProcess']=function(_0x3f3180,_0x193024){var _0x46d4ad=[_0x74af('0x11')];return new BPromise(function(_0x1af89b,_0x59ad85){return exec(util[_0x74af('0x12')]('ps\x20-p\x20%s\x20-ww\x20-o\x20args',_0x3f3180[_0x74af('0x13')][_0x74af('0x14')]),function(_0x21a933,_0x43c031,_0x14b7d6){if(_0x21a933){return _0x59ad85(_0x21a933);}return _0x1af89b(_0x43c031);});})[_0x74af('0xd')](function(_0x4cfbaa){var _0x4e4a24=![];var _0x23f62c=_0x4cfbaa['split'](/\n/);for(var _0x483908=0x0,_0x17aa27=_0x46d4ad['length'];_0x483908<_0x17aa27,_0x4e4a24===![];_0x483908+=0x1){if(_0x4cfbaa[_0x74af('0x15')](_0x46d4ad[_0x483908])>=0x0){_0x4e4a24=!![];}}if(!_0x4e4a24){throw new Error(util[_0x74af('0x12')](_0x74af('0x16'),_0x3f3180[_0x74af('0x13')][_0x74af('0x14')]));}process['kill'](_0x3f3180['params'][_0x74af('0x14')],_0x74af('0x17'));return _0x193024['status'](0xc8)[_0x74af('0x10')]({'message':util[_0x74af('0x12')](_0x74af('0x18'),_0x3f3180['params'][_0x74af('0x14')])});})['catch'](handleError(_0x193024,null,_0x74af('0x19')));}; \ No newline at end of file +var _0x8a72=['getAllData','json','killProcess','format','ps\x20-p\x20%s\x20-ww\x20-o\x20args','params','pid','then','length','indexOf','Process\x20with\x20pid\x20%s\x20not\x20found!','kill','Process\x20with\x20pid\x20%s\x20killed\x20correctly','catch','systeminformation','child_process','exec','../../config/logger','util','bluebird','lodash','error','<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s','name','status','send','index'];(function(_0xd46326,_0x63de68){var _0x42f1f7=function(_0x30670e){while(--_0x30670e){_0xd46326['push'](_0xd46326['shift']());}};_0x42f1f7(++_0x63de68);}(_0x8a72,0xb0));var _0x28a7=function(_0xe4fea3,_0x5a9c7c){_0xe4fea3=_0xe4fea3-0x0;var _0x55b4a1=_0x8a72[_0xe4fea3];return _0x55b4a1;};'use strict';var info=require(_0x28a7('0x0'));var exec=require(_0x28a7('0x1'))[_0x28a7('0x2')];var logger=require(_0x28a7('0x3'))('api');var util=require(_0x28a7('0x4'));var BPromise=require(_0x28a7('0x5'));var _=require(_0x28a7('0x6'));function handleError(_0x4ff5be,_0x2b6e1b,_0x3b92c6){_0x2b6e1b=_0x2b6e1b||0x1f4;return function(_0x40e11a){logger[_0x28a7('0x7')](_0x28a7('0x8'),_0x3b92c6,_0x2b6e1b,util['inspect'](_0x40e11a,{'showHidden':![],'depth':null}));delete _0x40e11a[_0x28a7('0x9')];_0x4ff5be[_0x28a7('0xa')](_0x2b6e1b)[_0x28a7('0xb')](_0x40e11a);};}exports[_0x28a7('0xc')]=function(_0x42f0e2,_0x3f56ff){return info[_0x28a7('0xd')]()['then'](function(_0x17dfbb){return _0x3f56ff[_0x28a7('0xa')](0xc8)['json'](_0x17dfbb);})['catch'](function(_0x16c2c1){return _0x3f56ff[_0x28a7('0xa')](0x1f4)[_0x28a7('0xe')](_0x16c2c1);});};exports[_0x28a7('0xf')]=function(_0x15bc03,_0xf73457){var _0x2b23b7=['components/import/cm'];return new BPromise(function(_0x24efc6,_0x2f57bc){return exec(util[_0x28a7('0x10')](_0x28a7('0x11'),_0x15bc03[_0x28a7('0x12')][_0x28a7('0x13')]),function(_0x1abb46,_0x572a7c,_0x4b5803){if(_0x1abb46){return _0x2f57bc(_0x1abb46);}return _0x24efc6(_0x572a7c);});})[_0x28a7('0x14')](function(_0x1bff7d){var _0x14d5af=![];var _0xfdcc30=_0x1bff7d['split'](/\n/);for(var _0x449dd5=0x0,_0x245873=_0x2b23b7[_0x28a7('0x15')];_0x449dd5<_0x245873,_0x14d5af===![];_0x449dd5+=0x1){if(_0x1bff7d[_0x28a7('0x16')](_0x2b23b7[_0x449dd5])>=0x0){_0x14d5af=!![];}}if(!_0x14d5af){throw new Error(util['format'](_0x28a7('0x17'),_0x15bc03['params'][_0x28a7('0x13')]));}process[_0x28a7('0x18')](_0x15bc03[_0x28a7('0x12')][_0x28a7('0x13')],'SIGINT');return _0xf73457['status'](0xc8)[_0x28a7('0xe')]({'message':util[_0x28a7('0x10')](_0x28a7('0x19'),_0x15bc03[_0x28a7('0x12')][_0x28a7('0x13')])});})[_0x28a7('0x1a')](handleError(_0xf73457,null,_0x28a7('0xf')));}; \ No newline at end of file diff --git a/server/api/tag/index.js b/server/api/tag/index.js index a0b09dc..62cdf32 100644 --- a/server/api/tag/index.js +++ b/server/api/tag/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf003=['get','/:id','show','isAuthenticated','put','update','delete','destroy','exports','util','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./tag.controller'];(function(_0x224ad9,_0x5d97a7){var _0x532997=function(_0x323951){while(--_0x323951){_0x224ad9['push'](_0x224ad9['shift']());}};_0x532997(++_0x5d97a7);}(_0xf003,0x14c));var _0x3f00=function(_0x366e99,_0x15d82d){_0x366e99=_0x366e99-0x0;var _0x180bbe=_0xf003[_0x366e99];return _0x180bbe;};'use strict';var multer=require('multer');var util=require(_0x3f00('0x0'));var path=require('path');var timeout=require(_0x3f00('0x1'));var express=require('express');var router=express[_0x3f00('0x2')]();var fs_extra=require(_0x3f00('0x3'));var auth=require(_0x3f00('0x4'));var interaction=require(_0x3f00('0x5'));var config=require(_0x3f00('0x6'));var controller=require(_0x3f00('0x7'));router[_0x3f00('0x8')]('/',auth['isAuthenticated'](),controller['index']);router['get'](_0x3f00('0x9'),auth['isAuthenticated'](),controller[_0x3f00('0xa')]);router['post']('/',auth[_0x3f00('0xb')](),controller['create']);router[_0x3f00('0xc')](_0x3f00('0x9'),auth[_0x3f00('0xb')](),controller[_0x3f00('0xd')]);router[_0x3f00('0xe')](_0x3f00('0x9'),auth['isAuthenticated'](),controller[_0x3f00('0xf')]);module[_0x3f00('0x10')]=router; \ No newline at end of file +var _0xd190=['show','post','create','put','delete','destroy','exports','multer','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./tag.controller','get','isAuthenticated','index','/:id'];(function(_0x301200,_0x149e5e){var _0x26e3f2=function(_0x28b794){while(--_0x28b794){_0x301200['push'](_0x301200['shift']());}};_0x26e3f2(++_0x149e5e);}(_0xd190,0xa7));var _0x0d19=function(_0x5799e1,_0x789913){_0x5799e1=_0x5799e1-0x0;var _0x271eb3=_0xd190[_0x5799e1];return _0x271eb3;};'use strict';var multer=require(_0x0d19('0x0'));var util=require(_0x0d19('0x1'));var path=require('path');var timeout=require(_0x0d19('0x2'));var express=require(_0x0d19('0x3'));var router=express[_0x0d19('0x4')]();var fs_extra=require(_0x0d19('0x5'));var auth=require(_0x0d19('0x6'));var interaction=require(_0x0d19('0x7'));var config=require('../../config/environment');var controller=require(_0x0d19('0x8'));router[_0x0d19('0x9')]('/',auth[_0x0d19('0xa')](),controller[_0x0d19('0xb')]);router['get'](_0x0d19('0xc'),auth[_0x0d19('0xa')](),controller[_0x0d19('0xd')]);router[_0x0d19('0xe')]('/',auth[_0x0d19('0xa')](),controller[_0x0d19('0xf')]);router[_0x0d19('0x10')](_0x0d19('0xc'),auth[_0x0d19('0xa')](),controller['update']);router[_0x0d19('0x11')](_0x0d19('0xc'),auth[_0x0d19('0xa')](),controller[_0x0d19('0x12')]);module[_0x0d19('0x13')]=router; \ No newline at end of file diff --git a/server/api/tag/tag.attributes.js b/server/api/tag/tag.attributes.js index a593f05..fa35b83 100644 --- a/server/api/tag/tag.attributes.js +++ b/server/api/tag/tag.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8c11=['sequelize','exports','STRING','name','#0091EA'];(function(_0x12c3d1,_0x3c6ae7){var _0x282840=function(_0x4ae0d2){while(--_0x4ae0d2){_0x12c3d1['push'](_0x12c3d1['shift']());}};_0x282840(++_0x3c6ae7);}(_0x8c11,0xf5));var _0x18c1=function(_0x2636fb,_0x5d41ec){_0x2636fb=_0x2636fb-0x0;var _0x473c52=_0x8c11[_0x2636fb];return _0x473c52;};'use strict';var Sequelize=require(_0x18c1('0x0'));module[_0x18c1('0x1')]={'name':{'type':Sequelize[_0x18c1('0x2')],'unique':_0x18c1('0x3'),'allowNull':![],'validate':{'is':/[A-Za-z0-9._\\+*!-]+/,'notEmpty':!![]}},'color':{'type':Sequelize[_0x18c1('0x2')],'defaultValue':_0x18c1('0x4')},'description':{'type':Sequelize[_0x18c1('0x2')]}}; \ No newline at end of file +var _0xd8d7=['sequelize','exports','STRING','name'];(function(_0x8560d3,_0x26a504){var _0x33b1b5=function(_0x3a2cad){while(--_0x3a2cad){_0x8560d3['push'](_0x8560d3['shift']());}};_0x33b1b5(++_0x26a504);}(_0xd8d7,0x1d4));var _0x7d8d=function(_0x3c6dce,_0x5424dd){_0x3c6dce=_0x3c6dce-0x0;var _0x1450e9=_0xd8d7[_0x3c6dce];return _0x1450e9;};'use strict';var Sequelize=require(_0x7d8d('0x0'));module[_0x7d8d('0x1')]={'name':{'type':Sequelize[_0x7d8d('0x2')],'unique':_0x7d8d('0x3'),'allowNull':![],'validate':{'is':/[A-Za-z0-9._\\+*!-]+/,'notEmpty':!![]}},'color':{'type':Sequelize[_0x7d8d('0x2')],'defaultValue':'#0091EA'},'description':{'type':Sequelize['STRING']}}; \ No newline at end of file diff --git a/server/api/tag/tag.controller.js b/server/api/tag/tag.controller.js index 1532039..d4eb1db 100644 --- a/server/api/tag/tag.controller.js +++ b/server/api/tag/tag.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3140=['filter','options','count','include','findAll','catch','show','keys','rawAttributes','includeAll','find','create','body','user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','destroy','eml-format','rimraf','zip-dir','fast-json-patch','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','limit','Content-Range','apply','update','then','get','Tags','UserProfileResource','error','stack','send','map','Tag','key','model','query','attributes','intersection','fields','length','hasOwnProperty','nolimit','sort','where','filters','name'];(function(_0x47f8d2,_0x259040){var _0x5b31bb=function(_0x592145){while(--_0x592145){_0x47f8d2['push'](_0x47f8d2['shift']());}};_0x5b31bb(++_0x259040);}(_0x3140,0xaf));var _0x0314=function(_0x599318,_0x319486){_0x599318=_0x599318-0x0;var _0x7b06fa=_0x3140[_0x599318];return _0x7b06fa;};'use strict';var emlformat=require(_0x0314('0x0'));var rimraf=require(_0x0314('0x1'));var zipdir=require(_0x0314('0x2'));var jsonpatch=require(_0x0314('0x3'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x0314('0x4'));var Mustache=require(_0x0314('0x5'));var util=require(_0x0314('0x6'));var path=require(_0x0314('0x7'));var sox=require(_0x0314('0x8'));var csv=require(_0x0314('0x9'));var ejs=require(_0x0314('0xa'));var fs=require('fs');var fs_extra=require(_0x0314('0xb'));var _=require(_0x0314('0xc'));var squel=require(_0x0314('0xd'));var crypto=require(_0x0314('0xe'));var jsforce=require('jsforce');var deskjs=require(_0x0314('0xf'));var toCsv=require(_0x0314('0x9'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x0314('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x0314('0x11'));var as=require(_0x0314('0x12'));var hardwareService=require(_0x0314('0x13'));var logger=require(_0x0314('0x14'))(_0x0314('0x15'));var utils=require(_0x0314('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0x0314('0x17'));var db=require(_0x0314('0x18'))['db'];function respondWithStatusCode(_0xd85ddf,_0x4602ec){_0x4602ec=_0x4602ec||0xcc;return function(_0x153077){if(_0x153077){return _0xd85ddf[_0x0314('0x19')](_0x4602ec);}return _0xd85ddf[_0x0314('0x1a')](_0x4602ec)['end']();};}function respondWithResult(_0x1c26ff,_0xbe0b07){_0xbe0b07=_0xbe0b07||0xc8;return function(_0x1316a0){if(_0x1316a0){return _0x1c26ff[_0x0314('0x1a')](_0xbe0b07)[_0x0314('0x1b')](_0x1316a0);}};}function respondWithFilteredResult(_0x398c91,_0x413bfa){return function(_0x3ea356){if(_0x3ea356){var _0x5e460f=typeof _0x413bfa[_0x0314('0x1c')]===_0x0314('0x1d')&&typeof _0x413bfa[_0x0314('0x1e')]==='undefined';var _0x6c48cb=_0x3ea356['count'];var _0x575b68=_0x5e460f?0x0:_0x413bfa[_0x0314('0x1c')];var _0x329679=_0x5e460f?_0x3ea356['count']:_0x413bfa[_0x0314('0x1c')]+_0x413bfa[_0x0314('0x1e')];var _0x583ffa;if(_0x329679>=_0x6c48cb){_0x329679=_0x6c48cb;_0x583ffa=0xc8;}else{_0x583ffa=0xce;}_0x398c91[_0x0314('0x1a')](_0x583ffa);return _0x398c91['set'](_0x0314('0x1f'),_0x575b68+'-'+_0x329679+'/'+_0x6c48cb)[_0x0314('0x1b')](_0x3ea356);}return null;};}function patchUpdates(_0x16d273){return function(_0x77ddfd){try{jsonpatch[_0x0314('0x20')](_0x77ddfd,_0x16d273,!![]);}catch(_0xdfad84){return BPromise['reject'](_0xdfad84);}return _0x77ddfd['save']();};}function saveUpdates(_0x20305b,_0xbd3ad0){return function(_0x1945f8){if(_0x1945f8){return _0x1945f8[_0x0314('0x21')](_0x20305b)[_0x0314('0x22')](function(_0xd7638b){return _0xd7638b;});}return null;};}function removeEntity(_0x58a1c9,_0x3c743e){return function(_0x43fb0e){if(_0x43fb0e){return _0x43fb0e['destroy']()[_0x0314('0x22')](function(){var _0xfc4893=_0x43fb0e[_0x0314('0x23')]({'plain':!![]});var _0x26c6a4=_0x0314('0x24');return db[_0x0314('0x25')]['destroy']({'where':{'type':_0x26c6a4,'resourceId':_0xfc4893['id']}})[_0x0314('0x22')](function(){return _0x43fb0e;});})[_0x0314('0x22')](function(){_0x58a1c9[_0x0314('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x29b4b5,_0x5e3eba){return function(_0x47c102){if(!_0x47c102){_0x29b4b5['sendStatus'](0x194);}return _0x47c102;};}function handleError(_0x2fc520,_0x21d6a5){_0x21d6a5=_0x21d6a5||0x1f4;return function(_0x550dc4){logger[_0x0314('0x26')](_0x550dc4[_0x0314('0x27')]);if(_0x550dc4['name']){delete _0x550dc4['name'];}_0x2fc520[_0x0314('0x1a')](_0x21d6a5)[_0x0314('0x28')](_0x550dc4);};}exports['index']=function(_0x44adb3,_0x16e74a){var _0x3d6652={},_0x4da71c={},_0x5b82b2={'count':0x0,'rows':[]};var _0x37ab90=_[_0x0314('0x29')](db[_0x0314('0x2a')]['rawAttributes'],function(_0x1d01b5){return{'name':_0x1d01b5['fieldName'],'type':_0x1d01b5['type'][_0x0314('0x2b')]};});_0x4da71c[_0x0314('0x2c')]=_[_0x0314('0x29')](_0x37ab90,'name');_0x4da71c[_0x0314('0x2d')]=_['keys'](_0x44adb3[_0x0314('0x2d')]);_0x4da71c['filters']=_['intersection'](_0x4da71c[_0x0314('0x2c')],_0x4da71c['query']);_0x3d6652[_0x0314('0x2e')]=_[_0x0314('0x2f')](_0x4da71c[_0x0314('0x2c')],qs[_0x0314('0x30')](_0x44adb3[_0x0314('0x2d')][_0x0314('0x30')]));_0x3d6652[_0x0314('0x2e')]=_0x3d6652['attributes'][_0x0314('0x31')]?_0x3d6652[_0x0314('0x2e')]:_0x4da71c[_0x0314('0x2c')];if(!_0x44adb3[_0x0314('0x2d')][_0x0314('0x32')](_0x0314('0x33'))){_0x3d6652['limit']=qs[_0x0314('0x1e')](_0x44adb3['query'][_0x0314('0x1e')]);_0x3d6652['offset']=qs[_0x0314('0x1c')](_0x44adb3['query']['offset']);}_0x3d6652['order']=qs[_0x0314('0x34')](_0x44adb3[_0x0314('0x2d')][_0x0314('0x34')]);_0x3d6652[_0x0314('0x35')]=qs[_0x0314('0x36')](_['pick'](_0x44adb3[_0x0314('0x2d')],_0x4da71c[_0x0314('0x36')]),_0x37ab90);if(_0x44adb3[_0x0314('0x2d')]['filter']){_0x3d6652[_0x0314('0x35')]=_['merge'](_0x3d6652[_0x0314('0x35')],{'$or':_['map'](_0x37ab90,function(_0x24fe65){if(_0x24fe65['type']!=='VIRTUAL'){var _0x370539={};_0x370539[_0x24fe65[_0x0314('0x37')]]={'$like':'%'+_0x44adb3['query'][_0x0314('0x38')]+'%'};return _0x370539;}})});}_0x3d6652=_['merge']({},_0x3d6652,_0x44adb3[_0x0314('0x39')]);var _0x438ddd={'where':_0x3d6652[_0x0314('0x35')]};return db[_0x0314('0x2a')][_0x0314('0x3a')](_0x438ddd)['then'](function(_0x52a71c){_0x5b82b2[_0x0314('0x3a')]=_0x52a71c;if(_0x44adb3[_0x0314('0x2d')]['includeAll']){_0x3d6652[_0x0314('0x3b')]=[{'all':!![]}];}return db[_0x0314('0x2a')][_0x0314('0x3c')](_0x3d6652);})['then'](function(_0x2b328c){_0x5b82b2['rows']=_0x2b328c;return _0x5b82b2;})[_0x0314('0x22')](respondWithFilteredResult(_0x16e74a,_0x3d6652))[_0x0314('0x3d')](handleError(_0x16e74a,null));};exports[_0x0314('0x3e')]=function(_0x583aba,_0xcafd05){var _0xf4c4a1={'raw':!![],'where':{'id':_0x583aba['params']['id']}},_0x588e65={};_0x588e65['model']=_[_0x0314('0x3f')](db[_0x0314('0x2a')][_0x0314('0x40')]);_0x588e65['query']=_[_0x0314('0x3f')](_0x583aba[_0x0314('0x2d')]);_0x588e65[_0x0314('0x36')]=_[_0x0314('0x2f')](_0x588e65[_0x0314('0x2c')],_0x588e65['query']);_0xf4c4a1[_0x0314('0x2e')]=_[_0x0314('0x2f')](_0x588e65[_0x0314('0x2c')],qs[_0x0314('0x30')](_0x583aba[_0x0314('0x2d')][_0x0314('0x30')]));_0xf4c4a1[_0x0314('0x2e')]=_0xf4c4a1['attributes'][_0x0314('0x31')]?_0xf4c4a1[_0x0314('0x2e')]:_0x588e65['model'];if(_0x583aba[_0x0314('0x2d')][_0x0314('0x41')]){_0xf4c4a1[_0x0314('0x3b')]=[{'all':!![]}];}_0xf4c4a1=_['merge']({},_0xf4c4a1,_0x583aba['options']);return db[_0x0314('0x2a')][_0x0314('0x42')](_0xf4c4a1)[_0x0314('0x22')](handleEntityNotFound(_0xcafd05,null))[_0x0314('0x22')](respondWithResult(_0xcafd05,null))[_0x0314('0x3d')](handleError(_0xcafd05,null));};exports[_0x0314('0x43')]=function(_0x36a72a,_0x478b8b){return db[_0x0314('0x2a')]['create'](_0x36a72a[_0x0314('0x44')],{})[_0x0314('0x22')](function(_0x3003dd){var _0x362b60=_0x36a72a[_0x0314('0x45')]['get']({'plain':!![]});if(!_0x362b60)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x362b60[_0x0314('0x46')]===_0x0314('0x45')){var _0x20070c=_0x3003dd[_0x0314('0x23')]({'plain':!![]});var _0x5b3c49=_0x0314('0x24');return db[_0x0314('0x47')][_0x0314('0x42')]({'where':{'name':_0x5b3c49,'userProfileId':_0x362b60[_0x0314('0x48')]},'raw':!![]})[_0x0314('0x22')](function(_0x458bd8){if(_0x458bd8&&_0x458bd8[_0x0314('0x49')]===0x0){return db['UserProfileResource'][_0x0314('0x43')]({'name':_0x20070c[_0x0314('0x37')],'resourceId':_0x20070c['id'],'type':_0x458bd8[_0x0314('0x37')],'sectionId':_0x458bd8['id']},{})['then'](function(){return _0x3003dd;});}else{return _0x3003dd;}})[_0x0314('0x3d')](function(_0x11695d){logger['error'](_0x0314('0x4a'),_0x11695d);throw _0x11695d;});}return _0x3003dd;})[_0x0314('0x22')](respondWithResult(_0x478b8b,0xc9))[_0x0314('0x3d')](handleError(_0x478b8b,null));};exports[_0x0314('0x21')]=function(_0x544a03,_0x39b4c1){if(_0x544a03[_0x0314('0x44')]['id']){delete _0x544a03[_0x0314('0x44')]['id'];}return db[_0x0314('0x2a')][_0x0314('0x42')]({'where':{'id':_0x544a03[_0x0314('0x4b')]['id']}})[_0x0314('0x22')](handleEntityNotFound(_0x39b4c1,null))[_0x0314('0x22')](saveUpdates(_0x544a03[_0x0314('0x44')],null))[_0x0314('0x22')](respondWithResult(_0x39b4c1,null))['catch'](handleError(_0x39b4c1,null));};exports[_0x0314('0x4c')]=function(_0x305568,_0xf29a33){return db[_0x0314('0x2a')][_0x0314('0x42')]({'where':{'id':_0x305568[_0x0314('0x4b')]['id']}})[_0x0314('0x22')](handleEntityNotFound(_0xf29a33,null))['then'](removeEntity(_0xf29a33,null))['catch'](handleError(_0xf29a33,null));}; \ No newline at end of file +var _0x5db8=['model','attributes','fields','length','hasOwnProperty','nolimit','sort','where','pick','filters','VIRTUAL','merge','includeAll','findAll','catch','show','options','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','path','sox','to-csv','ejs','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','destroy','then','get','Tags','error','stack','name','send','index','map','Tag','fieldName','type','key','query','keys','intersection'];(function(_0x3ef8b6,_0x24d9fe){var _0x39dee8=function(_0x33ed49){while(--_0x33ed49){_0x3ef8b6['push'](_0x3ef8b6['shift']());}};_0x39dee8(++_0x24d9fe);}(_0x5db8,0xbb));var _0x85db=function(_0x1b8f5a,_0x57c154){_0x1b8f5a=_0x1b8f5a-0x0;var _0x594189=_0x5db8[_0x1b8f5a];return _0x594189;};'use strict';var emlformat=require(_0x85db('0x0'));var rimraf=require(_0x85db('0x1'));var zipdir=require(_0x85db('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x85db('0x3'));var moment=require(_0x85db('0x4'));var BPromise=require(_0x85db('0x5'));var Mustache=require('mustache');var util=require('util');var path=require(_0x85db('0x6'));var sox=require(_0x85db('0x7'));var csv=require(_0x85db('0x8'));var ejs=require(_0x85db('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x85db('0xa'));var crypto=require(_0x85db('0xb'));var jsforce=require(_0x85db('0xc'));var deskjs=require(_0x85db('0xd'));var toCsv=require('to-csv');var querystring=require(_0x85db('0xe'));var Papa=require('papaparse');var Redis=require(_0x85db('0xf'));var authService=require(_0x85db('0x10'));var qs=require(_0x85db('0x11'));var as=require(_0x85db('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')('api');var utils=require(_0x85db('0x13'));var config=require(_0x85db('0x14'));var licenseUtil=require('../../config/license/util');var db=require(_0x85db('0x15'))['db'];function respondWithStatusCode(_0x541f2f,_0x437f7a){_0x437f7a=_0x437f7a||0xcc;return function(_0x35f8c6){if(_0x35f8c6){return _0x541f2f[_0x85db('0x16')](_0x437f7a);}return _0x541f2f[_0x85db('0x17')](_0x437f7a)[_0x85db('0x18')]();};}function respondWithResult(_0xb7ea66,_0x2b7507){_0x2b7507=_0x2b7507||0xc8;return function(_0x25ec64){if(_0x25ec64){return _0xb7ea66[_0x85db('0x17')](_0x2b7507)[_0x85db('0x19')](_0x25ec64);}};}function respondWithFilteredResult(_0x1e9dec,_0x270fd7){return function(_0x2be61d){if(_0x2be61d){var _0x5ccfef=typeof _0x270fd7[_0x85db('0x1a')]===_0x85db('0x1b')&&typeof _0x270fd7[_0x85db('0x1c')]===_0x85db('0x1b');var _0x2ecd71=_0x2be61d[_0x85db('0x1d')];var _0x3209b3=_0x5ccfef?0x0:_0x270fd7['offset'];var _0x37ac04=_0x5ccfef?_0x2be61d[_0x85db('0x1d')]:_0x270fd7[_0x85db('0x1a')]+_0x270fd7[_0x85db('0x1c')];var _0x4d976d;if(_0x37ac04>=_0x2ecd71){_0x37ac04=_0x2ecd71;_0x4d976d=0xc8;}else{_0x4d976d=0xce;}_0x1e9dec[_0x85db('0x17')](_0x4d976d);return _0x1e9dec[_0x85db('0x1e')](_0x85db('0x1f'),_0x3209b3+'-'+_0x37ac04+'/'+_0x2ecd71)[_0x85db('0x19')](_0x2be61d);}return null;};}function patchUpdates(_0x107c10){return function(_0x5c37d7){try{jsonpatch[_0x85db('0x20')](_0x5c37d7,_0x107c10,!![]);}catch(_0x398aa2){return BPromise[_0x85db('0x21')](_0x398aa2);}return _0x5c37d7[_0x85db('0x22')]();};}function saveUpdates(_0x44c122,_0x3842d7){return function(_0x3a7148){if(_0x3a7148){return _0x3a7148[_0x85db('0x23')](_0x44c122)['then'](function(_0xfffea2){return _0xfffea2;});}return null;};}function removeEntity(_0x2534bc,_0x57fe5b){return function(_0x3381ec){if(_0x3381ec){return _0x3381ec[_0x85db('0x24')]()[_0x85db('0x25')](function(){var _0x51c948=_0x3381ec[_0x85db('0x26')]({'plain':!![]});var _0x46f428=_0x85db('0x27');return db['UserProfileResource']['destroy']({'where':{'type':_0x46f428,'resourceId':_0x51c948['id']}})['then'](function(){return _0x3381ec;});})[_0x85db('0x25')](function(){_0x2534bc[_0x85db('0x17')](0xcc)[_0x85db('0x18')]();});}};}function handleEntityNotFound(_0x51b748,_0x71c6f4){return function(_0xc2abb8){if(!_0xc2abb8){_0x51b748[_0x85db('0x16')](0x194);}return _0xc2abb8;};}function handleError(_0x574bcc,_0x5c8ddd){_0x5c8ddd=_0x5c8ddd||0x1f4;return function(_0x299013){logger[_0x85db('0x28')](_0x299013[_0x85db('0x29')]);if(_0x299013[_0x85db('0x2a')]){delete _0x299013[_0x85db('0x2a')];}_0x574bcc[_0x85db('0x17')](_0x5c8ddd)[_0x85db('0x2b')](_0x299013);};}exports[_0x85db('0x2c')]=function(_0x6ee161,_0x1edc8d){var _0x580e90={},_0x4a15b9={},_0x13ad98={'count':0x0,'rows':[]};var _0x5e0e75=_[_0x85db('0x2d')](db[_0x85db('0x2e')]['rawAttributes'],function(_0x1d15b0){return{'name':_0x1d15b0[_0x85db('0x2f')],'type':_0x1d15b0[_0x85db('0x30')][_0x85db('0x31')]};});_0x4a15b9['model']=_[_0x85db('0x2d')](_0x5e0e75,_0x85db('0x2a'));_0x4a15b9[_0x85db('0x32')]=_[_0x85db('0x33')](_0x6ee161[_0x85db('0x32')]);_0x4a15b9['filters']=_[_0x85db('0x34')](_0x4a15b9[_0x85db('0x35')],_0x4a15b9[_0x85db('0x32')]);_0x580e90[_0x85db('0x36')]=_['intersection'](_0x4a15b9[_0x85db('0x35')],qs[_0x85db('0x37')](_0x6ee161[_0x85db('0x32')]['fields']));_0x580e90['attributes']=_0x580e90[_0x85db('0x36')][_0x85db('0x38')]?_0x580e90['attributes']:_0x4a15b9[_0x85db('0x35')];if(!_0x6ee161[_0x85db('0x32')][_0x85db('0x39')](_0x85db('0x3a'))){_0x580e90[_0x85db('0x1c')]=qs[_0x85db('0x1c')](_0x6ee161[_0x85db('0x32')][_0x85db('0x1c')]);_0x580e90[_0x85db('0x1a')]=qs[_0x85db('0x1a')](_0x6ee161[_0x85db('0x32')][_0x85db('0x1a')]);}_0x580e90['order']=qs[_0x85db('0x3b')](_0x6ee161[_0x85db('0x32')][_0x85db('0x3b')]);_0x580e90[_0x85db('0x3c')]=qs['filters'](_[_0x85db('0x3d')](_0x6ee161[_0x85db('0x32')],_0x4a15b9[_0x85db('0x3e')]),_0x5e0e75);if(_0x6ee161[_0x85db('0x32')]['filter']){_0x580e90['where']=_['merge'](_0x580e90['where'],{'$or':_['map'](_0x5e0e75,function(_0x3b9d1b){if(_0x3b9d1b[_0x85db('0x30')]!==_0x85db('0x3f')){var _0x17f649={};_0x17f649[_0x3b9d1b[_0x85db('0x2a')]]={'$like':'%'+_0x6ee161['query']['filter']+'%'};return _0x17f649;}})});}_0x580e90=_[_0x85db('0x40')]({},_0x580e90,_0x6ee161['options']);var _0x9f2d7f={'where':_0x580e90[_0x85db('0x3c')]};return db['Tag']['count'](_0x9f2d7f)[_0x85db('0x25')](function(_0x928808){_0x13ad98[_0x85db('0x1d')]=_0x928808;if(_0x6ee161[_0x85db('0x32')][_0x85db('0x41')]){_0x580e90['include']=[{'all':!![]}];}return db[_0x85db('0x2e')][_0x85db('0x42')](_0x580e90);})[_0x85db('0x25')](function(_0x5be721){_0x13ad98['rows']=_0x5be721;return _0x13ad98;})['then'](respondWithFilteredResult(_0x1edc8d,_0x580e90))[_0x85db('0x43')](handleError(_0x1edc8d,null));};exports[_0x85db('0x44')]=function(_0x116cb3,_0x57677d){var _0x5ef59b={'raw':!![],'where':{'id':_0x116cb3['params']['id']}},_0x3e4dbc={};_0x3e4dbc[_0x85db('0x35')]=_[_0x85db('0x33')](db[_0x85db('0x2e')]['rawAttributes']);_0x3e4dbc[_0x85db('0x32')]=_[_0x85db('0x33')](_0x116cb3[_0x85db('0x32')]);_0x3e4dbc[_0x85db('0x3e')]=_[_0x85db('0x34')](_0x3e4dbc[_0x85db('0x35')],_0x3e4dbc[_0x85db('0x32')]);_0x5ef59b[_0x85db('0x36')]=_[_0x85db('0x34')](_0x3e4dbc['model'],qs[_0x85db('0x37')](_0x116cb3[_0x85db('0x32')][_0x85db('0x37')]));_0x5ef59b[_0x85db('0x36')]=_0x5ef59b[_0x85db('0x36')][_0x85db('0x38')]?_0x5ef59b['attributes']:_0x3e4dbc[_0x85db('0x35')];if(_0x116cb3[_0x85db('0x32')][_0x85db('0x41')]){_0x5ef59b['include']=[{'all':!![]}];}_0x5ef59b=_['merge']({},_0x5ef59b,_0x116cb3[_0x85db('0x45')]);return db['Tag'][_0x85db('0x46')](_0x5ef59b)[_0x85db('0x25')](handleEntityNotFound(_0x57677d,null))[_0x85db('0x25')](respondWithResult(_0x57677d,null))[_0x85db('0x43')](handleError(_0x57677d,null));};exports[_0x85db('0x47')]=function(_0x5e1455,_0x5d44ef){return db[_0x85db('0x2e')][_0x85db('0x47')](_0x5e1455[_0x85db('0x48')],{})[_0x85db('0x25')](function(_0x1b6157){var _0x107882=_0x5e1455[_0x85db('0x49')][_0x85db('0x26')]({'plain':!![]});if(!_0x107882)throw new Error(_0x85db('0x4a'));if(_0x107882[_0x85db('0x4b')]==='user'){var _0x69c505=_0x1b6157[_0x85db('0x26')]({'plain':!![]});var _0x54abf5='Tags';return db[_0x85db('0x4c')][_0x85db('0x46')]({'where':{'name':_0x54abf5,'userProfileId':_0x107882['userProfileId']},'raw':!![]})['then'](function(_0x74b926){if(_0x74b926&&_0x74b926[_0x85db('0x4d')]===0x0){return db['UserProfileResource'][_0x85db('0x47')]({'name':_0x69c505[_0x85db('0x2a')],'resourceId':_0x69c505['id'],'type':_0x74b926[_0x85db('0x2a')],'sectionId':_0x74b926['id']},{})[_0x85db('0x25')](function(){return _0x1b6157;});}else{return _0x1b6157;}})[_0x85db('0x43')](function(_0x2cddad){logger[_0x85db('0x28')](_0x85db('0x4e'),_0x2cddad);throw _0x2cddad;});}return _0x1b6157;})[_0x85db('0x25')](respondWithResult(_0x5d44ef,0xc9))[_0x85db('0x43')](handleError(_0x5d44ef,null));};exports['update']=function(_0x4ef4db,_0x283b13){if(_0x4ef4db[_0x85db('0x48')]['id']){delete _0x4ef4db[_0x85db('0x48')]['id'];}return db[_0x85db('0x2e')][_0x85db('0x46')]({'where':{'id':_0x4ef4db[_0x85db('0x4f')]['id']}})[_0x85db('0x25')](handleEntityNotFound(_0x283b13,null))[_0x85db('0x25')](saveUpdates(_0x4ef4db[_0x85db('0x48')],null))[_0x85db('0x25')](respondWithResult(_0x283b13,null))[_0x85db('0x43')](handleError(_0x283b13,null));};exports[_0x85db('0x24')]=function(_0x198dad,_0x425e61){return db['Tag'][_0x85db('0x46')]({'where':{'id':_0x198dad[_0x85db('0x4f')]['id']}})['then'](handleEntityNotFound(_0x425e61,null))[_0x85db('0x25')](removeEntity(_0x425e61,null))[_0x85db('0x43')](handleError(_0x425e61,null));}; \ No newline at end of file diff --git a/server/api/tag/tag.model.js b/server/api/tag/tag.model.js index 6a85f32..96e1036 100644 --- a/server/api/tag/tag.model.js +++ b/server/api/tag/tag.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7eee=['api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./tag.attributes','exports','define','tools_tags','util'];(function(_0x315d96,_0x38a988){var _0x3df9d6=function(_0x3f38f8){while(--_0x3f38f8){_0x315d96['push'](_0x315d96['shift']());}};_0x3df9d6(++_0x38a988);}(_0x7eee,0x1bb));var _0xe7ee=function(_0x49e48e,_0x4605f4){_0x49e48e=_0x49e48e-0x0;var _0x113b47=_0x7eee[_0x49e48e];return _0x113b47;};'use strict';var _=require('lodash');var util=require(_0xe7ee('0x0'));var logger=require('../../config/logger')(_0xe7ee('0x1'));var moment=require(_0xe7ee('0x2'));var BPromise=require(_0xe7ee('0x3'));var rp=require(_0xe7ee('0x4'));var fs=require('fs');var path=require(_0xe7ee('0x5'));var rimraf=require(_0xe7ee('0x6'));var config=require(_0xe7ee('0x7'));var attributes=require(_0xe7ee('0x8'));module[_0xe7ee('0x9')]=function(_0x3760a8,_0xd83e92){return _0x3760a8[_0xe7ee('0xa')]('Tag',attributes,{'tableName':_0xe7ee('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x741d=['path','../../config/environment','./tag.attributes','exports','define','Tag','tools_tags','lodash','../../config/logger','api','bluebird'];(function(_0x25d106,_0x3e18b0){var _0x4be49b=function(_0x44955a){while(--_0x44955a){_0x25d106['push'](_0x25d106['shift']());}};_0x4be49b(++_0x3e18b0);}(_0x741d,0xc2));var _0xd741=function(_0x2ac299,_0xd755b1){_0x2ac299=_0x2ac299-0x0;var _0x4abd46=_0x741d[_0x2ac299];return _0x4abd46;};'use strict';var _=require(_0xd741('0x0'));var util=require('util');var logger=require(_0xd741('0x1'))(_0xd741('0x2'));var moment=require('moment');var BPromise=require(_0xd741('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xd741('0x4'));var rimraf=require('rimraf');var config=require(_0xd741('0x5'));var attributes=require(_0xd741('0x6'));module[_0xd741('0x7')]=function(_0x5587c9,_0xd3a457){return _0x5587c9[_0xd741('0x8')](_0xd741('0x9'),attributes,{'tableName':_0xd741('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/tag/tag.rpc.js b/server/api/tag/tag.rpc.js index a5d1f6d..693dde9 100644 --- a/server/api/tag/tag.rpc.js +++ b/server/api/tag/tag.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc3fe=['result','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','http','request','then','info','request\x20sent','debug','Tag,\x20%s,\x20%s,\x20%s','stringify','error','code','Tag,\x20%s,\x20%s','message'];(function(_0x22b39b,_0x2b7d63){var _0x280e1d=function(_0xc74635){while(--_0xc74635){_0x22b39b['push'](_0x22b39b['shift']());}};_0x280e1d(++_0x2b7d63);}(_0xc3fe,0xff));var _0xec3f=function(_0x46825c,_0x4505e2){_0x46825c=_0x46825c-0x0;var _0xc29a5a=_0xc3fe[_0x46825c];return _0xc29a5a;};'use strict';var _=require(_0xec3f('0x0'));var util=require(_0xec3f('0x1'));var moment=require(_0xec3f('0x2'));var BPromise=require('bluebird');var rs=require(_0xec3f('0x3'));var fs=require('fs');var Redis=require(_0xec3f('0x4'));var db=require(_0xec3f('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xec3f('0x6'))(_0xec3f('0x7'));var config=require(_0xec3f('0x8'));var jayson=require('jayson/promise');var client=jayson['client'][_0xec3f('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x3b0b84,_0x526183,_0x503775){return new BPromise(function(_0xcb8557,_0x5df7fc){return client[_0xec3f('0xa')](_0x3b0b84,_0x503775)[_0xec3f('0xb')](function(_0x12a7c5){logger[_0xec3f('0xc')]('Tag,\x20%s,\x20%s',_0x526183,_0xec3f('0xd'));logger[_0xec3f('0xe')](_0xec3f('0xf'),_0x526183,_0xec3f('0xd'),JSON[_0xec3f('0x10')](_0x12a7c5));if(_0x12a7c5[_0xec3f('0x11')]){if(_0x12a7c5['error'][_0xec3f('0x12')]===0x1f4){logger[_0xec3f('0x11')](_0xec3f('0x13'),_0x526183,_0x12a7c5['error']['message']);return _0x5df7fc(_0x12a7c5[_0xec3f('0x11')]['message']);}logger['error'](_0xec3f('0x13'),_0x526183,_0x12a7c5[_0xec3f('0x11')][_0xec3f('0x14')]);return _0xcb8557(_0x12a7c5['error']['message']);}else{logger[_0xec3f('0xc')]('Tag,\x20%s,\x20%s',_0x526183,_0xec3f('0xd'));_0xcb8557(_0x12a7c5[_0xec3f('0x15')]['message']);}})[_0xec3f('0x16')](function(_0xb8ee6f){logger[_0xec3f('0x11')](_0xec3f('0x13'),_0x526183,_0xb8ee6f);_0x5df7fc(_0xb8ee6f);});});} \ No newline at end of file +var _0x524a=['request\x20sent','result','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','client','request','then','info','Tag,\x20%s,\x20%s','debug','Tag,\x20%s,\x20%s,\x20%s','error','code','message'];(function(_0x3b380d,_0x4bf247){var _0x54502b=function(_0x35d207){while(--_0x35d207){_0x3b380d['push'](_0x3b380d['shift']());}};_0x54502b(++_0x4bf247);}(_0x524a,0xf5));var _0xa524=function(_0x58f773,_0xcbcc00){_0x58f773=_0x58f773-0x0;var _0x47eebd=_0x524a[_0x58f773];return _0x47eebd;};'use strict';var _=require(_0xa524('0x0'));var util=require(_0xa524('0x1'));var moment=require(_0xa524('0x2'));var BPromise=require(_0xa524('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xa524('0x4'));var db=require(_0xa524('0x5'))['db'];var utils=require(_0xa524('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0xa524('0x7'));var jayson=require(_0xa524('0x8'));var client=jayson[_0xa524('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x460738,_0x56bd0e,_0x3a2dd6){return new BPromise(function(_0x11aa98,_0x56849e){return client[_0xa524('0xa')](_0x460738,_0x3a2dd6)[_0xa524('0xb')](function(_0x228ffe){logger[_0xa524('0xc')](_0xa524('0xd'),_0x56bd0e,'request\x20sent');logger[_0xa524('0xe')](_0xa524('0xf'),_0x56bd0e,'request\x20sent',JSON['stringify'](_0x228ffe));if(_0x228ffe[_0xa524('0x10')]){if(_0x228ffe[_0xa524('0x10')][_0xa524('0x11')]===0x1f4){logger['error']('Tag,\x20%s,\x20%s',_0x56bd0e,_0x228ffe[_0xa524('0x10')]['message']);return _0x56849e(_0x228ffe[_0xa524('0x10')]['message']);}logger[_0xa524('0x10')]('Tag,\x20%s,\x20%s',_0x56bd0e,_0x228ffe[_0xa524('0x10')][_0xa524('0x12')]);return _0x11aa98(_0x228ffe['error'][_0xa524('0x12')]);}else{logger[_0xa524('0xc')](_0xa524('0xd'),_0x56bd0e,_0xa524('0x13'));_0x11aa98(_0x228ffe[_0xa524('0x14')][_0xa524('0x12')]);}})[_0xa524('0x15')](function(_0x4fc42f){logger[_0xa524('0x10')](_0xa524('0xd'),_0x56bd0e,_0x4fc42f);_0x56849e(_0x4fc42f);});});} \ No newline at end of file diff --git a/server/api/team/index.js b/server/api/team/index.js index 4db6632..f277593 100644 --- a/server/api/team/index.js +++ b/server/api/team/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./team.controller','get','index','/:id','getQueues','/:id/users','isAuthenticated','getAgents','post','addQueues','addAgents','update','delete','removeAgents','multer','util','path'];(function(_0x4b369d,_0x265eb8){var _0x571a98=function(_0x56341a){while(--_0x56341a){_0x4b369d['push'](_0x4b369d['shift']());}};_0x571a98(++_0x265eb8);}(_0xa9e0,0x123));var _0x0a9e=function(_0x1da04e,_0x31024b){_0x1da04e=_0x1da04e-0x0;var _0xdd8c41=_0xa9e0[_0x1da04e];return _0xdd8c41;};'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('0x8')]('/:id/queues',auth['isAuthenticated'](),controller[_0x0a9e('0xb')]);router[_0x0a9e('0x8')](_0x0a9e('0xc'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0xe')]);router[_0x0a9e('0xf')]('/',auth['isAuthenticated'](),controller['create']);router['post']('/:id/queues',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x10')]);router[_0x0a9e('0xf')](_0x0a9e('0xc'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x11')]);router['put'](_0x0a9e('0xa'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x12')]);router[_0x0a9e('0x13')](_0x0a9e('0xa'),auth[_0x0a9e('0xd')](),controller['destroy']);router[_0x0a9e('0x13')]('/:id/queues',auth[_0x0a9e('0xd')](),controller['removeQueues']);router[_0x0a9e('0x13')](_0x0a9e('0xc'),auth['isAuthenticated'](),controller[_0x0a9e('0x14')]);module['exports']=router; \ No newline at end of file +var _0xa9e0=['Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./team.controller','get','index','/:id','getQueues','/:id/users','isAuthenticated','getAgents','post','addQueues','addAgents','update','delete','removeAgents','multer','util','path'];(function(_0x46698a,_0x8de1e4){var _0x356db0=function(_0x19e83c){while(--_0x19e83c){_0x46698a['push'](_0x46698a['shift']());}};_0x356db0(++_0x8de1e4);}(_0xa9e0,0x123));var _0x0a9e=function(_0x187ee1,_0x3fd1e6){_0x187ee1=_0x187ee1-0x0;var _0x388160=_0xa9e0[_0x187ee1];return _0x388160;};'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('0x8')]('/:id/queues',auth['isAuthenticated'](),controller[_0x0a9e('0xb')]);router[_0x0a9e('0x8')](_0x0a9e('0xc'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0xe')]);router[_0x0a9e('0xf')]('/',auth['isAuthenticated'](),controller['create']);router['post']('/:id/queues',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x10')]);router[_0x0a9e('0xf')](_0x0a9e('0xc'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x11')]);router['put'](_0x0a9e('0xa'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x12')]);router[_0x0a9e('0x13')](_0x0a9e('0xa'),auth[_0x0a9e('0xd')](),controller['destroy']);router[_0x0a9e('0x13')]('/:id/queues',auth[_0x0a9e('0xd')](),controller['removeQueues']);router[_0x0a9e('0x13')](_0x0a9e('0xc'),auth['isAuthenticated'](),controller[_0x0a9e('0x14')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/team/team.attributes.js b/server/api/team/team.attributes.js index 9bf336e..059559d 100644 --- a/server/api/team/team.attributes.js +++ b/server/api/team/team.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0713=['STRING','name'];(function(_0x398c94,_0x5630f9){var _0x162c37=function(_0x211ae9){while(--_0x211ae9){_0x398c94['push'](_0x398c94['shift']());}};_0x162c37(++_0x5630f9);}(_0x0713,0x1ba));var _0x3071=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0713[_0x3dd15e];return _0x231fd0;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0x3071('0x0')],'allowNull':![],'unique':_0x3071('0x1')},'description':{'type':Sequelize[_0x3071('0x0')]}}; \ No newline at end of file +var _0x2032=['name','exports','STRING'];(function(_0x4278e9,_0x4eff15){var _0x3004cc=function(_0x28ac78){while(--_0x28ac78){_0x4278e9['push'](_0x4278e9['shift']());}};_0x3004cc(++_0x4eff15);}(_0x2032,0xd9));var _0x2203=function(_0x4da1d9,_0x95bd){_0x4da1d9=_0x4da1d9-0x0;var _0x343679=_0x2032[_0x4da1d9];return _0x343679;};'use strict';var Sequelize=require('sequelize');module[_0x2203('0x0')]={'name':{'type':Sequelize[_0x2203('0x1')],'allowNull':![],'unique':_0x2203('0x2')},'description':{'type':Sequelize['STRING']}}; \ No newline at end of file diff --git a/server/api/team/team.controller.js b/server/api/team/team.controller.js index eddcfd0..df278f0 100644 --- a/server/api/team/team.controller.js +++ b/server/api/team/team.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb114=['interface','UserVoiceQueueRt','isNil','SIP/%s','all','spread','removeAgents','Mail','Whatsapp','getAgents','hasOwnProperty','eml-format','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','localhost','socket.io-emitter','./team.socket','register','status','end','json','offset','undefined','limit','set','Content-Range','apply','reject','save','update','destroy','then','get','Teams','UserProfileResource','sendStatus','error','stack','name','send','index','map','fieldName','type','key','model','keys','query','filters','intersection','fields','length','attributes','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','count','includeAll','include','findAll','rows','show','params','Team','rawAttributes','find','catch','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','getQueues','findOne','channel','Sequelize','ValidationError','toLowerCase','Queue','capitalize','Queues','addQueues','isValidChannel','Unknown\x20channel','add','ids','removeQueues','remove','addAgents','Voice','Chat','Sms','Fax','Openchannel','sequelize','transaction','penalty','QueueId','defaults','TeamVoiceQueue','User','emit','Queue:save','online','voicePause'];(function(_0x44e5bb,_0x2b2d42){var _0x581e34=function(_0x37a585){while(--_0x37a585){_0x44e5bb['push'](_0x44e5bb['shift']());}};_0x581e34(++_0x2b2d42);}(_0xb114,0x11f));var _0x4b11=function(_0x5416db,_0x55683a){_0x5416db=_0x5416db-0x0;var _0x243e35=_0xb114[_0x5416db];return _0x243e35;};'use strict';var emlformat=require(_0x4b11('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x4b11('0x1'));var jsonpatch=require(_0x4b11('0x2'));var rp=require('request-promise');var moment=require(_0x4b11('0x3'));var BPromise=require(_0x4b11('0x4'));var Mustache=require(_0x4b11('0x5'));var util=require(_0x4b11('0x6'));var path=require(_0x4b11('0x7'));var sox=require(_0x4b11('0x8'));var csv=require('to-csv');var ejs=require(_0x4b11('0x9'));var fs=require('fs');var fs_extra=require(_0x4b11('0xa'));var _=require(_0x4b11('0xb'));var squel=require(_0x4b11('0xc'));var crypto=require(_0x4b11('0xd'));var jsforce=require(_0x4b11('0xe'));var deskjs=require(_0x4b11('0xf'));var toCsv=require('to-csv');var querystring=require(_0x4b11('0x10'));var Papa=require('papaparse');var Redis=require(_0x4b11('0x11'));var authService=require(_0x4b11('0x12'));var qs=require(_0x4b11('0x13'));var as=require(_0x4b11('0x14'));var hardwareService=require(_0x4b11('0x15'));var logger=require(_0x4b11('0x16'))('api');var utils=require(_0x4b11('0x17'));var config=require(_0x4b11('0x18'));var licenseUtil=require(_0x4b11('0x19'));var db=require(_0x4b11('0x1a'))['db'];config['redis']=_['defaults'](config[_0x4b11('0x1b')],{'host':_0x4b11('0x1c'),'port':0x18eb});var socket=require(_0x4b11('0x1d'))(new Redis(config[_0x4b11('0x1b')]));require(_0x4b11('0x1e'))[_0x4b11('0x1f')](socket);function respondWithStatusCode(_0x3f8523,_0x1981eb){_0x1981eb=_0x1981eb||0xcc;return function(_0x5a94d1){if(_0x5a94d1){return _0x3f8523['sendStatus'](_0x1981eb);}return _0x3f8523[_0x4b11('0x20')](_0x1981eb)[_0x4b11('0x21')]();};}function respondWithResult(_0x3910c7,_0x591817){_0x591817=_0x591817||0xc8;return function(_0x4b5fac){if(_0x4b5fac){return _0x3910c7['status'](_0x591817)[_0x4b11('0x22')](_0x4b5fac);}};}function respondWithFilteredResult(_0x4a573f,_0x2eb40c){return function(_0xf14a7f){if(_0xf14a7f){var _0xa67776=typeof _0x2eb40c[_0x4b11('0x23')]===_0x4b11('0x24')&&typeof _0x2eb40c[_0x4b11('0x25')]===_0x4b11('0x24');var _0x2f2f6b=_0xf14a7f['count'];var _0x188de5=_0xa67776?0x0:_0x2eb40c[_0x4b11('0x23')];var _0x34b94f=_0xa67776?_0xf14a7f['count']:_0x2eb40c[_0x4b11('0x23')]+_0x2eb40c['limit'];var _0x32021a;if(_0x34b94f>=_0x2f2f6b){_0x34b94f=_0x2f2f6b;_0x32021a=0xc8;}else{_0x32021a=0xce;}_0x4a573f[_0x4b11('0x20')](_0x32021a);return _0x4a573f[_0x4b11('0x26')](_0x4b11('0x27'),_0x188de5+'-'+_0x34b94f+'/'+_0x2f2f6b)[_0x4b11('0x22')](_0xf14a7f);}return null;};}function patchUpdates(_0x28b219){return function(_0xcaeb34){try{jsonpatch[_0x4b11('0x28')](_0xcaeb34,_0x28b219,!![]);}catch(_0x34aeae){return BPromise[_0x4b11('0x29')](_0x34aeae);}return _0xcaeb34[_0x4b11('0x2a')]();};}function saveUpdates(_0x49a69c,_0x34212b){return function(_0x5882c7){if(_0x5882c7){return _0x5882c7[_0x4b11('0x2b')](_0x49a69c)['then'](function(_0x479e85){return _0x479e85;});}return null;};}function removeEntity(_0x32bc7e,_0x3c0a9c){return function(_0x39c860){if(_0x39c860){return _0x39c860[_0x4b11('0x2c')]()[_0x4b11('0x2d')](function(){var _0x5b904a=_0x39c860[_0x4b11('0x2e')]({'plain':!![]});var _0x24a5fe=_0x4b11('0x2f');return db[_0x4b11('0x30')][_0x4b11('0x2c')]({'where':{'type':_0x24a5fe,'resourceId':_0x5b904a['id']}})[_0x4b11('0x2d')](function(){return _0x39c860;});})[_0x4b11('0x2d')](function(){_0x32bc7e[_0x4b11('0x20')](0xcc)['end']();});}};}function handleEntityNotFound(_0x22948f,_0x15d27d){return function(_0x4ff92d){if(!_0x4ff92d){_0x22948f[_0x4b11('0x31')](0x194);}return _0x4ff92d;};}function handleError(_0x37301d,_0x3d4f7d){_0x3d4f7d=_0x3d4f7d||0x1f4;return function(_0x1ccf89){logger[_0x4b11('0x32')](_0x1ccf89[_0x4b11('0x33')]);if(_0x1ccf89[_0x4b11('0x34')]){delete _0x1ccf89['name'];}_0x37301d[_0x4b11('0x20')](_0x3d4f7d)[_0x4b11('0x35')](_0x1ccf89);};}exports[_0x4b11('0x36')]=function(_0x4db0ed,_0x5bc9ab){var _0x1c37fb={},_0x36f517={},_0x3c98a4={'count':0x0,'rows':[]};var _0x72ed0e=_[_0x4b11('0x37')](db['Team']['rawAttributes'],function(_0x44626b){return{'name':_0x44626b[_0x4b11('0x38')],'type':_0x44626b[_0x4b11('0x39')][_0x4b11('0x3a')]};});_0x36f517[_0x4b11('0x3b')]=_[_0x4b11('0x37')](_0x72ed0e,_0x4b11('0x34'));_0x36f517['query']=_[_0x4b11('0x3c')](_0x4db0ed[_0x4b11('0x3d')]);_0x36f517[_0x4b11('0x3e')]=_[_0x4b11('0x3f')](_0x36f517[_0x4b11('0x3b')],_0x36f517['query']);_0x1c37fb['attributes']=_[_0x4b11('0x3f')](_0x36f517[_0x4b11('0x3b')],qs[_0x4b11('0x40')](_0x4db0ed[_0x4b11('0x3d')]['fields']));_0x1c37fb['attributes']=_0x1c37fb['attributes'][_0x4b11('0x41')]?_0x1c37fb[_0x4b11('0x42')]:_0x36f517['model'];if(!_0x4db0ed[_0x4b11('0x3d')]['hasOwnProperty'](_0x4b11('0x43'))){_0x1c37fb[_0x4b11('0x25')]=qs[_0x4b11('0x25')](_0x4db0ed[_0x4b11('0x3d')][_0x4b11('0x25')]);_0x1c37fb[_0x4b11('0x23')]=qs[_0x4b11('0x23')](_0x4db0ed[_0x4b11('0x3d')][_0x4b11('0x23')]);}_0x1c37fb[_0x4b11('0x44')]=qs['sort'](_0x4db0ed['query'][_0x4b11('0x45')]);_0x1c37fb[_0x4b11('0x46')]=qs[_0x4b11('0x3e')](_[_0x4b11('0x47')](_0x4db0ed[_0x4b11('0x3d')],_0x36f517[_0x4b11('0x3e')]),_0x72ed0e);if(_0x4db0ed[_0x4b11('0x3d')][_0x4b11('0x48')]){_0x1c37fb[_0x4b11('0x46')]=_[_0x4b11('0x49')](_0x1c37fb['where'],{'$or':_['map'](_0x72ed0e,function(_0x56e60d){if(_0x56e60d[_0x4b11('0x39')]!==_0x4b11('0x4a')){var _0x8f7bd7={};_0x8f7bd7[_0x56e60d[_0x4b11('0x34')]]={'$like':'%'+_0x4db0ed[_0x4b11('0x3d')][_0x4b11('0x48')]+'%'};return _0x8f7bd7;}})});}_0x1c37fb=_[_0x4b11('0x49')]({},_0x1c37fb,_0x4db0ed[_0x4b11('0x4b')]);var _0x475b34={'where':_0x1c37fb[_0x4b11('0x46')]};return db['Team'][_0x4b11('0x4c')](_0x475b34)[_0x4b11('0x2d')](function(_0x58e4ba){_0x3c98a4[_0x4b11('0x4c')]=_0x58e4ba;if(_0x4db0ed[_0x4b11('0x3d')][_0x4b11('0x4d')]){_0x1c37fb[_0x4b11('0x4e')]=[{'all':!![]}];}return db['Team'][_0x4b11('0x4f')](_0x1c37fb);})[_0x4b11('0x2d')](function(_0x550d4f){_0x3c98a4[_0x4b11('0x50')]=_0x550d4f;return _0x3c98a4;})[_0x4b11('0x2d')](respondWithFilteredResult(_0x5bc9ab,_0x1c37fb))['catch'](handleError(_0x5bc9ab,null));};exports[_0x4b11('0x51')]=function(_0x27bb2b,_0x43a35b){var _0x5cf717={'raw':![],'where':{'id':_0x27bb2b[_0x4b11('0x52')]['id']}},_0x2f51b2={};_0x2f51b2['model']=_[_0x4b11('0x3c')](db[_0x4b11('0x53')][_0x4b11('0x54')]);_0x2f51b2[_0x4b11('0x3d')]=_[_0x4b11('0x3c')](_0x27bb2b[_0x4b11('0x3d')]);_0x2f51b2[_0x4b11('0x3e')]=_['intersection'](_0x2f51b2['model'],_0x2f51b2[_0x4b11('0x3d')]);_0x5cf717[_0x4b11('0x42')]=_[_0x4b11('0x3f')](_0x2f51b2[_0x4b11('0x3b')],qs[_0x4b11('0x40')](_0x27bb2b[_0x4b11('0x3d')]['fields']));_0x5cf717[_0x4b11('0x42')]=_0x5cf717['attributes'][_0x4b11('0x41')]?_0x5cf717[_0x4b11('0x42')]:_0x2f51b2[_0x4b11('0x3b')];if(_0x27bb2b[_0x4b11('0x3d')][_0x4b11('0x4d')]){_0x5cf717[_0x4b11('0x4e')]=[{'all':!![]}];}_0x5cf717=_[_0x4b11('0x49')]({},_0x5cf717,_0x27bb2b[_0x4b11('0x4b')]);return db[_0x4b11('0x53')][_0x4b11('0x55')](_0x5cf717)['then'](handleEntityNotFound(_0x43a35b,null))['then'](respondWithResult(_0x43a35b,null))[_0x4b11('0x56')](handleError(_0x43a35b,null));};exports[_0x4b11('0x57')]=function(_0x194717,_0x1ed06d){return db[_0x4b11('0x53')][_0x4b11('0x57')](_0x194717['body'],{})['then'](function(_0x5b1ca6){var _0x3f3c31=_0x194717[_0x4b11('0x58')]['get']({'plain':!![]});if(!_0x3f3c31)throw new Error(_0x4b11('0x59'));if(_0x3f3c31[_0x4b11('0x5a')]==='user'){var _0x276ce8=_0x5b1ca6['get']({'plain':!![]});var _0x30bf20=_0x4b11('0x2f');return db['UserProfileSection'][_0x4b11('0x55')]({'where':{'name':_0x30bf20,'userProfileId':_0x3f3c31[_0x4b11('0x5b')]},'raw':!![]})[_0x4b11('0x2d')](function(_0x3cb3c9){if(_0x3cb3c9&&_0x3cb3c9['autoAssociation']===0x0){return db['UserProfileResource']['create']({'name':_0x276ce8[_0x4b11('0x34')],'resourceId':_0x276ce8['id'],'type':_0x3cb3c9['name'],'sectionId':_0x3cb3c9['id']},{})[_0x4b11('0x2d')](function(){return _0x5b1ca6;});}else{return _0x5b1ca6;}})[_0x4b11('0x56')](function(_0x5e2cb4){logger['error'](_0x4b11('0x5c'),_0x5e2cb4);throw _0x5e2cb4;});}return _0x5b1ca6;})['then'](respondWithResult(_0x1ed06d,0xc9))[_0x4b11('0x56')](handleError(_0x1ed06d,null));};exports[_0x4b11('0x2b')]=function(_0x1d42fe,_0x2bb06a){if(_0x1d42fe[_0x4b11('0x5d')]['id']){delete _0x1d42fe[_0x4b11('0x5d')]['id'];}return db[_0x4b11('0x53')]['find']({'where':{'id':_0x1d42fe[_0x4b11('0x52')]['id']}})['then'](handleEntityNotFound(_0x2bb06a,null))[_0x4b11('0x2d')](saveUpdates(_0x1d42fe[_0x4b11('0x5d')],null))[_0x4b11('0x2d')](respondWithResult(_0x2bb06a,null))[_0x4b11('0x56')](handleError(_0x2bb06a,null));};exports[_0x4b11('0x2c')]=function(_0x282b7d,_0x211195){return db['Team'][_0x4b11('0x55')]({'where':{'id':_0x282b7d['params']['id']}})[_0x4b11('0x2d')](handleEntityNotFound(_0x211195,null))[_0x4b11('0x2d')](removeEntity(_0x211195,null))[_0x4b11('0x56')](handleError(_0x211195,null));};exports[_0x4b11('0x5e')]=function(_0x3b732d,_0x3b8795,_0x365577){return db[_0x4b11('0x53')][_0x4b11('0x5f')]({'where':{'id':_0x3b732d['params']['id']}})[_0x4b11('0x2d')](handleEntityNotFound(_0x3b8795,null))[_0x4b11('0x2d')](function(_0xbc07d6){if(!_0x3b732d[_0x4b11('0x3d')]['channel']||!utils['isValidChannel'](_0x3b732d[_0x4b11('0x3d')][_0x4b11('0x60')])){throw new db[(_0x4b11('0x61'))][(_0x4b11('0x62'))]('Unknown\x20channel');}var _0x1b0592={};var _0x422428={};_0x422428[_0x4b11('0x3b')]=_[_0x4b11('0x3c')](db[_['capitalize'](_0x3b732d['query'][_0x4b11('0x60')][_0x4b11('0x63')]())+_0x4b11('0x64')][_0x4b11('0x54')]);_0x422428[_0x4b11('0x3d')]=_[_0x4b11('0x3c')](_0x3b732d['query']);_0x422428[_0x4b11('0x3e')]=_['intersection'](_0x422428[_0x4b11('0x3b')],_0x422428[_0x4b11('0x3d')]);_0x1b0592[_0x4b11('0x42')]=_[_0x4b11('0x3f')](_0x422428[_0x4b11('0x3b')],qs[_0x4b11('0x40')](_0x3b732d[_0x4b11('0x3d')][_0x4b11('0x40')]));_0x1b0592[_0x4b11('0x42')]=_0x1b0592['attributes'][_0x4b11('0x41')]?_0x1b0592[_0x4b11('0x42')]:_0x422428[_0x4b11('0x3b')];_0x1b0592['limit']=qs['limit'](_0x3b732d[_0x4b11('0x3d')][_0x4b11('0x25')]);_0x1b0592[_0x4b11('0x23')]=qs[_0x4b11('0x23')](_0x3b732d[_0x4b11('0x3d')][_0x4b11('0x23')]);_0x1b0592[_0x4b11('0x44')]=qs[_0x4b11('0x45')](_0x3b732d[_0x4b11('0x3d')][_0x4b11('0x45')]);_0x1b0592['where']=qs['filters'](_[_0x4b11('0x47')](_0x3b732d[_0x4b11('0x3d')],_0x422428[_0x4b11('0x3e')]));_0x1b0592=_[_0x4b11('0x49')]({},_0x1b0592,_0x3b732d[_0x4b11('0x4b')]);return _0xbc07d6[_0x4b11('0x2e')+_[_0x4b11('0x65')](_0x3b732d['query'][_0x4b11('0x60')][_0x4b11('0x63')]())+_0x4b11('0x66')](_0x1b0592);})[_0x4b11('0x2d')](respondWithResult(_0x3b8795,null))[_0x4b11('0x56')](handleError(_0x3b8795,null));};exports[_0x4b11('0x67')]=function(_0x57e841,_0x5e9eda,_0xb59223){return db[_0x4b11('0x53')][_0x4b11('0x5f')]({'where':{'id':_0x57e841[_0x4b11('0x52')]['id']}})['then'](function(_0x5458c3){if(_0x5458c3){if(!_0x57e841[_0x4b11('0x5d')][_0x4b11('0x60')]||!utils[_0x4b11('0x68')](_0x57e841['body'][_0x4b11('0x60')])){throw new db['Sequelize'][(_0x4b11('0x62'))](_0x4b11('0x69'));}return _0x5458c3[_0x4b11('0x6a')+_[_0x4b11('0x65')](_0x57e841[_0x4b11('0x5d')]['channel']['toLowerCase']())+_0x4b11('0x66')](_0x57e841[_0x4b11('0x5d')][_0x4b11('0x6b')]);}return null;})[_0x4b11('0x2d')](handleEntityNotFound(_0x5e9eda,null))[_0x4b11('0x2d')](respondWithStatusCode(_0x5e9eda,null))[_0x4b11('0x56')](handleError(_0x5e9eda,null));};exports[_0x4b11('0x6c')]=function(_0xa1fbd5,_0xffa80b,_0x2ae7b0){return db[_0x4b11('0x53')][_0x4b11('0x5f')]({'where':{'id':_0xa1fbd5[_0x4b11('0x52')]['id']}})['then'](function(_0x48fc1b){if(_0x48fc1b){if(!_0xa1fbd5[_0x4b11('0x3d')][_0x4b11('0x60')]||!utils[_0x4b11('0x68')](_0xa1fbd5[_0x4b11('0x3d')]['channel'])){throw new db[(_0x4b11('0x61'))]['ValidationError'](_0x4b11('0x69'));}return _0x48fc1b[_0x4b11('0x6d')+_[_0x4b11('0x65')](_0xa1fbd5[_0x4b11('0x3d')]['channel'][_0x4b11('0x63')]())+'Queues'](_0xa1fbd5[_0x4b11('0x3d')][_0x4b11('0x6b')]);}return null;})['then'](handleEntityNotFound(_0xffa80b,null))[_0x4b11('0x2d')](respondWithStatusCode(_0xffa80b,null))[_0x4b11('0x56')](handleError(_0xffa80b,null));};exports[_0x4b11('0x6e')]=function(_0x26cfc1,_0x10e03c){return db[_0x4b11('0x53')][_0x4b11('0x55')]({'where':{'id':_0x26cfc1['params']['id']}})['then'](handleEntityNotFound(_0x10e03c,null))[_0x4b11('0x2d')](function(_0x569bc7){if(_0x569bc7){var _0x39cf25=[_0x4b11('0x6f'),_0x4b11('0x70'),'Mail',_0x4b11('0x71'),_0x4b11('0x72'),_0x4b11('0x73'),'Whatsapp'];return db[_0x4b11('0x74')][_0x4b11('0x75')](function(_0xd2e55c){var _0x2a8acd=_[_0x4b11('0x37')](_0x39cf25,function(_0xe9b43a){var _0x275084={'attributes':['id',_0x4b11('0x34')]};if(_0xe9b43a==='Voice'){_0x275084['through']={'attributes':[_0x4b11('0x76')]};}return _0x569bc7[_0x4b11('0x2e')+_0xe9b43a+'Queues'](_0x275084)['then'](function(_0x5f44b4){var _0x2245fb=_['map'](_0x5f44b4,function(_0x183de3){var _0x5482af=_['map'](_0x26cfc1[_0x4b11('0x5d')]['ids'],function(_0x188773){var _0x3db49c={'where':{'UserId':_0x188773,[_0xe9b43a+_0x4b11('0x77')]:_0x183de3['id']},'transaction':_0xd2e55c};if(_0xe9b43a===_0x4b11('0x6f')){_0x3db49c[_0x4b11('0x78')]={'penalty':_0x183de3[_0x4b11('0x79')][_0x4b11('0x76')]};}return db[_0x4b11('0x7a')+_0xe9b43a+_0x4b11('0x64')]['findOrCreate'](_0x3db49c)['then'](function(){socket[_0x4b11('0x7b')](_0x4b11('0x58')+_0xe9b43a+_0x4b11('0x7c'),{'UserId':_0x188773,[_0xe9b43a+_0x4b11('0x77')]:_0x183de3['id']});if(_0xe9b43a!==_0x4b11('0x6f'))return;return db['User'][_0x4b11('0x4f')]({'where':{'id':_0x26cfc1[_0x4b11('0x5d')][_0x4b11('0x6b')],'online':0x1},'attributes':['id','name',_0x4b11('0x7d'),_0x4b11('0x7e'),_0x4b11('0x7f')],'raw':!![]})['then'](function(_0x202835){var _0x27f835=_[_0x4b11('0x37')](_0x202835,function(_0x2d25c9){return db[_0x4b11('0x80')]['upsert']({'membername':_0x2d25c9[_0x4b11('0x34')],'UserId':_0x2d25c9['id'],'queue_name':_0x183de3[_0x4b11('0x34')],'VoiceQueueId':_0x183de3['id'],'interface':_[_0x4b11('0x81')](_0x2d25c9[_0x4b11('0x7f')])?util['format'](_0x4b11('0x82'),_0x2d25c9[_0x4b11('0x34')]):_0x2d25c9['interface'],'paused':_0x2d25c9[_0x4b11('0x7e')]||![],'penalty':_0x183de3[_0x4b11('0x79')][_0x4b11('0x76')]},{'transaction':_0xd2e55c});});return Promise[_0x4b11('0x83')](_0x27f835);});});});return Promise[_0x4b11('0x83')](_0x5482af);});return Promise[_0x4b11('0x83')](_0x2245fb);});});return Promise[_0x4b11('0x83')](_0x2a8acd)[_0x4b11('0x2d')](function(){return _0x569bc7[_0x4b11('0x6e')](_0x26cfc1[_0x4b11('0x5d')]['ids'],{'transaction':_0xd2e55c})[_0x4b11('0x84')](function(_0x4e5574){return _0x4e5574;});});});}})[_0x4b11('0x2d')](respondWithResult(_0x10e03c,null))[_0x4b11('0x56')](handleError(_0x10e03c,null));};exports[_0x4b11('0x85')]=function(_0x256243,_0x21689b){return db[_0x4b11('0x53')][_0x4b11('0x55')]({'where':{'id':_0x256243['params']['id']}})['then'](handleEntityNotFound(_0x21689b,null))[_0x4b11('0x2d')](function(_0x1bcd2e){if(_0x1bcd2e){var _0x3330b5=[_0x4b11('0x6f'),'Chat',_0x4b11('0x86'),'Sms',_0x4b11('0x72'),_0x4b11('0x73'),_0x4b11('0x87')];return db[_0x4b11('0x74')][_0x4b11('0x75')](function(_0xeb5b73){var _0xa4ab7c=_['map'](_0x3330b5,function(_0x14ed05){var _0x34a3ec={'attributes':['id',_0x4b11('0x34')]};return _0x1bcd2e[_0x4b11('0x2e')+_0x14ed05+'Queues'](_0x34a3ec)[_0x4b11('0x2d')](function(_0x4374fb){var _0x376278=_[_0x4b11('0x37')](_0x4374fb,function(_0x4aa92d){return _0x4aa92d['removeAgents'](_0x256243['query'][_0x4b11('0x6b')],{'transaction':_0xeb5b73})['then'](function(){var _0x325ea3=JSON['parse']('['+_0x256243[_0x4b11('0x3d')]['ids']+']');var _0xc7ad9d=_[_0x4b11('0x37')](_0x325ea3,function(_0x547c4b){socket['emit'](_0x4b11('0x58')+_0x14ed05+'Queue:remove',{'UserId':Number(_0x547c4b),[_0x14ed05+_0x4b11('0x77')]:_0x4aa92d['id']});if(_0x14ed05!==_0x4b11('0x6f'))return;return db[_0x4b11('0x80')][_0x4b11('0x2c')]({'where':{'VoiceQueueId':_0x4aa92d['id'],'UserId':_0x547c4b},'transaction':_0xeb5b73});});return Promise[_0x4b11('0x83')](_0xc7ad9d);});});return Promise['all'](_0x376278);});});return Promise['all'](_0xa4ab7c)[_0x4b11('0x2d')](function(){return _0x1bcd2e[_0x4b11('0x85')](_0x256243[_0x4b11('0x3d')][_0x4b11('0x6b')],{'transaction':_0xeb5b73});});});}})[_0x4b11('0x2d')](respondWithStatusCode(_0x21689b,null))[_0x4b11('0x56')](handleError(_0x21689b,null));};exports[_0x4b11('0x88')]=function(_0x76e625,_0xb86e45,_0x30713f){var _0x4ead8f={};var _0x508c24={};var _0x4aa655;var _0x1769c0;return db['Team'][_0x4b11('0x5f')]({'where':{'id':_0x76e625[_0x4b11('0x52')]['id']}})[_0x4b11('0x2d')](handleEntityNotFound(_0xb86e45,null))[_0x4b11('0x2d')](function(_0x2611f2){if(_0x2611f2){_0x4aa655=_0x2611f2;_0x508c24[_0x4b11('0x3b')]=_[_0x4b11('0x3c')](db[_0x4b11('0x7a')][_0x4b11('0x54')]);_0x508c24[_0x4b11('0x3d')]=_[_0x4b11('0x3c')](_0x76e625['query']);_0x508c24[_0x4b11('0x3e')]=_[_0x4b11('0x3f')](_0x508c24[_0x4b11('0x3b')],_0x508c24[_0x4b11('0x3d')]);_0x4ead8f[_0x4b11('0x42')]=_[_0x4b11('0x3f')](_0x508c24[_0x4b11('0x3b')],qs[_0x4b11('0x40')](_0x76e625[_0x4b11('0x3d')][_0x4b11('0x40')]));_0x4ead8f['attributes']=_0x4ead8f[_0x4b11('0x42')][_0x4b11('0x41')]?_0x4ead8f[_0x4b11('0x42')]:_0x508c24[_0x4b11('0x3b')];_0x4ead8f['order']=qs[_0x4b11('0x45')](_0x76e625[_0x4b11('0x3d')][_0x4b11('0x45')]);_0x4ead8f[_0x4b11('0x46')]=qs[_0x4b11('0x3e')](_[_0x4b11('0x47')](_0x76e625[_0x4b11('0x3d')],_0x508c24['filters']));if(_0x76e625[_0x4b11('0x3d')][_0x4b11('0x48')]){_0x4ead8f[_0x4b11('0x46')]=_[_0x4b11('0x49')](_0x4ead8f[_0x4b11('0x46')],{'$or':_[_0x4b11('0x37')](_0x4ead8f['attributes'],function(_0x1d91c3){var _0x548f1b={};_0x548f1b[_0x1d91c3]={'$like':'%'+_0x76e625['query'][_0x4b11('0x48')]+'%'};return _0x548f1b;})});}_0x4ead8f=_[_0x4b11('0x49')]({},_0x4ead8f,_0x76e625[_0x4b11('0x4b')]);return _0x4aa655[_0x4b11('0x88')](_0x4ead8f);}})[_0x4b11('0x2d')](function(_0x430e34){if(_0x430e34){_0x1769c0=_0x430e34[_0x4b11('0x41')];if(!_0x76e625['query'][_0x4b11('0x89')](_0x4b11('0x43'))){_0x4ead8f[_0x4b11('0x25')]=qs[_0x4b11('0x25')](_0x76e625['query'][_0x4b11('0x25')]);_0x4ead8f[_0x4b11('0x23')]=qs[_0x4b11('0x23')](_0x76e625[_0x4b11('0x3d')][_0x4b11('0x23')]);}return _0x4aa655[_0x4b11('0x88')](_0x4ead8f);}})[_0x4b11('0x2d')](function(_0x168732){if(_0x168732){return _0x168732?{'count':_0x1769c0,'rows':_0x168732}:null;}})[_0x4b11('0x2d')](respondWithResult(_0xb86e45,null))[_0x4b11('0x56')](handleError(_0xb86e45,null));}; \ No newline at end of file +var _0xdc45=['where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','params','keys','rawAttributes','find','create','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','destroy','getQueues','channel','Sequelize','ValidationError','Unknown\x20channel','capitalize','Queue','toLowerCase','Queues','addQueues','findOne','add','removeQueues','isValidChannel','remove','ids','Chat','Mail','Sms','Fax','Openchannel','Whatsapp','sequelize','transaction','Voice','through','penalty','QueueId','TeamVoiceQueue','User','findOrCreate','emit','user','Queue:save','UserVoiceQueueRt','upsert','isNil','interface','SIP/%s','voicePause','all','addAgents','spread','removeAgents','parse','Queue:remove','getAgents','eml-format','rimraf','zip-dir','request-promise','mustache','util','path','sox','ejs','fs-extra','lodash','jsforce','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','redis','defaults','localhost','socket.io-emitter','./team.socket','register','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','get','Teams','UserProfileResource','error','stack','name','send','index','Team','type','key','model','map','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort'];(function(_0x2fee96,_0x2f735d){var _0x2e6ad1=function(_0x2c55ad){while(--_0x2c55ad){_0x2fee96['push'](_0x2fee96['shift']());}};_0x2e6ad1(++_0x2f735d);}(_0xdc45,0x156));var _0x5dc4=function(_0x2c436f,_0x23abec){_0x2c436f=_0x2c436f-0x0;var _0x54d759=_0xdc45[_0x2c436f];return _0x54d759;};'use strict';var emlformat=require(_0x5dc4('0x0'));var rimraf=require(_0x5dc4('0x1'));var zipdir=require(_0x5dc4('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x5dc4('0x3'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x5dc4('0x4'));var util=require(_0x5dc4('0x5'));var path=require(_0x5dc4('0x6'));var sox=require(_0x5dc4('0x7'));var csv=require('to-csv');var ejs=require(_0x5dc4('0x8'));var fs=require('fs');var fs_extra=require(_0x5dc4('0x9'));var _=require(_0x5dc4('0xa'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x5dc4('0xb'));var deskjs=require('desk.js');var toCsv=require(_0x5dc4('0xc'));var querystring=require(_0x5dc4('0xd'));var Papa=require(_0x5dc4('0xe'));var Redis=require(_0x5dc4('0xf'));var authService=require(_0x5dc4('0x10'));var qs=require('../../components/parsers/qs');var as=require(_0x5dc4('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x5dc4('0x12'))('api');var utils=require(_0x5dc4('0x13'));var config=require(_0x5dc4('0x14'));var licenseUtil=require(_0x5dc4('0x15'));var db=require('../../mysqldb')['db'];config[_0x5dc4('0x16')]=_[_0x5dc4('0x17')](config[_0x5dc4('0x16')],{'host':_0x5dc4('0x18'),'port':0x18eb});var socket=require(_0x5dc4('0x19'))(new Redis(config[_0x5dc4('0x16')]));require(_0x5dc4('0x1a'))[_0x5dc4('0x1b')](socket);function respondWithStatusCode(_0x2c1a33,_0x50eb0a){_0x50eb0a=_0x50eb0a||0xcc;return function(_0x158153){if(_0x158153){return _0x2c1a33[_0x5dc4('0x1c')](_0x50eb0a);}return _0x2c1a33[_0x5dc4('0x1d')](_0x50eb0a)[_0x5dc4('0x1e')]();};}function respondWithResult(_0x1c3b4e,_0x3f942e){_0x3f942e=_0x3f942e||0xc8;return function(_0x102697){if(_0x102697){return _0x1c3b4e[_0x5dc4('0x1d')](_0x3f942e)[_0x5dc4('0x1f')](_0x102697);}};}function respondWithFilteredResult(_0x522fdf,_0x164996){return function(_0x5d528b){if(_0x5d528b){var _0x54647f=typeof _0x164996[_0x5dc4('0x20')]===_0x5dc4('0x21')&&typeof _0x164996[_0x5dc4('0x22')]==='undefined';var _0x2ee0c5=_0x5d528b[_0x5dc4('0x23')];var _0x1f36d7=_0x54647f?0x0:_0x164996[_0x5dc4('0x20')];var _0x1dd1d6=_0x54647f?_0x5d528b[_0x5dc4('0x23')]:_0x164996[_0x5dc4('0x20')]+_0x164996[_0x5dc4('0x22')];var _0x4919a2;if(_0x1dd1d6>=_0x2ee0c5){_0x1dd1d6=_0x2ee0c5;_0x4919a2=0xc8;}else{_0x4919a2=0xce;}_0x522fdf['status'](_0x4919a2);return _0x522fdf[_0x5dc4('0x24')](_0x5dc4('0x25'),_0x1f36d7+'-'+_0x1dd1d6+'/'+_0x2ee0c5)[_0x5dc4('0x1f')](_0x5d528b);}return null;};}function patchUpdates(_0x4ea32c){return function(_0x36198c){try{jsonpatch[_0x5dc4('0x26')](_0x36198c,_0x4ea32c,!![]);}catch(_0x4f2f11){return BPromise[_0x5dc4('0x27')](_0x4f2f11);}return _0x36198c[_0x5dc4('0x28')]();};}function saveUpdates(_0x51e72b,_0x3b11f9){return function(_0x5745af){if(_0x5745af){return _0x5745af[_0x5dc4('0x29')](_0x51e72b)[_0x5dc4('0x2a')](function(_0x45c603){return _0x45c603;});}return null;};}function removeEntity(_0x21adca,_0xd3571a){return function(_0x1d0871){if(_0x1d0871){return _0x1d0871['destroy']()[_0x5dc4('0x2a')](function(){var _0x1002f5=_0x1d0871[_0x5dc4('0x2b')]({'plain':!![]});var _0x200cfd=_0x5dc4('0x2c');return db[_0x5dc4('0x2d')]['destroy']({'where':{'type':_0x200cfd,'resourceId':_0x1002f5['id']}})[_0x5dc4('0x2a')](function(){return _0x1d0871;});})[_0x5dc4('0x2a')](function(){_0x21adca[_0x5dc4('0x1d')](0xcc)[_0x5dc4('0x1e')]();});}};}function handleEntityNotFound(_0x2355ab,_0x24d4f0){return function(_0x8e263e){if(!_0x8e263e){_0x2355ab[_0x5dc4('0x1c')](0x194);}return _0x8e263e;};}function handleError(_0x5e7a1a,_0x2c4dfc){_0x2c4dfc=_0x2c4dfc||0x1f4;return function(_0x2ae93a){logger[_0x5dc4('0x2e')](_0x2ae93a[_0x5dc4('0x2f')]);if(_0x2ae93a[_0x5dc4('0x30')]){delete _0x2ae93a['name'];}_0x5e7a1a[_0x5dc4('0x1d')](_0x2c4dfc)[_0x5dc4('0x31')](_0x2ae93a);};}exports[_0x5dc4('0x32')]=function(_0x292d9c,_0x41bf39){var _0x295d72={},_0x4799f9={},_0x4874c1={'count':0x0,'rows':[]};var _0x574a16=_['map'](db[_0x5dc4('0x33')]['rawAttributes'],function(_0x4c0ab8){return{'name':_0x4c0ab8['fieldName'],'type':_0x4c0ab8[_0x5dc4('0x34')][_0x5dc4('0x35')]};});_0x4799f9[_0x5dc4('0x36')]=_[_0x5dc4('0x37')](_0x574a16,_0x5dc4('0x30'));_0x4799f9[_0x5dc4('0x38')]=_['keys'](_0x292d9c[_0x5dc4('0x38')]);_0x4799f9[_0x5dc4('0x39')]=_[_0x5dc4('0x3a')](_0x4799f9[_0x5dc4('0x36')],_0x4799f9['query']);_0x295d72['attributes']=_[_0x5dc4('0x3a')](_0x4799f9[_0x5dc4('0x36')],qs['fields'](_0x292d9c[_0x5dc4('0x38')][_0x5dc4('0x3b')]));_0x295d72[_0x5dc4('0x3c')]=_0x295d72['attributes'][_0x5dc4('0x3d')]?_0x295d72[_0x5dc4('0x3c')]:_0x4799f9[_0x5dc4('0x36')];if(!_0x292d9c['query'][_0x5dc4('0x3e')](_0x5dc4('0x3f'))){_0x295d72[_0x5dc4('0x22')]=qs[_0x5dc4('0x22')](_0x292d9c['query']['limit']);_0x295d72[_0x5dc4('0x20')]=qs[_0x5dc4('0x20')](_0x292d9c[_0x5dc4('0x38')][_0x5dc4('0x20')]);}_0x295d72[_0x5dc4('0x40')]=qs[_0x5dc4('0x41')](_0x292d9c['query'][_0x5dc4('0x41')]);_0x295d72[_0x5dc4('0x42')]=qs[_0x5dc4('0x39')](_[_0x5dc4('0x43')](_0x292d9c['query'],_0x4799f9[_0x5dc4('0x39')]),_0x574a16);if(_0x292d9c[_0x5dc4('0x38')][_0x5dc4('0x44')]){_0x295d72[_0x5dc4('0x42')]=_[_0x5dc4('0x45')](_0x295d72[_0x5dc4('0x42')],{'$or':_[_0x5dc4('0x37')](_0x574a16,function(_0x31c226){if(_0x31c226['type']!==_0x5dc4('0x46')){var _0x2c2d8f={};_0x2c2d8f[_0x31c226['name']]={'$like':'%'+_0x292d9c[_0x5dc4('0x38')][_0x5dc4('0x44')]+'%'};return _0x2c2d8f;}})});}_0x295d72=_[_0x5dc4('0x45')]({},_0x295d72,_0x292d9c[_0x5dc4('0x47')]);var _0xdd1a51={'where':_0x295d72['where']};return db[_0x5dc4('0x33')][_0x5dc4('0x23')](_0xdd1a51)[_0x5dc4('0x2a')](function(_0x4ae4fc){_0x4874c1[_0x5dc4('0x23')]=_0x4ae4fc;if(_0x292d9c[_0x5dc4('0x38')][_0x5dc4('0x48')]){_0x295d72[_0x5dc4('0x49')]=[{'all':!![]}];}return db[_0x5dc4('0x33')][_0x5dc4('0x4a')](_0x295d72);})['then'](function(_0x30a9e1){_0x4874c1[_0x5dc4('0x4b')]=_0x30a9e1;return _0x4874c1;})[_0x5dc4('0x2a')](respondWithFilteredResult(_0x41bf39,_0x295d72))[_0x5dc4('0x4c')](handleError(_0x41bf39,null));};exports['show']=function(_0x2e5880,_0x68318a){var _0x2485b5={'raw':![],'where':{'id':_0x2e5880[_0x5dc4('0x4d')]['id']}},_0x22ffbe={};_0x22ffbe['model']=_[_0x5dc4('0x4e')](db[_0x5dc4('0x33')][_0x5dc4('0x4f')]);_0x22ffbe[_0x5dc4('0x38')]=_[_0x5dc4('0x4e')](_0x2e5880[_0x5dc4('0x38')]);_0x22ffbe[_0x5dc4('0x39')]=_[_0x5dc4('0x3a')](_0x22ffbe[_0x5dc4('0x36')],_0x22ffbe[_0x5dc4('0x38')]);_0x2485b5[_0x5dc4('0x3c')]=_['intersection'](_0x22ffbe[_0x5dc4('0x36')],qs[_0x5dc4('0x3b')](_0x2e5880['query'][_0x5dc4('0x3b')]));_0x2485b5[_0x5dc4('0x3c')]=_0x2485b5[_0x5dc4('0x3c')][_0x5dc4('0x3d')]?_0x2485b5['attributes']:_0x22ffbe[_0x5dc4('0x36')];if(_0x2e5880[_0x5dc4('0x38')][_0x5dc4('0x48')]){_0x2485b5[_0x5dc4('0x49')]=[{'all':!![]}];}_0x2485b5=_[_0x5dc4('0x45')]({},_0x2485b5,_0x2e5880[_0x5dc4('0x47')]);return db['Team'][_0x5dc4('0x50')](_0x2485b5)[_0x5dc4('0x2a')](handleEntityNotFound(_0x68318a,null))[_0x5dc4('0x2a')](respondWithResult(_0x68318a,null))[_0x5dc4('0x4c')](handleError(_0x68318a,null));};exports[_0x5dc4('0x51')]=function(_0x5cd40f,_0x1d025b){return db[_0x5dc4('0x33')]['create'](_0x5cd40f['body'],{})[_0x5dc4('0x2a')](function(_0x466058){var _0x2bff7d=_0x5cd40f['user'][_0x5dc4('0x2b')]({'plain':!![]});if(!_0x2bff7d)throw new Error(_0x5dc4('0x52'));if(_0x2bff7d['role']==='user'){var _0x4063e4=_0x466058[_0x5dc4('0x2b')]({'plain':!![]});var _0x5df3a5=_0x5dc4('0x2c');return db[_0x5dc4('0x53')][_0x5dc4('0x50')]({'where':{'name':_0x5df3a5,'userProfileId':_0x2bff7d[_0x5dc4('0x54')]},'raw':!![]})[_0x5dc4('0x2a')](function(_0x3b5220){if(_0x3b5220&&_0x3b5220[_0x5dc4('0x55')]===0x0){return db['UserProfileResource']['create']({'name':_0x4063e4[_0x5dc4('0x30')],'resourceId':_0x4063e4['id'],'type':_0x3b5220[_0x5dc4('0x30')],'sectionId':_0x3b5220['id']},{})['then'](function(){return _0x466058;});}else{return _0x466058;}})[_0x5dc4('0x4c')](function(_0x1b87f5){logger['error'](_0x5dc4('0x56'),_0x1b87f5);throw _0x1b87f5;});}return _0x466058;})[_0x5dc4('0x2a')](respondWithResult(_0x1d025b,0xc9))[_0x5dc4('0x4c')](handleError(_0x1d025b,null));};exports[_0x5dc4('0x29')]=function(_0x19f238,_0x5593cc){if(_0x19f238[_0x5dc4('0x57')]['id']){delete _0x19f238[_0x5dc4('0x57')]['id'];}return db['Team'][_0x5dc4('0x50')]({'where':{'id':_0x19f238[_0x5dc4('0x4d')]['id']}})[_0x5dc4('0x2a')](handleEntityNotFound(_0x5593cc,null))[_0x5dc4('0x2a')](saveUpdates(_0x19f238[_0x5dc4('0x57')],null))[_0x5dc4('0x2a')](respondWithResult(_0x5593cc,null))[_0x5dc4('0x4c')](handleError(_0x5593cc,null));};exports[_0x5dc4('0x58')]=function(_0x41c9d7,_0x2bf56c){return db[_0x5dc4('0x33')]['find']({'where':{'id':_0x41c9d7['params']['id']}})[_0x5dc4('0x2a')](handleEntityNotFound(_0x2bf56c,null))[_0x5dc4('0x2a')](removeEntity(_0x2bf56c,null))['catch'](handleError(_0x2bf56c,null));};exports[_0x5dc4('0x59')]=function(_0x6a997,_0x1408bb,_0xbef09f){return db[_0x5dc4('0x33')]['findOne']({'where':{'id':_0x6a997['params']['id']}})[_0x5dc4('0x2a')](handleEntityNotFound(_0x1408bb,null))[_0x5dc4('0x2a')](function(_0x494d4b){if(!_0x6a997[_0x5dc4('0x38')]['channel']||!utils['isValidChannel'](_0x6a997[_0x5dc4('0x38')][_0x5dc4('0x5a')])){throw new db[(_0x5dc4('0x5b'))][(_0x5dc4('0x5c'))](_0x5dc4('0x5d'));}var _0x1f6a23={};var _0x3073b3={};_0x3073b3[_0x5dc4('0x36')]=_[_0x5dc4('0x4e')](db[_[_0x5dc4('0x5e')](_0x6a997[_0x5dc4('0x38')][_0x5dc4('0x5a')]['toLowerCase']())+_0x5dc4('0x5f')]['rawAttributes']);_0x3073b3[_0x5dc4('0x38')]=_[_0x5dc4('0x4e')](_0x6a997[_0x5dc4('0x38')]);_0x3073b3[_0x5dc4('0x39')]=_['intersection'](_0x3073b3[_0x5dc4('0x36')],_0x3073b3[_0x5dc4('0x38')]);_0x1f6a23[_0x5dc4('0x3c')]=_[_0x5dc4('0x3a')](_0x3073b3[_0x5dc4('0x36')],qs[_0x5dc4('0x3b')](_0x6a997[_0x5dc4('0x38')]['fields']));_0x1f6a23[_0x5dc4('0x3c')]=_0x1f6a23['attributes'][_0x5dc4('0x3d')]?_0x1f6a23[_0x5dc4('0x3c')]:_0x3073b3[_0x5dc4('0x36')];_0x1f6a23[_0x5dc4('0x22')]=qs[_0x5dc4('0x22')](_0x6a997['query'][_0x5dc4('0x22')]);_0x1f6a23[_0x5dc4('0x20')]=qs[_0x5dc4('0x20')](_0x6a997[_0x5dc4('0x38')][_0x5dc4('0x20')]);_0x1f6a23['order']=qs[_0x5dc4('0x41')](_0x6a997[_0x5dc4('0x38')][_0x5dc4('0x41')]);_0x1f6a23[_0x5dc4('0x42')]=qs[_0x5dc4('0x39')](_['pick'](_0x6a997[_0x5dc4('0x38')],_0x3073b3[_0x5dc4('0x39')]));_0x1f6a23=_[_0x5dc4('0x45')]({},_0x1f6a23,_0x6a997['options']);return _0x494d4b[_0x5dc4('0x2b')+_[_0x5dc4('0x5e')](_0x6a997[_0x5dc4('0x38')][_0x5dc4('0x5a')][_0x5dc4('0x60')]())+_0x5dc4('0x61')](_0x1f6a23);})[_0x5dc4('0x2a')](respondWithResult(_0x1408bb,null))[_0x5dc4('0x4c')](handleError(_0x1408bb,null));};exports[_0x5dc4('0x62')]=function(_0x1f3dee,_0x2a8099,_0x3a2896){return db[_0x5dc4('0x33')][_0x5dc4('0x63')]({'where':{'id':_0x1f3dee[_0x5dc4('0x4d')]['id']}})['then'](function(_0x2bdcce){if(_0x2bdcce){if(!_0x1f3dee['body'][_0x5dc4('0x5a')]||!utils['isValidChannel'](_0x1f3dee[_0x5dc4('0x57')][_0x5dc4('0x5a')])){throw new db['Sequelize'][(_0x5dc4('0x5c'))](_0x5dc4('0x5d'));}return _0x2bdcce[_0x5dc4('0x64')+_[_0x5dc4('0x5e')](_0x1f3dee[_0x5dc4('0x57')]['channel'][_0x5dc4('0x60')]())+_0x5dc4('0x61')](_0x1f3dee[_0x5dc4('0x57')]['ids']);}return null;})['then'](handleEntityNotFound(_0x2a8099,null))[_0x5dc4('0x2a')](respondWithStatusCode(_0x2a8099,null))[_0x5dc4('0x4c')](handleError(_0x2a8099,null));};exports[_0x5dc4('0x65')]=function(_0x483fab,_0x1c58eb,_0x598c86){return db[_0x5dc4('0x33')][_0x5dc4('0x63')]({'where':{'id':_0x483fab[_0x5dc4('0x4d')]['id']}})[_0x5dc4('0x2a')](function(_0x247917){if(_0x247917){if(!_0x483fab['query'][_0x5dc4('0x5a')]||!utils[_0x5dc4('0x66')](_0x483fab[_0x5dc4('0x38')]['channel'])){throw new db[(_0x5dc4('0x5b'))][(_0x5dc4('0x5c'))](_0x5dc4('0x5d'));}return _0x247917[_0x5dc4('0x67')+_['capitalize'](_0x483fab[_0x5dc4('0x38')][_0x5dc4('0x5a')]['toLowerCase']())+'Queues'](_0x483fab[_0x5dc4('0x38')][_0x5dc4('0x68')]);}return null;})[_0x5dc4('0x2a')](handleEntityNotFound(_0x1c58eb,null))[_0x5dc4('0x2a')](respondWithStatusCode(_0x1c58eb,null))[_0x5dc4('0x4c')](handleError(_0x1c58eb,null));};exports['addAgents']=function(_0x5d89e1,_0x4553c6){return db[_0x5dc4('0x33')]['find']({'where':{'id':_0x5d89e1[_0x5dc4('0x4d')]['id']}})['then'](handleEntityNotFound(_0x4553c6,null))[_0x5dc4('0x2a')](function(_0x3341c6){if(_0x3341c6){var _0x257c50=['Voice',_0x5dc4('0x69'),_0x5dc4('0x6a'),_0x5dc4('0x6b'),_0x5dc4('0x6c'),_0x5dc4('0x6d'),_0x5dc4('0x6e')];return db[_0x5dc4('0x6f')][_0x5dc4('0x70')](function(_0x59d8bc){var _0x4395f0=_[_0x5dc4('0x37')](_0x257c50,function(_0x1d7241){var _0x4c7254={'attributes':['id','name']};if(_0x1d7241===_0x5dc4('0x71')){_0x4c7254[_0x5dc4('0x72')]={'attributes':[_0x5dc4('0x73')]};}return _0x3341c6[_0x5dc4('0x2b')+_0x1d7241+_0x5dc4('0x61')](_0x4c7254)[_0x5dc4('0x2a')](function(_0xe69a07){var _0x3946cc=_['map'](_0xe69a07,function(_0x30dcba){var _0x128931=_[_0x5dc4('0x37')](_0x5d89e1['body'][_0x5dc4('0x68')],function(_0x206fb1){var _0x1efd9a={'where':{'UserId':_0x206fb1,[_0x1d7241+_0x5dc4('0x74')]:_0x30dcba['id']},'transaction':_0x59d8bc};if(_0x1d7241===_0x5dc4('0x71')){_0x1efd9a[_0x5dc4('0x17')]={'penalty':_0x30dcba[_0x5dc4('0x75')][_0x5dc4('0x73')]};}return db[_0x5dc4('0x76')+_0x1d7241+_0x5dc4('0x5f')][_0x5dc4('0x77')](_0x1efd9a)[_0x5dc4('0x2a')](function(){socket[_0x5dc4('0x78')](_0x5dc4('0x79')+_0x1d7241+_0x5dc4('0x7a'),{'UserId':_0x206fb1,[_0x1d7241+_0x5dc4('0x74')]:_0x30dcba['id']});if(_0x1d7241!==_0x5dc4('0x71'))return;return db[_0x5dc4('0x76')]['findAll']({'where':{'id':_0x5d89e1[_0x5dc4('0x57')]['ids'],'online':0x1},'attributes':['id','name','online','voicePause','interface'],'raw':!![]})[_0x5dc4('0x2a')](function(_0x45fd71){var _0x2b278e=_[_0x5dc4('0x37')](_0x45fd71,function(_0x27b21e){return db[_0x5dc4('0x7b')][_0x5dc4('0x7c')]({'membername':_0x27b21e[_0x5dc4('0x30')],'UserId':_0x27b21e['id'],'queue_name':_0x30dcba[_0x5dc4('0x30')],'VoiceQueueId':_0x30dcba['id'],'interface':_[_0x5dc4('0x7d')](_0x27b21e[_0x5dc4('0x7e')])?util['format'](_0x5dc4('0x7f'),_0x27b21e[_0x5dc4('0x30')]):_0x27b21e[_0x5dc4('0x7e')],'paused':_0x27b21e[_0x5dc4('0x80')]||![],'penalty':_0x30dcba[_0x5dc4('0x75')][_0x5dc4('0x73')]},{'transaction':_0x59d8bc});});return Promise[_0x5dc4('0x81')](_0x2b278e);});});});return Promise['all'](_0x128931);});return Promise[_0x5dc4('0x81')](_0x3946cc);});});return Promise[_0x5dc4('0x81')](_0x4395f0)[_0x5dc4('0x2a')](function(){return _0x3341c6[_0x5dc4('0x82')](_0x5d89e1[_0x5dc4('0x57')]['ids'],{'transaction':_0x59d8bc})[_0x5dc4('0x83')](function(_0x2a2617){return _0x2a2617;});});});}})[_0x5dc4('0x2a')](respondWithResult(_0x4553c6,null))['catch'](handleError(_0x4553c6,null));};exports[_0x5dc4('0x84')]=function(_0x11697e,_0x3ee48b){return db['Team'][_0x5dc4('0x50')]({'where':{'id':_0x11697e[_0x5dc4('0x4d')]['id']}})[_0x5dc4('0x2a')](handleEntityNotFound(_0x3ee48b,null))[_0x5dc4('0x2a')](function(_0x49aa4a){if(_0x49aa4a){var _0x108e0b=['Voice',_0x5dc4('0x69'),_0x5dc4('0x6a'),_0x5dc4('0x6b'),_0x5dc4('0x6c'),_0x5dc4('0x6d'),_0x5dc4('0x6e')];return db[_0x5dc4('0x6f')][_0x5dc4('0x70')](function(_0x425c03){var _0x48cd42=_[_0x5dc4('0x37')](_0x108e0b,function(_0x106734){var _0x473230={'attributes':['id',_0x5dc4('0x30')]};return _0x49aa4a[_0x5dc4('0x2b')+_0x106734+'Queues'](_0x473230)['then'](function(_0x2af2c1){var _0x30475d=_[_0x5dc4('0x37')](_0x2af2c1,function(_0xaf67c7){return _0xaf67c7[_0x5dc4('0x84')](_0x11697e['query'][_0x5dc4('0x68')],{'transaction':_0x425c03})[_0x5dc4('0x2a')](function(){var _0x311708=JSON[_0x5dc4('0x85')]('['+_0x11697e[_0x5dc4('0x38')]['ids']+']');var _0x5422f5=_[_0x5dc4('0x37')](_0x311708,function(_0x4cf13e){socket[_0x5dc4('0x78')](_0x5dc4('0x79')+_0x106734+_0x5dc4('0x86'),{'UserId':Number(_0x4cf13e),[_0x106734+'QueueId']:_0xaf67c7['id']});if(_0x106734!==_0x5dc4('0x71'))return;return db[_0x5dc4('0x7b')]['destroy']({'where':{'VoiceQueueId':_0xaf67c7['id'],'UserId':_0x4cf13e},'transaction':_0x425c03});});return Promise[_0x5dc4('0x81')](_0x5422f5);});});return Promise['all'](_0x30475d);});});return Promise[_0x5dc4('0x81')](_0x48cd42)[_0x5dc4('0x2a')](function(){return _0x49aa4a[_0x5dc4('0x84')](_0x11697e['query'][_0x5dc4('0x68')],{'transaction':_0x425c03});});});}})[_0x5dc4('0x2a')](respondWithStatusCode(_0x3ee48b,null))[_0x5dc4('0x4c')](handleError(_0x3ee48b,null));};exports[_0x5dc4('0x87')]=function(_0xcc82e4,_0x46e2d9,_0x3c090d){var _0x112aa5={};var _0x5d85c6={};var _0x204dc0;var _0x4939ff;return db[_0x5dc4('0x33')][_0x5dc4('0x63')]({'where':{'id':_0xcc82e4[_0x5dc4('0x4d')]['id']}})['then'](handleEntityNotFound(_0x46e2d9,null))['then'](function(_0x540d03){if(_0x540d03){_0x204dc0=_0x540d03;_0x5d85c6[_0x5dc4('0x36')]=_[_0x5dc4('0x4e')](db['User'][_0x5dc4('0x4f')]);_0x5d85c6[_0x5dc4('0x38')]=_[_0x5dc4('0x4e')](_0xcc82e4[_0x5dc4('0x38')]);_0x5d85c6[_0x5dc4('0x39')]=_[_0x5dc4('0x3a')](_0x5d85c6[_0x5dc4('0x36')],_0x5d85c6['query']);_0x112aa5['attributes']=_[_0x5dc4('0x3a')](_0x5d85c6[_0x5dc4('0x36')],qs[_0x5dc4('0x3b')](_0xcc82e4[_0x5dc4('0x38')][_0x5dc4('0x3b')]));_0x112aa5[_0x5dc4('0x3c')]=_0x112aa5[_0x5dc4('0x3c')][_0x5dc4('0x3d')]?_0x112aa5['attributes']:_0x5d85c6['model'];_0x112aa5[_0x5dc4('0x40')]=qs[_0x5dc4('0x41')](_0xcc82e4[_0x5dc4('0x38')][_0x5dc4('0x41')]);_0x112aa5[_0x5dc4('0x42')]=qs[_0x5dc4('0x39')](_[_0x5dc4('0x43')](_0xcc82e4[_0x5dc4('0x38')],_0x5d85c6[_0x5dc4('0x39')]));if(_0xcc82e4[_0x5dc4('0x38')][_0x5dc4('0x44')]){_0x112aa5[_0x5dc4('0x42')]=_[_0x5dc4('0x45')](_0x112aa5[_0x5dc4('0x42')],{'$or':_[_0x5dc4('0x37')](_0x112aa5[_0x5dc4('0x3c')],function(_0x46330c){var _0x1b71d9={};_0x1b71d9[_0x46330c]={'$like':'%'+_0xcc82e4[_0x5dc4('0x38')][_0x5dc4('0x44')]+'%'};return _0x1b71d9;})});}_0x112aa5=_[_0x5dc4('0x45')]({},_0x112aa5,_0xcc82e4[_0x5dc4('0x47')]);return _0x204dc0[_0x5dc4('0x87')](_0x112aa5);}})['then'](function(_0x4b2968){if(_0x4b2968){_0x4939ff=_0x4b2968[_0x5dc4('0x3d')];if(!_0xcc82e4[_0x5dc4('0x38')][_0x5dc4('0x3e')](_0x5dc4('0x3f'))){_0x112aa5[_0x5dc4('0x22')]=qs[_0x5dc4('0x22')](_0xcc82e4[_0x5dc4('0x38')][_0x5dc4('0x22')]);_0x112aa5[_0x5dc4('0x20')]=qs['offset'](_0xcc82e4[_0x5dc4('0x38')][_0x5dc4('0x20')]);}return _0x204dc0[_0x5dc4('0x87')](_0x112aa5);}})[_0x5dc4('0x2a')](function(_0x5d4337){if(_0x5d4337){return _0x5d4337?{'count':_0x4939ff,'rows':_0x5d4337}:null;}})[_0x5dc4('0x2a')](respondWithResult(_0x46e2d9,null))[_0x5dc4('0x4c')](handleError(_0x46e2d9,null));}; \ No newline at end of file diff --git a/server/api/team/team.events.js b/server/api/team/team.events.js index 7c00c2b..0a32f24 100644 --- a/server/api/team/team.events.js +++ b/server/api/team/team.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa2da=['save','update','remove','emit','hasOwnProperty','exports','events','setMaxListeners'];(function(_0xb99cd0,_0x13c226){var _0x43f048=function(_0x124122){while(--_0x124122){_0xb99cd0['push'](_0xb99cd0['shift']());}};_0x43f048(++_0x13c226);}(_0xa2da,0x196));var _0xaa2d=function(_0x1cb18a,_0x33167a){_0x1cb18a=_0x1cb18a-0x0;var _0x22442e=_0xa2da[_0x1cb18a];return _0x22442e;};'use strict';var EventEmitter=require(_0xaa2d('0x0'));var Team=require('../../mysqldb')['db']['Team'];var TeamEvents=new EventEmitter();TeamEvents[_0xaa2d('0x1')](0x0);var events={'afterCreate':_0xaa2d('0x2'),'afterUpdate':_0xaa2d('0x3'),'afterDestroy':_0xaa2d('0x4')};function emitEvent(_0x10cde6){return function(_0x285c40,_0x2c8fed,_0x319e5f){TeamEvents['emit'](_0x10cde6+':'+_0x285c40['id'],_0x285c40);TeamEvents[_0xaa2d('0x5')](_0x10cde6,_0x285c40);_0x319e5f(null);};}for(var e in events){if(events[_0xaa2d('0x6')](e)){var event=events[e];Team['hook'](e,emitEvent(event));}}module[_0xaa2d('0x7')]=TeamEvents; \ No newline at end of file +var _0xa5e7=['Team','save','update','remove','emit','hasOwnProperty','hook','exports'];(function(_0x49cbb3,_0x3d4f57){var _0x415e8a=function(_0xeb84af){while(--_0xeb84af){_0x49cbb3['push'](_0x49cbb3['shift']());}};_0x415e8a(++_0x3d4f57);}(_0xa5e7,0x138));var _0x7a5e=function(_0x1b756c,_0x5b8aba){_0x1b756c=_0x1b756c-0x0;var _0x210ef5=_0xa5e7[_0x1b756c];return _0x210ef5;};'use strict';var EventEmitter=require('events');var Team=require('../../mysqldb')['db'][_0x7a5e('0x0')];var TeamEvents=new EventEmitter();TeamEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x7a5e('0x1'),'afterUpdate':_0x7a5e('0x2'),'afterDestroy':_0x7a5e('0x3')};function emitEvent(_0x4dfea9){return function(_0x3064c1,_0x4fdad4,_0x42a415){TeamEvents[_0x7a5e('0x4')](_0x4dfea9+':'+_0x3064c1['id'],_0x3064c1);TeamEvents[_0x7a5e('0x4')](_0x4dfea9,_0x3064c1);_0x42a415(null);};}for(var e in events){if(events[_0x7a5e('0x5')](e)){var event=events[e];Team[_0x7a5e('0x6')](e,emitEvent(event));}}module[_0x7a5e('0x7')]=TeamEvents; \ No newline at end of file diff --git a/server/api/team/team.model.js b/server/api/team/team.model.js index df2bf13..27e3b85 100644 --- a/server/api/team/team.model.js +++ b/server/api/team/team.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd6b7=['api','bluebird','request-promise','path','rimraf','../../config/environment','./team.attributes','exports','define','lodash','util','../../config/logger'];(function(_0x16de68,_0x33d7ff){var _0x1c277e=function(_0x1d8549){while(--_0x1d8549){_0x16de68['push'](_0x16de68['shift']());}};_0x1c277e(++_0x33d7ff);}(_0xd6b7,0x17d));var _0x7d6b=function(_0x23c651,_0x143982){_0x23c651=_0x23c651-0x0;var _0xbe7bdb=_0xd6b7[_0x23c651];return _0xbe7bdb;};'use strict';var _=require(_0x7d6b('0x0'));var util=require(_0x7d6b('0x1'));var logger=require(_0x7d6b('0x2'))(_0x7d6b('0x3'));var moment=require('moment');var BPromise=require(_0x7d6b('0x4'));var rp=require(_0x7d6b('0x5'));var fs=require('fs');var path=require(_0x7d6b('0x6'));var rimraf=require(_0x7d6b('0x7'));var config=require(_0x7d6b('0x8'));var attributes=require(_0x7d6b('0x9'));module[_0x7d6b('0xa')]=function(_0x53bc6c,_0x2adfcf){return _0x53bc6c[_0x7d6b('0xb')]('Team',attributes,{'tableName':'teams','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x9722=['../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./team.attributes','exports','define','Team','teams','util'];(function(_0x2ab5d7,_0x1243d9){var _0x516388=function(_0x412cd1){while(--_0x412cd1){_0x2ab5d7['push'](_0x2ab5d7['shift']());}};_0x516388(++_0x1243d9);}(_0x9722,0x144));var _0x2972=function(_0x21189d,_0x3f6a31){_0x21189d=_0x21189d-0x0;var _0x5a1681=_0x9722[_0x21189d];return _0x5a1681;};'use strict';var _=require('lodash');var util=require(_0x2972('0x0'));var logger=require(_0x2972('0x1'))(_0x2972('0x2'));var moment=require(_0x2972('0x3'));var BPromise=require(_0x2972('0x4'));var rp=require(_0x2972('0x5'));var fs=require('fs');var path=require(_0x2972('0x6'));var rimraf=require(_0x2972('0x7'));var config=require('../../config/environment');var attributes=require(_0x2972('0x8'));module[_0x2972('0x9')]=function(_0x1445d8,_0x5eebf8){return _0x1445d8[_0x2972('0xa')](_0x2972('0xb'),attributes,{'tableName':_0x2972('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/team/team.rpc.js b/server/api/team/team.rpc.js index 55485bf..077367e 100644 --- a/server/api/team/team.rpc.js +++ b/server/api/team/team.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x91a6=['code','message','result','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','redis','defaults','localhost','./team.socket','request','then','info','Team,\x20%s,\x20%s','debug','Team,\x20%s,\x20%s,\x20%s','error'];(function(_0x4035a7,_0x14c15c){var _0x5bdba1=function(_0x1c562d){while(--_0x1c562d){_0x4035a7['push'](_0x4035a7['shift']());}};_0x5bdba1(++_0x14c15c);}(_0x91a6,0x12d));var _0x691a=function(_0x593162,_0x2bdc55){_0x593162=_0x593162-0x0;var _0x2c940e=_0x91a6[_0x593162];return _0x2c940e;};'use strict';var _=require(_0x691a('0x0'));var util=require(_0x691a('0x1'));var moment=require(_0x691a('0x2'));var BPromise=require(_0x691a('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x691a('0x4'));var db=require(_0x691a('0x5'))['db'];var utils=require(_0x691a('0x6'));var logger=require(_0x691a('0x7'))(_0x691a('0x8'));var config=require('../../config/environment');var jayson=require(_0x691a('0x9'));var client=jayson[_0x691a('0xa')][_0x691a('0xb')]({'port':0x232a});config[_0x691a('0xc')]=_[_0x691a('0xd')](config[_0x691a('0xc')],{'host':_0x691a('0xe'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x691a('0xc')]));require(_0x691a('0xf'))['register'](socket);function respondWithRpcPromise(_0x10b169,_0x48a3dd,_0x4c5fa8){return new BPromise(function(_0x150033,_0x2c98bb){return client[_0x691a('0x10')](_0x10b169,_0x4c5fa8)[_0x691a('0x11')](function(_0x109d3f){logger[_0x691a('0x12')](_0x691a('0x13'),_0x48a3dd,'request\x20sent');logger[_0x691a('0x14')](_0x691a('0x15'),_0x48a3dd,'request\x20sent',JSON['stringify'](_0x109d3f));if(_0x109d3f[_0x691a('0x16')]){if(_0x109d3f['error'][_0x691a('0x17')]===0x1f4){logger[_0x691a('0x16')](_0x691a('0x13'),_0x48a3dd,_0x109d3f[_0x691a('0x16')][_0x691a('0x18')]);return _0x2c98bb(_0x109d3f['error'][_0x691a('0x18')]);}logger[_0x691a('0x16')]('Team,\x20%s,\x20%s',_0x48a3dd,_0x109d3f['error'][_0x691a('0x18')]);return _0x150033(_0x109d3f[_0x691a('0x16')][_0x691a('0x18')]);}else{logger['info'](_0x691a('0x13'),_0x48a3dd,'request\x20sent');_0x150033(_0x109d3f[_0x691a('0x19')][_0x691a('0x18')]);}})[_0x691a('0x1a')](function(_0x45de38){logger[_0x691a('0x16')](_0x691a('0x13'),_0x48a3dd,_0x45de38);_0x2c98bb(_0x45de38);});});} \ No newline at end of file +var _0xd944=['debug','Team,\x20%s,\x20%s,\x20%s','error','code','message','info','catch','lodash','util','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','client','http','redis','defaults','socket.io-emitter','./team.socket','register','request','Team,\x20%s,\x20%s','request\x20sent'];(function(_0x4792c8,_0x5158a1){var _0x35edb1=function(_0x2472d3){while(--_0x2472d3){_0x4792c8['push'](_0x4792c8['shift']());}};_0x35edb1(++_0x5158a1);}(_0xd944,0x1cf));var _0x4d94=function(_0xdb139e,_0x3529ee){_0xdb139e=_0xdb139e-0x0;var _0x35cb79=_0xd944[_0xdb139e];return _0x35cb79;};'use strict';var _=require(_0x4d94('0x0'));var util=require(_0x4d94('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x4d94('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x4d94('0x3'))['db'];var utils=require(_0x4d94('0x4'));var logger=require(_0x4d94('0x5'))(_0x4d94('0x6'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x4d94('0x7')][_0x4d94('0x8')]({'port':0x232a});config[_0x4d94('0x9')]=_[_0x4d94('0xa')](config[_0x4d94('0x9')],{'host':'localhost','port':0x18eb});var socket=require(_0x4d94('0xb'))(new Redis(config['redis']));require(_0x4d94('0xc'))[_0x4d94('0xd')](socket);function respondWithRpcPromise(_0x13d5af,_0x3f3481,_0x4d93b9){return new BPromise(function(_0x609027,_0x457ee0){return client[_0x4d94('0xe')](_0x13d5af,_0x4d93b9)['then'](function(_0x13fee6){logger['info'](_0x4d94('0xf'),_0x3f3481,_0x4d94('0x10'));logger[_0x4d94('0x11')](_0x4d94('0x12'),_0x3f3481,'request\x20sent',JSON['stringify'](_0x13fee6));if(_0x13fee6[_0x4d94('0x13')]){if(_0x13fee6[_0x4d94('0x13')][_0x4d94('0x14')]===0x1f4){logger[_0x4d94('0x13')](_0x4d94('0xf'),_0x3f3481,_0x13fee6[_0x4d94('0x13')]['message']);return _0x457ee0(_0x13fee6[_0x4d94('0x13')][_0x4d94('0x15')]);}logger[_0x4d94('0x13')]('Team,\x20%s,\x20%s',_0x3f3481,_0x13fee6[_0x4d94('0x13')][_0x4d94('0x15')]);return _0x609027(_0x13fee6[_0x4d94('0x13')][_0x4d94('0x15')]);}else{logger[_0x4d94('0x16')](_0x4d94('0xf'),_0x3f3481,_0x4d94('0x10'));_0x609027(_0x13fee6['result'][_0x4d94('0x15')]);}})[_0x4d94('0x17')](function(_0x458779){logger[_0x4d94('0x13')](_0x4d94('0xf'),_0x3f3481,_0x458779);_0x457ee0(_0x458779);});});} \ No newline at end of file diff --git a/server/api/team/team.socket.js b/server/api/team/team.socket.js index 693cf1e..24ed3de 100644 --- a/server/api/team/team.socket.js +++ b/server/api/team/team.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbefc=['emit','removeListener','register','length','team:','save','remove','update'];(function(_0x3180a9,_0x253758){var _0x4378d0=function(_0x3a5841){while(--_0x3a5841){_0x3180a9['push'](_0x3180a9['shift']());}};_0x4378d0(++_0x253758);}(_0xbefc,0x195));var _0xcbef=function(_0x2b3025,_0x20d396){_0x2b3025=_0x2b3025-0x0;var _0x309247=_0xbefc[_0x2b3025];return _0x309247;};'use strict';var TeamEvents=require('./team.events');var events=[_0xcbef('0x0'),_0xcbef('0x1'),_0xcbef('0x2')];function createListener(_0x23620e,_0xd97103){return function(_0x450a64){_0xd97103[_0xcbef('0x3')](_0x23620e,_0x450a64);};}function removeListener(_0x3442b2,_0xdf582a){return function(){TeamEvents[_0xcbef('0x4')](_0x3442b2,_0xdf582a);};}exports[_0xcbef('0x5')]=function(_0x3fe826){for(var _0x4753d1=0x0,_0x17bf41=events[_0xcbef('0x6')];_0x4753d1<_0x17bf41;_0x4753d1++){var _0x36eae6=events[_0x4753d1];var _0x3c76cd=createListener(_0xcbef('0x7')+_0x36eae6,_0x3fe826);TeamEvents['on'](_0x36eae6,_0x3c76cd);}}; \ No newline at end of file +var _0xda3f=['team:','save','remove','register','length'];(function(_0x298a31,_0x29f9ed){var _0x1f254f=function(_0xe20666){while(--_0xe20666){_0x298a31['push'](_0x298a31['shift']());}};_0x1f254f(++_0x29f9ed);}(_0xda3f,0xec));var _0xfda3=function(_0x27c1d1,_0x19660a){_0x27c1d1=_0x27c1d1-0x0;var _0x114421=_0xda3f[_0x27c1d1];return _0x114421;};'use strict';var TeamEvents=require('./team.events');var events=[_0xfda3('0x0'),_0xfda3('0x1'),'update'];function createListener(_0x5299b0,_0x5d7071){return function(_0x3859fe){_0x5d7071['emit'](_0x5299b0,_0x3859fe);};}function removeListener(_0x36dc71,_0x22187d){return function(){TeamEvents['removeListener'](_0x36dc71,_0x22187d);};}exports[_0xfda3('0x2')]=function(_0x43a010){for(var _0x47e7e2=0x0,_0x4e72d1=events[_0xfda3('0x3')];_0x47e7e2<_0x4e72d1;_0x47e7e2++){var _0x42476a=events[_0x47e7e2];var _0x125e2a=createListener(_0xfda3('0x4')+_0x42476a,_0x43a010);TeamEvents['on'](_0x42476a,_0x125e2a);}}; \ No newline at end of file diff --git a/server/api/teamVoiceQueue/index.js b/server/api/teamVoiceQueue/index.js index f4f9b23..8e2c3b1 100644 --- a/server/api/teamVoiceQueue/index.js +++ b/server/api/teamVoiceQueue/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['../../components/interaction/service','../../config/environment','exports','multer','util','path','Router','../../components/auth/service'];(function(_0x6c5964,_0x5c9039){var _0x5338d9=function(_0x5a3d95){while(--_0x5a3d95){_0x6c5964['push'](_0x6c5964['shift']());}};_0x5338d9(++_0x5c9039);}(_0xa9e0,0x123));var _0x0a9e=function(_0x5783f4,_0x4a9e0a){_0x5783f4=_0x5783f4-0x0;var _0x28e380=_0xa9e0[_0x5783f4];return _0x28e380;};'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'));module[_0x0a9e('0x7')]=router; \ No newline at end of file +var _0xa9e0=['../../components/interaction/service','../../config/environment','exports','multer','util','path','Router','../../components/auth/service'];(function(_0x345aab,_0x18b7af){var _0x37d787=function(_0x262a09){while(--_0x262a09){_0x345aab['push'](_0x345aab['shift']());}};_0x37d787(++_0x18b7af);}(_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'));module[_0x0a9e('0x7')]=router; \ No newline at end of file diff --git a/server/api/teamVoiceQueue/teamVoiceQueue.attributes.js b/server/api/teamVoiceQueue/teamVoiceQueue.attributes.js index 725beb3..e38a62d 100644 --- a/server/api/teamVoiceQueue/teamVoiceQueue.attributes.js +++ b/server/api/teamVoiceQueue/teamVoiceQueue.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe408=['exports','INTEGER','sequelize'];(function(_0x31ee98,_0x1e1a4a){var _0x246d93=function(_0x1639f8){while(--_0x1639f8){_0x31ee98['push'](_0x31ee98['shift']());}};_0x246d93(++_0x1e1a4a);}(_0xe408,0x19d));var _0x8e40=function(_0x47aa64,_0xfb8a07){_0x47aa64=_0x47aa64-0x0;var _0x549c7a=_0xe408[_0x47aa64];return _0x549c7a;};'use strict';var Sequelize=require(_0x8e40('0x0'));module[_0x8e40('0x1')]={'penalty':{'type':Sequelize[_0x8e40('0x2')],'defaultValue':0x0}}; \ No newline at end of file +var _0x2698=['sequelize'];(function(_0x8c43de,_0x90ff31){var _0xa6591b=function(_0x469716){while(--_0x469716){_0x8c43de['push'](_0x8c43de['shift']());}};_0xa6591b(++_0x90ff31);}(_0x2698,0x1e5));var _0x8269=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x2698[_0x3dd15e];return _0x231fd0;};'use strict';var Sequelize=require(_0x8269('0x0'));module['exports']={'penalty':{'type':Sequelize['INTEGER'],'defaultValue':0x0}}; \ No newline at end of file diff --git a/server/api/teamVoiceQueue/teamVoiceQueue.model.js b/server/api/teamVoiceQueue/teamVoiceQueue.model.js index 21de21a..56e9c81 100644 --- a/server/api/teamVoiceQueue/teamVoiceQueue.model.js +++ b/server/api/teamVoiceQueue/teamVoiceQueue.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb2ef=['../../config/logger','moment','bluebird','request-promise','rimraf','../../config/environment','./teamVoiceQueue.attributes','exports','define','TeamVoiceQueue','team_has_voice_queues','lodash','util'];(function(_0x5b503b,_0xe75bbe){var _0x43b949=function(_0x3d83a7){while(--_0x3d83a7){_0x5b503b['push'](_0x5b503b['shift']());}};_0x43b949(++_0xe75bbe);}(_0xb2ef,0xa7));var _0xfb2e=function(_0x4f6d24,_0x3dcf92){_0x4f6d24=_0x4f6d24-0x0;var _0x2f89c2=_0xb2ef[_0x4f6d24];return _0x2f89c2;};'use strict';var _=require(_0xfb2e('0x0'));var util=require(_0xfb2e('0x1'));var logger=require(_0xfb2e('0x2'))('api');var moment=require(_0xfb2e('0x3'));var BPromise=require(_0xfb2e('0x4'));var rp=require(_0xfb2e('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0xfb2e('0x6'));var config=require(_0xfb2e('0x7'));var attributes=require(_0xfb2e('0x8'));module[_0xfb2e('0x9')]=function(_0x3069a,_0x2a1c23){return _0x3069a[_0xfb2e('0xa')](_0xfb2e('0xb'),attributes,{'tableName':_0xfb2e('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x8135=['moment','request-promise','path','rimraf','../../config/environment','./teamVoiceQueue.attributes','define','TeamVoiceQueue','team_has_voice_queues','util','../../config/logger','api'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x8135,0x99));var _0x5813=function(_0x4bdb5c,_0x369e27){_0x4bdb5c=_0x4bdb5c-0x0;var _0x24f5e4=_0x8135[_0x4bdb5c];return _0x24f5e4;};'use strict';var _=require('lodash');var util=require(_0x5813('0x0'));var logger=require(_0x5813('0x1'))(_0x5813('0x2'));var moment=require(_0x5813('0x3'));var BPromise=require('bluebird');var rp=require(_0x5813('0x4'));var fs=require('fs');var path=require(_0x5813('0x5'));var rimraf=require(_0x5813('0x6'));var config=require(_0x5813('0x7'));var attributes=require(_0x5813('0x8'));module['exports']=function(_0x57ac38,_0x27599d){return _0x57ac38[_0x5813('0x9')](_0x5813('0xa'),attributes,{'tableName':_0x5813('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/teamVoiceQueue/teamVoiceQueue.rpc.js b/server/api/teamVoiceQueue/teamVoiceQueue.rpc.js index 75f108f..cefdc53 100644 --- a/server/api/teamVoiceQueue/teamVoiceQueue.rpc.js +++ b/server/api/teamVoiceQueue/teamVoiceQueue.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe2b6=['request\x20sent','stringify','error','code','message','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','info','TeamVoiceQueue,\x20%s,\x20%s','debug','TeamVoiceQueue,\x20%s,\x20%s,\x20%s'];(function(_0x593564,_0x43583f){var _0x211a89=function(_0x40afd6){while(--_0x40afd6){_0x593564['push'](_0x593564['shift']());}};_0x211a89(++_0x43583f);}(_0xe2b6,0x1b6));var _0x6e2b=function(_0x35cf23,_0x206c01){_0x35cf23=_0x35cf23-0x0;var _0x3fb6f7=_0xe2b6[_0x35cf23];return _0x3fb6f7;};'use strict';var _=require(_0x6e2b('0x0'));var util=require(_0x6e2b('0x1'));var moment=require(_0x6e2b('0x2'));var BPromise=require(_0x6e2b('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x6e2b('0x4'));var db=require(_0x6e2b('0x5'))['db'];var utils=require(_0x6e2b('0x6'));var logger=require(_0x6e2b('0x7'))(_0x6e2b('0x8'));var config=require('../../config/environment');var jayson=require(_0x6e2b('0x9'));var client=jayson[_0x6e2b('0xa')][_0x6e2b('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x1a9800,_0x140b28,_0x3acee8){return new BPromise(function(_0x50f4c8,_0x496a80){return client[_0x6e2b('0xc')](_0x1a9800,_0x3acee8)[_0x6e2b('0xd')](function(_0x51de79){logger[_0x6e2b('0xe')](_0x6e2b('0xf'),_0x140b28,'request\x20sent');logger[_0x6e2b('0x10')](_0x6e2b('0x11'),_0x140b28,_0x6e2b('0x12'),JSON[_0x6e2b('0x13')](_0x51de79));if(_0x51de79[_0x6e2b('0x14')]){if(_0x51de79['error'][_0x6e2b('0x15')]===0x1f4){logger[_0x6e2b('0x14')](_0x6e2b('0xf'),_0x140b28,_0x51de79[_0x6e2b('0x14')]['message']);return _0x496a80(_0x51de79[_0x6e2b('0x14')][_0x6e2b('0x16')]);}logger[_0x6e2b('0x14')](_0x6e2b('0xf'),_0x140b28,_0x51de79['error'][_0x6e2b('0x16')]);return _0x50f4c8(_0x51de79['error'][_0x6e2b('0x16')]);}else{logger[_0x6e2b('0xe')](_0x6e2b('0xf'),_0x140b28,_0x6e2b('0x12'));_0x50f4c8(_0x51de79['result'][_0x6e2b('0x16')]);}})[_0x6e2b('0x17')](function(_0x4ea214){logger['error'](_0x6e2b('0xf'),_0x140b28,_0x4ea214);_0x496a80(_0x4ea214);});});} \ No newline at end of file +var _0x2036=['request','info','TeamVoiceQueue,\x20%s,\x20%s','debug','TeamVoiceQueue,\x20%s,\x20%s,\x20%s','stringify','error','message','request\x20sent','result','catch','lodash','util','moment','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client'];(function(_0x576292,_0x195b07){var _0x21b32d=function(_0xe0721c){while(--_0xe0721c){_0x576292['push'](_0x576292['shift']());}};_0x21b32d(++_0x195b07);}(_0x2036,0x19a));var _0x6203=function(_0x2b7248,_0x17b24e){_0x2b7248=_0x2b7248-0x0;var _0x418838=_0x2036[_0x2b7248];return _0x418838;};'use strict';var _=require(_0x6203('0x0'));var util=require(_0x6203('0x1'));var moment=require(_0x6203('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x6203('0x3'))['db'];var utils=require(_0x6203('0x4'));var logger=require(_0x6203('0x5'))(_0x6203('0x6'));var config=require(_0x6203('0x7'));var jayson=require(_0x6203('0x8'));var client=jayson[_0x6203('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x6a647,_0x1bb972,_0x455035){return new BPromise(function(_0x134874,_0x46f8e8){return client[_0x6203('0xa')](_0x6a647,_0x455035)['then'](function(_0x54ffe5){logger[_0x6203('0xb')](_0x6203('0xc'),_0x1bb972,'request\x20sent');logger[_0x6203('0xd')](_0x6203('0xe'),_0x1bb972,'request\x20sent',JSON[_0x6203('0xf')](_0x54ffe5));if(_0x54ffe5[_0x6203('0x10')]){if(_0x54ffe5[_0x6203('0x10')]['code']===0x1f4){logger[_0x6203('0x10')](_0x6203('0xc'),_0x1bb972,_0x54ffe5['error'][_0x6203('0x11')]);return _0x46f8e8(_0x54ffe5['error'][_0x6203('0x11')]);}logger[_0x6203('0x10')](_0x6203('0xc'),_0x1bb972,_0x54ffe5['error'][_0x6203('0x11')]);return _0x134874(_0x54ffe5[_0x6203('0x10')][_0x6203('0x11')]);}else{logger[_0x6203('0xb')](_0x6203('0xc'),_0x1bb972,_0x6203('0x12'));_0x134874(_0x54ffe5[_0x6203('0x13')][_0x6203('0x11')]);}})[_0x6203('0x14')](function(_0x19db50){logger[_0x6203('0x10')]('TeamVoiceQueue,\x20%s,\x20%s',_0x1bb972,_0x19db50);_0x46f8e8(_0x19db50);});});} \ No newline at end of file diff --git a/server/api/template/index.js b/server/api/template/index.js index 10a546e..60c57f2 100644 --- a/server/api/template/index.js +++ b/server/api/template/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd1f1=['isAuthenticated','index','/:id','create','put','update','delete','destroy','multer','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get'];(function(_0x56f6c0,_0x37c097){var _0x249342=function(_0x4ab8d9){while(--_0x4ab8d9){_0x56f6c0['push'](_0x56f6c0['shift']());}};_0x249342(++_0x37c097);}(_0xd1f1,0xbc));var _0x1d1f=function(_0x5b5199,_0x58a8e5){_0x5b5199=_0x5b5199-0x0;var _0x2f5736=_0xd1f1[_0x5b5199];return _0x2f5736;};'use strict';var multer=require(_0x1d1f('0x0'));var util=require(_0x1d1f('0x1'));var path=require('path');var timeout=require(_0x1d1f('0x2'));var express=require(_0x1d1f('0x3'));var router=express[_0x1d1f('0x4')]();var fs_extra=require(_0x1d1f('0x5'));var auth=require(_0x1d1f('0x6'));var interaction=require(_0x1d1f('0x7'));var config=require(_0x1d1f('0x8'));var controller=require('./template.controller');router[_0x1d1f('0x9')]('/',auth[_0x1d1f('0xa')](),controller[_0x1d1f('0xb')]);router[_0x1d1f('0x9')](_0x1d1f('0xc'),auth['isAuthenticated'](),controller['show']);router['post']('/',auth[_0x1d1f('0xa')](),controller[_0x1d1f('0xd')]);router[_0x1d1f('0xe')](_0x1d1f('0xc'),auth['isAuthenticated'](),controller[_0x1d1f('0xf')]);router[_0x1d1f('0x10')](_0x1d1f('0xc'),auth[_0x1d1f('0xa')](),controller[_0x1d1f('0x11')]);module['exports']=router; \ No newline at end of file +var _0x806d=['show','create','put','update','exports','multer','util','path','fs-extra','../../components/auth/service','../../config/environment','get','isAuthenticated','index','/:id'];(function(_0x5a3e4d,_0x4ab166){var _0x39efe7=function(_0x41a230){while(--_0x41a230){_0x5a3e4d['push'](_0x5a3e4d['shift']());}};_0x39efe7(++_0x4ab166);}(_0x806d,0x131));var _0xd806=function(_0x5192cb,_0x26e8d4){_0x5192cb=_0x5192cb-0x0;var _0x36e2d6=_0x806d[_0x5192cb];return _0x36e2d6;};'use strict';var multer=require(_0xd806('0x0'));var util=require(_0xd806('0x1'));var path=require(_0xd806('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express['Router']();var fs_extra=require(_0xd806('0x3'));var auth=require(_0xd806('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0xd806('0x5'));var controller=require('./template.controller');router[_0xd806('0x6')]('/',auth[_0xd806('0x7')](),controller[_0xd806('0x8')]);router[_0xd806('0x6')](_0xd806('0x9'),auth[_0xd806('0x7')](),controller[_0xd806('0xa')]);router['post']('/',auth[_0xd806('0x7')](),controller[_0xd806('0xb')]);router[_0xd806('0xc')](_0xd806('0x9'),auth['isAuthenticated'](),controller[_0xd806('0xd')]);router['delete'](_0xd806('0x9'),auth[_0xd806('0x7')](),controller['destroy']);module[_0xd806('0xe')]=router; \ No newline at end of file diff --git a/server/api/template/template.attributes.js b/server/api/template/template.attributes.js index 8096bf5..b161417 100644 --- a/server/api/template/template.attributes.js +++ b/server/api/template/template.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1212=['TEXT','sequelize','exports','STRING'];(function(_0x3e3064,_0x3dd6f5){var _0x4547e1=function(_0x785d07){while(--_0x785d07){_0x3e3064['push'](_0x3e3064['shift']());}};_0x4547e1(++_0x3dd6f5);}(_0x1212,0xe9));var _0x2121=function(_0x32eb94,_0xdb46e8){_0x32eb94=_0x32eb94-0x0;var _0x4f4810=_0x1212[_0x32eb94];return _0x4f4810;};'use strict';var Sequelize=require(_0x2121('0x0'));module[_0x2121('0x1')]={'name':{'type':Sequelize[_0x2121('0x2')]},'description':{'type':Sequelize[_0x2121('0x2')]},'html':{'type':Sequelize[_0x2121('0x3')]}}; \ No newline at end of file +var _0x97c1=['TEXT','sequelize','STRING'];(function(_0x295d43,_0x23d66c){var _0x1b813a=function(_0x392699){while(--_0x392699){_0x295d43['push'](_0x295d43['shift']());}};_0x1b813a(++_0x23d66c);}(_0x97c1,0x12d));var _0x197c=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x97c1[_0x20a584];return _0x4b41a8;};'use strict';var Sequelize=require(_0x197c('0x0'));module['exports']={'name':{'type':Sequelize[_0x197c('0x1')]},'description':{'type':Sequelize[_0x197c('0x1')]},'html':{'type':Sequelize[_0x197c('0x2')]}}; \ No newline at end of file diff --git a/server/api/template/template.controller.js b/server/api/template/template.controller.js index 22879fd..52e7a96 100644 --- a/server/api/template/template.controller.js +++ b/server/api/template/template.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8586=['../../mysqldb','status','end','undefined','limit','count','Content-Range','json','apply','then','destroy','get','Templates','sendStatus','error','stack','name','send','index','Template','rawAttributes','fieldName','type','key','model','map','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','offset','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','rows','catch','show','params','keys','find','create','body','user','role','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','to-csv','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/environment','../../config/license/util'];(function(_0x27125a,_0x4608c9){var _0x3ffd34=function(_0x111b1f){while(--_0x111b1f){_0x27125a['push'](_0x27125a['shift']());}};_0x3ffd34(++_0x4608c9);}(_0x8586,0x8d));var _0x6858=function(_0x1dd82f,_0x52acb7){_0x1dd82f=_0x1dd82f-0x0;var _0x353ca4=_0x8586[_0x1dd82f];return _0x353ca4;};'use strict';var emlformat=require(_0x6858('0x0'));var rimraf=require(_0x6858('0x1'));var zipdir=require(_0x6858('0x2'));var jsonpatch=require(_0x6858('0x3'));var rp=require('request-promise');var moment=require(_0x6858('0x4'));var BPromise=require(_0x6858('0x5'));var Mustache=require(_0x6858('0x6'));var util=require(_0x6858('0x7'));var path=require('path');var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x6858('0x8'));var fs=require('fs');var fs_extra=require(_0x6858('0x9'));var _=require(_0x6858('0xa'));var squel=require(_0x6858('0xb'));var crypto=require(_0x6858('0xc'));var jsforce=require(_0x6858('0xd'));var deskjs=require(_0x6858('0xe'));var toCsv=require(_0x6858('0xf'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x6858('0x10'));var authService=require(_0x6858('0x11'));var qs=require(_0x6858('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x6858('0x13'));var logger=require('../../config/logger')(_0x6858('0x14'));var utils=require('../../config/utils');var config=require(_0x6858('0x15'));var licenseUtil=require(_0x6858('0x16'));var db=require(_0x6858('0x17'))['db'];function respondWithStatusCode(_0x159bd8,_0x3b698b){_0x3b698b=_0x3b698b||0xcc;return function(_0x4d5bb2){if(_0x4d5bb2){return _0x159bd8['sendStatus'](_0x3b698b);}return _0x159bd8[_0x6858('0x18')](_0x3b698b)[_0x6858('0x19')]();};}function respondWithResult(_0x36c290,_0x1073e6){_0x1073e6=_0x1073e6||0xc8;return function(_0x302670){if(_0x302670){return _0x36c290[_0x6858('0x18')](_0x1073e6)['json'](_0x302670);}};}function respondWithFilteredResult(_0x2cda9f,_0x1d91bf){return function(_0xc8e2a4){if(_0xc8e2a4){var _0x1b6cd4=typeof _0x1d91bf['offset']===_0x6858('0x1a')&&typeof _0x1d91bf[_0x6858('0x1b')]===_0x6858('0x1a');var _0x1412d9=_0xc8e2a4[_0x6858('0x1c')];var _0x337ddc=_0x1b6cd4?0x0:_0x1d91bf['offset'];var _0x130c57=_0x1b6cd4?_0xc8e2a4[_0x6858('0x1c')]:_0x1d91bf['offset']+_0x1d91bf[_0x6858('0x1b')];var _0x45f660;if(_0x130c57>=_0x1412d9){_0x130c57=_0x1412d9;_0x45f660=0xc8;}else{_0x45f660=0xce;}_0x2cda9f[_0x6858('0x18')](_0x45f660);return _0x2cda9f['set'](_0x6858('0x1d'),_0x337ddc+'-'+_0x130c57+'/'+_0x1412d9)[_0x6858('0x1e')](_0xc8e2a4);}return null;};}function patchUpdates(_0x4d604f){return function(_0x2a7314){try{jsonpatch[_0x6858('0x1f')](_0x2a7314,_0x4d604f,!![]);}catch(_0x23d082){return BPromise['reject'](_0x23d082);}return _0x2a7314['save']();};}function saveUpdates(_0xb32603,_0x442440){return function(_0x307a5){if(_0x307a5){return _0x307a5['update'](_0xb32603)[_0x6858('0x20')](function(_0xe023d7){return _0xe023d7;});}return null;};}function removeEntity(_0x3b0361,_0x4f8c0f){return function(_0xfefc49){if(_0xfefc49){return _0xfefc49[_0x6858('0x21')]()[_0x6858('0x20')](function(){var _0x503d0c=_0xfefc49[_0x6858('0x22')]({'plain':!![]});var _0x3b7100=_0x6858('0x23');return db['UserProfileResource']['destroy']({'where':{'type':_0x3b7100,'resourceId':_0x503d0c['id']}})[_0x6858('0x20')](function(){return _0xfefc49;});})['then'](function(){_0x3b0361[_0x6858('0x18')](0xcc)[_0x6858('0x19')]();});}};}function handleEntityNotFound(_0x39008a,_0x38a7f3){return function(_0x326c86){if(!_0x326c86){_0x39008a[_0x6858('0x24')](0x194);}return _0x326c86;};}function handleError(_0x5e192a,_0x45faa8){_0x45faa8=_0x45faa8||0x1f4;return function(_0x241717){logger[_0x6858('0x25')](_0x241717[_0x6858('0x26')]);if(_0x241717[_0x6858('0x27')]){delete _0x241717[_0x6858('0x27')];}_0x5e192a['status'](_0x45faa8)[_0x6858('0x28')](_0x241717);};}exports[_0x6858('0x29')]=function(_0x46a047,_0x5b5f5f){var _0x48895c={},_0x598401={},_0xda8dd4={'count':0x0,'rows':[]};var _0x53f021=_['map'](db[_0x6858('0x2a')][_0x6858('0x2b')],function(_0x525f9d){return{'name':_0x525f9d[_0x6858('0x2c')],'type':_0x525f9d[_0x6858('0x2d')][_0x6858('0x2e')]};});_0x598401[_0x6858('0x2f')]=_[_0x6858('0x30')](_0x53f021,_0x6858('0x27'));_0x598401[_0x6858('0x31')]=_['keys'](_0x46a047[_0x6858('0x31')]);_0x598401[_0x6858('0x32')]=_[_0x6858('0x33')](_0x598401['model'],_0x598401[_0x6858('0x31')]);_0x48895c[_0x6858('0x34')]=_[_0x6858('0x33')](_0x598401[_0x6858('0x2f')],qs[_0x6858('0x35')](_0x46a047['query']['fields']));_0x48895c['attributes']=_0x48895c[_0x6858('0x34')][_0x6858('0x36')]?_0x48895c[_0x6858('0x34')]:_0x598401[_0x6858('0x2f')];if(!_0x46a047[_0x6858('0x31')][_0x6858('0x37')](_0x6858('0x38'))){_0x48895c[_0x6858('0x1b')]=qs[_0x6858('0x1b')](_0x46a047[_0x6858('0x31')][_0x6858('0x1b')]);_0x48895c[_0x6858('0x39')]=qs[_0x6858('0x39')](_0x46a047[_0x6858('0x31')][_0x6858('0x39')]);}_0x48895c[_0x6858('0x3a')]=qs['sort'](_0x46a047['query'][_0x6858('0x3b')]);_0x48895c[_0x6858('0x3c')]=qs[_0x6858('0x32')](_[_0x6858('0x3d')](_0x46a047[_0x6858('0x31')],_0x598401[_0x6858('0x32')]),_0x53f021);if(_0x46a047[_0x6858('0x31')][_0x6858('0x3e')]){_0x48895c[_0x6858('0x3c')]=_[_0x6858('0x3f')](_0x48895c['where'],{'$or':_[_0x6858('0x30')](_0x53f021,function(_0x5f1b76){if(_0x5f1b76['type']!==_0x6858('0x40')){var _0x347d0d={};_0x347d0d[_0x5f1b76[_0x6858('0x27')]]={'$like':'%'+_0x46a047['query'][_0x6858('0x3e')]+'%'};return _0x347d0d;}})});}_0x48895c=_[_0x6858('0x3f')]({},_0x48895c,_0x46a047[_0x6858('0x41')]);var _0x57c838={'where':_0x48895c[_0x6858('0x3c')]};return db[_0x6858('0x2a')][_0x6858('0x1c')](_0x57c838)[_0x6858('0x20')](function(_0x70d8af){_0xda8dd4[_0x6858('0x1c')]=_0x70d8af;if(_0x46a047[_0x6858('0x31')][_0x6858('0x42')]){_0x48895c[_0x6858('0x43')]=[{'all':!![]}];}return db['Template']['findAll'](_0x48895c);})[_0x6858('0x20')](function(_0x265289){_0xda8dd4[_0x6858('0x44')]=_0x265289;return _0xda8dd4;})[_0x6858('0x20')](respondWithFilteredResult(_0x5b5f5f,_0x48895c))[_0x6858('0x45')](handleError(_0x5b5f5f,null));};exports[_0x6858('0x46')]=function(_0x27759b,_0x18c921){var _0x3b8750={'raw':!![],'where':{'id':_0x27759b[_0x6858('0x47')]['id']}},_0x5adf9b={};_0x5adf9b[_0x6858('0x2f')]=_[_0x6858('0x48')](db[_0x6858('0x2a')][_0x6858('0x2b')]);_0x5adf9b[_0x6858('0x31')]=_[_0x6858('0x48')](_0x27759b[_0x6858('0x31')]);_0x5adf9b['filters']=_[_0x6858('0x33')](_0x5adf9b['model'],_0x5adf9b[_0x6858('0x31')]);_0x3b8750['attributes']=_[_0x6858('0x33')](_0x5adf9b[_0x6858('0x2f')],qs['fields'](_0x27759b[_0x6858('0x31')][_0x6858('0x35')]));_0x3b8750[_0x6858('0x34')]=_0x3b8750[_0x6858('0x34')]['length']?_0x3b8750['attributes']:_0x5adf9b[_0x6858('0x2f')];if(_0x27759b[_0x6858('0x31')][_0x6858('0x42')]){_0x3b8750[_0x6858('0x43')]=[{'all':!![]}];}_0x3b8750=_[_0x6858('0x3f')]({},_0x3b8750,_0x27759b[_0x6858('0x41')]);return db[_0x6858('0x2a')][_0x6858('0x49')](_0x3b8750)['then'](handleEntityNotFound(_0x18c921,null))[_0x6858('0x20')](respondWithResult(_0x18c921,null))[_0x6858('0x45')](handleError(_0x18c921,null));};exports['create']=function(_0x271c2e,_0x57290b){return db['Template'][_0x6858('0x4a')](_0x271c2e[_0x6858('0x4b')],{})['then'](function(_0x41d79e){var _0x505b5b=_0x271c2e[_0x6858('0x4c')]['get']({'plain':!![]});if(!_0x505b5b)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x505b5b[_0x6858('0x4d')]===_0x6858('0x4c')){var _0x2f2f03=_0x41d79e[_0x6858('0x22')]({'plain':!![]});var _0x2a36d5=_0x6858('0x23');return db[_0x6858('0x4e')][_0x6858('0x49')]({'where':{'name':_0x2a36d5,'userProfileId':_0x505b5b['userProfileId']},'raw':!![]})[_0x6858('0x20')](function(_0x30eecd){if(_0x30eecd&&_0x30eecd[_0x6858('0x4f')]===0x0){return db['UserProfileResource'][_0x6858('0x4a')]({'name':_0x2f2f03[_0x6858('0x27')],'resourceId':_0x2f2f03['id'],'type':_0x30eecd[_0x6858('0x27')],'sectionId':_0x30eecd['id']},{})[_0x6858('0x20')](function(){return _0x41d79e;});}else{return _0x41d79e;}})[_0x6858('0x45')](function(_0x1b9d53){logger[_0x6858('0x25')](_0x6858('0x50'),_0x1b9d53);throw _0x1b9d53;});}return _0x41d79e;})['then'](respondWithResult(_0x57290b,0xc9))['catch'](handleError(_0x57290b,null));};exports[_0x6858('0x51')]=function(_0x448bd0,_0x45ad6a){if(_0x448bd0[_0x6858('0x4b')]['id']){delete _0x448bd0[_0x6858('0x4b')]['id'];}return db[_0x6858('0x2a')]['find']({'where':{'id':_0x448bd0['params']['id']}})[_0x6858('0x20')](handleEntityNotFound(_0x45ad6a,null))['then'](saveUpdates(_0x448bd0['body'],null))[_0x6858('0x20')](respondWithResult(_0x45ad6a,null))['catch'](handleError(_0x45ad6a,null));};exports[_0x6858('0x21')]=function(_0x3b0529,_0x3c8ed2){return db[_0x6858('0x2a')][_0x6858('0x49')]({'where':{'id':_0x3b0529[_0x6858('0x47')]['id']}})[_0x6858('0x20')](handleEntityNotFound(_0x3c8ed2,null))[_0x6858('0x20')](removeEntity(_0x3c8ed2,null))['catch'](handleError(_0x3c8ed2,null));}; \ No newline at end of file +var _0x23bb=['../../config/environment','../../mysqldb','sendStatus','end','json','offset','undefined','count','limit','status','set','apply','update','then','get','Templates','UserProfileResource','destroy','stack','name','send','index','map','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','filter','VIRTUAL','Template','includeAll','include','rows','catch','show','params','merge','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','userProfileId','autoAssociation','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','eml-format','rimraf','moment','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api'];(function(_0x41018f,_0x50ddac){var _0x4e0f1f=function(_0x3bbb08){while(--_0x3bbb08){_0x41018f['push'](_0x41018f['shift']());}};_0x4e0f1f(++_0x50ddac);}(_0x23bb,0x8b));var _0xb23b=function(_0x2534a0,_0xda89db){_0x2534a0=_0x2534a0-0x0;var _0x3209c0=_0x23bb[_0x2534a0];return _0x3209c0;};'use strict';var emlformat=require(_0xb23b('0x0'));var rimraf=require(_0xb23b('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0xb23b('0x2'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require('util');var path=require('path');var sox=require(_0xb23b('0x3'));var csv=require(_0xb23b('0x4'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xb23b('0x5'));var _=require(_0xb23b('0x6'));var squel=require(_0xb23b('0x7'));var crypto=require(_0xb23b('0x8'));var jsforce=require(_0xb23b('0x9'));var deskjs=require(_0xb23b('0xa'));var toCsv=require(_0xb23b('0x4'));var querystring=require(_0xb23b('0xb'));var Papa=require(_0xb23b('0xc'));var Redis=require(_0xb23b('0xd'));var authService=require(_0xb23b('0xe'));var qs=require(_0xb23b('0xf'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xb23b('0x10'));var logger=require(_0xb23b('0x11'))(_0xb23b('0x12'));var utils=require('../../config/utils');var config=require(_0xb23b('0x13'));var licenseUtil=require('../../config/license/util');var db=require(_0xb23b('0x14'))['db'];function respondWithStatusCode(_0xe700bf,_0x473e99){_0x473e99=_0x473e99||0xcc;return function(_0x16013d){if(_0x16013d){return _0xe700bf[_0xb23b('0x15')](_0x473e99);}return _0xe700bf['status'](_0x473e99)[_0xb23b('0x16')]();};}function respondWithResult(_0x4a816c,_0x57b986){_0x57b986=_0x57b986||0xc8;return function(_0x4ab2fe){if(_0x4ab2fe){return _0x4a816c['status'](_0x57b986)[_0xb23b('0x17')](_0x4ab2fe);}};}function respondWithFilteredResult(_0x1f85b9,_0x5bf626){return function(_0x203f77){if(_0x203f77){var _0x6b7b72=typeof _0x5bf626[_0xb23b('0x18')]===_0xb23b('0x19')&&typeof _0x5bf626['limit']===_0xb23b('0x19');var _0x412f1a=_0x203f77[_0xb23b('0x1a')];var _0x4c5a73=_0x6b7b72?0x0:_0x5bf626[_0xb23b('0x18')];var _0x262680=_0x6b7b72?_0x203f77[_0xb23b('0x1a')]:_0x5bf626[_0xb23b('0x18')]+_0x5bf626[_0xb23b('0x1b')];var _0x448c6b;if(_0x262680>=_0x412f1a){_0x262680=_0x412f1a;_0x448c6b=0xc8;}else{_0x448c6b=0xce;}_0x1f85b9[_0xb23b('0x1c')](_0x448c6b);return _0x1f85b9[_0xb23b('0x1d')]('Content-Range',_0x4c5a73+'-'+_0x262680+'/'+_0x412f1a)[_0xb23b('0x17')](_0x203f77);}return null;};}function patchUpdates(_0x57139e){return function(_0xa92678){try{jsonpatch[_0xb23b('0x1e')](_0xa92678,_0x57139e,!![]);}catch(_0xe6911f){return BPromise['reject'](_0xe6911f);}return _0xa92678['save']();};}function saveUpdates(_0x4dcb9c,_0x595727){return function(_0x4559f7){if(_0x4559f7){return _0x4559f7[_0xb23b('0x1f')](_0x4dcb9c)[_0xb23b('0x20')](function(_0x54b8be){return _0x54b8be;});}return null;};}function removeEntity(_0x58a66c,_0x4e0d1d){return function(_0xc0b5cc){if(_0xc0b5cc){return _0xc0b5cc['destroy']()[_0xb23b('0x20')](function(){var _0x5baba8=_0xc0b5cc[_0xb23b('0x21')]({'plain':!![]});var _0x3fc57d=_0xb23b('0x22');return db[_0xb23b('0x23')][_0xb23b('0x24')]({'where':{'type':_0x3fc57d,'resourceId':_0x5baba8['id']}})[_0xb23b('0x20')](function(){return _0xc0b5cc;});})[_0xb23b('0x20')](function(){_0x58a66c['status'](0xcc)[_0xb23b('0x16')]();});}};}function handleEntityNotFound(_0x1a6d63,_0x58c3fd){return function(_0x4ddd16){if(!_0x4ddd16){_0x1a6d63[_0xb23b('0x15')](0x194);}return _0x4ddd16;};}function handleError(_0x4a63bf,_0x3575a3){_0x3575a3=_0x3575a3||0x1f4;return function(_0xb656cb){logger['error'](_0xb656cb[_0xb23b('0x25')]);if(_0xb656cb[_0xb23b('0x26')]){delete _0xb656cb[_0xb23b('0x26')];}_0x4a63bf[_0xb23b('0x1c')](_0x3575a3)[_0xb23b('0x27')](_0xb656cb);};}exports[_0xb23b('0x28')]=function(_0x23f56d,_0xb47239){var _0x13b1f1={},_0x44fe05={},_0x548a64={'count':0x0,'rows':[]};var _0x437f0b=_[_0xb23b('0x29')](db['Template'][_0xb23b('0x2a')],function(_0x23d742){return{'name':_0x23d742[_0xb23b('0x2b')],'type':_0x23d742[_0xb23b('0x2c')][_0xb23b('0x2d')]};});_0x44fe05[_0xb23b('0x2e')]=_[_0xb23b('0x29')](_0x437f0b,'name');_0x44fe05[_0xb23b('0x2f')]=_[_0xb23b('0x30')](_0x23f56d['query']);_0x44fe05[_0xb23b('0x31')]=_[_0xb23b('0x32')](_0x44fe05[_0xb23b('0x2e')],_0x44fe05[_0xb23b('0x2f')]);_0x13b1f1['attributes']=_[_0xb23b('0x32')](_0x44fe05[_0xb23b('0x2e')],qs['fields'](_0x23f56d[_0xb23b('0x2f')][_0xb23b('0x33')]));_0x13b1f1['attributes']=_0x13b1f1[_0xb23b('0x34')][_0xb23b('0x35')]?_0x13b1f1['attributes']:_0x44fe05['model'];if(!_0x23f56d['query'][_0xb23b('0x36')](_0xb23b('0x37'))){_0x13b1f1['limit']=qs[_0xb23b('0x1b')](_0x23f56d[_0xb23b('0x2f')][_0xb23b('0x1b')]);_0x13b1f1[_0xb23b('0x18')]=qs[_0xb23b('0x18')](_0x23f56d[_0xb23b('0x2f')][_0xb23b('0x18')]);}_0x13b1f1[_0xb23b('0x38')]=qs[_0xb23b('0x39')](_0x23f56d['query'][_0xb23b('0x39')]);_0x13b1f1[_0xb23b('0x3a')]=qs[_0xb23b('0x31')](_['pick'](_0x23f56d[_0xb23b('0x2f')],_0x44fe05['filters']),_0x437f0b);if(_0x23f56d[_0xb23b('0x2f')][_0xb23b('0x3b')]){_0x13b1f1[_0xb23b('0x3a')]=_['merge'](_0x13b1f1[_0xb23b('0x3a')],{'$or':_['map'](_0x437f0b,function(_0x24e6bb){if(_0x24e6bb['type']!==_0xb23b('0x3c')){var _0x119b60={};_0x119b60[_0x24e6bb['name']]={'$like':'%'+_0x23f56d[_0xb23b('0x2f')][_0xb23b('0x3b')]+'%'};return _0x119b60;}})});}_0x13b1f1=_['merge']({},_0x13b1f1,_0x23f56d['options']);var _0x19a81e={'where':_0x13b1f1[_0xb23b('0x3a')]};return db[_0xb23b('0x3d')][_0xb23b('0x1a')](_0x19a81e)[_0xb23b('0x20')](function(_0x26551f){_0x548a64['count']=_0x26551f;if(_0x23f56d[_0xb23b('0x2f')][_0xb23b('0x3e')]){_0x13b1f1[_0xb23b('0x3f')]=[{'all':!![]}];}return db[_0xb23b('0x3d')]['findAll'](_0x13b1f1);})['then'](function(_0x4ab509){_0x548a64[_0xb23b('0x40')]=_0x4ab509;return _0x548a64;})[_0xb23b('0x20')](respondWithFilteredResult(_0xb47239,_0x13b1f1))[_0xb23b('0x41')](handleError(_0xb47239,null));};exports[_0xb23b('0x42')]=function(_0x4141ee,_0x424d80){var _0x321c13={'raw':!![],'where':{'id':_0x4141ee[_0xb23b('0x43')]['id']}},_0x3b56a5={};_0x3b56a5[_0xb23b('0x2e')]=_[_0xb23b('0x30')](db['Template'][_0xb23b('0x2a')]);_0x3b56a5[_0xb23b('0x2f')]=_[_0xb23b('0x30')](_0x4141ee[_0xb23b('0x2f')]);_0x3b56a5[_0xb23b('0x31')]=_[_0xb23b('0x32')](_0x3b56a5[_0xb23b('0x2e')],_0x3b56a5[_0xb23b('0x2f')]);_0x321c13[_0xb23b('0x34')]=_['intersection'](_0x3b56a5[_0xb23b('0x2e')],qs[_0xb23b('0x33')](_0x4141ee['query'][_0xb23b('0x33')]));_0x321c13[_0xb23b('0x34')]=_0x321c13[_0xb23b('0x34')][_0xb23b('0x35')]?_0x321c13['attributes']:_0x3b56a5[_0xb23b('0x2e')];if(_0x4141ee[_0xb23b('0x2f')][_0xb23b('0x3e')]){_0x321c13['include']=[{'all':!![]}];}_0x321c13=_[_0xb23b('0x44')]({},_0x321c13,_0x4141ee['options']);return db[_0xb23b('0x3d')][_0xb23b('0x45')](_0x321c13)[_0xb23b('0x20')](handleEntityNotFound(_0x424d80,null))['then'](respondWithResult(_0x424d80,null))['catch'](handleError(_0x424d80,null));};exports[_0xb23b('0x46')]=function(_0x13a86b,_0x3d1eb6){return db[_0xb23b('0x3d')][_0xb23b('0x46')](_0x13a86b[_0xb23b('0x47')],{})[_0xb23b('0x20')](function(_0x111e9d){var _0x1e9632=_0x13a86b[_0xb23b('0x48')][_0xb23b('0x21')]({'plain':!![]});if(!_0x1e9632)throw new Error(_0xb23b('0x49'));if(_0x1e9632[_0xb23b('0x4a')]==='user'){var _0x1524fb=_0x111e9d[_0xb23b('0x21')]({'plain':!![]});var _0x2ea1c8=_0xb23b('0x22');return db['UserProfileSection'][_0xb23b('0x45')]({'where':{'name':_0x2ea1c8,'userProfileId':_0x1e9632[_0xb23b('0x4b')]},'raw':!![]})[_0xb23b('0x20')](function(_0x39c5c5){if(_0x39c5c5&&_0x39c5c5[_0xb23b('0x4c')]===0x0){return db[_0xb23b('0x23')]['create']({'name':_0x1524fb['name'],'resourceId':_0x1524fb['id'],'type':_0x39c5c5[_0xb23b('0x26')],'sectionId':_0x39c5c5['id']},{})[_0xb23b('0x20')](function(){return _0x111e9d;});}else{return _0x111e9d;}})[_0xb23b('0x41')](function(_0x4e0983){logger[_0xb23b('0x4d')](_0xb23b('0x4e'),_0x4e0983);throw _0x4e0983;});}return _0x111e9d;})[_0xb23b('0x20')](respondWithResult(_0x3d1eb6,0xc9))[_0xb23b('0x41')](handleError(_0x3d1eb6,null));};exports[_0xb23b('0x1f')]=function(_0x317a1b,_0xea4987){if(_0x317a1b[_0xb23b('0x47')]['id']){delete _0x317a1b[_0xb23b('0x47')]['id'];}return db[_0xb23b('0x3d')][_0xb23b('0x45')]({'where':{'id':_0x317a1b['params']['id']}})[_0xb23b('0x20')](handleEntityNotFound(_0xea4987,null))['then'](saveUpdates(_0x317a1b[_0xb23b('0x47')],null))[_0xb23b('0x20')](respondWithResult(_0xea4987,null))['catch'](handleError(_0xea4987,null));};exports['destroy']=function(_0x23f8b7,_0x2634de){return db['Template'][_0xb23b('0x45')]({'where':{'id':_0x23f8b7[_0xb23b('0x43')]['id']}})[_0xb23b('0x20')](handleEntityNotFound(_0x2634de,null))[_0xb23b('0x20')](removeEntity(_0x2634de,null))[_0xb23b('0x41')](handleError(_0x2634de,null));}; \ No newline at end of file diff --git a/server/api/template/template.model.js b/server/api/template/template.model.js index 5687307..e32ed07 100644 --- a/server/api/template/template.model.js +++ b/server/api/template/template.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe60f=['Template','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./template.attributes','define'];(function(_0x2f486d,_0x21655f){var _0x310c46=function(_0x4ccc73){while(--_0x4ccc73){_0x2f486d['push'](_0x2f486d['shift']());}};_0x310c46(++_0x21655f);}(_0xe60f,0x1c8));var _0xfe60=function(_0x40d35c,_0x34372a){_0x40d35c=_0x40d35c-0x0;var _0x5aea8e=_0xe60f[_0x40d35c];return _0x5aea8e;};'use strict';var _=require(_0xfe60('0x0'));var util=require(_0xfe60('0x1'));var logger=require(_0xfe60('0x2'))(_0xfe60('0x3'));var moment=require(_0xfe60('0x4'));var BPromise=require(_0xfe60('0x5'));var rp=require(_0xfe60('0x6'));var fs=require('fs');var path=require(_0xfe60('0x7'));var rimraf=require(_0xfe60('0x8'));var config=require(_0xfe60('0x9'));var attributes=require(_0xfe60('0xa'));module['exports']=function(_0x24552b,_0x3f1650){return _0x24552b[_0xfe60('0xb')](_0xfe60('0xc'),attributes,{'tableName':'tools_templates','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xca83=['api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./template.attributes','exports','define','Template','tools_templates','lodash','util','../../config/logger'];(function(_0x5447fd,_0x52a6b5){var _0x15b28a=function(_0x370d4f){while(--_0x370d4f){_0x5447fd['push'](_0x5447fd['shift']());}};_0x15b28a(++_0x52a6b5);}(_0xca83,0x1dd));var _0x3ca8=function(_0x31a371,_0x50828e){_0x31a371=_0x31a371-0x0;var _0x2a5bd6=_0xca83[_0x31a371];return _0x2a5bd6;};'use strict';var _=require(_0x3ca8('0x0'));var util=require(_0x3ca8('0x1'));var logger=require(_0x3ca8('0x2'))(_0x3ca8('0x3'));var moment=require(_0x3ca8('0x4'));var BPromise=require(_0x3ca8('0x5'));var rp=require(_0x3ca8('0x6'));var fs=require('fs');var path=require(_0x3ca8('0x7'));var rimraf=require(_0x3ca8('0x8'));var config=require(_0x3ca8('0x9'));var attributes=require(_0x3ca8('0xa'));module[_0x3ca8('0xb')]=function(_0x5ec8b5,_0x547687){return _0x5ec8b5[_0x3ca8('0xc')](_0x3ca8('0xd'),attributes,{'tableName':_0x3ca8('0xe'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/template/template.rpc.js b/server/api/template/template.rpc.js index 5ef3c12..4bedf44 100644 --- a/server/api/template/template.rpc.js +++ b/server/api/template/template.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x51ab=['error','code','message','info','result','catch','GetTemplate','findAll','options','raw','where','attributes','include','map','model','stringify','moment','ioredis','../../mysqldb','../../config/environment','jayson/promise','http','then','Template,\x20%s,\x20%s','request\x20sent','debug','Template,\x20%s,\x20%s,\x20%s'];(function(_0x56716e,_0x176325){var _0x556414=function(_0x43f935){while(--_0x43f935){_0x56716e['push'](_0x56716e['shift']());}};_0x556414(++_0x176325);}(_0x51ab,0x103));var _0xb51a=function(_0x14a465,_0x394891){_0x14a465=_0x14a465-0x0;var _0x43ed62=_0x51ab[_0x14a465];return _0x43ed62;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xb51a('0x0'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xb51a('0x1'));var db=require(_0xb51a('0x2'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0xb51a('0x3'));var jayson=require(_0xb51a('0x4'));var client=jayson['client'][_0xb51a('0x5')]({'port':0x232a});function respondWithRpcPromise(_0x181cf6,_0x2edef,_0x1d3917){return new BPromise(function(_0xc42aff,_0x1994d0){return client['request'](_0x181cf6,_0x1d3917)[_0xb51a('0x6')](function(_0x227072){logger['info'](_0xb51a('0x7'),_0x2edef,_0xb51a('0x8'));logger[_0xb51a('0x9')](_0xb51a('0xa'),_0x2edef,_0xb51a('0x8'),JSON['stringify'](_0x227072));if(_0x227072[_0xb51a('0xb')]){if(_0x227072[_0xb51a('0xb')][_0xb51a('0xc')]===0x1f4){logger[_0xb51a('0xb')](_0xb51a('0x7'),_0x2edef,_0x227072[_0xb51a('0xb')][_0xb51a('0xd')]);return _0x1994d0(_0x227072[_0xb51a('0xb')][_0xb51a('0xd')]);}logger['error']('Template,\x20%s,\x20%s',_0x2edef,_0x227072[_0xb51a('0xb')]['message']);return _0xc42aff(_0x227072[_0xb51a('0xb')][_0xb51a('0xd')]);}else{logger[_0xb51a('0xe')](_0xb51a('0x7'),_0x2edef,'request\x20sent');_0xc42aff(_0x227072[_0xb51a('0xf')][_0xb51a('0xd')]);}})[_0xb51a('0x10')](function(_0x17dc02){logger[_0xb51a('0xb')](_0xb51a('0x7'),_0x2edef,_0x17dc02);_0x1994d0(_0x17dc02);});});}exports[_0xb51a('0x11')]=function(_0x1f26bb){var _0x104c37=this;return new Promise(function(_0x9851ac,_0x271437){return db['Template'][_0xb51a('0x12')]({'raw':_0x1f26bb[_0xb51a('0x13')]?_0x1f26bb[_0xb51a('0x13')][_0xb51a('0x14')]===undefined?!![]:![]:!![],'where':_0x1f26bb[_0xb51a('0x13')]?_0x1f26bb[_0xb51a('0x13')][_0xb51a('0x15')]||null:null,'attributes':_0x1f26bb[_0xb51a('0x13')]?_0x1f26bb[_0xb51a('0x13')][_0xb51a('0x16')]||null:null,'limit':_0x1f26bb[_0xb51a('0x13')]?_0x1f26bb[_0xb51a('0x13')]['limit']||null:null,'include':_0x1f26bb[_0xb51a('0x13')]?_0x1f26bb['options'][_0xb51a('0x17')]?_[_0xb51a('0x18')](_0x1f26bb['options'][_0xb51a('0x17')],function(_0x50b5ed){return{'model':db[_0x50b5ed[_0xb51a('0x19')]],'as':_0x50b5ed['as'],'attributes':_0x50b5ed[_0xb51a('0x16')],'include':_0x50b5ed[_0xb51a('0x17')]?_[_0xb51a('0x18')](_0x50b5ed[_0xb51a('0x17')],function(_0x267515){return{'model':db[_0x267515[_0xb51a('0x19')]],'as':_0x267515['as'],'attributes':_0x267515[_0xb51a('0x16')],'include':_0x267515[_0xb51a('0x17')]?_[_0xb51a('0x18')](_0x267515[_0xb51a('0x17')],function(_0x3daac3){return{'model':db[_0x3daac3[_0xb51a('0x19')]],'as':_0x3daac3['as'],'attributes':_0x3daac3[_0xb51a('0x16')]};}):[]};}):[]};}):[]:[]})[_0xb51a('0x6')](function(_0x1b5db1){logger[_0xb51a('0xe')]('GetTemplate',_0x1f26bb);logger['debug']('GetTemplate',_0x1f26bb,JSON[_0xb51a('0x1a')](_0x1b5db1));_0x9851ac(_0x1b5db1);})[_0xb51a('0x10')](function(_0x53d367){logger['error']('GetTemplate',_0x53d367[_0xb51a('0xd')],_0x1f26bb);_0x271437(_0x104c37[_0xb51a('0xb')](0x1f4,_0x53d367[_0xb51a('0xd')]));});});}; \ No newline at end of file +var _0x443f=['map','include','model','debug','stringify','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','Template,\x20%s,\x20%s','Template,\x20%s,\x20%s,\x20%s','error','code','message','info','request\x20sent','catch','GetTemplate','findAll','options','raw','where','limit'];(function(_0x1ea1b0,_0x435f9b){var _0x3ce275=function(_0x1efc6f){while(--_0x1efc6f){_0x1ea1b0['push'](_0x1ea1b0['shift']());}};_0x3ce275(++_0x435f9b);}(_0x443f,0x115));var _0xf443=function(_0x3feee2,_0x1fdf65){_0x3feee2=_0x3feee2-0x0;var _0x127ee9=_0x443f[_0x3feee2];return _0x127ee9;};'use strict';var _=require(_0xf443('0x0'));var util=require(_0xf443('0x1'));var moment=require('moment');var BPromise=require(_0xf443('0x2'));var rs=require(_0xf443('0x3'));var fs=require('fs');var Redis=require(_0xf443('0x4'));var db=require(_0xf443('0x5'))['db'];var utils=require(_0xf443('0x6'));var logger=require(_0xf443('0x7'))(_0xf443('0x8'));var config=require(_0xf443('0x9'));var jayson=require(_0xf443('0xa'));var client=jayson[_0xf443('0xb')][_0xf443('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x537ce7,_0x4599a8,_0x29b34a){return new BPromise(function(_0x481d37,_0x1c7e6f){return client[_0xf443('0xd')](_0x537ce7,_0x29b34a)[_0xf443('0xe')](function(_0x5b15a4){logger['info'](_0xf443('0xf'),_0x4599a8,'request\x20sent');logger['debug'](_0xf443('0x10'),_0x4599a8,'request\x20sent',JSON['stringify'](_0x5b15a4));if(_0x5b15a4[_0xf443('0x11')]){if(_0x5b15a4['error'][_0xf443('0x12')]===0x1f4){logger[_0xf443('0x11')](_0xf443('0xf'),_0x4599a8,_0x5b15a4[_0xf443('0x11')]['message']);return _0x1c7e6f(_0x5b15a4[_0xf443('0x11')][_0xf443('0x13')]);}logger[_0xf443('0x11')](_0xf443('0xf'),_0x4599a8,_0x5b15a4[_0xf443('0x11')][_0xf443('0x13')]);return _0x481d37(_0x5b15a4[_0xf443('0x11')]['message']);}else{logger[_0xf443('0x14')](_0xf443('0xf'),_0x4599a8,_0xf443('0x15'));_0x481d37(_0x5b15a4['result'][_0xf443('0x13')]);}})[_0xf443('0x16')](function(_0x4db632){logger['error'](_0xf443('0xf'),_0x4599a8,_0x4db632);_0x1c7e6f(_0x4db632);});});}exports[_0xf443('0x17')]=function(_0x4e6b44){var _0x42234c=this;return new Promise(function(_0x682c4f,_0x554c35){return db['Template'][_0xf443('0x18')]({'raw':_0x4e6b44[_0xf443('0x19')]?_0x4e6b44[_0xf443('0x19')][_0xf443('0x1a')]===undefined?!![]:![]:!![],'where':_0x4e6b44[_0xf443('0x19')]?_0x4e6b44[_0xf443('0x19')][_0xf443('0x1b')]||null:null,'attributes':_0x4e6b44[_0xf443('0x19')]?_0x4e6b44[_0xf443('0x19')]['attributes']||null:null,'limit':_0x4e6b44[_0xf443('0x19')]?_0x4e6b44[_0xf443('0x19')][_0xf443('0x1c')]||null:null,'include':_0x4e6b44[_0xf443('0x19')]?_0x4e6b44[_0xf443('0x19')]['include']?_[_0xf443('0x1d')](_0x4e6b44[_0xf443('0x19')][_0xf443('0x1e')],function(_0xa79d99){return{'model':db[_0xa79d99[_0xf443('0x1f')]],'as':_0xa79d99['as'],'attributes':_0xa79d99['attributes'],'include':_0xa79d99['include']?_[_0xf443('0x1d')](_0xa79d99[_0xf443('0x1e')],function(_0x3e9643){return{'model':db[_0x3e9643['model']],'as':_0x3e9643['as'],'attributes':_0x3e9643['attributes'],'include':_0x3e9643['include']?_['map'](_0x3e9643[_0xf443('0x1e')],function(_0x170cb2){return{'model':db[_0x170cb2[_0xf443('0x1f')]],'as':_0x170cb2['as'],'attributes':_0x170cb2['attributes']};}):[]};}):[]};}):[]:[]})[_0xf443('0xe')](function(_0x4726f6){logger['info'](_0xf443('0x17'),_0x4e6b44);logger[_0xf443('0x20')]('GetTemplate',_0x4e6b44,JSON[_0xf443('0x21')](_0x4726f6));_0x682c4f(_0x4726f6);})[_0xf443('0x16')](function(_0x373fc5){logger[_0xf443('0x11')](_0xf443('0x17'),_0x373fc5['message'],_0x4e6b44);_0x554c35(_0x42234c[_0xf443('0x11')](0x1f4,_0x373fc5['message']));});});}; \ No newline at end of file diff --git a/server/api/trigger/index.js b/server/api/trigger/index.js index 9e28b73..8ddb946 100644 --- a/server/api/trigger/index.js +++ b/server/api/trigger/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x13ae=['express','Router','../../components/interaction/service','./trigger.controller','get','isAuthenticated','index','/:id','show','getAllConditions','/:id/any_conditions','/:id/actions','getActions','post','create','addAllCondition','addAnyCondition','addAction','put','update','delete','destroy','exports'];(function(_0x1e7701,_0x13fd0f){var _0x3ab707=function(_0x3c5242){while(--_0x3c5242){_0x1e7701['push'](_0x1e7701['shift']());}};_0x3ab707(++_0x13fd0f);}(_0x13ae,0xe6));var _0xe13a=function(_0x126558,_0x143c9a){_0x126558=_0x126558-0x0;var _0x1f6d14=_0x13ae[_0x126558];return _0x1f6d14;};'use strict';var multer=require('multer');var util=require('util');var path=require('path');var timeout=require('connect-timeout');var express=require(_0xe13a('0x0'));var router=express[_0xe13a('0x1')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0xe13a('0x2'));var config=require('../../config/environment');var controller=require(_0xe13a('0x3'));router[_0xe13a('0x4')]('/',auth[_0xe13a('0x5')](),controller[_0xe13a('0x6')]);router[_0xe13a('0x4')](_0xe13a('0x7'),auth[_0xe13a('0x5')](),controller[_0xe13a('0x8')]);router['get']('/:id/all_conditions',auth[_0xe13a('0x5')](),controller[_0xe13a('0x9')]);router[_0xe13a('0x4')](_0xe13a('0xa'),auth[_0xe13a('0x5')](),controller['getAnyConditions']);router[_0xe13a('0x4')](_0xe13a('0xb'),auth[_0xe13a('0x5')](),controller[_0xe13a('0xc')]);router[_0xe13a('0xd')]('/',auth[_0xe13a('0x5')](),controller[_0xe13a('0xe')]);router[_0xe13a('0xd')]('/:id/all_conditions',auth[_0xe13a('0x5')](),controller[_0xe13a('0xf')]);router[_0xe13a('0xd')](_0xe13a('0xa'),auth[_0xe13a('0x5')](),controller[_0xe13a('0x10')]);router[_0xe13a('0xd')]('/:id/actions',auth['isAuthenticated'](),controller[_0xe13a('0x11')]);router[_0xe13a('0x12')](_0xe13a('0x7'),auth[_0xe13a('0x5')](),controller[_0xe13a('0x13')]);router[_0xe13a('0x14')](_0xe13a('0x7'),auth[_0xe13a('0x5')](),controller[_0xe13a('0x15')]);module[_0xe13a('0x16')]=router; \ No newline at end of file +var _0xc8ac=['/:id','isAuthenticated','/:id/all_conditions','/:id/any_conditions','getAnyConditions','getActions','post','create','addAllCondition','addAnyCondition','/:id/actions','addAction','put','update','delete','destroy','exports','multer','util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./trigger.controller','get'];(function(_0x39c8b5,_0x480be0){var _0x2ee9fb=function(_0x185eab){while(--_0x185eab){_0x39c8b5['push'](_0x39c8b5['shift']());}};_0x2ee9fb(++_0x480be0);}(_0xc8ac,0xe9));var _0xcc8a=function(_0x3e91a9,_0x53c466){_0x3e91a9=_0x3e91a9-0x0;var _0x25c9ad=_0xc8ac[_0x3e91a9];return _0x25c9ad;};'use strict';var multer=require(_0xcc8a('0x0'));var util=require(_0xcc8a('0x1'));var path=require(_0xcc8a('0x2'));var timeout=require(_0xcc8a('0x3'));var express=require('express');var router=express[_0xcc8a('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0xcc8a('0x5'));var interaction=require(_0xcc8a('0x6'));var config=require(_0xcc8a('0x7'));var controller=require(_0xcc8a('0x8'));router[_0xcc8a('0x9')]('/',auth['isAuthenticated'](),controller['index']);router[_0xcc8a('0x9')](_0xcc8a('0xa'),auth[_0xcc8a('0xb')](),controller['show']);router['get'](_0xcc8a('0xc'),auth[_0xcc8a('0xb')](),controller['getAllConditions']);router[_0xcc8a('0x9')](_0xcc8a('0xd'),auth['isAuthenticated'](),controller[_0xcc8a('0xe')]);router['get']('/:id/actions',auth[_0xcc8a('0xb')](),controller[_0xcc8a('0xf')]);router[_0xcc8a('0x10')]('/',auth[_0xcc8a('0xb')](),controller[_0xcc8a('0x11')]);router[_0xcc8a('0x10')](_0xcc8a('0xc'),auth[_0xcc8a('0xb')](),controller[_0xcc8a('0x12')]);router[_0xcc8a('0x10')](_0xcc8a('0xd'),auth['isAuthenticated'](),controller[_0xcc8a('0x13')]);router[_0xcc8a('0x10')](_0xcc8a('0x14'),auth[_0xcc8a('0xb')](),controller[_0xcc8a('0x15')]);router[_0xcc8a('0x16')]('/:id',auth[_0xcc8a('0xb')](),controller[_0xcc8a('0x17')]);router[_0xcc8a('0x18')](_0xcc8a('0xa'),auth[_0xcc8a('0xb')](),controller[_0xcc8a('0x19')]);module[_0xcc8a('0x1a')]=router; \ No newline at end of file diff --git a/server/api/trigger/trigger.attributes.js b/server/api/trigger/trigger.attributes.js index e4a906c..1e0f7c2 100644 --- a/server/api/trigger/trigger.attributes.js +++ b/server/api/trigger/trigger.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5c1a=['sequelize','exports','STRING','BOOLEAN'];(function(_0x31a371,_0x50828e){var _0x2a5bd6=function(_0x2fb481){while(--_0x2fb481){_0x31a371['push'](_0x31a371['shift']());}};_0x2a5bd6(++_0x50828e);}(_0x5c1a,0x16c));var _0xa5c1=function(_0x5e6ea3,_0x9addd2){_0x5e6ea3=_0x5e6ea3-0x0;var _0x4048b5=_0x5c1a[_0x5e6ea3];return _0x4048b5;};'use strict';var Sequelize=require(_0xa5c1('0x0'));module[_0xa5c1('0x1')]={'name':{'type':Sequelize[_0xa5c1('0x2')]},'channel':{'type':Sequelize[_0xa5c1('0x2')]},'description':{'type':Sequelize[_0xa5c1('0x2')]},'status':{'type':Sequelize[_0xa5c1('0x3')],'defaultValue':![]}}; \ No newline at end of file +var _0x342e=['BOOLEAN','sequelize','STRING'];(function(_0x23a216,_0x58097f){var _0x4d0c86=function(_0x5bcd43){while(--_0x5bcd43){_0x23a216['push'](_0x23a216['shift']());}};_0x4d0c86(++_0x58097f);}(_0x342e,0xa3));var _0xe342=function(_0x16aaef,_0x410651){_0x16aaef=_0x16aaef-0x0;var _0x1c82ef=_0x342e[_0x16aaef];return _0x1c82ef;};'use strict';var Sequelize=require(_0xe342('0x0'));module['exports']={'name':{'type':Sequelize['STRING']},'channel':{'type':Sequelize[_0xe342('0x1')]},'description':{'type':Sequelize[_0xe342('0x1')]},'status':{'type':Sequelize[_0xe342('0x2')],'defaultValue':![]}}; \ No newline at end of file diff --git a/server/api/trigger/trigger.controller.js b/server/api/trigger/trigger.controller.js index b8a0861..f48145b 100644 --- a/server/api/trigger/trigger.controller.js +++ b/server/api/trigger/trigger.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8511=['Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','TriggerAllId','Condition','TriggerAnyId','getAllConditions','findOne','nolimit','getAnyConditions','pick','addAction','TriggerId','Action','getActions','eml-format','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','undefined','limit','offset','count','set','Content-Range','apply','reject','save','update','then','destroy','get','Triggers','UserProfileResource','name','send','map','Trigger','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','params','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','user','UserProfileSection','find','userProfileId','autoAssociation','error'];(function(_0x46800d,_0x588500){var _0x3824cd=function(_0x14b132){while(--_0x14b132){_0x46800d['push'](_0x46800d['shift']());}};_0x3824cd(++_0x588500);}(_0x8511,0x1e8));var _0x1851=function(_0x3ea6bb,_0xb8ec41){_0x3ea6bb=_0x3ea6bb-0x0;var _0x4e2ad8=_0x8511[_0x3ea6bb];return _0x4e2ad8;};'use strict';var emlformat=require(_0x1851('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x1851('0x1'));var rp=require('request-promise');var moment=require(_0x1851('0x2'));var BPromise=require(_0x1851('0x3'));var Mustache=require(_0x1851('0x4'));var util=require(_0x1851('0x5'));var path=require(_0x1851('0x6'));var sox=require(_0x1851('0x7'));var csv=require(_0x1851('0x8'));var ejs=require(_0x1851('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x1851('0xa'));var squel=require(_0x1851('0xb'));var crypto=require(_0x1851('0xc'));var jsforce=require(_0x1851('0xd'));var deskjs=require(_0x1851('0xe'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x1851('0xf'));var Redis=require(_0x1851('0x10'));var authService=require(_0x1851('0x11'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x1851('0x12'))(_0x1851('0x13'));var utils=require(_0x1851('0x14'));var config=require(_0x1851('0x15'));var licenseUtil=require(_0x1851('0x16'));var db=require(_0x1851('0x17'))['db'];function respondWithStatusCode(_0x4dceca,_0x31acac){_0x31acac=_0x31acac||0xcc;return function(_0x49c64f){if(_0x49c64f){return _0x4dceca[_0x1851('0x18')](_0x31acac);}return _0x4dceca[_0x1851('0x19')](_0x31acac)[_0x1851('0x1a')]();};}function respondWithResult(_0x22c98,_0x4f8fae){_0x4f8fae=_0x4f8fae||0xc8;return function(_0x15896c){if(_0x15896c){return _0x22c98[_0x1851('0x19')](_0x4f8fae)[_0x1851('0x1b')](_0x15896c);}};}function respondWithFilteredResult(_0x2a47d7,_0x3cc2e7){return function(_0xe62cc3){if(_0xe62cc3){var _0x3ebab9=typeof _0x3cc2e7['offset']===_0x1851('0x1c')&&typeof _0x3cc2e7[_0x1851('0x1d')]===_0x1851('0x1c');var _0x51a5a7=_0xe62cc3['count'];var _0xe44874=_0x3ebab9?0x0:_0x3cc2e7[_0x1851('0x1e')];var _0x42f19b=_0x3ebab9?_0xe62cc3[_0x1851('0x1f')]:_0x3cc2e7[_0x1851('0x1e')]+_0x3cc2e7[_0x1851('0x1d')];var _0x5b1373;if(_0x42f19b>=_0x51a5a7){_0x42f19b=_0x51a5a7;_0x5b1373=0xc8;}else{_0x5b1373=0xce;}_0x2a47d7[_0x1851('0x19')](_0x5b1373);return _0x2a47d7[_0x1851('0x20')](_0x1851('0x21'),_0xe44874+'-'+_0x42f19b+'/'+_0x51a5a7)[_0x1851('0x1b')](_0xe62cc3);}return null;};}function patchUpdates(_0x3fb8db){return function(_0x4ca58c){try{jsonpatch[_0x1851('0x22')](_0x4ca58c,_0x3fb8db,!![]);}catch(_0x20b3c6){return BPromise[_0x1851('0x23')](_0x20b3c6);}return _0x4ca58c[_0x1851('0x24')]();};}function saveUpdates(_0x4b8c85,_0x44e386){return function(_0x57cd0d){if(_0x57cd0d){return _0x57cd0d[_0x1851('0x25')](_0x4b8c85)[_0x1851('0x26')](function(_0x5eea83){return _0x5eea83;});}return null;};}function removeEntity(_0x265afc,_0x258cef){return function(_0x44300f){if(_0x44300f){return _0x44300f[_0x1851('0x27')]()['then'](function(){var _0x3155a3=_0x44300f[_0x1851('0x28')]({'plain':!![]});var _0x45116c=_0x1851('0x29');return db[_0x1851('0x2a')][_0x1851('0x27')]({'where':{'type':_0x45116c,'resourceId':_0x3155a3['id']}})[_0x1851('0x26')](function(){return _0x44300f;});})[_0x1851('0x26')](function(){_0x265afc[_0x1851('0x19')](0xcc)[_0x1851('0x1a')]();});}};}function handleEntityNotFound(_0x375a24,_0x37510d){return function(_0x310d1f){if(!_0x310d1f){_0x375a24[_0x1851('0x18')](0x194);}return _0x310d1f;};}function handleError(_0x10a775,_0x869b0){_0x869b0=_0x869b0||0x1f4;return function(_0x35a6c5){logger['error'](_0x35a6c5['stack']);if(_0x35a6c5[_0x1851('0x2b')]){delete _0x35a6c5[_0x1851('0x2b')];}_0x10a775[_0x1851('0x19')](_0x869b0)[_0x1851('0x2c')](_0x35a6c5);};}exports['index']=function(_0x42233b,_0x5cf2fc){var _0x17c10b={},_0x37ae45={},_0x5561f0={'count':0x0,'rows':[]};var _0xd03057=_[_0x1851('0x2d')](db[_0x1851('0x2e')][_0x1851('0x2f')],function(_0x58c9a7){return{'name':_0x58c9a7[_0x1851('0x30')],'type':_0x58c9a7[_0x1851('0x31')][_0x1851('0x32')]};});_0x37ae45[_0x1851('0x33')]=_[_0x1851('0x2d')](_0xd03057,_0x1851('0x2b'));_0x37ae45[_0x1851('0x34')]=_[_0x1851('0x35')](_0x42233b['query']);_0x37ae45[_0x1851('0x36')]=_[_0x1851('0x37')](_0x37ae45[_0x1851('0x33')],_0x37ae45['query']);_0x17c10b[_0x1851('0x38')]=_['intersection'](_0x37ae45[_0x1851('0x33')],qs[_0x1851('0x39')](_0x42233b[_0x1851('0x34')][_0x1851('0x39')]));_0x17c10b[_0x1851('0x38')]=_0x17c10b[_0x1851('0x38')][_0x1851('0x3a')]?_0x17c10b[_0x1851('0x38')]:_0x37ae45[_0x1851('0x33')];if(!_0x42233b['query'][_0x1851('0x3b')]('nolimit')){_0x17c10b[_0x1851('0x1d')]=qs[_0x1851('0x1d')](_0x42233b[_0x1851('0x34')][_0x1851('0x1d')]);_0x17c10b[_0x1851('0x1e')]=qs[_0x1851('0x1e')](_0x42233b[_0x1851('0x34')][_0x1851('0x1e')]);}_0x17c10b[_0x1851('0x3c')]=qs[_0x1851('0x3d')](_0x42233b[_0x1851('0x34')][_0x1851('0x3d')]);_0x17c10b[_0x1851('0x3e')]=qs[_0x1851('0x36')](_['pick'](_0x42233b[_0x1851('0x34')],_0x37ae45[_0x1851('0x36')]),_0xd03057);if(_0x42233b[_0x1851('0x34')][_0x1851('0x3f')]){_0x17c10b[_0x1851('0x3e')]=_[_0x1851('0x40')](_0x17c10b[_0x1851('0x3e')],{'$or':_[_0x1851('0x2d')](_0xd03057,function(_0x14e573){if(_0x14e573['type']!==_0x1851('0x41')){var _0x356233={};_0x356233[_0x14e573[_0x1851('0x2b')]]={'$like':'%'+_0x42233b[_0x1851('0x34')][_0x1851('0x3f')]+'%'};return _0x356233;}})});}_0x17c10b=_['merge']({},_0x17c10b,_0x42233b[_0x1851('0x42')]);var _0x4111f9={'where':_0x17c10b[_0x1851('0x3e')]};return db[_0x1851('0x2e')][_0x1851('0x1f')](_0x4111f9)['then'](function(_0xe1a953){_0x5561f0[_0x1851('0x1f')]=_0xe1a953;if(_0x42233b[_0x1851('0x34')][_0x1851('0x43')]){_0x17c10b[_0x1851('0x44')]=[{'all':!![]}];}return db[_0x1851('0x2e')][_0x1851('0x45')](_0x17c10b);})['then'](function(_0x212cec){_0x5561f0[_0x1851('0x46')]=_0x212cec;return _0x5561f0;})[_0x1851('0x26')](respondWithFilteredResult(_0x5cf2fc,_0x17c10b))[_0x1851('0x47')](handleError(_0x5cf2fc,null));};exports['show']=function(_0x4485b4,_0x625f6){var _0x20bf39={'raw':![],'where':{'id':_0x4485b4[_0x1851('0x48')]['id']}},_0x93d5df={};_0x93d5df[_0x1851('0x33')]=_[_0x1851('0x35')](db['Trigger']['rawAttributes']);_0x93d5df[_0x1851('0x34')]=_[_0x1851('0x35')](_0x4485b4[_0x1851('0x34')]);_0x93d5df[_0x1851('0x36')]=_[_0x1851('0x37')](_0x93d5df[_0x1851('0x33')],_0x93d5df[_0x1851('0x34')]);_0x20bf39['attributes']=_[_0x1851('0x37')](_0x93d5df[_0x1851('0x33')],qs[_0x1851('0x39')](_0x4485b4['query'][_0x1851('0x39')]));_0x20bf39[_0x1851('0x38')]=_0x20bf39[_0x1851('0x38')][_0x1851('0x3a')]?_0x20bf39['attributes']:_0x93d5df['model'];if(_0x4485b4['query']['includeAll']){_0x20bf39[_0x1851('0x44')]=[{'all':!![]}];}_0x20bf39=_[_0x1851('0x40')]({},_0x20bf39,_0x4485b4[_0x1851('0x42')]);return db[_0x1851('0x2e')]['find'](_0x20bf39)[_0x1851('0x26')](handleEntityNotFound(_0x625f6,null))['then'](respondWithResult(_0x625f6,null))[_0x1851('0x47')](handleError(_0x625f6,null));};exports['create']=function(_0x47ee1e,_0x269241){return db[_0x1851('0x2e')][_0x1851('0x49')](_0x47ee1e[_0x1851('0x4a')],{})[_0x1851('0x26')](function(_0x1f46b7){var _0x31ee22=_0x47ee1e['user']['get']({'plain':!![]});if(!_0x31ee22)throw new Error(_0x1851('0x4b'));if(_0x31ee22['role']===_0x1851('0x4c')){var _0x654d04=_0x1f46b7[_0x1851('0x28')]({'plain':!![]});var _0x3660f4='Triggers';return db[_0x1851('0x4d')][_0x1851('0x4e')]({'where':{'name':_0x3660f4,'userProfileId':_0x31ee22[_0x1851('0x4f')]},'raw':!![]})[_0x1851('0x26')](function(_0x20a970){if(_0x20a970&&_0x20a970[_0x1851('0x50')]===0x0){return db[_0x1851('0x2a')]['create']({'name':_0x654d04[_0x1851('0x2b')],'resourceId':_0x654d04['id'],'type':_0x20a970[_0x1851('0x2b')],'sectionId':_0x20a970['id']},{})[_0x1851('0x26')](function(){return _0x1f46b7;});}else{return _0x1f46b7;}})[_0x1851('0x47')](function(_0xa3fd2d){logger[_0x1851('0x51')](_0x1851('0x52'),_0xa3fd2d);throw _0xa3fd2d;});}return _0x1f46b7;})[_0x1851('0x26')](respondWithResult(_0x269241,0xc9))[_0x1851('0x47')](handleError(_0x269241,null));};exports['update']=function(_0x322c56,_0x80f482){if(_0x322c56['body']['id']){delete _0x322c56[_0x1851('0x4a')]['id'];}return db['Trigger'][_0x1851('0x4e')]({'where':{'id':_0x322c56[_0x1851('0x48')]['id']}})[_0x1851('0x26')](handleEntityNotFound(_0x80f482,null))[_0x1851('0x26')](saveUpdates(_0x322c56[_0x1851('0x4a')],null))[_0x1851('0x26')](respondWithResult(_0x80f482,null))['catch'](handleError(_0x80f482,null));};exports['destroy']=function(_0x3420ee,_0x289545){return db['Trigger']['find']({'where':{'id':_0x3420ee[_0x1851('0x48')]['id']}})[_0x1851('0x26')](handleEntityNotFound(_0x289545,null))[_0x1851('0x26')](removeEntity(_0x289545,null))[_0x1851('0x47')](handleError(_0x289545,null));};exports['addAllCondition']=function(_0x1bd52c,_0x2c661f,_0x3bc0a1){if(_0x1bd52c[_0x1851('0x4a')]['id']){delete _0x1bd52c['body']['id'];}return db[_0x1851('0x2e')][_0x1851('0x4e')]({'where':{'id':_0x1bd52c['params']['id']}})[_0x1851('0x26')](handleEntityNotFound(_0x2c661f,null))[_0x1851('0x26')](function(_0x5d9238){if(_0x5d9238){_0x1bd52c['body'][_0x1851('0x53')]=_0x5d9238['id'];return db[_0x1851('0x54')]['create'](_0x1bd52c[_0x1851('0x4a')]);}})[_0x1851('0x26')](respondWithResult(_0x2c661f,null))[_0x1851('0x47')](handleError(_0x2c661f,null));};exports['addAnyCondition']=function(_0x4fa348,_0x1f713f,_0x28df32){if(_0x4fa348[_0x1851('0x4a')]['id']){delete _0x4fa348[_0x1851('0x4a')]['id'];}return db[_0x1851('0x2e')][_0x1851('0x4e')]({'where':{'id':_0x4fa348[_0x1851('0x48')]['id']}})[_0x1851('0x26')](handleEntityNotFound(_0x1f713f,null))[_0x1851('0x26')](function(_0x5279bf){if(_0x5279bf){_0x4fa348[_0x1851('0x4a')][_0x1851('0x55')]=_0x5279bf['id'];return db[_0x1851('0x54')]['create'](_0x4fa348['body']);}})[_0x1851('0x26')](respondWithResult(_0x1f713f,null))[_0x1851('0x47')](handleError(_0x1f713f,null));};exports[_0x1851('0x56')]=function(_0xc3fb37,_0x378f59,_0x5cd63b){var _0x532b8d={};var _0x4f75b5={};var _0x5526e2;var _0x7a6d4f;return db['Trigger'][_0x1851('0x57')]({'where':{'id':_0xc3fb37[_0x1851('0x48')]['id']}})['then'](handleEntityNotFound(_0x378f59,null))[_0x1851('0x26')](function(_0x109602){if(_0x109602){_0x5526e2=_0x109602;_0x4f75b5['model']=_[_0x1851('0x35')](db[_0x1851('0x54')][_0x1851('0x2f')]);_0x4f75b5[_0x1851('0x34')]=_['keys'](_0xc3fb37[_0x1851('0x34')]);_0x4f75b5[_0x1851('0x36')]=_[_0x1851('0x37')](_0x4f75b5['model'],_0x4f75b5['query']);_0x532b8d['attributes']=_[_0x1851('0x37')](_0x4f75b5['model'],qs[_0x1851('0x39')](_0xc3fb37[_0x1851('0x34')][_0x1851('0x39')]));_0x532b8d[_0x1851('0x38')]=_0x532b8d[_0x1851('0x38')]['length']?_0x532b8d[_0x1851('0x38')]:_0x4f75b5['model'];_0x532b8d[_0x1851('0x3c')]=qs[_0x1851('0x3d')](_0xc3fb37[_0x1851('0x34')]['sort']);_0x532b8d['where']=qs[_0x1851('0x36')](_['pick'](_0xc3fb37[_0x1851('0x34')],_0x4f75b5[_0x1851('0x36')]));if(_0xc3fb37[_0x1851('0x34')]['filter']){_0x532b8d[_0x1851('0x3e')]=_['merge'](_0x532b8d[_0x1851('0x3e')],{'$or':_['map'](_0x532b8d[_0x1851('0x38')],function(_0x371738){var _0x55d18d={};_0x55d18d[_0x371738]={'$like':'%'+_0xc3fb37[_0x1851('0x34')][_0x1851('0x3f')]+'%'};return _0x55d18d;})});}_0x532b8d=_[_0x1851('0x40')]({},_0x532b8d,_0xc3fb37[_0x1851('0x42')]);return _0x5526e2[_0x1851('0x56')](_0x532b8d);}})[_0x1851('0x26')](function(_0x516b42){if(_0x516b42){_0x7a6d4f=_0x516b42[_0x1851('0x3a')];if(!_0xc3fb37[_0x1851('0x34')][_0x1851('0x3b')](_0x1851('0x58'))){_0x532b8d[_0x1851('0x1d')]=qs['limit'](_0xc3fb37[_0x1851('0x34')][_0x1851('0x1d')]);_0x532b8d[_0x1851('0x1e')]=qs[_0x1851('0x1e')](_0xc3fb37[_0x1851('0x34')][_0x1851('0x1e')]);}return _0x5526e2['getAllConditions'](_0x532b8d);}})[_0x1851('0x26')](function(_0x3a6888){if(_0x3a6888){return _0x3a6888?{'count':_0x7a6d4f,'rows':_0x3a6888}:null;}})[_0x1851('0x26')](respondWithResult(_0x378f59,null))[_0x1851('0x47')](handleError(_0x378f59,null));};exports[_0x1851('0x59')]=function(_0x2ddb70,_0x21e627,_0xe6e990){var _0xa9c14b={};var _0x7d4e93={};var _0x2c4d08;var _0x1d52b9;return db['Trigger'][_0x1851('0x57')]({'where':{'id':_0x2ddb70[_0x1851('0x48')]['id']}})[_0x1851('0x26')](handleEntityNotFound(_0x21e627,null))[_0x1851('0x26')](function(_0x15f403){if(_0x15f403){_0x2c4d08=_0x15f403;_0x7d4e93[_0x1851('0x33')]=_[_0x1851('0x35')](db[_0x1851('0x54')]['rawAttributes']);_0x7d4e93[_0x1851('0x34')]=_[_0x1851('0x35')](_0x2ddb70[_0x1851('0x34')]);_0x7d4e93[_0x1851('0x36')]=_['intersection'](_0x7d4e93['model'],_0x7d4e93[_0x1851('0x34')]);_0xa9c14b[_0x1851('0x38')]=_['intersection'](_0x7d4e93['model'],qs[_0x1851('0x39')](_0x2ddb70[_0x1851('0x34')][_0x1851('0x39')]));_0xa9c14b[_0x1851('0x38')]=_0xa9c14b['attributes'][_0x1851('0x3a')]?_0xa9c14b[_0x1851('0x38')]:_0x7d4e93[_0x1851('0x33')];_0xa9c14b[_0x1851('0x3c')]=qs[_0x1851('0x3d')](_0x2ddb70[_0x1851('0x34')][_0x1851('0x3d')]);_0xa9c14b[_0x1851('0x3e')]=qs[_0x1851('0x36')](_[_0x1851('0x5a')](_0x2ddb70['query'],_0x7d4e93[_0x1851('0x36')]));if(_0x2ddb70[_0x1851('0x34')]['filter']){_0xa9c14b[_0x1851('0x3e')]=_[_0x1851('0x40')](_0xa9c14b[_0x1851('0x3e')],{'$or':_['map'](_0xa9c14b[_0x1851('0x38')],function(_0x9d244d){var _0x571dfd={};_0x571dfd[_0x9d244d]={'$like':'%'+_0x2ddb70['query'][_0x1851('0x3f')]+'%'};return _0x571dfd;})});}_0xa9c14b=_[_0x1851('0x40')]({},_0xa9c14b,_0x2ddb70[_0x1851('0x42')]);return _0x2c4d08['getAnyConditions'](_0xa9c14b);}})['then'](function(_0x1fc709){if(_0x1fc709){_0x1d52b9=_0x1fc709[_0x1851('0x3a')];if(!_0x2ddb70[_0x1851('0x34')][_0x1851('0x3b')]('nolimit')){_0xa9c14b['limit']=qs[_0x1851('0x1d')](_0x2ddb70[_0x1851('0x34')][_0x1851('0x1d')]);_0xa9c14b['offset']=qs['offset'](_0x2ddb70[_0x1851('0x34')][_0x1851('0x1e')]);}return _0x2c4d08[_0x1851('0x59')](_0xa9c14b);}})[_0x1851('0x26')](function(_0x211034){if(_0x211034){return _0x211034?{'count':_0x1d52b9,'rows':_0x211034}:null;}})[_0x1851('0x26')](respondWithResult(_0x21e627,null))[_0x1851('0x47')](handleError(_0x21e627,null));};exports[_0x1851('0x5b')]=function(_0x55b291,_0x1c5ac1,_0x4e927d){if(_0x55b291[_0x1851('0x4a')]['id']){delete _0x55b291[_0x1851('0x4a')]['id'];}return db['Trigger']['find']({'where':{'id':_0x55b291[_0x1851('0x48')]['id']}})[_0x1851('0x26')](handleEntityNotFound(_0x1c5ac1,null))['then'](function(_0x4905c3){if(_0x4905c3){_0x55b291[_0x1851('0x4a')][_0x1851('0x5c')]=_0x4905c3['id'];return db[_0x1851('0x5d')][_0x1851('0x49')](_0x55b291['body']);}})[_0x1851('0x26')](respondWithResult(_0x1c5ac1,null))[_0x1851('0x47')](handleError(_0x1c5ac1,null));};exports[_0x1851('0x5e')]=function(_0x68838a,_0x42ac10,_0x57b67c){var _0x18780c={};var _0x373ccf={};var _0x2df010;var _0x5cb5f4;return db[_0x1851('0x2e')][_0x1851('0x57')]({'where':{'id':_0x68838a[_0x1851('0x48')]['id']}})[_0x1851('0x26')](handleEntityNotFound(_0x42ac10,null))['then'](function(_0x1811c2){if(_0x1811c2){_0x2df010=_0x1811c2;_0x373ccf[_0x1851('0x33')]=_[_0x1851('0x35')](db['Action']['rawAttributes']);_0x373ccf['query']=_['keys'](_0x68838a[_0x1851('0x34')]);_0x373ccf[_0x1851('0x36')]=_[_0x1851('0x37')](_0x373ccf[_0x1851('0x33')],_0x373ccf[_0x1851('0x34')]);_0x18780c[_0x1851('0x38')]=_[_0x1851('0x37')](_0x373ccf[_0x1851('0x33')],qs[_0x1851('0x39')](_0x68838a['query'][_0x1851('0x39')]));_0x18780c[_0x1851('0x38')]=_0x18780c[_0x1851('0x38')][_0x1851('0x3a')]?_0x18780c[_0x1851('0x38')]:_0x373ccf['model'];_0x18780c[_0x1851('0x3c')]=qs[_0x1851('0x3d')](_0x68838a['query'][_0x1851('0x3d')]);_0x18780c[_0x1851('0x3e')]=qs[_0x1851('0x36')](_['pick'](_0x68838a[_0x1851('0x34')],_0x373ccf['filters']));if(_0x68838a[_0x1851('0x34')][_0x1851('0x3f')]){_0x18780c[_0x1851('0x3e')]=_[_0x1851('0x40')](_0x18780c[_0x1851('0x3e')],{'$or':_[_0x1851('0x2d')](_0x18780c[_0x1851('0x38')],function(_0x57b77f){var _0x451082={};_0x451082[_0x57b77f]={'$like':'%'+_0x68838a['query'][_0x1851('0x3f')]+'%'};return _0x451082;})});}_0x18780c=_[_0x1851('0x40')]({},_0x18780c,_0x68838a[_0x1851('0x42')]);return _0x2df010['getActions'](_0x18780c);}})[_0x1851('0x26')](function(_0x344e7e){if(_0x344e7e){_0x5cb5f4=_0x344e7e[_0x1851('0x3a')];if(!_0x68838a[_0x1851('0x34')][_0x1851('0x3b')](_0x1851('0x58'))){_0x18780c[_0x1851('0x1d')]=qs[_0x1851('0x1d')](_0x68838a[_0x1851('0x34')][_0x1851('0x1d')]);_0x18780c[_0x1851('0x1e')]=qs['offset'](_0x68838a[_0x1851('0x34')][_0x1851('0x1e')]);}return _0x2df010[_0x1851('0x5e')](_0x18780c);}})['then'](function(_0x1af83e){if(_0x1af83e){return _0x1af83e?{'count':_0x5cb5f4,'rows':_0x1af83e}:null;}})[_0x1851('0x26')](respondWithResult(_0x42ac10,null))['catch'](handleError(_0x42ac10,null));}; \ No newline at end of file +var _0xd72e=['get','Triggers','UserProfileResource','error','stack','name','send','index','map','Trigger','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','pick','filter','merge','includeAll','include','findAll','rows','catch','show','params','rawAttributes','options','find','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','addAllCondition','TriggerAllId','addAnyCondition','TriggerAnyId','Condition','getAllConditions','findOne','nolimit','getAnyConditions','addAction','TriggerId','Action','getActions','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','ejs','squel','crypto','jsforce','desk.js','querystring','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','end','status','json','offset','undefined','limit','count','Content-Range','apply','reject','save','update','destroy','then'];(function(_0x56fde1,_0xd42018){var _0x58fc80=function(_0x38dd09){while(--_0x38dd09){_0x56fde1['push'](_0x56fde1['shift']());}};_0x58fc80(++_0xd42018);}(_0xd72e,0x1c3));var _0xed72=function(_0x5b47d9,_0x1327ce){_0x5b47d9=_0x5b47d9-0x0;var _0x4151f0=_0xd72e[_0x5b47d9];return _0x4151f0;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xed72('0x0'));var zipdir=require(_0xed72('0x1'));var jsonpatch=require(_0xed72('0x2'));var rp=require(_0xed72('0x3'));var moment=require(_0xed72('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xed72('0x5'));var util=require(_0xed72('0x6'));var path=require(_0xed72('0x7'));var sox=require(_0xed72('0x8'));var csv=require(_0xed72('0x9'));var ejs=require(_0xed72('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0xed72('0xb'));var crypto=require(_0xed72('0xc'));var jsforce=require(_0xed72('0xd'));var deskjs=require(_0xed72('0xe'));var toCsv=require(_0xed72('0x9'));var querystring=require(_0xed72('0xf'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0xed72('0x10'));var qs=require('../../components/parsers/qs');var as=require(_0xed72('0x11'));var hardwareService=require(_0xed72('0x12'));var logger=require(_0xed72('0x13'))(_0xed72('0x14'));var utils=require(_0xed72('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0xed72('0x16'));var db=require(_0xed72('0x17'))['db'];function respondWithStatusCode(_0x16f12a,_0x839640){_0x839640=_0x839640||0xcc;return function(_0x1ec9a5){if(_0x1ec9a5){return _0x16f12a[_0xed72('0x18')](_0x839640);}return _0x16f12a['status'](_0x839640)[_0xed72('0x19')]();};}function respondWithResult(_0x3ad7f3,_0x2deff5){_0x2deff5=_0x2deff5||0xc8;return function(_0x258858){if(_0x258858){return _0x3ad7f3[_0xed72('0x1a')](_0x2deff5)[_0xed72('0x1b')](_0x258858);}};}function respondWithFilteredResult(_0x204ac7,_0x4ca351){return function(_0x13ef49){if(_0x13ef49){var _0x429111=typeof _0x4ca351[_0xed72('0x1c')]===_0xed72('0x1d')&&typeof _0x4ca351[_0xed72('0x1e')]===_0xed72('0x1d');var _0x58fedc=_0x13ef49['count'];var _0x201c4b=_0x429111?0x0:_0x4ca351[_0xed72('0x1c')];var _0x13b004=_0x429111?_0x13ef49[_0xed72('0x1f')]:_0x4ca351[_0xed72('0x1c')]+_0x4ca351['limit'];var _0x59393a;if(_0x13b004>=_0x58fedc){_0x13b004=_0x58fedc;_0x59393a=0xc8;}else{_0x59393a=0xce;}_0x204ac7[_0xed72('0x1a')](_0x59393a);return _0x204ac7['set'](_0xed72('0x20'),_0x201c4b+'-'+_0x13b004+'/'+_0x58fedc)[_0xed72('0x1b')](_0x13ef49);}return null;};}function patchUpdates(_0x387add){return function(_0x4b89e2){try{jsonpatch[_0xed72('0x21')](_0x4b89e2,_0x387add,!![]);}catch(_0x53a654){return BPromise[_0xed72('0x22')](_0x53a654);}return _0x4b89e2[_0xed72('0x23')]();};}function saveUpdates(_0xc64528,_0xc36a5c){return function(_0x15aa75){if(_0x15aa75){return _0x15aa75[_0xed72('0x24')](_0xc64528)['then'](function(_0x35d4e6){return _0x35d4e6;});}return null;};}function removeEntity(_0x549f3a,_0xf27bd2){return function(_0x27e298){if(_0x27e298){return _0x27e298[_0xed72('0x25')]()[_0xed72('0x26')](function(){var _0x4f22f3=_0x27e298[_0xed72('0x27')]({'plain':!![]});var _0x50ef39=_0xed72('0x28');return db[_0xed72('0x29')]['destroy']({'where':{'type':_0x50ef39,'resourceId':_0x4f22f3['id']}})[_0xed72('0x26')](function(){return _0x27e298;});})[_0xed72('0x26')](function(){_0x549f3a[_0xed72('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x1d1d69,_0x10e7a5){return function(_0xc98ce3){if(!_0xc98ce3){_0x1d1d69[_0xed72('0x18')](0x194);}return _0xc98ce3;};}function handleError(_0x33f9cb,_0x56115a){_0x56115a=_0x56115a||0x1f4;return function(_0xf8a337){logger[_0xed72('0x2a')](_0xf8a337[_0xed72('0x2b')]);if(_0xf8a337['name']){delete _0xf8a337[_0xed72('0x2c')];}_0x33f9cb['status'](_0x56115a)[_0xed72('0x2d')](_0xf8a337);};}exports[_0xed72('0x2e')]=function(_0x3dd20f,_0x3596f5){var _0x2c542f={},_0x4f4689={},_0xc39bc5={'count':0x0,'rows':[]};var _0x1cbf19=_[_0xed72('0x2f')](db[_0xed72('0x30')]['rawAttributes'],function(_0x513b2d){return{'name':_0x513b2d[_0xed72('0x31')],'type':_0x513b2d[_0xed72('0x32')][_0xed72('0x33')]};});_0x4f4689[_0xed72('0x34')]=_[_0xed72('0x2f')](_0x1cbf19,_0xed72('0x2c'));_0x4f4689[_0xed72('0x35')]=_[_0xed72('0x36')](_0x3dd20f[_0xed72('0x35')]);_0x4f4689[_0xed72('0x37')]=_[_0xed72('0x38')](_0x4f4689['model'],_0x4f4689[_0xed72('0x35')]);_0x2c542f[_0xed72('0x39')]=_[_0xed72('0x38')](_0x4f4689[_0xed72('0x34')],qs[_0xed72('0x3a')](_0x3dd20f[_0xed72('0x35')][_0xed72('0x3a')]));_0x2c542f[_0xed72('0x39')]=_0x2c542f[_0xed72('0x39')][_0xed72('0x3b')]?_0x2c542f[_0xed72('0x39')]:_0x4f4689[_0xed72('0x34')];if(!_0x3dd20f['query'][_0xed72('0x3c')]('nolimit')){_0x2c542f['limit']=qs[_0xed72('0x1e')](_0x3dd20f[_0xed72('0x35')][_0xed72('0x1e')]);_0x2c542f[_0xed72('0x1c')]=qs[_0xed72('0x1c')](_0x3dd20f[_0xed72('0x35')][_0xed72('0x1c')]);}_0x2c542f[_0xed72('0x3d')]=qs['sort'](_0x3dd20f['query'][_0xed72('0x3e')]);_0x2c542f[_0xed72('0x3f')]=qs[_0xed72('0x37')](_[_0xed72('0x40')](_0x3dd20f[_0xed72('0x35')],_0x4f4689[_0xed72('0x37')]),_0x1cbf19);if(_0x3dd20f[_0xed72('0x35')][_0xed72('0x41')]){_0x2c542f['where']=_[_0xed72('0x42')](_0x2c542f[_0xed72('0x3f')],{'$or':_[_0xed72('0x2f')](_0x1cbf19,function(_0x3efe50){if(_0x3efe50[_0xed72('0x32')]!=='VIRTUAL'){var _0x626544={};_0x626544[_0x3efe50[_0xed72('0x2c')]]={'$like':'%'+_0x3dd20f['query'][_0xed72('0x41')]+'%'};return _0x626544;}})});}_0x2c542f=_['merge']({},_0x2c542f,_0x3dd20f['options']);var _0x57d663={'where':_0x2c542f['where']};return db[_0xed72('0x30')][_0xed72('0x1f')](_0x57d663)[_0xed72('0x26')](function(_0x15fe2e){_0xc39bc5[_0xed72('0x1f')]=_0x15fe2e;if(_0x3dd20f[_0xed72('0x35')][_0xed72('0x43')]){_0x2c542f[_0xed72('0x44')]=[{'all':!![]}];}return db[_0xed72('0x30')][_0xed72('0x45')](_0x2c542f);})[_0xed72('0x26')](function(_0x21db71){_0xc39bc5[_0xed72('0x46')]=_0x21db71;return _0xc39bc5;})[_0xed72('0x26')](respondWithFilteredResult(_0x3596f5,_0x2c542f))[_0xed72('0x47')](handleError(_0x3596f5,null));};exports[_0xed72('0x48')]=function(_0x2cab81,_0x3c1bf8){var _0x38b1ae={'raw':![],'where':{'id':_0x2cab81[_0xed72('0x49')]['id']}},_0x1a159f={};_0x1a159f['model']=_[_0xed72('0x36')](db[_0xed72('0x30')][_0xed72('0x4a')]);_0x1a159f[_0xed72('0x35')]=_[_0xed72('0x36')](_0x2cab81[_0xed72('0x35')]);_0x1a159f[_0xed72('0x37')]=_[_0xed72('0x38')](_0x1a159f[_0xed72('0x34')],_0x1a159f['query']);_0x38b1ae[_0xed72('0x39')]=_[_0xed72('0x38')](_0x1a159f[_0xed72('0x34')],qs[_0xed72('0x3a')](_0x2cab81[_0xed72('0x35')]['fields']));_0x38b1ae[_0xed72('0x39')]=_0x38b1ae['attributes'][_0xed72('0x3b')]?_0x38b1ae[_0xed72('0x39')]:_0x1a159f[_0xed72('0x34')];if(_0x2cab81[_0xed72('0x35')][_0xed72('0x43')]){_0x38b1ae[_0xed72('0x44')]=[{'all':!![]}];}_0x38b1ae=_[_0xed72('0x42')]({},_0x38b1ae,_0x2cab81[_0xed72('0x4b')]);return db[_0xed72('0x30')][_0xed72('0x4c')](_0x38b1ae)[_0xed72('0x26')](handleEntityNotFound(_0x3c1bf8,null))[_0xed72('0x26')](respondWithResult(_0x3c1bf8,null))[_0xed72('0x47')](handleError(_0x3c1bf8,null));};exports['create']=function(_0x25346e,_0xfecf7f){return db[_0xed72('0x30')][_0xed72('0x4d')](_0x25346e['body'],{})['then'](function(_0x1f7056){var _0x19a00a=_0x25346e[_0xed72('0x4e')]['get']({'plain':!![]});if(!_0x19a00a)throw new Error(_0xed72('0x4f'));if(_0x19a00a[_0xed72('0x50')]===_0xed72('0x4e')){var _0x5c61db=_0x1f7056['get']({'plain':!![]});var _0x832647=_0xed72('0x28');return db[_0xed72('0x51')][_0xed72('0x4c')]({'where':{'name':_0x832647,'userProfileId':_0x19a00a[_0xed72('0x52')]},'raw':!![]})['then'](function(_0x2f6741){if(_0x2f6741&&_0x2f6741['autoAssociation']===0x0){return db[_0xed72('0x29')]['create']({'name':_0x5c61db['name'],'resourceId':_0x5c61db['id'],'type':_0x2f6741[_0xed72('0x2c')],'sectionId':_0x2f6741['id']},{})['then'](function(){return _0x1f7056;});}else{return _0x1f7056;}})['catch'](function(_0x336b70){logger[_0xed72('0x2a')](_0xed72('0x53'),_0x336b70);throw _0x336b70;});}return _0x1f7056;})[_0xed72('0x26')](respondWithResult(_0xfecf7f,0xc9))[_0xed72('0x47')](handleError(_0xfecf7f,null));};exports[_0xed72('0x24')]=function(_0x599beb,_0x4f79d7){if(_0x599beb[_0xed72('0x54')]['id']){delete _0x599beb[_0xed72('0x54')]['id'];}return db[_0xed72('0x30')][_0xed72('0x4c')]({'where':{'id':_0x599beb[_0xed72('0x49')]['id']}})['then'](handleEntityNotFound(_0x4f79d7,null))[_0xed72('0x26')](saveUpdates(_0x599beb[_0xed72('0x54')],null))[_0xed72('0x26')](respondWithResult(_0x4f79d7,null))[_0xed72('0x47')](handleError(_0x4f79d7,null));};exports['destroy']=function(_0x575d7b,_0x458aa5){return db[_0xed72('0x30')][_0xed72('0x4c')]({'where':{'id':_0x575d7b[_0xed72('0x49')]['id']}})[_0xed72('0x26')](handleEntityNotFound(_0x458aa5,null))[_0xed72('0x26')](removeEntity(_0x458aa5,null))[_0xed72('0x47')](handleError(_0x458aa5,null));};exports[_0xed72('0x55')]=function(_0x4acecc,_0x1a7207,_0x1686b7){if(_0x4acecc['body']['id']){delete _0x4acecc[_0xed72('0x54')]['id'];}return db['Trigger'][_0xed72('0x4c')]({'where':{'id':_0x4acecc['params']['id']}})[_0xed72('0x26')](handleEntityNotFound(_0x1a7207,null))[_0xed72('0x26')](function(_0x2a1c69){if(_0x2a1c69){_0x4acecc[_0xed72('0x54')][_0xed72('0x56')]=_0x2a1c69['id'];return db['Condition'][_0xed72('0x4d')](_0x4acecc[_0xed72('0x54')]);}})[_0xed72('0x26')](respondWithResult(_0x1a7207,null))[_0xed72('0x47')](handleError(_0x1a7207,null));};exports[_0xed72('0x57')]=function(_0x1a95c9,_0x5050aa,_0x1a0ced){if(_0x1a95c9['body']['id']){delete _0x1a95c9[_0xed72('0x54')]['id'];}return db[_0xed72('0x30')][_0xed72('0x4c')]({'where':{'id':_0x1a95c9['params']['id']}})[_0xed72('0x26')](handleEntityNotFound(_0x5050aa,null))[_0xed72('0x26')](function(_0x29e6d9){if(_0x29e6d9){_0x1a95c9[_0xed72('0x54')][_0xed72('0x58')]=_0x29e6d9['id'];return db[_0xed72('0x59')][_0xed72('0x4d')](_0x1a95c9[_0xed72('0x54')]);}})[_0xed72('0x26')](respondWithResult(_0x5050aa,null))[_0xed72('0x47')](handleError(_0x5050aa,null));};exports[_0xed72('0x5a')]=function(_0x334115,_0x20b2c3,_0x5b5bf7){var _0x187304={};var _0x327756={};var _0xe3f454;var _0x552366;return db['Trigger'][_0xed72('0x5b')]({'where':{'id':_0x334115[_0xed72('0x49')]['id']}})['then'](handleEntityNotFound(_0x20b2c3,null))[_0xed72('0x26')](function(_0x265c7f){if(_0x265c7f){_0xe3f454=_0x265c7f;_0x327756[_0xed72('0x34')]=_['keys'](db[_0xed72('0x59')]['rawAttributes']);_0x327756[_0xed72('0x35')]=_[_0xed72('0x36')](_0x334115[_0xed72('0x35')]);_0x327756['filters']=_[_0xed72('0x38')](_0x327756[_0xed72('0x34')],_0x327756['query']);_0x187304[_0xed72('0x39')]=_[_0xed72('0x38')](_0x327756[_0xed72('0x34')],qs[_0xed72('0x3a')](_0x334115[_0xed72('0x35')][_0xed72('0x3a')]));_0x187304[_0xed72('0x39')]=_0x187304[_0xed72('0x39')][_0xed72('0x3b')]?_0x187304[_0xed72('0x39')]:_0x327756[_0xed72('0x34')];_0x187304[_0xed72('0x3d')]=qs[_0xed72('0x3e')](_0x334115[_0xed72('0x35')]['sort']);_0x187304[_0xed72('0x3f')]=qs[_0xed72('0x37')](_[_0xed72('0x40')](_0x334115[_0xed72('0x35')],_0x327756[_0xed72('0x37')]));if(_0x334115['query'][_0xed72('0x41')]){_0x187304['where']=_[_0xed72('0x42')](_0x187304['where'],{'$or':_[_0xed72('0x2f')](_0x187304['attributes'],function(_0x4ea910){var _0xa39c2a={};_0xa39c2a[_0x4ea910]={'$like':'%'+_0x334115[_0xed72('0x35')]['filter']+'%'};return _0xa39c2a;})});}_0x187304=_[_0xed72('0x42')]({},_0x187304,_0x334115[_0xed72('0x4b')]);return _0xe3f454[_0xed72('0x5a')](_0x187304);}})[_0xed72('0x26')](function(_0x3c69d4){if(_0x3c69d4){_0x552366=_0x3c69d4[_0xed72('0x3b')];if(!_0x334115[_0xed72('0x35')][_0xed72('0x3c')](_0xed72('0x5c'))){_0x187304[_0xed72('0x1e')]=qs[_0xed72('0x1e')](_0x334115['query'][_0xed72('0x1e')]);_0x187304[_0xed72('0x1c')]=qs['offset'](_0x334115[_0xed72('0x35')][_0xed72('0x1c')]);}return _0xe3f454[_0xed72('0x5a')](_0x187304);}})['then'](function(_0x40ef1d){if(_0x40ef1d){return _0x40ef1d?{'count':_0x552366,'rows':_0x40ef1d}:null;}})[_0xed72('0x26')](respondWithResult(_0x20b2c3,null))[_0xed72('0x47')](handleError(_0x20b2c3,null));};exports['getAnyConditions']=function(_0x4b8ee5,_0x1c5849,_0x4d009b){var _0x5b312f={};var _0x415506={};var _0x51e069;var _0x581fe5;return db['Trigger'][_0xed72('0x5b')]({'where':{'id':_0x4b8ee5[_0xed72('0x49')]['id']}})[_0xed72('0x26')](handleEntityNotFound(_0x1c5849,null))[_0xed72('0x26')](function(_0x2f8e49){if(_0x2f8e49){_0x51e069=_0x2f8e49;_0x415506[_0xed72('0x34')]=_[_0xed72('0x36')](db[_0xed72('0x59')]['rawAttributes']);_0x415506[_0xed72('0x35')]=_[_0xed72('0x36')](_0x4b8ee5[_0xed72('0x35')]);_0x415506[_0xed72('0x37')]=_[_0xed72('0x38')](_0x415506['model'],_0x415506[_0xed72('0x35')]);_0x5b312f[_0xed72('0x39')]=_['intersection'](_0x415506[_0xed72('0x34')],qs['fields'](_0x4b8ee5['query'][_0xed72('0x3a')]));_0x5b312f[_0xed72('0x39')]=_0x5b312f[_0xed72('0x39')][_0xed72('0x3b')]?_0x5b312f['attributes']:_0x415506['model'];_0x5b312f[_0xed72('0x3d')]=qs[_0xed72('0x3e')](_0x4b8ee5[_0xed72('0x35')]['sort']);_0x5b312f[_0xed72('0x3f')]=qs[_0xed72('0x37')](_[_0xed72('0x40')](_0x4b8ee5[_0xed72('0x35')],_0x415506[_0xed72('0x37')]));if(_0x4b8ee5[_0xed72('0x35')][_0xed72('0x41')]){_0x5b312f[_0xed72('0x3f')]=_[_0xed72('0x42')](_0x5b312f[_0xed72('0x3f')],{'$or':_[_0xed72('0x2f')](_0x5b312f[_0xed72('0x39')],function(_0x19aa7d){var _0x3d37e2={};_0x3d37e2[_0x19aa7d]={'$like':'%'+_0x4b8ee5['query']['filter']+'%'};return _0x3d37e2;})});}_0x5b312f=_['merge']({},_0x5b312f,_0x4b8ee5[_0xed72('0x4b')]);return _0x51e069[_0xed72('0x5d')](_0x5b312f);}})[_0xed72('0x26')](function(_0x3fbb46){if(_0x3fbb46){_0x581fe5=_0x3fbb46[_0xed72('0x3b')];if(!_0x4b8ee5[_0xed72('0x35')][_0xed72('0x3c')](_0xed72('0x5c'))){_0x5b312f[_0xed72('0x1e')]=qs[_0xed72('0x1e')](_0x4b8ee5[_0xed72('0x35')][_0xed72('0x1e')]);_0x5b312f[_0xed72('0x1c')]=qs[_0xed72('0x1c')](_0x4b8ee5[_0xed72('0x35')][_0xed72('0x1c')]);}return _0x51e069[_0xed72('0x5d')](_0x5b312f);}})['then'](function(_0x18443e){if(_0x18443e){return _0x18443e?{'count':_0x581fe5,'rows':_0x18443e}:null;}})['then'](respondWithResult(_0x1c5849,null))[_0xed72('0x47')](handleError(_0x1c5849,null));};exports[_0xed72('0x5e')]=function(_0x316bb0,_0x352416,_0x2b51df){if(_0x316bb0[_0xed72('0x54')]['id']){delete _0x316bb0[_0xed72('0x54')]['id'];}return db[_0xed72('0x30')][_0xed72('0x4c')]({'where':{'id':_0x316bb0[_0xed72('0x49')]['id']}})[_0xed72('0x26')](handleEntityNotFound(_0x352416,null))[_0xed72('0x26')](function(_0x51aaee){if(_0x51aaee){_0x316bb0[_0xed72('0x54')][_0xed72('0x5f')]=_0x51aaee['id'];return db[_0xed72('0x60')][_0xed72('0x4d')](_0x316bb0[_0xed72('0x54')]);}})[_0xed72('0x26')](respondWithResult(_0x352416,null))[_0xed72('0x47')](handleError(_0x352416,null));};exports[_0xed72('0x61')]=function(_0xc66128,_0x128723,_0x16315b){var _0x17693b={};var _0x175619={};var _0x2a5009;var _0x29f1c6;return db[_0xed72('0x30')][_0xed72('0x5b')]({'where':{'id':_0xc66128[_0xed72('0x49')]['id']}})[_0xed72('0x26')](handleEntityNotFound(_0x128723,null))[_0xed72('0x26')](function(_0x4c2e7f){if(_0x4c2e7f){_0x2a5009=_0x4c2e7f;_0x175619[_0xed72('0x34')]=_[_0xed72('0x36')](db[_0xed72('0x60')][_0xed72('0x4a')]);_0x175619[_0xed72('0x35')]=_[_0xed72('0x36')](_0xc66128[_0xed72('0x35')]);_0x175619[_0xed72('0x37')]=_[_0xed72('0x38')](_0x175619[_0xed72('0x34')],_0x175619[_0xed72('0x35')]);_0x17693b[_0xed72('0x39')]=_['intersection'](_0x175619[_0xed72('0x34')],qs['fields'](_0xc66128[_0xed72('0x35')][_0xed72('0x3a')]));_0x17693b['attributes']=_0x17693b['attributes'][_0xed72('0x3b')]?_0x17693b[_0xed72('0x39')]:_0x175619['model'];_0x17693b[_0xed72('0x3d')]=qs[_0xed72('0x3e')](_0xc66128['query'][_0xed72('0x3e')]);_0x17693b[_0xed72('0x3f')]=qs[_0xed72('0x37')](_[_0xed72('0x40')](_0xc66128['query'],_0x175619[_0xed72('0x37')]));if(_0xc66128[_0xed72('0x35')][_0xed72('0x41')]){_0x17693b[_0xed72('0x3f')]=_['merge'](_0x17693b[_0xed72('0x3f')],{'$or':_[_0xed72('0x2f')](_0x17693b[_0xed72('0x39')],function(_0x1f4d7e){var _0x47111c={};_0x47111c[_0x1f4d7e]={'$like':'%'+_0xc66128[_0xed72('0x35')]['filter']+'%'};return _0x47111c;})});}_0x17693b=_['merge']({},_0x17693b,_0xc66128[_0xed72('0x4b')]);return _0x2a5009[_0xed72('0x61')](_0x17693b);}})[_0xed72('0x26')](function(_0x4fc588){if(_0x4fc588){_0x29f1c6=_0x4fc588[_0xed72('0x3b')];if(!_0xc66128['query']['hasOwnProperty'](_0xed72('0x5c'))){_0x17693b[_0xed72('0x1e')]=qs[_0xed72('0x1e')](_0xc66128[_0xed72('0x35')][_0xed72('0x1e')]);_0x17693b['offset']=qs[_0xed72('0x1c')](_0xc66128[_0xed72('0x35')][_0xed72('0x1c')]);}return _0x2a5009[_0xed72('0x61')](_0x17693b);}})[_0xed72('0x26')](function(_0x3ba3d6){if(_0x3ba3d6){return _0x3ba3d6?{'count':_0x29f1c6,'rows':_0x3ba3d6}:null;}})[_0xed72('0x26')](respondWithResult(_0x128723,null))[_0xed72('0x47')](handleError(_0x128723,null));}; \ No newline at end of file diff --git a/server/api/trigger/trigger.model.js b/server/api/trigger/trigger.model.js index 36b899b..5b5cd5e 100644 --- a/server/api/trigger/trigger.model.js +++ b/server/api/trigger/trigger.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc7e9=['lodash','util','api','moment','bluebird','path','rimraf','exports','define','Trigger','tools_triggers'];(function(_0x121f61,_0x5174fc){var _0x393306=function(_0xc9dfde){while(--_0xc9dfde){_0x121f61['push'](_0x121f61['shift']());}};_0x393306(++_0x5174fc);}(_0xc7e9,0x1ef));var _0x9c7e=function(_0x7e2eb0,_0x17cd58){_0x7e2eb0=_0x7e2eb0-0x0;var _0xd92de4=_0xc7e9[_0x7e2eb0];return _0xd92de4;};'use strict';var _=require(_0x9c7e('0x0'));var util=require(_0x9c7e('0x1'));var logger=require('../../config/logger')(_0x9c7e('0x2'));var moment=require(_0x9c7e('0x3'));var BPromise=require(_0x9c7e('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x9c7e('0x5'));var rimraf=require(_0x9c7e('0x6'));var config=require('../../config/environment');var attributes=require('./trigger.attributes');module[_0x9c7e('0x7')]=function(_0x4e4ccc,_0x1e5135){return _0x4e4ccc[_0x9c7e('0x8')](_0x9c7e('0x9'),attributes,{'tableName':_0x9c7e('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xaeab=['tools_triggers','lodash','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','./trigger.attributes','exports','Trigger'];(function(_0x26a57a,_0x97769b){var _0x1d92d7=function(_0x3d8486){while(--_0x3d8486){_0x26a57a['push'](_0x26a57a['shift']());}};_0x1d92d7(++_0x97769b);}(_0xaeab,0x91));var _0xbaea=function(_0x2f0c5f,_0x1db6de){_0x2f0c5f=_0x2f0c5f-0x0;var _0x1a1a16=_0xaeab[_0x2f0c5f];return _0x1a1a16;};'use strict';var _=require(_0xbaea('0x0'));var util=require('util');var logger=require(_0xbaea('0x1'))('api');var moment=require(_0xbaea('0x2'));var BPromise=require(_0xbaea('0x3'));var rp=require(_0xbaea('0x4'));var fs=require('fs');var path=require(_0xbaea('0x5'));var rimraf=require(_0xbaea('0x6'));var config=require(_0xbaea('0x7'));var attributes=require(_0xbaea('0x8'));module[_0xbaea('0x9')]=function(_0x1ae44e,_0x1e4331){return _0x1ae44e['define'](_0xbaea('0xa'),attributes,{'tableName':_0xbaea('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/trigger/trigger.rpc.js b/server/api/trigger/trigger.rpc.js index f4db563..e30ffea 100644 --- a/server/api/trigger/trigger.rpc.js +++ b/server/api/trigger/trigger.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa604=['options','raw','where','attributes','limit','include','map','model','GetTrigger','ShowTrigger','find','lodash','moment','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','debug','request\x20sent','stringify','error','Trigger,\x20%s,\x20%s','message','info','catch','Trigger','findAll'];(function(_0x588337,_0x38f5ed){var _0x5ab441=function(_0x4b7ae8){while(--_0x4b7ae8){_0x588337['push'](_0x588337['shift']());}};_0x5ab441(++_0x38f5ed);}(_0xa604,0xf2));var _0x4a60=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xa604[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x4a60('0x0'));var util=require('util');var moment=require(_0x4a60('0x1'));var BPromise=require('bluebird');var rs=require(_0x4a60('0x2'));var fs=require('fs');var Redis=require(_0x4a60('0x3'));var db=require(_0x4a60('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x4a60('0x5'))(_0x4a60('0x6'));var config=require(_0x4a60('0x7'));var jayson=require(_0x4a60('0x8'));var client=jayson['client'][_0x4a60('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x3a0f11,_0xc39ffe,_0x2a7eeb){return new BPromise(function(_0xe0c70c,_0x3787f4){return client[_0x4a60('0xa')](_0x3a0f11,_0x2a7eeb)[_0x4a60('0xb')](function(_0x20db21){logger['info']('Trigger,\x20%s,\x20%s',_0xc39ffe,'request\x20sent');logger[_0x4a60('0xc')]('Trigger,\x20%s,\x20%s,\x20%s',_0xc39ffe,_0x4a60('0xd'),JSON[_0x4a60('0xe')](_0x20db21));if(_0x20db21[_0x4a60('0xf')]){if(_0x20db21[_0x4a60('0xf')]['code']===0x1f4){logger[_0x4a60('0xf')](_0x4a60('0x10'),_0xc39ffe,_0x20db21['error'][_0x4a60('0x11')]);return _0x3787f4(_0x20db21[_0x4a60('0xf')][_0x4a60('0x11')]);}logger[_0x4a60('0xf')](_0x4a60('0x10'),_0xc39ffe,_0x20db21[_0x4a60('0xf')][_0x4a60('0x11')]);return _0xe0c70c(_0x20db21[_0x4a60('0xf')][_0x4a60('0x11')]);}else{logger[_0x4a60('0x12')](_0x4a60('0x10'),_0xc39ffe,_0x4a60('0xd'));_0xe0c70c(_0x20db21['result']['message']);}})[_0x4a60('0x13')](function(_0x4cb9d2){logger['error'](_0x4a60('0x10'),_0xc39ffe,_0x4cb9d2);_0x3787f4(_0x4cb9d2);});});}exports['GetTrigger']=function(_0x5b69d2){var _0x346411=this;return new Promise(function(_0x118d44,_0x222874){return db[_0x4a60('0x14')][_0x4a60('0x15')]({'raw':_0x5b69d2[_0x4a60('0x16')]?_0x5b69d2[_0x4a60('0x16')][_0x4a60('0x17')]===undefined?!![]:![]:!![],'where':_0x5b69d2[_0x4a60('0x16')]?_0x5b69d2[_0x4a60('0x16')][_0x4a60('0x18')]||null:null,'attributes':_0x5b69d2[_0x4a60('0x16')]?_0x5b69d2['options'][_0x4a60('0x19')]||null:null,'limit':_0x5b69d2['options']?_0x5b69d2[_0x4a60('0x16')][_0x4a60('0x1a')]||null:null,'include':_0x5b69d2[_0x4a60('0x16')]?_0x5b69d2['options'][_0x4a60('0x1b')]?_[_0x4a60('0x1c')](_0x5b69d2[_0x4a60('0x16')][_0x4a60('0x1b')],function(_0x1cc924){return{'model':db[_0x1cc924[_0x4a60('0x1d')]],'as':_0x1cc924['as'],'attributes':_0x1cc924[_0x4a60('0x19')],'include':_0x1cc924[_0x4a60('0x1b')]?_[_0x4a60('0x1c')](_0x1cc924[_0x4a60('0x1b')],function(_0x497af0){return{'model':db[_0x497af0['model']],'as':_0x497af0['as'],'attributes':_0x497af0[_0x4a60('0x19')],'include':_0x497af0[_0x4a60('0x1b')]?_[_0x4a60('0x1c')](_0x497af0[_0x4a60('0x1b')],function(_0x451497){return{'model':db[_0x451497['model']],'as':_0x451497['as'],'attributes':_0x451497[_0x4a60('0x19')]};}):[]};}):[]};}):[]:[]})[_0x4a60('0xb')](function(_0xf8de0b){logger['info'](_0x4a60('0x1e'),_0x5b69d2);logger[_0x4a60('0xc')](_0x4a60('0x1e'),_0x5b69d2,JSON[_0x4a60('0xe')](_0xf8de0b));_0x118d44(_0xf8de0b);})[_0x4a60('0x13')](function(_0x4f52bb){logger['error'](_0x4a60('0x1e'),_0x4f52bb['message'],_0x5b69d2);_0x222874(_0x346411[_0x4a60('0xf')](0x1f4,_0x4f52bb['message']));});});};exports[_0x4a60('0x1f')]=function(_0xfd27aa){var _0x352ad5=this;return new Promise(function(_0xc5d63e,_0x591d92){return db[_0x4a60('0x14')][_0x4a60('0x20')]({'raw':_0xfd27aa[_0x4a60('0x16')]?_0xfd27aa['options'][_0x4a60('0x17')]===undefined?!![]:![]:!![],'where':_0xfd27aa[_0x4a60('0x16')]?_0xfd27aa[_0x4a60('0x16')]['where']||null:null,'attributes':_0xfd27aa[_0x4a60('0x16')]?_0xfd27aa[_0x4a60('0x16')][_0x4a60('0x19')]||null:null,'include':_0xfd27aa[_0x4a60('0x16')]?_0xfd27aa[_0x4a60('0x16')]['include']?_[_0x4a60('0x1c')](_0xfd27aa[_0x4a60('0x16')]['include'],function(_0x4792de){return{'model':db[_0x4792de[_0x4a60('0x1d')]],'as':_0x4792de['as'],'attributes':_0x4792de[_0x4a60('0x19')],'include':_0x4792de[_0x4a60('0x1b')]?_[_0x4a60('0x1c')](_0x4792de[_0x4a60('0x1b')],function(_0x1110fa){return{'model':db[_0x1110fa[_0x4a60('0x1d')]],'as':_0x1110fa['as'],'attributes':_0x1110fa[_0x4a60('0x19')],'include':_0x1110fa[_0x4a60('0x1b')]?_[_0x4a60('0x1c')](_0x1110fa['include'],function(_0x41823c){return{'model':db[_0x41823c[_0x4a60('0x1d')]],'as':_0x41823c['as'],'attributes':_0x41823c['attributes']};}):[]};}):[]};}):[]:[]})[_0x4a60('0xb')](function(_0x5b67d7){logger['info'](_0x4a60('0x1f'),_0xfd27aa);logger[_0x4a60('0xc')](_0x4a60('0x1f'),_0xfd27aa,JSON[_0x4a60('0xe')](_0x5b67d7));_0xc5d63e(_0x5b67d7);})[_0x4a60('0x13')](function(_0x5dd048){logger['error'](_0x4a60('0x1f'),_0x5dd048[_0x4a60('0x11')],_0xfd27aa);_0x591d92(_0x352ad5[_0x4a60('0xf')](0x1f4,_0x5dd048[_0x4a60('0x11')]));});});}; \ No newline at end of file +var _0x5b66=['where','attributes','limit','include','model','map','then','debug','ShowTrigger','find','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','client','http','request','info','Trigger,\x20%s,\x20%s','request\x20sent','Trigger,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','GetTrigger','findAll','options','raw'];(function(_0x127c7b,_0x1f65e7){var _0x1708eb=function(_0x2033e5){while(--_0x2033e5){_0x127c7b['push'](_0x127c7b['shift']());}};_0x1708eb(++_0x1f65e7);}(_0x5b66,0x6d));var _0x65b6=function(_0x3d3873,_0x419d96){_0x3d3873=_0x3d3873-0x0;var _0x4fac03=_0x5b66[_0x3d3873];return _0x4fac03;};'use strict';var _=require('lodash');var util=require(_0x65b6('0x0'));var moment=require(_0x65b6('0x1'));var BPromise=require(_0x65b6('0x2'));var rs=require(_0x65b6('0x3'));var fs=require('fs');var Redis=require(_0x65b6('0x4'));var db=require(_0x65b6('0x5'))['db'];var utils=require(_0x65b6('0x6'));var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x65b6('0x7')][_0x65b6('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x7277bd,_0x400c9a,_0x540d81){return new BPromise(function(_0x2a8de0,_0x165211){return client[_0x65b6('0x9')](_0x7277bd,_0x540d81)['then'](function(_0x92670f){logger[_0x65b6('0xa')](_0x65b6('0xb'),_0x400c9a,_0x65b6('0xc'));logger['debug'](_0x65b6('0xd'),_0x400c9a,_0x65b6('0xc'),JSON[_0x65b6('0xe')](_0x92670f));if(_0x92670f[_0x65b6('0xf')]){if(_0x92670f[_0x65b6('0xf')]['code']===0x1f4){logger['error'](_0x65b6('0xb'),_0x400c9a,_0x92670f[_0x65b6('0xf')][_0x65b6('0x10')]);return _0x165211(_0x92670f[_0x65b6('0xf')][_0x65b6('0x10')]);}logger[_0x65b6('0xf')](_0x65b6('0xb'),_0x400c9a,_0x92670f[_0x65b6('0xf')]['message']);return _0x2a8de0(_0x92670f[_0x65b6('0xf')][_0x65b6('0x10')]);}else{logger['info'](_0x65b6('0xb'),_0x400c9a,'request\x20sent');_0x2a8de0(_0x92670f[_0x65b6('0x11')][_0x65b6('0x10')]);}})[_0x65b6('0x12')](function(_0xfcfd11){logger['error'](_0x65b6('0xb'),_0x400c9a,_0xfcfd11);_0x165211(_0xfcfd11);});});}exports[_0x65b6('0x13')]=function(_0x530c28){var _0x208fb1=this;return new Promise(function(_0x57f55c,_0x3d3e34){return db['Trigger'][_0x65b6('0x14')]({'raw':_0x530c28[_0x65b6('0x15')]?_0x530c28[_0x65b6('0x15')][_0x65b6('0x16')]===undefined?!![]:![]:!![],'where':_0x530c28[_0x65b6('0x15')]?_0x530c28[_0x65b6('0x15')][_0x65b6('0x17')]||null:null,'attributes':_0x530c28[_0x65b6('0x15')]?_0x530c28[_0x65b6('0x15')][_0x65b6('0x18')]||null:null,'limit':_0x530c28[_0x65b6('0x15')]?_0x530c28['options'][_0x65b6('0x19')]||null:null,'include':_0x530c28[_0x65b6('0x15')]?_0x530c28['options'][_0x65b6('0x1a')]?_['map'](_0x530c28[_0x65b6('0x15')][_0x65b6('0x1a')],function(_0x62bb){return{'model':db[_0x62bb[_0x65b6('0x1b')]],'as':_0x62bb['as'],'attributes':_0x62bb['attributes'],'include':_0x62bb[_0x65b6('0x1a')]?_[_0x65b6('0x1c')](_0x62bb[_0x65b6('0x1a')],function(_0x2b49f0){return{'model':db[_0x2b49f0[_0x65b6('0x1b')]],'as':_0x2b49f0['as'],'attributes':_0x2b49f0[_0x65b6('0x18')],'include':_0x2b49f0[_0x65b6('0x1a')]?_['map'](_0x2b49f0[_0x65b6('0x1a')],function(_0x26db9d){return{'model':db[_0x26db9d['model']],'as':_0x26db9d['as'],'attributes':_0x26db9d[_0x65b6('0x18')]};}):[]};}):[]};}):[]:[]})[_0x65b6('0x1d')](function(_0x1ca5cd){logger[_0x65b6('0xa')]('GetTrigger',_0x530c28);logger[_0x65b6('0x1e')]('GetTrigger',_0x530c28,JSON[_0x65b6('0xe')](_0x1ca5cd));_0x57f55c(_0x1ca5cd);})[_0x65b6('0x12')](function(_0x11c75b){logger[_0x65b6('0xf')](_0x65b6('0x13'),_0x11c75b['message'],_0x530c28);_0x3d3e34(_0x208fb1[_0x65b6('0xf')](0x1f4,_0x11c75b[_0x65b6('0x10')]));});});};exports[_0x65b6('0x1f')]=function(_0x453095){var _0x55a3e4=this;return new Promise(function(_0x3a90a7,_0x582759){return db['Trigger'][_0x65b6('0x20')]({'raw':_0x453095[_0x65b6('0x15')]?_0x453095[_0x65b6('0x15')][_0x65b6('0x16')]===undefined?!![]:![]:!![],'where':_0x453095['options']?_0x453095['options']['where']||null:null,'attributes':_0x453095[_0x65b6('0x15')]?_0x453095[_0x65b6('0x15')]['attributes']||null:null,'include':_0x453095['options']?_0x453095['options']['include']?_[_0x65b6('0x1c')](_0x453095[_0x65b6('0x15')]['include'],function(_0x30d849){return{'model':db[_0x30d849[_0x65b6('0x1b')]],'as':_0x30d849['as'],'attributes':_0x30d849[_0x65b6('0x18')],'include':_0x30d849[_0x65b6('0x1a')]?_[_0x65b6('0x1c')](_0x30d849[_0x65b6('0x1a')],function(_0x216e2e){return{'model':db[_0x216e2e[_0x65b6('0x1b')]],'as':_0x216e2e['as'],'attributes':_0x216e2e[_0x65b6('0x18')],'include':_0x216e2e[_0x65b6('0x1a')]?_['map'](_0x216e2e[_0x65b6('0x1a')],function(_0x3ddd8f){return{'model':db[_0x3ddd8f[_0x65b6('0x1b')]],'as':_0x3ddd8f['as'],'attributes':_0x3ddd8f[_0x65b6('0x18')]};}):[]};}):[]};}):[]:[]})[_0x65b6('0x1d')](function(_0x4e7b85){logger['info'](_0x65b6('0x1f'),_0x453095);logger[_0x65b6('0x1e')](_0x65b6('0x1f'),_0x453095,JSON['stringify'](_0x4e7b85));_0x3a90a7(_0x4e7b85);})['catch'](function(_0x1c5a5f){logger[_0x65b6('0xf')](_0x65b6('0x1f'),_0x1c5a5f[_0x65b6('0x10')],_0x453095);_0x582759(_0x55a3e4[_0x65b6('0xf')](0x1f4,_0x1c5a5f[_0x65b6('0x10')]));});});}; \ No newline at end of file diff --git a/server/api/trunk/index.js b/server/api/trunk/index.js index b808d96..ebc8505 100644 --- a/server/api/trunk/index.js +++ b/server/api/trunk/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xda8c=['show','post','/:id/clone','clone','create','put','update','delete','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','./trunk.controller','get','isAuthenticated','index','/:id'];(function(_0x4471b3,_0x511a9f){var _0x386593=function(_0x1057e2){while(--_0x1057e2){_0x4471b3['push'](_0x4471b3['shift']());}};_0x386593(++_0x511a9f);}(_0xda8c,0x16d));var _0xcda8=function(_0x3cc6d4,_0x40fc15){_0x3cc6d4=_0x3cc6d4-0x0;var _0x938239=_0xda8c[_0x3cc6d4];return _0x938239;};'use strict';var multer=require(_0xcda8('0x0'));var util=require(_0xcda8('0x1'));var path=require(_0xcda8('0x2'));var timeout=require(_0xcda8('0x3'));var express=require(_0xcda8('0x4'));var router=express['Router']();var fs_extra=require(_0xcda8('0x5'));var auth=require(_0xcda8('0x6'));var interaction=require(_0xcda8('0x7'));var config=require('../../config/environment');var controller=require(_0xcda8('0x8'));router[_0xcda8('0x9')]('/',auth[_0xcda8('0xa')](),controller[_0xcda8('0xb')]);router[_0xcda8('0x9')](_0xcda8('0xc'),auth[_0xcda8('0xa')](),controller[_0xcda8('0xd')]);router[_0xcda8('0xe')](_0xcda8('0xf'),auth['isAuthenticated'](),controller[_0xcda8('0x10')]);router[_0xcda8('0xe')]('/',auth[_0xcda8('0xa')](),controller[_0xcda8('0x11')]);router[_0xcda8('0x12')](_0xcda8('0xc'),auth[_0xcda8('0xa')](),controller[_0xcda8('0x13')]);router[_0xcda8('0x14')](_0xcda8('0xc'),auth['isAuthenticated'](),controller['destroy']);module['exports']=router; \ No newline at end of file +var _0x730f=['get','index','isAuthenticated','show','post','clone','/:id','update','delete','destroy','multer','util','path','connect-timeout','express','Router','../../components/auth/service','./trunk.controller'];(function(_0x175c8f,_0x340691){var _0x1cee2b=function(_0x1746e7){while(--_0x1746e7){_0x175c8f['push'](_0x175c8f['shift']());}};_0x1cee2b(++_0x340691);}(_0x730f,0x13c));var _0xf730=function(_0x285d33,_0x4d581e){_0x285d33=_0x285d33-0x0;var _0x514d2f=_0x730f[_0x285d33];return _0x514d2f;};'use strict';var multer=require(_0xf730('0x0'));var util=require(_0xf730('0x1'));var path=require(_0xf730('0x2'));var timeout=require(_0xf730('0x3'));var express=require(_0xf730('0x4'));var router=express[_0xf730('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0xf730('0x6'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xf730('0x7'));router[_0xf730('0x8')]('/',auth['isAuthenticated'](),controller[_0xf730('0x9')]);router[_0xf730('0x8')]('/:id',auth[_0xf730('0xa')](),controller[_0xf730('0xb')]);router[_0xf730('0xc')]('/:id/clone',auth[_0xf730('0xa')](),controller[_0xf730('0xd')]);router[_0xf730('0xc')]('/',auth[_0xf730('0xa')](),controller['create']);router['put'](_0xf730('0xe'),auth['isAuthenticated'](),controller[_0xf730('0xf')]);router[_0xf730('0x10')](_0xf730('0xe'),auth['isAuthenticated'](),controller[_0xf730('0x11')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/trunk/trunk.attributes.js b/server/api/trunk/trunk.attributes.js index bfc6a6f..0587b06 100644 --- a/server/api/trunk/trunk.attributes.js +++ b/server/api/trunk/trunk.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7df4=['nat','ulaw;alaw;gsm','allow','join','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22ulaw\x22,\x20\x22alaw\x22,\x20\x22alaw\x22]','port,invite','insecure','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22port\x22,\x20\x22invite\x22]','never','INTEGER','\x22\x22\x20<>','always','accept','originate','uas','fingerprint','certificate','active','actpass','dynamic','sequelize','exports','STRING','ENUM','friend','user','peer','from-voip-provider','ALLOWED_NOT_SCREENED','ALLOWED_PASSED_SCREEN','ALLOWED_FAILED_SCREEN','ALLOWED','PROHIB_NOT_SCREENED','PROHIB_PASSED_SCREEN','PROHIB_FAILED_SCREEN','PROHIB','udp','setDataValue','transport','getDataValue','split','rfc2833','info','shortinfo','inband','auto','yes','nonat','update','outgoing','force_rport,comedia'];(function(_0x309458,_0xba6e63){var _0x3306ee=function(_0x47e10c){while(--_0x47e10c){_0x309458['push'](_0x309458['shift']());}};_0x3306ee(++_0xba6e63);}(_0x7df4,0xad));var _0x47df=function(_0xe9cbe9,_0x2e5c1a){_0xe9cbe9=_0xe9cbe9-0x0;var _0x1eccd1=_0x7df4[_0xe9cbe9];return _0x1eccd1;};'use strict';var Sequelize=require(_0x47df('0x0'));module[_0x47df('0x1')]={'name':{'type':Sequelize[_0x47df('0x2')],'allowNull':![],'unique':'name','validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'type':{'type':Sequelize[_0x47df('0x3')](_0x47df('0x4'),_0x47df('0x5'),_0x47df('0x6')),'allowNull':![],'defaultValue':'friend'},'context':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x47df('0x7')},'callingpres':{'type':Sequelize[_0x47df('0x3')](_0x47df('0x8'),_0x47df('0x9'),_0x47df('0xa'),_0x47df('0xb'),_0x47df('0xc'),_0x47df('0xd'),_0x47df('0xe'),_0x47df('0xf'))},'deny':{'type':Sequelize[_0x47df('0x2')]},'permit':{'type':Sequelize[_0x47df('0x2')]},'secret':{'type':Sequelize[_0x47df('0x2')]},'md5secret':{'type':Sequelize['STRING']},'remotesecret':{'type':Sequelize[_0x47df('0x2')]},'transport':{'type':Sequelize[_0x47df('0x2')],'defaultValue':_0x47df('0x10'),'set':function(_0x3303cb){this[_0x47df('0x11')](_0x47df('0x12'),_0x3303cb?_0x3303cb['join'](','):null);},'get':function(){return this['getDataValue']('transport')?this[_0x47df('0x13')]('transport')[_0x47df('0x14')](','):null;},'comment':'String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22udp\x22,\x20\x22tcp\x22]'},'dtmfmode':{'type':Sequelize[_0x47df('0x3')](_0x47df('0x15'),_0x47df('0x16'),_0x47df('0x17'),_0x47df('0x18'),_0x47df('0x19')),'defaultValue':_0x47df('0x15')},'directmedia':{'type':Sequelize[_0x47df('0x3')](_0x47df('0x1a'),'no',_0x47df('0x1b'),_0x47df('0x1c'),_0x47df('0x1d')),'defaultValue':'no'},'directrtpsetup':{'type':Sequelize[_0x47df('0x3')](_0x47df('0x1a'),'no'),'defaultValue':'no'},'directmediapermit':{'type':Sequelize[_0x47df('0x2')]},'directmediadeny':{'type':Sequelize['STRING']},'nat':{'type':Sequelize[_0x47df('0x2')],'defaultValue':_0x47df('0x1e'),'set':function(_0x487242){this['setDataValue']('nat',_0x487242?_0x487242['join'](','):null);},'get':function(){return this[_0x47df('0x13')](_0x47df('0x1f'))?this[_0x47df('0x13')](_0x47df('0x1f'))[_0x47df('0x14')](','):null;},'comment':'String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22force_rport\x22,\x20\x22comedia\x22]'},'callgroup':{'type':Sequelize[_0x47df('0x2')]},'namedcallgroup':{'type':Sequelize['STRING']},'pickupgroup':{'type':Sequelize[_0x47df('0x2')]},'namedpickupgroup':{'type':Sequelize['STRING']},'language':{'type':Sequelize[_0x47df('0x2')],'defaultValue':'en'},'tonezone':{'type':Sequelize[_0x47df('0x2')],'allowNull':!![]},'disallow':{'type':Sequelize[_0x47df('0x2')],'defaultValue':'all'},'allow':{'type':Sequelize[_0x47df('0x2')],'allowNull':![],'defaultValue':_0x47df('0x20'),'set':function(_0x55a500){this[_0x47df('0x11')](_0x47df('0x21'),_0x55a500?_0x55a500[_0x47df('0x22')](';'):_0x47df('0x20'));},'get':function(){return this['getDataValue'](_0x47df('0x21'))?this['getDataValue'](_0x47df('0x21'))[_0x47df('0x14')](';'):null;},'comment':_0x47df('0x23')},'autoframing':{'type':Sequelize[_0x47df('0x3')](_0x47df('0x1a'),'no')},'insecure':{'type':Sequelize[_0x47df('0x2')],'defaultValue':_0x47df('0x24'),'set':function(_0x5367e9){this['setDataValue'](_0x47df('0x25'),_0x5367e9?_0x5367e9[_0x47df('0x22')](','):null);},'get':function(){return this['getDataValue'](_0x47df('0x25'))?this[_0x47df('0x13')](_0x47df('0x25'))[_0x47df('0x14')](','):null;},'comment':_0x47df('0x26')},'trustrpid':{'type':Sequelize[_0x47df('0x3')](_0x47df('0x1a'),'no'),'defaultValue':'no'},'trust_id_outbound':{'type':Sequelize[_0x47df('0x3')](_0x47df('0x1a'),'no'),'defaultValue':'no'},'progressinband':{'type':Sequelize[_0x47df('0x3')](_0x47df('0x1a'),'no',_0x47df('0x27'))},'promiscredir':{'type':Sequelize[_0x47df('0x3')](_0x47df('0x1a'),'no')},'useclientcode':{'type':Sequelize[_0x47df('0x3')](_0x47df('0x1a'),'no')},'accountcode':{'type':Sequelize[_0x47df('0x28')](0xb)},'setvar':{'type':Sequelize[_0x47df('0x2')]},'callerid':{'type':Sequelize['STRING'],'defaultValue':_0x47df('0x29')},'amaflags':{'type':Sequelize['STRING']},'callcounter':{'type':Sequelize[_0x47df('0x3')](_0x47df('0x1a'),'no'),'defaultValue':_0x47df('0x1a')},'busylevel':{'type':Sequelize[_0x47df('0x28')](0xb)},'allowoverlap':{'type':Sequelize[_0x47df('0x3')](_0x47df('0x1a'),'no')},'allowsubscribe':{'type':Sequelize['ENUM']('yes','no')},'allowtransfer':{'type':Sequelize[_0x47df('0x3')](_0x47df('0x1a'),'no')},'ignoresdpversion':{'type':Sequelize['ENUM'](_0x47df('0x1a'),'no')},'subscribecontext':{'type':Sequelize['STRING']},'template':{'type':Sequelize['STRING']},'videosupport':{'type':Sequelize[_0x47df('0x3')]('yes','no',_0x47df('0x2a')),'defaultValue':'no'},'maxcallbitrate':{'type':Sequelize[_0x47df('0x28')](0xb)},'rfc2833compensate':{'type':Sequelize[_0x47df('0x3')]('yes','no')},'mailbox':{'type':Sequelize[_0x47df('0x2')]},'session_timers':{'type':Sequelize[_0x47df('0x3')](_0x47df('0x2b'),'refuse',_0x47df('0x2c'))},'session_expires':{'type':Sequelize[_0x47df('0x28')](0xb)},'session_minse':{'type':Sequelize['INTEGER'](0xb)},'session_refresher':{'type':Sequelize['ENUM']('uac',_0x47df('0x2d')),'defaultValue':_0x47df('0x2d')},'t38pt_usertpsource':{'type':Sequelize[_0x47df('0x2')]},'regexten':{'type':Sequelize[_0x47df('0x2')]},'fromdomain':{'type':Sequelize[_0x47df('0x2')]},'fromuser':{'type':Sequelize['STRING']},'port':{'type':Sequelize[_0x47df('0x28')](0x5)},'qualify':{'type':Sequelize[_0x47df('0x3')](_0x47df('0x1a'),'no'),'defaultValue':_0x47df('0x1a')},'keepalive':{'type':Sequelize[_0x47df('0x28')](0xb)},'defaultip':{'type':Sequelize['STRING']},'defaultuser':{'type':Sequelize['STRING']},'rtptimeout':{'type':Sequelize[_0x47df('0x28')](0xb)},'rtpholdtimeout':{'type':Sequelize[_0x47df('0x28')](0xb)},'rtpkeepalive':{'type':Sequelize[_0x47df('0x28')](0xb)},'sendrpid':{'type':Sequelize['ENUM']('yes','no','pai'),'defaultValue':'no'},'outboundproxy':{'type':Sequelize[_0x47df('0x2')]},'callbackextension':{'type':Sequelize[_0x47df('0x2')]},'timert1':{'type':Sequelize[_0x47df('0x28')](0xb)},'timerb':{'type':Sequelize[_0x47df('0x28')](0xb)},'qualifyfreq':{'type':Sequelize[_0x47df('0x28')](0xb)},'contactpermit':{'type':Sequelize[_0x47df('0x2')]},'contactdeny':{'type':Sequelize[_0x47df('0x2')]},'contactacl':{'type':Sequelize[_0x47df('0x2')]},'unsolicited_mailbox':{'type':Sequelize[_0x47df('0x2')]},'use_q850_reason':{'type':Sequelize[_0x47df('0x2')]},'maxforwards':{'type':Sequelize['INTEGER'](0xb)},'encryption':{'type':Sequelize[_0x47df('0x3')]('yes','no'),'defaultValue':'no'},'avpf':{'type':Sequelize[_0x47df('0x3')](_0x47df('0x1a'),'no')},'force_avp':{'type':Sequelize['ENUM'](_0x47df('0x1a'),'no')},'icesupport':{'type':Sequelize[_0x47df('0x3')](_0x47df('0x1a'),'no')},'dtlsenable':{'type':Sequelize['ENUM'](_0x47df('0x1a'),'no')},'dtlsverify':{'type':Sequelize[_0x47df('0x3')](_0x47df('0x1a'),'no',_0x47df('0x2e'),_0x47df('0x2f'))},'dtlsrekey':{'type':Sequelize[_0x47df('0x28')](0xb)},'dtlscertfile':{'type':Sequelize[_0x47df('0x2')]},'dtlsprivatekey':{'type':Sequelize[_0x47df('0x2')]},'dtlscipher':{'type':Sequelize[_0x47df('0x2')]},'dtlscafile':{'type':Sequelize[_0x47df('0x2')]},'dtlscapath':{'type':Sequelize[_0x47df('0x2')]},'dtlssetup':{'type':Sequelize[_0x47df('0x3')](_0x47df('0x30'),'passive',_0x47df('0x31')),'allowNull':!![]},'dtlsfingerprint':{'type':Sequelize[_0x47df('0x2')]},'usereqphone':{'type':Sequelize[_0x47df('0x3')](_0x47df('0x1a'),'no'),'defaultValue':'no'},'recordonfeature':{'type':Sequelize[_0x47df('0x2')]},'recordofffeature':{'type':Sequelize['STRING']},'call_limit':{'type':Sequelize[_0x47df('0x28')](0xb),'defaultValue':0x3e8},'registertrying':{'type':Sequelize['ENUM'](_0x47df('0x1a'),'no')},'subscribemwi':{'type':Sequelize[_0x47df('0x3')]('yes','no')},'vmexten':{'type':Sequelize['STRING']},'mohinterpret':{'type':Sequelize[_0x47df('0x2')]},'mohsuggest':{'type':Sequelize['STRING']},'parkinglot':{'type':Sequelize[_0x47df('0x2')]},'description':{'type':Sequelize[_0x47df('0x2')]},'host':{'type':Sequelize[_0x47df('0x2')],'defaultValue':_0x47df('0x32')},'canreinvite':{'type':Sequelize['ENUM'](_0x47df('0x1a'),'no',_0x47df('0x1b'),_0x47df('0x1c'),'update,nonat'),'defaultValue':'no'},'registry':{'type':Sequelize[_0x47df('0x2')]},'otherFields':{'type':Sequelize[_0x47df('0x2')]},'active':{'type':Sequelize['BOOLEAN'],'allowNull':![],'defaultValue':!![]},'t38pt_udptl':{'type':Sequelize[_0x47df('0x2')],'defaultValue':'no'}}; \ No newline at end of file +var _0x5f94=['always','accept','uac','uas','pai','fingerprint','certificate','active','passive','actpass','dynamic','nonat','update,nonat','BOOLEAN','sequelize','exports','name','ENUM','friend','user','peer','STRING','from-voip-provider','ALLOWED_NOT_SCREENED','ALLOWED_PASSED_SCREEN','ALLOWED','PROHIB_NOT_SCREENED','PROHIB','udp','setDataValue','transport','join','getDataValue','split','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22udp\x22,\x20\x22tcp\x22]','rfc2833','info','inband','auto','update','outgoing','force_rport,comedia','nat','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22force_rport\x22,\x20\x22comedia\x22]','all','allow','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22ulaw\x22,\x20\x22alaw\x22,\x20\x22alaw\x22]','yes','port,invite','insecure','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22port\x22,\x20\x22invite\x22]','INTEGER','\x22\x22\x20<>'];(function(_0x4e6ae6,_0x49dba6){var _0x23c108=function(_0x1bc103){while(--_0x1bc103){_0x4e6ae6['push'](_0x4e6ae6['shift']());}};_0x23c108(++_0x49dba6);}(_0x5f94,0x1b6));var _0x45f9=function(_0x4a5af8,_0x511ecb){_0x4a5af8=_0x4a5af8-0x0;var _0xe06088=_0x5f94[_0x4a5af8];return _0xe06088;};'use strict';var Sequelize=require(_0x45f9('0x0'));module[_0x45f9('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0x45f9('0x2'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'type':{'type':Sequelize[_0x45f9('0x3')](_0x45f9('0x4'),_0x45f9('0x5'),_0x45f9('0x6')),'allowNull':![],'defaultValue':_0x45f9('0x4')},'context':{'type':Sequelize[_0x45f9('0x7')],'allowNull':![],'defaultValue':_0x45f9('0x8')},'callingpres':{'type':Sequelize[_0x45f9('0x3')](_0x45f9('0x9'),_0x45f9('0xa'),'ALLOWED_FAILED_SCREEN',_0x45f9('0xb'),_0x45f9('0xc'),'PROHIB_PASSED_SCREEN','PROHIB_FAILED_SCREEN',_0x45f9('0xd'))},'deny':{'type':Sequelize[_0x45f9('0x7')]},'permit':{'type':Sequelize[_0x45f9('0x7')]},'secret':{'type':Sequelize[_0x45f9('0x7')]},'md5secret':{'type':Sequelize[_0x45f9('0x7')]},'remotesecret':{'type':Sequelize[_0x45f9('0x7')]},'transport':{'type':Sequelize[_0x45f9('0x7')],'defaultValue':_0x45f9('0xe'),'set':function(_0x24a5a7){this[_0x45f9('0xf')](_0x45f9('0x10'),_0x24a5a7?_0x24a5a7[_0x45f9('0x11')](','):null);},'get':function(){return this[_0x45f9('0x12')](_0x45f9('0x10'))?this[_0x45f9('0x12')](_0x45f9('0x10'))[_0x45f9('0x13')](','):null;},'comment':_0x45f9('0x14')},'dtmfmode':{'type':Sequelize[_0x45f9('0x3')](_0x45f9('0x15'),_0x45f9('0x16'),'shortinfo',_0x45f9('0x17'),_0x45f9('0x18')),'defaultValue':_0x45f9('0x15')},'directmedia':{'type':Sequelize[_0x45f9('0x3')]('yes','no','nonat',_0x45f9('0x19'),_0x45f9('0x1a')),'defaultValue':'no'},'directrtpsetup':{'type':Sequelize['ENUM']('yes','no'),'defaultValue':'no'},'directmediapermit':{'type':Sequelize[_0x45f9('0x7')]},'directmediadeny':{'type':Sequelize['STRING']},'nat':{'type':Sequelize['STRING'],'defaultValue':_0x45f9('0x1b'),'set':function(_0x56f893){this['setDataValue'](_0x45f9('0x1c'),_0x56f893?_0x56f893[_0x45f9('0x11')](','):null);},'get':function(){return this[_0x45f9('0x12')](_0x45f9('0x1c'))?this[_0x45f9('0x12')]('nat')['split'](','):null;},'comment':_0x45f9('0x1d')},'callgroup':{'type':Sequelize[_0x45f9('0x7')]},'namedcallgroup':{'type':Sequelize[_0x45f9('0x7')]},'pickupgroup':{'type':Sequelize[_0x45f9('0x7')]},'namedpickupgroup':{'type':Sequelize[_0x45f9('0x7')]},'language':{'type':Sequelize[_0x45f9('0x7')],'defaultValue':'en'},'tonezone':{'type':Sequelize['STRING'],'allowNull':!![]},'disallow':{'type':Sequelize[_0x45f9('0x7')],'defaultValue':_0x45f9('0x1e')},'allow':{'type':Sequelize[_0x45f9('0x7')],'allowNull':![],'defaultValue':'ulaw;alaw;gsm','set':function(_0xbc1813){this[_0x45f9('0xf')](_0x45f9('0x1f'),_0xbc1813?_0xbc1813[_0x45f9('0x11')](';'):'ulaw;alaw;gsm');},'get':function(){return this[_0x45f9('0x12')](_0x45f9('0x1f'))?this['getDataValue']('allow')[_0x45f9('0x13')](';'):null;},'comment':_0x45f9('0x20')},'autoframing':{'type':Sequelize[_0x45f9('0x3')](_0x45f9('0x21'),'no')},'insecure':{'type':Sequelize[_0x45f9('0x7')],'defaultValue':_0x45f9('0x22'),'set':function(_0x2e5d5f){this['setDataValue'](_0x45f9('0x23'),_0x2e5d5f?_0x2e5d5f['join'](','):null);},'get':function(){return this[_0x45f9('0x12')](_0x45f9('0x23'))?this[_0x45f9('0x12')]('insecure')[_0x45f9('0x13')](','):null;},'comment':_0x45f9('0x24')},'trustrpid':{'type':Sequelize[_0x45f9('0x3')]('yes','no'),'defaultValue':'no'},'trust_id_outbound':{'type':Sequelize['ENUM'](_0x45f9('0x21'),'no'),'defaultValue':'no'},'progressinband':{'type':Sequelize[_0x45f9('0x3')]('yes','no','never')},'promiscredir':{'type':Sequelize[_0x45f9('0x3')](_0x45f9('0x21'),'no')},'useclientcode':{'type':Sequelize[_0x45f9('0x3')](_0x45f9('0x21'),'no')},'accountcode':{'type':Sequelize[_0x45f9('0x25')](0xb)},'setvar':{'type':Sequelize[_0x45f9('0x7')]},'callerid':{'type':Sequelize[_0x45f9('0x7')],'defaultValue':_0x45f9('0x26')},'amaflags':{'type':Sequelize[_0x45f9('0x7')]},'callcounter':{'type':Sequelize[_0x45f9('0x3')]('yes','no'),'defaultValue':_0x45f9('0x21')},'busylevel':{'type':Sequelize[_0x45f9('0x25')](0xb)},'allowoverlap':{'type':Sequelize[_0x45f9('0x3')](_0x45f9('0x21'),'no')},'allowsubscribe':{'type':Sequelize[_0x45f9('0x3')]('yes','no')},'allowtransfer':{'type':Sequelize['ENUM']('yes','no')},'ignoresdpversion':{'type':Sequelize['ENUM'](_0x45f9('0x21'),'no')},'subscribecontext':{'type':Sequelize[_0x45f9('0x7')]},'template':{'type':Sequelize[_0x45f9('0x7')]},'videosupport':{'type':Sequelize[_0x45f9('0x3')](_0x45f9('0x21'),'no',_0x45f9('0x27')),'defaultValue':'no'},'maxcallbitrate':{'type':Sequelize['INTEGER'](0xb)},'rfc2833compensate':{'type':Sequelize[_0x45f9('0x3')](_0x45f9('0x21'),'no')},'mailbox':{'type':Sequelize[_0x45f9('0x7')]},'session_timers':{'type':Sequelize[_0x45f9('0x3')](_0x45f9('0x28'),'refuse','originate')},'session_expires':{'type':Sequelize[_0x45f9('0x25')](0xb)},'session_minse':{'type':Sequelize[_0x45f9('0x25')](0xb)},'session_refresher':{'type':Sequelize[_0x45f9('0x3')](_0x45f9('0x29'),_0x45f9('0x2a')),'defaultValue':_0x45f9('0x2a')},'t38pt_usertpsource':{'type':Sequelize['STRING']},'regexten':{'type':Sequelize[_0x45f9('0x7')]},'fromdomain':{'type':Sequelize[_0x45f9('0x7')]},'fromuser':{'type':Sequelize['STRING']},'port':{'type':Sequelize['INTEGER'](0x5)},'qualify':{'type':Sequelize[_0x45f9('0x3')](_0x45f9('0x21'),'no'),'defaultValue':_0x45f9('0x21')},'keepalive':{'type':Sequelize[_0x45f9('0x25')](0xb)},'defaultip':{'type':Sequelize['STRING']},'defaultuser':{'type':Sequelize[_0x45f9('0x7')]},'rtptimeout':{'type':Sequelize[_0x45f9('0x25')](0xb)},'rtpholdtimeout':{'type':Sequelize['INTEGER'](0xb)},'rtpkeepalive':{'type':Sequelize[_0x45f9('0x25')](0xb)},'sendrpid':{'type':Sequelize[_0x45f9('0x3')](_0x45f9('0x21'),'no',_0x45f9('0x2b')),'defaultValue':'no'},'outboundproxy':{'type':Sequelize[_0x45f9('0x7')]},'callbackextension':{'type':Sequelize['STRING']},'timert1':{'type':Sequelize[_0x45f9('0x25')](0xb)},'timerb':{'type':Sequelize[_0x45f9('0x25')](0xb)},'qualifyfreq':{'type':Sequelize[_0x45f9('0x25')](0xb)},'contactpermit':{'type':Sequelize[_0x45f9('0x7')]},'contactdeny':{'type':Sequelize['STRING']},'contactacl':{'type':Sequelize[_0x45f9('0x7')]},'unsolicited_mailbox':{'type':Sequelize[_0x45f9('0x7')]},'use_q850_reason':{'type':Sequelize[_0x45f9('0x7')]},'maxforwards':{'type':Sequelize[_0x45f9('0x25')](0xb)},'encryption':{'type':Sequelize[_0x45f9('0x3')](_0x45f9('0x21'),'no'),'defaultValue':'no'},'avpf':{'type':Sequelize[_0x45f9('0x3')](_0x45f9('0x21'),'no')},'force_avp':{'type':Sequelize['ENUM'](_0x45f9('0x21'),'no')},'icesupport':{'type':Sequelize[_0x45f9('0x3')](_0x45f9('0x21'),'no')},'dtlsenable':{'type':Sequelize[_0x45f9('0x3')](_0x45f9('0x21'),'no')},'dtlsverify':{'type':Sequelize[_0x45f9('0x3')](_0x45f9('0x21'),'no',_0x45f9('0x2c'),_0x45f9('0x2d'))},'dtlsrekey':{'type':Sequelize[_0x45f9('0x25')](0xb)},'dtlscertfile':{'type':Sequelize[_0x45f9('0x7')]},'dtlsprivatekey':{'type':Sequelize[_0x45f9('0x7')]},'dtlscipher':{'type':Sequelize[_0x45f9('0x7')]},'dtlscafile':{'type':Sequelize['STRING']},'dtlscapath':{'type':Sequelize['STRING']},'dtlssetup':{'type':Sequelize[_0x45f9('0x3')](_0x45f9('0x2e'),_0x45f9('0x2f'),_0x45f9('0x30')),'allowNull':!![]},'dtlsfingerprint':{'type':Sequelize['STRING']},'usereqphone':{'type':Sequelize[_0x45f9('0x3')](_0x45f9('0x21'),'no'),'defaultValue':'no'},'recordonfeature':{'type':Sequelize[_0x45f9('0x7')]},'recordofffeature':{'type':Sequelize['STRING']},'call_limit':{'type':Sequelize[_0x45f9('0x25')](0xb),'defaultValue':0x3e8},'registertrying':{'type':Sequelize[_0x45f9('0x3')]('yes','no')},'subscribemwi':{'type':Sequelize[_0x45f9('0x3')](_0x45f9('0x21'),'no')},'vmexten':{'type':Sequelize[_0x45f9('0x7')]},'mohinterpret':{'type':Sequelize[_0x45f9('0x7')]},'mohsuggest':{'type':Sequelize[_0x45f9('0x7')]},'parkinglot':{'type':Sequelize[_0x45f9('0x7')]},'description':{'type':Sequelize[_0x45f9('0x7')]},'host':{'type':Sequelize[_0x45f9('0x7')],'defaultValue':_0x45f9('0x31')},'canreinvite':{'type':Sequelize['ENUM'](_0x45f9('0x21'),'no',_0x45f9('0x32'),_0x45f9('0x19'),_0x45f9('0x33')),'defaultValue':'no'},'registry':{'type':Sequelize[_0x45f9('0x7')]},'otherFields':{'type':Sequelize[_0x45f9('0x7')]},'active':{'type':Sequelize[_0x45f9('0x34')],'allowNull':![],'defaultValue':!![]},'t38pt_udptl':{'type':Sequelize[_0x45f9('0x7')],'defaultValue':'no'}}; \ No newline at end of file diff --git a/server/api/trunk/trunk.controller.js b/server/api/trunk/trunk.controller.js index 44878ff..3d51caa 100644 --- a/server/api/trunk/trunk.controller.js +++ b/server/api/trunk/trunk.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9c44=['key','model','map','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','VIRTUAL','merge','options','includeAll','include','findAll','catch','clone','find','omit','createdAt','body','updatedAt','create','user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','readFileSync','join','root','server/files/templates/trunk.ejs','utf8','server/files/templates/registry.ejs','render','writeFileSync','/etc/asterisk/sip_xcally_trunks.conf','Reload','chan_sip.so','Unable\x20to\x20retrieve\x20the\x20current\x20user','update','params','/etc/asterisk/sip_xcally_registers.conf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','sox','ejs','fs-extra','lodash','squel','crypto','desk.js','to-csv','querystring','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/license/util','../../mysqldb','client','http','request','then','info','Trunk,\x20%s,\x20%s','request\x20sent','debug','Trunk,\x20%s,\x20%s,\x20%s','stringify','error','message','sendStatus','status','json','offset','limit','undefined','count','set','Content-Range','reject','save','get','Trunks','destroy','stack','name','send','index','Trunk','rawAttributes','fieldName','type'];(function(_0x371b29,_0x2d33ed){var _0x434d79=function(_0x3966cf){while(--_0x3966cf){_0x371b29['push'](_0x371b29['shift']());}};_0x434d79(++_0x2d33ed);}(_0x9c44,0x178));var _0x49c4=function(_0x160c73,_0x2ee678){_0x160c73=_0x160c73-0x0;var _0xd9302=_0x9c44[_0x160c73];return _0xd9302;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x49c4('0x0'));var jsonpatch=require(_0x49c4('0x1'));var rp=require(_0x49c4('0x2'));var moment=require(_0x49c4('0x3'));var BPromise=require(_0x49c4('0x4'));var Mustache=require(_0x49c4('0x5'));var util=require('util');var path=require('path');var sox=require(_0x49c4('0x6'));var csv=require('to-csv');var ejs=require(_0x49c4('0x7'));var fs=require('fs');var fs_extra=require(_0x49c4('0x8'));var _=require(_0x49c4('0x9'));var squel=require(_0x49c4('0xa'));var crypto=require(_0x49c4('0xb'));var jsforce=require('jsforce');var deskjs=require(_0x49c4('0xc'));var toCsv=require(_0x49c4('0xd'));var querystring=require(_0x49c4('0xe'));var Papa=require(_0x49c4('0xf'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x49c4('0x10'));var as=require(_0x49c4('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x49c4('0x12'))(_0x49c4('0x13'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x49c4('0x14'));var db=require(_0x49c4('0x15'))['db'];var jayson=require('jayson/promise');var client=jayson[_0x49c4('0x16')][_0x49c4('0x17')]({'port':0x232a});function respondWithRpcPromise(_0x5f2fd9,_0x1909fe,_0x280996,_0x21f15a){return new BPromise(function(_0x2decee,_0x12777c){var _0x18211c=_0x21f15a||client;return _0x18211c[_0x49c4('0x18')](_0x5f2fd9,_0x280996)[_0x49c4('0x19')](function(_0x58d177){logger[_0x49c4('0x1a')](_0x49c4('0x1b'),_0x1909fe,_0x49c4('0x1c'));logger[_0x49c4('0x1d')](_0x49c4('0x1e'),_0x1909fe,'request\x20sent',JSON[_0x49c4('0x1f')](_0x58d177));if(_0x58d177[_0x49c4('0x20')]){if(_0x58d177['error']['code']===0x1f4){logger[_0x49c4('0x20')](_0x49c4('0x1b'),_0x1909fe,_0x58d177[_0x49c4('0x20')]['message']);return _0x12777c(_0x58d177[_0x49c4('0x20')]['message']);}logger[_0x49c4('0x20')](_0x49c4('0x1b'),_0x1909fe,_0x58d177[_0x49c4('0x20')][_0x49c4('0x21')]);return _0x2decee(_0x58d177[_0x49c4('0x20')][_0x49c4('0x21')]);}else{logger[_0x49c4('0x1a')](_0x49c4('0x1b'),_0x1909fe,_0x49c4('0x1c'));_0x2decee(_0x58d177['result']['message']);}})['catch'](function(_0x1c99b1){logger['error']('Trunk,\x20%s,\x20%s',_0x1909fe,_0x1c99b1);_0x12777c(_0x1c99b1);});});}function respondWithStatusCode(_0x2263ae,_0x15581b){_0x15581b=_0x15581b||0xcc;return function(_0x26c640){if(_0x26c640){return _0x2263ae[_0x49c4('0x22')](_0x15581b);}return _0x2263ae['status'](_0x15581b)['end']();};}function respondWithResult(_0x180276,_0x9cb797){_0x9cb797=_0x9cb797||0xc8;return function(_0x565423){if(_0x565423){return _0x180276[_0x49c4('0x23')](_0x9cb797)[_0x49c4('0x24')](_0x565423);}};}function respondWithFilteredResult(_0x210159,_0xa7a826){return function(_0x531d92){if(_0x531d92){var _0x543ea2=typeof _0xa7a826[_0x49c4('0x25')]==='undefined'&&typeof _0xa7a826[_0x49c4('0x26')]===_0x49c4('0x27');var _0x3f1708=_0x531d92[_0x49c4('0x28')];var _0x5987ae=_0x543ea2?0x0:_0xa7a826[_0x49c4('0x25')];var _0x2b2793=_0x543ea2?_0x531d92[_0x49c4('0x28')]:_0xa7a826[_0x49c4('0x25')]+_0xa7a826[_0x49c4('0x26')];var _0x29f835;if(_0x2b2793>=_0x3f1708){_0x2b2793=_0x3f1708;_0x29f835=0xc8;}else{_0x29f835=0xce;}_0x210159[_0x49c4('0x23')](_0x29f835);return _0x210159[_0x49c4('0x29')](_0x49c4('0x2a'),_0x5987ae+'-'+_0x2b2793+'/'+_0x3f1708)[_0x49c4('0x24')](_0x531d92);}return null;};}function patchUpdates(_0x46f7ea){return function(_0x4ea6ea){try{jsonpatch['apply'](_0x4ea6ea,_0x46f7ea,!![]);}catch(_0x59eb84){return BPromise[_0x49c4('0x2b')](_0x59eb84);}return _0x4ea6ea[_0x49c4('0x2c')]();};}function saveUpdates(_0x1eb035,_0x27e467){return function(_0x28eb47){if(_0x28eb47){return _0x28eb47['update'](_0x1eb035)[_0x49c4('0x19')](function(_0x116eb4){return _0x116eb4;});}return null;};}function removeEntity(_0x2e7a69,_0x24bba9){return function(_0x58e252){if(_0x58e252){return _0x58e252['destroy']()[_0x49c4('0x19')](function(){var _0x9a1bed=_0x58e252[_0x49c4('0x2d')]({'plain':!![]});var _0x13b3b4=_0x49c4('0x2e');return db['UserProfileResource'][_0x49c4('0x2f')]({'where':{'type':_0x13b3b4,'resourceId':_0x9a1bed['id']}})[_0x49c4('0x19')](function(){return _0x58e252;});})[_0x49c4('0x19')](function(){_0x2e7a69['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x85dce2,_0x1991e9){return function(_0x3bec0a){if(!_0x3bec0a){_0x85dce2[_0x49c4('0x22')](0x194);}return _0x3bec0a;};}function handleError(_0x2b45a1,_0x2cf897){_0x2cf897=_0x2cf897||0x1f4;return function(_0x1d1557){logger[_0x49c4('0x20')](_0x1d1557[_0x49c4('0x30')]);if(_0x1d1557['name']){delete _0x1d1557[_0x49c4('0x31')];}_0x2b45a1['status'](_0x2cf897)[_0x49c4('0x32')](_0x1d1557);};}exports[_0x49c4('0x33')]=function(_0x2625a6,_0x1c2830){var _0x4ed4f8={},_0x335f0c={},_0x31f3ff={'count':0x0,'rows':[]};var _0x1c910a=_['map'](db[_0x49c4('0x34')][_0x49c4('0x35')],function(_0x178987){return{'name':_0x178987[_0x49c4('0x36')],'type':_0x178987[_0x49c4('0x37')][_0x49c4('0x38')]};});_0x335f0c[_0x49c4('0x39')]=_[_0x49c4('0x3a')](_0x1c910a,_0x49c4('0x31'));_0x335f0c[_0x49c4('0x3b')]=_[_0x49c4('0x3c')](_0x2625a6['query']);_0x335f0c[_0x49c4('0x3d')]=_[_0x49c4('0x3e')](_0x335f0c[_0x49c4('0x39')],_0x335f0c[_0x49c4('0x3b')]);_0x4ed4f8[_0x49c4('0x3f')]=_[_0x49c4('0x3e')](_0x335f0c[_0x49c4('0x39')],qs[_0x49c4('0x40')](_0x2625a6[_0x49c4('0x3b')][_0x49c4('0x40')]));_0x4ed4f8[_0x49c4('0x3f')]=_0x4ed4f8[_0x49c4('0x3f')][_0x49c4('0x41')]?_0x4ed4f8['attributes']:_0x335f0c[_0x49c4('0x39')];if(!_0x2625a6['query'][_0x49c4('0x42')](_0x49c4('0x43'))){_0x4ed4f8[_0x49c4('0x26')]=qs[_0x49c4('0x26')](_0x2625a6[_0x49c4('0x3b')][_0x49c4('0x26')]);_0x4ed4f8['offset']=qs['offset'](_0x2625a6[_0x49c4('0x3b')][_0x49c4('0x25')]);}_0x4ed4f8[_0x49c4('0x44')]=qs[_0x49c4('0x45')](_0x2625a6['query'][_0x49c4('0x45')]);_0x4ed4f8[_0x49c4('0x46')]=qs[_0x49c4('0x3d')](_[_0x49c4('0x47')](_0x2625a6[_0x49c4('0x3b')],_0x335f0c[_0x49c4('0x3d')]),_0x1c910a);if(_0x2625a6[_0x49c4('0x3b')][_0x49c4('0x48')]){_0x4ed4f8[_0x49c4('0x46')]=_['merge'](_0x4ed4f8[_0x49c4('0x46')],{'$or':_['map'](_0x1c910a,function(_0x33696e){if(_0x33696e[_0x49c4('0x37')]!==_0x49c4('0x49')){var _0x258abe={};_0x258abe[_0x33696e[_0x49c4('0x31')]]={'$like':'%'+_0x2625a6['query'][_0x49c4('0x48')]+'%'};return _0x258abe;}})});}_0x4ed4f8=_[_0x49c4('0x4a')]({},_0x4ed4f8,_0x2625a6[_0x49c4('0x4b')]);var _0x254d07={'where':_0x4ed4f8[_0x49c4('0x46')]};return db[_0x49c4('0x34')][_0x49c4('0x28')](_0x254d07)['then'](function(_0x3bac1b){_0x31f3ff['count']=_0x3bac1b;if(_0x2625a6[_0x49c4('0x3b')][_0x49c4('0x4c')]){_0x4ed4f8[_0x49c4('0x4d')]=[{'all':!![]}];}return db[_0x49c4('0x34')][_0x49c4('0x4e')](_0x4ed4f8);})[_0x49c4('0x19')](function(_0x2c6be1){_0x31f3ff['rows']=_0x2c6be1;return _0x31f3ff;})[_0x49c4('0x19')](respondWithFilteredResult(_0x1c2830,_0x4ed4f8))[_0x49c4('0x4f')](handleError(_0x1c2830,null));};exports['show']=function(_0x1e1ac4,_0xaece5f){var _0xfbe179={'raw':![],'where':{'id':_0x1e1ac4['params']['id']}},_0x242afc={};_0x242afc['model']=_[_0x49c4('0x3c')](db['Trunk'][_0x49c4('0x35')]);_0x242afc[_0x49c4('0x3b')]=_[_0x49c4('0x3c')](_0x1e1ac4[_0x49c4('0x3b')]);_0x242afc[_0x49c4('0x3d')]=_[_0x49c4('0x3e')](_0x242afc[_0x49c4('0x39')],_0x242afc['query']);_0xfbe179[_0x49c4('0x3f')]=_[_0x49c4('0x3e')](_0x242afc[_0x49c4('0x39')],qs[_0x49c4('0x40')](_0x1e1ac4[_0x49c4('0x3b')][_0x49c4('0x40')]));_0xfbe179[_0x49c4('0x3f')]=_0xfbe179[_0x49c4('0x3f')][_0x49c4('0x41')]?_0xfbe179[_0x49c4('0x3f')]:_0x242afc['model'];if(_0x1e1ac4['query'][_0x49c4('0x4c')]){_0xfbe179[_0x49c4('0x4d')]=[{'all':!![]}];}_0xfbe179=_['merge']({},_0xfbe179,_0x1e1ac4['options']);return db[_0x49c4('0x34')]['find'](_0xfbe179)['then'](handleEntityNotFound(_0xaece5f,null))[_0x49c4('0x19')](respondWithResult(_0xaece5f,null))[_0x49c4('0x4f')](handleError(_0xaece5f,null));};exports[_0x49c4('0x50')]=function(_0x38c480,_0x2884ca){var _0x16949a={'where':{'id':_0x38c480['params']['id']}},_0x35724e={};_0x35724e[_0x49c4('0x39')]=_[_0x49c4('0x3c')](db[_0x49c4('0x34')][_0x49c4('0x35')]);_0x16949a[_0x49c4('0x3f')]=_[_0x49c4('0x3e')](_0x35724e['model'],qs['fields'](_0x38c480[_0x49c4('0x3b')][_0x49c4('0x40')]));_0x16949a[_0x49c4('0x3f')]=_0x16949a[_0x49c4('0x3f')][_0x49c4('0x41')]?_0x16949a[_0x49c4('0x3f')]:_0x35724e[_0x49c4('0x39')];if(_0x38c480['query'][_0x49c4('0x4c')]){_0x16949a[_0x49c4('0x4d')]=[{'all':!![]}];}_0x16949a=_['merge']({},_0x16949a,_0x38c480[_0x49c4('0x4b')]);return db['Trunk'][_0x49c4('0x51')](_0x16949a)[_0x49c4('0x19')](handleEntityNotFound(_0x2884ca,null))[_0x49c4('0x19')](function(_0x2fe89a){if(_0x2fe89a){var _0x845f7e=_0x2fe89a[_0x49c4('0x2d')]({'plain':!![]});_0x845f7e=qs[_0x49c4('0x52')](_0x845f7e,['id',_0x49c4('0x53'),'updatedAt']);_0x38c480[_0x49c4('0x54')]=_[_0x49c4('0x52')](_0x38c480['body'],['id',_0x49c4('0x53'),_0x49c4('0x55')]);return db['Trunk'][_0x49c4('0x56')](_[_0x49c4('0x4a')](_0x845f7e,_0x38c480['body']),{'include':_0x38c480['query']['includeAll']?[{'all':!![]}]:undefined})['then'](function(_0xc43386){var _0x54947d=_0x38c480[_0x49c4('0x57')][_0x49c4('0x2d')]({'plain':!![]});if(!_0x54947d)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x54947d[_0x49c4('0x58')]===_0x49c4('0x57')){var _0x5ac9f0=_0xc43386[_0x49c4('0x2d')]({'plain':!![]});var _0x3dcf4c=_0x49c4('0x2e');return db[_0x49c4('0x59')]['find']({'where':{'name':_0x3dcf4c,'userProfileId':_0x54947d[_0x49c4('0x5a')]},'raw':!![]})[_0x49c4('0x19')](function(_0x3cc604){if(_0x3cc604&&_0x3cc604[_0x49c4('0x5b')]===0x0){return db['UserProfileResource'][_0x49c4('0x56')]({'name':_0x5ac9f0['name'],'resourceId':_0x5ac9f0['id'],'type':_0x3cc604['name'],'sectionId':_0x3cc604['id']},{})['then'](function(){return _0xc43386;});}else{return _0xc43386;}})['catch'](function(_0x302251){logger[_0x49c4('0x20')](_0x49c4('0x5c'),_0x302251);throw _0x302251;});}return _0xc43386;});}})[_0x49c4('0x19')](respondWithResult(_0x2884ca,0xc9))['catch'](handleError(_0x2884ca,null));};exports['create']=function(_0x340523,_0x109b81,_0x342326){var _0x295ad0;return db[_0x49c4('0x34')][_0x49c4('0x56')](_0x340523[_0x49c4('0x54')],{'raw':!![]})[_0x49c4('0x19')](function(_0x4d49e0){_0x295ad0=_0x4d49e0;return db[_0x49c4('0x34')]['findAll']({'raw':!![]});})[_0x49c4('0x19')](function(_0x264902){var _0x1a5d4c=fs[_0x49c4('0x5d')](path[_0x49c4('0x5e')](config[_0x49c4('0x5f')],_0x49c4('0x60')),_0x49c4('0x61'));var _0x13d951=fs[_0x49c4('0x5d')](path[_0x49c4('0x5e')](config[_0x49c4('0x5f')],_0x49c4('0x62')),_0x49c4('0x61'));var _0x2d5f63=ejs[_0x49c4('0x63')](_0x1a5d4c,{'trunks':_0x264902||[]});fs[_0x49c4('0x64')](_0x49c4('0x65'),_0x2d5f63);if(_0x295ad0['registry']){var _0x5ec201=ejs[_0x49c4('0x63')](_0x13d951,{'trunks':_0x264902||[]});fs[_0x49c4('0x64')]('/etc/asterisk/sip_xcally_registers.conf',_0x5ec201);}})[_0x49c4('0x19')](function(){return respondWithRpcPromise(_0x49c4('0x66'),_0x49c4('0x56'),{'module':_0x49c4('0x67')});})['then'](function(){var _0x5a14a5=_0x340523['user'][_0x49c4('0x2d')]({'plain':!![]});if(!_0x5a14a5)throw new Error(_0x49c4('0x68'));if(_0x5a14a5[_0x49c4('0x58')]===_0x49c4('0x57')){var _0x118fc4=_0x295ad0[_0x49c4('0x2d')]({'plain':!![]});return db[_0x49c4('0x59')][_0x49c4('0x51')]({'where':{'name':_0x49c4('0x2e'),'userProfileId':_0x5a14a5['userProfileId']},'raw':!![]})[_0x49c4('0x19')](function(_0x10fb84){if(_0x10fb84&&_0x10fb84[_0x49c4('0x5b')]===0x0){return db['UserProfileResource'][_0x49c4('0x56')]({'name':_0x118fc4[_0x49c4('0x31')],'resourceId':_0x118fc4['id'],'type':_0x10fb84[_0x49c4('0x31')],'sectionId':_0x10fb84['id']},{})[_0x49c4('0x19')](function(){return _0x295ad0;});}else{return _0x295ad0;}})[_0x49c4('0x4f')](function(_0x2fd749){logger[_0x49c4('0x20')](_0x49c4('0x5c'),_0x2fd749);throw _0x2fd749;});}return _0x295ad0;})['then'](respondWithResult(_0x109b81,0xc9))[_0x49c4('0x4f')](handleError(_0x109b81,null));};exports[_0x49c4('0x69')]=function(_0x85540f,_0x18e82b,_0x1e948a){var _0x4a204d;return db['Trunk'][_0x49c4('0x51')]({'where':{'id':_0x85540f['params']['id']}})[_0x49c4('0x19')](handleEntityNotFound(_0x18e82b,null))['then'](saveUpdates(_0x85540f[_0x49c4('0x54')],null))[_0x49c4('0x19')](function(_0x3b03dd){if(_0x3b03dd){_0x4a204d=_0x3b03dd;return db[_0x49c4('0x34')]['findAll']({'raw':!![]});}})[_0x49c4('0x19')](function(_0x38d7d3){if(_0x38d7d3){var _0x2ceada=fs[_0x49c4('0x5d')](path[_0x49c4('0x5e')](config[_0x49c4('0x5f')],_0x49c4('0x60')),_0x49c4('0x61'));var _0x46477f=fs[_0x49c4('0x5d')](path['join'](config[_0x49c4('0x5f')],_0x49c4('0x62')),'utf8');var _0x15bee0=ejs['render'](_0x2ceada,{'trunks':_0x38d7d3||[]});fs[_0x49c4('0x64')](_0x49c4('0x65'),_0x15bee0);var _0x1f14a6=ejs[_0x49c4('0x63')](_0x46477f,{'trunks':_0x38d7d3||[]});fs[_0x49c4('0x64')]('/etc/asterisk/sip_xcally_registers.conf',_0x1f14a6);return respondWithRpcPromise(_0x49c4('0x66'),_0x49c4('0x69'),{'module':'chan_sip.so'});}return null;})[_0x49c4('0x19')](function(_0x167e41){if(_0x167e41){return _0x4a204d;}})['then'](respondWithResult(_0x18e82b,null))[_0x49c4('0x4f')](handleError(_0x18e82b,null));};exports[_0x49c4('0x2f')]=function(_0x57b137,_0x37fef1,_0x993d00){var _0x25989a;return db[_0x49c4('0x34')]['find']({'where':{'id':_0x57b137[_0x49c4('0x6a')]['id']}})[_0x49c4('0x19')](handleEntityNotFound(_0x37fef1,null))['then'](removeEntity(_0x37fef1,null))[_0x49c4('0x19')](function(){return db['Trunk']['findAll']({'raw':!![]});})[_0x49c4('0x19')](function(_0x507078){var _0x50fd24=fs[_0x49c4('0x5d')](path[_0x49c4('0x5e')](config['root'],_0x49c4('0x60')),'utf8');var _0x578f4b=fs['readFileSync'](path[_0x49c4('0x5e')](config[_0x49c4('0x5f')],_0x49c4('0x62')),_0x49c4('0x61'));var _0x4a5f0b=ejs['render'](_0x50fd24,{'trunks':_0x507078});var _0x348693=ejs['render'](_0x578f4b,{'trunks':_0x507078});fs[_0x49c4('0x64')]('/etc/asterisk/sip_xcally_trunks.conf',_0x4a5f0b);fs[_0x49c4('0x64')](_0x49c4('0x6b'),_0x348693);return respondWithRpcPromise(_0x49c4('0x66'),_0x49c4('0x2f'),{'module':_0x49c4('0x67')});})[_0x49c4('0x4f')](handleError(_0x37fef1,null));}; \ No newline at end of file +var _0x6aa7=['sort','where','filters','pick','filter','merge','VIRTUAL','options','include','findAll','rows','params','length','includeAll','clone','find','get','createdAt','body','omit','updatedAt','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','readFileSync','join','root','server/files/templates/trunk.ejs','render','/etc/asterisk/sip_xcally_trunks.conf','registry','/etc/asterisk/sip_xcally_registers.conf','Reload','chan_sip.so','autoAssociation','update','utf8','server/files/templates/registry.ejs','writeFileSync','eml-format','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','ejs','lodash','squel','crypto','desk.js','to-csv','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','jayson/promise','http','then','Trunk,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','result','catch','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','destroy','Trunks','UserProfileResource','stack','name','index','map','Trunk','rawAttributes','fieldName','type','model','query','keys','attributes','intersection','fields','order'];(function(_0x5692e9,_0x19f211){var _0x17f5dd=function(_0x3c1ffe){while(--_0x3c1ffe){_0x5692e9['push'](_0x5692e9['shift']());}};_0x17f5dd(++_0x19f211);}(_0x6aa7,0x178));var _0x76aa=function(_0x11bb1a,_0x379f75){_0x11bb1a=_0x11bb1a-0x0;var _0x1bcece=_0x6aa7[_0x11bb1a];return _0x1bcece;};'use strict';var emlformat=require(_0x76aa('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x76aa('0x1'));var jsonpatch=require(_0x76aa('0x2'));var rp=require(_0x76aa('0x3'));var moment=require(_0x76aa('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x76aa('0x5'));var util=require(_0x76aa('0x6'));var path=require(_0x76aa('0x7'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x76aa('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x76aa('0x9'));var squel=require(_0x76aa('0xa'));var crypto=require(_0x76aa('0xb'));var jsforce=require('jsforce');var deskjs=require(_0x76aa('0xc'));var toCsv=require(_0x76aa('0xd'));var querystring=require(_0x76aa('0xe'));var Papa=require('papaparse');var Redis=require(_0x76aa('0xf'));var authService=require(_0x76aa('0x10'));var qs=require(_0x76aa('0x11'));var as=require(_0x76aa('0x12'));var hardwareService=require(_0x76aa('0x13'));var logger=require(_0x76aa('0x14'))(_0x76aa('0x15'));var utils=require(_0x76aa('0x16'));var config=require(_0x76aa('0x17'));var licenseUtil=require(_0x76aa('0x18'));var db=require('../../mysqldb')['db'];var jayson=require(_0x76aa('0x19'));var client=jayson['client'][_0x76aa('0x1a')]({'port':0x232a});function respondWithRpcPromise(_0x12dde0,_0x3f8f6b,_0x8e44ed,_0x10432c){return new BPromise(function(_0x4e309f,_0x5f5b59){var _0x2b3b4f=_0x10432c||client;return _0x2b3b4f['request'](_0x12dde0,_0x8e44ed)[_0x76aa('0x1b')](function(_0x319bf1){logger['info'](_0x76aa('0x1c'),_0x3f8f6b,'request\x20sent');logger[_0x76aa('0x1d')]('Trunk,\x20%s,\x20%s,\x20%s',_0x3f8f6b,_0x76aa('0x1e'),JSON[_0x76aa('0x1f')](_0x319bf1));if(_0x319bf1[_0x76aa('0x20')]){if(_0x319bf1[_0x76aa('0x20')][_0x76aa('0x21')]===0x1f4){logger[_0x76aa('0x20')]('Trunk,\x20%s,\x20%s',_0x3f8f6b,_0x319bf1['error'][_0x76aa('0x22')]);return _0x5f5b59(_0x319bf1[_0x76aa('0x20')][_0x76aa('0x22')]);}logger[_0x76aa('0x20')](_0x76aa('0x1c'),_0x3f8f6b,_0x319bf1[_0x76aa('0x20')][_0x76aa('0x22')]);return _0x4e309f(_0x319bf1[_0x76aa('0x20')][_0x76aa('0x22')]);}else{logger['info'](_0x76aa('0x1c'),_0x3f8f6b,_0x76aa('0x1e'));_0x4e309f(_0x319bf1[_0x76aa('0x23')]['message']);}})[_0x76aa('0x24')](function(_0x189cb6){logger[_0x76aa('0x20')](_0x76aa('0x1c'),_0x3f8f6b,_0x189cb6);_0x5f5b59(_0x189cb6);});});}function respondWithStatusCode(_0x29c50c,_0xc1044c){_0xc1044c=_0xc1044c||0xcc;return function(_0x3cd039){if(_0x3cd039){return _0x29c50c[_0x76aa('0x25')](_0xc1044c);}return _0x29c50c[_0x76aa('0x26')](_0xc1044c)[_0x76aa('0x27')]();};}function respondWithResult(_0x37f1ab,_0x26b75e){_0x26b75e=_0x26b75e||0xc8;return function(_0x3599a9){if(_0x3599a9){return _0x37f1ab['status'](_0x26b75e)[_0x76aa('0x28')](_0x3599a9);}};}function respondWithFilteredResult(_0x1d6d15,_0x25c614){return function(_0x2e7ab4){if(_0x2e7ab4){var _0xa1e6=typeof _0x25c614[_0x76aa('0x29')]===_0x76aa('0x2a')&&typeof _0x25c614[_0x76aa('0x2b')]===_0x76aa('0x2a');var _0x1bdc3d=_0x2e7ab4['count'];var _0x3fcb7f=_0xa1e6?0x0:_0x25c614['offset'];var _0x994550=_0xa1e6?_0x2e7ab4[_0x76aa('0x2c')]:_0x25c614[_0x76aa('0x29')]+_0x25c614[_0x76aa('0x2b')];var _0x1eecd9;if(_0x994550>=_0x1bdc3d){_0x994550=_0x1bdc3d;_0x1eecd9=0xc8;}else{_0x1eecd9=0xce;}_0x1d6d15[_0x76aa('0x26')](_0x1eecd9);return _0x1d6d15[_0x76aa('0x2d')](_0x76aa('0x2e'),_0x3fcb7f+'-'+_0x994550+'/'+_0x1bdc3d)[_0x76aa('0x28')](_0x2e7ab4);}return null;};}function patchUpdates(_0x3ea05a){return function(_0x5edcd8){try{jsonpatch[_0x76aa('0x2f')](_0x5edcd8,_0x3ea05a,!![]);}catch(_0x5532c7){return BPromise[_0x76aa('0x30')](_0x5532c7);}return _0x5edcd8[_0x76aa('0x31')]();};}function saveUpdates(_0x458ac3,_0x38ecd1){return function(_0x35a705){if(_0x35a705){return _0x35a705['update'](_0x458ac3)[_0x76aa('0x1b')](function(_0x25a11f){return _0x25a11f;});}return null;};}function removeEntity(_0x5a0f72,_0x2ee338){return function(_0x58d860){if(_0x58d860){return _0x58d860[_0x76aa('0x32')]()['then'](function(){var _0x8479a3=_0x58d860['get']({'plain':!![]});var _0x58f135=_0x76aa('0x33');return db[_0x76aa('0x34')][_0x76aa('0x32')]({'where':{'type':_0x58f135,'resourceId':_0x8479a3['id']}})[_0x76aa('0x1b')](function(){return _0x58d860;});})['then'](function(){_0x5a0f72['status'](0xcc)[_0x76aa('0x27')]();});}};}function handleEntityNotFound(_0x1c7b6f,_0x58127c){return function(_0x23e2fd){if(!_0x23e2fd){_0x1c7b6f[_0x76aa('0x25')](0x194);}return _0x23e2fd;};}function handleError(_0x5b57d8,_0x9ce5f4){_0x9ce5f4=_0x9ce5f4||0x1f4;return function(_0x5c77f1){logger['error'](_0x5c77f1[_0x76aa('0x35')]);if(_0x5c77f1[_0x76aa('0x36')]){delete _0x5c77f1[_0x76aa('0x36')];}_0x5b57d8[_0x76aa('0x26')](_0x9ce5f4)['send'](_0x5c77f1);};}exports[_0x76aa('0x37')]=function(_0x1c22f7,_0x2eea79){var _0x4e131a={},_0x113770={},_0x1638db={'count':0x0,'rows':[]};var _0x2f7726=_[_0x76aa('0x38')](db[_0x76aa('0x39')][_0x76aa('0x3a')],function(_0x878903){return{'name':_0x878903[_0x76aa('0x3b')],'type':_0x878903[_0x76aa('0x3c')]['key']};});_0x113770[_0x76aa('0x3d')]=_[_0x76aa('0x38')](_0x2f7726,_0x76aa('0x36'));_0x113770[_0x76aa('0x3e')]=_[_0x76aa('0x3f')](_0x1c22f7[_0x76aa('0x3e')]);_0x113770['filters']=_['intersection'](_0x113770[_0x76aa('0x3d')],_0x113770[_0x76aa('0x3e')]);_0x4e131a[_0x76aa('0x40')]=_[_0x76aa('0x41')](_0x113770['model'],qs[_0x76aa('0x42')](_0x1c22f7[_0x76aa('0x3e')][_0x76aa('0x42')]));_0x4e131a[_0x76aa('0x40')]=_0x4e131a[_0x76aa('0x40')]['length']?_0x4e131a[_0x76aa('0x40')]:_0x113770['model'];if(!_0x1c22f7[_0x76aa('0x3e')]['hasOwnProperty']('nolimit')){_0x4e131a['limit']=qs[_0x76aa('0x2b')](_0x1c22f7['query']['limit']);_0x4e131a['offset']=qs[_0x76aa('0x29')](_0x1c22f7[_0x76aa('0x3e')][_0x76aa('0x29')]);}_0x4e131a[_0x76aa('0x43')]=qs[_0x76aa('0x44')](_0x1c22f7['query'][_0x76aa('0x44')]);_0x4e131a[_0x76aa('0x45')]=qs[_0x76aa('0x46')](_[_0x76aa('0x47')](_0x1c22f7[_0x76aa('0x3e')],_0x113770['filters']),_0x2f7726);if(_0x1c22f7[_0x76aa('0x3e')][_0x76aa('0x48')]){_0x4e131a['where']=_[_0x76aa('0x49')](_0x4e131a['where'],{'$or':_[_0x76aa('0x38')](_0x2f7726,function(_0x24ea05){if(_0x24ea05[_0x76aa('0x3c')]!==_0x76aa('0x4a')){var _0x2d0bc4={};_0x2d0bc4[_0x24ea05[_0x76aa('0x36')]]={'$like':'%'+_0x1c22f7[_0x76aa('0x3e')][_0x76aa('0x48')]+'%'};return _0x2d0bc4;}})});}_0x4e131a=_[_0x76aa('0x49')]({},_0x4e131a,_0x1c22f7[_0x76aa('0x4b')]);var _0x5e4967={'where':_0x4e131a[_0x76aa('0x45')]};return db['Trunk'][_0x76aa('0x2c')](_0x5e4967)[_0x76aa('0x1b')](function(_0x5e95f5){_0x1638db[_0x76aa('0x2c')]=_0x5e95f5;if(_0x1c22f7['query']['includeAll']){_0x4e131a[_0x76aa('0x4c')]=[{'all':!![]}];}return db['Trunk'][_0x76aa('0x4d')](_0x4e131a);})[_0x76aa('0x1b')](function(_0x4315b3){_0x1638db[_0x76aa('0x4e')]=_0x4315b3;return _0x1638db;})[_0x76aa('0x1b')](respondWithFilteredResult(_0x2eea79,_0x4e131a))[_0x76aa('0x24')](handleError(_0x2eea79,null));};exports['show']=function(_0x564546,_0x2fcf8f){var _0x1eafb2={'raw':![],'where':{'id':_0x564546[_0x76aa('0x4f')]['id']}},_0x1708d4={};_0x1708d4[_0x76aa('0x3d')]=_[_0x76aa('0x3f')](db['Trunk'][_0x76aa('0x3a')]);_0x1708d4[_0x76aa('0x3e')]=_[_0x76aa('0x3f')](_0x564546['query']);_0x1708d4[_0x76aa('0x46')]=_['intersection'](_0x1708d4[_0x76aa('0x3d')],_0x1708d4['query']);_0x1eafb2[_0x76aa('0x40')]=_[_0x76aa('0x41')](_0x1708d4[_0x76aa('0x3d')],qs[_0x76aa('0x42')](_0x564546[_0x76aa('0x3e')][_0x76aa('0x42')]));_0x1eafb2[_0x76aa('0x40')]=_0x1eafb2['attributes'][_0x76aa('0x50')]?_0x1eafb2['attributes']:_0x1708d4[_0x76aa('0x3d')];if(_0x564546[_0x76aa('0x3e')][_0x76aa('0x51')]){_0x1eafb2[_0x76aa('0x4c')]=[{'all':!![]}];}_0x1eafb2=_[_0x76aa('0x49')]({},_0x1eafb2,_0x564546[_0x76aa('0x4b')]);return db[_0x76aa('0x39')]['find'](_0x1eafb2)[_0x76aa('0x1b')](handleEntityNotFound(_0x2fcf8f,null))[_0x76aa('0x1b')](respondWithResult(_0x2fcf8f,null))[_0x76aa('0x24')](handleError(_0x2fcf8f,null));};exports[_0x76aa('0x52')]=function(_0x5c742c,_0xb9401b){var _0x163440={'where':{'id':_0x5c742c[_0x76aa('0x4f')]['id']}},_0x8dc601={};_0x8dc601[_0x76aa('0x3d')]=_[_0x76aa('0x3f')](db['Trunk'][_0x76aa('0x3a')]);_0x163440[_0x76aa('0x40')]=_[_0x76aa('0x41')](_0x8dc601[_0x76aa('0x3d')],qs[_0x76aa('0x42')](_0x5c742c[_0x76aa('0x3e')][_0x76aa('0x42')]));_0x163440['attributes']=_0x163440['attributes'][_0x76aa('0x50')]?_0x163440[_0x76aa('0x40')]:_0x8dc601['model'];if(_0x5c742c[_0x76aa('0x3e')][_0x76aa('0x51')]){_0x163440['include']=[{'all':!![]}];}_0x163440=_[_0x76aa('0x49')]({},_0x163440,_0x5c742c[_0x76aa('0x4b')]);return db[_0x76aa('0x39')][_0x76aa('0x53')](_0x163440)[_0x76aa('0x1b')](handleEntityNotFound(_0xb9401b,null))[_0x76aa('0x1b')](function(_0x3376ec){if(_0x3376ec){var _0x30573a=_0x3376ec[_0x76aa('0x54')]({'plain':!![]});_0x30573a=qs['omit'](_0x30573a,['id',_0x76aa('0x55'),'updatedAt']);_0x5c742c[_0x76aa('0x56')]=_[_0x76aa('0x57')](_0x5c742c[_0x76aa('0x56')],['id',_0x76aa('0x55'),_0x76aa('0x58')]);return db[_0x76aa('0x39')][_0x76aa('0x59')](_[_0x76aa('0x49')](_0x30573a,_0x5c742c[_0x76aa('0x56')]),{'include':_0x5c742c['query'][_0x76aa('0x51')]?[{'all':!![]}]:undefined})[_0x76aa('0x1b')](function(_0x5c542b){var _0xe5957d=_0x5c742c[_0x76aa('0x5a')][_0x76aa('0x54')]({'plain':!![]});if(!_0xe5957d)throw new Error(_0x76aa('0x5b'));if(_0xe5957d[_0x76aa('0x5c')]==='user'){var _0x364d05=_0x5c542b['get']({'plain':!![]});var _0x35bd2b=_0x76aa('0x33');return db[_0x76aa('0x5d')][_0x76aa('0x53')]({'where':{'name':_0x35bd2b,'userProfileId':_0xe5957d[_0x76aa('0x5e')]},'raw':!![]})[_0x76aa('0x1b')](function(_0x2bfb46){if(_0x2bfb46&&_0x2bfb46['autoAssociation']===0x0){return db[_0x76aa('0x34')][_0x76aa('0x59')]({'name':_0x364d05['name'],'resourceId':_0x364d05['id'],'type':_0x2bfb46['name'],'sectionId':_0x2bfb46['id']},{})[_0x76aa('0x1b')](function(){return _0x5c542b;});}else{return _0x5c542b;}})[_0x76aa('0x24')](function(_0x5295a7){logger[_0x76aa('0x20')](_0x76aa('0x5f'),_0x5295a7);throw _0x5295a7;});}return _0x5c542b;});}})[_0x76aa('0x1b')](respondWithResult(_0xb9401b,0xc9))['catch'](handleError(_0xb9401b,null));};exports[_0x76aa('0x59')]=function(_0x47f733,_0xf31e1f,_0x1178e5){var _0x2315cf;return db[_0x76aa('0x39')]['create'](_0x47f733['body'],{'raw':!![]})[_0x76aa('0x1b')](function(_0x4dfeb3){_0x2315cf=_0x4dfeb3;return db[_0x76aa('0x39')][_0x76aa('0x4d')]({'raw':!![]});})[_0x76aa('0x1b')](function(_0x43a2af){var _0x2dd320=fs[_0x76aa('0x60')](path[_0x76aa('0x61')](config[_0x76aa('0x62')],_0x76aa('0x63')),'utf8');var _0x7d02e7=fs[_0x76aa('0x60')](path[_0x76aa('0x61')](config[_0x76aa('0x62')],'server/files/templates/registry.ejs'),'utf8');var _0x557c11=ejs[_0x76aa('0x64')](_0x2dd320,{'trunks':_0x43a2af||[]});fs['writeFileSync'](_0x76aa('0x65'),_0x557c11);if(_0x2315cf[_0x76aa('0x66')]){var _0x38faff=ejs[_0x76aa('0x64')](_0x7d02e7,{'trunks':_0x43a2af||[]});fs['writeFileSync'](_0x76aa('0x67'),_0x38faff);}})['then'](function(){return respondWithRpcPromise(_0x76aa('0x68'),_0x76aa('0x59'),{'module':_0x76aa('0x69')});})[_0x76aa('0x1b')](function(){var _0x1037fb=_0x47f733['user'][_0x76aa('0x54')]({'plain':!![]});if(!_0x1037fb)throw new Error(_0x76aa('0x5b'));if(_0x1037fb[_0x76aa('0x5c')]===_0x76aa('0x5a')){var _0x32c1de=_0x2315cf[_0x76aa('0x54')]({'plain':!![]});return db[_0x76aa('0x5d')][_0x76aa('0x53')]({'where':{'name':'Trunks','userProfileId':_0x1037fb[_0x76aa('0x5e')]},'raw':!![]})[_0x76aa('0x1b')](function(_0x48136a){if(_0x48136a&&_0x48136a[_0x76aa('0x6a')]===0x0){return db[_0x76aa('0x34')][_0x76aa('0x59')]({'name':_0x32c1de[_0x76aa('0x36')],'resourceId':_0x32c1de['id'],'type':_0x48136a[_0x76aa('0x36')],'sectionId':_0x48136a['id']},{})[_0x76aa('0x1b')](function(){return _0x2315cf;});}else{return _0x2315cf;}})[_0x76aa('0x24')](function(_0x5dc923){logger[_0x76aa('0x20')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x5dc923);throw _0x5dc923;});}return _0x2315cf;})['then'](respondWithResult(_0xf31e1f,0xc9))[_0x76aa('0x24')](handleError(_0xf31e1f,null));};exports[_0x76aa('0x6b')]=function(_0x5d8947,_0x5d1de1,_0x36da4d){var _0x14b5a2;return db[_0x76aa('0x39')]['find']({'where':{'id':_0x5d8947['params']['id']}})[_0x76aa('0x1b')](handleEntityNotFound(_0x5d1de1,null))[_0x76aa('0x1b')](saveUpdates(_0x5d8947[_0x76aa('0x56')],null))['then'](function(_0xb70589){if(_0xb70589){_0x14b5a2=_0xb70589;return db['Trunk'][_0x76aa('0x4d')]({'raw':!![]});}})[_0x76aa('0x1b')](function(_0x383290){if(_0x383290){var _0x325ffa=fs[_0x76aa('0x60')](path['join'](config['root'],_0x76aa('0x63')),_0x76aa('0x6c'));var _0x19ebb7=fs['readFileSync'](path[_0x76aa('0x61')](config[_0x76aa('0x62')],_0x76aa('0x6d')),_0x76aa('0x6c'));var _0x303b78=ejs['render'](_0x325ffa,{'trunks':_0x383290||[]});fs[_0x76aa('0x6e')]('/etc/asterisk/sip_xcally_trunks.conf',_0x303b78);var _0x213f7f=ejs[_0x76aa('0x64')](_0x19ebb7,{'trunks':_0x383290||[]});fs[_0x76aa('0x6e')](_0x76aa('0x67'),_0x213f7f);return respondWithRpcPromise(_0x76aa('0x68'),_0x76aa('0x6b'),{'module':'chan_sip.so'});}return null;})['then'](function(_0x547411){if(_0x547411){return _0x14b5a2;}})['then'](respondWithResult(_0x5d1de1,null))['catch'](handleError(_0x5d1de1,null));};exports[_0x76aa('0x32')]=function(_0x22f44f,_0x52c5be,_0x5c2c91){var _0x4f01e9;return db[_0x76aa('0x39')][_0x76aa('0x53')]({'where':{'id':_0x22f44f[_0x76aa('0x4f')]['id']}})['then'](handleEntityNotFound(_0x52c5be,null))['then'](removeEntity(_0x52c5be,null))[_0x76aa('0x1b')](function(){return db[_0x76aa('0x39')][_0x76aa('0x4d')]({'raw':!![]});})[_0x76aa('0x1b')](function(_0x354c7b){var _0x55e526=fs['readFileSync'](path[_0x76aa('0x61')](config['root'],'server/files/templates/trunk.ejs'),'utf8');var _0x4673e6=fs[_0x76aa('0x60')](path['join'](config[_0x76aa('0x62')],_0x76aa('0x6d')),'utf8');var _0x22063f=ejs[_0x76aa('0x64')](_0x55e526,{'trunks':_0x354c7b});var _0x11d91f=ejs[_0x76aa('0x64')](_0x4673e6,{'trunks':_0x354c7b});fs[_0x76aa('0x6e')](_0x76aa('0x65'),_0x22063f);fs[_0x76aa('0x6e')](_0x76aa('0x67'),_0x11d91f);return respondWithRpcPromise(_0x76aa('0x68'),'destroy',{'module':_0x76aa('0x69')});})[_0x76aa('0x24')](handleError(_0x52c5be,null));}; \ No newline at end of file diff --git a/server/api/trunk/trunk.model.js b/server/api/trunk/trunk.model.js index f7b1f34..1e7b69a 100644 --- a/server/api/trunk/trunk.model.js +++ b/server/api/trunk/trunk.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0e5a=['../../config/environment','./trunk.attributes','exports','define','Trunk','tools_trunks','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf'];(function(_0x1e4360,_0x930b9b){var _0x31e6b4=function(_0x49dd8e){while(--_0x49dd8e){_0x1e4360['push'](_0x1e4360['shift']());}};_0x31e6b4(++_0x930b9b);}(_0x0e5a,0x1e6));var _0xa0e5=function(_0x1d4611,_0x3904ad){_0x1d4611=_0x1d4611-0x0;var _0x2845a9=_0x0e5a[_0x1d4611];return _0x2845a9;};'use strict';var _=require(_0xa0e5('0x0'));var util=require(_0xa0e5('0x1'));var logger=require(_0xa0e5('0x2'))(_0xa0e5('0x3'));var moment=require(_0xa0e5('0x4'));var BPromise=require(_0xa0e5('0x5'));var rp=require(_0xa0e5('0x6'));var fs=require('fs');var path=require(_0xa0e5('0x7'));var rimraf=require(_0xa0e5('0x8'));var config=require(_0xa0e5('0x9'));var attributes=require(_0xa0e5('0xa'));module[_0xa0e5('0xb')]=function(_0x4ac897,_0xeeddba){return _0x4ac897[_0xa0e5('0xc')](_0xa0e5('0xd'),attributes,{'tableName':_0xa0e5('0xe'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x95dd=['moment','request-promise','path','../../config/environment','./trunk.attributes','exports','define','Trunk','tools_trunks','util','api'];(function(_0x3102af,_0x137b65){var _0x3c208c=function(_0x5d88ee){while(--_0x5d88ee){_0x3102af['push'](_0x3102af['shift']());}};_0x3c208c(++_0x137b65);}(_0x95dd,0x1ab));var _0xd95d=function(_0x3ae7eb,_0x459ee3){_0x3ae7eb=_0x3ae7eb-0x0;var _0x515c37=_0x95dd[_0x3ae7eb];return _0x515c37;};'use strict';var _=require('lodash');var util=require(_0xd95d('0x0'));var logger=require('../../config/logger')(_0xd95d('0x1'));var moment=require(_0xd95d('0x2'));var BPromise=require('bluebird');var rp=require(_0xd95d('0x3'));var fs=require('fs');var path=require(_0xd95d('0x4'));var rimraf=require('rimraf');var config=require(_0xd95d('0x5'));var attributes=require(_0xd95d('0x6'));module[_0xd95d('0x7')]=function(_0x2ddc8d,_0x356fe8){return _0x2ddc8d[_0xd95d('0x8')](_0xd95d('0x9'),attributes,{'tableName':_0xd95d('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/trunk/trunk.rpc.js b/server/api/trunk/trunk.rpc.js index 25e057a..33f486c 100644 --- a/server/api/trunk/trunk.rpc.js +++ b/server/api/trunk/trunk.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe968=['debug','stringify','error','Trunk,\x20%s,\x20%s','message','result','GetTrunk','Trunk','findAll','raw','options','attributes','limit','include','map','model','catch','ShowTrunk','find','where','lodash','util','moment','bluebird','randomstring','ioredis','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent'];(function(_0x59881a,_0x5ef668){var _0x33a221=function(_0x396188){while(--_0x396188){_0x59881a['push'](_0x59881a['shift']());}};_0x33a221(++_0x5ef668);}(_0xe968,0x110));var _0x8e96=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xe968[_0x14add3];return _0x4a174f;};'use strict';var _=require(_0x8e96('0x0'));var util=require(_0x8e96('0x1'));var moment=require(_0x8e96('0x2'));var BPromise=require(_0x8e96('0x3'));var rs=require(_0x8e96('0x4'));var fs=require('fs');var Redis=require(_0x8e96('0x5'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x8e96('0x6'))(_0x8e96('0x7'));var config=require(_0x8e96('0x8'));var jayson=require(_0x8e96('0x9'));var client=jayson[_0x8e96('0xa')][_0x8e96('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x13381e,_0x53befb,_0x2e815b){return new BPromise(function(_0x145578,_0x3812a2){return client[_0x8e96('0xc')](_0x13381e,_0x2e815b)[_0x8e96('0xd')](function(_0xdfa873){logger[_0x8e96('0xe')]('Trunk,\x20%s,\x20%s',_0x53befb,_0x8e96('0xf'));logger[_0x8e96('0x10')]('Trunk,\x20%s,\x20%s,\x20%s',_0x53befb,_0x8e96('0xf'),JSON[_0x8e96('0x11')](_0xdfa873));if(_0xdfa873[_0x8e96('0x12')]){if(_0xdfa873[_0x8e96('0x12')]['code']===0x1f4){logger[_0x8e96('0x12')](_0x8e96('0x13'),_0x53befb,_0xdfa873[_0x8e96('0x12')][_0x8e96('0x14')]);return _0x3812a2(_0xdfa873[_0x8e96('0x12')][_0x8e96('0x14')]);}logger[_0x8e96('0x12')](_0x8e96('0x13'),_0x53befb,_0xdfa873[_0x8e96('0x12')]['message']);return _0x145578(_0xdfa873[_0x8e96('0x12')][_0x8e96('0x14')]);}else{logger['info']('Trunk,\x20%s,\x20%s',_0x53befb,_0x8e96('0xf'));_0x145578(_0xdfa873[_0x8e96('0x15')][_0x8e96('0x14')]);}})['catch'](function(_0x5d3cf5){logger[_0x8e96('0x12')](_0x8e96('0x13'),_0x53befb,_0x5d3cf5);_0x3812a2(_0x5d3cf5);});});}exports[_0x8e96('0x16')]=function(_0x3d1da1){var _0x3aad8e=this;return new Promise(function(_0x36fa44,_0x57fe9e){return db[_0x8e96('0x17')][_0x8e96('0x18')]({'raw':_0x3d1da1['options']?_0x3d1da1['options'][_0x8e96('0x19')]===undefined?!![]:![]:!![],'where':_0x3d1da1[_0x8e96('0x1a')]?_0x3d1da1[_0x8e96('0x1a')]['where']||null:null,'attributes':_0x3d1da1[_0x8e96('0x1a')]?_0x3d1da1[_0x8e96('0x1a')][_0x8e96('0x1b')]||null:null,'limit':_0x3d1da1[_0x8e96('0x1a')]?_0x3d1da1[_0x8e96('0x1a')][_0x8e96('0x1c')]||null:null,'include':_0x3d1da1[_0x8e96('0x1a')]?_0x3d1da1[_0x8e96('0x1a')][_0x8e96('0x1d')]?_[_0x8e96('0x1e')](_0x3d1da1[_0x8e96('0x1a')][_0x8e96('0x1d')],function(_0xe29615){return{'model':db[_0xe29615['model']],'as':_0xe29615['as'],'attributes':_0xe29615[_0x8e96('0x1b')],'include':_0xe29615[_0x8e96('0x1d')]?_['map'](_0xe29615[_0x8e96('0x1d')],function(_0x521ca1){return{'model':db[_0x521ca1['model']],'as':_0x521ca1['as'],'attributes':_0x521ca1[_0x8e96('0x1b')],'include':_0x521ca1['include']?_[_0x8e96('0x1e')](_0x521ca1['include'],function(_0x248f58){return{'model':db[_0x248f58[_0x8e96('0x1f')]],'as':_0x248f58['as'],'attributes':_0x248f58[_0x8e96('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x8e96('0xd')](function(_0x3da946){logger['info'](_0x8e96('0x16'),_0x3d1da1);logger[_0x8e96('0x10')]('GetTrunk',_0x3d1da1,JSON['stringify'](_0x3da946));_0x36fa44(_0x3da946);})[_0x8e96('0x20')](function(_0x537380){logger[_0x8e96('0x12')](_0x8e96('0x16'),_0x537380[_0x8e96('0x14')],_0x3d1da1);_0x57fe9e(_0x3aad8e[_0x8e96('0x12')](0x1f4,_0x537380['message']));});});};exports[_0x8e96('0x21')]=function(_0x34a092){var _0x37c8ca=this;return new Promise(function(_0x220bb7,_0x306590){return db[_0x8e96('0x17')][_0x8e96('0x22')]({'raw':_0x34a092[_0x8e96('0x1a')]?_0x34a092[_0x8e96('0x1a')][_0x8e96('0x19')]===undefined?!![]:![]:!![],'where':_0x34a092[_0x8e96('0x1a')]?_0x34a092[_0x8e96('0x1a')][_0x8e96('0x23')]||null:null,'attributes':_0x34a092['options']?_0x34a092['options']['attributes']||null:null,'include':_0x34a092['options']?_0x34a092['options'][_0x8e96('0x1d')]?_[_0x8e96('0x1e')](_0x34a092[_0x8e96('0x1a')][_0x8e96('0x1d')],function(_0x5e71b6){return{'model':db[_0x5e71b6[_0x8e96('0x1f')]],'as':_0x5e71b6['as'],'attributes':_0x5e71b6[_0x8e96('0x1b')],'include':_0x5e71b6[_0x8e96('0x1d')]?_[_0x8e96('0x1e')](_0x5e71b6['include'],function(_0x1215c1){return{'model':db[_0x1215c1[_0x8e96('0x1f')]],'as':_0x1215c1['as'],'attributes':_0x1215c1[_0x8e96('0x1b')],'include':_0x1215c1[_0x8e96('0x1d')]?_[_0x8e96('0x1e')](_0x1215c1[_0x8e96('0x1d')],function(_0x1433da){return{'model':db[_0x1433da[_0x8e96('0x1f')]],'as':_0x1433da['as'],'attributes':_0x1433da[_0x8e96('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x8e96('0xd')](function(_0x1ac663){logger[_0x8e96('0xe')](_0x8e96('0x21'),_0x34a092);logger[_0x8e96('0x10')]('ShowTrunk',_0x34a092,JSON[_0x8e96('0x11')](_0x1ac663));_0x220bb7(_0x1ac663);})[_0x8e96('0x20')](function(_0x513453){logger['error'](_0x8e96('0x21'),_0x513453[_0x8e96('0x14')],_0x34a092);_0x306590(_0x37c8ca['error'](0x1f4,_0x513453[_0x8e96('0x14')]));});});}; \ No newline at end of file +var _0xad05=['../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','Trunk,\x20%s,\x20%s','request\x20sent','Trunk,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','GetTrunk','findAll','options','raw','where','include','map','model','attributes','debug','ShowTrunk','find','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x4d8666,_0x2ff19d){var _0x37175b=function(_0x1b8de6){while(--_0x1b8de6){_0x4d8666['push'](_0x4d8666['shift']());}};_0x37175b(++_0x2ff19d);}(_0xad05,0x1cc));var _0x5ad0=function(_0x1caf6a,_0x26a5bf){_0x1caf6a=_0x1caf6a-0x0;var _0x1bf493=_0xad05[_0x1caf6a];return _0x1bf493;};'use strict';var _=require(_0x5ad0('0x0'));var util=require(_0x5ad0('0x1'));var moment=require(_0x5ad0('0x2'));var BPromise=require(_0x5ad0('0x3'));var rs=require(_0x5ad0('0x4'));var fs=require('fs');var Redis=require(_0x5ad0('0x5'));var db=require(_0x5ad0('0x6'))['db'];var utils=require(_0x5ad0('0x7'));var logger=require(_0x5ad0('0x8'))(_0x5ad0('0x9'));var config=require(_0x5ad0('0xa'));var jayson=require(_0x5ad0('0xb'));var client=jayson['client'][_0x5ad0('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x5786f2,_0x1e2f15,_0x19f321){return new BPromise(function(_0x43a31f,_0x219c38){return client[_0x5ad0('0xd')](_0x5786f2,_0x19f321)[_0x5ad0('0xe')](function(_0x14cb8f){logger[_0x5ad0('0xf')](_0x5ad0('0x10'),_0x1e2f15,_0x5ad0('0x11'));logger['debug'](_0x5ad0('0x12'),_0x1e2f15,_0x5ad0('0x11'),JSON[_0x5ad0('0x13')](_0x14cb8f));if(_0x14cb8f[_0x5ad0('0x14')]){if(_0x14cb8f[_0x5ad0('0x14')][_0x5ad0('0x15')]===0x1f4){logger[_0x5ad0('0x14')](_0x5ad0('0x10'),_0x1e2f15,_0x14cb8f[_0x5ad0('0x14')]['message']);return _0x219c38(_0x14cb8f[_0x5ad0('0x14')]['message']);}logger[_0x5ad0('0x14')](_0x5ad0('0x10'),_0x1e2f15,_0x14cb8f[_0x5ad0('0x14')]['message']);return _0x43a31f(_0x14cb8f[_0x5ad0('0x14')][_0x5ad0('0x16')]);}else{logger[_0x5ad0('0xf')]('Trunk,\x20%s,\x20%s',_0x1e2f15,_0x5ad0('0x11'));_0x43a31f(_0x14cb8f['result'][_0x5ad0('0x16')]);}})[_0x5ad0('0x17')](function(_0x79f6e4){logger[_0x5ad0('0x14')](_0x5ad0('0x10'),_0x1e2f15,_0x79f6e4);_0x219c38(_0x79f6e4);});});}exports[_0x5ad0('0x18')]=function(_0x11e511){var _0x599864=this;return new Promise(function(_0x514848,_0x5abf48){return db['Trunk'][_0x5ad0('0x19')]({'raw':_0x11e511[_0x5ad0('0x1a')]?_0x11e511['options'][_0x5ad0('0x1b')]===undefined?!![]:![]:!![],'where':_0x11e511[_0x5ad0('0x1a')]?_0x11e511[_0x5ad0('0x1a')][_0x5ad0('0x1c')]||null:null,'attributes':_0x11e511[_0x5ad0('0x1a')]?_0x11e511[_0x5ad0('0x1a')]['attributes']||null:null,'limit':_0x11e511[_0x5ad0('0x1a')]?_0x11e511[_0x5ad0('0x1a')]['limit']||null:null,'include':_0x11e511[_0x5ad0('0x1a')]?_0x11e511[_0x5ad0('0x1a')][_0x5ad0('0x1d')]?_[_0x5ad0('0x1e')](_0x11e511[_0x5ad0('0x1a')][_0x5ad0('0x1d')],function(_0x19150b){return{'model':db[_0x19150b[_0x5ad0('0x1f')]],'as':_0x19150b['as'],'attributes':_0x19150b[_0x5ad0('0x20')],'include':_0x19150b[_0x5ad0('0x1d')]?_['map'](_0x19150b[_0x5ad0('0x1d')],function(_0xd09711){return{'model':db[_0xd09711['model']],'as':_0xd09711['as'],'attributes':_0xd09711[_0x5ad0('0x20')],'include':_0xd09711[_0x5ad0('0x1d')]?_[_0x5ad0('0x1e')](_0xd09711[_0x5ad0('0x1d')],function(_0x15f35e){return{'model':db[_0x15f35e[_0x5ad0('0x1f')]],'as':_0x15f35e['as'],'attributes':_0x15f35e[_0x5ad0('0x20')]};}):[]};}):[]};}):[]:[]})[_0x5ad0('0xe')](function(_0x1f1643){logger[_0x5ad0('0xf')](_0x5ad0('0x18'),_0x11e511);logger[_0x5ad0('0x21')](_0x5ad0('0x18'),_0x11e511,JSON['stringify'](_0x1f1643));_0x514848(_0x1f1643);})['catch'](function(_0xfb1731){logger[_0x5ad0('0x14')](_0x5ad0('0x18'),_0xfb1731[_0x5ad0('0x16')],_0x11e511);_0x5abf48(_0x599864[_0x5ad0('0x14')](0x1f4,_0xfb1731['message']));});});};exports[_0x5ad0('0x22')]=function(_0x23d4c9){var _0x588c09=this;return new Promise(function(_0x64ecf3,_0x1ba969){return db['Trunk'][_0x5ad0('0x23')]({'raw':_0x23d4c9['options']?_0x23d4c9[_0x5ad0('0x1a')]['raw']===undefined?!![]:![]:!![],'where':_0x23d4c9[_0x5ad0('0x1a')]?_0x23d4c9['options'][_0x5ad0('0x1c')]||null:null,'attributes':_0x23d4c9[_0x5ad0('0x1a')]?_0x23d4c9[_0x5ad0('0x1a')][_0x5ad0('0x20')]||null:null,'include':_0x23d4c9['options']?_0x23d4c9[_0x5ad0('0x1a')][_0x5ad0('0x1d')]?_[_0x5ad0('0x1e')](_0x23d4c9[_0x5ad0('0x1a')][_0x5ad0('0x1d')],function(_0x591bff){return{'model':db[_0x591bff[_0x5ad0('0x1f')]],'as':_0x591bff['as'],'attributes':_0x591bff['attributes'],'include':_0x591bff[_0x5ad0('0x1d')]?_[_0x5ad0('0x1e')](_0x591bff[_0x5ad0('0x1d')],function(_0x3f42ea){return{'model':db[_0x3f42ea[_0x5ad0('0x1f')]],'as':_0x3f42ea['as'],'attributes':_0x3f42ea[_0x5ad0('0x20')],'include':_0x3f42ea['include']?_[_0x5ad0('0x1e')](_0x3f42ea[_0x5ad0('0x1d')],function(_0x300644){return{'model':db[_0x300644[_0x5ad0('0x1f')]],'as':_0x300644['as'],'attributes':_0x300644[_0x5ad0('0x20')]};}):[]};}):[]};}):[]:[]})[_0x5ad0('0xe')](function(_0x10e738){logger[_0x5ad0('0xf')](_0x5ad0('0x22'),_0x23d4c9);logger[_0x5ad0('0x21')](_0x5ad0('0x22'),_0x23d4c9,JSON[_0x5ad0('0x13')](_0x10e738));_0x64ecf3(_0x10e738);})[_0x5ad0('0x17')](function(_0x4fa3d8){logger[_0x5ad0('0x14')](_0x5ad0('0x22'),_0x4fa3d8[_0x5ad0('0x16')],_0x23d4c9);_0x1ba969(_0x588c09[_0x5ad0('0x14')](0x1f4,_0x4fa3d8[_0x5ad0('0x16')]));});});}; \ No newline at end of file diff --git a/server/api/user/index.js b/server/api/user/index.js index 42ac33e..9f94185 100644 --- a/server/api/user/index.js +++ b/server/api/user/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7ff9=['util','path','express','Router','../../components/interaction/service','../../config/environment','./user.controller','get','isAuthenticated','index','/whoami','whoami','getPresence','/:id','show','/:id/avatar','getAvatar','getOpenTabs','/:id/contacts','getContacts','getQueues','getVoiceQueuesRt','/:id/groups','getGroups','/:id/screen_recordings','getScreenRecordings','/:id/chat/interactions','getChatInteractions','/:id/openchannel/interactions','getOpenchannelInteractions','/:id/mail/interactions','getMailInteractions','/:id/sms/interactions','getSmsInteractions','/:id/fax/interactions','/:id/whatsapp/interactions','getWhatsappInteractions','getTeams','/:id/lists','getLists','/:id/prefixes','getVoicePrefixes','/:id/fax_accounts','getFaxAccounts','/:id/mail_accounts','/:id/openchannel_accounts','getOpenchannelAccounts','/:id/sms_accounts','getSmsAccounts','/:id/chat_websites','getChatWebsites','/:id/whatsapp_accounts','getWhatsappAccounts','/:id/square_projects','getSquareProjects','/:id/scheduled_calls','/:id/api_key','getApiKey','post','addContacts','create','bulkCreate','addQueues','diskStorage','format','%s-%s','now','single','file','addAvatar','login','/:id/logout','logout','pause','/:id/unpause','unpause','/:id/teams','addTeams','/:id/chat_interactions','addChatInteractions','addMailInteractions','addSmsInteractions','/:id/openchannel_interactions','addOpenchannelInteractions','/:id/whatsapp_interactions','addFaxAccounts','addSmsAccounts','addChatWebsites','addWhatsappAccounts','addSquareProjects','createApiKey','update','put','/:id/password','/:id/queues','removeQueues','delete','removeTeams','destroy','removeChatInteractions','/:id/mail_interactions','/:id/fax_interactions','removeFaxInteractions','/:id/sms_interactions','removeSmsInteractions','removeOpenchannelInteractions','removeWhatsappInteractions','removeFaxAccounts','removeMailAccounts','removeOpenchannelAccounts','removeSmsAccounts','removeChatWebsites','removeWhatsappAccounts','removeSquareProjects','removeApiKey','exports','multer'];(function(_0x10be05,_0x3a0018){var _0x40aad1=function(_0x54e3c3){while(--_0x54e3c3){_0x10be05['push'](_0x10be05['shift']());}};_0x40aad1(++_0x3a0018);}(_0x7ff9,0x15e));var _0x97ff=function(_0x2c83f1,_0x2705a1){_0x2c83f1=_0x2c83f1-0x0;var _0x4e6f03=_0x7ff9[_0x2c83f1];return _0x4e6f03;};'use strict';var multer=require(_0x97ff('0x0'));var util=require(_0x97ff('0x1'));var path=require(_0x97ff('0x2'));var timeout=require('connect-timeout');var express=require(_0x97ff('0x3'));var router=express[_0x97ff('0x4')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0x97ff('0x5'));var config=require(_0x97ff('0x6'));var controller=require(_0x97ff('0x7'));router[_0x97ff('0x8')]('/',auth[_0x97ff('0x9')](),controller[_0x97ff('0xa')]);router[_0x97ff('0x8')]('/describe',auth[_0x97ff('0x9')](),controller['describe']);router[_0x97ff('0x8')](_0x97ff('0xb'),auth['isAuthenticated'](),controller[_0x97ff('0xc')]);router[_0x97ff('0x8')]('/presence',auth['isAuthenticated'](),controller[_0x97ff('0xd')]);router[_0x97ff('0x8')](_0x97ff('0xe'),auth[_0x97ff('0x9')](),controller[_0x97ff('0xf')]);router['get'](_0x97ff('0x10'),controller[_0x97ff('0x11')]);router[_0x97ff('0x8')]('/:id/open_tabs',auth[_0x97ff('0x9')](),controller[_0x97ff('0x12')]);router[_0x97ff('0x8')](_0x97ff('0x13'),auth[_0x97ff('0x9')](),controller[_0x97ff('0x14')]);router['get']('/:id/queues',auth[_0x97ff('0x9')](),controller[_0x97ff('0x15')]);router['get']('/:id/queues_rt',auth[_0x97ff('0x9')](),controller[_0x97ff('0x16')]);router[_0x97ff('0x8')](_0x97ff('0x17'),auth[_0x97ff('0x9')](),controller[_0x97ff('0x18')]);router['get']('/:id/recordings',auth[_0x97ff('0x9')](),controller['getRecordings']);router[_0x97ff('0x8')](_0x97ff('0x19'),auth[_0x97ff('0x9')](),controller[_0x97ff('0x1a')]);router['get'](_0x97ff('0x1b'),auth[_0x97ff('0x9')](),controller[_0x97ff('0x1c')]);router[_0x97ff('0x8')](_0x97ff('0x1d'),auth[_0x97ff('0x9')](),controller[_0x97ff('0x1e')]);router[_0x97ff('0x8')](_0x97ff('0x1f'),auth[_0x97ff('0x9')](),controller[_0x97ff('0x20')]);router['get'](_0x97ff('0x21'),auth[_0x97ff('0x9')](),controller[_0x97ff('0x22')]);router[_0x97ff('0x8')](_0x97ff('0x23'),auth[_0x97ff('0x9')](),controller['getFaxInteractions']);router[_0x97ff('0x8')](_0x97ff('0x24'),auth[_0x97ff('0x9')](),controller[_0x97ff('0x25')]);router[_0x97ff('0x8')]('/:id/teams',auth[_0x97ff('0x9')](),controller[_0x97ff('0x26')]);router[_0x97ff('0x8')](_0x97ff('0x27'),auth[_0x97ff('0x9')](),controller[_0x97ff('0x28')]);router[_0x97ff('0x8')]('/:id/agents',auth[_0x97ff('0x9')](),controller['getAgents']);router[_0x97ff('0x8')](_0x97ff('0x29'),auth['isAuthenticated'](),controller[_0x97ff('0x2a')]);router['get'](_0x97ff('0x2b'),auth[_0x97ff('0x9')](),controller[_0x97ff('0x2c')]);router['get'](_0x97ff('0x2d'),auth[_0x97ff('0x9')](),controller['getMailAccounts']);router[_0x97ff('0x8')](_0x97ff('0x2e'),auth[_0x97ff('0x9')](),controller[_0x97ff('0x2f')]);router[_0x97ff('0x8')](_0x97ff('0x30'),auth['isAuthenticated'](),controller[_0x97ff('0x31')]);router[_0x97ff('0x8')](_0x97ff('0x32'),auth[_0x97ff('0x9')](),controller[_0x97ff('0x33')]);router[_0x97ff('0x8')](_0x97ff('0x34'),auth['isAuthenticated'](),controller[_0x97ff('0x35')]);router[_0x97ff('0x8')](_0x97ff('0x36'),auth['isAuthenticated'](),controller[_0x97ff('0x37')]);router['get'](_0x97ff('0x38'),auth[_0x97ff('0x9')](),controller['getScheduledCalls']);router['get'](_0x97ff('0x39'),auth[_0x97ff('0x9')](),controller[_0x97ff('0x3a')]);router[_0x97ff('0x3b')]('/:id/contacts',auth[_0x97ff('0x9')](),controller[_0x97ff('0x3c')]);router['post']('/',auth[_0x97ff('0x9')](),controller[_0x97ff('0x3d')]);router['post']('/create_many',auth[_0x97ff('0x9')](),controller[_0x97ff('0x3e')]);router[_0x97ff('0x3b')]('/:id/queues',auth[_0x97ff('0x9')](),controller[_0x97ff('0x3f')]);var upload=multer({'storage':multer[_0x97ff('0x40')]({'destination':function(_0x3d2c51,_0x2af2f3,_0x184096){_0x184096(null,path['join'](config['root'],'server/files/images/'));},'filename':function(_0x3a04e5,_0x1d04ef,_0x42ce27){_0x42ce27(null,util[_0x97ff('0x41')](_0x97ff('0x42'),Date[_0x97ff('0x43')](),_0x1d04ef['originalname']));}})});router[_0x97ff('0x3b')](_0x97ff('0x10'),upload[_0x97ff('0x44')](_0x97ff('0x45')),controller[_0x97ff('0x46')]);router[_0x97ff('0x3b')]('/:id/login',auth[_0x97ff('0x9')](),controller[_0x97ff('0x47')]);router['post'](_0x97ff('0x48'),auth[_0x97ff('0x9')](),controller[_0x97ff('0x49')]);router[_0x97ff('0x3b')]('/:id/pause',auth['isAuthenticated'](),controller[_0x97ff('0x4a')]);router[_0x97ff('0x3b')](_0x97ff('0x4b'),auth[_0x97ff('0x9')](),controller[_0x97ff('0x4c')]);router['post'](_0x97ff('0x4d'),auth[_0x97ff('0x9')](),controller[_0x97ff('0x4e')]);router[_0x97ff('0x3b')](_0x97ff('0x4f'),auth['isAuthenticated'](),controller[_0x97ff('0x50')]);router[_0x97ff('0x3b')]('/:id/mail_interactions',auth['isAuthenticated'](),controller[_0x97ff('0x51')]);router[_0x97ff('0x3b')]('/:id/fax_interactions',auth[_0x97ff('0x9')](),controller['addFaxInteractions']);router['post']('/:id/sms_interactions',auth['isAuthenticated'](),controller[_0x97ff('0x52')]);router[_0x97ff('0x3b')](_0x97ff('0x53'),auth[_0x97ff('0x9')](),controller[_0x97ff('0x54')]);router[_0x97ff('0x3b')](_0x97ff('0x55'),auth['isAuthenticated'](),controller['addWhatsappInteractions']);router[_0x97ff('0x3b')](_0x97ff('0x2b'),auth[_0x97ff('0x9')](),controller[_0x97ff('0x56')]);router[_0x97ff('0x3b')]('/:id/mail_accounts',auth['isAuthenticated'](),controller['addMailAccounts']);router['post'](_0x97ff('0x2e'),auth[_0x97ff('0x9')](),controller['addOpenchannelAccounts']);router['post']('/:id/sms_accounts',auth[_0x97ff('0x9')](),controller[_0x97ff('0x57')]);router[_0x97ff('0x3b')]('/:id/chat_websites',auth[_0x97ff('0x9')](),controller[_0x97ff('0x58')]);router['post'](_0x97ff('0x34'),auth[_0x97ff('0x9')](),controller[_0x97ff('0x59')]);router['post']('/:id/square_projects',auth['isAuthenticated'](),controller[_0x97ff('0x5a')]);router['post'](_0x97ff('0x39'),auth[_0x97ff('0x9')](),controller[_0x97ff('0x5b')]);router['put']('/:id',auth[_0x97ff('0x9')](),controller[_0x97ff('0x5c')]);router[_0x97ff('0x5d')](_0x97ff('0x5e'),auth['isAuthenticated'](),controller['changePassword']);router['delete'](_0x97ff('0x5f'),auth['isAuthenticated'](),controller[_0x97ff('0x60')]);router[_0x97ff('0x61')](_0x97ff('0x4d'),auth[_0x97ff('0x9')](),controller[_0x97ff('0x62')]);router[_0x97ff('0x61')](_0x97ff('0xe'),auth['isAuthenticated'](),controller[_0x97ff('0x63')]);router[_0x97ff('0x61')](_0x97ff('0x4f'),auth[_0x97ff('0x9')](),controller[_0x97ff('0x64')]);router['delete'](_0x97ff('0x65'),auth[_0x97ff('0x9')](),controller['removeMailInteractions']);router[_0x97ff('0x61')](_0x97ff('0x66'),auth['isAuthenticated'](),controller[_0x97ff('0x67')]);router['delete'](_0x97ff('0x68'),auth[_0x97ff('0x9')](),controller[_0x97ff('0x69')]);router[_0x97ff('0x61')](_0x97ff('0x53'),auth['isAuthenticated'](),controller[_0x97ff('0x6a')]);router[_0x97ff('0x61')](_0x97ff('0x55'),auth['isAuthenticated'](),controller[_0x97ff('0x6b')]);router[_0x97ff('0x61')](_0x97ff('0x2b'),auth[_0x97ff('0x9')](),controller[_0x97ff('0x6c')]);router[_0x97ff('0x61')](_0x97ff('0x2d'),auth[_0x97ff('0x9')](),controller[_0x97ff('0x6d')]);router[_0x97ff('0x61')](_0x97ff('0x2e'),auth['isAuthenticated'](),controller[_0x97ff('0x6e')]);router[_0x97ff('0x61')](_0x97ff('0x30'),auth[_0x97ff('0x9')](),controller[_0x97ff('0x6f')]);router[_0x97ff('0x61')](_0x97ff('0x32'),auth[_0x97ff('0x9')](),controller[_0x97ff('0x70')]);router[_0x97ff('0x61')](_0x97ff('0x34'),auth[_0x97ff('0x9')](),controller[_0x97ff('0x71')]);router['delete'](_0x97ff('0x36'),auth[_0x97ff('0x9')](),controller[_0x97ff('0x72')]);router[_0x97ff('0x61')](_0x97ff('0x39'),auth[_0x97ff('0x9')](),controller[_0x97ff('0x73')]);module[_0x97ff('0x74')]=router; \ No newline at end of file +var _0xab2d=['unpause','/:id/chat_interactions','/:id/mail_interactions','/:id/fax_interactions','addFaxInteractions','/:id/sms_interactions','addSmsInteractions','/:id/openchannel_interactions','addOpenchannelInteractions','addWhatsappInteractions','addFaxAccounts','/:id/mail_accounts','addMailAccounts','addOpenchannelAccounts','/:id/chat_websites','addChatWebsites','addWhatsappAccounts','addSquareProjects','createApiKey','put','update','changePassword','delete','removeTeams','destroy','removeChatInteractions','removeMailInteractions','removeFaxInteractions','removeSmsInteractions','removeOpenchannelInteractions','/:id/whatsapp_interactions','removeWhatsappInteractions','removeFaxAccounts','removeMailAccounts','removeOpenchannelAccounts','removeSmsAccounts','removeChatWebsites','removeWhatsappAccounts','removeSquareProjects','exports','util','path','connect-timeout','Router','../../config/environment','./user.controller','isAuthenticated','index','/describe','describe','get','whoami','getPresence','/:id','show','/:id/avatar','getAvatar','/:id/open_tabs','getOpenTabs','/:id/contacts','getContacts','/:id/queues','getQueues','/:id/queues_rt','getGroups','/:id/recordings','getRecordings','/:id/screen_recordings','getScreenRecordings','/:id/chat/interactions','getChatInteractions','getOpenchannelInteractions','/:id/mail/interactions','/:id/sms/interactions','getSmsInteractions','getFaxInteractions','/:id/whatsapp/interactions','getWhatsappInteractions','/:id/teams','getTeams','/:id/lists','getLists','/:id/agents','getAgents','/:id/prefixes','/:id/fax_accounts','/:id/openchannel_accounts','/:id/sms_accounts','getSmsAccounts','getChatWebsites','/:id/whatsapp_accounts','getWhatsappAccounts','/:id/square_projects','getSquareProjects','getScheduledCalls','/:id/api_key','getApiKey','post','create','bulkCreate','addQueues','diskStorage','root','server/files/images/','format','now','originalname','single','file','addAvatar','/:id/login','login','logout','pause','/:id/unpause'];(function(_0x53cdf4,_0x3b91a1){var _0x41ca5a=function(_0x432960){while(--_0x432960){_0x53cdf4['push'](_0x53cdf4['shift']());}};_0x41ca5a(++_0x3b91a1);}(_0xab2d,0x10e));var _0xdab2=function(_0x43415c,_0x1e76fd){_0x43415c=_0x43415c-0x0;var _0x3aa351=_0xab2d[_0x43415c];return _0x3aa351;};'use strict';var multer=require('multer');var util=require(_0xdab2('0x0'));var path=require(_0xdab2('0x1'));var timeout=require(_0xdab2('0x2'));var express=require('express');var router=express[_0xdab2('0x3')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0xdab2('0x4'));var controller=require(_0xdab2('0x5'));router['get']('/',auth[_0xdab2('0x6')](),controller[_0xdab2('0x7')]);router['get'](_0xdab2('0x8'),auth[_0xdab2('0x6')](),controller[_0xdab2('0x9')]);router[_0xdab2('0xa')]('/whoami',auth[_0xdab2('0x6')](),controller[_0xdab2('0xb')]);router[_0xdab2('0xa')]('/presence',auth[_0xdab2('0x6')](),controller[_0xdab2('0xc')]);router[_0xdab2('0xa')](_0xdab2('0xd'),auth[_0xdab2('0x6')](),controller[_0xdab2('0xe')]);router[_0xdab2('0xa')](_0xdab2('0xf'),controller[_0xdab2('0x10')]);router[_0xdab2('0xa')](_0xdab2('0x11'),auth[_0xdab2('0x6')](),controller[_0xdab2('0x12')]);router[_0xdab2('0xa')](_0xdab2('0x13'),auth[_0xdab2('0x6')](),controller[_0xdab2('0x14')]);router['get'](_0xdab2('0x15'),auth[_0xdab2('0x6')](),controller[_0xdab2('0x16')]);router[_0xdab2('0xa')](_0xdab2('0x17'),auth[_0xdab2('0x6')](),controller['getVoiceQueuesRt']);router[_0xdab2('0xa')]('/:id/groups',auth[_0xdab2('0x6')](),controller[_0xdab2('0x18')]);router[_0xdab2('0xa')](_0xdab2('0x19'),auth[_0xdab2('0x6')](),controller[_0xdab2('0x1a')]);router['get'](_0xdab2('0x1b'),auth[_0xdab2('0x6')](),controller[_0xdab2('0x1c')]);router[_0xdab2('0xa')](_0xdab2('0x1d'),auth[_0xdab2('0x6')](),controller[_0xdab2('0x1e')]);router[_0xdab2('0xa')]('/:id/openchannel/interactions',auth[_0xdab2('0x6')](),controller[_0xdab2('0x1f')]);router['get'](_0xdab2('0x20'),auth[_0xdab2('0x6')](),controller['getMailInteractions']);router[_0xdab2('0xa')](_0xdab2('0x21'),auth[_0xdab2('0x6')](),controller[_0xdab2('0x22')]);router[_0xdab2('0xa')]('/:id/fax/interactions',auth[_0xdab2('0x6')](),controller[_0xdab2('0x23')]);router[_0xdab2('0xa')](_0xdab2('0x24'),auth[_0xdab2('0x6')](),controller[_0xdab2('0x25')]);router[_0xdab2('0xa')](_0xdab2('0x26'),auth[_0xdab2('0x6')](),controller[_0xdab2('0x27')]);router[_0xdab2('0xa')](_0xdab2('0x28'),auth[_0xdab2('0x6')](),controller[_0xdab2('0x29')]);router[_0xdab2('0xa')](_0xdab2('0x2a'),auth[_0xdab2('0x6')](),controller[_0xdab2('0x2b')]);router[_0xdab2('0xa')](_0xdab2('0x2c'),auth[_0xdab2('0x6')](),controller['getVoicePrefixes']);router[_0xdab2('0xa')](_0xdab2('0x2d'),auth[_0xdab2('0x6')](),controller['getFaxAccounts']);router[_0xdab2('0xa')]('/:id/mail_accounts',auth[_0xdab2('0x6')](),controller['getMailAccounts']);router[_0xdab2('0xa')](_0xdab2('0x2e'),auth['isAuthenticated'](),controller['getOpenchannelAccounts']);router[_0xdab2('0xa')](_0xdab2('0x2f'),auth[_0xdab2('0x6')](),controller[_0xdab2('0x30')]);router[_0xdab2('0xa')]('/:id/chat_websites',auth[_0xdab2('0x6')](),controller[_0xdab2('0x31')]);router['get'](_0xdab2('0x32'),auth[_0xdab2('0x6')](),controller[_0xdab2('0x33')]);router[_0xdab2('0xa')](_0xdab2('0x34'),auth[_0xdab2('0x6')](),controller[_0xdab2('0x35')]);router[_0xdab2('0xa')]('/:id/scheduled_calls',auth['isAuthenticated'](),controller[_0xdab2('0x36')]);router[_0xdab2('0xa')](_0xdab2('0x37'),auth[_0xdab2('0x6')](),controller[_0xdab2('0x38')]);router[_0xdab2('0x39')]('/:id/contacts',auth['isAuthenticated'](),controller['addContacts']);router['post']('/',auth[_0xdab2('0x6')](),controller[_0xdab2('0x3a')]);router[_0xdab2('0x39')]('/create_many',auth[_0xdab2('0x6')](),controller[_0xdab2('0x3b')]);router[_0xdab2('0x39')](_0xdab2('0x15'),auth[_0xdab2('0x6')](),controller[_0xdab2('0x3c')]);var upload=multer({'storage':multer[_0xdab2('0x3d')]({'destination':function(_0x2093ba,_0x4d5413,_0x13809e){_0x13809e(null,path['join'](config[_0xdab2('0x3e')],_0xdab2('0x3f')));},'filename':function(_0x5e4c90,_0x14bd45,_0x493560){_0x493560(null,util[_0xdab2('0x40')]('%s-%s',Date[_0xdab2('0x41')](),_0x14bd45[_0xdab2('0x42')]));}})});router['post'](_0xdab2('0xf'),upload[_0xdab2('0x43')](_0xdab2('0x44')),controller[_0xdab2('0x45')]);router[_0xdab2('0x39')](_0xdab2('0x46'),auth[_0xdab2('0x6')](),controller[_0xdab2('0x47')]);router[_0xdab2('0x39')]('/:id/logout',auth[_0xdab2('0x6')](),controller[_0xdab2('0x48')]);router[_0xdab2('0x39')]('/:id/pause',auth['isAuthenticated'](),controller[_0xdab2('0x49')]);router[_0xdab2('0x39')](_0xdab2('0x4a'),auth[_0xdab2('0x6')](),controller[_0xdab2('0x4b')]);router[_0xdab2('0x39')]('/:id/teams',auth[_0xdab2('0x6')](),controller['addTeams']);router['post'](_0xdab2('0x4c'),auth[_0xdab2('0x6')](),controller['addChatInteractions']);router[_0xdab2('0x39')](_0xdab2('0x4d'),auth[_0xdab2('0x6')](),controller['addMailInteractions']);router['post'](_0xdab2('0x4e'),auth[_0xdab2('0x6')](),controller[_0xdab2('0x4f')]);router['post'](_0xdab2('0x50'),auth[_0xdab2('0x6')](),controller[_0xdab2('0x51')]);router[_0xdab2('0x39')](_0xdab2('0x52'),auth[_0xdab2('0x6')](),controller[_0xdab2('0x53')]);router[_0xdab2('0x39')]('/:id/whatsapp_interactions',auth['isAuthenticated'](),controller[_0xdab2('0x54')]);router[_0xdab2('0x39')](_0xdab2('0x2d'),auth[_0xdab2('0x6')](),controller[_0xdab2('0x55')]);router[_0xdab2('0x39')](_0xdab2('0x56'),auth['isAuthenticated'](),controller[_0xdab2('0x57')]);router[_0xdab2('0x39')](_0xdab2('0x2e'),auth[_0xdab2('0x6')](),controller[_0xdab2('0x58')]);router[_0xdab2('0x39')]('/:id/sms_accounts',auth[_0xdab2('0x6')](),controller['addSmsAccounts']);router[_0xdab2('0x39')](_0xdab2('0x59'),auth[_0xdab2('0x6')](),controller[_0xdab2('0x5a')]);router[_0xdab2('0x39')](_0xdab2('0x32'),auth[_0xdab2('0x6')](),controller[_0xdab2('0x5b')]);router['post'](_0xdab2('0x34'),auth['isAuthenticated'](),controller[_0xdab2('0x5c')]);router[_0xdab2('0x39')](_0xdab2('0x37'),auth[_0xdab2('0x6')](),controller[_0xdab2('0x5d')]);router[_0xdab2('0x5e')](_0xdab2('0xd'),auth['isAuthenticated'](),controller[_0xdab2('0x5f')]);router[_0xdab2('0x5e')]('/:id/password',auth[_0xdab2('0x6')](),controller[_0xdab2('0x60')]);router[_0xdab2('0x61')](_0xdab2('0x15'),auth[_0xdab2('0x6')](),controller['removeQueues']);router[_0xdab2('0x61')]('/:id/teams',auth[_0xdab2('0x6')](),controller[_0xdab2('0x62')]);router[_0xdab2('0x61')](_0xdab2('0xd'),auth['isAuthenticated'](),controller[_0xdab2('0x63')]);router[_0xdab2('0x61')](_0xdab2('0x4c'),auth[_0xdab2('0x6')](),controller[_0xdab2('0x64')]);router['delete'](_0xdab2('0x4d'),auth[_0xdab2('0x6')](),controller[_0xdab2('0x65')]);router[_0xdab2('0x61')]('/:id/fax_interactions',auth['isAuthenticated'](),controller[_0xdab2('0x66')]);router[_0xdab2('0x61')]('/:id/sms_interactions',auth[_0xdab2('0x6')](),controller[_0xdab2('0x67')]);router['delete'](_0xdab2('0x52'),auth[_0xdab2('0x6')](),controller[_0xdab2('0x68')]);router[_0xdab2('0x61')](_0xdab2('0x69'),auth[_0xdab2('0x6')](),controller[_0xdab2('0x6a')]);router[_0xdab2('0x61')](_0xdab2('0x2d'),auth[_0xdab2('0x6')](),controller[_0xdab2('0x6b')]);router['delete'](_0xdab2('0x56'),auth['isAuthenticated'](),controller[_0xdab2('0x6c')]);router[_0xdab2('0x61')](_0xdab2('0x2e'),auth[_0xdab2('0x6')](),controller[_0xdab2('0x6d')]);router['delete'](_0xdab2('0x2f'),auth[_0xdab2('0x6')](),controller[_0xdab2('0x6e')]);router['delete']('/:id/chat_websites',auth['isAuthenticated'](),controller[_0xdab2('0x6f')]);router['delete'](_0xdab2('0x32'),auth[_0xdab2('0x6')](),controller[_0xdab2('0x70')]);router[_0xdab2('0x61')](_0xdab2('0x34'),auth['isAuthenticated'](),controller[_0xdab2('0x71')]);router[_0xdab2('0x61')]('/:id/api_key',auth[_0xdab2('0x6')](),controller['removeApiKey']);module[_0xdab2('0x72')]=router; \ No newline at end of file diff --git a/server/api/user/user.attributes.js b/server/api/user/user.attributes.js index 7e1b06f..bb66892 100644 --- a/server/api/user/user.attributes.js +++ b/server/api/user/user.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x49c1=['String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22udp\x22,\x20\x22tcp\x22]','rfc2833','info','auto','nonat','update','outgoing','yes','force_rport,comedia','nat','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22force_rport\x22,\x20\x22comedia\x22]','all','ulaw;alaw;gsm','allow','split','insecure','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22port\x22,\x20\x22invite\x22]','never','\x22\x22\x20<>','always','accept','refuse','originate','uac','uas','certificate','passive','update,nonat','TEXT','showWebBar','get','wss','encryption','avpf','force_avp','dtlsenable','dtlsverify','dtlssetup','dtlscertfile','dtlsprivatekey','rtcp_mux','icesupport','/etc/pki/tls/private/motion.key','permissions','phoneBarEnableScreenRecordingByAgent','string','true','false','screenrecording','blocked','blockedAt','loginAttempts','UNSIGNED','sequelize','util','lodash','exports','name','setDataValue','The\x20name\x20of\x20the\x20user','callerid','\x22%s\x22\x20<%s>','getDataValue','STRING','email','toLowerCase','ENUM','admin','user','agent','telephone','local','INTEGER','internal','accountcode','format','fullname','BOOLEAN','DEFAULT\x20PAUSE','DATE','dynamic','peer','friend','ALLOWED_NOT_SCREENED','ALLOWED_PASSED_SCREEN','ALLOWED_FAILED_SCREEN','PROHIB_NOT_SCREENED','PROHIB_PASSED_SCREEN','PROHIB_FAILED_SCREEN','PROHIB','udp','transport','join'];(function(_0x1c7320,_0x23fcb4){var _0x1e23ee=function(_0x30005c){while(--_0x30005c){_0x1c7320['push'](_0x1c7320['shift']());}};_0x1e23ee(++_0x23fcb4);}(_0x49c1,0xef));var _0x149c=function(_0x5bc300,_0x5b48c2){_0x5bc300=_0x5bc300-0x0;var _0x20cacb=_0x49c1[_0x5bc300];return _0x20cacb;};'use strict';var Sequelize=require(_0x149c('0x0'));var moment=require('moment');var util=require(_0x149c('0x1'));var _=require(_0x149c('0x2'));module[_0x149c('0x3')]={'name':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0x149c('0x4'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i},'set':function(_0x2297bf){this['setDataValue'](_0x149c('0x4'),_0x2297bf);this[_0x149c('0x5')]('defaultuser',_0x2297bf);},'comment':_0x149c('0x6')},'fullname':{'type':Sequelize['STRING'],'allowNull':![],'set':function(_0x33fa87){this[_0x149c('0x5')]('fullname',_0x33fa87);this[_0x149c('0x5')](_0x149c('0x7'),util['format'](_0x149c('0x8'),_0x33fa87,this[_0x149c('0x9')]('internal')));}},'alias':{'type':Sequelize[_0x149c('0xa')]},'email':{'type':Sequelize[_0x149c('0xa')],'allowNull':![],'unique':_0x149c('0xb'),'validate':{'isEmail':!![]},'set':function(_0x2c0c8b){if(_0x2c0c8b){this['setDataValue'](_0x149c('0xb'),_0x2c0c8b[_0x149c('0xc')]());}}},'role':{'type':Sequelize[_0x149c('0xd')](_0x149c('0xe'),_0x149c('0xf'),_0x149c('0x10'),_0x149c('0x11')),'allowNull':![]},'password':{'type':Sequelize[_0x149c('0xa')],'allowNull':![],'validate':{'notEmpty':!![]}},'provider':{'type':Sequelize['STRING'],'defaultValue':_0x149c('0x12')},'internal':{'type':Sequelize[_0x149c('0x13')](0xb),'allowNull':![],'unique':'internal','set':function(_0x3b247e){this['setDataValue'](_0x149c('0x14'),_0x3b247e);this[_0x149c('0x5')](_0x149c('0x15'),_0x3b247e);this[_0x149c('0x5')](_0x149c('0x7'),util[_0x149c('0x16')](_0x149c('0x8'),this[_0x149c('0x9')](_0x149c('0x17')),_0x3b247e));}},'salt':{'type':Sequelize['STRING']},'phone':{'type':Sequelize[_0x149c('0xa')]},'mobile':{'type':Sequelize[_0x149c('0xa')]},'address':{'type':Sequelize[_0x149c('0xa')]},'zipcode':{'type':Sequelize[_0x149c('0xa')]},'userpic':{'type':Sequelize[_0x149c('0xa')]},'city':{'type':Sequelize[_0x149c('0xa')]},'country':{'type':Sequelize[_0x149c('0xa')]},'online':{'type':Sequelize[_0x149c('0x18')],'defaultValue':![]},'lastLoginAt':{'type':Sequelize['DATE']},'voicePause':{'type':Sequelize[_0x149c('0x18')],'defaultValue':![]},'chatPause':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'mailPause':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'faxPause':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'smsPause':{'type':Sequelize[_0x149c('0x18')],'defaultValue':![]},'whatsappPause':{'type':Sequelize[_0x149c('0x18')],'defaultValue':![]},'openchannelPause':{'type':Sequelize[_0x149c('0x18')],'defaultValue':![]},'pauseType':{'type':Sequelize[_0x149c('0xa')],'defaultValue':_0x149c('0x19')},'lastPauseAt':{'type':Sequelize[_0x149c('0x1a')]},'chatCapacity':{'type':Sequelize[_0x149c('0x13')],'defaultValue':0x0},'mailCapacity':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'faxCapacity':{'type':Sequelize[_0x149c('0x13')],'defaultValue':0x0},'smsCapacity':{'type':Sequelize[_0x149c('0x13')],'defaultValue':0x0},'whatsappCapacity':{'type':Sequelize[_0x149c('0x13')],'defaultValue':0x0},'openchannelCapacity':{'type':Sequelize[_0x149c('0x13')],'defaultValue':0x0},'phoneBarAutoAnswer':{'type':Sequelize[_0x149c('0x18')],'defaultValue':![]},'phoneBarEnableSettings':{'type':Sequelize[_0x149c('0x18')],'defaultValue':!![]},'phoneBarListenPort':{'type':Sequelize[_0x149c('0x13')](0x5),'defaultValue':0x1428},'phoneBarExpires':{'type':Sequelize[_0x149c('0x13')](0x5),'defaultValue':0x78},'phoneBarRemoteControl':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'phoneBarRemoteControlPort':{'type':Sequelize[_0x149c('0x13')],'defaultValue':0x26a0},'phoneBarEnableRecording':{'type':Sequelize[_0x149c('0x18')],'defaultValue':![]},'phoneBarRingInUse':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'chanspy':{'type':Sequelize[_0x149c('0x18')],'defaultValue':![]},'description':{'type':Sequelize[_0x149c('0xa')],'allowNull':!![]},'host':{'type':Sequelize[_0x149c('0xa')],'allowNull':!![],'defaultValue':_0x149c('0x1b')},'ipaddr':{'type':Sequelize['STRING'],'allowNull':!![]},'port':{'type':Sequelize[_0x149c('0x13')](0x5),'allowNull':!![]},'regseconds':{'type':Sequelize[_0x149c('0x13')](0xb),'allowNull':!![]},'fullcontact':{'type':Sequelize[_0x149c('0xa')],'allowNull':!![]},'regserver':{'type':Sequelize[_0x149c('0xa')],'allowNull':!![]},'useragent':{'type':Sequelize[_0x149c('0xa')],'allowNull':!![]},'lastms':{'type':Sequelize[_0x149c('0x13')](0xb),'allowNull':!![]},'type':{'type':Sequelize[_0x149c('0xd')]('friend','user',_0x149c('0x1c')),'allowNull':!![],'defaultValue':_0x149c('0x1d')},'context':{'type':Sequelize[_0x149c('0xa')],'allowNull':!![],'defaultValue':'from-sip'},'callingpres':{'type':Sequelize[_0x149c('0xd')](_0x149c('0x1e'),_0x149c('0x1f'),_0x149c('0x20'),'ALLOWED',_0x149c('0x21'),_0x149c('0x22'),_0x149c('0x23'),_0x149c('0x24')),'allowNull':!![]},'deny':{'type':Sequelize[_0x149c('0xa')],'allowNull':!![]},'permit':{'type':Sequelize['STRING'],'allowNull':!![]},'secret':{'type':Sequelize[_0x149c('0xa')],'allowNull':!![]},'md5secret':{'type':Sequelize['STRING'],'allowNull':!![]},'remotesecret':{'type':Sequelize[_0x149c('0xa')],'allowNull':!![]},'transport':{'type':Sequelize[_0x149c('0xa')],'allowNull':!![],'defaultValue':_0x149c('0x25'),'set':function(_0x11b7c2){this[_0x149c('0x5')](_0x149c('0x26'),_0x11b7c2?_0x11b7c2[_0x149c('0x27')](','):null);},'get':function(){return this['getDataValue'](_0x149c('0x26'))?this['getDataValue'](_0x149c('0x26'))['split'](','):null;},'comment':_0x149c('0x28')},'dtmfmode':{'type':Sequelize['ENUM'](_0x149c('0x29'),_0x149c('0x2a'),'shortinfo','inband',_0x149c('0x2b')),'allowNull':!![],'defaultValue':_0x149c('0x29')},'directmedia':{'type':Sequelize['ENUM']('yes','no',_0x149c('0x2c'),_0x149c('0x2d'),_0x149c('0x2e')),'allowNull':!![],'defaultValue':'no'},'directrtpsetup':{'type':Sequelize[_0x149c('0xd')](_0x149c('0x2f'),'no'),'allowNull':!![],'defaultValue':'no'},'directmediapermit':{'type':Sequelize[_0x149c('0xa')],'allowNull':!![]},'directmediadeny':{'type':Sequelize['STRING'],'allowNull':!![]},'nat':{'type':Sequelize[_0x149c('0xa')],'allowNull':!![],'defaultValue':_0x149c('0x30'),'set':function(_0x36a888){this[_0x149c('0x5')]('nat',_0x36a888?_0x36a888[_0x149c('0x27')](','):null);},'get':function(){return this[_0x149c('0x9')](_0x149c('0x31'))?this[_0x149c('0x9')]('nat')['split'](','):null;},'comment':_0x149c('0x32')},'callgroup':{'type':Sequelize[_0x149c('0xa')]},'namedcallgroup':{'type':Sequelize['STRING']},'pickupgroup':{'type':Sequelize[_0x149c('0xa')]},'namedpickupgroup':{'type':Sequelize['STRING']},'language':{'type':Sequelize[_0x149c('0xa')],'defaultValue':'en'},'tonezone':{'type':Sequelize[_0x149c('0xa')]},'disallow':{'type':Sequelize[_0x149c('0xa')],'allowNull':![],'defaultValue':_0x149c('0x33')},'allow':{'type':Sequelize[_0x149c('0xa')],'allowNull':![],'defaultValue':'ulaw;alaw;gsm','set':function(_0x36b9ce){this[_0x149c('0x5')]('allow',_0x36b9ce?_0x36b9ce['join'](';'):_0x149c('0x34'));},'get':function(){return this[_0x149c('0x9')]('allow')?this[_0x149c('0x9')](_0x149c('0x35'))[_0x149c('0x36')](';'):null;},'comment':'String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22ulaw\x22,\x20\x22alaw\x22,\x20\x22gsm\x22]'},'autoframing':{'type':Sequelize['ENUM'](_0x149c('0x2f'),'no'),'allowNull':!![]},'insecure':{'type':Sequelize[_0x149c('0xa')],'allowNull':!![],'set':function(_0x1ab916){this['setDataValue'](_0x149c('0x37'),_0x1ab916?_0x1ab916['join'](','):null);},'get':function(){return this['getDataValue'](_0x149c('0x37'))?this[_0x149c('0x9')](_0x149c('0x37'))[_0x149c('0x36')](','):null;},'comment':_0x149c('0x38')},'trustrpid':{'type':Sequelize[_0x149c('0xd')]('yes','no'),'allowNull':!![],'defaultValue':'no'},'trust_id_outbound':{'type':Sequelize[_0x149c('0xd')](_0x149c('0x2f'),'no'),'allowNull':!![],'defaultValue':'no'},'progressinband':{'type':Sequelize[_0x149c('0xd')](_0x149c('0x2f'),'no',_0x149c('0x39')),'allowNull':!![]},'promiscredir':{'type':Sequelize[_0x149c('0xd')](_0x149c('0x2f'),'no'),'allowNull':!![]},'useclientcode':{'type':Sequelize[_0x149c('0xd')](_0x149c('0x2f'),'no'),'allowNull':!![]},'accountcode':{'type':Sequelize[_0x149c('0x13')](0xb),'allowNull':!![]},'setvar':{'type':Sequelize['STRING'],'allowNull':!![]},'callerid':{'type':Sequelize[_0x149c('0xa')],'allowNull':!![],'defaultValue':_0x149c('0x3a')},'amaflags':{'type':Sequelize[_0x149c('0xa')],'allowNull':!![]},'callcounter':{'type':Sequelize[_0x149c('0xd')](_0x149c('0x2f'),'no'),'allowNull':!![],'defaultValue':'yes'},'busylevel':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'allowoverlap':{'type':Sequelize[_0x149c('0xd')]('yes','no'),'allowNull':!![]},'allowsubscribe':{'type':Sequelize[_0x149c('0xd')](_0x149c('0x2f'),'no'),'allowNull':!![]},'allowtransfer':{'type':Sequelize['ENUM']('yes','no'),'allowNull':!![]},'ignoresdpversion':{'type':Sequelize[_0x149c('0xd')](_0x149c('0x2f'),'no'),'allowNull':!![]},'subscribecontext':{'type':Sequelize[_0x149c('0xa')],'allowNull':!![]},'template':{'type':Sequelize[_0x149c('0xa')],'allowNull':!![]},'videosupport':{'type':Sequelize['ENUM']('yes','no',_0x149c('0x3b')),'allowNull':!![],'defaultValue':'no'},'maxcallbitrate':{'type':Sequelize[_0x149c('0x13')](0xb),'allowNull':!![]},'rfc2833compensate':{'type':Sequelize['ENUM']('yes','no'),'allowNull':!![]},'mailbox':{'type':Sequelize['STRING'],'allowNull':!![]},'session_timers':{'type':Sequelize[_0x149c('0xd')](_0x149c('0x3c'),_0x149c('0x3d'),_0x149c('0x3e')),'allowNull':!![]},'session_expires':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'session_minse':{'type':Sequelize[_0x149c('0x13')](0xb),'allowNull':!![]},'session_refresher':{'type':Sequelize[_0x149c('0xd')](_0x149c('0x3f'),'uas'),'allowNull':!![],'defaultValue':_0x149c('0x40')},'t38pt_usertpsource':{'type':Sequelize[_0x149c('0xa')],'allowNull':!![]},'regexten':{'type':Sequelize['STRING'],'allowNull':!![]},'fromdomain':{'type':Sequelize['STRING'],'allowNull':!![]},'fromuser':{'type':Sequelize['STRING'],'allowNull':!![]},'qualify':{'type':Sequelize['ENUM'](_0x149c('0x2f'),'no'),'allowNull':!![],'defaultValue':_0x149c('0x2f')},'keepalive':{'type':Sequelize[_0x149c('0x13')](0xb),'allowNull':!![]},'defaultip':{'type':Sequelize['STRING'],'allowNull':!![]},'defaultuser':{'type':Sequelize[_0x149c('0xa')],'allowNull':!![]},'rtptimeout':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'rtpholdtimeout':{'type':Sequelize[_0x149c('0x13')](0xb),'allowNull':!![]},'rtpkeepalive':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'sendrpid':{'type':Sequelize[_0x149c('0xd')](_0x149c('0x2f'),'no'),'allowNull':!![],'defaultValue':'no'},'outboundproxy':{'type':Sequelize[_0x149c('0xa')],'allowNull':!![]},'callbackextension':{'type':Sequelize[_0x149c('0xa')],'allowNull':!![]},'timert1':{'type':Sequelize[_0x149c('0x13')](0xb),'allowNull':!![]},'timerb':{'type':Sequelize[_0x149c('0x13')](0xb),'allowNull':!![]},'qualifyfreq':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'contactpermit':{'type':Sequelize[_0x149c('0xa')],'allowNull':!![]},'contactdeny':{'type':Sequelize[_0x149c('0xa')],'allowNull':!![]},'contactacl':{'type':Sequelize[_0x149c('0xa')],'allowNull':!![]},'unsolicited_mailbox':{'type':Sequelize['STRING'],'allowNull':!![]},'use_q850_reason':{'type':Sequelize[_0x149c('0xa')],'allowNull':!![]},'maxforwards':{'type':Sequelize[_0x149c('0x13')](0xb),'allowNull':!![]},'encryption':{'type':Sequelize[_0x149c('0xd')](_0x149c('0x2f'),'no'),'allowNull':!![],'defaultValue':'no'},'avpf':{'type':Sequelize[_0x149c('0xd')](_0x149c('0x2f'),'no'),'allowNull':!![]},'force_avp':{'type':Sequelize[_0x149c('0xd')](_0x149c('0x2f'),'no'),'allowNull':!![]},'icesupport':{'type':Sequelize[_0x149c('0xd')]('yes','no'),'allowNull':!![]},'dtlsenable':{'type':Sequelize[_0x149c('0xd')](_0x149c('0x2f'),'no'),'allowNull':!![]},'dtlsverify':{'type':Sequelize[_0x149c('0xd')]('yes','no','fingerprint',_0x149c('0x41')),'allowNull':!![]},'dtlsrekey':{'type':Sequelize[_0x149c('0x13')](0xb),'allowNull':!![]},'dtlscertfile':{'type':Sequelize['STRING'],'allowNull':!![]},'dtlsprivatekey':{'type':Sequelize[_0x149c('0xa')],'allowNull':!![]},'dtlscipher':{'type':Sequelize[_0x149c('0xa')],'allowNull':!![]},'dtlscafile':{'type':Sequelize[_0x149c('0xa')],'allowNull':!![]},'dtlscapath':{'type':Sequelize[_0x149c('0xa')],'allowNull':!![]},'dtlssetup':{'type':Sequelize['ENUM']('active',_0x149c('0x42'),'actpass'),'allowNull':!![]},'dtlsfingerprint':{'type':Sequelize['STRING'],'allowNull':!![]},'usereqphone':{'type':Sequelize[_0x149c('0xd')]('yes','no'),'allowNull':!![],'defaultValue':'no'},'recordonfeature':{'type':Sequelize[_0x149c('0xa')],'allowNull':!![]},'recordofffeature':{'type':Sequelize[_0x149c('0xa')],'allowNull':!![]},'call_limit':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![],'defaultValue':0xa},'registertrying':{'type':Sequelize['ENUM'](_0x149c('0x2f'),'no'),'allowNull':!![]},'subscribemwi':{'type':Sequelize['ENUM'](_0x149c('0x2f'),'no'),'allowNull':!![]},'vmexten':{'type':Sequelize['STRING'],'allowNull':!![]},'mohinterpret':{'type':Sequelize[_0x149c('0xa')],'allowNull':!![]},'mohsuggest':{'type':Sequelize[_0x149c('0xa')],'allowNull':!![]},'parkinglot':{'type':Sequelize['STRING'],'allowNull':!![]},'canreinvite':{'type':Sequelize[_0x149c('0xd')](_0x149c('0x2f'),'no',_0x149c('0x2c'),'update',_0x149c('0x43')),'allowNull':!![],'defaultValue':'no'},'loginInPause':{'type':Sequelize[_0x149c('0x18')],'defaultValue':![]},'resetPasswordToken':{'type':Sequelize['STRING']},'resetPasswordExpires':{'type':Sequelize[_0x149c('0x1a')]},'passwordResetAt':{'type':Sequelize[_0x149c('0x1a')],'defaultValue':null},'previousPasswords':{'type':Sequelize[_0x149c('0x44')]},'showWebBar':{'type':Sequelize[_0x149c('0x13')],'defaultValue':0x0,'set':function(_0x26e4c3){this[_0x149c('0x5')](_0x149c('0x45'),_0x26e4c3);var _0x4911ec=this[_0x149c('0x46')]({'plain':!![]});switch(_0x26e4c3){case 0x0:case 0x1:var _0x5c2e81=_0x4911ec['transport']?_['isArray'](_0x4911ec['transport'])?_0x4911ec[_0x149c('0x26')][_0x149c('0x27')]():_0x4911ec['transport']:_0x149c('0x25');if(_0x5c2e81===_0x149c('0x47')){_0x5c2e81='udp';}this['setDataValue'](_0x149c('0x26'),_0x5c2e81);this[_0x149c('0x5')](_0x149c('0x48'),'no');this[_0x149c('0x5')](_0x149c('0x49'),null);this['setDataValue'](_0x149c('0x4a'),null);this[_0x149c('0x5')]('icesupport',null);this['setDataValue'](_0x149c('0x4b'),null);this[_0x149c('0x5')](_0x149c('0x4c'),null);this[_0x149c('0x5')](_0x149c('0x4d'),null);this['setDataValue'](_0x149c('0x4e'),null);this['setDataValue'](_0x149c('0x4f'),null);this[_0x149c('0x5')](_0x149c('0x50'),'no');break;case 0x2:this[_0x149c('0x5')]('transport',_0x149c('0x47'));this[_0x149c('0x5')]('encryption',_0x149c('0x2f'));this[_0x149c('0x5')](_0x149c('0x49'),_0x149c('0x2f'));this['setDataValue'](_0x149c('0x4a'),'yes');this[_0x149c('0x5')](_0x149c('0x51'),_0x149c('0x2f'));this[_0x149c('0x5')](_0x149c('0x4b'),'yes');this['setDataValue'](_0x149c('0x4c'),'no');this[_0x149c('0x5')](_0x149c('0x4d'),'actpass');this['setDataValue'](_0x149c('0x4e'),_0x4911ec[_0x149c('0x4e')]||'/etc/pki/tls/certs/motion.crt');this[_0x149c('0x5')]('dtlsprivatekey',_0x4911ec[_0x149c('0x4f')]||_0x149c('0x52'));this[_0x149c('0x5')]('rtcp_mux',_0x149c('0x2f'));break;default:}}},'permissions':{'type':Sequelize[_0x149c('0x44')],'set':function(_0x1d0d33){this[_0x149c('0x5')](_0x149c('0x53'),_0x1d0d33?_0x1d0d33[_0x149c('0x27')](','):[]);},'get':function(){return this['getDataValue'](_0x149c('0x53'))?_['map'](this[_0x149c('0x9')](_0x149c('0x53'))[_0x149c('0x36')](','),function(_0x58d2d4){return parseInt(_0x58d2d4,0xa);}):[];}},'phoneBarUnconditionalNumber':{'type':Sequelize[_0x149c('0xa')]},'phoneBarNoReplyNumber':{'type':Sequelize[_0x149c('0xa')]},'phoneBarBusyNumber':{'type':Sequelize[_0x149c('0xa')]},'phoneBarUnconditional':{'type':Sequelize[_0x149c('0x18')],'defaultValue':![]},'phoneBarNoReply':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'phoneBarBusy':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'phoneBarDnd':{'type':Sequelize[_0x149c('0x18')],'defaultValue':!![]},'phoneBarUnansweredCallBadge':{'type':Sequelize[_0x149c('0x18')],'defaultValue':!![]},'phoneBarEnableDtmfTone':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'phoneBarAutoAnswerDelay':{'type':Sequelize[_0x149c('0x13')],'defaultValue':0x0},'extensionMonitor':{'type':Sequelize[_0x149c('0xa')],'defaultValue':''},'crudPermissions':{'type':Sequelize[_0x149c('0x13')],'defaultValue':0x0},'rtcp_mux':{'type':Sequelize['ENUM'](_0x149c('0x2f'),'no'),'defaultValue':'no'},'allowmessenger':{'type':Sequelize[_0x149c('0x18')],'defaultValue':!![]},'phoneBarOutboundProxy':{'type':Sequelize[_0x149c('0xa')]},'phoneBarEnableJaws':{'type':Sequelize[_0x149c('0x18')],'defaultValue':![]},'phoneBarEnableScreenRecordingByAgent':{'type':Sequelize[_0x149c('0x18')],'defaultValue':![]},'phoneBarEnableVideoRecording':{'type':Sequelize['VIRTUAL'],'get':function(){return this['getDataValue'](_0x149c('0x54'))?this['getDataValue'](_0x149c('0x54')):![];}},'phoneBarEnableAutomaticScreenRecording':{'type':Sequelize[_0x149c('0x18')],'defaultValue':![]},'phoneBarPrefixRequired':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'hotdesk':{'type':Sequelize[_0x149c('0x18')],'defaultValue':![]},'interface':{'type':Sequelize['STRING'],'defaultValue':null},'privacyEnabled':{'type':Sequelize[_0x149c('0x18')],'defaultValue':![]},'apiKeyNonce':{'type':Sequelize[_0x149c('0xa')],'allowNull':!![]},'apiKeyIat':{'type':Sequelize[_0x149c('0xa')],'allowNull':!![]},'screenrecording':{'type':Sequelize[_0x149c('0x18')],'defaultValue':![],'set':function(_0x11c4d3){if(typeof _0x11c4d3===_0x149c('0x55')){var _0x206772=_0x11c4d3==='1'?!![]:_0x11c4d3==='0'?![]:_0x11c4d3===_0x149c('0x56')?!![]:_0x11c4d3===_0x149c('0x57')?![]:![];this[_0x149c('0x5')]('screenrecording',_0x206772);}else{this['setDataValue'](_0x149c('0x58'),_0x11c4d3);}}},'blocked':{'type':Sequelize[_0x149c('0x18')],'defaultValue':![],'set':function(_0x43ec81){this['setDataValue'](_0x149c('0x59'),_0x43ec81);if(_0x43ec81===!![]){this[_0x149c('0x5')](_0x149c('0x5a'),moment());this['setDataValue'](_0x149c('0x5b'),0x0);}else{this[_0x149c('0x5')](_0x149c('0x5a'),null);}}},'blockedAt':{'type':Sequelize[_0x149c('0x1a')],'defaultValue':null},'loginAttempts':{'type':Sequelize[_0x149c('0x13')],'defaultValue':0x0},'disabled':{'type':Sequelize[_0x149c('0x18')],'defaultValue':![]},'settingsEnabled':{'type':Sequelize[_0x149c('0x18')],'defaultValue':!![]},'wssPort':{'type':Sequelize[_0x149c('0x13')](0x5)[_0x149c('0x5c')],'defaultValue':0x1f99},'downloadAttachments':{'type':Sequelize[_0x149c('0x18')],'defaultValue':!![]},'downloadOmnichannelInteractions':{'type':Sequelize[_0x149c('0x18')],'defaultValue':!![]},'downloadVoiceRecordings':{'type':Sequelize[_0x149c('0x18')],'defaultValue':!![]}}; \ No newline at end of file +var _0xfc65=['uas','fingerprint','certificate','active','passive','actpass','isArray','wss','encryption','avpf','force_avp','icesupport','dtlsverify','dtlssetup','dtlscertfile','rtcp_mux','dtlsenable','/etc/pki/tls/certs/motion.crt','dtlsprivatekey','/etc/pki/tls/private/motion.key','TEXT','permissions','VIRTUAL','phoneBarEnableScreenRecordingByAgent','string','false','screenrecording','blocked','blockedAt','loginAttempts','UNSIGNED','sequelize','lodash','exports','STRING','name','setDataValue','defaultuser','The\x20name\x20of\x20the\x20user','callerid','format','\x22%s\x22\x20<%s>','getDataValue','internal','email','ENUM','admin','user','agent','local','INTEGER','accountcode','fullname','BOOLEAN','DATE','DEFAULT\x20PAUSE','peer','friend','from-sip','ALLOWED_NOT_SCREENED','ALLOWED_PASSED_SCREEN','ALLOWED_FAILED_SCREEN','PROHIB_NOT_SCREENED','PROHIB_FAILED_SCREEN','PROHIB','udp','transport','join','rfc2833','shortinfo','inband','auto','nonat','update','yes','nat','split','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22force_rport\x22,\x20\x22comedia\x22]','all','allow','ulaw;alaw;gsm','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22ulaw\x22,\x20\x22alaw\x22,\x20\x22gsm\x22]','insecure','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22port\x22,\x20\x22invite\x22]','never','always','accept','refuse','originate','uac'];(function(_0x272ffa,_0x2e0bab){var _0x4c570d=function(_0x10218e){while(--_0x10218e){_0x272ffa['push'](_0x272ffa['shift']());}};_0x4c570d(++_0x2e0bab);}(_0xfc65,0x1e1));var _0x5fc6=function(_0x2f6519,_0x512614){_0x2f6519=_0x2f6519-0x0;var _0x4c0869=_0xfc65[_0x2f6519];return _0x4c0869;};'use strict';var Sequelize=require(_0x5fc6('0x0'));var moment=require('moment');var util=require('util');var _=require(_0x5fc6('0x1'));module[_0x5fc6('0x2')]={'name':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':![],'unique':_0x5fc6('0x4'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i},'set':function(_0x3c542a){this[_0x5fc6('0x5')](_0x5fc6('0x4'),_0x3c542a);this[_0x5fc6('0x5')](_0x5fc6('0x6'),_0x3c542a);},'comment':_0x5fc6('0x7')},'fullname':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':![],'set':function(_0x409c5f){this[_0x5fc6('0x5')]('fullname',_0x409c5f);this[_0x5fc6('0x5')](_0x5fc6('0x8'),util[_0x5fc6('0x9')](_0x5fc6('0xa'),_0x409c5f,this[_0x5fc6('0xb')](_0x5fc6('0xc'))));}},'alias':{'type':Sequelize[_0x5fc6('0x3')]},'email':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':![],'unique':_0x5fc6('0xd'),'validate':{'isEmail':!![]},'set':function(_0x29781f){if(_0x29781f){this['setDataValue'](_0x5fc6('0xd'),_0x29781f['toLowerCase']());}}},'role':{'type':Sequelize[_0x5fc6('0xe')](_0x5fc6('0xf'),_0x5fc6('0x10'),_0x5fc6('0x11'),'telephone'),'allowNull':![]},'password':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':![],'validate':{'notEmpty':!![]}},'provider':{'type':Sequelize[_0x5fc6('0x3')],'defaultValue':_0x5fc6('0x12')},'internal':{'type':Sequelize[_0x5fc6('0x13')](0xb),'allowNull':![],'unique':_0x5fc6('0xc'),'set':function(_0x26d865){this[_0x5fc6('0x5')](_0x5fc6('0xc'),_0x26d865);this[_0x5fc6('0x5')](_0x5fc6('0x14'),_0x26d865);this['setDataValue']('callerid',util[_0x5fc6('0x9')](_0x5fc6('0xa'),this['getDataValue'](_0x5fc6('0x15')),_0x26d865));}},'salt':{'type':Sequelize[_0x5fc6('0x3')]},'phone':{'type':Sequelize[_0x5fc6('0x3')]},'mobile':{'type':Sequelize[_0x5fc6('0x3')]},'address':{'type':Sequelize[_0x5fc6('0x3')]},'zipcode':{'type':Sequelize[_0x5fc6('0x3')]},'userpic':{'type':Sequelize['STRING']},'city':{'type':Sequelize[_0x5fc6('0x3')]},'country':{'type':Sequelize[_0x5fc6('0x3')]},'online':{'type':Sequelize[_0x5fc6('0x16')],'defaultValue':![]},'lastLoginAt':{'type':Sequelize[_0x5fc6('0x17')]},'voicePause':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'chatPause':{'type':Sequelize[_0x5fc6('0x16')],'defaultValue':![]},'mailPause':{'type':Sequelize[_0x5fc6('0x16')],'defaultValue':![]},'faxPause':{'type':Sequelize[_0x5fc6('0x16')],'defaultValue':![]},'smsPause':{'type':Sequelize[_0x5fc6('0x16')],'defaultValue':![]},'whatsappPause':{'type':Sequelize[_0x5fc6('0x16')],'defaultValue':![]},'openchannelPause':{'type':Sequelize[_0x5fc6('0x16')],'defaultValue':![]},'pauseType':{'type':Sequelize[_0x5fc6('0x3')],'defaultValue':_0x5fc6('0x18')},'lastPauseAt':{'type':Sequelize[_0x5fc6('0x17')]},'chatCapacity':{'type':Sequelize[_0x5fc6('0x13')],'defaultValue':0x0},'mailCapacity':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'faxCapacity':{'type':Sequelize[_0x5fc6('0x13')],'defaultValue':0x0},'smsCapacity':{'type':Sequelize[_0x5fc6('0x13')],'defaultValue':0x0},'whatsappCapacity':{'type':Sequelize[_0x5fc6('0x13')],'defaultValue':0x0},'openchannelCapacity':{'type':Sequelize[_0x5fc6('0x13')],'defaultValue':0x0},'phoneBarAutoAnswer':{'type':Sequelize[_0x5fc6('0x16')],'defaultValue':![]},'phoneBarEnableSettings':{'type':Sequelize[_0x5fc6('0x16')],'defaultValue':!![]},'phoneBarListenPort':{'type':Sequelize[_0x5fc6('0x13')](0x5),'defaultValue':0x1428},'phoneBarExpires':{'type':Sequelize[_0x5fc6('0x13')](0x5),'defaultValue':0x78},'phoneBarRemoteControl':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'phoneBarRemoteControlPort':{'type':Sequelize[_0x5fc6('0x13')],'defaultValue':0x26a0},'phoneBarEnableRecording':{'type':Sequelize[_0x5fc6('0x16')],'defaultValue':![]},'phoneBarRingInUse':{'type':Sequelize[_0x5fc6('0x16')],'defaultValue':![]},'chanspy':{'type':Sequelize[_0x5fc6('0x16')],'defaultValue':![]},'description':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![]},'host':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![],'defaultValue':'dynamic'},'ipaddr':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![]},'port':{'type':Sequelize[_0x5fc6('0x13')](0x5),'allowNull':!![]},'regseconds':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'fullcontact':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![]},'regserver':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![]},'useragent':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![]},'lastms':{'type':Sequelize[_0x5fc6('0x13')](0xb),'allowNull':!![]},'type':{'type':Sequelize[_0x5fc6('0xe')]('friend',_0x5fc6('0x10'),_0x5fc6('0x19')),'allowNull':!![],'defaultValue':_0x5fc6('0x1a')},'context':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![],'defaultValue':_0x5fc6('0x1b')},'callingpres':{'type':Sequelize[_0x5fc6('0xe')](_0x5fc6('0x1c'),_0x5fc6('0x1d'),_0x5fc6('0x1e'),'ALLOWED',_0x5fc6('0x1f'),'PROHIB_PASSED_SCREEN',_0x5fc6('0x20'),_0x5fc6('0x21')),'allowNull':!![]},'deny':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![]},'permit':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![]},'secret':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![]},'md5secret':{'type':Sequelize['STRING'],'allowNull':!![]},'remotesecret':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![]},'transport':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![],'defaultValue':_0x5fc6('0x22'),'set':function(_0x9f69e9){this[_0x5fc6('0x5')](_0x5fc6('0x23'),_0x9f69e9?_0x9f69e9[_0x5fc6('0x24')](','):null);},'get':function(){return this[_0x5fc6('0xb')]('transport')?this[_0x5fc6('0xb')](_0x5fc6('0x23'))['split'](','):null;},'comment':'String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22udp\x22,\x20\x22tcp\x22]'},'dtmfmode':{'type':Sequelize[_0x5fc6('0xe')](_0x5fc6('0x25'),'info',_0x5fc6('0x26'),_0x5fc6('0x27'),_0x5fc6('0x28')),'allowNull':!![],'defaultValue':_0x5fc6('0x25')},'directmedia':{'type':Sequelize['ENUM']('yes','no',_0x5fc6('0x29'),_0x5fc6('0x2a'),'outgoing'),'allowNull':!![],'defaultValue':'no'},'directrtpsetup':{'type':Sequelize['ENUM'](_0x5fc6('0x2b'),'no'),'allowNull':!![],'defaultValue':'no'},'directmediapermit':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![]},'directmediadeny':{'type':Sequelize['STRING'],'allowNull':!![]},'nat':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![],'defaultValue':'force_rport,comedia','set':function(_0x2f95ba){this[_0x5fc6('0x5')](_0x5fc6('0x2c'),_0x2f95ba?_0x2f95ba[_0x5fc6('0x24')](','):null);},'get':function(){return this['getDataValue'](_0x5fc6('0x2c'))?this[_0x5fc6('0xb')](_0x5fc6('0x2c'))[_0x5fc6('0x2d')](','):null;},'comment':_0x5fc6('0x2e')},'callgroup':{'type':Sequelize[_0x5fc6('0x3')]},'namedcallgroup':{'type':Sequelize['STRING']},'pickupgroup':{'type':Sequelize[_0x5fc6('0x3')]},'namedpickupgroup':{'type':Sequelize['STRING']},'language':{'type':Sequelize[_0x5fc6('0x3')],'defaultValue':'en'},'tonezone':{'type':Sequelize[_0x5fc6('0x3')]},'disallow':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x5fc6('0x2f')},'allow':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':![],'defaultValue':'ulaw;alaw;gsm','set':function(_0x4bc3c6){this[_0x5fc6('0x5')](_0x5fc6('0x30'),_0x4bc3c6?_0x4bc3c6[_0x5fc6('0x24')](';'):_0x5fc6('0x31'));},'get':function(){return this[_0x5fc6('0xb')](_0x5fc6('0x30'))?this[_0x5fc6('0xb')](_0x5fc6('0x30'))[_0x5fc6('0x2d')](';'):null;},'comment':_0x5fc6('0x32')},'autoframing':{'type':Sequelize[_0x5fc6('0xe')]('yes','no'),'allowNull':!![]},'insecure':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![],'set':function(_0x28b817){this[_0x5fc6('0x5')](_0x5fc6('0x33'),_0x28b817?_0x28b817[_0x5fc6('0x24')](','):null);},'get':function(){return this['getDataValue']('insecure')?this['getDataValue'](_0x5fc6('0x33'))[_0x5fc6('0x2d')](','):null;},'comment':_0x5fc6('0x34')},'trustrpid':{'type':Sequelize[_0x5fc6('0xe')]('yes','no'),'allowNull':!![],'defaultValue':'no'},'trust_id_outbound':{'type':Sequelize[_0x5fc6('0xe')](_0x5fc6('0x2b'),'no'),'allowNull':!![],'defaultValue':'no'},'progressinband':{'type':Sequelize[_0x5fc6('0xe')](_0x5fc6('0x2b'),'no',_0x5fc6('0x35')),'allowNull':!![]},'promiscredir':{'type':Sequelize[_0x5fc6('0xe')]('yes','no'),'allowNull':!![]},'useclientcode':{'type':Sequelize[_0x5fc6('0xe')]('yes','no'),'allowNull':!![]},'accountcode':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'setvar':{'type':Sequelize['STRING'],'allowNull':!![]},'callerid':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![],'defaultValue':'\x22\x22\x20<>'},'amaflags':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![]},'callcounter':{'type':Sequelize[_0x5fc6('0xe')](_0x5fc6('0x2b'),'no'),'allowNull':!![],'defaultValue':'yes'},'busylevel':{'type':Sequelize[_0x5fc6('0x13')](0xb),'allowNull':!![]},'allowoverlap':{'type':Sequelize['ENUM'](_0x5fc6('0x2b'),'no'),'allowNull':!![]},'allowsubscribe':{'type':Sequelize[_0x5fc6('0xe')]('yes','no'),'allowNull':!![]},'allowtransfer':{'type':Sequelize[_0x5fc6('0xe')]('yes','no'),'allowNull':!![]},'ignoresdpversion':{'type':Sequelize[_0x5fc6('0xe')](_0x5fc6('0x2b'),'no'),'allowNull':!![]},'subscribecontext':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![]},'template':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![]},'videosupport':{'type':Sequelize['ENUM'](_0x5fc6('0x2b'),'no',_0x5fc6('0x36')),'allowNull':!![],'defaultValue':'no'},'maxcallbitrate':{'type':Sequelize[_0x5fc6('0x13')](0xb),'allowNull':!![]},'rfc2833compensate':{'type':Sequelize[_0x5fc6('0xe')]('yes','no'),'allowNull':!![]},'mailbox':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![]},'session_timers':{'type':Sequelize[_0x5fc6('0xe')](_0x5fc6('0x37'),_0x5fc6('0x38'),_0x5fc6('0x39')),'allowNull':!![]},'session_expires':{'type':Sequelize[_0x5fc6('0x13')](0xb),'allowNull':!![]},'session_minse':{'type':Sequelize[_0x5fc6('0x13')](0xb),'allowNull':!![]},'session_refresher':{'type':Sequelize['ENUM'](_0x5fc6('0x3a'),_0x5fc6('0x3b')),'allowNull':!![],'defaultValue':_0x5fc6('0x3b')},'t38pt_usertpsource':{'type':Sequelize['STRING'],'allowNull':!![]},'regexten':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![]},'fromdomain':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![]},'fromuser':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![]},'qualify':{'type':Sequelize[_0x5fc6('0xe')](_0x5fc6('0x2b'),'no'),'allowNull':!![],'defaultValue':_0x5fc6('0x2b')},'keepalive':{'type':Sequelize[_0x5fc6('0x13')](0xb),'allowNull':!![]},'defaultip':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![]},'defaultuser':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![]},'rtptimeout':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'rtpholdtimeout':{'type':Sequelize[_0x5fc6('0x13')](0xb),'allowNull':!![]},'rtpkeepalive':{'type':Sequelize[_0x5fc6('0x13')](0xb),'allowNull':!![]},'sendrpid':{'type':Sequelize[_0x5fc6('0xe')](_0x5fc6('0x2b'),'no'),'allowNull':!![],'defaultValue':'no'},'outboundproxy':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![]},'callbackextension':{'type':Sequelize['STRING'],'allowNull':!![]},'timert1':{'type':Sequelize[_0x5fc6('0x13')](0xb),'allowNull':!![]},'timerb':{'type':Sequelize[_0x5fc6('0x13')](0xb),'allowNull':!![]},'qualifyfreq':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'contactpermit':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![]},'contactdeny':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![]},'contactacl':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![]},'unsolicited_mailbox':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![]},'use_q850_reason':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![]},'maxforwards':{'type':Sequelize[_0x5fc6('0x13')](0xb),'allowNull':!![]},'encryption':{'type':Sequelize[_0x5fc6('0xe')]('yes','no'),'allowNull':!![],'defaultValue':'no'},'avpf':{'type':Sequelize['ENUM']('yes','no'),'allowNull':!![]},'force_avp':{'type':Sequelize[_0x5fc6('0xe')](_0x5fc6('0x2b'),'no'),'allowNull':!![]},'icesupport':{'type':Sequelize[_0x5fc6('0xe')]('yes','no'),'allowNull':!![]},'dtlsenable':{'type':Sequelize[_0x5fc6('0xe')](_0x5fc6('0x2b'),'no'),'allowNull':!![]},'dtlsverify':{'type':Sequelize['ENUM'](_0x5fc6('0x2b'),'no',_0x5fc6('0x3c'),_0x5fc6('0x3d')),'allowNull':!![]},'dtlsrekey':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'dtlscertfile':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![]},'dtlsprivatekey':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![]},'dtlscipher':{'type':Sequelize['STRING'],'allowNull':!![]},'dtlscafile':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![]},'dtlscapath':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![]},'dtlssetup':{'type':Sequelize[_0x5fc6('0xe')](_0x5fc6('0x3e'),_0x5fc6('0x3f'),_0x5fc6('0x40')),'allowNull':!![]},'dtlsfingerprint':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![]},'usereqphone':{'type':Sequelize[_0x5fc6('0xe')](_0x5fc6('0x2b'),'no'),'allowNull':!![],'defaultValue':'no'},'recordonfeature':{'type':Sequelize['STRING'],'allowNull':!![]},'recordofffeature':{'type':Sequelize['STRING'],'allowNull':!![]},'call_limit':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![],'defaultValue':0xa},'registertrying':{'type':Sequelize[_0x5fc6('0xe')]('yes','no'),'allowNull':!![]},'subscribemwi':{'type':Sequelize[_0x5fc6('0xe')](_0x5fc6('0x2b'),'no'),'allowNull':!![]},'vmexten':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![]},'mohinterpret':{'type':Sequelize['STRING'],'allowNull':!![]},'mohsuggest':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![]},'parkinglot':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![]},'canreinvite':{'type':Sequelize[_0x5fc6('0xe')](_0x5fc6('0x2b'),'no',_0x5fc6('0x29'),'update','update,nonat'),'allowNull':!![],'defaultValue':'no'},'loginInPause':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'resetPasswordToken':{'type':Sequelize['STRING']},'resetPasswordExpires':{'type':Sequelize[_0x5fc6('0x17')]},'passwordResetAt':{'type':Sequelize[_0x5fc6('0x17')],'defaultValue':null},'previousPasswords':{'type':Sequelize['TEXT']},'showWebBar':{'type':Sequelize[_0x5fc6('0x13')],'defaultValue':0x0,'set':function(_0x580457){this['setDataValue']('showWebBar',_0x580457);var _0x3efb2e=this['get']({'plain':!![]});switch(_0x580457){case 0x0:case 0x1:var _0x2a6280=_0x3efb2e[_0x5fc6('0x23')]?_[_0x5fc6('0x41')](_0x3efb2e['transport'])?_0x3efb2e[_0x5fc6('0x23')][_0x5fc6('0x24')]():_0x3efb2e[_0x5fc6('0x23')]:'udp';if(_0x2a6280===_0x5fc6('0x42')){_0x2a6280=_0x5fc6('0x22');}this[_0x5fc6('0x5')](_0x5fc6('0x23'),_0x2a6280);this[_0x5fc6('0x5')](_0x5fc6('0x43'),'no');this[_0x5fc6('0x5')](_0x5fc6('0x44'),null);this[_0x5fc6('0x5')](_0x5fc6('0x45'),null);this[_0x5fc6('0x5')](_0x5fc6('0x46'),null);this[_0x5fc6('0x5')]('dtlsenable',null);this[_0x5fc6('0x5')](_0x5fc6('0x47'),null);this[_0x5fc6('0x5')](_0x5fc6('0x48'),null);this[_0x5fc6('0x5')](_0x5fc6('0x49'),null);this['setDataValue']('dtlsprivatekey',null);this[_0x5fc6('0x5')](_0x5fc6('0x4a'),'no');break;case 0x2:this[_0x5fc6('0x5')](_0x5fc6('0x23'),'wss');this[_0x5fc6('0x5')](_0x5fc6('0x43'),_0x5fc6('0x2b'));this[_0x5fc6('0x5')](_0x5fc6('0x44'),_0x5fc6('0x2b'));this['setDataValue'](_0x5fc6('0x45'),_0x5fc6('0x2b'));this[_0x5fc6('0x5')](_0x5fc6('0x46'),_0x5fc6('0x2b'));this['setDataValue'](_0x5fc6('0x4b'),_0x5fc6('0x2b'));this[_0x5fc6('0x5')]('dtlsverify','no');this[_0x5fc6('0x5')](_0x5fc6('0x48'),'actpass');this[_0x5fc6('0x5')](_0x5fc6('0x49'),_0x3efb2e['dtlscertfile']||_0x5fc6('0x4c'));this[_0x5fc6('0x5')]('dtlsprivatekey',_0x3efb2e[_0x5fc6('0x4d')]||_0x5fc6('0x4e'));this[_0x5fc6('0x5')](_0x5fc6('0x4a'),'yes');break;default:}}},'permissions':{'type':Sequelize[_0x5fc6('0x4f')],'set':function(_0x17a346){this[_0x5fc6('0x5')](_0x5fc6('0x50'),_0x17a346?_0x17a346[_0x5fc6('0x24')](','):[]);},'get':function(){return this[_0x5fc6('0xb')](_0x5fc6('0x50'))?_['map'](this['getDataValue'](_0x5fc6('0x50'))[_0x5fc6('0x2d')](','),function(_0x1aa050){return parseInt(_0x1aa050,0xa);}):[];}},'phoneBarUnconditionalNumber':{'type':Sequelize[_0x5fc6('0x3')]},'phoneBarNoReplyNumber':{'type':Sequelize[_0x5fc6('0x3')]},'phoneBarBusyNumber':{'type':Sequelize['STRING']},'phoneBarUnconditional':{'type':Sequelize[_0x5fc6('0x16')],'defaultValue':![]},'phoneBarNoReply':{'type':Sequelize[_0x5fc6('0x16')],'defaultValue':![]},'phoneBarBusy':{'type':Sequelize[_0x5fc6('0x16')],'defaultValue':![]},'phoneBarDnd':{'type':Sequelize[_0x5fc6('0x16')],'defaultValue':!![]},'phoneBarUnansweredCallBadge':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'phoneBarEnableDtmfTone':{'type':Sequelize[_0x5fc6('0x16')],'defaultValue':![]},'phoneBarAutoAnswerDelay':{'type':Sequelize[_0x5fc6('0x13')],'defaultValue':0x0},'extensionMonitor':{'type':Sequelize[_0x5fc6('0x3')],'defaultValue':''},'crudPermissions':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'rtcp_mux':{'type':Sequelize[_0x5fc6('0xe')](_0x5fc6('0x2b'),'no'),'defaultValue':'no'},'allowmessenger':{'type':Sequelize[_0x5fc6('0x16')],'defaultValue':!![]},'phoneBarOutboundProxy':{'type':Sequelize[_0x5fc6('0x3')]},'phoneBarEnableJaws':{'type':Sequelize[_0x5fc6('0x16')],'defaultValue':![]},'phoneBarEnableScreenRecordingByAgent':{'type':Sequelize[_0x5fc6('0x16')],'defaultValue':![]},'phoneBarEnableVideoRecording':{'type':Sequelize[_0x5fc6('0x51')],'get':function(){return this[_0x5fc6('0xb')](_0x5fc6('0x52'))?this[_0x5fc6('0xb')](_0x5fc6('0x52')):![];}},'phoneBarEnableAutomaticScreenRecording':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'phoneBarPrefixRequired':{'type':Sequelize[_0x5fc6('0x16')],'defaultValue':![]},'hotdesk':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'interface':{'type':Sequelize[_0x5fc6('0x3')],'defaultValue':null},'privacyEnabled':{'type':Sequelize[_0x5fc6('0x16')],'defaultValue':![]},'apiKeyNonce':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![]},'apiKeyIat':{'type':Sequelize[_0x5fc6('0x3')],'allowNull':!![]},'screenrecording':{'type':Sequelize[_0x5fc6('0x16')],'defaultValue':![],'set':function(_0x1d6a5b){if(typeof _0x1d6a5b===_0x5fc6('0x53')){var _0x32f586=_0x1d6a5b==='1'?!![]:_0x1d6a5b==='0'?![]:_0x1d6a5b==='true'?!![]:_0x1d6a5b===_0x5fc6('0x54')?![]:![];this['setDataValue']('screenrecording',_0x32f586);}else{this['setDataValue'](_0x5fc6('0x55'),_0x1d6a5b);}}},'blocked':{'type':Sequelize[_0x5fc6('0x16')],'defaultValue':![],'set':function(_0x412733){this[_0x5fc6('0x5')](_0x5fc6('0x56'),_0x412733);if(_0x412733===!![]){this[_0x5fc6('0x5')](_0x5fc6('0x57'),moment());this['setDataValue'](_0x5fc6('0x58'),0x0);}else{this[_0x5fc6('0x5')](_0x5fc6('0x57'),null);}}},'blockedAt':{'type':Sequelize[_0x5fc6('0x17')],'defaultValue':null},'loginAttempts':{'type':Sequelize[_0x5fc6('0x13')],'defaultValue':0x0},'disabled':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'settingsEnabled':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'wssPort':{'type':Sequelize[_0x5fc6('0x13')](0x5)[_0x5fc6('0x59')],'defaultValue':0x1f99},'downloadAttachments':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'downloadOmnichannelInteractions':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'downloadVoiceRecordings':{'type':Sequelize[_0x5fc6('0x16')],'defaultValue':!![]}}; \ No newline at end of file diff --git a/server/api/user/user.controller.js b/server/api/user/user.controller.js index d0adaaa..bad8745 100644 --- a/server/api/user/user.controller.js +++ b/server/api/user/user.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xadb8=['$in','$like','$notLike','$iLike','$notILike','$overlap','$contains','$contained','$any','lastName','Contact','dialActive','getApiKey','retrieveApiKey','token','No\x20API\x20access\x20key\x20found!','You\x20don\x27t\x20have\x20sufficient\x20privileges\x20to\x20access\x20this\x20resource.','generateApiKey','nonce','removeApiKey','apiKeyIat','API\x20key\x20not\x20available','whoami','resolve','teams','queues','inbound','getAgents','toString','asc','desc','substring','uniqBy','orderBy','request','Unable\x20to\x20retrieve\x20RPC\x20agents\x20(AMI)','Unable\x20to\x20retrieve\x20RPC\x20agents\x20(Routing)','offline','idle','unknown','ringing','slice','charAt','toUpperCase','select','ui.','InteractionId','ui.createdAt','_interactions','ui.UserId\x20=\x20?','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','ioredis','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','./user.socket','jayson/promise','client','http','then','request\x20sent','debug','User,\x20%s,\x20%s,\x20%s','stringify','error','code','User,\x20%s,\x20%s','message','info','catch','sendStatus','status','json','offset','undefined','limit','count','Content-Range','apply','update','destroy','get','admin','user','agent','Telephones','telephone','filter','map','value','includes','name','UserProfileResource','end','stack','send','index','User','fieldName','key','salt','query','keys','filters','model','attributes','intersection','length','hasOwnProperty','order','sort','where','pick','merge','type','VIRTUAL','sequelize','lower','col','options','include','push','findAll','rows','openTabs','dataValues','sms','fax','mail','openchannel','whatsapp','all','show','params','differenceBy','password','fields','includeAll','chat','role','find','body','describe','addContacts','omit','Setting','findById','securePassword','max','isNil','min_internal','internal','select\x20(select\x20IFNULL(max(internal)+1,1)\x20from\x20users\x20where\x20internal\x20<\x20md.internal)\x20as\x20\x27from\x27,\x20md.internal\x20-\x201\x20as\x20\x27to\x27\x20from\x20users\x20md\x20where\x20md.internal\x20!=\x201\x20and\x20not\x20exists\x20(select\x201\x20from\x20users\x20md2\x20where\x20md2.internal\x20=\x20md.internal\x20-\x201)','QueryTypes','from','voicemail','mailbox','permissions','101','104','105','106','107','108','109','111','114','115','create','Unauthorized.\x20You\x20must\x20be\x20an\x20administrator\x20in\x20order\x20to\x20create\x20another\x20administrator','checkUserLimits','settingsEnabled','userProfileId','VoiceMail','UserProfileSection','Agents','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','bulkCreate','Unauthorized','some','each','isEmpty','compact','changePassword','ValidationError','Invalid\x20body\x20format.\x20Use\x20oldPassword\x20and\x20newPassword','authenticate','oldPassword','Sequelize','Wrong\x20credentials','newPassword','New\x20password\x20must\x20be\x20different\x20from\x20old\x20password','Invalid\x20body\x20format.\x20Use\x20newPassword','findOne','passwordHistoryLimit','validatePasswordPattern','enforcePasswordHistory','previousPasswords','validatePasswordHistory','channel','online','loginInPause','voicePause','interface','isValidChannel','Unknown\x20channel','add','capitalize','Queues','penalty','spread','ids','toLowerCase','QueueId','emit','voice','VoiceQueue','SIP/%s','UserVoiceQueueRt','upsert','removeQueues','Queue:remove','addAvatar','userpic','file','filename','getAvatar','join','root','server/files/images/logos/default_profile.png','download','existsSync','server/files/images/','getOpenTabs','ChatOpenTabs','CHAT','createdAt','FaxOpenTabs','FAX','OpenchannelOpenTabs','OPENCHANNEL','MailOpenTabs','MAIL','SmsOpenTabs','WhatsappOpenTabs','WHATSAPP','getContacts','CmContact','rawAttributes','List','Tag','Tags','color','nolimit','getQueues','Queue','getVoiceQueuesRt','getGroups','VoiceRecording','ScreenRecording','getChatInteractions','ChatInteraction','getOpenchannelInteractions','OpenchannelInteraction','getMailInteractions','MailInteraction','getSmsInteractions','SmsInteraction','FaxInteraction','getFaxInteractions','getWhatsappInteractions','WhatsappInteraction','phone','mobile','format','intrf','user:%s','user:forcelogout','headers','x-forwarded-for','connection','remoteAddress','socket','UserVoiceQueue.penalty','MemberReport','forEach','YYYY-MM-DD\x20HH:mm:ss','PAUSE','LOGININPAUSE','concat','isMiddleware','logout','pause','QueuePause','updateAttributes','getChannels','DEFAULT\x20PAUSE','unpause','mailPause','chatPause','faxPause','smsPause','whatsapppause','pauseType','manual','set','%s%s','Pause','getTeams','Team','addTeams','setDataValue','getChatQueues','Chat','getMailQueues','Mail','getSmsQueues','Sms','getWhatsappQueues','getFaxQueues','Fax','getOpenchannelQueues','Openchannel','flatten','transaction','getDataValue','Queue:save','removeTeams','getVoiceQueues','Voice','Whatsapp','getLists','values','addChatInteractions','user_has_chat_interactions:save','removeChatInteractions','isArray','user_has_chat_interactions:remove','addMailInteractions','user_has_mail_interactions:save','removeMailInteractions','addFaxInteractions','user_has_fax_interactions:save','removeFaxInteractions','user_has_fax_interactions:remove','addSmsInteractions','user_has_sms_interactions:save','removeSmsInteractions','user_has_sms_interactions:remove','addOpenchannelInteractions','removeOpenchannelInteractions','user_has_openchannel_interactions:remove','addWhatsappInteractions','user_has_whatsapp_interactions:save','removeWhatsappInteractions','getVoicePrefixes','VoicePrefix','getFaxAccounts','addFaxAccounts','removeFaxAccounts','getMailAccounts','addMailAccounts','removeMailAccounts','getOpenchannelAccounts','OpenchannelAccount','addOpenchannelAccounts','removeOpenchannelAccounts','getSmsAccounts','addSmsAccounts','removeSmsAccounts','ChatWebsite','getChatWebsites','addChatWebsites','removeChatWebsites','getWhatsappAccounts','WhatsappAccount','addWhatsappAccounts','removeWhatsappAccounts','getSquareProjects','addSquareProjects','removeSquareProjects','getScheduledCalls','CmHopper','$and','$or','$gt','$gte','$lt','$lte','$ne','$not','$between','$notBetween'];(function(_0xe33285,_0x7f474){var _0x31ca6b=function(_0x51b2a6){while(--_0x51b2a6){_0xe33285['push'](_0xe33285['shift']());}};_0x31ca6b(++_0x7f474);}(_0xadb8,0x1d0));var _0x8adb=function(_0x4227f7,_0x5e2633){_0x4227f7=_0x4227f7-0x0;var _0x4d394e=_0xadb8[_0x4227f7];return _0x4d394e;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x8adb('0x0'));var jsonpatch=require('fast-json-patch');var rp=require(_0x8adb('0x1'));var moment=require(_0x8adb('0x2'));var BPromise=require(_0x8adb('0x3'));var Mustache=require(_0x8adb('0x4'));var util=require(_0x8adb('0x5'));var path=require(_0x8adb('0x6'));var sox=require(_0x8adb('0x7'));var csv=require('to-csv');var ejs=require(_0x8adb('0x8'));var fs=require('fs');var fs_extra=require(_0x8adb('0x9'));var _=require(_0x8adb('0xa'));var squel=require(_0x8adb('0xb'));var crypto=require(_0x8adb('0xc'));var jsforce=require(_0x8adb('0xd'));var deskjs=require(_0x8adb('0xe'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x8adb('0xf'));var values;var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x8adb('0x10'));var logger=require(_0x8adb('0x11'))(_0x8adb('0x12'));var utils=require(_0x8adb('0x13'));var config=require(_0x8adb('0x14'));var licenseUtil=require(_0x8adb('0x15'));var db=require(_0x8adb('0x16'))['db'];config[_0x8adb('0x17')]=_[_0x8adb('0x18')](config[_0x8adb('0x17')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0x8adb('0x19'))['register'](socket);var jayson=require(_0x8adb('0x1a'));var client=jayson[_0x8adb('0x1b')][_0x8adb('0x1c')]({'port':0x232a});function respondWithRpcPromise(_0x52e1d9,_0x20add0,_0x117054,_0x1096fb){return new BPromise(function(_0x3f1ca7,_0x224e6c){var _0x13659c=_0x1096fb||client;return _0x13659c['request'](_0x52e1d9,_0x117054)[_0x8adb('0x1d')](function(_0xe8cfa5){logger['info']('User,\x20%s,\x20%s',_0x20add0,_0x8adb('0x1e'));logger[_0x8adb('0x1f')](_0x8adb('0x20'),_0x20add0,_0x8adb('0x1e'),JSON[_0x8adb('0x21')](_0xe8cfa5));if(_0xe8cfa5[_0x8adb('0x22')]){if(_0xe8cfa5[_0x8adb('0x22')][_0x8adb('0x23')]===0x1f4){logger[_0x8adb('0x22')](_0x8adb('0x24'),_0x20add0,_0xe8cfa5[_0x8adb('0x22')][_0x8adb('0x25')]);return _0x224e6c(_0xe8cfa5['error']['message']);}logger[_0x8adb('0x22')](_0x8adb('0x24'),_0x20add0,_0xe8cfa5['error'][_0x8adb('0x25')]);return _0x3f1ca7(_0xe8cfa5[_0x8adb('0x22')][_0x8adb('0x25')]);}else{logger[_0x8adb('0x26')](_0x8adb('0x24'),_0x20add0,_0x8adb('0x1e'));_0x3f1ca7(_0xe8cfa5['result'][_0x8adb('0x25')]);}})[_0x8adb('0x27')](function(_0x234ef2){logger['error'](_0x8adb('0x24'),_0x20add0,_0x234ef2);_0x224e6c(_0x234ef2);});});}function respondWithStatusCode(_0x190689,_0x2892bb){_0x2892bb=_0x2892bb||0xcc;return function(_0xd49f8f){if(_0xd49f8f){return _0x190689[_0x8adb('0x28')](_0x2892bb);}return _0x190689[_0x8adb('0x29')](_0x2892bb)['end']();};}function respondWithResult(_0x37ad71,_0x16f724){_0x16f724=_0x16f724||0xc8;return function(_0x18f94e){if(_0x18f94e){return _0x37ad71[_0x8adb('0x29')](_0x16f724)[_0x8adb('0x2a')](_0x18f94e);}};}function respondWithFilteredResult(_0x4aca77,_0x3faee9){return function(_0x5c5a7b){if(_0x5c5a7b){var _0x410daf=typeof _0x3faee9[_0x8adb('0x2b')]===_0x8adb('0x2c')&&typeof _0x3faee9[_0x8adb('0x2d')]==='undefined';var _0x3ed9e9=_0x5c5a7b['count'];var _0x2c582b=_0x410daf?0x0:_0x3faee9[_0x8adb('0x2b')];var _0x12f552=_0x410daf?_0x5c5a7b[_0x8adb('0x2e')]:_0x3faee9['offset']+_0x3faee9[_0x8adb('0x2d')];var _0x57a12c;if(_0x12f552>=_0x3ed9e9){_0x12f552=_0x3ed9e9;_0x57a12c=0xc8;}else{_0x57a12c=0xce;}_0x4aca77[_0x8adb('0x29')](_0x57a12c);return _0x4aca77['set'](_0x8adb('0x2f'),_0x2c582b+'-'+_0x12f552+'/'+_0x3ed9e9)[_0x8adb('0x2a')](_0x5c5a7b);}return null;};}function patchUpdates(_0x41e2ce){return function(_0x1cb97c){try{jsonpatch[_0x8adb('0x30')](_0x1cb97c,_0x41e2ce,!![]);}catch(_0xbbb350){return BPromise['reject'](_0xbbb350);}return _0x1cb97c['save']();};}function saveUpdates(_0x3b253b,_0x46fc72){return function(_0x429d5a){if(_0x429d5a){return _0x429d5a[_0x8adb('0x31')](_0x3b253b)[_0x8adb('0x1d')](function(_0x259137){return _0x259137;});}return null;};}function removeEntity(_0x28f2a3,_0xdabe8e){return function(_0x20a7d6){if(_0x20a7d6){return _0x20a7d6[_0x8adb('0x32')]()[_0x8adb('0x1d')](function(){var _0x3c4f7c=_0x20a7d6[_0x8adb('0x33')]({'plain':!![]});if(_0x3c4f7c['role']===_0x8adb('0x34'))return;var _0x420ae0=[{'name':'Users','value':_0x8adb('0x35'),'ignore':!![]},{'name':'Agents','value':_0x8adb('0x36'),'ignore':![]},{'name':_0x8adb('0x37'),'value':_0x8adb('0x38'),'ignore':![]}];var _0x108a80=_(_0x420ae0)[_0x8adb('0x39')]('ignore')[_0x8adb('0x3a')]('value')[_0x8adb('0x3b')]();if(_[_0x8adb('0x3c')](_0x108a80,_0x3c4f7c['role'])){return;}var _0x75bc9f=_['find'](_0x420ae0,[_0x8adb('0x3b'),_0x3c4f7c['role']])[_0x8adb('0x3d')];return db[_0x8adb('0x3e')][_0x8adb('0x32')]({'where':{'type':_0x75bc9f,'resourceId':_0x3c4f7c['id']}})['then'](function(){return _0x20a7d6;});})['then'](function(){_0x28f2a3[_0x8adb('0x29')](0xcc)[_0x8adb('0x3f')]();});}};}function handleEntityNotFound(_0x4fc1cb,_0x1f6481){return function(_0x13589b){if(!_0x13589b){_0x4fc1cb[_0x8adb('0x28')](0x194);}return _0x13589b;};}function handleError(_0x3872c9,_0x922b58){_0x922b58=_0x922b58||0x1f4;return function(_0x169623){logger[_0x8adb('0x22')](_0x169623[_0x8adb('0x40')]);if(_0x169623['name']){delete _0x169623['name'];}_0x3872c9[_0x8adb('0x29')](_0x922b58)[_0x8adb('0x41')](_0x169623);};}exports[_0x8adb('0x42')]=function(_0x2f9228,_0x4fa8d7){var _0x29d16d={},_0x59ff7f={},_0x26abec={'count':0x0,'rows':[]};var _0x32b764=_[_0x8adb('0x3a')](db[_0x8adb('0x43')]['rawAttributes'],function(_0x4ef5a3){return{'name':_0x4ef5a3[_0x8adb('0x44')],'type':_0x4ef5a3['type'][_0x8adb('0x45')]};});_0x59ff7f['model']=_['differenceBy'](_[_0x8adb('0x3a')](_0x32b764,_0x8adb('0x3d')),['password',_0x8adb('0x46')]);_0x59ff7f[_0x8adb('0x47')]=_[_0x8adb('0x48')](_0x2f9228[_0x8adb('0x47')]);_0x59ff7f[_0x8adb('0x49')]=_['intersection'](_0x59ff7f[_0x8adb('0x4a')],_0x59ff7f['query']);_0x29d16d[_0x8adb('0x4b')]=_[_0x8adb('0x4c')](_0x59ff7f['model'],qs['fields'](_0x2f9228[_0x8adb('0x47')]['fields']));_0x29d16d[_0x8adb('0x4b')]=_0x29d16d[_0x8adb('0x4b')][_0x8adb('0x4d')]?_0x29d16d[_0x8adb('0x4b')]:_0x59ff7f['model'];if(!_0x2f9228[_0x8adb('0x47')][_0x8adb('0x4e')]('nolimit')){_0x29d16d['limit']=qs[_0x8adb('0x2d')](_0x2f9228[_0x8adb('0x47')][_0x8adb('0x2d')]);_0x29d16d['offset']=qs[_0x8adb('0x2b')](_0x2f9228[_0x8adb('0x47')][_0x8adb('0x2b')]);}_0x29d16d[_0x8adb('0x4f')]=qs[_0x8adb('0x50')](_0x2f9228[_0x8adb('0x47')][_0x8adb('0x50')]);_0x29d16d[_0x8adb('0x51')]=qs[_0x8adb('0x49')](_[_0x8adb('0x52')](_0x2f9228[_0x8adb('0x47')],_0x59ff7f[_0x8adb('0x49')]),_0x32b764);if(_0x2f9228['query'][_0x8adb('0x39')]){_0x29d16d[_0x8adb('0x51')]=_[_0x8adb('0x53')](_0x29d16d[_0x8adb('0x51')],{'$or':_[_0x8adb('0x3a')](_0x32b764,function(_0x1fcbd4){if(_0x1fcbd4[_0x8adb('0x54')]!==_0x8adb('0x55')){return db[_0x8adb('0x56')][_0x8adb('0x51')](db['sequelize']['fn'](_0x8adb('0x57'),db[_0x8adb('0x56')][_0x8adb('0x58')](_0x1fcbd4[_0x8adb('0x3d')])),{'$like':db[_0x8adb('0x56')]['fn'](_0x8adb('0x57'),'%'+_0x2f9228[_0x8adb('0x47')][_0x8adb('0x39')]+'%')});}})});}_0x29d16d=_['merge']({},_0x29d16d,_0x2f9228[_0x8adb('0x59')]);var _0xa1ebbe={'where':_0x29d16d[_0x8adb('0x51')]};return db[_0x8adb('0x43')]['count'](_0xa1ebbe)[_0x8adb('0x1d')](function(_0x2c4e7e){_0x26abec[_0x8adb('0x2e')]=_0x2c4e7e;if(_0x2f9228[_0x8adb('0x47')]['includeAll']){_0x29d16d[_0x8adb('0x5a')]=[{'all':!![]}];}if(!_[_0x8adb('0x3c')](_0x29d16d[_0x8adb('0x4b')],'id')){_0x29d16d[_0x8adb('0x4b')][_0x8adb('0x5b')]('id');}return db[_0x8adb('0x43')][_0x8adb('0x5c')](_0x29d16d);})[_0x8adb('0x1d')](function(_0xa3caed){_0x26abec[_0x8adb('0x5d')]=_0xa3caed;if(_0x2f9228[_0x8adb('0x47')][_0x8adb('0x5e')]==='true'){var _0x4329b0=[];for(var _0x492a60=0x0;_0x492a60<_0x26abec['rows'][_0x8adb('0x4d')];_0x492a60++){_0x4329b0[_0x8adb('0x5b')](get_open_tabs('chat',_0x26abec[_0x8adb('0x5d')][_0x492a60][_0x8adb('0x5f')]));_0x4329b0[_0x8adb('0x5b')](get_open_tabs(_0x8adb('0x60'),_0x26abec['rows'][_0x492a60][_0x8adb('0x5f')]));_0x4329b0['push'](get_open_tabs(_0x8adb('0x61'),_0x26abec[_0x8adb('0x5d')][_0x492a60][_0x8adb('0x5f')]));_0x4329b0['push'](get_open_tabs(_0x8adb('0x62'),_0x26abec['rows'][_0x492a60][_0x8adb('0x5f')]));_0x4329b0[_0x8adb('0x5b')](get_open_tabs(_0x8adb('0x63'),_0x26abec['rows'][_0x492a60][_0x8adb('0x5f')]));_0x4329b0[_0x8adb('0x5b')](get_open_tabs(_0x8adb('0x64'),_0x26abec[_0x8adb('0x5d')][_0x492a60]['dataValues']));}return BPromise[_0x8adb('0x65')](_0x4329b0)[_0x8adb('0x1d')](function(_0x4cac09){return _0x26abec;});}else{return _0x26abec;}})[_0x8adb('0x1d')](respondWithFilteredResult(_0x4fa8d7,_0x29d16d))[_0x8adb('0x27')](handleError(_0x4fa8d7,null));};exports[_0x8adb('0x66')]=function(_0x583622,_0x21f8ae){var _0xbc1014={'raw':![],'where':{'id':_0x583622[_0x8adb('0x67')]['id']}},_0x2efe02={};_0x2efe02['model']=_[_0x8adb('0x68')](_['keys'](db['User']['rawAttributes']),[_0x8adb('0x69'),_0x8adb('0x46')]);_0x2efe02[_0x8adb('0x47')]=_['keys'](_0x583622[_0x8adb('0x47')]);_0x2efe02['filters']=_[_0x8adb('0x4c')](_0x2efe02[_0x8adb('0x4a')],_0x2efe02[_0x8adb('0x47')]);_0xbc1014[_0x8adb('0x4b')]=_[_0x8adb('0x4c')](_0x2efe02[_0x8adb('0x4a')],qs[_0x8adb('0x6a')](_0x583622[_0x8adb('0x47')][_0x8adb('0x6a')]));_0xbc1014['attributes']=_0xbc1014[_0x8adb('0x4b')][_0x8adb('0x4d')]?_0xbc1014[_0x8adb('0x4b')]:_0x2efe02[_0x8adb('0x4a')];if(_0x583622['query'][_0x8adb('0x6b')]){_0xbc1014['include']=[{'all':!![]}];}_0xbc1014=_[_0x8adb('0x53')]({},_0xbc1014,_0x583622[_0x8adb('0x59')]);if(!_[_0x8adb('0x3c')](_0xbc1014[_0x8adb('0x4b')],'id')){_0xbc1014['attributes'][_0x8adb('0x5b')]('id');}return db[_0x8adb('0x43')]['find'](_0xbc1014)['then'](handleEntityNotFound(_0x21f8ae,null))['then'](function(_0x366b92){var _0x33e01e=[];values=_0x366b92;if(_0x583622[_0x8adb('0x47')]['openTabs']==='true'){_0x33e01e[_0x8adb('0x5b')](get_open_tabs(_0x8adb('0x6c'),_0x366b92[_0x8adb('0x5f')]));_0x33e01e['push'](get_open_tabs(_0x8adb('0x60'),_0x366b92[_0x8adb('0x5f')]));_0x33e01e[_0x8adb('0x5b')](get_open_tabs(_0x8adb('0x63'),_0x366b92[_0x8adb('0x5f')]));_0x33e01e[_0x8adb('0x5b')](get_open_tabs('whatsapp',_0x366b92[_0x8adb('0x5f')]));_0x33e01e['push'](get_open_tabs('fax',_0x366b92[_0x8adb('0x5f')]));_0x33e01e[_0x8adb('0x5b')](get_open_tabs(_0x8adb('0x62'),_0x366b92['dataValues']));return BPromise['all'](_0x33e01e);}else{return values;}})[_0x8adb('0x1d')](function(_0x41b2a1){return values;})[_0x8adb('0x1d')](respondWithResult(_0x21f8ae,null))[_0x8adb('0x27')](handleError(_0x21f8ae,null));};exports[_0x8adb('0x31')]=function(_0x56437a,_0x116ae9){if(_0x56437a['body']['id']){delete _0x56437a['body']['id'];}delete _0x56437a['body'][_0x8adb('0x6d')];return db['User'][_0x8adb('0x6e')]({'where':{'id':_0x56437a[_0x8adb('0x67')]['id']}})[_0x8adb('0x1d')](handleEntityNotFound(_0x116ae9,null))['then'](saveUpdates(_0x56437a[_0x8adb('0x6f')],null))[_0x8adb('0x1d')](respondWithResult(_0x116ae9,null))[_0x8adb('0x27')](handleError(_0x116ae9,null));};exports['describe']=function(_0x537175,_0x3bd7dc){return db[_0x8adb('0x43')][_0x8adb('0x70')]()[_0x8adb('0x1d')](respondWithResult(_0x3bd7dc,null))[_0x8adb('0x27')](handleError(_0x3bd7dc,null));};exports['addContacts']=function(_0x44b128,_0xeb23c2,_0x22295d){return db[_0x8adb('0x43')]['find']({'where':{'id':_0x44b128[_0x8adb('0x67')]['id']}})[_0x8adb('0x1d')](handleEntityNotFound(_0xeb23c2,null))[_0x8adb('0x1d')](function(_0x3353ae){if(_0x3353ae){return _0x3353ae[_0x8adb('0x71')](_0x44b128[_0x8adb('0x6f')]['ids'],_[_0x8adb('0x72')](_0x44b128[_0x8adb('0x6f')],['ids','id'])||{});}})[_0x8adb('0x1d')](respondWithResult(_0xeb23c2,null))[_0x8adb('0x27')](handleError(_0xeb23c2,null));};function validateUser(_0x346192){return new BPromise(function(_0xce8af7,_0xcd9b89){if(_0x346192['internal'])return _0xce8af7(_0x346192);return db[_0x8adb('0x73')][_0x8adb('0x74')](0x1)[_0x8adb('0x1d')](function(_0x2fb4df){if(_0x2fb4df[_0x8adb('0x75')])authService['validatePasswordPattern'](_0x346192[_0x8adb('0x69')]);db[_0x8adb('0x43')][_0x8adb('0x76')]('internal')[_0x8adb('0x1d')](function(_0x27f8fc){if(_[_0x8adb('0x77')](_0x27f8fc)){_0x346192['internal']=_0x2fb4df[_0x8adb('0x78')]||0x1;return;}if(_[_0x8adb('0x77')](_0x2fb4df[_0x8adb('0x78')])||_0x2fb4df[_0x8adb('0x78')]===_0x27f8fc){_0x346192[_0x8adb('0x79')]=_0x27f8fc+0x1;return;}if(_0x2fb4df[_0x8adb('0x78')]>_0x27f8fc){_0x346192[_0x8adb('0x79')]=_0x2fb4df['min_internal'];return;}return db['sequelize'][_0x8adb('0x47')](_0x8adb('0x7a'),{'type':db[_0x8adb('0x56')][_0x8adb('0x7b')]['SELECT']})[_0x8adb('0x1d')](function(_0xe747a1){if(_0xe747a1&&_0xe747a1[_0x8adb('0x4d')]){for(var _0x28dab2=0x0,_0x2403f8=_0xe747a1[_0x8adb('0x4d')];_0x28dab2<_0x2403f8&&_[_0x8adb('0x77')](_0x346192[_0x8adb('0x79')]);_0x28dab2++){if(_0x2fb4df[_0x8adb('0x78')]<=_0xe747a1[_0x28dab2][_0x8adb('0x7c')]){_0x346192[_0x8adb('0x79')]=_0xe747a1[_0x28dab2]['from'];}else if(_0x2fb4df[_0x8adb('0x78')]>_0xe747a1[_0x28dab2][_0x8adb('0x7c')]&&_0x2fb4df[_0x8adb('0x78')]<=_0xe747a1[_0x28dab2]['to']){_0x346192[_0x8adb('0x79')]=_0x2fb4df[_0x8adb('0x78')];}}}if(_[_0x8adb('0x77')](_0x346192['internal'])){_0x346192['internal']=_0x27f8fc+0x1;}return _0xce8af7(_0x346192);});});})[_0x8adb('0x27')](function(_0x1ba265){_0xcd9b89(_0x1ba265);});});}function updateUser(_0x8af633){return new BPromise(function(_0x428052,_0x104e50){try{if(_0x8af633[_0x8adb('0x7d')]){_0x8af633[_0x8adb('0x7e')]=_0x8af633[_0x8adb('0x79')];_0x8af633['VoiceMail']={'mailbox':_0x8af633['internal'],'password':_0x8af633[_0x8adb('0x69')],'fullname':_0x8af633['fullname'],'email':_0x8af633['email']};}if(_0x8af633['role']===_0x8adb('0x36')){if(!_0x8af633['permissions'])_0x8af633[_0x8adb('0x7f')]=[_0x8adb('0x80'),'102','103','113','110',_0x8adb('0x81'),_0x8adb('0x82'),_0x8adb('0x83'),_0x8adb('0x84'),_0x8adb('0x85'),_0x8adb('0x86'),'100',_0x8adb('0x87'),_0x8adb('0x88'),_0x8adb('0x89')];}_0x428052(_0x8af633);}catch(_0x176cef){_0x104e50(_0x176cef);}});}exports[_0x8adb('0x8a')]=function(_0x4a44d1,_0x5284d6){if(_0x4a44d1[_0x8adb('0x35')][_0x8adb('0x6d')]==='agent')throw new Error('Unauthorized');if(_0x4a44d1[_0x8adb('0x6f')][_0x8adb('0x6d')]===_0x8adb('0x35')&&_0x4a44d1[_0x8adb('0x35')][_0x8adb('0x6d')]!==_0x8adb('0x34')){throw new Error('Unauthorized.\x20You\x20must\x20be\x20an\x20administrator\x20in\x20order\x20to\x20create\x20an\x20user');}if(_0x4a44d1[_0x8adb('0x6f')][_0x8adb('0x6d')]==='admin'&&_0x4a44d1[_0x8adb('0x35')][_0x8adb('0x6d')]!=='admin'){throw new Error(_0x8adb('0x8b'));}return licenseUtil[_0x8adb('0x8c')]([_0x4a44d1[_0x8adb('0x6f')]])[_0x8adb('0x1d')](function(){return validateUser(_0x4a44d1[_0x8adb('0x6f')]);})['then'](function(_0x392ab1){return updateUser(_0x392ab1)[_0x8adb('0x1d')](function(_0x4c8a42){if(_0x4c8a42['role']===_0x8adb('0x34')){_0x4c8a42['settingsEnabled']=_0x4a44d1[_0x8adb('0x35')][_0x8adb('0x8d')];delete _0x4c8a42[_0x8adb('0x8e')];}return _0x4c8a42;});})[_0x8adb('0x1d')](function(_0x536888){return db['User']['create'](_0x536888,{'include':[{'model':db[_0x8adb('0x8f')],'as':_0x8adb('0x8f')}]});})['then'](function(_0x349128){if(_0x4a44d1[_0x8adb('0x6f')][_0x8adb('0x6d')]===_0x8adb('0x35'))return _0x349128;if(_0x4a44d1['user']['role']!==_0x8adb('0x35'))return _0x349128;return db[_0x8adb('0x90')][_0x8adb('0x6e')]({'where':{'name':_0x349128[_0x8adb('0x6d')]===_0x8adb('0x36')?_0x8adb('0x91'):_0x8adb('0x37'),'userProfileId':_0x4a44d1[_0x8adb('0x35')][_0x8adb('0x8e')]},'raw':!![]})[_0x8adb('0x1d')](function(_0x334ede){if(!_0x334ede||_0x334ede[_0x8adb('0x92')]!=0x0)return _0x349128;return db['UserProfileResource']['create']({'name':_0x349128[_0x8adb('0x3d')],'resourceId':_0x349128['id'],'type':_0x334ede[_0x8adb('0x3d')],'sectionId':_0x334ede['id']},{})[_0x8adb('0x1d')](function(){return _0x349128;});})[_0x8adb('0x27')](function(_0x5b3072){logger[_0x8adb('0x22')](_0x8adb('0x93'),_0x5b3072);throw _0x5b3072;});})['then'](respondWithResult(_0x5284d6,0xc9))[_0x8adb('0x27')](handleError(_0x5284d6,null));};exports[_0x8adb('0x94')]=function(_0x2c5d87,_0x588937){var _0x13c9cc=_0x2c5d87[_0x8adb('0x6f')];var _0x22bf4f=[];if(_0x2c5d87[_0x8adb('0x35')][_0x8adb('0x6d')]===_0x8adb('0x36'))throw new Error(_0x8adb('0x95'));if(_[_0x8adb('0x96')](_0x13c9cc,[_0x8adb('0x6d'),_0x8adb('0x35')])&&_0x2c5d87['user'][_0x8adb('0x6d')]!==_0x8adb('0x34')){throw new Error('Unauthorized.\x20You\x20must\x20be\x20an\x20administrator\x20in\x20order\x20to\x20create\x20an\x20user');}if(_[_0x8adb('0x96')](_0x13c9cc,[_0x8adb('0x6d'),_0x8adb('0x34')])&&_0x2c5d87['user'][_0x8adb('0x6d')]!==_0x8adb('0x34')){throw new Error('Unauthorized.\x20You\x20must\x20be\x20an\x20administrator\x20in\x20order\x20to\x20create\x20an\x20administrator');}return licenseUtil[_0x8adb('0x8c')](_0x13c9cc)[_0x8adb('0x1d')](function(){return validateUser(_0x13c9cc[0x0]);})[_0x8adb('0x1d')](function(){for(var _0xcc94a8=0x1;_0xcc94a8<_0x13c9cc[_0x8adb('0x4d')];_0xcc94a8++){var _0x446f52=_0x13c9cc[_0xcc94a8-0x1][_0x8adb('0x79')];if(!_0x13c9cc[_0xcc94a8][_0x8adb('0x79')])_0x13c9cc[_0xcc94a8]['internal']=_0x446f52+0x1;_0x22bf4f[_0x8adb('0x5b')](validateUser(_0x13c9cc[_0xcc94a8]));}return BPromise[_0x8adb('0x65')](_0x22bf4f);})[_0x8adb('0x1d')](function(){_0x22bf4f=[];for(var _0x389243=0x0;_0x389243<_0x13c9cc['length'];_0x389243++){_0x22bf4f['push'](updateUser(_0x13c9cc[_0x389243]));}return BPromise['all'](_0x22bf4f);})[_0x8adb('0x1d')](function(){return BPromise[_0x8adb('0x97')](_0x13c9cc,function(_0x4c4941){return db[_0x8adb('0x43')]['create'](_0x4c4941,{'include':[{'model':db[_0x8adb('0x8f')],'as':_0x8adb('0x8f')}]})[_0x8adb('0x1d')](function(_0x186c4a){_0x4c4941['id']=_0x186c4a['id'];return _0x4c4941;});});})[_0x8adb('0x1d')](function(_0x3aed26){if(_0x2c5d87[_0x8adb('0x6f')][_0x8adb('0x6d')]==='user')return _0x3aed26;if(_0x2c5d87[_0x8adb('0x35')]['role']!=='user')return _0x3aed26;var _0x24aad6=_[_0x8adb('0x96')](_0x3aed26,function(_0x5961ac){return _0x5961ac[_0x8adb('0x6d')]===_0x8adb('0x36')||_0x5961ac[_0x8adb('0x6d')]===_0x8adb('0x38');});if(!_0x24aad6)return _0x3aed26;return db['UserProfileSection'][_0x8adb('0x5c')]({'where':{'name':{'$or':[_0x8adb('0x91'),'Telephones']},'userProfileId':_0x2c5d87[_0x8adb('0x35')][_0x8adb('0x8e')]},'raw':!![]})[_0x8adb('0x1d')](function(_0x3c8323){if(_[_0x8adb('0x98')](_0x3c8323)||!_['some'](_0x3c8323,[_0x8adb('0x92'),0x0]))return _0x3aed26;_0x22bf4f=[];var _0x2ebb9d=_(_0x3c8323)[_0x8adb('0x3a')](function(_0x37daf1){if(_0x37daf1[_0x8adb('0x92')]===0x1)return;return _0x37daf1['name']===_0x8adb('0x91')?_0x8adb('0x36'):_0x8adb('0x38');})[_0x8adb('0x99')]()[_0x8adb('0x3b')]();for(var _0x4e9c15=0x0;_0x4e9c15<_0x3aed26['length'];_0x4e9c15++){if(!_[_0x8adb('0x3c')](_0x2ebb9d,_0x3aed26[_0x4e9c15][_0x8adb('0x6d')]))return;var _0x38d50a=_0x3aed26[_0x4e9c15][_0x8adb('0x6d')]===_0x8adb('0x36')?_0x8adb('0x91'):_0x8adb('0x37');_0x22bf4f[_0x8adb('0x5b')](db[_0x8adb('0x3e')]['create']({'name':_0x3aed26[_0x4e9c15][_0x8adb('0x3d')],'resourceId':_0x3aed26[_0x4e9c15]['id'],'type':_0x38d50a,'sectionId':_[_0x8adb('0x6e')](_0x3c8323,[_0x8adb('0x3d'),_0x38d50a])['id']},{}));}return BPromise['all'](_0x22bf4f);});})[_0x8adb('0x1d')](respondWithResult(_0x588937,0xc9))[_0x8adb('0x27')](handleError(_0x588937,null));};exports[_0x8adb('0x9a')]=function(_0x44236b,_0x24dc71,_0x3325b8){if(_0x44236b['body']['id']){delete _0x44236b['body']['id'];}return db[_0x8adb('0x43')]['find']({'where':{'id':_0x44236b[_0x8adb('0x67')]['id']}})[_0x8adb('0x1d')](function(_0x28ab46){if(!_0x28ab46)return null;if(_0x28ab46['id']===_0x44236b[_0x8adb('0x35')]['id']){if(!_0x44236b['body']['oldPassword']||!_0x44236b[_0x8adb('0x6f')]['newPassword']){throw new db['Sequelize'][(_0x8adb('0x9b'))](_0x8adb('0x9c'));}if(!_0x28ab46[_0x8adb('0x9d')](_0x44236b['body'][_0x8adb('0x9e')])){throw new db[(_0x8adb('0x9f'))][(_0x8adb('0x9b'))](_0x8adb('0xa0'));}if(_0x44236b[_0x8adb('0x6f')][_0x8adb('0x9e')]===_0x44236b[_0x8adb('0x6f')][_0x8adb('0xa1')]){throw new db['Sequelize'][(_0x8adb('0x9b'))](_0x8adb('0xa2'));}}else if(_0x44236b[_0x8adb('0x35')][_0x8adb('0x6d')]==='admin'){if(!_0x44236b[_0x8adb('0x6f')][_0x8adb('0xa1')]){throw new db['Sequelize'][(_0x8adb('0x9b'))](_0x8adb('0xa3'));}}else if(_0x44236b['user'][_0x8adb('0x6d')]===_0x8adb('0x35')){if(!_0x44236b[_0x8adb('0x6f')][_0x8adb('0xa1')]){throw new db[(_0x8adb('0x9f'))][(_0x8adb('0x9b'))](_0x8adb('0xa3'));}if(_0x28ab46[_0x8adb('0x6d')]!==_0x8adb('0x36')){throw new db[(_0x8adb('0x9f'))][(_0x8adb('0x9b'))](_0x8adb('0x95'));}}else{throw new db[(_0x8adb('0x9f'))][(_0x8adb('0x9b'))](_0x8adb('0x95'));}return _0x28ab46;})['then'](handleEntityNotFound(_0x24dc71,null))[_0x8adb('0x1d')](function(_0x498104){return db[_0x8adb('0x73')][_0x8adb('0xa4')]({'attributes':['id',_0x8adb('0x75'),'enforcePasswordHistory',_0x8adb('0xa5')]})[_0x8adb('0x1d')](function(_0x3704a0){if(_0x3704a0['securePassword'])authService[_0x8adb('0xa6')](_0x44236b[_0x8adb('0x6f')]['newPassword']);if(!_0x3704a0[_0x8adb('0xa7')]||!_0x498104[_0x8adb('0xa8')])return _0x498104;authService[_0x8adb('0xa9')](_0x44236b[_0x8adb('0x6f')][_0x8adb('0xa1')],_0x498104[_0x8adb('0xa8')],_0x3704a0[_0x8adb('0xa5')]);return _0x498104;})[_0x8adb('0x1d')](saveUpdates({'password':_0x44236b[_0x8adb('0x6f')]['newPassword'],'passwordResetAt':_0x44236b[_0x8adb('0x35')]['id']==_0x44236b[_0x8adb('0x67')]['id']?moment():null,'previousPasswords':authService['updatePasswordsHistory'](_0x44236b[_0x8adb('0x6f')]['newPassword'],_0x498104[_0x8adb('0xa8')])},null));})[_0x8adb('0x1d')](respondWithResult(_0x24dc71,null))[_0x8adb('0x27')](handleError(_0x24dc71,null));};exports['addQueues']=function(_0x417e76,_0x148c60,_0x56e60e){var _0x5991b8=_0x417e76[_0x8adb('0x6f')][_0x8adb('0xaa')];return db[_0x8adb('0x43')]['find']({'where':{'id':_0x417e76[_0x8adb('0x67')]['id']},'attributes':['id','name',_0x8adb('0x6d'),_0x8adb('0xab'),_0x8adb('0xac'),_0x8adb('0xad'),_0x8adb('0xae')]})[_0x8adb('0x1d')](handleEntityNotFound(_0x148c60,null))[_0x8adb('0x1d')](function(_0x5effb2){if(_0x5effb2){if(!utils[_0x8adb('0xaf')](_0x5991b8)){throw new db[(_0x8adb('0x9f'))]['ValidationError'](_0x8adb('0xb0'));}return _0x5effb2[_0x8adb('0xb1')+_[_0x8adb('0xb2')](_0x5991b8['toLowerCase']())+_0x8adb('0xb3')](_0x417e76[_0x8adb('0x6f')]['ids'],{'penalty':_0x417e76[_0x8adb('0x6f')][_0x8adb('0xb4')]||0x0})[_0x8adb('0xb5')](function(_0x374d65){for(var _0x56ed25=0x0;_0x56ed25<_0x417e76[_0x8adb('0x6f')][_0x8adb('0xb6')]['length'];_0x56ed25+=0x1){var _0x2e5eb5={'UserId':_0x417e76[_0x8adb('0x67')]['id']};_0x2e5eb5[_[_0x8adb('0xb2')](_0x5991b8[_0x8adb('0xb7')]())+_0x8adb('0xb8')]=_0x417e76[_0x8adb('0x6f')][_0x8adb('0xb6')][_0x56ed25];socket[_0x8adb('0xb9')](_0x8adb('0x35')+_['capitalize'](_0x5991b8['toLowerCase']())+'Queue:save',_0x2e5eb5);}return _0x374d65;})[_0x8adb('0x1d')](function(){if(_0x5991b8===_0x8adb('0xba')){return db[_0x8adb('0xbb')][_0x8adb('0x5c')]({'where':{'id':_0x417e76[_0x8adb('0x6f')]['ids']||[]},'raw':!![],'attributes':['id',_0x8adb('0x3d')]});}})[_0x8adb('0x1d')](function(_0x163c9b){var _0x440906=_0x5effb2[_0x8adb('0x33')]({'plain':!![]});var _0x568ad7=[];if(_0x5991b8===_0x8adb('0xba')&&_0x440906['role']===_0x8adb('0x36')&&_0x440906[_0x8adb('0xab')]){for(var _0x56126f=0x0;_0x56126f<_0x163c9b['length'];_0x56126f+=0x1){_0x568ad7[_0x8adb('0x5b')]({'membername':_0x440906[_0x8adb('0x3d')],'UserId':_0x440906['id'],'queue_name':_0x163c9b[_0x56126f][_0x8adb('0x3d')],'VoiceQueueId':_0x163c9b[_0x56126f]['id'],'interface':_[_0x8adb('0x77')](_0x440906[_0x8adb('0xae')])?util['format'](_0x8adb('0xbc'),_0x440906['name']):_0x440906[_0x8adb('0xae')],'paused':_0x440906['voicePause']||![],'penalty':_0x417e76[_0x8adb('0x6f')]['penalty']||0x0});}return BPromise[_0x8adb('0x97')](_0x568ad7,function(_0x44204e){return db[_0x8adb('0xbd')][_0x8adb('0xbe')](_0x44204e);});}return _0x5effb2;});}})[_0x8adb('0x1d')](respondWithStatusCode(_0x148c60,null))[_0x8adb('0x27')](handleError(_0x148c60,null));};exports[_0x8adb('0xbf')]=function(_0xab5443,_0xab65fe,_0x455b78){var _0x28977c;return db[_0x8adb('0x43')]['find']({'where':{'id':_0xab5443['params']['id']},'attributes':['id','name',_0x8adb('0x6d')]})[_0x8adb('0x1d')](handleEntityNotFound(_0xab65fe,null))['then'](function(_0x159720){if(_0x159720){_0x28977c=_0x159720;if(!_0xab5443[_0x8adb('0x47')][_0x8adb('0xaa')]||!utils[_0x8adb('0xaf')](_0xab5443['query'][_0x8adb('0xaa')])){throw new db[(_0x8adb('0x9f'))][(_0x8adb('0x9b'))]('Unknown\x20channel');}return _0x159720['remove'+_[_0x8adb('0xb2')](_0xab5443[_0x8adb('0x47')]['channel'][_0x8adb('0xb7')]())+'Queues'](_0xab5443['query'][_0x8adb('0xb6')]);}})[_0x8adb('0x1d')](function(_0x358f64){for(var _0x355afd=0x0;_0x355afd<_0xab5443[_0x8adb('0x47')][_0x8adb('0xb6')][_0x8adb('0x4d')];_0x355afd+=0x1){var _0x22a165={'UserId':_0xab5443['params']['id']};_0x22a165[_[_0x8adb('0xb2')](_0xab5443[_0x8adb('0x47')]['channel'][_0x8adb('0xb7')]())+_0x8adb('0xb8')]=_0xab5443[_0x8adb('0x47')]['ids'][_0x355afd];socket[_0x8adb('0xb9')](_0x8adb('0x35')+_[_0x8adb('0xb2')](_0xab5443[_0x8adb('0x47')][_0x8adb('0xaa')]['toLowerCase']())+_0x8adb('0xc0'),_0x22a165);}return _0x358f64;})[_0x8adb('0x1d')](function(){if(_0xab5443[_0x8adb('0x47')][_0x8adb('0xaa')]==='voice'){return db[_0x8adb('0xbd')][_0x8adb('0x32')]({'where':{'UserId':_0xab5443[_0x8adb('0x67')]['id'],'VoiceQueueId':_0xab5443[_0x8adb('0x47')][_0x8adb('0xb6')]},'individualHooks':!![]})[_0x8adb('0x1d')](function(){return _0x28977c;});}return _0x28977c;})[_0x8adb('0x1d')](respondWithStatusCode(_0xab65fe,null))[_0x8adb('0x27')](handleError(_0xab65fe,null));};exports[_0x8adb('0xc1')]=function(_0x2d5188,_0x119eb9,_0x1e4f31){_0x2d5188[_0x8adb('0x6f')][_0x8adb('0xc2')]=_0x2d5188[_0x8adb('0xc3')][_0x8adb('0xc4')];return db[_0x8adb('0x43')][_0x8adb('0x6e')]({'where':{'id':_0x2d5188['params']['id']}})[_0x8adb('0x1d')](handleEntityNotFound(_0x119eb9,null))['then'](saveUpdates(_0x2d5188[_0x8adb('0x6f')],null))['then'](respondWithResult(_0x119eb9,null))[_0x8adb('0x27')](handleError(_0x119eb9,null));};exports[_0x8adb('0xc5')]=function(_0x15b743,_0xd23894,_0x440865){var _0xd8bd09=path[_0x8adb('0xc6')](config[_0x8adb('0xc7')],_0x8adb('0xc8'));return db['User'][_0x8adb('0x6e')]({'where':{'id':_0x15b743[_0x8adb('0x67')]['id']},'attributes':['id',_0x8adb('0xc2')],'raw':!![]})[_0x8adb('0x1d')](handleEntityNotFound(_0xd23894,null))[_0x8adb('0x1d')](function(_0xb51cac){if(_0xb51cac){if(_[_0x8adb('0x77')](_0xb51cac[_0x8adb('0xc2')])){return _0xd23894[_0x8adb('0xc9')](_0xd8bd09);}else{if(!fs[_0x8adb('0xca')](path[_0x8adb('0xc6')](config[_0x8adb('0xc7')],_0x8adb('0xcb'),_0xb51cac[_0x8adb('0xc2')]))){return _0xd23894[_0x8adb('0xc9')](_0xd8bd09);}return _0xd23894[_0x8adb('0xc9')](path[_0x8adb('0xc6')](config[_0x8adb('0xc7')],_0x8adb('0xcb'),_0xb51cac[_0x8adb('0xc2')]));}}})['catch'](handleError(_0xd23894,null));};exports[_0x8adb('0xcc')]=function(_0x947d9e,_0x5e68ba,_0x497f2e){return db['User'][_0x8adb('0x6e')]({'where':{'id':_0x947d9e['params']['id']},'attributes':['id']})['then'](handleEntityNotFound(_0x5e68ba,null))[_0x8adb('0x1d')](function(_0x57dd9c){var _0x3aeb20=[];values=_0x57dd9c[_0x8adb('0x5f')];_0x3aeb20[_0x8adb('0x5b')](get_open_tabs(_0x8adb('0x6c'),_0x57dd9c[_0x8adb('0x5f')]));_0x3aeb20[_0x8adb('0x5b')](get_open_tabs(_0x8adb('0x60'),_0x57dd9c[_0x8adb('0x5f')]));_0x3aeb20['push'](get_open_tabs('openchannel',_0x57dd9c[_0x8adb('0x5f')]));_0x3aeb20[_0x8adb('0x5b')](get_open_tabs(_0x8adb('0x64'),_0x57dd9c['dataValues']));_0x3aeb20[_0x8adb('0x5b')](get_open_tabs(_0x8adb('0x61'),_0x57dd9c[_0x8adb('0x5f')]));_0x3aeb20[_0x8adb('0x5b')](get_open_tabs(_0x8adb('0x62'),_0x57dd9c[_0x8adb('0x5f')]));return BPromise[_0x8adb('0x65')](_0x3aeb20);})[_0x8adb('0x1d')](function(_0x21c52b){var _0x3f77e2=[];if(_0x21c52b){for(var _0x3824d3=0x0;_0x3824d3=_0x742759){_0x133481=_0x742759;_0x2dc2af=0xc8;}else{_0x2dc2af=0xce;}_0x370ee0[_0xae13('0x34')](_0x2dc2af);return _0x370ee0[_0xae13('0x35')](_0xae13('0x36'),_0x277b69+'-'+_0x133481+'/'+_0x742759)[_0xae13('0x2f')](_0x306dfb);}return null;};}function patchUpdates(_0x48f0f6){return function(_0x4a3deb){try{jsonpatch[_0xae13('0x37')](_0x4a3deb,_0x48f0f6,!![]);}catch(_0x233896){return BPromise[_0xae13('0x38')](_0x233896);}return _0x4a3deb[_0xae13('0x39')]();};}function saveUpdates(_0x3d4ffd,_0xfac8e7){return function(_0x126686){if(_0x126686){return _0x126686[_0xae13('0x3a')](_0x3d4ffd)[_0xae13('0x22')](function(_0x23f9d7){return _0x23f9d7;});}return null;};}function removeEntity(_0x5f1aeb,_0x1a83d7){return function(_0x116270){if(_0x116270){return _0x116270[_0xae13('0x3b')]()['then'](function(){var _0x53b5f6=_0x116270['get']({'plain':!![]});if(_0x53b5f6['role']==='admin')return;var _0x5ee151=[{'name':_0xae13('0x3c'),'value':_0xae13('0x3d'),'ignore':!![]},{'name':_0xae13('0x3e'),'value':'agent','ignore':![]},{'name':_0xae13('0x3f'),'value':_0xae13('0x40'),'ignore':![]}];var _0x40764c=_(_0x5ee151)[_0xae13('0x41')](_0xae13('0x42'))['map'](_0xae13('0x43'))[_0xae13('0x43')]();if(_[_0xae13('0x44')](_0x40764c,_0x53b5f6['role'])){return;}var _0x5f0870=_[_0xae13('0x45')](_0x5ee151,[_0xae13('0x43'),_0x53b5f6[_0xae13('0x46')]])[_0xae13('0x47')];return db['UserProfileResource'][_0xae13('0x3b')]({'where':{'type':_0x5f0870,'resourceId':_0x53b5f6['id']}})[_0xae13('0x22')](function(){return _0x116270;});})['then'](function(){_0x5f1aeb[_0xae13('0x34')](0xcc)[_0xae13('0x2e')]();});}};}function handleEntityNotFound(_0x5955dd,_0x1bf423){return function(_0xfbe515){if(!_0xfbe515){_0x5955dd[_0xae13('0x2d')](0x194);}return _0xfbe515;};}function handleError(_0x231748,_0x4d7405){_0x4d7405=_0x4d7405||0x1f4;return function(_0x20e4ec){logger[_0xae13('0x29')](_0x20e4ec[_0xae13('0x48')]);if(_0x20e4ec[_0xae13('0x47')]){delete _0x20e4ec['name'];}_0x231748[_0xae13('0x34')](_0x4d7405)[_0xae13('0x49')](_0x20e4ec);};}exports[_0xae13('0x4a')]=function(_0x7a0780,_0x4c8b8d){var _0x49428a={},_0x34bf8b={},_0xde6962={'count':0x0,'rows':[]};var _0x4bff9d=_[_0xae13('0x4b')](db['User'][_0xae13('0x4c')],function(_0x230ba6){return{'name':_0x230ba6[_0xae13('0x4d')],'type':_0x230ba6['type'][_0xae13('0x4e')]};});_0x34bf8b[_0xae13('0x4f')]=_[_0xae13('0x50')](_[_0xae13('0x4b')](_0x4bff9d,'name'),[_0xae13('0x51'),_0xae13('0x52')]);_0x34bf8b[_0xae13('0x53')]=_[_0xae13('0x54')](_0x7a0780[_0xae13('0x53')]);_0x34bf8b[_0xae13('0x55')]=_[_0xae13('0x56')](_0x34bf8b[_0xae13('0x4f')],_0x34bf8b['query']);_0x49428a[_0xae13('0x57')]=_['intersection'](_0x34bf8b[_0xae13('0x4f')],qs[_0xae13('0x58')](_0x7a0780[_0xae13('0x53')][_0xae13('0x58')]));_0x49428a['attributes']=_0x49428a[_0xae13('0x57')]['length']?_0x49428a[_0xae13('0x57')]:_0x34bf8b[_0xae13('0x4f')];if(!_0x7a0780['query'][_0xae13('0x59')](_0xae13('0x5a'))){_0x49428a[_0xae13('0x32')]=qs[_0xae13('0x32')](_0x7a0780[_0xae13('0x53')][_0xae13('0x32')]);_0x49428a['offset']=qs[_0xae13('0x30')](_0x7a0780[_0xae13('0x53')][_0xae13('0x30')]);}_0x49428a[_0xae13('0x5b')]=qs[_0xae13('0x5c')](_0x7a0780['query'][_0xae13('0x5c')]);_0x49428a[_0xae13('0x5d')]=qs[_0xae13('0x55')](_['pick'](_0x7a0780['query'],_0x34bf8b['filters']),_0x4bff9d);if(_0x7a0780['query'][_0xae13('0x41')]){_0x49428a['where']=_[_0xae13('0x5e')](_0x49428a['where'],{'$or':_[_0xae13('0x4b')](_0x4bff9d,function(_0x24531f){if(_0x24531f[_0xae13('0x5f')]!==_0xae13('0x60')){return db[_0xae13('0x61')]['where'](db[_0xae13('0x61')]['fn'](_0xae13('0x62'),db['sequelize'][_0xae13('0x63')](_0x24531f[_0xae13('0x47')])),{'$like':db['sequelize']['fn']('lower','%'+_0x7a0780['query']['filter']+'%')});}})});}_0x49428a=_[_0xae13('0x5e')]({},_0x49428a,_0x7a0780[_0xae13('0x64')]);var _0x525bf5={'where':_0x49428a[_0xae13('0x5d')]};return db[_0xae13('0x65')]['count'](_0x525bf5)[_0xae13('0x22')](function(_0x277213){_0xde6962[_0xae13('0x33')]=_0x277213;if(_0x7a0780[_0xae13('0x53')][_0xae13('0x66')]){_0x49428a[_0xae13('0x67')]=[{'all':!![]}];}if(!_[_0xae13('0x44')](_0x49428a[_0xae13('0x57')],'id')){_0x49428a[_0xae13('0x57')][_0xae13('0x68')]('id');}return db['User'][_0xae13('0x69')](_0x49428a);})[_0xae13('0x22')](function(_0x3c6b7e){_0xde6962['rows']=_0x3c6b7e;if(_0x7a0780[_0xae13('0x53')]['openTabs']===_0xae13('0x6a')){var _0x2f1cca=[];for(var _0xd76dc7=0x0;_0xd76dc7<_0xde6962['rows']['length'];_0xd76dc7++){_0x2f1cca[_0xae13('0x68')](get_open_tabs(_0xae13('0x6b'),_0xde6962[_0xae13('0x6c')][_0xd76dc7][_0xae13('0x6d')]));_0x2f1cca[_0xae13('0x68')](get_open_tabs(_0xae13('0x6e'),_0xde6962[_0xae13('0x6c')][_0xd76dc7]['dataValues']));_0x2f1cca[_0xae13('0x68')](get_open_tabs(_0xae13('0x6f'),_0xde6962[_0xae13('0x6c')][_0xd76dc7][_0xae13('0x6d')]));_0x2f1cca[_0xae13('0x68')](get_open_tabs(_0xae13('0x70'),_0xde6962[_0xae13('0x6c')][_0xd76dc7]['dataValues']));_0x2f1cca[_0xae13('0x68')](get_open_tabs(_0xae13('0x71'),_0xde6962['rows'][_0xd76dc7][_0xae13('0x6d')]));_0x2f1cca[_0xae13('0x68')](get_open_tabs(_0xae13('0x72'),_0xde6962['rows'][_0xd76dc7][_0xae13('0x6d')]));}return BPromise[_0xae13('0x73')](_0x2f1cca)['then'](function(_0x3ee96f){return _0xde6962;});}else{return _0xde6962;}})[_0xae13('0x22')](respondWithFilteredResult(_0x4c8b8d,_0x49428a))[_0xae13('0x74')](handleError(_0x4c8b8d,null));};exports[_0xae13('0x75')]=function(_0x13f508,_0x1f9a21){var _0x5309a3={'raw':![],'where':{'id':_0x13f508[_0xae13('0x76')]['id']}},_0x54e956={};_0x54e956[_0xae13('0x4f')]=_[_0xae13('0x50')](_[_0xae13('0x54')](db[_0xae13('0x65')][_0xae13('0x4c')]),['password',_0xae13('0x52')]);_0x54e956[_0xae13('0x53')]=_['keys'](_0x13f508['query']);_0x54e956['filters']=_[_0xae13('0x56')](_0x54e956[_0xae13('0x4f')],_0x54e956[_0xae13('0x53')]);_0x5309a3[_0xae13('0x57')]=_[_0xae13('0x56')](_0x54e956[_0xae13('0x4f')],qs[_0xae13('0x58')](_0x13f508[_0xae13('0x53')][_0xae13('0x58')]));_0x5309a3[_0xae13('0x57')]=_0x5309a3[_0xae13('0x57')][_0xae13('0x77')]?_0x5309a3[_0xae13('0x57')]:_0x54e956[_0xae13('0x4f')];if(_0x13f508[_0xae13('0x53')]['includeAll']){_0x5309a3[_0xae13('0x67')]=[{'all':!![]}];}_0x5309a3=_[_0xae13('0x5e')]({},_0x5309a3,_0x13f508['options']);if(!_[_0xae13('0x44')](_0x5309a3['attributes'],'id')){_0x5309a3['attributes'][_0xae13('0x68')]('id');}return db[_0xae13('0x65')][_0xae13('0x45')](_0x5309a3)[_0xae13('0x22')](handleEntityNotFound(_0x1f9a21,null))[_0xae13('0x22')](function(_0x3797da){var _0x5c893c=[];values=_0x3797da;if(_0x13f508['query'][_0xae13('0x78')]===_0xae13('0x6a')){_0x5c893c[_0xae13('0x68')](get_open_tabs('chat',_0x3797da[_0xae13('0x6d')]));_0x5c893c['push'](get_open_tabs(_0xae13('0x6e'),_0x3797da[_0xae13('0x6d')]));_0x5c893c[_0xae13('0x68')](get_open_tabs(_0xae13('0x71'),_0x3797da[_0xae13('0x6d')]));_0x5c893c['push'](get_open_tabs(_0xae13('0x72'),_0x3797da[_0xae13('0x6d')]));_0x5c893c['push'](get_open_tabs(_0xae13('0x6f'),_0x3797da[_0xae13('0x6d')]));_0x5c893c[_0xae13('0x68')](get_open_tabs(_0xae13('0x70'),_0x3797da[_0xae13('0x6d')]));return BPromise[_0xae13('0x73')](_0x5c893c);}else{return values;}})['then'](function(_0x1bec78){return values;})['then'](respondWithResult(_0x1f9a21,null))[_0xae13('0x74')](handleError(_0x1f9a21,null));};exports['update']=function(_0x2e7648,_0x3e55d2){if(_0x2e7648['body']['id']){delete _0x2e7648[_0xae13('0x79')]['id'];}delete _0x2e7648[_0xae13('0x79')][_0xae13('0x46')];return db[_0xae13('0x65')][_0xae13('0x45')]({'where':{'id':_0x2e7648[_0xae13('0x76')]['id']}})[_0xae13('0x22')](handleEntityNotFound(_0x3e55d2,null))[_0xae13('0x22')](saveUpdates(_0x2e7648['body'],null))[_0xae13('0x22')](respondWithResult(_0x3e55d2,null))[_0xae13('0x74')](handleError(_0x3e55d2,null));};exports[_0xae13('0x7a')]=function(_0x459256,_0x40d453){return db[_0xae13('0x65')][_0xae13('0x7a')]()[_0xae13('0x22')](respondWithResult(_0x40d453,null))[_0xae13('0x74')](handleError(_0x40d453,null));};exports[_0xae13('0x7b')]=function(_0x491f7f,_0x40844e,_0x490754){return db['User'][_0xae13('0x45')]({'where':{'id':_0x491f7f[_0xae13('0x76')]['id']}})[_0xae13('0x22')](handleEntityNotFound(_0x40844e,null))['then'](function(_0x4cf337){if(_0x4cf337){return _0x4cf337['addContacts'](_0x491f7f[_0xae13('0x79')]['ids'],_[_0xae13('0x7c')](_0x491f7f[_0xae13('0x79')],['ids','id'])||{});}})[_0xae13('0x22')](respondWithResult(_0x40844e,null))[_0xae13('0x74')](handleError(_0x40844e,null));};function validateUser(_0x5a3513){return new BPromise(function(_0x4d4e4c,_0x381ac4){if(_0x5a3513['internal'])return _0x4d4e4c(_0x5a3513);return db['Setting'][_0xae13('0x7d')](0x1)['then'](function(_0x982c6b){if(_0x982c6b['securePassword'])authService[_0xae13('0x7e')](_0x5a3513[_0xae13('0x51')]);db[_0xae13('0x65')][_0xae13('0x7f')](_0xae13('0x80'))[_0xae13('0x22')](function(_0x5ceb04){if(_[_0xae13('0x81')](_0x5ceb04)){_0x5a3513[_0xae13('0x80')]=_0x982c6b['min_internal']||0x1;return;}if(_['isNil'](_0x982c6b['min_internal'])||_0x982c6b[_0xae13('0x82')]===_0x5ceb04){_0x5a3513['internal']=_0x5ceb04+0x1;return;}if(_0x982c6b[_0xae13('0x82')]>_0x5ceb04){_0x5a3513['internal']=_0x982c6b['min_internal'];return;}return db[_0xae13('0x61')][_0xae13('0x53')](_0xae13('0x83'),{'type':db[_0xae13('0x61')][_0xae13('0x84')][_0xae13('0x85')]})['then'](function(_0x2d714a){if(_0x2d714a&&_0x2d714a[_0xae13('0x77')]){for(var _0x145373=0x0,_0x1613b5=_0x2d714a['length'];_0x145373<_0x1613b5&&_[_0xae13('0x81')](_0x5a3513[_0xae13('0x80')]);_0x145373++){if(_0x982c6b[_0xae13('0x82')]<=_0x2d714a[_0x145373]['from']){_0x5a3513['internal']=_0x2d714a[_0x145373][_0xae13('0x86')];}else if(_0x982c6b[_0xae13('0x82')]>_0x2d714a[_0x145373][_0xae13('0x86')]&&_0x982c6b[_0xae13('0x82')]<=_0x2d714a[_0x145373]['to']){_0x5a3513[_0xae13('0x80')]=_0x982c6b[_0xae13('0x82')];}}}if(_[_0xae13('0x81')](_0x5a3513[_0xae13('0x80')])){_0x5a3513['internal']=_0x5ceb04+0x1;}return _0x4d4e4c(_0x5a3513);});});})[_0xae13('0x74')](function(_0x2de667){_0x381ac4(_0x2de667);});});}function updateUser(_0x5704df){return new BPromise(function(_0x2f70c6,_0x13783b){try{if(_0x5704df['voicemail']){_0x5704df[_0xae13('0x87')]=_0x5704df[_0xae13('0x80')];_0x5704df['VoiceMail']={'mailbox':_0x5704df[_0xae13('0x80')],'password':_0x5704df[_0xae13('0x51')],'fullname':_0x5704df[_0xae13('0x88')],'email':_0x5704df['email']};}if(_0x5704df['role']===_0xae13('0x89')){if(!_0x5704df[_0xae13('0x8a')])_0x5704df[_0xae13('0x8a')]=['101',_0xae13('0x8b'),'103',_0xae13('0x8c'),_0xae13('0x8d'),_0xae13('0x8e'),_0xae13('0x8f'),_0xae13('0x90'),_0xae13('0x91'),_0xae13('0x92'),_0xae13('0x93'),_0xae13('0x94'),_0xae13('0x95'),'114',_0xae13('0x96')];}_0x2f70c6(_0x5704df);}catch(_0x47cf7b){_0x13783b(_0x47cf7b);}});}exports[_0xae13('0x97')]=function(_0x1fb11c,_0x1d7aed){if(_0x1fb11c[_0xae13('0x3d')][_0xae13('0x46')]===_0xae13('0x89'))throw new Error(_0xae13('0x98'));if(_0x1fb11c[_0xae13('0x79')][_0xae13('0x46')]===_0xae13('0x3d')&&_0x1fb11c['user'][_0xae13('0x46')]!==_0xae13('0x99')){throw new Error(_0xae13('0x9a'));}if(_0x1fb11c[_0xae13('0x79')][_0xae13('0x46')]===_0xae13('0x99')&&_0x1fb11c[_0xae13('0x3d')][_0xae13('0x46')]!=='admin'){throw new Error(_0xae13('0x9b'));}return licenseUtil[_0xae13('0x9c')]([_0x1fb11c[_0xae13('0x79')]])[_0xae13('0x22')](function(){return validateUser(_0x1fb11c[_0xae13('0x79')]);})[_0xae13('0x22')](function(_0x1dfd29){return updateUser(_0x1dfd29)['then'](function(_0x2eaf8b){if(_0x2eaf8b[_0xae13('0x46')]===_0xae13('0x99')){_0x2eaf8b[_0xae13('0x9d')]=_0x1fb11c[_0xae13('0x3d')][_0xae13('0x9d')];delete _0x2eaf8b['userProfileId'];}return _0x2eaf8b;});})[_0xae13('0x22')](function(_0x17c277){return db[_0xae13('0x65')][_0xae13('0x97')](_0x17c277,{'include':[{'model':db[_0xae13('0x9e')],'as':_0xae13('0x9e')}]});})[_0xae13('0x22')](function(_0x199bcb){if(_0x1fb11c[_0xae13('0x79')][_0xae13('0x46')]===_0xae13('0x3d'))return _0x199bcb;if(_0x1fb11c['user'][_0xae13('0x46')]!==_0xae13('0x3d'))return _0x199bcb;return db[_0xae13('0x9f')][_0xae13('0x45')]({'where':{'name':_0x199bcb[_0xae13('0x46')]===_0xae13('0x89')?'Agents':'Telephones','userProfileId':_0x1fb11c[_0xae13('0x3d')]['userProfileId']},'raw':!![]})[_0xae13('0x22')](function(_0x313f53){if(!_0x313f53||_0x313f53[_0xae13('0xa0')]!=0x0)return _0x199bcb;return db[_0xae13('0xa1')]['create']({'name':_0x199bcb['name'],'resourceId':_0x199bcb['id'],'type':_0x313f53[_0xae13('0x47')],'sectionId':_0x313f53['id']},{})[_0xae13('0x22')](function(){return _0x199bcb;});})[_0xae13('0x74')](function(_0x4e5555){logger['error'](_0xae13('0xa2'),_0x4e5555);throw _0x4e5555;});})[_0xae13('0x22')](respondWithResult(_0x1d7aed,0xc9))[_0xae13('0x74')](handleError(_0x1d7aed,null));};exports[_0xae13('0xa3')]=function(_0x34276a,_0x3b9533){var _0x59a061=_0x34276a[_0xae13('0x79')];var _0x296009=[];if(_0x34276a[_0xae13('0x3d')]['role']==='agent')throw new Error(_0xae13('0x98'));if(_[_0xae13('0xa4')](_0x59a061,[_0xae13('0x46'),_0xae13('0x3d')])&&_0x34276a[_0xae13('0x3d')][_0xae13('0x46')]!==_0xae13('0x99')){throw new Error('Unauthorized.\x20You\x20must\x20be\x20an\x20administrator\x20in\x20order\x20to\x20create\x20an\x20user');}if(_[_0xae13('0xa4')](_0x59a061,[_0xae13('0x46'),_0xae13('0x99')])&&_0x34276a[_0xae13('0x3d')]['role']!==_0xae13('0x99')){throw new Error(_0xae13('0xa5'));}return licenseUtil[_0xae13('0x9c')](_0x59a061)[_0xae13('0x22')](function(){return validateUser(_0x59a061[0x0]);})[_0xae13('0x22')](function(){for(var _0x11a596=0x1;_0x11a596<_0x59a061[_0xae13('0x77')];_0x11a596++){var _0xe8fcae=_0x59a061[_0x11a596-0x1]['internal'];if(!_0x59a061[_0x11a596][_0xae13('0x80')])_0x59a061[_0x11a596][_0xae13('0x80')]=_0xe8fcae+0x1;_0x296009[_0xae13('0x68')](validateUser(_0x59a061[_0x11a596]));}return BPromise[_0xae13('0x73')](_0x296009);})[_0xae13('0x22')](function(){_0x296009=[];for(var _0x5dcadd=0x0;_0x5dcadd<_0x59a061['length'];_0x5dcadd++){_0x296009[_0xae13('0x68')](updateUser(_0x59a061[_0x5dcadd]));}return BPromise[_0xae13('0x73')](_0x296009);})[_0xae13('0x22')](function(){return BPromise[_0xae13('0xa6')](_0x59a061,function(_0x35cf87){return db[_0xae13('0x65')][_0xae13('0x97')](_0x35cf87,{'include':[{'model':db[_0xae13('0x9e')],'as':'VoiceMail'}]})['then'](function(_0x551e88){_0x35cf87['id']=_0x551e88['id'];return _0x35cf87;});});})['then'](function(_0x4b8160){if(_0x34276a[_0xae13('0x79')][_0xae13('0x46')]==='user')return _0x4b8160;if(_0x34276a[_0xae13('0x3d')][_0xae13('0x46')]!=='user')return _0x4b8160;var _0x487cd2=_[_0xae13('0xa4')](_0x4b8160,function(_0x4965e8){return _0x4965e8[_0xae13('0x46')]==='agent'||_0x4965e8[_0xae13('0x46')]===_0xae13('0x40');});if(!_0x487cd2)return _0x4b8160;return db[_0xae13('0x9f')][_0xae13('0x69')]({'where':{'name':{'$or':['Agents','Telephones']},'userProfileId':_0x34276a[_0xae13('0x3d')]['userProfileId']},'raw':!![]})[_0xae13('0x22')](function(_0x1ef0ad){if(_['isEmpty'](_0x1ef0ad)||!_[_0xae13('0xa4')](_0x1ef0ad,[_0xae13('0xa0'),0x0]))return _0x4b8160;_0x296009=[];var _0x61deae=_(_0x1ef0ad)[_0xae13('0x4b')](function(_0x4aafaa){if(_0x4aafaa[_0xae13('0xa0')]===0x1)return;return _0x4aafaa['name']===_0xae13('0x3e')?_0xae13('0x89'):_0xae13('0x40');})[_0xae13('0xa7')]()['value']();for(var _0x4db8aa=0x0;_0x4db8aa<_0x4b8160[_0xae13('0x77')];_0x4db8aa++){if(!_[_0xae13('0x44')](_0x61deae,_0x4b8160[_0x4db8aa]['role']))return;var _0x6a8185=_0x4b8160[_0x4db8aa]['role']===_0xae13('0x89')?'Agents':_0xae13('0x3f');_0x296009[_0xae13('0x68')](db['UserProfileResource'][_0xae13('0x97')]({'name':_0x4b8160[_0x4db8aa]['name'],'resourceId':_0x4b8160[_0x4db8aa]['id'],'type':_0x6a8185,'sectionId':_['find'](_0x1ef0ad,[_0xae13('0x47'),_0x6a8185])['id']},{}));}return BPromise[_0xae13('0x73')](_0x296009);});})[_0xae13('0x22')](respondWithResult(_0x3b9533,0xc9))[_0xae13('0x74')](handleError(_0x3b9533,null));};exports[_0xae13('0xa8')]=function(_0x16e912,_0x1a41b2,_0x58f810){if(_0x16e912[_0xae13('0x79')]['id']){delete _0x16e912[_0xae13('0x79')]['id'];}return db[_0xae13('0x65')][_0xae13('0x45')]({'where':{'id':_0x16e912[_0xae13('0x76')]['id']}})[_0xae13('0x22')](function(_0x149d20){if(!_0x149d20)return null;if(_0x149d20['id']===_0x16e912[_0xae13('0x3d')]['id']){if(!_0x16e912[_0xae13('0x79')][_0xae13('0xa9')]||!_0x16e912[_0xae13('0x79')]['newPassword']){throw new db['Sequelize']['ValidationError'](_0xae13('0xaa'));}if(!_0x149d20[_0xae13('0xab')](_0x16e912[_0xae13('0x79')][_0xae13('0xa9')])){throw new db[(_0xae13('0xac'))][(_0xae13('0xad'))]('Wrong\x20credentials');}if(_0x16e912[_0xae13('0x79')][_0xae13('0xa9')]===_0x16e912['body']['newPassword']){throw new db[(_0xae13('0xac'))]['ValidationError'](_0xae13('0xae'));}}else if(_0x16e912[_0xae13('0x3d')][_0xae13('0x46')]===_0xae13('0x99')){if(!_0x16e912['body'][_0xae13('0xaf')]){throw new db['Sequelize']['ValidationError']('Invalid\x20body\x20format.\x20Use\x20newPassword');}}else if(_0x16e912[_0xae13('0x3d')][_0xae13('0x46')]===_0xae13('0x3d')){if(!_0x16e912[_0xae13('0x79')][_0xae13('0xaf')]){throw new db[(_0xae13('0xac'))][(_0xae13('0xad'))](_0xae13('0xb0'));}if(_0x149d20[_0xae13('0x46')]!=='agent'){throw new db[(_0xae13('0xac'))][(_0xae13('0xad'))](_0xae13('0x98'));}}else{throw new db[(_0xae13('0xac'))][(_0xae13('0xad'))](_0xae13('0x98'));}return _0x149d20;})[_0xae13('0x22')](handleEntityNotFound(_0x1a41b2,null))[_0xae13('0x22')](function(_0x1d155e){return db[_0xae13('0xb1')][_0xae13('0xb2')]({'attributes':['id','securePassword',_0xae13('0xb3'),_0xae13('0xb4')]})[_0xae13('0x22')](function(_0x14c2fd){if(_0x14c2fd[_0xae13('0xb5')])authService[_0xae13('0x7e')](_0x16e912['body']['newPassword']);if(!_0x14c2fd[_0xae13('0xb3')]||!_0x1d155e[_0xae13('0xb6')])return _0x1d155e;authService[_0xae13('0xb7')](_0x16e912['body'][_0xae13('0xaf')],_0x1d155e[_0xae13('0xb6')],_0x14c2fd[_0xae13('0xb4')]);return _0x1d155e;})[_0xae13('0x22')](saveUpdates({'password':_0x16e912[_0xae13('0x79')]['newPassword'],'passwordResetAt':_0x16e912[_0xae13('0x3d')]['id']==_0x16e912[_0xae13('0x76')]['id']?moment():null,'previousPasswords':authService[_0xae13('0xb8')](_0x16e912['body'][_0xae13('0xaf')],_0x1d155e[_0xae13('0xb6')])},null));})[_0xae13('0x22')](respondWithResult(_0x1a41b2,null))[_0xae13('0x74')](handleError(_0x1a41b2,null));};exports[_0xae13('0xb9')]=function(_0x33f6b3,_0x10ee7b,_0xe3b62f){var _0xa0840b=_0x33f6b3['body'][_0xae13('0xba')];return db[_0xae13('0x65')][_0xae13('0x45')]({'where':{'id':_0x33f6b3[_0xae13('0x76')]['id']},'attributes':['id',_0xae13('0x47'),_0xae13('0x46'),'online',_0xae13('0xbb'),_0xae13('0xbc'),_0xae13('0xbd')]})[_0xae13('0x22')](handleEntityNotFound(_0x10ee7b,null))[_0xae13('0x22')](function(_0x5cb2b3){if(_0x5cb2b3){if(!utils[_0xae13('0xbe')](_0xa0840b)){throw new db['Sequelize']['ValidationError'](_0xae13('0xbf'));}return _0x5cb2b3[_0xae13('0xc0')+_[_0xae13('0xc1')](_0xa0840b[_0xae13('0xc2')]())+_0xae13('0xc3')](_0x33f6b3[_0xae13('0x79')][_0xae13('0xc4')],{'penalty':_0x33f6b3[_0xae13('0x79')][_0xae13('0xc5')]||0x0})[_0xae13('0xc6')](function(_0x56c196){for(var _0xce2ef=0x0;_0xce2ef<_0x33f6b3['body'][_0xae13('0xc4')][_0xae13('0x77')];_0xce2ef+=0x1){var _0x7179ac={'UserId':_0x33f6b3[_0xae13('0x76')]['id']};_0x7179ac[_[_0xae13('0xc1')](_0xa0840b['toLowerCase']())+_0xae13('0xc7')]=_0x33f6b3[_0xae13('0x79')][_0xae13('0xc4')][_0xce2ef];socket[_0xae13('0xc8')]('user'+_[_0xae13('0xc1')](_0xa0840b[_0xae13('0xc2')]())+_0xae13('0xc9'),_0x7179ac);}return _0x56c196;})[_0xae13('0x22')](function(){if(_0xa0840b===_0xae13('0xca')){return db[_0xae13('0xcb')]['findAll']({'where':{'id':_0x33f6b3[_0xae13('0x79')]['ids']||[]},'raw':!![],'attributes':['id',_0xae13('0x47')]});}})[_0xae13('0x22')](function(_0x5c917b){var _0x3a8ef0=_0x5cb2b3[_0xae13('0xcc')]({'plain':!![]});var _0x1ef3f3=[];if(_0xa0840b===_0xae13('0xca')&&_0x3a8ef0[_0xae13('0x46')]===_0xae13('0x89')&&_0x3a8ef0['online']){for(var _0x5620cd=0x0;_0x5620cd<_0x5c917b[_0xae13('0x77')];_0x5620cd+=0x1){_0x1ef3f3[_0xae13('0x68')]({'membername':_0x3a8ef0[_0xae13('0x47')],'UserId':_0x3a8ef0['id'],'queue_name':_0x5c917b[_0x5620cd][_0xae13('0x47')],'VoiceQueueId':_0x5c917b[_0x5620cd]['id'],'interface':_[_0xae13('0x81')](_0x3a8ef0[_0xae13('0xbd')])?util[_0xae13('0xcd')](_0xae13('0xce'),_0x3a8ef0[_0xae13('0x47')]):_0x3a8ef0['interface'],'paused':_0x3a8ef0[_0xae13('0xbc')]||![],'penalty':_0x33f6b3[_0xae13('0x79')][_0xae13('0xc5')]||0x0});}return BPromise['each'](_0x1ef3f3,function(_0x28f2a7){return db['UserVoiceQueueRt'][_0xae13('0xcf')](_0x28f2a7);});}return _0x5cb2b3;});}})['then'](respondWithStatusCode(_0x10ee7b,null))[_0xae13('0x74')](handleError(_0x10ee7b,null));};exports[_0xae13('0xd0')]=function(_0x321bfd,_0x45d23f,_0x16c86d){var _0x15e442;return db['User'][_0xae13('0x45')]({'where':{'id':_0x321bfd['params']['id']},'attributes':['id',_0xae13('0x47'),_0xae13('0x46')]})[_0xae13('0x22')](handleEntityNotFound(_0x45d23f,null))[_0xae13('0x22')](function(_0xb780fb){if(_0xb780fb){_0x15e442=_0xb780fb;if(!_0x321bfd[_0xae13('0x53')][_0xae13('0xba')]||!utils[_0xae13('0xbe')](_0x321bfd[_0xae13('0x53')]['channel'])){throw new db['Sequelize']['ValidationError'](_0xae13('0xbf'));}return _0xb780fb[_0xae13('0xd1')+_['capitalize'](_0x321bfd['query'][_0xae13('0xba')][_0xae13('0xc2')]())+_0xae13('0xc3')](_0x321bfd['query']['ids']);}})['then'](function(_0x43e603){for(var _0x328dc5=0x0;_0x328dc5<_0x321bfd[_0xae13('0x53')]['ids'][_0xae13('0x77')];_0x328dc5+=0x1){var _0x454cf7={'UserId':_0x321bfd[_0xae13('0x76')]['id']};_0x454cf7[_['capitalize'](_0x321bfd[_0xae13('0x53')][_0xae13('0xba')][_0xae13('0xc2')]())+_0xae13('0xc7')]=_0x321bfd['query']['ids'][_0x328dc5];socket[_0xae13('0xc8')]('user'+_[_0xae13('0xc1')](_0x321bfd[_0xae13('0x53')]['channel'][_0xae13('0xc2')]())+_0xae13('0xd2'),_0x454cf7);}return _0x43e603;})[_0xae13('0x22')](function(){if(_0x321bfd[_0xae13('0x53')][_0xae13('0xba')]==='voice'){return db[_0xae13('0xd3')][_0xae13('0x3b')]({'where':{'UserId':_0x321bfd['params']['id'],'VoiceQueueId':_0x321bfd[_0xae13('0x53')][_0xae13('0xc4')]},'individualHooks':!![]})[_0xae13('0x22')](function(){return _0x15e442;});}return _0x15e442;})[_0xae13('0x22')](respondWithStatusCode(_0x45d23f,null))['catch'](handleError(_0x45d23f,null));};exports[_0xae13('0xd4')]=function(_0x233af8,_0x424a2c,_0x29ab6b){_0x233af8['body']['userpic']=_0x233af8[_0xae13('0xd5')][_0xae13('0xd6')];return db[_0xae13('0x65')][_0xae13('0x45')]({'where':{'id':_0x233af8[_0xae13('0x76')]['id']}})[_0xae13('0x22')](handleEntityNotFound(_0x424a2c,null))[_0xae13('0x22')](saveUpdates(_0x233af8[_0xae13('0x79')],null))[_0xae13('0x22')](respondWithResult(_0x424a2c,null))[_0xae13('0x74')](handleError(_0x424a2c,null));};exports['getAvatar']=function(_0x148380,_0xd762fd,_0x2378d1){var _0x43fbfd=path['join'](config[_0xae13('0xd7')],_0xae13('0xd8'));return db[_0xae13('0x65')][_0xae13('0x45')]({'where':{'id':_0x148380[_0xae13('0x76')]['id']},'attributes':['id','userpic'],'raw':!![]})[_0xae13('0x22')](handleEntityNotFound(_0xd762fd,null))[_0xae13('0x22')](function(_0xb28977){if(_0xb28977){if(_[_0xae13('0x81')](_0xb28977[_0xae13('0xd9')])){return _0xd762fd[_0xae13('0xda')](_0x43fbfd);}else{if(!fs[_0xae13('0xdb')](path['join'](config[_0xae13('0xd7')],_0xae13('0xdc'),_0xb28977['userpic']))){return _0xd762fd[_0xae13('0xda')](_0x43fbfd);}return _0xd762fd[_0xae13('0xda')](path[_0xae13('0xdd')](config[_0xae13('0xd7')],_0xae13('0xdc'),_0xb28977[_0xae13('0xd9')]));}}})[_0xae13('0x74')](handleError(_0xd762fd,null));};exports[_0xae13('0xde')]=function(_0x2e2558,_0x53ca37,_0x3e9f93){return db[_0xae13('0x65')][_0xae13('0x45')]({'where':{'id':_0x2e2558['params']['id']},'attributes':['id']})['then'](handleEntityNotFound(_0x53ca37,null))['then'](function(_0x1096fe){var _0xa1aa0=[];values=_0x1096fe[_0xae13('0x6d')];_0xa1aa0[_0xae13('0x68')](get_open_tabs(_0xae13('0x6b'),_0x1096fe[_0xae13('0x6d')]));_0xa1aa0[_0xae13('0x68')](get_open_tabs(_0xae13('0x6e'),_0x1096fe[_0xae13('0x6d')]));_0xa1aa0['push'](get_open_tabs(_0xae13('0x71'),_0x1096fe['dataValues']));_0xa1aa0['push'](get_open_tabs(_0xae13('0x72'),_0x1096fe[_0xae13('0x6d')]));_0xa1aa0[_0xae13('0x68')](get_open_tabs(_0xae13('0x6f'),_0x1096fe[_0xae13('0x6d')]));_0xa1aa0[_0xae13('0x68')](get_open_tabs(_0xae13('0x70'),_0x1096fe['dataValues']));return BPromise['all'](_0xa1aa0);})[_0xae13('0x22')](function(_0x38dbb5){var _0x838300=[];if(_0x38dbb5){for(var _0x2b5e8b=0x0;_0x2b5e8b=_0x2f2d53['agents']){throw new Error(_0x442e('0x51'));}})[_0x442e('0xf')](function(){if(_0x5c3c9e){return db[_0x442e('0x2b')][_0x442e('0x52')]({'where':{'membername':_0x5c3c9e['name']},'individualHooks':!![]});}})[_0x442e('0xf')](function(){if(_0x5c3c9e){return _0x5c3c9e[_0x442e('0x53')]({'raw':!![]});}})['then'](function(_0x3450f3){if(_0x5c3c9e){if(_0x3450f3){var _0x4054a4=[];_0x2cfa56=_0x3450f3;if(_0x2cfa56[_0x442e('0x2e')]){for(var _0x50d074=0x0;_0x50d074<_0x2cfa56[_0x442e('0x2e')];_0x50d074++){_0x4054a4['push'](db[_0x442e('0x2b')]['upsert']({'membername':_0x5c3c9e[_0x442e('0x28')],'UserId':_0x5c3c9e['id'],'queue_name':_0x2cfa56[_0x50d074][_0x442e('0x28')],'VoiceQueueId':_0x2cfa56[_0x50d074]['id'],'interface':_0x4e38d4,'paused':_0x5c3c9e[_0x442e('0x54')]||![],'penalty':_0x2cfa56[_0x50d074][_0x442e('0x55')]||0x0}));}return BPromise[_0x442e('0x4a')](_0x4054a4);}}}})[_0x442e('0xf')](function(){if(_0x5c3c9e){return db[_0x442e('0x38')][_0x442e('0x1b')]({'where':{'membername':_0x5c3c9e[_0x442e('0x28')],'exitAt':null}});}})[_0x442e('0xf')](function(_0x47ae34){if(_0x5c3c9e){if(_0x47ae34&&_0x47ae34['length']){var _0x4a47e0=[];_0x47ae34[_0x442e('0x30')](function(_0x31ead7){_0x4a47e0[_0x442e('0x31')](_0x31ead7[_0x442e('0x2c')]({'exitAt':moment()[_0x442e('0x2d')](_0x442e('0x34'))}));});return BPromise[_0x442e('0x4a')](_0x4a47e0);}}})[_0x442e('0xf')](function(_0x541ebd){if(_0x5c3c9e){var _0x4c4254=[];var _0x360a4c=[];var _0x2f8b43=utils['getChannels']();var _0xaf8eee={'membername':_0x5c3c9e[_0x442e('0x28')],'interface':_0x4e38d4,'enterAt':moment()[_0x442e('0x2d')]('YYYY-MM-DD\x20HH:mm:ss'),'role':_0x5c3c9e['role'],'internal':_0x5c3c9e[_0x442e('0x36')]};_0x2f8b43[_0x442e('0x30')](function(_0x1d8e85){_0x4c4254[_0x442e('0x31')](_[_0x442e('0x56')]({'channel':_0x1d8e85,'type':_0x442e('0x57'),'data1':_0x442e('0x58'),'data2':_0x4e38d4},_0xaf8eee));if(_0x5c3c9e['loginInPause']){_0x360a4c[_0x442e('0x31')](_[_0x442e('0x56')]({'channel':_0x1d8e85,'type':'PAUSE','data1':_0x442e('0x59')},_0xaf8eee));}});return db[_0x442e('0x38')][_0x442e('0x39')](_0x4c4254['concat'](_0x360a4c),{'individualHooks':!![]});}})['then'](function(){if(_0x5c3c9e){return _0x5c3c9e['update']({'online':!![],'lastLoginAt':moment()[_0x442e('0x2d')](_0x442e('0x34')),'voicePause':_0x5c3c9e[_0x442e('0x54')]||![],'mailPause':_0x5c3c9e[_0x442e('0x54')]||![],'chatPause':_0x5c3c9e[_0x442e('0x54')]||![],'faxPause':_0x5c3c9e[_0x442e('0x54')]||![],'smsPause':_0x5c3c9e['loginInPause']||![],'openchannelPause':_0x5c3c9e[_0x442e('0x54')]||![],'pauseType':_0x5c3c9e['loginInPause']?_0x442e('0x59'):null,'lastPauseAt':moment()[_0x442e('0x2d')](_0x442e('0x34')),'interface':_0x4e38d4});}})[_0x442e('0xf')](function(_0x26a0a2){_0x88cf73(_0x26a0a2);})['catch'](function(_0x34977c){_0x504764(_0x27abe6[_0x442e('0x14')](0x1f4,_0x34977c[_0x442e('0x16')]));});});}; \ No newline at end of file +var _0x974e=['push','all','LogoutUser','destroy','mobile','phone','loginInPause','count','agent','getLicense','agents','upsert','UserVoiceQueue.penalty','LOGIN','merge','LOGININPAUSE','util','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','register','request','then','User,\x20%s,\x20%s','request\x20sent','debug','User,\x20%s,\x20%s,\x20%s','error','code','message','info','result','catch','User','findAll','options','where','limit','include','map','model','attributes','GetUser','stringify','find','raw','ShowUser','role','internal','interface','update','MemberReport','name','length','format','YYYY-MM-DD\x20HH:mm:ss','getChannels','forEach','isNil','SIP/%s','PAUSE','type','DEFAULT\x20PAUSE','body','uniqueid','bulkCreate','UnpauseUser','findOne','channel','Unknown\x20channel','UserVoiceQueueRt','system','mail','chat','fax','openchannel','whatsapp','set','%s%s','Pause'];(function(_0x307718,_0x322d18){var _0x89d1bc=function(_0x2dc2cc){while(--_0x2dc2cc){_0x307718['push'](_0x307718['shift']());}};_0x89d1bc(++_0x322d18);}(_0x974e,0x178));var _0xe974=function(_0x502c7d,_0x2f1285){_0x502c7d=_0x502c7d-0x0;var _0x30b7ed=_0x974e[_0x502c7d];return _0x30b7ed;};'use strict';var _=require('lodash');var util=require(_0xe974('0x0'));var moment=require('moment');var BPromise=require(_0xe974('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xe974('0x2'));var db=require(_0xe974('0x3'))['db'];var utils=require(_0xe974('0x4'));var logger=require(_0xe974('0x5'))(_0xe974('0x6'));var config=require(_0xe974('0x7'));var jayson=require(_0xe974('0x8'));var client=jayson[_0xe974('0x9')][_0xe974('0xa')]({'port':0x232a});config[_0xe974('0xb')]=_[_0xe974('0xc')](config[_0xe974('0xb')],{'host':_0xe974('0xd'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xe974('0xb')]));require('./user.socket')[_0xe974('0xe')](socket);function respondWithRpcPromise(_0x4e9231,_0x322e33,_0x4d2b2f){return new BPromise(function(_0x28ee7d,_0x47baad){return client[_0xe974('0xf')](_0x4e9231,_0x4d2b2f)[_0xe974('0x10')](function(_0x2c0799){logger['info'](_0xe974('0x11'),_0x322e33,_0xe974('0x12'));logger[_0xe974('0x13')](_0xe974('0x14'),_0x322e33,_0xe974('0x12'),JSON['stringify'](_0x2c0799));if(_0x2c0799[_0xe974('0x15')]){if(_0x2c0799['error'][_0xe974('0x16')]===0x1f4){logger[_0xe974('0x15')](_0xe974('0x11'),_0x322e33,_0x2c0799['error'][_0xe974('0x17')]);return _0x47baad(_0x2c0799[_0xe974('0x15')][_0xe974('0x17')]);}logger[_0xe974('0x15')](_0xe974('0x11'),_0x322e33,_0x2c0799[_0xe974('0x15')][_0xe974('0x17')]);return _0x28ee7d(_0x2c0799[_0xe974('0x15')][_0xe974('0x17')]);}else{logger[_0xe974('0x18')]('User,\x20%s,\x20%s',_0x322e33,'request\x20sent');_0x28ee7d(_0x2c0799[_0xe974('0x19')][_0xe974('0x17')]);}})[_0xe974('0x1a')](function(_0x29e05c){logger['error'](_0xe974('0x11'),_0x322e33,_0x29e05c);_0x47baad(_0x29e05c);});});}exports['GetUser']=function(_0x29ab13){var _0x1883b6=this;return new Promise(function(_0x209f0c,_0x547b77){return db[_0xe974('0x1b')][_0xe974('0x1c')]({'raw':_0x29ab13['options']?_0x29ab13['options']['raw']===undefined?!![]:![]:!![],'where':_0x29ab13[_0xe974('0x1d')]?_0x29ab13[_0xe974('0x1d')][_0xe974('0x1e')]||null:null,'attributes':_0x29ab13['options']?_0x29ab13['options']['attributes']||null:null,'limit':_0x29ab13['options']?_0x29ab13[_0xe974('0x1d')][_0xe974('0x1f')]||null:null,'include':_0x29ab13[_0xe974('0x1d')]?_0x29ab13[_0xe974('0x1d')][_0xe974('0x20')]?_[_0xe974('0x21')](_0x29ab13[_0xe974('0x1d')][_0xe974('0x20')],function(_0x36829d){return{'model':db[_0x36829d[_0xe974('0x22')]],'as':_0x36829d['as'],'attributes':_0x36829d[_0xe974('0x23')],'include':_0x36829d[_0xe974('0x20')]?_[_0xe974('0x21')](_0x36829d['include'],function(_0xc082e0){return{'model':db[_0xc082e0[_0xe974('0x22')]],'as':_0xc082e0['as'],'attributes':_0xc082e0[_0xe974('0x23')],'include':_0xc082e0[_0xe974('0x20')]?_[_0xe974('0x21')](_0xc082e0[_0xe974('0x20')],function(_0x1e9f3d){return{'model':db[_0x1e9f3d['model']],'as':_0x1e9f3d['as'],'attributes':_0x1e9f3d['attributes']};}):[]};}):[]};}):[]:[]})[_0xe974('0x10')](function(_0x4802c7){logger[_0xe974('0x18')]('GetUser',_0x29ab13);logger[_0xe974('0x13')](_0xe974('0x24'),_0x29ab13,JSON[_0xe974('0x25')](_0x4802c7));_0x209f0c(_0x4802c7);})[_0xe974('0x1a')](function(_0x32b94f){logger[_0xe974('0x15')](_0xe974('0x24'),_0x32b94f[_0xe974('0x17')],_0x29ab13);_0x547b77(_0x1883b6[_0xe974('0x15')](0x1f4,_0x32b94f[_0xe974('0x17')]));});});};exports['ShowUser']=function(_0x276ecd){var _0x10f586=this;return new Promise(function(_0x45df85,_0x166245){return db[_0xe974('0x1b')][_0xe974('0x26')]({'raw':_0x276ecd['options']?_0x276ecd[_0xe974('0x1d')][_0xe974('0x27')]===undefined?!![]:![]:!![],'where':_0x276ecd[_0xe974('0x1d')]?_0x276ecd[_0xe974('0x1d')][_0xe974('0x1e')]||null:null,'attributes':_0x276ecd['options']?_0x276ecd['options']['attributes']||null:null,'include':_0x276ecd[_0xe974('0x1d')]?_0x276ecd['options'][_0xe974('0x20')]?_[_0xe974('0x21')](_0x276ecd['options'][_0xe974('0x20')],function(_0x53086f){return{'model':db[_0x53086f[_0xe974('0x22')]],'as':_0x53086f['as'],'attributes':_0x53086f[_0xe974('0x23')],'include':_0x53086f[_0xe974('0x20')]?_['map'](_0x53086f[_0xe974('0x20')],function(_0x35a3fa){return{'model':db[_0x35a3fa['model']],'as':_0x35a3fa['as'],'attributes':_0x35a3fa[_0xe974('0x23')],'include':_0x35a3fa[_0xe974('0x20')]?_['map'](_0x35a3fa['include'],function(_0x5b9185){return{'model':db[_0x5b9185[_0xe974('0x22')]],'as':_0x5b9185['as'],'attributes':_0x5b9185[_0xe974('0x23')]};}):[]};}):[]};}):[]:[]})[_0xe974('0x10')](function(_0x3dc3c1){logger[_0xe974('0x18')](_0xe974('0x28'),_0x276ecd);logger[_0xe974('0x13')](_0xe974('0x28'),_0x276ecd,JSON[_0xe974('0x25')](_0x3dc3c1));_0x45df85(_0x3dc3c1);})['catch'](function(_0x3c883b){logger['error']('ShowUser',_0x3c883b[_0xe974('0x17')],_0x276ecd);_0x166245(_0x10f586['error'](0x1f4,_0x3c883b[_0xe974('0x17')]));});});};exports['PauseUser']=function(_0x4d4921){var _0x389f5a=this;return new Promise(function(_0x31a773,_0x2f08ac){var _0x3e353c;return db[_0xe974('0x1b')]['find']({'where':_0x4d4921[_0xe974('0x1d')][_0xe974('0x1e')]||{},'attributes':['id','name',_0xe974('0x29'),_0xe974('0x2a'),_0xe974('0x2b')]})[_0xe974('0x10')](function(_0x4be3e8){if(_0x4be3e8){_0x3e353c=_0x4be3e8;return db['UserVoiceQueueRt'][_0xe974('0x2c')]({'paused':0x1},{'where':{'UserId':_0x3e353c['id']},'individualHooks':!![]});}})[_0xe974('0x10')](function(){if(_0x3e353c){return db[_0xe974('0x2d')][_0xe974('0x1c')]({'where':{'membername':_0x3e353c[_0xe974('0x2e')],'type':'PAUSE','exitAt':null}});}})[_0xe974('0x10')](function(_0x537486){if(_0x3e353c){if(_0x537486&&_0x537486[_0xe974('0x2f')]){var _0x58f5c7=moment()[_0xe974('0x30')](_0xe974('0x31'));for(var _0x5cefe6=0x0,_0x36de72=_0x537486[_0xe974('0x2f')];_0x5cefe6<_0x36de72;_0x5cefe6++){_0x537486[_0x5cefe6]['updateAttributes']({'exitAt':_0x58f5c7});}}}})['then'](function(){if(_0x3e353c){var _0x41e331=[];var _0x196129=utils[_0xe974('0x32')]();_0x196129[_0xe974('0x33')](function(_0x2bce5b){_0x41e331['push']({'channel':_0x2bce5b,'membername':_0x3e353c['name'],'interface':_[_0xe974('0x34')](_0x3e353c[_0xe974('0x2b')])?util['format'](_0xe974('0x35'),_0x3e353c[_0xe974('0x2e')]):_0x3e353c[_0xe974('0x2b')],'type':_0xe974('0x36'),'enterAt':moment()['format'](_0xe974('0x31')),'data1':_0x4d4921['body'][_0xe974('0x37')]||_0xe974('0x38'),'role':_0x3e353c[_0xe974('0x29')],'internal':_0x3e353c['internal'],'uniqueid':_0x4d4921[_0xe974('0x39')][_0xe974('0x3a')]||null});});return db[_0xe974('0x2d')][_0xe974('0x3b')](_0x41e331,{'individualHooks':!![]});}})[_0xe974('0x10')](function(){if(_0x3e353c){return _0x3e353c['update']({'voicePause':!![],'mailPause':!![],'chatPause':!![],'faxPause':!![],'smsPause':!![],'openchannelPause':!![],'whatsappPause':!![],'pauseType':_0x4d4921[_0xe974('0x39')][_0xe974('0x37')]||_0xe974('0x38'),'lastPauseAt':moment()[_0xe974('0x30')](_0xe974('0x31'))});}})['then'](function(_0x56fda5){_0x31a773(_0x56fda5);})[_0xe974('0x1a')](function(_0x4ec052){_0x2f08ac(_0x389f5a[_0xe974('0x15')](0x1f4,_0x4ec052[_0xe974('0x17')]));});});};exports[_0xe974('0x3c')]=function(_0x7724b3){var _0x214828=this;return new Promise(function(_0x15fc4c,_0xd3952f){var _0xe7b4a7;return db[_0xe974('0x1b')][_0xe974('0x3d')]({'where':_0x7724b3[_0xe974('0x1d')][_0xe974('0x1e')]||{},'attributes':['id','name']})[_0xe974('0x10')](function(_0x4bcd3d){if(_0x4bcd3d){_0xe7b4a7=_0x4bcd3d;if(_0x7724b3['body'][_0xe974('0x3e')]&&!utils['isValidChannel'](_0x7724b3[_0xe974('0x39')][_0xe974('0x3e')])){throw new Error(_0xe974('0x3f'));}switch(_0x7724b3['body'][_0xe974('0x3e')]){case'voice':return db[_0xe974('0x40')][_0xe974('0x2c')]({'paused':0x0},{'where':{'UserId':_0xe7b4a7['id']}})[_0xe974('0x10')](function(){return db[_0xe974('0x2d')][_0xe974('0x26')]({'where':{'channel':_0x7724b3[_0xe974('0x39')]['channel'],'membername':_0xe7b4a7['name'],'type':_0xe974('0x36'),'exitAt':null}});})[_0xe974('0x10')](function(_0x2c288d){if(_0x2c288d){return _0x2c288d[_0xe974('0x2c')]({'exitAt':moment()[_0xe974('0x30')]('YYYY-MM-DD\x20HH:mm:ss'),'data2':_0xe974('0x41')},{'individualHooks':!![]});}return null;})['then'](function(){return _0xe7b4a7[_0xe974('0x2c')]({'voicePause':![]});});case _0xe974('0x42'):case _0xe974('0x43'):case _0xe974('0x44'):case'sms':case _0xe974('0x45'):case _0xe974('0x46'):return db[_0xe974('0x2d')][_0xe974('0x26')]({'where':{'channel':_0x7724b3['body']['channel'],'membername':_0xe7b4a7['name'],'type':_0xe974('0x36'),'exitAt':null}})[_0xe974('0x10')](function(_0x1dd16f){return _0x1dd16f[_0xe974('0x2c')]({'exitAt':moment()[_0xe974('0x30')](_0xe974('0x31')),'data2':_0xe974('0x41')},{'individualHooks':!![]});})[_0xe974('0x10')](function(){var _0x2703a7={};_[_0xe974('0x47')](_0x2703a7,util['format'](_0xe974('0x48'),_0x7724b3[_0xe974('0x39')]['channel'],_0xe974('0x49')),![]);return _0xe7b4a7[_0xe974('0x2c')](_0x2703a7);});default:return db[_0xe974('0x40')][_0xe974('0x2c')]({'paused':0x0},{'where':{'UserId':_0xe7b4a7['id']}})[_0xe974('0x10')](function(){return db[_0xe974('0x2d')]['findAll']({'where':{'membername':_0xe7b4a7[_0xe974('0x2e')],'type':'PAUSE','exitAt':null}});})[_0xe974('0x10')](function(_0x23bfa1){var _0x1b2179=[];_0x23bfa1['forEach'](function(_0x2fb419){_0x1b2179[_0xe974('0x4a')](_0x2fb419[_0xe974('0x2c')]({'exitAt':moment()[_0xe974('0x30')]('YYYY-MM-DD\x20HH:mm:ss'),'data2':_0xe974('0x41')}));});return BPromise[_0xe974('0x4b')](_0x1b2179);})[_0xe974('0x10')](function(){return _0xe7b4a7[_0xe974('0x2c')]({'voicePause':![],'mailPause':![],'chatPause':![],'faxPause':![],'smsPause':![],'openchannelPause':![],'whatsappPause':![]});});}}})[_0xe974('0x10')](function(_0x35699f){_0x15fc4c(_0x35699f);})['catch'](function(_0x55e524){_0xd3952f(_0x214828[_0xe974('0x15')](0x1f4,_0x55e524[_0xe974('0x17')]));});});};exports[_0xe974('0x4c')]=function(_0x2611a2){var _0x42c9b2=this;return new Promise(function(_0x5f3b86,_0x3c1331){var _0x5d94b8;return db['User'][_0xe974('0x3d')]({'where':_0x2611a2[_0xe974('0x1d')][_0xe974('0x1e')]||{},'attributes':['id',_0xe974('0x2e')]})[_0xe974('0x10')](function(_0x131c1d){if(_0x131c1d){_0x5d94b8=_0x131c1d;return db[_0xe974('0x40')][_0xe974('0x4d')]({'where':{'membername':_0x5d94b8['name']},'individualHooks':!![]});}})[_0xe974('0x10')](function(){if(_0x5d94b8){return db[_0xe974('0x2d')]['findAll']({'where':{'membername':_0x5d94b8[_0xe974('0x2e')],'exitAt':null}});}})[_0xe974('0x10')](function(_0x416fbf){if(_0x5d94b8){if(_0x416fbf&&_0x416fbf['length']){var _0x2eda94=[];_0x416fbf[_0xe974('0x33')](function(_0xb1215c){_0x2eda94[_0xe974('0x4a')](_0xb1215c[_0xe974('0x2c')]({'exitAt':moment()[_0xe974('0x30')](_0xe974('0x31'))}));});return BPromise[_0xe974('0x4b')](_0x2eda94);}}})[_0xe974('0x10')](function(){if(_0x5d94b8){return _0x5d94b8[_0xe974('0x2c')]({'online':![],'voicePause':![],'mailPause':![],'chatPause':![],'faxPause':![],'smsPause':![],'openchannelPause':![]});}})[_0xe974('0x10')](function(_0x56e153){_0x5f3b86(_0x56e153);})[_0xe974('0x1a')](function(_0x1589c1){_0x3c1331(_0x42c9b2[_0xe974('0x15')](0x1f4,_0x1589c1[_0xe974('0x17')]));});});};exports['LoginUser']=function(_0x316d0f){var _0x1beba9=this;return new Promise(function(_0x18f8dc,_0x2be881){var _0x47d09c;var _0x37c0dd;var _0x506ee7;var _0x3edba7;return db['User'][_0xe974('0x3d')]({'where':_0x316d0f[_0xe974('0x1d')][_0xe974('0x1e')]||{},'attributes':['id',_0xe974('0x2e'),'role',_0xe974('0x4e'),_0xe974('0x4f'),_0xe974('0x2a'),_0xe974('0x50'),'interface']})['then'](function(_0x5c1711){if(_0x5c1711){_0x47d09c=_0x5c1711;_0x3edba7=_0x316d0f[_0xe974('0x39')]['interface']?_0x316d0f[_0xe974('0x39')][_0xe974('0x2b')]:util[_0xe974('0x30')]('SIP/%s',_0x47d09c[_0xe974('0x2e')]);return db[_0xe974('0x1b')][_0xe974('0x51')]({'where':{'role':_0xe974('0x52'),'online':!![],'id':{'$ne':_0x47d09c['id']}}});}})['then'](function(_0xc02618){if(_0xc02618){_0x506ee7=_0xc02618;return require('../../config/license/util')[_0xe974('0x53')]();}})[_0xe974('0x10')](function(_0x369871){if(_0x369871&&_0x369871[_0xe974('0x54')]&&_0x506ee7>=_0x369871[_0xe974('0x54')]){throw new Error('Maximum\x20login\x20has\x20been\x20reached');}})[_0xe974('0x10')](function(){if(_0x47d09c){return db['UserVoiceQueueRt']['destroy']({'where':{'membername':_0x47d09c[_0xe974('0x2e')]},'individualHooks':!![]});}})[_0xe974('0x10')](function(){if(_0x47d09c){return _0x47d09c['getVoiceQueues']({'raw':!![]});}})['then'](function(_0xec143c){if(_0x47d09c){if(_0xec143c){var _0x448811=[];_0x37c0dd=_0xec143c;if(_0x37c0dd['length']){for(var _0x46688d=0x0;_0x46688d<_0x37c0dd[_0xe974('0x2f')];_0x46688d++){_0x448811[_0xe974('0x4a')](db[_0xe974('0x40')][_0xe974('0x55')]({'membername':_0x47d09c[_0xe974('0x2e')],'UserId':_0x47d09c['id'],'queue_name':_0x37c0dd[_0x46688d]['name'],'VoiceQueueId':_0x37c0dd[_0x46688d]['id'],'interface':_0x3edba7,'paused':_0x47d09c[_0xe974('0x50')]||![],'penalty':_0x37c0dd[_0x46688d][_0xe974('0x56')]||0x0}));}return BPromise[_0xe974('0x4b')](_0x448811);}}}})[_0xe974('0x10')](function(){if(_0x47d09c){return db['MemberReport'][_0xe974('0x1c')]({'where':{'membername':_0x47d09c[_0xe974('0x2e')],'exitAt':null}});}})[_0xe974('0x10')](function(_0x13ca43){if(_0x47d09c){if(_0x13ca43&&_0x13ca43[_0xe974('0x2f')]){var _0x37cf16=[];_0x13ca43[_0xe974('0x33')](function(_0x3b14a9){_0x37cf16[_0xe974('0x4a')](_0x3b14a9[_0xe974('0x2c')]({'exitAt':moment()[_0xe974('0x30')](_0xe974('0x31'))}));});return BPromise[_0xe974('0x4b')](_0x37cf16);}}})[_0xe974('0x10')](function(_0x1ea60f){if(_0x47d09c){var _0x540903=[];var _0xc9d93e=[];var _0x58d91b=utils[_0xe974('0x32')]();var _0x31f332={'membername':_0x47d09c[_0xe974('0x2e')],'interface':_0x3edba7,'enterAt':moment()[_0xe974('0x30')](_0xe974('0x31')),'role':_0x47d09c[_0xe974('0x29')],'internal':_0x47d09c['internal']};_0x58d91b[_0xe974('0x33')](function(_0x98262){_0x540903[_0xe974('0x4a')](_['merge']({'channel':_0x98262,'type':_0xe974('0x57'),'data1':'callysquare','data2':_0x3edba7},_0x31f332));if(_0x47d09c[_0xe974('0x50')]){_0xc9d93e['push'](_[_0xe974('0x58')]({'channel':_0x98262,'type':_0xe974('0x36'),'data1':_0xe974('0x59')},_0x31f332));}});return db['MemberReport'][_0xe974('0x3b')](_0x540903['concat'](_0xc9d93e),{'individualHooks':!![]});}})[_0xe974('0x10')](function(){if(_0x47d09c){return _0x47d09c[_0xe974('0x2c')]({'online':!![],'lastLoginAt':moment()[_0xe974('0x30')]('YYYY-MM-DD\x20HH:mm:ss'),'voicePause':_0x47d09c[_0xe974('0x50')]||![],'mailPause':_0x47d09c[_0xe974('0x50')]||![],'chatPause':_0x47d09c['loginInPause']||![],'faxPause':_0x47d09c[_0xe974('0x50')]||![],'smsPause':_0x47d09c[_0xe974('0x50')]||![],'openchannelPause':_0x47d09c[_0xe974('0x50')]||![],'pauseType':_0x47d09c[_0xe974('0x50')]?'LOGININPAUSE':null,'lastPauseAt':moment()['format'](_0xe974('0x31')),'interface':_0x3edba7});}})[_0xe974('0x10')](function(_0x264c9d){_0x18f8dc(_0x264c9d);})[_0xe974('0x1a')](function(_0x39e5b2){_0x2be881(_0x1beba9[_0xe974('0x15')](0x1f4,_0x39e5b2['message']));});});}; \ No newline at end of file diff --git a/server/api/user/user.socket.js b/server/api/user/user.socket.js index 53865cd..1f83b6e 100644 --- a/server/api/user/user.socket.js +++ b/server/api/user/user.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xefb3=['remove','update','emit','register','length','./user.events','save'];(function(_0x13b02f,_0x462a53){var _0x12e9a6=function(_0x187d57){while(--_0x187d57){_0x13b02f['push'](_0x13b02f['shift']());}};_0x12e9a6(++_0x462a53);}(_0xefb3,0x8a));var _0x3efb=function(_0x56e3e4,_0x2a52d5){_0x56e3e4=_0x56e3e4-0x0;var _0x85de30=_0xefb3[_0x56e3e4];return _0x85de30;};'use strict';var UserEvents=require(_0x3efb('0x0'));var events=[_0x3efb('0x1'),_0x3efb('0x2'),_0x3efb('0x3')];function createListener(_0x3d084f,_0x49a176){return function(_0x120d1e){_0x49a176[_0x3efb('0x4')](_0x3d084f,_0x120d1e);};}function removeListener(_0xfff016,_0x2f85b6){return function(){UserEvents['removeListener'](_0xfff016,_0x2f85b6);};}exports[_0x3efb('0x5')]=function(_0xefbc35){for(var _0x24126e=0x0,_0x160d3b=events[_0x3efb('0x6')];_0x24126e<_0x160d3b;_0x24126e++){var _0x15c00c=events[_0x24126e];var _0xa23cd=createListener('user:'+_0x15c00c,_0xefbc35);UserEvents['on'](_0x15c00c,_0xa23cd);}}; \ No newline at end of file +var _0x19ea=['register','length','user:','save','remove','update','emit','removeListener'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x19ea,0x14b));var _0xa19e=function(_0x5c2a2b,_0x22c94e){_0x5c2a2b=_0x5c2a2b-0x0;var _0x19921f=_0x19ea[_0x5c2a2b];return _0x19921f;};'use strict';var UserEvents=require('./user.events');var events=[_0xa19e('0x0'),_0xa19e('0x1'),_0xa19e('0x2')];function createListener(_0x29e377,_0x462892){return function(_0x184d6c){_0x462892[_0xa19e('0x3')](_0x29e377,_0x184d6c);};}function removeListener(_0x33f852,_0x202a28){return function(){UserEvents[_0xa19e('0x4')](_0x33f852,_0x202a28);};}exports[_0xa19e('0x5')]=function(_0x3a786f){for(var _0x574097=0x0,_0x3f9d5d=events[_0xa19e('0x6')];_0x574097<_0x3f9d5d;_0x574097++){var _0x5ee252=events[_0x574097];var _0x25ac51=createListener(_0xa19e('0x7')+_0x5ee252,_0x3a786f);UserEvents['on'](_0x5ee252,_0x25ac51);}}; \ No newline at end of file diff --git a/server/api/userChatQueue/index.js b/server/api/userChatQueue/index.js index 59352ae..8870b6d 100644 --- a/server/api/userChatQueue/index.js +++ b/server/api/userChatQueue/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x70e0=['../../components/auth/service','../../components/interaction/service','exports','multer','util','path','Router','fs-extra'];(function(_0x5d8333,_0x33a751){var _0x240203=function(_0x19154c){while(--_0x19154c){_0x5d8333['push'](_0x5d8333['shift']());}};_0x240203(++_0x33a751);}(_0x70e0,0x17b));var _0x070e=function(_0x4078bd,_0x211745){_0x4078bd=_0x4078bd-0x0;var _0x480151=_0x70e0[_0x4078bd];return _0x480151;};'use strict';var multer=require(_0x070e('0x0'));var util=require(_0x070e('0x1'));var path=require(_0x070e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x070e('0x3')]();var fs_extra=require(_0x070e('0x4'));var auth=require(_0x070e('0x5'));var interaction=require(_0x070e('0x6'));var config=require('../../config/environment');module[_0x070e('0x7')]=router; \ No newline at end of file +var _0xa9e0=['../../components/interaction/service','../../config/environment','exports','multer','util','path','Router','../../components/auth/service'];(function(_0x246380,_0x4b2a12){var _0x10fef8=function(_0x1a051c){while(--_0x1a051c){_0x246380['push'](_0x246380['shift']());}};_0x10fef8(++_0x4b2a12);}(_0xa9e0,0x123));var _0x0a9e=function(_0x311c35,_0x534915){_0x311c35=_0x311c35-0x0;var _0x5cc50c=_0xa9e0[_0x311c35];return _0x5cc50c;};'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'));module[_0x0a9e('0x7')]=router; \ No newline at end of file diff --git a/server/api/userChatQueue/userChatQueue.attributes.js b/server/api/userChatQueue/userChatQueue.attributes.js index 798572f..9006424 100644 --- a/server/api/userChatQueue/userChatQueue.attributes.js +++ b/server/api/userChatQueue/userChatQueue.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb335=['exports','sequelize'];(function(_0x5cb7dc,_0x2622e8){var _0x26f54d=function(_0xa4173f){while(--_0xa4173f){_0x5cb7dc['push'](_0x5cb7dc['shift']());}};_0x26f54d(++_0x2622e8);}(_0xb335,0x16d));var _0x5b33=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xb335[_0x3dd15e];return _0x231fd0;};'use strict';var Sequelize=require(_0x5b33('0x0'));module[_0x5b33('0x1')]={'penalty':{'type':Sequelize['INTEGER'],'defaultValue':0x0}}; \ No newline at end of file +'use strict';var Sequelize=require('sequelize');module['exports']={'penalty':{'type':Sequelize['INTEGER'],'defaultValue':0x0}}; \ No newline at end of file diff --git a/server/api/userChatQueue/userChatQueue.model.js b/server/api/userChatQueue/userChatQueue.model.js index d968227..6629dbf 100644 --- a/server/api/userChatQueue/userChatQueue.model.js +++ b/server/api/userChatQueue/userChatQueue.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7a3f=['../../config/logger','api','moment','bluebird','request-promise','rimraf','./userChatQueue.attributes','exports','define','UserChatQueue','user_has_chat_queues'];(function(_0x208bc9,_0x4f36f6){var _0x2675a8=function(_0x452e72){while(--_0x452e72){_0x208bc9['push'](_0x208bc9['shift']());}};_0x2675a8(++_0x4f36f6);}(_0x7a3f,0x1e4));var _0xf7a3=function(_0x59ee6f,_0x450239){_0x59ee6f=_0x59ee6f-0x0;var _0x4c0979=_0x7a3f[_0x59ee6f];return _0x4c0979;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xf7a3('0x0'))(_0xf7a3('0x1'));var moment=require(_0xf7a3('0x2'));var BPromise=require(_0xf7a3('0x3'));var rp=require(_0xf7a3('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xf7a3('0x5'));var config=require('../../config/environment');var attributes=require(_0xf7a3('0x6'));module[_0xf7a3('0x7')]=function(_0xbeffce,_0x2a298f){return _0xbeffce[_0xf7a3('0x8')](_0xf7a3('0x9'),attributes,{'tableName':_0xf7a3('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x994f=['request-promise','path','rimraf','../../config/environment','exports','define','UserChatQueue','user_has_chat_queues','lodash','util','../../config/logger','api','moment'];(function(_0x273f0f,_0x4148ac){var _0x568cac=function(_0x1eb369){while(--_0x1eb369){_0x273f0f['push'](_0x273f0f['shift']());}};_0x568cac(++_0x4148ac);}(_0x994f,0xb1));var _0xf994=function(_0x2577d9,_0x8f2f28){_0x2577d9=_0x2577d9-0x0;var _0x36fe58=_0x994f[_0x2577d9];return _0x36fe58;};'use strict';var _=require(_0xf994('0x0'));var util=require(_0xf994('0x1'));var logger=require(_0xf994('0x2'))(_0xf994('0x3'));var moment=require(_0xf994('0x4'));var BPromise=require('bluebird');var rp=require(_0xf994('0x5'));var fs=require('fs');var path=require(_0xf994('0x6'));var rimraf=require(_0xf994('0x7'));var config=require(_0xf994('0x8'));var attributes=require('./userChatQueue.attributes');module[_0xf994('0x9')]=function(_0x5cd4d0,_0x4ab946){return _0x5cd4d0[_0xf994('0xa')](_0xf994('0xb'),attributes,{'tableName':_0xf994('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/userChatQueue/userChatQueue.rpc.js b/server/api/userChatQueue/userChatQueue.rpc.js index 2b5ae99..bee259c 100644 --- a/server/api/userChatQueue/userChatQueue.rpc.js +++ b/server/api/userChatQueue/userChatQueue.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xda8c=['http','request','then','info','UserChatQueue,\x20%s,\x20%s','debug','UserChatQueue,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','result','catch','lodash','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client'];(function(_0x46aff0,_0x122890){var _0x9d78cf=function(_0x3f14cb){while(--_0x3f14cb){_0x46aff0['push'](_0x46aff0['shift']());}};_0x9d78cf(++_0x122890);}(_0xda8c,0x138));var _0xcda8=function(_0x3c3f97,_0x398b48){_0x3c3f97=_0x3c3f97-0x0;var _0x53da52=_0xda8c[_0x3c3f97];return _0x53da52;};'use strict';var _=require(_0xcda8('0x0'));var util=require('util');var moment=require(_0xcda8('0x1'));var BPromise=require(_0xcda8('0x2'));var rs=require(_0xcda8('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xcda8('0x4'))['db'];var utils=require(_0xcda8('0x5'));var logger=require(_0xcda8('0x6'))(_0xcda8('0x7'));var config=require('../../config/environment');var jayson=require(_0xcda8('0x8'));var client=jayson[_0xcda8('0x9')][_0xcda8('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x647671,_0x4f27ba,_0xcebf4f){return new BPromise(function(_0x1ffcde,_0x4fbd7e){return client[_0xcda8('0xb')](_0x647671,_0xcebf4f)[_0xcda8('0xc')](function(_0x2ca828){logger[_0xcda8('0xd')](_0xcda8('0xe'),_0x4f27ba,'request\x20sent');logger[_0xcda8('0xf')](_0xcda8('0x10'),_0x4f27ba,_0xcda8('0x11'),JSON['stringify'](_0x2ca828));if(_0x2ca828[_0xcda8('0x12')]){if(_0x2ca828[_0xcda8('0x12')][_0xcda8('0x13')]===0x1f4){logger[_0xcda8('0x12')](_0xcda8('0xe'),_0x4f27ba,_0x2ca828['error']['message']);return _0x4fbd7e(_0x2ca828[_0xcda8('0x12')]['message']);}logger[_0xcda8('0x12')](_0xcda8('0xe'),_0x4f27ba,_0x2ca828[_0xcda8('0x12')][_0xcda8('0x14')]);return _0x1ffcde(_0x2ca828['error']['message']);}else{logger[_0xcda8('0xd')]('UserChatQueue,\x20%s,\x20%s',_0x4f27ba,_0xcda8('0x11'));_0x1ffcde(_0x2ca828[_0xcda8('0x15')]['message']);}})[_0xcda8('0x16')](function(_0x573f60){logger[_0xcda8('0x12')](_0xcda8('0xe'),_0x4f27ba,_0x573f60);_0x4fbd7e(_0x573f60);});});} \ No newline at end of file +var _0x83b5=['message','result','catch','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','http','info','UserChatQueue,\x20%s,\x20%s','request\x20sent','UserChatQueue,\x20%s,\x20%s,\x20%s','error','code'];(function(_0x1c0171,_0x4a7c52){var _0xca4d5f=function(_0xd28367){while(--_0xd28367){_0x1c0171['push'](_0x1c0171['shift']());}};_0xca4d5f(++_0x4a7c52);}(_0x83b5,0x1b8));var _0x583b=function(_0x233716,_0x346676){_0x233716=_0x233716-0x0;var _0x302298=_0x83b5[_0x233716];return _0x302298;};'use strict';var _=require('lodash');var util=require(_0x583b('0x0'));var moment=require(_0x583b('0x1'));var BPromise=require(_0x583b('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x583b('0x3'));var db=require(_0x583b('0x4'))['db'];var utils=require(_0x583b('0x5'));var logger=require(_0x583b('0x6'))('rpc');var config=require(_0x583b('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x583b('0x8')][_0x583b('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x4a4c1c,_0x31c5d5,_0x26f99c){return new BPromise(function(_0x3d13ab,_0x48e834){return client['request'](_0x4a4c1c,_0x26f99c)['then'](function(_0x4e8595){logger[_0x583b('0xa')](_0x583b('0xb'),_0x31c5d5,_0x583b('0xc'));logger['debug'](_0x583b('0xd'),_0x31c5d5,_0x583b('0xc'),JSON['stringify'](_0x4e8595));if(_0x4e8595[_0x583b('0xe')]){if(_0x4e8595[_0x583b('0xe')][_0x583b('0xf')]===0x1f4){logger[_0x583b('0xe')]('UserChatQueue,\x20%s,\x20%s',_0x31c5d5,_0x4e8595[_0x583b('0xe')][_0x583b('0x10')]);return _0x48e834(_0x4e8595[_0x583b('0xe')]['message']);}logger['error'](_0x583b('0xb'),_0x31c5d5,_0x4e8595[_0x583b('0xe')]['message']);return _0x3d13ab(_0x4e8595['error'][_0x583b('0x10')]);}else{logger[_0x583b('0xa')](_0x583b('0xb'),_0x31c5d5,_0x583b('0xc'));_0x3d13ab(_0x4e8595[_0x583b('0x11')][_0x583b('0x10')]);}})[_0x583b('0x12')](function(_0x27372a){logger[_0x583b('0xe')](_0x583b('0xb'),_0x31c5d5,_0x27372a);_0x48e834(_0x27372a);});});} \ No newline at end of file diff --git a/server/api/userFaxQueue/index.js b/server/api/userFaxQueue/index.js index 00a7aa9..4de74a5 100644 --- a/server/api/userFaxQueue/index.js +++ b/server/api/userFaxQueue/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd8b0=['Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','multer','util'];(function(_0x3d38f0,_0x1750bd){var _0x329af5=function(_0x50cd8d){while(--_0x50cd8d){_0x3d38f0['push'](_0x3d38f0['shift']());}};_0x329af5(++_0x1750bd);}(_0xd8b0,0xad));var _0x0d8b=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0xd8b0[_0xa464c9];return _0x3d73c4;};'use strict';var multer=require(_0x0d8b('0x0'));var util=require(_0x0d8b('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0d8b('0x2')]();var fs_extra=require(_0x0d8b('0x3'));var auth=require(_0x0d8b('0x4'));var interaction=require(_0x0d8b('0x5'));var config=require(_0x0d8b('0x6'));module['exports']=router; \ No newline at end of file +var _0x70e0=['../../components/auth/service','../../components/interaction/service','exports','multer','util','path','Router','fs-extra'];(function(_0xbf1e8c,_0x5da6c1){var _0x3727eb=function(_0x163562){while(--_0x163562){_0xbf1e8c['push'](_0xbf1e8c['shift']());}};_0x3727eb(++_0x5da6c1);}(_0x70e0,0x17b));var _0x070e=function(_0x56d5e9,_0x28cf3e){_0x56d5e9=_0x56d5e9-0x0;var _0x540cc4=_0x70e0[_0x56d5e9];return _0x540cc4;};'use strict';var multer=require(_0x070e('0x0'));var util=require(_0x070e('0x1'));var path=require(_0x070e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x070e('0x3')]();var fs_extra=require(_0x070e('0x4'));var auth=require(_0x070e('0x5'));var interaction=require(_0x070e('0x6'));var config=require('../../config/environment');module[_0x070e('0x7')]=router; \ No newline at end of file diff --git a/server/api/userFaxQueue/userFaxQueue.attributes.js b/server/api/userFaxQueue/userFaxQueue.attributes.js index 56a3a0e..d45deb2 100644 --- a/server/api/userFaxQueue/userFaxQueue.attributes.js +++ b/server/api/userFaxQueue/userFaxQueue.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x99f0=['INTEGER','STRING'];(function(_0x5a7d26,_0x4cd0ba){var _0x56f50e=function(_0x49d27f){while(--_0x49d27f){_0x5a7d26['push'](_0x5a7d26['shift']());}};_0x56f50e(++_0x4cd0ba);}(_0x99f0,0x122));var _0x099f=function(_0x3e21f4,_0x43d310){_0x3e21f4=_0x3e21f4-0x0;var _0x40fc49=_0x99f0[_0x3e21f4];return _0x40fc49;};'use strict';var Sequelize=require('sequelize');module['exports']={'penalty':{'type':Sequelize[_0x099f('0x0')],'defaultValue':0x0},'assigned':{'type':Sequelize[_0x099f('0x0')],'defaultValue':0x0},'queue':{'type':Sequelize[_0x099f('0x1')]}}; \ No newline at end of file +var _0xc8af=['INTEGER','sequelize','exports'];(function(_0x13d07a,_0x41efc3){var _0x5ee0ee=function(_0x4ca94a){while(--_0x4ca94a){_0x13d07a['push'](_0x13d07a['shift']());}};_0x5ee0ee(++_0x41efc3);}(_0xc8af,0xd6));var _0xfc8a=function(_0x1ded7e,_0x4c7556){_0x1ded7e=_0x1ded7e-0x0;var _0x1e9c16=_0xc8af[_0x1ded7e];return _0x1e9c16;};'use strict';var Sequelize=require(_0xfc8a('0x0'));module[_0xfc8a('0x1')]={'penalty':{'type':Sequelize[_0xfc8a('0x2')],'defaultValue':0x0},'assigned':{'type':Sequelize[_0xfc8a('0x2')],'defaultValue':0x0},'queue':{'type':Sequelize['STRING']}}; \ No newline at end of file diff --git a/server/api/userFaxQueue/userFaxQueue.model.js b/server/api/userFaxQueue/userFaxQueue.model.js index f19f0d5..e18ebf9 100644 --- a/server/api/userFaxQueue/userFaxQueue.model.js +++ b/server/api/userFaxQueue/userFaxQueue.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe4fb=['rimraf','exports','define','UserFaxQueue','user_has_fax_queues','lodash','util','api','moment','bluebird','request-promise','path'];(function(_0x20f6e4,_0x586966){var _0x42e71e=function(_0x1b4056){while(--_0x1b4056){_0x20f6e4['push'](_0x20f6e4['shift']());}};_0x42e71e(++_0x586966);}(_0xe4fb,0x89));var _0xbe4f=function(_0x3bf83f,_0x181cac){_0x3bf83f=_0x3bf83f-0x0;var _0x22c4a9=_0xe4fb[_0x3bf83f];return _0x22c4a9;};'use strict';var _=require(_0xbe4f('0x0'));var util=require(_0xbe4f('0x1'));var logger=require('../../config/logger')(_0xbe4f('0x2'));var moment=require(_0xbe4f('0x3'));var BPromise=require(_0xbe4f('0x4'));var rp=require(_0xbe4f('0x5'));var fs=require('fs');var path=require(_0xbe4f('0x6'));var rimraf=require(_0xbe4f('0x7'));var config=require('../../config/environment');var attributes=require('./userFaxQueue.attributes');module[_0xbe4f('0x8')]=function(_0x36f2b2,_0x4e8407){return _0x36f2b2[_0xbe4f('0x9')](_0xbe4f('0xa'),attributes,{'tableName':_0xbe4f('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x9e44=['rimraf','../../config/environment','exports','define','UserFaxQueue','util','api','bluebird','request-promise','path'];(function(_0xcc2c3f,_0x483324){var _0x47b461=function(_0x2e9378){while(--_0x2e9378){_0xcc2c3f['push'](_0xcc2c3f['shift']());}};_0x47b461(++_0x483324);}(_0x9e44,0x1bd));var _0x49e4=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x9e44[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require(_0x49e4('0x0'));var logger=require('../../config/logger')(_0x49e4('0x1'));var moment=require('moment');var BPromise=require(_0x49e4('0x2'));var rp=require(_0x49e4('0x3'));var fs=require('fs');var path=require(_0x49e4('0x4'));var rimraf=require(_0x49e4('0x5'));var config=require(_0x49e4('0x6'));var attributes=require('./userFaxQueue.attributes');module[_0x49e4('0x7')]=function(_0x132934,_0x184099){return _0x132934[_0x49e4('0x8')](_0x49e4('0x9'),attributes,{'tableName':'user_has_fax_queues','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/userFaxQueue/userFaxQueue.rpc.js b/server/api/userFaxQueue/userFaxQueue.rpc.js index 833df32..2d5c76c 100644 --- a/server/api/userFaxQueue/userFaxQueue.rpc.js +++ b/server/api/userFaxQueue/userFaxQueue.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xaab6=['http','then','info','UserFaxQueue,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','UserFaxQueue,\x20%s,\x20%s','message','catch','lodash','ioredis','../../mysqldb','../../config/environment','client'];(function(_0x19e35c,_0x29cd1e){var _0x3e1fe8=function(_0x17258b){while(--_0x17258b){_0x19e35c['push'](_0x19e35c['shift']());}};_0x3e1fe8(++_0x29cd1e);}(_0xaab6,0x127));var _0x6aab=function(_0x29e3ec,_0x138a18){_0x29e3ec=_0x29e3ec-0x0;var _0x25727e=_0xaab6[_0x29e3ec];return _0x25727e;};'use strict';var _=require(_0x6aab('0x0'));var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x6aab('0x1'));var db=require(_0x6aab('0x2'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0x6aab('0x3'));var jayson=require('jayson/promise');var client=jayson[_0x6aab('0x4')][_0x6aab('0x5')]({'port':0x232a});function respondWithRpcPromise(_0xb776ea,_0x492995,_0x363956){return new BPromise(function(_0x5d092f,_0xbe1d1b){return client['request'](_0xb776ea,_0x363956)[_0x6aab('0x6')](function(_0x5b471e){logger[_0x6aab('0x7')]('UserFaxQueue,\x20%s,\x20%s',_0x492995,'request\x20sent');logger['debug'](_0x6aab('0x8'),_0x492995,_0x6aab('0x9'),JSON[_0x6aab('0xa')](_0x5b471e));if(_0x5b471e[_0x6aab('0xb')]){if(_0x5b471e[_0x6aab('0xb')]['code']===0x1f4){logger['error'](_0x6aab('0xc'),_0x492995,_0x5b471e[_0x6aab('0xb')][_0x6aab('0xd')]);return _0xbe1d1b(_0x5b471e['error'][_0x6aab('0xd')]);}logger['error']('UserFaxQueue,\x20%s,\x20%s',_0x492995,_0x5b471e['error']['message']);return _0x5d092f(_0x5b471e[_0x6aab('0xb')][_0x6aab('0xd')]);}else{logger['info'](_0x6aab('0xc'),_0x492995,_0x6aab('0x9'));_0x5d092f(_0x5b471e['result']['message']);}})[_0x6aab('0xe')](function(_0x3f331b){logger[_0x6aab('0xb')](_0x6aab('0xc'),_0x492995,_0x3f331b);_0xbe1d1b(_0x3f331b);});});} \ No newline at end of file +var _0xcf18=['randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','request','then','info','UserFaxQueue,\x20%s,\x20%s','request\x20sent','UserFaxQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','lodash','util','moment','bluebird'];(function(_0x156786,_0x142e91){var _0x31bd2f=function(_0x7213ba){while(--_0x7213ba){_0x156786['push'](_0x156786['shift']());}};_0x31bd2f(++_0x142e91);}(_0xcf18,0xd8));var _0x8cf1=function(_0x82f6aa,_0xc6acd1){_0x82f6aa=_0x82f6aa-0x0;var _0x3ff4d0=_0xcf18[_0x82f6aa];return _0x3ff4d0;};'use strict';var _=require(_0x8cf1('0x0'));var util=require(_0x8cf1('0x1'));var moment=require(_0x8cf1('0x2'));var BPromise=require(_0x8cf1('0x3'));var rs=require(_0x8cf1('0x4'));var fs=require('fs');var Redis=require(_0x8cf1('0x5'));var db=require(_0x8cf1('0x6'))['db'];var utils=require(_0x8cf1('0x7'));var logger=require('../../config/logger')(_0x8cf1('0x8'));var config=require(_0x8cf1('0x9'));var jayson=require(_0x8cf1('0xa'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x2c4e78,_0x2c8193,_0x515a2e){return new BPromise(function(_0xa9f851,_0x5796ef){return client[_0x8cf1('0xb')](_0x2c4e78,_0x515a2e)[_0x8cf1('0xc')](function(_0x2c697e){logger[_0x8cf1('0xd')](_0x8cf1('0xe'),_0x2c8193,_0x8cf1('0xf'));logger['debug'](_0x8cf1('0x10'),_0x2c8193,_0x8cf1('0xf'),JSON[_0x8cf1('0x11')](_0x2c697e));if(_0x2c697e[_0x8cf1('0x12')]){if(_0x2c697e['error'][_0x8cf1('0x13')]===0x1f4){logger[_0x8cf1('0x12')](_0x8cf1('0xe'),_0x2c8193,_0x2c697e[_0x8cf1('0x12')][_0x8cf1('0x14')]);return _0x5796ef(_0x2c697e[_0x8cf1('0x12')][_0x8cf1('0x14')]);}logger[_0x8cf1('0x12')]('UserFaxQueue,\x20%s,\x20%s',_0x2c8193,_0x2c697e[_0x8cf1('0x12')]['message']);return _0xa9f851(_0x2c697e[_0x8cf1('0x12')][_0x8cf1('0x14')]);}else{logger['info'](_0x8cf1('0xe'),_0x2c8193,_0x8cf1('0xf'));_0xa9f851(_0x2c697e[_0x8cf1('0x15')][_0x8cf1('0x14')]);}})['catch'](function(_0x58c6e4){logger[_0x8cf1('0x12')](_0x8cf1('0xe'),_0x2c8193,_0x58c6e4);_0x5796ef(_0x58c6e4);});});} \ No newline at end of file diff --git a/server/api/userMailQueue/index.js b/server/api/userMailQueue/index.js index 0b8cd32..f0f761c 100644 --- a/server/api/userMailQueue/index.js +++ b/server/api/userMailQueue/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['../../components/interaction/service','../../config/environment','exports','multer','util','path','Router','../../components/auth/service'];(function(_0x15b932,_0x39ba3f){var _0x28fa64=function(_0x479c8a){while(--_0x479c8a){_0x15b932['push'](_0x15b932['shift']());}};_0x28fa64(++_0x39ba3f);}(_0xa9e0,0x123));var _0x0a9e=function(_0x24237f,_0x4cf32c){_0x24237f=_0x24237f-0x0;var _0x48298e=_0xa9e0[_0x24237f];return _0x48298e;};'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'));module[_0x0a9e('0x7')]=router; \ No newline at end of file +var _0xd8b0=['Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','multer','util'];(function(_0x1bdfb6,_0x2dd242){var _0x5c124d=function(_0x3af4c3){while(--_0x3af4c3){_0x1bdfb6['push'](_0x1bdfb6['shift']());}};_0x5c124d(++_0x2dd242);}(_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'));module['exports']=router; \ No newline at end of file diff --git a/server/api/userMailQueue/userMailQueue.attributes.js b/server/api/userMailQueue/userMailQueue.attributes.js index e8c5efb..c76b52d 100644 --- a/server/api/userMailQueue/userMailQueue.attributes.js +++ b/server/api/userMailQueue/userMailQueue.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0ad1=['INTEGER'];(function(_0x1f9eb7,_0x1c2ad9){var _0x159986=function(_0x9ea660){while(--_0x9ea660){_0x1f9eb7['push'](_0x1f9eb7['shift']());}};_0x159986(++_0x1c2ad9);}(_0x0ad1,0x114));var _0x10ad=function(_0x47d6d2,_0x6b4efe){_0x47d6d2=_0x47d6d2-0x0;var _0x2535fa=_0x0ad1[_0x47d6d2];return _0x2535fa;};'use strict';var Sequelize=require('sequelize');module['exports']={'penalty':{'type':Sequelize[_0x10ad('0x0')],'defaultValue':0x0}}; \ No newline at end of file +var _0x9723=['INTEGER','sequelize','exports'];(function(_0x1d2195,_0x4b8096){var _0x4962cd=function(_0x301f5a){while(--_0x301f5a){_0x1d2195['push'](_0x1d2195['shift']());}};_0x4962cd(++_0x4b8096);}(_0x9723,0xac));var _0x3972=function(_0x446f11,_0x95cf21){_0x446f11=_0x446f11-0x0;var _0x385cb5=_0x9723[_0x446f11];return _0x385cb5;};'use strict';var Sequelize=require(_0x3972('0x0'));module[_0x3972('0x1')]={'penalty':{'type':Sequelize[_0x3972('0x2')],'defaultValue':0x0}}; \ No newline at end of file diff --git a/server/api/userMailQueue/userMailQueue.model.js b/server/api/userMailQueue/userMailQueue.model.js index 2896458..978c89b 100644 --- a/server/api/userMailQueue/userMailQueue.model.js +++ b/server/api/userMailQueue/userMailQueue.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4337=['../../config/environment','./userMailQueue.attributes','lodash','util','../../config/logger','api','moment','rimraf'];(function(_0x336a2a,_0x25ce02){var _0x1fa402=function(_0x4f11e7){while(--_0x4f11e7){_0x336a2a['push'](_0x336a2a['shift']());}};_0x1fa402(++_0x25ce02);}(_0x4337,0x152));var _0x7433=function(_0x141007,_0x47663c){_0x141007=_0x141007-0x0;var _0x3702e9=_0x4337[_0x141007];return _0x3702e9;};'use strict';var _=require(_0x7433('0x0'));var util=require(_0x7433('0x1'));var logger=require(_0x7433('0x2'))(_0x7433('0x3'));var moment=require(_0x7433('0x4'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x7433('0x5'));var config=require(_0x7433('0x6'));var attributes=require(_0x7433('0x7'));module['exports']=function(_0x44995b,_0x55ba3d){return _0x44995b['define']('UserMailQueue',attributes,{'tableName':'user_has_mail_queues','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x3cf2=['../../config/logger','moment','request-promise','path','rimraf','../../config/environment','exports','UserMailQueue','user_has_mail_queues','lodash'];(function(_0x153a82,_0x2633b1){var _0x481cb4=function(_0x3042a7){while(--_0x3042a7){_0x153a82['push'](_0x153a82['shift']());}};_0x481cb4(++_0x2633b1);}(_0x3cf2,0x15d));var _0x23cf=function(_0x12ab0f,_0x5c1d64){_0x12ab0f=_0x12ab0f-0x0;var _0x2f1bee=_0x3cf2[_0x12ab0f];return _0x2f1bee;};'use strict';var _=require(_0x23cf('0x0'));var util=require('util');var logger=require(_0x23cf('0x1'))('api');var moment=require(_0x23cf('0x2'));var BPromise=require('bluebird');var rp=require(_0x23cf('0x3'));var fs=require('fs');var path=require(_0x23cf('0x4'));var rimraf=require(_0x23cf('0x5'));var config=require(_0x23cf('0x6'));var attributes=require('./userMailQueue.attributes');module[_0x23cf('0x7')]=function(_0x5318b0,_0x4dff6b){return _0x5318b0['define'](_0x23cf('0x8'),attributes,{'tableName':_0x23cf('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/userMailQueue/userMailQueue.rpc.js b/server/api/userMailQueue/userMailQueue.rpc.js index 0779ee8..e7c9781 100644 --- a/server/api/userMailQueue/userMailQueue.rpc.js +++ b/server/api/userMailQueue/userMailQueue.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4b84=['../../config/logger','rpc','http','then','info','request\x20sent','debug','UserMailQueue,\x20%s,\x20%s,\x20%s','stringify','error','UserMailQueue,\x20%s,\x20%s','message','lodash','util','randomstring','../../config/utils'];(function(_0x246e23,_0x866eb4){var _0xf062b4=function(_0x283212){while(--_0x283212){_0x246e23['push'](_0x246e23['shift']());}};_0xf062b4(++_0x866eb4);}(_0x4b84,0x1cc));var _0x44b8=function(_0x27031e,_0x1eb8cd){_0x27031e=_0x27031e-0x0;var _0xfd46b3=_0x4b84[_0x27031e];return _0xfd46b3;};'use strict';var _=require(_0x44b8('0x0'));var util=require(_0x44b8('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x44b8('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x44b8('0x3'));var logger=require(_0x44b8('0x4'))(_0x44b8('0x5'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client'][_0x44b8('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x54274b,_0x327f59,_0x5947f7){return new BPromise(function(_0x3e87c5,_0x5a2353){return client['request'](_0x54274b,_0x5947f7)[_0x44b8('0x7')](function(_0x42319d){logger[_0x44b8('0x8')]('UserMailQueue,\x20%s,\x20%s',_0x327f59,_0x44b8('0x9'));logger[_0x44b8('0xa')](_0x44b8('0xb'),_0x327f59,_0x44b8('0x9'),JSON[_0x44b8('0xc')](_0x42319d));if(_0x42319d[_0x44b8('0xd')]){if(_0x42319d[_0x44b8('0xd')]['code']===0x1f4){logger[_0x44b8('0xd')](_0x44b8('0xe'),_0x327f59,_0x42319d['error'][_0x44b8('0xf')]);return _0x5a2353(_0x42319d['error'][_0x44b8('0xf')]);}logger[_0x44b8('0xd')]('UserMailQueue,\x20%s,\x20%s',_0x327f59,_0x42319d[_0x44b8('0xd')]['message']);return _0x3e87c5(_0x42319d['error'][_0x44b8('0xf')]);}else{logger[_0x44b8('0x8')](_0x44b8('0xe'),_0x327f59,_0x44b8('0x9'));_0x3e87c5(_0x42319d['result']['message']);}})['catch'](function(_0x3fe9fb){logger['error'](_0x44b8('0xe'),_0x327f59,_0x3fe9fb);_0x5a2353(_0x3fe9fb);});});} \ No newline at end of file +var _0xa41a=['rpc','../../config/environment','client','http','request','then','info','UserMailQueue,\x20%s,\x20%s','request\x20sent','debug','UserMailQueue,\x20%s,\x20%s,\x20%s','error','message','result','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x39f068,_0x55c6b4){var _0xf53edc=function(_0x5b67fc){while(--_0x5b67fc){_0x39f068['push'](_0x39f068['shift']());}};_0xf53edc(++_0x55c6b4);}(_0xa41a,0x6b));var _0xaa41=function(_0xde5e51,_0x3c274d){_0xde5e51=_0xde5e51-0x0;var _0x5cee14=_0xa41a[_0xde5e51];return _0x5cee14;};'use strict';var _=require(_0xaa41('0x0'));var util=require(_0xaa41('0x1'));var moment=require('moment');var BPromise=require(_0xaa41('0x2'));var rs=require(_0xaa41('0x3'));var fs=require('fs');var Redis=require(_0xaa41('0x4'));var db=require(_0xaa41('0x5'))['db'];var utils=require(_0xaa41('0x6'));var logger=require(_0xaa41('0x7'))(_0xaa41('0x8'));var config=require(_0xaa41('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xaa41('0xa')][_0xaa41('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x54bc5a,_0x5b1fff,_0x179545){return new BPromise(function(_0x202cce,_0x588ab4){return client[_0xaa41('0xc')](_0x54bc5a,_0x179545)[_0xaa41('0xd')](function(_0x409dab){logger[_0xaa41('0xe')](_0xaa41('0xf'),_0x5b1fff,_0xaa41('0x10'));logger[_0xaa41('0x11')](_0xaa41('0x12'),_0x5b1fff,_0xaa41('0x10'),JSON['stringify'](_0x409dab));if(_0x409dab[_0xaa41('0x13')]){if(_0x409dab[_0xaa41('0x13')]['code']===0x1f4){logger['error'](_0xaa41('0xf'),_0x5b1fff,_0x409dab['error'][_0xaa41('0x14')]);return _0x588ab4(_0x409dab[_0xaa41('0x13')][_0xaa41('0x14')]);}logger[_0xaa41('0x13')](_0xaa41('0xf'),_0x5b1fff,_0x409dab['error'][_0xaa41('0x14')]);return _0x202cce(_0x409dab[_0xaa41('0x13')][_0xaa41('0x14')]);}else{logger[_0xaa41('0xe')](_0xaa41('0xf'),_0x5b1fff,_0xaa41('0x10'));_0x202cce(_0x409dab[_0xaa41('0x15')]['message']);}})[_0xaa41('0x16')](function(_0x16b930){logger[_0xaa41('0x13')](_0xaa41('0xf'),_0x5b1fff,_0x16b930);_0x588ab4(_0x16b930);});});} \ No newline at end of file diff --git a/server/api/userNotification/index.js b/server/api/userNotification/index.js index 935b432..a0c3cb4 100644 --- a/server/api/userNotification/index.js +++ b/server/api/userNotification/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2977=['post','isAuthenticated','sendUserNotification','multer','path','connect-timeout','express','fs-extra','../../config/environment','./userNotification.controller'];(function(_0x31a371,_0x50828e){var _0x2a5bd6=function(_0x2fb481){while(--_0x2fb481){_0x31a371['push'](_0x31a371['shift']());}};_0x2a5bd6(++_0x50828e);}(_0x2977,0x7b));var _0x7297=function(_0x36d79a,_0x58ac33){_0x36d79a=_0x36d79a-0x0;var _0x12d075=_0x2977[_0x36d79a];return _0x12d075;};'use strict';var multer=require(_0x7297('0x0'));var util=require('util');var path=require(_0x7297('0x1'));var timeout=require(_0x7297('0x2'));var express=require(_0x7297('0x3'));var router=express['Router']();var fs_extra=require(_0x7297('0x4'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x7297('0x5'));var controller=require(_0x7297('0x6'));router[_0x7297('0x7')]('/',auth[_0x7297('0x8')](),controller[_0x7297('0x9')]);module['exports']=router; \ No newline at end of file +var _0xa5e8=['path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./userNotification.controller','isAuthenticated','sendUserNotification','exports','multer'];(function(_0x2b70df,_0x224881){var _0x44b705=function(_0x4d79f0){while(--_0x4d79f0){_0x2b70df['push'](_0x2b70df['shift']());}};_0x44b705(++_0x224881);}(_0xa5e8,0x9b));var _0x8a5e=function(_0x6a825f,_0x546793){_0x6a825f=_0x6a825f-0x0;var _0x5399c4=_0xa5e8[_0x6a825f];return _0x5399c4;};'use strict';var multer=require(_0x8a5e('0x0'));var util=require('util');var path=require(_0x8a5e('0x1'));var timeout=require(_0x8a5e('0x2'));var express=require(_0x8a5e('0x3'));var router=express[_0x8a5e('0x4')]();var fs_extra=require(_0x8a5e('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x8a5e('0x6'));var config=require(_0x8a5e('0x7'));var controller=require(_0x8a5e('0x8'));router['post']('/',auth[_0x8a5e('0x9')](),controller[_0x8a5e('0xa')]);module[_0x8a5e('0xb')]=router; \ No newline at end of file diff --git a/server/api/userNotification/userNotification.attributes.js b/server/api/userNotification/userNotification.attributes.js index a7e5e0f..bc11b8b 100644 --- a/server/api/userNotification/userNotification.attributes.js +++ b/server/api/userNotification/userNotification.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x70db=['TEXT','STRING','BOOLEAN','sequelize'];(function(_0x5b5eb4,_0x117c87){var _0x42af53=function(_0xdf6fcb){while(--_0xdf6fcb){_0x5b5eb4['push'](_0x5b5eb4['shift']());}};_0x42af53(++_0x117c87);}(_0x70db,0x8f));var _0xb70d=function(_0xb0f7c3,_0x4eae95){_0xb0f7c3=_0xb0f7c3-0x0;var _0x28ea68=_0x70db[_0xb0f7c3];return _0x28ea68;};'use strict';var Sequelize=require(_0xb70d('0x0'));module['exports']={'body':{'type':Sequelize[_0xb70d('0x1')]},'senderName':{'type':Sequelize[_0xb70d('0x2')]},'recipientsId':{'type':Sequelize[_0xb70d('0x1')]},'recipientsDescription':{'type':Sequelize[_0xb70d('0x2')]},'beep':{'type':Sequelize[_0xb70d('0x3')]}}; \ No newline at end of file +var _0x9f15=['STRING','BOOLEAN','exports','TEXT'];(function(_0x4fbf0c,_0x452ae8){var _0x113da1=function(_0x578480){while(--_0x578480){_0x4fbf0c['push'](_0x4fbf0c['shift']());}};_0x113da1(++_0x452ae8);}(_0x9f15,0x11a));var _0x59f1=function(_0x53577d,_0x4c7f85){_0x53577d=_0x53577d-0x0;var _0x381c01=_0x9f15[_0x53577d];return _0x381c01;};'use strict';var Sequelize=require('sequelize');module[_0x59f1('0x0')]={'body':{'type':Sequelize[_0x59f1('0x1')]},'senderName':{'type':Sequelize[_0x59f1('0x2')]},'recipientsId':{'type':Sequelize[_0x59f1('0x1')]},'recipientsDescription':{'type':Sequelize[_0x59f1('0x2')]},'beep':{'type':Sequelize[_0x59f1('0x3')]}}; \ No newline at end of file diff --git a/server/api/userNotification/userNotification.controller.js b/server/api/userNotification/userNotification.controller.js index a77b53c..008e23b 100644 --- a/server/api/userNotification/userNotification.controller.js +++ b/server/api/userNotification/userNotification.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0b88=['to-csv','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/utils','../../config/license/util','redis','defaults','localhost','socket.io-emitter','./userNotification.socket','status','json','limit','undefined','count','offset','Content-Range','apply','reject','save','update','then','destroy','sendStatus','error','stack','name','send','body','hasOwnProperty','text','TemplateId','Sequelize','ValidationError','Missing\x20\x27view\x27\x20parameter','recipients','Missing\x20\x27recipients\x27\x20parameter','Invalid\x20\x27recipients\x27\x20object','chatqueue','faxqueue','mailqueue','openchannelqueue','smsqueue','voicequeue','whatsappqueue','user','includes','model','toLowerCase','Invalid\x20model\x20in\x20\x27recipients\x27\x20object','senderName','fullname','recipientsDescription','isEmpty','beep','recipientsId','sortBy','join','sequelize','create','forEach','recipient','emit','userNotification:send','catch','Template','findOne','html','Invalid\x20\x27TemplateId\x27\x20parameter','render','view','startCase','queue','replace','Queue','ids','push','all','flatten','getAgents','map','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','ejs','lodash','squel','crypto','jsforce','desk.js'];(function(_0x5b0da,_0x2e5b56){var _0x380761=function(_0x23ad4e){while(--_0x23ad4e){_0x5b0da['push'](_0x5b0da['shift']());}};_0x380761(++_0x2e5b56);}(_0x0b88,0x11d));var _0x80b8=function(_0x2ef1a8,_0x3ad0c4){_0x2ef1a8=_0x2ef1a8-0x0;var _0x368066=_0x0b88[_0x2ef1a8];return _0x368066;};'use strict';var emlformat=require(_0x80b8('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x80b8('0x1'));var jsonpatch=require(_0x80b8('0x2'));var rp=require(_0x80b8('0x3'));var moment=require(_0x80b8('0x4'));var BPromise=require(_0x80b8('0x5'));var Mustache=require(_0x80b8('0x6'));var util=require('util');var path=require(_0x80b8('0x7'));var sox=require(_0x80b8('0x8'));var csv=require('to-csv');var ejs=require(_0x80b8('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x80b8('0xa'));var squel=require(_0x80b8('0xb'));var crypto=require(_0x80b8('0xc'));var jsforce=require(_0x80b8('0xd'));var deskjs=require(_0x80b8('0xe'));var toCsv=require(_0x80b8('0xf'));var querystring=require('querystring');var Papa=require(_0x80b8('0x10'));var Redis=require(_0x80b8('0x11'));var authService=require(_0x80b8('0x12'));var qs=require(_0x80b8('0x13'));var as=require(_0x80b8('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x80b8('0x15'));var utils=require(_0x80b8('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0x80b8('0x17'));var db=require('../../mysqldb')['db'];config[_0x80b8('0x18')]=_[_0x80b8('0x19')](config[_0x80b8('0x18')],{'host':_0x80b8('0x1a'),'port':0x18eb});var socket=require(_0x80b8('0x1b'))(new Redis(config[_0x80b8('0x18')]));require(_0x80b8('0x1c'))['register'](socket);function respondWithStatusCode(_0x2f08c4,_0x5e1e58){_0x5e1e58=_0x5e1e58||0xcc;return function(_0x44c135){if(_0x44c135){return _0x2f08c4['sendStatus'](_0x5e1e58);}return _0x2f08c4[_0x80b8('0x1d')](_0x5e1e58)['end']();};}function respondWithResult(_0x3f164b,_0x5b2176){_0x5b2176=_0x5b2176||0xc8;return function(_0xbe1e7e){if(_0xbe1e7e){return _0x3f164b['status'](_0x5b2176)[_0x80b8('0x1e')](_0xbe1e7e);}};}function respondWithFilteredResult(_0x39cf58,_0x45237a){return function(_0x2b0141){if(_0x2b0141){var _0x48626d=typeof _0x45237a['offset']==='undefined'&&typeof _0x45237a[_0x80b8('0x1f')]===_0x80b8('0x20');var _0x582fc2=_0x2b0141[_0x80b8('0x21')];var _0x3645f6=_0x48626d?0x0:_0x45237a['offset'];var _0xe8d68f=_0x48626d?_0x2b0141[_0x80b8('0x21')]:_0x45237a[_0x80b8('0x22')]+_0x45237a['limit'];var _0x562b24;if(_0xe8d68f>=_0x582fc2){_0xe8d68f=_0x582fc2;_0x562b24=0xc8;}else{_0x562b24=0xce;}_0x39cf58['status'](_0x562b24);return _0x39cf58['set'](_0x80b8('0x23'),_0x3645f6+'-'+_0xe8d68f+'/'+_0x582fc2)['json'](_0x2b0141);}return null;};}function patchUpdates(_0x4b933d){return function(_0x5e4b5c){try{jsonpatch[_0x80b8('0x24')](_0x5e4b5c,_0x4b933d,!![]);}catch(_0x4814f2){return BPromise[_0x80b8('0x25')](_0x4814f2);}return _0x5e4b5c[_0x80b8('0x26')]();};}function saveUpdates(_0x518f7f,_0x4a4dee){return function(_0x3cc801){if(_0x3cc801){return _0x3cc801[_0x80b8('0x27')](_0x518f7f)[_0x80b8('0x28')](function(_0x2ae9d7){return _0x2ae9d7;});}return null;};}function removeEntity(_0x485db4,_0x3c9798){return function(_0x55f96b){if(_0x55f96b){return _0x55f96b[_0x80b8('0x29')]()[_0x80b8('0x28')](function(){_0x485db4[_0x80b8('0x1d')](0xcc)['end']();});}};}function handleEntityNotFound(_0x5ac97d,_0x48df9c){return function(_0x5ecc67){if(!_0x5ecc67){_0x5ac97d[_0x80b8('0x2a')](0x194);}return _0x5ecc67;};}function handleError(_0xe760f4,_0x242163){_0x242163=_0x242163||0x1f4;return function(_0x349080){logger[_0x80b8('0x2b')](_0x349080[_0x80b8('0x2c')]);if(_0x349080[_0x80b8('0x2d')]){delete _0x349080['name'];}_0xe760f4[_0x80b8('0x1d')](_0x242163)[_0x80b8('0x2e')](_0x349080);};}exports['sendUserNotification']=function(_0x509518,_0x3b0df0,_0x139a04){if(!_0x509518[_0x80b8('0x2f')][_0x80b8('0x30')](_0x80b8('0x31'))&&!_0x509518[_0x80b8('0x2f')][_0x80b8('0x30')](_0x80b8('0x32'))){throw new db[(_0x80b8('0x33'))][(_0x80b8('0x34'))]('Must\x20specify\x20at\x20least\x20one\x20argument\x20for\x20\x27text\x27\x20or\x20\x27TemplateId\x27');}else{if(_0x509518['body'][_0x80b8('0x30')](_0x80b8('0x32'))&&!_0x509518[_0x80b8('0x2f')][_0x80b8('0x30')]('view')){throw new db[(_0x80b8('0x33'))][(_0x80b8('0x34'))](_0x80b8('0x35'));}if(!_0x509518[_0x80b8('0x2f')][_0x80b8('0x30')](_0x80b8('0x36'))){throw new db[(_0x80b8('0x33'))][(_0x80b8('0x34'))](_0x80b8('0x37'));}else{try{var _0x15925a=JSON['parse'](_0x509518[_0x80b8('0x2f')]['recipients']);}catch(_0x3d07ef){logger[_0x80b8('0x2b')](_0x3d07ef);throw new db[(_0x80b8('0x33'))][(_0x80b8('0x34'))](_0x80b8('0x38'));}var _0x123bfe=[_0x80b8('0x39'),_0x80b8('0x3a'),_0x80b8('0x3b'),_0x80b8('0x3c'),_0x80b8('0x3d'),_0x80b8('0x3e'),_0x80b8('0x3f'),'team',_0x80b8('0x40')];if(_['some'](_0x15925a,function(_0x560dfb){return!_[_0x80b8('0x41')](_0x123bfe,_0x560dfb[_0x80b8('0x42')][_0x80b8('0x43')]());})){throw new db[(_0x80b8('0x33'))][(_0x80b8('0x34'))](_0x80b8('0x44'));}}}var _0x4e398b={};_0x4e398b['senderName']=_0x509518[_0x80b8('0x2f')]['hasOwnProperty'](_0x80b8('0x45'))?_0x509518[_0x80b8('0x2f')][_0x80b8('0x45')]:_0x509518['user'][_0x80b8('0x46')];_0x4e398b[_0x80b8('0x47')]=_[_0x80b8('0x48')](_0x509518[_0x80b8('0x2f')][_0x80b8('0x47')])?null:_0x509518[_0x80b8('0x2f')][_0x80b8('0x47')];_0x4e398b[_0x80b8('0x49')]=_0x509518[_0x80b8('0x2f')]['beep']||![];_0x4e398b['SenderId']=_0x509518[_0x80b8('0x40')]['id'];return getContent(_0x509518[_0x80b8('0x2f')])[_0x80b8('0x28')](function(_0x1675cf){_0x4e398b[_0x80b8('0x2f')]=_0x1675cf;return getRecipients(_0x15925a);})[_0x80b8('0x28')](function(_0x35aec3){_0x4e398b[_0x80b8('0x4a')]=_[_0x80b8('0x4b')](_0x35aec3)[_0x80b8('0x4c')](',');return db[_0x80b8('0x4d')]['transaction'](function(_0x11146c){return db['UserNotification'][_0x80b8('0x4e')](_0x4e398b,{'raw':!![],'transaction':_0x11146c})[_0x80b8('0x28')](function(_0x588c42){var _0x4e861a={'sender':_0x4e398b['senderName'],'description':_0x4e398b[_0x80b8('0x47')],'content':_0x4e398b[_0x80b8('0x2f')],'beep':_0x4e398b[_0x80b8('0x49')]};_0x35aec3[_0x80b8('0x4f')](function(_0x4eb73b){_0x4e861a[_0x80b8('0x50')]=_0x4eb73b;socket[_0x80b8('0x51')](_0x80b8('0x52'),_0x4e861a);});return _0x588c42;});});})[_0x80b8('0x28')](respondWithResult(_0x3b0df0,0xc9))[_0x80b8('0x53')](handleError(_0x3b0df0,null));};function getContent(_0x577d8d){return new BPromise(function(_0x1b3acd,_0x3094da){if(_0x577d8d[_0x80b8('0x31')]){_0x1b3acd(_0x577d8d[_0x80b8('0x31')]);return;}return db[_0x80b8('0x54')][_0x80b8('0x55')]({'attributes':[_0x80b8('0x56')],'where':{'id':_0x577d8d[_0x80b8('0x32')]},'raw':!![]})[_0x80b8('0x28')](function(_0x225613){if(!_0x225613)throw new db[(_0x80b8('0x33'))]['ValidationError'](_0x80b8('0x57'));var _0x1ebf6d=Mustache[_0x80b8('0x58')](_0x225613[_0x80b8('0x56')],_0x577d8d[_0x80b8('0x59')]);_0x1b3acd(_0x1ebf6d);})[_0x80b8('0x53')](function(_0x49f33b){_0x3094da(_0x49f33b);});});}function getRecipients(_0x2f1e25){return new BPromise(function(_0x2016c0,_0x9a6f16){var _0x47becf=[];var _0x5dfb18=[];_0x2f1e25[_0x80b8('0x4f')](function(_0x3ad847){var _0x3e1d95=_[_0x80b8('0x5a')](_0x3ad847[_0x80b8('0x42')]['toLowerCase']());if(_0x3e1d95==='User'){_0x47becf=_['union'](_0x47becf,_0x3ad847['ids']);}else{if(_[_0x80b8('0x41')](_0x3e1d95,_0x80b8('0x5b')))_0x3e1d95=_0x3e1d95[_0x80b8('0x5c')](_0x80b8('0x5b'),_0x80b8('0x5d'));_0x3ad847[_0x80b8('0x5e')][_0x80b8('0x4f')](function(_0x4de063){_0x5dfb18[_0x80b8('0x5f')](getAgents(_0x3e1d95,_0x4de063));});}});return BPromise[_0x80b8('0x60')](_0x5dfb18)['then'](function(_0x449104){_0x47becf=_['union'](_0x47becf,_[_0x80b8('0x61')](_0x449104));_0x2016c0(_0x47becf);})['catch'](function(_0x39463a){_0x9a6f16(_0x39463a);});});}function getAgents(_0x38469b,_0x3cc061){return new BPromise(function(_0x2cf3d2,_0x317977){return db[_0x38469b][_0x80b8('0x55')]({'where':{'id':_0x3cc061}})['then'](function(_0x4299b1){return _0x4299b1[_0x80b8('0x62')]({'attributes':['id'],'raw':!![]})['then'](function(_0x69142f){var _0x60987=_[_0x80b8('0x63')](_0x69142f,'id');_0x2cf3d2(_0x60987);});})['catch'](function(_0x204dee){_0x317977(_0x204dee);});});} \ No newline at end of file +var _0x13a6=['startCase','model','toLowerCase','User','ids','queue','push','union','getAgents','map','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','api','../../config/utils','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./userNotification.socket','register','sendStatus','status','json','offset','limit','undefined','count','Content-Range','apply','reject','save','then','end','error','stack','name','sendUserNotification','body','hasOwnProperty','text','TemplateId','Sequelize','Must\x20specify\x20at\x20least\x20one\x20argument\x20for\x20\x27text\x27\x20or\x20\x27TemplateId\x27','ValidationError','Missing\x20\x27view\x27\x20parameter','recipients','Invalid\x20\x27recipients\x27\x20object','faxqueue','mailqueue','smsqueue','voicequeue','whatsappqueue','team','some','includes','Invalid\x20model\x20in\x20\x27recipients\x27\x20object','senderName','user','fullname','isEmpty','recipientsDescription','beep','SenderId','recipientsId','sortBy','join','sequelize','UserNotification','create','forEach','recipient','emit','catch','Template','findOne','Invalid\x20\x27TemplateId\x27\x20parameter','html','view'];(function(_0x4e1a8a,_0x2737a5){var _0x2b6d6=function(_0x2fdb51){while(--_0x2fdb51){_0x4e1a8a['push'](_0x4e1a8a['shift']());}};_0x2b6d6(++_0x2737a5);}(_0x13a6,0x130));var _0x613a=function(_0x5e43ae,_0x302656){_0x5e43ae=_0x5e43ae-0x0;var _0x2596af=_0x13a6[_0x5e43ae];return _0x2596af;};'use strict';var emlformat=require(_0x613a('0x0'));var rimraf=require(_0x613a('0x1'));var zipdir=require(_0x613a('0x2'));var jsonpatch=require(_0x613a('0x3'));var rp=require(_0x613a('0x4'));var moment=require('moment');var BPromise=require(_0x613a('0x5'));var Mustache=require(_0x613a('0x6'));var util=require(_0x613a('0x7'));var path=require(_0x613a('0x8'));var sox=require(_0x613a('0x9'));var csv=require(_0x613a('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x613a('0xb'));var _=require(_0x613a('0xc'));var squel=require(_0x613a('0xd'));var crypto=require(_0x613a('0xe'));var jsforce=require(_0x613a('0xf'));var deskjs=require(_0x613a('0x10'));var toCsv=require('to-csv');var querystring=require(_0x613a('0x11'));var Papa=require(_0x613a('0x12'));var Redis=require(_0x613a('0x13'));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('../../config/logger')(_0x613a('0x14'));var utils=require(_0x613a('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0x613a('0x16'));var db=require(_0x613a('0x17'))['db'];config[_0x613a('0x18')]=_[_0x613a('0x19')](config[_0x613a('0x18')],{'host':_0x613a('0x1a'),'port':0x18eb});var socket=require(_0x613a('0x1b'))(new Redis(config[_0x613a('0x18')]));require(_0x613a('0x1c'))[_0x613a('0x1d')](socket);function respondWithStatusCode(_0x748bd4,_0x20c1c6){_0x20c1c6=_0x20c1c6||0xcc;return function(_0x4083cc){if(_0x4083cc){return _0x748bd4[_0x613a('0x1e')](_0x20c1c6);}return _0x748bd4[_0x613a('0x1f')](_0x20c1c6)['end']();};}function respondWithResult(_0x4df6d5,_0x1eb866){_0x1eb866=_0x1eb866||0xc8;return function(_0x20a5b2){if(_0x20a5b2){return _0x4df6d5[_0x613a('0x1f')](_0x1eb866)[_0x613a('0x20')](_0x20a5b2);}};}function respondWithFilteredResult(_0x557588,_0x246e8c){return function(_0x10128b){if(_0x10128b){var _0x20aaa6=typeof _0x246e8c[_0x613a('0x21')]==='undefined'&&typeof _0x246e8c[_0x613a('0x22')]===_0x613a('0x23');var _0x5cc5a9=_0x10128b['count'];var _0x54782e=_0x20aaa6?0x0:_0x246e8c[_0x613a('0x21')];var _0x510d22=_0x20aaa6?_0x10128b[_0x613a('0x24')]:_0x246e8c[_0x613a('0x21')]+_0x246e8c[_0x613a('0x22')];var _0x4abec1;if(_0x510d22>=_0x5cc5a9){_0x510d22=_0x5cc5a9;_0x4abec1=0xc8;}else{_0x4abec1=0xce;}_0x557588[_0x613a('0x1f')](_0x4abec1);return _0x557588['set'](_0x613a('0x25'),_0x54782e+'-'+_0x510d22+'/'+_0x5cc5a9)[_0x613a('0x20')](_0x10128b);}return null;};}function patchUpdates(_0x40dfbb){return function(_0x42bf41){try{jsonpatch[_0x613a('0x26')](_0x42bf41,_0x40dfbb,!![]);}catch(_0x12803b){return BPromise[_0x613a('0x27')](_0x12803b);}return _0x42bf41[_0x613a('0x28')]();};}function saveUpdates(_0xb8a461,_0x3901ff){return function(_0x14ffde){if(_0x14ffde){return _0x14ffde['update'](_0xb8a461)[_0x613a('0x29')](function(_0x377df0){return _0x377df0;});}return null;};}function removeEntity(_0x1033c6,_0xabb9e5){return function(_0x4690f3){if(_0x4690f3){return _0x4690f3['destroy']()[_0x613a('0x29')](function(){_0x1033c6[_0x613a('0x1f')](0xcc)[_0x613a('0x2a')]();});}};}function handleEntityNotFound(_0x23f8c8,_0x3b7829){return function(_0x244e97){if(!_0x244e97){_0x23f8c8[_0x613a('0x1e')](0x194);}return _0x244e97;};}function handleError(_0x4bc5ef,_0x1a1e69){_0x1a1e69=_0x1a1e69||0x1f4;return function(_0xa53a30){logger[_0x613a('0x2b')](_0xa53a30[_0x613a('0x2c')]);if(_0xa53a30[_0x613a('0x2d')]){delete _0xa53a30[_0x613a('0x2d')];}_0x4bc5ef['status'](_0x1a1e69)['send'](_0xa53a30);};}exports[_0x613a('0x2e')]=function(_0x1dd15e,_0x2e97ff,_0x14c36f){if(!_0x1dd15e[_0x613a('0x2f')][_0x613a('0x30')](_0x613a('0x31'))&&!_0x1dd15e['body'][_0x613a('0x30')](_0x613a('0x32'))){throw new db[(_0x613a('0x33'))]['ValidationError'](_0x613a('0x34'));}else{if(_0x1dd15e[_0x613a('0x2f')]['hasOwnProperty'](_0x613a('0x32'))&&!_0x1dd15e['body']['hasOwnProperty']('view')){throw new db[(_0x613a('0x33'))][(_0x613a('0x35'))](_0x613a('0x36'));}if(!_0x1dd15e['body'][_0x613a('0x30')](_0x613a('0x37'))){throw new db['Sequelize'][(_0x613a('0x35'))]('Missing\x20\x27recipients\x27\x20parameter');}else{try{var _0x29b7d2=JSON['parse'](_0x1dd15e[_0x613a('0x2f')][_0x613a('0x37')]);}catch(_0x534329){logger[_0x613a('0x2b')](_0x534329);throw new db[(_0x613a('0x33'))]['ValidationError'](_0x613a('0x38'));}var _0x59c0c6=['chatqueue',_0x613a('0x39'),_0x613a('0x3a'),'openchannelqueue',_0x613a('0x3b'),_0x613a('0x3c'),_0x613a('0x3d'),_0x613a('0x3e'),'user'];if(_[_0x613a('0x3f')](_0x29b7d2,function(_0x4e8fc9){return!_[_0x613a('0x40')](_0x59c0c6,_0x4e8fc9['model']['toLowerCase']());})){throw new db[(_0x613a('0x33'))][(_0x613a('0x35'))](_0x613a('0x41'));}}}var _0x2c1519={};_0x2c1519[_0x613a('0x42')]=_0x1dd15e[_0x613a('0x2f')][_0x613a('0x30')](_0x613a('0x42'))?_0x1dd15e['body'][_0x613a('0x42')]:_0x1dd15e[_0x613a('0x43')][_0x613a('0x44')];_0x2c1519['recipientsDescription']=_[_0x613a('0x45')](_0x1dd15e['body'][_0x613a('0x46')])?null:_0x1dd15e[_0x613a('0x2f')][_0x613a('0x46')];_0x2c1519[_0x613a('0x47')]=_0x1dd15e[_0x613a('0x2f')][_0x613a('0x47')]||![];_0x2c1519[_0x613a('0x48')]=_0x1dd15e[_0x613a('0x43')]['id'];return getContent(_0x1dd15e['body'])[_0x613a('0x29')](function(_0x53414c){_0x2c1519[_0x613a('0x2f')]=_0x53414c;return getRecipients(_0x29b7d2);})[_0x613a('0x29')](function(_0x5f5ac9){_0x2c1519[_0x613a('0x49')]=_[_0x613a('0x4a')](_0x5f5ac9)[_0x613a('0x4b')](',');return db[_0x613a('0x4c')]['transaction'](function(_0x2fed45){return db[_0x613a('0x4d')][_0x613a('0x4e')](_0x2c1519,{'raw':!![],'transaction':_0x2fed45})[_0x613a('0x29')](function(_0x5a0f2c){var _0x1f7e88={'sender':_0x2c1519[_0x613a('0x42')],'description':_0x2c1519[_0x613a('0x46')],'content':_0x2c1519[_0x613a('0x2f')],'beep':_0x2c1519[_0x613a('0x47')]};_0x5f5ac9[_0x613a('0x4f')](function(_0x433f84){_0x1f7e88[_0x613a('0x50')]=_0x433f84;socket[_0x613a('0x51')]('userNotification:send',_0x1f7e88);});return _0x5a0f2c;});});})[_0x613a('0x29')](respondWithResult(_0x2e97ff,0xc9))[_0x613a('0x52')](handleError(_0x2e97ff,null));};function getContent(_0x425d60){return new BPromise(function(_0x443997,_0x4e496b){if(_0x425d60[_0x613a('0x31')]){_0x443997(_0x425d60[_0x613a('0x31')]);return;}return db[_0x613a('0x53')][_0x613a('0x54')]({'attributes':['html'],'where':{'id':_0x425d60['TemplateId']},'raw':!![]})['then'](function(_0x2cbbed){if(!_0x2cbbed)throw new db['Sequelize'][(_0x613a('0x35'))](_0x613a('0x55'));var _0xe38607=Mustache['render'](_0x2cbbed[_0x613a('0x56')],_0x425d60[_0x613a('0x57')]);_0x443997(_0xe38607);})[_0x613a('0x52')](function(_0x29912f){_0x4e496b(_0x29912f);});});}function getRecipients(_0x1db6aa){return new BPromise(function(_0xba1819,_0x2f1104){var _0x4d039f=[];var _0x1a2cd5=[];_0x1db6aa[_0x613a('0x4f')](function(_0x1f97ae){var _0x16ad07=_[_0x613a('0x58')](_0x1f97ae[_0x613a('0x59')][_0x613a('0x5a')]());if(_0x16ad07===_0x613a('0x5b')){_0x4d039f=_['union'](_0x4d039f,_0x1f97ae[_0x613a('0x5c')]);}else{if(_[_0x613a('0x40')](_0x16ad07,_0x613a('0x5d')))_0x16ad07=_0x16ad07['replace'](_0x613a('0x5d'),'Queue');_0x1f97ae[_0x613a('0x5c')][_0x613a('0x4f')](function(_0x876d53){_0x1a2cd5[_0x613a('0x5e')](getAgents(_0x16ad07,_0x876d53));});}});return BPromise['all'](_0x1a2cd5)['then'](function(_0x32d50b){_0x4d039f=_[_0x613a('0x5f')](_0x4d039f,_['flatten'](_0x32d50b));_0xba1819(_0x4d039f);})[_0x613a('0x52')](function(_0x39facd){_0x2f1104(_0x39facd);});});}function getAgents(_0x35544a,_0x487449){return new BPromise(function(_0x4aebb6,_0x51adb7){return db[_0x35544a][_0x613a('0x54')]({'where':{'id':_0x487449}})[_0x613a('0x29')](function(_0x5d4468){return _0x5d4468[_0x613a('0x60')]({'attributes':['id'],'raw':!![]})['then'](function(_0x1c85e2){var _0x56e9e1=_[_0x613a('0x61')](_0x1c85e2,'id');_0x4aebb6(_0x56e9e1);});})[_0x613a('0x52')](function(_0x132b78){_0x51adb7(_0x132b78);});});} \ No newline at end of file diff --git a/server/api/userNotification/userNotification.events.js b/server/api/userNotification/userNotification.events.js index 3f07d95..8d84af2 100644 --- a/server/api/userNotification/userNotification.events.js +++ b/server/api/userNotification/userNotification.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0806=['save','emit','hasOwnProperty','hook','exports','../../mysqldb','UserNotification','setMaxListeners'];(function(_0x12742e,_0x43f6fa){var _0x173452=function(_0x500743){while(--_0x500743){_0x12742e['push'](_0x12742e['shift']());}};_0x173452(++_0x43f6fa);}(_0x0806,0x10d));var _0x6080=function(_0x283948,_0x374215){_0x283948=_0x283948-0x0;var _0x18f5dd=_0x0806[_0x283948];return _0x18f5dd;};'use strict';var EventEmitter=require('events');var UserNotification=require(_0x6080('0x0'))['db'][_0x6080('0x1')];var UserNotificationEvents=new EventEmitter();UserNotificationEvents[_0x6080('0x2')](0x0);var events={'afterCreate':_0x6080('0x3'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x495a9b){return function(_0x35d0ce,_0x2ab368,_0x3cabab){UserNotificationEvents[_0x6080('0x4')](_0x495a9b+':'+_0x35d0ce['id'],_0x35d0ce);UserNotificationEvents[_0x6080('0x4')](_0x495a9b,_0x35d0ce);_0x3cabab(null);};}for(var e in events){if(events[_0x6080('0x5')](e)){var event=events[e];UserNotification[_0x6080('0x6')](e,emitEvent(event));}}module[_0x6080('0x7')]=UserNotificationEvents; \ No newline at end of file +var _0xeb69=['remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','UserNotification','setMaxListeners','save','update'];(function(_0x7a3247,_0x15cb12){var _0x1bfde5=function(_0x62bbef){while(--_0x62bbef){_0x7a3247['push'](_0x7a3247['shift']());}};_0x1bfde5(++_0x15cb12);}(_0xeb69,0x73));var _0x9eb6=function(_0x5c64e3,_0x563e68){_0x5c64e3=_0x5c64e3-0x0;var _0x297db0=_0xeb69[_0x5c64e3];return _0x297db0;};'use strict';var EventEmitter=require(_0x9eb6('0x0'));var UserNotification=require(_0x9eb6('0x1'))['db'][_0x9eb6('0x2')];var UserNotificationEvents=new EventEmitter();UserNotificationEvents[_0x9eb6('0x3')](0x0);var events={'afterCreate':_0x9eb6('0x4'),'afterUpdate':_0x9eb6('0x5'),'afterDestroy':_0x9eb6('0x6')};function emitEvent(_0x146f5a){return function(_0x547970,_0x4ca517,_0x30c8be){UserNotificationEvents['emit'](_0x146f5a+':'+_0x547970['id'],_0x547970);UserNotificationEvents[_0x9eb6('0x7')](_0x146f5a,_0x547970);_0x30c8be(null);};}for(var e in events){if(events[_0x9eb6('0x8')](e)){var event=events[e];UserNotification[_0x9eb6('0x9')](e,emitEvent(event));}}module[_0x9eb6('0xa')]=UserNotificationEvents; \ No newline at end of file diff --git a/server/api/userNotification/userNotification.model.js b/server/api/userNotification/userNotification.model.js index 59cd045..5ea47fc 100644 --- a/server/api/userNotification/userNotification.model.js +++ b/server/api/userNotification/userNotification.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9e8e=['UserNotification','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment','./userNotification.attributes','exports','define'];(function(_0xffc711,_0x128b51){var _0x1cdd7e=function(_0x12198e){while(--_0x12198e){_0xffc711['push'](_0xffc711['shift']());}};_0x1cdd7e(++_0x128b51);}(_0x9e8e,0x16b));var _0xe9e8=function(_0x335998,_0x25c920){_0x335998=_0x335998-0x0;var _0x4fff9a=_0x9e8e[_0x335998];return _0x4fff9a;};'use strict';var _=require(_0xe9e8('0x0'));var util=require(_0xe9e8('0x1'));var logger=require(_0xe9e8('0x2'))(_0xe9e8('0x3'));var moment=require(_0xe9e8('0x4'));var BPromise=require(_0xe9e8('0x5'));var rp=require(_0xe9e8('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0xe9e8('0x7'));var config=require(_0xe9e8('0x8'));var attributes=require(_0xe9e8('0x9'));module[_0xe9e8('0xa')]=function(_0x3ed7a8,_0x3338f3){return _0x3ed7a8[_0xe9e8('0xb')](_0xe9e8('0xc'),attributes,{'tableName':'userNotifications','paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xe9e8('0xd'),'collate':_0xe9e8('0xe')});}; \ No newline at end of file +var _0x854d=['utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment','request-promise','path','./userNotification.attributes','exports','define','userNotifications'];(function(_0x544a35,_0x125ca8){var _0x2e49b2=function(_0x4ba1d9){while(--_0x4ba1d9){_0x544a35['push'](_0x544a35['shift']());}};_0x2e49b2(++_0x125ca8);}(_0x854d,0x13a));var _0xd854=function(_0x47c753,_0x516e28){_0x47c753=_0x47c753-0x0;var _0x214d54=_0x854d[_0x47c753];return _0x214d54;};'use strict';var _=require(_0xd854('0x0'));var util=require(_0xd854('0x1'));var logger=require(_0xd854('0x2'))(_0xd854('0x3'));var moment=require(_0xd854('0x4'));var BPromise=require('bluebird');var rp=require(_0xd854('0x5'));var fs=require('fs');var path=require(_0xd854('0x6'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0xd854('0x7'));module[_0xd854('0x8')]=function(_0x360a83,_0x2f22b4){return _0x360a83[_0xd854('0x9')]('UserNotification',attributes,{'tableName':_0xd854('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xd854('0xb'),'collate':_0xd854('0xc')});}; \ No newline at end of file diff --git a/server/api/userNotification/userNotification.rpc.js b/server/api/userNotification/userNotification.rpc.js index 5376d8f..55c1d79 100644 --- a/server/api/userNotification/userNotification.rpc.js +++ b/server/api/userNotification/userNotification.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0990=['../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','redis','localhost','socket.io-emitter','register','request','then','UserNotification,\x20%s,\x20%s','request\x20sent','debug','UserNotification,\x20%s,\x20%s,\x20%s','stringify','code','error','message','result','catch','lodash','util','moment','bluebird','randomstring'];(function(_0x454704,_0x3ff635){var _0x45a18e=function(_0xe5e6c){while(--_0xe5e6c){_0x454704['push'](_0x454704['shift']());}};_0x45a18e(++_0x3ff635);}(_0x0990,0x1d7));var _0x0099=function(_0x3a3b9e,_0xc59037){_0x3a3b9e=_0x3a3b9e-0x0;var _0x148103=_0x0990[_0x3a3b9e];return _0x148103;};'use strict';var _=require(_0x0099('0x0'));var util=require(_0x0099('0x1'));var moment=require(_0x0099('0x2'));var BPromise=require(_0x0099('0x3'));var rs=require(_0x0099('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x0099('0x5'))['db'];var utils=require(_0x0099('0x6'));var logger=require(_0x0099('0x7'))(_0x0099('0x8'));var config=require(_0x0099('0x9'));var jayson=require(_0x0099('0xa'));var client=jayson[_0x0099('0xb')]['http']({'port':0x232a});config[_0x0099('0xc')]=_['defaults'](config[_0x0099('0xc')],{'host':_0x0099('0xd'),'port':0x18eb});var socket=require(_0x0099('0xe'))(new Redis(config['redis']));require('./userNotification.socket')[_0x0099('0xf')](socket);function respondWithRpcPromise(_0xf16efc,_0x370e4c,_0xc9b441){return new BPromise(function(_0x44c13a,_0x1a22b2){return client[_0x0099('0x10')](_0xf16efc,_0xc9b441)[_0x0099('0x11')](function(_0x422ab5){logger['info'](_0x0099('0x12'),_0x370e4c,_0x0099('0x13'));logger[_0x0099('0x14')](_0x0099('0x15'),_0x370e4c,_0x0099('0x13'),JSON[_0x0099('0x16')](_0x422ab5));if(_0x422ab5['error']){if(_0x422ab5['error'][_0x0099('0x17')]===0x1f4){logger[_0x0099('0x18')](_0x0099('0x12'),_0x370e4c,_0x422ab5['error'][_0x0099('0x19')]);return _0x1a22b2(_0x422ab5[_0x0099('0x18')][_0x0099('0x19')]);}logger[_0x0099('0x18')](_0x0099('0x12'),_0x370e4c,_0x422ab5[_0x0099('0x18')][_0x0099('0x19')]);return _0x44c13a(_0x422ab5[_0x0099('0x18')][_0x0099('0x19')]);}else{logger['info'](_0x0099('0x12'),_0x370e4c,_0x0099('0x13'));_0x44c13a(_0x422ab5[_0x0099('0x1a')][_0x0099('0x19')]);}})[_0x0099('0x1b')](function(_0x2ba5bb){logger[_0x0099('0x18')](_0x0099('0x12'),_0x370e4c,_0x2ba5bb);_0x1a22b2(_0x2ba5bb);});});} \ No newline at end of file +var _0xe4d9=['result','lodash','util','bluebird','ioredis','../../config/utils','../../config/logger','rpc','jayson/promise','client','defaults','redis','localhost','socket.io-emitter','./userNotification.socket','register','info','UserNotification,\x20%s,\x20%s','request\x20sent','stringify','error','code','message'];(function(_0x309f88,_0x26daae){var _0x22b0a1=function(_0x224887){while(--_0x224887){_0x309f88['push'](_0x309f88['shift']());}};_0x22b0a1(++_0x26daae);}(_0xe4d9,0xe7));var _0x9e4d=function(_0x38e31a,_0x595a57){_0x38e31a=_0x38e31a-0x0;var _0x2020be=_0xe4d9[_0x38e31a];return _0x2020be;};'use strict';var _=require(_0x9e4d('0x0'));var util=require(_0x9e4d('0x1'));var moment=require('moment');var BPromise=require(_0x9e4d('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x9e4d('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x9e4d('0x4'));var logger=require(_0x9e4d('0x5'))(_0x9e4d('0x6'));var config=require('../../config/environment');var jayson=require(_0x9e4d('0x7'));var client=jayson[_0x9e4d('0x8')]['http']({'port':0x232a});config['redis']=_[_0x9e4d('0x9')](config[_0x9e4d('0xa')],{'host':_0x9e4d('0xb'),'port':0x18eb});var socket=require(_0x9e4d('0xc'))(new Redis(config[_0x9e4d('0xa')]));require(_0x9e4d('0xd'))[_0x9e4d('0xe')](socket);function respondWithRpcPromise(_0x194fd4,_0x174cc8,_0x1d613c){return new BPromise(function(_0x36a65d,_0x43d8ac){return client['request'](_0x194fd4,_0x1d613c)['then'](function(_0x47378d){logger[_0x9e4d('0xf')](_0x9e4d('0x10'),_0x174cc8,_0x9e4d('0x11'));logger['debug']('UserNotification,\x20%s,\x20%s,\x20%s',_0x174cc8,'request\x20sent',JSON[_0x9e4d('0x12')](_0x47378d));if(_0x47378d[_0x9e4d('0x13')]){if(_0x47378d[_0x9e4d('0x13')][_0x9e4d('0x14')]===0x1f4){logger['error'](_0x9e4d('0x10'),_0x174cc8,_0x47378d[_0x9e4d('0x13')][_0x9e4d('0x15')]);return _0x43d8ac(_0x47378d['error']['message']);}logger[_0x9e4d('0x13')](_0x9e4d('0x10'),_0x174cc8,_0x47378d[_0x9e4d('0x13')][_0x9e4d('0x15')]);return _0x36a65d(_0x47378d[_0x9e4d('0x13')][_0x9e4d('0x15')]);}else{logger[_0x9e4d('0xf')]('UserNotification,\x20%s,\x20%s',_0x174cc8,_0x9e4d('0x11'));_0x36a65d(_0x47378d[_0x9e4d('0x16')][_0x9e4d('0x15')]);}})['catch'](function(_0x4e13a3){logger[_0x9e4d('0x13')]('UserNotification,\x20%s,\x20%s',_0x174cc8,_0x4e13a3);_0x43d8ac(_0x4e13a3);});});} \ No newline at end of file diff --git a/server/api/userNotification/userNotification.socket.js b/server/api/userNotification/userNotification.socket.js index 76d7826..4c8c230 100644 --- a/server/api/userNotification/userNotification.socket.js +++ b/server/api/userNotification/userNotification.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe49d=['register','userNotification:','save','remove','update','emit','removeListener'];(function(_0xf32f2e,_0x5d3d74){var _0x3f1b98=function(_0x2e4e6b){while(--_0x2e4e6b){_0xf32f2e['push'](_0xf32f2e['shift']());}};_0x3f1b98(++_0x5d3d74);}(_0xe49d,0x121));var _0xde49=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xe49d[_0x20a584];return _0x4b41a8;};'use strict';var UserNotificationEvents=require('./userNotification.events');var events=[_0xde49('0x0'),_0xde49('0x1'),_0xde49('0x2')];function createListener(_0x5661b6,_0x29bc95){return function(_0x218247){_0x29bc95[_0xde49('0x3')](_0x5661b6,_0x218247);};}function removeListener(_0x14b516,_0x584982){return function(){UserNotificationEvents[_0xde49('0x4')](_0x14b516,_0x584982);};}exports[_0xde49('0x5')]=function(_0x53f997){for(var _0x244f9c=0x0,_0x3c66f8=events['length'];_0x244f9c<_0x3c66f8;_0x244f9c++){var _0x248900=events[_0x244f9c];var _0x50a15b=createListener(_0xde49('0x6')+_0x248900,_0x53f997);UserNotificationEvents['on'](_0x248900,_0x50a15b);}}; \ No newline at end of file +var _0xc16f=['emit','removeListener','register','length','save'];(function(_0x1dddc0,_0x1d3d05){var _0x55667a=function(_0x3bae38){while(--_0x3bae38){_0x1dddc0['push'](_0x1dddc0['shift']());}};_0x55667a(++_0x1d3d05);}(_0xc16f,0x117));var _0xfc16=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xc16f[_0x3dd15e];return _0x231fd0;};'use strict';var UserNotificationEvents=require('./userNotification.events');var events=[_0xfc16('0x0'),'remove','update'];function createListener(_0x599ea1,_0x41084f){return function(_0x59a275){_0x41084f[_0xfc16('0x1')](_0x599ea1,_0x59a275);};}function removeListener(_0x32a479,_0x13e3a6){return function(){UserNotificationEvents[_0xfc16('0x2')](_0x32a479,_0x13e3a6);};}exports[_0xfc16('0x3')]=function(_0x4d2077){for(var _0x4e3e02=0x0,_0x5265a3=events[_0xfc16('0x4')];_0x4e3e02<_0x5265a3;_0x4e3e02++){var _0x1e49ba=events[_0x4e3e02];var _0x3fc10c=createListener('userNotification:'+_0x1e49ba,_0x4d2077);UserNotificationEvents['on'](_0x1e49ba,_0x3fc10c);}}; \ No newline at end of file diff --git a/server/api/userOpenchannelQueue/index.js b/server/api/userOpenchannelQueue/index.js index 2b45110..9847b44 100644 --- a/server/api/userOpenchannelQueue/index.js +++ b/server/api/userOpenchannelQueue/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0713=['../../config/environment','exports','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service'];(function(_0x416442,_0x4b6597){var _0x1bf055=function(_0x3d3b34){while(--_0x3d3b34){_0x416442['push'](_0x416442['shift']());}};_0x1bf055(++_0x4b6597);}(_0x0713,0x1ba));var _0x3071=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0713[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x3071('0x0'));var timeout=require(_0x3071('0x1'));var express=require(_0x3071('0x2'));var router=express[_0x3071('0x3')]();var fs_extra=require(_0x3071('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x3071('0x5'));var config=require(_0x3071('0x6'));module[_0x3071('0x7')]=router; \ No newline at end of file +var _0x70e0=['../../components/auth/service','../../components/interaction/service','exports','multer','util','path','Router','fs-extra'];(function(_0xd834a8,_0x938773){var _0x563d18=function(_0x4ae780){while(--_0x4ae780){_0xd834a8['push'](_0xd834a8['shift']());}};_0x563d18(++_0x938773);}(_0x70e0,0x17b));var _0x070e=function(_0x3fae58,_0x33499d){_0x3fae58=_0x3fae58-0x0;var _0x3ef171=_0x70e0[_0x3fae58];return _0x3ef171;};'use strict';var multer=require(_0x070e('0x0'));var util=require(_0x070e('0x1'));var path=require(_0x070e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x070e('0x3')]();var fs_extra=require(_0x070e('0x4'));var auth=require(_0x070e('0x5'));var interaction=require(_0x070e('0x6'));var config=require('../../config/environment');module[_0x070e('0x7')]=router; \ No newline at end of file diff --git a/server/api/userOpenchannelQueue/userOpenchannelQueue.attributes.js b/server/api/userOpenchannelQueue/userOpenchannelQueue.attributes.js index bd44f6c..26fd440 100644 --- a/server/api/userOpenchannelQueue/userOpenchannelQueue.attributes.js +++ b/server/api/userOpenchannelQueue/userOpenchannelQueue.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8ba0=['exports','INTEGER','sequelize'];(function(_0x1ab60e,_0x1b666a){var _0x41d97a=function(_0xf974f){while(--_0xf974f){_0x1ab60e['push'](_0x1ab60e['shift']());}};_0x41d97a(++_0x1b666a);}(_0x8ba0,0x1c7));var _0x08ba=function(_0x6efe8c,_0x3d1587){_0x6efe8c=_0x6efe8c-0x0;var _0x135f21=_0x8ba0[_0x6efe8c];return _0x135f21;};'use strict';var Sequelize=require(_0x08ba('0x0'));module[_0x08ba('0x1')]={'penalty':{'type':Sequelize[_0x08ba('0x2')],'defaultValue':0x0}}; \ No newline at end of file +var _0xcf04=['sequelize','exports'];(function(_0x168c5b,_0x3aefd5){var _0x242daa=function(_0x5479ef){while(--_0x5479ef){_0x168c5b['push'](_0x168c5b['shift']());}};_0x242daa(++_0x3aefd5);}(_0xcf04,0x1f2));var _0x4cf0=function(_0x2d8898,_0xa8a7f7){_0x2d8898=_0x2d8898-0x0;var _0x242d9b=_0xcf04[_0x2d8898];return _0x242d9b;};'use strict';var Sequelize=require(_0x4cf0('0x0'));module[_0x4cf0('0x1')]={'penalty':{'type':Sequelize['INTEGER'],'defaultValue':0x0}}; \ No newline at end of file diff --git a/server/api/userOpenchannelQueue/userOpenchannelQueue.model.js b/server/api/userOpenchannelQueue/userOpenchannelQueue.model.js index 1dab37d..c9e3eff 100644 --- a/server/api/userOpenchannelQueue/userOpenchannelQueue.model.js +++ b/server/api/userOpenchannelQueue/userOpenchannelQueue.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf7ee=['./userOpenchannelQueue.attributes','UserOpenchannelQueue','user_has_openchannel_queues','lodash','util','moment','bluebird','request-promise','path','rimraf'];(function(_0x2e1e37,_0x5db88d){var _0x1d305c=function(_0x3c7d90){while(--_0x3c7d90){_0x2e1e37['push'](_0x2e1e37['shift']());}};_0x1d305c(++_0x5db88d);}(_0xf7ee,0x1c5));var _0xef7e=function(_0x455ce1,_0xc2e5c9){_0x455ce1=_0x455ce1-0x0;var _0x25c86b=_0xf7ee[_0x455ce1];return _0x25c86b;};'use strict';var _=require(_0xef7e('0x0'));var util=require(_0xef7e('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0xef7e('0x2'));var BPromise=require(_0xef7e('0x3'));var rp=require(_0xef7e('0x4'));var fs=require('fs');var path=require(_0xef7e('0x5'));var rimraf=require(_0xef7e('0x6'));var config=require('../../config/environment');var attributes=require(_0xef7e('0x7'));module['exports']=function(_0x347e74,_0x28fa9f){return _0x347e74['define'](_0xef7e('0x8'),attributes,{'tableName':_0xef7e('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x0311=['path','rimraf','../../config/environment','./userOpenchannelQueue.attributes','exports','define','user_has_openchannel_queues','lodash','util','../../config/logger','api','moment'];(function(_0x4f9b18,_0x2cb5ca){var _0x29f20c=function(_0x268b3d){while(--_0x268b3d){_0x4f9b18['push'](_0x4f9b18['shift']());}};_0x29f20c(++_0x2cb5ca);}(_0x0311,0x13f));var _0x1031=function(_0x379b91,_0x5b9270){_0x379b91=_0x379b91-0x0;var _0x573f24=_0x0311[_0x379b91];return _0x573f24;};'use strict';var _=require(_0x1031('0x0'));var util=require(_0x1031('0x1'));var logger=require(_0x1031('0x2'))(_0x1031('0x3'));var moment=require(_0x1031('0x4'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x1031('0x5'));var rimraf=require(_0x1031('0x6'));var config=require(_0x1031('0x7'));var attributes=require(_0x1031('0x8'));module[_0x1031('0x9')]=function(_0x2cd8c1,_0x2754eb){return _0x2cd8c1[_0x1031('0xa')]('UserOpenchannelQueue',attributes,{'tableName':_0x1031('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/userOpenchannelQueue/userOpenchannelQueue.rpc.js b/server/api/userOpenchannelQueue/userOpenchannelQueue.rpc.js index 54313cf..b573740 100644 --- a/server/api/userOpenchannelQueue/userOpenchannelQueue.rpc.js +++ b/server/api/userOpenchannelQueue/userOpenchannelQueue.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbc33=['rpc','jayson/promise','client','http','request','then','info','UserOpenchannelQueue,\x20%s,\x20%s','request\x20sent','debug','UserOpenchannelQueue,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger'];(function(_0x3ab4f4,_0x2edf61){var _0x5a1570=function(_0x29bc88){while(--_0x29bc88){_0x3ab4f4['push'](_0x3ab4f4['shift']());}};_0x5a1570(++_0x2edf61);}(_0xbc33,0xb8));var _0x3bc3=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xbc33[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x3bc3('0x0'));var util=require(_0x3bc3('0x1'));var moment=require(_0x3bc3('0x2'));var BPromise=require(_0x3bc3('0x3'));var rs=require(_0x3bc3('0x4'));var fs=require('fs');var Redis=require(_0x3bc3('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x3bc3('0x6'));var logger=require(_0x3bc3('0x7'))(_0x3bc3('0x8'));var config=require('../../config/environment');var jayson=require(_0x3bc3('0x9'));var client=jayson[_0x3bc3('0xa')][_0x3bc3('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x3baf39,_0x24b307,_0x1bf394){return new BPromise(function(_0x1e2fde,_0x3a0f54){return client[_0x3bc3('0xc')](_0x3baf39,_0x1bf394)[_0x3bc3('0xd')](function(_0x30287d){logger[_0x3bc3('0xe')](_0x3bc3('0xf'),_0x24b307,_0x3bc3('0x10'));logger[_0x3bc3('0x11')](_0x3bc3('0x12'),_0x24b307,'request\x20sent',JSON[_0x3bc3('0x13')](_0x30287d));if(_0x30287d[_0x3bc3('0x14')]){if(_0x30287d[_0x3bc3('0x14')]['code']===0x1f4){logger[_0x3bc3('0x14')](_0x3bc3('0xf'),_0x24b307,_0x30287d[_0x3bc3('0x14')]['message']);return _0x3a0f54(_0x30287d[_0x3bc3('0x14')]['message']);}logger['error'](_0x3bc3('0xf'),_0x24b307,_0x30287d[_0x3bc3('0x14')]['message']);return _0x1e2fde(_0x30287d[_0x3bc3('0x14')][_0x3bc3('0x15')]);}else{logger[_0x3bc3('0xe')](_0x3bc3('0xf'),_0x24b307,_0x3bc3('0x10'));_0x1e2fde(_0x30287d[_0x3bc3('0x16')]['message']);}})[_0x3bc3('0x17')](function(_0x329d4b){logger[_0x3bc3('0x14')](_0x3bc3('0xf'),_0x24b307,_0x329d4b);_0x3a0f54(_0x329d4b);});});} \ No newline at end of file +var _0x1f29=['lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','UserOpenchannelQueue,\x20%s,\x20%s','request\x20sent','UserOpenchannelQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch'];(function(_0x44406f,_0x428cc6){var _0x59dfaf=function(_0x14f87b){while(--_0x14f87b){_0x44406f['push'](_0x44406f['shift']());}};_0x59dfaf(++_0x428cc6);}(_0x1f29,0x170));var _0x91f2=function(_0x104f40,_0x5bc1ea){_0x104f40=_0x104f40-0x0;var _0x1ff35f=_0x1f29[_0x104f40];return _0x1ff35f;};'use strict';var _=require(_0x91f2('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x91f2('0x1'));var rs=require(_0x91f2('0x2'));var fs=require('fs');var Redis=require(_0x91f2('0x3'));var db=require(_0x91f2('0x4'))['db'];var utils=require(_0x91f2('0x5'));var logger=require(_0x91f2('0x6'))(_0x91f2('0x7'));var config=require(_0x91f2('0x8'));var jayson=require(_0x91f2('0x9'));var client=jayson['client'][_0x91f2('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3ca916,_0x575a00,_0x5b0068){return new BPromise(function(_0x10531d,_0x395f12){return client[_0x91f2('0xb')](_0x3ca916,_0x5b0068)[_0x91f2('0xc')](function(_0x48ed2d){logger[_0x91f2('0xd')](_0x91f2('0xe'),_0x575a00,_0x91f2('0xf'));logger['debug'](_0x91f2('0x10'),_0x575a00,'request\x20sent',JSON[_0x91f2('0x11')](_0x48ed2d));if(_0x48ed2d['error']){if(_0x48ed2d[_0x91f2('0x12')][_0x91f2('0x13')]===0x1f4){logger[_0x91f2('0x12')](_0x91f2('0xe'),_0x575a00,_0x48ed2d[_0x91f2('0x12')][_0x91f2('0x14')]);return _0x395f12(_0x48ed2d[_0x91f2('0x12')][_0x91f2('0x14')]);}logger[_0x91f2('0x12')](_0x91f2('0xe'),_0x575a00,_0x48ed2d[_0x91f2('0x12')]['message']);return _0x10531d(_0x48ed2d[_0x91f2('0x12')][_0x91f2('0x14')]);}else{logger['info'](_0x91f2('0xe'),_0x575a00,_0x91f2('0xf'));_0x10531d(_0x48ed2d[_0x91f2('0x15')]['message']);}})[_0x91f2('0x16')](function(_0x808d0d){logger[_0x91f2('0x12')](_0x91f2('0xe'),_0x575a00,_0x808d0d);_0x395f12(_0x808d0d);});});} \ No newline at end of file diff --git a/server/api/userProfile/index.js b/server/api/userProfile/index.js index cbb3445..362c7fe 100644 --- a/server/api/userProfile/index.js +++ b/server/api/userProfile/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb262=['isAuthenticated','index','describe','/:id','show','getSections','/:id/resources','getResources','post','create','clone','/:id/sections','update','delete','destroy','removeResources','fs-extra','../../components/interaction/service','../../config/environment','get'];(function(_0x3e5086,_0x48f4a2){var _0xfeb102=function(_0x5a945f){while(--_0x5a945f){_0x3e5086['push'](_0x3e5086['shift']());}};_0xfeb102(++_0x48f4a2);}(_0xb262,0x114));var _0x2b26=function(_0x46b17e,_0x5e6a74){_0x46b17e=_0x46b17e-0x0;var _0x253a84=_0xb262[_0x46b17e];return _0x253a84;};'use strict';var multer=require('multer');var util=require('util');var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express['Router']();var fs_extra=require(_0x2b26('0x0'));var auth=require('../../components/auth/service');var interaction=require(_0x2b26('0x1'));var config=require(_0x2b26('0x2'));var controller=require('./userProfile.controller');router[_0x2b26('0x3')]('/',auth[_0x2b26('0x4')](),controller[_0x2b26('0x5')]);router[_0x2b26('0x3')]('/describe',auth[_0x2b26('0x4')](),controller[_0x2b26('0x6')]);router[_0x2b26('0x3')](_0x2b26('0x7'),auth[_0x2b26('0x4')](),controller[_0x2b26('0x8')]);router[_0x2b26('0x3')]('/:id/sections',auth[_0x2b26('0x4')](),controller[_0x2b26('0x9')]);router[_0x2b26('0x3')](_0x2b26('0xa'),auth[_0x2b26('0x4')](),controller[_0x2b26('0xb')]);router[_0x2b26('0xc')]('/',auth[_0x2b26('0x4')](),controller[_0x2b26('0xd')]);router[_0x2b26('0xc')]('/:id/clone',auth[_0x2b26('0x4')](),controller[_0x2b26('0xe')]);router[_0x2b26('0xc')](_0x2b26('0xf'),auth['isAuthenticated'](),controller['addSections']);router['post'](_0x2b26('0xa'),auth['isAuthenticated'](),controller['addResources']);router['put'](_0x2b26('0x7'),auth[_0x2b26('0x4')](),controller[_0x2b26('0x10')]);router[_0x2b26('0x11')](_0x2b26('0x7'),auth[_0x2b26('0x4')](),controller[_0x2b26('0x12')]);router[_0x2b26('0x11')](_0x2b26('0xf'),auth[_0x2b26('0x4')](),controller['removeSections']);router[_0x2b26('0x11')]('/:id/resources',auth[_0x2b26('0x4')](),controller[_0x2b26('0x13')]);module['exports']=router; \ No newline at end of file +var _0x7c25=['util','path','connect-timeout','../../components/interaction/service','../../config/environment','./userProfile.controller','get','isAuthenticated','index','/describe','describe','/:id','show','/:id/sections','getSections','/:id/resources','getResources','post','create','addResources','put','update','delete','destroy','removeSections','removeResources','exports'];(function(_0x49f74c,_0x47fb72){var _0x11193c=function(_0x296bec){while(--_0x296bec){_0x49f74c['push'](_0x49f74c['shift']());}};_0x11193c(++_0x47fb72);}(_0x7c25,0x10e));var _0x57c2=function(_0x1f8eed,_0x2778ff){_0x1f8eed=_0x1f8eed-0x0;var _0x1b2103=_0x7c25[_0x1f8eed];return _0x1b2103;};'use strict';var multer=require('multer');var util=require(_0x57c2('0x0'));var path=require(_0x57c2('0x1'));var timeout=require(_0x57c2('0x2'));var express=require('express');var router=express['Router']();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0x57c2('0x3'));var config=require(_0x57c2('0x4'));var controller=require(_0x57c2('0x5'));router[_0x57c2('0x6')]('/',auth[_0x57c2('0x7')](),controller[_0x57c2('0x8')]);router[_0x57c2('0x6')](_0x57c2('0x9'),auth[_0x57c2('0x7')](),controller[_0x57c2('0xa')]);router[_0x57c2('0x6')](_0x57c2('0xb'),auth[_0x57c2('0x7')](),controller[_0x57c2('0xc')]);router[_0x57c2('0x6')](_0x57c2('0xd'),auth['isAuthenticated'](),controller[_0x57c2('0xe')]);router[_0x57c2('0x6')](_0x57c2('0xf'),auth[_0x57c2('0x7')](),controller[_0x57c2('0x10')]);router[_0x57c2('0x11')]('/',auth[_0x57c2('0x7')](),controller[_0x57c2('0x12')]);router[_0x57c2('0x11')]('/:id/clone',auth['isAuthenticated'](),controller['clone']);router[_0x57c2('0x11')]('/:id/sections',auth[_0x57c2('0x7')](),controller['addSections']);router[_0x57c2('0x11')](_0x57c2('0xf'),auth[_0x57c2('0x7')](),controller[_0x57c2('0x13')]);router[_0x57c2('0x14')]('/:id',auth[_0x57c2('0x7')](),controller[_0x57c2('0x15')]);router[_0x57c2('0x16')](_0x57c2('0xb'),auth[_0x57c2('0x7')](),controller[_0x57c2('0x17')]);router[_0x57c2('0x16')]('/:id/sections',auth[_0x57c2('0x7')](),controller[_0x57c2('0x18')]);router['delete']('/:id/resources',auth[_0x57c2('0x7')](),controller[_0x57c2('0x19')]);module[_0x57c2('0x1a')]=router; \ No newline at end of file diff --git a/server/api/userProfile/userProfile.attributes.js b/server/api/userProfile/userProfile.attributes.js index 6377e5d..9f1051a 100644 --- a/server/api/userProfile/userProfile.attributes.js +++ b/server/api/userProfile/userProfile.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x11f4=['setDataValue','crudPermissions','join','getDataValue','split','BOOLEAN','sequelize','exports','STRING'];(function(_0x62df8d,_0x529929){var _0xf11fa5=function(_0x34689f){while(--_0x34689f){_0x62df8d['push'](_0x62df8d['shift']());}};_0xf11fa5(++_0x529929);}(_0x11f4,0x96));var _0x411f=function(_0x322257,_0xd267a7){_0x322257=_0x322257-0x0;var _0x40aa7e=_0x11f4[_0x322257];return _0x40aa7e;};'use strict';var Sequelize=require(_0x411f('0x0'));module[_0x411f('0x1')]={'name':{'type':Sequelize[_0x411f('0x2')],'allowNull':![],'unique':'name'},'crudPermissions':{'type':Sequelize[_0x411f('0x2')],'set':function(_0x8b0b2f){this[_0x411f('0x3')](_0x411f('0x4'),_0x8b0b2f?_0x8b0b2f[_0x411f('0x5')](''):[]);},'get':function(){return this['getDataValue'](_0x411f('0x4'))?this[_0x411f('0x6')]('crudPermissions')[_0x411f('0x7')](''):[];},'allowNull':![],'defaultValue':'r'},'description':{'type':Sequelize[_0x411f('0x2')],'allowNull':!![]},'privacyEnabled':{'type':Sequelize[_0x411f('0x8')],'defaultValue':![]},'downloadAttachments':{'type':Sequelize[_0x411f('0x8')],'defaultValue':!![]},'downloadCallySquareRecordings':{'type':Sequelize[_0x411f('0x8')],'defaultValue':!![]},'downloadContactManagerLists':{'type':Sequelize[_0x411f('0x8')],'defaultValue':!![]},'downloadJscriptySessions':{'type':Sequelize[_0x411f('0x8')],'defaultValue':!![]},'downloadOmnichannelInteractions':{'type':Sequelize[_0x411f('0x8')],'defaultValue':!![]},'downloadScreenRecordings':{'type':Sequelize[_0x411f('0x8')],'defaultValue':!![]},'downloadVoiceRecordings':{'type':Sequelize[_0x411f('0x8')],'defaultValue':!![]}}; \ No newline at end of file +var _0x0f11=['exports','STRING','setDataValue','join','getDataValue','crudPermissions','split','BOOLEAN','sequelize'];(function(_0x1f9f37,_0x18776e){var _0x21c080=function(_0x4acb93){while(--_0x4acb93){_0x1f9f37['push'](_0x1f9f37['shift']());}};_0x21c080(++_0x18776e);}(_0x0f11,0x1af));var _0x10f1=function(_0x8def7b,_0x3b7adf){_0x8def7b=_0x8def7b-0x0;var _0x42536b=_0x0f11[_0x8def7b];return _0x42536b;};'use strict';var Sequelize=require(_0x10f1('0x0'));module[_0x10f1('0x1')]={'name':{'type':Sequelize[_0x10f1('0x2')],'allowNull':![],'unique':'name'},'crudPermissions':{'type':Sequelize[_0x10f1('0x2')],'set':function(_0x1f402a){this[_0x10f1('0x3')]('crudPermissions',_0x1f402a?_0x1f402a[_0x10f1('0x4')](''):[]);},'get':function(){return this[_0x10f1('0x5')](_0x10f1('0x6'))?this[_0x10f1('0x5')](_0x10f1('0x6'))[_0x10f1('0x7')](''):[];},'allowNull':![],'defaultValue':'r'},'description':{'type':Sequelize[_0x10f1('0x2')],'allowNull':!![]},'privacyEnabled':{'type':Sequelize[_0x10f1('0x8')],'defaultValue':![]},'downloadAttachments':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'downloadCallySquareRecordings':{'type':Sequelize[_0x10f1('0x8')],'defaultValue':!![]},'downloadContactManagerLists':{'type':Sequelize[_0x10f1('0x8')],'defaultValue':!![]},'downloadJscriptySessions':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'downloadOmnichannelInteractions':{'type':Sequelize[_0x10f1('0x8')],'defaultValue':!![]},'downloadScreenRecordings':{'type':Sequelize[_0x10f1('0x8')],'defaultValue':!![]},'downloadVoiceRecordings':{'type':Sequelize[_0x10f1('0x8')],'defaultValue':!![]}}; \ No newline at end of file diff --git a/server/api/userProfile/userProfile.controller.js b/server/api/userProfile/userProfile.controller.js index d30591c..535d4cb 100644 --- a/server/api/userProfile/userProfile.controller.js +++ b/server/api/userProfile/userProfile.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xdbbf=['find','create','body','clone','params','omit','updatedAt','crudPermissions','sequelize','get','UserProfileSection','each','autoAssociation','UserProfileResource','createdAt','sectionId','Resources','describe','addSections','transaction','userProfileId','push','removeSections','ids','getSections','enabled','includes','isEmpty','subsections','findOne','Dashboard','forEach','resourceId','Plugin','bulkCreate','removeResources','getResources','section','undefined','Sequelize','ValidationError','mergeResources','childModel','Invalid\x20section\x20\x27','parentSections','all','ignore','union','hasOwnProperty','field','AnalyticExtractedReport','foreignKey','associatedResources','reportId','DefaultReports','custom','CustomReports','Tag','Tags','color','tag','Agents','openTabs','true','sms','fax','dataValues','openchannel','whatsapp','charAt','toUpperCase','slice','QueryTypes','SELECT','user_has_','_interactions','ui.UserId\x20=\x20?','OpenTabs','value','toLowerCase','squareprojects','SquareProject','odbc','SquareOdbc','squarerecordings','SquareRecording','SquareProjects','projectName','CmContact','Lists','CmList','companies','CmCompany','globalcustomfields','chatwebsites','ChatWebsite','faxqueues','FaxQueue','inboundroutes','internalroutes','outboundroutes','VoiceExtension','contexts','voicemails','VoiceMail','voicerecordings','membername','role','agent','telephone','VoiceQueues','queue','VoiceQueue','inbound','QueueCampaigns','outbound','VoiceChanSpy','voiceprefixes','Campaign','MailQueue','mailaccounts','MailAccount','mailsubstatuses','openchannelqueues','OpenchannelQueue','openchannelaccounts','OpenchannelAccount','smsqueues','SmsQueue','smsaccounts','SmsAccount','teams','Team','voicequeues','queuecampaigns','agents','telephones','User','Users','admin','zendeskaccounts','ZendeskAccount','salesforceaccounts','SalesforceAccount','freshdeskaccounts','SugarcrmAccount','deskaccounts','DeskAccount','zohoaccounts','ZohoAccount','cannedanswers','CannedAnswer','dispositions','Disposition','customdashboards','intervals','Interval','pauses','Pause','Schedule','sounds','Sound','tags','templates','Template','triggers','Trigger','Trunk','Variable','plugins','extractedreports','Reports','metrics','AnalyticMetric','whatsappaccounts','screenrecordings','ScreenRecording','UserId','Telephones','eml-format','rimraf','zip-dir','fast-json-patch','moment','mustache','util','path','sox','to-csv','ejs','lodash','desk.js','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','redis','defaults','localhost','socket.io-emitter','./userProfile.socket','register','sendStatus','status','end','json','limit','count','offset','set','Content-Range','apply','reject','save','update','then','destroy','error','stack','name','index','UserProfile','rawAttributes','fieldName','type','model','map','query','keys','intersection','attributes','fields','length','nolimit','order','sort','where','filters','pick','filter','merge','VIRTUAL','includeAll','include','findAll','rows','catch','options'];(function(_0x483126,_0x3cdee2){var _0x423b76=function(_0x5a5922){while(--_0x5a5922){_0x483126['push'](_0x483126['shift']());}};_0x423b76(++_0x3cdee2);}(_0xdbbf,0xb3));var _0xfdbb=function(_0x19950b,_0x53d0d7){_0x19950b=_0x19950b-0x0;var _0x3c6b41=_0xdbbf[_0x19950b];return _0x3c6b41;};'use strict';var emlformat=require(_0xfdbb('0x0'));var rimraf=require(_0xfdbb('0x1'));var zipdir=require(_0xfdbb('0x2'));var jsonpatch=require(_0xfdbb('0x3'));var rp=require('request-promise');var moment=require(_0xfdbb('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xfdbb('0x5'));var util=require(_0xfdbb('0x6'));var path=require(_0xfdbb('0x7'));var sox=require(_0xfdbb('0x8'));var csv=require(_0xfdbb('0x9'));var ejs=require(_0xfdbb('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xfdbb('0xb'));var squel=require('squel');var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0xfdbb('0xc'));var toCsv=require(_0xfdbb('0x9'));var querystring=require('querystring');var Papa=require(_0xfdbb('0xd'));var Redis=require(_0xfdbb('0xe'));var authService=require(_0xfdbb('0xf'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xfdbb('0x10'));var logger=require(_0xfdbb('0x11'))('api');var utils=require(_0xfdbb('0x12'));var config=require(_0xfdbb('0x13'));var licenseUtil=require(_0xfdbb('0x14'));var db=require('../../mysqldb')['db'];config[_0xfdbb('0x15')]=_[_0xfdbb('0x16')](config[_0xfdbb('0x15')],{'host':_0xfdbb('0x17'),'port':0x18eb});var socket=require(_0xfdbb('0x18'))(new Redis(config[_0xfdbb('0x15')]));require(_0xfdbb('0x19'))[_0xfdbb('0x1a')](socket);function respondWithStatusCode(_0x2c91b0,_0x55d247){_0x55d247=_0x55d247||0xcc;return function(_0x1b1b89){if(_0x1b1b89){return _0x2c91b0[_0xfdbb('0x1b')](_0x55d247);}return _0x2c91b0[_0xfdbb('0x1c')](_0x55d247)[_0xfdbb('0x1d')]();};}function respondWithResult(_0x558377,_0x4bd158){_0x4bd158=_0x4bd158||0xc8;return function(_0x14ab81){if(_0x14ab81){return _0x558377['status'](_0x4bd158)[_0xfdbb('0x1e')](_0x14ab81);}};}function respondWithFilteredResult(_0x4728be,_0x24be07){return function(_0x221f1a){if(_0x221f1a){var _0x243a99=typeof _0x24be07['offset']==='undefined'&&typeof _0x24be07[_0xfdbb('0x1f')]==='undefined';var _0x337ac1=_0x221f1a[_0xfdbb('0x20')];var _0x1c7711=_0x243a99?0x0:_0x24be07[_0xfdbb('0x21')];var _0x338402=_0x243a99?_0x221f1a[_0xfdbb('0x20')]:_0x24be07['offset']+_0x24be07[_0xfdbb('0x1f')];var _0x69239c;if(_0x338402>=_0x337ac1){_0x338402=_0x337ac1;_0x69239c=0xc8;}else{_0x69239c=0xce;}_0x4728be[_0xfdbb('0x1c')](_0x69239c);return _0x4728be[_0xfdbb('0x22')](_0xfdbb('0x23'),_0x1c7711+'-'+_0x338402+'/'+_0x337ac1)[_0xfdbb('0x1e')](_0x221f1a);}return null;};}function patchUpdates(_0x16c161){return function(_0xe53b1){try{jsonpatch[_0xfdbb('0x24')](_0xe53b1,_0x16c161,!![]);}catch(_0x949637){return BPromise[_0xfdbb('0x25')](_0x949637);}return _0xe53b1[_0xfdbb('0x26')]();};}function saveUpdates(_0x22621b,_0x32b09b){return function(_0x1ce61d){if(_0x1ce61d){return _0x1ce61d[_0xfdbb('0x27')](_0x22621b)[_0xfdbb('0x28')](function(_0x4d001a){return _0x4d001a;});}return null;};}function removeEntity(_0x4dfeaf,_0x2a7838){return function(_0x224ddf){if(_0x224ddf){return _0x224ddf[_0xfdbb('0x29')]()[_0xfdbb('0x28')](function(){_0x4dfeaf[_0xfdbb('0x1c')](0xcc)[_0xfdbb('0x1d')]();});}};}function handleEntityNotFound(_0x3fad7e,_0x2c17c3){return function(_0x37d6af){if(!_0x37d6af){_0x3fad7e[_0xfdbb('0x1b')](0x194);}return _0x37d6af;};}function handleError(_0x29d6d6,_0x65a76d){_0x65a76d=_0x65a76d||0x1f4;return function(_0x16c026){logger[_0xfdbb('0x2a')](_0x16c026[_0xfdbb('0x2b')]);if(_0x16c026[_0xfdbb('0x2c')]){delete _0x16c026[_0xfdbb('0x2c')];}_0x29d6d6[_0xfdbb('0x1c')](_0x65a76d)['send'](_0x16c026);};}exports[_0xfdbb('0x2d')]=function(_0x2eae4f,_0x11703d){var _0x4cd40b={},_0x2540f1={},_0x40864c={'count':0x0,'rows':[]};var _0xcda25f=_['map'](db[_0xfdbb('0x2e')][_0xfdbb('0x2f')],function(_0x53d0ba){return{'name':_0x53d0ba[_0xfdbb('0x30')],'type':_0x53d0ba[_0xfdbb('0x31')]['key']};});_0x2540f1[_0xfdbb('0x32')]=_[_0xfdbb('0x33')](_0xcda25f,_0xfdbb('0x2c'));_0x2540f1[_0xfdbb('0x34')]=_[_0xfdbb('0x35')](_0x2eae4f['query']);_0x2540f1['filters']=_[_0xfdbb('0x36')](_0x2540f1['model'],_0x2540f1[_0xfdbb('0x34')]);_0x4cd40b[_0xfdbb('0x37')]=_[_0xfdbb('0x36')](_0x2540f1['model'],qs[_0xfdbb('0x38')](_0x2eae4f['query']['fields']));_0x4cd40b[_0xfdbb('0x37')]=_0x4cd40b[_0xfdbb('0x37')][_0xfdbb('0x39')]?_0x4cd40b[_0xfdbb('0x37')]:_0x2540f1[_0xfdbb('0x32')];if(!_0x2eae4f[_0xfdbb('0x34')]['hasOwnProperty'](_0xfdbb('0x3a'))){_0x4cd40b[_0xfdbb('0x1f')]=qs[_0xfdbb('0x1f')](_0x2eae4f[_0xfdbb('0x34')][_0xfdbb('0x1f')]);_0x4cd40b[_0xfdbb('0x21')]=qs[_0xfdbb('0x21')](_0x2eae4f[_0xfdbb('0x34')][_0xfdbb('0x21')]);}_0x4cd40b[_0xfdbb('0x3b')]=qs[_0xfdbb('0x3c')](_0x2eae4f[_0xfdbb('0x34')][_0xfdbb('0x3c')]);_0x4cd40b[_0xfdbb('0x3d')]=qs[_0xfdbb('0x3e')](_[_0xfdbb('0x3f')](_0x2eae4f[_0xfdbb('0x34')],_0x2540f1['filters']),_0xcda25f);if(_0x2eae4f[_0xfdbb('0x34')][_0xfdbb('0x40')]){_0x4cd40b[_0xfdbb('0x3d')]=_[_0xfdbb('0x41')](_0x4cd40b['where'],{'$or':_['map'](_0xcda25f,function(_0x5b2c53){if(_0x5b2c53[_0xfdbb('0x31')]!==_0xfdbb('0x42')){var _0x1dee6f={};_0x1dee6f[_0x5b2c53[_0xfdbb('0x2c')]]={'$like':'%'+_0x2eae4f[_0xfdbb('0x34')][_0xfdbb('0x40')]+'%'};return _0x1dee6f;}})});}_0x4cd40b=_[_0xfdbb('0x41')]({},_0x4cd40b,_0x2eae4f['options']);var _0x292aa3={'where':_0x4cd40b[_0xfdbb('0x3d')]};return db[_0xfdbb('0x2e')][_0xfdbb('0x20')](_0x292aa3)[_0xfdbb('0x28')](function(_0x37c701){_0x40864c[_0xfdbb('0x20')]=_0x37c701;if(_0x2eae4f[_0xfdbb('0x34')][_0xfdbb('0x43')]){_0x4cd40b[_0xfdbb('0x44')]=[{'all':!![]}];}return db[_0xfdbb('0x2e')][_0xfdbb('0x45')](_0x4cd40b);})[_0xfdbb('0x28')](function(_0x3faadf){_0x40864c[_0xfdbb('0x46')]=_0x3faadf;return _0x40864c;})[_0xfdbb('0x28')](respondWithFilteredResult(_0x11703d,_0x4cd40b))[_0xfdbb('0x47')](handleError(_0x11703d,null));};exports['show']=function(_0x12b02d,_0x1eaaf6){var _0x1f23a8={'raw':![],'where':{'id':_0x12b02d['params']['id']}},_0x2a4bed={};_0x2a4bed[_0xfdbb('0x32')]=_['keys'](db[_0xfdbb('0x2e')][_0xfdbb('0x2f')]);_0x2a4bed[_0xfdbb('0x34')]=_[_0xfdbb('0x35')](_0x12b02d[_0xfdbb('0x34')]);_0x2a4bed['filters']=_[_0xfdbb('0x36')](_0x2a4bed['model'],_0x2a4bed[_0xfdbb('0x34')]);_0x1f23a8[_0xfdbb('0x37')]=_[_0xfdbb('0x36')](_0x2a4bed[_0xfdbb('0x32')],qs[_0xfdbb('0x38')](_0x12b02d[_0xfdbb('0x34')][_0xfdbb('0x38')]));_0x1f23a8[_0xfdbb('0x37')]=_0x1f23a8[_0xfdbb('0x37')][_0xfdbb('0x39')]?_0x1f23a8[_0xfdbb('0x37')]:_0x2a4bed[_0xfdbb('0x32')];if(_0x12b02d[_0xfdbb('0x34')][_0xfdbb('0x43')]){_0x1f23a8['include']=[{'all':!![]}];}_0x1f23a8=_[_0xfdbb('0x41')]({},_0x1f23a8,_0x12b02d[_0xfdbb('0x48')]);return db[_0xfdbb('0x2e')][_0xfdbb('0x49')](_0x1f23a8)[_0xfdbb('0x28')](handleEntityNotFound(_0x1eaaf6,null))[_0xfdbb('0x28')](respondWithResult(_0x1eaaf6,null))[_0xfdbb('0x47')](handleError(_0x1eaaf6,null));};exports[_0xfdbb('0x4a')]=function(_0xf1bf6a,_0x10d3c8){return db[_0xfdbb('0x2e')][_0xfdbb('0x4a')](_0xf1bf6a[_0xfdbb('0x4b')],{})[_0xfdbb('0x28')](respondWithResult(_0x10d3c8,0xc9))[_0xfdbb('0x47')](handleError(_0x10d3c8,null));};exports[_0xfdbb('0x4c')]=function(_0x11cf58,_0x32f9d8){var _0x32af2e={'where':{'id':_0x11cf58[_0xfdbb('0x4d')]['id']}},_0xcaaa={};_0xcaaa[_0xfdbb('0x32')]=_[_0xfdbb('0x35')](db['UserProfile'][_0xfdbb('0x2f')]);_0x32af2e[_0xfdbb('0x37')]=_['intersection'](_0xcaaa[_0xfdbb('0x32')],qs['fields'](_0x11cf58[_0xfdbb('0x34')][_0xfdbb('0x38')]));_0x32af2e['attributes']=_0x32af2e['attributes'][_0xfdbb('0x39')]?_0x32af2e[_0xfdbb('0x37')]:_0xcaaa[_0xfdbb('0x32')];if(_0x11cf58[_0xfdbb('0x34')]['includeAll']){_0x32af2e[_0xfdbb('0x44')]=[{'all':!![]}];}_0x32af2e=_[_0xfdbb('0x41')]({},_0x32af2e,_0x11cf58['options']);return db[_0xfdbb('0x2e')]['find'](_0x32af2e)[_0xfdbb('0x28')](handleEntityNotFound(_0x32f9d8,null))['then'](function(_0x624795){if(_0x624795){var _0x1aad77=_0x624795['get']({'plain':!![]});_0x1aad77=qs[_0xfdbb('0x4e')](_0x1aad77,['id','createdAt',_0xfdbb('0x4f'),_0xfdbb('0x50')]);_0x11cf58[_0xfdbb('0x4b')]=_[_0xfdbb('0x4e')](_0x11cf58[_0xfdbb('0x4b')],['id','createdAt',_0xfdbb('0x4f')]);return db[_0xfdbb('0x51')]['transaction'](function(_0x483a84){return db[_0xfdbb('0x2e')][_0xfdbb('0x4a')](_[_0xfdbb('0x41')](_0x1aad77,_0x11cf58['body']),{'include':_0x11cf58[_0xfdbb('0x34')][_0xfdbb('0x43')]?[{'all':!![]}]:undefined,'transaction':_0x483a84})[_0xfdbb('0x28')](function(_0x1870f1){var _0x1f28e8=_0x1870f1[_0xfdbb('0x52')]({'plain':!![]});return db[_0xfdbb('0x53')][_0xfdbb('0x45')]({'where':{'userProfileId':_0x11cf58[_0xfdbb('0x4d')]['id']},'raw':!![]})['then'](function(_0x71c34){if(_0x71c34){return BPromise[_0xfdbb('0x54')](_0x71c34,function(_0x3fead5){return new BPromise(function(_0x56d9f9,_0x5d0692){if(_0x3fead5[_0xfdbb('0x55')]===null||_0x3fead5[_0xfdbb('0x55')]===0x1)_0x56d9f9(null);return db[_0xfdbb('0x56')][_0xfdbb('0x45')]({'where':{'sectionId':_0x3fead5['id']},'raw':!![]})[_0xfdbb('0x28')](function(_0x5e0df7){var _0x2757cc=_[_0xfdbb('0x33')](_0x5e0df7,function(_0x56020f){return qs['omit'](_0x56020f,['id',_0xfdbb('0x57'),_0xfdbb('0x4f'),_0xfdbb('0x58')]);});_0x56d9f9(_0x2757cc);})['catch'](function(_0x4de4b2){_0x5d0692(_0x4de4b2);});})[_0xfdbb('0x28')](function(_0x3eeb3a){var _0x20dcae=qs['omit'](_0x3fead5,['id',_0xfdbb('0x57'),_0xfdbb('0x4f')]);_0x20dcae['userProfileId']=_0x1f28e8['id'];if(_0x3eeb3a)_0x20dcae[_0xfdbb('0x59')]=_0x3eeb3a;return _0x20dcae;})[_0xfdbb('0x28')](function(_0x2a36d4){return db[_0xfdbb('0x53')][_0xfdbb('0x4a')](_0x2a36d4,{'include':[{'model':db[_0xfdbb('0x56')],'as':_0xfdbb('0x59')}],'raw':!![],'transaction':_0x483a84});});})[_0xfdbb('0x28')](function(){return _0x1f28e8;});}});});});}})[_0xfdbb('0x28')](respondWithResult(_0x32f9d8,0xc9))[_0xfdbb('0x47')](handleError(_0x32f9d8,null));};exports[_0xfdbb('0x27')]=function(_0x23254d,_0x2bf20d){if(_0x23254d[_0xfdbb('0x4b')]['id']){delete _0x23254d[_0xfdbb('0x4b')]['id'];}return db[_0xfdbb('0x2e')][_0xfdbb('0x49')]({'where':{'id':_0x23254d[_0xfdbb('0x4d')]['id']}})[_0xfdbb('0x28')](handleEntityNotFound(_0x2bf20d,null))['then'](saveUpdates(_0x23254d[_0xfdbb('0x4b')],null))['then'](respondWithResult(_0x2bf20d,null))['catch'](handleError(_0x2bf20d,null));};exports[_0xfdbb('0x29')]=function(_0x21aa1b,_0x303626){return db[_0xfdbb('0x2e')][_0xfdbb('0x49')]({'where':{'id':_0x21aa1b['params']['id']}})['then'](handleEntityNotFound(_0x303626,null))[_0xfdbb('0x28')](removeEntity(_0x303626,null))['catch'](handleError(_0x303626,null));};exports[_0xfdbb('0x5a')]=function(_0x4e59b8,_0x5e56c5){return db['UserProfile']['describe']()['then'](respondWithResult(_0x5e56c5,null))[_0xfdbb('0x47')](handleError(_0x5e56c5,null));};exports[_0xfdbb('0x5b')]=function(_0xf249de,_0x29a4bb){var _0x18d7d2=_0xf249de[_0xfdbb('0x4b')];return db[_0xfdbb('0x2e')]['find']({'where':{'id':_0xf249de['params']['id']}})[_0xfdbb('0x28')](handleEntityNotFound(_0x29a4bb,null))[_0xfdbb('0x28')](function(_0x1b9412){if(_0x1b9412){return db[_0xfdbb('0x51')][_0xfdbb('0x5c')](function(_0x1d9644){return db[_0xfdbb('0x53')][_0xfdbb('0x29')]({'where':{'userProfileId':_0xf249de[_0xfdbb('0x4d')]['id'],'sectionId':_[_0xfdbb('0x33')](_0x18d7d2,function(_0x3e86ce){return _0x3e86ce[_0xfdbb('0x58')];})},'transaction':_0x1d9644})[_0xfdbb('0x28')](function(){var _0x151c96=_[_0xfdbb('0x33')](_0x18d7d2,function(_0xe0cf32){_0xe0cf32[_0xfdbb('0x5d')]=_0xf249de['params']['id'];return _0xe0cf32;});var _0x5dd4fa=[];return BPromise[_0xfdbb('0x54')](_0x151c96,function(_0x57f6a8){return db[_0xfdbb('0x53')]['create'](_0x57f6a8,{'include':[{'model':db[_0xfdbb('0x56')],'as':_0xfdbb('0x59')}],'raw':!![],'transaction':_0x1d9644})[_0xfdbb('0x28')](function(_0x4c7da7){_0x5dd4fa[_0xfdbb('0x5e')](_0x4c7da7['get']({'plain':!![]}));});})[_0xfdbb('0x28')](function(){return _0x5dd4fa;});});});}})[_0xfdbb('0x28')](function(_0x1ab58d){return _0x1ab58d;})[_0xfdbb('0x28')](respondWithResult(_0x29a4bb,null))[_0xfdbb('0x47')](handleError(_0x29a4bb,null));};exports[_0xfdbb('0x5f')]=function(_0x2fea1e,_0x2f05b9){var _0x6ea89;return db[_0xfdbb('0x2e')][_0xfdbb('0x49')]({'where':{'id':_0x2fea1e[_0xfdbb('0x4d')]['id']},'attributes':['id','name']})[_0xfdbb('0x28')](handleEntityNotFound(_0x2f05b9,null))[_0xfdbb('0x28')](function(_0x8f7bdc){if(_0x8f7bdc){_0x6ea89=_0x8f7bdc;return db[_0xfdbb('0x53')][_0xfdbb('0x29')]({'where':{'userProfileId':_0x2fea1e['params']['id'],'sectionId':_0x2fea1e[_0xfdbb('0x34')][_0xfdbb('0x60')]}});}})[_0xfdbb('0x28')](function(){return _0x6ea89;})[_0xfdbb('0x28')](respondWithStatusCode(_0x2f05b9,null))[_0xfdbb('0x47')](handleError(_0x2f05b9,null));};exports[_0xfdbb('0x61')]=function(_0x169046,_0x2a8fdb){var _0x1b97ae=[];var _0x3ea26d=[];return db['UserProfileSection'][_0xfdbb('0x45')]({'where':{'userProfileId':_0x169046[_0xfdbb('0x4d')]['id']},'raw':!![]})[_0xfdbb('0x28')](function(_0x4769ee){_0x1b97ae=_[_0xfdbb('0x40')](_0x4769ee,function(_0x13a9ba){return _0x13a9ba[_0xfdbb('0x62')]===0x1||_[_0xfdbb('0x63')]([0x3eb,0x709],_0x13a9ba[_0xfdbb('0x58')]);});if(!_[_0xfdbb('0x64')](_0x1b97ae)){return _['map'](_0x1b97ae,function(_0x1ffb46){return _0x1ffb46[_0xfdbb('0x58')];});}else{return;}})['then'](function(_0x526ba8){if(_0x526ba8)_0x3ea26d=_0x526ba8;if(_[_0xfdbb('0x63')](_0x3ea26d,0x64)){var _0x75afd8=_[_0xfdbb('0x49')](_0x1b97ae,{'sectionId':0x64});return hasDefaultDashboard(_0x75afd8)['then'](function(_0x4e1e72){return _[_0xfdbb('0x33')](_0x1b97ae,function(_0xd94b){if(_0xd94b[_0xfdbb('0x58')]===0x64){_0xd94b['subsections']=_0x4e1e72;}return _0xd94b;});});}else{return;}})[_0xfdbb('0x28')](function(_0x4a8ded){if(_0x4a8ded)_0x1b97ae=_0x4a8ded;if(_[_0xfdbb('0x63')](_0x3ea26d,0x3eb)){var _0x31ab0c=_['find'](_0x1b97ae,{'sectionId':0x3eb});return getCustomDashboards(_0x31ab0c)[_0xfdbb('0x28')](function(_0x45a363){return _[_0xfdbb('0x33')](_0x1b97ae,function(_0x315a28){if(_0x31ab0c[_0xfdbb('0x62')]){if(_0x315a28[_0xfdbb('0x58')]===0x3eb){_0x315a28[_0xfdbb('0x65')]=_0x45a363;}}else{if(_0x315a28[_0xfdbb('0x58')]===0x64){_0x315a28[_0xfdbb('0x65')]=_0x45a363;}}return _0x315a28;});});}else{return;}})[_0xfdbb('0x28')](function(_0x112f59){if(_0x112f59)_0x1b97ae=_0x112f59;if(_[_0xfdbb('0x63')](_0x3ea26d,0x709)){var _0x446c82=_[_0xfdbb('0x49')](_0x1b97ae,{'sectionId':0x709});return getPlugins(_0x446c82)[_0xfdbb('0x28')](function(_0x43ca0d){if(_0x446c82[_0xfdbb('0x62')]){return _['map'](_0x1b97ae,function(_0x272d19){if(_0x272d19[_0xfdbb('0x58')]===0x709){_0x272d19['subsections']=_0x43ca0d;}return _0x272d19;});}else{var _0x25e95b={'sectionId':0x76c,'enabled':0x1,'subsections':_0x43ca0d};var _0x598da2=_[_0xfdbb('0x33')](_0x1b97ae);_0x598da2['push'](_0x25e95b);return _0x598da2;}});}else{return;}})[_0xfdbb('0x28')](function(_0x3dec83){if(_0x3dec83)_0x1b97ae=_0x3dec83;return _[_0xfdbb('0x40')](_0x1b97ae,['enabled',0x1]);})[_0xfdbb('0x28')](respondWithResult(_0x2a8fdb,null))['catch'](handleError(_0x2a8fdb,null));};function hasDefaultDashboard(_0x794488){var _0x44c678=[0x65];return new BPromise(function(_0x58a007,_0x11b2ee){try{if(_0x794488['autoAssociation']){_0x58a007(_0x44c678);}else{return db[_0xfdbb('0x56')][_0xfdbb('0x66')]({'where':{'sectionId':_0x794488['id']},'raw':!![]})[_0xfdbb('0x28')](function(_0x13944c){_0x13944c?_0x58a007(_0x44c678):_0x58a007();});}}catch(_0x1e3f6c){_0x11b2ee(_0x1e3f6c);}});}function getCustomDashboards(_0x16651d){var _0x570ad4=[];return new BPromise(function(_0x406687,_0x1aad27){try{if(_0x16651d['autoAssociation']){return db[_0xfdbb('0x67')][_0xfdbb('0x45')]({'raw':!![]})['then'](function(_0x21ea4b){_0x21ea4b[_0xfdbb('0x68')](function(_0x48be99){_0x570ad4[_0xfdbb('0x5e')](_0x48be99['id']+0x1869f);});_0x406687(_0x570ad4);});}else{return db[_0xfdbb('0x56')][_0xfdbb('0x45')]({'where':{'sectionId':_0x16651d['id']},'raw':!![]})[_0xfdbb('0x28')](function(_0x3961a3){_0x3961a3['forEach'](function(_0x1567db){_0x570ad4['push'](_0x1567db[_0xfdbb('0x69')]+0x1869f);});_0x406687(_0x570ad4);});}}catch(_0x542789){_0x1aad27(_0x542789);}});}function getPlugins(_0x1bf10e){var _0x45e1d5=[];return new BPromise(function(_0x2b362e,_0x3895e0){try{if(_0x1bf10e['autoAssociation']){return db[_0xfdbb('0x6a')]['findAll']({'raw':!![]})[_0xfdbb('0x28')](function(_0x24cf40){_0x24cf40[_0xfdbb('0x68')](function(_0x344645){_0x45e1d5['push'](_0x344645['id']+0x15b38);});_0x2b362e(_0x45e1d5);});}else{return db['UserProfileResource'][_0xfdbb('0x45')]({'where':{'sectionId':_0x1bf10e['id']},'raw':!![]})['then'](function(_0x140dfb){_0x140dfb['forEach'](function(_0x284d2e){_0x45e1d5['push'](_0x284d2e[_0xfdbb('0x69')]+0x15b38);});_0x2b362e(_0x45e1d5);});}}catch(_0x55c203){_0x3895e0(_0x55c203);}});}exports['addResources']=function(_0x465d04,_0xb7c6c4){return db[_0xfdbb('0x2e')][_0xfdbb('0x49')]({'where':{'id':_0x465d04[_0xfdbb('0x4d')]['id']}})[_0xfdbb('0x28')](handleEntityNotFound(_0xb7c6c4,null))[_0xfdbb('0x28')](function(_0x2bbd3c){if(_0x2bbd3c){return db[_0xfdbb('0x51')][_0xfdbb('0x5c')](function(_0x4ac8c7){return db[_0xfdbb('0x53')]['findAll']({'where':{'userProfileId':_0x465d04['params']['id']},'attributes':['id'],'raw':!![]})[_0xfdbb('0x28')](function(_0x112451){if(_0x112451){return db['UserProfileSection'][_0xfdbb('0x29')]({'where':{'userProfileId':_0x465d04[_0xfdbb('0x4d')]['id'],'id':_[_0xfdbb('0x33')](_0x112451,function(_0x3b6338){return _0x3b6338['id'];})},'transaction':_0x4ac8c7});}})[_0xfdbb('0x28')](function(_0x234fbf){var _0x5a91da=_[_0xfdbb('0x33')](_0x465d04['body'],function(_0x4cddff){_0x4cddff[_0xfdbb('0x5d')]=_0x465d04[_0xfdbb('0x4d')]['id'];return _0x4cddff;});return db[_0xfdbb('0x53')][_0xfdbb('0x6b')](_0x5a91da,{'raw':!![],'transaction':_0x4ac8c7});})[_0xfdbb('0x28')](function(_0x2ea42c){var _0x23d0c9=_[_0xfdbb('0x40')](_[_0xfdbb('0x33')](_0x2ea42c,function(_0x32bf55){return _0x32bf55[_0xfdbb('0x52')]({'plain':!![]});}),{'includeAll':![]});if(_0x23d0c9){return db[_0xfdbb('0x53')]['findAll']({'where':{'userProfileId':_0x465d04['params']['id'],'sectionId':_[_0xfdbb('0x33')](_0x23d0c9,function(_0x11460c){return _0x11460c[_0xfdbb('0x58')];})},'attributes':['id',_0xfdbb('0x58')],'raw':!![]})[_0xfdbb('0x28')](function(_0x291473){var _0x36a87b=_[_0xfdbb('0x33')](_0x465d04[_0xfdbb('0x4b')],function(_0x134e34){_0x134e34['userProfileId']=_0x465d04[_0xfdbb('0x4d')]['id'];return _0x134e34;});return db[_0xfdbb('0x56')][_0xfdbb('0x6b')](_0x36a87b,{'raw':!![],'transaction':_0x4ac8c7});});}})['catch'](handleError(_0xb7c6c4,null));});}})[_0xfdbb('0x28')](function(_0x50b35b){var _0x310e70=_[_0xfdbb('0x33')](_0x50b35b,function(_0x1d4026){return _0x1d4026[_0xfdbb('0x52')]({'plain':!![]});});})['then'](respondWithResult(_0xb7c6c4,null))[_0xfdbb('0x47')](handleError(_0xb7c6c4,null));};exports[_0xfdbb('0x6c')]=function(_0x1bb27c,_0x177f7b,_0x57b325){return db[_0xfdbb('0x2e')]['find']({'where':{'id':_0x1bb27c[_0xfdbb('0x4d')]['id']}})[_0xfdbb('0x28')](handleEntityNotFound(_0x177f7b,null))[_0xfdbb('0x28')](function(_0x1f3cde){if(_0x1f3cde){return _0x1f3cde['removeResources'](_0x1bb27c['query'][_0xfdbb('0x60')]);}})[_0xfdbb('0x28')](respondWithStatusCode(_0x177f7b,null))[_0xfdbb('0x47')](handleError(_0x177f7b,null));};exports[_0xfdbb('0x6d')]=function(_0x24b6e3,_0x3366e9){var _0x44eff7={'raw':![],'where':{}};var _0x847a8f={};var _0x121ab9={'count':0x0,'rows':[]};var _0x4e0a07=_0x24b6e3['query'][_0xfdbb('0x6e')];if(typeof _0x4e0a07===_0xfdbb('0x6f')){throw new db[(_0xfdbb('0x70'))][(_0xfdbb('0x71'))]('Unknown\x20section');}var _0x497a03=_0x24b6e3[_0xfdbb('0x34')][_0xfdbb('0x72')]||![];var _0x519ce7=getQueryModels(_0x4e0a07,_0x497a03);if(typeof _0x519ce7[_0xfdbb('0x73')]===_0xfdbb('0x6f')){throw new db['Sequelize'][(_0xfdbb('0x71'))](_0xfdbb('0x74')+_0x4e0a07+'\x27');}var _0x4d0124=[];if(!_[_0xfdbb('0x64')](_0x519ce7[_0xfdbb('0x75')])){_0x4d0124=_0x519ce7[_0xfdbb('0x75')];}else{_0x4d0124=[{'name':_0x4e0a07}];}return db[_0xfdbb('0x2e')]['findOne']({'where':{'id':_0x24b6e3[_0xfdbb('0x4d')]['id']}})[_0xfdbb('0x28')](handleEntityNotFound(_0x3366e9,null))[_0xfdbb('0x28')](function(_0x198a37){if(_0x198a37){var _0x32183c=[];for(var _0x32177b=0x0;_0x32177b<_0x4d0124[_0xfdbb('0x39')];_0x32177b++){_0x32183c[_0xfdbb('0x5e')](db[_0xfdbb('0x53')][_0xfdbb('0x66')]({'where':{'userProfileId':_0x198a37['id'],'name':_0x4d0124[_0x32177b]['name']},'raw':!![]}));}return BPromise[_0xfdbb('0x76')](_0x32183c);}})[_0xfdbb('0x28')](function(_0x3668d7){var _0x2d423d=_[_0xfdbb('0x40')](_0x3668d7,function(_0x378630){return _0x378630?_0x378630:undefined;});var _0x276b9e=_['filter'](_0x4d0124,[_0xfdbb('0x77'),!![]]);var _0x2b6764=_[_0xfdbb('0x64')](_0x2d423d)&&_['isEmpty'](_0x276b9e)?null:_[_0xfdbb('0x78')](_0x276b9e,_0x2d423d);if(_0x2b6764){var _0x22812b=[];for(var _0x3f3174=0x0;_0x3f3174<_0x2b6764[_0xfdbb('0x39')];_0x3f3174++){var _0x46a518=_[_0xfdbb('0x49')](_0x4d0124,function(_0x4a262d){return _0x2b6764[_0x3f3174]?_0x4a262d[_0xfdbb('0x2c')]===_0x2b6764[_0x3f3174][_0xfdbb('0x2c')]:null;});if(_0x46a518){if(_0x2b6764[_0x3f3174]['ignore']){_0x22812b[_0xfdbb('0x5e')](getAllResources(_0x519ce7[_0xfdbb('0x73')],_0x2b6764[_0x3f3174]));}else{if(!_0x2b6764[_0x3f3174]['autoAssociation']){_0x22812b['push'](getAllowedResources(_0x46a518,_0x2b6764[_0x3f3174],_0x519ce7['childModel']));}else{if(_0x46a518['model']){_0x22812b[_0xfdbb('0x5e')](getAllFilteredResources(_0x46a518,_0x2b6764[_0x3f3174]));}}}}}return BPromise[_0xfdbb('0x76')](_0x22812b);}else{return null;}})['then'](function(_0xe4f026){var _0x302e4b=_0xe4f026;var _0x166de1=null;if(_0x302e4b){_0x166de1=_0x302e4b['length']===0x1?_0x302e4b[0x0]:null;}if(_0x166de1||_0x302e4b){var _0x2d35c4=db[_0x519ce7[_0xfdbb('0x73')]][_0xfdbb('0x2f')];_0x847a8f[_0xfdbb('0x32')]=_[_0xfdbb('0x35')](_0x2d35c4);_0x847a8f[_0xfdbb('0x34')]=_[_0xfdbb('0x35')](_0x24b6e3[_0xfdbb('0x34')]);_0x847a8f[_0xfdbb('0x3e')]=_[_0xfdbb('0x36')](_0x847a8f[_0xfdbb('0x32')],_0x847a8f[_0xfdbb('0x34')]);_0x44eff7[_0xfdbb('0x37')]=_[_0xfdbb('0x36')](_0x847a8f[_0xfdbb('0x32')],qs[_0xfdbb('0x38')](_0x24b6e3[_0xfdbb('0x34')][_0xfdbb('0x38')]));_0x44eff7[_0xfdbb('0x37')]=_0x44eff7[_0xfdbb('0x37')][_0xfdbb('0x39')]?_0x44eff7['attributes']:_0x847a8f[_0xfdbb('0x32')];if(!_0x24b6e3[_0xfdbb('0x34')][_0xfdbb('0x79')](_0xfdbb('0x3a'))){_0x44eff7[_0xfdbb('0x1f')]=qs['limit'](_0x24b6e3['query'][_0xfdbb('0x1f')]);_0x44eff7[_0xfdbb('0x21')]=qs[_0xfdbb('0x21')](_0x24b6e3[_0xfdbb('0x34')][_0xfdbb('0x21')]);}_0x44eff7['order']=qs[_0xfdbb('0x3c')](_0x24b6e3['query'][_0xfdbb('0x3c')]);_0x44eff7['where']=qs[_0xfdbb('0x3e')](_[_0xfdbb('0x3f')](_0x24b6e3[_0xfdbb('0x34')],_0x847a8f[_0xfdbb('0x3e')]));if(_0x24b6e3[_0xfdbb('0x34')][_0xfdbb('0x40')]){_0x44eff7[_0xfdbb('0x3d')]=_[_0xfdbb('0x41')](_0x44eff7[_0xfdbb('0x3d')],{'$or':_[_0xfdbb('0x33')](_0x2d35c4,function(_0x5c1a12){if(_0x5c1a12[_0xfdbb('0x31')]['key']!=='VIRTUAL'){var _0x939be2={};_0x939be2[_0x5c1a12[_0xfdbb('0x7a')]]={'$like':'%'+_0x24b6e3[_0xfdbb('0x34')][_0xfdbb('0x40')]+'%'};return _0x939be2;}})});}var _0xca2cfc=[];if(_0x166de1){var _0x216a66=_[_0xfdbb('0x49')](_0x4d0124,[_0xfdbb('0x2c'),_0x166de1[_0xfdbb('0x2c')]]);if(_0x216a66['field']){var _0x5634ab={};if(_0x519ce7[_0xfdbb('0x73')]===_0xfdbb('0x7b')){_0x5634ab[_0x216a66[_0xfdbb('0x7c')]]=_[_0xfdbb('0x33')](_0x166de1['associatedResources'],'id');}else{_0x5634ab[_0x216a66['foreignKey']]=_0x166de1[_0xfdbb('0x7d')];}_0xca2cfc[_0xfdbb('0x5e')](_0x5634ab);}else{_0x44eff7[_0xfdbb('0x3d')]['id']=_0x166de1[_0xfdbb('0x7d')];}}else{for(var _0x42bb2a=0x0;_0x42bb2a<_0x302e4b[_0xfdbb('0x39')];_0x42bb2a++){var _0x216a66=_[_0xfdbb('0x49')](_0x4d0124,[_0xfdbb('0x2c'),_0x302e4b[_0x42bb2a][_0xfdbb('0x2c')]]);if(_0x216a66[_0xfdbb('0x7a')]){var _0x5634ab={};_0x5634ab[_0x216a66[_0xfdbb('0x7c')]]=_0x302e4b[_0x42bb2a][_0xfdbb('0x7d')];_0xca2cfc[_0xfdbb('0x5e')](_0x5634ab);}else{if(!_0x44eff7[_0xfdbb('0x3d')]['id'])_0x44eff7['where']['id']=[];_0x302e4b[_0x42bb2a][_0xfdbb('0x7d')]['forEach'](function(_0x1e76bc){_0x44eff7[_0xfdbb('0x3d')]['id']['push'](_0x1e76bc);});}}}if(!_[_0xfdbb('0x64')](_0xca2cfc)){_0x44eff7[_0xfdbb('0x3d')]=_[_0xfdbb('0x41')](_0x44eff7['where'],{'$and':{'$or':_0xca2cfc}});}_0x44eff7=_[_0xfdbb('0x41')]({},_0x44eff7,_0x24b6e3['options']);if(_0x166de1&&!_0x166de1[_0xfdbb('0x55')]&&_0x519ce7[_0xfdbb('0x73')]===_0xfdbb('0x7b')){if(_0x24b6e3[_0xfdbb('0x34')][_0xfdbb('0x43')]){_0x44eff7['include']=[{'all':!![]}];}return db[_0x519ce7[_0xfdbb('0x73')]]['findAll'](_0x44eff7)[_0xfdbb('0x28')](function(_0x2b2c6c){var _0x36e784=[];_0x2b2c6c[_0xfdbb('0x68')](function(_0x1f0ece){var _0x5a5381;switch(_0x1f0ece['reportType']){case'default':_0x5a5381=_['find'](_0x166de1['associatedResources'],function(_0x559490){return _0x559490['id']===_0x1f0ece[_0xfdbb('0x7e')]&&_0x559490[_0xfdbb('0x31')]===_0xfdbb('0x7f');});break;case _0xfdbb('0x80'):_0x5a5381=_[_0xfdbb('0x49')](_0x166de1[_0xfdbb('0x7d')],function(_0x18f9d0){return _0x18f9d0['id']===_0x1f0ece[_0xfdbb('0x7e')]&&_0x18f9d0['type']===_0xfdbb('0x81');});break;}if(_0x5a5381)_0x36e784[_0xfdbb('0x5e')](_0x1f0ece);});_0x121ab9['count']=_0x36e784[_0xfdbb('0x39')];_0x121ab9['rows']=_0x36e784;return _0x121ab9;});}else{return db[_0x519ce7[_0xfdbb('0x73')]]['count']({'where':_0x44eff7[_0xfdbb('0x3d')]})['then'](function(_0x478944){_0x121ab9[_0xfdbb('0x20')]=_0x478944;if(_0x24b6e3[_0xfdbb('0x34')][_0xfdbb('0x43')]){if(_0x519ce7[_0xfdbb('0x73')]==='CmContact'){_0x44eff7[_0xfdbb('0x44')]=[{'model':db[_0xfdbb('0x82')],'as':_0xfdbb('0x83'),'attributes':['id',_0xfdbb('0x2c'),_0xfdbb('0x84')],'required':_0x24b6e3[_0xfdbb('0x34')][_0xfdbb('0x85')]?!![]:![]},{'model':db[_0xfdbb('0x82')],'as':'ThroughTags','attributes':['id',_0xfdbb('0x2c'),_0xfdbb('0x84')],'through':_0x24b6e3[_0xfdbb('0x34')][_0xfdbb('0x85')]?{'attributes':[],'where':{'TagId':_0x24b6e3[_0xfdbb('0x34')][_0xfdbb('0x85')]||undefined}}:{},'required':_0x24b6e3[_0xfdbb('0x34')]['tag']?!![]:![]}];}else{_0x44eff7[_0xfdbb('0x44')]=[{'all':!![]}];}}return db[_0x519ce7[_0xfdbb('0x73')]][_0xfdbb('0x45')](_0x44eff7);})[_0xfdbb('0x28')](function(_0x58f127){_0x121ab9[_0xfdbb('0x46')]=_0x58f127;if(_0x4e0a07===_0xfdbb('0x86')&&_0x24b6e3[_0xfdbb('0x34')][_0xfdbb('0x87')]===_0xfdbb('0x88')){var _0x541e4c=[];for(var _0xfdb332=0x0;_0xfdb332<_0x121ab9[_0xfdbb('0x46')][_0xfdbb('0x39')];_0xfdb332++){_0x541e4c[_0xfdbb('0x5e')](getOpenTabs('chat',_0x121ab9[_0xfdbb('0x46')][_0xfdb332]['dataValues']));_0x541e4c[_0xfdbb('0x5e')](getOpenTabs(_0xfdbb('0x89'),_0x121ab9[_0xfdbb('0x46')][_0xfdb332]['dataValues']));_0x541e4c['push'](getOpenTabs(_0xfdbb('0x8a'),_0x121ab9['rows'][_0xfdb332][_0xfdbb('0x8b')]));_0x541e4c[_0xfdbb('0x5e')](getOpenTabs('mail',_0x121ab9[_0xfdbb('0x46')][_0xfdb332][_0xfdbb('0x8b')]));_0x541e4c['push'](getOpenTabs(_0xfdbb('0x8c'),_0x121ab9[_0xfdbb('0x46')][_0xfdb332][_0xfdbb('0x8b')]));_0x541e4c['push'](getOpenTabs(_0xfdbb('0x8d'),_0x121ab9[_0xfdbb('0x46')][_0xfdb332][_0xfdbb('0x8b')]));}return Promise[_0xfdbb('0x76')](_0x541e4c)[_0xfdbb('0x28')](function(){return _0x121ab9;});}return _0x121ab9;});}}else{return _0x121ab9;}})[_0xfdbb('0x28')](respondWithFilteredResult(_0x3366e9,_0x44eff7))['catch'](handleError(_0x3366e9,null));};function getOpenTabs(_0x55fc5b,_0x36301d){var _0x4ff9c6=_0x55fc5b[_0xfdbb('0x8e')](0x0)[_0xfdbb('0x8f')]()+_0x55fc5b[_0xfdbb('0x90')](0x1);var _0x14552d={'type':db[_0xfdbb('0x70')][_0xfdbb('0x91')][_0xfdbb('0x92')],'raw':!![]};return new BPromise(function(_0xc3244c,_0x29e0d8){var _0x2451e6=squel['select']()[_0xfdbb('0x7a')]('ui.'+_0x4ff9c6+'InteractionId','id')[_0xfdbb('0x7a')]('ui.createdAt')['from'](_0xfdbb('0x93')+_0x55fc5b+_0xfdbb('0x94'),'ui')['where'](_0xfdbb('0x95'),_0x36301d['id']);return db['sequelize'][_0xfdbb('0x34')](_0x2451e6['toString'](),_0x14552d)[_0xfdbb('0x28')](function(_0x30d5dd){_0x36301d[_0x4ff9c6+_0xfdbb('0x96')]=_0x30d5dd;_0xc3244c(_0x30d5dd);})[_0xfdbb('0x47')](function(_0x3b661d){_0x29e0d8(_0x3b661d);});});}function getAllResources(_0x21bfc5,_0x34c66c){return new BPromise(function(_0x3e734b,_0x3bd3c4){if(_0x34c66c){var _0x52e227=_0x34c66c[_0xfdbb('0x40')]?{[_0x34c66c[_0xfdbb('0x40')][_0xfdbb('0x7a')]]:_0x34c66c['filter']['value']}:undefined;return db[_0x21bfc5][_0xfdbb('0x45')]({'where':_0x52e227,'raw':!![]})[_0xfdbb('0x28')](function(_0x128304){_0x34c66c[_0xfdbb('0x7d')]=_['map'](_0x128304,'id');_0x3e734b(_0x34c66c);})[_0xfdbb('0x47')](function(_0x3a46b5){_0x3bd3c4(_0x3a46b5);});}else{_0x3e734b(null);}});}function getAllFilteredResources(_0x474547,_0x233249){return new BPromise(function(_0x490eb4,_0x4daaf0){var _0x1639f0=_0x474547[_0xfdbb('0x40')]?{[_0x474547[_0xfdbb('0x40')]['field']]:_0x474547[_0xfdbb('0x40')][_0xfdbb('0x97')]}:undefined;return db[_0x474547[_0xfdbb('0x32')]][_0xfdbb('0x45')]({'where':_0x1639f0,'raw':!![]})[_0xfdbb('0x28')](function(_0x1c217e){_0x233249[_0xfdbb('0x7d')]=_['map'](_0x1c217e,function(_0x33febf){return _0x474547['field']?_0x33febf[_0x474547[_0xfdbb('0x7a')]]:_0x33febf[_0xfdbb('0x2c')];});_0x490eb4(_0x233249);})[_0xfdbb('0x47')](function(_0x10e4aa){_0x4daaf0(_0x10e4aa);});});}function getAllowedResources(_0x24ad4d,_0x2a9256,_0x42fa39){return new BPromise(function(_0x5aa300,_0x392f88){if(_0x2a9256){return db[_0xfdbb('0x56')][_0xfdbb('0x45')]({'where':{'sectionId':_0x2a9256['id']},'raw':!![]})[_0xfdbb('0x28')](function(_0x54004a){if(_0x24ad4d[_0xfdbb('0x7a')]&&_0x24ad4d[_0xfdbb('0x7a')]!=='id'){_0x2a9256[_0xfdbb('0x7d')]=_[_0xfdbb('0x33')](_0x54004a,function(_0x2a304e){return _0x2a304e[_0x24ad4d[_0xfdbb('0x7a')]];});}else{if(_0x42fa39==='AnalyticExtractedReport'){_0x2a9256[_0xfdbb('0x7d')]=_[_0xfdbb('0x33')](_0x54004a,function(_0x109bbd){return{'id':_0x109bbd[_0xfdbb('0x69')],'type':_0x109bbd[_0xfdbb('0x31')]};});}else{_0x2a9256[_0xfdbb('0x7d')]=_[_0xfdbb('0x33')](_0x54004a,function(_0x3ba4d4){return _0x3ba4d4[_0xfdbb('0x69')];});}}_0x5aa300(_0x2a9256);})['catch'](function(_0x28fb2c){_0x392f88(_0x28fb2c);});}else{_0x5aa300(null);}});}function getQueryModels(_0x403e6e,_0x500ce5){var _0x20d357=_0x403e6e[_0xfdbb('0x98')]();var _0x48b721={'childModel':undefined,'parentSections':[]};switch(_0x20d357){case _0xfdbb('0x99'):_0x48b721[_0xfdbb('0x73')]=_0xfdbb('0x9a');break;case _0xfdbb('0x9b'):_0x48b721[_0xfdbb('0x73')]=_0xfdbb('0x9c');break;case _0xfdbb('0x9d'):_0x48b721[_0xfdbb('0x73')]=_0xfdbb('0x9e');_0x48b721[_0xfdbb('0x75')]=[{'name':_0xfdbb('0x9f'),'field':_0xfdbb('0x2c'),'foreignKey':_0xfdbb('0xa0')}];break;case'projects':_0x48b721['childModel']='JscriptyProject';break;case'contacts':_0x48b721[_0xfdbb('0x73')]=_0xfdbb('0xa1');_0x48b721['parentSections']=[{'name':_0xfdbb('0xa2'),'field':'id','foreignKey':'ListId'}];break;case'lists':_0x48b721[_0xfdbb('0x73')]=_0xfdbb('0xa3');break;case _0xfdbb('0xa4'):_0x48b721[_0xfdbb('0x73')]=_0xfdbb('0xa5');break;case _0xfdbb('0xa6'):_0x48b721[_0xfdbb('0x73')]='CmCustomField';break;case'chatqueues':_0x48b721['childModel']='ChatQueue';break;case _0xfdbb('0xa7'):_0x48b721[_0xfdbb('0x73')]=_0xfdbb('0xa8');break;case _0xfdbb('0xa9'):_0x48b721[_0xfdbb('0x73')]=_0xfdbb('0xaa');break;case'faxaccounts':_0x48b721[_0xfdbb('0x73')]='FaxAccount';break;case _0xfdbb('0xab'):case _0xfdbb('0xac'):case _0xfdbb('0xad'):_0x48b721[_0xfdbb('0x73')]=_0xfdbb('0xae');break;case _0xfdbb('0xaf'):_0x48b721[_0xfdbb('0x73')]='VoiceContext';break;case _0xfdbb('0xb0'):_0x48b721['childModel']=_0xfdbb('0xb1');break;case _0xfdbb('0xb2'):_0x48b721[_0xfdbb('0x73')]='VoiceRecording';_0x48b721[_0xfdbb('0x75')]=[{'name':_0xfdbb('0x86'),'field':_0xfdbb('0x2c'),'foreignKey':_0xfdbb('0xb3'),'model':'User','filter':{'field':_0xfdbb('0xb4'),'value':[_0xfdbb('0xb5')]}},{'name':'Telephones','field':'name','foreignKey':'membername','model':'User','filter':{'field':_0xfdbb('0xb4'),'value':[_0xfdbb('0xb6')]}},{'name':_0xfdbb('0xb7'),'field':_0xfdbb('0x2c'),'foreignKey':_0xfdbb('0xb8'),'model':_0xfdbb('0xb9'),'filter':{'field':_0xfdbb('0x31'),'value':[_0xfdbb('0xba')]}},{'name':_0xfdbb('0xbb'),'field':'name','foreignKey':'queue','model':_0xfdbb('0xb9'),'filter':{'field':_0xfdbb('0x31'),'value':[_0xfdbb('0xbc')]}}];break;case'musiconholds':_0x48b721[_0xfdbb('0x73')]='VoiceMusicOnHold';break;case'chanspies':_0x48b721[_0xfdbb('0x73')]=_0xfdbb('0xbd');break;case _0xfdbb('0xbe'):_0x48b721[_0xfdbb('0x73')]='VoicePrefix';break;case'ivrcampaigns':_0x48b721[_0xfdbb('0x73')]=_0xfdbb('0xbf');break;case'mailqueues':_0x48b721[_0xfdbb('0x73')]=_0xfdbb('0xc0');break;case _0xfdbb('0xc1'):_0x48b721[_0xfdbb('0x73')]=_0xfdbb('0xc2');break;case _0xfdbb('0xc3'):_0x48b721[_0xfdbb('0x73')]='MailSubstatus';break;case _0xfdbb('0xc4'):_0x48b721[_0xfdbb('0x73')]=_0xfdbb('0xc5');break;case _0xfdbb('0xc6'):_0x48b721[_0xfdbb('0x73')]=_0xfdbb('0xc7');break;case _0xfdbb('0xc8'):_0x48b721[_0xfdbb('0x73')]=_0xfdbb('0xc9');break;case _0xfdbb('0xca'):_0x48b721[_0xfdbb('0x73')]=_0xfdbb('0xcb');break;case'whatsappqueues':_0x48b721[_0xfdbb('0x73')]='WhatsappQueue';break;case _0xfdbb('0xcc'):_0x48b721[_0xfdbb('0x73')]=_0xfdbb('0xcd');break;case _0xfdbb('0xce'):case _0xfdbb('0xcf'):_0x48b721[_0xfdbb('0x73')]='VoiceQueue';if(_0x500ce5){_0x48b721[_0xfdbb('0x75')]=[{'name':_0xfdbb('0xb7')},{'name':_0xfdbb('0xbb')}];}break;case'users':case _0xfdbb('0xd0'):case _0xfdbb('0xd1'):_0x48b721[_0xfdbb('0x73')]=_0xfdbb('0xd2');if(_0x500ce5){_0x48b721[_0xfdbb('0x75')]=[{'name':_0xfdbb('0xd3'),'filter':{'field':_0xfdbb('0xb4'),'value':[_0xfdbb('0xd4'),'user']},'ignore':!![]},{'name':_0xfdbb('0x86')},{'name':'Telephones'}];}break;case _0xfdbb('0xd5'):_0x48b721[_0xfdbb('0x73')]=_0xfdbb('0xd6');break;case _0xfdbb('0xd7'):_0x48b721[_0xfdbb('0x73')]=_0xfdbb('0xd8');break;case _0xfdbb('0xd9'):_0x48b721[_0xfdbb('0x73')]='FreshdeskAccount';break;case'sugarcrmaccounts':_0x48b721[_0xfdbb('0x73')]=_0xfdbb('0xda');break;case _0xfdbb('0xdb'):_0x48b721[_0xfdbb('0x73')]=_0xfdbb('0xdc');break;case _0xfdbb('0xdd'):_0x48b721[_0xfdbb('0x73')]=_0xfdbb('0xde');break;case'vtigeraccounts':_0x48b721[_0xfdbb('0x73')]=_0xfdbb('0xd2');break;case _0xfdbb('0xdf'):_0x48b721['childModel']=_0xfdbb('0xe0');break;case _0xfdbb('0xe1'):_0x48b721[_0xfdbb('0x73')]=_0xfdbb('0xe2');break;case _0xfdbb('0xe3'):_0x48b721[_0xfdbb('0x73')]=_0xfdbb('0x67');break;case _0xfdbb('0xe4'):_0x48b721[_0xfdbb('0x73')]=_0xfdbb('0xe5');break;case _0xfdbb('0xe6'):_0x48b721[_0xfdbb('0x73')]=_0xfdbb('0xe7');break;case'scheduler':_0x48b721[_0xfdbb('0x73')]=_0xfdbb('0xe8');break;case _0xfdbb('0xe9'):_0x48b721[_0xfdbb('0x73')]=_0xfdbb('0xea');break;case _0xfdbb('0xeb'):_0x48b721[_0xfdbb('0x73')]=_0xfdbb('0x82');break;case _0xfdbb('0xec'):_0x48b721['childModel']=_0xfdbb('0xed');break;case _0xfdbb('0xee'):_0x48b721[_0xfdbb('0x73')]=_0xfdbb('0xef');break;case'trunks':_0x48b721[_0xfdbb('0x73')]=_0xfdbb('0xf0');break;case'variables':_0x48b721['childModel']=_0xfdbb('0xf1');break;case _0xfdbb('0xf2'):_0x48b721[_0xfdbb('0x73')]='Plugin';break;case _0xfdbb('0xf3'):_0x48b721[_0xfdbb('0x73')]='AnalyticExtractedReport';_0x48b721[_0xfdbb('0x75')]=[{'name':_0xfdbb('0xf4'),'field':'id','foreignKey':'reportId'}];break;case _0xfdbb('0xf5'):_0x48b721['childModel']=_0xfdbb('0xf6');break;case _0xfdbb('0xf7'):_0x48b721['childModel']='WhatsappAccount';break;case _0xfdbb('0xf8'):_0x48b721[_0xfdbb('0x73')]=_0xfdbb('0xf9');_0x48b721['parentSections']=[{'name':'Agents','field':'id','foreignKey':_0xfdbb('0xfa'),'model':_0xfdbb('0xd2'),'filter':{'field':_0xfdbb('0xb4'),'value':[_0xfdbb('0xb5')]}},{'name':_0xfdbb('0xfb'),'field':'id','foreignKey':_0xfdbb('0xfa'),'model':'User','filter':{'field':'role','value':[_0xfdbb('0xb6')]}}];break;default:return _0x48b721;}return _0x48b721;} \ No newline at end of file +var _0x63b3=['./userProfile.socket','register','sendStatus','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','then','destroy','status','stack','name','send','index','map','UserProfile','fieldName','type','key','query','keys','intersection','model','attributes','fields','hasOwnProperty','nolimit','sort','where','pick','filters','filter','merge','VIRTUAL','includeAll','include','findAll','params','length','options','find','catch','create','body','clone','rawAttributes','omit','createdAt','updatedAt','crudPermissions','transaction','get','UserProfileSection','autoAssociation','sectionId','userProfileId','Resources','UserProfileResource','update','describe','addSections','sequelize','removeSections','ids','getSections','enabled','includes','isEmpty','subsections','push','findOne','forEach','resourceId','Plugin','addResources','bulkCreate','removeResources','getResources','section','Sequelize','ValidationError','Unknown\x20section','mergeResources','childModel','Invalid\x20section\x20\x27','parentSections','all','union','order','field','foreignKey','associatedResources','AnalyticExtractedReport','reportType','default','reportId','DefaultReports','custom','CustomReports','rows','CmContact','Tag','Tags','color','tag','ThroughTags','Agents','openTabs','true','dataValues','sms','fax','mail','openchannel','whatsapp','toUpperCase','slice','SELECT','select','ui.','InteractionId','from','user_has_','_interactions','ui.UserId\x20=\x20?','toString','OpenTabs','value','squareprojects','odbc','SquareOdbc','squarerecordings','SquareRecording','SquareProjects','projectName','projects','JscriptyProject','contacts','ListId','lists','CmList','companies','CmCompany','globalcustomfields','CmCustomField','chatqueues','ChatQueue','chatwebsites','faxqueues','FaxQueue','faxaccounts','inboundroutes','internalroutes','outboundroutes','VoiceExtension','contexts','VoiceMail','voicerecordings','VoiceRecording','membername','User','agent','telephone','queue','VoiceQueue','inbound','QueueCampaigns','musiconholds','VoiceMusicOnHold','chanspies','VoiceChanSpy','voiceprefixes','VoicePrefix','ivrcampaigns','Campaign','mailqueues','MailQueue','mailaccounts','MailAccount','mailsubstatuses','openchannelqueues','OpenchannelQueue','openchannelaccounts','smsqueues','SmsQueue','whatsappqueues','WhatsappQueue','teams','Team','voicequeues','VoiceQueues','agents','telephones','role','admin','ZendeskAccount','salesforceaccounts','freshdeskaccounts','FreshdeskAccount','sugarcrmaccounts','deskaccounts','DeskAccount','zohoaccounts','ZohoAccount','vtigeraccounts','cannedanswers','CannedAnswer','dispositions','Disposition','Dashboard','Interval','pauses','Pause','scheduler','sounds','Sound','tags','templates','Template','Trunk','variables','plugins','extractedreports','Reports','metrics','AnalyticMetric','screenrecordings','ScreenRecording','UserId','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','defaults','redis','localhost','socket.io-emitter'];(function(_0x1ddedd,_0x485606){var _0xa3e1ac=function(_0x580444){while(--_0x580444){_0x1ddedd['push'](_0x1ddedd['shift']());}};_0xa3e1ac(++_0x485606);}(_0x63b3,0xeb));var _0x363b=function(_0x95caac,_0x26c4bc){_0x95caac=_0x95caac-0x0;var _0x8e3b15=_0x63b3[_0x95caac];return _0x8e3b15;};'use strict';var emlformat=require(_0x363b('0x0'));var rimraf=require(_0x363b('0x1'));var zipdir=require(_0x363b('0x2'));var jsonpatch=require(_0x363b('0x3'));var rp=require(_0x363b('0x4'));var moment=require(_0x363b('0x5'));var BPromise=require(_0x363b('0x6'));var Mustache=require(_0x363b('0x7'));var util=require(_0x363b('0x8'));var path=require('path');var sox=require(_0x363b('0x9'));var csv=require(_0x363b('0xa'));var ejs=require(_0x363b('0xb'));var fs=require('fs');var fs_extra=require(_0x363b('0xc'));var _=require(_0x363b('0xd'));var squel=require(_0x363b('0xe'));var crypto=require('crypto');var jsforce=require(_0x363b('0xf'));var deskjs=require(_0x363b('0x10'));var toCsv=require(_0x363b('0xa'));var querystring=require('querystring');var Papa=require(_0x363b('0x11'));var Redis=require(_0x363b('0x12'));var authService=require(_0x363b('0x13'));var qs=require('../../components/parsers/qs');var as=require(_0x363b('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x363b('0x15'))(_0x363b('0x16'));var utils=require(_0x363b('0x17'));var config=require(_0x363b('0x18'));var licenseUtil=require(_0x363b('0x19'));var db=require(_0x363b('0x1a'))['db'];config['redis']=_[_0x363b('0x1b')](config[_0x363b('0x1c')],{'host':_0x363b('0x1d'),'port':0x18eb});var socket=require(_0x363b('0x1e'))(new Redis(config[_0x363b('0x1c')]));require(_0x363b('0x1f'))[_0x363b('0x20')](socket);function respondWithStatusCode(_0x6e5c93,_0x48fd85){_0x48fd85=_0x48fd85||0xcc;return function(_0x354bdc){if(_0x354bdc){return _0x6e5c93[_0x363b('0x21')](_0x48fd85);}return _0x6e5c93['status'](_0x48fd85)[_0x363b('0x22')]();};}function respondWithResult(_0x3f99d5,_0x5e9314){_0x5e9314=_0x5e9314||0xc8;return function(_0x2e48fa){if(_0x2e48fa){return _0x3f99d5['status'](_0x5e9314)[_0x363b('0x23')](_0x2e48fa);}};}function respondWithFilteredResult(_0x120686,_0x42833){return function(_0x2cc55f){if(_0x2cc55f){var _0x134938=typeof _0x42833[_0x363b('0x24')]===_0x363b('0x25')&&typeof _0x42833[_0x363b('0x26')]===_0x363b('0x25');var _0x10cfaf=_0x2cc55f[_0x363b('0x27')];var _0x2df653=_0x134938?0x0:_0x42833[_0x363b('0x24')];var _0x1c96d1=_0x134938?_0x2cc55f[_0x363b('0x27')]:_0x42833[_0x363b('0x24')]+_0x42833[_0x363b('0x26')];var _0x2ac0af;if(_0x1c96d1>=_0x10cfaf){_0x1c96d1=_0x10cfaf;_0x2ac0af=0xc8;}else{_0x2ac0af=0xce;}_0x120686['status'](_0x2ac0af);return _0x120686[_0x363b('0x28')](_0x363b('0x29'),_0x2df653+'-'+_0x1c96d1+'/'+_0x10cfaf)['json'](_0x2cc55f);}return null;};}function patchUpdates(_0x19c3a1){return function(_0x3dabea){try{jsonpatch[_0x363b('0x2a')](_0x3dabea,_0x19c3a1,!![]);}catch(_0x1a3060){return BPromise[_0x363b('0x2b')](_0x1a3060);}return _0x3dabea['save']();};}function saveUpdates(_0x1fc379,_0x4ebfde){return function(_0x221403){if(_0x221403){return _0x221403['update'](_0x1fc379)[_0x363b('0x2c')](function(_0x1ff624){return _0x1ff624;});}return null;};}function removeEntity(_0x41ba78,_0x56da17){return function(_0x457610){if(_0x457610){return _0x457610[_0x363b('0x2d')]()[_0x363b('0x2c')](function(){_0x41ba78[_0x363b('0x2e')](0xcc)[_0x363b('0x22')]();});}};}function handleEntityNotFound(_0x8e2733,_0x5f25b3){return function(_0x44cb07){if(!_0x44cb07){_0x8e2733['sendStatus'](0x194);}return _0x44cb07;};}function handleError(_0xd9607c,_0x4013a0){_0x4013a0=_0x4013a0||0x1f4;return function(_0xac58bf){logger['error'](_0xac58bf[_0x363b('0x2f')]);if(_0xac58bf[_0x363b('0x30')]){delete _0xac58bf[_0x363b('0x30')];}_0xd9607c[_0x363b('0x2e')](_0x4013a0)[_0x363b('0x31')](_0xac58bf);};}exports[_0x363b('0x32')]=function(_0x11b547,_0x114e03){var _0x5f48e7={},_0x172c52={},_0x402662={'count':0x0,'rows':[]};var _0x20bfa6=_[_0x363b('0x33')](db[_0x363b('0x34')]['rawAttributes'],function(_0x53fa9b){return{'name':_0x53fa9b[_0x363b('0x35')],'type':_0x53fa9b[_0x363b('0x36')][_0x363b('0x37')]};});_0x172c52['model']=_[_0x363b('0x33')](_0x20bfa6,_0x363b('0x30'));_0x172c52[_0x363b('0x38')]=_[_0x363b('0x39')](_0x11b547[_0x363b('0x38')]);_0x172c52['filters']=_[_0x363b('0x3a')](_0x172c52[_0x363b('0x3b')],_0x172c52[_0x363b('0x38')]);_0x5f48e7[_0x363b('0x3c')]=_['intersection'](_0x172c52[_0x363b('0x3b')],qs['fields'](_0x11b547[_0x363b('0x38')][_0x363b('0x3d')]));_0x5f48e7[_0x363b('0x3c')]=_0x5f48e7[_0x363b('0x3c')]['length']?_0x5f48e7[_0x363b('0x3c')]:_0x172c52[_0x363b('0x3b')];if(!_0x11b547['query'][_0x363b('0x3e')](_0x363b('0x3f'))){_0x5f48e7[_0x363b('0x26')]=qs[_0x363b('0x26')](_0x11b547[_0x363b('0x38')]['limit']);_0x5f48e7[_0x363b('0x24')]=qs['offset'](_0x11b547[_0x363b('0x38')]['offset']);}_0x5f48e7['order']=qs[_0x363b('0x40')](_0x11b547[_0x363b('0x38')]['sort']);_0x5f48e7[_0x363b('0x41')]=qs['filters'](_[_0x363b('0x42')](_0x11b547[_0x363b('0x38')],_0x172c52[_0x363b('0x43')]),_0x20bfa6);if(_0x11b547[_0x363b('0x38')][_0x363b('0x44')]){_0x5f48e7['where']=_[_0x363b('0x45')](_0x5f48e7[_0x363b('0x41')],{'$or':_['map'](_0x20bfa6,function(_0x48171b){if(_0x48171b[_0x363b('0x36')]!==_0x363b('0x46')){var _0x586b0f={};_0x586b0f[_0x48171b['name']]={'$like':'%'+_0x11b547[_0x363b('0x38')][_0x363b('0x44')]+'%'};return _0x586b0f;}})});}_0x5f48e7=_[_0x363b('0x45')]({},_0x5f48e7,_0x11b547['options']);var _0x18d483={'where':_0x5f48e7[_0x363b('0x41')]};return db['UserProfile'][_0x363b('0x27')](_0x18d483)[_0x363b('0x2c')](function(_0x41bfc8){_0x402662['count']=_0x41bfc8;if(_0x11b547['query'][_0x363b('0x47')]){_0x5f48e7[_0x363b('0x48')]=[{'all':!![]}];}return db[_0x363b('0x34')][_0x363b('0x49')](_0x5f48e7);})[_0x363b('0x2c')](function(_0x579dc0){_0x402662['rows']=_0x579dc0;return _0x402662;})[_0x363b('0x2c')](respondWithFilteredResult(_0x114e03,_0x5f48e7))['catch'](handleError(_0x114e03,null));};exports['show']=function(_0x190794,_0x26e89e){var _0x50fa65={'raw':![],'where':{'id':_0x190794[_0x363b('0x4a')]['id']}},_0x4120f3={};_0x4120f3[_0x363b('0x3b')]=_[_0x363b('0x39')](db[_0x363b('0x34')]['rawAttributes']);_0x4120f3[_0x363b('0x38')]=_[_0x363b('0x39')](_0x190794['query']);_0x4120f3[_0x363b('0x43')]=_['intersection'](_0x4120f3['model'],_0x4120f3[_0x363b('0x38')]);_0x50fa65[_0x363b('0x3c')]=_['intersection'](_0x4120f3[_0x363b('0x3b')],qs[_0x363b('0x3d')](_0x190794[_0x363b('0x38')][_0x363b('0x3d')]));_0x50fa65[_0x363b('0x3c')]=_0x50fa65[_0x363b('0x3c')][_0x363b('0x4b')]?_0x50fa65[_0x363b('0x3c')]:_0x4120f3['model'];if(_0x190794[_0x363b('0x38')][_0x363b('0x47')]){_0x50fa65[_0x363b('0x48')]=[{'all':!![]}];}_0x50fa65=_[_0x363b('0x45')]({},_0x50fa65,_0x190794[_0x363b('0x4c')]);return db['UserProfile'][_0x363b('0x4d')](_0x50fa65)[_0x363b('0x2c')](handleEntityNotFound(_0x26e89e,null))['then'](respondWithResult(_0x26e89e,null))[_0x363b('0x4e')](handleError(_0x26e89e,null));};exports[_0x363b('0x4f')]=function(_0x588207,_0x3fea60){return db['UserProfile'][_0x363b('0x4f')](_0x588207[_0x363b('0x50')],{})[_0x363b('0x2c')](respondWithResult(_0x3fea60,0xc9))['catch'](handleError(_0x3fea60,null));};exports[_0x363b('0x51')]=function(_0x30a1ac,_0x92fa4){var _0x274727={'where':{'id':_0x30a1ac[_0x363b('0x4a')]['id']}},_0x4744a9={};_0x4744a9[_0x363b('0x3b')]=_[_0x363b('0x39')](db[_0x363b('0x34')][_0x363b('0x52')]);_0x274727[_0x363b('0x3c')]=_['intersection'](_0x4744a9[_0x363b('0x3b')],qs[_0x363b('0x3d')](_0x30a1ac['query'][_0x363b('0x3d')]));_0x274727[_0x363b('0x3c')]=_0x274727[_0x363b('0x3c')][_0x363b('0x4b')]?_0x274727[_0x363b('0x3c')]:_0x4744a9[_0x363b('0x3b')];if(_0x30a1ac[_0x363b('0x38')][_0x363b('0x47')]){_0x274727['include']=[{'all':!![]}];}_0x274727=_[_0x363b('0x45')]({},_0x274727,_0x30a1ac[_0x363b('0x4c')]);return db[_0x363b('0x34')]['find'](_0x274727)['then'](handleEntityNotFound(_0x92fa4,null))[_0x363b('0x2c')](function(_0x3f29d8){if(_0x3f29d8){var _0x232b9f=_0x3f29d8['get']({'plain':!![]});_0x232b9f=qs[_0x363b('0x53')](_0x232b9f,['id',_0x363b('0x54'),_0x363b('0x55'),_0x363b('0x56')]);_0x30a1ac['body']=_[_0x363b('0x53')](_0x30a1ac['body'],['id',_0x363b('0x54'),_0x363b('0x55')]);return db['sequelize'][_0x363b('0x57')](function(_0x5976a3){return db[_0x363b('0x34')][_0x363b('0x4f')](_[_0x363b('0x45')](_0x232b9f,_0x30a1ac[_0x363b('0x50')]),{'include':_0x30a1ac[_0x363b('0x38')]['includeAll']?[{'all':!![]}]:undefined,'transaction':_0x5976a3})[_0x363b('0x2c')](function(_0x32bb7a){var _0x34b852=_0x32bb7a[_0x363b('0x58')]({'plain':!![]});return db[_0x363b('0x59')][_0x363b('0x49')]({'where':{'userProfileId':_0x30a1ac[_0x363b('0x4a')]['id']},'raw':!![]})[_0x363b('0x2c')](function(_0x5741c5){if(_0x5741c5){return BPromise['each'](_0x5741c5,function(_0x992431){return new BPromise(function(_0x1a3049,_0x77dc59){if(_0x992431[_0x363b('0x5a')]===null||_0x992431[_0x363b('0x5a')]===0x1)_0x1a3049(null);return db['UserProfileResource'][_0x363b('0x49')]({'where':{'sectionId':_0x992431['id']},'raw':!![]})[_0x363b('0x2c')](function(_0x383412){var _0x4921d1=_[_0x363b('0x33')](_0x383412,function(_0xb5ecb3){return qs[_0x363b('0x53')](_0xb5ecb3,['id','createdAt',_0x363b('0x55'),_0x363b('0x5b')]);});_0x1a3049(_0x4921d1);})['catch'](function(_0xf0cdb){_0x77dc59(_0xf0cdb);});})[_0x363b('0x2c')](function(_0x5d9abc){var _0x38aba4=qs[_0x363b('0x53')](_0x992431,['id',_0x363b('0x54'),_0x363b('0x55')]);_0x38aba4[_0x363b('0x5c')]=_0x34b852['id'];if(_0x5d9abc)_0x38aba4[_0x363b('0x5d')]=_0x5d9abc;return _0x38aba4;})[_0x363b('0x2c')](function(_0x341181){return db[_0x363b('0x59')]['create'](_0x341181,{'include':[{'model':db[_0x363b('0x5e')],'as':'Resources'}],'raw':!![],'transaction':_0x5976a3});});})[_0x363b('0x2c')](function(){return _0x34b852;});}});});});}})[_0x363b('0x2c')](respondWithResult(_0x92fa4,0xc9))[_0x363b('0x4e')](handleError(_0x92fa4,null));};exports[_0x363b('0x5f')]=function(_0xe1b30d,_0x2338e5){if(_0xe1b30d[_0x363b('0x50')]['id']){delete _0xe1b30d[_0x363b('0x50')]['id'];}return db['UserProfile']['find']({'where':{'id':_0xe1b30d[_0x363b('0x4a')]['id']}})['then'](handleEntityNotFound(_0x2338e5,null))[_0x363b('0x2c')](saveUpdates(_0xe1b30d[_0x363b('0x50')],null))[_0x363b('0x2c')](respondWithResult(_0x2338e5,null))['catch'](handleError(_0x2338e5,null));};exports['destroy']=function(_0x3bf440,_0x2a5f4d){return db[_0x363b('0x34')][_0x363b('0x4d')]({'where':{'id':_0x3bf440[_0x363b('0x4a')]['id']}})['then'](handleEntityNotFound(_0x2a5f4d,null))[_0x363b('0x2c')](removeEntity(_0x2a5f4d,null))[_0x363b('0x4e')](handleError(_0x2a5f4d,null));};exports[_0x363b('0x60')]=function(_0x48e97a,_0x5a1f27){return db[_0x363b('0x34')]['describe']()[_0x363b('0x2c')](respondWithResult(_0x5a1f27,null))[_0x363b('0x4e')](handleError(_0x5a1f27,null));};exports[_0x363b('0x61')]=function(_0x232f37,_0x3108a2){var _0x514a61=_0x232f37[_0x363b('0x50')];return db[_0x363b('0x34')][_0x363b('0x4d')]({'where':{'id':_0x232f37[_0x363b('0x4a')]['id']}})['then'](handleEntityNotFound(_0x3108a2,null))[_0x363b('0x2c')](function(_0x4efc5e){if(_0x4efc5e){return db[_0x363b('0x62')][_0x363b('0x57')](function(_0x1aaa06){return db[_0x363b('0x59')][_0x363b('0x2d')]({'where':{'userProfileId':_0x232f37['params']['id'],'sectionId':_[_0x363b('0x33')](_0x514a61,function(_0x5998d1){return _0x5998d1['sectionId'];})},'transaction':_0x1aaa06})[_0x363b('0x2c')](function(){var _0x1df8f1=_['map'](_0x514a61,function(_0x2b6efe){_0x2b6efe[_0x363b('0x5c')]=_0x232f37[_0x363b('0x4a')]['id'];return _0x2b6efe;});var _0xfae5b9=[];return BPromise['each'](_0x1df8f1,function(_0x3215ce){return db[_0x363b('0x59')][_0x363b('0x4f')](_0x3215ce,{'include':[{'model':db['UserProfileResource'],'as':'Resources'}],'raw':!![],'transaction':_0x1aaa06})[_0x363b('0x2c')](function(_0x118e82){_0xfae5b9['push'](_0x118e82[_0x363b('0x58')]({'plain':!![]}));});})[_0x363b('0x2c')](function(){return _0xfae5b9;});});});}})[_0x363b('0x2c')](function(_0xc2c2fd){return _0xc2c2fd;})['then'](respondWithResult(_0x3108a2,null))[_0x363b('0x4e')](handleError(_0x3108a2,null));};exports[_0x363b('0x63')]=function(_0x419859,_0x20e4b7){var _0x358ca3;return db[_0x363b('0x34')]['find']({'where':{'id':_0x419859[_0x363b('0x4a')]['id']},'attributes':['id',_0x363b('0x30')]})[_0x363b('0x2c')](handleEntityNotFound(_0x20e4b7,null))[_0x363b('0x2c')](function(_0x297e1e){if(_0x297e1e){_0x358ca3=_0x297e1e;return db[_0x363b('0x59')][_0x363b('0x2d')]({'where':{'userProfileId':_0x419859['params']['id'],'sectionId':_0x419859[_0x363b('0x38')][_0x363b('0x64')]}});}})['then'](function(){return _0x358ca3;})['then'](respondWithStatusCode(_0x20e4b7,null))[_0x363b('0x4e')](handleError(_0x20e4b7,null));};exports[_0x363b('0x65')]=function(_0x1b616e,_0x453061){var _0x4f77be=[];var _0x3e26ca=[];return db[_0x363b('0x59')][_0x363b('0x49')]({'where':{'userProfileId':_0x1b616e[_0x363b('0x4a')]['id']},'raw':!![]})[_0x363b('0x2c')](function(_0x30a7fc){_0x4f77be=_[_0x363b('0x44')](_0x30a7fc,function(_0x1ddfa6){return _0x1ddfa6[_0x363b('0x66')]===0x1||_[_0x363b('0x67')]([0x3eb,0x709],_0x1ddfa6[_0x363b('0x5b')]);});if(!_[_0x363b('0x68')](_0x4f77be)){return _[_0x363b('0x33')](_0x4f77be,function(_0x584b1c){return _0x584b1c[_0x363b('0x5b')];});}else{return;}})[_0x363b('0x2c')](function(_0x1c8aeb){if(_0x1c8aeb)_0x3e26ca=_0x1c8aeb;if(_[_0x363b('0x67')](_0x3e26ca,0x64)){var _0xc3272e=_[_0x363b('0x4d')](_0x4f77be,{'sectionId':0x64});return hasDefaultDashboard(_0xc3272e)['then'](function(_0x59cdee){return _[_0x363b('0x33')](_0x4f77be,function(_0x501200){if(_0x501200[_0x363b('0x5b')]===0x64){_0x501200[_0x363b('0x69')]=_0x59cdee;}return _0x501200;});});}else{return;}})[_0x363b('0x2c')](function(_0x4e3ec1){if(_0x4e3ec1)_0x4f77be=_0x4e3ec1;if(_[_0x363b('0x67')](_0x3e26ca,0x3eb)){var _0xad8475=_[_0x363b('0x4d')](_0x4f77be,{'sectionId':0x3eb});return getCustomDashboards(_0xad8475)[_0x363b('0x2c')](function(_0x1b70c8){return _['map'](_0x4f77be,function(_0x18566b){if(_0xad8475[_0x363b('0x66')]){if(_0x18566b[_0x363b('0x5b')]===0x3eb){_0x18566b[_0x363b('0x69')]=_0x1b70c8;}}else{if(_0x18566b[_0x363b('0x5b')]===0x64){_0x18566b[_0x363b('0x69')]=_0x1b70c8;}}return _0x18566b;});});}else{return;}})['then'](function(_0x5d3280){if(_0x5d3280)_0x4f77be=_0x5d3280;if(_[_0x363b('0x67')](_0x3e26ca,0x709)){var _0x457327=_['find'](_0x4f77be,{'sectionId':0x709});return getPlugins(_0x457327)[_0x363b('0x2c')](function(_0x28e558){if(_0x457327[_0x363b('0x66')]){return _[_0x363b('0x33')](_0x4f77be,function(_0x522208){if(_0x522208[_0x363b('0x5b')]===0x709){_0x522208[_0x363b('0x69')]=_0x28e558;}return _0x522208;});}else{var _0x18a601={'sectionId':0x76c,'enabled':0x1,'subsections':_0x28e558};var _0x54c985=_[_0x363b('0x33')](_0x4f77be);_0x54c985[_0x363b('0x6a')](_0x18a601);return _0x54c985;}});}else{return;}})[_0x363b('0x2c')](function(_0x140854){if(_0x140854)_0x4f77be=_0x140854;return _[_0x363b('0x44')](_0x4f77be,[_0x363b('0x66'),0x1]);})['then'](respondWithResult(_0x453061,null))[_0x363b('0x4e')](handleError(_0x453061,null));};function hasDefaultDashboard(_0x5ddced){var _0x3780bf=[0x65];return new BPromise(function(_0x1989ce,_0x32334e){try{if(_0x5ddced[_0x363b('0x5a')]){_0x1989ce(_0x3780bf);}else{return db['UserProfileResource'][_0x363b('0x6b')]({'where':{'sectionId':_0x5ddced['id']},'raw':!![]})[_0x363b('0x2c')](function(_0x1be79a){_0x1be79a?_0x1989ce(_0x3780bf):_0x1989ce();});}}catch(_0x1ec749){_0x32334e(_0x1ec749);}});}function getCustomDashboards(_0x522de4){var _0x19b815=[];return new BPromise(function(_0xebf3cf,_0x3905ea){try{if(_0x522de4['autoAssociation']){return db['Dashboard'][_0x363b('0x49')]({'raw':!![]})[_0x363b('0x2c')](function(_0x22b78c){_0x22b78c[_0x363b('0x6c')](function(_0x388db5){_0x19b815[_0x363b('0x6a')](_0x388db5['id']+0x1869f);});_0xebf3cf(_0x19b815);});}else{return db[_0x363b('0x5e')][_0x363b('0x49')]({'where':{'sectionId':_0x522de4['id']},'raw':!![]})[_0x363b('0x2c')](function(_0x5acb47){_0x5acb47['forEach'](function(_0x4c0513){_0x19b815[_0x363b('0x6a')](_0x4c0513[_0x363b('0x6d')]+0x1869f);});_0xebf3cf(_0x19b815);});}}catch(_0x48d57a){_0x3905ea(_0x48d57a);}});}function getPlugins(_0x317321){var _0x1a01c8=[];return new BPromise(function(_0x500d8f,_0x115715){try{if(_0x317321[_0x363b('0x5a')]){return db[_0x363b('0x6e')]['findAll']({'raw':!![]})[_0x363b('0x2c')](function(_0x2abf56){_0x2abf56[_0x363b('0x6c')](function(_0x276370){_0x1a01c8[_0x363b('0x6a')](_0x276370['id']+0x15b38);});_0x500d8f(_0x1a01c8);});}else{return db[_0x363b('0x5e')][_0x363b('0x49')]({'where':{'sectionId':_0x317321['id']},'raw':!![]})[_0x363b('0x2c')](function(_0x394c66){_0x394c66[_0x363b('0x6c')](function(_0x4c1b18){_0x1a01c8[_0x363b('0x6a')](_0x4c1b18[_0x363b('0x6d')]+0x15b38);});_0x500d8f(_0x1a01c8);});}}catch(_0xb7cf01){_0x115715(_0xb7cf01);}});}exports[_0x363b('0x6f')]=function(_0x5c1f4e,_0x5c2240){return db['UserProfile'][_0x363b('0x4d')]({'where':{'id':_0x5c1f4e['params']['id']}})['then'](handleEntityNotFound(_0x5c2240,null))[_0x363b('0x2c')](function(_0x2fe1ca){if(_0x2fe1ca){return db[_0x363b('0x62')][_0x363b('0x57')](function(_0x35ba24){return db[_0x363b('0x59')][_0x363b('0x49')]({'where':{'userProfileId':_0x5c1f4e[_0x363b('0x4a')]['id']},'attributes':['id'],'raw':!![]})[_0x363b('0x2c')](function(_0x26f1e0){if(_0x26f1e0){return db[_0x363b('0x59')]['destroy']({'where':{'userProfileId':_0x5c1f4e['params']['id'],'id':_[_0x363b('0x33')](_0x26f1e0,function(_0x56abba){return _0x56abba['id'];})},'transaction':_0x35ba24});}})['then'](function(_0x12d10e){var _0x483ac=_[_0x363b('0x33')](_0x5c1f4e['body'],function(_0x163234){_0x163234['userProfileId']=_0x5c1f4e[_0x363b('0x4a')]['id'];return _0x163234;});return db['UserProfileSection'][_0x363b('0x70')](_0x483ac,{'raw':!![],'transaction':_0x35ba24});})[_0x363b('0x2c')](function(_0x38d6e1){var _0x4d78a3=_[_0x363b('0x44')](_[_0x363b('0x33')](_0x38d6e1,function(_0x41f44f){return _0x41f44f[_0x363b('0x58')]({'plain':!![]});}),{'includeAll':![]});if(_0x4d78a3){return db[_0x363b('0x59')]['findAll']({'where':{'userProfileId':_0x5c1f4e[_0x363b('0x4a')]['id'],'sectionId':_['map'](_0x4d78a3,function(_0x5e6b7d){return _0x5e6b7d[_0x363b('0x5b')];})},'attributes':['id',_0x363b('0x5b')],'raw':!![]})['then'](function(_0x54d804){var _0x33dd24=_[_0x363b('0x33')](_0x5c1f4e[_0x363b('0x50')],function(_0x351948){_0x351948['userProfileId']=_0x5c1f4e[_0x363b('0x4a')]['id'];return _0x351948;});return db[_0x363b('0x5e')][_0x363b('0x70')](_0x33dd24,{'raw':!![],'transaction':_0x35ba24});});}})['catch'](handleError(_0x5c2240,null));});}})['then'](function(_0xb4aba7){var _0x57dde7=_['map'](_0xb4aba7,function(_0x2163f2){return _0x2163f2['get']({'plain':!![]});});})['then'](respondWithResult(_0x5c2240,null))[_0x363b('0x4e')](handleError(_0x5c2240,null));};exports[_0x363b('0x71')]=function(_0x10730e,_0x186f2a,_0x3abb1a){return db[_0x363b('0x34')][_0x363b('0x4d')]({'where':{'id':_0x10730e['params']['id']}})[_0x363b('0x2c')](handleEntityNotFound(_0x186f2a,null))[_0x363b('0x2c')](function(_0x41ad89){if(_0x41ad89){return _0x41ad89[_0x363b('0x71')](_0x10730e[_0x363b('0x38')][_0x363b('0x64')]);}})[_0x363b('0x2c')](respondWithStatusCode(_0x186f2a,null))[_0x363b('0x4e')](handleError(_0x186f2a,null));};exports[_0x363b('0x72')]=function(_0x5f13b0,_0x4fcd15){var _0x273b08={'raw':![],'where':{}};var _0x38b61f={};var _0x120373={'count':0x0,'rows':[]};var _0x4a2539=_0x5f13b0[_0x363b('0x38')][_0x363b('0x73')];if(typeof _0x4a2539===_0x363b('0x25')){throw new db[(_0x363b('0x74'))][(_0x363b('0x75'))](_0x363b('0x76'));}var _0x9a532=_0x5f13b0[_0x363b('0x38')][_0x363b('0x77')]||![];var _0x294bd1=getQueryModels(_0x4a2539,_0x9a532);if(typeof _0x294bd1[_0x363b('0x78')]==='undefined'){throw new db['Sequelize'][(_0x363b('0x75'))](_0x363b('0x79')+_0x4a2539+'\x27');}var _0x72fbe9=[];if(!_['isEmpty'](_0x294bd1[_0x363b('0x7a')])){_0x72fbe9=_0x294bd1[_0x363b('0x7a')];}else{_0x72fbe9=[{'name':_0x4a2539}];}return db[_0x363b('0x34')][_0x363b('0x6b')]({'where':{'id':_0x5f13b0['params']['id']}})[_0x363b('0x2c')](handleEntityNotFound(_0x4fcd15,null))[_0x363b('0x2c')](function(_0x49f567){if(_0x49f567){var _0x3a6d8f=[];for(var _0x504af9=0x0;_0x504af9<_0x72fbe9[_0x363b('0x4b')];_0x504af9++){_0x3a6d8f[_0x363b('0x6a')](db[_0x363b('0x59')][_0x363b('0x6b')]({'where':{'userProfileId':_0x49f567['id'],'name':_0x72fbe9[_0x504af9]['name']},'raw':!![]}));}return BPromise[_0x363b('0x7b')](_0x3a6d8f);}})[_0x363b('0x2c')](function(_0x39332d){var _0x4f0c20=_[_0x363b('0x44')](_0x39332d,function(_0x2ba6e7){return _0x2ba6e7?_0x2ba6e7:undefined;});var _0x3680fd=_[_0x363b('0x44')](_0x72fbe9,['ignore',!![]]);var _0x199f40=_['isEmpty'](_0x4f0c20)&&_['isEmpty'](_0x3680fd)?null:_[_0x363b('0x7c')](_0x3680fd,_0x4f0c20);if(_0x199f40){var _0x2c9cbf=[];for(var _0x3e9233=0x0;_0x3e9233<_0x199f40['length'];_0x3e9233++){var _0x5d49ec=_[_0x363b('0x4d')](_0x72fbe9,function(_0xca5f71){return _0x199f40[_0x3e9233]?_0xca5f71[_0x363b('0x30')]===_0x199f40[_0x3e9233][_0x363b('0x30')]:null;});if(_0x5d49ec){if(_0x199f40[_0x3e9233]['ignore']){_0x2c9cbf[_0x363b('0x6a')](getAllResources(_0x294bd1[_0x363b('0x78')],_0x199f40[_0x3e9233]));}else{if(!_0x199f40[_0x3e9233][_0x363b('0x5a')]){_0x2c9cbf[_0x363b('0x6a')](getAllowedResources(_0x5d49ec,_0x199f40[_0x3e9233],_0x294bd1[_0x363b('0x78')]));}else{if(_0x5d49ec[_0x363b('0x3b')]){_0x2c9cbf['push'](getAllFilteredResources(_0x5d49ec,_0x199f40[_0x3e9233]));}}}}}return BPromise['all'](_0x2c9cbf);}else{return null;}})[_0x363b('0x2c')](function(_0x44c83b){var _0x323b07=_0x44c83b;var _0x2e4fbe=null;if(_0x323b07){_0x2e4fbe=_0x323b07['length']===0x1?_0x323b07[0x0]:null;}if(_0x2e4fbe||_0x323b07){var _0x1b4991=db[_0x294bd1[_0x363b('0x78')]][_0x363b('0x52')];_0x38b61f[_0x363b('0x3b')]=_['keys'](_0x1b4991);_0x38b61f[_0x363b('0x38')]=_[_0x363b('0x39')](_0x5f13b0['query']);_0x38b61f['filters']=_[_0x363b('0x3a')](_0x38b61f['model'],_0x38b61f[_0x363b('0x38')]);_0x273b08['attributes']=_[_0x363b('0x3a')](_0x38b61f['model'],qs[_0x363b('0x3d')](_0x5f13b0[_0x363b('0x38')]['fields']));_0x273b08[_0x363b('0x3c')]=_0x273b08[_0x363b('0x3c')][_0x363b('0x4b')]?_0x273b08[_0x363b('0x3c')]:_0x38b61f[_0x363b('0x3b')];if(!_0x5f13b0[_0x363b('0x38')][_0x363b('0x3e')](_0x363b('0x3f'))){_0x273b08[_0x363b('0x26')]=qs[_0x363b('0x26')](_0x5f13b0[_0x363b('0x38')][_0x363b('0x26')]);_0x273b08[_0x363b('0x24')]=qs[_0x363b('0x24')](_0x5f13b0[_0x363b('0x38')][_0x363b('0x24')]);}_0x273b08[_0x363b('0x7d')]=qs['sort'](_0x5f13b0[_0x363b('0x38')][_0x363b('0x40')]);_0x273b08['where']=qs[_0x363b('0x43')](_[_0x363b('0x42')](_0x5f13b0[_0x363b('0x38')],_0x38b61f['filters']));if(_0x5f13b0['query'][_0x363b('0x44')]){_0x273b08[_0x363b('0x41')]=_[_0x363b('0x45')](_0x273b08[_0x363b('0x41')],{'$or':_[_0x363b('0x33')](_0x1b4991,function(_0x2643cb){if(_0x2643cb['type']['key']!==_0x363b('0x46')){var _0x20671={};_0x20671[_0x2643cb[_0x363b('0x7e')]]={'$like':'%'+_0x5f13b0[_0x363b('0x38')][_0x363b('0x44')]+'%'};return _0x20671;}})});}var _0x2c7d4d=[];if(_0x2e4fbe){var _0xc89fdf=_[_0x363b('0x4d')](_0x72fbe9,[_0x363b('0x30'),_0x2e4fbe[_0x363b('0x30')]]);if(_0xc89fdf[_0x363b('0x7e')]){var _0x4b206e={};if(_0x294bd1[_0x363b('0x78')]==='AnalyticExtractedReport'){_0x4b206e[_0xc89fdf[_0x363b('0x7f')]]=_[_0x363b('0x33')](_0x2e4fbe[_0x363b('0x80')],'id');}else{_0x4b206e[_0xc89fdf[_0x363b('0x7f')]]=_0x2e4fbe[_0x363b('0x80')];}_0x2c7d4d[_0x363b('0x6a')](_0x4b206e);}else{_0x273b08[_0x363b('0x41')]['id']=_0x2e4fbe['associatedResources'];}}else{for(var _0x18092a=0x0;_0x18092a<_0x323b07[_0x363b('0x4b')];_0x18092a++){var _0xc89fdf=_['find'](_0x72fbe9,[_0x363b('0x30'),_0x323b07[_0x18092a][_0x363b('0x30')]]);if(_0xc89fdf[_0x363b('0x7e')]){var _0x4b206e={};_0x4b206e[_0xc89fdf[_0x363b('0x7f')]]=_0x323b07[_0x18092a][_0x363b('0x80')];_0x2c7d4d['push'](_0x4b206e);}else{if(!_0x273b08['where']['id'])_0x273b08['where']['id']=[];_0x323b07[_0x18092a][_0x363b('0x80')][_0x363b('0x6c')](function(_0x4190bc){_0x273b08[_0x363b('0x41')]['id']['push'](_0x4190bc);});}}}if(!_[_0x363b('0x68')](_0x2c7d4d)){_0x273b08[_0x363b('0x41')]=_[_0x363b('0x45')](_0x273b08[_0x363b('0x41')],{'$and':{'$or':_0x2c7d4d}});}_0x273b08=_[_0x363b('0x45')]({},_0x273b08,_0x5f13b0[_0x363b('0x4c')]);if(_0x2e4fbe&&!_0x2e4fbe[_0x363b('0x5a')]&&_0x294bd1[_0x363b('0x78')]===_0x363b('0x81')){if(_0x5f13b0['query']['includeAll']){_0x273b08[_0x363b('0x48')]=[{'all':!![]}];}return db[_0x294bd1[_0x363b('0x78')]][_0x363b('0x49')](_0x273b08)[_0x363b('0x2c')](function(_0x4069ff){var _0x542fa0=[];_0x4069ff['forEach'](function(_0x58906c){var _0x36f6fd;switch(_0x58906c[_0x363b('0x82')]){case _0x363b('0x83'):_0x36f6fd=_['find'](_0x2e4fbe[_0x363b('0x80')],function(_0xff5606){return _0xff5606['id']===_0x58906c[_0x363b('0x84')]&&_0xff5606['type']===_0x363b('0x85');});break;case _0x363b('0x86'):_0x36f6fd=_[_0x363b('0x4d')](_0x2e4fbe[_0x363b('0x80')],function(_0x1c6c58){return _0x1c6c58['id']===_0x58906c[_0x363b('0x84')]&&_0x1c6c58[_0x363b('0x36')]===_0x363b('0x87');});break;}if(_0x36f6fd)_0x542fa0[_0x363b('0x6a')](_0x58906c);});_0x120373[_0x363b('0x27')]=_0x542fa0[_0x363b('0x4b')];_0x120373[_0x363b('0x88')]=_0x542fa0;return _0x120373;});}else{return db[_0x294bd1[_0x363b('0x78')]][_0x363b('0x27')]({'where':_0x273b08['where']})['then'](function(_0x20c9fc){_0x120373[_0x363b('0x27')]=_0x20c9fc;if(_0x5f13b0[_0x363b('0x38')][_0x363b('0x47')]){if(_0x294bd1['childModel']===_0x363b('0x89')){_0x273b08[_0x363b('0x48')]=[{'model':db[_0x363b('0x8a')],'as':_0x363b('0x8b'),'attributes':['id','name',_0x363b('0x8c')],'required':_0x5f13b0[_0x363b('0x38')][_0x363b('0x8d')]?!![]:![]},{'model':db[_0x363b('0x8a')],'as':_0x363b('0x8e'),'attributes':['id',_0x363b('0x30'),_0x363b('0x8c')],'through':_0x5f13b0[_0x363b('0x38')][_0x363b('0x8d')]?{'attributes':[],'where':{'TagId':_0x5f13b0[_0x363b('0x38')]['tag']||undefined}}:{},'required':_0x5f13b0[_0x363b('0x38')][_0x363b('0x8d')]?!![]:![]}];}else{_0x273b08[_0x363b('0x48')]=[{'all':!![]}];}}return db[_0x294bd1['childModel']][_0x363b('0x49')](_0x273b08);})[_0x363b('0x2c')](function(_0x42e76c){_0x120373[_0x363b('0x88')]=_0x42e76c;if(_0x4a2539===_0x363b('0x8f')&&_0x5f13b0[_0x363b('0x38')][_0x363b('0x90')]===_0x363b('0x91')){var _0xb96add=[];for(var _0x340c0d=0x0;_0x340c0d<_0x120373[_0x363b('0x88')][_0x363b('0x4b')];_0x340c0d++){_0xb96add['push'](getOpenTabs('chat',_0x120373['rows'][_0x340c0d][_0x363b('0x92')]));_0xb96add['push'](getOpenTabs(_0x363b('0x93'),_0x120373[_0x363b('0x88')][_0x340c0d]['dataValues']));_0xb96add[_0x363b('0x6a')](getOpenTabs(_0x363b('0x94'),_0x120373['rows'][_0x340c0d][_0x363b('0x92')]));_0xb96add['push'](getOpenTabs(_0x363b('0x95'),_0x120373[_0x363b('0x88')][_0x340c0d][_0x363b('0x92')]));_0xb96add[_0x363b('0x6a')](getOpenTabs(_0x363b('0x96'),_0x120373[_0x363b('0x88')][_0x340c0d]['dataValues']));_0xb96add[_0x363b('0x6a')](getOpenTabs(_0x363b('0x97'),_0x120373['rows'][_0x340c0d][_0x363b('0x92')]));}return Promise[_0x363b('0x7b')](_0xb96add)[_0x363b('0x2c')](function(){return _0x120373;});}return _0x120373;});}}else{return _0x120373;}})[_0x363b('0x2c')](respondWithFilteredResult(_0x4fcd15,_0x273b08))['catch'](handleError(_0x4fcd15,null));};function getOpenTabs(_0x5de355,_0x5869fd){var _0x4f9846=_0x5de355['charAt'](0x0)[_0x363b('0x98')]()+_0x5de355[_0x363b('0x99')](0x1);var _0x374f29={'type':db['Sequelize']['QueryTypes'][_0x363b('0x9a')],'raw':!![]};return new BPromise(function(_0x30336d,_0x4891a5){var _0x52652d=squel[_0x363b('0x9b')]()[_0x363b('0x7e')](_0x363b('0x9c')+_0x4f9846+_0x363b('0x9d'),'id')[_0x363b('0x7e')]('ui.createdAt')[_0x363b('0x9e')](_0x363b('0x9f')+_0x5de355+_0x363b('0xa0'),'ui')[_0x363b('0x41')](_0x363b('0xa1'),_0x5869fd['id']);return db['sequelize'][_0x363b('0x38')](_0x52652d[_0x363b('0xa2')](),_0x374f29)[_0x363b('0x2c')](function(_0x478aa9){_0x5869fd[_0x4f9846+_0x363b('0xa3')]=_0x478aa9;_0x30336d(_0x478aa9);})[_0x363b('0x4e')](function(_0x2a709f){_0x4891a5(_0x2a709f);});});}function getAllResources(_0x2eadee,_0xc0dd55){return new BPromise(function(_0x52dc4c,_0x1ad4f0){if(_0xc0dd55){var _0x273e76=_0xc0dd55['filter']?{[_0xc0dd55['filter'][_0x363b('0x7e')]]:_0xc0dd55[_0x363b('0x44')][_0x363b('0xa4')]}:undefined;return db[_0x2eadee]['findAll']({'where':_0x273e76,'raw':!![]})[_0x363b('0x2c')](function(_0x84ea03){_0xc0dd55['associatedResources']=_[_0x363b('0x33')](_0x84ea03,'id');_0x52dc4c(_0xc0dd55);})['catch'](function(_0x20ee78){_0x1ad4f0(_0x20ee78);});}else{_0x52dc4c(null);}});}function getAllFilteredResources(_0x1dca02,_0x46a3c0){return new BPromise(function(_0x2418c5,_0x2c1554){var _0x58cb59=_0x1dca02[_0x363b('0x44')]?{[_0x1dca02[_0x363b('0x44')][_0x363b('0x7e')]]:_0x1dca02[_0x363b('0x44')][_0x363b('0xa4')]}:undefined;return db[_0x1dca02[_0x363b('0x3b')]][_0x363b('0x49')]({'where':_0x58cb59,'raw':!![]})[_0x363b('0x2c')](function(_0x7df04a){_0x46a3c0[_0x363b('0x80')]=_['map'](_0x7df04a,function(_0x51918f){return _0x1dca02['field']?_0x51918f[_0x1dca02[_0x363b('0x7e')]]:_0x51918f[_0x363b('0x30')];});_0x2418c5(_0x46a3c0);})['catch'](function(_0x538669){_0x2c1554(_0x538669);});});}function getAllowedResources(_0xc76b84,_0x3b63b2,_0x227869){return new BPromise(function(_0x2cb1b9,_0x1ad7b5){if(_0x3b63b2){return db[_0x363b('0x5e')][_0x363b('0x49')]({'where':{'sectionId':_0x3b63b2['id']},'raw':!![]})['then'](function(_0x508cbb){if(_0xc76b84['field']&&_0xc76b84[_0x363b('0x7e')]!=='id'){_0x3b63b2[_0x363b('0x80')]=_['map'](_0x508cbb,function(_0x58a3bb){return _0x58a3bb[_0xc76b84['field']];});}else{if(_0x227869==='AnalyticExtractedReport'){_0x3b63b2[_0x363b('0x80')]=_[_0x363b('0x33')](_0x508cbb,function(_0x4e226f){return{'id':_0x4e226f['resourceId'],'type':_0x4e226f[_0x363b('0x36')]};});}else{_0x3b63b2[_0x363b('0x80')]=_[_0x363b('0x33')](_0x508cbb,function(_0x5c03e7){return _0x5c03e7[_0x363b('0x6d')];});}}_0x2cb1b9(_0x3b63b2);})[_0x363b('0x4e')](function(_0x2ea1c5){_0x1ad7b5(_0x2ea1c5);});}else{_0x2cb1b9(null);}});}function getQueryModels(_0xd9a8eb,_0x148434){var _0x8084e7=_0xd9a8eb['toLowerCase']();var _0x3c53f0={'childModel':undefined,'parentSections':[]};switch(_0x8084e7){case _0x363b('0xa5'):_0x3c53f0[_0x363b('0x78')]='SquareProject';break;case _0x363b('0xa6'):_0x3c53f0['childModel']=_0x363b('0xa7');break;case _0x363b('0xa8'):_0x3c53f0[_0x363b('0x78')]=_0x363b('0xa9');_0x3c53f0[_0x363b('0x7a')]=[{'name':_0x363b('0xaa'),'field':_0x363b('0x30'),'foreignKey':_0x363b('0xab')}];break;case _0x363b('0xac'):_0x3c53f0[_0x363b('0x78')]=_0x363b('0xad');break;case _0x363b('0xae'):_0x3c53f0[_0x363b('0x78')]=_0x363b('0x89');_0x3c53f0[_0x363b('0x7a')]=[{'name':'Lists','field':'id','foreignKey':_0x363b('0xaf')}];break;case _0x363b('0xb0'):_0x3c53f0[_0x363b('0x78')]=_0x363b('0xb1');break;case _0x363b('0xb2'):_0x3c53f0[_0x363b('0x78')]=_0x363b('0xb3');break;case _0x363b('0xb4'):_0x3c53f0[_0x363b('0x78')]=_0x363b('0xb5');break;case _0x363b('0xb6'):_0x3c53f0[_0x363b('0x78')]=_0x363b('0xb7');break;case _0x363b('0xb8'):_0x3c53f0[_0x363b('0x78')]='ChatWebsite';break;case _0x363b('0xb9'):_0x3c53f0['childModel']=_0x363b('0xba');break;case _0x363b('0xbb'):_0x3c53f0['childModel']='FaxAccount';break;case _0x363b('0xbc'):case _0x363b('0xbd'):case _0x363b('0xbe'):_0x3c53f0[_0x363b('0x78')]=_0x363b('0xbf');break;case _0x363b('0xc0'):_0x3c53f0[_0x363b('0x78')]='VoiceContext';break;case'voicemails':_0x3c53f0[_0x363b('0x78')]=_0x363b('0xc1');break;case _0x363b('0xc2'):_0x3c53f0[_0x363b('0x78')]=_0x363b('0xc3');_0x3c53f0[_0x363b('0x7a')]=[{'name':_0x363b('0x8f'),'field':_0x363b('0x30'),'foreignKey':_0x363b('0xc4'),'model':_0x363b('0xc5'),'filter':{'field':'role','value':[_0x363b('0xc6')]}},{'name':'Telephones','field':_0x363b('0x30'),'foreignKey':_0x363b('0xc4'),'model':_0x363b('0xc5'),'filter':{'field':'role','value':[_0x363b('0xc7')]}},{'name':'VoiceQueues','field':'name','foreignKey':_0x363b('0xc8'),'model':_0x363b('0xc9'),'filter':{'field':_0x363b('0x36'),'value':[_0x363b('0xca')]}},{'name':_0x363b('0xcb'),'field':'name','foreignKey':_0x363b('0xc8'),'model':_0x363b('0xc9'),'filter':{'field':_0x363b('0x36'),'value':['outbound']}}];break;case _0x363b('0xcc'):_0x3c53f0[_0x363b('0x78')]=_0x363b('0xcd');break;case _0x363b('0xce'):_0x3c53f0[_0x363b('0x78')]=_0x363b('0xcf');break;case _0x363b('0xd0'):_0x3c53f0[_0x363b('0x78')]=_0x363b('0xd1');break;case _0x363b('0xd2'):_0x3c53f0['childModel']=_0x363b('0xd3');break;case _0x363b('0xd4'):_0x3c53f0[_0x363b('0x78')]=_0x363b('0xd5');break;case _0x363b('0xd6'):_0x3c53f0[_0x363b('0x78')]=_0x363b('0xd7');break;case _0x363b('0xd8'):_0x3c53f0['childModel']='MailSubstatus';break;case _0x363b('0xd9'):_0x3c53f0['childModel']=_0x363b('0xda');break;case _0x363b('0xdb'):_0x3c53f0[_0x363b('0x78')]='OpenchannelAccount';break;case _0x363b('0xdc'):_0x3c53f0[_0x363b('0x78')]=_0x363b('0xdd');break;case'smsaccounts':_0x3c53f0[_0x363b('0x78')]='SmsAccount';break;case _0x363b('0xde'):_0x3c53f0[_0x363b('0x78')]=_0x363b('0xdf');break;case _0x363b('0xe0'):_0x3c53f0[_0x363b('0x78')]=_0x363b('0xe1');break;case _0x363b('0xe2'):case'queuecampaigns':_0x3c53f0[_0x363b('0x78')]='VoiceQueue';if(_0x148434){_0x3c53f0[_0x363b('0x7a')]=[{'name':_0x363b('0xe3')},{'name':_0x363b('0xcb')}];}break;case'users':case _0x363b('0xe4'):case _0x363b('0xe5'):_0x3c53f0[_0x363b('0x78')]='User';if(_0x148434){_0x3c53f0['parentSections']=[{'name':'Users','filter':{'field':_0x363b('0xe6'),'value':[_0x363b('0xe7'),'user']},'ignore':!![]},{'name':'Agents'},{'name':'Telephones'}];}break;case'zendeskaccounts':_0x3c53f0[_0x363b('0x78')]=_0x363b('0xe8');break;case _0x363b('0xe9'):_0x3c53f0['childModel']='SalesforceAccount';break;case _0x363b('0xea'):_0x3c53f0['childModel']=_0x363b('0xeb');break;case _0x363b('0xec'):_0x3c53f0[_0x363b('0x78')]='SugarcrmAccount';break;case _0x363b('0xed'):_0x3c53f0[_0x363b('0x78')]=_0x363b('0xee');break;case _0x363b('0xef'):_0x3c53f0[_0x363b('0x78')]=_0x363b('0xf0');break;case _0x363b('0xf1'):_0x3c53f0[_0x363b('0x78')]='User';break;case _0x363b('0xf2'):_0x3c53f0[_0x363b('0x78')]=_0x363b('0xf3');break;case _0x363b('0xf4'):_0x3c53f0['childModel']=_0x363b('0xf5');break;case'customdashboards':_0x3c53f0['childModel']=_0x363b('0xf6');break;case'intervals':_0x3c53f0[_0x363b('0x78')]=_0x363b('0xf7');break;case _0x363b('0xf8'):_0x3c53f0[_0x363b('0x78')]=_0x363b('0xf9');break;case _0x363b('0xfa'):_0x3c53f0[_0x363b('0x78')]='Schedule';break;case _0x363b('0xfb'):_0x3c53f0[_0x363b('0x78')]=_0x363b('0xfc');break;case _0x363b('0xfd'):_0x3c53f0[_0x363b('0x78')]=_0x363b('0x8a');break;case _0x363b('0xfe'):_0x3c53f0[_0x363b('0x78')]=_0x363b('0xff');break;case'triggers':_0x3c53f0[_0x363b('0x78')]='Trigger';break;case'trunks':_0x3c53f0[_0x363b('0x78')]=_0x363b('0x100');break;case _0x363b('0x101'):_0x3c53f0[_0x363b('0x78')]='Variable';break;case _0x363b('0x102'):_0x3c53f0[_0x363b('0x78')]=_0x363b('0x6e');break;case _0x363b('0x103'):_0x3c53f0['childModel']='AnalyticExtractedReport';_0x3c53f0['parentSections']=[{'name':_0x363b('0x104'),'field':'id','foreignKey':_0x363b('0x84')}];break;case _0x363b('0x105'):_0x3c53f0[_0x363b('0x78')]=_0x363b('0x106');break;case'whatsappaccounts':_0x3c53f0[_0x363b('0x78')]='WhatsappAccount';break;case _0x363b('0x107'):_0x3c53f0[_0x363b('0x78')]=_0x363b('0x108');_0x3c53f0[_0x363b('0x7a')]=[{'name':_0x363b('0x8f'),'field':'id','foreignKey':_0x363b('0x109'),'model':_0x363b('0xc5'),'filter':{'field':_0x363b('0xe6'),'value':[_0x363b('0xc6')]}},{'name':'Telephones','field':'id','foreignKey':_0x363b('0x109'),'model':_0x363b('0xc5'),'filter':{'field':'role','value':[_0x363b('0xc7')]}}];break;default:return _0x3c53f0;}return _0x3c53f0;} \ No newline at end of file diff --git a/server/api/userProfile/userProfile.events.js b/server/api/userProfile/userProfile.events.js index 3496cbc..3276cf9 100644 --- a/server/api/userProfile/userProfile.events.js +++ b/server/api/userProfile/userProfile.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa423=['remove','emit','hasOwnProperty','exports','events','../../mysqldb','UserProfile','setMaxListeners','save'];(function(_0x11bb30,_0xd2b70d){var _0x4b64eb=function(_0x42c984){while(--_0x42c984){_0x11bb30['push'](_0x11bb30['shift']());}};_0x4b64eb(++_0xd2b70d);}(_0xa423,0x16c));var _0x3a42=function(_0x30c106,_0x4eafa9){_0x30c106=_0x30c106-0x0;var _0xfbcc47=_0xa423[_0x30c106];return _0xfbcc47;};'use strict';var EventEmitter=require(_0x3a42('0x0'));var UserProfile=require(_0x3a42('0x1'))['db'][_0x3a42('0x2')];var UserProfileEvents=new EventEmitter();UserProfileEvents[_0x3a42('0x3')](0x0);var events={'afterCreate':_0x3a42('0x4'),'afterUpdate':'update','afterDestroy':_0x3a42('0x5')};function emitEvent(_0x857de4){return function(_0x5c4f6a,_0xc6780b,_0x33f87e){UserProfileEvents[_0x3a42('0x6')](_0x857de4+':'+_0x5c4f6a['id'],_0x5c4f6a);UserProfileEvents[_0x3a42('0x6')](_0x857de4,_0x5c4f6a);_0x33f87e(null);};}for(var e in events){if(events[_0x3a42('0x7')](e)){var event=events[e];UserProfile['hook'](e,emitEvent(event));}}module[_0x3a42('0x8')]=UserProfileEvents; \ No newline at end of file +var _0xba6f=['update','remove','emit','hasOwnProperty','hook','events','UserProfile','setMaxListeners','save'];(function(_0x2a2f97,_0xdafb8d){var _0x4bf22b=function(_0x2d2eb4){while(--_0x2d2eb4){_0x2a2f97['push'](_0x2a2f97['shift']());}};_0x4bf22b(++_0xdafb8d);}(_0xba6f,0x1d0));var _0xfba6=function(_0x4a973e,_0x29034b){_0x4a973e=_0x4a973e-0x0;var _0x36b56e=_0xba6f[_0x4a973e];return _0x36b56e;};'use strict';var EventEmitter=require(_0xfba6('0x0'));var UserProfile=require('../../mysqldb')['db'][_0xfba6('0x1')];var UserProfileEvents=new EventEmitter();UserProfileEvents[_0xfba6('0x2')](0x0);var events={'afterCreate':_0xfba6('0x3'),'afterUpdate':_0xfba6('0x4'),'afterDestroy':_0xfba6('0x5')};function emitEvent(_0x2c6e98){return function(_0x3b4dda,_0x3d2803,_0x1bbeb5){UserProfileEvents[_0xfba6('0x6')](_0x2c6e98+':'+_0x3b4dda['id'],_0x3b4dda);UserProfileEvents[_0xfba6('0x6')](_0x2c6e98,_0x3b4dda);_0x1bbeb5(null);};}for(var e in events){if(events[_0xfba6('0x7')](e)){var event=events[e];UserProfile[_0xfba6('0x8')](e,emitEvent(event));}}module['exports']=UserProfileEvents; \ No newline at end of file diff --git a/server/api/userProfile/userProfile.model.js b/server/api/userProfile/userProfile.model.js index f6a6dde..b71d7ef 100644 --- a/server/api/userProfile/userProfile.model.js +++ b/server/api/userProfile/userProfile.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7217=['user_profiles','models','User','update','then','catch','lodash','../../config/logger','api','moment','bluebird','request-promise','../../config/environment','./userProfile.attributes','exports','define','UserProfile'];(function(_0xe19752,_0x2091b9){var _0x1a416c=function(_0x47df69){while(--_0x47df69){_0xe19752['push'](_0xe19752['shift']());}};_0x1a416c(++_0x2091b9);}(_0x7217,0x19e));var _0x7721=function(_0x4243a3,_0x447337){_0x4243a3=_0x4243a3-0x0;var _0x1b2a33=_0x7217[_0x4243a3];return _0x1b2a33;};'use strict';var _=require(_0x7721('0x0'));var util=require('util');var logger=require(_0x7721('0x1'))(_0x7721('0x2'));var moment=require(_0x7721('0x3'));var BPromise=require(_0x7721('0x4'));var rp=require(_0x7721('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x7721('0x6'));var attributes=require(_0x7721('0x7'));module[_0x7721('0x8')]=function(_0x3fe47c,_0xb239e0){return _0x3fe47c[_0x7721('0x9')](_0x7721('0xa'),attributes,{'tableName':_0x7721('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterUpdate':function(_0x225610,_0x2f99ed,_0x3e6368){var _0x2a66cb=_0x3fe47c[_0x7721('0xc')];_0x2a66cb[_0x7721('0xd')][_0x7721('0xe')]({'privacyEnabled':_0x225610['privacyEnabled']},{'where':{'UserProfileId':_0x225610['id']}})[_0x7721('0xf')](function(){_0x3e6368();})[_0x7721('0x10')](function(_0x8729a6){_0x3e6368(_0x8729a6);});}}});}; \ No newline at end of file +var _0x34e8=['bluebird','request-promise','path','rimraf','../../config/environment','./userProfile.attributes','exports','UserProfile','user_profiles','models','User','update','privacyEnabled','then','catch','lodash','util','../../config/logger','api'];(function(_0xc633e9,_0x1b826d){var _0xbca897=function(_0x83a29){while(--_0x83a29){_0xc633e9['push'](_0xc633e9['shift']());}};_0xbca897(++_0x1b826d);}(_0x34e8,0x12c));var _0x834e=function(_0x3f625f,_0x2d3e28){_0x3f625f=_0x3f625f-0x0;var _0x539bfd=_0x34e8[_0x3f625f];return _0x539bfd;};'use strict';var _=require(_0x834e('0x0'));var util=require(_0x834e('0x1'));var logger=require(_0x834e('0x2'))(_0x834e('0x3'));var moment=require('moment');var BPromise=require(_0x834e('0x4'));var rp=require(_0x834e('0x5'));var fs=require('fs');var path=require(_0x834e('0x6'));var rimraf=require(_0x834e('0x7'));var config=require(_0x834e('0x8'));var attributes=require(_0x834e('0x9'));module[_0x834e('0xa')]=function(_0x4a2018,_0x858aa1){return _0x4a2018['define'](_0x834e('0xb'),attributes,{'tableName':_0x834e('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterUpdate':function(_0x3a3ef6,_0x2e69e2,_0x33ea05){var _0x23501c=_0x4a2018[_0x834e('0xd')];_0x23501c[_0x834e('0xe')][_0x834e('0xf')]({'privacyEnabled':_0x3a3ef6[_0x834e('0x10')]},{'where':{'UserProfileId':_0x3a3ef6['id']}})[_0x834e('0x11')](function(){_0x33ea05();})[_0x834e('0x12')](function(_0x14038b){_0x33ea05(_0x14038b);});}}});}; \ No newline at end of file diff --git a/server/api/userProfile/userProfile.rpc.js b/server/api/userProfile/userProfile.rpc.js index eeffe65..d5abad7 100644 --- a/server/api/userProfile/userProfile.rpc.js +++ b/server/api/userProfile/userProfile.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x11c8=['request\x20sent','result','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','redis','defaults','localhost','register','request','then','info','UserProfile,\x20%s,\x20%s','UserProfile,\x20%s,\x20%s,\x20%s','stringify','error','message'];(function(_0x4b369d,_0x265eb8){var _0x571a98=function(_0x56341a){while(--_0x56341a){_0x4b369d['push'](_0x4b369d['shift']());}};_0x571a98(++_0x265eb8);}(_0x11c8,0x19a));var _0x811c=function(_0x3f4ba6,_0x133cd6){_0x3f4ba6=_0x3f4ba6-0x0;var _0x4fa5a3=_0x11c8[_0x3f4ba6];return _0x4fa5a3;};'use strict';var _=require('lodash');var util=require(_0x811c('0x0'));var moment=require(_0x811c('0x1'));var BPromise=require('bluebird');var rs=require(_0x811c('0x2'));var fs=require('fs');var Redis=require(_0x811c('0x3'));var db=require(_0x811c('0x4'))['db'];var utils=require(_0x811c('0x5'));var logger=require(_0x811c('0x6'))(_0x811c('0x7'));var config=require('../../config/environment');var jayson=require(_0x811c('0x8'));var client=jayson[_0x811c('0x9')]['http']({'port':0x232a});config[_0x811c('0xa')]=_[_0x811c('0xb')](config[_0x811c('0xa')],{'host':_0x811c('0xc'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require('./userProfile.socket')[_0x811c('0xd')](socket);function respondWithRpcPromise(_0x4940a4,_0x4ce7c4,_0x270b6e){return new BPromise(function(_0x237b5d,_0x4b6970){return client[_0x811c('0xe')](_0x4940a4,_0x270b6e)[_0x811c('0xf')](function(_0x226dc6){logger[_0x811c('0x10')](_0x811c('0x11'),_0x4ce7c4,'request\x20sent');logger['debug'](_0x811c('0x12'),_0x4ce7c4,'request\x20sent',JSON[_0x811c('0x13')](_0x226dc6));if(_0x226dc6[_0x811c('0x14')]){if(_0x226dc6['error']['code']===0x1f4){logger[_0x811c('0x14')](_0x811c('0x11'),_0x4ce7c4,_0x226dc6[_0x811c('0x14')][_0x811c('0x15')]);return _0x4b6970(_0x226dc6[_0x811c('0x14')][_0x811c('0x15')]);}logger['error']('UserProfile,\x20%s,\x20%s',_0x4ce7c4,_0x226dc6[_0x811c('0x14')][_0x811c('0x15')]);return _0x237b5d(_0x226dc6[_0x811c('0x14')][_0x811c('0x15')]);}else{logger[_0x811c('0x10')](_0x811c('0x11'),_0x4ce7c4,_0x811c('0x16'));_0x237b5d(_0x226dc6[_0x811c('0x17')][_0x811c('0x15')]);}})['catch'](function(_0xb8a210){logger['error'](_0x811c('0x11'),_0x4ce7c4,_0xb8a210);_0x4b6970(_0xb8a210);});});} \ No newline at end of file +var _0xe2fe=['../../config/utils','../../config/logger','rpc','jayson/promise','client','redis','defaults','localhost','./userProfile.socket','then','request\x20sent','debug','UserProfile,\x20%s,\x20%s,\x20%s','stringify','error','code','UserProfile,\x20%s,\x20%s','message','info','lodash','bluebird','ioredis','../../mysqldb'];(function(_0x1856d4,_0x3ff712){var _0x1fb47f=function(_0x4a0369){while(--_0x4a0369){_0x1856d4['push'](_0x1856d4['shift']());}};_0x1fb47f(++_0x3ff712);}(_0xe2fe,0x86));var _0xee2f=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xe2fe[_0x14add3];return _0x4a174f;};'use strict';var _=require(_0xee2f('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xee2f('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xee2f('0x2'));var db=require(_0xee2f('0x3'))['db'];var utils=require(_0xee2f('0x4'));var logger=require(_0xee2f('0x5'))(_0xee2f('0x6'));var config=require('../../config/environment');var jayson=require(_0xee2f('0x7'));var client=jayson[_0xee2f('0x8')]['http']({'port':0x232a});config[_0xee2f('0x9')]=_[_0xee2f('0xa')](config['redis'],{'host':_0xee2f('0xb'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xee2f('0x9')]));require(_0xee2f('0xc'))['register'](socket);function respondWithRpcPromise(_0x3a49bb,_0x43f451,_0x4bf3c3){return new BPromise(function(_0x5597ea,_0x4818df){return client['request'](_0x3a49bb,_0x4bf3c3)[_0xee2f('0xd')](function(_0x4cb4bf){logger['info']('UserProfile,\x20%s,\x20%s',_0x43f451,_0xee2f('0xe'));logger[_0xee2f('0xf')](_0xee2f('0x10'),_0x43f451,_0xee2f('0xe'),JSON[_0xee2f('0x11')](_0x4cb4bf));if(_0x4cb4bf[_0xee2f('0x12')]){if(_0x4cb4bf['error'][_0xee2f('0x13')]===0x1f4){logger['error'](_0xee2f('0x14'),_0x43f451,_0x4cb4bf[_0xee2f('0x12')]['message']);return _0x4818df(_0x4cb4bf[_0xee2f('0x12')][_0xee2f('0x15')]);}logger[_0xee2f('0x12')](_0xee2f('0x14'),_0x43f451,_0x4cb4bf[_0xee2f('0x12')]['message']);return _0x5597ea(_0x4cb4bf[_0xee2f('0x12')]['message']);}else{logger[_0xee2f('0x16')](_0xee2f('0x14'),_0x43f451,'request\x20sent');_0x5597ea(_0x4cb4bf['result'][_0xee2f('0x15')]);}})['catch'](function(_0x69db88){logger[_0xee2f('0x12')](_0xee2f('0x14'),_0x43f451,_0x69db88);_0x4818df(_0x69db88);});});} \ No newline at end of file diff --git a/server/api/userProfile/userProfile.socket.js b/server/api/userProfile/userProfile.socket.js index 7e4e9f1..7bd9e43 100644 --- a/server/api/userProfile/userProfile.socket.js +++ b/server/api/userProfile/userProfile.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd24a=['emit','removeListener','register','length','./userProfile.events'];(function(_0x2d5934,_0x1acc4f){var _0x5807c8=function(_0x326cc5){while(--_0x326cc5){_0x2d5934['push'](_0x2d5934['shift']());}};_0x5807c8(++_0x1acc4f);}(_0xd24a,0x130));var _0xad24=function(_0x552a43,_0x365bc7){_0x552a43=_0x552a43-0x0;var _0x12effe=_0xd24a[_0x552a43];return _0x12effe;};'use strict';var UserProfileEvents=require(_0xad24('0x0'));var events=['save','remove','update'];function createListener(_0x39324a,_0x241d0a){return function(_0x57c6a0){_0x241d0a[_0xad24('0x1')](_0x39324a,_0x57c6a0);};}function removeListener(_0x4ff59f,_0x10deee){return function(){UserProfileEvents[_0xad24('0x2')](_0x4ff59f,_0x10deee);};}exports[_0xad24('0x3')]=function(_0x4afa9e){for(var _0x32ec62=0x0,_0x1bb653=events[_0xad24('0x4')];_0x32ec62<_0x1bb653;_0x32ec62++){var _0x191323=events[_0x32ec62];var _0xcae80e=createListener('userProfile:'+_0x191323,_0x4afa9e);UserProfileEvents['on'](_0x191323,_0xcae80e);}}; \ No newline at end of file +var _0x3926=['save','remove','emit','userProfile:'];(function(_0x2bb8b5,_0x4eb756){var _0x4131b5=function(_0x533e6d){while(--_0x533e6d){_0x2bb8b5['push'](_0x2bb8b5['shift']());}};_0x4131b5(++_0x4eb756);}(_0x3926,0x1e4));var _0x6392=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x3926[_0x3dd15e];return _0x231fd0;};'use strict';var UserProfileEvents=require('./userProfile.events');var events=[_0x6392('0x0'),_0x6392('0x1'),'update'];function createListener(_0x18e3fd,_0x181f1b){return function(_0x15b96f){_0x181f1b[_0x6392('0x2')](_0x18e3fd,_0x15b96f);};}function removeListener(_0x165abc,_0x3b0cc7){return function(){UserProfileEvents['removeListener'](_0x165abc,_0x3b0cc7);};}exports['register']=function(_0x3a4601){for(var _0x1f0c70=0x0,_0x964203=events['length'];_0x1f0c70<_0x964203;_0x1f0c70++){var _0x40650d=events[_0x1f0c70];var _0x11d667=createListener(_0x6392('0x3')+_0x40650d,_0x3a4601);UserProfileEvents['on'](_0x40650d,_0x11d667);}}; \ No newline at end of file diff --git a/server/api/userProfileResource/index.js b/server/api/userProfileResource/index.js index 22ae383..aa3bede 100644 --- a/server/api/userProfileResource/index.js +++ b/server/api/userProfileResource/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3c51=['./userProfileResource.controller','isAuthenticated','index','get','/:id','post','update','destroy','exports','multer','util','path','express','Router','fs-extra','../../components/interaction/service'];(function(_0x15440a,_0x56c0ce){var _0x4a7367=function(_0x5f1a5a){while(--_0x5f1a5a){_0x15440a['push'](_0x15440a['shift']());}};_0x4a7367(++_0x56c0ce);}(_0x3c51,0x109));var _0x13c5=function(_0x471851,_0x276c7b){_0x471851=_0x471851-0x0;var _0xbd91bb=_0x3c51[_0x471851];return _0xbd91bb;};'use strict';var multer=require(_0x13c5('0x0'));var util=require(_0x13c5('0x1'));var path=require(_0x13c5('0x2'));var timeout=require('connect-timeout');var express=require(_0x13c5('0x3'));var router=express[_0x13c5('0x4')]();var fs_extra=require(_0x13c5('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x13c5('0x6'));var config=require('../../config/environment');var controller=require(_0x13c5('0x7'));router['get']('/',auth[_0x13c5('0x8')](),controller[_0x13c5('0x9')]);router[_0x13c5('0xa')]('/describe',auth[_0x13c5('0x8')](),controller['describe']);router[_0x13c5('0xa')](_0x13c5('0xb'),auth[_0x13c5('0x8')](),controller['show']);router[_0x13c5('0xc')]('/',auth[_0x13c5('0x8')](),controller['create']);router['put'](_0x13c5('0xb'),auth['isAuthenticated'](),controller[_0x13c5('0xd')]);router['delete']('/:id',auth[_0x13c5('0x8')](),controller[_0x13c5('0xe')]);module[_0x13c5('0xf')]=router; \ No newline at end of file +var _0x8039=['update','delete','destroy','exports','util','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./userProfileResource.controller','get','isAuthenticated','index','describe','/:id','show','create','put'];(function(_0x1af1af,_0xefe1ff){var _0x2743cb=function(_0x4362a7){while(--_0x4362a7){_0x1af1af['push'](_0x1af1af['shift']());}};_0x2743cb(++_0xefe1ff);}(_0x8039,0xcc));var _0x9803=function(_0x5e3701,_0x596265){_0x5e3701=_0x5e3701-0x0;var _0x345dcf=_0x8039[_0x5e3701];return _0x345dcf;};'use strict';var multer=require('multer');var util=require(_0x9803('0x0'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x9803('0x1'));var router=express[_0x9803('0x2')]();var fs_extra=require(_0x9803('0x3'));var auth=require(_0x9803('0x4'));var interaction=require(_0x9803('0x5'));var config=require(_0x9803('0x6'));var controller=require(_0x9803('0x7'));router[_0x9803('0x8')]('/',auth[_0x9803('0x9')](),controller[_0x9803('0xa')]);router[_0x9803('0x8')]('/describe',auth['isAuthenticated'](),controller[_0x9803('0xb')]);router['get'](_0x9803('0xc'),auth[_0x9803('0x9')](),controller[_0x9803('0xd')]);router['post']('/',auth[_0x9803('0x9')](),controller[_0x9803('0xe')]);router[_0x9803('0xf')](_0x9803('0xc'),auth[_0x9803('0x9')](),controller[_0x9803('0x10')]);router[_0x9803('0x11')](_0x9803('0xc'),auth[_0x9803('0x9')](),controller[_0x9803('0x12')]);module[_0x9803('0x13')]=router; \ No newline at end of file diff --git a/server/api/userProfileResource/userProfileResource.attributes.js b/server/api/userProfileResource/userProfileResource.attributes.js index 12d7b1d..c62570c 100644 --- a/server/api/userProfileResource/userProfileResource.attributes.js +++ b/server/api/userProfileResource/userProfileResource.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3b8e=['STRING','INTEGER','exports'];(function(_0x4ec90d,_0x5f80cb){var _0x371da6=function(_0x186a68){while(--_0x186a68){_0x4ec90d['push'](_0x4ec90d['shift']());}};_0x371da6(++_0x5f80cb);}(_0x3b8e,0xef));var _0xe3b8=function(_0x20a74e,_0x26c09d){_0x20a74e=_0x20a74e-0x0;var _0x513e0f=_0x3b8e[_0x20a74e];return _0x513e0f;};'use strict';var Sequelize=require('sequelize');module[_0xe3b8('0x0')]={'name':{'type':Sequelize[_0xe3b8('0x1')],'allowNull':![]},'resourceId':{'type':Sequelize[_0xe3b8('0x2')],'allowNull':![]},'type':{'type':Sequelize[_0xe3b8('0x1')],'allowNull':![]}}; \ No newline at end of file +var _0xf4ba=['STRING','INTEGER','sequelize','exports'];(function(_0x29e78b,_0x5bc003){var _0x26e2b1=function(_0x49360c){while(--_0x49360c){_0x29e78b['push'](_0x29e78b['shift']());}};_0x26e2b1(++_0x5bc003);}(_0xf4ba,0x116));var _0xaf4b=function(_0x2b8b16,_0x2926d5){_0x2b8b16=_0x2b8b16-0x0;var _0x7c0ffe=_0xf4ba[_0x2b8b16];return _0x7c0ffe;};'use strict';var Sequelize=require(_0xaf4b('0x0'));module[_0xaf4b('0x1')]={'name':{'type':Sequelize[_0xaf4b('0x2')],'allowNull':![]},'resourceId':{'type':Sequelize[_0xaf4b('0x3')],'allowNull':![]},'type':{'type':Sequelize[_0xaf4b('0x2')],'allowNull':![]}}; \ No newline at end of file diff --git a/server/api/userProfileResource/userProfileResource.controller.js b/server/api/userProfileResource/userProfileResource.controller.js index 01b73cd..3b75c14 100644 --- a/server/api/userProfileResource/userProfileResource.controller.js +++ b/server/api/userProfileResource/userProfileResource.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x187d=['zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','to-csv','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','undefined','count','offset','limit','set','Content-Range','apply','update','destroy','error','stack','name','index','map','UserProfileResource','rawAttributes','fieldName','type','query','keys','filters','intersection','model','attributes','length','hasOwnProperty','where','filter','merge','includeAll','include','findAll','then','rows','catch','show','params','fields','options','find','create','body','describe','eml-format'];(function(_0x14391c,_0x37bce7){var _0xb0f045=function(_0x38b704){while(--_0x38b704){_0x14391c['push'](_0x14391c['shift']());}};_0xb0f045(++_0x37bce7);}(_0x187d,0x93));var _0xd187=function(_0x3a6efd,_0x2a5102){_0x3a6efd=_0x3a6efd-0x0;var _0x487b9a=_0x187d[_0x3a6efd];return _0x487b9a;};'use strict';var emlformat=require(_0xd187('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xd187('0x1'));var jsonpatch=require(_0xd187('0x2'));var rp=require(_0xd187('0x3'));var moment=require(_0xd187('0x4'));var BPromise=require(_0xd187('0x5'));var Mustache=require(_0xd187('0x6'));var util=require('util');var path=require(_0xd187('0x7'));var sox=require(_0xd187('0x8'));var csv=require('to-csv');var ejs=require(_0xd187('0x9'));var fs=require('fs');var fs_extra=require(_0xd187('0xa'));var _=require(_0xd187('0xb'));var squel=require(_0xd187('0xc'));var crypto=require(_0xd187('0xd'));var jsforce=require(_0xd187('0xe'));var deskjs=require(_0xd187('0xf'));var toCsv=require(_0xd187('0x10'));var querystring=require('querystring');var Papa=require(_0xd187('0x11'));var Redis=require(_0xd187('0x12'));var authService=require(_0xd187('0x13'));var qs=require(_0xd187('0x14'));var as=require(_0xd187('0x15'));var hardwareService=require(_0xd187('0x16'));var logger=require('../../config/logger')(_0xd187('0x17'));var utils=require(_0xd187('0x18'));var config=require(_0xd187('0x19'));var licenseUtil=require('../../config/license/util');var db=require(_0xd187('0x1a'))['db'];function respondWithStatusCode(_0x4545cf,_0x32ba07){_0x32ba07=_0x32ba07||0xcc;return function(_0x59ee4a){if(_0x59ee4a){return _0x4545cf[_0xd187('0x1b')](_0x32ba07);}return _0x4545cf[_0xd187('0x1c')](_0x32ba07)[_0xd187('0x1d')]();};}function respondWithResult(_0x126d1a,_0x517b25){_0x517b25=_0x517b25||0xc8;return function(_0x39a927){if(_0x39a927){return _0x126d1a[_0xd187('0x1c')](_0x517b25)[_0xd187('0x1e')](_0x39a927);}};}function respondWithFilteredResult(_0x188cfe,_0x4c8f68){return function(_0x245d3e){if(_0x245d3e){var _0x52a208=typeof _0x4c8f68['offset']===_0xd187('0x1f')&&typeof _0x4c8f68['limit']==='undefined';var _0x207b36=_0x245d3e[_0xd187('0x20')];var _0x374fe0=_0x52a208?0x0:_0x4c8f68[_0xd187('0x21')];var _0x21df74=_0x52a208?_0x245d3e[_0xd187('0x20')]:_0x4c8f68[_0xd187('0x21')]+_0x4c8f68[_0xd187('0x22')];var _0x4f2f88;if(_0x21df74>=_0x207b36){_0x21df74=_0x207b36;_0x4f2f88=0xc8;}else{_0x4f2f88=0xce;}_0x188cfe[_0xd187('0x1c')](_0x4f2f88);return _0x188cfe[_0xd187('0x23')](_0xd187('0x24'),_0x374fe0+'-'+_0x21df74+'/'+_0x207b36)[_0xd187('0x1e')](_0x245d3e);}return null;};}function patchUpdates(_0x5204ee){return function(_0x2f7fb3){try{jsonpatch[_0xd187('0x25')](_0x2f7fb3,_0x5204ee,!![]);}catch(_0xc5bba5){return BPromise['reject'](_0xc5bba5);}return _0x2f7fb3['save']();};}function saveUpdates(_0x57cf1d,_0x435d94){return function(_0x33741d){if(_0x33741d){return _0x33741d[_0xd187('0x26')](_0x57cf1d)['then'](function(_0x2c07c8){return _0x2c07c8;});}return null;};}function removeEntity(_0x57186b,_0x145771){return function(_0x5a7a23){if(_0x5a7a23){return _0x5a7a23[_0xd187('0x27')]()['then'](function(){_0x57186b['status'](0xcc)[_0xd187('0x1d')]();});}};}function handleEntityNotFound(_0x4d992b,_0x12da33){return function(_0x598aa4){if(!_0x598aa4){_0x4d992b['sendStatus'](0x194);}return _0x598aa4;};}function handleError(_0x4eac6a,_0x848ddd){_0x848ddd=_0x848ddd||0x1f4;return function(_0xeff822){logger[_0xd187('0x28')](_0xeff822[_0xd187('0x29')]);if(_0xeff822['name']){delete _0xeff822[_0xd187('0x2a')];}_0x4eac6a[_0xd187('0x1c')](_0x848ddd)['send'](_0xeff822);};}exports[_0xd187('0x2b')]=function(_0x1c87ee,_0x34febe){var _0x4c50a5={},_0x15e2e8={},_0x56e292={'count':0x0,'rows':[]};var _0x263e31=_[_0xd187('0x2c')](db[_0xd187('0x2d')][_0xd187('0x2e')],function(_0x489f2e){return{'name':_0x489f2e[_0xd187('0x2f')],'type':_0x489f2e[_0xd187('0x30')]['key']};});_0x15e2e8['model']=_[_0xd187('0x2c')](_0x263e31,_0xd187('0x2a'));_0x15e2e8[_0xd187('0x31')]=_[_0xd187('0x32')](_0x1c87ee[_0xd187('0x31')]);_0x15e2e8[_0xd187('0x33')]=_[_0xd187('0x34')](_0x15e2e8[_0xd187('0x35')],_0x15e2e8['query']);_0x4c50a5[_0xd187('0x36')]=_[_0xd187('0x34')](_0x15e2e8[_0xd187('0x35')],qs['fields'](_0x1c87ee[_0xd187('0x31')]['fields']));_0x4c50a5[_0xd187('0x36')]=_0x4c50a5[_0xd187('0x36')][_0xd187('0x37')]?_0x4c50a5['attributes']:_0x15e2e8['model'];if(!_0x1c87ee[_0xd187('0x31')][_0xd187('0x38')]('nolimit')){_0x4c50a5[_0xd187('0x22')]=qs[_0xd187('0x22')](_0x1c87ee[_0xd187('0x31')]['limit']);_0x4c50a5['offset']=qs[_0xd187('0x21')](_0x1c87ee[_0xd187('0x31')]['offset']);}_0x4c50a5['order']=qs['sort'](_0x1c87ee[_0xd187('0x31')]['sort']);_0x4c50a5[_0xd187('0x39')]=qs[_0xd187('0x33')](_['pick'](_0x1c87ee[_0xd187('0x31')],_0x15e2e8['filters']),_0x263e31);if(_0x1c87ee[_0xd187('0x31')][_0xd187('0x3a')]){_0x4c50a5['where']=_[_0xd187('0x3b')](_0x4c50a5[_0xd187('0x39')],{'$or':_['map'](_0x263e31,function(_0x4399a5){if(_0x4399a5['type']!=='VIRTUAL'){var _0x26b06d={};_0x26b06d[_0x4399a5[_0xd187('0x2a')]]={'$like':'%'+_0x1c87ee[_0xd187('0x31')][_0xd187('0x3a')]+'%'};return _0x26b06d;}})});}_0x4c50a5=_[_0xd187('0x3b')]({},_0x4c50a5,_0x1c87ee['options']);var _0x8860c={'where':_0x4c50a5[_0xd187('0x39')]};return db[_0xd187('0x2d')]['count'](_0x8860c)['then'](function(_0x538c05){_0x56e292['count']=_0x538c05;if(_0x1c87ee[_0xd187('0x31')][_0xd187('0x3c')]){_0x4c50a5[_0xd187('0x3d')]=[{'all':!![]}];}return db[_0xd187('0x2d')][_0xd187('0x3e')](_0x4c50a5);})[_0xd187('0x3f')](function(_0x4699e1){_0x56e292[_0xd187('0x40')]=_0x4699e1;return _0x56e292;})['then'](respondWithFilteredResult(_0x34febe,_0x4c50a5))[_0xd187('0x41')](handleError(_0x34febe,null));};exports[_0xd187('0x42')]=function(_0x31d9d2,_0x51c7fc){var _0x21cbf6={'raw':![],'where':{'id':_0x31d9d2[_0xd187('0x43')]['id']}},_0x48c100={};_0x48c100[_0xd187('0x35')]=_[_0xd187('0x32')](db[_0xd187('0x2d')][_0xd187('0x2e')]);_0x48c100['query']=_[_0xd187('0x32')](_0x31d9d2[_0xd187('0x31')]);_0x48c100[_0xd187('0x33')]=_[_0xd187('0x34')](_0x48c100['model'],_0x48c100[_0xd187('0x31')]);_0x21cbf6[_0xd187('0x36')]=_['intersection'](_0x48c100[_0xd187('0x35')],qs[_0xd187('0x44')](_0x31d9d2['query']['fields']));_0x21cbf6[_0xd187('0x36')]=_0x21cbf6[_0xd187('0x36')]['length']?_0x21cbf6['attributes']:_0x48c100['model'];if(_0x31d9d2[_0xd187('0x31')][_0xd187('0x3c')]){_0x21cbf6[_0xd187('0x3d')]=[{'all':!![]}];}_0x21cbf6=_[_0xd187('0x3b')]({},_0x21cbf6,_0x31d9d2[_0xd187('0x45')]);return db[_0xd187('0x2d')][_0xd187('0x46')](_0x21cbf6)['then'](handleEntityNotFound(_0x51c7fc,null))[_0xd187('0x3f')](respondWithResult(_0x51c7fc,null))[_0xd187('0x41')](handleError(_0x51c7fc,null));};exports[_0xd187('0x47')]=function(_0x3ce4a1,_0x3f5def){return db[_0xd187('0x2d')][_0xd187('0x47')](_0x3ce4a1[_0xd187('0x48')],{})['then'](respondWithResult(_0x3f5def,0xc9))[_0xd187('0x41')](handleError(_0x3f5def,null));};exports[_0xd187('0x26')]=function(_0x4523c8,_0x1449d7){if(_0x4523c8[_0xd187('0x48')]['id']){delete _0x4523c8['body']['id'];}return db[_0xd187('0x2d')][_0xd187('0x46')]({'where':{'id':_0x4523c8['params']['id']}})[_0xd187('0x3f')](handleEntityNotFound(_0x1449d7,null))[_0xd187('0x3f')](saveUpdates(_0x4523c8['body'],null))['then'](respondWithResult(_0x1449d7,null))['catch'](handleError(_0x1449d7,null));};exports['destroy']=function(_0x473bef,_0x22f432){return db[_0xd187('0x2d')][_0xd187('0x46')]({'where':{'id':_0x473bef[_0xd187('0x43')]['id']}})[_0xd187('0x3f')](handleEntityNotFound(_0x22f432,null))[_0xd187('0x3f')](removeEntity(_0x22f432,null))['catch'](handleError(_0x22f432,null));};exports[_0xd187('0x49')]=function(_0x3aaeaa,_0x1b12c4){return db[_0xd187('0x2d')]['describe']()[_0xd187('0x3f')](respondWithResult(_0x1b12c4,null))['catch'](handleError(_0x1b12c4,null));}; \ No newline at end of file +var _0x896e=['hasOwnProperty','nolimit','order','sort','where','merge','filter','UserProfileResource','includeAll','include','findAll','rows','catch','keys','length','options','find','create','body','params','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','querystring','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','offset','undefined','count','limit','set','Content-Range','json','reject','save','update','destroy','then','end','error','stack','name','send','index','rawAttributes','fieldName','type','key','model','map','query','filters','intersection','attributes','fields'];(function(_0x46698a,_0x8de1e4){var _0x356db0=function(_0x19e83c){while(--_0x19e83c){_0x46698a['push'](_0x46698a['shift']());}};_0x356db0(++_0x8de1e4);}(_0x896e,0x1e9));var _0xe896=function(_0x12664a,_0x514291){_0x12664a=_0x12664a-0x0;var _0x2f3077=_0x896e[_0x12664a];return _0x2f3077;};'use strict';var emlformat=require(_0xe896('0x0'));var rimraf=require(_0xe896('0x1'));var zipdir=require(_0xe896('0x2'));var jsonpatch=require(_0xe896('0x3'));var rp=require(_0xe896('0x4'));var moment=require(_0xe896('0x5'));var BPromise=require(_0xe896('0x6'));var Mustache=require(_0xe896('0x7'));var util=require(_0xe896('0x8'));var path=require(_0xe896('0x9'));var sox=require(_0xe896('0xa'));var csv=require(_0xe896('0xb'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xe896('0xc'));var _=require(_0xe896('0xd'));var squel=require(_0xe896('0xe'));var crypto=require(_0xe896('0xf'));var jsforce=require(_0xe896('0x10'));var deskjs=require('desk.js');var toCsv=require(_0xe896('0xb'));var querystring=require(_0xe896('0x11'));var Papa=require(_0xe896('0x12'));var Redis=require('ioredis');var authService=require(_0xe896('0x13'));var qs=require('../../components/parsers/qs');var as=require(_0xe896('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xe896('0x15'))(_0xe896('0x16'));var utils=require(_0xe896('0x17'));var config=require('../../config/environment');var licenseUtil=require(_0xe896('0x18'));var db=require(_0xe896('0x19'))['db'];function respondWithStatusCode(_0x3e8ac9,_0x580aac){_0x580aac=_0x580aac||0xcc;return function(_0x2aa522){if(_0x2aa522){return _0x3e8ac9[_0xe896('0x1a')](_0x580aac);}return _0x3e8ac9[_0xe896('0x1b')](_0x580aac)['end']();};}function respondWithResult(_0x2d0e46,_0x7dcf8a){_0x7dcf8a=_0x7dcf8a||0xc8;return function(_0x1e7ef8){if(_0x1e7ef8){return _0x2d0e46['status'](_0x7dcf8a)['json'](_0x1e7ef8);}};}function respondWithFilteredResult(_0x446ce2,_0x25606b){return function(_0x51e7b7){if(_0x51e7b7){var _0x5e78d6=typeof _0x25606b[_0xe896('0x1c')]===_0xe896('0x1d')&&typeof _0x25606b['limit']===_0xe896('0x1d');var _0x4e062a=_0x51e7b7[_0xe896('0x1e')];var _0x32f86d=_0x5e78d6?0x0:_0x25606b[_0xe896('0x1c')];var _0x5dc89d=_0x5e78d6?_0x51e7b7[_0xe896('0x1e')]:_0x25606b[_0xe896('0x1c')]+_0x25606b[_0xe896('0x1f')];var _0xbebbe1;if(_0x5dc89d>=_0x4e062a){_0x5dc89d=_0x4e062a;_0xbebbe1=0xc8;}else{_0xbebbe1=0xce;}_0x446ce2[_0xe896('0x1b')](_0xbebbe1);return _0x446ce2[_0xe896('0x20')](_0xe896('0x21'),_0x32f86d+'-'+_0x5dc89d+'/'+_0x4e062a)[_0xe896('0x22')](_0x51e7b7);}return null;};}function patchUpdates(_0x49547b){return function(_0x180d46){try{jsonpatch['apply'](_0x180d46,_0x49547b,!![]);}catch(_0x5d2c8d){return BPromise[_0xe896('0x23')](_0x5d2c8d);}return _0x180d46[_0xe896('0x24')]();};}function saveUpdates(_0x40502b,_0xeeec7c){return function(_0x498469){if(_0x498469){return _0x498469[_0xe896('0x25')](_0x40502b)['then'](function(_0x5001f7){return _0x5001f7;});}return null;};}function removeEntity(_0x45dd49,_0x41e689){return function(_0x1e952a){if(_0x1e952a){return _0x1e952a[_0xe896('0x26')]()[_0xe896('0x27')](function(){_0x45dd49[_0xe896('0x1b')](0xcc)[_0xe896('0x28')]();});}};}function handleEntityNotFound(_0x4b71cc,_0x390128){return function(_0x163a75){if(!_0x163a75){_0x4b71cc[_0xe896('0x1a')](0x194);}return _0x163a75;};}function handleError(_0x569d5f,_0x26635e){_0x26635e=_0x26635e||0x1f4;return function(_0xd50fe2){logger[_0xe896('0x29')](_0xd50fe2[_0xe896('0x2a')]);if(_0xd50fe2[_0xe896('0x2b')]){delete _0xd50fe2[_0xe896('0x2b')];}_0x569d5f['status'](_0x26635e)[_0xe896('0x2c')](_0xd50fe2);};}exports[_0xe896('0x2d')]=function(_0x201653,_0xbfb15b){var _0xace03f={},_0x5e0d9b={},_0x47c268={'count':0x0,'rows':[]};var _0x5c7dae=_['map'](db['UserProfileResource'][_0xe896('0x2e')],function(_0x29a18e){return{'name':_0x29a18e[_0xe896('0x2f')],'type':_0x29a18e[_0xe896('0x30')][_0xe896('0x31')]};});_0x5e0d9b[_0xe896('0x32')]=_[_0xe896('0x33')](_0x5c7dae,_0xe896('0x2b'));_0x5e0d9b['query']=_['keys'](_0x201653[_0xe896('0x34')]);_0x5e0d9b[_0xe896('0x35')]=_[_0xe896('0x36')](_0x5e0d9b[_0xe896('0x32')],_0x5e0d9b['query']);_0xace03f[_0xe896('0x37')]=_['intersection'](_0x5e0d9b['model'],qs[_0xe896('0x38')](_0x201653[_0xe896('0x34')][_0xe896('0x38')]));_0xace03f['attributes']=_0xace03f['attributes']['length']?_0xace03f[_0xe896('0x37')]:_0x5e0d9b[_0xe896('0x32')];if(!_0x201653[_0xe896('0x34')][_0xe896('0x39')](_0xe896('0x3a'))){_0xace03f['limit']=qs[_0xe896('0x1f')](_0x201653[_0xe896('0x34')][_0xe896('0x1f')]);_0xace03f[_0xe896('0x1c')]=qs[_0xe896('0x1c')](_0x201653[_0xe896('0x34')][_0xe896('0x1c')]);}_0xace03f[_0xe896('0x3b')]=qs['sort'](_0x201653[_0xe896('0x34')][_0xe896('0x3c')]);_0xace03f['where']=qs[_0xe896('0x35')](_['pick'](_0x201653[_0xe896('0x34')],_0x5e0d9b['filters']),_0x5c7dae);if(_0x201653[_0xe896('0x34')]['filter']){_0xace03f[_0xe896('0x3d')]=_[_0xe896('0x3e')](_0xace03f[_0xe896('0x3d')],{'$or':_[_0xe896('0x33')](_0x5c7dae,function(_0xeb9bbf){if(_0xeb9bbf['type']!=='VIRTUAL'){var _0x203aea={};_0x203aea[_0xeb9bbf[_0xe896('0x2b')]]={'$like':'%'+_0x201653[_0xe896('0x34')][_0xe896('0x3f')]+'%'};return _0x203aea;}})});}_0xace03f=_[_0xe896('0x3e')]({},_0xace03f,_0x201653['options']);var _0x5b8131={'where':_0xace03f[_0xe896('0x3d')]};return db[_0xe896('0x40')]['count'](_0x5b8131)['then'](function(_0x19d2fd){_0x47c268[_0xe896('0x1e')]=_0x19d2fd;if(_0x201653[_0xe896('0x34')][_0xe896('0x41')]){_0xace03f[_0xe896('0x42')]=[{'all':!![]}];}return db[_0xe896('0x40')][_0xe896('0x43')](_0xace03f);})[_0xe896('0x27')](function(_0x372c71){_0x47c268[_0xe896('0x44')]=_0x372c71;return _0x47c268;})[_0xe896('0x27')](respondWithFilteredResult(_0xbfb15b,_0xace03f))[_0xe896('0x45')](handleError(_0xbfb15b,null));};exports['show']=function(_0x1e5434,_0x143ad4){var _0x59b97f={'raw':![],'where':{'id':_0x1e5434['params']['id']}},_0x57366b={};_0x57366b[_0xe896('0x32')]=_[_0xe896('0x46')](db[_0xe896('0x40')]['rawAttributes']);_0x57366b[_0xe896('0x34')]=_[_0xe896('0x46')](_0x1e5434['query']);_0x57366b['filters']=_['intersection'](_0x57366b[_0xe896('0x32')],_0x57366b[_0xe896('0x34')]);_0x59b97f[_0xe896('0x37')]=_[_0xe896('0x36')](_0x57366b[_0xe896('0x32')],qs[_0xe896('0x38')](_0x1e5434['query'][_0xe896('0x38')]));_0x59b97f[_0xe896('0x37')]=_0x59b97f['attributes'][_0xe896('0x47')]?_0x59b97f[_0xe896('0x37')]:_0x57366b[_0xe896('0x32')];if(_0x1e5434[_0xe896('0x34')]['includeAll']){_0x59b97f[_0xe896('0x42')]=[{'all':!![]}];}_0x59b97f=_[_0xe896('0x3e')]({},_0x59b97f,_0x1e5434[_0xe896('0x48')]);return db[_0xe896('0x40')][_0xe896('0x49')](_0x59b97f)[_0xe896('0x27')](handleEntityNotFound(_0x143ad4,null))['then'](respondWithResult(_0x143ad4,null))[_0xe896('0x45')](handleError(_0x143ad4,null));};exports['create']=function(_0x234a22,_0x1c6ae1){return db[_0xe896('0x40')][_0xe896('0x4a')](_0x234a22[_0xe896('0x4b')],{})[_0xe896('0x27')](respondWithResult(_0x1c6ae1,0xc9))['catch'](handleError(_0x1c6ae1,null));};exports[_0xe896('0x25')]=function(_0x206ad3,_0x4818cd){if(_0x206ad3[_0xe896('0x4b')]['id']){delete _0x206ad3[_0xe896('0x4b')]['id'];}return db['UserProfileResource'][_0xe896('0x49')]({'where':{'id':_0x206ad3['params']['id']}})[_0xe896('0x27')](handleEntityNotFound(_0x4818cd,null))[_0xe896('0x27')](saveUpdates(_0x206ad3[_0xe896('0x4b')],null))[_0xe896('0x27')](respondWithResult(_0x4818cd,null))[_0xe896('0x45')](handleError(_0x4818cd,null));};exports['destroy']=function(_0x1fa3fd,_0x819c8a){return db[_0xe896('0x40')]['find']({'where':{'id':_0x1fa3fd[_0xe896('0x4c')]['id']}})['then'](handleEntityNotFound(_0x819c8a,null))['then'](removeEntity(_0x819c8a,null))[_0xe896('0x45')](handleError(_0x819c8a,null));};exports[_0xe896('0x4d')]=function(_0x57aed3,_0x343adb){return db[_0xe896('0x40')]['describe']()['then'](respondWithResult(_0x343adb,null))[_0xe896('0x45')](handleError(_0x343adb,null));}; \ No newline at end of file diff --git a/server/api/userProfileResource/userProfileResource.model.js b/server/api/userProfileResource/userProfileResource.model.js index 829b685..58411f7 100644 --- a/server/api/userProfileResource/userProfileResource.model.js +++ b/server/api/userProfileResource/userProfileResource.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3bb4=['define','UserProfileResource','user_profile_has_resources','sectionId','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','exports'];(function(_0x2c91e9,_0x2fb965){var _0x13f0ff=function(_0xb39edf){while(--_0xb39edf){_0x2c91e9['push'](_0x2c91e9['shift']());}};_0x13f0ff(++_0x2fb965);}(_0x3bb4,0x108));var _0x43bb=function(_0x4023e2,_0xd2597d){_0x4023e2=_0x4023e2-0x0;var _0x347129=_0x3bb4[_0x4023e2];return _0x347129;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x43bb('0x0'))(_0x43bb('0x1'));var moment=require(_0x43bb('0x2'));var BPromise=require(_0x43bb('0x3'));var rp=require(_0x43bb('0x4'));var fs=require('fs');var path=require(_0x43bb('0x5'));var rimraf=require(_0x43bb('0x6'));var config=require(_0x43bb('0x7'));var attributes=require('./userProfileResource.attributes');module[_0x43bb('0x8')]=function(_0x369cc6,_0x442176){return _0x369cc6[_0x43bb('0x9')](_0x43bb('0xa'),attributes,{'tableName':_0x43bb('0xb'),'paranoid':![],'indexes':[{'name':'compositeIndex','fields':['resourceId',_0x43bb('0xc')]}],'timestamps':!![]});}; \ No newline at end of file +var _0xaf7d=['api','bluebird','request-promise','path','exports','define','UserProfileResource','user_profile_has_resources','resourceId','lodash','util','../../config/logger'];(function(_0x25fa5c,_0x421141){var _0x1bade2=function(_0x3faf20){while(--_0x3faf20){_0x25fa5c['push'](_0x25fa5c['shift']());}};_0x1bade2(++_0x421141);}(_0xaf7d,0xc9));var _0xdaf7=function(_0x40ab30,_0x3fadc0){_0x40ab30=_0x40ab30-0x0;var _0x3aa3e5=_0xaf7d[_0x40ab30];return _0x3aa3e5;};'use strict';var _=require(_0xdaf7('0x0'));var util=require(_0xdaf7('0x1'));var logger=require(_0xdaf7('0x2'))(_0xdaf7('0x3'));var moment=require('moment');var BPromise=require(_0xdaf7('0x4'));var rp=require(_0xdaf7('0x5'));var fs=require('fs');var path=require(_0xdaf7('0x6'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require('./userProfileResource.attributes');module[_0xdaf7('0x7')]=function(_0x192a0b,_0x391604){return _0x192a0b[_0xdaf7('0x8')](_0xdaf7('0x9'),attributes,{'tableName':_0xdaf7('0xa'),'paranoid':![],'indexes':[{'name':'compositeIndex','fields':[_0xdaf7('0xb'),'sectionId']}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/userProfileResource/userProfileResource.rpc.js b/server/api/userProfileResource/userProfileResource.rpc.js index 5222ca1..7e77d83 100644 --- a/server/api/userProfileResource/userProfileResource.rpc.js +++ b/server/api/userProfileResource/userProfileResource.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x33d3=['UserProfileResource,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','client','http','info','UserProfileResource,\x20%s,\x20%s','request\x20sent'];(function(_0x52227e,_0x3037f){var _0x18b901=function(_0xad2a2c){while(--_0xad2a2c){_0x52227e['push'](_0x52227e['shift']());}};_0x18b901(++_0x3037f);}(_0x33d3,0x102));var _0x333d=function(_0x489c95,_0x53159c){_0x489c95=_0x489c95-0x0;var _0x10e7a7=_0x33d3[_0x489c95];return _0x10e7a7;};'use strict';var _=require(_0x333d('0x0'));var util=require(_0x333d('0x1'));var moment=require(_0x333d('0x2'));var BPromise=require(_0x333d('0x3'));var rs=require(_0x333d('0x4'));var fs=require('fs');var Redis=require(_0x333d('0x5'));var db=require(_0x333d('0x6'))['db'];var utils=require(_0x333d('0x7'));var logger=require('../../config/logger')('rpc');var config=require(_0x333d('0x8'));var jayson=require(_0x333d('0x9'));var client=jayson[_0x333d('0xa')][_0x333d('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x1fb455,_0x2b1691,_0x45904e){return new BPromise(function(_0xf2b9a0,_0x2e6e26){return client['request'](_0x1fb455,_0x45904e)['then'](function(_0x4c32e7){logger[_0x333d('0xc')](_0x333d('0xd'),_0x2b1691,_0x333d('0xe'));logger['debug'](_0x333d('0xf'),_0x2b1691,'request\x20sent',JSON[_0x333d('0x10')](_0x4c32e7));if(_0x4c32e7[_0x333d('0x11')]){if(_0x4c32e7[_0x333d('0x11')][_0x333d('0x12')]===0x1f4){logger[_0x333d('0x11')](_0x333d('0xd'),_0x2b1691,_0x4c32e7[_0x333d('0x11')][_0x333d('0x13')]);return _0x2e6e26(_0x4c32e7[_0x333d('0x11')][_0x333d('0x13')]);}logger[_0x333d('0x11')](_0x333d('0xd'),_0x2b1691,_0x4c32e7['error'][_0x333d('0x13')]);return _0xf2b9a0(_0x4c32e7[_0x333d('0x11')][_0x333d('0x13')]);}else{logger[_0x333d('0xc')](_0x333d('0xd'),_0x2b1691,_0x333d('0xe'));_0xf2b9a0(_0x4c32e7[_0x333d('0x14')]['message']);}})['catch'](function(_0x49f4ad){logger[_0x333d('0x11')](_0x333d('0xd'),_0x2b1691,_0x49f4ad);_0x2e6e26(_0x49f4ad);});});} \ No newline at end of file +var _0x5fc8=['../../config/environment','jayson/promise','http','request','then','info','UserProfileResource,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc'];(function(_0x501510,_0x61caa9){var _0x1e6ee5=function(_0x32845b){while(--_0x32845b){_0x501510['push'](_0x501510['shift']());}};_0x1e6ee5(++_0x61caa9);}(_0x5fc8,0x16e));var _0x85fc=function(_0x2e9384,_0x432d44){_0x2e9384=_0x2e9384-0x0;var _0x57d1f3=_0x5fc8[_0x2e9384];return _0x57d1f3;};'use strict';var _=require(_0x85fc('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x85fc('0x1'));var rs=require(_0x85fc('0x2'));var fs=require('fs');var Redis=require(_0x85fc('0x3'));var db=require(_0x85fc('0x4'))['db'];var utils=require(_0x85fc('0x5'));var logger=require(_0x85fc('0x6'))(_0x85fc('0x7'));var config=require(_0x85fc('0x8'));var jayson=require(_0x85fc('0x9'));var client=jayson['client'][_0x85fc('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xa57bbb,_0x1204c9,_0x20c0d0){return new BPromise(function(_0x5a7e68,_0x2fd5df){return client[_0x85fc('0xb')](_0xa57bbb,_0x20c0d0)[_0x85fc('0xc')](function(_0x2137ef){logger[_0x85fc('0xd')](_0x85fc('0xe'),_0x1204c9,_0x85fc('0xf'));logger['debug']('UserProfileResource,\x20%s,\x20%s,\x20%s',_0x1204c9,'request\x20sent',JSON[_0x85fc('0x10')](_0x2137ef));if(_0x2137ef[_0x85fc('0x11')]){if(_0x2137ef[_0x85fc('0x11')][_0x85fc('0x12')]===0x1f4){logger['error'](_0x85fc('0xe'),_0x1204c9,_0x2137ef[_0x85fc('0x11')][_0x85fc('0x13')]);return _0x2fd5df(_0x2137ef[_0x85fc('0x11')][_0x85fc('0x13')]);}logger['error'](_0x85fc('0xe'),_0x1204c9,_0x2137ef[_0x85fc('0x11')]['message']);return _0x5a7e68(_0x2137ef[_0x85fc('0x11')]['message']);}else{logger['info'](_0x85fc('0xe'),_0x1204c9,_0x85fc('0xf'));_0x5a7e68(_0x2137ef[_0x85fc('0x14')][_0x85fc('0x13')]);}})[_0x85fc('0x15')](function(_0x1a484f){logger['error'](_0x85fc('0xe'),_0x1204c9,_0x1a484f);_0x2fd5df(_0x1a484f);});});} \ No newline at end of file diff --git a/server/api/userProfileSection/index.js b/server/api/userProfileSection/index.js index 77f068f..16ae3de 100644 --- a/server/api/userProfileSection/index.js +++ b/server/api/userProfileSection/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0ede=['util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./userProfileSection.controller','get','isAuthenticated','/describe','show','post','create','put','update','destroy','exports','multer'];(function(_0x18a6bd,_0x6ccb1){var _0x41a4d4=function(_0x1e9014){while(--_0x1e9014){_0x18a6bd['push'](_0x18a6bd['shift']());}};_0x41a4d4(++_0x6ccb1);}(_0x0ede,0x77));var _0xe0ed=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0ede[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require(_0xe0ed('0x0'));var util=require(_0xe0ed('0x1'));var path=require('path');var timeout=require(_0xe0ed('0x2'));var express=require(_0xe0ed('0x3'));var router=express[_0xe0ed('0x4')]();var fs_extra=require(_0xe0ed('0x5'));var auth=require(_0xe0ed('0x6'));var interaction=require(_0xe0ed('0x7'));var config=require(_0xe0ed('0x8'));var controller=require(_0xe0ed('0x9'));router[_0xe0ed('0xa')]('/',auth[_0xe0ed('0xb')](),controller['index']);router[_0xe0ed('0xa')](_0xe0ed('0xc'),auth['isAuthenticated'](),controller['describe']);router['get']('/:id',auth[_0xe0ed('0xb')](),controller[_0xe0ed('0xd')]);router[_0xe0ed('0xe')]('/',auth[_0xe0ed('0xb')](),controller[_0xe0ed('0xf')]);router[_0xe0ed('0x10')]('/:id',auth[_0xe0ed('0xb')](),controller[_0xe0ed('0x11')]);router['delete']('/:id',auth[_0xe0ed('0xb')](),controller[_0xe0ed('0x12')]);module[_0xe0ed('0x13')]=router; \ No newline at end of file +var _0x135f=['/describe','describe','show','post','create','put','/:id','update','delete','multer','connect-timeout','express','Router','fs-extra','../../components/interaction/service','./userProfileSection.controller','isAuthenticated','index','get'];(function(_0x157872,_0x56396d){var _0x42204e=function(_0x3fab41){while(--_0x3fab41){_0x157872['push'](_0x157872['shift']());}};_0x42204e(++_0x56396d);}(_0x135f,0x198));var _0xf135=function(_0x380d2b,_0x27e3aa){_0x380d2b=_0x380d2b-0x0;var _0x7809ad=_0x135f[_0x380d2b];return _0x7809ad;};'use strict';var multer=require(_0xf135('0x0'));var util=require('util');var path=require('path');var timeout=require(_0xf135('0x1'));var express=require(_0xf135('0x2'));var router=express[_0xf135('0x3')]();var fs_extra=require(_0xf135('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0xf135('0x5'));var config=require('../../config/environment');var controller=require(_0xf135('0x6'));router['get']('/',auth[_0xf135('0x7')](),controller[_0xf135('0x8')]);router[_0xf135('0x9')](_0xf135('0xa'),auth[_0xf135('0x7')](),controller[_0xf135('0xb')]);router[_0xf135('0x9')]('/:id',auth['isAuthenticated'](),controller[_0xf135('0xc')]);router[_0xf135('0xd')]('/',auth[_0xf135('0x7')](),controller[_0xf135('0xe')]);router[_0xf135('0xf')](_0xf135('0x10'),auth[_0xf135('0x7')](),controller[_0xf135('0x11')]);router[_0xf135('0x12')](_0xf135('0x10'),auth[_0xf135('0x7')](),controller['destroy']);module['exports']=router; \ No newline at end of file diff --git a/server/api/userProfileSection/userProfileSection.attributes.js b/server/api/userProfileSection/userProfileSection.attributes.js index 7e9bb3b..fa00c63 100644 --- a/server/api/userProfileSection/userProfileSection.attributes.js +++ b/server/api/userProfileSection/userProfileSection.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1399=['sequelize','exports','STRING','BOOLEAN','setDataValue','crudPermissions','getDataValue'];(function(_0x2cd176,_0xa9b6d2){var _0x20d64e=function(_0x2d6957){while(--_0x2d6957){_0x2cd176['push'](_0x2cd176['shift']());}};_0x20d64e(++_0xa9b6d2);}(_0x1399,0x16c));var _0x9139=function(_0x3df70c,_0x3da797){_0x3df70c=_0x3df70c-0x0;var _0x137bca=_0x1399[_0x3df70c];return _0x137bca;};'use strict';var Sequelize=require(_0x9139('0x0'));module[_0x9139('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'category':{'type':Sequelize[_0x9139('0x2')],'allowNull':![]},'sectionId':{'type':Sequelize['INTEGER'],'allowNull':![]},'enabled':{'type':Sequelize[_0x9139('0x3')],'defaultValue':null},'autoAssociation':{'type':Sequelize[_0x9139('0x3')],'defaultValue':null},'crudPermissions':{'type':Sequelize[_0x9139('0x2')],'set':function(_0x28f155){this[_0x9139('0x4')](_0x9139('0x5'),_0x28f155?_0x28f155['join'](''):[]);},'get':function(){return this['getDataValue'](_0x9139('0x5'))?this[_0x9139('0x6')](_0x9139('0x5'))['split'](''):[];}}}; \ No newline at end of file +var _0x3f8c=['split','STRING','INTEGER','BOOLEAN','join','getDataValue','crudPermissions'];(function(_0x2642cb,_0x4b917f){var _0xe6e41=function(_0x281676){while(--_0x281676){_0x2642cb['push'](_0x2642cb['shift']());}};_0xe6e41(++_0x4b917f);}(_0x3f8c,0x104));var _0xc3f8=function(_0x569a6d,_0x12d6c2){_0x569a6d=_0x569a6d-0x0;var _0x32b57a=_0x3f8c[_0x569a6d];return _0x32b57a;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0xc3f8('0x0')],'allowNull':![]},'category':{'type':Sequelize[_0xc3f8('0x0')],'allowNull':![]},'sectionId':{'type':Sequelize[_0xc3f8('0x1')],'allowNull':![]},'enabled':{'type':Sequelize[_0xc3f8('0x2')],'defaultValue':null},'autoAssociation':{'type':Sequelize['BOOLEAN'],'defaultValue':null},'crudPermissions':{'type':Sequelize['STRING'],'set':function(_0x54035a){this['setDataValue']('crudPermissions',_0x54035a?_0x54035a[_0xc3f8('0x3')](''):[]);},'get':function(){return this[_0xc3f8('0x4')](_0xc3f8('0x5'))?this[_0xc3f8('0x4')](_0xc3f8('0x5'))[_0xc3f8('0x6')](''):[];}}}; \ No newline at end of file diff --git a/server/api/userProfileSection/userProfileSection.controller.js b/server/api/userProfileSection/userProfileSection.controller.js index e157440..6afc461 100644 --- a/server/api/userProfileSection/userProfileSection.controller.js +++ b/server/api/userProfileSection/userProfileSection.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x564a=['includeAll','include','findAll','rows','catch','show','find','create','body','params','describe','rimraf','zip-dir','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','squel','crypto','jsforce','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','offset','undefined','limit','count','set','Content-Range','json','apply','reject','save','update','then','destroy','error','send','index','map','UserProfileSection','rawAttributes','fieldName','type','model','name','query','keys','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','filters','filter','merge','VIRTUAL'];(function(_0x17bc4d,_0x38b34d){var _0x164954=function(_0x2340c3){while(--_0x2340c3){_0x17bc4d['push'](_0x17bc4d['shift']());}};_0x164954(++_0x38b34d);}(_0x564a,0xf2));var _0xa564=function(_0x2c9a09,_0xeee8f2){_0x2c9a09=_0x2c9a09-0x0;var _0x35c734=_0x564a[_0x2c9a09];return _0x35c734;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xa564('0x0'));var zipdir=require(_0xa564('0x1'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0xa564('0x2'));var Mustache=require(_0xa564('0x3'));var util=require(_0xa564('0x4'));var path=require(_0xa564('0x5'));var sox=require(_0xa564('0x6'));var csv=require(_0xa564('0x7'));var ejs=require(_0xa564('0x8'));var fs=require('fs');var fs_extra=require(_0xa564('0x9'));var _=require('lodash');var squel=require(_0xa564('0xa'));var crypto=require(_0xa564('0xb'));var jsforce=require(_0xa564('0xc'));var deskjs=require('desk.js');var toCsv=require(_0xa564('0x7'));var querystring=require(_0xa564('0xd'));var Papa=require('papaparse');var Redis=require(_0xa564('0xe'));var authService=require(_0xa564('0xf'));var qs=require(_0xa564('0x10'));var as=require(_0xa564('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xa564('0x12'))(_0xa564('0x13'));var utils=require(_0xa564('0x14'));var config=require(_0xa564('0x15'));var licenseUtil=require(_0xa564('0x16'));var db=require(_0xa564('0x17'))['db'];function respondWithStatusCode(_0x4fd4d6,_0xdef1da){_0xdef1da=_0xdef1da||0xcc;return function(_0x24b9e6){if(_0x24b9e6){return _0x4fd4d6[_0xa564('0x18')](_0xdef1da);}return _0x4fd4d6[_0xa564('0x19')](_0xdef1da)[_0xa564('0x1a')]();};}function respondWithResult(_0x5e79c0,_0x75f75c){_0x75f75c=_0x75f75c||0xc8;return function(_0x24b7a9){if(_0x24b7a9){return _0x5e79c0['status'](_0x75f75c)['json'](_0x24b7a9);}};}function respondWithFilteredResult(_0x220ceb,_0x100df2){return function(_0x181203){if(_0x181203){var _0x80c59f=typeof _0x100df2[_0xa564('0x1b')]===_0xa564('0x1c')&&typeof _0x100df2[_0xa564('0x1d')]===_0xa564('0x1c');var _0x382514=_0x181203[_0xa564('0x1e')];var _0x8254de=_0x80c59f?0x0:_0x100df2['offset'];var _0x178519=_0x80c59f?_0x181203[_0xa564('0x1e')]:_0x100df2[_0xa564('0x1b')]+_0x100df2[_0xa564('0x1d')];var _0x389c1d;if(_0x178519>=_0x382514){_0x178519=_0x382514;_0x389c1d=0xc8;}else{_0x389c1d=0xce;}_0x220ceb[_0xa564('0x19')](_0x389c1d);return _0x220ceb[_0xa564('0x1f')](_0xa564('0x20'),_0x8254de+'-'+_0x178519+'/'+_0x382514)[_0xa564('0x21')](_0x181203);}return null;};}function patchUpdates(_0x3be53d){return function(_0x54579f){try{jsonpatch[_0xa564('0x22')](_0x54579f,_0x3be53d,!![]);}catch(_0x3419eb){return BPromise[_0xa564('0x23')](_0x3419eb);}return _0x54579f[_0xa564('0x24')]();};}function saveUpdates(_0x12cc13,_0x2725e7){return function(_0x4e6be6){if(_0x4e6be6){return _0x4e6be6[_0xa564('0x25')](_0x12cc13)[_0xa564('0x26')](function(_0x21f5a2){return _0x21f5a2;});}return null;};}function removeEntity(_0x3bf181,_0x169648){return function(_0xb4368d){if(_0xb4368d){return _0xb4368d[_0xa564('0x27')]()[_0xa564('0x26')](function(){_0x3bf181[_0xa564('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0x730f68,_0x533a58){return function(_0x3dd10d){if(!_0x3dd10d){_0x730f68[_0xa564('0x18')](0x194);}return _0x3dd10d;};}function handleError(_0x58cfbc,_0x4e51e4){_0x4e51e4=_0x4e51e4||0x1f4;return function(_0x3762e3){logger[_0xa564('0x28')](_0x3762e3['stack']);if(_0x3762e3['name']){delete _0x3762e3['name'];}_0x58cfbc[_0xa564('0x19')](_0x4e51e4)[_0xa564('0x29')](_0x3762e3);};}exports[_0xa564('0x2a')]=function(_0xd7539c,_0x721d1c){var _0x916b05={},_0x557518={},_0x3b0078={'count':0x0,'rows':[]};var _0x2feb67=_[_0xa564('0x2b')](db[_0xa564('0x2c')][_0xa564('0x2d')],function(_0x3919ad){return{'name':_0x3919ad[_0xa564('0x2e')],'type':_0x3919ad[_0xa564('0x2f')]['key']};});_0x557518[_0xa564('0x30')]=_['map'](_0x2feb67,_0xa564('0x31'));_0x557518[_0xa564('0x32')]=_[_0xa564('0x33')](_0xd7539c[_0xa564('0x32')]);_0x557518['filters']=_[_0xa564('0x34')](_0x557518[_0xa564('0x30')],_0x557518[_0xa564('0x32')]);_0x916b05['attributes']=_[_0xa564('0x34')](_0x557518[_0xa564('0x30')],qs['fields'](_0xd7539c[_0xa564('0x32')][_0xa564('0x35')]));_0x916b05['attributes']=_0x916b05[_0xa564('0x36')][_0xa564('0x37')]?_0x916b05['attributes']:_0x557518[_0xa564('0x30')];if(!_0xd7539c[_0xa564('0x32')][_0xa564('0x38')](_0xa564('0x39'))){_0x916b05[_0xa564('0x1d')]=qs[_0xa564('0x1d')](_0xd7539c[_0xa564('0x32')][_0xa564('0x1d')]);_0x916b05[_0xa564('0x1b')]=qs[_0xa564('0x1b')](_0xd7539c[_0xa564('0x32')][_0xa564('0x1b')]);}_0x916b05[_0xa564('0x3a')]=qs[_0xa564('0x3b')](_0xd7539c[_0xa564('0x32')][_0xa564('0x3b')]);_0x916b05[_0xa564('0x3c')]=qs['filters'](_[_0xa564('0x3d')](_0xd7539c[_0xa564('0x32')],_0x557518[_0xa564('0x3e')]),_0x2feb67);if(_0xd7539c[_0xa564('0x32')][_0xa564('0x3f')]){_0x916b05[_0xa564('0x3c')]=_[_0xa564('0x40')](_0x916b05[_0xa564('0x3c')],{'$or':_[_0xa564('0x2b')](_0x2feb67,function(_0x41199c){if(_0x41199c[_0xa564('0x2f')]!==_0xa564('0x41')){var _0x4bfdba={};_0x4bfdba[_0x41199c[_0xa564('0x31')]]={'$like':'%'+_0xd7539c[_0xa564('0x32')][_0xa564('0x3f')]+'%'};return _0x4bfdba;}})});}_0x916b05=_[_0xa564('0x40')]({},_0x916b05,_0xd7539c['options']);var _0x5202f1={'where':_0x916b05['where']};return db[_0xa564('0x2c')]['count'](_0x5202f1)[_0xa564('0x26')](function(_0x2f9d5f){_0x3b0078[_0xa564('0x1e')]=_0x2f9d5f;if(_0xd7539c[_0xa564('0x32')][_0xa564('0x42')]){_0x916b05[_0xa564('0x43')]=[{'all':!![]}];}return db[_0xa564('0x2c')][_0xa564('0x44')](_0x916b05);})['then'](function(_0x1ab17e){_0x3b0078[_0xa564('0x45')]=_0x1ab17e;return _0x3b0078;})[_0xa564('0x26')](respondWithFilteredResult(_0x721d1c,_0x916b05))[_0xa564('0x46')](handleError(_0x721d1c,null));};exports[_0xa564('0x47')]=function(_0x4dc4d1,_0x3eeac1){var _0xc7a243={'raw':![],'where':{'id':_0x4dc4d1['params']['id']}},_0x401637={};_0x401637['model']=_[_0xa564('0x33')](db[_0xa564('0x2c')]['rawAttributes']);_0x401637[_0xa564('0x32')]=_['keys'](_0x4dc4d1[_0xa564('0x32')]);_0x401637[_0xa564('0x3e')]=_[_0xa564('0x34')](_0x401637[_0xa564('0x30')],_0x401637[_0xa564('0x32')]);_0xc7a243['attributes']=_[_0xa564('0x34')](_0x401637['model'],qs[_0xa564('0x35')](_0x4dc4d1['query'][_0xa564('0x35')]));_0xc7a243[_0xa564('0x36')]=_0xc7a243['attributes'][_0xa564('0x37')]?_0xc7a243[_0xa564('0x36')]:_0x401637[_0xa564('0x30')];if(_0x4dc4d1[_0xa564('0x32')][_0xa564('0x42')]){_0xc7a243[_0xa564('0x43')]=[{'all':!![]}];}_0xc7a243=_[_0xa564('0x40')]({},_0xc7a243,_0x4dc4d1['options']);return db[_0xa564('0x2c')][_0xa564('0x48')](_0xc7a243)[_0xa564('0x26')](handleEntityNotFound(_0x3eeac1,null))[_0xa564('0x26')](respondWithResult(_0x3eeac1,null))[_0xa564('0x46')](handleError(_0x3eeac1,null));};exports[_0xa564('0x49')]=function(_0x3303ee,_0x201727){return db['UserProfileSection'][_0xa564('0x49')](_0x3303ee[_0xa564('0x4a')],{})[_0xa564('0x26')](respondWithResult(_0x201727,0xc9))[_0xa564('0x46')](handleError(_0x201727,null));};exports[_0xa564('0x25')]=function(_0x423c69,_0x4eec9e){if(_0x423c69[_0xa564('0x4a')]['id']){delete _0x423c69[_0xa564('0x4a')]['id'];}return db[_0xa564('0x2c')][_0xa564('0x48')]({'where':{'id':_0x423c69['params']['id']}})[_0xa564('0x26')](handleEntityNotFound(_0x4eec9e,null))['then'](saveUpdates(_0x423c69[_0xa564('0x4a')],null))[_0xa564('0x26')](respondWithResult(_0x4eec9e,null))[_0xa564('0x46')](handleError(_0x4eec9e,null));};exports[_0xa564('0x27')]=function(_0x30e87f,_0x56165b){return db[_0xa564('0x2c')][_0xa564('0x48')]({'where':{'id':_0x30e87f[_0xa564('0x4b')]['id']}})[_0xa564('0x26')](handleEntityNotFound(_0x56165b,null))[_0xa564('0x26')](removeEntity(_0x56165b,null))[_0xa564('0x46')](handleError(_0x56165b,null));};exports['describe']=function(_0x45b375,_0x3346cd){return db['UserProfileSection'][_0xa564('0x4c')]()[_0xa564('0x26')](respondWithResult(_0x3346cd,null))[_0xa564('0x46')](handleError(_0x3346cd,null));}; \ No newline at end of file +var _0xbc58=['reject','save','update','then','destroy','end','error','stack','name','send','map','UserProfileSection','type','key','model','keys','query','intersection','attributes','fields','length','nolimit','sort','where','filters','pick','filter','merge','includeAll','include','findAll','catch','show','rawAttributes','options','find','create','body','params','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','fs-extra','squel','crypto','desk.js','to-csv','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','undefined','limit','count','offset','set','apply'];(function(_0x3f1049,_0x50becf){var _0x5a526e=function(_0x2ca62e){while(--_0x2ca62e){_0x3f1049['push'](_0x3f1049['shift']());}};_0x5a526e(++_0x50becf);}(_0xbc58,0x150));var _0x8bc5=function(_0x3075a6,_0x1c0d29){_0x3075a6=_0x3075a6-0x0;var _0x19e413=_0xbc58[_0x3075a6];return _0x19e413;};'use strict';var emlformat=require(_0x8bc5('0x0'));var rimraf=require(_0x8bc5('0x1'));var zipdir=require(_0x8bc5('0x2'));var jsonpatch=require(_0x8bc5('0x3'));var rp=require(_0x8bc5('0x4'));var moment=require(_0x8bc5('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x8bc5('0x6'));var util=require(_0x8bc5('0x7'));var path=require(_0x8bc5('0x8'));var sox=require(_0x8bc5('0x9'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x8bc5('0xa'));var _=require('lodash');var squel=require(_0x8bc5('0xb'));var crypto=require(_0x8bc5('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x8bc5('0xd'));var toCsv=require(_0x8bc5('0xe'));var querystring=require('querystring');var Papa=require(_0x8bc5('0xf'));var Redis=require(_0x8bc5('0x10'));var authService=require(_0x8bc5('0x11'));var qs=require(_0x8bc5('0x12'));var as=require(_0x8bc5('0x13'));var hardwareService=require(_0x8bc5('0x14'));var logger=require('../../config/logger')(_0x8bc5('0x15'));var utils=require('../../config/utils');var config=require(_0x8bc5('0x16'));var licenseUtil=require(_0x8bc5('0x17'));var db=require(_0x8bc5('0x18'))['db'];function respondWithStatusCode(_0x344c4c,_0x8f0fd3){_0x8f0fd3=_0x8f0fd3||0xcc;return function(_0x27fdc2){if(_0x27fdc2){return _0x344c4c[_0x8bc5('0x19')](_0x8f0fd3);}return _0x344c4c['status'](_0x8f0fd3)['end']();};}function respondWithResult(_0xd4a5c5,_0x3a889b){_0x3a889b=_0x3a889b||0xc8;return function(_0x370608){if(_0x370608){return _0xd4a5c5[_0x8bc5('0x1a')](_0x3a889b)[_0x8bc5('0x1b')](_0x370608);}};}function respondWithFilteredResult(_0x36f093,_0xee472){return function(_0x408879){if(_0x408879){var _0x194d48=typeof _0xee472['offset']===_0x8bc5('0x1c')&&typeof _0xee472[_0x8bc5('0x1d')]===_0x8bc5('0x1c');var _0x296350=_0x408879[_0x8bc5('0x1e')];var _0x382fb6=_0x194d48?0x0:_0xee472[_0x8bc5('0x1f')];var _0x4c5bb1=_0x194d48?_0x408879[_0x8bc5('0x1e')]:_0xee472[_0x8bc5('0x1f')]+_0xee472['limit'];var _0x32a9da;if(_0x4c5bb1>=_0x296350){_0x4c5bb1=_0x296350;_0x32a9da=0xc8;}else{_0x32a9da=0xce;}_0x36f093['status'](_0x32a9da);return _0x36f093[_0x8bc5('0x20')]('Content-Range',_0x382fb6+'-'+_0x4c5bb1+'/'+_0x296350)[_0x8bc5('0x1b')](_0x408879);}return null;};}function patchUpdates(_0x69f3d3){return function(_0x30844c){try{jsonpatch[_0x8bc5('0x21')](_0x30844c,_0x69f3d3,!![]);}catch(_0x1cb101){return BPromise[_0x8bc5('0x22')](_0x1cb101);}return _0x30844c[_0x8bc5('0x23')]();};}function saveUpdates(_0xc5c4b9,_0x43fef6){return function(_0x1a5768){if(_0x1a5768){return _0x1a5768[_0x8bc5('0x24')](_0xc5c4b9)[_0x8bc5('0x25')](function(_0x4c8ac3){return _0x4c8ac3;});}return null;};}function removeEntity(_0x4f9827,_0x181983){return function(_0x47b8b9){if(_0x47b8b9){return _0x47b8b9[_0x8bc5('0x26')]()[_0x8bc5('0x25')](function(){_0x4f9827[_0x8bc5('0x1a')](0xcc)[_0x8bc5('0x27')]();});}};}function handleEntityNotFound(_0x2fa006,_0x5b8da4){return function(_0xcd8fcf){if(!_0xcd8fcf){_0x2fa006['sendStatus'](0x194);}return _0xcd8fcf;};}function handleError(_0x463662,_0x445f1d){_0x445f1d=_0x445f1d||0x1f4;return function(_0xe97b35){logger[_0x8bc5('0x28')](_0xe97b35[_0x8bc5('0x29')]);if(_0xe97b35[_0x8bc5('0x2a')]){delete _0xe97b35['name'];}_0x463662[_0x8bc5('0x1a')](_0x445f1d)[_0x8bc5('0x2b')](_0xe97b35);};}exports['index']=function(_0x487573,_0x2c7b33){var _0x4fb134={},_0x4422e0={},_0x42d7cb={'count':0x0,'rows':[]};var _0x2bda1c=_[_0x8bc5('0x2c')](db[_0x8bc5('0x2d')]['rawAttributes'],function(_0x28e0a2){return{'name':_0x28e0a2['fieldName'],'type':_0x28e0a2[_0x8bc5('0x2e')][_0x8bc5('0x2f')]};});_0x4422e0[_0x8bc5('0x30')]=_[_0x8bc5('0x2c')](_0x2bda1c,'name');_0x4422e0['query']=_[_0x8bc5('0x31')](_0x487573[_0x8bc5('0x32')]);_0x4422e0['filters']=_[_0x8bc5('0x33')](_0x4422e0[_0x8bc5('0x30')],_0x4422e0[_0x8bc5('0x32')]);_0x4fb134[_0x8bc5('0x34')]=_[_0x8bc5('0x33')](_0x4422e0[_0x8bc5('0x30')],qs[_0x8bc5('0x35')](_0x487573['query']['fields']));_0x4fb134[_0x8bc5('0x34')]=_0x4fb134[_0x8bc5('0x34')][_0x8bc5('0x36')]?_0x4fb134[_0x8bc5('0x34')]:_0x4422e0[_0x8bc5('0x30')];if(!_0x487573['query']['hasOwnProperty'](_0x8bc5('0x37'))){_0x4fb134[_0x8bc5('0x1d')]=qs['limit'](_0x487573[_0x8bc5('0x32')][_0x8bc5('0x1d')]);_0x4fb134[_0x8bc5('0x1f')]=qs[_0x8bc5('0x1f')](_0x487573['query'][_0x8bc5('0x1f')]);}_0x4fb134['order']=qs[_0x8bc5('0x38')](_0x487573[_0x8bc5('0x32')][_0x8bc5('0x38')]);_0x4fb134[_0x8bc5('0x39')]=qs[_0x8bc5('0x3a')](_[_0x8bc5('0x3b')](_0x487573[_0x8bc5('0x32')],_0x4422e0[_0x8bc5('0x3a')]),_0x2bda1c);if(_0x487573[_0x8bc5('0x32')][_0x8bc5('0x3c')]){_0x4fb134[_0x8bc5('0x39')]=_[_0x8bc5('0x3d')](_0x4fb134[_0x8bc5('0x39')],{'$or':_['map'](_0x2bda1c,function(_0x4c7c45){if(_0x4c7c45[_0x8bc5('0x2e')]!=='VIRTUAL'){var _0x13895f={};_0x13895f[_0x4c7c45[_0x8bc5('0x2a')]]={'$like':'%'+_0x487573[_0x8bc5('0x32')][_0x8bc5('0x3c')]+'%'};return _0x13895f;}})});}_0x4fb134=_['merge']({},_0x4fb134,_0x487573['options']);var _0x497449={'where':_0x4fb134['where']};return db[_0x8bc5('0x2d')]['count'](_0x497449)[_0x8bc5('0x25')](function(_0x35cba3){_0x42d7cb['count']=_0x35cba3;if(_0x487573[_0x8bc5('0x32')][_0x8bc5('0x3e')]){_0x4fb134[_0x8bc5('0x3f')]=[{'all':!![]}];}return db[_0x8bc5('0x2d')][_0x8bc5('0x40')](_0x4fb134);})[_0x8bc5('0x25')](function(_0x31ee90){_0x42d7cb['rows']=_0x31ee90;return _0x42d7cb;})[_0x8bc5('0x25')](respondWithFilteredResult(_0x2c7b33,_0x4fb134))[_0x8bc5('0x41')](handleError(_0x2c7b33,null));};exports[_0x8bc5('0x42')]=function(_0x46ad92,_0x1abefc){var _0x59d933={'raw':![],'where':{'id':_0x46ad92['params']['id']}},_0x263b25={};_0x263b25[_0x8bc5('0x30')]=_[_0x8bc5('0x31')](db[_0x8bc5('0x2d')][_0x8bc5('0x43')]);_0x263b25[_0x8bc5('0x32')]=_[_0x8bc5('0x31')](_0x46ad92['query']);_0x263b25[_0x8bc5('0x3a')]=_[_0x8bc5('0x33')](_0x263b25[_0x8bc5('0x30')],_0x263b25[_0x8bc5('0x32')]);_0x59d933[_0x8bc5('0x34')]=_[_0x8bc5('0x33')](_0x263b25[_0x8bc5('0x30')],qs[_0x8bc5('0x35')](_0x46ad92[_0x8bc5('0x32')][_0x8bc5('0x35')]));_0x59d933['attributes']=_0x59d933[_0x8bc5('0x34')][_0x8bc5('0x36')]?_0x59d933['attributes']:_0x263b25[_0x8bc5('0x30')];if(_0x46ad92[_0x8bc5('0x32')][_0x8bc5('0x3e')]){_0x59d933[_0x8bc5('0x3f')]=[{'all':!![]}];}_0x59d933=_[_0x8bc5('0x3d')]({},_0x59d933,_0x46ad92[_0x8bc5('0x44')]);return db['UserProfileSection'][_0x8bc5('0x45')](_0x59d933)[_0x8bc5('0x25')](handleEntityNotFound(_0x1abefc,null))['then'](respondWithResult(_0x1abefc,null))[_0x8bc5('0x41')](handleError(_0x1abefc,null));};exports[_0x8bc5('0x46')]=function(_0x359c05,_0x32febf){return db[_0x8bc5('0x2d')]['create'](_0x359c05[_0x8bc5('0x47')],{})[_0x8bc5('0x25')](respondWithResult(_0x32febf,0xc9))[_0x8bc5('0x41')](handleError(_0x32febf,null));};exports[_0x8bc5('0x24')]=function(_0x52bb5e,_0x555fb9){if(_0x52bb5e[_0x8bc5('0x47')]['id']){delete _0x52bb5e[_0x8bc5('0x47')]['id'];}return db[_0x8bc5('0x2d')][_0x8bc5('0x45')]({'where':{'id':_0x52bb5e[_0x8bc5('0x48')]['id']}})[_0x8bc5('0x25')](handleEntityNotFound(_0x555fb9,null))['then'](saveUpdates(_0x52bb5e[_0x8bc5('0x47')],null))[_0x8bc5('0x25')](respondWithResult(_0x555fb9,null))[_0x8bc5('0x41')](handleError(_0x555fb9,null));};exports[_0x8bc5('0x26')]=function(_0x4b253a,_0x99bf7f){return db[_0x8bc5('0x2d')][_0x8bc5('0x45')]({'where':{'id':_0x4b253a['params']['id']}})[_0x8bc5('0x25')](handleEntityNotFound(_0x99bf7f,null))[_0x8bc5('0x25')](removeEntity(_0x99bf7f,null))['catch'](handleError(_0x99bf7f,null));};exports['describe']=function(_0x2deb30,_0x1bda8e){return db[_0x8bc5('0x2d')][_0x8bc5('0x49')]()[_0x8bc5('0x25')](respondWithResult(_0x1bda8e,null))[_0x8bc5('0x41')](handleError(_0x1bda8e,null));}; \ No newline at end of file diff --git a/server/api/userProfileSection/userProfileSection.model.js b/server/api/userProfileSection/userProfileSection.model.js index aa8f558..c168854 100644 --- a/server/api/userProfileSection/userProfileSection.model.js +++ b/server/api/userProfileSection/userProfileSection.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x474b=['userProfileId','lodash','api','moment','request-promise','path','rimraf','../../config/environment','./userProfileSection.attributes','define','compositeIndex','sectionId'];(function(_0x1a3243,_0x201872){var _0x33f2ca=function(_0x59d32e){while(--_0x59d32e){_0x1a3243['push'](_0x1a3243['shift']());}};_0x33f2ca(++_0x201872);}(_0x474b,0x151));var _0xb474=function(_0x274274,_0x2120fe){_0x274274=_0x274274-0x0;var _0x176c90=_0x474b[_0x274274];return _0x176c90;};'use strict';var _=require(_0xb474('0x0'));var util=require('util');var logger=require('../../config/logger')(_0xb474('0x1'));var moment=require(_0xb474('0x2'));var BPromise=require('bluebird');var rp=require(_0xb474('0x3'));var fs=require('fs');var path=require(_0xb474('0x4'));var rimraf=require(_0xb474('0x5'));var config=require(_0xb474('0x6'));var attributes=require(_0xb474('0x7'));module['exports']=function(_0x2cde6d,_0x1b0ea8){return _0x2cde6d[_0xb474('0x8')]('UserProfileSection',attributes,{'tableName':'user_profile_has_sections','paranoid':![],'indexes':[{'name':_0xb474('0x9'),'fields':[_0xb474('0xa'),_0xb474('0xb')]}],'timestamps':!![]});}; \ No newline at end of file +var _0x45b2=['define','UserProfileSection','user_profile_has_sections','sectionId','userProfileId','util','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','./userProfileSection.attributes','exports'];(function(_0x1efe8b,_0x3dd139){var _0x163bce=function(_0x1f857e){while(--_0x1f857e){_0x1efe8b['push'](_0x1efe8b['shift']());}};_0x163bce(++_0x3dd139);}(_0x45b2,0xc8));var _0x245b=function(_0x37707f,_0xb89dd3){_0x37707f=_0x37707f-0x0;var _0x2a6595=_0x45b2[_0x37707f];return _0x2a6595;};'use strict';var _=require('lodash');var util=require(_0x245b('0x0'));var logger=require(_0x245b('0x1'))('api');var moment=require(_0x245b('0x2'));var BPromise=require(_0x245b('0x3'));var rp=require(_0x245b('0x4'));var fs=require('fs');var path=require(_0x245b('0x5'));var rimraf=require(_0x245b('0x6'));var config=require(_0x245b('0x7'));var attributes=require(_0x245b('0x8'));module[_0x245b('0x9')]=function(_0x7e6d7f,_0x461118){return _0x7e6d7f[_0x245b('0xa')](_0x245b('0xb'),attributes,{'tableName':_0x245b('0xc'),'paranoid':![],'indexes':[{'name':'compositeIndex','fields':[_0x245b('0xd'),_0x245b('0xe')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/userProfileSection/userProfileSection.rpc.js b/server/api/userProfileSection/userProfileSection.rpc.js index 6cdf679..1af1165 100644 --- a/server/api/userProfileSection/userProfileSection.rpc.js +++ b/server/api/userProfileSection/userProfileSection.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3f26=['debug','UserProfileSection,\x20%s,\x20%s,\x20%s','stringify','error','code','UserProfileSection,\x20%s,\x20%s','message','result','util','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','info','request\x20sent'];(function(_0x36eaaa,_0x326732){var _0x461349=function(_0x4e4180){while(--_0x4e4180){_0x36eaaa['push'](_0x36eaaa['shift']());}};_0x461349(++_0x326732);}(_0x3f26,0x8c));var _0x63f2=function(_0x9d673f,_0x383767){_0x9d673f=_0x9d673f-0x0;var _0x9ac26f=_0x3f26[_0x9d673f];return _0x9ac26f;};'use strict';var _=require('lodash');var util=require(_0x63f2('0x0'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x63f2('0x1'));var fs=require('fs');var Redis=require(_0x63f2('0x2'));var db=require(_0x63f2('0x3'))['db'];var utils=require(_0x63f2('0x4'));var logger=require(_0x63f2('0x5'))(_0x63f2('0x6'));var config=require('../../config/environment');var jayson=require(_0x63f2('0x7'));var client=jayson[_0x63f2('0x8')][_0x63f2('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x50595f,_0x14fa96,_0x5b5490){return new BPromise(function(_0x54a52b,_0x4bc9e7){return client[_0x63f2('0xa')](_0x50595f,_0x5b5490)[_0x63f2('0xb')](function(_0x3fac3f){logger[_0x63f2('0xc')]('UserProfileSection,\x20%s,\x20%s',_0x14fa96,_0x63f2('0xd'));logger[_0x63f2('0xe')](_0x63f2('0xf'),_0x14fa96,'request\x20sent',JSON[_0x63f2('0x10')](_0x3fac3f));if(_0x3fac3f[_0x63f2('0x11')]){if(_0x3fac3f[_0x63f2('0x11')][_0x63f2('0x12')]===0x1f4){logger[_0x63f2('0x11')](_0x63f2('0x13'),_0x14fa96,_0x3fac3f[_0x63f2('0x11')][_0x63f2('0x14')]);return _0x4bc9e7(_0x3fac3f[_0x63f2('0x11')][_0x63f2('0x14')]);}logger[_0x63f2('0x11')](_0x63f2('0x13'),_0x14fa96,_0x3fac3f[_0x63f2('0x11')][_0x63f2('0x14')]);return _0x54a52b(_0x3fac3f[_0x63f2('0x11')][_0x63f2('0x14')]);}else{logger[_0x63f2('0xc')](_0x63f2('0x13'),_0x14fa96,_0x63f2('0xd'));_0x54a52b(_0x3fac3f[_0x63f2('0x15')]['message']);}})['catch'](function(_0x5c033b){logger[_0x63f2('0x11')](_0x63f2('0x13'),_0x14fa96,_0x5c033b);_0x4bc9e7(_0x5c033b);});});} \ No newline at end of file +var _0x82c0=['../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','UserProfileSection,\x20%s,\x20%s','request\x20sent','UserProfileSection,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0x30f163,_0x34efec){var _0x58442a=function(_0x4c3529){while(--_0x4c3529){_0x30f163['push'](_0x30f163['shift']());}};_0x58442a(++_0x34efec);}(_0x82c0,0xa2));var _0x082c=function(_0x41bf62,_0x54649f){_0x41bf62=_0x41bf62-0x0;var _0x40a3dd=_0x82c0[_0x41bf62];return _0x40a3dd;};'use strict';var _=require(_0x082c('0x0'));var util=require('util');var moment=require(_0x082c('0x1'));var BPromise=require(_0x082c('0x2'));var rs=require(_0x082c('0x3'));var fs=require('fs');var Redis=require(_0x082c('0x4'));var db=require(_0x082c('0x5'))['db'];var utils=require(_0x082c('0x6'));var logger=require(_0x082c('0x7'))(_0x082c('0x8'));var config=require(_0x082c('0x9'));var jayson=require(_0x082c('0xa'));var client=jayson['client'][_0x082c('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x8e7f5,_0x2b1316,_0x50183f){return new BPromise(function(_0x1df217,_0x2f565c){return client[_0x082c('0xc')](_0x8e7f5,_0x50183f)[_0x082c('0xd')](function(_0x3da83d){logger[_0x082c('0xe')](_0x082c('0xf'),_0x2b1316,_0x082c('0x10'));logger['debug'](_0x082c('0x11'),_0x2b1316,'request\x20sent',JSON[_0x082c('0x12')](_0x3da83d));if(_0x3da83d[_0x082c('0x13')]){if(_0x3da83d[_0x082c('0x13')][_0x082c('0x14')]===0x1f4){logger[_0x082c('0x13')]('UserProfileSection,\x20%s,\x20%s',_0x2b1316,_0x3da83d[_0x082c('0x13')]['message']);return _0x2f565c(_0x3da83d[_0x082c('0x13')][_0x082c('0x15')]);}logger['error'](_0x082c('0xf'),_0x2b1316,_0x3da83d[_0x082c('0x13')][_0x082c('0x15')]);return _0x1df217(_0x3da83d['error'][_0x082c('0x15')]);}else{logger['info']('UserProfileSection,\x20%s,\x20%s',_0x2b1316,_0x082c('0x10'));_0x1df217(_0x3da83d[_0x082c('0x16')][_0x082c('0x15')]);}})[_0x082c('0x17')](function(_0x130817){logger[_0x082c('0x13')](_0x082c('0xf'),_0x2b1316,_0x130817);_0x2f565c(_0x130817);});});} \ No newline at end of file diff --git a/server/api/userSmsQueue/index.js b/server/api/userSmsQueue/index.js index 48d94af..ceee63f 100644 --- a/server/api/userSmsQueue/index.js +++ b/server/api/userSmsQueue/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x70e0=['../../components/auth/service','../../components/interaction/service','exports','multer','util','path','Router','fs-extra'];(function(_0x4a4d3d,_0x43e27a){var _0x29f217=function(_0x8aeb93){while(--_0x8aeb93){_0x4a4d3d['push'](_0x4a4d3d['shift']());}};_0x29f217(++_0x43e27a);}(_0x70e0,0x17b));var _0x070e=function(_0x327ed6,_0x12ee04){_0x327ed6=_0x327ed6-0x0;var _0x77ae70=_0x70e0[_0x327ed6];return _0x77ae70;};'use strict';var multer=require(_0x070e('0x0'));var util=require(_0x070e('0x1'));var path=require(_0x070e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x070e('0x3')]();var fs_extra=require(_0x070e('0x4'));var auth=require(_0x070e('0x5'));var interaction=require(_0x070e('0x6'));var config=require('../../config/environment');module[_0x070e('0x7')]=router; \ No newline at end of file +var _0x70e0=['../../components/auth/service','../../components/interaction/service','exports','multer','util','path','Router','fs-extra'];(function(_0x5428b3,_0x2bb88d){var _0x34926f=function(_0x51eeb5){while(--_0x51eeb5){_0x5428b3['push'](_0x5428b3['shift']());}};_0x34926f(++_0x2bb88d);}(_0x70e0,0x17b));var _0x070e=function(_0x1eb5eb,_0x592a01){_0x1eb5eb=_0x1eb5eb-0x0;var _0x1296b4=_0x70e0[_0x1eb5eb];return _0x1296b4;};'use strict';var multer=require(_0x070e('0x0'));var util=require(_0x070e('0x1'));var path=require(_0x070e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x070e('0x3')]();var fs_extra=require(_0x070e('0x4'));var auth=require(_0x070e('0x5'));var interaction=require(_0x070e('0x6'));var config=require('../../config/environment');module[_0x070e('0x7')]=router; \ No newline at end of file diff --git a/server/api/userSmsQueue/userSmsQueue.attributes.js b/server/api/userSmsQueue/userSmsQueue.attributes.js index e3b0faa..6120a7d 100644 --- a/server/api/userSmsQueue/userSmsQueue.attributes.js +++ b/server/api/userSmsQueue/userSmsQueue.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4172=['sequelize','INTEGER'];(function(_0x51f7a3,_0x3f9940){var _0x174039=function(_0x4bf86e){while(--_0x4bf86e){_0x51f7a3['push'](_0x51f7a3['shift']());}};_0x174039(++_0x3f9940);}(_0x4172,0x1aa));var _0x2417=function(_0x55fc6e,_0x433bf4){_0x55fc6e=_0x55fc6e-0x0;var _0x58f02e=_0x4172[_0x55fc6e];return _0x58f02e;};'use strict';var Sequelize=require(_0x2417('0x0'));module['exports']={'penalty':{'type':Sequelize[_0x2417('0x1')],'defaultValue':0x0}}; \ No newline at end of file +var _0x8649=['INTEGER'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x8649,0x7a));var _0x9864=function(_0x265e31,_0x2d91d9){_0x265e31=_0x265e31-0x0;var _0x5de868=_0x8649[_0x265e31];return _0x5de868;};'use strict';var Sequelize=require('sequelize');module['exports']={'penalty':{'type':Sequelize[_0x9864('0x0')],'defaultValue':0x0}}; \ No newline at end of file diff --git a/server/api/userSmsQueue/userSmsQueue.model.js b/server/api/userSmsQueue/userSmsQueue.model.js index 63dcf83..a7b9934 100644 --- a/server/api/userSmsQueue/userSmsQueue.model.js +++ b/server/api/userSmsQueue/userSmsQueue.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3024=['user_has_sms_queues','lodash','util','api','moment','path','../../config/environment','./userSmsQueue.attributes','UserSmsQueue'];(function(_0x3ec6cf,_0x5149d6){var _0x4cd76a=function(_0x4cf8c6){while(--_0x4cf8c6){_0x3ec6cf['push'](_0x3ec6cf['shift']());}};_0x4cd76a(++_0x5149d6);}(_0x3024,0x64));var _0x4302=function(_0x458beb,_0x375b50){_0x458beb=_0x458beb-0x0;var _0x46df20=_0x3024[_0x458beb];return _0x46df20;};'use strict';var _=require(_0x4302('0x0'));var util=require(_0x4302('0x1'));var logger=require('../../config/logger')(_0x4302('0x2'));var moment=require(_0x4302('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x4302('0x4'));var rimraf=require('rimraf');var config=require(_0x4302('0x5'));var attributes=require(_0x4302('0x6'));module['exports']=function(_0x13d051,_0x5f20){return _0x13d051['define'](_0x4302('0x7'),attributes,{'tableName':_0x4302('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x1a37=['../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','exports','define','UserSmsQueue','user_has_sms_queues','lodash','util'];(function(_0xa3bab9,_0x3dd4f9){var _0x384df4=function(_0x562ebc){while(--_0x562ebc){_0xa3bab9['push'](_0xa3bab9['shift']());}};_0x384df4(++_0x3dd4f9);}(_0x1a37,0xb4));var _0x71a3=function(_0x2fc012,_0x503e5b){_0x2fc012=_0x2fc012-0x0;var _0x2891f9=_0x1a37[_0x2fc012];return _0x2891f9;};'use strict';var _=require(_0x71a3('0x0'));var util=require(_0x71a3('0x1'));var logger=require(_0x71a3('0x2'))(_0x71a3('0x3'));var moment=require(_0x71a3('0x4'));var BPromise=require(_0x71a3('0x5'));var rp=require(_0x71a3('0x6'));var fs=require('fs');var path=require(_0x71a3('0x7'));var rimraf=require(_0x71a3('0x8'));var config=require(_0x71a3('0x9'));var attributes=require('./userSmsQueue.attributes');module[_0x71a3('0xa')]=function(_0x4f6b7a,_0xd09f7){return _0x4f6b7a[_0x71a3('0xb')](_0x71a3('0xc'),attributes,{'tableName':_0x71a3('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/userSmsQueue/userSmsQueue.rpc.js b/server/api/userSmsQueue/userSmsQueue.rpc.js index c21e224..77ab6fd 100644 --- a/server/api/userSmsQueue/userSmsQueue.rpc.js +++ b/server/api/userSmsQueue/userSmsQueue.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x08e6=['client','http','request','then','info','UserSmsQueue,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','UserSmsQueue,\x20%s,\x20%s','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc'];(function(_0x383627,_0x5be16e){var _0x2c16a0=function(_0x569b72){while(--_0x569b72){_0x383627['push'](_0x383627['shift']());}};_0x2c16a0(++_0x5be16e);}(_0x08e6,0x6e));var _0x608e=function(_0x4b6258,_0x214db8){_0x4b6258=_0x4b6258-0x0;var _0x448bf6=_0x08e6[_0x4b6258];return _0x448bf6;};'use strict';var _=require(_0x608e('0x0'));var util=require(_0x608e('0x1'));var moment=require(_0x608e('0x2'));var BPromise=require(_0x608e('0x3'));var rs=require(_0x608e('0x4'));var fs=require('fs');var Redis=require(_0x608e('0x5'));var db=require(_0x608e('0x6'))['db'];var utils=require(_0x608e('0x7'));var logger=require(_0x608e('0x8'))(_0x608e('0x9'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x608e('0xa')][_0x608e('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x44577a,_0x387d58,_0x120963){return new BPromise(function(_0x236db8,_0x32aaa4){return client[_0x608e('0xc')](_0x44577a,_0x120963)[_0x608e('0xd')](function(_0x5d3ce9){logger[_0x608e('0xe')]('UserSmsQueue,\x20%s,\x20%s',_0x387d58,'request\x20sent');logger['debug'](_0x608e('0xf'),_0x387d58,_0x608e('0x10'),JSON[_0x608e('0x11')](_0x5d3ce9));if(_0x5d3ce9[_0x608e('0x12')]){if(_0x5d3ce9[_0x608e('0x12')][_0x608e('0x13')]===0x1f4){logger[_0x608e('0x12')](_0x608e('0x14'),_0x387d58,_0x5d3ce9['error']['message']);return _0x32aaa4(_0x5d3ce9[_0x608e('0x12')][_0x608e('0x15')]);}logger[_0x608e('0x12')](_0x608e('0x14'),_0x387d58,_0x5d3ce9[_0x608e('0x12')][_0x608e('0x15')]);return _0x236db8(_0x5d3ce9[_0x608e('0x12')]['message']);}else{logger[_0x608e('0xe')](_0x608e('0x14'),_0x387d58,_0x608e('0x10'));_0x236db8(_0x5d3ce9[_0x608e('0x16')][_0x608e('0x15')]);}})[_0x608e('0x17')](function(_0x38bd67){logger['error'](_0x608e('0x14'),_0x387d58,_0x38bd67);_0x32aaa4(_0x38bd67);});});} \ No newline at end of file +var _0x9d00=['request','then','info','debug','request\x20sent','stringify','error','UserSmsQueue,\x20%s,\x20%s','message','result','catch','util','bluebird','randomstring','ioredis','../../config/logger','../../config/environment','http'];(function(_0x148d47,_0x3d6c45){var _0x3e5488=function(_0x1c9854){while(--_0x1c9854){_0x148d47['push'](_0x148d47['shift']());}};_0x3e5488(++_0x3d6c45);}(_0x9d00,0xbf));var _0x09d0=function(_0x3b8ca6,_0x1488dc){_0x3b8ca6=_0x3b8ca6-0x0;var _0x572f41=_0x9d00[_0x3b8ca6];return _0x572f41;};'use strict';var _=require('lodash');var util=require(_0x09d0('0x0'));var moment=require('moment');var BPromise=require(_0x09d0('0x1'));var rs=require(_0x09d0('0x2'));var fs=require('fs');var Redis=require(_0x09d0('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x09d0('0x4'))('rpc');var config=require(_0x09d0('0x5'));var jayson=require('jayson/promise');var client=jayson['client'][_0x09d0('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x44ecb6,_0x240158,_0x5df2aa){return new BPromise(function(_0x1be47c,_0x1b2c9f){return client[_0x09d0('0x7')](_0x44ecb6,_0x5df2aa)[_0x09d0('0x8')](function(_0xb93157){logger[_0x09d0('0x9')]('UserSmsQueue,\x20%s,\x20%s',_0x240158,'request\x20sent');logger[_0x09d0('0xa')]('UserSmsQueue,\x20%s,\x20%s,\x20%s',_0x240158,_0x09d0('0xb'),JSON[_0x09d0('0xc')](_0xb93157));if(_0xb93157[_0x09d0('0xd')]){if(_0xb93157[_0x09d0('0xd')]['code']===0x1f4){logger['error'](_0x09d0('0xe'),_0x240158,_0xb93157['error'][_0x09d0('0xf')]);return _0x1b2c9f(_0xb93157[_0x09d0('0xd')][_0x09d0('0xf')]);}logger[_0x09d0('0xd')](_0x09d0('0xe'),_0x240158,_0xb93157['error'][_0x09d0('0xf')]);return _0x1be47c(_0xb93157[_0x09d0('0xd')]['message']);}else{logger[_0x09d0('0x9')](_0x09d0('0xe'),_0x240158,_0x09d0('0xb'));_0x1be47c(_0xb93157[_0x09d0('0x10')][_0x09d0('0xf')]);}})[_0x09d0('0x11')](function(_0x4b4e1b){logger['error'](_0x09d0('0xe'),_0x240158,_0x4b4e1b);_0x1b2c9f(_0x4b4e1b);});});} \ No newline at end of file diff --git a/server/api/userVoiceQueue/index.js b/server/api/userVoiceQueue/index.js index e79b628..48427e0 100644 --- a/server/api/userVoiceQueue/index.js +++ b/server/api/userVoiceQueue/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['../../components/interaction/service','../../config/environment','exports','multer','util','path','Router','../../components/auth/service'];(function(_0x158b34,_0x2a8fb1){var _0x2f5449=function(_0x58de0a){while(--_0x58de0a){_0x158b34['push'](_0x158b34['shift']());}};_0x2f5449(++_0x2a8fb1);}(_0xa9e0,0x123));var _0x0a9e=function(_0x433a86,_0x175b5c){_0x433a86=_0x433a86-0x0;var _0x23000c=_0xa9e0[_0x433a86];return _0x23000c;};'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'));module[_0x0a9e('0x7')]=router; \ No newline at end of file +var _0x0713=['../../config/environment','exports','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service'];(function(_0x191934,_0x43a9fe){var _0x44bfed=function(_0x5d4643){while(--_0x5d4643){_0x191934['push'](_0x191934['shift']());}};_0x44bfed(++_0x43a9fe);}(_0x0713,0x1ba));var _0x3071=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0713[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x3071('0x0'));var timeout=require(_0x3071('0x1'));var express=require(_0x3071('0x2'));var router=express[_0x3071('0x3')]();var fs_extra=require(_0x3071('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x3071('0x5'));var config=require(_0x3071('0x6'));module[_0x3071('0x7')]=router; \ No newline at end of file diff --git a/server/api/userVoiceQueue/userVoiceQueue.attributes.js b/server/api/userVoiceQueue/userVoiceQueue.attributes.js index e8c42b0..f02c014 100644 --- a/server/api/userVoiceQueue/userVoiceQueue.attributes.js +++ b/server/api/userVoiceQueue/userVoiceQueue.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xaf92=['exports','INTEGER','sequelize'];(function(_0x5676fc,_0x1507e4){var _0x13999b=function(_0x11395a){while(--_0x11395a){_0x5676fc['push'](_0x5676fc['shift']());}};_0x13999b(++_0x1507e4);}(_0xaf92,0x185));var _0x2af9=function(_0x5cd23e,_0x20777b){_0x5cd23e=_0x5cd23e-0x0;var _0x216550=_0xaf92[_0x5cd23e];return _0x216550;};'use strict';var Sequelize=require(_0x2af9('0x0'));module[_0x2af9('0x1')]={'penalty':{'type':Sequelize[_0x2af9('0x2')],'defaultValue':0x0}}; \ No newline at end of file +var _0xbd1e=['exports'];(function(_0x2f376b,_0x237a92){var _0x299e6f=function(_0x27a125){while(--_0x27a125){_0x2f376b['push'](_0x2f376b['shift']());}};_0x299e6f(++_0x237a92);}(_0xbd1e,0x1bc));var _0xebd1=function(_0x2abd13,_0x501317){_0x2abd13=_0x2abd13-0x0;var _0x5ad645=_0xbd1e[_0x2abd13];return _0x5ad645;};'use strict';var Sequelize=require('sequelize');module[_0xebd1('0x0')]={'penalty':{'type':Sequelize['INTEGER'],'defaultValue':0x0}}; \ No newline at end of file diff --git a/server/api/userVoiceQueue/userVoiceQueue.model.js b/server/api/userVoiceQueue/userVoiceQueue.model.js index 2d67132..6168316 100644 --- a/server/api/userVoiceQueue/userVoiceQueue.model.js +++ b/server/api/userVoiceQueue/userVoiceQueue.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1894=['../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','./userVoiceQueue.attributes','exports','define','user_has_voice_queues','lodash','util'];(function(_0x54c955,_0x37185e){var _0x485393=function(_0x227ffb){while(--_0x227ffb){_0x54c955['push'](_0x54c955['shift']());}};_0x485393(++_0x37185e);}(_0x1894,0x1d2));var _0x4189=function(_0x349148,_0x31eabb){_0x349148=_0x349148-0x0;var _0x2f2b0f=_0x1894[_0x349148];return _0x2f2b0f;};'use strict';var _=require(_0x4189('0x0'));var util=require(_0x4189('0x1'));var logger=require(_0x4189('0x2'))(_0x4189('0x3'));var moment=require(_0x4189('0x4'));var BPromise=require(_0x4189('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x4189('0x6'));var rimraf=require(_0x4189('0x7'));var config=require(_0x4189('0x8'));var attributes=require(_0x4189('0x9'));module[_0x4189('0xa')]=function(_0xfb8e9c,_0x154746){return _0xfb8e9c[_0x4189('0xb')]('UserVoiceQueue',attributes,{'tableName':_0x4189('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xe27b=['api','moment','request-promise','path','rimraf','../../config/environment','./userVoiceQueue.attributes','exports','user_has_voice_queues','lodash','../../config/logger'];(function(_0x502c7d,_0x2f1285){var _0x30b7ed=function(_0x2d92f3){while(--_0x2d92f3){_0x502c7d['push'](_0x502c7d['shift']());}};_0x30b7ed(++_0x2f1285);}(_0xe27b,0x1c1));var _0xbe27=function(_0x5f24c8,_0x5d02b1){_0x5f24c8=_0x5f24c8-0x0;var _0x52ce62=_0xe27b[_0x5f24c8];return _0x52ce62;};'use strict';var _=require(_0xbe27('0x0'));var util=require('util');var logger=require(_0xbe27('0x1'))(_0xbe27('0x2'));var moment=require(_0xbe27('0x3'));var BPromise=require('bluebird');var rp=require(_0xbe27('0x4'));var fs=require('fs');var path=require(_0xbe27('0x5'));var rimraf=require(_0xbe27('0x6'));var config=require(_0xbe27('0x7'));var attributes=require(_0xbe27('0x8'));module[_0xbe27('0x9')]=function(_0x483fc8,_0x2b2282){return _0x483fc8['define']('UserVoiceQueue',attributes,{'tableName':_0xbe27('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/userVoiceQueue/userVoiceQueue.rpc.js b/server/api/userVoiceQueue/userVoiceQueue.rpc.js index 9d02674..037ad1c 100644 --- a/server/api/userVoiceQueue/userVoiceQueue.rpc.js +++ b/server/api/userVoiceQueue/userVoiceQueue.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6b95=['UserVoiceQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','util','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','client','http','request','then','UserVoiceQueue,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x29ae58,_0x575c6b){var _0x55c72f=function(_0x3ce22e){while(--_0x3ce22e){_0x29ae58['push'](_0x29ae58['shift']());}};_0x55c72f(++_0x575c6b);}(_0x6b95,0x118));var _0x56b9=function(_0x2ada4b,_0x26d0e1){_0x2ada4b=_0x2ada4b-0x0;var _0x184562=_0x6b95[_0x2ada4b];return _0x184562;};'use strict';var _=require('lodash');var util=require(_0x56b9('0x0'));var moment=require('moment');var BPromise=require(_0x56b9('0x1'));var rs=require(_0x56b9('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x56b9('0x3'))['db'];var utils=require(_0x56b9('0x4'));var logger=require('../../config/logger')('rpc');var config=require(_0x56b9('0x5'));var jayson=require(_0x56b9('0x6'));var client=jayson[_0x56b9('0x7')][_0x56b9('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x1bc0a6,_0xcd0906,_0x589a3c){return new BPromise(function(_0x25508a,_0x2f54fa){return client[_0x56b9('0x9')](_0x1bc0a6,_0x589a3c)[_0x56b9('0xa')](function(_0x597303){logger['info'](_0x56b9('0xb'),_0xcd0906,_0x56b9('0xc'));logger[_0x56b9('0xd')](_0x56b9('0xe'),_0xcd0906,'request\x20sent',JSON[_0x56b9('0xf')](_0x597303));if(_0x597303['error']){if(_0x597303[_0x56b9('0x10')][_0x56b9('0x11')]===0x1f4){logger[_0x56b9('0x10')]('UserVoiceQueue,\x20%s,\x20%s',_0xcd0906,_0x597303[_0x56b9('0x10')]['message']);return _0x2f54fa(_0x597303[_0x56b9('0x10')][_0x56b9('0x12')]);}logger[_0x56b9('0x10')](_0x56b9('0xb'),_0xcd0906,_0x597303['error'][_0x56b9('0x12')]);return _0x25508a(_0x597303['error']['message']);}else{logger[_0x56b9('0x13')](_0x56b9('0xb'),_0xcd0906,_0x56b9('0xc'));_0x25508a(_0x597303[_0x56b9('0x14')][_0x56b9('0x12')]);}})['catch'](function(_0x373b3d){logger[_0x56b9('0x10')]('UserVoiceQueue,\x20%s,\x20%s',_0xcd0906,_0x373b3d);_0x2f54fa(_0x373b3d);});});} \ No newline at end of file +var _0x9f0d=['../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','debug','UserVoiceQueue,\x20%s,\x20%s,\x20%s','error','UserVoiceQueue,\x20%s,\x20%s','message','result','catch','lodash','util','bluebird','ioredis','../../mysqldb','../../config/utils'];(function(_0x2b4411,_0x2625ed){var _0x8e41ef=function(_0x2aa8c1){while(--_0x2aa8c1){_0x2b4411['push'](_0x2b4411['shift']());}};_0x8e41ef(++_0x2625ed);}(_0x9f0d,0x1b2));var _0xd9f0=function(_0x39f097,_0x17116b){_0x39f097=_0x39f097-0x0;var _0x544f6a=_0x9f0d[_0x39f097];return _0x544f6a;};'use strict';var _=require(_0xd9f0('0x0'));var util=require(_0xd9f0('0x1'));var moment=require('moment');var BPromise=require(_0xd9f0('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xd9f0('0x3'));var db=require(_0xd9f0('0x4'))['db'];var utils=require(_0xd9f0('0x5'));var logger=require(_0xd9f0('0x6'))('rpc');var config=require(_0xd9f0('0x7'));var jayson=require(_0xd9f0('0x8'));var client=jayson[_0xd9f0('0x9')][_0xd9f0('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x530236,_0x5518bc,_0x180006){return new BPromise(function(_0x1d971a,_0x341790){return client[_0xd9f0('0xb')](_0x530236,_0x180006)[_0xd9f0('0xc')](function(_0x2851b0){logger[_0xd9f0('0xd')]('UserVoiceQueue,\x20%s,\x20%s',_0x5518bc,_0xd9f0('0xe'));logger[_0xd9f0('0xf')](_0xd9f0('0x10'),_0x5518bc,_0xd9f0('0xe'),JSON['stringify'](_0x2851b0));if(_0x2851b0['error']){if(_0x2851b0[_0xd9f0('0x11')]['code']===0x1f4){logger[_0xd9f0('0x11')](_0xd9f0('0x12'),_0x5518bc,_0x2851b0[_0xd9f0('0x11')][_0xd9f0('0x13')]);return _0x341790(_0x2851b0[_0xd9f0('0x11')][_0xd9f0('0x13')]);}logger[_0xd9f0('0x11')](_0xd9f0('0x12'),_0x5518bc,_0x2851b0['error'][_0xd9f0('0x13')]);return _0x1d971a(_0x2851b0[_0xd9f0('0x11')][_0xd9f0('0x13')]);}else{logger[_0xd9f0('0xd')](_0xd9f0('0x12'),_0x5518bc,'request\x20sent');_0x1d971a(_0x2851b0[_0xd9f0('0x14')][_0xd9f0('0x13')]);}})[_0xd9f0('0x15')](function(_0x33d7e3){logger[_0xd9f0('0x11')](_0xd9f0('0x12'),_0x5518bc,_0x33d7e3);_0x341790(_0x33d7e3);});});} \ No newline at end of file diff --git a/server/api/userVoiceQueueRt/index.js b/server/api/userVoiceQueueRt/index.js index b27737d..38179e0 100644 --- a/server/api/userVoiceQueueRt/index.js +++ b/server/api/userVoiceQueueRt/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xcb91=['express','Router','../../components/auth/service','../../components/interaction/service','exports','path','connect-timeout'];(function(_0x5f54ce,_0x4ef8f8){var _0x112ac5=function(_0x282913){while(--_0x282913){_0x5f54ce['push'](_0x5f54ce['shift']());}};_0x112ac5(++_0x4ef8f8);}(_0xcb91,0x1a9));var _0x1cb9=function(_0x1b1a3b,_0x52a88a){_0x1b1a3b=_0x1b1a3b-0x0;var _0x385347=_0xcb91[_0x1b1a3b];return _0x385347;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x1cb9('0x0'));var timeout=require(_0x1cb9('0x1'));var express=require(_0x1cb9('0x2'));var router=express[_0x1cb9('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x1cb9('0x4'));var interaction=require(_0x1cb9('0x5'));var config=require('../../config/environment');module[_0x1cb9('0x6')]=router; \ No newline at end of file +var _0xd8b0=['Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','multer','util'];(function(_0x589f99,_0x2e94d3){var _0x8f928c=function(_0x3f3168){while(--_0x3f3168){_0x589f99['push'](_0x589f99['shift']());}};_0x8f928c(++_0x2e94d3);}(_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'));module['exports']=router; \ No newline at end of file diff --git a/server/api/userVoiceQueueRt/userVoiceQueueRt.attributes.js b/server/api/userVoiceQueueRt/userVoiceQueueRt.attributes.js index 3db1966..a81ebe2 100644 --- a/server/api/userVoiceQueueRt/userVoiceQueueRt.attributes.js +++ b/server/api/userVoiceQueueRt/userVoiceQueueRt.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbec2=['queue_interface','sequelize','exports','INTEGER','Required\x20by\x20Asterisk','STRING'];(function(_0x5d5bcb,_0x25e2ea){var _0x4ea5eb=function(_0x36782b){while(--_0x36782b){_0x5d5bcb['push'](_0x5d5bcb['shift']());}};_0x4ea5eb(++_0x25e2ea);}(_0xbec2,0x1ab));var _0x2bec=function(_0x139c19,_0x4eb651){_0x139c19=_0x139c19-0x0;var _0x2a1166=_0xbec2[_0x139c19];return _0x2a1166;};'use strict';var Sequelize=require(_0x2bec('0x0'));module[_0x2bec('0x1')]={'uniqueid':{'type':Sequelize[_0x2bec('0x2')],'primaryKey':!![],'autoIncrement':!![],'comment':_0x2bec('0x3')},'membername':{'type':Sequelize[_0x2bec('0x4')],'allowNull':![],'comment':_0x2bec('0x3')},'UserId':{'type':Sequelize[_0x2bec('0x2')],'allowNull':![]},'queue_name':{'type':Sequelize[_0x2bec('0x4')],'allowNull':![],'unique':_0x2bec('0x5'),'comment':_0x2bec('0x3')},'VoiceQueueId':{'type':Sequelize['INTEGER'],'allowNull':![]},'interface':{'type':Sequelize[_0x2bec('0x4')],'allowNull':![],'unique':_0x2bec('0x5'),'comment':_0x2bec('0x3')},'penalty':{'type':Sequelize[_0x2bec('0x2')](0xb),'defaultValue':0x0,'comment':_0x2bec('0x3')},'paused':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x0,'comment':'Required\x20by\x20Asterisk'}}; \ No newline at end of file +var _0x8423=['STRING','INTEGER','queue_interface','sequelize','exports','Required\x20by\x20Asterisk'];(function(_0x5a7da7,_0x4f132a){var _0x14459e=function(_0x4daa47){while(--_0x4daa47){_0x5a7da7['push'](_0x5a7da7['shift']());}};_0x14459e(++_0x4f132a);}(_0x8423,0x12f));var _0x3842=function(_0x2556bb,_0x450e05){_0x2556bb=_0x2556bb-0x0;var _0x568e56=_0x8423[_0x2556bb];return _0x568e56;};'use strict';var Sequelize=require(_0x3842('0x0'));module[_0x3842('0x1')]={'uniqueid':{'type':Sequelize['INTEGER'],'primaryKey':!![],'autoIncrement':!![],'comment':_0x3842('0x2')},'membername':{'type':Sequelize[_0x3842('0x3')],'allowNull':![],'comment':_0x3842('0x2')},'UserId':{'type':Sequelize[_0x3842('0x4')],'allowNull':![]},'queue_name':{'type':Sequelize[_0x3842('0x3')],'allowNull':![],'unique':_0x3842('0x5'),'comment':'Required\x20by\x20Asterisk'},'VoiceQueueId':{'type':Sequelize[_0x3842('0x4')],'allowNull':![]},'interface':{'type':Sequelize[_0x3842('0x3')],'allowNull':![],'unique':_0x3842('0x5'),'comment':_0x3842('0x2')},'penalty':{'type':Sequelize[_0x3842('0x4')](0xb),'defaultValue':0x0,'comment':'Required\x20by\x20Asterisk'},'paused':{'type':Sequelize[_0x3842('0x4')](0xb),'defaultValue':0x0,'comment':_0x3842('0x2')}}; \ No newline at end of file diff --git a/server/api/userVoiceQueueRt/userVoiceQueueRt.events.js b/server/api/userVoiceQueueRt/userVoiceQueueRt.events.js index 8f4ce18..e434c68 100644 --- a/server/api/userVoiceQueueRt/userVoiceQueueRt.events.js +++ b/server/api/userVoiceQueueRt/userVoiceQueueRt.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x35e2=['emit','hasOwnProperty','hook','exports','events','../../mysqldb','UserVoiceQueueRt','setMaxListeners','save','update','remove'];(function(_0x346737,_0x3e6081){var _0x1ade2e=function(_0x15e50e){while(--_0x15e50e){_0x346737['push'](_0x346737['shift']());}};_0x1ade2e(++_0x3e6081);}(_0x35e2,0x159));var _0x235e=function(_0x3ff085,_0x27c92e){_0x3ff085=_0x3ff085-0x0;var _0x2b68c3=_0x35e2[_0x3ff085];return _0x2b68c3;};'use strict';var EventEmitter=require(_0x235e('0x0'));var UserVoiceQueueRt=require(_0x235e('0x1'))['db'][_0x235e('0x2')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0x235e('0x3')](0x0);var events={'afterCreate':_0x235e('0x4'),'afterUpdate':_0x235e('0x5'),'afterDestroy':_0x235e('0x6')};function emitEvent(_0x4ef58e){return function(_0xc4ce0c,_0x4838e0,_0x13aeb6){UserVoiceQueueRtEvents[_0x235e('0x7')](_0x4ef58e+':'+_0xc4ce0c['id'],_0xc4ce0c);UserVoiceQueueRtEvents[_0x235e('0x7')](_0x4ef58e,_0xc4ce0c);_0x13aeb6(null);};}for(var e in events){if(events[_0x235e('0x8')](e)){var event=events[e];UserVoiceQueueRt[_0x235e('0x9')](e,emitEvent(event));}}module[_0x235e('0xa')]=UserVoiceQueueRtEvents; \ No newline at end of file +var _0x8198=['setMaxListeners','save','remove','emit','hasOwnProperty','hook','../../mysqldb','UserVoiceQueueRt'];(function(_0x12b139,_0x22b030){var _0x543e7e=function(_0x5c0a09){while(--_0x5c0a09){_0x12b139['push'](_0x12b139['shift']());}};_0x543e7e(++_0x22b030);}(_0x8198,0x1be));var _0x8819=function(_0x3bef2c,_0x5a86fd){_0x3bef2c=_0x3bef2c-0x0;var _0x331503=_0x8198[_0x3bef2c];return _0x331503;};'use strict';var EventEmitter=require('events');var UserVoiceQueueRt=require(_0x8819('0x0'))['db'][_0x8819('0x1')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0x8819('0x2')](0x0);var events={'afterCreate':_0x8819('0x3'),'afterUpdate':'update','afterDestroy':_0x8819('0x4')};function emitEvent(_0xb6b407){return function(_0x520e6c,_0x17bbcd,_0x2c60ee){UserVoiceQueueRtEvents[_0x8819('0x5')](_0xb6b407+':'+_0x520e6c['id'],_0x520e6c);UserVoiceQueueRtEvents[_0x8819('0x5')](_0xb6b407,_0x520e6c);_0x2c60ee(null);};}for(var e in events){if(events[_0x8819('0x6')](e)){var event=events[e];UserVoiceQueueRt[_0x8819('0x7')](e,emitEvent(event));}}module['exports']=UserVoiceQueueRtEvents; \ No newline at end of file diff --git a/server/api/userVoiceQueueRt/userVoiceQueueRt.model.js b/server/api/userVoiceQueueRt/userVoiceQueueRt.model.js index 458d038..68e74b7 100644 --- a/server/api/userVoiceQueueRt/userVoiceQueueRt.model.js +++ b/server/api/userVoiceQueueRt/userVoiceQueueRt.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6ef3=['moment','bluebird','request-promise','path','rimraf','../../config/environment','./userVoiceQueueRt.attributes','exports','UserVoiceQueueRt','user_has_voice_queues_rt','lodash','util','../../config/logger'];(function(_0x27c1f0,_0x1fe703){var _0xbc2910=function(_0x24a2fa){while(--_0x24a2fa){_0x27c1f0['push'](_0x27c1f0['shift']());}};_0xbc2910(++_0x1fe703);}(_0x6ef3,0x1de));var _0x36ef=function(_0x4b5124,_0x3b7c23){_0x4b5124=_0x4b5124-0x0;var _0x37939e=_0x6ef3[_0x4b5124];return _0x37939e;};'use strict';var _=require(_0x36ef('0x0'));var util=require(_0x36ef('0x1'));var logger=require(_0x36ef('0x2'))('api');var moment=require(_0x36ef('0x3'));var BPromise=require(_0x36ef('0x4'));var rp=require(_0x36ef('0x5'));var fs=require('fs');var path=require(_0x36ef('0x6'));var rimraf=require(_0x36ef('0x7'));var config=require(_0x36ef('0x8'));var attributes=require(_0x36ef('0x9'));module[_0x36ef('0xa')]=function(_0x48a2bd,_0x16c6c8){return _0x48a2bd['define'](_0x36ef('0xb'),attributes,{'tableName':_0x36ef('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x3c63=['user_has_voice_queues_rt','util','../../config/logger','moment','path','../../config/environment','./userVoiceQueueRt.attributes','exports','UserVoiceQueueRt'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0x3c63,0x1f0));var _0x33c6=function(_0x246cbe,_0x19305c){_0x246cbe=_0x246cbe-0x0;var _0x855b0=_0x3c63[_0x246cbe];return _0x855b0;};'use strict';var _=require('lodash');var util=require(_0x33c6('0x0'));var logger=require(_0x33c6('0x1'))('api');var moment=require(_0x33c6('0x2'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x33c6('0x3'));var rimraf=require('rimraf');var config=require(_0x33c6('0x4'));var attributes=require(_0x33c6('0x5'));module[_0x33c6('0x6')]=function(_0x52fbef,_0x4b8d01){return _0x52fbef['define'](_0x33c6('0x7'),attributes,{'tableName':_0x33c6('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/userVoiceQueueRt/userVoiceQueueRt.rpc.js b/server/api/userVoiceQueueRt/userVoiceQueueRt.rpc.js index bad52ec..bba71b7 100644 --- a/server/api/userVoiceQueueRt/userVoiceQueueRt.rpc.js +++ b/server/api/userVoiceQueueRt/userVoiceQueueRt.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa265=['then','UserVoiceQueueRt,\x20%s,\x20%s','request\x20sent','UserVoiceQueueRt,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','UserVoiceQueueRt','options','raw','where','sequelize','COUNT','`paused`\x20=\x201,\x201,\x20null','outboundQueuePauses','info','debug','GetVoiceQueueRtPauses','util','bluebird','randomstring','../../mysqldb','../../config/logger','rpc','jayson/promise','defaults','redis','localhost','./userVoiceQueueRt.socket','register','request'];(function(_0x4dfc77,_0x2b707a){var _0x2be7a8=function(_0x5ad3b0){while(--_0x5ad3b0){_0x4dfc77['push'](_0x4dfc77['shift']());}};_0x2be7a8(++_0x2b707a);}(_0xa265,0x103));var _0x5a26=function(_0x4e6c46,_0x53a34b){_0x4e6c46=_0x4e6c46-0x0;var _0x36cc90=_0xa265[_0x4e6c46];return _0x36cc90;};'use strict';var _=require('lodash');var util=require(_0x5a26('0x0'));var moment=require('moment');var BPromise=require(_0x5a26('0x1'));var rs=require(_0x5a26('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x5a26('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0x5a26('0x4'))(_0x5a26('0x5'));var config=require('../../config/environment');var jayson=require(_0x5a26('0x6'));var client=jayson['client']['http']({'port':0x232a});config['redis']=_[_0x5a26('0x7')](config[_0x5a26('0x8')],{'host':_0x5a26('0x9'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x5a26('0x8')]));require(_0x5a26('0xa'))[_0x5a26('0xb')](socket);function respondWithRpcPromise(_0x4ae5c9,_0x483d0f,_0x1c4ad0){return new BPromise(function(_0x976d2a,_0x36d4d4){return client[_0x5a26('0xc')](_0x4ae5c9,_0x1c4ad0)[_0x5a26('0xd')](function(_0x395793){logger['info'](_0x5a26('0xe'),_0x483d0f,_0x5a26('0xf'));logger['debug'](_0x5a26('0x10'),_0x483d0f,_0x5a26('0xf'),JSON[_0x5a26('0x11')](_0x395793));if(_0x395793[_0x5a26('0x12')]){if(_0x395793[_0x5a26('0x12')][_0x5a26('0x13')]===0x1f4){logger[_0x5a26('0x12')](_0x5a26('0xe'),_0x483d0f,_0x395793[_0x5a26('0x12')][_0x5a26('0x14')]);return _0x36d4d4(_0x395793[_0x5a26('0x12')][_0x5a26('0x14')]);}logger[_0x5a26('0x12')](_0x5a26('0xe'),_0x483d0f,_0x395793['error'][_0x5a26('0x14')]);return _0x976d2a(_0x395793['error'][_0x5a26('0x14')]);}else{logger['info'](_0x5a26('0xe'),_0x483d0f,_0x5a26('0xf'));_0x976d2a(_0x395793[_0x5a26('0x15')][_0x5a26('0x14')]);}})[_0x5a26('0x16')](function(_0x5ac477){logger['error']('UserVoiceQueueRt,\x20%s,\x20%s',_0x483d0f,_0x5ac477);_0x36d4d4(_0x5ac477);});});}exports['GetVoiceQueueRtPauses']=function(_0x3d698f){var _0x207618=this;return new Promise(function(_0x2b8b06,_0x17580e){return db[_0x5a26('0x17')]['findAll']({'raw':_0x3d698f['options']?_0x3d698f[_0x5a26('0x18')][_0x5a26('0x19')]===undefined?!![]:![]:!![],'where':_0x3d698f[_0x5a26('0x18')]?_0x3d698f[_0x5a26('0x18')][_0x5a26('0x1a')]||null:null,'attributes':[[db[_0x5a26('0x1b')]['fn'](_0x5a26('0x1c'),db[_0x5a26('0x1b')]['fn']('IF',db[_0x5a26('0x1b')]['literal'](_0x5a26('0x1d')))),_0x5a26('0x1e')]]})[_0x5a26('0xd')](function(_0x526479){logger[_0x5a26('0x1f')]('GetVoiceQueueRtPauses',_0x3d698f);logger[_0x5a26('0x20')]('GetVoiceQueueRtPauses',_0x3d698f,JSON[_0x5a26('0x11')](_0x526479));_0x2b8b06(_0x526479);})[_0x5a26('0x16')](function(_0x154ca6){logger[_0x5a26('0x12')](_0x5a26('0x21'),_0x154ca6['message'],_0x3d698f);_0x17580e(_0x207618['error'](0x1f4,_0x154ca6[_0x5a26('0x14')]));});});}; \ No newline at end of file +var _0xd41f=['error','UserVoiceQueueRt,\x20%s,\x20%s','message','catch','GetVoiceQueueRtPauses','UserVoiceQueueRt','options','where','sequelize','COUNT','literal','`paused`\x20=\x201,\x201,\x20null','lodash','util','moment','bluebird','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','redis','defaults','socket.io-emitter','./userVoiceQueueRt.socket','register','request','then','info','request\x20sent','debug','UserVoiceQueueRt,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x5ddb1c,_0x5ea4df){var _0x354adc=function(_0x2dfb1f){while(--_0x2dfb1f){_0x5ddb1c['push'](_0x5ddb1c['shift']());}};_0x354adc(++_0x5ea4df);}(_0xd41f,0x1c6));var _0xfd41=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xd41f[_0x321bb2];return _0x9c12ed;};'use strict';var _=require(_0xfd41('0x0'));var util=require(_0xfd41('0x1'));var moment=require(_0xfd41('0x2'));var BPromise=require(_0xfd41('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xfd41('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xfd41('0x5'))(_0xfd41('0x6'));var config=require(_0xfd41('0x7'));var jayson=require(_0xfd41('0x8'));var client=jayson[_0xfd41('0x9')]['http']({'port':0x232a});config[_0xfd41('0xa')]=_[_0xfd41('0xb')](config[_0xfd41('0xa')],{'host':'localhost','port':0x18eb});var socket=require(_0xfd41('0xc'))(new Redis(config[_0xfd41('0xa')]));require(_0xfd41('0xd'))[_0xfd41('0xe')](socket);function respondWithRpcPromise(_0x4bd0e7,_0x4a27ea,_0x593af){return new BPromise(function(_0x1eea5f,_0xfd02ea){return client[_0xfd41('0xf')](_0x4bd0e7,_0x593af)[_0xfd41('0x10')](function(_0x38bd56){logger[_0xfd41('0x11')]('UserVoiceQueueRt,\x20%s,\x20%s',_0x4a27ea,_0xfd41('0x12'));logger[_0xfd41('0x13')](_0xfd41('0x14'),_0x4a27ea,_0xfd41('0x12'),JSON[_0xfd41('0x15')](_0x38bd56));if(_0x38bd56['error']){if(_0x38bd56[_0xfd41('0x16')]['code']===0x1f4){logger['error'](_0xfd41('0x17'),_0x4a27ea,_0x38bd56[_0xfd41('0x16')][_0xfd41('0x18')]);return _0xfd02ea(_0x38bd56[_0xfd41('0x16')][_0xfd41('0x18')]);}logger[_0xfd41('0x16')](_0xfd41('0x17'),_0x4a27ea,_0x38bd56[_0xfd41('0x16')][_0xfd41('0x18')]);return _0x1eea5f(_0x38bd56[_0xfd41('0x16')]['message']);}else{logger[_0xfd41('0x11')](_0xfd41('0x17'),_0x4a27ea,_0xfd41('0x12'));_0x1eea5f(_0x38bd56['result'][_0xfd41('0x18')]);}})[_0xfd41('0x19')](function(_0x7d9c70){logger[_0xfd41('0x16')]('UserVoiceQueueRt,\x20%s,\x20%s',_0x4a27ea,_0x7d9c70);_0xfd02ea(_0x7d9c70);});});}exports[_0xfd41('0x1a')]=function(_0x3216b9){var _0x574cf4=this;return new Promise(function(_0x3f4e9c,_0x3cdcb0){return db[_0xfd41('0x1b')]['findAll']({'raw':_0x3216b9[_0xfd41('0x1c')]?_0x3216b9['options']['raw']===undefined?!![]:![]:!![],'where':_0x3216b9[_0xfd41('0x1c')]?_0x3216b9[_0xfd41('0x1c')][_0xfd41('0x1d')]||null:null,'attributes':[[db[_0xfd41('0x1e')]['fn'](_0xfd41('0x1f'),db[_0xfd41('0x1e')]['fn']('IF',db[_0xfd41('0x1e')][_0xfd41('0x20')](_0xfd41('0x21')))),'outboundQueuePauses']]})[_0xfd41('0x10')](function(_0x225117){logger['info']('GetVoiceQueueRtPauses',_0x3216b9);logger[_0xfd41('0x13')](_0xfd41('0x1a'),_0x3216b9,JSON[_0xfd41('0x15')](_0x225117));_0x3f4e9c(_0x225117);})[_0xfd41('0x19')](function(_0x3b2acd){logger['error'](_0xfd41('0x1a'),_0x3b2acd[_0xfd41('0x18')],_0x3216b9);_0x3cdcb0(_0x574cf4[_0xfd41('0x16')](0x1f4,_0x3b2acd['message']));});});}; \ No newline at end of file diff --git a/server/api/userVoiceQueueRt/userVoiceQueueRt.socket.js b/server/api/userVoiceQueueRt/userVoiceQueueRt.socket.js index ff44348..78d7c4f 100644 --- a/server/api/userVoiceQueueRt/userVoiceQueueRt.socket.js +++ b/server/api/userVoiceQueueRt/userVoiceQueueRt.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5aaa=['./userVoiceQueueRt.events','emit','removeListener','register','length'];(function(_0x13a253,_0x1981b5){var _0x3e106f=function(_0x5ca0d1){while(--_0x5ca0d1){_0x13a253['push'](_0x13a253['shift']());}};_0x3e106f(++_0x1981b5);}(_0x5aaa,0xff));var _0xa5aa=function(_0x277ae5,_0x308ff8){_0x277ae5=_0x277ae5-0x0;var _0x36fec0=_0x5aaa[_0x277ae5];return _0x36fec0;};'use strict';var UserVoiceQueueRtEvents=require(_0xa5aa('0x0'));var events=['save','remove','update'];function createListener(_0x59ccda,_0x4926c9){return function(_0x128d2a){_0x4926c9[_0xa5aa('0x1')](_0x59ccda,_0x128d2a);};}function removeListener(_0x473061,_0x54ca19){return function(){UserVoiceQueueRtEvents[_0xa5aa('0x2')](_0x473061,_0x54ca19);};}exports[_0xa5aa('0x3')]=function(_0x5e1865){for(var _0x21d216=0x0,_0x143817=events[_0xa5aa('0x4')];_0x21d216<_0x143817;_0x21d216++){var _0x2c0b72=events[_0x21d216];var _0x5574aa=createListener('userVoiceQueueRt:'+_0x2c0b72,_0x5e1865);UserVoiceQueueRtEvents['on'](_0x2c0b72,_0x5574aa);}}; \ No newline at end of file +var _0x4fe0=['remove','update','removeListener','register','length','userVoiceQueueRt:','save'];(function(_0x56817d,_0x2fe424){var _0x18828f=function(_0x17f19a){while(--_0x17f19a){_0x56817d['push'](_0x56817d['shift']());}};_0x18828f(++_0x2fe424);}(_0x4fe0,0x195));var _0x04fe=function(_0x1dec89,_0x2373d9){_0x1dec89=_0x1dec89-0x0;var _0x34ce4d=_0x4fe0[_0x1dec89];return _0x34ce4d;};'use strict';var UserVoiceQueueRtEvents=require('./userVoiceQueueRt.events');var events=[_0x04fe('0x0'),_0x04fe('0x1'),_0x04fe('0x2')];function createListener(_0x3065e4,_0x322d6c){return function(_0x22f3a6){_0x322d6c['emit'](_0x3065e4,_0x22f3a6);};}function removeListener(_0x158919,_0x55000a){return function(){UserVoiceQueueRtEvents[_0x04fe('0x3')](_0x158919,_0x55000a);};}exports[_0x04fe('0x4')]=function(_0x1f74fb){for(var _0x33bdfa=0x0,_0x51f4a3=events[_0x04fe('0x5')];_0x33bdfa<_0x51f4a3;_0x33bdfa++){var _0x48a563=events[_0x33bdfa];var _0x170bd3=createListener(_0x04fe('0x6')+_0x48a563,_0x1f74fb);UserVoiceQueueRtEvents['on'](_0x48a563,_0x170bd3);}}; \ No newline at end of file diff --git a/server/api/userWhatsappQueue/index.js b/server/api/userWhatsappQueue/index.js index cc9820e..831e65a 100644 --- a/server/api/userWhatsappQueue/index.js +++ b/server/api/userWhatsappQueue/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe706=['../../components/interaction/service','../../config/environment','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service'];(function(_0x4621e8,_0x476185){var _0x5be6d7=function(_0x3c0566){while(--_0x3c0566){_0x4621e8['push'](_0x4621e8['shift']());}};_0x5be6d7(++_0x476185);}(_0xe706,0xa3));var _0x6e70=function(_0x1e668a,_0x3ee7ed){_0x1e668a=_0x1e668a-0x0;var _0xc5dbb1=_0xe706[_0x1e668a];return _0xc5dbb1;};'use strict';var multer=require(_0x6e70('0x0'));var util=require(_0x6e70('0x1'));var path=require(_0x6e70('0x2'));var timeout=require('connect-timeout');var express=require(_0x6e70('0x3'));var router=express[_0x6e70('0x4')]();var fs_extra=require(_0x6e70('0x5'));var auth=require(_0x6e70('0x6'));var interaction=require(_0x6e70('0x7'));var config=require(_0x6e70('0x8'));module[_0x6e70('0x9')]=router; \ No newline at end of file +var _0xe706=['../../components/interaction/service','../../config/environment','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service'];(function(_0x30eb13,_0x39930b){var _0x593501=function(_0x2c2c78){while(--_0x2c2c78){_0x30eb13['push'](_0x30eb13['shift']());}};_0x593501(++_0x39930b);}(_0xe706,0xa3));var _0x6e70=function(_0x7033ad,_0x4f191a){_0x7033ad=_0x7033ad-0x0;var _0x4117fb=_0xe706[_0x7033ad];return _0x4117fb;};'use strict';var multer=require(_0x6e70('0x0'));var util=require(_0x6e70('0x1'));var path=require(_0x6e70('0x2'));var timeout=require('connect-timeout');var express=require(_0x6e70('0x3'));var router=express[_0x6e70('0x4')]();var fs_extra=require(_0x6e70('0x5'));var auth=require(_0x6e70('0x6'));var interaction=require(_0x6e70('0x7'));var config=require(_0x6e70('0x8'));module[_0x6e70('0x9')]=router; \ No newline at end of file diff --git a/server/api/userWhatsappQueue/userWhatsappQueue.attributes.js b/server/api/userWhatsappQueue/userWhatsappQueue.attributes.js index 230b9a6..8859b60 100644 --- a/server/api/userWhatsappQueue/userWhatsappQueue.attributes.js +++ b/server/api/userWhatsappQueue/userWhatsappQueue.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf1d5=['INTEGER','sequelize'];(function(_0x30780e,_0x537b34){var _0x5b9129=function(_0xcf4cd1){while(--_0xcf4cd1){_0x30780e['push'](_0x30780e['shift']());}};_0x5b9129(++_0x537b34);}(_0xf1d5,0x1e9));var _0x5f1d=function(_0x49134b,_0x25e5de){_0x49134b=_0x49134b-0x0;var _0x975fd5=_0xf1d5[_0x49134b];return _0x975fd5;};'use strict';var Sequelize=require(_0x5f1d('0x0'));module['exports']={'penalty':{'type':Sequelize[_0x5f1d('0x1')],'defaultValue':0x0}}; \ No newline at end of file +var _0x295c=['INTEGER','sequelize'];(function(_0x411677,_0x39819d){var _0x1abf12=function(_0x3ce172){while(--_0x3ce172){_0x411677['push'](_0x411677['shift']());}};_0x1abf12(++_0x39819d);}(_0x295c,0x165));var _0xc295=function(_0x140270,_0x18c18b){_0x140270=_0x140270-0x0;var _0x1de710=_0x295c[_0x140270];return _0x1de710;};'use strict';var Sequelize=require(_0xc295('0x0'));module['exports']={'penalty':{'type':Sequelize[_0xc295('0x1')],'defaultValue':0x0}}; \ No newline at end of file diff --git a/server/api/userWhatsappQueue/userWhatsappQueue.model.js b/server/api/userWhatsappQueue/userWhatsappQueue.model.js index a1ffd52..1ee1bf8 100644 --- a/server/api/userWhatsappQueue/userWhatsappQueue.model.js +++ b/server/api/userWhatsappQueue/userWhatsappQueue.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xdd42=['moment','bluebird','path','rimraf','../../config/environment','./userWhatsappQueue.attributes','exports','define','UserWhatsappQueue','user_has_whatsapp_queues','lodash','util','../../config/logger'];(function(_0x3a42e0,_0x4c18b5){var _0x4cc179=function(_0x17c4de){while(--_0x17c4de){_0x3a42e0['push'](_0x3a42e0['shift']());}};_0x4cc179(++_0x4c18b5);}(_0xdd42,0x1b7));var _0x2dd4=function(_0x57f2ae,_0x3eb107){_0x57f2ae=_0x57f2ae-0x0;var _0x1af88f=_0xdd42[_0x57f2ae];return _0x1af88f;};'use strict';var _=require(_0x2dd4('0x0'));var util=require(_0x2dd4('0x1'));var logger=require(_0x2dd4('0x2'))('api');var moment=require(_0x2dd4('0x3'));var BPromise=require(_0x2dd4('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x2dd4('0x5'));var rimraf=require(_0x2dd4('0x6'));var config=require(_0x2dd4('0x7'));var attributes=require(_0x2dd4('0x8'));module[_0x2dd4('0x9')]=function(_0x132f6d,_0x49d423){return _0x132f6d[_0x2dd4('0xa')](_0x2dd4('0xb'),attributes,{'tableName':_0x2dd4('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x38d1=['define','UserWhatsappQueue','user_has_whatsapp_queues','lodash','util','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./userWhatsappQueue.attributes','exports'];(function(_0x436c5a,_0x2be8cb){var _0x2310e4=function(_0x11f473){while(--_0x11f473){_0x436c5a['push'](_0x436c5a['shift']());}};_0x2310e4(++_0x2be8cb);}(_0x38d1,0xab));var _0x138d=function(_0x273fa7,_0x2598fd){_0x273fa7=_0x273fa7-0x0;var _0x585feb=_0x38d1[_0x273fa7];return _0x585feb;};'use strict';var _=require(_0x138d('0x0'));var util=require(_0x138d('0x1'));var logger=require('../../config/logger')(_0x138d('0x2'));var moment=require(_0x138d('0x3'));var BPromise=require(_0x138d('0x4'));var rp=require(_0x138d('0x5'));var fs=require('fs');var path=require(_0x138d('0x6'));var rimraf=require(_0x138d('0x7'));var config=require(_0x138d('0x8'));var attributes=require(_0x138d('0x9'));module[_0x138d('0xa')]=function(_0x449ab2,_0x450688){return _0x449ab2[_0x138d('0xb')](_0x138d('0xc'),attributes,{'tableName':_0x138d('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/userWhatsappQueue/userWhatsappQueue.rpc.js b/server/api/userWhatsappQueue/userWhatsappQueue.rpc.js index ff3fdde..091cfef 100644 --- a/server/api/userWhatsappQueue/userWhatsappQueue.rpc.js +++ b/server/api/userWhatsappQueue/userWhatsappQueue.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3313=['ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then','info','request\x20sent','UserWhatsappQueue,\x20%s,\x20%s,\x20%s','error','code','message','UserWhatsappQueue,\x20%s,\x20%s','result','catch','moment','bluebird','randomstring'];(function(_0x5bddb7,_0x57a840){var _0x301912=function(_0x3516db){while(--_0x3516db){_0x5bddb7['push'](_0x5bddb7['shift']());}};_0x301912(++_0x57a840);}(_0x3313,0x173));var _0x3331=function(_0x3e1346,_0x2496c3){_0x3e1346=_0x3e1346-0x0;var _0x1f1c03=_0x3313[_0x3e1346];return _0x1f1c03;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x3331('0x0'));var BPromise=require(_0x3331('0x1'));var rs=require(_0x3331('0x2'));var fs=require('fs');var Redis=require(_0x3331('0x3'));var db=require(_0x3331('0x4'))['db'];var utils=require(_0x3331('0x5'));var logger=require(_0x3331('0x6'))(_0x3331('0x7'));var config=require(_0x3331('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x3331('0x9')][_0x3331('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x319f0f,_0x31a05b,_0x195480){return new BPromise(function(_0x286761,_0x4a3078){return client[_0x3331('0xb')](_0x319f0f,_0x195480)[_0x3331('0xc')](function(_0x265acb){logger[_0x3331('0xd')]('UserWhatsappQueue,\x20%s,\x20%s',_0x31a05b,_0x3331('0xe'));logger['debug'](_0x3331('0xf'),_0x31a05b,_0x3331('0xe'),JSON['stringify'](_0x265acb));if(_0x265acb[_0x3331('0x10')]){if(_0x265acb['error'][_0x3331('0x11')]===0x1f4){logger[_0x3331('0x10')]('UserWhatsappQueue,\x20%s,\x20%s',_0x31a05b,_0x265acb[_0x3331('0x10')][_0x3331('0x12')]);return _0x4a3078(_0x265acb[_0x3331('0x10')]['message']);}logger[_0x3331('0x10')]('UserWhatsappQueue,\x20%s,\x20%s',_0x31a05b,_0x265acb[_0x3331('0x10')][_0x3331('0x12')]);return _0x286761(_0x265acb['error'][_0x3331('0x12')]);}else{logger[_0x3331('0xd')](_0x3331('0x13'),_0x31a05b,_0x3331('0xe'));_0x286761(_0x265acb[_0x3331('0x14')][_0x3331('0x12')]);}})[_0x3331('0x15')](function(_0x1eaed1){logger[_0x3331('0x10')](_0x3331('0x13'),_0x31a05b,_0x1eaed1);_0x4a3078(_0x1eaed1);});});} \ No newline at end of file +var _0x5464=['error','message','result','catch','lodash','util','moment','bluebird','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then','info','UserWhatsappQueue,\x20%s,\x20%s','request\x20sent','debug','UserWhatsappQueue,\x20%s,\x20%s,\x20%s'];(function(_0x3b3ec3,_0x53a823){var _0x235133=function(_0x40b1af){while(--_0x40b1af){_0x3b3ec3['push'](_0x3b3ec3['shift']());}};_0x235133(++_0x53a823);}(_0x5464,0x14e));var _0x4546=function(_0x5ac640,_0x55db9d){_0x5ac640=_0x5ac640-0x0;var _0x1bde64=_0x5464[_0x5ac640];return _0x1bde64;};'use strict';var _=require(_0x4546('0x0'));var util=require(_0x4546('0x1'));var moment=require(_0x4546('0x2'));var BPromise=require(_0x4546('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x4546('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x4546('0x5'));var logger=require(_0x4546('0x6'))(_0x4546('0x7'));var config=require(_0x4546('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x4546('0x9')][_0x4546('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2b475f,_0x550611,_0x42ed7f){return new BPromise(function(_0x5b6964,_0x26292f){return client[_0x4546('0xb')](_0x2b475f,_0x42ed7f)[_0x4546('0xc')](function(_0x5e1526){logger[_0x4546('0xd')](_0x4546('0xe'),_0x550611,_0x4546('0xf'));logger[_0x4546('0x10')](_0x4546('0x11'),_0x550611,_0x4546('0xf'),JSON['stringify'](_0x5e1526));if(_0x5e1526[_0x4546('0x12')]){if(_0x5e1526[_0x4546('0x12')]['code']===0x1f4){logger[_0x4546('0x12')](_0x4546('0xe'),_0x550611,_0x5e1526[_0x4546('0x12')][_0x4546('0x13')]);return _0x26292f(_0x5e1526[_0x4546('0x12')][_0x4546('0x13')]);}logger[_0x4546('0x12')](_0x4546('0xe'),_0x550611,_0x5e1526[_0x4546('0x12')][_0x4546('0x13')]);return _0x5b6964(_0x5e1526['error'][_0x4546('0x13')]);}else{logger[_0x4546('0xd')]('UserWhatsappQueue,\x20%s,\x20%s',_0x550611,_0x4546('0xf'));_0x5b6964(_0x5e1526[_0x4546('0x14')]['message']);}})[_0x4546('0x15')](function(_0x3fe819){logger[_0x4546('0x12')](_0x4546('0xe'),_0x550611,_0x3fe819);_0x26292f(_0x3fe819);});});} \ No newline at end of file diff --git a/server/api/variable/index.js b/server/api/variable/index.js index 2663aee..518c548 100644 --- a/server/api/variable/index.js +++ b/server/api/variable/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5c12=['./variable.controller','isAuthenticated','index','get','show','post','create','put','update','delete','/:id','exports','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment'];(function(_0x488e18,_0x3915d3){var _0x90f9cd=function(_0x1718f1){while(--_0x1718f1){_0x488e18['push'](_0x488e18['shift']());}};_0x90f9cd(++_0x3915d3);}(_0x5c12,0x188));var _0x25c1=function(_0x52684f,_0xff73fc){_0x52684f=_0x52684f-0x0;var _0x4a55f0=_0x5c12[_0x52684f];return _0x4a55f0;};'use strict';var multer=require('multer');var util=require(_0x25c1('0x0'));var path=require(_0x25c1('0x1'));var timeout=require('connect-timeout');var express=require(_0x25c1('0x2'));var router=express[_0x25c1('0x3')]();var fs_extra=require(_0x25c1('0x4'));var auth=require(_0x25c1('0x5'));var interaction=require(_0x25c1('0x6'));var config=require(_0x25c1('0x7'));var controller=require(_0x25c1('0x8'));router['get']('/',auth[_0x25c1('0x9')](),controller[_0x25c1('0xa')]);router[_0x25c1('0xb')]('/:id',auth['isAuthenticated'](),controller[_0x25c1('0xc')]);router[_0x25c1('0xd')]('/',auth[_0x25c1('0x9')](),controller[_0x25c1('0xe')]);router[_0x25c1('0xf')]('/:id',auth[_0x25c1('0x9')](),controller[_0x25c1('0x10')]);router[_0x25c1('0x11')](_0x25c1('0x12'),auth[_0x25c1('0x9')](),controller['destroy']);module[_0x25c1('0x13')]=router; \ No newline at end of file +var _0x9589=['util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','./variable.controller','get','isAuthenticated','index','/:id','show','post','create','put','update','delete','destroy','exports','multer'];(function(_0xf51c06,_0x388e5b){var _0x1d5420=function(_0x5e077b){while(--_0x5e077b){_0xf51c06['push'](_0xf51c06['shift']());}};_0x1d5420(++_0x388e5b);}(_0x9589,0xbc));var _0x9958=function(_0x4416d3,_0x11461c){_0x4416d3=_0x4416d3-0x0;var _0x1ae32e=_0x9589[_0x4416d3];return _0x1ae32e;};'use strict';var multer=require(_0x9958('0x0'));var util=require(_0x9958('0x1'));var path=require(_0x9958('0x2'));var timeout=require(_0x9958('0x3'));var express=require(_0x9958('0x4'));var router=express['Router']();var fs_extra=require(_0x9958('0x5'));var auth=require(_0x9958('0x6'));var interaction=require(_0x9958('0x7'));var config=require('../../config/environment');var controller=require(_0x9958('0x8'));router[_0x9958('0x9')]('/',auth[_0x9958('0xa')](),controller[_0x9958('0xb')]);router[_0x9958('0x9')](_0x9958('0xc'),auth['isAuthenticated'](),controller[_0x9958('0xd')]);router[_0x9958('0xe')]('/',auth[_0x9958('0xa')](),controller[_0x9958('0xf')]);router[_0x9958('0x10')](_0x9958('0xc'),auth[_0x9958('0xa')](),controller[_0x9958('0x11')]);router[_0x9958('0x12')](_0x9958('0xc'),auth[_0x9958('0xa')](),controller[_0x9958('0x13')]);module[_0x9958('0x14')]=router; \ No newline at end of file diff --git a/server/api/variable/variable.attributes.js b/server/api/variable/variable.attributes.js index 781e6ae..c8cd7b5 100644 --- a/server/api/variable/variable.attributes.js +++ b/server/api/variable/variable.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc414=['STRING','exports'];(function(_0x1e350f,_0x181597){var _0x222e38=function(_0x357855){while(--_0x357855){_0x1e350f['push'](_0x1e350f['shift']());}};_0x222e38(++_0x181597);}(_0xc414,0x111));var _0x4c41=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xc414[_0x3dd15e];return _0x231fd0;};'use strict';var Sequelize=require('sequelize');module[_0x4c41('0x0')]={'name':{'type':Sequelize[_0x4c41('0x1')],'unique':'name','allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0x4c41('0x1')]}}; \ No newline at end of file +var _0xb66c=['STRING','sequelize'];(function(_0x49af51,_0x1fd49c){var _0x1b98ad=function(_0x4eaa6e){while(--_0x4eaa6e){_0x49af51['push'](_0x49af51['shift']());}};_0x1b98ad(++_0x1fd49c);}(_0xb66c,0x175));var _0xcb66=function(_0x213c75,_0x19edfd){_0x213c75=_0x213c75-0x0;var _0x4aa5ab=_0xb66c[_0x213c75];return _0x4aa5ab;};'use strict';var Sequelize=require(_0xcb66('0x0'));module['exports']={'name':{'type':Sequelize[_0xcb66('0x1')],'unique':'name','allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0xcb66('0x1')]}}; \ No newline at end of file diff --git a/server/api/variable/variable.controller.js b/server/api/variable/variable.controller.js index 134f019..cad8571 100644 --- a/server/api/variable/variable.controller.js +++ b/server/api/variable/variable.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x71c9=['../../config/logger','../../config/environment','sendStatus','status','end','json','undefined','limit','count','offset','set','apply','reject','save','update','then','get','destroy','error','stack','name','send','index','map','Variable','rawAttributes','fieldName','key','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','VIRTUAL','options','include','findAll','rows','catch','show','params','find','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','Variables','UserProfileSection','userProfileId','autoAssociation','create','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','eml-format','zip-dir','request-promise','moment','bluebird','mustache','to-csv','fs-extra','lodash','jsforce','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware'];(function(_0x5b131f,_0x1bef66){var _0x5f1aca=function(_0x22c49b){while(--_0x22c49b){_0x5b131f['push'](_0x5b131f['shift']());}};_0x5f1aca(++_0x1bef66);}(_0x71c9,0xd7));var _0x971c=function(_0x43a4b7,_0x571f08){_0x43a4b7=_0x43a4b7-0x0;var _0x5ef59e=_0x71c9[_0x43a4b7];return _0x5ef59e;};'use strict';var emlformat=require(_0x971c('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x971c('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x971c('0x2'));var moment=require(_0x971c('0x3'));var BPromise=require(_0x971c('0x4'));var Mustache=require(_0x971c('0x5'));var util=require('util');var path=require('path');var sox=require('sox');var csv=require(_0x971c('0x6'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x971c('0x7'));var _=require(_0x971c('0x8'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x971c('0x9'));var deskjs=require('desk.js');var toCsv=require(_0x971c('0x6'));var querystring=require(_0x971c('0xa'));var Papa=require('papaparse');var Redis=require(_0x971c('0xb'));var authService=require(_0x971c('0xc'));var qs=require(_0x971c('0xd'));var as=require(_0x971c('0xe'));var hardwareService=require(_0x971c('0xf'));var logger=require(_0x971c('0x10'))('api');var utils=require('../../config/utils');var config=require(_0x971c('0x11'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x5ce22e,_0x32bad6){_0x32bad6=_0x32bad6||0xcc;return function(_0x11997d){if(_0x11997d){return _0x5ce22e[_0x971c('0x12')](_0x32bad6);}return _0x5ce22e[_0x971c('0x13')](_0x32bad6)[_0x971c('0x14')]();};}function respondWithResult(_0x68035,_0x15aed8){_0x15aed8=_0x15aed8||0xc8;return function(_0x53e00d){if(_0x53e00d){return _0x68035[_0x971c('0x13')](_0x15aed8)[_0x971c('0x15')](_0x53e00d);}};}function respondWithFilteredResult(_0x1e47b0,_0x4684bf){return function(_0x4379e2){if(_0x4379e2){var _0x5b64cd=typeof _0x4684bf['offset']===_0x971c('0x16')&&typeof _0x4684bf[_0x971c('0x17')]===_0x971c('0x16');var _0xe8fa10=_0x4379e2[_0x971c('0x18')];var _0x426328=_0x5b64cd?0x0:_0x4684bf[_0x971c('0x19')];var _0x2e535d=_0x5b64cd?_0x4379e2['count']:_0x4684bf[_0x971c('0x19')]+_0x4684bf['limit'];var _0x3127f5;if(_0x2e535d>=_0xe8fa10){_0x2e535d=_0xe8fa10;_0x3127f5=0xc8;}else{_0x3127f5=0xce;}_0x1e47b0['status'](_0x3127f5);return _0x1e47b0[_0x971c('0x1a')]('Content-Range',_0x426328+'-'+_0x2e535d+'/'+_0xe8fa10)[_0x971c('0x15')](_0x4379e2);}return null;};}function patchUpdates(_0x1a6a90){return function(_0x335b2e){try{jsonpatch[_0x971c('0x1b')](_0x335b2e,_0x1a6a90,!![]);}catch(_0x366db9){return BPromise[_0x971c('0x1c')](_0x366db9);}return _0x335b2e[_0x971c('0x1d')]();};}function saveUpdates(_0x107a5e,_0x31be7a){return function(_0x83afed){if(_0x83afed){return _0x83afed[_0x971c('0x1e')](_0x107a5e)['then'](function(_0x5b20f9){return _0x5b20f9;});}return null;};}function removeEntity(_0x14a17b,_0x11cebc){return function(_0x31acba){if(_0x31acba){return _0x31acba['destroy']()[_0x971c('0x1f')](function(){var _0x19bc57=_0x31acba[_0x971c('0x20')]({'plain':!![]});var _0x207ddf='Variables';return db['UserProfileResource'][_0x971c('0x21')]({'where':{'type':_0x207ddf,'resourceId':_0x19bc57['id']}})[_0x971c('0x1f')](function(){return _0x31acba;});})['then'](function(){_0x14a17b[_0x971c('0x13')](0xcc)[_0x971c('0x14')]();});}};}function handleEntityNotFound(_0x4c33ab,_0x323f4f){return function(_0x376936){if(!_0x376936){_0x4c33ab[_0x971c('0x12')](0x194);}return _0x376936;};}function handleError(_0x4e998c,_0x727765){_0x727765=_0x727765||0x1f4;return function(_0x160c86){logger[_0x971c('0x22')](_0x160c86[_0x971c('0x23')]);if(_0x160c86[_0x971c('0x24')]){delete _0x160c86[_0x971c('0x24')];}_0x4e998c[_0x971c('0x13')](_0x727765)[_0x971c('0x25')](_0x160c86);};}exports[_0x971c('0x26')]=function(_0x17d31d,_0x40f85c){var _0x5d4201={},_0x431ee9={},_0x3ea359={'count':0x0,'rows':[]};var _0x5eb1d1=_[_0x971c('0x27')](db[_0x971c('0x28')][_0x971c('0x29')],function(_0x30ed3f){return{'name':_0x30ed3f[_0x971c('0x2a')],'type':_0x30ed3f['type'][_0x971c('0x2b')]};});_0x431ee9[_0x971c('0x2c')]=_[_0x971c('0x27')](_0x5eb1d1,_0x971c('0x24'));_0x431ee9['query']=_[_0x971c('0x2d')](_0x17d31d[_0x971c('0x2e')]);_0x431ee9[_0x971c('0x2f')]=_[_0x971c('0x30')](_0x431ee9[_0x971c('0x2c')],_0x431ee9['query']);_0x5d4201[_0x971c('0x31')]=_[_0x971c('0x30')](_0x431ee9[_0x971c('0x2c')],qs[_0x971c('0x32')](_0x17d31d[_0x971c('0x2e')][_0x971c('0x32')]));_0x5d4201[_0x971c('0x31')]=_0x5d4201[_0x971c('0x31')][_0x971c('0x33')]?_0x5d4201[_0x971c('0x31')]:_0x431ee9[_0x971c('0x2c')];if(!_0x17d31d[_0x971c('0x2e')][_0x971c('0x34')](_0x971c('0x35'))){_0x5d4201['limit']=qs[_0x971c('0x17')](_0x17d31d['query'][_0x971c('0x17')]);_0x5d4201['offset']=qs[_0x971c('0x19')](_0x17d31d[_0x971c('0x2e')]['offset']);}_0x5d4201[_0x971c('0x36')]=qs[_0x971c('0x37')](_0x17d31d[_0x971c('0x2e')][_0x971c('0x37')]);_0x5d4201[_0x971c('0x38')]=qs[_0x971c('0x2f')](_['pick'](_0x17d31d[_0x971c('0x2e')],_0x431ee9[_0x971c('0x2f')]),_0x5eb1d1);if(_0x17d31d[_0x971c('0x2e')][_0x971c('0x39')]){_0x5d4201['where']=_[_0x971c('0x3a')](_0x5d4201[_0x971c('0x38')],{'$or':_['map'](_0x5eb1d1,function(_0x440e6d){if(_0x440e6d['type']!==_0x971c('0x3b')){var _0x4d10da={};_0x4d10da[_0x440e6d[_0x971c('0x24')]]={'$like':'%'+_0x17d31d[_0x971c('0x2e')][_0x971c('0x39')]+'%'};return _0x4d10da;}})});}_0x5d4201=_[_0x971c('0x3a')]({},_0x5d4201,_0x17d31d[_0x971c('0x3c')]);var _0x532b77={'where':_0x5d4201[_0x971c('0x38')]};return db['Variable'][_0x971c('0x18')](_0x532b77)[_0x971c('0x1f')](function(_0xf69d62){_0x3ea359[_0x971c('0x18')]=_0xf69d62;if(_0x17d31d[_0x971c('0x2e')]['includeAll']){_0x5d4201[_0x971c('0x3d')]=[{'all':!![]}];}return db[_0x971c('0x28')][_0x971c('0x3e')](_0x5d4201);})[_0x971c('0x1f')](function(_0x4f9739){_0x3ea359[_0x971c('0x3f')]=_0x4f9739;return _0x3ea359;})[_0x971c('0x1f')](respondWithFilteredResult(_0x40f85c,_0x5d4201))[_0x971c('0x40')](handleError(_0x40f85c,null));};exports[_0x971c('0x41')]=function(_0x128130,_0x493ae4){var _0x121b36={'raw':!![],'where':{'id':_0x128130[_0x971c('0x42')]['id']}},_0xb796d6={};_0xb796d6['model']=_[_0x971c('0x2d')](db[_0x971c('0x28')][_0x971c('0x29')]);_0xb796d6['query']=_[_0x971c('0x2d')](_0x128130[_0x971c('0x2e')]);_0xb796d6['filters']=_[_0x971c('0x30')](_0xb796d6[_0x971c('0x2c')],_0xb796d6['query']);_0x121b36[_0x971c('0x31')]=_[_0x971c('0x30')](_0xb796d6[_0x971c('0x2c')],qs[_0x971c('0x32')](_0x128130[_0x971c('0x2e')][_0x971c('0x32')]));_0x121b36[_0x971c('0x31')]=_0x121b36[_0x971c('0x31')][_0x971c('0x33')]?_0x121b36[_0x971c('0x31')]:_0xb796d6[_0x971c('0x2c')];if(_0x128130[_0x971c('0x2e')]['includeAll']){_0x121b36[_0x971c('0x3d')]=[{'all':!![]}];}_0x121b36=_[_0x971c('0x3a')]({},_0x121b36,_0x128130[_0x971c('0x3c')]);return db['Variable'][_0x971c('0x43')](_0x121b36)['then'](handleEntityNotFound(_0x493ae4,null))[_0x971c('0x1f')](respondWithResult(_0x493ae4,null))['catch'](handleError(_0x493ae4,null));};exports['create']=function(_0x4f1e93,_0x19572d){return db['Variable']['create'](_0x4f1e93[_0x971c('0x44')],{})[_0x971c('0x1f')](function(_0x215293){var _0x4651ae=_0x4f1e93[_0x971c('0x45')][_0x971c('0x20')]({'plain':!![]});if(!_0x4651ae)throw new Error(_0x971c('0x46'));if(_0x4651ae['role']===_0x971c('0x45')){var _0x41d36f=_0x215293[_0x971c('0x20')]({'plain':!![]});var _0x6509b6=_0x971c('0x47');return db[_0x971c('0x48')][_0x971c('0x43')]({'where':{'name':_0x6509b6,'userProfileId':_0x4651ae[_0x971c('0x49')]},'raw':!![]})[_0x971c('0x1f')](function(_0x1d1625){if(_0x1d1625&&_0x1d1625[_0x971c('0x4a')]===0x0){return db['UserProfileResource'][_0x971c('0x4b')]({'name':_0x41d36f['name'],'resourceId':_0x41d36f['id'],'type':_0x1d1625['name'],'sectionId':_0x1d1625['id']},{})[_0x971c('0x1f')](function(){return _0x215293;});}else{return _0x215293;}})[_0x971c('0x40')](function(_0x1814b5){logger['error'](_0x971c('0x4c'),_0x1814b5);throw _0x1814b5;});}return _0x215293;})[_0x971c('0x1f')](respondWithResult(_0x19572d,0xc9))[_0x971c('0x40')](handleError(_0x19572d,null));};exports['update']=function(_0x1fad07,_0x30dbb8){if(_0x1fad07[_0x971c('0x44')]['id']){delete _0x1fad07[_0x971c('0x44')]['id'];}return db[_0x971c('0x28')][_0x971c('0x43')]({'where':{'id':_0x1fad07[_0x971c('0x42')]['id']}})['then'](handleEntityNotFound(_0x30dbb8,null))[_0x971c('0x1f')](saveUpdates(_0x1fad07['body'],null))[_0x971c('0x1f')](respondWithResult(_0x30dbb8,null))[_0x971c('0x40')](handleError(_0x30dbb8,null));};exports[_0x971c('0x21')]=function(_0x5f5aab,_0x4bd4e4){return db['Variable'][_0x971c('0x43')]({'where':{'id':_0x5f5aab['params']['id']}})[_0x971c('0x1f')](handleEntityNotFound(_0x4bd4e4,null))[_0x971c('0x1f')](removeEntity(_0x4bd4e4,null))[_0x971c('0x40')](handleError(_0x4bd4e4,null));}; \ No newline at end of file +var _0xdf80=['moment','bluebird','util','path','sox','ejs','lodash','squel','crypto','desk.js','to-csv','querystring','papaparse','ioredis','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end','status','json','offset','undefined','count','limit','set','save','then','get','Variables','destroy','error','stack','name','send','index','map','fieldName','type','key','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','filter','VIRTUAL','Variable','includeAll','findAll','rows','catch','show','params','keys','rawAttributes','include','merge','options','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','userProfileId','autoAssociation','UserProfileResource','update','eml-format','rimraf','zip-dir','fast-json-patch','request-promise'];(function(_0xfe5621,_0xaa36a4){var _0x761fc9=function(_0x237015){while(--_0x237015){_0xfe5621['push'](_0xfe5621['shift']());}};_0x761fc9(++_0xaa36a4);}(_0xdf80,0x9f));var _0x0df8=function(_0x5a97b8,_0x5a7945){_0x5a97b8=_0x5a97b8-0x0;var _0x54b165=_0xdf80[_0x5a97b8];return _0x54b165;};'use strict';var emlformat=require(_0x0df8('0x0'));var rimraf=require(_0x0df8('0x1'));var zipdir=require(_0x0df8('0x2'));var jsonpatch=require(_0x0df8('0x3'));var rp=require(_0x0df8('0x4'));var moment=require(_0x0df8('0x5'));var BPromise=require(_0x0df8('0x6'));var Mustache=require('mustache');var util=require(_0x0df8('0x7'));var path=require(_0x0df8('0x8'));var sox=require(_0x0df8('0x9'));var csv=require('to-csv');var ejs=require(_0x0df8('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x0df8('0xb'));var squel=require(_0x0df8('0xc'));var crypto=require(_0x0df8('0xd'));var jsforce=require('jsforce');var deskjs=require(_0x0df8('0xe'));var toCsv=require(_0x0df8('0xf'));var querystring=require(_0x0df8('0x10'));var Papa=require(_0x0df8('0x11'));var Redis=require(_0x0df8('0x12'));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('../../config/logger')(_0x0df8('0x13'));var utils=require(_0x0df8('0x14'));var config=require(_0x0df8('0x15'));var licenseUtil=require(_0x0df8('0x16'));var db=require(_0x0df8('0x17'))['db'];function respondWithStatusCode(_0x3e2980,_0x3a097e){_0x3a097e=_0x3a097e||0xcc;return function(_0x2c8d0c){if(_0x2c8d0c){return _0x3e2980[_0x0df8('0x18')](_0x3a097e);}return _0x3e2980['status'](_0x3a097e)[_0x0df8('0x19')]();};}function respondWithResult(_0x2e7a86,_0x26abb6){_0x26abb6=_0x26abb6||0xc8;return function(_0x4a5889){if(_0x4a5889){return _0x2e7a86[_0x0df8('0x1a')](_0x26abb6)[_0x0df8('0x1b')](_0x4a5889);}};}function respondWithFilteredResult(_0x14915f,_0x5c5517){return function(_0x614b68){if(_0x614b68){var _0xa9d8cf=typeof _0x5c5517[_0x0df8('0x1c')]==='undefined'&&typeof _0x5c5517['limit']===_0x0df8('0x1d');var _0x594383=_0x614b68[_0x0df8('0x1e')];var _0xb2daf=_0xa9d8cf?0x0:_0x5c5517['offset'];var _0x12cbd5=_0xa9d8cf?_0x614b68[_0x0df8('0x1e')]:_0x5c5517[_0x0df8('0x1c')]+_0x5c5517[_0x0df8('0x1f')];var _0xe17372;if(_0x12cbd5>=_0x594383){_0x12cbd5=_0x594383;_0xe17372=0xc8;}else{_0xe17372=0xce;}_0x14915f['status'](_0xe17372);return _0x14915f[_0x0df8('0x20')]('Content-Range',_0xb2daf+'-'+_0x12cbd5+'/'+_0x594383)[_0x0df8('0x1b')](_0x614b68);}return null;};}function patchUpdates(_0x3c3f09){return function(_0x25d4e6){try{jsonpatch['apply'](_0x25d4e6,_0x3c3f09,!![]);}catch(_0x5693d0){return BPromise['reject'](_0x5693d0);}return _0x25d4e6[_0x0df8('0x21')]();};}function saveUpdates(_0x25a4ed,_0x43b81d){return function(_0x51dca5){if(_0x51dca5){return _0x51dca5['update'](_0x25a4ed)[_0x0df8('0x22')](function(_0x53b7ce){return _0x53b7ce;});}return null;};}function removeEntity(_0x2b0cfb,_0xa64509){return function(_0x4f9be8){if(_0x4f9be8){return _0x4f9be8['destroy']()[_0x0df8('0x22')](function(){var _0xcbb2a0=_0x4f9be8[_0x0df8('0x23')]({'plain':!![]});var _0xb88b3f=_0x0df8('0x24');return db['UserProfileResource'][_0x0df8('0x25')]({'where':{'type':_0xb88b3f,'resourceId':_0xcbb2a0['id']}})[_0x0df8('0x22')](function(){return _0x4f9be8;});})[_0x0df8('0x22')](function(){_0x2b0cfb[_0x0df8('0x1a')](0xcc)[_0x0df8('0x19')]();});}};}function handleEntityNotFound(_0x38d4c4,_0x42f07c){return function(_0x2b2446){if(!_0x2b2446){_0x38d4c4[_0x0df8('0x18')](0x194);}return _0x2b2446;};}function handleError(_0x1dc954,_0x378eba){_0x378eba=_0x378eba||0x1f4;return function(_0x2cdb65){logger[_0x0df8('0x26')](_0x2cdb65[_0x0df8('0x27')]);if(_0x2cdb65[_0x0df8('0x28')]){delete _0x2cdb65[_0x0df8('0x28')];}_0x1dc954[_0x0df8('0x1a')](_0x378eba)[_0x0df8('0x29')](_0x2cdb65);};}exports[_0x0df8('0x2a')]=function(_0x5ba451,_0x5cc135){var _0x188c15={},_0x3e7c95={},_0x108a67={'count':0x0,'rows':[]};var _0x313458=_[_0x0df8('0x2b')](db['Variable']['rawAttributes'],function(_0x2cf802){return{'name':_0x2cf802[_0x0df8('0x2c')],'type':_0x2cf802[_0x0df8('0x2d')][_0x0df8('0x2e')]};});_0x3e7c95[_0x0df8('0x2f')]=_[_0x0df8('0x2b')](_0x313458,_0x0df8('0x28'));_0x3e7c95['query']=_['keys'](_0x5ba451[_0x0df8('0x30')]);_0x3e7c95[_0x0df8('0x31')]=_[_0x0df8('0x32')](_0x3e7c95[_0x0df8('0x2f')],_0x3e7c95[_0x0df8('0x30')]);_0x188c15[_0x0df8('0x33')]=_[_0x0df8('0x32')](_0x3e7c95[_0x0df8('0x2f')],qs[_0x0df8('0x34')](_0x5ba451[_0x0df8('0x30')][_0x0df8('0x34')]));_0x188c15[_0x0df8('0x33')]=_0x188c15['attributes'][_0x0df8('0x35')]?_0x188c15['attributes']:_0x3e7c95[_0x0df8('0x2f')];if(!_0x5ba451[_0x0df8('0x30')][_0x0df8('0x36')]('nolimit')){_0x188c15['limit']=qs[_0x0df8('0x1f')](_0x5ba451[_0x0df8('0x30')][_0x0df8('0x1f')]);_0x188c15[_0x0df8('0x1c')]=qs[_0x0df8('0x1c')](_0x5ba451[_0x0df8('0x30')]['offset']);}_0x188c15[_0x0df8('0x37')]=qs['sort'](_0x5ba451[_0x0df8('0x30')][_0x0df8('0x38')]);_0x188c15[_0x0df8('0x39')]=qs[_0x0df8('0x31')](_['pick'](_0x5ba451[_0x0df8('0x30')],_0x3e7c95[_0x0df8('0x31')]),_0x313458);if(_0x5ba451[_0x0df8('0x30')][_0x0df8('0x3a')]){_0x188c15[_0x0df8('0x39')]=_['merge'](_0x188c15[_0x0df8('0x39')],{'$or':_['map'](_0x313458,function(_0x3326fd){if(_0x3326fd[_0x0df8('0x2d')]!==_0x0df8('0x3b')){var _0x682acd={};_0x682acd[_0x3326fd[_0x0df8('0x28')]]={'$like':'%'+_0x5ba451[_0x0df8('0x30')][_0x0df8('0x3a')]+'%'};return _0x682acd;}})});}_0x188c15=_['merge']({},_0x188c15,_0x5ba451['options']);var _0x95c682={'where':_0x188c15[_0x0df8('0x39')]};return db[_0x0df8('0x3c')][_0x0df8('0x1e')](_0x95c682)[_0x0df8('0x22')](function(_0x36868a){_0x108a67[_0x0df8('0x1e')]=_0x36868a;if(_0x5ba451[_0x0df8('0x30')][_0x0df8('0x3d')]){_0x188c15['include']=[{'all':!![]}];}return db[_0x0df8('0x3c')][_0x0df8('0x3e')](_0x188c15);})[_0x0df8('0x22')](function(_0x2d0a0b){_0x108a67[_0x0df8('0x3f')]=_0x2d0a0b;return _0x108a67;})['then'](respondWithFilteredResult(_0x5cc135,_0x188c15))[_0x0df8('0x40')](handleError(_0x5cc135,null));};exports[_0x0df8('0x41')]=function(_0x106cf6,_0x7bf98c){var _0xdea6ce={'raw':!![],'where':{'id':_0x106cf6[_0x0df8('0x42')]['id']}},_0x4bad9b={};_0x4bad9b[_0x0df8('0x2f')]=_[_0x0df8('0x43')](db[_0x0df8('0x3c')][_0x0df8('0x44')]);_0x4bad9b['query']=_[_0x0df8('0x43')](_0x106cf6[_0x0df8('0x30')]);_0x4bad9b[_0x0df8('0x31')]=_['intersection'](_0x4bad9b[_0x0df8('0x2f')],_0x4bad9b[_0x0df8('0x30')]);_0xdea6ce[_0x0df8('0x33')]=_['intersection'](_0x4bad9b[_0x0df8('0x2f')],qs[_0x0df8('0x34')](_0x106cf6['query'][_0x0df8('0x34')]));_0xdea6ce[_0x0df8('0x33')]=_0xdea6ce[_0x0df8('0x33')][_0x0df8('0x35')]?_0xdea6ce[_0x0df8('0x33')]:_0x4bad9b['model'];if(_0x106cf6[_0x0df8('0x30')][_0x0df8('0x3d')]){_0xdea6ce[_0x0df8('0x45')]=[{'all':!![]}];}_0xdea6ce=_[_0x0df8('0x46')]({},_0xdea6ce,_0x106cf6[_0x0df8('0x47')]);return db[_0x0df8('0x3c')][_0x0df8('0x48')](_0xdea6ce)[_0x0df8('0x22')](handleEntityNotFound(_0x7bf98c,null))[_0x0df8('0x22')](respondWithResult(_0x7bf98c,null))[_0x0df8('0x40')](handleError(_0x7bf98c,null));};exports[_0x0df8('0x49')]=function(_0x17de6d,_0x3855de){return db[_0x0df8('0x3c')][_0x0df8('0x49')](_0x17de6d[_0x0df8('0x4a')],{})['then'](function(_0x57d620){var _0x2dd626=_0x17de6d[_0x0df8('0x4b')]['get']({'plain':!![]});if(!_0x2dd626)throw new Error(_0x0df8('0x4c'));if(_0x2dd626[_0x0df8('0x4d')]===_0x0df8('0x4b')){var _0x3397ba=_0x57d620[_0x0df8('0x23')]({'plain':!![]});var _0x57b7fd=_0x0df8('0x24');return db['UserProfileSection'][_0x0df8('0x48')]({'where':{'name':_0x57b7fd,'userProfileId':_0x2dd626[_0x0df8('0x4e')]},'raw':!![]})['then'](function(_0x200b8d){if(_0x200b8d&&_0x200b8d[_0x0df8('0x4f')]===0x0){return db[_0x0df8('0x50')]['create']({'name':_0x3397ba['name'],'resourceId':_0x3397ba['id'],'type':_0x200b8d[_0x0df8('0x28')],'sectionId':_0x200b8d['id']},{})[_0x0df8('0x22')](function(){return _0x57d620;});}else{return _0x57d620;}})['catch'](function(_0x44d3bd){logger[_0x0df8('0x26')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x44d3bd);throw _0x44d3bd;});}return _0x57d620;})[_0x0df8('0x22')](respondWithResult(_0x3855de,0xc9))[_0x0df8('0x40')](handleError(_0x3855de,null));};exports[_0x0df8('0x51')]=function(_0xb9b740,_0x307b5e){if(_0xb9b740[_0x0df8('0x4a')]['id']){delete _0xb9b740['body']['id'];}return db[_0x0df8('0x3c')]['find']({'where':{'id':_0xb9b740[_0x0df8('0x42')]['id']}})[_0x0df8('0x22')](handleEntityNotFound(_0x307b5e,null))[_0x0df8('0x22')](saveUpdates(_0xb9b740[_0x0df8('0x4a')],null))[_0x0df8('0x22')](respondWithResult(_0x307b5e,null))[_0x0df8('0x40')](handleError(_0x307b5e,null));};exports[_0x0df8('0x25')]=function(_0x23dbe0,_0x3c9f06){return db[_0x0df8('0x3c')]['find']({'where':{'id':_0x23dbe0[_0x0df8('0x42')]['id']}})[_0x0df8('0x22')](handleEntityNotFound(_0x3c9f06,null))[_0x0df8('0x22')](removeEntity(_0x3c9f06,null))[_0x0df8('0x40')](handleError(_0x3c9f06,null));}; \ No newline at end of file diff --git a/server/api/variable/variable.model.js b/server/api/variable/variable.model.js index d662365..306c167 100644 --- a/server/api/variable/variable.model.js +++ b/server/api/variable/variable.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x27bc=['Variable','lodash','util','api','bluebird','path','rimraf','../../config/environment','./variable.attributes','exports','define'];(function(_0x40a045,_0x516f0e){var _0x1a687c=function(_0x48c9fe){while(--_0x48c9fe){_0x40a045['push'](_0x40a045['shift']());}};_0x1a687c(++_0x516f0e);}(_0x27bc,0xd2));var _0xc27b=function(_0x5ae709,_0x1cbabc){_0x5ae709=_0x5ae709-0x0;var _0x3f128e=_0x27bc[_0x5ae709];return _0x3f128e;};'use strict';var _=require(_0xc27b('0x0'));var util=require(_0xc27b('0x1'));var logger=require('../../config/logger')(_0xc27b('0x2'));var moment=require('moment');var BPromise=require(_0xc27b('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xc27b('0x4'));var rimraf=require(_0xc27b('0x5'));var config=require(_0xc27b('0x6'));var attributes=require(_0xc27b('0x7'));module[_0xc27b('0x8')]=function(_0x4cd842,_0x10fc5b){return _0x4cd842[_0xc27b('0x9')](_0xc27b('0xa'),attributes,{'tableName':'tools_variables','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x11bf=['Variable','tools_variables','lodash','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./variable.attributes','exports','define'];(function(_0xc67528,_0x24e2fb){var _0x38e26d=function(_0x1b0efe){while(--_0x1b0efe){_0xc67528['push'](_0xc67528['shift']());}};_0x38e26d(++_0x24e2fb);}(_0x11bf,0x188));var _0xf11b=function(_0x5d5491,_0xf51579){_0x5d5491=_0x5d5491-0x0;var _0x3b7c7a=_0x11bf[_0x5d5491];return _0x3b7c7a;};'use strict';var _=require(_0xf11b('0x0'));var util=require('util');var logger=require(_0xf11b('0x1'))(_0xf11b('0x2'));var moment=require(_0xf11b('0x3'));var BPromise=require(_0xf11b('0x4'));var rp=require(_0xf11b('0x5'));var fs=require('fs');var path=require(_0xf11b('0x6'));var rimraf=require(_0xf11b('0x7'));var config=require('../../config/environment');var attributes=require(_0xf11b('0x8'));module[_0xf11b('0x9')]=function(_0x4b47a1,_0x454545){return _0x4b47a1[_0xf11b('0xa')](_0xf11b('0xb'),attributes,{'tableName':_0xf11b('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/variable/variable.rpc.js b/server/api/variable/variable.rpc.js index 4f02ef6..06bcee6 100644 --- a/server/api/variable/variable.rpc.js +++ b/server/api/variable/variable.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x55ca=['options','where','attributes','include','map','model','lodash','util','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','Variable,\x20%s,\x20%s','request\x20sent','debug','Variable,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','ShowVariable','Variable','find'];(function(_0x261062,_0x4145b9){var _0x38ef4f=function(_0x125c76){while(--_0x125c76){_0x261062['push'](_0x261062['shift']());}};_0x38ef4f(++_0x4145b9);}(_0x55ca,0x126));var _0xa55c=function(_0x161f85,_0x1b1968){_0x161f85=_0x161f85-0x0;var _0x3f98ad=_0x55ca[_0x161f85];return _0x3f98ad;};'use strict';var _=require(_0xa55c('0x0'));var util=require(_0xa55c('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xa55c('0x2'));var db=require(_0xa55c('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0xa55c('0x4'))(_0xa55c('0x5'));var config=require(_0xa55c('0x6'));var jayson=require(_0xa55c('0x7'));var client=jayson[_0xa55c('0x8')][_0xa55c('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x36b623,_0x4d0624,_0x2121fd){return new BPromise(function(_0x2537f0,_0x57e069){return client[_0xa55c('0xa')](_0x36b623,_0x2121fd)[_0xa55c('0xb')](function(_0x52a3bc){logger['info'](_0xa55c('0xc'),_0x4d0624,_0xa55c('0xd'));logger[_0xa55c('0xe')](_0xa55c('0xf'),_0x4d0624,_0xa55c('0xd'),JSON[_0xa55c('0x10')](_0x52a3bc));if(_0x52a3bc[_0xa55c('0x11')]){if(_0x52a3bc[_0xa55c('0x11')][_0xa55c('0x12')]===0x1f4){logger[_0xa55c('0x11')]('Variable,\x20%s,\x20%s',_0x4d0624,_0x52a3bc['error'][_0xa55c('0x13')]);return _0x57e069(_0x52a3bc['error']['message']);}logger['error'](_0xa55c('0xc'),_0x4d0624,_0x52a3bc[_0xa55c('0x11')][_0xa55c('0x13')]);return _0x2537f0(_0x52a3bc[_0xa55c('0x11')][_0xa55c('0x13')]);}else{logger[_0xa55c('0x14')]('Variable,\x20%s,\x20%s',_0x4d0624,_0xa55c('0xd'));_0x2537f0(_0x52a3bc[_0xa55c('0x15')][_0xa55c('0x13')]);}})[_0xa55c('0x16')](function(_0x1c4cfd){logger[_0xa55c('0x11')](_0xa55c('0xc'),_0x4d0624,_0x1c4cfd);_0x57e069(_0x1c4cfd);});});}exports[_0xa55c('0x17')]=function(_0x24783b){var _0x4cee3c=this;return new Promise(function(_0x3d4c9e,_0x104a99){return db[_0xa55c('0x18')][_0xa55c('0x19')]({'raw':_0x24783b[_0xa55c('0x1a')]?_0x24783b[_0xa55c('0x1a')]['raw']===undefined?!![]:![]:!![],'where':_0x24783b['options']?_0x24783b[_0xa55c('0x1a')][_0xa55c('0x1b')]||null:null,'attributes':_0x24783b[_0xa55c('0x1a')]?_0x24783b['options'][_0xa55c('0x1c')]||null:null,'include':_0x24783b[_0xa55c('0x1a')]?_0x24783b['options'][_0xa55c('0x1d')]?_[_0xa55c('0x1e')](_0x24783b[_0xa55c('0x1a')][_0xa55c('0x1d')],function(_0x234372){return{'model':db[_0x234372['model']],'as':_0x234372['as'],'attributes':_0x234372[_0xa55c('0x1c')],'include':_0x234372['include']?_['map'](_0x234372['include'],function(_0x19ae88){return{'model':db[_0x19ae88['model']],'as':_0x19ae88['as'],'attributes':_0x19ae88[_0xa55c('0x1c')],'include':_0x19ae88[_0xa55c('0x1d')]?_[_0xa55c('0x1e')](_0x19ae88[_0xa55c('0x1d')],function(_0x2313a9){return{'model':db[_0x2313a9[_0xa55c('0x1f')]],'as':_0x2313a9['as'],'attributes':_0x2313a9[_0xa55c('0x1c')]};}):[]};}):[]};}):[]:[]})[_0xa55c('0xb')](function(_0x192df2){logger[_0xa55c('0x14')](_0xa55c('0x17'),_0x24783b);logger['debug'](_0xa55c('0x17'),_0x24783b,JSON[_0xa55c('0x10')](_0x192df2));_0x3d4c9e(_0x192df2);})[_0xa55c('0x16')](function(_0x906caa){logger['error'](_0xa55c('0x17'),_0x906caa[_0xa55c('0x13')],_0x24783b);_0x104a99(_0x4cee3c[_0xa55c('0x11')](0x1f4,_0x906caa[_0xa55c('0x13')]));});});}; \ No newline at end of file +var _0xa41a=['debug','Variable,\x20%s,\x20%s,\x20%s','error','message','result','catch','ShowVariable','options','raw','where','attributes','include','map','model','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then','info','Variable,\x20%s,\x20%s','request\x20sent'];(function(_0xa6cc5c,_0x239c99){var _0x44803d=function(_0x515b6e){while(--_0x515b6e){_0xa6cc5c['push'](_0xa6cc5c['shift']());}};_0x44803d(++_0x239c99);}(_0xa41a,0x6b));var _0xaa41=function(_0x4d8b14,_0x43d6c3){_0x4d8b14=_0x4d8b14-0x0;var _0x33a537=_0xa41a[_0x4d8b14];return _0x33a537;};'use strict';var _=require(_0xaa41('0x0'));var util=require(_0xaa41('0x1'));var moment=require('moment');var BPromise=require(_0xaa41('0x2'));var rs=require(_0xaa41('0x3'));var fs=require('fs');var Redis=require(_0xaa41('0x4'));var db=require(_0xaa41('0x5'))['db'];var utils=require(_0xaa41('0x6'));var logger=require(_0xaa41('0x7'))(_0xaa41('0x8'));var config=require(_0xaa41('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xaa41('0xa')][_0xaa41('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x54bc5a,_0x5b1fff,_0x179545){return new BPromise(function(_0x202cce,_0x588ab4){return client[_0xaa41('0xc')](_0x54bc5a,_0x179545)[_0xaa41('0xd')](function(_0x409dab){logger[_0xaa41('0xe')](_0xaa41('0xf'),_0x5b1fff,_0xaa41('0x10'));logger[_0xaa41('0x11')](_0xaa41('0x12'),_0x5b1fff,_0xaa41('0x10'),JSON['stringify'](_0x409dab));if(_0x409dab[_0xaa41('0x13')]){if(_0x409dab[_0xaa41('0x13')]['code']===0x1f4){logger['error'](_0xaa41('0xf'),_0x5b1fff,_0x409dab['error'][_0xaa41('0x14')]);return _0x588ab4(_0x409dab[_0xaa41('0x13')][_0xaa41('0x14')]);}logger[_0xaa41('0x13')](_0xaa41('0xf'),_0x5b1fff,_0x409dab['error'][_0xaa41('0x14')]);return _0x202cce(_0x409dab[_0xaa41('0x13')][_0xaa41('0x14')]);}else{logger[_0xaa41('0xe')](_0xaa41('0xf'),_0x5b1fff,_0xaa41('0x10'));_0x202cce(_0x409dab[_0xaa41('0x15')]['message']);}})[_0xaa41('0x16')](function(_0x16b930){logger[_0xaa41('0x13')](_0xaa41('0xf'),_0x5b1fff,_0x16b930);_0x588ab4(_0x16b930);});});}exports[_0xaa41('0x17')]=function(_0xd20ddf){var _0x29efe5=this;return new Promise(function(_0x46e6d3,_0x150ddf){return db['Variable']['find']({'raw':_0xd20ddf[_0xaa41('0x18')]?_0xd20ddf[_0xaa41('0x18')][_0xaa41('0x19')]===undefined?!![]:![]:!![],'where':_0xd20ddf['options']?_0xd20ddf[_0xaa41('0x18')][_0xaa41('0x1a')]||null:null,'attributes':_0xd20ddf['options']?_0xd20ddf['options'][_0xaa41('0x1b')]||null:null,'include':_0xd20ddf['options']?_0xd20ddf[_0xaa41('0x18')][_0xaa41('0x1c')]?_[_0xaa41('0x1d')](_0xd20ddf[_0xaa41('0x18')][_0xaa41('0x1c')],function(_0x4eb01f){return{'model':db[_0x4eb01f[_0xaa41('0x1e')]],'as':_0x4eb01f['as'],'attributes':_0x4eb01f[_0xaa41('0x1b')],'include':_0x4eb01f[_0xaa41('0x1c')]?_[_0xaa41('0x1d')](_0x4eb01f[_0xaa41('0x1c')],function(_0xa1f024){return{'model':db[_0xa1f024['model']],'as':_0xa1f024['as'],'attributes':_0xa1f024['attributes'],'include':_0xa1f024[_0xaa41('0x1c')]?_['map'](_0xa1f024['include'],function(_0x12e362){return{'model':db[_0x12e362['model']],'as':_0x12e362['as'],'attributes':_0x12e362['attributes']};}):[]};}):[]};}):[]:[]})[_0xaa41('0xd')](function(_0x9c8c21){logger[_0xaa41('0xe')](_0xaa41('0x17'),_0xd20ddf);logger[_0xaa41('0x11')](_0xaa41('0x17'),_0xd20ddf,JSON['stringify'](_0x9c8c21));_0x46e6d3(_0x9c8c21);})[_0xaa41('0x16')](function(_0x1f0275){logger[_0xaa41('0x13')](_0xaa41('0x17'),_0x1f0275[_0xaa41('0x14')],_0xd20ddf);_0x150ddf(_0x29efe5[_0xaa41('0x13')](0x1f4,_0x1f0275[_0xaa41('0x14')]));});});}; \ No newline at end of file diff --git a/server/api/version/index.js b/server/api/version/index.js index 433a4a3..7f00fef 100644 --- a/server/api/version/index.js +++ b/server/api/version/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3a77=['express','Router','./version.controller','get','index','canUpdate','fetch','isAuthenticated','reset','/pull','pull','restart','migrations','exports'];(function(_0x268fb4,_0xa36c39){var _0x337a9b=function(_0x550d0d){while(--_0x550d0d){_0x268fb4['push'](_0x268fb4['shift']());}};_0x337a9b(++_0xa36c39);}(_0x3a77,0x1c0));var _0x73a7=function(_0x535345,_0x206b21){_0x535345=_0x535345-0x0;var _0x28c2b7=_0x3a77[_0x535345];return _0x28c2b7;};'use strict';var express=require(_0x73a7('0x0'));var router=express[_0x73a7('0x1')]();var auth=require('../../components/auth/service');var controller=require(_0x73a7('0x2'));router[_0x73a7('0x3')]('/',controller[_0x73a7('0x4')]);router[_0x73a7('0x3')]('/fetch',auth['isAuthenticated'](),auth[_0x73a7('0x5')](),controller[_0x73a7('0x6')]);router[_0x73a7('0x3')]('/reset',auth[_0x73a7('0x7')](),auth['canUpdate'](),controller[_0x73a7('0x8')]);router[_0x73a7('0x3')](_0x73a7('0x9'),auth[_0x73a7('0x7')](),auth[_0x73a7('0x5')](),controller[_0x73a7('0xa')]);router[_0x73a7('0x3')]('/restart',auth[_0x73a7('0x7')](),controller[_0x73a7('0xb')]);router[_0x73a7('0x3')]('/migrations',controller[_0x73a7('0xc')]);module[_0x73a7('0xd')]=router; \ No newline at end of file +var _0xdcc1=['exports','express','Router','./version.controller','get','/fetch','isAuthenticated','/reset','reset','/pull','canUpdate','pull','/restart','restart','/migrations','migrations'];(function(_0x5b5b63,_0x181eff){var _0x10f165=function(_0x4d30b7){while(--_0x4d30b7){_0x5b5b63['push'](_0x5b5b63['shift']());}};_0x10f165(++_0x181eff);}(_0xdcc1,0x121));var _0x1dcc=function(_0x501ec9,_0x48cc8c){_0x501ec9=_0x501ec9-0x0;var _0xaf8354=_0xdcc1[_0x501ec9];return _0xaf8354;};'use strict';var express=require(_0x1dcc('0x0'));var router=express[_0x1dcc('0x1')]();var auth=require('../../components/auth/service');var controller=require(_0x1dcc('0x2'));router[_0x1dcc('0x3')]('/',controller['index']);router[_0x1dcc('0x3')](_0x1dcc('0x4'),auth[_0x1dcc('0x5')](),auth['canUpdate'](),controller['fetch']);router[_0x1dcc('0x3')](_0x1dcc('0x6'),auth[_0x1dcc('0x5')](),auth['canUpdate'](),controller[_0x1dcc('0x7')]);router[_0x1dcc('0x3')](_0x1dcc('0x8'),auth['isAuthenticated'](),auth[_0x1dcc('0x9')](),controller[_0x1dcc('0xa')]);router[_0x1dcc('0x3')](_0x1dcc('0xb'),auth['isAuthenticated'](),controller[_0x1dcc('0xc')]);router['get'](_0x1dcc('0xd'),controller[_0x1dcc('0xe')]);module[_0x1dcc('0xf')]=router; \ No newline at end of file diff --git a/server/api/version/version.controller.js b/server/api/version/version.controller.js index 28d2269..411350a 100644 --- a/server/api/version/version.controller.js +++ b/server/api/version/version.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa429=['constructor','Migration\x20tried\x20to\x20use\x20old\x20style\x20\x22done\x22\x20callback.\x20Please\x20upgrade\x20to\x20\x22umzug\x22\x20and\x20return\x20a\x20promise\x20instead.','map','Database\x20migrated\x20successfully\x20from\x20version\x20','\x20to\x20','UniqueConstraintError','Database\x20already\x20up-to-date','lodash','pkginfo','version','compare-versions','child_process','exec','../../mysqldb','../../config/environment','../../config/pm2','../../config/logger','update','simple-git','root','index','query','latest','2.0.0','status','json','fetch','origin','master','error','git\x20fetch','git\x20fetch\x20origin\x20master','reset','--hard','FETCH_HEAD','git\x20reset\x20--hard\x20FETCH_HEAD','git\x20reset\x20--hard','pull','npm\x20install\x20--production','info','restart','motion2','then','pm2\x20restart\x20motion\x20%s','Your\x20system\x20has\x20been\x20restart\x20successfully','join','server','migrations','length','replace','.js','exports','push','sort','sequelize','Migration','getQueryInterface'];(function(_0x25d386,_0x108d0d){var _0x857f4a=function(_0x3eb98d){while(--_0x3eb98d){_0x25d386['push'](_0x25d386['shift']());}};_0x857f4a(++_0x108d0d);}(_0xa429,0x196));var _0x9a42=function(_0x18df8f,_0x146222){_0x18df8f=_0x18df8f-0x0;var _0x44c503=_0xa429[_0x18df8f];return _0x44c503;};'use strict';var Umzug=require('umzug');var path=require('path');var fs=require('fs');var _=require(_0x9a42('0x0'));var pkginfo=require(_0x9a42('0x1'))(module,_0x9a42('0x2'));var compareVersions=require(_0x9a42('0x3'));var exec=require(_0x9a42('0x4'))[_0x9a42('0x5')];var db=require(_0x9a42('0x6'))['db'];var config=require(_0x9a42('0x7'));var pm2=require(_0x9a42('0x8'));var logger=require(_0x9a42('0x9'))(_0x9a42('0xa'));var git=require(_0x9a42('0xb'))(config[_0x9a42('0xc')]);exports[_0x9a42('0xd')]=function(_0x24690a,_0x1f70a0){var _0x4ded1f={'current':module['exports'][_0x9a42('0x2')],'phonebar':0x2};if(_0x24690a[_0x9a42('0xe')]&&_0x24690a[_0x9a42('0xe')][_0x9a42('0xf')]){return git['fetch']()['tags'](function(_0x5a84cb,_0x585640){_0x4ded1f['latest']=(_0x5a84cb?module['exports']['version']:_0x585640[_0x9a42('0xf')])||_0x9a42('0x10');return _0x1f70a0[_0x9a42('0x11')](0xc8)[_0x9a42('0x12')](_0x4ded1f);});}else{return _0x1f70a0[_0x9a42('0x11')](0xc8)['json'](_0x4ded1f);}};exports[_0x9a42('0x13')]=function(_0x1c1bfc,_0x28f72f){return git[_0x9a42('0x13')]([_0x9a42('0x14'),_0x9a42('0x15')],function(_0x3bbfd9){if(_0x3bbfd9){logger[_0x9a42('0x16')](_0x3bbfd9);return _0x28f72f[_0x9a42('0x11')](0x1f4)[_0x9a42('0x12')](_0x3bbfd9);}logger['info'](_0x9a42('0x17'));return _0x28f72f[_0x9a42('0x11')](0xc8)[_0x9a42('0x12')]({'output':_0x9a42('0x18')});});};exports[_0x9a42('0x19')]=function(_0x1ac259,_0x155080){return git[_0x9a42('0x19')]([_0x9a42('0x1a'),_0x9a42('0x1b')],function(_0x1601f8){if(_0x1601f8){logger['error'](_0x1601f8);return _0x155080[_0x9a42('0x11')](0x1f4)[_0x9a42('0x12')](_0x1601f8);}logger['info'](_0x9a42('0x1c'));return _0x155080['status'](0xc8)['json']({'output':_0x9a42('0x1d')});});};exports[_0x9a42('0x1e')]=function(_0x4e6b7b,_0x3ee5c){exec(_0x9a42('0x1f'),function(_0x4c1742,_0x31e44b,_0x339eb7){logger[_0x9a42('0x20')](_0x31e44b);logger[_0x9a42('0x20')](_0x339eb7);if(_0x4c1742){logger[_0x9a42('0x16')](_0x4c1742);return _0x3ee5c[_0x9a42('0x11')](0x1f4)['json'](_0x4c1742);}return _0x3ee5c['status'](0xc8)[_0x9a42('0x12')]({'output':_0x31e44b});});};exports[_0x9a42('0x21')]=function(_0x52e0fe,_0x164861){return pm2[_0x9a42('0x21')](_0x9a42('0x22'))[_0x9a42('0x23')](function(_0x183f76){logger[_0x9a42('0x20')](_0x9a42('0x24'),_0x183f76);return _0x164861[_0x9a42('0x11')](0xc8)[_0x9a42('0x12')]({'output':_0x9a42('0x25')});})['catch'](function(_0xec5506){logger[_0x9a42('0x16')](_0xec5506);return _0x164861[_0x9a42('0x11')](0x1f4)['json'](_0xec5506);});};exports['migrations']=function(_0x2fbe96,_0x440947){var _0x85536a=fs['readdirSync'](path[_0x9a42('0x26')](config[_0x9a42('0xc')],_0x9a42('0x27'),_0x9a42('0x28')));var _0x13398a=[];for(var _0xf1e635=0x0;_0xf1e635<_0x85536a[_0x9a42('0x29')];_0xf1e635++){var _0x4bee23=_0x85536a[_0xf1e635][_0x9a42('0x2a')](_0x9a42('0x2b'),'');if(compareVersions(module[_0x9a42('0x2c')]['version'],_0x4bee23)===-0x1){_0x13398a[_0x9a42('0x2d')](_0x4bee23);}}if(_0x13398a['length']){var _0x179533=_0x13398a[_0x9a42('0x2e')](compareVersions);var _0x342677=new Umzug({'storage':_0x9a42('0x2f'),'storageOptions':{'model':db[_0x9a42('0x30')],'modelName':_0x9a42('0x30'),'columnName':_0x9a42('0x2')},'migrations':{'params':[db['sequelize'][_0x9a42('0x31')](),db['sequelize'][_0x9a42('0x32')],function(){throw new Error(_0x9a42('0x33'));}],'path':path[_0x9a42('0x26')](config[_0x9a42('0xc')],_0x9a42('0x27'),_0x9a42('0x28')),'pattern':/\.js$/}});_0x342677['up']({'migrations':_[_0x9a42('0x34')](_0x179533,function(_0x111d7c){return _0x111d7c+_0x9a42('0x2b');})})['then'](function(){return _0x440947[_0x9a42('0x11')](0xc8)[_0x9a42('0x12')]({'output':_0x9a42('0x35')+module['exports']['version']+_0x9a42('0x36')+_['last'](_0x179533),'migrations':_['join'](_0x179533)});})['catch'](function(_0x409a4e){if(_0x409a4e instanceof db['sequelize'][_0x9a42('0x37')]){return _0x440947[_0x9a42('0x11')](0xc8)[_0x9a42('0x12')]({'output':_0x9a42('0x38')});}else{return _0x440947['status'](0x1f4)['json'](_0x409a4e);}});}else{return _0x440947['status'](0xc8)[_0x9a42('0x12')]({'output':_0x9a42('0x38')});}}; \ No newline at end of file +var _0xda8a=['simple-git','root','index','exports','version','latest','fetch','status','json','origin','master','error','info','git\x20fetch','git\x20fetch\x20origin\x20master','reset','--hard','FETCH_HEAD','git\x20reset\x20--hard\x20FETCH_HEAD','git\x20reset\x20--hard','pull','npm\x20install\x20--production','restart','motion2','then','pm2\x20restart\x20motion\x20%s','Your\x20system\x20has\x20been\x20restart\x20successfully','catch','migrations','readdirSync','join','server','length','push','sort','sequelize','Migration','getQueryInterface','constructor','Migration\x20tried\x20to\x20use\x20old\x20style\x20\x22done\x22\x20callback.\x20Please\x20upgrade\x20to\x20\x22umzug\x22\x20and\x20return\x20a\x20promise\x20instead.','.js','Database\x20migrated\x20successfully\x20from\x20version\x20','last','UniqueConstraintError','Database\x20already\x20up-to-date','umzug','path','lodash','compare-versions','child_process','exec','../../config/environment','../../config/logger','update'];(function(_0x15bc81,_0x4d4f77){var _0x59440e=function(_0x1b60f2){while(--_0x1b60f2){_0x15bc81['push'](_0x15bc81['shift']());}};_0x59440e(++_0x4d4f77);}(_0xda8a,0xcf));var _0xada8=function(_0x256d2e,_0x3a2009){_0x256d2e=_0x256d2e-0x0;var _0x197803=_0xda8a[_0x256d2e];return _0x197803;};'use strict';var Umzug=require(_0xada8('0x0'));var path=require(_0xada8('0x1'));var fs=require('fs');var _=require(_0xada8('0x2'));var pkginfo=require('pkginfo')(module,'version');var compareVersions=require(_0xada8('0x3'));var exec=require(_0xada8('0x4'))[_0xada8('0x5')];var db=require('../../mysqldb')['db'];var config=require(_0xada8('0x6'));var pm2=require('../../config/pm2');var logger=require(_0xada8('0x7'))(_0xada8('0x8'));var git=require(_0xada8('0x9'))(config[_0xada8('0xa')]);exports[_0xada8('0xb')]=function(_0x4be440,_0x1f8d8f){var _0x1cf821={'current':module[_0xada8('0xc')][_0xada8('0xd')],'phonebar':0x2};if(_0x4be440['query']&&_0x4be440['query'][_0xada8('0xe')]){return git[_0xada8('0xf')]()['tags'](function(_0x5a7379,_0x346ba8){_0x1cf821[_0xada8('0xe')]=(_0x5a7379?module['exports'][_0xada8('0xd')]:_0x346ba8[_0xada8('0xe')])||'2.0.0';return _0x1f8d8f[_0xada8('0x10')](0xc8)[_0xada8('0x11')](_0x1cf821);});}else{return _0x1f8d8f[_0xada8('0x10')](0xc8)[_0xada8('0x11')](_0x1cf821);}};exports[_0xada8('0xf')]=function(_0xad98c1,_0x143b36){return git[_0xada8('0xf')]([_0xada8('0x12'),_0xada8('0x13')],function(_0x2e9f84){if(_0x2e9f84){logger[_0xada8('0x14')](_0x2e9f84);return _0x143b36[_0xada8('0x10')](0x1f4)[_0xada8('0x11')](_0x2e9f84);}logger[_0xada8('0x15')](_0xada8('0x16'));return _0x143b36[_0xada8('0x10')](0xc8)['json']({'output':_0xada8('0x17')});});};exports[_0xada8('0x18')]=function(_0x2fe12f,_0x2ee387){return git[_0xada8('0x18')]([_0xada8('0x19'),_0xada8('0x1a')],function(_0x29110b){if(_0x29110b){logger[_0xada8('0x14')](_0x29110b);return _0x2ee387[_0xada8('0x10')](0x1f4)['json'](_0x29110b);}logger[_0xada8('0x15')](_0xada8('0x1b'));return _0x2ee387['status'](0xc8)[_0xada8('0x11')]({'output':_0xada8('0x1c')});});};exports[_0xada8('0x1d')]=function(_0xfec289,_0x4779bf){exec(_0xada8('0x1e'),function(_0x224aac,_0x2d252d,_0x40ccdb){logger[_0xada8('0x15')](_0x2d252d);logger[_0xada8('0x15')](_0x40ccdb);if(_0x224aac){logger[_0xada8('0x14')](_0x224aac);return _0x4779bf[_0xada8('0x10')](0x1f4)[_0xada8('0x11')](_0x224aac);}return _0x4779bf[_0xada8('0x10')](0xc8)[_0xada8('0x11')]({'output':_0x2d252d});});};exports[_0xada8('0x1f')]=function(_0x12c8ba,_0x5a2ae7){return pm2['restart'](_0xada8('0x20'))[_0xada8('0x21')](function(_0x50cb01){logger['info'](_0xada8('0x22'),_0x50cb01);return _0x5a2ae7['status'](0xc8)[_0xada8('0x11')]({'output':_0xada8('0x23')});})[_0xada8('0x24')](function(_0x16f9d0){logger[_0xada8('0x14')](_0x16f9d0);return _0x5a2ae7[_0xada8('0x10')](0x1f4)[_0xada8('0x11')](_0x16f9d0);});};exports[_0xada8('0x25')]=function(_0x309706,_0x3bac52){var _0x4f25be=fs[_0xada8('0x26')](path[_0xada8('0x27')](config[_0xada8('0xa')],_0xada8('0x28'),'migrations'));var _0x463225=[];for(var _0x92184d=0x0;_0x92184d<_0x4f25be[_0xada8('0x29')];_0x92184d++){var _0x54a9ae=_0x4f25be[_0x92184d]['replace']('.js','');if(compareVersions(module[_0xada8('0xc')][_0xada8('0xd')],_0x54a9ae)===-0x1){_0x463225[_0xada8('0x2a')](_0x54a9ae);}}if(_0x463225['length']){var _0xc6ed87=_0x463225[_0xada8('0x2b')](compareVersions);var _0x39aa87=new Umzug({'storage':_0xada8('0x2c'),'storageOptions':{'model':db[_0xada8('0x2d')],'modelName':'Migration','columnName':'version'},'migrations':{'params':[db['sequelize'][_0xada8('0x2e')](),db[_0xada8('0x2c')][_0xada8('0x2f')],function(){throw new Error(_0xada8('0x30'));}],'path':path[_0xada8('0x27')](config[_0xada8('0xa')],_0xada8('0x28'),'migrations'),'pattern':/\.js$/}});_0x39aa87['up']({'migrations':_['map'](_0xc6ed87,function(_0x313dd0){return _0x313dd0+_0xada8('0x31');})})[_0xada8('0x21')](function(){return _0x3bac52['status'](0xc8)[_0xada8('0x11')]({'output':_0xada8('0x32')+module[_0xada8('0xc')][_0xada8('0xd')]+'\x20to\x20'+_[_0xada8('0x33')](_0xc6ed87),'migrations':_[_0xada8('0x27')](_0xc6ed87)});})[_0xada8('0x24')](function(_0x28fb56){if(_0x28fb56 instanceof db[_0xada8('0x2c')][_0xada8('0x34')]){return _0x3bac52[_0xada8('0x10')](0xc8)['json']({'output':_0xada8('0x35')});}else{return _0x3bac52[_0xada8('0x10')](0x1f4)[_0xada8('0x11')](_0x28fb56);}});}else{return _0x3bac52[_0xada8('0x10')](0xc8)[_0xada8('0x11')]({'output':_0xada8('0x35')});}}; \ No newline at end of file diff --git a/server/api/voiceAgentReport/index.js b/server/api/voiceAgentReport/index.js index 3f05cff..2a11ca4 100644 --- a/server/api/voiceAgentReport/index.js +++ b/server/api/voiceAgentReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7a4d=['/:id','show','delete','destroy','exports','util','connect-timeout','express','fs-extra','../../components/auth/service','./voiceAgentReport.controller','isAuthenticated','/describe','describe','get'];(function(_0x5875db,_0x4e3c5e){var _0x266d77=function(_0x37b03d){while(--_0x37b03d){_0x5875db['push'](_0x5875db['shift']());}};_0x266d77(++_0x4e3c5e);}(_0x7a4d,0x1f4));var _0xd7a4=function(_0x3511d3,_0x4107ae){_0x3511d3=_0x3511d3-0x0;var _0x5d6321=_0x7a4d[_0x3511d3];return _0x5d6321;};'use strict';var multer=require('multer');var util=require(_0xd7a4('0x0'));var path=require('path');var timeout=require(_0xd7a4('0x1'));var express=require(_0xd7a4('0x2'));var router=express['Router']();var fs_extra=require(_0xd7a4('0x3'));var auth=require(_0xd7a4('0x4'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xd7a4('0x5'));router['get']('/',auth[_0xd7a4('0x6')](),controller['index']);router['get'](_0xd7a4('0x7'),auth[_0xd7a4('0x6')](),controller[_0xd7a4('0x8')]);router[_0xd7a4('0x9')](_0xd7a4('0xa'),auth[_0xd7a4('0x6')](),controller[_0xd7a4('0xb')]);router['post']('/',auth[_0xd7a4('0x6')](),controller['create']);router['put']('/:id',auth[_0xd7a4('0x6')](),controller['update']);router[_0xd7a4('0xc')](_0xd7a4('0xa'),auth[_0xd7a4('0x6')](),controller[_0xd7a4('0xd')]);module[_0xd7a4('0xe')]=router; \ No newline at end of file +var _0x6026=['connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceAgentReport.controller','isAuthenticated','index','get','/describe','describe','/:id','show','post','create','put','update','delete','destroy','exports','multer','util','path'];(function(_0x903228,_0x42c429){var _0xcec81d=function(_0x4da97a){while(--_0x4da97a){_0x903228['push'](_0x903228['shift']());}};_0xcec81d(++_0x42c429);}(_0x6026,0x1bf));var _0x6602=function(_0xf5bbe5,_0x2b046a){_0xf5bbe5=_0xf5bbe5-0x0;var _0x25265d=_0x6026[_0xf5bbe5];return _0x25265d;};'use strict';var multer=require(_0x6602('0x0'));var util=require(_0x6602('0x1'));var path=require(_0x6602('0x2'));var timeout=require(_0x6602('0x3'));var express=require(_0x6602('0x4'));var router=express[_0x6602('0x5')]();var fs_extra=require(_0x6602('0x6'));var auth=require(_0x6602('0x7'));var interaction=require(_0x6602('0x8'));var config=require(_0x6602('0x9'));var controller=require(_0x6602('0xa'));router['get']('/',auth[_0x6602('0xb')](),controller[_0x6602('0xc')]);router[_0x6602('0xd')](_0x6602('0xe'),auth['isAuthenticated'](),controller[_0x6602('0xf')]);router[_0x6602('0xd')](_0x6602('0x10'),auth['isAuthenticated'](),controller[_0x6602('0x11')]);router[_0x6602('0x12')]('/',auth['isAuthenticated'](),controller[_0x6602('0x13')]);router[_0x6602('0x14')](_0x6602('0x10'),auth['isAuthenticated'](),controller[_0x6602('0x15')]);router[_0x6602('0x16')](_0x6602('0x10'),auth[_0x6602('0xb')](),controller[_0x6602('0x17')]);module[_0x6602('0x18')]=router; \ No newline at end of file diff --git a/server/api/voiceAgentReport/voiceAgentReport.attributes.js b/server/api/voiceAgentReport/voiceAgentReport.attributes.js index 99ba6c8..1689f8d 100644 --- a/server/api/voiceAgentReport/voiceAgentReport.attributes.js +++ b/server/api/voiceAgentReport/voiceAgentReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2bab=['FORWARD,\x20BLIND,\x20ATTENDED','sequelize','exports','STRING','DATE','INTEGER','BOOLEAN'];(function(_0xf105aa,_0x22d153){var _0x34d1e5=function(_0xba77e){while(--_0xba77e){_0xf105aa['push'](_0xf105aa['shift']());}};_0x34d1e5(++_0x22d153);}(_0x2bab,0x1ba));var _0xb2ba=function(_0x121e9a,_0x32af61){_0x121e9a=_0x121e9a-0x0;var _0x36a327=_0x2bab[_0x121e9a];return _0x36a327;};'use strict';var Sequelize=require(_0xb2ba('0x0'));module[_0xb2ba('0x1')]={'type':{'type':Sequelize[_0xb2ba('0x2')]},'uniqueid':{'type':Sequelize[_0xb2ba('0x2')]},'calleridnum':{'type':Sequelize['STRING']},'calleridname':{'type':Sequelize[_0xb2ba('0x2')]},'queue':{'type':Sequelize[_0xb2ba('0x2')]},'interface':{'type':Sequelize[_0xb2ba('0x2')]},'membername':{'type':Sequelize['STRING']},'agentcalledAt':{'type':Sequelize[_0xb2ba('0x3')]},'agentconnectAt':{'type':Sequelize[_0xb2ba('0x3')]},'agentcompleteAt':{'type':Sequelize['DATE']},'agentringnoanswerAt':{'type':Sequelize['DATE']},'agentdumpAt':{'type':Sequelize['DATE']},'holdtime':{'type':Sequelize[_0xb2ba('0x4')]},'agentcomplete':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentringnoanswer':{'type':Sequelize[_0xb2ba('0x5')],'defaultValue':![]},'agentdump':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'talktime':{'type':Sequelize['INTEGER']},'agentacw':{'type':Sequelize[_0xb2ba('0x5')],'defaultValue':![]},'acwtime':{'type':Sequelize[_0xb2ba('0x4')]},'reason':{'type':Sequelize[_0xb2ba('0x2')]},'lastevent':{'type':Sequelize[_0xb2ba('0x2')]},'channel':{'type':Sequelize['STRING']},'channelstate':{'type':Sequelize[_0xb2ba('0x4')]},'channelstatedesc':{'type':Sequelize[_0xb2ba('0x2')]},'connectedlinenum':{'type':Sequelize['STRING']},'connectedlinename':{'type':Sequelize['STRING']},'language':{'type':Sequelize[_0xb2ba('0x2')]},'accountcode':{'type':Sequelize[_0xb2ba('0x2')]},'context':{'type':Sequelize['STRING']},'exten':{'type':Sequelize[_0xb2ba('0x2')]},'priority':{'type':Sequelize[_0xb2ba('0x2')]},'destchannel':{'type':Sequelize[_0xb2ba('0x2')]},'destchannelstate':{'type':Sequelize['INTEGER']},'destchannelstatedesc':{'type':Sequelize[_0xb2ba('0x2')]},'destcalleridnum':{'type':Sequelize[_0xb2ba('0x2')]},'destcalleridname':{'type':Sequelize[_0xb2ba('0x2')]},'destconnectedlinenum':{'type':Sequelize[_0xb2ba('0x2')]},'destconnectedlinename':{'type':Sequelize[_0xb2ba('0x2')]},'destlanguage':{'type':Sequelize['STRING']},'destaccountcode':{'type':Sequelize['STRING']},'destcontext':{'type':Sequelize['STRING']},'destexten':{'type':Sequelize[_0xb2ba('0x2')]},'destpriority':{'type':Sequelize[_0xb2ba('0x2')]},'destuniqueid':{'type':Sequelize[_0xb2ba('0x2')]},'answeredelsewheredestinationuniqueid':{'type':Sequelize[_0xb2ba('0x2')]},'answeredelsewheremembername':{'type':Sequelize['STRING']},'transfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'transfertype':{'type':Sequelize[_0xb2ba('0x2')],'comment':_0xb2ba('0x6')},'transferexten':{'type':Sequelize[_0xb2ba('0x2')]},'transferuniqueid':{'type':Sequelize[_0xb2ba('0x2')]},'agententerreason':{'type':Sequelize[_0xb2ba('0x4')],'defaultValue':0x0}}; \ No newline at end of file +var _0x4f9b=['DATE','INTEGER','BOOLEAN','FORWARD,\x20BLIND,\x20ATTENDED','sequelize','exports','STRING'];(function(_0x2dafbe,_0x5d04de){var _0x58a45a=function(_0x50ac96){while(--_0x50ac96){_0x2dafbe['push'](_0x2dafbe['shift']());}};_0x58a45a(++_0x5d04de);}(_0x4f9b,0x6d));var _0xb4f9=function(_0x3868c0,_0x5c5666){_0x3868c0=_0x3868c0-0x0;var _0x4eab7e=_0x4f9b[_0x3868c0];return _0x4eab7e;};'use strict';var Sequelize=require(_0xb4f9('0x0'));module[_0xb4f9('0x1')]={'type':{'type':Sequelize[_0xb4f9('0x2')]},'uniqueid':{'type':Sequelize[_0xb4f9('0x2')]},'calleridnum':{'type':Sequelize[_0xb4f9('0x2')]},'calleridname':{'type':Sequelize[_0xb4f9('0x2')]},'queue':{'type':Sequelize[_0xb4f9('0x2')]},'interface':{'type':Sequelize[_0xb4f9('0x2')]},'membername':{'type':Sequelize['STRING']},'agentcalledAt':{'type':Sequelize['DATE']},'agentconnectAt':{'type':Sequelize['DATE']},'agentcompleteAt':{'type':Sequelize[_0xb4f9('0x3')]},'agentringnoanswerAt':{'type':Sequelize[_0xb4f9('0x3')]},'agentdumpAt':{'type':Sequelize[_0xb4f9('0x3')]},'holdtime':{'type':Sequelize[_0xb4f9('0x4')]},'agentcomplete':{'type':Sequelize[_0xb4f9('0x5')],'defaultValue':![]},'agentringnoanswer':{'type':Sequelize[_0xb4f9('0x5')],'defaultValue':![]},'agentdump':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'talktime':{'type':Sequelize[_0xb4f9('0x4')]},'agentacw':{'type':Sequelize[_0xb4f9('0x5')],'defaultValue':![]},'acwtime':{'type':Sequelize[_0xb4f9('0x4')]},'reason':{'type':Sequelize['STRING']},'lastevent':{'type':Sequelize[_0xb4f9('0x2')]},'channel':{'type':Sequelize['STRING']},'channelstate':{'type':Sequelize[_0xb4f9('0x4')]},'channelstatedesc':{'type':Sequelize[_0xb4f9('0x2')]},'connectedlinenum':{'type':Sequelize[_0xb4f9('0x2')]},'connectedlinename':{'type':Sequelize[_0xb4f9('0x2')]},'language':{'type':Sequelize[_0xb4f9('0x2')]},'accountcode':{'type':Sequelize[_0xb4f9('0x2')]},'context':{'type':Sequelize[_0xb4f9('0x2')]},'exten':{'type':Sequelize['STRING']},'priority':{'type':Sequelize[_0xb4f9('0x2')]},'destchannel':{'type':Sequelize[_0xb4f9('0x2')]},'destchannelstate':{'type':Sequelize[_0xb4f9('0x4')]},'destchannelstatedesc':{'type':Sequelize['STRING']},'destcalleridnum':{'type':Sequelize['STRING']},'destcalleridname':{'type':Sequelize[_0xb4f9('0x2')]},'destconnectedlinenum':{'type':Sequelize[_0xb4f9('0x2')]},'destconnectedlinename':{'type':Sequelize[_0xb4f9('0x2')]},'destlanguage':{'type':Sequelize[_0xb4f9('0x2')]},'destaccountcode':{'type':Sequelize[_0xb4f9('0x2')]},'destcontext':{'type':Sequelize[_0xb4f9('0x2')]},'destexten':{'type':Sequelize[_0xb4f9('0x2')]},'destpriority':{'type':Sequelize[_0xb4f9('0x2')]},'destuniqueid':{'type':Sequelize[_0xb4f9('0x2')]},'answeredelsewheredestinationuniqueid':{'type':Sequelize[_0xb4f9('0x2')]},'answeredelsewheremembername':{'type':Sequelize[_0xb4f9('0x2')]},'transfer':{'type':Sequelize[_0xb4f9('0x5')],'defaultValue':![]},'transfertype':{'type':Sequelize['STRING'],'comment':_0xb4f9('0x6')},'transferexten':{'type':Sequelize[_0xb4f9('0x2')]},'transferuniqueid':{'type':Sequelize[_0xb4f9('0x2')]},'agententerreason':{'type':Sequelize[_0xb4f9('0x4')],'defaultValue':0x0}}; \ No newline at end of file diff --git a/server/api/voiceAgentReport/voiceAgentReport.controller.js b/server/api/voiceAgentReport/voiceAgentReport.controller.js index ac49a1b..2992776 100644 --- a/server/api/voiceAgentReport/voiceAgentReport.controller.js +++ b/server/api/voiceAgentReport/voiceAgentReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['type','options','includeAll','include','findAll','catch','show','params','find','body','describe','eml-format','rimraf','zip-dir','moment','mustache','util','path','sox','to-csv','fs-extra','lodash','squel','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/license/util','../../mysqldb','sendStatus','end','status','json','undefined','limit','offset','count','set','Content-Range','apply','save','update','then','destroy','stack','name','send','index','VoiceAgentReport','rawAttributes','fieldName','key','model','map','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','sort','where','filter','merge'];(function(_0x1a72f3,_0x217011){var _0x57ef47=function(_0x20123d){while(--_0x20123d){_0x1a72f3['push'](_0x1a72f3['shift']());}};_0x57ef47(++_0x217011);}(_0xa9e0,0x123));var _0x0a9e=function(_0x3ce3c,_0x319337){_0x3ce3c=_0x3ce3c-0x0;var _0x55a2c9=_0xa9e0[_0x3ce3c];return _0x55a2c9;};'use strict';var emlformat=require(_0x0a9e('0x0'));var rimraf=require(_0x0a9e('0x1'));var zipdir=require(_0x0a9e('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x0a9e('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x0a9e('0x4'));var util=require(_0x0a9e('0x5'));var path=require(_0x0a9e('0x6'));var sox=require(_0x0a9e('0x7'));var csv=require(_0x0a9e('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x0a9e('0x9'));var _=require(_0x0a9e('0xa'));var squel=require(_0x0a9e('0xb'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x0a9e('0xc'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x0a9e('0xd'));var Redis=require(_0x0a9e('0xe'));var authService=require(_0x0a9e('0xf'));var qs=require(_0x0a9e('0x10'));var as=require(_0x0a9e('0x11'));var hardwareService=require(_0x0a9e('0x12'));var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x0a9e('0x13'));var db=require(_0x0a9e('0x14'))['db'];function respondWithStatusCode(_0xd5b662,_0x26d672){_0x26d672=_0x26d672||0xcc;return function(_0x32d742){if(_0x32d742){return _0xd5b662[_0x0a9e('0x15')](_0x26d672);}return _0xd5b662['status'](_0x26d672)[_0x0a9e('0x16')]();};}function respondWithResult(_0x239b12,_0x2b4227){_0x2b4227=_0x2b4227||0xc8;return function(_0x281129){if(_0x281129){return _0x239b12[_0x0a9e('0x17')](_0x2b4227)[_0x0a9e('0x18')](_0x281129);}};}function respondWithFilteredResult(_0x52a03d,_0x22dccb){return function(_0x5d0880){if(_0x5d0880){var _0x1985b6=typeof _0x22dccb['offset']===_0x0a9e('0x19')&&typeof _0x22dccb[_0x0a9e('0x1a')]==='undefined';var _0x225616=_0x5d0880['count'];var _0x459eb1=_0x1985b6?0x0:_0x22dccb[_0x0a9e('0x1b')];var _0x106033=_0x1985b6?_0x5d0880[_0x0a9e('0x1c')]:_0x22dccb[_0x0a9e('0x1b')]+_0x22dccb[_0x0a9e('0x1a')];var _0x530eb7;if(_0x106033>=_0x225616){_0x106033=_0x225616;_0x530eb7=0xc8;}else{_0x530eb7=0xce;}_0x52a03d[_0x0a9e('0x17')](_0x530eb7);return _0x52a03d[_0x0a9e('0x1d')](_0x0a9e('0x1e'),_0x459eb1+'-'+_0x106033+'/'+_0x225616)[_0x0a9e('0x18')](_0x5d0880);}return null;};}function patchUpdates(_0x105080){return function(_0x4bb1e3){try{jsonpatch[_0x0a9e('0x1f')](_0x4bb1e3,_0x105080,!![]);}catch(_0x155cce){return BPromise['reject'](_0x155cce);}return _0x4bb1e3[_0x0a9e('0x20')]();};}function saveUpdates(_0x5a09ef,_0x588269){return function(_0x3a02e1){if(_0x3a02e1){return _0x3a02e1[_0x0a9e('0x21')](_0x5a09ef)[_0x0a9e('0x22')](function(_0x30bae6){return _0x30bae6;});}return null;};}function removeEntity(_0x4abc77,_0xfb6e48){return function(_0x2fb0e4){if(_0x2fb0e4){return _0x2fb0e4[_0x0a9e('0x23')]()[_0x0a9e('0x22')](function(){_0x4abc77[_0x0a9e('0x17')](0xcc)[_0x0a9e('0x16')]();});}};}function handleEntityNotFound(_0x16b1ca,_0x5ea472){return function(_0x59181e){if(!_0x59181e){_0x16b1ca[_0x0a9e('0x15')](0x194);}return _0x59181e;};}function handleError(_0x3a8e58,_0x40c424){_0x40c424=_0x40c424||0x1f4;return function(_0x33161b){logger['error'](_0x33161b[_0x0a9e('0x24')]);if(_0x33161b['name']){delete _0x33161b[_0x0a9e('0x25')];}_0x3a8e58['status'](_0x40c424)[_0x0a9e('0x26')](_0x33161b);};}exports[_0x0a9e('0x27')]=function(_0x25fba9,_0x14433c){var _0x140511={},_0x1538a4={},_0x11c3b6={'count':0x0,'rows':[]};var _0x14de77=_['map'](db[_0x0a9e('0x28')][_0x0a9e('0x29')],function(_0x2b1f27){return{'name':_0x2b1f27[_0x0a9e('0x2a')],'type':_0x2b1f27['type'][_0x0a9e('0x2b')]};});_0x1538a4[_0x0a9e('0x2c')]=_[_0x0a9e('0x2d')](_0x14de77,_0x0a9e('0x25'));_0x1538a4[_0x0a9e('0x2e')]=_[_0x0a9e('0x2f')](_0x25fba9[_0x0a9e('0x2e')]);_0x1538a4[_0x0a9e('0x30')]=_[_0x0a9e('0x31')](_0x1538a4['model'],_0x1538a4[_0x0a9e('0x2e')]);_0x140511['attributes']=_[_0x0a9e('0x31')](_0x1538a4[_0x0a9e('0x2c')],qs[_0x0a9e('0x32')](_0x25fba9[_0x0a9e('0x2e')][_0x0a9e('0x32')]));_0x140511['attributes']=_0x140511[_0x0a9e('0x33')][_0x0a9e('0x34')]?_0x140511[_0x0a9e('0x33')]:_0x1538a4[_0x0a9e('0x2c')];if(!_0x25fba9[_0x0a9e('0x2e')][_0x0a9e('0x35')](_0x0a9e('0x36'))){_0x140511[_0x0a9e('0x1a')]=qs['limit'](_0x25fba9[_0x0a9e('0x2e')]['limit']);_0x140511[_0x0a9e('0x1b')]=qs[_0x0a9e('0x1b')](_0x25fba9[_0x0a9e('0x2e')][_0x0a9e('0x1b')]);}_0x140511['order']=qs[_0x0a9e('0x37')](_0x25fba9[_0x0a9e('0x2e')][_0x0a9e('0x37')]);_0x140511[_0x0a9e('0x38')]=qs['filters'](_['pick'](_0x25fba9[_0x0a9e('0x2e')],_0x1538a4['filters']),_0x14de77);if(_0x25fba9[_0x0a9e('0x2e')][_0x0a9e('0x39')]){_0x140511[_0x0a9e('0x38')]=_[_0x0a9e('0x3a')](_0x140511['where'],{'$or':_[_0x0a9e('0x2d')](_0x14de77,function(_0x3bfce8){if(_0x3bfce8[_0x0a9e('0x3b')]!=='VIRTUAL'){var _0x1dbf74={};_0x1dbf74[_0x3bfce8[_0x0a9e('0x25')]]={'$like':'%'+_0x25fba9[_0x0a9e('0x2e')]['filter']+'%'};return _0x1dbf74;}})});}_0x140511=_['merge']({},_0x140511,_0x25fba9[_0x0a9e('0x3c')]);var _0x40d766={'where':_0x140511['where']};return db[_0x0a9e('0x28')][_0x0a9e('0x1c')](_0x40d766)[_0x0a9e('0x22')](function(_0x148f55){_0x11c3b6['count']=_0x148f55;if(_0x25fba9['query'][_0x0a9e('0x3d')]){_0x140511[_0x0a9e('0x3e')]=[{'all':!![]}];}return db['VoiceAgentReport'][_0x0a9e('0x3f')](_0x140511);})[_0x0a9e('0x22')](function(_0x1459bb){_0x11c3b6['rows']=_0x1459bb;return _0x11c3b6;})[_0x0a9e('0x22')](respondWithFilteredResult(_0x14433c,_0x140511))[_0x0a9e('0x40')](handleError(_0x14433c,null));};exports[_0x0a9e('0x41')]=function(_0x43dd5b,_0x13cb1f){var _0xeaa5e5={'raw':![],'where':{'id':_0x43dd5b[_0x0a9e('0x42')]['id']}},_0x2881b3={};_0x2881b3[_0x0a9e('0x2c')]=_[_0x0a9e('0x2f')](db[_0x0a9e('0x28')][_0x0a9e('0x29')]);_0x2881b3[_0x0a9e('0x2e')]=_[_0x0a9e('0x2f')](_0x43dd5b[_0x0a9e('0x2e')]);_0x2881b3['filters']=_['intersection'](_0x2881b3[_0x0a9e('0x2c')],_0x2881b3[_0x0a9e('0x2e')]);_0xeaa5e5[_0x0a9e('0x33')]=_[_0x0a9e('0x31')](_0x2881b3[_0x0a9e('0x2c')],qs[_0x0a9e('0x32')](_0x43dd5b[_0x0a9e('0x2e')][_0x0a9e('0x32')]));_0xeaa5e5[_0x0a9e('0x33')]=_0xeaa5e5[_0x0a9e('0x33')][_0x0a9e('0x34')]?_0xeaa5e5[_0x0a9e('0x33')]:_0x2881b3['model'];if(_0x43dd5b[_0x0a9e('0x2e')][_0x0a9e('0x3d')]){_0xeaa5e5[_0x0a9e('0x3e')]=[{'all':!![]}];}_0xeaa5e5=_[_0x0a9e('0x3a')]({},_0xeaa5e5,_0x43dd5b[_0x0a9e('0x3c')]);return db[_0x0a9e('0x28')][_0x0a9e('0x43')](_0xeaa5e5)[_0x0a9e('0x22')](handleEntityNotFound(_0x13cb1f,null))['then'](respondWithResult(_0x13cb1f,null))[_0x0a9e('0x40')](handleError(_0x13cb1f,null));};exports['create']=function(_0x473dc8,_0x476688){return db[_0x0a9e('0x28')]['create'](_0x473dc8[_0x0a9e('0x44')],{})[_0x0a9e('0x22')](respondWithResult(_0x476688,0xc9))[_0x0a9e('0x40')](handleError(_0x476688,null));};exports[_0x0a9e('0x21')]=function(_0x45c845,_0x37be73){if(_0x45c845[_0x0a9e('0x44')]['id']){delete _0x45c845['body']['id'];}return db[_0x0a9e('0x28')][_0x0a9e('0x43')]({'where':{'id':_0x45c845[_0x0a9e('0x42')]['id']}})[_0x0a9e('0x22')](handleEntityNotFound(_0x37be73,null))[_0x0a9e('0x22')](saveUpdates(_0x45c845[_0x0a9e('0x44')],null))[_0x0a9e('0x22')](respondWithResult(_0x37be73,null))[_0x0a9e('0x40')](handleError(_0x37be73,null));};exports[_0x0a9e('0x23')]=function(_0x58a5c2,_0xe401a){return db[_0x0a9e('0x28')]['find']({'where':{'id':_0x58a5c2['params']['id']}})['then'](handleEntityNotFound(_0xe401a,null))[_0x0a9e('0x22')](removeEntity(_0xe401a,null))[_0x0a9e('0x40')](handleError(_0xe401a,null));};exports[_0x0a9e('0x45')]=function(_0x11545a,_0x61bb17){return db[_0x0a9e('0x28')][_0x0a9e('0x45')]()[_0x0a9e('0x22')](respondWithResult(_0x61bb17,null))['catch'](handleError(_0x61bb17,null));}; \ No newline at end of file +var _0xa9e0=['type','options','includeAll','include','findAll','catch','show','params','find','body','describe','eml-format','rimraf','zip-dir','moment','mustache','util','path','sox','to-csv','fs-extra','lodash','squel','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/license/util','../../mysqldb','sendStatus','end','status','json','undefined','limit','offset','count','set','Content-Range','apply','save','update','then','destroy','stack','name','send','index','VoiceAgentReport','rawAttributes','fieldName','key','model','map','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','sort','where','filter','merge'];(function(_0x172747,_0x1732bd){var _0x509692=function(_0x448c56){while(--_0x448c56){_0x172747['push'](_0x172747['shift']());}};_0x509692(++_0x1732bd);}(_0xa9e0,0x123));var _0x0a9e=function(_0x4e1d03,_0x786f3a){_0x4e1d03=_0x4e1d03-0x0;var _0x362d4b=_0xa9e0[_0x4e1d03];return _0x362d4b;};'use strict';var emlformat=require(_0x0a9e('0x0'));var rimraf=require(_0x0a9e('0x1'));var zipdir=require(_0x0a9e('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x0a9e('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x0a9e('0x4'));var util=require(_0x0a9e('0x5'));var path=require(_0x0a9e('0x6'));var sox=require(_0x0a9e('0x7'));var csv=require(_0x0a9e('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x0a9e('0x9'));var _=require(_0x0a9e('0xa'));var squel=require(_0x0a9e('0xb'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x0a9e('0xc'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x0a9e('0xd'));var Redis=require(_0x0a9e('0xe'));var authService=require(_0x0a9e('0xf'));var qs=require(_0x0a9e('0x10'));var as=require(_0x0a9e('0x11'));var hardwareService=require(_0x0a9e('0x12'));var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x0a9e('0x13'));var db=require(_0x0a9e('0x14'))['db'];function respondWithStatusCode(_0xd5b662,_0x26d672){_0x26d672=_0x26d672||0xcc;return function(_0x32d742){if(_0x32d742){return _0xd5b662[_0x0a9e('0x15')](_0x26d672);}return _0xd5b662['status'](_0x26d672)[_0x0a9e('0x16')]();};}function respondWithResult(_0x239b12,_0x2b4227){_0x2b4227=_0x2b4227||0xc8;return function(_0x281129){if(_0x281129){return _0x239b12[_0x0a9e('0x17')](_0x2b4227)[_0x0a9e('0x18')](_0x281129);}};}function respondWithFilteredResult(_0x52a03d,_0x22dccb){return function(_0x5d0880){if(_0x5d0880){var _0x1985b6=typeof _0x22dccb['offset']===_0x0a9e('0x19')&&typeof _0x22dccb[_0x0a9e('0x1a')]==='undefined';var _0x225616=_0x5d0880['count'];var _0x459eb1=_0x1985b6?0x0:_0x22dccb[_0x0a9e('0x1b')];var _0x106033=_0x1985b6?_0x5d0880[_0x0a9e('0x1c')]:_0x22dccb[_0x0a9e('0x1b')]+_0x22dccb[_0x0a9e('0x1a')];var _0x530eb7;if(_0x106033>=_0x225616){_0x106033=_0x225616;_0x530eb7=0xc8;}else{_0x530eb7=0xce;}_0x52a03d[_0x0a9e('0x17')](_0x530eb7);return _0x52a03d[_0x0a9e('0x1d')](_0x0a9e('0x1e'),_0x459eb1+'-'+_0x106033+'/'+_0x225616)[_0x0a9e('0x18')](_0x5d0880);}return null;};}function patchUpdates(_0x105080){return function(_0x4bb1e3){try{jsonpatch[_0x0a9e('0x1f')](_0x4bb1e3,_0x105080,!![]);}catch(_0x155cce){return BPromise['reject'](_0x155cce);}return _0x4bb1e3[_0x0a9e('0x20')]();};}function saveUpdates(_0x5a09ef,_0x588269){return function(_0x3a02e1){if(_0x3a02e1){return _0x3a02e1[_0x0a9e('0x21')](_0x5a09ef)[_0x0a9e('0x22')](function(_0x30bae6){return _0x30bae6;});}return null;};}function removeEntity(_0x4abc77,_0xfb6e48){return function(_0x2fb0e4){if(_0x2fb0e4){return _0x2fb0e4[_0x0a9e('0x23')]()[_0x0a9e('0x22')](function(){_0x4abc77[_0x0a9e('0x17')](0xcc)[_0x0a9e('0x16')]();});}};}function handleEntityNotFound(_0x16b1ca,_0x5ea472){return function(_0x59181e){if(!_0x59181e){_0x16b1ca[_0x0a9e('0x15')](0x194);}return _0x59181e;};}function handleError(_0x3a8e58,_0x40c424){_0x40c424=_0x40c424||0x1f4;return function(_0x33161b){logger['error'](_0x33161b[_0x0a9e('0x24')]);if(_0x33161b['name']){delete _0x33161b[_0x0a9e('0x25')];}_0x3a8e58['status'](_0x40c424)[_0x0a9e('0x26')](_0x33161b);};}exports[_0x0a9e('0x27')]=function(_0x25fba9,_0x14433c){var _0x140511={},_0x1538a4={},_0x11c3b6={'count':0x0,'rows':[]};var _0x14de77=_['map'](db[_0x0a9e('0x28')][_0x0a9e('0x29')],function(_0x2b1f27){return{'name':_0x2b1f27[_0x0a9e('0x2a')],'type':_0x2b1f27['type'][_0x0a9e('0x2b')]};});_0x1538a4[_0x0a9e('0x2c')]=_[_0x0a9e('0x2d')](_0x14de77,_0x0a9e('0x25'));_0x1538a4[_0x0a9e('0x2e')]=_[_0x0a9e('0x2f')](_0x25fba9[_0x0a9e('0x2e')]);_0x1538a4[_0x0a9e('0x30')]=_[_0x0a9e('0x31')](_0x1538a4['model'],_0x1538a4[_0x0a9e('0x2e')]);_0x140511['attributes']=_[_0x0a9e('0x31')](_0x1538a4[_0x0a9e('0x2c')],qs[_0x0a9e('0x32')](_0x25fba9[_0x0a9e('0x2e')][_0x0a9e('0x32')]));_0x140511['attributes']=_0x140511[_0x0a9e('0x33')][_0x0a9e('0x34')]?_0x140511[_0x0a9e('0x33')]:_0x1538a4[_0x0a9e('0x2c')];if(!_0x25fba9[_0x0a9e('0x2e')][_0x0a9e('0x35')](_0x0a9e('0x36'))){_0x140511[_0x0a9e('0x1a')]=qs['limit'](_0x25fba9[_0x0a9e('0x2e')]['limit']);_0x140511[_0x0a9e('0x1b')]=qs[_0x0a9e('0x1b')](_0x25fba9[_0x0a9e('0x2e')][_0x0a9e('0x1b')]);}_0x140511['order']=qs[_0x0a9e('0x37')](_0x25fba9[_0x0a9e('0x2e')][_0x0a9e('0x37')]);_0x140511[_0x0a9e('0x38')]=qs['filters'](_['pick'](_0x25fba9[_0x0a9e('0x2e')],_0x1538a4['filters']),_0x14de77);if(_0x25fba9[_0x0a9e('0x2e')][_0x0a9e('0x39')]){_0x140511[_0x0a9e('0x38')]=_[_0x0a9e('0x3a')](_0x140511['where'],{'$or':_[_0x0a9e('0x2d')](_0x14de77,function(_0x3bfce8){if(_0x3bfce8[_0x0a9e('0x3b')]!=='VIRTUAL'){var _0x1dbf74={};_0x1dbf74[_0x3bfce8[_0x0a9e('0x25')]]={'$like':'%'+_0x25fba9[_0x0a9e('0x2e')]['filter']+'%'};return _0x1dbf74;}})});}_0x140511=_['merge']({},_0x140511,_0x25fba9[_0x0a9e('0x3c')]);var _0x40d766={'where':_0x140511['where']};return db[_0x0a9e('0x28')][_0x0a9e('0x1c')](_0x40d766)[_0x0a9e('0x22')](function(_0x148f55){_0x11c3b6['count']=_0x148f55;if(_0x25fba9['query'][_0x0a9e('0x3d')]){_0x140511[_0x0a9e('0x3e')]=[{'all':!![]}];}return db['VoiceAgentReport'][_0x0a9e('0x3f')](_0x140511);})[_0x0a9e('0x22')](function(_0x1459bb){_0x11c3b6['rows']=_0x1459bb;return _0x11c3b6;})[_0x0a9e('0x22')](respondWithFilteredResult(_0x14433c,_0x140511))[_0x0a9e('0x40')](handleError(_0x14433c,null));};exports[_0x0a9e('0x41')]=function(_0x43dd5b,_0x13cb1f){var _0xeaa5e5={'raw':![],'where':{'id':_0x43dd5b[_0x0a9e('0x42')]['id']}},_0x2881b3={};_0x2881b3[_0x0a9e('0x2c')]=_[_0x0a9e('0x2f')](db[_0x0a9e('0x28')][_0x0a9e('0x29')]);_0x2881b3[_0x0a9e('0x2e')]=_[_0x0a9e('0x2f')](_0x43dd5b[_0x0a9e('0x2e')]);_0x2881b3['filters']=_['intersection'](_0x2881b3[_0x0a9e('0x2c')],_0x2881b3[_0x0a9e('0x2e')]);_0xeaa5e5[_0x0a9e('0x33')]=_[_0x0a9e('0x31')](_0x2881b3[_0x0a9e('0x2c')],qs[_0x0a9e('0x32')](_0x43dd5b[_0x0a9e('0x2e')][_0x0a9e('0x32')]));_0xeaa5e5[_0x0a9e('0x33')]=_0xeaa5e5[_0x0a9e('0x33')][_0x0a9e('0x34')]?_0xeaa5e5[_0x0a9e('0x33')]:_0x2881b3['model'];if(_0x43dd5b[_0x0a9e('0x2e')][_0x0a9e('0x3d')]){_0xeaa5e5[_0x0a9e('0x3e')]=[{'all':!![]}];}_0xeaa5e5=_[_0x0a9e('0x3a')]({},_0xeaa5e5,_0x43dd5b[_0x0a9e('0x3c')]);return db[_0x0a9e('0x28')][_0x0a9e('0x43')](_0xeaa5e5)[_0x0a9e('0x22')](handleEntityNotFound(_0x13cb1f,null))['then'](respondWithResult(_0x13cb1f,null))[_0x0a9e('0x40')](handleError(_0x13cb1f,null));};exports['create']=function(_0x473dc8,_0x476688){return db[_0x0a9e('0x28')]['create'](_0x473dc8[_0x0a9e('0x44')],{})[_0x0a9e('0x22')](respondWithResult(_0x476688,0xc9))[_0x0a9e('0x40')](handleError(_0x476688,null));};exports[_0x0a9e('0x21')]=function(_0x45c845,_0x37be73){if(_0x45c845[_0x0a9e('0x44')]['id']){delete _0x45c845['body']['id'];}return db[_0x0a9e('0x28')][_0x0a9e('0x43')]({'where':{'id':_0x45c845[_0x0a9e('0x42')]['id']}})[_0x0a9e('0x22')](handleEntityNotFound(_0x37be73,null))[_0x0a9e('0x22')](saveUpdates(_0x45c845[_0x0a9e('0x44')],null))[_0x0a9e('0x22')](respondWithResult(_0x37be73,null))[_0x0a9e('0x40')](handleError(_0x37be73,null));};exports[_0x0a9e('0x23')]=function(_0x58a5c2,_0xe401a){return db[_0x0a9e('0x28')]['find']({'where':{'id':_0x58a5c2['params']['id']}})['then'](handleEntityNotFound(_0xe401a,null))[_0x0a9e('0x22')](removeEntity(_0xe401a,null))[_0x0a9e('0x40')](handleError(_0xe401a,null));};exports[_0x0a9e('0x45')]=function(_0x11545a,_0x61bb17){return db[_0x0a9e('0x28')][_0x0a9e('0x45')]()[_0x0a9e('0x22')](respondWithResult(_0x61bb17,null))['catch'](handleError(_0x61bb17,null));}; \ No newline at end of file diff --git a/server/api/voiceAgentReport/voiceAgentReport.model.js b/server/api/voiceAgentReport/voiceAgentReport.model.js index 6ae1fa7..e40fd35 100644 --- a/server/api/voiceAgentReport/voiceAgentReport.model.js +++ b/server/api/voiceAgentReport/voiceAgentReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x038b=['report_agent','util','../../config/logger','api','bluebird','path','rimraf','./voiceAgentReport.attributes','exports','define','VoiceAgentReport'];(function(_0x5ed54b,_0x3a2827){var _0x4b58c7=function(_0x19d3b6){while(--_0x19d3b6){_0x5ed54b['push'](_0x5ed54b['shift']());}};_0x4b58c7(++_0x3a2827);}(_0x038b,0x114));var _0xb038=function(_0x425db2,_0x594ff1){_0x425db2=_0x425db2-0x0;var _0x34fda1=_0x038b[_0x425db2];return _0x34fda1;};'use strict';var _=require('lodash');var util=require(_0xb038('0x0'));var logger=require(_0xb038('0x1'))(_0xb038('0x2'));var moment=require('moment');var BPromise=require(_0xb038('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xb038('0x4'));var rimraf=require(_0xb038('0x5'));var config=require('../../config/environment');var attributes=require(_0xb038('0x6'));module[_0xb038('0x7')]=function(_0x4fe092,_0x54e1e7){return _0x4fe092[_0xb038('0x8')](_0xb038('0x9'),attributes,{'tableName':_0xb038('0xa'),'paranoid':![],'indexes':[{'fields':['uniqueid','destuniqueid']}],'timestamps':!![]});}; \ No newline at end of file +var _0x79d3=['VoiceAgentReport','uniqueid','destuniqueid','lodash','../../config/logger','moment','bluebird','path','rimraf','../../config/environment','./voiceAgentReport.attributes','exports'];(function(_0x1992f1,_0x5c61f0){var _0x413dfe=function(_0x2136e5){while(--_0x2136e5){_0x1992f1['push'](_0x1992f1['shift']());}};_0x413dfe(++_0x5c61f0);}(_0x79d3,0x15f));var _0x379d=function(_0x511723,_0x4db8e2){_0x511723=_0x511723-0x0;var _0x25add0=_0x79d3[_0x511723];return _0x25add0;};'use strict';var _=require(_0x379d('0x0'));var util=require('util');var logger=require(_0x379d('0x1'))('api');var moment=require(_0x379d('0x2'));var BPromise=require(_0x379d('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x379d('0x4'));var rimraf=require(_0x379d('0x5'));var config=require(_0x379d('0x6'));var attributes=require(_0x379d('0x7'));module[_0x379d('0x8')]=function(_0x2078a6,_0x2a1b43){return _0x2078a6['define'](_0x379d('0x9'),attributes,{'tableName':'report_agent','paranoid':![],'indexes':[{'fields':[_0x379d('0xa'),_0x379d('0xb')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/voiceAgentReport/voiceAgentReport.rpc.js b/server/api/voiceAgentReport/voiceAgentReport.rpc.js index 21f1860..d620a4a 100644 --- a/server/api/voiceAgentReport/voiceAgentReport.rpc.js +++ b/server/api/voiceAgentReport/voiceAgentReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4dbf=['raw','UpdateVoiceAgentReport','body','where','attributes','limit','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','http','request','then','info','VoiceAgentReport,\x20%s,\x20%s','debug','VoiceAgentReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','request\x20sent','catch','CreateVoiceAgentReport','VoiceAgentReport','create','options'];(function(_0x10b110,_0x2cb4b4){var _0x18e6b8=function(_0x500b5a){while(--_0x500b5a){_0x10b110['push'](_0x10b110['shift']());}};_0x18e6b8(++_0x2cb4b4);}(_0x4dbf,0x1a6));var _0xf4db=function(_0x3d9b04,_0x1e851a){_0x3d9b04=_0x3d9b04-0x0;var _0x557936=_0x4dbf[_0x3d9b04];return _0x557936;};'use strict';var _=require(_0xf4db('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xf4db('0x1'));var rs=require(_0xf4db('0x2'));var fs=require('fs');var Redis=require(_0xf4db('0x3'));var db=require(_0xf4db('0x4'))['db'];var utils=require(_0xf4db('0x5'));var logger=require(_0xf4db('0x6'))('rpc');var config=require(_0xf4db('0x7'));var jayson=require('jayson/promise');var client=jayson[_0xf4db('0x8')][_0xf4db('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x59c805,_0x5457d1,_0x19190e){return new BPromise(function(_0x162ca2,_0x1097bc){return client[_0xf4db('0xa')](_0x59c805,_0x19190e)[_0xf4db('0xb')](function(_0x1ac205){logger[_0xf4db('0xc')](_0xf4db('0xd'),_0x5457d1,'request\x20sent');logger[_0xf4db('0xe')](_0xf4db('0xf'),_0x5457d1,'request\x20sent',JSON[_0xf4db('0x10')](_0x1ac205));if(_0x1ac205['error']){if(_0x1ac205[_0xf4db('0x11')][_0xf4db('0x12')]===0x1f4){logger['error'](_0xf4db('0xd'),_0x5457d1,_0x1ac205[_0xf4db('0x11')][_0xf4db('0x13')]);return _0x1097bc(_0x1ac205[_0xf4db('0x11')]['message']);}logger['error'](_0xf4db('0xd'),_0x5457d1,_0x1ac205[_0xf4db('0x11')][_0xf4db('0x13')]);return _0x162ca2(_0x1ac205[_0xf4db('0x11')][_0xf4db('0x13')]);}else{logger[_0xf4db('0xc')](_0xf4db('0xd'),_0x5457d1,_0xf4db('0x14'));_0x162ca2(_0x1ac205['result'][_0xf4db('0x13')]);}})[_0xf4db('0x15')](function(_0x4445af){logger[_0xf4db('0x11')]('VoiceAgentReport,\x20%s,\x20%s',_0x5457d1,_0x4445af);_0x1097bc(_0x4445af);});});}exports[_0xf4db('0x16')]=function(_0x40c3b3){var _0x11a5d5=this;return new Promise(function(_0xdddffb,_0x38f04c){return db[_0xf4db('0x17')][_0xf4db('0x18')](_0x40c3b3['body'],{'raw':_0x40c3b3['options']?_0x40c3b3[_0xf4db('0x19')][_0xf4db('0x1a')]===undefined?!![]:![]:!![]})[_0xf4db('0xb')](function(_0x45eced){logger[_0xf4db('0xc')](_0xf4db('0x16'),_0x40c3b3);logger['debug'](_0xf4db('0x16'),_0x40c3b3,JSON[_0xf4db('0x10')](_0x45eced));_0xdddffb(_0x45eced);})[_0xf4db('0x15')](function(_0x1111c7){logger[_0xf4db('0x11')]('CreateVoiceAgentReport',_0x1111c7[_0xf4db('0x13')],_0x40c3b3);_0x38f04c(_0x11a5d5[_0xf4db('0x11')](0x1f4,_0x1111c7[_0xf4db('0x13')]));});});};exports[_0xf4db('0x1b')]=function(_0xe7f488){var _0x1ef937=this;return new Promise(function(_0x4dfa4c,_0x45ab55){return db['VoiceAgentReport']['update'](_0xe7f488[_0xf4db('0x1c')],{'raw':_0xe7f488[_0xf4db('0x19')]?_0xe7f488['options'][_0xf4db('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0xe7f488[_0xf4db('0x19')]?_0xe7f488['options'][_0xf4db('0x1d')]||null:null,'attributes':_0xe7f488['options']?_0xe7f488['options'][_0xf4db('0x1e')]||null:null,'limit':_0xe7f488['options']?_0xe7f488[_0xf4db('0x19')][_0xf4db('0x1f')]||null:null})[_0xf4db('0xb')](function(_0x1af5f3){logger[_0xf4db('0xc')](_0xf4db('0x1b'),_0xe7f488);logger[_0xf4db('0xe')](_0xf4db('0x1b'),_0xe7f488,JSON[_0xf4db('0x10')](_0x1af5f3));_0x4dfa4c(_0x1af5f3);})[_0xf4db('0x15')](function(_0x590ada){logger['error'](_0xf4db('0x1b'),_0x590ada['message'],_0xe7f488);_0x45ab55(_0x1ef937[_0xf4db('0x11')](0x1f4,_0x590ada[_0xf4db('0x13')]));});});}; \ No newline at end of file +var _0x59c6=['body','options','raw','then','UpdateVoiceAgentReport','where','attributes','limit','lodash','util','moment','bluebird','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','VoiceAgentReport,\x20%s,\x20%s','request\x20sent','debug','VoiceAgentReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','CreateVoiceAgentReport','VoiceAgentReport'];(function(_0x295583,_0x4756aa){var _0x4c2ae6=function(_0xa20d19){while(--_0xa20d19){_0x295583['push'](_0x295583['shift']());}};_0x4c2ae6(++_0x4756aa);}(_0x59c6,0x6b));var _0x659c=function(_0x51e82f,_0x229563){_0x51e82f=_0x51e82f-0x0;var _0x5a95f1=_0x59c6[_0x51e82f];return _0x5a95f1;};'use strict';var _=require(_0x659c('0x0'));var util=require(_0x659c('0x1'));var moment=require(_0x659c('0x2'));var BPromise=require(_0x659c('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x659c('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x659c('0x5'));var logger=require(_0x659c('0x6'))(_0x659c('0x7'));var config=require(_0x659c('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x659c('0x9')][_0x659c('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xd4ca0a,_0x4be506,_0x556b8d){return new BPromise(function(_0x30500a,_0x16e0b1){return client[_0x659c('0xb')](_0xd4ca0a,_0x556b8d)['then'](function(_0x2ad46f){logger['info'](_0x659c('0xc'),_0x4be506,_0x659c('0xd'));logger[_0x659c('0xe')](_0x659c('0xf'),_0x4be506,_0x659c('0xd'),JSON[_0x659c('0x10')](_0x2ad46f));if(_0x2ad46f[_0x659c('0x11')]){if(_0x2ad46f['error'][_0x659c('0x12')]===0x1f4){logger['error'](_0x659c('0xc'),_0x4be506,_0x2ad46f[_0x659c('0x11')][_0x659c('0x13')]);return _0x16e0b1(_0x2ad46f[_0x659c('0x11')][_0x659c('0x13')]);}logger[_0x659c('0x11')]('VoiceAgentReport,\x20%s,\x20%s',_0x4be506,_0x2ad46f['error']['message']);return _0x30500a(_0x2ad46f['error'][_0x659c('0x13')]);}else{logger[_0x659c('0x14')](_0x659c('0xc'),_0x4be506,_0x659c('0xd'));_0x30500a(_0x2ad46f[_0x659c('0x15')]['message']);}})[_0x659c('0x16')](function(_0x25c9d5){logger[_0x659c('0x11')](_0x659c('0xc'),_0x4be506,_0x25c9d5);_0x16e0b1(_0x25c9d5);});});}exports[_0x659c('0x17')]=function(_0x3b65aa){var _0x2392cc=this;return new Promise(function(_0x5d38e3,_0x40ab30){return db[_0x659c('0x18')]['create'](_0x3b65aa[_0x659c('0x19')],{'raw':_0x3b65aa['options']?_0x3b65aa[_0x659c('0x1a')][_0x659c('0x1b')]===undefined?!![]:![]:!![]})[_0x659c('0x1c')](function(_0x5990e3){logger[_0x659c('0x14')](_0x659c('0x17'),_0x3b65aa);logger['debug']('CreateVoiceAgentReport',_0x3b65aa,JSON[_0x659c('0x10')](_0x5990e3));_0x5d38e3(_0x5990e3);})[_0x659c('0x16')](function(_0x4364e8){logger[_0x659c('0x11')]('CreateVoiceAgentReport',_0x4364e8[_0x659c('0x13')],_0x3b65aa);_0x40ab30(_0x2392cc[_0x659c('0x11')](0x1f4,_0x4364e8[_0x659c('0x13')]));});});};exports[_0x659c('0x1d')]=function(_0x3a9ce5){var _0x13cb6a=this;return new Promise(function(_0x48f1bb,_0x4f7a19){return db['VoiceAgentReport']['update'](_0x3a9ce5[_0x659c('0x19')],{'raw':_0x3a9ce5[_0x659c('0x1a')]?_0x3a9ce5[_0x659c('0x1a')][_0x659c('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3a9ce5[_0x659c('0x1a')]?_0x3a9ce5[_0x659c('0x1a')][_0x659c('0x1e')]||null:null,'attributes':_0x3a9ce5[_0x659c('0x1a')]?_0x3a9ce5['options'][_0x659c('0x1f')]||null:null,'limit':_0x3a9ce5[_0x659c('0x1a')]?_0x3a9ce5['options'][_0x659c('0x20')]||null:null})[_0x659c('0x1c')](function(_0x547d8b){logger[_0x659c('0x14')](_0x659c('0x1d'),_0x3a9ce5);logger[_0x659c('0xe')]('UpdateVoiceAgentReport',_0x3a9ce5,JSON[_0x659c('0x10')](_0x547d8b));_0x48f1bb(_0x547d8b);})[_0x659c('0x16')](function(_0x2a62f7){logger['error'](_0x659c('0x1d'),_0x2a62f7[_0x659c('0x13')],_0x3a9ce5);_0x4f7a19(_0x13cb6a['error'](0x1f4,_0x2a62f7[_0x659c('0x13')]));});});}; \ No newline at end of file diff --git a/server/api/voiceCallReport/index.js b/server/api/voiceCallReport/index.js index 8b25037..3091aaa 100644 --- a/server/api/voiceCallReport/index.js +++ b/server/api/voiceCallReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7217=['../../config/environment','./voiceCallReport.controller','get','isAuthenticated','index','/describe','describe','/:id','show','post','put','update','delete','destroy','multer','path','connect-timeout','express','Router','fs-extra'];(function(_0x1793de,_0x4d7233){var _0x4f0309=function(_0x229ee7){while(--_0x229ee7){_0x1793de['push'](_0x1793de['shift']());}};_0x4f0309(++_0x4d7233);}(_0x7217,0x19e));var _0x7721=function(_0x220dbb,_0x99328d){_0x220dbb=_0x220dbb-0x0;var _0x2b77de=_0x7217[_0x220dbb];return _0x2b77de;};'use strict';var multer=require(_0x7721('0x0'));var util=require('util');var path=require(_0x7721('0x1'));var timeout=require(_0x7721('0x2'));var express=require(_0x7721('0x3'));var router=express[_0x7721('0x4')]();var fs_extra=require(_0x7721('0x5'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x7721('0x6'));var controller=require(_0x7721('0x7'));router[_0x7721('0x8')]('/',auth[_0x7721('0x9')](),controller[_0x7721('0xa')]);router[_0x7721('0x8')](_0x7721('0xb'),auth[_0x7721('0x9')](),controller[_0x7721('0xc')]);router[_0x7721('0x8')](_0x7721('0xd'),auth[_0x7721('0x9')](),controller[_0x7721('0xe')]);router[_0x7721('0xf')]('/',auth[_0x7721('0x9')](),controller['create']);router[_0x7721('0x10')](_0x7721('0xd'),auth[_0x7721('0x9')](),controller[_0x7721('0x11')]);router[_0x7721('0x12')](_0x7721('0xd'),auth[_0x7721('0x9')](),controller[_0x7721('0x13')]);module['exports']=router; \ No newline at end of file +var _0xdc97=['get','isAuthenticated','describe','/:id','show','create','put','update','delete','multer','util','path','express','fs-extra','../../components/auth/service','../../config/environment','./voiceCallReport.controller'];(function(_0x4a2183,_0x53e74d){var _0xc7c01d=function(_0x526d67){while(--_0x526d67){_0x4a2183['push'](_0x4a2183['shift']());}};_0xc7c01d(++_0x53e74d);}(_0xdc97,0x13b));var _0x7dc9=function(_0x3bd297,_0x3d303c){_0x3bd297=_0x3bd297-0x0;var _0x54c1c7=_0xdc97[_0x3bd297];return _0x54c1c7;};'use strict';var multer=require(_0x7dc9('0x0'));var util=require(_0x7dc9('0x1'));var path=require(_0x7dc9('0x2'));var timeout=require('connect-timeout');var express=require(_0x7dc9('0x3'));var router=express['Router']();var fs_extra=require(_0x7dc9('0x4'));var auth=require(_0x7dc9('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x7dc9('0x6'));var controller=require(_0x7dc9('0x7'));router[_0x7dc9('0x8')]('/',auth[_0x7dc9('0x9')](),controller['index']);router[_0x7dc9('0x8')]('/describe',auth['isAuthenticated'](),controller[_0x7dc9('0xa')]);router[_0x7dc9('0x8')](_0x7dc9('0xb'),auth[_0x7dc9('0x9')](),controller[_0x7dc9('0xc')]);router['post']('/',auth[_0x7dc9('0x9')](),controller[_0x7dc9('0xd')]);router[_0x7dc9('0xe')](_0x7dc9('0xb'),auth[_0x7dc9('0x9')](),controller[_0x7dc9('0xf')]);router[_0x7dc9('0x10')]('/:id',auth['isAuthenticated'](),controller['destroy']);module['exports']=router; \ No newline at end of file diff --git a/server/api/voiceCallReport/voiceCallReport.attributes.js b/server/api/voiceCallReport/voiceCallReport.attributes.js index eb4d33a..32076fe 100644 --- a/server/api/voiceCallReport/voiceCallReport.attributes.js +++ b/server/api/voiceCallReport/voiceCallReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8d41=['INTEGER','sequelize','exports','STRING','ENUM','inbound','internal','outbound','inbound-fax','outbound-fax','dialer','TEXT','DATE'];(function(_0x49b59f,_0x1f3a28){var _0x46f0de=function(_0x3841f1){while(--_0x3841f1){_0x49b59f['push'](_0x49b59f['shift']());}};_0x46f0de(++_0x1f3a28);}(_0x8d41,0x12c));var _0x18d4=function(_0x4d830b,_0x27f78d){_0x4d830b=_0x4d830b-0x0;var _0x238c89=_0x8d41[_0x4d830b];return _0x238c89;};'use strict';var Sequelize=require(_0x18d4('0x0'));module[_0x18d4('0x1')]={'uniqueid':{'type':Sequelize[_0x18d4('0x2')]},'type':{'type':Sequelize[_0x18d4('0x3')](_0x18d4('0x4'),_0x18d4('0x5'),_0x18d4('0x6'),_0x18d4('0x7'),_0x18d4('0x8'),_0x18d4('0x9'))},'tag':{'type':Sequelize['STRING']},'accountcode':{'type':Sequelize['STRING']},'source':{'type':Sequelize[_0x18d4('0x2')]},'destination':{'type':Sequelize[_0x18d4('0x2')]},'destinationcontext':{'type':Sequelize[_0x18d4('0x2')]},'callerid':{'type':Sequelize[_0x18d4('0x2')]},'channel':{'type':Sequelize[_0x18d4('0x2')]},'destinationchannel':{'type':Sequelize[_0x18d4('0x2')]},'lastapplication':{'type':Sequelize[_0x18d4('0x2')]},'lastdata':{'type':Sequelize[_0x18d4('0xa')]},'starttime':{'type':Sequelize['DATE']},'systemanswertime':{'type':Sequelize[_0x18d4('0xb')]},'answertime':{'type':Sequelize['DATE']},'endtime':{'type':Sequelize[_0x18d4('0xb')]},'duration':{'type':Sequelize['INTEGER']},'billableseconds':{'type':Sequelize[_0x18d4('0xc')]},'mohtime':{'type':Sequelize[_0x18d4('0xc')],'defaultValue':0x0},'disposition':{'type':Sequelize['STRING']},'amaflags':{'type':Sequelize['STRING']},'userfield':{'type':Sequelize['STRING']},'userDisposition':{'type':Sequelize[_0x18d4('0x2')]},'userSecondDisposition':{'type':Sequelize[_0x18d4('0x2')]},'userThirdDisposition':{'type':Sequelize[_0x18d4('0x2')]},'note':{'type':Sequelize[_0x18d4('0x2')]},'prefix':{'type':Sequelize[_0x18d4('0x2')]},'routeid':{'type':Sequelize[_0x18d4('0xc')]},'sipcallid':{'type':Sequelize['STRING']}}; \ No newline at end of file +var _0x010e=['inbound-fax','outbound-fax','dialer','STRING','TEXT','DATE','INTEGER','sequelize','exports','ENUM','inbound','outbound'];(function(_0x3f2cfc,_0x2827b0){var _0x1d1e61=function(_0x293ec9){while(--_0x293ec9){_0x3f2cfc['push'](_0x3f2cfc['shift']());}};_0x1d1e61(++_0x2827b0);}(_0x010e,0x103));var _0xe010=function(_0x96681e,_0x186c04){_0x96681e=_0x96681e-0x0;var _0x4c153f=_0x010e[_0x96681e];return _0x4c153f;};'use strict';var Sequelize=require(_0xe010('0x0'));module[_0xe010('0x1')]={'uniqueid':{'type':Sequelize['STRING']},'type':{'type':Sequelize[_0xe010('0x2')](_0xe010('0x3'),'internal',_0xe010('0x4'),_0xe010('0x5'),_0xe010('0x6'),_0xe010('0x7'))},'tag':{'type':Sequelize['STRING']},'accountcode':{'type':Sequelize['STRING']},'source':{'type':Sequelize['STRING']},'destination':{'type':Sequelize[_0xe010('0x8')]},'destinationcontext':{'type':Sequelize[_0xe010('0x8')]},'callerid':{'type':Sequelize[_0xe010('0x8')]},'channel':{'type':Sequelize[_0xe010('0x8')]},'destinationchannel':{'type':Sequelize[_0xe010('0x8')]},'lastapplication':{'type':Sequelize[_0xe010('0x8')]},'lastdata':{'type':Sequelize[_0xe010('0x9')]},'starttime':{'type':Sequelize[_0xe010('0xa')]},'systemanswertime':{'type':Sequelize[_0xe010('0xa')]},'answertime':{'type':Sequelize[_0xe010('0xa')]},'endtime':{'type':Sequelize[_0xe010('0xa')]},'duration':{'type':Sequelize[_0xe010('0xb')]},'billableseconds':{'type':Sequelize[_0xe010('0xb')]},'mohtime':{'type':Sequelize[_0xe010('0xb')],'defaultValue':0x0},'disposition':{'type':Sequelize[_0xe010('0x8')]},'amaflags':{'type':Sequelize['STRING']},'userfield':{'type':Sequelize[_0xe010('0x8')]},'userDisposition':{'type':Sequelize[_0xe010('0x8')]},'userSecondDisposition':{'type':Sequelize['STRING']},'userThirdDisposition':{'type':Sequelize[_0xe010('0x8')]},'note':{'type':Sequelize[_0xe010('0x8')]},'prefix':{'type':Sequelize[_0xe010('0x8')]},'routeid':{'type':Sequelize['INTEGER']},'sipcallid':{'type':Sequelize[_0xe010('0x8')]}}; \ No newline at end of file diff --git a/server/api/voiceCallReport/voiceCallReport.controller.js b/server/api/voiceCallReport/voiceCallReport.controller.js index cd49402..7ae2fc4 100644 --- a/server/api/voiceCallReport/voiceCallReport.controller.js +++ b/server/api/voiceCallReport/voiceCallReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xadb5=['filter','VIRTUAL','merge','options','includeAll','include','fullname','User','findAll','rows','show','rawAttributes','length','find','catch','body','params','describe','uniqueid','rimraf','fast-json-patch','request-promise','moment','mustache','util','path','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/license/util','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','update','then','destroy','end','stack','name','send','index','map','VoiceCallReport','fieldName','type','key','model','query','keys','intersection','attributes','fields','hasOwnProperty','nolimit','sort','where','pick','filters'];(function(_0x208505,_0x241a77){var _0x1a985f=function(_0x4a5110){while(--_0x4a5110){_0x208505['push'](_0x208505['shift']());}};_0x1a985f(++_0x241a77);}(_0xadb5,0xad));var _0x5adb=function(_0x560fc9,_0xe15eb5){_0x560fc9=_0x560fc9-0x0;var _0x54af47=_0xadb5[_0x560fc9];return _0x54af47;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x5adb('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0x5adb('0x1'));var rp=require(_0x5adb('0x2'));var moment=require(_0x5adb('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x5adb('0x4'));var util=require(_0x5adb('0x5'));var path=require(_0x5adb('0x6'));var sox=require('sox');var csv=require(_0x5adb('0x7'));var ejs=require(_0x5adb('0x8'));var fs=require('fs');var fs_extra=require(_0x5adb('0x9'));var _=require(_0x5adb('0xa'));var squel=require(_0x5adb('0xb'));var crypto=require(_0x5adb('0xc'));var jsforce=require(_0x5adb('0xd'));var deskjs=require(_0x5adb('0xe'));var toCsv=require(_0x5adb('0x7'));var querystring=require(_0x5adb('0xf'));var Papa=require(_0x5adb('0x10'));var Redis=require(_0x5adb('0x11'));var authService=require(_0x5adb('0x12'));var qs=require(_0x5adb('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x5adb('0x14'))(_0x5adb('0x15'));var utils=require(_0x5adb('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0x5adb('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x2a0b70,_0x5433bf){_0x5433bf=_0x5433bf||0xcc;return function(_0x8cfcc6){if(_0x8cfcc6){return _0x2a0b70[_0x5adb('0x18')](_0x5433bf);}return _0x2a0b70[_0x5adb('0x19')](_0x5433bf)['end']();};}function respondWithResult(_0x2a545b,_0x34af2c){_0x34af2c=_0x34af2c||0xc8;return function(_0xf82f72){if(_0xf82f72){return _0x2a545b['status'](_0x34af2c)[_0x5adb('0x1a')](_0xf82f72);}};}function respondWithFilteredResult(_0x518823,_0x367d82){return function(_0x42a482){if(_0x42a482){var _0x30614e=typeof _0x367d82[_0x5adb('0x1b')]===_0x5adb('0x1c')&&typeof _0x367d82[_0x5adb('0x1d')]===_0x5adb('0x1c');var _0x42f4c6=_0x42a482[_0x5adb('0x1e')];var _0x529b65=_0x30614e?0x0:_0x367d82[_0x5adb('0x1b')];var _0x5de028=_0x30614e?_0x42a482[_0x5adb('0x1e')]:_0x367d82['offset']+_0x367d82[_0x5adb('0x1d')];var _0x50e84f;if(_0x5de028>=_0x42f4c6){_0x5de028=_0x42f4c6;_0x50e84f=0xc8;}else{_0x50e84f=0xce;}_0x518823['status'](_0x50e84f);return _0x518823[_0x5adb('0x1f')](_0x5adb('0x20'),_0x529b65+'-'+_0x5de028+'/'+_0x42f4c6)[_0x5adb('0x1a')](_0x42a482);}return null;};}function patchUpdates(_0x1fd4a7){return function(_0x99bc6c){try{jsonpatch['apply'](_0x99bc6c,_0x1fd4a7,!![]);}catch(_0x3255b3){return BPromise['reject'](_0x3255b3);}return _0x99bc6c['save']();};}function saveUpdates(_0x3754cc,_0x379b33){return function(_0x1a38d3){if(_0x1a38d3){return _0x1a38d3[_0x5adb('0x21')](_0x3754cc)[_0x5adb('0x22')](function(_0x413911){return _0x413911;});}return null;};}function removeEntity(_0xfd9bb9,_0x4ca150){return function(_0x4b1957){if(_0x4b1957){return _0x4b1957[_0x5adb('0x23')]()[_0x5adb('0x22')](function(){_0xfd9bb9[_0x5adb('0x19')](0xcc)[_0x5adb('0x24')]();});}};}function handleEntityNotFound(_0x49f203,_0x2fee18){return function(_0x2e1e63){if(!_0x2e1e63){_0x49f203['sendStatus'](0x194);}return _0x2e1e63;};}function handleError(_0x1feecf,_0x1ded9f){_0x1ded9f=_0x1ded9f||0x1f4;return function(_0x1a0acd){logger['error'](_0x1a0acd[_0x5adb('0x25')]);if(_0x1a0acd[_0x5adb('0x26')]){delete _0x1a0acd[_0x5adb('0x26')];}_0x1feecf[_0x5adb('0x19')](_0x1ded9f)[_0x5adb('0x27')](_0x1a0acd);};}exports[_0x5adb('0x28')]=function(_0x4a5d46,_0x49992e){var _0x5d457e={},_0x39bddd={},_0x1eac55={'count':0x0,'rows':[]};var _0x60a672=_[_0x5adb('0x29')](db[_0x5adb('0x2a')]['rawAttributes'],function(_0x11ec2a){return{'name':_0x11ec2a[_0x5adb('0x2b')],'type':_0x11ec2a[_0x5adb('0x2c')][_0x5adb('0x2d')]};});_0x39bddd[_0x5adb('0x2e')]=_[_0x5adb('0x29')](_0x60a672,_0x5adb('0x26'));_0x39bddd[_0x5adb('0x2f')]=_[_0x5adb('0x30')](_0x4a5d46[_0x5adb('0x2f')]);_0x39bddd['filters']=_[_0x5adb('0x31')](_0x39bddd['model'],_0x39bddd[_0x5adb('0x2f')]);_0x5d457e[_0x5adb('0x32')]=_['intersection'](_0x39bddd[_0x5adb('0x2e')],qs[_0x5adb('0x33')](_0x4a5d46[_0x5adb('0x2f')]['fields']));_0x5d457e[_0x5adb('0x32')]=_0x5d457e[_0x5adb('0x32')]['length']?_0x5d457e['attributes']:_0x39bddd[_0x5adb('0x2e')];if(!_0x4a5d46['query'][_0x5adb('0x34')](_0x5adb('0x35'))){_0x5d457e[_0x5adb('0x1d')]=qs[_0x5adb('0x1d')](_0x4a5d46[_0x5adb('0x2f')]['limit']);_0x5d457e[_0x5adb('0x1b')]=qs[_0x5adb('0x1b')](_0x4a5d46[_0x5adb('0x2f')]['offset']);}_0x5d457e['order']=qs[_0x5adb('0x36')](_0x4a5d46[_0x5adb('0x2f')]['sort']);_0x5d457e[_0x5adb('0x37')]=qs['filters'](_[_0x5adb('0x38')](_0x4a5d46['query'],_0x39bddd[_0x5adb('0x39')]),_0x60a672);if(_0x4a5d46['query'][_0x5adb('0x3a')]){_0x5d457e[_0x5adb('0x37')]=_['merge'](_0x5d457e[_0x5adb('0x37')],{'$or':_['map'](_0x60a672,function(_0xadbe37){if(_0xadbe37[_0x5adb('0x2c')]!==_0x5adb('0x3b')){var _0x50edd1={};_0x50edd1[_0xadbe37[_0x5adb('0x26')]]={'$like':'%'+_0x4a5d46[_0x5adb('0x2f')][_0x5adb('0x3a')]+'%'};return _0x50edd1;}})});}_0x5d457e=_[_0x5adb('0x3c')]({},_0x5d457e,_0x4a5d46[_0x5adb('0x3d')]);var _0x52d74f={'where':_0x5d457e['where']};return db['VoiceCallReport']['count'](_0x52d74f)[_0x5adb('0x22')](function(_0x2fbe14){_0x1eac55[_0x5adb('0x1e')]=_0x2fbe14;if(_0x4a5d46[_0x5adb('0x2f')][_0x5adb('0x3e')]){_0x5d457e[_0x5adb('0x3f')]=[{'attributes':['id',_0x5adb('0x26'),_0x5adb('0x40'),'alias'],'model':db['User'],'as':_0x5adb('0x41')}];}return db['VoiceCallReport'][_0x5adb('0x42')](_0x5d457e);})[_0x5adb('0x22')](function(_0x299746){_0x1eac55[_0x5adb('0x43')]=_0x299746;return _0x1eac55;})[_0x5adb('0x22')](respondWithFilteredResult(_0x49992e,_0x5d457e))['catch'](handleError(_0x49992e,null));};exports[_0x5adb('0x44')]=function(_0x565b03,_0x508690){var _0x4160ad={'raw':!![],'where':{'id':_0x565b03['params']['id']}},_0x1a256c={};_0x1a256c[_0x5adb('0x2e')]=_[_0x5adb('0x30')](db[_0x5adb('0x2a')][_0x5adb('0x45')]);_0x1a256c[_0x5adb('0x2f')]=_[_0x5adb('0x30')](_0x565b03[_0x5adb('0x2f')]);_0x1a256c['filters']=_['intersection'](_0x1a256c[_0x5adb('0x2e')],_0x1a256c[_0x5adb('0x2f')]);_0x4160ad[_0x5adb('0x32')]=_[_0x5adb('0x31')](_0x1a256c['model'],qs['fields'](_0x565b03[_0x5adb('0x2f')][_0x5adb('0x33')]));_0x4160ad[_0x5adb('0x32')]=_0x4160ad[_0x5adb('0x32')][_0x5adb('0x46')]?_0x4160ad['attributes']:_0x1a256c[_0x5adb('0x2e')];if(_0x565b03[_0x5adb('0x2f')]['includeAll']){_0x4160ad[_0x5adb('0x3f')]=[{'all':!![]}];}_0x4160ad=_[_0x5adb('0x3c')]({},_0x4160ad,_0x565b03[_0x5adb('0x3d')]);return db[_0x5adb('0x2a')][_0x5adb('0x47')](_0x4160ad)[_0x5adb('0x22')](handleEntityNotFound(_0x508690,null))[_0x5adb('0x22')](respondWithResult(_0x508690,null))[_0x5adb('0x48')](handleError(_0x508690,null));};exports['create']=function(_0x3a925b,_0x57dc8b){return db['VoiceCallReport']['create'](_0x3a925b[_0x5adb('0x49')],{})[_0x5adb('0x22')](respondWithResult(_0x57dc8b,0xc9))[_0x5adb('0x48')](handleError(_0x57dc8b,null));};exports['destroy']=function(_0x2ad69d,_0x5cbab5){return db[_0x5adb('0x2a')][_0x5adb('0x47')]({'where':{'id':_0x2ad69d[_0x5adb('0x4a')]['id']}})['then'](handleEntityNotFound(_0x5cbab5,null))[_0x5adb('0x22')](removeEntity(_0x5cbab5,null))['catch'](handleError(_0x5cbab5,null));};exports[_0x5adb('0x4b')]=function(_0x6dc067,_0x55c535){return db[_0x5adb('0x2a')][_0x5adb('0x4b')]()[_0x5adb('0x22')](respondWithResult(_0x55c535,null))[_0x5adb('0x48')](handleError(_0x55c535,null));};exports[_0x5adb('0x21')]=function(_0x4cb36c,_0x36b847){if(_0x4cb36c[_0x5adb('0x49')][_0x5adb('0x4c')]){delete _0x4cb36c[_0x5adb('0x49')]['uniqueid'];}return db[_0x5adb('0x2a')][_0x5adb('0x47')]({'where':{'uniqueid':_0x4cb36c[_0x5adb('0x4a')]['id'],'UserId':{'$or':[null,_0x4cb36c['user']['id']]}}})[_0x5adb('0x22')](handleEntityNotFound(_0x36b847,null))[_0x5adb('0x22')](saveUpdates(_0x4cb36c[_0x5adb('0x49')],null))[_0x5adb('0x22')](respondWithResult(_0x36b847,null))['catch'](handleError(_0x36b847,null));}; \ No newline at end of file +var _0x2ef3=['pick','filter','merge','options','VoiceCallReport','then','includeAll','include','fullname','alias','User','findAll','rows','catch','show','params','keys','find','create','destroy','describe','body','uniqueid','user','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','sox','to-csv','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','error','stack','name','send','map','rawAttributes','fieldName','type','key','model','query','filters','attributes','intersection','fields','length','hasOwnProperty','order','sort','where'];(function(_0x2b91c5,_0x3b6db5){var _0xbd5531=function(_0x54783d){while(--_0x54783d){_0x2b91c5['push'](_0x2b91c5['shift']());}};_0xbd5531(++_0x3b6db5);}(_0x2ef3,0xba));var _0x32ef=function(_0x258621,_0xdd5164){_0x258621=_0x258621-0x0;var _0x254c89=_0x2ef3[_0x258621];return _0x254c89;};'use strict';var emlformat=require(_0x32ef('0x0'));var rimraf=require(_0x32ef('0x1'));var zipdir=require(_0x32ef('0x2'));var jsonpatch=require(_0x32ef('0x3'));var rp=require(_0x32ef('0x4'));var moment=require(_0x32ef('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x32ef('0x6'));var util=require(_0x32ef('0x7'));var path=require('path');var sox=require(_0x32ef('0x8'));var csv=require(_0x32ef('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x32ef('0xa'));var squel=require(_0x32ef('0xb'));var crypto=require(_0x32ef('0xc'));var jsforce=require(_0x32ef('0xd'));var deskjs=require(_0x32ef('0xe'));var toCsv=require(_0x32ef('0x9'));var querystring=require(_0x32ef('0xf'));var Papa=require(_0x32ef('0x10'));var Redis=require(_0x32ef('0x11'));var authService=require(_0x32ef('0x12'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x32ef('0x13'));var logger=require(_0x32ef('0x14'))(_0x32ef('0x15'));var utils=require(_0x32ef('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0x32ef('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x1a5106,_0x49d590){_0x49d590=_0x49d590||0xcc;return function(_0x3e98df){if(_0x3e98df){return _0x1a5106[_0x32ef('0x18')](_0x49d590);}return _0x1a5106['status'](_0x49d590)['end']();};}function respondWithResult(_0x19ce1,_0x4d8009){_0x4d8009=_0x4d8009||0xc8;return function(_0x326fce){if(_0x326fce){return _0x19ce1[_0x32ef('0x19')](_0x4d8009)[_0x32ef('0x1a')](_0x326fce);}};}function respondWithFilteredResult(_0x54c7f5,_0x57aff1){return function(_0x55bf0b){if(_0x55bf0b){var _0x531e30=typeof _0x57aff1[_0x32ef('0x1b')]===_0x32ef('0x1c')&&typeof _0x57aff1[_0x32ef('0x1d')]==='undefined';var _0x5d559b=_0x55bf0b[_0x32ef('0x1e')];var _0x1a9476=_0x531e30?0x0:_0x57aff1[_0x32ef('0x1b')];var _0x57863c=_0x531e30?_0x55bf0b[_0x32ef('0x1e')]:_0x57aff1[_0x32ef('0x1b')]+_0x57aff1['limit'];var _0x304505;if(_0x57863c>=_0x5d559b){_0x57863c=_0x5d559b;_0x304505=0xc8;}else{_0x304505=0xce;}_0x54c7f5[_0x32ef('0x19')](_0x304505);return _0x54c7f5[_0x32ef('0x1f')](_0x32ef('0x20'),_0x1a9476+'-'+_0x57863c+'/'+_0x5d559b)[_0x32ef('0x1a')](_0x55bf0b);}return null;};}function patchUpdates(_0x3aec05){return function(_0x4de441){try{jsonpatch[_0x32ef('0x21')](_0x4de441,_0x3aec05,!![]);}catch(_0x5cc3ef){return BPromise[_0x32ef('0x22')](_0x5cc3ef);}return _0x4de441[_0x32ef('0x23')]();};}function saveUpdates(_0x49f2d8,_0x1af371){return function(_0x97780){if(_0x97780){return _0x97780[_0x32ef('0x24')](_0x49f2d8)['then'](function(_0x57f5e5){return _0x57f5e5;});}return null;};}function removeEntity(_0x22f2d7,_0xb30fab){return function(_0x225feb){if(_0x225feb){return _0x225feb['destroy']()['then'](function(){_0x22f2d7[_0x32ef('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0x51a412,_0x278495){return function(_0x14d4b3){if(!_0x14d4b3){_0x51a412[_0x32ef('0x18')](0x194);}return _0x14d4b3;};}function handleError(_0x1dbe98,_0x15ce54){_0x15ce54=_0x15ce54||0x1f4;return function(_0x234175){logger[_0x32ef('0x25')](_0x234175[_0x32ef('0x26')]);if(_0x234175[_0x32ef('0x27')]){delete _0x234175[_0x32ef('0x27')];}_0x1dbe98[_0x32ef('0x19')](_0x15ce54)[_0x32ef('0x28')](_0x234175);};}exports['index']=function(_0xd65fde,_0x2f5d06){var _0x5a04cd={},_0x12de1a={},_0x3c569d={'count':0x0,'rows':[]};var _0x30b250=_[_0x32ef('0x29')](db['VoiceCallReport'][_0x32ef('0x2a')],function(_0x22bf86){return{'name':_0x22bf86[_0x32ef('0x2b')],'type':_0x22bf86[_0x32ef('0x2c')][_0x32ef('0x2d')]};});_0x12de1a[_0x32ef('0x2e')]=_[_0x32ef('0x29')](_0x30b250,'name');_0x12de1a[_0x32ef('0x2f')]=_['keys'](_0xd65fde[_0x32ef('0x2f')]);_0x12de1a[_0x32ef('0x30')]=_['intersection'](_0x12de1a[_0x32ef('0x2e')],_0x12de1a[_0x32ef('0x2f')]);_0x5a04cd[_0x32ef('0x31')]=_[_0x32ef('0x32')](_0x12de1a[_0x32ef('0x2e')],qs['fields'](_0xd65fde['query'][_0x32ef('0x33')]));_0x5a04cd['attributes']=_0x5a04cd[_0x32ef('0x31')][_0x32ef('0x34')]?_0x5a04cd[_0x32ef('0x31')]:_0x12de1a[_0x32ef('0x2e')];if(!_0xd65fde[_0x32ef('0x2f')][_0x32ef('0x35')]('nolimit')){_0x5a04cd['limit']=qs['limit'](_0xd65fde[_0x32ef('0x2f')][_0x32ef('0x1d')]);_0x5a04cd[_0x32ef('0x1b')]=qs['offset'](_0xd65fde['query'][_0x32ef('0x1b')]);}_0x5a04cd[_0x32ef('0x36')]=qs[_0x32ef('0x37')](_0xd65fde['query']['sort']);_0x5a04cd[_0x32ef('0x38')]=qs[_0x32ef('0x30')](_[_0x32ef('0x39')](_0xd65fde[_0x32ef('0x2f')],_0x12de1a[_0x32ef('0x30')]),_0x30b250);if(_0xd65fde[_0x32ef('0x2f')][_0x32ef('0x3a')]){_0x5a04cd[_0x32ef('0x38')]=_[_0x32ef('0x3b')](_0x5a04cd['where'],{'$or':_[_0x32ef('0x29')](_0x30b250,function(_0x36e374){if(_0x36e374[_0x32ef('0x2c')]!=='VIRTUAL'){var _0x365125={};_0x365125[_0x36e374[_0x32ef('0x27')]]={'$like':'%'+_0xd65fde[_0x32ef('0x2f')][_0x32ef('0x3a')]+'%'};return _0x365125;}})});}_0x5a04cd=_[_0x32ef('0x3b')]({},_0x5a04cd,_0xd65fde[_0x32ef('0x3c')]);var _0x256c40={'where':_0x5a04cd[_0x32ef('0x38')]};return db[_0x32ef('0x3d')][_0x32ef('0x1e')](_0x256c40)[_0x32ef('0x3e')](function(_0x4615b4){_0x3c569d['count']=_0x4615b4;if(_0xd65fde[_0x32ef('0x2f')][_0x32ef('0x3f')]){_0x5a04cd[_0x32ef('0x40')]=[{'attributes':['id',_0x32ef('0x27'),_0x32ef('0x41'),_0x32ef('0x42')],'model':db[_0x32ef('0x43')],'as':'User'}];}return db['VoiceCallReport'][_0x32ef('0x44')](_0x5a04cd);})[_0x32ef('0x3e')](function(_0x2a33dd){_0x3c569d[_0x32ef('0x45')]=_0x2a33dd;return _0x3c569d;})['then'](respondWithFilteredResult(_0x2f5d06,_0x5a04cd))[_0x32ef('0x46')](handleError(_0x2f5d06,null));};exports[_0x32ef('0x47')]=function(_0x5d2f06,_0x4744ba){var _0x4bc5bc={'raw':!![],'where':{'id':_0x5d2f06[_0x32ef('0x48')]['id']}},_0xcb3c08={};_0xcb3c08[_0x32ef('0x2e')]=_[_0x32ef('0x49')](db[_0x32ef('0x3d')][_0x32ef('0x2a')]);_0xcb3c08[_0x32ef('0x2f')]=_[_0x32ef('0x49')](_0x5d2f06[_0x32ef('0x2f')]);_0xcb3c08[_0x32ef('0x30')]=_['intersection'](_0xcb3c08[_0x32ef('0x2e')],_0xcb3c08['query']);_0x4bc5bc[_0x32ef('0x31')]=_[_0x32ef('0x32')](_0xcb3c08[_0x32ef('0x2e')],qs['fields'](_0x5d2f06[_0x32ef('0x2f')][_0x32ef('0x33')]));_0x4bc5bc[_0x32ef('0x31')]=_0x4bc5bc[_0x32ef('0x31')][_0x32ef('0x34')]?_0x4bc5bc[_0x32ef('0x31')]:_0xcb3c08[_0x32ef('0x2e')];if(_0x5d2f06['query']['includeAll']){_0x4bc5bc[_0x32ef('0x40')]=[{'all':!![]}];}_0x4bc5bc=_[_0x32ef('0x3b')]({},_0x4bc5bc,_0x5d2f06[_0x32ef('0x3c')]);return db[_0x32ef('0x3d')][_0x32ef('0x4a')](_0x4bc5bc)[_0x32ef('0x3e')](handleEntityNotFound(_0x4744ba,null))[_0x32ef('0x3e')](respondWithResult(_0x4744ba,null))[_0x32ef('0x46')](handleError(_0x4744ba,null));};exports[_0x32ef('0x4b')]=function(_0x1ebedf,_0x35a294){return db[_0x32ef('0x3d')][_0x32ef('0x4b')](_0x1ebedf['body'],{})[_0x32ef('0x3e')](respondWithResult(_0x35a294,0xc9))[_0x32ef('0x46')](handleError(_0x35a294,null));};exports[_0x32ef('0x4c')]=function(_0xd42609,_0x1cc9f3){return db[_0x32ef('0x3d')][_0x32ef('0x4a')]({'where':{'id':_0xd42609[_0x32ef('0x48')]['id']}})[_0x32ef('0x3e')](handleEntityNotFound(_0x1cc9f3,null))[_0x32ef('0x3e')](removeEntity(_0x1cc9f3,null))[_0x32ef('0x46')](handleError(_0x1cc9f3,null));};exports[_0x32ef('0x4d')]=function(_0x272377,_0x326445){return db[_0x32ef('0x3d')][_0x32ef('0x4d')]()[_0x32ef('0x3e')](respondWithResult(_0x326445,null))[_0x32ef('0x46')](handleError(_0x326445,null));};exports['update']=function(_0x515ac9,_0x179c2f){if(_0x515ac9[_0x32ef('0x4e')][_0x32ef('0x4f')]){delete _0x515ac9[_0x32ef('0x4e')][_0x32ef('0x4f')];}return db[_0x32ef('0x3d')][_0x32ef('0x4a')]({'where':{'uniqueid':_0x515ac9[_0x32ef('0x48')]['id'],'UserId':{'$or':[null,_0x515ac9[_0x32ef('0x50')]['id']]}}})[_0x32ef('0x3e')](handleEntityNotFound(_0x179c2f,null))[_0x32ef('0x3e')](saveUpdates(_0x515ac9['body'],null))[_0x32ef('0x3e')](respondWithResult(_0x179c2f,null))[_0x32ef('0x46')](handleError(_0x179c2f,null));}; \ No newline at end of file diff --git a/server/api/voiceCallReport/voiceCallReport.model.js b/server/api/voiceCallReport/voiceCallReport.model.js index 8e8701f..669ace8 100644 --- a/server/api/voiceCallReport/voiceCallReport.model.js +++ b/server/api/voiceCallReport/voiceCallReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf2f6=['../../config/logger','request-promise','../../config/environment','VoiceCallReport','report_call','lodash','util'];(function(_0x4bcec2,_0x4607f8){var _0x2a4df6=function(_0x35e8ec){while(--_0x35e8ec){_0x4bcec2['push'](_0x4bcec2['shift']());}};_0x2a4df6(++_0x4607f8);}(_0xf2f6,0x139));var _0x6f2f=function(_0x458a5e,_0x16eac){_0x458a5e=_0x458a5e-0x0;var _0x30949f=_0xf2f6[_0x458a5e];return _0x30949f;};'use strict';var _=require(_0x6f2f('0x0'));var util=require(_0x6f2f('0x1'));var logger=require(_0x6f2f('0x2'))('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x6f2f('0x3'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x6f2f('0x4'));var attributes=require('./voiceCallReport.attributes');module['exports']=function(_0x43a781,_0x1382b6){return _0x43a781['define'](_0x6f2f('0x5'),attributes,{'tableName':_0x6f2f('0x6'),'paranoid':![],'indexes':[{'fields':['uniqueid']}],'timestamps':!![]});}; \ No newline at end of file +var _0xea4b=['VoiceCallReport','uniqueid','lodash','util','../../config/logger','bluebird','request-promise','rimraf','../../config/environment','./voiceCallReport.attributes','exports','define'];(function(_0x501510,_0x61caa9){var _0x1e6ee5=function(_0x32845b){while(--_0x32845b){_0x501510['push'](_0x501510['shift']());}};_0x1e6ee5(++_0x61caa9);}(_0xea4b,0x7a));var _0xbea4=function(_0x541817,_0x42ce68){_0x541817=_0x541817-0x0;var _0x46a287=_0xea4b[_0x541817];return _0x46a287;};'use strict';var _=require(_0xbea4('0x0'));var util=require(_0xbea4('0x1'));var logger=require(_0xbea4('0x2'))('api');var moment=require('moment');var BPromise=require(_0xbea4('0x3'));var rp=require(_0xbea4('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xbea4('0x5'));var config=require(_0xbea4('0x6'));var attributes=require(_0xbea4('0x7'));module[_0xbea4('0x8')]=function(_0xb00530,_0x5a420f){return _0xb00530[_0xbea4('0x9')](_0xbea4('0xa'),attributes,{'tableName':'report_call','paranoid':![],'indexes':[{'fields':[_0xbea4('0xb')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/voiceCallReport/voiceCallReport.rpc.js b/server/api/voiceCallReport/voiceCallReport.rpc.js index 4a3275d..5700d92 100644 --- a/server/api/voiceCallReport/voiceCallReport.rpc.js +++ b/server/api/voiceCallReport/voiceCallReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3f53=['model','CreateVoiceCallReport','create','UpdateVoiceCallReport','update','body','limit','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','VoiceCallReport,\x20%s,\x20%s','request\x20sent','debug','VoiceCallReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','GetVoiceCallReport','VoiceCallReport','findAll','options','raw','where','attributes','include','map'];(function(_0x420033,_0x3a567a){var _0xa9556f=function(_0x23262f){while(--_0x23262f){_0x420033['push'](_0x420033['shift']());}};_0xa9556f(++_0x3a567a);}(_0x3f53,0x181));var _0x33f5=function(_0x475036,_0x1f0a42){_0x475036=_0x475036-0x0;var _0x21ad1d=_0x3f53[_0x475036];return _0x21ad1d;};'use strict';var _=require(_0x33f5('0x0'));var util=require(_0x33f5('0x1'));var moment=require(_0x33f5('0x2'));var BPromise=require(_0x33f5('0x3'));var rs=require(_0x33f5('0x4'));var fs=require('fs');var Redis=require(_0x33f5('0x5'));var db=require(_0x33f5('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x33f5('0x7'))(_0x33f5('0x8'));var config=require(_0x33f5('0x9'));var jayson=require(_0x33f5('0xa'));var client=jayson[_0x33f5('0xb')][_0x33f5('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x296004,_0x2fdef2,_0x206d1f){return new BPromise(function(_0x3e06e8,_0x47530d){return client[_0x33f5('0xd')](_0x296004,_0x206d1f)[_0x33f5('0xe')](function(_0x5c70da){logger[_0x33f5('0xf')](_0x33f5('0x10'),_0x2fdef2,_0x33f5('0x11'));logger[_0x33f5('0x12')](_0x33f5('0x13'),_0x2fdef2,'request\x20sent',JSON[_0x33f5('0x14')](_0x5c70da));if(_0x5c70da[_0x33f5('0x15')]){if(_0x5c70da[_0x33f5('0x15')][_0x33f5('0x16')]===0x1f4){logger[_0x33f5('0x15')](_0x33f5('0x10'),_0x2fdef2,_0x5c70da[_0x33f5('0x15')][_0x33f5('0x17')]);return _0x47530d(_0x5c70da[_0x33f5('0x15')]['message']);}logger[_0x33f5('0x15')]('VoiceCallReport,\x20%s,\x20%s',_0x2fdef2,_0x5c70da['error'][_0x33f5('0x17')]);return _0x3e06e8(_0x5c70da[_0x33f5('0x15')][_0x33f5('0x17')]);}else{logger[_0x33f5('0xf')](_0x33f5('0x10'),_0x2fdef2,_0x33f5('0x11'));_0x3e06e8(_0x5c70da[_0x33f5('0x18')][_0x33f5('0x17')]);}})[_0x33f5('0x19')](function(_0x56ee3f){logger['error']('VoiceCallReport,\x20%s,\x20%s',_0x2fdef2,_0x56ee3f);_0x47530d(_0x56ee3f);});});}exports[_0x33f5('0x1a')]=function(_0x41dcbc){var _0x46ca61=this;return new Promise(function(_0x87ecd1,_0x244199){return db[_0x33f5('0x1b')][_0x33f5('0x1c')]({'raw':_0x41dcbc[_0x33f5('0x1d')]?_0x41dcbc[_0x33f5('0x1d')][_0x33f5('0x1e')]===undefined?!![]:![]:!![],'where':_0x41dcbc[_0x33f5('0x1d')]?_0x41dcbc[_0x33f5('0x1d')][_0x33f5('0x1f')]||null:null,'attributes':_0x41dcbc[_0x33f5('0x1d')]?_0x41dcbc[_0x33f5('0x1d')][_0x33f5('0x20')]||null:null,'limit':_0x41dcbc[_0x33f5('0x1d')]?_0x41dcbc['options']['limit']||null:null,'include':_0x41dcbc[_0x33f5('0x1d')]?_0x41dcbc[_0x33f5('0x1d')][_0x33f5('0x21')]?_[_0x33f5('0x22')](_0x41dcbc[_0x33f5('0x1d')][_0x33f5('0x21')],function(_0x330bbd){return{'model':db[_0x330bbd[_0x33f5('0x23')]],'as':_0x330bbd['as'],'attributes':_0x330bbd['attributes'],'include':_0x330bbd[_0x33f5('0x21')]?_[_0x33f5('0x22')](_0x330bbd[_0x33f5('0x21')],function(_0x493f26){return{'model':db[_0x493f26[_0x33f5('0x23')]],'as':_0x493f26['as'],'attributes':_0x493f26[_0x33f5('0x20')],'include':_0x493f26[_0x33f5('0x21')]?_['map'](_0x493f26['include'],function(_0x23789c){return{'model':db[_0x23789c[_0x33f5('0x23')]],'as':_0x23789c['as'],'attributes':_0x23789c['attributes']};}):[]};}):[]};}):[]:[]})[_0x33f5('0xe')](function(_0x2b494c){logger[_0x33f5('0xf')](_0x33f5('0x1a'),_0x41dcbc);logger[_0x33f5('0x12')](_0x33f5('0x1a'),_0x41dcbc,JSON[_0x33f5('0x14')](_0x2b494c));_0x87ecd1(_0x2b494c);})[_0x33f5('0x19')](function(_0xcd5b40){logger[_0x33f5('0x15')]('GetVoiceCallReport',_0xcd5b40[_0x33f5('0x17')],_0x41dcbc);_0x244199(_0x46ca61[_0x33f5('0x15')](0x1f4,_0xcd5b40['message']));});});};exports[_0x33f5('0x24')]=function(_0x3d77b9){var _0x56d2e4=this;return new Promise(function(_0x56e6b5,_0x5cc082){return db[_0x33f5('0x1b')][_0x33f5('0x25')](_0x3d77b9['body'],{'raw':_0x3d77b9[_0x33f5('0x1d')]?_0x3d77b9['options'][_0x33f5('0x1e')]===undefined?!![]:![]:!![]})['then'](function(_0x58e4eb){logger[_0x33f5('0xf')](_0x33f5('0x24'),_0x3d77b9);logger[_0x33f5('0x12')](_0x33f5('0x24'),_0x3d77b9,JSON[_0x33f5('0x14')](_0x58e4eb));_0x56e6b5(_0x58e4eb);})[_0x33f5('0x19')](function(_0x18086c){logger[_0x33f5('0x15')]('CreateVoiceCallReport',_0x18086c[_0x33f5('0x17')],_0x3d77b9);_0x5cc082(_0x56d2e4['error'](0x1f4,_0x18086c[_0x33f5('0x17')]));});});};exports[_0x33f5('0x26')]=function(_0x4269e8){var _0x35fd05=this;return new Promise(function(_0x35da41,_0x43c3d8){return db[_0x33f5('0x1b')][_0x33f5('0x27')](_0x4269e8[_0x33f5('0x28')],{'raw':_0x4269e8[_0x33f5('0x1d')]?_0x4269e8['options'][_0x33f5('0x1e')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x4269e8['options']?_0x4269e8['options'][_0x33f5('0x1f')]||null:null,'attributes':_0x4269e8[_0x33f5('0x1d')]?_0x4269e8['options'][_0x33f5('0x20')]||null:null,'limit':_0x4269e8[_0x33f5('0x1d')]?_0x4269e8['options'][_0x33f5('0x29')]||null:null})[_0x33f5('0xe')](function(_0x2e9e9b){logger[_0x33f5('0xf')](_0x33f5('0x26'),_0x4269e8);logger['debug'](_0x33f5('0x26'),_0x4269e8,JSON[_0x33f5('0x14')](_0x2e9e9b));_0x35da41(_0x2e9e9b);})[_0x33f5('0x19')](function(_0x5d687a){logger['error']('UpdateVoiceCallReport',_0x5d687a[_0x33f5('0x17')],_0x4269e8);_0x43c3d8(_0x35fd05[_0x33f5('0x15')](0x1f4,_0x5d687a[_0x33f5('0x17')]));});});}; \ No newline at end of file +var _0x95f8=['../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','then','info','VoiceCallReport,\x20%s,\x20%s','request\x20sent','error','message','result','catch','GetVoiceCallReport','VoiceCallReport','findAll','options','raw','attributes','limit','include','map','model','debug','stringify','CreateVoiceCallReport','body','UpdateVoiceCallReport','where','lodash','util','moment','bluebird'];(function(_0x18a79d,_0x57bd2c){var _0x4f8848=function(_0x28af80){while(--_0x28af80){_0x18a79d['push'](_0x18a79d['shift']());}};_0x4f8848(++_0x57bd2c);}(_0x95f8,0xa6));var _0x895f=function(_0x31d3b8,_0xd47928){_0x31d3b8=_0x31d3b8-0x0;var _0x258cac=_0x95f8[_0x31d3b8];return _0x258cac;};'use strict';var _=require(_0x895f('0x0'));var util=require(_0x895f('0x1'));var moment=require(_0x895f('0x2'));var BPromise=require(_0x895f('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x895f('0x4'));var logger=require(_0x895f('0x5'))(_0x895f('0x6'));var config=require(_0x895f('0x7'));var jayson=require(_0x895f('0x8'));var client=jayson[_0x895f('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x2f7d6c,_0xe204f6,_0x5b0bb0){return new BPromise(function(_0x202ef4,_0x3a5d7c){return client['request'](_0x2f7d6c,_0x5b0bb0)[_0x895f('0xa')](function(_0xe5725c){logger[_0x895f('0xb')](_0x895f('0xc'),_0xe204f6,_0x895f('0xd'));logger['debug']('VoiceCallReport,\x20%s,\x20%s,\x20%s',_0xe204f6,_0x895f('0xd'),JSON['stringify'](_0xe5725c));if(_0xe5725c['error']){if(_0xe5725c[_0x895f('0xe')]['code']===0x1f4){logger['error'](_0x895f('0xc'),_0xe204f6,_0xe5725c[_0x895f('0xe')][_0x895f('0xf')]);return _0x3a5d7c(_0xe5725c[_0x895f('0xe')][_0x895f('0xf')]);}logger[_0x895f('0xe')](_0x895f('0xc'),_0xe204f6,_0xe5725c[_0x895f('0xe')]['message']);return _0x202ef4(_0xe5725c[_0x895f('0xe')][_0x895f('0xf')]);}else{logger[_0x895f('0xb')]('VoiceCallReport,\x20%s,\x20%s',_0xe204f6,'request\x20sent');_0x202ef4(_0xe5725c[_0x895f('0x10')][_0x895f('0xf')]);}})[_0x895f('0x11')](function(_0xb15755){logger[_0x895f('0xe')](_0x895f('0xc'),_0xe204f6,_0xb15755);_0x3a5d7c(_0xb15755);});});}exports[_0x895f('0x12')]=function(_0x1e6a9a){var _0x117e05=this;return new Promise(function(_0x56ccb9,_0x594a93){return db[_0x895f('0x13')][_0x895f('0x14')]({'raw':_0x1e6a9a['options']?_0x1e6a9a[_0x895f('0x15')][_0x895f('0x16')]===undefined?!![]:![]:!![],'where':_0x1e6a9a[_0x895f('0x15')]?_0x1e6a9a[_0x895f('0x15')]['where']||null:null,'attributes':_0x1e6a9a['options']?_0x1e6a9a[_0x895f('0x15')][_0x895f('0x17')]||null:null,'limit':_0x1e6a9a[_0x895f('0x15')]?_0x1e6a9a[_0x895f('0x15')][_0x895f('0x18')]||null:null,'include':_0x1e6a9a['options']?_0x1e6a9a[_0x895f('0x15')][_0x895f('0x19')]?_[_0x895f('0x1a')](_0x1e6a9a[_0x895f('0x15')][_0x895f('0x19')],function(_0x5a4714){return{'model':db[_0x5a4714[_0x895f('0x1b')]],'as':_0x5a4714['as'],'attributes':_0x5a4714[_0x895f('0x17')],'include':_0x5a4714['include']?_[_0x895f('0x1a')](_0x5a4714['include'],function(_0x4f998c){return{'model':db[_0x4f998c[_0x895f('0x1b')]],'as':_0x4f998c['as'],'attributes':_0x4f998c[_0x895f('0x17')],'include':_0x4f998c[_0x895f('0x19')]?_[_0x895f('0x1a')](_0x4f998c[_0x895f('0x19')],function(_0x513783){return{'model':db[_0x513783['model']],'as':_0x513783['as'],'attributes':_0x513783[_0x895f('0x17')]};}):[]};}):[]};}):[]:[]})[_0x895f('0xa')](function(_0x161390){logger[_0x895f('0xb')](_0x895f('0x12'),_0x1e6a9a);logger[_0x895f('0x1c')]('GetVoiceCallReport',_0x1e6a9a,JSON[_0x895f('0x1d')](_0x161390));_0x56ccb9(_0x161390);})[_0x895f('0x11')](function(_0x2b20a3){logger[_0x895f('0xe')](_0x895f('0x12'),_0x2b20a3[_0x895f('0xf')],_0x1e6a9a);_0x594a93(_0x117e05['error'](0x1f4,_0x2b20a3[_0x895f('0xf')]));});});};exports[_0x895f('0x1e')]=function(_0x5e8f28){var _0x3a0dba=this;return new Promise(function(_0x4fa5d3,_0x55cdd1){return db[_0x895f('0x13')]['create'](_0x5e8f28[_0x895f('0x1f')],{'raw':_0x5e8f28[_0x895f('0x15')]?_0x5e8f28[_0x895f('0x15')]['raw']===undefined?!![]:![]:!![]})[_0x895f('0xa')](function(_0xa536bf){logger[_0x895f('0xb')](_0x895f('0x1e'),_0x5e8f28);logger[_0x895f('0x1c')]('CreateVoiceCallReport',_0x5e8f28,JSON[_0x895f('0x1d')](_0xa536bf));_0x4fa5d3(_0xa536bf);})['catch'](function(_0x22c3d1){logger[_0x895f('0xe')](_0x895f('0x1e'),_0x22c3d1['message'],_0x5e8f28);_0x55cdd1(_0x3a0dba[_0x895f('0xe')](0x1f4,_0x22c3d1[_0x895f('0xf')]));});});};exports[_0x895f('0x20')]=function(_0x522e32){var _0x4ace4f=this;return new Promise(function(_0x1157a6,_0x4b4d24){return db[_0x895f('0x13')]['update'](_0x522e32['body'],{'raw':_0x522e32[_0x895f('0x15')]?_0x522e32[_0x895f('0x15')][_0x895f('0x16')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x522e32[_0x895f('0x15')]?_0x522e32[_0x895f('0x15')][_0x895f('0x21')]||null:null,'attributes':_0x522e32['options']?_0x522e32[_0x895f('0x15')]['attributes']||null:null,'limit':_0x522e32[_0x895f('0x15')]?_0x522e32[_0x895f('0x15')][_0x895f('0x18')]||null:null})[_0x895f('0xa')](function(_0x165c82){logger['info'](_0x895f('0x20'),_0x522e32);logger['debug']('UpdateVoiceCallReport',_0x522e32,JSON[_0x895f('0x1d')](_0x165c82));_0x1157a6(_0x165c82);})[_0x895f('0x11')](function(_0x56ae05){logger[_0x895f('0xe')](_0x895f('0x20'),_0x56ae05[_0x895f('0xf')],_0x522e32);_0x4b4d24(_0x4ace4f[_0x895f('0xe')](0x1f4,_0x56ae05[_0x895f('0xf')]));});});}; \ No newline at end of file diff --git a/server/api/voiceChanSpy/index.js b/server/api/voiceChanSpy/index.js index 4644350..57000a7 100644 --- a/server/api/voiceChanSpy/index.js +++ b/server/api/voiceChanSpy/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x01bc=['fs-extra','../../components/auth/service','../../components/interaction/service','./voiceChanSpy.controller','get','isAuthenticated','/:id','show','put','update','delete','exports','multer','util','path','express'];(function(_0x17f274,_0x5331d0){var _0x273b80=function(_0x5defc5){while(--_0x5defc5){_0x17f274['push'](_0x17f274['shift']());}};_0x273b80(++_0x5331d0);}(_0x01bc,0x19c));var _0xc01b=function(_0xc9517f,_0x2e7ec1){_0xc9517f=_0xc9517f-0x0;var _0x352bdc=_0x01bc[_0xc9517f];return _0x352bdc;};'use strict';var multer=require(_0xc01b('0x0'));var util=require(_0xc01b('0x1'));var path=require(_0xc01b('0x2'));var timeout=require('connect-timeout');var express=require(_0xc01b('0x3'));var router=express['Router']();var fs_extra=require(_0xc01b('0x4'));var auth=require(_0xc01b('0x5'));var interaction=require(_0xc01b('0x6'));var config=require('../../config/environment');var controller=require(_0xc01b('0x7'));router[_0xc01b('0x8')]('/',auth[_0xc01b('0x9')](),controller['index']);router[_0xc01b('0x8')](_0xc01b('0xa'),auth[_0xc01b('0x9')](),controller[_0xc01b('0xb')]);router['post']('/',auth[_0xc01b('0x9')](),controller['create']);router[_0xc01b('0xc')]('/:id',auth[_0xc01b('0x9')](),controller[_0xc01b('0xd')]);router[_0xc01b('0xe')](_0xc01b('0xa'),auth[_0xc01b('0x9')](),controller['destroy']);module[_0xc01b('0xf')]=router; \ No newline at end of file +var _0x5ee5=['fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceChanSpy.controller','get','index','/:id','isAuthenticated','show','post','put','delete','destroy','exports','util','path','connect-timeout','express','Router'];(function(_0x38cb70,_0x4867f7){var _0x6ca926=function(_0x348afb){while(--_0x348afb){_0x38cb70['push'](_0x38cb70['shift']());}};_0x6ca926(++_0x4867f7);}(_0x5ee5,0x19f));var _0x55ee=function(_0x1c30bf,_0x247c31){_0x1c30bf=_0x1c30bf-0x0;var _0x255b5e=_0x5ee5[_0x1c30bf];return _0x255b5e;};'use strict';var multer=require('multer');var util=require(_0x55ee('0x0'));var path=require(_0x55ee('0x1'));var timeout=require(_0x55ee('0x2'));var express=require(_0x55ee('0x3'));var router=express[_0x55ee('0x4')]();var fs_extra=require(_0x55ee('0x5'));var auth=require(_0x55ee('0x6'));var interaction=require(_0x55ee('0x7'));var config=require(_0x55ee('0x8'));var controller=require(_0x55ee('0x9'));router[_0x55ee('0xa')]('/',auth['isAuthenticated'](),controller[_0x55ee('0xb')]);router[_0x55ee('0xa')](_0x55ee('0xc'),auth[_0x55ee('0xd')](),controller[_0x55ee('0xe')]);router[_0x55ee('0xf')]('/',auth[_0x55ee('0xd')](),controller['create']);router[_0x55ee('0x10')](_0x55ee('0xc'),auth[_0x55ee('0xd')](),controller['update']);router[_0x55ee('0x11')](_0x55ee('0xc'),auth['isAuthenticated'](),controller[_0x55ee('0x12')]);module[_0x55ee('0x13')]=router; \ No newline at end of file diff --git a/server/api/voiceChanSpy/voiceChanSpy.attributes.js b/server/api/voiceChanSpy/voiceChanSpy.attributes.js index 98e7325..4aa2172 100644 --- a/server/api/voiceChanSpy/voiceChanSpy.attributes.js +++ b/server/api/voiceChanSpy/voiceChanSpy.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf928=['split','BOOLEAN','STRING','name','setDataValue','join','getDataValue','options'];(function(_0x3d6f18,_0x433094){var _0x14519a=function(_0x426587){while(--_0x426587){_0x3d6f18['push'](_0x3d6f18['shift']());}};_0x14519a(++_0x433094);}(_0xf928,0x15a));var _0x8f92=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xf928[_0x20a584];return _0x4b41a8;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0x8f92('0x0')]},'prefix':{'type':Sequelize[_0x8f92('0x0')],'unique':_0x8f92('0x1'),'allowNull':![]},'options':{'type':Sequelize[_0x8f92('0x0')],'set':function(_0x39c594){this[_0x8f92('0x2')]('options',_0x39c594?_0x39c594[_0x8f92('0x3')](''):[]);},'get':function(){return this[_0x8f92('0x4')](_0x8f92('0x5'))?this[_0x8f92('0x4')](_0x8f92('0x5'))[_0x8f92('0x6')](''):[];}},'auth':{'type':Sequelize[_0x8f92('0x7')],'defaultValue':![]},'password':{'type':Sequelize[_0x8f92('0x0')]},'record':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'recordingFormat':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x8f92('0x0')]}}; \ No newline at end of file +var _0x5184=['getDataValue','split','sequelize','exports','STRING','setDataValue','options'];(function(_0x411017,_0x4a8117){var _0x2adeea=function(_0x545222){while(--_0x545222){_0x411017['push'](_0x411017['shift']());}};_0x2adeea(++_0x4a8117);}(_0x5184,0x1d0));var _0x4518=function(_0x51b5a4,_0x52c95e){_0x51b5a4=_0x51b5a4-0x0;var _0x29c26c=_0x5184[_0x51b5a4];return _0x29c26c;};'use strict';var Sequelize=require(_0x4518('0x0'));module[_0x4518('0x1')]={'name':{'type':Sequelize[_0x4518('0x2')]},'prefix':{'type':Sequelize['STRING'],'unique':'name','allowNull':![]},'options':{'type':Sequelize[_0x4518('0x2')],'set':function(_0x1cb4e6){this[_0x4518('0x3')](_0x4518('0x4'),_0x1cb4e6?_0x1cb4e6['join'](''):[]);},'get':function(){return this[_0x4518('0x5')]('options')?this[_0x4518('0x5')](_0x4518('0x4'))[_0x4518('0x6')](''):[];}},'auth':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'password':{'type':Sequelize[_0x4518('0x2')]},'record':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'recordingFormat':{'type':Sequelize[_0x4518('0x2')]},'description':{'type':Sequelize[_0x4518('0x2')]}}; \ No newline at end of file diff --git a/server/api/voiceChanSpy/voiceChanSpy.controller.js b/server/api/voiceChanSpy/voiceChanSpy.controller.js index 428a13f..66e5c86 100644 --- a/server/api/voiceChanSpy/voiceChanSpy.controller.js +++ b/server/api/voiceChanSpy/voiceChanSpy.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xacfe=['UserProfileResource','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','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','status','undefined','limit','offset','count','set','Content-Range','apply','reject','save','then','destroy','ChanSpies','stack','name','map','VoiceChanSpy','rawAttributes','fieldName','key','model','query','keys','filters','intersection','attributes','fields','length','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','findAll','rows','catch','show','params','include','create','body','user','get','UserProfileSection','find','userProfileId','autoAssociation'];(function(_0x42f009,_0x5e27b1){var _0x22a1e0=function(_0x297993){while(--_0x297993){_0x42f009['push'](_0x42f009['shift']());}};_0x22a1e0(++_0x5e27b1);}(_0xacfe,0xfd));var _0xeacf=function(_0xb0f7c3,_0x4eae95){_0xb0f7c3=_0xb0f7c3-0x0;var _0x28ea68=_0xacfe[_0xb0f7c3];return _0x28ea68;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0xeacf('0x0'));var jsonpatch=require(_0xeacf('0x1'));var rp=require(_0xeacf('0x2'));var moment=require(_0xeacf('0x3'));var BPromise=require(_0xeacf('0x4'));var Mustache=require(_0xeacf('0x5'));var util=require(_0xeacf('0x6'));var path=require(_0xeacf('0x7'));var sox=require(_0xeacf('0x8'));var csv=require(_0xeacf('0x9'));var ejs=require(_0xeacf('0xa'));var fs=require('fs');var fs_extra=require(_0xeacf('0xb'));var _=require(_0xeacf('0xc'));var squel=require('squel');var crypto=require(_0xeacf('0xd'));var jsforce=require(_0xeacf('0xe'));var deskjs=require(_0xeacf('0xf'));var toCsv=require(_0xeacf('0x9'));var querystring=require('querystring');var Papa=require(_0xeacf('0x10'));var Redis=require('ioredis');var authService=require(_0xeacf('0x11'));var qs=require(_0xeacf('0x12'));var as=require(_0xeacf('0x13'));var hardwareService=require(_0xeacf('0x14'));var logger=require(_0xeacf('0x15'))(_0xeacf('0x16'));var utils=require(_0xeacf('0x17'));var config=require(_0xeacf('0x18'));var licenseUtil=require(_0xeacf('0x19'));var db=require(_0xeacf('0x1a'))['db'];function respondWithStatusCode(_0x47b362,_0x20f851){_0x20f851=_0x20f851||0xcc;return function(_0x44f7b1){if(_0x44f7b1){return _0x47b362[_0xeacf('0x1b')](_0x20f851);}return _0x47b362[_0xeacf('0x1c')](_0x20f851)['end']();};}function respondWithResult(_0x4b7b3d,_0xe8eab2){_0xe8eab2=_0xe8eab2||0xc8;return function(_0x3ce3ef){if(_0x3ce3ef){return _0x4b7b3d['status'](_0xe8eab2)['json'](_0x3ce3ef);}};}function respondWithFilteredResult(_0x5e3c80,_0xdef37f){return function(_0x51619b){if(_0x51619b){var _0x31bc9a=typeof _0xdef37f['offset']===_0xeacf('0x1d')&&typeof _0xdef37f[_0xeacf('0x1e')]==='undefined';var _0x13ca86=_0x51619b['count'];var _0x650730=_0x31bc9a?0x0:_0xdef37f[_0xeacf('0x1f')];var _0x18de20=_0x31bc9a?_0x51619b[_0xeacf('0x20')]:_0xdef37f['offset']+_0xdef37f[_0xeacf('0x1e')];var _0x4d554e;if(_0x18de20>=_0x13ca86){_0x18de20=_0x13ca86;_0x4d554e=0xc8;}else{_0x4d554e=0xce;}_0x5e3c80[_0xeacf('0x1c')](_0x4d554e);return _0x5e3c80[_0xeacf('0x21')](_0xeacf('0x22'),_0x650730+'-'+_0x18de20+'/'+_0x13ca86)['json'](_0x51619b);}return null;};}function patchUpdates(_0x29b0d0){return function(_0x19f3bc){try{jsonpatch[_0xeacf('0x23')](_0x19f3bc,_0x29b0d0,!![]);}catch(_0x208949){return BPromise[_0xeacf('0x24')](_0x208949);}return _0x19f3bc[_0xeacf('0x25')]();};}function saveUpdates(_0x340a85,_0x273d57){return function(_0x6dc216){if(_0x6dc216){return _0x6dc216['update'](_0x340a85)[_0xeacf('0x26')](function(_0x42362d){return _0x42362d;});}return null;};}function removeEntity(_0x32ed3b,_0x35338b){return function(_0x339b83){if(_0x339b83){return _0x339b83[_0xeacf('0x27')]()[_0xeacf('0x26')](function(){var _0x4a0dcc=_0x339b83['get']({'plain':!![]});var _0x4332b7=_0xeacf('0x28');return db['UserProfileResource'][_0xeacf('0x27')]({'where':{'type':_0x4332b7,'resourceId':_0x4a0dcc['id']}})[_0xeacf('0x26')](function(){return _0x339b83;});})[_0xeacf('0x26')](function(){_0x32ed3b[_0xeacf('0x1c')](0xcc)['end']();});}};}function handleEntityNotFound(_0x3aae94,_0x236d97){return function(_0x4c161e){if(!_0x4c161e){_0x3aae94[_0xeacf('0x1b')](0x194);}return _0x4c161e;};}function handleError(_0x33a51,_0x3d85eb){_0x3d85eb=_0x3d85eb||0x1f4;return function(_0x2d6f2f){logger['error'](_0x2d6f2f[_0xeacf('0x29')]);if(_0x2d6f2f[_0xeacf('0x2a')]){delete _0x2d6f2f['name'];}_0x33a51['status'](_0x3d85eb)['send'](_0x2d6f2f);};}exports['index']=function(_0x1fbf6b,_0x46cdea){var _0xfdb744={},_0x2d5592={},_0x5117bf={'count':0x0,'rows':[]};var _0x323491=_[_0xeacf('0x2b')](db[_0xeacf('0x2c')][_0xeacf('0x2d')],function(_0x27cf38){return{'name':_0x27cf38[_0xeacf('0x2e')],'type':_0x27cf38['type'][_0xeacf('0x2f')]};});_0x2d5592[_0xeacf('0x30')]=_['map'](_0x323491,'name');_0x2d5592[_0xeacf('0x31')]=_[_0xeacf('0x32')](_0x1fbf6b['query']);_0x2d5592[_0xeacf('0x33')]=_[_0xeacf('0x34')](_0x2d5592[_0xeacf('0x30')],_0x2d5592['query']);_0xfdb744[_0xeacf('0x35')]=_[_0xeacf('0x34')](_0x2d5592[_0xeacf('0x30')],qs[_0xeacf('0x36')](_0x1fbf6b[_0xeacf('0x31')][_0xeacf('0x36')]));_0xfdb744['attributes']=_0xfdb744[_0xeacf('0x35')][_0xeacf('0x37')]?_0xfdb744['attributes']:_0x2d5592[_0xeacf('0x30')];if(!_0x1fbf6b[_0xeacf('0x31')]['hasOwnProperty']('nolimit')){_0xfdb744['limit']=qs['limit'](_0x1fbf6b[_0xeacf('0x31')]['limit']);_0xfdb744[_0xeacf('0x1f')]=qs[_0xeacf('0x1f')](_0x1fbf6b[_0xeacf('0x31')]['offset']);}_0xfdb744[_0xeacf('0x38')]=qs[_0xeacf('0x39')](_0x1fbf6b[_0xeacf('0x31')][_0xeacf('0x39')]);_0xfdb744[_0xeacf('0x3a')]=qs[_0xeacf('0x33')](_[_0xeacf('0x3b')](_0x1fbf6b['query'],_0x2d5592[_0xeacf('0x33')]),_0x323491);if(_0x1fbf6b['query'][_0xeacf('0x3c')]){_0xfdb744[_0xeacf('0x3a')]=_[_0xeacf('0x3d')](_0xfdb744['where'],{'$or':_[_0xeacf('0x2b')](_0x323491,function(_0x4e0bdc){if(_0x4e0bdc['type']!==_0xeacf('0x3e')){var _0x5950b0={};_0x5950b0[_0x4e0bdc['name']]={'$like':'%'+_0x1fbf6b[_0xeacf('0x31')][_0xeacf('0x3c')]+'%'};return _0x5950b0;}})});}_0xfdb744=_[_0xeacf('0x3d')]({},_0xfdb744,_0x1fbf6b[_0xeacf('0x3f')]);var _0x21f450={'where':_0xfdb744[_0xeacf('0x3a')]};return db['VoiceChanSpy']['count'](_0x21f450)[_0xeacf('0x26')](function(_0x4e5351){_0x5117bf['count']=_0x4e5351;if(_0x1fbf6b[_0xeacf('0x31')][_0xeacf('0x40')]){_0xfdb744['include']=[{'all':!![]}];}return db[_0xeacf('0x2c')][_0xeacf('0x41')](_0xfdb744);})[_0xeacf('0x26')](function(_0x4ed82f){_0x5117bf[_0xeacf('0x42')]=_0x4ed82f;return _0x5117bf;})[_0xeacf('0x26')](respondWithFilteredResult(_0x46cdea,_0xfdb744))[_0xeacf('0x43')](handleError(_0x46cdea,null));};exports[_0xeacf('0x44')]=function(_0x47382f,_0x1975de){var _0x161e8d={'raw':![],'where':{'id':_0x47382f[_0xeacf('0x45')]['id']}},_0x36061d={};_0x36061d[_0xeacf('0x30')]=_[_0xeacf('0x32')](db[_0xeacf('0x2c')]['rawAttributes']);_0x36061d[_0xeacf('0x31')]=_[_0xeacf('0x32')](_0x47382f[_0xeacf('0x31')]);_0x36061d['filters']=_[_0xeacf('0x34')](_0x36061d['model'],_0x36061d[_0xeacf('0x31')]);_0x161e8d[_0xeacf('0x35')]=_[_0xeacf('0x34')](_0x36061d[_0xeacf('0x30')],qs['fields'](_0x47382f[_0xeacf('0x31')]['fields']));_0x161e8d[_0xeacf('0x35')]=_0x161e8d[_0xeacf('0x35')][_0xeacf('0x37')]?_0x161e8d[_0xeacf('0x35')]:_0x36061d['model'];if(_0x47382f[_0xeacf('0x31')][_0xeacf('0x40')]){_0x161e8d[_0xeacf('0x46')]=[{'all':!![]}];}_0x161e8d=_['merge']({},_0x161e8d,_0x47382f[_0xeacf('0x3f')]);return db[_0xeacf('0x2c')]['find'](_0x161e8d)[_0xeacf('0x26')](handleEntityNotFound(_0x1975de,null))[_0xeacf('0x26')](respondWithResult(_0x1975de,null))[_0xeacf('0x43')](handleError(_0x1975de,null));};exports[_0xeacf('0x47')]=function(_0x5fcab1,_0x5f4bbe){return db['VoiceChanSpy'][_0xeacf('0x47')](_0x5fcab1[_0xeacf('0x48')],{})[_0xeacf('0x26')](function(_0x757407){var _0x50ed93=_0x5fcab1[_0xeacf('0x49')][_0xeacf('0x4a')]({'plain':!![]});if(!_0x50ed93)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x50ed93['role']===_0xeacf('0x49')){var _0x4ff7ca=_0x757407[_0xeacf('0x4a')]({'plain':!![]});var _0x174672='ChanSpies';return db[_0xeacf('0x4b')][_0xeacf('0x4c')]({'where':{'name':_0x174672,'userProfileId':_0x50ed93[_0xeacf('0x4d')]},'raw':!![]})[_0xeacf('0x26')](function(_0x56c650){if(_0x56c650&&_0x56c650[_0xeacf('0x4e')]===0x0){return db[_0xeacf('0x4f')][_0xeacf('0x47')]({'name':_0x4ff7ca[_0xeacf('0x2a')],'resourceId':_0x4ff7ca['id'],'type':_0x56c650['name'],'sectionId':_0x56c650['id']},{})[_0xeacf('0x26')](function(){return _0x757407;});}else{return _0x757407;}})[_0xeacf('0x43')](function(_0x4e6108){logger[_0xeacf('0x50')](_0xeacf('0x51'),_0x4e6108);throw _0x4e6108;});}return _0x757407;})[_0xeacf('0x26')](respondWithResult(_0x5f4bbe,0xc9))[_0xeacf('0x43')](handleError(_0x5f4bbe,null));};exports[_0xeacf('0x52')]=function(_0x40e4c8,_0x3af63a){if(_0x40e4c8[_0xeacf('0x48')]['id']){delete _0x40e4c8[_0xeacf('0x48')]['id'];}return db['VoiceChanSpy'][_0xeacf('0x4c')]({'where':{'id':_0x40e4c8[_0xeacf('0x45')]['id']}})['then'](handleEntityNotFound(_0x3af63a,null))[_0xeacf('0x26')](saveUpdates(_0x40e4c8[_0xeacf('0x48')],null))[_0xeacf('0x26')](respondWithResult(_0x3af63a,null))[_0xeacf('0x43')](handleError(_0x3af63a,null));};exports[_0xeacf('0x27')]=function(_0x5edebb,_0x3f9bc2){return db[_0xeacf('0x2c')][_0xeacf('0x4c')]({'where':{'id':_0x5edebb[_0xeacf('0x45')]['id']}})[_0xeacf('0x26')](handleEntityNotFound(_0x3f9bc2,null))['then'](removeEntity(_0x3f9bc2,null))[_0xeacf('0x43')](handleError(_0x3f9bc2,null));}; \ No newline at end of file +var _0xed8a=['model','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','where','pick','filter','merge','findAll','rows','catch','show','params','keys','includeAll','include','find','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','ChanSpies','UserProfileSection','userProfileId','update','body','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','util','path','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/license/util','sendStatus','end','status','json','offset','limit','undefined','count','set','Content-Range','apply','reject','save','destroy','then','get','UserProfileResource','error','stack','name','send','index','map','VoiceChanSpy','rawAttributes','fieldName','type','key'];(function(_0x3828ac,_0x16267d){var _0x159de9=function(_0x714fcd){while(--_0x714fcd){_0x3828ac['push'](_0x3828ac['shift']());}};_0x159de9(++_0x16267d);}(_0xed8a,0xc5));var _0xaed8=function(_0x3a21b6,_0x4dd08a){_0x3a21b6=_0x3a21b6-0x0;var _0xe94132=_0xed8a[_0x3a21b6];return _0xe94132;};'use strict';var emlformat=require(_0xaed8('0x0'));var rimraf=require(_0xaed8('0x1'));var zipdir=require(_0xaed8('0x2'));var jsonpatch=require(_0xaed8('0x3'));var rp=require('request-promise');var moment=require(_0xaed8('0x4'));var BPromise=require(_0xaed8('0x5'));var Mustache=require('mustache');var util=require(_0xaed8('0x6'));var path=require(_0xaed8('0x7'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0xaed8('0x8'));var fs=require('fs');var fs_extra=require(_0xaed8('0x9'));var _=require(_0xaed8('0xa'));var squel=require(_0xaed8('0xb'));var crypto=require(_0xaed8('0xc'));var jsforce=require(_0xaed8('0xd'));var deskjs=require(_0xaed8('0xe'));var toCsv=require('to-csv');var querystring=require(_0xaed8('0xf'));var Papa=require(_0xaed8('0x10'));var Redis=require(_0xaed8('0x11'));var authService=require('../../components/auth/service');var qs=require(_0xaed8('0x12'));var as=require(_0xaed8('0x13'));var hardwareService=require(_0xaed8('0x14'));var logger=require(_0xaed8('0x15'))(_0xaed8('0x16'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0xaed8('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x3eed24,_0x36c833){_0x36c833=_0x36c833||0xcc;return function(_0x129051){if(_0x129051){return _0x3eed24[_0xaed8('0x18')](_0x36c833);}return _0x3eed24['status'](_0x36c833)[_0xaed8('0x19')]();};}function respondWithResult(_0x273de5,_0x3a7aab){_0x3a7aab=_0x3a7aab||0xc8;return function(_0x248cd7){if(_0x248cd7){return _0x273de5[_0xaed8('0x1a')](_0x3a7aab)[_0xaed8('0x1b')](_0x248cd7);}};}function respondWithFilteredResult(_0x54ae7b,_0xefac0c){return function(_0x4a7448){if(_0x4a7448){var _0x4593c1=typeof _0xefac0c[_0xaed8('0x1c')]==='undefined'&&typeof _0xefac0c[_0xaed8('0x1d')]===_0xaed8('0x1e');var _0x1ef875=_0x4a7448[_0xaed8('0x1f')];var _0x427d37=_0x4593c1?0x0:_0xefac0c[_0xaed8('0x1c')];var _0x42eae7=_0x4593c1?_0x4a7448[_0xaed8('0x1f')]:_0xefac0c[_0xaed8('0x1c')]+_0xefac0c[_0xaed8('0x1d')];var _0x2d32ce;if(_0x42eae7>=_0x1ef875){_0x42eae7=_0x1ef875;_0x2d32ce=0xc8;}else{_0x2d32ce=0xce;}_0x54ae7b[_0xaed8('0x1a')](_0x2d32ce);return _0x54ae7b[_0xaed8('0x20')](_0xaed8('0x21'),_0x427d37+'-'+_0x42eae7+'/'+_0x1ef875)[_0xaed8('0x1b')](_0x4a7448);}return null;};}function patchUpdates(_0x48828f){return function(_0x5cd103){try{jsonpatch[_0xaed8('0x22')](_0x5cd103,_0x48828f,!![]);}catch(_0x5bafaf){return BPromise[_0xaed8('0x23')](_0x5bafaf);}return _0x5cd103[_0xaed8('0x24')]();};}function saveUpdates(_0x2ec32e,_0x344949){return function(_0x5a69aa){if(_0x5a69aa){return _0x5a69aa['update'](_0x2ec32e)['then'](function(_0x1a1acb){return _0x1a1acb;});}return null;};}function removeEntity(_0x4437aa,_0x448ef9){return function(_0x38a3f1){if(_0x38a3f1){return _0x38a3f1[_0xaed8('0x25')]()[_0xaed8('0x26')](function(){var _0x290b32=_0x38a3f1[_0xaed8('0x27')]({'plain':!![]});var _0x10c1fa='ChanSpies';return db[_0xaed8('0x28')][_0xaed8('0x25')]({'where':{'type':_0x10c1fa,'resourceId':_0x290b32['id']}})[_0xaed8('0x26')](function(){return _0x38a3f1;});})[_0xaed8('0x26')](function(){_0x4437aa[_0xaed8('0x1a')](0xcc)[_0xaed8('0x19')]();});}};}function handleEntityNotFound(_0x541662,_0x552555){return function(_0x4c442d){if(!_0x4c442d){_0x541662[_0xaed8('0x18')](0x194);}return _0x4c442d;};}function handleError(_0x5d80c7,_0x34c7ff){_0x34c7ff=_0x34c7ff||0x1f4;return function(_0x4b25d9){logger[_0xaed8('0x29')](_0x4b25d9[_0xaed8('0x2a')]);if(_0x4b25d9[_0xaed8('0x2b')]){delete _0x4b25d9[_0xaed8('0x2b')];}_0x5d80c7[_0xaed8('0x1a')](_0x34c7ff)[_0xaed8('0x2c')](_0x4b25d9);};}exports[_0xaed8('0x2d')]=function(_0xa093be,_0x16263d){var _0x4b1db6={},_0x478bce={},_0x24a703={'count':0x0,'rows':[]};var _0x27dd81=_[_0xaed8('0x2e')](db[_0xaed8('0x2f')][_0xaed8('0x30')],function(_0x539150){return{'name':_0x539150[_0xaed8('0x31')],'type':_0x539150[_0xaed8('0x32')][_0xaed8('0x33')]};});_0x478bce[_0xaed8('0x34')]=_[_0xaed8('0x2e')](_0x27dd81,_0xaed8('0x2b'));_0x478bce['query']=_['keys'](_0xa093be[_0xaed8('0x35')]);_0x478bce[_0xaed8('0x36')]=_[_0xaed8('0x37')](_0x478bce['model'],_0x478bce['query']);_0x4b1db6[_0xaed8('0x38')]=_[_0xaed8('0x37')](_0x478bce[_0xaed8('0x34')],qs['fields'](_0xa093be[_0xaed8('0x35')][_0xaed8('0x39')]));_0x4b1db6[_0xaed8('0x38')]=_0x4b1db6['attributes'][_0xaed8('0x3a')]?_0x4b1db6[_0xaed8('0x38')]:_0x478bce[_0xaed8('0x34')];if(!_0xa093be[_0xaed8('0x35')][_0xaed8('0x3b')](_0xaed8('0x3c'))){_0x4b1db6[_0xaed8('0x1d')]=qs[_0xaed8('0x1d')](_0xa093be[_0xaed8('0x35')]['limit']);_0x4b1db6[_0xaed8('0x1c')]=qs[_0xaed8('0x1c')](_0xa093be[_0xaed8('0x35')][_0xaed8('0x1c')]);}_0x4b1db6['order']=qs[_0xaed8('0x3d')](_0xa093be[_0xaed8('0x35')][_0xaed8('0x3d')]);_0x4b1db6[_0xaed8('0x3e')]=qs[_0xaed8('0x36')](_[_0xaed8('0x3f')](_0xa093be[_0xaed8('0x35')],_0x478bce[_0xaed8('0x36')]),_0x27dd81);if(_0xa093be['query'][_0xaed8('0x40')]){_0x4b1db6[_0xaed8('0x3e')]=_['merge'](_0x4b1db6[_0xaed8('0x3e')],{'$or':_['map'](_0x27dd81,function(_0x3e06b6){if(_0x3e06b6[_0xaed8('0x32')]!=='VIRTUAL'){var _0x21bc95={};_0x21bc95[_0x3e06b6[_0xaed8('0x2b')]]={'$like':'%'+_0xa093be['query'][_0xaed8('0x40')]+'%'};return _0x21bc95;}})});}_0x4b1db6=_[_0xaed8('0x41')]({},_0x4b1db6,_0xa093be['options']);var _0x2d458e={'where':_0x4b1db6[_0xaed8('0x3e')]};return db['VoiceChanSpy'][_0xaed8('0x1f')](_0x2d458e)['then'](function(_0x2aa6da){_0x24a703[_0xaed8('0x1f')]=_0x2aa6da;if(_0xa093be[_0xaed8('0x35')]['includeAll']){_0x4b1db6['include']=[{'all':!![]}];}return db[_0xaed8('0x2f')][_0xaed8('0x42')](_0x4b1db6);})['then'](function(_0x22ddd8){_0x24a703[_0xaed8('0x43')]=_0x22ddd8;return _0x24a703;})[_0xaed8('0x26')](respondWithFilteredResult(_0x16263d,_0x4b1db6))[_0xaed8('0x44')](handleError(_0x16263d,null));};exports[_0xaed8('0x45')]=function(_0x41f0c6,_0x3c05d2){var _0x170de5={'raw':![],'where':{'id':_0x41f0c6[_0xaed8('0x46')]['id']}},_0x1f1eaa={};_0x1f1eaa['model']=_[_0xaed8('0x47')](db['VoiceChanSpy'][_0xaed8('0x30')]);_0x1f1eaa[_0xaed8('0x35')]=_['keys'](_0x41f0c6[_0xaed8('0x35')]);_0x1f1eaa[_0xaed8('0x36')]=_[_0xaed8('0x37')](_0x1f1eaa['model'],_0x1f1eaa[_0xaed8('0x35')]);_0x170de5[_0xaed8('0x38')]=_['intersection'](_0x1f1eaa[_0xaed8('0x34')],qs[_0xaed8('0x39')](_0x41f0c6[_0xaed8('0x35')][_0xaed8('0x39')]));_0x170de5[_0xaed8('0x38')]=_0x170de5[_0xaed8('0x38')]['length']?_0x170de5[_0xaed8('0x38')]:_0x1f1eaa[_0xaed8('0x34')];if(_0x41f0c6[_0xaed8('0x35')][_0xaed8('0x48')]){_0x170de5[_0xaed8('0x49')]=[{'all':!![]}];}_0x170de5=_[_0xaed8('0x41')]({},_0x170de5,_0x41f0c6['options']);return db[_0xaed8('0x2f')][_0xaed8('0x4a')](_0x170de5)[_0xaed8('0x26')](handleEntityNotFound(_0x3c05d2,null))[_0xaed8('0x26')](respondWithResult(_0x3c05d2,null))[_0xaed8('0x44')](handleError(_0x3c05d2,null));};exports[_0xaed8('0x4b')]=function(_0x940feb,_0x26c015){return db[_0xaed8('0x2f')][_0xaed8('0x4b')](_0x940feb['body'],{})[_0xaed8('0x26')](function(_0x3168af){var _0x57e9d1=_0x940feb[_0xaed8('0x4c')][_0xaed8('0x27')]({'plain':!![]});if(!_0x57e9d1)throw new Error(_0xaed8('0x4d'));if(_0x57e9d1['role']===_0xaed8('0x4c')){var _0x3b6a26=_0x3168af['get']({'plain':!![]});var _0x213341=_0xaed8('0x4e');return db[_0xaed8('0x4f')][_0xaed8('0x4a')]({'where':{'name':_0x213341,'userProfileId':_0x57e9d1[_0xaed8('0x50')]},'raw':!![]})[_0xaed8('0x26')](function(_0x116b53){if(_0x116b53&&_0x116b53['autoAssociation']===0x0){return db[_0xaed8('0x28')][_0xaed8('0x4b')]({'name':_0x3b6a26[_0xaed8('0x2b')],'resourceId':_0x3b6a26['id'],'type':_0x116b53[_0xaed8('0x2b')],'sectionId':_0x116b53['id']},{})[_0xaed8('0x26')](function(){return _0x3168af;});}else{return _0x3168af;}})[_0xaed8('0x44')](function(_0x2508fa){logger[_0xaed8('0x29')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x2508fa);throw _0x2508fa;});}return _0x3168af;})[_0xaed8('0x26')](respondWithResult(_0x26c015,0xc9))[_0xaed8('0x44')](handleError(_0x26c015,null));};exports[_0xaed8('0x51')]=function(_0x107dbd,_0x7a404){if(_0x107dbd[_0xaed8('0x52')]['id']){delete _0x107dbd[_0xaed8('0x52')]['id'];}return db[_0xaed8('0x2f')]['find']({'where':{'id':_0x107dbd['params']['id']}})[_0xaed8('0x26')](handleEntityNotFound(_0x7a404,null))[_0xaed8('0x26')](saveUpdates(_0x107dbd[_0xaed8('0x52')],null))[_0xaed8('0x26')](respondWithResult(_0x7a404,null))[_0xaed8('0x44')](handleError(_0x7a404,null));};exports[_0xaed8('0x25')]=function(_0x3a5afb,_0x311881){return db[_0xaed8('0x2f')][_0xaed8('0x4a')]({'where':{'id':_0x3a5afb[_0xaed8('0x46')]['id']}})[_0xaed8('0x26')](handleEntityNotFound(_0x311881,null))[_0xaed8('0x26')](removeEntity(_0x311881,null))[_0xaed8('0x44')](handleError(_0x311881,null));}; \ No newline at end of file diff --git a/server/api/voiceChanSpy/voiceChanSpy.model.js b/server/api/voiceChanSpy/voiceChanSpy.model.js index a67494c..4c1d33d 100644 --- a/server/api/voiceChanSpy/voiceChanSpy.model.js +++ b/server/api/voiceChanSpy/voiceChanSpy.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1d78=['chanspy','record','merge','MixMonitor','${UNIQUEID}.%s,a','recordingFormat','auth','password','ChanSpy','SIP/%s,%s','name','options','StopMixMonitor','length','concat','internal','User','findAll','agent','then','define','VoiceChanSpy','voice_chanspy','catch','destroy','VoiceExtension','bulkCreate','lodash','util','bluebird','./voiceChanSpy.attributes','context','from-sip','format','%s%s','prefix','system','push','Set'];(function(_0x8ea3c1,_0x42a733){var _0xe58c78=function(_0xaafe30){while(--_0xaafe30){_0x8ea3c1['push'](_0x8ea3c1['shift']());}};_0xe58c78(++_0x42a733);}(_0x1d78,0x105));var _0x81d7=function(_0x30500f,_0xa37da7){_0x30500f=_0x30500f-0x0;var _0x3e9bce=_0x1d78[_0x30500f];return _0x3e9bce;};'use strict';var _=require(_0x81d7('0x0'));var util=require(_0x81d7('0x1'));var BPromise=require(_0x81d7('0x2'));var attributes=require(_0x81d7('0x3'));var getUserApplications=function(_0x9b023d,_0x339ed2,_0x17419e){var _0x25ec68=0x1;var _0x11345b=[];var _0x1ad337={'context':_0x339ed2[_0x81d7('0x4')]||_0x81d7('0x5'),'exten':util[_0x81d7('0x6')](_0x81d7('0x7'),_0x9b023d[_0x81d7('0x8')],_0x17419e),'type':_0x81d7('0x9'),'isApp':![],'ChanSpyId':_0x9b023d['id'],'UserId':_0x339ed2['id']};_0x11345b[_0x81d7('0xa')](_['merge']({'app':_0x81d7('0xb'),'appdata':util[_0x81d7('0x6')]('CDR(type)=%s',_0x81d7('0xc')),'priority':_0x25ec68++},_0x1ad337));if(_0x9b023d[_0x81d7('0xd')]){_0x11345b[_0x81d7('0xa')](_[_0x81d7('0xe')]({'app':_0x81d7('0xf'),'appdata':util[_0x81d7('0x6')](_0x81d7('0x10'),_0x9b023d[_0x81d7('0x11')]),'priority':_0x25ec68++},_0x1ad337));}if(_0x9b023d[_0x81d7('0x12')]){_0x11345b['push'](_[_0x81d7('0xe')]({'app':'Authenticate','appdata':_0x9b023d[_0x81d7('0x13')],'priority':_0x25ec68++},_0x1ad337));}_0x11345b[_0x81d7('0xa')](_[_0x81d7('0xe')]({'app':_0x81d7('0x14'),'appdata':util['format'](_0x81d7('0x15'),_0x339ed2[_0x81d7('0x16')],_0x9b023d['options']?_0x9b023d[_0x81d7('0x17')]['join'](''):''),'priority':_0x25ec68++},_0x1ad337));if(_0x9b023d[_0x81d7('0xd')]){_0x11345b[_0x81d7('0xa')](_['merge']({'app':_0x81d7('0x18'),'priority':_0x25ec68++},_0x1ad337));}return _0x11345b;};var getChanSpyApplications=function(_0x45764a,_0x1827c9){var _0xc5c9a3=[];for(var _0x582856=0x0,_0x4b789c=0x1;_0x582856<_0x1827c9[_0x81d7('0x19')];_0x582856++,_0x4b789c=0x1){_0xc5c9a3=_0xc5c9a3[_0x81d7('0x1a')](getUserApplications(_0x45764a,_0x1827c9[_0x582856],_0x1827c9[_0x582856][_0x81d7('0x1b')]));if(_0x1827c9[_0x582856][_0x81d7('0x1b')]!=_0x1827c9[_0x582856]['name']){_0xc5c9a3=_0xc5c9a3[_0x81d7('0x1a')](getUserApplications(_0x45764a,_0x1827c9[_0x582856],_0x1827c9[_0x582856][_0x81d7('0x16')]));}}return _0xc5c9a3;};var getChanSpyPromise=function(_0x5d4295,_0x5440d5){return new BPromise(function(_0x4b9bef,_0x1570f3){return _0x5d4295[_0x81d7('0x1c')][_0x81d7('0x1d')]({'attributes':['id','name','internal'],'where':{'role':_0x81d7('0x1e'),'chanspy':!![]},'raw':!![]})[_0x81d7('0x1f')](function(_0x3f27b7){if(_0x3f27b7){return _0x4b9bef(getChanSpyApplications(_0x5440d5,_0x3f27b7));}return _0x4b9bef([]);})['catch'](function(_0x17c82c){_0x1570f3(_0x17c82c);});});};module['exports']=function(_0x465a09,_0x412b69){var _0x4bd775=_0x465a09['models'];return _0x465a09[_0x81d7('0x20')](_0x81d7('0x21'),attributes,{'tableName':_0x81d7('0x22'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x3b5676,_0x5724cd,_0x3bd1de){return getChanSpyPromise(_0x4bd775,_0x3b5676)[_0x81d7('0x1f')](function(_0x14a1a2){if(_0x14a1a2&&_0x14a1a2[_0x81d7('0x19')]){return _0x4bd775['VoiceExtension']['bulkCreate'](_0x14a1a2);}})[_0x81d7('0x1f')](function(){_0x3bd1de();})[_0x81d7('0x23')](function(_0xadc95a){_0x3bd1de(_0xadc95a);});},'afterUpdate':function(_0x2bfc12,_0x1f1696,_0x950907){return _0x4bd775['VoiceExtension'][_0x81d7('0x24')]({'where':{'ChanSpyId':_0x2bfc12['id']}})['then'](function(){return getChanSpyPromise(_0x4bd775,_0x2bfc12);})[_0x81d7('0x1f')](function(_0x3bb35a){if(_0x3bb35a&&_0x3bb35a[_0x81d7('0x19')]){return _0x4bd775[_0x81d7('0x25')][_0x81d7('0x26')](_0x3bb35a);}})['then'](function(){_0x950907();})['catch'](function(_0x3254ea){_0x950907(_0x3254ea);});},'afterDestroy':function(_0x7bef82,_0x346fe6,_0x583e87){return _0x4bd775[_0x81d7('0x25')][_0x81d7('0x24')]({'where':{'ChanSpyId':_0x7bef82['id']}})['then'](function(){_0x583e87();})[_0x81d7('0x23')](function(_0x3464a9){_0x583e87(_0x3464a9);});}}});}; \ No newline at end of file +var _0x9954=['Authenticate','ChanSpy','SIP/%s,%s','options','join','length','internal','concat','name','findAll','agent','then','exports','VoiceChanSpy','voice_chanspy','VoiceExtension','catch','destroy','bulkCreate','lodash','util','bluebird','./voiceChanSpy.attributes','context','from-sip','%s%s','prefix','push','Set','format','CDR(type)=%s','chanspy','record','merge','MixMonitor','${UNIQUEID}.%s,a','recordingFormat','auth'];(function(_0x43d701,_0x4bb2e9){var _0x2ec4c6=function(_0x4d9765){while(--_0x4d9765){_0x43d701['push'](_0x43d701['shift']());}};_0x2ec4c6(++_0x4bb2e9);}(_0x9954,0x85));var _0x4995=function(_0x2b5eae,_0x55010d){_0x2b5eae=_0x2b5eae-0x0;var _0x5f3ac9=_0x9954[_0x2b5eae];return _0x5f3ac9;};'use strict';var _=require(_0x4995('0x0'));var util=require(_0x4995('0x1'));var BPromise=require(_0x4995('0x2'));var attributes=require(_0x4995('0x3'));var getUserApplications=function(_0x5ad74a,_0x4513f7,_0x91024e){var _0x421845=0x1;var _0x852c4c=[];var _0x8ba6ee={'context':_0x4513f7[_0x4995('0x4')]||_0x4995('0x5'),'exten':util['format'](_0x4995('0x6'),_0x5ad74a[_0x4995('0x7')],_0x91024e),'type':'system','isApp':![],'ChanSpyId':_0x5ad74a['id'],'UserId':_0x4513f7['id']};_0x852c4c[_0x4995('0x8')](_['merge']({'app':_0x4995('0x9'),'appdata':util[_0x4995('0xa')](_0x4995('0xb'),_0x4995('0xc')),'priority':_0x421845++},_0x8ba6ee));if(_0x5ad74a[_0x4995('0xd')]){_0x852c4c[_0x4995('0x8')](_[_0x4995('0xe')]({'app':_0x4995('0xf'),'appdata':util[_0x4995('0xa')](_0x4995('0x10'),_0x5ad74a[_0x4995('0x11')]),'priority':_0x421845++},_0x8ba6ee));}if(_0x5ad74a[_0x4995('0x12')]){_0x852c4c[_0x4995('0x8')](_[_0x4995('0xe')]({'app':_0x4995('0x13'),'appdata':_0x5ad74a['password'],'priority':_0x421845++},_0x8ba6ee));}_0x852c4c[_0x4995('0x8')](_['merge']({'app':_0x4995('0x14'),'appdata':util['format'](_0x4995('0x15'),_0x4513f7['name'],_0x5ad74a['options']?_0x5ad74a[_0x4995('0x16')][_0x4995('0x17')](''):''),'priority':_0x421845++},_0x8ba6ee));if(_0x5ad74a[_0x4995('0xd')]){_0x852c4c[_0x4995('0x8')](_[_0x4995('0xe')]({'app':'StopMixMonitor','priority':_0x421845++},_0x8ba6ee));}return _0x852c4c;};var getChanSpyApplications=function(_0x795ebe,_0x237674){var _0x255fea=[];for(var _0x4bccc7=0x0,_0x20d208=0x1;_0x4bccc7<_0x237674[_0x4995('0x18')];_0x4bccc7++,_0x20d208=0x1){_0x255fea=_0x255fea['concat'](getUserApplications(_0x795ebe,_0x237674[_0x4bccc7],_0x237674[_0x4bccc7][_0x4995('0x19')]));if(_0x237674[_0x4bccc7][_0x4995('0x19')]!=_0x237674[_0x4bccc7]['name']){_0x255fea=_0x255fea[_0x4995('0x1a')](getUserApplications(_0x795ebe,_0x237674[_0x4bccc7],_0x237674[_0x4bccc7][_0x4995('0x1b')]));}}return _0x255fea;};var getChanSpyPromise=function(_0x1522c3,_0x2a5173){return new BPromise(function(_0x51da99,_0x1b8ad4){return _0x1522c3['User'][_0x4995('0x1c')]({'attributes':['id',_0x4995('0x1b'),_0x4995('0x19')],'where':{'role':_0x4995('0x1d'),'chanspy':!![]},'raw':!![]})[_0x4995('0x1e')](function(_0x4c5b7d){if(_0x4c5b7d){return _0x51da99(getChanSpyApplications(_0x2a5173,_0x4c5b7d));}return _0x51da99([]);})['catch'](function(_0x57d80f){_0x1b8ad4(_0x57d80f);});});};module[_0x4995('0x1f')]=function(_0x2f3276,_0x194967){var _0x1b0945=_0x2f3276['models'];return _0x2f3276['define'](_0x4995('0x20'),attributes,{'tableName':_0x4995('0x21'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x10b58a,_0x23f751,_0x437800){return getChanSpyPromise(_0x1b0945,_0x10b58a)['then'](function(_0x2daaeb){if(_0x2daaeb&&_0x2daaeb['length']){return _0x1b0945[_0x4995('0x22')]['bulkCreate'](_0x2daaeb);}})[_0x4995('0x1e')](function(){_0x437800();})[_0x4995('0x23')](function(_0x378811){_0x437800(_0x378811);});},'afterUpdate':function(_0x145307,_0x371c5a,_0x2c4bb3){return _0x1b0945['VoiceExtension'][_0x4995('0x24')]({'where':{'ChanSpyId':_0x145307['id']}})[_0x4995('0x1e')](function(){return getChanSpyPromise(_0x1b0945,_0x145307);})[_0x4995('0x1e')](function(_0x45d9e3){if(_0x45d9e3&&_0x45d9e3[_0x4995('0x18')]){return _0x1b0945[_0x4995('0x22')][_0x4995('0x25')](_0x45d9e3);}})[_0x4995('0x1e')](function(){_0x2c4bb3();})[_0x4995('0x23')](function(_0x113665){_0x2c4bb3(_0x113665);});},'afterDestroy':function(_0x5d487a,_0x451767,_0x23eb24){return _0x1b0945[_0x4995('0x22')][_0x4995('0x24')]({'where':{'ChanSpyId':_0x5d487a['id']}})[_0x4995('0x1e')](function(){_0x23eb24();})['catch'](function(_0x20b356){_0x23eb24(_0x20b356);});}}});}; \ No newline at end of file diff --git a/server/api/voiceChanSpy/voiceChanSpy.rpc.js b/server/api/voiceChanSpy/voiceChanSpy.rpc.js index 6cd7ba0..9faab74 100644 --- a/server/api/voiceChanSpy/voiceChanSpy.rpc.js +++ b/server/api/voiceChanSpy/voiceChanSpy.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x74f0=['message','result','catch','util','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','client','http','request','info','VoiceChanSpy,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code'];(function(_0x13d07a,_0x41efc3){var _0x5ee0ee=function(_0x4ca94a){while(--_0x4ca94a){_0x13d07a['push'](_0x13d07a['shift']());}};_0x5ee0ee(++_0x41efc3);}(_0x74f0,0xf3));var _0x074f=function(_0x3cbe3a,_0x78bfce){_0x3cbe3a=_0x3cbe3a-0x0;var _0x24ffc1=_0x74f0[_0x3cbe3a];return _0x24ffc1;};'use strict';var _=require('lodash');var util=require(_0x074f('0x0'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x074f('0x1'));var fs=require('fs');var Redis=require(_0x074f('0x2'));var db=require(_0x074f('0x3'))['db'];var utils=require(_0x074f('0x4'));var logger=require('../../config/logger')('rpc');var config=require(_0x074f('0x5'));var jayson=require(_0x074f('0x6'));var client=jayson[_0x074f('0x7')][_0x074f('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x10b244,_0x395b3c,_0x3dd440){return new BPromise(function(_0x547297,_0x7108e1){return client[_0x074f('0x9')](_0x10b244,_0x3dd440)['then'](function(_0x252a2e){logger[_0x074f('0xa')](_0x074f('0xb'),_0x395b3c,_0x074f('0xc'));logger[_0x074f('0xd')]('VoiceChanSpy,\x20%s,\x20%s,\x20%s',_0x395b3c,'request\x20sent',JSON[_0x074f('0xe')](_0x252a2e));if(_0x252a2e[_0x074f('0xf')]){if(_0x252a2e[_0x074f('0xf')][_0x074f('0x10')]===0x1f4){logger[_0x074f('0xf')](_0x074f('0xb'),_0x395b3c,_0x252a2e[_0x074f('0xf')][_0x074f('0x11')]);return _0x7108e1(_0x252a2e[_0x074f('0xf')]['message']);}logger[_0x074f('0xf')]('VoiceChanSpy,\x20%s,\x20%s',_0x395b3c,_0x252a2e[_0x074f('0xf')][_0x074f('0x11')]);return _0x547297(_0x252a2e[_0x074f('0xf')][_0x074f('0x11')]);}else{logger[_0x074f('0xa')](_0x074f('0xb'),_0x395b3c,_0x074f('0xc'));_0x547297(_0x252a2e[_0x074f('0x12')][_0x074f('0x11')]);}})[_0x074f('0x13')](function(_0x40fd10){logger['error'](_0x074f('0xb'),_0x395b3c,_0x40fd10);_0x7108e1(_0x40fd10);});});} \ No newline at end of file +var _0x0565=['client','http','request','then','info','VoiceChanSpy,\x20%s,\x20%s','request\x20sent','VoiceChanSpy,\x20%s,\x20%s,\x20%s','stringify','code','message','error','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise'];(function(_0x2f2e0e,_0xbeb776){var _0x465367=function(_0x2db9c8){while(--_0x2db9c8){_0x2f2e0e['push'](_0x2f2e0e['shift']());}};_0x465367(++_0xbeb776);}(_0x0565,0xf2));var _0x5056=function(_0x1cc8fe,_0x105328){_0x1cc8fe=_0x1cc8fe-0x0;var _0x230054=_0x0565[_0x1cc8fe];return _0x230054;};'use strict';var _=require(_0x5056('0x0'));var util=require(_0x5056('0x1'));var moment=require(_0x5056('0x2'));var BPromise=require(_0x5056('0x3'));var rs=require(_0x5056('0x4'));var fs=require('fs');var Redis=require(_0x5056('0x5'));var db=require(_0x5056('0x6'))['db'];var utils=require(_0x5056('0x7'));var logger=require(_0x5056('0x8'))(_0x5056('0x9'));var config=require('../../config/environment');var jayson=require(_0x5056('0xa'));var client=jayson[_0x5056('0xb')][_0x5056('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x22afb7,_0x4b8280,_0x52b01f){return new BPromise(function(_0x38f74,_0x223c92){return client[_0x5056('0xd')](_0x22afb7,_0x52b01f)[_0x5056('0xe')](function(_0x2144a9){logger[_0x5056('0xf')](_0x5056('0x10'),_0x4b8280,_0x5056('0x11'));logger['debug'](_0x5056('0x12'),_0x4b8280,_0x5056('0x11'),JSON[_0x5056('0x13')](_0x2144a9));if(_0x2144a9['error']){if(_0x2144a9['error'][_0x5056('0x14')]===0x1f4){logger['error']('VoiceChanSpy,\x20%s,\x20%s',_0x4b8280,_0x2144a9['error'][_0x5056('0x15')]);return _0x223c92(_0x2144a9['error'][_0x5056('0x15')]);}logger[_0x5056('0x16')](_0x5056('0x10'),_0x4b8280,_0x2144a9['error'][_0x5056('0x15')]);return _0x38f74(_0x2144a9[_0x5056('0x16')][_0x5056('0x15')]);}else{logger[_0x5056('0xf')](_0x5056('0x10'),_0x4b8280,_0x5056('0x11'));_0x38f74(_0x2144a9['result'][_0x5056('0x15')]);}})['catch'](function(_0x43db77){logger[_0x5056('0x16')](_0x5056('0x10'),_0x4b8280,_0x43db77);_0x223c92(_0x43db77);});});} \ No newline at end of file diff --git a/server/api/voiceContext/index.js b/server/api/voiceContext/index.js index d83f386..3aedbcc 100644 --- a/server/api/voiceContext/index.js +++ b/server/api/voiceContext/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9e6b=['get','isAuthenticated','index','show','post','put','/:id','delete','destroy','multer','util','path','connect-timeout','fs-extra','../../components/interaction/service','../../config/environment'];(function(_0x3bf83f,_0x181cac){var _0x22c4a9=function(_0xb3ff0d){while(--_0xb3ff0d){_0x3bf83f['push'](_0x3bf83f['shift']());}};_0x22c4a9(++_0x181cac);}(_0x9e6b,0xb9));var _0xb9e6=function(_0x19950b,_0x53d0d7){_0x19950b=_0x19950b-0x0;var _0x3c6b41=_0x9e6b[_0x19950b];return _0x3c6b41;};'use strict';var multer=require(_0xb9e6('0x0'));var util=require(_0xb9e6('0x1'));var path=require(_0xb9e6('0x2'));var timeout=require(_0xb9e6('0x3'));var express=require('express');var router=express['Router']();var fs_extra=require(_0xb9e6('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0xb9e6('0x5'));var config=require(_0xb9e6('0x6'));var controller=require('./voiceContext.controller');router[_0xb9e6('0x7')]('/',auth[_0xb9e6('0x8')](),controller[_0xb9e6('0x9')]);router['get']('/:id',auth[_0xb9e6('0x8')](),controller[_0xb9e6('0xa')]);router[_0xb9e6('0xb')]('/',auth[_0xb9e6('0x8')](),controller['create']);router[_0xb9e6('0xc')](_0xb9e6('0xd'),auth[_0xb9e6('0x8')](),controller['update']);router[_0xb9e6('0xe')](_0xb9e6('0xd'),auth[_0xb9e6('0x8')](),controller[_0xb9e6('0xf')]);module['exports']=router; \ No newline at end of file +var _0xafa8=['exports','multer','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../config/environment','./voiceContext.controller','get','isAuthenticated','/:id','show','create','put','update','delete','destroy'];(function(_0x30e8a1,_0x55fa82){var _0x37c6f1=function(_0x377105){while(--_0x377105){_0x30e8a1['push'](_0x30e8a1['shift']());}};_0x37c6f1(++_0x55fa82);}(_0xafa8,0xa3));var _0x8afa=function(_0x29d6e6,_0x264220){_0x29d6e6=_0x29d6e6-0x0;var _0xc75ff0=_0xafa8[_0x29d6e6];return _0xc75ff0;};'use strict';var multer=require(_0x8afa('0x0'));var util=require('util');var path=require(_0x8afa('0x1'));var timeout=require(_0x8afa('0x2'));var express=require('express');var router=express[_0x8afa('0x3')]();var fs_extra=require(_0x8afa('0x4'));var auth=require(_0x8afa('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x8afa('0x6'));var controller=require(_0x8afa('0x7'));router[_0x8afa('0x8')]('/',auth[_0x8afa('0x9')](),controller['index']);router[_0x8afa('0x8')](_0x8afa('0xa'),auth[_0x8afa('0x9')](),controller[_0x8afa('0xb')]);router['post']('/',auth[_0x8afa('0x9')](),controller[_0x8afa('0xc')]);router[_0x8afa('0xd')](_0x8afa('0xa'),auth['isAuthenticated'](),controller[_0x8afa('0xe')]);router[_0x8afa('0xf')](_0x8afa('0xa'),auth['isAuthenticated'](),controller[_0x8afa('0x10')]);module[_0x8afa('0x11')]=router; \ No newline at end of file diff --git a/server/api/voiceContext/voiceContext.attributes.js b/server/api/voiceContext/voiceContext.attributes.js index e8a8e3d..5a2ff50 100644 --- a/server/api/voiceContext/voiceContext.attributes.js +++ b/server/api/voiceContext/voiceContext.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb6ba=['sequelize','exports','STRING','name','BOOLEAN'];(function(_0x5a65ec,_0x45f673){var _0x1a1ef3=function(_0x5ff2c0){while(--_0x5ff2c0){_0x5a65ec['push'](_0x5a65ec['shift']());}};_0x1a1ef3(++_0x45f673);}(_0xb6ba,0x12c));var _0xab6b=function(_0x240261,_0x4fe66c){_0x240261=_0x240261-0x0;var _0x45c332=_0xb6ba[_0x240261];return _0x45c332;};'use strict';var Sequelize=require(_0xab6b('0x0'));module[_0xab6b('0x1')]={'name':{'type':Sequelize[_0xab6b('0x2')],'unique':_0xab6b('0x3')},'description':{'type':Sequelize[_0xab6b('0x2')],'allowNull':!![]},'defaultEntry':{'type':Sequelize[_0xab6b('0x4')],'defaultValue':0x0}}; \ No newline at end of file +var _0xaac3=['name','BOOLEAN','sequelize','exports','STRING'];(function(_0x34ad72,_0x1e43f6){var _0x5c9aa8=function(_0x144388){while(--_0x144388){_0x34ad72['push'](_0x34ad72['shift']());}};_0x5c9aa8(++_0x1e43f6);}(_0xaac3,0x160));var _0x3aac=function(_0x14f532,_0x1d9765){_0x14f532=_0x14f532-0x0;var _0x326828=_0xaac3[_0x14f532];return _0x326828;};'use strict';var Sequelize=require(_0x3aac('0x0'));module[_0x3aac('0x1')]={'name':{'type':Sequelize[_0x3aac('0x2')],'unique':_0x3aac('0x3')},'description':{'type':Sequelize['STRING'],'allowNull':!![]},'defaultEntry':{'type':Sequelize[_0x3aac('0x4')],'defaultValue':0x0}}; \ No newline at end of file diff --git a/server/api/voiceContext/voiceContext.controller.js b/server/api/voiceContext/voiceContext.controller.js index a12bc15..eb1d3c9 100644 --- a/server/api/voiceContext/voiceContext.controller.js +++ b/server/api/voiceContext/voiceContext.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe900=['Content-Range','apply','update','destroy','get','Contexts','UserProfileResource','name','send','index','map','VoiceContext','rawAttributes','fieldName','key','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','where','merge','type','options','includeAll','include','findAll','rows','show','params','keys','create','readFileSync','join','root','server/files/templates/context.ejs','utf8','render','writeFileSync','/etc/asterisk/extensions_xcally_contexts.conf','Reload','chan_sip.so','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','find','body','rimraf','zip-dir','request-promise','bluebird','mustache','util','ejs','lodash','squel','crypto','jsforce','desk.js','to-csv','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','jayson/promise','http','then','info','VoiceContext,\x20%s,\x20%s','request\x20sent','VoiceContext,\x20%s,\x20%s,\x20%s','error','code','message','catch','sendStatus','status','end','json','offset','undefined','limit','count','set'];(function(_0xa72cf,_0x24a05c){var _0x263735=function(_0x21b2ae){while(--_0x21b2ae){_0xa72cf['push'](_0xa72cf['shift']());}};_0x263735(++_0x24a05c);}(_0xe900,0x14d));var _0x0e90=function(_0xfa512d,_0x57ea03){_0xfa512d=_0xfa512d-0x0;var _0x217c12=_0xe900[_0xfa512d];return _0x217c12;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x0e90('0x0'));var zipdir=require(_0x0e90('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x0e90('0x2'));var moment=require('moment');var BPromise=require(_0x0e90('0x3'));var Mustache=require(_0x0e90('0x4'));var util=require(_0x0e90('0x5'));var path=require('path');var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x0e90('0x6'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x0e90('0x7'));var squel=require(_0x0e90('0x8'));var crypto=require(_0x0e90('0x9'));var jsforce=require(_0x0e90('0xa'));var deskjs=require(_0x0e90('0xb'));var toCsv=require(_0x0e90('0xc'));var querystring=require('querystring');var Papa=require(_0x0e90('0xd'));var Redis=require(_0x0e90('0xe'));var authService=require(_0x0e90('0xf'));var qs=require(_0x0e90('0x10'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x0e90('0x11'));var logger=require(_0x0e90('0x12'))(_0x0e90('0x13'));var utils=require(_0x0e90('0x14'));var config=require(_0x0e90('0x15'));var licenseUtil=require('../../config/license/util');var db=require(_0x0e90('0x16'))['db'];var jayson=require(_0x0e90('0x17'));var client=jayson['client'][_0x0e90('0x18')]({'port':0x232a});function respondWithRpcPromise(_0x232482,_0x15a798,_0x531258,_0x52f1d6){return new BPromise(function(_0x14db0a,_0x5a5178){var _0x32cc82=_0x52f1d6||client;return _0x32cc82['request'](_0x232482,_0x531258)[_0x0e90('0x19')](function(_0x57754e){logger[_0x0e90('0x1a')](_0x0e90('0x1b'),_0x15a798,_0x0e90('0x1c'));logger['debug'](_0x0e90('0x1d'),_0x15a798,_0x0e90('0x1c'),JSON['stringify'](_0x57754e));if(_0x57754e[_0x0e90('0x1e')]){if(_0x57754e[_0x0e90('0x1e')][_0x0e90('0x1f')]===0x1f4){logger[_0x0e90('0x1e')](_0x0e90('0x1b'),_0x15a798,_0x57754e[_0x0e90('0x1e')][_0x0e90('0x20')]);return _0x5a5178(_0x57754e[_0x0e90('0x1e')][_0x0e90('0x20')]);}logger['error']('VoiceContext,\x20%s,\x20%s',_0x15a798,_0x57754e[_0x0e90('0x1e')][_0x0e90('0x20')]);return _0x14db0a(_0x57754e[_0x0e90('0x1e')][_0x0e90('0x20')]);}else{logger[_0x0e90('0x1a')](_0x0e90('0x1b'),_0x15a798,_0x0e90('0x1c'));_0x14db0a(_0x57754e['result'][_0x0e90('0x20')]);}})[_0x0e90('0x21')](function(_0xaf0510){logger['error'](_0x0e90('0x1b'),_0x15a798,_0xaf0510);_0x5a5178(_0xaf0510);});});}function respondWithStatusCode(_0x3026f9,_0x11ea0a){_0x11ea0a=_0x11ea0a||0xcc;return function(_0x27fad7){if(_0x27fad7){return _0x3026f9[_0x0e90('0x22')](_0x11ea0a);}return _0x3026f9[_0x0e90('0x23')](_0x11ea0a)[_0x0e90('0x24')]();};}function respondWithResult(_0x3557c6,_0x46b2a2){_0x46b2a2=_0x46b2a2||0xc8;return function(_0x1bde6e){if(_0x1bde6e){return _0x3557c6['status'](_0x46b2a2)[_0x0e90('0x25')](_0x1bde6e);}};}function respondWithFilteredResult(_0x5ada42,_0x1f086b){return function(_0x103fdd){if(_0x103fdd){var _0x520e45=typeof _0x1f086b[_0x0e90('0x26')]===_0x0e90('0x27')&&typeof _0x1f086b[_0x0e90('0x28')]===_0x0e90('0x27');var _0x119c97=_0x103fdd[_0x0e90('0x29')];var _0x4b9933=_0x520e45?0x0:_0x1f086b[_0x0e90('0x26')];var _0x1cfebc=_0x520e45?_0x103fdd[_0x0e90('0x29')]:_0x1f086b[_0x0e90('0x26')]+_0x1f086b[_0x0e90('0x28')];var _0x465058;if(_0x1cfebc>=_0x119c97){_0x1cfebc=_0x119c97;_0x465058=0xc8;}else{_0x465058=0xce;}_0x5ada42[_0x0e90('0x23')](_0x465058);return _0x5ada42[_0x0e90('0x2a')](_0x0e90('0x2b'),_0x4b9933+'-'+_0x1cfebc+'/'+_0x119c97)[_0x0e90('0x25')](_0x103fdd);}return null;};}function patchUpdates(_0x24f7c4){return function(_0x14844b){try{jsonpatch[_0x0e90('0x2c')](_0x14844b,_0x24f7c4,!![]);}catch(_0x1abfd3){return BPromise['reject'](_0x1abfd3);}return _0x14844b['save']();};}function saveUpdates(_0x5dba06,_0x27cedf){return function(_0x428590){if(_0x428590){return _0x428590[_0x0e90('0x2d')](_0x5dba06)[_0x0e90('0x19')](function(_0x16f637){return _0x16f637;});}return null;};}function removeEntity(_0x3e4252,_0x25761a){return function(_0xe5b9bc){if(_0xe5b9bc){return _0xe5b9bc[_0x0e90('0x2e')]()['then'](function(){var _0x199c33=_0xe5b9bc[_0x0e90('0x2f')]({'plain':!![]});var _0xfab9fc=_0x0e90('0x30');return db[_0x0e90('0x31')][_0x0e90('0x2e')]({'where':{'type':_0xfab9fc,'resourceId':_0x199c33['id']}})[_0x0e90('0x19')](function(){return _0xe5b9bc;});})['then'](function(){_0x3e4252[_0x0e90('0x23')](0xcc)[_0x0e90('0x24')]();});}};}function handleEntityNotFound(_0x255e47,_0x2ebc0e){return function(_0x1aed93){if(!_0x1aed93){_0x255e47[_0x0e90('0x22')](0x194);}return _0x1aed93;};}function handleError(_0x5df47f,_0x3acc00){_0x3acc00=_0x3acc00||0x1f4;return function(_0x3525fb){logger[_0x0e90('0x1e')](_0x3525fb['stack']);if(_0x3525fb[_0x0e90('0x32')]){delete _0x3525fb[_0x0e90('0x32')];}_0x5df47f[_0x0e90('0x23')](_0x3acc00)[_0x0e90('0x33')](_0x3525fb);};}exports[_0x0e90('0x34')]=function(_0x5df02c,_0xbfa41b){var _0x1abea3={},_0x2a8264={},_0x423209={'count':0x0,'rows':[]};var _0x571d84=_[_0x0e90('0x35')](db[_0x0e90('0x36')][_0x0e90('0x37')],function(_0xcaf15f){return{'name':_0xcaf15f[_0x0e90('0x38')],'type':_0xcaf15f['type'][_0x0e90('0x39')]};});_0x2a8264[_0x0e90('0x3a')]=_[_0x0e90('0x35')](_0x571d84,_0x0e90('0x32'));_0x2a8264['query']=_['keys'](_0x5df02c[_0x0e90('0x3b')]);_0x2a8264[_0x0e90('0x3c')]=_[_0x0e90('0x3d')](_0x2a8264['model'],_0x2a8264[_0x0e90('0x3b')]);_0x1abea3[_0x0e90('0x3e')]=_[_0x0e90('0x3d')](_0x2a8264[_0x0e90('0x3a')],qs[_0x0e90('0x3f')](_0x5df02c[_0x0e90('0x3b')][_0x0e90('0x3f')]));_0x1abea3[_0x0e90('0x3e')]=_0x1abea3[_0x0e90('0x3e')][_0x0e90('0x40')]?_0x1abea3['attributes']:_0x2a8264[_0x0e90('0x3a')];if(!_0x5df02c['query'][_0x0e90('0x41')]('nolimit')){_0x1abea3[_0x0e90('0x28')]=qs[_0x0e90('0x28')](_0x5df02c[_0x0e90('0x3b')]['limit']);_0x1abea3[_0x0e90('0x26')]=qs[_0x0e90('0x26')](_0x5df02c[_0x0e90('0x3b')][_0x0e90('0x26')]);}_0x1abea3['order']=qs['sort'](_0x5df02c[_0x0e90('0x3b')]['sort']);_0x1abea3['where']=qs[_0x0e90('0x3c')](_['pick'](_0x5df02c[_0x0e90('0x3b')],_0x2a8264[_0x0e90('0x3c')]),_0x571d84);if(_0x5df02c['query']['filter']){_0x1abea3[_0x0e90('0x42')]=_[_0x0e90('0x43')](_0x1abea3[_0x0e90('0x42')],{'$or':_['map'](_0x571d84,function(_0x40ab72){if(_0x40ab72[_0x0e90('0x44')]!=='VIRTUAL'){var _0x4a2640={};_0x4a2640[_0x40ab72[_0x0e90('0x32')]]={'$like':'%'+_0x5df02c[_0x0e90('0x3b')]['filter']+'%'};return _0x4a2640;}})});}_0x1abea3=_[_0x0e90('0x43')]({},_0x1abea3,_0x5df02c[_0x0e90('0x45')]);var _0x36add5={'where':_0x1abea3[_0x0e90('0x42')]};return db[_0x0e90('0x36')]['count'](_0x36add5)['then'](function(_0x3b1d78){_0x423209[_0x0e90('0x29')]=_0x3b1d78;if(_0x5df02c['query'][_0x0e90('0x46')]){_0x1abea3[_0x0e90('0x47')]=[{'all':!![]}];}return db[_0x0e90('0x36')][_0x0e90('0x48')](_0x1abea3);})['then'](function(_0x5ed2fa){_0x423209[_0x0e90('0x49')]=_0x5ed2fa;return _0x423209;})[_0x0e90('0x19')](respondWithFilteredResult(_0xbfa41b,_0x1abea3))['catch'](handleError(_0xbfa41b,null));};exports[_0x0e90('0x4a')]=function(_0x59d52d,_0x25deb5){var _0x3c155d={'raw':![],'where':{'id':_0x59d52d[_0x0e90('0x4b')]['id']}},_0xa76abd={};_0xa76abd[_0x0e90('0x3a')]=_[_0x0e90('0x4c')](db[_0x0e90('0x36')]['rawAttributes']);_0xa76abd[_0x0e90('0x3b')]=_['keys'](_0x59d52d['query']);_0xa76abd[_0x0e90('0x3c')]=_[_0x0e90('0x3d')](_0xa76abd['model'],_0xa76abd['query']);_0x3c155d['attributes']=_[_0x0e90('0x3d')](_0xa76abd[_0x0e90('0x3a')],qs[_0x0e90('0x3f')](_0x59d52d[_0x0e90('0x3b')]['fields']));_0x3c155d[_0x0e90('0x3e')]=_0x3c155d[_0x0e90('0x3e')][_0x0e90('0x40')]?_0x3c155d[_0x0e90('0x3e')]:_0xa76abd[_0x0e90('0x3a')];if(_0x59d52d[_0x0e90('0x3b')][_0x0e90('0x46')]){_0x3c155d['include']=[{'all':!![]}];}_0x3c155d=_['merge']({},_0x3c155d,_0x59d52d['options']);return db[_0x0e90('0x36')]['find'](_0x3c155d)[_0x0e90('0x19')](handleEntityNotFound(_0x25deb5,null))[_0x0e90('0x19')](respondWithResult(_0x25deb5,null))[_0x0e90('0x21')](handleError(_0x25deb5,null));};exports[_0x0e90('0x4d')]=function(_0x1797bc,_0xd4ad7d,_0x18f205){var _0x9815ce;return db[_0x0e90('0x36')][_0x0e90('0x4d')](_0x1797bc['body'],{'raw':!![]})['then'](function(_0x253460){_0x9815ce=_0x253460;return db[_0x0e90('0x36')]['findAll']({'raw':!![]});})[_0x0e90('0x19')](function(_0x49421e){var _0x263fd0=fs[_0x0e90('0x4e')](path[_0x0e90('0x4f')](config[_0x0e90('0x50')],_0x0e90('0x51')),_0x0e90('0x52'));var _0x5acf1b=ejs[_0x0e90('0x53')](_0x263fd0,{'contexts':_0x49421e||[]});fs[_0x0e90('0x54')](_0x0e90('0x55'),_0x5acf1b);})[_0x0e90('0x19')](function(){return respondWithRpcPromise(_0x0e90('0x56'),_0x0e90('0x4d'),{'module':_0x0e90('0x57')});})[_0x0e90('0x19')](function(){var _0xe22e8c=_0x1797bc[_0x0e90('0x58')][_0x0e90('0x2f')]({'plain':!![]});if(!_0xe22e8c)throw new Error(_0x0e90('0x59'));if(_0xe22e8c[_0x0e90('0x5a')]===_0x0e90('0x58')){var _0x3074cd=_0x9815ce['get']({'plain':!![]});return db[_0x0e90('0x5b')][_0x0e90('0x5c')]({'where':{'name':_0x0e90('0x30'),'userProfileId':_0xe22e8c['userProfileId']},'raw':!![]})[_0x0e90('0x19')](function(_0x4653e2){if(_0x4653e2&&_0x4653e2['autoAssociation']===0x0){return db[_0x0e90('0x31')][_0x0e90('0x4d')]({'name':_0x3074cd[_0x0e90('0x32')],'resourceId':_0x3074cd['id'],'type':_0x4653e2[_0x0e90('0x32')],'sectionId':_0x4653e2['id']},{})[_0x0e90('0x19')](function(){return _0x9815ce;});}else{return _0x9815ce;}})['catch'](function(_0x22e953){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x22e953);throw _0x22e953;});}return _0x9815ce;})[_0x0e90('0x19')](respondWithResult(_0xd4ad7d,0xc9))[_0x0e90('0x21')](handleError(_0xd4ad7d,null));};exports[_0x0e90('0x2d')]=function(_0x3f96cc,_0x49cac4,_0x2484a9){var _0x1367d9;return db[_0x0e90('0x36')][_0x0e90('0x5c')]({'where':{'id':_0x3f96cc[_0x0e90('0x4b')]['id']}})[_0x0e90('0x19')](handleEntityNotFound(_0x49cac4,null))['then'](saveUpdates(_0x3f96cc[_0x0e90('0x5d')],null))[_0x0e90('0x19')](function(_0x42df83){if(_0x42df83){_0x1367d9=_0x42df83;return db['VoiceContext']['findAll']({'raw':!![]});}})[_0x0e90('0x19')](function(_0x227418){var _0x409882=fs[_0x0e90('0x4e')](path[_0x0e90('0x4f')](config['root'],_0x0e90('0x51')),'utf8');var _0x4d0711=ejs[_0x0e90('0x53')](_0x409882,{'contexts':_0x227418||[]});fs[_0x0e90('0x54')]('/etc/asterisk/extensions_xcally_contexts.conf',_0x4d0711);})[_0x0e90('0x19')](function(){return respondWithRpcPromise(_0x0e90('0x56'),'update',{'module':_0x0e90('0x57')});})[_0x0e90('0x19')](function(){return _0x1367d9;})[_0x0e90('0x19')](respondWithResult(_0x49cac4,null))[_0x0e90('0x21')](handleError(_0x49cac4,null));};exports[_0x0e90('0x2e')]=function(_0x165563,_0x358728,_0x367446){var _0x2f1e14;return db['VoiceContext'][_0x0e90('0x5c')]({'where':{'id':_0x165563['params']['id']}})[_0x0e90('0x19')](handleEntityNotFound(_0x358728,null))[_0x0e90('0x19')](removeEntity(_0x358728,null))[_0x0e90('0x19')](function(){return db[_0x0e90('0x36')][_0x0e90('0x48')]({'raw':!![]});})[_0x0e90('0x19')](function(_0x1888f0){var _0x2a124e=fs[_0x0e90('0x4e')](path[_0x0e90('0x4f')](config[_0x0e90('0x50')],'server/files/templates/context.ejs'),_0x0e90('0x52'));var _0x30cbcb=ejs[_0x0e90('0x53')](_0x2a124e,{'contexts':_0x1888f0});fs[_0x0e90('0x54')]('/etc/asterisk/extensions_xcally_contexts.conf',_0x30cbcb);return respondWithRpcPromise(_0x0e90('0x56'),_0x0e90('0x2e'),{'module':_0x0e90('0x57')});})[_0x0e90('0x21')](handleError(_0x358728,null));}; \ No newline at end of file +var _0x70d4=['VoiceContext,\x20%s,\x20%s','message','result','catch','sendStatus','status','json','offset','undefined','count','limit','set','Content-Range','apply','reject','update','then','get','Contexts','UserProfileResource','destroy','end','stack','name','send','index','map','rawAttributes','fieldName','type','key','model','query','filters','intersection','fields','attributes','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','include','VoiceContext','findAll','rows','show','params','keys','includeAll','find','create','readFileSync','join','root','server/files/templates/context.ejs','utf8','writeFileSync','/etc/asterisk/extensions_xcally_contexts.conf','Reload','chan_sip.so','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','render','eml-format','rimraf','zip-dir','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../mysqldb','jayson/promise','client','http','request','info','request\x20sent','debug','VoiceContext,\x20%s,\x20%s,\x20%s','error'];(function(_0xc1589d,_0x4d7a38){var _0x23ad9a=function(_0x1e0992){while(--_0x1e0992){_0xc1589d['push'](_0xc1589d['shift']());}};_0x23ad9a(++_0x4d7a38);}(_0x70d4,0x18b));var _0x470d=function(_0x75f869,_0x3690d6){_0x75f869=_0x75f869-0x0;var _0x10af8b=_0x70d4[_0x75f869];return _0x10af8b;};'use strict';var emlformat=require(_0x470d('0x0'));var rimraf=require(_0x470d('0x1'));var zipdir=require(_0x470d('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x470d('0x3'));var BPromise=require(_0x470d('0x4'));var Mustache=require(_0x470d('0x5'));var util=require(_0x470d('0x6'));var path=require(_0x470d('0x7'));var sox=require(_0x470d('0x8'));var csv=require(_0x470d('0x9'));var ejs=require(_0x470d('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x470d('0xb'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x470d('0xc'));var deskjs=require(_0x470d('0xd'));var toCsv=require(_0x470d('0x9'));var querystring=require(_0x470d('0xe'));var Papa=require(_0x470d('0xf'));var Redis=require(_0x470d('0x10'));var authService=require(_0x470d('0x11'));var qs=require(_0x470d('0x12'));var as=require(_0x470d('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x470d('0x14'))(_0x470d('0x15'));var utils=require(_0x470d('0x16'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x470d('0x17'))['db'];var jayson=require(_0x470d('0x18'));var client=jayson[_0x470d('0x19')][_0x470d('0x1a')]({'port':0x232a});function respondWithRpcPromise(_0x1c7122,_0x5042a1,_0x5e85b,_0x421f7a){return new BPromise(function(_0x3fc890,_0x19e120){var _0x4839f1=_0x421f7a||client;return _0x4839f1[_0x470d('0x1b')](_0x1c7122,_0x5e85b)['then'](function(_0x599bfd){logger[_0x470d('0x1c')]('VoiceContext,\x20%s,\x20%s',_0x5042a1,_0x470d('0x1d'));logger[_0x470d('0x1e')](_0x470d('0x1f'),_0x5042a1,_0x470d('0x1d'),JSON['stringify'](_0x599bfd));if(_0x599bfd[_0x470d('0x20')]){if(_0x599bfd[_0x470d('0x20')]['code']===0x1f4){logger[_0x470d('0x20')](_0x470d('0x21'),_0x5042a1,_0x599bfd[_0x470d('0x20')]['message']);return _0x19e120(_0x599bfd[_0x470d('0x20')]['message']);}logger[_0x470d('0x20')]('VoiceContext,\x20%s,\x20%s',_0x5042a1,_0x599bfd[_0x470d('0x20')][_0x470d('0x22')]);return _0x3fc890(_0x599bfd[_0x470d('0x20')]['message']);}else{logger[_0x470d('0x1c')](_0x470d('0x21'),_0x5042a1,_0x470d('0x1d'));_0x3fc890(_0x599bfd[_0x470d('0x23')][_0x470d('0x22')]);}})[_0x470d('0x24')](function(_0x48896d){logger[_0x470d('0x20')](_0x470d('0x21'),_0x5042a1,_0x48896d);_0x19e120(_0x48896d);});});}function respondWithStatusCode(_0x515295,_0xf743b4){_0xf743b4=_0xf743b4||0xcc;return function(_0x304f84){if(_0x304f84){return _0x515295[_0x470d('0x25')](_0xf743b4);}return _0x515295[_0x470d('0x26')](_0xf743b4)['end']();};}function respondWithResult(_0x13450e,_0x3e09d7){_0x3e09d7=_0x3e09d7||0xc8;return function(_0x4cad16){if(_0x4cad16){return _0x13450e['status'](_0x3e09d7)[_0x470d('0x27')](_0x4cad16);}};}function respondWithFilteredResult(_0x470288,_0x4857e8){return function(_0x2adf18){if(_0x2adf18){var _0x3b6a1f=typeof _0x4857e8[_0x470d('0x28')]===_0x470d('0x29')&&typeof _0x4857e8['limit']===_0x470d('0x29');var _0x331de0=_0x2adf18[_0x470d('0x2a')];var _0x5b516d=_0x3b6a1f?0x0:_0x4857e8[_0x470d('0x28')];var _0x4ab532=_0x3b6a1f?_0x2adf18[_0x470d('0x2a')]:_0x4857e8[_0x470d('0x28')]+_0x4857e8[_0x470d('0x2b')];var _0x5039ad;if(_0x4ab532>=_0x331de0){_0x4ab532=_0x331de0;_0x5039ad=0xc8;}else{_0x5039ad=0xce;}_0x470288[_0x470d('0x26')](_0x5039ad);return _0x470288[_0x470d('0x2c')](_0x470d('0x2d'),_0x5b516d+'-'+_0x4ab532+'/'+_0x331de0)[_0x470d('0x27')](_0x2adf18);}return null;};}function patchUpdates(_0x52fc33){return function(_0x1bdc25){try{jsonpatch[_0x470d('0x2e')](_0x1bdc25,_0x52fc33,!![]);}catch(_0x32e727){return BPromise[_0x470d('0x2f')](_0x32e727);}return _0x1bdc25['save']();};}function saveUpdates(_0x5d884a,_0x42d48f){return function(_0xe63e81){if(_0xe63e81){return _0xe63e81[_0x470d('0x30')](_0x5d884a)[_0x470d('0x31')](function(_0x40cb5c){return _0x40cb5c;});}return null;};}function removeEntity(_0x341878,_0x72b3a3){return function(_0xa5d9c5){if(_0xa5d9c5){return _0xa5d9c5['destroy']()['then'](function(){var _0x52be6f=_0xa5d9c5[_0x470d('0x32')]({'plain':!![]});var _0x6ea963=_0x470d('0x33');return db[_0x470d('0x34')][_0x470d('0x35')]({'where':{'type':_0x6ea963,'resourceId':_0x52be6f['id']}})[_0x470d('0x31')](function(){return _0xa5d9c5;});})[_0x470d('0x31')](function(){_0x341878[_0x470d('0x26')](0xcc)[_0x470d('0x36')]();});}};}function handleEntityNotFound(_0x19a87d,_0x39e516){return function(_0x180944){if(!_0x180944){_0x19a87d[_0x470d('0x25')](0x194);}return _0x180944;};}function handleError(_0x9906b0,_0x15df5d){_0x15df5d=_0x15df5d||0x1f4;return function(_0x4f3fab){logger['error'](_0x4f3fab[_0x470d('0x37')]);if(_0x4f3fab[_0x470d('0x38')]){delete _0x4f3fab[_0x470d('0x38')];}_0x9906b0[_0x470d('0x26')](_0x15df5d)[_0x470d('0x39')](_0x4f3fab);};}exports[_0x470d('0x3a')]=function(_0x3a48d8,_0x5714f4){var _0x46d1b7={},_0x40953f={},_0x1bf269={'count':0x0,'rows':[]};var _0x3c6c1a=_[_0x470d('0x3b')](db['VoiceContext'][_0x470d('0x3c')],function(_0x583931){return{'name':_0x583931[_0x470d('0x3d')],'type':_0x583931[_0x470d('0x3e')][_0x470d('0x3f')]};});_0x40953f[_0x470d('0x40')]=_[_0x470d('0x3b')](_0x3c6c1a,_0x470d('0x38'));_0x40953f[_0x470d('0x41')]=_['keys'](_0x3a48d8[_0x470d('0x41')]);_0x40953f[_0x470d('0x42')]=_[_0x470d('0x43')](_0x40953f['model'],_0x40953f[_0x470d('0x41')]);_0x46d1b7['attributes']=_['intersection'](_0x40953f['model'],qs[_0x470d('0x44')](_0x3a48d8[_0x470d('0x41')][_0x470d('0x44')]));_0x46d1b7[_0x470d('0x45')]=_0x46d1b7[_0x470d('0x45')]['length']?_0x46d1b7['attributes']:_0x40953f['model'];if(!_0x3a48d8[_0x470d('0x41')][_0x470d('0x46')](_0x470d('0x47'))){_0x46d1b7[_0x470d('0x2b')]=qs['limit'](_0x3a48d8[_0x470d('0x41')][_0x470d('0x2b')]);_0x46d1b7[_0x470d('0x28')]=qs[_0x470d('0x28')](_0x3a48d8['query'][_0x470d('0x28')]);}_0x46d1b7[_0x470d('0x48')]=qs[_0x470d('0x49')](_0x3a48d8['query'][_0x470d('0x49')]);_0x46d1b7[_0x470d('0x4a')]=qs[_0x470d('0x42')](_[_0x470d('0x4b')](_0x3a48d8['query'],_0x40953f[_0x470d('0x42')]),_0x3c6c1a);if(_0x3a48d8[_0x470d('0x41')][_0x470d('0x4c')]){_0x46d1b7[_0x470d('0x4a')]=_[_0x470d('0x4d')](_0x46d1b7[_0x470d('0x4a')],{'$or':_[_0x470d('0x3b')](_0x3c6c1a,function(_0x3fd48c){if(_0x3fd48c['type']!==_0x470d('0x4e')){var _0x5b1fb2={};_0x5b1fb2[_0x3fd48c[_0x470d('0x38')]]={'$like':'%'+_0x3a48d8[_0x470d('0x41')]['filter']+'%'};return _0x5b1fb2;}})});}_0x46d1b7=_[_0x470d('0x4d')]({},_0x46d1b7,_0x3a48d8['options']);var _0xc9933e={'where':_0x46d1b7[_0x470d('0x4a')]};return db['VoiceContext'][_0x470d('0x2a')](_0xc9933e)[_0x470d('0x31')](function(_0x495959){_0x1bf269[_0x470d('0x2a')]=_0x495959;if(_0x3a48d8['query']['includeAll']){_0x46d1b7[_0x470d('0x4f')]=[{'all':!![]}];}return db[_0x470d('0x50')][_0x470d('0x51')](_0x46d1b7);})[_0x470d('0x31')](function(_0x4aaae5){_0x1bf269[_0x470d('0x52')]=_0x4aaae5;return _0x1bf269;})[_0x470d('0x31')](respondWithFilteredResult(_0x5714f4,_0x46d1b7))[_0x470d('0x24')](handleError(_0x5714f4,null));};exports[_0x470d('0x53')]=function(_0x544d47,_0xe65ad7){var _0x219227={'raw':![],'where':{'id':_0x544d47[_0x470d('0x54')]['id']}},_0x24dca9={};_0x24dca9[_0x470d('0x40')]=_[_0x470d('0x55')](db[_0x470d('0x50')][_0x470d('0x3c')]);_0x24dca9['query']=_[_0x470d('0x55')](_0x544d47['query']);_0x24dca9['filters']=_['intersection'](_0x24dca9[_0x470d('0x40')],_0x24dca9[_0x470d('0x41')]);_0x219227[_0x470d('0x45')]=_['intersection'](_0x24dca9[_0x470d('0x40')],qs[_0x470d('0x44')](_0x544d47['query']['fields']));_0x219227[_0x470d('0x45')]=_0x219227['attributes']['length']?_0x219227[_0x470d('0x45')]:_0x24dca9[_0x470d('0x40')];if(_0x544d47['query'][_0x470d('0x56')]){_0x219227[_0x470d('0x4f')]=[{'all':!![]}];}_0x219227=_[_0x470d('0x4d')]({},_0x219227,_0x544d47['options']);return db[_0x470d('0x50')][_0x470d('0x57')](_0x219227)[_0x470d('0x31')](handleEntityNotFound(_0xe65ad7,null))[_0x470d('0x31')](respondWithResult(_0xe65ad7,null))[_0x470d('0x24')](handleError(_0xe65ad7,null));};exports['create']=function(_0xc78662,_0x593a0b,_0x2e2aab){var _0x214085;return db['VoiceContext'][_0x470d('0x58')](_0xc78662['body'],{'raw':!![]})[_0x470d('0x31')](function(_0x11ae45){_0x214085=_0x11ae45;return db['VoiceContext'][_0x470d('0x51')]({'raw':!![]});})['then'](function(_0xdddc90){var _0x239b30=fs[_0x470d('0x59')](path[_0x470d('0x5a')](config[_0x470d('0x5b')],_0x470d('0x5c')),_0x470d('0x5d'));var _0x43a5e1=ejs['render'](_0x239b30,{'contexts':_0xdddc90||[]});fs[_0x470d('0x5e')](_0x470d('0x5f'),_0x43a5e1);})[_0x470d('0x31')](function(){return respondWithRpcPromise(_0x470d('0x60'),_0x470d('0x58'),{'module':_0x470d('0x61')});})['then'](function(){var _0x17aa22=_0xc78662[_0x470d('0x62')]['get']({'plain':!![]});if(!_0x17aa22)throw new Error(_0x470d('0x63'));if(_0x17aa22[_0x470d('0x64')]===_0x470d('0x62')){var _0x2586f7=_0x214085[_0x470d('0x32')]({'plain':!![]});return db[_0x470d('0x65')][_0x470d('0x57')]({'where':{'name':_0x470d('0x33'),'userProfileId':_0x17aa22[_0x470d('0x66')]},'raw':!![]})[_0x470d('0x31')](function(_0x482e2b){if(_0x482e2b&&_0x482e2b[_0x470d('0x67')]===0x0){return db[_0x470d('0x34')][_0x470d('0x58')]({'name':_0x2586f7[_0x470d('0x38')],'resourceId':_0x2586f7['id'],'type':_0x482e2b[_0x470d('0x38')],'sectionId':_0x482e2b['id']},{})[_0x470d('0x31')](function(){return _0x214085;});}else{return _0x214085;}})[_0x470d('0x24')](function(_0x3704cc){logger[_0x470d('0x20')](_0x470d('0x68'),_0x3704cc);throw _0x3704cc;});}return _0x214085;})[_0x470d('0x31')](respondWithResult(_0x593a0b,0xc9))['catch'](handleError(_0x593a0b,null));};exports['update']=function(_0x494449,_0x1cbb8a,_0x3496ae){var _0x2b7a53;return db[_0x470d('0x50')][_0x470d('0x57')]({'where':{'id':_0x494449[_0x470d('0x54')]['id']}})[_0x470d('0x31')](handleEntityNotFound(_0x1cbb8a,null))[_0x470d('0x31')](saveUpdates(_0x494449[_0x470d('0x69')],null))['then'](function(_0x294fbe){if(_0x294fbe){_0x2b7a53=_0x294fbe;return db['VoiceContext'][_0x470d('0x51')]({'raw':!![]});}})[_0x470d('0x31')](function(_0x5c9867){var _0x4d2e57=fs[_0x470d('0x59')](path['join'](config[_0x470d('0x5b')],'server/files/templates/context.ejs'),_0x470d('0x5d'));var _0x17e29c=ejs[_0x470d('0x6a')](_0x4d2e57,{'contexts':_0x5c9867||[]});fs['writeFileSync'](_0x470d('0x5f'),_0x17e29c);})[_0x470d('0x31')](function(){return respondWithRpcPromise('Reload',_0x470d('0x30'),{'module':_0x470d('0x61')});})[_0x470d('0x31')](function(){return _0x2b7a53;})[_0x470d('0x31')](respondWithResult(_0x1cbb8a,null))[_0x470d('0x24')](handleError(_0x1cbb8a,null));};exports['destroy']=function(_0x5b0743,_0x31fb7e,_0x203b07){var _0x242ca9;return db[_0x470d('0x50')][_0x470d('0x57')]({'where':{'id':_0x5b0743[_0x470d('0x54')]['id']}})[_0x470d('0x31')](handleEntityNotFound(_0x31fb7e,null))[_0x470d('0x31')](removeEntity(_0x31fb7e,null))[_0x470d('0x31')](function(){return db['VoiceContext'][_0x470d('0x51')]({'raw':!![]});})[_0x470d('0x31')](function(_0x493230){var _0xf301c7=fs[_0x470d('0x59')](path[_0x470d('0x5a')](config[_0x470d('0x5b')],'server/files/templates/context.ejs'),_0x470d('0x5d'));var _0x2cb276=ejs[_0x470d('0x6a')](_0xf301c7,{'contexts':_0x493230});fs[_0x470d('0x5e')](_0x470d('0x5f'),_0x2cb276);return respondWithRpcPromise('Reload',_0x470d('0x35'),{'module':_0x470d('0x61')});})[_0x470d('0x24')](handleError(_0x31fb7e,null));}; \ No newline at end of file diff --git a/server/api/voiceContext/voiceContext.model.js b/server/api/voiceContext/voiceContext.model.js index 0203b52..56d259e 100644 --- a/server/api/voiceContext/voiceContext.model.js +++ b/server/api/voiceContext/voiceContext.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd509=['exports','define','voice_contexts','../../config/logger','api','moment','path','rimraf','./voiceContext.attributes'];(function(_0x1f4e10,_0x1db2a1){var _0x4c9c4d=function(_0x2b21af){while(--_0x2b21af){_0x1f4e10['push'](_0x1f4e10['shift']());}};_0x4c9c4d(++_0x1db2a1);}(_0xd509,0xc9));var _0x9d50=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xd509[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x9d50('0x0'))(_0x9d50('0x1'));var moment=require(_0x9d50('0x2'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x9d50('0x3'));var rimraf=require(_0x9d50('0x4'));var config=require('../../config/environment');var attributes=require(_0x9d50('0x5'));module[_0x9d50('0x6')]=function(_0x1800ce,_0x54afc4){return _0x1800ce[_0x9d50('0x7')]('VoiceContext',attributes,{'tableName':_0x9d50('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xb6a0=['util','api','moment','request-promise','path','rimraf','./voiceContext.attributes','voice_contexts'];(function(_0x4ce960,_0x4258e9){var _0x43a9d1=function(_0xc221e3){while(--_0xc221e3){_0x4ce960['push'](_0x4ce960['shift']());}};_0x43a9d1(++_0x4258e9);}(_0xb6a0,0xf0));var _0x0b6a=function(_0x5547df,_0x5423c3){_0x5547df=_0x5547df-0x0;var _0x180e34=_0xb6a0[_0x5547df];return _0x180e34;};'use strict';var _=require('lodash');var util=require(_0x0b6a('0x0'));var logger=require('../../config/logger')(_0x0b6a('0x1'));var moment=require(_0x0b6a('0x2'));var BPromise=require('bluebird');var rp=require(_0x0b6a('0x3'));var fs=require('fs');var path=require(_0x0b6a('0x4'));var rimraf=require(_0x0b6a('0x5'));var config=require('../../config/environment');var attributes=require(_0x0b6a('0x6'));module['exports']=function(_0x3f6ef3,_0x2ed045){return _0x3f6ef3['define']('VoiceContext',attributes,{'tableName':_0x0b6a('0x7'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/voiceContext/voiceContext.rpc.js b/server/api/voiceContext/voiceContext.rpc.js index d6455d0..ff7c4f3 100644 --- a/server/api/voiceContext/voiceContext.rpc.js +++ b/server/api/voiceContext/voiceContext.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x40ac=['../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','request','then','debug','request\x20sent','error','code','VoiceContext,\x20%s,\x20%s','message','info','result','lodash','moment','bluebird','randomstring','ioredis'];(function(_0x2c91e9,_0x2fb965){var _0x13f0ff=function(_0xb39edf){while(--_0xb39edf){_0x2c91e9['push'](_0x2c91e9['shift']());}};_0x13f0ff(++_0x2fb965);}(_0x40ac,0x1de));var _0xc40a=function(_0xa04daf,_0x25e602){_0xa04daf=_0xa04daf-0x0;var _0x3f7fa6=_0x40ac[_0xa04daf];return _0x3f7fa6;};'use strict';var _=require(_0xc40a('0x0'));var util=require('util');var moment=require(_0xc40a('0x1'));var BPromise=require(_0xc40a('0x2'));var rs=require(_0xc40a('0x3'));var fs=require('fs');var Redis=require(_0xc40a('0x4'));var db=require(_0xc40a('0x5'))['db'];var utils=require(_0xc40a('0x6'));var logger=require(_0xc40a('0x7'))('rpc');var config=require(_0xc40a('0x8'));var jayson=require(_0xc40a('0x9'));var client=jayson[_0xc40a('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x59b77c,_0x3f323e,_0x28b55d){return new BPromise(function(_0x5bb1e8,_0xecfe01){return client[_0xc40a('0xb')](_0x59b77c,_0x28b55d)[_0xc40a('0xc')](function(_0x35e0c6){logger['info']('VoiceContext,\x20%s,\x20%s',_0x3f323e,'request\x20sent');logger[_0xc40a('0xd')]('VoiceContext,\x20%s,\x20%s,\x20%s',_0x3f323e,_0xc40a('0xe'),JSON['stringify'](_0x35e0c6));if(_0x35e0c6['error']){if(_0x35e0c6[_0xc40a('0xf')][_0xc40a('0x10')]===0x1f4){logger[_0xc40a('0xf')](_0xc40a('0x11'),_0x3f323e,_0x35e0c6[_0xc40a('0xf')][_0xc40a('0x12')]);return _0xecfe01(_0x35e0c6[_0xc40a('0xf')][_0xc40a('0x12')]);}logger['error'](_0xc40a('0x11'),_0x3f323e,_0x35e0c6[_0xc40a('0xf')]['message']);return _0x5bb1e8(_0x35e0c6[_0xc40a('0xf')]['message']);}else{logger[_0xc40a('0x13')](_0xc40a('0x11'),_0x3f323e,_0xc40a('0xe'));_0x5bb1e8(_0x35e0c6[_0xc40a('0x14')][_0xc40a('0x12')]);}})['catch'](function(_0x3d1502){logger[_0xc40a('0xf')](_0xc40a('0x11'),_0x3f323e,_0x3d1502);_0xecfe01(_0x3d1502);});});} \ No newline at end of file +var _0x5713=['../../config/utils','../../config/logger','jayson/promise','client','http','request','then','info','debug','VoiceContext,\x20%s,\x20%s,\x20%s','request\x20sent','error','VoiceContext,\x20%s,\x20%s','message','result','lodash','util','bluebird','ioredis','../../mysqldb'];(function(_0x41a57e,_0xbaba8e){var _0x5d7906=function(_0x3f9fc7){while(--_0x3f9fc7){_0x41a57e['push'](_0x41a57e['shift']());}};_0x5d7906(++_0xbaba8e);}(_0x5713,0x1c7));var _0x3571=function(_0x21510e,_0x2e84c1){_0x21510e=_0x21510e-0x0;var _0xdcd7d6=_0x5713[_0x21510e];return _0xdcd7d6;};'use strict';var _=require(_0x3571('0x0'));var util=require(_0x3571('0x1'));var moment=require('moment');var BPromise=require(_0x3571('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x3571('0x3'));var db=require(_0x3571('0x4'))['db'];var utils=require(_0x3571('0x5'));var logger=require(_0x3571('0x6'))('rpc');var config=require('../../config/environment');var jayson=require(_0x3571('0x7'));var client=jayson[_0x3571('0x8')][_0x3571('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x432a48,_0x3a6f29,_0x1f8f0f){return new BPromise(function(_0x48b06d,_0x358ba1){return client[_0x3571('0xa')](_0x432a48,_0x1f8f0f)[_0x3571('0xb')](function(_0x288fc8){logger[_0x3571('0xc')]('VoiceContext,\x20%s,\x20%s',_0x3a6f29,'request\x20sent');logger[_0x3571('0xd')](_0x3571('0xe'),_0x3a6f29,_0x3571('0xf'),JSON['stringify'](_0x288fc8));if(_0x288fc8['error']){if(_0x288fc8['error']['code']===0x1f4){logger[_0x3571('0x10')](_0x3571('0x11'),_0x3a6f29,_0x288fc8[_0x3571('0x10')][_0x3571('0x12')]);return _0x358ba1(_0x288fc8[_0x3571('0x10')][_0x3571('0x12')]);}logger[_0x3571('0x10')](_0x3571('0x11'),_0x3a6f29,_0x288fc8[_0x3571('0x10')][_0x3571('0x12')]);return _0x48b06d(_0x288fc8[_0x3571('0x10')][_0x3571('0x12')]);}else{logger[_0x3571('0xc')](_0x3571('0x11'),_0x3a6f29,_0x3571('0xf'));_0x48b06d(_0x288fc8[_0x3571('0x13')]['message']);}})['catch'](function(_0x48c77e){logger[_0x3571('0x10')]('VoiceContext,\x20%s,\x20%s',_0x3a6f29,_0x48c77e);_0x358ba1(_0x48c77e);});});} \ No newline at end of file diff --git a/server/api/voiceDialReport/index.js b/server/api/voiceDialReport/index.js index f4ade28..d106512 100644 --- a/server/api/voiceDialReport/index.js +++ b/server/api/voiceDialReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc66c=['isAuthenticated','index','get','/describe','describe','/:id','show','post','update','delete','exports','multer','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service'];(function(_0x146a85,_0x529b52){var _0x1b59bf=function(_0x4af0fd){while(--_0x4af0fd){_0x146a85['push'](_0x146a85['shift']());}};_0x1b59bf(++_0x529b52);}(_0xc66c,0x77));var _0xcc66=function(_0x13d07a,_0x41efc3){_0x13d07a=_0x13d07a-0x0;var _0x5ee0ee=_0xc66c[_0x13d07a];return _0x5ee0ee;};'use strict';var multer=require(_0xcc66('0x0'));var util=require('util');var path=require('path');var timeout=require(_0xcc66('0x1'));var express=require(_0xcc66('0x2'));var router=express[_0xcc66('0x3')]();var fs_extra=require(_0xcc66('0x4'));var auth=require(_0xcc66('0x5'));var interaction=require(_0xcc66('0x6'));var config=require('../../config/environment');var controller=require('./voiceDialReport.controller');router['get']('/',auth[_0xcc66('0x7')](),controller[_0xcc66('0x8')]);router[_0xcc66('0x9')](_0xcc66('0xa'),auth[_0xcc66('0x7')](),controller[_0xcc66('0xb')]);router[_0xcc66('0x9')](_0xcc66('0xc'),auth[_0xcc66('0x7')](),controller[_0xcc66('0xd')]);router[_0xcc66('0xe')]('/',auth[_0xcc66('0x7')](),controller['create']);router['put']('/:id',auth[_0xcc66('0x7')](),controller[_0xcc66('0xf')]);router[_0xcc66('0x10')](_0xcc66('0xc'),auth['isAuthenticated'](),controller['destroy']);module[_0xcc66('0x11')]=router; \ No newline at end of file +var _0x3452=['./voiceDialReport.controller','get','index','isAuthenticated','describe','show','create','delete','/:id','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service'];(function(_0x52c500,_0x26b39b){var _0x15d8f8=function(_0x303eea){while(--_0x303eea){_0x52c500['push'](_0x52c500['shift']());}};_0x15d8f8(++_0x26b39b);}(_0x3452,0x183));var _0x2345=function(_0x19e35c,_0x29cd1e){_0x19e35c=_0x19e35c-0x0;var _0x3e1fe8=_0x3452[_0x19e35c];return _0x3e1fe8;};'use strict';var multer=require(_0x2345('0x0'));var util=require(_0x2345('0x1'));var path=require(_0x2345('0x2'));var timeout=require(_0x2345('0x3'));var express=require(_0x2345('0x4'));var router=express[_0x2345('0x5')]();var fs_extra=require(_0x2345('0x6'));var auth=require(_0x2345('0x7'));var interaction=require(_0x2345('0x8'));var config=require('../../config/environment');var controller=require(_0x2345('0x9'));router[_0x2345('0xa')]('/',auth['isAuthenticated'](),controller[_0x2345('0xb')]);router['get']('/describe',auth[_0x2345('0xc')](),controller[_0x2345('0xd')]);router[_0x2345('0xa')]('/:id',auth[_0x2345('0xc')](),controller[_0x2345('0xe')]);router['post']('/',auth['isAuthenticated'](),controller[_0x2345('0xf')]);router['put']('/:id',auth['isAuthenticated'](),controller['update']);router[_0x2345('0x10')](_0x2345('0x11'),auth[_0x2345('0xc')](),controller['destroy']);module['exports']=router; \ No newline at end of file diff --git a/server/api/voiceDialReport/voiceDialReport.attributes.js b/server/api/voiceDialReport/voiceDialReport.attributes.js index c0bc0e7..8fe1bb9 100644 --- a/server/api/voiceDialReport/voiceDialReport.attributes.js +++ b/server/api/voiceDialReport/voiceDialReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xdace=['DATE','called,connect,complete','sequelize','STRING','INTEGER'];(function(_0x36665f,_0x4f9488){var _0x481d25=function(_0x3779cc){while(--_0x3779cc){_0x36665f['push'](_0x36665f['shift']());}};_0x481d25(++_0x4f9488);}(_0xdace,0xc5));var _0xedac=function(_0x56a871,_0x18b7fe){_0x56a871=_0x56a871-0x0;var _0x124954=_0xdace[_0x56a871];return _0x124954;};'use strict';var Sequelize=require(_0xedac('0x0'));module['exports']={'privilege':{'type':Sequelize[_0xedac('0x1')]},'channel':{'type':Sequelize[_0xedac('0x1')]},'channelstate':{'type':Sequelize[_0xedac('0x2')]},'channelstatedesc':{'type':Sequelize['STRING']},'calleridnum':{'type':Sequelize[_0xedac('0x1')]},'calleridname':{'type':Sequelize[_0xedac('0x1')]},'connectedlinenum':{'type':Sequelize[_0xedac('0x1')]},'connectedlinename':{'type':Sequelize[_0xedac('0x1')]},'language':{'type':Sequelize['STRING']},'accountcode':{'type':Sequelize[_0xedac('0x1')]},'context':{'type':Sequelize[_0xedac('0x1')]},'exten':{'type':Sequelize[_0xedac('0x1')]},'priority':{'type':Sequelize['INTEGER']},'uniqueid':{'type':Sequelize[_0xedac('0x1')]},'linkedid':{'type':Sequelize[_0xedac('0x1')]},'destchannel':{'type':Sequelize[_0xedac('0x1')]},'destchannelstate':{'type':Sequelize['INTEGER']},'destchannelstatedesc':{'type':Sequelize[_0xedac('0x1')]},'destcalleridnum':{'type':Sequelize[_0xedac('0x1')]},'destcalleridname':{'type':Sequelize[_0xedac('0x1')]},'destconnectedlinenum':{'type':Sequelize['STRING']},'destconnectedlinename':{'type':Sequelize['STRING']},'destlanguage':{'type':Sequelize[_0xedac('0x1')]},'destaccountcode':{'type':Sequelize[_0xedac('0x1')]},'destcontext':{'type':Sequelize['STRING']},'destexten':{'type':Sequelize['STRING']},'destpriority':{'type':Sequelize[_0xedac('0x2')]},'destuniqueid':{'type':Sequelize[_0xedac('0x1')]},'destlinkedid':{'type':Sequelize['STRING']},'dialstring':{'type':Sequelize[_0xedac('0x1')]},'dialstatus':{'type':Sequelize['STRING']},'starttime':{'type':Sequelize[_0xedac('0x3')]},'answertime':{'type':Sequelize[_0xedac('0x3')]},'endtime':{'type':Sequelize[_0xedac('0x3')]},'lastevent':{'type':Sequelize[_0xedac('0x1')],'comment':_0xedac('0x4')},'routeId':{'type':Sequelize[_0xedac('0x2')]},'duration':{'type':Sequelize[_0xedac('0x2')]},'holdtime':{'type':Sequelize[_0xedac('0x2')]},'billableseconds':{'type':Sequelize['INTEGER']}}; \ No newline at end of file +var _0x9bde=['exports','STRING','INTEGER','DATE','called,connect,complete'];(function(_0x33eff9,_0x39e31e){var _0x546d13=function(_0x1287c8){while(--_0x1287c8){_0x33eff9['push'](_0x33eff9['shift']());}};_0x546d13(++_0x39e31e);}(_0x9bde,0xe1));var _0xe9bd=function(_0x469914,_0x11af7e){_0x469914=_0x469914-0x0;var _0x39a9e4=_0x9bde[_0x469914];return _0x39a9e4;};'use strict';var Sequelize=require('sequelize');module[_0xe9bd('0x0')]={'privilege':{'type':Sequelize['STRING']},'channel':{'type':Sequelize[_0xe9bd('0x1')]},'channelstate':{'type':Sequelize['INTEGER']},'channelstatedesc':{'type':Sequelize[_0xe9bd('0x1')]},'calleridnum':{'type':Sequelize[_0xe9bd('0x1')]},'calleridname':{'type':Sequelize[_0xe9bd('0x1')]},'connectedlinenum':{'type':Sequelize[_0xe9bd('0x1')]},'connectedlinename':{'type':Sequelize[_0xe9bd('0x1')]},'language':{'type':Sequelize[_0xe9bd('0x1')]},'accountcode':{'type':Sequelize[_0xe9bd('0x1')]},'context':{'type':Sequelize['STRING']},'exten':{'type':Sequelize[_0xe9bd('0x1')]},'priority':{'type':Sequelize[_0xe9bd('0x2')]},'uniqueid':{'type':Sequelize[_0xe9bd('0x1')]},'linkedid':{'type':Sequelize[_0xe9bd('0x1')]},'destchannel':{'type':Sequelize[_0xe9bd('0x1')]},'destchannelstate':{'type':Sequelize[_0xe9bd('0x2')]},'destchannelstatedesc':{'type':Sequelize[_0xe9bd('0x1')]},'destcalleridnum':{'type':Sequelize[_0xe9bd('0x1')]},'destcalleridname':{'type':Sequelize[_0xe9bd('0x1')]},'destconnectedlinenum':{'type':Sequelize[_0xe9bd('0x1')]},'destconnectedlinename':{'type':Sequelize['STRING']},'destlanguage':{'type':Sequelize['STRING']},'destaccountcode':{'type':Sequelize[_0xe9bd('0x1')]},'destcontext':{'type':Sequelize[_0xe9bd('0x1')]},'destexten':{'type':Sequelize[_0xe9bd('0x1')]},'destpriority':{'type':Sequelize['INTEGER']},'destuniqueid':{'type':Sequelize[_0xe9bd('0x1')]},'destlinkedid':{'type':Sequelize[_0xe9bd('0x1')]},'dialstring':{'type':Sequelize[_0xe9bd('0x1')]},'dialstatus':{'type':Sequelize[_0xe9bd('0x1')]},'starttime':{'type':Sequelize['DATE']},'answertime':{'type':Sequelize[_0xe9bd('0x3')]},'endtime':{'type':Sequelize['DATE']},'lastevent':{'type':Sequelize[_0xe9bd('0x1')],'comment':_0xe9bd('0x4')},'routeId':{'type':Sequelize[_0xe9bd('0x2')]},'duration':{'type':Sequelize['INTEGER']},'holdtime':{'type':Sequelize['INTEGER']},'billableseconds':{'type':Sequelize[_0xe9bd('0x2')]}}; \ No newline at end of file diff --git a/server/api/voiceDialReport/voiceDialReport.controller.js b/server/api/voiceDialReport/voiceDialReport.controller.js index ddf9a35..10e4752 100644 --- a/server/api/voiceDialReport/voiceDialReport.controller.js +++ b/server/api/voiceDialReport/voiceDialReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3fa4=['send','index','map','VoiceDialReport','rawAttributes','fieldName','key','model','query','keys','filters','intersection','fields','attributes','hasOwnProperty','nolimit','sort','where','pick','filter','merge','type','VIRTUAL','includeAll','include','rows','length','options','find','create','body','catch','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','sox','to-csv','fs-extra','lodash','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','limit','undefined','count','offset','set','Content-Range','apply','update','destroy','then','end','error','stack','name'];(function(_0x51b59c,_0x1e797e){var _0x2d77f9=function(_0x54940e){while(--_0x54940e){_0x51b59c['push'](_0x51b59c['shift']());}};_0x2d77f9(++_0x1e797e);}(_0x3fa4,0x198));var _0x43fa=function(_0x48755b,_0x20ed78){_0x48755b=_0x48755b-0x0;var _0x3e03b2=_0x3fa4[_0x48755b];return _0x3e03b2;};'use strict';var emlformat=require(_0x43fa('0x0'));var rimraf=require(_0x43fa('0x1'));var zipdir=require(_0x43fa('0x2'));var jsonpatch=require(_0x43fa('0x3'));var rp=require(_0x43fa('0x4'));var moment=require(_0x43fa('0x5'));var BPromise=require(_0x43fa('0x6'));var Mustache=require('mustache');var util=require(_0x43fa('0x7'));var path=require('path');var sox=require(_0x43fa('0x8'));var csv=require(_0x43fa('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x43fa('0xa'));var _=require(_0x43fa('0xb'));var squel=require('squel');var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x43fa('0xc'));var toCsv=require('to-csv');var querystring=require(_0x43fa('0xd'));var Papa=require(_0x43fa('0xe'));var Redis=require(_0x43fa('0xf'));var authService=require(_0x43fa('0x10'));var qs=require(_0x43fa('0x11'));var as=require(_0x43fa('0x12'));var hardwareService=require(_0x43fa('0x13'));var logger=require('../../config/logger')(_0x43fa('0x14'));var utils=require(_0x43fa('0x15'));var config=require(_0x43fa('0x16'));var licenseUtil=require(_0x43fa('0x17'));var db=require(_0x43fa('0x18'))['db'];function respondWithStatusCode(_0x18c95e,_0x3ec1c6){_0x3ec1c6=_0x3ec1c6||0xcc;return function(_0x1f48d9){if(_0x1f48d9){return _0x18c95e[_0x43fa('0x19')](_0x3ec1c6);}return _0x18c95e['status'](_0x3ec1c6)['end']();};}function respondWithResult(_0x253243,_0x1ec54e){_0x1ec54e=_0x1ec54e||0xc8;return function(_0x282ae3){if(_0x282ae3){return _0x253243[_0x43fa('0x1a')](_0x1ec54e)[_0x43fa('0x1b')](_0x282ae3);}};}function respondWithFilteredResult(_0x1df89b,_0x2b3d2d){return function(_0x7df792){if(_0x7df792){var _0x50bf00=typeof _0x2b3d2d['offset']==='undefined'&&typeof _0x2b3d2d[_0x43fa('0x1c')]===_0x43fa('0x1d');var _0x2ca65a=_0x7df792[_0x43fa('0x1e')];var _0x3207a6=_0x50bf00?0x0:_0x2b3d2d[_0x43fa('0x1f')];var _0x4c6185=_0x50bf00?_0x7df792[_0x43fa('0x1e')]:_0x2b3d2d[_0x43fa('0x1f')]+_0x2b3d2d[_0x43fa('0x1c')];var _0x43ea2a;if(_0x4c6185>=_0x2ca65a){_0x4c6185=_0x2ca65a;_0x43ea2a=0xc8;}else{_0x43ea2a=0xce;}_0x1df89b[_0x43fa('0x1a')](_0x43ea2a);return _0x1df89b[_0x43fa('0x20')](_0x43fa('0x21'),_0x3207a6+'-'+_0x4c6185+'/'+_0x2ca65a)[_0x43fa('0x1b')](_0x7df792);}return null;};}function patchUpdates(_0x43b245){return function(_0x13812f){try{jsonpatch[_0x43fa('0x22')](_0x13812f,_0x43b245,!![]);}catch(_0xe050d7){return BPromise['reject'](_0xe050d7);}return _0x13812f['save']();};}function saveUpdates(_0x47bafa,_0x52d69b){return function(_0x467290){if(_0x467290){return _0x467290[_0x43fa('0x23')](_0x47bafa)['then'](function(_0x3c4062){return _0x3c4062;});}return null;};}function removeEntity(_0x33ff34,_0x550201){return function(_0x2beb45){if(_0x2beb45){return _0x2beb45[_0x43fa('0x24')]()[_0x43fa('0x25')](function(){_0x33ff34[_0x43fa('0x1a')](0xcc)[_0x43fa('0x26')]();});}};}function handleEntityNotFound(_0x539e60,_0x56cd06){return function(_0x4aa5c6){if(!_0x4aa5c6){_0x539e60[_0x43fa('0x19')](0x194);}return _0x4aa5c6;};}function handleError(_0x5c8ff3,_0x1c82b3){_0x1c82b3=_0x1c82b3||0x1f4;return function(_0x30ba72){logger[_0x43fa('0x27')](_0x30ba72[_0x43fa('0x28')]);if(_0x30ba72[_0x43fa('0x29')]){delete _0x30ba72[_0x43fa('0x29')];}_0x5c8ff3[_0x43fa('0x1a')](_0x1c82b3)[_0x43fa('0x2a')](_0x30ba72);};}exports[_0x43fa('0x2b')]=function(_0xfc6976,_0x986484){var _0x105455={},_0x383602={},_0x322a57={'count':0x0,'rows':[]};var _0x1944ee=_[_0x43fa('0x2c')](db[_0x43fa('0x2d')][_0x43fa('0x2e')],function(_0x327cc6){return{'name':_0x327cc6[_0x43fa('0x2f')],'type':_0x327cc6['type'][_0x43fa('0x30')]};});_0x383602[_0x43fa('0x31')]=_[_0x43fa('0x2c')](_0x1944ee,_0x43fa('0x29'));_0x383602[_0x43fa('0x32')]=_[_0x43fa('0x33')](_0xfc6976[_0x43fa('0x32')]);_0x383602[_0x43fa('0x34')]=_[_0x43fa('0x35')](_0x383602[_0x43fa('0x31')],_0x383602[_0x43fa('0x32')]);_0x105455['attributes']=_['intersection'](_0x383602[_0x43fa('0x31')],qs[_0x43fa('0x36')](_0xfc6976['query'][_0x43fa('0x36')]));_0x105455[_0x43fa('0x37')]=_0x105455[_0x43fa('0x37')]['length']?_0x105455[_0x43fa('0x37')]:_0x383602[_0x43fa('0x31')];if(!_0xfc6976['query'][_0x43fa('0x38')](_0x43fa('0x39'))){_0x105455[_0x43fa('0x1c')]=qs['limit'](_0xfc6976[_0x43fa('0x32')]['limit']);_0x105455[_0x43fa('0x1f')]=qs['offset'](_0xfc6976[_0x43fa('0x32')][_0x43fa('0x1f')]);}_0x105455['order']=qs[_0x43fa('0x3a')](_0xfc6976[_0x43fa('0x32')][_0x43fa('0x3a')]);_0x105455[_0x43fa('0x3b')]=qs[_0x43fa('0x34')](_[_0x43fa('0x3c')](_0xfc6976[_0x43fa('0x32')],_0x383602[_0x43fa('0x34')]),_0x1944ee);if(_0xfc6976['query'][_0x43fa('0x3d')]){_0x105455['where']=_[_0x43fa('0x3e')](_0x105455['where'],{'$or':_[_0x43fa('0x2c')](_0x1944ee,function(_0x5a329e){if(_0x5a329e[_0x43fa('0x3f')]!==_0x43fa('0x40')){var _0x18fb94={};_0x18fb94[_0x5a329e[_0x43fa('0x29')]]={'$like':'%'+_0xfc6976[_0x43fa('0x32')][_0x43fa('0x3d')]+'%'};return _0x18fb94;}})});}_0x105455=_[_0x43fa('0x3e')]({},_0x105455,_0xfc6976['options']);var _0x3480d7={'where':_0x105455[_0x43fa('0x3b')]};return db[_0x43fa('0x2d')]['count'](_0x3480d7)[_0x43fa('0x25')](function(_0x2ca523){_0x322a57[_0x43fa('0x1e')]=_0x2ca523;if(_0xfc6976[_0x43fa('0x32')][_0x43fa('0x41')]){_0x105455[_0x43fa('0x42')]=[{'all':!![]}];}return db[_0x43fa('0x2d')]['findAll'](_0x105455);})['then'](function(_0x3adfdc){_0x322a57[_0x43fa('0x43')]=_0x3adfdc;return _0x322a57;})[_0x43fa('0x25')](respondWithFilteredResult(_0x986484,_0x105455))['catch'](handleError(_0x986484,null));};exports['show']=function(_0x34850b,_0x16e446){var _0x5db667={'raw':!![],'where':{'id':_0x34850b['params']['id']}},_0x32eec9={};_0x32eec9[_0x43fa('0x31')]=_[_0x43fa('0x33')](db[_0x43fa('0x2d')][_0x43fa('0x2e')]);_0x32eec9['query']=_['keys'](_0x34850b[_0x43fa('0x32')]);_0x32eec9['filters']=_[_0x43fa('0x35')](_0x32eec9[_0x43fa('0x31')],_0x32eec9[_0x43fa('0x32')]);_0x5db667[_0x43fa('0x37')]=_[_0x43fa('0x35')](_0x32eec9[_0x43fa('0x31')],qs[_0x43fa('0x36')](_0x34850b[_0x43fa('0x32')][_0x43fa('0x36')]));_0x5db667[_0x43fa('0x37')]=_0x5db667[_0x43fa('0x37')][_0x43fa('0x44')]?_0x5db667[_0x43fa('0x37')]:_0x32eec9[_0x43fa('0x31')];if(_0x34850b[_0x43fa('0x32')]['includeAll']){_0x5db667[_0x43fa('0x42')]=[{'all':!![]}];}_0x5db667=_['merge']({},_0x5db667,_0x34850b[_0x43fa('0x45')]);return db[_0x43fa('0x2d')][_0x43fa('0x46')](_0x5db667)[_0x43fa('0x25')](handleEntityNotFound(_0x16e446,null))[_0x43fa('0x25')](respondWithResult(_0x16e446,null))['catch'](handleError(_0x16e446,null));};exports['create']=function(_0x38e834,_0x39f0d8){return db['VoiceDialReport'][_0x43fa('0x47')](_0x38e834[_0x43fa('0x48')],{})[_0x43fa('0x25')](respondWithResult(_0x39f0d8,0xc9))[_0x43fa('0x49')](handleError(_0x39f0d8,null));};exports['update']=function(_0x314edd,_0x17e4b3){if(_0x314edd[_0x43fa('0x48')]['id']){delete _0x314edd['body']['id'];}return db[_0x43fa('0x2d')]['find']({'where':{'id':_0x314edd['params']['id']}})[_0x43fa('0x25')](handleEntityNotFound(_0x17e4b3,null))[_0x43fa('0x25')](saveUpdates(_0x314edd['body'],null))[_0x43fa('0x25')](respondWithResult(_0x17e4b3,null))[_0x43fa('0x49')](handleError(_0x17e4b3,null));};exports[_0x43fa('0x24')]=function(_0x1f1f6d,_0x43caf8){return db[_0x43fa('0x2d')][_0x43fa('0x46')]({'where':{'id':_0x1f1f6d['params']['id']}})[_0x43fa('0x25')](handleEntityNotFound(_0x43caf8,null))[_0x43fa('0x25')](removeEntity(_0x43caf8,null))[_0x43fa('0x49')](handleError(_0x43caf8,null));};exports['describe']=function(_0xbeb8f6,_0x43bc53){return db[_0x43fa('0x2d')][_0x43fa('0x4a')]()[_0x43fa('0x25')](respondWithResult(_0x43bc53,null))[_0x43fa('0x49')](handleError(_0x43bc53,null));}; \ No newline at end of file +var _0xc98f=['type','key','model','name','keys','filters','intersection','attributes','fields','length','query','sort','pick','filter','where','merge','VIRTUAL','options','includeAll','include','findAll','rows','show','find','catch','create','body','destroy','params','describe','eml-format','rimraf','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','Content-Range','apply','reject','save','then','error','stack','send','index','map','VoiceDialReport','rawAttributes','fieldName'];(function(_0x55c253,_0x59f0d8){var _0x3123f1=function(_0x2e63d4){while(--_0x2e63d4){_0x55c253['push'](_0x55c253['shift']());}};_0x3123f1(++_0x59f0d8);}(_0xc98f,0xba));var _0xfc98=function(_0x291d15,_0xc76f62){_0x291d15=_0x291d15-0x0;var _0x3e8f40=_0xc98f[_0x291d15];return _0x3e8f40;};'use strict';var emlformat=require(_0xfc98('0x0'));var rimraf=require(_0xfc98('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xfc98('0x2'));var rp=require('request-promise');var moment=require(_0xfc98('0x3'));var BPromise=require(_0xfc98('0x4'));var Mustache=require(_0xfc98('0x5'));var util=require(_0xfc98('0x6'));var path=require(_0xfc98('0x7'));var sox=require(_0xfc98('0x8'));var csv=require(_0xfc98('0x9'));var ejs=require(_0xfc98('0xa'));var fs=require('fs');var fs_extra=require(_0xfc98('0xb'));var _=require('lodash');var squel=require(_0xfc98('0xc'));var crypto=require(_0xfc98('0xd'));var jsforce=require(_0xfc98('0xe'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0xfc98('0xf'));var Papa=require(_0xfc98('0x10'));var Redis=require(_0xfc98('0x11'));var authService=require(_0xfc98('0x12'));var qs=require(_0xfc98('0x13'));var as=require(_0xfc98('0x14'));var hardwareService=require(_0xfc98('0x15'));var logger=require(_0xfc98('0x16'))(_0xfc98('0x17'));var utils=require(_0xfc98('0x18'));var config=require(_0xfc98('0x19'));var licenseUtil=require(_0xfc98('0x1a'));var db=require(_0xfc98('0x1b'))['db'];function respondWithStatusCode(_0x3a18f7,_0x1b1a10){_0x1b1a10=_0x1b1a10||0xcc;return function(_0x5c3efb){if(_0x5c3efb){return _0x3a18f7[_0xfc98('0x1c')](_0x1b1a10);}return _0x3a18f7[_0xfc98('0x1d')](_0x1b1a10)[_0xfc98('0x1e')]();};}function respondWithResult(_0x4a0b04,_0x26486b){_0x26486b=_0x26486b||0xc8;return function(_0x1678cb){if(_0x1678cb){return _0x4a0b04[_0xfc98('0x1d')](_0x26486b)[_0xfc98('0x1f')](_0x1678cb);}};}function respondWithFilteredResult(_0x4cdf28,_0x58fdf3){return function(_0x4a5ad7){if(_0x4a5ad7){var _0x306b35=typeof _0x58fdf3[_0xfc98('0x20')]===_0xfc98('0x21')&&typeof _0x58fdf3[_0xfc98('0x22')]===_0xfc98('0x21');var _0x3ba6c2=_0x4a5ad7['count'];var _0x3ee12e=_0x306b35?0x0:_0x58fdf3[_0xfc98('0x20')];var _0x514264=_0x306b35?_0x4a5ad7['count']:_0x58fdf3[_0xfc98('0x20')]+_0x58fdf3[_0xfc98('0x22')];var _0x2f00d1;if(_0x514264>=_0x3ba6c2){_0x514264=_0x3ba6c2;_0x2f00d1=0xc8;}else{_0x2f00d1=0xce;}_0x4cdf28[_0xfc98('0x1d')](_0x2f00d1);return _0x4cdf28['set'](_0xfc98('0x23'),_0x3ee12e+'-'+_0x514264+'/'+_0x3ba6c2)[_0xfc98('0x1f')](_0x4a5ad7);}return null;};}function patchUpdates(_0x56d691){return function(_0x586a4d){try{jsonpatch[_0xfc98('0x24')](_0x586a4d,_0x56d691,!![]);}catch(_0x45635d){return BPromise[_0xfc98('0x25')](_0x45635d);}return _0x586a4d[_0xfc98('0x26')]();};}function saveUpdates(_0x1be893,_0x58124f){return function(_0x279dfd){if(_0x279dfd){return _0x279dfd['update'](_0x1be893)['then'](function(_0x3da0f2){return _0x3da0f2;});}return null;};}function removeEntity(_0x3a4cb3,_0x414496){return function(_0x101122){if(_0x101122){return _0x101122['destroy']()[_0xfc98('0x27')](function(){_0x3a4cb3[_0xfc98('0x1d')](0xcc)['end']();});}};}function handleEntityNotFound(_0x1e8e14,_0x400a2e){return function(_0x1c238a){if(!_0x1c238a){_0x1e8e14[_0xfc98('0x1c')](0x194);}return _0x1c238a;};}function handleError(_0x44ba84,_0x584750){_0x584750=_0x584750||0x1f4;return function(_0x5005b5){logger[_0xfc98('0x28')](_0x5005b5[_0xfc98('0x29')]);if(_0x5005b5['name']){delete _0x5005b5['name'];}_0x44ba84['status'](_0x584750)[_0xfc98('0x2a')](_0x5005b5);};}exports[_0xfc98('0x2b')]=function(_0x590631,_0x37193d){var _0x1c8d95={},_0x347a9e={},_0x4eb9a2={'count':0x0,'rows':[]};var _0x361b06=_[_0xfc98('0x2c')](db[_0xfc98('0x2d')][_0xfc98('0x2e')],function(_0x551708){return{'name':_0x551708[_0xfc98('0x2f')],'type':_0x551708[_0xfc98('0x30')][_0xfc98('0x31')]};});_0x347a9e[_0xfc98('0x32')]=_['map'](_0x361b06,_0xfc98('0x33'));_0x347a9e['query']=_[_0xfc98('0x34')](_0x590631['query']);_0x347a9e[_0xfc98('0x35')]=_[_0xfc98('0x36')](_0x347a9e[_0xfc98('0x32')],_0x347a9e['query']);_0x1c8d95[_0xfc98('0x37')]=_[_0xfc98('0x36')](_0x347a9e[_0xfc98('0x32')],qs[_0xfc98('0x38')](_0x590631['query'][_0xfc98('0x38')]));_0x1c8d95['attributes']=_0x1c8d95[_0xfc98('0x37')][_0xfc98('0x39')]?_0x1c8d95[_0xfc98('0x37')]:_0x347a9e[_0xfc98('0x32')];if(!_0x590631['query']['hasOwnProperty']('nolimit')){_0x1c8d95[_0xfc98('0x22')]=qs[_0xfc98('0x22')](_0x590631[_0xfc98('0x3a')][_0xfc98('0x22')]);_0x1c8d95[_0xfc98('0x20')]=qs[_0xfc98('0x20')](_0x590631[_0xfc98('0x3a')]['offset']);}_0x1c8d95['order']=qs[_0xfc98('0x3b')](_0x590631[_0xfc98('0x3a')][_0xfc98('0x3b')]);_0x1c8d95['where']=qs[_0xfc98('0x35')](_[_0xfc98('0x3c')](_0x590631[_0xfc98('0x3a')],_0x347a9e['filters']),_0x361b06);if(_0x590631['query'][_0xfc98('0x3d')]){_0x1c8d95[_0xfc98('0x3e')]=_[_0xfc98('0x3f')](_0x1c8d95['where'],{'$or':_[_0xfc98('0x2c')](_0x361b06,function(_0xee7d10){if(_0xee7d10[_0xfc98('0x30')]!==_0xfc98('0x40')){var _0x19e499={};_0x19e499[_0xee7d10[_0xfc98('0x33')]]={'$like':'%'+_0x590631['query']['filter']+'%'};return _0x19e499;}})});}_0x1c8d95=_['merge']({},_0x1c8d95,_0x590631[_0xfc98('0x41')]);var _0x36d074={'where':_0x1c8d95[_0xfc98('0x3e')]};return db[_0xfc98('0x2d')]['count'](_0x36d074)[_0xfc98('0x27')](function(_0x1a66dc){_0x4eb9a2['count']=_0x1a66dc;if(_0x590631[_0xfc98('0x3a')][_0xfc98('0x42')]){_0x1c8d95[_0xfc98('0x43')]=[{'all':!![]}];}return db[_0xfc98('0x2d')][_0xfc98('0x44')](_0x1c8d95);})[_0xfc98('0x27')](function(_0x16b186){_0x4eb9a2[_0xfc98('0x45')]=_0x16b186;return _0x4eb9a2;})[_0xfc98('0x27')](respondWithFilteredResult(_0x37193d,_0x1c8d95))['catch'](handleError(_0x37193d,null));};exports[_0xfc98('0x46')]=function(_0x3477d0,_0x5df2da){var _0x3c8d68={'raw':!![],'where':{'id':_0x3477d0['params']['id']}},_0x1a4c3c={};_0x1a4c3c['model']=_['keys'](db[_0xfc98('0x2d')][_0xfc98('0x2e')]);_0x1a4c3c['query']=_['keys'](_0x3477d0[_0xfc98('0x3a')]);_0x1a4c3c[_0xfc98('0x35')]=_['intersection'](_0x1a4c3c[_0xfc98('0x32')],_0x1a4c3c[_0xfc98('0x3a')]);_0x3c8d68['attributes']=_[_0xfc98('0x36')](_0x1a4c3c['model'],qs[_0xfc98('0x38')](_0x3477d0['query'][_0xfc98('0x38')]));_0x3c8d68[_0xfc98('0x37')]=_0x3c8d68[_0xfc98('0x37')]['length']?_0x3c8d68[_0xfc98('0x37')]:_0x1a4c3c[_0xfc98('0x32')];if(_0x3477d0['query'][_0xfc98('0x42')]){_0x3c8d68[_0xfc98('0x43')]=[{'all':!![]}];}_0x3c8d68=_[_0xfc98('0x3f')]({},_0x3c8d68,_0x3477d0[_0xfc98('0x41')]);return db[_0xfc98('0x2d')][_0xfc98('0x47')](_0x3c8d68)['then'](handleEntityNotFound(_0x5df2da,null))[_0xfc98('0x27')](respondWithResult(_0x5df2da,null))[_0xfc98('0x48')](handleError(_0x5df2da,null));};exports[_0xfc98('0x49')]=function(_0x2e1f78,_0x415180){return db[_0xfc98('0x2d')][_0xfc98('0x49')](_0x2e1f78[_0xfc98('0x4a')],{})[_0xfc98('0x27')](respondWithResult(_0x415180,0xc9))[_0xfc98('0x48')](handleError(_0x415180,null));};exports['update']=function(_0x3b7f66,_0x2a18a4){if(_0x3b7f66[_0xfc98('0x4a')]['id']){delete _0x3b7f66[_0xfc98('0x4a')]['id'];}return db[_0xfc98('0x2d')][_0xfc98('0x47')]({'where':{'id':_0x3b7f66['params']['id']}})[_0xfc98('0x27')](handleEntityNotFound(_0x2a18a4,null))[_0xfc98('0x27')](saveUpdates(_0x3b7f66['body'],null))['then'](respondWithResult(_0x2a18a4,null))[_0xfc98('0x48')](handleError(_0x2a18a4,null));};exports[_0xfc98('0x4b')]=function(_0x4ea0a6,_0x18ec50){return db[_0xfc98('0x2d')]['find']({'where':{'id':_0x4ea0a6[_0xfc98('0x4c')]['id']}})[_0xfc98('0x27')](handleEntityNotFound(_0x18ec50,null))[_0xfc98('0x27')](removeEntity(_0x18ec50,null))['catch'](handleError(_0x18ec50,null));};exports[_0xfc98('0x4d')]=function(_0x3a6704,_0x49dcb4){return db[_0xfc98('0x2d')][_0xfc98('0x4d')]()[_0xfc98('0x27')](respondWithResult(_0x49dcb4,null))[_0xfc98('0x48')](handleError(_0x49dcb4,null));}; \ No newline at end of file diff --git a/server/api/voiceDialReport/voiceDialReport.model.js b/server/api/voiceDialReport/voiceDialReport.model.js index 060004d..e73c16e 100644 --- a/server/api/voiceDialReport/voiceDialReport.model.js +++ b/server/api/voiceDialReport/voiceDialReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9400=['rimraf','../../config/environment','./voiceDialReport.attributes','exports','define','VoiceDialReport','report_dial','uniqueid','lodash','util','../../config/logger','api','moment','bluebird','path'];(function(_0x5b6a86,_0x59489c){var _0x425888=function(_0x38fdfd){while(--_0x38fdfd){_0x5b6a86['push'](_0x5b6a86['shift']());}};_0x425888(++_0x59489c);}(_0x9400,0x152));var _0x0940=function(_0x5bec46,_0x42fb5b){_0x5bec46=_0x5bec46-0x0;var _0x514d2d=_0x9400[_0x5bec46];return _0x514d2d;};'use strict';var _=require(_0x0940('0x0'));var util=require(_0x0940('0x1'));var logger=require(_0x0940('0x2'))(_0x0940('0x3'));var moment=require(_0x0940('0x4'));var BPromise=require(_0x0940('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x0940('0x6'));var rimraf=require(_0x0940('0x7'));var config=require(_0x0940('0x8'));var attributes=require(_0x0940('0x9'));module[_0x0940('0xa')]=function(_0x22deb1,_0x224ed9){return _0x22deb1[_0x0940('0xb')](_0x0940('0xc'),attributes,{'tableName':_0x0940('0xd'),'paranoid':![],'indexes':[{'fields':[_0x0940('0xe')]}],'timestamps':!![]});}; \ No newline at end of file +var _0x5ecc=['uniqueid','lodash','util','../../config/logger','api','moment','path','rimraf','../../config/environment','VoiceDialReport','report_dial'];(function(_0x2906e6,_0x5ccd59){var _0x12517a=function(_0x36d576){while(--_0x36d576){_0x2906e6['push'](_0x2906e6['shift']());}};_0x12517a(++_0x5ccd59);}(_0x5ecc,0x177));var _0xc5ec=function(_0x27c08c,_0x4cc38c){_0x27c08c=_0x27c08c-0x0;var _0x138305=_0x5ecc[_0x27c08c];return _0x138305;};'use strict';var _=require(_0xc5ec('0x0'));var util=require(_0xc5ec('0x1'));var logger=require(_0xc5ec('0x2'))(_0xc5ec('0x3'));var moment=require(_0xc5ec('0x4'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xc5ec('0x5'));var rimraf=require(_0xc5ec('0x6'));var config=require(_0xc5ec('0x7'));var attributes=require('./voiceDialReport.attributes');module['exports']=function(_0x69f9f1,_0x542393){return _0x69f9f1['define'](_0xc5ec('0x8'),attributes,{'tableName':_0xc5ec('0x9'),'paranoid':![],'indexes':[{'fields':[_0xc5ec('0xa')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/voiceDialReport/voiceDialReport.rpc.js b/server/api/voiceDialReport/voiceDialReport.rpc.js index 0373b81..ffc9619 100644 --- a/server/api/voiceDialReport/voiceDialReport.rpc.js +++ b/server/api/voiceDialReport/voiceDialReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2513=['result','catch','VoiceDialReport','create','body','raw','then','CreateVoiceDialReport','stringify','update','options','where','attributes','limit','info','lodash','util','moment','bluebird','randomstring','../../config/utils','../../config/logger','rpc','client','request','VoiceDialReport,\x20%s,\x20%s','request\x20sent','debug','error','code','message'];(function(_0xfabd34,_0x56f521){var _0x251c9d=function(_0x18ad96){while(--_0x18ad96){_0xfabd34['push'](_0xfabd34['shift']());}};_0x251c9d(++_0x56f521);}(_0x2513,0x183));var _0x3251=function(_0x5a91e1,_0x68063e){_0x5a91e1=_0x5a91e1-0x0;var _0x4ec3dd=_0x2513[_0x5a91e1];return _0x4ec3dd;};'use strict';var _=require(_0x3251('0x0'));var util=require(_0x3251('0x1'));var moment=require(_0x3251('0x2'));var BPromise=require(_0x3251('0x3'));var rs=require(_0x3251('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x3251('0x5'));var logger=require(_0x3251('0x6'))(_0x3251('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x3251('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0xe8041c,_0x6a2db3,_0x13e91c){return new BPromise(function(_0x4811f4,_0x5b7412){return client[_0x3251('0x9')](_0xe8041c,_0x13e91c)['then'](function(_0x1d50e9){logger['info'](_0x3251('0xa'),_0x6a2db3,_0x3251('0xb'));logger[_0x3251('0xc')]('VoiceDialReport,\x20%s,\x20%s,\x20%s',_0x6a2db3,_0x3251('0xb'),JSON['stringify'](_0x1d50e9));if(_0x1d50e9[_0x3251('0xd')]){if(_0x1d50e9[_0x3251('0xd')][_0x3251('0xe')]===0x1f4){logger[_0x3251('0xd')](_0x3251('0xa'),_0x6a2db3,_0x1d50e9[_0x3251('0xd')][_0x3251('0xf')]);return _0x5b7412(_0x1d50e9[_0x3251('0xd')][_0x3251('0xf')]);}logger['error']('VoiceDialReport,\x20%s,\x20%s',_0x6a2db3,_0x1d50e9[_0x3251('0xd')][_0x3251('0xf')]);return _0x4811f4(_0x1d50e9[_0x3251('0xd')][_0x3251('0xf')]);}else{logger['info']('VoiceDialReport,\x20%s,\x20%s',_0x6a2db3,_0x3251('0xb'));_0x4811f4(_0x1d50e9[_0x3251('0x10')][_0x3251('0xf')]);}})[_0x3251('0x11')](function(_0x313912){logger['error']('VoiceDialReport,\x20%s,\x20%s',_0x6a2db3,_0x313912);_0x5b7412(_0x313912);});});}exports['CreateVoiceDialReport']=function(_0x1244b7){var _0xefbbab=this;return new Promise(function(_0x403d5b,_0x2cecfc){return db[_0x3251('0x12')][_0x3251('0x13')](_0x1244b7[_0x3251('0x14')],{'raw':_0x1244b7['options']?_0x1244b7['options'][_0x3251('0x15')]===undefined?!![]:![]:!![]})[_0x3251('0x16')](function(_0x5dec9a){logger['info'](_0x3251('0x17'),_0x1244b7);logger[_0x3251('0xc')](_0x3251('0x17'),_0x1244b7,JSON[_0x3251('0x18')](_0x5dec9a));_0x403d5b(_0x5dec9a);})[_0x3251('0x11')](function(_0x4b211b){logger[_0x3251('0xd')](_0x3251('0x17'),_0x4b211b[_0x3251('0xf')],_0x1244b7);_0x2cecfc(_0xefbbab['error'](0x1f4,_0x4b211b[_0x3251('0xf')]));});});};exports['UpdateVoiceDialReport']=function(_0xf6a31e){var _0x1dcde4=this;return new Promise(function(_0x16fa39,_0x3ced54){return db['VoiceDialReport'][_0x3251('0x19')](_0xf6a31e[_0x3251('0x14')],{'raw':_0xf6a31e[_0x3251('0x1a')]?_0xf6a31e[_0x3251('0x1a')][_0x3251('0x15')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0xf6a31e[_0x3251('0x1a')]?_0xf6a31e['options'][_0x3251('0x1b')]||null:null,'attributes':_0xf6a31e[_0x3251('0x1a')]?_0xf6a31e[_0x3251('0x1a')][_0x3251('0x1c')]||null:null,'limit':_0xf6a31e[_0x3251('0x1a')]?_0xf6a31e[_0x3251('0x1a')][_0x3251('0x1d')]||null:null})[_0x3251('0x16')](function(_0x81d658){logger[_0x3251('0x1e')]('UpdateVoiceDialReport',_0xf6a31e);logger[_0x3251('0xc')]('UpdateVoiceDialReport',_0xf6a31e,JSON['stringify'](_0x81d658));_0x16fa39(_0x81d658);})[_0x3251('0x11')](function(_0x46c3ef){logger['error']('UpdateVoiceDialReport',_0x46c3ef['message'],_0xf6a31e);_0x3ced54(_0x1dcde4['error'](0x1f4,_0x46c3ef['message']));});});}; \ No newline at end of file +var _0x11d6=['rpc','jayson/promise','client','http','request','info','VoiceDialReport,\x20%s,\x20%s','debug','VoiceDialReport,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','result','catch','VoiceDialReport','create','body','options','raw','then','CreateVoiceDialReport','stringify','UpdateVoiceDialReport','update','where','attributes','limit','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x3e751a,_0x4804ae){var _0x1d5aa1=function(_0x51ec5a){while(--_0x51ec5a){_0x3e751a['push'](_0x3e751a['shift']());}};_0x1d5aa1(++_0x4804ae);}(_0x11d6,0x1e3));var _0x611d=function(_0x54dd27,_0x24c6a8){_0x54dd27=_0x54dd27-0x0;var _0x345c25=_0x11d6[_0x54dd27];return _0x345c25;};'use strict';var _=require(_0x611d('0x0'));var util=require('util');var moment=require(_0x611d('0x1'));var BPromise=require(_0x611d('0x2'));var rs=require(_0x611d('0x3'));var fs=require('fs');var Redis=require(_0x611d('0x4'));var db=require(_0x611d('0x5'))['db'];var utils=require(_0x611d('0x6'));var logger=require('../../config/logger')(_0x611d('0x7'));var config=require('../../config/environment');var jayson=require(_0x611d('0x8'));var client=jayson[_0x611d('0x9')][_0x611d('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x26ec2c,_0x4f9a77,_0x1bdea2){return new BPromise(function(_0x2822cf,_0x1d6d25){return client[_0x611d('0xb')](_0x26ec2c,_0x1bdea2)['then'](function(_0x1ee39f){logger[_0x611d('0xc')](_0x611d('0xd'),_0x4f9a77,'request\x20sent');logger[_0x611d('0xe')](_0x611d('0xf'),_0x4f9a77,_0x611d('0x10'),JSON['stringify'](_0x1ee39f));if(_0x1ee39f[_0x611d('0x11')]){if(_0x1ee39f[_0x611d('0x11')][_0x611d('0x12')]===0x1f4){logger[_0x611d('0x11')](_0x611d('0xd'),_0x4f9a77,_0x1ee39f[_0x611d('0x11')][_0x611d('0x13')]);return _0x1d6d25(_0x1ee39f['error'][_0x611d('0x13')]);}logger[_0x611d('0x11')](_0x611d('0xd'),_0x4f9a77,_0x1ee39f[_0x611d('0x11')][_0x611d('0x13')]);return _0x2822cf(_0x1ee39f['error'][_0x611d('0x13')]);}else{logger[_0x611d('0xc')](_0x611d('0xd'),_0x4f9a77,_0x611d('0x10'));_0x2822cf(_0x1ee39f[_0x611d('0x14')][_0x611d('0x13')]);}})[_0x611d('0x15')](function(_0xca36a3){logger['error'](_0x611d('0xd'),_0x4f9a77,_0xca36a3);_0x1d6d25(_0xca36a3);});});}exports['CreateVoiceDialReport']=function(_0x164f26){var _0x35ec90=this;return new Promise(function(_0x2f026d,_0x660868){return db[_0x611d('0x16')][_0x611d('0x17')](_0x164f26[_0x611d('0x18')],{'raw':_0x164f26[_0x611d('0x19')]?_0x164f26['options'][_0x611d('0x1a')]===undefined?!![]:![]:!![]})[_0x611d('0x1b')](function(_0x1257ef){logger[_0x611d('0xc')](_0x611d('0x1c'),_0x164f26);logger[_0x611d('0xe')](_0x611d('0x1c'),_0x164f26,JSON[_0x611d('0x1d')](_0x1257ef));_0x2f026d(_0x1257ef);})[_0x611d('0x15')](function(_0x3b9b33){logger[_0x611d('0x11')](_0x611d('0x1c'),_0x3b9b33[_0x611d('0x13')],_0x164f26);_0x660868(_0x35ec90['error'](0x1f4,_0x3b9b33[_0x611d('0x13')]));});});};exports[_0x611d('0x1e')]=function(_0x5bf89b){var _0x1bc6b8=this;return new Promise(function(_0x235580,_0x351d34){return db[_0x611d('0x16')][_0x611d('0x1f')](_0x5bf89b[_0x611d('0x18')],{'raw':_0x5bf89b['options']?_0x5bf89b[_0x611d('0x19')][_0x611d('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x5bf89b[_0x611d('0x19')]?_0x5bf89b[_0x611d('0x19')][_0x611d('0x20')]||null:null,'attributes':_0x5bf89b[_0x611d('0x19')]?_0x5bf89b[_0x611d('0x19')][_0x611d('0x21')]||null:null,'limit':_0x5bf89b[_0x611d('0x19')]?_0x5bf89b['options'][_0x611d('0x22')]||null:null})[_0x611d('0x1b')](function(_0x34b68c){logger[_0x611d('0xc')](_0x611d('0x1e'),_0x5bf89b);logger[_0x611d('0xe')](_0x611d('0x1e'),_0x5bf89b,JSON[_0x611d('0x1d')](_0x34b68c));_0x235580(_0x34b68c);})[_0x611d('0x15')](function(_0x526d5a){logger['error'](_0x611d('0x1e'),_0x526d5a[_0x611d('0x13')],_0x5bf89b);_0x351d34(_0x1bc6b8[_0x611d('0x11')](0x1f4,_0x526d5a[_0x611d('0x13')]));});});}; \ No newline at end of file diff --git a/server/api/voiceExtension/index.js b/server/api/voiceExtension/index.js index f8c4ecb..7e266e1 100644 --- a/server/api/voiceExtension/index.js +++ b/server/api/voiceExtension/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2ca4=['create','/:id/applications','addApplications','update','delete','destroy','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceExtension.controller','isAuthenticated','index','get','/:id','post'];(function(_0x153d32,_0x2831cb){var _0x51eefc=function(_0x44d3b0){while(--_0x44d3b0){_0x153d32['push'](_0x153d32['shift']());}};_0x51eefc(++_0x2831cb);}(_0x2ca4,0x1ea));var _0x42ca=function(_0x4287b6,_0x2d1db7){_0x4287b6=_0x4287b6-0x0;var _0x5a4f7e=_0x2ca4[_0x4287b6];return _0x5a4f7e;};'use strict';var multer=require(_0x42ca('0x0'));var util=require(_0x42ca('0x1'));var path=require(_0x42ca('0x2'));var timeout=require(_0x42ca('0x3'));var express=require(_0x42ca('0x4'));var router=express[_0x42ca('0x5')]();var fs_extra=require(_0x42ca('0x6'));var auth=require(_0x42ca('0x7'));var interaction=require(_0x42ca('0x8'));var config=require(_0x42ca('0x9'));var controller=require(_0x42ca('0xa'));router['get']('/',auth[_0x42ca('0xb')](),controller[_0x42ca('0xc')]);router[_0x42ca('0xd')](_0x42ca('0xe'),auth[_0x42ca('0xb')](),controller['show']);router[_0x42ca('0xf')]('/',auth['isAuthenticated'](),controller[_0x42ca('0x10')]);router[_0x42ca('0xf')](_0x42ca('0x11'),auth[_0x42ca('0xb')](),controller[_0x42ca('0x12')]);router['put']('/:id',auth[_0x42ca('0xb')](),controller[_0x42ca('0x13')]);router[_0x42ca('0x14')](_0x42ca('0xe'),auth[_0x42ca('0xb')](),controller[_0x42ca('0x15')]);module['exports']=router; \ No newline at end of file +var _0x574b=['update','delete','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','./voiceExtension.controller','get','/:id','isAuthenticated','show','post','/:id/applications','addApplications','put'];(function(_0x47a8c0,_0x4d5931){var _0x551fa1=function(_0x45ac5a){while(--_0x45ac5a){_0x47a8c0['push'](_0x47a8c0['shift']());}};_0x551fa1(++_0x4d5931);}(_0x574b,0x1a0));var _0xb574=function(_0xa30f56,_0x5d86d1){_0xa30f56=_0xa30f56-0x0;var _0x3ef3ff=_0x574b[_0xa30f56];return _0x3ef3ff;};'use strict';var multer=require(_0xb574('0x0'));var util=require(_0xb574('0x1'));var path=require(_0xb574('0x2'));var timeout=require(_0xb574('0x3'));var express=require('express');var router=express[_0xb574('0x4')]();var fs_extra=require(_0xb574('0x5'));var auth=require(_0xb574('0x6'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xb574('0x7'));router[_0xb574('0x8')]('/',auth['isAuthenticated'](),controller['index']);router[_0xb574('0x8')](_0xb574('0x9'),auth[_0xb574('0xa')](),controller[_0xb574('0xb')]);router[_0xb574('0xc')]('/',auth[_0xb574('0xa')](),controller['create']);router[_0xb574('0xc')](_0xb574('0xd'),auth[_0xb574('0xa')](),controller[_0xb574('0xe')]);router[_0xb574('0xf')]('/:id',auth[_0xb574('0xa')](),controller[_0xb574('0x10')]);router[_0xb574('0x11')](_0xb574('0x9'),auth[_0xb574('0xa')](),controller['destroy']);module['exports']=router; \ No newline at end of file diff --git a/server/api/voiceExtension/voiceExtension.attributes.js b/server/api/voiceExtension/voiceExtension.attributes.js index 38e0815..dcc8cd0 100644 --- a/server/api/voiceExtension/voiceExtension.attributes.js +++ b/server/api/voiceExtension/voiceExtension.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbaf0=['outbound','internal','inbound-fax','system','*,*,*,*','INTEGER','BOOLEAN','wav','getDataValue','exten','exports','STRING','compositeIndex','NoOp','ENUM','inbound'];(function(_0x176f15,_0x38060e){var _0x609eb9=function(_0x57dc2b){while(--_0x57dc2b){_0x176f15['push'](_0x176f15['shift']());}};_0x609eb9(++_0x38060e);}(_0xbaf0,0x12a));var _0x0baf=function(_0x432682,_0x253044){_0x432682=_0x432682-0x0;var _0x463d05=_0xbaf0[_0x432682];return _0x463d05;};'use strict';var Sequelize=require('sequelize');module[_0x0baf('0x0')]={'context':{'type':Sequelize[_0x0baf('0x1')],'allowNull':![],'unique':_0x0baf('0x2'),'validate':{'notEmpty':!![],'is':/[A-Za-z0-9._\+*!\-\[\]]+$/i}},'exten':{'type':Sequelize[_0x0baf('0x1')],'allowNull':![],'unique':_0x0baf('0x2')},'priority':{'type':Sequelize[_0x0baf('0x1')],'allowNull':![],'defaultValue':'1','unique':'compositeIndex'},'tag':{'type':Sequelize[_0x0baf('0x1')],'allowNull':![],'defaultValue':'--'},'app':{'type':Sequelize[_0x0baf('0x1')],'allowNull':![],'defaultValue':_0x0baf('0x3')},'appdata':{'type':Sequelize[_0x0baf('0x1')](0x1000),'allowNull':!![],'defaultValue':''},'type':{'type':Sequelize[_0x0baf('0x4')](_0x0baf('0x5'),_0x0baf('0x6'),_0x0baf('0x7'),_0x0baf('0x8'),'outbound-fax',_0x0baf('0x9'),'any'),'allowNull':![]},'description':{'type':Sequelize[_0x0baf('0x1')]},'interval':{'type':Sequelize[_0x0baf('0x1')],'allowNull':![],'defaultValue':_0x0baf('0xa')},'IntervalId':{'type':Sequelize[_0x0baf('0xb')]},'isApp':{'type':Sequelize[_0x0baf('0xc')],'allowNull':![],'defaultValue':![]},'appType':{'type':Sequelize[_0x0baf('0x1')],'defaultValue':null},'callerID':{'type':Sequelize[_0x0baf('0x1')],'allowNull':!![]},'record':{'type':Sequelize[_0x0baf('0xc')],'defaultValue':![]},'cutdigits':{'type':Sequelize[_0x0baf('0xb')]},'recordingFormat':{'type':Sequelize[_0x0baf('0x1')],'defaultValue':_0x0baf('0xd')},'answer':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'name':{'type':Sequelize['VIRTUAL'],'get':function(_0x465dd7){return this[_0x0baf('0xe')](_0x0baf('0xf'));}}}; \ No newline at end of file +var _0xb10b=['system','any','*,*,*,*','INTEGER','BOOLEAN','wav','VIRTUAL','getDataValue','exten','sequelize','STRING','compositeIndex','NoOp','inbound','outbound','inbound-fax','outbound-fax'];(function(_0x6fdf78,_0x178b43){var _0x5de43e=function(_0x239e42){while(--_0x239e42){_0x6fdf78['push'](_0x6fdf78['shift']());}};_0x5de43e(++_0x178b43);}(_0xb10b,0x12a));var _0xbb10=function(_0x452f5b,_0x5389d1){_0x452f5b=_0x452f5b-0x0;var _0x33e5e2=_0xb10b[_0x452f5b];return _0x33e5e2;};'use strict';var Sequelize=require(_0xbb10('0x0'));module['exports']={'context':{'type':Sequelize[_0xbb10('0x1')],'allowNull':![],'unique':_0xbb10('0x2'),'validate':{'notEmpty':!![],'is':/[A-Za-z0-9._\+*!\-\[\]]+$/i}},'exten':{'type':Sequelize[_0xbb10('0x1')],'allowNull':![],'unique':'compositeIndex'},'priority':{'type':Sequelize[_0xbb10('0x1')],'allowNull':![],'defaultValue':'1','unique':_0xbb10('0x2')},'tag':{'type':Sequelize[_0xbb10('0x1')],'allowNull':![],'defaultValue':'--'},'app':{'type':Sequelize[_0xbb10('0x1')],'allowNull':![],'defaultValue':_0xbb10('0x3')},'appdata':{'type':Sequelize[_0xbb10('0x1')](0x1000),'allowNull':!![],'defaultValue':''},'type':{'type':Sequelize['ENUM'](_0xbb10('0x4'),_0xbb10('0x5'),'internal',_0xbb10('0x6'),_0xbb10('0x7'),_0xbb10('0x8'),_0xbb10('0x9')),'allowNull':![]},'description':{'type':Sequelize[_0xbb10('0x1')]},'interval':{'type':Sequelize[_0xbb10('0x1')],'allowNull':![],'defaultValue':_0xbb10('0xa')},'IntervalId':{'type':Sequelize[_0xbb10('0xb')]},'isApp':{'type':Sequelize['BOOLEAN'],'allowNull':![],'defaultValue':![]},'appType':{'type':Sequelize['STRING'],'defaultValue':null},'callerID':{'type':Sequelize[_0xbb10('0x1')],'allowNull':!![]},'record':{'type':Sequelize[_0xbb10('0xc')],'defaultValue':![]},'cutdigits':{'type':Sequelize[_0xbb10('0xb')]},'recordingFormat':{'type':Sequelize['STRING'],'defaultValue':_0xbb10('0xd')},'answer':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'name':{'type':Sequelize[_0xbb10('0xe')],'get':function(_0x916a32){return this[_0xbb10('0xf')](_0xbb10('0x10'));}}}; \ No newline at end of file diff --git a/server/api/voiceExtension/voiceExtension.controller.js b/server/api/voiceExtension/voiceExtension.controller.js index d1578f5..62d70fd 100644 --- a/server/api/voiceExtension/voiceExtension.controller.js +++ b/server/api/voiceExtension/voiceExtension.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x032e=['ignore','map','type','find','value','name','UserProfileResource','stack','send','index','rawAttributes','key','query','keys','filters','intersection','model','attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick','merge','VIRTUAL','options','VoiceExtension','include','findAll','rows','catch','show','params','length','includeAll','create','body','startsWith','exten','concat','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','InternalRoutes','internal','UserProfileSection','userProfileId','autoAssociation','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','context','description','recordingFormat','cutdigits','mandatoryDisposition','sequelize','transaction','VoiceExtensionId','bulkCreate','findAndCountAll','eml-format','zip-dir','fast-json-patch','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','redis','defaults','localhost','./voiceExtension.socket','register','sendStatus','end','status','json','offset','undefined','count','limit','Content-Range','apply','reject','save','update','then','destroy','get','InboundRoutes','inbound','OutboundRoutes','outbound','filter'];(function(_0x1bd61b,_0x1366d8){var _0x1dd806=function(_0x328fd9){while(--_0x328fd9){_0x1bd61b['push'](_0x1bd61b['shift']());}};_0x1dd806(++_0x1366d8);}(_0x032e,0x124));var _0xe032=function(_0x5783f4,_0x4a9e0a){_0x5783f4=_0x5783f4-0x0;var _0x28e380=_0x032e[_0x5783f4];return _0x28e380;};'use strict';var emlformat=require(_0xe032('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xe032('0x1'));var jsonpatch=require(_0xe032('0x2'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0xe032('0x3'));var Mustache=require(_0xe032('0x4'));var util=require(_0xe032('0x5'));var path=require(_0xe032('0x6'));var sox=require(_0xe032('0x7'));var csv=require(_0xe032('0x8'));var ejs=require(_0xe032('0x9'));var fs=require('fs');var fs_extra=require(_0xe032('0xa'));var _=require(_0xe032('0xb'));var squel=require(_0xe032('0xc'));var crypto=require(_0xe032('0xd'));var jsforce=require(_0xe032('0xe'));var deskjs=require(_0xe032('0xf'));var toCsv=require(_0xe032('0x8'));var querystring=require(_0xe032('0x10'));var Papa=require(_0xe032('0x11'));var Redis=require(_0xe032('0x12'));var authService=require(_0xe032('0x13'));var qs=require('../../components/parsers/qs');var as=require(_0xe032('0x14'));var hardwareService=require(_0xe032('0x15'));var logger=require(_0xe032('0x16'))(_0xe032('0x17'));var utils=require(_0xe032('0x18'));var config=require(_0xe032('0x19'));var licenseUtil=require(_0xe032('0x1a'));var db=require('../../mysqldb')['db'];config[_0xe032('0x1b')]=_[_0xe032('0x1c')](config[_0xe032('0x1b')],{'host':_0xe032('0x1d'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xe032('0x1b')]));require(_0xe032('0x1e'))[_0xe032('0x1f')](socket);function respondWithStatusCode(_0x422e96,_0x17b3aa){_0x17b3aa=_0x17b3aa||0xcc;return function(_0x3d92cb){if(_0x3d92cb){return _0x422e96[_0xe032('0x20')](_0x17b3aa);}return _0x422e96['status'](_0x17b3aa)[_0xe032('0x21')]();};}function respondWithResult(_0x749018,_0x36fb7c){_0x36fb7c=_0x36fb7c||0xc8;return function(_0x3b57d3){if(_0x3b57d3){return _0x749018[_0xe032('0x22')](_0x36fb7c)[_0xe032('0x23')](_0x3b57d3);}};}function respondWithFilteredResult(_0x4cdab3,_0x155f72){return function(_0x25cedb){if(_0x25cedb){var _0x1f9298=typeof _0x155f72[_0xe032('0x24')]===_0xe032('0x25')&&typeof _0x155f72['limit']==='undefined';var _0x484e6c=_0x25cedb[_0xe032('0x26')];var _0x505d8c=_0x1f9298?0x0:_0x155f72[_0xe032('0x24')];var _0x4608e4=_0x1f9298?_0x25cedb[_0xe032('0x26')]:_0x155f72[_0xe032('0x24')]+_0x155f72[_0xe032('0x27')];var _0x256f71;if(_0x4608e4>=_0x484e6c){_0x4608e4=_0x484e6c;_0x256f71=0xc8;}else{_0x256f71=0xce;}_0x4cdab3[_0xe032('0x22')](_0x256f71);return _0x4cdab3['set'](_0xe032('0x28'),_0x505d8c+'-'+_0x4608e4+'/'+_0x484e6c)[_0xe032('0x23')](_0x25cedb);}return null;};}function patchUpdates(_0x232e8f){return function(_0x2be433){try{jsonpatch[_0xe032('0x29')](_0x2be433,_0x232e8f,!![]);}catch(_0x33d89a){return BPromise[_0xe032('0x2a')](_0x33d89a);}return _0x2be433[_0xe032('0x2b')]();};}function saveUpdates(_0x499da5,_0x4f1aa3){return function(_0x4d8ded){if(_0x4d8ded){return _0x4d8ded[_0xe032('0x2c')](_0x499da5)[_0xe032('0x2d')](function(_0x302559){return _0x302559;});}return null;};}function removeEntity(_0x2a56e5,_0x2bfe8f){return function(_0x200671){if(_0x200671){return _0x200671[_0xe032('0x2e')]()[_0xe032('0x2d')](function(){var _0x4dcbf1=_0x200671[_0xe032('0x2f')]({'plain':!![]});var _0x5bb36a=[{'name':_0xe032('0x30'),'value':_0xe032('0x31'),'ignore':![]},{'name':_0xe032('0x32'),'value':_0xe032('0x33'),'ignore':![]},{'name':'InternalRoutes','value':'internal','ignore':![]}];var _0x3e2575=_(_0x5bb36a)[_0xe032('0x34')](_0xe032('0x35'))[_0xe032('0x36')]('value')['value']();if(_['includes'](_0x3e2575,_0x4dcbf1[_0xe032('0x37')])){return;}var _0x1dd34f=_[_0xe032('0x38')](_0x5bb36a,[_0xe032('0x39'),_0x4dcbf1['type']])[_0xe032('0x3a')];return db[_0xe032('0x3b')][_0xe032('0x2e')]({'where':{'type':_0x1dd34f,'resourceId':_0x4dcbf1['id']}})[_0xe032('0x2d')](function(){return _0x200671;});})[_0xe032('0x2d')](function(){_0x2a56e5['status'](0xcc)[_0xe032('0x21')]();});}};}function handleEntityNotFound(_0x33634c,_0x319a2f){return function(_0x2cc18c){if(!_0x2cc18c){_0x33634c['sendStatus'](0x194);}return _0x2cc18c;};}function handleError(_0x44b78b,_0x4c86e9){_0x4c86e9=_0x4c86e9||0x1f4;return function(_0x2f3e59){logger['error'](_0x2f3e59[_0xe032('0x3c')]);if(_0x2f3e59['name']){delete _0x2f3e59[_0xe032('0x3a')];}_0x44b78b['status'](_0x4c86e9)[_0xe032('0x3d')](_0x2f3e59);};}exports[_0xe032('0x3e')]=function(_0x55fac1,_0x3e3598){var _0x2fdf41={},_0x253558={},_0x2620d2={'count':0x0,'rows':[]};var _0x4e222c=_[_0xe032('0x36')](db['VoiceExtension'][_0xe032('0x3f')],function(_0x1a5df7){return{'name':_0x1a5df7['fieldName'],'type':_0x1a5df7[_0xe032('0x37')][_0xe032('0x40')]};});_0x253558['model']=_[_0xe032('0x36')](_0x4e222c,_0xe032('0x3a'));_0x253558[_0xe032('0x41')]=_[_0xe032('0x42')](_0x55fac1[_0xe032('0x41')]);_0x253558[_0xe032('0x43')]=_[_0xe032('0x44')](_0x253558[_0xe032('0x45')],_0x253558[_0xe032('0x41')]);_0x2fdf41[_0xe032('0x46')]=_[_0xe032('0x44')](_0x253558[_0xe032('0x45')],qs[_0xe032('0x47')](_0x55fac1[_0xe032('0x41')][_0xe032('0x47')]));_0x2fdf41[_0xe032('0x46')]=_0x2fdf41[_0xe032('0x46')]['length']?_0x2fdf41[_0xe032('0x46')]:_0x253558['model'];if(!_0x55fac1[_0xe032('0x41')][_0xe032('0x48')](_0xe032('0x49'))){_0x2fdf41[_0xe032('0x27')]=qs[_0xe032('0x27')](_0x55fac1['query'][_0xe032('0x27')]);_0x2fdf41['offset']=qs[_0xe032('0x24')](_0x55fac1['query'][_0xe032('0x24')]);}_0x2fdf41[_0xe032('0x4a')]=qs[_0xe032('0x4b')](_0x55fac1[_0xe032('0x41')]['sort']);_0x2fdf41[_0xe032('0x4c')]=qs['filters'](_[_0xe032('0x4d')](_0x55fac1[_0xe032('0x41')],_0x253558[_0xe032('0x43')]),_0x4e222c);if(_0x55fac1[_0xe032('0x41')]['filter']){_0x2fdf41['where']=_[_0xe032('0x4e')](_0x2fdf41[_0xe032('0x4c')],{'$or':_['map'](_0x4e222c,function(_0x45dac8){if(_0x45dac8[_0xe032('0x37')]!==_0xe032('0x4f')){var _0x2cfedf={};_0x2cfedf[_0x45dac8[_0xe032('0x3a')]]={'$like':'%'+_0x55fac1['query'][_0xe032('0x34')]+'%'};return _0x2cfedf;}})});}_0x2fdf41=_[_0xe032('0x4e')]({},_0x2fdf41,_0x55fac1[_0xe032('0x50')]);var _0x753009={'where':_0x2fdf41[_0xe032('0x4c')]};return db[_0xe032('0x51')][_0xe032('0x26')](_0x753009)[_0xe032('0x2d')](function(_0x5d21e6){_0x2620d2['count']=_0x5d21e6;if(_0x55fac1[_0xe032('0x41')]['includeAll']){_0x2fdf41[_0xe032('0x52')]=[{'all':!![]}];}return db[_0xe032('0x51')][_0xe032('0x53')](_0x2fdf41);})[_0xe032('0x2d')](function(_0xe99b6b){_0x2620d2[_0xe032('0x54')]=_0xe99b6b;return _0x2620d2;})[_0xe032('0x2d')](respondWithFilteredResult(_0x3e3598,_0x2fdf41))[_0xe032('0x55')](handleError(_0x3e3598,null));};exports[_0xe032('0x56')]=function(_0x5a4a19,_0x1549c){var _0x565e8e={'raw':![],'where':{'id':_0x5a4a19[_0xe032('0x57')]['id']}},_0x5378cb={};_0x5378cb[_0xe032('0x45')]=_[_0xe032('0x42')](db[_0xe032('0x51')]['rawAttributes']);_0x5378cb[_0xe032('0x41')]=_[_0xe032('0x42')](_0x5a4a19[_0xe032('0x41')]);_0x5378cb[_0xe032('0x43')]=_[_0xe032('0x44')](_0x5378cb[_0xe032('0x45')],_0x5378cb[_0xe032('0x41')]);_0x565e8e['attributes']=_[_0xe032('0x44')](_0x5378cb[_0xe032('0x45')],qs['fields'](_0x5a4a19[_0xe032('0x41')][_0xe032('0x47')]));_0x565e8e[_0xe032('0x46')]=_0x565e8e[_0xe032('0x46')][_0xe032('0x58')]?_0x565e8e[_0xe032('0x46')]:_0x5378cb[_0xe032('0x45')];if(_0x5a4a19[_0xe032('0x41')][_0xe032('0x59')]){_0x565e8e[_0xe032('0x52')]=[{'all':!![]}];}_0x565e8e=_[_0xe032('0x4e')]({},_0x565e8e,_0x5a4a19[_0xe032('0x50')]);return db[_0xe032('0x51')][_0xe032('0x38')](_0x565e8e)['then'](handleEntityNotFound(_0x1549c,null))[_0xe032('0x2d')](respondWithResult(_0x1549c,null))['catch'](handleError(_0x1549c,null));};exports[_0xe032('0x2e')]=function(_0x36ec12,_0x2fc0ac){return db[_0xe032('0x51')][_0xe032('0x38')]({'where':{'id':_0x36ec12[_0xe032('0x57')]['id']}})[_0xe032('0x2d')](handleEntityNotFound(_0x2fc0ac,null))[_0xe032('0x2d')](removeEntity(_0x2fc0ac,null))[_0xe032('0x55')](handleError(_0x2fc0ac,null));};exports[_0xe032('0x5a')]=function(_0x1b9012,_0x564fe0){if(_0x1b9012[_0xe032('0x5b')][_0xe032('0x37')]==='outbound'&&!_[_0xe032('0x5c')](_0x1b9012['body'][_0xe032('0x5d')],'_')){_0x1b9012[_0xe032('0x5b')][_0xe032('0x5d')]='_'[_0xe032('0x5e')](_0x1b9012[_0xe032('0x5b')]['exten']);}return db[_0xe032('0x51')][_0xe032('0x5a')](_0x1b9012[_0xe032('0x5b')],{'raw':![]})[_0xe032('0x2d')](function(_0x439859){var _0x2f83a5=_0x1b9012[_0xe032('0x5f')]['get']({'plain':!![]});if(!_0x2f83a5)throw new Error(_0xe032('0x60'));if(_0x2f83a5[_0xe032('0x61')]===_0xe032('0x5f')){var _0x15325e=_0x439859[_0xe032('0x2f')]({'plain':!![]});var _0x42c0d7=[{'name':_0xe032('0x30'),'value':_0xe032('0x31')},{'name':_0xe032('0x32'),'value':'outbound'},{'name':_0xe032('0x62'),'value':_0xe032('0x63')}];var _0x366b73=_['find'](_0x42c0d7,[_0xe032('0x39'),_0x15325e[_0xe032('0x37')]])['name'];return db[_0xe032('0x64')][_0xe032('0x38')]({'where':{'name':_0x366b73,'userProfileId':_0x2f83a5[_0xe032('0x65')]},'raw':!![]})[_0xe032('0x2d')](function(_0x265b50){if(_0x265b50&&_0x265b50[_0xe032('0x66')]===0x0){return db[_0xe032('0x3b')][_0xe032('0x5a')]({'name':_0x15325e[_0xe032('0x3a')],'resourceId':_0x15325e['id'],'type':_0x265b50[_0xe032('0x3a')],'sectionId':_0x265b50['id']},{})[_0xe032('0x2d')](function(){return _0x439859;});}else{return _0x439859;}})['catch'](function(_0x2fcccc){logger[_0xe032('0x67')](_0xe032('0x68'),_0x2fcccc);throw _0x2fcccc;});}return _0x439859;})[_0xe032('0x2d')](respondWithResult(_0x564fe0,0xc9))[_0xe032('0x55')](handleError(_0x564fe0,null));};exports['update']=function(_0x2b6ef8,_0x55e6b0){if(_0x2b6ef8[_0xe032('0x5b')]['id']){delete _0x2b6ef8[_0xe032('0x5b')]['id'];}return db[_0xe032('0x51')][_0xe032('0x38')]({'where':{'id':_0x2b6ef8[_0xe032('0x57')]['id']}})[_0xe032('0x2d')](handleEntityNotFound(_0x55e6b0,null))[_0xe032('0x2d')](function(_0x2382bb){if(_0x2382bb){return db[_0xe032('0x51')]['update'](_['pick'](_0x2b6ef8['body'],[_0xe032('0x5d'),_0xe032('0x69'),_0xe032('0x6a'),_0xe032('0x6b'),_0xe032('0x6c'),_0xe032('0x6d')]),{'where':{'context':_0x2382bb['context'],'exten':_0x2382bb[_0xe032('0x5d')]},'individualHooks':!![]})[_0xe032('0x2d')](function(_0x1018d4){return _0x1018d4;});}return null;})['then'](respondWithStatusCode(_0x55e6b0,null))[_0xe032('0x55')](handleError(_0x55e6b0,null));};exports['addApplications']=function(_0x1f5d15,_0x2b7904,_0x48063d){return db['VoiceExtension']['findOne']({'where':{'id':_0x1f5d15[_0xe032('0x57')]['id']}})['then'](handleEntityNotFound(_0x2b7904,null))['then'](function(_0x309f2c){if(_0x309f2c){return db[_0xe032('0x6e')][_0xe032('0x6f')](function(_0x4ed078){return db[_0xe032('0x51')]['destroy']({'where':{'VoiceExtensionId':_0x1f5d15[_0xe032('0x57')]['id']},'transaction':_0x4ed078})[_0xe032('0x2d')](function(_0x3b9dee){var _0x7be5b8=_[_0xe032('0x36')](_0x1f5d15[_0xe032('0x5b')],function(_0x260fdb){_0x260fdb[_0xe032('0x70')]=_0x1f5d15[_0xe032('0x57')]['id'];return _0x260fdb;});return db[_0xe032('0x51')][_0xe032('0x71')](_0x7be5b8,{'transaction':_0x4ed078});});})['then'](function(){return db[_0xe032('0x51')][_0xe032('0x72')]({'where':{'isApp':!![],'VoiceExtensionId':_0x1f5d15['params']['id']},'order':'cast(priority\x20as\x20unsigned)'});});}})[_0xe032('0x2d')](respondWithResult(_0x2b7904,null))[_0xe032('0x55')](handleError(_0x2b7904,null));}; \ No newline at end of file +var _0x769c=['send','index','VoiceExtension','fieldName','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','offset','order','sort','pick','where','merge','options','includeAll','findAll','catch','params','rawAttributes','include','create','startsWith','body','exten','concat','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','get','InternalRoutes','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','description','recordingFormat','cutdigits','mandatoryDisposition','context','addApplications','findOne','transaction','bulkCreate','findAndCountAll','eml-format','zip-dir','fast-json-patch','bluebird','mustache','util','path','to-csv','ejs','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./voiceExtension.socket','status','end','undefined','limit','count','set','Content-Range','apply','reject','save','then','InboundRoutes','inbound','OutboundRoutes','outbound','internal','filter','map','value','includes','type','find','name','UserProfileResource','destroy','stack'];(function(_0x189ce1,_0xd2a0a6){var _0x3af212=function(_0x3094d4){while(--_0x3094d4){_0x189ce1['push'](_0x189ce1['shift']());}};_0x3af212(++_0xd2a0a6);}(_0x769c,0x96));var _0xc769=function(_0x40a045,_0x516f0e){_0x40a045=_0x40a045-0x0;var _0x1a687c=_0x769c[_0x40a045];return _0x1a687c;};'use strict';var emlformat=require(_0xc769('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xc769('0x1'));var jsonpatch=require(_0xc769('0x2'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0xc769('0x3'));var Mustache=require(_0xc769('0x4'));var util=require(_0xc769('0x5'));var path=require(_0xc769('0x6'));var sox=require('sox');var csv=require(_0xc769('0x7'));var ejs=require(_0xc769('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0xc769('0x9'));var crypto=require(_0xc769('0xa'));var jsforce=require(_0xc769('0xb'));var deskjs=require(_0xc769('0xc'));var toCsv=require(_0xc769('0x7'));var querystring=require(_0xc769('0xd'));var Papa=require(_0xc769('0xe'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0xc769('0xf'));var hardwareService=require(_0xc769('0x10'));var logger=require(_0xc769('0x11'))('api');var utils=require(_0xc769('0x12'));var config=require('../../config/environment');var licenseUtil=require(_0xc769('0x13'));var db=require(_0xc769('0x14'))['db'];config[_0xc769('0x15')]=_[_0xc769('0x16')](config[_0xc769('0x15')],{'host':_0xc769('0x17'),'port':0x18eb});var socket=require(_0xc769('0x18'))(new Redis(config[_0xc769('0x15')]));require(_0xc769('0x19'))['register'](socket);function respondWithStatusCode(_0x511541,_0x5bd29b){_0x5bd29b=_0x5bd29b||0xcc;return function(_0x3b1422){if(_0x3b1422){return _0x511541['sendStatus'](_0x5bd29b);}return _0x511541[_0xc769('0x1a')](_0x5bd29b)[_0xc769('0x1b')]();};}function respondWithResult(_0x456c2c,_0x3d605d){_0x3d605d=_0x3d605d||0xc8;return function(_0x297193){if(_0x297193){return _0x456c2c[_0xc769('0x1a')](_0x3d605d)['json'](_0x297193);}};}function respondWithFilteredResult(_0x53ac3f,_0x5df830){return function(_0x4ccb15){if(_0x4ccb15){var _0x5a5374=typeof _0x5df830['offset']===_0xc769('0x1c')&&typeof _0x5df830[_0xc769('0x1d')]===_0xc769('0x1c');var _0x228875=_0x4ccb15[_0xc769('0x1e')];var _0x24b5fe=_0x5a5374?0x0:_0x5df830['offset'];var _0x42e32c=_0x5a5374?_0x4ccb15[_0xc769('0x1e')]:_0x5df830['offset']+_0x5df830[_0xc769('0x1d')];var _0x5706c0;if(_0x42e32c>=_0x228875){_0x42e32c=_0x228875;_0x5706c0=0xc8;}else{_0x5706c0=0xce;}_0x53ac3f['status'](_0x5706c0);return _0x53ac3f[_0xc769('0x1f')](_0xc769('0x20'),_0x24b5fe+'-'+_0x42e32c+'/'+_0x228875)['json'](_0x4ccb15);}return null;};}function patchUpdates(_0x113b37){return function(_0xd2a4b){try{jsonpatch[_0xc769('0x21')](_0xd2a4b,_0x113b37,!![]);}catch(_0x31954b){return BPromise[_0xc769('0x22')](_0x31954b);}return _0xd2a4b[_0xc769('0x23')]();};}function saveUpdates(_0x180830,_0x201e9a){return function(_0x473e93){if(_0x473e93){return _0x473e93['update'](_0x180830)['then'](function(_0x5ac6ce){return _0x5ac6ce;});}return null;};}function removeEntity(_0x5e2ec7,_0x46fca2){return function(_0x30d413){if(_0x30d413){return _0x30d413['destroy']()[_0xc769('0x24')](function(){var _0x4e11be=_0x30d413['get']({'plain':!![]});var _0x3ead3a=[{'name':_0xc769('0x25'),'value':_0xc769('0x26'),'ignore':![]},{'name':_0xc769('0x27'),'value':_0xc769('0x28'),'ignore':![]},{'name':'InternalRoutes','value':_0xc769('0x29'),'ignore':![]}];var _0x4b832d=_(_0x3ead3a)[_0xc769('0x2a')]('ignore')[_0xc769('0x2b')](_0xc769('0x2c'))[_0xc769('0x2c')]();if(_[_0xc769('0x2d')](_0x4b832d,_0x4e11be[_0xc769('0x2e')])){return;}var _0x4067bd=_[_0xc769('0x2f')](_0x3ead3a,[_0xc769('0x2c'),_0x4e11be[_0xc769('0x2e')]])[_0xc769('0x30')];return db[_0xc769('0x31')][_0xc769('0x32')]({'where':{'type':_0x4067bd,'resourceId':_0x4e11be['id']}})[_0xc769('0x24')](function(){return _0x30d413;});})['then'](function(){_0x5e2ec7[_0xc769('0x1a')](0xcc)[_0xc769('0x1b')]();});}};}function handleEntityNotFound(_0x430330,_0x55982d){return function(_0x1d63e2){if(!_0x1d63e2){_0x430330['sendStatus'](0x194);}return _0x1d63e2;};}function handleError(_0x591107,_0x41dcd1){_0x41dcd1=_0x41dcd1||0x1f4;return function(_0x2da58b){logger['error'](_0x2da58b[_0xc769('0x33')]);if(_0x2da58b[_0xc769('0x30')]){delete _0x2da58b[_0xc769('0x30')];}_0x591107[_0xc769('0x1a')](_0x41dcd1)[_0xc769('0x34')](_0x2da58b);};}exports[_0xc769('0x35')]=function(_0x6c2ded,_0xf9447b){var _0x5d8ca3={},_0x495c6d={},_0x4b3f2f={'count':0x0,'rows':[]};var _0x5aff67=_[_0xc769('0x2b')](db[_0xc769('0x36')]['rawAttributes'],function(_0x384d31){return{'name':_0x384d31[_0xc769('0x37')],'type':_0x384d31[_0xc769('0x2e')]['key']};});_0x495c6d[_0xc769('0x38')]=_[_0xc769('0x2b')](_0x5aff67,'name');_0x495c6d[_0xc769('0x39')]=_[_0xc769('0x3a')](_0x6c2ded[_0xc769('0x39')]);_0x495c6d[_0xc769('0x3b')]=_[_0xc769('0x3c')](_0x495c6d[_0xc769('0x38')],_0x495c6d[_0xc769('0x39')]);_0x5d8ca3[_0xc769('0x3d')]=_[_0xc769('0x3c')](_0x495c6d[_0xc769('0x38')],qs[_0xc769('0x3e')](_0x6c2ded[_0xc769('0x39')][_0xc769('0x3e')]));_0x5d8ca3[_0xc769('0x3d')]=_0x5d8ca3[_0xc769('0x3d')][_0xc769('0x3f')]?_0x5d8ca3[_0xc769('0x3d')]:_0x495c6d['model'];if(!_0x6c2ded['query'][_0xc769('0x40')]('nolimit')){_0x5d8ca3[_0xc769('0x1d')]=qs[_0xc769('0x1d')](_0x6c2ded['query'][_0xc769('0x1d')]);_0x5d8ca3['offset']=qs[_0xc769('0x41')](_0x6c2ded['query'][_0xc769('0x41')]);}_0x5d8ca3[_0xc769('0x42')]=qs[_0xc769('0x43')](_0x6c2ded['query'][_0xc769('0x43')]);_0x5d8ca3['where']=qs[_0xc769('0x3b')](_[_0xc769('0x44')](_0x6c2ded[_0xc769('0x39')],_0x495c6d[_0xc769('0x3b')]),_0x5aff67);if(_0x6c2ded[_0xc769('0x39')][_0xc769('0x2a')]){_0x5d8ca3[_0xc769('0x45')]=_['merge'](_0x5d8ca3[_0xc769('0x45')],{'$or':_[_0xc769('0x2b')](_0x5aff67,function(_0x1b33b6){if(_0x1b33b6[_0xc769('0x2e')]!=='VIRTUAL'){var _0x2063b4={};_0x2063b4[_0x1b33b6['name']]={'$like':'%'+_0x6c2ded['query'][_0xc769('0x2a')]+'%'};return _0x2063b4;}})});}_0x5d8ca3=_[_0xc769('0x46')]({},_0x5d8ca3,_0x6c2ded[_0xc769('0x47')]);var _0x120a76={'where':_0x5d8ca3['where']};return db[_0xc769('0x36')]['count'](_0x120a76)['then'](function(_0x32a788){_0x4b3f2f[_0xc769('0x1e')]=_0x32a788;if(_0x6c2ded[_0xc769('0x39')][_0xc769('0x48')]){_0x5d8ca3['include']=[{'all':!![]}];}return db[_0xc769('0x36')][_0xc769('0x49')](_0x5d8ca3);})['then'](function(_0x3278b6){_0x4b3f2f['rows']=_0x3278b6;return _0x4b3f2f;})[_0xc769('0x24')](respondWithFilteredResult(_0xf9447b,_0x5d8ca3))[_0xc769('0x4a')](handleError(_0xf9447b,null));};exports['show']=function(_0x2d8096,_0x15041f){var _0x354fed={'raw':![],'where':{'id':_0x2d8096[_0xc769('0x4b')]['id']}},_0x144f5a={};_0x144f5a['model']=_[_0xc769('0x3a')](db[_0xc769('0x36')][_0xc769('0x4c')]);_0x144f5a[_0xc769('0x39')]=_[_0xc769('0x3a')](_0x2d8096[_0xc769('0x39')]);_0x144f5a[_0xc769('0x3b')]=_[_0xc769('0x3c')](_0x144f5a['model'],_0x144f5a[_0xc769('0x39')]);_0x354fed[_0xc769('0x3d')]=_[_0xc769('0x3c')](_0x144f5a['model'],qs[_0xc769('0x3e')](_0x2d8096[_0xc769('0x39')][_0xc769('0x3e')]));_0x354fed[_0xc769('0x3d')]=_0x354fed[_0xc769('0x3d')][_0xc769('0x3f')]?_0x354fed[_0xc769('0x3d')]:_0x144f5a[_0xc769('0x38')];if(_0x2d8096[_0xc769('0x39')][_0xc769('0x48')]){_0x354fed[_0xc769('0x4d')]=[{'all':!![]}];}_0x354fed=_[_0xc769('0x46')]({},_0x354fed,_0x2d8096['options']);return db[_0xc769('0x36')]['find'](_0x354fed)[_0xc769('0x24')](handleEntityNotFound(_0x15041f,null))[_0xc769('0x24')](respondWithResult(_0x15041f,null))['catch'](handleError(_0x15041f,null));};exports[_0xc769('0x32')]=function(_0x553328,_0x2717cb){return db[_0xc769('0x36')]['find']({'where':{'id':_0x553328[_0xc769('0x4b')]['id']}})[_0xc769('0x24')](handleEntityNotFound(_0x2717cb,null))[_0xc769('0x24')](removeEntity(_0x2717cb,null))[_0xc769('0x4a')](handleError(_0x2717cb,null));};exports[_0xc769('0x4e')]=function(_0x21b848,_0x1b7a66){if(_0x21b848['body'][_0xc769('0x2e')]===_0xc769('0x28')&&!_[_0xc769('0x4f')](_0x21b848[_0xc769('0x50')][_0xc769('0x51')],'_')){_0x21b848[_0xc769('0x50')][_0xc769('0x51')]='_'[_0xc769('0x52')](_0x21b848[_0xc769('0x50')][_0xc769('0x51')]);}return db[_0xc769('0x36')][_0xc769('0x4e')](_0x21b848[_0xc769('0x50')],{'raw':![]})['then'](function(_0x222377){var _0x34e04e=_0x21b848[_0xc769('0x53')]['get']({'plain':!![]});if(!_0x34e04e)throw new Error(_0xc769('0x54'));if(_0x34e04e['role']===_0xc769('0x53')){var _0x4b34c4=_0x222377[_0xc769('0x55')]({'plain':!![]});var _0x1f953e=[{'name':_0xc769('0x25'),'value':'inbound'},{'name':'OutboundRoutes','value':_0xc769('0x28')},{'name':_0xc769('0x56'),'value':_0xc769('0x29')}];var _0x14235c=_[_0xc769('0x2f')](_0x1f953e,[_0xc769('0x2c'),_0x4b34c4[_0xc769('0x2e')]])[_0xc769('0x30')];return db['UserProfileSection']['find']({'where':{'name':_0x14235c,'userProfileId':_0x34e04e[_0xc769('0x57')]},'raw':!![]})[_0xc769('0x24')](function(_0x272f9e){if(_0x272f9e&&_0x272f9e[_0xc769('0x58')]===0x0){return db['UserProfileResource'][_0xc769('0x4e')]({'name':_0x4b34c4[_0xc769('0x30')],'resourceId':_0x4b34c4['id'],'type':_0x272f9e[_0xc769('0x30')],'sectionId':_0x272f9e['id']},{})[_0xc769('0x24')](function(){return _0x222377;});}else{return _0x222377;}})['catch'](function(_0x545893){logger['error'](_0xc769('0x59'),_0x545893);throw _0x545893;});}return _0x222377;})['then'](respondWithResult(_0x1b7a66,0xc9))[_0xc769('0x4a')](handleError(_0x1b7a66,null));};exports[_0xc769('0x5a')]=function(_0x2e2428,_0x3651c9){if(_0x2e2428['body']['id']){delete _0x2e2428[_0xc769('0x50')]['id'];}return db['VoiceExtension'][_0xc769('0x2f')]({'where':{'id':_0x2e2428['params']['id']}})['then'](handleEntityNotFound(_0x3651c9,null))[_0xc769('0x24')](function(_0x31cf68){if(_0x31cf68){return db[_0xc769('0x36')][_0xc769('0x5a')](_[_0xc769('0x44')](_0x2e2428[_0xc769('0x50')],[_0xc769('0x51'),'context',_0xc769('0x5b'),_0xc769('0x5c'),_0xc769('0x5d'),_0xc769('0x5e')]),{'where':{'context':_0x31cf68[_0xc769('0x5f')],'exten':_0x31cf68[_0xc769('0x51')]},'individualHooks':!![]})[_0xc769('0x24')](function(_0x34d423){return _0x34d423;});}return null;})[_0xc769('0x24')](respondWithStatusCode(_0x3651c9,null))['catch'](handleError(_0x3651c9,null));};exports[_0xc769('0x60')]=function(_0x2ed71a,_0x30dd95,_0x3214c7){return db[_0xc769('0x36')][_0xc769('0x61')]({'where':{'id':_0x2ed71a[_0xc769('0x4b')]['id']}})['then'](handleEntityNotFound(_0x30dd95,null))[_0xc769('0x24')](function(_0x5e6c2d){if(_0x5e6c2d){return db['sequelize'][_0xc769('0x62')](function(_0x28f773){return db['VoiceExtension'][_0xc769('0x32')]({'where':{'VoiceExtensionId':_0x2ed71a[_0xc769('0x4b')]['id']},'transaction':_0x28f773})[_0xc769('0x24')](function(_0x2200a2){var _0x2fac19=_[_0xc769('0x2b')](_0x2ed71a[_0xc769('0x50')],function(_0x44cef6){_0x44cef6['VoiceExtensionId']=_0x2ed71a[_0xc769('0x4b')]['id'];return _0x44cef6;});return db[_0xc769('0x36')][_0xc769('0x63')](_0x2fac19,{'transaction':_0x28f773});});})[_0xc769('0x24')](function(){return db['VoiceExtension'][_0xc769('0x64')]({'where':{'isApp':!![],'VoiceExtensionId':_0x2ed71a[_0xc769('0x4b')]['id']},'order':'cast(priority\x20as\x20unsigned)'});});}})['then'](respondWithResult(_0x30dd95,null))[_0xc769('0x4a')](handleError(_0x30dd95,null));}; \ No newline at end of file diff --git a/server/api/voiceExtension/voiceExtension.events.js b/server/api/voiceExtension/voiceExtension.events.js index bbdeb35..af12249 100644 --- a/server/api/voiceExtension/voiceExtension.events.js +++ b/server/api/voiceExtension/voiceExtension.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc514=['exports','events','../../mysqldb','VoiceExtension','save','update','remove','emit','hasOwnProperty','hook'];(function(_0x51fcb9,_0xbd8f8a){var _0x1fffae=function(_0xc8baff){while(--_0xc8baff){_0x51fcb9['push'](_0x51fcb9['shift']());}};_0x1fffae(++_0xbd8f8a);}(_0xc514,0x1a5));var _0x4c51=function(_0x4f3b2d,_0x3bbf46){_0x4f3b2d=_0x4f3b2d-0x0;var _0x3dddfa=_0xc514[_0x4f3b2d];return _0x3dddfa;};'use strict';var EventEmitter=require(_0x4c51('0x0'));var VoiceExtension=require(_0x4c51('0x1'))['db'][_0x4c51('0x2')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x4c51('0x3'),'afterUpdate':_0x4c51('0x4'),'afterDestroy':_0x4c51('0x5')};function emitEvent(_0x2b38f5){return function(_0x4d9e22,_0x349fa0,_0x465ee8){VoiceExtensionEvents[_0x4c51('0x6')](_0x2b38f5+':'+_0x4d9e22['id'],_0x4d9e22);VoiceExtensionEvents[_0x4c51('0x6')](_0x2b38f5,_0x4d9e22);_0x465ee8(null);};}for(var e in events){if(events[_0x4c51('0x7')](e)){var event=events[e];VoiceExtension[_0x4c51('0x8')](e,emitEvent(event));}}module[_0x4c51('0x9')]=VoiceExtensionEvents; \ No newline at end of file +var _0x3b87=['emit','hook','exports','events','VoiceExtension','setMaxListeners','save','remove'];(function(_0x14eaef,_0x89a6fc){var _0x568ef4=function(_0xc555ea){while(--_0xc555ea){_0x14eaef['push'](_0x14eaef['shift']());}};_0x568ef4(++_0x89a6fc);}(_0x3b87,0x73));var _0x73b8=function(_0x3ab51d,_0x2fa01d){_0x3ab51d=_0x3ab51d-0x0;var _0x29a04e=_0x3b87[_0x3ab51d];return _0x29a04e;};'use strict';var EventEmitter=require(_0x73b8('0x0'));var VoiceExtension=require('../../mysqldb')['db'][_0x73b8('0x1')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0x73b8('0x2')](0x0);var events={'afterCreate':_0x73b8('0x3'),'afterUpdate':'update','afterDestroy':_0x73b8('0x4')};function emitEvent(_0x36e366){return function(_0x240c19,_0xb41cf9,_0x525e77){VoiceExtensionEvents[_0x73b8('0x5')](_0x36e366+':'+_0x240c19['id'],_0x240c19);VoiceExtensionEvents[_0x73b8('0x5')](_0x36e366,_0x240c19);_0x525e77(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceExtension[_0x73b8('0x6')](e,emitEvent(event));}}module[_0x73b8('0x7')]=VoiceExtensionEvents; \ No newline at end of file diff --git a/server/api/voiceExtension/voiceExtension.model.js b/server/api/voiceExtension/voiceExtension.model.js index 0f96206..7aaa581 100644 --- a/server/api/voiceExtension/voiceExtension.model.js +++ b/server/api/voiceExtension/voiceExtension.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfb6e=['request-promise','path','./voiceExtension.attributes','exports','define','voice_extensions','lodash','../../config/logger','moment','bluebird'];(function(_0x25e7cb,_0x3579b7){var _0x375d92=function(_0xe8cf3b){while(--_0xe8cf3b){_0x25e7cb['push'](_0x25e7cb['shift']());}};_0x375d92(++_0x3579b7);}(_0xfb6e,0x1d2));var _0xefb6=function(_0x2c4eeb,_0x2934d8){_0x2c4eeb=_0x2c4eeb-0x0;var _0x45f999=_0xfb6e[_0x2c4eeb];return _0x45f999;};'use strict';var _=require(_0xefb6('0x0'));var util=require('util');var logger=require(_0xefb6('0x1'))('api');var moment=require(_0xefb6('0x2'));var BPromise=require(_0xefb6('0x3'));var rp=require(_0xefb6('0x4'));var fs=require('fs');var path=require(_0xefb6('0x5'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0xefb6('0x6'));module[_0xefb6('0x7')]=function(_0x431808,_0xe32599){return _0x431808[_0xefb6('0x8')]('VoiceExtension',attributes,{'tableName':_0xefb6('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xa5e9=['util','../../config/logger','api','bluebird','request-promise','path','./voiceExtension.attributes','exports','define','VoiceExtension','voice_extensions','lodash'];(function(_0x55b28a,_0x4a564d){var _0x67ccbb=function(_0x160498){while(--_0x160498){_0x55b28a['push'](_0x55b28a['shift']());}};_0x67ccbb(++_0x4a564d);}(_0xa5e9,0xef));var _0x9a5e=function(_0x51b0dc,_0x5307b7){_0x51b0dc=_0x51b0dc-0x0;var _0x13fa89=_0xa5e9[_0x51b0dc];return _0x13fa89;};'use strict';var _=require(_0x9a5e('0x0'));var util=require(_0x9a5e('0x1'));var logger=require(_0x9a5e('0x2'))(_0x9a5e('0x3'));var moment=require('moment');var BPromise=require(_0x9a5e('0x4'));var rp=require(_0x9a5e('0x5'));var fs=require('fs');var path=require(_0x9a5e('0x6'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x9a5e('0x7'));module[_0x9a5e('0x8')]=function(_0x301b52,_0x20d1a2){return _0x301b52[_0x9a5e('0x9')](_0x9a5e('0xa'),attributes,{'tableName':_0x9a5e('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/voiceExtension/voiceExtension.rpc.js b/server/api/voiceExtension/voiceExtension.rpc.js index 466bb6b..4cbff9c 100644 --- a/server/api/voiceExtension/voiceExtension.rpc.js +++ b/server/api/voiceExtension/voiceExtension.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7dee=['../../mysqldb','../../config/utils','rpc','jayson/promise','client','http','redis','defaults','socket.io-emitter','./voiceExtension.socket','register','request','then','VoiceExtension,\x20%s,\x20%s','request\x20sent','debug','VoiceExtension,\x20%s,\x20%s,\x20%s','error','code','message','result','GetVoiceExtension','VoiceExtension','options','raw','attributes','limit','include','map','model','stringify','catch','lodash','moment','randomstring','ioredis'];(function(_0x514c15,_0x486901){var _0x16283e=function(_0x53b7d0){while(--_0x53b7d0){_0x514c15['push'](_0x514c15['shift']());}};_0x16283e(++_0x486901);}(_0x7dee,0xb0));var _0xe7de=function(_0x5205a1,_0x2269b0){_0x5205a1=_0x5205a1-0x0;var _0x160821=_0x7dee[_0x5205a1];return _0x160821;};'use strict';var _=require(_0xe7de('0x0'));var util=require('util');var moment=require(_0xe7de('0x1'));var BPromise=require('bluebird');var rs=require(_0xe7de('0x2'));var fs=require('fs');var Redis=require(_0xe7de('0x3'));var db=require(_0xe7de('0x4'))['db'];var utils=require(_0xe7de('0x5'));var logger=require('../../config/logger')(_0xe7de('0x6'));var config=require('../../config/environment');var jayson=require(_0xe7de('0x7'));var client=jayson[_0xe7de('0x8')][_0xe7de('0x9')]({'port':0x232a});config[_0xe7de('0xa')]=_[_0xe7de('0xb')](config[_0xe7de('0xa')],{'host':'localhost','port':0x18eb});var socket=require(_0xe7de('0xc'))(new Redis(config[_0xe7de('0xa')]));require(_0xe7de('0xd'))[_0xe7de('0xe')](socket);function respondWithRpcPromise(_0x54b443,_0x130ac8,_0x42ddbc){return new BPromise(function(_0x2a2042,_0x35718e){return client[_0xe7de('0xf')](_0x54b443,_0x42ddbc)[_0xe7de('0x10')](function(_0x358e90){logger['info'](_0xe7de('0x11'),_0x130ac8,_0xe7de('0x12'));logger[_0xe7de('0x13')](_0xe7de('0x14'),_0x130ac8,_0xe7de('0x12'),JSON['stringify'](_0x358e90));if(_0x358e90[_0xe7de('0x15')]){if(_0x358e90[_0xe7de('0x15')][_0xe7de('0x16')]===0x1f4){logger[_0xe7de('0x15')](_0xe7de('0x11'),_0x130ac8,_0x358e90[_0xe7de('0x15')]['message']);return _0x35718e(_0x358e90['error'][_0xe7de('0x17')]);}logger[_0xe7de('0x15')](_0xe7de('0x11'),_0x130ac8,_0x358e90[_0xe7de('0x15')][_0xe7de('0x17')]);return _0x2a2042(_0x358e90['error'][_0xe7de('0x17')]);}else{logger['info']('VoiceExtension,\x20%s,\x20%s',_0x130ac8,'request\x20sent');_0x2a2042(_0x358e90[_0xe7de('0x18')][_0xe7de('0x17')]);}})['catch'](function(_0x2659e5){logger[_0xe7de('0x15')](_0xe7de('0x11'),_0x130ac8,_0x2659e5);_0x35718e(_0x2659e5);});});}exports[_0xe7de('0x19')]=function(_0x952594){var _0x93c23c=this;return new Promise(function(_0x2595b5,_0xfead44){return db[_0xe7de('0x1a')]['findAll']({'raw':_0x952594[_0xe7de('0x1b')]?_0x952594[_0xe7de('0x1b')][_0xe7de('0x1c')]===undefined?!![]:![]:!![],'where':_0x952594['options']?_0x952594[_0xe7de('0x1b')]['where']||null:null,'attributes':_0x952594[_0xe7de('0x1b')]?_0x952594[_0xe7de('0x1b')][_0xe7de('0x1d')]||null:null,'limit':_0x952594['options']?_0x952594[_0xe7de('0x1b')][_0xe7de('0x1e')]||null:null,'include':_0x952594[_0xe7de('0x1b')]?_0x952594[_0xe7de('0x1b')][_0xe7de('0x1f')]?_[_0xe7de('0x20')](_0x952594[_0xe7de('0x1b')][_0xe7de('0x1f')],function(_0x4c0aff){return{'model':db[_0x4c0aff[_0xe7de('0x21')]],'as':_0x4c0aff['as'],'attributes':_0x4c0aff[_0xe7de('0x1d')],'include':_0x4c0aff[_0xe7de('0x1f')]?_[_0xe7de('0x20')](_0x4c0aff[_0xe7de('0x1f')],function(_0x475fb7){return{'model':db[_0x475fb7[_0xe7de('0x21')]],'as':_0x475fb7['as'],'attributes':_0x475fb7['attributes'],'include':_0x475fb7[_0xe7de('0x1f')]?_[_0xe7de('0x20')](_0x475fb7[_0xe7de('0x1f')],function(_0x3d4d63){return{'model':db[_0x3d4d63[_0xe7de('0x21')]],'as':_0x3d4d63['as'],'attributes':_0x3d4d63['attributes']};}):[]};}):[]};}):[]:[]})[_0xe7de('0x10')](function(_0x241a37){logger['info']('GetVoiceExtension',_0x952594);logger[_0xe7de('0x13')](_0xe7de('0x19'),_0x952594,JSON[_0xe7de('0x22')](_0x241a37));_0x2595b5(_0x241a37);})[_0xe7de('0x23')](function(_0x5a7ead){logger[_0xe7de('0x15')](_0xe7de('0x19'),_0x5a7ead[_0xe7de('0x17')],_0x952594);_0xfead44(_0x93c23c[_0xe7de('0x15')](0x1f4,_0x5a7ead['message']));});});}; \ No newline at end of file +var _0xdc97=['GetVoiceExtension','VoiceExtension','findAll','options','limit','include','map','model','attributes','lodash','util','moment','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','redis','localhost','socket.io-emitter','./voiceExtension.socket','register','request','then','VoiceExtension,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','VoiceExtension,\x20%s,\x20%s','message','info','catch'];(function(_0x3902c1,_0x1c9eb2){var _0x1266cc=function(_0x50c2c5){while(--_0x50c2c5){_0x3902c1['push'](_0x3902c1['shift']());}};_0x1266cc(++_0x1c9eb2);}(_0xdc97,0x13b));var _0x7dc9=function(_0x470ad2,_0xa9fd45){_0x470ad2=_0x470ad2-0x0;var _0x364898=_0xdc97[_0x470ad2];return _0x364898;};'use strict';var _=require(_0x7dc9('0x0'));var util=require(_0x7dc9('0x1'));var moment=require(_0x7dc9('0x2'));var BPromise=require('bluebird');var rs=require(_0x7dc9('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x7dc9('0x4'))['db'];var utils=require(_0x7dc9('0x5'));var logger=require('../../config/logger')(_0x7dc9('0x6'));var config=require(_0x7dc9('0x7'));var jayson=require(_0x7dc9('0x8'));var client=jayson[_0x7dc9('0x9')]['http']({'port':0x232a});config[_0x7dc9('0xa')]=_['defaults'](config['redis'],{'host':_0x7dc9('0xb'),'port':0x18eb});var socket=require(_0x7dc9('0xc'))(new Redis(config[_0x7dc9('0xa')]));require(_0x7dc9('0xd'))[_0x7dc9('0xe')](socket);function respondWithRpcPromise(_0x5ca05b,_0xb2fa2a,_0x44fe24){return new BPromise(function(_0x37dfc,_0x1dc3f7){return client[_0x7dc9('0xf')](_0x5ca05b,_0x44fe24)[_0x7dc9('0x10')](function(_0x1e336a){logger['info']('VoiceExtension,\x20%s,\x20%s',_0xb2fa2a,'request\x20sent');logger['debug'](_0x7dc9('0x11'),_0xb2fa2a,_0x7dc9('0x12'),JSON['stringify'](_0x1e336a));if(_0x1e336a[_0x7dc9('0x13')]){if(_0x1e336a[_0x7dc9('0x13')][_0x7dc9('0x14')]===0x1f4){logger[_0x7dc9('0x13')](_0x7dc9('0x15'),_0xb2fa2a,_0x1e336a[_0x7dc9('0x13')]['message']);return _0x1dc3f7(_0x1e336a[_0x7dc9('0x13')][_0x7dc9('0x16')]);}logger[_0x7dc9('0x13')](_0x7dc9('0x15'),_0xb2fa2a,_0x1e336a[_0x7dc9('0x13')][_0x7dc9('0x16')]);return _0x37dfc(_0x1e336a[_0x7dc9('0x13')][_0x7dc9('0x16')]);}else{logger[_0x7dc9('0x17')]('VoiceExtension,\x20%s,\x20%s',_0xb2fa2a,_0x7dc9('0x12'));_0x37dfc(_0x1e336a['result'][_0x7dc9('0x16')]);}})[_0x7dc9('0x18')](function(_0x5d61d7){logger[_0x7dc9('0x13')](_0x7dc9('0x15'),_0xb2fa2a,_0x5d61d7);_0x1dc3f7(_0x5d61d7);});});}exports[_0x7dc9('0x19')]=function(_0x4b2703){var _0x43ec33=this;return new Promise(function(_0x184bfd,_0x2dad65){return db[_0x7dc9('0x1a')][_0x7dc9('0x1b')]({'raw':_0x4b2703[_0x7dc9('0x1c')]?_0x4b2703['options']['raw']===undefined?!![]:![]:!![],'where':_0x4b2703[_0x7dc9('0x1c')]?_0x4b2703[_0x7dc9('0x1c')]['where']||null:null,'attributes':_0x4b2703[_0x7dc9('0x1c')]?_0x4b2703[_0x7dc9('0x1c')]['attributes']||null:null,'limit':_0x4b2703[_0x7dc9('0x1c')]?_0x4b2703[_0x7dc9('0x1c')][_0x7dc9('0x1d')]||null:null,'include':_0x4b2703['options']?_0x4b2703[_0x7dc9('0x1c')][_0x7dc9('0x1e')]?_[_0x7dc9('0x1f')](_0x4b2703['options']['include'],function(_0x4b9ba6){return{'model':db[_0x4b9ba6[_0x7dc9('0x20')]],'as':_0x4b9ba6['as'],'attributes':_0x4b9ba6[_0x7dc9('0x21')],'include':_0x4b9ba6['include']?_['map'](_0x4b9ba6[_0x7dc9('0x1e')],function(_0x5afb7d){return{'model':db[_0x5afb7d[_0x7dc9('0x20')]],'as':_0x5afb7d['as'],'attributes':_0x5afb7d[_0x7dc9('0x21')],'include':_0x5afb7d[_0x7dc9('0x1e')]?_[_0x7dc9('0x1f')](_0x5afb7d[_0x7dc9('0x1e')],function(_0x450124){return{'model':db[_0x450124[_0x7dc9('0x20')]],'as':_0x450124['as'],'attributes':_0x450124[_0x7dc9('0x21')]};}):[]};}):[]};}):[]:[]})[_0x7dc9('0x10')](function(_0x3c4379){logger[_0x7dc9('0x17')](_0x7dc9('0x19'),_0x4b2703);logger['debug']('GetVoiceExtension',_0x4b2703,JSON['stringify'](_0x3c4379));_0x184bfd(_0x3c4379);})['catch'](function(_0x4a68f0){logger['error']('GetVoiceExtension',_0x4a68f0['message'],_0x4b2703);_0x2dad65(_0x43ec33[_0x7dc9('0x13')](0x1f4,_0x4a68f0[_0x7dc9('0x16')]));});});}; \ No newline at end of file diff --git a/server/api/voiceExtension/voiceExtension.socket.js b/server/api/voiceExtension/voiceExtension.socket.js index ea7348e..5da03d0 100644 --- a/server/api/voiceExtension/voiceExtension.socket.js +++ b/server/api/voiceExtension/voiceExtension.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7fbe=['length','voiceExtension:','remove','update','emit','removeListener','register'];(function(_0x4e4b80,_0x1dad92){var _0x175ca8=function(_0xce7257){while(--_0xce7257){_0x4e4b80['push'](_0x4e4b80['shift']());}};_0x175ca8(++_0x1dad92);}(_0x7fbe,0x1ec));var _0xe7fb=function(_0x133990,_0x334b7a){_0x133990=_0x133990-0x0;var _0x176242=_0x7fbe[_0x133990];return _0x176242;};'use strict';var VoiceExtensionEvents=require('./voiceExtension.events');var events=['save',_0xe7fb('0x0'),_0xe7fb('0x1')];function createListener(_0x294c21,_0x1703d5){return function(_0x517d3a){_0x1703d5[_0xe7fb('0x2')](_0x294c21,_0x517d3a);};}function removeListener(_0x11d2c4,_0x4524ff){return function(){VoiceExtensionEvents[_0xe7fb('0x3')](_0x11d2c4,_0x4524ff);};}exports[_0xe7fb('0x4')]=function(_0x290172){for(var _0x12d1b0=0x0,_0x24cd67=events[_0xe7fb('0x5')];_0x12d1b0<_0x24cd67;_0x12d1b0++){var _0x5ad75b=events[_0x12d1b0];var _0x213ebc=createListener(_0xe7fb('0x6')+_0x5ad75b,_0x290172);VoiceExtensionEvents['on'](_0x5ad75b,_0x213ebc);}}; \ No newline at end of file +var _0x53ec=['length','voiceExtension:','./voiceExtension.events','save','remove','update','emit','removeListener'];(function(_0x36dd48,_0x479c4e){var _0x1b52cb=function(_0x383db9){while(--_0x383db9){_0x36dd48['push'](_0x36dd48['shift']());}};_0x1b52cb(++_0x479c4e);}(_0x53ec,0x192));var _0xc53e=function(_0x3f9d5d,_0x4ee8dd){_0x3f9d5d=_0x3f9d5d-0x0;var _0x1b2cd7=_0x53ec[_0x3f9d5d];return _0x1b2cd7;};'use strict';var VoiceExtensionEvents=require(_0xc53e('0x0'));var events=[_0xc53e('0x1'),_0xc53e('0x2'),_0xc53e('0x3')];function createListener(_0x1b04cc,_0xe45c6d){return function(_0x51c435){_0xe45c6d[_0xc53e('0x4')](_0x1b04cc,_0x51c435);};}function removeListener(_0x4e954a,_0x2b90f6){return function(){VoiceExtensionEvents[_0xc53e('0x5')](_0x4e954a,_0x2b90f6);};}exports['register']=function(_0x2f1414){for(var _0x4f989b=0x0,_0x41a9e8=events[_0xc53e('0x6')];_0x4f989b<_0x41a9e8;_0x4f989b++){var _0x5d3b28=events[_0x4f989b];var _0x1616ac=createListener(_0xc53e('0x7')+_0x5d3b28,_0x2f1414);VoiceExtensionEvents['on'](_0x5d3b28,_0x1616ac);}}; \ No newline at end of file diff --git a/server/api/voiceMail/index.js b/server/api/voiceMail/index.js index e360f2d..9c00ae1 100644 --- a/server/api/voiceMail/index.js +++ b/server/api/voiceMail/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3d04=['exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','./voiceMail.controller','get','isAuthenticated','show','/:id/messages','getMessages','create','update','delete','/:id','destroy'];(function(_0x523c85,_0x347b7c){var _0x4c8375=function(_0x1e9cb5){while(--_0x1e9cb5){_0x523c85['push'](_0x523c85['shift']());}};_0x4c8375(++_0x347b7c);}(_0x3d04,0xbe));var _0x43d0=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x3d04[_0x14add3];return _0x4a174f;};'use strict';var multer=require(_0x43d0('0x0'));var util=require(_0x43d0('0x1'));var path=require(_0x43d0('0x2'));var timeout=require(_0x43d0('0x3'));var express=require(_0x43d0('0x4'));var router=express[_0x43d0('0x5')]();var fs_extra=require(_0x43d0('0x6'));var auth=require(_0x43d0('0x7'));var interaction=require('../../components/interaction/service');var config=require(_0x43d0('0x8'));var controller=require(_0x43d0('0x9'));router[_0x43d0('0xa')]('/',auth[_0x43d0('0xb')](),controller['index']);router['get']('/:id',auth['isAuthenticated'](),controller[_0x43d0('0xc')]);router[_0x43d0('0xa')](_0x43d0('0xd'),auth[_0x43d0('0xb')](),controller[_0x43d0('0xe')]);router['post']('/',auth['isAuthenticated'](),controller[_0x43d0('0xf')]);router['put']('/:id',auth[_0x43d0('0xb')](),controller[_0x43d0('0x10')]);router[_0x43d0('0x11')](_0x43d0('0x12'),auth['isAuthenticated'](),controller[_0x43d0('0x13')]);module[_0x43d0('0x14')]=router; \ No newline at end of file +var _0x524e=['express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceMail.controller','get','index','/:id','show','/:id/messages','isAuthenticated','getMessages','post','create','put','update','delete','destroy','path','connect-timeout'];(function(_0x474a8b,_0x1ed66f){var _0x4a6361=function(_0x537f79){while(--_0x537f79){_0x474a8b['push'](_0x474a8b['shift']());}};_0x4a6361(++_0x1ed66f);}(_0x524e,0x15e));var _0xe524=function(_0x372bc2,_0x152160){_0x372bc2=_0x372bc2-0x0;var _0x34e0ae=_0x524e[_0x372bc2];return _0x34e0ae;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0xe524('0x0'));var timeout=require(_0xe524('0x1'));var express=require(_0xe524('0x2'));var router=express[_0xe524('0x3')]();var fs_extra=require(_0xe524('0x4'));var auth=require(_0xe524('0x5'));var interaction=require(_0xe524('0x6'));var config=require(_0xe524('0x7'));var controller=require(_0xe524('0x8'));router[_0xe524('0x9')]('/',auth['isAuthenticated'](),controller[_0xe524('0xa')]);router[_0xe524('0x9')](_0xe524('0xb'),auth['isAuthenticated'](),controller[_0xe524('0xc')]);router[_0xe524('0x9')](_0xe524('0xd'),auth[_0xe524('0xe')](),controller[_0xe524('0xf')]);router[_0xe524('0x10')]('/',auth[_0xe524('0xe')](),controller[_0xe524('0x11')]);router[_0xe524('0x12')](_0xe524('0xb'),auth[_0xe524('0xe')](),controller[_0xe524('0x13')]);router[_0xe524('0x14')](_0xe524('0xb'),auth[_0xe524('0xe')](),controller[_0xe524('0x15')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/voiceMail/voiceMail.attributes.js b/server/api/voiceMail/voiceMail.attributes.js index 9ca814b..836a53f 100644 --- a/server/api/voiceMail/voiceMail.attributes.js +++ b/server/api/voiceMail/voiceMail.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x069f=['contest_mailbox','setDataValue','email','trim','ENUM','yes','TINYINT(4)','TIMESTAMP','INTEGER','getDataValue','fullname','exports','STRING'];(function(_0x15d687,_0x575d9b){var _0x1566f4=function(_0x31ac9b){while(--_0x31ac9b){_0x15d687['push'](_0x15d687['shift']());}};_0x1566f4(++_0x575d9b);}(_0x069f,0x1ab));var _0xf069=function(_0x2c3a8f,_0x374e56){_0x2c3a8f=_0x2c3a8f-0x0;var _0x189412=_0x069f[_0x2c3a8f];return _0x189412;};'use strict';var Sequelize=require('sequelize');module[_0xf069('0x0')]={'customer_id':{'type':Sequelize[_0xf069('0x1')]},'context':{'type':Sequelize[_0xf069('0x1')],'defaultValue':'from-voicemail','unique':_0xf069('0x2')},'mailbox':{'type':Sequelize[_0xf069('0x1')],'defaultValue':'','allowNull':![],'unique':'contest_mailbox'},'password':{'type':Sequelize[_0xf069('0x1')]},'fullname':{'type':Sequelize[_0xf069('0x1')]},'email':{'type':Sequelize[_0xf069('0x1')],'validate':{'isEmail':!![]},'set':function(_0x54f927){this[_0xf069('0x3')](_0xf069('0x4'),typeof _0x54f927==='string'&&_0x54f927[_0xf069('0x5')]()?_0x54f927[_0xf069('0x5')]():null);}},'pager':{'type':Sequelize[_0xf069('0x1')]},'tz':{'type':Sequelize[_0xf069('0x1')],'defaultValue':'central'},'attach':{'type':Sequelize[_0xf069('0x6')](_0xf069('0x7'),'no'),'defaultValue':_0xf069('0x7'),'allowNull':![]},'saycid':{'type':Sequelize[_0xf069('0x6')](_0xf069('0x7'),'no'),'defaultValue':_0xf069('0x7'),'allowNull':![]},'dialout':{'type':Sequelize[_0xf069('0x1')]},'callback':{'type':Sequelize[_0xf069('0x1')]},'review':{'type':Sequelize[_0xf069('0x6')]('yes','no'),'defaultValue':'no','allowNull':![]},'operator':{'type':Sequelize[_0xf069('0x6')](_0xf069('0x7'),'no'),'defaultValue':'no','allowNull':![]},'envelope':{'type':Sequelize[_0xf069('0x6')](_0xf069('0x7'),'no'),'defaultValue':'no','allowNull':![]},'sayduration':{'type':Sequelize[_0xf069('0x6')](_0xf069('0x7'),'no'),'defaultValue':'no','allowNull':![]},'saydurationm':{'type':_0xf069('0x8'),'defaultValue':0x1,'allowNull':![]},'sendvoicemail':{'type':Sequelize[_0xf069('0x6')](_0xf069('0x7'),'no'),'defaultValue':'no','allowNull':![]},'delete':{'type':Sequelize['ENUM'](_0xf069('0x7'),'no'),'defaultValue':'no','allowNull':![]},'nextaftercmd':{'type':Sequelize['ENUM'](_0xf069('0x7'),'no'),'defaultValue':_0xf069('0x7'),'allowNull':![]},'forcename':{'type':Sequelize[_0xf069('0x6')](_0xf069('0x7'),'no'),'defaultValue':'no','allowNull':![]},'forcegreetings':{'type':Sequelize['ENUM']('yes','no'),'defaultValue':'no','allowNull':![]},'hidefromdir':{'type':Sequelize[_0xf069('0x6')](_0xf069('0x7'),'no'),'defaultValue':_0xf069('0x7'),'allowNull':![]},'stamp':{'type':_0xf069('0x9')},'emailsubject':{'type':Sequelize[_0xf069('0x1')]},'emailbody':{'type':Sequelize[_0xf069('0x1')]},'maxsecs':{'type':Sequelize[_0xf069('0xa')](0xff),'defaultValue':0xb4,'allowNull':![]},'maxmsg':{'type':Sequelize[_0xf069('0xa')](0xff),'defaultValue':0x64,'allowNull':![]},'name':{'type':Sequelize['VIRTUAL'],'get':function(){return this[_0xf069('0xb')](_0xf069('0xc'))+'\x20-\x20'+this[_0xf069('0xb')]('mailbox');}}}; \ No newline at end of file +var _0x29e6=['\x20-\x20','mailbox','exports','STRING','contest_mailbox','setDataValue','email','string','trim','ENUM','yes','TINYINT(4)','INTEGER','VIRTUAL','getDataValue','fullname'];(function(_0x5317b5,_0x4dfd6e){var _0x3b7ce2=function(_0xc146d6){while(--_0xc146d6){_0x5317b5['push'](_0x5317b5['shift']());}};_0x3b7ce2(++_0x4dfd6e);}(_0x29e6,0x192));var _0x629e=function(_0x3ab51d,_0x2fa01d){_0x3ab51d=_0x3ab51d-0x0;var _0x29a04e=_0x29e6[_0x3ab51d];return _0x29a04e;};'use strict';var Sequelize=require('sequelize');module[_0x629e('0x0')]={'customer_id':{'type':Sequelize['STRING']},'context':{'type':Sequelize['STRING'],'defaultValue':'from-voicemail','unique':'contest_mailbox'},'mailbox':{'type':Sequelize[_0x629e('0x1')],'defaultValue':'','allowNull':![],'unique':_0x629e('0x2')},'password':{'type':Sequelize['STRING']},'fullname':{'type':Sequelize[_0x629e('0x1')]},'email':{'type':Sequelize[_0x629e('0x1')],'validate':{'isEmail':!![]},'set':function(_0x5ab23e){this[_0x629e('0x3')](_0x629e('0x4'),typeof _0x5ab23e===_0x629e('0x5')&&_0x5ab23e['trim']()?_0x5ab23e[_0x629e('0x6')]():null);}},'pager':{'type':Sequelize[_0x629e('0x1')]},'tz':{'type':Sequelize[_0x629e('0x1')],'defaultValue':'central'},'attach':{'type':Sequelize['ENUM']('yes','no'),'defaultValue':'yes','allowNull':![]},'saycid':{'type':Sequelize[_0x629e('0x7')]('yes','no'),'defaultValue':_0x629e('0x8'),'allowNull':![]},'dialout':{'type':Sequelize[_0x629e('0x1')]},'callback':{'type':Sequelize[_0x629e('0x1')]},'review':{'type':Sequelize[_0x629e('0x7')](_0x629e('0x8'),'no'),'defaultValue':'no','allowNull':![]},'operator':{'type':Sequelize[_0x629e('0x7')](_0x629e('0x8'),'no'),'defaultValue':'no','allowNull':![]},'envelope':{'type':Sequelize['ENUM']('yes','no'),'defaultValue':'no','allowNull':![]},'sayduration':{'type':Sequelize[_0x629e('0x7')]('yes','no'),'defaultValue':'no','allowNull':![]},'saydurationm':{'type':_0x629e('0x9'),'defaultValue':0x1,'allowNull':![]},'sendvoicemail':{'type':Sequelize['ENUM']('yes','no'),'defaultValue':'no','allowNull':![]},'delete':{'type':Sequelize['ENUM'](_0x629e('0x8'),'no'),'defaultValue':'no','allowNull':![]},'nextaftercmd':{'type':Sequelize['ENUM'](_0x629e('0x8'),'no'),'defaultValue':_0x629e('0x8'),'allowNull':![]},'forcename':{'type':Sequelize['ENUM']('yes','no'),'defaultValue':'no','allowNull':![]},'forcegreetings':{'type':Sequelize[_0x629e('0x7')](_0x629e('0x8'),'no'),'defaultValue':'no','allowNull':![]},'hidefromdir':{'type':Sequelize[_0x629e('0x7')](_0x629e('0x8'),'no'),'defaultValue':_0x629e('0x8'),'allowNull':![]},'stamp':{'type':'TIMESTAMP'},'emailsubject':{'type':Sequelize[_0x629e('0x1')]},'emailbody':{'type':Sequelize[_0x629e('0x1')]},'maxsecs':{'type':Sequelize[_0x629e('0xa')](0xff),'defaultValue':0xb4,'allowNull':![]},'maxmsg':{'type':Sequelize[_0x629e('0xa')](0xff),'defaultValue':0x64,'allowNull':![]},'name':{'type':Sequelize[_0x629e('0xb')],'get':function(){return this[_0x629e('0xc')](_0x629e('0xd'))+_0x629e('0xe')+this[_0x629e('0xc')](_0x629e('0xf'));}}}; \ No newline at end of file diff --git a/server/api/voiceMail/voiceMail.controller.js b/server/api/voiceMail/voiceMail.controller.js index 42241db..72684ae 100644 --- a/server/api/voiceMail/voiceMail.controller.js +++ b/server/api/voiceMail/voiceMail.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0102=['rawAttributes','fieldName','type','model','map','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','rows','catch','keys','include','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','params','getMessages','findOne','VoiceMailMessage','mailbox','findAndCountAll','rimraf','zip-dir','fast-json-patch','request-promise','sox','to-csv','ejs','fs-extra','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','end','status','json','offset','undefined','limit','count','set','apply','reject','save','get','Voicemails','destroy','then','sendStatus','stack','name','send','index','VoiceMail'];(function(_0x49f40d,_0x91d2e4){var _0x45296f=function(_0x541e74){while(--_0x541e74){_0x49f40d['push'](_0x49f40d['shift']());}};_0x45296f(++_0x91d2e4);}(_0x0102,0x186));var _0x2010=function(_0x1e6bee,_0x38d696){_0x1e6bee=_0x1e6bee-0x0;var _0x525133=_0x0102[_0x1e6bee];return _0x525133;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x2010('0x0'));var zipdir=require(_0x2010('0x1'));var jsonpatch=require(_0x2010('0x2'));var rp=require(_0x2010('0x3'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require('mustache');var util=require('util');var path=require('path');var sox=require(_0x2010('0x4'));var csv=require(_0x2010('0x5'));var ejs=require(_0x2010('0x6'));var fs=require('fs');var fs_extra=require(_0x2010('0x7'));var _=require('lodash');var squel=require(_0x2010('0x8'));var crypto=require('crypto');var jsforce=require(_0x2010('0x9'));var deskjs=require(_0x2010('0xa'));var toCsv=require('to-csv');var querystring=require(_0x2010('0xb'));var Papa=require(_0x2010('0xc'));var Redis=require(_0x2010('0xd'));var authService=require(_0x2010('0xe'));var qs=require(_0x2010('0xf'));var as=require(_0x2010('0x10'));var hardwareService=require(_0x2010('0x11'));var logger=require(_0x2010('0x12'))(_0x2010('0x13'));var utils=require(_0x2010('0x14'));var config=require(_0x2010('0x15'));var licenseUtil=require(_0x2010('0x16'));var db=require(_0x2010('0x17'))['db'];function respondWithStatusCode(_0x3f307c,_0x3e8624){_0x3e8624=_0x3e8624||0xcc;return function(_0x388991){if(_0x388991){return _0x3f307c['sendStatus'](_0x3e8624);}return _0x3f307c['status'](_0x3e8624)[_0x2010('0x18')]();};}function respondWithResult(_0x385720,_0x2e8ec2){_0x2e8ec2=_0x2e8ec2||0xc8;return function(_0x10b587){if(_0x10b587){return _0x385720[_0x2010('0x19')](_0x2e8ec2)[_0x2010('0x1a')](_0x10b587);}};}function respondWithFilteredResult(_0x517ff4,_0x3195fa){return function(_0x136418){if(_0x136418){var _0x5ad412=typeof _0x3195fa[_0x2010('0x1b')]===_0x2010('0x1c')&&typeof _0x3195fa[_0x2010('0x1d')]===_0x2010('0x1c');var _0x2d0bf2=_0x136418[_0x2010('0x1e')];var _0x83cd35=_0x5ad412?0x0:_0x3195fa[_0x2010('0x1b')];var _0x309477=_0x5ad412?_0x136418['count']:_0x3195fa['offset']+_0x3195fa[_0x2010('0x1d')];var _0x38a15a;if(_0x309477>=_0x2d0bf2){_0x309477=_0x2d0bf2;_0x38a15a=0xc8;}else{_0x38a15a=0xce;}_0x517ff4[_0x2010('0x19')](_0x38a15a);return _0x517ff4[_0x2010('0x1f')]('Content-Range',_0x83cd35+'-'+_0x309477+'/'+_0x2d0bf2)['json'](_0x136418);}return null;};}function patchUpdates(_0x22c252){return function(_0x171e45){try{jsonpatch[_0x2010('0x20')](_0x171e45,_0x22c252,!![]);}catch(_0x26facc){return BPromise[_0x2010('0x21')](_0x26facc);}return _0x171e45[_0x2010('0x22')]();};}function saveUpdates(_0x4f621c,_0x3db13d){return function(_0x1cfa57){if(_0x1cfa57){return _0x1cfa57['update'](_0x4f621c)['then'](function(_0x50aecc){return _0x50aecc;});}return null;};}function removeEntity(_0x424453,_0x574719){return function(_0x277dcc){if(_0x277dcc){return _0x277dcc['destroy']()['then'](function(){var _0xdb57be=_0x277dcc[_0x2010('0x23')]({'plain':!![]});var _0x52b4fe=_0x2010('0x24');return db['UserProfileResource'][_0x2010('0x25')]({'where':{'type':_0x52b4fe,'resourceId':_0xdb57be['id']}})[_0x2010('0x26')](function(){return _0x277dcc;});})[_0x2010('0x26')](function(){_0x424453[_0x2010('0x19')](0xcc)[_0x2010('0x18')]();});}};}function handleEntityNotFound(_0x2f63bb,_0x981b65){return function(_0x3eb4dc){if(!_0x3eb4dc){_0x2f63bb[_0x2010('0x27')](0x194);}return _0x3eb4dc;};}function handleError(_0x103460,_0x122ee3){_0x122ee3=_0x122ee3||0x1f4;return function(_0x2ebdbb){logger['error'](_0x2ebdbb[_0x2010('0x28')]);if(_0x2ebdbb['name']){delete _0x2ebdbb[_0x2010('0x29')];}_0x103460[_0x2010('0x19')](_0x122ee3)[_0x2010('0x2a')](_0x2ebdbb);};}exports[_0x2010('0x2b')]=function(_0x564a64,_0x554f66){var _0x136d5f={},_0x48d9f2={},_0x2839f2={'count':0x0,'rows':[]};var _0x1d5d7a=_['map'](db[_0x2010('0x2c')][_0x2010('0x2d')],function(_0x2b1ff7){return{'name':_0x2b1ff7[_0x2010('0x2e')],'type':_0x2b1ff7[_0x2010('0x2f')]['key']};});_0x48d9f2[_0x2010('0x30')]=_[_0x2010('0x31')](_0x1d5d7a,_0x2010('0x29'));_0x48d9f2['query']=_['keys'](_0x564a64[_0x2010('0x32')]);_0x48d9f2[_0x2010('0x33')]=_[_0x2010('0x34')](_0x48d9f2['model'],_0x48d9f2['query']);_0x136d5f[_0x2010('0x35')]=_[_0x2010('0x34')](_0x48d9f2[_0x2010('0x30')],qs[_0x2010('0x36')](_0x564a64[_0x2010('0x32')]['fields']));_0x136d5f['attributes']=_0x136d5f['attributes'][_0x2010('0x37')]?_0x136d5f[_0x2010('0x35')]:_0x48d9f2[_0x2010('0x30')];if(!_0x564a64['query'][_0x2010('0x38')](_0x2010('0x39'))){_0x136d5f[_0x2010('0x1d')]=qs[_0x2010('0x1d')](_0x564a64['query'][_0x2010('0x1d')]);_0x136d5f[_0x2010('0x1b')]=qs[_0x2010('0x1b')](_0x564a64['query'][_0x2010('0x1b')]);}_0x136d5f['order']=qs[_0x2010('0x3a')](_0x564a64[_0x2010('0x32')][_0x2010('0x3a')]);_0x136d5f[_0x2010('0x3b')]=qs[_0x2010('0x33')](_[_0x2010('0x3c')](_0x564a64['query'],_0x48d9f2[_0x2010('0x33')]),_0x1d5d7a);if(_0x564a64['query'][_0x2010('0x3d')]){_0x136d5f[_0x2010('0x3b')]=_[_0x2010('0x3e')](_0x136d5f[_0x2010('0x3b')],{'$or':_[_0x2010('0x31')](_0x1d5d7a,function(_0x1f053c){if(_0x1f053c[_0x2010('0x2f')]!==_0x2010('0x3f')){var _0x2fcaef={};_0x2fcaef[_0x1f053c[_0x2010('0x29')]]={'$like':'%'+_0x564a64[_0x2010('0x32')][_0x2010('0x3d')]+'%'};return _0x2fcaef;}})});}_0x136d5f=_[_0x2010('0x3e')]({},_0x136d5f,_0x564a64[_0x2010('0x40')]);var _0x4b6251={'where':_0x136d5f['where']};return db[_0x2010('0x2c')][_0x2010('0x1e')](_0x4b6251)[_0x2010('0x26')](function(_0x35d631){_0x2839f2[_0x2010('0x1e')]=_0x35d631;if(_0x564a64[_0x2010('0x32')][_0x2010('0x41')]){_0x136d5f['include']=[{'all':!![]}];}return db[_0x2010('0x2c')]['findAll'](_0x136d5f);})[_0x2010('0x26')](function(_0x3ff496){_0x2839f2[_0x2010('0x42')]=_0x3ff496;return _0x2839f2;})[_0x2010('0x26')](respondWithFilteredResult(_0x554f66,_0x136d5f))[_0x2010('0x43')](handleError(_0x554f66,null));};exports['show']=function(_0x364338,_0x71eb35){var _0x3dd83c={'raw':!![],'where':{'id':_0x364338['params']['id']}},_0x41b3b5={};_0x41b3b5[_0x2010('0x30')]=_['keys'](db['VoiceMail']['rawAttributes']);_0x41b3b5[_0x2010('0x32')]=_[_0x2010('0x44')](_0x364338[_0x2010('0x32')]);_0x41b3b5[_0x2010('0x33')]=_[_0x2010('0x34')](_0x41b3b5[_0x2010('0x30')],_0x41b3b5['query']);_0x3dd83c[_0x2010('0x35')]=_[_0x2010('0x34')](_0x41b3b5[_0x2010('0x30')],qs['fields'](_0x364338['query'][_0x2010('0x36')]));_0x3dd83c['attributes']=_0x3dd83c[_0x2010('0x35')][_0x2010('0x37')]?_0x3dd83c[_0x2010('0x35')]:_0x41b3b5[_0x2010('0x30')];if(_0x364338['query'][_0x2010('0x41')]){_0x3dd83c[_0x2010('0x45')]=[{'all':!![]}];}_0x3dd83c=_[_0x2010('0x3e')]({},_0x3dd83c,_0x364338[_0x2010('0x40')]);return db[_0x2010('0x2c')][_0x2010('0x46')](_0x3dd83c)['then'](handleEntityNotFound(_0x71eb35,null))[_0x2010('0x26')](respondWithResult(_0x71eb35,null))[_0x2010('0x43')](handleError(_0x71eb35,null));};exports[_0x2010('0x47')]=function(_0x4dc0cf,_0x30e5d0){return db[_0x2010('0x2c')]['create'](_0x4dc0cf[_0x2010('0x48')],{})[_0x2010('0x26')](function(_0x110791){var _0x242274=_0x4dc0cf[_0x2010('0x49')][_0x2010('0x23')]({'plain':!![]});if(!_0x242274)throw new Error(_0x2010('0x4a'));if(_0x242274[_0x2010('0x4b')]==='user'){var _0x5258b9=_0x110791[_0x2010('0x23')]({'plain':!![]});var _0xe1721f='Voicemails';return db[_0x2010('0x4c')][_0x2010('0x46')]({'where':{'name':_0xe1721f,'userProfileId':_0x242274[_0x2010('0x4d')]},'raw':!![]})[_0x2010('0x26')](function(_0x1f1a59){if(_0x1f1a59&&_0x1f1a59['autoAssociation']===0x0){return db['UserProfileResource'][_0x2010('0x47')]({'name':_0x5258b9[_0x2010('0x29')],'resourceId':_0x5258b9['id'],'type':_0x1f1a59[_0x2010('0x29')],'sectionId':_0x1f1a59['id']},{})[_0x2010('0x26')](function(){return _0x110791;});}else{return _0x110791;}})[_0x2010('0x43')](function(_0x2d8164){logger[_0x2010('0x4e')](_0x2010('0x4f'),_0x2d8164);throw _0x2d8164;});}return _0x110791;})[_0x2010('0x26')](respondWithResult(_0x30e5d0,0xc9))[_0x2010('0x43')](handleError(_0x30e5d0,null));};exports[_0x2010('0x50')]=function(_0x5313b5,_0x24421a){if(_0x5313b5[_0x2010('0x48')]['id']){delete _0x5313b5['body']['id'];}return db[_0x2010('0x2c')][_0x2010('0x46')]({'where':{'id':_0x5313b5[_0x2010('0x51')]['id']}})[_0x2010('0x26')](handleEntityNotFound(_0x24421a,null))[_0x2010('0x26')](saveUpdates(_0x5313b5[_0x2010('0x48')],null))[_0x2010('0x26')](respondWithResult(_0x24421a,null))[_0x2010('0x43')](handleError(_0x24421a,null));};exports[_0x2010('0x25')]=function(_0x2dbc2c,_0x1c0b2d){return db[_0x2010('0x2c')][_0x2010('0x46')]({'where':{'id':_0x2dbc2c[_0x2010('0x51')]['id']}})[_0x2010('0x26')](handleEntityNotFound(_0x1c0b2d,null))[_0x2010('0x26')](removeEntity(_0x1c0b2d,null))[_0x2010('0x43')](handleError(_0x1c0b2d,null));};exports[_0x2010('0x52')]=function(_0x2d7765,_0x6f8565,_0x21ee87){return db[_0x2010('0x2c')][_0x2010('0x53')]({'where':{'id':_0x2d7765['params']['id']}})[_0x2010('0x26')](handleEntityNotFound(_0x6f8565,null))['then'](function(_0x5253d5){var _0x1225d7;var _0x13f33d={},_0x4fb5d5={};_0x4fb5d5[_0x2010('0x30')]=_[_0x2010('0x44')](db[_0x2010('0x54')][_0x2010('0x2d')]);_0x4fb5d5['query']=_[_0x2010('0x44')](_0x2d7765[_0x2010('0x32')]);_0x4fb5d5[_0x2010('0x33')]=_[_0x2010('0x34')](_0x4fb5d5['model'],_0x4fb5d5[_0x2010('0x32')]);_0x13f33d['attributes']=_[_0x2010('0x34')](_0x4fb5d5[_0x2010('0x30')],qs[_0x2010('0x36')](_0x2d7765[_0x2010('0x32')]['fields']));_0x13f33d['attributes']=_0x13f33d[_0x2010('0x35')][_0x2010('0x37')]?_0x13f33d['attributes']:_0x4fb5d5['model'];if(!_0x2d7765[_0x2010('0x32')][_0x2010('0x38')](_0x2010('0x39'))){_0x13f33d[_0x2010('0x1d')]=qs['limit'](_0x2d7765[_0x2010('0x32')]['limit']);_0x13f33d[_0x2010('0x1b')]=qs[_0x2010('0x1b')](_0x2d7765[_0x2010('0x32')][_0x2010('0x1b')]);}_0x13f33d['order']=qs[_0x2010('0x3a')](_0x2d7765[_0x2010('0x32')]['sort']);_0x13f33d[_0x2010('0x3b')]=qs[_0x2010('0x33')](_[_0x2010('0x3c')](_0x2d7765[_0x2010('0x32')],_0x4fb5d5[_0x2010('0x33')]));if(_0x2d7765[_0x2010('0x32')][_0x2010('0x3d')]){_0x13f33d[_0x2010('0x3b')]=_[_0x2010('0x3e')](_0x13f33d[_0x2010('0x3b')],{'$or':_[_0x2010('0x31')](_0x13f33d[_0x2010('0x35')],function(_0x4ebdca){var _0x3ca7b3={};_0x3ca7b3[_0x4ebdca]={'$like':'%'+_0x2d7765[_0x2010('0x32')][_0x2010('0x3d')]+'%'};return _0x3ca7b3;})});}_0x13f33d['where']=_['merge'](_0x13f33d[_0x2010('0x3b')],{'mailboxuser':_0x5253d5[_0x2010('0x55')]});_0x13f33d=_[_0x2010('0x3e')]({},_0x13f33d,_0x2d7765[_0x2010('0x40')]);return db[_0x2010('0x54')][_0x2010('0x56')](_0x13f33d)['then'](respondWithFilteredResult(_0x6f8565,_0x13f33d));})[_0x2010('0x43')](handleError(_0x6f8565,null));}; \ No newline at end of file +var _0x84a0=['UserProfileSection','userProfileId','UserProfileResource','catch','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','getMessages','findOne','VoiceMailMessage','mailbox','findAndCountAll','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','path','sox','ejs','fs-extra','lodash','squel','crypto','desk.js','to-csv','querystring','papaparse','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','sendStatus','status','end','json','undefined','offset','count','limit','set','Content-Range','apply','save','update','destroy','then','get','Voicemails','error','stack','name','send','index','map','VoiceMail','rawAttributes','fieldName','type','key','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','findAll','rows','show','params','keys','include','find','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user'];(function(_0x37ffea,_0x25b006){var _0x2e2615=function(_0x5e6c74){while(--_0x5e6c74){_0x37ffea['push'](_0x37ffea['shift']());}};_0x2e2615(++_0x25b006);}(_0x84a0,0x66));var _0x084a=function(_0x1a0557,_0x2a0db7){_0x1a0557=_0x1a0557-0x0;var _0x1ad015=_0x84a0[_0x1a0557];return _0x1ad015;};'use strict';var emlformat=require(_0x084a('0x0'));var rimraf=require(_0x084a('0x1'));var zipdir=require(_0x084a('0x2'));var jsonpatch=require(_0x084a('0x3'));var rp=require('request-promise');var moment=require(_0x084a('0x4'));var BPromise=require(_0x084a('0x5'));var Mustache=require('mustache');var util=require('util');var path=require(_0x084a('0x6'));var sox=require(_0x084a('0x7'));var csv=require('to-csv');var ejs=require(_0x084a('0x8'));var fs=require('fs');var fs_extra=require(_0x084a('0x9'));var _=require(_0x084a('0xa'));var squel=require(_0x084a('0xb'));var crypto=require(_0x084a('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x084a('0xd'));var toCsv=require(_0x084a('0xe'));var querystring=require(_0x084a('0xf'));var Papa=require(_0x084a('0x10'));var Redis=require(_0x084a('0x11'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x084a('0x12'));var hardwareService=require(_0x084a('0x13'));var logger=require(_0x084a('0x14'))(_0x084a('0x15'));var utils=require(_0x084a('0x16'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x084a('0x17'))['db'];function respondWithStatusCode(_0x3ca72f,_0xec90a5){_0xec90a5=_0xec90a5||0xcc;return function(_0x9245b1){if(_0x9245b1){return _0x3ca72f[_0x084a('0x18')](_0xec90a5);}return _0x3ca72f[_0x084a('0x19')](_0xec90a5)[_0x084a('0x1a')]();};}function respondWithResult(_0x3a76d1,_0x5aef40){_0x5aef40=_0x5aef40||0xc8;return function(_0x4277c9){if(_0x4277c9){return _0x3a76d1['status'](_0x5aef40)[_0x084a('0x1b')](_0x4277c9);}};}function respondWithFilteredResult(_0x3ccaca,_0x366624){return function(_0x2d35b8){if(_0x2d35b8){var _0xd20527=typeof _0x366624['offset']===_0x084a('0x1c')&&typeof _0x366624['limit']===_0x084a('0x1c');var _0x355b45=_0x2d35b8['count'];var _0xf2c333=_0xd20527?0x0:_0x366624[_0x084a('0x1d')];var _0x4134b9=_0xd20527?_0x2d35b8[_0x084a('0x1e')]:_0x366624[_0x084a('0x1d')]+_0x366624[_0x084a('0x1f')];var _0x447a19;if(_0x4134b9>=_0x355b45){_0x4134b9=_0x355b45;_0x447a19=0xc8;}else{_0x447a19=0xce;}_0x3ccaca[_0x084a('0x19')](_0x447a19);return _0x3ccaca[_0x084a('0x20')](_0x084a('0x21'),_0xf2c333+'-'+_0x4134b9+'/'+_0x355b45)[_0x084a('0x1b')](_0x2d35b8);}return null;};}function patchUpdates(_0x279e25){return function(_0x116328){try{jsonpatch[_0x084a('0x22')](_0x116328,_0x279e25,!![]);}catch(_0xf0dd98){return BPromise['reject'](_0xf0dd98);}return _0x116328[_0x084a('0x23')]();};}function saveUpdates(_0x1ad257,_0x41a90f){return function(_0x2d62bf){if(_0x2d62bf){return _0x2d62bf[_0x084a('0x24')](_0x1ad257)['then'](function(_0x755c24){return _0x755c24;});}return null;};}function removeEntity(_0x288e9e,_0x6346a5){return function(_0x1f2c9f){if(_0x1f2c9f){return _0x1f2c9f[_0x084a('0x25')]()[_0x084a('0x26')](function(){var _0x5be167=_0x1f2c9f[_0x084a('0x27')]({'plain':!![]});var _0x2af138=_0x084a('0x28');return db['UserProfileResource'][_0x084a('0x25')]({'where':{'type':_0x2af138,'resourceId':_0x5be167['id']}})[_0x084a('0x26')](function(){return _0x1f2c9f;});})[_0x084a('0x26')](function(){_0x288e9e['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x4874fe,_0x52227a){return function(_0x33b88f){if(!_0x33b88f){_0x4874fe['sendStatus'](0x194);}return _0x33b88f;};}function handleError(_0x5bea78,_0x51c9f4){_0x51c9f4=_0x51c9f4||0x1f4;return function(_0x3b8176){logger[_0x084a('0x29')](_0x3b8176[_0x084a('0x2a')]);if(_0x3b8176[_0x084a('0x2b')]){delete _0x3b8176[_0x084a('0x2b')];}_0x5bea78[_0x084a('0x19')](_0x51c9f4)[_0x084a('0x2c')](_0x3b8176);};}exports[_0x084a('0x2d')]=function(_0x5e6ea8,_0x2ed3cd){var _0x3b2b38={},_0x501a16={},_0xe1980b={'count':0x0,'rows':[]};var _0x24bcf5=_[_0x084a('0x2e')](db[_0x084a('0x2f')][_0x084a('0x30')],function(_0x202602){return{'name':_0x202602[_0x084a('0x31')],'type':_0x202602[_0x084a('0x32')][_0x084a('0x33')]};});_0x501a16[_0x084a('0x34')]=_[_0x084a('0x2e')](_0x24bcf5,_0x084a('0x2b'));_0x501a16[_0x084a('0x35')]=_['keys'](_0x5e6ea8['query']);_0x501a16[_0x084a('0x36')]=_[_0x084a('0x37')](_0x501a16[_0x084a('0x34')],_0x501a16[_0x084a('0x35')]);_0x3b2b38[_0x084a('0x38')]=_['intersection'](_0x501a16[_0x084a('0x34')],qs[_0x084a('0x39')](_0x5e6ea8[_0x084a('0x35')]['fields']));_0x3b2b38[_0x084a('0x38')]=_0x3b2b38[_0x084a('0x38')][_0x084a('0x3a')]?_0x3b2b38['attributes']:_0x501a16['model'];if(!_0x5e6ea8['query'][_0x084a('0x3b')](_0x084a('0x3c'))){_0x3b2b38[_0x084a('0x1f')]=qs['limit'](_0x5e6ea8[_0x084a('0x35')][_0x084a('0x1f')]);_0x3b2b38[_0x084a('0x1d')]=qs[_0x084a('0x1d')](_0x5e6ea8[_0x084a('0x35')][_0x084a('0x1d')]);}_0x3b2b38[_0x084a('0x3d')]=qs[_0x084a('0x3e')](_0x5e6ea8[_0x084a('0x35')][_0x084a('0x3e')]);_0x3b2b38[_0x084a('0x3f')]=qs[_0x084a('0x36')](_[_0x084a('0x40')](_0x5e6ea8[_0x084a('0x35')],_0x501a16[_0x084a('0x36')]),_0x24bcf5);if(_0x5e6ea8['query'][_0x084a('0x41')]){_0x3b2b38[_0x084a('0x3f')]=_[_0x084a('0x42')](_0x3b2b38[_0x084a('0x3f')],{'$or':_[_0x084a('0x2e')](_0x24bcf5,function(_0x22862b){if(_0x22862b[_0x084a('0x32')]!==_0x084a('0x43')){var _0x13dc4c={};_0x13dc4c[_0x22862b['name']]={'$like':'%'+_0x5e6ea8[_0x084a('0x35')][_0x084a('0x41')]+'%'};return _0x13dc4c;}})});}_0x3b2b38=_[_0x084a('0x42')]({},_0x3b2b38,_0x5e6ea8[_0x084a('0x44')]);var _0x256008={'where':_0x3b2b38[_0x084a('0x3f')]};return db['VoiceMail'][_0x084a('0x1e')](_0x256008)[_0x084a('0x26')](function(_0x55c5f4){_0xe1980b[_0x084a('0x1e')]=_0x55c5f4;if(_0x5e6ea8[_0x084a('0x35')][_0x084a('0x45')]){_0x3b2b38['include']=[{'all':!![]}];}return db[_0x084a('0x2f')][_0x084a('0x46')](_0x3b2b38);})['then'](function(_0x3e2b92){_0xe1980b[_0x084a('0x47')]=_0x3e2b92;return _0xe1980b;})['then'](respondWithFilteredResult(_0x2ed3cd,_0x3b2b38))['catch'](handleError(_0x2ed3cd,null));};exports[_0x084a('0x48')]=function(_0x17a8d4,_0x3726bd){var _0xec2713={'raw':!![],'where':{'id':_0x17a8d4[_0x084a('0x49')]['id']}},_0x1e2a2d={};_0x1e2a2d[_0x084a('0x34')]=_[_0x084a('0x4a')](db[_0x084a('0x2f')][_0x084a('0x30')]);_0x1e2a2d[_0x084a('0x35')]=_['keys'](_0x17a8d4['query']);_0x1e2a2d[_0x084a('0x36')]=_[_0x084a('0x37')](_0x1e2a2d[_0x084a('0x34')],_0x1e2a2d['query']);_0xec2713[_0x084a('0x38')]=_[_0x084a('0x37')](_0x1e2a2d[_0x084a('0x34')],qs[_0x084a('0x39')](_0x17a8d4[_0x084a('0x35')]['fields']));_0xec2713[_0x084a('0x38')]=_0xec2713['attributes'][_0x084a('0x3a')]?_0xec2713[_0x084a('0x38')]:_0x1e2a2d[_0x084a('0x34')];if(_0x17a8d4['query']['includeAll']){_0xec2713[_0x084a('0x4b')]=[{'all':!![]}];}_0xec2713=_[_0x084a('0x42')]({},_0xec2713,_0x17a8d4['options']);return db[_0x084a('0x2f')][_0x084a('0x4c')](_0xec2713)[_0x084a('0x26')](handleEntityNotFound(_0x3726bd,null))[_0x084a('0x26')](respondWithResult(_0x3726bd,null))['catch'](handleError(_0x3726bd,null));};exports[_0x084a('0x4d')]=function(_0x865368,_0x31677b){return db[_0x084a('0x2f')]['create'](_0x865368[_0x084a('0x4e')],{})[_0x084a('0x26')](function(_0x411fa9){var _0x2d3d01=_0x865368['user']['get']({'plain':!![]});if(!_0x2d3d01)throw new Error(_0x084a('0x4f'));if(_0x2d3d01[_0x084a('0x50')]===_0x084a('0x51')){var _0x264f09=_0x411fa9[_0x084a('0x27')]({'plain':!![]});var _0x3b2df4=_0x084a('0x28');return db[_0x084a('0x52')][_0x084a('0x4c')]({'where':{'name':_0x3b2df4,'userProfileId':_0x2d3d01[_0x084a('0x53')]},'raw':!![]})[_0x084a('0x26')](function(_0x98769c){if(_0x98769c&&_0x98769c['autoAssociation']===0x0){return db[_0x084a('0x54')][_0x084a('0x4d')]({'name':_0x264f09[_0x084a('0x2b')],'resourceId':_0x264f09['id'],'type':_0x98769c[_0x084a('0x2b')],'sectionId':_0x98769c['id']},{})[_0x084a('0x26')](function(){return _0x411fa9;});}else{return _0x411fa9;}})[_0x084a('0x55')](function(_0xa5362){logger['error'](_0x084a('0x56'),_0xa5362);throw _0xa5362;});}return _0x411fa9;})[_0x084a('0x26')](respondWithResult(_0x31677b,0xc9))[_0x084a('0x55')](handleError(_0x31677b,null));};exports['update']=function(_0x54ca1f,_0x424cd1){if(_0x54ca1f['body']['id']){delete _0x54ca1f[_0x084a('0x4e')]['id'];}return db[_0x084a('0x2f')]['find']({'where':{'id':_0x54ca1f[_0x084a('0x49')]['id']}})['then'](handleEntityNotFound(_0x424cd1,null))['then'](saveUpdates(_0x54ca1f[_0x084a('0x4e')],null))[_0x084a('0x26')](respondWithResult(_0x424cd1,null))[_0x084a('0x55')](handleError(_0x424cd1,null));};exports[_0x084a('0x25')]=function(_0x2a8056,_0x57d397){return db[_0x084a('0x2f')]['find']({'where':{'id':_0x2a8056[_0x084a('0x49')]['id']}})[_0x084a('0x26')](handleEntityNotFound(_0x57d397,null))[_0x084a('0x26')](removeEntity(_0x57d397,null))['catch'](handleError(_0x57d397,null));};exports[_0x084a('0x57')]=function(_0x339088,_0x12db87,_0x9246dd){return db['VoiceMail'][_0x084a('0x58')]({'where':{'id':_0x339088['params']['id']}})[_0x084a('0x26')](handleEntityNotFound(_0x12db87,null))[_0x084a('0x26')](function(_0x21a18a){var _0x4cc344;var _0x589e38={},_0xd37003={};_0xd37003[_0x084a('0x34')]=_['keys'](db[_0x084a('0x59')]['rawAttributes']);_0xd37003['query']=_[_0x084a('0x4a')](_0x339088[_0x084a('0x35')]);_0xd37003[_0x084a('0x36')]=_[_0x084a('0x37')](_0xd37003[_0x084a('0x34')],_0xd37003[_0x084a('0x35')]);_0x589e38[_0x084a('0x38')]=_[_0x084a('0x37')](_0xd37003[_0x084a('0x34')],qs['fields'](_0x339088[_0x084a('0x35')][_0x084a('0x39')]));_0x589e38[_0x084a('0x38')]=_0x589e38['attributes'][_0x084a('0x3a')]?_0x589e38[_0x084a('0x38')]:_0xd37003['model'];if(!_0x339088[_0x084a('0x35')]['hasOwnProperty']('nolimit')){_0x589e38[_0x084a('0x1f')]=qs['limit'](_0x339088['query'][_0x084a('0x1f')]);_0x589e38[_0x084a('0x1d')]=qs[_0x084a('0x1d')](_0x339088['query'][_0x084a('0x1d')]);}_0x589e38[_0x084a('0x3d')]=qs[_0x084a('0x3e')](_0x339088[_0x084a('0x35')][_0x084a('0x3e')]);_0x589e38[_0x084a('0x3f')]=qs[_0x084a('0x36')](_['pick'](_0x339088['query'],_0xd37003[_0x084a('0x36')]));if(_0x339088[_0x084a('0x35')]['filter']){_0x589e38[_0x084a('0x3f')]=_[_0x084a('0x42')](_0x589e38[_0x084a('0x3f')],{'$or':_[_0x084a('0x2e')](_0x589e38['attributes'],function(_0x21dd85){var _0x3fa52e={};_0x3fa52e[_0x21dd85]={'$like':'%'+_0x339088[_0x084a('0x35')]['filter']+'%'};return _0x3fa52e;})});}_0x589e38['where']=_[_0x084a('0x42')](_0x589e38[_0x084a('0x3f')],{'mailboxuser':_0x21a18a[_0x084a('0x5a')]});_0x589e38=_[_0x084a('0x42')]({},_0x589e38,_0x339088[_0x084a('0x44')]);return db[_0x084a('0x59')][_0x084a('0x5b')](_0x589e38)['then'](respondWithFilteredResult(_0x12db87,_0x589e38));})[_0x084a('0x55')](handleError(_0x12db87,null));}; \ No newline at end of file diff --git a/server/api/voiceMail/voiceMail.model.js b/server/api/voiceMail/voiceMail.model.js index fd1a670..2201b72 100644 --- a/server/api/voiceMail/voiceMail.model.js +++ b/server/api/voiceMail/voiceMail.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc8a2=['voice_voicemail','mailbox_context','mailbox','context','lodash','../../config/logger','api','moment','request-promise','rimraf','../../config/environment','exports','define','VoiceMail'];(function(_0x567f0e,_0x2be7a0){var _0x15aca8=function(_0x1e6ca6){while(--_0x1e6ca6){_0x567f0e['push'](_0x567f0e['shift']());}};_0x15aca8(++_0x2be7a0);}(_0xc8a2,0x100));var _0x2c8a=function(_0x5f0089,_0x227e2c){_0x5f0089=_0x5f0089-0x0;var _0x193892=_0xc8a2[_0x5f0089];return _0x193892;};'use strict';var _=require(_0x2c8a('0x0'));var util=require('util');var logger=require(_0x2c8a('0x1'))(_0x2c8a('0x2'));var moment=require(_0x2c8a('0x3'));var BPromise=require('bluebird');var rp=require(_0x2c8a('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x2c8a('0x5'));var config=require(_0x2c8a('0x6'));var attributes=require('./voiceMail.attributes');module[_0x2c8a('0x7')]=function(_0x43fcc4,_0x26a993){return _0x43fcc4[_0x2c8a('0x8')](_0x2c8a('0x9'),attributes,{'tableName':_0x2c8a('0xa'),'paranoid':![],'indexes':[{'name':_0x2c8a('0xb'),'fields':[_0x2c8a('0xc'),_0x2c8a('0xd')]}],'timestamps':!![]});}; \ No newline at end of file +var _0x171b=['bluebird','path','../../config/environment','exports','define','VoiceMail','voice_voicemail','context','lodash','util','api','moment'];(function(_0x6001ce,_0x2267a6){var _0x34311a=function(_0x58cbb5){while(--_0x58cbb5){_0x6001ce['push'](_0x6001ce['shift']());}};_0x34311a(++_0x2267a6);}(_0x171b,0xf8));var _0xb171=function(_0x14ccdf,_0x398a78){_0x14ccdf=_0x14ccdf-0x0;var _0x4e98f3=_0x171b[_0x14ccdf];return _0x4e98f3;};'use strict';var _=require(_0xb171('0x0'));var util=require(_0xb171('0x1'));var logger=require('../../config/logger')(_0xb171('0x2'));var moment=require(_0xb171('0x3'));var BPromise=require(_0xb171('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xb171('0x5'));var rimraf=require('rimraf');var config=require(_0xb171('0x6'));var attributes=require('./voiceMail.attributes');module[_0xb171('0x7')]=function(_0x53d4d8,_0x4aac71){return _0x53d4d8[_0xb171('0x8')](_0xb171('0x9'),attributes,{'tableName':_0xb171('0xa'),'paranoid':![],'indexes':[{'name':'mailbox_context','fields':['mailbox',_0xb171('0xb')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/voiceMail/voiceMail.rpc.js b/server/api/voiceMail/voiceMail.rpc.js index 8a0a89b..0b9f14a 100644 --- a/server/api/voiceMail/voiceMail.rpc.js +++ b/server/api/voiceMail/voiceMail.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x282f=['ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','info','VoiceMail,\x20%s,\x20%s','debug','VoiceMail,\x20%s,\x20%s,\x20%s','request\x20sent','error','message','util','moment','bluebird','randomstring'];(function(_0x198f1f,_0x4dd1b5){var _0x3aae19=function(_0x55cae1){while(--_0x55cae1){_0x198f1f['push'](_0x198f1f['shift']());}};_0x3aae19(++_0x4dd1b5);}(_0x282f,0xb0));var _0xf282=function(_0x24c126,_0x311c13){_0x24c126=_0x24c126-0x0;var _0xc047ac=_0x282f[_0x24c126];return _0xc047ac;};'use strict';var _=require('lodash');var util=require(_0xf282('0x0'));var moment=require(_0xf282('0x1'));var BPromise=require(_0xf282('0x2'));var rs=require(_0xf282('0x3'));var fs=require('fs');var Redis=require(_0xf282('0x4'));var db=require(_0xf282('0x5'))['db'];var utils=require(_0xf282('0x6'));var logger=require(_0xf282('0x7'))(_0xf282('0x8'));var config=require(_0xf282('0x9'));var jayson=require(_0xf282('0xa'));var client=jayson[_0xf282('0xb')][_0xf282('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x20050f,_0x73524b,_0x5ea607){return new BPromise(function(_0x3b585e,_0x265b8d){return client['request'](_0x20050f,_0x5ea607)['then'](function(_0x18772c){logger[_0xf282('0xd')](_0xf282('0xe'),_0x73524b,'request\x20sent');logger[_0xf282('0xf')](_0xf282('0x10'),_0x73524b,_0xf282('0x11'),JSON['stringify'](_0x18772c));if(_0x18772c[_0xf282('0x12')]){if(_0x18772c[_0xf282('0x12')]['code']===0x1f4){logger[_0xf282('0x12')]('VoiceMail,\x20%s,\x20%s',_0x73524b,_0x18772c[_0xf282('0x12')][_0xf282('0x13')]);return _0x265b8d(_0x18772c[_0xf282('0x12')][_0xf282('0x13')]);}logger['error'](_0xf282('0xe'),_0x73524b,_0x18772c['error'][_0xf282('0x13')]);return _0x3b585e(_0x18772c[_0xf282('0x12')]['message']);}else{logger[_0xf282('0xd')](_0xf282('0xe'),_0x73524b,'request\x20sent');_0x3b585e(_0x18772c['result'][_0xf282('0x13')]);}})['catch'](function(_0x31bf34){logger[_0xf282('0x12')](_0xf282('0xe'),_0x73524b,_0x31bf34);_0x265b8d(_0x31bf34);});});} \ No newline at end of file +var _0xe2bd=['VoiceMail,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','request','then','info','VoiceMail,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x4b6e53,_0x1d24a6){var _0x2d8b0b=function(_0x133feb){while(--_0x133feb){_0x4b6e53['push'](_0x4b6e53['shift']());}};_0x2d8b0b(++_0x1d24a6);}(_0xe2bd,0x157));var _0xde2b=function(_0x32a94c,_0x29f028){_0x32a94c=_0x32a94c-0x0;var _0x1841ae=_0xe2bd[_0x32a94c];return _0x1841ae;};'use strict';var _=require(_0xde2b('0x0'));var util=require(_0xde2b('0x1'));var moment=require(_0xde2b('0x2'));var BPromise=require(_0xde2b('0x3'));var rs=require(_0xde2b('0x4'));var fs=require('fs');var Redis=require(_0xde2b('0x5'));var db=require(_0xde2b('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0xde2b('0x7'))(_0xde2b('0x8'));var config=require(_0xde2b('0x9'));var jayson=require(_0xde2b('0xa'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x4a14c4,_0x13d09b,_0x2e7391){return new BPromise(function(_0x41427d,_0x191136){return client[_0xde2b('0xb')](_0x4a14c4,_0x2e7391)[_0xde2b('0xc')](function(_0x3be783){logger[_0xde2b('0xd')](_0xde2b('0xe'),_0x13d09b,_0xde2b('0xf'));logger[_0xde2b('0x10')](_0xde2b('0x11'),_0x13d09b,_0xde2b('0xf'),JSON[_0xde2b('0x12')](_0x3be783));if(_0x3be783[_0xde2b('0x13')]){if(_0x3be783[_0xde2b('0x13')][_0xde2b('0x14')]===0x1f4){logger[_0xde2b('0x13')](_0xde2b('0xe'),_0x13d09b,_0x3be783[_0xde2b('0x13')][_0xde2b('0x15')]);return _0x191136(_0x3be783[_0xde2b('0x13')][_0xde2b('0x15')]);}logger[_0xde2b('0x13')](_0xde2b('0xe'),_0x13d09b,_0x3be783[_0xde2b('0x13')][_0xde2b('0x15')]);return _0x41427d(_0x3be783['error'][_0xde2b('0x15')]);}else{logger[_0xde2b('0xd')](_0xde2b('0xe'),_0x13d09b,_0xde2b('0xf'));_0x41427d(_0x3be783[_0xde2b('0x16')][_0xde2b('0x15')]);}})[_0xde2b('0x17')](function(_0xeecc2b){logger[_0xde2b('0x13')](_0xde2b('0xe'),_0x13d09b,_0xeecc2b);_0x191136(_0xeecc2b);});});} \ No newline at end of file diff --git a/server/api/voiceMailMessage/index.js b/server/api/voiceMailMessage/index.js index e97e22c..04f751d 100644 --- a/server/api/voiceMailMessage/index.js +++ b/server/api/voiceMailMessage/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe984=['post','create','put','update','delete','destroy','util','connect-timeout','express','Router','fs-extra','../../config/environment','isAuthenticated','get','/:id','/:id/download','download'];(function(_0x13f980,_0x1e1c56){var _0x27153c=function(_0x3953d5){while(--_0x3953d5){_0x13f980['push'](_0x13f980['shift']());}};_0x27153c(++_0x1e1c56);}(_0xe984,0x1d1));var _0x4e98=function(_0x566bdf,_0x1f4861){_0x566bdf=_0x566bdf-0x0;var _0x331215=_0xe984[_0x566bdf];return _0x331215;};'use strict';var multer=require('multer');var util=require(_0x4e98('0x0'));var path=require('path');var timeout=require(_0x4e98('0x1'));var express=require(_0x4e98('0x2'));var router=express[_0x4e98('0x3')]();var fs_extra=require(_0x4e98('0x4'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x4e98('0x5'));var controller=require('./voiceMailMessage.controller');router['get']('/',auth[_0x4e98('0x6')](),controller['index']);router[_0x4e98('0x7')](_0x4e98('0x8'),auth[_0x4e98('0x6')](),controller['show']);router[_0x4e98('0x7')](_0x4e98('0x9'),auth['isAuthenticated'](),controller[_0x4e98('0xa')]);router[_0x4e98('0xb')]('/',auth['isAuthenticated'](),controller[_0x4e98('0xc')]);router[_0x4e98('0xd')](_0x4e98('0x8'),auth[_0x4e98('0x6')](),controller[_0x4e98('0xe')]);router[_0x4e98('0xf')]('/:id',auth[_0x4e98('0x6')](),controller[_0x4e98('0x10')]);module['exports']=router; \ No newline at end of file +var _0x693b=['update','exports','multer','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./voiceMailMessage.controller','get','isAuthenticated','index','/:id','/:id/download','download','post','create','put'];(function(_0x1881bd,_0x56b98d){var _0x308085=function(_0x14d54b){while(--_0x14d54b){_0x1881bd['push'](_0x1881bd['shift']());}};_0x308085(++_0x56b98d);}(_0x693b,0x192));var _0xb693=function(_0x599b01,_0x30ffcb){_0x599b01=_0x599b01-0x0;var _0x1f9578=_0x693b[_0x599b01];return _0x1f9578;};'use strict';var multer=require(_0xb693('0x0'));var util=require('util');var path=require(_0xb693('0x1'));var timeout=require(_0xb693('0x2'));var express=require(_0xb693('0x3'));var router=express[_0xb693('0x4')]();var fs_extra=require(_0xb693('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0xb693('0x6'));var config=require(_0xb693('0x7'));var controller=require(_0xb693('0x8'));router[_0xb693('0x9')]('/',auth[_0xb693('0xa')](),controller[_0xb693('0xb')]);router[_0xb693('0x9')](_0xb693('0xc'),auth[_0xb693('0xa')](),controller['show']);router['get'](_0xb693('0xd'),auth[_0xb693('0xa')](),controller[_0xb693('0xe')]);router[_0xb693('0xf')]('/',auth[_0xb693('0xa')](),controller[_0xb693('0x10')]);router[_0xb693('0x11')](_0xb693('0xc'),auth['isAuthenticated'](),controller[_0xb693('0x12')]);router['delete']('/:id',auth[_0xb693('0xa')](),controller['destroy']);module[_0xb693('0x13')]=router; \ No newline at end of file diff --git a/server/api/voiceMailMessage/voiceMailMessage.attributes.js b/server/api/voiceMailMessage/voiceMailMessage.attributes.js index e47878a..942085c 100644 --- a/server/api/voiceMailMessage/voiceMailMessage.attributes.js +++ b/server/api/voiceMailMessage/voiceMailMessage.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc358=['BLOB','long','TIMESTAMP','CURRENT_TIMESTAMP\x20ON\x20UPDATE\x20CURRENT_TIMESTAMP','sequelize','exports','VIRTUAL','STRING'];(function(_0x497b1e,_0x586379){var _0x3f72e1=function(_0x4c227d){while(--_0x4c227d){_0x497b1e['push'](_0x497b1e['shift']());}};_0x3f72e1(++_0x586379);}(_0xc358,0x64));var _0x8c35=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xc358[_0x3dd15e];return _0x231fd0;};'use strict';var Sequelize=require(_0x8c35('0x0'));module[_0x8c35('0x1')]={'name':{'type':Sequelize[_0x8c35('0x2')],'get':function(_0x5e5fd3){return this['getDataValue']('id');}},'msgnum':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x0,'allowNull':![]},'dir':{'type':Sequelize[_0x8c35('0x3')],'defaultValue':''},'context':{'type':Sequelize[_0x8c35('0x3')],'defaultValue':''},'macrocontext':{'type':Sequelize[_0x8c35('0x3')],'defaultValue':''},'callerid':{'type':Sequelize[_0x8c35('0x3')],'defaultValue':''},'origtime':{'type':Sequelize['STRING'],'defaultValue':''},'duration':{'type':Sequelize['STRING'],'defaultValue':''},'mailboxuser':{'type':Sequelize[_0x8c35('0x3')],'defaultValue':''},'mailboxcontext':{'type':Sequelize['STRING'],'defaultValue':''},'recording':{'type':Sequelize[_0x8c35('0x4')](_0x8c35('0x5')),'defaultValue':null},'flag':{'type':Sequelize[_0x8c35('0x3')],'defaultValue':''},'msg_id':{'type':Sequelize[_0x8c35('0x3')],'defaultValue':''},'stamp':{'type':_0x8c35('0x6'),'defaultValue':Sequelize['literal'](_0x8c35('0x7'))}}; \ No newline at end of file +var _0xde9f=['CURRENT_TIMESTAMP\x20ON\x20UPDATE\x20CURRENT_TIMESTAMP','VIRTUAL','STRING','BLOB','long','TIMESTAMP'];(function(_0x579095,_0x4701b4){var _0x41cc63=function(_0x18404a){while(--_0x18404a){_0x579095['push'](_0x579095['shift']());}};_0x41cc63(++_0x4701b4);}(_0xde9f,0x1bd));var _0xfde9=function(_0x5b27da,_0x4a6532){_0x5b27da=_0x5b27da-0x0;var _0x3254f4=_0xde9f[_0x5b27da];return _0x3254f4;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0xfde9('0x0')],'get':function(_0x22d02b){return this['getDataValue']('id');}},'msgnum':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x0,'allowNull':![]},'dir':{'type':Sequelize['STRING'],'defaultValue':''},'context':{'type':Sequelize[_0xfde9('0x1')],'defaultValue':''},'macrocontext':{'type':Sequelize[_0xfde9('0x1')],'defaultValue':''},'callerid':{'type':Sequelize[_0xfde9('0x1')],'defaultValue':''},'origtime':{'type':Sequelize['STRING'],'defaultValue':''},'duration':{'type':Sequelize[_0xfde9('0x1')],'defaultValue':''},'mailboxuser':{'type':Sequelize['STRING'],'defaultValue':''},'mailboxcontext':{'type':Sequelize[_0xfde9('0x1')],'defaultValue':''},'recording':{'type':Sequelize[_0xfde9('0x2')](_0xfde9('0x3')),'defaultValue':null},'flag':{'type':Sequelize[_0xfde9('0x1')],'defaultValue':''},'msg_id':{'type':Sequelize['STRING'],'defaultValue':''},'stamp':{'type':_0xfde9('0x4'),'defaultValue':Sequelize['literal'](_0xfde9('0x5'))}}; \ No newline at end of file diff --git a/server/api/voiceMailMessage/voiceMailMessage.controller.js b/server/api/voiceMailMessage/voiceMailMessage.controller.js index ccf3e30..179c9d2 100644 --- a/server/api/voiceMailMessage/voiceMailMessage.controller.js +++ b/server/api/voiceMailMessage/voiceMailMessage.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x57e0=['squel','crypto','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','count','set','save','update','then','destroy','end','error','stack','name','map','VoiceMailMessage','rawAttributes','fieldName','type','differenceBy','query','keys','filters','model','attributes','intersection','fields','length','nolimit','limit','order','sort','where','pick','merge','options','includeAll','include','findAll','rows','catch','show','params','find','create','body','recording','msg_id','Sequelize','ValidationError','VoiceMailMessage\x20not\x20found','audio/wav','attachment','attachment;\x20filename=\x22','.wav\x22','send','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','fs-extra','lodash'];(function(_0x5af97c,_0x24a49f){var _0x3472ae=function(_0x54cdc3){while(--_0x54cdc3){_0x5af97c['push'](_0x5af97c['shift']());}};_0x3472ae(++_0x24a49f);}(_0x57e0,0x1db));var _0x057e=function(_0x10cfaf,_0x1e3b05){_0x10cfaf=_0x10cfaf-0x0;var _0x11fb55=_0x57e0[_0x10cfaf];return _0x11fb55;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x057e('0x0'));var rp=require(_0x057e('0x1'));var moment=require(_0x057e('0x2'));var BPromise=require(_0x057e('0x3'));var Mustache=require(_0x057e('0x4'));var util=require(_0x057e('0x5'));var path=require(_0x057e('0x6'));var sox=require(_0x057e('0x7'));var csv=require(_0x057e('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x057e('0x9'));var _=require(_0x057e('0xa'));var squel=require(_0x057e('0xb'));var crypto=require(_0x057e('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x057e('0xd'));var toCsv=require(_0x057e('0x8'));var querystring=require(_0x057e('0xe'));var Papa=require('papaparse');var Redis=require(_0x057e('0xf'));var authService=require(_0x057e('0x10'));var qs=require(_0x057e('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x057e('0x12'));var logger=require(_0x057e('0x13'))('api');var utils=require(_0x057e('0x14'));var config=require(_0x057e('0x15'));var licenseUtil=require(_0x057e('0x16'));var db=require(_0x057e('0x17'))['db'];function respondWithStatusCode(_0xf401f4,_0x3e6ff3){_0x3e6ff3=_0x3e6ff3||0xcc;return function(_0x57ecc2){if(_0x57ecc2){return _0xf401f4[_0x057e('0x18')](_0x3e6ff3);}return _0xf401f4[_0x057e('0x19')](_0x3e6ff3)['end']();};}function respondWithResult(_0x415ce3,_0x112afd){_0x112afd=_0x112afd||0xc8;return function(_0x2ba5af){if(_0x2ba5af){return _0x415ce3[_0x057e('0x19')](_0x112afd)[_0x057e('0x1a')](_0x2ba5af);}};}function respondWithFilteredResult(_0x58b87f,_0xfdcfee){return function(_0x48d281){if(_0x48d281){var _0x1f7a77=typeof _0xfdcfee[_0x057e('0x1b')]==='undefined'&&typeof _0xfdcfee['limit']===_0x057e('0x1c');var _0x197e12=_0x48d281[_0x057e('0x1d')];var _0x272bd1=_0x1f7a77?0x0:_0xfdcfee[_0x057e('0x1b')];var _0x52f2b9=_0x1f7a77?_0x48d281['count']:_0xfdcfee[_0x057e('0x1b')]+_0xfdcfee['limit'];var _0x802d5d;if(_0x52f2b9>=_0x197e12){_0x52f2b9=_0x197e12;_0x802d5d=0xc8;}else{_0x802d5d=0xce;}_0x58b87f[_0x057e('0x19')](_0x802d5d);return _0x58b87f[_0x057e('0x1e')]('Content-Range',_0x272bd1+'-'+_0x52f2b9+'/'+_0x197e12)[_0x057e('0x1a')](_0x48d281);}return null;};}function patchUpdates(_0x11bb0c){return function(_0x5a0b14){try{jsonpatch['apply'](_0x5a0b14,_0x11bb0c,!![]);}catch(_0x163b75){return BPromise['reject'](_0x163b75);}return _0x5a0b14[_0x057e('0x1f')]();};}function saveUpdates(_0x9d5e60,_0x1f9bba){return function(_0x56b924){if(_0x56b924){return _0x56b924[_0x057e('0x20')](_0x9d5e60)[_0x057e('0x21')](function(_0x2876f1){return _0x2876f1;});}return null;};}function removeEntity(_0xf27311,_0x31ae42){return function(_0x2bde8d){if(_0x2bde8d){return _0x2bde8d[_0x057e('0x22')]()['then'](function(){_0xf27311[_0x057e('0x19')](0xcc)[_0x057e('0x23')]();});}};}function handleEntityNotFound(_0x4a7be8,_0x205a53){return function(_0x544e74){if(!_0x544e74){_0x4a7be8[_0x057e('0x18')](0x194);}return _0x544e74;};}function handleError(_0x4900fd,_0x41e05a){_0x41e05a=_0x41e05a||0x1f4;return function(_0x470b7e){logger[_0x057e('0x24')](_0x470b7e[_0x057e('0x25')]);if(_0x470b7e[_0x057e('0x26')]){delete _0x470b7e[_0x057e('0x26')];}_0x4900fd['status'](_0x41e05a)['send'](_0x470b7e);};}exports['index']=function(_0x2beb53,_0x2039be){var _0x379ca1={},_0x344891={},_0x3ac00f={'count':0x0,'rows':[]};var _0x4daf7f=_[_0x057e('0x27')](db[_0x057e('0x28')][_0x057e('0x29')],function(_0x3ef08b){return{'name':_0x3ef08b[_0x057e('0x2a')],'type':_0x3ef08b[_0x057e('0x2b')]['key']};});_0x344891['model']=_[_0x057e('0x2c')](_[_0x057e('0x27')](_0x4daf7f,'name'),[_0x057e('0x26')]);_0x344891[_0x057e('0x2d')]=_[_0x057e('0x2e')](_0x2beb53[_0x057e('0x2d')]);_0x344891[_0x057e('0x2f')]=_['intersection'](_0x344891[_0x057e('0x30')],_0x344891['query']);_0x379ca1[_0x057e('0x31')]=_[_0x057e('0x32')](_0x344891[_0x057e('0x30')],qs[_0x057e('0x33')](_0x2beb53[_0x057e('0x2d')][_0x057e('0x33')]));_0x379ca1[_0x057e('0x31')]=_0x379ca1['attributes'][_0x057e('0x34')]?_0x379ca1[_0x057e('0x31')]:_0x344891[_0x057e('0x30')];if(!_0x2beb53[_0x057e('0x2d')]['hasOwnProperty'](_0x057e('0x35'))){_0x379ca1[_0x057e('0x36')]=qs[_0x057e('0x36')](_0x2beb53[_0x057e('0x2d')]['limit']);_0x379ca1['offset']=qs['offset'](_0x2beb53[_0x057e('0x2d')][_0x057e('0x1b')]);}_0x379ca1[_0x057e('0x37')]=qs[_0x057e('0x38')](_0x2beb53[_0x057e('0x2d')][_0x057e('0x38')]);_0x379ca1[_0x057e('0x39')]=qs['filters'](_[_0x057e('0x3a')](_0x2beb53['query'],_0x344891['filters']),_0x4daf7f);if(_0x2beb53[_0x057e('0x2d')]['filter']){_0x379ca1[_0x057e('0x39')]=_[_0x057e('0x3b')](_0x379ca1[_0x057e('0x39')],{'$or':_[_0x057e('0x27')](_0x4daf7f,function(_0x1fc0d9){if(_0x1fc0d9[_0x057e('0x2b')]!=='VIRTUAL'){var _0x13d74e={};_0x13d74e[_0x1fc0d9['name']]={'$like':'%'+_0x2beb53['query']['filter']+'%'};return _0x13d74e;}})});}_0x379ca1=_[_0x057e('0x3b')]({},_0x379ca1,_0x2beb53[_0x057e('0x3c')]);var _0x2d8d48={'where':_0x379ca1['where']};return db[_0x057e('0x28')][_0x057e('0x1d')](_0x2d8d48)['then'](function(_0x3026d0){_0x3ac00f['count']=_0x3026d0;if(_0x2beb53[_0x057e('0x2d')][_0x057e('0x3d')]){_0x379ca1[_0x057e('0x3e')]=[{'all':!![]}];}return db[_0x057e('0x28')][_0x057e('0x3f')](_0x379ca1);})[_0x057e('0x21')](function(_0x10a879){_0x3ac00f[_0x057e('0x40')]=_0x10a879;return _0x3ac00f;})[_0x057e('0x21')](respondWithFilteredResult(_0x2039be,_0x379ca1))[_0x057e('0x41')](handleError(_0x2039be,null));};exports[_0x057e('0x42')]=function(_0x336ce9,_0x64c697){var _0x337be9={'raw':!![],'where':{'id':_0x336ce9[_0x057e('0x43')]['id']}},_0x5247dd={};_0x5247dd[_0x057e('0x30')]=_[_0x057e('0x2e')](db[_0x057e('0x28')]['rawAttributes']);_0x5247dd['query']=_[_0x057e('0x2e')](_0x336ce9[_0x057e('0x2d')]);_0x5247dd[_0x057e('0x2f')]=_[_0x057e('0x32')](_0x5247dd['model'],_0x5247dd[_0x057e('0x2d')]);_0x337be9[_0x057e('0x31')]=_[_0x057e('0x32')](_0x5247dd['model'],qs[_0x057e('0x33')](_0x336ce9[_0x057e('0x2d')][_0x057e('0x33')]));_0x337be9[_0x057e('0x31')]=_0x337be9[_0x057e('0x31')][_0x057e('0x34')]?_0x337be9[_0x057e('0x31')]:_0x5247dd[_0x057e('0x30')];if(_0x336ce9[_0x057e('0x2d')][_0x057e('0x3d')]){_0x337be9['include']=[{'all':!![]}];}_0x337be9=_[_0x057e('0x3b')]({},_0x337be9,_0x336ce9[_0x057e('0x3c')]);return db[_0x057e('0x28')][_0x057e('0x44')](_0x337be9)['then'](handleEntityNotFound(_0x64c697,null))[_0x057e('0x21')](respondWithResult(_0x64c697,null))[_0x057e('0x41')](handleError(_0x64c697,null));};exports[_0x057e('0x45')]=function(_0x28bb1e,_0x45c23f){return db[_0x057e('0x28')][_0x057e('0x45')](_0x28bb1e[_0x057e('0x46')],{})[_0x057e('0x21')](respondWithResult(_0x45c23f,0xc9))[_0x057e('0x41')](handleError(_0x45c23f,null));};exports[_0x057e('0x20')]=function(_0x5d620b,_0x3f1364){if(_0x5d620b[_0x057e('0x46')]['id']){delete _0x5d620b[_0x057e('0x46')]['id'];}return db[_0x057e('0x28')][_0x057e('0x44')]({'where':{'id':_0x5d620b['params']['id']}})['then'](handleEntityNotFound(_0x3f1364,null))['then'](saveUpdates(_0x5d620b['body'],null))['then'](respondWithResult(_0x3f1364,null))[_0x057e('0x41')](handleError(_0x3f1364,null));};exports[_0x057e('0x22')]=function(_0x2f7664,_0x40961e){return db[_0x057e('0x28')][_0x057e('0x44')]({'where':{'id':_0x2f7664[_0x057e('0x43')]['id']}})[_0x057e('0x21')](handleEntityNotFound(_0x40961e,null))[_0x057e('0x21')](removeEntity(_0x40961e,null))[_0x057e('0x41')](handleError(_0x40961e,null));};exports['download']=function(_0x5a1860,_0x28128b,_0x52e79a){return db[_0x057e('0x28')][_0x057e('0x44')]({'where':{'id':_0x5a1860[_0x057e('0x43')]['id']},'attributes':['id',_0x057e('0x47'),_0x057e('0x48')]})['then'](handleEntityNotFound(_0x28128b,null))[_0x057e('0x21')](function(_0x5ecfb7){if(_0x5ecfb7){if(!_0x5ecfb7['recording']){throw new db[(_0x057e('0x49'))][(_0x057e('0x4a'))](_0x057e('0x4b'));}var _0x122b25={'Content-Type':_0x057e('0x4c'),'Content-Disposition':_0x057e('0x4d')};if(_0x5ecfb7['msg_id']){_0x122b25['Content-Disposition']=_0x057e('0x4e')+_0x5ecfb7[_0x057e('0x48')]+_0x057e('0x4f');}_0x28128b[_0x057e('0x1e')](_0x122b25);return _0x28128b[_0x057e('0x50')](new Buffer(_0x5ecfb7[_0x057e('0x47')]));}})[_0x057e('0x41')](handleError(_0x28128b,null));}; \ No newline at end of file +var _0xf1d8=['../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','undefined','limit','offset','set','Content-Range','apply','reject','save','update','destroy','then','name','map','VoiceMailMessage','rawAttributes','type','key','differenceBy','query','keys','filters','model','fields','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','VIRTUAL','options','count','includeAll','include','findAll','rows','catch','show','params','intersection','attributes','find','create','body','download','recording','msg_id','ValidationError','audio/wav','Content-Disposition','attachment;\x20filename=\x22','.wav\x22','send','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','fs-extra','lodash','squel','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs'];(function(_0x534185,_0x1e880f){var _0xd10ee2=function(_0x4196be){while(--_0x4196be){_0x534185['push'](_0x534185['shift']());}};_0xd10ee2(++_0x1e880f);}(_0xf1d8,0x195));var _0x8f1d=function(_0x5a2d3f,_0x27b04e){_0x5a2d3f=_0x5a2d3f-0x0;var _0x5c65d8=_0xf1d8[_0x5a2d3f];return _0x5c65d8;};'use strict';var emlformat=require(_0x8f1d('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x8f1d('0x1'));var jsonpatch=require(_0x8f1d('0x2'));var rp=require(_0x8f1d('0x3'));var moment=require(_0x8f1d('0x4'));var BPromise=require(_0x8f1d('0x5'));var Mustache=require(_0x8f1d('0x6'));var util=require(_0x8f1d('0x7'));var path=require(_0x8f1d('0x8'));var sox=require(_0x8f1d('0x9'));var csv=require(_0x8f1d('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x8f1d('0xb'));var _=require(_0x8f1d('0xc'));var squel=require(_0x8f1d('0xd'));var crypto=require('crypto');var jsforce=require(_0x8f1d('0xe'));var deskjs=require(_0x8f1d('0xf'));var toCsv=require('to-csv');var querystring=require(_0x8f1d('0x10'));var Papa=require(_0x8f1d('0x11'));var Redis=require('ioredis');var authService=require(_0x8f1d('0x12'));var qs=require(_0x8f1d('0x13'));var as=require(_0x8f1d('0x14'));var hardwareService=require(_0x8f1d('0x15'));var logger=require('../../config/logger')(_0x8f1d('0x16'));var utils=require('../../config/utils');var config=require(_0x8f1d('0x17'));var licenseUtil=require(_0x8f1d('0x18'));var db=require(_0x8f1d('0x19'))['db'];function respondWithStatusCode(_0x31d6ee,_0x26caaf){_0x26caaf=_0x26caaf||0xcc;return function(_0x304f3e){if(_0x304f3e){return _0x31d6ee[_0x8f1d('0x1a')](_0x26caaf);}return _0x31d6ee[_0x8f1d('0x1b')](_0x26caaf)[_0x8f1d('0x1c')]();};}function respondWithResult(_0x4ce7d7,_0xc2e14){_0xc2e14=_0xc2e14||0xc8;return function(_0x3e7364){if(_0x3e7364){return _0x4ce7d7['status'](_0xc2e14)[_0x8f1d('0x1d')](_0x3e7364);}};}function respondWithFilteredResult(_0x11cfa6,_0x42871a){return function(_0x3756a8){if(_0x3756a8){var _0x2e2120=typeof _0x42871a['offset']===_0x8f1d('0x1e')&&typeof _0x42871a[_0x8f1d('0x1f')]===_0x8f1d('0x1e');var _0x1ddeb5=_0x3756a8['count'];var _0x1fd82f=_0x2e2120?0x0:_0x42871a[_0x8f1d('0x20')];var _0x1d6d3f=_0x2e2120?_0x3756a8['count']:_0x42871a[_0x8f1d('0x20')]+_0x42871a['limit'];var _0x128ead;if(_0x1d6d3f>=_0x1ddeb5){_0x1d6d3f=_0x1ddeb5;_0x128ead=0xc8;}else{_0x128ead=0xce;}_0x11cfa6['status'](_0x128ead);return _0x11cfa6[_0x8f1d('0x21')](_0x8f1d('0x22'),_0x1fd82f+'-'+_0x1d6d3f+'/'+_0x1ddeb5)[_0x8f1d('0x1d')](_0x3756a8);}return null;};}function patchUpdates(_0x1c9317){return function(_0x52e861){try{jsonpatch[_0x8f1d('0x23')](_0x52e861,_0x1c9317,!![]);}catch(_0x4dcb9d){return BPromise[_0x8f1d('0x24')](_0x4dcb9d);}return _0x52e861[_0x8f1d('0x25')]();};}function saveUpdates(_0xaa837,_0x584957){return function(_0x433702){if(_0x433702){return _0x433702[_0x8f1d('0x26')](_0xaa837)['then'](function(_0x535d0a){return _0x535d0a;});}return null;};}function removeEntity(_0x20b8d3,_0x1b667b){return function(_0x5cd5f3){if(_0x5cd5f3){return _0x5cd5f3[_0x8f1d('0x27')]()[_0x8f1d('0x28')](function(){_0x20b8d3['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x1c0143,_0x533345){return function(_0x22cc40){if(!_0x22cc40){_0x1c0143[_0x8f1d('0x1a')](0x194);}return _0x22cc40;};}function handleError(_0x156ced,_0x5f3296){_0x5f3296=_0x5f3296||0x1f4;return function(_0x56a3ae){logger['error'](_0x56a3ae['stack']);if(_0x56a3ae['name']){delete _0x56a3ae[_0x8f1d('0x29')];}_0x156ced['status'](_0x5f3296)['send'](_0x56a3ae);};}exports['index']=function(_0x535774,_0x52ce64){var _0x1c8fd7={},_0x47f1f7={},_0x5b1eb3={'count':0x0,'rows':[]};var _0x5e6e33=_[_0x8f1d('0x2a')](db[_0x8f1d('0x2b')][_0x8f1d('0x2c')],function(_0x411806){return{'name':_0x411806['fieldName'],'type':_0x411806[_0x8f1d('0x2d')][_0x8f1d('0x2e')]};});_0x47f1f7['model']=_[_0x8f1d('0x2f')](_[_0x8f1d('0x2a')](_0x5e6e33,_0x8f1d('0x29')),[_0x8f1d('0x29')]);_0x47f1f7[_0x8f1d('0x30')]=_[_0x8f1d('0x31')](_0x535774[_0x8f1d('0x30')]);_0x47f1f7[_0x8f1d('0x32')]=_['intersection'](_0x47f1f7[_0x8f1d('0x33')],_0x47f1f7[_0x8f1d('0x30')]);_0x1c8fd7['attributes']=_['intersection'](_0x47f1f7[_0x8f1d('0x33')],qs[_0x8f1d('0x34')](_0x535774['query'][_0x8f1d('0x34')]));_0x1c8fd7['attributes']=_0x1c8fd7['attributes'][_0x8f1d('0x35')]?_0x1c8fd7['attributes']:_0x47f1f7[_0x8f1d('0x33')];if(!_0x535774[_0x8f1d('0x30')][_0x8f1d('0x36')](_0x8f1d('0x37'))){_0x1c8fd7[_0x8f1d('0x1f')]=qs['limit'](_0x535774[_0x8f1d('0x30')][_0x8f1d('0x1f')]);_0x1c8fd7['offset']=qs[_0x8f1d('0x20')](_0x535774[_0x8f1d('0x30')]['offset']);}_0x1c8fd7[_0x8f1d('0x38')]=qs[_0x8f1d('0x39')](_0x535774[_0x8f1d('0x30')][_0x8f1d('0x39')]);_0x1c8fd7[_0x8f1d('0x3a')]=qs[_0x8f1d('0x32')](_['pick'](_0x535774['query'],_0x47f1f7[_0x8f1d('0x32')]),_0x5e6e33);if(_0x535774['query'][_0x8f1d('0x3b')]){_0x1c8fd7[_0x8f1d('0x3a')]=_[_0x8f1d('0x3c')](_0x1c8fd7[_0x8f1d('0x3a')],{'$or':_[_0x8f1d('0x2a')](_0x5e6e33,function(_0x283b9c){if(_0x283b9c['type']!==_0x8f1d('0x3d')){var _0x29866f={};_0x29866f[_0x283b9c[_0x8f1d('0x29')]]={'$like':'%'+_0x535774['query'][_0x8f1d('0x3b')]+'%'};return _0x29866f;}})});}_0x1c8fd7=_[_0x8f1d('0x3c')]({},_0x1c8fd7,_0x535774[_0x8f1d('0x3e')]);var _0x17c1b6={'where':_0x1c8fd7[_0x8f1d('0x3a')]};return db['VoiceMailMessage'][_0x8f1d('0x3f')](_0x17c1b6)['then'](function(_0x52e5a0){_0x5b1eb3[_0x8f1d('0x3f')]=_0x52e5a0;if(_0x535774[_0x8f1d('0x30')][_0x8f1d('0x40')]){_0x1c8fd7[_0x8f1d('0x41')]=[{'all':!![]}];}return db[_0x8f1d('0x2b')][_0x8f1d('0x42')](_0x1c8fd7);})[_0x8f1d('0x28')](function(_0x4cf2dd){_0x5b1eb3[_0x8f1d('0x43')]=_0x4cf2dd;return _0x5b1eb3;})[_0x8f1d('0x28')](respondWithFilteredResult(_0x52ce64,_0x1c8fd7))[_0x8f1d('0x44')](handleError(_0x52ce64,null));};exports[_0x8f1d('0x45')]=function(_0x1e9cde,_0x29a56b){var _0x58fe87={'raw':!![],'where':{'id':_0x1e9cde[_0x8f1d('0x46')]['id']}},_0x2cd5a2={};_0x2cd5a2['model']=_[_0x8f1d('0x31')](db[_0x8f1d('0x2b')][_0x8f1d('0x2c')]);_0x2cd5a2['query']=_[_0x8f1d('0x31')](_0x1e9cde[_0x8f1d('0x30')]);_0x2cd5a2['filters']=_[_0x8f1d('0x47')](_0x2cd5a2[_0x8f1d('0x33')],_0x2cd5a2[_0x8f1d('0x30')]);_0x58fe87[_0x8f1d('0x48')]=_[_0x8f1d('0x47')](_0x2cd5a2[_0x8f1d('0x33')],qs[_0x8f1d('0x34')](_0x1e9cde[_0x8f1d('0x30')]['fields']));_0x58fe87[_0x8f1d('0x48')]=_0x58fe87[_0x8f1d('0x48')][_0x8f1d('0x35')]?_0x58fe87[_0x8f1d('0x48')]:_0x2cd5a2[_0x8f1d('0x33')];if(_0x1e9cde['query'][_0x8f1d('0x40')]){_0x58fe87['include']=[{'all':!![]}];}_0x58fe87=_['merge']({},_0x58fe87,_0x1e9cde[_0x8f1d('0x3e')]);return db[_0x8f1d('0x2b')][_0x8f1d('0x49')](_0x58fe87)[_0x8f1d('0x28')](handleEntityNotFound(_0x29a56b,null))['then'](respondWithResult(_0x29a56b,null))[_0x8f1d('0x44')](handleError(_0x29a56b,null));};exports[_0x8f1d('0x4a')]=function(_0x17d3f7,_0x245955){return db[_0x8f1d('0x2b')][_0x8f1d('0x4a')](_0x17d3f7[_0x8f1d('0x4b')],{})[_0x8f1d('0x28')](respondWithResult(_0x245955,0xc9))[_0x8f1d('0x44')](handleError(_0x245955,null));};exports[_0x8f1d('0x26')]=function(_0x53fdf9,_0x1f08e2){if(_0x53fdf9['body']['id']){delete _0x53fdf9[_0x8f1d('0x4b')]['id'];}return db[_0x8f1d('0x2b')][_0x8f1d('0x49')]({'where':{'id':_0x53fdf9[_0x8f1d('0x46')]['id']}})['then'](handleEntityNotFound(_0x1f08e2,null))['then'](saveUpdates(_0x53fdf9['body'],null))[_0x8f1d('0x28')](respondWithResult(_0x1f08e2,null))[_0x8f1d('0x44')](handleError(_0x1f08e2,null));};exports[_0x8f1d('0x27')]=function(_0x17e451,_0x2f0170){return db[_0x8f1d('0x2b')][_0x8f1d('0x49')]({'where':{'id':_0x17e451[_0x8f1d('0x46')]['id']}})['then'](handleEntityNotFound(_0x2f0170,null))[_0x8f1d('0x28')](removeEntity(_0x2f0170,null))['catch'](handleError(_0x2f0170,null));};exports[_0x8f1d('0x4c')]=function(_0x3018b2,_0x5ad738,_0x498f27){return db['VoiceMailMessage'][_0x8f1d('0x49')]({'where':{'id':_0x3018b2['params']['id']},'attributes':['id',_0x8f1d('0x4d'),_0x8f1d('0x4e')]})[_0x8f1d('0x28')](handleEntityNotFound(_0x5ad738,null))[_0x8f1d('0x28')](function(_0x494d7a){if(_0x494d7a){if(!_0x494d7a[_0x8f1d('0x4d')]){throw new db['Sequelize'][(_0x8f1d('0x4f'))]('VoiceMailMessage\x20not\x20found');}var _0x34b5ea={'Content-Type':_0x8f1d('0x50'),'Content-Disposition':'attachment'};if(_0x494d7a[_0x8f1d('0x4e')]){_0x34b5ea[_0x8f1d('0x51')]=_0x8f1d('0x52')+_0x494d7a[_0x8f1d('0x4e')]+_0x8f1d('0x53');}_0x5ad738['set'](_0x34b5ea);return _0x5ad738[_0x8f1d('0x54')](new Buffer(_0x494d7a[_0x8f1d('0x4d')]));}})['catch'](handleError(_0x5ad738,null));}; \ No newline at end of file diff --git a/server/api/voiceMailMessage/voiceMailMessage.model.js b/server/api/voiceMailMessage/voiceMailMessage.model.js index ebd6945..9a36a18 100644 --- a/server/api/voiceMailMessage/voiceMailMessage.model.js +++ b/server/api/voiceMailMessage/voiceMailMessage.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xafd6=['lodash','util','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','./voiceMailMessage.attributes','exports','VoiceMailMessage','voice_voicemail_messages','dir'];(function(_0x272c75,_0x560db7){var _0x63618a=function(_0xebf806){while(--_0xebf806){_0x272c75['push'](_0x272c75['shift']());}};_0x63618a(++_0x560db7);}(_0xafd6,0x1ce));var _0x6afd=function(_0x1aa01c,_0x10d033){_0x1aa01c=_0x1aa01c-0x0;var _0x3ae802=_0xafd6[_0x1aa01c];return _0x3ae802;};'use strict';var _=require(_0x6afd('0x0'));var util=require(_0x6afd('0x1'));var logger=require(_0x6afd('0x2'))('api');var moment=require(_0x6afd('0x3'));var BPromise=require(_0x6afd('0x4'));var rp=require(_0x6afd('0x5'));var fs=require('fs');var path=require(_0x6afd('0x6'));var rimraf=require(_0x6afd('0x7'));var config=require(_0x6afd('0x8'));var attributes=require(_0x6afd('0x9'));module[_0x6afd('0xa')]=function(_0x3d0078,_0x5212f4){return _0x3d0078['define'](_0x6afd('0xb'),attributes,{'tableName':_0x6afd('0xc'),'paranoid':![],'indexes':[{'name':_0x6afd('0xd'),'fields':[_0x6afd('0xd')]}],'timestamps':![]});}; \ No newline at end of file +var _0xeb72=['rimraf','../../config/environment','./voiceMailMessage.attributes','define','VoiceMailMessage','dir','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path'];(function(_0x42d2af,_0x3961b5){var _0x1d6d63=function(_0x10833e){while(--_0x10833e){_0x42d2af['push'](_0x42d2af['shift']());}};_0x1d6d63(++_0x3961b5);}(_0xeb72,0x164));var _0x2eb7=function(_0xb093,_0x5403c4){_0xb093=_0xb093-0x0;var _0x516bac=_0xeb72[_0xb093];return _0x516bac;};'use strict';var _=require(_0x2eb7('0x0'));var util=require(_0x2eb7('0x1'));var logger=require(_0x2eb7('0x2'))(_0x2eb7('0x3'));var moment=require(_0x2eb7('0x4'));var BPromise=require(_0x2eb7('0x5'));var rp=require(_0x2eb7('0x6'));var fs=require('fs');var path=require(_0x2eb7('0x7'));var rimraf=require(_0x2eb7('0x8'));var config=require(_0x2eb7('0x9'));var attributes=require(_0x2eb7('0xa'));module['exports']=function(_0x56354b,_0x497eb8){return _0x56354b[_0x2eb7('0xb')](_0x2eb7('0xc'),attributes,{'tableName':'voice_voicemail_messages','paranoid':![],'indexes':[{'name':_0x2eb7('0xd'),'fields':[_0x2eb7('0xd')]}],'timestamps':![]});}; \ No newline at end of file diff --git a/server/api/voiceMailMessage/voiceMailMessage.rpc.js b/server/api/voiceMailMessage/voiceMailMessage.rpc.js index aa02a0a..d962bb3 100644 --- a/server/api/voiceMailMessage/voiceMailMessage.rpc.js +++ b/server/api/voiceMailMessage/voiceMailMessage.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc634=['lodash','util','moment','bluebird','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','VoiceMailMessage,\x20%s,\x20%s','request\x20sent','debug','VoiceMailMessage,\x20%s,\x20%s,\x20%s','error','code','message','result','catch'];(function(_0x20b890,_0x376c8e){var _0x4f1257=function(_0x31f042){while(--_0x31f042){_0x20b890['push'](_0x20b890['shift']());}};_0x4f1257(++_0x376c8e);}(_0xc634,0xcf));var _0x4c63=function(_0x160393,_0x4e2ea7){_0x160393=_0x160393-0x0;var _0x39865d=_0xc634[_0x160393];return _0x39865d;};'use strict';var _=require(_0x4c63('0x0'));var util=require(_0x4c63('0x1'));var moment=require(_0x4c63('0x2'));var BPromise=require(_0x4c63('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x4c63('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x4c63('0x5'));var logger=require(_0x4c63('0x6'))('rpc');var config=require(_0x4c63('0x7'));var jayson=require(_0x4c63('0x8'));var client=jayson[_0x4c63('0x9')][_0x4c63('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x238be3,_0x2c2984,_0x329acf){return new BPromise(function(_0x2953af,_0x11abc1){return client[_0x4c63('0xb')](_0x238be3,_0x329acf)[_0x4c63('0xc')](function(_0x546ca7){logger[_0x4c63('0xd')](_0x4c63('0xe'),_0x2c2984,_0x4c63('0xf'));logger[_0x4c63('0x10')](_0x4c63('0x11'),_0x2c2984,_0x4c63('0xf'),JSON['stringify'](_0x546ca7));if(_0x546ca7[_0x4c63('0x12')]){if(_0x546ca7[_0x4c63('0x12')][_0x4c63('0x13')]===0x1f4){logger[_0x4c63('0x12')](_0x4c63('0xe'),_0x2c2984,_0x546ca7[_0x4c63('0x12')][_0x4c63('0x14')]);return _0x11abc1(_0x546ca7[_0x4c63('0x12')][_0x4c63('0x14')]);}logger['error'](_0x4c63('0xe'),_0x2c2984,_0x546ca7['error'][_0x4c63('0x14')]);return _0x2953af(_0x546ca7[_0x4c63('0x12')][_0x4c63('0x14')]);}else{logger[_0x4c63('0xd')](_0x4c63('0xe'),_0x2c2984,'request\x20sent');_0x2953af(_0x546ca7[_0x4c63('0x15')][_0x4c63('0x14')]);}})[_0x4c63('0x16')](function(_0xc1bd52){logger[_0x4c63('0x12')](_0x4c63('0xe'),_0x2c2984,_0xc1bd52);_0x11abc1(_0xc1bd52);});});} \ No newline at end of file +var _0xbee1=['request\x20sent','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','http','request','info','VoiceMailMessage,\x20%s,\x20%s'];(function(_0x56a936,_0x457a1b){var _0x5ec02b=function(_0x242e0b){while(--_0x242e0b){_0x56a936['push'](_0x56a936['shift']());}};_0x5ec02b(++_0x457a1b);}(_0xbee1,0xc4));var _0x1bee=function(_0x1933f1,_0x5a5561){_0x1933f1=_0x1933f1-0x0;var _0x4933e7=_0xbee1[_0x1933f1];return _0x4933e7;};'use strict';var _=require(_0x1bee('0x0'));var util=require(_0x1bee('0x1'));var moment=require(_0x1bee('0x2'));var BPromise=require(_0x1bee('0x3'));var rs=require(_0x1bee('0x4'));var fs=require('fs');var Redis=require(_0x1bee('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x1bee('0x6'));var logger=require(_0x1bee('0x7'))(_0x1bee('0x8'));var config=require(_0x1bee('0x9'));var jayson=require('jayson/promise');var client=jayson['client'][_0x1bee('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x220b7c,_0x36b65d,_0x2b21d4){return new BPromise(function(_0x4eb2e2,_0x2c83a4){return client[_0x1bee('0xb')](_0x220b7c,_0x2b21d4)['then'](function(_0x54a0db){logger[_0x1bee('0xc')](_0x1bee('0xd'),_0x36b65d,_0x1bee('0xe'));logger['debug']('VoiceMailMessage,\x20%s,\x20%s,\x20%s',_0x36b65d,_0x1bee('0xe'),JSON[_0x1bee('0xf')](_0x54a0db));if(_0x54a0db['error']){if(_0x54a0db[_0x1bee('0x10')][_0x1bee('0x11')]===0x1f4){logger['error'](_0x1bee('0xd'),_0x36b65d,_0x54a0db['error'][_0x1bee('0x12')]);return _0x2c83a4(_0x54a0db[_0x1bee('0x10')][_0x1bee('0x12')]);}logger[_0x1bee('0x10')](_0x1bee('0xd'),_0x36b65d,_0x54a0db[_0x1bee('0x10')][_0x1bee('0x12')]);return _0x4eb2e2(_0x54a0db[_0x1bee('0x10')][_0x1bee('0x12')]);}else{logger[_0x1bee('0xc')](_0x1bee('0xd'),_0x36b65d,_0x1bee('0xe'));_0x4eb2e2(_0x54a0db[_0x1bee('0x13')][_0x1bee('0x12')]);}})[_0x1bee('0x14')](function(_0x118900){logger['error']('VoiceMailMessage,\x20%s,\x20%s',_0x36b65d,_0x118900);_0x2c83a4(_0x118900);});});} \ No newline at end of file diff --git a/server/api/voiceMusicOnHold/index.js b/server/api/voiceMusicOnHold/index.js index ec5022f..f93e554 100644 --- a/server/api/voiceMusicOnHold/index.js +++ b/server/api/voiceMusicOnHold/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2701=['Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','/:id','isAuthenticated','show','getSounds','post','/:id/sounds','put','update','delete','destroy','/:id/sounds/:id2','removeSound','util','path','connect-timeout','express'];(function(_0x392212,_0xaecbe3){var _0x5ab162=function(_0x16c0c4){while(--_0x16c0c4){_0x392212['push'](_0x392212['shift']());}};_0x5ab162(++_0xaecbe3);}(_0x2701,0xee));var _0x1270=function(_0x49d064,_0x5e6719){_0x49d064=_0x49d064-0x0;var _0x525e30=_0x2701[_0x49d064];return _0x525e30;};'use strict';var multer=require('multer');var util=require(_0x1270('0x0'));var path=require(_0x1270('0x1'));var timeout=require(_0x1270('0x2'));var express=require(_0x1270('0x3'));var router=express[_0x1270('0x4')]();var fs_extra=require(_0x1270('0x5'));var auth=require(_0x1270('0x6'));var interaction=require(_0x1270('0x7'));var config=require(_0x1270('0x8'));var controller=require('./voiceMusicOnHold.controller');router[_0x1270('0x9')]('/',auth['isAuthenticated'](),controller['index']);router[_0x1270('0x9')](_0x1270('0xa'),auth[_0x1270('0xb')](),controller[_0x1270('0xc')]);router[_0x1270('0x9')]('/:id/sounds',auth[_0x1270('0xb')](),controller[_0x1270('0xd')]);router[_0x1270('0xe')]('/',auth[_0x1270('0xb')](),controller['create']);router[_0x1270('0xe')](_0x1270('0xf'),auth[_0x1270('0xb')](),controller['addSound']);router[_0x1270('0x10')](_0x1270('0xa'),auth['isAuthenticated'](),controller[_0x1270('0x11')]);router[_0x1270('0x12')](_0x1270('0xa'),auth[_0x1270('0xb')](),controller[_0x1270('0x13')]);router[_0x1270('0x12')](_0x1270('0x14'),auth['isAuthenticated'](),controller[_0x1270('0x15')]);module['exports']=router; \ No newline at end of file +var _0xbf9b=['/:id/sounds/:id2','removeSound','exports','multer','util','path','express','fs-extra','../../components/auth/service','../../components/interaction/service','./voiceMusicOnHold.controller','get','isAuthenticated','index','/:id','show','/:id/sounds','create','post','addSound','put','update','destroy','delete'];(function(_0x501510,_0x61caa9){var _0x1e6ee5=function(_0x32845b){while(--_0x32845b){_0x501510['push'](_0x501510['shift']());}};_0x1e6ee5(++_0x61caa9);}(_0xbf9b,0x1cb));var _0xbbf9=function(_0x2b7764,_0x2606f1){_0x2b7764=_0x2b7764-0x0;var _0x848dcb=_0xbf9b[_0x2b7764];return _0x848dcb;};'use strict';var multer=require(_0xbbf9('0x0'));var util=require(_0xbbf9('0x1'));var path=require(_0xbbf9('0x2'));var timeout=require('connect-timeout');var express=require(_0xbbf9('0x3'));var router=express['Router']();var fs_extra=require(_0xbbf9('0x4'));var auth=require(_0xbbf9('0x5'));var interaction=require(_0xbbf9('0x6'));var config=require('../../config/environment');var controller=require(_0xbbf9('0x7'));router[_0xbbf9('0x8')]('/',auth[_0xbbf9('0x9')](),controller[_0xbbf9('0xa')]);router[_0xbbf9('0x8')](_0xbbf9('0xb'),auth[_0xbbf9('0x9')](),controller[_0xbbf9('0xc')]);router[_0xbbf9('0x8')](_0xbbf9('0xd'),auth['isAuthenticated'](),controller['getSounds']);router['post']('/',auth[_0xbbf9('0x9')](),controller[_0xbbf9('0xe')]);router[_0xbbf9('0xf')](_0xbbf9('0xd'),auth[_0xbbf9('0x9')](),controller[_0xbbf9('0x10')]);router[_0xbbf9('0x11')](_0xbbf9('0xb'),auth[_0xbbf9('0x9')](),controller[_0xbbf9('0x12')]);router['delete']('/:id',auth[_0xbbf9('0x9')](),controller[_0xbbf9('0x13')]);router[_0xbbf9('0x14')](_0xbbf9('0x15'),auth[_0xbbf9('0x9')](),controller[_0xbbf9('0x16')]);module[_0xbbf9('0x17')]=router; \ No newline at end of file diff --git a/server/api/voiceMusicOnHold/voiceMusicOnHold.attributes.js b/server/api/voiceMusicOnHold/voiceMusicOnHold.attributes.js index 3354a31..f99fae5 100644 --- a/server/api/voiceMusicOnHold/voiceMusicOnHold.attributes.js +++ b/server/api/voiceMusicOnHold/voiceMusicOnHold.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6f77=['custom','files','mp3nb','quietmp3nb','quietmp3','TIMESTAMP','BOOLEAN','exports','STRING','name','ENUM'];(function(_0x186d56,_0x193137){var _0x15dc84=function(_0x3e0f78){while(--_0x3e0f78){_0x186d56['push'](_0x186d56['shift']());}};_0x15dc84(++_0x193137);}(_0x6f77,0x172));var _0x76f7=function(_0x1254a5,_0x2ba0be){_0x1254a5=_0x1254a5-0x0;var _0x2fbf81=_0x6f77[_0x1254a5];return _0x2fbf81;};'use strict';var Sequelize=require('sequelize');module[_0x76f7('0x0')]={'name':{'type':Sequelize[_0x76f7('0x1')],'allowNull':![],'unique':_0x76f7('0x2')},'mode':{'type':Sequelize[_0x76f7('0x3')](_0x76f7('0x4'),_0x76f7('0x5'),_0x76f7('0x6'),_0x76f7('0x7'),_0x76f7('0x8'),'mp3'),'allowNull':!![],'defaultValue':_0x76f7('0x5')},'directory':{'type':Sequelize['STRING'],'allowNull':!![]},'application':{'type':Sequelize[_0x76f7('0x1')],'allowNull':!![]},'digit':{'type':Sequelize[_0x76f7('0x1')],'allowNull':!![]},'sort':{'type':Sequelize['STRING'],'allowNull':!![],'defaultValue':'alpha'},'format':{'type':Sequelize[_0x76f7('0x1')],'allowNull':!![]},'stamp':{'type':_0x76f7('0x9')},'defaultEntry':{'type':Sequelize[_0x76f7('0xa')],'defaultValue':0x0}}; \ No newline at end of file +var _0x1dd5=['sequelize','exports','ENUM','files','mp3nb','quietmp3nb','quietmp3','mp3','STRING','alpha','TIMESTAMP','BOOLEAN'];(function(_0x452791,_0x1c20df){var _0x459acf=function(_0x42a14b){while(--_0x42a14b){_0x452791['push'](_0x452791['shift']());}};_0x459acf(++_0x1c20df);}(_0x1dd5,0x1ec));var _0x51dd=function(_0x4d6571,_0x9b8870){_0x4d6571=_0x4d6571-0x0;var _0x848560=_0x1dd5[_0x4d6571];return _0x848560;};'use strict';var Sequelize=require(_0x51dd('0x0'));module[_0x51dd('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![],'unique':'name'},'mode':{'type':Sequelize[_0x51dd('0x2')]('custom',_0x51dd('0x3'),_0x51dd('0x4'),_0x51dd('0x5'),_0x51dd('0x6'),_0x51dd('0x7')),'allowNull':!![],'defaultValue':_0x51dd('0x3')},'directory':{'type':Sequelize[_0x51dd('0x8')],'allowNull':!![]},'application':{'type':Sequelize[_0x51dd('0x8')],'allowNull':!![]},'digit':{'type':Sequelize['STRING'],'allowNull':!![]},'sort':{'type':Sequelize[_0x51dd('0x8')],'allowNull':!![],'defaultValue':_0x51dd('0x9')},'format':{'type':Sequelize[_0x51dd('0x8')],'allowNull':!![]},'stamp':{'type':_0x51dd('0xa')},'defaultEntry':{'type':Sequelize[_0x51dd('0xb')],'defaultValue':0x0}}; \ No newline at end of file diff --git a/server/api/voiceMusicOnHold/voiceMusicOnHold.controller.js b/server/api/voiceMusicOnHold/voiceMusicOnHold.controller.js index 6c51c97..ae6df66 100644 --- a/server/api/voiceMusicOnHold/voiceMusicOnHold.controller.js +++ b/server/api/voiceMusicOnHold/voiceMusicOnHold.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1648=['pick','filter','merge','includeAll','include','findAll','rows','catch','show','params','find','body','create','sequelize','transaction','mode','files','join','root','mkdirSync','0777','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','UserProfileResource','readdirSync','directory','unlinkSync','rmdirSync','Sequelize','ValidationError','message','addSound','Sound','findOne','save_name','converted_format','createdAt','server/files/sounds/converted','format','%s.%s','extname','symlinkSync','removeSound','id2','rawAttributes','options','getSounds','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','limit','undefined','count','set','Content-Range','reject','save','update','then','destroy','get','MusicOnHolds','error','stack','name','send','index','map','VoiceMusicOnHold','fieldName','type','key','model','keys','query','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','where'];(function(_0xeee7bb,_0x1fc1e2){var _0x3607ec=function(_0x18bee3){while(--_0x18bee3){_0xeee7bb['push'](_0xeee7bb['shift']());}};_0x3607ec(++_0x1fc1e2);}(_0x1648,0x192));var _0x8164=function(_0x5c3144,_0x49b181){_0x5c3144=_0x5c3144-0x0;var _0x36651c=_0x1648[_0x5c3144];return _0x36651c;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x8164('0x0'));var jsonpatch=require('fast-json-patch');var rp=require(_0x8164('0x1'));var moment=require(_0x8164('0x2'));var BPromise=require(_0x8164('0x3'));var Mustache=require(_0x8164('0x4'));var util=require(_0x8164('0x5'));var path=require(_0x8164('0x6'));var sox=require(_0x8164('0x7'));var csv=require(_0x8164('0x8'));var ejs=require(_0x8164('0x9'));var fs=require('fs');var fs_extra=require(_0x8164('0xa'));var _=require(_0x8164('0xb'));var squel=require('squel');var crypto=require(_0x8164('0xc'));var jsforce=require(_0x8164('0xd'));var deskjs=require(_0x8164('0xe'));var toCsv=require(_0x8164('0x8'));var querystring=require(_0x8164('0xf'));var Papa=require(_0x8164('0x10'));var Redis=require(_0x8164('0x11'));var authService=require('../../components/auth/service');var qs=require(_0x8164('0x12'));var as=require(_0x8164('0x13'));var hardwareService=require(_0x8164('0x14'));var logger=require(_0x8164('0x15'))(_0x8164('0x16'));var utils=require(_0x8164('0x17'));var config=require(_0x8164('0x18'));var licenseUtil=require(_0x8164('0x19'));var db=require(_0x8164('0x1a'))['db'];function respondWithStatusCode(_0x525eb8,_0x5a6417){_0x5a6417=_0x5a6417||0xcc;return function(_0x1d37c4){if(_0x1d37c4){return _0x525eb8[_0x8164('0x1b')](_0x5a6417);}return _0x525eb8[_0x8164('0x1c')](_0x5a6417)['end']();};}function respondWithResult(_0x63dc7b,_0xfadd6c){_0xfadd6c=_0xfadd6c||0xc8;return function(_0x454d86){if(_0x454d86){return _0x63dc7b['status'](_0xfadd6c)[_0x8164('0x1d')](_0x454d86);}};}function respondWithFilteredResult(_0x188aaa,_0x441ffd){return function(_0x304ec8){if(_0x304ec8){var _0xfd2f55=typeof _0x441ffd[_0x8164('0x1e')]==='undefined'&&typeof _0x441ffd[_0x8164('0x1f')]===_0x8164('0x20');var _0x62f716=_0x304ec8[_0x8164('0x21')];var _0x324f8e=_0xfd2f55?0x0:_0x441ffd[_0x8164('0x1e')];var _0x58034c=_0xfd2f55?_0x304ec8[_0x8164('0x21')]:_0x441ffd['offset']+_0x441ffd[_0x8164('0x1f')];var _0x251d11;if(_0x58034c>=_0x62f716){_0x58034c=_0x62f716;_0x251d11=0xc8;}else{_0x251d11=0xce;}_0x188aaa[_0x8164('0x1c')](_0x251d11);return _0x188aaa[_0x8164('0x22')](_0x8164('0x23'),_0x324f8e+'-'+_0x58034c+'/'+_0x62f716)[_0x8164('0x1d')](_0x304ec8);}return null;};}function patchUpdates(_0x2e4312){return function(_0x3a3647){try{jsonpatch['apply'](_0x3a3647,_0x2e4312,!![]);}catch(_0x3ade13){return BPromise[_0x8164('0x24')](_0x3ade13);}return _0x3a3647[_0x8164('0x25')]();};}function saveUpdates(_0x3a8d0c,_0x2b4374){return function(_0x393429){if(_0x393429){return _0x393429[_0x8164('0x26')](_0x3a8d0c)[_0x8164('0x27')](function(_0x12e493){return _0x12e493;});}return null;};}function removeEntity(_0x766cc1,_0xe6fcd9){return function(_0x508031){if(_0x508031){return _0x508031[_0x8164('0x28')]()[_0x8164('0x27')](function(){var _0x345dbe=_0x508031[_0x8164('0x29')]({'plain':!![]});var _0x176902=_0x8164('0x2a');return db['UserProfileResource'][_0x8164('0x28')]({'where':{'type':_0x176902,'resourceId':_0x345dbe['id']}})[_0x8164('0x27')](function(){return _0x508031;});})['then'](function(){_0x766cc1[_0x8164('0x1c')](0xcc)['end']();});}};}function handleEntityNotFound(_0xdc1571,_0x18b7e0){return function(_0x219282){if(!_0x219282){_0xdc1571[_0x8164('0x1b')](0x194);}return _0x219282;};}function handleError(_0x5aaa41,_0x2135fd){_0x2135fd=_0x2135fd||0x1f4;return function(_0x50edd9){logger[_0x8164('0x2b')](_0x50edd9[_0x8164('0x2c')]);if(_0x50edd9['name']){delete _0x50edd9[_0x8164('0x2d')];}_0x5aaa41[_0x8164('0x1c')](_0x2135fd)[_0x8164('0x2e')](_0x50edd9);};}exports[_0x8164('0x2f')]=function(_0x391595,_0x34645b){var _0x188e49={},_0x2ae899={},_0x5be9f1={'count':0x0,'rows':[]};var _0x5d61ba=_[_0x8164('0x30')](db[_0x8164('0x31')]['rawAttributes'],function(_0x1383ca){return{'name':_0x1383ca[_0x8164('0x32')],'type':_0x1383ca[_0x8164('0x33')][_0x8164('0x34')]};});_0x2ae899[_0x8164('0x35')]=_[_0x8164('0x30')](_0x5d61ba,_0x8164('0x2d'));_0x2ae899['query']=_[_0x8164('0x36')](_0x391595[_0x8164('0x37')]);_0x2ae899[_0x8164('0x38')]=_['intersection'](_0x2ae899[_0x8164('0x35')],_0x2ae899[_0x8164('0x37')]);_0x188e49[_0x8164('0x39')]=_[_0x8164('0x3a')](_0x2ae899[_0x8164('0x35')],qs[_0x8164('0x3b')](_0x391595['query']['fields']));_0x188e49['attributes']=_0x188e49['attributes'][_0x8164('0x3c')]?_0x188e49['attributes']:_0x2ae899['model'];if(!_0x391595[_0x8164('0x37')][_0x8164('0x3d')](_0x8164('0x3e'))){_0x188e49[_0x8164('0x1f')]=qs[_0x8164('0x1f')](_0x391595[_0x8164('0x37')][_0x8164('0x1f')]);_0x188e49['offset']=qs[_0x8164('0x1e')](_0x391595['query'][_0x8164('0x1e')]);}_0x188e49[_0x8164('0x3f')]=qs[_0x8164('0x40')](_0x391595['query']['sort']);delete _0x391595['query'][_0x8164('0x40')];_0x188e49[_0x8164('0x41')]=qs[_0x8164('0x38')](_[_0x8164('0x42')](_0x391595[_0x8164('0x37')],_0x2ae899['filters']),_0x5d61ba);if(_0x391595[_0x8164('0x37')][_0x8164('0x43')]){_0x188e49[_0x8164('0x41')]=_['merge'](_0x188e49[_0x8164('0x41')],{'$or':_[_0x8164('0x30')](_0x5d61ba,function(_0x6d2a4b){if(_0x6d2a4b['type']!=='VIRTUAL'){var _0x3370b0={};_0x3370b0[_0x6d2a4b[_0x8164('0x2d')]]={'$like':'%'+_0x391595[_0x8164('0x37')]['filter']+'%'};return _0x3370b0;}})});}_0x188e49=_[_0x8164('0x44')]({},_0x188e49,_0x391595['options']);var _0xd5c151={'where':_0x188e49['where']};return db['VoiceMusicOnHold']['count'](_0xd5c151)['then'](function(_0x2b3553){_0x5be9f1[_0x8164('0x21')]=_0x2b3553;if(_0x391595['query'][_0x8164('0x45')]){_0x188e49[_0x8164('0x46')]=[{'all':!![]}];}return db[_0x8164('0x31')][_0x8164('0x47')](_0x188e49);})[_0x8164('0x27')](function(_0x54a9bf){_0x5be9f1[_0x8164('0x48')]=_0x54a9bf;return _0x5be9f1;})[_0x8164('0x27')](respondWithFilteredResult(_0x34645b,_0x188e49))[_0x8164('0x49')](handleError(_0x34645b,null));};exports[_0x8164('0x4a')]=function(_0x30e480,_0x2f4b77){var _0x42a717={'raw':![],'where':{'id':_0x30e480[_0x8164('0x4b')]['id']}},_0x4606bd={};_0x4606bd['model']=_['keys'](db[_0x8164('0x31')]['rawAttributes']);_0x4606bd[_0x8164('0x37')]=_[_0x8164('0x36')](_0x30e480['query']);_0x4606bd[_0x8164('0x38')]=_[_0x8164('0x3a')](_0x4606bd[_0x8164('0x35')],_0x4606bd[_0x8164('0x37')]);_0x42a717['attributes']=_[_0x8164('0x3a')](_0x4606bd[_0x8164('0x35')],qs['fields'](_0x30e480[_0x8164('0x37')][_0x8164('0x3b')]));_0x42a717[_0x8164('0x39')]=_0x42a717[_0x8164('0x39')]['length']?_0x42a717[_0x8164('0x39')]:_0x4606bd[_0x8164('0x35')];if(_0x30e480['query'][_0x8164('0x45')]){_0x42a717[_0x8164('0x46')]=[{'all':!![]}];}_0x42a717=_[_0x8164('0x44')]({},_0x42a717,_0x30e480['options']);return db[_0x8164('0x31')][_0x8164('0x4c')](_0x42a717)[_0x8164('0x27')](handleEntityNotFound(_0x2f4b77,null))[_0x8164('0x27')](respondWithResult(_0x2f4b77,null))[_0x8164('0x49')](handleError(_0x2f4b77,null));};exports['update']=function(_0xae2555,_0x140eef){if(_0xae2555[_0x8164('0x4d')]['id']){delete _0xae2555['body']['id'];}return db[_0x8164('0x31')]['find']({'where':{'id':_0xae2555['params']['id']}})[_0x8164('0x27')](handleEntityNotFound(_0x140eef,null))[_0x8164('0x27')](saveUpdates(_0xae2555[_0x8164('0x4d')],null))[_0x8164('0x27')](respondWithResult(_0x140eef,null))[_0x8164('0x49')](handleError(_0x140eef,null));};exports[_0x8164('0x4e')]=function(_0x5771e5,_0x22895a,_0x9b83ef){return db[_0x8164('0x4f')][_0x8164('0x50')](function(_0xb8cea3){if(_0x5771e5[_0x8164('0x4d')][_0x8164('0x51')]===_0x8164('0x52')){_0x5771e5[_0x8164('0x4d')]['directory']=path[_0x8164('0x53')](config[_0x8164('0x54')],'server/files/moh',_0x5771e5['body']['name']);}return db['VoiceMusicOnHold']['create'](_0x5771e5[_0x8164('0x4d')],{'transaction':_0xb8cea3})[_0x8164('0x27')](function(_0x3f02e7){if(_0x5771e5[_0x8164('0x4d')][_0x8164('0x51')]===_0x8164('0x52')){fs[_0x8164('0x55')](_0x3f02e7['directory'],parseInt(_0x8164('0x56'),0x8));}var _0x5a2428=_0x5771e5[_0x8164('0x57')][_0x8164('0x29')]({'plain':!![]});if(!_0x5a2428)throw new Error(_0x8164('0x58'));if(_0x5a2428[_0x8164('0x59')]==='user'){var _0x1bd1bd=_0x3f02e7[_0x8164('0x29')]({'plain':!![]});return db[_0x8164('0x5a')][_0x8164('0x4c')]({'where':{'name':_0x8164('0x2a'),'userProfileId':_0x5a2428[_0x8164('0x5b')]},'raw':!![]})[_0x8164('0x27')](function(_0x54b96b){if(_0x54b96b&&_0x54b96b[_0x8164('0x5c')]===0x0){return db[_0x8164('0x5d')][_0x8164('0x4e')]({'name':_0x1bd1bd[_0x8164('0x2d')],'resourceId':_0x1bd1bd['id'],'type':_0x54b96b['name'],'sectionId':_0x54b96b['id']},{})[_0x8164('0x27')](function(){return _0x3f02e7;});}else{return _0x3f02e7;}})[_0x8164('0x49')](function(_0x32965a){logger[_0x8164('0x2b')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x32965a);});}return _0x3f02e7;});})[_0x8164('0x27')](respondWithResult(_0x22895a,0xc9))[_0x8164('0x49')](handleError(_0x22895a,null));};exports['destroy']=function(_0x27cfb2,_0x1583cd,_0x400798){var _0x2c0654;return db[_0x8164('0x31')]['find']({'where':{'id':_0x27cfb2[_0x8164('0x4b')]['id']}})['then'](function(_0x433add){if(_0x433add){return db[_0x8164('0x4f')][_0x8164('0x50')](function(_0x21974a){return _0x433add[_0x8164('0x28')]({'transaction':_0x21974a,'raw':!![]})[_0x8164('0x27')](function(_0x182b99){if(_0x182b99['directory']){fs[_0x8164('0x5e')](_0x182b99[_0x8164('0x5f')])['forEach'](function(_0x3c533b){fs[_0x8164('0x60')](path[_0x8164('0x53')](_0x182b99[_0x8164('0x5f')],_0x3c533b));});fs[_0x8164('0x61')](_0x182b99['directory']);}return _0x182b99;});})[_0x8164('0x49')](function(_0x1656fd){throw new db[(_0x8164('0x62'))][(_0x8164('0x63'))](_0x1656fd[_0x8164('0x64')]);});}})[_0x8164('0x27')](handleEntityNotFound(_0x1583cd,null))[_0x8164('0x27')](removeEntity(_0x1583cd,null))['catch'](handleError(_0x1583cd,null));};exports[_0x8164('0x65')]=function(_0x4c6009,_0x4998c3,_0x52749d){return db[_0x8164('0x4f')]['transaction'](function(_0x37e5f0){var _0x5f4b38;return db[_0x8164('0x31')]['find']({'where':{'id':_0x4c6009[_0x8164('0x4b')]['id']}})[_0x8164('0x27')](function(_0x49c332){if(_0x49c332){_0x5f4b38=_0x49c332;return _0x49c332[_0x8164('0x65')](_0x4c6009[_0x8164('0x4d')]['id'],{'transaction':_0x37e5f0});}})[_0x8164('0x27')](function(_0x4edc04){if(_0x4edc04){return db[_0x8164('0x66')][_0x8164('0x67')]({'where':{'id':_0x4c6009[_0x8164('0x4d')]['id']},'attributes':['id',_0x8164('0x2d'),_0x8164('0x68'),_0x8164('0x69'),_0x8164('0x6a')],'raw':!![]});}})[_0x8164('0x27')](function(_0x29f38b){if(_0x29f38b){var _0x12e030=path[_0x8164('0x53')](config[_0x8164('0x54')],_0x8164('0x6b'),util[_0x8164('0x6c')](_0x8164('0x6d'),path['basename'](_0x29f38b[_0x8164('0x68')],path[_0x8164('0x6e')](_0x29f38b['save_name'])),_0x29f38b[_0x8164('0x69')]));var _0x42642c=path['join'](config[_0x8164('0x54')],'server/files/moh',_0x5f4b38[_0x8164('0x2d')],util[_0x8164('0x6c')](_0x8164('0x6d'),_0x29f38b[_0x8164('0x2d')],_0x29f38b[_0x8164('0x69')]));fs[_0x8164('0x6f')](_0x12e030,_0x42642c);return _0x29f38b;}})[_0x8164('0x49')](function(_0x54060b){throw new db['Sequelize'][(_0x8164('0x63'))](_0x54060b[_0x8164('0x64')]);});})['then'](handleEntityNotFound(_0x4998c3,null))[_0x8164('0x27')](respondWithResult(_0x4998c3,0xc9))['catch'](handleError(_0x4998c3,null));};exports[_0x8164('0x70')]=function(_0x2c0ce2,_0x459436,_0x45eb76){return db['sequelize'][_0x8164('0x50')](function(_0x2beaa2){var _0x5facfc;return db[_0x8164('0x31')]['findOne']({'where':{'id':_0x2c0ce2[_0x8164('0x4b')]['id']}})[_0x8164('0x27')](handleEntityNotFound(_0x459436,null))[_0x8164('0x27')](function(_0x141272){if(_0x141272){_0x5facfc=_0x141272;return _0x141272[_0x8164('0x70')](_0x2c0ce2[_0x8164('0x4b')][_0x8164('0x71')]);}})[_0x8164('0x27')](function(_0x4ea7a4){if(_0x4ea7a4){return db[_0x8164('0x66')][_0x8164('0x67')]({'where':{'id':_0x2c0ce2[_0x8164('0x4b')][_0x8164('0x71')]},'attributes':['id',_0x8164('0x2d'),'save_name',_0x8164('0x69'),_0x8164('0x6a')],'raw':!![]});}})[_0x8164('0x27')](function(_0x520d48){if(_0x520d48){fs[_0x8164('0x60')](path[_0x8164('0x53')](_0x5facfc['directory'],util[_0x8164('0x6c')]('%s.%s',_0x520d48['name'],_0x520d48[_0x8164('0x69')])));return _0x520d48;}})[_0x8164('0x49')](function(_0x419026){throw new db[(_0x8164('0x62'))][(_0x8164('0x63'))](_0x419026[_0x8164('0x64')]);});})['then'](handleEntityNotFound(_0x459436,null))['then'](respondWithStatusCode(_0x459436,0xcc))['catch'](handleError(_0x459436,null));};exports['getSounds']=function(_0x5e8b9c,_0x4150a4,_0x1c6fc0){var _0x98c3f7={};var _0x36f4b9={};var _0x2c0b12;var _0x56d458;return db[_0x8164('0x31')][_0x8164('0x67')]({'where':{'id':_0x5e8b9c[_0x8164('0x4b')]['id']}})[_0x8164('0x27')](handleEntityNotFound(_0x4150a4,null))['then'](function(_0x14d45e){if(_0x14d45e){_0x2c0b12=_0x14d45e;_0x36f4b9[_0x8164('0x35')]=_[_0x8164('0x36')](db[_0x8164('0x66')][_0x8164('0x72')]);_0x36f4b9[_0x8164('0x37')]=_[_0x8164('0x36')](_0x5e8b9c[_0x8164('0x37')]);_0x36f4b9[_0x8164('0x38')]=_[_0x8164('0x3a')](_0x36f4b9['model'],_0x36f4b9['query']);_0x98c3f7[_0x8164('0x39')]=_[_0x8164('0x3a')](_0x36f4b9[_0x8164('0x35')],qs[_0x8164('0x3b')](_0x5e8b9c[_0x8164('0x37')][_0x8164('0x3b')]));_0x98c3f7['attributes']=_0x98c3f7['attributes']['length']?_0x98c3f7['attributes']:_0x36f4b9['model'];_0x98c3f7[_0x8164('0x3f')]=qs[_0x8164('0x40')](_0x5e8b9c['query'][_0x8164('0x40')]);_0x98c3f7[_0x8164('0x41')]=qs[_0x8164('0x38')](_['pick'](_0x5e8b9c['query'],_0x36f4b9[_0x8164('0x38')]));if(_0x5e8b9c['query'][_0x8164('0x43')]){_0x98c3f7[_0x8164('0x41')]=_[_0x8164('0x44')](_0x98c3f7[_0x8164('0x41')],{'$or':_[_0x8164('0x30')](_0x98c3f7[_0x8164('0x39')],function(_0xe80bd0){var _0x598f44={};_0x598f44[_0xe80bd0]={'$like':'%'+_0x5e8b9c[_0x8164('0x37')]['filter']+'%'};return _0x598f44;})});}_0x98c3f7=_[_0x8164('0x44')]({},_0x98c3f7,_0x5e8b9c[_0x8164('0x73')]);return _0x2c0b12[_0x8164('0x74')](_0x98c3f7);}})[_0x8164('0x27')](function(_0x4edfa6){if(_0x4edfa6){_0x56d458=_0x4edfa6['length'];if(!_0x5e8b9c[_0x8164('0x37')][_0x8164('0x3d')](_0x8164('0x3e'))){_0x98c3f7[_0x8164('0x1f')]=qs[_0x8164('0x1f')](_0x5e8b9c[_0x8164('0x37')][_0x8164('0x1f')]);_0x98c3f7['offset']=qs[_0x8164('0x1e')](_0x5e8b9c['query'][_0x8164('0x1e')]);}return _0x2c0b12[_0x8164('0x74')](_0x98c3f7);}})[_0x8164('0x27')](function(_0x747d7f){if(_0x747d7f){return _0x747d7f?{'count':_0x56d458,'rows':_0x747d7f}:null;}})[_0x8164('0x27')](respondWithResult(_0x4150a4,null))[_0x8164('0x49')](handleError(_0x4150a4,null));}; \ No newline at end of file +var _0xf236=['sequelize','transaction','mode','files','directory','server/files/moh','mkdirSync','0777','user','role','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','destroy','readdirSync','forEach','unlinkSync','join','Sequelize','message','addSound','save_name','converted_format','createdAt','root','server/files/sounds/converted','format','%s.%s','basename','extname','symlinkSync','removeSound','findOne','id2','Sound','getSounds','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','end','json','offset','undefined','count','limit','set','Content-Range','apply','reject','save','update','then','get','MusicOnHolds','UserProfileResource','error','stack','name','send','index','VoiceMusicOnHold','rawAttributes','fieldName','type','key','model','map','query','keys','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filters','pick','merge','VIRTUAL','filter','include','findAll','rows','catch','params','includeAll','options','find','body','create'];(function(_0x1a52ac,_0x1ebd0d){var _0x3a28fd=function(_0x144604){while(--_0x144604){_0x1a52ac['push'](_0x1a52ac['shift']());}};_0x3a28fd(++_0x1ebd0d);}(_0xf236,0x10c));var _0x6f23=function(_0x2a7b8e,_0x50ffce){_0x2a7b8e=_0x2a7b8e-0x0;var _0x29b5c8=_0xf236[_0x2a7b8e];return _0x29b5c8;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x6f23('0x0'));var zipdir=require(_0x6f23('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x6f23('0x2'));var moment=require(_0x6f23('0x3'));var BPromise=require(_0x6f23('0x4'));var Mustache=require(_0x6f23('0x5'));var util=require(_0x6f23('0x6'));var path=require(_0x6f23('0x7'));var sox=require(_0x6f23('0x8'));var csv=require(_0x6f23('0x9'));var ejs=require(_0x6f23('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x6f23('0xb'));var squel=require(_0x6f23('0xc'));var crypto=require(_0x6f23('0xd'));var jsforce=require(_0x6f23('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x6f23('0x9'));var querystring=require(_0x6f23('0xf'));var Papa=require('papaparse');var Redis=require(_0x6f23('0x10'));var authService=require(_0x6f23('0x11'));var qs=require(_0x6f23('0x12'));var as=require(_0x6f23('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x6f23('0x14'));var utils=require(_0x6f23('0x15'));var config=require(_0x6f23('0x16'));var licenseUtil=require(_0x6f23('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x1260cd,_0x2d451c){_0x2d451c=_0x2d451c||0xcc;return function(_0x1d65e8){if(_0x1d65e8){return _0x1260cd[_0x6f23('0x18')](_0x2d451c);}return _0x1260cd[_0x6f23('0x19')](_0x2d451c)[_0x6f23('0x1a')]();};}function respondWithResult(_0x5c670e,_0x4dbb84){_0x4dbb84=_0x4dbb84||0xc8;return function(_0x4157f7){if(_0x4157f7){return _0x5c670e[_0x6f23('0x19')](_0x4dbb84)[_0x6f23('0x1b')](_0x4157f7);}};}function respondWithFilteredResult(_0x435aee,_0x391ce9){return function(_0x1ffcc0){if(_0x1ffcc0){var _0x38c944=typeof _0x391ce9[_0x6f23('0x1c')]===_0x6f23('0x1d')&&typeof _0x391ce9['limit']===_0x6f23('0x1d');var _0x86fbd6=_0x1ffcc0[_0x6f23('0x1e')];var _0x1cb28a=_0x38c944?0x0:_0x391ce9[_0x6f23('0x1c')];var _0x2cac93=_0x38c944?_0x1ffcc0[_0x6f23('0x1e')]:_0x391ce9[_0x6f23('0x1c')]+_0x391ce9[_0x6f23('0x1f')];var _0x57ff05;if(_0x2cac93>=_0x86fbd6){_0x2cac93=_0x86fbd6;_0x57ff05=0xc8;}else{_0x57ff05=0xce;}_0x435aee[_0x6f23('0x19')](_0x57ff05);return _0x435aee[_0x6f23('0x20')](_0x6f23('0x21'),_0x1cb28a+'-'+_0x2cac93+'/'+_0x86fbd6)[_0x6f23('0x1b')](_0x1ffcc0);}return null;};}function patchUpdates(_0x31a146){return function(_0x214ae2){try{jsonpatch[_0x6f23('0x22')](_0x214ae2,_0x31a146,!![]);}catch(_0x381b5a){return BPromise[_0x6f23('0x23')](_0x381b5a);}return _0x214ae2[_0x6f23('0x24')]();};}function saveUpdates(_0x35d3dc,_0x2be976){return function(_0x4a719c){if(_0x4a719c){return _0x4a719c[_0x6f23('0x25')](_0x35d3dc)[_0x6f23('0x26')](function(_0x28f8d9){return _0x28f8d9;});}return null;};}function removeEntity(_0x309f08,_0x5aed06){return function(_0x72c572){if(_0x72c572){return _0x72c572['destroy']()['then'](function(){var _0x59af43=_0x72c572[_0x6f23('0x27')]({'plain':!![]});var _0x3e9056=_0x6f23('0x28');return db[_0x6f23('0x29')]['destroy']({'where':{'type':_0x3e9056,'resourceId':_0x59af43['id']}})['then'](function(){return _0x72c572;});})[_0x6f23('0x26')](function(){_0x309f08[_0x6f23('0x19')](0xcc)[_0x6f23('0x1a')]();});}};}function handleEntityNotFound(_0x5afb64,_0xbc4596){return function(_0xc0d264){if(!_0xc0d264){_0x5afb64[_0x6f23('0x18')](0x194);}return _0xc0d264;};}function handleError(_0x55d6e1,_0x3a87b1){_0x3a87b1=_0x3a87b1||0x1f4;return function(_0x31b795){logger[_0x6f23('0x2a')](_0x31b795[_0x6f23('0x2b')]);if(_0x31b795[_0x6f23('0x2c')]){delete _0x31b795[_0x6f23('0x2c')];}_0x55d6e1['status'](_0x3a87b1)[_0x6f23('0x2d')](_0x31b795);};}exports[_0x6f23('0x2e')]=function(_0x5ebb83,_0x42b69c){var _0x330838={},_0x33c800={},_0x4fbeb1={'count':0x0,'rows':[]};var _0x55f31a=_['map'](db[_0x6f23('0x2f')][_0x6f23('0x30')],function(_0x178618){return{'name':_0x178618[_0x6f23('0x31')],'type':_0x178618[_0x6f23('0x32')][_0x6f23('0x33')]};});_0x33c800[_0x6f23('0x34')]=_[_0x6f23('0x35')](_0x55f31a,_0x6f23('0x2c'));_0x33c800[_0x6f23('0x36')]=_[_0x6f23('0x37')](_0x5ebb83[_0x6f23('0x36')]);_0x33c800['filters']=_[_0x6f23('0x38')](_0x33c800['model'],_0x33c800[_0x6f23('0x36')]);_0x330838[_0x6f23('0x39')]=_[_0x6f23('0x38')](_0x33c800[_0x6f23('0x34')],qs[_0x6f23('0x3a')](_0x5ebb83[_0x6f23('0x36')][_0x6f23('0x3a')]));_0x330838[_0x6f23('0x39')]=_0x330838[_0x6f23('0x39')][_0x6f23('0x3b')]?_0x330838[_0x6f23('0x39')]:_0x33c800[_0x6f23('0x34')];if(!_0x5ebb83['query'][_0x6f23('0x3c')](_0x6f23('0x3d'))){_0x330838[_0x6f23('0x1f')]=qs[_0x6f23('0x1f')](_0x5ebb83[_0x6f23('0x36')][_0x6f23('0x1f')]);_0x330838['offset']=qs[_0x6f23('0x1c')](_0x5ebb83['query']['offset']);}_0x330838[_0x6f23('0x3e')]=qs['sort'](_0x5ebb83[_0x6f23('0x36')]['sort']);delete _0x5ebb83['query'][_0x6f23('0x3f')];_0x330838[_0x6f23('0x40')]=qs[_0x6f23('0x41')](_[_0x6f23('0x42')](_0x5ebb83[_0x6f23('0x36')],_0x33c800[_0x6f23('0x41')]),_0x55f31a);if(_0x5ebb83[_0x6f23('0x36')]['filter']){_0x330838[_0x6f23('0x40')]=_[_0x6f23('0x43')](_0x330838[_0x6f23('0x40')],{'$or':_['map'](_0x55f31a,function(_0x15a8b9){if(_0x15a8b9['type']!==_0x6f23('0x44')){var _0x58c93b={};_0x58c93b[_0x15a8b9[_0x6f23('0x2c')]]={'$like':'%'+_0x5ebb83[_0x6f23('0x36')][_0x6f23('0x45')]+'%'};return _0x58c93b;}})});}_0x330838=_[_0x6f23('0x43')]({},_0x330838,_0x5ebb83['options']);var _0x1d8c3a={'where':_0x330838[_0x6f23('0x40')]};return db[_0x6f23('0x2f')][_0x6f23('0x1e')](_0x1d8c3a)['then'](function(_0x3109f3){_0x4fbeb1[_0x6f23('0x1e')]=_0x3109f3;if(_0x5ebb83['query']['includeAll']){_0x330838[_0x6f23('0x46')]=[{'all':!![]}];}return db[_0x6f23('0x2f')][_0x6f23('0x47')](_0x330838);})[_0x6f23('0x26')](function(_0x107156){_0x4fbeb1[_0x6f23('0x48')]=_0x107156;return _0x4fbeb1;})[_0x6f23('0x26')](respondWithFilteredResult(_0x42b69c,_0x330838))[_0x6f23('0x49')](handleError(_0x42b69c,null));};exports['show']=function(_0x2ed2cf,_0x3b3dd6){var _0x2811ed={'raw':![],'where':{'id':_0x2ed2cf[_0x6f23('0x4a')]['id']}},_0x3dc3af={};_0x3dc3af[_0x6f23('0x34')]=_[_0x6f23('0x37')](db['VoiceMusicOnHold'][_0x6f23('0x30')]);_0x3dc3af['query']=_[_0x6f23('0x37')](_0x2ed2cf[_0x6f23('0x36')]);_0x3dc3af[_0x6f23('0x41')]=_[_0x6f23('0x38')](_0x3dc3af['model'],_0x3dc3af['query']);_0x2811ed[_0x6f23('0x39')]=_[_0x6f23('0x38')](_0x3dc3af[_0x6f23('0x34')],qs[_0x6f23('0x3a')](_0x2ed2cf[_0x6f23('0x36')][_0x6f23('0x3a')]));_0x2811ed[_0x6f23('0x39')]=_0x2811ed[_0x6f23('0x39')]['length']?_0x2811ed[_0x6f23('0x39')]:_0x3dc3af['model'];if(_0x2ed2cf[_0x6f23('0x36')][_0x6f23('0x4b')]){_0x2811ed[_0x6f23('0x46')]=[{'all':!![]}];}_0x2811ed=_[_0x6f23('0x43')]({},_0x2811ed,_0x2ed2cf[_0x6f23('0x4c')]);return db[_0x6f23('0x2f')][_0x6f23('0x4d')](_0x2811ed)[_0x6f23('0x26')](handleEntityNotFound(_0x3b3dd6,null))[_0x6f23('0x26')](respondWithResult(_0x3b3dd6,null))[_0x6f23('0x49')](handleError(_0x3b3dd6,null));};exports[_0x6f23('0x25')]=function(_0x240ec4,_0x2e066f){if(_0x240ec4[_0x6f23('0x4e')]['id']){delete _0x240ec4['body']['id'];}return db[_0x6f23('0x2f')][_0x6f23('0x4d')]({'where':{'id':_0x240ec4[_0x6f23('0x4a')]['id']}})['then'](handleEntityNotFound(_0x2e066f,null))[_0x6f23('0x26')](saveUpdates(_0x240ec4[_0x6f23('0x4e')],null))[_0x6f23('0x26')](respondWithResult(_0x2e066f,null))[_0x6f23('0x49')](handleError(_0x2e066f,null));};exports[_0x6f23('0x4f')]=function(_0x4f78df,_0x30bef9,_0x9a48d7){return db[_0x6f23('0x50')][_0x6f23('0x51')](function(_0x597054){if(_0x4f78df[_0x6f23('0x4e')][_0x6f23('0x52')]===_0x6f23('0x53')){_0x4f78df[_0x6f23('0x4e')][_0x6f23('0x54')]=path['join'](config['root'],_0x6f23('0x55'),_0x4f78df['body'][_0x6f23('0x2c')]);}return db[_0x6f23('0x2f')][_0x6f23('0x4f')](_0x4f78df[_0x6f23('0x4e')],{'transaction':_0x597054})[_0x6f23('0x26')](function(_0x449836){if(_0x4f78df['body'][_0x6f23('0x52')]===_0x6f23('0x53')){fs[_0x6f23('0x56')](_0x449836[_0x6f23('0x54')],parseInt(_0x6f23('0x57'),0x8));}var _0x30f054=_0x4f78df[_0x6f23('0x58')][_0x6f23('0x27')]({'plain':!![]});if(!_0x30f054)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x30f054[_0x6f23('0x59')]===_0x6f23('0x58')){var _0x210c87=_0x449836['get']({'plain':!![]});return db[_0x6f23('0x5a')]['find']({'where':{'name':_0x6f23('0x28'),'userProfileId':_0x30f054['userProfileId']},'raw':!![]})[_0x6f23('0x26')](function(_0x2c1a20){if(_0x2c1a20&&_0x2c1a20[_0x6f23('0x5b')]===0x0){return db[_0x6f23('0x29')][_0x6f23('0x4f')]({'name':_0x210c87['name'],'resourceId':_0x210c87['id'],'type':_0x2c1a20[_0x6f23('0x2c')],'sectionId':_0x2c1a20['id']},{})[_0x6f23('0x26')](function(){return _0x449836;});}else{return _0x449836;}})[_0x6f23('0x49')](function(_0x4558e7){logger['error'](_0x6f23('0x5c'),_0x4558e7);});}return _0x449836;});})[_0x6f23('0x26')](respondWithResult(_0x30bef9,0xc9))[_0x6f23('0x49')](handleError(_0x30bef9,null));};exports[_0x6f23('0x5d')]=function(_0x4dd0bd,_0x4a3a6e,_0x2a0eb4){var _0x376abb;return db['VoiceMusicOnHold'][_0x6f23('0x4d')]({'where':{'id':_0x4dd0bd[_0x6f23('0x4a')]['id']}})[_0x6f23('0x26')](function(_0x120517){if(_0x120517){return db[_0x6f23('0x50')][_0x6f23('0x51')](function(_0x111052){return _0x120517[_0x6f23('0x5d')]({'transaction':_0x111052,'raw':!![]})['then'](function(_0x1af876){if(_0x1af876[_0x6f23('0x54')]){fs[_0x6f23('0x5e')](_0x1af876[_0x6f23('0x54')])[_0x6f23('0x5f')](function(_0x5aa846){fs[_0x6f23('0x60')](path[_0x6f23('0x61')](_0x1af876[_0x6f23('0x54')],_0x5aa846));});fs['rmdirSync'](_0x1af876[_0x6f23('0x54')]);}return _0x1af876;});})['catch'](function(_0x49ecc6){throw new db[(_0x6f23('0x62'))]['ValidationError'](_0x49ecc6[_0x6f23('0x63')]);});}})[_0x6f23('0x26')](handleEntityNotFound(_0x4a3a6e,null))[_0x6f23('0x26')](removeEntity(_0x4a3a6e,null))['catch'](handleError(_0x4a3a6e,null));};exports[_0x6f23('0x64')]=function(_0x3b50fa,_0x1249e1,_0x19c63c){return db[_0x6f23('0x50')]['transaction'](function(_0x50507c){var _0x2eb4fa;return db[_0x6f23('0x2f')][_0x6f23('0x4d')]({'where':{'id':_0x3b50fa[_0x6f23('0x4a')]['id']}})['then'](function(_0x9a0003){if(_0x9a0003){_0x2eb4fa=_0x9a0003;return _0x9a0003[_0x6f23('0x64')](_0x3b50fa['body']['id'],{'transaction':_0x50507c});}})[_0x6f23('0x26')](function(_0x525693){if(_0x525693){return db['Sound']['findOne']({'where':{'id':_0x3b50fa[_0x6f23('0x4e')]['id']},'attributes':['id',_0x6f23('0x2c'),_0x6f23('0x65'),_0x6f23('0x66'),_0x6f23('0x67')],'raw':!![]});}})[_0x6f23('0x26')](function(_0x3cf2b2){if(_0x3cf2b2){var _0x2ce895=path[_0x6f23('0x61')](config[_0x6f23('0x68')],_0x6f23('0x69'),util[_0x6f23('0x6a')](_0x6f23('0x6b'),path[_0x6f23('0x6c')](_0x3cf2b2[_0x6f23('0x65')],path[_0x6f23('0x6d')](_0x3cf2b2[_0x6f23('0x65')])),_0x3cf2b2[_0x6f23('0x66')]));var _0x4af3e3=path[_0x6f23('0x61')](config[_0x6f23('0x68')],_0x6f23('0x55'),_0x2eb4fa['name'],util[_0x6f23('0x6a')](_0x6f23('0x6b'),_0x3cf2b2[_0x6f23('0x2c')],_0x3cf2b2[_0x6f23('0x66')]));fs[_0x6f23('0x6e')](_0x2ce895,_0x4af3e3);return _0x3cf2b2;}})['catch'](function(_0x118d36){throw new db[(_0x6f23('0x62'))]['ValidationError'](_0x118d36[_0x6f23('0x63')]);});})[_0x6f23('0x26')](handleEntityNotFound(_0x1249e1,null))['then'](respondWithResult(_0x1249e1,0xc9))[_0x6f23('0x49')](handleError(_0x1249e1,null));};exports[_0x6f23('0x6f')]=function(_0x272e3a,_0x2472c3,_0x500743){return db[_0x6f23('0x50')][_0x6f23('0x51')](function(_0x57b67b){var _0x32e48b;return db[_0x6f23('0x2f')][_0x6f23('0x70')]({'where':{'id':_0x272e3a['params']['id']}})[_0x6f23('0x26')](handleEntityNotFound(_0x2472c3,null))[_0x6f23('0x26')](function(_0x33be71){if(_0x33be71){_0x32e48b=_0x33be71;return _0x33be71['removeSound'](_0x272e3a[_0x6f23('0x4a')][_0x6f23('0x71')]);}})['then'](function(_0x55b2ba){if(_0x55b2ba){return db[_0x6f23('0x72')]['findOne']({'where':{'id':_0x272e3a['params'][_0x6f23('0x71')]},'attributes':['id',_0x6f23('0x2c'),'save_name',_0x6f23('0x66'),_0x6f23('0x67')],'raw':!![]});}})[_0x6f23('0x26')](function(_0xc2168e){if(_0xc2168e){fs[_0x6f23('0x60')](path['join'](_0x32e48b['directory'],util[_0x6f23('0x6a')](_0x6f23('0x6b'),_0xc2168e[_0x6f23('0x2c')],_0xc2168e[_0x6f23('0x66')])));return _0xc2168e;}})[_0x6f23('0x49')](function(_0x4b50cd){throw new db[(_0x6f23('0x62'))]['ValidationError'](_0x4b50cd[_0x6f23('0x63')]);});})[_0x6f23('0x26')](handleEntityNotFound(_0x2472c3,null))[_0x6f23('0x26')](respondWithStatusCode(_0x2472c3,0xcc))[_0x6f23('0x49')](handleError(_0x2472c3,null));};exports[_0x6f23('0x73')]=function(_0x43432d,_0x1b4bb2,_0x3e2e4e){var _0x4f2065={};var _0x8f5bd4={};var _0x58890c;var _0x3d4da9;return db[_0x6f23('0x2f')][_0x6f23('0x70')]({'where':{'id':_0x43432d[_0x6f23('0x4a')]['id']}})[_0x6f23('0x26')](handleEntityNotFound(_0x1b4bb2,null))[_0x6f23('0x26')](function(_0x2ccc66){if(_0x2ccc66){_0x58890c=_0x2ccc66;_0x8f5bd4[_0x6f23('0x34')]=_[_0x6f23('0x37')](db[_0x6f23('0x72')][_0x6f23('0x30')]);_0x8f5bd4[_0x6f23('0x36')]=_[_0x6f23('0x37')](_0x43432d[_0x6f23('0x36')]);_0x8f5bd4[_0x6f23('0x41')]=_['intersection'](_0x8f5bd4[_0x6f23('0x34')],_0x8f5bd4['query']);_0x4f2065[_0x6f23('0x39')]=_[_0x6f23('0x38')](_0x8f5bd4['model'],qs[_0x6f23('0x3a')](_0x43432d['query'][_0x6f23('0x3a')]));_0x4f2065[_0x6f23('0x39')]=_0x4f2065[_0x6f23('0x39')][_0x6f23('0x3b')]?_0x4f2065[_0x6f23('0x39')]:_0x8f5bd4[_0x6f23('0x34')];_0x4f2065['order']=qs[_0x6f23('0x3f')](_0x43432d['query'][_0x6f23('0x3f')]);_0x4f2065[_0x6f23('0x40')]=qs['filters'](_[_0x6f23('0x42')](_0x43432d[_0x6f23('0x36')],_0x8f5bd4['filters']));if(_0x43432d[_0x6f23('0x36')][_0x6f23('0x45')]){_0x4f2065[_0x6f23('0x40')]=_['merge'](_0x4f2065[_0x6f23('0x40')],{'$or':_[_0x6f23('0x35')](_0x4f2065[_0x6f23('0x39')],function(_0x35d7cd){var _0x518487={};_0x518487[_0x35d7cd]={'$like':'%'+_0x43432d['query']['filter']+'%'};return _0x518487;})});}_0x4f2065=_[_0x6f23('0x43')]({},_0x4f2065,_0x43432d['options']);return _0x58890c['getSounds'](_0x4f2065);}})[_0x6f23('0x26')](function(_0x2f0e38){if(_0x2f0e38){_0x3d4da9=_0x2f0e38[_0x6f23('0x3b')];if(!_0x43432d['query'][_0x6f23('0x3c')]('nolimit')){_0x4f2065['limit']=qs[_0x6f23('0x1f')](_0x43432d[_0x6f23('0x36')][_0x6f23('0x1f')]);_0x4f2065[_0x6f23('0x1c')]=qs['offset'](_0x43432d[_0x6f23('0x36')][_0x6f23('0x1c')]);}return _0x58890c[_0x6f23('0x73')](_0x4f2065);}})['then'](function(_0x33cbee){if(_0x33cbee){return _0x33cbee?{'count':_0x3d4da9,'rows':_0x33cbee}:null;}})[_0x6f23('0x26')](respondWithResult(_0x1b4bb2,null))['catch'](handleError(_0x1b4bb2,null));}; \ No newline at end of file diff --git a/server/api/voiceMusicOnHold/voiceMusicOnHold.model.js b/server/api/voiceMusicOnHold/voiceMusicOnHold.model.js index 4f79b21..669de5e 100644 --- a/server/api/voiceMusicOnHold/voiceMusicOnHold.model.js +++ b/server/api/voiceMusicOnHold/voiceMusicOnHold.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8c05=['api','moment','bluebird','request-promise','path','rimraf','./voiceMusicOnHold.attributes','exports','define','lodash'];(function(_0x173d7e,_0x3242fd){var _0x2220d6=function(_0x462828){while(--_0x462828){_0x173d7e['push'](_0x173d7e['shift']());}};_0x2220d6(++_0x3242fd);}(_0x8c05,0x199));var _0x58c0=function(_0x808bc4,_0x2201bf){_0x808bc4=_0x808bc4-0x0;var _0x233c9e=_0x8c05[_0x808bc4];return _0x233c9e;};'use strict';var _=require(_0x58c0('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x58c0('0x1'));var moment=require(_0x58c0('0x2'));var BPromise=require(_0x58c0('0x3'));var rp=require(_0x58c0('0x4'));var fs=require('fs');var path=require(_0x58c0('0x5'));var rimraf=require(_0x58c0('0x6'));var config=require('../../config/environment');var attributes=require(_0x58c0('0x7'));module[_0x58c0('0x8')]=function(_0x3d6af7,_0x284f5f){return _0x3d6af7[_0x58c0('0x9')]('VoiceMusicOnHold',attributes,{'tableName':'voice_musiconhold','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x5398=['bluebird','request-promise','path','rimraf','../../config/environment','./voiceMusicOnHold.attributes','exports','define','voice_musiconhold','lodash','util','../../config/logger','api','moment'];(function(_0x55d6bb,_0x11415b){var _0x31046b=function(_0x2fb54b){while(--_0x2fb54b){_0x55d6bb['push'](_0x55d6bb['shift']());}};_0x31046b(++_0x11415b);}(_0x5398,0x87));var _0x8539=function(_0x1d9e25,_0x25b511){_0x1d9e25=_0x1d9e25-0x0;var _0x317a5a=_0x5398[_0x1d9e25];return _0x317a5a;};'use strict';var _=require(_0x8539('0x0'));var util=require(_0x8539('0x1'));var logger=require(_0x8539('0x2'))(_0x8539('0x3'));var moment=require(_0x8539('0x4'));var BPromise=require(_0x8539('0x5'));var rp=require(_0x8539('0x6'));var fs=require('fs');var path=require(_0x8539('0x7'));var rimraf=require(_0x8539('0x8'));var config=require(_0x8539('0x9'));var attributes=require(_0x8539('0xa'));module[_0x8539('0xb')]=function(_0xe7d22b,_0x193bf5){return _0xe7d22b[_0x8539('0xc')]('VoiceMusicOnHold',attributes,{'tableName':_0x8539('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/voiceMusicOnHold/voiceMusicOnHold.rpc.js b/server/api/voiceMusicOnHold/voiceMusicOnHold.rpc.js index 4d160ed..a11895c 100644 --- a/server/api/voiceMusicOnHold/voiceMusicOnHold.rpc.js +++ b/server/api/voiceMusicOnHold/voiceMusicOnHold.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe706=['http','request','then','info','VoiceMusicOnHold,\x20%s,\x20%s','request\x20sent','debug','VoiceMusicOnHold,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client'];(function(_0x120b9a,_0x4e0ce3){var _0x3d4a18=function(_0xa5462e){while(--_0xa5462e){_0x120b9a['push'](_0x120b9a['shift']());}};_0x3d4a18(++_0x4e0ce3);}(_0xe706,0xa3));var _0x6e70=function(_0x19cf1f,_0x4105e3){_0x19cf1f=_0x19cf1f-0x0;var _0x234028=_0xe706[_0x19cf1f];return _0x234028;};'use strict';var _=require(_0x6e70('0x0'));var util=require(_0x6e70('0x1'));var moment=require(_0x6e70('0x2'));var BPromise=require('bluebird');var rs=require(_0x6e70('0x3'));var fs=require('fs');var Redis=require(_0x6e70('0x4'));var db=require(_0x6e70('0x5'))['db'];var utils=require(_0x6e70('0x6'));var logger=require(_0x6e70('0x7'))(_0x6e70('0x8'));var config=require(_0x6e70('0x9'));var jayson=require(_0x6e70('0xa'));var client=jayson[_0x6e70('0xb')][_0x6e70('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x36357b,_0x293ce7,_0x45a2d4){return new BPromise(function(_0x188ed3,_0x3c4843){return client[_0x6e70('0xd')](_0x36357b,_0x45a2d4)[_0x6e70('0xe')](function(_0x25e61c){logger[_0x6e70('0xf')](_0x6e70('0x10'),_0x293ce7,_0x6e70('0x11'));logger[_0x6e70('0x12')](_0x6e70('0x13'),_0x293ce7,_0x6e70('0x11'),JSON['stringify'](_0x25e61c));if(_0x25e61c['error']){if(_0x25e61c[_0x6e70('0x14')][_0x6e70('0x15')]===0x1f4){logger[_0x6e70('0x14')](_0x6e70('0x10'),_0x293ce7,_0x25e61c[_0x6e70('0x14')][_0x6e70('0x16')]);return _0x3c4843(_0x25e61c[_0x6e70('0x14')][_0x6e70('0x16')]);}logger['error']('VoiceMusicOnHold,\x20%s,\x20%s',_0x293ce7,_0x25e61c['error'][_0x6e70('0x16')]);return _0x188ed3(_0x25e61c['error']['message']);}else{logger[_0x6e70('0xf')](_0x6e70('0x10'),_0x293ce7,'request\x20sent');_0x188ed3(_0x25e61c[_0x6e70('0x17')]['message']);}})[_0x6e70('0x18')](function(_0x161f23){logger['error']('VoiceMusicOnHold,\x20%s,\x20%s',_0x293ce7,_0x161f23);_0x3c4843(_0x161f23);});});} \ No newline at end of file +var _0xa9e0=['http','info','VoiceMusicOnHold,\x20%s,\x20%s','request\x20sent','debug','VoiceMusicOnHold,\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(_0x48f28b,_0x255358){var _0x12be1c=function(_0x5cb188){while(--_0x5cb188){_0x48f28b['push'](_0x48f28b['shift']());}};_0x12be1c(++_0x255358);}(_0xa9e0,0x123));var _0x0a9e=function(_0x1ddedd,_0x485606){_0x1ddedd=_0x1ddedd-0x0;var _0xa3e1ac=_0xa9e0[_0x1ddedd];return _0xa3e1ac;};'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/voicePrefix/index.js b/server/api/voicePrefix/index.js index 167b2a0..7c3e655 100644 --- a/server/api/voicePrefix/index.js +++ b/server/api/voicePrefix/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xeed7=['multer','util','path','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./voicePrefix.controller','get','isAuthenticated','index','/describe','describe','/:id','show','getAgents','post','create','/:id/users','addAgents','put','update','delete','destroy','removeAgents','exports'];(function(_0x6fbca9,_0x88ebc8){var _0xafa1cd=function(_0x5364b4){while(--_0x5364b4){_0x6fbca9['push'](_0x6fbca9['shift']());}};_0xafa1cd(++_0x88ebc8);}(_0xeed7,0x129));var _0x7eed=function(_0xf5b212,_0x42af63){_0xf5b212=_0xf5b212-0x0;var _0x123eca=_0xeed7[_0xf5b212];return _0x123eca;};'use strict';var multer=require(_0x7eed('0x0'));var util=require(_0x7eed('0x1'));var path=require(_0x7eed('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x7eed('0x3')]();var fs_extra=require(_0x7eed('0x4'));var auth=require(_0x7eed('0x5'));var interaction=require(_0x7eed('0x6'));var config=require(_0x7eed('0x7'));var controller=require(_0x7eed('0x8'));router[_0x7eed('0x9')]('/',auth[_0x7eed('0xa')](),controller[_0x7eed('0xb')]);router[_0x7eed('0x9')](_0x7eed('0xc'),auth[_0x7eed('0xa')](),controller[_0x7eed('0xd')]);router[_0x7eed('0x9')](_0x7eed('0xe'),auth[_0x7eed('0xa')](),controller[_0x7eed('0xf')]);router[_0x7eed('0x9')]('/:id/users',auth[_0x7eed('0xa')](),controller[_0x7eed('0x10')]);router[_0x7eed('0x11')]('/',auth[_0x7eed('0xa')](),controller[_0x7eed('0x12')]);router[_0x7eed('0x11')](_0x7eed('0x13'),auth['isAuthenticated'](),controller[_0x7eed('0x14')]);router[_0x7eed('0x15')](_0x7eed('0xe'),auth[_0x7eed('0xa')](),controller[_0x7eed('0x16')]);router[_0x7eed('0x17')](_0x7eed('0xe'),auth['isAuthenticated'](),controller[_0x7eed('0x18')]);router[_0x7eed('0x17')]('/:id/users',auth[_0x7eed('0xa')](),controller[_0x7eed('0x19')]);module[_0x7eed('0x1a')]=router; \ No newline at end of file +var _0xb109=['multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','index','/describe','describe','show','/:id/users','getAgents','create','post','put','/:id','update','delete','removeAgents','exports'];(function(_0x1b68de,_0x169d0b){var _0x339b11=function(_0x38b96a){while(--_0x38b96a){_0x1b68de['push'](_0x1b68de['shift']());}};_0x339b11(++_0x169d0b);}(_0xb109,0x198));var _0x9b10=function(_0x1d0e03,_0x21dfca){_0x1d0e03=_0x1d0e03-0x0;var _0x3fdf30=_0xb109[_0x1d0e03];return _0x3fdf30;};'use strict';var multer=require(_0x9b10('0x0'));var util=require(_0x9b10('0x1'));var path=require(_0x9b10('0x2'));var timeout=require(_0x9b10('0x3'));var express=require(_0x9b10('0x4'));var router=express['Router']();var fs_extra=require(_0x9b10('0x5'));var auth=require(_0x9b10('0x6'));var interaction=require(_0x9b10('0x7'));var config=require('../../config/environment');var controller=require('./voicePrefix.controller');router[_0x9b10('0x8')]('/',auth[_0x9b10('0x9')](),controller[_0x9b10('0xa')]);router['get'](_0x9b10('0xb'),auth[_0x9b10('0x9')](),controller[_0x9b10('0xc')]);router[_0x9b10('0x8')]('/:id',auth['isAuthenticated'](),controller[_0x9b10('0xd')]);router['get'](_0x9b10('0xe'),auth[_0x9b10('0x9')](),controller[_0x9b10('0xf')]);router['post']('/',auth['isAuthenticated'](),controller[_0x9b10('0x10')]);router[_0x9b10('0x11')](_0x9b10('0xe'),auth['isAuthenticated'](),controller['addAgents']);router[_0x9b10('0x12')](_0x9b10('0x13'),auth['isAuthenticated'](),controller[_0x9b10('0x14')]);router['delete']('/:id',auth[_0x9b10('0x9')](),controller['destroy']);router[_0x9b10('0x15')](_0x9b10('0xe'),auth[_0x9b10('0x9')](),controller[_0x9b10('0x16')]);module[_0x9b10('0x17')]=router; \ No newline at end of file diff --git a/server/api/voicePrefix/voicePrefix.attributes.js b/server/api/voicePrefix/voicePrefix.attributes.js index 4fa4d24..54fa4f9 100644 --- a/server/api/voicePrefix/voicePrefix.attributes.js +++ b/server/api/voicePrefix/voicePrefix.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0dc8=['STRING','name','INTEGER','sequelize'];(function(_0x2b10c6,_0x185590){var _0x3789d2=function(_0x272987){while(--_0x272987){_0x2b10c6['push'](_0x2b10c6['shift']());}};_0x3789d2(++_0x185590);}(_0x0dc8,0x147));var _0x80dc=function(_0x587439,_0x153c32){_0x587439=_0x587439-0x0;var _0x138c81=_0x0dc8[_0x587439];return _0x138c81;};'use strict';var Sequelize=require(_0x80dc('0x0'));module['exports']={'name':{'type':Sequelize[_0x80dc('0x1')],'allowNull':![],'unique':_0x80dc('0x2')},'prefix':{'type':Sequelize['VIRTUAL'],'get':function(_0x3957ad){return'system-'+this['getDataValue']('name')+'-';}},'description':{'type':Sequelize[_0x80dc('0x1')]},'callerIdAll':{'type':Sequelize['STRING']},'VoiceExtensionId':{'type':Sequelize[_0x80dc('0x3')]}}; \ No newline at end of file +var _0x8adc=['STRING','name','VIRTUAL','getDataValue','INTEGER','sequelize','exports'];(function(_0x2ff3b3,_0x2fc1a4){var _0x3d8c18=function(_0xe3364f){while(--_0xe3364f){_0x2ff3b3['push'](_0x2ff3b3['shift']());}};_0x3d8c18(++_0x2fc1a4);}(_0x8adc,0x108));var _0xc8ad=function(_0x4d7116,_0xdb8175){_0x4d7116=_0x4d7116-0x0;var _0x4593dc=_0x8adc[_0x4d7116];return _0x4593dc;};'use strict';var Sequelize=require(_0xc8ad('0x0'));module[_0xc8ad('0x1')]={'name':{'type':Sequelize[_0xc8ad('0x2')],'allowNull':![],'unique':_0xc8ad('0x3')},'prefix':{'type':Sequelize[_0xc8ad('0x4')],'get':function(_0x5d7a1d){return'system-'+this[_0xc8ad('0x5')]('name')+'-';}},'description':{'type':Sequelize['STRING']},'callerIdAll':{'type':Sequelize[_0xc8ad('0x2')]},'VoiceExtensionId':{'type':Sequelize[_0xc8ad('0x6')]}}; \ No newline at end of file diff --git a/server/api/voicePrefix/voicePrefix.controller.js b/server/api/voicePrefix/voicePrefix.controller.js index bc8d3b3..71e096a 100644 --- a/server/api/voicePrefix/voicePrefix.controller.js +++ b/server/api/voicePrefix/voicePrefix.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['VoicePrefix','includeAll','include','findAll','catch','show','params','find','describe','create','body','get','VoiceExtensionId','user','role','VoicePrefixes','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','from-sip','exten','app','system','description','priority','appdata','NoOp','VoicePrefixId','VoiceExtension','bulkCreate','Extensions\x20creation\x20failed','prefix','push','Set','callerIdAll','PREFIX-CALLERIDALL=','No\x20callerid\x20available','goto','context','${EXTEN:','charAt','sequelize','findById','addAgents','ids','spread','emit','removeAgents','isArray','getAgents','findOne','User','pick','hasOwnProperty','eml-format','rimraf','zip-dir','moment','mustache','util','path','sox','to-csv','fs-extra','lodash','squel','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/license/util','../../mysqldb','redis','defaults','localhost','./voicePrefix.socket','register','status','offset','undefined','limit','count','set','apply','save','update','then','destroy','UserProfileResource','end','sendStatus','error','stack','name','send','index','map','rawAttributes','fieldName','type','key','query','keys','filters','intersection','model','attributes','fields','length','nolimit','order','sort','where','filter','merge','VIRTUAL','options'];(function(_0x502c7d,_0x2f1285){var _0x30b7ed=function(_0x2d92f3){while(--_0x2d92f3){_0x502c7d['push'](_0x502c7d['shift']());}};_0x30b7ed(++_0x2f1285);}(_0xa9e0,0x123));var _0x0a9e=function(_0xf0bcac,_0x531755){_0xf0bcac=_0xf0bcac-0x0;var _0x4e4c65=_0xa9e0[_0xf0bcac];return _0x4e4c65;};'use strict';var emlformat=require(_0x0a9e('0x0'));var rimraf=require(_0x0a9e('0x1'));var zipdir=require(_0x0a9e('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x0a9e('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x0a9e('0x4'));var util=require(_0x0a9e('0x5'));var path=require(_0x0a9e('0x6'));var sox=require(_0x0a9e('0x7'));var csv=require(_0x0a9e('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x0a9e('0x9'));var _=require(_0x0a9e('0xa'));var squel=require(_0x0a9e('0xb'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x0a9e('0xc'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x0a9e('0xd'));var Redis=require(_0x0a9e('0xe'));var authService=require(_0x0a9e('0xf'));var qs=require(_0x0a9e('0x10'));var as=require(_0x0a9e('0x11'));var hardwareService=require(_0x0a9e('0x12'));var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x0a9e('0x13'));var db=require(_0x0a9e('0x14'))['db'];config[_0x0a9e('0x15')]=_[_0x0a9e('0x16')](config[_0x0a9e('0x15')],{'host':_0x0a9e('0x17'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x0a9e('0x15')]));require(_0x0a9e('0x18'))[_0x0a9e('0x19')](socket);function respondWithStatusCode(_0x281129,_0x44dcfd){_0x44dcfd=_0x44dcfd||0xcc;return function(_0x4d5611){if(_0x4d5611){return _0x281129['sendStatus'](_0x44dcfd);}return _0x281129[_0x0a9e('0x1a')](_0x44dcfd)['end']();};}function respondWithResult(_0x1985b6,_0x519dfd){_0x519dfd=_0x519dfd||0xc8;return function(_0x16033c){if(_0x16033c){return _0x1985b6[_0x0a9e('0x1a')](_0x519dfd)['json'](_0x16033c);}};}function respondWithFilteredResult(_0x225616,_0x5a0a06){return function(_0x459eb1){if(_0x459eb1){var _0x478723=typeof _0x5a0a06[_0x0a9e('0x1b')]===_0x0a9e('0x1c')&&typeof _0x5a0a06[_0x0a9e('0x1d')]===_0x0a9e('0x1c');var _0x530eb7=_0x459eb1[_0x0a9e('0x1e')];var _0x1314ae=_0x478723?0x0:_0x5a0a06[_0x0a9e('0x1b')];var _0x1c696a=_0x478723?_0x459eb1[_0x0a9e('0x1e')]:_0x5a0a06['offset']+_0x5a0a06[_0x0a9e('0x1d')];var _0x155cce;if(_0x1c696a>=_0x530eb7){_0x1c696a=_0x530eb7;_0x155cce=0xc8;}else{_0x155cce=0xce;}_0x225616['status'](_0x155cce);return _0x225616[_0x0a9e('0x1f')]('Content-Range',_0x1314ae+'-'+_0x1c696a+'/'+_0x530eb7)['json'](_0x459eb1);}return null;};}function patchUpdates(_0x3a02e1){return function(_0x432e56){try{jsonpatch[_0x0a9e('0x20')](_0x432e56,_0x3a02e1,!![]);}catch(_0x30bae6){return BPromise['reject'](_0x30bae6);}return _0x432e56[_0x0a9e('0x21')]();};}function saveUpdates(_0x2fb0e4,_0x3b45bc){return function(_0x4d00e6){if(_0x4d00e6){return _0x4d00e6[_0x0a9e('0x22')](_0x2fb0e4)[_0x0a9e('0x23')](function(_0x16b1ca){return _0x16b1ca;});}return null;};}function removeEntity(_0x5ea472,_0x59181e){return function(_0x197ec0){if(_0x197ec0){return _0x197ec0[_0x0a9e('0x24')]()[_0x0a9e('0x23')](function(){var _0x33161b=_0x197ec0['get']({'plain':!![]});var _0x384319='VoicePrefixes';return db[_0x0a9e('0x25')]['destroy']({'where':{'type':_0x384319,'resourceId':_0x33161b['id']}})[_0x0a9e('0x23')](function(){return _0x197ec0;});})[_0x0a9e('0x23')](function(){_0x5ea472[_0x0a9e('0x1a')](0xcc)[_0x0a9e('0x26')]();});}};}function handleEntityNotFound(_0x140511,_0x1538a4){return function(_0x11c3b6){if(!_0x11c3b6){_0x140511[_0x0a9e('0x27')](0x194);}return _0x11c3b6;};}function handleError(_0x5a101a,_0x3652a7){_0x3652a7=_0x3652a7||0x1f4;return function(_0x468813){logger[_0x0a9e('0x28')](_0x468813[_0x0a9e('0x29')]);if(_0x468813['name']){delete _0x468813[_0x0a9e('0x2a')];}_0x5a101a[_0x0a9e('0x1a')](_0x3652a7)[_0x0a9e('0x2b')](_0x468813);};}exports[_0x0a9e('0x2c')]=function(_0x58b06f,_0x563b45){var _0x296f41={},_0x2e8759={},_0x1dbde2={'count':0x0,'rows':[]};var _0x540530=_[_0x0a9e('0x2d')](db['VoicePrefix'][_0x0a9e('0x2e')],function(_0x3ae878){return{'name':_0x3ae878[_0x0a9e('0x2f')],'type':_0x3ae878[_0x0a9e('0x30')][_0x0a9e('0x31')]};});_0x2e8759['model']=_[_0x0a9e('0x2d')](_0x540530,_0x0a9e('0x2a'));_0x2e8759[_0x0a9e('0x32')]=_[_0x0a9e('0x33')](_0x58b06f[_0x0a9e('0x32')]);_0x2e8759[_0x0a9e('0x34')]=_[_0x0a9e('0x35')](_0x2e8759[_0x0a9e('0x36')],_0x2e8759['query']);_0x296f41[_0x0a9e('0x37')]=_['intersection'](_0x2e8759[_0x0a9e('0x36')],qs[_0x0a9e('0x38')](_0x58b06f[_0x0a9e('0x32')][_0x0a9e('0x38')]));_0x296f41['attributes']=_0x296f41[_0x0a9e('0x37')][_0x0a9e('0x39')]?_0x296f41[_0x0a9e('0x37')]:_0x2e8759[_0x0a9e('0x36')];if(!_0x58b06f['query']['hasOwnProperty'](_0x0a9e('0x3a'))){_0x296f41['limit']=qs[_0x0a9e('0x1d')](_0x58b06f[_0x0a9e('0x32')][_0x0a9e('0x1d')]);_0x296f41[_0x0a9e('0x1b')]=qs['offset'](_0x58b06f[_0x0a9e('0x32')][_0x0a9e('0x1b')]);}_0x296f41[_0x0a9e('0x3b')]=qs['sort'](_0x58b06f[_0x0a9e('0x32')][_0x0a9e('0x3c')]);_0x296f41[_0x0a9e('0x3d')]=qs['filters'](_['pick'](_0x58b06f[_0x0a9e('0x32')],_0x2e8759[_0x0a9e('0x34')]),_0x540530);if(_0x58b06f['query'][_0x0a9e('0x3e')]){_0x296f41[_0x0a9e('0x3d')]=_[_0x0a9e('0x3f')](_0x296f41[_0x0a9e('0x3d')],{'$or':_['map'](_0x540530,function(_0x5a594b){if(_0x5a594b[_0x0a9e('0x30')]!==_0x0a9e('0x40')){var _0x53f3ee={};_0x53f3ee[_0x5a594b[_0x0a9e('0x2a')]]={'$like':'%'+_0x58b06f[_0x0a9e('0x32')][_0x0a9e('0x3e')]+'%'};return _0x53f3ee;}})});}_0x296f41=_['merge']({},_0x296f41,_0x58b06f[_0x0a9e('0x41')]);var _0x2cfea9={'where':_0x296f41[_0x0a9e('0x3d')]};return db[_0x0a9e('0x42')][_0x0a9e('0x1e')](_0x2cfea9)[_0x0a9e('0x23')](function(_0x2881b3){_0x1dbde2[_0x0a9e('0x1e')]=_0x2881b3;if(_0x58b06f[_0x0a9e('0x32')][_0x0a9e('0x43')]){_0x296f41[_0x0a9e('0x44')]=[{'all':!![]}];}return db[_0x0a9e('0x42')][_0x0a9e('0x45')](_0x296f41);})[_0x0a9e('0x23')](function(_0x37f6cc){_0x1dbde2['rows']=_0x37f6cc;return _0x1dbde2;})['then'](respondWithFilteredResult(_0x563b45,_0x296f41))[_0x0a9e('0x46')](handleError(_0x563b45,null));};exports[_0x0a9e('0x47')]=function(_0x405c8f,_0x315881){var _0x1a69dd={'raw':![],'where':{'id':_0x405c8f[_0x0a9e('0x48')]['id']}},_0xc9a702={};_0xc9a702[_0x0a9e('0x36')]=_[_0x0a9e('0x33')](db[_0x0a9e('0x42')][_0x0a9e('0x2e')]);_0xc9a702[_0x0a9e('0x32')]=_['keys'](_0x405c8f[_0x0a9e('0x32')]);_0xc9a702[_0x0a9e('0x34')]=_[_0x0a9e('0x35')](_0xc9a702[_0x0a9e('0x36')],_0xc9a702[_0x0a9e('0x32')]);_0x1a69dd[_0x0a9e('0x37')]=_[_0x0a9e('0x35')](_0xc9a702[_0x0a9e('0x36')],qs['fields'](_0x405c8f[_0x0a9e('0x32')]['fields']));_0x1a69dd[_0x0a9e('0x37')]=_0x1a69dd[_0x0a9e('0x37')][_0x0a9e('0x39')]?_0x1a69dd['attributes']:_0xc9a702[_0x0a9e('0x36')];if(_0x405c8f[_0x0a9e('0x32')][_0x0a9e('0x43')]){_0x1a69dd[_0x0a9e('0x44')]=[{'all':!![]}];}_0x1a69dd=_[_0x0a9e('0x3f')]({},_0x1a69dd,_0x405c8f[_0x0a9e('0x41')]);return db[_0x0a9e('0x42')]['find'](_0x1a69dd)[_0x0a9e('0x23')](handleEntityNotFound(_0x315881,null))[_0x0a9e('0x23')](respondWithResult(_0x315881,null))[_0x0a9e('0x46')](handleError(_0x315881,null));};exports[_0x0a9e('0x24')]=function(_0x409789,_0x992c77){return db[_0x0a9e('0x42')][_0x0a9e('0x49')]({'where':{'id':_0x409789[_0x0a9e('0x48')]['id']}})['then'](handleEntityNotFound(_0x992c77,null))[_0x0a9e('0x23')](removeEntity(_0x992c77,null))[_0x0a9e('0x46')](handleError(_0x992c77,null));};exports['describe']=function(_0x4ae14b,_0x5ddf84){return db[_0x0a9e('0x42')][_0x0a9e('0x4a')]()[_0x0a9e('0x23')](respondWithResult(_0x5ddf84,null))[_0x0a9e('0x46')](handleError(_0x5ddf84,null));};exports[_0x0a9e('0x4b')]=function(_0x30decb,_0x2e5165){var _0x375c18;return db['sequelize']['transaction'](function(_0x53975a){return db[_0x0a9e('0x42')][_0x0a9e('0x4b')](_0x30decb[_0x0a9e('0x4c')],{'transaction':_0x53975a})['then'](function(_0x2b69d9){_0x375c18=_0x2b69d9[_0x0a9e('0x4d')]({'plain':!![]});return db['VoiceExtension']['find']({'where':{'id':_0x375c18[_0x0a9e('0x4e')]},'raw':!![]})['then'](function(_0x443e72){return createVoicePrefixExtensions(_0x375c18,_0x443e72,_0x53975a);});});})['then'](function(){var _0x2e5e62=_0x30decb[_0x0a9e('0x4f')][_0x0a9e('0x4d')]({'plain':!![]});if(!_0x2e5e62)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x2e5e62[_0x0a9e('0x50')]===_0x0a9e('0x4f')){var _0x508b47=_0x375c18;return db['UserProfileSection'][_0x0a9e('0x49')]({'where':{'name':_0x0a9e('0x51'),'userProfileId':_0x2e5e62['userProfileId']},'raw':!![]})[_0x0a9e('0x23')](function(_0x5ce9ac){if(_0x5ce9ac&&_0x5ce9ac[_0x0a9e('0x52')]===0x0){return db['UserProfileResource'][_0x0a9e('0x4b')]({'name':_0x508b47['name'],'resourceId':_0x508b47['id'],'type':_0x5ce9ac['name'],'sectionId':_0x5ce9ac['id']},{})['then'](function(){return _0x375c18;});}else{return _0x375c18;}})[_0x0a9e('0x46')](function(_0x47de4c){logger[_0x0a9e('0x28')](_0x0a9e('0x53'),_0x47de4c);throw _0x47de4c;});}return _0x375c18;})[_0x0a9e('0x23')](respondWithResult(_0x2e5165,null))[_0x0a9e('0x46')](handleError(_0x2e5165,null));};function Extension(_0x232830,_0x272738,_0xd10662,_0x28d814){this['context']=_0x0a9e('0x54');this[_0x0a9e('0x55')]=_0x232830;this[_0x0a9e('0x56')]=_0xd10662;this[_0x0a9e('0x30')]=_0x0a9e('0x57');this[_0x0a9e('0x58')]='Voice\x20Prefix\x20Extension';this[_0x0a9e('0x59')]=_0x272738;this[_0x0a9e('0x5a')]=_0x28d814;}function createVoicePrefixExtensions(_0x5239ef,_0x3649cc,_0x5cc8fb){return new BPromise(function(_0x20c668,_0x5ba1f9){var _0x4b3c1a=new Extension(formatPrefixName(_0x5239ef['prefix']),0x1,_0x0a9e('0x5b'),'Voice\x20Prefix');_0x4b3c1a[_0x0a9e('0x5c')]=_0x5239ef['id'];return db[_0x0a9e('0x5d')][_0x0a9e('0x4b')](_0x4b3c1a,{'transaction':_0x5cc8fb})[_0x0a9e('0x23')](function(_0x1cca9f){var _0x26d7db=_0x1cca9f['get']({'plain':!![]});var _0x1627a7=_['map'](addVoicePrefixExtensions(_0x5239ef,_0x3649cc),function(_0xca4ade){_0xca4ade[_0x0a9e('0x4e')]=_0x26d7db['id'];_0xca4ade[_0x0a9e('0x5c')]=_0x5239ef['id'];return _0xca4ade;});return db['VoiceExtension'][_0x0a9e('0x5e')](_0x1627a7,{'transaction':_0x5cc8fb})[_0x0a9e('0x23')](function(_0x119677){if(!_0x119677){return _0x5ba1f9(_0x0a9e('0x5f'));}else{return _0x20c668(_0x119677);}})['catch'](function(_0x1d0dc8){return _0x5ba1f9(_0x1d0dc8);});});;});};function addVoicePrefixExtensions(_0xe05a5a,_0x54327c){var _0x797b45=[];var _0x17e88c=formatPrefixName(_0xe05a5a[_0x0a9e('0x60')]);_0x797b45[_0x0a9e('0x61')](new Extension(_0x17e88c,0x2,_0x0a9e('0x62'),'CDR(prefix)='+_0xe05a5a[_0x0a9e('0x2a')]));if(_0xe05a5a[_0x0a9e('0x63')]){_0x797b45[_0x0a9e('0x61')](new Extension(_0x17e88c,0x3,'Set',_0x0a9e('0x64')+_0xe05a5a['callerIdAll']));}else{_0x797b45['push'](new Extension(_0x17e88c,0x3,_0x0a9e('0x5b'),_0x0a9e('0x65')));}_0x797b45[_0x0a9e('0x61')](new Extension(_0x17e88c,0x4,_0x0a9e('0x66'),_0x54327c[_0x0a9e('0x67')]+','+_0x0a9e('0x68')+(0x8+_0xe05a5a[_0x0a9e('0x2a')][_0x0a9e('0x39')])+'}'+','+0x1));return _0x797b45;}function formatPrefixName(_0x2d7205){var _0x1cc4f3='_';for(var _0x2e89b7=0x0;_0x2e89b7<_0x2d7205[_0x0a9e('0x39')];_0x2e89b7++){if(_0x2d7205[_0x0a9e('0x69')](_0x2e89b7)=='-'){_0x1cc4f3+=_0x2d7205[_0x0a9e('0x69')](_0x2e89b7);}else{_0x1cc4f3+='['+_0x2d7205[_0x0a9e('0x69')](_0x2e89b7)+']';}}_0x1cc4f3+='.';return _0x1cc4f3;}exports[_0x0a9e('0x22')]=function(_0x2a28c0,_0x4257c9,_0x5150a4){var _0x1b0b98=_0x2a28c0[_0x0a9e('0x4c')];_0x1b0b98[_0x0a9e('0x60')]='system-'+_0x1b0b98[_0x0a9e('0x2a')]+'-';return db[_0x0a9e('0x6a')]['transaction'](function(_0x83f0b2){return db[_0x0a9e('0x42')][_0x0a9e('0x22')](_0x1b0b98,{'where':{'id':_0x1b0b98['id']},'transaction':_0x83f0b2})[_0x0a9e('0x23')](function(){return db[_0x0a9e('0x5d')]['destroy']({'where':{'VoicePrefixId':_0x1b0b98['id']},'transaction':_0x83f0b2})['then'](function(){return db['VoiceExtension'][_0x0a9e('0x49')]({'where':{'id':_0x1b0b98[_0x0a9e('0x4e')]},'raw':!![]})[_0x0a9e('0x23')](function(_0x23a7d3){return createVoicePrefixExtensions(_0x1b0b98,_0x23a7d3,_0x83f0b2);});});});})[_0x0a9e('0x23')](function(){return db[_0x0a9e('0x42')][_0x0a9e('0x6b')](_0x1b0b98['id']);})[_0x0a9e('0x23')](respondWithResult(_0x4257c9,null))['catch'](handleError(_0x4257c9,null));};exports[_0x0a9e('0x6c')]=function(_0xcbc8b2,_0x12ccdb,_0x4a4fc7){return db[_0x0a9e('0x42')]['find']({'where':{'id':_0xcbc8b2[_0x0a9e('0x48')]['id']}})[_0x0a9e('0x23')](handleEntityNotFound(_0x12ccdb,null))['then'](function(_0x2ed01e){if(_0x2ed01e){return _0x2ed01e[_0x0a9e('0x6c')](_0xcbc8b2[_0x0a9e('0x4c')][_0x0a9e('0x6d')],_['omit'](_0xcbc8b2[_0x0a9e('0x4c')],[_0x0a9e('0x6d'),'id'])||{})[_0x0a9e('0x6e')](function(_0x278ab4){for(var _0x5b7fc3=0x0;_0x5b7fc3<_0xcbc8b2[_0x0a9e('0x4c')][_0x0a9e('0x6d')][_0x0a9e('0x39')];_0x5b7fc3+=0x1){socket[_0x0a9e('0x6f')]('userVoicePrefix:save',{'UserId':_0xcbc8b2[_0x0a9e('0x4c')][_0x0a9e('0x6d')][_0x5b7fc3],'VoicePrefixId':_0xcbc8b2[_0x0a9e('0x48')]['id']});}return _0x278ab4;});}})[_0x0a9e('0x23')](respondWithResult(_0x12ccdb,null))[_0x0a9e('0x46')](handleError(_0x12ccdb,null));};exports[_0x0a9e('0x70')]=function(_0x40fc56,_0x3df0e3,_0x1a7b03){return db[_0x0a9e('0x42')][_0x0a9e('0x49')]({'where':{'id':_0x40fc56[_0x0a9e('0x48')]['id']}})[_0x0a9e('0x23')](handleEntityNotFound(_0x3df0e3,null))[_0x0a9e('0x23')](function(_0x5b35db){if(_0x5b35db){return _0x5b35db[_0x0a9e('0x70')](_0x40fc56[_0x0a9e('0x32')][_0x0a9e('0x6d')])['then'](function(){if(_[_0x0a9e('0x71')](_0x40fc56[_0x0a9e('0x32')][_0x0a9e('0x6d')])){for(var _0x2b9463=0x0;_0x2b9463<_0x40fc56['query']['ids'][_0x0a9e('0x39')];_0x2b9463+=0x1){socket[_0x0a9e('0x6f')]('userVoicePrefix:remove',{'UserId':Number(_0x40fc56[_0x0a9e('0x32')]['ids'][_0x2b9463]),'VoicePrefixId':Number(_0x40fc56[_0x0a9e('0x48')]['id'])});}}else{socket[_0x0a9e('0x6f')]('userVoicePrefix:remove',{'UserId':Number(_0x40fc56[_0x0a9e('0x32')][_0x0a9e('0x6d')]),'VoicePrefixId':Number(_0x40fc56[_0x0a9e('0x48')]['id'])});}});}})[_0x0a9e('0x23')](respondWithStatusCode(_0x3df0e3,null))[_0x0a9e('0x46')](handleError(_0x3df0e3,null));};exports[_0x0a9e('0x72')]=function(_0x444f1f,_0x482ca2,_0x2973d3){var _0x3ca9b9={};var _0x45c109={};var _0x16e5b9;var _0x492543;return db[_0x0a9e('0x42')][_0x0a9e('0x73')]({'where':{'id':_0x444f1f['params']['id']}})[_0x0a9e('0x23')](handleEntityNotFound(_0x482ca2,null))['then'](function(_0x163710){if(_0x163710){_0x16e5b9=_0x163710;_0x45c109[_0x0a9e('0x36')]=_[_0x0a9e('0x33')](db[_0x0a9e('0x74')]['rawAttributes']);_0x45c109['query']=_[_0x0a9e('0x33')](_0x444f1f[_0x0a9e('0x32')]);_0x45c109[_0x0a9e('0x34')]=_['intersection'](_0x45c109[_0x0a9e('0x36')],_0x45c109[_0x0a9e('0x32')]);_0x3ca9b9['attributes']=_['intersection'](_0x45c109[_0x0a9e('0x36')],qs['fields'](_0x444f1f['query']['fields']));_0x3ca9b9[_0x0a9e('0x37')]=_0x3ca9b9[_0x0a9e('0x37')][_0x0a9e('0x39')]?_0x3ca9b9[_0x0a9e('0x37')]:_0x45c109[_0x0a9e('0x36')];_0x3ca9b9[_0x0a9e('0x3b')]=qs['sort'](_0x444f1f[_0x0a9e('0x32')]['sort']);_0x3ca9b9[_0x0a9e('0x3d')]=qs[_0x0a9e('0x34')](_[_0x0a9e('0x75')](_0x444f1f[_0x0a9e('0x32')],_0x45c109['filters']));if(_0x444f1f[_0x0a9e('0x32')][_0x0a9e('0x3e')]){_0x3ca9b9[_0x0a9e('0x3d')]=_['merge'](_0x3ca9b9[_0x0a9e('0x3d')],{'$or':_[_0x0a9e('0x2d')](_0x3ca9b9[_0x0a9e('0x37')],function(_0x22063c){var _0x255e49={};_0x255e49[_0x22063c]={'$like':'%'+_0x444f1f[_0x0a9e('0x32')][_0x0a9e('0x3e')]+'%'};return _0x255e49;})});}_0x3ca9b9=_[_0x0a9e('0x3f')]({},_0x3ca9b9,_0x444f1f['options']);return _0x16e5b9[_0x0a9e('0x72')](_0x3ca9b9);}})[_0x0a9e('0x23')](function(_0x589ff3){if(_0x589ff3){_0x492543=_0x589ff3[_0x0a9e('0x39')];if(!_0x444f1f[_0x0a9e('0x32')][_0x0a9e('0x76')]('nolimit')){_0x3ca9b9[_0x0a9e('0x1d')]=qs['limit'](_0x444f1f[_0x0a9e('0x32')][_0x0a9e('0x1d')]);_0x3ca9b9[_0x0a9e('0x1b')]=qs[_0x0a9e('0x1b')](_0x444f1f[_0x0a9e('0x32')][_0x0a9e('0x1b')]);}return _0x16e5b9[_0x0a9e('0x72')](_0x3ca9b9);}})[_0x0a9e('0x23')](function(_0x501050){if(_0x501050){return _0x501050?{'count':_0x492543,'rows':_0x501050}:null;}})[_0x0a9e('0x23')](respondWithResult(_0x482ca2,null))[_0x0a9e('0x46')](handleError(_0x482ca2,null));}; \ No newline at end of file +var _0xa9e0=['VoicePrefix','includeAll','include','findAll','catch','show','params','find','describe','create','body','get','VoiceExtensionId','user','role','VoicePrefixes','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','from-sip','exten','app','system','description','priority','appdata','NoOp','VoicePrefixId','VoiceExtension','bulkCreate','Extensions\x20creation\x20failed','prefix','push','Set','callerIdAll','PREFIX-CALLERIDALL=','No\x20callerid\x20available','goto','context','${EXTEN:','charAt','sequelize','findById','addAgents','ids','spread','emit','removeAgents','isArray','getAgents','findOne','User','pick','hasOwnProperty','eml-format','rimraf','zip-dir','moment','mustache','util','path','sox','to-csv','fs-extra','lodash','squel','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/license/util','../../mysqldb','redis','defaults','localhost','./voicePrefix.socket','register','status','offset','undefined','limit','count','set','apply','save','update','then','destroy','UserProfileResource','end','sendStatus','error','stack','name','send','index','map','rawAttributes','fieldName','type','key','query','keys','filters','intersection','model','attributes','fields','length','nolimit','order','sort','where','filter','merge','VIRTUAL','options'];(function(_0x432682,_0x253044){var _0x463d05=function(_0xa73403){while(--_0xa73403){_0x432682['push'](_0x432682['shift']());}};_0x463d05(++_0x253044);}(_0xa9e0,0x123));var _0x0a9e=function(_0x34bf97,_0xc60f9d){_0x34bf97=_0x34bf97-0x0;var _0x292719=_0xa9e0[_0x34bf97];return _0x292719;};'use strict';var emlformat=require(_0x0a9e('0x0'));var rimraf=require(_0x0a9e('0x1'));var zipdir=require(_0x0a9e('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x0a9e('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x0a9e('0x4'));var util=require(_0x0a9e('0x5'));var path=require(_0x0a9e('0x6'));var sox=require(_0x0a9e('0x7'));var csv=require(_0x0a9e('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x0a9e('0x9'));var _=require(_0x0a9e('0xa'));var squel=require(_0x0a9e('0xb'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x0a9e('0xc'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x0a9e('0xd'));var Redis=require(_0x0a9e('0xe'));var authService=require(_0x0a9e('0xf'));var qs=require(_0x0a9e('0x10'));var as=require(_0x0a9e('0x11'));var hardwareService=require(_0x0a9e('0x12'));var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x0a9e('0x13'));var db=require(_0x0a9e('0x14'))['db'];config[_0x0a9e('0x15')]=_[_0x0a9e('0x16')](config[_0x0a9e('0x15')],{'host':_0x0a9e('0x17'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x0a9e('0x15')]));require(_0x0a9e('0x18'))[_0x0a9e('0x19')](socket);function respondWithStatusCode(_0x281129,_0x44dcfd){_0x44dcfd=_0x44dcfd||0xcc;return function(_0x4d5611){if(_0x4d5611){return _0x281129['sendStatus'](_0x44dcfd);}return _0x281129[_0x0a9e('0x1a')](_0x44dcfd)['end']();};}function respondWithResult(_0x1985b6,_0x519dfd){_0x519dfd=_0x519dfd||0xc8;return function(_0x16033c){if(_0x16033c){return _0x1985b6[_0x0a9e('0x1a')](_0x519dfd)['json'](_0x16033c);}};}function respondWithFilteredResult(_0x225616,_0x5a0a06){return function(_0x459eb1){if(_0x459eb1){var _0x478723=typeof _0x5a0a06[_0x0a9e('0x1b')]===_0x0a9e('0x1c')&&typeof _0x5a0a06[_0x0a9e('0x1d')]===_0x0a9e('0x1c');var _0x530eb7=_0x459eb1[_0x0a9e('0x1e')];var _0x1314ae=_0x478723?0x0:_0x5a0a06[_0x0a9e('0x1b')];var _0x1c696a=_0x478723?_0x459eb1[_0x0a9e('0x1e')]:_0x5a0a06['offset']+_0x5a0a06[_0x0a9e('0x1d')];var _0x155cce;if(_0x1c696a>=_0x530eb7){_0x1c696a=_0x530eb7;_0x155cce=0xc8;}else{_0x155cce=0xce;}_0x225616['status'](_0x155cce);return _0x225616[_0x0a9e('0x1f')]('Content-Range',_0x1314ae+'-'+_0x1c696a+'/'+_0x530eb7)['json'](_0x459eb1);}return null;};}function patchUpdates(_0x3a02e1){return function(_0x432e56){try{jsonpatch[_0x0a9e('0x20')](_0x432e56,_0x3a02e1,!![]);}catch(_0x30bae6){return BPromise['reject'](_0x30bae6);}return _0x432e56[_0x0a9e('0x21')]();};}function saveUpdates(_0x2fb0e4,_0x3b45bc){return function(_0x4d00e6){if(_0x4d00e6){return _0x4d00e6[_0x0a9e('0x22')](_0x2fb0e4)[_0x0a9e('0x23')](function(_0x16b1ca){return _0x16b1ca;});}return null;};}function removeEntity(_0x5ea472,_0x59181e){return function(_0x197ec0){if(_0x197ec0){return _0x197ec0[_0x0a9e('0x24')]()[_0x0a9e('0x23')](function(){var _0x33161b=_0x197ec0['get']({'plain':!![]});var _0x384319='VoicePrefixes';return db[_0x0a9e('0x25')]['destroy']({'where':{'type':_0x384319,'resourceId':_0x33161b['id']}})[_0x0a9e('0x23')](function(){return _0x197ec0;});})[_0x0a9e('0x23')](function(){_0x5ea472[_0x0a9e('0x1a')](0xcc)[_0x0a9e('0x26')]();});}};}function handleEntityNotFound(_0x140511,_0x1538a4){return function(_0x11c3b6){if(!_0x11c3b6){_0x140511[_0x0a9e('0x27')](0x194);}return _0x11c3b6;};}function handleError(_0x5a101a,_0x3652a7){_0x3652a7=_0x3652a7||0x1f4;return function(_0x468813){logger[_0x0a9e('0x28')](_0x468813[_0x0a9e('0x29')]);if(_0x468813['name']){delete _0x468813[_0x0a9e('0x2a')];}_0x5a101a[_0x0a9e('0x1a')](_0x3652a7)[_0x0a9e('0x2b')](_0x468813);};}exports[_0x0a9e('0x2c')]=function(_0x58b06f,_0x563b45){var _0x296f41={},_0x2e8759={},_0x1dbde2={'count':0x0,'rows':[]};var _0x540530=_[_0x0a9e('0x2d')](db['VoicePrefix'][_0x0a9e('0x2e')],function(_0x3ae878){return{'name':_0x3ae878[_0x0a9e('0x2f')],'type':_0x3ae878[_0x0a9e('0x30')][_0x0a9e('0x31')]};});_0x2e8759['model']=_[_0x0a9e('0x2d')](_0x540530,_0x0a9e('0x2a'));_0x2e8759[_0x0a9e('0x32')]=_[_0x0a9e('0x33')](_0x58b06f[_0x0a9e('0x32')]);_0x2e8759[_0x0a9e('0x34')]=_[_0x0a9e('0x35')](_0x2e8759[_0x0a9e('0x36')],_0x2e8759['query']);_0x296f41[_0x0a9e('0x37')]=_['intersection'](_0x2e8759[_0x0a9e('0x36')],qs[_0x0a9e('0x38')](_0x58b06f[_0x0a9e('0x32')][_0x0a9e('0x38')]));_0x296f41['attributes']=_0x296f41[_0x0a9e('0x37')][_0x0a9e('0x39')]?_0x296f41[_0x0a9e('0x37')]:_0x2e8759[_0x0a9e('0x36')];if(!_0x58b06f['query']['hasOwnProperty'](_0x0a9e('0x3a'))){_0x296f41['limit']=qs[_0x0a9e('0x1d')](_0x58b06f[_0x0a9e('0x32')][_0x0a9e('0x1d')]);_0x296f41[_0x0a9e('0x1b')]=qs['offset'](_0x58b06f[_0x0a9e('0x32')][_0x0a9e('0x1b')]);}_0x296f41[_0x0a9e('0x3b')]=qs['sort'](_0x58b06f[_0x0a9e('0x32')][_0x0a9e('0x3c')]);_0x296f41[_0x0a9e('0x3d')]=qs['filters'](_['pick'](_0x58b06f[_0x0a9e('0x32')],_0x2e8759[_0x0a9e('0x34')]),_0x540530);if(_0x58b06f['query'][_0x0a9e('0x3e')]){_0x296f41[_0x0a9e('0x3d')]=_[_0x0a9e('0x3f')](_0x296f41[_0x0a9e('0x3d')],{'$or':_['map'](_0x540530,function(_0x5a594b){if(_0x5a594b[_0x0a9e('0x30')]!==_0x0a9e('0x40')){var _0x53f3ee={};_0x53f3ee[_0x5a594b[_0x0a9e('0x2a')]]={'$like':'%'+_0x58b06f[_0x0a9e('0x32')][_0x0a9e('0x3e')]+'%'};return _0x53f3ee;}})});}_0x296f41=_['merge']({},_0x296f41,_0x58b06f[_0x0a9e('0x41')]);var _0x2cfea9={'where':_0x296f41[_0x0a9e('0x3d')]};return db[_0x0a9e('0x42')][_0x0a9e('0x1e')](_0x2cfea9)[_0x0a9e('0x23')](function(_0x2881b3){_0x1dbde2[_0x0a9e('0x1e')]=_0x2881b3;if(_0x58b06f[_0x0a9e('0x32')][_0x0a9e('0x43')]){_0x296f41[_0x0a9e('0x44')]=[{'all':!![]}];}return db[_0x0a9e('0x42')][_0x0a9e('0x45')](_0x296f41);})[_0x0a9e('0x23')](function(_0x37f6cc){_0x1dbde2['rows']=_0x37f6cc;return _0x1dbde2;})['then'](respondWithFilteredResult(_0x563b45,_0x296f41))[_0x0a9e('0x46')](handleError(_0x563b45,null));};exports[_0x0a9e('0x47')]=function(_0x405c8f,_0x315881){var _0x1a69dd={'raw':![],'where':{'id':_0x405c8f[_0x0a9e('0x48')]['id']}},_0xc9a702={};_0xc9a702[_0x0a9e('0x36')]=_[_0x0a9e('0x33')](db[_0x0a9e('0x42')][_0x0a9e('0x2e')]);_0xc9a702[_0x0a9e('0x32')]=_['keys'](_0x405c8f[_0x0a9e('0x32')]);_0xc9a702[_0x0a9e('0x34')]=_[_0x0a9e('0x35')](_0xc9a702[_0x0a9e('0x36')],_0xc9a702[_0x0a9e('0x32')]);_0x1a69dd[_0x0a9e('0x37')]=_[_0x0a9e('0x35')](_0xc9a702[_0x0a9e('0x36')],qs['fields'](_0x405c8f[_0x0a9e('0x32')]['fields']));_0x1a69dd[_0x0a9e('0x37')]=_0x1a69dd[_0x0a9e('0x37')][_0x0a9e('0x39')]?_0x1a69dd['attributes']:_0xc9a702[_0x0a9e('0x36')];if(_0x405c8f[_0x0a9e('0x32')][_0x0a9e('0x43')]){_0x1a69dd[_0x0a9e('0x44')]=[{'all':!![]}];}_0x1a69dd=_[_0x0a9e('0x3f')]({},_0x1a69dd,_0x405c8f[_0x0a9e('0x41')]);return db[_0x0a9e('0x42')]['find'](_0x1a69dd)[_0x0a9e('0x23')](handleEntityNotFound(_0x315881,null))[_0x0a9e('0x23')](respondWithResult(_0x315881,null))[_0x0a9e('0x46')](handleError(_0x315881,null));};exports[_0x0a9e('0x24')]=function(_0x409789,_0x992c77){return db[_0x0a9e('0x42')][_0x0a9e('0x49')]({'where':{'id':_0x409789[_0x0a9e('0x48')]['id']}})['then'](handleEntityNotFound(_0x992c77,null))[_0x0a9e('0x23')](removeEntity(_0x992c77,null))[_0x0a9e('0x46')](handleError(_0x992c77,null));};exports['describe']=function(_0x4ae14b,_0x5ddf84){return db[_0x0a9e('0x42')][_0x0a9e('0x4a')]()[_0x0a9e('0x23')](respondWithResult(_0x5ddf84,null))[_0x0a9e('0x46')](handleError(_0x5ddf84,null));};exports[_0x0a9e('0x4b')]=function(_0x30decb,_0x2e5165){var _0x375c18;return db['sequelize']['transaction'](function(_0x53975a){return db[_0x0a9e('0x42')][_0x0a9e('0x4b')](_0x30decb[_0x0a9e('0x4c')],{'transaction':_0x53975a})['then'](function(_0x2b69d9){_0x375c18=_0x2b69d9[_0x0a9e('0x4d')]({'plain':!![]});return db['VoiceExtension']['find']({'where':{'id':_0x375c18[_0x0a9e('0x4e')]},'raw':!![]})['then'](function(_0x443e72){return createVoicePrefixExtensions(_0x375c18,_0x443e72,_0x53975a);});});})['then'](function(){var _0x2e5e62=_0x30decb[_0x0a9e('0x4f')][_0x0a9e('0x4d')]({'plain':!![]});if(!_0x2e5e62)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x2e5e62[_0x0a9e('0x50')]===_0x0a9e('0x4f')){var _0x508b47=_0x375c18;return db['UserProfileSection'][_0x0a9e('0x49')]({'where':{'name':_0x0a9e('0x51'),'userProfileId':_0x2e5e62['userProfileId']},'raw':!![]})[_0x0a9e('0x23')](function(_0x5ce9ac){if(_0x5ce9ac&&_0x5ce9ac[_0x0a9e('0x52')]===0x0){return db['UserProfileResource'][_0x0a9e('0x4b')]({'name':_0x508b47['name'],'resourceId':_0x508b47['id'],'type':_0x5ce9ac['name'],'sectionId':_0x5ce9ac['id']},{})['then'](function(){return _0x375c18;});}else{return _0x375c18;}})[_0x0a9e('0x46')](function(_0x47de4c){logger[_0x0a9e('0x28')](_0x0a9e('0x53'),_0x47de4c);throw _0x47de4c;});}return _0x375c18;})[_0x0a9e('0x23')](respondWithResult(_0x2e5165,null))[_0x0a9e('0x46')](handleError(_0x2e5165,null));};function Extension(_0x232830,_0x272738,_0xd10662,_0x28d814){this['context']=_0x0a9e('0x54');this[_0x0a9e('0x55')]=_0x232830;this[_0x0a9e('0x56')]=_0xd10662;this[_0x0a9e('0x30')]=_0x0a9e('0x57');this[_0x0a9e('0x58')]='Voice\x20Prefix\x20Extension';this[_0x0a9e('0x59')]=_0x272738;this[_0x0a9e('0x5a')]=_0x28d814;}function createVoicePrefixExtensions(_0x5239ef,_0x3649cc,_0x5cc8fb){return new BPromise(function(_0x20c668,_0x5ba1f9){var _0x4b3c1a=new Extension(formatPrefixName(_0x5239ef['prefix']),0x1,_0x0a9e('0x5b'),'Voice\x20Prefix');_0x4b3c1a[_0x0a9e('0x5c')]=_0x5239ef['id'];return db[_0x0a9e('0x5d')][_0x0a9e('0x4b')](_0x4b3c1a,{'transaction':_0x5cc8fb})[_0x0a9e('0x23')](function(_0x1cca9f){var _0x26d7db=_0x1cca9f['get']({'plain':!![]});var _0x1627a7=_['map'](addVoicePrefixExtensions(_0x5239ef,_0x3649cc),function(_0xca4ade){_0xca4ade[_0x0a9e('0x4e')]=_0x26d7db['id'];_0xca4ade[_0x0a9e('0x5c')]=_0x5239ef['id'];return _0xca4ade;});return db['VoiceExtension'][_0x0a9e('0x5e')](_0x1627a7,{'transaction':_0x5cc8fb})[_0x0a9e('0x23')](function(_0x119677){if(!_0x119677){return _0x5ba1f9(_0x0a9e('0x5f'));}else{return _0x20c668(_0x119677);}})['catch'](function(_0x1d0dc8){return _0x5ba1f9(_0x1d0dc8);});});;});};function addVoicePrefixExtensions(_0xe05a5a,_0x54327c){var _0x797b45=[];var _0x17e88c=formatPrefixName(_0xe05a5a[_0x0a9e('0x60')]);_0x797b45[_0x0a9e('0x61')](new Extension(_0x17e88c,0x2,_0x0a9e('0x62'),'CDR(prefix)='+_0xe05a5a[_0x0a9e('0x2a')]));if(_0xe05a5a[_0x0a9e('0x63')]){_0x797b45[_0x0a9e('0x61')](new Extension(_0x17e88c,0x3,'Set',_0x0a9e('0x64')+_0xe05a5a['callerIdAll']));}else{_0x797b45['push'](new Extension(_0x17e88c,0x3,_0x0a9e('0x5b'),_0x0a9e('0x65')));}_0x797b45[_0x0a9e('0x61')](new Extension(_0x17e88c,0x4,_0x0a9e('0x66'),_0x54327c[_0x0a9e('0x67')]+','+_0x0a9e('0x68')+(0x8+_0xe05a5a[_0x0a9e('0x2a')][_0x0a9e('0x39')])+'}'+','+0x1));return _0x797b45;}function formatPrefixName(_0x2d7205){var _0x1cc4f3='_';for(var _0x2e89b7=0x0;_0x2e89b7<_0x2d7205[_0x0a9e('0x39')];_0x2e89b7++){if(_0x2d7205[_0x0a9e('0x69')](_0x2e89b7)=='-'){_0x1cc4f3+=_0x2d7205[_0x0a9e('0x69')](_0x2e89b7);}else{_0x1cc4f3+='['+_0x2d7205[_0x0a9e('0x69')](_0x2e89b7)+']';}}_0x1cc4f3+='.';return _0x1cc4f3;}exports[_0x0a9e('0x22')]=function(_0x2a28c0,_0x4257c9,_0x5150a4){var _0x1b0b98=_0x2a28c0[_0x0a9e('0x4c')];_0x1b0b98[_0x0a9e('0x60')]='system-'+_0x1b0b98[_0x0a9e('0x2a')]+'-';return db[_0x0a9e('0x6a')]['transaction'](function(_0x83f0b2){return db[_0x0a9e('0x42')][_0x0a9e('0x22')](_0x1b0b98,{'where':{'id':_0x1b0b98['id']},'transaction':_0x83f0b2})[_0x0a9e('0x23')](function(){return db[_0x0a9e('0x5d')]['destroy']({'where':{'VoicePrefixId':_0x1b0b98['id']},'transaction':_0x83f0b2})['then'](function(){return db['VoiceExtension'][_0x0a9e('0x49')]({'where':{'id':_0x1b0b98[_0x0a9e('0x4e')]},'raw':!![]})[_0x0a9e('0x23')](function(_0x23a7d3){return createVoicePrefixExtensions(_0x1b0b98,_0x23a7d3,_0x83f0b2);});});});})[_0x0a9e('0x23')](function(){return db[_0x0a9e('0x42')][_0x0a9e('0x6b')](_0x1b0b98['id']);})[_0x0a9e('0x23')](respondWithResult(_0x4257c9,null))['catch'](handleError(_0x4257c9,null));};exports[_0x0a9e('0x6c')]=function(_0xcbc8b2,_0x12ccdb,_0x4a4fc7){return db[_0x0a9e('0x42')]['find']({'where':{'id':_0xcbc8b2[_0x0a9e('0x48')]['id']}})[_0x0a9e('0x23')](handleEntityNotFound(_0x12ccdb,null))['then'](function(_0x2ed01e){if(_0x2ed01e){return _0x2ed01e[_0x0a9e('0x6c')](_0xcbc8b2[_0x0a9e('0x4c')][_0x0a9e('0x6d')],_['omit'](_0xcbc8b2[_0x0a9e('0x4c')],[_0x0a9e('0x6d'),'id'])||{})[_0x0a9e('0x6e')](function(_0x278ab4){for(var _0x5b7fc3=0x0;_0x5b7fc3<_0xcbc8b2[_0x0a9e('0x4c')][_0x0a9e('0x6d')][_0x0a9e('0x39')];_0x5b7fc3+=0x1){socket[_0x0a9e('0x6f')]('userVoicePrefix:save',{'UserId':_0xcbc8b2[_0x0a9e('0x4c')][_0x0a9e('0x6d')][_0x5b7fc3],'VoicePrefixId':_0xcbc8b2[_0x0a9e('0x48')]['id']});}return _0x278ab4;});}})[_0x0a9e('0x23')](respondWithResult(_0x12ccdb,null))[_0x0a9e('0x46')](handleError(_0x12ccdb,null));};exports[_0x0a9e('0x70')]=function(_0x40fc56,_0x3df0e3,_0x1a7b03){return db[_0x0a9e('0x42')][_0x0a9e('0x49')]({'where':{'id':_0x40fc56[_0x0a9e('0x48')]['id']}})[_0x0a9e('0x23')](handleEntityNotFound(_0x3df0e3,null))[_0x0a9e('0x23')](function(_0x5b35db){if(_0x5b35db){return _0x5b35db[_0x0a9e('0x70')](_0x40fc56[_0x0a9e('0x32')][_0x0a9e('0x6d')])['then'](function(){if(_[_0x0a9e('0x71')](_0x40fc56[_0x0a9e('0x32')][_0x0a9e('0x6d')])){for(var _0x2b9463=0x0;_0x2b9463<_0x40fc56['query']['ids'][_0x0a9e('0x39')];_0x2b9463+=0x1){socket[_0x0a9e('0x6f')]('userVoicePrefix:remove',{'UserId':Number(_0x40fc56[_0x0a9e('0x32')]['ids'][_0x2b9463]),'VoicePrefixId':Number(_0x40fc56[_0x0a9e('0x48')]['id'])});}}else{socket[_0x0a9e('0x6f')]('userVoicePrefix:remove',{'UserId':Number(_0x40fc56[_0x0a9e('0x32')][_0x0a9e('0x6d')]),'VoicePrefixId':Number(_0x40fc56[_0x0a9e('0x48')]['id'])});}});}})[_0x0a9e('0x23')](respondWithStatusCode(_0x3df0e3,null))[_0x0a9e('0x46')](handleError(_0x3df0e3,null));};exports[_0x0a9e('0x72')]=function(_0x444f1f,_0x482ca2,_0x2973d3){var _0x3ca9b9={};var _0x45c109={};var _0x16e5b9;var _0x492543;return db[_0x0a9e('0x42')][_0x0a9e('0x73')]({'where':{'id':_0x444f1f['params']['id']}})[_0x0a9e('0x23')](handleEntityNotFound(_0x482ca2,null))['then'](function(_0x163710){if(_0x163710){_0x16e5b9=_0x163710;_0x45c109[_0x0a9e('0x36')]=_[_0x0a9e('0x33')](db[_0x0a9e('0x74')]['rawAttributes']);_0x45c109['query']=_[_0x0a9e('0x33')](_0x444f1f[_0x0a9e('0x32')]);_0x45c109[_0x0a9e('0x34')]=_['intersection'](_0x45c109[_0x0a9e('0x36')],_0x45c109[_0x0a9e('0x32')]);_0x3ca9b9['attributes']=_['intersection'](_0x45c109[_0x0a9e('0x36')],qs['fields'](_0x444f1f['query']['fields']));_0x3ca9b9[_0x0a9e('0x37')]=_0x3ca9b9[_0x0a9e('0x37')][_0x0a9e('0x39')]?_0x3ca9b9[_0x0a9e('0x37')]:_0x45c109[_0x0a9e('0x36')];_0x3ca9b9[_0x0a9e('0x3b')]=qs['sort'](_0x444f1f[_0x0a9e('0x32')]['sort']);_0x3ca9b9[_0x0a9e('0x3d')]=qs[_0x0a9e('0x34')](_[_0x0a9e('0x75')](_0x444f1f[_0x0a9e('0x32')],_0x45c109['filters']));if(_0x444f1f[_0x0a9e('0x32')][_0x0a9e('0x3e')]){_0x3ca9b9[_0x0a9e('0x3d')]=_['merge'](_0x3ca9b9[_0x0a9e('0x3d')],{'$or':_[_0x0a9e('0x2d')](_0x3ca9b9[_0x0a9e('0x37')],function(_0x22063c){var _0x255e49={};_0x255e49[_0x22063c]={'$like':'%'+_0x444f1f[_0x0a9e('0x32')][_0x0a9e('0x3e')]+'%'};return _0x255e49;})});}_0x3ca9b9=_[_0x0a9e('0x3f')]({},_0x3ca9b9,_0x444f1f['options']);return _0x16e5b9[_0x0a9e('0x72')](_0x3ca9b9);}})[_0x0a9e('0x23')](function(_0x589ff3){if(_0x589ff3){_0x492543=_0x589ff3[_0x0a9e('0x39')];if(!_0x444f1f[_0x0a9e('0x32')][_0x0a9e('0x76')]('nolimit')){_0x3ca9b9[_0x0a9e('0x1d')]=qs['limit'](_0x444f1f[_0x0a9e('0x32')][_0x0a9e('0x1d')]);_0x3ca9b9[_0x0a9e('0x1b')]=qs[_0x0a9e('0x1b')](_0x444f1f[_0x0a9e('0x32')][_0x0a9e('0x1b')]);}return _0x16e5b9[_0x0a9e('0x72')](_0x3ca9b9);}})[_0x0a9e('0x23')](function(_0x501050){if(_0x501050){return _0x501050?{'count':_0x492543,'rows':_0x501050}:null;}})[_0x0a9e('0x23')](respondWithResult(_0x482ca2,null))[_0x0a9e('0x46')](handleError(_0x482ca2,null));}; \ No newline at end of file diff --git a/server/api/voicePrefix/voicePrefix.events.js b/server/api/voicePrefix/voicePrefix.events.js index 4655738..416d87d 100644 --- a/server/api/voicePrefix/voicePrefix.events.js +++ b/server/api/voicePrefix/voicePrefix.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe1c5=['setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','exports','../../mysqldb','VoicePrefix'];(function(_0x3cc376,_0x476cdc){var _0xdf7d53=function(_0x22af08){while(--_0x22af08){_0x3cc376['push'](_0x3cc376['shift']());}};_0xdf7d53(++_0x476cdc);}(_0xe1c5,0x1f2));var _0x5e1c=function(_0x1a7f4c,_0x14a3a2){_0x1a7f4c=_0x1a7f4c-0x0;var _0x48e124=_0xe1c5[_0x1a7f4c];return _0x48e124;};'use strict';var EventEmitter=require('events');var VoicePrefix=require(_0x5e1c('0x0'))['db'][_0x5e1c('0x1')];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents[_0x5e1c('0x2')](0x0);var events={'afterCreate':_0x5e1c('0x3'),'afterUpdate':_0x5e1c('0x4'),'afterDestroy':_0x5e1c('0x5')};function emitEvent(_0x20a6f6){return function(_0x2fcde7,_0x23d1bf,_0x188f77){VoicePrefixEvents['emit'](_0x20a6f6+':'+_0x2fcde7['id'],_0x2fcde7);VoicePrefixEvents[_0x5e1c('0x6')](_0x20a6f6,_0x2fcde7);_0x188f77(null);};}for(var e in events){if(events[_0x5e1c('0x7')](e)){var event=events[e];VoicePrefix[_0x5e1c('0x8')](e,emitEvent(event));}}module[_0x5e1c('0x9')]=VoicePrefixEvents; \ No newline at end of file +var _0xa501=['update','remove','emit','hook','exports','../../mysqldb','save'];(function(_0x46420e,_0x409e97){var _0x2eba48=function(_0x2078aa){while(--_0x2078aa){_0x46420e['push'](_0x46420e['shift']());}};_0x2eba48(++_0x409e97);}(_0xa501,0x194));var _0x1a50=function(_0x43e197,_0x31384f){_0x43e197=_0x43e197-0x0;var _0x35fdd2=_0xa501[_0x43e197];return _0x35fdd2;};'use strict';var EventEmitter=require('events');var VoicePrefix=require(_0x1a50('0x0'))['db']['VoicePrefix'];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x1a50('0x1'),'afterUpdate':_0x1a50('0x2'),'afterDestroy':_0x1a50('0x3')};function emitEvent(_0x7b0828){return function(_0x5d595a,_0xed67c,_0x50922c){VoicePrefixEvents[_0x1a50('0x4')](_0x7b0828+':'+_0x5d595a['id'],_0x5d595a);VoicePrefixEvents[_0x1a50('0x4')](_0x7b0828,_0x5d595a);_0x50922c(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoicePrefix[_0x1a50('0x5')](e,emitEvent(event));}}module[_0x1a50('0x6')]=VoicePrefixEvents; \ No newline at end of file diff --git a/server/api/voicePrefix/voicePrefix.model.js b/server/api/voicePrefix/voicePrefix.model.js index a865338..30b798b 100644 --- a/server/api/voicePrefix/voicePrefix.model.js +++ b/server/api/voicePrefix/voicePrefix.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6e1b=['moment','bluebird','path','rimraf','define','VoicePrefix','voice_prefixes','util','../../config/logger','api'];(function(_0x3740fe,_0x6c543c){var _0x55492b=function(_0x1f851f){while(--_0x1f851f){_0x3740fe['push'](_0x3740fe['shift']());}};_0x55492b(++_0x6c543c);}(_0x6e1b,0x197));var _0xb6e1=function(_0x37d5cf,_0x2fef1a){_0x37d5cf=_0x37d5cf-0x0;var _0x283e2e=_0x6e1b[_0x37d5cf];return _0x283e2e;};'use strict';var _=require('lodash');var util=require(_0xb6e1('0x0'));var logger=require(_0xb6e1('0x1'))(_0xb6e1('0x2'));var moment=require(_0xb6e1('0x3'));var BPromise=require(_0xb6e1('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xb6e1('0x5'));var rimraf=require(_0xb6e1('0x6'));var config=require('../../config/environment');var attributes=require('./voicePrefix.attributes');module['exports']=function(_0x498d5d,_0x24c2e0){return _0x498d5d[_0xb6e1('0x7')](_0xb6e1('0x8'),attributes,{'tableName':_0xb6e1('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x396c=['../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','exports','define','VoicePrefix','lodash','util'];(function(_0x2d777a,_0x448d1d){var _0xc7e897=function(_0x15f847){while(--_0x15f847){_0x2d777a['push'](_0x2d777a['shift']());}};_0xc7e897(++_0x448d1d);}(_0x396c,0xdb));var _0xc396=function(_0x408835,_0x5cb3ad){_0x408835=_0x408835-0x0;var _0x130c5c=_0x396c[_0x408835];return _0x130c5c;};'use strict';var _=require(_0xc396('0x0'));var util=require(_0xc396('0x1'));var logger=require(_0xc396('0x2'))(_0xc396('0x3'));var moment=require(_0xc396('0x4'));var BPromise=require(_0xc396('0x5'));var rp=require(_0xc396('0x6'));var fs=require('fs');var path=require(_0xc396('0x7'));var rimraf=require(_0xc396('0x8'));var config=require(_0xc396('0x9'));var attributes=require('./voicePrefix.attributes');module[_0xc396('0xa')]=function(_0xe8c48d,_0x526564){return _0xe8c48d[_0xc396('0xb')](_0xc396('0xc'),attributes,{'tableName':'voice_prefixes','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/voicePrefix/voicePrefix.rpc.js b/server/api/voicePrefix/voicePrefix.rpc.js index 9a44814..6b19f67 100644 --- a/server/api/voicePrefix/voicePrefix.rpc.js +++ b/server/api/voicePrefix/voicePrefix.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7382=['request\x20sent','debug','VoicePrefix,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','util','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','redis','defaults','localhost','socket.io-emitter','register','request','info','VoicePrefix,\x20%s,\x20%s'];(function(_0xd9cc4c,_0x1619b4){var _0x3d2542=function(_0x48f7ea){while(--_0x48f7ea){_0xd9cc4c['push'](_0xd9cc4c['shift']());}};_0x3d2542(++_0x1619b4);}(_0x7382,0x111));var _0x2738=function(_0x340476,_0x6cf867){_0x340476=_0x340476-0x0;var _0x278a2a=_0x7382[_0x340476];return _0x278a2a;};'use strict';var _=require('lodash');var util=require(_0x2738('0x0'));var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x2738('0x1'));var logger=require(_0x2738('0x2'))(_0x2738('0x3'));var config=require(_0x2738('0x4'));var jayson=require(_0x2738('0x5'));var client=jayson['client'][_0x2738('0x6')]({'port':0x232a});config[_0x2738('0x7')]=_[_0x2738('0x8')](config['redis'],{'host':_0x2738('0x9'),'port':0x18eb});var socket=require(_0x2738('0xa'))(new Redis(config[_0x2738('0x7')]));require('./voicePrefix.socket')[_0x2738('0xb')](socket);function respondWithRpcPromise(_0x6dd007,_0x367172,_0x4ecd10){return new BPromise(function(_0x3839ba,_0x33d02a){return client[_0x2738('0xc')](_0x6dd007,_0x4ecd10)['then'](function(_0x4a51ff){logger[_0x2738('0xd')](_0x2738('0xe'),_0x367172,_0x2738('0xf'));logger[_0x2738('0x10')](_0x2738('0x11'),_0x367172,_0x2738('0xf'),JSON[_0x2738('0x12')](_0x4a51ff));if(_0x4a51ff[_0x2738('0x13')]){if(_0x4a51ff[_0x2738('0x13')][_0x2738('0x14')]===0x1f4){logger[_0x2738('0x13')]('VoicePrefix,\x20%s,\x20%s',_0x367172,_0x4a51ff[_0x2738('0x13')][_0x2738('0x15')]);return _0x33d02a(_0x4a51ff['error'][_0x2738('0x15')]);}logger['error'](_0x2738('0xe'),_0x367172,_0x4a51ff['error'][_0x2738('0x15')]);return _0x3839ba(_0x4a51ff['error'][_0x2738('0x15')]);}else{logger[_0x2738('0xd')](_0x2738('0xe'),_0x367172,_0x2738('0xf'));_0x3839ba(_0x4a51ff[_0x2738('0x16')][_0x2738('0x15')]);}})[_0x2738('0x17')](function(_0x26049a){logger['error'](_0x2738('0xe'),_0x367172,_0x26049a);_0x33d02a(_0x26049a);});});} \ No newline at end of file +var _0x7d14=['catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','redis','socket.io-emitter','./voicePrefix.socket','register','request','then','info','request\x20sent','debug','VoicePrefix,\x20%s,\x20%s,\x20%s','stringify','error','code','VoicePrefix,\x20%s,\x20%s','message'];(function(_0x555ebb,_0x4b1b68){var _0x3c0a4a=function(_0x312e2f){while(--_0x312e2f){_0x555ebb['push'](_0x555ebb['shift']());}};_0x3c0a4a(++_0x4b1b68);}(_0x7d14,0x6d));var _0x47d1=function(_0x5f30b7,_0x207758){_0x5f30b7=_0x5f30b7-0x0;var _0x425cb2=_0x7d14[_0x5f30b7];return _0x425cb2;};'use strict';var _=require(_0x47d1('0x0'));var util=require(_0x47d1('0x1'));var moment=require('moment');var BPromise=require(_0x47d1('0x2'));var rs=require(_0x47d1('0x3'));var fs=require('fs');var Redis=require(_0x47d1('0x4'));var db=require(_0x47d1('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x47d1('0x6'))(_0x47d1('0x7'));var config=require(_0x47d1('0x8'));var jayson=require(_0x47d1('0x9'));var client=jayson[_0x47d1('0xa')]['http']({'port':0x232a});config['redis']=_['defaults'](config[_0x47d1('0xb')],{'host':'localhost','port':0x18eb});var socket=require(_0x47d1('0xc'))(new Redis(config[_0x47d1('0xb')]));require(_0x47d1('0xd'))[_0x47d1('0xe')](socket);function respondWithRpcPromise(_0x3ced5c,_0x46f06d,_0x15ce33){return new BPromise(function(_0x198c7c,_0x37f6dd){return client[_0x47d1('0xf')](_0x3ced5c,_0x15ce33)[_0x47d1('0x10')](function(_0x2f7ab9){logger[_0x47d1('0x11')]('VoicePrefix,\x20%s,\x20%s',_0x46f06d,_0x47d1('0x12'));logger[_0x47d1('0x13')](_0x47d1('0x14'),_0x46f06d,_0x47d1('0x12'),JSON[_0x47d1('0x15')](_0x2f7ab9));if(_0x2f7ab9[_0x47d1('0x16')]){if(_0x2f7ab9[_0x47d1('0x16')][_0x47d1('0x17')]===0x1f4){logger[_0x47d1('0x16')](_0x47d1('0x18'),_0x46f06d,_0x2f7ab9[_0x47d1('0x16')][_0x47d1('0x19')]);return _0x37f6dd(_0x2f7ab9[_0x47d1('0x16')][_0x47d1('0x19')]);}logger[_0x47d1('0x16')](_0x47d1('0x18'),_0x46f06d,_0x2f7ab9['error']['message']);return _0x198c7c(_0x2f7ab9[_0x47d1('0x16')][_0x47d1('0x19')]);}else{logger['info'](_0x47d1('0x18'),_0x46f06d,'request\x20sent');_0x198c7c(_0x2f7ab9['result'][_0x47d1('0x19')]);}})[_0x47d1('0x1a')](function(_0x1bf004){logger[_0x47d1('0x16')]('VoicePrefix,\x20%s,\x20%s',_0x46f06d,_0x1bf004);_0x37f6dd(_0x1bf004);});});} \ No newline at end of file diff --git a/server/api/voicePrefix/voicePrefix.socket.js b/server/api/voicePrefix/voicePrefix.socket.js index 5e75b23..e0b3c2f 100644 --- a/server/api/voicePrefix/voicePrefix.socket.js +++ b/server/api/voicePrefix/voicePrefix.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc2e8=['emit','removeListener','register','voicePrefix:','./voicePrefix.events','save'];(function(_0x2c3faa,_0x4515f0){var _0xb729bc=function(_0x9b4834){while(--_0x9b4834){_0x2c3faa['push'](_0x2c3faa['shift']());}};_0xb729bc(++_0x4515f0);}(_0xc2e8,0x70));var _0x8c2e=function(_0x547cbe,_0x334521){_0x547cbe=_0x547cbe-0x0;var _0x4f3222=_0xc2e8[_0x547cbe];return _0x4f3222;};'use strict';var VoicePrefixEvents=require(_0x8c2e('0x0'));var events=[_0x8c2e('0x1'),'remove','update'];function createListener(_0xc6e001,_0x4df201){return function(_0x8e4f3e){_0x4df201[_0x8c2e('0x2')](_0xc6e001,_0x8e4f3e);};}function removeListener(_0x39060a,_0x52b6a0){return function(){VoicePrefixEvents[_0x8c2e('0x3')](_0x39060a,_0x52b6a0);};}exports[_0x8c2e('0x4')]=function(_0x2b784d){for(var _0x4d1434=0x0,_0x4bf5d0=events['length'];_0x4d1434<_0x4bf5d0;_0x4d1434++){var _0x487731=events[_0x4d1434];var _0x4abd39=createListener(_0x8c2e('0x5')+_0x487731,_0x2b784d);VoicePrefixEvents['on'](_0x487731,_0x4abd39);}}; \ No newline at end of file +var _0x803f=['length','voicePrefix:','./voicePrefix.events','remove','update','emit','register'];(function(_0x915de9,_0xabf9e5){var _0x274129=function(_0x27fd79){while(--_0x27fd79){_0x915de9['push'](_0x915de9['shift']());}};_0x274129(++_0xabf9e5);}(_0x803f,0x64));var _0xf803=function(_0x39cb9b,_0x391796){_0x39cb9b=_0x39cb9b-0x0;var _0x3593be=_0x803f[_0x39cb9b];return _0x3593be;};'use strict';var VoicePrefixEvents=require(_0xf803('0x0'));var events=['save',_0xf803('0x1'),_0xf803('0x2')];function createListener(_0x4ce875,_0x1a8691){return function(_0x43fb3b){_0x1a8691[_0xf803('0x3')](_0x4ce875,_0x43fb3b);};}function removeListener(_0x6baafe,_0x5c2cd6){return function(){VoicePrefixEvents['removeListener'](_0x6baafe,_0x5c2cd6);};}exports[_0xf803('0x4')]=function(_0x2ba12f){for(var _0x1d3a79=0x0,_0x584b2d=events[_0xf803('0x5')];_0x1d3a79<_0x584b2d;_0x1d3a79++){var _0x47128f=events[_0x1d3a79];var _0x587319=createListener(_0xf803('0x6')+_0x47128f,_0x2ba12f);VoicePrefixEvents['on'](_0x47128f,_0x587319);}}; \ No newline at end of file diff --git a/server/api/voiceQueue/index.js b/server/api/voiceQueue/index.js index 3fd6de4..46424e7 100644 --- a/server/api/voiceQueue/index.js +++ b/server/api/voiceQueue/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa966=['show','getHoppers','isAuthenticated','getHopperHistories','/:id/hopper_finals','getHopperFinals','/:id/teams','getTeams','/:id/users','getAgents','/:id/members','getMembers','getLists','/:id/blacklists','getBlackLists','post','create','/:id/clone','clone','addTeams','/:id/lists','addLists','addBlackLists','put','update','delete','destroy','removeAgents','removeLists','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../config/environment','get','index','/:id'];(function(_0x1976b0,_0x51812d){var _0x137f06=function(_0x27c420){while(--_0x27c420){_0x1976b0['push'](_0x1976b0['shift']());}};_0x137f06(++_0x51812d);}(_0xa966,0xc2));var _0x6a96=function(_0x5283d7,_0x16ed6c){_0x5283d7=_0x5283d7-0x0;var _0x35618f=_0xa966[_0x5283d7];return _0x35618f;};'use strict';var multer=require(_0x6a96('0x0'));var util=require(_0x6a96('0x1'));var path=require(_0x6a96('0x2'));var timeout=require('connect-timeout');var express=require(_0x6a96('0x3'));var router=express[_0x6a96('0x4')]();var fs_extra=require(_0x6a96('0x5'));var auth=require(_0x6a96('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x6a96('0x7'));var controller=require('./voiceQueue.controller');router[_0x6a96('0x8')]('/',auth['isAuthenticated'](),controller[_0x6a96('0x9')]);router[_0x6a96('0x8')](_0x6a96('0xa'),auth['isAuthenticated'](),controller[_0x6a96('0xb')]);router[_0x6a96('0x8')]('/:id/hoppers',auth['isAuthenticated'](),controller[_0x6a96('0xc')]);router[_0x6a96('0x8')]('/:id/hopper_histories',auth[_0x6a96('0xd')](),controller[_0x6a96('0xe')]);router[_0x6a96('0x8')](_0x6a96('0xf'),auth[_0x6a96('0xd')](),controller[_0x6a96('0x10')]);router[_0x6a96('0x8')]('/:id/hopper_black',auth[_0x6a96('0xd')](),controller['getHopperBlacks']);router[_0x6a96('0x8')](_0x6a96('0x11'),auth[_0x6a96('0xd')](),controller[_0x6a96('0x12')]);router[_0x6a96('0x8')](_0x6a96('0x13'),auth[_0x6a96('0xd')](),controller[_0x6a96('0x14')]);router['get'](_0x6a96('0x15'),auth[_0x6a96('0xd')](),controller[_0x6a96('0x16')]);router[_0x6a96('0x8')]('/:id/lists',auth[_0x6a96('0xd')](),controller[_0x6a96('0x17')]);router[_0x6a96('0x8')](_0x6a96('0x18'),auth[_0x6a96('0xd')](),controller[_0x6a96('0x19')]);router[_0x6a96('0x1a')]('/',auth[_0x6a96('0xd')](),controller[_0x6a96('0x1b')]);router[_0x6a96('0x1a')](_0x6a96('0x1c'),auth['isAuthenticated'](),controller[_0x6a96('0x1d')]);router[_0x6a96('0x1a')](_0x6a96('0x11'),auth[_0x6a96('0xd')](),controller[_0x6a96('0x1e')]);router[_0x6a96('0x1a')](_0x6a96('0x13'),auth[_0x6a96('0xd')](),controller['addAgents']);router[_0x6a96('0x1a')](_0x6a96('0x1f'),auth[_0x6a96('0xd')](),controller[_0x6a96('0x20')]);router[_0x6a96('0x1a')](_0x6a96('0x18'),auth['isAuthenticated'](),controller[_0x6a96('0x21')]);router[_0x6a96('0x22')](_0x6a96('0xa'),auth[_0x6a96('0xd')](),controller[_0x6a96('0x23')]);router[_0x6a96('0x24')](_0x6a96('0xa'),auth[_0x6a96('0xd')](),controller[_0x6a96('0x25')]);router['delete']('/:id/teams',auth['isAuthenticated'](),controller['removeTeams']);router[_0x6a96('0x24')]('/:id/users',auth[_0x6a96('0xd')](),controller[_0x6a96('0x26')]);router['delete'](_0x6a96('0x1f'),auth[_0x6a96('0xd')](),controller[_0x6a96('0x27')]);router[_0x6a96('0x24')](_0x6a96('0x18'),auth[_0x6a96('0xd')](),controller['removeBlackLists']);module[_0x6a96('0x28')]=router; \ No newline at end of file +var _0x8f94=['getMembers','/:id/lists','getLists','/:id/blacklists','create','post','/:id/clone','clone','addAgents','addLists','addBlackLists','put','/:id','update','destroy','delete','removeTeams','removeLists','removeBlackLists','exports','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../config/environment','get','index','isAuthenticated','show','/:id/hoppers','getHopperHistories','getHopperFinals','/:id/hopper_black','getHopperBlacks','/:id/teams','/:id/users'];(function(_0x4a0ecd,_0x561f85){var _0x4ba121=function(_0x3ef764){while(--_0x3ef764){_0x4a0ecd['push'](_0x4a0ecd['shift']());}};_0x4ba121(++_0x561f85);}(_0x8f94,0xd7));var _0x48f9=function(_0x6131cd,_0x4c26a1){_0x6131cd=_0x6131cd-0x0;var _0x47e916=_0x8f94[_0x6131cd];return _0x47e916;};'use strict';var multer=require(_0x48f9('0x0'));var util=require(_0x48f9('0x1'));var path=require(_0x48f9('0x2'));var timeout=require(_0x48f9('0x3'));var express=require(_0x48f9('0x4'));var router=express['Router']();var fs_extra=require(_0x48f9('0x5'));var auth=require(_0x48f9('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x48f9('0x7'));var controller=require('./voiceQueue.controller');router[_0x48f9('0x8')]('/',auth['isAuthenticated'](),controller[_0x48f9('0x9')]);router[_0x48f9('0x8')]('/:id',auth[_0x48f9('0xa')](),controller[_0x48f9('0xb')]);router[_0x48f9('0x8')](_0x48f9('0xc'),auth[_0x48f9('0xa')](),controller['getHoppers']);router[_0x48f9('0x8')]('/:id/hopper_histories',auth[_0x48f9('0xa')](),controller[_0x48f9('0xd')]);router[_0x48f9('0x8')]('/:id/hopper_finals',auth[_0x48f9('0xa')](),controller[_0x48f9('0xe')]);router['get'](_0x48f9('0xf'),auth[_0x48f9('0xa')](),controller[_0x48f9('0x10')]);router['get'](_0x48f9('0x11'),auth[_0x48f9('0xa')](),controller['getTeams']);router[_0x48f9('0x8')](_0x48f9('0x12'),auth[_0x48f9('0xa')](),controller['getAgents']);router[_0x48f9('0x8')]('/:id/members',auth[_0x48f9('0xa')](),controller[_0x48f9('0x13')]);router[_0x48f9('0x8')](_0x48f9('0x14'),auth[_0x48f9('0xa')](),controller[_0x48f9('0x15')]);router[_0x48f9('0x8')](_0x48f9('0x16'),auth[_0x48f9('0xa')](),controller['getBlackLists']);router['post']('/',auth[_0x48f9('0xa')](),controller[_0x48f9('0x17')]);router[_0x48f9('0x18')](_0x48f9('0x19'),auth[_0x48f9('0xa')](),controller[_0x48f9('0x1a')]);router[_0x48f9('0x18')](_0x48f9('0x11'),auth[_0x48f9('0xa')](),controller['addTeams']);router[_0x48f9('0x18')](_0x48f9('0x12'),auth['isAuthenticated'](),controller[_0x48f9('0x1b')]);router[_0x48f9('0x18')](_0x48f9('0x14'),auth['isAuthenticated'](),controller[_0x48f9('0x1c')]);router[_0x48f9('0x18')](_0x48f9('0x16'),auth[_0x48f9('0xa')](),controller[_0x48f9('0x1d')]);router[_0x48f9('0x1e')](_0x48f9('0x1f'),auth[_0x48f9('0xa')](),controller[_0x48f9('0x20')]);router['delete'](_0x48f9('0x1f'),auth[_0x48f9('0xa')](),controller[_0x48f9('0x21')]);router[_0x48f9('0x22')](_0x48f9('0x11'),auth[_0x48f9('0xa')](),controller[_0x48f9('0x23')]);router[_0x48f9('0x22')](_0x48f9('0x12'),auth[_0x48f9('0xa')](),controller['removeAgents']);router['delete'](_0x48f9('0x14'),auth[_0x48f9('0xa')](),controller[_0x48f9('0x24')]);router['delete'](_0x48f9('0x16'),auth[_0x48f9('0xa')](),controller[_0x48f9('0x25')]);module[_0x48f9('0x26')]=router; \ No newline at end of file diff --git a/server/api/voiceQueue/voiceQueue.attributes.js b/server/api/voiceQueue/voiceQueue.attributes.js index 030ba90..1f3dc2e 100644 --- a/server/api/voiceQueue/voiceQueue.attributes.js +++ b/server/api/voiceQueue/voiceQueue.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc9b0=['wrandom','setDataValue','strategy','getDataValue','type','dialMethod','booked','roundrobin','progressive','predictive','power','INTEGER','yes','all','once','TEXT','periodic_announce','join','joinempty','split','leavewhenempty','BOOLEAN','wrapuptime','Active/Disactive\x20Campaign','preview','Dial\x20Method.','UNSIGNED','Max\x209999\x20channels,\x200\x20means\x20unlimited.','Max\x209999\x20member\x20in\x20queue(min:1,\x20max:9999),\x200\x20means\x20unlimited.','Power\x20Level:\x20Calls\x20for\x20agents\x20(min:1,\x20max:10).','agentBusyFactor','dropRate','Only\x20for\x20predictive\x20method.','FLOAT','Predictive\x20Optimization\x20Percentage\x20(min:\x201,\x20max:\x2095)','Interval\x20Predictive\x20Minutes\x20(min:5\x20max:30)','Originate\x20Timeout\x20Seconds\x20(min:1,\x20max:999)','tTxX','https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_Queue','Queue\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\x20(min:1,\x20max:999)','Busy\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#NoAnswer\x20Retry\x20(min:1,\x20max:999)','NoAnswer\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','07:00-22:00,*,*,*','always','never','onlyIfOpen','#AMD\x20After\x20Greeting\x20Silence','#AMD\x20Total\x20Analysis\x20Time','#AMD\x20Between\x20Words\x20Silence','#AMD\x20Silence\x20Threshold\x20(min:0,\x20max:32767)','#AMD\x20Maximum\x20Word\x20Length','#RecallMe\x20Timeout\x20(min:1)','Active/Disactive\x20Recall\x20In\x20Queue','ASC','DESC','AGI\x20queue\x20option\x20(use:\x20agi://127.0.0.1/square,)','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)','#Abandoned\x20Retry\x20(min:1,\x20max:999)','Abandoned\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Machine\x20Retry\x20(min:1,\x20max:999)','AgentReject\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','mandatoryDispositionPauseId','mandatoryDisposition','sequelize','exports','STRING','name','ENUM','inbound','outbound','ringall','leastrecent','fewestcalls','random','rrmemory','linear'];(function(_0xff44cb,_0x1ca3c6){var _0x117fc0=function(_0x1fbfa1){while(--_0x1fbfa1){_0xff44cb['push'](_0xff44cb['shift']());}};_0x117fc0(++_0x1ca3c6);}(_0xc9b0,0x143));var _0x0c9b=function(_0x329f2f,_0x2b8828){_0x329f2f=_0x329f2f-0x0;var _0x4d6344=_0xc9b0[_0x329f2f];return _0x4d6344;};'use strict';var Sequelize=require(_0x0c9b('0x0'));module[_0x0c9b('0x1')]={'name':{'type':Sequelize[_0x0c9b('0x2')],'allowNull':![],'unique':_0x0c9b('0x3'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'type':{'type':Sequelize[_0x0c9b('0x4')](_0x0c9b('0x5'),_0x0c9b('0x6')),'allowNull':![],'defaultValue':_0x0c9b('0x5')},'musiconhold':{'type':Sequelize['STRING'],'defaultValue':'default'},'announce':{'type':Sequelize[_0x0c9b('0x2')],'defaultValue':''},'strategy':{'type':Sequelize[_0x0c9b('0x4')]('rr',_0x0c9b('0x7'),_0x0c9b('0x8'),_0x0c9b('0x9'),_0x0c9b('0xa'),_0x0c9b('0xb'),_0x0c9b('0xc'),_0x0c9b('0xd'),'rrordered'),'allowNull':![],'defaultValue':'ringall','set':function(_0x4e4a0d){this[_0x0c9b('0xe')](_0x0c9b('0xf'),_0x4e4a0d?_0x4e4a0d:_0x0c9b('0xb'));},'get':function(){var _0x3e271f=this[_0x0c9b('0x10')](_0x0c9b('0x11'));var _0x571f63=this[_0x0c9b('0x10')](_0x0c9b('0x12'));var _0x4ab537=this[_0x0c9b('0x10')]('strategy');if(_0x3e271f===_0x0c9b('0x5')){return _0x4ab537;}if(_0x571f63===_0x0c9b('0x13')&&_0x4ab537===_0x0c9b('0xb')||_0x571f63===_0x0c9b('0x13')&&_0x4ab537===_0x0c9b('0x14')){return _0x4ab537;}if(_0x571f63===_0x0c9b('0x15')||_0x571f63===_0x0c9b('0x16')||_0x571f63===_0x0c9b('0x17')){return _0x4ab537;}return null;}},'servicelevel':{'type':Sequelize[_0x0c9b('0x18')](0xb),'defaultValue':0x0},'context':{'type':Sequelize[_0x0c9b('0x2')],'defaultValue':null},'penaltymemberslimit':{'type':Sequelize['INTEGER'](0xb)},'timeout':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0xf},'retry':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x2},'timeoutpriority':{'type':Sequelize[_0x0c9b('0x2')]},'weight':{'type':Sequelize[_0x0c9b('0x18')](0xb),'allowNull':!![],'defaultValue':0x0},'wrapuptime':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x0},'autofill':{'type':Sequelize[_0x0c9b('0x4')](_0x0c9b('0x19'),'no'),'defaultValue':_0x0c9b('0x19')},'autopause':{'type':Sequelize[_0x0c9b('0x4')](_0x0c9b('0x19'),'no',_0x0c9b('0x1a')),'defaultValue':'no'},'autopausedelay':{'type':Sequelize[_0x0c9b('0x18')](0xb)},'autopausebusy':{'type':Sequelize['ENUM']('yes','no'),'defaultValue':'no'},'autopauseunavail':{'type':Sequelize[_0x0c9b('0x4')]('yes','no'),'defaultValue':'no'},'maxlen':{'type':Sequelize[_0x0c9b('0x18')](0xb),'defaultValue':0x0},'setinterfacevar':{'type':Sequelize[_0x0c9b('0x4')](_0x0c9b('0x19'),'no'),'defaultValue':'no'},'setqueueentryvar':{'type':Sequelize[_0x0c9b('0x4')](_0x0c9b('0x19'),'no'),'defautValue':'no'},'setqueuevar':{'type':Sequelize[_0x0c9b('0x4')](_0x0c9b('0x19'),'no'),'defaultValue':'no'},'eventmemberstatus':{'type':Sequelize[_0x0c9b('0x4')](_0x0c9b('0x19'),'no'),'defaultValue':'no'},'membermacro':{'type':Sequelize[_0x0c9b('0x2')],'allowNull':!![]},'membergosub':{'type':Sequelize['STRING'],'allowNull':!![]},'announce_frequency':{'type':Sequelize[_0x0c9b('0x18')](0xb),'defaultValue':0x0},'min_announce_frequency':{'type':Sequelize[_0x0c9b('0x18')](0xb),'defaultValue':0x0},'periodic_announce_frequency':{'type':Sequelize[_0x0c9b('0x18')](0xb),'defaultValue':0x0},'random_periodic_announce':{'type':Sequelize['ENUM'](_0x0c9b('0x19'),'no'),'defaultValue':'no'},'relative_periodic_announce':{'type':Sequelize[_0x0c9b('0x4')](_0x0c9b('0x19'),'no'),'defaultValue':'yes'},'announce_holdtime':{'type':Sequelize[_0x0c9b('0x4')]('yes','no',_0x0c9b('0x1b')),'defaultValue':'no'},'announce_position':{'type':Sequelize[_0x0c9b('0x2')],'defaultValue':'no'},'announce_to_first_user':{'type':Sequelize[_0x0c9b('0x4')](_0x0c9b('0x19'),'no')},'announce_position_limit':{'type':Sequelize[_0x0c9b('0x18')](0xb)},'announce_round_seconds':{'type':Sequelize[_0x0c9b('0x4')]('0','5','10','15','20','30'),'defaultValue':'0'},'monitor_format':{'type':Sequelize[_0x0c9b('0x2')],'defaultValue':''},'monitor_type':{'type':Sequelize[_0x0c9b('0x2')]},'queue_youarenext':{'type':Sequelize[_0x0c9b('0x2')],'defaultValue':null},'queue_thereare':{'type':Sequelize[_0x0c9b('0x2')],'defaultValue':null},'queue_callswaiting':{'type':Sequelize[_0x0c9b('0x2')],'defaultValue':null},'queue_holdtime':{'type':Sequelize['STRING'],'defaultValue':null},'queue_minute':{'type':Sequelize['STRING'],'allowNull':!![],'defaultValue':null},'queue_minutes':{'type':Sequelize[_0x0c9b('0x2')],'defaultValue':null},'queue_seconds':{'type':Sequelize[_0x0c9b('0x2')],'defaultValue':null},'queue_thankyou':{'type':Sequelize[_0x0c9b('0x2')],'defaultValue':null},'queue_reporthold':{'type':Sequelize[_0x0c9b('0x2')]},'queue_quantity1':{'type':Sequelize['STRING']},'queue_quantity2':{'type':Sequelize[_0x0c9b('0x2')]},'queue_periodic_announce':{'type':Sequelize[_0x0c9b('0x2')]},'queue_less_than':{'type':Sequelize['STRING']},'periodic_announce':{'type':Sequelize[_0x0c9b('0x1c')],'set':function(_0x3498e6){this[_0x0c9b('0xe')](_0x0c9b('0x1d'),_0x3498e6?_0x3498e6[_0x0c9b('0x1e')](','):[]);},'get':function(){return this[_0x0c9b('0x10')]('periodic_announce')?this[_0x0c9b('0x10')](_0x0c9b('0x1d'))['split'](','):[];}},'joinempty':{'type':Sequelize[_0x0c9b('0x2')],'defaultValue':_0x0c9b('0x19'),'set':function(_0x45aa93){this[_0x0c9b('0xe')](_0x0c9b('0x1f'),_0x45aa93?_0x45aa93[_0x0c9b('0x1e')](','):undefined);},'get':function(){return this[_0x0c9b('0x10')](_0x0c9b('0x1f'))?this[_0x0c9b('0x10')](_0x0c9b('0x1f'))[_0x0c9b('0x20')](','):undefined;}},'leavewhenempty':{'type':Sequelize['STRING'],'defaultValue':'no','set':function(_0x4ffa81){this[_0x0c9b('0xe')](_0x0c9b('0x21'),_0x4ffa81?_0x4ffa81[_0x0c9b('0x1e')](','):undefined);},'get':function(){return this[_0x0c9b('0x10')](_0x0c9b('0x21'))?this[_0x0c9b('0x10')](_0x0c9b('0x21'))[_0x0c9b('0x20')](','):undefined;}},'reportholdtime':{'type':Sequelize[_0x0c9b('0x4')](_0x0c9b('0x19'),'no'),'defaultValue':'no'},'ringinuse':{'type':Sequelize['ENUM'](_0x0c9b('0x19'),'no'),'defaultValue':'no'},'memberdelay':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x0},'timeoutrestart':{'type':Sequelize[_0x0c9b('0x4')](_0x0c9b('0x19'),'no'),'defaultValue':'no'},'defaultrule':{'type':Sequelize[_0x0c9b('0x2')]},'description':{'type':Sequelize[_0x0c9b('0x2')]},'acw':{'type':Sequelize[_0x0c9b('0x22')],'defaultValue':0x0,'set':function(_0x5b300a){this[_0x0c9b('0xe')]('acw',_0x5b300a);if(_0x5b300a){if(this['getDataValue'](_0x0c9b('0x23'))<0x2){this['setDataValue'](_0x0c9b('0x23'),0x2);}}}},'acwTimeout':{'type':Sequelize[_0x0c9b('0x18')](0xb),'defaultValue':0xa},'dialActive':{'type':Sequelize[_0x0c9b('0x22')],'defaultValue':0x0,'comment':_0x0c9b('0x24')},'dialMethod':{'type':Sequelize[_0x0c9b('0x4')](_0x0c9b('0x25'),_0x0c9b('0x15'),_0x0c9b('0x17'),_0x0c9b('0x16'),_0x0c9b('0x13')),'defaultValue':_0x0c9b('0x15'),'comment':_0x0c9b('0x26')},'dialLimitChannel':{'type':Sequelize['INTEGER'](0x4)[_0x0c9b('0x27')],'defaultValue':0x0,'validate':{'min':0x0,'max':0x270f},'comment':_0x0c9b('0x28')},'dialLimitQueue':{'type':Sequelize[_0x0c9b('0x18')](0x4)[_0x0c9b('0x27')],'defaultValue':0x0,'validate':{'min':0x0,'max':0x270f},'comment':_0x0c9b('0x29')},'dialPowerLevel':{'type':Sequelize['FLOAT'](0x2)[_0x0c9b('0x27')],'defaultValue':0x1,'validate':{'min':0x1,'max':0xa},'comment':_0x0c9b('0x2a')},'dialPredictiveOptimization':{'type':Sequelize[_0x0c9b('0x4')](_0x0c9b('0x2b'),_0x0c9b('0x2c')),'defaultValue':_0x0c9b('0x2c'),'comment':_0x0c9b('0x2d')},'dialPredictiveOptimizationPercentage':{'type':Sequelize[_0x0c9b('0x2e')](0x2)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x5f},'comment':_0x0c9b('0x2f')},'dialPredictiveInterval':{'type':Sequelize['INTEGER'](0x3)[_0x0c9b('0x27')],'defaultValue':0xa,'validate':{'min':0x5,'max':0x1e},'comment':_0x0c9b('0x30')},'dialOriginateCallerIdName':{'type':Sequelize[_0x0c9b('0x2')]},'dialOriginateCallerIdNumber':{'type':Sequelize[_0x0c9b('0x2')]},'dialOriginateTimeout':{'type':Sequelize[_0x0c9b('0x18')](0x3)['UNSIGNED'],'defaultValue':0x1e,'validate':{'min':0x1,'max':0x3e7},'comment':_0x0c9b('0x31')},'dialQueueOptions':{'type':Sequelize[_0x0c9b('0x2')],'defaultValue':_0x0c9b('0x32'),'comment':_0x0c9b('0x33')},'dialQueueTimeout':{'type':Sequelize[_0x0c9b('0x18')](0x3)[_0x0c9b('0x27')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x0c9b('0x34')},'dialQueueProject':{'type':Sequelize[_0x0c9b('0x2')],'comment':'AGI\x20queue\x20option\x20(use:\x20agi://127.0.0.1/square,)'},'dialCongestionMaxRetry':{'type':Sequelize[_0x0c9b('0x18')](0x3)[_0x0c9b('0x27')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x0c9b('0x35')},'dialCongestionRetryFrequency':{'type':Sequelize[_0x0c9b('0x18')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x0c9b('0x36')},'dialBusyMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x0c9b('0x27')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x0c9b('0x37')},'dialBusyRetryFrequency':{'type':Sequelize[_0x0c9b('0x18')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x0c9b('0x38')},'dialNoAnswerMaxRetry':{'type':Sequelize['INTEGER'](0x3)['UNSIGNED'],'defaultValue':0x3,'comment':_0x0c9b('0x39')},'dialNoAnswerRetryFrequency':{'type':Sequelize[_0x0c9b('0x18')](0x5)[_0x0c9b('0x27')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x0c9b('0x3a')},'dialGlobalMaxRetry':{'type':Sequelize[_0x0c9b('0x18')](0x3)[_0x0c9b('0x27')],'validate':{'min':0x1,'max':0x3e7},'defaultValue':0x4,'comment':'#Global\x20Max\x20Retry\x20(min:1,\x20max:999)'},'dialTimezone':{'type':Sequelize['STRING'],'defaultValue':null},'dialGlobalInterval':{'type':Sequelize[_0x0c9b('0x2')],'defaultValue':_0x0c9b('0x3b')},'dialPrefix':{'type':Sequelize[_0x0c9b('0x2')],'defaultValue':null},'dialCheckDuplicateType':{'type':Sequelize[_0x0c9b('0x4')](_0x0c9b('0x3c'),_0x0c9b('0x3d'),_0x0c9b('0x3e')),'defaultValue':_0x0c9b('0x3c')},'dialAMDActive':{'type':Sequelize['BOOLEAN'],'defaultValue':0x0,'comment':'Active/Disactive\x20AMD'},'dialAMDInitialSilence':{'type':Sequelize[_0x0c9b('0x18')](0x9)[_0x0c9b('0x27')],'defaultValue':0x9c4,'validate':{'min':0x0},'comment':'#AMD\x20Initial\x20Silence'},'dialAMDGreeting':{'type':Sequelize[_0x0c9b('0x18')](0x9)['UNSIGNED'],'defaultValue':0x5dc,'validate':{'min':0x0},'comment':'#AMD\x20Greeting'},'dialAMDAfterGreetingSilence':{'type':Sequelize[_0x0c9b('0x18')](0x9)[_0x0c9b('0x27')],'defaultValue':0x320,'validate':{'min':0x0},'comment':_0x0c9b('0x3f')},'dialAMDTotalAnalysisTime':{'type':Sequelize[_0x0c9b('0x18')](0x9)[_0x0c9b('0x27')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0x0c9b('0x40')},'dialAMDMinWordLength':{'type':Sequelize[_0x0c9b('0x18')](0x9)['UNSIGNED'],'defaultValue':0x64,'validate':{'min':0x0},'comment':'#AMD\x20Min\x20Word\x20Length'},'dialAMDBetweenWordsSilence':{'type':Sequelize[_0x0c9b('0x18')](0x9)['UNSIGNED'],'defaultValue':0x32,'validate':{'min':0x0},'comment':_0x0c9b('0x41')},'dialAMDMaximumNumberOfWords':{'type':Sequelize[_0x0c9b('0x18')](0x9)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x0},'comment':'#AMD\x20Maximum\x20Number\x20Of\x20Words'},'dialAMDSilenceThreshold':{'type':Sequelize['INTEGER'](0x5)[_0x0c9b('0x27')],'validate':{'min':0x0,'max':0x7fff},'defaultValue':0x100,'comment':_0x0c9b('0x42')},'dialAMDMaximumWordLength':{'type':Sequelize[_0x0c9b('0x18')](0x9)['UNSIGNED'],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0x0c9b('0x43')},'dialRecallMeTimeout':{'type':Sequelize['INTEGER'](0x5)[_0x0c9b('0x27')],'validate':{'min':0x1},'defaultValue':0x1e,'comment':_0x0c9b('0x44')},'dialRecallInQueue':{'type':Sequelize[_0x0c9b('0x22')],'defaultValue':0x0,'comment':_0x0c9b('0x45')},'dialOrderByScheduledAt':{'type':Sequelize['ENUM']('DESC',_0x0c9b('0x46')),'defaultValue':_0x0c9b('0x47')},'dialQueueProject2':{'type':Sequelize[_0x0c9b('0x2')],'comment':_0x0c9b('0x48')},'dialAgiAfterHangupClient':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'dialAgiAfterHangupAgent':{'type':Sequelize[_0x0c9b('0x22')],'defaultValue':![]},'dialRandomLastDigitCallerIdNumber':{'type':Sequelize['INTEGER'](0x3)[_0x0c9b('0x27')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0x0c9b('0x49')},'dialCutDigit':{'type':Sequelize[_0x0c9b('0x18')](0x3)[_0x0c9b('0x27')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0x0c9b('0x4a')},'dialNoSuchNumberMaxRetry':{'type':Sequelize['INTEGER'](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x0c9b('0x4b')},'dialNoSuchNumberRetryFrequency':{'type':Sequelize[_0x0c9b('0x18')](0x5)[_0x0c9b('0x27')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x0c9b('0x4c')},'dialDropMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x0c9b('0x27')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Drop\x20Retry\x20(min:1,\x20max:999)'},'dialDropRetryFrequency':{'type':Sequelize[_0x0c9b('0x18')](0x5)[_0x0c9b('0x27')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'Drop\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialAbandonedMaxRetry':{'type':Sequelize[_0x0c9b('0x18')](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x0c9b('0x4d')},'dialAbandonedRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0x0c9b('0x27')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x0c9b('0x4e')},'dialMachineMaxRetry':{'type':Sequelize[_0x0c9b('0x18')](0x3)[_0x0c9b('0x27')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x0c9b('0x4f')},'dialMachineRetryFrequency':{'type':Sequelize[_0x0c9b('0x18')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'Machine\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialAgentRejectMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x0c9b('0x27')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#AgentReject\x20Retry\x20(min:1,\x20max:999)'},'dialAgentRejectRetryFrequency':{'type':Sequelize[_0x0c9b('0x18')](0x5)[_0x0c9b('0x27')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x0c9b('0x50')},'mandatoryDispositionPauseId':{'type':Sequelize[_0x0c9b('0x18')],'allowNull':!![],'comment':'Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled'},'mandatoryDisposition':{'type':Sequelize[_0x0c9b('0x22')],'defaultValue':![],'comment':_0x0c9b('0x51'),'set':function(_0x11e746){if(!_0x11e746)this[_0x0c9b('0xe')](_0x0c9b('0x52'),null);this[_0x0c9b('0xe')](_0x0c9b('0x53'),_0x11e746);}},'dialPredictiveIntervalMaxThreshold':{'type':Sequelize[_0x0c9b('0x18')](0x3)[_0x0c9b('0x27')],'defaultValue':0x14,'validate':{'min':0x1,'max':0x64}},'dialPredictiveIntervalMinThreshold':{'type':Sequelize[_0x0c9b('0x18')](0x3)[_0x0c9b('0x27')],'defaultValue':0xa,'validate':{'min':0x1,'max':0x64}}}; \ No newline at end of file +var _0x8a26=['#AMD\x20Min\x20Word\x20Length','#AMD\x20Maximum\x20Number\x20Of\x20Words','#AMD\x20Silence\x20Threshold\x20(min:0,\x20max:32767)','#AMD\x20Maximum\x20Word\x20Length','Active/Disactive\x20Recall\x20In\x20Queue','DESC','ASC','Random\x20Last\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)','#Abandoned\x20Retry\x20(min:1,\x20max:999)','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\x20(min:1,\x20max:999)','AgentReject\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','sequelize','exports','name','inbound','outbound','ENUM','ringall','linear','wrandom','rrordered','setDataValue','strategy','getDataValue','type','dialMethod','booked','rrmemory','roundrobin','progressive','predictive','power','INTEGER','STRING','yes','all','TEXT','join','periodic_announce','split','joinempty','leavewhenempty','acw','wrapuptime','BOOLEAN','Active/Disactive\x20Campaign','preview','Dial\x20Method.','UNSIGNED','Max\x209999\x20channels,\x200\x20means\x20unlimited.','Max\x209999\x20member\x20in\x20queue(min:1,\x20max:9999),\x200\x20means\x20unlimited.','FLOAT','Power\x20Level:\x20Calls\x20for\x20agents\x20(min:1,\x20max:10).','dropRate','Only\x20for\x20predictive\x20method.','Predictive\x20Optimization\x20Percentage\x20(min:\x201,\x20max:\x2095)','Interval\x20Predictive\x20Minutes\x20(min:5\x20max:30)','Originate\x20Timeout\x20Seconds\x20(min:1,\x20max:999)','tTxX','https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_Queue','Queue\x20Timeout\x20Seconds\x20(min:1,\x20max:999)','AGI\x20queue\x20option\x20(use:\x20agi://127.0.0.1/square,)','#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\x20(min:1,\x20max:999)','07:00-22:00,*,*,*','always','onlyIfOpen','Active/Disactive\x20AMD','#AMD\x20Initial\x20Silence','#AMD\x20Greeting','#AMD\x20After\x20Greeting\x20Silence'];(function(_0x197077,_0x55cb6d){var _0x56ba15=function(_0x1b9b01){while(--_0x1b9b01){_0x197077['push'](_0x197077['shift']());}};_0x56ba15(++_0x55cb6d);}(_0x8a26,0x1a8));var _0x68a2=function(_0x15457f,_0x2c9ee7){_0x15457f=_0x15457f-0x0;var _0x5ca4bf=_0x8a26[_0x15457f];return _0x5ca4bf;};'use strict';var Sequelize=require(_0x68a2('0x0'));module[_0x68a2('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0x68a2('0x2'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'type':{'type':Sequelize['ENUM'](_0x68a2('0x3'),_0x68a2('0x4')),'allowNull':![],'defaultValue':_0x68a2('0x3')},'musiconhold':{'type':Sequelize['STRING'],'defaultValue':'default'},'announce':{'type':Sequelize['STRING'],'defaultValue':''},'strategy':{'type':Sequelize[_0x68a2('0x5')]('rr',_0x68a2('0x6'),'leastrecent','fewestcalls','random','rrmemory',_0x68a2('0x7'),_0x68a2('0x8'),_0x68a2('0x9')),'allowNull':![],'defaultValue':_0x68a2('0x6'),'set':function(_0x17aa53){this[_0x68a2('0xa')](_0x68a2('0xb'),_0x17aa53?_0x17aa53:'rrmemory');},'get':function(){var _0x363766=this[_0x68a2('0xc')](_0x68a2('0xd'));var _0x4fd51b=this[_0x68a2('0xc')](_0x68a2('0xe'));var _0xe80277=this[_0x68a2('0xc')](_0x68a2('0xb'));if(_0x363766===_0x68a2('0x3')){return _0xe80277;}if(_0x4fd51b===_0x68a2('0xf')&&_0xe80277===_0x68a2('0x10')||_0x4fd51b===_0x68a2('0xf')&&_0xe80277===_0x68a2('0x11')){return _0xe80277;}if(_0x4fd51b===_0x68a2('0x12')||_0x4fd51b===_0x68a2('0x13')||_0x4fd51b===_0x68a2('0x14')){return _0xe80277;}return null;}},'servicelevel':{'type':Sequelize[_0x68a2('0x15')](0xb),'defaultValue':0x0},'context':{'type':Sequelize[_0x68a2('0x16')],'defaultValue':null},'penaltymemberslimit':{'type':Sequelize[_0x68a2('0x15')](0xb)},'timeout':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0xf},'retry':{'type':Sequelize[_0x68a2('0x15')](0xb),'defaultValue':0x2},'timeoutpriority':{'type':Sequelize[_0x68a2('0x16')]},'weight':{'type':Sequelize[_0x68a2('0x15')](0xb),'allowNull':!![],'defaultValue':0x0},'wrapuptime':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x0},'autofill':{'type':Sequelize[_0x68a2('0x5')](_0x68a2('0x17'),'no'),'defaultValue':'yes'},'autopause':{'type':Sequelize[_0x68a2('0x5')](_0x68a2('0x17'),'no',_0x68a2('0x18')),'defaultValue':'no'},'autopausedelay':{'type':Sequelize[_0x68a2('0x15')](0xb)},'autopausebusy':{'type':Sequelize[_0x68a2('0x5')](_0x68a2('0x17'),'no'),'defaultValue':'no'},'autopauseunavail':{'type':Sequelize[_0x68a2('0x5')](_0x68a2('0x17'),'no'),'defaultValue':'no'},'maxlen':{'type':Sequelize[_0x68a2('0x15')](0xb),'defaultValue':0x0},'setinterfacevar':{'type':Sequelize[_0x68a2('0x5')](_0x68a2('0x17'),'no'),'defaultValue':'no'},'setqueueentryvar':{'type':Sequelize[_0x68a2('0x5')](_0x68a2('0x17'),'no'),'defautValue':'no'},'setqueuevar':{'type':Sequelize[_0x68a2('0x5')](_0x68a2('0x17'),'no'),'defaultValue':'no'},'eventmemberstatus':{'type':Sequelize[_0x68a2('0x5')]('yes','no'),'defaultValue':'no'},'membermacro':{'type':Sequelize['STRING'],'allowNull':!![]},'membergosub':{'type':Sequelize[_0x68a2('0x16')],'allowNull':!![]},'announce_frequency':{'type':Sequelize[_0x68a2('0x15')](0xb),'defaultValue':0x0},'min_announce_frequency':{'type':Sequelize[_0x68a2('0x15')](0xb),'defaultValue':0x0},'periodic_announce_frequency':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x0},'random_periodic_announce':{'type':Sequelize[_0x68a2('0x5')](_0x68a2('0x17'),'no'),'defaultValue':'no'},'relative_periodic_announce':{'type':Sequelize[_0x68a2('0x5')]('yes','no'),'defaultValue':_0x68a2('0x17')},'announce_holdtime':{'type':Sequelize[_0x68a2('0x5')](_0x68a2('0x17'),'no','once'),'defaultValue':'no'},'announce_position':{'type':Sequelize['STRING'],'defaultValue':'no'},'announce_to_first_user':{'type':Sequelize[_0x68a2('0x5')](_0x68a2('0x17'),'no')},'announce_position_limit':{'type':Sequelize[_0x68a2('0x15')](0xb)},'announce_round_seconds':{'type':Sequelize['ENUM']('0','5','10','15','20','30'),'defaultValue':'0'},'monitor_format':{'type':Sequelize[_0x68a2('0x16')],'defaultValue':''},'monitor_type':{'type':Sequelize[_0x68a2('0x16')]},'queue_youarenext':{'type':Sequelize[_0x68a2('0x16')],'defaultValue':null},'queue_thereare':{'type':Sequelize[_0x68a2('0x16')],'defaultValue':null},'queue_callswaiting':{'type':Sequelize[_0x68a2('0x16')],'defaultValue':null},'queue_holdtime':{'type':Sequelize[_0x68a2('0x16')],'defaultValue':null},'queue_minute':{'type':Sequelize['STRING'],'allowNull':!![],'defaultValue':null},'queue_minutes':{'type':Sequelize['STRING'],'defaultValue':null},'queue_seconds':{'type':Sequelize['STRING'],'defaultValue':null},'queue_thankyou':{'type':Sequelize[_0x68a2('0x16')],'defaultValue':null},'queue_reporthold':{'type':Sequelize['STRING']},'queue_quantity1':{'type':Sequelize['STRING']},'queue_quantity2':{'type':Sequelize['STRING']},'queue_periodic_announce':{'type':Sequelize[_0x68a2('0x16')]},'queue_less_than':{'type':Sequelize[_0x68a2('0x16')]},'periodic_announce':{'type':Sequelize[_0x68a2('0x19')],'set':function(_0x613b40){this[_0x68a2('0xa')]('periodic_announce',_0x613b40?_0x613b40[_0x68a2('0x1a')](','):[]);},'get':function(){return this['getDataValue'](_0x68a2('0x1b'))?this[_0x68a2('0xc')](_0x68a2('0x1b'))[_0x68a2('0x1c')](','):[];}},'joinempty':{'type':Sequelize['STRING'],'defaultValue':_0x68a2('0x17'),'set':function(_0x13cf25){this[_0x68a2('0xa')](_0x68a2('0x1d'),_0x13cf25?_0x13cf25[_0x68a2('0x1a')](','):undefined);},'get':function(){return this[_0x68a2('0xc')](_0x68a2('0x1d'))?this[_0x68a2('0xc')](_0x68a2('0x1d'))['split'](','):undefined;}},'leavewhenempty':{'type':Sequelize[_0x68a2('0x16')],'defaultValue':'no','set':function(_0xc7720c){this[_0x68a2('0xa')](_0x68a2('0x1e'),_0xc7720c?_0xc7720c[_0x68a2('0x1a')](','):undefined);},'get':function(){return this['getDataValue'](_0x68a2('0x1e'))?this[_0x68a2('0xc')]('leavewhenempty')[_0x68a2('0x1c')](','):undefined;}},'reportholdtime':{'type':Sequelize[_0x68a2('0x5')](_0x68a2('0x17'),'no'),'defaultValue':'no'},'ringinuse':{'type':Sequelize['ENUM'](_0x68a2('0x17'),'no'),'defaultValue':'no'},'memberdelay':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x0},'timeoutrestart':{'type':Sequelize['ENUM'](_0x68a2('0x17'),'no'),'defaultValue':'no'},'defaultrule':{'type':Sequelize[_0x68a2('0x16')]},'description':{'type':Sequelize[_0x68a2('0x16')]},'acw':{'type':Sequelize['BOOLEAN'],'defaultValue':0x0,'set':function(_0x3f9700){this['setDataValue'](_0x68a2('0x1f'),_0x3f9700);if(_0x3f9700){if(this[_0x68a2('0xc')](_0x68a2('0x20'))<0x2){this[_0x68a2('0xa')](_0x68a2('0x20'),0x2);}}}},'acwTimeout':{'type':Sequelize[_0x68a2('0x15')](0xb),'defaultValue':0xa},'dialActive':{'type':Sequelize[_0x68a2('0x21')],'defaultValue':0x0,'comment':_0x68a2('0x22')},'dialMethod':{'type':Sequelize['ENUM'](_0x68a2('0x23'),_0x68a2('0x12'),'power',_0x68a2('0x13'),_0x68a2('0xf')),'defaultValue':'progressive','comment':_0x68a2('0x24')},'dialLimitChannel':{'type':Sequelize[_0x68a2('0x15')](0x4)[_0x68a2('0x25')],'defaultValue':0x0,'validate':{'min':0x0,'max':0x270f},'comment':_0x68a2('0x26')},'dialLimitQueue':{'type':Sequelize['INTEGER'](0x4)[_0x68a2('0x25')],'defaultValue':0x0,'validate':{'min':0x0,'max':0x270f},'comment':_0x68a2('0x27')},'dialPowerLevel':{'type':Sequelize[_0x68a2('0x28')](0x2)[_0x68a2('0x25')],'defaultValue':0x1,'validate':{'min':0x1,'max':0xa},'comment':_0x68a2('0x29')},'dialPredictiveOptimization':{'type':Sequelize[_0x68a2('0x5')]('agentBusyFactor',_0x68a2('0x2a')),'defaultValue':_0x68a2('0x2a'),'comment':_0x68a2('0x2b')},'dialPredictiveOptimizationPercentage':{'type':Sequelize[_0x68a2('0x28')](0x2)[_0x68a2('0x25')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x5f},'comment':_0x68a2('0x2c')},'dialPredictiveInterval':{'type':Sequelize[_0x68a2('0x15')](0x3)[_0x68a2('0x25')],'defaultValue':0xa,'validate':{'min':0x5,'max':0x1e},'comment':_0x68a2('0x2d')},'dialOriginateCallerIdName':{'type':Sequelize[_0x68a2('0x16')]},'dialOriginateCallerIdNumber':{'type':Sequelize[_0x68a2('0x16')]},'dialOriginateTimeout':{'type':Sequelize[_0x68a2('0x15')](0x3)[_0x68a2('0x25')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0x3e7},'comment':_0x68a2('0x2e')},'dialQueueOptions':{'type':Sequelize['STRING'],'defaultValue':_0x68a2('0x2f'),'comment':_0x68a2('0x30')},'dialQueueTimeout':{'type':Sequelize[_0x68a2('0x15')](0x3)[_0x68a2('0x25')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x68a2('0x31')},'dialQueueProject':{'type':Sequelize['STRING'],'comment':_0x68a2('0x32')},'dialCongestionMaxRetry':{'type':Sequelize[_0x68a2('0x15')](0x3)[_0x68a2('0x25')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x68a2('0x33')},'dialCongestionRetryFrequency':{'type':Sequelize[_0x68a2('0x15')](0x5)[_0x68a2('0x25')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x68a2('0x34')},'dialBusyMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x68a2('0x25')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Busy\x20Retry\x20(min:1,\x20max:999)'},'dialBusyRetryFrequency':{'type':Sequelize[_0x68a2('0x15')](0x5)[_0x68a2('0x25')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x68a2('0x35')},'dialNoAnswerMaxRetry':{'type':Sequelize[_0x68a2('0x15')](0x3)[_0x68a2('0x25')],'defaultValue':0x3,'comment':_0x68a2('0x36')},'dialNoAnswerRetryFrequency':{'type':Sequelize[_0x68a2('0x15')](0x5)[_0x68a2('0x25')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'NoAnswer\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialGlobalMaxRetry':{'type':Sequelize[_0x68a2('0x15')](0x3)[_0x68a2('0x25')],'validate':{'min':0x1,'max':0x3e7},'defaultValue':0x4,'comment':'#Global\x20Max\x20Retry\x20(min:1,\x20max:999)'},'dialTimezone':{'type':Sequelize[_0x68a2('0x16')],'defaultValue':null},'dialGlobalInterval':{'type':Sequelize[_0x68a2('0x16')],'defaultValue':_0x68a2('0x37')},'dialPrefix':{'type':Sequelize[_0x68a2('0x16')],'defaultValue':null},'dialCheckDuplicateType':{'type':Sequelize[_0x68a2('0x5')](_0x68a2('0x38'),'never',_0x68a2('0x39')),'defaultValue':_0x68a2('0x38')},'dialAMDActive':{'type':Sequelize[_0x68a2('0x21')],'defaultValue':0x0,'comment':_0x68a2('0x3a')},'dialAMDInitialSilence':{'type':Sequelize[_0x68a2('0x15')](0x9)[_0x68a2('0x25')],'defaultValue':0x9c4,'validate':{'min':0x0},'comment':_0x68a2('0x3b')},'dialAMDGreeting':{'type':Sequelize[_0x68a2('0x15')](0x9)[_0x68a2('0x25')],'defaultValue':0x5dc,'validate':{'min':0x0},'comment':_0x68a2('0x3c')},'dialAMDAfterGreetingSilence':{'type':Sequelize['INTEGER'](0x9)[_0x68a2('0x25')],'defaultValue':0x320,'validate':{'min':0x0},'comment':_0x68a2('0x3d')},'dialAMDTotalAnalysisTime':{'type':Sequelize[_0x68a2('0x15')](0x9)[_0x68a2('0x25')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':'#AMD\x20Total\x20Analysis\x20Time'},'dialAMDMinWordLength':{'type':Sequelize[_0x68a2('0x15')](0x9)[_0x68a2('0x25')],'defaultValue':0x64,'validate':{'min':0x0},'comment':_0x68a2('0x3e')},'dialAMDBetweenWordsSilence':{'type':Sequelize[_0x68a2('0x15')](0x9)[_0x68a2('0x25')],'defaultValue':0x32,'validate':{'min':0x0},'comment':'#AMD\x20Between\x20Words\x20Silence'},'dialAMDMaximumNumberOfWords':{'type':Sequelize[_0x68a2('0x15')](0x9)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x0},'comment':_0x68a2('0x3f')},'dialAMDSilenceThreshold':{'type':Sequelize[_0x68a2('0x15')](0x5)[_0x68a2('0x25')],'validate':{'min':0x0,'max':0x7fff},'defaultValue':0x100,'comment':_0x68a2('0x40')},'dialAMDMaximumWordLength':{'type':Sequelize[_0x68a2('0x15')](0x9)['UNSIGNED'],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0x68a2('0x41')},'dialRecallMeTimeout':{'type':Sequelize['INTEGER'](0x5)[_0x68a2('0x25')],'validate':{'min':0x1},'defaultValue':0x1e,'comment':'#RecallMe\x20Timeout\x20(min:1)'},'dialRecallInQueue':{'type':Sequelize[_0x68a2('0x21')],'defaultValue':0x0,'comment':_0x68a2('0x42')},'dialOrderByScheduledAt':{'type':Sequelize[_0x68a2('0x5')](_0x68a2('0x43'),_0x68a2('0x44')),'defaultValue':_0x68a2('0x43')},'dialQueueProject2':{'type':Sequelize[_0x68a2('0x16')],'comment':_0x68a2('0x32')},'dialAgiAfterHangupClient':{'type':Sequelize[_0x68a2('0x21')],'defaultValue':![]},'dialAgiAfterHangupAgent':{'type':Sequelize[_0x68a2('0x21')],'defaultValue':![]},'dialRandomLastDigitCallerIdNumber':{'type':Sequelize[_0x68a2('0x15')](0x3)[_0x68a2('0x25')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0x68a2('0x45')},'dialCutDigit':{'type':Sequelize[_0x68a2('0x15')](0x3)[_0x68a2('0x25')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':'Cut\x20Digit\x20(min:1,\x20max:15)'},'dialNoSuchNumberMaxRetry':{'type':Sequelize[_0x68a2('0x15')](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x68a2('0x46')},'dialNoSuchNumberRetryFrequency':{'type':Sequelize[_0x68a2('0x15')](0x5)[_0x68a2('0x25')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x68a2('0x47')},'dialDropMaxRetry':{'type':Sequelize[_0x68a2('0x15')](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x68a2('0x48')},'dialDropRetryFrequency':{'type':Sequelize[_0x68a2('0x15')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'Drop\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialAbandonedMaxRetry':{'type':Sequelize[_0x68a2('0x15')](0x3)[_0x68a2('0x25')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x68a2('0x49')},'dialAbandonedRetryFrequency':{'type':Sequelize[_0x68a2('0x15')](0x5)[_0x68a2('0x25')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x68a2('0x4a')},'dialMachineMaxRetry':{'type':Sequelize[_0x68a2('0x15')](0x3)[_0x68a2('0x25')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x68a2('0x4b')},'dialMachineRetryFrequency':{'type':Sequelize['INTEGER'](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x68a2('0x4c')},'dialAgentRejectMaxRetry':{'type':Sequelize[_0x68a2('0x15')](0x3)[_0x68a2('0x25')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x68a2('0x4d')},'dialAgentRejectRetryFrequency':{'type':Sequelize[_0x68a2('0x15')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x68a2('0x4e')},'mandatoryDispositionPauseId':{'type':Sequelize[_0x68a2('0x15')],'allowNull':!![],'comment':_0x68a2('0x4f')},'mandatoryDisposition':{'type':Sequelize[_0x68a2('0x21')],'defaultValue':![],'comment':_0x68a2('0x50'),'set':function(_0x28de51){if(!_0x28de51)this[_0x68a2('0xa')]('mandatoryDispositionPauseId',null);this[_0x68a2('0xa')]('mandatoryDisposition',_0x28de51);}},'dialPredictiveIntervalMaxThreshold':{'type':Sequelize[_0x68a2('0x15')](0x3)[_0x68a2('0x25')],'defaultValue':0x14,'validate':{'min':0x1,'max':0x64}},'dialPredictiveIntervalMinThreshold':{'type':Sequelize[_0x68a2('0x15')](0x3)['UNSIGNED'],'defaultValue':0xa,'validate':{'min':0x1,'max':0x64}}}; \ No newline at end of file diff --git a/server/api/voiceQueue/voiceQueue.controller.js b/server/api/voiceQueue/voiceQueue.controller.js index c6cb4af..7ef55fd 100644 --- a/server/api/voiceQueue/voiceQueue.controller.js +++ b/server/api/voiceQueue/voiceQueue.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x37e5=['toString','QueryTypes','SELECT','every','TeamId','all','union','removeTeams','removeAgents','emit','userVoiceQueue:remove','addAgents','spread','online','isEmpty','isNil','getAgents','getMembers','CmList','getLists','addLists','dialCheckDuplicateType','always','insert','into','cm_hopper','fromQuery','phone','scheduledAt','ContactId','ListId','field','NOW()','CmListId','cm_contacts','deletedAt\x20IS\x20NULL','ListId\x20=\x20?','phone\x20IS\x20NOT\x20NULL','phone\x20NOT\x20IN\x20(?)','COALESCE(calleridnum,\x27\x27)','cm_hopper_final','COALESCE(phone,\x27\x27)','VoiceQueueId\x20=\x20?','removeLists','getBlackLists','addBlackLists','removeBlackLists','eml-format','zip-dir','fast-json-patch','moment','mustache','util','path','sox','to-csv','fs-extra','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','register','sendStatus','status','end','json','offset','undefined','limit','count','Content-Range','apply','reject','save','update','then','destroy','inbound','QueueCampaigns','outbound','ignore','map','value','includes','type','name','UserProfileResource','error','stack','send','index','VoiceQueue','rawAttributes','fieldName','key','model','query','keys','intersection','attributes','fields','length','hasOwnProperty','sort','where','filters','filter','merge','VIRTUAL','options','includeAll','include','rows','show','params','find','catch','create','body','user','get','role','UserProfileSection','userProfileId','clone','updatedAt','omit','createdAt','Unable\x20to\x20retrieve\x20the\x20current\x20user','VoiceQueues','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','getHoppers','findOne','nolimit','order','pick','CmHopper','VoiceQueueId','CmHopperHistory','findAll','getHopperFinals','CmHopperFinal','getHopperBlacks','CmHopperBlack','getTeams','addTeams','teams','Team','User','Agents','voicePause','interface','flatMap','penalty','sequelize','transaction','each','TeamVoiceQueue','upsert','UserVoiceQueue','findOrCreate','UserVoiceQueueRt','format','SIP/%s','forEach','userVoiceQueue:save','ids','select','tq.TeamId','from','join','ut.TeamId\x20=\x20tq.TeamId','ut.UserId\x20=\x20?','push'];(function(_0x1b9c3d,_0x30a023){var _0xa548a9=function(_0x273056){while(--_0x273056){_0x1b9c3d['push'](_0x1b9c3d['shift']());}};_0xa548a9(++_0x30a023);}(_0x37e5,0x1ab));var _0x537e=function(_0x3c642a,_0x35223b){_0x3c642a=_0x3c642a-0x0;var _0x9db7d6=_0x37e5[_0x3c642a];return _0x9db7d6;};'use strict';var emlformat=require(_0x537e('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x537e('0x1'));var jsonpatch=require(_0x537e('0x2'));var rp=require('request-promise');var moment=require(_0x537e('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x537e('0x4'));var util=require(_0x537e('0x5'));var path=require(_0x537e('0x6'));var sox=require(_0x537e('0x7'));var csv=require(_0x537e('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x537e('0x9'));var _=require('lodash');var squel=require(_0x537e('0xa'));var crypto=require('crypto');var jsforce=require(_0x537e('0xb'));var deskjs=require(_0x537e('0xc'));var toCsv=require(_0x537e('0x8'));var querystring=require(_0x537e('0xd'));var Papa=require(_0x537e('0xe'));var Redis=require(_0x537e('0xf'));var authService=require(_0x537e('0x10'));var qs=require(_0x537e('0x11'));var as=require(_0x537e('0x12'));var hardwareService=require(_0x537e('0x13'));var logger=require('../../config/logger')(_0x537e('0x14'));var utils=require(_0x537e('0x15'));var config=require(_0x537e('0x16'));var licenseUtil=require(_0x537e('0x17'));var db=require(_0x537e('0x18'))['db'];config[_0x537e('0x19')]=_[_0x537e('0x1a')](config[_0x537e('0x19')],{'host':_0x537e('0x1b'),'port':0x18eb});var socket=require(_0x537e('0x1c'))(new Redis(config[_0x537e('0x19')]));require('./voiceQueue.socket')[_0x537e('0x1d')](socket);function respondWithStatusCode(_0x411b82,_0x279464){_0x279464=_0x279464||0xcc;return function(_0x20ac32){if(_0x20ac32){return _0x411b82[_0x537e('0x1e')](_0x279464);}return _0x411b82[_0x537e('0x1f')](_0x279464)[_0x537e('0x20')]();};}function respondWithResult(_0x150b83,_0x990dce){_0x990dce=_0x990dce||0xc8;return function(_0x5d29b2){if(_0x5d29b2){return _0x150b83[_0x537e('0x1f')](_0x990dce)[_0x537e('0x21')](_0x5d29b2);}};}function respondWithFilteredResult(_0x5b454d,_0x4c8b21){return function(_0x5455a4){if(_0x5455a4){var _0xeebe4e=typeof _0x4c8b21[_0x537e('0x22')]===_0x537e('0x23')&&typeof _0x4c8b21[_0x537e('0x24')]==='undefined';var _0x35e5b9=_0x5455a4['count'];var _0x21a202=_0xeebe4e?0x0:_0x4c8b21[_0x537e('0x22')];var _0x2e979f=_0xeebe4e?_0x5455a4[_0x537e('0x25')]:_0x4c8b21[_0x537e('0x22')]+_0x4c8b21[_0x537e('0x24')];var _0x1c9bb6;if(_0x2e979f>=_0x35e5b9){_0x2e979f=_0x35e5b9;_0x1c9bb6=0xc8;}else{_0x1c9bb6=0xce;}_0x5b454d[_0x537e('0x1f')](_0x1c9bb6);return _0x5b454d['set'](_0x537e('0x26'),_0x21a202+'-'+_0x2e979f+'/'+_0x35e5b9)['json'](_0x5455a4);}return null;};}function patchUpdates(_0x3f43dc){return function(_0x1268a2){try{jsonpatch[_0x537e('0x27')](_0x1268a2,_0x3f43dc,!![]);}catch(_0x220d70){return BPromise[_0x537e('0x28')](_0x220d70);}return _0x1268a2[_0x537e('0x29')]();};}function saveUpdates(_0xe091be,_0x4ac154){return function(_0x61120a){if(_0x61120a){return _0x61120a[_0x537e('0x2a')](_0xe091be)[_0x537e('0x2b')](function(_0x2d3ab6){return _0x2d3ab6;});}return null;};}function removeEntity(_0x5c4e75,_0x59a8eb){return function(_0x463391){if(_0x463391){return _0x463391[_0x537e('0x2c')]()[_0x537e('0x2b')](function(){var _0x77ca31=_0x463391['get']({'plain':!![]});var _0x27927=[{'name':'VoiceQueues','value':_0x537e('0x2d'),'ignore':![]},{'name':_0x537e('0x2e'),'value':_0x537e('0x2f'),'ignore':![]}];var _0x20f5ff=_(_0x27927)['filter'](_0x537e('0x30'))[_0x537e('0x31')](_0x537e('0x32'))['value']();if(_[_0x537e('0x33')](_0x20f5ff,_0x77ca31[_0x537e('0x34')])){return;}var _0x139ee6=_['find'](_0x27927,[_0x537e('0x32'),_0x77ca31['type']])[_0x537e('0x35')];return db[_0x537e('0x36')]['destroy']({'where':{'type':_0x139ee6,'resourceId':_0x77ca31['id']}})[_0x537e('0x2b')](function(){return _0x463391;});})[_0x537e('0x2b')](function(){_0x5c4e75[_0x537e('0x1f')](0xcc)['end']();});}};}function handleEntityNotFound(_0x5e356e,_0x143fd4){return function(_0x5b453d){if(!_0x5b453d){_0x5e356e[_0x537e('0x1e')](0x194);}return _0x5b453d;};}function handleError(_0x2e78ad,_0x9386ce){_0x9386ce=_0x9386ce||0x1f4;return function(_0x5a43b0){logger[_0x537e('0x37')](_0x5a43b0[_0x537e('0x38')]);if(_0x5a43b0[_0x537e('0x35')]){delete _0x5a43b0[_0x537e('0x35')];}_0x2e78ad[_0x537e('0x1f')](_0x9386ce)[_0x537e('0x39')](_0x5a43b0);};}exports[_0x537e('0x3a')]=function(_0x32583d,_0x2cbaa0){var _0x103bf6={},_0x26f48a={},_0x1e2b1c={'count':0x0,'rows':[]};var _0x3892fe=_[_0x537e('0x31')](db[_0x537e('0x3b')][_0x537e('0x3c')],function(_0x26cfb4){return{'name':_0x26cfb4[_0x537e('0x3d')],'type':_0x26cfb4['type'][_0x537e('0x3e')]};});_0x26f48a[_0x537e('0x3f')]=_[_0x537e('0x31')](_0x3892fe,_0x537e('0x35'));_0x26f48a[_0x537e('0x40')]=_[_0x537e('0x41')](_0x32583d['query']);_0x26f48a['filters']=_[_0x537e('0x42')](_0x26f48a[_0x537e('0x3f')],_0x26f48a[_0x537e('0x40')]);_0x103bf6[_0x537e('0x43')]=_['intersection'](_0x26f48a[_0x537e('0x3f')],qs[_0x537e('0x44')](_0x32583d[_0x537e('0x40')][_0x537e('0x44')]));_0x103bf6['attributes']=_0x103bf6[_0x537e('0x43')][_0x537e('0x45')]?_0x103bf6['attributes']:_0x26f48a[_0x537e('0x3f')];if(!_0x32583d[_0x537e('0x40')][_0x537e('0x46')]('nolimit')){_0x103bf6[_0x537e('0x24')]=qs[_0x537e('0x24')](_0x32583d[_0x537e('0x40')][_0x537e('0x24')]);_0x103bf6[_0x537e('0x22')]=qs[_0x537e('0x22')](_0x32583d['query']['offset']);}_0x103bf6['order']=qs['sort'](_0x32583d[_0x537e('0x40')][_0x537e('0x47')]);_0x103bf6[_0x537e('0x48')]=qs[_0x537e('0x49')](_['pick'](_0x32583d[_0x537e('0x40')],_0x26f48a[_0x537e('0x49')]),_0x3892fe);if(_0x32583d[_0x537e('0x40')][_0x537e('0x4a')]){_0x103bf6[_0x537e('0x48')]=_[_0x537e('0x4b')](_0x103bf6[_0x537e('0x48')],{'$or':_['map'](_0x3892fe,function(_0x4125c5){if(_0x4125c5[_0x537e('0x34')]!==_0x537e('0x4c')){var _0x7bc7b4={};_0x7bc7b4[_0x4125c5[_0x537e('0x35')]]={'$like':'%'+_0x32583d[_0x537e('0x40')][_0x537e('0x4a')]+'%'};return _0x7bc7b4;}})});}_0x103bf6=_[_0x537e('0x4b')]({},_0x103bf6,_0x32583d[_0x537e('0x4d')]);var _0x1c2466={'where':_0x103bf6[_0x537e('0x48')]};return db[_0x537e('0x3b')][_0x537e('0x25')](_0x1c2466)['then'](function(_0x3d36b2){_0x1e2b1c[_0x537e('0x25')]=_0x3d36b2;if(_0x32583d[_0x537e('0x40')][_0x537e('0x4e')]){_0x103bf6[_0x537e('0x4f')]=[{'all':!![]}];}return db['VoiceQueue']['findAll'](_0x103bf6);})[_0x537e('0x2b')](function(_0x5d9262){_0x1e2b1c[_0x537e('0x50')]=_0x5d9262;return _0x1e2b1c;})[_0x537e('0x2b')](respondWithFilteredResult(_0x2cbaa0,_0x103bf6))['catch'](handleError(_0x2cbaa0,null));};exports[_0x537e('0x51')]=function(_0xb3bd23,_0x11f468){var _0x284c54={'raw':![],'where':{'id':_0xb3bd23[_0x537e('0x52')]['id']}},_0x41d3c1={};_0x41d3c1[_0x537e('0x3f')]=_[_0x537e('0x41')](db[_0x537e('0x3b')][_0x537e('0x3c')]);_0x41d3c1[_0x537e('0x40')]=_[_0x537e('0x41')](_0xb3bd23[_0x537e('0x40')]);_0x41d3c1[_0x537e('0x49')]=_['intersection'](_0x41d3c1['model'],_0x41d3c1[_0x537e('0x40')]);_0x284c54['attributes']=_[_0x537e('0x42')](_0x41d3c1['model'],qs[_0x537e('0x44')](_0xb3bd23[_0x537e('0x40')][_0x537e('0x44')]));_0x284c54['attributes']=_0x284c54[_0x537e('0x43')][_0x537e('0x45')]?_0x284c54[_0x537e('0x43')]:_0x41d3c1[_0x537e('0x3f')];if(_0xb3bd23[_0x537e('0x40')][_0x537e('0x4e')]){_0x284c54[_0x537e('0x4f')]=[{'all':!![]}];}_0x284c54=_[_0x537e('0x4b')]({},_0x284c54,_0xb3bd23[_0x537e('0x4d')]);return db[_0x537e('0x3b')][_0x537e('0x53')](_0x284c54)[_0x537e('0x2b')](handleEntityNotFound(_0x11f468,null))['then'](respondWithResult(_0x11f468,null))[_0x537e('0x54')](handleError(_0x11f468,null));};exports[_0x537e('0x55')]=function(_0x42bcee,_0xfc001b){return db[_0x537e('0x3b')][_0x537e('0x55')](_0x42bcee[_0x537e('0x56')],{})[_0x537e('0x2b')](function(_0x530154){var _0x55f7dd=_0x42bcee[_0x537e('0x57')][_0x537e('0x58')]({'plain':!![]});if(!_0x55f7dd)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x55f7dd[_0x537e('0x59')]===_0x537e('0x57')){var _0x13893a=_0x530154['get']({'plain':!![]});var _0x1caa4a=[{'name':'VoiceQueues','value':'inbound'},{'name':_0x537e('0x2e'),'value':_0x537e('0x2f')}];var _0x39beb9=_[_0x537e('0x53')](_0x1caa4a,[_0x537e('0x32'),_0x13893a[_0x537e('0x34')]])[_0x537e('0x35')];return db[_0x537e('0x5a')][_0x537e('0x53')]({'where':{'name':_0x39beb9,'userProfileId':_0x55f7dd[_0x537e('0x5b')]},'raw':!![]})[_0x537e('0x2b')](function(_0xe8f049){if(_0xe8f049&&_0xe8f049['autoAssociation']===0x0){return db[_0x537e('0x36')]['create']({'name':_0x13893a['name'],'resourceId':_0x13893a['id'],'type':_0xe8f049[_0x537e('0x35')],'sectionId':_0xe8f049['id']},{})[_0x537e('0x2b')](function(){return _0x530154;});}else{return _0x530154;}})[_0x537e('0x54')](function(_0x309223){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x309223);throw _0x309223;});}return _0x530154;})['then'](respondWithResult(_0xfc001b,0xc9))[_0x537e('0x54')](handleError(_0xfc001b,null));};exports[_0x537e('0x5c')]=function(_0x1ad21f,_0x1e2eae){var _0x3a7d3a={'where':{'id':_0x1ad21f[_0x537e('0x52')]['id']}},_0x2d25f2={};_0x2d25f2['model']=_[_0x537e('0x41')](db['VoiceQueue'][_0x537e('0x3c')]);_0x3a7d3a[_0x537e('0x43')]=_[_0x537e('0x42')](_0x2d25f2['model'],qs[_0x537e('0x44')](_0x1ad21f[_0x537e('0x40')][_0x537e('0x44')]));_0x3a7d3a['attributes']=_0x3a7d3a[_0x537e('0x43')]['length']?_0x3a7d3a[_0x537e('0x43')]:_0x2d25f2[_0x537e('0x3f')];if(_0x1ad21f['query'][_0x537e('0x4e')]){_0x3a7d3a[_0x537e('0x4f')]=[{'all':!![]}];}_0x3a7d3a=_[_0x537e('0x4b')]({},_0x3a7d3a,_0x1ad21f[_0x537e('0x4d')]);return db[_0x537e('0x3b')][_0x537e('0x53')](_0x3a7d3a)['then'](handleEntityNotFound(_0x1e2eae,null))[_0x537e('0x2b')](function(_0x3584b7){if(_0x3584b7){var _0x234ff4=_0x3584b7[_0x537e('0x58')]({'plain':!![]});_0x234ff4=qs['omit'](_0x234ff4,['id','createdAt',_0x537e('0x5d')]);_0x1ad21f[_0x537e('0x56')]=_[_0x537e('0x5e')](_0x1ad21f[_0x537e('0x56')],['id',_0x537e('0x5f'),_0x537e('0x5d')]);return db[_0x537e('0x3b')][_0x537e('0x55')](_[_0x537e('0x4b')](_0x234ff4,_0x1ad21f[_0x537e('0x56')]),{'include':_0x1ad21f[_0x537e('0x40')][_0x537e('0x4e')]?[{'all':!![]}]:undefined})[_0x537e('0x2b')](function(_0x2f67ff){var _0x54e5c9=_0x1ad21f[_0x537e('0x57')][_0x537e('0x58')]({'plain':!![]});if(!_0x54e5c9)throw new Error(_0x537e('0x60'));if(_0x54e5c9[_0x537e('0x59')]===_0x537e('0x57')){var _0x121f3c=_0x2f67ff[_0x537e('0x58')]({'plain':!![]});var _0x3ab96b=[{'name':_0x537e('0x61'),'value':_0x537e('0x2d')},{'name':'QueueCampaigns','value':'outbound'}];var _0x2d8846=_[_0x537e('0x53')](_0x3ab96b,[_0x537e('0x32'),_0x121f3c[_0x537e('0x34')]])[_0x537e('0x35')];return db[_0x537e('0x5a')][_0x537e('0x53')]({'where':{'name':_0x2d8846,'userProfileId':_0x54e5c9[_0x537e('0x5b')]},'raw':!![]})['then'](function(_0x2cb281){if(_0x2cb281&&_0x2cb281[_0x537e('0x62')]===0x0){return db[_0x537e('0x36')][_0x537e('0x55')]({'name':_0x121f3c[_0x537e('0x35')],'resourceId':_0x121f3c['id'],'type':_0x2cb281['name'],'sectionId':_0x2cb281['id']},{})[_0x537e('0x2b')](function(){return _0x2f67ff;});}else{return _0x2f67ff;}})['catch'](function(_0x2d7d9f){logger['error'](_0x537e('0x63'),_0x2d7d9f);throw _0x2d7d9f;});}return _0x2f67ff;});}})[_0x537e('0x2b')](respondWithResult(_0x1e2eae,0xc9))[_0x537e('0x54')](handleError(_0x1e2eae,null));};exports['update']=function(_0x1cfee5,_0x2268f5){if(_0x1cfee5[_0x537e('0x56')]['id']){delete _0x1cfee5[_0x537e('0x56')]['id'];}return db[_0x537e('0x3b')][_0x537e('0x53')]({'where':{'id':_0x1cfee5[_0x537e('0x52')]['id']}})[_0x537e('0x2b')](handleEntityNotFound(_0x2268f5,null))[_0x537e('0x2b')](saveUpdates(_0x1cfee5[_0x537e('0x56')],null))[_0x537e('0x2b')](respondWithResult(_0x2268f5,null))[_0x537e('0x54')](handleError(_0x2268f5,null));};exports[_0x537e('0x2c')]=function(_0x6d426e,_0x47218e){return db[_0x537e('0x3b')]['find']({'where':{'id':_0x6d426e['params']['id']}})[_0x537e('0x2b')](handleEntityNotFound(_0x47218e,null))[_0x537e('0x2b')](removeEntity(_0x47218e,null))[_0x537e('0x54')](handleError(_0x47218e,null));};exports[_0x537e('0x64')]=function(_0x1753d3,_0x4dc9c3,_0x2a37e0){var _0x4f4fe4={'raw':![],'where':{}};var _0x3ff5d0={};var _0x60689={'count':0x0,'rows':[]};return db[_0x537e('0x3b')][_0x537e('0x65')]({'where':{'id':_0x1753d3['params']['id']}})[_0x537e('0x2b')](handleEntityNotFound(_0x4dc9c3,null))[_0x537e('0x2b')](function(_0x4b6d69){if(_0x4b6d69){_0x3ff5d0['model']=_[_0x537e('0x41')](db['CmHopper'][_0x537e('0x3c')]);_0x3ff5d0[_0x537e('0x40')]=_['keys'](_0x1753d3['query']);_0x3ff5d0[_0x537e('0x49')]=_[_0x537e('0x42')](_0x3ff5d0[_0x537e('0x3f')],_0x3ff5d0[_0x537e('0x40')]);_0x4f4fe4[_0x537e('0x43')]=_['intersection'](_0x3ff5d0[_0x537e('0x3f')],qs[_0x537e('0x44')](_0x1753d3[_0x537e('0x40')][_0x537e('0x44')]));_0x4f4fe4[_0x537e('0x43')]=_0x4f4fe4[_0x537e('0x43')]['length']?_0x4f4fe4[_0x537e('0x43')]:_0x3ff5d0[_0x537e('0x3f')];if(!_0x1753d3[_0x537e('0x40')]['hasOwnProperty'](_0x537e('0x66'))){_0x4f4fe4[_0x537e('0x24')]=qs['limit'](_0x1753d3[_0x537e('0x40')]['limit']);_0x4f4fe4['offset']=qs[_0x537e('0x22')](_0x1753d3[_0x537e('0x40')][_0x537e('0x22')]);}_0x4f4fe4[_0x537e('0x67')]=qs['sort'](_0x1753d3[_0x537e('0x40')][_0x537e('0x47')]);_0x4f4fe4[_0x537e('0x48')]=qs[_0x537e('0x49')](_[_0x537e('0x68')](_0x1753d3[_0x537e('0x40')],_0x3ff5d0[_0x537e('0x49')]));_0x4f4fe4[_0x537e('0x48')]['VoiceQueueId']=_0x4b6d69['id'];if(_0x1753d3[_0x537e('0x40')][_0x537e('0x4a')]){_0x4f4fe4[_0x537e('0x48')]=_[_0x537e('0x4b')](_0x4f4fe4[_0x537e('0x48')],{'$or':_[_0x537e('0x31')](_0x4f4fe4['attributes'],function(_0x5b2793){var _0x4d4e3a={};_0x4d4e3a[_0x5b2793]={'$like':'%'+_0x1753d3[_0x537e('0x40')][_0x537e('0x4a')]+'%'};return _0x4d4e3a;})});}_0x4f4fe4=_[_0x537e('0x4b')]({},_0x4f4fe4,_0x1753d3['options']);return db[_0x537e('0x69')][_0x537e('0x25')]({'where':_0x4f4fe4[_0x537e('0x48')]})[_0x537e('0x2b')](function(_0x2dbe71){_0x60689[_0x537e('0x25')]=_0x2dbe71;if(_0x1753d3[_0x537e('0x40')]['includeAll']){_0x4f4fe4[_0x537e('0x4f')]=[{'all':!![]}];}return db['CmHopper']['findAll'](_0x4f4fe4);})[_0x537e('0x2b')](function(_0xf9ac5f){_0x60689[_0x537e('0x50')]=_0xf9ac5f;return _0x60689;});}})['then'](respondWithFilteredResult(_0x4dc9c3,_0x4f4fe4))[_0x537e('0x54')](handleError(_0x4dc9c3,null));};exports['getHopperHistories']=function(_0x119aad,_0x775817,_0x294a2f){var _0x3bd23a={'raw':!![],'where':{}};var _0xe1321={};var _0x19d99a={'count':0x0,'rows':[]};return db[_0x537e('0x3b')][_0x537e('0x65')]({'where':{'id':_0x119aad[_0x537e('0x52')]['id']}})[_0x537e('0x2b')](handleEntityNotFound(_0x775817,null))[_0x537e('0x2b')](function(_0x2d3663){if(_0x2d3663){_0xe1321['model']=_[_0x537e('0x41')](db['CmHopperHistory'][_0x537e('0x3c')]);_0xe1321[_0x537e('0x40')]=_['keys'](_0x119aad[_0x537e('0x40')]);_0xe1321[_0x537e('0x49')]=_['intersection'](_0xe1321[_0x537e('0x3f')],_0xe1321['query']);_0x3bd23a[_0x537e('0x43')]=_[_0x537e('0x42')](_0xe1321['model'],qs[_0x537e('0x44')](_0x119aad['query'][_0x537e('0x44')]));_0x3bd23a[_0x537e('0x43')]=_0x3bd23a[_0x537e('0x43')][_0x537e('0x45')]?_0x3bd23a['attributes']:_0xe1321[_0x537e('0x3f')];if(!_0x119aad[_0x537e('0x40')]['hasOwnProperty'](_0x537e('0x66'))){_0x3bd23a['limit']=qs[_0x537e('0x24')](_0x119aad[_0x537e('0x40')][_0x537e('0x24')]);_0x3bd23a[_0x537e('0x22')]=qs[_0x537e('0x22')](_0x119aad[_0x537e('0x40')][_0x537e('0x22')]);}_0x3bd23a[_0x537e('0x67')]=qs[_0x537e('0x47')](_0x119aad[_0x537e('0x40')][_0x537e('0x47')]);_0x3bd23a[_0x537e('0x48')]=qs['filters'](_[_0x537e('0x68')](_0x119aad[_0x537e('0x40')],_0xe1321['filters']));_0x3bd23a[_0x537e('0x48')][_0x537e('0x6a')]=_0x2d3663['id'];if(_0x119aad['query'][_0x537e('0x4a')]){_0x3bd23a[_0x537e('0x48')]=_['merge'](_0x3bd23a[_0x537e('0x48')],{'$or':_[_0x537e('0x31')](_0x3bd23a['attributes'],function(_0x20454e){var _0x874ff2={};_0x874ff2[_0x20454e]={'$like':'%'+_0x119aad['query'][_0x537e('0x4a')]+'%'};return _0x874ff2;})});}_0x3bd23a=_[_0x537e('0x4b')]({},_0x3bd23a,_0x119aad[_0x537e('0x4d')]);return db[_0x537e('0x6b')][_0x537e('0x25')]({'where':_0x3bd23a['where']})[_0x537e('0x2b')](function(_0x3db340){_0x19d99a['count']=_0x3db340;if(_0x119aad['query'][_0x537e('0x4e')]){_0x3bd23a['include']=[{'all':!![]}];}return db[_0x537e('0x6b')][_0x537e('0x6c')](_0x3bd23a);})[_0x537e('0x2b')](function(_0x5cc736){_0x19d99a['rows']=_0x5cc736;return _0x19d99a;});}})[_0x537e('0x2b')](respondWithFilteredResult(_0x775817,_0x3bd23a))[_0x537e('0x54')](handleError(_0x775817,null));};exports[_0x537e('0x6d')]=function(_0x5989ed,_0x192812,_0xfce8cd){var _0x2a25d5={'raw':!![],'where':{}};var _0x4ce7b6={};var _0x208180={'count':0x0,'rows':[]};return db[_0x537e('0x3b')]['findOne']({'where':{'id':_0x5989ed[_0x537e('0x52')]['id']}})[_0x537e('0x2b')](handleEntityNotFound(_0x192812,null))['then'](function(_0xc745e){if(_0xc745e){_0x4ce7b6[_0x537e('0x3f')]=_['keys'](db['CmHopperFinal'][_0x537e('0x3c')]);_0x4ce7b6[_0x537e('0x40')]=_['keys'](_0x5989ed[_0x537e('0x40')]);_0x4ce7b6[_0x537e('0x49')]=_[_0x537e('0x42')](_0x4ce7b6[_0x537e('0x3f')],_0x4ce7b6[_0x537e('0x40')]);_0x2a25d5['attributes']=_[_0x537e('0x42')](_0x4ce7b6[_0x537e('0x3f')],qs[_0x537e('0x44')](_0x5989ed[_0x537e('0x40')][_0x537e('0x44')]));_0x2a25d5[_0x537e('0x43')]=_0x2a25d5[_0x537e('0x43')][_0x537e('0x45')]?_0x2a25d5[_0x537e('0x43')]:_0x4ce7b6[_0x537e('0x3f')];if(!_0x5989ed[_0x537e('0x40')][_0x537e('0x46')]('nolimit')){_0x2a25d5[_0x537e('0x24')]=qs[_0x537e('0x24')](_0x5989ed[_0x537e('0x40')][_0x537e('0x24')]);_0x2a25d5[_0x537e('0x22')]=qs[_0x537e('0x22')](_0x5989ed[_0x537e('0x40')][_0x537e('0x22')]);}_0x2a25d5[_0x537e('0x67')]=qs[_0x537e('0x47')](_0x5989ed['query']['sort']);_0x2a25d5[_0x537e('0x48')]=qs['filters'](_[_0x537e('0x68')](_0x5989ed['query'],_0x4ce7b6[_0x537e('0x49')]));_0x2a25d5[_0x537e('0x48')][_0x537e('0x6a')]=_0xc745e['id'];if(_0x5989ed[_0x537e('0x40')]['filter']){_0x2a25d5['where']=_['merge'](_0x2a25d5[_0x537e('0x48')],{'$or':_[_0x537e('0x31')](_0x2a25d5[_0x537e('0x43')],function(_0x9aca27){var _0x2958ad={};_0x2958ad[_0x9aca27]={'$like':'%'+_0x5989ed['query'][_0x537e('0x4a')]+'%'};return _0x2958ad;})});}_0x2a25d5=_[_0x537e('0x4b')]({},_0x2a25d5,_0x5989ed[_0x537e('0x4d')]);return db[_0x537e('0x6e')][_0x537e('0x25')]({'where':_0x2a25d5[_0x537e('0x48')]})[_0x537e('0x2b')](function(_0x1de5cc){_0x208180[_0x537e('0x25')]=_0x1de5cc;if(_0x5989ed['query'][_0x537e('0x4e')]){_0x2a25d5[_0x537e('0x4f')]=[{'all':!![]}];}return db[_0x537e('0x6e')][_0x537e('0x6c')](_0x2a25d5);})[_0x537e('0x2b')](function(_0x180fdd){_0x208180[_0x537e('0x50')]=_0x180fdd;return _0x208180;});}})[_0x537e('0x2b')](respondWithFilteredResult(_0x192812,_0x2a25d5))['catch'](handleError(_0x192812,null));};exports[_0x537e('0x6f')]=function(_0x1e7d44,_0x4c798a,_0x493ed3){var _0x597d6c={'raw':!![],'where':{}};var _0x2b3c11={};var _0x446ec5={'count':0x0,'rows':[]};return db[_0x537e('0x3b')][_0x537e('0x65')]({'where':{'id':_0x1e7d44[_0x537e('0x52')]['id']}})[_0x537e('0x2b')](handleEntityNotFound(_0x4c798a,null))[_0x537e('0x2b')](function(_0x370a77){if(_0x370a77){_0x2b3c11[_0x537e('0x3f')]=_[_0x537e('0x41')](db[_0x537e('0x70')][_0x537e('0x3c')]);_0x2b3c11[_0x537e('0x40')]=_[_0x537e('0x41')](_0x1e7d44[_0x537e('0x40')]);_0x2b3c11[_0x537e('0x49')]=_[_0x537e('0x42')](_0x2b3c11['model'],_0x2b3c11['query']);_0x597d6c['attributes']=_[_0x537e('0x42')](_0x2b3c11['model'],qs[_0x537e('0x44')](_0x1e7d44[_0x537e('0x40')]['fields']));_0x597d6c['attributes']=_0x597d6c[_0x537e('0x43')][_0x537e('0x45')]?_0x597d6c[_0x537e('0x43')]:_0x2b3c11[_0x537e('0x3f')];if(!_0x1e7d44[_0x537e('0x40')]['hasOwnProperty'](_0x537e('0x66'))){_0x597d6c['limit']=qs[_0x537e('0x24')](_0x1e7d44[_0x537e('0x40')]['limit']);_0x597d6c[_0x537e('0x22')]=qs[_0x537e('0x22')](_0x1e7d44[_0x537e('0x40')][_0x537e('0x22')]);}_0x597d6c['order']=qs[_0x537e('0x47')](_0x1e7d44[_0x537e('0x40')]['sort']);_0x597d6c[_0x537e('0x48')]=qs['filters'](_[_0x537e('0x68')](_0x1e7d44[_0x537e('0x40')],_0x2b3c11[_0x537e('0x49')]));_0x597d6c[_0x537e('0x48')][_0x537e('0x6a')]=_0x370a77['id'];if(_0x1e7d44[_0x537e('0x40')][_0x537e('0x4a')]){_0x597d6c[_0x537e('0x48')]=_['merge'](_0x597d6c[_0x537e('0x48')],{'$or':_[_0x537e('0x31')](_0x597d6c[_0x537e('0x43')],function(_0x5c856f){var _0x1a00ef={};_0x1a00ef[_0x5c856f]={'$like':'%'+_0x1e7d44[_0x537e('0x40')][_0x537e('0x4a')]+'%'};return _0x1a00ef;})});}_0x597d6c=_['merge']({},_0x597d6c,_0x1e7d44[_0x537e('0x4d')]);return db[_0x537e('0x70')][_0x537e('0x25')]({'where':_0x597d6c[_0x537e('0x48')]})['then'](function(_0x15560b){_0x446ec5[_0x537e('0x25')]=_0x15560b;if(_0x1e7d44[_0x537e('0x40')][_0x537e('0x4e')]){_0x597d6c[_0x537e('0x4f')]=[{'all':!![]}];}return db[_0x537e('0x70')][_0x537e('0x6c')](_0x597d6c);})[_0x537e('0x2b')](function(_0x120282){_0x446ec5[_0x537e('0x50')]=_0x120282;return _0x446ec5;});}})['then'](respondWithFilteredResult(_0x4c798a,_0x597d6c))[_0x537e('0x54')](handleError(_0x4c798a,null));};exports[_0x537e('0x71')]=function(_0x43dded,_0x24d95f,_0x3acafb){var _0x5a038c={};var _0x37b303={};var _0x4994db;var _0x59ada6;return db['VoiceQueue']['findOne']({'where':{'id':_0x43dded[_0x537e('0x52')]['id']}})['then'](handleEntityNotFound(_0x24d95f,null))['then'](function(_0x30c78e){if(_0x30c78e){_0x4994db=_0x30c78e;_0x37b303[_0x537e('0x3f')]=_[_0x537e('0x41')](db['Team'][_0x537e('0x3c')]);_0x37b303[_0x537e('0x40')]=_[_0x537e('0x41')](_0x43dded['query']);_0x37b303['filters']=_[_0x537e('0x42')](_0x37b303[_0x537e('0x3f')],_0x37b303['query']);_0x5a038c[_0x537e('0x43')]=_[_0x537e('0x42')](_0x37b303[_0x537e('0x3f')],qs[_0x537e('0x44')](_0x43dded[_0x537e('0x40')]['fields']));_0x5a038c['attributes']=_0x5a038c[_0x537e('0x43')]['length']?_0x5a038c[_0x537e('0x43')]:_0x37b303['model'];_0x5a038c[_0x537e('0x67')]=qs[_0x537e('0x47')](_0x43dded[_0x537e('0x40')][_0x537e('0x47')]);_0x5a038c[_0x537e('0x48')]=qs[_0x537e('0x49')](_[_0x537e('0x68')](_0x43dded[_0x537e('0x40')],_0x37b303[_0x537e('0x49')]));if(_0x43dded[_0x537e('0x40')]['filter']){_0x5a038c[_0x537e('0x48')]=_[_0x537e('0x4b')](_0x5a038c['where'],{'$or':_[_0x537e('0x31')](_0x5a038c[_0x537e('0x43')],function(_0x418e1e){var _0x5c4025={};_0x5c4025[_0x418e1e]={'$like':'%'+_0x43dded[_0x537e('0x40')][_0x537e('0x4a')]+'%'};return _0x5c4025;})});}_0x5a038c=_['merge']({},_0x5a038c,_0x43dded[_0x537e('0x4d')]);return _0x4994db[_0x537e('0x71')](_0x5a038c);}})[_0x537e('0x2b')](function(_0x599cc7){if(_0x599cc7){_0x59ada6=_0x599cc7[_0x537e('0x45')];if(!_0x43dded[_0x537e('0x40')][_0x537e('0x46')](_0x537e('0x66'))){_0x5a038c[_0x537e('0x24')]=qs[_0x537e('0x24')](_0x43dded[_0x537e('0x40')]['limit']);_0x5a038c[_0x537e('0x22')]=qs[_0x537e('0x22')](_0x43dded['query'][_0x537e('0x22')]);}return _0x4994db[_0x537e('0x71')](_0x5a038c);}})[_0x537e('0x2b')](function(_0x3fce50){if(_0x3fce50){return _0x3fce50?{'count':_0x59ada6,'rows':_0x3fce50}:null;}})['then'](respondWithResult(_0x24d95f,null))['catch'](handleError(_0x24d95f,null));};exports[_0x537e('0x72')]=function(_0x397245,_0x432571,_0x69e2dd){var _0x5824b7=_0x397245[_0x537e('0x56')][_0x537e('0x73')];var _0x271969=_[_0x537e('0x31')](_0x5824b7,'id');return db[_0x537e('0x74')][_0x537e('0x6c')]({'where':{'id':_0x271969},'attributes':['id'],'include':[{'model':db[_0x537e('0x75')],'as':_0x537e('0x76'),'attributes':['id',_0x537e('0x35'),'online',_0x537e('0x77'),_0x537e('0x78')],'raw':!![]}]})[_0x537e('0x2b')](function(_0x19dcd5){if(_0x19dcd5){var _0x391622=_[_0x537e('0x79')](_0x19dcd5,function(_0x27641c){var _0x3a1bca=_0x27641c[_0x537e('0x58')]({'plain':!![]});_0x3a1bca[_0x537e('0x76')]['forEach'](function(_0x4c1d06){_0x4c1d06[_0x537e('0x7a')]=_['find'](_0x5824b7,{'id':_0x3a1bca['id']})[_0x537e('0x7a')];});return _0x3a1bca[_0x537e('0x76')];});return db[_0x537e('0x3b')][_0x537e('0x53')]({'where':{'id':_0x397245[_0x537e('0x52')]['id']}})['then'](function(_0x269a82){return db[_0x537e('0x7b')][_0x537e('0x7c')](function(_0x54659a){return _0x269a82[_0x537e('0x72')](_0x271969,{'transaction':_0x54659a})[_0x537e('0x2b')](function(){return BPromise[_0x537e('0x7d')](_0x5824b7,function(_0x272b3f){return db[_0x537e('0x7e')][_0x537e('0x7f')]({'TeamId':_0x272b3f['id'],'VoiceQueueId':_0x397245['params']['id'],'penalty':_0x272b3f[_0x537e('0x7a')]},{'transaction':_0x54659a});});})[_0x537e('0x2b')](function(){return BPromise['each'](_0x391622,function(_0x3e9deb){return db[_0x537e('0x80')][_0x537e('0x81')]({'where':{'UserId':_0x3e9deb['id'],'VoiceQueueId':_0x397245[_0x537e('0x52')]['id']},'defaults':{'penalty':_0x3e9deb[_0x537e('0x7a')]},'transaction':_0x54659a});});})[_0x537e('0x2b')](function(){return BPromise[_0x537e('0x7d')](_[_0x537e('0x4a')](_0x391622,{'online':!![]}),function(_0xb6d735){return db[_0x537e('0x82')][_0x537e('0x7f')]({'membername':_0xb6d735['name'],'UserId':_0xb6d735['id'],'queue_name':_0x269a82[_0x537e('0x35')],'VoiceQueueId':_0x269a82['id'],'interface':_['isNil'](_0xb6d735[_0x537e('0x78')])?util[_0x537e('0x83')](_0x537e('0x84'),_0xb6d735[_0x537e('0x35')]):_0xb6d735[_0x537e('0x78')],'paused':_0xb6d735[_0x537e('0x77')]||![],'penalty':_0xb6d735[_0x537e('0x7a')]},{'transaction':_0x54659a});});})[_0x537e('0x2b')](function(){_0x391622[_0x537e('0x85')](function(_0x44ac66){socket['emit'](_0x537e('0x86'),{'UserId':_0x44ac66['id'],'VoiceQueueId':_0x269a82['id']});});});});});}})['then'](respondWithStatusCode(_0x432571,null))[_0x537e('0x54')](handleError(_0x432571,null));};exports['removeTeams']=function(_0x413e11,_0x382c1c,_0x2fad47){return db[_0x537e('0x74')][_0x537e('0x6c')]({'where':{'id':_0x413e11['query'][_0x537e('0x87')]},'attributes':['id'],'include':[{'model':db[_0x537e('0x75')],'as':_0x537e('0x76'),'attributes':['id'],'raw':!![]}]})[_0x537e('0x2b')](handleEntityNotFound(_0x382c1c,null))[_0x537e('0x2b')](function(_0x294046){var _0x12f437=_[_0x537e('0x31')](_0x294046,'id');var _0x2ae6ec=[];var _0x4cd6e9=[];var _0x28e899=squel[_0x537e('0x88')]();_0x28e899['field'](_0x537e('0x89'))[_0x537e('0x8a')]('team_has_voice_queues','tq')[_0x537e('0x8b')]('user_has_teams','ut',_0x537e('0x8c'))[_0x537e('0x48')]('VoiceQueueId\x20=\x20?',_0x413e11[_0x537e('0x52')]['id']);for(var _0x44fcdb=0x0;_0x44fcdb<_0x294046[_0x537e('0x45')];_0x44fcdb+=0x1){let _0x4f5dbb=_0x294046[_0x44fcdb];for(var _0x13bc6d=0x0;_0x13bc6d<_0x4f5dbb[_0x537e('0x76')]['length'];_0x13bc6d+=0x1){let _0x21c34c=_0x4f5dbb[_0x537e('0x76')][_0x13bc6d];var _0x213013=_0x28e899[_0x537e('0x5c')]();_0x213013[_0x537e('0x48')](_0x537e('0x8d'),_0x21c34c['id']);_0x4cd6e9[_0x537e('0x8e')](db['sequelize']['query'](_0x213013[_0x537e('0x8f')](),{'type':db[_0x537e('0x7b')][_0x537e('0x90')][_0x537e('0x91')]})[_0x537e('0x2b')](function(_0x55df54){if(_0x55df54[_0x537e('0x45')]===0x1){return _0x21c34c['id'];}else{var _0x2e0ea5=_[_0x537e('0x92')](_[_0x537e('0x31')](_0x55df54,_0x537e('0x93')),function(_0x10a710){return _[_0x537e('0x33')](_0x12f437,_0x10a710);});if(_0x2e0ea5){return _0x21c34c['id'];}}}));}}return BPromise[_0x537e('0x94')](_0x4cd6e9)[_0x537e('0x2b')](function(_0x19fc84){_0x2ae6ec=_(_0x2ae6ec)[_0x537e('0x95')](_0x19fc84)['compact']()[_0x537e('0x32')]();return db['VoiceQueue'][_0x537e('0x53')]({'where':{'id':_0x413e11[_0x537e('0x52')]['id']}})[_0x537e('0x2b')](function(_0x34d786){return db['sequelize'][_0x537e('0x7c')](function(_0x4894f4){return _0x34d786[_0x537e('0x96')](_0x413e11[_0x537e('0x40')]['ids'],{'transaction':_0x4894f4})['then'](function(){if(!_['isEmpty'](_0x2ae6ec)){return _0x34d786[_0x537e('0x97')](_0x2ae6ec,{'transaction':_0x4894f4})[_0x537e('0x2b')](function(){return db[_0x537e('0x82')]['destroy']({'where':{'VoiceQueueId':_0x413e11[_0x537e('0x52')]['id'],'UserId':_0x2ae6ec},'transaction':_0x4894f4});});}})[_0x537e('0x2b')](function(){_0x2ae6ec[_0x537e('0x85')](function(_0x3a597d){socket[_0x537e('0x98')](_0x537e('0x99'),{'UserId':_0x3a597d,'VoiceQueueId':_0x34d786['id']});});});});});});})[_0x537e('0x2b')](respondWithStatusCode(_0x382c1c,null))[_0x537e('0x54')](handleError(_0x382c1c,null));};exports[_0x537e('0x9a')]=function(_0x2955e5,_0x23cf68,_0x4c8187){var _0x4ac298,_0x3fd0d6;return db['VoiceQueue'][_0x537e('0x53')]({'where':{'id':_0x2955e5['params']['id']}})[_0x537e('0x2b')](handleEntityNotFound(_0x23cf68,null))['then'](function(_0x2c9f1f){if(_0x2c9f1f){_0x3fd0d6=_0x2c9f1f;return _0x2c9f1f['addAgents'](_0x2955e5[_0x537e('0x56')][_0x537e('0x87')],_['omit'](_0x2955e5[_0x537e('0x56')],[_0x537e('0x87'),'id'])||{})[_0x537e('0x9b')](function(_0x398d7a){for(var _0xd23242=0x0;_0xd23242<_0x2955e5[_0x537e('0x56')][_0x537e('0x87')][_0x537e('0x45')];_0xd23242+=0x1){socket[_0x537e('0x98')]('userVoiceQueue:save',{'UserId':_0x2955e5['body'][_0x537e('0x87')][_0xd23242],'VoiceQueueId':_0x2955e5['params']['id']});}return _0x398d7a;});}})[_0x537e('0x2b')](function(_0x1bd4a6){_0x4ac298=_0x1bd4a6||[];if(_0x3fd0d6){return db['User'][_0x537e('0x6c')]({'where':{'id':_0x2955e5[_0x537e('0x56')][_0x537e('0x87')]},'attributes':['id',_0x537e('0x35'),_0x537e('0x9c'),_0x537e('0x77'),_0x537e('0x78')],'raw':!![]});}})[_0x537e('0x2b')](function(_0x5ded12){if(!_[_0x537e('0x9d')](_0x5ded12)){var _0x9898d3=[];for(var _0x57fc7f=0x0;_0x57fc7f<_0x5ded12[_0x537e('0x45')];_0x57fc7f++){if(_0x5ded12[_0x57fc7f][_0x537e('0x9c')]){_0x9898d3[_0x537e('0x8e')](db[_0x537e('0x82')][_0x537e('0x7f')]({'membername':_0x5ded12[_0x57fc7f][_0x537e('0x35')],'UserId':_0x5ded12[_0x57fc7f]['id'],'queue_name':_0x3fd0d6[_0x537e('0x35')],'VoiceQueueId':_0x3fd0d6['id'],'interface':_[_0x537e('0x9e')](_0x5ded12[_0x57fc7f][_0x537e('0x78')])?util[_0x537e('0x83')](_0x537e('0x84'),_0x5ded12[_0x57fc7f][_0x537e('0x35')]):_0x5ded12[_0x57fc7f][_0x537e('0x78')],'paused':_0x5ded12[_0x57fc7f][_0x537e('0x77')]||![],'penalty':_0x2955e5['body']['penalty']||0x0}));}}return BPromise[_0x537e('0x94')](_0x9898d3);}})[_0x537e('0x2b')](function(){return _0x4ac298;})[_0x537e('0x2b')](respondWithResult(_0x23cf68,null))[_0x537e('0x54')](handleError(_0x23cf68,null));};exports[_0x537e('0x97')]=function(_0xb82acf,_0x1ad75b,_0x2534b7){return db[_0x537e('0x3b')][_0x537e('0x53')]({'where':{'id':_0xb82acf['params']['id']}})[_0x537e('0x2b')](handleEntityNotFound(_0x1ad75b,null))[_0x537e('0x2b')](function(_0x12140e){if(_0x12140e){return _0x12140e[_0x537e('0x97')](_0xb82acf[_0x537e('0x40')][_0x537e('0x87')])['then'](function(){if(_['isArray'](_0xb82acf[_0x537e('0x40')][_0x537e('0x87')])){for(var _0x275813=0x0;_0x275813<_0xb82acf['query'][_0x537e('0x87')][_0x537e('0x45')];_0x275813+=0x1){socket[_0x537e('0x98')](_0x537e('0x99'),{'UserId':Number(_0xb82acf[_0x537e('0x40')]['ids'][_0x275813]),'VoiceQueueId':Number(_0xb82acf[_0x537e('0x52')]['id'])});}}else{socket[_0x537e('0x98')](_0x537e('0x99'),{'UserId':Number(_0xb82acf[_0x537e('0x40')][_0x537e('0x87')]),'VoiceQueueId':Number(_0xb82acf['params']['id'])});}});}})[_0x537e('0x2b')](function(_0x2787e6){return db[_0x537e('0x82')]['destroy']({'where':{'VoiceQueueId':_0xb82acf[_0x537e('0x52')]['id'],'UserId':_0xb82acf['query']['ids']}})[_0x537e('0x2b')](function(){return _0x2787e6;});})['then'](respondWithStatusCode(_0x1ad75b,null))[_0x537e('0x54')](handleError(_0x1ad75b,null));};exports[_0x537e('0x9f')]=function(_0x47087c,_0x68457c,_0x13e9a4){var _0x5b83fb={};var _0x6ec26b={};var _0x18fd54;var _0x2408de;return db[_0x537e('0x3b')][_0x537e('0x65')]({'where':{'id':_0x47087c[_0x537e('0x52')]['id']}})[_0x537e('0x2b')](handleEntityNotFound(_0x68457c,null))[_0x537e('0x2b')](function(_0x1b2ae0){if(_0x1b2ae0){_0x18fd54=_0x1b2ae0;_0x6ec26b[_0x537e('0x3f')]=_[_0x537e('0x41')](db[_0x537e('0x75')][_0x537e('0x3c')]);_0x6ec26b[_0x537e('0x40')]=_[_0x537e('0x41')](_0x47087c['query']);_0x6ec26b[_0x537e('0x49')]=_[_0x537e('0x42')](_0x6ec26b['model'],_0x6ec26b[_0x537e('0x40')]);_0x5b83fb[_0x537e('0x43')]=_[_0x537e('0x42')](_0x6ec26b[_0x537e('0x3f')],qs[_0x537e('0x44')](_0x47087c['query'][_0x537e('0x44')]));_0x5b83fb['attributes']=_0x5b83fb[_0x537e('0x43')][_0x537e('0x45')]?_0x5b83fb['attributes']:_0x6ec26b[_0x537e('0x3f')];_0x5b83fb[_0x537e('0x67')]=qs[_0x537e('0x47')](_0x47087c[_0x537e('0x40')]['sort']);_0x5b83fb[_0x537e('0x48')]=qs['filters'](_[_0x537e('0x68')](_0x47087c[_0x537e('0x40')],_0x6ec26b[_0x537e('0x49')]));if(_0x47087c[_0x537e('0x40')][_0x537e('0x4a')]){_0x5b83fb[_0x537e('0x48')]=_[_0x537e('0x4b')](_0x5b83fb[_0x537e('0x48')],{'$or':_['map'](_0x5b83fb['attributes'],function(_0x41b419){var _0x15478b={};_0x15478b[_0x41b419]={'$like':'%'+_0x47087c[_0x537e('0x40')][_0x537e('0x4a')]+'%'};return _0x15478b;})});}_0x5b83fb=_[_0x537e('0x4b')]({},_0x5b83fb,_0x47087c[_0x537e('0x4d')]);return _0x18fd54[_0x537e('0x9f')](_0x5b83fb);}})['then'](function(_0x12877c){if(_0x12877c){_0x2408de=_0x12877c[_0x537e('0x45')];if(!_0x47087c['query'][_0x537e('0x46')](_0x537e('0x66'))){_0x5b83fb[_0x537e('0x24')]=qs[_0x537e('0x24')](_0x47087c[_0x537e('0x40')][_0x537e('0x24')]);_0x5b83fb[_0x537e('0x22')]=qs[_0x537e('0x22')](_0x47087c[_0x537e('0x40')]['offset']);}return _0x18fd54['getAgents'](_0x5b83fb);}})[_0x537e('0x2b')](function(_0x4b9224){if(_0x4b9224){return _0x4b9224?{'count':_0x2408de,'rows':_0x4b9224}:null;}})['then'](respondWithResult(_0x68457c,null))[_0x537e('0x54')](handleError(_0x68457c,null));};exports[_0x537e('0xa0')]=function(_0x363bd6,_0x25f4fe,_0x5a648a){var _0x100727={};var _0x514acc={};var _0x166730;var _0x4e9d59;return db[_0x537e('0x3b')]['findOne']({'where':{'id':_0x363bd6[_0x537e('0x52')]['id']}})[_0x537e('0x2b')](handleEntityNotFound(_0x25f4fe,null))[_0x537e('0x2b')](function(_0x23cbfe){if(_0x23cbfe){_0x166730=_0x23cbfe;_0x514acc['model']=_[_0x537e('0x41')](db[_0x537e('0x82')][_0x537e('0x3c')]);_0x514acc[_0x537e('0x40')]=_[_0x537e('0x41')](_0x363bd6[_0x537e('0x40')]);_0x514acc[_0x537e('0x49')]=_[_0x537e('0x42')](_0x514acc[_0x537e('0x3f')],_0x514acc[_0x537e('0x40')]);_0x100727[_0x537e('0x43')]=_['intersection'](_0x514acc[_0x537e('0x3f')],qs[_0x537e('0x44')](_0x363bd6[_0x537e('0x40')][_0x537e('0x44')]));_0x100727[_0x537e('0x43')]=_0x100727['attributes'][_0x537e('0x45')]?_0x100727['attributes']:_0x514acc[_0x537e('0x3f')];_0x100727['order']=qs['sort'](_0x363bd6[_0x537e('0x40')]['sort']);_0x100727[_0x537e('0x48')]=qs[_0x537e('0x49')](_[_0x537e('0x68')](_0x363bd6['query'],_0x514acc[_0x537e('0x49')]));if(_0x363bd6['query']['filter']){_0x100727[_0x537e('0x48')]=_[_0x537e('0x4b')](_0x100727[_0x537e('0x48')],{'$or':_[_0x537e('0x31')](_0x100727[_0x537e('0x43')],function(_0x113eeb){var _0x30e5a9={};_0x30e5a9[_0x113eeb]={'$like':'%'+_0x363bd6['query'][_0x537e('0x4a')]+'%'};return _0x30e5a9;})});}_0x100727=_[_0x537e('0x4b')]({},_0x100727,_0x363bd6[_0x537e('0x4d')]);return _0x166730[_0x537e('0xa0')](_0x100727);}})[_0x537e('0x2b')](function(_0x559633){if(_0x559633){_0x4e9d59=_0x559633['length'];if(!_0x363bd6[_0x537e('0x40')]['hasOwnProperty'](_0x537e('0x66'))){_0x100727[_0x537e('0x24')]=qs[_0x537e('0x24')](_0x363bd6[_0x537e('0x40')]['limit']);_0x100727[_0x537e('0x22')]=qs['offset'](_0x363bd6[_0x537e('0x40')][_0x537e('0x22')]);}return _0x166730['getMembers'](_0x100727);}})[_0x537e('0x2b')](function(_0x201e99){return _0x201e99?{'count':_0x4e9d59,'rows':_0x201e99}:null;})[_0x537e('0x2b')](respondWithResult(_0x25f4fe,null))[_0x537e('0x54')](handleError(_0x25f4fe,null));};exports['getLists']=function(_0xbd8e34,_0x5dffbf,_0x2049a1){var _0x151945={};var _0x2e0174={};var _0x305e0b;var _0x59c589;return db['VoiceQueue'][_0x537e('0x65')]({'where':{'id':_0xbd8e34['params']['id']}})[_0x537e('0x2b')](handleEntityNotFound(_0x5dffbf,null))[_0x537e('0x2b')](function(_0x3577d1){if(_0x3577d1){_0x305e0b=_0x3577d1;_0x2e0174['model']=_[_0x537e('0x41')](db[_0x537e('0xa1')]['rawAttributes']);_0x2e0174['query']=_[_0x537e('0x41')](_0xbd8e34[_0x537e('0x40')]);_0x2e0174[_0x537e('0x49')]=_[_0x537e('0x42')](_0x2e0174[_0x537e('0x3f')],_0x2e0174[_0x537e('0x40')]);_0x151945['attributes']=_[_0x537e('0x42')](_0x2e0174['model'],qs['fields'](_0xbd8e34[_0x537e('0x40')]['fields']));_0x151945[_0x537e('0x43')]=_0x151945['attributes']['length']?_0x151945[_0x537e('0x43')]:_0x2e0174[_0x537e('0x3f')];_0x151945[_0x537e('0x67')]=qs['sort'](_0xbd8e34['query'][_0x537e('0x47')]);_0x151945[_0x537e('0x48')]=qs[_0x537e('0x49')](_['pick'](_0xbd8e34[_0x537e('0x40')],_0x2e0174[_0x537e('0x49')]));if(_0xbd8e34[_0x537e('0x40')]['filter']){_0x151945[_0x537e('0x48')]=_['merge'](_0x151945['where'],{'$or':_[_0x537e('0x31')](_0x151945[_0x537e('0x43')],function(_0x3044e9){var _0x4502f1={};_0x4502f1[_0x3044e9]={'$like':'%'+_0xbd8e34[_0x537e('0x40')][_0x537e('0x4a')]+'%'};return _0x4502f1;})});}_0x151945=_[_0x537e('0x4b')]({},_0x151945,_0xbd8e34[_0x537e('0x4d')]);return _0x305e0b[_0x537e('0xa2')](_0x151945);}})[_0x537e('0x2b')](function(_0x30bdde){if(_0x30bdde){_0x59c589=_0x30bdde['length'];if(!_0xbd8e34[_0x537e('0x40')][_0x537e('0x46')](_0x537e('0x66'))){_0x151945['limit']=qs[_0x537e('0x24')](_0xbd8e34[_0x537e('0x40')][_0x537e('0x24')]);_0x151945['offset']=qs[_0x537e('0x22')](_0xbd8e34[_0x537e('0x40')][_0x537e('0x22')]);}return _0x305e0b['getLists'](_0x151945);}})[_0x537e('0x2b')](function(_0x5f475d){if(_0x5f475d){return _0x5f475d?{'count':_0x59c589,'rows':_0x5f475d}:null;}})['then'](respondWithResult(_0x5dffbf,null))['catch'](handleError(_0x5dffbf,null));};exports[_0x537e('0xa3')]=function(_0x27d150,_0x254c6a,_0x1987e9){var _0x533440,_0x54bf0b;return db[_0x537e('0x3b')][_0x537e('0x53')]({'where':{'id':_0x27d150[_0x537e('0x52')]['id']}})['then'](handleEntityNotFound(_0x254c6a,null))[_0x537e('0x2b')](function(_0xc97367){if(_0xc97367){_0x54bf0b=_0xc97367;return _0xc97367[_0x537e('0xa3')](_0x27d150['body'][_0x537e('0x87')],_[_0x537e('0x5e')](_0x27d150['body'],['ids','id'])||{});}return null;})['spread'](function(_0x12a5ea){var _0x1c60d0;_0x533440=_0x12a5ea||[];var _0x88d726=[];if(_0x12a5ea){for(var _0x133bb0=0x0;_0x133bb0<_0x12a5ea[_0x537e('0x45')];_0x133bb0+=0x1){var _0x1be782=_0x12a5ea[_0x133bb0][_0x537e('0x58')]({'plain':!![]});_0x54bf0b[_0x537e('0xa4')]=_0x27d150[_0x537e('0x56')][_0x537e('0xa4')]?_0x27d150[_0x537e('0x56')]['dialCheckDuplicateType']:_0x54bf0b[_0x537e('0xa4')];switch(_0x54bf0b['dialCheckDuplicateType']){case _0x537e('0xa5'):_0x1c60d0=squel[_0x537e('0xa6')]()[_0x537e('0xa7')](_0x537e('0xa8'))[_0x537e('0xa9')]([_0x537e('0xaa'),_0x537e('0xab'),_0x537e('0xac'),_0x537e('0xad'),'VoiceQueueId',_0x537e('0x5f'),_0x537e('0x5d')],squel[_0x537e('0x88')]()['field'](_0x537e('0xaa'),_0x537e('0xaa'))[_0x537e('0xae')](_0x537e('0xaf'),_0x537e('0xab'))[_0x537e('0xae')]('id',_0x537e('0xac'))[_0x537e('0xae')](_0x1be782[_0x537e('0xb0')]['toString'](),_0x537e('0xad'))['field'](_0x27d150[_0x537e('0x52')]['id'][_0x537e('0x8f')](),_0x537e('0x6a'))[_0x537e('0xae')](_0x537e('0xaf'),_0x537e('0x5f'))['field'](_0x537e('0xaf'),_0x537e('0x5d'))[_0x537e('0x8a')](_0x537e('0xb1'))[_0x537e('0x48')](_0x537e('0xb2'))[_0x537e('0x48')](_0x537e('0xb3'),_0x1be782[_0x537e('0xb0')][_0x537e('0x8f')]())['where'](_0x537e('0xb4'))[_0x537e('0x48')](_0x537e('0xb5'),squel[_0x537e('0x88')]()[_0x537e('0xae')](_0x537e('0xb6'))[_0x537e('0x8a')](_0x537e('0xb7'))[_0x537e('0x48')]('VoiceQueueId\x20=\x20?',_0x27d150[_0x537e('0x52')]['id']['toString']()))[_0x537e('0x48')](_0x537e('0xb5'),squel[_0x537e('0x88')]()[_0x537e('0xae')](_0x537e('0xb8'))[_0x537e('0x8a')](_0x537e('0xa8'))[_0x537e('0x48')](_0x537e('0xb9'),_0x27d150[_0x537e('0x52')]['id'][_0x537e('0x8f')]())))[_0x537e('0x8f')]();break;case'onlyIfOpen':_0x1c60d0=squel['insert']()[_0x537e('0xa7')](_0x537e('0xa8'))[_0x537e('0xa9')]([_0x537e('0xaa'),'scheduledAt',_0x537e('0xac'),_0x537e('0xad'),_0x537e('0x6a'),_0x537e('0x5f'),_0x537e('0x5d')],squel['select']()[_0x537e('0xae')]('phone',_0x537e('0xaa'))[_0x537e('0xae')](_0x537e('0xaf'),_0x537e('0xab'))[_0x537e('0xae')]('id',_0x537e('0xac'))[_0x537e('0xae')](_0x1be782[_0x537e('0xb0')][_0x537e('0x8f')](),_0x537e('0xad'))[_0x537e('0xae')](_0x27d150[_0x537e('0x52')]['id'][_0x537e('0x8f')](),'VoiceQueueId')[_0x537e('0xae')](_0x537e('0xaf'),_0x537e('0x5f'))[_0x537e('0xae')](_0x537e('0xaf'),_0x537e('0x5d'))['from'](_0x537e('0xb1'))[_0x537e('0x48')](_0x537e('0xb2'))[_0x537e('0x48')]('ListId\x20=\x20?',_0x1be782[_0x537e('0xb0')][_0x537e('0x8f')]())[_0x537e('0x48')](_0x537e('0xb4'))[_0x537e('0x48')]('phone\x20NOT\x20IN\x20(?)',squel['select']()[_0x537e('0xae')]('COALESCE(phone,\x27\x27)')[_0x537e('0x8a')]('cm_hopper')[_0x537e('0x48')](_0x537e('0xb9'),_0x27d150['params']['id']['toString']())))[_0x537e('0x8f')]();break;default:_0x1c60d0=squel[_0x537e('0xa6')]()[_0x537e('0xa7')](_0x537e('0xa8'))[_0x537e('0xa9')]([_0x537e('0xaa'),_0x537e('0xab'),_0x537e('0xac'),_0x537e('0xad'),_0x537e('0x6a'),_0x537e('0x5f'),_0x537e('0x5d')],squel[_0x537e('0x88')]()[_0x537e('0xae')](_0x537e('0xaa'),_0x537e('0xaa'))[_0x537e('0xae')](_0x537e('0xaf'),_0x537e('0xab'))[_0x537e('0xae')]('id',_0x537e('0xac'))[_0x537e('0xae')](_0x1be782['CmListId']['toString'](),_0x537e('0xad'))['field'](_0x27d150[_0x537e('0x52')]['id'][_0x537e('0x8f')](),'VoiceQueueId')[_0x537e('0xae')](_0x537e('0xaf'),_0x537e('0x5f'))[_0x537e('0xae')](_0x537e('0xaf'),_0x537e('0x5d'))[_0x537e('0x8a')](_0x537e('0xb1'))['where']('deletedAt\x20IS\x20NULL')[_0x537e('0x48')](_0x537e('0xb3'),_0x1be782['CmListId']['toString']())[_0x537e('0x48')](_0x537e('0xb4')))[_0x537e('0x8f')]();}_0x88d726['push'](db[_0x537e('0x7b')][_0x537e('0x40')](_0x1c60d0));}return BPromise['all'](_0x88d726);}})[_0x537e('0x2b')](function(){return _0x533440;})[_0x537e('0x2b')](respondWithResult(_0x254c6a,null))['catch'](handleError(_0x254c6a,null));};exports[_0x537e('0xba')]=function(_0x1e49d5,_0x21c5fa,_0x434758){return db[_0x537e('0x3b')][_0x537e('0x53')]({'where':{'id':_0x1e49d5[_0x537e('0x52')]['id']}})['then'](handleEntityNotFound(_0x21c5fa,null))[_0x537e('0x2b')](function(_0x4c4f27){if(_0x4c4f27){return _0x4c4f27[_0x537e('0xba')](_0x1e49d5['query'][_0x537e('0x87')]);}})['then'](function(_0x5f525b){if(_0x5f525b){return db['CmHopper'][_0x537e('0x2c')]({'where':{'ListId':_0x1e49d5[_0x537e('0x40')][_0x537e('0x87')],'VoiceQueueId':_0x1e49d5['params']['id']}})[_0x537e('0x2b')](function(){return _0x5f525b;});}})['then'](respondWithStatusCode(_0x21c5fa,null))[_0x537e('0x54')](handleError(_0x21c5fa,null));};exports[_0x537e('0xbb')]=function(_0x58fa28,_0x50a3c6,_0x86e5c9){var _0x271f75={};var _0x105569={};var _0x3927f4;var _0x87ba09;return db[_0x537e('0x3b')][_0x537e('0x65')]({'where':{'id':_0x58fa28[_0x537e('0x52')]['id']}})[_0x537e('0x2b')](handleEntityNotFound(_0x50a3c6,null))['then'](function(_0x497afb){if(_0x497afb){_0x3927f4=_0x497afb;_0x105569[_0x537e('0x3f')]=_[_0x537e('0x41')](db['CmList'][_0x537e('0x3c')]);_0x105569[_0x537e('0x40')]=_[_0x537e('0x41')](_0x58fa28[_0x537e('0x40')]);_0x105569[_0x537e('0x49')]=_[_0x537e('0x42')](_0x105569[_0x537e('0x3f')],_0x105569['query']);_0x271f75[_0x537e('0x43')]=_[_0x537e('0x42')](_0x105569[_0x537e('0x3f')],qs[_0x537e('0x44')](_0x58fa28[_0x537e('0x40')]['fields']));_0x271f75['attributes']=_0x271f75[_0x537e('0x43')][_0x537e('0x45')]?_0x271f75['attributes']:_0x105569['model'];_0x271f75['order']=qs[_0x537e('0x47')](_0x58fa28[_0x537e('0x40')][_0x537e('0x47')]);_0x271f75[_0x537e('0x48')]=qs[_0x537e('0x49')](_[_0x537e('0x68')](_0x58fa28[_0x537e('0x40')],_0x105569[_0x537e('0x49')]));if(_0x58fa28[_0x537e('0x40')]['filter']){_0x271f75[_0x537e('0x48')]=_[_0x537e('0x4b')](_0x271f75[_0x537e('0x48')],{'$or':_[_0x537e('0x31')](_0x271f75[_0x537e('0x43')],function(_0x48a0e5){var _0x59b1ad={};_0x59b1ad[_0x48a0e5]={'$like':'%'+_0x58fa28[_0x537e('0x40')][_0x537e('0x4a')]+'%'};return _0x59b1ad;})});}_0x271f75=_[_0x537e('0x4b')]({},_0x271f75,_0x58fa28['options']);return _0x3927f4[_0x537e('0xbb')](_0x271f75);}})[_0x537e('0x2b')](function(_0x178312){if(_0x178312){_0x87ba09=_0x178312[_0x537e('0x45')];if(!_0x58fa28[_0x537e('0x40')][_0x537e('0x46')](_0x537e('0x66'))){_0x271f75[_0x537e('0x24')]=qs[_0x537e('0x24')](_0x58fa28[_0x537e('0x40')][_0x537e('0x24')]);_0x271f75[_0x537e('0x22')]=qs[_0x537e('0x22')](_0x58fa28[_0x537e('0x40')][_0x537e('0x22')]);}return _0x3927f4[_0x537e('0xbb')](_0x271f75);}})[_0x537e('0x2b')](function(_0x3fc974){if(_0x3fc974){return _0x3fc974?{'count':_0x87ba09,'rows':_0x3fc974}:null;}})[_0x537e('0x2b')](respondWithResult(_0x50a3c6,null))[_0x537e('0x54')](handleError(_0x50a3c6,null));};exports['addBlackLists']=function(_0x2b9f51,_0xd5a13e,_0x56628b){var _0xe08bb7,_0x3db893;return db[_0x537e('0x3b')]['find']({'where':{'id':_0x2b9f51['params']['id']}})[_0x537e('0x2b')](handleEntityNotFound(_0xd5a13e,null))['then'](function(_0x3acec5){if(_0x3acec5){_0x3db893=_0x3acec5;return _0x3acec5[_0x537e('0xbc')](_0x2b9f51[_0x537e('0x56')][_0x537e('0x87')],_[_0x537e('0x5e')](_0x2b9f51[_0x537e('0x56')],['ids','id'])||{});}return null;})[_0x537e('0x9b')](function(_0x3b1071){var _0xdd8369;_0xe08bb7=_0x3b1071||[];var _0x291592=[];if(_0x3b1071){for(var _0x16a042=0x0;_0x16a042<_0x3b1071[_0x537e('0x45')];_0x16a042+=0x1){var _0x476f5f=_0x3b1071[_0x16a042]['get']({'plain':!![]});_0xdd8369=squel[_0x537e('0xa6')]()[_0x537e('0xa7')]('cm_hopper_black')[_0x537e('0xa9')]([_0x537e('0xaa'),'ContactId','ListId',_0x537e('0x6a'),_0x537e('0x5f'),_0x537e('0x5d')],squel[_0x537e('0x88')]()['field']('phone',_0x537e('0xaa'))['field']('id',_0x537e('0xac'))[_0x537e('0xae')](_0x476f5f[_0x537e('0xb0')]['toString'](),_0x537e('0xad'))[_0x537e('0xae')](_0x2b9f51['params']['id'][_0x537e('0x8f')](),_0x537e('0x6a'))[_0x537e('0xae')](_0x537e('0xaf'),_0x537e('0x5f'))[_0x537e('0xae')](_0x537e('0xaf'),_0x537e('0x5d'))[_0x537e('0x8a')]('cm_contacts')[_0x537e('0x48')](_0x537e('0xb2'))['where'](_0x537e('0xb3'),_0x476f5f[_0x537e('0xb0')]['toString']())['where']('phone\x20IS\x20NOT\x20NULL'))[_0x537e('0x8f')]();_0x291592['push'](db['sequelize'][_0x537e('0x40')](_0xdd8369));}return BPromise[_0x537e('0x94')](_0x291592);}})['then'](function(){return _0xe08bb7;})[_0x537e('0x2b')](respondWithResult(_0xd5a13e,null))[_0x537e('0x54')](handleError(_0xd5a13e,null));};exports[_0x537e('0xbd')]=function(_0x23528e,_0x1335a2,_0x4928e7){return db[_0x537e('0x3b')][_0x537e('0x53')]({'where':{'id':_0x23528e[_0x537e('0x52')]['id']}})[_0x537e('0x2b')](handleEntityNotFound(_0x1335a2,null))[_0x537e('0x2b')](function(_0x139cdb){if(_0x139cdb){return _0x139cdb[_0x537e('0xbd')](_0x23528e[_0x537e('0x40')][_0x537e('0x87')]);}})['then'](function(_0x5531fb){if(_0x5531fb){return db['CmHopperBlack']['destroy']({'where':{'ListId':_0x23528e[_0x537e('0x40')]['ids'],'VoiceQueueId':_0x23528e[_0x537e('0x52')]['id']}})[_0x537e('0x2b')](function(){return _0x5531fb;});}})[_0x537e('0x2b')](respondWithStatusCode(_0x1335a2,null))[_0x537e('0x54')](handleError(_0x1335a2,null));}; \ No newline at end of file +var _0x9b4a=['map','value','includes','find','type','name','UserProfileResource','error','stack','send','index','VoiceQueue','rawAttributes','model','query','filters','attributes','intersection','fields','nolimit','order','sort','where','pick','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','keys','length','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','VoiceQueues','outbound','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','clone','params','omit','createdAt','body','updatedAt','autoAssociation','destroy','getHoppers','findOne','CmHopper','getHopperHistories','CmHopperHistory','hasOwnProperty','VoiceQueueId','getHopperFinals','CmHopperFinal','getHopperBlacks','CmHopperBlack','getTeams','Team','teams','User','voicePause','flatMap','Agents','forEach','penalty','sequelize','transaction','addTeams','each','findOrCreate','UserVoiceQueueRt','upsert','isNil','interface','format','SIP/%s','removeTeams','ids','select','tq.TeamId','from','team_has_voice_queues','join','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','VoiceQueueId\x20=\x20?','ut.UserId\x20=\x20?','push','SELECT','TeamId','all','union','compact','isEmpty','emit','userVoiceQueue:remove','addAgents','online','removeAgents','getAgents','getMembers','getLists','CmList','addLists','dialCheckDuplicateType','always','insert','cm_hopper','fromQuery','phone','scheduledAt','ListId','field','NOW()','ContactId','CmListId','toString','cm_contacts','deletedAt\x20IS\x20NULL','ListId\x20=\x20?','phone\x20IS\x20NOT\x20NULL','phone\x20NOT\x20IN\x20(?)','COALESCE(calleridnum,\x27\x27)','COALESCE(phone,\x27\x27)','onlyIfOpen','into','removeLists','getBlackLists','addBlackLists','spread','cm_hopper_black','removeBlackLists','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','jsforce','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./voiceQueue.socket','register','sendStatus','status','json','undefined','limit','count','offset','apply','reject','then','get','inbound','QueueCampaigns','filter','ignore'];(function(_0xfae23b,_0x2be4ba){var _0x200640=function(_0x4ae258){while(--_0x4ae258){_0xfae23b['push'](_0xfae23b['shift']());}};_0x200640(++_0x2be4ba);}(_0x9b4a,0x141));var _0xa9b4=function(_0x99a6a8,_0x229834){_0x99a6a8=_0x99a6a8-0x0;var _0xcaff9b=_0x9b4a[_0x99a6a8];return _0xcaff9b;};'use strict';var emlformat=require(_0xa9b4('0x0'));var rimraf=require(_0xa9b4('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xa9b4('0x2'));var rp=require(_0xa9b4('0x3'));var moment=require(_0xa9b4('0x4'));var BPromise=require(_0xa9b4('0x5'));var Mustache=require(_0xa9b4('0x6'));var util=require(_0xa9b4('0x7'));var path=require(_0xa9b4('0x8'));var sox=require(_0xa9b4('0x9'));var csv=require(_0xa9b4('0xa'));var ejs=require(_0xa9b4('0xb'));var fs=require('fs');var fs_extra=require(_0xa9b4('0xc'));var _=require(_0xa9b4('0xd'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xa9b4('0xe'));var deskjs=require('desk.js');var toCsv=require(_0xa9b4('0xa'));var querystring=require(_0xa9b4('0xf'));var Papa=require('papaparse');var Redis=require(_0xa9b4('0x10'));var authService=require(_0xa9b4('0x11'));var qs=require(_0xa9b4('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xa9b4('0x13'));var logger=require(_0xa9b4('0x14'))(_0xa9b4('0x15'));var utils=require(_0xa9b4('0x16'));var config=require(_0xa9b4('0x17'));var licenseUtil=require(_0xa9b4('0x18'));var db=require(_0xa9b4('0x19'))['db'];config[_0xa9b4('0x1a')]=_[_0xa9b4('0x1b')](config['redis'],{'host':_0xa9b4('0x1c'),'port':0x18eb});var socket=require(_0xa9b4('0x1d'))(new Redis(config[_0xa9b4('0x1a')]));require(_0xa9b4('0x1e'))[_0xa9b4('0x1f')](socket);function respondWithStatusCode(_0x2a9544,_0xb9f7c){_0xb9f7c=_0xb9f7c||0xcc;return function(_0x21b3cf){if(_0x21b3cf){return _0x2a9544[_0xa9b4('0x20')](_0xb9f7c);}return _0x2a9544['status'](_0xb9f7c)['end']();};}function respondWithResult(_0x5605f7,_0x91f833){_0x91f833=_0x91f833||0xc8;return function(_0xfbc130){if(_0xfbc130){return _0x5605f7[_0xa9b4('0x21')](_0x91f833)[_0xa9b4('0x22')](_0xfbc130);}};}function respondWithFilteredResult(_0xb86157,_0x99b6dc){return function(_0x3289ce){if(_0x3289ce){var _0x406843=typeof _0x99b6dc['offset']===_0xa9b4('0x23')&&typeof _0x99b6dc[_0xa9b4('0x24')]===_0xa9b4('0x23');var _0x425484=_0x3289ce[_0xa9b4('0x25')];var _0xdf9542=_0x406843?0x0:_0x99b6dc[_0xa9b4('0x26')];var _0x48e19c=_0x406843?_0x3289ce['count']:_0x99b6dc[_0xa9b4('0x26')]+_0x99b6dc[_0xa9b4('0x24')];var _0x1e6f86;if(_0x48e19c>=_0x425484){_0x48e19c=_0x425484;_0x1e6f86=0xc8;}else{_0x1e6f86=0xce;}_0xb86157[_0xa9b4('0x21')](_0x1e6f86);return _0xb86157['set']('Content-Range',_0xdf9542+'-'+_0x48e19c+'/'+_0x425484)[_0xa9b4('0x22')](_0x3289ce);}return null;};}function patchUpdates(_0x319aad){return function(_0x40d8e9){try{jsonpatch[_0xa9b4('0x27')](_0x40d8e9,_0x319aad,!![]);}catch(_0x35c1b4){return BPromise[_0xa9b4('0x28')](_0x35c1b4);}return _0x40d8e9['save']();};}function saveUpdates(_0x5522a1,_0x5e9a8c){return function(_0x307958){if(_0x307958){return _0x307958['update'](_0x5522a1)['then'](function(_0x1be312){return _0x1be312;});}return null;};}function removeEntity(_0x1a7da9,_0x3fac47){return function(_0x4e711d){if(_0x4e711d){return _0x4e711d['destroy']()[_0xa9b4('0x29')](function(){var _0x1425e5=_0x4e711d[_0xa9b4('0x2a')]({'plain':!![]});var _0x2255b2=[{'name':'VoiceQueues','value':_0xa9b4('0x2b'),'ignore':![]},{'name':_0xa9b4('0x2c'),'value':'outbound','ignore':![]}];var _0x12a1ef=_(_0x2255b2)[_0xa9b4('0x2d')](_0xa9b4('0x2e'))[_0xa9b4('0x2f')](_0xa9b4('0x30'))[_0xa9b4('0x30')]();if(_[_0xa9b4('0x31')](_0x12a1ef,_0x1425e5['type'])){return;}var _0x13f521=_[_0xa9b4('0x32')](_0x2255b2,[_0xa9b4('0x30'),_0x1425e5[_0xa9b4('0x33')]])[_0xa9b4('0x34')];return db[_0xa9b4('0x35')]['destroy']({'where':{'type':_0x13f521,'resourceId':_0x1425e5['id']}})[_0xa9b4('0x29')](function(){return _0x4e711d;});})[_0xa9b4('0x29')](function(){_0x1a7da9[_0xa9b4('0x21')](0xcc)['end']();});}};}function handleEntityNotFound(_0x13a2c4,_0x3517fd){return function(_0x3fe7af){if(!_0x3fe7af){_0x13a2c4[_0xa9b4('0x20')](0x194);}return _0x3fe7af;};}function handleError(_0x25e2e1,_0x422e79){_0x422e79=_0x422e79||0x1f4;return function(_0x532f57){logger[_0xa9b4('0x36')](_0x532f57[_0xa9b4('0x37')]);if(_0x532f57['name']){delete _0x532f57[_0xa9b4('0x34')];}_0x25e2e1['status'](_0x422e79)[_0xa9b4('0x38')](_0x532f57);};}exports[_0xa9b4('0x39')]=function(_0x1333af,_0x3da6af){var _0x2f1545={},_0x534975={},_0x56861b={'count':0x0,'rows':[]};var _0x415f1a=_[_0xa9b4('0x2f')](db[_0xa9b4('0x3a')][_0xa9b4('0x3b')],function(_0x30ae1){return{'name':_0x30ae1['fieldName'],'type':_0x30ae1[_0xa9b4('0x33')]['key']};});_0x534975[_0xa9b4('0x3c')]=_['map'](_0x415f1a,_0xa9b4('0x34'));_0x534975[_0xa9b4('0x3d')]=_['keys'](_0x1333af[_0xa9b4('0x3d')]);_0x534975[_0xa9b4('0x3e')]=_['intersection'](_0x534975[_0xa9b4('0x3c')],_0x534975[_0xa9b4('0x3d')]);_0x2f1545[_0xa9b4('0x3f')]=_[_0xa9b4('0x40')](_0x534975[_0xa9b4('0x3c')],qs[_0xa9b4('0x41')](_0x1333af['query'][_0xa9b4('0x41')]));_0x2f1545[_0xa9b4('0x3f')]=_0x2f1545['attributes']['length']?_0x2f1545['attributes']:_0x534975[_0xa9b4('0x3c')];if(!_0x1333af[_0xa9b4('0x3d')]['hasOwnProperty'](_0xa9b4('0x42'))){_0x2f1545['limit']=qs['limit'](_0x1333af[_0xa9b4('0x3d')]['limit']);_0x2f1545['offset']=qs[_0xa9b4('0x26')](_0x1333af[_0xa9b4('0x3d')][_0xa9b4('0x26')]);}_0x2f1545[_0xa9b4('0x43')]=qs[_0xa9b4('0x44')](_0x1333af[_0xa9b4('0x3d')][_0xa9b4('0x44')]);_0x2f1545[_0xa9b4('0x45')]=qs[_0xa9b4('0x3e')](_[_0xa9b4('0x46')](_0x1333af[_0xa9b4('0x3d')],_0x534975[_0xa9b4('0x3e')]),_0x415f1a);if(_0x1333af[_0xa9b4('0x3d')][_0xa9b4('0x2d')]){_0x2f1545['where']=_[_0xa9b4('0x47')](_0x2f1545['where'],{'$or':_[_0xa9b4('0x2f')](_0x415f1a,function(_0x22dba1){if(_0x22dba1[_0xa9b4('0x33')]!==_0xa9b4('0x48')){var _0x124870={};_0x124870[_0x22dba1[_0xa9b4('0x34')]]={'$like':'%'+_0x1333af[_0xa9b4('0x3d')][_0xa9b4('0x2d')]+'%'};return _0x124870;}})});}_0x2f1545=_[_0xa9b4('0x47')]({},_0x2f1545,_0x1333af[_0xa9b4('0x49')]);var _0x2b96d2={'where':_0x2f1545[_0xa9b4('0x45')]};return db[_0xa9b4('0x3a')][_0xa9b4('0x25')](_0x2b96d2)[_0xa9b4('0x29')](function(_0x34a016){_0x56861b[_0xa9b4('0x25')]=_0x34a016;if(_0x1333af['query'][_0xa9b4('0x4a')]){_0x2f1545[_0xa9b4('0x4b')]=[{'all':!![]}];}return db['VoiceQueue'][_0xa9b4('0x4c')](_0x2f1545);})[_0xa9b4('0x29')](function(_0x2de66e){_0x56861b[_0xa9b4('0x4d')]=_0x2de66e;return _0x56861b;})[_0xa9b4('0x29')](respondWithFilteredResult(_0x3da6af,_0x2f1545))[_0xa9b4('0x4e')](handleError(_0x3da6af,null));};exports['show']=function(_0x14cde3,_0x3b94d1){var _0x59f9bd={'raw':![],'where':{'id':_0x14cde3['params']['id']}},_0x1c5453={};_0x1c5453[_0xa9b4('0x3c')]=_[_0xa9b4('0x4f')](db[_0xa9b4('0x3a')][_0xa9b4('0x3b')]);_0x1c5453[_0xa9b4('0x3d')]=_[_0xa9b4('0x4f')](_0x14cde3[_0xa9b4('0x3d')]);_0x1c5453[_0xa9b4('0x3e')]=_['intersection'](_0x1c5453[_0xa9b4('0x3c')],_0x1c5453[_0xa9b4('0x3d')]);_0x59f9bd[_0xa9b4('0x3f')]=_[_0xa9b4('0x40')](_0x1c5453[_0xa9b4('0x3c')],qs[_0xa9b4('0x41')](_0x14cde3['query']['fields']));_0x59f9bd[_0xa9b4('0x3f')]=_0x59f9bd['attributes'][_0xa9b4('0x50')]?_0x59f9bd[_0xa9b4('0x3f')]:_0x1c5453['model'];if(_0x14cde3[_0xa9b4('0x3d')]['includeAll']){_0x59f9bd['include']=[{'all':!![]}];}_0x59f9bd=_['merge']({},_0x59f9bd,_0x14cde3[_0xa9b4('0x49')]);return db[_0xa9b4('0x3a')][_0xa9b4('0x32')](_0x59f9bd)['then'](handleEntityNotFound(_0x3b94d1,null))['then'](respondWithResult(_0x3b94d1,null))[_0xa9b4('0x4e')](handleError(_0x3b94d1,null));};exports[_0xa9b4('0x51')]=function(_0x55ed33,_0x48dff9){return db[_0xa9b4('0x3a')][_0xa9b4('0x51')](_0x55ed33['body'],{})[_0xa9b4('0x29')](function(_0x428216){var _0x3a48f2=_0x55ed33[_0xa9b4('0x52')][_0xa9b4('0x2a')]({'plain':!![]});if(!_0x3a48f2)throw new Error(_0xa9b4('0x53'));if(_0x3a48f2[_0xa9b4('0x54')]===_0xa9b4('0x52')){var _0xc607a=_0x428216[_0xa9b4('0x2a')]({'plain':!![]});var _0x7393ea=[{'name':_0xa9b4('0x55'),'value':_0xa9b4('0x2b')},{'name':_0xa9b4('0x2c'),'value':_0xa9b4('0x56')}];var _0x26ebc2=_[_0xa9b4('0x32')](_0x7393ea,['value',_0xc607a['type']])[_0xa9b4('0x34')];return db['UserProfileSection'][_0xa9b4('0x32')]({'where':{'name':_0x26ebc2,'userProfileId':_0x3a48f2[_0xa9b4('0x57')]},'raw':!![]})['then'](function(_0x66a8a6){if(_0x66a8a6&&_0x66a8a6['autoAssociation']===0x0){return db[_0xa9b4('0x35')][_0xa9b4('0x51')]({'name':_0xc607a['name'],'resourceId':_0xc607a['id'],'type':_0x66a8a6[_0xa9b4('0x34')],'sectionId':_0x66a8a6['id']},{})[_0xa9b4('0x29')](function(){return _0x428216;});}else{return _0x428216;}})['catch'](function(_0x11774d){logger[_0xa9b4('0x36')](_0xa9b4('0x58'),_0x11774d);throw _0x11774d;});}return _0x428216;})[_0xa9b4('0x29')](respondWithResult(_0x48dff9,0xc9))[_0xa9b4('0x4e')](handleError(_0x48dff9,null));};exports[_0xa9b4('0x59')]=function(_0x2d2b9d,_0x55cbab){var _0x1a3c00={'where':{'id':_0x2d2b9d[_0xa9b4('0x5a')]['id']}},_0x33a30f={};_0x33a30f[_0xa9b4('0x3c')]=_[_0xa9b4('0x4f')](db['VoiceQueue'][_0xa9b4('0x3b')]);_0x1a3c00[_0xa9b4('0x3f')]=_[_0xa9b4('0x40')](_0x33a30f[_0xa9b4('0x3c')],qs[_0xa9b4('0x41')](_0x2d2b9d[_0xa9b4('0x3d')][_0xa9b4('0x41')]));_0x1a3c00[_0xa9b4('0x3f')]=_0x1a3c00['attributes'][_0xa9b4('0x50')]?_0x1a3c00[_0xa9b4('0x3f')]:_0x33a30f[_0xa9b4('0x3c')];if(_0x2d2b9d[_0xa9b4('0x3d')][_0xa9b4('0x4a')]){_0x1a3c00[_0xa9b4('0x4b')]=[{'all':!![]}];}_0x1a3c00=_[_0xa9b4('0x47')]({},_0x1a3c00,_0x2d2b9d['options']);return db[_0xa9b4('0x3a')]['find'](_0x1a3c00)[_0xa9b4('0x29')](handleEntityNotFound(_0x55cbab,null))[_0xa9b4('0x29')](function(_0x4e5a77){if(_0x4e5a77){var _0x64718d=_0x4e5a77[_0xa9b4('0x2a')]({'plain':!![]});_0x64718d=qs[_0xa9b4('0x5b')](_0x64718d,['id',_0xa9b4('0x5c'),'updatedAt']);_0x2d2b9d[_0xa9b4('0x5d')]=_[_0xa9b4('0x5b')](_0x2d2b9d[_0xa9b4('0x5d')],['id',_0xa9b4('0x5c'),_0xa9b4('0x5e')]);return db[_0xa9b4('0x3a')][_0xa9b4('0x51')](_[_0xa9b4('0x47')](_0x64718d,_0x2d2b9d['body']),{'include':_0x2d2b9d[_0xa9b4('0x3d')][_0xa9b4('0x4a')]?[{'all':!![]}]:undefined})['then'](function(_0xa1eb06){var _0x23c2bd=_0x2d2b9d[_0xa9b4('0x52')]['get']({'plain':!![]});if(!_0x23c2bd)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x23c2bd[_0xa9b4('0x54')]===_0xa9b4('0x52')){var _0x4e0f54=_0xa1eb06[_0xa9b4('0x2a')]({'plain':!![]});var _0xeb01e3=[{'name':_0xa9b4('0x55'),'value':_0xa9b4('0x2b')},{'name':'QueueCampaigns','value':_0xa9b4('0x56')}];var _0xb35f38=_['find'](_0xeb01e3,[_0xa9b4('0x30'),_0x4e0f54['type']])[_0xa9b4('0x34')];return db['UserProfileSection']['find']({'where':{'name':_0xb35f38,'userProfileId':_0x23c2bd['userProfileId']},'raw':!![]})[_0xa9b4('0x29')](function(_0x121cb8){if(_0x121cb8&&_0x121cb8[_0xa9b4('0x5f')]===0x0){return db['UserProfileResource'][_0xa9b4('0x51')]({'name':_0x4e0f54['name'],'resourceId':_0x4e0f54['id'],'type':_0x121cb8[_0xa9b4('0x34')],'sectionId':_0x121cb8['id']},{})[_0xa9b4('0x29')](function(){return _0xa1eb06;});}else{return _0xa1eb06;}})[_0xa9b4('0x4e')](function(_0x5d659b){logger['error'](_0xa9b4('0x58'),_0x5d659b);throw _0x5d659b;});}return _0xa1eb06;});}})[_0xa9b4('0x29')](respondWithResult(_0x55cbab,0xc9))[_0xa9b4('0x4e')](handleError(_0x55cbab,null));};exports['update']=function(_0x375028,_0x20e37a){if(_0x375028[_0xa9b4('0x5d')]['id']){delete _0x375028['body']['id'];}return db[_0xa9b4('0x3a')][_0xa9b4('0x32')]({'where':{'id':_0x375028['params']['id']}})[_0xa9b4('0x29')](handleEntityNotFound(_0x20e37a,null))[_0xa9b4('0x29')](saveUpdates(_0x375028[_0xa9b4('0x5d')],null))['then'](respondWithResult(_0x20e37a,null))[_0xa9b4('0x4e')](handleError(_0x20e37a,null));};exports[_0xa9b4('0x60')]=function(_0x4f897d,_0x48ee62){return db[_0xa9b4('0x3a')][_0xa9b4('0x32')]({'where':{'id':_0x4f897d[_0xa9b4('0x5a')]['id']}})[_0xa9b4('0x29')](handleEntityNotFound(_0x48ee62,null))[_0xa9b4('0x29')](removeEntity(_0x48ee62,null))[_0xa9b4('0x4e')](handleError(_0x48ee62,null));};exports[_0xa9b4('0x61')]=function(_0x4baadd,_0x36289a,_0x1e40c8){var _0x19a81c={'raw':![],'where':{}};var _0x5c2d99={};var _0xdf153a={'count':0x0,'rows':[]};return db['VoiceQueue'][_0xa9b4('0x62')]({'where':{'id':_0x4baadd[_0xa9b4('0x5a')]['id']}})[_0xa9b4('0x29')](handleEntityNotFound(_0x36289a,null))[_0xa9b4('0x29')](function(_0x3440a0){if(_0x3440a0){_0x5c2d99[_0xa9b4('0x3c')]=_['keys'](db[_0xa9b4('0x63')][_0xa9b4('0x3b')]);_0x5c2d99['query']=_[_0xa9b4('0x4f')](_0x4baadd[_0xa9b4('0x3d')]);_0x5c2d99[_0xa9b4('0x3e')]=_[_0xa9b4('0x40')](_0x5c2d99['model'],_0x5c2d99['query']);_0x19a81c[_0xa9b4('0x3f')]=_['intersection'](_0x5c2d99[_0xa9b4('0x3c')],qs['fields'](_0x4baadd[_0xa9b4('0x3d')][_0xa9b4('0x41')]));_0x19a81c[_0xa9b4('0x3f')]=_0x19a81c[_0xa9b4('0x3f')][_0xa9b4('0x50')]?_0x19a81c[_0xa9b4('0x3f')]:_0x5c2d99[_0xa9b4('0x3c')];if(!_0x4baadd[_0xa9b4('0x3d')]['hasOwnProperty'](_0xa9b4('0x42'))){_0x19a81c['limit']=qs['limit'](_0x4baadd['query'][_0xa9b4('0x24')]);_0x19a81c['offset']=qs['offset'](_0x4baadd[_0xa9b4('0x3d')]['offset']);}_0x19a81c[_0xa9b4('0x43')]=qs[_0xa9b4('0x44')](_0x4baadd[_0xa9b4('0x3d')][_0xa9b4('0x44')]);_0x19a81c[_0xa9b4('0x45')]=qs['filters'](_[_0xa9b4('0x46')](_0x4baadd[_0xa9b4('0x3d')],_0x5c2d99[_0xa9b4('0x3e')]));_0x19a81c[_0xa9b4('0x45')]['VoiceQueueId']=_0x3440a0['id'];if(_0x4baadd[_0xa9b4('0x3d')][_0xa9b4('0x2d')]){_0x19a81c[_0xa9b4('0x45')]=_[_0xa9b4('0x47')](_0x19a81c[_0xa9b4('0x45')],{'$or':_[_0xa9b4('0x2f')](_0x19a81c['attributes'],function(_0x4ad251){var _0x1dc968={};_0x1dc968[_0x4ad251]={'$like':'%'+_0x4baadd[_0xa9b4('0x3d')][_0xa9b4('0x2d')]+'%'};return _0x1dc968;})});}_0x19a81c=_['merge']({},_0x19a81c,_0x4baadd['options']);return db[_0xa9b4('0x63')][_0xa9b4('0x25')]({'where':_0x19a81c[_0xa9b4('0x45')]})[_0xa9b4('0x29')](function(_0x47117f){_0xdf153a[_0xa9b4('0x25')]=_0x47117f;if(_0x4baadd[_0xa9b4('0x3d')][_0xa9b4('0x4a')]){_0x19a81c['include']=[{'all':!![]}];}return db[_0xa9b4('0x63')]['findAll'](_0x19a81c);})[_0xa9b4('0x29')](function(_0x5f0662){_0xdf153a['rows']=_0x5f0662;return _0xdf153a;});}})[_0xa9b4('0x29')](respondWithFilteredResult(_0x36289a,_0x19a81c))[_0xa9b4('0x4e')](handleError(_0x36289a,null));};exports[_0xa9b4('0x64')]=function(_0xbe387,_0x1e432c,_0x5919d0){var _0x146aca={'raw':!![],'where':{}};var _0xebb697={};var _0x4d7f88={'count':0x0,'rows':[]};return db[_0xa9b4('0x3a')][_0xa9b4('0x62')]({'where':{'id':_0xbe387[_0xa9b4('0x5a')]['id']}})[_0xa9b4('0x29')](handleEntityNotFound(_0x1e432c,null))[_0xa9b4('0x29')](function(_0x3aeeb5){if(_0x3aeeb5){_0xebb697[_0xa9b4('0x3c')]=_[_0xa9b4('0x4f')](db[_0xa9b4('0x65')]['rawAttributes']);_0xebb697[_0xa9b4('0x3d')]=_[_0xa9b4('0x4f')](_0xbe387[_0xa9b4('0x3d')]);_0xebb697[_0xa9b4('0x3e')]=_['intersection'](_0xebb697[_0xa9b4('0x3c')],_0xebb697[_0xa9b4('0x3d')]);_0x146aca['attributes']=_['intersection'](_0xebb697[_0xa9b4('0x3c')],qs[_0xa9b4('0x41')](_0xbe387[_0xa9b4('0x3d')][_0xa9b4('0x41')]));_0x146aca[_0xa9b4('0x3f')]=_0x146aca[_0xa9b4('0x3f')][_0xa9b4('0x50')]?_0x146aca[_0xa9b4('0x3f')]:_0xebb697[_0xa9b4('0x3c')];if(!_0xbe387[_0xa9b4('0x3d')][_0xa9b4('0x66')](_0xa9b4('0x42'))){_0x146aca[_0xa9b4('0x24')]=qs[_0xa9b4('0x24')](_0xbe387['query']['limit']);_0x146aca[_0xa9b4('0x26')]=qs[_0xa9b4('0x26')](_0xbe387[_0xa9b4('0x3d')][_0xa9b4('0x26')]);}_0x146aca[_0xa9b4('0x43')]=qs[_0xa9b4('0x44')](_0xbe387[_0xa9b4('0x3d')][_0xa9b4('0x44')]);_0x146aca[_0xa9b4('0x45')]=qs[_0xa9b4('0x3e')](_['pick'](_0xbe387[_0xa9b4('0x3d')],_0xebb697[_0xa9b4('0x3e')]));_0x146aca['where'][_0xa9b4('0x67')]=_0x3aeeb5['id'];if(_0xbe387[_0xa9b4('0x3d')]['filter']){_0x146aca['where']=_[_0xa9b4('0x47')](_0x146aca[_0xa9b4('0x45')],{'$or':_[_0xa9b4('0x2f')](_0x146aca['attributes'],function(_0x549e17){var _0x4d33d7={};_0x4d33d7[_0x549e17]={'$like':'%'+_0xbe387[_0xa9b4('0x3d')][_0xa9b4('0x2d')]+'%'};return _0x4d33d7;})});}_0x146aca=_[_0xa9b4('0x47')]({},_0x146aca,_0xbe387[_0xa9b4('0x49')]);return db[_0xa9b4('0x65')][_0xa9b4('0x25')]({'where':_0x146aca[_0xa9b4('0x45')]})[_0xa9b4('0x29')](function(_0x52b3ed){_0x4d7f88[_0xa9b4('0x25')]=_0x52b3ed;if(_0xbe387[_0xa9b4('0x3d')][_0xa9b4('0x4a')]){_0x146aca[_0xa9b4('0x4b')]=[{'all':!![]}];}return db[_0xa9b4('0x65')]['findAll'](_0x146aca);})[_0xa9b4('0x29')](function(_0x2c976c){_0x4d7f88['rows']=_0x2c976c;return _0x4d7f88;});}})['then'](respondWithFilteredResult(_0x1e432c,_0x146aca))['catch'](handleError(_0x1e432c,null));};exports[_0xa9b4('0x68')]=function(_0x452382,_0x1688a6,_0x55e022){var _0x4bc800={'raw':!![],'where':{}};var _0x1e6e4a={};var _0x4c3398={'count':0x0,'rows':[]};return db[_0xa9b4('0x3a')][_0xa9b4('0x62')]({'where':{'id':_0x452382['params']['id']}})[_0xa9b4('0x29')](handleEntityNotFound(_0x1688a6,null))[_0xa9b4('0x29')](function(_0x15a862){if(_0x15a862){_0x1e6e4a[_0xa9b4('0x3c')]=_[_0xa9b4('0x4f')](db[_0xa9b4('0x69')][_0xa9b4('0x3b')]);_0x1e6e4a['query']=_['keys'](_0x452382[_0xa9b4('0x3d')]);_0x1e6e4a[_0xa9b4('0x3e')]=_[_0xa9b4('0x40')](_0x1e6e4a[_0xa9b4('0x3c')],_0x1e6e4a[_0xa9b4('0x3d')]);_0x4bc800[_0xa9b4('0x3f')]=_['intersection'](_0x1e6e4a[_0xa9b4('0x3c')],qs[_0xa9b4('0x41')](_0x452382[_0xa9b4('0x3d')]['fields']));_0x4bc800[_0xa9b4('0x3f')]=_0x4bc800['attributes'][_0xa9b4('0x50')]?_0x4bc800[_0xa9b4('0x3f')]:_0x1e6e4a[_0xa9b4('0x3c')];if(!_0x452382['query'][_0xa9b4('0x66')]('nolimit')){_0x4bc800[_0xa9b4('0x24')]=qs[_0xa9b4('0x24')](_0x452382[_0xa9b4('0x3d')][_0xa9b4('0x24')]);_0x4bc800[_0xa9b4('0x26')]=qs[_0xa9b4('0x26')](_0x452382[_0xa9b4('0x3d')]['offset']);}_0x4bc800['order']=qs[_0xa9b4('0x44')](_0x452382[_0xa9b4('0x3d')][_0xa9b4('0x44')]);_0x4bc800[_0xa9b4('0x45')]=qs['filters'](_[_0xa9b4('0x46')](_0x452382[_0xa9b4('0x3d')],_0x1e6e4a[_0xa9b4('0x3e')]));_0x4bc800[_0xa9b4('0x45')][_0xa9b4('0x67')]=_0x15a862['id'];if(_0x452382[_0xa9b4('0x3d')][_0xa9b4('0x2d')]){_0x4bc800[_0xa9b4('0x45')]=_['merge'](_0x4bc800[_0xa9b4('0x45')],{'$or':_[_0xa9b4('0x2f')](_0x4bc800[_0xa9b4('0x3f')],function(_0x4bec08){var _0x3fceb3={};_0x3fceb3[_0x4bec08]={'$like':'%'+_0x452382[_0xa9b4('0x3d')][_0xa9b4('0x2d')]+'%'};return _0x3fceb3;})});}_0x4bc800=_[_0xa9b4('0x47')]({},_0x4bc800,_0x452382[_0xa9b4('0x49')]);return db[_0xa9b4('0x69')]['count']({'where':_0x4bc800[_0xa9b4('0x45')]})[_0xa9b4('0x29')](function(_0x46811e){_0x4c3398[_0xa9b4('0x25')]=_0x46811e;if(_0x452382[_0xa9b4('0x3d')][_0xa9b4('0x4a')]){_0x4bc800['include']=[{'all':!![]}];}return db['CmHopperFinal']['findAll'](_0x4bc800);})[_0xa9b4('0x29')](function(_0x37eee3){_0x4c3398[_0xa9b4('0x4d')]=_0x37eee3;return _0x4c3398;});}})[_0xa9b4('0x29')](respondWithFilteredResult(_0x1688a6,_0x4bc800))[_0xa9b4('0x4e')](handleError(_0x1688a6,null));};exports[_0xa9b4('0x6a')]=function(_0x2fee04,_0x37d462,_0x607754){var _0x764acc={'raw':!![],'where':{}};var _0x2de550={};var _0x4a184f={'count':0x0,'rows':[]};return db['VoiceQueue'][_0xa9b4('0x62')]({'where':{'id':_0x2fee04[_0xa9b4('0x5a')]['id']}})[_0xa9b4('0x29')](handleEntityNotFound(_0x37d462,null))['then'](function(_0x3836d8){if(_0x3836d8){_0x2de550[_0xa9b4('0x3c')]=_[_0xa9b4('0x4f')](db[_0xa9b4('0x6b')]['rawAttributes']);_0x2de550['query']=_[_0xa9b4('0x4f')](_0x2fee04[_0xa9b4('0x3d')]);_0x2de550[_0xa9b4('0x3e')]=_[_0xa9b4('0x40')](_0x2de550['model'],_0x2de550['query']);_0x764acc['attributes']=_['intersection'](_0x2de550[_0xa9b4('0x3c')],qs['fields'](_0x2fee04['query'][_0xa9b4('0x41')]));_0x764acc[_0xa9b4('0x3f')]=_0x764acc[_0xa9b4('0x3f')]['length']?_0x764acc[_0xa9b4('0x3f')]:_0x2de550[_0xa9b4('0x3c')];if(!_0x2fee04['query'][_0xa9b4('0x66')]('nolimit')){_0x764acc['limit']=qs[_0xa9b4('0x24')](_0x2fee04[_0xa9b4('0x3d')][_0xa9b4('0x24')]);_0x764acc['offset']=qs[_0xa9b4('0x26')](_0x2fee04['query']['offset']);}_0x764acc[_0xa9b4('0x43')]=qs[_0xa9b4('0x44')](_0x2fee04[_0xa9b4('0x3d')][_0xa9b4('0x44')]);_0x764acc[_0xa9b4('0x45')]=qs[_0xa9b4('0x3e')](_[_0xa9b4('0x46')](_0x2fee04[_0xa9b4('0x3d')],_0x2de550['filters']));_0x764acc['where']['VoiceQueueId']=_0x3836d8['id'];if(_0x2fee04[_0xa9b4('0x3d')][_0xa9b4('0x2d')]){_0x764acc['where']=_['merge'](_0x764acc[_0xa9b4('0x45')],{'$or':_['map'](_0x764acc[_0xa9b4('0x3f')],function(_0x237adc){var _0x22b1cc={};_0x22b1cc[_0x237adc]={'$like':'%'+_0x2fee04[_0xa9b4('0x3d')][_0xa9b4('0x2d')]+'%'};return _0x22b1cc;})});}_0x764acc=_[_0xa9b4('0x47')]({},_0x764acc,_0x2fee04[_0xa9b4('0x49')]);return db['CmHopperBlack']['count']({'where':_0x764acc[_0xa9b4('0x45')]})[_0xa9b4('0x29')](function(_0x171f8a){_0x4a184f[_0xa9b4('0x25')]=_0x171f8a;if(_0x2fee04['query'][_0xa9b4('0x4a')]){_0x764acc['include']=[{'all':!![]}];}return db['CmHopperBlack']['findAll'](_0x764acc);})['then'](function(_0xeb2048){_0x4a184f[_0xa9b4('0x4d')]=_0xeb2048;return _0x4a184f;});}})[_0xa9b4('0x29')](respondWithFilteredResult(_0x37d462,_0x764acc))['catch'](handleError(_0x37d462,null));};exports[_0xa9b4('0x6c')]=function(_0x390eaa,_0x1da194,_0x3273f0){var _0x16d650={};var _0x3cdb9d={};var _0x490529;var _0x15a660;return db[_0xa9b4('0x3a')][_0xa9b4('0x62')]({'where':{'id':_0x390eaa[_0xa9b4('0x5a')]['id']}})[_0xa9b4('0x29')](handleEntityNotFound(_0x1da194,null))['then'](function(_0x4bedcd){if(_0x4bedcd){_0x490529=_0x4bedcd;_0x3cdb9d[_0xa9b4('0x3c')]=_[_0xa9b4('0x4f')](db[_0xa9b4('0x6d')][_0xa9b4('0x3b')]);_0x3cdb9d['query']=_[_0xa9b4('0x4f')](_0x390eaa[_0xa9b4('0x3d')]);_0x3cdb9d[_0xa9b4('0x3e')]=_[_0xa9b4('0x40')](_0x3cdb9d[_0xa9b4('0x3c')],_0x3cdb9d[_0xa9b4('0x3d')]);_0x16d650[_0xa9b4('0x3f')]=_[_0xa9b4('0x40')](_0x3cdb9d[_0xa9b4('0x3c')],qs[_0xa9b4('0x41')](_0x390eaa[_0xa9b4('0x3d')][_0xa9b4('0x41')]));_0x16d650['attributes']=_0x16d650[_0xa9b4('0x3f')][_0xa9b4('0x50')]?_0x16d650['attributes']:_0x3cdb9d[_0xa9b4('0x3c')];_0x16d650[_0xa9b4('0x43')]=qs[_0xa9b4('0x44')](_0x390eaa[_0xa9b4('0x3d')][_0xa9b4('0x44')]);_0x16d650[_0xa9b4('0x45')]=qs[_0xa9b4('0x3e')](_[_0xa9b4('0x46')](_0x390eaa[_0xa9b4('0x3d')],_0x3cdb9d[_0xa9b4('0x3e')]));if(_0x390eaa[_0xa9b4('0x3d')]['filter']){_0x16d650[_0xa9b4('0x45')]=_[_0xa9b4('0x47')](_0x16d650[_0xa9b4('0x45')],{'$or':_[_0xa9b4('0x2f')](_0x16d650[_0xa9b4('0x3f')],function(_0x3ed347){var _0x363643={};_0x363643[_0x3ed347]={'$like':'%'+_0x390eaa[_0xa9b4('0x3d')][_0xa9b4('0x2d')]+'%'};return _0x363643;})});}_0x16d650=_[_0xa9b4('0x47')]({},_0x16d650,_0x390eaa['options']);return _0x490529[_0xa9b4('0x6c')](_0x16d650);}})['then'](function(_0x406c0e){if(_0x406c0e){_0x15a660=_0x406c0e[_0xa9b4('0x50')];if(!_0x390eaa[_0xa9b4('0x3d')][_0xa9b4('0x66')](_0xa9b4('0x42'))){_0x16d650[_0xa9b4('0x24')]=qs[_0xa9b4('0x24')](_0x390eaa[_0xa9b4('0x3d')][_0xa9b4('0x24')]);_0x16d650[_0xa9b4('0x26')]=qs[_0xa9b4('0x26')](_0x390eaa['query'][_0xa9b4('0x26')]);}return _0x490529[_0xa9b4('0x6c')](_0x16d650);}})[_0xa9b4('0x29')](function(_0x203f49){if(_0x203f49){return _0x203f49?{'count':_0x15a660,'rows':_0x203f49}:null;}})[_0xa9b4('0x29')](respondWithResult(_0x1da194,null))['catch'](handleError(_0x1da194,null));};exports['addTeams']=function(_0x5fb22d,_0x2ead4b,_0x1a4f3a){var _0x52053b=_0x5fb22d[_0xa9b4('0x5d')][_0xa9b4('0x6e')];var _0x3d5d28=_[_0xa9b4('0x2f')](_0x52053b,'id');return db[_0xa9b4('0x6d')][_0xa9b4('0x4c')]({'where':{'id':_0x3d5d28},'attributes':['id'],'include':[{'model':db[_0xa9b4('0x6f')],'as':'Agents','attributes':['id',_0xa9b4('0x34'),'online',_0xa9b4('0x70'),'interface'],'raw':!![]}]})[_0xa9b4('0x29')](function(_0x1607cb){if(_0x1607cb){var _0x588c61=_[_0xa9b4('0x71')](_0x1607cb,function(_0x532f25){var _0x11c43b=_0x532f25[_0xa9b4('0x2a')]({'plain':!![]});_0x11c43b[_0xa9b4('0x72')][_0xa9b4('0x73')](function(_0x871879){_0x871879[_0xa9b4('0x74')]=_['find'](_0x52053b,{'id':_0x11c43b['id']})[_0xa9b4('0x74')];});return _0x11c43b[_0xa9b4('0x72')];});return db[_0xa9b4('0x3a')][_0xa9b4('0x32')]({'where':{'id':_0x5fb22d['params']['id']}})[_0xa9b4('0x29')](function(_0x4b8b09){return db[_0xa9b4('0x75')][_0xa9b4('0x76')](function(_0x128cfe){return _0x4b8b09[_0xa9b4('0x77')](_0x3d5d28,{'transaction':_0x128cfe})[_0xa9b4('0x29')](function(){return BPromise[_0xa9b4('0x78')](_0x52053b,function(_0x52e6bf){return db['TeamVoiceQueue']['upsert']({'TeamId':_0x52e6bf['id'],'VoiceQueueId':_0x5fb22d[_0xa9b4('0x5a')]['id'],'penalty':_0x52e6bf['penalty']},{'transaction':_0x128cfe});});})[_0xa9b4('0x29')](function(){return BPromise['each'](_0x588c61,function(_0x5d99db){return db['UserVoiceQueue'][_0xa9b4('0x79')]({'where':{'UserId':_0x5d99db['id'],'VoiceQueueId':_0x5fb22d[_0xa9b4('0x5a')]['id']},'defaults':{'penalty':_0x5d99db['penalty']},'transaction':_0x128cfe});});})[_0xa9b4('0x29')](function(){return BPromise[_0xa9b4('0x78')](_[_0xa9b4('0x2d')](_0x588c61,{'online':!![]}),function(_0x4187e4){return db[_0xa9b4('0x7a')][_0xa9b4('0x7b')]({'membername':_0x4187e4[_0xa9b4('0x34')],'UserId':_0x4187e4['id'],'queue_name':_0x4b8b09[_0xa9b4('0x34')],'VoiceQueueId':_0x4b8b09['id'],'interface':_[_0xa9b4('0x7c')](_0x4187e4[_0xa9b4('0x7d')])?util[_0xa9b4('0x7e')](_0xa9b4('0x7f'),_0x4187e4[_0xa9b4('0x34')]):_0x4187e4[_0xa9b4('0x7d')],'paused':_0x4187e4['voicePause']||![],'penalty':_0x4187e4[_0xa9b4('0x74')]},{'transaction':_0x128cfe});});})[_0xa9b4('0x29')](function(){_0x588c61[_0xa9b4('0x73')](function(_0x236db5){socket['emit']('userVoiceQueue:save',{'UserId':_0x236db5['id'],'VoiceQueueId':_0x4b8b09['id']});});});});});}})[_0xa9b4('0x29')](respondWithStatusCode(_0x2ead4b,null))[_0xa9b4('0x4e')](handleError(_0x2ead4b,null));};exports[_0xa9b4('0x80')]=function(_0x1ed13c,_0x17d3dd,_0xd76737){return db['Team'][_0xa9b4('0x4c')]({'where':{'id':_0x1ed13c[_0xa9b4('0x3d')][_0xa9b4('0x81')]},'attributes':['id'],'include':[{'model':db[_0xa9b4('0x6f')],'as':_0xa9b4('0x72'),'attributes':['id'],'raw':!![]}]})['then'](handleEntityNotFound(_0x17d3dd,null))[_0xa9b4('0x29')](function(_0x543e7c){var _0x3d7f2f=_[_0xa9b4('0x2f')](_0x543e7c,'id');var _0x5746d1=[];var _0x4f64ef=[];var _0x4f1f71=squel[_0xa9b4('0x82')]();_0x4f1f71['field'](_0xa9b4('0x83'))[_0xa9b4('0x84')](_0xa9b4('0x85'),'tq')[_0xa9b4('0x86')](_0xa9b4('0x87'),'ut',_0xa9b4('0x88'))['where'](_0xa9b4('0x89'),_0x1ed13c[_0xa9b4('0x5a')]['id']);for(var _0x5d394d=0x0;_0x5d394d<_0x543e7c['length'];_0x5d394d+=0x1){let _0x435515=_0x543e7c[_0x5d394d];for(var _0x5d6dbe=0x0;_0x5d6dbe<_0x435515['Agents'][_0xa9b4('0x50')];_0x5d6dbe+=0x1){let _0x247bed=_0x435515['Agents'][_0x5d6dbe];var _0x586ec2=_0x4f1f71[_0xa9b4('0x59')]();_0x586ec2[_0xa9b4('0x45')](_0xa9b4('0x8a'),_0x247bed['id']);_0x4f64ef[_0xa9b4('0x8b')](db[_0xa9b4('0x75')][_0xa9b4('0x3d')](_0x586ec2['toString'](),{'type':db[_0xa9b4('0x75')]['QueryTypes'][_0xa9b4('0x8c')]})['then'](function(_0x5e2ad3){if(_0x5e2ad3['length']===0x1){return _0x247bed['id'];}else{var _0x51fb97=_['every'](_['map'](_0x5e2ad3,_0xa9b4('0x8d')),function(_0x3eb55b){return _[_0xa9b4('0x31')](_0x3d7f2f,_0x3eb55b);});if(_0x51fb97){return _0x247bed['id'];}}}));}}return BPromise[_0xa9b4('0x8e')](_0x4f64ef)['then'](function(_0x2f200d){_0x5746d1=_(_0x5746d1)[_0xa9b4('0x8f')](_0x2f200d)[_0xa9b4('0x90')]()[_0xa9b4('0x30')]();return db[_0xa9b4('0x3a')][_0xa9b4('0x32')]({'where':{'id':_0x1ed13c[_0xa9b4('0x5a')]['id']}})[_0xa9b4('0x29')](function(_0x3c7742){return db['sequelize']['transaction'](function(_0x39f5db){return _0x3c7742[_0xa9b4('0x80')](_0x1ed13c['query']['ids'],{'transaction':_0x39f5db})[_0xa9b4('0x29')](function(){if(!_[_0xa9b4('0x91')](_0x5746d1)){return _0x3c7742['removeAgents'](_0x5746d1,{'transaction':_0x39f5db})[_0xa9b4('0x29')](function(){return db[_0xa9b4('0x7a')]['destroy']({'where':{'VoiceQueueId':_0x1ed13c['params']['id'],'UserId':_0x5746d1},'transaction':_0x39f5db});});}})['then'](function(){_0x5746d1[_0xa9b4('0x73')](function(_0x5ced71){socket[_0xa9b4('0x92')](_0xa9b4('0x93'),{'UserId':_0x5ced71,'VoiceQueueId':_0x3c7742['id']});});});});});});})[_0xa9b4('0x29')](respondWithStatusCode(_0x17d3dd,null))[_0xa9b4('0x4e')](handleError(_0x17d3dd,null));};exports[_0xa9b4('0x94')]=function(_0x610c34,_0x4116ea,_0x1e06d2){var _0x323576,_0x4466a8;return db[_0xa9b4('0x3a')][_0xa9b4('0x32')]({'where':{'id':_0x610c34[_0xa9b4('0x5a')]['id']}})['then'](handleEntityNotFound(_0x4116ea,null))[_0xa9b4('0x29')](function(_0x2a2c48){if(_0x2a2c48){_0x4466a8=_0x2a2c48;return _0x2a2c48['addAgents'](_0x610c34[_0xa9b4('0x5d')]['ids'],_[_0xa9b4('0x5b')](_0x610c34[_0xa9b4('0x5d')],[_0xa9b4('0x81'),'id'])||{})['spread'](function(_0x297fdb){for(var _0x17ec4d=0x0;_0x17ec4d<_0x610c34['body']['ids'][_0xa9b4('0x50')];_0x17ec4d+=0x1){socket[_0xa9b4('0x92')]('userVoiceQueue:save',{'UserId':_0x610c34[_0xa9b4('0x5d')][_0xa9b4('0x81')][_0x17ec4d],'VoiceQueueId':_0x610c34[_0xa9b4('0x5a')]['id']});}return _0x297fdb;});}})[_0xa9b4('0x29')](function(_0x151e75){_0x323576=_0x151e75||[];if(_0x4466a8){return db[_0xa9b4('0x6f')][_0xa9b4('0x4c')]({'where':{'id':_0x610c34['body'][_0xa9b4('0x81')]},'attributes':['id',_0xa9b4('0x34'),_0xa9b4('0x95'),_0xa9b4('0x70'),_0xa9b4('0x7d')],'raw':!![]});}})[_0xa9b4('0x29')](function(_0x37508d){if(!_[_0xa9b4('0x91')](_0x37508d)){var _0x207aa2=[];for(var _0x507e40=0x0;_0x507e40<_0x37508d[_0xa9b4('0x50')];_0x507e40++){if(_0x37508d[_0x507e40][_0xa9b4('0x95')]){_0x207aa2['push'](db['UserVoiceQueueRt'][_0xa9b4('0x7b')]({'membername':_0x37508d[_0x507e40][_0xa9b4('0x34')],'UserId':_0x37508d[_0x507e40]['id'],'queue_name':_0x4466a8[_0xa9b4('0x34')],'VoiceQueueId':_0x4466a8['id'],'interface':_[_0xa9b4('0x7c')](_0x37508d[_0x507e40][_0xa9b4('0x7d')])?util['format'](_0xa9b4('0x7f'),_0x37508d[_0x507e40][_0xa9b4('0x34')]):_0x37508d[_0x507e40]['interface'],'paused':_0x37508d[_0x507e40]['voicePause']||![],'penalty':_0x610c34['body'][_0xa9b4('0x74')]||0x0}));}}return BPromise['all'](_0x207aa2);}})[_0xa9b4('0x29')](function(){return _0x323576;})[_0xa9b4('0x29')](respondWithResult(_0x4116ea,null))[_0xa9b4('0x4e')](handleError(_0x4116ea,null));};exports['removeAgents']=function(_0x1dc6b4,_0x4f434e,_0x480eb2){return db[_0xa9b4('0x3a')]['find']({'where':{'id':_0x1dc6b4['params']['id']}})[_0xa9b4('0x29')](handleEntityNotFound(_0x4f434e,null))['then'](function(_0x40780f){if(_0x40780f){return _0x40780f[_0xa9b4('0x96')](_0x1dc6b4[_0xa9b4('0x3d')]['ids'])[_0xa9b4('0x29')](function(){if(_['isArray'](_0x1dc6b4[_0xa9b4('0x3d')]['ids'])){for(var _0x3a167a=0x0;_0x3a167a<_0x1dc6b4[_0xa9b4('0x3d')]['ids']['length'];_0x3a167a+=0x1){socket['emit'](_0xa9b4('0x93'),{'UserId':Number(_0x1dc6b4[_0xa9b4('0x3d')][_0xa9b4('0x81')][_0x3a167a]),'VoiceQueueId':Number(_0x1dc6b4['params']['id'])});}}else{socket[_0xa9b4('0x92')](_0xa9b4('0x93'),{'UserId':Number(_0x1dc6b4['query']['ids']),'VoiceQueueId':Number(_0x1dc6b4[_0xa9b4('0x5a')]['id'])});}});}})['then'](function(_0x366807){return db['UserVoiceQueueRt'][_0xa9b4('0x60')]({'where':{'VoiceQueueId':_0x1dc6b4['params']['id'],'UserId':_0x1dc6b4[_0xa9b4('0x3d')][_0xa9b4('0x81')]}})[_0xa9b4('0x29')](function(){return _0x366807;});})[_0xa9b4('0x29')](respondWithStatusCode(_0x4f434e,null))[_0xa9b4('0x4e')](handleError(_0x4f434e,null));};exports[_0xa9b4('0x97')]=function(_0x4393a7,_0x163407,_0x3c5f97){var _0x487294={};var _0x3ec0f5={};var _0x341506;var _0x30b565;return db['VoiceQueue']['findOne']({'where':{'id':_0x4393a7[_0xa9b4('0x5a')]['id']}})['then'](handleEntityNotFound(_0x163407,null))['then'](function(_0x5ac40b){if(_0x5ac40b){_0x341506=_0x5ac40b;_0x3ec0f5[_0xa9b4('0x3c')]=_['keys'](db['User'][_0xa9b4('0x3b')]);_0x3ec0f5['query']=_[_0xa9b4('0x4f')](_0x4393a7['query']);_0x3ec0f5[_0xa9b4('0x3e')]=_[_0xa9b4('0x40')](_0x3ec0f5[_0xa9b4('0x3c')],_0x3ec0f5[_0xa9b4('0x3d')]);_0x487294['attributes']=_['intersection'](_0x3ec0f5[_0xa9b4('0x3c')],qs[_0xa9b4('0x41')](_0x4393a7['query'][_0xa9b4('0x41')]));_0x487294['attributes']=_0x487294[_0xa9b4('0x3f')]['length']?_0x487294['attributes']:_0x3ec0f5[_0xa9b4('0x3c')];_0x487294[_0xa9b4('0x43')]=qs[_0xa9b4('0x44')](_0x4393a7[_0xa9b4('0x3d')]['sort']);_0x487294[_0xa9b4('0x45')]=qs['filters'](_[_0xa9b4('0x46')](_0x4393a7[_0xa9b4('0x3d')],_0x3ec0f5[_0xa9b4('0x3e')]));if(_0x4393a7[_0xa9b4('0x3d')][_0xa9b4('0x2d')]){_0x487294[_0xa9b4('0x45')]=_['merge'](_0x487294['where'],{'$or':_[_0xa9b4('0x2f')](_0x487294['attributes'],function(_0x1c1f3b){var _0x1c9986={};_0x1c9986[_0x1c1f3b]={'$like':'%'+_0x4393a7[_0xa9b4('0x3d')][_0xa9b4('0x2d')]+'%'};return _0x1c9986;})});}_0x487294=_['merge']({},_0x487294,_0x4393a7[_0xa9b4('0x49')]);return _0x341506[_0xa9b4('0x97')](_0x487294);}})[_0xa9b4('0x29')](function(_0x4d8d98){if(_0x4d8d98){_0x30b565=_0x4d8d98[_0xa9b4('0x50')];if(!_0x4393a7[_0xa9b4('0x3d')][_0xa9b4('0x66')](_0xa9b4('0x42'))){_0x487294[_0xa9b4('0x24')]=qs[_0xa9b4('0x24')](_0x4393a7[_0xa9b4('0x3d')][_0xa9b4('0x24')]);_0x487294[_0xa9b4('0x26')]=qs['offset'](_0x4393a7['query'][_0xa9b4('0x26')]);}return _0x341506[_0xa9b4('0x97')](_0x487294);}})[_0xa9b4('0x29')](function(_0x5c3e5b){if(_0x5c3e5b){return _0x5c3e5b?{'count':_0x30b565,'rows':_0x5c3e5b}:null;}})[_0xa9b4('0x29')](respondWithResult(_0x163407,null))[_0xa9b4('0x4e')](handleError(_0x163407,null));};exports['getMembers']=function(_0x3a573a,_0x145799,_0x315793){var _0x2ac396={};var _0x22df4a={};var _0x3be49b;var _0x44e3ce;return db['VoiceQueue'][_0xa9b4('0x62')]({'where':{'id':_0x3a573a[_0xa9b4('0x5a')]['id']}})['then'](handleEntityNotFound(_0x145799,null))[_0xa9b4('0x29')](function(_0x524f56){if(_0x524f56){_0x3be49b=_0x524f56;_0x22df4a[_0xa9b4('0x3c')]=_[_0xa9b4('0x4f')](db[_0xa9b4('0x7a')]['rawAttributes']);_0x22df4a['query']=_[_0xa9b4('0x4f')](_0x3a573a[_0xa9b4('0x3d')]);_0x22df4a[_0xa9b4('0x3e')]=_[_0xa9b4('0x40')](_0x22df4a['model'],_0x22df4a[_0xa9b4('0x3d')]);_0x2ac396['attributes']=_['intersection'](_0x22df4a['model'],qs[_0xa9b4('0x41')](_0x3a573a[_0xa9b4('0x3d')][_0xa9b4('0x41')]));_0x2ac396[_0xa9b4('0x3f')]=_0x2ac396[_0xa9b4('0x3f')]['length']?_0x2ac396[_0xa9b4('0x3f')]:_0x22df4a[_0xa9b4('0x3c')];_0x2ac396[_0xa9b4('0x43')]=qs['sort'](_0x3a573a[_0xa9b4('0x3d')][_0xa9b4('0x44')]);_0x2ac396[_0xa9b4('0x45')]=qs[_0xa9b4('0x3e')](_[_0xa9b4('0x46')](_0x3a573a[_0xa9b4('0x3d')],_0x22df4a[_0xa9b4('0x3e')]));if(_0x3a573a[_0xa9b4('0x3d')][_0xa9b4('0x2d')]){_0x2ac396[_0xa9b4('0x45')]=_['merge'](_0x2ac396[_0xa9b4('0x45')],{'$or':_[_0xa9b4('0x2f')](_0x2ac396[_0xa9b4('0x3f')],function(_0x54c1b1){var _0x442f5f={};_0x442f5f[_0x54c1b1]={'$like':'%'+_0x3a573a[_0xa9b4('0x3d')][_0xa9b4('0x2d')]+'%'};return _0x442f5f;})});}_0x2ac396=_[_0xa9b4('0x47')]({},_0x2ac396,_0x3a573a[_0xa9b4('0x49')]);return _0x3be49b[_0xa9b4('0x98')](_0x2ac396);}})[_0xa9b4('0x29')](function(_0x445428){if(_0x445428){_0x44e3ce=_0x445428[_0xa9b4('0x50')];if(!_0x3a573a[_0xa9b4('0x3d')][_0xa9b4('0x66')]('nolimit')){_0x2ac396['limit']=qs['limit'](_0x3a573a[_0xa9b4('0x3d')]['limit']);_0x2ac396[_0xa9b4('0x26')]=qs['offset'](_0x3a573a['query']['offset']);}return _0x3be49b[_0xa9b4('0x98')](_0x2ac396);}})[_0xa9b4('0x29')](function(_0x384136){return _0x384136?{'count':_0x44e3ce,'rows':_0x384136}:null;})[_0xa9b4('0x29')](respondWithResult(_0x145799,null))[_0xa9b4('0x4e')](handleError(_0x145799,null));};exports[_0xa9b4('0x99')]=function(_0xffca8e,_0x506be4,_0x1d966f){var _0xd3046c={};var _0x1a9dcc={};var _0x1bff49;var _0x5df8ae;return db[_0xa9b4('0x3a')]['findOne']({'where':{'id':_0xffca8e['params']['id']}})[_0xa9b4('0x29')](handleEntityNotFound(_0x506be4,null))['then'](function(_0x519b52){if(_0x519b52){_0x1bff49=_0x519b52;_0x1a9dcc[_0xa9b4('0x3c')]=_['keys'](db[_0xa9b4('0x9a')]['rawAttributes']);_0x1a9dcc[_0xa9b4('0x3d')]=_[_0xa9b4('0x4f')](_0xffca8e[_0xa9b4('0x3d')]);_0x1a9dcc[_0xa9b4('0x3e')]=_[_0xa9b4('0x40')](_0x1a9dcc[_0xa9b4('0x3c')],_0x1a9dcc[_0xa9b4('0x3d')]);_0xd3046c[_0xa9b4('0x3f')]=_['intersection'](_0x1a9dcc[_0xa9b4('0x3c')],qs[_0xa9b4('0x41')](_0xffca8e['query'][_0xa9b4('0x41')]));_0xd3046c[_0xa9b4('0x3f')]=_0xd3046c[_0xa9b4('0x3f')][_0xa9b4('0x50')]?_0xd3046c[_0xa9b4('0x3f')]:_0x1a9dcc[_0xa9b4('0x3c')];_0xd3046c['order']=qs[_0xa9b4('0x44')](_0xffca8e[_0xa9b4('0x3d')][_0xa9b4('0x44')]);_0xd3046c[_0xa9b4('0x45')]=qs['filters'](_[_0xa9b4('0x46')](_0xffca8e['query'],_0x1a9dcc[_0xa9b4('0x3e')]));if(_0xffca8e[_0xa9b4('0x3d')][_0xa9b4('0x2d')]){_0xd3046c[_0xa9b4('0x45')]=_[_0xa9b4('0x47')](_0xd3046c['where'],{'$or':_[_0xa9b4('0x2f')](_0xd3046c[_0xa9b4('0x3f')],function(_0x5ad8b5){var _0xa4421a={};_0xa4421a[_0x5ad8b5]={'$like':'%'+_0xffca8e[_0xa9b4('0x3d')]['filter']+'%'};return _0xa4421a;})});}_0xd3046c=_['merge']({},_0xd3046c,_0xffca8e[_0xa9b4('0x49')]);return _0x1bff49[_0xa9b4('0x99')](_0xd3046c);}})[_0xa9b4('0x29')](function(_0x398469){if(_0x398469){_0x5df8ae=_0x398469[_0xa9b4('0x50')];if(!_0xffca8e[_0xa9b4('0x3d')][_0xa9b4('0x66')](_0xa9b4('0x42'))){_0xd3046c[_0xa9b4('0x24')]=qs[_0xa9b4('0x24')](_0xffca8e[_0xa9b4('0x3d')]['limit']);_0xd3046c[_0xa9b4('0x26')]=qs[_0xa9b4('0x26')](_0xffca8e[_0xa9b4('0x3d')][_0xa9b4('0x26')]);}return _0x1bff49[_0xa9b4('0x99')](_0xd3046c);}})['then'](function(_0x4598d9){if(_0x4598d9){return _0x4598d9?{'count':_0x5df8ae,'rows':_0x4598d9}:null;}})[_0xa9b4('0x29')](respondWithResult(_0x506be4,null))['catch'](handleError(_0x506be4,null));};exports[_0xa9b4('0x9b')]=function(_0x3ecf87,_0x47f9c1,_0x180aa8){var _0x8ce958,_0x90e110;return db[_0xa9b4('0x3a')][_0xa9b4('0x32')]({'where':{'id':_0x3ecf87['params']['id']}})[_0xa9b4('0x29')](handleEntityNotFound(_0x47f9c1,null))[_0xa9b4('0x29')](function(_0x900720){if(_0x900720){_0x90e110=_0x900720;return _0x900720[_0xa9b4('0x9b')](_0x3ecf87['body'][_0xa9b4('0x81')],_[_0xa9b4('0x5b')](_0x3ecf87[_0xa9b4('0x5d')],[_0xa9b4('0x81'),'id'])||{});}return null;})['spread'](function(_0x20adc5){var _0x3199ac;_0x8ce958=_0x20adc5||[];var _0x5471cb=[];if(_0x20adc5){for(var _0x5ceef6=0x0;_0x5ceef6<_0x20adc5[_0xa9b4('0x50')];_0x5ceef6+=0x1){var _0x2d7f1c=_0x20adc5[_0x5ceef6][_0xa9b4('0x2a')]({'plain':!![]});_0x90e110[_0xa9b4('0x9c')]=_0x3ecf87[_0xa9b4('0x5d')][_0xa9b4('0x9c')]?_0x3ecf87[_0xa9b4('0x5d')][_0xa9b4('0x9c')]:_0x90e110[_0xa9b4('0x9c')];switch(_0x90e110[_0xa9b4('0x9c')]){case _0xa9b4('0x9d'):_0x3199ac=squel[_0xa9b4('0x9e')]()['into'](_0xa9b4('0x9f'))[_0xa9b4('0xa0')]([_0xa9b4('0xa1'),_0xa9b4('0xa2'),'ContactId',_0xa9b4('0xa3'),_0xa9b4('0x67'),_0xa9b4('0x5c'),_0xa9b4('0x5e')],squel['select']()['field'](_0xa9b4('0xa1'),_0xa9b4('0xa1'))[_0xa9b4('0xa4')](_0xa9b4('0xa5'),'scheduledAt')[_0xa9b4('0xa4')]('id',_0xa9b4('0xa6'))[_0xa9b4('0xa4')](_0x2d7f1c[_0xa9b4('0xa7')][_0xa9b4('0xa8')](),_0xa9b4('0xa3'))[_0xa9b4('0xa4')](_0x3ecf87[_0xa9b4('0x5a')]['id'][_0xa9b4('0xa8')](),_0xa9b4('0x67'))['field']('NOW()',_0xa9b4('0x5c'))[_0xa9b4('0xa4')](_0xa9b4('0xa5'),_0xa9b4('0x5e'))[_0xa9b4('0x84')](_0xa9b4('0xa9'))[_0xa9b4('0x45')](_0xa9b4('0xaa'))[_0xa9b4('0x45')](_0xa9b4('0xab'),_0x2d7f1c[_0xa9b4('0xa7')]['toString']())[_0xa9b4('0x45')](_0xa9b4('0xac'))[_0xa9b4('0x45')](_0xa9b4('0xad'),squel[_0xa9b4('0x82')]()[_0xa9b4('0xa4')](_0xa9b4('0xae'))[_0xa9b4('0x84')]('cm_hopper_final')[_0xa9b4('0x45')](_0xa9b4('0x89'),_0x3ecf87[_0xa9b4('0x5a')]['id'][_0xa9b4('0xa8')]()))[_0xa9b4('0x45')](_0xa9b4('0xad'),squel[_0xa9b4('0x82')]()['field'](_0xa9b4('0xaf'))[_0xa9b4('0x84')](_0xa9b4('0x9f'))[_0xa9b4('0x45')](_0xa9b4('0x89'),_0x3ecf87[_0xa9b4('0x5a')]['id'][_0xa9b4('0xa8')]())))[_0xa9b4('0xa8')]();break;case _0xa9b4('0xb0'):_0x3199ac=squel[_0xa9b4('0x9e')]()[_0xa9b4('0xb1')]('cm_hopper')['fromQuery']([_0xa9b4('0xa1'),_0xa9b4('0xa2'),_0xa9b4('0xa6'),_0xa9b4('0xa3'),_0xa9b4('0x67'),_0xa9b4('0x5c'),_0xa9b4('0x5e')],squel[_0xa9b4('0x82')]()[_0xa9b4('0xa4')](_0xa9b4('0xa1'),'phone')[_0xa9b4('0xa4')]('NOW()',_0xa9b4('0xa2'))['field']('id','ContactId')['field'](_0x2d7f1c[_0xa9b4('0xa7')][_0xa9b4('0xa8')](),_0xa9b4('0xa3'))[_0xa9b4('0xa4')](_0x3ecf87[_0xa9b4('0x5a')]['id'][_0xa9b4('0xa8')](),_0xa9b4('0x67'))[_0xa9b4('0xa4')](_0xa9b4('0xa5'),'createdAt')[_0xa9b4('0xa4')]('NOW()','updatedAt')[_0xa9b4('0x84')](_0xa9b4('0xa9'))[_0xa9b4('0x45')](_0xa9b4('0xaa'))[_0xa9b4('0x45')](_0xa9b4('0xab'),_0x2d7f1c[_0xa9b4('0xa7')]['toString']())[_0xa9b4('0x45')](_0xa9b4('0xac'))['where']('phone\x20NOT\x20IN\x20(?)',squel[_0xa9b4('0x82')]()[_0xa9b4('0xa4')](_0xa9b4('0xaf'))[_0xa9b4('0x84')](_0xa9b4('0x9f'))[_0xa9b4('0x45')](_0xa9b4('0x89'),_0x3ecf87['params']['id'][_0xa9b4('0xa8')]())))['toString']();break;default:_0x3199ac=squel[_0xa9b4('0x9e')]()['into'](_0xa9b4('0x9f'))[_0xa9b4('0xa0')]([_0xa9b4('0xa1'),_0xa9b4('0xa2'),'ContactId',_0xa9b4('0xa3'),_0xa9b4('0x67'),_0xa9b4('0x5c'),_0xa9b4('0x5e')],squel['select']()[_0xa9b4('0xa4')](_0xa9b4('0xa1'),_0xa9b4('0xa1'))['field'](_0xa9b4('0xa5'),_0xa9b4('0xa2'))['field']('id',_0xa9b4('0xa6'))[_0xa9b4('0xa4')](_0x2d7f1c[_0xa9b4('0xa7')][_0xa9b4('0xa8')](),_0xa9b4('0xa3'))[_0xa9b4('0xa4')](_0x3ecf87[_0xa9b4('0x5a')]['id'][_0xa9b4('0xa8')](),'VoiceQueueId')['field']('NOW()',_0xa9b4('0x5c'))[_0xa9b4('0xa4')]('NOW()',_0xa9b4('0x5e'))[_0xa9b4('0x84')](_0xa9b4('0xa9'))[_0xa9b4('0x45')]('deletedAt\x20IS\x20NULL')['where'](_0xa9b4('0xab'),_0x2d7f1c[_0xa9b4('0xa7')]['toString']())[_0xa9b4('0x45')](_0xa9b4('0xac')))['toString']();}_0x5471cb['push'](db[_0xa9b4('0x75')][_0xa9b4('0x3d')](_0x3199ac));}return BPromise[_0xa9b4('0x8e')](_0x5471cb);}})[_0xa9b4('0x29')](function(){return _0x8ce958;})[_0xa9b4('0x29')](respondWithResult(_0x47f9c1,null))['catch'](handleError(_0x47f9c1,null));};exports[_0xa9b4('0xb2')]=function(_0x3eaa40,_0xee4291,_0x57ab24){return db['VoiceQueue']['find']({'where':{'id':_0x3eaa40[_0xa9b4('0x5a')]['id']}})[_0xa9b4('0x29')](handleEntityNotFound(_0xee4291,null))[_0xa9b4('0x29')](function(_0x2f8349){if(_0x2f8349){return _0x2f8349['removeLists'](_0x3eaa40[_0xa9b4('0x3d')]['ids']);}})[_0xa9b4('0x29')](function(_0x5812eb){if(_0x5812eb){return db[_0xa9b4('0x63')][_0xa9b4('0x60')]({'where':{'ListId':_0x3eaa40[_0xa9b4('0x3d')][_0xa9b4('0x81')],'VoiceQueueId':_0x3eaa40[_0xa9b4('0x5a')]['id']}})[_0xa9b4('0x29')](function(){return _0x5812eb;});}})[_0xa9b4('0x29')](respondWithStatusCode(_0xee4291,null))[_0xa9b4('0x4e')](handleError(_0xee4291,null));};exports['getBlackLists']=function(_0x13e74e,_0x54e8a2,_0xfce068){var _0x4d7b8e={};var _0x3fd682={};var _0xf3c136;var _0x274d73;return db['VoiceQueue']['findOne']({'where':{'id':_0x13e74e['params']['id']}})[_0xa9b4('0x29')](handleEntityNotFound(_0x54e8a2,null))['then'](function(_0x472de0){if(_0x472de0){_0xf3c136=_0x472de0;_0x3fd682[_0xa9b4('0x3c')]=_[_0xa9b4('0x4f')](db['CmList'][_0xa9b4('0x3b')]);_0x3fd682['query']=_[_0xa9b4('0x4f')](_0x13e74e[_0xa9b4('0x3d')]);_0x3fd682['filters']=_[_0xa9b4('0x40')](_0x3fd682[_0xa9b4('0x3c')],_0x3fd682['query']);_0x4d7b8e[_0xa9b4('0x3f')]=_[_0xa9b4('0x40')](_0x3fd682[_0xa9b4('0x3c')],qs['fields'](_0x13e74e[_0xa9b4('0x3d')]['fields']));_0x4d7b8e[_0xa9b4('0x3f')]=_0x4d7b8e[_0xa9b4('0x3f')]['length']?_0x4d7b8e[_0xa9b4('0x3f')]:_0x3fd682[_0xa9b4('0x3c')];_0x4d7b8e[_0xa9b4('0x43')]=qs['sort'](_0x13e74e['query'][_0xa9b4('0x44')]);_0x4d7b8e[_0xa9b4('0x45')]=qs['filters'](_[_0xa9b4('0x46')](_0x13e74e[_0xa9b4('0x3d')],_0x3fd682[_0xa9b4('0x3e')]));if(_0x13e74e[_0xa9b4('0x3d')][_0xa9b4('0x2d')]){_0x4d7b8e['where']=_[_0xa9b4('0x47')](_0x4d7b8e[_0xa9b4('0x45')],{'$or':_[_0xa9b4('0x2f')](_0x4d7b8e[_0xa9b4('0x3f')],function(_0x35060b){var _0x507f37={};_0x507f37[_0x35060b]={'$like':'%'+_0x13e74e[_0xa9b4('0x3d')][_0xa9b4('0x2d')]+'%'};return _0x507f37;})});}_0x4d7b8e=_['merge']({},_0x4d7b8e,_0x13e74e[_0xa9b4('0x49')]);return _0xf3c136[_0xa9b4('0xb3')](_0x4d7b8e);}})[_0xa9b4('0x29')](function(_0x47ad94){if(_0x47ad94){_0x274d73=_0x47ad94[_0xa9b4('0x50')];if(!_0x13e74e['query'][_0xa9b4('0x66')](_0xa9b4('0x42'))){_0x4d7b8e[_0xa9b4('0x24')]=qs[_0xa9b4('0x24')](_0x13e74e[_0xa9b4('0x3d')][_0xa9b4('0x24')]);_0x4d7b8e[_0xa9b4('0x26')]=qs['offset'](_0x13e74e[_0xa9b4('0x3d')]['offset']);}return _0xf3c136[_0xa9b4('0xb3')](_0x4d7b8e);}})[_0xa9b4('0x29')](function(_0x18e2c1){if(_0x18e2c1){return _0x18e2c1?{'count':_0x274d73,'rows':_0x18e2c1}:null;}})['then'](respondWithResult(_0x54e8a2,null))[_0xa9b4('0x4e')](handleError(_0x54e8a2,null));};exports['addBlackLists']=function(_0x1d9e5d,_0x3e2d94,_0x8bf67a){var _0x56a6a4,_0x211494;return db[_0xa9b4('0x3a')][_0xa9b4('0x32')]({'where':{'id':_0x1d9e5d[_0xa9b4('0x5a')]['id']}})['then'](handleEntityNotFound(_0x3e2d94,null))[_0xa9b4('0x29')](function(_0x491eeb){if(_0x491eeb){_0x211494=_0x491eeb;return _0x491eeb[_0xa9b4('0xb4')](_0x1d9e5d[_0xa9b4('0x5d')][_0xa9b4('0x81')],_[_0xa9b4('0x5b')](_0x1d9e5d[_0xa9b4('0x5d')],['ids','id'])||{});}return null;})[_0xa9b4('0xb5')](function(_0x3b79d4){var _0x321d00;_0x56a6a4=_0x3b79d4||[];var _0x1a6747=[];if(_0x3b79d4){for(var _0x42bd42=0x0;_0x42bd42<_0x3b79d4[_0xa9b4('0x50')];_0x42bd42+=0x1){var _0x5759a7=_0x3b79d4[_0x42bd42][_0xa9b4('0x2a')]({'plain':!![]});_0x321d00=squel[_0xa9b4('0x9e')]()[_0xa9b4('0xb1')](_0xa9b4('0xb6'))[_0xa9b4('0xa0')]([_0xa9b4('0xa1'),_0xa9b4('0xa6'),_0xa9b4('0xa3'),_0xa9b4('0x67'),_0xa9b4('0x5c'),_0xa9b4('0x5e')],squel[_0xa9b4('0x82')]()[_0xa9b4('0xa4')](_0xa9b4('0xa1'),_0xa9b4('0xa1'))[_0xa9b4('0xa4')]('id','ContactId')[_0xa9b4('0xa4')](_0x5759a7['CmListId'][_0xa9b4('0xa8')](),_0xa9b4('0xa3'))[_0xa9b4('0xa4')](_0x1d9e5d[_0xa9b4('0x5a')]['id']['toString'](),_0xa9b4('0x67'))[_0xa9b4('0xa4')]('NOW()',_0xa9b4('0x5c'))[_0xa9b4('0xa4')](_0xa9b4('0xa5'),'updatedAt')[_0xa9b4('0x84')](_0xa9b4('0xa9'))[_0xa9b4('0x45')](_0xa9b4('0xaa'))[_0xa9b4('0x45')](_0xa9b4('0xab'),_0x5759a7[_0xa9b4('0xa7')]['toString']())[_0xa9b4('0x45')](_0xa9b4('0xac')))[_0xa9b4('0xa8')]();_0x1a6747['push'](db[_0xa9b4('0x75')][_0xa9b4('0x3d')](_0x321d00));}return BPromise['all'](_0x1a6747);}})[_0xa9b4('0x29')](function(){return _0x56a6a4;})[_0xa9b4('0x29')](respondWithResult(_0x3e2d94,null))['catch'](handleError(_0x3e2d94,null));};exports[_0xa9b4('0xb7')]=function(_0x59d45e,_0x1c464f,_0x2f9281){return db['VoiceQueue'][_0xa9b4('0x32')]({'where':{'id':_0x59d45e[_0xa9b4('0x5a')]['id']}})['then'](handleEntityNotFound(_0x1c464f,null))['then'](function(_0x4df08e){if(_0x4df08e){return _0x4df08e[_0xa9b4('0xb7')](_0x59d45e[_0xa9b4('0x3d')]['ids']);}})[_0xa9b4('0x29')](function(_0x4577f1){if(_0x4577f1){return db[_0xa9b4('0x6b')][_0xa9b4('0x60')]({'where':{'ListId':_0x59d45e['query'][_0xa9b4('0x81')],'VoiceQueueId':_0x59d45e[_0xa9b4('0x5a')]['id']}})[_0xa9b4('0x29')](function(){return _0x4577f1;});}})[_0xa9b4('0x29')](respondWithStatusCode(_0x1c464f,null))[_0xa9b4('0x4e')](handleError(_0x1c464f,null));}; \ No newline at end of file diff --git a/server/api/voiceQueue/voiceQueue.events.js b/server/api/voiceQueue/voiceQueue.events.js index ea4d9c4..fb4c1c6 100644 --- a/server/api/voiceQueue/voiceQueue.events.js +++ b/server/api/voiceQueue/voiceQueue.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xde76=['remove','emit','hasOwnProperty','hook','exports','setMaxListeners','save'];(function(_0x20c9b2,_0x55d7b1){var _0x2c6030=function(_0x10845f){while(--_0x10845f){_0x20c9b2['push'](_0x20c9b2['shift']());}};_0x2c6030(++_0x55d7b1);}(_0xde76,0x101));var _0x6de7=function(_0x51e973,_0x32d291){_0x51e973=_0x51e973-0x0;var _0x59637=_0xde76[_0x51e973];return _0x59637;};'use strict';var EventEmitter=require('events');var VoiceQueue=require('../../mysqldb')['db']['VoiceQueue'];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0x6de7('0x0')](0x0);var events={'afterCreate':_0x6de7('0x1'),'afterUpdate':'update','afterDestroy':_0x6de7('0x2')};function emitEvent(_0x490829){return function(_0x16f7e1,_0x2fa614,_0x3f1561){VoiceQueueEvents[_0x6de7('0x3')](_0x490829+':'+_0x16f7e1['id'],_0x16f7e1);VoiceQueueEvents['emit'](_0x490829,_0x16f7e1);_0x3f1561(null);};}for(var e in events){if(events[_0x6de7('0x4')](e)){var event=events[e];VoiceQueue[_0x6de7('0x5')](e,emitEvent(event));}}module[_0x6de7('0x6')]=VoiceQueueEvents; \ No newline at end of file +var _0x7dfb=['emit','hasOwnProperty','hook','exports','../../mysqldb','VoiceQueue','setMaxListeners','save','remove'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x7dfb,0x1b4));var _0xb7df=function(_0x397e5f,_0x454c8f){_0x397e5f=_0x397e5f-0x0;var _0x5302b8=_0x7dfb[_0x397e5f];return _0x5302b8;};'use strict';var EventEmitter=require('events');var VoiceQueue=require(_0xb7df('0x0'))['db'][_0xb7df('0x1')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0xb7df('0x2')](0x0);var events={'afterCreate':_0xb7df('0x3'),'afterUpdate':'update','afterDestroy':_0xb7df('0x4')};function emitEvent(_0x1b2ea9){return function(_0x1c50ac,_0x47376e,_0xdc12d){VoiceQueueEvents[_0xb7df('0x5')](_0x1b2ea9+':'+_0x1c50ac['id'],_0x1c50ac);VoiceQueueEvents['emit'](_0x1b2ea9,_0x1c50ac);_0xdc12d(null);};}for(var e in events){if(events[_0xb7df('0x6')](e)){var event=events[e];VoiceQueue[_0xb7df('0x7')](e,emitEvent(event));}}module[_0xb7df('0x8')]=VoiceQueueEvents; \ No newline at end of file diff --git a/server/api/voiceQueue/voiceQueue.model.js b/server/api/voiceQueue/voiceQueue.model.js index c30514a..f96d75c 100644 --- a/server/api/voiceQueue/voiceQueue.model.js +++ b/server/api/voiceQueue/voiceQueue.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x008c=['define','voice_queues','lodash','util','../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment','./voiceQueue.attributes','exports'];(function(_0xd4ae3f,_0x410d0f){var _0x52e69b=function(_0x454872){while(--_0x454872){_0xd4ae3f['push'](_0xd4ae3f['shift']());}};_0x52e69b(++_0x410d0f);}(_0x008c,0x188));var _0xc008=function(_0x379799,_0x4ccf16){_0x379799=_0x379799-0x0;var _0x46e431=_0x008c[_0x379799];return _0x46e431;};'use strict';var _=require(_0xc008('0x0'));var util=require(_0xc008('0x1'));var logger=require(_0xc008('0x2'))(_0xc008('0x3'));var moment=require(_0xc008('0x4'));var BPromise=require('bluebird');var rp=require(_0xc008('0x5'));var fs=require('fs');var path=require(_0xc008('0x6'));var rimraf=require(_0xc008('0x7'));var config=require(_0xc008('0x8'));var attributes=require(_0xc008('0x9'));module[_0xc008('0xa')]=function(_0x13aa7,_0x39bb5e){return _0x13aa7[_0xc008('0xb')]('VoiceQueue',attributes,{'tableName':_0xc008('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x34e8=['voice_queues','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','./voiceQueue.attributes','exports','VoiceQueue'];(function(_0x320fa3,_0x98b382){var _0x2e09a3=function(_0x3f8d8e){while(--_0x3f8d8e){_0x320fa3['push'](_0x320fa3['shift']());}};_0x2e09a3(++_0x98b382);}(_0x34e8,0x12c));var _0x834e=function(_0x25f25c,_0x3afe8b){_0x25f25c=_0x25f25c-0x0;var _0x3f0d69=_0x34e8[_0x25f25c];return _0x3f0d69;};'use strict';var _=require(_0x834e('0x0'));var util=require(_0x834e('0x1'));var logger=require(_0x834e('0x2'))(_0x834e('0x3'));var moment=require('moment');var BPromise=require(_0x834e('0x4'));var rp=require(_0x834e('0x5'));var fs=require('fs');var path=require(_0x834e('0x6'));var rimraf=require(_0x834e('0x7'));var config=require(_0x834e('0x8'));var attributes=require(_0x834e('0x9'));module[_0x834e('0xa')]=function(_0x4a2018,_0x858aa1){return _0x4a2018['define'](_0x834e('0xb'),attributes,{'tableName':_0x834e('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/voiceQueue/voiceQueue.rpc.js b/server/api/voiceQueue/voiceQueue.rpc.js index c44d02c..e4c06f5 100644 --- a/server/api/voiceQueue/voiceQueue.rpc.js +++ b/server/api/voiceQueue/voiceQueue.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa25d=['stringify','error','code','message','info','request\x20sent','result','catch','VoiceQueue','options','raw','where','attributes','limit','map','include','model','GetVoiceQueue','find','ShowVoiceQueue','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','redis','defaults','localhost','socket.io-emitter','./voiceQueue.socket','then','VoiceQueue,\x20%s,\x20%s','VoiceQueue,\x20%s,\x20%s,\x20%s'];(function(_0x40220a,_0x22feb1){var _0x3903cc=function(_0x33a296){while(--_0x33a296){_0x40220a['push'](_0x40220a['shift']());}};_0x3903cc(++_0x22feb1);}(_0xa25d,0xd7));var _0xda25=function(_0x443547,_0x21d7a8){_0x443547=_0x443547-0x0;var _0x1423a8=_0xa25d[_0x443547];return _0x1423a8;};'use strict';var _=require(_0xda25('0x0'));var util=require(_0xda25('0x1'));var moment=require(_0xda25('0x2'));var BPromise=require(_0xda25('0x3'));var rs=require(_0xda25('0x4'));var fs=require('fs');var Redis=require(_0xda25('0x5'));var db=require(_0xda25('0x6'))['db'];var utils=require(_0xda25('0x7'));var logger=require(_0xda25('0x8'))('rpc');var config=require(_0xda25('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xda25('0xa')]['http']({'port':0x232a});config[_0xda25('0xb')]=_[_0xda25('0xc')](config[_0xda25('0xb')],{'host':_0xda25('0xd'),'port':0x18eb});var socket=require(_0xda25('0xe'))(new Redis(config[_0xda25('0xb')]));require(_0xda25('0xf'))['register'](socket);function respondWithRpcPromise(_0x5c0309,_0x1acedb,_0x248710){return new BPromise(function(_0x789cc3,_0x520b16){return client['request'](_0x5c0309,_0x248710)[_0xda25('0x10')](function(_0x515cdc){logger['info'](_0xda25('0x11'),_0x1acedb,'request\x20sent');logger['debug'](_0xda25('0x12'),_0x1acedb,'request\x20sent',JSON[_0xda25('0x13')](_0x515cdc));if(_0x515cdc[_0xda25('0x14')]){if(_0x515cdc[_0xda25('0x14')][_0xda25('0x15')]===0x1f4){logger[_0xda25('0x14')](_0xda25('0x11'),_0x1acedb,_0x515cdc[_0xda25('0x14')][_0xda25('0x16')]);return _0x520b16(_0x515cdc[_0xda25('0x14')][_0xda25('0x16')]);}logger['error'](_0xda25('0x11'),_0x1acedb,_0x515cdc[_0xda25('0x14')][_0xda25('0x16')]);return _0x789cc3(_0x515cdc[_0xda25('0x14')][_0xda25('0x16')]);}else{logger[_0xda25('0x17')](_0xda25('0x11'),_0x1acedb,_0xda25('0x18'));_0x789cc3(_0x515cdc[_0xda25('0x19')][_0xda25('0x16')]);}})[_0xda25('0x1a')](function(_0x48c14b){logger['error'](_0xda25('0x11'),_0x1acedb,_0x48c14b);_0x520b16(_0x48c14b);});});}exports['GetVoiceQueue']=function(_0x279e97){var _0x5000e8=this;return new Promise(function(_0x1ba74c,_0x5a6d07){return db[_0xda25('0x1b')]['findAll']({'raw':_0x279e97[_0xda25('0x1c')]?_0x279e97[_0xda25('0x1c')][_0xda25('0x1d')]===undefined?!![]:![]:!![],'where':_0x279e97[_0xda25('0x1c')]?_0x279e97[_0xda25('0x1c')][_0xda25('0x1e')]||null:null,'attributes':_0x279e97[_0xda25('0x1c')]?_0x279e97['options'][_0xda25('0x1f')]||null:null,'limit':_0x279e97['options']?_0x279e97[_0xda25('0x1c')][_0xda25('0x20')]||null:null,'include':_0x279e97[_0xda25('0x1c')]?_0x279e97[_0xda25('0x1c')]['include']?_[_0xda25('0x21')](_0x279e97['options'][_0xda25('0x22')],function(_0x416845){return{'model':db[_0x416845['model']],'as':_0x416845['as'],'attributes':_0x416845['attributes'],'include':_0x416845['include']?_[_0xda25('0x21')](_0x416845[_0xda25('0x22')],function(_0x1bf3d1){return{'model':db[_0x1bf3d1[_0xda25('0x23')]],'as':_0x1bf3d1['as'],'attributes':_0x1bf3d1[_0xda25('0x1f')],'include':_0x1bf3d1['include']?_[_0xda25('0x21')](_0x1bf3d1[_0xda25('0x22')],function(_0x553f91){return{'model':db[_0x553f91[_0xda25('0x23')]],'as':_0x553f91['as'],'attributes':_0x553f91[_0xda25('0x1f')]};}):[]};}):[]};}):[]:[]})[_0xda25('0x10')](function(_0x44f320){logger[_0xda25('0x17')](_0xda25('0x24'),_0x279e97);logger['debug'](_0xda25('0x24'),_0x279e97,JSON[_0xda25('0x13')](_0x44f320));_0x1ba74c(_0x44f320);})[_0xda25('0x1a')](function(_0x52121b){logger['error'](_0xda25('0x24'),_0x52121b[_0xda25('0x16')],_0x279e97);_0x5a6d07(_0x5000e8['error'](0x1f4,_0x52121b[_0xda25('0x16')]));});});};exports['ShowVoiceQueue']=function(_0x4d8770){var _0x55259d=this;return new Promise(function(_0x234f8f,_0x47350f){return db[_0xda25('0x1b')][_0xda25('0x25')]({'raw':_0x4d8770[_0xda25('0x1c')]?_0x4d8770[_0xda25('0x1c')][_0xda25('0x1d')]===undefined?!![]:![]:!![],'where':_0x4d8770[_0xda25('0x1c')]?_0x4d8770[_0xda25('0x1c')][_0xda25('0x1e')]||null:null,'attributes':_0x4d8770[_0xda25('0x1c')]?_0x4d8770[_0xda25('0x1c')][_0xda25('0x1f')]||null:null,'include':_0x4d8770[_0xda25('0x1c')]?_0x4d8770['options']['include']?_[_0xda25('0x21')](_0x4d8770['options'][_0xda25('0x22')],function(_0x19ca06){return{'model':db[_0x19ca06['model']],'as':_0x19ca06['as'],'attributes':_0x19ca06[_0xda25('0x1f')],'include':_0x19ca06[_0xda25('0x22')]?_[_0xda25('0x21')](_0x19ca06[_0xda25('0x22')],function(_0x39c3ee){return{'model':db[_0x39c3ee[_0xda25('0x23')]],'as':_0x39c3ee['as'],'attributes':_0x39c3ee[_0xda25('0x1f')],'include':_0x39c3ee[_0xda25('0x22')]?_['map'](_0x39c3ee[_0xda25('0x22')],function(_0x26ec45){return{'model':db[_0x26ec45['model']],'as':_0x26ec45['as'],'attributes':_0x26ec45['attributes']};}):[]};}):[]};}):[]:[]})[_0xda25('0x10')](function(_0x36adbe){logger[_0xda25('0x17')](_0xda25('0x26'),_0x4d8770);logger['debug'](_0xda25('0x26'),_0x4d8770,JSON[_0xda25('0x13')](_0x36adbe));_0x234f8f(_0x36adbe);})[_0xda25('0x1a')](function(_0x334fa5){logger['error'](_0xda25('0x26'),_0x334fa5[_0xda25('0x16')],_0x4d8770);_0x47350f(_0x55259d[_0xda25('0x14')](0x1f4,_0x334fa5[_0xda25('0x16')]));});});}; \ No newline at end of file +var _0x7faf=['options','raw','where','include','map','model','attributes','then','ShowVoiceQueue','find','lodash','util','moment','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','http','redis','localhost','socket.io-emitter','./voiceQueue.socket','request','info','request\x20sent','debug','VoiceQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','VoiceQueue,\x20%s,\x20%s','message','result','catch','GetVoiceQueue','VoiceQueue','findAll'];(function(_0x12b71a,_0x5a0f68){var _0xfa09c6=function(_0x4c4434){while(--_0x4c4434){_0x12b71a['push'](_0x12b71a['shift']());}};_0xfa09c6(++_0x5a0f68);}(_0x7faf,0x1de));var _0xf7fa=function(_0x2c91e9,_0x2fb965){_0x2c91e9=_0x2c91e9-0x0;var _0x13f0ff=_0x7faf[_0x2c91e9];return _0x13f0ff;};'use strict';var _=require(_0xf7fa('0x0'));var util=require(_0xf7fa('0x1'));var moment=require(_0xf7fa('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xf7fa('0x3'));var db=require(_0xf7fa('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xf7fa('0x5'))(_0xf7fa('0x6'));var config=require(_0xf7fa('0x7'));var jayson=require(_0xf7fa('0x8'));var client=jayson['client'][_0xf7fa('0x9')]({'port':0x232a});config[_0xf7fa('0xa')]=_['defaults'](config[_0xf7fa('0xa')],{'host':_0xf7fa('0xb'),'port':0x18eb});var socket=require(_0xf7fa('0xc'))(new Redis(config[_0xf7fa('0xa')]));require(_0xf7fa('0xd'))['register'](socket);function respondWithRpcPromise(_0xecd790,_0x84c247,_0x45eb58){return new BPromise(function(_0x1f8ad4,_0x4e54ac){return client[_0xf7fa('0xe')](_0xecd790,_0x45eb58)['then'](function(_0x1ef2ba){logger[_0xf7fa('0xf')]('VoiceQueue,\x20%s,\x20%s',_0x84c247,_0xf7fa('0x10'));logger[_0xf7fa('0x11')](_0xf7fa('0x12'),_0x84c247,'request\x20sent',JSON[_0xf7fa('0x13')](_0x1ef2ba));if(_0x1ef2ba[_0xf7fa('0x14')]){if(_0x1ef2ba['error'][_0xf7fa('0x15')]===0x1f4){logger[_0xf7fa('0x14')](_0xf7fa('0x16'),_0x84c247,_0x1ef2ba[_0xf7fa('0x14')][_0xf7fa('0x17')]);return _0x4e54ac(_0x1ef2ba['error'][_0xf7fa('0x17')]);}logger[_0xf7fa('0x14')](_0xf7fa('0x16'),_0x84c247,_0x1ef2ba[_0xf7fa('0x14')][_0xf7fa('0x17')]);return _0x1f8ad4(_0x1ef2ba[_0xf7fa('0x14')][_0xf7fa('0x17')]);}else{logger[_0xf7fa('0xf')](_0xf7fa('0x16'),_0x84c247,'request\x20sent');_0x1f8ad4(_0x1ef2ba[_0xf7fa('0x18')][_0xf7fa('0x17')]);}})[_0xf7fa('0x19')](function(_0x56b1a0){logger[_0xf7fa('0x14')](_0xf7fa('0x16'),_0x84c247,_0x56b1a0);_0x4e54ac(_0x56b1a0);});});}exports[_0xf7fa('0x1a')]=function(_0x3d8b1d){var _0x30f584=this;return new Promise(function(_0x3de075,_0x3d8384){return db[_0xf7fa('0x1b')][_0xf7fa('0x1c')]({'raw':_0x3d8b1d[_0xf7fa('0x1d')]?_0x3d8b1d[_0xf7fa('0x1d')][_0xf7fa('0x1e')]===undefined?!![]:![]:!![],'where':_0x3d8b1d['options']?_0x3d8b1d[_0xf7fa('0x1d')][_0xf7fa('0x1f')]||null:null,'attributes':_0x3d8b1d[_0xf7fa('0x1d')]?_0x3d8b1d[_0xf7fa('0x1d')]['attributes']||null:null,'limit':_0x3d8b1d[_0xf7fa('0x1d')]?_0x3d8b1d['options']['limit']||null:null,'include':_0x3d8b1d['options']?_0x3d8b1d[_0xf7fa('0x1d')][_0xf7fa('0x20')]?_[_0xf7fa('0x21')](_0x3d8b1d[_0xf7fa('0x1d')]['include'],function(_0x1c720c){return{'model':db[_0x1c720c[_0xf7fa('0x22')]],'as':_0x1c720c['as'],'attributes':_0x1c720c['attributes'],'include':_0x1c720c[_0xf7fa('0x20')]?_[_0xf7fa('0x21')](_0x1c720c['include'],function(_0x5965ca){return{'model':db[_0x5965ca[_0xf7fa('0x22')]],'as':_0x5965ca['as'],'attributes':_0x5965ca[_0xf7fa('0x23')],'include':_0x5965ca[_0xf7fa('0x20')]?_[_0xf7fa('0x21')](_0x5965ca['include'],function(_0x5491ff){return{'model':db[_0x5491ff['model']],'as':_0x5491ff['as'],'attributes':_0x5491ff[_0xf7fa('0x23')]};}):[]};}):[]};}):[]:[]})[_0xf7fa('0x24')](function(_0x5cc731){logger[_0xf7fa('0xf')](_0xf7fa('0x1a'),_0x3d8b1d);logger[_0xf7fa('0x11')](_0xf7fa('0x1a'),_0x3d8b1d,JSON['stringify'](_0x5cc731));_0x3de075(_0x5cc731);})[_0xf7fa('0x19')](function(_0x12ff53){logger[_0xf7fa('0x14')]('GetVoiceQueue',_0x12ff53[_0xf7fa('0x17')],_0x3d8b1d);_0x3d8384(_0x30f584[_0xf7fa('0x14')](0x1f4,_0x12ff53[_0xf7fa('0x17')]));});});};exports[_0xf7fa('0x25')]=function(_0x1d8e06){var _0x355248=this;return new Promise(function(_0x8c5359,_0x3535ad){return db['VoiceQueue'][_0xf7fa('0x26')]({'raw':_0x1d8e06[_0xf7fa('0x1d')]?_0x1d8e06['options'][_0xf7fa('0x1e')]===undefined?!![]:![]:!![],'where':_0x1d8e06[_0xf7fa('0x1d')]?_0x1d8e06[_0xf7fa('0x1d')][_0xf7fa('0x1f')]||null:null,'attributes':_0x1d8e06[_0xf7fa('0x1d')]?_0x1d8e06[_0xf7fa('0x1d')][_0xf7fa('0x23')]||null:null,'include':_0x1d8e06['options']?_0x1d8e06[_0xf7fa('0x1d')][_0xf7fa('0x20')]?_[_0xf7fa('0x21')](_0x1d8e06[_0xf7fa('0x1d')]['include'],function(_0xb7da59){return{'model':db[_0xb7da59['model']],'as':_0xb7da59['as'],'attributes':_0xb7da59[_0xf7fa('0x23')],'include':_0xb7da59[_0xf7fa('0x20')]?_[_0xf7fa('0x21')](_0xb7da59[_0xf7fa('0x20')],function(_0x2f0c38){return{'model':db[_0x2f0c38[_0xf7fa('0x22')]],'as':_0x2f0c38['as'],'attributes':_0x2f0c38[_0xf7fa('0x23')],'include':_0x2f0c38[_0xf7fa('0x20')]?_[_0xf7fa('0x21')](_0x2f0c38['include'],function(_0x51761a){return{'model':db[_0x51761a[_0xf7fa('0x22')]],'as':_0x51761a['as'],'attributes':_0x51761a[_0xf7fa('0x23')]};}):[]};}):[]};}):[]:[]})[_0xf7fa('0x24')](function(_0x50cf71){logger[_0xf7fa('0xf')](_0xf7fa('0x25'),_0x1d8e06);logger['debug'](_0xf7fa('0x25'),_0x1d8e06,JSON[_0xf7fa('0x13')](_0x50cf71));_0x8c5359(_0x50cf71);})[_0xf7fa('0x19')](function(_0x24a595){logger[_0xf7fa('0x14')](_0xf7fa('0x25'),_0x24a595[_0xf7fa('0x17')],_0x1d8e06);_0x3535ad(_0x355248[_0xf7fa('0x14')](0x1f4,_0x24a595[_0xf7fa('0x17')]));});});}; \ No newline at end of file diff --git a/server/api/voiceQueue/voiceQueue.socket.js b/server/api/voiceQueue/voiceQueue.socket.js index d9240e6..d8751e0 100644 --- a/server/api/voiceQueue/voiceQueue.socket.js +++ b/server/api/voiceQueue/voiceQueue.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4c97=['update','emit','register','length','voiceQueue:','./voiceQueue.events','save','remove'];(function(_0x39caaa,_0x1f37bc){var _0x9b9c7d=function(_0x2da02c){while(--_0x2da02c){_0x39caaa['push'](_0x39caaa['shift']());}};_0x9b9c7d(++_0x1f37bc);}(_0x4c97,0x1ad));var _0x74c9=function(_0x1d1779,_0x284147){_0x1d1779=_0x1d1779-0x0;var _0x2377e9=_0x4c97[_0x1d1779];return _0x2377e9;};'use strict';var VoiceQueueEvents=require(_0x74c9('0x0'));var events=[_0x74c9('0x1'),_0x74c9('0x2'),_0x74c9('0x3')];function createListener(_0x58d163,_0x45eeb6){return function(_0x1658da){_0x45eeb6[_0x74c9('0x4')](_0x58d163,_0x1658da);};}function removeListener(_0x40c574,_0x23c389){return function(){VoiceQueueEvents['removeListener'](_0x40c574,_0x23c389);};}exports[_0x74c9('0x5')]=function(_0x25adcd){for(var _0x59389d=0x0,_0x4cd3f1=events[_0x74c9('0x6')];_0x59389d<_0x4cd3f1;_0x59389d++){var _0x10e5eb=events[_0x59389d];var _0x40bcaa=createListener(_0x74c9('0x7')+_0x10e5eb,_0x25adcd);VoiceQueueEvents['on'](_0x10e5eb,_0x40bcaa);}}; \ No newline at end of file +var _0x50a1=['remove','update','emit','length','voiceQueue:','save'];(function(_0xb59c5c,_0x5bcece){var _0x1de714=function(_0x388a85){while(--_0x388a85){_0xb59c5c['push'](_0xb59c5c['shift']());}};_0x1de714(++_0x5bcece);}(_0x50a1,0x16d));var _0x150a=function(_0x2272c3,_0x4e81bc){_0x2272c3=_0x2272c3-0x0;var _0x43645f=_0x50a1[_0x2272c3];return _0x43645f;};'use strict';var VoiceQueueEvents=require('./voiceQueue.events');var events=[_0x150a('0x0'),_0x150a('0x1'),_0x150a('0x2')];function createListener(_0x1c7743,_0x313c3f){return function(_0x2b3772){_0x313c3f[_0x150a('0x3')](_0x1c7743,_0x2b3772);};}function removeListener(_0x5cedd8,_0xb91bb6){return function(){VoiceQueueEvents['removeListener'](_0x5cedd8,_0xb91bb6);};}exports['register']=function(_0x39a9ea){for(var _0x41e5a6=0x0,_0x2c029b=events[_0x150a('0x4')];_0x41e5a6<_0x2c029b;_0x41e5a6++){var _0x555f2a=events[_0x41e5a6];var _0x364c43=createListener(_0x150a('0x5')+_0x555f2a,_0x39a9ea);VoiceQueueEvents['on'](_0x555f2a,_0x364c43);}}; \ No newline at end of file diff --git a/server/api/voiceQueueReport/index.js b/server/api/voiceQueueReport/index.js index a97d67b..5742311 100644 --- a/server/api/voiceQueueReport/index.js +++ b/server/api/voiceQueueReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x11a7=['express','Router','fs-extra','../../components/auth/service','./voiceQueueReport.controller','isAuthenticated','index','get','/describe','describe','/index','getVoiceQueuesReport','/:id','post','put','update','destroy','path'];(function(_0x4565bf,_0x5ad9d6){var _0x5610ba=function(_0x170988){while(--_0x170988){_0x4565bf['push'](_0x4565bf['shift']());}};_0x5610ba(++_0x5ad9d6);}(_0x11a7,0x6b));var _0x711a=function(_0x388eea,_0x340518){_0x388eea=_0x388eea-0x0;var _0x4a175b=_0x11a7[_0x388eea];return _0x4a175b;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x711a('0x0'));var timeout=require('connect-timeout');var express=require(_0x711a('0x1'));var router=express[_0x711a('0x2')]();var fs_extra=require(_0x711a('0x3'));var auth=require(_0x711a('0x4'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x711a('0x5'));router['get']('/',auth[_0x711a('0x6')](),controller[_0x711a('0x7')]);router[_0x711a('0x8')](_0x711a('0x9'),auth['isAuthenticated'](),controller[_0x711a('0xa')]);router['get'](_0x711a('0xb'),auth[_0x711a('0x6')](),controller[_0x711a('0xc')]);router['get'](_0x711a('0xd'),auth[_0x711a('0x6')](),controller['show']);router[_0x711a('0xe')]('/',auth[_0x711a('0x6')](),controller['create']);router[_0x711a('0xf')](_0x711a('0xd'),auth[_0x711a('0x6')](),controller[_0x711a('0x10')]);router['delete']('/:id',auth[_0x711a('0x6')](),controller[_0x711a('0x11')]);module['exports']=router; \ No newline at end of file +var _0x4855=['/index','getVoiceQueuesReport','/:id','show','put','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceQueueReport.controller','get','isAuthenticated','/describe'];(function(_0x5c7222,_0x3b33d0){var _0x1b4b53=function(_0x5768e4){while(--_0x5768e4){_0x5c7222['push'](_0x5c7222['shift']());}};_0x1b4b53(++_0x3b33d0);}(_0x4855,0x8d));var _0x5485=function(_0x456200,_0x3d4c03){_0x456200=_0x456200-0x0;var _0x551f2e=_0x4855[_0x456200];return _0x551f2e;};'use strict';var multer=require(_0x5485('0x0'));var util=require(_0x5485('0x1'));var path=require(_0x5485('0x2'));var timeout=require(_0x5485('0x3'));var express=require(_0x5485('0x4'));var router=express[_0x5485('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0x5485('0x6'));var interaction=require(_0x5485('0x7'));var config=require(_0x5485('0x8'));var controller=require(_0x5485('0x9'));router[_0x5485('0xa')]('/',auth[_0x5485('0xb')](),controller['index']);router[_0x5485('0xa')](_0x5485('0xc'),auth[_0x5485('0xb')](),controller['describe']);router[_0x5485('0xa')](_0x5485('0xd'),auth[_0x5485('0xb')](),controller[_0x5485('0xe')]);router[_0x5485('0xa')](_0x5485('0xf'),auth[_0x5485('0xb')](),controller[_0x5485('0x10')]);router['post']('/',auth[_0x5485('0xb')](),controller['create']);router[_0x5485('0x11')](_0x5485('0xf'),auth['isAuthenticated'](),controller[_0x5485('0x12')]);router[_0x5485('0x13')](_0x5485('0xf'),auth[_0x5485('0xb')](),controller[_0x5485('0x14')]);module[_0x5485('0x15')]=router; \ No newline at end of file diff --git a/server/api/voiceQueueReport/voiceQueueReport.attributes.js b/server/api/voiceQueueReport/voiceQueueReport.attributes.js index 70fb226..6ab2aae 100644 --- a/server/api/voiceQueueReport/voiceQueueReport.attributes.js +++ b/server/api/voiceQueueReport/voiceQueueReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4e31=['DATE','FORWARD,\x20BLIND,\x20ATTENDED','moment','STRING','getDataValue','queuecallerjoinAt','format','diff','seconds','setDataValue','holdtime','INTEGER','BOOLEAN'];(function(_0x2e5cd8,_0x3ab6b0){var _0x3883d6=function(_0x1f5263){while(--_0x1f5263){_0x2e5cd8['push'](_0x2e5cd8['shift']());}};_0x3883d6(++_0x3ab6b0);}(_0x4e31,0x84));var _0x14e3=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x4e31[_0x20a584];return _0x4b41a8;};'use strict';var Sequelize=require('sequelize');var moment=require(_0x14e3('0x0'));module['exports']={'type':{'type':Sequelize['STRING']},'uniqueid':{'type':Sequelize[_0x14e3('0x1')]},'calleridnum':{'type':Sequelize[_0x14e3('0x1')]},'calleridname':{'type':Sequelize[_0x14e3('0x1')]},'queue':{'type':Sequelize[_0x14e3('0x1')]},'queuecallerjoinAt':{'type':Sequelize['DATE']},'queuecallerleaveAt':{'type':Sequelize['DATE'],'set':function(_0x3d1144){var _0x10b23e=moment(_0x3d1144);var _0x203c2b=moment(this[_0x14e3('0x2')](_0x14e3('0x3')))[_0x14e3('0x4')]('YYYY-MM-DD\x20HH:mm:ss');var _0x3d9976=_0x10b23e[_0x14e3('0x5')](_0x203c2b,_0x14e3('0x6'));this[_0x14e3('0x7')]('queuecallerleaveAt',_0x3d1144);this[_0x14e3('0x7')](_0x14e3('0x8'),_0x3d9976||null);}},'position':{'type':Sequelize[_0x14e3('0x9')]},'count':{'type':Sequelize['INTEGER']},'queuecallerabandon':{'type':Sequelize[_0x14e3('0xa')],'defaultValue':![]},'queuecallerabandonAt':{'type':Sequelize[_0x14e3('0xb')]},'queuecallercomplete':{'type':Sequelize[_0x14e3('0xa')],'defaultValue':![]},'queuecallercompleteAt':{'type':Sequelize['DATE']},'queuecallerexit':{'type':Sequelize[_0x14e3('0xa')],'defaultValue':![]},'queuecallerexitAt':{'type':Sequelize[_0x14e3('0xb')]},'queuecallerexitreason':{'type':Sequelize['STRING'],'comment':'COMPLETEDBYCALLER,\x20COMPLETEDBYAGENT,\x20FORWARDTRANFER,\x20BLINDTRANSFER,\x20ATTENDEDTRANSFER,\x20EXITWITHKEY,\x20TIMEOUT'},'originalposition':{'type':Sequelize[_0x14e3('0x9')]},'channel':{'type':Sequelize[_0x14e3('0x1')]},'connectedlinenum':{'type':Sequelize['STRING']},'connectedlinename':{'type':Sequelize['STRING']},'accountcode':{'type':Sequelize['STRING']},'context':{'type':Sequelize[_0x14e3('0x1')]},'exten':{'type':Sequelize[_0x14e3('0x1')]},'priority':{'type':Sequelize[_0x14e3('0x1')]},'holdtime':{'type':Sequelize[_0x14e3('0x9')]},'mohtime':{'type':Sequelize[_0x14e3('0x9')],'defaultValue':0x0},'assigned':{'type':Sequelize[_0x14e3('0xa')],'defaultValue':![]},'lastAssignedTo':{'type':Sequelize[_0x14e3('0x1')]},'transfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'transfertype':{'type':Sequelize['STRING'],'comment':_0x14e3('0xc')},'transferexten':{'type':Sequelize[_0x14e3('0x1')]},'transferuniqueid':{'type':Sequelize['STRING']},'disposition':{'type':Sequelize[_0x14e3('0x1')]},'secondDisposition':{'type':Sequelize[_0x14e3('0x1')]},'thirdDisposition':{'type':Sequelize['STRING']},'queuecallerenterreason':{'type':Sequelize[_0x14e3('0x9')],'defaultValue':0x0}}; \ No newline at end of file +var _0x2dda=['getDataValue','queuecallerjoinAt','format','diff','setDataValue','queuecallerleaveAt','holdtime','INTEGER','BOOLEAN','COMPLETEDBYCALLER,\x20COMPLETEDBYAGENT,\x20FORWARDTRANFER,\x20BLINDTRANSFER,\x20ATTENDEDTRANSFER,\x20EXITWITHKEY,\x20TIMEOUT','sequelize','moment','STRING','DATE'];(function(_0x109dbd,_0x290d2b){var _0x395644=function(_0x5a8c2d){while(--_0x5a8c2d){_0x109dbd['push'](_0x109dbd['shift']());}};_0x395644(++_0x290d2b);}(_0x2dda,0x1d8));var _0xa2dd=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x2dda[_0x14add3];return _0x4a174f;};'use strict';var Sequelize=require(_0xa2dd('0x0'));var moment=require(_0xa2dd('0x1'));module['exports']={'type':{'type':Sequelize[_0xa2dd('0x2')]},'uniqueid':{'type':Sequelize[_0xa2dd('0x2')]},'calleridnum':{'type':Sequelize['STRING']},'calleridname':{'type':Sequelize[_0xa2dd('0x2')]},'queue':{'type':Sequelize[_0xa2dd('0x2')]},'queuecallerjoinAt':{'type':Sequelize[_0xa2dd('0x3')]},'queuecallerleaveAt':{'type':Sequelize[_0xa2dd('0x3')],'set':function(_0x43a43e){var _0x39f747=moment(_0x43a43e);var _0x5e6575=moment(this[_0xa2dd('0x4')](_0xa2dd('0x5')))[_0xa2dd('0x6')]('YYYY-MM-DD\x20HH:mm:ss');var _0x3bdb70=_0x39f747[_0xa2dd('0x7')](_0x5e6575,'seconds');this[_0xa2dd('0x8')](_0xa2dd('0x9'),_0x43a43e);this[_0xa2dd('0x8')](_0xa2dd('0xa'),_0x3bdb70||null);}},'position':{'type':Sequelize[_0xa2dd('0xb')]},'count':{'type':Sequelize[_0xa2dd('0xb')]},'queuecallerabandon':{'type':Sequelize[_0xa2dd('0xc')],'defaultValue':![]},'queuecallerabandonAt':{'type':Sequelize['DATE']},'queuecallercomplete':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'queuecallercompleteAt':{'type':Sequelize[_0xa2dd('0x3')]},'queuecallerexit':{'type':Sequelize[_0xa2dd('0xc')],'defaultValue':![]},'queuecallerexitAt':{'type':Sequelize[_0xa2dd('0x3')]},'queuecallerexitreason':{'type':Sequelize[_0xa2dd('0x2')],'comment':_0xa2dd('0xd')},'originalposition':{'type':Sequelize[_0xa2dd('0xb')]},'channel':{'type':Sequelize['STRING']},'connectedlinenum':{'type':Sequelize['STRING']},'connectedlinename':{'type':Sequelize[_0xa2dd('0x2')]},'accountcode':{'type':Sequelize[_0xa2dd('0x2')]},'context':{'type':Sequelize[_0xa2dd('0x2')]},'exten':{'type':Sequelize[_0xa2dd('0x2')]},'priority':{'type':Sequelize[_0xa2dd('0x2')]},'holdtime':{'type':Sequelize['INTEGER']},'mohtime':{'type':Sequelize[_0xa2dd('0xb')],'defaultValue':0x0},'assigned':{'type':Sequelize[_0xa2dd('0xc')],'defaultValue':![]},'lastAssignedTo':{'type':Sequelize[_0xa2dd('0x2')]},'transfer':{'type':Sequelize[_0xa2dd('0xc')],'defaultValue':![]},'transfertype':{'type':Sequelize['STRING'],'comment':'FORWARD,\x20BLIND,\x20ATTENDED'},'transferexten':{'type':Sequelize[_0xa2dd('0x2')]},'transferuniqueid':{'type':Sequelize[_0xa2dd('0x2')]},'disposition':{'type':Sequelize['STRING']},'secondDisposition':{'type':Sequelize[_0xa2dd('0x2')]},'thirdDisposition':{'type':Sequelize[_0xa2dd('0x2')]},'queuecallerenterreason':{'type':Sequelize[_0xa2dd('0xb')],'defaultValue':0x0}}; \ No newline at end of file diff --git a/server/api/voiceQueueReport/voiceQueueReport.controller.js b/server/api/voiceQueueReport/voiceQueueReport.controller.js index 45907ed..87a82c6 100644 --- a/server/api/voiceQueueReport/voiceQueueReport.controller.js +++ b/server/api/voiceQueueReport/voiceQueueReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8fd2=['localhost','register','sendStatus','end','json','undefined','offset','limit','status','set','apply','reject','save','then','error','name','send','index','map','rawAttributes','key','model','query','keys','filters','attributes','fields','length','hasOwnProperty','nolimit','sort','where','pick','filter','merge','VIRTUAL','VoiceQueueReport','count','includeAll','include','findAll','rows','catch','show','intersection','options','find','create','body','params','destroy','describe','getVoiceQueuesReport','order','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb'];(function(_0x2ea175,_0x2bbf62){var _0xd34895=function(_0x146518){while(--_0x146518){_0x2ea175['push'](_0x2ea175['shift']());}};_0xd34895(++_0x2bbf62);}(_0x8fd2,0x1cb));var _0x28fd=function(_0x4f9a37,_0x215eb6){_0x4f9a37=_0x4f9a37-0x0;var _0x1685bd=_0x8fd2[_0x4f9a37];return _0x1685bd;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x28fd('0x0'));var zipdir=require(_0x28fd('0x1'));var jsonpatch=require(_0x28fd('0x2'));var rp=require(_0x28fd('0x3'));var moment=require(_0x28fd('0x4'));var BPromise=require(_0x28fd('0x5'));var Mustache=require(_0x28fd('0x6'));var util=require('util');var path=require(_0x28fd('0x7'));var sox=require(_0x28fd('0x8'));var csv=require(_0x28fd('0x9'));var ejs=require(_0x28fd('0xa'));var fs=require('fs');var fs_extra=require(_0x28fd('0xb'));var _=require(_0x28fd('0xc'));var squel=require(_0x28fd('0xd'));var crypto=require(_0x28fd('0xe'));var jsforce=require(_0x28fd('0xf'));var deskjs=require('desk.js');var toCsv=require(_0x28fd('0x9'));var querystring=require(_0x28fd('0x10'));var Papa=require(_0x28fd('0x11'));var Redis=require('ioredis');var authService=require(_0x28fd('0x12'));var qs=require(_0x28fd('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x28fd('0x14'));var logger=require(_0x28fd('0x15'))(_0x28fd('0x16'));var utils=require(_0x28fd('0x17'));var config=require(_0x28fd('0x18'));var licenseUtil=require(_0x28fd('0x19'));var db=require(_0x28fd('0x1a'))['db'];config['redis']=_['defaults'](config['redis'],{'host':_0x28fd('0x1b'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require('./voiceQueueReport.socket')[_0x28fd('0x1c')](socket);function respondWithStatusCode(_0x1d3285,_0x137d16){_0x137d16=_0x137d16||0xcc;return function(_0x5ce40c){if(_0x5ce40c){return _0x1d3285[_0x28fd('0x1d')](_0x137d16);}return _0x1d3285['status'](_0x137d16)[_0x28fd('0x1e')]();};}function respondWithResult(_0x347e29,_0x13190e){_0x13190e=_0x13190e||0xc8;return function(_0x215a2f){if(_0x215a2f){return _0x347e29['status'](_0x13190e)[_0x28fd('0x1f')](_0x215a2f);}};}function respondWithFilteredResult(_0x5a3b1e,_0x48f44a){return function(_0x3c1742){if(_0x3c1742){var _0x52bb86=typeof _0x48f44a['offset']===_0x28fd('0x20')&&typeof _0x48f44a['limit']===_0x28fd('0x20');var _0x1bb969=_0x3c1742['count'];var _0x2031b8=_0x52bb86?0x0:_0x48f44a['offset'];var _0x530aab=_0x52bb86?_0x3c1742['count']:_0x48f44a[_0x28fd('0x21')]+_0x48f44a[_0x28fd('0x22')];var _0x4695db;if(_0x530aab>=_0x1bb969){_0x530aab=_0x1bb969;_0x4695db=0xc8;}else{_0x4695db=0xce;}_0x5a3b1e[_0x28fd('0x23')](_0x4695db);return _0x5a3b1e[_0x28fd('0x24')]('Content-Range',_0x2031b8+'-'+_0x530aab+'/'+_0x1bb969)[_0x28fd('0x1f')](_0x3c1742);}return null;};}function patchUpdates(_0x1b9571){return function(_0x3e542f){try{jsonpatch[_0x28fd('0x25')](_0x3e542f,_0x1b9571,!![]);}catch(_0x3a9f0d){return BPromise[_0x28fd('0x26')](_0x3a9f0d);}return _0x3e542f[_0x28fd('0x27')]();};}function saveUpdates(_0x239de9,_0x32fe44){return function(_0x4c982a){if(_0x4c982a){return _0x4c982a['update'](_0x239de9)[_0x28fd('0x28')](function(_0x2c5b2a){return _0x2c5b2a;});}return null;};}function removeEntity(_0x3474fb,_0x4ea4a1){return function(_0x2350ca){if(_0x2350ca){return _0x2350ca['destroy']()[_0x28fd('0x28')](function(){_0x3474fb['status'](0xcc)[_0x28fd('0x1e')]();});}};}function handleEntityNotFound(_0x6b0b7b,_0x43021d){return function(_0xe93bab){if(!_0xe93bab){_0x6b0b7b[_0x28fd('0x1d')](0x194);}return _0xe93bab;};}function handleError(_0x46e9a5,_0x1c5633){_0x1c5633=_0x1c5633||0x1f4;return function(_0x26a0d4){logger[_0x28fd('0x29')](_0x26a0d4['stack']);if(_0x26a0d4[_0x28fd('0x2a')]){delete _0x26a0d4[_0x28fd('0x2a')];}_0x46e9a5[_0x28fd('0x23')](_0x1c5633)[_0x28fd('0x2b')](_0x26a0d4);};}exports[_0x28fd('0x2c')]=function(_0x429301,_0x32a480){var _0x508e2d={},_0x2c6473={},_0x290502={'count':0x0,'rows':[]};var _0x363c71=_[_0x28fd('0x2d')](db['VoiceQueueReport'][_0x28fd('0x2e')],function(_0x5e32b2){return{'name':_0x5e32b2['fieldName'],'type':_0x5e32b2['type'][_0x28fd('0x2f')]};});_0x2c6473[_0x28fd('0x30')]=_[_0x28fd('0x2d')](_0x363c71,_0x28fd('0x2a'));_0x2c6473[_0x28fd('0x31')]=_[_0x28fd('0x32')](_0x429301[_0x28fd('0x31')]);_0x2c6473[_0x28fd('0x33')]=_['intersection'](_0x2c6473[_0x28fd('0x30')],_0x2c6473[_0x28fd('0x31')]);_0x508e2d[_0x28fd('0x34')]=_['intersection'](_0x2c6473[_0x28fd('0x30')],qs[_0x28fd('0x35')](_0x429301['query'][_0x28fd('0x35')]));_0x508e2d['attributes']=_0x508e2d[_0x28fd('0x34')][_0x28fd('0x36')]?_0x508e2d[_0x28fd('0x34')]:_0x2c6473[_0x28fd('0x30')];if(!_0x429301[_0x28fd('0x31')][_0x28fd('0x37')](_0x28fd('0x38'))){_0x508e2d[_0x28fd('0x22')]=qs[_0x28fd('0x22')](_0x429301[_0x28fd('0x31')][_0x28fd('0x22')]);_0x508e2d['offset']=qs[_0x28fd('0x21')](_0x429301[_0x28fd('0x31')][_0x28fd('0x21')]);}_0x508e2d['order']=qs[_0x28fd('0x39')](_0x429301['query'][_0x28fd('0x39')]);_0x508e2d[_0x28fd('0x3a')]=qs[_0x28fd('0x33')](_[_0x28fd('0x3b')](_0x429301[_0x28fd('0x31')],_0x2c6473['filters']),_0x363c71);if(_0x429301[_0x28fd('0x31')][_0x28fd('0x3c')]){_0x508e2d['where']=_[_0x28fd('0x3d')](_0x508e2d[_0x28fd('0x3a')],{'$or':_[_0x28fd('0x2d')](_0x363c71,function(_0x2baaef){if(_0x2baaef['type']!==_0x28fd('0x3e')){var _0x2aa7ec={};_0x2aa7ec[_0x2baaef[_0x28fd('0x2a')]]={'$like':'%'+_0x429301[_0x28fd('0x31')][_0x28fd('0x3c')]+'%'};return _0x2aa7ec;}})});}_0x508e2d=_[_0x28fd('0x3d')]({},_0x508e2d,_0x429301['options']);var _0x9d6769={'where':_0x508e2d[_0x28fd('0x3a')]};return db[_0x28fd('0x3f')][_0x28fd('0x40')](_0x9d6769)['then'](function(_0x5a9f14){_0x290502['count']=_0x5a9f14;if(_0x429301[_0x28fd('0x31')][_0x28fd('0x41')]){_0x508e2d[_0x28fd('0x42')]=[{'all':!![]}];}return db[_0x28fd('0x3f')][_0x28fd('0x43')](_0x508e2d);})[_0x28fd('0x28')](function(_0x2ac467){_0x290502[_0x28fd('0x44')]=_0x2ac467;return _0x290502;})['then'](respondWithFilteredResult(_0x32a480,_0x508e2d))[_0x28fd('0x45')](handleError(_0x32a480,null));};exports[_0x28fd('0x46')]=function(_0x2c00d9,_0x5660b4){var _0x323fec={'raw':![],'where':{'id':_0x2c00d9['params']['id']}},_0x20207d={};_0x20207d[_0x28fd('0x30')]=_[_0x28fd('0x32')](db[_0x28fd('0x3f')][_0x28fd('0x2e')]);_0x20207d[_0x28fd('0x31')]=_['keys'](_0x2c00d9[_0x28fd('0x31')]);_0x20207d[_0x28fd('0x33')]=_['intersection'](_0x20207d[_0x28fd('0x30')],_0x20207d['query']);_0x323fec['attributes']=_[_0x28fd('0x47')](_0x20207d[_0x28fd('0x30')],qs[_0x28fd('0x35')](_0x2c00d9[_0x28fd('0x31')][_0x28fd('0x35')]));_0x323fec[_0x28fd('0x34')]=_0x323fec[_0x28fd('0x34')]['length']?_0x323fec[_0x28fd('0x34')]:_0x20207d[_0x28fd('0x30')];if(_0x2c00d9[_0x28fd('0x31')][_0x28fd('0x41')]){_0x323fec[_0x28fd('0x42')]=[{'all':!![]}];}_0x323fec=_[_0x28fd('0x3d')]({},_0x323fec,_0x2c00d9[_0x28fd('0x48')]);return db['VoiceQueueReport'][_0x28fd('0x49')](_0x323fec)[_0x28fd('0x28')](handleEntityNotFound(_0x5660b4,null))['then'](respondWithResult(_0x5660b4,null))[_0x28fd('0x45')](handleError(_0x5660b4,null));};exports[_0x28fd('0x4a')]=function(_0x3f4789,_0x2aedc0){return db[_0x28fd('0x3f')][_0x28fd('0x4a')](_0x3f4789[_0x28fd('0x4b')],{})[_0x28fd('0x28')](respondWithResult(_0x2aedc0,0xc9))[_0x28fd('0x45')](handleError(_0x2aedc0,null));};exports['update']=function(_0x3bb7c8,_0x4450ae){if(_0x3bb7c8['body']['id']){delete _0x3bb7c8[_0x28fd('0x4b')]['id'];}return db[_0x28fd('0x3f')]['find']({'where':{'id':_0x3bb7c8[_0x28fd('0x4c')]['id']}})[_0x28fd('0x28')](handleEntityNotFound(_0x4450ae,null))[_0x28fd('0x28')](saveUpdates(_0x3bb7c8['body'],null))[_0x28fd('0x28')](respondWithResult(_0x4450ae,null))[_0x28fd('0x45')](handleError(_0x4450ae,null));};exports[_0x28fd('0x4d')]=function(_0x265924,_0x1475cd){return db['VoiceQueueReport'][_0x28fd('0x49')]({'where':{'id':_0x265924[_0x28fd('0x4c')]['id']}})[_0x28fd('0x28')](handleEntityNotFound(_0x1475cd,null))[_0x28fd('0x28')](removeEntity(_0x1475cd,null))[_0x28fd('0x45')](handleError(_0x1475cd,null));};exports['describe']=function(_0x4d4612,_0x1923cb){return db[_0x28fd('0x3f')][_0x28fd('0x4e')]()[_0x28fd('0x28')](respondWithResult(_0x1923cb,null))['catch'](handleError(_0x1923cb,null));};exports[_0x28fd('0x4f')]=function(_0x3bd0ba,_0x5a9a95){var _0x241985={},_0x249d03={},_0x2cf1dc={'count':0x0,'rows':[]};_0x249d03[_0x28fd('0x30')]=_['keys'](db['VoiceQueueReport'][_0x28fd('0x2e')]);_0x249d03[_0x28fd('0x31')]=_[_0x28fd('0x32')](_0x3bd0ba['query']);_0x249d03[_0x28fd('0x33')]=_[_0x28fd('0x47')](_0x249d03[_0x28fd('0x30')],_0x249d03['query']);_0x241985[_0x28fd('0x34')]=_[_0x28fd('0x47')](_0x249d03[_0x28fd('0x30')],qs[_0x28fd('0x35')](_0x3bd0ba[_0x28fd('0x31')][_0x28fd('0x35')]));_0x241985[_0x28fd('0x34')]=_0x241985[_0x28fd('0x34')][_0x28fd('0x36')]?_0x241985[_0x28fd('0x34')]:_0x249d03[_0x28fd('0x30')];if(!_0x3bd0ba[_0x28fd('0x31')][_0x28fd('0x37')](_0x28fd('0x38'))){_0x241985[_0x28fd('0x22')]=qs[_0x28fd('0x22')](_0x3bd0ba[_0x28fd('0x31')]['limit']);_0x241985['offset']=qs[_0x28fd('0x21')](_0x3bd0ba['query']['offset']);}_0x241985[_0x28fd('0x50')]=qs['sort'](_0x3bd0ba[_0x28fd('0x31')]['sort']);_0x241985[_0x28fd('0x3a')]=qs[_0x28fd('0x33')](_[_0x28fd('0x3b')](_0x3bd0ba[_0x28fd('0x31')],_0x249d03[_0x28fd('0x33')]));if(_0x3bd0ba[_0x28fd('0x31')][_0x28fd('0x3c')]){_0x241985['where']=_['merge'](_0x241985[_0x28fd('0x3a')],{'$or':_[_0x28fd('0x2d')](_0x241985[_0x28fd('0x34')],function(_0x50d8ad){var _0x3a2b67={};_0x3a2b67[_0x50d8ad]={'$like':'%'+_0x3bd0ba[_0x28fd('0x31')][_0x28fd('0x3c')]+'%'};return _0x3a2b67;})});}_0x241985=_[_0x28fd('0x3d')]({},_0x241985,_0x3bd0ba[_0x28fd('0x48')]);var _0x4b4db4={'where':_0x241985[_0x28fd('0x3a')]};return db['VoiceQueueReport'][_0x28fd('0x40')](_0x4b4db4)[_0x28fd('0x28')](function(_0x2421a3){_0x2cf1dc['count']=_0x2421a3;if(_0x3bd0ba[_0x28fd('0x31')]['includeAll']){_0x241985[_0x28fd('0x42')]=[{'all':!![]}];}return db[_0x28fd('0x3f')]['findAll'](_0x241985);})[_0x28fd('0x28')](function(_0x3f922c){_0x2cf1dc[_0x28fd('0x44')]=_0x3f922c;return _0x2cf1dc;})[_0x28fd('0x28')](respondWithFilteredResult(_0x5a9a95,_0x241985,'getVoiceQueuesReport'))[_0x28fd('0x45')](handleError(_0x5a9a95,null,_0x28fd('0x4f')));}; \ No newline at end of file +var _0x1237=['api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','register','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','update','then','destroy','stack','index','map','VoiceQueueReport','rawAttributes','fieldName','type','model','name','query','keys','filters','intersection','fields','attributes','hasOwnProperty','nolimit','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','findAll','rows','show','params','length','include','find','catch','create','body','describe','getVoiceQueuesReport','order','eml-format','rimraf','zip-dir','path','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','querystring','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware'];(function(_0x47a7d0,_0x4e182d){var _0xb9bd08=function(_0x588ee2){while(--_0x588ee2){_0x47a7d0['push'](_0x47a7d0['shift']());}};_0xb9bd08(++_0x4e182d);}(_0x1237,0xdd));var _0x7123=function(_0x629342,_0x412287){_0x629342=_0x629342-0x0;var _0x484a57=_0x1237[_0x629342];return _0x484a57;};'use strict';var emlformat=require(_0x7123('0x0'));var rimraf=require(_0x7123('0x1'));var zipdir=require(_0x7123('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require('moment');var BPromise=require('bluebird');var Mustache=require('mustache');var util=require('util');var path=require(_0x7123('0x3'));var sox=require(_0x7123('0x4'));var csv=require(_0x7123('0x5'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x7123('0x6'));var _=require(_0x7123('0x7'));var squel=require(_0x7123('0x8'));var crypto=require(_0x7123('0x9'));var jsforce=require(_0x7123('0xa'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x7123('0xb'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x7123('0xc'));var qs=require(_0x7123('0xd'));var as=require(_0x7123('0xe'));var hardwareService=require(_0x7123('0xf'));var logger=require('../../config/logger')(_0x7123('0x10'));var utils=require(_0x7123('0x11'));var config=require(_0x7123('0x12'));var licenseUtil=require(_0x7123('0x13'));var db=require(_0x7123('0x14'))['db'];config[_0x7123('0x15')]=_[_0x7123('0x16')](config[_0x7123('0x15')],{'host':_0x7123('0x17'),'port':0x18eb});var socket=require(_0x7123('0x18'))(new Redis(config[_0x7123('0x15')]));require('./voiceQueueReport.socket')[_0x7123('0x19')](socket);function respondWithStatusCode(_0x46a767,_0x1dfade){_0x1dfade=_0x1dfade||0xcc;return function(_0x387b30){if(_0x387b30){return _0x46a767[_0x7123('0x1a')](_0x1dfade);}return _0x46a767[_0x7123('0x1b')](_0x1dfade)[_0x7123('0x1c')]();};}function respondWithResult(_0x4688dd,_0x22c13b){_0x22c13b=_0x22c13b||0xc8;return function(_0x4a8248){if(_0x4a8248){return _0x4688dd[_0x7123('0x1b')](_0x22c13b)[_0x7123('0x1d')](_0x4a8248);}};}function respondWithFilteredResult(_0x42b0d0,_0x53da03){return function(_0x5d5fc1){if(_0x5d5fc1){var _0x388b52=typeof _0x53da03[_0x7123('0x1e')]===_0x7123('0x1f')&&typeof _0x53da03[_0x7123('0x20')]===_0x7123('0x1f');var _0x57fa15=_0x5d5fc1[_0x7123('0x21')];var _0x5404e3=_0x388b52?0x0:_0x53da03[_0x7123('0x1e')];var _0x5baff0=_0x388b52?_0x5d5fc1['count']:_0x53da03[_0x7123('0x1e')]+_0x53da03[_0x7123('0x20')];var _0x40fc6b;if(_0x5baff0>=_0x57fa15){_0x5baff0=_0x57fa15;_0x40fc6b=0xc8;}else{_0x40fc6b=0xce;}_0x42b0d0[_0x7123('0x1b')](_0x40fc6b);return _0x42b0d0[_0x7123('0x22')](_0x7123('0x23'),_0x5404e3+'-'+_0x5baff0+'/'+_0x57fa15)[_0x7123('0x1d')](_0x5d5fc1);}return null;};}function patchUpdates(_0x24a6ef){return function(_0x15b7b4){try{jsonpatch[_0x7123('0x24')](_0x15b7b4,_0x24a6ef,!![]);}catch(_0x148f61){return BPromise[_0x7123('0x25')](_0x148f61);}return _0x15b7b4['save']();};}function saveUpdates(_0x37ddd0,_0x5e84e4){return function(_0x1937c3){if(_0x1937c3){return _0x1937c3[_0x7123('0x26')](_0x37ddd0)[_0x7123('0x27')](function(_0x164e97){return _0x164e97;});}return null;};}function removeEntity(_0x1c7e58,_0x156ff6){return function(_0x36780d){if(_0x36780d){return _0x36780d[_0x7123('0x28')]()[_0x7123('0x27')](function(){_0x1c7e58[_0x7123('0x1b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x1644b5,_0x38c19f){return function(_0x116004){if(!_0x116004){_0x1644b5[_0x7123('0x1a')](0x194);}return _0x116004;};}function handleError(_0x4588bc,_0x41fe4e){_0x41fe4e=_0x41fe4e||0x1f4;return function(_0x14ecd6){logger['error'](_0x14ecd6[_0x7123('0x29')]);if(_0x14ecd6['name']){delete _0x14ecd6['name'];}_0x4588bc[_0x7123('0x1b')](_0x41fe4e)['send'](_0x14ecd6);};}exports[_0x7123('0x2a')]=function(_0x55c4f1,_0x112ea4){var _0x223101={},_0x5538f5={},_0x1d87ce={'count':0x0,'rows':[]};var _0x5180d5=_[_0x7123('0x2b')](db[_0x7123('0x2c')][_0x7123('0x2d')],function(_0x3b2fef){return{'name':_0x3b2fef[_0x7123('0x2e')],'type':_0x3b2fef[_0x7123('0x2f')]['key']};});_0x5538f5[_0x7123('0x30')]=_['map'](_0x5180d5,_0x7123('0x31'));_0x5538f5[_0x7123('0x32')]=_[_0x7123('0x33')](_0x55c4f1[_0x7123('0x32')]);_0x5538f5[_0x7123('0x34')]=_[_0x7123('0x35')](_0x5538f5[_0x7123('0x30')],_0x5538f5[_0x7123('0x32')]);_0x223101['attributes']=_[_0x7123('0x35')](_0x5538f5['model'],qs['fields'](_0x55c4f1[_0x7123('0x32')][_0x7123('0x36')]));_0x223101['attributes']=_0x223101[_0x7123('0x37')]['length']?_0x223101[_0x7123('0x37')]:_0x5538f5[_0x7123('0x30')];if(!_0x55c4f1[_0x7123('0x32')][_0x7123('0x38')](_0x7123('0x39'))){_0x223101[_0x7123('0x20')]=qs[_0x7123('0x20')](_0x55c4f1[_0x7123('0x32')][_0x7123('0x20')]);_0x223101[_0x7123('0x1e')]=qs[_0x7123('0x1e')](_0x55c4f1['query']['offset']);}_0x223101['order']=qs[_0x7123('0x3a')](_0x55c4f1[_0x7123('0x32')]['sort']);_0x223101[_0x7123('0x3b')]=qs[_0x7123('0x34')](_[_0x7123('0x3c')](_0x55c4f1['query'],_0x5538f5[_0x7123('0x34')]),_0x5180d5);if(_0x55c4f1[_0x7123('0x32')][_0x7123('0x3d')]){_0x223101[_0x7123('0x3b')]=_[_0x7123('0x3e')](_0x223101[_0x7123('0x3b')],{'$or':_['map'](_0x5180d5,function(_0x2510ed){if(_0x2510ed[_0x7123('0x2f')]!==_0x7123('0x3f')){var _0x259a92={};_0x259a92[_0x2510ed[_0x7123('0x31')]]={'$like':'%'+_0x55c4f1[_0x7123('0x32')][_0x7123('0x3d')]+'%'};return _0x259a92;}})});}_0x223101=_[_0x7123('0x3e')]({},_0x223101,_0x55c4f1[_0x7123('0x40')]);var _0x4a168b={'where':_0x223101[_0x7123('0x3b')]};return db[_0x7123('0x2c')]['count'](_0x4a168b)[_0x7123('0x27')](function(_0x27d4eb){_0x1d87ce[_0x7123('0x21')]=_0x27d4eb;if(_0x55c4f1['query'][_0x7123('0x41')]){_0x223101['include']=[{'all':!![]}];}return db['VoiceQueueReport'][_0x7123('0x42')](_0x223101);})[_0x7123('0x27')](function(_0x38291a){_0x1d87ce[_0x7123('0x43')]=_0x38291a;return _0x1d87ce;})['then'](respondWithFilteredResult(_0x112ea4,_0x223101))['catch'](handleError(_0x112ea4,null));};exports[_0x7123('0x44')]=function(_0x28a72e,_0x20ad54){var _0x1a0240={'raw':![],'where':{'id':_0x28a72e[_0x7123('0x45')]['id']}},_0x43d40e={};_0x43d40e[_0x7123('0x30')]=_[_0x7123('0x33')](db[_0x7123('0x2c')][_0x7123('0x2d')]);_0x43d40e[_0x7123('0x32')]=_[_0x7123('0x33')](_0x28a72e[_0x7123('0x32')]);_0x43d40e[_0x7123('0x34')]=_[_0x7123('0x35')](_0x43d40e[_0x7123('0x30')],_0x43d40e[_0x7123('0x32')]);_0x1a0240[_0x7123('0x37')]=_[_0x7123('0x35')](_0x43d40e[_0x7123('0x30')],qs[_0x7123('0x36')](_0x28a72e[_0x7123('0x32')][_0x7123('0x36')]));_0x1a0240[_0x7123('0x37')]=_0x1a0240[_0x7123('0x37')][_0x7123('0x46')]?_0x1a0240[_0x7123('0x37')]:_0x43d40e['model'];if(_0x28a72e['query']['includeAll']){_0x1a0240[_0x7123('0x47')]=[{'all':!![]}];}_0x1a0240=_[_0x7123('0x3e')]({},_0x1a0240,_0x28a72e[_0x7123('0x40')]);return db[_0x7123('0x2c')][_0x7123('0x48')](_0x1a0240)[_0x7123('0x27')](handleEntityNotFound(_0x20ad54,null))[_0x7123('0x27')](respondWithResult(_0x20ad54,null))[_0x7123('0x49')](handleError(_0x20ad54,null));};exports[_0x7123('0x4a')]=function(_0x4dc2b1,_0x2198b4){return db[_0x7123('0x2c')]['create'](_0x4dc2b1[_0x7123('0x4b')],{})[_0x7123('0x27')](respondWithResult(_0x2198b4,0xc9))[_0x7123('0x49')](handleError(_0x2198b4,null));};exports[_0x7123('0x26')]=function(_0x5f0cbe,_0x33e38d){if(_0x5f0cbe['body']['id']){delete _0x5f0cbe[_0x7123('0x4b')]['id'];}return db[_0x7123('0x2c')][_0x7123('0x48')]({'where':{'id':_0x5f0cbe['params']['id']}})['then'](handleEntityNotFound(_0x33e38d,null))['then'](saveUpdates(_0x5f0cbe[_0x7123('0x4b')],null))[_0x7123('0x27')](respondWithResult(_0x33e38d,null))[_0x7123('0x49')](handleError(_0x33e38d,null));};exports[_0x7123('0x28')]=function(_0x2d37ca,_0x3bba86){return db[_0x7123('0x2c')][_0x7123('0x48')]({'where':{'id':_0x2d37ca[_0x7123('0x45')]['id']}})['then'](handleEntityNotFound(_0x3bba86,null))['then'](removeEntity(_0x3bba86,null))['catch'](handleError(_0x3bba86,null));};exports[_0x7123('0x4c')]=function(_0x1a9232,_0x4b3a24){return db['VoiceQueueReport']['describe']()[_0x7123('0x27')](respondWithResult(_0x4b3a24,null))[_0x7123('0x49')](handleError(_0x4b3a24,null));};exports[_0x7123('0x4d')]=function(_0x327fcd,_0x2c1742){var _0x472341={},_0x517320={},_0x2992b9={'count':0x0,'rows':[]};_0x517320['model']=_[_0x7123('0x33')](db[_0x7123('0x2c')][_0x7123('0x2d')]);_0x517320[_0x7123('0x32')]=_['keys'](_0x327fcd[_0x7123('0x32')]);_0x517320[_0x7123('0x34')]=_['intersection'](_0x517320[_0x7123('0x30')],_0x517320[_0x7123('0x32')]);_0x472341['attributes']=_[_0x7123('0x35')](_0x517320[_0x7123('0x30')],qs[_0x7123('0x36')](_0x327fcd['query'][_0x7123('0x36')]));_0x472341[_0x7123('0x37')]=_0x472341[_0x7123('0x37')][_0x7123('0x46')]?_0x472341['attributes']:_0x517320[_0x7123('0x30')];if(!_0x327fcd[_0x7123('0x32')][_0x7123('0x38')](_0x7123('0x39'))){_0x472341[_0x7123('0x20')]=qs[_0x7123('0x20')](_0x327fcd[_0x7123('0x32')][_0x7123('0x20')]);_0x472341[_0x7123('0x1e')]=qs['offset'](_0x327fcd[_0x7123('0x32')][_0x7123('0x1e')]);}_0x472341[_0x7123('0x4e')]=qs[_0x7123('0x3a')](_0x327fcd[_0x7123('0x32')][_0x7123('0x3a')]);_0x472341[_0x7123('0x3b')]=qs[_0x7123('0x34')](_[_0x7123('0x3c')](_0x327fcd[_0x7123('0x32')],_0x517320[_0x7123('0x34')]));if(_0x327fcd[_0x7123('0x32')]['filter']){_0x472341['where']=_[_0x7123('0x3e')](_0x472341['where'],{'$or':_[_0x7123('0x2b')](_0x472341['attributes'],function(_0x357ceb){var _0x22bba9={};_0x22bba9[_0x357ceb]={'$like':'%'+_0x327fcd[_0x7123('0x32')][_0x7123('0x3d')]+'%'};return _0x22bba9;})});}_0x472341=_[_0x7123('0x3e')]({},_0x472341,_0x327fcd[_0x7123('0x40')]);var _0x21a2b1={'where':_0x472341[_0x7123('0x3b')]};return db['VoiceQueueReport']['count'](_0x21a2b1)['then'](function(_0x99b392){_0x2992b9['count']=_0x99b392;if(_0x327fcd[_0x7123('0x32')][_0x7123('0x41')]){_0x472341[_0x7123('0x47')]=[{'all':!![]}];}return db[_0x7123('0x2c')]['findAll'](_0x472341);})[_0x7123('0x27')](function(_0x13d853){_0x2992b9[_0x7123('0x43')]=_0x13d853;return _0x2992b9;})[_0x7123('0x27')](respondWithFilteredResult(_0x2c1742,_0x472341,'getVoiceQueuesReport'))[_0x7123('0x49')](handleError(_0x2c1742,null,'getVoiceQueuesReport'));}; \ No newline at end of file diff --git a/server/api/voiceQueueReport/voiceQueueReport.events.js b/server/api/voiceQueueReport/voiceQueueReport.events.js index a73f6f2..146f88b 100644 --- a/server/api/voiceQueueReport/voiceQueueReport.events.js +++ b/server/api/voiceQueueReport/voiceQueueReport.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfcbb=['remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','setMaxListeners','save'];(function(_0x267db7,_0x3295f1){var _0x2fddcf=function(_0x34ef13){while(--_0x34ef13){_0x267db7['push'](_0x267db7['shift']());}};_0x2fddcf(++_0x3295f1);}(_0xfcbb,0x71));var _0xbfcb=function(_0x3715a7,_0x1edde1){_0x3715a7=_0x3715a7-0x0;var _0x66fc23=_0xfcbb[_0x3715a7];return _0x66fc23;};'use strict';var EventEmitter=require(_0xbfcb('0x0'));var VoiceQueueReport=require(_0xbfcb('0x1'))['db']['VoiceQueueReport'];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0xbfcb('0x2')](0x0);var events={'afterCreate':_0xbfcb('0x3'),'afterUpdate':'update','afterDestroy':_0xbfcb('0x4')};function emitEvent(_0x3ba3eb){return function(_0x4f0d37,_0x435016,_0x4e08a1){VoiceQueueReportEvents['emit'](_0x3ba3eb+':'+_0x4f0d37['id'],_0x4f0d37);VoiceQueueReportEvents[_0xbfcb('0x5')](_0x3ba3eb,_0x4f0d37);_0x4e08a1(null);};}for(var e in events){if(events[_0xbfcb('0x6')](e)){var event=events[e];VoiceQueueReport[_0xbfcb('0x7')](e,emitEvent(event));}}module[_0xbfcb('0x8')]=VoiceQueueReportEvents; \ No newline at end of file +var _0xeb7f=['../../mysqldb','VoiceQueueReport','update','remove','emit','hook','exports','events'];(function(_0x321fa7,_0x2963fd){var _0x598b52=function(_0x47d938){while(--_0x47d938){_0x321fa7['push'](_0x321fa7['shift']());}};_0x598b52(++_0x2963fd);}(_0xeb7f,0x1df));var _0xfeb7=function(_0x13cd99,_0x50bd8d){_0x13cd99=_0x13cd99-0x0;var _0x1d42c7=_0xeb7f[_0x13cd99];return _0x1d42c7;};'use strict';var EventEmitter=require(_0xfeb7('0x0'));var VoiceQueueReport=require(_0xfeb7('0x1'))['db'][_0xfeb7('0x2')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0xfeb7('0x3'),'afterDestroy':_0xfeb7('0x4')};function emitEvent(_0x13cc8d){return function(_0x4b43d9,_0x2f21c6,_0x58d05d){VoiceQueueReportEvents[_0xfeb7('0x5')](_0x13cc8d+':'+_0x4b43d9['id'],_0x4b43d9);VoiceQueueReportEvents['emit'](_0x13cc8d,_0x4b43d9);_0x58d05d(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceQueueReport[_0xfeb7('0x6')](e,emitEvent(event));}}module[_0xfeb7('0x7')]=VoiceQueueReportEvents; \ No newline at end of file diff --git a/server/api/voiceQueueReport/voiceQueueReport.model.js b/server/api/voiceQueueReport/voiceQueueReport.model.js index 41cc6e7..baa5d05 100644 --- a/server/api/voiceQueueReport/voiceQueueReport.model.js +++ b/server/api/voiceQueueReport/voiceQueueReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9c2a=['uniqueid','calleridnum','lodash','util','moment','bluebird','request-promise','path','rimraf','../../config/environment','./voiceQueueReport.attributes','exports','define'];(function(_0xf2497,_0x5292b2){var _0x2d3328=function(_0x7047e9){while(--_0x7047e9){_0xf2497['push'](_0xf2497['shift']());}};_0x2d3328(++_0x5292b2);}(_0x9c2a,0xdf));var _0xa9c2=function(_0x1f1731,_0x4b77eb){_0x1f1731=_0x1f1731-0x0;var _0x1f7625=_0x9c2a[_0x1f1731];return _0x1f7625;};'use strict';var _=require(_0xa9c2('0x0'));var util=require(_0xa9c2('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0xa9c2('0x2'));var BPromise=require(_0xa9c2('0x3'));var rp=require(_0xa9c2('0x4'));var fs=require('fs');var path=require(_0xa9c2('0x5'));var rimraf=require(_0xa9c2('0x6'));var config=require(_0xa9c2('0x7'));var attributes=require(_0xa9c2('0x8'));module[_0xa9c2('0x9')]=function(_0x3baef1,_0x1c231f){return _0x3baef1[_0xa9c2('0xa')]('VoiceQueueReport',attributes,{'tableName':'report_queue','paranoid':![],'indexes':[{'fields':[_0xa9c2('0xb')]},{'fields':[_0xa9c2('0xc')]}],'timestamps':!![]});}; \ No newline at end of file +var _0x2928=['api','moment','path','rimraf','../../config/environment','exports','define','report_queue','uniqueid','calleridnum','lodash','../../config/logger'];(function(_0x553d3d,_0x53e4d9){var _0x292b6e=function(_0x543335){while(--_0x543335){_0x553d3d['push'](_0x553d3d['shift']());}};_0x292b6e(++_0x53e4d9);}(_0x2928,0x17e));var _0x8292=function(_0x30cd7e,_0x4db10a){_0x30cd7e=_0x30cd7e-0x0;var _0x462a02=_0x2928[_0x30cd7e];return _0x462a02;};'use strict';var _=require(_0x8292('0x0'));var util=require('util');var logger=require(_0x8292('0x1'))(_0x8292('0x2'));var moment=require(_0x8292('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x8292('0x4'));var rimraf=require(_0x8292('0x5'));var config=require(_0x8292('0x6'));var attributes=require('./voiceQueueReport.attributes');module[_0x8292('0x7')]=function(_0xfd359a,_0x3387f1){return _0xfd359a[_0x8292('0x8')]('VoiceQueueReport',attributes,{'tableName':_0x8292('0x9'),'paranoid':![],'indexes':[{'fields':[_0x8292('0xa')]},{'fields':[_0x8292('0xb')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/voiceQueueReport/voiceQueueReport.rpc.js b/server/api/voiceQueueReport/voiceQueueReport.rpc.js index b7bbe20..f8390a3 100644 --- a/server/api/voiceQueueReport/voiceQueueReport.rpc.js +++ b/server/api/voiceQueueReport/voiceQueueReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3012=['moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','redis','defaults','localhost','register','request','then','info','VoiceQueueReport,\x20%s,\x20%s','debug','VoiceQueueReport,\x20%s,\x20%s,\x20%s','request\x20sent','error','message','result','catch','GetVoiceQueueReport','VoiceQueueReport','findAll','options','limit','include','map','model','attributes','stringify','create','raw','CreateVoiceQueueReport','UpdateVoiceQueueReport','body','lodash','util'];(function(_0x19950b,_0x53d0d7){var _0x3c6b41=function(_0x3924ad){while(--_0x3924ad){_0x19950b['push'](_0x19950b['shift']());}};_0x3c6b41(++_0x53d0d7);}(_0x3012,0x7f));var _0x2301=function(_0x4226dd,_0x31c010){_0x4226dd=_0x4226dd-0x0;var _0x3d3bd6=_0x3012[_0x4226dd];return _0x3d3bd6;};'use strict';var _=require(_0x2301('0x0'));var util=require(_0x2301('0x1'));var moment=require(_0x2301('0x2'));var BPromise=require(_0x2301('0x3'));var rs=require(_0x2301('0x4'));var fs=require('fs');var Redis=require(_0x2301('0x5'));var db=require(_0x2301('0x6'))['db'];var utils=require(_0x2301('0x7'));var logger=require(_0x2301('0x8'))(_0x2301('0x9'));var config=require(_0x2301('0xa'));var jayson=require(_0x2301('0xb'));var client=jayson[_0x2301('0xc')]['http']({'port':0x232a});config[_0x2301('0xd')]=_[_0x2301('0xe')](config[_0x2301('0xd')],{'host':_0x2301('0xf'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x2301('0xd')]));require('./voiceQueueReport.socket')[_0x2301('0x10')](socket);function respondWithRpcPromise(_0x55ab7b,_0x331814,_0x5ecdb7){return new BPromise(function(_0x9376d1,_0x1cbedc){return client[_0x2301('0x11')](_0x55ab7b,_0x5ecdb7)[_0x2301('0x12')](function(_0x459d07){logger[_0x2301('0x13')](_0x2301('0x14'),_0x331814,'request\x20sent');logger[_0x2301('0x15')](_0x2301('0x16'),_0x331814,_0x2301('0x17'),JSON['stringify'](_0x459d07));if(_0x459d07[_0x2301('0x18')]){if(_0x459d07[_0x2301('0x18')]['code']===0x1f4){logger[_0x2301('0x18')](_0x2301('0x14'),_0x331814,_0x459d07[_0x2301('0x18')]['message']);return _0x1cbedc(_0x459d07[_0x2301('0x18')]['message']);}logger['error']('VoiceQueueReport,\x20%s,\x20%s',_0x331814,_0x459d07['error'][_0x2301('0x19')]);return _0x9376d1(_0x459d07[_0x2301('0x18')][_0x2301('0x19')]);}else{logger['info'](_0x2301('0x14'),_0x331814,_0x2301('0x17'));_0x9376d1(_0x459d07[_0x2301('0x1a')][_0x2301('0x19')]);}})[_0x2301('0x1b')](function(_0x169b92){logger['error'](_0x2301('0x14'),_0x331814,_0x169b92);_0x1cbedc(_0x169b92);});});}exports[_0x2301('0x1c')]=function(_0x3c9785){var _0x3e005c=this;return new Promise(function(_0x250500,_0x21a361){return db[_0x2301('0x1d')][_0x2301('0x1e')]({'raw':_0x3c9785[_0x2301('0x1f')]?_0x3c9785[_0x2301('0x1f')]['raw']===undefined?!![]:![]:!![],'where':_0x3c9785[_0x2301('0x1f')]?_0x3c9785[_0x2301('0x1f')]['where']||null:null,'attributes':_0x3c9785[_0x2301('0x1f')]?_0x3c9785['options']['attributes']||null:null,'limit':_0x3c9785[_0x2301('0x1f')]?_0x3c9785['options'][_0x2301('0x20')]||null:null,'include':_0x3c9785['options']?_0x3c9785[_0x2301('0x1f')][_0x2301('0x21')]?_[_0x2301('0x22')](_0x3c9785[_0x2301('0x1f')][_0x2301('0x21')],function(_0x12219e){return{'model':db[_0x12219e[_0x2301('0x23')]],'as':_0x12219e['as'],'attributes':_0x12219e['attributes'],'include':_0x12219e['include']?_[_0x2301('0x22')](_0x12219e[_0x2301('0x21')],function(_0x4f49ba){return{'model':db[_0x4f49ba[_0x2301('0x23')]],'as':_0x4f49ba['as'],'attributes':_0x4f49ba[_0x2301('0x24')],'include':_0x4f49ba['include']?_[_0x2301('0x22')](_0x4f49ba['include'],function(_0xd09e9d){return{'model':db[_0xd09e9d[_0x2301('0x23')]],'as':_0xd09e9d['as'],'attributes':_0xd09e9d[_0x2301('0x24')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x5d52ca){logger[_0x2301('0x13')](_0x2301('0x1c'),_0x3c9785);logger['debug'](_0x2301('0x1c'),_0x3c9785,JSON[_0x2301('0x25')](_0x5d52ca));_0x250500(_0x5d52ca);})[_0x2301('0x1b')](function(_0x79c04b){logger[_0x2301('0x18')](_0x2301('0x1c'),_0x79c04b[_0x2301('0x19')],_0x3c9785);_0x21a361(_0x3e005c[_0x2301('0x18')](0x1f4,_0x79c04b['message']));});});};exports['CreateVoiceQueueReport']=function(_0x578d56){var _0x1316ca=this;return new Promise(function(_0x392e1d,_0x42e6bb){return db['VoiceQueueReport'][_0x2301('0x26')](_0x578d56['body'],{'raw':_0x578d56[_0x2301('0x1f')]?_0x578d56[_0x2301('0x1f')][_0x2301('0x27')]===undefined?!![]:![]:!![]})[_0x2301('0x12')](function(_0x2fcb61){logger[_0x2301('0x13')]('CreateVoiceQueueReport',_0x578d56);logger['debug'](_0x2301('0x28'),_0x578d56,JSON['stringify'](_0x2fcb61));_0x392e1d(_0x2fcb61);})['catch'](function(_0x3e751f){logger[_0x2301('0x18')](_0x2301('0x28'),_0x3e751f[_0x2301('0x19')],_0x578d56);_0x42e6bb(_0x1316ca['error'](0x1f4,_0x3e751f[_0x2301('0x19')]));});});};exports[_0x2301('0x29')]=function(_0x327b52){var _0x1639fa=this;return new Promise(function(_0x12f48c,_0x488465){return db[_0x2301('0x1d')]['update'](_0x327b52[_0x2301('0x2a')],{'raw':_0x327b52[_0x2301('0x1f')]?_0x327b52[_0x2301('0x1f')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x327b52['options']?_0x327b52[_0x2301('0x1f')]['where']||null:null,'attributes':_0x327b52['options']?_0x327b52['options']['attributes']||null:null,'limit':_0x327b52[_0x2301('0x1f')]?_0x327b52[_0x2301('0x1f')][_0x2301('0x20')]||null:null})['then'](function(_0x151d7e){logger[_0x2301('0x13')]('UpdateVoiceQueueReport',_0x327b52);logger[_0x2301('0x15')]('UpdateVoiceQueueReport',_0x327b52,JSON[_0x2301('0x25')](_0x151d7e));_0x12f48c(_0x151d7e);})[_0x2301('0x1b')](function(_0xc4d9f7){logger[_0x2301('0x18')](_0x2301('0x29'),_0xc4d9f7[_0x2301('0x19')],_0x327b52);_0x488465(_0x1639fa[_0x2301('0x18')](0x1f4,_0xc4d9f7[_0x2301('0x19')]));});});}; \ No newline at end of file +var _0x85f5=['info','request\x20sent','debug','VoiceQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','VoiceQueueReport,\x20%s,\x20%s','message','result','catch','GetVoiceQueueReport','VoiceQueueReport','findAll','options','raw','attributes','limit','include','map','model','create','body','CreateVoiceQueueReport','update','UpdateVoiceQueueReport','lodash','util','bluebird','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','register','request','then'];(function(_0x40d026,_0x1d9a0a){var _0x4bb908=function(_0x1b4d5){while(--_0x1b4d5){_0x40d026['push'](_0x40d026['shift']());}};_0x4bb908(++_0x1d9a0a);}(_0x85f5,0x1e7));var _0x585f=function(_0x5b1aed,_0x322c17){_0x5b1aed=_0x5b1aed-0x0;var _0x26add8=_0x85f5[_0x5b1aed];return _0x26add8;};'use strict';var _=require(_0x585f('0x0'));var util=require(_0x585f('0x1'));var moment=require('moment');var BPromise=require(_0x585f('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x585f('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x585f('0x4'));var logger=require(_0x585f('0x5'))(_0x585f('0x6'));var config=require(_0x585f('0x7'));var jayson=require(_0x585f('0x8'));var client=jayson[_0x585f('0x9')][_0x585f('0xa')]({'port':0x232a});config[_0x585f('0xb')]=_[_0x585f('0xc')](config[_0x585f('0xb')],{'host':_0x585f('0xd'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require('./voiceQueueReport.socket')[_0x585f('0xe')](socket);function respondWithRpcPromise(_0x372e58,_0x26fe64,_0x328da8){return new BPromise(function(_0x558017,_0x1ebcf4){return client[_0x585f('0xf')](_0x372e58,_0x328da8)[_0x585f('0x10')](function(_0x36221e){logger[_0x585f('0x11')]('VoiceQueueReport,\x20%s,\x20%s',_0x26fe64,_0x585f('0x12'));logger[_0x585f('0x13')](_0x585f('0x14'),_0x26fe64,_0x585f('0x12'),JSON[_0x585f('0x15')](_0x36221e));if(_0x36221e['error']){if(_0x36221e[_0x585f('0x16')]['code']===0x1f4){logger['error'](_0x585f('0x17'),_0x26fe64,_0x36221e[_0x585f('0x16')][_0x585f('0x18')]);return _0x1ebcf4(_0x36221e['error'][_0x585f('0x18')]);}logger['error'](_0x585f('0x17'),_0x26fe64,_0x36221e[_0x585f('0x16')][_0x585f('0x18')]);return _0x558017(_0x36221e[_0x585f('0x16')]['message']);}else{logger[_0x585f('0x11')](_0x585f('0x17'),_0x26fe64,_0x585f('0x12'));_0x558017(_0x36221e[_0x585f('0x19')][_0x585f('0x18')]);}})[_0x585f('0x1a')](function(_0x555b88){logger[_0x585f('0x16')]('VoiceQueueReport,\x20%s,\x20%s',_0x26fe64,_0x555b88);_0x1ebcf4(_0x555b88);});});}exports[_0x585f('0x1b')]=function(_0x464817){var _0x34c05b=this;return new Promise(function(_0x34a1d3,_0x42096e){return db[_0x585f('0x1c')][_0x585f('0x1d')]({'raw':_0x464817[_0x585f('0x1e')]?_0x464817['options'][_0x585f('0x1f')]===undefined?!![]:![]:!![],'where':_0x464817[_0x585f('0x1e')]?_0x464817['options']['where']||null:null,'attributes':_0x464817[_0x585f('0x1e')]?_0x464817[_0x585f('0x1e')][_0x585f('0x20')]||null:null,'limit':_0x464817['options']?_0x464817[_0x585f('0x1e')][_0x585f('0x21')]||null:null,'include':_0x464817[_0x585f('0x1e')]?_0x464817[_0x585f('0x1e')][_0x585f('0x22')]?_[_0x585f('0x23')](_0x464817[_0x585f('0x1e')][_0x585f('0x22')],function(_0x1c1844){return{'model':db[_0x1c1844[_0x585f('0x24')]],'as':_0x1c1844['as'],'attributes':_0x1c1844['attributes'],'include':_0x1c1844[_0x585f('0x22')]?_['map'](_0x1c1844[_0x585f('0x22')],function(_0x366e63){return{'model':db[_0x366e63[_0x585f('0x24')]],'as':_0x366e63['as'],'attributes':_0x366e63[_0x585f('0x20')],'include':_0x366e63[_0x585f('0x22')]?_[_0x585f('0x23')](_0x366e63[_0x585f('0x22')],function(_0x5a486c){return{'model':db[_0x5a486c[_0x585f('0x24')]],'as':_0x5a486c['as'],'attributes':_0x5a486c[_0x585f('0x20')]};}):[]};}):[]};}):[]:[]})[_0x585f('0x10')](function(_0x1774bc){logger['info']('GetVoiceQueueReport',_0x464817);logger['debug']('GetVoiceQueueReport',_0x464817,JSON[_0x585f('0x15')](_0x1774bc));_0x34a1d3(_0x1774bc);})['catch'](function(_0x206c2f){logger[_0x585f('0x16')](_0x585f('0x1b'),_0x206c2f['message'],_0x464817);_0x42096e(_0x34c05b['error'](0x1f4,_0x206c2f[_0x585f('0x18')]));});});};exports['CreateVoiceQueueReport']=function(_0x93f661){var _0x2528eb=this;return new Promise(function(_0x5b1d53,_0x55c5fc){return db['VoiceQueueReport'][_0x585f('0x25')](_0x93f661[_0x585f('0x26')],{'raw':_0x93f661['options']?_0x93f661['options'][_0x585f('0x1f')]===undefined?!![]:![]:!![]})['then'](function(_0x4e4b53){logger[_0x585f('0x11')](_0x585f('0x27'),_0x93f661);logger['debug']('CreateVoiceQueueReport',_0x93f661,JSON[_0x585f('0x15')](_0x4e4b53));_0x5b1d53(_0x4e4b53);})['catch'](function(_0x279f94){logger['error'](_0x585f('0x27'),_0x279f94['message'],_0x93f661);_0x55c5fc(_0x2528eb[_0x585f('0x16')](0x1f4,_0x279f94['message']));});});};exports['UpdateVoiceQueueReport']=function(_0x9ccaec){var _0x2cb704=this;return new Promise(function(_0x5b749a,_0x512f57){return db[_0x585f('0x1c')][_0x585f('0x28')](_0x9ccaec['body'],{'raw':_0x9ccaec[_0x585f('0x1e')]?_0x9ccaec['options'][_0x585f('0x1f')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x9ccaec[_0x585f('0x1e')]?_0x9ccaec[_0x585f('0x1e')]['where']||null:null,'attributes':_0x9ccaec[_0x585f('0x1e')]?_0x9ccaec[_0x585f('0x1e')][_0x585f('0x20')]||null:null,'limit':_0x9ccaec[_0x585f('0x1e')]?_0x9ccaec[_0x585f('0x1e')][_0x585f('0x21')]||null:null})[_0x585f('0x10')](function(_0x42e1bd){logger[_0x585f('0x11')](_0x585f('0x29'),_0x9ccaec);logger[_0x585f('0x13')](_0x585f('0x29'),_0x9ccaec,JSON[_0x585f('0x15')](_0x42e1bd));_0x5b749a(_0x42e1bd);})[_0x585f('0x1a')](function(_0x554ca4){logger['error'](_0x585f('0x29'),_0x554ca4['message'],_0x9ccaec);_0x512f57(_0x2cb704[_0x585f('0x16')](0x1f4,_0x554ca4['message']));});});}; \ No newline at end of file diff --git a/server/api/voiceQueueReport/voiceQueueReport.socket.js b/server/api/voiceQueueReport/voiceQueueReport.socket.js index 1fa4b8c..ee659f6 100644 --- a/server/api/voiceQueueReport/voiceQueueReport.socket.js +++ b/server/api/voiceQueueReport/voiceQueueReport.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd338=['./voiceQueueReport.events','remove','emit','length','voiceQueueReport:'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0xd338,0x1f4));var _0x8d33=function(_0x5f46e7,_0x62f9f8){_0x5f46e7=_0x5f46e7-0x0;var _0x567e95=_0xd338[_0x5f46e7];return _0x567e95;};'use strict';var VoiceQueueReportEvents=require(_0x8d33('0x0'));var events=['save',_0x8d33('0x1'),'update'];function createListener(_0x49dd4f,_0x2074ce){return function(_0x172dd9){_0x2074ce[_0x8d33('0x2')](_0x49dd4f,_0x172dd9);};}function removeListener(_0x3bee17,_0x3c9530){return function(){VoiceQueueReportEvents['removeListener'](_0x3bee17,_0x3c9530);};}exports['register']=function(_0x2cbe6d){for(var _0x50fe18=0x0,_0x4ec11b=events[_0x8d33('0x3')];_0x50fe18<_0x4ec11b;_0x50fe18++){var _0x463abb=events[_0x50fe18];var _0xc080ea=createListener(_0x8d33('0x4')+_0x463abb,_0x2cbe6d);VoiceQueueReportEvents['on'](_0x463abb,_0xc080ea);}}; \ No newline at end of file +var _0xca54=['length','voiceQueueReport:','save','remove','update','emit','register'];(function(_0x5d3147,_0x4399d3){var _0x4d85e7=function(_0xc71ebf){while(--_0xc71ebf){_0x5d3147['push'](_0x5d3147['shift']());}};_0x4d85e7(++_0x4399d3);}(_0xca54,0x9c));var _0x4ca5=function(_0x55680d,_0x48c224){_0x55680d=_0x55680d-0x0;var _0x1307a4=_0xca54[_0x55680d];return _0x1307a4;};'use strict';var VoiceQueueReportEvents=require('./voiceQueueReport.events');var events=[_0x4ca5('0x0'),_0x4ca5('0x1'),_0x4ca5('0x2')];function createListener(_0x1d4d6b,_0x201256){return function(_0x1560b6){_0x201256[_0x4ca5('0x3')](_0x1d4d6b,_0x1560b6);};}function removeListener(_0x4d1e86,_0x44ec90){return function(){VoiceQueueReportEvents['removeListener'](_0x4d1e86,_0x44ec90);};}exports[_0x4ca5('0x4')]=function(_0x5b51f3){for(var _0x221565=0x0,_0x159431=events[_0x4ca5('0x5')];_0x221565<_0x159431;_0x221565++){var _0x5430ce=events[_0x221565];var _0x26becd=createListener(_0x4ca5('0x6')+_0x5430ce,_0x5b51f3);VoiceQueueReportEvents['on'](_0x5430ce,_0x26becd);}}; \ No newline at end of file diff --git a/server/api/voiceQueuesLog/index.js b/server/api/voiceQueuesLog/index.js index 2551c7b..26e699f 100644 --- a/server/api/voiceQueuesLog/index.js +++ b/server/api/voiceQueuesLog/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x077a=['update','delete','destroy','exports','multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','show','create','put','/:id'];(function(_0xb10bc6,_0x594d68){var _0x1f5ac2=function(_0xb6b938){while(--_0xb6b938){_0xb10bc6['push'](_0xb10bc6['shift']());}};_0x1f5ac2(++_0x594d68);}(_0x077a,0x1f2));var _0xa077=function(_0x225b4e,_0x179ee4){_0x225b4e=_0x225b4e-0x0;var _0x24237a=_0x077a[_0x225b4e];return _0x24237a;};'use strict';var multer=require(_0xa077('0x0'));var util=require('util');var path=require(_0xa077('0x1'));var timeout=require(_0xa077('0x2'));var express=require(_0xa077('0x3'));var router=express[_0xa077('0x4')]();var fs_extra=require(_0xa077('0x5'));var auth=require(_0xa077('0x6'));var interaction=require(_0xa077('0x7'));var config=require(_0xa077('0x8'));var controller=require('./voiceQueuesLog.controller');router[_0xa077('0x9')]('/',auth[_0xa077('0xa')](),controller['index']);router['get']('/:id',auth[_0xa077('0xa')](),controller[_0xa077('0xb')]);router['post']('/',auth['isAuthenticated'](),controller[_0xa077('0xc')]);router[_0xa077('0xd')](_0xa077('0xe'),auth[_0xa077('0xa')](),controller[_0xa077('0xf')]);router[_0xa077('0x10')](_0xa077('0xe'),auth['isAuthenticated'](),controller[_0xa077('0x11')]);module[_0xa077('0x12')]=router; \ No newline at end of file +var _0x0bca=['destroy','exports','multer','util','path','Router','fs-extra','./voiceQueuesLog.controller','get','isAuthenticated','index','/:id','post','create','delete'];(function(_0x3c9b8d,_0x435d7f){var _0x44314f=function(_0x185c2f){while(--_0x185c2f){_0x3c9b8d['push'](_0x3c9b8d['shift']());}};_0x44314f(++_0x435d7f);}(_0x0bca,0xa7));var _0xa0bc=function(_0x2f0ed7,_0x2207f5){_0x2f0ed7=_0x2f0ed7-0x0;var _0x5bbea4=_0x0bca[_0x2f0ed7];return _0x5bbea4;};'use strict';var multer=require(_0xa0bc('0x0'));var util=require(_0xa0bc('0x1'));var path=require(_0xa0bc('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0xa0bc('0x3')]();var fs_extra=require(_0xa0bc('0x4'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xa0bc('0x5'));router[_0xa0bc('0x6')]('/',auth[_0xa0bc('0x7')](),controller[_0xa0bc('0x8')]);router[_0xa0bc('0x6')](_0xa0bc('0x9'),auth[_0xa0bc('0x7')](),controller['show']);router[_0xa0bc('0xa')]('/',auth[_0xa0bc('0x7')](),controller[_0xa0bc('0xb')]);router['put'](_0xa0bc('0x9'),auth[_0xa0bc('0x7')](),controller['update']);router[_0xa0bc('0xc')]('/:id',auth[_0xa0bc('0x7')](),controller[_0xa0bc('0xd')]);module[_0xa0bc('0xe')]=router; \ No newline at end of file diff --git a/server/api/voiceQueuesLog/voiceQueuesLog.attributes.js b/server/api/voiceQueuesLog/voiceQueuesLog.attributes.js index 09b30fc..d16905f 100644 --- a/server/api/voiceQueuesLog/voiceQueuesLog.attributes.js +++ b/server/api/voiceQueuesLog/voiceQueuesLog.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xde74=['sequelize','moment','exports','STRING','DATE','YYYY-MM-DD\x20HH:mm:ss'];(function(_0x5cfd35,_0x245a8f){var _0x1e8ab9=function(_0x461520){while(--_0x461520){_0x5cfd35['push'](_0x5cfd35['shift']());}};_0x1e8ab9(++_0x245a8f);}(_0xde74,0x1c8));var _0x4de7=function(_0x24e366,_0x33889d){_0x24e366=_0x24e366-0x0;var _0x2215b3=_0xde74[_0x24e366];return _0x2215b3;};'use strict';var Sequelize=require(_0x4de7('0x0'));var moment=require(_0x4de7('0x1'));module[_0x4de7('0x2')]={'time':{'type':Sequelize['STRING']},'callid':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':''},'queuename':{'type':Sequelize[_0x4de7('0x3')],'allowNull':![],'defaultValue':''},'agent':{'type':Sequelize[_0x4de7('0x3')],'allowNull':![],'defaultValue':''},'event':{'type':Sequelize[_0x4de7('0x3')],'allowNull':![],'defaultValue':''},'data':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':''},'data1':{'type':Sequelize[_0x4de7('0x3')],'allowNull':![],'defaultValue':''},'data2':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':''},'data3':{'type':Sequelize[_0x4de7('0x3')],'allowNull':![],'defaultValue':''},'data4':{'type':Sequelize[_0x4de7('0x3')],'allowNull':![],'defaultValue':''},'data5':{'type':Sequelize[_0x4de7('0x3')],'allowNull':![],'defaultValue':''},'dtm':{'type':Sequelize[_0x4de7('0x4')],'allowNull':![],'defaultValue':moment()['format'](_0x4de7('0x5'))}}; \ No newline at end of file +var _0x9a18=['exports','STRING','DATE','format','YYYY-MM-DD\x20HH:mm:ss','sequelize','moment'];(function(_0x11154a,_0x353c95){var _0x324111=function(_0x18465d){while(--_0x18465d){_0x11154a['push'](_0x11154a['shift']());}};_0x324111(++_0x353c95);}(_0x9a18,0xfa));var _0x89a1=function(_0x1d62b6,_0x2b6482){_0x1d62b6=_0x1d62b6-0x0;var _0x53e149=_0x9a18[_0x1d62b6];return _0x53e149;};'use strict';var Sequelize=require(_0x89a1('0x0'));var moment=require(_0x89a1('0x1'));module[_0x89a1('0x2')]={'time':{'type':Sequelize[_0x89a1('0x3')]},'callid':{'type':Sequelize[_0x89a1('0x3')],'allowNull':![],'defaultValue':''},'queuename':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':''},'agent':{'type':Sequelize[_0x89a1('0x3')],'allowNull':![],'defaultValue':''},'event':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':''},'data':{'type':Sequelize[_0x89a1('0x3')],'allowNull':![],'defaultValue':''},'data1':{'type':Sequelize[_0x89a1('0x3')],'allowNull':![],'defaultValue':''},'data2':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':''},'data3':{'type':Sequelize[_0x89a1('0x3')],'allowNull':![],'defaultValue':''},'data4':{'type':Sequelize[_0x89a1('0x3')],'allowNull':![],'defaultValue':''},'data5':{'type':Sequelize[_0x89a1('0x3')],'allowNull':![],'defaultValue':''},'dtm':{'type':Sequelize[_0x89a1('0x4')],'allowNull':![],'defaultValue':moment()[_0x89a1('0x5')](_0x89a1('0x6'))}}; \ No newline at end of file diff --git a/server/api/voiceQueuesLog/voiceQueuesLog.controller.js b/server/api/voiceQueuesLog/voiceQueuesLog.controller.js index 9287f19..0cfbeca 100644 --- a/server/api/voiceQueuesLog/voiceQueuesLog.controller.js +++ b/server/api/voiceQueuesLog/voiceQueuesLog.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb779=['rows','catch','params','intersection','includeAll','find','create','update','body','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','path','sox','to-csv','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','api','../../config/utils','../../config/license/util','../../mysqldb','status','end','json','offset','limit','count','set','Content-Range','apply','reject','then','sendStatus','stack','name','VoiceQueuesLog','rawAttributes','fieldName','type','key','model','map','query','keys','filters','fields','attributes','length','hasOwnProperty','nolimit','sort','where','pick','filter','VIRTUAL','merge','options','include'];(function(_0x21dc4a,_0x53887e){var _0x2f2585=function(_0x4d35dd){while(--_0x4d35dd){_0x21dc4a['push'](_0x21dc4a['shift']());}};_0x2f2585(++_0x53887e);}(_0xb779,0x1c5));var _0x9b77=function(_0x5e2455,_0x1b1c34){_0x5e2455=_0x5e2455-0x0;var _0x24bc02=_0xb779[_0x5e2455];return _0x24bc02;};'use strict';var emlformat=require(_0x9b77('0x0'));var rimraf=require(_0x9b77('0x1'));var zipdir=require(_0x9b77('0x2'));var jsonpatch=require(_0x9b77('0x3'));var rp=require(_0x9b77('0x4'));var moment=require('moment');var BPromise=require(_0x9b77('0x5'));var Mustache=require(_0x9b77('0x6'));var util=require('util');var path=require(_0x9b77('0x7'));var sox=require(_0x9b77('0x8'));var csv=require(_0x9b77('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x9b77('0xa'));var _=require(_0x9b77('0xb'));var squel=require(_0x9b77('0xc'));var crypto=require(_0x9b77('0xd'));var jsforce=require(_0x9b77('0xe'));var deskjs=require(_0x9b77('0xf'));var toCsv=require('to-csv');var querystring=require(_0x9b77('0x10'));var Papa=require(_0x9b77('0x11'));var Redis=require(_0x9b77('0x12'));var authService=require(_0x9b77('0x13'));var qs=require(_0x9b77('0x14'));var as=require(_0x9b77('0x15'));var hardwareService=require(_0x9b77('0x16'));var logger=require(_0x9b77('0x17'))(_0x9b77('0x18'));var utils=require(_0x9b77('0x19'));var config=require('../../config/environment');var licenseUtil=require(_0x9b77('0x1a'));var db=require(_0x9b77('0x1b'))['db'];function respondWithStatusCode(_0x359daa,_0x383ebc){_0x383ebc=_0x383ebc||0xcc;return function(_0x2cb76a){if(_0x2cb76a){return _0x359daa['sendStatus'](_0x383ebc);}return _0x359daa[_0x9b77('0x1c')](_0x383ebc)[_0x9b77('0x1d')]();};}function respondWithResult(_0x5a906d,_0x840b03){_0x840b03=_0x840b03||0xc8;return function(_0xf13eec){if(_0xf13eec){return _0x5a906d[_0x9b77('0x1c')](_0x840b03)[_0x9b77('0x1e')](_0xf13eec);}};}function respondWithFilteredResult(_0x4930f1,_0x52514f){return function(_0x28397c){if(_0x28397c){var _0x5d77f0=typeof _0x52514f[_0x9b77('0x1f')]==='undefined'&&typeof _0x52514f[_0x9b77('0x20')]==='undefined';var _0x3e858f=_0x28397c[_0x9b77('0x21')];var _0x4330f3=_0x5d77f0?0x0:_0x52514f[_0x9b77('0x1f')];var _0x1fe057=_0x5d77f0?_0x28397c[_0x9b77('0x21')]:_0x52514f[_0x9b77('0x1f')]+_0x52514f[_0x9b77('0x20')];var _0x285aee;if(_0x1fe057>=_0x3e858f){_0x1fe057=_0x3e858f;_0x285aee=0xc8;}else{_0x285aee=0xce;}_0x4930f1[_0x9b77('0x1c')](_0x285aee);return _0x4930f1[_0x9b77('0x22')](_0x9b77('0x23'),_0x4330f3+'-'+_0x1fe057+'/'+_0x3e858f)['json'](_0x28397c);}return null;};}function patchUpdates(_0x290b1c){return function(_0x2312e2){try{jsonpatch[_0x9b77('0x24')](_0x2312e2,_0x290b1c,!![]);}catch(_0x54471b){return BPromise[_0x9b77('0x25')](_0x54471b);}return _0x2312e2['save']();};}function saveUpdates(_0x37a502,_0x5df3db){return function(_0x33756b){if(_0x33756b){return _0x33756b['update'](_0x37a502)[_0x9b77('0x26')](function(_0xcedca8){return _0xcedca8;});}return null;};}function removeEntity(_0x527bd9,_0x46bf7d){return function(_0x141559){if(_0x141559){return _0x141559['destroy']()[_0x9b77('0x26')](function(){_0x527bd9[_0x9b77('0x1c')](0xcc)[_0x9b77('0x1d')]();});}};}function handleEntityNotFound(_0xa29b7,_0x294443){return function(_0xd2dfad){if(!_0xd2dfad){_0xa29b7[_0x9b77('0x27')](0x194);}return _0xd2dfad;};}function handleError(_0x34f764,_0xbec1c4){_0xbec1c4=_0xbec1c4||0x1f4;return function(_0x26afb5){logger['error'](_0x26afb5[_0x9b77('0x28')]);if(_0x26afb5[_0x9b77('0x29')]){delete _0x26afb5[_0x9b77('0x29')];}_0x34f764[_0x9b77('0x1c')](_0xbec1c4)['send'](_0x26afb5);};}exports['index']=function(_0x25bc43,_0x2bd691){var _0xd957e0={},_0x579289={},_0x5511f1={'count':0x0,'rows':[]};var _0x120378=_['map'](db[_0x9b77('0x2a')][_0x9b77('0x2b')],function(_0x571be5){return{'name':_0x571be5[_0x9b77('0x2c')],'type':_0x571be5[_0x9b77('0x2d')][_0x9b77('0x2e')]};});_0x579289[_0x9b77('0x2f')]=_[_0x9b77('0x30')](_0x120378,_0x9b77('0x29'));_0x579289[_0x9b77('0x31')]=_[_0x9b77('0x32')](_0x25bc43[_0x9b77('0x31')]);_0x579289[_0x9b77('0x33')]=_['intersection'](_0x579289[_0x9b77('0x2f')],_0x579289[_0x9b77('0x31')]);_0xd957e0['attributes']=_['intersection'](_0x579289[_0x9b77('0x2f')],qs[_0x9b77('0x34')](_0x25bc43[_0x9b77('0x31')][_0x9b77('0x34')]));_0xd957e0[_0x9b77('0x35')]=_0xd957e0[_0x9b77('0x35')][_0x9b77('0x36')]?_0xd957e0[_0x9b77('0x35')]:_0x579289[_0x9b77('0x2f')];if(!_0x25bc43[_0x9b77('0x31')][_0x9b77('0x37')](_0x9b77('0x38'))){_0xd957e0[_0x9b77('0x20')]=qs[_0x9b77('0x20')](_0x25bc43[_0x9b77('0x31')][_0x9b77('0x20')]);_0xd957e0[_0x9b77('0x1f')]=qs[_0x9b77('0x1f')](_0x25bc43['query'][_0x9b77('0x1f')]);}_0xd957e0['order']=qs[_0x9b77('0x39')](_0x25bc43[_0x9b77('0x31')][_0x9b77('0x39')]);_0xd957e0[_0x9b77('0x3a')]=qs[_0x9b77('0x33')](_[_0x9b77('0x3b')](_0x25bc43[_0x9b77('0x31')],_0x579289[_0x9b77('0x33')]),_0x120378);if(_0x25bc43['query'][_0x9b77('0x3c')]){_0xd957e0[_0x9b77('0x3a')]=_['merge'](_0xd957e0['where'],{'$or':_[_0x9b77('0x30')](_0x120378,function(_0x32aed9){if(_0x32aed9[_0x9b77('0x2d')]!==_0x9b77('0x3d')){var _0x4d0193={};_0x4d0193[_0x32aed9[_0x9b77('0x29')]]={'$like':'%'+_0x25bc43['query'][_0x9b77('0x3c')]+'%'};return _0x4d0193;}})});}_0xd957e0=_[_0x9b77('0x3e')]({},_0xd957e0,_0x25bc43[_0x9b77('0x3f')]);var _0x3b6a2a={'where':_0xd957e0[_0x9b77('0x3a')]};return db[_0x9b77('0x2a')][_0x9b77('0x21')](_0x3b6a2a)[_0x9b77('0x26')](function(_0x1f89d2){_0x5511f1[_0x9b77('0x21')]=_0x1f89d2;if(_0x25bc43[_0x9b77('0x31')]['includeAll']){_0xd957e0[_0x9b77('0x40')]=[{'all':!![]}];}return db[_0x9b77('0x2a')]['findAll'](_0xd957e0);})[_0x9b77('0x26')](function(_0x1415a4){_0x5511f1[_0x9b77('0x41')]=_0x1415a4;return _0x5511f1;})['then'](respondWithFilteredResult(_0x2bd691,_0xd957e0))[_0x9b77('0x42')](handleError(_0x2bd691,null));};exports['show']=function(_0x1a7c64,_0x3ae16e){var _0x104f08={'raw':!![],'where':{'id':_0x1a7c64[_0x9b77('0x43')]['id']}},_0x2f8685={};_0x2f8685[_0x9b77('0x2f')]=_[_0x9b77('0x32')](db['VoiceQueuesLog'][_0x9b77('0x2b')]);_0x2f8685[_0x9b77('0x31')]=_[_0x9b77('0x32')](_0x1a7c64[_0x9b77('0x31')]);_0x2f8685['filters']=_[_0x9b77('0x44')](_0x2f8685[_0x9b77('0x2f')],_0x2f8685[_0x9b77('0x31')]);_0x104f08[_0x9b77('0x35')]=_['intersection'](_0x2f8685['model'],qs[_0x9b77('0x34')](_0x1a7c64['query'][_0x9b77('0x34')]));_0x104f08[_0x9b77('0x35')]=_0x104f08[_0x9b77('0x35')][_0x9b77('0x36')]?_0x104f08[_0x9b77('0x35')]:_0x2f8685[_0x9b77('0x2f')];if(_0x1a7c64['query'][_0x9b77('0x45')]){_0x104f08[_0x9b77('0x40')]=[{'all':!![]}];}_0x104f08=_['merge']({},_0x104f08,_0x1a7c64[_0x9b77('0x3f')]);return db[_0x9b77('0x2a')][_0x9b77('0x46')](_0x104f08)[_0x9b77('0x26')](handleEntityNotFound(_0x3ae16e,null))[_0x9b77('0x26')](respondWithResult(_0x3ae16e,null))[_0x9b77('0x42')](handleError(_0x3ae16e,null));};exports[_0x9b77('0x47')]=function(_0x1b1957,_0x7549de){return db[_0x9b77('0x2a')][_0x9b77('0x47')](_0x1b1957['body'],{})[_0x9b77('0x26')](respondWithResult(_0x7549de,0xc9))[_0x9b77('0x42')](handleError(_0x7549de,null));};exports[_0x9b77('0x48')]=function(_0x3bd2f4,_0x33141f){if(_0x3bd2f4['body']['id']){delete _0x3bd2f4[_0x9b77('0x49')]['id'];}return db[_0x9b77('0x2a')][_0x9b77('0x46')]({'where':{'id':_0x3bd2f4[_0x9b77('0x43')]['id']}})['then'](handleEntityNotFound(_0x33141f,null))[_0x9b77('0x26')](saveUpdates(_0x3bd2f4['body'],null))[_0x9b77('0x26')](respondWithResult(_0x33141f,null))['catch'](handleError(_0x33141f,null));};exports['destroy']=function(_0x4492a9,_0x5a4d6d){return db['VoiceQueuesLog']['find']({'where':{'id':_0x4492a9[_0x9b77('0x43')]['id']}})[_0x9b77('0x26')](handleEntityNotFound(_0x5a4d6d,null))['then'](removeEntity(_0x5a4d6d,null))[_0x9b77('0x42')](handleError(_0x5a4d6d,null));}; \ No newline at end of file +var _0x6abe=['../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','offset','undefined','limit','count','set','Content-Range','json','reject','save','update','then','destroy','stack','name','send','map','VoiceQueuesLog','rawAttributes','key','model','query','keys','filters','attributes','intersection','fields','length','nolimit','order','sort','pick','where','type','VIRTUAL','filter','merge','includeAll','rows','catch','show','params','include','options','find','create','body','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','path','to-csv','fs-extra','lodash','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api'];(function(_0x22b2af,_0x29f1f3){var _0x38bf03=function(_0x125cfe){while(--_0x125cfe){_0x22b2af['push'](_0x22b2af['shift']());}};_0x38bf03(++_0x29f1f3);}(_0x6abe,0x159));var _0xe6ab=function(_0x30c371,_0x47695e){_0x30c371=_0x30c371-0x0;var _0x111b21=_0x6abe[_0x30c371];return _0x111b21;};'use strict';var emlformat=require(_0xe6ab('0x0'));var rimraf=require(_0xe6ab('0x1'));var zipdir=require(_0xe6ab('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xe6ab('0x3'));var moment=require(_0xe6ab('0x4'));var BPromise=require(_0xe6ab('0x5'));var Mustache=require(_0xe6ab('0x6'));var util=require('util');var path=require(_0xe6ab('0x7'));var sox=require('sox');var csv=require(_0xe6ab('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xe6ab('0x9'));var _=require(_0xe6ab('0xa'));var squel=require('squel');var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0xe6ab('0xb'));var toCsv=require(_0xe6ab('0x8'));var querystring=require(_0xe6ab('0xc'));var Papa=require(_0xe6ab('0xd'));var Redis=require(_0xe6ab('0xe'));var authService=require(_0xe6ab('0xf'));var qs=require(_0xe6ab('0x10'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xe6ab('0x11'));var logger=require(_0xe6ab('0x12'))(_0xe6ab('0x13'));var utils=require(_0xe6ab('0x14'));var config=require(_0xe6ab('0x15'));var licenseUtil=require(_0xe6ab('0x16'));var db=require(_0xe6ab('0x17'))['db'];function respondWithStatusCode(_0x275eb7,_0x303b9c){_0x303b9c=_0x303b9c||0xcc;return function(_0x3c8067){if(_0x3c8067){return _0x275eb7[_0xe6ab('0x18')](_0x303b9c);}return _0x275eb7[_0xe6ab('0x19')](_0x303b9c)[_0xe6ab('0x1a')]();};}function respondWithResult(_0x45bd32,_0x42d1e8){_0x42d1e8=_0x42d1e8||0xc8;return function(_0x7850b8){if(_0x7850b8){return _0x45bd32[_0xe6ab('0x19')](_0x42d1e8)['json'](_0x7850b8);}};}function respondWithFilteredResult(_0x397329,_0x48e277){return function(_0x52cf0a){if(_0x52cf0a){var _0x98213c=typeof _0x48e277[_0xe6ab('0x1b')]===_0xe6ab('0x1c')&&typeof _0x48e277[_0xe6ab('0x1d')]===_0xe6ab('0x1c');var _0xbc10c=_0x52cf0a[_0xe6ab('0x1e')];var _0x1df091=_0x98213c?0x0:_0x48e277[_0xe6ab('0x1b')];var _0x48f792=_0x98213c?_0x52cf0a[_0xe6ab('0x1e')]:_0x48e277[_0xe6ab('0x1b')]+_0x48e277[_0xe6ab('0x1d')];var _0x43c06a;if(_0x48f792>=_0xbc10c){_0x48f792=_0xbc10c;_0x43c06a=0xc8;}else{_0x43c06a=0xce;}_0x397329['status'](_0x43c06a);return _0x397329[_0xe6ab('0x1f')](_0xe6ab('0x20'),_0x1df091+'-'+_0x48f792+'/'+_0xbc10c)[_0xe6ab('0x21')](_0x52cf0a);}return null;};}function patchUpdates(_0x1e2bc1){return function(_0x7e9c4b){try{jsonpatch['apply'](_0x7e9c4b,_0x1e2bc1,!![]);}catch(_0x2e999b){return BPromise[_0xe6ab('0x22')](_0x2e999b);}return _0x7e9c4b[_0xe6ab('0x23')]();};}function saveUpdates(_0x10e826,_0x23e6f0){return function(_0x3c08c4){if(_0x3c08c4){return _0x3c08c4[_0xe6ab('0x24')](_0x10e826)[_0xe6ab('0x25')](function(_0xd23acb){return _0xd23acb;});}return null;};}function removeEntity(_0x36f0e1,_0x493ff4){return function(_0x4e73ff){if(_0x4e73ff){return _0x4e73ff[_0xe6ab('0x26')]()['then'](function(){_0x36f0e1[_0xe6ab('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0x62e0df,_0x5da8b7){return function(_0x1e1294){if(!_0x1e1294){_0x62e0df[_0xe6ab('0x18')](0x194);}return _0x1e1294;};}function handleError(_0x49a24,_0x193ff7){_0x193ff7=_0x193ff7||0x1f4;return function(_0x21cbe0){logger['error'](_0x21cbe0[_0xe6ab('0x27')]);if(_0x21cbe0[_0xe6ab('0x28')]){delete _0x21cbe0['name'];}_0x49a24[_0xe6ab('0x19')](_0x193ff7)[_0xe6ab('0x29')](_0x21cbe0);};}exports['index']=function(_0xe1d434,_0x405be0){var _0x4aec6f={},_0x2f7fad={},_0x5b0f07={'count':0x0,'rows':[]};var _0xb199c6=_[_0xe6ab('0x2a')](db[_0xe6ab('0x2b')][_0xe6ab('0x2c')],function(_0x2f3a7f){return{'name':_0x2f3a7f['fieldName'],'type':_0x2f3a7f['type'][_0xe6ab('0x2d')]};});_0x2f7fad[_0xe6ab('0x2e')]=_[_0xe6ab('0x2a')](_0xb199c6,'name');_0x2f7fad[_0xe6ab('0x2f')]=_[_0xe6ab('0x30')](_0xe1d434[_0xe6ab('0x2f')]);_0x2f7fad[_0xe6ab('0x31')]=_['intersection'](_0x2f7fad[_0xe6ab('0x2e')],_0x2f7fad['query']);_0x4aec6f[_0xe6ab('0x32')]=_[_0xe6ab('0x33')](_0x2f7fad['model'],qs[_0xe6ab('0x34')](_0xe1d434[_0xe6ab('0x2f')]['fields']));_0x4aec6f[_0xe6ab('0x32')]=_0x4aec6f[_0xe6ab('0x32')][_0xe6ab('0x35')]?_0x4aec6f[_0xe6ab('0x32')]:_0x2f7fad[_0xe6ab('0x2e')];if(!_0xe1d434[_0xe6ab('0x2f')]['hasOwnProperty'](_0xe6ab('0x36'))){_0x4aec6f[_0xe6ab('0x1d')]=qs[_0xe6ab('0x1d')](_0xe1d434[_0xe6ab('0x2f')][_0xe6ab('0x1d')]);_0x4aec6f[_0xe6ab('0x1b')]=qs[_0xe6ab('0x1b')](_0xe1d434[_0xe6ab('0x2f')]['offset']);}_0x4aec6f[_0xe6ab('0x37')]=qs[_0xe6ab('0x38')](_0xe1d434[_0xe6ab('0x2f')]['sort']);_0x4aec6f['where']=qs[_0xe6ab('0x31')](_[_0xe6ab('0x39')](_0xe1d434[_0xe6ab('0x2f')],_0x2f7fad['filters']),_0xb199c6);if(_0xe1d434[_0xe6ab('0x2f')]['filter']){_0x4aec6f[_0xe6ab('0x3a')]=_['merge'](_0x4aec6f[_0xe6ab('0x3a')],{'$or':_[_0xe6ab('0x2a')](_0xb199c6,function(_0x40fd5e){if(_0x40fd5e[_0xe6ab('0x3b')]!==_0xe6ab('0x3c')){var _0x5c8881={};_0x5c8881[_0x40fd5e['name']]={'$like':'%'+_0xe1d434[_0xe6ab('0x2f')][_0xe6ab('0x3d')]+'%'};return _0x5c8881;}})});}_0x4aec6f=_[_0xe6ab('0x3e')]({},_0x4aec6f,_0xe1d434['options']);var _0x4badf0={'where':_0x4aec6f[_0xe6ab('0x3a')]};return db[_0xe6ab('0x2b')][_0xe6ab('0x1e')](_0x4badf0)[_0xe6ab('0x25')](function(_0x4b61a4){_0x5b0f07[_0xe6ab('0x1e')]=_0x4b61a4;if(_0xe1d434[_0xe6ab('0x2f')][_0xe6ab('0x3f')]){_0x4aec6f['include']=[{'all':!![]}];}return db['VoiceQueuesLog']['findAll'](_0x4aec6f);})['then'](function(_0x100f70){_0x5b0f07[_0xe6ab('0x40')]=_0x100f70;return _0x5b0f07;})[_0xe6ab('0x25')](respondWithFilteredResult(_0x405be0,_0x4aec6f))[_0xe6ab('0x41')](handleError(_0x405be0,null));};exports[_0xe6ab('0x42')]=function(_0x3af3d8,_0x40d22f){var _0x1e490a={'raw':!![],'where':{'id':_0x3af3d8[_0xe6ab('0x43')]['id']}},_0x4629ab={};_0x4629ab[_0xe6ab('0x2e')]=_[_0xe6ab('0x30')](db[_0xe6ab('0x2b')][_0xe6ab('0x2c')]);_0x4629ab[_0xe6ab('0x2f')]=_[_0xe6ab('0x30')](_0x3af3d8['query']);_0x4629ab[_0xe6ab('0x31')]=_[_0xe6ab('0x33')](_0x4629ab['model'],_0x4629ab[_0xe6ab('0x2f')]);_0x1e490a['attributes']=_[_0xe6ab('0x33')](_0x4629ab[_0xe6ab('0x2e')],qs[_0xe6ab('0x34')](_0x3af3d8['query']['fields']));_0x1e490a[_0xe6ab('0x32')]=_0x1e490a[_0xe6ab('0x32')][_0xe6ab('0x35')]?_0x1e490a['attributes']:_0x4629ab[_0xe6ab('0x2e')];if(_0x3af3d8[_0xe6ab('0x2f')][_0xe6ab('0x3f')]){_0x1e490a[_0xe6ab('0x44')]=[{'all':!![]}];}_0x1e490a=_[_0xe6ab('0x3e')]({},_0x1e490a,_0x3af3d8[_0xe6ab('0x45')]);return db[_0xe6ab('0x2b')][_0xe6ab('0x46')](_0x1e490a)['then'](handleEntityNotFound(_0x40d22f,null))[_0xe6ab('0x25')](respondWithResult(_0x40d22f,null))['catch'](handleError(_0x40d22f,null));};exports[_0xe6ab('0x47')]=function(_0x314383,_0x5f5066){return db[_0xe6ab('0x2b')][_0xe6ab('0x47')](_0x314383[_0xe6ab('0x48')],{})[_0xe6ab('0x25')](respondWithResult(_0x5f5066,0xc9))['catch'](handleError(_0x5f5066,null));};exports['update']=function(_0x5c77f9,_0x5d03eb){if(_0x5c77f9[_0xe6ab('0x48')]['id']){delete _0x5c77f9['body']['id'];}return db[_0xe6ab('0x2b')][_0xe6ab('0x46')]({'where':{'id':_0x5c77f9[_0xe6ab('0x43')]['id']}})[_0xe6ab('0x25')](handleEntityNotFound(_0x5d03eb,null))[_0xe6ab('0x25')](saveUpdates(_0x5c77f9[_0xe6ab('0x48')],null))['then'](respondWithResult(_0x5d03eb,null))[_0xe6ab('0x41')](handleError(_0x5d03eb,null));};exports[_0xe6ab('0x26')]=function(_0x464370,_0x258417){return db[_0xe6ab('0x2b')][_0xe6ab('0x46')]({'where':{'id':_0x464370[_0xe6ab('0x43')]['id']}})[_0xe6ab('0x25')](handleEntityNotFound(_0x258417,null))[_0xe6ab('0x25')](removeEntity(_0x258417,null))[_0xe6ab('0x41')](handleError(_0x258417,null));}; \ No newline at end of file diff --git a/server/api/voiceQueuesLog/voiceQueuesLog.model.js b/server/api/voiceQueuesLog/voiceQueuesLog.model.js index a31582b..e4f3d29 100644 --- a/server/api/voiceQueuesLog/voiceQueuesLog.model.js +++ b/server/api/voiceQueuesLog/voiceQueuesLog.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf555=['bluebird','request-promise','path','../../config/environment','./voiceQueuesLog.attributes','define','VoiceQueuesLog','voice_queues_log','event_dtm','event','dtm','lodash','util','api'];(function(_0x3e80d3,_0x4188cc){var _0x4d5330=function(_0x26dac3){while(--_0x26dac3){_0x3e80d3['push'](_0x3e80d3['shift']());}};_0x4d5330(++_0x4188cc);}(_0xf555,0x97));var _0x5f55=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xf555[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x5f55('0x0'));var util=require(_0x5f55('0x1'));var logger=require('../../config/logger')(_0x5f55('0x2'));var moment=require('moment');var BPromise=require(_0x5f55('0x3'));var rp=require(_0x5f55('0x4'));var fs=require('fs');var path=require(_0x5f55('0x5'));var rimraf=require('rimraf');var config=require(_0x5f55('0x6'));var attributes=require(_0x5f55('0x7'));module['exports']=function(_0x2c6a58,_0x113537){return _0x2c6a58[_0x5f55('0x8')](_0x5f55('0x9'),attributes,{'tableName':_0x5f55('0xa'),'paranoid':![],'indexes':[{'name':_0x5f55('0xb'),'fields':[_0x5f55('0xc'),_0x5f55('0xd')]}],'timestamps':![]});}; \ No newline at end of file +var _0x77a4=['event_dtm','event','dtm','lodash','util','../../config/logger','bluebird','rimraf','../../config/environment','exports','define','VoiceQueuesLog','voice_queues_log'];(function(_0x573f83,_0x3aefb0){var _0x49d94c=function(_0xbe1f3a){while(--_0xbe1f3a){_0x573f83['push'](_0x573f83['shift']());}};_0x49d94c(++_0x3aefb0);}(_0x77a4,0x155));var _0x477a=function(_0x3e0dc4,_0x13971b){_0x3e0dc4=_0x3e0dc4-0x0;var _0x586111=_0x77a4[_0x3e0dc4];return _0x586111;};'use strict';var _=require(_0x477a('0x0'));var util=require(_0x477a('0x1'));var logger=require(_0x477a('0x2'))('api');var moment=require('moment');var BPromise=require(_0x477a('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x477a('0x4'));var config=require(_0x477a('0x5'));var attributes=require('./voiceQueuesLog.attributes');module[_0x477a('0x6')]=function(_0x4ca293,_0x4318b5){return _0x4ca293[_0x477a('0x7')](_0x477a('0x8'),attributes,{'tableName':_0x477a('0x9'),'paranoid':![],'indexes':[{'name':_0x477a('0xa'),'fields':[_0x477a('0xb'),_0x477a('0xc')]}],'timestamps':![]});}; \ No newline at end of file diff --git a/server/api/voiceQueuesLog/voiceQueuesLog.rpc.js b/server/api/voiceQueuesLog/voiceQueuesLog.rpc.js index 2ba4485..54944d8 100644 --- a/server/api/voiceQueuesLog/voiceQueuesLog.rpc.js +++ b/server/api/voiceQueuesLog/voiceQueuesLog.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xac52=['ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','request','then','info','VoiceQueuesLog,\x20%s,\x20%s','request\x20sent','VoiceQueuesLog,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','util','moment','bluebird','randomstring'];(function(_0x920850,_0x13745c){var _0x248f0e=function(_0x1606cd){while(--_0x1606cd){_0x920850['push'](_0x920850['shift']());}};_0x248f0e(++_0x13745c);}(_0xac52,0x122));var _0x2ac5=function(_0x1da04e,_0x31024b){_0x1da04e=_0x1da04e-0x0;var _0xdd8c41=_0xac52[_0x1da04e];return _0xdd8c41;};'use strict';var _=require('lodash');var util=require(_0x2ac5('0x0'));var moment=require(_0x2ac5('0x1'));var BPromise=require(_0x2ac5('0x2'));var rs=require(_0x2ac5('0x3'));var fs=require('fs');var Redis=require(_0x2ac5('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x2ac5('0x5'));var logger=require(_0x2ac5('0x6'))('rpc');var config=require(_0x2ac5('0x7'));var jayson=require(_0x2ac5('0x8'));var client=jayson[_0x2ac5('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x54a8ed,_0x433d88,_0x197aed){return new BPromise(function(_0x1ff724,_0x3fc8b5){return client[_0x2ac5('0xa')](_0x54a8ed,_0x197aed)[_0x2ac5('0xb')](function(_0x22f28b){logger[_0x2ac5('0xc')](_0x2ac5('0xd'),_0x433d88,_0x2ac5('0xe'));logger['debug'](_0x2ac5('0xf'),_0x433d88,_0x2ac5('0xe'),JSON[_0x2ac5('0x10')](_0x22f28b));if(_0x22f28b[_0x2ac5('0x11')]){if(_0x22f28b['error']['code']===0x1f4){logger['error'](_0x2ac5('0xd'),_0x433d88,_0x22f28b[_0x2ac5('0x11')][_0x2ac5('0x12')]);return _0x3fc8b5(_0x22f28b[_0x2ac5('0x11')][_0x2ac5('0x12')]);}logger['error'](_0x2ac5('0xd'),_0x433d88,_0x22f28b['error'][_0x2ac5('0x12')]);return _0x1ff724(_0x22f28b[_0x2ac5('0x11')][_0x2ac5('0x12')]);}else{logger['info']('VoiceQueuesLog,\x20%s,\x20%s',_0x433d88,_0x2ac5('0xe'));_0x1ff724(_0x22f28b[_0x2ac5('0x13')][_0x2ac5('0x12')]);}})[_0x2ac5('0x14')](function(_0x1741ce){logger[_0x2ac5('0x11')](_0x2ac5('0xd'),_0x433d88,_0x1741ce);_0x3fc8b5(_0x1741ce);});});} \ No newline at end of file +var _0xa1bb=['request\x20sent','VoiceQueuesLog,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','http','request','info','VoiceQueuesLog,\x20%s,\x20%s'];(function(_0xf95aed,_0x512d96){var _0x38c6bd=function(_0x4deb66){while(--_0x4deb66){_0xf95aed['push'](_0xf95aed['shift']());}};_0x38c6bd(++_0x512d96);}(_0xa1bb,0x9b));var _0xba1b=function(_0x466091,_0xcdc0f7){_0x466091=_0x466091-0x0;var _0xfc1ee0=_0xa1bb[_0x466091];return _0xfc1ee0;};'use strict';var _=require(_0xba1b('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xba1b('0x1'));var rs=require(_0xba1b('0x2'));var fs=require('fs');var Redis=require(_0xba1b('0x3'));var db=require(_0xba1b('0x4'))['db'];var utils=require(_0xba1b('0x5'));var logger=require(_0xba1b('0x6'))(_0xba1b('0x7'));var config=require(_0xba1b('0x8'));var jayson=require('jayson/promise');var client=jayson['client'][_0xba1b('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x5247d8,_0x5ce9d5,_0x26570d){return new BPromise(function(_0x5b49fe,_0x24661f){return client[_0xba1b('0xa')](_0x5247d8,_0x26570d)['then'](function(_0x4dbc9c){logger[_0xba1b('0xb')](_0xba1b('0xc'),_0x5ce9d5,_0xba1b('0xd'));logger['debug'](_0xba1b('0xe'),_0x5ce9d5,_0xba1b('0xd'),JSON[_0xba1b('0xf')](_0x4dbc9c));if(_0x4dbc9c[_0xba1b('0x10')]){if(_0x4dbc9c[_0xba1b('0x10')][_0xba1b('0x11')]===0x1f4){logger[_0xba1b('0x10')](_0xba1b('0xc'),_0x5ce9d5,_0x4dbc9c['error'][_0xba1b('0x12')]);return _0x24661f(_0x4dbc9c[_0xba1b('0x10')][_0xba1b('0x12')]);}logger[_0xba1b('0x10')](_0xba1b('0xc'),_0x5ce9d5,_0x4dbc9c[_0xba1b('0x10')][_0xba1b('0x12')]);return _0x5b49fe(_0x4dbc9c[_0xba1b('0x10')]['message']);}else{logger[_0xba1b('0xb')]('VoiceQueuesLog,\x20%s,\x20%s',_0x5ce9d5,_0xba1b('0xd'));_0x5b49fe(_0x4dbc9c[_0xba1b('0x13')][_0xba1b('0x12')]);}})[_0xba1b('0x14')](function(_0x3dbdb5){logger[_0xba1b('0x10')]('VoiceQueuesLog,\x20%s,\x20%s',_0x5ce9d5,_0x3dbdb5);_0x24661f(_0x3dbdb5);});});} \ No newline at end of file diff --git a/server/api/voiceRecording/index.js b/server/api/voiceRecording/index.js index 39ccab8..008070d 100644 --- a/server/api/voiceRecording/index.js +++ b/server/api/voiceRecording/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x09a9=['show','/:id/download','/:id/downloads','/:id/transcribe','downloadTranscribe','post','/:id','delete','destroy','multer','util','path','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceRecording.controller','get','isAuthenticated','index','/describe','describe'];(function(_0x576670,_0x530e08){var _0x4899f7=function(_0x237511){while(--_0x237511){_0x576670['push'](_0x576670['shift']());}};_0x4899f7(++_0x530e08);}(_0x09a9,0x65));var _0x909a=function(_0x32f7d7,_0x54231b){_0x32f7d7=_0x32f7d7-0x0;var _0x133d09=_0x09a9[_0x32f7d7];return _0x133d09;};'use strict';var multer=require(_0x909a('0x0'));var util=require(_0x909a('0x1'));var path=require(_0x909a('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x909a('0x3')]();var fs_extra=require(_0x909a('0x4'));var auth=require(_0x909a('0x5'));var interaction=require(_0x909a('0x6'));var config=require(_0x909a('0x7'));var controller=require(_0x909a('0x8'));router[_0x909a('0x9')]('/',auth[_0x909a('0xa')](),controller[_0x909a('0xb')]);router['get'](_0x909a('0xc'),auth['isAuthenticated'](),controller[_0x909a('0xd')]);router['get']('/:id',auth[_0x909a('0xa')](),controller[_0x909a('0xe')]);router['get'](_0x909a('0xf'),auth[_0x909a('0xa')](),controller['download']);router[_0x909a('0x9')](_0x909a('0x10'),controller['downloads']);router['get'](_0x909a('0x11'),auth[_0x909a('0xa')](),controller[_0x909a('0x12')]);router['post']('/',auth[_0x909a('0xa')](),controller['create']);router[_0x909a('0x13')](_0x909a('0x11'),auth[_0x909a('0xa')](),controller['runTranscribe']);router['put'](_0x909a('0x14'),auth['isAuthenticated'](),controller['update']);router[_0x909a('0x15')](_0x909a('0x14'),auth[_0x909a('0xa')](),controller[_0x909a('0x16')]);module['exports']=router; \ No newline at end of file +var _0x0a18=['./voiceRecording.controller','get','isAuthenticated','/describe','describe','/:id/downloads','downloads','/:id/transcribe','downloadTranscribe','post','create','put','/:id','update','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service'];(function(_0x28866c,_0x352d43){var _0x5ed3f1=function(_0x4c914d){while(--_0x4c914d){_0x28866c['push'](_0x28866c['shift']());}};_0x5ed3f1(++_0x352d43);}(_0x0a18,0x19d));var _0x80a1=function(_0x411017,_0x4a8117){_0x411017=_0x411017-0x0;var _0x2adeea=_0x0a18[_0x411017];return _0x2adeea;};'use strict';var multer=require(_0x80a1('0x0'));var util=require(_0x80a1('0x1'));var path=require(_0x80a1('0x2'));var timeout=require(_0x80a1('0x3'));var express=require(_0x80a1('0x4'));var router=express['Router']();var fs_extra=require(_0x80a1('0x5'));var auth=require(_0x80a1('0x6'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x80a1('0x7'));router[_0x80a1('0x8')]('/',auth[_0x80a1('0x9')](),controller['index']);router[_0x80a1('0x8')](_0x80a1('0xa'),auth['isAuthenticated'](),controller[_0x80a1('0xb')]);router[_0x80a1('0x8')]('/:id',auth['isAuthenticated'](),controller['show']);router[_0x80a1('0x8')]('/:id/download',auth[_0x80a1('0x9')](),controller['download']);router[_0x80a1('0x8')](_0x80a1('0xc'),controller[_0x80a1('0xd')]);router[_0x80a1('0x8')](_0x80a1('0xe'),auth[_0x80a1('0x9')](),controller[_0x80a1('0xf')]);router[_0x80a1('0x10')]('/',auth[_0x80a1('0x9')](),controller[_0x80a1('0x11')]);router[_0x80a1('0x10')](_0x80a1('0xe'),auth[_0x80a1('0x9')](),controller['runTranscribe']);router[_0x80a1('0x12')](_0x80a1('0x13'),auth[_0x80a1('0x9')](),controller[_0x80a1('0x14')]);router['delete'](_0x80a1('0x13'),auth['isAuthenticated'](),controller['destroy']);module['exports']=router; \ No newline at end of file diff --git a/server/api/voiceRecording/voiceRecording.attributes.js b/server/api/voiceRecording/voiceRecording.attributes.js index 272247c..1a70143 100644 --- a/server/api/voiceRecording/voiceRecording.attributes.js +++ b/server/api/voiceRecording/voiceRecording.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['DATE','updatedAt','toString','sequelize','moment','path','getDataValue','extname','value','STRING','setDataValue','channel','TEXT','NEW','FLOAT','BOOLEAN','format','MM-DD-YYYY\x20HH:mm'];(function(_0x7e2eb0,_0x17cd58){var _0xd92de4=function(_0x5d005b){while(--_0x5d005b){_0x7e2eb0['push'](_0x7e2eb0['shift']());}};_0xd92de4(++_0x17cd58);}(_0xa9e0,0x123));var _0x0a9e=function(_0x4bfac3,_0x58324d){_0x4bfac3=_0x4bfac3-0x0;var _0x15f0f2=_0xa9e0[_0x4bfac3];return _0x15f0f2;};'use strict';var Sequelize=require(_0x0a9e('0x0'));var moment=require(_0x0a9e('0x1'));var path=require(_0x0a9e('0x2'));module['exports']={'format':{'type':Sequelize['VIRTUAL'],'get':function(){return this[_0x0a9e('0x3')]('value')?path[_0x0a9e('0x4')](this[_0x0a9e('0x3')](_0x0a9e('0x5'))):undefined;}},'uniqueid':{'type':Sequelize[_0x0a9e('0x6')]},'channel':{'type':Sequelize[_0x0a9e('0x6')],'set':function(_0x57b080){if(_0x57b080){this[_0x0a9e('0x7')](_0x0a9e('0x8'),_0x57b080);this[_0x0a9e('0x7')]('membername',_0x57b080['split'](/\/|-/)[0x1]);}}},'membername':{'type':Sequelize[_0x0a9e('0x6')]},'calleridnum':{'type':Sequelize['STRING']},'calleridname':{'type':Sequelize['STRING']},'connectedlinenum':{'type':Sequelize[_0x0a9e('0x6')]},'connectedlinename':{'type':Sequelize[_0x0a9e('0x6')]},'accountcode':{'type':Sequelize[_0x0a9e('0x6')]},'context':{'type':Sequelize[_0x0a9e('0x6')]},'exten':{'type':Sequelize[_0x0a9e('0x6')]},'value':{'type':Sequelize[_0x0a9e('0x6')]},'type':{'type':Sequelize['STRING']},'rating':{'type':Sequelize['INTEGER'],'validate':{'max':0x5,'min':0x0}},'queue':{'type':Sequelize['STRING']},'userDisposition':{'type':Sequelize['STRING']},'userSecondDisposition':{'type':Sequelize[_0x0a9e('0x6')]},'userThirdDisposition':{'type':Sequelize[_0x0a9e('0x6')]},'location':{'type':Sequelize[_0x0a9e('0x9')]},'transcribeName':{'type':Sequelize[_0x0a9e('0x6')]},'transcribeStatus':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':_0x0a9e('0xa')},'fileUri':{'type':Sequelize['TEXT']},'fileText':{'type':Sequelize[_0x0a9e('0x9')]},'failureReason':{'type':Sequelize[_0x0a9e('0x9')]},'sentiment':{'type':Sequelize[_0x0a9e('0x6')]},'sPositive':{'type':Sequelize[_0x0a9e('0xb')]},'sNegative':{'type':Sequelize[_0x0a9e('0xb')]},'sNeutral':{'type':Sequelize[_0x0a9e('0xb')]},'sMixed':{'type':Sequelize['FLOAT']},'tempSentiment':{'type':Sequelize[_0x0a9e('0xc')],'defaultValue':![]},'createdAt':{'type':Sequelize['DATE'],'get':function(){return moment(this[_0x0a9e('0x3')]('createdAt'))[_0x0a9e('0xd')](_0x0a9e('0xe'))['toString']();}},'updatedAt':{'type':Sequelize[_0x0a9e('0xf')],'get':function(){return moment(this['getDataValue'](_0x0a9e('0x10')))[_0x0a9e('0xd')](_0x0a9e('0xe'))[_0x0a9e('0x11')]();}}}; \ No newline at end of file +var _0xa9e0=['DATE','updatedAt','toString','sequelize','moment','path','getDataValue','extname','value','STRING','setDataValue','channel','TEXT','NEW','FLOAT','BOOLEAN','format','MM-DD-YYYY\x20HH:mm'];(function(_0x3ab9ee,_0x4a74b8){var _0x82ee88=function(_0x6ccc7e){while(--_0x6ccc7e){_0x3ab9ee['push'](_0x3ab9ee['shift']());}};_0x82ee88(++_0x4a74b8);}(_0xa9e0,0x123));var _0x0a9e=function(_0x5ddb1c,_0x5ea4df){_0x5ddb1c=_0x5ddb1c-0x0;var _0x354adc=_0xa9e0[_0x5ddb1c];return _0x354adc;};'use strict';var Sequelize=require(_0x0a9e('0x0'));var moment=require(_0x0a9e('0x1'));var path=require(_0x0a9e('0x2'));module['exports']={'format':{'type':Sequelize['VIRTUAL'],'get':function(){return this[_0x0a9e('0x3')]('value')?path[_0x0a9e('0x4')](this[_0x0a9e('0x3')](_0x0a9e('0x5'))):undefined;}},'uniqueid':{'type':Sequelize[_0x0a9e('0x6')]},'channel':{'type':Sequelize[_0x0a9e('0x6')],'set':function(_0x57b080){if(_0x57b080){this[_0x0a9e('0x7')](_0x0a9e('0x8'),_0x57b080);this[_0x0a9e('0x7')]('membername',_0x57b080['split'](/\/|-/)[0x1]);}}},'membername':{'type':Sequelize[_0x0a9e('0x6')]},'calleridnum':{'type':Sequelize['STRING']},'calleridname':{'type':Sequelize['STRING']},'connectedlinenum':{'type':Sequelize[_0x0a9e('0x6')]},'connectedlinename':{'type':Sequelize[_0x0a9e('0x6')]},'accountcode':{'type':Sequelize[_0x0a9e('0x6')]},'context':{'type':Sequelize[_0x0a9e('0x6')]},'exten':{'type':Sequelize[_0x0a9e('0x6')]},'value':{'type':Sequelize[_0x0a9e('0x6')]},'type':{'type':Sequelize['STRING']},'rating':{'type':Sequelize['INTEGER'],'validate':{'max':0x5,'min':0x0}},'queue':{'type':Sequelize['STRING']},'userDisposition':{'type':Sequelize['STRING']},'userSecondDisposition':{'type':Sequelize[_0x0a9e('0x6')]},'userThirdDisposition':{'type':Sequelize[_0x0a9e('0x6')]},'location':{'type':Sequelize[_0x0a9e('0x9')]},'transcribeName':{'type':Sequelize[_0x0a9e('0x6')]},'transcribeStatus':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':_0x0a9e('0xa')},'fileUri':{'type':Sequelize['TEXT']},'fileText':{'type':Sequelize[_0x0a9e('0x9')]},'failureReason':{'type':Sequelize[_0x0a9e('0x9')]},'sentiment':{'type':Sequelize[_0x0a9e('0x6')]},'sPositive':{'type':Sequelize[_0x0a9e('0xb')]},'sNegative':{'type':Sequelize[_0x0a9e('0xb')]},'sNeutral':{'type':Sequelize[_0x0a9e('0xb')]},'sMixed':{'type':Sequelize['FLOAT']},'tempSentiment':{'type':Sequelize[_0x0a9e('0xc')],'defaultValue':![]},'createdAt':{'type':Sequelize['DATE'],'get':function(){return moment(this[_0x0a9e('0x3')]('createdAt'))[_0x0a9e('0xd')](_0x0a9e('0xe'))['toString']();}},'updatedAt':{'type':Sequelize[_0x0a9e('0xf')],'get':function(){return moment(this['getDataValue'](_0x0a9e('0x10')))[_0x0a9e('0xd')](_0x0a9e('0xe'))[_0x0a9e('0x11')]();}}}; \ No newline at end of file diff --git a/server/api/voiceRecording/voiceRecording.controller.js b/server/api/voiceRecording/voiceRecording.controller.js index d8f9a4f..c078fb5 100644 --- a/server/api/voiceRecording/voiceRecording.controller.js +++ b/server/api/voiceRecording/voiceRecording.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xca61=['listBuckets','createBucket','upload','TranscribeService','startTranscriptionJob','[RUNTRANSCRIPT][%d]\x20Starting\x20voice\x20recording\x20upload\x20in\x20bucket\x20%s','basename','readFileSync','[RUNTRANSCRIPT][%d]\x20Voice\x20recording\x20uploaded\x20in\x20bucket\x20%s\x20(%s)','Location','bucket','Bucket','[RUNTRANSCRIPT][%d]\x20Sending\x20transcribe\x20request','[RUNTRANSCRIPT][%d]\x20Transcription\x20job\x20%s\x20created','transcribeName','transcribeStatus','TranscriptionJob','TranscriptionJobStatus','runTranscribe','findOne','Voice\x20Recording\x20not\x20found','Setting','transcribe','transcribeAccountId','transcribeRegion','language','sentiment','sentimentAccountId','sentimentRegion','CloudProvider','Cloud\x20Provider\x20not\x20available','data1','data2','Buckets','[RUNTRANSCRIPT][%d]\x20Bucket\x20%s\x20not\x20available','[RUNTRANSCRIPT][%d]\x20Bucket\x20%s\x20available','NEW','IN_PROGRESS','tempSentiment','runSentiment','updateAttributes','writeFile','downloadTranscribe','fileText','root','/server/files/transcribes/transcribe_','.txt','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','sox','ejs','fs-extra','lodash','squel','desk.js','to-csv','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','status','end','json','offset','undefined','count','limit','set','Content-Range','destroy','then','stack','name','send','index','map','VoiceRecording','rawAttributes','fieldName','type','model','differenceBy','keys','query','filters','attributes','intersection','fields','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','include','findAll','catch','find','create','body','params','describe','download','../../components/encryptor','uniqueid','value','format','%s.cypher','existsSync','decryptFile','secrets','recording','ValidationError','VoiceRecording\x20not\x20found','unlink','message','downloads','sequelize','col','token','$and','push','Sequelize','filename','extname','isNil','info','cancellazione\x20fisica\x20documento\x20%s','\x22\x20trovato\x20eseguo\x20la\x20cancellazione','unlinkSync','.cypher'];(function(_0x3838a4,_0x2ae1e6){var _0x3c56b4=function(_0x4cbf64){while(--_0x4cbf64){_0x3838a4['push'](_0x3838a4['shift']());}};_0x3c56b4(++_0x2ae1e6);}(_0xca61,0x1f1));var _0x1ca6=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xca61[_0x20a584];return _0x4b41a8;};'use strict';var emlformat=require(_0x1ca6('0x0'));var rimraf=require(_0x1ca6('0x1'));var zipdir=require(_0x1ca6('0x2'));var jsonpatch=require(_0x1ca6('0x3'));var rp=require(_0x1ca6('0x4'));var moment=require(_0x1ca6('0x5'));var BPromise=require(_0x1ca6('0x6'));var Mustache=require(_0x1ca6('0x7'));var util=require('util');var path=require('path');var sox=require(_0x1ca6('0x8'));var csv=require('to-csv');var ejs=require(_0x1ca6('0x9'));var fs=require('fs');var fs_extra=require(_0x1ca6('0xa'));var _=require(_0x1ca6('0xb'));var squel=require(_0x1ca6('0xc'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x1ca6('0xd'));var toCsv=require(_0x1ca6('0xe'));var querystring=require(_0x1ca6('0xf'));var Papa=require(_0x1ca6('0x10'));var AWS=require('aws-sdk');var uuidv4=require('uuid/v4');var Redis=require('ioredis');var authService=require(_0x1ca6('0x11'));var qs=require(_0x1ca6('0x12'));var as=require(_0x1ca6('0x13'));var hardwareService=require(_0x1ca6('0x14'));var logger=require(_0x1ca6('0x15'))(_0x1ca6('0x16'));var utils=require(_0x1ca6('0x17'));var config=require(_0x1ca6('0x18'));var licenseUtil=require(_0x1ca6('0x19'));var db=require(_0x1ca6('0x1a'))['db'];function respondWithStatusCode(_0x3e29f6,_0x1e65e0){_0x1e65e0=_0x1e65e0||0xcc;return function(_0xb8f0cb){if(_0xb8f0cb){return _0x3e29f6[_0x1ca6('0x1b')](_0x1e65e0);}return _0x3e29f6[_0x1ca6('0x1c')](_0x1e65e0)[_0x1ca6('0x1d')]();};}function respondWithResult(_0x2e55d2,_0x32afbb){_0x32afbb=_0x32afbb||0xc8;return function(_0x416cb4){if(_0x416cb4){return _0x2e55d2[_0x1ca6('0x1c')](_0x32afbb)[_0x1ca6('0x1e')](_0x416cb4);}};}function respondWithFilteredResult(_0x455fa3,_0x307a4d){return function(_0x16b200){if(_0x16b200){var _0x19cb62=typeof _0x307a4d[_0x1ca6('0x1f')]===_0x1ca6('0x20')&&typeof _0x307a4d['limit']===_0x1ca6('0x20');var _0xeb5ce4=_0x16b200[_0x1ca6('0x21')];var _0xad6b08=_0x19cb62?0x0:_0x307a4d[_0x1ca6('0x1f')];var _0x1c7e8a=_0x19cb62?_0x16b200['count']:_0x307a4d[_0x1ca6('0x1f')]+_0x307a4d[_0x1ca6('0x22')];var _0x317282;if(_0x1c7e8a>=_0xeb5ce4){_0x1c7e8a=_0xeb5ce4;_0x317282=0xc8;}else{_0x317282=0xce;}_0x455fa3[_0x1ca6('0x1c')](_0x317282);return _0x455fa3[_0x1ca6('0x23')](_0x1ca6('0x24'),_0xad6b08+'-'+_0x1c7e8a+'/'+_0xeb5ce4)[_0x1ca6('0x1e')](_0x16b200);}return null;};}function patchUpdates(_0xdab40e){return function(_0x213f59){try{jsonpatch['apply'](_0x213f59,_0xdab40e,!![]);}catch(_0x4f2406){return BPromise['reject'](_0x4f2406);}return _0x213f59['save']();};}function saveUpdates(_0x29dbfe,_0x1edb9d){return function(_0xc342ec){if(_0xc342ec){return _0xc342ec['update'](_0x29dbfe)['then'](function(_0x3c9393){return _0x3c9393;});}return null;};}function removeEntity(_0x53b9b7,_0x5f559f){return function(_0x336e91){if(_0x336e91){return _0x336e91[_0x1ca6('0x25')]()[_0x1ca6('0x26')](function(){_0x53b9b7[_0x1ca6('0x1c')](0xcc)['end']();});}};}function handleEntityNotFound(_0x23588b,_0x374890){return function(_0x3129c3){if(!_0x3129c3){_0x23588b[_0x1ca6('0x1b')](0x194);}return _0x3129c3;};}function handleError(_0x236fea,_0x2a3501){_0x2a3501=_0x2a3501||0x1f4;return function(_0x2a74a3){logger['error'](_0x2a74a3[_0x1ca6('0x27')]);if(_0x2a74a3[_0x1ca6('0x28')]){delete _0x2a74a3[_0x1ca6('0x28')];}_0x236fea['status'](_0x2a3501)[_0x1ca6('0x29')](_0x2a74a3);};}exports[_0x1ca6('0x2a')]=function(_0x2af61c,_0x2728c4){var _0x482811={},_0x5b3e3d={},_0x28c0ef={'count':0x0,'rows':[]};var _0x3b2b88=_[_0x1ca6('0x2b')](db[_0x1ca6('0x2c')][_0x1ca6('0x2d')],function(_0x27b6cc){return{'name':_0x27b6cc[_0x1ca6('0x2e')],'type':_0x27b6cc[_0x1ca6('0x2f')]['key']};});_0x5b3e3d[_0x1ca6('0x30')]=_[_0x1ca6('0x31')](_[_0x1ca6('0x2b')](_0x3b2b88,_0x1ca6('0x28')),['format']);_0x5b3e3d['query']=_[_0x1ca6('0x32')](_0x2af61c[_0x1ca6('0x33')]);_0x5b3e3d[_0x1ca6('0x34')]=_['intersection'](_0x5b3e3d[_0x1ca6('0x30')],_0x5b3e3d[_0x1ca6('0x33')]);_0x482811[_0x1ca6('0x35')]=_[_0x1ca6('0x36')](_0x5b3e3d[_0x1ca6('0x30')],qs['fields'](_0x2af61c['query'][_0x1ca6('0x37')]));_0x482811['attributes']=_0x482811[_0x1ca6('0x35')]['length']?_0x482811[_0x1ca6('0x35')]:_0x5b3e3d[_0x1ca6('0x30')];if(!_0x2af61c[_0x1ca6('0x33')][_0x1ca6('0x38')](_0x1ca6('0x39'))){_0x482811[_0x1ca6('0x22')]=qs[_0x1ca6('0x22')](_0x2af61c[_0x1ca6('0x33')][_0x1ca6('0x22')]);_0x482811[_0x1ca6('0x1f')]=qs[_0x1ca6('0x1f')](_0x2af61c[_0x1ca6('0x33')][_0x1ca6('0x1f')]);}_0x482811[_0x1ca6('0x3a')]=qs[_0x1ca6('0x3b')](_0x2af61c[_0x1ca6('0x33')]['sort']);_0x482811[_0x1ca6('0x3c')]=qs['filters'](_[_0x1ca6('0x3d')](_0x2af61c[_0x1ca6('0x33')],_0x5b3e3d[_0x1ca6('0x34')]),_0x3b2b88);if(_0x2af61c[_0x1ca6('0x33')][_0x1ca6('0x3e')]){_0x482811['where']=_[_0x1ca6('0x3f')](_0x482811[_0x1ca6('0x3c')],{'$or':_[_0x1ca6('0x2b')](_0x3b2b88,function(_0x204dae){if(_0x204dae[_0x1ca6('0x2f')]!==_0x1ca6('0x40')){var _0x16c4db={};_0x16c4db[_0x204dae[_0x1ca6('0x28')]]={'$like':'%'+_0x2af61c['query'][_0x1ca6('0x3e')]+'%'};return _0x16c4db;}})});}_0x482811=_[_0x1ca6('0x3f')]({},_0x482811,_0x2af61c[_0x1ca6('0x41')]);var _0x21bb8a={'where':_0x482811[_0x1ca6('0x3c')]};return db[_0x1ca6('0x2c')][_0x1ca6('0x21')](_0x21bb8a)['then'](function(_0x31a589){_0x28c0ef[_0x1ca6('0x21')]=_0x31a589;if(_0x2af61c[_0x1ca6('0x33')]['includeAll']){_0x482811[_0x1ca6('0x42')]=[{'all':!![]}];}return db[_0x1ca6('0x2c')][_0x1ca6('0x43')](_0x482811);})[_0x1ca6('0x26')](function(_0x4ba503){_0x28c0ef['rows']=_0x4ba503;return _0x28c0ef;})[_0x1ca6('0x26')](respondWithFilteredResult(_0x2728c4,_0x482811))[_0x1ca6('0x44')](handleError(_0x2728c4,null));};exports['show']=function(_0x3f7fd9,_0x54e5a5){var _0x2a2b5b={'raw':![],'where':{'id':_0x3f7fd9['params']['id']}},_0x25a39a={};_0x25a39a[_0x1ca6('0x30')]=_[_0x1ca6('0x32')](db[_0x1ca6('0x2c')]['rawAttributes']);_0x25a39a[_0x1ca6('0x33')]=_['keys'](_0x3f7fd9[_0x1ca6('0x33')]);_0x25a39a[_0x1ca6('0x34')]=_['intersection'](_0x25a39a[_0x1ca6('0x30')],_0x25a39a[_0x1ca6('0x33')]);_0x2a2b5b[_0x1ca6('0x35')]=_[_0x1ca6('0x36')](_0x25a39a[_0x1ca6('0x30')],qs[_0x1ca6('0x37')](_0x3f7fd9[_0x1ca6('0x33')][_0x1ca6('0x37')]));_0x2a2b5b[_0x1ca6('0x35')]=_0x2a2b5b[_0x1ca6('0x35')]['length']?_0x2a2b5b[_0x1ca6('0x35')]:_0x25a39a[_0x1ca6('0x30')];if(_0x3f7fd9[_0x1ca6('0x33')]['includeAll']){_0x2a2b5b[_0x1ca6('0x42')]=[{'all':!![]}];}_0x2a2b5b=_[_0x1ca6('0x3f')]({},_0x2a2b5b,_0x3f7fd9[_0x1ca6('0x41')]);return db['VoiceRecording'][_0x1ca6('0x45')](_0x2a2b5b)[_0x1ca6('0x26')](handleEntityNotFound(_0x54e5a5,null))[_0x1ca6('0x26')](respondWithResult(_0x54e5a5,null))[_0x1ca6('0x44')](handleError(_0x54e5a5,null));};exports['create']=function(_0x409fa1,_0x2b2fdf){return db[_0x1ca6('0x2c')][_0x1ca6('0x46')](_0x409fa1[_0x1ca6('0x47')],{})['then'](respondWithResult(_0x2b2fdf,0xc9))[_0x1ca6('0x44')](handleError(_0x2b2fdf,null));};exports['update']=function(_0x9054fd,_0xfa517e){if(_0x9054fd[_0x1ca6('0x47')]['id']){delete _0x9054fd[_0x1ca6('0x47')]['id'];}return db['VoiceRecording'][_0x1ca6('0x45')]({'where':{'id':_0x9054fd[_0x1ca6('0x48')]['id']}})['then'](handleEntityNotFound(_0xfa517e,null))[_0x1ca6('0x26')](saveUpdates(_0x9054fd[_0x1ca6('0x47')],null))[_0x1ca6('0x26')](respondWithResult(_0xfa517e,null))[_0x1ca6('0x44')](handleError(_0xfa517e,null));};exports[_0x1ca6('0x49')]=function(_0x298d84,_0x34892a){return db[_0x1ca6('0x2c')][_0x1ca6('0x49')]()[_0x1ca6('0x26')](respondWithResult(_0x34892a,null))[_0x1ca6('0x44')](handleError(_0x34892a,null));};exports[_0x1ca6('0x4a')]=function(_0x24949e,_0x439260,_0x4a3c76){var _0x3f5a58=require(_0x1ca6('0x4b'));var _0x6e5185=![];var _0x380c99={};if(_0x24949e[_0x1ca6('0x33')][_0x1ca6('0x2f')]&&_0x24949e[_0x1ca6('0x33')][_0x1ca6('0x2f')]===_0x1ca6('0x4c')){_0x380c99['uniqueid']=_0x24949e[_0x1ca6('0x48')]['id'];}else{_0x380c99['id']=_0x24949e[_0x1ca6('0x48')]['id'];}return db['VoiceRecording'][_0x1ca6('0x45')]({'where':_0x380c99,'attributes':['id',_0x1ca6('0x4d')],'raw':!![]})[_0x1ca6('0x26')](handleEntityNotFound(_0x439260,null))[_0x1ca6('0x26')](function(_0x7550e2){if(_0x7550e2){var _0x10a762=_0x7550e2[_0x1ca6('0x4d')];var _0x2f36f5=util[_0x1ca6('0x4e')](_0x1ca6('0x4f'),_0x10a762);if(fs[_0x1ca6('0x50')](_0x2f36f5)){_0x6e5185=!![];return _0x3f5a58[_0x1ca6('0x51')](_0x2f36f5,_0x10a762,config[_0x1ca6('0x52')][_0x1ca6('0x53')])[_0x1ca6('0x26')](function(){return _0x7550e2;});}return _0x7550e2;}})[_0x1ca6('0x26')](function(_0x3d2158){if(_0x3d2158){var _0x5a4a4f=_0x3d2158[_0x1ca6('0x4d')];if(!fs[_0x1ca6('0x50')](_0x5a4a4f)){throw new db['Sequelize'][(_0x1ca6('0x54'))](_0x1ca6('0x55'));}if(_0x3d2158['filename']){return _0x439260['download'](_0x5a4a4f,_0x3d2158['filename']+path['extname'](_0x5a4a4f),function(){if(_0x6e5185){fs[_0x1ca6('0x56')](_0x5a4a4f);}});}else{return _0x439260[_0x1ca6('0x4a')](_0x5a4a4f,function(_0x3a8d05){if(_0x6e5185){fs[_0x1ca6('0x56')](_0x5a4a4f);}});}}})[_0x1ca6('0x44')](function(_0x18b333){if(_0x18b333[_0x1ca6('0x57')]==='VoiceRecording\x20not\x20found'){_0x439260[_0x1ca6('0x1c')](0x194)[_0x1ca6('0x29')]('Not\x20found');}else{return handleError(_0x439260,null);}});};exports[_0x1ca6('0x58')]=function(_0x144458,_0x4a3ad6,_0x52cda4){var _0x46a8bb=require(_0x1ca6('0x4b'));var _0x4ea1f2=![];var _0x56c257={'$and':[db[_0x1ca6('0x59')][_0x1ca6('0x3c')](db[_0x1ca6('0x59')]['fn']('MD5',db['sequelize'][_0x1ca6('0x5a')](_0x1ca6('0x4c'))),_0x144458[_0x1ca6('0x33')][_0x1ca6('0x5b')])]};if(_0x144458[_0x1ca6('0x33')][_0x1ca6('0x2f')]&&_0x144458['query'][_0x1ca6('0x2f')]==='uniqueid'){_0x56c257[_0x1ca6('0x5c')]['push']({'uniqueid':_0x144458[_0x1ca6('0x48')]['id']});}else{_0x56c257['$and'][_0x1ca6('0x5d')]({'id':_0x144458['params']['id']});}return db[_0x1ca6('0x2c')][_0x1ca6('0x45')]({'where':_0x56c257,'attributes':['id',_0x1ca6('0x4d')],'raw':!![]})[_0x1ca6('0x26')](handleEntityNotFound(_0x4a3ad6,null))[_0x1ca6('0x26')](function(_0x27cea9){if(_0x27cea9){var _0x4f5866=util[_0x1ca6('0x4e')]('%s.cypher',_0x27cea9[_0x1ca6('0x4d')]);if(fs[_0x1ca6('0x50')](_0x4f5866)){_0x4ea1f2=!![];return _0x46a8bb['decryptFile'](_0x4f5866,_0x27cea9[_0x1ca6('0x4d')],config[_0x1ca6('0x52')][_0x1ca6('0x53')])[_0x1ca6('0x26')](function(){return _0x27cea9;});}return _0x27cea9;}})['then'](function(_0x357143){if(_0x357143){if(!fs[_0x1ca6('0x50')](_0x357143['value'])){throw new db[(_0x1ca6('0x5e'))][(_0x1ca6('0x54'))](_0x1ca6('0x55'));}if(_0x357143[_0x1ca6('0x5f')]){return _0x4a3ad6[_0x1ca6('0x4a')](_0x357143[_0x1ca6('0x4d')],_0x357143['filename']+path[_0x1ca6('0x60')](_0x357143[_0x1ca6('0x4d')]),function(){if(_0x4ea1f2){fs[_0x1ca6('0x56')](_0x357143['value']);}});}else{return _0x4a3ad6[_0x1ca6('0x4a')](_0x357143[_0x1ca6('0x4d')],function(_0x4f81ab){if(_0x4ea1f2){fs[_0x1ca6('0x56')](_0x357143['value']);}});}}})[_0x1ca6('0x44')](handleError(_0x4a3ad6,null));};exports[_0x1ca6('0x25')]=function(_0x1db22d,_0x4f489f){return db[_0x1ca6('0x2c')][_0x1ca6('0x45')]({'where':{'id':_0x1db22d['params']['id']}})[_0x1ca6('0x26')](function(_0x31ebf0){if(_[_0x1ca6('0x61')](_0x31ebf0)){throw new ReferenceError('Entity\x20not\x20found');}return _0x31ebf0;})['then'](function(_0x43de27){var _0x3fa969=_0x43de27[_0x1ca6('0x4d')];logger[_0x1ca6('0x62')](_0x1ca6('0x63'),_0x3fa969);if(!_[_0x1ca6('0x61')](_0x43de27['value'])&&fs['existsSync'](_0x3fa969)){logger['info']('File:\x20\x22'+_0x3fa969+_0x1ca6('0x64'));fs[_0x1ca6('0x65')](_0x3fa969);}_0x3fa969=_0x3fa969+_0x1ca6('0x66');if(!_['isNil'](_0x43de27[_0x1ca6('0x4d')])&&fs[_0x1ca6('0x50')](_0x3fa969)){logger[_0x1ca6('0x62')]('File:\x20\x22'+_0x3fa969+_0x1ca6('0x64'));fs['unlinkSync'](_0x3fa969);}return _0x43de27;})[_0x1ca6('0x26')](function(_0x5ded1b){if(!_0x5ded1b)throw new InternalError();return _0x5ded1b[_0x1ca6('0x25')]();})[_0x1ca6('0x26')](function(){_0x4f489f['status'](0xcc)[_0x1ca6('0x1d')]();})[_0x1ca6('0x44')](handleError(_0x4f489f,null));};function getBucketslist(_0x52a196,_0x509bb1,_0x2c39e4){return new Promise(function(_0x30f173,_0x3b90c0){var _0x205a58=new AWS['S3']({'accessKeyId':_0x509bb1,'secretAccessKey':_0x52a196,'region':_0x2c39e4});_0x205a58[_0x1ca6('0x67')]({},function(_0x131b53,_0x48785c){if(_0x131b53){return _0x3b90c0(_0x131b53);}else{return _0x30f173(_0x48785c);}});});}function createBucket(_0x2246f2,_0x20a1f1,_0x4a7ab,_0x117d17){return new Promise(function(_0x223c62,_0x12a442){var _0x14baf2=new AWS['S3']({'accessKeyId':_0x20a1f1,'secretAccessKey':_0x2246f2,'region':_0x4a7ab});_0x14baf2[_0x1ca6('0x68')]({'Bucket':_0x117d17},function(_0x379123,_0x5de2ee){if(_0x379123){return _0x12a442(_0x379123);}else{return _0x223c62(_0x5de2ee);}});});}function uploadFile(_0x53a493,_0x2a2492,_0x4c4265,_0x56b305,_0x3079d5,_0xcac9b1){return new Promise(function(_0x498e1d,_0x36d57e){var _0x1e6386=new AWS['S3']({'accessKeyId':_0x2a2492,'secretAccessKey':_0x53a493,'region':_0x4c4265});_0x1e6386[_0x1ca6('0x69')]({'Bucket':_0x56b305,'Key':_0x3079d5,'Body':_0xcac9b1},function(_0x5b4cb9,_0x3e0d18){if(_0x5b4cb9){return _0x36d57e(_0x5b4cb9);}else{return _0x498e1d(_0x3e0d18);}});});}function startTranscribe(_0x4150f3,_0x4b8897,_0x3eba8c,_0x3beea1,_0x525b12,_0x4414b7){return new Promise(function(_0x4faa4c,_0x152e08){var _0x29f65a=new AWS[(_0x1ca6('0x6a'))]({'accessKeyId':_0x4b8897,'secretAccessKey':_0x4150f3,'region':_0x3eba8c});_0x29f65a[_0x1ca6('0x6b')]({'TranscriptionJobName':_0x3beea1,'LanguageCode':_0x525b12,'Media':{'MediaFileUri':_0x4414b7}},function(_0xf06561,_0x46198a){if(_0xf06561){return _0x152e08(_0xf06561);}else{return _0x4faa4c(_0x46198a);}});});}function transcribe(_0x2f348c,_0x48d49d,_0x3b1e01,_0x216451,_0x2ad85d,_0x1a593c,_0x3a021d){return new Promise(function(_0x59e00e,_0x286739){var _0x651398={};logger[_0x1ca6('0x62')](util[_0x1ca6('0x4e')](_0x1ca6('0x6c'),_0x2f348c,_0x2ad85d));return uploadFile(_0x48d49d,_0x3b1e01,_0x216451,_0x2ad85d,path[_0x1ca6('0x6d')](_0x1a593c),fs[_0x1ca6('0x6e')](_0x1a593c))[_0x1ca6('0x26')](function(_0x4e5088){logger[_0x1ca6('0x62')](util[_0x1ca6('0x4e')](_0x1ca6('0x6f'),_0x2f348c,_0x2ad85d,_0x4e5088[_0x1ca6('0x70')]));_0x651398[_0x1ca6('0x71')]=_0x4e5088[_0x1ca6('0x72')];_0x651398['location']=_0x4e5088[_0x1ca6('0x70')];logger[_0x1ca6('0x62')](util[_0x1ca6('0x4e')](_0x1ca6('0x73'),_0x2f348c));return startTranscribe(_0x48d49d,_0x3b1e01,_0x216451,uuidv4(),_0x3a021d,_0x4e5088[_0x1ca6('0x70')]);})['then'](function(_0x17a148){logger[_0x1ca6('0x62')](util[_0x1ca6('0x4e')](_0x1ca6('0x74'),_0x2f348c,_0x17a148['TranscriptionJob']['TranscriptionJobName']));_0x651398[_0x1ca6('0x75')]=_0x17a148['TranscriptionJob']['TranscriptionJobName'];_0x651398[_0x1ca6('0x76')]=_0x17a148[_0x1ca6('0x77')][_0x1ca6('0x78')];return _0x59e00e(_0x651398);})[_0x1ca6('0x44')](function(_0x487d05){return _0x286739(_0x487d05);});});}exports[_0x1ca6('0x79')]=function(_0x5746a1,_0x2dd5a5,_0x182056){var _0x121a18;var _0x272f76;var _0x563659;var _0x209c22=require(_0x1ca6('0x4b'));return db[_0x1ca6('0x2c')][_0x1ca6('0x7a')]({'where':{'id':_0x5746a1['params']['id']}})[_0x1ca6('0x26')](function(_0x4e8d74){if(_0x4e8d74){var _0x9e0046=util['format'](_0x1ca6('0x4f'),_0x4e8d74[_0x1ca6('0x4d')]);if(fs[_0x1ca6('0x50')](_0x9e0046)){cypher=!![];return _0x209c22[_0x1ca6('0x51')](_0x9e0046,_0x4e8d74['value'],config['secrets'][_0x1ca6('0x53')])[_0x1ca6('0x26')](function(){return _0x4e8d74;});}return _0x4e8d74;}})[_0x1ca6('0x26')](function(_0x7a2b61){if(!_0x7a2b61){throw new db[(_0x1ca6('0x5e'))][(_0x1ca6('0x54'))](_0x1ca6('0x7b'));}_0x272f76=_0x7a2b61;return db[_0x1ca6('0x7c')]['findOne']({'where':{'id':0x1}});})[_0x1ca6('0x26')](handleEntityNotFound(_0x2dd5a5,null))[_0x1ca6('0x26')](function(_0x51514a){if(_0x51514a){_0x121a18=_0x51514a;if(!_0x121a18[_0x1ca6('0x7d')]||!_0x121a18[_0x1ca6('0x7e')]||!_0x121a18[_0x1ca6('0x7f')]||!_0x121a18[_0x1ca6('0x80')]||!_0x121a18['bucket']){throw new db[(_0x1ca6('0x5e'))][(_0x1ca6('0x54'))]('Transcribe\x20not\x20configured');}if(_0x5746a1[_0x1ca6('0x47')]['runSentiment']&&(!_0x121a18[_0x1ca6('0x81')]||!_0x121a18[_0x1ca6('0x82')]||!_0x121a18[_0x1ca6('0x83')]||!_0x121a18['language']||!_0x121a18[_0x1ca6('0x71')])){throw new db[(_0x1ca6('0x5e'))][(_0x1ca6('0x54'))]('Sentiment\x20Analysis\x20not\x20configured');}return db[_0x1ca6('0x84')][_0x1ca6('0x7a')]({'where':{'id':_0x121a18[_0x1ca6('0x7e')]}});}})[_0x1ca6('0x26')](function(_0x414f71){if(!_0x414f71){throw new db[(_0x1ca6('0x5e'))][(_0x1ca6('0x54'))](_0x1ca6('0x85'));}if(!_0x414f71[_0x1ca6('0x86')]||!_0x414f71[_0x1ca6('0x87')]){throw new db['Sequelize'][(_0x1ca6('0x54'))]('Cloud\x20Provider\x20not\x20configured');}_0x563659=_0x414f71;return getBucketslist(_0x563659[_0x1ca6('0x86')],_0x563659[_0x1ca6('0x87')],_0x121a18['transcribeRegion']);})['then'](function(_0x38ed9c){if(_0x38ed9c&&_0x38ed9c['Buckets']){var _0x2c03f5=_[_0x1ca6('0x45')](_0x38ed9c[_0x1ca6('0x88')],function(_0x2e86c1){return _0x2e86c1['Name']===_0x121a18['bucket'];});if(!_0x2c03f5){logger['info'](util['format'](_0x1ca6('0x89'),_0x5746a1['params']['id'],_0x121a18['bucket']));return createBucket(_0x563659['data1'],_0x563659[_0x1ca6('0x87')],_0x121a18[_0x1ca6('0x7f')],_0x121a18[_0x1ca6('0x71')]);}logger[_0x1ca6('0x62')](util[_0x1ca6('0x4e')](_0x1ca6('0x8a'),_0x5746a1[_0x1ca6('0x48')]['id'],_0x121a18['bucket']));return;}})[_0x1ca6('0x26')](function(_0x7b3a1c){if(_0x272f76[_0x1ca6('0x76')]===_0x1ca6('0x8b')){return transcribe(_0x5746a1[_0x1ca6('0x48')]['id'],_0x563659[_0x1ca6('0x86')],_0x563659[_0x1ca6('0x87')],_0x121a18[_0x1ca6('0x7f')],_0x121a18[_0x1ca6('0x71')],_0x272f76[_0x1ca6('0x4d')],_0x121a18[_0x1ca6('0x80')]);}else{logger['info'](util['format']('[RUNTRANSCRIPT][%d]\x20Transcript\x20action\x20already\x20requested',_0x5746a1[_0x1ca6('0x48')]['id']));return{'transcribeStatus':_0x1ca6('0x8c')};}})[_0x1ca6('0x26')](function(_0x273780){if(_0x273780){_0x273780[_0x1ca6('0x8d')]=_0x5746a1['body'][_0x1ca6('0x8e')];return _0x272f76[_0x1ca6('0x8f')](_0x273780);}})[_0x1ca6('0x26')](respondWithResult(_0x2dd5a5,null))['catch'](handleError(_0x2dd5a5,null));};function writeFile(_0x102459,_0x14234f){return new Promise(function(_0x59cff2,_0x4e3412){fs[_0x1ca6('0x90')](_0x14234f,_0x102459,function(_0x4f6afd,_0x5d2f6f){if(_0x4f6afd){return _0x4e3412(_0x4f6afd);}else{return _0x59cff2(_0x5d2f6f);}});});}exports[_0x1ca6('0x91')]=function(_0x292fd2,_0x30b8a1,_0x2123fb){return db[_0x1ca6('0x2c')][_0x1ca6('0x7a')]({'where':{'id':_0x292fd2['params']['id']}})['then'](handleEntityNotFound(_0x30b8a1))[_0x1ca6('0x26')](function(_0xe7cd55){if(_0xe7cd55&&_0xe7cd55['fileText']){var _0x2fdb91=_0xe7cd55[_0x1ca6('0x92')];var _0x20f17c=config[_0x1ca6('0x93')]+_0x1ca6('0x94')+_0xe7cd55['id']+_0x1ca6('0x95');if(fs[_0x1ca6('0x50')](_0x20f17c)){return _0x20f17c;}return writeFile(_0x2fdb91,_0x20f17c)[_0x1ca6('0x26')](function(){return _0x20f17c;});}else{throw new db[(_0x1ca6('0x5e'))]['ValidationError']('Transcript\x20not\x20available');}})[_0x1ca6('0x26')](function(_0xebd39a){return _0x30b8a1['download'](_0xebd39a);})['catch'](handleError(_0x30b8a1));}; \ No newline at end of file +var _0xc288=['transcribe','transcribeRegion','bucket','Transcribe\x20not\x20configured','sentiment','sentimentRegion','Sentiment\x20Analysis\x20not\x20configured','transcribeAccountId','data2','Cloud\x20Provider\x20not\x20configured','data1','Buckets','[RUNTRANSCRIPT][%d]\x20Bucket\x20%s\x20not\x20available','[RUNTRANSCRIPT][%d]\x20Bucket\x20%s\x20available','language','[RUNTRANSCRIPT][%d]\x20Transcript\x20action\x20already\x20requested','IN_PROGRESS','tempSentiment','runSentiment','updateAttributes','fileText','root','.txt','Transcript\x20not\x20available','rimraf','request-promise','util','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','querystring','papaparse','aws-sdk','uuid/v4','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/license/util','sendStatus','end','undefined','count','offset','limit','set','Content-Range','json','apply','save','update','then','status','error','stack','name','send','index','map','VoiceRecording','fieldName','type','key','differenceBy','format','query','keys','filters','model','intersection','fields','attributes','sort','pick','filter','where','VIRTUAL','merge','options','includeAll','include','findAll','catch','params','rawAttributes','length','create','body','find','describe','../../components/encryptor','uniqueid','value','%s.cypher','decryptFile','secrets','recording','existsSync','Sequelize','ValidationError','VoiceRecording\x20not\x20found','filename','download','unlink','message','Not\x20found','downloads','sequelize','MD5','token','$and','push','extname','destroy','Entity\x20not\x20found','info','cancellazione\x20fisica\x20documento\x20%s','isNil','File:\x20\x22','\x22\x20trovato\x20eseguo\x20la\x20cancellazione','unlinkSync','.cypher','createBucket','upload','TranscribeService','startTranscriptionJob','[RUNTRANSCRIPT][%d]\x20Starting\x20voice\x20recording\x20upload\x20in\x20bucket\x20%s','basename','readFileSync','[RUNTRANSCRIPT][%d]\x20Voice\x20recording\x20uploaded\x20in\x20bucket\x20%s\x20(%s)','Location','Bucket','[RUNTRANSCRIPT][%d]\x20Sending\x20transcribe\x20request','[RUNTRANSCRIPT][%d]\x20Transcription\x20job\x20%s\x20created','TranscriptionJob','TranscriptionJobName','transcribeName','transcribeStatus','TranscriptionJobStatus','runTranscribe','findOne','Voice\x20Recording\x20not\x20found','Setting'];(function(_0x568496,_0x565afd){var _0x26c5c1=function(_0x4d251e){while(--_0x4d251e){_0x568496['push'](_0x568496['shift']());}};_0x26c5c1(++_0x565afd);}(_0xc288,0x1d7));var _0x8c28=function(_0x57a89d,_0x1fa678){_0x57a89d=_0x57a89d-0x0;var _0x12967c=_0xc288[_0x57a89d];return _0x12967c;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x8c28('0x0'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x8c28('0x1'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x8c28('0x2'));var path=require('path');var sox=require(_0x8c28('0x3'));var csv=require(_0x8c28('0x4'));var ejs=require(_0x8c28('0x5'));var fs=require('fs');var fs_extra=require(_0x8c28('0x6'));var _=require(_0x8c28('0x7'));var squel=require(_0x8c28('0x8'));var crypto=require(_0x8c28('0x9'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x8c28('0x4'));var querystring=require(_0x8c28('0xa'));var Papa=require(_0x8c28('0xb'));var AWS=require(_0x8c28('0xc'));var uuidv4=require(_0x8c28('0xd'));var Redis=require('ioredis');var authService=require(_0x8c28('0xe'));var qs=require(_0x8c28('0xf'));var as=require(_0x8c28('0x10'));var hardwareService=require(_0x8c28('0x11'));var logger=require(_0x8c28('0x12'))('api');var utils=require(_0x8c28('0x13'));var config=require('../../config/environment');var licenseUtil=require(_0x8c28('0x14'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x5a255f,_0x284e19){_0x284e19=_0x284e19||0xcc;return function(_0x17720b){if(_0x17720b){return _0x5a255f[_0x8c28('0x15')](_0x284e19);}return _0x5a255f['status'](_0x284e19)[_0x8c28('0x16')]();};}function respondWithResult(_0x1985c0,_0x3cd409){_0x3cd409=_0x3cd409||0xc8;return function(_0x14111e){if(_0x14111e){return _0x1985c0['status'](_0x3cd409)['json'](_0x14111e);}};}function respondWithFilteredResult(_0x5842bb,_0x6f5d37){return function(_0xf89d59){if(_0xf89d59){var _0x3bb8f1=typeof _0x6f5d37['offset']===_0x8c28('0x17')&&typeof _0x6f5d37['limit']===_0x8c28('0x17');var _0x52fa65=_0xf89d59[_0x8c28('0x18')];var _0x12042a=_0x3bb8f1?0x0:_0x6f5d37[_0x8c28('0x19')];var _0x560a1d=_0x3bb8f1?_0xf89d59[_0x8c28('0x18')]:_0x6f5d37[_0x8c28('0x19')]+_0x6f5d37[_0x8c28('0x1a')];var _0x1a07bc;if(_0x560a1d>=_0x52fa65){_0x560a1d=_0x52fa65;_0x1a07bc=0xc8;}else{_0x1a07bc=0xce;}_0x5842bb['status'](_0x1a07bc);return _0x5842bb[_0x8c28('0x1b')](_0x8c28('0x1c'),_0x12042a+'-'+_0x560a1d+'/'+_0x52fa65)[_0x8c28('0x1d')](_0xf89d59);}return null;};}function patchUpdates(_0x465f16){return function(_0x172c43){try{jsonpatch[_0x8c28('0x1e')](_0x172c43,_0x465f16,!![]);}catch(_0x1498fb){return BPromise['reject'](_0x1498fb);}return _0x172c43[_0x8c28('0x1f')]();};}function saveUpdates(_0x598cba,_0x3909af){return function(_0x2fc876){if(_0x2fc876){return _0x2fc876[_0x8c28('0x20')](_0x598cba)['then'](function(_0x52d8af){return _0x52d8af;});}return null;};}function removeEntity(_0x447416,_0x1165b3){return function(_0x54ffac){if(_0x54ffac){return _0x54ffac['destroy']()[_0x8c28('0x21')](function(){_0x447416[_0x8c28('0x22')](0xcc)['end']();});}};}function handleEntityNotFound(_0x77431a,_0x5361d5){return function(_0x16efb8){if(!_0x16efb8){_0x77431a[_0x8c28('0x15')](0x194);}return _0x16efb8;};}function handleError(_0xc8cc02,_0x34cfd0){_0x34cfd0=_0x34cfd0||0x1f4;return function(_0x50900f){logger[_0x8c28('0x23')](_0x50900f[_0x8c28('0x24')]);if(_0x50900f['name']){delete _0x50900f[_0x8c28('0x25')];}_0xc8cc02[_0x8c28('0x22')](_0x34cfd0)[_0x8c28('0x26')](_0x50900f);};}exports[_0x8c28('0x27')]=function(_0x207ce5,_0x286855){var _0x2409be={},_0x36fc02={},_0x3cc280={'count':0x0,'rows':[]};var _0x160b1f=_[_0x8c28('0x28')](db[_0x8c28('0x29')]['rawAttributes'],function(_0x40e8b3){return{'name':_0x40e8b3[_0x8c28('0x2a')],'type':_0x40e8b3[_0x8c28('0x2b')][_0x8c28('0x2c')]};});_0x36fc02['model']=_[_0x8c28('0x2d')](_[_0x8c28('0x28')](_0x160b1f,'name'),[_0x8c28('0x2e')]);_0x36fc02[_0x8c28('0x2f')]=_[_0x8c28('0x30')](_0x207ce5[_0x8c28('0x2f')]);_0x36fc02[_0x8c28('0x31')]=_['intersection'](_0x36fc02[_0x8c28('0x32')],_0x36fc02[_0x8c28('0x2f')]);_0x2409be['attributes']=_[_0x8c28('0x33')](_0x36fc02['model'],qs['fields'](_0x207ce5[_0x8c28('0x2f')][_0x8c28('0x34')]));_0x2409be[_0x8c28('0x35')]=_0x2409be[_0x8c28('0x35')]['length']?_0x2409be[_0x8c28('0x35')]:_0x36fc02[_0x8c28('0x32')];if(!_0x207ce5['query']['hasOwnProperty']('nolimit')){_0x2409be[_0x8c28('0x1a')]=qs[_0x8c28('0x1a')](_0x207ce5[_0x8c28('0x2f')][_0x8c28('0x1a')]);_0x2409be[_0x8c28('0x19')]=qs['offset'](_0x207ce5['query']['offset']);}_0x2409be['order']=qs['sort'](_0x207ce5[_0x8c28('0x2f')][_0x8c28('0x36')]);_0x2409be['where']=qs[_0x8c28('0x31')](_[_0x8c28('0x37')](_0x207ce5['query'],_0x36fc02['filters']),_0x160b1f);if(_0x207ce5[_0x8c28('0x2f')][_0x8c28('0x38')]){_0x2409be[_0x8c28('0x39')]=_['merge'](_0x2409be[_0x8c28('0x39')],{'$or':_[_0x8c28('0x28')](_0x160b1f,function(_0x3a0f39){if(_0x3a0f39['type']!==_0x8c28('0x3a')){var _0x2d4ce5={};_0x2d4ce5[_0x3a0f39[_0x8c28('0x25')]]={'$like':'%'+_0x207ce5[_0x8c28('0x2f')][_0x8c28('0x38')]+'%'};return _0x2d4ce5;}})});}_0x2409be=_[_0x8c28('0x3b')]({},_0x2409be,_0x207ce5[_0x8c28('0x3c')]);var _0x24e235={'where':_0x2409be['where']};return db[_0x8c28('0x29')][_0x8c28('0x18')](_0x24e235)[_0x8c28('0x21')](function(_0x9fa876){_0x3cc280['count']=_0x9fa876;if(_0x207ce5[_0x8c28('0x2f')][_0x8c28('0x3d')]){_0x2409be[_0x8c28('0x3e')]=[{'all':!![]}];}return db['VoiceRecording'][_0x8c28('0x3f')](_0x2409be);})[_0x8c28('0x21')](function(_0x447971){_0x3cc280['rows']=_0x447971;return _0x3cc280;})[_0x8c28('0x21')](respondWithFilteredResult(_0x286855,_0x2409be))[_0x8c28('0x40')](handleError(_0x286855,null));};exports['show']=function(_0x7f22be,_0x209397){var _0x4a3df7={'raw':![],'where':{'id':_0x7f22be[_0x8c28('0x41')]['id']}},_0x320891={};_0x320891[_0x8c28('0x32')]=_[_0x8c28('0x30')](db[_0x8c28('0x29')][_0x8c28('0x42')]);_0x320891[_0x8c28('0x2f')]=_['keys'](_0x7f22be[_0x8c28('0x2f')]);_0x320891[_0x8c28('0x31')]=_['intersection'](_0x320891[_0x8c28('0x32')],_0x320891[_0x8c28('0x2f')]);_0x4a3df7[_0x8c28('0x35')]=_[_0x8c28('0x33')](_0x320891[_0x8c28('0x32')],qs['fields'](_0x7f22be[_0x8c28('0x2f')]['fields']));_0x4a3df7[_0x8c28('0x35')]=_0x4a3df7[_0x8c28('0x35')][_0x8c28('0x43')]?_0x4a3df7['attributes']:_0x320891[_0x8c28('0x32')];if(_0x7f22be[_0x8c28('0x2f')][_0x8c28('0x3d')]){_0x4a3df7[_0x8c28('0x3e')]=[{'all':!![]}];}_0x4a3df7=_['merge']({},_0x4a3df7,_0x7f22be['options']);return db[_0x8c28('0x29')]['find'](_0x4a3df7)[_0x8c28('0x21')](handleEntityNotFound(_0x209397,null))[_0x8c28('0x21')](respondWithResult(_0x209397,null))['catch'](handleError(_0x209397,null));};exports['create']=function(_0x18419a,_0xb14e1a){return db[_0x8c28('0x29')][_0x8c28('0x44')](_0x18419a[_0x8c28('0x45')],{})[_0x8c28('0x21')](respondWithResult(_0xb14e1a,0xc9))[_0x8c28('0x40')](handleError(_0xb14e1a,null));};exports[_0x8c28('0x20')]=function(_0x2a1588,_0xbb168){if(_0x2a1588[_0x8c28('0x45')]['id']){delete _0x2a1588[_0x8c28('0x45')]['id'];}return db['VoiceRecording'][_0x8c28('0x46')]({'where':{'id':_0x2a1588['params']['id']}})[_0x8c28('0x21')](handleEntityNotFound(_0xbb168,null))['then'](saveUpdates(_0x2a1588[_0x8c28('0x45')],null))[_0x8c28('0x21')](respondWithResult(_0xbb168,null))[_0x8c28('0x40')](handleError(_0xbb168,null));};exports[_0x8c28('0x47')]=function(_0x22914b,_0xfc092e){return db[_0x8c28('0x29')]['describe']()[_0x8c28('0x21')](respondWithResult(_0xfc092e,null))['catch'](handleError(_0xfc092e,null));};exports['download']=function(_0x18a0e2,_0x1c1ec2,_0x39d93c){var _0x272843=require(_0x8c28('0x48'));var _0x5cbd43=![];var _0x409812={};if(_0x18a0e2['query']['type']&&_0x18a0e2[_0x8c28('0x2f')][_0x8c28('0x2b')]==='uniqueid'){_0x409812[_0x8c28('0x49')]=_0x18a0e2[_0x8c28('0x41')]['id'];}else{_0x409812['id']=_0x18a0e2[_0x8c28('0x41')]['id'];}return db[_0x8c28('0x29')]['find']({'where':_0x409812,'attributes':['id',_0x8c28('0x4a')],'raw':!![]})[_0x8c28('0x21')](handleEntityNotFound(_0x1c1ec2,null))['then'](function(_0x568263){if(_0x568263){var _0x6967d2=_0x568263[_0x8c28('0x4a')];var _0x4925fc=util[_0x8c28('0x2e')](_0x8c28('0x4b'),_0x6967d2);if(fs['existsSync'](_0x4925fc)){_0x5cbd43=!![];return _0x272843[_0x8c28('0x4c')](_0x4925fc,_0x6967d2,config[_0x8c28('0x4d')][_0x8c28('0x4e')])[_0x8c28('0x21')](function(){return _0x568263;});}return _0x568263;}})['then'](function(_0x47b0fa){if(_0x47b0fa){var _0x3fbb58=_0x47b0fa['value'];if(!fs[_0x8c28('0x4f')](_0x3fbb58)){throw new db[(_0x8c28('0x50'))][(_0x8c28('0x51'))](_0x8c28('0x52'));}if(_0x47b0fa[_0x8c28('0x53')]){return _0x1c1ec2[_0x8c28('0x54')](_0x3fbb58,_0x47b0fa[_0x8c28('0x53')]+path['extname'](_0x3fbb58),function(){if(_0x5cbd43){fs[_0x8c28('0x55')](_0x3fbb58);}});}else{return _0x1c1ec2[_0x8c28('0x54')](_0x3fbb58,function(_0x50a4e0){if(_0x5cbd43){fs[_0x8c28('0x55')](_0x3fbb58);}});}}})[_0x8c28('0x40')](function(_0x28357a){if(_0x28357a[_0x8c28('0x56')]===_0x8c28('0x52')){_0x1c1ec2[_0x8c28('0x22')](0x194)[_0x8c28('0x26')](_0x8c28('0x57'));}else{return handleError(_0x1c1ec2,null);}});};exports[_0x8c28('0x58')]=function(_0xd5e37d,_0x237c26,_0x3132b0){var _0x3d0779=require('../../components/encryptor');var _0x37469b=![];var _0x2fc1ce={'$and':[db[_0x8c28('0x59')][_0x8c28('0x39')](db[_0x8c28('0x59')]['fn'](_0x8c28('0x5a'),db[_0x8c28('0x59')]['col'](_0x8c28('0x49'))),_0xd5e37d['query'][_0x8c28('0x5b')])]};if(_0xd5e37d[_0x8c28('0x2f')][_0x8c28('0x2b')]&&_0xd5e37d['query'][_0x8c28('0x2b')]===_0x8c28('0x49')){_0x2fc1ce[_0x8c28('0x5c')][_0x8c28('0x5d')]({'uniqueid':_0xd5e37d['params']['id']});}else{_0x2fc1ce[_0x8c28('0x5c')][_0x8c28('0x5d')]({'id':_0xd5e37d[_0x8c28('0x41')]['id']});}return db[_0x8c28('0x29')][_0x8c28('0x46')]({'where':_0x2fc1ce,'attributes':['id',_0x8c28('0x4a')],'raw':!![]})['then'](handleEntityNotFound(_0x237c26,null))[_0x8c28('0x21')](function(_0x55d2ba){if(_0x55d2ba){var _0x1e4609=util['format'](_0x8c28('0x4b'),_0x55d2ba[_0x8c28('0x4a')]);if(fs['existsSync'](_0x1e4609)){_0x37469b=!![];return _0x3d0779[_0x8c28('0x4c')](_0x1e4609,_0x55d2ba[_0x8c28('0x4a')],config[_0x8c28('0x4d')][_0x8c28('0x4e')])[_0x8c28('0x21')](function(){return _0x55d2ba;});}return _0x55d2ba;}})['then'](function(_0x335f15){if(_0x335f15){if(!fs['existsSync'](_0x335f15[_0x8c28('0x4a')])){throw new db[(_0x8c28('0x50'))][(_0x8c28('0x51'))]('VoiceRecording\x20not\x20found');}if(_0x335f15[_0x8c28('0x53')]){return _0x237c26[_0x8c28('0x54')](_0x335f15[_0x8c28('0x4a')],_0x335f15[_0x8c28('0x53')]+path[_0x8c28('0x5e')](_0x335f15['value']),function(){if(_0x37469b){fs[_0x8c28('0x55')](_0x335f15[_0x8c28('0x4a')]);}});}else{return _0x237c26[_0x8c28('0x54')](_0x335f15[_0x8c28('0x4a')],function(_0x2b8bd7){if(_0x37469b){fs[_0x8c28('0x55')](_0x335f15[_0x8c28('0x4a')]);}});}}})[_0x8c28('0x40')](handleError(_0x237c26,null));};exports[_0x8c28('0x5f')]=function(_0x5d57ff,_0x24d649){return db['VoiceRecording'][_0x8c28('0x46')]({'where':{'id':_0x5d57ff['params']['id']}})[_0x8c28('0x21')](function(_0x4bfb8f){if(_['isNil'](_0x4bfb8f)){throw new ReferenceError(_0x8c28('0x60'));}return _0x4bfb8f;})[_0x8c28('0x21')](function(_0xcd3243){var _0x3007a1=_0xcd3243[_0x8c28('0x4a')];logger[_0x8c28('0x61')](_0x8c28('0x62'),_0x3007a1);if(!_[_0x8c28('0x63')](_0xcd3243[_0x8c28('0x4a')])&&fs[_0x8c28('0x4f')](_0x3007a1)){logger['info'](_0x8c28('0x64')+_0x3007a1+_0x8c28('0x65'));fs[_0x8c28('0x66')](_0x3007a1);}_0x3007a1=_0x3007a1+_0x8c28('0x67');if(!_[_0x8c28('0x63')](_0xcd3243[_0x8c28('0x4a')])&&fs[_0x8c28('0x4f')](_0x3007a1)){logger['info'](_0x8c28('0x64')+_0x3007a1+'\x22\x20trovato\x20eseguo\x20la\x20cancellazione');fs[_0x8c28('0x66')](_0x3007a1);}return _0xcd3243;})[_0x8c28('0x21')](function(_0x31e8d6){if(!_0x31e8d6)throw new InternalError();return _0x31e8d6[_0x8c28('0x5f')]();})[_0x8c28('0x21')](function(){_0x24d649['status'](0xcc)[_0x8c28('0x16')]();})[_0x8c28('0x40')](handleError(_0x24d649,null));};function getBucketslist(_0x34acc9,_0x575ab3,_0x57864a){return new Promise(function(_0x5f2a44,_0x2d3bae){var _0xb58120=new AWS['S3']({'accessKeyId':_0x575ab3,'secretAccessKey':_0x34acc9,'region':_0x57864a});_0xb58120['listBuckets']({},function(_0x40cd05,_0x5c44fb){if(_0x40cd05){return _0x2d3bae(_0x40cd05);}else{return _0x5f2a44(_0x5c44fb);}});});}function createBucket(_0x4ffffc,_0x5834f8,_0x14c308,_0x4514ce){return new Promise(function(_0x52100f,_0x2e9292){var _0x3ba801=new AWS['S3']({'accessKeyId':_0x5834f8,'secretAccessKey':_0x4ffffc,'region':_0x14c308});_0x3ba801[_0x8c28('0x68')]({'Bucket':_0x4514ce},function(_0x52e48c,_0x595a1b){if(_0x52e48c){return _0x2e9292(_0x52e48c);}else{return _0x52100f(_0x595a1b);}});});}function uploadFile(_0x870332,_0x2d709c,_0x5441c7,_0x59b7e5,_0x2fcaa9,_0x35b8e7){return new Promise(function(_0x31aa3d,_0x257096){var _0x504457=new AWS['S3']({'accessKeyId':_0x2d709c,'secretAccessKey':_0x870332,'region':_0x5441c7});_0x504457[_0x8c28('0x69')]({'Bucket':_0x59b7e5,'Key':_0x2fcaa9,'Body':_0x35b8e7},function(_0x111ff4,_0x40f642){if(_0x111ff4){return _0x257096(_0x111ff4);}else{return _0x31aa3d(_0x40f642);}});});}function startTranscribe(_0x12bd2f,_0x10a8b2,_0x4f989f,_0x3ee8b3,_0x2753c3,_0x2adc14){return new Promise(function(_0x2ff8a0,_0xba8071){var _0x488f45=new AWS[(_0x8c28('0x6a'))]({'accessKeyId':_0x10a8b2,'secretAccessKey':_0x12bd2f,'region':_0x4f989f});_0x488f45[_0x8c28('0x6b')]({'TranscriptionJobName':_0x3ee8b3,'LanguageCode':_0x2753c3,'Media':{'MediaFileUri':_0x2adc14}},function(_0x3dbeff,_0x36b151){if(_0x3dbeff){return _0xba8071(_0x3dbeff);}else{return _0x2ff8a0(_0x36b151);}});});}function transcribe(_0x1d518c,_0x5864c2,_0x3c4716,_0x1281dd,_0x8aaa05,_0x4b5c8a,_0x468384){return new Promise(function(_0x49b692,_0x401c4e){var _0x47266e={};logger[_0x8c28('0x61')](util['format'](_0x8c28('0x6c'),_0x1d518c,_0x8aaa05));return uploadFile(_0x5864c2,_0x3c4716,_0x1281dd,_0x8aaa05,path[_0x8c28('0x6d')](_0x4b5c8a),fs[_0x8c28('0x6e')](_0x4b5c8a))[_0x8c28('0x21')](function(_0x2cb075){logger[_0x8c28('0x61')](util[_0x8c28('0x2e')](_0x8c28('0x6f'),_0x1d518c,_0x8aaa05,_0x2cb075[_0x8c28('0x70')]));_0x47266e['bucket']=_0x2cb075[_0x8c28('0x71')];_0x47266e['location']=_0x2cb075[_0x8c28('0x70')];logger[_0x8c28('0x61')](util[_0x8c28('0x2e')](_0x8c28('0x72'),_0x1d518c));return startTranscribe(_0x5864c2,_0x3c4716,_0x1281dd,uuidv4(),_0x468384,_0x2cb075[_0x8c28('0x70')]);})[_0x8c28('0x21')](function(_0x41ce71){logger[_0x8c28('0x61')](util[_0x8c28('0x2e')](_0x8c28('0x73'),_0x1d518c,_0x41ce71[_0x8c28('0x74')][_0x8c28('0x75')]));_0x47266e[_0x8c28('0x76')]=_0x41ce71[_0x8c28('0x74')]['TranscriptionJobName'];_0x47266e[_0x8c28('0x77')]=_0x41ce71[_0x8c28('0x74')][_0x8c28('0x78')];return _0x49b692(_0x47266e);})['catch'](function(_0x336d19){return _0x401c4e(_0x336d19);});});}exports[_0x8c28('0x79')]=function(_0x1a38a7,_0x4e00bd,_0x5687a1){var _0x44b590;var _0x5dfcd3;var _0x578d00;var _0x57cadc=require('../../components/encryptor');return db[_0x8c28('0x29')][_0x8c28('0x7a')]({'where':{'id':_0x1a38a7['params']['id']}})[_0x8c28('0x21')](function(_0x42818b){if(_0x42818b){var _0x594653=util[_0x8c28('0x2e')](_0x8c28('0x4b'),_0x42818b[_0x8c28('0x4a')]);if(fs['existsSync'](_0x594653)){cypher=!![];return _0x57cadc['decryptFile'](_0x594653,_0x42818b['value'],config[_0x8c28('0x4d')][_0x8c28('0x4e')])['then'](function(){return _0x42818b;});}return _0x42818b;}})[_0x8c28('0x21')](function(_0x2e680e){if(!_0x2e680e){throw new db[(_0x8c28('0x50'))][(_0x8c28('0x51'))](_0x8c28('0x7b'));}_0x5dfcd3=_0x2e680e;return db[_0x8c28('0x7c')][_0x8c28('0x7a')]({'where':{'id':0x1}});})['then'](handleEntityNotFound(_0x4e00bd,null))[_0x8c28('0x21')](function(_0x3d70c9){if(_0x3d70c9){_0x44b590=_0x3d70c9;if(!_0x44b590[_0x8c28('0x7d')]||!_0x44b590['transcribeAccountId']||!_0x44b590[_0x8c28('0x7e')]||!_0x44b590['language']||!_0x44b590[_0x8c28('0x7f')]){throw new db['Sequelize'][(_0x8c28('0x51'))](_0x8c28('0x80'));}if(_0x1a38a7['body']['runSentiment']&&(!_0x44b590[_0x8c28('0x81')]||!_0x44b590['sentimentAccountId']||!_0x44b590[_0x8c28('0x82')]||!_0x44b590['language']||!_0x44b590[_0x8c28('0x7f')])){throw new db[(_0x8c28('0x50'))][(_0x8c28('0x51'))](_0x8c28('0x83'));}return db['CloudProvider']['findOne']({'where':{'id':_0x44b590[_0x8c28('0x84')]}});}})['then'](function(_0x584dbf){if(!_0x584dbf){throw new db[(_0x8c28('0x50'))][(_0x8c28('0x51'))]('Cloud\x20Provider\x20not\x20available');}if(!_0x584dbf['data1']||!_0x584dbf[_0x8c28('0x85')]){throw new db['Sequelize'][(_0x8c28('0x51'))](_0x8c28('0x86'));}_0x578d00=_0x584dbf;return getBucketslist(_0x578d00[_0x8c28('0x87')],_0x578d00[_0x8c28('0x85')],_0x44b590[_0x8c28('0x7e')]);})['then'](function(_0x5ab8ae){if(_0x5ab8ae&&_0x5ab8ae[_0x8c28('0x88')]){var _0x235800=_['find'](_0x5ab8ae[_0x8c28('0x88')],function(_0x4140bd){return _0x4140bd['Name']===_0x44b590[_0x8c28('0x7f')];});if(!_0x235800){logger[_0x8c28('0x61')](util[_0x8c28('0x2e')](_0x8c28('0x89'),_0x1a38a7[_0x8c28('0x41')]['id'],_0x44b590[_0x8c28('0x7f')]));return createBucket(_0x578d00['data1'],_0x578d00[_0x8c28('0x85')],_0x44b590['transcribeRegion'],_0x44b590['bucket']);}logger[_0x8c28('0x61')](util[_0x8c28('0x2e')](_0x8c28('0x8a'),_0x1a38a7['params']['id'],_0x44b590[_0x8c28('0x7f')]));return;}})[_0x8c28('0x21')](function(_0x33a492){if(_0x5dfcd3[_0x8c28('0x77')]==='NEW'){return transcribe(_0x1a38a7[_0x8c28('0x41')]['id'],_0x578d00['data1'],_0x578d00[_0x8c28('0x85')],_0x44b590[_0x8c28('0x7e')],_0x44b590[_0x8c28('0x7f')],_0x5dfcd3[_0x8c28('0x4a')],_0x44b590[_0x8c28('0x8b')]);}else{logger[_0x8c28('0x61')](util['format'](_0x8c28('0x8c'),_0x1a38a7[_0x8c28('0x41')]['id']));return{'transcribeStatus':_0x8c28('0x8d')};}})['then'](function(_0x11d2fb){if(_0x11d2fb){_0x11d2fb[_0x8c28('0x8e')]=_0x1a38a7['body'][_0x8c28('0x8f')];return _0x5dfcd3[_0x8c28('0x90')](_0x11d2fb);}})[_0x8c28('0x21')](respondWithResult(_0x4e00bd,null))['catch'](handleError(_0x4e00bd,null));};function writeFile(_0x4fad48,_0x17f594){return new Promise(function(_0xa78aee,_0x4b2766){fs['writeFile'](_0x17f594,_0x4fad48,function(_0x2dfa91,_0x4f9b52){if(_0x2dfa91){return _0x4b2766(_0x2dfa91);}else{return _0xa78aee(_0x4f9b52);}});});}exports['downloadTranscribe']=function(_0x5291ba,_0x2e982c,_0x1a89a4){return db[_0x8c28('0x29')][_0x8c28('0x7a')]({'where':{'id':_0x5291ba['params']['id']}})[_0x8c28('0x21')](handleEntityNotFound(_0x2e982c))[_0x8c28('0x21')](function(_0x6984f2){if(_0x6984f2&&_0x6984f2['fileText']){var _0x45f9af=_0x6984f2[_0x8c28('0x91')];var _0x3d306b=config[_0x8c28('0x92')]+'/server/files/transcribes/transcribe_'+_0x6984f2['id']+_0x8c28('0x93');if(fs[_0x8c28('0x4f')](_0x3d306b)){return _0x3d306b;}return writeFile(_0x45f9af,_0x3d306b)['then'](function(){return _0x3d306b;});}else{throw new db[(_0x8c28('0x50'))][(_0x8c28('0x51'))](_0x8c28('0x94'));}})[_0x8c28('0x21')](function(_0x2c56ed){return _0x2e982c[_0x8c28('0x54')](_0x2c56ed);})[_0x8c28('0x40')](handleError(_0x2e982c));}; \ No newline at end of file diff --git a/server/api/voiceRecording/voiceRecording.model.js b/server/api/voiceRecording/voiceRecording.model.js index 80d4695..aefb04d 100644 --- a/server/api/voiceRecording/voiceRecording.model.js +++ b/server/api/voiceRecording/voiceRecording.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x71d5=['util','moment','bluebird','request-promise','path','rimraf','../../config/environment','./voiceRecording.attributes','exports','define','VoiceRecording','voice_recordings','uniqueid','lodash'];(function(_0x27cf30,_0x1fc723){var _0x3cea8e=function(_0x26e6c9){while(--_0x26e6c9){_0x27cf30['push'](_0x27cf30['shift']());}};_0x3cea8e(++_0x1fc723);}(_0x71d5,0x109));var _0x571d=function(_0x587d9a,_0x343bbc){_0x587d9a=_0x587d9a-0x0;var _0xb5422a=_0x71d5[_0x587d9a];return _0xb5422a;};'use strict';var _=require(_0x571d('0x0'));var util=require(_0x571d('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0x571d('0x2'));var BPromise=require(_0x571d('0x3'));var rp=require(_0x571d('0x4'));var fs=require('fs');var path=require(_0x571d('0x5'));var rimraf=require(_0x571d('0x6'));var config=require(_0x571d('0x7'));var attributes=require(_0x571d('0x8'));module[_0x571d('0x9')]=function(_0xee95c4,_0x562de5){return _0xee95c4[_0x571d('0xa')](_0x571d('0xb'),attributes,{'tableName':_0x571d('0xc'),'paranoid':![],'indexes':[{'name':_0x571d('0xd'),'fields':[_0x571d('0xd')]}],'timestamps':!![]});}; \ No newline at end of file +var _0x1117=['path','rimraf','../../config/environment','exports','define','VoiceRecording','voice_recordings','uniqueid','lodash','../../config/logger','moment','bluebird','request-promise'];(function(_0x5cdf3c,_0x233f63){var _0x515b20=function(_0x10ef8c){while(--_0x10ef8c){_0x5cdf3c['push'](_0x5cdf3c['shift']());}};_0x515b20(++_0x233f63);}(_0x1117,0x18e));var _0x7111=function(_0x45ab70,_0x46f754){_0x45ab70=_0x45ab70-0x0;var _0x4e93bb=_0x1117[_0x45ab70];return _0x4e93bb;};'use strict';var _=require(_0x7111('0x0'));var util=require('util');var logger=require(_0x7111('0x1'))('api');var moment=require(_0x7111('0x2'));var BPromise=require(_0x7111('0x3'));var rp=require(_0x7111('0x4'));var fs=require('fs');var path=require(_0x7111('0x5'));var rimraf=require(_0x7111('0x6'));var config=require(_0x7111('0x7'));var attributes=require('./voiceRecording.attributes');module[_0x7111('0x8')]=function(_0xc7cdf5,_0x2176be){return _0xc7cdf5[_0x7111('0x9')](_0x7111('0xa'),attributes,{'tableName':_0x7111('0xb'),'paranoid':![],'indexes':[{'name':'uniqueid','fields':[_0x7111('0xc')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/voiceRecording/voiceRecording.rpc.js b/server/api/voiceRecording/voiceRecording.rpc.js index b567e71..4844e7f 100644 --- a/server/api/voiceRecording/voiceRecording.rpc.js +++ b/server/api/voiceRecording/voiceRecording.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0295=['client','http','then','info','request\x20sent','debug','VoiceRecording,\x20%s,\x20%s,\x20%s','stringify','error','VoiceRecording,\x20%s,\x20%s','message','result','catch','VoiceRecording','update','body','options','where','limit','UpdateVoiceRecording','../../components/encryptor','Setting','findOne','callRecordingEncryption','create','existsSync','value','format','%s.cypher','encryptFile','secrets','recording','unlink','CreateVoiceRecording','lodash','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x45e962,_0xf55ba0){var _0x212972=function(_0x475b9d){while(--_0x475b9d){_0x45e962['push'](_0x45e962['shift']());}};_0x212972(++_0xf55ba0);}(_0x0295,0x1f0));var _0x5029=function(_0x23ef1f,_0x127dd2){_0x23ef1f=_0x23ef1f-0x0;var _0x234192=_0x0295[_0x23ef1f];return _0x234192;};'use strict';var _=require(_0x5029('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x5029('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x5029('0x2'))['db'];var utils=require(_0x5029('0x3'));var logger=require(_0x5029('0x4'))(_0x5029('0x5'));var config=require(_0x5029('0x6'));var jayson=require(_0x5029('0x7'));var client=jayson[_0x5029('0x8')][_0x5029('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x5b3cd,_0x502a62,_0x54978f){return new BPromise(function(_0x4ee867,_0xf4459b){return client['request'](_0x5b3cd,_0x54978f)[_0x5029('0xa')](function(_0x5bccfc){logger[_0x5029('0xb')]('VoiceRecording,\x20%s,\x20%s',_0x502a62,_0x5029('0xc'));logger[_0x5029('0xd')](_0x5029('0xe'),_0x502a62,'request\x20sent',JSON[_0x5029('0xf')](_0x5bccfc));if(_0x5bccfc[_0x5029('0x10')]){if(_0x5bccfc[_0x5029('0x10')]['code']===0x1f4){logger[_0x5029('0x10')](_0x5029('0x11'),_0x502a62,_0x5bccfc['error']['message']);return _0xf4459b(_0x5bccfc['error']['message']);}logger[_0x5029('0x10')](_0x5029('0x11'),_0x502a62,_0x5bccfc[_0x5029('0x10')][_0x5029('0x12')]);return _0x4ee867(_0x5bccfc[_0x5029('0x10')][_0x5029('0x12')]);}else{logger[_0x5029('0xb')](_0x5029('0x11'),_0x502a62,_0x5029('0xc'));_0x4ee867(_0x5bccfc[_0x5029('0x13')][_0x5029('0x12')]);}})[_0x5029('0x14')](function(_0x3786b5){logger[_0x5029('0x10')](_0x5029('0x11'),_0x502a62,_0x3786b5);_0xf4459b(_0x3786b5);});});}exports['UpdateVoiceRecording']=function(_0x1ed567){var _0x31a155=this;return new Promise(function(_0x35de81,_0x4902f3){return db[_0x5029('0x15')][_0x5029('0x16')](_0x1ed567[_0x5029('0x17')],{'raw':_0x1ed567['options']?_0x1ed567[_0x5029('0x18')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1ed567[_0x5029('0x18')]?_0x1ed567[_0x5029('0x18')][_0x5029('0x19')]||null:null,'attributes':_0x1ed567[_0x5029('0x18')]?_0x1ed567['options']['attributes']||null:null,'limit':_0x1ed567[_0x5029('0x18')]?_0x1ed567['options'][_0x5029('0x1a')]||null:null})[_0x5029('0xa')](function(_0x1eb228){logger[_0x5029('0xb')](_0x5029('0x1b'),_0x1ed567);logger[_0x5029('0xd')](_0x5029('0x1b'),_0x1ed567,JSON[_0x5029('0xf')](_0x1eb228));_0x35de81(_0x1eb228);})[_0x5029('0x14')](function(_0x4ceaae){logger['error']('UpdateVoiceRecording',_0x4ceaae[_0x5029('0x12')],_0x1ed567);_0x4902f3(_0x31a155[_0x5029('0x10')](0x1f4,_0x4ceaae['message']));});});};exports['CreateVoiceRecording']=function(_0x181da0){var _0x1e7e61=this;return new Promise(function(_0x36d810,_0x5527fc){var _0x2c501f=require(_0x5029('0x1c'));var _0x5e45c4;return db[_0x5029('0x1d')][_0x5029('0x1e')]({'attributes':['id',_0x5029('0x1f')],'where':{'id':0x1},'raw':!![]})['then'](function(_0x32da06){_0x5e45c4=_0x32da06;return db[_0x5029('0x15')][_0x5029('0x20')](_0x181da0['body']);})[_0x5029('0xa')](function(_0x2bb398){if(_0x5e45c4['callRecordingEncryption']&&fs[_0x5029('0x21')](_0x2bb398[_0x5029('0x22')])){var _0x4434ff=util[_0x5029('0x23')](_0x5029('0x24'),_0x2bb398[_0x5029('0x22')]);return _0x2c501f[_0x5029('0x25')](_0x2bb398[_0x5029('0x22')],_0x4434ff,config[_0x5029('0x26')][_0x5029('0x27')])[_0x5029('0xa')](function(){fs[_0x5029('0x28')](_0x2bb398['value']);logger[_0x5029('0xb')]('CreateVoiceRecording\x20file\x20encrypted');return _0x2bb398;});}return _0x2bb398;})[_0x5029('0xa')](function(_0x4f672e){logger['info'](_0x5029('0x29'),_0x181da0);logger[_0x5029('0xd')](_0x5029('0x29'),_0x181da0,JSON['stringify'](_0x4f672e));_0x36d810(_0x4f672e);})[_0x5029('0x14')](function(_0x15d882){logger[_0x5029('0x10')](_0x5029('0x29'),_0x15d882[_0x5029('0x12')],_0x181da0);_0x5527fc(_0x1e7e61[_0x5029('0x10')](0x1f4,_0x15d882[_0x5029('0x12')]));});});}; \ No newline at end of file +var _0x2542=['catch','lodash','util','moment','bluebird','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','VoiceRecording,\x20%s,\x20%s','debug','VoiceRecording,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','code','error','message','UpdateVoiceRecording','update','body','options','raw','where','limit','../../components/encryptor','Setting','callRecordingEncryption','VoiceRecording','create','existsSync','value','format','%s.cypher','encryptFile','secrets','recording','unlink','CreateVoiceRecording\x20file\x20encrypted','CreateVoiceRecording'];(function(_0x787f34,_0x576d52){var _0x252ce0=function(_0x1da254){while(--_0x1da254){_0x787f34['push'](_0x787f34['shift']());}};_0x252ce0(++_0x576d52);}(_0x2542,0x169));var _0x2254=function(_0x4215a2,_0x19da25){_0x4215a2=_0x4215a2-0x0;var _0x525bb6=_0x2542[_0x4215a2];return _0x525bb6;};'use strict';var _=require(_0x2254('0x0'));var util=require(_0x2254('0x1'));var moment=require(_0x2254('0x2'));var BPromise=require(_0x2254('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x2254('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x2254('0x5'));var logger=require(_0x2254('0x6'))(_0x2254('0x7'));var config=require(_0x2254('0x8'));var jayson=require(_0x2254('0x9'));var client=jayson['client'][_0x2254('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xe8ca50,_0x2ee7ee,_0x3c45ec){return new BPromise(function(_0x1637ad,_0x477b47){return client[_0x2254('0xb')](_0xe8ca50,_0x3c45ec)[_0x2254('0xc')](function(_0xb395da){logger[_0x2254('0xd')](_0x2254('0xe'),_0x2ee7ee,'request\x20sent');logger[_0x2254('0xf')](_0x2254('0x10'),_0x2ee7ee,_0x2254('0x11'),JSON[_0x2254('0x12')](_0xb395da));if(_0xb395da['error']){if(_0xb395da['error'][_0x2254('0x13')]===0x1f4){logger[_0x2254('0x14')](_0x2254('0xe'),_0x2ee7ee,_0xb395da[_0x2254('0x14')][_0x2254('0x15')]);return _0x477b47(_0xb395da[_0x2254('0x14')]['message']);}logger[_0x2254('0x14')](_0x2254('0xe'),_0x2ee7ee,_0xb395da['error'][_0x2254('0x15')]);return _0x1637ad(_0xb395da[_0x2254('0x14')][_0x2254('0x15')]);}else{logger[_0x2254('0xd')](_0x2254('0xe'),_0x2ee7ee,_0x2254('0x11'));_0x1637ad(_0xb395da['result'][_0x2254('0x15')]);}})['catch'](function(_0x327d6d){logger[_0x2254('0x14')](_0x2254('0xe'),_0x2ee7ee,_0x327d6d);_0x477b47(_0x327d6d);});});}exports[_0x2254('0x16')]=function(_0x1ae11e){var _0x34f90e=this;return new Promise(function(_0x497724,_0x51b395){return db['VoiceRecording'][_0x2254('0x17')](_0x1ae11e[_0x2254('0x18')],{'raw':_0x1ae11e[_0x2254('0x19')]?_0x1ae11e[_0x2254('0x19')][_0x2254('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1ae11e[_0x2254('0x19')]?_0x1ae11e['options'][_0x2254('0x1b')]||null:null,'attributes':_0x1ae11e[_0x2254('0x19')]?_0x1ae11e[_0x2254('0x19')]['attributes']||null:null,'limit':_0x1ae11e['options']?_0x1ae11e['options'][_0x2254('0x1c')]||null:null})[_0x2254('0xc')](function(_0xf88b56){logger['info']('UpdateVoiceRecording',_0x1ae11e);logger['debug']('UpdateVoiceRecording',_0x1ae11e,JSON['stringify'](_0xf88b56));_0x497724(_0xf88b56);})['catch'](function(_0x1aa71f){logger[_0x2254('0x14')](_0x2254('0x16'),_0x1aa71f[_0x2254('0x15')],_0x1ae11e);_0x51b395(_0x34f90e[_0x2254('0x14')](0x1f4,_0x1aa71f[_0x2254('0x15')]));});});};exports['CreateVoiceRecording']=function(_0x4a8274){var _0x1ada42=this;return new Promise(function(_0x4f6877,_0x35608a){var _0x141dc5=require(_0x2254('0x1d'));var _0x3aa0bd;return db[_0x2254('0x1e')]['findOne']({'attributes':['id',_0x2254('0x1f')],'where':{'id':0x1},'raw':!![]})[_0x2254('0xc')](function(_0x21285d){_0x3aa0bd=_0x21285d;return db[_0x2254('0x20')][_0x2254('0x21')](_0x4a8274[_0x2254('0x18')]);})[_0x2254('0xc')](function(_0x22e791){if(_0x3aa0bd[_0x2254('0x1f')]&&fs[_0x2254('0x22')](_0x22e791[_0x2254('0x23')])){var _0xad7774=util[_0x2254('0x24')](_0x2254('0x25'),_0x22e791[_0x2254('0x23')]);return _0x141dc5[_0x2254('0x26')](_0x22e791[_0x2254('0x23')],_0xad7774,config[_0x2254('0x27')][_0x2254('0x28')])['then'](function(){fs[_0x2254('0x29')](_0x22e791[_0x2254('0x23')]);logger[_0x2254('0xd')](_0x2254('0x2a'));return _0x22e791;});}return _0x22e791;})[_0x2254('0xc')](function(_0x1d275b){logger[_0x2254('0xd')](_0x2254('0x2b'),_0x4a8274);logger[_0x2254('0xf')]('CreateVoiceRecording',_0x4a8274,JSON[_0x2254('0x12')](_0x1d275b));_0x4f6877(_0x1d275b);})[_0x2254('0x2c')](function(_0x503540){logger[_0x2254('0x14')](_0x2254('0x2b'),_0x503540[_0x2254('0x15')],_0x4a8274);_0x35608a(_0x1ada42[_0x2254('0x14')](0x1f4,_0x503540['message']));});});}; \ No newline at end of file diff --git a/server/api/voiceTransferReport/index.js b/server/api/voiceTransferReport/index.js index ab2efe8..5bd4470 100644 --- a/server/api/voiceTransferReport/index.js +++ b/server/api/voiceTransferReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8ceb=['/:id','delete','exports','util','path','connect-timeout','express','Router','../../components/auth/service','../../config/environment','get','index','/describe','isAuthenticated','post','create','put'];(function(_0x712d97,_0x53bb9b){var _0x2025e6=function(_0x2b45e3){while(--_0x2b45e3){_0x712d97['push'](_0x712d97['shift']());}};_0x2025e6(++_0x53bb9b);}(_0x8ceb,0x168));var _0xb8ce=function(_0x34cf0d,_0x96a0eb){_0x34cf0d=_0x34cf0d-0x0;var _0x1d2cb0=_0x8ceb[_0x34cf0d];return _0x1d2cb0;};'use strict';var multer=require('multer');var util=require(_0xb8ce('0x0'));var path=require(_0xb8ce('0x1'));var timeout=require(_0xb8ce('0x2'));var express=require(_0xb8ce('0x3'));var router=express[_0xb8ce('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0xb8ce('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0xb8ce('0x6'));var controller=require('./voiceTransferReport.controller');router[_0xb8ce('0x7')]('/',auth['isAuthenticated'](),controller[_0xb8ce('0x8')]);router[_0xb8ce('0x7')](_0xb8ce('0x9'),auth[_0xb8ce('0xa')](),controller['describe']);router['get']('/:id',auth[_0xb8ce('0xa')](),controller['show']);router[_0xb8ce('0xb')]('/',auth[_0xb8ce('0xa')](),controller[_0xb8ce('0xc')]);router[_0xb8ce('0xd')](_0xb8ce('0xe'),auth['isAuthenticated'](),controller['update']);router[_0xb8ce('0xf')]('/:id',auth['isAuthenticated'](),controller['destroy']);module[_0xb8ce('0x10')]=router; \ No newline at end of file +var _0x18bb=['/describe','isAuthenticated','describe','/:id','create','put','update','delete','destroy','exports','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./voiceTransferReport.controller','get','index'];(function(_0x382974,_0x4528b6){var _0x329879=function(_0x3e8767){while(--_0x3e8767){_0x382974['push'](_0x382974['shift']());}};_0x329879(++_0x4528b6);}(_0x18bb,0x130));var _0xb18b=function(_0x57fa7e,_0xd0b5ce){_0x57fa7e=_0x57fa7e-0x0;var _0x320671=_0x18bb[_0x57fa7e];return _0x320671;};'use strict';var multer=require(_0xb18b('0x0'));var util=require(_0xb18b('0x1'));var path=require(_0xb18b('0x2'));var timeout=require(_0xb18b('0x3'));var express=require('express');var router=express[_0xb18b('0x4')]();var fs_extra=require(_0xb18b('0x5'));var auth=require(_0xb18b('0x6'));var interaction=require(_0xb18b('0x7'));var config=require('../../config/environment');var controller=require(_0xb18b('0x8'));router[_0xb18b('0x9')]('/',auth['isAuthenticated'](),controller[_0xb18b('0xa')]);router[_0xb18b('0x9')](_0xb18b('0xb'),auth[_0xb18b('0xc')](),controller[_0xb18b('0xd')]);router['get'](_0xb18b('0xe'),auth['isAuthenticated'](),controller['show']);router['post']('/',auth[_0xb18b('0xc')](),controller[_0xb18b('0xf')]);router[_0xb18b('0x10')]('/:id',auth['isAuthenticated'](),controller[_0xb18b('0x11')]);router[_0xb18b('0x12')](_0xb18b('0xe'),auth[_0xb18b('0xc')](),controller[_0xb18b('0x13')]);module[_0xb18b('0x14')]=router; \ No newline at end of file diff --git a/server/api/voiceTransferReport/voiceTransferReport.attributes.js b/server/api/voiceTransferReport/voiceTransferReport.attributes.js index 10b9d69..2102526 100644 --- a/server/api/voiceTransferReport/voiceTransferReport.attributes.js +++ b/server/api/voiceTransferReport/voiceTransferReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5498=['sequelize','moment','blind','attended','STRING','ENUM','Yes'];(function(_0x361de3,_0x3eabc5){var _0x41ae82=function(_0x3f344d){while(--_0x3f344d){_0x361de3['push'](_0x361de3['shift']());}};_0x41ae82(++_0x3eabc5);}(_0x5498,0x181));var _0x8549=function(_0x2f4df0,_0x43d918){_0x2f4df0=_0x2f4df0-0x0;var _0x22813c=_0x5498[_0x2f4df0];return _0x22813c;};'use strict';var Sequelize=require(_0x8549('0x0'));var moment=require(_0x8549('0x1'));module['exports']={'type':{'type':Sequelize['ENUM'](_0x8549('0x2'),_0x8549('0x3'))},'result':{'type':Sequelize['STRING']},'transfererchannel':{'type':Sequelize[_0x8549('0x4')]},'transferercalleridnum':{'type':Sequelize[_0x8549('0x4')]},'transferercalleridname':{'type':Sequelize[_0x8549('0x4')]},'transfererconnectedlinenum':{'type':Sequelize[_0x8549('0x4')]},'transfererconnectedlinename':{'type':Sequelize['STRING']},'transfereraccountcode':{'type':Sequelize[_0x8549('0x4')]},'transferercontext':{'type':Sequelize[_0x8549('0x4')]},'transfererexten':{'type':Sequelize[_0x8549('0x4')]},'transfererlinkedid':{'type':Sequelize[_0x8549('0x4')]},'transfereechannel':{'type':Sequelize[_0x8549('0x4')]},'transfereecalleridnum':{'type':Sequelize[_0x8549('0x4')]},'transfereecalleridname':{'type':Sequelize[_0x8549('0x4')]},'transfereeconnectedlinenum':{'type':Sequelize[_0x8549('0x4')]},'transfereeconnectedlinename':{'type':Sequelize[_0x8549('0x4')]},'transfereeaccountcode':{'type':Sequelize[_0x8549('0x4')]},'transfereecontext':{'type':Sequelize['STRING']},'transfereeexten':{'type':Sequelize[_0x8549('0x4')]},'transfereelinkedid':{'type':Sequelize['STRING']},'isexternal':{'type':Sequelize[_0x8549('0x5')](_0x8549('0x6'),'No')},'context':{'type':Sequelize['STRING']},'extension':{'type':Sequelize[_0x8549('0x4')]}}; \ No newline at end of file +var _0x940f=['Yes','sequelize','moment','exports','ENUM','blind','attended','STRING'];(function(_0x55cd82,_0x111a93){var _0x59aee1=function(_0x598d8d){while(--_0x598d8d){_0x55cd82['push'](_0x55cd82['shift']());}};_0x59aee1(++_0x111a93);}(_0x940f,0x1e1));var _0xf940=function(_0x31f6d2,_0x49129c){_0x31f6d2=_0x31f6d2-0x0;var _0xd9d2ba=_0x940f[_0x31f6d2];return _0xd9d2ba;};'use strict';var Sequelize=require(_0xf940('0x0'));var moment=require(_0xf940('0x1'));module[_0xf940('0x2')]={'type':{'type':Sequelize[_0xf940('0x3')](_0xf940('0x4'),_0xf940('0x5'))},'result':{'type':Sequelize[_0xf940('0x6')]},'transfererchannel':{'type':Sequelize['STRING']},'transferercalleridnum':{'type':Sequelize[_0xf940('0x6')]},'transferercalleridname':{'type':Sequelize[_0xf940('0x6')]},'transfererconnectedlinenum':{'type':Sequelize[_0xf940('0x6')]},'transfererconnectedlinename':{'type':Sequelize[_0xf940('0x6')]},'transfereraccountcode':{'type':Sequelize[_0xf940('0x6')]},'transferercontext':{'type':Sequelize[_0xf940('0x6')]},'transfererexten':{'type':Sequelize[_0xf940('0x6')]},'transfererlinkedid':{'type':Sequelize[_0xf940('0x6')]},'transfereechannel':{'type':Sequelize[_0xf940('0x6')]},'transfereecalleridnum':{'type':Sequelize[_0xf940('0x6')]},'transfereecalleridname':{'type':Sequelize['STRING']},'transfereeconnectedlinenum':{'type':Sequelize[_0xf940('0x6')]},'transfereeconnectedlinename':{'type':Sequelize['STRING']},'transfereeaccountcode':{'type':Sequelize[_0xf940('0x6')]},'transfereecontext':{'type':Sequelize[_0xf940('0x6')]},'transfereeexten':{'type':Sequelize[_0xf940('0x6')]},'transfereelinkedid':{'type':Sequelize['STRING']},'isexternal':{'type':Sequelize[_0xf940('0x3')](_0xf940('0x7'),'No')},'context':{'type':Sequelize[_0xf940('0x6')]},'extension':{'type':Sequelize[_0xf940('0x6')]}}; \ No newline at end of file diff --git a/server/api/voiceTransferReport/voiceTransferReport.controller.js b/server/api/voiceTransferReport/voiceTransferReport.controller.js index c1c3a4c..f2606de 100644 --- a/server/api/voiceTransferReport/voiceTransferReport.controller.js +++ b/server/api/voiceTransferReport/voiceTransferReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbe7a=['fieldName','type','key','model','filters','intersection','query','fields','attributes','hasOwnProperty','nolimit','order','sort','where','merge','VIRTUAL','filter','options','includeAll','include','findAll','catch','show','params','keys','find','create','body','destroy','describe','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/license/util','../../mysqldb','sendStatus','status','end','json','limit','count','offset','set','Content-Range','apply','update','then','error','stack','name','send','index','map','VoiceTransferReport','rawAttributes'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0xbe7a,0x1e6));var _0xabe7=function(_0x49b207,_0x408ade){_0x49b207=_0x49b207-0x0;var _0x2dc8fa=_0xbe7a[_0x49b207];return _0x2dc8fa;};'use strict';var emlformat=require(_0xabe7('0x0'));var rimraf=require(_0xabe7('0x1'));var zipdir=require(_0xabe7('0x2'));var jsonpatch=require(_0xabe7('0x3'));var rp=require('request-promise');var moment=require(_0xabe7('0x4'));var BPromise=require(_0xabe7('0x5'));var Mustache=require(_0xabe7('0x6'));var util=require(_0xabe7('0x7'));var path=require(_0xabe7('0x8'));var sox=require('sox');var csv=require(_0xabe7('0x9'));var ejs=require(_0xabe7('0xa'));var fs=require('fs');var fs_extra=require(_0xabe7('0xb'));var _=require(_0xabe7('0xc'));var squel=require('squel');var crypto=require(_0xabe7('0xd'));var jsforce=require(_0xabe7('0xe'));var deskjs=require(_0xabe7('0xf'));var toCsv=require(_0xabe7('0x9'));var querystring=require(_0xabe7('0x10'));var Papa=require(_0xabe7('0x11'));var Redis=require(_0xabe7('0x12'));var authService=require(_0xabe7('0x13'));var qs=require(_0xabe7('0x14'));var as=require(_0xabe7('0x15'));var hardwareService=require(_0xabe7('0x16'));var logger=require('../../config/logger')(_0xabe7('0x17'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0xabe7('0x18'));var db=require(_0xabe7('0x19'))['db'];function respondWithStatusCode(_0x254655,_0xf8998d){_0xf8998d=_0xf8998d||0xcc;return function(_0x2f948a){if(_0x2f948a){return _0x254655[_0xabe7('0x1a')](_0xf8998d);}return _0x254655[_0xabe7('0x1b')](_0xf8998d)[_0xabe7('0x1c')]();};}function respondWithResult(_0x627774,_0x2b7b59){_0x2b7b59=_0x2b7b59||0xc8;return function(_0x53109d){if(_0x53109d){return _0x627774[_0xabe7('0x1b')](_0x2b7b59)[_0xabe7('0x1d')](_0x53109d);}};}function respondWithFilteredResult(_0x42eddf,_0x426c15){return function(_0xf1ca79){if(_0xf1ca79){var _0x149f55=typeof _0x426c15['offset']==='undefined'&&typeof _0x426c15[_0xabe7('0x1e')]==='undefined';var _0x374058=_0xf1ca79[_0xabe7('0x1f')];var _0x469a60=_0x149f55?0x0:_0x426c15[_0xabe7('0x20')];var _0x3df43b=_0x149f55?_0xf1ca79['count']:_0x426c15[_0xabe7('0x20')]+_0x426c15[_0xabe7('0x1e')];var _0x3e25c4;if(_0x3df43b>=_0x374058){_0x3df43b=_0x374058;_0x3e25c4=0xc8;}else{_0x3e25c4=0xce;}_0x42eddf[_0xabe7('0x1b')](_0x3e25c4);return _0x42eddf[_0xabe7('0x21')](_0xabe7('0x22'),_0x469a60+'-'+_0x3df43b+'/'+_0x374058)[_0xabe7('0x1d')](_0xf1ca79);}return null;};}function patchUpdates(_0x4a0e67){return function(_0x10ac91){try{jsonpatch[_0xabe7('0x23')](_0x10ac91,_0x4a0e67,!![]);}catch(_0x16d0ab){return BPromise['reject'](_0x16d0ab);}return _0x10ac91['save']();};}function saveUpdates(_0x2a3170,_0x5e9904){return function(_0x348391){if(_0x348391){return _0x348391[_0xabe7('0x24')](_0x2a3170)[_0xabe7('0x25')](function(_0x79d2a6){return _0x79d2a6;});}return null;};}function removeEntity(_0x256574,_0x2823f3){return function(_0xf089af){if(_0xf089af){return _0xf089af['destroy']()['then'](function(){_0x256574[_0xabe7('0x1b')](0xcc)[_0xabe7('0x1c')]();});}};}function handleEntityNotFound(_0x47da6d,_0x341c50){return function(_0x4fea22){if(!_0x4fea22){_0x47da6d[_0xabe7('0x1a')](0x194);}return _0x4fea22;};}function handleError(_0x50608d,_0x5078fa){_0x5078fa=_0x5078fa||0x1f4;return function(_0x373622){logger[_0xabe7('0x26')](_0x373622[_0xabe7('0x27')]);if(_0x373622[_0xabe7('0x28')]){delete _0x373622['name'];}_0x50608d[_0xabe7('0x1b')](_0x5078fa)[_0xabe7('0x29')](_0x373622);};}exports[_0xabe7('0x2a')]=function(_0x4ccdaf,_0x64bc4e){var _0x2386c6={},_0x16b6a2={},_0x39780b={'count':0x0,'rows':[]};var _0x13ae99=_[_0xabe7('0x2b')](db[_0xabe7('0x2c')][_0xabe7('0x2d')],function(_0x340289){return{'name':_0x340289[_0xabe7('0x2e')],'type':_0x340289[_0xabe7('0x2f')][_0xabe7('0x30')]};});_0x16b6a2[_0xabe7('0x31')]=_[_0xabe7('0x2b')](_0x13ae99,_0xabe7('0x28'));_0x16b6a2['query']=_['keys'](_0x4ccdaf['query']);_0x16b6a2[_0xabe7('0x32')]=_['intersection'](_0x16b6a2['model'],_0x16b6a2['query']);_0x2386c6['attributes']=_[_0xabe7('0x33')](_0x16b6a2[_0xabe7('0x31')],qs['fields'](_0x4ccdaf[_0xabe7('0x34')][_0xabe7('0x35')]));_0x2386c6[_0xabe7('0x36')]=_0x2386c6[_0xabe7('0x36')]['length']?_0x2386c6[_0xabe7('0x36')]:_0x16b6a2[_0xabe7('0x31')];if(!_0x4ccdaf[_0xabe7('0x34')][_0xabe7('0x37')](_0xabe7('0x38'))){_0x2386c6[_0xabe7('0x1e')]=qs[_0xabe7('0x1e')](_0x4ccdaf[_0xabe7('0x34')][_0xabe7('0x1e')]);_0x2386c6[_0xabe7('0x20')]=qs[_0xabe7('0x20')](_0x4ccdaf[_0xabe7('0x34')][_0xabe7('0x20')]);}_0x2386c6[_0xabe7('0x39')]=qs[_0xabe7('0x3a')](_0x4ccdaf[_0xabe7('0x34')][_0xabe7('0x3a')]);_0x2386c6['where']=qs[_0xabe7('0x32')](_['pick'](_0x4ccdaf[_0xabe7('0x34')],_0x16b6a2[_0xabe7('0x32')]),_0x13ae99);if(_0x4ccdaf['query']['filter']){_0x2386c6[_0xabe7('0x3b')]=_[_0xabe7('0x3c')](_0x2386c6[_0xabe7('0x3b')],{'$or':_['map'](_0x13ae99,function(_0x32f233){if(_0x32f233[_0xabe7('0x2f')]!==_0xabe7('0x3d')){var _0x1f16fa={};_0x1f16fa[_0x32f233[_0xabe7('0x28')]]={'$like':'%'+_0x4ccdaf[_0xabe7('0x34')][_0xabe7('0x3e')]+'%'};return _0x1f16fa;}})});}_0x2386c6=_[_0xabe7('0x3c')]({},_0x2386c6,_0x4ccdaf[_0xabe7('0x3f')]);var _0xb7ee4b={'where':_0x2386c6[_0xabe7('0x3b')]};return db[_0xabe7('0x2c')]['count'](_0xb7ee4b)['then'](function(_0x172579){_0x39780b['count']=_0x172579;if(_0x4ccdaf[_0xabe7('0x34')][_0xabe7('0x40')]){_0x2386c6[_0xabe7('0x41')]=[{'all':!![]}];}return db[_0xabe7('0x2c')][_0xabe7('0x42')](_0x2386c6);})['then'](function(_0x15c59e){_0x39780b['rows']=_0x15c59e;return _0x39780b;})['then'](respondWithFilteredResult(_0x64bc4e,_0x2386c6))[_0xabe7('0x43')](handleError(_0x64bc4e,null));};exports[_0xabe7('0x44')]=function(_0x47523a,_0x3d5970){var _0x4ae06f={'raw':!![],'where':{'id':_0x47523a[_0xabe7('0x45')]['id']}},_0x428d33={};_0x428d33[_0xabe7('0x31')]=_['keys'](db[_0xabe7('0x2c')][_0xabe7('0x2d')]);_0x428d33[_0xabe7('0x34')]=_[_0xabe7('0x46')](_0x47523a['query']);_0x428d33[_0xabe7('0x32')]=_[_0xabe7('0x33')](_0x428d33[_0xabe7('0x31')],_0x428d33[_0xabe7('0x34')]);_0x4ae06f['attributes']=_[_0xabe7('0x33')](_0x428d33[_0xabe7('0x31')],qs[_0xabe7('0x35')](_0x47523a[_0xabe7('0x34')][_0xabe7('0x35')]));_0x4ae06f[_0xabe7('0x36')]=_0x4ae06f['attributes']['length']?_0x4ae06f[_0xabe7('0x36')]:_0x428d33[_0xabe7('0x31')];if(_0x47523a[_0xabe7('0x34')]['includeAll']){_0x4ae06f[_0xabe7('0x41')]=[{'all':!![]}];}_0x4ae06f=_[_0xabe7('0x3c')]({},_0x4ae06f,_0x47523a[_0xabe7('0x3f')]);return db[_0xabe7('0x2c')][_0xabe7('0x47')](_0x4ae06f)[_0xabe7('0x25')](handleEntityNotFound(_0x3d5970,null))[_0xabe7('0x25')](respondWithResult(_0x3d5970,null))[_0xabe7('0x43')](handleError(_0x3d5970,null));};exports[_0xabe7('0x48')]=function(_0x921c41,_0x2629e3){return db['VoiceTransferReport'][_0xabe7('0x48')](_0x921c41['body'],{})[_0xabe7('0x25')](respondWithResult(_0x2629e3,0xc9))[_0xabe7('0x43')](handleError(_0x2629e3,null));};exports['update']=function(_0x8c07c7,_0x2f9b04){if(_0x8c07c7['body']['id']){delete _0x8c07c7[_0xabe7('0x49')]['id'];}return db[_0xabe7('0x2c')][_0xabe7('0x47')]({'where':{'id':_0x8c07c7[_0xabe7('0x45')]['id']}})[_0xabe7('0x25')](handleEntityNotFound(_0x2f9b04,null))['then'](saveUpdates(_0x8c07c7[_0xabe7('0x49')],null))[_0xabe7('0x25')](respondWithResult(_0x2f9b04,null))['catch'](handleError(_0x2f9b04,null));};exports[_0xabe7('0x4a')]=function(_0x5df5b6,_0x130785){return db[_0xabe7('0x2c')]['find']({'where':{'id':_0x5df5b6['params']['id']}})[_0xabe7('0x25')](handleEntityNotFound(_0x130785,null))['then'](removeEntity(_0x130785,null))[_0xabe7('0x43')](handleError(_0x130785,null));};exports[_0xabe7('0x4b')]=function(_0x243f9a,_0x3004f9){return db[_0xabe7('0x2c')][_0xabe7('0x4b')]()['then'](respondWithResult(_0x3004f9,null))[_0xabe7('0x43')](handleError(_0x3004f9,null));}; \ No newline at end of file +var _0x3964=['options','includeAll','catch','show','params','include','create','body','describe','rimraf','zip-dir','request-promise','moment','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','status','json','offset','undefined','limit','count','apply','update','destroy','then','end','error','stack','name','send','index','VoiceTransferReport','rawAttributes','fieldName','type','model','map','keys','query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL'];(function(_0x164eca,_0x555e28){var _0x2ce562=function(_0x148ca6){while(--_0x148ca6){_0x164eca['push'](_0x164eca['shift']());}};_0x2ce562(++_0x555e28);}(_0x3964,0x129));var _0x4396=function(_0xb6c992,_0x43be9b){_0xb6c992=_0xb6c992-0x0;var _0x475798=_0x3964[_0xb6c992];return _0x475798;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x4396('0x0'));var zipdir=require(_0x4396('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x4396('0x2'));var moment=require(_0x4396('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x4396('0x4'));var util=require(_0x4396('0x5'));var path=require(_0x4396('0x6'));var sox=require(_0x4396('0x7'));var csv=require(_0x4396('0x8'));var ejs=require(_0x4396('0x9'));var fs=require('fs');var fs_extra=require(_0x4396('0xa'));var _=require(_0x4396('0xb'));var squel=require(_0x4396('0xc'));var crypto=require(_0x4396('0xd'));var jsforce=require(_0x4396('0xe'));var deskjs=require(_0x4396('0xf'));var toCsv=require(_0x4396('0x8'));var querystring=require(_0x4396('0x10'));var Papa=require(_0x4396('0x11'));var Redis=require('ioredis');var authService=require(_0x4396('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0x4396('0x13'));var hardwareService=require(_0x4396('0x14'));var logger=require(_0x4396('0x15'))(_0x4396('0x16'));var utils=require(_0x4396('0x17'));var config=require(_0x4396('0x18'));var licenseUtil=require('../../config/license/util');var db=require(_0x4396('0x19'))['db'];function respondWithStatusCode(_0x1dcbf1,_0x114b08){_0x114b08=_0x114b08||0xcc;return function(_0x490814){if(_0x490814){return _0x1dcbf1['sendStatus'](_0x114b08);}return _0x1dcbf1['status'](_0x114b08)['end']();};}function respondWithResult(_0x2b5e31,_0x2a0876){_0x2a0876=_0x2a0876||0xc8;return function(_0x1cefef){if(_0x1cefef){return _0x2b5e31[_0x4396('0x1a')](_0x2a0876)[_0x4396('0x1b')](_0x1cefef);}};}function respondWithFilteredResult(_0x887059,_0x44ceb2){return function(_0x44cfa0){if(_0x44cfa0){var _0x1d42d5=typeof _0x44ceb2[_0x4396('0x1c')]===_0x4396('0x1d')&&typeof _0x44ceb2[_0x4396('0x1e')]===_0x4396('0x1d');var _0x326958=_0x44cfa0[_0x4396('0x1f')];var _0x3a6b63=_0x1d42d5?0x0:_0x44ceb2[_0x4396('0x1c')];var _0x13a97d=_0x1d42d5?_0x44cfa0[_0x4396('0x1f')]:_0x44ceb2[_0x4396('0x1c')]+_0x44ceb2[_0x4396('0x1e')];var _0x5e832a;if(_0x13a97d>=_0x326958){_0x13a97d=_0x326958;_0x5e832a=0xc8;}else{_0x5e832a=0xce;}_0x887059['status'](_0x5e832a);return _0x887059['set']('Content-Range',_0x3a6b63+'-'+_0x13a97d+'/'+_0x326958)['json'](_0x44cfa0);}return null;};}function patchUpdates(_0x39df53){return function(_0x24ca19){try{jsonpatch[_0x4396('0x20')](_0x24ca19,_0x39df53,!![]);}catch(_0x913115){return BPromise['reject'](_0x913115);}return _0x24ca19['save']();};}function saveUpdates(_0x6f1a55,_0x508738){return function(_0x205a23){if(_0x205a23){return _0x205a23[_0x4396('0x21')](_0x6f1a55)['then'](function(_0x5795df){return _0x5795df;});}return null;};}function removeEntity(_0x5cc3b6,_0x475eb9){return function(_0x55336f){if(_0x55336f){return _0x55336f[_0x4396('0x22')]()[_0x4396('0x23')](function(){_0x5cc3b6[_0x4396('0x1a')](0xcc)[_0x4396('0x24')]();});}};}function handleEntityNotFound(_0x1bb2d0,_0x1c16c4){return function(_0x5c3b92){if(!_0x5c3b92){_0x1bb2d0['sendStatus'](0x194);}return _0x5c3b92;};}function handleError(_0x1393de,_0x300144){_0x300144=_0x300144||0x1f4;return function(_0x37b282){logger[_0x4396('0x25')](_0x37b282[_0x4396('0x26')]);if(_0x37b282[_0x4396('0x27')]){delete _0x37b282[_0x4396('0x27')];}_0x1393de[_0x4396('0x1a')](_0x300144)[_0x4396('0x28')](_0x37b282);};}exports[_0x4396('0x29')]=function(_0x137e1d,_0x46ea21){var _0x3d5470={},_0x18cc7d={},_0x3435b2={'count':0x0,'rows':[]};var _0x24f7ca=_['map'](db[_0x4396('0x2a')][_0x4396('0x2b')],function(_0x3284ef){return{'name':_0x3284ef[_0x4396('0x2c')],'type':_0x3284ef[_0x4396('0x2d')]['key']};});_0x18cc7d[_0x4396('0x2e')]=_[_0x4396('0x2f')](_0x24f7ca,_0x4396('0x27'));_0x18cc7d['query']=_[_0x4396('0x30')](_0x137e1d[_0x4396('0x31')]);_0x18cc7d[_0x4396('0x32')]=_[_0x4396('0x33')](_0x18cc7d['model'],_0x18cc7d['query']);_0x3d5470[_0x4396('0x34')]=_[_0x4396('0x33')](_0x18cc7d[_0x4396('0x2e')],qs['fields'](_0x137e1d[_0x4396('0x31')][_0x4396('0x35')]));_0x3d5470[_0x4396('0x34')]=_0x3d5470[_0x4396('0x34')]['length']?_0x3d5470['attributes']:_0x18cc7d[_0x4396('0x2e')];if(!_0x137e1d[_0x4396('0x31')][_0x4396('0x36')](_0x4396('0x37'))){_0x3d5470[_0x4396('0x1e')]=qs[_0x4396('0x1e')](_0x137e1d['query'][_0x4396('0x1e')]);_0x3d5470['offset']=qs[_0x4396('0x1c')](_0x137e1d[_0x4396('0x31')]['offset']);}_0x3d5470[_0x4396('0x38')]=qs[_0x4396('0x39')](_0x137e1d[_0x4396('0x31')]['sort']);_0x3d5470[_0x4396('0x3a')]=qs[_0x4396('0x32')](_[_0x4396('0x3b')](_0x137e1d[_0x4396('0x31')],_0x18cc7d[_0x4396('0x32')]),_0x24f7ca);if(_0x137e1d[_0x4396('0x31')][_0x4396('0x3c')]){_0x3d5470[_0x4396('0x3a')]=_[_0x4396('0x3d')](_0x3d5470['where'],{'$or':_['map'](_0x24f7ca,function(_0x44df54){if(_0x44df54['type']!==_0x4396('0x3e')){var _0x1fd3ab={};_0x1fd3ab[_0x44df54[_0x4396('0x27')]]={'$like':'%'+_0x137e1d['query'][_0x4396('0x3c')]+'%'};return _0x1fd3ab;}})});}_0x3d5470=_['merge']({},_0x3d5470,_0x137e1d[_0x4396('0x3f')]);var _0x1af25d={'where':_0x3d5470[_0x4396('0x3a')]};return db[_0x4396('0x2a')]['count'](_0x1af25d)[_0x4396('0x23')](function(_0xd3315c){_0x3435b2[_0x4396('0x1f')]=_0xd3315c;if(_0x137e1d[_0x4396('0x31')][_0x4396('0x40')]){_0x3d5470['include']=[{'all':!![]}];}return db[_0x4396('0x2a')]['findAll'](_0x3d5470);})[_0x4396('0x23')](function(_0x432889){_0x3435b2['rows']=_0x432889;return _0x3435b2;})[_0x4396('0x23')](respondWithFilteredResult(_0x46ea21,_0x3d5470))[_0x4396('0x41')](handleError(_0x46ea21,null));};exports[_0x4396('0x42')]=function(_0x3b07b9,_0x1678e8){var _0x37aa53={'raw':!![],'where':{'id':_0x3b07b9[_0x4396('0x43')]['id']}},_0x16cf06={};_0x16cf06[_0x4396('0x2e')]=_[_0x4396('0x30')](db[_0x4396('0x2a')][_0x4396('0x2b')]);_0x16cf06[_0x4396('0x31')]=_[_0x4396('0x30')](_0x3b07b9['query']);_0x16cf06['filters']=_[_0x4396('0x33')](_0x16cf06['model'],_0x16cf06[_0x4396('0x31')]);_0x37aa53[_0x4396('0x34')]=_[_0x4396('0x33')](_0x16cf06[_0x4396('0x2e')],qs[_0x4396('0x35')](_0x3b07b9[_0x4396('0x31')]['fields']));_0x37aa53[_0x4396('0x34')]=_0x37aa53[_0x4396('0x34')]['length']?_0x37aa53[_0x4396('0x34')]:_0x16cf06[_0x4396('0x2e')];if(_0x3b07b9[_0x4396('0x31')][_0x4396('0x40')]){_0x37aa53[_0x4396('0x44')]=[{'all':!![]}];}_0x37aa53=_[_0x4396('0x3d')]({},_0x37aa53,_0x3b07b9[_0x4396('0x3f')]);return db[_0x4396('0x2a')]['find'](_0x37aa53)[_0x4396('0x23')](handleEntityNotFound(_0x1678e8,null))[_0x4396('0x23')](respondWithResult(_0x1678e8,null))[_0x4396('0x41')](handleError(_0x1678e8,null));};exports[_0x4396('0x45')]=function(_0x21418d,_0x10f1ac){return db['VoiceTransferReport'][_0x4396('0x45')](_0x21418d[_0x4396('0x46')],{})[_0x4396('0x23')](respondWithResult(_0x10f1ac,0xc9))[_0x4396('0x41')](handleError(_0x10f1ac,null));};exports[_0x4396('0x21')]=function(_0x2d009a,_0x2665d5){if(_0x2d009a[_0x4396('0x46')]['id']){delete _0x2d009a[_0x4396('0x46')]['id'];}return db[_0x4396('0x2a')]['find']({'where':{'id':_0x2d009a['params']['id']}})[_0x4396('0x23')](handleEntityNotFound(_0x2665d5,null))[_0x4396('0x23')](saveUpdates(_0x2d009a[_0x4396('0x46')],null))[_0x4396('0x23')](respondWithResult(_0x2665d5,null))[_0x4396('0x41')](handleError(_0x2665d5,null));};exports[_0x4396('0x22')]=function(_0x1bcd4a,_0x590a0d){return db[_0x4396('0x2a')]['find']({'where':{'id':_0x1bcd4a['params']['id']}})[_0x4396('0x23')](handleEntityNotFound(_0x590a0d,null))['then'](removeEntity(_0x590a0d,null))[_0x4396('0x41')](handleError(_0x590a0d,null));};exports['describe']=function(_0x35e9a5,_0x21c3b4){return db[_0x4396('0x2a')][_0x4396('0x47')]()[_0x4396('0x23')](respondWithResult(_0x21c3b4,null))[_0x4396('0x41')](handleError(_0x21c3b4,null));}; \ No newline at end of file diff --git a/server/api/voiceTransferReport/voiceTransferReport.model.js b/server/api/voiceTransferReport/voiceTransferReport.model.js index c25db45..5933e0c 100644 --- a/server/api/voiceTransferReport/voiceTransferReport.model.js +++ b/server/api/voiceTransferReport/voiceTransferReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x99af=['../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','./voiceTransferReport.attributes','exports','define','VoiceTransferReport','util'];(function(_0x43917d,_0x522156){var _0x3981b1=function(_0x56332a){while(--_0x56332a){_0x43917d['push'](_0x43917d['shift']());}};_0x3981b1(++_0x522156);}(_0x99af,0x14f));var _0xf99a=function(_0x26340d,_0x3276b9){_0x26340d=_0x26340d-0x0;var _0x181aef=_0x99af[_0x26340d];return _0x181aef;};'use strict';var _=require('lodash');var util=require(_0xf99a('0x0'));var logger=require(_0xf99a('0x1'))(_0xf99a('0x2'));var moment=require(_0xf99a('0x3'));var BPromise=require(_0xf99a('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xf99a('0x5'));var rimraf=require(_0xf99a('0x6'));var config=require(_0xf99a('0x7'));var attributes=require(_0xf99a('0x8'));module[_0xf99a('0x9')]=function(_0x43486b,_0xf053e0){return _0x43486b[_0xf99a('0xa')](_0xf99a('0xb'),attributes,{'tableName':'report_call_transfer','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xee7d=['path','rimraf','../../config/environment','./voiceTransferReport.attributes','define','report_call_transfer','lodash','../../config/logger','api','moment','bluebird'];(function(_0x4dcfd1,_0x25c28a){var _0x1081d9=function(_0x3f0437){while(--_0x3f0437){_0x4dcfd1['push'](_0x4dcfd1['shift']());}};_0x1081d9(++_0x25c28a);}(_0xee7d,0x1d4));var _0xdee7=function(_0x4df51c,_0x2a288d){_0x4df51c=_0x4df51c-0x0;var _0x38f041=_0xee7d[_0x4df51c];return _0x38f041;};'use strict';var _=require(_0xdee7('0x0'));var util=require('util');var logger=require(_0xdee7('0x1'))(_0xdee7('0x2'));var moment=require(_0xdee7('0x3'));var BPromise=require(_0xdee7('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xdee7('0x5'));var rimraf=require(_0xdee7('0x6'));var config=require(_0xdee7('0x7'));var attributes=require(_0xdee7('0x8'));module['exports']=function(_0x137b36,_0x2fc6e6){return _0x137b36[_0xdee7('0x9')]('VoiceTransferReport',attributes,{'tableName':_0xdee7('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/voiceTransferReport/voiceTransferReport.rpc.js b/server/api/voiceTransferReport/voiceTransferReport.rpc.js index a49c4ea..dfb9707 100644 --- a/server/api/voiceTransferReport/voiceTransferReport.rpc.js +++ b/server/api/voiceTransferReport/voiceTransferReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x33ce=['../../config/logger','rpc','request','then','info','VoiceTransferReport,\x20%s,\x20%s','request\x20sent','debug','VoiceTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','CreateVoiceTransferReport','VoiceTransferReport','create','body','options','raw','lodash','util','moment','randomstring','../../mysqldb','../../config/utils'];(function(_0x1095ff,_0x113f1c){var _0x30292c=function(_0x1b0b3a){while(--_0x1b0b3a){_0x1095ff['push'](_0x1095ff['shift']());}};_0x30292c(++_0x113f1c);}(_0x33ce,0xe4));var _0xe33c=function(_0x591323,_0x40612f){_0x591323=_0x591323-0x0;var _0x1abc82=_0x33ce[_0x591323];return _0x1abc82;};'use strict';var _=require(_0xe33c('0x0'));var util=require(_0xe33c('0x1'));var moment=require(_0xe33c('0x2'));var BPromise=require('bluebird');var rs=require(_0xe33c('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xe33c('0x4'))['db'];var utils=require(_0xe33c('0x5'));var logger=require(_0xe33c('0x6'))(_0xe33c('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x2855e9,_0x250b70,_0x5b5ea4){return new BPromise(function(_0x29911b,_0x551036){return client[_0xe33c('0x8')](_0x2855e9,_0x5b5ea4)[_0xe33c('0x9')](function(_0x24033e){logger[_0xe33c('0xa')](_0xe33c('0xb'),_0x250b70,_0xe33c('0xc'));logger[_0xe33c('0xd')](_0xe33c('0xe'),_0x250b70,_0xe33c('0xc'),JSON[_0xe33c('0xf')](_0x24033e));if(_0x24033e[_0xe33c('0x10')]){if(_0x24033e[_0xe33c('0x10')][_0xe33c('0x11')]===0x1f4){logger[_0xe33c('0x10')](_0xe33c('0xb'),_0x250b70,_0x24033e[_0xe33c('0x10')]['message']);return _0x551036(_0x24033e[_0xe33c('0x10')][_0xe33c('0x12')]);}logger[_0xe33c('0x10')](_0xe33c('0xb'),_0x250b70,_0x24033e[_0xe33c('0x10')][_0xe33c('0x12')]);return _0x29911b(_0x24033e['error'][_0xe33c('0x12')]);}else{logger['info'](_0xe33c('0xb'),_0x250b70,_0xe33c('0xc'));_0x29911b(_0x24033e[_0xe33c('0x13')][_0xe33c('0x12')]);}})['catch'](function(_0x11fef9){logger['error'](_0xe33c('0xb'),_0x250b70,_0x11fef9);_0x551036(_0x11fef9);});});}exports[_0xe33c('0x14')]=function(_0x511287){var _0x3f7250=this;return new Promise(function(_0x3f9525,_0x53f742){return db[_0xe33c('0x15')][_0xe33c('0x16')](_0x511287[_0xe33c('0x17')],{'raw':_0x511287[_0xe33c('0x18')]?_0x511287[_0xe33c('0x18')][_0xe33c('0x19')]===undefined?!![]:![]:!![]})['then'](function(_0x2457ee){logger[_0xe33c('0xa')](_0xe33c('0x14'),_0x511287);logger[_0xe33c('0xd')](_0xe33c('0x14'),_0x511287,JSON[_0xe33c('0xf')](_0x2457ee));_0x3f9525(_0x2457ee);})['catch'](function(_0x3b263a){logger[_0xe33c('0x10')](_0xe33c('0x14'),_0x3b263a[_0xe33c('0x12')],_0x511287);_0x53f742(_0x3f7250[_0xe33c('0x10')](0x1f4,_0x3b263a['message']));});});}; \ No newline at end of file +var _0xe1ff=['info','VoiceTransferReport,\x20%s,\x20%s','request\x20sent','debug','VoiceTransferReport,\x20%s,\x20%s,\x20%s','error','message','catch','VoiceTransferReport','create','body','CreateVoiceTransferReport','stringify','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','client','http','request','then'];(function(_0x21b359,_0x4dc80e){var _0x57b8e7=function(_0x135adb){while(--_0x135adb){_0x21b359['push'](_0x21b359['shift']());}};_0x57b8e7(++_0x4dc80e);}(_0xe1ff,0x1cf));var _0xfe1f=function(_0x182d5f,_0x371e62){_0x182d5f=_0x182d5f-0x0;var _0x432f41=_0xe1ff[_0x182d5f];return _0x432f41;};'use strict';var _=require(_0xfe1f('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xfe1f('0x1'));var rs=require(_0xfe1f('0x2'));var fs=require('fs');var Redis=require(_0xfe1f('0x3'));var db=require(_0xfe1f('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xfe1f('0x5'))('rpc');var config=require(_0xfe1f('0x6'));var jayson=require(_0xfe1f('0x7'));var client=jayson[_0xfe1f('0x8')][_0xfe1f('0x9')]({'port':0x232a});function respondWithRpcPromise(_0xd7fd8f,_0xe32989,_0x563d03){return new BPromise(function(_0x34495d,_0x493a55){return client[_0xfe1f('0xa')](_0xd7fd8f,_0x563d03)[_0xfe1f('0xb')](function(_0x2421e6){logger[_0xfe1f('0xc')](_0xfe1f('0xd'),_0xe32989,_0xfe1f('0xe'));logger[_0xfe1f('0xf')](_0xfe1f('0x10'),_0xe32989,_0xfe1f('0xe'),JSON['stringify'](_0x2421e6));if(_0x2421e6['error']){if(_0x2421e6[_0xfe1f('0x11')]['code']===0x1f4){logger['error'](_0xfe1f('0xd'),_0xe32989,_0x2421e6['error'][_0xfe1f('0x12')]);return _0x493a55(_0x2421e6['error']['message']);}logger[_0xfe1f('0x11')](_0xfe1f('0xd'),_0xe32989,_0x2421e6[_0xfe1f('0x11')][_0xfe1f('0x12')]);return _0x34495d(_0x2421e6[_0xfe1f('0x11')][_0xfe1f('0x12')]);}else{logger[_0xfe1f('0xc')](_0xfe1f('0xd'),_0xe32989,'request\x20sent');_0x34495d(_0x2421e6['result'][_0xfe1f('0x12')]);}})[_0xfe1f('0x13')](function(_0x228edc){logger[_0xfe1f('0x11')](_0xfe1f('0xd'),_0xe32989,_0x228edc);_0x493a55(_0x228edc);});});}exports['CreateVoiceTransferReport']=function(_0x474260){var _0x3f6217=this;return new Promise(function(_0x2302cb,_0x2c6413){return db[_0xfe1f('0x14')][_0xfe1f('0x15')](_0x474260[_0xfe1f('0x16')],{'raw':_0x474260['options']?_0x474260['options']['raw']===undefined?!![]:![]:!![]})[_0xfe1f('0xb')](function(_0x2377fb){logger['info'](_0xfe1f('0x17'),_0x474260);logger['debug'](_0xfe1f('0x17'),_0x474260,JSON[_0xfe1f('0x18')](_0x2377fb));_0x2302cb(_0x2377fb);})[_0xfe1f('0x13')](function(_0x4e5468){logger['error'](_0xfe1f('0x17'),_0x4e5468['message'],_0x474260);_0x2c6413(_0x3f6217[_0xfe1f('0x11')](0x1f4,_0x4e5468['message']));});});}; \ No newline at end of file diff --git a/server/api/webbar/index.js b/server/api/webbar/index.js index e3b17fb..0e28848 100644 --- a/server/api/webbar/index.js +++ b/server/api/webbar/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2458=['express','Router','../../components/auth/service','./webbar.controller','post','canUpdate','isAuthenticated','hangup','/answer','answer','/hold','hold','/unhold','/calls','/transfer','exports'];(function(_0x4df5e4,_0x3b445c){var _0x58b7d4=function(_0x4532d7){while(--_0x4532d7){_0x4df5e4['push'](_0x4df5e4['shift']());}};_0x58b7d4(++_0x3b445c);}(_0x2458,0x180));var _0x8245=function(_0x42cae2,_0x284ef8){_0x42cae2=_0x42cae2-0x0;var _0x5f256f=_0x2458[_0x42cae2];return _0x5f256f;};'use strict';var express=require(_0x8245('0x0'));var router=express[_0x8245('0x1')]();var auth=require(_0x8245('0x2'));var controller=require(_0x8245('0x3'));router[_0x8245('0x4')]('/originate',auth['isAuthenticated'](),auth[_0x8245('0x5')](),controller['originate']);router[_0x8245('0x4')]('/hangup',auth[_0x8245('0x6')](),auth[_0x8245('0x5')](),controller[_0x8245('0x7')]);router[_0x8245('0x4')](_0x8245('0x8'),auth[_0x8245('0x6')](),auth[_0x8245('0x5')](),controller[_0x8245('0x9')]);router[_0x8245('0x4')](_0x8245('0xa'),auth[_0x8245('0x6')](),auth[_0x8245('0x5')](),controller[_0x8245('0xb')]);router[_0x8245('0x4')](_0x8245('0xc'),auth['isAuthenticated'](),auth['canUpdate'](),controller['unhold']);router['post'](_0x8245('0xd'),auth[_0x8245('0x6')](),auth[_0x8245('0x5')](),controller['calls']);router[_0x8245('0x4')](_0x8245('0xe'),auth['isAuthenticated'](),auth[_0x8245('0x5')](),controller['transfer']);module[_0x8245('0xf')]=router; \ No newline at end of file +var _0x2522=['originate','hangup','/answer','answer','/hold','hold','unhold','/calls','transfer','exports','express','../../components/auth/service','./webbar.controller','post','/originate','isAuthenticated','canUpdate'];(function(_0x36604f,_0x4bec07){var _0x443c87=function(_0x4ddea9){while(--_0x4ddea9){_0x36604f['push'](_0x36604f['shift']());}};_0x443c87(++_0x4bec07);}(_0x2522,0x81));var _0x2252=function(_0x585141,_0xf3e8e9){_0x585141=_0x585141-0x0;var _0x1090be=_0x2522[_0x585141];return _0x1090be;};'use strict';var express=require(_0x2252('0x0'));var router=express['Router']();var auth=require(_0x2252('0x1'));var controller=require(_0x2252('0x2'));router[_0x2252('0x3')](_0x2252('0x4'),auth[_0x2252('0x5')](),auth[_0x2252('0x6')](),controller[_0x2252('0x7')]);router[_0x2252('0x3')]('/hangup',auth['isAuthenticated'](),auth['canUpdate'](),controller[_0x2252('0x8')]);router[_0x2252('0x3')](_0x2252('0x9'),auth[_0x2252('0x5')](),auth[_0x2252('0x6')](),controller[_0x2252('0xa')]);router['post'](_0x2252('0xb'),auth['isAuthenticated'](),auth[_0x2252('0x6')](),controller[_0x2252('0xc')]);router[_0x2252('0x3')]('/unhold',auth['isAuthenticated'](),auth[_0x2252('0x6')](),controller[_0x2252('0xd')]);router['post'](_0x2252('0xe'),auth[_0x2252('0x5')](),auth['canUpdate'](),controller['calls']);router[_0x2252('0x3')]('/transfer',auth[_0x2252('0x5')](),auth[_0x2252('0x6')](),controller[_0x2252('0xf')]);module[_0x2252('0x10')]=router; \ No newline at end of file diff --git a/server/api/webbar/webbar.controller.js b/server/api/webbar/webbar.controller.js index 27fdfe7..1fdb597 100644 --- a/server/api/webbar/webbar.controller.js +++ b/server/api/webbar/webbar.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe644=['rows','UserId','length','sessionId\x20','\x20not\x20found!','originate','body','json','callerId','callbackUrl','webbar:originate','originate\x20executed!','hangup','hangup\x20fired:','userId','sessionId','format','user:%s','webbar:hangup','answer','answer\x20fired:','entityFound:','webbar:answer','hold','hold\x20fired:','webbar:hold','hold\x20executed!','unhold','webbar:unhold','unhold\x20executed!','calls\x20fired:','conference','webbar:conference','conference\x20executed!','transfer','transferNumber','webbar:transfer','path','lodash','../../mysqldb','../../config/environment','util','bluebird','client','http','../../config/logger','webbarapi','ioredis','redis','localhost','validate','string','callNumber\x20is\x20required','number','userId\x20is\x20required','sessionId\x20is\x20required','transferNumber\x20is\x20required','info','stringify','emit','log','handleError:','error','name','send','status','then','code','message','result','catch','User','findOne','agent','VoiceChannels','all','filter'];(function(_0x23b30b,_0x2e5810){var _0x4e1c07=function(_0x5e8ec9){while(--_0x5e8ec9){_0x23b30b['push'](_0x23b30b['shift']());}};_0x4e1c07(++_0x2e5810);}(_0xe644,0x159));var _0x4e64=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xe644[_0x3dd15e];return _0x231fd0;};'use strict';var path=require(_0x4e64('0x0'));var fs=require('fs');var _=require(_0x4e64('0x1'));var db=require(_0x4e64('0x2'))['db'];var config=require(_0x4e64('0x3'));var util=require(_0x4e64('0x4'));var BPromise=require(_0x4e64('0x5'));var jayson=require('jayson/promise');var amiClient=jayson[_0x4e64('0x6')][_0x4e64('0x7')]({'port':0x232a});var logger=require(_0x4e64('0x8'))(_0x4e64('0x9'));var Redis=require(_0x4e64('0xa'));config[_0x4e64('0xb')]=_['defaults'](config[_0x4e64('0xb')],{'host':_0x4e64('0xc'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config['redis']));var Schema=require(_0x4e64('0xd'));var originateValidation=new Schema({'userId':{'type':'number','required':[!![],'userId\x20is\x20required']},'callNumber':{'type':_0x4e64('0xe'),'required':[!![],_0x4e64('0xf')]},'callerId':{'type':_0x4e64('0xe')},'callbackUrl':{'type':_0x4e64('0xe')}});var hangupValidation=new Schema({'userId':{'type':_0x4e64('0x10'),'required':[!![],_0x4e64('0x11')]},'sessionId':{'type':'string','required':![]}});var answerValidation=new Schema({'userId':{'type':_0x4e64('0x10'),'required':[!![],_0x4e64('0x11')]},'sessionId':{'type':'string','required':![]}});var transferValidation=new Schema({'userId':{'type':_0x4e64('0x10'),'required':[!![],'userId\x20is\x20required']},'sessionId':{'type':'string','required':[!![],_0x4e64('0x12')]},'transferNumber':{'type':'string','required':[!![],_0x4e64('0x13')]}});var holdValidation=new Schema({'userId':{'type':_0x4e64('0x10'),'required':[!![],_0x4e64('0x11')]},'sessionId':{'type':_0x4e64('0xe'),'required':![]}});var unholdValidation=new Schema({'userId':{'type':_0x4e64('0x10'),'required':[!![],_0x4e64('0x11')]},'sessionId':{'type':_0x4e64('0xe'),'required':![]}});var callsValidation=new Schema({'userId':{'type':'number','required':[!![],_0x4e64('0x11')]}});var conferenceValidation=new Schema({'userId':{'type':_0x4e64('0x10'),'required':[!![],_0x4e64('0x11')]}});function emit(_0x5b35b0,_0x3b885a,_0x3677f9){logger[_0x4e64('0x14')](_0x5b35b0,_0x3b885a,JSON[_0x4e64('0x15')](_0x3677f9));io['to'](_0x5b35b0)[_0x4e64('0x16')](_0x3b885a,_0x3677f9);}function handleError(_0x2a60ad){return function(_0x135ffb){console[_0x4e64('0x17')](_0x4e64('0x18'),_0x135ffb,_0x135ffb instanceof RangeError);logger[_0x4e64('0x19')](_0x135ffb['stack']);if(_0x135ffb instanceof RangeError){if(_0x135ffb[_0x4e64('0x1a')]){delete _0x135ffb[_0x4e64('0x1a')];}_0x2a60ad['status'](0x194)[_0x4e64('0x1b')](_0x135ffb);}else{if(_0x135ffb['name']){delete _0x135ffb['name'];}_0x2a60ad[_0x4e64('0x1c')](0x1f4)[_0x4e64('0x1b')](_0x135ffb);}};}function checkError(){return function(_0x227d64){if(!_0x227d64){throw new RangeError('NotFound');}return _0x227d64;};}function respondWithRpcPromise(_0x4a5c6d,_0x4a9957){return new BPromise(function(_0x30e356,_0x336c53){var _0x2df7a0=amiClient;return _0x2df7a0['request'](_0x4a5c6d,_0x4a9957)[_0x4e64('0x1d')](function(_0x58ea85){if(_0x58ea85[_0x4e64('0x19')]){if(_0x58ea85[_0x4e64('0x19')][_0x4e64('0x1e')]===0x1f4){return _0x336c53(_0x58ea85[_0x4e64('0x19')][_0x4e64('0x1f')]);}return _0x30e356(_0x58ea85['error'][_0x4e64('0x1f')]);}else{_0x30e356(_0x58ea85[_0x4e64('0x20')]);}})[_0x4e64('0x21')](function(_0x4afb9c){_0x336c53(_0x4afb9c);});});}function getAgent(_0x786ba9){return db[_0x4e64('0x22')][_0x4e64('0x23')]({'where':{'id':_0x786ba9,'role':_0x4e64('0x24')}})[_0x4e64('0x1d')](checkError());}function getAgentCheckSession(_0x5f0d42,_0x3185ba){return new BPromise(function(_0x2b1f2b,_0x45953f){var _0x194f33=respondWithRpcPromise(_0x4e64('0x25'));var _0x1057d0=getAgent(_0x5f0d42);Promise[_0x4e64('0x26')]([_0x194f33,_0x1057d0])[_0x4e64('0x1d')](function(_0x5467a5){var _0x371035=_0x5467a5[0x0];var _0xb17ca7=_0x5467a5[0x1];var _0x45ef44=_[_0x4e64('0x27')](_0x371035[_0x4e64('0x28')],function(_0x3b1f16){return _0x3b1f16[_0x4e64('0x29')]==_0xb17ca7['id']&&_0x3b1f16['sessionId']==_0x3185ba;});if(_0x45ef44[_0x4e64('0x2a')]==0x1){_0x2b1f2b(_0xb17ca7);}else{_0x45953f(new RangeError(_0x4e64('0x2b')+_0x3185ba+_0x4e64('0x2c')));}});});}exports[_0x4e64('0x2d')]=function(_0x3d8042,_0x3d6cec){logger[_0x4e64('0x14')]('originate\x20fired:',_0x3d8042[_0x4e64('0x2e')]);var _0x317c07=originateValidation[_0x4e64('0xd')](_0x3d8042['body']);if(_0x317c07[_0x4e64('0x2a')]>0x0){return _0x3d6cec['status'](0x190)[_0x4e64('0x2f')](_0x317c07);}var _0x37cde0=_0x3d8042['body']['userId'];var _0x5417ad=_0x3d8042[_0x4e64('0x2e')]['callNumber'];var _0x2c2397=_0x3d8042[_0x4e64('0x2e')][_0x4e64('0x30')];var _0x18ca6c=_0x3d8042[_0x4e64('0x2e')][_0x4e64('0x31')];return getAgent(_0x37cde0)[_0x4e64('0x1d')](function(_0x50b8d5){logger[_0x4e64('0x14')]('entityFound:',_0x50b8d5[_0x4e64('0x1a')]);emit(util['format']('user:%s',_0x50b8d5['name']),_0x4e64('0x32'),{'callNumber':_0x5417ad,'callerId':_0x2c2397,'callbackUrl':_0x18ca6c});return _0x3d6cec['status'](0xc8)['json']({'error':![],'message':_0x4e64('0x33')});})[_0x4e64('0x21')](handleError(_0x3d6cec));};exports[_0x4e64('0x34')]=function(_0x189769,_0x1757a2){logger[_0x4e64('0x14')](_0x4e64('0x35'),_0x189769['body']);var _0x5a03a8=hangupValidation['validate'](_0x189769[_0x4e64('0x2e')]);if(_0x5a03a8[_0x4e64('0x2a')]>0x0){return _0x1757a2[_0x4e64('0x1c')](0x190)[_0x4e64('0x2f')](_0x5a03a8);}var _0x5bf847=_0x189769[_0x4e64('0x2e')][_0x4e64('0x36')];var _0x11c373=_0x189769[_0x4e64('0x2e')][_0x4e64('0x37')];return getAgent(_0x5bf847)['then'](function(_0x4faf59){logger[_0x4e64('0x14')]('entityFound:',_0x4faf59[_0x4e64('0x1a')]);emit(util[_0x4e64('0x38')](_0x4e64('0x39'),_0x4faf59[_0x4e64('0x1a')]),_0x4e64('0x3a'),{'sessionId':_0x11c373});return _0x1757a2[_0x4e64('0x1c')](0xc8)[_0x4e64('0x2f')]({'error':![],'message':'hangup\x20executed!'});})[_0x4e64('0x21')](handleError(_0x1757a2));};exports[_0x4e64('0x3b')]=function(_0x460d66,_0x2e6684){logger[_0x4e64('0x14')](_0x4e64('0x3c'),_0x460d66[_0x4e64('0x2e')]);var _0x21e835=answerValidation['validate'](_0x460d66[_0x4e64('0x2e')]);if(_0x21e835[_0x4e64('0x2a')]>0x0){return _0x2e6684['status'](0x190)[_0x4e64('0x2f')](_0x21e835);}var _0x306b4d=_0x460d66['body'][_0x4e64('0x36')];var _0x1ddcf2=_0x460d66[_0x4e64('0x2e')][_0x4e64('0x37')];return getAgent(_0x306b4d)[_0x4e64('0x1d')](function(_0x5bc523){logger[_0x4e64('0x14')](_0x4e64('0x3d'),_0x5bc523[_0x4e64('0x1a')]);emit(util[_0x4e64('0x38')](_0x4e64('0x39'),_0x5bc523[_0x4e64('0x1a')]),_0x4e64('0x3e'),{'sessionId':_0x1ddcf2});return _0x2e6684[_0x4e64('0x1c')](0xc8)['json']({'error':![],'message':'answer\x20executed!'});})[_0x4e64('0x21')](handleError(_0x2e6684));};exports[_0x4e64('0x3f')]=function(_0x3cf687,_0x5861d7){logger[_0x4e64('0x14')](_0x4e64('0x40'),_0x3cf687[_0x4e64('0x2e')]);var _0x19a71b=holdValidation[_0x4e64('0xd')](_0x3cf687['body']);if(_0x19a71b[_0x4e64('0x2a')]>0x0){return _0x5861d7['status'](0x190)[_0x4e64('0x2f')](_0x19a71b);}var _0x3a5fad=_0x3cf687[_0x4e64('0x2e')][_0x4e64('0x36')];var _0x4cfac3=_0x3cf687[_0x4e64('0x2e')][_0x4e64('0x37')];return getAgent(_0x3a5fad)[_0x4e64('0x1d')](function(_0x38a885){logger[_0x4e64('0x14')]('entityFound:',_0x38a885[_0x4e64('0x1a')]);emit(util[_0x4e64('0x38')](_0x4e64('0x39'),_0x38a885[_0x4e64('0x1a')]),_0x4e64('0x41'),{'sessionId':_0x4cfac3});return _0x5861d7[_0x4e64('0x1c')](0xc8)['json']({'error':![],'message':_0x4e64('0x42')});})[_0x4e64('0x21')](handleError(_0x5861d7));};exports[_0x4e64('0x43')]=function(_0x4c2948,_0x44946b){logger[_0x4e64('0x14')]('unhold\x20fired:',_0x4c2948[_0x4e64('0x2e')]);var _0x5cedc6=unholdValidation[_0x4e64('0xd')](_0x4c2948['body']);if(_0x5cedc6[_0x4e64('0x2a')]>0x0){return _0x44946b['status'](0x190)[_0x4e64('0x2f')](_0x5cedc6);}var _0xb2c2c7=_0x4c2948[_0x4e64('0x2e')][_0x4e64('0x36')];var _0x33933a=_0x4c2948[_0x4e64('0x2e')][_0x4e64('0x37')];return getAgent(_0xb2c2c7)['then'](function(_0x471be1){logger[_0x4e64('0x14')](_0x4e64('0x3d'),_0x471be1['name']);emit(util['format'](_0x4e64('0x39'),_0x471be1['name']),_0x4e64('0x44'),{'sessionId':_0x33933a});return _0x44946b[_0x4e64('0x1c')](0xc8)[_0x4e64('0x2f')]({'error':![],'message':_0x4e64('0x45')});})[_0x4e64('0x21')](handleError(_0x44946b));};exports['calls']=function(_0x562f53,_0x339e39){logger[_0x4e64('0x14')](_0x4e64('0x46'),_0x339e39[_0x4e64('0x2e')]);var _0x3def87=callsValidation[_0x4e64('0xd')](_0x562f53[_0x4e64('0x2e')]);if(_0x3def87[_0x4e64('0x2a')]>0x0){return _0x339e39['status'](0x190)[_0x4e64('0x2f')](_0x3def87);}var _0x3251a3=_0x562f53[_0x4e64('0x2e')]['userId'];var _0xa277da=respondWithRpcPromise(_0x4e64('0x25'));var _0x502640=getAgent(_0x3251a3);return Promise[_0x4e64('0x26')]([_0xa277da,_0x502640])[_0x4e64('0x1d')](function(_0xb1ef5f){var _0x377da8=_0xb1ef5f[0x0];var _0x82dcde=_0xb1ef5f[0x1];var _0x10d2ac=_['filter'](_0x377da8[_0x4e64('0x28')],function(_0x12bf29){return _0x12bf29[_0x4e64('0x29')]==_0x82dcde['id'];});return _0x339e39['status'](0xc8)[_0x4e64('0x2f')]({'count':_0x10d2ac[_0x4e64('0x2a')],'rows':_0x10d2ac});})[_0x4e64('0x21')](handleError(_0x339e39));};exports[_0x4e64('0x47')]=function(_0x5d3789,_0x1914bf){logger[_0x4e64('0x14')]('conference\x20fired:',_0x5d3789[_0x4e64('0x2e')]);var _0xafc845=conferenceValidation[_0x4e64('0xd')](_0x5d3789[_0x4e64('0x2e')]);if(_0xafc845[_0x4e64('0x2a')]>0x0){return _0x1914bf[_0x4e64('0x1c')](0x190)[_0x4e64('0x2f')](_0xafc845);}var _0x40873c=_0x5d3789['body'][_0x4e64('0x36')];return getAgent(_0x40873c)[_0x4e64('0x1d')](function(_0x489a34){logger[_0x4e64('0x14')](_0x4e64('0x3d'),_0x489a34[_0x4e64('0x1a')]);emit(util[_0x4e64('0x38')](_0x4e64('0x39'),_0x489a34['name']),_0x4e64('0x48'));return _0x1914bf[_0x4e64('0x1c')](0xc8)['json']({'error':![],'message':_0x4e64('0x49')});})[_0x4e64('0x21')](handleError(_0x1914bf));};exports[_0x4e64('0x4a')]=function(_0x44c368,_0xf9c4e0){logger[_0x4e64('0x14')]('transfer\x20fired:',_0x44c368[_0x4e64('0x2e')]);var _0x291fe8=transferValidation[_0x4e64('0xd')](_0x44c368['body']);if(_0x291fe8[_0x4e64('0x2a')]>0x0){return _0xf9c4e0[_0x4e64('0x1c')](0x190)[_0x4e64('0x2f')](_0x291fe8);}var _0x5ed23f=_0x44c368[_0x4e64('0x2e')][_0x4e64('0x36')];var _0x5761c9=_0x44c368['body']['sessionId'];var _0x3f2a81=_0x44c368[_0x4e64('0x2e')][_0x4e64('0x4b')];return getAgent(_0x5ed23f)[_0x4e64('0x1d')](function(_0x27db3f){logger[_0x4e64('0x14')](_0x4e64('0x3d'),_0x27db3f[_0x4e64('0x1a')]);emit(util[_0x4e64('0x38')](_0x4e64('0x39'),_0x27db3f[_0x4e64('0x1a')]),_0x4e64('0x4c'),{'sessionId':_0x5761c9,'transferNumber':_0x3f2a81});return _0xf9c4e0[_0x4e64('0x1c')](0xc8)[_0x4e64('0x2f')]({'error':![],'message':'transfer\x20executed!'});})['catch'](handleError(_0xf9c4e0));}; \ No newline at end of file +var _0x17ba=['webbar:hangup','hangup\x20executed!','answer','answer\x20fired:','entityFound:','webbar:answer','hold','hold\x20fired:','webbar:hold','hold\x20executed!','unhold','webbar:unhold','calls','calls\x20fired:','UserId','conference','conference\x20fired:','webbar:conference','conference\x20executed!','transfer\x20fired:','webbar:transfer','path','lodash','../../config/environment','util','bluebird','jayson/promise','client','http','../../config/logger','webbarapi','ioredis','redis','defaults','localhost','socket.io-emitter','validate','number','userId\x20is\x20required','string','transferNumber\x20is\x20required','info','log','error','stack','name','status','send','request','code','message','result','catch','VoiceChannels','all','then','filter','rows','length','sessionId\x20','\x20not\x20found!','originate','originate\x20fired:','body','json','callNumber','callbackUrl','format','webbar:originate','originate\x20executed!','hangup','hangup\x20fired:','userId','sessionId','user:%s'];(function(_0x2e0e75,_0xa18842){var _0x2cfb68=function(_0x35e884){while(--_0x35e884){_0x2e0e75['push'](_0x2e0e75['shift']());}};_0x2cfb68(++_0xa18842);}(_0x17ba,0xab));var _0xa17b=function(_0x2a816c,_0x1a5579){_0x2a816c=_0x2a816c-0x0;var _0x3bdd81=_0x17ba[_0x2a816c];return _0x3bdd81;};'use strict';var path=require(_0xa17b('0x0'));var fs=require('fs');var _=require(_0xa17b('0x1'));var db=require('../../mysqldb')['db'];var config=require(_0xa17b('0x2'));var util=require(_0xa17b('0x3'));var BPromise=require(_0xa17b('0x4'));var jayson=require(_0xa17b('0x5'));var amiClient=jayson[_0xa17b('0x6')][_0xa17b('0x7')]({'port':0x232a});var logger=require(_0xa17b('0x8'))(_0xa17b('0x9'));var Redis=require(_0xa17b('0xa'));config[_0xa17b('0xb')]=_[_0xa17b('0xc')](config[_0xa17b('0xb')],{'host':_0xa17b('0xd'),'port':0x18eb});var io=require(_0xa17b('0xe'))(new Redis(config[_0xa17b('0xb')]));var Schema=require(_0xa17b('0xf'));var originateValidation=new Schema({'userId':{'type':_0xa17b('0x10'),'required':[!![],_0xa17b('0x11')]},'callNumber':{'type':_0xa17b('0x12'),'required':[!![],'callNumber\x20is\x20required']},'callerId':{'type':_0xa17b('0x12')},'callbackUrl':{'type':_0xa17b('0x12')}});var hangupValidation=new Schema({'userId':{'type':_0xa17b('0x10'),'required':[!![],_0xa17b('0x11')]},'sessionId':{'type':_0xa17b('0x12'),'required':![]}});var answerValidation=new Schema({'userId':{'type':_0xa17b('0x10'),'required':[!![],_0xa17b('0x11')]},'sessionId':{'type':'string','required':![]}});var transferValidation=new Schema({'userId':{'type':_0xa17b('0x10'),'required':[!![],_0xa17b('0x11')]},'sessionId':{'type':_0xa17b('0x12'),'required':[!![],'sessionId\x20is\x20required']},'transferNumber':{'type':_0xa17b('0x12'),'required':[!![],_0xa17b('0x13')]}});var holdValidation=new Schema({'userId':{'type':_0xa17b('0x10'),'required':[!![],_0xa17b('0x11')]},'sessionId':{'type':'string','required':![]}});var unholdValidation=new Schema({'userId':{'type':_0xa17b('0x10'),'required':[!![],'userId\x20is\x20required']},'sessionId':{'type':_0xa17b('0x12'),'required':![]}});var callsValidation=new Schema({'userId':{'type':_0xa17b('0x10'),'required':[!![],'userId\x20is\x20required']}});var conferenceValidation=new Schema({'userId':{'type':_0xa17b('0x10'),'required':[!![],_0xa17b('0x11')]}});function emit(_0x1c0578,_0x1f8141,_0x4870fb){logger[_0xa17b('0x14')](_0x1c0578,_0x1f8141,JSON['stringify'](_0x4870fb));io['to'](_0x1c0578)['emit'](_0x1f8141,_0x4870fb);}function handleError(_0x47d80b){return function(_0x36f985){console[_0xa17b('0x15')]('handleError:',_0x36f985,_0x36f985 instanceof RangeError);logger[_0xa17b('0x16')](_0x36f985[_0xa17b('0x17')]);if(_0x36f985 instanceof RangeError){if(_0x36f985[_0xa17b('0x18')]){delete _0x36f985[_0xa17b('0x18')];}_0x47d80b[_0xa17b('0x19')](0x194)[_0xa17b('0x1a')](_0x36f985);}else{if(_0x36f985[_0xa17b('0x18')]){delete _0x36f985['name'];}_0x47d80b[_0xa17b('0x19')](0x1f4)[_0xa17b('0x1a')](_0x36f985);}};}function checkError(){return function(_0x45bd0c){if(!_0x45bd0c){throw new RangeError('NotFound');}return _0x45bd0c;};}function respondWithRpcPromise(_0x44f7bc,_0x1a6471){return new BPromise(function(_0x24d305,_0xbbbb62){var _0x3c7ec2=amiClient;return _0x3c7ec2[_0xa17b('0x1b')](_0x44f7bc,_0x1a6471)['then'](function(_0x3df11f){if(_0x3df11f['error']){if(_0x3df11f[_0xa17b('0x16')][_0xa17b('0x1c')]===0x1f4){return _0xbbbb62(_0x3df11f['error']['message']);}return _0x24d305(_0x3df11f[_0xa17b('0x16')][_0xa17b('0x1d')]);}else{_0x24d305(_0x3df11f[_0xa17b('0x1e')]);}})[_0xa17b('0x1f')](function(_0x3c32a5){_0xbbbb62(_0x3c32a5);});});}function getAgent(_0x3a64f5){return db['User']['findOne']({'where':{'id':_0x3a64f5,'role':'agent'}})['then'](checkError());}function getAgentCheckSession(_0x2b1708,_0x5ef356){return new BPromise(function(_0x295e67,_0x4ff3f8){var _0x14671b=respondWithRpcPromise(_0xa17b('0x20'));var _0x32cad9=getAgent(_0x2b1708);Promise[_0xa17b('0x21')]([_0x14671b,_0x32cad9])[_0xa17b('0x22')](function(_0x3ccdb8){var _0x2fbbe8=_0x3ccdb8[0x0];var _0x366b47=_0x3ccdb8[0x1];var _0x43b1f5=_[_0xa17b('0x23')](_0x2fbbe8[_0xa17b('0x24')],function(_0x573585){return _0x573585['UserId']==_0x366b47['id']&&_0x573585['sessionId']==_0x5ef356;});if(_0x43b1f5[_0xa17b('0x25')]==0x1){_0x295e67(_0x366b47);}else{_0x4ff3f8(new RangeError(_0xa17b('0x26')+_0x5ef356+_0xa17b('0x27')));}});});}exports[_0xa17b('0x28')]=function(_0x16dd1f,_0x156409){logger[_0xa17b('0x14')](_0xa17b('0x29'),_0x16dd1f['body']);var _0x1e33bf=originateValidation['validate'](_0x16dd1f[_0xa17b('0x2a')]);if(_0x1e33bf[_0xa17b('0x25')]>0x0){return _0x156409[_0xa17b('0x19')](0x190)[_0xa17b('0x2b')](_0x1e33bf);}var _0x4ec38d=_0x16dd1f[_0xa17b('0x2a')]['userId'];var _0x3031b5=_0x16dd1f[_0xa17b('0x2a')][_0xa17b('0x2c')];var _0x12d8af=_0x16dd1f[_0xa17b('0x2a')]['callerId'];var _0x2db32a=_0x16dd1f['body'][_0xa17b('0x2d')];return getAgent(_0x4ec38d)['then'](function(_0x449faa){logger[_0xa17b('0x14')]('entityFound:',_0x449faa[_0xa17b('0x18')]);emit(util[_0xa17b('0x2e')]('user:%s',_0x449faa[_0xa17b('0x18')]),_0xa17b('0x2f'),{'callNumber':_0x3031b5,'callerId':_0x12d8af,'callbackUrl':_0x2db32a});return _0x156409[_0xa17b('0x19')](0xc8)[_0xa17b('0x2b')]({'error':![],'message':_0xa17b('0x30')});})['catch'](handleError(_0x156409));};exports[_0xa17b('0x31')]=function(_0x506488,_0x26786d){logger['info'](_0xa17b('0x32'),_0x506488['body']);var _0x1e457e=hangupValidation['validate'](_0x506488[_0xa17b('0x2a')]);if(_0x1e457e['length']>0x0){return _0x26786d[_0xa17b('0x19')](0x190)[_0xa17b('0x2b')](_0x1e457e);}var _0x5bfb5=_0x506488[_0xa17b('0x2a')][_0xa17b('0x33')];var _0xdd429f=_0x506488[_0xa17b('0x2a')][_0xa17b('0x34')];return getAgent(_0x5bfb5)['then'](function(_0x468c92){logger[_0xa17b('0x14')]('entityFound:',_0x468c92[_0xa17b('0x18')]);emit(util[_0xa17b('0x2e')](_0xa17b('0x35'),_0x468c92[_0xa17b('0x18')]),_0xa17b('0x36'),{'sessionId':_0xdd429f});return _0x26786d[_0xa17b('0x19')](0xc8)['json']({'error':![],'message':_0xa17b('0x37')});})[_0xa17b('0x1f')](handleError(_0x26786d));};exports[_0xa17b('0x38')]=function(_0x5ec459,_0x54b65c){logger['info'](_0xa17b('0x39'),_0x5ec459[_0xa17b('0x2a')]);var _0x3c2788=answerValidation[_0xa17b('0xf')](_0x5ec459[_0xa17b('0x2a')]);if(_0x3c2788[_0xa17b('0x25')]>0x0){return _0x54b65c[_0xa17b('0x19')](0x190)[_0xa17b('0x2b')](_0x3c2788);}var _0x1704ba=_0x5ec459[_0xa17b('0x2a')][_0xa17b('0x33')];var _0x1267de=_0x5ec459['body'][_0xa17b('0x34')];return getAgent(_0x1704ba)[_0xa17b('0x22')](function(_0x384c12){logger[_0xa17b('0x14')](_0xa17b('0x3a'),_0x384c12[_0xa17b('0x18')]);emit(util['format'](_0xa17b('0x35'),_0x384c12[_0xa17b('0x18')]),_0xa17b('0x3b'),{'sessionId':_0x1267de});return _0x54b65c[_0xa17b('0x19')](0xc8)[_0xa17b('0x2b')]({'error':![],'message':'answer\x20executed!'});})[_0xa17b('0x1f')](handleError(_0x54b65c));};exports[_0xa17b('0x3c')]=function(_0x2b4831,_0x1dc0f7){logger['info'](_0xa17b('0x3d'),_0x2b4831[_0xa17b('0x2a')]);var _0x421470=holdValidation[_0xa17b('0xf')](_0x2b4831[_0xa17b('0x2a')]);if(_0x421470[_0xa17b('0x25')]>0x0){return _0x1dc0f7[_0xa17b('0x19')](0x190)['json'](_0x421470);}var _0x43b5d5=_0x2b4831[_0xa17b('0x2a')]['userId'];var _0xb4b4d=_0x2b4831[_0xa17b('0x2a')][_0xa17b('0x34')];return getAgent(_0x43b5d5)['then'](function(_0x187237){logger[_0xa17b('0x14')]('entityFound:',_0x187237[_0xa17b('0x18')]);emit(util[_0xa17b('0x2e')]('user:%s',_0x187237[_0xa17b('0x18')]),_0xa17b('0x3e'),{'sessionId':_0xb4b4d});return _0x1dc0f7['status'](0xc8)[_0xa17b('0x2b')]({'error':![],'message':_0xa17b('0x3f')});})[_0xa17b('0x1f')](handleError(_0x1dc0f7));};exports[_0xa17b('0x40')]=function(_0x2f4a2c,_0x133823){logger[_0xa17b('0x14')]('unhold\x20fired:',_0x2f4a2c[_0xa17b('0x2a')]);var _0x3ff07a=unholdValidation[_0xa17b('0xf')](_0x2f4a2c[_0xa17b('0x2a')]);if(_0x3ff07a[_0xa17b('0x25')]>0x0){return _0x133823[_0xa17b('0x19')](0x190)[_0xa17b('0x2b')](_0x3ff07a);}var _0x100d14=_0x2f4a2c[_0xa17b('0x2a')][_0xa17b('0x33')];var _0x1e4b67=_0x2f4a2c[_0xa17b('0x2a')][_0xa17b('0x34')];return getAgent(_0x100d14)['then'](function(_0x4c62a3){logger[_0xa17b('0x14')](_0xa17b('0x3a'),_0x4c62a3[_0xa17b('0x18')]);emit(util[_0xa17b('0x2e')](_0xa17b('0x35'),_0x4c62a3[_0xa17b('0x18')]),_0xa17b('0x41'),{'sessionId':_0x1e4b67});return _0x133823[_0xa17b('0x19')](0xc8)['json']({'error':![],'message':'unhold\x20executed!'});})[_0xa17b('0x1f')](handleError(_0x133823));};exports[_0xa17b('0x42')]=function(_0x55b0e4,_0x568f27){logger['info'](_0xa17b('0x43'),_0x568f27[_0xa17b('0x2a')]);var _0x3aeae5=callsValidation[_0xa17b('0xf')](_0x55b0e4[_0xa17b('0x2a')]);if(_0x3aeae5[_0xa17b('0x25')]>0x0){return _0x568f27['status'](0x190)['json'](_0x3aeae5);}var _0x555529=_0x55b0e4['body']['userId'];var _0x2a62e4=respondWithRpcPromise(_0xa17b('0x20'));var _0x20fe4a=getAgent(_0x555529);return Promise[_0xa17b('0x21')]([_0x2a62e4,_0x20fe4a])[_0xa17b('0x22')](function(_0x273671){var _0x3270a0=_0x273671[0x0];var _0x55b98a=_0x273671[0x1];var _0x3e739a=_[_0xa17b('0x23')](_0x3270a0[_0xa17b('0x24')],function(_0x2d744d){return _0x2d744d[_0xa17b('0x44')]==_0x55b98a['id'];});return _0x568f27[_0xa17b('0x19')](0xc8)[_0xa17b('0x2b')]({'count':_0x3e739a[_0xa17b('0x25')],'rows':_0x3e739a});})[_0xa17b('0x1f')](handleError(_0x568f27));};exports[_0xa17b('0x45')]=function(_0x3d9a89,_0xef6b2e){logger['info'](_0xa17b('0x46'),_0x3d9a89['body']);var _0x3de0d8=conferenceValidation[_0xa17b('0xf')](_0x3d9a89[_0xa17b('0x2a')]);if(_0x3de0d8[_0xa17b('0x25')]>0x0){return _0xef6b2e['status'](0x190)[_0xa17b('0x2b')](_0x3de0d8);}var _0x57a1d9=_0x3d9a89[_0xa17b('0x2a')]['userId'];return getAgent(_0x57a1d9)['then'](function(_0x299c83){logger[_0xa17b('0x14')]('entityFound:',_0x299c83[_0xa17b('0x18')]);emit(util[_0xa17b('0x2e')]('user:%s',_0x299c83['name']),_0xa17b('0x47'));return _0xef6b2e[_0xa17b('0x19')](0xc8)['json']({'error':![],'message':_0xa17b('0x48')});})[_0xa17b('0x1f')](handleError(_0xef6b2e));};exports['transfer']=function(_0x27ba7a,_0x3ad933){logger[_0xa17b('0x14')](_0xa17b('0x49'),_0x27ba7a[_0xa17b('0x2a')]);var _0x521468=transferValidation[_0xa17b('0xf')](_0x27ba7a[_0xa17b('0x2a')]);if(_0x521468[_0xa17b('0x25')]>0x0){return _0x3ad933[_0xa17b('0x19')](0x190)[_0xa17b('0x2b')](_0x521468);}var _0x2e65b1=_0x27ba7a[_0xa17b('0x2a')][_0xa17b('0x33')];var _0x3fb393=_0x27ba7a[_0xa17b('0x2a')]['sessionId'];var _0x36ae46=_0x27ba7a[_0xa17b('0x2a')]['transferNumber'];return getAgent(_0x2e65b1)['then'](function(_0x14dbba){logger[_0xa17b('0x14')](_0xa17b('0x3a'),_0x14dbba[_0xa17b('0x18')]);emit(util[_0xa17b('0x2e')]('user:%s',_0x14dbba[_0xa17b('0x18')]),_0xa17b('0x4a'),{'sessionId':_0x3fb393,'transferNumber':_0x36ae46});return _0x3ad933[_0xa17b('0x19')](0xc8)[_0xa17b('0x2b')]({'error':![],'message':'transfer\x20executed!'});})[_0xa17b('0x1f')](handleError(_0x3ad933));}; \ No newline at end of file diff --git a/server/api/whatsappAccount/index.js b/server/api/whatsappAccount/index.js index 04bc678..c015077 100644 --- a/server/api/whatsappAccount/index.js +++ b/server/api/whatsappAccount/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1967=['addAnswer','addAgents','/:id/notify','notify','update','destroy','removeDispositions','delete','removeAnswers','removeAgents','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./whatsappAccount.controller','isAuthenticated','index','get','/describe','describe','/:id','show','/:id/dispositions','/:id/canned_answers','getAnswers','/:id/users','getAgents','/:id/applications','post','create'];(function(_0x1a4158,_0x30666e){var _0x52576c=function(_0x44ea88){while(--_0x44ea88){_0x1a4158['push'](_0x1a4158['shift']());}};_0x52576c(++_0x30666e);}(_0x1967,0x173));var _0x7196=function(_0xc7718a,_0x3d45e3){_0xc7718a=_0xc7718a-0x0;var _0x1d1d0a=_0x1967[_0xc7718a];return _0x1d1d0a;};'use strict';var multer=require('multer');var util=require(_0x7196('0x0'));var path=require(_0x7196('0x1'));var timeout=require(_0x7196('0x2'));var express=require(_0x7196('0x3'));var router=express[_0x7196('0x4')]();var fs_extra=require(_0x7196('0x5'));var auth=require(_0x7196('0x6'));var interaction=require(_0x7196('0x7'));var config=require(_0x7196('0x8'));var controller=require(_0x7196('0x9'));router['get']('/',auth[_0x7196('0xa')](),controller[_0x7196('0xb')]);router[_0x7196('0xc')](_0x7196('0xd'),auth[_0x7196('0xa')](),controller[_0x7196('0xe')]);router['get'](_0x7196('0xf'),auth[_0x7196('0xa')](),controller[_0x7196('0x10')]);router[_0x7196('0xc')](_0x7196('0x11'),auth['isAuthenticated'](),controller['getDispositions']);router[_0x7196('0xc')](_0x7196('0x12'),auth[_0x7196('0xa')](),controller[_0x7196('0x13')]);router[_0x7196('0xc')](_0x7196('0x14'),auth[_0x7196('0xa')](),controller[_0x7196('0x15')]);router[_0x7196('0xc')](_0x7196('0x16'),auth[_0x7196('0xa')](),controller['getApplications']);router[_0x7196('0x17')]('/',auth[_0x7196('0xa')](),controller[_0x7196('0x18')]);router[_0x7196('0x17')]('/:id/dispositions',auth[_0x7196('0xa')](),controller['addDisposition']);router[_0x7196('0x17')](_0x7196('0x12'),auth[_0x7196('0xa')](),controller[_0x7196('0x19')]);router[_0x7196('0x17')](_0x7196('0x14'),auth[_0x7196('0xa')](),controller[_0x7196('0x1a')]);router[_0x7196('0x17')](_0x7196('0x16'),auth[_0x7196('0xa')](),controller['addApplications']);router['post'](_0x7196('0x1b'),controller[_0x7196('0x1c')]);router[_0x7196('0x17')]('/:id/send',auth[_0x7196('0xa')](),controller['send']);router['put'](_0x7196('0xf'),auth[_0x7196('0xa')](),controller[_0x7196('0x1d')]);router['delete']('/:id',auth[_0x7196('0xa')](),controller[_0x7196('0x1e')]);router['delete'](_0x7196('0x11'),auth[_0x7196('0xa')](),controller[_0x7196('0x1f')]);router[_0x7196('0x20')](_0x7196('0x12'),auth['isAuthenticated'](),controller[_0x7196('0x21')]);router['delete'](_0x7196('0x14'),auth[_0x7196('0xa')](),controller[_0x7196('0x22')]);module[_0x7196('0x23')]=router; \ No newline at end of file +var _0x1967=['addAnswer','addAgents','/:id/notify','notify','update','destroy','removeDispositions','delete','removeAnswers','removeAgents','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./whatsappAccount.controller','isAuthenticated','index','get','/describe','describe','/:id','show','/:id/dispositions','/:id/canned_answers','getAnswers','/:id/users','getAgents','/:id/applications','post','create'];(function(_0x8131c9,_0x43e56c){var _0x2e5d5d=function(_0x3c5fb7){while(--_0x3c5fb7){_0x8131c9['push'](_0x8131c9['shift']());}};_0x2e5d5d(++_0x43e56c);}(_0x1967,0x173));var _0x7196=function(_0x1b2b5b,_0x1cc201){_0x1b2b5b=_0x1b2b5b-0x0;var _0x4d766a=_0x1967[_0x1b2b5b];return _0x4d766a;};'use strict';var multer=require('multer');var util=require(_0x7196('0x0'));var path=require(_0x7196('0x1'));var timeout=require(_0x7196('0x2'));var express=require(_0x7196('0x3'));var router=express[_0x7196('0x4')]();var fs_extra=require(_0x7196('0x5'));var auth=require(_0x7196('0x6'));var interaction=require(_0x7196('0x7'));var config=require(_0x7196('0x8'));var controller=require(_0x7196('0x9'));router['get']('/',auth[_0x7196('0xa')](),controller[_0x7196('0xb')]);router[_0x7196('0xc')](_0x7196('0xd'),auth[_0x7196('0xa')](),controller[_0x7196('0xe')]);router['get'](_0x7196('0xf'),auth[_0x7196('0xa')](),controller[_0x7196('0x10')]);router[_0x7196('0xc')](_0x7196('0x11'),auth['isAuthenticated'](),controller['getDispositions']);router[_0x7196('0xc')](_0x7196('0x12'),auth[_0x7196('0xa')](),controller[_0x7196('0x13')]);router[_0x7196('0xc')](_0x7196('0x14'),auth[_0x7196('0xa')](),controller[_0x7196('0x15')]);router[_0x7196('0xc')](_0x7196('0x16'),auth[_0x7196('0xa')](),controller['getApplications']);router[_0x7196('0x17')]('/',auth[_0x7196('0xa')](),controller[_0x7196('0x18')]);router[_0x7196('0x17')]('/:id/dispositions',auth[_0x7196('0xa')](),controller['addDisposition']);router[_0x7196('0x17')](_0x7196('0x12'),auth[_0x7196('0xa')](),controller[_0x7196('0x19')]);router[_0x7196('0x17')](_0x7196('0x14'),auth[_0x7196('0xa')](),controller[_0x7196('0x1a')]);router[_0x7196('0x17')](_0x7196('0x16'),auth[_0x7196('0xa')](),controller['addApplications']);router['post'](_0x7196('0x1b'),controller[_0x7196('0x1c')]);router[_0x7196('0x17')]('/:id/send',auth[_0x7196('0xa')](),controller['send']);router['put'](_0x7196('0xf'),auth[_0x7196('0xa')](),controller[_0x7196('0x1d')]);router['delete']('/:id',auth[_0x7196('0xa')](),controller[_0x7196('0x1e')]);router['delete'](_0x7196('0x11'),auth[_0x7196('0xa')](),controller[_0x7196('0x1f')]);router[_0x7196('0x20')](_0x7196('0x12'),auth['isAuthenticated'](),controller[_0x7196('0x21')]);router['delete'](_0x7196('0x14'),auth[_0x7196('0xa')](),controller[_0x7196('0x22')]);module[_0x7196('0x23')]=router; \ No newline at end of file diff --git a/server/api/whatsappAccount/whatsappAccount.attributes.js b/server/api/whatsappAccount/whatsappAccount.attributes.js index 998342c..5302313 100644 --- a/server/api/whatsappAccount/whatsappAccount.attributes.js +++ b/server/api/whatsappAccount/whatsappAccount.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xcb02=['BOOLEAN','INTEGER','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','setDataValue','mandatoryDispositionPauseId','mandatoryDisposition','randomstring','STRING','name','generate','ENUM','twilio','TEXT','Account:\x20{{account.name}}
{{#queue}}Queue:\x20{{queue.name}}
{{/queue}}From\x20:\x20{{from}}'];(function(_0x297fd3,_0x115406){var _0x2af381=function(_0x1dd31b){while(--_0x1dd31b){_0x297fd3['push'](_0x297fd3['shift']());}};_0x2af381(++_0x115406);}(_0xcb02,0x102));var _0x2cb0=function(_0x2f9357,_0x59a1ea){_0x2f9357=_0x2f9357-0x0;var _0x351e76=_0xcb02[_0x2f9357];return _0x351e76;};'use strict';var Sequelize=require('sequelize');var rs=require(_0x2cb0('0x0'));module['exports']={'name':{'type':Sequelize[_0x2cb0('0x1')],'unique':_0x2cb0('0x2'),'allowNull':![]},'key':{'type':Sequelize[_0x2cb0('0x1')],'allowNull':![]},'remote':{'type':Sequelize[_0x2cb0('0x1')],'allowNull':![]},'token':{'type':Sequelize[_0x2cb0('0x1')],'defaultValue':function(){return rs[_0x2cb0('0x3')]();}},'phone':{'type':Sequelize['STRING']},'type':{'type':Sequelize[_0x2cb0('0x4')](_0x2cb0('0x5'))},'accountSid':{'type':Sequelize[_0x2cb0('0x1')]},'authToken':{'type':Sequelize[_0x2cb0('0x1')]},'notificationTemplate':{'type':Sequelize[_0x2cb0('0x6')],'defaultValue':function(){return _0x2cb0('0x7');}},'notificationSound':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'notificationShake':{'type':Sequelize[_0x2cb0('0x8')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0x2cb0('0x9')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize[_0x2cb0('0x8')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x2cb0('0x9')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x2cb0('0x9')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize['INTEGER'],'comment':'Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled'},'mandatoryDisposition':{'type':Sequelize['BOOLEAN'],'defaultValue':![],'comment':_0x2cb0('0xa'),'set':function(_0x1a5962){if(!_0x1a5962){this[_0x2cb0('0xb')](_0x2cb0('0xc'),null);}this[_0x2cb0('0xb')](_0x2cb0('0xd'),_0x1a5962);}},'description':{'type':Sequelize[_0x2cb0('0x1')]}}; \ No newline at end of file +var _0x9b84=['INTEGER','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','setDataValue','mandatoryDisposition','sequelize','exports','STRING','name','generate','TEXT','BOOLEAN'];(function(_0x3fde71,_0x281c3c){var _0x42e4d=function(_0x22d648){while(--_0x22d648){_0x3fde71['push'](_0x3fde71['shift']());}};_0x42e4d(++_0x281c3c);}(_0x9b84,0x159));var _0x49b8=function(_0x46a3ff,_0x470b9a){_0x46a3ff=_0x46a3ff-0x0;var _0x404bc2=_0x9b84[_0x46a3ff];return _0x404bc2;};'use strict';var Sequelize=require(_0x49b8('0x0'));var rs=require('randomstring');module[_0x49b8('0x1')]={'name':{'type':Sequelize[_0x49b8('0x2')],'unique':_0x49b8('0x3'),'allowNull':![]},'key':{'type':Sequelize[_0x49b8('0x2')],'allowNull':![]},'remote':{'type':Sequelize[_0x49b8('0x2')],'allowNull':![]},'token':{'type':Sequelize['STRING'],'defaultValue':function(){return rs[_0x49b8('0x4')]();}},'phone':{'type':Sequelize[_0x49b8('0x2')]},'type':{'type':Sequelize['ENUM']('twilio')},'accountSid':{'type':Sequelize[_0x49b8('0x2')]},'authToken':{'type':Sequelize[_0x49b8('0x2')]},'notificationTemplate':{'type':Sequelize[_0x49b8('0x5')],'defaultValue':function(){return'Account:\x20{{account.name}}
{{#queue}}Queue:\x20{{queue.name}}
{{/queue}}From\x20:\x20{{from}}';}},'notificationSound':{'type':Sequelize[_0x49b8('0x6')],'defaultValue':![]},'notificationShake':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0x49b8('0x7')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize[_0x49b8('0x6')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x49b8('0x7')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x49b8('0x7')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize[_0x49b8('0x7')],'comment':'Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled'},'mandatoryDisposition':{'type':Sequelize[_0x49b8('0x6')],'defaultValue':![],'comment':_0x49b8('0x8'),'set':function(_0xf98c54){if(!_0xf98c54){this['setDataValue']('mandatoryDispositionPauseId',null);}this[_0x49b8('0x9')](_0x49b8('0xa'),_0xf98c54);}},'description':{'type':Sequelize[_0x49b8('0x2')]}}; \ No newline at end of file diff --git a/server/api/whatsappAccount/whatsappAccount.controller.js b/server/api/whatsappAccount/whatsappAccount.controller.js index 9ea2334..9a7649a 100644 --- a/server/api/whatsappAccount/whatsappAccount.controller.js +++ b/server/api/whatsappAccount/whatsappAccount.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xebb1=['findAll','rows','params','rawAttributes','includeAll','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','addDisposition','Disposition','getDispositions','findOne','WhatsappAccountId','removeDispositions','ids','CannedAnswer','getAnswers','removeAnswers','addAgents','omit','spread','emit','userWhatsappAccount:save','removeAgents','isArray','userWhatsappAccount:remove','getAgents','User','addApplications','sequelize','transaction','WhatsappApplication','bulkCreate','findAndCountAll','getApplications','whatsapp','Applications','account','asc','CmContact','Sequelize','no\x20available\x20attributes','difference','createdAt','updatedAt','CompanyId','ListId','mobile','type','From','replace','Body','messageId','MessageSid','from','from\x20is\x20mandatory','isNil','ValidationError','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','mapKey','CmList','Contacts','DESC','list','WhatsappInteraction','interaction','autoclose','applications','push','close','unmanaged','*,*,*,*','created','ContactId','AttachmentId','unshift','agent','waitForTheAssignedAgent','startRouting','Start','receiveMessage','WhatsappAccount,\x20%s,\x20%s,\x20%s,\x20%s','stringify','twilio','text/xml','\x0a','to\x20is\x20mandatory','List','Messages','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','./whatsappAccount.socket','jayson/promise','http','request','then','info','WhatsappAccount,\x20%s,\x20%s','request\x20sent','debug','WhatsappAccount,\x20%s,\x20%s,\x20%s','error','message','catch','sendStatus','status','json','offset','undefined','count','limit','set','Content-Range','apply','reject','update','destroy','get','WhatsappAccounts','UserProfileResource','end','stack','name','send','Pause','mandatoryDispositionPause','map','WhatsappAccount','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','pick','filter','where','VIRTUAL','merge','options','include'];(function(_0x5bc948,_0x485736){var _0x12c693=function(_0x3e39b0){while(--_0x3e39b0){_0x5bc948['push'](_0x5bc948['shift']());}};_0x12c693(++_0x485736);}(_0xebb1,0x118));var _0x1ebb=function(_0x1178ee,_0x2cd779){_0x1178ee=_0x1178ee-0x0;var _0x4422da=_0xebb1[_0x1178ee];return _0x4422da;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x1ebb('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0x1ebb('0x1'));var rp=require(_0x1ebb('0x2'));var moment=require(_0x1ebb('0x3'));var BPromise=require(_0x1ebb('0x4'));var Mustache=require(_0x1ebb('0x5'));var util=require('util');var path=require('path');var sox=require(_0x1ebb('0x6'));var csv=require(_0x1ebb('0x7'));var ejs=require(_0x1ebb('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x1ebb('0x9'));var squel=require(_0x1ebb('0xa'));var crypto=require(_0x1ebb('0xb'));var jsforce=require(_0x1ebb('0xc'));var deskjs=require(_0x1ebb('0xd'));var toCsv=require(_0x1ebb('0x7'));var querystring=require('querystring');var Papa=require(_0x1ebb('0xe'));var Redis=require('ioredis');var authService=require(_0x1ebb('0xf'));var qs=require(_0x1ebb('0x10'));var as=require(_0x1ebb('0x11'));var hardwareService=require(_0x1ebb('0x12'));var logger=require(_0x1ebb('0x13'))(_0x1ebb('0x14'));var utils=require(_0x1ebb('0x15'));var config=require(_0x1ebb('0x16'));var licenseUtil=require(_0x1ebb('0x17'));var db=require(_0x1ebb('0x18'))['db'];config[_0x1ebb('0x19')]=_[_0x1ebb('0x1a')](config['redis'],{'host':_0x1ebb('0x1b'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x1ebb('0x19')]));require(_0x1ebb('0x1c'))['register'](socket);var jayson=require(_0x1ebb('0x1d'));var client=jayson['client'][_0x1ebb('0x1e')]({'port':0x232c});function respondWithRpcPromise(_0x5542ee,_0x5f0b86,_0x5b5201,_0x18339){return new BPromise(function(_0xf4d1e9,_0x25713b){var _0x513a0c=_0x18339||client;return _0x513a0c[_0x1ebb('0x1f')](_0x5542ee,_0x5b5201)[_0x1ebb('0x20')](function(_0x2d3209){logger[_0x1ebb('0x21')](_0x1ebb('0x22'),_0x5f0b86,_0x1ebb('0x23'));logger[_0x1ebb('0x24')](_0x1ebb('0x25'),_0x5f0b86,_0x1ebb('0x23'),JSON['stringify'](_0x2d3209));if(_0x2d3209[_0x1ebb('0x26')]){if(_0x2d3209[_0x1ebb('0x26')]['code']===0x1f4){logger['error'](_0x1ebb('0x22'),_0x5f0b86,_0x2d3209[_0x1ebb('0x26')]['message']);return _0x25713b(_0x2d3209[_0x1ebb('0x26')][_0x1ebb('0x27')]);}logger['error'](_0x1ebb('0x22'),_0x5f0b86,_0x2d3209[_0x1ebb('0x26')][_0x1ebb('0x27')]);return _0xf4d1e9(_0x2d3209['error']['message']);}else{logger[_0x1ebb('0x21')](_0x1ebb('0x22'),_0x5f0b86,_0x1ebb('0x23'));_0xf4d1e9(_0x2d3209['result'][_0x1ebb('0x27')]);}})[_0x1ebb('0x28')](function(_0x1f8223){logger[_0x1ebb('0x26')]('WhatsappAccount,\x20%s,\x20%s',_0x5f0b86,_0x1f8223);_0x25713b(_0x1f8223);});});}function respondWithStatusCode(_0x3e211c,_0x11ae7f){_0x11ae7f=_0x11ae7f||0xcc;return function(_0x7668d3){if(_0x7668d3){return _0x3e211c[_0x1ebb('0x29')](_0x11ae7f);}return _0x3e211c[_0x1ebb('0x2a')](_0x11ae7f)['end']();};}function respondWithResult(_0x5da817,_0x3c27c6){_0x3c27c6=_0x3c27c6||0xc8;return function(_0x5cc4de){if(_0x5cc4de){return _0x5da817[_0x1ebb('0x2a')](_0x3c27c6)[_0x1ebb('0x2b')](_0x5cc4de);}};}function respondWithFilteredResult(_0x42dc8e,_0xb65ea0){return function(_0x43abc2){if(_0x43abc2){var _0x380622=typeof _0xb65ea0[_0x1ebb('0x2c')]===_0x1ebb('0x2d')&&typeof _0xb65ea0['limit']==='undefined';var _0x3a3492=_0x43abc2[_0x1ebb('0x2e')];var _0x35828f=_0x380622?0x0:_0xb65ea0['offset'];var _0xb5e3a1=_0x380622?_0x43abc2[_0x1ebb('0x2e')]:_0xb65ea0[_0x1ebb('0x2c')]+_0xb65ea0[_0x1ebb('0x2f')];var _0x36cc0f;if(_0xb5e3a1>=_0x3a3492){_0xb5e3a1=_0x3a3492;_0x36cc0f=0xc8;}else{_0x36cc0f=0xce;}_0x42dc8e[_0x1ebb('0x2a')](_0x36cc0f);return _0x42dc8e[_0x1ebb('0x30')](_0x1ebb('0x31'),_0x35828f+'-'+_0xb5e3a1+'/'+_0x3a3492)[_0x1ebb('0x2b')](_0x43abc2);}return null;};}function patchUpdates(_0x15ba1c){return function(_0xfef959){try{jsonpatch[_0x1ebb('0x32')](_0xfef959,_0x15ba1c,!![]);}catch(_0x573c92){return BPromise[_0x1ebb('0x33')](_0x573c92);}return _0xfef959['save']();};}function saveUpdates(_0x21dc5c,_0x5c9ad4){return function(_0x3da00c){if(_0x3da00c){return _0x3da00c[_0x1ebb('0x34')](_0x21dc5c)[_0x1ebb('0x20')](function(_0x5acdf9){return _0x5acdf9;});}return null;};}function removeEntity(_0xefdefc,_0x4013f5){return function(_0x1351c3){if(_0x1351c3){return _0x1351c3[_0x1ebb('0x35')]()[_0x1ebb('0x20')](function(){var _0x20aeb0=_0x1351c3[_0x1ebb('0x36')]({'plain':!![]});var _0x2558fb=_0x1ebb('0x37');return db[_0x1ebb('0x38')][_0x1ebb('0x35')]({'where':{'type':_0x2558fb,'resourceId':_0x20aeb0['id']}})[_0x1ebb('0x20')](function(){return _0x1351c3;});})[_0x1ebb('0x20')](function(){_0xefdefc['status'](0xcc)[_0x1ebb('0x39')]();});}};}function handleEntityNotFound(_0x1df127,_0x515de1){return function(_0x5c7ea1){if(!_0x5c7ea1){_0x1df127[_0x1ebb('0x29')](0x194);}return _0x5c7ea1;};}function handleError(_0x15c275,_0x4c8646){_0x4c8646=_0x4c8646||0x1f4;return function(_0x5f1be0){logger['error'](_0x5f1be0[_0x1ebb('0x3a')]);if(_0x5f1be0[_0x1ebb('0x3b')]){delete _0x5f1be0['name'];}_0x15c275[_0x1ebb('0x2a')](_0x4c8646)[_0x1ebb('0x3c')](_0x5f1be0);};}exports['index']=function(_0x2b8b05,_0x3ea8c7){var _0x3101b7={'include':[{'model':db[_0x1ebb('0x3d')],'as':_0x1ebb('0x3e')}]},_0x2f9b03={},_0x34ddae={'count':0x0,'rows':[]};var _0x334922=_[_0x1ebb('0x3f')](db[_0x1ebb('0x40')]['rawAttributes'],function(_0x3cb8f9){return{'name':_0x3cb8f9['fieldName'],'type':_0x3cb8f9['type']['key']};});_0x2f9b03[_0x1ebb('0x41')]=_[_0x1ebb('0x3f')](_0x334922,_0x1ebb('0x3b'));_0x2f9b03[_0x1ebb('0x42')]=_[_0x1ebb('0x43')](_0x2b8b05[_0x1ebb('0x42')]);_0x2f9b03[_0x1ebb('0x44')]=_[_0x1ebb('0x45')](_0x2f9b03[_0x1ebb('0x41')],_0x2f9b03[_0x1ebb('0x42')]);_0x3101b7[_0x1ebb('0x46')]=_[_0x1ebb('0x45')](_0x2f9b03[_0x1ebb('0x41')],qs[_0x1ebb('0x47')](_0x2b8b05[_0x1ebb('0x42')][_0x1ebb('0x47')]));_0x3101b7['attributes']=_0x3101b7[_0x1ebb('0x46')][_0x1ebb('0x48')]?_0x3101b7['attributes']:_0x2f9b03[_0x1ebb('0x41')];if(!_0x2b8b05[_0x1ebb('0x42')][_0x1ebb('0x49')](_0x1ebb('0x4a'))){_0x3101b7[_0x1ebb('0x2f')]=qs[_0x1ebb('0x2f')](_0x2b8b05[_0x1ebb('0x42')][_0x1ebb('0x2f')]);_0x3101b7[_0x1ebb('0x2c')]=qs['offset'](_0x2b8b05[_0x1ebb('0x42')][_0x1ebb('0x2c')]);}_0x3101b7[_0x1ebb('0x4b')]=qs[_0x1ebb('0x4c')](_0x2b8b05[_0x1ebb('0x42')][_0x1ebb('0x4c')]);_0x3101b7['where']=qs[_0x1ebb('0x44')](_[_0x1ebb('0x4d')](_0x2b8b05[_0x1ebb('0x42')],_0x2f9b03[_0x1ebb('0x44')]),_0x334922);if(_0x2b8b05[_0x1ebb('0x42')][_0x1ebb('0x4e')]){_0x3101b7[_0x1ebb('0x4f')]=_['merge'](_0x3101b7['where'],{'$or':_[_0x1ebb('0x3f')](_0x334922,function(_0x48392f){if(_0x48392f['type']!==_0x1ebb('0x50')){var _0x2d15df={};_0x2d15df[_0x48392f['name']]={'$like':'%'+_0x2b8b05['query']['filter']+'%'};return _0x2d15df;}})});}_0x3101b7=_[_0x1ebb('0x51')]({},_0x3101b7,_0x2b8b05[_0x1ebb('0x52')]);var _0x4800e8={'where':_0x3101b7['where']};return db['WhatsappAccount'][_0x1ebb('0x2e')](_0x4800e8)[_0x1ebb('0x20')](function(_0x484d3b){_0x34ddae[_0x1ebb('0x2e')]=_0x484d3b;if(_0x2b8b05[_0x1ebb('0x42')]['includeAll']){_0x3101b7[_0x1ebb('0x53')]=[{'all':!![]}];}return db['WhatsappAccount'][_0x1ebb('0x54')](_0x3101b7);})[_0x1ebb('0x20')](function(_0x2d6e11){_0x34ddae[_0x1ebb('0x55')]=_0x2d6e11;return _0x34ddae;})[_0x1ebb('0x20')](respondWithFilteredResult(_0x3ea8c7,_0x3101b7))['catch'](handleError(_0x3ea8c7,null));};exports['show']=function(_0x1e6069,_0x1caa78){var _0x39455d={'raw':![],'where':{'id':_0x1e6069[_0x1ebb('0x56')]['id']},'include':[{'model':db[_0x1ebb('0x3d')],'as':_0x1ebb('0x3e')}]},_0xceec03={};_0xceec03[_0x1ebb('0x41')]=_[_0x1ebb('0x43')](db[_0x1ebb('0x40')][_0x1ebb('0x57')]);_0xceec03[_0x1ebb('0x42')]=_[_0x1ebb('0x43')](_0x1e6069[_0x1ebb('0x42')]);_0xceec03[_0x1ebb('0x44')]=_[_0x1ebb('0x45')](_0xceec03[_0x1ebb('0x41')],_0xceec03[_0x1ebb('0x42')]);_0x39455d[_0x1ebb('0x46')]=_[_0x1ebb('0x45')](_0xceec03[_0x1ebb('0x41')],qs['fields'](_0x1e6069[_0x1ebb('0x42')][_0x1ebb('0x47')]));_0x39455d[_0x1ebb('0x46')]=_0x39455d[_0x1ebb('0x46')][_0x1ebb('0x48')]?_0x39455d[_0x1ebb('0x46')]:_0xceec03['model'];if(_0x1e6069[_0x1ebb('0x42')][_0x1ebb('0x58')]){_0x39455d[_0x1ebb('0x53')]=[{'all':!![]}];}_0x39455d=_[_0x1ebb('0x51')]({},_0x39455d,_0x1e6069[_0x1ebb('0x52')]);return db['WhatsappAccount'][_0x1ebb('0x59')](_0x39455d)[_0x1ebb('0x20')](handleEntityNotFound(_0x1caa78,null))[_0x1ebb('0x20')](respondWithResult(_0x1caa78,null))[_0x1ebb('0x28')](handleError(_0x1caa78,null));};exports[_0x1ebb('0x5a')]=function(_0x6bce73,_0x35ac69){return db[_0x1ebb('0x40')][_0x1ebb('0x5a')](_0x6bce73[_0x1ebb('0x5b')],{})['then'](function(_0x491912){var _0xd6d718=_0x6bce73[_0x1ebb('0x5c')][_0x1ebb('0x36')]({'plain':!![]});if(!_0xd6d718)throw new Error(_0x1ebb('0x5d'));if(_0xd6d718[_0x1ebb('0x5e')]==='user'){var _0x42bd1a=_0x491912[_0x1ebb('0x36')]({'plain':!![]});var _0x2c6007=_0x1ebb('0x37');return db[_0x1ebb('0x5f')][_0x1ebb('0x59')]({'where':{'name':_0x2c6007,'userProfileId':_0xd6d718[_0x1ebb('0x60')]},'raw':!![]})[_0x1ebb('0x20')](function(_0x11e2a5){if(_0x11e2a5&&_0x11e2a5['autoAssociation']===0x0){return db[_0x1ebb('0x38')]['create']({'name':_0x42bd1a['name'],'resourceId':_0x42bd1a['id'],'type':_0x11e2a5[_0x1ebb('0x3b')],'sectionId':_0x11e2a5['id']},{})['then'](function(){return _0x491912;});}else{return _0x491912;}})['catch'](function(_0x3a7f5d){logger[_0x1ebb('0x26')](_0x1ebb('0x61'),_0x3a7f5d);throw _0x3a7f5d;});}return _0x491912;})[_0x1ebb('0x20')](respondWithResult(_0x35ac69,0xc9))[_0x1ebb('0x28')](handleError(_0x35ac69,null));};exports[_0x1ebb('0x34')]=function(_0x5121ae,_0x289c5f){if(_0x5121ae[_0x1ebb('0x5b')]['id']){delete _0x5121ae['body']['id'];}return db['WhatsappAccount'][_0x1ebb('0x59')]({'where':{'id':_0x5121ae[_0x1ebb('0x56')]['id']},'include':[{'model':db[_0x1ebb('0x3d')],'as':_0x1ebb('0x3e')}]})[_0x1ebb('0x20')](handleEntityNotFound(_0x289c5f,null))['then'](saveUpdates(_0x5121ae[_0x1ebb('0x5b')],null))[_0x1ebb('0x20')](respondWithResult(_0x289c5f,null))[_0x1ebb('0x28')](handleError(_0x289c5f,null));};exports[_0x1ebb('0x35')]=function(_0x470581,_0x14ed1e){return db[_0x1ebb('0x40')][_0x1ebb('0x59')]({'where':{'id':_0x470581[_0x1ebb('0x56')]['id']}})[_0x1ebb('0x20')](handleEntityNotFound(_0x14ed1e,null))[_0x1ebb('0x20')](removeEntity(_0x14ed1e,null))[_0x1ebb('0x28')](handleError(_0x14ed1e,null));};exports['describe']=function(_0x2e96bf,_0x504116){return db[_0x1ebb('0x40')]['describe']()['then'](respondWithResult(_0x504116,null))['catch'](handleError(_0x504116,null));};exports[_0x1ebb('0x62')]=function(_0x3a7083,_0x484582,_0x4d0856){if(_0x3a7083['body']['id']){delete _0x3a7083['body']['id'];}return db[_0x1ebb('0x40')][_0x1ebb('0x59')]({'where':{'id':_0x3a7083[_0x1ebb('0x56')]['id']}})[_0x1ebb('0x20')](handleEntityNotFound(_0x484582,null))['then'](function(_0xb02dbc){if(_0xb02dbc){_0x3a7083[_0x1ebb('0x5b')]['WhatsappAccountId']=_0xb02dbc['id'];return db[_0x1ebb('0x63')][_0x1ebb('0x5a')](_0x3a7083['body']);}})[_0x1ebb('0x20')](respondWithResult(_0x484582,null))['catch'](handleError(_0x484582,null));};exports[_0x1ebb('0x64')]=function(_0x2bd4ef,_0x3683da,_0x320061){var _0x47b449={'raw':![],'where':{}};var _0x3300ba={};var _0x1ae3a2={'count':0x0,'rows':[]};return db[_0x1ebb('0x40')][_0x1ebb('0x65')]({'where':{'id':_0x2bd4ef[_0x1ebb('0x56')]['id']}})[_0x1ebb('0x20')](handleEntityNotFound(_0x3683da,null))[_0x1ebb('0x20')](function(_0x390c63){if(_0x390c63){_0x3300ba[_0x1ebb('0x41')]=_[_0x1ebb('0x43')](db['Disposition'][_0x1ebb('0x57')]);_0x3300ba['query']=_[_0x1ebb('0x43')](_0x2bd4ef['query']);_0x3300ba[_0x1ebb('0x44')]=_[_0x1ebb('0x45')](_0x3300ba[_0x1ebb('0x41')],_0x3300ba[_0x1ebb('0x42')]);_0x47b449['attributes']=_[_0x1ebb('0x45')](_0x3300ba[_0x1ebb('0x41')],qs[_0x1ebb('0x47')](_0x2bd4ef[_0x1ebb('0x42')][_0x1ebb('0x47')]));_0x47b449['attributes']=_0x47b449[_0x1ebb('0x46')]['length']?_0x47b449['attributes']:_0x3300ba[_0x1ebb('0x41')];if(!_0x2bd4ef[_0x1ebb('0x42')][_0x1ebb('0x49')](_0x1ebb('0x4a'))){_0x47b449[_0x1ebb('0x2f')]=qs[_0x1ebb('0x2f')](_0x2bd4ef[_0x1ebb('0x42')]['limit']);_0x47b449[_0x1ebb('0x2c')]=qs[_0x1ebb('0x2c')](_0x2bd4ef[_0x1ebb('0x42')][_0x1ebb('0x2c')]);}_0x47b449[_0x1ebb('0x4b')]=qs['sort'](_0x2bd4ef[_0x1ebb('0x42')]['sort']);_0x47b449[_0x1ebb('0x4f')]=qs[_0x1ebb('0x44')](_[_0x1ebb('0x4d')](_0x2bd4ef[_0x1ebb('0x42')],_0x3300ba['filters']));_0x47b449[_0x1ebb('0x4f')][_0x1ebb('0x66')]=_0x390c63['id'];if(_0x2bd4ef[_0x1ebb('0x42')][_0x1ebb('0x4e')]){_0x47b449[_0x1ebb('0x4f')]=_['merge'](_0x47b449[_0x1ebb('0x4f')],{'$or':_['map'](_0x47b449[_0x1ebb('0x46')],function(_0x3e08ca){var _0x40f5bc={};_0x40f5bc[_0x3e08ca]={'$like':'%'+_0x2bd4ef[_0x1ebb('0x42')][_0x1ebb('0x4e')]+'%'};return _0x40f5bc;})});}_0x47b449=_[_0x1ebb('0x51')]({},_0x47b449,_0x2bd4ef[_0x1ebb('0x52')]);return db[_0x1ebb('0x63')][_0x1ebb('0x2e')]({'where':_0x47b449[_0x1ebb('0x4f')]})[_0x1ebb('0x20')](function(_0x1583ab){_0x1ae3a2[_0x1ebb('0x2e')]=_0x1583ab;if(_0x2bd4ef[_0x1ebb('0x42')]['includeAll']){_0x47b449[_0x1ebb('0x53')]=[{'all':!![]}];}return db['Disposition'][_0x1ebb('0x54')](_0x47b449);})[_0x1ebb('0x20')](function(_0x218abe){_0x1ae3a2[_0x1ebb('0x55')]=_0x218abe;return _0x1ae3a2;});}})['then'](respondWithFilteredResult(_0x3683da,_0x47b449))[_0x1ebb('0x28')](handleError(_0x3683da,null));};exports[_0x1ebb('0x67')]=function(_0x25068f,_0x61c750,_0x4ec31d){return db['WhatsappAccount'][_0x1ebb('0x59')]({'where':{'id':_0x25068f[_0x1ebb('0x56')]['id']}})[_0x1ebb('0x20')](handleEntityNotFound(_0x61c750,null))[_0x1ebb('0x20')](function(_0x111ec6){if(_0x111ec6){return _0x111ec6['removeDispositions'](_0x25068f[_0x1ebb('0x42')][_0x1ebb('0x68')]);}})[_0x1ebb('0x20')](respondWithStatusCode(_0x61c750,null))[_0x1ebb('0x28')](handleError(_0x61c750,null));};exports['addAnswer']=function(_0x3a7914,_0x130eed,_0x2adb7b){if(_0x3a7914[_0x1ebb('0x5b')]['id']){delete _0x3a7914[_0x1ebb('0x5b')]['id'];}return db[_0x1ebb('0x40')][_0x1ebb('0x59')]({'where':{'id':_0x3a7914[_0x1ebb('0x56')]['id']}})[_0x1ebb('0x20')](handleEntityNotFound(_0x130eed,null))[_0x1ebb('0x20')](function(_0xdae8d){if(_0xdae8d){_0x3a7914[_0x1ebb('0x5b')][_0x1ebb('0x66')]=_0xdae8d['id'];return db[_0x1ebb('0x69')]['create'](_0x3a7914[_0x1ebb('0x5b')]);}})[_0x1ebb('0x20')](respondWithResult(_0x130eed,null))['catch'](handleError(_0x130eed,null));};exports[_0x1ebb('0x6a')]=function(_0x26c8f2,_0x3407ca,_0x17fcf6){var _0x1f4880={'raw':![],'where':{}};var _0x1eca63={};var _0x3d9f73={'count':0x0,'rows':[]};return db['WhatsappAccount'][_0x1ebb('0x65')]({'where':{'id':_0x26c8f2[_0x1ebb('0x56')]['id']}})[_0x1ebb('0x20')](handleEntityNotFound(_0x3407ca,null))[_0x1ebb('0x20')](function(_0x2552c5){if(_0x2552c5){_0x1eca63[_0x1ebb('0x41')]=_[_0x1ebb('0x43')](db[_0x1ebb('0x69')][_0x1ebb('0x57')]);_0x1eca63[_0x1ebb('0x42')]=_[_0x1ebb('0x43')](_0x26c8f2[_0x1ebb('0x42')]);_0x1eca63[_0x1ebb('0x44')]=_[_0x1ebb('0x45')](_0x1eca63[_0x1ebb('0x41')],_0x1eca63['query']);_0x1f4880[_0x1ebb('0x46')]=_[_0x1ebb('0x45')](_0x1eca63[_0x1ebb('0x41')],qs['fields'](_0x26c8f2['query'][_0x1ebb('0x47')]));_0x1f4880['attributes']=_0x1f4880[_0x1ebb('0x46')][_0x1ebb('0x48')]?_0x1f4880[_0x1ebb('0x46')]:_0x1eca63[_0x1ebb('0x41')];if(!_0x26c8f2['query']['hasOwnProperty'](_0x1ebb('0x4a'))){_0x1f4880[_0x1ebb('0x2f')]=qs[_0x1ebb('0x2f')](_0x26c8f2['query'][_0x1ebb('0x2f')]);_0x1f4880[_0x1ebb('0x2c')]=qs['offset'](_0x26c8f2[_0x1ebb('0x42')][_0x1ebb('0x2c')]);}_0x1f4880[_0x1ebb('0x4b')]=qs[_0x1ebb('0x4c')](_0x26c8f2[_0x1ebb('0x42')]['sort']);_0x1f4880[_0x1ebb('0x4f')]=qs['filters'](_[_0x1ebb('0x4d')](_0x26c8f2['query'],_0x1eca63['filters']));_0x1f4880[_0x1ebb('0x4f')][_0x1ebb('0x66')]=_0x2552c5['id'];if(_0x26c8f2[_0x1ebb('0x42')]['filter']){_0x1f4880[_0x1ebb('0x4f')]=_['merge'](_0x1f4880[_0x1ebb('0x4f')],{'$or':_[_0x1ebb('0x3f')](_0x1f4880['attributes'],function(_0x1738ad){var _0xa22bda={};_0xa22bda[_0x1738ad]={'$like':'%'+_0x26c8f2[_0x1ebb('0x42')]['filter']+'%'};return _0xa22bda;})});}_0x1f4880=_['merge']({},_0x1f4880,_0x26c8f2[_0x1ebb('0x52')]);return db[_0x1ebb('0x69')][_0x1ebb('0x2e')]({'where':_0x1f4880[_0x1ebb('0x4f')]})['then'](function(_0x1c4e68){_0x3d9f73[_0x1ebb('0x2e')]=_0x1c4e68;if(_0x26c8f2[_0x1ebb('0x42')][_0x1ebb('0x58')]){_0x1f4880[_0x1ebb('0x53')]=[{'all':!![]}];}return db[_0x1ebb('0x69')][_0x1ebb('0x54')](_0x1f4880);})[_0x1ebb('0x20')](function(_0x3bf073){_0x3d9f73[_0x1ebb('0x55')]=_0x3bf073;return _0x3d9f73;});}})[_0x1ebb('0x20')](respondWithFilteredResult(_0x3407ca,_0x1f4880))[_0x1ebb('0x28')](handleError(_0x3407ca,null));};exports['removeAnswers']=function(_0x47ece3,_0x3a7468,_0x52ec54){return db[_0x1ebb('0x40')][_0x1ebb('0x59')]({'where':{'id':_0x47ece3[_0x1ebb('0x56')]['id']}})[_0x1ebb('0x20')](handleEntityNotFound(_0x3a7468,null))[_0x1ebb('0x20')](function(_0x230044){if(_0x230044){return _0x230044[_0x1ebb('0x6b')](_0x47ece3[_0x1ebb('0x42')]['ids']);}})[_0x1ebb('0x20')](respondWithStatusCode(_0x3a7468,null))['catch'](handleError(_0x3a7468,null));};exports[_0x1ebb('0x6c')]=function(_0x32d3e5,_0x37a488,_0xf3300d){return db[_0x1ebb('0x40')][_0x1ebb('0x59')]({'where':{'id':_0x32d3e5[_0x1ebb('0x56')]['id']}})[_0x1ebb('0x20')](handleEntityNotFound(_0x37a488,null))[_0x1ebb('0x20')](function(_0x360a4d){if(_0x360a4d){return _0x360a4d[_0x1ebb('0x6c')](_0x32d3e5['body']['ids'],_[_0x1ebb('0x6d')](_0x32d3e5[_0x1ebb('0x5b')],['ids','id'])||{})[_0x1ebb('0x6e')](function(_0xbe0e85){for(var _0x4ad048=0x0;_0x4ad048<_0x32d3e5[_0x1ebb('0x5b')][_0x1ebb('0x68')][_0x1ebb('0x48')];_0x4ad048+=0x1){socket[_0x1ebb('0x6f')](_0x1ebb('0x70'),{'UserId':_0x32d3e5[_0x1ebb('0x5b')][_0x1ebb('0x68')][_0x4ad048],'WhatsappAccountId':_0x32d3e5[_0x1ebb('0x56')]['id']});}return _0xbe0e85;});}})['then'](respondWithResult(_0x37a488,null))[_0x1ebb('0x28')](handleError(_0x37a488,null));};exports[_0x1ebb('0x71')]=function(_0x50c33c,_0x58afac,_0x395a1b){return db[_0x1ebb('0x40')]['find']({'where':{'id':_0x50c33c[_0x1ebb('0x56')]['id']}})[_0x1ebb('0x20')](handleEntityNotFound(_0x58afac,null))[_0x1ebb('0x20')](function(_0x179f3c){if(_0x179f3c){return _0x179f3c[_0x1ebb('0x71')](_0x50c33c[_0x1ebb('0x42')][_0x1ebb('0x68')])[_0x1ebb('0x20')](function(){if(_[_0x1ebb('0x72')](_0x50c33c[_0x1ebb('0x42')][_0x1ebb('0x68')])){for(var _0x26f015=0x0;_0x26f015<_0x50c33c[_0x1ebb('0x42')][_0x1ebb('0x68')][_0x1ebb('0x48')];_0x26f015+=0x1){socket[_0x1ebb('0x6f')](_0x1ebb('0x73'),{'UserId':Number(_0x50c33c[_0x1ebb('0x42')][_0x1ebb('0x68')][_0x26f015]),'WhatsappAccountId':Number(_0x50c33c['params']['id'])});}}else{socket[_0x1ebb('0x6f')](_0x1ebb('0x73'),{'UserId':Number(_0x50c33c['query'][_0x1ebb('0x68')]),'WhatsappAccountId':Number(_0x50c33c[_0x1ebb('0x56')]['id'])});}});}})[_0x1ebb('0x20')](respondWithStatusCode(_0x58afac,null))['catch'](handleError(_0x58afac,null));};exports[_0x1ebb('0x74')]=function(_0x15cc54,_0x4d7e72,_0x3cff81){var _0x386a95={};var _0x4f994a={};var _0x357b7f;var _0xdeddf3;return db['WhatsappAccount']['findOne']({'where':{'id':_0x15cc54[_0x1ebb('0x56')]['id']}})[_0x1ebb('0x20')](handleEntityNotFound(_0x4d7e72,null))[_0x1ebb('0x20')](function(_0x4a1042){if(_0x4a1042){_0x357b7f=_0x4a1042;_0x4f994a[_0x1ebb('0x41')]=_[_0x1ebb('0x43')](db[_0x1ebb('0x75')][_0x1ebb('0x57')]);_0x4f994a[_0x1ebb('0x42')]=_['keys'](_0x15cc54[_0x1ebb('0x42')]);_0x4f994a[_0x1ebb('0x44')]=_[_0x1ebb('0x45')](_0x4f994a[_0x1ebb('0x41')],_0x4f994a[_0x1ebb('0x42')]);_0x386a95[_0x1ebb('0x46')]=_[_0x1ebb('0x45')](_0x4f994a[_0x1ebb('0x41')],qs[_0x1ebb('0x47')](_0x15cc54[_0x1ebb('0x42')][_0x1ebb('0x47')]));_0x386a95['attributes']=_0x386a95[_0x1ebb('0x46')][_0x1ebb('0x48')]?_0x386a95['attributes']:_0x4f994a[_0x1ebb('0x41')];_0x386a95[_0x1ebb('0x4b')]=qs[_0x1ebb('0x4c')](_0x15cc54[_0x1ebb('0x42')][_0x1ebb('0x4c')]);_0x386a95[_0x1ebb('0x4f')]=qs[_0x1ebb('0x44')](_['pick'](_0x15cc54[_0x1ebb('0x42')],_0x4f994a['filters']));if(_0x15cc54[_0x1ebb('0x42')][_0x1ebb('0x4e')]){_0x386a95['where']=_[_0x1ebb('0x51')](_0x386a95['where'],{'$or':_['map'](_0x386a95[_0x1ebb('0x46')],function(_0x38ef9c){var _0x17ee0b={};_0x17ee0b[_0x38ef9c]={'$like':'%'+_0x15cc54[_0x1ebb('0x42')][_0x1ebb('0x4e')]+'%'};return _0x17ee0b;})});}_0x386a95=_[_0x1ebb('0x51')]({},_0x386a95,_0x15cc54[_0x1ebb('0x52')]);return _0x357b7f['getAgents'](_0x386a95);}})[_0x1ebb('0x20')](function(_0x5d255a){if(_0x5d255a){_0xdeddf3=_0x5d255a['length'];if(!_0x15cc54[_0x1ebb('0x42')]['hasOwnProperty'](_0x1ebb('0x4a'))){_0x386a95[_0x1ebb('0x2f')]=qs['limit'](_0x15cc54['query'][_0x1ebb('0x2f')]);_0x386a95[_0x1ebb('0x2c')]=qs['offset'](_0x15cc54[_0x1ebb('0x42')]['offset']);}return _0x357b7f['getAgents'](_0x386a95);}})[_0x1ebb('0x20')](function(_0x17b232){if(_0x17b232){return _0x17b232?{'count':_0xdeddf3,'rows':_0x17b232}:null;}})[_0x1ebb('0x20')](respondWithResult(_0x4d7e72,null))[_0x1ebb('0x28')](handleError(_0x4d7e72,null));};exports[_0x1ebb('0x76')]=function(_0x8d5d87,_0x13b6a6,_0x11e7e9){return db[_0x1ebb('0x40')][_0x1ebb('0x65')]({'where':{'id':_0x8d5d87[_0x1ebb('0x56')]['id']}})[_0x1ebb('0x20')](handleEntityNotFound(_0x13b6a6,null))['then'](function(_0x2182c3){if(_0x2182c3){return db[_0x1ebb('0x77')][_0x1ebb('0x78')](function(_0x232dc1){return db['WhatsappApplication']['destroy']({'where':{'WhatsappAccountId':_0x8d5d87[_0x1ebb('0x56')]['id']},'transaction':_0x232dc1})[_0x1ebb('0x20')](function(_0x2bb343){var _0x5cb531=_[_0x1ebb('0x3f')](_0x8d5d87[_0x1ebb('0x5b')],function(_0x2bdfd1){_0x2bdfd1[_0x1ebb('0x66')]=_0x8d5d87[_0x1ebb('0x56')]['id'];return _0x2bdfd1;});return db[_0x1ebb('0x79')][_0x1ebb('0x7a')](_0x5cb531,{'transaction':_0x232dc1});});})[_0x1ebb('0x20')](function(){return db[_0x1ebb('0x79')][_0x1ebb('0x7b')]({'where':{'WhatsappAccountId':_0x8d5d87['params']['id']},'order':'priority'});});}})[_0x1ebb('0x20')](respondWithResult(_0x13b6a6,null))['catch'](handleError(_0x13b6a6,null));};exports[_0x1ebb('0x7c')]=function(_0x339daf,_0x5abcf4,_0x5eecd5){var _0xf27a9b={};var _0x1d8ebf={};var _0x551ee7;var _0xcfb8b0;return db[_0x1ebb('0x40')]['findOne']({'where':{'id':_0x339daf[_0x1ebb('0x56')]['id']}})[_0x1ebb('0x20')](handleEntityNotFound(_0x5abcf4,null))[_0x1ebb('0x20')](function(_0x22595c){if(_0x22595c){_0x551ee7=_0x22595c;_0x1d8ebf[_0x1ebb('0x41')]=_['keys'](db[_0x1ebb('0x79')][_0x1ebb('0x57')]);_0x1d8ebf[_0x1ebb('0x42')]=_['keys'](_0x339daf['query']);_0x1d8ebf['filters']=_[_0x1ebb('0x45')](_0x1d8ebf[_0x1ebb('0x41')],_0x1d8ebf[_0x1ebb('0x42')]);_0xf27a9b[_0x1ebb('0x46')]=_[_0x1ebb('0x45')](_0x1d8ebf['model'],qs['fields'](_0x339daf[_0x1ebb('0x42')][_0x1ebb('0x47')]));_0xf27a9b['attributes']=_0xf27a9b[_0x1ebb('0x46')][_0x1ebb('0x48')]?_0xf27a9b[_0x1ebb('0x46')]:_0x1d8ebf['model'];_0xf27a9b[_0x1ebb('0x4b')]=qs['sort'](_0x339daf[_0x1ebb('0x42')]['sort']);_0xf27a9b[_0x1ebb('0x4f')]=qs['filters'](_[_0x1ebb('0x4d')](_0x339daf[_0x1ebb('0x42')],_0x1d8ebf[_0x1ebb('0x44')]));if(_0x339daf['query']['filter']){_0xf27a9b[_0x1ebb('0x4f')]=_[_0x1ebb('0x51')](_0xf27a9b[_0x1ebb('0x4f')],{'$or':_[_0x1ebb('0x3f')](_0xf27a9b[_0x1ebb('0x46')],function(_0x5b4f2f){var _0x2b29aa={};_0x2b29aa[_0x5b4f2f]={'$like':'%'+_0x339daf[_0x1ebb('0x42')][_0x1ebb('0x4e')]+'%'};return _0x2b29aa;})});}_0xf27a9b=_[_0x1ebb('0x51')]({},_0xf27a9b,_0x339daf['options']);return _0x551ee7[_0x1ebb('0x7c')](_0xf27a9b);}})[_0x1ebb('0x20')](function(_0x400ddd){if(_0x400ddd){_0xcfb8b0=_0x400ddd[_0x1ebb('0x48')];if(!_0x339daf[_0x1ebb('0x42')][_0x1ebb('0x49')](_0x1ebb('0x4a'))){_0xf27a9b['limit']=qs['limit'](_0x339daf['query']['limit']);_0xf27a9b[_0x1ebb('0x2c')]=qs['offset'](_0x339daf[_0x1ebb('0x42')]['offset']);}return _0x551ee7[_0x1ebb('0x7c')](_0xf27a9b);}})[_0x1ebb('0x20')](function(_0x5d9476){if(_0x5d9476){return _0x5d9476?{'count':_0xcfb8b0,'rows':_0x5d9476}:null;}})[_0x1ebb('0x20')](respondWithResult(_0x5abcf4,null))[_0x1ebb('0x28')](handleError(_0x5abcf4,null));};exports['notify']=function(_0x5a311f,_0x50c5bd,_0x473429){var _0x21467f={'channel':_0x1ebb('0x7d')};var _0x3bd976=[];var _0x5c86ba=[];var _0x24bc37={};return db['WhatsappAccount'][_0x1ebb('0x59')]({'where':{'id':_0x5a311f[_0x1ebb('0x56')]['id']},'include':[{'model':db[_0x1ebb('0x79')],'as':_0x1ebb('0x7e')}]})[_0x1ebb('0x20')](handleEntityNotFound(_0x50c5bd,null))[_0x1ebb('0x20')](function(_0x1ecbf3){_0x21467f[_0x1ebb('0x7f')]=_0x1ecbf3;_0x21467f['applications']=_['orderBy'](_0x1ecbf3[_0x1ebb('0x7e')],['priority'],[_0x1ebb('0x80')]);if(_0x21467f['account'][_0x1ebb('0x7e')]){delete _0x21467f[_0x1ebb('0x7f')][_0x1ebb('0x7e')];}return db[_0x1ebb('0x81')]['describe']();})[_0x1ebb('0x20')](function(_0x4a3a0e){if(!_0x4a3a0e){throw new db[(_0x1ebb('0x82'))]['ValidationError'](_0x1ebb('0x83'));}_0x3bd976=_[_0x1ebb('0x84')](_[_0x1ebb('0x43')](_0x4a3a0e),[_0x1ebb('0x85'),_0x1ebb('0x86')]);_0x5c86ba=_['difference'](_[_0x1ebb('0x43')](_0x4a3a0e),[_0x1ebb('0x85'),_0x1ebb('0x86'),_0x1ebb('0x87'),_0x1ebb('0x88')]);_0x21467f[_0x1ebb('0x5b')]={'mapKey':_0x1ebb('0x89')};if(_0x21467f[_0x1ebb('0x7f')][_0x1ebb('0x8a')]&&_0x21467f['account'][_0x1ebb('0x8a')]==='twilio'){_0x21467f[_0x1ebb('0x5b')]['from']=_0x5a311f[_0x1ebb('0x5b')][_0x1ebb('0x8b')][_0x1ebb('0x8c')]('whatsapp:','');_0x21467f['body'][_0x1ebb('0x5b')]=_0x5a311f[_0x1ebb('0x5b')][_0x1ebb('0x8d')];_0x21467f[_0x1ebb('0x5b')][_0x1ebb('0x8e')]=_0x5a311f[_0x1ebb('0x5b')][_0x1ebb('0x8f')];}if(_0x21467f[_0x1ebb('0x5b')]['id']){delete _0x21467f['body']['id'];}if(_['isNil'](_0x21467f[_0x1ebb('0x5b')][_0x1ebb('0x90')])){throw new db[(_0x1ebb('0x82'))]['ValidationError'](_0x1ebb('0x91'));}if(_[_0x1ebb('0x92')](_0x21467f['body']['body'])||_0x21467f[_0x1ebb('0x5b')][_0x1ebb('0x5b')]===''){throw new db[(_0x1ebb('0x82'))][(_0x1ebb('0x93'))](_0x1ebb('0x94'));}if(_['isNil'](_0x21467f[_0x1ebb('0x5b')]['mapKey'])){throw new db[(_0x1ebb('0x82'))][(_0x1ebb('0x93'))](_0x1ebb('0x95')+_0x5c86ba);}if(!_[_0x1ebb('0x96')](_0x5c86ba,_0x21467f[_0x1ebb('0x5b')]['mapKey'])){throw new db[(_0x1ebb('0x82'))][(_0x1ebb('0x93'))](_0x1ebb('0x97')+_0x5c86ba);}_0x24bc37[_0x21467f[_0x1ebb('0x5b')][_0x1ebb('0x98')]]=_0x21467f[_0x1ebb('0x5b')][_0x1ebb('0x90')];return db[_0x1ebb('0x99')][_0x1ebb('0x59')]({'where':{'id':_0x21467f[_0x1ebb('0x7f')][_0x1ebb('0x88')]},'include':[{'model':db[_0x1ebb('0x81')],'as':_0x1ebb('0x9a'),'where':_0x24bc37,'limit':0x1,'order':[[_0x1ebb('0x86'),_0x1ebb('0x9b')]]}]});})['then'](handleEntityNotFound(_0x50c5bd,null))[_0x1ebb('0x20')](function(_0x2e0288){if(_0x2e0288){_0x21467f[_0x1ebb('0x9c')]=_[_0x1ebb('0x6d')](_0x2e0288,[_0x1ebb('0x9a')]);if(_0x2e0288[_0x1ebb('0x9a')][_0x1ebb('0x48')]){return _0x2e0288[_0x1ebb('0x9a')][0x0];}var _0x10fe1c=_[_0x1ebb('0x1a')](_0x21467f[_0x1ebb('0x5b')],{'firstName':_0x21467f[_0x1ebb('0x5b')][_0x1ebb('0x90')],'ListId':_0x2e0288['id']});_0x10fe1c[_0x21467f['body'][_0x1ebb('0x98')]]=_0x21467f[_0x1ebb('0x5b')]['from'];return db[_0x1ebb('0x81')][_0x1ebb('0x5a')](_0x10fe1c,{'fields':_0x3bd976,'raw':!![]});}})[_0x1ebb('0x20')](handleEntityNotFound(_0x50c5bd,null))[_0x1ebb('0x20')](function(_0x7571f8){if(_0x7571f8){_0x21467f['contact']=_0x7571f8;var _0x2c2943={'ContactId':_0x7571f8['id'],'phone':_0x21467f[_0x1ebb('0x5b')]['from'],'WhatsappAccountId':_0x5a311f[_0x1ebb('0x56')]['id']};var _0x32837f={'ContactId':_0x7571f8['id'],'WhatsappAccountId':_0x5a311f['params']['id'],'closed':![]};return db[_0x1ebb('0x9d')]['find']({'where':_0x32837f})[_0x1ebb('0x20')](function(_0x1e837c){if(_0x1e837c){return[_0x1e837c,![]];}return db[_0x1ebb('0x9d')]['create'](_0x2c2943)[_0x1ebb('0x20')](function(_0x4822c8){return[_0x4822c8,!![]];});});}})[_0x1ebb('0x6e')](function(_0x4efa7c,_0x44d454){_0x21467f[_0x1ebb('0x9e')]=_0x4efa7c[_0x1ebb('0x36')]({'plain':!![]});_0x21467f[_0x1ebb('0x9e')]['created']=![];if(_0x44d454){if(_0x21467f[_0x1ebb('0x7f')][_0x1ebb('0x9f')]){_0x21467f[_0x1ebb('0xa0')][_0x1ebb('0xa1')]({'id':0x0,'priority':_0x21467f[_0x1ebb('0xa0')][_0x1ebb('0x48')]+0x1,'app':_0x1ebb('0xa2'),'appdata':_0x1ebb('0xa3'),'interval':_0x1ebb('0xa4')});}_0x21467f[_0x1ebb('0x9e')][_0x1ebb('0xa5')]=!![];}return db['WhatsappMessage'][_0x1ebb('0x5a')]({'phone':_0x21467f[_0x1ebb('0x5b')]['from'],'messageId':_0x21467f[_0x1ebb('0x5b')][_0x1ebb('0x8e')],'body':_0x21467f[_0x1ebb('0x5b')]['body'],'WhatsappAccountId':_0x5a311f[_0x1ebb('0x56')]['id'],'WhatsappInteractionId':_0x4efa7c['id'],'direction':'in','ContactId':_0x4efa7c[_0x1ebb('0xa6')],'AttachmentId':_0x21467f[_0x1ebb('0x5b')][_0x1ebb('0xa7')]});})[_0x1ebb('0x20')](function(_0x1ca7c7){_0x21467f[_0x1ebb('0x27')]=_0x1ca7c7;if(_0x21467f['interaction']['UserId']){return db[_0x1ebb('0x75')]['find']({'attributes':['id',_0x1ebb('0x3b')],'where':{'id':_0x21467f[_0x1ebb('0x9e')]['UserId']}})[_0x1ebb('0x20')](function(_0x5553ae){if(_0x5553ae){_0x21467f[_0x1ebb('0xa0')][_0x1ebb('0xa8')]({'id':0x0,'priority':0x0,'app':_0x1ebb('0xa9'),'appdata':_0x5553ae[_0x1ebb('0x3b')]+','+(_0x21467f[_0x1ebb('0x7f')][_0x1ebb('0xaa')]||0xa),'interval':_0x1ebb('0xa4')});}return respondWithRpcPromise('Start',_0x1ebb('0xab'),_0x21467f);});}return respondWithRpcPromise(_0x1ebb('0xac'),_0x1ebb('0xab'),_0x21467f);})[_0x1ebb('0x20')](function(_0x594c62){if(_0x594c62){var _0x5cbd11=0xc8;var _0x2bc105=_0x1ebb('0xad');logger[_0x1ebb('0x21')](_0x1ebb('0x25'),_0x2bc105,_0x5cbd11,'entity\x20found');logger['debug'](_0x1ebb('0xae'),_0x2bc105,_0x5cbd11,'entity\x20found',JSON[_0x1ebb('0xaf')](_0x594c62));if(_0x21467f['account'][_0x1ebb('0x8a')]===_0x1ebb('0xb0')){return _0x50c5bd[_0x1ebb('0x2a')](_0x5cbd11)['set']('Content-Type',_0x1ebb('0xb1'))[_0x1ebb('0x3c')](_0x1ebb('0xb2'));}else{return _0x50c5bd[_0x1ebb('0x2a')](_0x5cbd11)[_0x1ebb('0x2b')](_0x594c62);}}})['catch'](handleError(_0x50c5bd,null));};exports[_0x1ebb('0x3c')]=function(_0xa75f71,_0x3cd3fc,_0x1c3e6d){var _0x21fd31,_0x3cfc61,_0x152678;if(_[_0x1ebb('0x92')](_0xa75f71['body'][_0x1ebb('0x5b')])||_0xa75f71[_0x1ebb('0x5b')]['body']===''){throw new db[(_0x1ebb('0x82'))][(_0x1ebb('0x93'))](_0x1ebb('0x94'));}if(_[_0x1ebb('0x92')](_0xa75f71[_0x1ebb('0x5b')]['to'])){throw new db[(_0x1ebb('0x82'))]['ValidationError'](_0x1ebb('0xb3'));}_0x21fd31=_0xa75f71[_0x1ebb('0x5b')]['to'];return db['WhatsappAccount'][_0x1ebb('0x59')]({'where':{'id':_0xa75f71['params']['id']},'include':[{'model':db['CmList'],'as':_0x1ebb('0xb4'),'include':[{'model':db[_0x1ebb('0x81')],'as':'Contacts','where':{'mobile':_0x21fd31},'limit':0x1,'order':[['updatedAt',_0x1ebb('0x9b')]]}]}]})[_0x1ebb('0x20')](handleEntityNotFound(_0x3cd3fc,null))['then'](function(_0x3118f2){if(_0x3118f2&&_0x3118f2[_0x1ebb('0xb4')]){_0x3cfc61=_0x3118f2[_0x1ebb('0x36')]({'plain':!![]});if(_0x3cfc61['List']&&_0x3cfc61[_0x1ebb('0xb4')]['Contacts'][_0x1ebb('0x48')]){return _0x3cfc61[_0x1ebb('0xb4')][_0x1ebb('0x9a')][0x0];}return db[_0x1ebb('0x81')][_0x1ebb('0x5a')](_[_0x1ebb('0x1a')](_0xa75f71['body'],{'firstName':_0x21fd31,'mobile':_0x21fd31,'phone':_0x21fd31,'ListId':_0x3cfc61[_0x1ebb('0x88')]}));}})[_0x1ebb('0x20')](handleEntityNotFound(_0x3cd3fc,null))[_0x1ebb('0x20')](function(_0x3e62f9){if(_0x3e62f9){_0x152678=_0x3e62f9;return db['WhatsappInteraction']['find']({'where':{'ContactId':_0x152678['id'],'closed':![],'WhatsappAccountId':_0x3cfc61['id']}})[_0x1ebb('0x20')](function(_0x5e1775){if(_0x5e1775){return[_0x5e1775,![]];}return db[_0x1ebb('0x9d')][_0x1ebb('0x5a')]({'UserId':_0xa75f71[_0x1ebb('0x5c')]['id'],'ContactId':_0x152678['id'],'WhatsappAccountId':_0x3cfc61['id'],'phone':_0x21fd31,'firstMsgDirection':'out','Messages':[_[_0x1ebb('0x51')](_0xa75f71[_0x1ebb('0x5b')],{'read':![],'body':_0xa75f71[_0x1ebb('0x5b')][_0x1ebb('0x5b')],'phone':_0x21fd31,'WhatsappAccountId':_0x3cfc61['id'],'UserId':_0xa75f71[_0x1ebb('0x5c')]['id'],'ContactId':_0x152678['id']})]},{'include':[{'model':db['WhatsappMessage'],'as':'Messages'}]})[_0x1ebb('0x20')](function(_0x5a1061){return[_0x5a1061,!![]];});});}})[_0x1ebb('0x6e')](function(_0xe7079e,_0x535a89){if(_0x535a89){return _0xe7079e;}return db['WhatsappMessage'][_0x1ebb('0x5a')](_[_0x1ebb('0x51')](_0xa75f71['body'],{'read':![],'body':_0xa75f71['body']['body'],'phone':_0x21fd31,'WhatsappAccountId':_0x3cfc61['id'],'WhatsappInteractionId':_0xe7079e['id'],'UserId':_0xa75f71['user']['id'],'ContactId':_0x152678['id']}))[_0x1ebb('0x20')](function(_0x477b65){_0xe7079e['dataValues'][_0x1ebb('0xb5')]=[];_0xe7079e['dataValues']['Messages']['push'](_0x477b65['dataValues']);return _0xe7079e;});})['then'](respondWithResult(_0x3cd3fc,null))['catch'](handleError(_0x3cd3fc,null));}; \ No newline at end of file +var _0x0ce6=['VIRTUAL','filter','options','includeAll','include','findAll','rows','show','params','Pause','find','create','body','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','WhatsappAccounts','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','addDisposition','WhatsappAccountId','Disposition','getDispositions','removeDispositions','ids','addAnswer','CannedAnswer','getAnswers','findOne','removeAnswers','addAgents','omit','emit','userWhatsappAccount:save','removeAgents','userWhatsappAccount:remove','getAgents','User','nolimit','sequelize','transaction','WhatsappApplication','bulkCreate','priority','getApplications','notify','whatsapp','Applications','asc','account','CmContact','difference','createdAt','updatedAt','ListId','mobile','twilio','from','From','replace','whatsapp:','messageId','MessageSid','isNil','Sequelize','ValidationError','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','includes','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','CmList','DESC','list','WhatsappInteraction','spread','interaction','created','applications','push','close','*,*,*,*','WhatsappMessage','ContactId','AttachmentId','UserId','unshift','agent','startRouting','Start','receiveMessage','entity\x20found','WhatsappAccount,\x20%s,\x20%s,\x20%s,\x20%s','Content-Type','\x0a','Contacts','List','out','Messages','dataValues','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','defaults','redis','localhost','./whatsappAccount.socket','jayson/promise','client','request','then','request\x20sent','debug','WhatsappAccount,\x20%s,\x20%s,\x20%s','stringify','error','WhatsappAccount,\x20%s,\x20%s','message','info','result','catch','sendStatus','status','end','json','undefined','limit','offset','count','set','Content-Range','apply','reject','update','destroy','UserProfileResource','stack','name','send','mandatoryDispositionPause','map','WhatsappAccount','rawAttributes','type','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','pick','merge'];(function(_0x54eab6,_0x5e262f){var _0x1e7435=function(_0x468c91){while(--_0x468c91){_0x54eab6['push'](_0x54eab6['shift']());}};_0x1e7435(++_0x5e262f);}(_0x0ce6,0x11e));var _0x60ce=function(_0x4d378a,_0xbe2725){_0x4d378a=_0x4d378a-0x0;var _0x2d8b92=_0x0ce6[_0x4d378a];return _0x2d8b92;};'use strict';var emlformat=require(_0x60ce('0x0'));var rimraf=require(_0x60ce('0x1'));var zipdir=require(_0x60ce('0x2'));var jsonpatch=require(_0x60ce('0x3'));var rp=require(_0x60ce('0x4'));var moment=require('moment');var BPromise=require(_0x60ce('0x5'));var Mustache=require(_0x60ce('0x6'));var util=require(_0x60ce('0x7'));var path=require(_0x60ce('0x8'));var sox=require(_0x60ce('0x9'));var csv=require(_0x60ce('0xa'));var ejs=require(_0x60ce('0xb'));var fs=require('fs');var fs_extra=require(_0x60ce('0xc'));var _=require(_0x60ce('0xd'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x60ce('0xe'));var deskjs=require(_0x60ce('0xf'));var toCsv=require('to-csv');var querystring=require(_0x60ce('0x10'));var Papa=require('papaparse');var Redis=require(_0x60ce('0x11'));var authService=require(_0x60ce('0x12'));var qs=require(_0x60ce('0x13'));var as=require(_0x60ce('0x14'));var hardwareService=require(_0x60ce('0x15'));var logger=require(_0x60ce('0x16'))(_0x60ce('0x17'));var utils=require(_0x60ce('0x18'));var config=require(_0x60ce('0x19'));var licenseUtil=require(_0x60ce('0x1a'));var db=require('../../mysqldb')['db'];config['redis']=_[_0x60ce('0x1b')](config[_0x60ce('0x1c')],{'host':_0x60ce('0x1d'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0x60ce('0x1e'))['register'](socket);var jayson=require(_0x60ce('0x1f'));var client=jayson[_0x60ce('0x20')]['http']({'port':0x232c});function respondWithRpcPromise(_0x569b9f,_0xdbda2d,_0x728b3a,_0x28132b){return new BPromise(function(_0x517163,_0x4a78c4){var _0x32eebb=_0x28132b||client;return _0x32eebb[_0x60ce('0x21')](_0x569b9f,_0x728b3a)[_0x60ce('0x22')](function(_0xf7ee91){logger['info']('WhatsappAccount,\x20%s,\x20%s',_0xdbda2d,_0x60ce('0x23'));logger[_0x60ce('0x24')](_0x60ce('0x25'),_0xdbda2d,_0x60ce('0x23'),JSON[_0x60ce('0x26')](_0xf7ee91));if(_0xf7ee91[_0x60ce('0x27')]){if(_0xf7ee91['error']['code']===0x1f4){logger[_0x60ce('0x27')](_0x60ce('0x28'),_0xdbda2d,_0xf7ee91[_0x60ce('0x27')]['message']);return _0x4a78c4(_0xf7ee91[_0x60ce('0x27')][_0x60ce('0x29')]);}logger[_0x60ce('0x27')]('WhatsappAccount,\x20%s,\x20%s',_0xdbda2d,_0xf7ee91[_0x60ce('0x27')][_0x60ce('0x29')]);return _0x517163(_0xf7ee91[_0x60ce('0x27')]['message']);}else{logger[_0x60ce('0x2a')](_0x60ce('0x28'),_0xdbda2d,_0x60ce('0x23'));_0x517163(_0xf7ee91[_0x60ce('0x2b')][_0x60ce('0x29')]);}})[_0x60ce('0x2c')](function(_0x58ba74){logger['error'](_0x60ce('0x28'),_0xdbda2d,_0x58ba74);_0x4a78c4(_0x58ba74);});});}function respondWithStatusCode(_0x294bd5,_0x2f4903){_0x2f4903=_0x2f4903||0xcc;return function(_0x444430){if(_0x444430){return _0x294bd5[_0x60ce('0x2d')](_0x2f4903);}return _0x294bd5[_0x60ce('0x2e')](_0x2f4903)[_0x60ce('0x2f')]();};}function respondWithResult(_0x3091eb,_0x4575dc){_0x4575dc=_0x4575dc||0xc8;return function(_0x474652){if(_0x474652){return _0x3091eb[_0x60ce('0x2e')](_0x4575dc)[_0x60ce('0x30')](_0x474652);}};}function respondWithFilteredResult(_0x1f859e,_0x502323){return function(_0x4adf40){if(_0x4adf40){var _0x28a808=typeof _0x502323['offset']===_0x60ce('0x31')&&typeof _0x502323[_0x60ce('0x32')]==='undefined';var _0x211d9f=_0x4adf40['count'];var _0x32d7e6=_0x28a808?0x0:_0x502323[_0x60ce('0x33')];var _0x16c1b5=_0x28a808?_0x4adf40[_0x60ce('0x34')]:_0x502323[_0x60ce('0x33')]+_0x502323[_0x60ce('0x32')];var _0x352a2c;if(_0x16c1b5>=_0x211d9f){_0x16c1b5=_0x211d9f;_0x352a2c=0xc8;}else{_0x352a2c=0xce;}_0x1f859e[_0x60ce('0x2e')](_0x352a2c);return _0x1f859e[_0x60ce('0x35')](_0x60ce('0x36'),_0x32d7e6+'-'+_0x16c1b5+'/'+_0x211d9f)['json'](_0x4adf40);}return null;};}function patchUpdates(_0x4fea29){return function(_0x3dea40){try{jsonpatch[_0x60ce('0x37')](_0x3dea40,_0x4fea29,!![]);}catch(_0x49d2ed){return BPromise[_0x60ce('0x38')](_0x49d2ed);}return _0x3dea40['save']();};}function saveUpdates(_0x122cda,_0x18aec2){return function(_0x22ed9b){if(_0x22ed9b){return _0x22ed9b[_0x60ce('0x39')](_0x122cda)[_0x60ce('0x22')](function(_0x128996){return _0x128996;});}return null;};}function removeEntity(_0x2250d9,_0x3d463f){return function(_0x4d5ae9){if(_0x4d5ae9){return _0x4d5ae9[_0x60ce('0x3a')]()['then'](function(){var _0x33fa09=_0x4d5ae9['get']({'plain':!![]});var _0x376ac6='WhatsappAccounts';return db[_0x60ce('0x3b')][_0x60ce('0x3a')]({'where':{'type':_0x376ac6,'resourceId':_0x33fa09['id']}})[_0x60ce('0x22')](function(){return _0x4d5ae9;});})[_0x60ce('0x22')](function(){_0x2250d9['status'](0xcc)[_0x60ce('0x2f')]();});}};}function handleEntityNotFound(_0x744f24,_0x432407){return function(_0x27330b){if(!_0x27330b){_0x744f24[_0x60ce('0x2d')](0x194);}return _0x27330b;};}function handleError(_0x3407b6,_0x442229){_0x442229=_0x442229||0x1f4;return function(_0x2d6726){logger[_0x60ce('0x27')](_0x2d6726[_0x60ce('0x3c')]);if(_0x2d6726[_0x60ce('0x3d')]){delete _0x2d6726[_0x60ce('0x3d')];}_0x3407b6[_0x60ce('0x2e')](_0x442229)[_0x60ce('0x3e')](_0x2d6726);};}exports['index']=function(_0x6b053d,_0x51a6cd){var _0x399dd1={'include':[{'model':db['Pause'],'as':_0x60ce('0x3f')}]},_0x45c1c6={},_0x19a072={'count':0x0,'rows':[]};var _0x18e5fd=_[_0x60ce('0x40')](db[_0x60ce('0x41')][_0x60ce('0x42')],function(_0x5411a8){return{'name':_0x5411a8['fieldName'],'type':_0x5411a8[_0x60ce('0x43')]['key']};});_0x45c1c6[_0x60ce('0x44')]=_['map'](_0x18e5fd,_0x60ce('0x3d'));_0x45c1c6[_0x60ce('0x45')]=_[_0x60ce('0x46')](_0x6b053d[_0x60ce('0x45')]);_0x45c1c6[_0x60ce('0x47')]=_[_0x60ce('0x48')](_0x45c1c6[_0x60ce('0x44')],_0x45c1c6['query']);_0x399dd1[_0x60ce('0x49')]=_[_0x60ce('0x48')](_0x45c1c6[_0x60ce('0x44')],qs[_0x60ce('0x4a')](_0x6b053d['query'][_0x60ce('0x4a')]));_0x399dd1[_0x60ce('0x49')]=_0x399dd1['attributes'][_0x60ce('0x4b')]?_0x399dd1[_0x60ce('0x49')]:_0x45c1c6[_0x60ce('0x44')];if(!_0x6b053d[_0x60ce('0x45')][_0x60ce('0x4c')]('nolimit')){_0x399dd1[_0x60ce('0x32')]=qs['limit'](_0x6b053d['query'][_0x60ce('0x32')]);_0x399dd1[_0x60ce('0x33')]=qs[_0x60ce('0x33')](_0x6b053d[_0x60ce('0x45')]['offset']);}_0x399dd1[_0x60ce('0x4d')]=qs[_0x60ce('0x4e')](_0x6b053d[_0x60ce('0x45')][_0x60ce('0x4e')]);_0x399dd1[_0x60ce('0x4f')]=qs[_0x60ce('0x47')](_[_0x60ce('0x50')](_0x6b053d[_0x60ce('0x45')],_0x45c1c6[_0x60ce('0x47')]),_0x18e5fd);if(_0x6b053d[_0x60ce('0x45')]['filter']){_0x399dd1[_0x60ce('0x4f')]=_[_0x60ce('0x51')](_0x399dd1[_0x60ce('0x4f')],{'$or':_['map'](_0x18e5fd,function(_0x95abaf){if(_0x95abaf[_0x60ce('0x43')]!==_0x60ce('0x52')){var _0x2fbefc={};_0x2fbefc[_0x95abaf[_0x60ce('0x3d')]]={'$like':'%'+_0x6b053d[_0x60ce('0x45')][_0x60ce('0x53')]+'%'};return _0x2fbefc;}})});}_0x399dd1=_['merge']({},_0x399dd1,_0x6b053d[_0x60ce('0x54')]);var _0x3d6b3c={'where':_0x399dd1[_0x60ce('0x4f')]};return db['WhatsappAccount'][_0x60ce('0x34')](_0x3d6b3c)[_0x60ce('0x22')](function(_0x541b30){_0x19a072['count']=_0x541b30;if(_0x6b053d[_0x60ce('0x45')][_0x60ce('0x55')]){_0x399dd1[_0x60ce('0x56')]=[{'all':!![]}];}return db['WhatsappAccount'][_0x60ce('0x57')](_0x399dd1);})['then'](function(_0x11d1d8){_0x19a072[_0x60ce('0x58')]=_0x11d1d8;return _0x19a072;})[_0x60ce('0x22')](respondWithFilteredResult(_0x51a6cd,_0x399dd1))[_0x60ce('0x2c')](handleError(_0x51a6cd,null));};exports[_0x60ce('0x59')]=function(_0x23b757,_0x5a9f8d){var _0x478c3b={'raw':![],'where':{'id':_0x23b757[_0x60ce('0x5a')]['id']},'include':[{'model':db[_0x60ce('0x5b')],'as':_0x60ce('0x3f')}]},_0xc5c41c={};_0xc5c41c[_0x60ce('0x44')]=_[_0x60ce('0x46')](db[_0x60ce('0x41')][_0x60ce('0x42')]);_0xc5c41c[_0x60ce('0x45')]=_['keys'](_0x23b757[_0x60ce('0x45')]);_0xc5c41c['filters']=_[_0x60ce('0x48')](_0xc5c41c[_0x60ce('0x44')],_0xc5c41c[_0x60ce('0x45')]);_0x478c3b[_0x60ce('0x49')]=_[_0x60ce('0x48')](_0xc5c41c[_0x60ce('0x44')],qs['fields'](_0x23b757['query'][_0x60ce('0x4a')]));_0x478c3b[_0x60ce('0x49')]=_0x478c3b['attributes'][_0x60ce('0x4b')]?_0x478c3b[_0x60ce('0x49')]:_0xc5c41c[_0x60ce('0x44')];if(_0x23b757[_0x60ce('0x45')]['includeAll']){_0x478c3b[_0x60ce('0x56')]=[{'all':!![]}];}_0x478c3b=_[_0x60ce('0x51')]({},_0x478c3b,_0x23b757[_0x60ce('0x54')]);return db[_0x60ce('0x41')][_0x60ce('0x5c')](_0x478c3b)[_0x60ce('0x22')](handleEntityNotFound(_0x5a9f8d,null))[_0x60ce('0x22')](respondWithResult(_0x5a9f8d,null))['catch'](handleError(_0x5a9f8d,null));};exports['create']=function(_0x170c54,_0x438695){return db[_0x60ce('0x41')][_0x60ce('0x5d')](_0x170c54[_0x60ce('0x5e')],{})[_0x60ce('0x22')](function(_0xa74135){var _0x2793fe=_0x170c54[_0x60ce('0x5f')][_0x60ce('0x60')]({'plain':!![]});if(!_0x2793fe)throw new Error(_0x60ce('0x61'));if(_0x2793fe[_0x60ce('0x62')]==='user'){var _0x364be8=_0xa74135['get']({'plain':!![]});var _0x215238=_0x60ce('0x63');return db['UserProfileSection'][_0x60ce('0x5c')]({'where':{'name':_0x215238,'userProfileId':_0x2793fe[_0x60ce('0x64')]},'raw':!![]})[_0x60ce('0x22')](function(_0x55ca7e){if(_0x55ca7e&&_0x55ca7e[_0x60ce('0x65')]===0x0){return db[_0x60ce('0x3b')]['create']({'name':_0x364be8[_0x60ce('0x3d')],'resourceId':_0x364be8['id'],'type':_0x55ca7e['name'],'sectionId':_0x55ca7e['id']},{})[_0x60ce('0x22')](function(){return _0xa74135;});}else{return _0xa74135;}})[_0x60ce('0x2c')](function(_0x170f33){logger['error'](_0x60ce('0x66'),_0x170f33);throw _0x170f33;});}return _0xa74135;})[_0x60ce('0x22')](respondWithResult(_0x438695,0xc9))[_0x60ce('0x2c')](handleError(_0x438695,null));};exports[_0x60ce('0x39')]=function(_0x3005f8,_0x1ec0c7){if(_0x3005f8[_0x60ce('0x5e')]['id']){delete _0x3005f8[_0x60ce('0x5e')]['id'];}return db[_0x60ce('0x41')][_0x60ce('0x5c')]({'where':{'id':_0x3005f8[_0x60ce('0x5a')]['id']},'include':[{'model':db['Pause'],'as':_0x60ce('0x3f')}]})[_0x60ce('0x22')](handleEntityNotFound(_0x1ec0c7,null))[_0x60ce('0x22')](saveUpdates(_0x3005f8[_0x60ce('0x5e')],null))[_0x60ce('0x22')](respondWithResult(_0x1ec0c7,null))[_0x60ce('0x2c')](handleError(_0x1ec0c7,null));};exports['destroy']=function(_0x367dc9,_0x1e0e9e){return db['WhatsappAccount'][_0x60ce('0x5c')]({'where':{'id':_0x367dc9[_0x60ce('0x5a')]['id']}})[_0x60ce('0x22')](handleEntityNotFound(_0x1e0e9e,null))[_0x60ce('0x22')](removeEntity(_0x1e0e9e,null))['catch'](handleError(_0x1e0e9e,null));};exports[_0x60ce('0x67')]=function(_0x162648,_0x4c6ef7){return db[_0x60ce('0x41')][_0x60ce('0x67')]()[_0x60ce('0x22')](respondWithResult(_0x4c6ef7,null))[_0x60ce('0x2c')](handleError(_0x4c6ef7,null));};exports[_0x60ce('0x68')]=function(_0x5c41a6,_0x5df6ca,_0x2e22ba){if(_0x5c41a6[_0x60ce('0x5e')]['id']){delete _0x5c41a6[_0x60ce('0x5e')]['id'];}return db[_0x60ce('0x41')][_0x60ce('0x5c')]({'where':{'id':_0x5c41a6[_0x60ce('0x5a')]['id']}})['then'](handleEntityNotFound(_0x5df6ca,null))['then'](function(_0x4d2702){if(_0x4d2702){_0x5c41a6['body'][_0x60ce('0x69')]=_0x4d2702['id'];return db[_0x60ce('0x6a')][_0x60ce('0x5d')](_0x5c41a6['body']);}})[_0x60ce('0x22')](respondWithResult(_0x5df6ca,null))['catch'](handleError(_0x5df6ca,null));};exports[_0x60ce('0x6b')]=function(_0x2208d7,_0x107981,_0x550b38){var _0x286b2d={'raw':![],'where':{}};var _0x10b909={};var _0x26380d={'count':0x0,'rows':[]};return db[_0x60ce('0x41')]['findOne']({'where':{'id':_0x2208d7[_0x60ce('0x5a')]['id']}})[_0x60ce('0x22')](handleEntityNotFound(_0x107981,null))[_0x60ce('0x22')](function(_0x410042){if(_0x410042){_0x10b909[_0x60ce('0x44')]=_[_0x60ce('0x46')](db['Disposition'][_0x60ce('0x42')]);_0x10b909[_0x60ce('0x45')]=_[_0x60ce('0x46')](_0x2208d7[_0x60ce('0x45')]);_0x10b909[_0x60ce('0x47')]=_[_0x60ce('0x48')](_0x10b909[_0x60ce('0x44')],_0x10b909[_0x60ce('0x45')]);_0x286b2d[_0x60ce('0x49')]=_[_0x60ce('0x48')](_0x10b909[_0x60ce('0x44')],qs[_0x60ce('0x4a')](_0x2208d7['query']['fields']));_0x286b2d[_0x60ce('0x49')]=_0x286b2d[_0x60ce('0x49')]['length']?_0x286b2d['attributes']:_0x10b909['model'];if(!_0x2208d7[_0x60ce('0x45')][_0x60ce('0x4c')]('nolimit')){_0x286b2d[_0x60ce('0x32')]=qs[_0x60ce('0x32')](_0x2208d7['query'][_0x60ce('0x32')]);_0x286b2d[_0x60ce('0x33')]=qs[_0x60ce('0x33')](_0x2208d7[_0x60ce('0x45')]['offset']);}_0x286b2d['order']=qs['sort'](_0x2208d7[_0x60ce('0x45')][_0x60ce('0x4e')]);_0x286b2d['where']=qs[_0x60ce('0x47')](_[_0x60ce('0x50')](_0x2208d7[_0x60ce('0x45')],_0x10b909[_0x60ce('0x47')]));_0x286b2d[_0x60ce('0x4f')]['WhatsappAccountId']=_0x410042['id'];if(_0x2208d7['query'][_0x60ce('0x53')]){_0x286b2d['where']=_[_0x60ce('0x51')](_0x286b2d['where'],{'$or':_[_0x60ce('0x40')](_0x286b2d[_0x60ce('0x49')],function(_0x2ec6fa){var _0x21f6ff={};_0x21f6ff[_0x2ec6fa]={'$like':'%'+_0x2208d7[_0x60ce('0x45')][_0x60ce('0x53')]+'%'};return _0x21f6ff;})});}_0x286b2d=_[_0x60ce('0x51')]({},_0x286b2d,_0x2208d7[_0x60ce('0x54')]);return db[_0x60ce('0x6a')][_0x60ce('0x34')]({'where':_0x286b2d[_0x60ce('0x4f')]})[_0x60ce('0x22')](function(_0x151a10){_0x26380d[_0x60ce('0x34')]=_0x151a10;if(_0x2208d7[_0x60ce('0x45')][_0x60ce('0x55')]){_0x286b2d['include']=[{'all':!![]}];}return db[_0x60ce('0x6a')]['findAll'](_0x286b2d);})['then'](function(_0x5763c3){_0x26380d[_0x60ce('0x58')]=_0x5763c3;return _0x26380d;});}})[_0x60ce('0x22')](respondWithFilteredResult(_0x107981,_0x286b2d))[_0x60ce('0x2c')](handleError(_0x107981,null));};exports[_0x60ce('0x6c')]=function(_0x24c12b,_0x5a1845,_0x5d1348){return db[_0x60ce('0x41')][_0x60ce('0x5c')]({'where':{'id':_0x24c12b['params']['id']}})[_0x60ce('0x22')](handleEntityNotFound(_0x5a1845,null))['then'](function(_0x58b905){if(_0x58b905){return _0x58b905[_0x60ce('0x6c')](_0x24c12b['query'][_0x60ce('0x6d')]);}})[_0x60ce('0x22')](respondWithStatusCode(_0x5a1845,null))[_0x60ce('0x2c')](handleError(_0x5a1845,null));};exports[_0x60ce('0x6e')]=function(_0x3e2ef3,_0x2cb2f1,_0x4bf852){if(_0x3e2ef3[_0x60ce('0x5e')]['id']){delete _0x3e2ef3[_0x60ce('0x5e')]['id'];}return db[_0x60ce('0x41')][_0x60ce('0x5c')]({'where':{'id':_0x3e2ef3[_0x60ce('0x5a')]['id']}})[_0x60ce('0x22')](handleEntityNotFound(_0x2cb2f1,null))[_0x60ce('0x22')](function(_0x1ec0a7){if(_0x1ec0a7){_0x3e2ef3[_0x60ce('0x5e')][_0x60ce('0x69')]=_0x1ec0a7['id'];return db[_0x60ce('0x6f')][_0x60ce('0x5d')](_0x3e2ef3['body']);}})['then'](respondWithResult(_0x2cb2f1,null))[_0x60ce('0x2c')](handleError(_0x2cb2f1,null));};exports[_0x60ce('0x70')]=function(_0x1c539c,_0x56cb01,_0x5bf7a1){var _0x55f1f4={'raw':![],'where':{}};var _0x5469ed={};var _0x80a259={'count':0x0,'rows':[]};return db[_0x60ce('0x41')][_0x60ce('0x71')]({'where':{'id':_0x1c539c[_0x60ce('0x5a')]['id']}})[_0x60ce('0x22')](handleEntityNotFound(_0x56cb01,null))['then'](function(_0x1e577f){if(_0x1e577f){_0x5469ed['model']=_[_0x60ce('0x46')](db[_0x60ce('0x6f')][_0x60ce('0x42')]);_0x5469ed[_0x60ce('0x45')]=_[_0x60ce('0x46')](_0x1c539c[_0x60ce('0x45')]);_0x5469ed[_0x60ce('0x47')]=_['intersection'](_0x5469ed['model'],_0x5469ed['query']);_0x55f1f4['attributes']=_[_0x60ce('0x48')](_0x5469ed[_0x60ce('0x44')],qs['fields'](_0x1c539c[_0x60ce('0x45')]['fields']));_0x55f1f4[_0x60ce('0x49')]=_0x55f1f4[_0x60ce('0x49')][_0x60ce('0x4b')]?_0x55f1f4[_0x60ce('0x49')]:_0x5469ed[_0x60ce('0x44')];if(!_0x1c539c[_0x60ce('0x45')]['hasOwnProperty']('nolimit')){_0x55f1f4[_0x60ce('0x32')]=qs[_0x60ce('0x32')](_0x1c539c['query'][_0x60ce('0x32')]);_0x55f1f4[_0x60ce('0x33')]=qs[_0x60ce('0x33')](_0x1c539c['query'][_0x60ce('0x33')]);}_0x55f1f4[_0x60ce('0x4d')]=qs[_0x60ce('0x4e')](_0x1c539c[_0x60ce('0x45')][_0x60ce('0x4e')]);_0x55f1f4[_0x60ce('0x4f')]=qs['filters'](_[_0x60ce('0x50')](_0x1c539c['query'],_0x5469ed['filters']));_0x55f1f4['where'][_0x60ce('0x69')]=_0x1e577f['id'];if(_0x1c539c[_0x60ce('0x45')][_0x60ce('0x53')]){_0x55f1f4[_0x60ce('0x4f')]=_[_0x60ce('0x51')](_0x55f1f4['where'],{'$or':_[_0x60ce('0x40')](_0x55f1f4[_0x60ce('0x49')],function(_0x2b4a49){var _0x49d248={};_0x49d248[_0x2b4a49]={'$like':'%'+_0x1c539c[_0x60ce('0x45')][_0x60ce('0x53')]+'%'};return _0x49d248;})});}_0x55f1f4=_[_0x60ce('0x51')]({},_0x55f1f4,_0x1c539c['options']);return db[_0x60ce('0x6f')][_0x60ce('0x34')]({'where':_0x55f1f4['where']})[_0x60ce('0x22')](function(_0x2923b){_0x80a259[_0x60ce('0x34')]=_0x2923b;if(_0x1c539c[_0x60ce('0x45')][_0x60ce('0x55')]){_0x55f1f4[_0x60ce('0x56')]=[{'all':!![]}];}return db['CannedAnswer'][_0x60ce('0x57')](_0x55f1f4);})[_0x60ce('0x22')](function(_0x31906b){_0x80a259[_0x60ce('0x58')]=_0x31906b;return _0x80a259;});}})[_0x60ce('0x22')](respondWithFilteredResult(_0x56cb01,_0x55f1f4))[_0x60ce('0x2c')](handleError(_0x56cb01,null));};exports[_0x60ce('0x72')]=function(_0x59e71d,_0xa58332,_0x736ce7){return db[_0x60ce('0x41')][_0x60ce('0x5c')]({'where':{'id':_0x59e71d[_0x60ce('0x5a')]['id']}})[_0x60ce('0x22')](handleEntityNotFound(_0xa58332,null))['then'](function(_0x4de135){if(_0x4de135){return _0x4de135[_0x60ce('0x72')](_0x59e71d[_0x60ce('0x45')][_0x60ce('0x6d')]);}})[_0x60ce('0x22')](respondWithStatusCode(_0xa58332,null))[_0x60ce('0x2c')](handleError(_0xa58332,null));};exports[_0x60ce('0x73')]=function(_0x5127bc,_0x3bcdc0,_0xa12e67){return db['WhatsappAccount']['find']({'where':{'id':_0x5127bc[_0x60ce('0x5a')]['id']}})[_0x60ce('0x22')](handleEntityNotFound(_0x3bcdc0,null))[_0x60ce('0x22')](function(_0x509605){if(_0x509605){return _0x509605[_0x60ce('0x73')](_0x5127bc['body'][_0x60ce('0x6d')],_[_0x60ce('0x74')](_0x5127bc[_0x60ce('0x5e')],['ids','id'])||{})['spread'](function(_0x40f861){for(var _0x52e2b7=0x0;_0x52e2b7<_0x5127bc[_0x60ce('0x5e')][_0x60ce('0x6d')][_0x60ce('0x4b')];_0x52e2b7+=0x1){socket[_0x60ce('0x75')](_0x60ce('0x76'),{'UserId':_0x5127bc[_0x60ce('0x5e')][_0x60ce('0x6d')][_0x52e2b7],'WhatsappAccountId':_0x5127bc[_0x60ce('0x5a')]['id']});}return _0x40f861;});}})[_0x60ce('0x22')](respondWithResult(_0x3bcdc0,null))[_0x60ce('0x2c')](handleError(_0x3bcdc0,null));};exports[_0x60ce('0x77')]=function(_0x1615df,_0x12f566,_0x193af8){return db['WhatsappAccount']['find']({'where':{'id':_0x1615df['params']['id']}})[_0x60ce('0x22')](handleEntityNotFound(_0x12f566,null))['then'](function(_0x2bbc2d){if(_0x2bbc2d){return _0x2bbc2d[_0x60ce('0x77')](_0x1615df[_0x60ce('0x45')]['ids'])[_0x60ce('0x22')](function(){if(_['isArray'](_0x1615df[_0x60ce('0x45')][_0x60ce('0x6d')])){for(var _0x1c9c21=0x0;_0x1c9c21<_0x1615df[_0x60ce('0x45')][_0x60ce('0x6d')][_0x60ce('0x4b')];_0x1c9c21+=0x1){socket[_0x60ce('0x75')]('userWhatsappAccount:remove',{'UserId':Number(_0x1615df[_0x60ce('0x45')][_0x60ce('0x6d')][_0x1c9c21]),'WhatsappAccountId':Number(_0x1615df['params']['id'])});}}else{socket[_0x60ce('0x75')](_0x60ce('0x78'),{'UserId':Number(_0x1615df[_0x60ce('0x45')][_0x60ce('0x6d')]),'WhatsappAccountId':Number(_0x1615df[_0x60ce('0x5a')]['id'])});}});}})['then'](respondWithStatusCode(_0x12f566,null))[_0x60ce('0x2c')](handleError(_0x12f566,null));};exports[_0x60ce('0x79')]=function(_0x46b1c7,_0x42be57,_0x5dd78a){var _0x15dde1={};var _0x1fe0e6={};var _0x1bb87c;var _0x2e5d0c;return db[_0x60ce('0x41')]['findOne']({'where':{'id':_0x46b1c7[_0x60ce('0x5a')]['id']}})[_0x60ce('0x22')](handleEntityNotFound(_0x42be57,null))[_0x60ce('0x22')](function(_0x4d368){if(_0x4d368){_0x1bb87c=_0x4d368;_0x1fe0e6[_0x60ce('0x44')]=_[_0x60ce('0x46')](db[_0x60ce('0x7a')][_0x60ce('0x42')]);_0x1fe0e6['query']=_[_0x60ce('0x46')](_0x46b1c7[_0x60ce('0x45')]);_0x1fe0e6['filters']=_[_0x60ce('0x48')](_0x1fe0e6[_0x60ce('0x44')],_0x1fe0e6[_0x60ce('0x45')]);_0x15dde1[_0x60ce('0x49')]=_[_0x60ce('0x48')](_0x1fe0e6[_0x60ce('0x44')],qs[_0x60ce('0x4a')](_0x46b1c7['query'][_0x60ce('0x4a')]));_0x15dde1[_0x60ce('0x49')]=_0x15dde1['attributes'][_0x60ce('0x4b')]?_0x15dde1[_0x60ce('0x49')]:_0x1fe0e6['model'];_0x15dde1[_0x60ce('0x4d')]=qs[_0x60ce('0x4e')](_0x46b1c7[_0x60ce('0x45')]['sort']);_0x15dde1['where']=qs[_0x60ce('0x47')](_[_0x60ce('0x50')](_0x46b1c7['query'],_0x1fe0e6[_0x60ce('0x47')]));if(_0x46b1c7[_0x60ce('0x45')][_0x60ce('0x53')]){_0x15dde1[_0x60ce('0x4f')]=_['merge'](_0x15dde1[_0x60ce('0x4f')],{'$or':_[_0x60ce('0x40')](_0x15dde1[_0x60ce('0x49')],function(_0x35ab94){var _0x2db0cb={};_0x2db0cb[_0x35ab94]={'$like':'%'+_0x46b1c7[_0x60ce('0x45')][_0x60ce('0x53')]+'%'};return _0x2db0cb;})});}_0x15dde1=_['merge']({},_0x15dde1,_0x46b1c7[_0x60ce('0x54')]);return _0x1bb87c[_0x60ce('0x79')](_0x15dde1);}})[_0x60ce('0x22')](function(_0xff1e85){if(_0xff1e85){_0x2e5d0c=_0xff1e85['length'];if(!_0x46b1c7[_0x60ce('0x45')][_0x60ce('0x4c')](_0x60ce('0x7b'))){_0x15dde1[_0x60ce('0x32')]=qs[_0x60ce('0x32')](_0x46b1c7['query'][_0x60ce('0x32')]);_0x15dde1['offset']=qs['offset'](_0x46b1c7[_0x60ce('0x45')]['offset']);}return _0x1bb87c[_0x60ce('0x79')](_0x15dde1);}})[_0x60ce('0x22')](function(_0x4cebb0){if(_0x4cebb0){return _0x4cebb0?{'count':_0x2e5d0c,'rows':_0x4cebb0}:null;}})[_0x60ce('0x22')](respondWithResult(_0x42be57,null))[_0x60ce('0x2c')](handleError(_0x42be57,null));};exports['addApplications']=function(_0x2e9416,_0x1685a4,_0x4e2602){return db[_0x60ce('0x41')]['findOne']({'where':{'id':_0x2e9416[_0x60ce('0x5a')]['id']}})[_0x60ce('0x22')](handleEntityNotFound(_0x1685a4,null))[_0x60ce('0x22')](function(_0x1f273e){if(_0x1f273e){return db[_0x60ce('0x7c')][_0x60ce('0x7d')](function(_0x3eeb9f){return db[_0x60ce('0x7e')][_0x60ce('0x3a')]({'where':{'WhatsappAccountId':_0x2e9416[_0x60ce('0x5a')]['id']},'transaction':_0x3eeb9f})[_0x60ce('0x22')](function(_0x1b473a){var _0x3ef020=_[_0x60ce('0x40')](_0x2e9416[_0x60ce('0x5e')],function(_0x2dc6b0){_0x2dc6b0[_0x60ce('0x69')]=_0x2e9416[_0x60ce('0x5a')]['id'];return _0x2dc6b0;});return db['WhatsappApplication'][_0x60ce('0x7f')](_0x3ef020,{'transaction':_0x3eeb9f});});})['then'](function(){return db[_0x60ce('0x7e')]['findAndCountAll']({'where':{'WhatsappAccountId':_0x2e9416['params']['id']},'order':_0x60ce('0x80')});});}})[_0x60ce('0x22')](respondWithResult(_0x1685a4,null))['catch'](handleError(_0x1685a4,null));};exports[_0x60ce('0x81')]=function(_0x4caa3c,_0x5012b6,_0x2f896f){var _0x183890={};var _0x3da4fd={};var _0x24b63b;var _0x10294e;return db[_0x60ce('0x41')][_0x60ce('0x71')]({'where':{'id':_0x4caa3c[_0x60ce('0x5a')]['id']}})['then'](handleEntityNotFound(_0x5012b6,null))['then'](function(_0x5d2bbc){if(_0x5d2bbc){_0x24b63b=_0x5d2bbc;_0x3da4fd[_0x60ce('0x44')]=_[_0x60ce('0x46')](db[_0x60ce('0x7e')]['rawAttributes']);_0x3da4fd[_0x60ce('0x45')]=_[_0x60ce('0x46')](_0x4caa3c[_0x60ce('0x45')]);_0x3da4fd['filters']=_['intersection'](_0x3da4fd['model'],_0x3da4fd[_0x60ce('0x45')]);_0x183890[_0x60ce('0x49')]=_[_0x60ce('0x48')](_0x3da4fd[_0x60ce('0x44')],qs[_0x60ce('0x4a')](_0x4caa3c[_0x60ce('0x45')]['fields']));_0x183890[_0x60ce('0x49')]=_0x183890[_0x60ce('0x49')]['length']?_0x183890[_0x60ce('0x49')]:_0x3da4fd[_0x60ce('0x44')];_0x183890[_0x60ce('0x4d')]=qs[_0x60ce('0x4e')](_0x4caa3c[_0x60ce('0x45')][_0x60ce('0x4e')]);_0x183890[_0x60ce('0x4f')]=qs[_0x60ce('0x47')](_[_0x60ce('0x50')](_0x4caa3c['query'],_0x3da4fd[_0x60ce('0x47')]));if(_0x4caa3c['query'][_0x60ce('0x53')]){_0x183890[_0x60ce('0x4f')]=_['merge'](_0x183890[_0x60ce('0x4f')],{'$or':_['map'](_0x183890['attributes'],function(_0x5ca08e){var _0x5e9be0={};_0x5e9be0[_0x5ca08e]={'$like':'%'+_0x4caa3c[_0x60ce('0x45')][_0x60ce('0x53')]+'%'};return _0x5e9be0;})});}_0x183890=_[_0x60ce('0x51')]({},_0x183890,_0x4caa3c[_0x60ce('0x54')]);return _0x24b63b[_0x60ce('0x81')](_0x183890);}})['then'](function(_0x559176){if(_0x559176){_0x10294e=_0x559176[_0x60ce('0x4b')];if(!_0x4caa3c[_0x60ce('0x45')]['hasOwnProperty']('nolimit')){_0x183890[_0x60ce('0x32')]=qs['limit'](_0x4caa3c[_0x60ce('0x45')][_0x60ce('0x32')]);_0x183890[_0x60ce('0x33')]=qs[_0x60ce('0x33')](_0x4caa3c['query'][_0x60ce('0x33')]);}return _0x24b63b[_0x60ce('0x81')](_0x183890);}})['then'](function(_0x15a7c7){if(_0x15a7c7){return _0x15a7c7?{'count':_0x10294e,'rows':_0x15a7c7}:null;}})[_0x60ce('0x22')](respondWithResult(_0x5012b6,null))['catch'](handleError(_0x5012b6,null));};exports[_0x60ce('0x82')]=function(_0x2468ab,_0x5e0586,_0x136161){var _0x303470={'channel':_0x60ce('0x83')};var _0x5d5048=[];var _0x3a2f51=[];var _0x41c1b0={};return db[_0x60ce('0x41')]['find']({'where':{'id':_0x2468ab[_0x60ce('0x5a')]['id']},'include':[{'model':db['WhatsappApplication'],'as':_0x60ce('0x84')}]})[_0x60ce('0x22')](handleEntityNotFound(_0x5e0586,null))[_0x60ce('0x22')](function(_0x4d3e4f){_0x303470['account']=_0x4d3e4f;_0x303470['applications']=_['orderBy'](_0x4d3e4f['Applications'],[_0x60ce('0x80')],[_0x60ce('0x85')]);if(_0x303470['account'][_0x60ce('0x84')]){delete _0x303470[_0x60ce('0x86')]['Applications'];}return db[_0x60ce('0x87')]['describe']();})[_0x60ce('0x22')](function(_0x5d1493){if(!_0x5d1493){throw new db['Sequelize']['ValidationError']('no\x20available\x20attributes');}_0x5d5048=_[_0x60ce('0x88')](_[_0x60ce('0x46')](_0x5d1493),[_0x60ce('0x89'),_0x60ce('0x8a')]);_0x3a2f51=_[_0x60ce('0x88')](_[_0x60ce('0x46')](_0x5d1493),[_0x60ce('0x89'),_0x60ce('0x8a'),'CompanyId',_0x60ce('0x8b')]);_0x303470[_0x60ce('0x5e')]={'mapKey':_0x60ce('0x8c')};if(_0x303470[_0x60ce('0x86')]['type']&&_0x303470[_0x60ce('0x86')][_0x60ce('0x43')]===_0x60ce('0x8d')){_0x303470[_0x60ce('0x5e')][_0x60ce('0x8e')]=_0x2468ab[_0x60ce('0x5e')][_0x60ce('0x8f')][_0x60ce('0x90')](_0x60ce('0x91'),'');_0x303470[_0x60ce('0x5e')]['body']=_0x2468ab[_0x60ce('0x5e')]['Body'];_0x303470[_0x60ce('0x5e')][_0x60ce('0x92')]=_0x2468ab[_0x60ce('0x5e')][_0x60ce('0x93')];}if(_0x303470['body']['id']){delete _0x303470[_0x60ce('0x5e')]['id'];}if(_[_0x60ce('0x94')](_0x303470[_0x60ce('0x5e')][_0x60ce('0x8e')])){throw new db[(_0x60ce('0x95'))][(_0x60ce('0x96'))]('from\x20is\x20mandatory');}if(_[_0x60ce('0x94')](_0x303470[_0x60ce('0x5e')][_0x60ce('0x5e')])||_0x303470['body']['body']===''){throw new db[(_0x60ce('0x95'))][(_0x60ce('0x96'))](_0x60ce('0x97'));}if(_[_0x60ce('0x94')](_0x303470[_0x60ce('0x5e')][_0x60ce('0x98')])){throw new db[(_0x60ce('0x95'))][(_0x60ce('0x96'))]('mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x3a2f51);}if(!_[_0x60ce('0x99')](_0x3a2f51,_0x303470[_0x60ce('0x5e')][_0x60ce('0x98')])){throw new db[(_0x60ce('0x95'))][(_0x60ce('0x96'))](_0x60ce('0x9a')+_0x3a2f51);}_0x41c1b0[_0x303470[_0x60ce('0x5e')]['mapKey']]=_0x303470[_0x60ce('0x5e')][_0x60ce('0x8e')];return db[_0x60ce('0x9b')][_0x60ce('0x5c')]({'where':{'id':_0x303470[_0x60ce('0x86')][_0x60ce('0x8b')]},'include':[{'model':db['CmContact'],'as':'Contacts','where':_0x41c1b0,'limit':0x1,'order':[[_0x60ce('0x8a'),_0x60ce('0x9c')]]}]});})[_0x60ce('0x22')](handleEntityNotFound(_0x5e0586,null))['then'](function(_0x216de0){if(_0x216de0){_0x303470[_0x60ce('0x9d')]=_[_0x60ce('0x74')](_0x216de0,['Contacts']);if(_0x216de0['Contacts'][_0x60ce('0x4b')]){return _0x216de0['Contacts'][0x0];}var _0x135437=_['defaults'](_0x303470[_0x60ce('0x5e')],{'firstName':_0x303470[_0x60ce('0x5e')][_0x60ce('0x8e')],'ListId':_0x216de0['id']});_0x135437[_0x303470[_0x60ce('0x5e')][_0x60ce('0x98')]]=_0x303470['body'][_0x60ce('0x8e')];return db[_0x60ce('0x87')]['create'](_0x135437,{'fields':_0x5d5048,'raw':!![]});}})[_0x60ce('0x22')](handleEntityNotFound(_0x5e0586,null))[_0x60ce('0x22')](function(_0x63d942){if(_0x63d942){_0x303470['contact']=_0x63d942;var _0x4499ac={'ContactId':_0x63d942['id'],'phone':_0x303470[_0x60ce('0x5e')][_0x60ce('0x8e')],'WhatsappAccountId':_0x2468ab[_0x60ce('0x5a')]['id']};var _0x4ee452={'ContactId':_0x63d942['id'],'WhatsappAccountId':_0x2468ab[_0x60ce('0x5a')]['id'],'closed':![]};return db['WhatsappInteraction'][_0x60ce('0x5c')]({'where':_0x4ee452})['then'](function(_0x3acd05){if(_0x3acd05){return[_0x3acd05,![]];}return db[_0x60ce('0x9e')][_0x60ce('0x5d')](_0x4499ac)[_0x60ce('0x22')](function(_0x4f75a9){return[_0x4f75a9,!![]];});});}})[_0x60ce('0x9f')](function(_0x31b19c,_0x40bae9){_0x303470['interaction']=_0x31b19c[_0x60ce('0x60')]({'plain':!![]});_0x303470[_0x60ce('0xa0')][_0x60ce('0xa1')]=![];if(_0x40bae9){if(_0x303470[_0x60ce('0x86')]['autoclose']){_0x303470[_0x60ce('0xa2')][_0x60ce('0xa3')]({'id':0x0,'priority':_0x303470[_0x60ce('0xa2')][_0x60ce('0x4b')]+0x1,'app':_0x60ce('0xa4'),'appdata':'unmanaged','interval':_0x60ce('0xa5')});}_0x303470['interaction'][_0x60ce('0xa1')]=!![];}return db[_0x60ce('0xa6')][_0x60ce('0x5d')]({'phone':_0x303470[_0x60ce('0x5e')]['from'],'messageId':_0x303470[_0x60ce('0x5e')][_0x60ce('0x92')],'body':_0x303470['body'][_0x60ce('0x5e')],'WhatsappAccountId':_0x2468ab[_0x60ce('0x5a')]['id'],'WhatsappInteractionId':_0x31b19c['id'],'direction':'in','ContactId':_0x31b19c[_0x60ce('0xa7')],'AttachmentId':_0x303470['body'][_0x60ce('0xa8')]});})['then'](function(_0x13fa15){_0x303470[_0x60ce('0x29')]=_0x13fa15;if(_0x303470[_0x60ce('0xa0')]['UserId']){return db[_0x60ce('0x7a')][_0x60ce('0x5c')]({'attributes':['id',_0x60ce('0x3d')],'where':{'id':_0x303470['interaction'][_0x60ce('0xa9')]}})[_0x60ce('0x22')](function(_0x2b6357){if(_0x2b6357){_0x303470[_0x60ce('0xa2')][_0x60ce('0xaa')]({'id':0x0,'priority':0x0,'app':_0x60ce('0xab'),'appdata':_0x2b6357['name']+','+(_0x303470[_0x60ce('0x86')]['waitForTheAssignedAgent']||0xa),'interval':_0x60ce('0xa5')});}return respondWithRpcPromise('Start',_0x60ce('0xac'),_0x303470);});}return respondWithRpcPromise(_0x60ce('0xad'),_0x60ce('0xac'),_0x303470);})[_0x60ce('0x22')](function(_0x5edada){if(_0x5edada){var _0x2cc1b0=0xc8;var _0x44d617=_0x60ce('0xae');logger[_0x60ce('0x2a')](_0x60ce('0x25'),_0x44d617,_0x2cc1b0,_0x60ce('0xaf'));logger[_0x60ce('0x24')](_0x60ce('0xb0'),_0x44d617,_0x2cc1b0,_0x60ce('0xaf'),JSON[_0x60ce('0x26')](_0x5edada));if(_0x303470[_0x60ce('0x86')][_0x60ce('0x43')]===_0x60ce('0x8d')){return _0x5e0586[_0x60ce('0x2e')](_0x2cc1b0)[_0x60ce('0x35')](_0x60ce('0xb1'),'text/xml')['send'](_0x60ce('0xb2'));}else{return _0x5e0586[_0x60ce('0x2e')](_0x2cc1b0)[_0x60ce('0x30')](_0x5edada);}}})[_0x60ce('0x2c')](handleError(_0x5e0586,null));};exports[_0x60ce('0x3e')]=function(_0x30d63e,_0x346b6b,_0x1482c6){var _0x12935f,_0x5617ab,_0x27a0c1;if(_[_0x60ce('0x94')](_0x30d63e[_0x60ce('0x5e')]['body'])||_0x30d63e[_0x60ce('0x5e')][_0x60ce('0x5e')]===''){throw new db[(_0x60ce('0x95'))][(_0x60ce('0x96'))]('body\x20is\x20mandatory\x20and\x20not\x20empty');}if(_[_0x60ce('0x94')](_0x30d63e[_0x60ce('0x5e')]['to'])){throw new db[(_0x60ce('0x95'))][(_0x60ce('0x96'))]('to\x20is\x20mandatory');}_0x12935f=_0x30d63e[_0x60ce('0x5e')]['to'];return db[_0x60ce('0x41')][_0x60ce('0x5c')]({'where':{'id':_0x30d63e[_0x60ce('0x5a')]['id']},'include':[{'model':db[_0x60ce('0x9b')],'as':'List','include':[{'model':db[_0x60ce('0x87')],'as':_0x60ce('0xb3'),'where':{'mobile':_0x12935f},'limit':0x1,'order':[['updatedAt',_0x60ce('0x9c')]]}]}]})[_0x60ce('0x22')](handleEntityNotFound(_0x346b6b,null))[_0x60ce('0x22')](function(_0x4f0ca7){if(_0x4f0ca7&&_0x4f0ca7[_0x60ce('0xb4')]){_0x5617ab=_0x4f0ca7[_0x60ce('0x60')]({'plain':!![]});if(_0x5617ab['List']&&_0x5617ab['List'][_0x60ce('0xb3')][_0x60ce('0x4b')]){return _0x5617ab[_0x60ce('0xb4')]['Contacts'][0x0];}return db[_0x60ce('0x87')][_0x60ce('0x5d')](_['defaults'](_0x30d63e[_0x60ce('0x5e')],{'firstName':_0x12935f,'mobile':_0x12935f,'phone':_0x12935f,'ListId':_0x5617ab['ListId']}));}})[_0x60ce('0x22')](handleEntityNotFound(_0x346b6b,null))[_0x60ce('0x22')](function(_0x1d0277){if(_0x1d0277){_0x27a0c1=_0x1d0277;return db[_0x60ce('0x9e')]['find']({'where':{'ContactId':_0x27a0c1['id'],'closed':![],'WhatsappAccountId':_0x5617ab['id']}})['then'](function(_0x3db7ea){if(_0x3db7ea){return[_0x3db7ea,![]];}return db['WhatsappInteraction']['create']({'UserId':_0x30d63e['user']['id'],'ContactId':_0x27a0c1['id'],'WhatsappAccountId':_0x5617ab['id'],'phone':_0x12935f,'firstMsgDirection':_0x60ce('0xb5'),'Messages':[_[_0x60ce('0x51')](_0x30d63e[_0x60ce('0x5e')],{'read':![],'body':_0x30d63e['body'][_0x60ce('0x5e')],'phone':_0x12935f,'WhatsappAccountId':_0x5617ab['id'],'UserId':_0x30d63e[_0x60ce('0x5f')]['id'],'ContactId':_0x27a0c1['id']})]},{'include':[{'model':db[_0x60ce('0xa6')],'as':_0x60ce('0xb6')}]})['then'](function(_0x31711f){return[_0x31711f,!![]];});});}})[_0x60ce('0x9f')](function(_0x42e872,_0x4f9f06){if(_0x4f9f06){return _0x42e872;}return db[_0x60ce('0xa6')][_0x60ce('0x5d')](_[_0x60ce('0x51')](_0x30d63e[_0x60ce('0x5e')],{'read':![],'body':_0x30d63e['body'][_0x60ce('0x5e')],'phone':_0x12935f,'WhatsappAccountId':_0x5617ab['id'],'WhatsappInteractionId':_0x42e872['id'],'UserId':_0x30d63e[_0x60ce('0x5f')]['id'],'ContactId':_0x27a0c1['id']}))['then'](function(_0x5ad576){_0x42e872[_0x60ce('0xb7')][_0x60ce('0xb6')]=[];_0x42e872['dataValues'][_0x60ce('0xb6')][_0x60ce('0xa3')](_0x5ad576[_0x60ce('0xb7')]);return _0x42e872;});})[_0x60ce('0x22')](respondWithResult(_0x346b6b,null))['catch'](handleError(_0x346b6b,null));}; \ No newline at end of file diff --git a/server/api/whatsappAccount/whatsappAccount.events.js b/server/api/whatsappAccount/whatsappAccount.events.js index 8154d9f..cd6cf57 100644 --- a/server/api/whatsappAccount/whatsappAccount.events.js +++ b/server/api/whatsappAccount/whatsappAccount.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf6ab=['events','../../mysqldb','WhatsappAccount','save','remove','emit','hasOwnProperty','exports'];(function(_0x161621,_0xf3a355){var _0x50c088=function(_0x35b932){while(--_0x35b932){_0x161621['push'](_0x161621['shift']());}};_0x50c088(++_0xf3a355);}(_0xf6ab,0x138));var _0xbf6a=function(_0x1cdea7,_0x592f6d){_0x1cdea7=_0x1cdea7-0x0;var _0x567e4c=_0xf6ab[_0x1cdea7];return _0x567e4c;};'use strict';var EventEmitter=require(_0xbf6a('0x0'));var WhatsappAccount=require(_0xbf6a('0x1'))['db'][_0xbf6a('0x2')];var WhatsappAccountEvents=new EventEmitter();WhatsappAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xbf6a('0x3'),'afterUpdate':'update','afterDestroy':_0xbf6a('0x4')};function emitEvent(_0x3600e9){return function(_0x4ab950,_0xfa1ad6,_0x23f308){WhatsappAccountEvents[_0xbf6a('0x5')](_0x3600e9+':'+_0x4ab950['id'],_0x4ab950);WhatsappAccountEvents[_0xbf6a('0x5')](_0x3600e9,_0x4ab950);_0x23f308(null);};}for(var e in events){if(events[_0xbf6a('0x6')](e)){var event=events[e];WhatsappAccount['hook'](e,emitEvent(event));}}module[_0xbf6a('0x7')]=WhatsappAccountEvents; \ No newline at end of file +var _0x627c=['hook','exports','events','../../mysqldb','WhatsappAccount','setMaxListeners','save','update','remove','emit'];(function(_0x4e7d25,_0x58285f){var _0x526fe6=function(_0x4f0aec){while(--_0x4f0aec){_0x4e7d25['push'](_0x4e7d25['shift']());}};_0x526fe6(++_0x58285f);}(_0x627c,0xa2));var _0xc627=function(_0x57dd7c,_0x12ced0){_0x57dd7c=_0x57dd7c-0x0;var _0x5d9ae8=_0x627c[_0x57dd7c];return _0x5d9ae8;};'use strict';var EventEmitter=require(_0xc627('0x0'));var WhatsappAccount=require(_0xc627('0x1'))['db'][_0xc627('0x2')];var WhatsappAccountEvents=new EventEmitter();WhatsappAccountEvents[_0xc627('0x3')](0x0);var events={'afterCreate':_0xc627('0x4'),'afterUpdate':_0xc627('0x5'),'afterDestroy':_0xc627('0x6')};function emitEvent(_0x1f4806){return function(_0x56621a,_0x3bf4c2,_0x37d260){WhatsappAccountEvents[_0xc627('0x7')](_0x1f4806+':'+_0x56621a['id'],_0x56621a);WhatsappAccountEvents[_0xc627('0x7')](_0x1f4806,_0x56621a);_0x37d260(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];WhatsappAccount[_0xc627('0x8')](e,emitEvent(event));}}module[_0xc627('0x9')]=WhatsappAccountEvents; \ No newline at end of file diff --git a/server/api/whatsappAccount/whatsappAccount.model.js b/server/api/whatsappAccount/whatsappAccount.model.js index ecc0aae..4f7f0d4 100644 --- a/server/api/whatsappAccount/whatsappAccount.model.js +++ b/server/api/whatsappAccount/whatsappAccount.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6ef9=['lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./whatsappAccount.attributes','exports','define','WhatsappAccount','whatsapp_accounts'];(function(_0x13b442,_0x448c33){var _0x49d09c=function(_0x477277){while(--_0x477277){_0x13b442['push'](_0x13b442['shift']());}};_0x49d09c(++_0x448c33);}(_0x6ef9,0x10e));var _0x96ef=function(_0x3ef45e,_0xe84f33){_0x3ef45e=_0x3ef45e-0x0;var _0x69e7c=_0x6ef9[_0x3ef45e];return _0x69e7c;};'use strict';var _=require(_0x96ef('0x0'));var util=require(_0x96ef('0x1'));var logger=require(_0x96ef('0x2'))(_0x96ef('0x3'));var moment=require(_0x96ef('0x4'));var BPromise=require(_0x96ef('0x5'));var rp=require(_0x96ef('0x6'));var fs=require('fs');var path=require(_0x96ef('0x7'));var rimraf=require(_0x96ef('0x8'));var config=require(_0x96ef('0x9'));var attributes=require(_0x96ef('0xa'));module[_0x96ef('0xb')]=function(_0x26dfc3,_0x378dfe){return _0x26dfc3[_0x96ef('0xc')](_0x96ef('0xd'),attributes,{'tableName':_0x96ef('0xe'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xb5f0=['bluebird','request-promise','path','rimraf','exports','define','whatsapp_accounts','lodash','../../config/logger','api','moment'];(function(_0x49a811,_0x190495){var _0xd8ff9d=function(_0x3def3e){while(--_0x3def3e){_0x49a811['push'](_0x49a811['shift']());}};_0xd8ff9d(++_0x190495);}(_0xb5f0,0x167));var _0x0b5f=function(_0x4ff076,_0x1880d1){_0x4ff076=_0x4ff076-0x0;var _0x42ca65=_0xb5f0[_0x4ff076];return _0x42ca65;};'use strict';var _=require(_0x0b5f('0x0'));var util=require('util');var logger=require(_0x0b5f('0x1'))(_0x0b5f('0x2'));var moment=require(_0x0b5f('0x3'));var BPromise=require(_0x0b5f('0x4'));var rp=require(_0x0b5f('0x5'));var fs=require('fs');var path=require(_0x0b5f('0x6'));var rimraf=require(_0x0b5f('0x7'));var config=require('../../config/environment');var attributes=require('./whatsappAccount.attributes');module[_0x0b5f('0x8')]=function(_0x57eb14,_0x39a02b){return _0x57eb14[_0x0b5f('0x9')]('WhatsappAccount',attributes,{'tableName':_0x0b5f('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/whatsappAccount/whatsappAccount.rpc.js b/server/api/whatsappAccount/whatsappAccount.rpc.js index d4d67c8..bdcb3e0 100644 --- a/server/api/whatsappAccount/whatsappAccount.rpc.js +++ b/server/api/whatsappAccount/whatsappAccount.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe2f2=['../../config/logger','rpc','../../config/environment','jayson/promise','http','redis','./whatsappAccount.socket','register','then','info','WhatsappAccount,\x20%s,\x20%s','request\x20sent','WhatsappAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','ShowWhatsappAccount','WhatsappAccount','options','raw','attributes','include','model','map','debug','catch','util','moment','ioredis','../../config/utils'];(function(_0xcd81f8,_0x371269){var _0x9c9808=function(_0x398590){while(--_0x398590){_0xcd81f8['push'](_0xcd81f8['shift']());}};_0x9c9808(++_0x371269);}(_0xe2f2,0x9c));var _0x2e2f=function(_0x1485d6,_0xa4641a){_0x1485d6=_0x1485d6-0x0;var _0x57d2af=_0xe2f2[_0x1485d6];return _0x57d2af;};'use strict';var _=require('lodash');var util=require(_0x2e2f('0x0'));var moment=require(_0x2e2f('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x2e2f('0x2'));var db=require('../../mysqldb')['db'];var utils=require(_0x2e2f('0x3'));var logger=require(_0x2e2f('0x4'))(_0x2e2f('0x5'));var config=require(_0x2e2f('0x6'));var jayson=require(_0x2e2f('0x7'));var client=jayson['client'][_0x2e2f('0x8')]({'port':0x232a});config[_0x2e2f('0x9')]=_['defaults'](config[_0x2e2f('0x9')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x2e2f('0x9')]));require(_0x2e2f('0xa'))[_0x2e2f('0xb')](socket);function respondWithRpcPromise(_0x37edfd,_0x5f2231,_0xcc8aeb){return new BPromise(function(_0x456880,_0x4c5893){return client['request'](_0x37edfd,_0xcc8aeb)[_0x2e2f('0xc')](function(_0x668b59){logger[_0x2e2f('0xd')](_0x2e2f('0xe'),_0x5f2231,_0x2e2f('0xf'));logger['debug'](_0x2e2f('0x10'),_0x5f2231,'request\x20sent',JSON[_0x2e2f('0x11')](_0x668b59));if(_0x668b59[_0x2e2f('0x12')]){if(_0x668b59[_0x2e2f('0x12')][_0x2e2f('0x13')]===0x1f4){logger['error'](_0x2e2f('0xe'),_0x5f2231,_0x668b59[_0x2e2f('0x12')]['message']);return _0x4c5893(_0x668b59['error'][_0x2e2f('0x14')]);}logger[_0x2e2f('0x12')](_0x2e2f('0xe'),_0x5f2231,_0x668b59[_0x2e2f('0x12')][_0x2e2f('0x14')]);return _0x456880(_0x668b59['error'][_0x2e2f('0x14')]);}else{logger[_0x2e2f('0xd')]('WhatsappAccount,\x20%s,\x20%s',_0x5f2231,_0x2e2f('0xf'));_0x456880(_0x668b59[_0x2e2f('0x15')][_0x2e2f('0x14')]);}})['catch'](function(_0x18ea2b){logger[_0x2e2f('0x12')](_0x2e2f('0xe'),_0x5f2231,_0x18ea2b);_0x4c5893(_0x18ea2b);});});}exports[_0x2e2f('0x16')]=function(_0xe9145e){var _0xfe955a=this;return new Promise(function(_0x127265,_0x15b4b8){return db[_0x2e2f('0x17')]['find']({'raw':_0xe9145e[_0x2e2f('0x18')]?_0xe9145e['options'][_0x2e2f('0x19')]===undefined?!![]:![]:!![],'where':_0xe9145e[_0x2e2f('0x18')]?_0xe9145e['options']['where']||null:null,'attributes':_0xe9145e[_0x2e2f('0x18')]?_0xe9145e[_0x2e2f('0x18')][_0x2e2f('0x1a')]||null:null,'include':_0xe9145e[_0x2e2f('0x18')]?_0xe9145e[_0x2e2f('0x18')][_0x2e2f('0x1b')]?_['map'](_0xe9145e[_0x2e2f('0x18')]['include'],function(_0x121af9){return{'model':db[_0x121af9[_0x2e2f('0x1c')]],'as':_0x121af9['as'],'attributes':_0x121af9[_0x2e2f('0x1a')],'include':_0x121af9['include']?_[_0x2e2f('0x1d')](_0x121af9[_0x2e2f('0x1b')],function(_0x168e46){return{'model':db[_0x168e46[_0x2e2f('0x1c')]],'as':_0x168e46['as'],'attributes':_0x168e46[_0x2e2f('0x1a')],'include':_0x168e46[_0x2e2f('0x1b')]?_[_0x2e2f('0x1d')](_0x168e46['include'],function(_0x1dffd8){return{'model':db[_0x1dffd8[_0x2e2f('0x1c')]],'as':_0x1dffd8['as'],'attributes':_0x1dffd8[_0x2e2f('0x1a')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x47d8ae){logger['info'](_0x2e2f('0x16'),_0xe9145e);logger[_0x2e2f('0x1e')](_0x2e2f('0x16'),_0xe9145e,JSON[_0x2e2f('0x11')](_0x47d8ae));_0x127265(_0x47d8ae);})[_0x2e2f('0x1f')](function(_0x354567){logger[_0x2e2f('0x12')](_0x2e2f('0x16'),_0x354567['message'],_0xe9145e);_0x15b4b8(_0xfe955a[_0x2e2f('0x12')](0x1f4,_0x354567[_0x2e2f('0x14')]));});});}; \ No newline at end of file +var _0x1aac=['./whatsappAccount.socket','then','info','WhatsappAccount,\x20%s,\x20%s','request\x20sent','debug','WhatsappAccount,\x20%s,\x20%s,\x20%s','error','code','message','result','ShowWhatsappAccount','WhatsappAccount','find','options','where','include','map','model','attributes','stringify','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','client','defaults','redis','localhost'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x1aac,0xca));var _0xc1aa=function(_0xf7db93,_0x321086){_0xf7db93=_0xf7db93-0x0;var _0x4c214c=_0x1aac[_0xf7db93];return _0x4c214c;};'use strict';var _=require(_0xc1aa('0x0'));var util=require(_0xc1aa('0x1'));var moment=require(_0xc1aa('0x2'));var BPromise=require(_0xc1aa('0x3'));var rs=require(_0xc1aa('0x4'));var fs=require('fs');var Redis=require(_0xc1aa('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xc1aa('0x6'));var logger=require(_0xc1aa('0x7'))(_0xc1aa('0x8'));var config=require(_0xc1aa('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xc1aa('0xa')]['http']({'port':0x232a});config['redis']=_[_0xc1aa('0xb')](config[_0xc1aa('0xc')],{'host':_0xc1aa('0xd'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0xc1aa('0xe'))['register'](socket);function respondWithRpcPromise(_0x353bb6,_0x41982b,_0x5f2435){return new BPromise(function(_0x14b3a5,_0x1e61de){return client['request'](_0x353bb6,_0x5f2435)[_0xc1aa('0xf')](function(_0x159aab){logger[_0xc1aa('0x10')](_0xc1aa('0x11'),_0x41982b,_0xc1aa('0x12'));logger[_0xc1aa('0x13')](_0xc1aa('0x14'),_0x41982b,_0xc1aa('0x12'),JSON['stringify'](_0x159aab));if(_0x159aab['error']){if(_0x159aab[_0xc1aa('0x15')][_0xc1aa('0x16')]===0x1f4){logger[_0xc1aa('0x15')](_0xc1aa('0x11'),_0x41982b,_0x159aab['error'][_0xc1aa('0x17')]);return _0x1e61de(_0x159aab['error'][_0xc1aa('0x17')]);}logger[_0xc1aa('0x15')](_0xc1aa('0x11'),_0x41982b,_0x159aab[_0xc1aa('0x15')][_0xc1aa('0x17')]);return _0x14b3a5(_0x159aab[_0xc1aa('0x15')][_0xc1aa('0x17')]);}else{logger[_0xc1aa('0x10')](_0xc1aa('0x11'),_0x41982b,_0xc1aa('0x12'));_0x14b3a5(_0x159aab[_0xc1aa('0x18')][_0xc1aa('0x17')]);}})['catch'](function(_0x505268){logger[_0xc1aa('0x15')](_0xc1aa('0x11'),_0x41982b,_0x505268);_0x1e61de(_0x505268);});});}exports[_0xc1aa('0x19')]=function(_0x2b5996){var _0x1d5fa5=this;return new Promise(function(_0x31fbd4,_0x540b62){return db[_0xc1aa('0x1a')][_0xc1aa('0x1b')]({'raw':_0x2b5996[_0xc1aa('0x1c')]?_0x2b5996['options']['raw']===undefined?!![]:![]:!![],'where':_0x2b5996['options']?_0x2b5996['options'][_0xc1aa('0x1d')]||null:null,'attributes':_0x2b5996[_0xc1aa('0x1c')]?_0x2b5996['options']['attributes']||null:null,'include':_0x2b5996[_0xc1aa('0x1c')]?_0x2b5996[_0xc1aa('0x1c')][_0xc1aa('0x1e')]?_[_0xc1aa('0x1f')](_0x2b5996['options'][_0xc1aa('0x1e')],function(_0x2ff1f7){return{'model':db[_0x2ff1f7[_0xc1aa('0x20')]],'as':_0x2ff1f7['as'],'attributes':_0x2ff1f7[_0xc1aa('0x21')],'include':_0x2ff1f7[_0xc1aa('0x1e')]?_['map'](_0x2ff1f7[_0xc1aa('0x1e')],function(_0x273112){return{'model':db[_0x273112[_0xc1aa('0x20')]],'as':_0x273112['as'],'attributes':_0x273112[_0xc1aa('0x21')],'include':_0x273112[_0xc1aa('0x1e')]?_[_0xc1aa('0x1f')](_0x273112['include'],function(_0x8966fa){return{'model':db[_0x8966fa[_0xc1aa('0x20')]],'as':_0x8966fa['as'],'attributes':_0x8966fa[_0xc1aa('0x21')]};}):[]};}):[]};}):[]:[]})[_0xc1aa('0xf')](function(_0x51eb47){logger['info'](_0xc1aa('0x19'),_0x2b5996);logger[_0xc1aa('0x13')](_0xc1aa('0x19'),_0x2b5996,JSON[_0xc1aa('0x22')](_0x51eb47));_0x31fbd4(_0x51eb47);})[_0xc1aa('0x23')](function(_0x5339fe){logger[_0xc1aa('0x15')]('ShowWhatsappAccount',_0x5339fe[_0xc1aa('0x17')],_0x2b5996);_0x540b62(_0x1d5fa5[_0xc1aa('0x15')](0x1f4,_0x5339fe[_0xc1aa('0x17')]));});});}; \ No newline at end of file diff --git a/server/api/whatsappAccount/whatsappAccount.socket.js b/server/api/whatsappAccount/whatsappAccount.socket.js index 9c20486..b649360 100644 --- a/server/api/whatsappAccount/whatsappAccount.socket.js +++ b/server/api/whatsappAccount/whatsappAccount.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xac42=['update','emit','removeListener','register','save','remove'];(function(_0xe223d8,_0x5daa3a){var _0x4ec1ec=function(_0x4a9788){while(--_0x4a9788){_0xe223d8['push'](_0xe223d8['shift']());}};_0x4ec1ec(++_0x5daa3a);}(_0xac42,0xf4));var _0x2ac4=function(_0x541a55,_0x6edd1c){_0x541a55=_0x541a55-0x0;var _0x3706cc=_0xac42[_0x541a55];return _0x3706cc;};'use strict';var WhatsappAccountEvents=require('./whatsappAccount.events');var events=[_0x2ac4('0x0'),_0x2ac4('0x1'),_0x2ac4('0x2')];function createListener(_0x3572dd,_0x2ed4fb){return function(_0xcd291){_0x2ed4fb[_0x2ac4('0x3')](_0x3572dd,_0xcd291);};}function removeListener(_0x69dd6c,_0x4cd59b){return function(){WhatsappAccountEvents[_0x2ac4('0x4')](_0x69dd6c,_0x4cd59b);};}exports[_0x2ac4('0x5')]=function(_0x4114d3){for(var _0x4f214c=0x0,_0x164701=events['length'];_0x4f214c<_0x164701;_0x4f214c++){var _0x47e9fc=events[_0x4f214c];var _0x154fc0=createListener('whatsappAccount:'+_0x47e9fc,_0x4114d3);WhatsappAccountEvents['on'](_0x47e9fc,_0x154fc0);}}; \ No newline at end of file +var _0x7949=['register','length','whatsappAccount:','save','remove','update','emit'];(function(_0xecd63,_0x3c1ae9){var _0x2b3e8d=function(_0x498f39){while(--_0x498f39){_0xecd63['push'](_0xecd63['shift']());}};_0x2b3e8d(++_0x3c1ae9);}(_0x7949,0x106));var _0x9794=function(_0x574646,_0x4f1c0d){_0x574646=_0x574646-0x0;var _0xef39af=_0x7949[_0x574646];return _0xef39af;};'use strict';var WhatsappAccountEvents=require('./whatsappAccount.events');var events=[_0x9794('0x0'),_0x9794('0x1'),_0x9794('0x2')];function createListener(_0x5b584c,_0x3c5eca){return function(_0x244f33){_0x3c5eca[_0x9794('0x3')](_0x5b584c,_0x244f33);};}function removeListener(_0x58b921,_0x30c4be){return function(){WhatsappAccountEvents['removeListener'](_0x58b921,_0x30c4be);};}exports[_0x9794('0x4')]=function(_0x110c54){for(var _0x98f5f6=0x0,_0x58524c=events[_0x9794('0x5')];_0x98f5f6<_0x58524c;_0x98f5f6++){var _0x308ed1=events[_0x98f5f6];var _0x3c2b84=createListener(_0x9794('0x6')+_0x308ed1,_0x110c54);WhatsappAccountEvents['on'](_0x308ed1,_0x3c2b84);}}; \ No newline at end of file diff --git a/server/api/whatsappApplication/index.js b/server/api/whatsappApplication/index.js index 80fc75d..1bf548a 100644 --- a/server/api/whatsappApplication/index.js +++ b/server/api/whatsappApplication/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6bc4=['get','/:id','isAuthenticated','show','post','put','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','./whatsappApplication.controller','index'];(function(_0xca8a6,_0x58e4b1){var _0x5ae91f=function(_0x43595a){while(--_0x43595a){_0xca8a6['push'](_0xca8a6['shift']());}};_0x5ae91f(++_0x58e4b1);}(_0x6bc4,0xaa));var _0x46bc=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x6bc4[_0x14add3];return _0x4a174f;};'use strict';var multer=require(_0x46bc('0x0'));var util=require(_0x46bc('0x1'));var path=require(_0x46bc('0x2'));var timeout=require(_0x46bc('0x3'));var express=require(_0x46bc('0x4'));var router=express[_0x46bc('0x5')]();var fs_extra=require(_0x46bc('0x6'));var auth=require(_0x46bc('0x7'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x46bc('0x8'));router['get']('/',auth['isAuthenticated'](),controller[_0x46bc('0x9')]);router[_0x46bc('0xa')](_0x46bc('0xb'),auth[_0x46bc('0xc')](),controller[_0x46bc('0xd')]);router[_0x46bc('0xe')]('/',auth['isAuthenticated'](),controller['create']);router[_0x46bc('0xf')](_0x46bc('0xb'),auth['isAuthenticated'](),controller[_0x46bc('0x10')]);router[_0x46bc('0x11')]('/:id',auth['isAuthenticated'](),controller[_0x46bc('0x12')]);module[_0x46bc('0x13')]=router; \ No newline at end of file +var _0xabc4=['index','post','put','/:id','update','destroy','exports','multer','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./whatsappApplication.controller','get','isAuthenticated'];(function(_0x25d2fb,_0x18a774){var _0x1ded53=function(_0x4c0715){while(--_0x4c0715){_0x25d2fb['push'](_0x25d2fb['shift']());}};_0x1ded53(++_0x18a774);}(_0xabc4,0x1db));var _0x4abc=function(_0x55e454,_0x453e39){_0x55e454=_0x55e454-0x0;var _0x21b676=_0xabc4[_0x55e454];return _0x21b676;};'use strict';var multer=require(_0x4abc('0x0'));var util=require('util');var path=require(_0x4abc('0x1'));var timeout=require('connect-timeout');var express=require(_0x4abc('0x2'));var router=express[_0x4abc('0x3')]();var fs_extra=require(_0x4abc('0x4'));var auth=require(_0x4abc('0x5'));var interaction=require(_0x4abc('0x6'));var config=require(_0x4abc('0x7'));var controller=require(_0x4abc('0x8'));router[_0x4abc('0x9')]('/',auth[_0x4abc('0xa')](),controller[_0x4abc('0xb')]);router['get']('/:id',auth[_0x4abc('0xa')](),controller['show']);router[_0x4abc('0xc')]('/',auth['isAuthenticated'](),controller['create']);router[_0x4abc('0xd')](_0x4abc('0xe'),auth['isAuthenticated'](),controller[_0x4abc('0xf')]);router['delete'](_0x4abc('0xe'),auth[_0x4abc('0xa')](),controller[_0x4abc('0x10')]);module[_0x4abc('0x11')]=router; \ No newline at end of file diff --git a/server/api/whatsappApplication/whatsappApplication.attributes.js b/server/api/whatsappApplication/whatsappApplication.attributes.js index 5e01ad1..219c938 100644 --- a/server/api/whatsappApplication/whatsappApplication.attributes.js +++ b/server/api/whatsappApplication/whatsappApplication.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x85dd=['STRING','noop','TEXT','*,*,*,*','sequelize','exports'];(function(_0x486fcd,_0x2fe94d){var _0x470bc1=function(_0x1316ba){while(--_0x1316ba){_0x486fcd['push'](_0x486fcd['shift']());}};_0x470bc1(++_0x2fe94d);}(_0x85dd,0x1ba));var _0xd85d=function(_0x5b561d,_0x422b7c){_0x5b561d=_0x5b561d-0x0;var _0x431060=_0x85dd[_0x5b561d];return _0x431060;};'use strict';var Sequelize=require(_0xd85d('0x0'));module[_0xd85d('0x1')]={'priority':{'type':Sequelize['INTEGER'],'allowNull':![]},'app':{'type':Sequelize[_0xd85d('0x2')],'allowNull':![],'defaultValue':_0xd85d('0x3')},'appdata':{'type':Sequelize[_0xd85d('0x4')]()},'description':{'type':Sequelize[_0xd85d('0x2')]},'interval':{'type':Sequelize[_0xd85d('0x2')],'defaultValue':_0xd85d('0x5')}}; \ No newline at end of file +var _0xf4ba=['STRING','noop','TEXT','*,*,*,*','sequelize','exports','INTEGER'];(function(_0x2e31ad,_0x4afc42){var _0x183e05=function(_0x402b65){while(--_0x402b65){_0x2e31ad['push'](_0x2e31ad['shift']());}};_0x183e05(++_0x4afc42);}(_0xf4ba,0x17e));var _0xaf4b=function(_0x4412ea,_0x5092ee){_0x4412ea=_0x4412ea-0x0;var _0x58fba9=_0xf4ba[_0x4412ea];return _0x58fba9;};'use strict';var Sequelize=require(_0xaf4b('0x0'));module[_0xaf4b('0x1')]={'priority':{'type':Sequelize[_0xaf4b('0x2')],'allowNull':![]},'app':{'type':Sequelize[_0xaf4b('0x3')],'allowNull':![],'defaultValue':_0xaf4b('0x4')},'appdata':{'type':Sequelize[_0xaf4b('0x5')]()},'description':{'type':Sequelize['STRING']},'interval':{'type':Sequelize[_0xaf4b('0x3')],'defaultValue':_0xaf4b('0x6')}}; \ No newline at end of file diff --git a/server/api/whatsappApplication/whatsappApplication.controller.js b/server/api/whatsappApplication/whatsappApplication.controller.js index 8c71dda..ff9252d 100644 --- a/server/api/whatsappApplication/whatsappApplication.controller.js +++ b/server/api/whatsappApplication/whatsappApplication.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xdc91=['mustache','util','path','sox','to-csv','ejs','fs-extra','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end','status','json','offset','undefined','count','limit','set','Content-Range','save','update','then','destroy','name','send','index','map','WhatsappApplication','rawAttributes','fieldName','model','query','keys','intersection','fields','attributes','hasOwnProperty','nolimit','order','where','filters','pick','merge','type','filter','options','includeAll','include','findAll','rows','catch','show','params','find','create','body','eml-format','rimraf','bluebird'];(function(_0x2345c8,_0x362c7b){var _0x40cc46=function(_0x1362fa){while(--_0x1362fa){_0x2345c8['push'](_0x2345c8['shift']());}};_0x40cc46(++_0x362c7b);}(_0xdc91,0x8b));var _0x1dc9=function(_0x319126,_0x441eb5){_0x319126=_0x319126-0x0;var _0x4780aa=_0xdc91[_0x319126];return _0x4780aa;};'use strict';var emlformat=require(_0x1dc9('0x0'));var rimraf=require(_0x1dc9('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x1dc9('0x2'));var Mustache=require(_0x1dc9('0x3'));var util=require(_0x1dc9('0x4'));var path=require(_0x1dc9('0x5'));var sox=require(_0x1dc9('0x6'));var csv=require(_0x1dc9('0x7'));var ejs=require(_0x1dc9('0x8'));var fs=require('fs');var fs_extra=require(_0x1dc9('0x9'));var _=require('lodash');var squel=require(_0x1dc9('0xa'));var crypto=require(_0x1dc9('0xb'));var jsforce=require(_0x1dc9('0xc'));var deskjs=require(_0x1dc9('0xd'));var toCsv=require(_0x1dc9('0x7'));var querystring=require(_0x1dc9('0xe'));var Papa=require(_0x1dc9('0xf'));var Redis=require(_0x1dc9('0x10'));var authService=require(_0x1dc9('0x11'));var qs=require(_0x1dc9('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x1dc9('0x13'));var logger=require('../../config/logger')(_0x1dc9('0x14'));var utils=require('../../config/utils');var config=require(_0x1dc9('0x15'));var licenseUtil=require(_0x1dc9('0x16'));var db=require(_0x1dc9('0x17'))['db'];function respondWithStatusCode(_0x123684,_0x5ce07c){_0x5ce07c=_0x5ce07c||0xcc;return function(_0x220c79){if(_0x220c79){return _0x123684[_0x1dc9('0x18')](_0x5ce07c);}return _0x123684['status'](_0x5ce07c)[_0x1dc9('0x19')]();};}function respondWithResult(_0x39919e,_0x4fb23f){_0x4fb23f=_0x4fb23f||0xc8;return function(_0x5daaec){if(_0x5daaec){return _0x39919e[_0x1dc9('0x1a')](_0x4fb23f)[_0x1dc9('0x1b')](_0x5daaec);}};}function respondWithFilteredResult(_0x38ee59,_0x2c94b1){return function(_0x4b7e11){if(_0x4b7e11){var _0x4e8c52=typeof _0x2c94b1[_0x1dc9('0x1c')]===_0x1dc9('0x1d')&&typeof _0x2c94b1['limit']===_0x1dc9('0x1d');var _0x46aaa6=_0x4b7e11[_0x1dc9('0x1e')];var _0x197bcd=_0x4e8c52?0x0:_0x2c94b1[_0x1dc9('0x1c')];var _0x1e845a=_0x4e8c52?_0x4b7e11[_0x1dc9('0x1e')]:_0x2c94b1[_0x1dc9('0x1c')]+_0x2c94b1[_0x1dc9('0x1f')];var _0x3bcb6f;if(_0x1e845a>=_0x46aaa6){_0x1e845a=_0x46aaa6;_0x3bcb6f=0xc8;}else{_0x3bcb6f=0xce;}_0x38ee59[_0x1dc9('0x1a')](_0x3bcb6f);return _0x38ee59[_0x1dc9('0x20')](_0x1dc9('0x21'),_0x197bcd+'-'+_0x1e845a+'/'+_0x46aaa6)['json'](_0x4b7e11);}return null;};}function patchUpdates(_0x49bd5b){return function(_0x37784e){try{jsonpatch['apply'](_0x37784e,_0x49bd5b,!![]);}catch(_0x4c25db){return BPromise['reject'](_0x4c25db);}return _0x37784e[_0x1dc9('0x22')]();};}function saveUpdates(_0x3bfb75,_0x277499){return function(_0x1b6829){if(_0x1b6829){return _0x1b6829[_0x1dc9('0x23')](_0x3bfb75)[_0x1dc9('0x24')](function(_0x2b1ff8){return _0x2b1ff8;});}return null;};}function removeEntity(_0x48dd9c,_0x240365){return function(_0x2a4740){if(_0x2a4740){return _0x2a4740[_0x1dc9('0x25')]()['then'](function(){_0x48dd9c[_0x1dc9('0x1a')](0xcc)[_0x1dc9('0x19')]();});}};}function handleEntityNotFound(_0xec8330,_0x2192bd){return function(_0x2dfe03){if(!_0x2dfe03){_0xec8330[_0x1dc9('0x18')](0x194);}return _0x2dfe03;};}function handleError(_0x179498,_0x152b48){_0x152b48=_0x152b48||0x1f4;return function(_0x3e70c3){logger['error'](_0x3e70c3['stack']);if(_0x3e70c3[_0x1dc9('0x26')]){delete _0x3e70c3[_0x1dc9('0x26')];}_0x179498[_0x1dc9('0x1a')](_0x152b48)[_0x1dc9('0x27')](_0x3e70c3);};}exports[_0x1dc9('0x28')]=function(_0x214805,_0x10123d){var _0x154370={},_0x16b71d={},_0x5f1403={'count':0x0,'rows':[]};var _0x37af63=_[_0x1dc9('0x29')](db[_0x1dc9('0x2a')][_0x1dc9('0x2b')],function(_0x8c3a01){return{'name':_0x8c3a01[_0x1dc9('0x2c')],'type':_0x8c3a01['type']['key']};});_0x16b71d[_0x1dc9('0x2d')]=_[_0x1dc9('0x29')](_0x37af63,'name');_0x16b71d[_0x1dc9('0x2e')]=_[_0x1dc9('0x2f')](_0x214805[_0x1dc9('0x2e')]);_0x16b71d['filters']=_[_0x1dc9('0x30')](_0x16b71d['model'],_0x16b71d[_0x1dc9('0x2e')]);_0x154370['attributes']=_['intersection'](_0x16b71d[_0x1dc9('0x2d')],qs[_0x1dc9('0x31')](_0x214805[_0x1dc9('0x2e')][_0x1dc9('0x31')]));_0x154370['attributes']=_0x154370[_0x1dc9('0x32')]['length']?_0x154370[_0x1dc9('0x32')]:_0x16b71d[_0x1dc9('0x2d')];if(!_0x214805[_0x1dc9('0x2e')][_0x1dc9('0x33')](_0x1dc9('0x34'))){_0x154370[_0x1dc9('0x1f')]=qs[_0x1dc9('0x1f')](_0x214805[_0x1dc9('0x2e')]['limit']);_0x154370['offset']=qs[_0x1dc9('0x1c')](_0x214805[_0x1dc9('0x2e')][_0x1dc9('0x1c')]);}_0x154370[_0x1dc9('0x35')]=qs['sort'](_0x214805[_0x1dc9('0x2e')]['sort']);_0x154370[_0x1dc9('0x36')]=qs[_0x1dc9('0x37')](_[_0x1dc9('0x38')](_0x214805[_0x1dc9('0x2e')],_0x16b71d[_0x1dc9('0x37')]),_0x37af63);if(_0x214805[_0x1dc9('0x2e')]['filter']){_0x154370[_0x1dc9('0x36')]=_[_0x1dc9('0x39')](_0x154370[_0x1dc9('0x36')],{'$or':_[_0x1dc9('0x29')](_0x37af63,function(_0x1b61c7){if(_0x1b61c7[_0x1dc9('0x3a')]!=='VIRTUAL'){var _0xff1a45={};_0xff1a45[_0x1b61c7[_0x1dc9('0x26')]]={'$like':'%'+_0x214805[_0x1dc9('0x2e')][_0x1dc9('0x3b')]+'%'};return _0xff1a45;}})});}_0x154370=_['merge']({},_0x154370,_0x214805[_0x1dc9('0x3c')]);var _0x2a294b={'where':_0x154370[_0x1dc9('0x36')]};return db[_0x1dc9('0x2a')][_0x1dc9('0x1e')](_0x2a294b)[_0x1dc9('0x24')](function(_0x209dda){_0x5f1403[_0x1dc9('0x1e')]=_0x209dda;if(_0x214805[_0x1dc9('0x2e')][_0x1dc9('0x3d')]){_0x154370[_0x1dc9('0x3e')]=[{'all':!![]}];}return db[_0x1dc9('0x2a')][_0x1dc9('0x3f')](_0x154370);})[_0x1dc9('0x24')](function(_0x443131){_0x5f1403[_0x1dc9('0x40')]=_0x443131;return _0x5f1403;})[_0x1dc9('0x24')](respondWithFilteredResult(_0x10123d,_0x154370))[_0x1dc9('0x41')](handleError(_0x10123d,null));};exports[_0x1dc9('0x42')]=function(_0x51e286,_0x140ad2){var _0x1fe3b8={'raw':!![],'where':{'id':_0x51e286[_0x1dc9('0x43')]['id']}},_0x3a3033={};_0x3a3033['model']=_[_0x1dc9('0x2f')](db[_0x1dc9('0x2a')][_0x1dc9('0x2b')]);_0x3a3033[_0x1dc9('0x2e')]=_[_0x1dc9('0x2f')](_0x51e286[_0x1dc9('0x2e')]);_0x3a3033[_0x1dc9('0x37')]=_[_0x1dc9('0x30')](_0x3a3033['model'],_0x3a3033['query']);_0x1fe3b8[_0x1dc9('0x32')]=_['intersection'](_0x3a3033[_0x1dc9('0x2d')],qs[_0x1dc9('0x31')](_0x51e286['query'][_0x1dc9('0x31')]));_0x1fe3b8[_0x1dc9('0x32')]=_0x1fe3b8[_0x1dc9('0x32')]['length']?_0x1fe3b8[_0x1dc9('0x32')]:_0x3a3033[_0x1dc9('0x2d')];if(_0x51e286[_0x1dc9('0x2e')][_0x1dc9('0x3d')]){_0x1fe3b8[_0x1dc9('0x3e')]=[{'all':!![]}];}_0x1fe3b8=_[_0x1dc9('0x39')]({},_0x1fe3b8,_0x51e286[_0x1dc9('0x3c')]);return db[_0x1dc9('0x2a')][_0x1dc9('0x44')](_0x1fe3b8)[_0x1dc9('0x24')](handleEntityNotFound(_0x140ad2,null))['then'](respondWithResult(_0x140ad2,null))[_0x1dc9('0x41')](handleError(_0x140ad2,null));};exports[_0x1dc9('0x45')]=function(_0x27ac48,_0x58989d){return db[_0x1dc9('0x2a')][_0x1dc9('0x45')](_0x27ac48[_0x1dc9('0x46')],{})[_0x1dc9('0x24')](respondWithResult(_0x58989d,0xc9))[_0x1dc9('0x41')](handleError(_0x58989d,null));};exports[_0x1dc9('0x23')]=function(_0x170253,_0x49416f){if(_0x170253[_0x1dc9('0x46')]['id']){delete _0x170253[_0x1dc9('0x46')]['id'];}return db[_0x1dc9('0x2a')]['find']({'where':{'id':_0x170253[_0x1dc9('0x43')]['id']}})['then'](handleEntityNotFound(_0x49416f,null))[_0x1dc9('0x24')](saveUpdates(_0x170253['body'],null))['then'](respondWithResult(_0x49416f,null))[_0x1dc9('0x41')](handleError(_0x49416f,null));};exports[_0x1dc9('0x25')]=function(_0x295fea,_0x9d1456){return db[_0x1dc9('0x2a')]['find']({'where':{'id':_0x295fea[_0x1dc9('0x43')]['id']}})[_0x1dc9('0x24')](handleEntityNotFound(_0x9d1456,null))[_0x1dc9('0x24')](removeEntity(_0x9d1456,null))[_0x1dc9('0x41')](handleError(_0x9d1456,null));}; \ No newline at end of file +var _0x81b7=['params','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','util','path','sox','to-csv','fs-extra','lodash','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../config/license/hardware','api','../../config/environment','../../mysqldb','sendStatus','status','end','json','offset','undefined','count','set','Content-Range','apply','reject','save','update','then','destroy','stack','name','send','index','map','WhatsappApplication','fieldName','model','query','keys','filters','intersection','fields','attributes','length','nolimit','limit','order','sort','where','pick','merge','VIRTUAL','filter','includeAll','include','findAll','rows','show','rawAttributes','options','find','catch','create','body'];(function(_0x455ebd,_0x4aad19){var _0x188d1b=function(_0x28f5f6){while(--_0x28f5f6){_0x455ebd['push'](_0x455ebd['shift']());}};_0x188d1b(++_0x4aad19);}(_0x81b7,0x1f2));var _0x781b=function(_0x1325c6,_0x69d973){_0x1325c6=_0x1325c6-0x0;var _0x202425=_0x81b7[_0x1325c6];return _0x202425;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x781b('0x0'));var zipdir=require(_0x781b('0x1'));var jsonpatch=require(_0x781b('0x2'));var rp=require(_0x781b('0x3'));var moment=require('moment');var BPromise=require(_0x781b('0x4'));var Mustache=require('mustache');var util=require(_0x781b('0x5'));var path=require(_0x781b('0x6'));var sox=require(_0x781b('0x7'));var csv=require(_0x781b('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x781b('0x9'));var _=require(_0x781b('0xa'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x781b('0xb'));var deskjs=require(_0x781b('0xc'));var toCsv=require(_0x781b('0x8'));var querystring=require(_0x781b('0xd'));var Papa=require('papaparse');var Redis=require(_0x781b('0xe'));var authService=require(_0x781b('0xf'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x781b('0x10'));var logger=require('../../config/logger')(_0x781b('0x11'));var utils=require('../../config/utils');var config=require(_0x781b('0x12'));var licenseUtil=require('../../config/license/util');var db=require(_0x781b('0x13'))['db'];function respondWithStatusCode(_0x5d1dcb,_0xfb736f){_0xfb736f=_0xfb736f||0xcc;return function(_0x17242f){if(_0x17242f){return _0x5d1dcb[_0x781b('0x14')](_0xfb736f);}return _0x5d1dcb[_0x781b('0x15')](_0xfb736f)[_0x781b('0x16')]();};}function respondWithResult(_0x52bbe4,_0x2bca7f){_0x2bca7f=_0x2bca7f||0xc8;return function(_0x335e7b){if(_0x335e7b){return _0x52bbe4[_0x781b('0x15')](_0x2bca7f)[_0x781b('0x17')](_0x335e7b);}};}function respondWithFilteredResult(_0x587d56,_0x35503a){return function(_0x533377){if(_0x533377){var _0x176e91=typeof _0x35503a[_0x781b('0x18')]===_0x781b('0x19')&&typeof _0x35503a['limit']===_0x781b('0x19');var _0x554ff5=_0x533377['count'];var _0x2c62e5=_0x176e91?0x0:_0x35503a[_0x781b('0x18')];var _0x22d0da=_0x176e91?_0x533377[_0x781b('0x1a')]:_0x35503a[_0x781b('0x18')]+_0x35503a['limit'];var _0x58b961;if(_0x22d0da>=_0x554ff5){_0x22d0da=_0x554ff5;_0x58b961=0xc8;}else{_0x58b961=0xce;}_0x587d56['status'](_0x58b961);return _0x587d56[_0x781b('0x1b')](_0x781b('0x1c'),_0x2c62e5+'-'+_0x22d0da+'/'+_0x554ff5)[_0x781b('0x17')](_0x533377);}return null;};}function patchUpdates(_0x23c239){return function(_0x2aaa43){try{jsonpatch[_0x781b('0x1d')](_0x2aaa43,_0x23c239,!![]);}catch(_0x5b659b){return BPromise[_0x781b('0x1e')](_0x5b659b);}return _0x2aaa43[_0x781b('0x1f')]();};}function saveUpdates(_0xce8565,_0x4ab3c4){return function(_0x13d2e4){if(_0x13d2e4){return _0x13d2e4[_0x781b('0x20')](_0xce8565)[_0x781b('0x21')](function(_0x882cff){return _0x882cff;});}return null;};}function removeEntity(_0x5e4862,_0x28dcfc){return function(_0x359f72){if(_0x359f72){return _0x359f72[_0x781b('0x22')]()[_0x781b('0x21')](function(){_0x5e4862[_0x781b('0x15')](0xcc)['end']();});}};}function handleEntityNotFound(_0x226d68,_0x3ecd1c){return function(_0x31795d){if(!_0x31795d){_0x226d68[_0x781b('0x14')](0x194);}return _0x31795d;};}function handleError(_0x38ba8f,_0x398bfa){_0x398bfa=_0x398bfa||0x1f4;return function(_0x48624d){logger['error'](_0x48624d[_0x781b('0x23')]);if(_0x48624d[_0x781b('0x24')]){delete _0x48624d['name'];}_0x38ba8f[_0x781b('0x15')](_0x398bfa)[_0x781b('0x25')](_0x48624d);};}exports[_0x781b('0x26')]=function(_0x33561e,_0xbde04f){var _0x3d3d4c={},_0x1957c4={},_0x1cd983={'count':0x0,'rows':[]};var _0x416c75=_[_0x781b('0x27')](db[_0x781b('0x28')]['rawAttributes'],function(_0x27488a){return{'name':_0x27488a[_0x781b('0x29')],'type':_0x27488a['type']['key']};});_0x1957c4[_0x781b('0x2a')]=_[_0x781b('0x27')](_0x416c75,_0x781b('0x24'));_0x1957c4[_0x781b('0x2b')]=_[_0x781b('0x2c')](_0x33561e[_0x781b('0x2b')]);_0x1957c4[_0x781b('0x2d')]=_[_0x781b('0x2e')](_0x1957c4['model'],_0x1957c4[_0x781b('0x2b')]);_0x3d3d4c['attributes']=_[_0x781b('0x2e')](_0x1957c4['model'],qs[_0x781b('0x2f')](_0x33561e[_0x781b('0x2b')]['fields']));_0x3d3d4c[_0x781b('0x30')]=_0x3d3d4c[_0x781b('0x30')][_0x781b('0x31')]?_0x3d3d4c[_0x781b('0x30')]:_0x1957c4[_0x781b('0x2a')];if(!_0x33561e[_0x781b('0x2b')]['hasOwnProperty'](_0x781b('0x32'))){_0x3d3d4c[_0x781b('0x33')]=qs[_0x781b('0x33')](_0x33561e[_0x781b('0x2b')][_0x781b('0x33')]);_0x3d3d4c[_0x781b('0x18')]=qs[_0x781b('0x18')](_0x33561e[_0x781b('0x2b')][_0x781b('0x18')]);}_0x3d3d4c[_0x781b('0x34')]=qs[_0x781b('0x35')](_0x33561e[_0x781b('0x2b')]['sort']);_0x3d3d4c[_0x781b('0x36')]=qs[_0x781b('0x2d')](_[_0x781b('0x37')](_0x33561e['query'],_0x1957c4[_0x781b('0x2d')]),_0x416c75);if(_0x33561e['query']['filter']){_0x3d3d4c[_0x781b('0x36')]=_[_0x781b('0x38')](_0x3d3d4c[_0x781b('0x36')],{'$or':_['map'](_0x416c75,function(_0x3ff120){if(_0x3ff120['type']!==_0x781b('0x39')){var _0x130b21={};_0x130b21[_0x3ff120[_0x781b('0x24')]]={'$like':'%'+_0x33561e[_0x781b('0x2b')][_0x781b('0x3a')]+'%'};return _0x130b21;}})});}_0x3d3d4c=_['merge']({},_0x3d3d4c,_0x33561e['options']);var _0x2d797e={'where':_0x3d3d4c['where']};return db[_0x781b('0x28')]['count'](_0x2d797e)[_0x781b('0x21')](function(_0x54b9ae){_0x1cd983[_0x781b('0x1a')]=_0x54b9ae;if(_0x33561e[_0x781b('0x2b')][_0x781b('0x3b')]){_0x3d3d4c[_0x781b('0x3c')]=[{'all':!![]}];}return db[_0x781b('0x28')][_0x781b('0x3d')](_0x3d3d4c);})['then'](function(_0x15ecad){_0x1cd983[_0x781b('0x3e')]=_0x15ecad;return _0x1cd983;})[_0x781b('0x21')](respondWithFilteredResult(_0xbde04f,_0x3d3d4c))['catch'](handleError(_0xbde04f,null));};exports[_0x781b('0x3f')]=function(_0xb3081b,_0x528def){var _0x4de160={'raw':!![],'where':{'id':_0xb3081b['params']['id']}},_0x16f520={};_0x16f520[_0x781b('0x2a')]=_['keys'](db[_0x781b('0x28')][_0x781b('0x40')]);_0x16f520[_0x781b('0x2b')]=_[_0x781b('0x2c')](_0xb3081b[_0x781b('0x2b')]);_0x16f520[_0x781b('0x2d')]=_[_0x781b('0x2e')](_0x16f520['model'],_0x16f520[_0x781b('0x2b')]);_0x4de160['attributes']=_[_0x781b('0x2e')](_0x16f520['model'],qs[_0x781b('0x2f')](_0xb3081b['query'][_0x781b('0x2f')]));_0x4de160[_0x781b('0x30')]=_0x4de160[_0x781b('0x30')][_0x781b('0x31')]?_0x4de160[_0x781b('0x30')]:_0x16f520[_0x781b('0x2a')];if(_0xb3081b[_0x781b('0x2b')][_0x781b('0x3b')]){_0x4de160[_0x781b('0x3c')]=[{'all':!![]}];}_0x4de160=_[_0x781b('0x38')]({},_0x4de160,_0xb3081b[_0x781b('0x41')]);return db['WhatsappApplication'][_0x781b('0x42')](_0x4de160)[_0x781b('0x21')](handleEntityNotFound(_0x528def,null))[_0x781b('0x21')](respondWithResult(_0x528def,null))[_0x781b('0x43')](handleError(_0x528def,null));};exports[_0x781b('0x44')]=function(_0xf9d425,_0x585020){return db['WhatsappApplication']['create'](_0xf9d425['body'],{})[_0x781b('0x21')](respondWithResult(_0x585020,0xc9))[_0x781b('0x43')](handleError(_0x585020,null));};exports[_0x781b('0x20')]=function(_0x1caa51,_0x53522b){if(_0x1caa51[_0x781b('0x45')]['id']){delete _0x1caa51[_0x781b('0x45')]['id'];}return db[_0x781b('0x28')]['find']({'where':{'id':_0x1caa51[_0x781b('0x46')]['id']}})['then'](handleEntityNotFound(_0x53522b,null))[_0x781b('0x21')](saveUpdates(_0x1caa51[_0x781b('0x45')],null))[_0x781b('0x21')](respondWithResult(_0x53522b,null))[_0x781b('0x43')](handleError(_0x53522b,null));};exports[_0x781b('0x22')]=function(_0x320087,_0x320d9e){return db[_0x781b('0x28')][_0x781b('0x42')]({'where':{'id':_0x320087[_0x781b('0x46')]['id']}})[_0x781b('0x21')](handleEntityNotFound(_0x320d9e,null))['then'](removeEntity(_0x320d9e,null))['catch'](handleError(_0x320d9e,null));}; \ No newline at end of file diff --git a/server/api/whatsappApplication/whatsappApplication.model.js b/server/api/whatsappApplication/whatsappApplication.model.js index b150528..02b9c8c 100644 --- a/server/api/whatsappApplication/whatsappApplication.model.js +++ b/server/api/whatsappApplication/whatsappApplication.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9221=['exports','WhatsappApplication','whatsapp_applications','utf8mb4','util','../../config/logger','moment','bluebird','path','rimraf','../../config/environment','./whatsappApplication.attributes'];(function(_0x17406e,_0x1049fd){var _0x2bfc5a=function(_0x2aae05){while(--_0x2aae05){_0x17406e['push'](_0x17406e['shift']());}};_0x2bfc5a(++_0x1049fd);}(_0x9221,0x64));var _0x1922=function(_0x11ec6c,_0x1a8169){_0x11ec6c=_0x11ec6c-0x0;var _0xb59506=_0x9221[_0x11ec6c];return _0xb59506;};'use strict';var _=require('lodash');var util=require(_0x1922('0x0'));var logger=require(_0x1922('0x1'))('api');var moment=require(_0x1922('0x2'));var BPromise=require(_0x1922('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x1922('0x4'));var rimraf=require(_0x1922('0x5'));var config=require(_0x1922('0x6'));var attributes=require(_0x1922('0x7'));module[_0x1922('0x8')]=function(_0x1944a5,_0x1351a0){return _0x1944a5['define'](_0x1922('0x9'),attributes,{'tableName':_0x1922('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x1922('0xb'),'collate':'utf8mb4_unicode_ci'});}; \ No newline at end of file +var _0x03ce=['utf8mb4_unicode_ci','lodash','util','../../config/logger','api','bluebird','request-promise','path','../../config/environment','./whatsappApplication.attributes','exports','define','WhatsappApplication'];(function(_0x422905,_0x3bce3a){var _0x33dc6c=function(_0x4852c9){while(--_0x4852c9){_0x422905['push'](_0x422905['shift']());}};_0x33dc6c(++_0x3bce3a);}(_0x03ce,0x1a1));var _0xe03c=function(_0x66fb14,_0x4ce94e){_0x66fb14=_0x66fb14-0x0;var _0xd33cc=_0x03ce[_0x66fb14];return _0xd33cc;};'use strict';var _=require(_0xe03c('0x0'));var util=require(_0xe03c('0x1'));var logger=require(_0xe03c('0x2'))(_0xe03c('0x3'));var moment=require('moment');var BPromise=require(_0xe03c('0x4'));var rp=require(_0xe03c('0x5'));var fs=require('fs');var path=require(_0xe03c('0x6'));var rimraf=require('rimraf');var config=require(_0xe03c('0x7'));var attributes=require(_0xe03c('0x8'));module[_0xe03c('0x9')]=function(_0x2c0e4b,_0x4340f0){return _0x2c0e4b[_0xe03c('0xa')](_0xe03c('0xb'),attributes,{'tableName':'whatsapp_applications','paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':_0xe03c('0xc')});}; \ No newline at end of file diff --git a/server/api/whatsappApplication/whatsappApplication.rpc.js b/server/api/whatsappApplication/whatsappApplication.rpc.js index 4186bdc..c1616e8 100644 --- a/server/api/whatsappApplication/whatsappApplication.rpc.js +++ b/server/api/whatsappApplication/whatsappApplication.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4b84=['../../config/logger','rpc','http','then','info','request\x20sent','debug','WhatsappApplication,\x20%s,\x20%s,\x20%s','stringify','error','WhatsappApplication,\x20%s,\x20%s','message','lodash','util','randomstring','../../config/utils'];(function(_0xd8b7e0,_0x57fceb){var _0x16ea6c=function(_0x33b42d){while(--_0x33b42d){_0xd8b7e0['push'](_0xd8b7e0['shift']());}};_0x16ea6c(++_0x57fceb);}(_0x4b84,0x1cc));var _0x44b8=function(_0x338f73,_0x1945c8){_0x338f73=_0x338f73-0x0;var _0x163fdf=_0x4b84[_0x338f73];return _0x163fdf;};'use strict';var _=require(_0x44b8('0x0'));var util=require(_0x44b8('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x44b8('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x44b8('0x3'));var logger=require(_0x44b8('0x4'))(_0x44b8('0x5'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client'][_0x44b8('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x54274b,_0x327f59,_0x5947f7){return new BPromise(function(_0x3e87c5,_0x5a2353){return client['request'](_0x54274b,_0x5947f7)[_0x44b8('0x7')](function(_0x42319d){logger[_0x44b8('0x8')]('WhatsappApplication,\x20%s,\x20%s',_0x327f59,_0x44b8('0x9'));logger[_0x44b8('0xa')](_0x44b8('0xb'),_0x327f59,_0x44b8('0x9'),JSON[_0x44b8('0xc')](_0x42319d));if(_0x42319d[_0x44b8('0xd')]){if(_0x42319d[_0x44b8('0xd')]['code']===0x1f4){logger[_0x44b8('0xd')](_0x44b8('0xe'),_0x327f59,_0x42319d['error'][_0x44b8('0xf')]);return _0x5a2353(_0x42319d['error'][_0x44b8('0xf')]);}logger[_0x44b8('0xd')]('WhatsappApplication,\x20%s,\x20%s',_0x327f59,_0x42319d[_0x44b8('0xd')]['message']);return _0x3e87c5(_0x42319d['error'][_0x44b8('0xf')]);}else{logger[_0x44b8('0x8')](_0x44b8('0xe'),_0x327f59,_0x44b8('0x9'));_0x3e87c5(_0x42319d['result']['message']);}})['catch'](function(_0x3fe9fb){logger['error'](_0x44b8('0xe'),_0x327f59,_0x3fe9fb);_0x5a2353(_0x3fe9fb);});});} \ No newline at end of file +var _0x84ab=['message','result','catch','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','then','info','WhatsappApplication,\x20%s,\x20%s','request\x20sent','stringify','error','code'];(function(_0x14ad8b,_0x26f057){var _0x5644b6=function(_0x452711){while(--_0x452711){_0x14ad8b['push'](_0x14ad8b['shift']());}};_0x5644b6(++_0x26f057);}(_0x84ab,0x12f));var _0xb84a=function(_0x235482,_0x14b833){_0x235482=_0x235482-0x0;var _0x5f5bea=_0x84ab[_0x235482];return _0x5f5bea;};'use strict';var _=require(_0xb84a('0x0'));var util=require(_0xb84a('0x1'));var moment=require(_0xb84a('0x2'));var BPromise=require(_0xb84a('0x3'));var rs=require(_0xb84a('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xb84a('0x5'))['db'];var utils=require(_0xb84a('0x6'));var logger=require('../../config/logger')(_0xb84a('0x7'));var config=require(_0xb84a('0x8'));var jayson=require(_0xb84a('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x4dc496,_0xd445b5,_0x4fac4d){return new BPromise(function(_0x3e9086,_0x8d9dbe){return client['request'](_0x4dc496,_0x4fac4d)[_0xb84a('0xa')](function(_0x525cb7){logger[_0xb84a('0xb')](_0xb84a('0xc'),_0xd445b5,_0xb84a('0xd'));logger['debug']('WhatsappApplication,\x20%s,\x20%s,\x20%s',_0xd445b5,'request\x20sent',JSON[_0xb84a('0xe')](_0x525cb7));if(_0x525cb7[_0xb84a('0xf')]){if(_0x525cb7[_0xb84a('0xf')][_0xb84a('0x10')]===0x1f4){logger[_0xb84a('0xf')]('WhatsappApplication,\x20%s,\x20%s',_0xd445b5,_0x525cb7[_0xb84a('0xf')][_0xb84a('0x11')]);return _0x8d9dbe(_0x525cb7[_0xb84a('0xf')][_0xb84a('0x11')]);}logger[_0xb84a('0xf')](_0xb84a('0xc'),_0xd445b5,_0x525cb7[_0xb84a('0xf')][_0xb84a('0x11')]);return _0x3e9086(_0x525cb7[_0xb84a('0xf')][_0xb84a('0x11')]);}else{logger[_0xb84a('0xb')](_0xb84a('0xc'),_0xd445b5,'request\x20sent');_0x3e9086(_0x525cb7[_0xb84a('0x12')][_0xb84a('0x11')]);}})[_0xb84a('0x13')](function(_0x3c0b54){logger[_0xb84a('0xf')](_0xb84a('0xc'),_0xd445b5,_0x3c0b54);_0x8d9dbe(_0x3c0b54);});});} \ No newline at end of file diff --git a/server/api/whatsappInteraction/index.js b/server/api/whatsappInteraction/index.js index bb2ba1b..5b04b03 100644 --- a/server/api/whatsappInteraction/index.js +++ b/server/api/whatsappInteraction/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0a6b=['whatsapp','delete','/:id','whatsappinteraction:destroy','removeTags','exports','multer','express','fs-extra','../../components/auth/service','../../components/interaction/service','./whatsappInteraction.controller','isAuthenticated','index','/describe','describe','show','get','/:id/messages','/:id/download','download','post','create','addMessage','/:id/tags','tracked','whatsappinteraction:addtags','put'];(function(_0x57d13b,_0x52d8cb){var _0x467696=function(_0x153000){while(--_0x153000){_0x57d13b['push'](_0x57d13b['shift']());}};_0x467696(++_0x52d8cb);}(_0x0a6b,0x18e));var _0xb0a6=function(_0x28320d,_0xc2975d){_0x28320d=_0x28320d-0x0;var _0x189ee3=_0x0a6b[_0x28320d];return _0x189ee3;};'use strict';var multer=require(_0xb0a6('0x0'));var util=require('util');var path=require('path');var timeout=require('connect-timeout');var express=require(_0xb0a6('0x1'));var router=express['Router']();var fs_extra=require(_0xb0a6('0x2'));var auth=require(_0xb0a6('0x3'));var interaction=require(_0xb0a6('0x4'));var config=require('../../config/environment');var controller=require(_0xb0a6('0x5'));router['get']('/',auth[_0xb0a6('0x6')](),controller[_0xb0a6('0x7')]);router['get'](_0xb0a6('0x8'),auth[_0xb0a6('0x6')](),controller[_0xb0a6('0x9')]);router['get']('/:id',auth['isAuthenticated'](),controller[_0xb0a6('0xa')]);router[_0xb0a6('0xb')](_0xb0a6('0xc'),auth[_0xb0a6('0x6')](),controller['getMessages']);router[_0xb0a6('0xb')](_0xb0a6('0xd'),auth['isAuthenticated'](),controller[_0xb0a6('0xe')]);router[_0xb0a6('0xf')]('/',auth[_0xb0a6('0x6')](),controller[_0xb0a6('0x10')]);router[_0xb0a6('0xf')](_0xb0a6('0xc'),auth[_0xb0a6('0x6')](),controller[_0xb0a6('0x11')]);router[_0xb0a6('0xf')](_0xb0a6('0x12'),auth['isAuthenticated'](),interaction[_0xb0a6('0x13')]('whatsapp',_0xb0a6('0x14')),controller['addTags']);router[_0xb0a6('0x15')]('/:id',auth[_0xb0a6('0x6')](),interaction[_0xb0a6('0x13')](_0xb0a6('0x16'),'whatsappinteraction:update'),controller['update']);router[_0xb0a6('0x17')](_0xb0a6('0x18'),auth[_0xb0a6('0x6')](),interaction[_0xb0a6('0x13')](_0xb0a6('0x16'),_0xb0a6('0x19')),controller['destroy']);router[_0xb0a6('0x17')](_0xb0a6('0x12'),auth[_0xb0a6('0x6')](),controller[_0xb0a6('0x1a')]);module[_0xb0a6('0x1b')]=router; \ No newline at end of file +var _0x31c2=['/:id/tags','tracked','whatsapp','whatsappinteraction:addtags','addTags','put','whatsappinteraction:update','update','delete','whatsappinteraction:destroy','destroy','removeTags','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','./whatsappInteraction.controller','get','isAuthenticated','index','/describe','describe','/:id','show','/:id/messages','getMessages','/:id/download','download','post','create','addMessage'];(function(_0x5c350d,_0x49f765){var _0x57d613=function(_0x141755){while(--_0x141755){_0x5c350d['push'](_0x5c350d['shift']());}};_0x57d613(++_0x49f765);}(_0x31c2,0x1e1));var _0x231c=function(_0x595a64,_0x29afc4){_0x595a64=_0x595a64-0x0;var _0x2de615=_0x31c2[_0x595a64];return _0x2de615;};'use strict';var multer=require(_0x231c('0x0'));var util=require(_0x231c('0x1'));var path=require(_0x231c('0x2'));var timeout=require(_0x231c('0x3'));var express=require(_0x231c('0x4'));var router=express[_0x231c('0x5')]();var fs_extra=require(_0x231c('0x6'));var auth=require(_0x231c('0x7'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x231c('0x8'));router[_0x231c('0x9')]('/',auth[_0x231c('0xa')](),controller[_0x231c('0xb')]);router['get'](_0x231c('0xc'),auth['isAuthenticated'](),controller[_0x231c('0xd')]);router[_0x231c('0x9')](_0x231c('0xe'),auth['isAuthenticated'](),controller[_0x231c('0xf')]);router[_0x231c('0x9')](_0x231c('0x10'),auth[_0x231c('0xa')](),controller[_0x231c('0x11')]);router[_0x231c('0x9')](_0x231c('0x12'),auth['isAuthenticated'](),controller[_0x231c('0x13')]);router[_0x231c('0x14')]('/',auth['isAuthenticated'](),controller[_0x231c('0x15')]);router[_0x231c('0x14')](_0x231c('0x10'),auth[_0x231c('0xa')](),controller[_0x231c('0x16')]);router[_0x231c('0x14')](_0x231c('0x17'),auth[_0x231c('0xa')](),interaction[_0x231c('0x18')](_0x231c('0x19'),_0x231c('0x1a')),controller[_0x231c('0x1b')]);router[_0x231c('0x1c')](_0x231c('0xe'),auth[_0x231c('0xa')](),interaction[_0x231c('0x18')](_0x231c('0x19'),_0x231c('0x1d')),controller[_0x231c('0x1e')]);router[_0x231c('0x1f')]('/:id',auth[_0x231c('0xa')](),interaction[_0x231c('0x18')](_0x231c('0x19'),_0x231c('0x20')),controller[_0x231c('0x21')]);router[_0x231c('0x1f')](_0x231c('0x17'),auth[_0x231c('0xa')](),controller[_0x231c('0x22')]);module[_0x231c('0x23')]=router; \ No newline at end of file diff --git a/server/api/whatsappInteraction/whatsappInteraction.attributes.js b/server/api/whatsappInteraction/whatsappInteraction.attributes.js index 0353608..8ba21a8 100644 --- a/server/api/whatsappInteraction/whatsappInteraction.attributes.js +++ b/server/api/whatsappInteraction/whatsappInteraction.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8d0a=['STRING','out','ENUM','sequelize','exports','BOOLEAN','DATE'];(function(_0x1620f5,_0xcf5340){var _0x4017fe=function(_0xcfad40){while(--_0xcfad40){_0x1620f5['push'](_0x1620f5['shift']());}};_0x4017fe(++_0xcf5340);}(_0x8d0a,0x65));var _0xa8d0=function(_0x472230,_0x18cc25){_0x472230=_0x472230-0x0;var _0x3d629e=_0x8d0a[_0x472230];return _0x3d629e;};'use strict';var Sequelize=require(_0xa8d0('0x0'));var moment=require('moment');module[_0xa8d0('0x1')]={'closed':{'type':Sequelize[_0xa8d0('0x2')],'defaultValue':![]},'closedAt':{'type':Sequelize[_0xa8d0('0x3')]},'disposition':{'type':Sequelize[_0xa8d0('0x4')]},'secondDisposition':{'type':Sequelize[_0xa8d0('0x4')]},'thirdDisposition':{'type':Sequelize[_0xa8d0('0x4')]},'note':{'type':Sequelize[_0xa8d0('0x4')]},'phone':{'type':Sequelize[_0xa8d0('0x4')]},'read1stAt':{'type':Sequelize[_0xa8d0('0x3')]},'firstMsgDirection':{'type':Sequelize['ENUM']('in',_0xa8d0('0x5')),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize[_0xa8d0('0x3')]},'lastMsgDirection':{'type':Sequelize[_0xa8d0('0x6')]('in',_0xa8d0('0x5')),'defaultValue':'in','allowNull':![]},'autoreplyExecuted':{'type':Sequelize[_0xa8d0('0x2')],'defaultValue':![]}}; \ No newline at end of file +var _0x51f2=['STRING','ENUM','out','sequelize','moment','exports','BOOLEAN','DATE'];(function(_0x15ea09,_0x2f30ab){var _0x3e9c78=function(_0x15f8ba){while(--_0x15f8ba){_0x15ea09['push'](_0x15ea09['shift']());}};_0x3e9c78(++_0x2f30ab);}(_0x51f2,0xeb));var _0x251f=function(_0x507867,_0x509563){_0x507867=_0x507867-0x0;var _0xfe64d5=_0x51f2[_0x507867];return _0xfe64d5;};'use strict';var Sequelize=require(_0x251f('0x0'));var moment=require(_0x251f('0x1'));module[_0x251f('0x2')]={'closed':{'type':Sequelize[_0x251f('0x3')],'defaultValue':![]},'closedAt':{'type':Sequelize[_0x251f('0x4')]},'disposition':{'type':Sequelize[_0x251f('0x5')]},'secondDisposition':{'type':Sequelize[_0x251f('0x5')]},'thirdDisposition':{'type':Sequelize[_0x251f('0x5')]},'note':{'type':Sequelize[_0x251f('0x5')]},'phone':{'type':Sequelize['STRING']},'read1stAt':{'type':Sequelize[_0x251f('0x4')]},'firstMsgDirection':{'type':Sequelize[_0x251f('0x6')]('in',_0x251f('0x7')),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize[_0x251f('0x4')]},'lastMsgDirection':{'type':Sequelize[_0x251f('0x6')]('in','out'),'defaultValue':'in','allowNull':![]},'autoreplyExecuted':{'type':Sequelize[_0x251f('0x3')],'defaultValue':![]}}; \ No newline at end of file diff --git a/server/api/whatsappInteraction/whatsappInteraction.controller.js b/server/api/whatsappInteraction/whatsappInteraction.controller.js index b383f3b..71471ba 100644 --- a/server/api/whatsappInteraction/whatsappInteraction.controller.js +++ b/server/api/whatsappInteraction/whatsappInteraction.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa22a=['tag','isArray','filter','replace','isNumeric','i.id\x20LIKE\x20?','i.phone\x20LIKE\x20?','i.id','Sequelize','QueryTypes','SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)','contactName','DESC','isEmpty','t.id\x20IN\x20?','user','role','agent','i.WhatsappAccountId\x20IS\x20NULL','sequelize','toString','keyBy','a.key','Account.key','a.mandatoryDisposition','Account.mandatoryDisposition','i.*','c.firstName','Contact.firstName','c.email','Contact.email','c.phone','Contact.phone','c.mobile','Contact.mobile','c.fax','Contact.fax','o.internal','Owner.internal','GROUP_CONCAT(DISTINCT\x20t.id)','ui.WhatsappInteractionId\x20IN\x20?','groupBy','WhatsappInteractionId','all','rows','keys','includeAll','include','merge','options','create','params','describe','addMessage','omit','getMessages','findOne','WhatsappMessage','hasOwnProperty','nolimit','sort','split','format','findAll','setTags','ids','spread','emit','whatsappInteractionTags:save','removeTags','unix','join','root','server','files','transcript-%d-%s.zip','attachments','Attachment','Messages','direction','secret','WhatsappAccount','Account','mkdirSync','Whatsapp','N.A.','YYYY-MM-DD\x20HH:mm:ss','closed','closedAt','basename','existsSync','pipe','createWriteStream','out','System','firstName','lastName','renderFile','views','downloadInteraction.ejs','transcript-','.pdf','createPdfFromHTML','download','log','unlinkSync','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','fs-extra','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','register','sendStatus','status','json','offset','undefined','limit','count','set','apply','reject','save','update','then','destroy','end','error','name','Users','map','fullname','TagIds','Tags','forEach','push','catch','index','WhatsappInteraction','rawAttributes','fieldName','type','key','model','query','filters','attributes','intersection','fields','order','where','pick','select','field','color','from','u.id','user_has_whatsapp_interactions','left_join','u.id\x20=\x20ui.UserId','whatsapp_interactions','cm_contacts','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL','o.id\x20=\x20i.UserId','whatsapp_accounts','whatsapp_messages','whatsapp_interaction_has_tags','it.WhatsappInteractionId\x20=\x20i.id','tools_tags','expr','search','parseSearch','sqlOperator','conditions','find','unreadMessages','value','`\x20=\x200','having','`\x20>\x200','Contact','$substring','length','getFullTextValue','c.firstName\x20LIKE\x20?\x20OR\x20c.lastName\x20LIKE\x20?\x20OR\x20c.email\x20LIKE\x20?','buildExpression','text','start','Tag','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','union','User','operator','CONCAT_WS(\x27\x20\x27,\x20o.name,\x20o.fullname)\x20LIKE\x20?','UserId','body','some','compact','WhatsappAccountId','i.WhatsappAccountId\x20IN\x20?','concat','createdAt','parse','$gte','$lte','i.createdAt\x20BETWEEN\x20?\x20AND\x20?','null','\x20IS\x20NULL','read'];(function(_0x1f2cce,_0x39c05a){var _0x53323a=function(_0x276d70){while(--_0x276d70){_0x1f2cce['push'](_0x1f2cce['shift']());}};_0x53323a(++_0x39c05a);}(_0xa22a,0x153));var _0xaa22=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xa22a[_0x14add3];return _0x4a174f;};'use strict';var emlformat=require(_0xaa22('0x0'));var rimraf=require(_0xaa22('0x1'));var zipdir=require(_0xaa22('0x2'));var jsonpatch=require(_0xaa22('0x3'));var rp=require(_0xaa22('0x4'));var moment=require('moment');var BPromise=require(_0xaa22('0x5'));var Mustache=require(_0xaa22('0x6'));var util=require(_0xaa22('0x7'));var path=require(_0xaa22('0x8'));var sox=require(_0xaa22('0x9'));var csv=require(_0xaa22('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xaa22('0xb'));var _=require('lodash');var squel=require(_0xaa22('0xc'));var crypto=require(_0xaa22('0xd'));var jsforce=require(_0xaa22('0xe'));var deskjs=require(_0xaa22('0xf'));var toCsv=require('to-csv');var querystring=require(_0xaa22('0x10'));var Papa=require('papaparse');var Redis=require(_0xaa22('0x11'));var authService=require(_0xaa22('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0xaa22('0x13'));var pdf=require('../../components/export/pdf');var hardwareService=require('../../config/license/hardware');var logger=require(_0xaa22('0x14'))('api');var utils=require(_0xaa22('0x15'));var config=require(_0xaa22('0x16'));var licenseUtil=require(_0xaa22('0x17'));var db=require(_0xaa22('0x18'))['db'];config[_0xaa22('0x19')]=_[_0xaa22('0x1a')](config[_0xaa22('0x19')],{'host':_0xaa22('0x1b'),'port':0x18eb});var socket=require(_0xaa22('0x1c'))(new Redis(config[_0xaa22('0x19')]));require('./whatsappInteraction.socket')[_0xaa22('0x1d')](socket);function respondWithStatusCode(_0x29498e,_0x4b2482){_0x4b2482=_0x4b2482||0xcc;return function(_0x290d87){if(_0x290d87){return _0x29498e[_0xaa22('0x1e')](_0x4b2482);}return _0x29498e[_0xaa22('0x1f')](_0x4b2482)['end']();};}function respondWithResult(_0x5501d9,_0x1f1c69){_0x1f1c69=_0x1f1c69||0xc8;return function(_0x378e7e){if(_0x378e7e){return _0x5501d9[_0xaa22('0x1f')](_0x1f1c69)[_0xaa22('0x20')](_0x378e7e);}};}function respondWithFilteredResult(_0x1021ef,_0x239b8b){return function(_0x5b480a){if(_0x5b480a){var _0x523087=typeof _0x239b8b[_0xaa22('0x21')]===_0xaa22('0x22')&&typeof _0x239b8b[_0xaa22('0x23')]===_0xaa22('0x22');var _0x2f8506=_0x5b480a[_0xaa22('0x24')];var _0x34ca56=_0x523087?0x0:_0x239b8b[_0xaa22('0x21')];var _0x2e4bc4=_0x523087?_0x5b480a[_0xaa22('0x24')]:_0x239b8b[_0xaa22('0x21')]+_0x239b8b[_0xaa22('0x23')];var _0x391f96;if(_0x2e4bc4>=_0x2f8506){_0x2e4bc4=_0x2f8506;_0x391f96=0xc8;}else{_0x391f96=0xce;}_0x1021ef[_0xaa22('0x1f')](_0x391f96);return _0x1021ef[_0xaa22('0x25')]('Content-Range',_0x34ca56+'-'+_0x2e4bc4+'/'+_0x2f8506)[_0xaa22('0x20')](_0x5b480a);}return null;};}function patchUpdates(_0x21fe77){return function(_0x2d725d){try{jsonpatch[_0xaa22('0x26')](_0x2d725d,_0x21fe77,!![]);}catch(_0x343f81){return BPromise[_0xaa22('0x27')](_0x343f81);}return _0x2d725d[_0xaa22('0x28')]();};}function saveUpdates(_0x1b4e9d,_0x2f7f49){return function(_0x3cc867){if(_0x3cc867){return _0x3cc867[_0xaa22('0x29')](_0x1b4e9d)[_0xaa22('0x2a')](function(_0x2b88b8){return _0x2b88b8;});}return null;};}function removeEntity(_0xd3cac7,_0x4ae75b){return function(_0x3e8608){if(_0x3e8608){return _0x3e8608[_0xaa22('0x2b')]()['then'](function(){_0xd3cac7[_0xaa22('0x1f')](0xcc)[_0xaa22('0x2c')]();});}};}function handleEntityNotFound(_0x5132d4,_0xcfaffa){return function(_0x4bf9b2){if(!_0x4bf9b2){_0x5132d4['sendStatus'](0x194);}return _0x4bf9b2;};}function handleError(_0x4e3267,_0x97edb4){_0x97edb4=_0x97edb4||0x1f4;return function(_0x5b5104){logger[_0xaa22('0x2d')](_0x5b5104['stack']);if(_0x5b5104['name']){delete _0x5b5104[_0xaa22('0x2e')];}_0x4e3267['status'](_0x97edb4)['send'](_0x5b5104);};}function getInteractionUsers(_0x1e9bb4,_0x5aeae1){return new BPromise(function(_0x564bb0,_0x47eee2){try{if(_0x5aeae1[_0x1e9bb4['id']]){_0x1e9bb4[_0xaa22('0x2f')]=_[_0xaa22('0x30')](_0x5aeae1[_0x1e9bb4['id']],function(_0x58b829){return{'id':_0x58b829['id'],'fullname':_0x58b829[_0xaa22('0x31')]};});}}catch(_0x4b165c){_0x47eee2(_0x4b165c);}_0x564bb0(_0x1e9bb4);});}function getInteractionTags(_0x5bf0dc,_0x3d7812){return new BPromise(function(_0x39e50,_0x43bda1){try{if(_0x5bf0dc[_0xaa22('0x32')]){_0x5bf0dc[_0xaa22('0x33')]=[];_0x5bf0dc[_0xaa22('0x32')]['split'](',')[_0xaa22('0x34')](function(_0x13ece0){_0x5bf0dc[_0xaa22('0x33')][_0xaa22('0x35')](_0x3d7812[_0x13ece0]);});}delete _0x5bf0dc[_0xaa22('0x32')];}catch(_0x3100d8){_0x43bda1(_0x3100d8);}_0x39e50(_0x5bf0dc);});}function updateWhatsappInteraction(_0x2407bd,_0x402650,_0x5da826){return new BPromise(function(_0x5ad05a,_0x11e59a){return getInteractionUsers(_0x2407bd,_0x5da826)['then'](function(_0x28ee29){return getInteractionTags(_0x28ee29,_0x402650);})[_0xaa22('0x2a')](function(_0x2d0a3a){_0x5ad05a(_0x2d0a3a);})[_0xaa22('0x36')](function(_0x19a8e1){_0x11e59a(_0x19a8e1);});});}exports[_0xaa22('0x37')]=function(_0x3b374c,_0x111fc1){var _0x45dc6f={},_0xe581a={},_0xbaf6c1={'count':0x0,'rows':[]};var _0x4e69de=_[_0xaa22('0x30')](db[_0xaa22('0x38')][_0xaa22('0x39')],function(_0xa314b3){return{'name':_0xa314b3[_0xaa22('0x3a')],'type':_0xa314b3[_0xaa22('0x3b')][_0xaa22('0x3c')]};});_0xe581a[_0xaa22('0x3d')]=_[_0xaa22('0x30')](_0x4e69de,'name');_0xe581a[_0xaa22('0x3e')]=_['keys'](_0x3b374c[_0xaa22('0x3e')]);_0xe581a[_0xaa22('0x3f')]=_['intersection'](_0xe581a['model'],_0xe581a[_0xaa22('0x3e')]);_0x45dc6f[_0xaa22('0x40')]=_[_0xaa22('0x41')](_0xe581a[_0xaa22('0x3d')],qs[_0xaa22('0x42')](_0x3b374c[_0xaa22('0x3e')]['fields']));_0x45dc6f['attributes']=_0x45dc6f[_0xaa22('0x40')]['length']?_0x45dc6f[_0xaa22('0x40')]:_0xe581a[_0xaa22('0x3d')];if(!_0x3b374c[_0xaa22('0x3e')]['hasOwnProperty']('nolimit')){_0x45dc6f[_0xaa22('0x23')]=qs[_0xaa22('0x23')](_0x3b374c[_0xaa22('0x3e')][_0xaa22('0x23')]);_0x45dc6f[_0xaa22('0x21')]=qs[_0xaa22('0x21')](_0x3b374c[_0xaa22('0x3e')]['offset']);}_0x45dc6f[_0xaa22('0x43')]=qs['sort'](_0x3b374c[_0xaa22('0x3e')]['sort']);_0x45dc6f[_0xaa22('0x44')]=qs[_0xaa22('0x3f')](_[_0xaa22('0x45')](_0x3b374c['query'],_0xe581a[_0xaa22('0x3f')]),_0x4e69de);var _0x5d6003=[];var _0x32aa59=squel[_0xaa22('0x46')]()[_0xaa22('0x47')]('id')[_0xaa22('0x47')]('name')[_0xaa22('0x47')](_0xaa22('0x48'))[_0xaa22('0x49')]('tools_tags');var _0x370bb6=squel[_0xaa22('0x46')]()[_0xaa22('0x47')](_0xaa22('0x4a'))[_0xaa22('0x47')]('u.fullname')[_0xaa22('0x47')]('ui.WhatsappInteractionId')['from'](_0xaa22('0x4b'),'ui')[_0xaa22('0x4c')]('users','u',_0xaa22('0x4d'));var _0xd4b990=squel[_0xaa22('0x46')]()['from'](_0xaa22('0x4e'),'i')[_0xaa22('0x4c')](_0xaa22('0x4f'),'c',_0xaa22('0x50'))['left_join']('users','o',_0xaa22('0x51'))[_0xaa22('0x4c')](_0xaa22('0x52'),'a','a.id\x20=\x20i.WhatsappAccountId')[_0xaa22('0x4c')](_0xaa22('0x53'),'me','me.WhatsappInteractionId\x20=\x20i.id')[_0xaa22('0x4c')](_0xaa22('0x54'),'it',_0xaa22('0x55'))[_0xaa22('0x4c')](_0xaa22('0x56'),'t','t.id\x20=\x20it.TagId');var _0x1a7656=squel['expr']();var _0x1d1706=[];var _0x615f1=squel[_0xaa22('0x57')]();var _0x1a866c;if(_0x3b374c['query'][_0xaa22('0x58')]){_0x1a866c=as[_0xaa22('0x59')](_0x3b374c[_0xaa22('0x3e')][_0xaa22('0x58')]);var _0x1ecd1e=_0x1a866c[_0xaa22('0x5a')];for(var _0x5a6bb0=0x0;_0x5a6bb0<_0x1a866c[_0xaa22('0x5b')]['length'];_0x5a6bb0++){var _0x3ded37=_0x1a866c[_0xaa22('0x5b')][_0x5a6bb0];var _0x16888a='i';var _0x47a091=_[_0xaa22('0x5c')](_0x4e69de,[_0xaa22('0x2e'),_0x3ded37[_0xaa22('0x47')]]);if(!_0x47a091){switch(_0x3ded37['field']){case _0xaa22('0x5d'):if(_0x3ded37[_0xaa22('0x5e')]==0x1){_0xd4b990['having']('`'+_0x3ded37[_0xaa22('0x47')]+_0xaa22('0x5f'));}else{_0xd4b990[_0xaa22('0x60')]('`'+_0x3ded37[_0xaa22('0x47')]+_0xaa22('0x61'));}break;case _0xaa22('0x62'):if(_0x3ded37['operator']===_0xaa22('0x63')){if(_0x3ded37[_0xaa22('0x5e')]['split']('\x20')[_0xaa22('0x64')]>0x1){_0x1a7656[_0x1ecd1e]('MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)',qs[_0xaa22('0x65')](_0x3ded37[_0xaa22('0x5e')]),null);}else{var _0xbe3e4f='%'+_0x3ded37[_0xaa22('0x5e')]+'%';_0x1a7656[_0x1ecd1e](_0xaa22('0x66'),_0xbe3e4f,_0xbe3e4f,_0xbe3e4f);}}else{_0x47a091=_[_0xaa22('0x5c')](_0x4e69de,[_0xaa22('0x2e'),'ContactId']);_0x3ded37[_0xaa22('0x47')]='ContactId';_0x2c3449=as[_0xaa22('0x67')](_0x16888a,_0x47a091[_0xaa22('0x3b')],_0x3ded37);_0x1a7656[_0x1ecd1e](_0x2c3449[_0xaa22('0x68')],_0x2c3449[_0xaa22('0x5e')][_0xaa22('0x69')],_0x2c3449[_0xaa22('0x5e')]['end']);}break;case _0xaa22('0x6a'):var _0x5350ab=_0x3ded37[_0xaa22('0x5e')]['split'](',')[_0xaa22('0x30')](function(_0x409d14){return Number(_0x409d14);});_0x5350ab[_0xaa22('0x34')](function(_0x417a0b){_0x615f1['or'](_0xaa22('0x6b'),'%,'+_0x417a0b+',%');});_0x1d1706=_[_0xaa22('0x6c')](_0x1d1706,_0x5350ab);break;case _0xaa22('0x6d'):if(_0x3ded37[_0xaa22('0x6e')]===_0xaa22('0x63')){_0x1a7656[_0x1ecd1e](_0xaa22('0x6f'),'%'+_0x3ded37[_0xaa22('0x5e')]+'%',null);}else{_0x47a091=_[_0xaa22('0x5c')](_0x4e69de,[_0xaa22('0x2e'),'UserId']);_0x3ded37[_0xaa22('0x47')]=_0xaa22('0x70');_0x2c3449=as[_0xaa22('0x67')](_0x16888a,_0x47a091[_0xaa22('0x3b')],_0x3ded37);_0x1a7656[_0x1ecd1e](_0x2c3449['text'],_0x2c3449['value'][_0xaa22('0x69')],_0x2c3449[_0xaa22('0x5e')][_0xaa22('0x2c')]);}break;case _0xaa22('0x71'):_0x2c3449=as[_0xaa22('0x67')]('me',null,_0x3ded37);_0x1a7656[_0x1ecd1e](_0x2c3449[_0xaa22('0x68')],_0x2c3449[_0xaa22('0x5e')][_0xaa22('0x69')],_0x2c3449[_0xaa22('0x5e')][_0xaa22('0x2c')]);break;}}else{var _0x2c3449=as['buildExpression'](_0x16888a,_0x47a091[_0xaa22('0x3b')],_0x3ded37);_0x1a7656[_0x1ecd1e](_0x2c3449[_0xaa22('0x68')],_0x2c3449[_0xaa22('0x5e')][_0xaa22('0x69')],_0x2c3449[_0xaa22('0x5e')]['end']);}}}else{var _0x192f0f=_(_0x3b374c[_0xaa22('0x3e')])['keys']()['map'](function(_0x480f37){return _[_0xaa22('0x72')](_0x4e69de,[_0xaa22('0x2e'),_0x480f37])?_0x480f37:undefined;})[_0xaa22('0x73')]()[_0xaa22('0x5e')]();if(!_['isEmpty'](_0x192f0f)){_0x192f0f[_0xaa22('0x34')](function(_0x4ac18e){if(_0x4ac18e===_0xaa22('0x74')){_0xd4b990['where'](_0xaa22('0x75'),[][_0xaa22('0x76')](_0x3b374c[_0xaa22('0x3e')][_0x4ac18e]));}else if(_0x4ac18e===_0xaa22('0x77')){var _0x39e8c3=JSON[_0xaa22('0x78')](_0x3b374c[_0xaa22('0x3e')][_0x4ac18e])[_0xaa22('0x79')];var _0x1cb4eb=JSON[_0xaa22('0x78')](_0x3b374c[_0xaa22('0x3e')][_0x4ac18e])[_0xaa22('0x7a')];_0xd4b990[_0xaa22('0x44')](_0xaa22('0x7b'),_0x39e8c3,_0x1cb4eb);}else{if(_0x3b374c['query'][_0x4ac18e]===_0xaa22('0x7c')){_0xd4b990[_0xaa22('0x44')]('i.'+_0x4ac18e+_0xaa22('0x7d'));}else{_0xd4b990[_0xaa22('0x44')]('i.'+_0x4ac18e+'\x20=\x20?',_0x3b374c[_0xaa22('0x3e')][_0x4ac18e]);}}});}if(_0x3b374c[_0xaa22('0x3e')]['read']){if(_0x3b374c[_0xaa22('0x3e')][_0xaa22('0x7e')]==0x1){_0xd4b990[_0xaa22('0x60')]('`unreadMessages`\x20=\x200');}else{_0xd4b990[_0xaa22('0x60')]('`unreadMessages`\x20>\x200');}}if(_0x3b374c['query'][_0xaa22('0x7f')]){_0x1d1706=_[_0xaa22('0x80')](_0x3b374c['query']['tag'])?_0x3b374c['query'][_0xaa22('0x7f')]:new Array(_0x3b374c[_0xaa22('0x3e')][_0xaa22('0x7f')]);_0x1d1706['forEach'](function(_0x8a77cf){_0x615f1['or'](_0xaa22('0x6b'),'%,'+_0x8a77cf+',%');});}if(_0x3b374c[_0xaa22('0x3e')]['filter']){var _0x1fe2e7=_0x3b374c[_0xaa22('0x3e')][_0xaa22('0x81')][_0xaa22('0x82')]('\x5c','\x5c\x5c')['replace'](/'/g,'\x27\x27');if(qs[_0xaa22('0x83')](_0x1fe2e7)){_0x1a7656['or'](_0xaa22('0x84'),_0x1fe2e7+'%')['or'](_0xaa22('0x85'),_0x1fe2e7+'%');}else{_0x1a7656['or']('MATCH\x20(me.body)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)',qs[_0xaa22('0x65')](_0x1fe2e7))['or']('CONCAT(c.firstName,\x20\x27\x20\x27,\x20c.lastName)\x20LIKE\x20?',_0x1fe2e7+'%');}}}_0xd4b990[_0xaa22('0x44')](_0x1a7656);_0xd4b990['group'](_0xaa22('0x86'));var _0x3c11e0={'type':db[_0xaa22('0x87')][_0xaa22('0x88')]['SELECT'],'raw':!![]};var _0x59dc2e=_0xd4b990['clone']();_0x59dc2e[_0xaa22('0x47')](_0xaa22('0x86'));_0x59dc2e[_0xaa22('0x47')](_0xaa22('0x89'),_0xaa22('0x5d'));if(_0x45dc6f[_0xaa22('0x43')]){_0x45dc6f[_0xaa22('0x43')]['forEach'](function(_0x30147b){var _0x52eb61=_0x30147b[0x0]===_0xaa22('0x8a')?_0x30147b[0x0]:'i.'+_0x30147b[0x0];_0xd4b990[_0xaa22('0x43')](_0x52eb61,_0x30147b[0x1]===_0xaa22('0x8b')?![]:!![]);});}if(!_[_0xaa22('0x8c')](_0x1d1706)){_0xd4b990['having'](_0x615f1);_0x59dc2e[_0xaa22('0x44')](_0xaa22('0x8d'),_0x1d1706);}BPromise['resolve']()[_0xaa22('0x2a')](function(){if(!_0x1a866c){if(_0x3b374c['query'][_0xaa22('0x74')])return;_0x59dc2e[_0xaa22('0x44')]('i.WhatsappAccountId\x20IS\x20NOT\x20NULL');_0xd4b990[_0xaa22('0x44')]('i.WhatsappAccountId\x20IS\x20NOT\x20NULL');return;}if(_0x3b374c[_0xaa22('0x8e')][_0xaa22('0x8f')]!==_0xaa22('0x90'))return;return _0x3b374c['user']['getWhatsappAccounts']({'attributes':['id'],'raw':!![]})[_0xaa22('0x2a')](function(_0x2cc3b7){if(_[_0xaa22('0x8c')](_0x2cc3b7)){_0x59dc2e[_0xaa22('0x44')](_0xaa22('0x91'));_0xd4b990[_0xaa22('0x44')](_0xaa22('0x91'));}else{_0x59dc2e[_0xaa22('0x44')](_0xaa22('0x75'),_['map'](_0x2cc3b7,'id'));_0xd4b990['where'](_0xaa22('0x75'),_[_0xaa22('0x30')](_0x2cc3b7,'id'));}});})[_0xaa22('0x2a')](function(){if(_0x3b374c['user']['role']==='agent'&&!_0x1a866c&&!_0x3b374c[_0xaa22('0x3e')][_0xaa22('0x74')])return[];return db[_0xaa22('0x92')]['query'](_0x59dc2e[_0xaa22('0x93')](),_0x3c11e0);})[_0xaa22('0x2a')](function(_0x49a256){_0xbaf6c1[_0xaa22('0x24')]=_0x49a256[_0xaa22('0x64')];if(_0xbaf6c1['count']===0x0)return[];return db[_0xaa22('0x92')][_0xaa22('0x3e')](_0x32aa59['toString'](),_0x3c11e0)[_0xaa22('0x2a')](function(_0x2670d0){_0x5d6003=_[_0xaa22('0x94')](_0x2670d0,'id');_0x3c11e0=_['merge'](_0x3c11e0,{'model':db['WhatsappInteraction'],'mapToModel':!![],'raw':!![],'nest':!![]});if(_0x3b374c['query']['fields']){_0x45dc6f[_0xaa22('0x40')][_0xaa22('0x34')](function(_0x4921e4){_0xd4b990[_0xaa22('0x47')]('i.'+_0x4921e4);});}else{_0xd4b990[_0xaa22('0x47')](_0xaa22('0x89'),_0xaa22('0x5d'));_0xd4b990[_0xaa22('0x47')](_0xaa22('0x95'),_0xaa22('0x96'));_0xd4b990[_0xaa22('0x47')](_0xaa22('0x97'),_0xaa22('0x98'));_0xd4b990[_0xaa22('0x47')]('CASE\x20WHEN\x20(c.firstName\x20IS\x20NOT\x20NULL\x20AND\x20c.firstName\x20<>\x20\x27\x27)\x20OR\x20(c.lastName\x20IS\x20NOT\x20NULL\x20AND\x20c.lastName\x20<>\x20\x27\x27)\x20THEN\x20CONCAT(IFNULL(c.firstName,\x20\x27\x27),\x20\x27\x20\x27,\x20IFNULL(c.lastName,\x20\x27\x27))\x20ELSE\x20\x27Unknown\x27\x20END',_0xaa22('0x8a'));_0xd4b990[_0xaa22('0x47')](_0xaa22('0x99'));_0xd4b990[_0xaa22('0x47')](_0xaa22('0x9a'),_0xaa22('0x9b'));_0xd4b990[_0xaa22('0x47')]('c.lastName','Contact.lastName');_0xd4b990[_0xaa22('0x47')](_0xaa22('0x9c'),_0xaa22('0x9d'));_0xd4b990['field'](_0xaa22('0x9e'),_0xaa22('0x9f'));_0xd4b990[_0xaa22('0x47')](_0xaa22('0xa0'),_0xaa22('0xa1'));_0xd4b990[_0xaa22('0x47')](_0xaa22('0xa2'),_0xaa22('0xa3'));_0xd4b990[_0xaa22('0x47')]('o.fullname','Owner.fullname');_0xd4b990[_0xaa22('0x47')](_0xaa22('0xa4'),_0xaa22('0xa5'));_0xd4b990[_0xaa22('0x47')](_0xaa22('0xa6'),_0xaa22('0x32'));}if(_0x45dc6f[_0xaa22('0x23')])_0xd4b990[_0xaa22('0x23')](_0x45dc6f[_0xaa22('0x23')]);if(_0x45dc6f[_0xaa22('0x21')])_0xd4b990[_0xaa22('0x21')](_0x45dc6f[_0xaa22('0x21')]);return db[_0xaa22('0x92')][_0xaa22('0x3e')](_0xd4b990[_0xaa22('0x93')](),_0x3c11e0);})[_0xaa22('0x2a')](function(_0x48c3b3){if(_0x48c3b3[_0xaa22('0x64')]>0x0)_0x370bb6['where'](_0xaa22('0xa7'),_[_0xaa22('0x30')](_0x48c3b3,'id'));return db[_0xaa22('0x92')][_0xaa22('0x3e')](_0x370bb6[_0xaa22('0x93')](),_0x3c11e0)['then'](function(_0xd381a0){var _0xd5a73a=_[_0xaa22('0xa8')](_0xd381a0,_0xaa22('0xa9'));var _0x15405d=[];_0x48c3b3[_0xaa22('0x34')](function(_0x24e691){_0x15405d[_0xaa22('0x35')](updateWhatsappInteraction(_0x24e691,_0x5d6003,_0xd5a73a));});return BPromise[_0xaa22('0xaa')](_0x15405d);});});})['then'](function(_0x4e374e){_0xbaf6c1[_0xaa22('0xab')]=_0x4e374e;return _0xbaf6c1;})[_0xaa22('0x2a')](respondWithFilteredResult(_0x111fc1,_0x45dc6f))[_0xaa22('0x36')](handleError(_0x111fc1,null));};exports['show']=function(_0x423d38,_0x5690ca){var _0xc3b69d={'raw':![],'where':{'id':_0x423d38['params']['id']}},_0xfe171a={};_0xfe171a['model']=_['keys'](db[_0xaa22('0x38')]['rawAttributes']);_0xfe171a[_0xaa22('0x3e')]=_[_0xaa22('0xac')](_0x423d38[_0xaa22('0x3e')]);_0xfe171a[_0xaa22('0x3f')]=_['intersection'](_0xfe171a[_0xaa22('0x3d')],_0xfe171a[_0xaa22('0x3e')]);_0xc3b69d[_0xaa22('0x40')]=_[_0xaa22('0x41')](_0xfe171a[_0xaa22('0x3d')],qs['fields'](_0x423d38[_0xaa22('0x3e')][_0xaa22('0x42')]));_0xc3b69d['attributes']=_0xc3b69d[_0xaa22('0x40')]['length']?_0xc3b69d['attributes']:_0xfe171a[_0xaa22('0x3d')];if(_0x423d38[_0xaa22('0x3e')][_0xaa22('0xad')]){_0xc3b69d[_0xaa22('0xae')]=[{'all':!![]}];}_0xc3b69d=_[_0xaa22('0xaf')]({},_0xc3b69d,_0x423d38[_0xaa22('0xb0')]);return db['WhatsappInteraction'][_0xaa22('0x5c')](_0xc3b69d)['then'](handleEntityNotFound(_0x5690ca,null))['then'](respondWithResult(_0x5690ca,null))['catch'](handleError(_0x5690ca,null));};exports['create']=function(_0x18d9f6,_0x5f4da1){return db[_0xaa22('0x38')][_0xaa22('0xb1')](_0x18d9f6['body'],{})['then'](respondWithResult(_0x5f4da1,0xc9))[_0xaa22('0x36')](handleError(_0x5f4da1,null));};exports['update']=function(_0x1e73ec,_0x9b261e){if(_0x1e73ec[_0xaa22('0x71')]['id']){delete _0x1e73ec['body']['id'];}return db[_0xaa22('0x38')][_0xaa22('0x5c')]({'where':{'id':_0x1e73ec[_0xaa22('0xb2')]['id']}})[_0xaa22('0x2a')](handleEntityNotFound(_0x9b261e,null))[_0xaa22('0x2a')](saveUpdates(_0x1e73ec[_0xaa22('0x71')],null))['then'](respondWithResult(_0x9b261e,null))[_0xaa22('0x36')](handleError(_0x9b261e,null));};exports[_0xaa22('0x2b')]=function(_0x14e02c,_0x18518e){return db[_0xaa22('0x38')]['find']({'where':{'id':_0x14e02c[_0xaa22('0xb2')]['id']}})[_0xaa22('0x2a')](handleEntityNotFound(_0x18518e,null))[_0xaa22('0x2a')](removeEntity(_0x18518e,null))[_0xaa22('0x36')](handleError(_0x18518e,null));};exports['describe']=function(_0x138ee2,_0x2ba438){return db[_0xaa22('0x38')][_0xaa22('0xb3')]()[_0xaa22('0x2a')](respondWithResult(_0x2ba438,null))[_0xaa22('0x36')](handleError(_0x2ba438,null));};exports[_0xaa22('0xb4')]=function(_0x4673f2,_0x1978fd,_0x45add6){return db['WhatsappMessage'][_0xaa22('0x5c')]({'where':{'id':_0x4673f2['params']['id']}})[_0xaa22('0x2a')](handleEntityNotFound(_0x1978fd,null))[_0xaa22('0x2a')](function(_0x173781){if(_0x173781){return _0x173781[_0xaa22('0xb4')](_0x4673f2[_0xaa22('0x71')]['ids'],_[_0xaa22('0xb5')](_0x4673f2[_0xaa22('0x71')],['ids','id'])||{});}})['then'](respondWithResult(_0x1978fd,null))[_0xaa22('0x36')](handleError(_0x1978fd,null));};exports[_0xaa22('0xb6')]=function(_0x5a8500,_0x554151,_0x51c5eb){var _0x4da3ba={'raw':![],'where':{}};var _0x569cdc={};var _0x2ddd52={'count':0x0,'rows':[]};return db[_0xaa22('0x38')][_0xaa22('0xb7')]({'where':{'id':_0x5a8500['params']['id']}})[_0xaa22('0x2a')](handleEntityNotFound(_0x554151,null))[_0xaa22('0x2a')](function(_0x26ac10){if(_0x26ac10){_0x569cdc[_0xaa22('0x3d')]=_[_0xaa22('0xac')](db[_0xaa22('0xb8')][_0xaa22('0x39')]);_0x569cdc[_0xaa22('0x3e')]=_['keys'](_0x5a8500[_0xaa22('0x3e')]);_0x569cdc['filters']=_['intersection'](_0x569cdc[_0xaa22('0x3d')],_0x569cdc[_0xaa22('0x3e')]);_0x4da3ba[_0xaa22('0x40')]=_[_0xaa22('0x41')](_0x569cdc[_0xaa22('0x3d')],qs[_0xaa22('0x42')](_0x5a8500['query']['fields']));_0x4da3ba[_0xaa22('0x40')]=_0x4da3ba[_0xaa22('0x40')][_0xaa22('0x64')]?_0x4da3ba['attributes']:_0x569cdc[_0xaa22('0x3d')];if(!_0x5a8500[_0xaa22('0x3e')][_0xaa22('0xb9')](_0xaa22('0xba'))){_0x4da3ba['limit']=qs['limit'](_0x5a8500['query'][_0xaa22('0x23')]);_0x4da3ba[_0xaa22('0x21')]=qs[_0xaa22('0x21')](_0x5a8500[_0xaa22('0x3e')][_0xaa22('0x21')]);}_0x4da3ba[_0xaa22('0x43')]=qs[_0xaa22('0xbb')](_0x5a8500['query'][_0xaa22('0xbb')]);_0x4da3ba['where']=qs['filters'](_[_0xaa22('0x45')](_0x5a8500[_0xaa22('0x3e')],_0x569cdc['filters']));_0x4da3ba['where'][_0xaa22('0xa9')]=_0x26ac10['id'];if(_0x5a8500[_0xaa22('0x3e')][_0xaa22('0x81')]){_0x4da3ba[_0xaa22('0x44')]=_[_0xaa22('0xaf')](_0x4da3ba[_0xaa22('0x44')],{'$or':_[_0xaa22('0x30')](_0x4da3ba[_0xaa22('0x40')],function(_0xa40e89){var _0x484a48={};_0x484a48[_0xa40e89]={'$like':'%'+_0x5a8500[_0xaa22('0x3e')]['filter']+'%'};return _0x484a48;})});}if(_0x5a8500[_0xaa22('0x3e')]['$gte']){var _0x121594=_0x5a8500[_0xaa22('0x3e')][_0xaa22('0x79')][_0xaa22('0xbc')](',');var _0x158664={};_0x158664[_0x121594[0x0]]={'$gte':moment(_0x121594[0x1])[_0xaa22('0xbd')]('YYYY-MM-DD\x20HH:mm:ss')};_0x4da3ba[_0xaa22('0x44')]=_[_0xaa22('0xaf')](_0x4da3ba['where'],_0x158664);}_0x4da3ba=_['merge']({},_0x4da3ba,_0x5a8500[_0xaa22('0xb0')]);return db['WhatsappMessage'][_0xaa22('0x24')]({'where':_0x4da3ba[_0xaa22('0x44')]})[_0xaa22('0x2a')](function(_0x5557c0){_0x2ddd52[_0xaa22('0x24')]=_0x5557c0;if(_0x5a8500[_0xaa22('0x3e')][_0xaa22('0xad')]){_0x4da3ba[_0xaa22('0xae')]=[{'all':!![]}];}return db[_0xaa22('0xb8')][_0xaa22('0xbe')](_0x4da3ba);})[_0xaa22('0x2a')](function(_0x4a81e0){_0x2ddd52[_0xaa22('0xab')]=_0x4a81e0;return _0x2ddd52;});}})[_0xaa22('0x2a')](respondWithFilteredResult(_0x554151,_0x4da3ba))[_0xaa22('0x36')](handleError(_0x554151,null));};exports['addTags']=function(_0x2d452c,_0x576cca,_0x439234){return db[_0xaa22('0x38')][_0xaa22('0x5c')]({'where':{'id':_0x2d452c['params']['id']}})['then'](handleEntityNotFound(_0x576cca,null))['then'](function(_0x466ea2){if(_0x466ea2){return _0x466ea2[_0xaa22('0xbf')](_0x2d452c['body'][_0xaa22('0xc0')],_['omit'](_0x2d452c[_0xaa22('0x71')],[_0xaa22('0xc0'),'id'])||{})[_0xaa22('0xc1')](function(){return db['Tag'][_0xaa22('0xbe')]({'attributes':['id','name',_0xaa22('0x48')],'where':{'id':_0x2d452c[_0xaa22('0x71')]['ids']}});})[_0xaa22('0x2a')](function(_0x574179){socket[_0xaa22('0xc2')](_0xaa22('0xc3'),{'id':Number(_0x2d452c['params']['id']),'tags':_0x574179||[]});return{'id':Number(_0x2d452c[_0xaa22('0xb2')]['id']),'tags':_0x574179||[]};});}})[_0xaa22('0x2a')](respondWithResult(_0x576cca,null))[_0xaa22('0x36')](handleError(_0x576cca,null));};exports['removeTags']=function(_0x476377,_0x42248e,_0x32ab70){return db['WhatsappInteraction'][_0xaa22('0x5c')]({'where':{'id':_0x476377['params']['id']}})[_0xaa22('0x2a')](handleEntityNotFound(_0x42248e,null))[_0xaa22('0x2a')](function(_0x28835d){if(_0x28835d){return _0x28835d[_0xaa22('0xc4')](_0x476377[_0xaa22('0x3e')][_0xaa22('0xc0')]);}})['then'](respondWithStatusCode(_0x42248e,null))[_0xaa22('0x36')](handleError(_0x42248e,null));};exports['download']=function(_0x210eea,_0x8477d){var _0x8bb1d5=moment()[_0xaa22('0xc5')]()['toString']();var _0x59f46a=path[_0xaa22('0xc6')](config[_0xaa22('0xc7')],_0xaa22('0xc8'),_0xaa22('0xc9'),'tmp');var _0xe94be2=path[_0xaa22('0xc6')](config['root'],_0xaa22('0xc8'),_0xaa22('0xc9'),'attachments');var _0x4a9244=path['join'](_0x59f46a,_0x8bb1d5);var _0x4c5997=util['format'](_0xaa22('0xca'),_0x210eea[_0xaa22('0xb2')]['id'],_0x8bb1d5);var _0x3175c8=path[_0xaa22('0xc6')](_0x59f46a,_0x4c5997);var _0xbcefca=[];_0xbcefca['push']({'model':db[_0xaa22('0x6d')],'as':'User','attributes':['id','fullname'],'raw':!![]});_0xbcefca[_0xaa22('0x35')]({'model':db['CmContact'],'as':_0xaa22('0x62'),'attributes':['id','firstName','lastName'],'raw':!![]});if(_0x210eea[_0xaa22('0x3e')][_0xaa22('0xcb')]){_0xbcefca['push']({'model':db[_0xaa22('0xcc')],'as':_0xaa22('0xcc'),'raw':!![]});}var _0x371876=[{'model':db[_0xaa22('0xb8')],'as':_0xaa22('0xcd'),'attributes':['id',_0xaa22('0x71'),'createdAt',_0xaa22('0xce'),_0xaa22('0xcf'),_0xaa22('0x7e')],'include':_0xbcefca}];_0x371876[_0xaa22('0x35')]({'model':db[_0xaa22('0xd0')],'as':_0xaa22('0xd1'),'attributes':['id',_0xaa22('0x2e')]});_0x371876[_0xaa22('0x35')]({'model':db[_0xaa22('0x6d')],'as':'Owner','attributes':['id','fullname']});return db[_0xaa22('0x38')]['find']({'where':{'id':_0x210eea['params']['id']},'include':_0x371876})[_0xaa22('0x2a')](handleEntityNotFound(_0x8477d,null))['then'](function(_0x56e382){if(_0x56e382){var _0x39208c=_0x56e382['get']({'plain':!![]});fs[_0xaa22('0xd2')](_0x4a9244);var _0xf7dd23={'channel':_0xaa22('0xd3'),'account':_0x39208c[_0xaa22('0xd1')]['name'],'agent':_0x39208c['Owner']?_0x39208c['Owner'][_0xaa22('0x31')]:_0xaa22('0xd4'),'createdAt':moment(_0x39208c[_0xaa22('0x77')])[_0xaa22('0xbd')](_0xaa22('0xd5'))[_0xaa22('0x93')](),'closedAt':_0x39208c[_0xaa22('0xd6')]?moment(_0x39208c[_0xaa22('0xd7')])[_0xaa22('0xbd')](_0xaa22('0xd5'))['toString']():'','disposition':_0x39208c['disposition'],'messages':_(_0x39208c[_0xaa22('0xcd')])[_0xaa22('0x81')]({'secret':![]})[_0xaa22('0x30')](function(_0x5e5e05){if(_0x5e5e05[_0xaa22('0xcc')]){var _0x260407=path[_0xaa22('0xc6')](_0xe94be2,_0x5e5e05[_0xaa22('0xcc')][_0xaa22('0xd8')]);if(fs[_0xaa22('0xd9')](_0x260407)){fs['createReadStream'](_0x260407)[_0xaa22('0xda')](fs[_0xaa22('0xdb')](path['join'](_0x4a9244,_0x5e5e05[_0xaa22('0xcc')][_0xaa22('0xd8')])));}}return{'date':moment(_0x5e5e05[_0xaa22('0x77')])['format'](_0xaa22('0xd5'))[_0xaa22('0x93')](),'sender':_0x5e5e05[_0xaa22('0xce')]===_0xaa22('0xdc')?_0x5e5e05['User']?_0x5e5e05[_0xaa22('0x6d')][_0xaa22('0x31')]:_0xaa22('0xdd'):_0x5e5e05['Contact'][_0xaa22('0xde')]+(_0x5e5e05[_0xaa22('0x62')][_0xaa22('0xdf')]?'\x20'+_0x5e5e05[_0xaa22('0x62')]['lastName']:''),'body':_0x5e5e05[_0xaa22('0xcc')]?_0x5e5e05['Attachment'][_0xaa22('0xd8')]:_0x5e5e05[_0xaa22('0x71')],'direction':_0x5e5e05[_0xaa22('0xce')]===_0xaa22('0xdc')?'A':'C','secret':_0x5e5e05[_0xaa22('0xcf')],'read':_0x5e5e05[_0xaa22('0x7e')],'attachment':_0x5e5e05[_0xaa22('0xcc')]};})[_0xaa22('0x5e')]()};return ejs[_0xaa22('0xe0')](path['join'](config[_0xaa22('0xc7')],_0xaa22('0xc8'),_0xaa22('0xe1'),_0xaa22('0xe2')),{'interaction':_0xf7dd23})[_0xaa22('0x2a')](function(_0x21efdc){var _0x16609c=path['join'](_0x4a9244,_0xaa22('0xe3')+_0x39208c['id']+'-'+_0x8bb1d5+_0xaa22('0xe4'));var _0x53a2a9={'path':_0x16609c,'channel':_0xaa22('0xd3'),'interactionId':_0x39208c['id']};return pdf[_0xaa22('0xe5')](_0x21efdc,_0x53a2a9);})[_0xaa22('0x2a')](function(){return new BPromise(function(_0x44aec8,_0x4b0ee3){zipdir(_0x4a9244,{'saveTo':_0x3175c8},function(_0x2b8544,_0x40e7d2){if(_0x2b8544)return _0x4b0ee3(_0x2b8544);return _0x44aec8(_0x40e7d2);});})[_0xaa22('0x2a')](function(){return new BPromise(function(_0x5bc9bd,_0x5382d6){rimraf(_0x4a9244,function(_0x55fbca){if(_0x55fbca)_0x5382d6(_0x55fbca);return _0x5bc9bd();});});})['then'](function(){return _0x8477d[_0xaa22('0xe6')](_0x3175c8,_0x4c5997,function(_0x2c3b70){if(_0x2c3b70){console[_0xaa22('0xe7')]('err',_0x2c3b70);}else{fs[_0xaa22('0xe8')](_0x3175c8);}});});});}else{return _0x8477d[_0xaa22('0x1e')](0xc8);}})['catch'](handleError(_0x8477d,null));}; \ No newline at end of file +var _0xd4c5=['basename','existsSync','pipe','createWriteStream','out','System','renderFile','views','downloadInteraction.ejs','Whatsapp','createPdfFromHTML','log','err','unlinkSync','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/export/pdf','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','socket.io-emitter','./whatsappInteraction.socket','register','sendStatus','status','json','offset','undefined','limit','count','set','reject','save','then','end','error','stack','name','send','Users','map','fullname','TagIds','split','forEach','Tags','push','catch','index','WhatsappInteraction','rawAttributes','type','key','keys','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','pick','select','field','color','from','tools_tags','u.fullname','user_has_whatsapp_interactions','left_join','users','u.id\x20=\x20ui.UserId','cm_contacts','o.id\x20=\x20i.UserId','whatsapp_interaction_has_tags','t.id\x20=\x20it.TagId','expr','parseSearch','search','sqlOperator','conditions','find','unreadMessages','value','having','`\x20=\x200','operator','MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','getFullTextValue','c.firstName\x20LIKE\x20?\x20OR\x20c.lastName\x20LIKE\x20?\x20OR\x20c.email\x20LIKE\x20?','ContactId','buildExpression','text','Tag','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','union','User','CONCAT_WS(\x27\x20\x27,\x20o.name,\x20o.fullname)\x20LIKE\x20?','UserId','some','WhatsappAccountId','where','concat','createdAt','$gte','parse','$lte','i.createdAt\x20BETWEEN\x20?\x20AND\x20?','null','\x20=\x20?','read','`unreadMessages`\x20=\x200','`unreadMessages`\x20>\x200','tag','isArray','filter','replace','isNumeric','i.id\x20LIKE\x20?','i.phone\x20LIKE\x20?','group','i.id','Sequelize','SELECT','clone','SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)','DESC','t.id\x20IN\x20?','i.WhatsappAccountId\x20IS\x20NOT\x20NULL','user','role','i.WhatsappAccountId\x20IS\x20NULL','i.WhatsappAccountId\x20IN\x20?','agent','sequelize','toString','keyBy','merge','a.key','Account.key','a.mandatoryDisposition','Account.mandatoryDisposition','CASE\x20WHEN\x20(c.firstName\x20IS\x20NOT\x20NULL\x20AND\x20c.firstName\x20<>\x20\x27\x27)\x20OR\x20(c.lastName\x20IS\x20NOT\x20NULL\x20AND\x20c.lastName\x20<>\x20\x27\x27)\x20THEN\x20CONCAT(IFNULL(c.firstName,\x20\x27\x27),\x20\x27\x20\x27,\x20IFNULL(c.lastName,\x20\x27\x27))\x20ELSE\x20\x27Unknown\x27\x20END','c.firstName','Contact.firstName','c.lastName','Contact.lastName','Contact.email','c.phone','Contact.phone','c.mobile','Contact.mobile','c.fax','o.fullname','Owner.internal','GROUP_CONCAT(DISTINCT\x20t.id)','WhatsappInteractionId','params','includeAll','options','create','body','update','destroy','describe','addMessage','WhatsappMessage','ids','omit','findOne','sort','format','YYYY-MM-DD\x20HH:mm:ss','include','addTags','setTags','spread','emit','removeTags','download','unix','root','files','join','server','attachments','Contact','firstName','lastName','Attachment','direction','secret','Owner','mkdirSync','Account','N.A.','closedAt','disposition','Messages'];(function(_0x23e8e8,_0x5dc63b){var _0x34ccce=function(_0x5ef97b){while(--_0x5ef97b){_0x23e8e8['push'](_0x23e8e8['shift']());}};_0x34ccce(++_0x5dc63b);}(_0xd4c5,0x1d2));var _0x5d4c=function(_0x46f520,_0x1aae73){_0x46f520=_0x46f520-0x0;var _0x1913f5=_0xd4c5[_0x46f520];return _0x1913f5;};'use strict';var emlformat=require(_0x5d4c('0x0'));var rimraf=require(_0x5d4c('0x1'));var zipdir=require(_0x5d4c('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x5d4c('0x3'));var moment=require(_0x5d4c('0x4'));var BPromise=require(_0x5d4c('0x5'));var Mustache=require(_0x5d4c('0x6'));var util=require(_0x5d4c('0x7'));var path=require(_0x5d4c('0x8'));var sox=require('sox');var csv=require(_0x5d4c('0x9'));var ejs=require(_0x5d4c('0xa'));var fs=require('fs');var fs_extra=require(_0x5d4c('0xb'));var _=require(_0x5d4c('0xc'));var squel=require(_0x5d4c('0xd'));var crypto=require(_0x5d4c('0xe'));var jsforce=require(_0x5d4c('0xf'));var deskjs=require(_0x5d4c('0x10'));var toCsv=require(_0x5d4c('0x9'));var querystring=require(_0x5d4c('0x11'));var Papa=require(_0x5d4c('0x12'));var Redis=require(_0x5d4c('0x13'));var authService=require(_0x5d4c('0x14'));var qs=require(_0x5d4c('0x15'));var as=require('../../components/parsers/advancedSearch');var pdf=require(_0x5d4c('0x16'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x5d4c('0x17'))(_0x5d4c('0x18'));var utils=require(_0x5d4c('0x19'));var config=require(_0x5d4c('0x1a'));var licenseUtil=require('../../config/license/util');var db=require(_0x5d4c('0x1b'))['db'];config[_0x5d4c('0x1c')]=_[_0x5d4c('0x1d')](config[_0x5d4c('0x1c')],{'host':'localhost','port':0x18eb});var socket=require(_0x5d4c('0x1e'))(new Redis(config[_0x5d4c('0x1c')]));require(_0x5d4c('0x1f'))[_0x5d4c('0x20')](socket);function respondWithStatusCode(_0x3d0ecb,_0x182c6f){_0x182c6f=_0x182c6f||0xcc;return function(_0x2fdcea){if(_0x2fdcea){return _0x3d0ecb[_0x5d4c('0x21')](_0x182c6f);}return _0x3d0ecb[_0x5d4c('0x22')](_0x182c6f)['end']();};}function respondWithResult(_0x33c607,_0x6914a2){_0x6914a2=_0x6914a2||0xc8;return function(_0x26e94d){if(_0x26e94d){return _0x33c607[_0x5d4c('0x22')](_0x6914a2)[_0x5d4c('0x23')](_0x26e94d);}};}function respondWithFilteredResult(_0x55cfc1,_0x41b18f){return function(_0x35d88d){if(_0x35d88d){var _0xd23f11=typeof _0x41b18f[_0x5d4c('0x24')]===_0x5d4c('0x25')&&typeof _0x41b18f[_0x5d4c('0x26')]===_0x5d4c('0x25');var _0x515e0d=_0x35d88d['count'];var _0x3db3a9=_0xd23f11?0x0:_0x41b18f[_0x5d4c('0x24')];var _0x10523b=_0xd23f11?_0x35d88d[_0x5d4c('0x27')]:_0x41b18f[_0x5d4c('0x24')]+_0x41b18f[_0x5d4c('0x26')];var _0x279017;if(_0x10523b>=_0x515e0d){_0x10523b=_0x515e0d;_0x279017=0xc8;}else{_0x279017=0xce;}_0x55cfc1[_0x5d4c('0x22')](_0x279017);return _0x55cfc1[_0x5d4c('0x28')]('Content-Range',_0x3db3a9+'-'+_0x10523b+'/'+_0x515e0d)['json'](_0x35d88d);}return null;};}function patchUpdates(_0x512b2b){return function(_0x1e9004){try{jsonpatch['apply'](_0x1e9004,_0x512b2b,!![]);}catch(_0xe9297a){return BPromise[_0x5d4c('0x29')](_0xe9297a);}return _0x1e9004[_0x5d4c('0x2a')]();};}function saveUpdates(_0x730192,_0x4fe8e2){return function(_0x291865){if(_0x291865){return _0x291865['update'](_0x730192)[_0x5d4c('0x2b')](function(_0x1d3707){return _0x1d3707;});}return null;};}function removeEntity(_0x1eaa65,_0x5dae3d){return function(_0x14ed18){if(_0x14ed18){return _0x14ed18['destroy']()[_0x5d4c('0x2b')](function(){_0x1eaa65['status'](0xcc)[_0x5d4c('0x2c')]();});}};}function handleEntityNotFound(_0x244348,_0x3271c9){return function(_0x34dbbd){if(!_0x34dbbd){_0x244348['sendStatus'](0x194);}return _0x34dbbd;};}function handleError(_0x946c49,_0x535d33){_0x535d33=_0x535d33||0x1f4;return function(_0x5a86e3){logger[_0x5d4c('0x2d')](_0x5a86e3[_0x5d4c('0x2e')]);if(_0x5a86e3[_0x5d4c('0x2f')]){delete _0x5a86e3[_0x5d4c('0x2f')];}_0x946c49[_0x5d4c('0x22')](_0x535d33)[_0x5d4c('0x30')](_0x5a86e3);};}function getInteractionUsers(_0x5458ae,_0x4e9533){return new BPromise(function(_0x4e15d3,_0x33a3d0){try{if(_0x4e9533[_0x5458ae['id']]){_0x5458ae[_0x5d4c('0x31')]=_[_0x5d4c('0x32')](_0x4e9533[_0x5458ae['id']],function(_0x57e053){return{'id':_0x57e053['id'],'fullname':_0x57e053[_0x5d4c('0x33')]};});}}catch(_0x255cee){_0x33a3d0(_0x255cee);}_0x4e15d3(_0x5458ae);});}function getInteractionTags(_0x23c097,_0x11db54){return new BPromise(function(_0x5c6276,_0x616381){try{if(_0x23c097[_0x5d4c('0x34')]){_0x23c097['Tags']=[];_0x23c097['TagIds'][_0x5d4c('0x35')](',')[_0x5d4c('0x36')](function(_0x492b7d){_0x23c097[_0x5d4c('0x37')][_0x5d4c('0x38')](_0x11db54[_0x492b7d]);});}delete _0x23c097[_0x5d4c('0x34')];}catch(_0x5c0ad7){_0x616381(_0x5c0ad7);}_0x5c6276(_0x23c097);});}function updateWhatsappInteraction(_0x4eea79,_0xf6d924,_0x3544d8){return new BPromise(function(_0xedbb9f,_0x4d3178){return getInteractionUsers(_0x4eea79,_0x3544d8)[_0x5d4c('0x2b')](function(_0x3ec20a){return getInteractionTags(_0x3ec20a,_0xf6d924);})['then'](function(_0x81231a){_0xedbb9f(_0x81231a);})[_0x5d4c('0x39')](function(_0x2145b8){_0x4d3178(_0x2145b8);});});}exports[_0x5d4c('0x3a')]=function(_0x52a39b,_0x58b0b5){var _0x19f890={},_0x21d3b1={},_0x5b86f7={'count':0x0,'rows':[]};var _0x4d8e59=_[_0x5d4c('0x32')](db[_0x5d4c('0x3b')][_0x5d4c('0x3c')],function(_0x57770f){return{'name':_0x57770f['fieldName'],'type':_0x57770f[_0x5d4c('0x3d')][_0x5d4c('0x3e')]};});_0x21d3b1['model']=_['map'](_0x4d8e59,_0x5d4c('0x2f'));_0x21d3b1['query']=_[_0x5d4c('0x3f')](_0x52a39b[_0x5d4c('0x40')]);_0x21d3b1[_0x5d4c('0x41')]=_[_0x5d4c('0x42')](_0x21d3b1[_0x5d4c('0x43')],_0x21d3b1[_0x5d4c('0x40')]);_0x19f890[_0x5d4c('0x44')]=_['intersection'](_0x21d3b1[_0x5d4c('0x43')],qs[_0x5d4c('0x45')](_0x52a39b[_0x5d4c('0x40')]['fields']));_0x19f890[_0x5d4c('0x44')]=_0x19f890[_0x5d4c('0x44')][_0x5d4c('0x46')]?_0x19f890['attributes']:_0x21d3b1[_0x5d4c('0x43')];if(!_0x52a39b[_0x5d4c('0x40')][_0x5d4c('0x47')](_0x5d4c('0x48'))){_0x19f890[_0x5d4c('0x26')]=qs[_0x5d4c('0x26')](_0x52a39b[_0x5d4c('0x40')]['limit']);_0x19f890[_0x5d4c('0x24')]=qs[_0x5d4c('0x24')](_0x52a39b[_0x5d4c('0x40')][_0x5d4c('0x24')]);}_0x19f890[_0x5d4c('0x49')]=qs['sort'](_0x52a39b[_0x5d4c('0x40')]['sort']);_0x19f890['where']=qs[_0x5d4c('0x41')](_[_0x5d4c('0x4a')](_0x52a39b['query'],_0x21d3b1[_0x5d4c('0x41')]),_0x4d8e59);var _0x4ed4a9=[];var _0x1ddc02=squel[_0x5d4c('0x4b')]()['field']('id')[_0x5d4c('0x4c')](_0x5d4c('0x2f'))[_0x5d4c('0x4c')](_0x5d4c('0x4d'))[_0x5d4c('0x4e')](_0x5d4c('0x4f'));var _0x3f5871=squel[_0x5d4c('0x4b')]()[_0x5d4c('0x4c')]('u.id')[_0x5d4c('0x4c')](_0x5d4c('0x50'))['field']('ui.WhatsappInteractionId')[_0x5d4c('0x4e')](_0x5d4c('0x51'),'ui')[_0x5d4c('0x52')](_0x5d4c('0x53'),'u',_0x5d4c('0x54'));var _0xb935d0=squel[_0x5d4c('0x4b')]()[_0x5d4c('0x4e')]('whatsapp_interactions','i')[_0x5d4c('0x52')](_0x5d4c('0x55'),'c','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL')[_0x5d4c('0x52')](_0x5d4c('0x53'),'o',_0x5d4c('0x56'))['left_join']('whatsapp_accounts','a','a.id\x20=\x20i.WhatsappAccountId')[_0x5d4c('0x52')]('whatsapp_messages','me','me.WhatsappInteractionId\x20=\x20i.id')[_0x5d4c('0x52')](_0x5d4c('0x57'),'it','it.WhatsappInteractionId\x20=\x20i.id')[_0x5d4c('0x52')](_0x5d4c('0x4f'),'t',_0x5d4c('0x58'));var _0x2b9093=squel['expr']();var _0x37adb4=[];var _0x4d2abe=squel[_0x5d4c('0x59')]();var _0x2fbb73;if(_0x52a39b[_0x5d4c('0x40')]['search']){_0x2fbb73=as[_0x5d4c('0x5a')](_0x52a39b[_0x5d4c('0x40')][_0x5d4c('0x5b')]);var _0x1d5cc0=_0x2fbb73[_0x5d4c('0x5c')];for(var _0xf489bd=0x0;_0xf489bd<_0x2fbb73[_0x5d4c('0x5d')]['length'];_0xf489bd++){var _0x657726=_0x2fbb73[_0x5d4c('0x5d')][_0xf489bd];var _0x36b975='i';var _0x4d3494=_[_0x5d4c('0x5e')](_0x4d8e59,[_0x5d4c('0x2f'),_0x657726[_0x5d4c('0x4c')]]);if(!_0x4d3494){switch(_0x657726[_0x5d4c('0x4c')]){case _0x5d4c('0x5f'):if(_0x657726[_0x5d4c('0x60')]==0x1){_0xb935d0[_0x5d4c('0x61')]('`'+_0x657726['field']+_0x5d4c('0x62'));}else{_0xb935d0[_0x5d4c('0x61')]('`'+_0x657726[_0x5d4c('0x4c')]+'`\x20>\x200');}break;case'Contact':if(_0x657726[_0x5d4c('0x63')]==='$substring'){if(_0x657726[_0x5d4c('0x60')]['split']('\x20')[_0x5d4c('0x46')]>0x1){_0x2b9093[_0x1d5cc0](_0x5d4c('0x64'),qs[_0x5d4c('0x65')](_0x657726['value']),null);}else{var _0x1fb68e='%'+_0x657726['value']+'%';_0x2b9093[_0x1d5cc0](_0x5d4c('0x66'),_0x1fb68e,_0x1fb68e,_0x1fb68e);}}else{_0x4d3494=_['find'](_0x4d8e59,['name',_0x5d4c('0x67')]);_0x657726['field']=_0x5d4c('0x67');_0x162e6e=as[_0x5d4c('0x68')](_0x36b975,_0x4d3494[_0x5d4c('0x3d')],_0x657726);_0x2b9093[_0x1d5cc0](_0x162e6e[_0x5d4c('0x69')],_0x162e6e[_0x5d4c('0x60')]['start'],_0x162e6e['value'][_0x5d4c('0x2c')]);}break;case _0x5d4c('0x6a'):var _0x47d62c=_0x657726[_0x5d4c('0x60')][_0x5d4c('0x35')](',')['map'](function(_0x3377c9){return Number(_0x3377c9);});_0x47d62c['forEach'](function(_0x3635e8){_0x4d2abe['or'](_0x5d4c('0x6b'),'%,'+_0x3635e8+',%');});_0x37adb4=_[_0x5d4c('0x6c')](_0x37adb4,_0x47d62c);break;case _0x5d4c('0x6d'):if(_0x657726[_0x5d4c('0x63')]==='$substring'){_0x2b9093[_0x1d5cc0](_0x5d4c('0x6e'),'%'+_0x657726[_0x5d4c('0x60')]+'%',null);}else{_0x4d3494=_['find'](_0x4d8e59,[_0x5d4c('0x2f'),_0x5d4c('0x6f')]);_0x657726['field']=_0x5d4c('0x6f');_0x162e6e=as['buildExpression'](_0x36b975,_0x4d3494[_0x5d4c('0x3d')],_0x657726);_0x2b9093[_0x1d5cc0](_0x162e6e[_0x5d4c('0x69')],_0x162e6e['value']['start'],_0x162e6e['value'][_0x5d4c('0x2c')]);}break;case'body':_0x162e6e=as[_0x5d4c('0x68')]('me',null,_0x657726);_0x2b9093[_0x1d5cc0](_0x162e6e[_0x5d4c('0x69')],_0x162e6e[_0x5d4c('0x60')]['start'],_0x162e6e[_0x5d4c('0x60')][_0x5d4c('0x2c')]);break;}}else{var _0x162e6e=as[_0x5d4c('0x68')](_0x36b975,_0x4d3494[_0x5d4c('0x3d')],_0x657726);_0x2b9093[_0x1d5cc0](_0x162e6e['text'],_0x162e6e['value']['start'],_0x162e6e[_0x5d4c('0x60')]['end']);}}}else{var _0xb65182=_(_0x52a39b[_0x5d4c('0x40')])[_0x5d4c('0x3f')]()['map'](function(_0x5f5d98){return _[_0x5d4c('0x70')](_0x4d8e59,[_0x5d4c('0x2f'),_0x5f5d98])?_0x5f5d98:undefined;})['compact']()[_0x5d4c('0x60')]();if(!_['isEmpty'](_0xb65182)){_0xb65182[_0x5d4c('0x36')](function(_0x48598e){if(_0x48598e===_0x5d4c('0x71')){_0xb935d0[_0x5d4c('0x72')]('i.WhatsappAccountId\x20IN\x20?',[][_0x5d4c('0x73')](_0x52a39b[_0x5d4c('0x40')][_0x48598e]));}else if(_0x48598e===_0x5d4c('0x74')){var _0x198da0=JSON['parse'](_0x52a39b['query'][_0x48598e])[_0x5d4c('0x75')];var _0x277b24=JSON[_0x5d4c('0x76')](_0x52a39b[_0x5d4c('0x40')][_0x48598e])[_0x5d4c('0x77')];_0xb935d0[_0x5d4c('0x72')](_0x5d4c('0x78'),_0x198da0,_0x277b24);}else{if(_0x52a39b[_0x5d4c('0x40')][_0x48598e]===_0x5d4c('0x79')){_0xb935d0[_0x5d4c('0x72')]('i.'+_0x48598e+'\x20IS\x20NULL');}else{_0xb935d0['where']('i.'+_0x48598e+_0x5d4c('0x7a'),_0x52a39b['query'][_0x48598e]);}}});}if(_0x52a39b['query'][_0x5d4c('0x7b')]){if(_0x52a39b[_0x5d4c('0x40')][_0x5d4c('0x7b')]==0x1){_0xb935d0[_0x5d4c('0x61')](_0x5d4c('0x7c'));}else{_0xb935d0[_0x5d4c('0x61')](_0x5d4c('0x7d'));}}if(_0x52a39b[_0x5d4c('0x40')][_0x5d4c('0x7e')]){_0x37adb4=_[_0x5d4c('0x7f')](_0x52a39b['query'][_0x5d4c('0x7e')])?_0x52a39b['query'][_0x5d4c('0x7e')]:new Array(_0x52a39b[_0x5d4c('0x40')][_0x5d4c('0x7e')]);_0x37adb4[_0x5d4c('0x36')](function(_0x23acc0){_0x4d2abe['or'](_0x5d4c('0x6b'),'%,'+_0x23acc0+',%');});}if(_0x52a39b[_0x5d4c('0x40')][_0x5d4c('0x80')]){var _0x4c4369=_0x52a39b[_0x5d4c('0x40')][_0x5d4c('0x80')]['replace']('\x5c','\x5c\x5c')[_0x5d4c('0x81')](/'/g,'\x27\x27');if(qs[_0x5d4c('0x82')](_0x4c4369)){_0x2b9093['or'](_0x5d4c('0x83'),_0x4c4369+'%')['or'](_0x5d4c('0x84'),_0x4c4369+'%');}else{_0x2b9093['or']('MATCH\x20(me.body)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)',qs[_0x5d4c('0x65')](_0x4c4369))['or']('CONCAT(c.firstName,\x20\x27\x20\x27,\x20c.lastName)\x20LIKE\x20?',_0x4c4369+'%');}}}_0xb935d0[_0x5d4c('0x72')](_0x2b9093);_0xb935d0[_0x5d4c('0x85')](_0x5d4c('0x86'));var _0x5d60c8={'type':db[_0x5d4c('0x87')]['QueryTypes'][_0x5d4c('0x88')],'raw':!![]};var _0xace4ce=_0xb935d0[_0x5d4c('0x89')]();_0xace4ce['field'](_0x5d4c('0x86'));_0xace4ce['field'](_0x5d4c('0x8a'),_0x5d4c('0x5f'));if(_0x19f890['order']){_0x19f890['order'][_0x5d4c('0x36')](function(_0x4fae2d){var _0x1d4c1d=_0x4fae2d[0x0]==='contactName'?_0x4fae2d[0x0]:'i.'+_0x4fae2d[0x0];_0xb935d0['order'](_0x1d4c1d,_0x4fae2d[0x1]===_0x5d4c('0x8b')?![]:!![]);});}if(!_['isEmpty'](_0x37adb4)){_0xb935d0['having'](_0x4d2abe);_0xace4ce[_0x5d4c('0x72')](_0x5d4c('0x8c'),_0x37adb4);}BPromise['resolve']()[_0x5d4c('0x2b')](function(){if(!_0x2fbb73){if(_0x52a39b[_0x5d4c('0x40')][_0x5d4c('0x71')])return;_0xace4ce['where'](_0x5d4c('0x8d'));_0xb935d0['where'](_0x5d4c('0x8d'));return;}if(_0x52a39b[_0x5d4c('0x8e')][_0x5d4c('0x8f')]!=='agent')return;return _0x52a39b[_0x5d4c('0x8e')]['getWhatsappAccounts']({'attributes':['id'],'raw':!![]})[_0x5d4c('0x2b')](function(_0xa02176){if(_['isEmpty'](_0xa02176)){_0xace4ce['where']('i.WhatsappAccountId\x20IS\x20NULL');_0xb935d0[_0x5d4c('0x72')](_0x5d4c('0x90'));}else{_0xace4ce['where'](_0x5d4c('0x91'),_[_0x5d4c('0x32')](_0xa02176,'id'));_0xb935d0[_0x5d4c('0x72')]('i.WhatsappAccountId\x20IN\x20?',_['map'](_0xa02176,'id'));}});})[_0x5d4c('0x2b')](function(){if(_0x52a39b[_0x5d4c('0x8e')][_0x5d4c('0x8f')]===_0x5d4c('0x92')&&!_0x2fbb73&&!_0x52a39b[_0x5d4c('0x40')][_0x5d4c('0x71')])return[];return db[_0x5d4c('0x93')]['query'](_0xace4ce['toString'](),_0x5d60c8);})[_0x5d4c('0x2b')](function(_0x54ed4d){_0x5b86f7[_0x5d4c('0x27')]=_0x54ed4d[_0x5d4c('0x46')];if(_0x5b86f7['count']===0x0)return[];return db[_0x5d4c('0x93')][_0x5d4c('0x40')](_0x1ddc02[_0x5d4c('0x94')](),_0x5d60c8)[_0x5d4c('0x2b')](function(_0xa28deb){_0x4ed4a9=_[_0x5d4c('0x95')](_0xa28deb,'id');_0x5d60c8=_[_0x5d4c('0x96')](_0x5d60c8,{'model':db[_0x5d4c('0x3b')],'mapToModel':!![],'raw':!![],'nest':!![]});if(_0x52a39b[_0x5d4c('0x40')][_0x5d4c('0x45')]){_0x19f890[_0x5d4c('0x44')][_0x5d4c('0x36')](function(_0x3bff30){_0xb935d0['field']('i.'+_0x3bff30);});}else{_0xb935d0[_0x5d4c('0x4c')]('SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)',_0x5d4c('0x5f'));_0xb935d0[_0x5d4c('0x4c')](_0x5d4c('0x97'),_0x5d4c('0x98'));_0xb935d0[_0x5d4c('0x4c')](_0x5d4c('0x99'),_0x5d4c('0x9a'));_0xb935d0['field'](_0x5d4c('0x9b'),'contactName');_0xb935d0[_0x5d4c('0x4c')]('i.*');_0xb935d0[_0x5d4c('0x4c')](_0x5d4c('0x9c'),_0x5d4c('0x9d'));_0xb935d0[_0x5d4c('0x4c')](_0x5d4c('0x9e'),_0x5d4c('0x9f'));_0xb935d0[_0x5d4c('0x4c')]('c.email',_0x5d4c('0xa0'));_0xb935d0[_0x5d4c('0x4c')](_0x5d4c('0xa1'),_0x5d4c('0xa2'));_0xb935d0[_0x5d4c('0x4c')](_0x5d4c('0xa3'),_0x5d4c('0xa4'));_0xb935d0[_0x5d4c('0x4c')](_0x5d4c('0xa5'),'Contact.fax');_0xb935d0[_0x5d4c('0x4c')](_0x5d4c('0xa6'),'Owner.fullname');_0xb935d0[_0x5d4c('0x4c')]('o.internal',_0x5d4c('0xa7'));_0xb935d0['field'](_0x5d4c('0xa8'),_0x5d4c('0x34'));}if(_0x19f890['limit'])_0xb935d0[_0x5d4c('0x26')](_0x19f890[_0x5d4c('0x26')]);if(_0x19f890[_0x5d4c('0x24')])_0xb935d0[_0x5d4c('0x24')](_0x19f890[_0x5d4c('0x24')]);return db['sequelize'][_0x5d4c('0x40')](_0xb935d0[_0x5d4c('0x94')](),_0x5d60c8);})['then'](function(_0x4e9d45){if(_0x4e9d45['length']>0x0)_0x3f5871[_0x5d4c('0x72')]('ui.WhatsappInteractionId\x20IN\x20?',_[_0x5d4c('0x32')](_0x4e9d45,'id'));return db[_0x5d4c('0x93')]['query'](_0x3f5871['toString'](),_0x5d60c8)[_0x5d4c('0x2b')](function(_0x3e4979){var _0x57a959=_['groupBy'](_0x3e4979,_0x5d4c('0xa9'));var _0x4bf8af=[];_0x4e9d45[_0x5d4c('0x36')](function(_0xe1bcee){_0x4bf8af[_0x5d4c('0x38')](updateWhatsappInteraction(_0xe1bcee,_0x4ed4a9,_0x57a959));});return BPromise['all'](_0x4bf8af);});});})[_0x5d4c('0x2b')](function(_0x3e00d1){_0x5b86f7['rows']=_0x3e00d1;return _0x5b86f7;})[_0x5d4c('0x2b')](respondWithFilteredResult(_0x58b0b5,_0x19f890))[_0x5d4c('0x39')](handleError(_0x58b0b5,null));};exports['show']=function(_0x2b8e67,_0x31321d){var _0x1c40e1={'raw':![],'where':{'id':_0x2b8e67[_0x5d4c('0xaa')]['id']}},_0x106bd1={};_0x106bd1[_0x5d4c('0x43')]=_[_0x5d4c('0x3f')](db[_0x5d4c('0x3b')]['rawAttributes']);_0x106bd1['query']=_[_0x5d4c('0x3f')](_0x2b8e67[_0x5d4c('0x40')]);_0x106bd1['filters']=_[_0x5d4c('0x42')](_0x106bd1[_0x5d4c('0x43')],_0x106bd1[_0x5d4c('0x40')]);_0x1c40e1[_0x5d4c('0x44')]=_[_0x5d4c('0x42')](_0x106bd1[_0x5d4c('0x43')],qs[_0x5d4c('0x45')](_0x2b8e67[_0x5d4c('0x40')][_0x5d4c('0x45')]));_0x1c40e1[_0x5d4c('0x44')]=_0x1c40e1[_0x5d4c('0x44')][_0x5d4c('0x46')]?_0x1c40e1['attributes']:_0x106bd1['model'];if(_0x2b8e67['query'][_0x5d4c('0xab')]){_0x1c40e1['include']=[{'all':!![]}];}_0x1c40e1=_[_0x5d4c('0x96')]({},_0x1c40e1,_0x2b8e67[_0x5d4c('0xac')]);return db['WhatsappInteraction']['find'](_0x1c40e1)['then'](handleEntityNotFound(_0x31321d,null))[_0x5d4c('0x2b')](respondWithResult(_0x31321d,null))[_0x5d4c('0x39')](handleError(_0x31321d,null));};exports[_0x5d4c('0xad')]=function(_0x396d4a,_0x26622b){return db[_0x5d4c('0x3b')][_0x5d4c('0xad')](_0x396d4a[_0x5d4c('0xae')],{})[_0x5d4c('0x2b')](respondWithResult(_0x26622b,0xc9))[_0x5d4c('0x39')](handleError(_0x26622b,null));};exports[_0x5d4c('0xaf')]=function(_0x1c1bb4,_0x36adee){if(_0x1c1bb4[_0x5d4c('0xae')]['id']){delete _0x1c1bb4[_0x5d4c('0xae')]['id'];}return db[_0x5d4c('0x3b')]['find']({'where':{'id':_0x1c1bb4[_0x5d4c('0xaa')]['id']}})[_0x5d4c('0x2b')](handleEntityNotFound(_0x36adee,null))[_0x5d4c('0x2b')](saveUpdates(_0x1c1bb4[_0x5d4c('0xae')],null))[_0x5d4c('0x2b')](respondWithResult(_0x36adee,null))[_0x5d4c('0x39')](handleError(_0x36adee,null));};exports[_0x5d4c('0xb0')]=function(_0x420c80,_0xf4e0ca){return db[_0x5d4c('0x3b')]['find']({'where':{'id':_0x420c80[_0x5d4c('0xaa')]['id']}})['then'](handleEntityNotFound(_0xf4e0ca,null))[_0x5d4c('0x2b')](removeEntity(_0xf4e0ca,null))['catch'](handleError(_0xf4e0ca,null));};exports[_0x5d4c('0xb1')]=function(_0xdbc1cb,_0x260564){return db[_0x5d4c('0x3b')][_0x5d4c('0xb1')]()[_0x5d4c('0x2b')](respondWithResult(_0x260564,null))[_0x5d4c('0x39')](handleError(_0x260564,null));};exports[_0x5d4c('0xb2')]=function(_0x16a266,_0x57a97d,_0x35143d){return db[_0x5d4c('0xb3')][_0x5d4c('0x5e')]({'where':{'id':_0x16a266[_0x5d4c('0xaa')]['id']}})[_0x5d4c('0x2b')](handleEntityNotFound(_0x57a97d,null))[_0x5d4c('0x2b')](function(_0x5340d0){if(_0x5340d0){return _0x5340d0[_0x5d4c('0xb2')](_0x16a266['body'][_0x5d4c('0xb4')],_[_0x5d4c('0xb5')](_0x16a266['body'],[_0x5d4c('0xb4'),'id'])||{});}})[_0x5d4c('0x2b')](respondWithResult(_0x57a97d,null))[_0x5d4c('0x39')](handleError(_0x57a97d,null));};exports['getMessages']=function(_0x5e3d6a,_0x35d905,_0x49be51){var _0x20cb73={'raw':![],'where':{}};var _0x370133={};var _0x2d1604={'count':0x0,'rows':[]};return db[_0x5d4c('0x3b')][_0x5d4c('0xb6')]({'where':{'id':_0x5e3d6a['params']['id']}})['then'](handleEntityNotFound(_0x35d905,null))[_0x5d4c('0x2b')](function(_0x38414f){if(_0x38414f){_0x370133[_0x5d4c('0x43')]=_['keys'](db[_0x5d4c('0xb3')][_0x5d4c('0x3c')]);_0x370133[_0x5d4c('0x40')]=_[_0x5d4c('0x3f')](_0x5e3d6a[_0x5d4c('0x40')]);_0x370133[_0x5d4c('0x41')]=_[_0x5d4c('0x42')](_0x370133['model'],_0x370133[_0x5d4c('0x40')]);_0x20cb73['attributes']=_['intersection'](_0x370133[_0x5d4c('0x43')],qs['fields'](_0x5e3d6a[_0x5d4c('0x40')][_0x5d4c('0x45')]));_0x20cb73[_0x5d4c('0x44')]=_0x20cb73[_0x5d4c('0x44')]['length']?_0x20cb73[_0x5d4c('0x44')]:_0x370133[_0x5d4c('0x43')];if(!_0x5e3d6a[_0x5d4c('0x40')]['hasOwnProperty'](_0x5d4c('0x48'))){_0x20cb73['limit']=qs[_0x5d4c('0x26')](_0x5e3d6a[_0x5d4c('0x40')]['limit']);_0x20cb73['offset']=qs['offset'](_0x5e3d6a[_0x5d4c('0x40')][_0x5d4c('0x24')]);}_0x20cb73[_0x5d4c('0x49')]=qs[_0x5d4c('0xb7')](_0x5e3d6a[_0x5d4c('0x40')][_0x5d4c('0xb7')]);_0x20cb73['where']=qs['filters'](_[_0x5d4c('0x4a')](_0x5e3d6a['query'],_0x370133[_0x5d4c('0x41')]));_0x20cb73[_0x5d4c('0x72')][_0x5d4c('0xa9')]=_0x38414f['id'];if(_0x5e3d6a['query'][_0x5d4c('0x80')]){_0x20cb73[_0x5d4c('0x72')]=_['merge'](_0x20cb73[_0x5d4c('0x72')],{'$or':_['map'](_0x20cb73['attributes'],function(_0x27a9ac){var _0x2c71cd={};_0x2c71cd[_0x27a9ac]={'$like':'%'+_0x5e3d6a['query']['filter']+'%'};return _0x2c71cd;})});}if(_0x5e3d6a[_0x5d4c('0x40')]['$gte']){var _0x7b1797=_0x5e3d6a[_0x5d4c('0x40')][_0x5d4c('0x75')][_0x5d4c('0x35')](',');var _0x1c0c2c={};_0x1c0c2c[_0x7b1797[0x0]]={'$gte':moment(_0x7b1797[0x1])[_0x5d4c('0xb8')](_0x5d4c('0xb9'))};_0x20cb73['where']=_['merge'](_0x20cb73[_0x5d4c('0x72')],_0x1c0c2c);}_0x20cb73=_[_0x5d4c('0x96')]({},_0x20cb73,_0x5e3d6a[_0x5d4c('0xac')]);return db['WhatsappMessage'][_0x5d4c('0x27')]({'where':_0x20cb73[_0x5d4c('0x72')]})[_0x5d4c('0x2b')](function(_0x2ecbd7){_0x2d1604['count']=_0x2ecbd7;if(_0x5e3d6a[_0x5d4c('0x40')][_0x5d4c('0xab')]){_0x20cb73[_0x5d4c('0xba')]=[{'all':!![]}];}return db['WhatsappMessage']['findAll'](_0x20cb73);})[_0x5d4c('0x2b')](function(_0x50d79f){_0x2d1604['rows']=_0x50d79f;return _0x2d1604;});}})[_0x5d4c('0x2b')](respondWithFilteredResult(_0x35d905,_0x20cb73))[_0x5d4c('0x39')](handleError(_0x35d905,null));};exports[_0x5d4c('0xbb')]=function(_0x4de306,_0x4a4446,_0x2469b2){return db[_0x5d4c('0x3b')][_0x5d4c('0x5e')]({'where':{'id':_0x4de306[_0x5d4c('0xaa')]['id']}})[_0x5d4c('0x2b')](handleEntityNotFound(_0x4a4446,null))[_0x5d4c('0x2b')](function(_0x1fb69a){if(_0x1fb69a){return _0x1fb69a[_0x5d4c('0xbc')](_0x4de306[_0x5d4c('0xae')][_0x5d4c('0xb4')],_[_0x5d4c('0xb5')](_0x4de306['body'],[_0x5d4c('0xb4'),'id'])||{})[_0x5d4c('0xbd')](function(){return db[_0x5d4c('0x6a')]['findAll']({'attributes':['id',_0x5d4c('0x2f'),_0x5d4c('0x4d')],'where':{'id':_0x4de306['body'][_0x5d4c('0xb4')]}});})[_0x5d4c('0x2b')](function(_0x1b1f95){socket[_0x5d4c('0xbe')]('whatsappInteractionTags:save',{'id':Number(_0x4de306[_0x5d4c('0xaa')]['id']),'tags':_0x1b1f95||[]});return{'id':Number(_0x4de306[_0x5d4c('0xaa')]['id']),'tags':_0x1b1f95||[]};});}})['then'](respondWithResult(_0x4a4446,null))[_0x5d4c('0x39')](handleError(_0x4a4446,null));};exports['removeTags']=function(_0xe86a5c,_0x820283,_0x20567c){return db[_0x5d4c('0x3b')][_0x5d4c('0x5e')]({'where':{'id':_0xe86a5c[_0x5d4c('0xaa')]['id']}})['then'](handleEntityNotFound(_0x820283,null))['then'](function(_0x253b28){if(_0x253b28){return _0x253b28[_0x5d4c('0xbf')](_0xe86a5c[_0x5d4c('0x40')][_0x5d4c('0xb4')]);}})['then'](respondWithStatusCode(_0x820283,null))[_0x5d4c('0x39')](handleError(_0x820283,null));};exports[_0x5d4c('0xc0')]=function(_0x542769,_0x435b8f){var _0x15354f=moment()[_0x5d4c('0xc1')]()[_0x5d4c('0x94')]();var _0x5cb157=path['join'](config[_0x5d4c('0xc2')],'server',_0x5d4c('0xc3'),'tmp');var _0x24a1de=path[_0x5d4c('0xc4')](config[_0x5d4c('0xc2')],_0x5d4c('0xc5'),_0x5d4c('0xc3'),_0x5d4c('0xc6'));var _0x84ff4a=path[_0x5d4c('0xc4')](_0x5cb157,_0x15354f);var _0x5bb643=util[_0x5d4c('0xb8')]('transcript-%d-%s.zip',_0x542769['params']['id'],_0x15354f);var _0x1cf36c=path[_0x5d4c('0xc4')](_0x5cb157,_0x5bb643);var _0x30a47c=[];_0x30a47c['push']({'model':db[_0x5d4c('0x6d')],'as':'User','attributes':['id',_0x5d4c('0x33')],'raw':!![]});_0x30a47c['push']({'model':db['CmContact'],'as':_0x5d4c('0xc7'),'attributes':['id',_0x5d4c('0xc8'),_0x5d4c('0xc9')],'raw':!![]});if(_0x542769[_0x5d4c('0x40')]['attachments']){_0x30a47c[_0x5d4c('0x38')]({'model':db[_0x5d4c('0xca')],'as':_0x5d4c('0xca'),'raw':!![]});}var _0x325cba=[{'model':db[_0x5d4c('0xb3')],'as':'Messages','attributes':['id','body',_0x5d4c('0x74'),_0x5d4c('0xcb'),_0x5d4c('0xcc'),_0x5d4c('0x7b')],'include':_0x30a47c}];_0x325cba['push']({'model':db['WhatsappAccount'],'as':'Account','attributes':['id','name']});_0x325cba[_0x5d4c('0x38')]({'model':db['User'],'as':_0x5d4c('0xcd'),'attributes':['id',_0x5d4c('0x33')]});return db[_0x5d4c('0x3b')][_0x5d4c('0x5e')]({'where':{'id':_0x542769[_0x5d4c('0xaa')]['id']},'include':_0x325cba})[_0x5d4c('0x2b')](handleEntityNotFound(_0x435b8f,null))[_0x5d4c('0x2b')](function(_0x1314ca){if(_0x1314ca){var _0x22002d=_0x1314ca['get']({'plain':!![]});fs[_0x5d4c('0xce')](_0x84ff4a);var _0x59d707={'channel':'Whatsapp','account':_0x22002d[_0x5d4c('0xcf')][_0x5d4c('0x2f')],'agent':_0x22002d[_0x5d4c('0xcd')]?_0x22002d[_0x5d4c('0xcd')]['fullname']:_0x5d4c('0xd0'),'createdAt':moment(_0x22002d['createdAt'])[_0x5d4c('0xb8')](_0x5d4c('0xb9'))[_0x5d4c('0x94')](),'closedAt':_0x22002d['closed']?moment(_0x22002d[_0x5d4c('0xd1')])[_0x5d4c('0xb8')](_0x5d4c('0xb9'))[_0x5d4c('0x94')]():'','disposition':_0x22002d[_0x5d4c('0xd2')],'messages':_(_0x22002d[_0x5d4c('0xd3')])[_0x5d4c('0x80')]({'secret':![]})[_0x5d4c('0x32')](function(_0x398e5e){if(_0x398e5e['Attachment']){var _0x55ae4a=path[_0x5d4c('0xc4')](_0x24a1de,_0x398e5e[_0x5d4c('0xca')][_0x5d4c('0xd4')]);if(fs[_0x5d4c('0xd5')](_0x55ae4a)){fs['createReadStream'](_0x55ae4a)[_0x5d4c('0xd6')](fs[_0x5d4c('0xd7')](path[_0x5d4c('0xc4')](_0x84ff4a,_0x398e5e[_0x5d4c('0xca')][_0x5d4c('0xd4')])));}}return{'date':moment(_0x398e5e[_0x5d4c('0x74')])[_0x5d4c('0xb8')]('YYYY-MM-DD\x20HH:mm:ss')['toString'](),'sender':_0x398e5e[_0x5d4c('0xcb')]===_0x5d4c('0xd8')?_0x398e5e['User']?_0x398e5e['User'][_0x5d4c('0x33')]:_0x5d4c('0xd9'):_0x398e5e[_0x5d4c('0xc7')][_0x5d4c('0xc8')]+(_0x398e5e[_0x5d4c('0xc7')][_0x5d4c('0xc9')]?'\x20'+_0x398e5e['Contact'][_0x5d4c('0xc9')]:''),'body':_0x398e5e[_0x5d4c('0xca')]?_0x398e5e[_0x5d4c('0xca')][_0x5d4c('0xd4')]:_0x398e5e[_0x5d4c('0xae')],'direction':_0x398e5e[_0x5d4c('0xcb')]==='out'?'A':'C','secret':_0x398e5e[_0x5d4c('0xcc')],'read':_0x398e5e[_0x5d4c('0x7b')],'attachment':_0x398e5e[_0x5d4c('0xca')]};})[_0x5d4c('0x60')]()};return ejs[_0x5d4c('0xda')](path[_0x5d4c('0xc4')](config[_0x5d4c('0xc2')],_0x5d4c('0xc5'),_0x5d4c('0xdb'),_0x5d4c('0xdc')),{'interaction':_0x59d707})[_0x5d4c('0x2b')](function(_0x17a3bf){var _0x561b2d=path[_0x5d4c('0xc4')](_0x84ff4a,'transcript-'+_0x22002d['id']+'-'+_0x15354f+'.pdf');var _0x47ac35={'path':_0x561b2d,'channel':_0x5d4c('0xdd'),'interactionId':_0x22002d['id']};return pdf[_0x5d4c('0xde')](_0x17a3bf,_0x47ac35);})[_0x5d4c('0x2b')](function(){return new BPromise(function(_0x18b35c,_0x1b2805){zipdir(_0x84ff4a,{'saveTo':_0x1cf36c},function(_0x42df5d,_0x22cc78){if(_0x42df5d)return _0x1b2805(_0x42df5d);return _0x18b35c(_0x22cc78);});})[_0x5d4c('0x2b')](function(){return new BPromise(function(_0x1797da,_0xcdaa56){rimraf(_0x84ff4a,function(_0x8d60e0){if(_0x8d60e0)_0xcdaa56(_0x8d60e0);return _0x1797da();});});})[_0x5d4c('0x2b')](function(){return _0x435b8f[_0x5d4c('0xc0')](_0x1cf36c,_0x5bb643,function(_0x9d7822){if(_0x9d7822){console[_0x5d4c('0xdf')](_0x5d4c('0xe0'),_0x9d7822);}else{fs[_0x5d4c('0xe1')](_0x1cf36c);}});});});}else{return _0x435b8f[_0x5d4c('0x21')](0xc8);}})[_0x5d4c('0x39')](handleError(_0x435b8f,null));}; \ No newline at end of file diff --git a/server/api/whatsappInteraction/whatsappInteraction.events.js b/server/api/whatsappInteraction/whatsappInteraction.events.js index c8ceacd..9751995 100644 --- a/server/api/whatsappInteraction/whatsappInteraction.events.js +++ b/server/api/whatsappInteraction/whatsappInteraction.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4746=['emit','hasOwnProperty','exports','events','../../mysqldb','setMaxListeners','save','update','remove','then','setDataValue','Users','map','unreadMessages','length'];(function(_0x30faec,_0x18940b){var _0x29484f=function(_0x169ae8){while(--_0x169ae8){_0x30faec['push'](_0x30faec['shift']());}};_0x29484f(++_0x18940b);}(_0x4746,0xc6));var _0x6474=function(_0x475741,_0x30bf38){_0x475741=_0x475741-0x0;var _0x4e34ec=_0x4746[_0x475741];return _0x4e34ec;};'use strict';var EventEmitter=require(_0x6474('0x0'));var WhatsappInteraction=require(_0x6474('0x1'))['db']['WhatsappInteraction'];var WhatsappMessage=require(_0x6474('0x1'))['db']['WhatsappMessage'];var WhatsappInteractionEvents=new EventEmitter();WhatsappInteractionEvents[_0x6474('0x2')](0x0);var events={'afterCreate':_0x6474('0x3'),'afterUpdate':_0x6474('0x4'),'afterDestroy':_0x6474('0x5')};function emitEvent(_0x1314f4){return function(_0x4dfa1e,_0x317100,_0x2bcf7c){_0x4dfa1e['getUsers']({'attributes':['id'],'raw':!![]})[_0x6474('0x6')](function(_0x427f79){_0x4dfa1e[_0x6474('0x7')](_0x6474('0x8'),_0x427f79[_0x6474('0x9')](function(_0x2d8a2b){return{'id':_0x2d8a2b['id']};}));return WhatsappMessage['findAll']({'where':{'WhatsappInteractionId':_0x4dfa1e['id'],'direction':'in','read':![]},'raw':!![]});})[_0x6474('0x6')](function(_0x5bbee1){_0x4dfa1e['setDataValue'](_0x6474('0xa'),_0x5bbee1[_0x6474('0xb')]);WhatsappInteractionEvents['emit'](_0x1314f4+':'+_0x4dfa1e['id'],_0x4dfa1e);WhatsappInteractionEvents[_0x6474('0xc')](_0x1314f4,_0x4dfa1e);_0x2bcf7c(null);})['catch'](_0x2bcf7c(null));};}for(var e in events){if(events[_0x6474('0xd')](e)){var event=events[e];WhatsappInteraction['hook'](e,emitEvent(event));}}module[_0x6474('0xe')]=WhatsappInteractionEvents; \ No newline at end of file +var _0x3140=['../../mysqldb','WhatsappInteraction','save','update','remove','getUsers','then','setDataValue','map','unreadMessages','length','emit','catch','hasOwnProperty','exports','events'];(function(_0x26bfee,_0x4bb52b){var _0x550794=function(_0x2a839a){while(--_0x2a839a){_0x26bfee['push'](_0x26bfee['shift']());}};_0x550794(++_0x4bb52b);}(_0x3140,0xaf));var _0x0314=function(_0x4359fa,_0x4d5f23){_0x4359fa=_0x4359fa-0x0;var _0x3df26d=_0x3140[_0x4359fa];return _0x3df26d;};'use strict';var EventEmitter=require(_0x0314('0x0'));var WhatsappInteraction=require(_0x0314('0x1'))['db'][_0x0314('0x2')];var WhatsappMessage=require(_0x0314('0x1'))['db']['WhatsappMessage'];var WhatsappInteractionEvents=new EventEmitter();WhatsappInteractionEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x0314('0x3'),'afterUpdate':_0x0314('0x4'),'afterDestroy':_0x0314('0x5')};function emitEvent(_0x3e4284){return function(_0x254566,_0x46c395,_0x9e308d){_0x254566[_0x0314('0x6')]({'attributes':['id'],'raw':!![]})[_0x0314('0x7')](function(_0x44762d){_0x254566[_0x0314('0x8')]('Users',_0x44762d[_0x0314('0x9')](function(_0x2d87d2){return{'id':_0x2d87d2['id']};}));return WhatsappMessage['findAll']({'where':{'WhatsappInteractionId':_0x254566['id'],'direction':'in','read':![]},'raw':!![]});})['then'](function(_0xf2561e){_0x254566['setDataValue'](_0x0314('0xa'),_0xf2561e[_0x0314('0xb')]);WhatsappInteractionEvents[_0x0314('0xc')](_0x3e4284+':'+_0x254566['id'],_0x254566);WhatsappInteractionEvents[_0x0314('0xc')](_0x3e4284,_0x254566);_0x9e308d(null);})[_0x0314('0xd')](_0x9e308d(null));};}for(var e in events){if(events[_0x0314('0xe')](e)){var event=events[e];WhatsappInteraction['hook'](e,emitEvent(event));}}module[_0x0314('0xf')]=WhatsappInteractionEvents; \ No newline at end of file diff --git a/server/api/whatsappInteraction/whatsappInteraction.model.js b/server/api/whatsappInteraction/whatsappInteraction.model.js index 7847eac..473dbbe 100644 --- a/server/api/whatsappInteraction/whatsappInteraction.model.js +++ b/server/api/whatsappInteraction/whatsappInteraction.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8590=['../../config/environment','exports','define','whatsapp_interactions','changed','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf'];(function(_0x5f0c76,_0x44b266){var _0x308606=function(_0x14bc96){while(--_0x14bc96){_0x5f0c76['push'](_0x5f0c76['shift']());}};_0x308606(++_0x44b266);}(_0x8590,0x105));var _0x0859=function(_0x5cae0f,_0x36a794){_0x5cae0f=_0x5cae0f-0x0;var _0x136a38=_0x8590[_0x5cae0f];return _0x136a38;};'use strict';var _=require(_0x0859('0x0'));var util=require(_0x0859('0x1'));var logger=require(_0x0859('0x2'))(_0x0859('0x3'));var moment=require(_0x0859('0x4'));var BPromise=require(_0x0859('0x5'));var rp=require(_0x0859('0x6'));var fs=require('fs');var path=require(_0x0859('0x7'));var rimraf=require(_0x0859('0x8'));var config=require(_0x0859('0x9'));var attributes=require('./whatsappInteraction.attributes');module[_0x0859('0xa')]=function(_0x584f5f,_0x4b1a09){return _0x584f5f[_0x0859('0xb')]('WhatsappInteraction',attributes,{'tableName':_0x0859('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x221f08,_0x516c13,_0x46c5a1){if(_0x221f08[_0x0859('0xd')](_0x0859('0xe'))){_0x221f08[_0x0859('0xf')]=moment()[_0x0859('0x10')](_0x0859('0x11'));}_0x46c5a1(null,_0x221f08);}}});}; \ No newline at end of file +var _0xf5f6=['exports','define','closedAt','api','moment','bluebird','path','rimraf','../../config/environment','./whatsappInteraction.attributes'];(function(_0x4164f2,_0x38669f){var _0x2575c7=function(_0x24dca1){while(--_0x24dca1){_0x4164f2['push'](_0x4164f2['shift']());}};_0x2575c7(++_0x38669f);}(_0xf5f6,0x143));var _0x6f5f=function(_0x56442c,_0x2df71a){_0x56442c=_0x56442c-0x0;var _0x35bc36=_0xf5f6[_0x56442c];return _0x35bc36;};'use strict';var _=require('lodash');var util=require('util');var logger=require('../../config/logger')(_0x6f5f('0x0'));var moment=require(_0x6f5f('0x1'));var BPromise=require(_0x6f5f('0x2'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x6f5f('0x3'));var rimraf=require(_0x6f5f('0x4'));var config=require(_0x6f5f('0x5'));var attributes=require(_0x6f5f('0x6'));module[_0x6f5f('0x7')]=function(_0x4aff40,_0x38e19d){return _0x4aff40[_0x6f5f('0x8')]('WhatsappInteraction',attributes,{'tableName':'whatsapp_interactions','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x62d9b2,_0x2e918d,_0x25acf1){if(_0x62d9b2['changed']('closed')){_0x62d9b2[_0x6f5f('0x9')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');}_0x25acf1(null,_0x62d9b2);}}});}; \ No newline at end of file diff --git a/server/api/whatsappInteraction/whatsappInteraction.rpc.js b/server/api/whatsappInteraction/whatsappInteraction.rpc.js index cc54646..07a891c 100644 --- a/server/api/whatsappInteraction/whatsappInteraction.rpc.js +++ b/server/api/whatsappInteraction/whatsappInteraction.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfe65=['rpc','../../config/environment','jayson/promise','client','redis','socket.io-emitter','./whatsappInteraction.socket','register','request','then','info','WhatsappInteraction,\x20%s,\x20%s','request\x20sent','debug','WhatsappInteraction,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','UpdateWhatsappInteraction','WhatsappInteraction','body','options','raw','where','stringify','AddTagsToWhatsappInteraction','omit','ids','spread','AddTags','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x46d0c9,_0x526bfa){var _0x174506=function(_0x654bc6){while(--_0x654bc6){_0x46d0c9['push'](_0x46d0c9['shift']());}};_0x174506(++_0x526bfa);}(_0xfe65,0xe8));var _0x5fe6=function(_0x3cd0cc,_0x390ae5){_0x3cd0cc=_0x3cd0cc-0x0;var _0x3ef472=_0xfe65[_0x3cd0cc];return _0x3ef472;};'use strict';var _=require(_0x5fe6('0x0'));var util=require(_0x5fe6('0x1'));var moment=require('moment');var BPromise=require(_0x5fe6('0x2'));var rs=require(_0x5fe6('0x3'));var fs=require('fs');var Redis=require(_0x5fe6('0x4'));var db=require(_0x5fe6('0x5'))['db'];var utils=require(_0x5fe6('0x6'));var logger=require(_0x5fe6('0x7'))(_0x5fe6('0x8'));var config=require(_0x5fe6('0x9'));var jayson=require(_0x5fe6('0xa'));var client=jayson[_0x5fe6('0xb')]['http']({'port':0x232a});config[_0x5fe6('0xc')]=_['defaults'](config[_0x5fe6('0xc')],{'host':'localhost','port':0x18eb});var socket=require(_0x5fe6('0xd'))(new Redis(config[_0x5fe6('0xc')]));require(_0x5fe6('0xe'))[_0x5fe6('0xf')](socket);function respondWithRpcPromise(_0x341ade,_0x22d878,_0x4fde26){return new BPromise(function(_0x490328,_0x15d822){return client[_0x5fe6('0x10')](_0x341ade,_0x4fde26)[_0x5fe6('0x11')](function(_0x2d6e48){logger[_0x5fe6('0x12')](_0x5fe6('0x13'),_0x22d878,_0x5fe6('0x14'));logger[_0x5fe6('0x15')](_0x5fe6('0x16'),_0x22d878,_0x5fe6('0x14'),JSON['stringify'](_0x2d6e48));if(_0x2d6e48[_0x5fe6('0x17')]){if(_0x2d6e48[_0x5fe6('0x17')][_0x5fe6('0x18')]===0x1f4){logger[_0x5fe6('0x17')](_0x5fe6('0x13'),_0x22d878,_0x2d6e48[_0x5fe6('0x17')]['message']);return _0x15d822(_0x2d6e48[_0x5fe6('0x17')][_0x5fe6('0x19')]);}logger['error'](_0x5fe6('0x13'),_0x22d878,_0x2d6e48[_0x5fe6('0x17')]['message']);return _0x490328(_0x2d6e48['error'][_0x5fe6('0x19')]);}else{logger[_0x5fe6('0x12')](_0x5fe6('0x13'),_0x22d878,'request\x20sent');_0x490328(_0x2d6e48[_0x5fe6('0x1a')][_0x5fe6('0x19')]);}})[_0x5fe6('0x1b')](function(_0xcc91f5){logger[_0x5fe6('0x17')](_0x5fe6('0x13'),_0x22d878,_0xcc91f5);_0x15d822(_0xcc91f5);});});}exports[_0x5fe6('0x1c')]=function(_0x12d794){var _0x2ccb6f=this;return new Promise(function(_0x1387d5,_0x4cbda9){return db[_0x5fe6('0x1d')]['update'](_0x12d794[_0x5fe6('0x1e')],{'raw':_0x12d794[_0x5fe6('0x1f')]?_0x12d794[_0x5fe6('0x1f')][_0x5fe6('0x20')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x12d794[_0x5fe6('0x1f')]?_0x12d794[_0x5fe6('0x1f')][_0x5fe6('0x21')]||null:null,'attributes':_0x12d794[_0x5fe6('0x1f')]?_0x12d794[_0x5fe6('0x1f')]['attributes']||null:null,'limit':_0x12d794[_0x5fe6('0x1f')]?_0x12d794[_0x5fe6('0x1f')]['limit']||null:null})['then'](function(_0x56cbba){logger[_0x5fe6('0x12')](_0x5fe6('0x1c'),_0x12d794);logger['debug'](_0x5fe6('0x1c'),_0x12d794,JSON[_0x5fe6('0x22')](_0x56cbba));_0x1387d5(_0x56cbba);})['catch'](function(_0x37522e){logger[_0x5fe6('0x17')]('UpdateWhatsappInteraction',_0x37522e['message'],_0x12d794);_0x4cbda9(_0x2ccb6f[_0x5fe6('0x17')](0x1f4,_0x37522e[_0x5fe6('0x19')]));});});};exports[_0x5fe6('0x23')]=function(_0x40f43a){return new Promise(function(_0x479363,_0x216362){return db[_0x5fe6('0x1d')]['find']({'where':_0x40f43a[_0x5fe6('0x1f')]?_0x40f43a[_0x5fe6('0x1f')][_0x5fe6('0x21')]||null:null})[_0x5fe6('0x11')](function(_0xa8fbc3){if(_0xa8fbc3){return _0xa8fbc3['addTags'](_0x40f43a[_0x5fe6('0x1e')]['ids'],_[_0x5fe6('0x24')](_0x40f43a[_0x5fe6('0x1e')],[_0x5fe6('0x25'),'id'])||{});}})[_0x5fe6('0x26')](function(_0x30079e){logger[_0x5fe6('0x12')](_0x5fe6('0x27'),_0x40f43a);logger[_0x5fe6('0x15')]('AddTags',_0x40f43a,JSON['stringify'](_0x30079e));_0x479363(_0x30079e);})[_0x5fe6('0x1b')](function(_0xfe9a93){logger[_0x5fe6('0x17')]('AddTags',_0xfe9a93[_0x5fe6('0x19')],_0x40f43a);_0x216362(_this[_0x5fe6('0x17')](0x1f4,_0xfe9a93[_0x5fe6('0x19')]));});});}; \ No newline at end of file +var _0x9ff3=['ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','defaults','redis','localhost','./whatsappInteraction.socket','register','request','then','info','debug','WhatsappInteraction,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','code','error','WhatsappInteraction,\x20%s,\x20%s','message','result','catch','UpdateWhatsappInteraction','update','body','options','raw','where','attributes','limit','AddTagsToWhatsappInteraction','addTags','omit','ids','spread','AddTags','lodash','util','moment','randomstring'];(function(_0x121b1a,_0x42fdb7){var _0x2d89a6=function(_0x1b6027){while(--_0x1b6027){_0x121b1a['push'](_0x121b1a['shift']());}};_0x2d89a6(++_0x42fdb7);}(_0x9ff3,0x104));var _0x39ff=function(_0x31f2bb,_0x142f78){_0x31f2bb=_0x31f2bb-0x0;var _0x10f154=_0x9ff3[_0x31f2bb];return _0x10f154;};'use strict';var _=require(_0x39ff('0x0'));var util=require(_0x39ff('0x1'));var moment=require(_0x39ff('0x2'));var BPromise=require('bluebird');var rs=require(_0x39ff('0x3'));var fs=require('fs');var Redis=require(_0x39ff('0x4'));var db=require(_0x39ff('0x5'))['db'];var utils=require(_0x39ff('0x6'));var logger=require(_0x39ff('0x7'))(_0x39ff('0x8'));var config=require(_0x39ff('0x9'));var jayson=require(_0x39ff('0xa'));var client=jayson['client'][_0x39ff('0xb')]({'port':0x232a});config['redis']=_[_0x39ff('0xc')](config[_0x39ff('0xd')],{'host':_0x39ff('0xe'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x39ff('0xd')]));require(_0x39ff('0xf'))[_0x39ff('0x10')](socket);function respondWithRpcPromise(_0xc989e5,_0xfab068,_0x1ea384){return new BPromise(function(_0x45c56d,_0x3a12d9){return client[_0x39ff('0x11')](_0xc989e5,_0x1ea384)[_0x39ff('0x12')](function(_0x56a00c){logger[_0x39ff('0x13')]('WhatsappInteraction,\x20%s,\x20%s',_0xfab068,'request\x20sent');logger[_0x39ff('0x14')](_0x39ff('0x15'),_0xfab068,_0x39ff('0x16'),JSON[_0x39ff('0x17')](_0x56a00c));if(_0x56a00c['error']){if(_0x56a00c['error'][_0x39ff('0x18')]===0x1f4){logger[_0x39ff('0x19')](_0x39ff('0x1a'),_0xfab068,_0x56a00c['error'][_0x39ff('0x1b')]);return _0x3a12d9(_0x56a00c[_0x39ff('0x19')][_0x39ff('0x1b')]);}logger['error']('WhatsappInteraction,\x20%s,\x20%s',_0xfab068,_0x56a00c[_0x39ff('0x19')][_0x39ff('0x1b')]);return _0x45c56d(_0x56a00c[_0x39ff('0x19')][_0x39ff('0x1b')]);}else{logger[_0x39ff('0x13')](_0x39ff('0x1a'),_0xfab068,'request\x20sent');_0x45c56d(_0x56a00c[_0x39ff('0x1c')][_0x39ff('0x1b')]);}})[_0x39ff('0x1d')](function(_0x1fe8f4){logger[_0x39ff('0x19')](_0x39ff('0x1a'),_0xfab068,_0x1fe8f4);_0x3a12d9(_0x1fe8f4);});});}exports[_0x39ff('0x1e')]=function(_0x418f77){var _0xce21a2=this;return new Promise(function(_0x199822,_0x411621){return db['WhatsappInteraction'][_0x39ff('0x1f')](_0x418f77[_0x39ff('0x20')],{'raw':_0x418f77['options']?_0x418f77[_0x39ff('0x21')][_0x39ff('0x22')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x418f77[_0x39ff('0x21')]?_0x418f77[_0x39ff('0x21')][_0x39ff('0x23')]||null:null,'attributes':_0x418f77[_0x39ff('0x21')]?_0x418f77[_0x39ff('0x21')][_0x39ff('0x24')]||null:null,'limit':_0x418f77[_0x39ff('0x21')]?_0x418f77[_0x39ff('0x21')][_0x39ff('0x25')]||null:null})[_0x39ff('0x12')](function(_0x47afe5){logger[_0x39ff('0x13')](_0x39ff('0x1e'),_0x418f77);logger[_0x39ff('0x14')](_0x39ff('0x1e'),_0x418f77,JSON[_0x39ff('0x17')](_0x47afe5));_0x199822(_0x47afe5);})[_0x39ff('0x1d')](function(_0x35595d){logger[_0x39ff('0x19')]('UpdateWhatsappInteraction',_0x35595d[_0x39ff('0x1b')],_0x418f77);_0x411621(_0xce21a2['error'](0x1f4,_0x35595d[_0x39ff('0x1b')]));});});};exports[_0x39ff('0x26')]=function(_0x2f6010){return new Promise(function(_0x218777,_0x55015d){return db['WhatsappInteraction']['find']({'where':_0x2f6010[_0x39ff('0x21')]?_0x2f6010['options'][_0x39ff('0x23')]||null:null})[_0x39ff('0x12')](function(_0x1cd59d){if(_0x1cd59d){return _0x1cd59d[_0x39ff('0x27')](_0x2f6010[_0x39ff('0x20')]['ids'],_[_0x39ff('0x28')](_0x2f6010[_0x39ff('0x20')],[_0x39ff('0x29'),'id'])||{});}})[_0x39ff('0x2a')](function(_0x3220cc){logger['info'](_0x39ff('0x2b'),_0x2f6010);logger[_0x39ff('0x14')](_0x39ff('0x2b'),_0x2f6010,JSON[_0x39ff('0x17')](_0x3220cc));_0x218777(_0x3220cc);})[_0x39ff('0x1d')](function(_0xc26644){logger[_0x39ff('0x19')](_0x39ff('0x2b'),_0xc26644[_0x39ff('0x1b')],_0x2f6010);_0x55015d(_this[_0x39ff('0x19')](0x1f4,_0xc26644['message']));});});}; \ No newline at end of file diff --git a/server/api/whatsappInteraction/whatsappInteraction.socket.js b/server/api/whatsappInteraction/whatsappInteraction.socket.js index a59b178..9695055 100644 --- a/server/api/whatsappInteraction/whatsappInteraction.socket.js +++ b/server/api/whatsappInteraction/whatsappInteraction.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x163c=['./whatsappInteraction.events','save','remove','update','emit','removeListener','register','length','whatsappInteraction:'];(function(_0x4e4f0e,_0x1c3892){var _0x1a7219=function(_0x3821ad){while(--_0x3821ad){_0x4e4f0e['push'](_0x4e4f0e['shift']());}};_0x1a7219(++_0x1c3892);}(_0x163c,0x1c2));var _0xc163=function(_0xaff6,_0x27c4a1){_0xaff6=_0xaff6-0x0;var _0x22a10e=_0x163c[_0xaff6];return _0x22a10e;};'use strict';var WhatsappInteractionEvents=require(_0xc163('0x0'));var events=[_0xc163('0x1'),_0xc163('0x2'),_0xc163('0x3')];function createListener(_0x241e06,_0x4373a6){return function(_0x293bfc){_0x4373a6[_0xc163('0x4')](_0x241e06,_0x293bfc);};}function removeListener(_0x437d7d,_0x5a34ca){return function(){WhatsappInteractionEvents[_0xc163('0x5')](_0x437d7d,_0x5a34ca);};}exports[_0xc163('0x6')]=function(_0x21331c){for(var _0x531b67=0x0,_0x120792=events[_0xc163('0x7')];_0x531b67<_0x120792;_0x531b67++){var _0x14d9a3=events[_0x531b67];var _0x5226c2=createListener(_0xc163('0x8')+_0x14d9a3,_0x21331c);WhatsappInteractionEvents['on'](_0x14d9a3,_0x5226c2);}}; \ No newline at end of file +var _0xe7f3=['length','whatsappInteraction:','./whatsappInteraction.events','save','remove','emit','removeListener','register'];(function(_0x618414,_0x1a7a60){var _0x21c19a=function(_0x507b17){while(--_0x507b17){_0x618414['push'](_0x618414['shift']());}};_0x21c19a(++_0x1a7a60);}(_0xe7f3,0x1ba));var _0x3e7f=function(_0x365168,_0x54c3ba){_0x365168=_0x365168-0x0;var _0xb06b50=_0xe7f3[_0x365168];return _0xb06b50;};'use strict';var WhatsappInteractionEvents=require(_0x3e7f('0x0'));var events=[_0x3e7f('0x1'),_0x3e7f('0x2'),'update'];function createListener(_0x205d08,_0x5ee67b){return function(_0x38a2e3){_0x5ee67b[_0x3e7f('0x3')](_0x205d08,_0x38a2e3);};}function removeListener(_0x4d71c5,_0x30df0a){return function(){WhatsappInteractionEvents[_0x3e7f('0x4')](_0x4d71c5,_0x30df0a);};}exports[_0x3e7f('0x5')]=function(_0x33cda1){for(var _0x45258a=0x0,_0xbf8d01=events[_0x3e7f('0x6')];_0x45258a<_0xbf8d01;_0x45258a++){var _0x17e00e=events[_0x45258a];var _0x37cfb0=createListener(_0x3e7f('0x7')+_0x17e00e,_0x33cda1);WhatsappInteractionEvents['on'](_0x17e00e,_0x37cfb0);}}; \ No newline at end of file diff --git a/server/api/whatsappMessage/index.js b/server/api/whatsappMessage/index.js index 3ba8135..ef9285e 100644 --- a/server/api/whatsappMessage/index.js +++ b/server/api/whatsappMessage/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x88c4=['fs-extra','../../components/auth/service','./whatsappMessage.controller','get','isAuthenticated','index','/describe','describe','/:id','show','post','tracked','whatsapp','status','put','update','accept','/:id/reject','reject','delete','destroy','exports','multer','util','path','connect-timeout','Router'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x88c4,0x1ab));var _0x488c=function(_0x4ea413,_0x51ff3a){_0x4ea413=_0x4ea413-0x0;var _0x51cf25=_0x88c4[_0x4ea413];return _0x51cf25;};'use strict';var multer=require(_0x488c('0x0'));var util=require(_0x488c('0x1'));var path=require(_0x488c('0x2'));var timeout=require(_0x488c('0x3'));var express=require('express');var router=express[_0x488c('0x4')]();var fs_extra=require(_0x488c('0x5'));var auth=require(_0x488c('0x6'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x488c('0x7'));router[_0x488c('0x8')]('/',auth[_0x488c('0x9')](),controller[_0x488c('0xa')]);router[_0x488c('0x8')](_0x488c('0xb'),auth[_0x488c('0x9')](),controller[_0x488c('0xc')]);router[_0x488c('0x8')](_0x488c('0xd'),auth[_0x488c('0x9')](),controller[_0x488c('0xe')]);router[_0x488c('0xf')]('/',auth[_0x488c('0x9')](),interaction[_0x488c('0x10')](_0x488c('0x11'),'whatsappmessage:create'),controller['create']);router['post']('/:id/status',controller[_0x488c('0x12')]);router[_0x488c('0x13')]('/:id',auth[_0x488c('0x9')](),controller[_0x488c('0x14')]);router[_0x488c('0x13')]('/:id/accept',auth[_0x488c('0x9')](),controller[_0x488c('0x15')]);router[_0x488c('0x13')](_0x488c('0x16'),auth[_0x488c('0x9')](),controller[_0x488c('0x17')]);router[_0x488c('0x18')](_0x488c('0xd'),auth[_0x488c('0x9')](),controller[_0x488c('0x19')]);module[_0x488c('0x1a')]=router; \ No newline at end of file +var _0xce0c=['../../components/interaction/service','../../config/environment','./whatsappMessage.controller','get','isAuthenticated','index','/describe','describe','/:id','show','whatsapp','whatsappmessage:create','post','update','/:id/accept','put','/:id/reject','reject','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service'];(function(_0x2dafbe,_0x5d04de){var _0x58a45a=function(_0x50ac96){while(--_0x50ac96){_0x2dafbe['push'](_0x2dafbe['shift']());}};_0x58a45a(++_0x5d04de);}(_0xce0c,0xa0));var _0xcce0=function(_0x3d3ddd,_0x59b504){_0x3d3ddd=_0x3d3ddd-0x0;var _0x52a4f9=_0xce0c[_0x3d3ddd];return _0x52a4f9;};'use strict';var multer=require(_0xcce0('0x0'));var util=require(_0xcce0('0x1'));var path=require(_0xcce0('0x2'));var timeout=require(_0xcce0('0x3'));var express=require(_0xcce0('0x4'));var router=express[_0xcce0('0x5')]();var fs_extra=require(_0xcce0('0x6'));var auth=require(_0xcce0('0x7'));var interaction=require(_0xcce0('0x8'));var config=require(_0xcce0('0x9'));var controller=require(_0xcce0('0xa'));router[_0xcce0('0xb')]('/',auth[_0xcce0('0xc')](),controller[_0xcce0('0xd')]);router[_0xcce0('0xb')](_0xcce0('0xe'),auth['isAuthenticated'](),controller[_0xcce0('0xf')]);router[_0xcce0('0xb')](_0xcce0('0x10'),auth['isAuthenticated'](),controller[_0xcce0('0x11')]);router['post']('/',auth['isAuthenticated'](),interaction['tracked'](_0xcce0('0x12'),_0xcce0('0x13')),controller['create']);router[_0xcce0('0x14')]('/:id/status',controller['status']);router['put'](_0xcce0('0x10'),auth[_0xcce0('0xc')](),controller[_0xcce0('0x15')]);router['put'](_0xcce0('0x16'),auth['isAuthenticated'](),controller['accept']);router[_0xcce0('0x17')](_0xcce0('0x18'),auth['isAuthenticated'](),controller[_0xcce0('0x19')]);router['delete'](_0xcce0('0x10'),auth[_0xcce0('0xc')](),controller[_0xcce0('0x1a')]);module[_0xcce0('0x1b')]=router; \ No newline at end of file diff --git a/server/api/whatsappMessage/whatsappMessage.attributes.js b/server/api/whatsappMessage/whatsappMessage.attributes.js index b802a1a..b8f80a6 100644 --- a/server/api/whatsappMessage/whatsappMessage.attributes.js +++ b/server/api/whatsappMessage/whatsappMessage.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd114=['medium','BOOLEAN','ENUM','out','STRING','DATE','TEXT','sequelize','exports'];(function(_0x5a92ad,_0x2219a6){var _0x2466f8=function(_0x4ad04e){while(--_0x4ad04e){_0x5a92ad['push'](_0x5a92ad['shift']());}};_0x2466f8(++_0x2219a6);}(_0xd114,0x10c));var _0x4d11=function(_0x52b5b1,_0x30bce5){_0x52b5b1=_0x52b5b1-0x0;var _0xfd131f=_0xd114[_0x52b5b1];return _0xfd131f;};'use strict';var Sequelize=require(_0x4d11('0x0'));module[_0x4d11('0x1')]={'body':{'type':Sequelize['TEXT'](_0x4d11('0x2')),'allowNull':![]},'read':{'type':Sequelize[_0x4d11('0x3')],'defaultValue':![]},'direction':{'type':Sequelize[_0x4d11('0x4')]('in',_0x4d11('0x5')),'defaultValue':_0x4d11('0x5'),'allowNull':![]},'messageId':{'type':Sequelize[_0x4d11('0x6')](0xbe)},'phone':{'type':Sequelize[_0x4d11('0x6')]},'readAt':{'type':Sequelize[_0x4d11('0x7')]},'secret':{'type':Sequelize[_0x4d11('0x3')],'defaultValue':![]},'providerName':{'type':Sequelize['STRING']},'providerResponse':{'type':Sequelize[_0x4d11('0x8')]}}; \ No newline at end of file +var _0x12d7=['DATE','sequelize','TEXT','medium','BOOLEAN','ENUM','out','STRING'];(function(_0x289a0a,_0x430a10){var _0x2e49f0=function(_0xb78782){while(--_0xb78782){_0x289a0a['push'](_0x289a0a['shift']());}};_0x2e49f0(++_0x430a10);}(_0x12d7,0x181));var _0x712d=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x12d7[_0x3dd15e];return _0x231fd0;};'use strict';var Sequelize=require(_0x712d('0x0'));module['exports']={'body':{'type':Sequelize[_0x712d('0x1')](_0x712d('0x2')),'allowNull':![]},'read':{'type':Sequelize[_0x712d('0x3')],'defaultValue':![]},'direction':{'type':Sequelize[_0x712d('0x4')]('in',_0x712d('0x5')),'defaultValue':_0x712d('0x5'),'allowNull':![]},'messageId':{'type':Sequelize['STRING'](0xbe)},'phone':{'type':Sequelize[_0x712d('0x6')]},'readAt':{'type':Sequelize[_0x712d('0x7')]},'secret':{'type':Sequelize[_0x712d('0x3')],'defaultValue':![]},'providerName':{'type':Sequelize[_0x712d('0x6')]},'providerResponse':{'type':Sequelize['TEXT']}}; \ No newline at end of file diff --git a/server/api/whatsappMessage/whatsappMessage.controller.js b/server/api/whatsappMessage/whatsappMessage.controller.js index f80f78a..0c41b55 100644 --- a/server/api/whatsappMessage/whatsappMessage.controller.js +++ b/server/api/whatsappMessage/whatsappMessage.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9643=['user','CmContact','Contact','get','WhatsappInteractionId','UserId','isNil','read1stAt','interaction','[WHATSAPPMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','acceptMessage','startsWith','cf_','push','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','ContactId','sequelize','Sequelize','contact','manual','interface','SIP/%s','channel','event','accept','EventManager','whatsapp','WhatsappInteraction','[WHATSAPPMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','null','RejectMessage','rejectMessage','QueryTypes','SELECT','rejectmessage','WhatsappAccountId','WhatsppMessage,\x20%s,\x20%s,\x20%s','received\x20delivery\x20report\x20from','inspect','twilio','MessageSid','messageId','MessageStatus','WhatsappAccount,\x20%s,\x20%s,\x20%s','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','fs-extra','squel','jsforce','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','localhost','socket.io-emitter','./whatsappMessage.socket','register','jayson/promise','client','http','request','info','WhatsappMessage,\x20%s,\x20%s','debug','WhatsappMessage,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','catch','sendStatus','status','end','json','offset','undefined','count','set','apply','reject','save','update','then','destroy','stack','name','index','map','WhatsappMessage','rawAttributes','fieldName','type','key','query','filters','intersection','model','attributes','fields','hasOwnProperty','nolimit','limit','sort','where','pick','filter','merge','includeAll','include','findAll','show','params','keys','length','options','create','body','find','describe','whatsapp-interactions','read','readAt','format','YYYY-MM-DD\x20HH:mm:ss'];(function(_0x269ead,_0x33bacd){var _0x32771b=function(_0x35589b){while(--_0x35589b){_0x269ead['push'](_0x269ead['shift']());}};_0x32771b(++_0x33bacd);}(_0x9643,0x1da));var _0x3964=function(_0x3fdc4c,_0x49f033){_0x3fdc4c=_0x3fdc4c-0x0;var _0x2f017b=_0x9643[_0x3fdc4c];return _0x2f017b;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x3964('0x0'));var zipdir=require(_0x3964('0x1'));var jsonpatch=require(_0x3964('0x2'));var rp=require(_0x3964('0x3'));var moment=require(_0x3964('0x4'));var BPromise=require(_0x3964('0x5'));var Mustache=require(_0x3964('0x6'));var util=require(_0x3964('0x7'));var path=require(_0x3964('0x8'));var sox=require('sox');var csv=require(_0x3964('0x9'));var ejs=require(_0x3964('0xa'));var fs=require('fs');var fs_extra=require(_0x3964('0xb'));var _=require('lodash');var squel=require(_0x3964('0xc'));var crypto=require('crypto');var jsforce=require(_0x3964('0xd'));var deskjs=require('desk.js');var toCsv=require(_0x3964('0x9'));var querystring=require('querystring');var Papa=require(_0x3964('0xe'));var Redis=require(_0x3964('0xf'));var authService=require(_0x3964('0x10'));var qs=require('../../components/parsers/qs');var as=require(_0x3964('0x11'));var hardwareService=require(_0x3964('0x12'));var logger=require(_0x3964('0x13'))(_0x3964('0x14'));var utils=require(_0x3964('0x15'));var config=require(_0x3964('0x16'));var licenseUtil=require(_0x3964('0x17'));var db=require(_0x3964('0x18'))['db'];config[_0x3964('0x19')]=_['defaults'](config[_0x3964('0x19')],{'host':_0x3964('0x1a'),'port':0x18eb});var socket=require(_0x3964('0x1b'))(new Redis(config[_0x3964('0x19')]));require(_0x3964('0x1c'))[_0x3964('0x1d')](socket);var jayson=require(_0x3964('0x1e'));var client=jayson[_0x3964('0x1f')]['http']({'port':0x232c});var client9002=jayson[_0x3964('0x1f')][_0x3964('0x20')]({'port':0x232a});function respondWithRpcPromise(_0x4a1b8b,_0x4002a2,_0x493da9,_0x21cd16){return new BPromise(function(_0x30507b,_0x436820){var _0x25b6d6=_0x21cd16||client;return _0x25b6d6[_0x3964('0x21')](_0x4a1b8b,_0x493da9)['then'](function(_0x3e09a4){logger[_0x3964('0x22')](_0x3964('0x23'),_0x4002a2,'request\x20sent');logger[_0x3964('0x24')](_0x3964('0x25'),_0x4002a2,_0x3964('0x26'),JSON[_0x3964('0x27')](_0x3e09a4));if(_0x3e09a4[_0x3964('0x28')]){if(_0x3e09a4['error'][_0x3964('0x29')]===0x1f4){logger[_0x3964('0x28')](_0x3964('0x23'),_0x4002a2,_0x3e09a4[_0x3964('0x28')][_0x3964('0x2a')]);return _0x436820(_0x3e09a4['error'][_0x3964('0x2a')]);}logger[_0x3964('0x28')](_0x3964('0x23'),_0x4002a2,_0x3e09a4['error'][_0x3964('0x2a')]);return _0x30507b(_0x3e09a4[_0x3964('0x28')][_0x3964('0x2a')]);}else{logger[_0x3964('0x22')]('WhatsappMessage,\x20%s,\x20%s',_0x4002a2,_0x3964('0x26'));_0x30507b(_0x3e09a4['result'][_0x3964('0x2a')]);}})[_0x3964('0x2b')](function(_0x40d0b9){logger['error'](_0x3964('0x23'),_0x4002a2,_0x40d0b9);_0x436820(_0x40d0b9);});});}function respondWithStatusCode(_0x58fb2c,_0x3ecc3f){_0x3ecc3f=_0x3ecc3f||0xcc;return function(_0x3ebc58){if(_0x3ebc58){return _0x58fb2c[_0x3964('0x2c')](_0x3ecc3f);}return _0x58fb2c[_0x3964('0x2d')](_0x3ecc3f)[_0x3964('0x2e')]();};}function respondWithResult(_0x53ade0,_0x28bcf6){_0x28bcf6=_0x28bcf6||0xc8;return function(_0x125f6a){if(_0x125f6a){return _0x53ade0['status'](_0x28bcf6)[_0x3964('0x2f')](_0x125f6a);}};}function respondWithFilteredResult(_0x4aaafe,_0x2efee2){return function(_0xe2428){if(_0xe2428){var _0xf8b8cd=typeof _0x2efee2[_0x3964('0x30')]===_0x3964('0x31')&&typeof _0x2efee2['limit']===_0x3964('0x31');var _0x2e21af=_0xe2428[_0x3964('0x32')];var _0x36787b=_0xf8b8cd?0x0:_0x2efee2[_0x3964('0x30')];var _0x1568ff=_0xf8b8cd?_0xe2428[_0x3964('0x32')]:_0x2efee2['offset']+_0x2efee2['limit'];var _0x402e18;if(_0x1568ff>=_0x2e21af){_0x1568ff=_0x2e21af;_0x402e18=0xc8;}else{_0x402e18=0xce;}_0x4aaafe[_0x3964('0x2d')](_0x402e18);return _0x4aaafe[_0x3964('0x33')]('Content-Range',_0x36787b+'-'+_0x1568ff+'/'+_0x2e21af)[_0x3964('0x2f')](_0xe2428);}return null;};}function patchUpdates(_0x212873){return function(_0x471816){try{jsonpatch[_0x3964('0x34')](_0x471816,_0x212873,!![]);}catch(_0xe2f693){return BPromise[_0x3964('0x35')](_0xe2f693);}return _0x471816[_0x3964('0x36')]();};}function saveUpdates(_0x3837fe,_0xcf1931){return function(_0x27a7eb){if(_0x27a7eb){return _0x27a7eb[_0x3964('0x37')](_0x3837fe)[_0x3964('0x38')](function(_0xed2c7f){return _0xed2c7f;});}return null;};}function removeEntity(_0x316f1f,_0x23d13e){return function(_0x32f7a6){if(_0x32f7a6){return _0x32f7a6[_0x3964('0x39')]()[_0x3964('0x38')](function(){_0x316f1f[_0x3964('0x2d')](0xcc)[_0x3964('0x2e')]();});}};}function handleEntityNotFound(_0x24daee,_0x5279bf){return function(_0x4795ce){if(!_0x4795ce){_0x24daee[_0x3964('0x2c')](0x194);}return _0x4795ce;};}function handleError(_0x22410e,_0x1403b5){_0x1403b5=_0x1403b5||0x1f4;return function(_0x270352){logger['error'](_0x270352[_0x3964('0x3a')]);if(_0x270352[_0x3964('0x3b')]){delete _0x270352['name'];}_0x22410e[_0x3964('0x2d')](_0x1403b5)['send'](_0x270352);};}exports[_0x3964('0x3c')]=function(_0x441f97,_0x2f31d6){var _0x54864b={},_0x261ca0={},_0x877be4={'count':0x0,'rows':[]};var _0x4e7218=_[_0x3964('0x3d')](db[_0x3964('0x3e')][_0x3964('0x3f')],function(_0x44c4de){return{'name':_0x44c4de[_0x3964('0x40')],'type':_0x44c4de[_0x3964('0x41')][_0x3964('0x42')]};});_0x261ca0['model']=_[_0x3964('0x3d')](_0x4e7218,_0x3964('0x3b'));_0x261ca0[_0x3964('0x43')]=_['keys'](_0x441f97['query']);_0x261ca0[_0x3964('0x44')]=_[_0x3964('0x45')](_0x261ca0[_0x3964('0x46')],_0x261ca0['query']);_0x54864b[_0x3964('0x47')]=_[_0x3964('0x45')](_0x261ca0[_0x3964('0x46')],qs[_0x3964('0x48')](_0x441f97[_0x3964('0x43')][_0x3964('0x48')]));_0x54864b[_0x3964('0x47')]=_0x54864b['attributes']['length']?_0x54864b['attributes']:_0x261ca0[_0x3964('0x46')];if(!_0x441f97[_0x3964('0x43')][_0x3964('0x49')](_0x3964('0x4a'))){_0x54864b[_0x3964('0x4b')]=qs[_0x3964('0x4b')](_0x441f97[_0x3964('0x43')][_0x3964('0x4b')]);_0x54864b[_0x3964('0x30')]=qs[_0x3964('0x30')](_0x441f97[_0x3964('0x43')][_0x3964('0x30')]);}_0x54864b['order']=qs[_0x3964('0x4c')](_0x441f97[_0x3964('0x43')][_0x3964('0x4c')]);_0x54864b[_0x3964('0x4d')]=qs[_0x3964('0x44')](_[_0x3964('0x4e')](_0x441f97['query'],_0x261ca0['filters']),_0x4e7218);if(_0x441f97[_0x3964('0x43')][_0x3964('0x4f')]){_0x54864b[_0x3964('0x4d')]=_[_0x3964('0x50')](_0x54864b[_0x3964('0x4d')],{'$or':_[_0x3964('0x3d')](_0x4e7218,function(_0x21c5ce){if(_0x21c5ce[_0x3964('0x41')]!=='VIRTUAL'){var _0x396542={};_0x396542[_0x21c5ce['name']]={'$like':'%'+_0x441f97[_0x3964('0x43')][_0x3964('0x4f')]+'%'};return _0x396542;}})});}_0x54864b=_[_0x3964('0x50')]({},_0x54864b,_0x441f97['options']);var _0x5cb3b3={'where':_0x54864b[_0x3964('0x4d')]};return db['WhatsappMessage'][_0x3964('0x32')](_0x5cb3b3)['then'](function(_0x2a4524){_0x877be4[_0x3964('0x32')]=_0x2a4524;if(_0x441f97[_0x3964('0x43')][_0x3964('0x51')]){_0x54864b[_0x3964('0x52')]=[{'all':!![]}];}return db['WhatsappMessage'][_0x3964('0x53')](_0x54864b);})['then'](function(_0x140689){_0x877be4['rows']=_0x140689;return _0x877be4;})['then'](respondWithFilteredResult(_0x2f31d6,_0x54864b))['catch'](handleError(_0x2f31d6,null));};exports[_0x3964('0x54')]=function(_0x1bafb0,_0xa6beba){var _0x3360ce={'raw':!![],'where':{'id':_0x1bafb0[_0x3964('0x55')]['id']}},_0xcf59e9={};_0xcf59e9[_0x3964('0x46')]=_['keys'](db[_0x3964('0x3e')][_0x3964('0x3f')]);_0xcf59e9[_0x3964('0x43')]=_[_0x3964('0x56')](_0x1bafb0[_0x3964('0x43')]);_0xcf59e9['filters']=_[_0x3964('0x45')](_0xcf59e9[_0x3964('0x46')],_0xcf59e9['query']);_0x3360ce[_0x3964('0x47')]=_[_0x3964('0x45')](_0xcf59e9[_0x3964('0x46')],qs[_0x3964('0x48')](_0x1bafb0[_0x3964('0x43')]['fields']));_0x3360ce[_0x3964('0x47')]=_0x3360ce[_0x3964('0x47')][_0x3964('0x57')]?_0x3360ce[_0x3964('0x47')]:_0xcf59e9['model'];if(_0x1bafb0[_0x3964('0x43')][_0x3964('0x51')]){_0x3360ce['include']=[{'all':!![]}];}_0x3360ce=_[_0x3964('0x50')]({},_0x3360ce,_0x1bafb0[_0x3964('0x58')]);return db['WhatsappMessage']['find'](_0x3360ce)['then'](handleEntityNotFound(_0xa6beba,null))[_0x3964('0x38')](respondWithResult(_0xa6beba,null))['catch'](handleError(_0xa6beba,null));};exports[_0x3964('0x59')]=function(_0x2d59d1,_0x4d8801){return db[_0x3964('0x3e')][_0x3964('0x59')](_0x2d59d1[_0x3964('0x5a')],{})['then'](respondWithResult(_0x4d8801,0xc9))[_0x3964('0x2b')](handleError(_0x4d8801,null));};exports[_0x3964('0x37')]=function(_0x287131,_0x46c3b6){if(_0x287131['body']['id']){delete _0x287131[_0x3964('0x5a')]['id'];}return db['WhatsappMessage'][_0x3964('0x5b')]({'where':{'id':_0x287131[_0x3964('0x55')]['id']}})[_0x3964('0x38')](handleEntityNotFound(_0x46c3b6,null))['then'](saveUpdates(_0x287131['body'],null))[_0x3964('0x38')](respondWithResult(_0x46c3b6,null))[_0x3964('0x2b')](handleError(_0x46c3b6,null));};exports[_0x3964('0x39')]=function(_0x59c655,_0x454b97){return db[_0x3964('0x3e')][_0x3964('0x5b')]({'where':{'id':_0x59c655['params']['id']}})[_0x3964('0x38')](handleEntityNotFound(_0x454b97,null))[_0x3964('0x38')](removeEntity(_0x454b97,null))['catch'](handleError(_0x454b97,null));};exports[_0x3964('0x5c')]=function(_0x461862,_0x467c51){return db[_0x3964('0x3e')][_0x3964('0x5c')]()[_0x3964('0x38')](respondWithResult(_0x467c51,null))[_0x3964('0x2b')](handleError(_0x467c51,null));};var interaction_log=require('../../config/logger')(_0x3964('0x5d'));exports['accept']=function(_0x7d8fb2,_0x41a355,_0x2925bf){var _0x5cd988={'agent':{},'channel':'whatsapp'};if(_0x7d8fb2[_0x3964('0x5a')]['id']){delete _0x7d8fb2[_0x3964('0x5a')]['id'];}_0x7d8fb2['body'][_0x3964('0x5e')]=!![];_0x7d8fb2[_0x3964('0x5a')][_0x3964('0x5f')]=moment()[_0x3964('0x60')](_0x3964('0x61'));_0x7d8fb2[_0x3964('0x5a')]['UserId']=_0x7d8fb2['body']['UserId']||_0x7d8fb2[_0x3964('0x62')]['id'];_0x5cd988['agent']['id']=_0x7d8fb2[_0x3964('0x5a')]['UserId'];return db[_0x3964('0x3e')]['find']({'where':{'id':_0x7d8fb2[_0x3964('0x55')]['id'],'UserId':null},'include':[{'model':db[_0x3964('0x63')],'as':_0x3964('0x64')}]})[_0x3964('0x38')](handleEntityNotFound(_0x41a355,null))[_0x3964('0x38')](saveUpdates(_0x7d8fb2[_0x3964('0x5a')],null))['then'](function(_0xbac774){if(_0xbac774){_0x5cd988[_0x3964('0x2a')]=_0xbac774[_0x3964('0x65')]({'plain':!![]});return db['WhatsappInteraction'][_0x3964('0x5b')]({'where':{'id':_0xbac774[_0x3964('0x66')]}});}return null;})[_0x3964('0x38')](handleEntityNotFound(_0x41a355,null))[_0x3964('0x38')](function(_0x3d2d94){if(_0x3d2d94){return _0x3d2d94[_0x3964('0x37')]({'UserId':_0x7d8fb2[_0x3964('0x5a')][_0x3964('0x67')],'read1stAt':_[_0x3964('0x68')](_0x3d2d94[_0x3964('0x69')])?moment()[_0x3964('0x60')]('YYYY-MM-DD\x20HH:mm:ss'):undefined});}return null;})[_0x3964('0x38')](function(_0x570ce7){if(_0x570ce7){_0x5cd988[_0x3964('0x6a')]=_0x570ce7[_0x3964('0x65')]({'plain':!![]});interaction_log[_0x3964('0x22')](_0x3964('0x6b'),_0x7d8fb2[_0x3964('0x62')]['id'],_0x7d8fb2[_0x3964('0x62')]['name'],_0x7d8fb2[_0x3964('0x62')][_0x3964('0x6c')],_0x5cd988[_0x3964('0x6a')]['id'],_0x7d8fb2['body']?JSON[_0x3964('0x27')](_0x7d8fb2[_0x3964('0x5a')]):'null');return respondWithRpcPromise('AcceptMessage',_0x3964('0x6d'),_0x5cd988);}return null;})[_0x3964('0x38')](function(_0x37a829){return db[_0x3964('0x63')]['describe']()[_0x3964('0x38')](function(_0x4d9f96){var _0x22f600=[];for(var _0x21722=0x0;_0x21722=_0x3da4c7){_0xe1df34=_0x3da4c7;_0x65d8c8=0xc8;}else{_0x65d8c8=0xce;}_0x7966db['status'](_0x65d8c8);return _0x7966db['set'](_0xbc5b('0x31'),_0x5aa790+'-'+_0xe1df34+'/'+_0x3da4c7)[_0xbc5b('0x2d')](_0x34fe19);}return null;};}function patchUpdates(_0x3dd99f){return function(_0x15c590){try{jsonpatch['apply'](_0x15c590,_0x3dd99f,!![]);}catch(_0x1f7079){return BPromise[_0xbc5b('0x32')](_0x1f7079);}return _0x15c590[_0xbc5b('0x33')]();};}function saveUpdates(_0x15e8cf,_0x47f242){return function(_0x2aaec6){if(_0x2aaec6){return _0x2aaec6['update'](_0x15e8cf)[_0xbc5b('0x21')](function(_0x342bc1){return _0x342bc1;});}return null;};}function removeEntity(_0x6aee57,_0x2a537c){return function(_0xc57519){if(_0xc57519){return _0xc57519[_0xbc5b('0x34')]()[_0xbc5b('0x21')](function(){_0x6aee57[_0xbc5b('0x2c')](0xcc)[_0xbc5b('0x35')]();});}};}function handleEntityNotFound(_0x5ed623,_0x145e41){return function(_0x3226f6){if(!_0x3226f6){_0x5ed623[_0xbc5b('0x2b')](0x194);}return _0x3226f6;};}function handleError(_0x4442f7,_0x22cb33){_0x22cb33=_0x22cb33||0x1f4;return function(_0x3497d9){logger['error'](_0x3497d9[_0xbc5b('0x36')]);if(_0x3497d9[_0xbc5b('0x37')]){delete _0x3497d9[_0xbc5b('0x37')];}_0x4442f7[_0xbc5b('0x2c')](_0x22cb33)['send'](_0x3497d9);};}exports[_0xbc5b('0x38')]=function(_0x2e9ba9,_0x20b955){var _0x11ac4b={},_0x41d123={},_0x2415f7={'count':0x0,'rows':[]};var _0x33d46a=_[_0xbc5b('0x39')](db[_0xbc5b('0x3a')][_0xbc5b('0x3b')],function(_0x12f37f){return{'name':_0x12f37f[_0xbc5b('0x3c')],'type':_0x12f37f['type'][_0xbc5b('0x3d')]};});_0x41d123['model']=_[_0xbc5b('0x39')](_0x33d46a,_0xbc5b('0x37'));_0x41d123[_0xbc5b('0x3e')]=_[_0xbc5b('0x3f')](_0x2e9ba9[_0xbc5b('0x3e')]);_0x41d123['filters']=_['intersection'](_0x41d123[_0xbc5b('0x40')],_0x41d123[_0xbc5b('0x3e')]);_0x11ac4b[_0xbc5b('0x41')]=_[_0xbc5b('0x42')](_0x41d123[_0xbc5b('0x40')],qs[_0xbc5b('0x43')](_0x2e9ba9['query'][_0xbc5b('0x43')]));_0x11ac4b[_0xbc5b('0x41')]=_0x11ac4b[_0xbc5b('0x41')][_0xbc5b('0x44')]?_0x11ac4b[_0xbc5b('0x41')]:_0x41d123[_0xbc5b('0x40')];if(!_0x2e9ba9[_0xbc5b('0x3e')][_0xbc5b('0x45')](_0xbc5b('0x46'))){_0x11ac4b[_0xbc5b('0x30')]=qs[_0xbc5b('0x30')](_0x2e9ba9['query'][_0xbc5b('0x30')]);_0x11ac4b[_0xbc5b('0x2e')]=qs['offset'](_0x2e9ba9[_0xbc5b('0x3e')][_0xbc5b('0x2e')]);}_0x11ac4b['order']=qs['sort'](_0x2e9ba9[_0xbc5b('0x3e')]['sort']);_0x11ac4b[_0xbc5b('0x47')]=qs[_0xbc5b('0x48')](_[_0xbc5b('0x49')](_0x2e9ba9['query'],_0x41d123['filters']),_0x33d46a);if(_0x2e9ba9['query'][_0xbc5b('0x4a')]){_0x11ac4b['where']=_[_0xbc5b('0x4b')](_0x11ac4b[_0xbc5b('0x47')],{'$or':_[_0xbc5b('0x39')](_0x33d46a,function(_0xb58294){if(_0xb58294[_0xbc5b('0x4c')]!==_0xbc5b('0x4d')){var _0x4c51c4={};_0x4c51c4[_0xb58294[_0xbc5b('0x37')]]={'$like':'%'+_0x2e9ba9[_0xbc5b('0x3e')]['filter']+'%'};return _0x4c51c4;}})});}_0x11ac4b=_[_0xbc5b('0x4b')]({},_0x11ac4b,_0x2e9ba9['options']);var _0x23bcb4={'where':_0x11ac4b[_0xbc5b('0x47')]};return db[_0xbc5b('0x3a')]['count'](_0x23bcb4)[_0xbc5b('0x21')](function(_0x2cc3c3){_0x2415f7[_0xbc5b('0x4e')]=_0x2cc3c3;if(_0x2e9ba9[_0xbc5b('0x3e')]['includeAll']){_0x11ac4b[_0xbc5b('0x4f')]=[{'all':!![]}];}return db[_0xbc5b('0x3a')][_0xbc5b('0x50')](_0x11ac4b);})[_0xbc5b('0x21')](function(_0x5274e2){_0x2415f7[_0xbc5b('0x51')]=_0x5274e2;return _0x2415f7;})[_0xbc5b('0x21')](respondWithFilteredResult(_0x20b955,_0x11ac4b))[_0xbc5b('0x2a')](handleError(_0x20b955,null));};exports[_0xbc5b('0x52')]=function(_0x3e1d5a,_0x23b899){var _0x3a56a1={'raw':!![],'where':{'id':_0x3e1d5a['params']['id']}},_0x526e96={};_0x526e96[_0xbc5b('0x40')]=_[_0xbc5b('0x3f')](db[_0xbc5b('0x3a')][_0xbc5b('0x3b')]);_0x526e96['query']=_[_0xbc5b('0x3f')](_0x3e1d5a[_0xbc5b('0x3e')]);_0x526e96[_0xbc5b('0x48')]=_['intersection'](_0x526e96[_0xbc5b('0x40')],_0x526e96[_0xbc5b('0x3e')]);_0x3a56a1[_0xbc5b('0x41')]=_[_0xbc5b('0x42')](_0x526e96['model'],qs['fields'](_0x3e1d5a[_0xbc5b('0x3e')][_0xbc5b('0x43')]));_0x3a56a1['attributes']=_0x3a56a1[_0xbc5b('0x41')][_0xbc5b('0x44')]?_0x3a56a1[_0xbc5b('0x41')]:_0x526e96['model'];if(_0x3e1d5a['query']['includeAll']){_0x3a56a1[_0xbc5b('0x4f')]=[{'all':!![]}];}_0x3a56a1=_[_0xbc5b('0x4b')]({},_0x3a56a1,_0x3e1d5a[_0xbc5b('0x53')]);return db[_0xbc5b('0x3a')][_0xbc5b('0x54')](_0x3a56a1)['then'](handleEntityNotFound(_0x23b899,null))['then'](respondWithResult(_0x23b899,null))['catch'](handleError(_0x23b899,null));};exports['create']=function(_0x19e451,_0x468fe6){return db[_0xbc5b('0x3a')][_0xbc5b('0x55')](_0x19e451['body'],{})[_0xbc5b('0x21')](respondWithResult(_0x468fe6,0xc9))[_0xbc5b('0x2a')](handleError(_0x468fe6,null));};exports['update']=function(_0x3d763e,_0x233313){if(_0x3d763e[_0xbc5b('0x56')]['id']){delete _0x3d763e[_0xbc5b('0x56')]['id'];}return db[_0xbc5b('0x3a')]['find']({'where':{'id':_0x3d763e[_0xbc5b('0x57')]['id']}})['then'](handleEntityNotFound(_0x233313,null))['then'](saveUpdates(_0x3d763e['body'],null))[_0xbc5b('0x21')](respondWithResult(_0x233313,null))[_0xbc5b('0x2a')](handleError(_0x233313,null));};exports[_0xbc5b('0x34')]=function(_0x4ad1be,_0x13bf02){return db['WhatsappMessage']['find']({'where':{'id':_0x4ad1be[_0xbc5b('0x57')]['id']}})[_0xbc5b('0x21')](handleEntityNotFound(_0x13bf02,null))[_0xbc5b('0x21')](removeEntity(_0x13bf02,null))[_0xbc5b('0x2a')](handleError(_0x13bf02,null));};exports[_0xbc5b('0x58')]=function(_0x267bae,_0x3cc3c1){return db[_0xbc5b('0x3a')]['describe']()[_0xbc5b('0x21')](respondWithResult(_0x3cc3c1,null))[_0xbc5b('0x2a')](handleError(_0x3cc3c1,null));};var interaction_log=require(_0xbc5b('0x59'))(_0xbc5b('0x5a'));exports[_0xbc5b('0x5b')]=function(_0x5c3fcd,_0x5f3c03,_0x4572f5){var _0x2b03a8={'agent':{},'channel':'whatsapp'};if(_0x5c3fcd[_0xbc5b('0x56')]['id']){delete _0x5c3fcd[_0xbc5b('0x56')]['id'];}_0x5c3fcd[_0xbc5b('0x56')]['read']=!![];_0x5c3fcd[_0xbc5b('0x56')]['readAt']=moment()[_0xbc5b('0x5c')](_0xbc5b('0x5d'));_0x5c3fcd[_0xbc5b('0x56')][_0xbc5b('0x5e')]=_0x5c3fcd['body']['UserId']||_0x5c3fcd['user']['id'];_0x2b03a8[_0xbc5b('0x5f')]['id']=_0x5c3fcd[_0xbc5b('0x56')]['UserId'];return db[_0xbc5b('0x3a')][_0xbc5b('0x54')]({'where':{'id':_0x5c3fcd['params']['id'],'UserId':null},'include':[{'model':db[_0xbc5b('0x60')],'as':'Contact'}]})[_0xbc5b('0x21')](handleEntityNotFound(_0x5f3c03,null))[_0xbc5b('0x21')](saveUpdates(_0x5c3fcd[_0xbc5b('0x56')],null))[_0xbc5b('0x21')](function(_0x337e58){if(_0x337e58){_0x2b03a8[_0xbc5b('0x28')]=_0x337e58[_0xbc5b('0x61')]({'plain':!![]});return db[_0xbc5b('0x62')][_0xbc5b('0x54')]({'where':{'id':_0x337e58['WhatsappInteractionId']}});}return null;})[_0xbc5b('0x21')](handleEntityNotFound(_0x5f3c03,null))[_0xbc5b('0x21')](function(_0x3f6547){if(_0x3f6547){return _0x3f6547['update']({'UserId':_0x5c3fcd[_0xbc5b('0x56')]['UserId'],'read1stAt':_[_0xbc5b('0x63')](_0x3f6547['read1stAt'])?moment()[_0xbc5b('0x5c')](_0xbc5b('0x5d')):undefined});}return null;})[_0xbc5b('0x21')](function(_0x444a22){if(_0x444a22){_0x2b03a8['interaction']=_0x444a22[_0xbc5b('0x61')]({'plain':!![]});interaction_log['info'](_0xbc5b('0x64'),_0x5c3fcd[_0xbc5b('0x65')]['id'],_0x5c3fcd[_0xbc5b('0x65')][_0xbc5b('0x37')],_0x5c3fcd[_0xbc5b('0x65')][_0xbc5b('0x66')],_0x2b03a8['interaction']['id'],_0x5c3fcd[_0xbc5b('0x56')]?JSON[_0xbc5b('0x67')](_0x5c3fcd[_0xbc5b('0x56')]):_0xbc5b('0x68'));return respondWithRpcPromise(_0xbc5b('0x69'),_0xbc5b('0x6a'),_0x2b03a8);}return null;})[_0xbc5b('0x21')](function(_0x56b2c4){return db[_0xbc5b('0x60')][_0xbc5b('0x58')]()[_0xbc5b('0x21')](function(_0x5330a6){var _0x12a5f7=[];for(var _0x113b4a=0x0;_0x113b4a=_0x318514){_0x183f5f=_0x318514;_0x5af19f=0xc8;}else{_0x5af19f=0xce;}_0x54139e[_0x68ef('0x26')](_0x5af19f);return _0x54139e[_0x68ef('0x27')](_0x68ef('0x28'),_0x1dc49c+'-'+_0x183f5f+'/'+_0x318514)['json'](_0x2633c1);}return null;};}function patchUpdates(_0x59723c){return function(_0x59bebc){try{jsonpatch[_0x68ef('0x29')](_0x59bebc,_0x59723c,!![]);}catch(_0x2023f2){return BPromise[_0x68ef('0x2a')](_0x2023f2);}return _0x59bebc[_0x68ef('0x2b')]();};}function saveUpdates(_0x438b4c,_0xfe2595){return function(_0x258cd5){if(_0x258cd5){return _0x258cd5[_0x68ef('0x2c')](_0x438b4c)[_0x68ef('0x2d')](function(_0x13280b){return _0x13280b;});}return null;};}function removeEntity(_0x5e4dbe,_0x178460){return function(_0x57f9ee){if(_0x57f9ee){return _0x57f9ee['destroy']()['then'](function(){var _0x1a7ce1=_0x57f9ee[_0x68ef('0x2e')]({'plain':!![]});var _0x123041=_0x68ef('0x2f');return db['UserProfileResource']['destroy']({'where':{'type':_0x123041,'resourceId':_0x1a7ce1['id']}})[_0x68ef('0x2d')](function(){return _0x57f9ee;});})[_0x68ef('0x2d')](function(){_0x5e4dbe[_0x68ef('0x26')](0xcc)[_0x68ef('0x21')]();});}};}function handleEntityNotFound(_0x22ef25,_0x201884){return function(_0x26288a){if(!_0x26288a){_0x22ef25[_0x68ef('0x20')](0x194);}return _0x26288a;};}function handleError(_0x5a6dfd,_0x3d19bf){_0x3d19bf=_0x3d19bf||0x1f4;return function(_0x4314bd){logger[_0x68ef('0x30')](_0x4314bd['stack']);if(_0x4314bd[_0x68ef('0x31')]){delete _0x4314bd['name'];}_0x5a6dfd[_0x68ef('0x26')](_0x3d19bf)[_0x68ef('0x32')](_0x4314bd);};}exports['index']=function(_0x5e1e1b,_0x159395){var _0x5fa72a={},_0x4b8fc8={},_0xf58fa1={'count':0x0,'rows':[]};var _0x8c0a06=_[_0x68ef('0x33')](db[_0x68ef('0x34')]['rawAttributes'],function(_0x2c8bd0){return{'name':_0x2c8bd0[_0x68ef('0x35')],'type':_0x2c8bd0['type'][_0x68ef('0x36')]};});_0x4b8fc8['model']=_[_0x68ef('0x33')](_0x8c0a06,_0x68ef('0x31'));_0x4b8fc8['query']=_[_0x68ef('0x37')](_0x5e1e1b['query']);_0x4b8fc8[_0x68ef('0x38')]=_['intersection'](_0x4b8fc8[_0x68ef('0x39')],_0x4b8fc8[_0x68ef('0x3a')]);_0x5fa72a[_0x68ef('0x3b')]=_['intersection'](_0x4b8fc8[_0x68ef('0x39')],qs['fields'](_0x5e1e1b[_0x68ef('0x3a')]['fields']));_0x5fa72a[_0x68ef('0x3b')]=_0x5fa72a[_0x68ef('0x3b')][_0x68ef('0x3c')]?_0x5fa72a[_0x68ef('0x3b')]:_0x4b8fc8[_0x68ef('0x39')];if(!_0x5e1e1b[_0x68ef('0x3a')]['hasOwnProperty'](_0x68ef('0x3d'))){_0x5fa72a[_0x68ef('0x23')]=qs[_0x68ef('0x23')](_0x5e1e1b['query'][_0x68ef('0x23')]);_0x5fa72a[_0x68ef('0x25')]=qs[_0x68ef('0x25')](_0x5e1e1b['query']['offset']);}_0x5fa72a[_0x68ef('0x3e')]=qs[_0x68ef('0x3f')](_0x5e1e1b[_0x68ef('0x3a')][_0x68ef('0x3f')]);_0x5fa72a[_0x68ef('0x40')]=qs[_0x68ef('0x38')](_[_0x68ef('0x41')](_0x5e1e1b['query'],_0x4b8fc8[_0x68ef('0x38')]),_0x8c0a06);if(_0x5e1e1b[_0x68ef('0x3a')][_0x68ef('0x42')]){_0x5fa72a[_0x68ef('0x40')]=_['merge'](_0x5fa72a[_0x68ef('0x40')],{'$or':_[_0x68ef('0x33')](_0x8c0a06,function(_0xcf595d){if(_0xcf595d[_0x68ef('0x43')]!==_0x68ef('0x44')){var _0x3b00ea={};_0x3b00ea[_0xcf595d['name']]={'$like':'%'+_0x5e1e1b[_0x68ef('0x3a')][_0x68ef('0x42')]+'%'};return _0x3b00ea;}})});}_0x5fa72a=_[_0x68ef('0x45')]({},_0x5fa72a,_0x5e1e1b[_0x68ef('0x46')]);var _0x449f3c={'where':_0x5fa72a[_0x68ef('0x40')]};return db[_0x68ef('0x34')][_0x68ef('0x47')](_0x449f3c)[_0x68ef('0x2d')](function(_0x531096){_0xf58fa1[_0x68ef('0x47')]=_0x531096;if(_0x5e1e1b[_0x68ef('0x3a')][_0x68ef('0x48')]){_0x5fa72a[_0x68ef('0x49')]=[{'all':!![]}];}return db[_0x68ef('0x34')][_0x68ef('0x4a')](_0x5fa72a);})[_0x68ef('0x2d')](function(_0x576767){_0xf58fa1[_0x68ef('0x4b')]=_0x576767;return _0xf58fa1;})['then'](respondWithFilteredResult(_0x159395,_0x5fa72a))[_0x68ef('0x4c')](handleError(_0x159395,null));};exports[_0x68ef('0x4d')]=function(_0x7470b9,_0xfc08d5){var _0x5a1330={'raw':!![],'where':{'id':_0x7470b9['params']['id']}},_0x428456={};_0x428456[_0x68ef('0x39')]=_['keys'](db[_0x68ef('0x34')][_0x68ef('0x4e')]);_0x428456[_0x68ef('0x3a')]=_['keys'](_0x7470b9['query']);_0x428456[_0x68ef('0x38')]=_[_0x68ef('0x4f')](_0x428456['model'],_0x428456['query']);_0x5a1330['attributes']=_[_0x68ef('0x4f')](_0x428456[_0x68ef('0x39')],qs[_0x68ef('0x50')](_0x7470b9[_0x68ef('0x3a')][_0x68ef('0x50')]));_0x5a1330['attributes']=_0x5a1330['attributes'][_0x68ef('0x3c')]?_0x5a1330[_0x68ef('0x3b')]:_0x428456[_0x68ef('0x39')];if(_0x7470b9[_0x68ef('0x3a')]['includeAll']){_0x5a1330[_0x68ef('0x49')]=[{'all':!![]}];}_0x5a1330=_[_0x68ef('0x45')]({},_0x5a1330,_0x7470b9[_0x68ef('0x46')]);return db[_0x68ef('0x34')]['find'](_0x5a1330)['then'](handleEntityNotFound(_0xfc08d5,null))[_0x68ef('0x2d')](respondWithResult(_0xfc08d5,null))[_0x68ef('0x4c')](handleError(_0xfc08d5,null));};exports['create']=function(_0xfc7a74,_0x12fff3){return db[_0x68ef('0x34')][_0x68ef('0x51')](_0xfc7a74[_0x68ef('0x52')],{})['then'](function(_0x35d6bd){var _0x3984ca=_0xfc7a74[_0x68ef('0x53')]['get']({'plain':!![]});if(!_0x3984ca)throw new Error(_0x68ef('0x54'));if(_0x3984ca[_0x68ef('0x55')]===_0x68ef('0x53')){var _0x50ef1f=_0x35d6bd[_0x68ef('0x2e')]({'plain':!![]});var _0x59e8ee='WhatsappQueues';return db[_0x68ef('0x56')]['find']({'where':{'name':_0x59e8ee,'userProfileId':_0x3984ca[_0x68ef('0x57')]},'raw':!![]})[_0x68ef('0x2d')](function(_0x53ebd){if(_0x53ebd&&_0x53ebd[_0x68ef('0x58')]===0x0){return db[_0x68ef('0x59')][_0x68ef('0x51')]({'name':_0x50ef1f[_0x68ef('0x31')],'resourceId':_0x50ef1f['id'],'type':_0x53ebd[_0x68ef('0x31')],'sectionId':_0x53ebd['id']},{})[_0x68ef('0x2d')](function(){return _0x35d6bd;});}else{return _0x35d6bd;}})[_0x68ef('0x4c')](function(_0x538db4){logger['error'](_0x68ef('0x5a'),_0x538db4);throw _0x538db4;});}return _0x35d6bd;})[_0x68ef('0x2d')](respondWithResult(_0x12fff3,0xc9))[_0x68ef('0x4c')](handleError(_0x12fff3,null));};exports[_0x68ef('0x2c')]=function(_0x82df12,_0x1d11d7){if(_0x82df12[_0x68ef('0x52')]['id']){delete _0x82df12[_0x68ef('0x52')]['id'];}return db[_0x68ef('0x34')]['find']({'where':{'id':_0x82df12['params']['id']}})[_0x68ef('0x2d')](handleEntityNotFound(_0x1d11d7,null))['then'](saveUpdates(_0x82df12[_0x68ef('0x52')],null))['then'](respondWithResult(_0x1d11d7,null))[_0x68ef('0x4c')](handleError(_0x1d11d7,null));};exports[_0x68ef('0x5b')]=function(_0x552736,_0xa42737){return db['WhatsappQueue'][_0x68ef('0x5c')]({'where':{'id':_0x552736[_0x68ef('0x5d')]['id']}})[_0x68ef('0x2d')](handleEntityNotFound(_0xa42737,null))[_0x68ef('0x2d')](removeEntity(_0xa42737,null))[_0x68ef('0x4c')](handleError(_0xa42737,null));};exports[_0x68ef('0x5e')]=function(_0x5c347c,_0x1cdaef){return db[_0x68ef('0x34')][_0x68ef('0x5e')]()[_0x68ef('0x2d')](respondWithResult(_0x1cdaef,null))[_0x68ef('0x4c')](handleError(_0x1cdaef,null));};exports[_0x68ef('0x5f')]=function(_0x48e15a,_0x9a978f,_0x42d2a3){var _0x4886af={'raw':!![],'where':{}},_0x42fbac={},_0x114d9f;return db[_0x68ef('0x34')]['findOne']({'where':{'id':_0x48e15a[_0x68ef('0x5d')]['id']}})['then'](handleEntityNotFound(_0x9a978f,null))['then'](function(_0x3e5cca){if(_0x3e5cca){_0x114d9f=_0x3e5cca['get']({'plain':!![]});_0x42fbac[_0x68ef('0x39')]=_['keys'](db[_0x68ef('0x60')][_0x68ef('0x4e')]);_0x42fbac[_0x68ef('0x3a')]=_[_0x68ef('0x37')](_0x48e15a[_0x68ef('0x3a')]);_0x42fbac[_0x68ef('0x38')]=_['intersection'](_0x42fbac[_0x68ef('0x39')],_0x42fbac['query']);_0x4886af[_0x68ef('0x3b')]=_['intersection'](_0x42fbac[_0x68ef('0x39')],qs[_0x68ef('0x50')](_0x48e15a[_0x68ef('0x3a')][_0x68ef('0x50')]));_0x4886af[_0x68ef('0x3b')]=_0x4886af[_0x68ef('0x3b')][_0x68ef('0x3c')]?_0x4886af['attributes']:_0x42fbac[_0x68ef('0x39')];if(!_0x48e15a[_0x68ef('0x3a')][_0x68ef('0x61')](_0x68ef('0x3d'))){_0x4886af[_0x68ef('0x23')]=qs['limit'](_0x48e15a[_0x68ef('0x3a')]['limit']);_0x4886af[_0x68ef('0x25')]=qs['offset'](_0x48e15a['query'][_0x68ef('0x25')]);}_0x4886af[_0x68ef('0x3e')]=qs[_0x68ef('0x3f')](_0x48e15a[_0x68ef('0x3a')]['sort']);_0x4886af[_0x68ef('0x40')]=qs['filters'](_[_0x68ef('0x41')](_0x48e15a[_0x68ef('0x3a')],_0x42fbac[_0x68ef('0x38')]));_0x4886af['where']['WhatsappQueueId']=_0x3e5cca['id'];if(_0x48e15a[_0x68ef('0x3a')][_0x68ef('0x42')]){_0x4886af[_0x68ef('0x40')]=_[_0x68ef('0x45')](_0x4886af['where'],{'$or':_[_0x68ef('0x33')](_0x4886af[_0x68ef('0x3b')],function(_0x19c20f){var _0x21b104={};_0x21b104[_0x19c20f]={'$like':'%'+_0x48e15a['query'][_0x68ef('0x42')]+'%'};return _0x21b104;})});}_0x4886af=_['merge']({},_0x4886af,_0x48e15a[_0x68ef('0x46')]);return db[_0x68ef('0x60')][_0x68ef('0x4a')](_0x4886af);}})[_0x68ef('0x2d')](function(_0xed16d1){if(_0xed16d1){return db['User'][_0x68ef('0x62')]({'where':{'id':_[_0x68ef('0x33')](_0xed16d1,_0x68ef('0x63')),'role':'agent'},'attributes':['id',_0x68ef('0x31'),'whatsappPause',_0x68ef('0x64'),'createdAt']});}})['then'](function(_0x100345){if(_0x100345){return{'count':_0x100345[_0x68ef('0x47')],'rows':_[_0x68ef('0x33')](_0x100345[_0x68ef('0x4b')],function(_0x501004){return{'membername':_0x501004[_0x68ef('0x31')],'UserId':_0x501004['id'],'queue_name':_0x114d9f[_0x68ef('0x31')],'WhatsappQueueId':_0x114d9f['id'],'interface':util[_0x68ef('0x65')]('%s/%s',_0x68ef('0x66'),_0x501004[_0x68ef('0x31')]),'penalty':0x0,'paused':_0x501004[_0x68ef('0x67')],'createdAt':_0x501004[_0x68ef('0x68')],'updatedAt':_0x501004[_0x68ef('0x64')]};})};}else{return{'count':0x0,'rows':[]};}})[_0x68ef('0x2d')](respondWithFilteredResult(_0x9a978f,_0x4886af))[_0x68ef('0x4c')](handleError(_0x9a978f,null));};exports[_0x68ef('0x69')]=function(_0x156ce3,_0x11feff,_0x454999){var _0x6a48ad={};var _0x50e298={};var _0x15378c;var _0x391a81;return db['WhatsappQueue']['findOne']({'where':{'id':_0x156ce3[_0x68ef('0x5d')]['id']}})['then'](handleEntityNotFound(_0x11feff,null))[_0x68ef('0x2d')](function(_0x253947){if(_0x253947){_0x15378c=_0x253947;_0x50e298['model']=_['keys'](db[_0x68ef('0x6a')]['rawAttributes']);_0x50e298[_0x68ef('0x3a')]=_['keys'](_0x156ce3[_0x68ef('0x3a')]);_0x50e298['filters']=_[_0x68ef('0x4f')](_0x50e298[_0x68ef('0x39')],_0x50e298['query']);_0x6a48ad[_0x68ef('0x3b')]=_[_0x68ef('0x4f')](_0x50e298[_0x68ef('0x39')],qs[_0x68ef('0x50')](_0x156ce3['query'][_0x68ef('0x50')]));_0x6a48ad[_0x68ef('0x3b')]=_0x6a48ad['attributes'][_0x68ef('0x3c')]?_0x6a48ad[_0x68ef('0x3b')]:_0x50e298[_0x68ef('0x39')];_0x6a48ad['order']=qs[_0x68ef('0x3f')](_0x156ce3['query'][_0x68ef('0x3f')]);_0x6a48ad[_0x68ef('0x40')]=qs['filters'](_['pick'](_0x156ce3['query'],_0x50e298['filters']));if(_0x156ce3[_0x68ef('0x3a')][_0x68ef('0x42')]){_0x6a48ad[_0x68ef('0x40')]=_[_0x68ef('0x45')](_0x6a48ad[_0x68ef('0x40')],{'$or':_[_0x68ef('0x33')](_0x6a48ad[_0x68ef('0x3b')],function(_0x285744){var _0x24ba34={};_0x24ba34[_0x285744]={'$like':'%'+_0x156ce3[_0x68ef('0x3a')][_0x68ef('0x42')]+'%'};return _0x24ba34;})});}_0x6a48ad=_[_0x68ef('0x45')]({},_0x6a48ad,_0x156ce3[_0x68ef('0x46')]);return _0x15378c['getTeams'](_0x6a48ad);}})[_0x68ef('0x2d')](function(_0x556dfc){if(_0x556dfc){_0x391a81=_0x556dfc[_0x68ef('0x3c')];if(!_0x156ce3['query']['hasOwnProperty'](_0x68ef('0x3d'))){_0x6a48ad[_0x68ef('0x23')]=qs[_0x68ef('0x23')](_0x156ce3[_0x68ef('0x3a')]['limit']);_0x6a48ad['offset']=qs[_0x68ef('0x25')](_0x156ce3[_0x68ef('0x3a')][_0x68ef('0x25')]);}return _0x15378c['getTeams'](_0x6a48ad);}})[_0x68ef('0x2d')](function(_0x23c69e){if(_0x23c69e){return _0x23c69e?{'count':_0x391a81,'rows':_0x23c69e}:null;}})[_0x68ef('0x2d')](respondWithResult(_0x11feff,null))[_0x68ef('0x4c')](handleError(_0x11feff,null));};exports['addTeams']=function(_0x214e89,_0x1d158f,_0x31550b){var _0x59d7d=_0x214e89[_0x68ef('0x52')][_0x68ef('0x6b')];return db['Team'][_0x68ef('0x4a')]({'where':{'id':_0x59d7d},'attributes':['id'],'include':[{'model':db['User'],'as':_0x68ef('0x6c'),'attributes':['id',_0x68ef('0x31'),_0x68ef('0x6d'),_0x68ef('0x6e'),'interface'],'raw':!![]}]})[_0x68ef('0x2d')](function(_0x4c47ab){if(_0x4c47ab){var _0x3d8d69=_[_0x68ef('0x6f')](_0x4c47ab,function(_0x5d6a31){var _0x55486a=_0x5d6a31[_0x68ef('0x2e')]({'plain':!![]});return _0x55486a['Agents'];});return db[_0x68ef('0x34')]['find']({'where':{'id':_0x214e89[_0x68ef('0x5d')]['id']}})[_0x68ef('0x2d')](function(_0x17385b){return db[_0x68ef('0x70')][_0x68ef('0x71')](function(_0x66a7a8){return _0x17385b['addTeams'](_0x59d7d,{'transaction':_0x66a7a8})[_0x68ef('0x2d')](function(){return BPromise[_0x68ef('0x72')](_0x3d8d69,function(_0x31cf5b){return db[_0x68ef('0x60')][_0x68ef('0x73')]({'where':{'UserId':_0x31cf5b['id'],'WhatsappQueueId':_0x214e89[_0x68ef('0x5d')]['id']},'transaction':_0x66a7a8});});})[_0x68ef('0x2d')](function(){_0x3d8d69['forEach'](function(_0x295c0f){socket[_0x68ef('0x74')](_0x68ef('0x75'),{'UserId':_0x295c0f['id'],'WhatsappQueueId':_0x17385b['id']});});});});});}})[_0x68ef('0x2d')](respondWithStatusCode(_0x1d158f,null))[_0x68ef('0x4c')](handleError(_0x1d158f,null));};exports[_0x68ef('0x76')]=function(_0x3e0d3d,_0x4478de,_0x1bcbbb){return db['Team'][_0x68ef('0x4a')]({'where':{'id':_0x3e0d3d['query']['ids']},'attributes':['id'],'include':[{'model':db['User'],'as':_0x68ef('0x6c'),'attributes':['id'],'raw':!![]}]})[_0x68ef('0x2d')](handleEntityNotFound(_0x4478de,null))[_0x68ef('0x2d')](function(_0x55fc26){var _0x5aa209=_['map'](_0x55fc26,'id');var _0x2197c9=[];var _0x1d2b95=[];var _0x239d05=squel[_0x68ef('0x77')]();_0x239d05[_0x68ef('0x78')](_0x68ef('0x79'))['from'](_0x68ef('0x7a'),'tq')[_0x68ef('0x7b')](_0x68ef('0x7c'),'ut',_0x68ef('0x7d'))['where'](_0x68ef('0x7e'),_0x3e0d3d[_0x68ef('0x5d')]['id']);for(var _0x2e88ba=0x0;_0x2e88ba<_0x55fc26[_0x68ef('0x3c')];_0x2e88ba+=0x1){let _0x311a40=_0x55fc26[_0x2e88ba];for(var _0x254267=0x0;_0x254267<_0x311a40[_0x68ef('0x6c')][_0x68ef('0x3c')];_0x254267+=0x1){let _0x4cdc78=_0x311a40[_0x68ef('0x6c')][_0x254267];var _0x210ba6=_0x239d05['clone']();_0x210ba6[_0x68ef('0x40')](_0x68ef('0x7f'),_0x4cdc78['id']);_0x1d2b95[_0x68ef('0x80')](db[_0x68ef('0x70')][_0x68ef('0x3a')](_0x210ba6[_0x68ef('0x81')](),{'type':db[_0x68ef('0x70')][_0x68ef('0x82')][_0x68ef('0x83')]})[_0x68ef('0x2d')](function(_0x29522c){if(_0x29522c[_0x68ef('0x3c')]===0x1){return _0x4cdc78['id'];}else{var _0x2ce303=_[_0x68ef('0x84')](_[_0x68ef('0x33')](_0x29522c,_0x68ef('0x85')),function(_0x468130){return _[_0x68ef('0x86')](_0x5aa209,_0x468130);});if(_0x2ce303){return _0x4cdc78['id'];}}}));}}return BPromise['all'](_0x1d2b95)[_0x68ef('0x2d')](function(_0x2e815a){_0x2197c9=_(_0x2197c9)[_0x68ef('0x87')](_0x2e815a)[_0x68ef('0x88')]()[_0x68ef('0x89')]();return db['WhatsappQueue'][_0x68ef('0x5c')]({'where':{'id':_0x3e0d3d[_0x68ef('0x5d')]['id']}})['then'](function(_0x3d918b){return db['sequelize']['transaction'](function(_0x5a6148){return _0x3d918b['removeTeams'](_0x3e0d3d[_0x68ef('0x3a')]['ids'],{'transaction':_0x5a6148})[_0x68ef('0x2d')](function(){if(!_['isEmpty'](_0x2197c9)){return _0x3d918b['removeAgents'](_0x2197c9,{'transaction':_0x5a6148});}})['then'](function(){_0x2197c9[_0x68ef('0x8a')](function(_0x2e4c71){socket[_0x68ef('0x74')](_0x68ef('0x8b'),{'UserId':_0x2e4c71,'WhatsappQueueId':_0x3d918b['id']});});});});});});})[_0x68ef('0x2d')](respondWithStatusCode(_0x4478de,null))['catch'](handleError(_0x4478de,null));};exports[_0x68ef('0x8c')]=function(_0x263da0,_0x2fcfbe,_0x78f4f8){return db['WhatsappQueue'][_0x68ef('0x5c')]({'where':{'id':_0x263da0['params']['id']}})['then'](handleEntityNotFound(_0x2fcfbe,null))['then'](function(_0xbc0be3){if(_0xbc0be3){return _0xbc0be3[_0x68ef('0x8c')](_0x263da0[_0x68ef('0x52')][_0x68ef('0x6b')],_[_0x68ef('0x8d')](_0x263da0[_0x68ef('0x52')],[_0x68ef('0x6b'),'id'])||{})[_0x68ef('0x8e')](function(_0xa4e92){for(var _0x302c38=0x0;_0x302c38<_0x263da0[_0x68ef('0x52')][_0x68ef('0x6b')]['length'];_0x302c38+=0x1){socket['emit']('userWhatsappQueue:save',{'UserId':_0x263da0[_0x68ef('0x52')][_0x68ef('0x6b')][_0x302c38],'WhatsappQueueId':_0x263da0[_0x68ef('0x5d')]['id']});}return _0xa4e92;});}})['then'](respondWithResult(_0x2fcfbe,null))[_0x68ef('0x4c')](handleError(_0x2fcfbe,null));};exports['removeAgents']=function(_0x462a47,_0xc07b77,_0x635aa4){return db['WhatsappQueue'][_0x68ef('0x5c')]({'where':{'id':_0x462a47[_0x68ef('0x5d')]['id']}})['then'](handleEntityNotFound(_0xc07b77,null))[_0x68ef('0x2d')](function(_0x1b9bfc){if(_0x1b9bfc){return _0x1b9bfc[_0x68ef('0x8f')](_0x462a47[_0x68ef('0x3a')][_0x68ef('0x6b')])[_0x68ef('0x2d')](function(){if(_[_0x68ef('0x90')](_0x462a47['query'][_0x68ef('0x6b')])){for(var _0x26121d=0x0;_0x26121d<_0x462a47[_0x68ef('0x3a')][_0x68ef('0x6b')][_0x68ef('0x3c')];_0x26121d+=0x1){socket[_0x68ef('0x74')](_0x68ef('0x8b'),{'UserId':Number(_0x462a47[_0x68ef('0x3a')][_0x68ef('0x6b')][_0x26121d]),'WhatsappQueueId':Number(_0x462a47[_0x68ef('0x5d')]['id'])});}}else{socket['emit']('userWhatsappQueue:remove',{'UserId':Number(_0x462a47[_0x68ef('0x3a')]['ids']),'WhatsappQueueId':Number(_0x462a47[_0x68ef('0x5d')]['id'])});}});}})[_0x68ef('0x2d')](respondWithStatusCode(_0xc07b77,null))[_0x68ef('0x4c')](handleError(_0xc07b77,null));};exports[_0x68ef('0x91')]=function(_0xd2a5d3,_0x489c26,_0x80fa59){var _0x1c3449={};var _0x1910d2={};var _0x3c862a;var _0x5129e9;return db['WhatsappQueue'][_0x68ef('0x92')]({'where':{'id':_0xd2a5d3[_0x68ef('0x5d')]['id']}})[_0x68ef('0x2d')](handleEntityNotFound(_0x489c26,null))[_0x68ef('0x2d')](function(_0x1914e9){if(_0x1914e9){_0x3c862a=_0x1914e9;_0x1910d2[_0x68ef('0x39')]=_[_0x68ef('0x37')](db[_0x68ef('0x93')][_0x68ef('0x4e')]);_0x1910d2[_0x68ef('0x3a')]=_[_0x68ef('0x37')](_0xd2a5d3['query']);_0x1910d2[_0x68ef('0x38')]=_[_0x68ef('0x4f')](_0x1910d2[_0x68ef('0x39')],_0x1910d2[_0x68ef('0x3a')]);_0x1c3449[_0x68ef('0x3b')]=_[_0x68ef('0x4f')](_0x1910d2[_0x68ef('0x39')],qs[_0x68ef('0x50')](_0xd2a5d3[_0x68ef('0x3a')][_0x68ef('0x50')]));_0x1c3449['attributes']=_0x1c3449['attributes'][_0x68ef('0x3c')]?_0x1c3449[_0x68ef('0x3b')]:_0x1910d2[_0x68ef('0x39')];_0x1c3449[_0x68ef('0x3e')]=qs[_0x68ef('0x3f')](_0xd2a5d3[_0x68ef('0x3a')][_0x68ef('0x3f')]);_0x1c3449['where']=qs[_0x68ef('0x38')](_[_0x68ef('0x41')](_0xd2a5d3[_0x68ef('0x3a')],_0x1910d2[_0x68ef('0x38')]));if(_0xd2a5d3['query'][_0x68ef('0x42')]){_0x1c3449['where']=_[_0x68ef('0x45')](_0x1c3449[_0x68ef('0x40')],{'$or':_[_0x68ef('0x33')](_0x1c3449['attributes'],function(_0x53ff16){var _0xfc06d5={};_0xfc06d5[_0x53ff16]={'$like':'%'+_0xd2a5d3['query'][_0x68ef('0x42')]+'%'};return _0xfc06d5;})});}_0x1c3449=_['merge']({},_0x1c3449,_0xd2a5d3[_0x68ef('0x46')]);return _0x3c862a[_0x68ef('0x91')](_0x1c3449);}})['then'](function(_0x4a172f){if(_0x4a172f){_0x5129e9=_0x4a172f[_0x68ef('0x3c')];if(!_0xd2a5d3[_0x68ef('0x3a')]['hasOwnProperty'](_0x68ef('0x3d'))){_0x1c3449[_0x68ef('0x23')]=qs[_0x68ef('0x23')](_0xd2a5d3['query']['limit']);_0x1c3449[_0x68ef('0x25')]=qs['offset'](_0xd2a5d3[_0x68ef('0x3a')][_0x68ef('0x25')]);}return _0x3c862a[_0x68ef('0x91')](_0x1c3449);}})[_0x68ef('0x2d')](function(_0x15a8f1){if(_0x15a8f1){return _0x15a8f1?{'count':_0x5129e9,'rows':_0x15a8f1}:null;}})[_0x68ef('0x2d')](respondWithResult(_0x489c26,null))['catch'](handleError(_0x489c26,null));}; \ No newline at end of file +var _0x1cb9=['body','describe','getMembers','findOne','UserWhatsappQueue','hasOwnProperty','nolimit','WhatsappQueueId','User','findAndCountAll','UserId','whatsappPause','createdAt','%s/%s','SIP','updatedAt','order','getTeams','addTeams','ids','Team','Agents','online','voicePause','interface','flatMap','sequelize','transaction','each','emit','userWhatsappQueue:save','removeTeams','select','field','tq.TeamId','from','team_has_whatsapp_queues','join','WhatsappQueueId\x20=\x20?','clone','ut.UserId\x20=\x20?','toString','QueryTypes','includes','all','union','compact','value','isEmpty','removeAgents','forEach','userWhatsappQueue:remove','addAgents','spread','isArray','getAgents','eml-format','zip-dir','fast-json-patch','request-promise','moment','mustache','util','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','localhost','socket.io-emitter','status','end','undefined','limit','offset','set','Content-Range','apply','reject','save','update','then','destroy','get','UserProfileResource','stack','name','send','index','map','WhatsappQueue','rawAttributes','fieldName','type','key','model','query','intersection','fields','attributes','length','sort','where','filters','pick','filter','VIRTUAL','merge','options','count','include','findAll','rows','catch','params','keys','includeAll','create','user','WhatsappQueues','UserProfileSection','find','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s'];(function(_0x589da8,_0x4cbcb1){var _0x296e44=function(_0x4b0505){while(--_0x4b0505){_0x589da8['push'](_0x589da8['shift']());}};_0x296e44(++_0x4cbcb1);}(_0x1cb9,0x14e));var _0x91cb=function(_0x8f3e9f,_0x2ac630){_0x8f3e9f=_0x8f3e9f-0x0;var _0x2425ed=_0x1cb9[_0x8f3e9f];return _0x2425ed;};'use strict';var emlformat=require(_0x91cb('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x91cb('0x1'));var jsonpatch=require(_0x91cb('0x2'));var rp=require(_0x91cb('0x3'));var moment=require(_0x91cb('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x91cb('0x5'));var util=require(_0x91cb('0x6'));var path=require('path');var sox=require(_0x91cb('0x7'));var csv=require(_0x91cb('0x8'));var ejs=require(_0x91cb('0x9'));var fs=require('fs');var fs_extra=require(_0x91cb('0xa'));var _=require(_0x91cb('0xb'));var squel=require(_0x91cb('0xc'));var crypto=require('crypto');var jsforce=require(_0x91cb('0xd'));var deskjs=require('desk.js');var toCsv=require(_0x91cb('0x8'));var querystring=require('querystring');var Papa=require(_0x91cb('0xe'));var Redis=require(_0x91cb('0xf'));var authService=require(_0x91cb('0x10'));var qs=require(_0x91cb('0x11'));var as=require(_0x91cb('0x12'));var hardwareService=require(_0x91cb('0x13'));var logger=require(_0x91cb('0x14'))(_0x91cb('0x15'));var utils=require(_0x91cb('0x16'));var config=require(_0x91cb('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0x91cb('0x18'))['db'];config[_0x91cb('0x19')]=_['defaults'](config[_0x91cb('0x19')],{'host':_0x91cb('0x1a'),'port':0x18eb});var socket=require(_0x91cb('0x1b'))(new Redis(config[_0x91cb('0x19')]));require('./whatsappQueue.socket')['register'](socket);function respondWithStatusCode(_0x4aae25,_0x3d22b7){_0x3d22b7=_0x3d22b7||0xcc;return function(_0x585470){if(_0x585470){return _0x4aae25['sendStatus'](_0x3d22b7);}return _0x4aae25[_0x91cb('0x1c')](_0x3d22b7)[_0x91cb('0x1d')]();};}function respondWithResult(_0x347980,_0x5ea796){_0x5ea796=_0x5ea796||0xc8;return function(_0x238f11){if(_0x238f11){return _0x347980[_0x91cb('0x1c')](_0x5ea796)['json'](_0x238f11);}};}function respondWithFilteredResult(_0xc594e3,_0x139f4b){return function(_0x1cd34b){if(_0x1cd34b){var _0xcd1a78=typeof _0x139f4b['offset']===_0x91cb('0x1e')&&typeof _0x139f4b[_0x91cb('0x1f')]==='undefined';var _0x123847=_0x1cd34b['count'];var _0x55042a=_0xcd1a78?0x0:_0x139f4b[_0x91cb('0x20')];var _0x160ded=_0xcd1a78?_0x1cd34b['count']:_0x139f4b['offset']+_0x139f4b['limit'];var _0x438162;if(_0x160ded>=_0x123847){_0x160ded=_0x123847;_0x438162=0xc8;}else{_0x438162=0xce;}_0xc594e3[_0x91cb('0x1c')](_0x438162);return _0xc594e3[_0x91cb('0x21')](_0x91cb('0x22'),_0x55042a+'-'+_0x160ded+'/'+_0x123847)['json'](_0x1cd34b);}return null;};}function patchUpdates(_0x45c4b3){return function(_0x43881c){try{jsonpatch[_0x91cb('0x23')](_0x43881c,_0x45c4b3,!![]);}catch(_0x55fa78){return BPromise[_0x91cb('0x24')](_0x55fa78);}return _0x43881c[_0x91cb('0x25')]();};}function saveUpdates(_0x2447e7,_0x422d14){return function(_0x3ca500){if(_0x3ca500){return _0x3ca500[_0x91cb('0x26')](_0x2447e7)[_0x91cb('0x27')](function(_0x423c4f){return _0x423c4f;});}return null;};}function removeEntity(_0x264e9b,_0x4c8438){return function(_0x59bf3a){if(_0x59bf3a){return _0x59bf3a[_0x91cb('0x28')]()['then'](function(){var _0x1c67d2=_0x59bf3a[_0x91cb('0x29')]({'plain':!![]});var _0x318031='WhatsappQueues';return db[_0x91cb('0x2a')]['destroy']({'where':{'type':_0x318031,'resourceId':_0x1c67d2['id']}})[_0x91cb('0x27')](function(){return _0x59bf3a;});})[_0x91cb('0x27')](function(){_0x264e9b[_0x91cb('0x1c')](0xcc)[_0x91cb('0x1d')]();});}};}function handleEntityNotFound(_0x468908,_0x504275){return function(_0x2f04a3){if(!_0x2f04a3){_0x468908['sendStatus'](0x194);}return _0x2f04a3;};}function handleError(_0x196385,_0x30204e){_0x30204e=_0x30204e||0x1f4;return function(_0x445fe1){logger['error'](_0x445fe1[_0x91cb('0x2b')]);if(_0x445fe1[_0x91cb('0x2c')]){delete _0x445fe1[_0x91cb('0x2c')];}_0x196385[_0x91cb('0x1c')](_0x30204e)[_0x91cb('0x2d')](_0x445fe1);};}exports[_0x91cb('0x2e')]=function(_0x1e5bf1,_0x3bbde3){var _0x1a10b1={},_0x5e6ed3={},_0x2ccf6e={'count':0x0,'rows':[]};var _0x474a15=_[_0x91cb('0x2f')](db[_0x91cb('0x30')][_0x91cb('0x31')],function(_0x4e70cd){return{'name':_0x4e70cd[_0x91cb('0x32')],'type':_0x4e70cd[_0x91cb('0x33')][_0x91cb('0x34')]};});_0x5e6ed3[_0x91cb('0x35')]=_[_0x91cb('0x2f')](_0x474a15,'name');_0x5e6ed3[_0x91cb('0x36')]=_['keys'](_0x1e5bf1['query']);_0x5e6ed3['filters']=_[_0x91cb('0x37')](_0x5e6ed3['model'],_0x5e6ed3[_0x91cb('0x36')]);_0x1a10b1['attributes']=_['intersection'](_0x5e6ed3[_0x91cb('0x35')],qs[_0x91cb('0x38')](_0x1e5bf1[_0x91cb('0x36')][_0x91cb('0x38')]));_0x1a10b1[_0x91cb('0x39')]=_0x1a10b1['attributes'][_0x91cb('0x3a')]?_0x1a10b1[_0x91cb('0x39')]:_0x5e6ed3[_0x91cb('0x35')];if(!_0x1e5bf1[_0x91cb('0x36')]['hasOwnProperty']('nolimit')){_0x1a10b1[_0x91cb('0x1f')]=qs[_0x91cb('0x1f')](_0x1e5bf1['query'][_0x91cb('0x1f')]);_0x1a10b1[_0x91cb('0x20')]=qs['offset'](_0x1e5bf1[_0x91cb('0x36')][_0x91cb('0x20')]);}_0x1a10b1['order']=qs[_0x91cb('0x3b')](_0x1e5bf1['query'][_0x91cb('0x3b')]);_0x1a10b1[_0x91cb('0x3c')]=qs[_0x91cb('0x3d')](_[_0x91cb('0x3e')](_0x1e5bf1[_0x91cb('0x36')],_0x5e6ed3[_0x91cb('0x3d')]),_0x474a15);if(_0x1e5bf1['query'][_0x91cb('0x3f')]){_0x1a10b1[_0x91cb('0x3c')]=_['merge'](_0x1a10b1[_0x91cb('0x3c')],{'$or':_['map'](_0x474a15,function(_0x2c6102){if(_0x2c6102[_0x91cb('0x33')]!==_0x91cb('0x40')){var _0x174794={};_0x174794[_0x2c6102['name']]={'$like':'%'+_0x1e5bf1[_0x91cb('0x36')][_0x91cb('0x3f')]+'%'};return _0x174794;}})});}_0x1a10b1=_[_0x91cb('0x41')]({},_0x1a10b1,_0x1e5bf1[_0x91cb('0x42')]);var _0x42a7f3={'where':_0x1a10b1[_0x91cb('0x3c')]};return db[_0x91cb('0x30')][_0x91cb('0x43')](_0x42a7f3)[_0x91cb('0x27')](function(_0x3cc4c1){_0x2ccf6e['count']=_0x3cc4c1;if(_0x1e5bf1[_0x91cb('0x36')]['includeAll']){_0x1a10b1[_0x91cb('0x44')]=[{'all':!![]}];}return db['WhatsappQueue'][_0x91cb('0x45')](_0x1a10b1);})['then'](function(_0x138f48){_0x2ccf6e[_0x91cb('0x46')]=_0x138f48;return _0x2ccf6e;})[_0x91cb('0x27')](respondWithFilteredResult(_0x3bbde3,_0x1a10b1))[_0x91cb('0x47')](handleError(_0x3bbde3,null));};exports['show']=function(_0x2cdb61,_0x230f58){var _0x57e26d={'raw':!![],'where':{'id':_0x2cdb61[_0x91cb('0x48')]['id']}},_0x461e1e={};_0x461e1e[_0x91cb('0x35')]=_[_0x91cb('0x49')](db[_0x91cb('0x30')][_0x91cb('0x31')]);_0x461e1e[_0x91cb('0x36')]=_[_0x91cb('0x49')](_0x2cdb61[_0x91cb('0x36')]);_0x461e1e['filters']=_[_0x91cb('0x37')](_0x461e1e[_0x91cb('0x35')],_0x461e1e[_0x91cb('0x36')]);_0x57e26d[_0x91cb('0x39')]=_[_0x91cb('0x37')](_0x461e1e[_0x91cb('0x35')],qs[_0x91cb('0x38')](_0x2cdb61[_0x91cb('0x36')]['fields']));_0x57e26d[_0x91cb('0x39')]=_0x57e26d[_0x91cb('0x39')][_0x91cb('0x3a')]?_0x57e26d[_0x91cb('0x39')]:_0x461e1e['model'];if(_0x2cdb61[_0x91cb('0x36')][_0x91cb('0x4a')]){_0x57e26d['include']=[{'all':!![]}];}_0x57e26d=_[_0x91cb('0x41')]({},_0x57e26d,_0x2cdb61['options']);return db[_0x91cb('0x30')]['find'](_0x57e26d)['then'](handleEntityNotFound(_0x230f58,null))['then'](respondWithResult(_0x230f58,null))[_0x91cb('0x47')](handleError(_0x230f58,null));};exports[_0x91cb('0x4b')]=function(_0x3d62c4,_0x2f8384){return db[_0x91cb('0x30')]['create'](_0x3d62c4['body'],{})[_0x91cb('0x27')](function(_0xfe6692){var _0x140994=_0x3d62c4[_0x91cb('0x4c')]['get']({'plain':!![]});if(!_0x140994)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x140994['role']===_0x91cb('0x4c')){var _0x490417=_0xfe6692[_0x91cb('0x29')]({'plain':!![]});var _0x4aa670=_0x91cb('0x4d');return db[_0x91cb('0x4e')][_0x91cb('0x4f')]({'where':{'name':_0x4aa670,'userProfileId':_0x140994[_0x91cb('0x50')]},'raw':!![]})[_0x91cb('0x27')](function(_0x362532){if(_0x362532&&_0x362532[_0x91cb('0x51')]===0x0){return db[_0x91cb('0x2a')][_0x91cb('0x4b')]({'name':_0x490417[_0x91cb('0x2c')],'resourceId':_0x490417['id'],'type':_0x362532[_0x91cb('0x2c')],'sectionId':_0x362532['id']},{})['then'](function(){return _0xfe6692;});}else{return _0xfe6692;}})[_0x91cb('0x47')](function(_0x1fa45a){logger['error'](_0x91cb('0x52'),_0x1fa45a);throw _0x1fa45a;});}return _0xfe6692;})[_0x91cb('0x27')](respondWithResult(_0x2f8384,0xc9))['catch'](handleError(_0x2f8384,null));};exports[_0x91cb('0x26')]=function(_0x166eeb,_0x13b204){if(_0x166eeb[_0x91cb('0x53')]['id']){delete _0x166eeb[_0x91cb('0x53')]['id'];}return db[_0x91cb('0x30')][_0x91cb('0x4f')]({'where':{'id':_0x166eeb[_0x91cb('0x48')]['id']}})[_0x91cb('0x27')](handleEntityNotFound(_0x13b204,null))[_0x91cb('0x27')](saveUpdates(_0x166eeb[_0x91cb('0x53')],null))['then'](respondWithResult(_0x13b204,null))[_0x91cb('0x47')](handleError(_0x13b204,null));};exports['destroy']=function(_0x37221e,_0x485cca){return db[_0x91cb('0x30')][_0x91cb('0x4f')]({'where':{'id':_0x37221e[_0x91cb('0x48')]['id']}})['then'](handleEntityNotFound(_0x485cca,null))[_0x91cb('0x27')](removeEntity(_0x485cca,null))[_0x91cb('0x47')](handleError(_0x485cca,null));};exports['describe']=function(_0xef4754,_0x102025){return db[_0x91cb('0x30')][_0x91cb('0x54')]()['then'](respondWithResult(_0x102025,null))[_0x91cb('0x47')](handleError(_0x102025,null));};exports[_0x91cb('0x55')]=function(_0x4250c2,_0x373076,_0x55a0e3){var _0x11025a={'raw':!![],'where':{}},_0x2ce6cd={},_0x5c2c01;return db['WhatsappQueue'][_0x91cb('0x56')]({'where':{'id':_0x4250c2['params']['id']}})[_0x91cb('0x27')](handleEntityNotFound(_0x373076,null))[_0x91cb('0x27')](function(_0x5ae0d2){if(_0x5ae0d2){_0x5c2c01=_0x5ae0d2['get']({'plain':!![]});_0x2ce6cd[_0x91cb('0x35')]=_['keys'](db[_0x91cb('0x57')][_0x91cb('0x31')]);_0x2ce6cd[_0x91cb('0x36')]=_['keys'](_0x4250c2[_0x91cb('0x36')]);_0x2ce6cd['filters']=_[_0x91cb('0x37')](_0x2ce6cd[_0x91cb('0x35')],_0x2ce6cd[_0x91cb('0x36')]);_0x11025a[_0x91cb('0x39')]=_['intersection'](_0x2ce6cd[_0x91cb('0x35')],qs[_0x91cb('0x38')](_0x4250c2[_0x91cb('0x36')][_0x91cb('0x38')]));_0x11025a[_0x91cb('0x39')]=_0x11025a[_0x91cb('0x39')][_0x91cb('0x3a')]?_0x11025a[_0x91cb('0x39')]:_0x2ce6cd[_0x91cb('0x35')];if(!_0x4250c2[_0x91cb('0x36')][_0x91cb('0x58')](_0x91cb('0x59'))){_0x11025a['limit']=qs[_0x91cb('0x1f')](_0x4250c2[_0x91cb('0x36')][_0x91cb('0x1f')]);_0x11025a[_0x91cb('0x20')]=qs[_0x91cb('0x20')](_0x4250c2[_0x91cb('0x36')][_0x91cb('0x20')]);}_0x11025a['order']=qs[_0x91cb('0x3b')](_0x4250c2['query'][_0x91cb('0x3b')]);_0x11025a[_0x91cb('0x3c')]=qs[_0x91cb('0x3d')](_[_0x91cb('0x3e')](_0x4250c2['query'],_0x2ce6cd[_0x91cb('0x3d')]));_0x11025a[_0x91cb('0x3c')][_0x91cb('0x5a')]=_0x5ae0d2['id'];if(_0x4250c2[_0x91cb('0x36')][_0x91cb('0x3f')]){_0x11025a[_0x91cb('0x3c')]=_['merge'](_0x11025a[_0x91cb('0x3c')],{'$or':_[_0x91cb('0x2f')](_0x11025a[_0x91cb('0x39')],function(_0x1f0ba2){var _0x891569={};_0x891569[_0x1f0ba2]={'$like':'%'+_0x4250c2[_0x91cb('0x36')][_0x91cb('0x3f')]+'%'};return _0x891569;})});}_0x11025a=_[_0x91cb('0x41')]({},_0x11025a,_0x4250c2[_0x91cb('0x42')]);return db[_0x91cb('0x57')][_0x91cb('0x45')](_0x11025a);}})[_0x91cb('0x27')](function(_0xda123b){if(_0xda123b){return db[_0x91cb('0x5b')][_0x91cb('0x5c')]({'where':{'id':_[_0x91cb('0x2f')](_0xda123b,_0x91cb('0x5d')),'role':'agent'},'attributes':['id',_0x91cb('0x2c'),_0x91cb('0x5e'),'updatedAt',_0x91cb('0x5f')]});}})[_0x91cb('0x27')](function(_0x1c3e0a){if(_0x1c3e0a){return{'count':_0x1c3e0a['count'],'rows':_[_0x91cb('0x2f')](_0x1c3e0a[_0x91cb('0x46')],function(_0x5cd31c){return{'membername':_0x5cd31c['name'],'UserId':_0x5cd31c['id'],'queue_name':_0x5c2c01[_0x91cb('0x2c')],'WhatsappQueueId':_0x5c2c01['id'],'interface':util['format'](_0x91cb('0x60'),_0x91cb('0x61'),_0x5cd31c['name']),'penalty':0x0,'paused':_0x5cd31c[_0x91cb('0x5e')],'createdAt':_0x5cd31c['createdAt'],'updatedAt':_0x5cd31c[_0x91cb('0x62')]};})};}else{return{'count':0x0,'rows':[]};}})[_0x91cb('0x27')](respondWithFilteredResult(_0x373076,_0x11025a))['catch'](handleError(_0x373076,null));};exports['getTeams']=function(_0x16a21f,_0x43be3e,_0x37666a){var _0x4b5bea={};var _0x154014={};var _0x23a458;var _0x98fb94;return db[_0x91cb('0x30')]['findOne']({'where':{'id':_0x16a21f[_0x91cb('0x48')]['id']}})['then'](handleEntityNotFound(_0x43be3e,null))[_0x91cb('0x27')](function(_0x4118eb){if(_0x4118eb){_0x23a458=_0x4118eb;_0x154014[_0x91cb('0x35')]=_[_0x91cb('0x49')](db['Team']['rawAttributes']);_0x154014[_0x91cb('0x36')]=_['keys'](_0x16a21f[_0x91cb('0x36')]);_0x154014[_0x91cb('0x3d')]=_[_0x91cb('0x37')](_0x154014[_0x91cb('0x35')],_0x154014[_0x91cb('0x36')]);_0x4b5bea[_0x91cb('0x39')]=_[_0x91cb('0x37')](_0x154014['model'],qs[_0x91cb('0x38')](_0x16a21f[_0x91cb('0x36')]['fields']));_0x4b5bea[_0x91cb('0x39')]=_0x4b5bea['attributes'][_0x91cb('0x3a')]?_0x4b5bea[_0x91cb('0x39')]:_0x154014[_0x91cb('0x35')];_0x4b5bea[_0x91cb('0x63')]=qs[_0x91cb('0x3b')](_0x16a21f[_0x91cb('0x36')][_0x91cb('0x3b')]);_0x4b5bea[_0x91cb('0x3c')]=qs[_0x91cb('0x3d')](_[_0x91cb('0x3e')](_0x16a21f[_0x91cb('0x36')],_0x154014[_0x91cb('0x3d')]));if(_0x16a21f[_0x91cb('0x36')][_0x91cb('0x3f')]){_0x4b5bea[_0x91cb('0x3c')]=_[_0x91cb('0x41')](_0x4b5bea['where'],{'$or':_[_0x91cb('0x2f')](_0x4b5bea['attributes'],function(_0x1235c0){var _0x123d72={};_0x123d72[_0x1235c0]={'$like':'%'+_0x16a21f[_0x91cb('0x36')][_0x91cb('0x3f')]+'%'};return _0x123d72;})});}_0x4b5bea=_[_0x91cb('0x41')]({},_0x4b5bea,_0x16a21f[_0x91cb('0x42')]);return _0x23a458[_0x91cb('0x64')](_0x4b5bea);}})[_0x91cb('0x27')](function(_0x569df1){if(_0x569df1){_0x98fb94=_0x569df1[_0x91cb('0x3a')];if(!_0x16a21f[_0x91cb('0x36')]['hasOwnProperty']('nolimit')){_0x4b5bea[_0x91cb('0x1f')]=qs['limit'](_0x16a21f['query'][_0x91cb('0x1f')]);_0x4b5bea['offset']=qs[_0x91cb('0x20')](_0x16a21f['query'][_0x91cb('0x20')]);}return _0x23a458[_0x91cb('0x64')](_0x4b5bea);}})[_0x91cb('0x27')](function(_0x443c01){if(_0x443c01){return _0x443c01?{'count':_0x98fb94,'rows':_0x443c01}:null;}})['then'](respondWithResult(_0x43be3e,null))[_0x91cb('0x47')](handleError(_0x43be3e,null));};exports[_0x91cb('0x65')]=function(_0x42d07b,_0x427afd,_0x3325f8){var _0x22f871=_0x42d07b[_0x91cb('0x53')][_0x91cb('0x66')];return db[_0x91cb('0x67')][_0x91cb('0x45')]({'where':{'id':_0x22f871},'attributes':['id'],'include':[{'model':db[_0x91cb('0x5b')],'as':_0x91cb('0x68'),'attributes':['id',_0x91cb('0x2c'),_0x91cb('0x69'),_0x91cb('0x6a'),_0x91cb('0x6b')],'raw':!![]}]})[_0x91cb('0x27')](function(_0x39fce4){if(_0x39fce4){var _0x30640e=_[_0x91cb('0x6c')](_0x39fce4,function(_0x315518){var _0x3d944d=_0x315518[_0x91cb('0x29')]({'plain':!![]});return _0x3d944d[_0x91cb('0x68')];});return db[_0x91cb('0x30')]['find']({'where':{'id':_0x42d07b[_0x91cb('0x48')]['id']}})[_0x91cb('0x27')](function(_0x1178be){return db[_0x91cb('0x6d')][_0x91cb('0x6e')](function(_0x650ac9){return _0x1178be[_0x91cb('0x65')](_0x22f871,{'transaction':_0x650ac9})[_0x91cb('0x27')](function(){return BPromise[_0x91cb('0x6f')](_0x30640e,function(_0x1bd600){return db[_0x91cb('0x57')]['findOrCreate']({'where':{'UserId':_0x1bd600['id'],'WhatsappQueueId':_0x42d07b[_0x91cb('0x48')]['id']},'transaction':_0x650ac9});});})['then'](function(){_0x30640e['forEach'](function(_0x4023f5){socket[_0x91cb('0x70')](_0x91cb('0x71'),{'UserId':_0x4023f5['id'],'WhatsappQueueId':_0x1178be['id']});});});});});}})[_0x91cb('0x27')](respondWithStatusCode(_0x427afd,null))[_0x91cb('0x47')](handleError(_0x427afd,null));};exports[_0x91cb('0x72')]=function(_0x210b46,_0x314c9a,_0x3bf014){return db[_0x91cb('0x67')]['findAll']({'where':{'id':_0x210b46[_0x91cb('0x36')][_0x91cb('0x66')]},'attributes':['id'],'include':[{'model':db['User'],'as':_0x91cb('0x68'),'attributes':['id'],'raw':!![]}]})[_0x91cb('0x27')](handleEntityNotFound(_0x314c9a,null))['then'](function(_0xecd79c){var _0x2ff4bc=_[_0x91cb('0x2f')](_0xecd79c,'id');var _0x341816=[];var _0x374899=[];var _0x252c60=squel[_0x91cb('0x73')]();_0x252c60[_0x91cb('0x74')](_0x91cb('0x75'))[_0x91cb('0x76')](_0x91cb('0x77'),'tq')[_0x91cb('0x78')]('user_has_teams','ut','ut.TeamId\x20=\x20tq.TeamId')[_0x91cb('0x3c')](_0x91cb('0x79'),_0x210b46[_0x91cb('0x48')]['id']);for(var _0x3667d7=0x0;_0x3667d7<_0xecd79c[_0x91cb('0x3a')];_0x3667d7+=0x1){let _0xe53fe8=_0xecd79c[_0x3667d7];for(var _0x1a5506=0x0;_0x1a5506<_0xe53fe8['Agents'][_0x91cb('0x3a')];_0x1a5506+=0x1){let _0x5c4a2e=_0xe53fe8[_0x91cb('0x68')][_0x1a5506];var _0x7f23c2=_0x252c60[_0x91cb('0x7a')]();_0x7f23c2[_0x91cb('0x3c')](_0x91cb('0x7b'),_0x5c4a2e['id']);_0x374899['push'](db[_0x91cb('0x6d')][_0x91cb('0x36')](_0x7f23c2[_0x91cb('0x7c')](),{'type':db[_0x91cb('0x6d')][_0x91cb('0x7d')]['SELECT']})[_0x91cb('0x27')](function(_0x9cff8f){if(_0x9cff8f[_0x91cb('0x3a')]===0x1){return _0x5c4a2e['id'];}else{var _0x282850=_['every'](_['map'](_0x9cff8f,'TeamId'),function(_0x28c14e){return _[_0x91cb('0x7e')](_0x2ff4bc,_0x28c14e);});if(_0x282850){return _0x5c4a2e['id'];}}}));}}return BPromise[_0x91cb('0x7f')](_0x374899)[_0x91cb('0x27')](function(_0x49833b){_0x341816=_(_0x341816)[_0x91cb('0x80')](_0x49833b)[_0x91cb('0x81')]()[_0x91cb('0x82')]();return db[_0x91cb('0x30')]['find']({'where':{'id':_0x210b46['params']['id']}})[_0x91cb('0x27')](function(_0x773ecd){return db[_0x91cb('0x6d')][_0x91cb('0x6e')](function(_0x2b5a3d){return _0x773ecd[_0x91cb('0x72')](_0x210b46[_0x91cb('0x36')][_0x91cb('0x66')],{'transaction':_0x2b5a3d})[_0x91cb('0x27')](function(){if(!_[_0x91cb('0x83')](_0x341816)){return _0x773ecd[_0x91cb('0x84')](_0x341816,{'transaction':_0x2b5a3d});}})[_0x91cb('0x27')](function(){_0x341816[_0x91cb('0x85')](function(_0x519700){socket['emit'](_0x91cb('0x86'),{'UserId':_0x519700,'WhatsappQueueId':_0x773ecd['id']});});});});});});})['then'](respondWithStatusCode(_0x314c9a,null))[_0x91cb('0x47')](handleError(_0x314c9a,null));};exports[_0x91cb('0x87')]=function(_0x402c43,_0x38047d,_0x456035){return db[_0x91cb('0x30')][_0x91cb('0x4f')]({'where':{'id':_0x402c43[_0x91cb('0x48')]['id']}})['then'](handleEntityNotFound(_0x38047d,null))[_0x91cb('0x27')](function(_0x45d55e){if(_0x45d55e){return _0x45d55e[_0x91cb('0x87')](_0x402c43[_0x91cb('0x53')][_0x91cb('0x66')],_['omit'](_0x402c43[_0x91cb('0x53')],[_0x91cb('0x66'),'id'])||{})[_0x91cb('0x88')](function(_0xac943e){for(var _0x228fee=0x0;_0x228fee<_0x402c43['body'][_0x91cb('0x66')][_0x91cb('0x3a')];_0x228fee+=0x1){socket[_0x91cb('0x70')](_0x91cb('0x71'),{'UserId':_0x402c43[_0x91cb('0x53')][_0x91cb('0x66')][_0x228fee],'WhatsappQueueId':_0x402c43[_0x91cb('0x48')]['id']});}return _0xac943e;});}})[_0x91cb('0x27')](respondWithResult(_0x38047d,null))[_0x91cb('0x47')](handleError(_0x38047d,null));};exports[_0x91cb('0x84')]=function(_0x2aaa67,_0x3f77de,_0x1312f6){return db[_0x91cb('0x30')][_0x91cb('0x4f')]({'where':{'id':_0x2aaa67[_0x91cb('0x48')]['id']}})[_0x91cb('0x27')](handleEntityNotFound(_0x3f77de,null))[_0x91cb('0x27')](function(_0x41c7e7){if(_0x41c7e7){return _0x41c7e7[_0x91cb('0x84')](_0x2aaa67[_0x91cb('0x36')][_0x91cb('0x66')])[_0x91cb('0x27')](function(){if(_[_0x91cb('0x89')](_0x2aaa67[_0x91cb('0x36')][_0x91cb('0x66')])){for(var _0x557aa1=0x0;_0x557aa1<_0x2aaa67[_0x91cb('0x36')][_0x91cb('0x66')][_0x91cb('0x3a')];_0x557aa1+=0x1){socket[_0x91cb('0x70')](_0x91cb('0x86'),{'UserId':Number(_0x2aaa67['query']['ids'][_0x557aa1]),'WhatsappQueueId':Number(_0x2aaa67['params']['id'])});}}else{socket['emit']('userWhatsappQueue:remove',{'UserId':Number(_0x2aaa67[_0x91cb('0x36')][_0x91cb('0x66')]),'WhatsappQueueId':Number(_0x2aaa67[_0x91cb('0x48')]['id'])});}});}})[_0x91cb('0x27')](respondWithStatusCode(_0x3f77de,null))[_0x91cb('0x47')](handleError(_0x3f77de,null));};exports[_0x91cb('0x8a')]=function(_0x3462c5,_0x146346,_0xe3d97f){var _0x3b93c3={};var _0x539b3d={};var _0x2afcc3;var _0x19c2c9;return db['WhatsappQueue'][_0x91cb('0x56')]({'where':{'id':_0x3462c5[_0x91cb('0x48')]['id']}})[_0x91cb('0x27')](handleEntityNotFound(_0x146346,null))[_0x91cb('0x27')](function(_0x1837ec){if(_0x1837ec){_0x2afcc3=_0x1837ec;_0x539b3d[_0x91cb('0x35')]=_[_0x91cb('0x49')](db['User'][_0x91cb('0x31')]);_0x539b3d[_0x91cb('0x36')]=_[_0x91cb('0x49')](_0x3462c5[_0x91cb('0x36')]);_0x539b3d[_0x91cb('0x3d')]=_[_0x91cb('0x37')](_0x539b3d[_0x91cb('0x35')],_0x539b3d['query']);_0x3b93c3[_0x91cb('0x39')]=_['intersection'](_0x539b3d[_0x91cb('0x35')],qs[_0x91cb('0x38')](_0x3462c5[_0x91cb('0x36')][_0x91cb('0x38')]));_0x3b93c3[_0x91cb('0x39')]=_0x3b93c3[_0x91cb('0x39')][_0x91cb('0x3a')]?_0x3b93c3[_0x91cb('0x39')]:_0x539b3d[_0x91cb('0x35')];_0x3b93c3['order']=qs[_0x91cb('0x3b')](_0x3462c5[_0x91cb('0x36')][_0x91cb('0x3b')]);_0x3b93c3[_0x91cb('0x3c')]=qs[_0x91cb('0x3d')](_[_0x91cb('0x3e')](_0x3462c5[_0x91cb('0x36')],_0x539b3d[_0x91cb('0x3d')]));if(_0x3462c5[_0x91cb('0x36')][_0x91cb('0x3f')]){_0x3b93c3[_0x91cb('0x3c')]=_[_0x91cb('0x41')](_0x3b93c3[_0x91cb('0x3c')],{'$or':_['map'](_0x3b93c3[_0x91cb('0x39')],function(_0x4f12b0){var _0x39ba62={};_0x39ba62[_0x4f12b0]={'$like':'%'+_0x3462c5[_0x91cb('0x36')][_0x91cb('0x3f')]+'%'};return _0x39ba62;})});}_0x3b93c3=_[_0x91cb('0x41')]({},_0x3b93c3,_0x3462c5[_0x91cb('0x42')]);return _0x2afcc3[_0x91cb('0x8a')](_0x3b93c3);}})[_0x91cb('0x27')](function(_0x17f5dd){if(_0x17f5dd){_0x19c2c9=_0x17f5dd['length'];if(!_0x3462c5[_0x91cb('0x36')]['hasOwnProperty'](_0x91cb('0x59'))){_0x3b93c3[_0x91cb('0x1f')]=qs[_0x91cb('0x1f')](_0x3462c5['query'][_0x91cb('0x1f')]);_0x3b93c3[_0x91cb('0x20')]=qs[_0x91cb('0x20')](_0x3462c5['query']['offset']);}return _0x2afcc3['getAgents'](_0x3b93c3);}})[_0x91cb('0x27')](function(_0x3b523c){if(_0x3b523c){return _0x3b523c?{'count':_0x19c2c9,'rows':_0x3b523c}:null;}})[_0x91cb('0x27')](respondWithResult(_0x146346,null))['catch'](handleError(_0x146346,null));}; \ No newline at end of file diff --git a/server/api/whatsappQueue/whatsappQueue.events.js b/server/api/whatsappQueue/whatsappQueue.events.js index 96ec222..c37ab7e 100644 --- a/server/api/whatsappQueue/whatsappQueue.events.js +++ b/server/api/whatsappQueue/whatsappQueue.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbe38=['hook','exports','WhatsappQueue','setMaxListeners','save','update','hasOwnProperty'];(function(_0x14a564,_0x2f4821){var _0x4cca25=function(_0x9ffbc1){while(--_0x9ffbc1){_0x14a564['push'](_0x14a564['shift']());}};_0x4cca25(++_0x2f4821);}(_0xbe38,0x198));var _0x8be3=function(_0x3a75a1,_0x18842d){_0x3a75a1=_0x3a75a1-0x0;var _0x1f9f87=_0xbe38[_0x3a75a1];return _0x1f9f87;};'use strict';var EventEmitter=require('events');var WhatsappQueue=require('../../mysqldb')['db'][_0x8be3('0x0')];var WhatsappQueueEvents=new EventEmitter();WhatsappQueueEvents[_0x8be3('0x1')](0x0);var events={'afterCreate':_0x8be3('0x2'),'afterUpdate':_0x8be3('0x3'),'afterDestroy':'remove'};function emitEvent(_0x121116){return function(_0x241d2c,_0x2609c9,_0x41611c){WhatsappQueueEvents['emit'](_0x121116+':'+_0x241d2c['id'],_0x241d2c);WhatsappQueueEvents['emit'](_0x121116,_0x241d2c);_0x41611c(null);};}for(var e in events){if(events[_0x8be3('0x4')](e)){var event=events[e];WhatsappQueue[_0x8be3('0x5')](e,emitEvent(event));}}module[_0x8be3('0x6')]=WhatsappQueueEvents; \ No newline at end of file +var _0xf493=['../../mysqldb','WhatsappQueue','save','update','emit','hasOwnProperty','events'];(function(_0xc3b571,_0x413137){var _0x25b432=function(_0x1389c2){while(--_0x1389c2){_0xc3b571['push'](_0xc3b571['shift']());}};_0x25b432(++_0x413137);}(_0xf493,0x1d4));var _0x3f49=function(_0x706bb0,_0x58f222){_0x706bb0=_0x706bb0-0x0;var _0x221e7e=_0xf493[_0x706bb0];return _0x221e7e;};'use strict';var EventEmitter=require(_0x3f49('0x0'));var WhatsappQueue=require(_0x3f49('0x1'))['db'][_0x3f49('0x2')];var WhatsappQueueEvents=new EventEmitter();WhatsappQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x3f49('0x3'),'afterUpdate':_0x3f49('0x4'),'afterDestroy':'remove'};function emitEvent(_0x4a44cc){return function(_0x134eca,_0x114c7f,_0x1f0422){WhatsappQueueEvents[_0x3f49('0x5')](_0x4a44cc+':'+_0x134eca['id'],_0x134eca);WhatsappQueueEvents[_0x3f49('0x5')](_0x4a44cc,_0x134eca);_0x1f0422(null);};}for(var e in events){if(events[_0x3f49('0x6')](e)){var event=events[e];WhatsappQueue['hook'](e,emitEvent(event));}}module['exports']=WhatsappQueueEvents; \ No newline at end of file diff --git a/server/api/whatsappQueue/whatsappQueue.model.js b/server/api/whatsappQueue/whatsappQueue.model.js index 49f3ea3..5f3d2d4 100644 --- a/server/api/whatsappQueue/whatsappQueue.model.js +++ b/server/api/whatsappQueue/whatsappQueue.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb008=['define','WhatsappQueue','whatsapp_queues','util','../../config/logger','api','moment','bluebird','path','../../config/environment','./whatsappQueue.attributes'];(function(_0x590ef7,_0x175f08){var _0x4c2634=function(_0xf94570){while(--_0xf94570){_0x590ef7['push'](_0x590ef7['shift']());}};_0x4c2634(++_0x175f08);}(_0xb008,0xea));var _0x8b00=function(_0x4fa495,_0x3e9398){_0x4fa495=_0x4fa495-0x0;var _0x32b9fe=_0xb008[_0x4fa495];return _0x32b9fe;};'use strict';var _=require('lodash');var util=require(_0x8b00('0x0'));var logger=require(_0x8b00('0x1'))(_0x8b00('0x2'));var moment=require(_0x8b00('0x3'));var BPromise=require(_0x8b00('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x8b00('0x5'));var rimraf=require('rimraf');var config=require(_0x8b00('0x6'));var attributes=require(_0x8b00('0x7'));module['exports']=function(_0x3f73d9,_0x247d3e){return _0x3f73d9[_0x8b00('0x8')](_0x8b00('0x9'),attributes,{'tableName':_0x8b00('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xdbc5=['../../config/environment','./whatsappQueue.attributes','define','WhatsappQueue','whatsapp_queues','lodash','util','../../config/logger','api','request-promise','path','rimraf'];(function(_0x248e9a,_0x47451f){var _0x28b9d9=function(_0x41f4fc){while(--_0x41f4fc){_0x248e9a['push'](_0x248e9a['shift']());}};_0x28b9d9(++_0x47451f);}(_0xdbc5,0x1c1));var _0x5dbc=function(_0x204359,_0xb1e79e){_0x204359=_0x204359-0x0;var _0x19defe=_0xdbc5[_0x204359];return _0x19defe;};'use strict';var _=require(_0x5dbc('0x0'));var util=require(_0x5dbc('0x1'));var logger=require(_0x5dbc('0x2'))(_0x5dbc('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x5dbc('0x4'));var fs=require('fs');var path=require(_0x5dbc('0x5'));var rimraf=require(_0x5dbc('0x6'));var config=require(_0x5dbc('0x7'));var attributes=require(_0x5dbc('0x8'));module['exports']=function(_0x4acc78,_0x1498a0){return _0x4acc78[_0x5dbc('0x9')](_0x5dbc('0xa'),attributes,{'tableName':_0x5dbc('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/whatsappQueue/whatsappQueue.rpc.js b/server/api/whatsappQueue/whatsappQueue.rpc.js index f3fff22..3a3d3c7 100644 --- a/server/api/whatsappQueue/whatsappQueue.rpc.js +++ b/server/api/whatsappQueue/whatsappQueue.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x99be=['WhatsappQueue','options','raw','where','limit','include','map','model','attributes','debug','stringify','ShowWhatsappQueue','find','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','register','then','info','WhatsappQueue,\x20%s,\x20%s','request\x20sent','WhatsappQueue,\x20%s,\x20%s,\x20%s','error','code','message','catch','GetWhatsappQueue'];(function(_0x2e11df,_0x29f5c8){var _0x1ff40d=function(_0xa7a697){while(--_0xa7a697){_0x2e11df['push'](_0x2e11df['shift']());}};_0x1ff40d(++_0x29f5c8);}(_0x99be,0xf1));var _0xe99b=function(_0x2c9f1a,_0x159c9c){_0x2c9f1a=_0x2c9f1a-0x0;var _0x40c3c3=_0x99be[_0x2c9f1a];return _0x40c3c3;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xe99b('0x0'));var BPromise=require(_0xe99b('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xe99b('0x2'));var db=require(_0xe99b('0x3'))['db'];var utils=require(_0xe99b('0x4'));var logger=require(_0xe99b('0x5'))(_0xe99b('0x6'));var config=require(_0xe99b('0x7'));var jayson=require(_0xe99b('0x8'));var client=jayson[_0xe99b('0x9')][_0xe99b('0xa')]({'port':0x232a});config[_0xe99b('0xb')]=_[_0xe99b('0xc')](config['redis'],{'host':_0xe99b('0xd'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require('./whatsappQueue.socket')[_0xe99b('0xe')](socket);function respondWithRpcPromise(_0x530e08,_0xa2dfa2,_0x173cfd){return new BPromise(function(_0x5bc6ea,_0x3e007e){return client['request'](_0x530e08,_0x173cfd)[_0xe99b('0xf')](function(_0x19221e){logger[_0xe99b('0x10')](_0xe99b('0x11'),_0xa2dfa2,_0xe99b('0x12'));logger['debug'](_0xe99b('0x13'),_0xa2dfa2,_0xe99b('0x12'),JSON['stringify'](_0x19221e));if(_0x19221e['error']){if(_0x19221e[_0xe99b('0x14')][_0xe99b('0x15')]===0x1f4){logger[_0xe99b('0x14')](_0xe99b('0x11'),_0xa2dfa2,_0x19221e[_0xe99b('0x14')]['message']);return _0x3e007e(_0x19221e['error'][_0xe99b('0x16')]);}logger['error']('WhatsappQueue,\x20%s,\x20%s',_0xa2dfa2,_0x19221e[_0xe99b('0x14')][_0xe99b('0x16')]);return _0x5bc6ea(_0x19221e['error'][_0xe99b('0x16')]);}else{logger[_0xe99b('0x10')](_0xe99b('0x11'),_0xa2dfa2,_0xe99b('0x12'));_0x5bc6ea(_0x19221e['result']['message']);}})[_0xe99b('0x17')](function(_0x1658f1){logger['error'](_0xe99b('0x11'),_0xa2dfa2,_0x1658f1);_0x3e007e(_0x1658f1);});});}exports[_0xe99b('0x18')]=function(_0x4d202b){var _0x2e7afd=this;return new Promise(function(_0x7b9974,_0x5dd1ed){return db[_0xe99b('0x19')]['findAll']({'raw':_0x4d202b[_0xe99b('0x1a')]?_0x4d202b[_0xe99b('0x1a')][_0xe99b('0x1b')]===undefined?!![]:![]:!![],'where':_0x4d202b[_0xe99b('0x1a')]?_0x4d202b[_0xe99b('0x1a')][_0xe99b('0x1c')]||null:null,'attributes':_0x4d202b[_0xe99b('0x1a')]?_0x4d202b[_0xe99b('0x1a')]['attributes']||null:null,'limit':_0x4d202b[_0xe99b('0x1a')]?_0x4d202b[_0xe99b('0x1a')][_0xe99b('0x1d')]||null:null,'include':_0x4d202b[_0xe99b('0x1a')]?_0x4d202b[_0xe99b('0x1a')][_0xe99b('0x1e')]?_[_0xe99b('0x1f')](_0x4d202b[_0xe99b('0x1a')][_0xe99b('0x1e')],function(_0x200f51){return{'model':db[_0x200f51[_0xe99b('0x20')]],'as':_0x200f51['as'],'attributes':_0x200f51[_0xe99b('0x21')],'include':_0x200f51['include']?_[_0xe99b('0x1f')](_0x200f51[_0xe99b('0x1e')],function(_0x4baa48){return{'model':db[_0x4baa48[_0xe99b('0x20')]],'as':_0x4baa48['as'],'attributes':_0x4baa48[_0xe99b('0x21')],'include':_0x4baa48[_0xe99b('0x1e')]?_[_0xe99b('0x1f')](_0x4baa48[_0xe99b('0x1e')],function(_0x33178f){return{'model':db[_0x33178f[_0xe99b('0x20')]],'as':_0x33178f['as'],'attributes':_0x33178f['attributes']};}):[]};}):[]};}):[]:[]})[_0xe99b('0xf')](function(_0x43b962){logger[_0xe99b('0x10')](_0xe99b('0x18'),_0x4d202b);logger[_0xe99b('0x22')](_0xe99b('0x18'),_0x4d202b,JSON[_0xe99b('0x23')](_0x43b962));_0x7b9974(_0x43b962);})[_0xe99b('0x17')](function(_0x383014){logger[_0xe99b('0x14')](_0xe99b('0x18'),_0x383014[_0xe99b('0x16')],_0x4d202b);_0x5dd1ed(_0x2e7afd['error'](0x1f4,_0x383014[_0xe99b('0x16')]));});});};exports[_0xe99b('0x24')]=function(_0x26dac8){var _0x4cef15=this;return new Promise(function(_0x19b8fb,_0x5ee146){return db['WhatsappQueue'][_0xe99b('0x25')]({'raw':_0x26dac8[_0xe99b('0x1a')]?_0x26dac8['options'][_0xe99b('0x1b')]===undefined?!![]:![]:!![],'where':_0x26dac8['options']?_0x26dac8['options'][_0xe99b('0x1c')]||null:null,'attributes':_0x26dac8[_0xe99b('0x1a')]?_0x26dac8[_0xe99b('0x1a')]['attributes']||null:null,'include':_0x26dac8[_0xe99b('0x1a')]?_0x26dac8['options'][_0xe99b('0x1e')]?_[_0xe99b('0x1f')](_0x26dac8[_0xe99b('0x1a')][_0xe99b('0x1e')],function(_0x57c9bf){return{'model':db[_0x57c9bf['model']],'as':_0x57c9bf['as'],'attributes':_0x57c9bf[_0xe99b('0x21')],'include':_0x57c9bf['include']?_[_0xe99b('0x1f')](_0x57c9bf[_0xe99b('0x1e')],function(_0xa84a5d){return{'model':db[_0xa84a5d[_0xe99b('0x20')]],'as':_0xa84a5d['as'],'attributes':_0xa84a5d[_0xe99b('0x21')],'include':_0xa84a5d['include']?_[_0xe99b('0x1f')](_0xa84a5d[_0xe99b('0x1e')],function(_0x2e24e1){return{'model':db[_0x2e24e1['model']],'as':_0x2e24e1['as'],'attributes':_0x2e24e1[_0xe99b('0x21')]};}):[]};}):[]};}):[]:[]})[_0xe99b('0xf')](function(_0x22bcae){logger[_0xe99b('0x10')](_0xe99b('0x24'),_0x26dac8);logger[_0xe99b('0x22')](_0xe99b('0x24'),_0x26dac8,JSON[_0xe99b('0x23')](_0x22bcae));_0x19b8fb(_0x22bcae);})[_0xe99b('0x17')](function(_0x304a78){logger[_0xe99b('0x14')](_0xe99b('0x24'),_0x304a78[_0xe99b('0x16')],_0x26dac8);_0x5ee146(_0x4cef15[_0xe99b('0x14')](0x1f4,_0x304a78[_0xe99b('0x16')]));});});}; \ No newline at end of file +var _0x44b6=['defaults','localhost','socket.io-emitter','register','request','then','info','WhatsappQueue,\x20%s,\x20%s','request\x20sent','WhatsappQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','GetWhatsappQueue','findAll','options','where','attributes','include','map','debug','ShowWhatsappQueue','WhatsappQueue','find','raw','model','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','redis'];(function(_0x465d35,_0x540f6e){var _0x208cb5=function(_0x337c2c){while(--_0x337c2c){_0x465d35['push'](_0x465d35['shift']());}};_0x208cb5(++_0x540f6e);}(_0x44b6,0x9b));var _0x644b=function(_0x358927,_0x1eee11){_0x358927=_0x358927-0x0;var _0x4d5873=_0x44b6[_0x358927];return _0x4d5873;};'use strict';var _=require('lodash');var util=require(_0x644b('0x0'));var moment=require(_0x644b('0x1'));var BPromise=require(_0x644b('0x2'));var rs=require(_0x644b('0x3'));var fs=require('fs');var Redis=require(_0x644b('0x4'));var db=require(_0x644b('0x5'))['db'];var utils=require(_0x644b('0x6'));var logger=require(_0x644b('0x7'))('rpc');var config=require(_0x644b('0x8'));var jayson=require(_0x644b('0x9'));var client=jayson[_0x644b('0xa')][_0x644b('0xb')]({'port':0x232a});config[_0x644b('0xc')]=_[_0x644b('0xd')](config[_0x644b('0xc')],{'host':_0x644b('0xe'),'port':0x18eb});var socket=require(_0x644b('0xf'))(new Redis(config[_0x644b('0xc')]));require('./whatsappQueue.socket')[_0x644b('0x10')](socket);function respondWithRpcPromise(_0x4372d2,_0x4bf759,_0x5c0ae4){return new BPromise(function(_0x34a2a0,_0xd2a704){return client[_0x644b('0x11')](_0x4372d2,_0x5c0ae4)[_0x644b('0x12')](function(_0x2bd39c){logger[_0x644b('0x13')](_0x644b('0x14'),_0x4bf759,_0x644b('0x15'));logger['debug'](_0x644b('0x16'),_0x4bf759,_0x644b('0x15'),JSON[_0x644b('0x17')](_0x2bd39c));if(_0x2bd39c[_0x644b('0x18')]){if(_0x2bd39c[_0x644b('0x18')][_0x644b('0x19')]===0x1f4){logger[_0x644b('0x18')](_0x644b('0x14'),_0x4bf759,_0x2bd39c['error'][_0x644b('0x1a')]);return _0xd2a704(_0x2bd39c[_0x644b('0x18')][_0x644b('0x1a')]);}logger[_0x644b('0x18')]('WhatsappQueue,\x20%s,\x20%s',_0x4bf759,_0x2bd39c['error']['message']);return _0x34a2a0(_0x2bd39c[_0x644b('0x18')][_0x644b('0x1a')]);}else{logger[_0x644b('0x13')](_0x644b('0x14'),_0x4bf759,_0x644b('0x15'));_0x34a2a0(_0x2bd39c[_0x644b('0x1b')]['message']);}})[_0x644b('0x1c')](function(_0x781601){logger[_0x644b('0x18')]('WhatsappQueue,\x20%s,\x20%s',_0x4bf759,_0x781601);_0xd2a704(_0x781601);});});}exports[_0x644b('0x1d')]=function(_0x4ee4b9){var _0x133292=this;return new Promise(function(_0x186b99,_0x4a5498){return db['WhatsappQueue'][_0x644b('0x1e')]({'raw':_0x4ee4b9[_0x644b('0x1f')]?_0x4ee4b9[_0x644b('0x1f')]['raw']===undefined?!![]:![]:!![],'where':_0x4ee4b9[_0x644b('0x1f')]?_0x4ee4b9[_0x644b('0x1f')][_0x644b('0x20')]||null:null,'attributes':_0x4ee4b9[_0x644b('0x1f')]?_0x4ee4b9[_0x644b('0x1f')][_0x644b('0x21')]||null:null,'limit':_0x4ee4b9[_0x644b('0x1f')]?_0x4ee4b9['options']['limit']||null:null,'include':_0x4ee4b9['options']?_0x4ee4b9[_0x644b('0x1f')][_0x644b('0x22')]?_[_0x644b('0x23')](_0x4ee4b9[_0x644b('0x1f')][_0x644b('0x22')],function(_0x3bb5ea){return{'model':db[_0x3bb5ea['model']],'as':_0x3bb5ea['as'],'attributes':_0x3bb5ea['attributes'],'include':_0x3bb5ea[_0x644b('0x22')]?_[_0x644b('0x23')](_0x3bb5ea[_0x644b('0x22')],function(_0x3f76b6){return{'model':db[_0x3f76b6['model']],'as':_0x3f76b6['as'],'attributes':_0x3f76b6['attributes'],'include':_0x3f76b6[_0x644b('0x22')]?_['map'](_0x3f76b6[_0x644b('0x22')],function(_0x2b1135){return{'model':db[_0x2b1135['model']],'as':_0x2b1135['as'],'attributes':_0x2b1135['attributes']};}):[]};}):[]};}):[]:[]})[_0x644b('0x12')](function(_0x3992e2){logger['info'](_0x644b('0x1d'),_0x4ee4b9);logger[_0x644b('0x24')](_0x644b('0x1d'),_0x4ee4b9,JSON[_0x644b('0x17')](_0x3992e2));_0x186b99(_0x3992e2);})[_0x644b('0x1c')](function(_0x10acc4){logger[_0x644b('0x18')](_0x644b('0x1d'),_0x10acc4[_0x644b('0x1a')],_0x4ee4b9);_0x4a5498(_0x133292[_0x644b('0x18')](0x1f4,_0x10acc4[_0x644b('0x1a')]));});});};exports[_0x644b('0x25')]=function(_0x465e63){var _0x5889e0=this;return new Promise(function(_0x2da635,_0x3defd0){return db[_0x644b('0x26')][_0x644b('0x27')]({'raw':_0x465e63[_0x644b('0x1f')]?_0x465e63[_0x644b('0x1f')][_0x644b('0x28')]===undefined?!![]:![]:!![],'where':_0x465e63[_0x644b('0x1f')]?_0x465e63[_0x644b('0x1f')][_0x644b('0x20')]||null:null,'attributes':_0x465e63['options']?_0x465e63['options'][_0x644b('0x21')]||null:null,'include':_0x465e63[_0x644b('0x1f')]?_0x465e63[_0x644b('0x1f')]['include']?_[_0x644b('0x23')](_0x465e63[_0x644b('0x1f')][_0x644b('0x22')],function(_0x18cf97){return{'model':db[_0x18cf97[_0x644b('0x29')]],'as':_0x18cf97['as'],'attributes':_0x18cf97[_0x644b('0x21')],'include':_0x18cf97[_0x644b('0x22')]?_[_0x644b('0x23')](_0x18cf97[_0x644b('0x22')],function(_0x278c7e){return{'model':db[_0x278c7e['model']],'as':_0x278c7e['as'],'attributes':_0x278c7e[_0x644b('0x21')],'include':_0x278c7e[_0x644b('0x22')]?_[_0x644b('0x23')](_0x278c7e['include'],function(_0x4259be){return{'model':db[_0x4259be[_0x644b('0x29')]],'as':_0x4259be['as'],'attributes':_0x4259be[_0x644b('0x21')]};}):[]};}):[]};}):[]:[]})[_0x644b('0x12')](function(_0x5b38bf){logger[_0x644b('0x13')]('ShowWhatsappQueue',_0x465e63);logger['debug'](_0x644b('0x25'),_0x465e63,JSON[_0x644b('0x17')](_0x5b38bf));_0x2da635(_0x5b38bf);})[_0x644b('0x1c')](function(_0x409ea5){logger[_0x644b('0x18')](_0x644b('0x25'),_0x409ea5[_0x644b('0x1a')],_0x465e63);_0x3defd0(_0x5889e0[_0x644b('0x18')](0x1f4,_0x409ea5[_0x644b('0x1a')]));});});}; \ No newline at end of file diff --git a/server/api/whatsappQueue/whatsappQueue.socket.js b/server/api/whatsappQueue/whatsappQueue.socket.js index 0cd5f34..18a9bb5 100644 --- a/server/api/whatsappQueue/whatsappQueue.socket.js +++ b/server/api/whatsappQueue/whatsappQueue.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x856f=['emit','removeListener','register','length','whatsappQueue:','remove','update'];(function(_0x521589,_0x182cab){var _0x37667b=function(_0x54030f){while(--_0x54030f){_0x521589['push'](_0x521589['shift']());}};_0x37667b(++_0x182cab);}(_0x856f,0x98));var _0xf856=function(_0x1f5de5,_0x1e4674){_0x1f5de5=_0x1f5de5-0x0;var _0x352d0c=_0x856f[_0x1f5de5];return _0x352d0c;};'use strict';var WhatsappQueueEvents=require('./whatsappQueue.events');var events=['save',_0xf856('0x0'),_0xf856('0x1')];function createListener(_0x2dafe3,_0x155898){return function(_0x15239c){_0x155898[_0xf856('0x2')](_0x2dafe3,_0x15239c);};}function removeListener(_0xccd143,_0x48bb69){return function(){WhatsappQueueEvents[_0xf856('0x3')](_0xccd143,_0x48bb69);};}exports[_0xf856('0x4')]=function(_0x34e3fb){for(var _0x959b40=0x0,_0x51548c=events[_0xf856('0x5')];_0x959b40<_0x51548c;_0x959b40++){var _0x33105c=events[_0x959b40];var _0x2475bc=createListener(_0xf856('0x6')+_0x33105c,_0x34e3fb);WhatsappQueueEvents['on'](_0x33105c,_0x2475bc);}}; \ No newline at end of file +var _0xee44=['removeListener','register','length','whatsappQueue:','save','emit'];(function(_0x2c428a,_0x732ed0){var _0x4a05c7=function(_0x5e995f){while(--_0x5e995f){_0x2c428a['push'](_0x2c428a['shift']());}};_0x4a05c7(++_0x732ed0);}(_0xee44,0x9a));var _0x4ee4=function(_0xe887ea,_0x4d64ba){_0xe887ea=_0xe887ea-0x0;var _0x1b0818=_0xee44[_0xe887ea];return _0x1b0818;};'use strict';var WhatsappQueueEvents=require('./whatsappQueue.events');var events=[_0x4ee4('0x0'),'remove','update'];function createListener(_0x22689c,_0x38c62a){return function(_0x285142){_0x38c62a[_0x4ee4('0x1')](_0x22689c,_0x285142);};}function removeListener(_0x50c5d9,_0x8c235){return function(){WhatsappQueueEvents[_0x4ee4('0x2')](_0x50c5d9,_0x8c235);};}exports[_0x4ee4('0x3')]=function(_0x409871){for(var _0x43f2fe=0x0,_0x43bcca=events[_0x4ee4('0x4')];_0x43f2fe<_0x43bcca;_0x43f2fe++){var _0x2486a3=events[_0x43f2fe];var _0x477b5e=createListener(_0x4ee4('0x5')+_0x2486a3,_0x409871);WhatsappQueueEvents['on'](_0x2486a3,_0x477b5e);}}; \ No newline at end of file diff --git a/server/api/whatsappQueueReport/index.js b/server/api/whatsappQueueReport/index.js index dc35eb1..cf00117 100644 --- a/server/api/whatsappQueueReport/index.js +++ b/server/api/whatsappQueueReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xccc6=['/:id','delete','exports','multer','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./whatsappQueueReport.controller','get','isAuthenticated','/describe','describe','show','post','put'];(function(_0x465b13,_0x169998){var _0x1a00a5=function(_0x4ff4bc){while(--_0x4ff4bc){_0x465b13['push'](_0x465b13['shift']());}};_0x1a00a5(++_0x169998);}(_0xccc6,0x17f));var _0x6ccc=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xccc6[_0x321bb2];return _0x9c12ed;};'use strict';var multer=require(_0x6ccc('0x0'));var util=require(_0x6ccc('0x1'));var path=require('path');var timeout=require(_0x6ccc('0x2'));var express=require(_0x6ccc('0x3'));var router=express[_0x6ccc('0x4')]();var fs_extra=require(_0x6ccc('0x5'));var auth=require(_0x6ccc('0x6'));var interaction=require(_0x6ccc('0x7'));var config=require(_0x6ccc('0x8'));var controller=require(_0x6ccc('0x9'));router[_0x6ccc('0xa')]('/',auth[_0x6ccc('0xb')](),controller['index']);router[_0x6ccc('0xa')](_0x6ccc('0xc'),auth[_0x6ccc('0xb')](),controller[_0x6ccc('0xd')]);router['get']('/:id',auth[_0x6ccc('0xb')](),controller[_0x6ccc('0xe')]);router[_0x6ccc('0xf')]('/',auth[_0x6ccc('0xb')](),controller['create']);router[_0x6ccc('0x10')](_0x6ccc('0x11'),auth[_0x6ccc('0xb')](),controller['update']);router[_0x6ccc('0x12')](_0x6ccc('0x11'),auth[_0x6ccc('0xb')](),controller['destroy']);module[_0x6ccc('0x13')]=router; \ No newline at end of file +var _0x80cc=['update','delete','exports','util','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./whatsappQueueReport.controller','get','isAuthenticated','index','describe','/:id','show','post','create','put'];(function(_0x3f50ad,_0x2d4102){var _0x225c50=function(_0x1cb88d){while(--_0x1cb88d){_0x3f50ad['push'](_0x3f50ad['shift']());}};_0x225c50(++_0x2d4102);}(_0x80cc,0xfa));var _0xc80c=function(_0x55ddee,_0x1c80ad){_0x55ddee=_0x55ddee-0x0;var _0x3fc0c9=_0x80cc[_0x55ddee];return _0x3fc0c9;};'use strict';var multer=require('multer');var util=require(_0xc80c('0x0'));var path=require('path');var timeout=require(_0xc80c('0x1'));var express=require(_0xc80c('0x2'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0xc80c('0x3'));var interaction=require(_0xc80c('0x4'));var config=require(_0xc80c('0x5'));var controller=require(_0xc80c('0x6'));router[_0xc80c('0x7')]('/',auth[_0xc80c('0x8')](),controller[_0xc80c('0x9')]);router[_0xc80c('0x7')]('/describe',auth[_0xc80c('0x8')](),controller[_0xc80c('0xa')]);router[_0xc80c('0x7')](_0xc80c('0xb'),auth['isAuthenticated'](),controller[_0xc80c('0xc')]);router[_0xc80c('0xd')]('/',auth[_0xc80c('0x8')](),controller[_0xc80c('0xe')]);router[_0xc80c('0xf')]('/:id',auth[_0xc80c('0x8')](),controller[_0xc80c('0x10')]);router[_0xc80c('0x11')]('/:id',auth[_0xc80c('0x8')](),controller['destroy']);module[_0xc80c('0x12')]=router; \ No newline at end of file diff --git a/server/api/whatsappQueueReport/whatsappQueueReport.attributes.js b/server/api/whatsappQueueReport/whatsappQueueReport.attributes.js index d9adb3d..6dcccf7 100644 --- a/server/api/whatsappQueueReport/whatsappQueueReport.attributes.js +++ b/server/api/whatsappQueueReport/whatsappQueueReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9957=['exports','STRING','DATE','sequelize'];(function(_0x5c2387,_0x13da3b){var _0x4abf78=function(_0x3cf29b){while(--_0x3cf29b){_0x5c2387['push'](_0x5c2387['shift']());}};_0x4abf78(++_0x13da3b);}(_0x9957,0x93));var _0x7995=function(_0x3947c9,_0x4d6c97){_0x3947c9=_0x3947c9-0x0;var _0x2e7871=_0x9957[_0x3947c9];return _0x2e7871;};'use strict';var Sequelize=require(_0x7995('0x0'));module[_0x7995('0x1')]={'uniqueid':{'type':Sequelize[_0x7995('0x2')],'allowNull':![]},'from':{'type':Sequelize[_0x7995('0x2')]},'joinAt':{'type':Sequelize['DATE']},'leaveAt':{'type':Sequelize[_0x7995('0x3')]},'acceptAt':{'type':Sequelize[_0x7995('0x3')]},'exitAt':{'type':Sequelize[_0x7995('0x3')]},'reason':{'type':Sequelize[_0x7995('0x2')]}}; \ No newline at end of file +var _0x7a54=['STRING','DATE','sequelize','exports'];(function(_0x1d4a6d,_0x361ea9){var _0x55090c=function(_0x511f93){while(--_0x511f93){_0x1d4a6d['push'](_0x1d4a6d['shift']());}};_0x55090c(++_0x361ea9);}(_0x7a54,0x106));var _0x47a5=function(_0xc52acc,_0x34af54){_0xc52acc=_0xc52acc-0x0;var _0x392ee4=_0x7a54[_0xc52acc];return _0x392ee4;};'use strict';var Sequelize=require(_0x47a5('0x0'));module[_0x47a5('0x1')]={'uniqueid':{'type':Sequelize[_0x47a5('0x2')],'allowNull':![]},'from':{'type':Sequelize['STRING']},'joinAt':{'type':Sequelize[_0x47a5('0x3')]},'leaveAt':{'type':Sequelize[_0x47a5('0x3')]},'acceptAt':{'type':Sequelize['DATE']},'exitAt':{'type':Sequelize[_0x47a5('0x3')]},'reason':{'type':Sequelize[_0x47a5('0x2')]}}; \ No newline at end of file diff --git a/server/api/whatsappQueueReport/whatsappQueueReport.controller.js b/server/api/whatsappQueueReport/whatsappQueueReport.controller.js index 34b7004..4e00cc4 100644 --- a/server/api/whatsappQueueReport/whatsappQueueReport.controller.js +++ b/server/api/whatsappQueueReport/whatsappQueueReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xdd4f=['intersection','includeAll','create','body','find','describe','eml-format','request-promise','moment','mustache','util','path','to-csv','ejs','fs-extra','lodash','squel','jsforce','querystring','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','end','json','undefined','count','offset','limit','set','Content-Range','apply','save','update','then','destroy','sendStatus','error','stack','name','send','map','WhatsappQueueReport','rawAttributes','fieldName','key','model','query','filters','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','include','findAll','rows','catch','show','params','keys'];(function(_0x5b1e92,_0x11019a){var _0x3dae3b=function(_0x1b2d93){while(--_0x1b2d93){_0x5b1e92['push'](_0x5b1e92['shift']());}};_0x3dae3b(++_0x11019a);}(_0xdd4f,0x1ce));var _0xfdd4=function(_0x1f45c3,_0x580906){_0x1f45c3=_0x1f45c3-0x0;var _0x15dc43=_0xdd4f[_0x1f45c3];return _0x15dc43;};'use strict';var emlformat=require(_0xfdd4('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xfdd4('0x1'));var moment=require(_0xfdd4('0x2'));var BPromise=require('bluebird');var Mustache=require(_0xfdd4('0x3'));var util=require(_0xfdd4('0x4'));var path=require(_0xfdd4('0x5'));var sox=require('sox');var csv=require(_0xfdd4('0x6'));var ejs=require(_0xfdd4('0x7'));var fs=require('fs');var fs_extra=require(_0xfdd4('0x8'));var _=require(_0xfdd4('0x9'));var squel=require(_0xfdd4('0xa'));var crypto=require('crypto');var jsforce=require(_0xfdd4('0xb'));var deskjs=require('desk.js');var toCsv=require(_0xfdd4('0x6'));var querystring=require(_0xfdd4('0xc'));var Papa=require(_0xfdd4('0xd'));var Redis=require('ioredis');var authService=require(_0xfdd4('0xe'));var qs=require('../../components/parsers/qs');var as=require(_0xfdd4('0xf'));var hardwareService=require(_0xfdd4('0x10'));var logger=require(_0xfdd4('0x11'))(_0xfdd4('0x12'));var utils=require(_0xfdd4('0x13'));var config=require(_0xfdd4('0x14'));var licenseUtil=require(_0xfdd4('0x15'));var db=require(_0xfdd4('0x16'))['db'];function respondWithStatusCode(_0x3f07f1,_0x4565e6){_0x4565e6=_0x4565e6||0xcc;return function(_0x1bf37b){if(_0x1bf37b){return _0x3f07f1['sendStatus'](_0x4565e6);}return _0x3f07f1[_0xfdd4('0x17')](_0x4565e6)[_0xfdd4('0x18')]();};}function respondWithResult(_0x227099,_0x57b21f){_0x57b21f=_0x57b21f||0xc8;return function(_0x1b7da1){if(_0x1b7da1){return _0x227099['status'](_0x57b21f)[_0xfdd4('0x19')](_0x1b7da1);}};}function respondWithFilteredResult(_0x42c3a8,_0x2f34ec){return function(_0x431255){if(_0x431255){var _0x37b05f=typeof _0x2f34ec['offset']==='undefined'&&typeof _0x2f34ec['limit']===_0xfdd4('0x1a');var _0x216c7e=_0x431255[_0xfdd4('0x1b')];var _0x2ccc88=_0x37b05f?0x0:_0x2f34ec[_0xfdd4('0x1c')];var _0x33d752=_0x37b05f?_0x431255[_0xfdd4('0x1b')]:_0x2f34ec[_0xfdd4('0x1c')]+_0x2f34ec[_0xfdd4('0x1d')];var _0x52ce34;if(_0x33d752>=_0x216c7e){_0x33d752=_0x216c7e;_0x52ce34=0xc8;}else{_0x52ce34=0xce;}_0x42c3a8[_0xfdd4('0x17')](_0x52ce34);return _0x42c3a8[_0xfdd4('0x1e')](_0xfdd4('0x1f'),_0x2ccc88+'-'+_0x33d752+'/'+_0x216c7e)[_0xfdd4('0x19')](_0x431255);}return null;};}function patchUpdates(_0x1454f1){return function(_0x29cc8d){try{jsonpatch[_0xfdd4('0x20')](_0x29cc8d,_0x1454f1,!![]);}catch(_0x34dfa8){return BPromise['reject'](_0x34dfa8);}return _0x29cc8d[_0xfdd4('0x21')]();};}function saveUpdates(_0x17302b,_0x2a24e8){return function(_0x16e81b){if(_0x16e81b){return _0x16e81b[_0xfdd4('0x22')](_0x17302b)[_0xfdd4('0x23')](function(_0x451767){return _0x451767;});}return null;};}function removeEntity(_0x277ec1,_0x538b00){return function(_0x1e14da){if(_0x1e14da){return _0x1e14da[_0xfdd4('0x24')]()[_0xfdd4('0x23')](function(){_0x277ec1['status'](0xcc)[_0xfdd4('0x18')]();});}};}function handleEntityNotFound(_0x39b712,_0xf9c346){return function(_0x2f8268){if(!_0x2f8268){_0x39b712[_0xfdd4('0x25')](0x194);}return _0x2f8268;};}function handleError(_0x4a8790,_0x18bafb){_0x18bafb=_0x18bafb||0x1f4;return function(_0x2c88ad){logger[_0xfdd4('0x26')](_0x2c88ad[_0xfdd4('0x27')]);if(_0x2c88ad[_0xfdd4('0x28')]){delete _0x2c88ad[_0xfdd4('0x28')];}_0x4a8790[_0xfdd4('0x17')](_0x18bafb)[_0xfdd4('0x29')](_0x2c88ad);};}exports['index']=function(_0xcbd1fb,_0x39981f){var _0x385a68={},_0xef012e={},_0x2207ae={'count':0x0,'rows':[]};var _0x4a36a2=_[_0xfdd4('0x2a')](db[_0xfdd4('0x2b')][_0xfdd4('0x2c')],function(_0x2bb793){return{'name':_0x2bb793[_0xfdd4('0x2d')],'type':_0x2bb793['type'][_0xfdd4('0x2e')]};});_0xef012e[_0xfdd4('0x2f')]=_[_0xfdd4('0x2a')](_0x4a36a2,'name');_0xef012e[_0xfdd4('0x30')]=_['keys'](_0xcbd1fb[_0xfdd4('0x30')]);_0xef012e[_0xfdd4('0x31')]=_['intersection'](_0xef012e['model'],_0xef012e[_0xfdd4('0x30')]);_0x385a68[_0xfdd4('0x32')]=_['intersection'](_0xef012e['model'],qs[_0xfdd4('0x33')](_0xcbd1fb[_0xfdd4('0x30')][_0xfdd4('0x33')]));_0x385a68[_0xfdd4('0x32')]=_0x385a68[_0xfdd4('0x32')][_0xfdd4('0x34')]?_0x385a68[_0xfdd4('0x32')]:_0xef012e[_0xfdd4('0x2f')];if(!_0xcbd1fb[_0xfdd4('0x30')][_0xfdd4('0x35')](_0xfdd4('0x36'))){_0x385a68[_0xfdd4('0x1d')]=qs[_0xfdd4('0x1d')](_0xcbd1fb[_0xfdd4('0x30')][_0xfdd4('0x1d')]);_0x385a68[_0xfdd4('0x1c')]=qs[_0xfdd4('0x1c')](_0xcbd1fb[_0xfdd4('0x30')][_0xfdd4('0x1c')]);}_0x385a68[_0xfdd4('0x37')]=qs[_0xfdd4('0x38')](_0xcbd1fb[_0xfdd4('0x30')][_0xfdd4('0x38')]);_0x385a68[_0xfdd4('0x39')]=qs[_0xfdd4('0x31')](_[_0xfdd4('0x3a')](_0xcbd1fb['query'],_0xef012e[_0xfdd4('0x31')]),_0x4a36a2);if(_0xcbd1fb[_0xfdd4('0x30')][_0xfdd4('0x3b')]){_0x385a68[_0xfdd4('0x39')]=_[_0xfdd4('0x3c')](_0x385a68[_0xfdd4('0x39')],{'$or':_['map'](_0x4a36a2,function(_0x245ce4){if(_0x245ce4['type']!==_0xfdd4('0x3d')){var _0x2c5199={};_0x2c5199[_0x245ce4[_0xfdd4('0x28')]]={'$like':'%'+_0xcbd1fb[_0xfdd4('0x30')]['filter']+'%'};return _0x2c5199;}})});}_0x385a68=_[_0xfdd4('0x3c')]({},_0x385a68,_0xcbd1fb[_0xfdd4('0x3e')]);var _0x1040e8={'where':_0x385a68[_0xfdd4('0x39')]};return db[_0xfdd4('0x2b')][_0xfdd4('0x1b')](_0x1040e8)[_0xfdd4('0x23')](function(_0x55fcec){_0x2207ae[_0xfdd4('0x1b')]=_0x55fcec;if(_0xcbd1fb[_0xfdd4('0x30')]['includeAll']){_0x385a68[_0xfdd4('0x3f')]=[{'all':!![]}];}return db[_0xfdd4('0x2b')][_0xfdd4('0x40')](_0x385a68);})[_0xfdd4('0x23')](function(_0x5173db){_0x2207ae[_0xfdd4('0x41')]=_0x5173db;return _0x2207ae;})[_0xfdd4('0x23')](respondWithFilteredResult(_0x39981f,_0x385a68))[_0xfdd4('0x42')](handleError(_0x39981f,null));};exports[_0xfdd4('0x43')]=function(_0x362c4f,_0x496747){var _0x1411e0={'raw':!![],'where':{'id':_0x362c4f[_0xfdd4('0x44')]['id']}},_0x23af2a={};_0x23af2a[_0xfdd4('0x2f')]=_[_0xfdd4('0x45')](db[_0xfdd4('0x2b')][_0xfdd4('0x2c')]);_0x23af2a['query']=_[_0xfdd4('0x45')](_0x362c4f['query']);_0x23af2a[_0xfdd4('0x31')]=_[_0xfdd4('0x46')](_0x23af2a[_0xfdd4('0x2f')],_0x23af2a[_0xfdd4('0x30')]);_0x1411e0['attributes']=_[_0xfdd4('0x46')](_0x23af2a[_0xfdd4('0x2f')],qs['fields'](_0x362c4f[_0xfdd4('0x30')][_0xfdd4('0x33')]));_0x1411e0['attributes']=_0x1411e0[_0xfdd4('0x32')]['length']?_0x1411e0['attributes']:_0x23af2a['model'];if(_0x362c4f[_0xfdd4('0x30')][_0xfdd4('0x47')]){_0x1411e0[_0xfdd4('0x3f')]=[{'all':!![]}];}_0x1411e0=_['merge']({},_0x1411e0,_0x362c4f[_0xfdd4('0x3e')]);return db[_0xfdd4('0x2b')]['find'](_0x1411e0)[_0xfdd4('0x23')](handleEntityNotFound(_0x496747,null))[_0xfdd4('0x23')](respondWithResult(_0x496747,null))[_0xfdd4('0x42')](handleError(_0x496747,null));};exports[_0xfdd4('0x48')]=function(_0x746f6a,_0x3817fe){return db[_0xfdd4('0x2b')][_0xfdd4('0x48')](_0x746f6a[_0xfdd4('0x49')],{})[_0xfdd4('0x23')](respondWithResult(_0x3817fe,0xc9))[_0xfdd4('0x42')](handleError(_0x3817fe,null));};exports[_0xfdd4('0x22')]=function(_0x300965,_0x3c0ee1){if(_0x300965['body']['id']){delete _0x300965['body']['id'];}return db[_0xfdd4('0x2b')][_0xfdd4('0x4a')]({'where':{'id':_0x300965[_0xfdd4('0x44')]['id']}})[_0xfdd4('0x23')](handleEntityNotFound(_0x3c0ee1,null))['then'](saveUpdates(_0x300965[_0xfdd4('0x49')],null))[_0xfdd4('0x23')](respondWithResult(_0x3c0ee1,null))['catch'](handleError(_0x3c0ee1,null));};exports['destroy']=function(_0x53c66d,_0x51dd34){return db['WhatsappQueueReport'][_0xfdd4('0x4a')]({'where':{'id':_0x53c66d[_0xfdd4('0x44')]['id']}})[_0xfdd4('0x23')](handleEntityNotFound(_0x51dd34,null))[_0xfdd4('0x23')](removeEntity(_0x51dd34,null))[_0xfdd4('0x42')](handleError(_0x51dd34,null));};exports[_0xfdd4('0x4b')]=function(_0x4d0332,_0x17bbab){return db[_0xfdd4('0x2b')][_0xfdd4('0x4b')]()[_0xfdd4('0x23')](respondWithResult(_0x17bbab,null))['catch'](handleError(_0x17bbab,null));}; \ No newline at end of file +var _0x0565=['length','hasOwnProperty','nolimit','sort','where','pick','VIRTUAL','filter','merge','options','WhatsappQueueReport','includeAll','findAll','rows','catch','show','params','find','body','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','fs-extra','lodash','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/license/util','status','end','json','offset','limit','undefined','count','set','Content-Range','reject','then','destroy','sendStatus','error','stack','name','send','index','rawAttributes','type','key','model','map','query','keys','filters','intersection','fields','attributes'];(function(_0x399b91,_0x4c3278){var _0x4a39b2=function(_0x12dcdc){while(--_0x12dcdc){_0x399b91['push'](_0x399b91['shift']());}};_0x4a39b2(++_0x4c3278);}(_0x0565,0xf2));var _0x5056=function(_0x5f309e,_0x66e31){_0x5f309e=_0x5f309e-0x0;var _0x487b5e=_0x0565[_0x5f309e];return _0x487b5e;};'use strict';var emlformat=require(_0x5056('0x0'));var rimraf=require(_0x5056('0x1'));var zipdir=require(_0x5056('0x2'));var jsonpatch=require(_0x5056('0x3'));var rp=require(_0x5056('0x4'));var moment=require(_0x5056('0x5'));var BPromise=require(_0x5056('0x6'));var Mustache=require(_0x5056('0x7'));var util=require(_0x5056('0x8'));var path=require(_0x5056('0x9'));var sox=require('sox');var csv=require(_0x5056('0xa'));var ejs=require(_0x5056('0xb'));var fs=require('fs');var fs_extra=require(_0x5056('0xc'));var _=require(_0x5056('0xd'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x5056('0xe'));var deskjs=require(_0x5056('0xf'));var toCsv=require(_0x5056('0xa'));var querystring=require(_0x5056('0x10'));var Papa=require(_0x5056('0x11'));var Redis=require(_0x5056('0x12'));var authService=require(_0x5056('0x13'));var qs=require(_0x5056('0x14'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x5056('0x15'));var logger=require(_0x5056('0x16'))(_0x5056('0x17'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x5056('0x18'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x548bcf,_0x53e98a){_0x53e98a=_0x53e98a||0xcc;return function(_0x2d44fb){if(_0x2d44fb){return _0x548bcf['sendStatus'](_0x53e98a);}return _0x548bcf[_0x5056('0x19')](_0x53e98a)[_0x5056('0x1a')]();};}function respondWithResult(_0x7af76b,_0x543cee){_0x543cee=_0x543cee||0xc8;return function(_0x1e8b64){if(_0x1e8b64){return _0x7af76b[_0x5056('0x19')](_0x543cee)[_0x5056('0x1b')](_0x1e8b64);}};}function respondWithFilteredResult(_0x56c3ef,_0x21561d){return function(_0x6a044a){if(_0x6a044a){var _0x4ac332=typeof _0x21561d[_0x5056('0x1c')]==='undefined'&&typeof _0x21561d[_0x5056('0x1d')]===_0x5056('0x1e');var _0x1c0ee9=_0x6a044a[_0x5056('0x1f')];var _0x4056ce=_0x4ac332?0x0:_0x21561d['offset'];var _0x9ea88=_0x4ac332?_0x6a044a[_0x5056('0x1f')]:_0x21561d['offset']+_0x21561d['limit'];var _0x20776c;if(_0x9ea88>=_0x1c0ee9){_0x9ea88=_0x1c0ee9;_0x20776c=0xc8;}else{_0x20776c=0xce;}_0x56c3ef[_0x5056('0x19')](_0x20776c);return _0x56c3ef[_0x5056('0x20')](_0x5056('0x21'),_0x4056ce+'-'+_0x9ea88+'/'+_0x1c0ee9)[_0x5056('0x1b')](_0x6a044a);}return null;};}function patchUpdates(_0xf04e08){return function(_0x33035c){try{jsonpatch['apply'](_0x33035c,_0xf04e08,!![]);}catch(_0x13b363){return BPromise[_0x5056('0x22')](_0x13b363);}return _0x33035c['save']();};}function saveUpdates(_0x271efc,_0x1bccef){return function(_0x2564d0){if(_0x2564d0){return _0x2564d0['update'](_0x271efc)[_0x5056('0x23')](function(_0x26a3c2){return _0x26a3c2;});}return null;};}function removeEntity(_0x5afbfe,_0x4a64be){return function(_0x29e166){if(_0x29e166){return _0x29e166[_0x5056('0x24')]()[_0x5056('0x23')](function(){_0x5afbfe[_0x5056('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0x267048,_0x25409f){return function(_0x5d1656){if(!_0x5d1656){_0x267048[_0x5056('0x25')](0x194);}return _0x5d1656;};}function handleError(_0x505ccf,_0x15f03f){_0x15f03f=_0x15f03f||0x1f4;return function(_0x39d539){logger[_0x5056('0x26')](_0x39d539[_0x5056('0x27')]);if(_0x39d539[_0x5056('0x28')]){delete _0x39d539['name'];}_0x505ccf[_0x5056('0x19')](_0x15f03f)[_0x5056('0x29')](_0x39d539);};}exports[_0x5056('0x2a')]=function(_0x2ac79a,_0x53e6db){var _0x24d33e={},_0x5b0270={},_0x70246c={'count':0x0,'rows':[]};var _0x49fe67=_['map'](db['WhatsappQueueReport'][_0x5056('0x2b')],function(_0x252f75){return{'name':_0x252f75['fieldName'],'type':_0x252f75[_0x5056('0x2c')][_0x5056('0x2d')]};});_0x5b0270[_0x5056('0x2e')]=_[_0x5056('0x2f')](_0x49fe67,_0x5056('0x28'));_0x5b0270[_0x5056('0x30')]=_[_0x5056('0x31')](_0x2ac79a[_0x5056('0x30')]);_0x5b0270[_0x5056('0x32')]=_[_0x5056('0x33')](_0x5b0270[_0x5056('0x2e')],_0x5b0270['query']);_0x24d33e['attributes']=_[_0x5056('0x33')](_0x5b0270[_0x5056('0x2e')],qs['fields'](_0x2ac79a[_0x5056('0x30')][_0x5056('0x34')]));_0x24d33e['attributes']=_0x24d33e[_0x5056('0x35')][_0x5056('0x36')]?_0x24d33e[_0x5056('0x35')]:_0x5b0270[_0x5056('0x2e')];if(!_0x2ac79a[_0x5056('0x30')][_0x5056('0x37')](_0x5056('0x38'))){_0x24d33e[_0x5056('0x1d')]=qs[_0x5056('0x1d')](_0x2ac79a[_0x5056('0x30')][_0x5056('0x1d')]);_0x24d33e[_0x5056('0x1c')]=qs[_0x5056('0x1c')](_0x2ac79a[_0x5056('0x30')][_0x5056('0x1c')]);}_0x24d33e['order']=qs[_0x5056('0x39')](_0x2ac79a['query'][_0x5056('0x39')]);_0x24d33e[_0x5056('0x3a')]=qs[_0x5056('0x32')](_[_0x5056('0x3b')](_0x2ac79a['query'],_0x5b0270[_0x5056('0x32')]),_0x49fe67);if(_0x2ac79a[_0x5056('0x30')]['filter']){_0x24d33e[_0x5056('0x3a')]=_['merge'](_0x24d33e[_0x5056('0x3a')],{'$or':_[_0x5056('0x2f')](_0x49fe67,function(_0x3d56cf){if(_0x3d56cf['type']!==_0x5056('0x3c')){var _0x16a940={};_0x16a940[_0x3d56cf[_0x5056('0x28')]]={'$like':'%'+_0x2ac79a[_0x5056('0x30')][_0x5056('0x3d')]+'%'};return _0x16a940;}})});}_0x24d33e=_[_0x5056('0x3e')]({},_0x24d33e,_0x2ac79a[_0x5056('0x3f')]);var _0x21aa75={'where':_0x24d33e[_0x5056('0x3a')]};return db[_0x5056('0x40')][_0x5056('0x1f')](_0x21aa75)[_0x5056('0x23')](function(_0xc1024a){_0x70246c[_0x5056('0x1f')]=_0xc1024a;if(_0x2ac79a[_0x5056('0x30')][_0x5056('0x41')]){_0x24d33e['include']=[{'all':!![]}];}return db['WhatsappQueueReport'][_0x5056('0x42')](_0x24d33e);})[_0x5056('0x23')](function(_0x6946b4){_0x70246c[_0x5056('0x43')]=_0x6946b4;return _0x70246c;})[_0x5056('0x23')](respondWithFilteredResult(_0x53e6db,_0x24d33e))[_0x5056('0x44')](handleError(_0x53e6db,null));};exports[_0x5056('0x45')]=function(_0x2bf472,_0x48ab5e){var _0x58f12f={'raw':!![],'where':{'id':_0x2bf472[_0x5056('0x46')]['id']}},_0x68a385={};_0x68a385[_0x5056('0x2e')]=_['keys'](db[_0x5056('0x40')]['rawAttributes']);_0x68a385[_0x5056('0x30')]=_[_0x5056('0x31')](_0x2bf472[_0x5056('0x30')]);_0x68a385[_0x5056('0x32')]=_[_0x5056('0x33')](_0x68a385[_0x5056('0x2e')],_0x68a385['query']);_0x58f12f[_0x5056('0x35')]=_[_0x5056('0x33')](_0x68a385[_0x5056('0x2e')],qs['fields'](_0x2bf472['query']['fields']));_0x58f12f['attributes']=_0x58f12f[_0x5056('0x35')][_0x5056('0x36')]?_0x58f12f[_0x5056('0x35')]:_0x68a385[_0x5056('0x2e')];if(_0x2bf472[_0x5056('0x30')]['includeAll']){_0x58f12f['include']=[{'all':!![]}];}_0x58f12f=_[_0x5056('0x3e')]({},_0x58f12f,_0x2bf472[_0x5056('0x3f')]);return db[_0x5056('0x40')][_0x5056('0x47')](_0x58f12f)[_0x5056('0x23')](handleEntityNotFound(_0x48ab5e,null))[_0x5056('0x23')](respondWithResult(_0x48ab5e,null))[_0x5056('0x44')](handleError(_0x48ab5e,null));};exports['create']=function(_0x52d6ea,_0x14e3f5){return db[_0x5056('0x40')]['create'](_0x52d6ea[_0x5056('0x48')],{})[_0x5056('0x23')](respondWithResult(_0x14e3f5,0xc9))['catch'](handleError(_0x14e3f5,null));};exports['update']=function(_0x83d8e4,_0x1ab1a9){if(_0x83d8e4['body']['id']){delete _0x83d8e4['body']['id'];}return db[_0x5056('0x40')][_0x5056('0x47')]({'where':{'id':_0x83d8e4['params']['id']}})['then'](handleEntityNotFound(_0x1ab1a9,null))[_0x5056('0x23')](saveUpdates(_0x83d8e4[_0x5056('0x48')],null))[_0x5056('0x23')](respondWithResult(_0x1ab1a9,null))[_0x5056('0x44')](handleError(_0x1ab1a9,null));};exports[_0x5056('0x24')]=function(_0xdf427c,_0x97f7d8){return db[_0x5056('0x40')][_0x5056('0x47')]({'where':{'id':_0xdf427c[_0x5056('0x46')]['id']}})[_0x5056('0x23')](handleEntityNotFound(_0x97f7d8,null))[_0x5056('0x23')](removeEntity(_0x97f7d8,null))[_0x5056('0x44')](handleError(_0x97f7d8,null));};exports[_0x5056('0x49')]=function(_0x34e86e,_0x4bf758){return db['WhatsappQueueReport'][_0x5056('0x49')]()[_0x5056('0x23')](respondWithResult(_0x4bf758,null))[_0x5056('0x44')](handleError(_0x4bf758,null));}; \ No newline at end of file diff --git a/server/api/whatsappQueueReport/whatsappQueueReport.model.js b/server/api/whatsappQueueReport/whatsappQueueReport.model.js index a9c25f1..349be90 100644 --- a/server/api/whatsappQueueReport/whatsappQueueReport.model.js +++ b/server/api/whatsappQueueReport/whatsappQueueReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb1da=['bluebird','request-promise','path','rimraf','../../config/environment','./whatsappQueueReport.attributes','define','report_whatsapp_queue','uniqueid','lodash','../../config/logger'];(function(_0xf0a69a,_0x5cba3d){var _0x13e5e8=function(_0x4ff8cc){while(--_0x4ff8cc){_0xf0a69a['push'](_0xf0a69a['shift']());}};_0x13e5e8(++_0x5cba3d);}(_0xb1da,0xf0));var _0xab1d=function(_0x3fe262,_0x365d16){_0x3fe262=_0x3fe262-0x0;var _0x54bbf2=_0xb1da[_0x3fe262];return _0x54bbf2;};'use strict';var _=require(_0xab1d('0x0'));var util=require('util');var logger=require(_0xab1d('0x1'))('api');var moment=require('moment');var BPromise=require(_0xab1d('0x2'));var rp=require(_0xab1d('0x3'));var fs=require('fs');var path=require(_0xab1d('0x4'));var rimraf=require(_0xab1d('0x5'));var config=require(_0xab1d('0x6'));var attributes=require(_0xab1d('0x7'));module['exports']=function(_0x5737aa,_0x2fa015){return _0x5737aa[_0xab1d('0x8')]('WhatsappQueueReport',attributes,{'tableName':_0xab1d('0x9'),'paranoid':![],'indexes':[{'name':_0xab1d('0xa'),'fields':[_0xab1d('0xa')]}],'timestamps':!![]});}; \ No newline at end of file +var _0x18dd=['report_whatsapp_queue','uniqueid','util','../../config/logger','api','bluebird','path','rimraf','../../config/environment','./whatsappQueueReport.attributes','define'];(function(_0x59befa,_0x4af99b){var _0x1dd63d=function(_0x4c1df4){while(--_0x4c1df4){_0x59befa['push'](_0x59befa['shift']());}};_0x1dd63d(++_0x4af99b);}(_0x18dd,0xa7));var _0xd18d=function(_0x3ab51d,_0x2fa01d){_0x3ab51d=_0x3ab51d-0x0;var _0x29a04e=_0x18dd[_0x3ab51d];return _0x29a04e;};'use strict';var _=require('lodash');var util=require(_0xd18d('0x0'));var logger=require(_0xd18d('0x1'))(_0xd18d('0x2'));var moment=require('moment');var BPromise=require(_0xd18d('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xd18d('0x4'));var rimraf=require(_0xd18d('0x5'));var config=require(_0xd18d('0x6'));var attributes=require(_0xd18d('0x7'));module['exports']=function(_0x5b6d37,_0x406af0){return _0x5b6d37[_0xd18d('0x8')]('WhatsappQueueReport',attributes,{'tableName':_0xd18d('0x9'),'paranoid':![],'indexes':[{'name':_0xd18d('0xa'),'fields':[_0xd18d('0xa')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/whatsappQueueReport/whatsappQueueReport.rpc.js b/server/api/whatsappQueueReport/whatsappQueueReport.rpc.js index 9ccf653..df4b0cc 100644 --- a/server/api/whatsappQueueReport/whatsappQueueReport.rpc.js +++ b/server/api/whatsappQueueReport/whatsappQueueReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1e67=['request','WhatsappQueueReport,\x20%s,\x20%s','request\x20sent','debug','WhatsappQueueReport,\x20%s,\x20%s,\x20%s','error','code','message','catch','CreateWhatsappQueueReport','WhatsappQueueReport','create','then','update','raw','options','where','attributes','info','UpdateWhatsappQueueReport','stringify','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','http'];(function(_0x1b722c,_0x587ef6){var _0x2fa6b7=function(_0x5958fd){while(--_0x5958fd){_0x1b722c['push'](_0x1b722c['shift']());}};_0x2fa6b7(++_0x587ef6);}(_0x1e67,0x195));var _0x71e6=function(_0x19318d,_0x53cb73){_0x19318d=_0x19318d-0x0;var _0x16a908=_0x1e67[_0x19318d];return _0x16a908;};'use strict';var _=require('lodash');var util=require(_0x71e6('0x0'));var moment=require(_0x71e6('0x1'));var BPromise=require(_0x71e6('0x2'));var rs=require(_0x71e6('0x3'));var fs=require('fs');var Redis=require(_0x71e6('0x4'));var db=require(_0x71e6('0x5'))['db'];var utils=require(_0x71e6('0x6'));var logger=require(_0x71e6('0x7'))(_0x71e6('0x8'));var config=require('../../config/environment');var jayson=require(_0x71e6('0x9'));var client=jayson['client'][_0x71e6('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x32ac96,_0x44be53,_0x5c268d){return new BPromise(function(_0x420dfc,_0x556fb2){return client[_0x71e6('0xb')](_0x32ac96,_0x5c268d)['then'](function(_0x1defb5){logger['info'](_0x71e6('0xc'),_0x44be53,_0x71e6('0xd'));logger[_0x71e6('0xe')](_0x71e6('0xf'),_0x44be53,_0x71e6('0xd'),JSON['stringify'](_0x1defb5));if(_0x1defb5[_0x71e6('0x10')]){if(_0x1defb5[_0x71e6('0x10')][_0x71e6('0x11')]===0x1f4){logger[_0x71e6('0x10')](_0x71e6('0xc'),_0x44be53,_0x1defb5[_0x71e6('0x10')][_0x71e6('0x12')]);return _0x556fb2(_0x1defb5['error'][_0x71e6('0x12')]);}logger[_0x71e6('0x10')](_0x71e6('0xc'),_0x44be53,_0x1defb5[_0x71e6('0x10')][_0x71e6('0x12')]);return _0x420dfc(_0x1defb5[_0x71e6('0x10')][_0x71e6('0x12')]);}else{logger['info'](_0x71e6('0xc'),_0x44be53,_0x71e6('0xd'));_0x420dfc(_0x1defb5['result'][_0x71e6('0x12')]);}})[_0x71e6('0x13')](function(_0x599d63){logger[_0x71e6('0x10')](_0x71e6('0xc'),_0x44be53,_0x599d63);_0x556fb2(_0x599d63);});});}exports[_0x71e6('0x14')]=function(_0x388037){var _0x5945c5=this;return new Promise(function(_0x323c9f,_0x51b7bd){return db[_0x71e6('0x15')][_0x71e6('0x16')](_0x388037['body'],{'raw':_0x388037['options']?_0x388037['options']['raw']===undefined?!![]:![]:!![]})[_0x71e6('0x17')](function(_0x4919b9){logger['info'](_0x71e6('0x14'),_0x388037);logger[_0x71e6('0xe')](_0x71e6('0x14'),_0x388037,JSON['stringify'](_0x4919b9));_0x323c9f(_0x4919b9);})[_0x71e6('0x13')](function(_0x636472){logger[_0x71e6('0x10')](_0x71e6('0x14'),_0x636472['message'],_0x388037);_0x51b7bd(_0x5945c5[_0x71e6('0x10')](0x1f4,_0x636472[_0x71e6('0x12')]));});});};exports['UpdateWhatsappQueueReport']=function(_0x2d620a){var _0x1462ef=this;return new Promise(function(_0x54ff02,_0x291a28){return db[_0x71e6('0x15')][_0x71e6('0x18')](_0x2d620a['body'],{'raw':_0x2d620a['options']?_0x2d620a['options'][_0x71e6('0x19')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x2d620a[_0x71e6('0x1a')]?_0x2d620a[_0x71e6('0x1a')][_0x71e6('0x1b')]||null:null,'attributes':_0x2d620a[_0x71e6('0x1a')]?_0x2d620a[_0x71e6('0x1a')][_0x71e6('0x1c')]||null:null,'limit':_0x2d620a[_0x71e6('0x1a')]?_0x2d620a[_0x71e6('0x1a')]['limit']||null:null})[_0x71e6('0x17')](function(_0x490d44){logger[_0x71e6('0x1d')]('UpdateWhatsappQueueReport',_0x2d620a);logger['debug'](_0x71e6('0x1e'),_0x2d620a,JSON[_0x71e6('0x1f')](_0x490d44));_0x54ff02(_0x490d44);})[_0x71e6('0x13')](function(_0x4ef515){logger[_0x71e6('0x10')](_0x71e6('0x1e'),_0x4ef515[_0x71e6('0x12')],_0x2d620a);_0x291a28(_0x1462ef[_0x71e6('0x10')](0x1f4,_0x4ef515[_0x71e6('0x12')]));});});}; \ No newline at end of file +var _0xd450=['raw','stringify','update','where','attributes','UpdateWhatsappQueueReport','moment','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','http','request','then','info','WhatsappQueueReport,\x20%s,\x20%s','request\x20sent','debug','WhatsappQueueReport,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','CreateWhatsappQueueReport','WhatsappQueueReport','create','body','options'];(function(_0x4de78b,_0x44d0b8){var _0x8a33c0=function(_0x46fa5e){while(--_0x46fa5e){_0x4de78b['push'](_0x4de78b['shift']());}};_0x8a33c0(++_0x44d0b8);}(_0xd450,0x82));var _0x0d45=function(_0xa06b0a,_0x590d19){_0xa06b0a=_0xa06b0a-0x0;var _0x735cbd=_0xd450[_0xa06b0a];return _0x735cbd;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x0d45('0x0'));var BPromise=require('bluebird');var rs=require(_0x0d45('0x1'));var fs=require('fs');var Redis=require(_0x0d45('0x2'));var db=require(_0x0d45('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0x0d45('0x4'))(_0x0d45('0x5'));var config=require(_0x0d45('0x6'));var jayson=require('jayson/promise');var client=jayson['client'][_0x0d45('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x352ab5,_0x2f73ac,_0x3da189){return new BPromise(function(_0x411adb,_0x1e6cc4){return client[_0x0d45('0x8')](_0x352ab5,_0x3da189)[_0x0d45('0x9')](function(_0x4d5337){logger[_0x0d45('0xa')](_0x0d45('0xb'),_0x2f73ac,_0x0d45('0xc'));logger[_0x0d45('0xd')](_0x0d45('0xe'),_0x2f73ac,'request\x20sent',JSON['stringify'](_0x4d5337));if(_0x4d5337[_0x0d45('0xf')]){if(_0x4d5337[_0x0d45('0xf')][_0x0d45('0x10')]===0x1f4){logger[_0x0d45('0xf')](_0x0d45('0xb'),_0x2f73ac,_0x4d5337[_0x0d45('0xf')]['message']);return _0x1e6cc4(_0x4d5337[_0x0d45('0xf')][_0x0d45('0x11')]);}logger[_0x0d45('0xf')](_0x0d45('0xb'),_0x2f73ac,_0x4d5337['error']['message']);return _0x411adb(_0x4d5337[_0x0d45('0xf')][_0x0d45('0x11')]);}else{logger[_0x0d45('0xa')](_0x0d45('0xb'),_0x2f73ac,_0x0d45('0xc'));_0x411adb(_0x4d5337[_0x0d45('0x12')][_0x0d45('0x11')]);}})[_0x0d45('0x13')](function(_0x33cbfd){logger[_0x0d45('0xf')](_0x0d45('0xb'),_0x2f73ac,_0x33cbfd);_0x1e6cc4(_0x33cbfd);});});}exports[_0x0d45('0x14')]=function(_0x3f4f67){var _0x385490=this;return new Promise(function(_0x529a42,_0x694d45){return db[_0x0d45('0x15')][_0x0d45('0x16')](_0x3f4f67[_0x0d45('0x17')],{'raw':_0x3f4f67[_0x0d45('0x18')]?_0x3f4f67[_0x0d45('0x18')][_0x0d45('0x19')]===undefined?!![]:![]:!![]})[_0x0d45('0x9')](function(_0x3524b7){logger[_0x0d45('0xa')](_0x0d45('0x14'),_0x3f4f67);logger[_0x0d45('0xd')]('CreateWhatsappQueueReport',_0x3f4f67,JSON[_0x0d45('0x1a')](_0x3524b7));_0x529a42(_0x3524b7);})[_0x0d45('0x13')](function(_0x43ffd7){logger[_0x0d45('0xf')](_0x0d45('0x14'),_0x43ffd7[_0x0d45('0x11')],_0x3f4f67);_0x694d45(_0x385490['error'](0x1f4,_0x43ffd7[_0x0d45('0x11')]));});});};exports['UpdateWhatsappQueueReport']=function(_0x320f19){var _0x2f869d=this;return new Promise(function(_0x248b8e,_0x45e883){return db[_0x0d45('0x15')][_0x0d45('0x1b')](_0x320f19[_0x0d45('0x17')],{'raw':_0x320f19[_0x0d45('0x18')]?_0x320f19[_0x0d45('0x18')][_0x0d45('0x19')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x320f19[_0x0d45('0x18')]?_0x320f19[_0x0d45('0x18')][_0x0d45('0x1c')]||null:null,'attributes':_0x320f19[_0x0d45('0x18')]?_0x320f19[_0x0d45('0x18')][_0x0d45('0x1d')]||null:null,'limit':_0x320f19[_0x0d45('0x18')]?_0x320f19[_0x0d45('0x18')]['limit']||null:null})[_0x0d45('0x9')](function(_0x2dca72){logger[_0x0d45('0xa')]('UpdateWhatsappQueueReport',_0x320f19);logger[_0x0d45('0xd')]('UpdateWhatsappQueueReport',_0x320f19,JSON[_0x0d45('0x1a')](_0x2dca72));_0x248b8e(_0x2dca72);})[_0x0d45('0x13')](function(_0x1dfe4b){logger[_0x0d45('0xf')](_0x0d45('0x1e'),_0x1dfe4b[_0x0d45('0x11')],_0x320f19);_0x45e883(_0x2f869d[_0x0d45('0xf')](0x1f4,_0x1dfe4b[_0x0d45('0x11')]));});});}; \ No newline at end of file diff --git a/server/api/whatsappTransferReport/index.js b/server/api/whatsappTransferReport/index.js index d4ec8d7..88508c0 100644 --- a/server/api/whatsappTransferReport/index.js +++ b/server/api/whatsappTransferReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb229=['show','put','update','exports','multer','util','path','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./whatsappTransferReport.controller','get','isAuthenticated','/describe','describe','/:id'];(function(_0x26d336,_0x3c9f0e){var _0x2ad163=function(_0x4bee36){while(--_0x4bee36){_0x26d336['push'](_0x26d336['shift']());}};_0x2ad163(++_0x3c9f0e);}(_0xb229,0x1c6));var _0x9b22=function(_0x57f345,_0x316929){_0x57f345=_0x57f345-0x0;var _0x255e43=_0xb229[_0x57f345];return _0x255e43;};'use strict';var multer=require(_0x9b22('0x0'));var util=require(_0x9b22('0x1'));var path=require(_0x9b22('0x2'));var timeout=require('connect-timeout');var express=require(_0x9b22('0x3'));var router=express['Router']();var fs_extra=require(_0x9b22('0x4'));var auth=require(_0x9b22('0x5'));var interaction=require(_0x9b22('0x6'));var config=require(_0x9b22('0x7'));var controller=require(_0x9b22('0x8'));router[_0x9b22('0x9')]('/',auth[_0x9b22('0xa')](),controller['index']);router[_0x9b22('0x9')](_0x9b22('0xb'),auth[_0x9b22('0xa')](),controller[_0x9b22('0xc')]);router['get'](_0x9b22('0xd'),auth[_0x9b22('0xa')](),controller[_0x9b22('0xe')]);router['post']('/',auth[_0x9b22('0xa')](),controller['create']);router[_0x9b22('0xf')]('/:id',auth[_0x9b22('0xa')](),controller[_0x9b22('0x10')]);router['delete'](_0x9b22('0xd'),auth[_0x9b22('0xa')](),controller['destroy']);module[_0x9b22('0x11')]=router; \ No newline at end of file +var _0x66ea=['destroy','exports','multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','get','isAuthenticated','/:id','show','post','put','delete'];(function(_0x213f3d,_0x31c31f){var _0x238251=function(_0x222903){while(--_0x222903){_0x213f3d['push'](_0x213f3d['shift']());}};_0x238251(++_0x31c31f);}(_0x66ea,0xce));var _0xa66e=function(_0x108dbc,_0x530283){_0x108dbc=_0x108dbc-0x0;var _0x507b9b=_0x66ea[_0x108dbc];return _0x507b9b;};'use strict';var multer=require(_0xa66e('0x0'));var util=require('util');var path=require(_0xa66e('0x1'));var timeout=require(_0xa66e('0x2'));var express=require(_0xa66e('0x3'));var router=express[_0xa66e('0x4')]();var fs_extra=require(_0xa66e('0x5'));var auth=require(_0xa66e('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0xa66e('0x7'));var controller=require('./whatsappTransferReport.controller');router[_0xa66e('0x8')]('/',auth[_0xa66e('0x9')](),controller['index']);router[_0xa66e('0x8')]('/describe',auth['isAuthenticated'](),controller['describe']);router[_0xa66e('0x8')](_0xa66e('0xa'),auth[_0xa66e('0x9')](),controller[_0xa66e('0xb')]);router[_0xa66e('0xc')]('/',auth['isAuthenticated'](),controller['create']);router[_0xa66e('0xd')](_0xa66e('0xa'),auth[_0xa66e('0x9')](),controller['update']);router[_0xa66e('0xe')](_0xa66e('0xa'),auth[_0xa66e('0x9')](),controller[_0xa66e('0xf')]);module[_0xa66e('0x10')]=router; \ No newline at end of file diff --git a/server/api/whatsappTransferReport/whatsappTransferReport.attributes.js b/server/api/whatsappTransferReport/whatsappTransferReport.attributes.js index d4debe2..d3e5acb 100644 --- a/server/api/whatsappTransferReport/whatsappTransferReport.attributes.js +++ b/server/api/whatsappTransferReport/whatsappTransferReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa03c=['ENUM','account','queue','DATE','sequelize','STRING'];(function(_0x3149a4,_0xd815c7){var _0x3dd5e9=function(_0x4f5385){while(--_0x4f5385){_0x3149a4['push'](_0x3149a4['shift']());}};_0x3dd5e9(++_0xd815c7);}(_0xa03c,0x94));var _0xca03=function(_0xdc047c,_0x332142){_0xdc047c=_0xdc047c-0x0;var _0x539fdf=_0xa03c[_0xdc047c];return _0x539fdf;};'use strict';var Sequelize=require(_0xca03('0x0'));module['exports']={'uniqueid':{'type':Sequelize[_0xca03('0x1')],'allowNull':![]},'type':{'type':Sequelize[_0xca03('0x2')](_0xca03('0x3'),'agent',_0xca03('0x4')),'allowNull':![]},'transferredAt':{'type':Sequelize[_0xca03('0x5')]}}; \ No newline at end of file +var _0x4a1d=['sequelize','exports','STRING','ENUM','account','queue','DATE'];(function(_0x14d073,_0x2e1262){var _0x31a386=function(_0x46ae38){while(--_0x46ae38){_0x14d073['push'](_0x14d073['shift']());}};_0x31a386(++_0x2e1262);}(_0x4a1d,0x77));var _0xd4a1=function(_0x13b8f3,_0x442821){_0x13b8f3=_0x13b8f3-0x0;var _0x1a6d06=_0x4a1d[_0x13b8f3];return _0x1a6d06;};'use strict';var Sequelize=require(_0xd4a1('0x0'));module[_0xd4a1('0x1')]={'uniqueid':{'type':Sequelize[_0xd4a1('0x2')],'allowNull':![]},'type':{'type':Sequelize[_0xd4a1('0x3')](_0xd4a1('0x4'),'agent',_0xd4a1('0x5')),'allowNull':![]},'transferredAt':{'type':Sequelize[_0xd4a1('0x6')]}}; \ No newline at end of file diff --git a/server/api/whatsappTransferReport/whatsappTransferReport.controller.js b/server/api/whatsappTransferReport/whatsappTransferReport.controller.js index f54e169..8ab6e86 100644 --- a/server/api/whatsappTransferReport/whatsappTransferReport.controller.js +++ b/server/api/whatsappTransferReport/whatsappTransferReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5dc2=['nolimit','order','sort','where','pick','filter','merge','type','VIRTUAL','options','includeAll','include','findAll','rows','catch','params','filters','find','create','body','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','../../config/license/util','../../mysqldb','status','json','offset','limit','count','Content-Range','apply','reject','save','then','destroy','end','sendStatus','error','stack','name','index','map','WhatsappTransferReport','rawAttributes','fieldName','key','query','keys','intersection','model','fields','attributes','length','hasOwnProperty'];(function(_0x119026,_0x3130a5){var _0x2d09ad=function(_0x35b6de){while(--_0x35b6de){_0x119026['push'](_0x119026['shift']());}};_0x2d09ad(++_0x3130a5);}(_0x5dc2,0x1d1));var _0x25dc=function(_0x5d6967,_0x584b3f){_0x5d6967=_0x5d6967-0x0;var _0x4666b6=_0x5dc2[_0x5d6967];return _0x4666b6;};'use strict';var emlformat=require(_0x25dc('0x0'));var rimraf=require(_0x25dc('0x1'));var zipdir=require(_0x25dc('0x2'));var jsonpatch=require(_0x25dc('0x3'));var rp=require(_0x25dc('0x4'));var moment=require('moment');var BPromise=require(_0x25dc('0x5'));var Mustache=require(_0x25dc('0x6'));var util=require(_0x25dc('0x7'));var path=require(_0x25dc('0x8'));var sox=require(_0x25dc('0x9'));var csv=require(_0x25dc('0xa'));var ejs=require(_0x25dc('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x25dc('0xc'));var squel=require(_0x25dc('0xd'));var crypto=require('crypto');var jsforce=require(_0x25dc('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x25dc('0xa'));var querystring=require(_0x25dc('0xf'));var Papa=require(_0x25dc('0x10'));var Redis=require(_0x25dc('0x11'));var authService=require(_0x25dc('0x12'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x25dc('0x13'));var logger=require(_0x25dc('0x14'))('api');var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x25dc('0x15'));var db=require(_0x25dc('0x16'))['db'];function respondWithStatusCode(_0x2b69b3,_0x1524f1){_0x1524f1=_0x1524f1||0xcc;return function(_0x23a6bd){if(_0x23a6bd){return _0x2b69b3['sendStatus'](_0x1524f1);}return _0x2b69b3['status'](_0x1524f1)['end']();};}function respondWithResult(_0x2373bc,_0x87d0cf){_0x87d0cf=_0x87d0cf||0xc8;return function(_0x3e0bc7){if(_0x3e0bc7){return _0x2373bc[_0x25dc('0x17')](_0x87d0cf)[_0x25dc('0x18')](_0x3e0bc7);}};}function respondWithFilteredResult(_0x1da49f,_0x2a2f72){return function(_0x1f790a){if(_0x1f790a){var _0x354865=typeof _0x2a2f72[_0x25dc('0x19')]==='undefined'&&typeof _0x2a2f72[_0x25dc('0x1a')]==='undefined';var _0x1fadd4=_0x1f790a[_0x25dc('0x1b')];var _0x6b7a5d=_0x354865?0x0:_0x2a2f72[_0x25dc('0x19')];var _0x30a37f=_0x354865?_0x1f790a['count']:_0x2a2f72[_0x25dc('0x19')]+_0x2a2f72['limit'];var _0x5aedda;if(_0x30a37f>=_0x1fadd4){_0x30a37f=_0x1fadd4;_0x5aedda=0xc8;}else{_0x5aedda=0xce;}_0x1da49f[_0x25dc('0x17')](_0x5aedda);return _0x1da49f['set'](_0x25dc('0x1c'),_0x6b7a5d+'-'+_0x30a37f+'/'+_0x1fadd4)[_0x25dc('0x18')](_0x1f790a);}return null;};}function patchUpdates(_0x577399){return function(_0xbde556){try{jsonpatch[_0x25dc('0x1d')](_0xbde556,_0x577399,!![]);}catch(_0x164fec){return BPromise[_0x25dc('0x1e')](_0x164fec);}return _0xbde556[_0x25dc('0x1f')]();};}function saveUpdates(_0x8bf3f,_0x375584){return function(_0x3cbe65){if(_0x3cbe65){return _0x3cbe65['update'](_0x8bf3f)[_0x25dc('0x20')](function(_0x90264a){return _0x90264a;});}return null;};}function removeEntity(_0x428dea,_0x52f5ab){return function(_0x7f1d8){if(_0x7f1d8){return _0x7f1d8[_0x25dc('0x21')]()[_0x25dc('0x20')](function(){_0x428dea[_0x25dc('0x17')](0xcc)[_0x25dc('0x22')]();});}};}function handleEntityNotFound(_0x55897a,_0x42b8c0){return function(_0xc47c93){if(!_0xc47c93){_0x55897a[_0x25dc('0x23')](0x194);}return _0xc47c93;};}function handleError(_0x2accc9,_0x4c03f8){_0x4c03f8=_0x4c03f8||0x1f4;return function(_0x3e285d){logger[_0x25dc('0x24')](_0x3e285d[_0x25dc('0x25')]);if(_0x3e285d[_0x25dc('0x26')]){delete _0x3e285d[_0x25dc('0x26')];}_0x2accc9['status'](_0x4c03f8)['send'](_0x3e285d);};}exports[_0x25dc('0x27')]=function(_0x332905,_0x24347e){var _0x3df1de={},_0x1a21da={},_0x23e27e={'count':0x0,'rows':[]};var _0x597601=_[_0x25dc('0x28')](db[_0x25dc('0x29')][_0x25dc('0x2a')],function(_0x3e68b2){return{'name':_0x3e68b2[_0x25dc('0x2b')],'type':_0x3e68b2['type'][_0x25dc('0x2c')]};});_0x1a21da['model']=_[_0x25dc('0x28')](_0x597601,_0x25dc('0x26'));_0x1a21da[_0x25dc('0x2d')]=_[_0x25dc('0x2e')](_0x332905[_0x25dc('0x2d')]);_0x1a21da['filters']=_[_0x25dc('0x2f')](_0x1a21da['model'],_0x1a21da[_0x25dc('0x2d')]);_0x3df1de['attributes']=_[_0x25dc('0x2f')](_0x1a21da[_0x25dc('0x30')],qs[_0x25dc('0x31')](_0x332905[_0x25dc('0x2d')]['fields']));_0x3df1de[_0x25dc('0x32')]=_0x3df1de['attributes'][_0x25dc('0x33')]?_0x3df1de[_0x25dc('0x32')]:_0x1a21da[_0x25dc('0x30')];if(!_0x332905[_0x25dc('0x2d')][_0x25dc('0x34')](_0x25dc('0x35'))){_0x3df1de[_0x25dc('0x1a')]=qs[_0x25dc('0x1a')](_0x332905['query']['limit']);_0x3df1de['offset']=qs[_0x25dc('0x19')](_0x332905['query'][_0x25dc('0x19')]);}_0x3df1de[_0x25dc('0x36')]=qs[_0x25dc('0x37')](_0x332905[_0x25dc('0x2d')][_0x25dc('0x37')]);_0x3df1de[_0x25dc('0x38')]=qs['filters'](_[_0x25dc('0x39')](_0x332905[_0x25dc('0x2d')],_0x1a21da['filters']),_0x597601);if(_0x332905[_0x25dc('0x2d')][_0x25dc('0x3a')]){_0x3df1de[_0x25dc('0x38')]=_[_0x25dc('0x3b')](_0x3df1de[_0x25dc('0x38')],{'$or':_[_0x25dc('0x28')](_0x597601,function(_0x2bf943){if(_0x2bf943[_0x25dc('0x3c')]!==_0x25dc('0x3d')){var _0x7fbb70={};_0x7fbb70[_0x2bf943[_0x25dc('0x26')]]={'$like':'%'+_0x332905['query'][_0x25dc('0x3a')]+'%'};return _0x7fbb70;}})});}_0x3df1de=_['merge']({},_0x3df1de,_0x332905[_0x25dc('0x3e')]);var _0x42d3e3={'where':_0x3df1de[_0x25dc('0x38')]};return db[_0x25dc('0x29')][_0x25dc('0x1b')](_0x42d3e3)[_0x25dc('0x20')](function(_0x25a038){_0x23e27e[_0x25dc('0x1b')]=_0x25a038;if(_0x332905[_0x25dc('0x2d')][_0x25dc('0x3f')]){_0x3df1de[_0x25dc('0x40')]=[{'all':!![]}];}return db[_0x25dc('0x29')][_0x25dc('0x41')](_0x3df1de);})[_0x25dc('0x20')](function(_0x157b27){_0x23e27e[_0x25dc('0x42')]=_0x157b27;return _0x23e27e;})[_0x25dc('0x20')](respondWithFilteredResult(_0x24347e,_0x3df1de))[_0x25dc('0x43')](handleError(_0x24347e,null));};exports['show']=function(_0x28d2fd,_0x12c9a6){var _0x1cdc21={'raw':!![],'where':{'id':_0x28d2fd[_0x25dc('0x44')]['id']}},_0x55b4ea={};_0x55b4ea[_0x25dc('0x30')]=_[_0x25dc('0x2e')](db[_0x25dc('0x29')]['rawAttributes']);_0x55b4ea['query']=_[_0x25dc('0x2e')](_0x28d2fd[_0x25dc('0x2d')]);_0x55b4ea[_0x25dc('0x45')]=_[_0x25dc('0x2f')](_0x55b4ea[_0x25dc('0x30')],_0x55b4ea['query']);_0x1cdc21[_0x25dc('0x32')]=_['intersection'](_0x55b4ea[_0x25dc('0x30')],qs['fields'](_0x28d2fd['query'][_0x25dc('0x31')]));_0x1cdc21[_0x25dc('0x32')]=_0x1cdc21['attributes']['length']?_0x1cdc21[_0x25dc('0x32')]:_0x55b4ea[_0x25dc('0x30')];if(_0x28d2fd[_0x25dc('0x2d')][_0x25dc('0x3f')]){_0x1cdc21['include']=[{'all':!![]}];}_0x1cdc21=_['merge']({},_0x1cdc21,_0x28d2fd[_0x25dc('0x3e')]);return db[_0x25dc('0x29')][_0x25dc('0x46')](_0x1cdc21)[_0x25dc('0x20')](handleEntityNotFound(_0x12c9a6,null))[_0x25dc('0x20')](respondWithResult(_0x12c9a6,null))[_0x25dc('0x43')](handleError(_0x12c9a6,null));};exports[_0x25dc('0x47')]=function(_0x32b925,_0x560087){return db[_0x25dc('0x29')][_0x25dc('0x47')](_0x32b925[_0x25dc('0x48')],{})[_0x25dc('0x20')](respondWithResult(_0x560087,0xc9))['catch'](handleError(_0x560087,null));};exports['update']=function(_0x3db910,_0x372675){if(_0x3db910[_0x25dc('0x48')]['id']){delete _0x3db910['body']['id'];}return db[_0x25dc('0x29')][_0x25dc('0x46')]({'where':{'id':_0x3db910[_0x25dc('0x44')]['id']}})[_0x25dc('0x20')](handleEntityNotFound(_0x372675,null))[_0x25dc('0x20')](saveUpdates(_0x3db910[_0x25dc('0x48')],null))[_0x25dc('0x20')](respondWithResult(_0x372675,null))[_0x25dc('0x43')](handleError(_0x372675,null));};exports[_0x25dc('0x21')]=function(_0x488578,_0x43cd45){return db[_0x25dc('0x29')]['find']({'where':{'id':_0x488578[_0x25dc('0x44')]['id']}})[_0x25dc('0x20')](handleEntityNotFound(_0x43cd45,null))[_0x25dc('0x20')](removeEntity(_0x43cd45,null))[_0x25dc('0x43')](handleError(_0x43cd45,null));};exports[_0x25dc('0x49')]=function(_0x11793d,_0x303398){return db[_0x25dc('0x29')][_0x25dc('0x49')]()[_0x25dc('0x20')](respondWithResult(_0x303398,null))[_0x25dc('0x43')](handleError(_0x303398,null));}; \ No newline at end of file +var _0x173d=['save','update','destroy','then','error','stack','name','index','map','WhatsappTransferReport','rawAttributes','type','key','query','keys','intersection','attributes','model','fields','length','hasOwnProperty','nolimit','limit','order','sort','where','filters','pick','filter','merge','VIRTUAL','options','include','findAll','show','params','includeAll','create','catch','body','find','describe','rimraf','request-promise','bluebird','mustache','util','path','sox','ejs','fs-extra','lodash','crypto','desk.js','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','count','set','Content-Range','apply'];(function(_0x2d1927,_0x44b6f3){var _0x37db09=function(_0x22789b){while(--_0x22789b){_0x2d1927['push'](_0x2d1927['shift']());}};_0x37db09(++_0x44b6f3);}(_0x173d,0x108));var _0xd173=function(_0x2d1530,_0x29acb2){_0x2d1530=_0x2d1530-0x0;var _0x40c83b=_0x173d[_0x2d1530];return _0x40c83b;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xd173('0x0'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xd173('0x1'));var moment=require('moment');var BPromise=require(_0xd173('0x2'));var Mustache=require(_0xd173('0x3'));var util=require(_0xd173('0x4'));var path=require(_0xd173('0x5'));var sox=require(_0xd173('0x6'));var csv=require('to-csv');var ejs=require(_0xd173('0x7'));var fs=require('fs');var fs_extra=require(_0xd173('0x8'));var _=require(_0xd173('0x9'));var squel=require('squel');var crypto=require(_0xd173('0xa'));var jsforce=require('jsforce');var deskjs=require(_0xd173('0xb'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xd173('0xc'));var Redis=require(_0xd173('0xd'));var authService=require('../../components/auth/service');var qs=require(_0xd173('0xe'));var as=require(_0xd173('0xf'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xd173('0x10'))(_0xd173('0x11'));var utils=require(_0xd173('0x12'));var config=require(_0xd173('0x13'));var licenseUtil=require(_0xd173('0x14'));var db=require(_0xd173('0x15'))['db'];function respondWithStatusCode(_0x2a7c1d,_0x37b65a){_0x37b65a=_0x37b65a||0xcc;return function(_0x371826){if(_0x371826){return _0x2a7c1d[_0xd173('0x16')](_0x37b65a);}return _0x2a7c1d[_0xd173('0x17')](_0x37b65a)[_0xd173('0x18')]();};}function respondWithResult(_0x57d8f7,_0x29ddae){_0x29ddae=_0x29ddae||0xc8;return function(_0x5e4a79){if(_0x5e4a79){return _0x57d8f7[_0xd173('0x17')](_0x29ddae)[_0xd173('0x19')](_0x5e4a79);}};}function respondWithFilteredResult(_0x5cf801,_0x1093dc){return function(_0x26859a){if(_0x26859a){var _0x100602=typeof _0x1093dc[_0xd173('0x1a')]==='undefined'&&typeof _0x1093dc['limit']===_0xd173('0x1b');var _0x18a0c6=_0x26859a[_0xd173('0x1c')];var _0x58d7d8=_0x100602?0x0:_0x1093dc[_0xd173('0x1a')];var _0x352d17=_0x100602?_0x26859a[_0xd173('0x1c')]:_0x1093dc[_0xd173('0x1a')]+_0x1093dc['limit'];var _0x4aef50;if(_0x352d17>=_0x18a0c6){_0x352d17=_0x18a0c6;_0x4aef50=0xc8;}else{_0x4aef50=0xce;}_0x5cf801[_0xd173('0x17')](_0x4aef50);return _0x5cf801[_0xd173('0x1d')](_0xd173('0x1e'),_0x58d7d8+'-'+_0x352d17+'/'+_0x18a0c6)[_0xd173('0x19')](_0x26859a);}return null;};}function patchUpdates(_0x58e9ff){return function(_0x55727c){try{jsonpatch[_0xd173('0x1f')](_0x55727c,_0x58e9ff,!![]);}catch(_0xbe4fb4){return BPromise['reject'](_0xbe4fb4);}return _0x55727c[_0xd173('0x20')]();};}function saveUpdates(_0x3b30f7,_0x5164c2){return function(_0xb729d9){if(_0xb729d9){return _0xb729d9[_0xd173('0x21')](_0x3b30f7)['then'](function(_0xc23357){return _0xc23357;});}return null;};}function removeEntity(_0x115975,_0x564127){return function(_0x4396ad){if(_0x4396ad){return _0x4396ad[_0xd173('0x22')]()[_0xd173('0x23')](function(){_0x115975[_0xd173('0x17')](0xcc)[_0xd173('0x18')]();});}};}function handleEntityNotFound(_0x10e966,_0x507231){return function(_0x57f971){if(!_0x57f971){_0x10e966[_0xd173('0x16')](0x194);}return _0x57f971;};}function handleError(_0xd9573,_0x1f0dc5){_0x1f0dc5=_0x1f0dc5||0x1f4;return function(_0x24181c){logger[_0xd173('0x24')](_0x24181c[_0xd173('0x25')]);if(_0x24181c[_0xd173('0x26')]){delete _0x24181c[_0xd173('0x26')];}_0xd9573['status'](_0x1f0dc5)['send'](_0x24181c);};}exports[_0xd173('0x27')]=function(_0x15035c,_0x5a7884){var _0x5596c2={},_0x25da07={},_0x38a389={'count':0x0,'rows':[]};var _0x2b1cf3=_[_0xd173('0x28')](db[_0xd173('0x29')][_0xd173('0x2a')],function(_0x5172be){return{'name':_0x5172be['fieldName'],'type':_0x5172be[_0xd173('0x2b')][_0xd173('0x2c')]};});_0x25da07['model']=_[_0xd173('0x28')](_0x2b1cf3,_0xd173('0x26'));_0x25da07[_0xd173('0x2d')]=_[_0xd173('0x2e')](_0x15035c[_0xd173('0x2d')]);_0x25da07['filters']=_[_0xd173('0x2f')](_0x25da07['model'],_0x25da07[_0xd173('0x2d')]);_0x5596c2[_0xd173('0x30')]=_['intersection'](_0x25da07[_0xd173('0x31')],qs[_0xd173('0x32')](_0x15035c[_0xd173('0x2d')][_0xd173('0x32')]));_0x5596c2[_0xd173('0x30')]=_0x5596c2['attributes'][_0xd173('0x33')]?_0x5596c2[_0xd173('0x30')]:_0x25da07[_0xd173('0x31')];if(!_0x15035c[_0xd173('0x2d')][_0xd173('0x34')](_0xd173('0x35'))){_0x5596c2['limit']=qs[_0xd173('0x36')](_0x15035c[_0xd173('0x2d')][_0xd173('0x36')]);_0x5596c2['offset']=qs['offset'](_0x15035c[_0xd173('0x2d')][_0xd173('0x1a')]);}_0x5596c2[_0xd173('0x37')]=qs['sort'](_0x15035c[_0xd173('0x2d')][_0xd173('0x38')]);_0x5596c2[_0xd173('0x39')]=qs[_0xd173('0x3a')](_[_0xd173('0x3b')](_0x15035c['query'],_0x25da07[_0xd173('0x3a')]),_0x2b1cf3);if(_0x15035c['query'][_0xd173('0x3c')]){_0x5596c2[_0xd173('0x39')]=_[_0xd173('0x3d')](_0x5596c2['where'],{'$or':_['map'](_0x2b1cf3,function(_0x2a4633){if(_0x2a4633['type']!==_0xd173('0x3e')){var _0x2b5193={};_0x2b5193[_0x2a4633['name']]={'$like':'%'+_0x15035c['query'][_0xd173('0x3c')]+'%'};return _0x2b5193;}})});}_0x5596c2=_[_0xd173('0x3d')]({},_0x5596c2,_0x15035c[_0xd173('0x3f')]);var _0x433524={'where':_0x5596c2[_0xd173('0x39')]};return db[_0xd173('0x29')][_0xd173('0x1c')](_0x433524)[_0xd173('0x23')](function(_0x9d860){_0x38a389['count']=_0x9d860;if(_0x15035c[_0xd173('0x2d')]['includeAll']){_0x5596c2[_0xd173('0x40')]=[{'all':!![]}];}return db[_0xd173('0x29')][_0xd173('0x41')](_0x5596c2);})[_0xd173('0x23')](function(_0x4610ad){_0x38a389['rows']=_0x4610ad;return _0x38a389;})['then'](respondWithFilteredResult(_0x5a7884,_0x5596c2))['catch'](handleError(_0x5a7884,null));};exports[_0xd173('0x42')]=function(_0x36bcc1,_0xe2c25f){var _0x477766={'raw':!![],'where':{'id':_0x36bcc1[_0xd173('0x43')]['id']}},_0x38907d={};_0x38907d[_0xd173('0x31')]=_[_0xd173('0x2e')](db['WhatsappTransferReport']['rawAttributes']);_0x38907d[_0xd173('0x2d')]=_[_0xd173('0x2e')](_0x36bcc1[_0xd173('0x2d')]);_0x38907d[_0xd173('0x3a')]=_[_0xd173('0x2f')](_0x38907d[_0xd173('0x31')],_0x38907d[_0xd173('0x2d')]);_0x477766[_0xd173('0x30')]=_['intersection'](_0x38907d[_0xd173('0x31')],qs['fields'](_0x36bcc1[_0xd173('0x2d')]['fields']));_0x477766[_0xd173('0x30')]=_0x477766[_0xd173('0x30')]['length']?_0x477766[_0xd173('0x30')]:_0x38907d[_0xd173('0x31')];if(_0x36bcc1[_0xd173('0x2d')][_0xd173('0x44')]){_0x477766[_0xd173('0x40')]=[{'all':!![]}];}_0x477766=_[_0xd173('0x3d')]({},_0x477766,_0x36bcc1[_0xd173('0x3f')]);return db['WhatsappTransferReport']['find'](_0x477766)[_0xd173('0x23')](handleEntityNotFound(_0xe2c25f,null))[_0xd173('0x23')](respondWithResult(_0xe2c25f,null))['catch'](handleError(_0xe2c25f,null));};exports[_0xd173('0x45')]=function(_0x3a2f86,_0x36ab2a){return db[_0xd173('0x29')][_0xd173('0x45')](_0x3a2f86['body'],{})[_0xd173('0x23')](respondWithResult(_0x36ab2a,0xc9))[_0xd173('0x46')](handleError(_0x36ab2a,null));};exports[_0xd173('0x21')]=function(_0xdf7c4f,_0x350944){if(_0xdf7c4f['body']['id']){delete _0xdf7c4f[_0xd173('0x47')]['id'];}return db[_0xd173('0x29')]['find']({'where':{'id':_0xdf7c4f[_0xd173('0x43')]['id']}})[_0xd173('0x23')](handleEntityNotFound(_0x350944,null))['then'](saveUpdates(_0xdf7c4f[_0xd173('0x47')],null))[_0xd173('0x23')](respondWithResult(_0x350944,null))[_0xd173('0x46')](handleError(_0x350944,null));};exports['destroy']=function(_0x26f369,_0x158e80){return db['WhatsappTransferReport'][_0xd173('0x48')]({'where':{'id':_0x26f369['params']['id']}})[_0xd173('0x23')](handleEntityNotFound(_0x158e80,null))[_0xd173('0x23')](removeEntity(_0x158e80,null))[_0xd173('0x46')](handleError(_0x158e80,null));};exports[_0xd173('0x49')]=function(_0x31783b,_0x3e89a6){return db[_0xd173('0x29')][_0xd173('0x49')]()[_0xd173('0x23')](respondWithResult(_0x3e89a6,null))[_0xd173('0x46')](handleError(_0x3e89a6,null));}; \ No newline at end of file diff --git a/server/api/whatsappTransferReport/whatsappTransferReport.model.js b/server/api/whatsappTransferReport/whatsappTransferReport.model.js index 6b5e090..d228ccb 100644 --- a/server/api/whatsappTransferReport/whatsappTransferReport.model.js +++ b/server/api/whatsappTransferReport/whatsappTransferReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x33c8=['path','../../config/environment','./whatsappTransferReport.attributes','define','WhatsappTransferReport','report_whatsapp_transfer','uniqueid','lodash','util','../../config/logger','api','moment','bluebird'];(function(_0x4911ed,_0x476941){var _0x230288=function(_0xcaa9c0){while(--_0xcaa9c0){_0x4911ed['push'](_0x4911ed['shift']());}};_0x230288(++_0x476941);}(_0x33c8,0x125));var _0x833c=function(_0x54680e,_0x19cc0c){_0x54680e=_0x54680e-0x0;var _0x5486c4=_0x33c8[_0x54680e];return _0x5486c4;};'use strict';var _=require(_0x833c('0x0'));var util=require(_0x833c('0x1'));var logger=require(_0x833c('0x2'))(_0x833c('0x3'));var moment=require(_0x833c('0x4'));var BPromise=require(_0x833c('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x833c('0x6'));var rimraf=require('rimraf');var config=require(_0x833c('0x7'));var attributes=require(_0x833c('0x8'));module['exports']=function(_0x2a4384,_0x1ca449){return _0x2a4384[_0x833c('0x9')](_0x833c('0xa'),attributes,{'tableName':_0x833c('0xb'),'paranoid':![],'indexes':[{'name':_0x833c('0xc'),'fields':['uniqueid']}],'timestamps':!![]});}; \ No newline at end of file +var _0xc2f5=['util','api','moment','bluebird','request-promise','path','rimraf','./whatsappTransferReport.attributes','exports','define','WhatsappTransferReport','uniqueid','lodash'];(function(_0x4d3b1b,_0x1b1049){var _0x521593=function(_0xfac6cb){while(--_0xfac6cb){_0x4d3b1b['push'](_0x4d3b1b['shift']());}};_0x521593(++_0x1b1049);}(_0xc2f5,0x178));var _0x5c2f=function(_0x140fae,_0xac5e4a){_0x140fae=_0x140fae-0x0;var _0x5eac87=_0xc2f5[_0x140fae];return _0x5eac87;};'use strict';var _=require(_0x5c2f('0x0'));var util=require(_0x5c2f('0x1'));var logger=require('../../config/logger')(_0x5c2f('0x2'));var moment=require(_0x5c2f('0x3'));var BPromise=require(_0x5c2f('0x4'));var rp=require(_0x5c2f('0x5'));var fs=require('fs');var path=require(_0x5c2f('0x6'));var rimraf=require(_0x5c2f('0x7'));var config=require('../../config/environment');var attributes=require(_0x5c2f('0x8'));module[_0x5c2f('0x9')]=function(_0x4381ef,_0x50ff96){return _0x4381ef[_0x5c2f('0xa')](_0x5c2f('0xb'),attributes,{'tableName':'report_whatsapp_transfer','paranoid':![],'indexes':[{'name':_0x5c2f('0xc'),'fields':[_0x5c2f('0xc')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/whatsappTransferReport/whatsappTransferReport.rpc.js b/server/api/whatsappTransferReport/whatsappTransferReport.rpc.js index 9783e85..2065a8a 100644 --- a/server/api/whatsappTransferReport/whatsappTransferReport.rpc.js +++ b/server/api/whatsappTransferReport/whatsappTransferReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5daa=['info','WhatsappTransferReport,\x20%s,\x20%s','request\x20sent','WhatsappTransferReport,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','jayson/promise','http','request','then'];(function(_0x4c3f7d,_0x56ce39){var _0x48c013=function(_0x49e4ef){while(--_0x49e4ef){_0x4c3f7d['push'](_0x4c3f7d['shift']());}};_0x48c013(++_0x56ce39);}(_0x5daa,0x135));var _0xa5da=function(_0x39c001,_0x3403d5){_0x39c001=_0x39c001-0x0;var _0x47a167=_0x5daa[_0x39c001];return _0x47a167;};'use strict';var _=require('lodash');var util=require(_0xa5da('0x0'));var moment=require(_0xa5da('0x1'));var BPromise=require(_0xa5da('0x2'));var rs=require(_0xa5da('0x3'));var fs=require('fs');var Redis=require(_0xa5da('0x4'));var db=require(_0xa5da('0x5'))['db'];var utils=require(_0xa5da('0x6'));var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require(_0xa5da('0x7'));var client=jayson['client'][_0xa5da('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x388d0d,_0x4ac73b,_0x4fd03d){return new BPromise(function(_0x2f0d05,_0x2e2182){return client[_0xa5da('0x9')](_0x388d0d,_0x4fd03d)[_0xa5da('0xa')](function(_0x564d21){logger[_0xa5da('0xb')](_0xa5da('0xc'),_0x4ac73b,_0xa5da('0xd'));logger['debug'](_0xa5da('0xe'),_0x4ac73b,_0xa5da('0xd'),JSON['stringify'](_0x564d21));if(_0x564d21[_0xa5da('0xf')]){if(_0x564d21[_0xa5da('0xf')][_0xa5da('0x10')]===0x1f4){logger[_0xa5da('0xf')](_0xa5da('0xc'),_0x4ac73b,_0x564d21[_0xa5da('0xf')][_0xa5da('0x11')]);return _0x2e2182(_0x564d21['error'][_0xa5da('0x11')]);}logger[_0xa5da('0xf')](_0xa5da('0xc'),_0x4ac73b,_0x564d21[_0xa5da('0xf')][_0xa5da('0x11')]);return _0x2f0d05(_0x564d21[_0xa5da('0xf')][_0xa5da('0x11')]);}else{logger['info'](_0xa5da('0xc'),_0x4ac73b,_0xa5da('0xd'));_0x2f0d05(_0x564d21[_0xa5da('0x12')]['message']);}})[_0xa5da('0x13')](function(_0x38d15f){logger['error'](_0xa5da('0xc'),_0x4ac73b,_0x38d15f);_0x2e2182(_0x38d15f);});});} \ No newline at end of file +var _0x7b8b=['WhatsappTransferReport,\x20%s,\x20%s','result','catch','lodash','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','info','request\x20sent','debug','WhatsappTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message'];(function(_0x5968cf,_0x57e980){var _0x34c957=function(_0xe9abd6){while(--_0xe9abd6){_0x5968cf['push'](_0x5968cf['shift']());}};_0x34c957(++_0x57e980);}(_0x7b8b,0xc9));var _0xb7b8=function(_0x2cf2e9,_0xd58ea1){_0x2cf2e9=_0x2cf2e9-0x0;var _0xd3670d=_0x7b8b[_0x2cf2e9];return _0xd3670d;};'use strict';var _=require(_0xb7b8('0x0'));var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xb7b8('0x1'));var fs=require('fs');var Redis=require(_0xb7b8('0x2'));var db=require(_0xb7b8('0x3'))['db'];var utils=require(_0xb7b8('0x4'));var logger=require(_0xb7b8('0x5'))(_0xb7b8('0x6'));var config=require('../../config/environment');var jayson=require(_0xb7b8('0x7'));var client=jayson[_0xb7b8('0x8')][_0xb7b8('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x3b8a31,_0x1c2382,_0x3b9f5){return new BPromise(function(_0x43cdb0,_0x1b9de8){return client[_0xb7b8('0xa')](_0x3b8a31,_0x3b9f5)['then'](function(_0x76a719){logger[_0xb7b8('0xb')]('WhatsappTransferReport,\x20%s,\x20%s',_0x1c2382,_0xb7b8('0xc'));logger[_0xb7b8('0xd')](_0xb7b8('0xe'),_0x1c2382,_0xb7b8('0xc'),JSON[_0xb7b8('0xf')](_0x76a719));if(_0x76a719[_0xb7b8('0x10')]){if(_0x76a719['error'][_0xb7b8('0x11')]===0x1f4){logger[_0xb7b8('0x10')]('WhatsappTransferReport,\x20%s,\x20%s',_0x1c2382,_0x76a719['error']['message']);return _0x1b9de8(_0x76a719[_0xb7b8('0x10')][_0xb7b8('0x12')]);}logger['error'](_0xb7b8('0x13'),_0x1c2382,_0x76a719[_0xb7b8('0x10')][_0xb7b8('0x12')]);return _0x43cdb0(_0x76a719['error'][_0xb7b8('0x12')]);}else{logger[_0xb7b8('0xb')]('WhatsappTransferReport,\x20%s,\x20%s',_0x1c2382,'request\x20sent');_0x43cdb0(_0x76a719[_0xb7b8('0x14')]['message']);}})[_0xb7b8('0x15')](function(_0x3576f2){logger[_0xb7b8('0x10')](_0xb7b8('0x13'),_0x1c2382,_0x3576f2);_0x1b9de8(_0x3576f2);});});} \ No newline at end of file diff --git a/server/app.js b/server/app.js index 3d6969b..740984e 100644 --- a/server/app.js +++ b/server/app.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd34b=['default','catch','error','Server\x20failed\x20to\x20start\x20due\x20to\x20error:\x20%s','exit','lodash','./mysqldb','./rpc','./config/environment','app','./config/pm2','./config/pm2/config','./config/schedule','./config/schedule/chat','./config/schedule/transcribe','then','listen','info','start','Online\x20apps:','map','online','name','join','Offline\x20apps:','filter','status','seedDB','./config/seedDB','./config/license'];(function(_0x392574,_0x3d7cff){var _0x33117f=function(_0x5e65c2){while(--_0x5e65c2){_0x392574['push'](_0x392574['shift']());}};_0x33117f(++_0x3d7cff);}(_0xd34b,0xf5));var _0xbd34=function(_0x53e74e,_0x39a29f){_0x53e74e=_0x53e74e-0x0;var _0xd3994d=_0xd34b[_0x53e74e];return _0xd3994d;};'use strict';var _=require(_0xbd34('0x0'));var mysqldb=require(_0xbd34('0x1'));var rpc=require(_0xbd34('0x2'));var config=require(_0xbd34('0x3'));var logger=require('./config/logger')(_0xbd34('0x4'));var pm2=require(_0xbd34('0x5'));var pm2Config=require(_0xbd34('0x6'));var schedule=require(_0xbd34('0x7'));var chat=require(_0xbd34('0x8'));var whatsapp=require('./config/schedule/whatsapp');var transcribe=require(_0xbd34('0x9'));function main(){return mysqldb['db']['sequelize']['sync']()[_0xbd34('0xa')](function(){return rpc[_0xbd34('0xb')]();})[_0xbd34('0xa')](function(_0x3dc62a){logger[_0xbd34('0xc')](_0x3dc62a);return chat['start']();})[_0xbd34('0xa')](function(){return whatsapp['start']();})['then'](function(){return schedule[_0xbd34('0xd')]();})['then'](function(){return transcribe[_0xbd34('0xd')]();})[_0xbd34('0xa')](function(_0x393a21){logger[_0xbd34('0xc')](_0x393a21);return pm2['start'](pm2Config);})[_0xbd34('0xa')](function(_0x4a51d0){logger[_0xbd34('0xc')](_0xbd34('0xe'),_[_0xbd34('0xf')](_['filter'](_0x4a51d0,{'status':_0xbd34('0x10')}),_0xbd34('0x11'))[_0xbd34('0x12')]());logger[_0xbd34('0xc')](_0xbd34('0x13'),_[_0xbd34('0xf')](_[_0xbd34('0x14')](_0x4a51d0,function(_0x7733a3){return _0x7733a3[_0xbd34('0x15')]!==_0xbd34('0x10');}),_0xbd34('0x11'))[_0xbd34('0x12')]()||'None');config[_0xbd34('0x16')]&&require(_0xbd34('0x17'))['default']();require(_0xbd34('0x18'))[_0xbd34('0x19')]();})[_0xbd34('0x1a')](function(_0x511ec0){logger[_0xbd34('0x1b')](_0xbd34('0x1c'),_0x511ec0);process[_0xbd34('0x1d')](0x1);});}main(); \ No newline at end of file +var _0x1b5e=['./rpc','./config/environment','./config/logger','app','./config/pm2','./config/schedule','./config/schedule/chat','./config/schedule/transcribe','sequelize','listen','then','info','start','Online\x20apps:','map','online','name','join','Offline\x20apps:','filter','None','seedDB','default','./config/license','catch','error','Server\x20failed\x20to\x20start\x20due\x20to\x20error:\x20%s','exit','lodash','./mysqldb'];(function(_0x5d824a,_0x595c3d){var _0x37ee5f=function(_0xca1e){while(--_0xca1e){_0x5d824a['push'](_0x5d824a['shift']());}};_0x37ee5f(++_0x595c3d);}(_0x1b5e,0x166));var _0xe1b5=function(_0x35dae1,_0x2a5cc4){_0x35dae1=_0x35dae1-0x0;var _0x21536f=_0x1b5e[_0x35dae1];return _0x21536f;};'use strict';var _=require(_0xe1b5('0x0'));var mysqldb=require(_0xe1b5('0x1'));var rpc=require(_0xe1b5('0x2'));var config=require(_0xe1b5('0x3'));var logger=require(_0xe1b5('0x4'))(_0xe1b5('0x5'));var pm2=require(_0xe1b5('0x6'));var pm2Config=require('./config/pm2/config');var schedule=require(_0xe1b5('0x7'));var chat=require(_0xe1b5('0x8'));var whatsapp=require('./config/schedule/whatsapp');var transcribe=require(_0xe1b5('0x9'));function main(){return mysqldb['db'][_0xe1b5('0xa')]['sync']()['then'](function(){return rpc[_0xe1b5('0xb')]();})[_0xe1b5('0xc')](function(_0x6faf40){logger[_0xe1b5('0xd')](_0x6faf40);return chat['start']();})[_0xe1b5('0xc')](function(){return whatsapp[_0xe1b5('0xe')]();})[_0xe1b5('0xc')](function(){return schedule[_0xe1b5('0xe')]();})[_0xe1b5('0xc')](function(){return transcribe[_0xe1b5('0xe')]();})[_0xe1b5('0xc')](function(_0x28055d){logger[_0xe1b5('0xd')](_0x28055d);return pm2[_0xe1b5('0xe')](pm2Config);})['then'](function(_0x988edc){logger[_0xe1b5('0xd')](_0xe1b5('0xf'),_[_0xe1b5('0x10')](_['filter'](_0x988edc,{'status':_0xe1b5('0x11')}),_0xe1b5('0x12'))[_0xe1b5('0x13')]());logger[_0xe1b5('0xd')](_0xe1b5('0x14'),_[_0xe1b5('0x10')](_[_0xe1b5('0x15')](_0x988edc,function(_0x2190c1){return _0x2190c1['status']!==_0xe1b5('0x11');}),_0xe1b5('0x12'))[_0xe1b5('0x13')]()||_0xe1b5('0x16'));config[_0xe1b5('0x17')]&&require('./config/seedDB')[_0xe1b5('0x18')]();require(_0xe1b5('0x19'))[_0xe1b5('0x18')]();})[_0xe1b5('0x1a')](function(_0x230f38){logger[_0xe1b5('0x1b')](_0xe1b5('0x1c'),_0x230f38);process[_0xe1b5('0x1d')](0x1);});}main(); \ No newline at end of file diff --git a/server/components/auth/service.js b/server/components/auth/service.js index 445cfe7..e494ef9 100644 --- a/server/components/auth/service.js +++ b/server/components/auth/service.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x05c6=['interface','privacyEnabled','settingsEnabled','wssPort','downloadVoiceRecordings','downloadOmnichannelInteractions','isChatInteractionAuthorized','isAuthenticated','use','user','findOne','closed','disposition','then','status','unmanaged','Unmanaged.','Forbidden.','catch','headers','authorization','Basic','User','pass','json','Wrong\x20credentials.','startsWith','query','getUuid','apikey','find','Setting','blockDuration','isEqual','nonce','API\x20access\x20key\x20is\x20not\x20valid\x20anymore','Invalid\x20API\x20access\x20key','blockedAt','add','minutes','Unknown\x20authorization\x20format','User\x20not\x20found.','User\x20object\x20not\x20found.','getLicense','update','Forbidden','isMiddleware','setTokenCookie','It\x20looks\x20like\x20you\x20aren\x27t\x20logged\x20in,\x20please\x20try\x20again.','cookie','redirect','/dashboards/general','send','retrieveApiKey','isNil','apiKeyNonce','apiKeyIat','generateApiKey','Please\x20use\x20the\x20previous\x20API\x20access\x20key\x20to\x20generate\x20a\x20new\x20one','test','Sequelize','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','validatePasswordHistory','decryptString','toLowerCase','format','The\x20password\x20must\x20be\x20different\x20from\x20the\x20previous\x20%d\x20passwords.\x20Please\x20choose\x20another\x20one.','The\x20password\x20must\x20be\x20different\x20from\x20the\x20last\x20one.\x20Please\x20choose\x20another\x20one.','updatePasswordsHistory','length','splice','unshift','encryptString','promisify','hex','floor','now','toString','HS512','../../config/environment','../../config/license/hardware','../encryptor','lodash','jsonwebtoken','express-jwt','composable-middleware','basic-auth','crypto','bluebird','util','secrets','session','role','fullname','name','email','userpic','permissions','md5secret','voicePause','chatPause','mailPause','faxPause','pauseType','showWebBar','lastLoginAt','lastPauseAt','crudPermissions','alias','phoneBarAutoAnswer','phoneBarAutoAnswerDelay','phoneBarDnd','phoneBarEnableRecording','phoneBarEnableDtmfTone','phoneBarExpires'];(function(_0x4c7423,_0x117200){var _0x5f0094=function(_0x2f0448){while(--_0x2f0448){_0x4c7423['push'](_0x4c7423['shift']());}};_0x5f0094(++_0x117200);}(_0x05c6,0x1a8));var _0x605c=function(_0x3b64bb,_0x4310f9){_0x3b64bb=_0x3b64bb-0x0;var _0x41e640=_0x05c6[_0x3b64bb];return _0x41e640;};'use strict';var db=require('../../mysqldb')['db'];var config=require(_0x605c('0x0'));var hardwareConf=require(_0x605c('0x1'));var licenseUtil=require('../../config/license/util');var encryptor=require(_0x605c('0x2'));var _=require(_0x605c('0x3'));var jwt=require(_0x605c('0x4'));var expressJwt=require(_0x605c('0x5'));var compose=require(_0x605c('0x6'));var basicAuth=require(_0x605c('0x7'));var crypto=require(_0x605c('0x8'));var BPromise=require(_0x605c('0x9'));var util=require(_0x605c('0xa'));var moment=require('moment');var validateJwt=expressJwt({'secret':config[_0x605c('0xb')][_0x605c('0xc')]});var userAttributes=['id',_0x605c('0xd'),_0x605c('0xe'),_0x605c('0xf'),'internal',_0x605c('0x10'),_0x605c('0x11'),_0x605c('0x12'),_0x605c('0x13'),_0x605c('0x14'),_0x605c('0x15'),_0x605c('0x16'),_0x605c('0x17'),'smsPause','openchannelPause',_0x605c('0x18'),_0x605c('0x19'),_0x605c('0x1a'),_0x605c('0x1b'),_0x605c('0x1c'),'allowmessenger','passwordResetAt',_0x605c('0x1d'),_0x605c('0x1e'),_0x605c('0x1f'),_0x605c('0x20'),_0x605c('0x21'),_0x605c('0x22'),'phoneBarEnableSettings',_0x605c('0x23'),'phoneBarPrefixRequired','phoneBarRemoteControl','phoneBarRemoteControlPort','hotdesk',_0x605c('0x24'),'userProfileId',_0x605c('0x25'),_0x605c('0x26'),_0x605c('0x27'),_0x605c('0x28'),_0x605c('0x29'),'downloadAttachments'];exports[_0x605c('0x2a')]=function(){return this[_0x605c('0x2b')](!![])[_0x605c('0x2c')](function(_0x5be563,_0x1bd76a,_0x3d5c63){if(_0x5be563[_0x605c('0x2d')]){_0x3d5c63();}else{return db['ChatInteraction'][_0x605c('0x2e')]({'where':{'id':_0x5be563['params']['id']},'attributes':['id',_0x605c('0x2f'),_0x605c('0x30')],'raw':!![]})[_0x605c('0x31')](function(_0xcc0af3){if(_0xcc0af3&&_0xcc0af3['closed']){return _0x1bd76a[_0x605c('0x32')](_0xcc0af3[_0x605c('0x30')]===_0x605c('0x33')?0x195:0x193)['json']({'message':_0xcc0af3['disposition']===_0x605c('0x33')?_0x605c('0x34'):_0x605c('0x35')});}else{_0x3d5c63();}})[_0x605c('0x36')](function(_0x595e4e){_0x3d5c63(_0x595e4e);});}});};exports[_0x605c('0x2b')]=function isAuthenticated(_0x5de88b){return compose()[_0x605c('0x2c')](function(_0x256dda,_0x4913bb,_0x24ce38){var _0x3352db;if(_0x256dda[_0x605c('0x37')][_0x605c('0x38')]){if(_['startsWith'](_0x256dda[_0x605c('0x37')][_0x605c('0x38')],_0x605c('0x39'))){var _0x4f5a14=basicAuth(_0x256dda);db[_0x605c('0x3a')]['find']({'where':{'name':_0x4f5a14[_0x605c('0xf')]}})[_0x605c('0x31')](function(_0x5451da){if(!_0x5451da||!_0x5451da['authenticate'](_0x4f5a14[_0x605c('0x3b')])){return _0x4913bb['status'](0x191)[_0x605c('0x3c')]({'message':_0x605c('0x3d')});}_0x256dda[_0x605c('0x2d')]={'id':_0x5451da['id']};_0x24ce38();})[_0x605c('0x36')](function(_0x290a7a){_0x24ce38(_0x290a7a);});}else if(_[_0x605c('0x3e')](_0x256dda[_0x605c('0x37')][_0x605c('0x38')],'Bearer')){validateJwt(_0x256dda,_0x4913bb,_0x24ce38);}else{if(_0x5de88b){_0x24ce38();}else{return _0x4913bb['status'](0x193)[_0x605c('0x3c')]({'message':'Unknown\x20authorization\x20format'});}}}else if(_0x256dda[_0x605c('0x3f')]['apikey']){try{var _0x45df02={'audience':hardwareConf[_0x605c('0x40')](),'issuer':hardwareConf['getUuid']()};verifyJwt(_0x256dda['query'][_0x605c('0x41')],_0x45df02)[_0x605c('0x31')](function(_0xca051e){return db['User'][_0x605c('0x42')]({'where':{'id':_0xca051e['sub']}})[_0x605c('0x31')](function(_0x1252a3){_0x3352db=_0x1252a3;return db[_0x605c('0x43')][_0x605c('0x2e')]({'where':{'id':0x1},'attributes':['allowedLoginAttempts',_0x605c('0x44')],'raw':!![]});})[_0x605c('0x31')](function(_0x2217d8){if(!_0x3352db||!_[_0x605c('0x45')](_0x3352db['apiKeyNonce'],_0xca051e[_0x605c('0x46')])){return _0x4913bb[_0x605c('0x32')](0x191)[_0x605c('0x3c')]({'message':_0x605c('0x47')});}if(_0x3352db['disabled']){return _0x4913bb[_0x605c('0x32')](0x191)['json']({'message':_0x605c('0x48')});}if(_0x3352db['blocked']){if(_0x2217d8[_0x605c('0x44')]>0x0){if(moment(_0x3352db[_0x605c('0x49')])[_0x605c('0x4a')](_0x2217d8[_0x605c('0x44')],_0x605c('0x4b'))>moment()){return _0x4913bb[_0x605c('0x32')](0x191)[_0x605c('0x3c')]({'message':_0x605c('0x48')});}}else{return _0x4913bb[_0x605c('0x32')](0x191)[_0x605c('0x3c')]({'message':'Invalid\x20API\x20access\x20key'});}}_0x256dda[_0x605c('0x2d')]={'id':_0x3352db['id']};_0x24ce38();});})['catch'](function(){return _0x4913bb[_0x605c('0x32')](0x191)[_0x605c('0x3c')]({'message':_0x605c('0x48')});});}catch(_0x439887){_0x24ce38(_0x439887);}}else if(_0x5de88b){_0x24ce38();}else{return _0x4913bb[_0x605c('0x32')](0x193)[_0x605c('0x3c')]({'message':_0x605c('0x4c')});}})[_0x605c('0x2c')](function(_0x3bc8f4,_0x35c07b,_0x58b7fa){if(_0x3bc8f4[_0x605c('0x2d')]){db[_0x605c('0x3a')][_0x605c('0x42')]({'where':{'id':_0x3bc8f4[_0x605c('0x2d')]['id']},'attributes':userAttributes})[_0x605c('0x31')](function(_0x199549){if(!_0x199549){return _0x35c07b[_0x605c('0x32')](0x194)[_0x605c('0x3c')]({'message':_0x605c('0x4d')});}_0x3bc8f4[_0x605c('0x2d')]=_0x199549;_0x58b7fa();})[_0x605c('0x36')](function(_0x119ecb){_0x58b7fa(_0x119ecb);});}else if(_0x5de88b){_0x58b7fa();}else{return _0x35c07b[_0x605c('0x32')](0x194)[_0x605c('0x3c')]({'message':_0x605c('0x4e')});}});};exports['canUpdate']=function canUpdate(){return compose()[_0x605c('0x2c')](function(_0x5dc7f6,_0x443b63,_0x353654){return licenseUtil[_0x605c('0x4f')]()[_0x605c('0x31')](function(_0x3809e7){if(_0x3809e7[_0x605c('0x50')]){_0x353654();}else{return _0x443b63[_0x605c('0x32')](0x193)[_0x605c('0x3c')]({'message':_0x605c('0x51')});}})[_0x605c('0x36')](function(_0x26537c){_0x353654(_0x26537c);});});};exports[_0x605c('0x52')]=function(_0x49d124,_0x302bff,_0x405df8){_0x49d124[_0x605c('0x52')]=!![];return _0x405df8();};exports['signToken']=function signToken(_0x40a5c4){return signJwt(_0x40a5c4);};exports[_0x605c('0x53')]=function(_0x50c76e,_0x1f3eaa){if(!_0x50c76e['user']){return _0x1f3eaa[_0x605c('0x32')](0x194)[_0x605c('0x3c')]({'message':_0x605c('0x54')});}var _0x59437d={'payload':{'id':_0x50c76e[_0x605c('0x2d')]['id'],'role':_0x50c76e[_0x605c('0x2d')][_0x605c('0xd')]},'options':{'expiresIn':0x15180}};return signJwt(_0x59437d)['then'](function(_0x56359a){_0x1f3eaa[_0x605c('0x55')]('motion.token',_0x56359a);_0x1f3eaa[_0x605c('0x56')](_0x605c('0x57'));})[_0x605c('0x36')](function(_0x59bb81){return _0x1f3eaa[_0x605c('0x32')](0x1f4)[_0x605c('0x58')](_0x59bb81);});};exports[_0x605c('0x59')]=function(_0x3e5433){if(_[_0x605c('0x5a')](_0x3e5433[_0x605c('0x5b')])||_[_0x605c('0x5a')](_0x3e5433[_0x605c('0x5c')])){return null;}else{return createJwt(_0x3e5433);}};exports[_0x605c('0x5d')]=function(_0x3f3f09){_0x3f3f09[_0x605c('0x5b')]=generateNonce();_0x3f3f09[_0x605c('0x5c')]=generateIssuedAt();return createJwt(_0x3f3f09);};exports['regenerateApiKey']=function(_0x217278,_0x23f9b8){var _0x509bfe=_0x217278[_0x605c('0x3f')][_0x605c('0x41')];if(_0x509bfe){var _0x4edd7d={'nonce':_0x23f9b8[_0x605c('0x5b')],'iat':_0x23f9b8['apiKeyIat'],'audience':hardwareConf[_0x605c('0x40')](),'issuer':hardwareConf[_0x605c('0x40')]()};return verifyJwt(_0x509bfe,_0x4edd7d)[_0x605c('0x31')](function(){return generateApiKey(_0x23f9b8);});}else{throw{'message':_0x605c('0x5e')};}};exports['validatePasswordPattern']=function(_0x424680){var _0xdf5439=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(!_0xdf5439[_0x605c('0x5f')](_0x424680))throw new db[(_0x605c('0x60'))]['ValidationError'](_0x605c('0x61'));return;};exports[_0x605c('0x62')]=function(_0x5e1139,_0x576b9a,_0x186ef0){var _0x4f19c0=encryptor[_0x605c('0x63')](_0x576b9a)['split'](',');for(var _0x12ab30=0x0;_0x12ab30<_0x186ef0;_0x12ab30++){if(!_0x4f19c0[_0x12ab30])break;if(_0x5e1139[_0x605c('0x64')]()===_0x4f19c0[_0x12ab30][_0x605c('0x64')]()){var _0x57a344=util[_0x605c('0x65')](_0x605c('0x66'),_0x186ef0);if(_0x186ef0===0x1){_0x57a344=_0x605c('0x67');}throw new db['Sequelize']['ValidationError'](_0x57a344);}}return;};exports[_0x605c('0x68')]=function(_0x2ba486,_0x2aca62){var _0x23e0aa=_0x2aca62?encryptor[_0x605c('0x63')](_0x2aca62)['split'](','):[];if(_0x23e0aa[_0x605c('0x69')]===0x5){_0x23e0aa[_0x605c('0x6a')](-0x1,0x1);}_0x23e0aa[_0x605c('0x6b')](_0x2ba486);return encryptor[_0x605c('0x6c')](_0x23e0aa['join'](','));};function signJwt(_0xe04b5a){var _0x22ada9=BPromise['promisify'](jwt['sign'],{'context':jwt});var _0x4518b9=_0xe04b5a['secret']||config['secrets'][_0x605c('0xc')];return new BPromise(function(_0x4f5050,_0x3a22ce){_0x22ada9(_0xe04b5a['payload'],_0x4518b9,_0xe04b5a['options'])[_0x605c('0x31')](function(_0x2ceec4){_0x4f5050(_0x2ceec4);})[_0x605c('0x36')](function(_0xb71e00){_0x3a22ce(_0xb71e00);});});}function verifyJwt(_0x211649,_0x2f162f,_0x48a2a6){var _0x53e97a=BPromise[_0x605c('0x6d')](jwt['verify'],{'context':jwt});var _0x1300af=_0x48a2a6||config[_0x605c('0xb')][_0x605c('0xc')];return new BPromise(function(_0xe1846,_0x9ad99c){_0x53e97a(_0x211649,_0x1300af,_0x2f162f)[_0x605c('0x31')](function(_0x244c8a){_0xe1846(_0x244c8a);})['catch'](function(_0x44a40b){_0x9ad99c(_0x44a40b);});});}function generateNonce(){return crypto['randomBytes'](0x10)['toString'](_0x605c('0x6e'));}function generateIssuedAt(){return Math[_0x605c('0x6f')](Date[_0x605c('0x70')]()/0x3e8)[_0x605c('0x71')]();}function createJwt(_0x2642ce){var _0x381ca4={'payload':{'iat':_0x2642ce[_0x605c('0x5c')],'nonce':_0x2642ce[_0x605c('0x5b')]},'options':{'algorithm':_0x605c('0x72'),'subject':_0x2642ce['id'][_0x605c('0x71')](),'issuer':hardwareConf[_0x605c('0x40')](),'audience':hardwareConf[_0x605c('0x40')]()}};return signJwt(_0x381ca4)[_0x605c('0x31')](function(_0xb6b785){return{'iat':_0x2642ce[_0x605c('0x5c')],'nonce':_0x2642ce[_0x605c('0x5b')],'token':_0xb6b785};});} \ No newline at end of file +var _0x060c=['alias','phoneBarAutoAnswer','phoneBarDnd','phoneBarEnableRecording','phoneBarEnableSettings','phoneBarExpires','phoneBarRemoteControl','phoneBarRemoteControlPort','hotdesk','interface','userProfileId','privacyEnabled','downloadVoiceRecordings','downloadOmnichannelInteractions','downloadAttachments','isChatInteractionAuthorized','isAuthenticated','use','ChatInteraction','findOne','params','closed','disposition','then','status','unmanaged','json','Unmanaged.','Forbidden.','headers','startsWith','authorization','find','authenticate','pass','Wrong\x20credentials.','user','catch','Bearer','Unknown\x20authorization\x20format','query','apikey','User','allowedLoginAttempts','apiKeyNonce','nonce','API\x20access\x20key\x20is\x20not\x20valid\x20anymore','disabled','Invalid\x20API\x20access\x20key','blockedAt','add','blockDuration','minutes','User\x20not\x20found.','User\x20object\x20not\x20found.','canUpdate','getLicense','update','Forbidden','isMiddleware','signToken','setTokenCookie','It\x20looks\x20like\x20you\x20aren\x27t\x20logged\x20in,\x20please\x20try\x20again.','cookie','motion.token','/dashboards/general','retrieveApiKey','isNil','apiKeyIat','getUuid','validatePasswordPattern','test','Sequelize','ValidationError','validatePasswordHistory','toLowerCase','The\x20password\x20must\x20be\x20different\x20from\x20the\x20previous\x20%d\x20passwords.\x20Please\x20choose\x20another\x20one.','decryptString','split','length','splice','unshift','encryptString','join','secret','payload','options','promisify','verify','secrets','randomBytes','toString','hex','now','HS512','../../mysqldb','../../config/environment','../../config/license/hardware','../../config/license/util','../encryptor','jsonwebtoken','composable-middleware','basic-auth','bluebird','moment','session','role','fullname','name','internal','email','userpic','permissions','md5secret','voicePause','chatPause','mailPause','faxPause','smsPause','pauseType','showWebBar','lastLoginAt','lastPauseAt','allowmessenger'];(function(_0x8b7c2c,_0x3a37fa){var _0xa783fe=function(_0x275070){while(--_0x275070){_0x8b7c2c['push'](_0x8b7c2c['shift']());}};_0xa783fe(++_0x3a37fa);}(_0x060c,0x157));var _0xc060=function(_0x17d4d1,_0x12f9ec){_0x17d4d1=_0x17d4d1-0x0;var _0x2b2d64=_0x060c[_0x17d4d1];return _0x2b2d64;};'use strict';var db=require(_0xc060('0x0'))['db'];var config=require(_0xc060('0x1'));var hardwareConf=require(_0xc060('0x2'));var licenseUtil=require(_0xc060('0x3'));var encryptor=require(_0xc060('0x4'));var _=require('lodash');var jwt=require(_0xc060('0x5'));var expressJwt=require('express-jwt');var compose=require(_0xc060('0x6'));var basicAuth=require(_0xc060('0x7'));var crypto=require('crypto');var BPromise=require(_0xc060('0x8'));var util=require('util');var moment=require(_0xc060('0x9'));var validateJwt=expressJwt({'secret':config['secrets'][_0xc060('0xa')]});var userAttributes=['id',_0xc060('0xb'),_0xc060('0xc'),_0xc060('0xd'),_0xc060('0xe'),_0xc060('0xf'),_0xc060('0x10'),_0xc060('0x11'),_0xc060('0x12'),_0xc060('0x13'),_0xc060('0x14'),_0xc060('0x15'),_0xc060('0x16'),_0xc060('0x17'),'openchannelPause',_0xc060('0x18'),_0xc060('0x19'),_0xc060('0x1a'),_0xc060('0x1b'),'crudPermissions',_0xc060('0x1c'),'passwordResetAt',_0xc060('0x1d'),_0xc060('0x1e'),'phoneBarAutoAnswerDelay',_0xc060('0x1f'),_0xc060('0x20'),'phoneBarEnableDtmfTone',_0xc060('0x21'),_0xc060('0x22'),'phoneBarPrefixRequired',_0xc060('0x23'),_0xc060('0x24'),_0xc060('0x25'),_0xc060('0x26'),_0xc060('0x27'),_0xc060('0x28'),'settingsEnabled','wssPort',_0xc060('0x29'),_0xc060('0x2a'),_0xc060('0x2b')];exports[_0xc060('0x2c')]=function(){return this[_0xc060('0x2d')](!![])[_0xc060('0x2e')](function(_0x1cea30,_0x50cf1d,_0xd4c41a){if(_0x1cea30['user']){_0xd4c41a();}else{return db[_0xc060('0x2f')][_0xc060('0x30')]({'where':{'id':_0x1cea30[_0xc060('0x31')]['id']},'attributes':['id',_0xc060('0x32'),_0xc060('0x33')],'raw':!![]})[_0xc060('0x34')](function(_0x19f892){if(_0x19f892&&_0x19f892[_0xc060('0x32')]){return _0x50cf1d[_0xc060('0x35')](_0x19f892['disposition']===_0xc060('0x36')?0x195:0x193)[_0xc060('0x37')]({'message':_0x19f892[_0xc060('0x33')]===_0xc060('0x36')?_0xc060('0x38'):_0xc060('0x39')});}else{_0xd4c41a();}})['catch'](function(_0x270a9a){_0xd4c41a(_0x270a9a);});}});};exports[_0xc060('0x2d')]=function isAuthenticated(_0x3899b3){return compose()['use'](function(_0x122865,_0x3d534c,_0x267aea){var _0x21cf37;if(_0x122865[_0xc060('0x3a')]['authorization']){if(_[_0xc060('0x3b')](_0x122865['headers'][_0xc060('0x3c')],'Basic')){var _0x3e3b1b=basicAuth(_0x122865);db['User'][_0xc060('0x3d')]({'where':{'name':_0x3e3b1b[_0xc060('0xd')]}})['then'](function(_0x239754){if(!_0x239754||!_0x239754[_0xc060('0x3e')](_0x3e3b1b[_0xc060('0x3f')])){return _0x3d534c['status'](0x191)[_0xc060('0x37')]({'message':_0xc060('0x40')});}_0x122865[_0xc060('0x41')]={'id':_0x239754['id']};_0x267aea();})[_0xc060('0x42')](function(_0x12e0b5){_0x267aea(_0x12e0b5);});}else if(_[_0xc060('0x3b')](_0x122865[_0xc060('0x3a')]['authorization'],_0xc060('0x43'))){validateJwt(_0x122865,_0x3d534c,_0x267aea);}else{if(_0x3899b3){_0x267aea();}else{return _0x3d534c[_0xc060('0x35')](0x193)[_0xc060('0x37')]({'message':_0xc060('0x44')});}}}else if(_0x122865[_0xc060('0x45')]['apikey']){try{var _0x5e1a0c={'audience':hardwareConf['getUuid'](),'issuer':hardwareConf['getUuid']()};verifyJwt(_0x122865[_0xc060('0x45')][_0xc060('0x46')],_0x5e1a0c)[_0xc060('0x34')](function(_0x53dffc){return db[_0xc060('0x47')][_0xc060('0x3d')]({'where':{'id':_0x53dffc['sub']}})[_0xc060('0x34')](function(_0x32eb00){_0x21cf37=_0x32eb00;return db['Setting'][_0xc060('0x30')]({'where':{'id':0x1},'attributes':[_0xc060('0x48'),'blockDuration'],'raw':!![]});})['then'](function(_0x1043e4){if(!_0x21cf37||!_['isEqual'](_0x21cf37[_0xc060('0x49')],_0x53dffc[_0xc060('0x4a')])){return _0x3d534c[_0xc060('0x35')](0x191)['json']({'message':_0xc060('0x4b')});}if(_0x21cf37[_0xc060('0x4c')]){return _0x3d534c[_0xc060('0x35')](0x191)[_0xc060('0x37')]({'message':_0xc060('0x4d')});}if(_0x21cf37['blocked']){if(_0x1043e4['blockDuration']>0x0){if(moment(_0x21cf37[_0xc060('0x4e')])[_0xc060('0x4f')](_0x1043e4[_0xc060('0x50')],_0xc060('0x51'))>moment()){return _0x3d534c[_0xc060('0x35')](0x191)[_0xc060('0x37')]({'message':_0xc060('0x4d')});}}else{return _0x3d534c[_0xc060('0x35')](0x191)[_0xc060('0x37')]({'message':_0xc060('0x4d')});}}_0x122865[_0xc060('0x41')]={'id':_0x21cf37['id']};_0x267aea();});})[_0xc060('0x42')](function(){return _0x3d534c['status'](0x191)[_0xc060('0x37')]({'message':'Invalid\x20API\x20access\x20key'});});}catch(_0x2fe77a){_0x267aea(_0x2fe77a);}}else if(_0x3899b3){_0x267aea();}else{return _0x3d534c[_0xc060('0x35')](0x193)[_0xc060('0x37')]({'message':'Unknown\x20authorization\x20format'});}})[_0xc060('0x2e')](function(_0x1d6805,_0x40980b,_0x2baad8){if(_0x1d6805[_0xc060('0x41')]){db[_0xc060('0x47')][_0xc060('0x3d')]({'where':{'id':_0x1d6805[_0xc060('0x41')]['id']},'attributes':userAttributes})[_0xc060('0x34')](function(_0x18c5d5){if(!_0x18c5d5){return _0x40980b['status'](0x194)[_0xc060('0x37')]({'message':_0xc060('0x52')});}_0x1d6805[_0xc060('0x41')]=_0x18c5d5;_0x2baad8();})[_0xc060('0x42')](function(_0x56b019){_0x2baad8(_0x56b019);});}else if(_0x3899b3){_0x2baad8();}else{return _0x40980b[_0xc060('0x35')](0x194)[_0xc060('0x37')]({'message':_0xc060('0x53')});}});};exports[_0xc060('0x54')]=function canUpdate(){return compose()[_0xc060('0x2e')](function(_0x9b569b,_0xa99039,_0x56cbab){return licenseUtil[_0xc060('0x55')]()[_0xc060('0x34')](function(_0x166856){if(_0x166856[_0xc060('0x56')]){_0x56cbab();}else{return _0xa99039[_0xc060('0x35')](0x193)[_0xc060('0x37')]({'message':_0xc060('0x57')});}})['catch'](function(_0x27b416){_0x56cbab(_0x27b416);});});};exports[_0xc060('0x58')]=function(_0x1940ab,_0x3ee66e,_0x48e1f1){_0x1940ab[_0xc060('0x58')]=!![];return _0x48e1f1();};exports[_0xc060('0x59')]=function signToken(_0x4ab86b){return signJwt(_0x4ab86b);};exports[_0xc060('0x5a')]=function(_0x52cd22,_0x43bf1d){if(!_0x52cd22['user']){return _0x43bf1d[_0xc060('0x35')](0x194)['json']({'message':_0xc060('0x5b')});}var _0x44c695={'payload':{'id':_0x52cd22[_0xc060('0x41')]['id'],'role':_0x52cd22[_0xc060('0x41')][_0xc060('0xb')]},'options':{'expiresIn':0x15180}};return signJwt(_0x44c695)['then'](function(_0x3533a6){_0x43bf1d[_0xc060('0x5c')](_0xc060('0x5d'),_0x3533a6);_0x43bf1d['redirect'](_0xc060('0x5e'));})['catch'](function(_0x57a4a7){return _0x43bf1d[_0xc060('0x35')](0x1f4)['send'](_0x57a4a7);});};exports[_0xc060('0x5f')]=function(_0x7768b7){if(_[_0xc060('0x60')](_0x7768b7[_0xc060('0x49')])||_[_0xc060('0x60')](_0x7768b7[_0xc060('0x61')])){return null;}else{return createJwt(_0x7768b7);}};exports['generateApiKey']=function(_0x75edd9){_0x75edd9[_0xc060('0x49')]=generateNonce();_0x75edd9[_0xc060('0x61')]=generateIssuedAt();return createJwt(_0x75edd9);};exports['regenerateApiKey']=function(_0xf49215,_0x265024){var _0x594c5b=_0xf49215[_0xc060('0x45')][_0xc060('0x46')];if(_0x594c5b){var _0x38b96e={'nonce':_0x265024[_0xc060('0x49')],'iat':_0x265024[_0xc060('0x61')],'audience':hardwareConf[_0xc060('0x62')](),'issuer':hardwareConf[_0xc060('0x62')]()};return verifyJwt(_0x594c5b,_0x38b96e)['then'](function(){return generateApiKey(_0x265024);});}else{throw{'message':'Please\x20use\x20the\x20previous\x20API\x20access\x20key\x20to\x20generate\x20a\x20new\x20one'};}};exports[_0xc060('0x63')]=function(_0x20a7a3){var _0x56be8e=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(!_0x56be8e[_0xc060('0x64')](_0x20a7a3))throw new db[(_0xc060('0x65'))][(_0xc060('0x66'))]('The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.');return;};exports[_0xc060('0x67')]=function(_0xee583d,_0x41a1db,_0x20c87c){var _0xef61a8=encryptor['decryptString'](_0x41a1db)['split'](',');for(var _0x5346c0=0x0;_0x5346c0<_0x20c87c;_0x5346c0++){if(!_0xef61a8[_0x5346c0])break;if(_0xee583d[_0xc060('0x68')]()===_0xef61a8[_0x5346c0][_0xc060('0x68')]()){var _0x38f223=util['format'](_0xc060('0x69'),_0x20c87c);if(_0x20c87c===0x1){_0x38f223='The\x20password\x20must\x20be\x20different\x20from\x20the\x20last\x20one.\x20Please\x20choose\x20another\x20one.';}throw new db[(_0xc060('0x65'))][(_0xc060('0x66'))](_0x38f223);}}return;};exports['updatePasswordsHistory']=function(_0x2a47ea,_0x3b4b0b){var _0x45bde7=_0x3b4b0b?encryptor[_0xc060('0x6a')](_0x3b4b0b)[_0xc060('0x6b')](','):[];if(_0x45bde7[_0xc060('0x6c')]===0x5){_0x45bde7[_0xc060('0x6d')](-0x1,0x1);}_0x45bde7[_0xc060('0x6e')](_0x2a47ea);return encryptor[_0xc060('0x6f')](_0x45bde7[_0xc060('0x70')](','));};function signJwt(_0x1f6bd0){var _0x5ac46b=BPromise['promisify'](jwt['sign'],{'context':jwt});var _0x5544cd=_0x1f6bd0[_0xc060('0x71')]||config['secrets'][_0xc060('0xa')];return new BPromise(function(_0x5d3d92,_0x2a32ea){_0x5ac46b(_0x1f6bd0[_0xc060('0x72')],_0x5544cd,_0x1f6bd0[_0xc060('0x73')])[_0xc060('0x34')](function(_0x31c820){_0x5d3d92(_0x31c820);})['catch'](function(_0x1497e7){_0x2a32ea(_0x1497e7);});});}function verifyJwt(_0x431354,_0x5d1f12,_0x4c6fb6){var _0x19ce48=BPromise[_0xc060('0x74')](jwt[_0xc060('0x75')],{'context':jwt});var _0x2dd491=_0x4c6fb6||config[_0xc060('0x76')]['session'];return new BPromise(function(_0x5893f4,_0x10f61c){_0x19ce48(_0x431354,_0x2dd491,_0x5d1f12)[_0xc060('0x34')](function(_0x109e5a){_0x5893f4(_0x109e5a);})[_0xc060('0x42')](function(_0xdb22ad){_0x10f61c(_0xdb22ad);});});}function generateNonce(){return crypto[_0xc060('0x77')](0x10)[_0xc060('0x78')](_0xc060('0x79'));}function generateIssuedAt(){return Math['floor'](Date[_0xc060('0x7a')]()/0x3e8)['toString']();}function createJwt(_0x301ba9){var _0x335043={'payload':{'iat':_0x301ba9[_0xc060('0x61')],'nonce':_0x301ba9[_0xc060('0x49')]},'options':{'algorithm':_0xc060('0x7b'),'subject':_0x301ba9['id'][_0xc060('0x78')](),'issuer':hardwareConf[_0xc060('0x62')](),'audience':hardwareConf[_0xc060('0x62')]()}};return signJwt(_0x335043)[_0xc060('0x34')](function(_0x3b3266){return{'iat':_0x301ba9[_0xc060('0x61')],'nonce':_0x301ba9[_0xc060('0x49')],'token':_0x3b3266};});} \ No newline at end of file diff --git a/server/components/encryptor/index.js b/server/components/encryptor/index.js index 957b91f..b30e9fc 100644 --- a/server/components/encryptor/index.js +++ b/server/components/encryptor/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xec4e=['algorithm','join','error','is\x20not\x20a\x20supported\x20algorithm.\x20Your\x20system\x20supports\x20the\x20following\x20algorithms:','test','getCiphers','filter','indexOf','hasOwnProperty','encryptFile','createReadStream','createWriteStream','data','update','end','final','binary','write','close','unlink','decryptFile','createDecipher','encryptString','secret','createCipher','utf8','base64','crypto','bluebird','lodash','../../config/environment','app','aes192','encrypt'];(function(_0x330fd0,_0x5859eb){var _0x511346=function(_0x4fc714){while(--_0x4fc714){_0x330fd0['push'](_0x330fd0['shift']());}};_0x511346(++_0x5859eb);}(_0xec4e,0x14d));var _0xeec4=function(_0xfb47c2,_0x390f7f){_0xfb47c2=_0xfb47c2-0x0;var _0x25c89e=_0xec4e[_0xfb47c2];return _0x25c89e;};'use strict';var crypto=require(_0xeec4('0x0'));var fs=require('fs');var BPromise=require(_0xeec4('0x1'));var _=require(_0xeec4('0x2'));var config=require(_0xeec4('0x3'));var logger=require('../../config/logger')(_0xeec4('0x4'));const AES_SUPPORTED_RX=/^aes(-)?\d{3}(-(cbc|cfb|ctr)(1|8)?){0,1}$/;const stringOptions={'secret':config['secrets']['session'],'algorithm':'aes-256-ctr'};const fileOptions={'algorithm':_0xeec4('0x5')};if(config[_0xeec4('0x6')]&&config['encrypt'][_0xeec4('0x7')]){var isSupported=isAlgorithmSupported(config[_0xeec4('0x6')][_0xeec4('0x7')]);if(isSupported){fileOptions[_0xeec4('0x7')]=config[_0xeec4('0x6')][_0xeec4('0x7')];}else{var supportedAlgorithms=getSupportedCiphers()[_0xeec4('0x8')](',\x20');logger[_0xeec4('0x9')](config[_0xeec4('0x6')][_0xeec4('0x7')],_0xeec4('0xa'),supportedAlgorithms);}}function isASupportedCipher(_0x10cf66){return AES_SUPPORTED_RX[_0xeec4('0xb')](_0x10cf66);}function getSupportedCiphers(){return crypto[_0xeec4('0xc')]()[_0xeec4('0xd')](isASupportedCipher);}function isAlgorithmSupported(_0x145f57){return getSupportedCiphers()[_0xeec4('0xe')](_0x145f57)>-0x1;}function combineOptions(_0x35fc94){var _0x29079d={};for(var _0x3e9cdd in fileOptions){if(fileOptions[_0xeec4('0xf')](_0x3e9cdd)){_0x29079d[_0x3e9cdd]=fileOptions[_0x3e9cdd];}}if(_0x35fc94){for(var _0x565ab5 in _0x35fc94){if(_0x35fc94[_0xeec4('0xf')](_0x565ab5)){_0x29079d[_0x565ab5]=_0x35fc94[_0x565ab5];}}}return _0x29079d;}exports[_0xeec4('0x10')]=function(_0x4d75cd,_0x4c85a7,_0x5bf57c,_0x44984d){return new BPromise(function(_0xa32cf4,_0x150a8a){_0x44984d=combineOptions(_0x44984d);var _0x345d32=new Buffer(_0x5bf57c);var _0x2c12d5=fs[_0xeec4('0x11')](_0x4d75cd);var _0x3fdeff=fs[_0xeec4('0x12')](_0x4c85a7);var _0x2a5dc8=crypto['createCipher'](_0x44984d['algorithm'],_0x345d32);_0x2c12d5['on'](_0xeec4('0x13'),function(_0x197487){var _0xedb3bf=new Buffer(_0x2a5dc8[_0xeec4('0x14')](_0x197487),'binary');_0x3fdeff['write'](_0xedb3bf);});_0x2c12d5['on'](_0xeec4('0x15'),function(){try{var _0x180fd8=new Buffer(_0x2a5dc8[_0xeec4('0x16')](_0xeec4('0x17')),_0xeec4('0x17'));_0x3fdeff[_0xeec4('0x18')](_0x180fd8);_0x3fdeff['end']();_0x3fdeff['on'](_0xeec4('0x19'),function(){return _0xa32cf4(_0x4c85a7);});}catch(_0x2f5325){fs[_0xeec4('0x1a')](_0x4c85a7);return _0x150a8a(_0x2f5325);}});});};exports[_0xeec4('0x1b')]=function(_0x1da21d,_0x4d489a,_0x19943a,_0x491530){return new BPromise(function(_0x30773d,_0x1e9c8c){_0x491530=combineOptions(_0x491530);var _0xef2b15=new Buffer(_0x19943a);var _0x4c759f=fs[_0xeec4('0x11')](_0x1da21d);var _0x573966=fs['createWriteStream'](_0x4d489a);var _0x5cb739=crypto[_0xeec4('0x1c')](_0x491530[_0xeec4('0x7')],_0xef2b15);_0x4c759f['on']('data',function(_0x4e2c2f){var _0x5a46b6=new Buffer(_0x5cb739[_0xeec4('0x14')](_0x4e2c2f),_0xeec4('0x17'));_0x573966[_0xeec4('0x18')](_0x5a46b6);});_0x4c759f['on'](_0xeec4('0x15'),function(){try{var _0xba0eee=new Buffer(_0x5cb739[_0xeec4('0x16')](_0xeec4('0x17')),_0xeec4('0x17'));_0x573966[_0xeec4('0x18')](_0xba0eee);_0x573966[_0xeec4('0x15')]();_0x573966['on']('close',function(){return _0x30773d(_0x4d489a);});}catch(_0x353369){fs[_0xeec4('0x1a')](_0x4d489a);return _0x1e9c8c(_0x353369);}});});};exports[_0xeec4('0x1d')]=function(_0x172555,_0x3a1233,_0x5beca3){var _0x314fcd=_0x5beca3||stringOptions[_0xeec4('0x7')];var _0x175bb2=_0x3a1233||stringOptions[_0xeec4('0x1e')];var _0x455e21=crypto[_0xeec4('0x1f')](_0x314fcd,_0x175bb2);var _0x8b51f=_0x455e21[_0xeec4('0x14')](_0x172555,_0xeec4('0x20'),'base64');_0x8b51f+=_0x455e21[_0xeec4('0x16')](_0xeec4('0x21'));return _0x8b51f;};exports['decryptString']=function(_0x2957a1,_0x36bac0,_0x4fa5e1){var _0x2b8af3=_0x4fa5e1||stringOptions[_0xeec4('0x7')];var _0x5bbb2c=_0x36bac0||stringOptions[_0xeec4('0x1e')];var _0x1262b4=crypto['createDecipher'](_0x2b8af3,_0x5bbb2c);var _0x3c590c=_0x1262b4[_0xeec4('0x14')](_0x2957a1,'base64',_0xeec4('0x20'));_0x3c590c+=_0x1262b4[_0xeec4('0x16')]('utf8');return _0x3c590c;}; \ No newline at end of file +var _0x6b92=['indexOf','hasOwnProperty','createReadStream','createCipher','data','update','binary','write','end','final','close','decryptFile','createWriteStream','unlink','secret','utf8','base64','decryptString','createDecipher','crypto','bluebird','lodash','app','secrets','session','aes-256-ctr','encrypt','algorithm','join','error','test','getCiphers'];(function(_0x609988,_0x507944){var _0x159984=function(_0x39d9ce){while(--_0x39d9ce){_0x609988['push'](_0x609988['shift']());}};_0x159984(++_0x507944);}(_0x6b92,0x73));var _0x26b9=function(_0x424ec3,_0x17beb0){_0x424ec3=_0x424ec3-0x0;var _0x4f43c0=_0x6b92[_0x424ec3];return _0x4f43c0;};'use strict';var crypto=require(_0x26b9('0x0'));var fs=require('fs');var BPromise=require(_0x26b9('0x1'));var _=require(_0x26b9('0x2'));var config=require('../../config/environment');var logger=require('../../config/logger')(_0x26b9('0x3'));const AES_SUPPORTED_RX=/^aes(-)?\d{3}(-(cbc|cfb|ctr)(1|8)?){0,1}$/;const stringOptions={'secret':config[_0x26b9('0x4')][_0x26b9('0x5')],'algorithm':_0x26b9('0x6')};const fileOptions={'algorithm':'aes192'};if(config[_0x26b9('0x7')]&&config[_0x26b9('0x7')][_0x26b9('0x8')]){var isSupported=isAlgorithmSupported(config['encrypt'][_0x26b9('0x8')]);if(isSupported){fileOptions[_0x26b9('0x8')]=config[_0x26b9('0x7')][_0x26b9('0x8')];}else{var supportedAlgorithms=getSupportedCiphers()[_0x26b9('0x9')](',\x20');logger[_0x26b9('0xa')](config[_0x26b9('0x7')][_0x26b9('0x8')],'is\x20not\x20a\x20supported\x20algorithm.\x20Your\x20system\x20supports\x20the\x20following\x20algorithms:',supportedAlgorithms);}}function isASupportedCipher(_0x29cd68){return AES_SUPPORTED_RX[_0x26b9('0xb')](_0x29cd68);}function getSupportedCiphers(){return crypto[_0x26b9('0xc')]()['filter'](isASupportedCipher);}function isAlgorithmSupported(_0x21d143){return getSupportedCiphers()[_0x26b9('0xd')](_0x21d143)>-0x1;}function combineOptions(_0x46c482){var _0x356128={};for(var _0x51dd05 in fileOptions){if(fileOptions[_0x26b9('0xe')](_0x51dd05)){_0x356128[_0x51dd05]=fileOptions[_0x51dd05];}}if(_0x46c482){for(var _0x135a07 in _0x46c482){if(_0x46c482[_0x26b9('0xe')](_0x135a07)){_0x356128[_0x135a07]=_0x46c482[_0x135a07];}}}return _0x356128;}exports['encryptFile']=function(_0x254d35,_0xbd13b9,_0xf970bb,_0x595515){return new BPromise(function(_0x5ad56d,_0x1ea905){_0x595515=combineOptions(_0x595515);var _0x402040=new Buffer(_0xf970bb);var _0x5795e3=fs[_0x26b9('0xf')](_0x254d35);var _0x2d26ce=fs['createWriteStream'](_0xbd13b9);var _0x1ef36b=crypto[_0x26b9('0x10')](_0x595515[_0x26b9('0x8')],_0x402040);_0x5795e3['on'](_0x26b9('0x11'),function(_0xc34a10){var _0x26a12c=new Buffer(_0x1ef36b[_0x26b9('0x12')](_0xc34a10),_0x26b9('0x13'));_0x2d26ce[_0x26b9('0x14')](_0x26a12c);});_0x5795e3['on'](_0x26b9('0x15'),function(){try{var _0x3747b8=new Buffer(_0x1ef36b[_0x26b9('0x16')](_0x26b9('0x13')),_0x26b9('0x13'));_0x2d26ce['write'](_0x3747b8);_0x2d26ce[_0x26b9('0x15')]();_0x2d26ce['on'](_0x26b9('0x17'),function(){return _0x5ad56d(_0xbd13b9);});}catch(_0x1c58d5){fs['unlink'](_0xbd13b9);return _0x1ea905(_0x1c58d5);}});});};exports[_0x26b9('0x18')]=function(_0x22851b,_0x4d872e,_0x1e730a,_0x4ec044){return new BPromise(function(_0x64aa4e,_0x2c3b39){_0x4ec044=combineOptions(_0x4ec044);var _0x8c998d=new Buffer(_0x1e730a);var _0x482b58=fs[_0x26b9('0xf')](_0x22851b);var _0x1c6ee3=fs[_0x26b9('0x19')](_0x4d872e);var _0x9bab13=crypto['createDecipher'](_0x4ec044[_0x26b9('0x8')],_0x8c998d);_0x482b58['on'](_0x26b9('0x11'),function(_0x536bd7){var _0x11ef62=new Buffer(_0x9bab13[_0x26b9('0x12')](_0x536bd7),_0x26b9('0x13'));_0x1c6ee3['write'](_0x11ef62);});_0x482b58['on'](_0x26b9('0x15'),function(){try{var _0x494ca7=new Buffer(_0x9bab13[_0x26b9('0x16')](_0x26b9('0x13')),_0x26b9('0x13'));_0x1c6ee3[_0x26b9('0x14')](_0x494ca7);_0x1c6ee3['end']();_0x1c6ee3['on'](_0x26b9('0x17'),function(){return _0x64aa4e(_0x4d872e);});}catch(_0x4efd5e){fs[_0x26b9('0x1a')](_0x4d872e);return _0x2c3b39(_0x4efd5e);}});});};exports['encryptString']=function(_0x55ab83,_0xbeded0,_0x38361b){var _0x45150d=_0x38361b||stringOptions[_0x26b9('0x8')];var _0x2ae120=_0xbeded0||stringOptions[_0x26b9('0x1b')];var _0x458e99=crypto['createCipher'](_0x45150d,_0x2ae120);var _0x3db3f6=_0x458e99['update'](_0x55ab83,_0x26b9('0x1c'),'base64');_0x3db3f6+=_0x458e99[_0x26b9('0x16')](_0x26b9('0x1d'));return _0x3db3f6;};exports[_0x26b9('0x1e')]=function(_0x28362e,_0x3b1761,_0x23a8c0){var _0x44b8a0=_0x23a8c0||stringOptions[_0x26b9('0x8')];var _0x20f90a=_0x3b1761||stringOptions['secret'];var _0x1380a6=crypto[_0x26b9('0x1f')](_0x44b8a0,_0x20f90a);var _0x506b55=_0x1380a6['update'](_0x28362e,'base64','utf8');_0x506b55+=_0x1380a6[_0x26b9('0x16')](_0x26b9('0x1c'));return _0x506b55;}; \ No newline at end of file diff --git a/server/components/export/csv.js b/server/components/export/csv.js index f25d7a9..0a6a51f 100644 --- a/server/components/export/csv.js +++ b/server/components/export/csv.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe38e=['bluebird','zip-dir','rimraf','../../mysqldb','dbH','../../config/logger','argv','savename','AnalyticExtractedReport','update','info','format','Start\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','CSV','split','splitSizeCsv','then','sequelize','query','SELECT\x20count(*)\x20as\x20num\x20FROM\x20(%s)\x20t','QueryTypes','SELECT','num','Empty','length','range','isInteger','forEach','%s\x20limit\x20%d\x20OFFSET\x20%d','push','basename','existsSync','join','mkdirSync','each','%s%d.%s','csv','%s.%s','writeFileSync','zip','catch','Error\x20during\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','finally','exit','util','path','lodash','to-csv'];(function(_0x445be6,_0x3623dd){var _0x56f543=function(_0x226385){while(--_0x226385){_0x445be6['push'](_0x445be6['shift']());}};_0x56f543(++_0x3623dd);}(_0xe38e,0x1dc));var _0xee38=function(_0x43154d,_0x244e56){_0x43154d=_0x43154d-0x0;var _0xf70e21=_0xe38e[_0x43154d];return _0xf70e21;};'use strict';var util=require(_0xee38('0x0'));var path=require(_0xee38('0x1'));var _=require(_0xee38('0x2'));var csv=require(_0xee38('0x3'));var fs=require('fs');var BPromise=require(_0xee38('0x4'));var zipdir=require(_0xee38('0x5'));var rimraf=require(_0xee38('0x6'));var db=require('../../mysqldb')['db'];var dbH=require(_0xee38('0x7'))[_0xee38('0x8')];var logger=require(_0xee38('0x9'))('analytics');var EXTRACTED_REPORT_ID=Number(process[_0xee38('0xa')][0x2]);var QUERY=process[_0xee38('0xa')][0x3];var PATH=process[_0xee38('0xa')][0x4];var EXIT_CODE=0x0;function analyticExtractedReport(_0x1e0145,_0x199b46){var _0x372354={'status':_0x1e0145};var _0xf41e8f={'where':{'id':EXTRACTED_REPORT_ID}};if(_0x199b46){_0x372354[_0xee38('0xb')]=_0x199b46;}return db[_0xee38('0xc')][_0xee38('0xd')](_0x372354,_0xf41e8f);}function main(){var _0x18547b=0x1388;var _0x2c9ee1;logger[_0xee38('0xe')](util[_0xee38('0xf')](_0xee38('0x10'),EXTRACTED_REPORT_ID,_0xee38('0x11')));return db['Setting']['find']({'where':{'id':0x1},'raw':!![],'attributes':['id',_0xee38('0x12'),_0xee38('0x13')]})[_0xee38('0x14')](function(_0x4e9600){if(_0x4e9600){_0x2c9ee1=_0x4e9600;_0x18547b=_0x2c9ee1[_0xee38('0x13')]||0x1388;}})[_0xee38('0x14')](function(){return dbH[_0xee38('0x15')][_0xee38('0x16')](util['format'](_0xee38('0x17'),QUERY),{'type':dbH[_0xee38('0x15')][_0xee38('0x18')][_0xee38('0x19')]});})[_0xee38('0x14')](function(_0x11c7b8){if(!_0x11c7b8[0x0][_0xee38('0x1a')]){return analyticExtractedReport(_0xee38('0x1b'));}var _0x1e7186=[];var _0x56b5bc=0x0;if(_0x2c9ee1['split']){if(_0x11c7b8&&_0x11c7b8[_0xee38('0x1c')]){var _0x21cb87=_[_0xee38('0x1d')](_0x11c7b8[0x0][_0xee38('0x1a')]/_0x18547b);var _0x2ffebc=Number[_0xee38('0x1e')](_0x11c7b8[0x0][_0xee38('0x1a')]/_0x18547b)?_0x11c7b8[0x0][_0xee38('0x1a')]%_0x18547b:0x0;_0x21cb87[_0xee38('0x1f')](function(_0x1bd0e6){if(_0x1bd0e6>0x0){_0x56b5bc+=_0x18547b;}_0x1e7186['push'](dbH[_0xee38('0x15')][_0xee38('0x16')](util[_0xee38('0xf')](_0xee38('0x20'),QUERY,_0x18547b,_0x56b5bc),{'type':dbH[_0xee38('0x15')][_0xee38('0x18')]['SELECT']}));});if(_0x2ffebc>0x0){_0x56b5bc+=_0x18547b;_0x1e7186[_0xee38('0x21')](dbH[_0xee38('0x15')][_0xee38('0x16')](util[_0xee38('0xf')]('%s\x20limit\x20%d\x20OFFSET\x20%d',QUERY,_0x2ffebc,_0x56b5bc),{'type':dbH[_0xee38('0x15')][_0xee38('0x18')][_0xee38('0x19')]}));}}}else{_0x1e7186[_0xee38('0x21')](dbH['sequelize']['query'](QUERY,{'type':dbH['sequelize'][_0xee38('0x18')][_0xee38('0x19')]}));}var _0x437398=path['dirname'](PATH);var _0x31adfa=path[_0xee38('0x22')](PATH,'.csv');var _0x5cc899=_0x2c9ee1['split']&&_0x1e7186[_0xee38('0x1c')]>0x1;var _0x48fd2a=[];if(!fs[_0xee38('0x23')](path[_0xee38('0x24')](_0x437398,_0x31adfa))&&_0x5cc899){fs[_0xee38('0x25')](path[_0xee38('0x24')](_0x437398,_0x31adfa));}return BPromise[_0xee38('0x26')](_0x1e7186,function(_0x58ba63){_0x48fd2a[_0xee38('0x21')](_0x58ba63);})[_0xee38('0x14')](function(){for(var _0x5de4be=0x0;_0x5de4be<_0x48fd2a[_0xee38('0x1c')];_0x5de4be+=0x1){var _0x2783db;var _0x1e85a2=_0x48fd2a[_0x5de4be];if(_0x5cc899){_0x2783db=path['join'](_0x437398,_0x31adfa,util['format'](_0xee38('0x27'),_0x31adfa,_0x5de4be,_0xee38('0x28')));}else{_0x2783db=path[_0xee38('0x24')](_0x437398,util[_0xee38('0xf')](_0xee38('0x29'),_0x31adfa,_0xee38('0x28')));}fs[_0xee38('0x2a')](_0x2783db,csv(_0x1e85a2));}})[_0xee38('0x14')](function(){if(_0x5cc899){return new Promise(function(_0x198009){zipdir(path[_0xee38('0x24')](_0x437398,_0x31adfa),{'saveTo':path[_0xee38('0x24')](_0x437398,util[_0xee38('0xf')](_0xee38('0x29'),_0x31adfa,_0xee38('0x2b')))},function(_0xb6c206,_0x5e9ca2){rimraf(path[_0xee38('0x24')](_0x437398,_0x31adfa),function(){});_0x198009('zip\x20finished');});});}})['then'](function(){logger[_0xee38('0xe')](util[_0xee38('0xf')]('Extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format\x20completed',EXTRACTED_REPORT_ID,_0xee38('0x11')));return analyticExtractedReport('Completed',_0x5cc899?util['format'](_0xee38('0x29'),_0x31adfa,_0x5cc899?_0xee38('0x2b'):_0xee38('0x28')):null);});})[_0xee38('0x2c')](function(_0x2bb5eb){logger[_0xee38('0xe')](util['format'](_0xee38('0x2d'),EXTRACTED_REPORT_ID,'CSV'),util['inspect'](_0x2bb5eb,{'showHidden':![],'depth':null}));EXIT_CODE=0x1;return analyticExtractedReport('Failed');})[_0xee38('0x2e')](function(){process[_0xee38('0x2f')](EXIT_CODE);});}main(); \ No newline at end of file +var _0xa25c=['%s\x20limit\x20%d\x20OFFSET\x20%d','basename','.csv','existsSync','join','mkdirSync','each','%s%d.%s','csv','%s.%s','writeFileSync','zip','Extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format\x20completed','CSV','catch','inspect','Failed','exit','path','lodash','to-csv','bluebird','zip-dir','rimraf','../../mysqldb','../../config/logger','argv','savename','info','format','Start\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','split','splitSizeCsv','then','query','SELECT\x20count(*)\x20as\x20num\x20FROM\x20(%s)\x20t','sequelize','QueryTypes','SELECT','num','Empty','length','push'];(function(_0x133d08,_0x53bba5){var _0x212823=function(_0x561ed1){while(--_0x561ed1){_0x133d08['push'](_0x133d08['shift']());}};_0x212823(++_0x53bba5);}(_0xa25c,0x13f));var _0xca25=function(_0x513430,_0x1a7cdf){_0x513430=_0x513430-0x0;var _0x4b3dea=_0xa25c[_0x513430];return _0x4b3dea;};'use strict';var util=require('util');var path=require(_0xca25('0x0'));var _=require(_0xca25('0x1'));var csv=require(_0xca25('0x2'));var fs=require('fs');var BPromise=require(_0xca25('0x3'));var zipdir=require(_0xca25('0x4'));var rimraf=require(_0xca25('0x5'));var db=require(_0xca25('0x6'))['db'];var dbH=require(_0xca25('0x6'))['dbH'];var logger=require(_0xca25('0x7'))('analytics');var EXTRACTED_REPORT_ID=Number(process['argv'][0x2]);var QUERY=process[_0xca25('0x8')][0x3];var PATH=process['argv'][0x4];var EXIT_CODE=0x0;function analyticExtractedReport(_0xb2fc94,_0x3cee89){var _0x2c0b8c={'status':_0xb2fc94};var _0x42a97a={'where':{'id':EXTRACTED_REPORT_ID}};if(_0x3cee89){_0x2c0b8c[_0xca25('0x9')]=_0x3cee89;}return db['AnalyticExtractedReport']['update'](_0x2c0b8c,_0x42a97a);}function main(){var _0x44d596=0x1388;var _0x520a0a;logger[_0xca25('0xa')](util[_0xca25('0xb')](_0xca25('0xc'),EXTRACTED_REPORT_ID,'CSV'));return db['Setting']['find']({'where':{'id':0x1},'raw':!![],'attributes':['id',_0xca25('0xd'),_0xca25('0xe')]})[_0xca25('0xf')](function(_0x5697aa){if(_0x5697aa){_0x520a0a=_0x5697aa;_0x44d596=_0x520a0a['splitSizeCsv']||0x1388;}})[_0xca25('0xf')](function(){return dbH['sequelize'][_0xca25('0x10')](util[_0xca25('0xb')](_0xca25('0x11'),QUERY),{'type':dbH[_0xca25('0x12')][_0xca25('0x13')][_0xca25('0x14')]});})[_0xca25('0xf')](function(_0x33aa25){if(!_0x33aa25[0x0][_0xca25('0x15')]){return analyticExtractedReport(_0xca25('0x16'));}var _0x2b5cef=[];var _0x587403=0x0;var _0x3616c3=!![];if(_0x33aa25&&_0x33aa25[_0xca25('0x17')]){var _0x59d368=_0x33aa25[0x0][_0xca25('0x15')]%(_0x587403+_0x44d596);if(_0x520a0a[_0xca25('0xd')]){for(;_0x3616c3;_0x587403+=_0x44d596,_0x59d368=_0x33aa25[0x0][_0xca25('0x15')]%(_0x587403+_0x44d596)){if(_0x59d368==0x0||_0x59d368==_0x33aa25[0x0][_0xca25('0x15')]){_0x3616c3=![];}_0x2b5cef[_0xca25('0x18')](dbH['sequelize'][_0xca25('0x10')](util[_0xca25('0xb')](_0xca25('0x19'),QUERY,_0x44d596,_0x587403),{'type':dbH[_0xca25('0x12')][_0xca25('0x13')]['SELECT']}));}}else{_0x2b5cef[_0xca25('0x18')](dbH[_0xca25('0x12')][_0xca25('0x10')](QUERY,{'type':dbH[_0xca25('0x12')][_0xca25('0x13')][_0xca25('0x14')]}));}}var _0x292c88=path['dirname'](PATH);var _0x48fdf5=path[_0xca25('0x1a')](PATH,_0xca25('0x1b'));var _0x26a90e=_0x520a0a[_0xca25('0xd')]&&_0x2b5cef[_0xca25('0x17')]>0x1;var _0x40e5e2=[];if(!fs[_0xca25('0x1c')](path[_0xca25('0x1d')](_0x292c88,_0x48fdf5))&&_0x26a90e){fs[_0xca25('0x1e')](path[_0xca25('0x1d')](_0x292c88,_0x48fdf5));}return BPromise[_0xca25('0x1f')](_0x2b5cef,function(_0x20dc6d){_0x40e5e2['push'](_0x20dc6d);})[_0xca25('0xf')](function(){for(var _0x359369=0x0;_0x359369<_0x40e5e2[_0xca25('0x17')];_0x359369+=0x1){var _0x374cde;var _0x220546=_0x40e5e2[_0x359369];if(_0x26a90e){_0x374cde=path['join'](_0x292c88,_0x48fdf5,util[_0xca25('0xb')](_0xca25('0x20'),_0x48fdf5,_0x359369,_0xca25('0x21')));}else{_0x374cde=path[_0xca25('0x1d')](_0x292c88,util[_0xca25('0xb')](_0xca25('0x22'),_0x48fdf5,_0xca25('0x21')));}fs[_0xca25('0x23')](_0x374cde,csv(_0x220546));}})[_0xca25('0xf')](function(){if(_0x26a90e){zipdir(path[_0xca25('0x1d')](_0x292c88,_0x48fdf5),{'saveTo':path[_0xca25('0x1d')](_0x292c88,util[_0xca25('0xb')](_0xca25('0x22'),_0x48fdf5,_0xca25('0x24')))},function(_0x455df1,_0x2433bb){});rimraf(path[_0xca25('0x1d')](_0x292c88,_0x48fdf5),function(){});}})[_0xca25('0xf')](function(){logger['info'](util[_0xca25('0xb')](_0xca25('0x25'),EXTRACTED_REPORT_ID,_0xca25('0x26')));return analyticExtractedReport('Completed',_0x26a90e?util[_0xca25('0xb')](_0xca25('0x22'),_0x48fdf5,_0x26a90e?_0xca25('0x24'):_0xca25('0x21')):null);});})[_0xca25('0x27')](function(_0x26ca0a){logger['info'](util[_0xca25('0xb')]('Error\x20during\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format',EXTRACTED_REPORT_ID,_0xca25('0x26')),util[_0xca25('0x28')](_0x26ca0a,{'showHidden':![],'depth':null}));EXIT_CODE=0x1;return analyticExtractedReport(_0xca25('0x29'));})['finally'](function(){process[_0xca25('0x2a')](EXIT_CODE);});}main(); \ No newline at end of file diff --git a/server/components/export/pdf.js b/server/components/export/pdf.js index b3b01d0..b0f4b1c 100644 --- a/server/components/export/pdf.js +++ b/server/components/export/pdf.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd2e3=['createPdfFromHTML','createPdfKitDocument','lodash','util','path','moment','pdfmake/src/printer','rimraf','jsdom','JSDOM','window','bluebird','../../mysqldb','analytics','argv','MMMM\x20Do\x20YYYY,\x20h:mm:ss\x20a','savename','AnalyticExtractedReport','tableHeader','map','toString','value','fill','auto','body','push','chunk','keys','forEach','format','Name:\x20%s\x0aReport:\x20%s\x0aFrom:\x20%s\x20To:\x20%s','name','startDate','length','pageBreak','before','margin','landscape','\x20/\x20','footer','Arial','black','right','num','Empty','.pdf','%s.%s','pdf','Setting','find','split','splitSizePdf','then','isInteger','sequelize','%s\x20limit\x20%d\x20OFFSET\x20%d','QueryTypes','SELECT','query','existsSync','mkdirSync','flatten','join','%s%d.%s','info','Extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format\x20completed','Completed','zip','Start\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','findOne','SELECT\x20count(*)\x20as\x20num\x20FROM\x20(%s)\x20t','catch','Error\x20during\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','PDF','finally','/fonts/arial-bold.ttf','/fonts/arial-italic.ttf','/fonts/arial-bold-italic.ttf','%s\x20#%d','channel','interactionId','YYYY-MM-DD','center','Interaction\x20Transcript','header','\x09\x09XCALLY\x20Motion\x20-\x20%s\x09\x09\x09\x09%d/%d\x09\x09\x09\x09%s','finish','error'];(function(_0x53d1cb,_0x44072e){var _0x4e0bee=function(_0x4eeedc){while(--_0x4eeedc){_0x53d1cb['push'](_0x53d1cb['shift']());}};_0x4e0bee(++_0x44072e);}(_0xd2e3,0x10a));var _0x3d2e=function(_0x293218,_0x444d81){_0x293218=_0x293218-0x0;var _0x1bf716=_0xd2e3[_0x293218];return _0x1bf716;};'use strict';var _=require(_0x3d2e('0x0'));var fs=require('fs');var util=require(_0x3d2e('0x1'));var path=require(_0x3d2e('0x2'));var moment=require(_0x3d2e('0x3'));var htmlToPdfmake=require('html-to-pdfmake');var PdfPrinter=require(_0x3d2e('0x4'));var zipdir=require('zip-dir');var rimraf=require(_0x3d2e('0x5'));var JSDOM=require(_0x3d2e('0x6'))[_0x3d2e('0x7')];var window=new JSDOM('')[_0x3d2e('0x8')];var BPromise=require(_0x3d2e('0x9'));var db=require(_0x3d2e('0xa'))['db'];var dbH=require(_0x3d2e('0xa'))['dbH'];var logger=require('../../config/logger')(_0x3d2e('0xb'));var EXTRACTED_REPORT_ID=Number(process['argv'][0x2]);var QUERY=process[_0x3d2e('0xc')][0x3];var PATH=process[_0x3d2e('0xc')][0x4];var NAME=process[_0x3d2e('0xc')][0x5];var FORMAT=_0x3d2e('0xd');var EXTRACTED_REPORT;var EXIT_CODE=0x0;function analyticExtractedReport(_0x2ba263,_0x549b74){var _0x3d5a9a={'status':_0x2ba263};var _0x154f94={'where':{'id':EXTRACTED_REPORT_ID}};if(_0x549b74){_0x3d5a9a[_0x3d2e('0xe')]=_0x549b74;}return db[_0x3d2e('0xf')]['update'](_0x3d5a9a,_0x154f94);}function getHeaders(_0xab3f20){return _['map'](_0xab3f20,function(_0x5546f9){return{'text':_0x5546f9,'style':_0x3d2e('0x10')};});}function getRows(_0x30d22b,_0x361c89){return _[_0x3d2e('0x11')](_0x361c89,function(_0x360761){return _(_0x360761)['pick'](_0x30d22b)[_0x3d2e('0x11')](function(_0x58a3d9){return _0x58a3d9?_[_0x3d2e('0x12')](_0x58a3d9):'';})[_0x3d2e('0x13')]();});}function createTable(_0x5d6619,_0x574100){var _0x399c0b={'widths':_[_0x3d2e('0x14')](Array(_0x5d6619['length']),0x91),'heights':function(_0x50303d){return _0x50303d===0x0?_0x3d2e('0x15'):0x32;},'dontBreakRows':!![],'headerRows':0x1,'body':[]};var _0x413da2=getHeaders(_0x5d6619);_0x399c0b[_0x3d2e('0x16')][_0x3d2e('0x17')](_0x413da2);var _0x111d41=getRows(_0x5d6619,_0x574100);_0x399c0b[_0x3d2e('0x16')]=_0x399c0b[_0x3d2e('0x16')]['concat'](_0x111d41);return _0x399c0b;}function createTables(_0x50f46a){var _0x3baaf4=[];var _0x1c9880=_[_0x3d2e('0x18')](Object[_0x3d2e('0x19')](_0x50f46a[0x0]),0x5);_0x1c9880[_0x3d2e('0x1a')](function(_0x53ace1){_0x3baaf4[_0x3d2e('0x17')](createTable(_0x53ace1,_0x50f46a));});return _0x3baaf4;}function getPDFDocDefinition(_0x1197f8){var _0x1f46fc=util[_0x3d2e('0x1b')](_0x3d2e('0x1c'),NAME,EXTRACTED_REPORT[_0x3d2e('0x1d')],moment(EXTRACTED_REPORT[_0x3d2e('0x1e')])[_0x3d2e('0x1b')](FORMAT),moment(EXTRACTED_REPORT['endDate'])['format'](FORMAT));var _0x289ef6=[];for(var _0x11b381=0x0;_0x11b381<_0x1197f8[_0x3d2e('0x1f')];_0x11b381++){var _0x2bd7b6=[];if(_0x11b381===0x0){_0x2bd7b6[_0x3d2e('0x17')]({'text':_0x1f46fc,'style':'header'});}var _0x3a90f4={'table':_0x1197f8[_0x11b381]};if(_0x11b381>0x0){_0x3a90f4[_0x3d2e('0x20')]=_0x3d2e('0x21');_0x3a90f4[_0x3d2e('0x22')]=[0x0,0x46,0x0,0x0];}_0x2bd7b6[_0x3d2e('0x17')](_0x3a90f4);_0x289ef6['push'](_0x2bd7b6);}return{'pageSize':'A4','pageOrientation':_0x3d2e('0x23'),'content':_0x289ef6,'footer':function(_0xcee3e2,_0x59f324){return{'text':_0xcee3e2[_0x3d2e('0x12')]()+_0x3d2e('0x24')+_0x59f324,'style':_0x3d2e('0x25')};},'defaultStyle':{'font':_0x3d2e('0x26')},'styles':{'header':{'fontSize':0x12,'bold':!![],'margin':[0x0,0x0,0x0,0xa]},'tableHeader':{'bold':!![],'fontSize':0xd,'color':_0x3d2e('0x27')},'footer':{'alignment':_0x3d2e('0x28'),'margin':[0x0,0x0,0x28,0x0]}}};}function extractReport(_0x3a4d85){var _0x1af047=0x1388;var _0x1c30e2;if(!_0x3a4d85[0x0][_0x3d2e('0x29')]){return analyticExtractedReport(_0x3d2e('0x2a'));}var _0x368d18=path['dirname'](PATH);var _0x4399d7=path['basename'](PATH,_0x3d2e('0x2b'));var _0xfb5a78=path['join'](_0x368d18,util['format'](_0x3d2e('0x2c'),_0x4399d7,_0x3d2e('0x2d')));var _0xe13fbe=![];return db[_0x3d2e('0x2e')][_0x3d2e('0x2f')]({'where':{'id':0x1},'raw':!![],'attributes':['id',_0x3d2e('0x30'),_0x3d2e('0x31')]})[_0x3d2e('0x32')](function(_0x24bc0b){if(_0x24bc0b){_0x1c30e2=_0x24bc0b;_0x1af047=_0x1c30e2[_0x3d2e('0x31')]||0x3e8;}})[_0x3d2e('0x32')](function(){var _0x1467cd=[];var _0x392c72=0x0;if(_0x1c30e2[_0x3d2e('0x30')]){if(_0x3a4d85&&_0x3a4d85[_0x3d2e('0x1f')]){var _0x264ea5=_['range'](_0x3a4d85[0x0][_0x3d2e('0x29')]/_0x1af047);var _0x50e6c5=Number[_0x3d2e('0x33')](_0x3a4d85[0x0][_0x3d2e('0x29')]/_0x1af047)?_0x3a4d85[0x0]['num']%_0x1af047:0x0;_0x264ea5[_0x3d2e('0x1a')](function(_0x2049ac){if(_0x2049ac>0x0){_0x392c72+=_0x1af047;}_0x1467cd[_0x3d2e('0x17')](dbH[_0x3d2e('0x34')]['query'](util[_0x3d2e('0x1b')](_0x3d2e('0x35'),QUERY,_0x1af047,_0x392c72),{'type':dbH[_0x3d2e('0x34')][_0x3d2e('0x36')][_0x3d2e('0x37')]}));});if(_0x50e6c5>0x0){_0x392c72+=_0x1af047;_0x1467cd[_0x3d2e('0x17')](dbH[_0x3d2e('0x34')][_0x3d2e('0x38')](util[_0x3d2e('0x1b')]('%s\x20limit\x20%d\x20OFFSET\x20%d',QUERY,_0x50e6c5,_0x392c72),{'type':dbH[_0x3d2e('0x34')][_0x3d2e('0x36')]['SELECT']}));}}}else{_0x1467cd[_0x3d2e('0x17')](dbH[_0x3d2e('0x34')][_0x3d2e('0x38')](QUERY,{'type':dbH['sequelize'][_0x3d2e('0x36')][_0x3d2e('0x37')]}));}_0xe13fbe=_0x1c30e2[_0x3d2e('0x30')]&&_0x1467cd[_0x3d2e('0x1f')]>0x1;var _0x5a09ad=[];if(!fs[_0x3d2e('0x39')](path['join'](_0x368d18,_0x4399d7))&&_0xe13fbe){fs[_0x3d2e('0x3a')](path['join'](_0x368d18,_0x4399d7));}return BPromise['each'](_0x1467cd,function(_0x1716e4){_0x5a09ad[_0x3d2e('0x17')](_0x1716e4);})[_0x3d2e('0x32')](function(_0x4d3627){return createTables(_[_0x3d2e('0x3b')](_0x4d3627));})[_0x3d2e('0x32')](function(_0x395531){for(var _0x528c49=0x0;_0x528c49<_0x5a09ad['length'];_0x528c49+=0x1){var _0x1d40fb=getPDFDocDefinition(_0x395531);var _0x2c756c=getPDFPrinter();var _0x2b0f72=_0x2c756c['createPdfKitDocument'](_0x1d40fb);if(_0xe13fbe)_0xfb5a78=path[_0x3d2e('0x3c')](_0x368d18,_0x4399d7,util[_0x3d2e('0x1b')](_0x3d2e('0x3d'),_0x4399d7,_0x528c49,_0x3d2e('0x2d')));return writePDFDocument(_0x2b0f72,_0xfb5a78);}})['then'](function(){if(_0xe13fbe){return new Promise(function(_0x52051b){zipdir(path[_0x3d2e('0x3c')](_0x368d18,_0x4399d7),{'saveTo':path[_0x3d2e('0x3c')](_0x368d18,util[_0x3d2e('0x1b')](_0x3d2e('0x2c'),_0x4399d7,'zip'))},function(_0x479b7e,_0x4cc591){rimraf(path[_0x3d2e('0x3c')](_0x368d18,_0x4399d7),function(){});_0x52051b('zip\x20finished');});});}})[_0x3d2e('0x32')](function(){if(!_0xe13fbe)return;rimraf(path['join'](_0x368d18,_0x4399d7),function(){});})[_0x3d2e('0x32')](function(){logger[_0x3d2e('0x3e')](util['format'](_0x3d2e('0x3f'),EXTRACTED_REPORT_ID,'CSV'));return analyticExtractedReport(_0x3d2e('0x40'),_0xe13fbe?util[_0x3d2e('0x1b')](_0x3d2e('0x2c'),_0x4399d7,_0xe13fbe?_0x3d2e('0x41'):_0x3d2e('0x2d')):null);});});}function main(){if(!EXTRACTED_REPORT_ID)return;logger[_0x3d2e('0x3e')](util['format'](_0x3d2e('0x42'),EXTRACTED_REPORT_ID,'PDF'));return db[_0x3d2e('0xf')][_0x3d2e('0x43')]({'where':{'id':EXTRACTED_REPORT_ID}})[_0x3d2e('0x32')](function(_0x7020a3){EXTRACTED_REPORT=_0x7020a3;return dbH['sequelize'][_0x3d2e('0x38')](util[_0x3d2e('0x1b')](_0x3d2e('0x44'),QUERY),{'type':dbH['sequelize']['QueryTypes'][_0x3d2e('0x37')]});})[_0x3d2e('0x32')](extractReport)[_0x3d2e('0x45')](function(_0x6fddf5){logger['info'](util[_0x3d2e('0x1b')](_0x3d2e('0x46'),EXTRACTED_REPORT_ID,_0x3d2e('0x47')),util['inspect'](_0x6fddf5,{'showHidden':![],'depth':null}));EXIT_CODE=0x1;return analyticExtractedReport('Failed');})[_0x3d2e('0x48')](function(){process['exit'](EXIT_CODE);});}main();function getPDFPrinter(){var _0x1093ff=new PdfPrinter({'Arial':{'normal':__dirname+'/fonts/arial-regular.ttf','bold':__dirname+_0x3d2e('0x49'),'italics':__dirname+_0x3d2e('0x4a'),'bolditalics':__dirname+_0x3d2e('0x4b')}});return _0x1093ff;}function getPDFDocDefinitionFromHTML(_0x4240b1,_0x55843e){var _0x2e7a89=util[_0x3d2e('0x1b')](_0x3d2e('0x4c'),_0x55843e[_0x3d2e('0x4d')],_0x55843e[_0x3d2e('0x4e')]);var _0x298f91=moment()['format'](_0x3d2e('0x4f'))[_0x3d2e('0x12')]();var _0x1757ce=htmlToPdfmake(_0x4240b1,{'window':window,'tableAutoSize':!![]});return{'content':[_0x1757ce],'defaultStyle':{'font':_0x3d2e('0x26')},'styles':{'header':{'fontSize':0x12,'bold':!![],'alignment':_0x3d2e('0x50'),'margin':[0xa,0xa,0xa,0xa]},'footer':{'fontSize':0x9,'alignment':_0x3d2e('0x50'),'margin':[0xa,0x14,0xa,0xa]},'textblock':{'fontSize':0xb},'textfield':{'bold':!![]},'messageContainer':{'fontSize':0xa},'messageInfo':{'bold':!![]},'interactionData':{'alignment':'center'}},'header':function(){return[{'text':_0x3d2e('0x51'),'style':_0x3d2e('0x52')}];},'footer':function(_0x2930c5,_0x2ceb7a){return[{'text':util[_0x3d2e('0x1b')](_0x3d2e('0x53'),_0x2e7a89,_0x2930c5,_0x2ceb7a,_0x298f91),'style':_0x3d2e('0x25')}];}};}function writePDFDocument(_0x5cfea8,_0x36713a){return new Promise(function(_0x463027,_0x42e00c){var _0x14d06e=_0x5cfea8['pipe'](fs['createWriteStream'](_0x36713a));_0x14d06e['on'](_0x3d2e('0x54'),function(){_0x463027(_0x3d2e('0x54'));});_0x14d06e['on'](_0x3d2e('0x55'),function(_0x3839a3){_0x42e00c(_0x3839a3);});_0x5cfea8['end']();});}exports[_0x3d2e('0x56')]=function(_0x363b7a,_0x351bc9){var _0x210ba5=getPDFPrinter();var _0x352f1d=getPDFDocDefinitionFromHTML(_0x363b7a,_0x351bc9);var _0x2447ec=_0x210ba5[_0x3d2e('0x57')](_0x352f1d);return writePDFDocument(_0x2447ec,_0x351bc9[_0x3d2e('0x2')])[_0x3d2e('0x45')](function(_0x2c748b){throw _0x2c748b;});}; \ No newline at end of file +var _0xfaa3=['QueryTypes','SELECT','existsSync','mkdirSync','all','flatten','%s%d.%s','zip','info','Extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format\x20completed','CSV','PDF','findOne','catch','Failed','finally','exit','/fonts/arial-regular.ttf','/fonts/arial-bold.ttf','/fonts/arial-bold-italic.ttf','%s\x20#%d','channel','YYYY-MM-DD','center','Interaction\x20Transcript','\x09\x09XCALLY\x20Motion\x20-\x20%s\x09\x09\x09\x09%d/%d\x09\x09\x09\x09%s','createWriteStream','finish','error','createPdfFromHTML','createPdfKitDocument','lodash','util','path','moment','html-to-pdfmake','zip-dir','rimraf','jsdom','window','dbH','../../config/logger','argv','MMMM\x20Do\x20YYYY,\x20h:mm:ss\x20a','savename','AnalyticExtractedReport','update','map','pick','toString','value','length','auto','body','concat','chunk','forEach','push','format','name','startDate','endDate','header','pageBreak','before','margin','\x20/\x20','footer','Arial','right','num','Empty','dirname','basename','.pdf','join','%s.%s','pdf','Setting','find','split','splitSizePdf','then','sequelize','query','%s\x20limit\x20%d\x20OFFSET\x20%d'];(function(_0x1ca204,_0x3d46a2){var _0x42df4a=function(_0x54e13d){while(--_0x54e13d){_0x1ca204['push'](_0x1ca204['shift']());}};_0x42df4a(++_0x3d46a2);}(_0xfaa3,0xcb));var _0x3faa=function(_0x5b082a,_0x5bfdce){_0x5b082a=_0x5b082a-0x0;var _0x5141dc=_0xfaa3[_0x5b082a];return _0x5141dc;};'use strict';var _=require(_0x3faa('0x0'));var fs=require('fs');var util=require(_0x3faa('0x1'));var path=require(_0x3faa('0x2'));var moment=require(_0x3faa('0x3'));var htmlToPdfmake=require(_0x3faa('0x4'));var PdfPrinter=require('pdfmake/src/printer');var zipdir=require(_0x3faa('0x5'));var rimraf=require(_0x3faa('0x6'));var JSDOM=require(_0x3faa('0x7'))['JSDOM'];var window=new JSDOM('')[_0x3faa('0x8')];var db=require('../../mysqldb')['db'];var dbH=require('../../mysqldb')[_0x3faa('0x9')];var logger=require(_0x3faa('0xa'))('analytics');var EXTRACTED_REPORT_ID=Number(process['argv'][0x2]);var QUERY=process[_0x3faa('0xb')][0x3];var PATH=process[_0x3faa('0xb')][0x4];var NAME=process[_0x3faa('0xb')][0x5];var FORMAT=_0x3faa('0xc');var EXTRACTED_REPORT;var EXIT_CODE=0x0;function analyticExtractedReport(_0x21752e,_0x218d94){var _0x9a002a={'status':_0x21752e};var _0x461fa5={'where':{'id':EXTRACTED_REPORT_ID}};if(_0x218d94){_0x9a002a[_0x3faa('0xd')]=_0x218d94;}return db[_0x3faa('0xe')][_0x3faa('0xf')](_0x9a002a,_0x461fa5);}function getHeaders(_0x38d01a){return _[_0x3faa('0x10')](_0x38d01a,function(_0x4df90b){return{'text':_0x4df90b,'style':'tableHeader'};});}function getRows(_0x3a1f04,_0x22dbbb){return _['map'](_0x22dbbb,function(_0x4296a9){return _(_0x4296a9)[_0x3faa('0x11')](_0x3a1f04)[_0x3faa('0x10')](function(_0x522fff){return _0x522fff?_[_0x3faa('0x12')](_0x522fff):'';})[_0x3faa('0x13')]();});}function createTable(_0x15c96c,_0x1f5ec3){var _0x1f3784={'widths':_['fill'](Array(_0x15c96c[_0x3faa('0x14')]),0x91),'heights':function(_0x4cfb76){return _0x4cfb76===0x0?_0x3faa('0x15'):0x32;},'dontBreakRows':!![],'headerRows':0x1,'body':[]};var _0x683fa9=getHeaders(_0x15c96c);_0x1f3784[_0x3faa('0x16')]['push'](_0x683fa9);var _0x12e0e2=getRows(_0x15c96c,_0x1f5ec3);_0x1f3784[_0x3faa('0x16')]=_0x1f3784[_0x3faa('0x16')][_0x3faa('0x17')](_0x12e0e2);return _0x1f3784;}function createTables(_0x982b01){var _0x319381=[];var _0x1c39ff=_[_0x3faa('0x18')](Object['keys'](_0x982b01[0x0]),0x5);_0x1c39ff[_0x3faa('0x19')](function(_0x56efe5){_0x319381[_0x3faa('0x1a')](createTable(_0x56efe5,_0x982b01));});return _0x319381;}function getPDFDocDefinition(_0x41081b){var _0x501074=util[_0x3faa('0x1b')]('Name:\x20%s\x0aReport:\x20%s\x0aFrom:\x20%s\x20To:\x20%s',NAME,EXTRACTED_REPORT[_0x3faa('0x1c')],moment(EXTRACTED_REPORT[_0x3faa('0x1d')])[_0x3faa('0x1b')](FORMAT),moment(EXTRACTED_REPORT[_0x3faa('0x1e')])[_0x3faa('0x1b')](FORMAT));var _0x31fff4=[];for(var _0x4d06e0=0x0;_0x4d06e0<_0x41081b['length'];_0x4d06e0++){var _0x353fc5=[];if(_0x4d06e0===0x0){_0x353fc5[_0x3faa('0x1a')]({'text':_0x501074,'style':_0x3faa('0x1f')});}var _0x100ca4={'table':_0x41081b[_0x4d06e0]};if(_0x4d06e0>0x0){_0x100ca4[_0x3faa('0x20')]=_0x3faa('0x21');_0x100ca4[_0x3faa('0x22')]=[0x0,0x46,0x0,0x0];}_0x353fc5[_0x3faa('0x1a')](_0x100ca4);_0x31fff4[_0x3faa('0x1a')](_0x353fc5);}return{'pageSize':'A4','pageOrientation':'landscape','content':_0x31fff4,'footer':function(_0x2d9e3a,_0xe2e77b){return{'text':_0x2d9e3a[_0x3faa('0x12')]()+_0x3faa('0x23')+_0xe2e77b,'style':_0x3faa('0x24')};},'defaultStyle':{'font':_0x3faa('0x25')},'styles':{'header':{'fontSize':0x12,'bold':!![],'margin':[0x0,0x0,0x0,0xa]},'tableHeader':{'bold':!![],'fontSize':0xd,'color':'black'},'footer':{'alignment':_0x3faa('0x26'),'margin':[0x0,0x0,0x28,0x0]}}};}function extractReport(_0x3a09ad){var _0x15dc8d=0x1388;var _0x536cd8;if(!_0x3a09ad[0x0][_0x3faa('0x27')]){return analyticExtractedReport(_0x3faa('0x28'));}var _0x46f227=[];var _0x1a2839=0x0;var _0xffd63f=!![];var _0x451892=path[_0x3faa('0x29')](PATH);var _0x853138=path[_0x3faa('0x2a')](PATH,_0x3faa('0x2b'));var _0x4fa38f=path[_0x3faa('0x2c')](_0x451892,util['format'](_0x3faa('0x2d'),_0x853138,_0x3faa('0x2e')));var _0x464663=![];return db[_0x3faa('0x2f')][_0x3faa('0x30')]({'where':{'id':0x1},'raw':!![],'attributes':['id',_0x3faa('0x31'),_0x3faa('0x32')]})[_0x3faa('0x33')](function(_0x1d4d27){if(_0x1d4d27){_0x536cd8=_0x1d4d27;_0x15dc8d=_0x536cd8[_0x3faa('0x32')]||0x3e8;}})['then'](function(){if(_0x3a09ad&&_0x3a09ad[_0x3faa('0x14')]){var _0x190287=_0x3a09ad[0x0][_0x3faa('0x27')]%(_0x1a2839+_0x15dc8d);if(_0x536cd8['split']){for(;_0xffd63f;_0x1a2839+=_0x15dc8d,_0x190287=_0x3a09ad[0x0][_0x3faa('0x27')]%(_0x1a2839+_0x15dc8d)){if(_0x190287==0x0||_0x190287==_0x3a09ad[0x0]['num']){_0xffd63f=![];}_0x46f227[_0x3faa('0x1a')](dbH[_0x3faa('0x34')][_0x3faa('0x35')](util[_0x3faa('0x1b')](_0x3faa('0x36'),QUERY,_0x15dc8d,_0x1a2839),{'type':dbH[_0x3faa('0x34')][_0x3faa('0x37')][_0x3faa('0x38')]}));}}else{_0x46f227[_0x3faa('0x1a')](dbH[_0x3faa('0x34')]['query'](QUERY,{'type':dbH['sequelize'][_0x3faa('0x37')][_0x3faa('0x38')]}));}}_0x464663=_0x536cd8['split']&&_0x46f227[_0x3faa('0x14')]>0x1;if(!fs[_0x3faa('0x39')](path[_0x3faa('0x2c')](_0x451892,_0x853138))&&_0x464663){fs[_0x3faa('0x3a')](path['join'](_0x451892,_0x853138));}return Promise[_0x3faa('0x3b')](_0x46f227);})[_0x3faa('0x33')](function(_0x401980){return createTables(_[_0x3faa('0x3c')](_0x401980));})[_0x3faa('0x33')](function(_0x68bc79){var _0x7d2544=getPDFDocDefinition(_0x68bc79);var _0x45ec5e=getPDFPrinter();var _0x44c116=_0x45ec5e['createPdfKitDocument'](_0x7d2544);if(_0x464663)_0x4fa38f=path[_0x3faa('0x2c')](_0x451892,_0x853138,util['format'](_0x3faa('0x3d'),_0x853138,index,'pdf'));return writePDFDocument(_0x44c116,_0x4fa38f);})[_0x3faa('0x33')](function(){if(!_0x464663)return;zipdir(path[_0x3faa('0x2c')](_0x451892,_0x853138),{'saveTo':path[_0x3faa('0x2c')](_0x451892,util[_0x3faa('0x1b')](_0x3faa('0x2d'),_0x853138,_0x3faa('0x3e')))},function(_0x36d308){if(_0x36d308)throw _0x36d308;return;});})[_0x3faa('0x33')](function(){if(!_0x464663)return;rimraf(path['join'](_0x451892,_0x853138),function(){});})[_0x3faa('0x33')](function(){logger[_0x3faa('0x3f')](util[_0x3faa('0x1b')](_0x3faa('0x40'),EXTRACTED_REPORT_ID,_0x3faa('0x41')));return analyticExtractedReport('Completed',_0x464663?util[_0x3faa('0x1b')]('%s.%s',_0x853138,_0x464663?_0x3faa('0x3e'):_0x3faa('0x2e')):null);});}function main(){if(!EXTRACTED_REPORT_ID)return;logger[_0x3faa('0x3f')](util['format']('Start\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format',EXTRACTED_REPORT_ID,_0x3faa('0x42')));return db[_0x3faa('0xe')][_0x3faa('0x43')]({'where':{'id':EXTRACTED_REPORT_ID}})[_0x3faa('0x33')](function(_0x5b50ba){EXTRACTED_REPORT=_0x5b50ba;return dbH[_0x3faa('0x34')][_0x3faa('0x35')](util['format']('SELECT\x20count(*)\x20as\x20num\x20FROM\x20(%s)\x20t',QUERY),{'type':dbH[_0x3faa('0x34')]['QueryTypes'][_0x3faa('0x38')]});})[_0x3faa('0x33')](extractReport)[_0x3faa('0x44')](function(_0x52bd5f){logger[_0x3faa('0x3f')](util['format']('Error\x20during\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format',EXTRACTED_REPORT_ID,_0x3faa('0x42')),util['inspect'](_0x52bd5f,{'showHidden':![],'depth':null}));EXIT_CODE=0x1;return analyticExtractedReport(_0x3faa('0x45'));})[_0x3faa('0x46')](function(){process[_0x3faa('0x47')](EXIT_CODE);});}main();function getPDFPrinter(){var _0x169aa0=new PdfPrinter({'Arial':{'normal':__dirname+_0x3faa('0x48'),'bold':__dirname+_0x3faa('0x49'),'italics':__dirname+'/fonts/arial-italic.ttf','bolditalics':__dirname+_0x3faa('0x4a')}});return _0x169aa0;}function getPDFDocDefinitionFromHTML(_0x2e3a4a,_0x52b2c7){var _0x2f2240=util['format'](_0x3faa('0x4b'),_0x52b2c7[_0x3faa('0x4c')],_0x52b2c7['interactionId']);var _0x14f6ec=moment()[_0x3faa('0x1b')](_0x3faa('0x4d'))[_0x3faa('0x12')]();var _0x5e5039=htmlToPdfmake(_0x2e3a4a,{'window':window,'tableAutoSize':!![]});return{'content':[_0x5e5039],'defaultStyle':{'font':_0x3faa('0x25')},'styles':{'header':{'fontSize':0x12,'bold':!![],'alignment':'center','margin':[0xa,0xa,0xa,0xa]},'footer':{'fontSize':0x9,'alignment':'center','margin':[0xa,0x14,0xa,0xa]},'textblock':{'fontSize':0xb},'textfield':{'bold':!![]},'messageContainer':{'fontSize':0xa},'messageInfo':{'bold':!![]},'interactionData':{'alignment':_0x3faa('0x4e')}},'header':function(){return[{'text':_0x3faa('0x4f'),'style':_0x3faa('0x1f')}];},'footer':function(_0x4379ad,_0x1166b4){return[{'text':util[_0x3faa('0x1b')](_0x3faa('0x50'),_0x2f2240,_0x4379ad,_0x1166b4,_0x14f6ec),'style':_0x3faa('0x24')}];}};}function writePDFDocument(_0x2e82db,_0xba60c7){return new Promise(function(_0x443ec9,_0x436772){var _0x2106b4=_0x2e82db['pipe'](fs[_0x3faa('0x51')](_0xba60c7));_0x2106b4['on'](_0x3faa('0x52'),function(){_0x443ec9('finish');});_0x2106b4['on'](_0x3faa('0x53'),function(_0x50ccd0){_0x436772(_0x50ccd0);});_0x2e82db['end']();});}exports[_0x3faa('0x54')]=function(_0x3d9e5b,_0x4ea32b){var _0x5d507c=getPDFPrinter();var _0x559335=getPDFDocDefinitionFromHTML(_0x3d9e5b,_0x4ea32b);var _0x44b092=_0x5d507c[_0x3faa('0x55')](_0x559335);return writePDFDocument(_0x44b092,_0x4ea32b[_0x3faa('0x2')])['catch'](function(_0x3b1ef4){throw _0x3b1ef4;});}; \ No newline at end of file diff --git a/server/components/export/xlsx.js b/server/components/export/xlsx.js index 33839ab..252e9a2 100644 --- a/server/components/export/xlsx.js +++ b/server/components/export/xlsx.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5952=['QueryTypes','SELECT','num','Empty','split','length','range','isInteger','push','%s\x20limit\x20%d\x20OFFSET\x20%d','join','mkdirSync','each','%s%d.%s','xlsx','%s.%s','binary','zip','zip\x20finished','Extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format\x20completed','Completed','Error\x20during\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','Failed','finally','util','path','json2xls','bluebird','zip-dir','rimraf','../../mysqldb','dbH','../../config/logger','analytics','argv','savename','AnalyticExtractedReport','update','info','format','Start\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','XLSX','Setting','find','splitSizeXlsx','then','sequelize','query','SELECT\x20count(*)\x20as\x20num\x20FROM\x20(%s)\x20t'];(function(_0x397e5f,_0x454c8f){var _0x5302b8=function(_0x1a29ef){while(--_0x1a29ef){_0x397e5f['push'](_0x397e5f['shift']());}};_0x5302b8(++_0x454c8f);}(_0x5952,0x10d));var _0x2595=function(_0x4547e8,_0xde982f){_0x4547e8=_0x4547e8-0x0;var _0x2496af=_0x5952[_0x4547e8];return _0x2496af;};'use strict';var util=require(_0x2595('0x0'));var path=require(_0x2595('0x1'));var _=require('lodash');var fs=require('fs');var json2xls=require(_0x2595('0x2'));var BPromise=require(_0x2595('0x3'));var zipdir=require(_0x2595('0x4'));var rimraf=require(_0x2595('0x5'));var db=require('../../mysqldb')['db'];var dbH=require(_0x2595('0x6'))[_0x2595('0x7')];var logger=require(_0x2595('0x8'))(_0x2595('0x9'));var EXTRACTED_REPORT_ID=Number(process[_0x2595('0xa')][0x2]);var QUERY=process[_0x2595('0xa')][0x3];var PATH=process[_0x2595('0xa')][0x4];var EXIT_CODE=0x0;function analyticExtractedReport(_0x274ce9,_0x2e23f0){var _0x766e1b={'status':_0x274ce9};var _0x209e29={'where':{'id':EXTRACTED_REPORT_ID}};if(_0x2e23f0){_0x766e1b[_0x2595('0xb')]=_0x2e23f0;}return db[_0x2595('0xc')][_0x2595('0xd')](_0x766e1b,_0x209e29);}function main(){var _0xf6d755=0x1388;var _0x56f832;logger[_0x2595('0xe')](util[_0x2595('0xf')](_0x2595('0x10'),EXTRACTED_REPORT_ID,_0x2595('0x11')));return db[_0x2595('0x12')][_0x2595('0x13')]({'where':{'id':0x1},'raw':!![],'attributes':['id','split',_0x2595('0x14')]})[_0x2595('0x15')](function(_0x2b3a21){if(_0x2b3a21){_0x56f832=_0x2b3a21;_0xf6d755=_0x56f832[_0x2595('0x14')]||0x1388;}})[_0x2595('0x15')](function(){return dbH[_0x2595('0x16')][_0x2595('0x17')](util[_0x2595('0xf')](_0x2595('0x18'),QUERY),{'type':dbH[_0x2595('0x16')][_0x2595('0x19')][_0x2595('0x1a')]});})[_0x2595('0x15')](function(_0x4c04db){if(!_0x4c04db[0x0][_0x2595('0x1b')]){return analyticExtractedReport(_0x2595('0x1c'));}var _0x114a23=[];var _0x4226e5=0x0;if(_0x56f832[_0x2595('0x1d')]){if(_0x4c04db&&_0x4c04db[_0x2595('0x1e')]){var _0x249e15=_[_0x2595('0x1f')](_0x4c04db[0x0][_0x2595('0x1b')]/_0xf6d755);var _0x3ea9ed=Number[_0x2595('0x20')](_0x4c04db[0x0][_0x2595('0x1b')]/_0xf6d755)?_0x4c04db[0x0]['num']%_0xf6d755:0x0;_0x249e15['forEach'](function(_0x151b07){if(_0x151b07>0x0){_0x4226e5+=_0xf6d755;}_0x114a23[_0x2595('0x21')](dbH[_0x2595('0x16')][_0x2595('0x17')](util['format']('%s\x20limit\x20%d\x20OFFSET\x20%d',QUERY,_0xf6d755,_0x4226e5),{'type':dbH[_0x2595('0x16')][_0x2595('0x19')][_0x2595('0x1a')]}));});if(_0x3ea9ed>0x0){_0x4226e5+=_0xf6d755;_0x114a23['push'](dbH[_0x2595('0x16')][_0x2595('0x17')](util[_0x2595('0xf')](_0x2595('0x22'),QUERY,_0x3ea9ed,_0x4226e5),{'type':dbH[_0x2595('0x16')]['QueryTypes']['SELECT']}));}}}else{_0x114a23[_0x2595('0x21')](dbH[_0x2595('0x16')][_0x2595('0x17')](QUERY,{'type':dbH[_0x2595('0x16')][_0x2595('0x19')][_0x2595('0x1a')]}));}var _0x521c0a=path['dirname'](PATH);var _0x1593b0=path['basename'](PATH,'.xlsx');var _0x4720d8=_0x56f832[_0x2595('0x1d')]&&_0x114a23[_0x2595('0x1e')]>0x1;var _0x46521e=[];if(!fs['existsSync'](path[_0x2595('0x23')](_0x521c0a,_0x1593b0))&&_0x4720d8){fs[_0x2595('0x24')](path[_0x2595('0x23')](_0x521c0a,_0x1593b0));}return BPromise[_0x2595('0x25')](_0x114a23,function(_0x59d5fc){_0x46521e[_0x2595('0x21')](_0x59d5fc);})[_0x2595('0x15')](function(){for(var _0x5edef9=0x0;_0x5edef9<_0x46521e[_0x2595('0x1e')];_0x5edef9+=0x1){var _0x145ff8;var _0x450d31=_0x46521e[_0x5edef9];if(_0x4720d8){_0x145ff8=path[_0x2595('0x23')](_0x521c0a,_0x1593b0,util['format'](_0x2595('0x26'),_0x1593b0,_0x5edef9,_0x2595('0x27')));}else{_0x145ff8=path[_0x2595('0x23')](_0x521c0a,util[_0x2595('0xf')](_0x2595('0x28'),_0x1593b0,_0x2595('0x27')));}fs['writeFileSync'](_0x145ff8,json2xls(_0x450d31),_0x2595('0x29'));}})['then'](function(){if(_0x4720d8){return new Promise(function(_0x20147e){zipdir(path[_0x2595('0x23')](_0x521c0a,_0x1593b0),{'saveTo':path['join'](_0x521c0a,util[_0x2595('0xf')](_0x2595('0x28'),_0x1593b0,_0x2595('0x2a')))},function(_0x533170,_0xd74caf){rimraf(path[_0x2595('0x23')](_0x521c0a,_0x1593b0),function(){});_0x20147e(_0x2595('0x2b'));});});}})['then'](function(){logger[_0x2595('0xe')](util[_0x2595('0xf')](_0x2595('0x2c'),EXTRACTED_REPORT_ID,_0x2595('0x11')));return analyticExtractedReport(_0x2595('0x2d'),_0x4720d8?util[_0x2595('0xf')](_0x2595('0x28'),_0x1593b0,_0x4720d8?_0x2595('0x2a'):_0x2595('0x27')):null);});})['catch'](function(_0xc115d2){logger[_0x2595('0xe')](util['format'](_0x2595('0x2e'),EXTRACTED_REPORT_ID,_0x2595('0x11')),util['inspect'](_0xc115d2,{'showHidden':![],'depth':null}));EXIT_CODE=0x1;return analyticExtractedReport(_0x2595('0x2f'));})[_0x2595('0x30')](function(){process['exit'](EXIT_CODE);});}main(); \ No newline at end of file +var _0xcc72=['path','lodash','json2xls','bluebird','zip-dir','rimraf','../../mysqldb','dbH','../../config/logger','analytics','argv','savename','AnalyticExtractedReport','update','info','Start\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','XLSX','Setting','split','splitSizeXlsx','then','sequelize','query','format','SELECT\x20count(*)\x20as\x20num\x20FROM\x20(%s)\x20t','num','Empty','length','push','%s\x20limit\x20%d\x20OFFSET\x20%d','QueryTypes','SELECT','dirname','basename','.xlsx','existsSync','join','mkdirSync','%s%d.%s','xlsx','%s.%s','writeFileSync','zip','Extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format\x20completed','Completed','catch','Error\x20during\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','inspect','Failed','finally','exit'];(function(_0x1d8468,_0x524250){var _0x3c7e0a=function(_0x3120ac){while(--_0x3120ac){_0x1d8468['push'](_0x1d8468['shift']());}};_0x3c7e0a(++_0x524250);}(_0xcc72,0xcc));var _0x2cc7=function(_0x13442f,_0x195395){_0x13442f=_0x13442f-0x0;var _0xff4977=_0xcc72[_0x13442f];return _0xff4977;};'use strict';var util=require('util');var path=require(_0x2cc7('0x0'));var _=require(_0x2cc7('0x1'));var fs=require('fs');var json2xls=require(_0x2cc7('0x2'));var BPromise=require(_0x2cc7('0x3'));var zipdir=require(_0x2cc7('0x4'));var rimraf=require(_0x2cc7('0x5'));var db=require(_0x2cc7('0x6'))['db'];var dbH=require(_0x2cc7('0x6'))[_0x2cc7('0x7')];var logger=require(_0x2cc7('0x8'))(_0x2cc7('0x9'));var EXTRACTED_REPORT_ID=Number(process['argv'][0x2]);var QUERY=process['argv'][0x3];var PATH=process[_0x2cc7('0xa')][0x4];var EXIT_CODE=0x0;function analyticExtractedReport(_0x518985,_0x290f34){var _0x2e5867={'status':_0x518985};var _0x3bef3a={'where':{'id':EXTRACTED_REPORT_ID}};if(_0x290f34){_0x2e5867[_0x2cc7('0xb')]=_0x290f34;}return db[_0x2cc7('0xc')][_0x2cc7('0xd')](_0x2e5867,_0x3bef3a);}function main(){var _0x4e466f=0x1388;var _0x12c8dc;logger[_0x2cc7('0xe')](util['format'](_0x2cc7('0xf'),EXTRACTED_REPORT_ID,_0x2cc7('0x10')));return db[_0x2cc7('0x11')]['find']({'where':{'id':0x1},'raw':!![],'attributes':['id',_0x2cc7('0x12'),_0x2cc7('0x13')]})[_0x2cc7('0x14')](function(_0x291fdc){if(_0x291fdc){_0x12c8dc=_0x291fdc;_0x4e466f=_0x12c8dc[_0x2cc7('0x13')]||0x1388;}})[_0x2cc7('0x14')](function(){return dbH[_0x2cc7('0x15')][_0x2cc7('0x16')](util[_0x2cc7('0x17')](_0x2cc7('0x18'),QUERY),{'type':dbH[_0x2cc7('0x15')]['QueryTypes']['SELECT']});})['then'](function(_0x59a1f7){if(!_0x59a1f7[0x0][_0x2cc7('0x19')]){return analyticExtractedReport(_0x2cc7('0x1a'));}var _0x114428=[];var _0x453b2d=0x0;var _0x26cee7=!![];if(_0x12c8dc[_0x2cc7('0x12')]){if(_0x59a1f7&&_0x59a1f7[_0x2cc7('0x1b')]){var _0x445327=_0x59a1f7[0x0][_0x2cc7('0x19')]%(_0x453b2d+_0x4e466f);for(;_0x26cee7;_0x453b2d+=_0x4e466f,_0x445327=_0x59a1f7[0x0][_0x2cc7('0x19')]%(_0x453b2d+_0x4e466f)){if(_0x445327==0x0||_0x445327==_0x59a1f7[0x0][_0x2cc7('0x19')]){_0x26cee7=![];}_0x114428[_0x2cc7('0x1c')](dbH[_0x2cc7('0x15')][_0x2cc7('0x16')](util[_0x2cc7('0x17')](_0x2cc7('0x1d'),QUERY,_0x4e466f,_0x453b2d),{'type':dbH[_0x2cc7('0x15')][_0x2cc7('0x1e')][_0x2cc7('0x1f')]}));}}}else{_0x114428[_0x2cc7('0x1c')](dbH[_0x2cc7('0x15')][_0x2cc7('0x16')](QUERY,{'type':dbH[_0x2cc7('0x15')]['QueryTypes'][_0x2cc7('0x1f')]}));}var _0x30cf87=path[_0x2cc7('0x20')](PATH);var _0x42483c=path[_0x2cc7('0x21')](PATH,_0x2cc7('0x22'));var _0x4953fb=_0x12c8dc['split']&&_0x114428[_0x2cc7('0x1b')]>0x1;var _0x327309=[];if(!fs[_0x2cc7('0x23')](path[_0x2cc7('0x24')](_0x30cf87,_0x42483c))&&_0x4953fb){fs[_0x2cc7('0x25')](path[_0x2cc7('0x24')](_0x30cf87,_0x42483c));}return BPromise['each'](_0x114428,function(_0x4bb438){_0x327309['push'](_0x4bb438);})[_0x2cc7('0x14')](function(){for(var _0x4ee215=0x0;_0x4ee215<_0x327309['length'];_0x4ee215+=0x1){var _0x55d973;var _0x1049fe=_0x327309[_0x4ee215];if(_0x4953fb){_0x55d973=path['join'](_0x30cf87,_0x42483c,util[_0x2cc7('0x17')](_0x2cc7('0x26'),_0x42483c,_0x4ee215,_0x2cc7('0x27')));}else{_0x55d973=path[_0x2cc7('0x24')](_0x30cf87,util[_0x2cc7('0x17')](_0x2cc7('0x28'),_0x42483c,_0x2cc7('0x27')));}fs[_0x2cc7('0x29')](_0x55d973,json2xls(_0x1049fe),'binary');}})[_0x2cc7('0x14')](function(){if(_0x4953fb){zipdir(path['join'](_0x30cf87,_0x42483c),{'saveTo':path[_0x2cc7('0x24')](_0x30cf87,util['format'](_0x2cc7('0x28'),_0x42483c,_0x2cc7('0x2a')))},function(_0x53ddeb,_0x110c29){});rimraf(path['join'](_0x30cf87,_0x42483c),function(){});}})[_0x2cc7('0x14')](function(){logger[_0x2cc7('0xe')](util[_0x2cc7('0x17')](_0x2cc7('0x2b'),EXTRACTED_REPORT_ID,_0x2cc7('0x10')));return analyticExtractedReport(_0x2cc7('0x2c'),_0x4953fb?util[_0x2cc7('0x17')]('%s.%s',_0x42483c,_0x4953fb?'zip':_0x2cc7('0x27')):null);});})[_0x2cc7('0x2d')](function(_0x1fdb63){logger[_0x2cc7('0xe')](util[_0x2cc7('0x17')](_0x2cc7('0x2e'),EXTRACTED_REPORT_ID,_0x2cc7('0x10')),util[_0x2cc7('0x2f')](_0x1fdb63,{'showHidden':![],'depth':null}));EXIT_CODE=0x1;return analyticExtractedReport(_0x2cc7('0x30'));})[_0x2cc7('0x31')](function(){process[_0x2cc7('0x32')](EXIT_CODE);});}main(); \ No newline at end of file diff --git a/server/components/extensions/rewrite.js b/server/components/extensions/rewrite.js index 36c8c4d..692a371 100644 --- a/server/components/extensions/rewrite.js +++ b/server/components/extensions/rewrite.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xcaa7=['XCALLY-MOTION-PROGRESS=0','MONITOR_OPTIONS=ab','length','toLowerCase','createdAt','updatedAt','interval','map','IntervalId','tag','CDR(tag)=','callerID','$[${LEN(${PREFIX-CALLERIDALL})}\x20>\x200]?Set(CALLERID(all)=${PREFIX-CALLERIDALL}):Set(CALLERID(all)=','$[${LEN(${PREFIX-CALLERIDALL})}\x20>\x200]?Set(CALLERID(all)=${PREFIX-CALLERIDALL}):NoOp(No\x20number\x20available)','app','$[${XCALLY-MOTION-ANSWER}=0]?Answer','XCALLY-MOTION-ANSWER=1','XCALLY-MOTION-PROGRESS=1','splice','GotoIfTime',',${EXTEN},','last','concat','Hangup','transaction','destroy','bulkCreate','sortBy','catch','error','rewrite','lodash','models','Interval','findAll','then','intervals','VoiceExtension','uniq','exten','CAST(priority\x20AS\x20UNSIGNED)','filter','groupBy','playback','hasOwnProperty','extensions','extension','find','push','type','format','context','priority','VoiceExtensionId','outbound','Set','CDR(destination)=','cutdigits','${EXTEN:','${EXTEN}','CDR(routeid)=','ExecIf','$[${LEN(${CDR(prefix)})}\x20>\x200]?Goto(','CDR(prefix)=${EXTEN:0:','CDR(prefix)=noprefix','outboundrouteid=','recordingFormat','none'];(function(_0x54a1fd,_0x1b8f17){var _0x2b4b87=function(_0x49d7fd){while(--_0x49d7fd){_0x54a1fd['push'](_0x54a1fd['shift']());}};_0x2b4b87(++_0x1b8f17);}(_0xcaa7,0x12f));var _0x7caa=function(_0x18ac30,_0x3efed1){_0x18ac30=_0x18ac30-0x0;var _0x2a2258=_0xcaa7[_0x18ac30];return _0x2a2258;};'use strict';var _=require(_0x7caa('0x0'));var util=require('util');function rewrite(_0x4be67d,_0x44b3dd){var _0x298c83=this;return _0x4be67d[_0x7caa('0x1')][_0x7caa('0x2')][_0x7caa('0x3')]({'raw':!![]})[_0x7caa('0x4')](function(_0x5d9dfb){_0x298c83[_0x7caa('0x5')]=_0x5d9dfb;return _0x4be67d[_0x7caa('0x1')]['VoiceExtension'][_0x7caa('0x3')]({'where':{'IntervalId':_0x44b3dd['IntervalId']},'raw':!![]});})['then'](function(_0x2744ee){return _0x4be67d[_0x7caa('0x1')][_0x7caa('0x6')][_0x7caa('0x3')]({'where':{'exten':{'$in':_[_0x7caa('0x7')](_['map'](_0x2744ee,_0x7caa('0x8')))}},'order':[{'raw':_0x7caa('0x9')}],'raw':!![]});})['then'](function(_0x547b6a){var _0x20eac2=_['filter'](_0x547b6a,{'priority':'1'});var _0xec8d8c=_[_0x7caa('0xa')](_0x547b6a,{'isApp':0x1});var _0x273805=_[_0x7caa('0xb')](_0xec8d8c,'exten');var _0x1dc164=['queue',_0x7caa('0xc')];var _0x16db3d=[];var _0x2430b1=[];for(var _0x1b816b in _0x273805){if(_0x273805[_0x7caa('0xd')](_0x1b816b)){_0x298c83['priority']=0x2;_0x298c83[_0x7caa('0xe')]=[];_0x298c83[_0x7caa('0xf')]=_[_0x7caa('0x10')](_0x20eac2,{'exten':_0x273805[_0x1b816b][0x0]['exten']});_0x298c83[_0x7caa('0xe')][_0x7caa('0x11')]({'type':_0x273805[_0x1b816b][0x0][_0x7caa('0x12')],'app':'Set','appdata':util[_0x7caa('0x13')]('CDR(type)=%s',_0x273805[_0x1b816b][0x0][_0x7caa('0x12')]),'context':_0x273805[_0x1b816b][0x0][_0x7caa('0x14')],'exten':_0x273805[_0x1b816b][0x0][_0x7caa('0x8')],'priority':_0x298c83[_0x7caa('0x15')]++,'VoiceExtensionId':_0x273805[_0x1b816b][0x0][_0x7caa('0x16')]});if(_0x273805[_0x1b816b][0x0]['type']===_0x7caa('0x17')){if(_0x298c83[_0x7caa('0xf')]){_0x298c83[_0x7caa('0xe')][_0x7caa('0x11')]({'type':_0x273805[_0x1b816b][0x0][_0x7caa('0x12')],'app':_0x7caa('0x18'),'appdata':_0x7caa('0x19')+(_0x298c83['extension'][_0x7caa('0x1a')]?_0x7caa('0x1b')+_0x298c83[_0x7caa('0xf')]['cutdigits']+'}':_0x7caa('0x1c')),'context':_0x273805[_0x1b816b][0x0][_0x7caa('0x14')],'exten':_0x273805[_0x1b816b][0x0][_0x7caa('0x8')],'priority':_0x298c83[_0x7caa('0x15')]++,'VoiceExtensionId':_0x273805[_0x1b816b][0x0][_0x7caa('0x16')]});}_0x298c83[_0x7caa('0xe')][_0x7caa('0x11')]({'type':_0x273805[_0x1b816b][0x0][_0x7caa('0x12')],'app':_0x7caa('0x18'),'appdata':_0x7caa('0x1d')+_0x273805[_0x1b816b][0x0][_0x7caa('0x16')],'context':_0x273805[_0x1b816b][0x0][_0x7caa('0x14')],'exten':_0x273805[_0x1b816b][0x0][_0x7caa('0x8')],'priority':_0x298c83[_0x7caa('0x15')]++,'VoiceExtensionId':_0x273805[_0x1b816b][0x0]['VoiceExtensionId']});var _0x5a3e10=_0x298c83[_0x7caa('0x15')]++;_0x298c83['extensions'][_0x7caa('0x11')]({'type':_0x273805[_0x1b816b][0x0]['type'],'app':_0x7caa('0x1e'),'appdata':_0x7caa('0x1f')+(_0x5a3e10+0x2)+'):Goto('+(_0x5a3e10+0x1)+')','context':_0x273805[_0x1b816b][0x0]['context'],'exten':_0x273805[_0x1b816b][0x0]['exten'],'priority':_0x5a3e10,'VoiceExtensionId':_0x273805[_0x1b816b][0x0][_0x7caa('0x16')]});if(_0x298c83[_0x7caa('0xf')]){_0x298c83[_0x7caa('0xe')][_0x7caa('0x11')]({'type':_0x273805[_0x1b816b][0x0]['type'],'app':_0x7caa('0x18'),'appdata':_0x298c83[_0x7caa('0xf')][_0x7caa('0x1a')]?_0x7caa('0x20')+_0x298c83[_0x7caa('0xf')][_0x7caa('0x1a')]+'}':_0x7caa('0x21'),'context':_0x273805[_0x1b816b][0x0]['context'],'exten':_0x273805[_0x1b816b][0x0][_0x7caa('0x8')],'priority':_0x298c83[_0x7caa('0x15')]++,'VoiceExtensionId':_0x273805[_0x1b816b][0x0][_0x7caa('0x16')]});}_0x298c83[_0x7caa('0xe')][_0x7caa('0x11')]({'type':_0x273805[_0x1b816b][0x0]['type'],'app':_0x7caa('0x18'),'appdata':_0x7caa('0x22')+_0x273805[_0x1b816b][0x0][_0x7caa('0x16')],'context':_0x273805[_0x1b816b][0x0][_0x7caa('0x14')],'exten':_0x273805[_0x1b816b][0x0]['exten'],'priority':_0x298c83[_0x7caa('0x15')]++,'VoiceExtensionId':_0x273805[_0x1b816b][0x0][_0x7caa('0x16')]});if(_0x298c83[_0x7caa('0xf')]&&_0x298c83['extension'][_0x7caa('0xd')]('recordingFormat')&&_0x298c83[_0x7caa('0xf')][_0x7caa('0x23')]!==_0x7caa('0x24')){_0x298c83[_0x7caa('0xe')]['push']({'type':_0x273805[_0x1b816b][0x0]['type'],'app':'Set','appdata':'_XCALLY_MIXMONITOR_UNIQUEID=${UNIQUEID}','context':_0x273805[_0x1b816b][0x0]['context'],'exten':_0x273805[_0x1b816b][0x0]['exten'],'priority':_0x298c83[_0x7caa('0x15')]++,'VoiceExtensionId':_0x273805[_0x1b816b][0x0][_0x7caa('0x16')]});_0x298c83[_0x7caa('0xe')][_0x7caa('0x11')]({'type':_0x273805[_0x1b816b][0x0]['type'],'app':'Set','appdata':'_XCALLY_MIXMONITOR_FORMAT='+_0x298c83[_0x7caa('0xf')][_0x7caa('0x23')]||'wav','context':_0x273805[_0x1b816b][0x0][_0x7caa('0x14')],'exten':_0x273805[_0x1b816b][0x0][_0x7caa('0x8')],'priority':_0x298c83[_0x7caa('0x15')]++,'VoiceExtensionId':_0x273805[_0x1b816b][0x0]['VoiceExtensionId']});}}_0x298c83[_0x7caa('0xe')][_0x7caa('0x11')]({'type':_0x273805[_0x1b816b][0x0][_0x7caa('0x12')],'app':_0x7caa('0x18'),'appdata':'XCALLY-MOTION-ANSWER=0','context':_0x273805[_0x1b816b][0x0][_0x7caa('0x14')],'exten':_0x273805[_0x1b816b][0x0][_0x7caa('0x8')],'priority':_0x298c83[_0x7caa('0x15')]++,'VoiceExtensionId':_0x273805[_0x1b816b][0x0][_0x7caa('0x16')]});_0x298c83['extensions'][_0x7caa('0x11')]({'type':_0x273805[_0x1b816b][0x0]['type'],'app':'Set','appdata':_0x7caa('0x25'),'context':_0x273805[_0x1b816b][0x0][_0x7caa('0x14')],'exten':_0x273805[_0x1b816b][0x0]['exten'],'priority':_0x298c83[_0x7caa('0x15')]++,'VoiceExtensionId':_0x273805[_0x1b816b][0x0][_0x7caa('0x16')]});_0x298c83[_0x7caa('0xe')]['push']({'type':_0x273805[_0x1b816b][0x0]['type'],'app':_0x7caa('0x18'),'appdata':_0x7caa('0x26'),'context':_0x273805[_0x1b816b][0x0][_0x7caa('0x14')],'exten':_0x273805[_0x1b816b][0x0]['exten'],'priority':_0x298c83[_0x7caa('0x15')]++,'VoiceExtensionId':_0x273805[_0x1b816b][0x0][_0x7caa('0x16')]});for(var _0x51264f=0x0,_0x2e99a0=0x0;_0x51264f<_0x273805[_0x1b816b][_0x7caa('0x27')];_0x51264f+=0x1,_0x2e99a0=0x0){var _0x2fbd7a=_0x273805[_0x1b816b][_0x51264f];if(_0x2fbd7a[_0x7caa('0x12')]){_0x2fbd7a['type']=_0x2fbd7a[_0x7caa('0x12')][_0x7caa('0x28')]();}var _0x494b8f=[];var _0x456931=[];delete _0x2fbd7a['id'];delete _0x2fbd7a[_0x7caa('0x29')];delete _0x2fbd7a[_0x7caa('0x2a')];var _0x47882a=_0x2fbd7a[_0x7caa('0x2b')]!=='*,*,*,*'?[_0x2fbd7a[_0x7caa('0x2b')]]:_0x2fbd7a['IntervalId']?_[_0x7caa('0x2c')](_[_0x7caa('0xa')](_0x298c83['intervals'],{'IntervalId':_0x2fbd7a[_0x7caa('0x2d')]}),_0x7caa('0x2b')):[];if(_0x2fbd7a[_0x7caa('0xd')]('tag')){if(_0x2fbd7a[_0x7caa('0x2e')]&&_0x2fbd7a['tag']!=='--'){_0x494b8f[_0x7caa('0x11')]({'type':_0x2fbd7a['type'],'app':'Set','appdata':_0x7caa('0x2f')+_0x2fbd7a[_0x7caa('0x2e')],'context':_0x2fbd7a[_0x7caa('0x14')],'exten':_0x2fbd7a[_0x7caa('0x8')],'priority':_0x47882a[_0x7caa('0x27')]+_0x298c83[_0x7caa('0x15')]+_0x2e99a0++,'VoiceExtensionId':_0x2fbd7a[_0x7caa('0x16')]});}}if(_0x2fbd7a['type']===_0x7caa('0x17')&&_0x2fbd7a[_0x7caa('0xd')]('callerID')){if(_0x2fbd7a[_0x7caa('0x30')]){_0x494b8f['push']({'type':_0x2fbd7a[_0x7caa('0x12')],'app':_0x7caa('0x1e'),'appdata':_0x7caa('0x31')+_0x2fbd7a[_0x7caa('0x30')]+')','context':_0x2fbd7a[_0x7caa('0x14')],'exten':_0x2fbd7a[_0x7caa('0x8')],'priority':_0x47882a[_0x7caa('0x27')]+_0x298c83[_0x7caa('0x15')]+_0x2e99a0++,'VoiceExtensionId':_0x2fbd7a['VoiceExtensionId']});}else{_0x494b8f[_0x7caa('0x11')]({'type':_0x2fbd7a[_0x7caa('0x12')],'app':'ExecIf','appdata':_0x7caa('0x32'),'context':_0x2fbd7a[_0x7caa('0x14')],'exten':_0x2fbd7a[_0x7caa('0x8')],'priority':_0x47882a[_0x7caa('0x27')]+_0x298c83[_0x7caa('0x15')]+_0x2e99a0++,'VoiceExtensionId':_0x2fbd7a[_0x7caa('0x16')]});}}if(_0x2fbd7a[_0x7caa('0xd')]('answer')){if(_0x1dc164['indexOf'](_0x2fbd7a[_0x7caa('0x33')][_0x7caa('0x28')]())>=0x0&&_0x2fbd7a['appType']!=='custom'){if(_0x2fbd7a['answer']){_0x494b8f['push']({'type':_0x2fbd7a[_0x7caa('0x12')],'app':'ExecIf','appdata':_0x7caa('0x34'),'context':_0x2fbd7a[_0x7caa('0x14')],'exten':_0x2fbd7a[_0x7caa('0x8')],'priority':_0x47882a['length']+_0x298c83[_0x7caa('0x15')]+_0x2e99a0++,'VoiceExtensionId':_0x2fbd7a[_0x7caa('0x16')]});_0x494b8f[_0x7caa('0x11')]({'type':_0x2fbd7a[_0x7caa('0x12')],'app':_0x7caa('0x18'),'appdata':_0x7caa('0x35'),'context':_0x2fbd7a[_0x7caa('0x14')],'exten':_0x2fbd7a[_0x7caa('0x8')],'priority':_0x47882a[_0x7caa('0x27')]+_0x298c83[_0x7caa('0x15')]+_0x2e99a0++,'VoiceExtensionId':_0x2fbd7a[_0x7caa('0x16')]});}else{_0x494b8f[_0x7caa('0x11')]({'type':_0x2fbd7a[_0x7caa('0x12')],'app':_0x7caa('0x1e'),'appdata':'$[${XCALLY-MOTION-PROGRESS}=0]?Progress','context':_0x2fbd7a[_0x7caa('0x14')],'exten':_0x2fbd7a[_0x7caa('0x8')],'priority':_0x47882a['length']+_0x298c83[_0x7caa('0x15')]+_0x2e99a0++,'VoiceExtensionId':_0x2fbd7a[_0x7caa('0x16')]});_0x494b8f['push']({'type':_0x2fbd7a[_0x7caa('0x12')],'app':'Set','appdata':_0x7caa('0x36'),'context':_0x2fbd7a[_0x7caa('0x14')],'exten':_0x2fbd7a[_0x7caa('0x8')],'priority':_0x47882a[_0x7caa('0x27')]+_0x298c83[_0x7caa('0x15')]+_0x2e99a0++,'VoiceExtensionId':_0x2fbd7a[_0x7caa('0x16')]});}}}for(var _0xdd935b=0x0;_0xdd935b<_0x47882a['length'];_0xdd935b+=0x1){var _0x44516c=_0x298c83[_0x7caa('0x15')]+_0x47882a['length'];var _0x17f22f=_0xdd935b===_0x47882a['length']-0x1?_0x298c83[_0x7caa('0x15')]+_0x494b8f[_0x7caa('0x27')]+_0x456931[_0x7caa('0x27')]+0x2:_0x298c83[_0x7caa('0x15')]+_0xdd935b+0x1;_0x494b8f[_0x7caa('0x37')](_0xdd935b,0x0,{'type':_0x2fbd7a['type'],'app':_0x7caa('0x38'),'appdata':_0x47882a[_0xdd935b]+'?'+_0x2fbd7a[_0x7caa('0x14')]+_0x7caa('0x39')+_0x44516c+':'+_0x2fbd7a[_0x7caa('0x14')]+_0x7caa('0x39')+_0x17f22f,'exten':_0x2fbd7a[_0x7caa('0x8')],'context':_0x2fbd7a[_0x7caa('0x14')],'priority':_0x298c83[_0x7caa('0x15')]+_0xdd935b,'VoiceExtensionId':_0x273805[_0x1b816b][0x0][_0x7caa('0x16')]});}_0x2fbd7a[_0x7caa('0x15')]=_0x494b8f[_0x7caa('0x27')]?_[_0x7caa('0x3a')](_0x494b8f)[_0x7caa('0x15')]+0x1:_0x298c83[_0x7caa('0x15')];_0x298c83[_0x7caa('0x15')]=(_0x456931['length']?_[_0x7caa('0x3a')](_0x456931)[_0x7caa('0x15')]:_0x2fbd7a['priority'])+0x1;_0x298c83[_0x7caa('0xe')]=_[_0x7caa('0x3b')](_0x298c83[_0x7caa('0xe')],_0x494b8f,[_0x2fbd7a],_0x456931);}_0x298c83[_0x7caa('0xe')][_0x7caa('0x11')]({'type':_0x273805[_0x1b816b][0x0][_0x7caa('0x12')],'app':_0x7caa('0x3c'),'exten':_0x273805[_0x1b816b][0x0][_0x7caa('0x8')],'context':_0x273805[_0x1b816b][0x0][_0x7caa('0x14')],'priority':_0x298c83['priority'],'VoiceExtensionId':_0x273805[_0x1b816b][0x0][_0x7caa('0x16')]});_0x16db3d[_0x7caa('0x11')](_0x273805[_0x1b816b][0x0][_0x7caa('0x16')]);_0x2430b1=_['concat'](_0x2430b1,_0x298c83[_0x7caa('0xe')]);}}return _0x4be67d[_0x7caa('0x3d')](function(_0x4be4e8){return _0x4be67d['models']['VoiceExtension'][_0x7caa('0x3e')]({'where':{'VoiceExtensionId':{'$in':_0x16db3d}},'transaction':_0x4be4e8})[_0x7caa('0x4')](function(_0x17d100){return _0x4be67d[_0x7caa('0x1')][_0x7caa('0x6')][_0x7caa('0x3f')](_[_0x7caa('0x40')](_0x2430b1,_0x7caa('0x15')),{'transaction':_0x4be4e8});});});})[_0x7caa('0x41')](function(_0x3d868e){console[_0x7caa('0x42')](_0x3d868e);});}exports[_0x7caa('0x43')]=rewrite; \ No newline at end of file +var _0xdbf5=['$[${LEN(${PREFIX-CALLERIDALL})}\x20>\x200]?Set(CALLERID(all)=${PREFIX-CALLERIDALL}):NoOp(No\x20number\x20available)','answer','app','custom','$[${XCALLY-MOTION-ANSWER}=0]?Answer','XCALLY-MOTION-ANSWER=1','$[${XCALLY-MOTION-PROGRESS}=0]?Progress','XCALLY-MOTION-PROGRESS=1','splice',',${EXTEN},','last','concat','transaction','destroy','sortBy','catch','models','then','intervals','findAll','IntervalId','VoiceExtension','uniq','map','exten','CAST(priority\x20AS\x20UNSIGNED)','filter','groupBy','queue','hasOwnProperty','extensions','extension','find','push','type','format','CDR(type)=%s','context','priority','VoiceExtensionId','outbound','Set','cutdigits','${EXTEN:','CDR(routeid)=','ExecIf','$[${LEN(${CDR(prefix)})}\x20>\x200]?Goto(','):Goto(','CDR(prefix)=${EXTEN:0:','CDR(prefix)=noprefix','outboundrouteid=','recordingFormat','_XCALLY_MIXMONITOR_FORMAT=','wav','XCALLY-MOTION-PROGRESS=0','MONITOR_OPTIONS=ab','toLowerCase','createdAt','updatedAt','interval','*,*,*,*','tag','CDR(tag)=','length','callerID','$[${LEN(${PREFIX-CALLERIDALL})}\x20>\x200]?Set(CALLERID(all)=${PREFIX-CALLERIDALL}):Set(CALLERID(all)='];(function(_0x3c7376,_0x528b18){var _0x35507f=function(_0xdb74f1){while(--_0xdb74f1){_0x3c7376['push'](_0x3c7376['shift']());}};_0x35507f(++_0x528b18);}(_0xdbf5,0x1de));var _0x5dbf=function(_0x3540cb,_0x514b17){_0x3540cb=_0x3540cb-0x0;var _0x4e339b=_0xdbf5[_0x3540cb];return _0x4e339b;};'use strict';var _=require('lodash');var util=require('util');function rewrite(_0x23f686,_0x211c16){var _0x2891a2=this;return _0x23f686[_0x5dbf('0x0')]['Interval']['findAll']({'raw':!![]})[_0x5dbf('0x1')](function(_0x571bc4){_0x2891a2[_0x5dbf('0x2')]=_0x571bc4;return _0x23f686['models']['VoiceExtension'][_0x5dbf('0x3')]({'where':{'IntervalId':_0x211c16[_0x5dbf('0x4')]},'raw':!![]});})['then'](function(_0x51629b){return _0x23f686[_0x5dbf('0x0')][_0x5dbf('0x5')]['findAll']({'where':{'exten':{'$in':_[_0x5dbf('0x6')](_[_0x5dbf('0x7')](_0x51629b,_0x5dbf('0x8')))}},'order':[{'raw':_0x5dbf('0x9')}],'raw':!![]});})[_0x5dbf('0x1')](function(_0x6a640d){var _0x20ffbb=_[_0x5dbf('0xa')](_0x6a640d,{'priority':'1'});var _0x1b020f=_[_0x5dbf('0xa')](_0x6a640d,{'isApp':0x1});var _0xee3b96=_[_0x5dbf('0xb')](_0x1b020f,_0x5dbf('0x8'));var _0x4bbe6b=[_0x5dbf('0xc'),'playback'];var _0x4d9696=[];var _0x362076=[];for(var _0x59a032 in _0xee3b96){if(_0xee3b96[_0x5dbf('0xd')](_0x59a032)){_0x2891a2['priority']=0x2;_0x2891a2[_0x5dbf('0xe')]=[];_0x2891a2[_0x5dbf('0xf')]=_[_0x5dbf('0x10')](_0x20ffbb,{'exten':_0xee3b96[_0x59a032][0x0][_0x5dbf('0x8')]});_0x2891a2[_0x5dbf('0xe')][_0x5dbf('0x11')]({'type':_0xee3b96[_0x59a032][0x0][_0x5dbf('0x12')],'app':'Set','appdata':util[_0x5dbf('0x13')](_0x5dbf('0x14'),_0xee3b96[_0x59a032][0x0]['type']),'context':_0xee3b96[_0x59a032][0x0][_0x5dbf('0x15')],'exten':_0xee3b96[_0x59a032][0x0]['exten'],'priority':_0x2891a2[_0x5dbf('0x16')]++,'VoiceExtensionId':_0xee3b96[_0x59a032][0x0][_0x5dbf('0x17')]});if(_0xee3b96[_0x59a032][0x0]['type']===_0x5dbf('0x18')){if(_0x2891a2['extension']){_0x2891a2[_0x5dbf('0xe')]['push']({'type':_0xee3b96[_0x59a032][0x0][_0x5dbf('0x12')],'app':_0x5dbf('0x19'),'appdata':'CDR(destination)='+(_0x2891a2[_0x5dbf('0xf')][_0x5dbf('0x1a')]?_0x5dbf('0x1b')+_0x2891a2[_0x5dbf('0xf')]['cutdigits']+'}':'${EXTEN}'),'context':_0xee3b96[_0x59a032][0x0]['context'],'exten':_0xee3b96[_0x59a032][0x0][_0x5dbf('0x8')],'priority':_0x2891a2['priority']++,'VoiceExtensionId':_0xee3b96[_0x59a032][0x0][_0x5dbf('0x17')]});}_0x2891a2[_0x5dbf('0xe')]['push']({'type':_0xee3b96[_0x59a032][0x0][_0x5dbf('0x12')],'app':_0x5dbf('0x19'),'appdata':_0x5dbf('0x1c')+_0xee3b96[_0x59a032][0x0][_0x5dbf('0x17')],'context':_0xee3b96[_0x59a032][0x0]['context'],'exten':_0xee3b96[_0x59a032][0x0][_0x5dbf('0x8')],'priority':_0x2891a2['priority']++,'VoiceExtensionId':_0xee3b96[_0x59a032][0x0][_0x5dbf('0x17')]});var _0x252ee0=_0x2891a2[_0x5dbf('0x16')]++;_0x2891a2['extensions'][_0x5dbf('0x11')]({'type':_0xee3b96[_0x59a032][0x0]['type'],'app':_0x5dbf('0x1d'),'appdata':_0x5dbf('0x1e')+(_0x252ee0+0x2)+_0x5dbf('0x1f')+(_0x252ee0+0x1)+')','context':_0xee3b96[_0x59a032][0x0][_0x5dbf('0x15')],'exten':_0xee3b96[_0x59a032][0x0][_0x5dbf('0x8')],'priority':_0x252ee0,'VoiceExtensionId':_0xee3b96[_0x59a032][0x0]['VoiceExtensionId']});if(_0x2891a2['extension']){_0x2891a2[_0x5dbf('0xe')][_0x5dbf('0x11')]({'type':_0xee3b96[_0x59a032][0x0]['type'],'app':_0x5dbf('0x19'),'appdata':_0x2891a2[_0x5dbf('0xf')][_0x5dbf('0x1a')]?_0x5dbf('0x20')+_0x2891a2[_0x5dbf('0xf')][_0x5dbf('0x1a')]+'}':_0x5dbf('0x21'),'context':_0xee3b96[_0x59a032][0x0][_0x5dbf('0x15')],'exten':_0xee3b96[_0x59a032][0x0][_0x5dbf('0x8')],'priority':_0x2891a2['priority']++,'VoiceExtensionId':_0xee3b96[_0x59a032][0x0][_0x5dbf('0x17')]});}_0x2891a2[_0x5dbf('0xe')][_0x5dbf('0x11')]({'type':_0xee3b96[_0x59a032][0x0][_0x5dbf('0x12')],'app':_0x5dbf('0x19'),'appdata':_0x5dbf('0x22')+_0xee3b96[_0x59a032][0x0]['VoiceExtensionId'],'context':_0xee3b96[_0x59a032][0x0][_0x5dbf('0x15')],'exten':_0xee3b96[_0x59a032][0x0][_0x5dbf('0x8')],'priority':_0x2891a2['priority']++,'VoiceExtensionId':_0xee3b96[_0x59a032][0x0][_0x5dbf('0x17')]});if(_0x2891a2[_0x5dbf('0xf')]&&_0x2891a2[_0x5dbf('0xf')][_0x5dbf('0xd')](_0x5dbf('0x23'))&&_0x2891a2['extension'][_0x5dbf('0x23')]!=='none'){_0x2891a2[_0x5dbf('0xe')][_0x5dbf('0x11')]({'type':_0xee3b96[_0x59a032][0x0][_0x5dbf('0x12')],'app':_0x5dbf('0x19'),'appdata':'_XCALLY_MIXMONITOR_UNIQUEID=${UNIQUEID}','context':_0xee3b96[_0x59a032][0x0]['context'],'exten':_0xee3b96[_0x59a032][0x0][_0x5dbf('0x8')],'priority':_0x2891a2[_0x5dbf('0x16')]++,'VoiceExtensionId':_0xee3b96[_0x59a032][0x0][_0x5dbf('0x17')]});_0x2891a2[_0x5dbf('0xe')]['push']({'type':_0xee3b96[_0x59a032][0x0][_0x5dbf('0x12')],'app':_0x5dbf('0x19'),'appdata':_0x5dbf('0x24')+_0x2891a2[_0x5dbf('0xf')][_0x5dbf('0x23')]||_0x5dbf('0x25'),'context':_0xee3b96[_0x59a032][0x0][_0x5dbf('0x15')],'exten':_0xee3b96[_0x59a032][0x0][_0x5dbf('0x8')],'priority':_0x2891a2[_0x5dbf('0x16')]++,'VoiceExtensionId':_0xee3b96[_0x59a032][0x0][_0x5dbf('0x17')]});}}_0x2891a2['extensions']['push']({'type':_0xee3b96[_0x59a032][0x0][_0x5dbf('0x12')],'app':_0x5dbf('0x19'),'appdata':'XCALLY-MOTION-ANSWER=0','context':_0xee3b96[_0x59a032][0x0][_0x5dbf('0x15')],'exten':_0xee3b96[_0x59a032][0x0][_0x5dbf('0x8')],'priority':_0x2891a2[_0x5dbf('0x16')]++,'VoiceExtensionId':_0xee3b96[_0x59a032][0x0][_0x5dbf('0x17')]});_0x2891a2[_0x5dbf('0xe')]['push']({'type':_0xee3b96[_0x59a032][0x0]['type'],'app':'Set','appdata':_0x5dbf('0x26'),'context':_0xee3b96[_0x59a032][0x0][_0x5dbf('0x15')],'exten':_0xee3b96[_0x59a032][0x0][_0x5dbf('0x8')],'priority':_0x2891a2[_0x5dbf('0x16')]++,'VoiceExtensionId':_0xee3b96[_0x59a032][0x0]['VoiceExtensionId']});_0x2891a2[_0x5dbf('0xe')]['push']({'type':_0xee3b96[_0x59a032][0x0][_0x5dbf('0x12')],'app':_0x5dbf('0x19'),'appdata':_0x5dbf('0x27'),'context':_0xee3b96[_0x59a032][0x0][_0x5dbf('0x15')],'exten':_0xee3b96[_0x59a032][0x0][_0x5dbf('0x8')],'priority':_0x2891a2['priority']++,'VoiceExtensionId':_0xee3b96[_0x59a032][0x0][_0x5dbf('0x17')]});for(var _0x54d5b3=0x0,_0x952c93=0x0;_0x54d5b3<_0xee3b96[_0x59a032]['length'];_0x54d5b3+=0x1,_0x952c93=0x0){var _0x7098e3=_0xee3b96[_0x59a032][_0x54d5b3];if(_0x7098e3[_0x5dbf('0x12')]){_0x7098e3[_0x5dbf('0x12')]=_0x7098e3[_0x5dbf('0x12')][_0x5dbf('0x28')]();}var _0xad1983=[];var _0x29e83f=[];delete _0x7098e3['id'];delete _0x7098e3[_0x5dbf('0x29')];delete _0x7098e3[_0x5dbf('0x2a')];var _0x9cdb5=_0x7098e3[_0x5dbf('0x2b')]!==_0x5dbf('0x2c')?[_0x7098e3[_0x5dbf('0x2b')]]:_0x7098e3[_0x5dbf('0x4')]?_[_0x5dbf('0x7')](_['filter'](_0x2891a2[_0x5dbf('0x2')],{'IntervalId':_0x7098e3[_0x5dbf('0x4')]}),_0x5dbf('0x2b')):[];if(_0x7098e3[_0x5dbf('0xd')]('tag')){if(_0x7098e3[_0x5dbf('0x2d')]&&_0x7098e3[_0x5dbf('0x2d')]!=='--'){_0xad1983[_0x5dbf('0x11')]({'type':_0x7098e3['type'],'app':_0x5dbf('0x19'),'appdata':_0x5dbf('0x2e')+_0x7098e3[_0x5dbf('0x2d')],'context':_0x7098e3['context'],'exten':_0x7098e3[_0x5dbf('0x8')],'priority':_0x9cdb5[_0x5dbf('0x2f')]+_0x2891a2[_0x5dbf('0x16')]+_0x952c93++,'VoiceExtensionId':_0x7098e3[_0x5dbf('0x17')]});}}if(_0x7098e3[_0x5dbf('0x12')]===_0x5dbf('0x18')&&_0x7098e3[_0x5dbf('0xd')](_0x5dbf('0x30'))){if(_0x7098e3['callerID']){_0xad1983[_0x5dbf('0x11')]({'type':_0x7098e3['type'],'app':_0x5dbf('0x1d'),'appdata':_0x5dbf('0x31')+_0x7098e3[_0x5dbf('0x30')]+')','context':_0x7098e3[_0x5dbf('0x15')],'exten':_0x7098e3[_0x5dbf('0x8')],'priority':_0x9cdb5['length']+_0x2891a2[_0x5dbf('0x16')]+_0x952c93++,'VoiceExtensionId':_0x7098e3['VoiceExtensionId']});}else{_0xad1983[_0x5dbf('0x11')]({'type':_0x7098e3[_0x5dbf('0x12')],'app':_0x5dbf('0x1d'),'appdata':_0x5dbf('0x32'),'context':_0x7098e3[_0x5dbf('0x15')],'exten':_0x7098e3[_0x5dbf('0x8')],'priority':_0x9cdb5[_0x5dbf('0x2f')]+_0x2891a2[_0x5dbf('0x16')]+_0x952c93++,'VoiceExtensionId':_0x7098e3['VoiceExtensionId']});}}if(_0x7098e3['hasOwnProperty'](_0x5dbf('0x33'))){if(_0x4bbe6b['indexOf'](_0x7098e3[_0x5dbf('0x34')]['toLowerCase']())>=0x0&&_0x7098e3['appType']!==_0x5dbf('0x35')){if(_0x7098e3[_0x5dbf('0x33')]){_0xad1983[_0x5dbf('0x11')]({'type':_0x7098e3[_0x5dbf('0x12')],'app':'ExecIf','appdata':_0x5dbf('0x36'),'context':_0x7098e3[_0x5dbf('0x15')],'exten':_0x7098e3['exten'],'priority':_0x9cdb5['length']+_0x2891a2['priority']+_0x952c93++,'VoiceExtensionId':_0x7098e3[_0x5dbf('0x17')]});_0xad1983['push']({'type':_0x7098e3[_0x5dbf('0x12')],'app':'Set','appdata':_0x5dbf('0x37'),'context':_0x7098e3[_0x5dbf('0x15')],'exten':_0x7098e3[_0x5dbf('0x8')],'priority':_0x9cdb5[_0x5dbf('0x2f')]+_0x2891a2[_0x5dbf('0x16')]+_0x952c93++,'VoiceExtensionId':_0x7098e3['VoiceExtensionId']});}else{_0xad1983[_0x5dbf('0x11')]({'type':_0x7098e3['type'],'app':_0x5dbf('0x1d'),'appdata':_0x5dbf('0x38'),'context':_0x7098e3['context'],'exten':_0x7098e3[_0x5dbf('0x8')],'priority':_0x9cdb5[_0x5dbf('0x2f')]+_0x2891a2[_0x5dbf('0x16')]+_0x952c93++,'VoiceExtensionId':_0x7098e3['VoiceExtensionId']});_0xad1983['push']({'type':_0x7098e3[_0x5dbf('0x12')],'app':_0x5dbf('0x19'),'appdata':_0x5dbf('0x39'),'context':_0x7098e3[_0x5dbf('0x15')],'exten':_0x7098e3[_0x5dbf('0x8')],'priority':_0x9cdb5[_0x5dbf('0x2f')]+_0x2891a2[_0x5dbf('0x16')]+_0x952c93++,'VoiceExtensionId':_0x7098e3[_0x5dbf('0x17')]});}}}for(var _0x15b39e=0x0;_0x15b39e<_0x9cdb5[_0x5dbf('0x2f')];_0x15b39e+=0x1){var _0x435e52=_0x2891a2[_0x5dbf('0x16')]+_0x9cdb5['length'];var _0x3bb893=_0x15b39e===_0x9cdb5[_0x5dbf('0x2f')]-0x1?_0x2891a2[_0x5dbf('0x16')]+_0xad1983[_0x5dbf('0x2f')]+_0x29e83f[_0x5dbf('0x2f')]+0x2:_0x2891a2['priority']+_0x15b39e+0x1;_0xad1983[_0x5dbf('0x3a')](_0x15b39e,0x0,{'type':_0x7098e3[_0x5dbf('0x12')],'app':'GotoIfTime','appdata':_0x9cdb5[_0x15b39e]+'?'+_0x7098e3['context']+_0x5dbf('0x3b')+_0x435e52+':'+_0x7098e3[_0x5dbf('0x15')]+_0x5dbf('0x3b')+_0x3bb893,'exten':_0x7098e3[_0x5dbf('0x8')],'context':_0x7098e3[_0x5dbf('0x15')],'priority':_0x2891a2['priority']+_0x15b39e,'VoiceExtensionId':_0xee3b96[_0x59a032][0x0]['VoiceExtensionId']});}_0x7098e3['priority']=_0xad1983[_0x5dbf('0x2f')]?_[_0x5dbf('0x3c')](_0xad1983)['priority']+0x1:_0x2891a2[_0x5dbf('0x16')];_0x2891a2[_0x5dbf('0x16')]=(_0x29e83f['length']?_[_0x5dbf('0x3c')](_0x29e83f)[_0x5dbf('0x16')]:_0x7098e3[_0x5dbf('0x16')])+0x1;_0x2891a2[_0x5dbf('0xe')]=_[_0x5dbf('0x3d')](_0x2891a2['extensions'],_0xad1983,[_0x7098e3],_0x29e83f);}_0x2891a2['extensions']['push']({'type':_0xee3b96[_0x59a032][0x0][_0x5dbf('0x12')],'app':'Hangup','exten':_0xee3b96[_0x59a032][0x0][_0x5dbf('0x8')],'context':_0xee3b96[_0x59a032][0x0][_0x5dbf('0x15')],'priority':_0x2891a2['priority'],'VoiceExtensionId':_0xee3b96[_0x59a032][0x0]['VoiceExtensionId']});_0x4d9696[_0x5dbf('0x11')](_0xee3b96[_0x59a032][0x0]['VoiceExtensionId']);_0x362076=_[_0x5dbf('0x3d')](_0x362076,_0x2891a2[_0x5dbf('0xe')]);}}return _0x23f686[_0x5dbf('0x3e')](function(_0x12a640){return _0x23f686['models'][_0x5dbf('0x5')][_0x5dbf('0x3f')]({'where':{'VoiceExtensionId':{'$in':_0x4d9696}},'transaction':_0x12a640})['then'](function(_0x3fed49){return _0x23f686[_0x5dbf('0x0')][_0x5dbf('0x5')]['bulkCreate'](_[_0x5dbf('0x40')](_0x362076,_0x5dbf('0x16')),{'transaction':_0x12a640});});});})[_0x5dbf('0x41')](function(_0x38008d){console['error'](_0x38008d);});}exports['rewrite']=rewrite; \ No newline at end of file diff --git a/server/components/import/cm/csv.js b/server/components/import/cm/csv.js index 993e0d3..de8a08b 100644 --- a/server/components/import/cm/csv.js +++ b/server/components/import/cm/csv.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x04b9=['createReadStream','pause','CSV\x20parsed\x20correctly!','CSV\x20parse\x20error','bluebird','util','lodash','squel','papaparse','ioredis','../../../mysqldb','../../../config/environment','api','redis','socket.io-emitter','../../../api/cmContact/cmContact.socket','register','argv','undefined','null','Missing\x20filepath\x20parameter!','Missing\x20binding\x20parameters!','split','Missing\x20ListId\x20parameter!','Missing\x20socket_timestamp\x20parameter!','error','index','The\x20row\x20is\x20empty\x20or\x20the\x20number\x20of\x20parameters\x20does\x20not\x20match\x20the\x20columns!','errors','length','map','message','data','firstName','phone','phone\x20not\x20specified!','YYYY-MM-DD','isValid','birthDate\x20format\x20is\x20invalid,\x20YYYY-MM-DD\x20format\x20is\x20supported!','email','email\x20format\x20is\x20not\x20valid!','ListId','CompanyId','duplicate','Duplicate\x20Contact','create','keys','then','push','catch','Error\x20while\x20creating\x20contact:\x20','stringify','cmContact','checkHopper','inspect','insert','into','cm_hopper','fromQuery','scheduledAt','ContactId','updatedAt','select','field','NOW()','toString','cm_contacts','where','deletedAt\x20IS\x20NULL','ListId\x20=\x20?','phone\x20IS\x20NOT\x20NULL','phone\x20NOT\x20IN\x20(?)','from','\x20=\x20?','id\x20IN\x20?','calleridnum','cm_hopper_final','createdAt','str','cm_hopper_black','findAll','outbound','dialCheckDuplicateType','get','sequelize','query','VoiceQueueId','onlyIfOpen','VoiceQueue','CmList','BlackLists','all','Campaign','Lists','always','CampaignId','generalCheckHopper','finally','contact:csv_','resume','emit','unlinkSync','Unable\x20to\x20delete\x20temp\x20file:','exit','SIGINT','info','CSV\x20import\x20process\x20stopped!','resolve'];(function(_0x7dbe6,_0x1d1638){var _0x1ebc7a=function(_0x3c9782){while(--_0x3c9782){_0x7dbe6['push'](_0x7dbe6['shift']());}};_0x1ebc7a(++_0x1d1638);}(_0x04b9,0xdc));var _0x904b=function(_0x50db75,_0x4d4016){_0x50db75=_0x50db75-0x0;var _0x4ed858=_0x04b9[_0x50db75];return _0x4ed858;};'use strict';var BPromise=require(_0x904b('0x0'));var util=require(_0x904b('0x1'));var _=require(_0x904b('0x2'));var fs=require('fs');var squel=require(_0x904b('0x3'));var Papa=require(_0x904b('0x4'));var Redis=require(_0x904b('0x5'));var db=require(_0x904b('0x6'))['db'];var config=require(_0x904b('0x7'));var logger=require('../../../config/logger')(_0x904b('0x8'));config[_0x904b('0x9')]=_['defaults'](config[_0x904b('0x9')],{'host':'localhost','port':0x18eb});var socket=require(_0x904b('0xa'))(new Redis(config[_0x904b('0x9')]));require(_0x904b('0xb'))[_0x904b('0xc')](socket);try{if(!process[_0x904b('0xd')][0x2]||process[_0x904b('0xd')][0x2]===_0x904b('0xe')||process[_0x904b('0xd')][0x2]===_0x904b('0xf')){throw new Error(_0x904b('0x10'));}var FILEPATH=process[_0x904b('0xd')][0x2];if(!process[_0x904b('0xd')][0x3]||process[_0x904b('0xd')][0x3]===_0x904b('0xe')||process[_0x904b('0xd')][0x3]===_0x904b('0xf')||!process[_0x904b('0xd')][0x4]||process[_0x904b('0xd')][0x4]==='undefined'||process[_0x904b('0xd')][0x4]==='null'){throw new Error(_0x904b('0x11'));}var FIELDS=_['zipObject'](process[_0x904b('0xd')][0x3][_0x904b('0x12')](','),process[_0x904b('0xd')][0x4][_0x904b('0x12')](','));if(!process['argv'][0x5]||process[_0x904b('0xd')][0x5]===_0x904b('0xe')||process['argv'][0x5]===_0x904b('0xf')){throw new Error(_0x904b('0x13'));}var LISTID=process['argv'][0x5];var COMPANYID=process[_0x904b('0xd')][0x6]&&process[_0x904b('0xd')][0x6]!==_0x904b('0xe')&&process['argv'][0x6]!=='null'?process[_0x904b('0xd')][0x6]:null;var DUPLICATES=process[_0x904b('0xd')][0x7]&&process[_0x904b('0xd')][0x7]!==_0x904b('0xe')&&process['argv'][0x7]!==_0x904b('0xf')?process[_0x904b('0xd')][0x7]:null;if(!process[_0x904b('0xd')][0x8]||process[_0x904b('0xd')][0x8]===_0x904b('0xe')||process[_0x904b('0xd')][0x8]==='null'){throw new Error(_0x904b('0x14'));}var SOCKET_TIMESTAMP=process[_0x904b('0xd')][0x8];}catch(_0x1627e2){logger[_0x904b('0x15')](_0x1627e2);endCsv();}var total=0x0;var pTotal=0x0;var success=0x0;var errors=0x0;var duplicates=0x0;var rows=[];var hopperContacts='';var promises=[];var index=0x0;var alreadyInvalid=![];function handleCheckRowError(_0x727e35,_0x42f890,_0x5d879d,_0x3c6595){var _0x39a732={'message':_0x42f890};_0x39a732[_0x727e35]=!![];if(_0x5d879d){_0x39a732['contact']=_0x5d879d;}if(_0x3c6595){_0x39a732[_0x904b('0x16')]=_0x3c6595;}return _0x39a732;}function isEmail(_0x18f225){return/^([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22))*\x40([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d))*$/['test'](_0x18f225);}function checkRow(_0x3b803c,_0x1c46d2,_0x2382af){return new BPromise(function(_0x34cc57,_0x1d9b2a){if(_['isNil'](_0x3b803c)){return _0x1d9b2a(handleCheckRowError('error',_0x904b('0x17'),null,_0x2382af));}if(_0x3b803c[_0x904b('0x18')]&&_0x3b803c[_0x904b('0x18')][_0x904b('0x19')]){var _0x1246eb=_[_0x904b('0x1a')](_0x3b803c[_0x904b('0x18')],_0x904b('0x1b'))['join'](';');return _0x1d9b2a(handleCheckRowError('error',_0x1246eb,null,_0x2382af));}var _0x25101c={};for(var _0x89fbdd in FIELDS){if(FIELDS['hasOwnProperty'](_0x89fbdd)&&FIELDS[_0x89fbdd]){_0x25101c[_0x89fbdd]=_0x3b803c[_0x904b('0x1c')][0x0][FIELDS[_0x89fbdd]]||_0x3b803c[_0x904b('0x1c')][0x0]['\ufeff'+FIELDS[_0x89fbdd]];}}if(!_0x25101c[_0x904b('0x1d')]){return _0x1d9b2a(handleCheckRowError(_0x904b('0x15'),'firstName\x20not\x20specified!',null,_0x2382af));}if(!_0x25101c[_0x904b('0x1e')]){return _0x1d9b2a(handleCheckRowError(_0x904b('0x15'),_0x904b('0x1f'),null,_0x2382af));}if(_0x25101c['birthDate']){var _0xb78c50=moment(_0x25101c['birthDate'],_0x904b('0x20'));if(!_0xb78c50[_0x904b('0x21')]()){return _0x1d9b2a(handleCheckRowError('error',_0x904b('0x22'),null,_0x2382af));}}if(_0x25101c[_0x904b('0x23')]){if(!isEmail(_0x25101c['email'])){return _0x1d9b2a(handleCheckRowError(_0x904b('0x15'),_0x904b('0x24'),null,_0x2382af));}}_0x25101c[_0x904b('0x25')]=LISTID;_0x25101c[_0x904b('0x26')]=COMPANYID||undefined;if(DUPLICATES&&DUPLICATES[_0x904b('0x19')]&&_0x1c46d2){var _0x1d090c={};for(var _0xc803b8=0x0,_0x123d53=DUPLICATES[_0x904b('0x19')];_0xc803b8<_0x123d53;_0xc803b8+=0x1){_0x1d090c[DUPLICATES[_0xc803b8]]=_0x25101c[DUPLICATES[_0xc803b8]];}var _0x2d3c42=_['find'](_0x1c46d2,_0x1d090c);if(_0x2d3c42){return _0x1d9b2a(handleCheckRowError(_0x904b('0x27'),_0x904b('0x28'),_0x2d3c42,_0x2382af));}}return db['CmContact'][_0x904b('0x29')](_0x25101c,{'raw':!![],'hooks':![],'fields':_[_0x904b('0x2a')](_0x25101c)})[_0x904b('0x2b')](function(_0x7b177f){if(DUPLICATES&&DUPLICATES[_0x904b('0x19')]&&_0x1c46d2){_0x1c46d2[_0x904b('0x2c')](_['pick'](_0x25101c,DUPLICATES));}hopperContacts+=(hopperContacts?',':'')+_0x7b177f['id'];return _0x34cc57();})[_0x904b('0x2d')](function(_0x3bdfa6){return _0x1d9b2a(handleCheckRowError(_0x904b('0x15'),_0x904b('0x2e')+(_0x3bdfa6[_0x904b('0x1b')]||JSON[_0x904b('0x2f')](_0x3bdfa6)),null,_0x2382af));});});}function checkHopper(){function _0x4825af(){return function(_0x423770){logger[_0x904b('0x15')](_0x904b('0x30'),_0x904b('0x31'),util[_0x904b('0x32')](_0x423770,{'showHidden':![],'depth':null}));};}var _0x5ccf57=function(_0x42f846,_0x447255){var _0x530127=squel[_0x904b('0x33')]()[_0x904b('0x34')](_0x904b('0x35'))[_0x904b('0x36')]([_0x904b('0x1e'),_0x904b('0x37'),_0x904b('0x38'),_0x904b('0x25'),_0x447255,'createdAt',_0x904b('0x39')],squel[_0x904b('0x3a')]()[_0x904b('0x3b')](_0x904b('0x1e'),_0x904b('0x1e'))[_0x904b('0x3b')](_0x904b('0x3c'),_0x904b('0x37'))[_0x904b('0x3b')]('id',_0x904b('0x38'))[_0x904b('0x3b')](LISTID['toString'](),_0x904b('0x25'))['field'](_0x42f846['id'][_0x904b('0x3d')](),_0x447255)[_0x904b('0x3b')](_0x904b('0x3c'),'createdAt')['field'](_0x904b('0x3c'),_0x904b('0x39'))['from'](_0x904b('0x3e'))[_0x904b('0x3f')](_0x904b('0x40'))['where'](_0x904b('0x41'),LISTID[_0x904b('0x3d')]())['where'](_0x904b('0x42'))[_0x904b('0x3f')](_0x904b('0x43'),squel[_0x904b('0x3a')]()[_0x904b('0x3b')](_0x904b('0x1e'))[_0x904b('0x44')](_0x904b('0x35'))[_0x904b('0x3f')](_0x447255+_0x904b('0x45'),_0x42f846['id'][_0x904b('0x3d')]())))[_0x904b('0x3d')]();return _0x530127;};var _0x52eccc=function(_0x20371c,_0xa34e71){var _0x92194f=squel[_0x904b('0x33')]()['into']('cm_hopper')['fromQuery'](['phone',_0x904b('0x37'),'ContactId',_0x904b('0x25'),_0xa34e71,'createdAt','updatedAt'],squel[_0x904b('0x3a')]()[_0x904b('0x3b')](_0x904b('0x1e'),'phone')[_0x904b('0x3b')]('NOW()',_0x904b('0x37'))[_0x904b('0x3b')]('id','ContactId')[_0x904b('0x3b')](LISTID[_0x904b('0x3d')](),_0x904b('0x25'))[_0x904b('0x3b')](_0x20371c['id']['toString'](),_0xa34e71)[_0x904b('0x3b')]('NOW()','createdAt')[_0x904b('0x3b')](_0x904b('0x3c'),_0x904b('0x39'))[_0x904b('0x44')](_0x904b('0x3e'))[_0x904b('0x3f')]('deletedAt\x20IS\x20NULL')[_0x904b('0x3f')]('ListId\x20=\x20?',LISTID[_0x904b('0x3d')]())[_0x904b('0x3f')](_0x904b('0x46'),squel['str'](hopperContacts))[_0x904b('0x3f')](_0x904b('0x42'))['where'](_0x904b('0x43'),squel[_0x904b('0x3a')]()[_0x904b('0x3b')](_0x904b('0x47'))[_0x904b('0x44')](_0x904b('0x48'))['where'](_0xa34e71+_0x904b('0x45'),_0x20371c['id'][_0x904b('0x3d')]()))[_0x904b('0x3f')](_0x904b('0x43'),squel[_0x904b('0x3a')]()[_0x904b('0x3b')]('phone')['from'](_0x904b('0x35'))['where'](_0xa34e71+'\x20=\x20?',_0x20371c['id'][_0x904b('0x3d')]())))[_0x904b('0x3d')]();return _0x92194f;};function _0x2f572a(_0x345cdb,_0x15092f){var _0x541789=squel[_0x904b('0x33')]()['into']('cm_hopper')[_0x904b('0x36')](['phone',_0x904b('0x37'),_0x904b('0x38'),'ListId',_0x15092f,_0x904b('0x49'),_0x904b('0x39')],squel[_0x904b('0x3a')]()[_0x904b('0x3b')](_0x904b('0x1e'),_0x904b('0x1e'))[_0x904b('0x3b')]('NOW()',_0x904b('0x37'))['field']('id',_0x904b('0x38'))[_0x904b('0x3b')](LISTID[_0x904b('0x3d')](),_0x904b('0x25'))[_0x904b('0x3b')](_0x345cdb['id']['toString'](),_0x15092f)[_0x904b('0x3b')](_0x904b('0x3c'),_0x904b('0x49'))[_0x904b('0x3b')](_0x904b('0x3c'),_0x904b('0x39'))[_0x904b('0x44')](_0x904b('0x3e'))[_0x904b('0x3f')]('deletedAt\x20IS\x20NULL')['where'](_0x904b('0x41'),LISTID[_0x904b('0x3d')]())[_0x904b('0x3f')](_0x904b('0x46'),squel[_0x904b('0x4a')](hopperContacts))[_0x904b('0x3f')](_0x904b('0x42')))['toString']();return _0x541789;}function _0x2bd3dc(_0x21d3c8,_0x45b3eb){var _0x5b49b6=squel[_0x904b('0x33')]()[_0x904b('0x34')](_0x904b('0x4b'))[_0x904b('0x36')]([_0x904b('0x1e'),_0x904b('0x38'),'ListId',_0x45b3eb,_0x904b('0x49'),_0x904b('0x39')],squel[_0x904b('0x3a')]()[_0x904b('0x3b')](_0x904b('0x1e'),_0x904b('0x1e'))[_0x904b('0x3b')]('id',_0x904b('0x38'))['field'](LISTID[_0x904b('0x3d')](),_0x904b('0x25'))[_0x904b('0x3b')](_0x21d3c8['id'][_0x904b('0x3d')](),_0x45b3eb)[_0x904b('0x3b')](_0x904b('0x3c'),_0x904b('0x49'))[_0x904b('0x3b')](_0x904b('0x3c'),_0x904b('0x39'))[_0x904b('0x44')](_0x904b('0x3e'))[_0x904b('0x3f')](_0x904b('0x40'))['where'](_0x904b('0x41'),LISTID[_0x904b('0x3d')]())['where']('id\x20IN\x20?',squel[_0x904b('0x4a')](hopperContacts))[_0x904b('0x3f')](_0x904b('0x42')))['toString']();return _0x5b49b6;}return db['VoiceQueue'][_0x904b('0x4c')]({'where':{'type':_0x904b('0x4d')},'attributes':['id',_0x904b('0x4e')],'include':[{'model':db['CmList'],'as':'Lists','where':{'id':LISTID}}]})['then'](function(_0x571f54){var _0x34c754=[];if(_0x571f54){var _0x5c51be;for(var _0x51a3db=0x0,_0xc6bd78;_0x51a3db<_0x571f54[_0x904b('0x19')];_0x51a3db+=0x1){_0xc6bd78=_0x571f54[_0x51a3db][_0x904b('0x4f')]({'plain':!![]});switch(_0xc6bd78[_0x904b('0x4e')]){case'always':_0x34c754['push'](db[_0x904b('0x50')][_0x904b('0x51')](_0x52eccc(_0xc6bd78,_0x904b('0x52')))[_0x904b('0x2b')](function(){})[_0x904b('0x2d')](_0x4825af()));break;case _0x904b('0x53'):_0x34c754[_0x904b('0x2c')](db['sequelize'][_0x904b('0x51')](_0x5ccf57(_0xc6bd78,_0x904b('0x52')))[_0x904b('0x2b')](function(){})[_0x904b('0x2d')](_0x4825af()));break;default:_0x34c754[_0x904b('0x2c')](db[_0x904b('0x50')]['query'](_0x2f572a(_0xc6bd78,'VoiceQueueId'))[_0x904b('0x2b')](function(){})[_0x904b('0x2d')](_0x4825af()));}}}return _0x34c754;})['all']()['then'](function(){return db[_0x904b('0x54')][_0x904b('0x4c')]({'where':{'type':'outbound'},'attributes':['id'],'include':[{'model':db[_0x904b('0x55')],'as':_0x904b('0x56'),'where':{'id':LISTID}}]})['then'](function(_0x9e4a3e){var _0x4a593d=[];if(_0x9e4a3e){var _0x4a2bac;for(var _0x5abdf9=0x0,_0x2cab20;_0x5abdf9<_0x9e4a3e[_0x904b('0x19')];_0x5abdf9+=0x1){_0x2cab20=_0x9e4a3e[_0x5abdf9][_0x904b('0x4f')]({'plain':!![]});_0x4a593d[_0x904b('0x2c')](db[_0x904b('0x50')][_0x904b('0x51')](_0x2bd3dc(_0x2cab20,'VoiceQueueId'))[_0x904b('0x2b')](function(){})[_0x904b('0x2d')](_0x4825af()));}}return _0x4a593d;})[_0x904b('0x57')]();})['then'](function(){return db[_0x904b('0x58')][_0x904b('0x4c')]({'attributes':['id',_0x904b('0x4e')],'include':[{'model':db[_0x904b('0x55')],'as':_0x904b('0x59'),'where':{'id':LISTID}}]})[_0x904b('0x2b')](function(_0x5e2c26){var _0x6904df=[];if(_0x5e2c26){for(var _0xd2ef5b=0x0,_0x3c9a66;_0xd2ef5b<_0x5e2c26['length'];_0xd2ef5b+=0x1){_0x3c9a66=_0x5e2c26[_0xd2ef5b][_0x904b('0x4f')]({'plain':!![]});switch(_0x3c9a66[_0x904b('0x4e')]){case _0x904b('0x5a'):_0x6904df['push'](db[_0x904b('0x50')]['query'](_0x52eccc(_0x3c9a66,_0x904b('0x5b')))[_0x904b('0x2b')](function(){})[_0x904b('0x2d')](_0x4825af()));break;case'onlyIfOpen':_0x6904df[_0x904b('0x2c')](db[_0x904b('0x50')][_0x904b('0x51')](_0x5ccf57(_0x3c9a66,_0x904b('0x5b')))[_0x904b('0x2b')](function(){})['catch'](_0x4825af()));break;default:_0x6904df['push'](db[_0x904b('0x50')][_0x904b('0x51')](_0x2f572a(_0x3c9a66,_0x904b('0x5b')))[_0x904b('0x2b')](function(){})[_0x904b('0x2d')](_0x4825af()));}}}return _0x6904df;})['all']();})[_0x904b('0x2b')](function(){return db[_0x904b('0x58')][_0x904b('0x4c')]({'attributes':['id'],'include':[{'model':db['CmList'],'as':'BlackLists','where':{'id':LISTID}}]})[_0x904b('0x2b')](function(_0x36cd8f){var _0x58beaf=[];if(_0x36cd8f){for(var _0x30f4c1=0x0,_0x161f19;_0x30f4c1<_0x36cd8f[_0x904b('0x19')];_0x30f4c1+=0x1){_0x161f19=_0x36cd8f[_0x30f4c1]['get']({'plain':!![]});_0x58beaf['push'](db['sequelize'][_0x904b('0x51')](_0x2bd3dc(_0x161f19,_0x904b('0x5b')))['then'](function(){})[_0x904b('0x2d')](_0x4825af()));}}return _0x58beaf;})[_0x904b('0x57')]();})[_0x904b('0x2d')](function(_0x5e557b){logger[_0x904b('0x15')]('cmContact,\x20%s,\x20%s',_0x904b('0x5c'),_0x5e557b[_0x904b('0x1b')]);});}var processPromises=function(_0x185872){return BPromise[_0x904b('0x57')](promises)[_0x904b('0x2b')](function(_0x5d1551){})['catch'](function(_0xb83e3d){logger[_0x904b('0x15')]('Error\x20processing\x20rows\x20block:',JSON[_0x904b('0x2f')](_0xb83e3d));})[_0x904b('0x5d')](function(){socket['emit'](_0x904b('0x5e')+SOCKET_TIMESTAMP,{'success':success,'errors':errors,'duplicates':duplicates,'rows':rows});promises=[];success=0x0;errors=0x0;duplicates=0x0;rows=[];if(_0x185872){return _0x185872[_0x904b('0x5f')]();}});};var endCsv=function(){return BPromise['resolve']()['then'](function(){if(hopperContacts){return checkHopper();}})[_0x904b('0x2b')](function(){socket[_0x904b('0x60')](_0x904b('0x5e')+SOCKET_TIMESTAMP,{'finished':!![],'success':success,'errors':errors,'duplicates':duplicates,'rows':rows});try{fs[_0x904b('0x61')](FILEPATH);}catch(_0x3f21a1){logger[_0x904b('0x15')](_0x904b('0x62'),JSON[_0x904b('0x2f')](_0x3f21a1));}finally{process[_0x904b('0x63')](0x0);}});};process['on'](_0x904b('0x64'),function(){logger[_0x904b('0x65')](_0x904b('0x66'));endCsv();});function main(){return BPromise[_0x904b('0x67')]()[_0x904b('0x2b')](function(){if(DUPLICATES){DUPLICATES=DUPLICATES['split'](',');return db['CmContact'][_0x904b('0x4c')]({'where':{'ListId':LISTID},'attributes':DUPLICATES,'raw':!![]});}})[_0x904b('0x2b')](function(_0x1674d3){var _0x470e53=fs[_0x904b('0x68')](FILEPATH,{'highWaterMark':0xf*0x400*0x400});Papa['parse'](_0x470e53,{'header':!![],'skipEmptyLines':!![],'step':function(_0x5a47d1,_0x4e5982){total+=0x1;var _0x5dbe2e=total;promises[_0x904b('0x2c')](checkRow(_0x5a47d1,_0x1674d3,_0x5dbe2e)[_0x904b('0x2b')](function(){success+=0x1;})[_0x904b('0x2d')](function(_0x354b2f){if(_0x354b2f[_0x904b('0x15')]){errors+=0x1;delete _0x354b2f['error'];}else if(_0x354b2f[_0x904b('0x27')]){duplicates+=0x1;delete _0x354b2f[_0x904b('0x27')];}rows['push'](_0x354b2f);}));if(total%0xc8===0x0){_0x4e5982[_0x904b('0x69')]();return processPromises(_0x4e5982);}},'complete':function(){return processPromises()['then'](function(){logger[_0x904b('0x65')](_0x904b('0x6a'));endCsv();});},'error':function(_0xbb54e5,_0x129c3a){logger[_0x904b('0x65')](_0x904b('0x6b'),JSON[_0x904b('0x2f')](_0xbb54e5));endCsv();}});})[_0x904b('0x2d')](function(_0x4a5710){logger['error']('Error\x20executing\x20contact\x20csv\x20import:',JSON[_0x904b('0x2f')](_0x4a5710));});}main(); \ No newline at end of file +var _0x1032=['Lists','get','always','sequelize','query','catch','onlyIfOpen','VoiceQueueId','all','VoiceQueue','CmList','Campaign','dialCheckDuplicateType','CampaignId','generalCheckHopper','Error\x20processing\x20rows\x20block:','finally','resolve','contact:csv_','unlinkSync','Unable\x20to\x20delete\x20temp\x20file:','exit','SIGINT','CSV\x20import\x20process\x20stopped!','createReadStream','duplicate','pause','info','CSV\x20parsed\x20correctly!','CSV\x20parse\x20error','Error\x20executing\x20contact\x20csv\x20import:','bluebird','util','lodash','papaparse','ioredis','../../../mysqldb','../../../config/environment','../../../config/logger','api','redis','defaults','localhost','socket.io-emitter','../../../api/cmContact/cmContact.socket','register','argv','undefined','Missing\x20filepath\x20parameter!','null','zipObject','split','Missing\x20ListId\x20parameter!','Missing\x20socket_timestamp\x20parameter!','error','contact','index','isNil','length','map','errors','data','firstName','firstName\x20not\x20specified!','phone\x20not\x20specified!','birthDate','YYYY-MM-DD','isValid','email','email\x20format\x20is\x20not\x20valid!','ListId','CompanyId','find','Duplicate\x20Contact','CmContact','create','keys','then','push','pick','Error\x20while\x20creating\x20contact:\x20','message','stringify','cmContact','inspect','insert','into','fromQuery','ContactId','createdAt','updatedAt','field','phone','NOW()','from','cm_contacts','deletedAt\x20IS\x20NULL','where','toString','phone\x20NOT\x20IN\x20(?)','cm_hopper','select','scheduledAt','ListId\x20=\x20?','id\x20IN\x20?','str','phone\x20IS\x20NOT\x20NULL','calleridnum','\x20=\x20?','cm_hopper_black','findAll'];(function(_0x1e70d1,_0x1bd4cf){var _0x151699=function(_0x110d37){while(--_0x110d37){_0x1e70d1['push'](_0x1e70d1['shift']());}};_0x151699(++_0x1bd4cf);}(_0x1032,0xfd));var _0x2103=function(_0x57fef0,_0x19e5be){_0x57fef0=_0x57fef0-0x0;var _0x2973be=_0x1032[_0x57fef0];return _0x2973be;};'use strict';var BPromise=require(_0x2103('0x0'));var util=require(_0x2103('0x1'));var _=require(_0x2103('0x2'));var fs=require('fs');var squel=require('squel');var Papa=require(_0x2103('0x3'));var Redis=require(_0x2103('0x4'));var db=require(_0x2103('0x5'))['db'];var config=require(_0x2103('0x6'));var logger=require(_0x2103('0x7'))(_0x2103('0x8'));config[_0x2103('0x9')]=_[_0x2103('0xa')](config[_0x2103('0x9')],{'host':_0x2103('0xb'),'port':0x18eb});var socket=require(_0x2103('0xc'))(new Redis(config['redis']));require(_0x2103('0xd'))[_0x2103('0xe')](socket);try{if(!process['argv'][0x2]||process[_0x2103('0xf')][0x2]===_0x2103('0x10')||process[_0x2103('0xf')][0x2]==='null'){throw new Error(_0x2103('0x11'));}var FILEPATH=process['argv'][0x2];if(!process[_0x2103('0xf')][0x3]||process[_0x2103('0xf')][0x3]===_0x2103('0x10')||process[_0x2103('0xf')][0x3]===_0x2103('0x12')||!process[_0x2103('0xf')][0x4]||process['argv'][0x4]===_0x2103('0x10')||process[_0x2103('0xf')][0x4]===_0x2103('0x12')){throw new Error('Missing\x20binding\x20parameters!');}var FIELDS=_[_0x2103('0x13')](process[_0x2103('0xf')][0x3][_0x2103('0x14')](','),process[_0x2103('0xf')][0x4]['split'](','));if(!process[_0x2103('0xf')][0x5]||process[_0x2103('0xf')][0x5]===_0x2103('0x10')||process[_0x2103('0xf')][0x5]===_0x2103('0x12')){throw new Error(_0x2103('0x15'));}var LISTID=process[_0x2103('0xf')][0x5];var COMPANYID=process['argv'][0x6]&&process['argv'][0x6]!==_0x2103('0x10')&&process[_0x2103('0xf')][0x6]!==_0x2103('0x12')?process['argv'][0x6]:null;var DUPLICATES=process[_0x2103('0xf')][0x7]&&process['argv'][0x7]!==_0x2103('0x10')&&process[_0x2103('0xf')][0x7]!=='null'?process['argv'][0x7]:null;if(!process[_0x2103('0xf')][0x8]||process[_0x2103('0xf')][0x8]==='undefined'||process[_0x2103('0xf')][0x8]===_0x2103('0x12')){throw new Error(_0x2103('0x16'));}var SOCKET_TIMESTAMP=process[_0x2103('0xf')][0x8];}catch(_0x46dc39){logger[_0x2103('0x17')](_0x46dc39);endCsv();}var total=0x0;var pTotal=0x0;var success=0x0;var errors=0x0;var duplicates=0x0;var rows=[];var hopperContacts='';var promises=[];var index=0x0;var alreadyInvalid=![];function handleCheckRowError(_0x5157b0,_0x4e18a9,_0x36242e,_0x5d82f2){var _0x29c10b={'message':_0x4e18a9};_0x29c10b[_0x5157b0]=!![];if(_0x36242e){_0x29c10b[_0x2103('0x18')]=_0x36242e;}if(_0x5d82f2){_0x29c10b[_0x2103('0x19')]=_0x5d82f2;}return _0x29c10b;}function isEmail(_0x4ece7b){return/^([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22))*\x40([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d))*$/['test'](_0x4ece7b);}function checkRow(_0x3a5c3e,_0x4f625b,_0xecef4a){return new BPromise(function(_0x2c8f02,_0x5e76f3){if(_[_0x2103('0x1a')](_0x3a5c3e)){return _0x5e76f3(handleCheckRowError(_0x2103('0x17'),'The\x20row\x20is\x20empty\x20or\x20the\x20number\x20of\x20parameters\x20does\x20not\x20match\x20the\x20columns!',null,_0xecef4a));}if(_0x3a5c3e['errors']&&_0x3a5c3e['errors'][_0x2103('0x1b')]){var _0x49f35d=_[_0x2103('0x1c')](_0x3a5c3e[_0x2103('0x1d')],'message')['join'](';');return _0x5e76f3(handleCheckRowError(_0x2103('0x17'),_0x49f35d,null,_0xecef4a));}var _0x18cf4c={};for(var _0x40def1 in FIELDS){if(FIELDS['hasOwnProperty'](_0x40def1)&&FIELDS[_0x40def1]){_0x18cf4c[_0x40def1]=_0x3a5c3e[_0x2103('0x1e')][0x0][FIELDS[_0x40def1]]||_0x3a5c3e[_0x2103('0x1e')][0x0]['\ufeff'+FIELDS[_0x40def1]];}}if(!_0x18cf4c[_0x2103('0x1f')]){return _0x5e76f3(handleCheckRowError(_0x2103('0x17'),_0x2103('0x20'),null,_0xecef4a));}if(!_0x18cf4c['phone']){return _0x5e76f3(handleCheckRowError('error',_0x2103('0x21'),null,_0xecef4a));}if(_0x18cf4c[_0x2103('0x22')]){var _0x3d6f1f=moment(_0x18cf4c['birthDate'],_0x2103('0x23'));if(!_0x3d6f1f[_0x2103('0x24')]()){return _0x5e76f3(handleCheckRowError(_0x2103('0x17'),'birthDate\x20format\x20is\x20invalid,\x20YYYY-MM-DD\x20format\x20is\x20supported!',null,_0xecef4a));}}if(_0x18cf4c[_0x2103('0x25')]){if(!isEmail(_0x18cf4c['email'])){return _0x5e76f3(handleCheckRowError(_0x2103('0x17'),_0x2103('0x26'),null,_0xecef4a));}}_0x18cf4c[_0x2103('0x27')]=LISTID;_0x18cf4c[_0x2103('0x28')]=COMPANYID||undefined;if(DUPLICATES&&DUPLICATES['length']&&_0x4f625b){var _0x3945bd={};for(var _0x57c15c=0x0,_0x1ea743=DUPLICATES[_0x2103('0x1b')];_0x57c15c<_0x1ea743;_0x57c15c+=0x1){_0x3945bd[DUPLICATES[_0x57c15c]]=_0x18cf4c[DUPLICATES[_0x57c15c]];}var _0x3367e7=_[_0x2103('0x29')](_0x4f625b,_0x3945bd);if(_0x3367e7){return _0x5e76f3(handleCheckRowError('duplicate',_0x2103('0x2a'),_0x3367e7,_0xecef4a));}}return db[_0x2103('0x2b')][_0x2103('0x2c')](_0x18cf4c,{'raw':!![],'hooks':![],'fields':_[_0x2103('0x2d')](_0x18cf4c)})[_0x2103('0x2e')](function(_0x1929ca){if(DUPLICATES&&DUPLICATES[_0x2103('0x1b')]&&_0x4f625b){_0x4f625b[_0x2103('0x2f')](_[_0x2103('0x30')](_0x18cf4c,DUPLICATES));}hopperContacts+=(hopperContacts?',':'')+_0x1929ca['id'];return _0x2c8f02();})['catch'](function(_0x5a5d6d){return _0x5e76f3(handleCheckRowError(_0x2103('0x17'),_0x2103('0x31')+(_0x5a5d6d[_0x2103('0x32')]||JSON[_0x2103('0x33')](_0x5a5d6d)),null,_0xecef4a));});});}function checkHopper(){function _0x60ae37(){return function(_0x132e4a){logger[_0x2103('0x17')](_0x2103('0x34'),'checkHopper',util[_0x2103('0x35')](_0x132e4a,{'showHidden':![],'depth':null}));};}var _0x35f669=function(_0xac06ee,_0xee9af0){var _0xc81e74=squel[_0x2103('0x36')]()[_0x2103('0x37')]('cm_hopper')[_0x2103('0x38')](['phone','scheduledAt',_0x2103('0x39'),_0x2103('0x27'),_0xee9af0,_0x2103('0x3a'),_0x2103('0x3b')],squel['select']()[_0x2103('0x3c')](_0x2103('0x3d'),'phone')[_0x2103('0x3c')](_0x2103('0x3e'),'scheduledAt')[_0x2103('0x3c')]('id','ContactId')[_0x2103('0x3c')](LISTID['toString'](),'ListId')[_0x2103('0x3c')](_0xac06ee['id']['toString'](),_0xee9af0)[_0x2103('0x3c')](_0x2103('0x3e'),'createdAt')[_0x2103('0x3c')](_0x2103('0x3e'),_0x2103('0x3b'))[_0x2103('0x3f')](_0x2103('0x40'))['where'](_0x2103('0x41'))[_0x2103('0x42')]('ListId\x20=\x20?',LISTID[_0x2103('0x43')]())['where']('phone\x20IS\x20NOT\x20NULL')[_0x2103('0x42')](_0x2103('0x44'),squel['select']()[_0x2103('0x3c')](_0x2103('0x3d'))['from'](_0x2103('0x45'))[_0x2103('0x42')](_0xee9af0+'\x20=\x20?',_0xac06ee['id']['toString']())))['toString']();return _0xc81e74;};var _0x375791=function(_0x55e905,_0x2ff438){var _0x5b0017=squel[_0x2103('0x36')]()['into'](_0x2103('0x45'))['fromQuery']([_0x2103('0x3d'),'scheduledAt','ContactId','ListId',_0x2ff438,_0x2103('0x3a'),'updatedAt'],squel[_0x2103('0x46')]()[_0x2103('0x3c')](_0x2103('0x3d'),_0x2103('0x3d'))['field'](_0x2103('0x3e'),_0x2103('0x47'))['field']('id',_0x2103('0x39'))[_0x2103('0x3c')](LISTID['toString'](),_0x2103('0x27'))['field'](_0x55e905['id'][_0x2103('0x43')](),_0x2ff438)['field'](_0x2103('0x3e'),_0x2103('0x3a'))[_0x2103('0x3c')](_0x2103('0x3e'),'updatedAt')['from']('cm_contacts')[_0x2103('0x42')](_0x2103('0x41'))[_0x2103('0x42')](_0x2103('0x48'),LISTID[_0x2103('0x43')]())[_0x2103('0x42')](_0x2103('0x49'),squel[_0x2103('0x4a')](hopperContacts))['where'](_0x2103('0x4b'))['where'](_0x2103('0x44'),squel[_0x2103('0x46')]()[_0x2103('0x3c')](_0x2103('0x4c'))[_0x2103('0x3f')]('cm_hopper_final')[_0x2103('0x42')](_0x2ff438+_0x2103('0x4d'),_0x55e905['id'][_0x2103('0x43')]()))[_0x2103('0x42')]('phone\x20NOT\x20IN\x20(?)',squel[_0x2103('0x46')]()[_0x2103('0x3c')](_0x2103('0x3d'))[_0x2103('0x3f')](_0x2103('0x45'))[_0x2103('0x42')](_0x2ff438+_0x2103('0x4d'),_0x55e905['id'][_0x2103('0x43')]())))[_0x2103('0x43')]();return _0x5b0017;};function _0x10b984(_0x1cf73d,_0x3e8496){var _0x59cca6=squel['insert']()[_0x2103('0x37')](_0x2103('0x45'))['fromQuery']([_0x2103('0x3d'),_0x2103('0x47'),_0x2103('0x39'),'ListId',_0x3e8496,_0x2103('0x3a'),_0x2103('0x3b')],squel['select']()['field'](_0x2103('0x3d'),_0x2103('0x3d'))[_0x2103('0x3c')](_0x2103('0x3e'),_0x2103('0x47'))[_0x2103('0x3c')]('id',_0x2103('0x39'))[_0x2103('0x3c')](LISTID[_0x2103('0x43')](),_0x2103('0x27'))[_0x2103('0x3c')](_0x1cf73d['id'][_0x2103('0x43')](),_0x3e8496)['field'](_0x2103('0x3e'),_0x2103('0x3a'))[_0x2103('0x3c')](_0x2103('0x3e'),'updatedAt')[_0x2103('0x3f')](_0x2103('0x40'))[_0x2103('0x42')](_0x2103('0x41'))[_0x2103('0x42')](_0x2103('0x48'),LISTID[_0x2103('0x43')]())[_0x2103('0x42')](_0x2103('0x49'),squel[_0x2103('0x4a')](hopperContacts))[_0x2103('0x42')](_0x2103('0x4b')))['toString']();return _0x59cca6;}function _0x45cf87(_0x49e89d,_0x352e15){var _0x4e3215=squel['insert']()[_0x2103('0x37')](_0x2103('0x4e'))[_0x2103('0x38')](['phone',_0x2103('0x39'),_0x2103('0x27'),_0x352e15,_0x2103('0x3a'),_0x2103('0x3b')],squel[_0x2103('0x46')]()[_0x2103('0x3c')]('phone','phone')['field']('id','ContactId')['field'](LISTID[_0x2103('0x43')](),_0x2103('0x27'))[_0x2103('0x3c')](_0x49e89d['id'][_0x2103('0x43')](),_0x352e15)[_0x2103('0x3c')](_0x2103('0x3e'),_0x2103('0x3a'))[_0x2103('0x3c')](_0x2103('0x3e'),_0x2103('0x3b'))[_0x2103('0x3f')](_0x2103('0x40'))[_0x2103('0x42')](_0x2103('0x41'))[_0x2103('0x42')](_0x2103('0x48'),LISTID[_0x2103('0x43')]())['where'](_0x2103('0x49'),squel[_0x2103('0x4a')](hopperContacts))[_0x2103('0x42')](_0x2103('0x4b')))[_0x2103('0x43')]();return _0x4e3215;}return db['VoiceQueue'][_0x2103('0x4f')]({'where':{'type':'outbound'},'attributes':['id','dialCheckDuplicateType'],'include':[{'model':db['CmList'],'as':_0x2103('0x50'),'where':{'id':LISTID}}]})[_0x2103('0x2e')](function(_0x4f4761){var _0x253b97=[];if(_0x4f4761){var _0x25b97d;for(var _0x4614da=0x0,_0x3bdc55;_0x4614da<_0x4f4761['length'];_0x4614da+=0x1){_0x3bdc55=_0x4f4761[_0x4614da][_0x2103('0x51')]({'plain':!![]});switch(_0x3bdc55['dialCheckDuplicateType']){case _0x2103('0x52'):_0x253b97['push'](db[_0x2103('0x53')][_0x2103('0x54')](_0x375791(_0x3bdc55,'VoiceQueueId'))['then'](function(){})[_0x2103('0x55')](_0x60ae37()));break;case _0x2103('0x56'):_0x253b97[_0x2103('0x2f')](db['sequelize'][_0x2103('0x54')](_0x35f669(_0x3bdc55,_0x2103('0x57')))['then'](function(){})[_0x2103('0x55')](_0x60ae37()));break;default:_0x253b97[_0x2103('0x2f')](db[_0x2103('0x53')][_0x2103('0x54')](_0x10b984(_0x3bdc55,'VoiceQueueId'))[_0x2103('0x2e')](function(){})[_0x2103('0x55')](_0x60ae37()));}}}return _0x253b97;})[_0x2103('0x58')]()[_0x2103('0x2e')](function(){return db[_0x2103('0x59')]['findAll']({'where':{'type':'outbound'},'attributes':['id'],'include':[{'model':db[_0x2103('0x5a')],'as':'BlackLists','where':{'id':LISTID}}]})['then'](function(_0x487526){var _0x55a5d5=[];if(_0x487526){var _0x3496f8;for(var _0x3fdbb7=0x0,_0x58cf5d;_0x3fdbb7<_0x487526[_0x2103('0x1b')];_0x3fdbb7+=0x1){_0x58cf5d=_0x487526[_0x3fdbb7][_0x2103('0x51')]({'plain':!![]});_0x55a5d5[_0x2103('0x2f')](db[_0x2103('0x53')][_0x2103('0x54')](_0x45cf87(_0x58cf5d,_0x2103('0x57')))[_0x2103('0x2e')](function(){})[_0x2103('0x55')](_0x60ae37()));}}return _0x55a5d5;})['all']();})[_0x2103('0x2e')](function(){return db[_0x2103('0x5b')][_0x2103('0x4f')]({'attributes':['id',_0x2103('0x5c')],'include':[{'model':db[_0x2103('0x5a')],'as':_0x2103('0x50'),'where':{'id':LISTID}}]})[_0x2103('0x2e')](function(_0x5288c4){var _0x3e5cf8=[];if(_0x5288c4){for(var _0x4e7ab3=0x0,_0x2f6783;_0x4e7ab3<_0x5288c4['length'];_0x4e7ab3+=0x1){_0x2f6783=_0x5288c4[_0x4e7ab3]['get']({'plain':!![]});switch(_0x2f6783[_0x2103('0x5c')]){case _0x2103('0x52'):_0x3e5cf8[_0x2103('0x2f')](db[_0x2103('0x53')]['query'](_0x375791(_0x2f6783,_0x2103('0x5d')))['then'](function(){})[_0x2103('0x55')](_0x60ae37()));break;case _0x2103('0x56'):_0x3e5cf8[_0x2103('0x2f')](db[_0x2103('0x53')][_0x2103('0x54')](_0x35f669(_0x2f6783,_0x2103('0x5d')))['then'](function(){})[_0x2103('0x55')](_0x60ae37()));break;default:_0x3e5cf8['push'](db[_0x2103('0x53')][_0x2103('0x54')](_0x10b984(_0x2f6783,_0x2103('0x5d')))[_0x2103('0x2e')](function(){})['catch'](_0x60ae37()));}}}return _0x3e5cf8;})[_0x2103('0x58')]();})['then'](function(){return db[_0x2103('0x5b')][_0x2103('0x4f')]({'attributes':['id'],'include':[{'model':db['CmList'],'as':'BlackLists','where':{'id':LISTID}}]})[_0x2103('0x2e')](function(_0x56d59e){var _0x3749e1=[];if(_0x56d59e){for(var _0x5a553b=0x0,_0x7c3698;_0x5a553b<_0x56d59e[_0x2103('0x1b')];_0x5a553b+=0x1){_0x7c3698=_0x56d59e[_0x5a553b][_0x2103('0x51')]({'plain':!![]});_0x3749e1[_0x2103('0x2f')](db[_0x2103('0x53')][_0x2103('0x54')](_0x45cf87(_0x7c3698,'CampaignId'))[_0x2103('0x2e')](function(){})['catch'](_0x60ae37()));}}return _0x3749e1;})[_0x2103('0x58')]();})[_0x2103('0x55')](function(_0x2c099d){logger[_0x2103('0x17')]('cmContact,\x20%s,\x20%s',_0x2103('0x5e'),_0x2c099d[_0x2103('0x32')]);});}var processPromises=function(_0x257046){return BPromise['all'](promises)[_0x2103('0x2e')](function(_0x3d5ee6){})[_0x2103('0x55')](function(_0x1409aa){logger[_0x2103('0x17')](_0x2103('0x5f'),JSON[_0x2103('0x33')](_0x1409aa));})[_0x2103('0x60')](function(){socket['emit']('contact:csv_'+SOCKET_TIMESTAMP,{'success':success,'errors':errors,'duplicates':duplicates,'rows':rows});promises=[];success=0x0;errors=0x0;duplicates=0x0;rows=[];if(_0x257046){return _0x257046['resume']();}});};var endCsv=function(){return BPromise[_0x2103('0x61')]()['then'](function(){if(hopperContacts){return checkHopper();}})[_0x2103('0x2e')](function(){socket['emit'](_0x2103('0x62')+SOCKET_TIMESTAMP,{'finished':!![],'success':success,'errors':errors,'duplicates':duplicates,'rows':rows});try{fs[_0x2103('0x63')](FILEPATH);}catch(_0x9a5d1c){logger[_0x2103('0x17')](_0x2103('0x64'),JSON[_0x2103('0x33')](_0x9a5d1c));}finally{process[_0x2103('0x65')](0x0);}});};process['on'](_0x2103('0x66'),function(){logger['info'](_0x2103('0x67'));endCsv();});function main(){return BPromise[_0x2103('0x61')]()['then'](function(){if(DUPLICATES){DUPLICATES=DUPLICATES[_0x2103('0x14')](',');return db[_0x2103('0x2b')][_0x2103('0x4f')]({'where':{'ListId':LISTID},'attributes':DUPLICATES,'raw':!![]});}})[_0x2103('0x2e')](function(_0x520bac){var _0x4104ab=fs[_0x2103('0x68')](FILEPATH,{'highWaterMark':0xf*0x400*0x400});Papa['parse'](_0x4104ab,{'header':!![],'skipEmptyLines':!![],'step':function(_0x3aa391,_0x3213d8){total+=0x1;var _0xd24491=total;promises[_0x2103('0x2f')](checkRow(_0x3aa391,_0x520bac,_0xd24491)['then'](function(){success+=0x1;})[_0x2103('0x55')](function(_0x361daa){if(_0x361daa[_0x2103('0x17')]){errors+=0x1;delete _0x361daa[_0x2103('0x17')];}else if(_0x361daa[_0x2103('0x69')]){duplicates+=0x1;delete _0x361daa['duplicate'];}rows[_0x2103('0x2f')](_0x361daa);}));if(total%0xc8===0x0){_0x3213d8[_0x2103('0x6a')]();return processPromises(_0x3213d8);}},'complete':function(){return processPromises()[_0x2103('0x2e')](function(){logger[_0x2103('0x6b')](_0x2103('0x6c'));endCsv();});},'error':function(_0x3ca218,_0x521909){logger[_0x2103('0x6b')](_0x2103('0x6d'),JSON['stringify'](_0x3ca218));endCsv();}});})[_0x2103('0x55')](function(_0x29a791){logger[_0x2103('0x17')](_0x2103('0x6e'),JSON[_0x2103('0x33')](_0x29a791));});}main(); \ No newline at end of file diff --git a/server/components/import/cm/csv2.js b/server/components/import/cm/csv2.js index b52c1af..7d57840 100644 --- a/server/components/import/cm/csv2.js +++ b/server/components/import/cm/csv2.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe3ac=[')\x20NOT\x20IN\x20?','ListId\x20=\x20?','deletedAt\x20IS\x20NULL','min_id','group','info','error','exit','errors','push','code','sequelize','query','spread','message','main','stringify','send','socket_timestamp','root','server/files/tmp','.csv','header','writeFileSync','parse','createReadStream','length','data','hasOwnProperty','trim','replace','scheduledat','isNumber','includes','agent\x20not\x20exists','email','email\x20wrong\x20format','dateOfBirth','YYYY-MM-DD','isValid','dateOfBirth\x20wrong\x20format\x20(YYYY-MM-DD)','\x20not\x20specified','SystemRow','appendFileSync','rows','emit','Abort\x20parser','abort','SystemError','step','duplicates','cm_contacts_','CREATE\x20TABLE\x20','LOAD\x20DATA\x20LOCAL\x20INFILE\x20\x27%s\x27\x20INTO\x20TABLE\x20%s\x20CHARACTER\x20SET\x20UTF8\x20FIELDS\x20TERMINATED\x20BY\x20\x27,\x27\x20ENCLOSED\x20BY\x20\x27\x22\x27\x20LINES\x20TERMINATED\x20BY\x20\x27\x0a\x27\x20IGNORE\x201\x20ROWS\x20(%s)\x20SET\x20id\x20=\x20NULL,\x20ListId\x20=\x20%s,\x20CompanyId\x20=\x20%s,\x20createdAt\x20=\x20\x27%s\x27,\x20updatedAt\x20=\x20\x27%s\x27','isNil',',\x20scheduledAt\x20=\x20NOW()','voice_queues_has_cm_lists','voice_queues','VoiceQueueId','voice_queues_has_cm_blacklists','campaigns_has_cm_blacklists','campaigns','CampaignId','each','then','finish','affectedRows','unlink','complete','argv','arguments\x20\x20\x20','existsSync','file\x20doesn\x27t\x20exists','binding\x20doesn\x27t\x20exists','binding','firstName','firstName\x20is\x20mandatory','ListId\x20is\x20mandatory','body\x20id\x20mandatory','map','SIGINT','path','lodash','bluebird','moment','ioredis','../../../mysqldb','../../../config/environment','../../../config/logger','import','redis','defaults','localhost','socket.io-emitter','format','YYYY-MM-DD\x20HH:mm:ss','test','field','phone','from','join','.id\x20=\x20','where','\x20=\x20','.dialCheckDuplicateType\x20IN\x20(','cm_contacts.phone','cm_contacts.scheduledat','cm_contacts.ListId','cm_contacts.createdAt','cm_contacts.UserId','insert','into','cm_hopper','fromQuery','ContactId','ListId','createdAt','updatedAt','UserId','recallme','select','fields','cm_contacts','cm_contacts.ListId\x20=\x20','.CmListId','cm_contacts.createdAt\x20=\x20?','cm_contacts.phone\x20NOT\x20IN\x20(?)','\x22onlyIfOpen\x22','\x22always\x22','toString','cm_contacts.id','cm_contacts.updatedAt','cm_hopper_black','.CmListId\x20=\x20?','\x20=\x20?','concat','keys'];(function(_0x2a308d,_0x521487){var _0x57c47a=function(_0x1305fb){while(--_0x1305fb){_0x2a308d['push'](_0x2a308d['shift']());}};_0x57c47a(++_0x521487);}(_0xe3ac,0x1ec));var _0xce3a=function(_0x49cfb3,_0x244375){_0x49cfb3=_0x49cfb3-0x0;var _0x4a30a3=_0xe3ac[_0x49cfb3];return _0x4a30a3;};'use strict';var fs=require('fs');var path=require(_0xce3a('0x0'));var _=require(_0xce3a('0x1'));var Papa=require('papaparse');var util=require('util');var BPromise=require(_0xce3a('0x2'));var moment=require(_0xce3a('0x3'));var squel=require('squel');var Redis=require(_0xce3a('0x4'));var db=require(_0xce3a('0x5'))['db'];var config=require(_0xce3a('0x6'));var logger=require(_0xce3a('0x7'))(_0xce3a('0x8'));config[_0xce3a('0x9')]=_[_0xce3a('0xa')](config[_0xce3a('0x9')],{'host':_0xce3a('0xb'),'port':0x18eb});var socket=require(_0xce3a('0xc'))(new Redis(config['redis']));var stats={'finish':![],'errors':[],'rows':0x0,'affectedRows':0x0};var results=[];var stopped=![];var NOW=moment()[_0xce3a('0xd')](_0xce3a('0xe'));function isEmail(_0x4be212){return/^([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22))*\x40([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d))*$/[_0xce3a('0xf')](_0x4be212);}function selectNotIn(_0x599c2b,_0x2ae333,_0xa02c65,_0x4687c5,_0x69fbba){return squel['select']()[_0xce3a('0x10')](_0xce3a('0x11'))[_0xce3a('0x12')](_0x4687c5)[_0xce3a('0x13')](_0x2ae333,null,_0x2ae333+_0xce3a('0x14')+_0x4687c5+'.'+_0xa02c65)[_0xce3a('0x15')](_0x4687c5+'.'+_0xa02c65+_0xce3a('0x16')+_0x599c2b+'.'+_0xa02c65)[_0xce3a('0x15')](_0x2ae333+_0xce3a('0x17')+_0x69fbba['join']()+')');}function insertCmHopper(_0x199b01,_0x434e29,_0x3dc8c6,_0x561817,_0x4cd2e2){var _0x19e6e2=[_0xce3a('0x18'),_0xce3a('0x19'),'cm_contacts.id',_0xce3a('0x1a'),_0x434e29+'.'+_0x561817,_0xce3a('0x1b'),'cm_contacts.updatedAt','cm_contacts.priority',_0xce3a('0x1c'),'\x22'+_0x4cd2e2+'\x22'];return squel[_0xce3a('0x1d')]()[_0xce3a('0x1e')](_0xce3a('0x1f'))[_0xce3a('0x20')]([_0xce3a('0x11'),'scheduledat',_0xce3a('0x21'),_0xce3a('0x22'),_0x561817,_0xce3a('0x23'),_0xce3a('0x24'),'priority',_0xce3a('0x25'),_0xce3a('0x26')],squel[_0xce3a('0x27')]()[_0xce3a('0x28')](_0x19e6e2)[_0xce3a('0x12')](_0x434e29)['join'](_0xce3a('0x29'),null,_0xce3a('0x2a')+_0x434e29+_0xce3a('0x2b'))[_0xce3a('0x13')](_0x3dc8c6,null,_0x3dc8c6+_0xce3a('0x14')+_0x434e29+'.'+_0x561817)[_0xce3a('0x15')](_0x434e29+'.CmListId\x20=\x20?',_0x199b01)['where'](_0xce3a('0x2c'),NOW)['where'](_0xce3a('0x2d'),selectNotIn(_0x434e29,_0x3dc8c6,_0x561817,_0xce3a('0x1f'),['\x22always\x22',_0xce3a('0x2e')]))[_0xce3a('0x15')](_0xce3a('0x2d'),selectNotIn(_0x434e29,_0x3dc8c6,_0x561817,_0xce3a('0x1f'),[_0xce3a('0x2f')])))[_0xce3a('0x30')]();}function insertCmHopperBlack(_0x4f9b1b,_0x3c27ad,_0x5eac43,_0xa813c5){var _0x168d92=[_0xce3a('0x18'),_0xce3a('0x31'),_0xce3a('0x1a'),_0x3c27ad+'.'+_0xa813c5,_0xce3a('0x1b'),_0xce3a('0x32')];return squel[_0xce3a('0x1d')]()[_0xce3a('0x1e')](_0xce3a('0x33'))[_0xce3a('0x20')]([_0xce3a('0x11'),_0xce3a('0x21'),_0xce3a('0x22'),_0xa813c5,_0xce3a('0x23'),_0xce3a('0x24')],squel[_0xce3a('0x27')]()[_0xce3a('0x28')](_0x168d92)['from'](_0x3c27ad)['join'](_0xce3a('0x29'),null,_0xce3a('0x2a')+_0x3c27ad+_0xce3a('0x2b'))[_0xce3a('0x13')](_0x5eac43,null,_0x5eac43+_0xce3a('0x14')+_0x3c27ad+'.'+_0xa813c5)['where'](_0x3c27ad+_0xce3a('0x34'),_0x4f9b1b)[_0xce3a('0x15')](_0xce3a('0x2c'),NOW)[_0xce3a('0x15')](_0xce3a('0x2d'),squel['select']()['field'](_0xce3a('0x11'))[_0xce3a('0x12')](_0xce3a('0x33'))[_0xce3a('0x15')]('ListId\x20=\x20?',_0x4f9b1b)['where'](_0xa813c5+_0xce3a('0x35'),_0x3c27ad+'.'+_0xa813c5)))[_0xce3a('0x30')]();}function insertCmContact(_0x406403,_0x68c0e0,_0xf2bb87,_0x519b04){var _0x1e600c=_[_0xce3a('0x36')](_[_0xce3a('0x37')](_0x519b04),[_0xce3a('0x22'),'CompanyId',_0xce3a('0x23'),_0xce3a('0x24')]);return squel['insert']()[_0xce3a('0x1e')](_0xce3a('0x29'))['fromQuery'](_0x1e600c,squel['select']()[_0xce3a('0x28')](_0x1e600c)[_0xce3a('0x12')](_0x68c0e0)[_0xce3a('0x15')]('('+_0xf2bb87[_0xce3a('0x13')](',')+_0xce3a('0x38'),squel['select']()[_0xce3a('0x28')](_0xf2bb87)[_0xce3a('0x12')](_0xce3a('0x29'))[_0xce3a('0x15')](_0xce3a('0x39'),_0x406403)['where'](_0xce3a('0x3a')))['where']('id\x20IN\x20?',squel['select']()[_0xce3a('0x10')]('MIN(id)',_0xce3a('0x3b'))[_0xce3a('0x12')](_0x68c0e0)[_0xce3a('0x3c')](_0xf2bb87[_0xce3a('0x13')](','))))['toString']();}function handleStop(){logger[_0xce3a('0x3d')]('Received\x20SIGINT');stopped=!![];}function handleUncaughtException(_0x2e2e4b){logger[_0xce3a('0x3e')](_0x2e2e4b['message']);process[_0xce3a('0x3f')](0x1);}function handleError(_0x349480,_0xed04ac){stats[_0xce3a('0x40')][_0xce3a('0x41')]({'name':_0xed04ac[_0xce3a('0x42')],'message':_0xed04ac['message'],'row':_0x349480});}function handleQuery(_0x38cbe2){logger[_0xce3a('0x3d')](_0x38cbe2);return db[_0xce3a('0x43')][_0xce3a('0x44')](_0x38cbe2)[_0xce3a('0x45')](function(_0x3414d3){results[_0xce3a('0x41')](_0x3414d3);})['catch'](function(_0x2cbab4){logger[_0xce3a('0x3e')](_0x2cbab4[_0xce3a('0x46')]);});}function main(_0x43bced,_0x261e91,_0x3fabe2,_0x2e0fe4){logger[_0xce3a('0x3d')](_0xce3a('0x47'),_0x43bced,JSON[_0xce3a('0x48')](_0x261e91));process[_0xce3a('0x49')]('start');var _0x2d8cd7=_0x261e91['binding'];var _0x54b49b=_0x261e91[_0xce3a('0x4a')];var _0x1e5da4=path[_0xce3a('0x13')](config[_0xce3a('0x4b')],_0xce3a('0x4c'),_0x54b49b+_0xce3a('0x4d'));var _0x17de75=_['keys'](_0x2d8cd7)['join']();logger[_0xce3a('0x3d')](_0xce3a('0x4e'),_0x17de75);fs[_0xce3a('0x4f')](_0x1e5da4,_0x17de75+'\x0a');Papa[_0xce3a('0x50')](fs[_0xce3a('0x51')](_0x43bced),{'header':!![],'skipEmptyLines':!![],'step':function(_0xd376fc,_0x2c15ab){try{for(var _0x1b4377=0x0,_0x34adcb=[];_0x1b4377<_0xd376fc['data'][_0xce3a('0x52')];_0x1b4377++){stats['rows']+=0x1;if(_0xd376fc[_0xce3a('0x40')][_0x1b4377]){handleError(_0xd376fc[_0xce3a('0x53')][_0x1b4377],_0xd376fc['errors'][_0x1b4377]);}else{var _0xdbb6f3=[];for(var _0x2471f9 in _0x2d8cd7){if(_0x2d8cd7[_0xce3a('0x54')](_0x2471f9)){if(_0xd376fc[_0xce3a('0x53')][_0x1b4377][_0x2d8cd7[_0x2471f9]]){var _0x214f62=_[_0xce3a('0x55')](_0xd376fc[_0xce3a('0x53')][_0x1b4377][_0x2d8cd7[_0x2471f9]][_0xce3a('0x56')](/"/g,'\x27'));switch(_0x2471f9){case _0xce3a('0x57'):var _0x5abd1a=moment(_0x214f62,_0xce3a('0xe'),!![]);if(_0x5abd1a['isValid']()){_0x34adcb[_0xce3a('0x41')]('\x22'+_0x214f62+'\x22');}else{_0xdbb6f3[_0xce3a('0x41')]('scheduledat\x20wrong\x20format\x20(YYYY-MM-DD\x20HH:mm:ss)');}break;case'priority':var _0x30d3b0=parseInt(_0x214f62);_0x214f62=_['isNaN'](_0x30d3b0)||_0x30d3b0<0x0||_0x30d3b0>0x4?_0x2e0fe4?0x3:0x2:_0x30d3b0;_0x34adcb['push']('\x22'+_0x214f62+'\x22');break;case'UserId':var _0x2665b7=parseInt(_0x214f62);if(_[_0xce3a('0x58')](_0x2665b7)&&_[_0xce3a('0x59')](_0x3fabe2,_0x2665b7)){_0x34adcb[_0xce3a('0x41')]('\x22'+_0x2665b7+'\x22');}else{_0xdbb6f3[_0xce3a('0x41')](_0xce3a('0x5a'));}break;case _0xce3a('0x5b'):if(isEmail(_0x214f62)){_0x34adcb[_0xce3a('0x41')]('\x22'+_0x214f62+'\x22');}else{_0xdbb6f3['push'](_0xce3a('0x5c'));}break;case _0xce3a('0x5d'):var _0x5849e4=moment(_0x214f62,_0xce3a('0x5e'),!![]);if(_0x5849e4[_0xce3a('0x5f')]()){_0x34adcb[_0xce3a('0x41')]('\x22'+_0x214f62+'\x22');}else{_0xdbb6f3[_0xce3a('0x41')](_0xce3a('0x60'));}break;default:_0x34adcb[_0xce3a('0x41')]('\x22'+_0x214f62+'\x22');}}else{switch(_0x2471f9){case'firstName':case _0xce3a('0x11'):_0xdbb6f3[_0xce3a('0x41')](_0x2471f9+_0xce3a('0x61'));break;default:_0x34adcb[_0xce3a('0x41')]('\x22\x22');}}}}if(_0xdbb6f3['length']){handleError(_0xd376fc['data'][_0x1b4377],{'code':_0xce3a('0x62'),'message':_0xdbb6f3[_0xce3a('0x13')]()});}else{fs[_0xce3a('0x63')](_0x1e5da4,_0x34adcb[_0xce3a('0x13')]()+'\x0a');}_0x34adcb=[];}if(!(stats[_0xce3a('0x64')]%0xc8)){socket[_0xce3a('0x65')]('contact:import:'+_0x54b49b,stats);stats[_0xce3a('0x40')]=[];}}if(stopped){logger[_0xce3a('0x3d')](_0xce3a('0x66'));_0x2c15ab[_0xce3a('0x67')]();}}catch(_0x358380){handleError(_0xd376fc[_0xce3a('0x53')][_0x1b4377],{'code':_0xce3a('0x68'),'message':_0x358380[_0xce3a('0x46')]});logger[_0xce3a('0x3e')](_0xce3a('0x69'),_0x358380['message']);}},'complete':function(){try{var _0x35bb51=[];var _0x4821a4=_0xce3a('0x29');if(_0x261e91[_0xce3a('0x6a')]&&_0x261e91[_0xce3a('0x6a')]['length']){_0x4821a4=_0xce3a('0x6b')+_0x54b49b;_0x35bb51['push'](_0xce3a('0x6c')+_0x4821a4+'\x20LIKE\x20cm_contacts;');}var _0x317bde=util[_0xce3a('0xd')](_0xce3a('0x6d'),_0x1e5da4,_0x4821a4,_0x17de75,_0x261e91[_0xce3a('0x22')],_0x261e91['CompanyId']||null,NOW,NOW);if(_[_0xce3a('0x6e')](_0x2d8cd7['scheduledat'])){_0x317bde+=_0xce3a('0x6f');}_0x35bb51[_0xce3a('0x41')](_0x317bde);if(_0x261e91['duplicates']&&_0x261e91[_0xce3a('0x6a')][_0xce3a('0x52')]){_0x35bb51[_0xce3a('0x41')](insertCmContact(_0x261e91['ListId'],_0x4821a4,_0x261e91['duplicates'],_0x2d8cd7));_0x35bb51[_0xce3a('0x41')]('DROP\x20TABLE\x20'+_0x4821a4+';');}_0x35bb51[_0xce3a('0x41')](insertCmHopper(_0x261e91[_0xce3a('0x22')],_0xce3a('0x70'),_0xce3a('0x71'),_0xce3a('0x72'),_0x2e0fe4));_0x35bb51['push'](insertCmHopperBlack(_0x261e91[_0xce3a('0x22')],_0xce3a('0x73'),_0xce3a('0x71'),_0xce3a('0x72')));_0x35bb51[_0xce3a('0x41')](insertCmHopper(_0x261e91[_0xce3a('0x22')],'campaigns_has_cm_lists','campaigns','CampaignId',_0x2e0fe4));_0x35bb51['push'](insertCmHopperBlack(_0x261e91['ListId'],_0xce3a('0x74'),_0xce3a('0x75'),_0xce3a('0x76')));BPromise[_0xce3a('0x77')](_0x35bb51,handleQuery)[_0xce3a('0x78')](function(_0x1f6e38){stats[_0xce3a('0x79')]=!![];stats[_0xce3a('0x7a')]=_0x261e91[_0xce3a('0x6a')]&&_0x261e91[_0xce3a('0x6a')][_0xce3a('0x52')]?results[0x2]['affectedRows']:results[0x0][_0xce3a('0x7a')];socket[_0xce3a('0x65')]('contact:import:'+_0x54b49b,stats);fs[_0xce3a('0x7b')](_0x43bced);fs[_0xce3a('0x7b')](_0x1e5da4);process[_0xce3a('0x3f')](0x0);})['catch'](function(_0x75efd4){logger['error'](_0x75efd4[_0xce3a('0x46')]);process[_0xce3a('0x3f')](0x1);});}catch(_0x2b7875){logger[_0xce3a('0x3e')](_0xce3a('0x7c'),_0x2b7875[_0xce3a('0x46')]);process[_0xce3a('0x3f')](0x1);}},'error':function(_0x7557,_0x4a1b0e,_0x1705f1,_0x2dc302){throw new Error(_0x2dc302);}});}function validate(){if(process['argv']&&process[_0xce3a('0x7d')][_0xce3a('0x52')]<0x4){throw new Error(_0xce3a('0x7e'));}var _0x11686a=path[_0xce3a('0x13')](config[_0xce3a('0x4b')],_0xce3a('0x4c'),process[_0xce3a('0x7d')][0x2]);if(!fs[_0xce3a('0x7f')](_0x11686a)){throw new Error(_0xce3a('0x80'));}var _0xfdbd17={};try{_0xfdbd17=JSON['parse'](process['argv'][0x3]);if(!_0xfdbd17['binding']){throw new Error(_0xce3a('0x81'));}if(!_0xfdbd17[_0xce3a('0x82')][_0xce3a('0x11')]){throw new Error('phone\x20is\x20mandatory');}if(!_0xfdbd17['binding'][_0xce3a('0x83')]){throw new Error(_0xce3a('0x84'));}var _0x308615=0x0;if(_0xfdbd17[_0xce3a('0x82')][_0xce3a('0x25')]){_0x308615=0x1;}if(!_0xfdbd17[_0xce3a('0x22')]){throw new Error(_0xce3a('0x85'));}}catch(_0x4c4bba){throw new Error(_0xce3a('0x86'));}var _0x394595=[];try{_0x394595=_[_0xce3a('0x87')](JSON[_0xce3a('0x50')](process[_0xce3a('0x7d')][0x4]),'id');}catch(_0x550475){logger[_0xce3a('0x3d')]('No\x20agent\x20available');}main(_0x11686a,_0xfdbd17,_0x394595,_0x308615);}validate();process['on'](_0xce3a('0x88'),handleStop);process['on']('uncaughtException',handleUncaughtException); \ No newline at end of file +var _0x113d=['scheduledat',',\x20scheduledAt\x20=\x20NOW()','DROP\x20TABLE\x20','voice_queues_has_cm_lists','voice_queues','VoiceQueueId','voice_queues_has_cm_blacklists','campaigns_has_cm_lists','campaigns','CampaignId','campaigns_has_cm_blacklists','each','then','finish','affectedRows','unlink','complete','argv','arguments\x20\x20\x20','file\x20doesn\x27t\x20exists','parse','binding\x20doesn\x27t\x20exists','phone\x20is\x20mandatory','firstName\x20is\x20mandatory','ListId\x20is\x20mandatory','map','No\x20agent\x20available','uncaughtException','path','lodash','bluebird','squel','ioredis','import','redis','format','field','from','join','where','\x20=\x20','.dialCheckDuplicateType\x20IN\x20(','cm_contacts.phone','cm_contacts.scheduledat','cm_contacts.ListId','cm_contacts.createdAt','cm_contacts.UserId','insert','into','ListId','createdAt','updatedAt','priority','UserId','fields','cm_contacts','cm_contacts.ListId\x20=\x20','.CmListId','.id\x20=\x20','.CmListId\x20=\x20?','cm_contacts.createdAt\x20=\x20?','cm_contacts.phone\x20NOT\x20IN\x20(?)','cm_hopper','\x22always\x22','toString','cm_contacts.id','cm_contacts.updatedAt','cm_hopper_black','phone','ContactId','select','ListId\x20=\x20?','concat','keys','CompanyId','fromQuery',')\x20NOT\x20IN\x20?','deletedAt\x20IS\x20NULL','MIN(id)','min_id','group','info','Received\x20SIGINT','exit','errors','push','code','message','sequelize','query','spread','catch','main','start','binding','socket_timestamp','root','server/files/tmp','.csv','header','writeFileSync','data','length','rows','hasOwnProperty','trim','replace','YYYY-MM-DD\x20HH:mm:ss','isValid','isNaN','isNumber','agent\x20not\x20exists','email','dateOfBirth','dateOfBirth\x20wrong\x20format\x20(YYYY-MM-DD)','firstName','\x20not\x20specified','SystemRow','appendFileSync','contact:import:','Abort\x20parser','abort','SystemError','error','duplicates','cm_contacts_','CREATE\x20TABLE\x20','\x20LIKE\x20cm_contacts;','LOAD\x20DATA\x20LOCAL\x20INFILE\x20\x27%s\x27\x20INTO\x20TABLE\x20%s\x20CHARACTER\x20SET\x20UTF8\x20FIELDS\x20TERMINATED\x20BY\x20\x27,\x27\x20ENCLOSED\x20BY\x20\x27\x22\x27\x20LINES\x20TERMINATED\x20BY\x20\x27\x0a\x27\x20IGNORE\x201\x20ROWS\x20(%s)\x20SET\x20id\x20=\x20NULL,\x20ListId\x20=\x20%s,\x20CompanyId\x20=\x20%s,\x20createdAt\x20=\x20\x27%s\x27,\x20updatedAt\x20=\x20\x27%s\x27'];(function(_0x39ac86,_0x4f8c8d){var _0x5e76df=function(_0x58fa3a){while(--_0x58fa3a){_0x39ac86['push'](_0x39ac86['shift']());}};_0x5e76df(++_0x4f8c8d);}(_0x113d,0x11e));var _0xd113=function(_0x32f3b6,_0x35c6b){_0x32f3b6=_0x32f3b6-0x0;var _0x1be3c0=_0x113d[_0x32f3b6];return _0x1be3c0;};'use strict';var fs=require('fs');var path=require(_0xd113('0x0'));var _=require(_0xd113('0x1'));var Papa=require('papaparse');var util=require('util');var BPromise=require(_0xd113('0x2'));var moment=require('moment');var squel=require(_0xd113('0x3'));var Redis=require(_0xd113('0x4'));var db=require('../../../mysqldb')['db'];var config=require('../../../config/environment');var logger=require('../../../config/logger')(_0xd113('0x5'));config[_0xd113('0x6')]=_['defaults'](config[_0xd113('0x6')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xd113('0x6')]));var stats={'finish':![],'errors':[],'rows':0x0,'affectedRows':0x0};var results=[];var stopped=![];var NOW=moment()[_0xd113('0x7')]('YYYY-MM-DD\x20HH:mm:ss');function isEmail(_0x30050d){return/^([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22))*\x40([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d))*$/['test'](_0x30050d);}function selectNotIn(_0x330ca6,_0x57b924,_0x42c7ac,_0x572952,_0x4b6581){return squel['select']()[_0xd113('0x8')]('phone')[_0xd113('0x9')](_0x572952)[_0xd113('0xa')](_0x57b924,null,_0x57b924+'.id\x20=\x20'+_0x572952+'.'+_0x42c7ac)[_0xd113('0xb')](_0x572952+'.'+_0x42c7ac+_0xd113('0xc')+_0x330ca6+'.'+_0x42c7ac)[_0xd113('0xb')](_0x57b924+_0xd113('0xd')+_0x4b6581[_0xd113('0xa')]()+')');}function insertCmHopper(_0xf56ed,_0x3a371c,_0x3869a3,_0x58c2ed,_0x399fb1){var _0x5c3539=[_0xd113('0xe'),_0xd113('0xf'),'cm_contacts.id',_0xd113('0x10'),_0x3a371c+'.'+_0x58c2ed,_0xd113('0x11'),'cm_contacts.updatedAt','cm_contacts.priority',_0xd113('0x12'),'\x22'+_0x399fb1+'\x22'];return squel[_0xd113('0x13')]()[_0xd113('0x14')]('cm_hopper')['fromQuery'](['phone','scheduledat','ContactId',_0xd113('0x15'),_0x58c2ed,_0xd113('0x16'),_0xd113('0x17'),_0xd113('0x18'),_0xd113('0x19'),'recallme'],squel['select']()[_0xd113('0x1a')](_0x5c3539)[_0xd113('0x9')](_0x3a371c)[_0xd113('0xa')](_0xd113('0x1b'),null,_0xd113('0x1c')+_0x3a371c+_0xd113('0x1d'))[_0xd113('0xa')](_0x3869a3,null,_0x3869a3+_0xd113('0x1e')+_0x3a371c+'.'+_0x58c2ed)[_0xd113('0xb')](_0x3a371c+_0xd113('0x1f'),_0xf56ed)[_0xd113('0xb')](_0xd113('0x20'),NOW)[_0xd113('0xb')](_0xd113('0x21'),selectNotIn(_0x3a371c,_0x3869a3,_0x58c2ed,_0xd113('0x22'),['\x22always\x22','\x22onlyIfOpen\x22']))[_0xd113('0xb')](_0xd113('0x21'),selectNotIn(_0x3a371c,_0x3869a3,_0x58c2ed,'cm_hopper',[_0xd113('0x23')])))[_0xd113('0x24')]();}function insertCmHopperBlack(_0x1882c0,_0x558a8c,_0x30f499,_0x121818){var _0x2ee9a2=[_0xd113('0xe'),_0xd113('0x25'),_0xd113('0x10'),_0x558a8c+'.'+_0x121818,'cm_contacts.createdAt',_0xd113('0x26')];return squel['insert']()[_0xd113('0x14')](_0xd113('0x27'))['fromQuery']([_0xd113('0x28'),_0xd113('0x29'),'ListId',_0x121818,_0xd113('0x16'),'updatedAt'],squel['select']()['fields'](_0x2ee9a2)[_0xd113('0x9')](_0x558a8c)['join'](_0xd113('0x1b'),null,_0xd113('0x1c')+_0x558a8c+_0xd113('0x1d'))[_0xd113('0xa')](_0x30f499,null,_0x30f499+_0xd113('0x1e')+_0x558a8c+'.'+_0x121818)[_0xd113('0xb')](_0x558a8c+_0xd113('0x1f'),_0x1882c0)[_0xd113('0xb')]('cm_contacts.createdAt\x20=\x20?',NOW)['where'](_0xd113('0x21'),squel[_0xd113('0x2a')]()[_0xd113('0x8')](_0xd113('0x28'))['from'](_0xd113('0x27'))['where'](_0xd113('0x2b'),_0x1882c0)[_0xd113('0xb')](_0x121818+'\x20=\x20?',_0x558a8c+'.'+_0x121818)))[_0xd113('0x24')]();}function insertCmContact(_0x8c6d98,_0x495692,_0x45a381,_0x57f34b){var _0x1fc8d0=_[_0xd113('0x2c')](_[_0xd113('0x2d')](_0x57f34b),[_0xd113('0x15'),_0xd113('0x2e'),_0xd113('0x16'),_0xd113('0x17')]);return squel['insert']()['into'](_0xd113('0x1b'))[_0xd113('0x2f')](_0x1fc8d0,squel['select']()[_0xd113('0x1a')](_0x1fc8d0)[_0xd113('0x9')](_0x495692)['where']('('+_0x45a381[_0xd113('0xa')](',')+_0xd113('0x30'),squel[_0xd113('0x2a')]()[_0xd113('0x1a')](_0x45a381)['from'](_0xd113('0x1b'))[_0xd113('0xb')](_0xd113('0x2b'),_0x8c6d98)[_0xd113('0xb')](_0xd113('0x31')))['where']('id\x20IN\x20?',squel[_0xd113('0x2a')]()[_0xd113('0x8')](_0xd113('0x32'),_0xd113('0x33'))[_0xd113('0x9')](_0x495692)[_0xd113('0x34')](_0x45a381['join'](','))))['toString']();}function handleStop(){logger[_0xd113('0x35')](_0xd113('0x36'));stopped=!![];}function handleUncaughtException(_0x47a7c6){logger['error'](_0x47a7c6['message']);process[_0xd113('0x37')](0x1);}function handleError(_0xa9a647,_0x1c3df9){stats[_0xd113('0x38')][_0xd113('0x39')]({'name':_0x1c3df9[_0xd113('0x3a')],'message':_0x1c3df9[_0xd113('0x3b')],'row':_0xa9a647});}function handleQuery(_0x58d76d){logger[_0xd113('0x35')](_0x58d76d);return db[_0xd113('0x3c')][_0xd113('0x3d')](_0x58d76d)[_0xd113('0x3e')](function(_0x5494de){results[_0xd113('0x39')](_0x5494de);})[_0xd113('0x3f')](function(_0x2fac89){logger['error'](_0x2fac89[_0xd113('0x3b')]);});}function main(_0x4b7626,_0x16d329,_0x2555b5,_0xa45e16){logger[_0xd113('0x35')](_0xd113('0x40'),_0x4b7626,JSON['stringify'](_0x16d329));process['send'](_0xd113('0x41'));var _0x53c3db=_0x16d329[_0xd113('0x42')];var _0x1f92da=_0x16d329[_0xd113('0x43')];var _0x5e1f5e=path[_0xd113('0xa')](config[_0xd113('0x44')],_0xd113('0x45'),_0x1f92da+_0xd113('0x46'));var _0x13535b=_[_0xd113('0x2d')](_0x53c3db)['join']();logger[_0xd113('0x35')](_0xd113('0x47'),_0x13535b);fs[_0xd113('0x48')](_0x5e1f5e,_0x13535b+'\x0a');Papa['parse'](fs['createReadStream'](_0x4b7626),{'header':!![],'skipEmptyLines':!![],'step':function(_0x4e0173,_0x54e154){try{for(var _0x346a03=0x0,_0x19cf2c=[];_0x346a03<_0x4e0173[_0xd113('0x49')][_0xd113('0x4a')];_0x346a03++){stats[_0xd113('0x4b')]+=0x1;if(_0x4e0173[_0xd113('0x38')][_0x346a03]){handleError(_0x4e0173[_0xd113('0x49')][_0x346a03],_0x4e0173[_0xd113('0x38')][_0x346a03]);}else{var _0x2dd7e2=[];for(var _0x3e0b50 in _0x53c3db){if(_0x53c3db[_0xd113('0x4c')](_0x3e0b50)){if(_0x4e0173['data'][_0x346a03][_0x53c3db[_0x3e0b50]]){var _0x32a117=_[_0xd113('0x4d')](_0x4e0173[_0xd113('0x49')][_0x346a03][_0x53c3db[_0x3e0b50]][_0xd113('0x4e')](/"/g,'\x27'));switch(_0x3e0b50){case'scheduledat':var _0x38de98=moment(_0x32a117,_0xd113('0x4f'),!![]);if(_0x38de98[_0xd113('0x50')]()){_0x19cf2c[_0xd113('0x39')]('\x22'+_0x32a117+'\x22');}else{_0x2dd7e2['push']('scheduledat\x20wrong\x20format\x20(YYYY-MM-DD\x20HH:mm:ss)');}break;case _0xd113('0x18'):var _0xb38ba8=parseInt(_0x32a117);_0x32a117=_[_0xd113('0x51')](_0xb38ba8)||_0xb38ba8<0x0||_0xb38ba8>0x4?_0xa45e16?0x3:0x2:_0xb38ba8;_0x19cf2c[_0xd113('0x39')]('\x22'+_0x32a117+'\x22');break;case _0xd113('0x19'):var _0x25dc1d=parseInt(_0x32a117);if(_[_0xd113('0x52')](_0x25dc1d)&&_['includes'](_0x2555b5,_0x25dc1d)){_0x19cf2c[_0xd113('0x39')]('\x22'+_0x25dc1d+'\x22');}else{_0x2dd7e2[_0xd113('0x39')](_0xd113('0x53'));}break;case _0xd113('0x54'):if(isEmail(_0x32a117)){_0x19cf2c[_0xd113('0x39')]('\x22'+_0x32a117+'\x22');}else{_0x2dd7e2['push']('email\x20wrong\x20format');}break;case _0xd113('0x55'):var _0x264661=moment(_0x32a117,'YYYY-MM-DD',!![]);if(_0x264661[_0xd113('0x50')]()){_0x19cf2c[_0xd113('0x39')]('\x22'+_0x32a117+'\x22');}else{_0x2dd7e2['push'](_0xd113('0x56'));}break;default:_0x19cf2c[_0xd113('0x39')]('\x22'+_0x32a117+'\x22');}}else{switch(_0x3e0b50){case _0xd113('0x57'):case _0xd113('0x28'):_0x2dd7e2[_0xd113('0x39')](_0x3e0b50+_0xd113('0x58'));break;default:_0x19cf2c['push']('\x22\x22');}}}}if(_0x2dd7e2[_0xd113('0x4a')]){handleError(_0x4e0173[_0xd113('0x49')][_0x346a03],{'code':_0xd113('0x59'),'message':_0x2dd7e2[_0xd113('0xa')]()});}else{fs[_0xd113('0x5a')](_0x5e1f5e,_0x19cf2c[_0xd113('0xa')]()+'\x0a');}_0x19cf2c=[];}if(!(stats['rows']%0xc8)){socket['emit'](_0xd113('0x5b')+_0x1f92da,stats);stats[_0xd113('0x38')]=[];}}if(stopped){logger['info'](_0xd113('0x5c'));_0x54e154[_0xd113('0x5d')]();}}catch(_0x43670a){handleError(_0x4e0173[_0xd113('0x49')][_0x346a03],{'code':_0xd113('0x5e'),'message':_0x43670a[_0xd113('0x3b')]});logger[_0xd113('0x5f')]('step',_0x43670a['message']);}},'complete':function(){try{var _0x343242=[];var _0x3c3014=_0xd113('0x1b');if(_0x16d329[_0xd113('0x60')]&&_0x16d329[_0xd113('0x60')][_0xd113('0x4a')]){_0x3c3014=_0xd113('0x61')+_0x1f92da;_0x343242[_0xd113('0x39')](_0xd113('0x62')+_0x3c3014+_0xd113('0x63'));}var _0x97e088=util[_0xd113('0x7')](_0xd113('0x64'),_0x5e1f5e,_0x3c3014,_0x13535b,_0x16d329['ListId'],_0x16d329[_0xd113('0x2e')]||null,NOW,NOW);if(_['isNil'](_0x53c3db[_0xd113('0x65')])){_0x97e088+=_0xd113('0x66');}_0x343242[_0xd113('0x39')](_0x97e088);if(_0x16d329[_0xd113('0x60')]&&_0x16d329[_0xd113('0x60')][_0xd113('0x4a')]){_0x343242['push'](insertCmContact(_0x16d329[_0xd113('0x15')],_0x3c3014,_0x16d329['duplicates'],_0x53c3db));_0x343242['push'](_0xd113('0x67')+_0x3c3014+';');}_0x343242[_0xd113('0x39')](insertCmHopper(_0x16d329[_0xd113('0x15')],_0xd113('0x68'),_0xd113('0x69'),_0xd113('0x6a'),_0xa45e16));_0x343242['push'](insertCmHopperBlack(_0x16d329[_0xd113('0x15')],_0xd113('0x6b'),_0xd113('0x69'),_0xd113('0x6a')));_0x343242[_0xd113('0x39')](insertCmHopper(_0x16d329[_0xd113('0x15')],_0xd113('0x6c'),_0xd113('0x6d'),_0xd113('0x6e'),_0xa45e16));_0x343242[_0xd113('0x39')](insertCmHopperBlack(_0x16d329['ListId'],_0xd113('0x6f'),_0xd113('0x6d'),'CampaignId'));BPromise[_0xd113('0x70')](_0x343242,handleQuery)[_0xd113('0x71')](function(_0x3a36c7){stats[_0xd113('0x72')]=!![];stats[_0xd113('0x73')]=_0x16d329[_0xd113('0x60')]&&_0x16d329['duplicates']['length']?results[0x2][_0xd113('0x73')]:results[0x0]['affectedRows'];socket['emit'](_0xd113('0x5b')+_0x1f92da,stats);fs[_0xd113('0x74')](_0x4b7626);fs['unlink'](_0x5e1f5e);process[_0xd113('0x37')](0x0);})['catch'](function(_0x1f8543){logger[_0xd113('0x5f')](_0x1f8543['message']);process[_0xd113('0x37')](0x1);});}catch(_0xe8c44b){logger[_0xd113('0x5f')](_0xd113('0x75'),_0xe8c44b[_0xd113('0x3b')]);process[_0xd113('0x37')](0x1);}},'error':function(_0x305491,_0x1dfbc2,_0x1f464e,_0x5b269c){throw new Error(_0x5b269c);}});}function validate(){if(process[_0xd113('0x76')]&&process[_0xd113('0x76')]['length']<0x4){throw new Error(_0xd113('0x77'));}var _0x1453c8=path[_0xd113('0xa')](config[_0xd113('0x44')],_0xd113('0x45'),process[_0xd113('0x76')][0x2]);if(!fs['existsSync'](_0x1453c8)){throw new Error(_0xd113('0x78'));}var _0x30acd3={};try{_0x30acd3=JSON[_0xd113('0x79')](process[_0xd113('0x76')][0x3]);if(!_0x30acd3[_0xd113('0x42')]){throw new Error(_0xd113('0x7a'));}if(!_0x30acd3['binding'][_0xd113('0x28')]){throw new Error(_0xd113('0x7b'));}if(!_0x30acd3[_0xd113('0x42')][_0xd113('0x57')]){throw new Error(_0xd113('0x7c'));}var _0x907340=0x0;if(_0x30acd3[_0xd113('0x42')][_0xd113('0x19')]){_0x907340=0x1;}if(!_0x30acd3['ListId']){throw new Error(_0xd113('0x7d'));}}catch(_0x297823){throw new Error('body\x20id\x20mandatory');}var _0x3c82ac=[];try{_0x3c82ac=_[_0xd113('0x7e')](JSON[_0xd113('0x79')](process[_0xd113('0x76')][0x4]),'id');}catch(_0x5f905c){logger[_0xd113('0x35')](_0xd113('0x7f'));}main(_0x1453c8,_0x30acd3,_0x3c82ac,_0x907340);}validate();process['on']('SIGINT',handleStop);process['on'](_0xd113('0x80'),handleUncaughtException); \ No newline at end of file diff --git a/server/components/integrations/configuration.js b/server/components/integrations/configuration.js index 3c9f409..b8c0fb3 100644 --- a/server/components/integrations/configuration.js +++ b/server/components/integrations/configuration.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x727b=['***\x20Call\x20Info\x20***','keyValue','Caller\x20Number','Caller\x20Name','calleridname','Call\x20To','destexten','Queue','uniqueid','Date','agentcalledAt','***\x20Agent\x20Info\x20***','Agent\x20Name','destcalleridname','Agent\x20Number','Agent\x20Ring','Agent\x20Connect','agentconnectAt','Agent\x20Complete','agentcompleteAt','Hold\x20Time','Talk\x20Time','talktime','Called\x20Number','Member\x20Name','membername','UniqueId','starttime','Answer\x20Time','answertime','Complete\x20Time','endtime','Duration','duration','Billable\x20Time','billableseconds','string','toLowerCase','inbound','variable','queue','push','calleridnum','outbound','Outbound\x20Call','destcalleridnum','getDescriptions','voice'];(function(_0x56741e,_0xc31f1e){var _0x4e3781=function(_0x17a7c8){while(--_0x17a7c8){_0x56741e['push'](_0x56741e['shift']());}};_0x4e3781(++_0xc31f1e);}(_0x727b,0x1a4));var _0xb727=function(_0x4cf359,_0x316703){_0x4cf359=_0x4cf359-0x0;var _0x44a306=_0x727b[_0x4cf359];return _0x44a306;};'use strict';exports['getSubjects']=function(_0x5aeca8,_0x1eeb31){var _0x2c5ff9=[{'type':_0xb727('0x0'),'content':'[xCALLY\x20Ticket]','variableName':null}];switch(_0x5aeca8[_0xb727('0x1')]()){case'voice':switch(_0x1eeb31[_0xb727('0x1')]()){case _0xb727('0x2'):_0x2c5ff9['push']({'type':_0xb727('0x3'),'content':'','variableName':_0xb727('0x4')});_0x2c5ff9[_0xb727('0x5')]({'type':_0xb727('0x3'),'content':'','variableName':_0xb727('0x6')});break;case _0xb727('0x7'):_0x2c5ff9[_0xb727('0x5')]({'type':_0xb727('0x0'),'content':_0xb727('0x8'),'variableName':null});_0x2c5ff9[_0xb727('0x5')]({'type':_0xb727('0x3'),'content':'','variableName':_0xb727('0x9')});break;}}return _0x2c5ff9;};exports[_0xb727('0xa')]=function(_0x5b4260,_0x58e7c4){var _0x2cb542=[];switch(_0x5b4260[_0xb727('0x1')]()){case _0xb727('0xb'):switch(_0x58e7c4[_0xb727('0x1')]()){case _0xb727('0x2'):_0x2cb542=[{'type':_0xb727('0x0'),'content':_0xb727('0xc'),'key':null,'keyType':null,'variableName':null},{'type':_0xb727('0xd'),'content':'','key':_0xb727('0xe'),'keyType':_0xb727('0x3'),'variableName':'calleridnum'},{'type':_0xb727('0xd'),'content':'','key':_0xb727('0xf'),'keyType':_0xb727('0x3'),'variableName':_0xb727('0x10')},{'type':_0xb727('0xd'),'content':'','key':_0xb727('0x11'),'keyType':'variable','variableName':_0xb727('0x12')},{'type':'keyValue','content':'','key':_0xb727('0x13'),'keyType':_0xb727('0x3'),'variableName':_0xb727('0x4')},{'type':_0xb727('0xd'),'content':'','key':'UniqueId','keyType':_0xb727('0x3'),'variableName':_0xb727('0x14')},{'type':_0xb727('0xd'),'content':'','key':_0xb727('0x15'),'keyType':_0xb727('0x3'),'variableName':_0xb727('0x16')},{'type':_0xb727('0x0'),'content':_0xb727('0x17'),'key':null,'keyType':null,'variableName':null},{'type':'keyValue','content':'','key':_0xb727('0x18'),'keyType':_0xb727('0x3'),'variableName':_0xb727('0x19')},{'type':_0xb727('0xd'),'content':'','key':_0xb727('0x1a'),'keyType':_0xb727('0x3'),'variableName':'destcalleridnum'},{'type':_0xb727('0x0'),'content':'***\x20Time\x20Info\x20***','key':null,'keyType':null,'variableName':null},{'type':'keyValue','content':'','key':_0xb727('0x1b'),'keyType':_0xb727('0x3'),'variableName':'agentcalledAt'},{'type':_0xb727('0xd'),'content':'','key':_0xb727('0x1c'),'keyType':_0xb727('0x3'),'variableName':_0xb727('0x1d')},{'type':_0xb727('0xd'),'content':'','key':_0xb727('0x1e'),'keyType':_0xb727('0x3'),'variableName':_0xb727('0x1f')},{'type':_0xb727('0xd'),'content':'','key':_0xb727('0x20'),'keyType':_0xb727('0x3'),'variableName':'holdtime'},{'type':_0xb727('0xd'),'content':'','key':_0xb727('0x21'),'keyType':'variable','variableName':_0xb727('0x22')}];break;case _0xb727('0x7'):_0x2cb542=[{'type':_0xb727('0x0'),'content':'***\x20Call\x20Info\x20***','variableName':null},{'type':_0xb727('0xd'),'content':'','key':_0xb727('0x23'),'keyType':_0xb727('0x3'),'keyContent':'','variableName':_0xb727('0x9')},{'type':_0xb727('0xd'),'content':'','key':_0xb727('0x24'),'keyType':_0xb727('0x3'),'keyContent':'','variableName':_0xb727('0x25')},{'type':'keyValue','content':'','key':_0xb727('0x26'),'keyType':_0xb727('0x3'),'keyContent':'','variableName':'uniqueid'},{'type':_0xb727('0xd'),'content':'','key':_0xb727('0x15'),'keyType':_0xb727('0x3'),'keyContent':'','variableName':_0xb727('0x27')},{'type':_0xb727('0x0'),'content':'***\x20Time\x20Info\x20***'},{'type':'keyValue','content':'','key':_0xb727('0x28'),'keyType':_0xb727('0x3'),'keyContent':'','variableName':_0xb727('0x29')},{'type':_0xb727('0xd'),'content':'','key':_0xb727('0x2a'),'keyType':_0xb727('0x3'),'keyContent':'','variableName':_0xb727('0x2b')},{'type':'keyValue','content':'','key':_0xb727('0x2c'),'keyType':_0xb727('0x3'),'keyContent':'','variableName':_0xb727('0x2d')},{'type':'keyValue','content':'','key':_0xb727('0x2e'),'keyType':'variable','keyContent':'','variableName':_0xb727('0x2f')}];break;}}return _0x2cb542;}; \ No newline at end of file +var _0x40d9=['Caller\x20Number','keyValue','Caller\x20Name','Queue','UniqueId','uniqueid','agentcalledAt','Agent\x20Name','destcalleridname','***\x20Time\x20Info\x20***','Agent\x20Ring','agentconnectAt','holdtime','Talk\x20Time','talktime','outbound','Member\x20Name','membername','Answer\x20Time','answertime','Complete\x20Time','Duration','duration','Billable\x20Time','getSubjects','toLowerCase','voice','push','queue','variable','calleridnum','string','Outbound\x20Call','destcalleridnum','getDescriptions','inbound','***\x20Call\x20Info\x20***'];(function(_0xfd02a,_0x2eb942){var _0x77ffcc=function(_0x58f555){while(--_0x58f555){_0xfd02a['push'](_0xfd02a['shift']());}};_0x77ffcc(++_0x2eb942);}(_0x40d9,0xac));var _0x940d=function(_0x298c41,_0x3c964f){_0x298c41=_0x298c41-0x0;var _0x3fd64d=_0x40d9[_0x298c41];return _0x3fd64d;};'use strict';exports[_0x940d('0x0')]=function(_0x5d4a75,_0x5e3b33){var _0x2b28f2=[{'type':'string','content':'[xCALLY\x20Ticket]','variableName':null}];switch(_0x5d4a75[_0x940d('0x1')]()){case _0x940d('0x2'):switch(_0x5e3b33[_0x940d('0x1')]()){case'inbound':_0x2b28f2[_0x940d('0x3')]({'type':'variable','content':'','variableName':_0x940d('0x4')});_0x2b28f2['push']({'type':_0x940d('0x5'),'content':'','variableName':_0x940d('0x6')});break;case'outbound':_0x2b28f2['push']({'type':_0x940d('0x7'),'content':_0x940d('0x8'),'variableName':null});_0x2b28f2[_0x940d('0x3')]({'type':'variable','content':'','variableName':_0x940d('0x9')});break;}}return _0x2b28f2;};exports[_0x940d('0xa')]=function(_0xb59805,_0x22c36d){var _0x4ff592=[];switch(_0xb59805[_0x940d('0x1')]()){case _0x940d('0x2'):switch(_0x22c36d[_0x940d('0x1')]()){case _0x940d('0xb'):_0x4ff592=[{'type':_0x940d('0x7'),'content':_0x940d('0xc'),'key':null,'keyType':null,'variableName':null},{'type':'keyValue','content':'','key':_0x940d('0xd'),'keyType':_0x940d('0x5'),'variableName':_0x940d('0x6')},{'type':_0x940d('0xe'),'content':'','key':_0x940d('0xf'),'keyType':'variable','variableName':'calleridname'},{'type':_0x940d('0xe'),'content':'','key':'Call\x20To','keyType':_0x940d('0x5'),'variableName':'destexten'},{'type':_0x940d('0xe'),'content':'','key':_0x940d('0x10'),'keyType':'variable','variableName':'queue'},{'type':_0x940d('0xe'),'content':'','key':_0x940d('0x11'),'keyType':_0x940d('0x5'),'variableName':_0x940d('0x12')},{'type':'keyValue','content':'','key':'Date','keyType':_0x940d('0x5'),'variableName':_0x940d('0x13')},{'type':_0x940d('0x7'),'content':'***\x20Agent\x20Info\x20***','key':null,'keyType':null,'variableName':null},{'type':_0x940d('0xe'),'content':'','key':_0x940d('0x14'),'keyType':_0x940d('0x5'),'variableName':_0x940d('0x15')},{'type':_0x940d('0xe'),'content':'','key':'Agent\x20Number','keyType':_0x940d('0x5'),'variableName':_0x940d('0x9')},{'type':_0x940d('0x7'),'content':_0x940d('0x16'),'key':null,'keyType':null,'variableName':null},{'type':_0x940d('0xe'),'content':'','key':_0x940d('0x17'),'keyType':_0x940d('0x5'),'variableName':_0x940d('0x13')},{'type':_0x940d('0xe'),'content':'','key':'Agent\x20Connect','keyType':'variable','variableName':_0x940d('0x18')},{'type':_0x940d('0xe'),'content':'','key':'Agent\x20Complete','keyType':_0x940d('0x5'),'variableName':'agentcompleteAt'},{'type':_0x940d('0xe'),'content':'','key':'Hold\x20Time','keyType':'variable','variableName':_0x940d('0x19')},{'type':_0x940d('0xe'),'content':'','key':_0x940d('0x1a'),'keyType':'variable','variableName':_0x940d('0x1b')}];break;case _0x940d('0x1c'):_0x4ff592=[{'type':_0x940d('0x7'),'content':_0x940d('0xc'),'variableName':null},{'type':'keyValue','content':'','key':'Called\x20Number','keyType':_0x940d('0x5'),'keyContent':'','variableName':_0x940d('0x9')},{'type':'keyValue','content':'','key':_0x940d('0x1d'),'keyType':'variable','keyContent':'','variableName':_0x940d('0x1e')},{'type':_0x940d('0xe'),'content':'','key':_0x940d('0x11'),'keyType':_0x940d('0x5'),'keyContent':'','variableName':_0x940d('0x12')},{'type':_0x940d('0xe'),'content':'','key':'Date','keyType':'variable','keyContent':'','variableName':'starttime'},{'type':_0x940d('0x7'),'content':_0x940d('0x16')},{'type':_0x940d('0xe'),'content':'','key':_0x940d('0x1f'),'keyType':'variable','keyContent':'','variableName':_0x940d('0x20')},{'type':'keyValue','content':'','key':_0x940d('0x21'),'keyType':_0x940d('0x5'),'keyContent':'','variableName':'endtime'},{'type':'keyValue','content':'','key':_0x940d('0x22'),'keyType':_0x940d('0x5'),'keyContent':'','variableName':_0x940d('0x23')},{'type':'keyValue','content':'','key':_0x940d('0x24'),'keyType':_0x940d('0x5'),'keyContent':'','variableName':'billableseconds'}];break;}}return _0x4ff592;}; \ No newline at end of file diff --git a/server/components/interaction/service.js b/server/components/interaction/service.js index 0261c29..db18be4 100644 --- a/server/components/interaction/service.js +++ b/server/components/interaction/service.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9037=['null','findOne','update','then','info','catch','query','body','omit','phone','fax','mobile','../../config/logger','openchannel-interactions','mail-interactions','fax-interactions','sms-interactions','chat-interactions','whatsapp-interactions','upperFirst','unknown','toLowerCase','[%s]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','toUpperCase','name'];(function(_0x59cefe,_0x2ed4cc){var _0x32ad18=function(_0x25e651){while(--_0x25e651){_0x59cefe['push'](_0x59cefe['shift']());}};_0x32ad18(++_0x2ed4cc);}(_0x9037,0x1b5));var _0x7903=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x9037[_0x14add3];return _0x4a174f;};'use strict';var _=require('lodash');var db=require('../../mysqldb')['db'];var loggers={'openchannel':require(_0x7903('0x0'))(_0x7903('0x1')),'mail':require(_0x7903('0x0'))(_0x7903('0x2')),'fax':require(_0x7903('0x0'))(_0x7903('0x3')),'sms':require(_0x7903('0x0'))(_0x7903('0x4')),'chat':require(_0x7903('0x0'))(_0x7903('0x5')),'whatsapp':require(_0x7903('0x0'))(_0x7903('0x6'))};function getInteractionId(_0x135dcf,_0x1716fd,_0x2f98ff){if(_0x135dcf&&_0x135dcf[_[_0x7903('0x7')](_0x2f98ff)+'InteractionId']){return _0x135dcf[_[_0x7903('0x7')](_0x2f98ff)+'InteractionId'];}else if(_0x135dcf&&_0x135dcf['id']){return _0x135dcf['id'];}else if(_0x1716fd&&_0x1716fd['id']){return _0x1716fd['id'];}else{return _0x7903('0x8');}}function log(_0x2c45a3,_0x3f0fe7,_0x514a59,_0x268b50,_0x44f9f2,_0x37d7e3){loggers[_0x44f9f2[_0x7903('0x9')]()][_0x2c45a3](_0x7903('0xa'),_0x37d7e3[_0x7903('0xb')](),_0x3f0fe7?_0x3f0fe7['id']:null,_0x3f0fe7?_0x3f0fe7[_0x7903('0xc')]:null,_0x3f0fe7?_0x3f0fe7['role']:null,getInteractionId(_0x514a59,_0x268b50,_0x44f9f2),_0x514a59?JSON['stringify'](_0x514a59):_0x7903('0xd'));}function updateUser(_0xc7b2ea,_0x52cc2d,_0x51df1b,_0x37a8d5,_0xc88151){db[_[_0x7903('0x7')](_0x37a8d5)+'Interaction'][_0x7903('0xe')]({'where':{'id':getInteractionId(_0x52cc2d,_0x51df1b,_0x37a8d5)}})['then'](function(_0x16f4f2){if(_0x16f4f2){return _0x16f4f2[_0x7903('0xf')]({'UserId':_0xc7b2ea?_0xc7b2ea['id']:null});}})[_0x7903('0x10')](function(_0x4957ff){if(_0x4957ff){log(_0x7903('0x11'),_0xc7b2ea,_0x52cc2d,_0x51df1b,_0x37a8d5,_0xc88151);}})[_0x7903('0x12')](function(){log('error',_0xc7b2ea,_0x52cc2d,_0x51df1b,_0x37a8d5,_0xc88151);});}exports['tracked']=function(_0x1ed2ac,_0x456fb7){return function(_0x39ea74,_0x3901bd,_0x27ced6){var _0x33df97=_0x39ea74['user'];var _0x2396b3={};var _0x5b9ee5=_0x39ea74[_0x7903('0x13')];if(_0x2396b3){_0x2396b3=_['clone'](_0x39ea74[_0x7903('0x14')]);_0x2396b3=_[_0x7903('0x15')](_0x2396b3,[_0x7903('0x14'),'html',_0x7903('0x16'),_0x7903('0x17'),_0x7903('0x18')]);}updateUser(_0x33df97,_0x2396b3,_0x5b9ee5,_0x1ed2ac,_0x456fb7);_0x27ced6(null);};}; \ No newline at end of file +var _0x0fa4=['fax-interactions','sms-interactions','chat-interactions','whatsapp-interactions','upperFirst','InteractionId','unknown','toUpperCase','role','stringify','Interaction','then','update','catch','user','query','body','omit','phone','fax','mobile','../../mysqldb','../../config/logger','openchannel-interactions','mail-interactions'];(function(_0xf8c23a,_0x5ba85c){var _0x510c2d=function(_0x48d800){while(--_0x48d800){_0xf8c23a['push'](_0xf8c23a['shift']());}};_0x510c2d(++_0x5ba85c);}(_0x0fa4,0xf6));var _0x40fa=function(_0x3d73ae,_0x23c679){_0x3d73ae=_0x3d73ae-0x0;var _0x1fd52e=_0x0fa4[_0x3d73ae];return _0x1fd52e;};'use strict';var _=require('lodash');var db=require(_0x40fa('0x0'))['db'];var loggers={'openchannel':require(_0x40fa('0x1'))(_0x40fa('0x2')),'mail':require('../../config/logger')(_0x40fa('0x3')),'fax':require(_0x40fa('0x1'))(_0x40fa('0x4')),'sms':require('../../config/logger')(_0x40fa('0x5')),'chat':require(_0x40fa('0x1'))(_0x40fa('0x6')),'whatsapp':require(_0x40fa('0x1'))(_0x40fa('0x7'))};function getInteractionId(_0x2eb37d,_0x3c8c2d,_0xa7722d){if(_0x2eb37d&&_0x2eb37d[_[_0x40fa('0x8')](_0xa7722d)+_0x40fa('0x9')]){return _0x2eb37d[_[_0x40fa('0x8')](_0xa7722d)+_0x40fa('0x9')];}else if(_0x2eb37d&&_0x2eb37d['id']){return _0x2eb37d['id'];}else if(_0x3c8c2d&&_0x3c8c2d['id']){return _0x3c8c2d['id'];}else{return _0x40fa('0xa');}}function log(_0x19572d,_0x443fdb,_0x54f269,_0x2731df,_0xcd6646,_0x57ef2a){loggers[_0xcd6646['toLowerCase']()][_0x19572d]('[%s]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x57ef2a[_0x40fa('0xb')](),_0x443fdb?_0x443fdb['id']:null,_0x443fdb?_0x443fdb['name']:null,_0x443fdb?_0x443fdb[_0x40fa('0xc')]:null,getInteractionId(_0x54f269,_0x2731df,_0xcd6646),_0x54f269?JSON[_0x40fa('0xd')](_0x54f269):'null');}function updateUser(_0x40becc,_0x20e85a,_0x1efb8c,_0x1ed315,_0x24e376){db[_[_0x40fa('0x8')](_0x1ed315)+_0x40fa('0xe')]['findOne']({'where':{'id':getInteractionId(_0x20e85a,_0x1efb8c,_0x1ed315)}})[_0x40fa('0xf')](function(_0x5a730f){if(_0x5a730f){return _0x5a730f[_0x40fa('0x10')]({'UserId':_0x40becc?_0x40becc['id']:null});}})[_0x40fa('0xf')](function(_0xcee25f){if(_0xcee25f){log('info',_0x40becc,_0x20e85a,_0x1efb8c,_0x1ed315,_0x24e376);}})[_0x40fa('0x11')](function(){log('error',_0x40becc,_0x20e85a,_0x1efb8c,_0x1ed315,_0x24e376);});}exports['tracked']=function(_0x3b1f3f,_0x548e9c){return function(_0x2990a6,_0x5b9126,_0xb76fb8){var _0x3e128a=_0x2990a6[_0x40fa('0x12')];var _0x51402c={};var _0x57a641=_0x2990a6[_0x40fa('0x13')];if(_0x51402c){_0x51402c=_['clone'](_0x2990a6[_0x40fa('0x14')]);_0x51402c=_[_0x40fa('0x15')](_0x51402c,[_0x40fa('0x14'),'html',_0x40fa('0x16'),_0x40fa('0x17'),_0x40fa('0x18')]);}updateUser(_0x3e128a,_0x51402c,_0x57a641,_0x3b1f3f,_0x548e9c);_0xb76fb8(null);};}; \ No newline at end of file diff --git a/server/components/license/service.js b/server/components/license/service.js index 53cf1f9..c38dc04 100644 --- a/server/components/license/service.js +++ b/server/components/license/service.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9e25=['util','composable-middleware','data1','license','createDecipher','format','%s:%s:%s','update','base64','utf8','final','parse','hasOwnProperty','use','License','findOne','then','status','json','catch','users','isUserLimit','crypto'];(function(_0x9a7676,_0x483d73){var _0x357ea1=function(_0x32d577){while(--_0x32d577){_0x9a7676['push'](_0x9a7676['shift']());}};_0x357ea1(++_0x483d73);}(_0x9e25,0xa0));var _0x59e2=function(_0x5c0c95,_0x19f6f7){_0x5c0c95=_0x5c0c95-0x0;var _0x27311f=_0x9e25[_0x5c0c95];return _0x27311f;};'use strict';var crypto=require(_0x59e2('0x0'));var util=require(_0x59e2('0x1'));var compose=require(_0x59e2('0x2'));var db=require('../../mysqldb')['db'];var config=require('../../config/environment');function getValueFromLicense(_0x5ece27,_0x40ffd6){if(_0x5ece27&&_0x40ffd6){if(_0x40ffd6[_0x59e2('0x3')]&&_0x40ffd6[_0x59e2('0x4')]){var _0x84fa5e=_0x40ffd6['data1'];var _0x280c4c=_0x40ffd6[_0x59e2('0x4')];var _0xea8578=_0x84fa5e['split']('-')[0x4];var _0xb30430=_0x84fa5e['split']('-')[0x0];var _0x3815b8=crypto[_0x59e2('0x5')]('aes-256-ctr',util[_0x59e2('0x6')](_0x59e2('0x7'),_0xea8578,_0x84fa5e,_0xb30430));var _0x5bf0a0=_0x3815b8[_0x59e2('0x8')](_0x280c4c,_0x59e2('0x9'),_0x59e2('0xa'));_0x5bf0a0+=_0x3815b8[_0x59e2('0xb')](_0x59e2('0xa'));var _0xe6308=JSON[_0x59e2('0xc')](_0x5bf0a0);return _0xe6308[_0x59e2('0xd')](_0x5ece27)?_0xe6308[_0x5ece27]:null;}}return null;}function isLimit(_0x1b5f07,_0x5bd81e,_0x332c82,_0xc2ef1c){var _0x158797=_0x5bd81e;return compose()[_0x59e2('0xe')](function(_0x96f0c6,_0x4749a6,_0x1953a2){return db[_0x59e2('0xf')][_0x59e2('0x10')]({'where':{'id':0x1},'raw':!![]})[_0x59e2('0x11')](function(_0x59ec3c){var _0x454599=getValueFromLicense(_0x1b5f07,_0x59ec3c);return _0x454599?_0x454599:_0x158797;})[_0x59e2('0x11')](function(_0x4ee913){_0x158797=_0x4ee913;return _0x332c82['count'](_0xc2ef1c);})['then'](function(_0x5f01e4){if(_0x5f01e4>=_0x158797){return _0x4749a6[_0x59e2('0x12')](0x193)[_0x59e2('0x13')]({'message':util['format']('Maximum\x20%s\x20limit\x20have\x20been\x20reached',_0x1b5f07)});}_0x1953a2();})[_0x59e2('0x14')](function(_0xfeff3a){_0x1953a2(_0xfeff3a);});});}function isUserLimit(){return isLimit(_0x59e2('0x15'),0x1,db['User'],{'where':{'$or':[{'role':'admin'},{'role':'user'}]}});}exports[_0x59e2('0x16')]=isUserLimit; \ No newline at end of file +var _0x3e17=['final','utf8','parse','hasOwnProperty','use','License','findOne','then','count','json','Maximum\x20%s\x20limit\x20have\x20been\x20reached','catch','users','User','admin','crypto','util','composable-middleware','../../mysqldb','data1','license','split','aes-256-ctr','format','update','base64'];(function(_0x383e81,_0x5e5751){var _0x35ef23=function(_0x39ad60){while(--_0x39ad60){_0x383e81['push'](_0x383e81['shift']());}};_0x35ef23(++_0x5e5751);}(_0x3e17,0x91));var _0x73e1=function(_0x4a9fb1,_0x273043){_0x4a9fb1=_0x4a9fb1-0x0;var _0x348672=_0x3e17[_0x4a9fb1];return _0x348672;};'use strict';var crypto=require(_0x73e1('0x0'));var util=require(_0x73e1('0x1'));var compose=require(_0x73e1('0x2'));var db=require(_0x73e1('0x3'))['db'];var config=require('../../config/environment');function getValueFromLicense(_0xb9f061,_0x47387a){if(_0xb9f061&&_0x47387a){if(_0x47387a[_0x73e1('0x4')]&&_0x47387a[_0x73e1('0x5')]){var _0x51bbf4=_0x47387a[_0x73e1('0x4')];var _0x3d9163=_0x47387a[_0x73e1('0x5')];var _0x30f0d5=_0x51bbf4[_0x73e1('0x6')]('-')[0x4];var _0x413212=_0x51bbf4[_0x73e1('0x6')]('-')[0x0];var _0x3405ca=crypto['createDecipher'](_0x73e1('0x7'),util[_0x73e1('0x8')]('%s:%s:%s',_0x30f0d5,_0x51bbf4,_0x413212));var _0x464da8=_0x3405ca[_0x73e1('0x9')](_0x3d9163,_0x73e1('0xa'),'utf8');_0x464da8+=_0x3405ca[_0x73e1('0xb')](_0x73e1('0xc'));var _0x2f9fea=JSON[_0x73e1('0xd')](_0x464da8);return _0x2f9fea[_0x73e1('0xe')](_0xb9f061)?_0x2f9fea[_0xb9f061]:null;}}return null;}function isLimit(_0x3b62cd,_0x556393,_0x25e38a,_0x101c1d){var _0x419d72=_0x556393;return compose()[_0x73e1('0xf')](function(_0x4a4440,_0x3aa0cc,_0x26515b){return db[_0x73e1('0x10')][_0x73e1('0x11')]({'where':{'id':0x1},'raw':!![]})[_0x73e1('0x12')](function(_0x5dd836){var _0x53ac75=getValueFromLicense(_0x3b62cd,_0x5dd836);return _0x53ac75?_0x53ac75:_0x419d72;})[_0x73e1('0x12')](function(_0x57e3b4){_0x419d72=_0x57e3b4;return _0x25e38a[_0x73e1('0x13')](_0x101c1d);})[_0x73e1('0x12')](function(_0x56d4b2){if(_0x56d4b2>=_0x419d72){return _0x3aa0cc['status'](0x193)[_0x73e1('0x14')]({'message':util[_0x73e1('0x8')](_0x73e1('0x15'),_0x3b62cd)});}_0x26515b();})[_0x73e1('0x16')](function(_0x2e34c8){_0x26515b(_0x2e34c8);});});}function isUserLimit(){return isLimit(_0x73e1('0x17'),0x1,db[_0x73e1('0x18')],{'where':{'$or':[{'role':_0x73e1('0x19')},{'role':'user'}]}});}exports['isUserLimit']=isUserLimit; \ No newline at end of file diff --git a/server/components/parsers/advancedSearch.js b/server/components/parsers/advancedSearch.js index bb4f5bd..dfe8362 100644 --- a/server/components/parsers/advancedSearch.js +++ b/server/components/parsers/advancedSearch.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x61ce=['shift','filter','indexOf','map','push','buildExpression','DATE','$eq','operator','value','includes','$lte','add','castTo','text','CAST(','field','\x20AS\x20','$ne','\x20IS\x20NULL)','$in','$notIn','NOT\x20IN\x20?','<>\x20?','$substring','$startsWith','LIKE\x20?','$gt','>\x20?','>=\x20?','$between','BETWEEN\x20?\x20AND\x20?','start','$endsWith','pop','utcOffset','format','hours','minutes','seconds','lodash','moment','sqlOperator','[$or]','and','replace','[$and]','split','forEach'];(function(_0x23e758,_0x218c5b){var _0x1a3d10=function(_0x148e9f){while(--_0x148e9f){_0x23e758['push'](_0x23e758['shift']());}};_0x1a3d10(++_0x218c5b);}(_0x61ce,0x17f));var _0xe61c=function(_0x58186c,_0x5ec2fc){_0x58186c=_0x58186c-0x0;var _0xade9f2=_0x61ce[_0x58186c];return _0xade9f2;};'use strict';var _=require(_0xe61c('0x0'));var moment=require(_0xe61c('0x1'));exports['parseSearch']=function(_0x477806){var _0x1a850a={'conditions':[]};_0x1a850a[_0xe61c('0x2')]=_['startsWith'](_0x477806,_0xe61c('0x3'))?'or':_0xe61c('0x4');var _0x28decb=_0x477806[_0xe61c('0x5')](_0xe61c('0x6'),'')[_0xe61c('0x5')](_0xe61c('0x3'),'')['split']('||');for(var _0x1ddeac=0x0;_0x1ddeac<_0x28decb['length'];_0x1ddeac++){var _0x9e0ade=_0x28decb[_0x1ddeac][_0xe61c('0x7')](':=');var _0x3912da=_0x9e0ade[0x0];var _0x2cb32f=_0x9e0ade['slice'](0x1);_0x2cb32f[_0xe61c('0x8')](function(_0x48cb13){var _0xa9d0a8=_0x48cb13[_0xe61c('0x7')]('[')[_0xe61c('0x9')]();var _0x4253b8=_0x48cb13['match'](/\[(.*?)\]/g);_0x4253b8[_0xe61c('0x8')](function(_0x86bfcf){var _0x583146=_0x86bfcf['split']('[')[_0xe61c('0xa')](function(_0xdb298b){return _0xdb298b[_0xe61c('0xb')](']')>-0x1;})[_0xe61c('0xc')](function(_0x1f3121){return _0x1f3121['split'](']')[0x0];})[0x0];_0x1a850a['conditions'][_0xe61c('0xd')]({'field':_0x3912da,'operator':_0xa9d0a8,'value':_0x583146});});});}return _0x1a850a;};exports[_0xe61c('0xe')]=function(_0x22ad61,_0x22d77c,_0x2d9e5e){var _0x1f5fde={};if(_0x22d77c===_0xe61c('0xf')){if(_0x2d9e5e['operator']===_0xe61c('0x10')){_0x2d9e5e[_0xe61c('0x11')]='$between';_0x2d9e5e['value']+=','+_0x2d9e5e[_0xe61c('0x12')];}else if(_[_0xe61c('0x13')](['$gt',_0xe61c('0x14')],_0x2d9e5e[_0xe61c('0x11')])){_0x2d9e5e[_0xe61c('0x12')]=moment(_0x2d9e5e[_0xe61c('0x12')])[_0xe61c('0x15')](0x1,'days')['format']('YYYY-MM-DD');}}if(_0x2d9e5e[_0xe61c('0x16')]){_0x22d77c=_0x2d9e5e[_0xe61c('0x16')];_0x1f5fde[_0xe61c('0x17')]=_0xe61c('0x18')+_0x22ad61+'.'+_0x2d9e5e[_0xe61c('0x19')]+_0xe61c('0x1a')+_0x2d9e5e[_0xe61c('0x16')]+')\x20'+parseOperator(_0x2d9e5e[_0xe61c('0x11')]);}else{_0x1f5fde[_0xe61c('0x17')]=_0x22ad61+'.'+_0x2d9e5e[_0xe61c('0x19')]+'\x20'+parseOperator(_0x2d9e5e[_0xe61c('0x11')]);}if(_['includes']([_0xe61c('0x1b'),'$notIn'],_0x2d9e5e[_0xe61c('0x11')]))_0x1f5fde[_0xe61c('0x17')]='('+_0x1f5fde[_0xe61c('0x17')]+'\x20OR\x20'+_0x22ad61+'.'+_0x2d9e5e[_0xe61c('0x19')]+_0xe61c('0x1c');_0x1f5fde[_0xe61c('0x12')]=parseValue(_0x22d77c,_0x2d9e5e[_0xe61c('0x11')],_0x2d9e5e[_0xe61c('0x12')]);return _0x1f5fde;};function parseOperator(_0x1819df){var _0x550ec5;switch(_0x1819df){case _0xe61c('0x1d'):_0x550ec5='IN\x20?';break;case _0xe61c('0x1e'):_0x550ec5=_0xe61c('0x1f');break;case _0xe61c('0x10'):_0x550ec5='=\x20?';break;case _0xe61c('0x1b'):_0x550ec5=_0xe61c('0x20');break;case _0xe61c('0x21'):case _0xe61c('0x22'):case'$endsWith':_0x550ec5=_0xe61c('0x23');break;case'$lt':_0x550ec5='<\x20?';break;case _0xe61c('0x24'):_0x550ec5=_0xe61c('0x25');break;case _0xe61c('0x14'):_0x550ec5='<=\x20?';break;case'$gte':_0x550ec5=_0xe61c('0x26');break;case _0xe61c('0x27'):_0x550ec5=_0xe61c('0x28');break;}return _0x550ec5;}function parseValue(_0x25d014,_0x581893,_0x336b8a){var _0x27dcd3={'start':undefined,'end':undefined};switch(_0x581893){case'$in':case'$notIn':_0x27dcd3[_0xe61c('0x29')]=_0x336b8a[_0xe61c('0x7')](',');break;case _0xe61c('0x21'):_0x27dcd3[_0xe61c('0x29')]='%'+_0x336b8a+'%';break;case _0xe61c('0x22'):_0x27dcd3[_0xe61c('0x29')]=_0x336b8a+'%';break;case _0xe61c('0x2a'):_0x27dcd3['start']='%'+_0x336b8a;break;case'$between':var _0x192227=_0x336b8a[_0xe61c('0x7')](',');var _0x336b8a=_0x192227[_0xe61c('0x9')]();var _0x57aa1c=_0x192227[_0xe61c('0x2b')]();if(_0x25d014===_0xe61c('0xf')){_0x336b8a=moment(_0x336b8a)[_0xe61c('0x2c')](0x0,!![])[_0xe61c('0x2d')]();_0x57aa1c=moment(_0x57aa1c)[_0xe61c('0x2c')](0x0,!![])[_0xe61c('0x15')](0x17,_0xe61c('0x2e'))[_0xe61c('0x15')](0x3b,_0xe61c('0x2f'))[_0xe61c('0x15')](0x3b,_0xe61c('0x30'))[_0xe61c('0x2d')]();}_0x27dcd3={'start':_0x336b8a,'end':_0x57aa1c};break;default:_0x27dcd3[_0xe61c('0x29')]=_0x336b8a;break;}return _0x27dcd3;} \ No newline at end of file +var _0x4694=['forEach','shift','match','filter','map','conditions','buildExpression','DATE','operator','value','includes','add','format','YYYY-MM-DD','castTo','text','CAST(','field','\x20AS\x20','$ne','$notIn','\x20OR\x20','\x20IS\x20NULL)','$in','IN\x20?','$eq','=\x20?','<>\x20?','$substring','$startsWith','$endsWith','<\x20?','$gt','>\x20?','<=\x20?','$gte','>=\x20?','BETWEEN\x20?\x20AND\x20?','start','$between','pop','utcOffset','hours','minutes','seconds','lodash','moment','sqlOperator','startsWith','and','replace','[$and]','[$or]','split','length','slice'];(function(_0x67cc94,_0x46bdae){var _0x2650bf=function(_0xeb01af){while(--_0xeb01af){_0x67cc94['push'](_0x67cc94['shift']());}};_0x2650bf(++_0x46bdae);}(_0x4694,0x17d));var _0x4469=function(_0x12ddb2,_0x5ad61e){_0x12ddb2=_0x12ddb2-0x0;var _0x10b6dd=_0x4694[_0x12ddb2];return _0x10b6dd;};'use strict';var _=require(_0x4469('0x0'));var moment=require(_0x4469('0x1'));exports['parseSearch']=function(_0x56a2f2){var _0x1d023b={'conditions':[]};_0x1d023b[_0x4469('0x2')]=_[_0x4469('0x3')](_0x56a2f2,'[$or]')?'or':_0x4469('0x4');var _0x2b56b5=_0x56a2f2[_0x4469('0x5')](_0x4469('0x6'),'')[_0x4469('0x5')](_0x4469('0x7'),'')[_0x4469('0x8')]('||');for(var _0x163535=0x0;_0x163535<_0x2b56b5[_0x4469('0x9')];_0x163535++){var _0x10d2bd=_0x2b56b5[_0x163535][_0x4469('0x8')](':=');var _0x5500ef=_0x10d2bd[0x0];var _0x45c5f8=_0x10d2bd[_0x4469('0xa')](0x1);_0x45c5f8[_0x4469('0xb')](function(_0x32ef43){var _0x57f388=_0x32ef43['split']('[')[_0x4469('0xc')]();var _0x5d23e2=_0x32ef43[_0x4469('0xd')](/\[(.*?)\]/g);_0x5d23e2[_0x4469('0xb')](function(_0x3e041a){var _0x52fda3=_0x3e041a['split']('[')[_0x4469('0xe')](function(_0x62621f){return _0x62621f['indexOf'](']')>-0x1;})[_0x4469('0xf')](function(_0xcf570c){return _0xcf570c['split'](']')[0x0];})[0x0];_0x1d023b[_0x4469('0x10')]['push']({'field':_0x5500ef,'operator':_0x57f388,'value':_0x52fda3});});});}return _0x1d023b;};exports[_0x4469('0x11')]=function(_0x27ea51,_0x2e787d,_0xc270c5){var _0x193c17={};if(_0x2e787d===_0x4469('0x12')){if(_0xc270c5[_0x4469('0x13')]==='$eq'){_0xc270c5['operator']='$between';_0xc270c5['value']+=','+_0xc270c5[_0x4469('0x14')];}else if(_[_0x4469('0x15')](['$gt','$lte'],_0xc270c5[_0x4469('0x13')])){_0xc270c5[_0x4469('0x14')]=moment(_0xc270c5[_0x4469('0x14')])[_0x4469('0x16')](0x1,'days')[_0x4469('0x17')](_0x4469('0x18'));}}if(_0xc270c5['castTo']){_0x2e787d=_0xc270c5[_0x4469('0x19')];_0x193c17[_0x4469('0x1a')]=_0x4469('0x1b')+_0x27ea51+'.'+_0xc270c5[_0x4469('0x1c')]+_0x4469('0x1d')+_0xc270c5['castTo']+')\x20'+parseOperator(_0xc270c5[_0x4469('0x13')]);}else{_0x193c17[_0x4469('0x1a')]=_0x27ea51+'.'+_0xc270c5['field']+'\x20'+parseOperator(_0xc270c5[_0x4469('0x13')]);}if(_[_0x4469('0x15')]([_0x4469('0x1e'),_0x4469('0x1f')],_0xc270c5[_0x4469('0x13')]))_0x193c17['text']='('+_0x193c17['text']+_0x4469('0x20')+_0x27ea51+'.'+_0xc270c5['field']+_0x4469('0x21');_0x193c17[_0x4469('0x14')]=parseValue(_0x2e787d,_0xc270c5['operator'],_0xc270c5[_0x4469('0x14')]);return _0x193c17;};function parseOperator(_0x5abbcd){var _0x1ba07b;switch(_0x5abbcd){case _0x4469('0x22'):_0x1ba07b=_0x4469('0x23');break;case _0x4469('0x1f'):_0x1ba07b='NOT\x20IN\x20?';break;case _0x4469('0x24'):_0x1ba07b=_0x4469('0x25');break;case _0x4469('0x1e'):_0x1ba07b=_0x4469('0x26');break;case _0x4469('0x27'):case _0x4469('0x28'):case _0x4469('0x29'):_0x1ba07b='LIKE\x20?';break;case'$lt':_0x1ba07b=_0x4469('0x2a');break;case _0x4469('0x2b'):_0x1ba07b=_0x4469('0x2c');break;case'$lte':_0x1ba07b=_0x4469('0x2d');break;case _0x4469('0x2e'):_0x1ba07b=_0x4469('0x2f');break;case'$between':_0x1ba07b=_0x4469('0x30');break;}return _0x1ba07b;}function parseValue(_0x5dd1d6,_0x22c761,_0x58be91){var _0x38c0e0={'start':undefined,'end':undefined};switch(_0x22c761){case _0x4469('0x22'):case _0x4469('0x1f'):_0x38c0e0[_0x4469('0x31')]=_0x58be91[_0x4469('0x8')](',');break;case _0x4469('0x27'):_0x38c0e0[_0x4469('0x31')]='%'+_0x58be91+'%';break;case _0x4469('0x28'):_0x38c0e0[_0x4469('0x31')]=_0x58be91+'%';break;case'$endsWith':_0x38c0e0[_0x4469('0x31')]='%'+_0x58be91;break;case _0x4469('0x32'):var _0xcb104f=_0x58be91['split'](',');var _0x58be91=_0xcb104f[_0x4469('0xc')]();var _0x1e2f32=_0xcb104f[_0x4469('0x33')]();if(_0x5dd1d6==='DATE'){_0x58be91=moment(_0x58be91)[_0x4469('0x34')](0x0,!![])[_0x4469('0x17')]();_0x1e2f32=moment(_0x1e2f32)[_0x4469('0x34')](0x0,!![])[_0x4469('0x16')](0x17,_0x4469('0x35'))['add'](0x3b,_0x4469('0x36'))[_0x4469('0x16')](0x3b,_0x4469('0x37'))[_0x4469('0x17')]();}_0x38c0e0={'start':_0x58be91,'end':_0x1e2f32};break;default:_0x38c0e0[_0x4469('0x31')]=_0x58be91;break;}return _0x38c0e0;} \ No newline at end of file diff --git a/server/components/parsers/qs.js b/server/components/parsers/qs.js index d1cf9cd..791a69d 100644 --- a/server/components/parsers/qs.js +++ b/server/components/parsers/qs.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xdeae=['col','unsigned','substr','DESC','omit','length','isObject','isString','unset','hasOwnProperty','isNumeric','match','getFullTextValue','forEach','includes','push','join','sequelize','moment','fields','split','DATE','parse','$gte','format','utc','$lte','YYYY-MM-DD','name','uniqueid','isArray','limit','offset','sort','priority','cast'];(function(_0x114281,_0x23c3f2){var _0x866964=function(_0x43c0f3){while(--_0x43c0f3){_0x114281['push'](_0x114281['shift']());}};_0x866964(++_0x23c3f2);}(_0xdeae,0x19d));var _0xedea=function(_0x4b438a,_0x1a45dd){_0x4b438a=_0x4b438a-0x0;var _0x2704e1=_0xdeae[_0x4b438a];return _0x2704e1;};'use strict';var _=require('lodash');var sequelize=require(_0xedea('0x0'));var moment=require(_0xedea('0x1'));var LIMIT_VALUE=0xfa;exports[_0xedea('0x2')]=function(_0x480786){var _0x5f4636=null;if(_0x480786){_0x5f4636=_0x480786[_0xedea('0x3')](',');}return _0x5f4636;};exports['filters']=function(_0x59f26e,_0x5cba04){var _0x24800c={};if(!_['isEmpty'](_0x59f26e)){_['forOwn'](_0x59f26e,function(_0x3fb519,_0x5c5dc6){try{if(_0x5cba04){var _0x1cdb14=_['find'](_0x5cba04,{'name':_0x5c5dc6})||{};if(_0x1cdb14['type']===_0xedea('0x4')&&_['isPlainObject'](_0x3fb519)){var _0x262a38=JSON[_0xedea('0x5')](_0x3fb519);var _0x248b42={'$gte':moment(moment(_0x262a38[_0xedea('0x6')])[_0xedea('0x7')]('YYYY-MM-DD'))[_0xedea('0x8')]()['format'](),'$lte':moment(moment(_0x262a38[_0xedea('0x9')])[_0xedea('0x7')](_0xedea('0xa')))['utc']()['subtract'](0x1,'s')[_0xedea('0x7')]()};_0x24800c[_0x5c5dc6]=_0x248b42;}else if(_0x1cdb14[_0xedea('0xb')]===_0xedea('0xc')){_0x24800c[_0x5c5dc6]=_0x3fb519;}else{_0x24800c[_0x5c5dc6]=_[_0xedea('0xd')](_0x3fb519)?_0x3fb519:JSON[_0xedea('0x5')](_0x3fb519);}}else{_0x24800c[_0x5c5dc6]=_[_0xedea('0xd')](_0x3fb519)?_0x3fb519:JSON[_0xedea('0x5')](_0x3fb519);}}catch(_0x29e55a){_0x24800c[_0x5c5dc6]=_0x3fb519[_0xedea('0x3')](',');}});}return _0x24800c;};exports[_0xedea('0xe')]=function(_0x471fb7){_0x471fb7=parseInt(_0x471fb7,0xa);if(!_0x471fb7||_0x471fb7<0x0){_0x471fb7=LIMIT_VALUE;}return _0x471fb7;};exports[_0xedea('0xf')]=function(_0x640689){_0x640689=parseInt(_0x640689,0xa);if(!_0x640689||_0x640689<0x0){_0x640689=0x0;}return _0x640689;};exports[_0xedea('0x10')]=function(_0x4844c8){var _0x3736e7,_0x2a1987=null;if(_0x4844c8){_0x3736e7=_0x4844c8[_0xedea('0x3')](',');_0x2a1987=_['map'](_0x3736e7,function(_0x2280bc){if(_0x2280bc['indexOf']('-')===0x0){return[_0x2280bc===_0xedea('0x11')?sequelize[_0xedea('0x12')](sequelize[_0xedea('0x13')](_0xedea('0x11')),_0xedea('0x14')):_0x2280bc[_0xedea('0x15')](0x1),_0xedea('0x16')];}else{return[_0x2280bc===_0xedea('0x11')?sequelize[_0xedea('0x12')](sequelize['col']('priority'),'unsigned'):_0x2280bc,'ASC'];}});}return _0x2a1987;};exports[_0xedea('0x17')]=function(_0x481301,_0x256902){if(_['isEmpty'](_0x481301)){return _0x481301;}if(_[_0xedea('0xd')](_0x481301)){for(var _0x32d949=0x0;_0x32d949<_0x481301[_0xedea('0x18')];_0x32d949+=0x1){_0x481301[_0x32d949]=this['omit'](_0x481301[_0x32d949],_0x256902);}return _0x481301;}if(!_[_0xedea('0x19')](_0x481301)){return _0x481301;}if(_[_0xedea('0x1a')](_0x256902)){_0x256902=[_0x256902];}if(!_['isArray'](_0x256902)){return _0x481301;}for(var _0x3e45d4=0x0;_0x3e45d4<_0x256902[_0xedea('0x18')];_0x3e45d4+=0x1){_[_0xedea('0x1b')](_0x481301,_0x256902[_0x3e45d4]);}for(var _0x510784 in _0x481301){if(_0x481301[_0xedea('0x1c')](_0x510784)){_0x481301[_0x510784]=this[_0xedea('0x17')](_0x481301[_0x510784],_0x256902);}}return _0x481301;};exports[_0xedea('0x1d')]=function(_0x2abc44){return _0x2abc44[_0xedea('0x1e')](RegExp('^[+]?[0-9]*$'))?!![]:![];};exports['isEmail']=function(_0x1addaa){return _0x1addaa[_0xedea('0x1e')](/^\S+@\S+$/)?!![]:![];};exports[_0xedea('0x1f')]=function(_0x5eaf90){var _0x4116fe=[];_0x5eaf90['split'](/[ ,]+/)[_0xedea('0x20')](function(_0x197516){_0x197516=_0x197516['replace'](/([^:]")"+/g,'$1');_0x197516='+'+_0x197516+'*';if(_0x197516[_0xedea('0x21')]('@'))_0x197516='\x22'+_0x197516+'\x22';_0x4116fe[_0xedea('0x22')](_0x197516);});return _0x4116fe[_0xedea('0x23')]('\x20');}; \ No newline at end of file +var _0x0687=['limit','offset','sort','map','indexOf','priority','cast','col','substr','unsigned','ASC','omit','isEmpty','isObject','isString','isArray','length','unset','hasOwnProperty','^[+]?[0-9]*$','isEmail','forEach','join','lodash','sequelize','moment','fields','split','filters','find','type','DATE','isPlainObject','parse','$gte','format','YYYY-MM-DD','utc','$lte','subtract','name'];(function(_0x57b54c,_0x54ce0d){var _0x59cc19=function(_0xa33bc6){while(--_0xa33bc6){_0x57b54c['push'](_0x57b54c['shift']());}};_0x59cc19(++_0x54ce0d);}(_0x0687,0x136));var _0x7068=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0x0687[_0x2dafbe];return _0x58a45a;};'use strict';var _=require(_0x7068('0x0'));var sequelize=require(_0x7068('0x1'));var moment=require(_0x7068('0x2'));var LIMIT_VALUE=0xfa;exports[_0x7068('0x3')]=function(_0x55d71e){var _0x22ac63=null;if(_0x55d71e){_0x22ac63=_0x55d71e[_0x7068('0x4')](',');}return _0x22ac63;};exports[_0x7068('0x5')]=function(_0x2a1744,_0x3e9c07){var _0x4a6cb2={};if(!_['isEmpty'](_0x2a1744)){_['forOwn'](_0x2a1744,function(_0x294fe4,_0x2a5e84){try{if(_0x3e9c07){var _0x18b971=_[_0x7068('0x6')](_0x3e9c07,{'name':_0x2a5e84})||{};if(_0x18b971[_0x7068('0x7')]===_0x7068('0x8')&&_[_0x7068('0x9')](_0x294fe4)){var _0x924ab7=JSON[_0x7068('0xa')](_0x294fe4);var _0x375ee9={'$gte':moment(moment(_0x924ab7[_0x7068('0xb')])[_0x7068('0xc')](_0x7068('0xd')))[_0x7068('0xe')]()[_0x7068('0xc')](),'$lte':moment(moment(_0x924ab7[_0x7068('0xf')])[_0x7068('0xc')](_0x7068('0xd')))[_0x7068('0xe')]()[_0x7068('0x10')](0x1,'s')[_0x7068('0xc')]()};_0x4a6cb2[_0x2a5e84]=_0x375ee9;}else if(_0x18b971[_0x7068('0x11')]==='uniqueid'){_0x4a6cb2[_0x2a5e84]=_0x294fe4;}else{_0x4a6cb2[_0x2a5e84]=_['isArray'](_0x294fe4)?_0x294fe4:JSON[_0x7068('0xa')](_0x294fe4);}}else{_0x4a6cb2[_0x2a5e84]=_['isArray'](_0x294fe4)?_0x294fe4:JSON[_0x7068('0xa')](_0x294fe4);}}catch(_0x13764c){_0x4a6cb2[_0x2a5e84]=_0x294fe4[_0x7068('0x4')](',');}});}return _0x4a6cb2;};exports[_0x7068('0x12')]=function(_0x5ccb08){_0x5ccb08=parseInt(_0x5ccb08,0xa);if(!_0x5ccb08||_0x5ccb08<0x0){_0x5ccb08=LIMIT_VALUE;}return _0x5ccb08;};exports[_0x7068('0x13')]=function(_0x2c12a2){_0x2c12a2=parseInt(_0x2c12a2,0xa);if(!_0x2c12a2||_0x2c12a2<0x0){_0x2c12a2=0x0;}return _0x2c12a2;};exports[_0x7068('0x14')]=function(_0x19cca1){var _0x181841,_0x8db3a2=null;if(_0x19cca1){_0x181841=_0x19cca1[_0x7068('0x4')](',');_0x8db3a2=_[_0x7068('0x15')](_0x181841,function(_0x435bba){if(_0x435bba[_0x7068('0x16')]('-')===0x0){return[_0x435bba===_0x7068('0x17')?sequelize[_0x7068('0x18')](sequelize[_0x7068('0x19')](_0x7068('0x17')),'unsigned'):_0x435bba[_0x7068('0x1a')](0x1),'DESC'];}else{return[_0x435bba===_0x7068('0x17')?sequelize[_0x7068('0x18')](sequelize[_0x7068('0x19')](_0x7068('0x17')),_0x7068('0x1b')):_0x435bba,_0x7068('0x1c')];}});}return _0x8db3a2;};exports[_0x7068('0x1d')]=function(_0x3f676d,_0x49d08d){if(_[_0x7068('0x1e')](_0x3f676d)){return _0x3f676d;}if(_['isArray'](_0x3f676d)){for(var _0x35b839=0x0;_0x35b839<_0x3f676d['length'];_0x35b839+=0x1){_0x3f676d[_0x35b839]=this[_0x7068('0x1d')](_0x3f676d[_0x35b839],_0x49d08d);}return _0x3f676d;}if(!_[_0x7068('0x1f')](_0x3f676d)){return _0x3f676d;}if(_[_0x7068('0x20')](_0x49d08d)){_0x49d08d=[_0x49d08d];}if(!_[_0x7068('0x21')](_0x49d08d)){return _0x3f676d;}for(var _0x582044=0x0;_0x582044<_0x49d08d[_0x7068('0x22')];_0x582044+=0x1){_[_0x7068('0x23')](_0x3f676d,_0x49d08d[_0x582044]);}for(var _0x45db14 in _0x3f676d){if(_0x3f676d[_0x7068('0x24')](_0x45db14)){_0x3f676d[_0x45db14]=this['omit'](_0x3f676d[_0x45db14],_0x49d08d);}}return _0x3f676d;};exports['isNumeric']=function(_0x3ab45e){return _0x3ab45e['match'](RegExp(_0x7068('0x25')))?!![]:![];};exports[_0x7068('0x26')]=function(_0x2ec009){return _0x2ec009['match'](/^\S+@\S+$/)?!![]:![];};exports['getFullTextValue']=function(_0x204256){var _0x3ceece=[];_0x204256[_0x7068('0x4')](/[ ,]+/)[_0x7068('0x27')](function(_0x7c30f9){_0x7c30f9=_0x7c30f9['replace'](/([^:]")"+/g,'$1');_0x7c30f9='+'+_0x7c30f9+'*';if(_0x7c30f9['includes']('@'))_0x7c30f9='\x22'+_0x7c30f9+'\x22';_0x3ceece['push'](_0x7c30f9);});return _0x3ceece[_0x7068('0x28')]('\x20');}; \ No newline at end of file diff --git a/server/config/express.js b/server/config/express.js index 5ea916d..3d6a18d 100644 --- a/server/config/express.js +++ b/server/config/express.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x87e8=['get','env','production','set','appPath','join','root','public','development','test','client','use','json\x20replacer','toISOString','split','static','views','html','renderFile','urlencoded','json','50mb','express','body-parser','cookie-parser','errorhandler','path','moment','../mysqldb','default'];(function(_0x3f1cea,_0x4bcfa8){var _0x34be42=function(_0x293168){while(--_0x293168){_0x3f1cea['push'](_0x3f1cea['shift']());}};_0x34be42(++_0x4bcfa8);}(_0x87e8,0x19c));var _0x887e=function(_0x57b6bb,_0x4f1ea6){_0x57b6bb=_0x57b6bb-0x0;var _0x39a128=_0x87e8[_0x57b6bb];return _0x39a128;};'use strict';var express=require(_0x887e('0x0'));var favicon=require('serve-favicon');var bodyParser=require(_0x887e('0x1'));var methodOverride=require('method-override');var cookieParser=require(_0x887e('0x2'));var errorHandler=require(_0x887e('0x3'));var path=require(_0x887e('0x4'));var passport=require('passport');var cors=require('cors');var moment=require(_0x887e('0x5'));var config=require('./environment');var db=require(_0x887e('0x6'))['db'];exports[_0x887e('0x7')]=function(_0x338eca){var _0xaaec27=_0x338eca[_0x887e('0x8')](_0x887e('0x9'));if(_0xaaec27===_0x887e('0xa')){_0x338eca[_0x887e('0xb')](_0x887e('0xc'),path[_0x887e('0xd')](config[_0x887e('0xe')],_0x887e('0xf')));}if(_0xaaec27===_0x887e('0x10')||_0xaaec27===_0x887e('0x11')){_0x338eca[_0x887e('0xb')]('appPath',path[_0x887e('0xd')](config[_0x887e('0xe')],_0x887e('0x12')));_0x338eca[_0x887e('0x13')](errorHandler());}_0x338eca['set'](_0x887e('0x14'),function(_0x48390f,_0x417186){if(this[_0x48390f]instanceof Date){_0x417186=this[_0x48390f][_0x887e('0x15')]()[_0x887e('0x16')]('.')[0x0]+'Z';}return _0x417186;});_0x338eca[_0x887e('0x13')](express[_0x887e('0x17')](_0x338eca['get'](_0x887e('0xc'))));_0x338eca[_0x887e('0xb')](_0x887e('0x18'),config[_0x887e('0xe')]+'/server/views');_0x338eca['engine'](_0x887e('0x19'),require('ejs')[_0x887e('0x1a')]);_0x338eca[_0x887e('0xb')]('view\x20engine',_0x887e('0x19'));_0x338eca[_0x887e('0x13')](bodyParser[_0x887e('0x1b')]({'limit':'50mb','extended':!![]}));_0x338eca[_0x887e('0x13')](bodyParser[_0x887e('0x1c')]({'limit':_0x887e('0x1d')}));_0x338eca['use'](cors());_0x338eca[_0x887e('0x13')](methodOverride());_0x338eca[_0x887e('0x13')](cookieParser());_0x338eca[_0x887e('0x13')](passport['initialize']());}; \ No newline at end of file +var _0xad24=['appPath','root','public','test','set','client','use','json\x20replacer','split','static','get','views','html','ejs','renderFile','view\x20engine','urlencoded','50mb','json','initialize','express','serve-favicon','body-parser','cookie-parser','errorhandler','path','cors','./environment','default','env','production'];(function(_0x3b6c59,_0x10c316){var _0x6d60c8=function(_0x4c38f9){while(--_0x4c38f9){_0x3b6c59['push'](_0x3b6c59['shift']());}};_0x6d60c8(++_0x10c316);}(_0xad24,0x14a));var _0x4ad2=function(_0x47d9ea,_0x1a03e3){_0x47d9ea=_0x47d9ea-0x0;var _0x23940d=_0xad24[_0x47d9ea];return _0x23940d;};'use strict';var express=require(_0x4ad2('0x0'));var favicon=require(_0x4ad2('0x1'));var bodyParser=require(_0x4ad2('0x2'));var methodOverride=require('method-override');var cookieParser=require(_0x4ad2('0x3'));var errorHandler=require(_0x4ad2('0x4'));var path=require(_0x4ad2('0x5'));var passport=require('passport');var cors=require(_0x4ad2('0x6'));var moment=require('moment');var config=require(_0x4ad2('0x7'));var db=require('../mysqldb')['db'];exports[_0x4ad2('0x8')]=function(_0x55c858){var _0xc88be=_0x55c858['get'](_0x4ad2('0x9'));if(_0xc88be===_0x4ad2('0xa')){_0x55c858['set'](_0x4ad2('0xb'),path['join'](config[_0x4ad2('0xc')],_0x4ad2('0xd')));}if(_0xc88be==='development'||_0xc88be===_0x4ad2('0xe')){_0x55c858[_0x4ad2('0xf')]('appPath',path['join'](config['root'],_0x4ad2('0x10')));_0x55c858[_0x4ad2('0x11')](errorHandler());}_0x55c858[_0x4ad2('0xf')](_0x4ad2('0x12'),function(_0x1e2b29,_0x4569a3){if(this[_0x1e2b29]instanceof Date){_0x4569a3=this[_0x1e2b29]['toISOString']()[_0x4ad2('0x13')]('.')[0x0]+'Z';}return _0x4569a3;});_0x55c858[_0x4ad2('0x11')](express[_0x4ad2('0x14')](_0x55c858[_0x4ad2('0x15')](_0x4ad2('0xb'))));_0x55c858[_0x4ad2('0xf')](_0x4ad2('0x16'),config[_0x4ad2('0xc')]+'/server/views');_0x55c858['engine'](_0x4ad2('0x17'),require(_0x4ad2('0x18'))[_0x4ad2('0x19')]);_0x55c858[_0x4ad2('0xf')](_0x4ad2('0x1a'),_0x4ad2('0x17'));_0x55c858[_0x4ad2('0x11')](bodyParser[_0x4ad2('0x1b')]({'limit':_0x4ad2('0x1c'),'extended':!![]}));_0x55c858[_0x4ad2('0x11')](bodyParser[_0x4ad2('0x1d')]({'limit':_0x4ad2('0x1c')}));_0x55c858[_0x4ad2('0x11')](cors());_0x55c858[_0x4ad2('0x11')](methodOverride());_0x55c858[_0x4ad2('0x11')](cookieParser());_0x55c858[_0x4ad2('0x11')](passport[_0x4ad2('0x1e')]());}; \ No newline at end of file diff --git a/server/config/license/hardware.js b/server/config/license/hardware.js index c67086e..514a425 100644 --- a/server/config/license/hardware.js +++ b/server/config/license/hardware.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd43f=['update','digest','getUuid','platform','licenseToken','test','win32','dmidecode\x20--string\x20system-uuid','replace','hostname','ipAddress','createHash','hex','substring','crypto','bimedia-machine-uuid','execSync','../environment','networkInterfaces','orderBy','keys','family','IPv4','internal','concat','mac','00:00:00:00:00:00','address','getFirstInterface','cpus','map','model','join','md5'];(function(_0x4a643a,_0x7e1eec){var _0x288685=function(_0x3d9942){while(--_0x3d9942){_0x4a643a['push'](_0x4a643a['shift']());}};_0x288685(++_0x7e1eec);}(_0xd43f,0x96));var _0xfd43=function(_0x4a2183,_0x53e74d){_0x4a2183=_0x4a2183-0x0;var _0xc7c01d=_0xd43f[_0x4a2183];return _0xc7c01d;};'use strict';var _=require('lodash');var os=require('os');var crypto=require(_0xfd43('0x0'));var machine=require(_0xfd43('0x1'));var exec=require('child_process')[_0xfd43('0x2')];var config=require(_0xfd43('0x3'));function getInterfaces(){var _0xddcfae=[];var _0x41ba51=os[_0xfd43('0x4')]();var _0x11363e=_[_0xfd43('0x5')](_[_0xfd43('0x6')](_0x41ba51));for(var _0x3f8bb5=0x0;_0x3f8bb5<_0x11363e['length'];_0x3f8bb5++){var _0x1a801b=_0x41ba51[_0x11363e[_0x3f8bb5]]['filter'](function(_0x2604e8){return _0x2604e8[_0xfd43('0x7')]===_0xfd43('0x8')&&_0x2604e8[_0xfd43('0x9')]===![];});_0xddcfae=_0xddcfae[_0xfd43('0xa')](_0x1a801b);}return _0xddcfae;}function getFirstInterface(){var _0x1cbf9e=_['head'](getInterfaces());return{'macAddress':_0x1cbf9e&&_0x1cbf9e[_0xfd43('0xb')]?_0x1cbf9e['mac']:_0xfd43('0xc'),'ipAddress':_0x1cbf9e&&_0x1cbf9e[_0xfd43('0xd')]?_0x1cbf9e[_0xfd43('0xd')]:'127.0.0.1'};}exports[_0xfd43('0xe')]=getFirstInterface;function getCPUhash(){var _0x2e07fd=_[_0xfd43('0x5')](os[_0xfd43('0xf')]()[_0xfd43('0x10')](function(_0x11090c){return _0x11090c[_0xfd43('0x11')];}))[_0xfd43('0x12')](':');return crypto['createHash'](_0xfd43('0x13'))[_0xfd43('0x14')](_0x2e07fd)[_0xfd43('0x15')]('hex');}exports[_0xfd43('0x16')]=function(){var _0x1a8956=os[_0xfd43('0x17')]();var _0x462f9d=/[0-9a-f-]{36}/;if(config[_0xfd43('0x18')]&&_0x462f9d[_0xfd43('0x19')](config[_0xfd43('0x18')])){return config[_0xfd43('0x18')];}else if(_0x1a8956===_0xfd43('0x1a')){return exec(_0xfd43('0x1b'),{'encoding':'utf8'})[_0xfd43('0x1c')]('\x0d\x0a','');}else{var _0x4b0f1e=getFirstInterface();var _0x349e67=getCPUhash();var _0x5a85b8=_0x349e67+'|'+os[_0xfd43('0x1d')]()+'|'+_0x4b0f1e['macAddress']+'|'+_0x4b0f1e[_0xfd43('0x1e')];var _0x3d6a08=crypto[_0xfd43('0x1f')](_0xfd43('0x13'))[_0xfd43('0x14')](_0x5a85b8)[_0xfd43('0x15')](_0xfd43('0x20'));return _0x3d6a08[_0xfd43('0x21')](0x0,0x8)+'-'+_0x3d6a08[_0xfd43('0x21')](0x8,0xc)+'-'+_0x3d6a08['substring'](0xc,0x10)+'-'+_0x3d6a08[_0xfd43('0x21')](0x10,0x14)+'-'+_0x3d6a08['substring'](0x14);}}; \ No newline at end of file +var _0xdcf8=['execSync','../environment','networkInterfaces','keys','length','filter','family','IPv4','internal','concat','head','mac','00:00:00:00:00:00','address','127.0.0.1','getFirstInterface','orderBy','cpus','model','join','md5','update','digest','hex','getUuid','platform','licenseToken','hostname','ipAddress','substring','lodash','crypto','child_process'];(function(_0x4024bd,_0x164def){var _0x5cbe79=function(_0x495981){while(--_0x495981){_0x4024bd['push'](_0x4024bd['shift']());}};_0x5cbe79(++_0x164def);}(_0xdcf8,0xa2));var _0x8dcf=function(_0x3947c9,_0x4d6c97){_0x3947c9=_0x3947c9-0x0;var _0x2e7871=_0xdcf8[_0x3947c9];return _0x2e7871;};'use strict';var _=require(_0x8dcf('0x0'));var os=require('os');var crypto=require(_0x8dcf('0x1'));var machine=require('bimedia-machine-uuid');var exec=require(_0x8dcf('0x2'))[_0x8dcf('0x3')];var config=require(_0x8dcf('0x4'));function getInterfaces(){var _0x48790e=[];var _0x57b972=os[_0x8dcf('0x5')]();var _0x5375ec=_['orderBy'](_[_0x8dcf('0x6')](_0x57b972));for(var _0x1ac826=0x0;_0x1ac826<_0x5375ec[_0x8dcf('0x7')];_0x1ac826++){var _0x5a793d=_0x57b972[_0x5375ec[_0x1ac826]][_0x8dcf('0x8')](function(_0x504d3e){return _0x504d3e[_0x8dcf('0x9')]===_0x8dcf('0xa')&&_0x504d3e[_0x8dcf('0xb')]===![];});_0x48790e=_0x48790e[_0x8dcf('0xc')](_0x5a793d);}return _0x48790e;}function getFirstInterface(){var _0x191cf2=_[_0x8dcf('0xd')](getInterfaces());return{'macAddress':_0x191cf2&&_0x191cf2[_0x8dcf('0xe')]?_0x191cf2[_0x8dcf('0xe')]:_0x8dcf('0xf'),'ipAddress':_0x191cf2&&_0x191cf2[_0x8dcf('0x10')]?_0x191cf2[_0x8dcf('0x10')]:_0x8dcf('0x11')};}exports[_0x8dcf('0x12')]=getFirstInterface;function getCPUhash(){var _0x25856f=_[_0x8dcf('0x13')](os[_0x8dcf('0x14')]()['map'](function(_0x3cf2d6){return _0x3cf2d6[_0x8dcf('0x15')];}))[_0x8dcf('0x16')](':');return crypto['createHash'](_0x8dcf('0x17'))[_0x8dcf('0x18')](_0x25856f)[_0x8dcf('0x19')](_0x8dcf('0x1a'));}exports[_0x8dcf('0x1b')]=function(){var _0x9a1c18=os[_0x8dcf('0x1c')]();var _0x27fe03=/[0-9a-f-]{36}/;if(config['licenseToken']&&_0x27fe03['test'](config[_0x8dcf('0x1d')])){return config[_0x8dcf('0x1d')];}else if(_0x9a1c18==='win32'){return exec('dmidecode\x20--string\x20system-uuid',{'encoding':'utf8'})['replace']('\x0d\x0a','');}else{var _0x1174e4=getFirstInterface();var _0x4f57a7=getCPUhash();var _0x1e1ba6=_0x4f57a7+'|'+os[_0x8dcf('0x1e')]()+'|'+_0x1174e4['macAddress']+'|'+_0x1174e4[_0x8dcf('0x1f')];var _0x103dc2=crypto['createHash'](_0x8dcf('0x17'))[_0x8dcf('0x18')](_0x1e1ba6)['digest'](_0x8dcf('0x1a'));return _0x103dc2[_0x8dcf('0x20')](0x0,0x8)+'-'+_0x103dc2[_0x8dcf('0x20')](0x8,0xc)+'-'+_0x103dc2['substring'](0xc,0x10)+'-'+_0x103dc2[_0x8dcf('0x20')](0x10,0x14)+'-'+_0x103dc2[_0x8dcf('0x20')](0x14);}}; \ No newline at end of file diff --git a/server/config/license/index.js b/server/config/license/index.js index de07da7..8debdf1 100644 --- a/server/config/license/index.js +++ b/server/config/license/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa17b=['bluebird','pkginfo','version','../../mysqldb','../logger','license','%s/api/servers/%s/check?version=%s','format','%s/api/servers/%s/check?version=%s&oldtoken=%s','exports','then','catch','get','active','data2','THE\x20LICENSE\x20HAS\x20BEEN\x20ENABLED','update','Disabled','info','THE\x20LICENSE\x20HAS\x20BEEN\x20DISABLED','NEW\x20UUID\x20DETECTED:\x20FROM\x20%s\x20TO\x20%s','data1','%s\x20-\x20GRAY\x20PERIOD\x20STARTED\x20AT\x20%s','toUpperCase','YYYY-MM-DD\x20HH:mm','encryptString','diff','decryptString','days','DEMO\x20START\x20AT\x20%s','error','message','License','findOrCreate','spread','SERVICE\x20LICENSE\x20STARTED\x20%s','default','moment','request-promise'];(function(_0x2c5686,_0xac6448){var _0x57106f=function(_0xece46a){while(--_0xece46a){_0x2c5686['push'](_0x2c5686['shift']());}};_0x57106f(++_0xac6448);}(_0xa17b,0x15d));var _0xba17=function(_0x1368e7,_0x2e7ac6){_0x1368e7=_0x1368e7-0x0;var _0x1768cf=_0xa17b[_0x1368e7];return _0x1768cf;};'use strict';var util=require('util');var moment=require(_0xba17('0x0'));var rp=require(_0xba17('0x1'));var BPromise=require(_0xba17('0x2'));var pkginfo=require(_0xba17('0x3'))(module,_0xba17('0x4'));var db=require(_0xba17('0x5'))['db'];var encryptor=require('../../components/encryptor');var hardware=require('./hardware');var logger=require(_0xba17('0x6'))(_0xba17('0x7'));var HOST='https://www.xcallymotion.com';var TIME=0x3c*0x1388;var DAYS=0x7;var GRAY_PERIOD_REASON;var oldToken;var isOldTokenSent=![];function httpRequest(_0x45dd59){return new BPromise(function(_0x24c344,_0x5a0533){var _0x51f1d4=util['format'](_0xba17('0x8'),HOST,_0x45dd59,module['exports'][_0xba17('0x4')]);if(oldToken){_0x51f1d4=util[_0xba17('0x9')](_0xba17('0xa'),HOST,_0x45dd59,module[_0xba17('0xb')][_0xba17('0x4')],oldToken);}var _0x3e476f={'uri':_0x51f1d4,'method':'GET','timeout':0xea60,'json':!![]};return rp(_0x3e476f)[_0xba17('0xc')](function(_0xd4d18c){_0x24c344(_0xd4d18c);})[_0xba17('0xd')](function(_0x2230fc){_0x5a0533(_0x2230fc);});});}function manageLicense(_0x1362e8,_0x126d9d){var _0x411e29=_0x126d9d[_0xba17('0xe')]({'plain':!![]});if(!isOldTokenSent&&_0x411e29['data1']!==_0x1362e8&&!_0x411e29['data2']){oldToken=_0x411e29['data1'];}httpRequest(_0x1362e8)[_0xba17('0xc')](function(_0x1eb06e){if(oldToken){oldToken=undefined;isOldTokenSent=!![];}if(_0x1eb06e[_0xba17('0xf')]){isOldTokenSent=![];if(!_0x411e29[_0xba17('0x7')]&&_0x411e29[_0xba17('0x7')]!=_0x1eb06e['license']||_0x411e29[_0xba17('0x7')]&&_0x411e29[_0xba17('0x10')]){logger['info'](_0xba17('0x11'));}if(_0x411e29['license']&&!_0x411e29[_0xba17('0x10')]&&_0x411e29[_0xba17('0x7')]!=_0x1eb06e['license']){logger['info']('THE\x20LICENSE\x20HAS\x20BEEN\x20UPDATED');}if(_0x411e29[_0xba17('0x7')]&&!_0x411e29[_0xba17('0x10')]&&_0x411e29['license']==_0x1eb06e[_0xba17('0x7')]){return _0x126d9d;}return _0x126d9d[_0xba17('0x12')]({'data1':_0x1362e8,'data2':null,'license':_0x1eb06e['license']});}else{if(_0x1eb06e[_0xba17('0x7')]||_0x411e29[_0xba17('0x7')]){if(!_0x411e29[_0xba17('0x10')]){if(_0x411e29['data1']==_0x1362e8){GRAY_PERIOD_REASON=_0xba17('0x13');logger[_0xba17('0x14')](_0xba17('0x15'));}else{GRAY_PERIOD_REASON='Changed';logger[_0xba17('0x14')](_0xba17('0x16'),_0x411e29[_0xba17('0x17')],_0x1362e8);}logger['info'](_0xba17('0x18'),GRAY_PERIOD_REASON[_0xba17('0x19')](),moment()[_0xba17('0x9')](_0xba17('0x1a')));return _0x126d9d['update']({'data2':encryptor[_0xba17('0x1b')](moment()[_0xba17('0x9')](_0xba17('0x1a')))});}else{if(moment()[_0xba17('0x1c')](encryptor[_0xba17('0x1d')](_0x411e29[_0xba17('0x10')]),_0xba17('0x1e'))>DAYS){logger[_0xba17('0x14')](_0xba17('0x1f'),moment()['format']('YYYY-MM-DD\x20HH:mm'));isOldTokenSent=![];return _0x126d9d[_0xba17('0x12')]({'data1':_0x1362e8,'data2':null,'license':null});}}}else{if(_0x411e29[_0xba17('0x17')]!=_0x1362e8){logger['info']('NEW\x20UUID\x20DETECTED:\x20FROM\x20%s\x20TO\x20%s',_0x411e29[_0xba17('0x17')],_0x1362e8);return _0x126d9d[_0xba17('0x12')]({'data1':_0x1362e8,'data2':null,'license':null});}}}return _0x126d9d;})[_0xba17('0xc')](function(_0x49e5c1){_0x126d9d=_0x49e5c1;})[_0xba17('0xd')](function(_0x17b924){logger[_0xba17('0x20')](_0x17b924[_0xba17('0x21')]);})['finally'](function(){setTimeout(function(){manageLicense(hardware['getUuid'](),_0x126d9d);},TIME);});}function defaultLicense(){var _0x403edf=hardware['getUuid']();if(_0x403edf){return db[_0xba17('0x22')][_0xba17('0x23')]({'where':{'id':0x1},'defaults':{'data1':_0x403edf}})[_0xba17('0x24')](function(_0x466ffd,_0x14a8ec){logger[_0xba17('0x14')](_0xba17('0x25'),_0x403edf);manageLicense(_0x403edf,_0x466ffd);})[_0xba17('0xd')](function(_0x50476d){logger['error'](_0x50476d[_0xba17('0x21')]);});}}exports[_0xba17('0x26')]=defaultLicense; \ No newline at end of file +var _0xba83=['message','default','util','moment','request-promise','bluebird','version','../../mysqldb','../../components/encryptor','./hardware','../logger','license','https://www.xcallymotion.com','format','%s/api/servers/%s/check?version=%s','exports','GET','then','get','data2','data1','info','Disabled','THE\x20LICENSE\x20HAS\x20BEEN\x20DISABLED','NEW\x20UUID\x20DETECTED:\x20FROM\x20%s\x20TO\x20%s','%s\x20-\x20GRAY\x20PERIOD\x20STARTED\x20AT\x20%s','toUpperCase','update','encryptString','YYYY-MM-DD\x20HH:mm','diff','decryptString','DEMO\x20START\x20AT\x20%s','catch','finally','getUuid','License','findOrCreate','SERVICE\x20LICENSE\x20STARTED\x20%s','error'];(function(_0x35c286,_0x53826e){var _0x1a3fbd=function(_0x480c3b){while(--_0x480c3b){_0x35c286['push'](_0x35c286['shift']());}};_0x1a3fbd(++_0x53826e);}(_0xba83,0x7a));var _0x3ba8=function(_0xb65e77,_0x238c3d){_0xb65e77=_0xb65e77-0x0;var _0x38134b=_0xba83[_0xb65e77];return _0x38134b;};'use strict';var util=require(_0x3ba8('0x0'));var moment=require(_0x3ba8('0x1'));var rp=require(_0x3ba8('0x2'));var BPromise=require(_0x3ba8('0x3'));var pkginfo=require('pkginfo')(module,_0x3ba8('0x4'));var db=require(_0x3ba8('0x5'))['db'];var encryptor=require(_0x3ba8('0x6'));var hardware=require(_0x3ba8('0x7'));var logger=require(_0x3ba8('0x8'))(_0x3ba8('0x9'));var HOST=_0x3ba8('0xa');var TIME=0x3c*0x1388;var DAYS=0x7;var GRAY_PERIOD_REASON;var oldToken;var isOldTokenSent=![];function httpRequest(_0x3f1ae7){return new BPromise(function(_0x1f9d84,_0x126077){var _0x4c5610=util[_0x3ba8('0xb')](_0x3ba8('0xc'),HOST,_0x3f1ae7,module[_0x3ba8('0xd')][_0x3ba8('0x4')]);if(oldToken){_0x4c5610=util[_0x3ba8('0xb')]('%s/api/servers/%s/check?version=%s&oldtoken=%s',HOST,_0x3f1ae7,module[_0x3ba8('0xd')][_0x3ba8('0x4')],oldToken);}var _0x40736d={'uri':_0x4c5610,'method':_0x3ba8('0xe'),'timeout':0xea60,'json':!![]};return rp(_0x40736d)[_0x3ba8('0xf')](function(_0x50899d){_0x1f9d84(_0x50899d);})['catch'](function(_0x4b4472){_0x126077(_0x4b4472);});});}function manageLicense(_0x49d7d2,_0x189093){var _0x3a6346=_0x189093[_0x3ba8('0x10')]({'plain':!![]});if(!isOldTokenSent&&_0x3a6346['data1']!==_0x49d7d2&&!_0x3a6346[_0x3ba8('0x11')]){oldToken=_0x3a6346[_0x3ba8('0x12')];}httpRequest(_0x49d7d2)[_0x3ba8('0xf')](function(_0x8fe373){if(oldToken){oldToken=undefined;isOldTokenSent=!![];}if(_0x8fe373['active']){isOldTokenSent=![];if(!_0x3a6346['license']&&_0x3a6346['license']!=_0x8fe373[_0x3ba8('0x9')]||_0x3a6346['license']&&_0x3a6346[_0x3ba8('0x11')]){logger[_0x3ba8('0x13')]('THE\x20LICENSE\x20HAS\x20BEEN\x20ENABLED');}if(_0x3a6346['license']&&!_0x3a6346[_0x3ba8('0x11')]&&_0x3a6346[_0x3ba8('0x9')]!=_0x8fe373[_0x3ba8('0x9')]){logger['info']('THE\x20LICENSE\x20HAS\x20BEEN\x20UPDATED');}if(_0x3a6346['license']&&!_0x3a6346['data2']&&_0x3a6346[_0x3ba8('0x9')]==_0x8fe373[_0x3ba8('0x9')]){return _0x189093;}return _0x189093['update']({'data1':_0x49d7d2,'data2':null,'license':_0x8fe373[_0x3ba8('0x9')]});}else{if(_0x8fe373[_0x3ba8('0x9')]||_0x3a6346['license']){if(!_0x3a6346[_0x3ba8('0x11')]){if(_0x3a6346[_0x3ba8('0x12')]==_0x49d7d2){GRAY_PERIOD_REASON=_0x3ba8('0x14');logger[_0x3ba8('0x13')](_0x3ba8('0x15'));}else{GRAY_PERIOD_REASON='Changed';logger[_0x3ba8('0x13')](_0x3ba8('0x16'),_0x3a6346['data1'],_0x49d7d2);}logger[_0x3ba8('0x13')](_0x3ba8('0x17'),GRAY_PERIOD_REASON[_0x3ba8('0x18')](),moment()['format']('YYYY-MM-DD\x20HH:mm'));return _0x189093[_0x3ba8('0x19')]({'data2':encryptor[_0x3ba8('0x1a')](moment()['format'](_0x3ba8('0x1b')))});}else{if(moment()[_0x3ba8('0x1c')](encryptor[_0x3ba8('0x1d')](_0x3a6346[_0x3ba8('0x11')]),'days')>DAYS){logger[_0x3ba8('0x13')](_0x3ba8('0x1e'),moment()[_0x3ba8('0xb')](_0x3ba8('0x1b')));isOldTokenSent=![];return _0x189093[_0x3ba8('0x19')]({'data1':_0x49d7d2,'data2':null,'license':null});}}}else{if(_0x3a6346['data1']!=_0x49d7d2){logger[_0x3ba8('0x13')](_0x3ba8('0x16'),_0x3a6346['data1'],_0x49d7d2);return _0x189093[_0x3ba8('0x19')]({'data1':_0x49d7d2,'data2':null,'license':null});}}}return _0x189093;})['then'](function(_0x502b42){_0x189093=_0x502b42;})[_0x3ba8('0x1f')](function(_0x26508c){logger['error'](_0x26508c['message']);})[_0x3ba8('0x20')](function(){setTimeout(function(){manageLicense(hardware['getUuid'](),_0x189093);},TIME);});}function defaultLicense(){var _0x1d33e7=hardware[_0x3ba8('0x21')]();if(_0x1d33e7){return db[_0x3ba8('0x22')][_0x3ba8('0x23')]({'where':{'id':0x1},'defaults':{'data1':_0x1d33e7}})['spread'](function(_0x4601f3,_0x64a37b){logger['info'](_0x3ba8('0x24'),_0x1d33e7);manageLicense(_0x1d33e7,_0x4601f3);})[_0x3ba8('0x1f')](function(_0x4f2de4){logger[_0x3ba8('0x25')](_0x4f2de4[_0x3ba8('0x26')]);});}}exports[_0x3ba8('0x27')]=defaultLicense; \ No newline at end of file diff --git a/server/config/license/util.js b/server/config/license/util.js index 92c9a37..2f9dd78 100644 --- a/server/config/license/util.js +++ b/server/config/license/util.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9308=['telephone','users','telephones','forEach','count','countBy','License\x20limit\x20reached\x20for\x20users','License\x20limit\x20reached\x20for\x20telephones','catch','exports','util','lodash','moment','bluebird','../../components/encryptor','../../mysqldb','2027-01-01T00:00:00.000Z','Demo\x20license','getUuid','Breaking\x20license','License','then','license','isEmpty','data1','data2','split','decryptString','format','parse','uuid','machineUuid','gray','deadline','days','disabled','message','User','findAll','role','sequelize','COUNT','col','admin','user'];(function(_0x68c979,_0x431cff){var _0x4f0001=function(_0xa7595d){while(--_0xa7595d){_0x68c979['push'](_0x68c979['shift']());}};_0x4f0001(++_0x431cff);}(_0x9308,0x19f));var _0x8930=function(_0x3bf83f,_0x181cac){_0x3bf83f=_0x3bf83f-0x0;var _0x22c4a9=_0x9308[_0x3bf83f];return _0x22c4a9;};'use strict';var util=require(_0x8930('0x0'));var _=require(_0x8930('0x1'));var moment=require(_0x8930('0x2'));var BPromise=require(_0x8930('0x3'));var hardware=require('./hardware');var encryptor=require(_0x8930('0x4'));var db=require(_0x8930('0x5'))['db'];const demoLicense={'demo':!![],'agents':0x2,'telephones':0x0,'users':0x1,'expiration':_0x8930('0x6'),'chat':![],'mail':![],'fax':![],'messaging':![],'whatsapp':![],'cm':![],'dialer':![],'jscripty':![],'openchannel':![],'callysquare':0x2,'webrtc':![],'jaws':![],'custom':![],'description':_0x8930('0x7'),'machineUuid':hardware[_0x8930('0x8')](),'virtual':0x0,'voice':!![],'screenrecording':![],'preferred':![],'ai':![]};const breakingLicense={'breaking':!![],'demo':!![],'agents':0x2,'telephones':0x0,'users':0x1,'expiration':'2027-01-01T00:00:00.000Z','chat':![],'mail':![],'fax':![],'messaging':![],'whatsapp':![],'cm':![],'dialer':![],'jscripty':![],'openchannel':![],'callysquare':0x2,'webrtc':![],'jaws':![],'custom':![],'update':![],'description':_0x8930('0x9'),'machineUuid':hardware[_0x8930('0x8')](),'virtual':0x0,'voice':!![],'screenrecording':![],'preferred':![],'ai':![]};function getLicense(_0x4aca9a){return new BPromise(function(_0x43f529,_0x433d5c){return db[_0x8930('0xa')]['find'](_['defaults'](_0x4aca9a,{'raw':!![],'where':{'id':0x1}}))[_0x8930('0xb')](function(_0x4f8fb1){return checkLicense(_0x4f8fb1,null);})[_0x8930('0xb')](function(_0x4332ca){_0x43f529(_0x4332ca);return;})['catch'](function(_0x5b6f03){_0x433d5c(_0x5b6f03);});});}function checkLicense(_0x400968,_0x48eb9a){if(!_0x400968){demoLicense['uuid']=_0x400968['data1'];return demoLicense;}try{var _0x412664=_0x48eb9a||_0x400968[_0x8930('0xc')];if(_[_0x8930('0xd')](_0x412664)){throw new Error('License\x20key\x20value\x20not\x20found');}var _0xe9142=_0x400968[_0x8930('0xe')];var _0x36681e=_0x400968[_0x8930('0xf')];var _0x397be0=_0xe9142[_0x8930('0x10')]('-')[0x4];var _0x3592d8=_0xe9142[_0x8930('0x10')]('-')[0x0];var _0x4db49b=encryptor[_0x8930('0x11')](_0x412664,util[_0x8930('0x12')]('%s:%s:%s',_0x397be0,_0xe9142,_0x3592d8));var _0x453a38=JSON[_0x8930('0x13')](_0x4db49b);_0x453a38['demo']=![];_0x453a38[_0x8930('0x14')]=_0xe9142;_0x453a38[_0x8930('0x15')]=hardware[_0x8930('0x8')]();if(_0x36681e){var _0xb048d0=encryptor[_0x8930('0x11')](_0x36681e);_0x453a38[_0x8930('0x16')]=_0xb048d0;_0x453a38[_0x8930('0x17')]=moment(_0xb048d0)['add'](0x7,_0x8930('0x18'))[_0x8930('0x12')]();_0x453a38['grayReason']=_0x453a38[_0x8930('0x14')]!=_0x453a38[_0x8930('0x15')]?'changed':_0x8930('0x19');}return _0x453a38;}catch(_0x145793){breakingLicense[_0x8930('0x14')]=_0x400968[_0x8930('0xe')];breakingLicense[_0x8930('0x1a')]=_0x145793[_0x8930('0x1a')];return breakingLicense;}}function getLimits(){return new BPromise(function(_0x5f1d09,_0x2a71dc){getLicense()[_0x8930('0xb')](function(_0x16eea0){return db[_0x8930('0x1b')][_0x8930('0x1c')]({'attributes':[_0x8930('0x1d'),[db[_0x8930('0x1e')]['fn'](_0x8930('0x1f'),db[_0x8930('0x1e')][_0x8930('0x20')](_0x8930('0x1d'))),'count']],'group':_0x8930('0x1d'),'where':{'role':{'$or':[_0x8930('0x21'),_0x8930('0x22'),_0x8930('0x23')]}},'raw':!![]})['then'](function(_0x20ac3){var _0x2e0986={'user':_0x16eea0[_0x8930('0x24')]||0x0,'telephone':_0x16eea0[_0x8930('0x25')]||0x0};_0x20ac3[_0x8930('0x26')](function(_0x132118){var _0x3348c7=_0x132118[_0x8930('0x1d')]===_0x8930('0x21')?_0x8930('0x22'):_0x132118['role'];_0x2e0986[_0x3348c7]-=_0x132118[_0x8930('0x27')];if(_0x2e0986[_0x3348c7]<0x0)_0x2e0986[_0x3348c7]=0x0;});_0x5f1d09(_0x2e0986);return;});})['catch'](function(_0x2d41c4){_0x2a71dc(_0x2d41c4);});});}function checkUserLimits(_0x50d923){return new BPromise(function(_0x1e95cf,_0x174a3e){getLimits()[_0x8930('0xb')](function(_0x463130){var _0x577883=_['pick'](_[_0x8930('0x28')](_0x50d923,_0x8930('0x1d')),[_0x8930('0x21'),'user','telephone']);var _0x4a0e22=(_0x577883[_0x8930('0x21')]||0x0)+(_0x577883[_0x8930('0x22')]||0x0);var _0x3f4322=_0x577883[_0x8930('0x23')]||0x0;if(_0x4a0e22>_0x463130['user'])return _0x174a3e(_0x8930('0x29'));if(_0x3f4322>_0x463130['telephone'])return _0x174a3e(_0x8930('0x2a'));return _0x1e95cf();})[_0x8930('0x2b')](function(_0x8e2194){_0x174a3e(_0x8e2194);});});}module[_0x8930('0x2c')]={'checkLicense':checkLicense,'checkUserLimits':checkUserLimits,'getLicense':getLicense}; \ No newline at end of file +var _0xb31a=['admin','telephone','users','telephones','user','pick','countBy','License\x20limit\x20reached\x20for\x20users','License\x20limit\x20reached\x20for\x20telephones','exports','lodash','moment','bluebird','./hardware','../../components/encryptor','../../mysqldb','2027-01-01T00:00:00.000Z','Demo\x20license','Breaking\x20license','getUuid','defaults','then','catch','uuid','isEmpty','License\x20key\x20value\x20not\x20found','data2','split','decryptString','format','gray','deadline','days','grayReason','disabled','data1','message','User','findAll','role','sequelize','COUNT','col','count'];(function(_0x198ccc,_0x538804){var _0x79f72a=function(_0x5dd9cc){while(--_0x5dd9cc){_0x198ccc['push'](_0x198ccc['shift']());}};_0x79f72a(++_0x538804);}(_0xb31a,0x8e));var _0xab31=function(_0x370818,_0x36c06e){_0x370818=_0x370818-0x0;var _0x61628f=_0xb31a[_0x370818];return _0x61628f;};'use strict';var util=require('util');var _=require(_0xab31('0x0'));var moment=require(_0xab31('0x1'));var BPromise=require(_0xab31('0x2'));var hardware=require(_0xab31('0x3'));var encryptor=require(_0xab31('0x4'));var db=require(_0xab31('0x5'))['db'];const demoLicense={'demo':!![],'agents':0x2,'telephones':0x0,'users':0x1,'expiration':_0xab31('0x6'),'chat':![],'mail':![],'fax':![],'messaging':![],'whatsapp':![],'cm':![],'dialer':![],'jscripty':![],'openchannel':![],'callysquare':0x2,'webrtc':![],'jaws':![],'custom':![],'description':_0xab31('0x7'),'machineUuid':hardware['getUuid'](),'virtual':0x0,'voice':!![],'screenrecording':![],'preferred':![],'ai':![]};const breakingLicense={'breaking':!![],'demo':!![],'agents':0x2,'telephones':0x0,'users':0x1,'expiration':_0xab31('0x6'),'chat':![],'mail':![],'fax':![],'messaging':![],'whatsapp':![],'cm':![],'dialer':![],'jscripty':![],'openchannel':![],'callysquare':0x2,'webrtc':![],'jaws':![],'custom':![],'update':![],'description':_0xab31('0x8'),'machineUuid':hardware[_0xab31('0x9')](),'virtual':0x0,'voice':!![],'screenrecording':![],'preferred':![],'ai':![]};function getLicense(_0xeb7467){return new BPromise(function(_0x14f67b,_0x2fb181){return db['License']['find'](_[_0xab31('0xa')](_0xeb7467,{'raw':!![],'where':{'id':0x1}}))[_0xab31('0xb')](function(_0x5abd16){return checkLicense(_0x5abd16,null);})[_0xab31('0xb')](function(_0x5de461){_0x14f67b(_0x5de461);return;})[_0xab31('0xc')](function(_0x458a57){_0x2fb181(_0x458a57);});});}function checkLicense(_0xf20e49,_0x37dca5){if(!_0xf20e49){demoLicense[_0xab31('0xd')]=_0xf20e49['data1'];return demoLicense;}try{var _0xbbb57f=_0x37dca5||_0xf20e49['license'];if(_[_0xab31('0xe')](_0xbbb57f)){throw new Error(_0xab31('0xf'));}var _0x1793ef=_0xf20e49['data1'];var _0x42d9d7=_0xf20e49[_0xab31('0x10')];var _0x41006a=_0x1793ef[_0xab31('0x11')]('-')[0x4];var _0x417fe0=_0x1793ef[_0xab31('0x11')]('-')[0x0];var _0x4b4366=encryptor[_0xab31('0x12')](_0xbbb57f,util[_0xab31('0x13')]('%s:%s:%s',_0x41006a,_0x1793ef,_0x417fe0));var _0x175d91=JSON['parse'](_0x4b4366);_0x175d91['demo']=![];_0x175d91[_0xab31('0xd')]=_0x1793ef;_0x175d91['machineUuid']=hardware['getUuid']();if(_0x42d9d7){var _0x356b80=encryptor[_0xab31('0x12')](_0x42d9d7);_0x175d91[_0xab31('0x14')]=_0x356b80;_0x175d91[_0xab31('0x15')]=moment(_0x356b80)['add'](0x7,_0xab31('0x16'))[_0xab31('0x13')]();_0x175d91[_0xab31('0x17')]=_0x175d91['uuid']!=_0x175d91['machineUuid']?'changed':_0xab31('0x18');}return _0x175d91;}catch(_0x3ef6fe){breakingLicense[_0xab31('0xd')]=_0xf20e49[_0xab31('0x19')];breakingLicense[_0xab31('0x1a')]=_0x3ef6fe['message'];return breakingLicense;}}function getLimits(){return new BPromise(function(_0x13ba88,_0x36531e){getLicense()[_0xab31('0xb')](function(_0x428183){return db[_0xab31('0x1b')][_0xab31('0x1c')]({'attributes':[_0xab31('0x1d'),[db[_0xab31('0x1e')]['fn'](_0xab31('0x1f'),db[_0xab31('0x1e')][_0xab31('0x20')](_0xab31('0x1d'))),_0xab31('0x21')]],'group':_0xab31('0x1d'),'where':{'role':{'$or':[_0xab31('0x22'),'user',_0xab31('0x23')]}},'raw':!![]})[_0xab31('0xb')](function(_0x48a185){var _0x42651f={'user':_0x428183[_0xab31('0x24')]||0x0,'telephone':_0x428183[_0xab31('0x25')]||0x0};_0x48a185['forEach'](function(_0x1603ee){var _0x24559c=_0x1603ee['role']===_0xab31('0x22')?_0xab31('0x26'):_0x1603ee['role'];_0x42651f[_0x24559c]-=_0x1603ee[_0xab31('0x21')];if(_0x42651f[_0x24559c]<0x0)_0x42651f[_0x24559c]=0x0;});_0x13ba88(_0x42651f);return;});})['catch'](function(_0x273983){_0x36531e(_0x273983);});});}function checkUserLimits(_0x24e05d){return new BPromise(function(_0x2377ed,_0x138995){getLimits()['then'](function(_0x35138e){var _0x5ab531=_[_0xab31('0x27')](_[_0xab31('0x28')](_0x24e05d,'role'),[_0xab31('0x22'),_0xab31('0x26'),_0xab31('0x23')]);var _0x44c17f=(_0x5ab531['admin']||0x0)+(_0x5ab531[_0xab31('0x26')]||0x0);var _0x62cf50=_0x5ab531['telephone']||0x0;if(_0x44c17f>_0x35138e[_0xab31('0x26')])return _0x138995(_0xab31('0x29'));if(_0x62cf50>_0x35138e['telephone'])return _0x138995(_0xab31('0x2a'));return _0x2377ed();})['catch'](function(_0x4c63f7){_0x138995(_0x4c63f7);});});}module[_0xab31('0x2b')]={'checkLicense':checkLicense,'checkUserLimits':checkUserLimits,'getLicense':getLicense}; \ No newline at end of file diff --git a/server/config/local.env.js b/server/config/local.env.js index 541dcae..762b51d 100644 --- a/server/config/local.env.js +++ b/server/config/local.env.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x66fa=['http://localhost:9000','app-id','secret','exports'];(function(_0x7fcd17,_0x9f66f8){var _0x2db383=function(_0x4e7fac){while(--_0x4e7fac){_0x7fcd17['push'](_0x7fcd17['shift']());}};_0x2db383(++_0x9f66f8);}(_0x66fa,0x117));var _0xa66f=function(_0x5e0d95,_0x28cf12){_0x5e0d95=_0x5e0d95-0x0;var _0x4447e8=_0x66fa[_0x5e0d95];return _0x4447e8;};'use strict';module[_0xa66f('0x0')]={'DOMAIN':_0xa66f('0x1'),'SESSION_SECRET':'myappanuglar-secret','GOOGLE_ID':_0xa66f('0x2'),'GOOGLE_SECRET':_0xa66f('0x3'),'DEBUG':''}; \ No newline at end of file +var _0x3de3=['exports','myappanuglar-secret','app-id'];(function(_0x413609,_0x2e57ca){var _0x391bc3=function(_0x5a49a2){while(--_0x5a49a2){_0x413609['push'](_0x413609['shift']());}};_0x391bc3(++_0x2e57ca);}(_0x3de3,0x1ce));var _0x33de=function(_0x1d02be,_0x4b585b){_0x1d02be=_0x1d02be-0x0;var _0x314f4b=_0x3de3[_0x1d02be];return _0x314f4b;};'use strict';module[_0x33de('0x0')]={'DOMAIN':'http://localhost:9000','SESSION_SECRET':_0x33de('0x1'),'GOOGLE_ID':_0x33de('0x2'),'GOOGLE_SECRET':'secret','DEBUG':''}; \ No newline at end of file diff --git a/server/config/logger.js b/server/config/logger.js index 054afe4..8142b45 100644 --- a/server/config/logger.js +++ b/server/config/logger.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x971f=['xcally','format','%s-%s.log','message','{{{','replace','}}}','toUpperCase','Logger','transports','File','error','info','Console','env','winston','path','join','log'];(function(_0x30e618,_0x8b2127){var _0x2d5393=function(_0x3fca04){while(--_0x3fca04){_0x30e618['push'](_0x30e618['shift']());}};_0x2d5393(++_0x8b2127);}(_0x971f,0xa7));var _0xf971=function(_0x450470,_0xf1b6ad){_0x450470=_0x450470-0x0;var _0xf3ce29=_0x971f[_0x450470];return _0xf3ce29;};'use strict';var moment=require('moment');var winston=require(_0xf971('0x0'));var util=require('util');var path=require(_0xf971('0x1'));var debugLevel='INFO';function filename(_0x439e77,_0x267722){return path[_0xf971('0x2')]('/var',_0xf971('0x3'),_0xf971('0x4'),util[_0xf971('0x5')](_0xf971('0x6'),_0x439e77,_0x267722));}function formatter(_0x4b7741,_0x472ea8){_0x472ea8[_0xf971('0x7')]=_0x472ea8[_0xf971('0x7')]['replace'](/@@{/g,_0xf971('0x8'))[_0xf971('0x9')](/}@@/g,_0xf971('0xa'))[_0xf971('0x9')](/@{/g,'{{')[_0xf971('0x9')](/}@/g,'}}');return util[_0xf971('0x5')]('[%s]\x20[%s]\x20%s\x20-\x20%s',moment()[_0xf971('0x5')]('YYYY-MM-DD\x20HH:mm:ss'),_0x472ea8['level'][_0xf971('0xb')](),_0x4b7741,_0x472ea8[_0xf971('0x7')]);}module['exports']=function(_0x559138){return new winston[(_0xf971('0xc'))]({'transports':[new winston[(_0xf971('0xd'))][(_0xf971('0xe'))]({'name':util[_0xf971('0x5')]('%s-%s',_0x559138,_0xf971('0xf')),'filename':filename(_0x559138,'error'),'level':_0xf971('0xf'),'json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0x2da4f8){return formatter(_0x559138,_0x2da4f8);}}),new winston['transports']['File']({'name':util[_0xf971('0x5')]('%s-%s',_0x559138,_0xf971('0x10')),'filename':filename(_0x559138,_0xf971('0x10')),'level':'info','json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0x173907){return formatter(_0x559138,_0x173907);}}),new winston['transports'][(_0xf971('0x11'))]({'level':process[_0xf971('0x12')]['debugLevel']||debugLevel,'json':![],'formatter':function(_0x2a831e){return formatter(_0x559138,_0x2a831e);}})]});}; \ No newline at end of file +var _0x8d2b=['winston','INFO','log','xcally','format','%s-%s.log','message','replace','{{{','[%s]\x20[%s]\x20%s\x20-\x20%s','YYYY-MM-DD\x20HH:mm:ss','level','toUpperCase','exports','Logger','transports','File','%s-%s','error','info','Console','env','debugLevel'];(function(_0x38366c,_0x277bcc){var _0x2566b2=function(_0x2fa6f8){while(--_0x2fa6f8){_0x38366c['push'](_0x38366c['shift']());}};_0x2566b2(++_0x277bcc);}(_0x8d2b,0xfd));var _0xb8d2=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x8d2b[_0x14add3];return _0x4a174f;};'use strict';var moment=require('moment');var winston=require(_0xb8d2('0x0'));var util=require('util');var path=require('path');var debugLevel=_0xb8d2('0x1');function filename(_0x14c2f6,_0x391833){return path['join']('/var',_0xb8d2('0x2'),_0xb8d2('0x3'),util[_0xb8d2('0x4')](_0xb8d2('0x5'),_0x14c2f6,_0x391833));}function formatter(_0x5a4fb4,_0x152681){_0x152681[_0xb8d2('0x6')]=_0x152681[_0xb8d2('0x6')][_0xb8d2('0x7')](/@@{/g,_0xb8d2('0x8'))[_0xb8d2('0x7')](/}@@/g,'}}}')[_0xb8d2('0x7')](/@{/g,'{{')[_0xb8d2('0x7')](/}@/g,'}}');return util['format'](_0xb8d2('0x9'),moment()['format'](_0xb8d2('0xa')),_0x152681[_0xb8d2('0xb')][_0xb8d2('0xc')](),_0x5a4fb4,_0x152681[_0xb8d2('0x6')]);}module[_0xb8d2('0xd')]=function(_0x487166){return new winston[(_0xb8d2('0xe'))]({'transports':[new winston[(_0xb8d2('0xf'))][(_0xb8d2('0x10'))]({'name':util[_0xb8d2('0x4')](_0xb8d2('0x11'),_0x487166,'error'),'filename':filename(_0x487166,_0xb8d2('0x12')),'level':_0xb8d2('0x12'),'json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0xe5aee){return formatter(_0x487166,_0xe5aee);}}),new winston['transports'][(_0xb8d2('0x10'))]({'name':util[_0xb8d2('0x4')](_0xb8d2('0x11'),_0x487166,_0xb8d2('0x13')),'filename':filename(_0x487166,'info'),'level':'info','json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0x16da25){return formatter(_0x487166,_0x16da25);}}),new winston[(_0xb8d2('0xf'))][(_0xb8d2('0x14'))]({'level':process[_0xb8d2('0x15')][_0xb8d2('0x16')]||debugLevel,'json':![],'formatter':function(_0x1ea451){return formatter(_0x487166,_0x1ea451);}})]});}; \ No newline at end of file diff --git a/server/config/pm2/config.js b/server/config/pm2/config.js index 010b7a2..ea62d75 100644 --- a/server/config/pm2/config.js +++ b/server/config/pm2/config.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc02c=['email','../../services/email/index.js','routing','../../services/routing/index.js','xdr','exports','path','express','join','../../services/ami/index.js','agi'];(function(_0x59ee6f,_0x450239){var _0x4c0979=function(_0x565e92){while(--_0x565e92){_0x59ee6f['push'](_0x59ee6f['shift']());}};_0x4c0979(++_0x450239);}(_0xc02c,0x187));var _0xcc02=function(_0x2da5df,_0x4697c9){_0x2da5df=_0x2da5df-0x0;var _0x4be7c2=_0xc02c[_0x2da5df];return _0x4be7c2;};'use strict';var path=require(_0xcc02('0x0'));var os=require('os');var config={'apps':[{'name':_0xcc02('0x1'),'script':path[_0xcc02('0x2')](__dirname,'../../services/express/index.js')},{'name':'ami','script':path[_0xcc02('0x2')](__dirname,_0xcc02('0x3'))},{'name':_0xcc02('0x4'),'script':path['join'](__dirname,'../../services/agi/index.js')},{'name':_0xcc02('0x5'),'script':path[_0xcc02('0x2')](__dirname,_0xcc02('0x6'))},{'name':_0xcc02('0x7'),'script':path[_0xcc02('0x2')](__dirname,_0xcc02('0x8'))},{'name':_0xcc02('0x9'),'script':path[_0xcc02('0x2')](__dirname,'../../services/xdr/index.js')}]};module[_0xcc02('0xa')]=config; \ No newline at end of file +var _0x02ad=['exports','express','join','../../services/express/index.js','ami','../../services/agi/index.js','../../services/email/index.js','../../services/routing/index.js','../../services/xdr/index.js'];(function(_0x3be839,_0x403431){var _0x3ea47b=function(_0xb66018){while(--_0xb66018){_0x3be839['push'](_0x3be839['shift']());}};_0x3ea47b(++_0x403431);}(_0x02ad,0x14e));var _0xd02a=function(_0x36c5b0,_0x5001da){_0x36c5b0=_0x36c5b0-0x0;var _0xf19333=_0x02ad[_0x36c5b0];return _0xf19333;};'use strict';var path=require('path');var os=require('os');var config={'apps':[{'name':_0xd02a('0x0'),'script':path[_0xd02a('0x1')](__dirname,_0xd02a('0x2'))},{'name':_0xd02a('0x3'),'script':path[_0xd02a('0x1')](__dirname,'../../services/ami/index.js')},{'name':'agi','script':path[_0xd02a('0x1')](__dirname,_0xd02a('0x4'))},{'name':'email','script':path[_0xd02a('0x1')](__dirname,_0xd02a('0x5'))},{'name':'routing','script':path[_0xd02a('0x1')](__dirname,_0xd02a('0x6'))},{'name':'xdr','script':path['join'](__dirname,_0xd02a('0x7'))}]};module[_0xd02a('0x8')]=config; \ No newline at end of file diff --git a/server/config/pm2/index.js b/server/config/pm2/index.js index ffe6442..3733ecc 100644 --- a/server/config/pm2/index.js +++ b/server/config/pm2/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5daa=['list','describe','delete','dump','bluebird','./config','connected','then','start','disconnect','stop','restart'];(function(_0x44db60,_0x4ec8ca){var _0x3fa929=function(_0x5800a6){while(--_0x5800a6){_0x44db60['push'](_0x44db60['shift']());}};_0x3fa929(++_0x4ec8ca);}(_0x5daa,0x19c));var _0xa5da=function(_0x485659,_0x47cf1c){_0x485659=_0x485659-0x0;var _0x3c4379=_0x5daa[_0x485659];return _0x3c4379;};'use strict';var pm2=require('pm2');var BPromise=require(_0xa5da('0x0'));var config=require(_0xa5da('0x1'));function connect(){return new BPromise(function(_0x294a0b,_0x28d559){return pm2['connect'](function(_0x105826){if(_0x105826){return _0x28d559(_0x105826);}return _0x294a0b(_0xa5da('0x2'));});});};exports['start']=function(_0x40136b){return connect()[_0xa5da('0x3')](function(){return new BPromise(function(_0x1c683a,_0x252470){return pm2[_0xa5da('0x4')](_0x40136b,function(_0x475e41,_0x1eb158){if(_0x475e41){return _0x252470(_0x475e41);}pm2[_0xa5da('0x5')]();return _0x1c683a(_0x1eb158);});});});};exports['stop']=function(_0x2d3e33){return connect()[_0xa5da('0x3')](function(){return new BPromise(function(_0x50a342,_0x33bb6e){return pm2[_0xa5da('0x6')](_0x2d3e33,function(_0x433583,_0x393b55){if(_0x433583){return _0x33bb6e(_0x433583);}pm2[_0xa5da('0x5')]();return _0x50a342(_0x393b55);});});});};exports[_0xa5da('0x7')]=function(_0x3b73e9){return connect()[_0xa5da('0x3')](function(){return new BPromise(function(_0x4be7e1,_0x5c38fa){return pm2[_0xa5da('0x7')](_0x3b73e9,function(_0xfb9c07,_0x2f8afa){if(_0xfb9c07){return _0x5c38fa(_0xfb9c07);}pm2[_0xa5da('0x5')]();return _0x4be7e1(_0x2f8afa);});});});};exports['list']=function(){return connect()[_0xa5da('0x3')](function(){return new BPromise(function(_0xeb276f,_0x3b9fef){return pm2[_0xa5da('0x8')](function(_0x1ece70,_0x5d8a86){if(_0x1ece70){return _0x3b9fef(_0x1ece70);}pm2[_0xa5da('0x5')]();return _0xeb276f(_0x5d8a86);});});});};exports['describe']=function(_0x5c974d){return connect()[_0xa5da('0x3')](function(){return new BPromise(function(_0x437ce8,_0x2bfcc5){return pm2[_0xa5da('0x9')](_0x5c974d,function(_0x47d28c,_0xa745be){if(_0x47d28c){return _0x2bfcc5(_0x47d28c);}pm2['disconnect']();return _0x437ce8(_0xa745be);});});});};exports[_0xa5da('0xa')]=function(_0x598775){return connect()[_0xa5da('0x3')](function(){return new BPromise(function(_0x5ae3d2,_0x33389a){return pm2[_0xa5da('0xa')](_0x598775,function(_0x332826,_0x5239d5){if(_0x332826){return _0x33389a(_0x332826);}pm2[_0xa5da('0x5')]();return _0x5ae3d2(_0x5239d5);});});});};exports[_0xa5da('0xb')]=function(){return connect()[_0xa5da('0x3')](function(){return new BPromise(function(_0x37c692,_0x2eea73){return pm2['dump'](function(_0x26ef3d){if(_0x26ef3d){return _0x2eea73(_0x26ef3d);}return _0x37c692('saved');});});});}; \ No newline at end of file +var _0x3269=['connect','connected','start','then','disconnect','restart','list','describe','delete','dump','saved','pm2','./config'];(function(_0x4f6733,_0x3a8475){var _0x29a8cb=function(_0xf3891c){while(--_0xf3891c){_0x4f6733['push'](_0x4f6733['shift']());}};_0x29a8cb(++_0x3a8475);}(_0x3269,0x184));var _0x9326=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x3269[_0x3dd15e];return _0x231fd0;};'use strict';var pm2=require(_0x9326('0x0'));var BPromise=require('bluebird');var config=require(_0x9326('0x1'));function connect(){return new BPromise(function(_0x30d287,_0x2fd19c){return pm2[_0x9326('0x2')](function(_0x50f873){if(_0x50f873){return _0x2fd19c(_0x50f873);}return _0x30d287(_0x9326('0x3'));});});};exports[_0x9326('0x4')]=function(_0x355ef2){return connect()[_0x9326('0x5')](function(){return new BPromise(function(_0x4ccde5,_0x5e2774){return pm2[_0x9326('0x4')](_0x355ef2,function(_0x40dd42,_0x1b2dda){if(_0x40dd42){return _0x5e2774(_0x40dd42);}pm2[_0x9326('0x6')]();return _0x4ccde5(_0x1b2dda);});});});};exports['stop']=function(_0x49497a){return connect()[_0x9326('0x5')](function(){return new BPromise(function(_0x44be73,_0x45361b){return pm2['stop'](_0x49497a,function(_0x2a9757,_0x53418a){if(_0x2a9757){return _0x45361b(_0x2a9757);}pm2[_0x9326('0x6')]();return _0x44be73(_0x53418a);});});});};exports['restart']=function(_0x9b02f0){return connect()[_0x9326('0x5')](function(){return new BPromise(function(_0x1784b9,_0x5a9c6d){return pm2[_0x9326('0x7')](_0x9b02f0,function(_0x2af7c5,_0x150c4c){if(_0x2af7c5){return _0x5a9c6d(_0x2af7c5);}pm2[_0x9326('0x6')]();return _0x1784b9(_0x150c4c);});});});};exports[_0x9326('0x8')]=function(){return connect()['then'](function(){return new BPromise(function(_0x4ece45,_0x4a658f){return pm2[_0x9326('0x8')](function(_0x5f1d40,_0x476a12){if(_0x5f1d40){return _0x4a658f(_0x5f1d40);}pm2[_0x9326('0x6')]();return _0x4ece45(_0x476a12);});});});};exports[_0x9326('0x9')]=function(_0x435277){return connect()['then'](function(){return new BPromise(function(_0x1b666d,_0x4b8b27){return pm2[_0x9326('0x9')](_0x435277,function(_0x5a0271,_0x579b80){if(_0x5a0271){return _0x4b8b27(_0x5a0271);}pm2[_0x9326('0x6')]();return _0x1b666d(_0x579b80);});});});};exports['delete']=function(_0x1915ab){return connect()[_0x9326('0x5')](function(){return new BPromise(function(_0x1eff6b,_0x4d046d){return pm2[_0x9326('0xa')](_0x1915ab,function(_0x4fdced,_0x1274fa){if(_0x4fdced){return _0x4d046d(_0x4fdced);}pm2[_0x9326('0x6')]();return _0x1eff6b(_0x1274fa);});});});};exports[_0x9326('0xb')]=function(){return connect()[_0x9326('0x5')](function(){return new BPromise(function(_0x4b859e,_0x1bb33e){return pm2['dump'](function(_0x506ba0){if(_0x506ba0){return _0x1bb33e(_0x506ba0);}return _0x4b859e(_0x9326('0xc'));});});});}; \ No newline at end of file diff --git a/server/config/schedule/chat.js b/server/config/schedule/chat.js index eee1fec..8a3871b 100644 --- a/server/config/schedule/chat.js +++ b/server/config/schedule/chat.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x225e=['[CHAT]\x20Error\x20closing\x20interactions','inspect','start','lodash','moment','ioredis','util','../../config/environment','../logger','schedule','redis','defaults','localhost','socket.io-emitter','Setting','find','chatTimeout','then','findAll','lastMsgAt','minutes','length','info','join','ChatInteraction','update','system','timeout','YYYY-MM-DD\x20HH:mm:ss','[CHAT]\x20Sending\x20updates\x20for\x20interactions:','emit','chatInteraction:update'];(function(_0x252ef1,_0x2e0041){var _0x25817c=function(_0x243776){while(--_0x243776){_0x252ef1['push'](_0x252ef1['shift']());}};_0x25817c(++_0x2e0041);}(_0x225e,0xa3));var _0xe225=function(_0x28b699,_0x555b50){_0x28b699=_0x28b699-0x0;var _0x46b4f0=_0x225e[_0x28b699];return _0x46b4f0;};'use strict';var _=require(_0xe225('0x0'));var moment=require(_0xe225('0x1'));var Redis=require(_0xe225('0x2'));var util=require(_0xe225('0x3'));var config=require(_0xe225('0x4'));var db=require('../../mysqldb')['db'];var logger=require(_0xe225('0x5'))(_0xe225('0x6'));config[_0xe225('0x7')]=_[_0xe225('0x8')](config['redis'],{'host':_0xe225('0x9'),'port':0x18eb});var io=require(_0xe225('0xa'))(new Redis(config[_0xe225('0x7')]));function closeInteractions(){var _0x58e674=0x0;var _0x31dbcf=[];return db[_0xe225('0xb')][_0xe225('0xc')]({'raw':!![],'attributes':['id',_0xe225('0xd')],'where':{'id':0x1}})[_0xe225('0xe')](function(_0x2d2364){_0x58e674=_0x2d2364[_0xe225('0xd')];if(_0x58e674){return db['ChatInteraction'][_0xe225('0xf')]({'raw':!![],'attributes':['id',_0xe225('0x10')],'where':{'closed':![],'lastMsgAt':{'$lt':moment()['subtract'](_0x2d2364[_0xe225('0xd')],_0xe225('0x11'))}}});}else{return[];}})[_0xe225('0xe')](function(_0x50c9bd){if(_0x50c9bd&&_0x50c9bd[_0xe225('0x12')]){_0x31dbcf=_['map'](_0x50c9bd||[],'id');logger[_0xe225('0x13')]('[CHAT]\x20Interactions\x20to\x20close:',_0x31dbcf[_0xe225('0x14')]());return db[_0xe225('0x15')][_0xe225('0x16')]({'closeReason':_0xe225('0x17'),'disposition':_0xe225('0x18'),'closed':!![],'closedAt':moment()['format'](_0xe225('0x19'))},{'where':{'id':_0x31dbcf}});}})['then'](function(){if(_0x31dbcf&&_0x31dbcf[_0xe225('0x12')]){logger['info'](_0xe225('0x1a'),_0x31dbcf[_0xe225('0x14')]());for(var _0x547993=0x0;_0x547993<_0x31dbcf[_0xe225('0x12')];_0x547993++){io[_0xe225('0x1b')](_0xe225('0x1c'),{'id':_0x31dbcf[_0x547993],'closed':!![]});}}})['catch'](function(_0x3daf6e){logger['error'](_0xe225('0x1d'),_0x3daf6e?util[_0xe225('0x1e')](_0x3daf6e,{'showHidden':![],'depth':null}):'');});}exports[_0xe225('0x1f')]=function(){setInterval(function(){return closeInteractions();},0x3c*0x3e8);return closeInteractions();}; \ No newline at end of file +var _0xf0e6=['timeout','format','[CHAT]\x20Sending\x20updates\x20for\x20interactions:','emit','chatInteraction:update','catch','error','[CHAT]\x20Error\x20closing\x20interactions','inspect','lodash','moment','ioredis','../../config/environment','../../mysqldb','../logger','schedule','localhost','socket.io-emitter','redis','Setting','find','chatTimeout','then','findAll','lastMsgAt','subtract','minutes','length','map','info','join','ChatInteraction','update','system'];(function(_0x38407e,_0x585128){var _0x5a6779=function(_0x419667){while(--_0x419667){_0x38407e['push'](_0x38407e['shift']());}};_0x5a6779(++_0x585128);}(_0xf0e6,0x1e5));var _0x6f0e=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xf0e6[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x6f0e('0x0'));var moment=require(_0x6f0e('0x1'));var Redis=require(_0x6f0e('0x2'));var util=require('util');var config=require(_0x6f0e('0x3'));var db=require(_0x6f0e('0x4'))['db'];var logger=require(_0x6f0e('0x5'))(_0x6f0e('0x6'));config['redis']=_['defaults'](config['redis'],{'host':_0x6f0e('0x7'),'port':0x18eb});var io=require(_0x6f0e('0x8'))(new Redis(config[_0x6f0e('0x9')]));function closeInteractions(){var _0x45ee09=0x0;var _0x5e0297=[];return db[_0x6f0e('0xa')][_0x6f0e('0xb')]({'raw':!![],'attributes':['id',_0x6f0e('0xc')],'where':{'id':0x1}})[_0x6f0e('0xd')](function(_0x40eee3){_0x45ee09=_0x40eee3[_0x6f0e('0xc')];if(_0x45ee09){return db['ChatInteraction'][_0x6f0e('0xe')]({'raw':!![],'attributes':['id',_0x6f0e('0xf')],'where':{'closed':![],'lastMsgAt':{'$lt':moment()[_0x6f0e('0x10')](_0x40eee3[_0x6f0e('0xc')],_0x6f0e('0x11'))}}});}else{return[];}})['then'](function(_0x4d24a7){if(_0x4d24a7&&_0x4d24a7[_0x6f0e('0x12')]){_0x5e0297=_[_0x6f0e('0x13')](_0x4d24a7||[],'id');logger[_0x6f0e('0x14')]('[CHAT]\x20Interactions\x20to\x20close:',_0x5e0297[_0x6f0e('0x15')]());return db[_0x6f0e('0x16')][_0x6f0e('0x17')]({'closeReason':_0x6f0e('0x18'),'disposition':_0x6f0e('0x19'),'closed':!![],'closedAt':moment()[_0x6f0e('0x1a')]('YYYY-MM-DD\x20HH:mm:ss')},{'where':{'id':_0x5e0297}});}})[_0x6f0e('0xd')](function(){if(_0x5e0297&&_0x5e0297['length']){logger[_0x6f0e('0x14')](_0x6f0e('0x1b'),_0x5e0297[_0x6f0e('0x15')]());for(var _0x327084=0x0;_0x327084<_0x5e0297[_0x6f0e('0x12')];_0x327084++){io[_0x6f0e('0x1c')](_0x6f0e('0x1d'),{'id':_0x5e0297[_0x327084],'closed':!![]});}}})[_0x6f0e('0x1e')](function(_0x39cded){logger[_0x6f0e('0x1f')](_0x6f0e('0x20'),_0x39cded?util[_0x6f0e('0x21')](_0x39cded,{'showHidden':![],'depth':null}):'');});}exports['start']=function(){setInterval(function(){return closeInteractions();},0x3c*0x3e8);return closeInteractions();}; \ No newline at end of file diff --git a/server/config/schedule/index.js b/server/config/schedule/index.js index 3236321..0d5c30d 100644 --- a/server/config/schedule/index.js +++ b/server/config/schedule/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb560=['runReport','CustomReportId','no\x20report\x20id','Schedule','findAll','MailServerOut','keys','jobs','map','toString','keyBy','intersection','difference','length','stop','deleteJob','delete\x20cron','toRun','index','resolve','cron','active','startAt','endAt','add','start','add\x20cron','exists','stop\x20cron','update','update\x20cron','run','util','lodash','moment','cron-job-manager','jayson/promise','bluebird','../logger','schedule','../../mysqldb','../../api/analyticCustomReport/analyticCustomReport.controller','../../api/analyticDefaultReport/analyticDefaultReport.controller','client','http','info','email','MailAccount','Smtp','service','host','port','secure','authentication','name','user','format','Report\x20%s\x20last\x20%s\x20%s','subtractNumber','subtractUnit','join','../../files/reports','savename','%s.%s','basename','zip','existsSync','Sent','message','attachments','text','Info\x20report:\x0a%s\x0aPlease\x20see\x20the\x20attachments\x0aThis\x20is\x20an\x20automatically\x20generated\x20email\x20–\x20please\x20do\x20not\x20reply\x20to\x20it.\x0a\x0a','stringify','status','Report\x20empty\x0aThis\x20is\x20an\x20automatically\x20generated\x20email\x20–\x20please\x20do\x20not\x20reply\x20to\x20this\x20email.\x0a\x0a','sendIfEmpty','empty\x20file,\x20email\x20not\x20sent','SendMail','then','error','error\x20mail','email\x20sent','catch','data','isNil','subtractUnit\x20null\x20or\x20undefined','subtract','YYYY-MM-DD\x20HH:mm:ss','scheduled','DefaultReportId','exec\x20defaul\x20report\x20id:%s'];(function(_0x5c2389,_0x4e6faa){var _0x2e31e4=function(_0x54a116){while(--_0x54a116){_0x5c2389['push'](_0x5c2389['shift']());}};_0x2e31e4(++_0x4e6faa);}(_0xb560,0x18c));var _0x0b56=function(_0x4f9b18,_0x2cb5ca){_0x4f9b18=_0x4f9b18-0x0;var _0x29f20c=_0xb560[_0x4f9b18];return _0x29f20c;};'use strict';var fs=require('fs');var util=require(_0x0b56('0x0'));var path=require('path');var _=require(_0x0b56('0x1'));var moment=require(_0x0b56('0x2'));var CronJobManager=require(_0x0b56('0x3'));var jayson=require(_0x0b56('0x4'));var BPromise=require(_0x0b56('0x5'));var logger=require(_0x0b56('0x6'))(_0x0b56('0x7'));var db=require(_0x0b56('0x8'))['db'];var analyticCustomReportController=require(_0x0b56('0x9'));var analyticDefaultReportController=require(_0x0b56('0xa'));var client=jayson[_0x0b56('0xb')][_0x0b56('0xc')]({'port':0x232b});var manager=new CronJobManager();function handleSendEmail(_0x4572e1,_0x52bc0d){return function(){logger[_0x0b56('0xd')]('Try\x20to\x20send\x20a\x20mail\x20to',_0x4572e1[_0x0b56('0xe')]);var _0x2926fd=!![];var _0x54ccd8={'tls':{'rejectUnauthorized':![]}};if(_0x4572e1[_0x0b56('0xf')][_0x0b56('0x10')][_0x0b56('0x11')]){_0x54ccd8[_0x0b56('0x11')]=_0x4572e1[_0x0b56('0xf')][_0x0b56('0x10')][_0x0b56('0x11')];}else{_0x54ccd8[_0x0b56('0x12')]=_0x4572e1[_0x0b56('0xf')][_0x0b56('0x10')][_0x0b56('0x12')];_0x54ccd8[_0x0b56('0x13')]=_0x4572e1[_0x0b56('0xf')][_0x0b56('0x10')]['port'];_0x54ccd8[_0x0b56('0x14')]=_0x4572e1[_0x0b56('0xf')][_0x0b56('0x10')]['secure'];}if(_0x4572e1[_0x0b56('0xf')]['Smtp'][_0x0b56('0x15')]){_0x54ccd8['auth']={'user':_0x4572e1[_0x0b56('0xf')]['Smtp']['user'],'pass':_0x4572e1[_0x0b56('0xf')][_0x0b56('0x10')]['pass']};}var _0x33d701={'account':_0x54ccd8,'message':{'from':util['format']('\x22%s\x22\x20<%s>',_0x4572e1[_0x0b56('0xf')][_0x0b56('0x16')],_0x4572e1[_0x0b56('0xf')][_0x0b56('0xe')]||_0x4572e1[_0x0b56('0xf')][_0x0b56('0x10')][_0x0b56('0x17')]),'to':_0x4572e1[_0x0b56('0xe')],'cc':_0x4572e1['cc'],'bcc':_0x4572e1['bcc'],'subject':util[_0x0b56('0x18')](_0x0b56('0x19'),_0x52bc0d['name'],_0x4572e1[_0x0b56('0x1a')],_0x4572e1[_0x0b56('0x1b')])}};var _0x26db80=path[_0x0b56('0x1c')](__dirname,_0x0b56('0x1d'));var _0x5cbc0b=_0x52bc0d[_0x0b56('0x1e')];var _0x5715fe=util[_0x0b56('0x18')](_0x0b56('0x1f'),path[_0x0b56('0x20')](_0x52bc0d[_0x0b56('0x1e')],path['extname'](_0x52bc0d[_0x0b56('0x1e')])),_0x0b56('0x21'));var _0x505d57=path[_0x0b56('0x1c')](_0x26db80,_0x5cbc0b);var _0x296fb3=path[_0x0b56('0x1c')](_0x26db80,_0x5715fe);if(fs[_0x0b56('0x22')](_0x505d57)){_0x52bc0d['status']=_0x0b56('0x23');_0x33d701[_0x0b56('0x24')][_0x0b56('0x25')]=[{'filename':_0x5cbc0b,'path':_0x505d57}];_0x33d701['message'][_0x0b56('0x26')]=util[_0x0b56('0x18')](_0x0b56('0x27'),JSON[_0x0b56('0x28')](_0x52bc0d,null,0x2));}else if(fs[_0x0b56('0x22')](_0x296fb3)){_0x52bc0d[_0x0b56('0x29')]=_0x0b56('0x23');_0x33d701['message'][_0x0b56('0x25')]=[{'filename':_0x5715fe,'path':_0x296fb3}];}else{_0x33d701[_0x0b56('0x24')][_0x0b56('0x26')]=_0x0b56('0x2a');if(!_0x4572e1[_0x0b56('0x2b')]){_0x2926fd=![];logger[_0x0b56('0xd')](_0x0b56('0x2c'));}}if(_0x2926fd){return client['request'](_0x0b56('0x2d'),_0x33d701)[_0x0b56('0x2e')](function(_0x38a257){if(_0x38a257[_0x0b56('0x2f')]){return logger[_0x0b56('0x2f')](_0x0b56('0x30'),JSON[_0x0b56('0x28')](_0x38a257));}return logger[_0x0b56('0xd')](_0x0b56('0x31'));})[_0x0b56('0x32')](function(_0x595321){return logger['error']('error\x20mail',JSON['stringify'](_0x595321));});}};}function handleError(){return function(_0x154278){return logger[_0x0b56('0x2f')](JSON[_0x0b56('0x28')](_0x154278));};}function handleResult(_0x5f4ba8){return function(_0x55ad40){logger[_0x0b56('0xd')](_0x0b56('0x33'),JSON['stringify'](_0x55ad40));if(_0x5f4ba8[_0x0b56('0xf')]&&_0x5f4ba8[_0x0b56('0xf')][_0x0b56('0x10')]&&!_[_0x0b56('0x34')](_0x5f4ba8[_0x0b56('0xe')])){setTimeout(handleSendEmail(_0x5f4ba8,_0x55ad40),0x3c*0x3e8);}};}function handleJob(_0x108cd3){return function(){try{if(_['isNil'](_0x108cd3[_0x0b56('0x1a')])){return logger[_0x0b56('0xd')]('subtractNumber\x20null\x20or\x20undefined');}if(_[_0x0b56('0x34')](_0x108cd3['subtractUnit'])){return logger[_0x0b56('0xd')](_0x0b56('0x35'));}var _0x999ece={'startDate':moment()[_0x0b56('0x36')](_0x108cd3[_0x0b56('0x1a')],_0x108cd3['subtractUnit'])[_0x0b56('0x18')](_0x0b56('0x37')),'endDate':moment()[_0x0b56('0x18')](_0x0b56('0x37')),'type':_0x0b56('0x38'),'output':_0x108cd3['output'],'name':_0x108cd3[_0x0b56('0x16')]};if(!_[_0x0b56('0x34')](_0x108cd3[_0x0b56('0x39')])){logger['info'](_0x0b56('0x3a'),_0x108cd3['DefaultReportId']);return analyticDefaultReportController[_0x0b56('0x3b')]({'id':_0x108cd3[_0x0b56('0x39')]},_0x999ece)[_0x0b56('0x2e')](handleResult(_0x108cd3))[_0x0b56('0x32')](handleError());}if(!_[_0x0b56('0x34')](_0x108cd3[_0x0b56('0x3c')])){logger[_0x0b56('0xd')]('exec\x20custom\x20report\x20id:%s',_0x108cd3[_0x0b56('0x3c')]);return analyticCustomReportController[_0x0b56('0x3b')]({'id':_0x108cd3[_0x0b56('0x3c')]},_0x999ece)[_0x0b56('0x2e')](handleResult(_0x108cd3))[_0x0b56('0x32')](handleError());}}catch(_0x436b20){logger[_0x0b56('0x2f')](JSON['stringify'](_0x436b20));}return logger[_0x0b56('0xd')](_0x0b56('0x3d'));};}function getJobs(_0x5be27b){var _0x3952f9={};if(_0x5be27b){_0x3952f9['id']=_0x5be27b;}return db[_0x0b56('0x3e')][_0x0b56('0x3f')]({'where':_0x3952f9,'include':[{'model':db[_0x0b56('0xf')],'attributes':['id',_0x0b56('0x16'),_0x0b56('0xe')],'include':[{'model':db[_0x0b56('0x40')],'as':'Smtp'}]}]})[_0x0b56('0x2e')](function(_0x40821d){var _0x1ae629=_[_0x0b56('0x41')](manager[_0x0b56('0x42')]);var _0x39c6de=_[_0x0b56('0x43')](_0x40821d,function(_0x1dd2d8){return _0x1dd2d8['id'][_0x0b56('0x44')]();});var _0x4713d3=_[_0x0b56('0x45')](_0x40821d,function(_0x1eae61){return _0x1eae61['id']['toString']();});var _0x2bb01d=_0x5be27b?_0x39c6de:_['difference'](_0x39c6de,_0x1ae629);var _0xa57a91=_[_0x0b56('0x46')](_0x39c6de,_0x1ae629);var _0x406812=_[_0x0b56('0x47')](_0x1ae629,_0x39c6de);var _0x42d725;var _0x5b1ffb;for(_0x42d725=0x0;_0x42d725<_0x406812[_0x0b56('0x48')]&&!_0x5be27b;_0x42d725+=0x1){_0x5b1ffb=_0x406812[_0x42d725][_0x0b56('0x44')]();if(manager['exists'](_0x5b1ffb)){manager[_0x0b56('0x49')](_0x5b1ffb);manager[_0x0b56('0x4a')](_0x5b1ffb);logger[_0x0b56('0xd')](_0x0b56('0x4b'),_0x5b1ffb);}}logger[_0x0b56('0xd')](_0x0b56('0x4c'),JSON[_0x0b56('0x28')](_0x2bb01d));for(_0x42d725=0x0;_0x42d725<_0x2bb01d[_0x0b56('0x48')];_0x42d725+=0x1){_0x5b1ffb=_0x2bb01d[_0x42d725]['toString']();logger['info'](_0x0b56('0x4d'),_0x5b1ffb);if(_0x5be27b){logger[_0x0b56('0xd')]('my\x20id',_0x5be27b);logger[_0x0b56('0xd')](JSON['stringify'](_0x4713d3[_0x5b1ffb]));BPromise[_0x0b56('0x4e')]()[_0x0b56('0x2e')](handleJob(_0x4713d3[_0x5b1ffb]));logger[_0x0b56('0xd')]('run\x20job',_0x4713d3[_0x5b1ffb][_0x0b56('0x16')],_0x4713d3[_0x5b1ffb][_0x0b56('0x4f')]);}else if(_0x4713d3[_0x5b1ffb][_0x0b56('0x4f')]&&_0x4713d3[_0x5b1ffb][_0x0b56('0x50')]&&moment()['isBetween'](_0x4713d3[_0x5b1ffb][_0x0b56('0x51')],_0x4713d3[_0x5b1ffb][_0x0b56('0x52')])){manager[_0x0b56('0x53')](_0x5b1ffb,_0x4713d3[_0x5b1ffb]['cron'],handleJob(_0x4713d3[_0x5b1ffb]));manager[_0x0b56('0x54')](_0x5b1ffb);logger[_0x0b56('0xd')](_0x0b56('0x55'),_0x4713d3[_0x5b1ffb]['name'],_0x4713d3[_0x5b1ffb]['cron']);}else if(manager[_0x0b56('0x56')](_0x5b1ffb)){manager['stop'](_0x5b1ffb);manager[_0x0b56('0x4a')](_0x5b1ffb);logger[_0x0b56('0xd')](_0x0b56('0x57'),_0x4713d3[_0x5b1ffb][_0x0b56('0x16')],_0x4713d3[_0x5b1ffb][_0x0b56('0x4f')]);}}for(_0x42d725=0x0,_0x5b1ffb;_0x42d725<_0xa57a91[_0x0b56('0x48')]&&!_0x5be27b;_0x42d725+=0x1){_0x5b1ffb=_0xa57a91[_0x42d725]['toString']();if(manager['exists'](_0x5b1ffb)){if(_0x4713d3[_0x5b1ffb][_0x0b56('0x4f')]&&_0x4713d3[_0x5b1ffb]['active']&&moment()['isBetween'](_0x4713d3[_0x5b1ffb][_0x0b56('0x51')],_0x4713d3[_0x5b1ffb][_0x0b56('0x52')])){manager[_0x0b56('0x58')](_0x5b1ffb,_0x4713d3[_0x5b1ffb][_0x0b56('0x4f')],handleJob(_0x4713d3[_0x5b1ffb]));logger[_0x0b56('0xd')](_0x0b56('0x59'),_0x4713d3[_0x5b1ffb][_0x0b56('0x16')],_0x4713d3[_0x5b1ffb]['cron']);}else{manager[_0x0b56('0x49')](_0x5b1ffb);manager['deleteJob'](_0x5b1ffb);logger[_0x0b56('0xd')]('stop\x20cron',_0x4713d3[_0x5b1ffb][_0x0b56('0x16')],_0x4713d3[_0x5b1ffb]['cron']);}}}})['catch'](function(_0x5747e6){logger[_0x0b56('0x2f')](JSON['stringify'](_0x5747e6));});}exports[_0x0b56('0x5a')]=function(_0x654d78){return getJobs(_0x654d78);};exports[_0x0b56('0x54')]=function(){setInterval(function(){return getJobs();},0x3c*0x3e8);return getJobs();}; \ No newline at end of file +var _0xc2d0=['extname','existsSync','status','Sent','attachments','text','Info\x20report:\x0a%s\x0aPlease\x20see\x20the\x20attachments\x0aThis\x20is\x20an\x20automatically\x20generated\x20email\x20–\x20please\x20do\x20not\x20reply\x20to\x20it.\x0a\x0a','message','Report\x20empty\x0aThis\x20is\x20an\x20automatically\x20generated\x20email\x20–\x20please\x20do\x20not\x20reply\x20to\x20this\x20email.\x0a\x0a','request','then','error','email\x20sent','catch','error\x20mail','data','stringify','isNil','subtractNumber\x20null\x20or\x20undefined','subtractUnit\x20null\x20or\x20undefined','subtract','YYYY-MM-DD\x20HH:mm:ss','output','DefaultReportId','exec\x20defaul\x20report\x20id:%s','runReport','CustomReportId','exec\x20custom\x20report\x20id:%s','no\x20report\x20id','Schedule','findAll','keys','jobs','toString','keyBy','intersection','difference','exists','stop','deleteJob','toRun','length','my\x20id','resolve','cron','active','isBetween','startAt','endAt','start','stop\x20cron','update','update\x20cron','run','path','lodash','moment','jayson/promise','bluebird','schedule','../../mysqldb','../../api/analyticDefaultReport/analyticDefaultReport.controller','http','info','Try\x20to\x20send\x20a\x20mail\x20to','MailAccount','Smtp','service','host','port','secure','authentication','auth','pass','format','name','email','bcc','Report\x20%s\x20last\x20%s\x20%s','subtractNumber','subtractUnit','join','../../files/reports','savename'];(function(_0x3aa4d3,_0x132305){var _0x576a1b=function(_0x277f3f){while(--_0x277f3f){_0x3aa4d3['push'](_0x3aa4d3['shift']());}};_0x576a1b(++_0x132305);}(_0xc2d0,0x132));var _0x0c2d=function(_0x4a1cf7,_0x4ee506){_0x4a1cf7=_0x4a1cf7-0x0;var _0x17caad=_0xc2d0[_0x4a1cf7];return _0x17caad;};'use strict';var fs=require('fs');var util=require('util');var path=require(_0x0c2d('0x0'));var _=require(_0x0c2d('0x1'));var moment=require(_0x0c2d('0x2'));var CronJobManager=require('cron-job-manager');var jayson=require(_0x0c2d('0x3'));var BPromise=require(_0x0c2d('0x4'));var logger=require('../logger')(_0x0c2d('0x5'));var db=require(_0x0c2d('0x6'))['db'];var analyticCustomReportController=require('../../api/analyticCustomReport/analyticCustomReport.controller');var analyticDefaultReportController=require(_0x0c2d('0x7'));var client=jayson['client'][_0x0c2d('0x8')]({'port':0x232b});var manager=new CronJobManager();function handleSendEmail(_0x445924,_0x44d1ad){return function(){logger[_0x0c2d('0x9')](_0x0c2d('0xa'),_0x445924['email']);var _0x1f96b1=!![];var _0x26b545={'tls':{'rejectUnauthorized':![]}};if(_0x445924[_0x0c2d('0xb')][_0x0c2d('0xc')][_0x0c2d('0xd')]){_0x26b545[_0x0c2d('0xd')]=_0x445924['MailAccount'][_0x0c2d('0xc')]['service'];}else{_0x26b545[_0x0c2d('0xe')]=_0x445924[_0x0c2d('0xb')]['Smtp'][_0x0c2d('0xe')];_0x26b545['port']=_0x445924[_0x0c2d('0xb')][_0x0c2d('0xc')][_0x0c2d('0xf')];_0x26b545['secure']=_0x445924[_0x0c2d('0xb')][_0x0c2d('0xc')][_0x0c2d('0x10')];}if(_0x445924[_0x0c2d('0xb')][_0x0c2d('0xc')][_0x0c2d('0x11')]){_0x26b545[_0x0c2d('0x12')]={'user':_0x445924[_0x0c2d('0xb')][_0x0c2d('0xc')]['user'],'pass':_0x445924[_0x0c2d('0xb')][_0x0c2d('0xc')][_0x0c2d('0x13')]};}var _0x4cb583={'account':_0x26b545,'message':{'from':util[_0x0c2d('0x14')]('\x22%s\x22\x20<%s>',_0x445924[_0x0c2d('0xb')][_0x0c2d('0x15')],_0x445924[_0x0c2d('0xb')][_0x0c2d('0x16')]||_0x445924['MailAccount'][_0x0c2d('0xc')]['user']),'to':_0x445924['email'],'cc':_0x445924['cc'],'bcc':_0x445924[_0x0c2d('0x17')],'subject':util[_0x0c2d('0x14')](_0x0c2d('0x18'),_0x44d1ad[_0x0c2d('0x15')],_0x445924[_0x0c2d('0x19')],_0x445924[_0x0c2d('0x1a')])}};var _0x5b93cf=path[_0x0c2d('0x1b')](__dirname,_0x0c2d('0x1c'));var _0x4d39da=_0x44d1ad[_0x0c2d('0x1d')];var _0x108963=util[_0x0c2d('0x14')]('%s.%s',path['basename'](_0x44d1ad[_0x0c2d('0x1d')],path[_0x0c2d('0x1e')](_0x44d1ad[_0x0c2d('0x1d')])),'zip');var _0x34f52a=path[_0x0c2d('0x1b')](_0x5b93cf,_0x4d39da);var _0x1fce97=path[_0x0c2d('0x1b')](_0x5b93cf,_0x108963);if(fs[_0x0c2d('0x1f')](_0x34f52a)){_0x44d1ad[_0x0c2d('0x20')]=_0x0c2d('0x21');_0x4cb583['message'][_0x0c2d('0x22')]=[{'filename':_0x4d39da,'path':_0x34f52a}];_0x4cb583['message'][_0x0c2d('0x23')]=util['format'](_0x0c2d('0x24'),JSON['stringify'](_0x44d1ad,null,0x2));}else if(fs['existsSync'](_0x1fce97)){_0x44d1ad[_0x0c2d('0x20')]=_0x0c2d('0x21');_0x4cb583['message'][_0x0c2d('0x22')]=[{'filename':_0x108963,'path':_0x1fce97}];}else{_0x4cb583[_0x0c2d('0x25')][_0x0c2d('0x23')]=_0x0c2d('0x26');if(!_0x445924['sendIfEmpty']){_0x1f96b1=![];logger[_0x0c2d('0x9')]('empty\x20file,\x20email\x20not\x20sent');}}if(_0x1f96b1){return client[_0x0c2d('0x27')]('SendMail',_0x4cb583)[_0x0c2d('0x28')](function(_0x3879bc){if(_0x3879bc[_0x0c2d('0x29')]){return logger[_0x0c2d('0x29')]('error\x20mail',JSON['stringify'](_0x3879bc));}return logger[_0x0c2d('0x9')](_0x0c2d('0x2a'));})[_0x0c2d('0x2b')](function(_0x49928e){return logger[_0x0c2d('0x29')](_0x0c2d('0x2c'),JSON['stringify'](_0x49928e));});}};}function handleError(){return function(_0x493416){return logger[_0x0c2d('0x29')](JSON['stringify'](_0x493416));};}function handleResult(_0x550efa){return function(_0x340117){logger[_0x0c2d('0x9')](_0x0c2d('0x2d'),JSON[_0x0c2d('0x2e')](_0x340117));if(_0x550efa[_0x0c2d('0xb')]&&_0x550efa['MailAccount'][_0x0c2d('0xc')]&&!_[_0x0c2d('0x2f')](_0x550efa[_0x0c2d('0x16')])){setTimeout(handleSendEmail(_0x550efa,_0x340117),0x3c*0x3e8);}};}function handleJob(_0x549dc8){return function(){try{if(_['isNil'](_0x549dc8['subtractNumber'])){return logger['info'](_0x0c2d('0x30'));}if(_['isNil'](_0x549dc8[_0x0c2d('0x1a')])){return logger[_0x0c2d('0x9')](_0x0c2d('0x31'));}var _0x5b8118={'startDate':moment()[_0x0c2d('0x32')](_0x549dc8[_0x0c2d('0x19')],_0x549dc8['subtractUnit'])[_0x0c2d('0x14')](_0x0c2d('0x33')),'endDate':moment()[_0x0c2d('0x14')](_0x0c2d('0x33')),'type':'scheduled','output':_0x549dc8[_0x0c2d('0x34')],'name':_0x549dc8[_0x0c2d('0x15')]};if(!_[_0x0c2d('0x2f')](_0x549dc8[_0x0c2d('0x35')])){logger[_0x0c2d('0x9')](_0x0c2d('0x36'),_0x549dc8[_0x0c2d('0x35')]);return analyticDefaultReportController[_0x0c2d('0x37')]({'id':_0x549dc8[_0x0c2d('0x35')]},_0x5b8118)[_0x0c2d('0x28')](handleResult(_0x549dc8))[_0x0c2d('0x2b')](handleError());}if(!_[_0x0c2d('0x2f')](_0x549dc8[_0x0c2d('0x38')])){logger['info'](_0x0c2d('0x39'),_0x549dc8[_0x0c2d('0x38')]);return analyticCustomReportController[_0x0c2d('0x37')]({'id':_0x549dc8[_0x0c2d('0x38')]},_0x5b8118)[_0x0c2d('0x28')](handleResult(_0x549dc8))[_0x0c2d('0x2b')](handleError());}}catch(_0x46d9af){logger['error'](JSON[_0x0c2d('0x2e')](_0x46d9af));}return logger['info'](_0x0c2d('0x3a'));};}function getJobs(_0x437d13){var _0x4be0f9={};if(_0x437d13){_0x4be0f9['id']=_0x437d13;}return db[_0x0c2d('0x3b')][_0x0c2d('0x3c')]({'where':_0x4be0f9,'include':[{'model':db['MailAccount'],'attributes':['id',_0x0c2d('0x15'),'email'],'include':[{'model':db['MailServerOut'],'as':'Smtp'}]}]})[_0x0c2d('0x28')](function(_0x31760b){var _0xcc29b3=_[_0x0c2d('0x3d')](manager[_0x0c2d('0x3e')]);var _0x537024=_['map'](_0x31760b,function(_0x5ec571){return _0x5ec571['id'][_0x0c2d('0x3f')]();});var _0x17cbbc=_[_0x0c2d('0x40')](_0x31760b,function(_0x505366){return _0x505366['id'][_0x0c2d('0x3f')]();});var _0x39bf6f=_0x437d13?_0x537024:_['difference'](_0x537024,_0xcc29b3);var _0x32eb8c=_[_0x0c2d('0x41')](_0x537024,_0xcc29b3);var _0x1c131c=_[_0x0c2d('0x42')](_0xcc29b3,_0x537024);var _0x243092;var _0x2dd813;for(_0x243092=0x0;_0x243092<_0x1c131c['length']&&!_0x437d13;_0x243092+=0x1){_0x2dd813=_0x1c131c[_0x243092][_0x0c2d('0x3f')]();if(manager[_0x0c2d('0x43')](_0x2dd813)){manager[_0x0c2d('0x44')](_0x2dd813);manager[_0x0c2d('0x45')](_0x2dd813);logger['info']('delete\x20cron',_0x2dd813);}}logger['info'](_0x0c2d('0x46'),JSON[_0x0c2d('0x2e')](_0x39bf6f));for(_0x243092=0x0;_0x243092<_0x39bf6f[_0x0c2d('0x47')];_0x243092+=0x1){_0x2dd813=_0x39bf6f[_0x243092]['toString']();logger[_0x0c2d('0x9')]('index',_0x2dd813);if(_0x437d13){logger[_0x0c2d('0x9')](_0x0c2d('0x48'),_0x437d13);logger[_0x0c2d('0x9')](JSON[_0x0c2d('0x2e')](_0x17cbbc[_0x2dd813]));BPromise[_0x0c2d('0x49')]()[_0x0c2d('0x28')](handleJob(_0x17cbbc[_0x2dd813]));logger[_0x0c2d('0x9')]('run\x20job',_0x17cbbc[_0x2dd813][_0x0c2d('0x15')],_0x17cbbc[_0x2dd813][_0x0c2d('0x4a')]);}else if(_0x17cbbc[_0x2dd813]['cron']&&_0x17cbbc[_0x2dd813][_0x0c2d('0x4b')]&&moment()[_0x0c2d('0x4c')](_0x17cbbc[_0x2dd813][_0x0c2d('0x4d')],_0x17cbbc[_0x2dd813][_0x0c2d('0x4e')])){manager['add'](_0x2dd813,_0x17cbbc[_0x2dd813][_0x0c2d('0x4a')],handleJob(_0x17cbbc[_0x2dd813]));manager[_0x0c2d('0x4f')](_0x2dd813);logger[_0x0c2d('0x9')]('add\x20cron',_0x17cbbc[_0x2dd813]['name'],_0x17cbbc[_0x2dd813][_0x0c2d('0x4a')]);}else if(manager[_0x0c2d('0x43')](_0x2dd813)){manager[_0x0c2d('0x44')](_0x2dd813);manager[_0x0c2d('0x45')](_0x2dd813);logger[_0x0c2d('0x9')](_0x0c2d('0x50'),_0x17cbbc[_0x2dd813]['name'],_0x17cbbc[_0x2dd813][_0x0c2d('0x4a')]);}}for(_0x243092=0x0,_0x2dd813;_0x243092<_0x32eb8c[_0x0c2d('0x47')]&&!_0x437d13;_0x243092+=0x1){_0x2dd813=_0x32eb8c[_0x243092]['toString']();if(manager[_0x0c2d('0x43')](_0x2dd813)){if(_0x17cbbc[_0x2dd813][_0x0c2d('0x4a')]&&_0x17cbbc[_0x2dd813][_0x0c2d('0x4b')]&&moment()['isBetween'](_0x17cbbc[_0x2dd813][_0x0c2d('0x4d')],_0x17cbbc[_0x2dd813][_0x0c2d('0x4e')])){manager[_0x0c2d('0x51')](_0x2dd813,_0x17cbbc[_0x2dd813][_0x0c2d('0x4a')],handleJob(_0x17cbbc[_0x2dd813]));logger['info'](_0x0c2d('0x52'),_0x17cbbc[_0x2dd813][_0x0c2d('0x15')],_0x17cbbc[_0x2dd813][_0x0c2d('0x4a')]);}else{manager['stop'](_0x2dd813);manager[_0x0c2d('0x45')](_0x2dd813);logger[_0x0c2d('0x9')](_0x0c2d('0x50'),_0x17cbbc[_0x2dd813]['name'],_0x17cbbc[_0x2dd813][_0x0c2d('0x4a')]);}}}})[_0x0c2d('0x2b')](function(_0x1e7e5b){logger[_0x0c2d('0x29')](JSON[_0x0c2d('0x2e')](_0x1e7e5b));});}exports[_0x0c2d('0x53')]=function(_0x268604){return getJobs(_0x268604);};exports[_0x0c2d('0x4f')]=function(){setInterval(function(){return getJobs();},0x3c*0x3e8);return getJobs();}; \ No newline at end of file diff --git a/server/config/schedule/transcribe.js b/server/config/schedule/transcribe.js index 00c1daa..707cf08 100644 --- a/server/config/schedule/transcribe.js +++ b/server/config/schedule/transcribe.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xae7b=['transcript','update','Sequelize','ValidationError','Sentiment\x20Analysis\x20not\x20requested','sentiment','sentimentAccountId','sentimentRegion','Sentiment\x20Analysis\x20not\x20configured','Transcript\x20not\x20available','findOne','Cloud\x20Provider\x20not\x20available','data2','Cloud\x20Provider\x20not\x20configured','[RECORDING:%d]\x20Requesting\x20sentiment\x20analysis','[RECORDING:%d]\x20Sentiment\x20Analysis\x20available','Sentiment','SentimentScore','Positive','Mixed','Neutral','[RECORDING:%d]\x20Voice\x20Recording\x20entry\x20updated','FAILED','[RECORDING:%d]\x20Transcript\x20Job\x20status\x20not\x20managed','resolve','tempSentiment','language','bucket','CloudProvider','Negative','COMPLETED','catch','name','SequelizeValidationError','error','[RECORDING:%d]\x20Error\x20running\x20Transcribe\x20&\x20Sentiment\x20Analysis','VoiceRecording','findAll','No\x20transcribe\x20job\x20to\x20check','Setting','transcribeAccountId','transcribeRegion','forEach','push','all','start','lodash','aws-sdk','request-promise','../../mysqldb','../../config/logger','transcribe','TranscribeService','detectSentiment','substring','info','format','[RECORDING:%d]\x20Get\x20status\x20for\x20transcript\x20job\x20(%s)','data1','transcribeName','then','[RECORDING:%d]\x20Status\x20of\x20transcript\x20job\x20(%s):\x20%s','TranscriptionJob','TranscriptionJobStatus','fileText','Transcript','TranscriptFileUri','[RECORDING:%d]\x20Get\x20transcript','[RECORDING:%d]\x20Transcript\x20downloaded','results','transcripts','length'];(function(_0x5899e4,_0x4130ee){var _0x5da360=function(_0x233a96){while(--_0x233a96){_0x5899e4['push'](_0x5899e4['shift']());}};_0x5da360(++_0x4130ee);}(_0xae7b,0xbe));var _0xbae7=function(_0x333755,_0x47aadf){_0x333755=_0x333755-0x0;var _0x1335ce=_0xae7b[_0x333755];return _0x1335ce;};var _=require(_0xbae7('0x0'));var AWS=require(_0xbae7('0x1'));var rp=require(_0xbae7('0x2'));var util=require('util');var BPromise=require('bluebird');var db=require(_0xbae7('0x3'))['db'];var logger=require(_0xbae7('0x4'))(_0xbae7('0x5'));function getTranscriptionJob(_0xc0d4b9,_0x49bdda,_0x48b6a2,_0x339d6b){return new Promise(function(_0xb625f6,_0x163147){var _0x56c84c=new AWS[(_0xbae7('0x6'))]({'accessKeyId':_0x49bdda,'secretAccessKey':_0xc0d4b9,'region':_0x48b6a2});_0x56c84c['getTranscriptionJob']({'TranscriptionJobName':_0x339d6b},function(_0x228a90,_0x319b0b){if(_0x228a90){return _0x163147(_0x228a90);}else{return _0xb625f6(_0x319b0b);}});});}function sentiment(_0x100e0e,_0x4dba83,_0x1b4162,_0x554592,_0x3dc46e){return new Promise(function(_0x10ab49,_0x1ac637){var _0x3c2423=new AWS['Comprehend']({'accessKeyId':_0x4dba83,'secretAccessKey':_0x100e0e,'region':_0x1b4162});_0x3c2423[_0xbae7('0x7')]({'Text':_0x554592,'LanguageCode':_0x3dc46e[_0xbae7('0x8')](0x0,0x2)},function(_0x484906,_0x123146){if(_0x484906){return _0x1ac637(_0x484906);}else{return _0x10ab49(_0x123146);}});});}function checkTranscribeJob(_0x48af40,_0x3d17ae,_0x4090a1){var _0x5b1abe;return new BPromise(function(_0x4800d4,_0x44bdbb){logger[_0xbae7('0x9')](util[_0xbae7('0xa')](_0xbae7('0xb'),_0x48af40['id'],_0x48af40['transcribeName']));return getTranscriptionJob(_0x4090a1[_0xbae7('0xc')],_0x4090a1['data2'],_0x3d17ae['transcribeRegion'],_0x48af40[_0xbae7('0xd')])[_0xbae7('0xe')](function(_0x1b9ee1){logger[_0xbae7('0x9')](util[_0xbae7('0xa')](_0xbae7('0xf'),_0x48af40['id'],_0x48af40['transcribeName'],_0x1b9ee1[_0xbae7('0x10')][_0xbae7('0x11')]));if(!_0x48af40[_0xbae7('0x12')]){switch(_0x1b9ee1[_0xbae7('0x10')][_0xbae7('0x11')]){case'COMPLETED':var _0x5dd094={'transcribeStatus':_0x1b9ee1['TranscriptionJob'][_0xbae7('0x11')],'fileUri':_0x1b9ee1[_0xbae7('0x10')][_0xbae7('0x13')][_0xbae7('0x14')]};logger[_0xbae7('0x9')](util['format'](_0xbae7('0x15'),_0x48af40['id']));return rp({'uri':_0x1b9ee1[_0xbae7('0x10')][_0xbae7('0x13')][_0xbae7('0x14')],'json':!![]})[_0xbae7('0xe')](function(_0x502f06){logger[_0xbae7('0x9')](util[_0xbae7('0xa')](_0xbae7('0x16'),_0x48af40['id']));if(_0x502f06&&_0x502f06[_0xbae7('0x17')]&&_0x502f06[_0xbae7('0x17')][_0xbae7('0x18')]&&_0x502f06[_0xbae7('0x17')]['transcripts']['length']){_0x5dd094[_0xbae7('0x12')]='';for(var _0x3bedda=0x0;_0x3bedda<_0x502f06[_0xbae7('0x17')][_0xbae7('0x18')][_0xbae7('0x19')];_0x3bedda++){_0x5dd094[_0xbae7('0x12')]+=_0x502f06[_0xbae7('0x17')][_0xbae7('0x18')][_0x3bedda][_0xbae7('0x1a')]+'';}}return _0x48af40[_0xbae7('0x1b')](_0x5dd094);})[_0xbae7('0xe')](function(){logger[_0xbae7('0x9')](util['format']('[RECORDING:%d]\x20Voice\x20Recording\x20entry\x20updated',_0x48af40['id']));if(!_0x48af40['tempSentiment']){throw new db[(_0xbae7('0x1c'))][(_0xbae7('0x1d'))](_0xbae7('0x1e'));}if(!_0x3d17ae[_0xbae7('0x1f')]||!_0x3d17ae[_0xbae7('0x20')]||!_0x3d17ae[_0xbae7('0x21')]||!_0x3d17ae['language']||!_0x3d17ae['bucket']){throw new db[(_0xbae7('0x1c'))][(_0xbae7('0x1d'))](_0xbae7('0x22'));}if(!_0x5dd094[_0xbae7('0x12')]){throw new Error(_0xbae7('0x23'));}if(_0x3d17ae[_0xbae7('0x20')]===_0x4090a1['id']){return _0x4090a1;}else{return db['CloudProvider'][_0xbae7('0x24')]({'where':{'id':_settings[_0xbae7('0x20')]}});}})[_0xbae7('0xe')](function(_0x1f586d){if(!_0x1f586d){throw new db[(_0xbae7('0x1c'))][(_0xbae7('0x1d'))](_0xbae7('0x25'));}if(!_0x1f586d[_0xbae7('0xc')]||!_0x1f586d[_0xbae7('0x26')]){throw new db[(_0xbae7('0x1c'))][(_0xbae7('0x1d'))](_0xbae7('0x27'));}_0x5b1abe=_0x1f586d;logger['info'](util[_0xbae7('0xa')](_0xbae7('0x28'),_0x48af40['id']));return sentiment(_0x5b1abe[_0xbae7('0xc')],_0x5b1abe['data2'],_0x3d17ae[_0xbae7('0x21')],_0x5dd094[_0xbae7('0x12')],_0x3d17ae['language']);})[_0xbae7('0xe')](function(_0x1f27fb){logger[_0xbae7('0x9')](util[_0xbae7('0xa')](_0xbae7('0x29'),_0x48af40['id']));return _0x48af40[_0xbae7('0x1b')]({'sentiment':_0x1f27fb[_0xbae7('0x2a')],'sPositive':_0x1f27fb[_0xbae7('0x2b')][_0xbae7('0x2c')],'sNegative':_0x1f27fb['SentimentScore']['Negative'],'sMixed':_0x1f27fb[_0xbae7('0x2b')][_0xbae7('0x2d')],'sNeutral':_0x1f27fb['SentimentScore'][_0xbae7('0x2e')]});})[_0xbae7('0xe')](function(){logger[_0xbae7('0x9')](util[_0xbae7('0xa')](_0xbae7('0x2f'),_0x48af40['id']));_0x4800d4();});case _0xbae7('0x30'):return _0x48af40[_0xbae7('0x1b')]({'transcribeStatus':_0xbae7('0x30'),'failureReason':_0x1b9ee1['TranscriptionJob']['FailureReason']})[_0xbae7('0xe')](function(){logger['info'](util[_0xbae7('0xa')]('[RECORDING:%d]\x20Voice\x20Recording\x20entry\x20updated',_0x48af40['id']));_0x4800d4();});default:logger[_0xbae7('0x9')](util[_0xbae7('0xa')](_0xbae7('0x31'),_0x48af40['id']));break;}}else{return BPromise[_0xbae7('0x32')]()[_0xbae7('0xe')](function(){if(!_0x48af40[_0xbae7('0x33')]){throw new db['Sequelize'][(_0xbae7('0x1d'))]('Sentiment\x20Analysis\x20not\x20requested');}if(!_0x3d17ae['sentiment']||!_0x3d17ae[_0xbae7('0x20')]||!_0x3d17ae[_0xbae7('0x21')]||!_0x3d17ae[_0xbae7('0x34')]||!_0x3d17ae[_0xbae7('0x35')]){throw new db[(_0xbae7('0x1c'))]['ValidationError'](_0xbae7('0x22'));}if(!_0x48af40[_0xbae7('0x12')]){throw new Error(_0xbae7('0x23'));}if(_0x3d17ae[_0xbae7('0x20')]===_0x4090a1['id']){return _0x4090a1;}else{return db[_0xbae7('0x36')]['findOne']({'where':{'id':_settings[_0xbae7('0x20')]}});}})['then'](function(_0x6b13a9){if(!_0x6b13a9){throw new db[(_0xbae7('0x1c'))][(_0xbae7('0x1d'))](_0xbae7('0x25'));}if(!_0x6b13a9[_0xbae7('0xc')]||!_0x6b13a9['data2']){throw new db[(_0xbae7('0x1c'))][(_0xbae7('0x1d'))](_0xbae7('0x27'));}_0x5b1abe=_0x6b13a9;logger[_0xbae7('0x9')](util[_0xbae7('0xa')](_0xbae7('0x28'),_0x48af40['id']));return sentiment(_0x5b1abe[_0xbae7('0xc')],_0x5b1abe['data2'],_0x3d17ae[_0xbae7('0x21')],_0x48af40[_0xbae7('0x12')],_0x3d17ae[_0xbae7('0x34')]);})[_0xbae7('0xe')](function(_0x1330b6){logger[_0xbae7('0x9')](util['format']('[RECORDING:%d]\x20Sentiment\x20Analysis\x20available',_0x48af40['id']));return _0x48af40[_0xbae7('0x1b')]({'sentiment':_0x1330b6[_0xbae7('0x2a')],'sPositive':_0x1330b6['SentimentScore'][_0xbae7('0x2c')],'sNegative':_0x1330b6[_0xbae7('0x2b')][_0xbae7('0x37')],'sMixed':_0x1330b6[_0xbae7('0x2b')][_0xbae7('0x2d')],'sNeutral':_0x1330b6['SentimentScore'][_0xbae7('0x2e')],'transcribeStatus':_0xbae7('0x38')});})[_0xbae7('0xe')](function(){logger[_0xbae7('0x9')](util['format'](_0xbae7('0x2f'),_0x48af40['id']));_0x4800d4();});}})[_0xbae7('0x39')](function(_0x23ad3d){if(_0x23ad3d){if(!_0x23ad3d[_0xbae7('0x3a')]||_0x23ad3d['name']!==_0xbae7('0x3b')){logger[_0xbae7('0x3c')](util[_0xbae7('0xa')](_0xbae7('0x3d'),_0x48af40['id']),util['inspect'](_0x23ad3d,{'showHidden':![],'depth':null}));}}_0x4800d4();});});}function checkTranscribe(){var _0x3b8b3b;var _0x12f398;var _0xb6df1f;return db[_0xbae7('0x3e')][_0xbae7('0x3f')]({'where':{'transcribeStatus':'IN_PROGRESS'}})['then'](function(_0x539d78){if(!_0x539d78||!_0x539d78[_0xbae7('0x19')]){throw new db[(_0xbae7('0x1c'))][(_0xbae7('0x1d'))](_0xbae7('0x40'));}_0x3b8b3b=_0x539d78;return db[_0xbae7('0x41')]['findOne']({'where':{'id':0x1}});})['then'](function(_0x1bb00a){if(!_0x1bb00a){throw new db[(_0xbae7('0x1c'))][(_0xbae7('0x1d'))]('Settings\x20not\x20available');}_0x12f398=_0x1bb00a;if(!_0x12f398[_0xbae7('0x5')]||!_0x12f398[_0xbae7('0x42')]||!_0x12f398[_0xbae7('0x43')]||!_0x12f398[_0xbae7('0x34')]||!_0x12f398[_0xbae7('0x35')]){throw new db['Sequelize'][(_0xbae7('0x1d'))]('Transcribe\x20not\x20configured');}return db[_0xbae7('0x36')][_0xbae7('0x24')]({'where':{'id':_0x12f398[_0xbae7('0x42')]}});})[_0xbae7('0xe')](function(_0x384fbc){if(!_0x384fbc){throw new db[(_0xbae7('0x1c'))]['ValidationError'](_0xbae7('0x25'));}if(!_0x384fbc[_0xbae7('0xc')]||!_0x384fbc['data2']){throw new db['Sequelize']['ValidationError']('Cloud\x20Provider\x20not\x20configured');}_0xb6df1f=_0x384fbc;var _0x35efe1=[];_0x3b8b3b[_0xbae7('0x44')](function(_0x77e014){_0x35efe1[_0xbae7('0x45')](checkTranscribeJob(_0x77e014,_0x12f398,_0xb6df1f));});return BPromise[_0xbae7('0x46')](_0x35efe1);})[_0xbae7('0x39')](function(_0x5f2e3e){if(_0x5f2e3e){if(!_0x5f2e3e[_0xbae7('0x3a')]||_0x5f2e3e[_0xbae7('0x3a')]!==_0xbae7('0x3b')){logger[_0xbae7('0x3c')](util['inspect'](_0x5f2e3e,{'showHidden':![],'depth':null}));}}});}exports[_0xbae7('0x47')]=function(){setInterval(function(){return checkTranscribe();},0x3c*0x3e8);return checkTranscribe();}; \ No newline at end of file +var _0x4977=['aws-sdk','request-promise','util','bluebird','../../config/logger','transcribe','TranscribeService','getTranscriptionJob','Comprehend','detectSentiment','substring','info','format','transcribeName','data2','transcribeRegion','then','[RECORDING:%d]\x20Status\x20of\x20transcript\x20job\x20(%s):\x20%s','TranscriptionJob','TranscriptionJobStatus','COMPLETED','TranscriptFileUri','[RECORDING:%d]\x20Get\x20transcript','Transcript','[RECORDING:%d]\x20Transcript\x20downloaded','results','transcripts','length','fileText','transcript','update','[RECORDING:%d]\x20Voice\x20Recording\x20entry\x20updated','tempSentiment','Sequelize','ValidationError','Sentiment\x20Analysis\x20not\x20requested','sentiment','sentimentAccountId','language','Transcript\x20not\x20available','findOne','Cloud\x20Provider\x20not\x20available','data1','Cloud\x20Provider\x20not\x20configured','[RECORDING:%d]\x20Requesting\x20sentiment\x20analysis','[RECORDING:%d]\x20Sentiment\x20Analysis\x20available','Sentiment','SentimentScore','Mixed','Neutral','FAILED','FailureReason','resolve','bucket','Sentiment\x20Analysis\x20not\x20configured','CloudProvider','Positive','Negative','name','SequelizeValidationError','error','[RECORDING:%d]\x20Error\x20running\x20Transcribe\x20&\x20Sentiment\x20Analysis','inspect','VoiceRecording','findAll','IN_PROGRESS','No\x20transcribe\x20job\x20to\x20check','Setting','Settings\x20not\x20available','transcribeAccountId','Transcribe\x20not\x20configured','forEach','push','all','catch','start','lodash'];(function(_0x4e59f9,_0x2c734e){var _0x38c2ac=function(_0x12f1a7){while(--_0x12f1a7){_0x4e59f9['push'](_0x4e59f9['shift']());}};_0x38c2ac(++_0x2c734e);}(_0x4977,0x1cd));var _0x7497=function(_0x5c8be7,_0x1d8a61){_0x5c8be7=_0x5c8be7-0x0;var _0x1f43db=_0x4977[_0x5c8be7];return _0x1f43db;};var _=require(_0x7497('0x0'));var AWS=require(_0x7497('0x1'));var rp=require(_0x7497('0x2'));var util=require(_0x7497('0x3'));var BPromise=require(_0x7497('0x4'));var db=require('../../mysqldb')['db'];var logger=require(_0x7497('0x5'))(_0x7497('0x6'));function getTranscriptionJob(_0x41bc6e,_0x43c339,_0x2f8f2e,_0x71433e){return new Promise(function(_0x50f563,_0x170987){var _0x21d9d5=new AWS[(_0x7497('0x7'))]({'accessKeyId':_0x43c339,'secretAccessKey':_0x41bc6e,'region':_0x2f8f2e});_0x21d9d5[_0x7497('0x8')]({'TranscriptionJobName':_0x71433e},function(_0x180bf8,_0x54da2d){if(_0x180bf8){return _0x170987(_0x180bf8);}else{return _0x50f563(_0x54da2d);}});});}function sentiment(_0x400394,_0x2b0d70,_0x5b4f54,_0x28c035,_0x264d9f){return new Promise(function(_0x44115a,_0x1d316d){var _0x336d87=new AWS[(_0x7497('0x9'))]({'accessKeyId':_0x2b0d70,'secretAccessKey':_0x400394,'region':_0x5b4f54});_0x336d87[_0x7497('0xa')]({'Text':_0x28c035,'LanguageCode':_0x264d9f[_0x7497('0xb')](0x0,0x2)},function(_0x5dabe9,_0x2d9836){if(_0x5dabe9){return _0x1d316d(_0x5dabe9);}else{return _0x44115a(_0x2d9836);}});});}function checkTranscribeJob(_0x2cfb39,_0x5e327f,_0x5be343){var _0x1845c9;return new BPromise(function(_0x3bccea,_0x3d4e1f){logger[_0x7497('0xc')](util[_0x7497('0xd')]('[RECORDING:%d]\x20Get\x20status\x20for\x20transcript\x20job\x20(%s)',_0x2cfb39['id'],_0x2cfb39[_0x7497('0xe')]));return getTranscriptionJob(_0x5be343['data1'],_0x5be343[_0x7497('0xf')],_0x5e327f[_0x7497('0x10')],_0x2cfb39[_0x7497('0xe')])[_0x7497('0x11')](function(_0x2f3dce){logger['info'](util[_0x7497('0xd')](_0x7497('0x12'),_0x2cfb39['id'],_0x2cfb39[_0x7497('0xe')],_0x2f3dce[_0x7497('0x13')][_0x7497('0x14')]));if(!_0x2cfb39['fileText']){switch(_0x2f3dce['TranscriptionJob'][_0x7497('0x14')]){case _0x7497('0x15'):var _0x454f13={'transcribeStatus':_0x2f3dce[_0x7497('0x13')][_0x7497('0x14')],'fileUri':_0x2f3dce[_0x7497('0x13')]['Transcript'][_0x7497('0x16')]};logger[_0x7497('0xc')](util[_0x7497('0xd')](_0x7497('0x17'),_0x2cfb39['id']));return rp({'uri':_0x2f3dce['TranscriptionJob'][_0x7497('0x18')][_0x7497('0x16')],'json':!![]})[_0x7497('0x11')](function(_0x31a354){logger[_0x7497('0xc')](util[_0x7497('0xd')](_0x7497('0x19'),_0x2cfb39['id']));if(_0x31a354&&_0x31a354[_0x7497('0x1a')]&&_0x31a354[_0x7497('0x1a')]['transcripts']&&_0x31a354[_0x7497('0x1a')][_0x7497('0x1b')][_0x7497('0x1c')]){_0x454f13[_0x7497('0x1d')]='';for(var _0x2c3d00=0x0;_0x2c3d00<_0x31a354[_0x7497('0x1a')][_0x7497('0x1b')]['length'];_0x2c3d00++){_0x454f13[_0x7497('0x1d')]+=_0x31a354[_0x7497('0x1a')][_0x7497('0x1b')][_0x2c3d00][_0x7497('0x1e')]+'';}}return _0x2cfb39[_0x7497('0x1f')](_0x454f13);})['then'](function(){logger['info'](util[_0x7497('0xd')](_0x7497('0x20'),_0x2cfb39['id']));if(!_0x2cfb39[_0x7497('0x21')]){throw new db[(_0x7497('0x22'))][(_0x7497('0x23'))](_0x7497('0x24'));}if(!_0x5e327f[_0x7497('0x25')]||!_0x5e327f[_0x7497('0x26')]||!_0x5e327f['sentimentRegion']||!_0x5e327f[_0x7497('0x27')]||!_0x5e327f['bucket']){throw new db[(_0x7497('0x22'))][(_0x7497('0x23'))]('Sentiment\x20Analysis\x20not\x20configured');}if(!_0x454f13['fileText']){throw new Error(_0x7497('0x28'));}if(_0x5e327f[_0x7497('0x26')]===_0x5be343['id']){return _0x5be343;}else{return db['CloudProvider'][_0x7497('0x29')]({'where':{'id':_settings['sentimentAccountId']}});}})[_0x7497('0x11')](function(_0x3c1117){if(!_0x3c1117){throw new db[(_0x7497('0x22'))][(_0x7497('0x23'))](_0x7497('0x2a'));}if(!_0x3c1117[_0x7497('0x2b')]||!_0x3c1117[_0x7497('0xf')]){throw new db['Sequelize'][(_0x7497('0x23'))](_0x7497('0x2c'));}_0x1845c9=_0x3c1117;logger[_0x7497('0xc')](util['format'](_0x7497('0x2d'),_0x2cfb39['id']));return sentiment(_0x1845c9[_0x7497('0x2b')],_0x1845c9['data2'],_0x5e327f['sentimentRegion'],_0x454f13[_0x7497('0x1d')],_0x5e327f[_0x7497('0x27')]);})['then'](function(_0x161718){logger['info'](util['format'](_0x7497('0x2e'),_0x2cfb39['id']));return _0x2cfb39[_0x7497('0x1f')]({'sentiment':_0x161718[_0x7497('0x2f')],'sPositive':_0x161718[_0x7497('0x30')]['Positive'],'sNegative':_0x161718[_0x7497('0x30')]['Negative'],'sMixed':_0x161718[_0x7497('0x30')][_0x7497('0x31')],'sNeutral':_0x161718[_0x7497('0x30')][_0x7497('0x32')]});})[_0x7497('0x11')](function(){logger[_0x7497('0xc')](util[_0x7497('0xd')](_0x7497('0x20'),_0x2cfb39['id']));_0x3bccea();});case _0x7497('0x33'):return _0x2cfb39[_0x7497('0x1f')]({'transcribeStatus':_0x7497('0x33'),'failureReason':_0x2f3dce[_0x7497('0x13')][_0x7497('0x34')]})['then'](function(){logger[_0x7497('0xc')](util[_0x7497('0xd')](_0x7497('0x20'),_0x2cfb39['id']));_0x3bccea();});default:logger[_0x7497('0xc')](util['format']('[RECORDING:%d]\x20Transcript\x20Job\x20status\x20not\x20managed',_0x2cfb39['id']));break;}}else{return BPromise[_0x7497('0x35')]()['then'](function(){if(!_0x2cfb39[_0x7497('0x21')]){throw new db[(_0x7497('0x22'))][(_0x7497('0x23'))](_0x7497('0x24'));}if(!_0x5e327f[_0x7497('0x25')]||!_0x5e327f[_0x7497('0x26')]||!_0x5e327f['sentimentRegion']||!_0x5e327f[_0x7497('0x27')]||!_0x5e327f[_0x7497('0x36')]){throw new db[(_0x7497('0x22'))][(_0x7497('0x23'))](_0x7497('0x37'));}if(!_0x2cfb39[_0x7497('0x1d')]){throw new Error(_0x7497('0x28'));}if(_0x5e327f[_0x7497('0x26')]===_0x5be343['id']){return _0x5be343;}else{return db[_0x7497('0x38')]['findOne']({'where':{'id':_settings[_0x7497('0x26')]}});}})[_0x7497('0x11')](function(_0x27b98f){if(!_0x27b98f){throw new db[(_0x7497('0x22'))][(_0x7497('0x23'))](_0x7497('0x2a'));}if(!_0x27b98f['data1']||!_0x27b98f[_0x7497('0xf')]){throw new db[(_0x7497('0x22'))]['ValidationError'](_0x7497('0x2c'));}_0x1845c9=_0x27b98f;logger[_0x7497('0xc')](util[_0x7497('0xd')](_0x7497('0x2d'),_0x2cfb39['id']));return sentiment(_0x1845c9[_0x7497('0x2b')],_0x1845c9[_0x7497('0xf')],_0x5e327f['sentimentRegion'],_0x2cfb39[_0x7497('0x1d')],_0x5e327f['language']);})[_0x7497('0x11')](function(_0xf68263){logger[_0x7497('0xc')](util['format'](_0x7497('0x2e'),_0x2cfb39['id']));return _0x2cfb39['update']({'sentiment':_0xf68263['Sentiment'],'sPositive':_0xf68263[_0x7497('0x30')][_0x7497('0x39')],'sNegative':_0xf68263['SentimentScore'][_0x7497('0x3a')],'sMixed':_0xf68263[_0x7497('0x30')][_0x7497('0x31')],'sNeutral':_0xf68263[_0x7497('0x30')][_0x7497('0x32')],'transcribeStatus':'COMPLETED'});})[_0x7497('0x11')](function(){logger[_0x7497('0xc')](util[_0x7497('0xd')]('[RECORDING:%d]\x20Voice\x20Recording\x20entry\x20updated',_0x2cfb39['id']));_0x3bccea();});}})['catch'](function(_0x54f3e5){if(_0x54f3e5){if(!_0x54f3e5[_0x7497('0x3b')]||_0x54f3e5[_0x7497('0x3b')]!==_0x7497('0x3c')){logger[_0x7497('0x3d')](util[_0x7497('0xd')](_0x7497('0x3e'),_0x2cfb39['id']),util[_0x7497('0x3f')](_0x54f3e5,{'showHidden':![],'depth':null}));}}_0x3bccea();});});}function checkTranscribe(){var _0x200066;var _0x293af5;var _0x17910c;return db[_0x7497('0x40')][_0x7497('0x41')]({'where':{'transcribeStatus':_0x7497('0x42')}})[_0x7497('0x11')](function(_0x5a2c26){if(!_0x5a2c26||!_0x5a2c26['length']){throw new db[(_0x7497('0x22'))][(_0x7497('0x23'))](_0x7497('0x43'));}_0x200066=_0x5a2c26;return db[_0x7497('0x44')]['findOne']({'where':{'id':0x1}});})[_0x7497('0x11')](function(_0x4347f4){if(!_0x4347f4){throw new db['Sequelize'][(_0x7497('0x23'))](_0x7497('0x45'));}_0x293af5=_0x4347f4;if(!_0x293af5['transcribe']||!_0x293af5[_0x7497('0x46')]||!_0x293af5[_0x7497('0x10')]||!_0x293af5[_0x7497('0x27')]||!_0x293af5[_0x7497('0x36')]){throw new db[(_0x7497('0x22'))]['ValidationError'](_0x7497('0x47'));}return db['CloudProvider'][_0x7497('0x29')]({'where':{'id':_0x293af5[_0x7497('0x46')]}});})['then'](function(_0x4f8fc8){if(!_0x4f8fc8){throw new db['Sequelize'][(_0x7497('0x23'))]('Cloud\x20Provider\x20not\x20available');}if(!_0x4f8fc8[_0x7497('0x2b')]||!_0x4f8fc8[_0x7497('0xf')]){throw new db[(_0x7497('0x22'))][(_0x7497('0x23'))](_0x7497('0x2c'));}_0x17910c=_0x4f8fc8;var _0x458fe9=[];_0x200066[_0x7497('0x48')](function(_0x77a3ac){_0x458fe9[_0x7497('0x49')](checkTranscribeJob(_0x77a3ac,_0x293af5,_0x17910c));});return BPromise[_0x7497('0x4a')](_0x458fe9);})[_0x7497('0x4b')](function(_0x3d7a34){if(_0x3d7a34){if(!_0x3d7a34[_0x7497('0x3b')]||_0x3d7a34[_0x7497('0x3b')]!==_0x7497('0x3c')){logger['error'](util[_0x7497('0x3f')](_0x3d7a34,{'showHidden':![],'depth':null}));}}});}exports[_0x7497('0x4c')]=function(){setInterval(function(){return checkTranscribe();},0x3c*0x3e8);return checkTranscribe();}; \ No newline at end of file diff --git a/server/config/schedule/whatsapp.js b/server/config/schedule/whatsapp.js index fee3fc6..8a3b24d 100644 --- a/server/config/schedule/whatsapp.js +++ b/server/config/schedule/whatsapp.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2fc8=['util','../../config/environment','../../mysqldb','../logger','schedule','redis','localhost','socket.io-emitter','WhatsappInteraction','lastMsgAt','subtract','hours','then','join','update','system','format','info','[WHATSAPP]\x20Sending\x20updates\x20for\x20interactions:','length','whatsappInteraction:update','error','[WHATSAPP]\x20Error\x20closing\x20interactions','inspect','start','lodash','moment','ioredis'];(function(_0x5eaf8e,_0x2056f4){var _0x3165ab=function(_0x48f4aa){while(--_0x48f4aa){_0x5eaf8e['push'](_0x5eaf8e['shift']());}};_0x3165ab(++_0x2056f4);}(_0x2fc8,0x6d));var _0x82fc=function(_0x3ff085,_0x27c92e){_0x3ff085=_0x3ff085-0x0;var _0x2b68c3=_0x2fc8[_0x3ff085];return _0x2b68c3;};'use strict';var _=require(_0x82fc('0x0'));var moment=require(_0x82fc('0x1'));var Redis=require(_0x82fc('0x2'));var util=require(_0x82fc('0x3'));var config=require(_0x82fc('0x4'));var db=require(_0x82fc('0x5'))['db'];var logger=require(_0x82fc('0x6'))(_0x82fc('0x7'));config[_0x82fc('0x8')]=_['defaults'](config[_0x82fc('0x8')],{'host':_0x82fc('0x9'),'port':0x18eb});var io=require(_0x82fc('0xa'))(new Redis(config['redis']));function closeInteractions(){var _0x358855=[];return db[_0x82fc('0xb')]['findAll']({'raw':!![],'attributes':['id',_0x82fc('0xc')],'where':{'closed':![],'lastMsgDirection':'in','lastMsgAt':{'$lt':moment()[_0x82fc('0xd')](0x18,_0x82fc('0xe'))}}})[_0x82fc('0xf')](function(_0x5f48e6){if(_0x5f48e6&&_0x5f48e6['length']){_0x358855=_['map'](_0x5f48e6||[],'id');logger['info']('[WHATSAPP]\x20Interactions\x20to\x20close:',_0x358855[_0x82fc('0x10')]());return db['WhatsappInteraction'][_0x82fc('0x11')]({'closeReason':_0x82fc('0x12'),'disposition':'timeout','closed':!![],'closedAt':moment()[_0x82fc('0x13')]('YYYY-MM-DD\x20HH:mm:ss')},{'where':{'id':_0x358855}});}})[_0x82fc('0xf')](function(){if(_0x358855&&_0x358855['length']){logger[_0x82fc('0x14')](_0x82fc('0x15'),_0x358855[_0x82fc('0x10')]());for(var _0x9cc074=0x0;_0x9cc074<_0x358855[_0x82fc('0x16')];_0x9cc074++){io['emit'](_0x82fc('0x17'),{'id':_0x358855[_0x9cc074],'closed':!![]});}}})['catch'](function(_0x255ada){logger[_0x82fc('0x18')](_0x82fc('0x19'),_0x255ada?util[_0x82fc('0x1a')](_0x255ada,{'showHidden':![],'depth':null}):'');});}exports[_0x82fc('0x1b')]=function(){setInterval(function(){return closeInteractions();},0x3c*0x3e8);return closeInteractions();}; \ No newline at end of file +var _0xd98a=['length','map','info','[WHATSAPP]\x20Interactions\x20to\x20close:','join','update','timeout','format','YYYY-MM-DD\x20HH:mm:ss','whatsappInteraction:update','catch','[WHATSAPP]\x20Error\x20closing\x20interactions','inspect','start','lodash','moment','ioredis','util','../../config/environment','../../mysqldb','../logger','defaults','redis','localhost','socket.io-emitter','WhatsappInteraction','findAll','lastMsgAt','then'];(function(_0xffe3f4,_0x2846aa){var _0xc9e75f=function(_0x55bd35){while(--_0x55bd35){_0xffe3f4['push'](_0xffe3f4['shift']());}};_0xc9e75f(++_0x2846aa);}(_0xd98a,0xf6));var _0xad98=function(_0x13bfe6,_0x57531a){_0x13bfe6=_0x13bfe6-0x0;var _0x469988=_0xd98a[_0x13bfe6];return _0x469988;};'use strict';var _=require(_0xad98('0x0'));var moment=require(_0xad98('0x1'));var Redis=require(_0xad98('0x2'));var util=require(_0xad98('0x3'));var config=require(_0xad98('0x4'));var db=require(_0xad98('0x5'))['db'];var logger=require(_0xad98('0x6'))('schedule');config['redis']=_[_0xad98('0x7')](config[_0xad98('0x8')],{'host':_0xad98('0x9'),'port':0x18eb});var io=require(_0xad98('0xa'))(new Redis(config['redis']));function closeInteractions(){var _0x15aa5b=[];return db[_0xad98('0xb')][_0xad98('0xc')]({'raw':!![],'attributes':['id',_0xad98('0xd')],'where':{'closed':![],'lastMsgDirection':'in','lastMsgAt':{'$lt':moment()['subtract'](0x18,'hours')}}})[_0xad98('0xe')](function(_0x1e59a5){if(_0x1e59a5&&_0x1e59a5[_0xad98('0xf')]){_0x15aa5b=_[_0xad98('0x10')](_0x1e59a5||[],'id');logger[_0xad98('0x11')](_0xad98('0x12'),_0x15aa5b[_0xad98('0x13')]());return db['WhatsappInteraction'][_0xad98('0x14')]({'closeReason':'system','disposition':_0xad98('0x15'),'closed':!![],'closedAt':moment()[_0xad98('0x16')](_0xad98('0x17'))},{'where':{'id':_0x15aa5b}});}})[_0xad98('0xe')](function(){if(_0x15aa5b&&_0x15aa5b[_0xad98('0xf')]){logger[_0xad98('0x11')]('[WHATSAPP]\x20Sending\x20updates\x20for\x20interactions:',_0x15aa5b[_0xad98('0x13')]());for(var _0x4df4de=0x0;_0x4df4de<_0x15aa5b['length'];_0x4df4de++){io['emit'](_0xad98('0x18'),{'id':_0x15aa5b[_0x4df4de],'closed':!![]});}}})[_0xad98('0x19')](function(_0x53bd8c){logger['error'](_0xad98('0x1a'),_0x53bd8c?util[_0xad98('0x1b')](_0x53bd8c,{'showHidden':![],'depth':null}):'');});}exports[_0xad98('0x1c')]=function(){setInterval(function(){return closeInteractions();},0x3c*0x3e8);return closeInteractions();}; \ No newline at end of file diff --git a/server/config/seedContact.js b/server/config/seedContact.js index b2add01..62fa05c 100644 --- a/server/config/seedContact.js +++ b/server/config/seedContact.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb830=['contacts2','hopper2','util','../mysqldb','push','Innocenzo','Biondo','innocenzo.biondo','@xcally.com','now','then','CmContact','bulkCreate','log','finished\x20populating','contacts1','CmHopper','destroy','hopper1'];(function(_0x27af45,_0x1b57aa){var _0x18df21=function(_0x4b7679){while(--_0x4b7679){_0x27af45['push'](_0x27af45['shift']());}};_0x18df21(++_0x1b57aa);}(_0xb830,0x10c));var _0x0b83=function(_0x597402,_0x54def6){_0x597402=_0x597402-0x0;var _0x488f13=_0xb830[_0x597402];return _0x488f13;};'use strict';var util=require(_0x0b83('0x0'));var db=require(_0x0b83('0x1'))['db'];var contacts=[];var hopper=[];var contacts2=[];var hopper2=[];for(var i=0x1;i<=0x4b0;i+=0x1){contacts[_0x0b83('0x2')]({'id':i,'firstName':_0x0b83('0x3')+i,'lastName':_0x0b83('0x4')+i,'phone':0xf879fb460+i,'email':_0x0b83('0x5')+i+_0x0b83('0x6')});}for(var i=0x1;i<=0x4b0;i+=0x1){hopper[_0x0b83('0x2')]({'id':i,'active':![],'scheduledat':Date[_0x0b83('0x7')](),'countbusyretry':0x0,'countcongestionretry':0x0,'countnoanswerretry':0x0,'ContactId':i,'ListId':0x1,'UserId':0x1,'VoiceQueueId':0x3fd,'createdAt':Date[_0x0b83('0x7')](),'updatedAt':Date[_0x0b83('0x7')]()});}for(var i=0x4b1;i<=0x960;i+=0x1){contacts2[_0x0b83('0x2')]({'id':i,'firstName':_0x0b83('0x3')+i,'lastName':_0x0b83('0x4')+i,'phone':0xf879fb460+i,'email':_0x0b83('0x5')+i+'@xcally.com'});}for(var i=0x4b1;i<=0x960;i+=0x1){hopper2[_0x0b83('0x2')]({'id':i,'active':![],'scheduledat':Date[_0x0b83('0x7')](),'countbusyretry':0x0,'countcongestionretry':0x0,'countnoanswerretry':0x0,'ContactId':i,'ListId':0x1,'UserId':0x1,'VoiceQueueId':0x3fd,'createdAt':Date[_0x0b83('0x7')](),'updatedAt':Date[_0x0b83('0x7')]()});}db['CmContact']['destroy']({'where':{}})[_0x0b83('0x8')](function(){return db[_0x0b83('0x9')][_0x0b83('0xa')](contacts);})[_0x0b83('0x8')](function(){console[_0x0b83('0xb')](_0x0b83('0xc'),_0x0b83('0xd'));return db[_0x0b83('0xe')][_0x0b83('0xf')]({'where':{}});})[_0x0b83('0x8')](function(){return db['CmHopper'][_0x0b83('0xa')](hopper);})[_0x0b83('0x8')](function(){console[_0x0b83('0xb')](_0x0b83('0xc'),_0x0b83('0x10'));return db['CmContact'][_0x0b83('0xa')](contacts2);})[_0x0b83('0x8')](function(){console['log'](_0x0b83('0xc'),_0x0b83('0x11'));return db[_0x0b83('0xe')][_0x0b83('0xa')](hopper2);})[_0x0b83('0x8')](function(){console[_0x0b83('0xb')](_0x0b83('0xc'),_0x0b83('0x12'));})['catch'](function(_0x134636){console[_0x0b83('0xb')](_0x134636);}); \ No newline at end of file +var _0x72c7=['CmContact','destroy','then','bulkCreate','log','finished\x20populating','contacts1','CmHopper','hopper1','contacts2','hopper2','catch','util','../mysqldb','Innocenzo','Biondo','innocenzo.biondo','@xcally.com','push','now'];(function(_0x1f9c8e,_0x24bf89){var _0x534d95=function(_0x23d31b){while(--_0x23d31b){_0x1f9c8e['push'](_0x1f9c8e['shift']());}};_0x534d95(++_0x24bf89);}(_0x72c7,0x70));var _0x772c=function(_0x38d550,_0xfda336){_0x38d550=_0x38d550-0x0;var _0x4e6cc8=_0x72c7[_0x38d550];return _0x4e6cc8;};'use strict';var util=require(_0x772c('0x0'));var db=require(_0x772c('0x1'))['db'];var contacts=[];var hopper=[];var contacts2=[];var hopper2=[];for(var i=0x1;i<=0x4b0;i+=0x1){contacts['push']({'id':i,'firstName':_0x772c('0x2')+i,'lastName':_0x772c('0x3')+i,'phone':0xf879fb460+i,'email':_0x772c('0x4')+i+_0x772c('0x5')});}for(var i=0x1;i<=0x4b0;i+=0x1){hopper[_0x772c('0x6')]({'id':i,'active':![],'scheduledat':Date['now'](),'countbusyretry':0x0,'countcongestionretry':0x0,'countnoanswerretry':0x0,'ContactId':i,'ListId':0x1,'UserId':0x1,'VoiceQueueId':0x3fd,'createdAt':Date[_0x772c('0x7')](),'updatedAt':Date[_0x772c('0x7')]()});}for(var i=0x4b1;i<=0x960;i+=0x1){contacts2[_0x772c('0x6')]({'id':i,'firstName':_0x772c('0x2')+i,'lastName':_0x772c('0x3')+i,'phone':0xf879fb460+i,'email':_0x772c('0x4')+i+'@xcally.com'});}for(var i=0x4b1;i<=0x960;i+=0x1){hopper2[_0x772c('0x6')]({'id':i,'active':![],'scheduledat':Date[_0x772c('0x7')](),'countbusyretry':0x0,'countcongestionretry':0x0,'countnoanswerretry':0x0,'ContactId':i,'ListId':0x1,'UserId':0x1,'VoiceQueueId':0x3fd,'createdAt':Date[_0x772c('0x7')](),'updatedAt':Date['now']()});}db[_0x772c('0x8')][_0x772c('0x9')]({'where':{}})[_0x772c('0xa')](function(){return db['CmContact'][_0x772c('0xb')](contacts);})['then'](function(){console[_0x772c('0xc')](_0x772c('0xd'),_0x772c('0xe'));return db[_0x772c('0xf')]['destroy']({'where':{}});})[_0x772c('0xa')](function(){return db[_0x772c('0xf')]['bulkCreate'](hopper);})[_0x772c('0xa')](function(){console['log'](_0x772c('0xd'),_0x772c('0x10'));return db[_0x772c('0x8')][_0x772c('0xb')](contacts2);})[_0x772c('0xa')](function(){console[_0x772c('0xc')]('finished\x20populating',_0x772c('0x11'));return db[_0x772c('0xf')][_0x772c('0xb')](hopper2);})[_0x772c('0xa')](function(){console[_0x772c('0xc')](_0x772c('0xd'),_0x772c('0x12'));})[_0x772c('0x13')](function(_0x258cd3){console['log'](_0x258cd3);}); \ No newline at end of file diff --git a/server/config/seedUsers.js b/server/config/seedUsers.js index c518487..8c108a1 100644 --- a/server/config/seedUsers.js +++ b/server/config/seedUsers.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5fc2=['%s%s','%s%s@xcally.com','password','udp','wss','all','ulaw','yes','/etc/pki/tls/certs/motion.crt','/etc/pki/tls/private/motion.key','actpass','\x22%s\x22\x20<%s>','User','bulkCreate','then','log','add\x20user','catch','util','push','agent','format'];(function(_0x2806bb,_0x5222be){var _0x4e83d1=function(_0x4de37d){while(--_0x4de37d){_0x2806bb['push'](_0x2806bb['shift']());}};_0x4e83d1(++_0x5222be);}(_0x5fc2,0x188));var _0x25fc=function(_0x82140,_0x3a9d87){_0x82140=_0x82140-0x0;var _0x2b15a6=_0x5fc2[_0x82140];return _0x2b15a6;};'use strict';var util=require(_0x25fc('0x0'));var db=require('../mysqldb')['db'];var users=[];for(var i=0x1;i<=0xc8;i+=0x1){users[_0x25fc('0x1')]({'name':util['format']('%s%s',_0x25fc('0x2'),i),'fullname':util[_0x25fc('0x3')](_0x25fc('0x4'),_0x25fc('0x2'),i),'email':util[_0x25fc('0x3')](_0x25fc('0x5'),_0x25fc('0x2'),i),'role':_0x25fc('0x2'),'password':_0x25fc('0x6'),'internal':0xfa0+i,'type':'friend','transport':[_0x25fc('0x7'),'ws',_0x25fc('0x8')],'disallow':[_0x25fc('0x9')],'allow':[_0x25fc('0xa')],'defaultuser':util[_0x25fc('0x3')](_0x25fc('0x4'),_0x25fc('0x2'),i),'encryption':'yes','avpf':_0x25fc('0xb'),'force_avp':_0x25fc('0xb'),'icesupport':_0x25fc('0xb'),'dtlsenable':_0x25fc('0xb'),'dtlsverify':'no','dtlscertfile':_0x25fc('0xc'),'dtlsprivatekey':_0x25fc('0xd'),'dtlssetup':_0x25fc('0xe'),'callerid':util[_0x25fc('0x3')](_0x25fc('0xf'),util[_0x25fc('0x3')](_0x25fc('0x4'),_0x25fc('0x2'),i),0xfa0+i)});}db[_0x25fc('0x10')][_0x25fc('0x11')](users)[_0x25fc('0x12')](function(){console[_0x25fc('0x13')](_0x25fc('0x14'));})[_0x25fc('0x15')](function(_0x59a9c4){console[_0x25fc('0x13')](_0x59a9c4);}); \ No newline at end of file +var _0xd38d=['add\x20user','catch','log','util','../mysqldb','push','%s%s','format','agent','%s%s@xcally.com','password','udp','wss','all','ulaw','yes','/etc/pki/tls/private/motion.key','User','bulkCreate','then'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xd38d,0x17f));var _0xdd38=function(_0x431ae1,_0x385f06){_0x431ae1=_0x431ae1-0x0;var _0x27fcbd=_0xd38d[_0x431ae1];return _0x27fcbd;};'use strict';var util=require(_0xdd38('0x0'));var db=require(_0xdd38('0x1'))['db'];var users=[];for(var i=0x1;i<=0xc8;i+=0x1){users[_0xdd38('0x2')]({'name':util['format'](_0xdd38('0x3'),'agent',i),'fullname':util[_0xdd38('0x4')]('%s%s',_0xdd38('0x5'),i),'email':util[_0xdd38('0x4')](_0xdd38('0x6'),_0xdd38('0x5'),i),'role':_0xdd38('0x5'),'password':_0xdd38('0x7'),'internal':0xfa0+i,'type':'friend','transport':[_0xdd38('0x8'),'ws',_0xdd38('0x9')],'disallow':[_0xdd38('0xa')],'allow':[_0xdd38('0xb')],'defaultuser':util[_0xdd38('0x4')]('%s%s',_0xdd38('0x5'),i),'encryption':'yes','avpf':'yes','force_avp':'yes','icesupport':'yes','dtlsenable':_0xdd38('0xc'),'dtlsverify':'no','dtlscertfile':'/etc/pki/tls/certs/motion.crt','dtlsprivatekey':_0xdd38('0xd'),'dtlssetup':'actpass','callerid':util[_0xdd38('0x4')]('\x22%s\x22\x20<%s>',util[_0xdd38('0x4')](_0xdd38('0x3'),_0xdd38('0x5'),i),0xfa0+i)});}db[_0xdd38('0xe')][_0xdd38('0xf')](users)[_0xdd38('0x10')](function(){console['log'](_0xdd38('0x11'));})[_0xdd38('0x12')](function(_0x19e2dc){console[_0xdd38('0x13')](_0x19e2dc);}); \ No newline at end of file diff --git a/server/config/socketio.js b/server/config/socketio.js index 62a733b..3452c91 100644 --- a/server/config/socketio.js +++ b/server/config/socketio.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd92a=['VoiceQueue','ChatQueue','FaxQueue','SmsQueue','MailQueue','OpenchannelQueue','WhatsappQueue','Trunk','ChatQueues','SmsQueues','getVoiceQueues','getChatQueues','getSmsQueues','getMailQueues','getWhatsappQueues','all','voice','sms','mail','openchannel','whatsapp','trunk:%s','leave','removeChatInteractions','emit','user_has_chat_interactions:remove','map','MailInteractions','removeMailInteractions','user_has_mail_interactions:remove','removeFaxInteractions','user_has_fax_interactions:remove','SmsInteractions','removeSmsInteractions','user_has_sms_interactions:remove','removeOpenchannelInteractions','user_has_openchannel_interactions:remove','removeWhatsappInteractions','user_has_whatsapp_interactions:remove','catch','connection','setMaxListeners','address','remoteAddress','remotePort','connectedAt','log','SocketIO\x20','nsp','disconnect','DISCONNECTED','CONNECTED','util','bluebird','../mysqldb','name','Agents','agent','type','ivr','UserProfileSection','findOne','autoAssociation','VoiceQueues','FaxQueues','MailQueues','OpenchannelQueues','WhatsappQueues','findAll','Telephones','Trunks','IvrCampaigns','UserProfileResource','resourceId','then','User','where','role','telephone','Campaign','format','length','user:%s','find','userProfileId','handshake','query','ChatInteractions','MailInteraction','FaxInteractions','SmsInteraction','OpenchannelInteraction','WhatsappInteractions','voice:inbound','voice:outbound','hasOwnProperty','include','push'];(function(_0x588e36,_0x43e906){var _0x1dd2ab=function(_0x46c31f){while(--_0x46c31f){_0x588e36['push'](_0x588e36['shift']());}};_0x1dd2ab(++_0x43e906);}(_0xd92a,0x1bc));var _0xad92=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0xd92a[_0x122ef9];return _0x42fba0;};'use strict';var _=require('lodash');var util=require(_0xad92('0x0'));var BPromise=require(_0xad92('0x1'));var db=require(_0xad92('0x2'))['db'];var config=require('./environment');var queryQueues={'attributes':['id',_0xad92('0x3')],'include':[{'as':_0xad92('0x4'),'model':db['User'],'attributes':['id','name','role'],'raw':!![],'where':{'role':_0xad92('0x5')},'required':![]}]};var queryTelephones={'raw':!![],'attributes':['id',_0xad92('0x3')],'where':{'role':'telephone'}};var queryTrunks={'raw':!![],'attributes':['id',_0xad92('0x3')]};var queryAgents={'raw':!![],'attributes':['id',_0xad92('0x3')],'where':{'role':_0xad92('0x5')}};var queryCampaigns={'raw':!![],'attributes':['id',_0xad92('0x3'),_0xad92('0x6')],'where':{'type':_0xad92('0x7')}};function getAssociatedResources(_0x23effe,_0x192578,_0x4c329d){return db[_0xad92('0x8')][_0xad92('0x9')]({'where':{'name':_0x23effe,'userProfileId':_0x192578},'raw':!![]})['then'](function(_0xc0f787){if(_0xc0f787){if(_0xc0f787[_0xad92('0xa')]){switch(_0x23effe){case _0xad92('0xb'):case'ChatQueues':case _0xad92('0xc'):case'SmsQueues':case _0xad92('0xd'):case _0xad92('0xe'):case _0xad92('0xf'):return db[_0x4c329d][_0xad92('0x10')](queryQueues);case _0xad92('0x11'):return db[_0x4c329d][_0xad92('0x10')](queryTelephones);case _0xad92('0x12'):return db[_0x4c329d]['findAll'](queryTrunks);case _0xad92('0x13'):return db[_0x4c329d][_0xad92('0x10')](queryCampaigns);}}else{return db[_0xad92('0x14')][_0xad92('0x10')]({'attributes':[_0xad92('0x15')],'where':{'sectionId':_0xc0f787['id']},'raw':!![]})[_0xad92('0x16')](function(_0x115ce6){if(_0x115ce6){var _0x1f9ec4={'where':{'id':_['map'](_0x115ce6,'resourceId')},'raw':!![]};switch(_0x4c329d){case _0xad92('0x17'):_0x1f9ec4[_0xad92('0x18')][_0xad92('0x19')]=_0xad92('0x1a');break;case _0xad92('0x1b'):_0x1f9ec4[_0xad92('0x18')][_0xad92('0x6')]='ivr';break;}return db[_0x4c329d][_0xad92('0x10')](_0x1f9ec4);}else{return[];}});}}else{return[];}})['then'](function(_0x4e2cd1){return _0x4e2cd1;});}function joinOrLeaveQueues(_0x57a5ef,_0x407d54,_0x264de9,_0x169010){_0x57a5ef[_0x407d54](util[_0xad92('0x1c')]('%s:queue:%s',_0x264de9,_0x169010[_0xad92('0x3')]));if(_0x169010['Agents']){for(var _0x301b7a=0x0;_0x301b7a<_0x169010[_0xad92('0x4')][_0xad92('0x1d')];_0x301b7a+=0x1){_0x57a5ef[_0x407d54](util['format'](_0xad92('0x1e'),_0x169010['Agents'][_0x301b7a]['name']));}}}function joinOrLeave(_0x579444,_0x5ef609,_0x282602){var _0x157796;if(_0x579444['handshake']['query']['id']){db['User'][_0xad92('0x1f')]({'attributes':['id','name',_0xad92('0x19'),_0xad92('0x20')],'where':{'id':_0x579444[_0xad92('0x21')][_0xad92('0x22')]['id']},'include':[{'model':db['ChatInteraction'],'as':_0xad92('0x23'),'attributes':['id'],'raw':!![]},{'model':db[_0xad92('0x24')],'as':'MailInteractions','attributes':['id'],'raw':!![]},{'model':db['FaxInteraction'],'as':_0xad92('0x25'),'attributes':['id'],'raw':!![]},{'model':db[_0xad92('0x26')],'as':'SmsInteractions','attributes':['id'],'raw':!![]},{'model':db[_0xad92('0x27')],'as':'OpenchannelInteractions','attributes':['id'],'raw':!![]},{'model':db['WhatsappInteraction'],'as':_0xad92('0x28'),'attributes':['id'],'raw':!![]}]})[_0xad92('0x16')](function(_0x5024ac){if(_0x5024ac){_0x157796=_0x5024ac;_0x579444[_0x5ef609](util['format'](_0xad92('0x1e'),_0x5024ac['name']));var _0x33e290=[];switch(_0x5024ac[_0xad92('0x19')]){case'admin':_0x579444[_0x5ef609](_0xad92('0x29'));_0x579444[_0x5ef609](_0xad92('0x2a'));if(queryQueues[_0xad92('0x2b')](_0xad92('0x2c'))){delete queryQueues[_0xad92('0x2c')];}_0x33e290[_0xad92('0x2d')](db[_0xad92('0x2e')][_0xad92('0x10')](queryQueues));_0x33e290[_0xad92('0x2d')](db[_0xad92('0x2f')][_0xad92('0x10')](queryQueues));_0x33e290['push'](db[_0xad92('0x30')][_0xad92('0x10')](queryQueues));_0x33e290[_0xad92('0x2d')](db[_0xad92('0x31')][_0xad92('0x10')](queryQueues));_0x33e290[_0xad92('0x2d')](db[_0xad92('0x32')][_0xad92('0x10')](queryQueues));_0x33e290[_0xad92('0x2d')](db[_0xad92('0x33')][_0xad92('0x10')](queryQueues));_0x33e290['push'](db[_0xad92('0x34')][_0xad92('0x10')](queryQueues));_0x33e290[_0xad92('0x2d')](db[_0xad92('0x17')][_0xad92('0x10')](queryTelephones));_0x33e290[_0xad92('0x2d')](db[_0xad92('0x35')][_0xad92('0x10')](queryTrunks));_0x33e290[_0xad92('0x2d')](db[_0xad92('0x1b')][_0xad92('0x10')](queryCampaigns));_0x33e290[_0xad92('0x2d')](db[_0xad92('0x17')][_0xad92('0x10')](queryAgents));break;case'user':_0x579444[_0x5ef609](_0xad92('0x29'));_0x579444[_0x5ef609](_0xad92('0x2a'));_0x33e290[_0xad92('0x2d')](getAssociatedResources(_0xad92('0xb'),_0x5024ac[_0xad92('0x20')],_0xad92('0x2e')));_0x33e290[_0xad92('0x2d')](getAssociatedResources(_0xad92('0x36'),_0x5024ac[_0xad92('0x20')],_0xad92('0x2f')));_0x33e290['push'](getAssociatedResources(_0xad92('0xc'),_0x5024ac['userProfileId'],_0xad92('0x30')));_0x33e290['push'](getAssociatedResources(_0xad92('0x37'),_0x5024ac[_0xad92('0x20')],'SmsQueue'));_0x33e290[_0xad92('0x2d')](getAssociatedResources(_0xad92('0xd'),_0x5024ac[_0xad92('0x20')],_0xad92('0x32')));_0x33e290[_0xad92('0x2d')](getAssociatedResources(_0xad92('0xe'),_0x5024ac['userProfileId'],'OpenchannelQueue'));_0x33e290['push'](getAssociatedResources(_0xad92('0xf'),_0x5024ac[_0xad92('0x20')],_0xad92('0x34')));_0x33e290[_0xad92('0x2d')](getAssociatedResources(_0xad92('0x11'),_0x5024ac[_0xad92('0x20')],_0xad92('0x17')));_0x33e290['push'](getAssociatedResources(_0xad92('0x12'),_0x5024ac[_0xad92('0x20')],_0xad92('0x35')));_0x33e290[_0xad92('0x2d')](getAssociatedResources(_0xad92('0x13'),_0x5024ac[_0xad92('0x20')],_0xad92('0x1b')));_0x33e290[_0xad92('0x2d')](db[_0xad92('0x17')][_0xad92('0x10')](queryAgents));break;case'agent':_0x579444[_0x5ef609](_0xad92('0x29'));_0x579444[_0x5ef609](_0xad92('0x2a'));_0x33e290[_0xad92('0x2d')](_0x5024ac[_0xad92('0x38')]({'attributes':['id',_0xad92('0x3')]}));_0x33e290[_0xad92('0x2d')](_0x5024ac[_0xad92('0x39')]({'attributes':['id',_0xad92('0x3')]}));_0x33e290[_0xad92('0x2d')](_0x5024ac['getFaxQueues']({'attributes':['id',_0xad92('0x3')]}));_0x33e290[_0xad92('0x2d')](_0x5024ac[_0xad92('0x3a')]({'attributes':['id',_0xad92('0x3')]}));_0x33e290['push'](_0x5024ac[_0xad92('0x3b')]({'attributes':['id','name']}));_0x33e290['push'](_0x5024ac['getOpenchannelQueues']({'attributes':['id',_0xad92('0x3')]}));_0x33e290[_0xad92('0x2d')](_0x5024ac[_0xad92('0x3c')]({'attributes':['id',_0xad92('0x3')]}));break;}return BPromise[_0xad92('0x3d')](_0x33e290);}})[_0xad92('0x16')](function(_0xb7b5c5){if(_0xb7b5c5&&_0xb7b5c5[_0xad92('0x1d')]){for(var _0x22dda2=0x0;_0x22dda2<_0xb7b5c5[_0xad92('0x1d')];_0x22dda2+=0x1){for(var _0x3b08d7=0x0;_0x3b08d7<_0xb7b5c5[_0x22dda2]['length'];_0x3b08d7+=0x1){switch(_0x22dda2){case 0x0:joinOrLeaveQueues(_0x579444,_0x5ef609,_0xad92('0x3e'),_0xb7b5c5[_0x22dda2][_0x3b08d7]);break;case 0x1:joinOrLeaveQueues(_0x579444,_0x5ef609,'chat',_0xb7b5c5[_0x22dda2][_0x3b08d7]);break;case 0x2:joinOrLeaveQueues(_0x579444,_0x5ef609,'fax',_0xb7b5c5[_0x22dda2][_0x3b08d7]);break;case 0x3:joinOrLeaveQueues(_0x579444,_0x5ef609,_0xad92('0x3f'),_0xb7b5c5[_0x22dda2][_0x3b08d7]);break;case 0x4:joinOrLeaveQueues(_0x579444,_0x5ef609,_0xad92('0x40'),_0xb7b5c5[_0x22dda2][_0x3b08d7]);break;case 0x5:joinOrLeaveQueues(_0x579444,_0x5ef609,_0xad92('0x41'),_0xb7b5c5[_0x22dda2][_0x3b08d7]);break;case 0x6:joinOrLeaveQueues(_0x579444,_0x5ef609,_0xad92('0x42'),_0xb7b5c5[_0x22dda2][_0x3b08d7]);break;case 0x7:if(_0x157796[_0xad92('0x19')]!=='agent')_0x579444[_0x5ef609](util[_0xad92('0x1c')]('telephone:%s',_0xb7b5c5[_0x22dda2][_0x3b08d7]['name']));break;case 0x8:if(_0x157796[_0xad92('0x19')]!==_0xad92('0x5'))_0x579444[_0x5ef609](util[_0xad92('0x1c')](_0xad92('0x43'),_0xb7b5c5[_0x22dda2][_0x3b08d7][_0xad92('0x3')]));break;case 0x9:if(_0x157796[_0xad92('0x19')]!==_0xad92('0x5'))_0x579444[_0x5ef609](util['format']('campaign:%s:%s',_0xb7b5c5[_0x22dda2][_0x3b08d7]['type'],_0xb7b5c5[_0x22dda2][_0x3b08d7][_0xad92('0x3')]));break;case 0xa:_0x579444[_0x5ef609](util[_0xad92('0x1c')](_0xad92('0x1e'),_0xb7b5c5[_0x22dda2][_0x3b08d7][_0xad92('0x3')]));break;}}}}})[_0xad92('0x16')](function(){if(_0x5ef609===_0xad92('0x44')){var _0x8dcee2=_['map'](_0x157796[_0xad92('0x23')],'id');return _0x157796[_0xad92('0x45')](_0x8dcee2)['then'](function(){for(var _0x67cd66=0x0;_0x67cd66<_0x8dcee2[_0xad92('0x1d')];_0x67cd66+=0x1){_0x282602[_0xad92('0x46')](_0xad92('0x47'),{'ChatInteractionId':Number(_0x8dcee2[_0x67cd66]),'UserId':Number(_0x157796['id'])});}});}})[_0xad92('0x16')](function(){if(_0x5ef609==='leave'){var _0x621620=_[_0xad92('0x48')](_0x157796[_0xad92('0x49')],'id');return _0x157796[_0xad92('0x4a')](_0x621620)['then'](function(){for(var _0x383209=0x0;_0x383209<_0x621620[_0xad92('0x1d')];_0x383209+=0x1){_0x282602[_0xad92('0x46')](_0xad92('0x4b'),{'MailInteractionId':Number(_0x621620[_0x383209]),'UserId':Number(_0x157796['id'])});}});}})[_0xad92('0x16')](function(){if(_0x5ef609===_0xad92('0x44')){var _0x16822e=_['map'](_0x157796[_0xad92('0x25')],'id');return _0x157796[_0xad92('0x4c')](_0x16822e)['then'](function(){for(var _0x4ee4ac=0x0;_0x4ee4ac<_0x16822e[_0xad92('0x1d')];_0x4ee4ac+=0x1){_0x282602[_0xad92('0x46')](_0xad92('0x4d'),{'FaxInteractionId':Number(_0x16822e[_0x4ee4ac]),'UserId':Number(_0x157796['id'])});}});}})['then'](function(){if(_0x5ef609===_0xad92('0x44')){var _0x50b6f8=_[_0xad92('0x48')](_0x157796[_0xad92('0x4e')],'id');return _0x157796[_0xad92('0x4f')](_0x50b6f8)[_0xad92('0x16')](function(){for(var _0x38f373=0x0;_0x38f373<_0x50b6f8[_0xad92('0x1d')];_0x38f373+=0x1){_0x282602['emit'](_0xad92('0x50'),{'SmsInteractionId':Number(_0x50b6f8[_0x38f373]),'UserId':Number(_0x157796['id'])});}});}})['then'](function(){if(_0x5ef609===_0xad92('0x44')){var _0xe4df39=_['map'](_0x157796['OpenchannelInteractions'],'id');return _0x157796[_0xad92('0x51')](_0xe4df39)[_0xad92('0x16')](function(){for(var _0x4efb78=0x0;_0x4efb78<_0xe4df39[_0xad92('0x1d')];_0x4efb78+=0x1){_0x282602[_0xad92('0x46')](_0xad92('0x52'),{'OpenchannelInteractionId':Number(_0xe4df39[_0x4efb78]),'UserId':Number(_0x157796['id'])});}});}})['then'](function(){if(_0x5ef609===_0xad92('0x44')){var _0x233d55=_[_0xad92('0x48')](_0x157796[_0xad92('0x28')],'id');return _0x157796[_0xad92('0x53')](_0x233d55)['then'](function(){for(var _0x2cad9b=0x0;_0x2cad9b<_0x233d55[_0xad92('0x1d')];_0x2cad9b+=0x1){_0x282602[_0xad92('0x46')](_0xad92('0x54'),{'WhatsappInteractionId':Number(_0x233d55[_0x2cad9b]),'UserId':Number(_0x157796['id'])});}});}})[_0xad92('0x55')](function(_0x45d188){_0x579444['log'](_0x45d188);});}}function onDisconnect(_0x3628bb,_0x378c18){joinOrLeave(_0x3628bb,'leave',_0x378c18);}function onConnect(_0x11daad){joinOrLeave(_0x11daad,'join');}exports['default']=function(_0x12648b){_0x12648b['on'](_0xad92('0x56'),function(_0x3d586d){_0x3d586d[_0xad92('0x57')](0x0);_0x3d586d[_0xad92('0x58')]=_0x3d586d['request'][_0xad92('0x56')][_0xad92('0x59')]+':'+_0x3d586d['request'][_0xad92('0x56')][_0xad92('0x5a')];_0x3d586d[_0xad92('0x5b')]=new Date();_0x3d586d['log']=function(_0x1523cb){console[_0xad92('0x5c')](_0xad92('0x5d')+_0x3d586d[_0xad92('0x5e')][_0xad92('0x3')]+'['+_0x3d586d[_0xad92('0x58')]+']',_0x1523cb);};_0x3d586d['on'](_0xad92('0x5f'),function(){onDisconnect(_0x3d586d,_0x12648b);_0x3d586d['log'](_0xad92('0x60'));});onConnect(_0x3d586d);_0x3d586d[_0xad92('0x5c')](_0xad92('0x61'));});}; \ No newline at end of file +var _0x0a05=['length','handshake','query','userProfileId','ChatInteraction','ChatInteractions','MailInteractions','FaxInteractions','SmsInteraction','SmsInteractions','OpenchannelInteractions','WhatsappInteraction','WhatsappInteractions','user:%s','voice:outbound','hasOwnProperty','include','push','VoiceQueue','FaxQueue','SmsQueue','MailQueue','OpenchannelQueue','WhatsappQueue','Trunk','Campaign','user','voice:inbound','ChatQueue','SmsQueues','getChatQueues','getFaxQueues','getSmsQueues','getMailQueues','getOpenchannelQueues','getWhatsappQueues','voice','chat','fax','sms','mail','whatsapp','trunk:%s','campaign:%s:%s','removeChatInteractions','emit','removeMailInteractions','user_has_mail_interactions:remove','removeFaxInteractions','user_has_fax_interactions:remove','leave','user_has_sms_interactions:remove','removeOpenchannelInteractions','user_has_openchannel_interactions:remove','removeWhatsappInteractions','user_has_whatsapp_interactions:remove','log','join','default','connection','setMaxListeners','request','SocketIO\x20','nsp','CONNECTED','lodash','util','bluebird','../mysqldb','./environment','name','Agents','agent','telephone','type','ivr','findOne','then','VoiceQueues','FaxQueues','OpenchannelQueues','WhatsappQueues','findAll','Telephones','IvrCampaigns','UserProfileResource','map','resourceId','User','where','role','format','%s:queue:%s'];(function(_0x5b3a7e,_0x74ba23){var _0xd7f0f7=function(_0x43cb6c){while(--_0x43cb6c){_0x5b3a7e['push'](_0x5b3a7e['shift']());}};_0xd7f0f7(++_0x74ba23);}(_0x0a05,0x9e));var _0x50a0=function(_0x10dc60,_0x2fcce1){_0x10dc60=_0x10dc60-0x0;var _0x47dec5=_0x0a05[_0x10dc60];return _0x47dec5;};'use strict';var _=require(_0x50a0('0x0'));var util=require(_0x50a0('0x1'));var BPromise=require(_0x50a0('0x2'));var db=require(_0x50a0('0x3'))['db'];var config=require(_0x50a0('0x4'));var queryQueues={'attributes':['id',_0x50a0('0x5')],'include':[{'as':_0x50a0('0x6'),'model':db['User'],'attributes':['id',_0x50a0('0x5'),'role'],'raw':!![],'where':{'role':_0x50a0('0x7')},'required':![]}]};var queryTelephones={'raw':!![],'attributes':['id','name'],'where':{'role':_0x50a0('0x8')}};var queryTrunks={'raw':!![],'attributes':['id',_0x50a0('0x5')]};var queryAgents={'raw':!![],'attributes':['id','name'],'where':{'role':'agent'}};var queryCampaigns={'raw':!![],'attributes':['id',_0x50a0('0x5'),_0x50a0('0x9')],'where':{'type':_0x50a0('0xa')}};function getAssociatedResources(_0x2ea146,_0x5d6056,_0x1edead){return db['UserProfileSection'][_0x50a0('0xb')]({'where':{'name':_0x2ea146,'userProfileId':_0x5d6056},'raw':!![]})[_0x50a0('0xc')](function(_0x39a17e){if(_0x39a17e){if(_0x39a17e['autoAssociation']){switch(_0x2ea146){case _0x50a0('0xd'):case'ChatQueues':case _0x50a0('0xe'):case'SmsQueues':case'MailQueues':case _0x50a0('0xf'):case _0x50a0('0x10'):return db[_0x1edead][_0x50a0('0x11')](queryQueues);case _0x50a0('0x12'):return db[_0x1edead][_0x50a0('0x11')](queryTelephones);case'Trunks':return db[_0x1edead][_0x50a0('0x11')](queryTrunks);case _0x50a0('0x13'):return db[_0x1edead][_0x50a0('0x11')](queryCampaigns);}}else{return db[_0x50a0('0x14')][_0x50a0('0x11')]({'attributes':['resourceId'],'where':{'sectionId':_0x39a17e['id']},'raw':!![]})['then'](function(_0x4c34ba){if(_0x4c34ba){var _0x582fb5={'where':{'id':_[_0x50a0('0x15')](_0x4c34ba,_0x50a0('0x16'))},'raw':!![]};switch(_0x1edead){case _0x50a0('0x17'):_0x582fb5[_0x50a0('0x18')][_0x50a0('0x19')]=_0x50a0('0x8');break;case'Campaign':_0x582fb5['where'][_0x50a0('0x9')]=_0x50a0('0xa');break;}return db[_0x1edead][_0x50a0('0x11')](_0x582fb5);}else{return[];}});}}else{return[];}})[_0x50a0('0xc')](function(_0x265496){return _0x265496;});}function joinOrLeaveQueues(_0x48ec1e,_0x321d1d,_0x5d7536,_0x2603f1){_0x48ec1e[_0x321d1d](util[_0x50a0('0x1a')](_0x50a0('0x1b'),_0x5d7536,_0x2603f1[_0x50a0('0x5')]));if(_0x2603f1['Agents']){for(var _0x62c40a=0x0;_0x62c40a<_0x2603f1['Agents'][_0x50a0('0x1c')];_0x62c40a+=0x1){_0x48ec1e[_0x321d1d](util[_0x50a0('0x1a')]('user:%s',_0x2603f1[_0x50a0('0x6')][_0x62c40a][_0x50a0('0x5')]));}}}function joinOrLeave(_0xa82805,_0x89e493,_0x1a264a){var _0x10ec8b;if(_0xa82805[_0x50a0('0x1d')][_0x50a0('0x1e')]['id']){db['User']['find']({'attributes':['id',_0x50a0('0x5'),_0x50a0('0x19'),_0x50a0('0x1f')],'where':{'id':_0xa82805['handshake'][_0x50a0('0x1e')]['id']},'include':[{'model':db[_0x50a0('0x20')],'as':_0x50a0('0x21'),'attributes':['id'],'raw':!![]},{'model':db['MailInteraction'],'as':_0x50a0('0x22'),'attributes':['id'],'raw':!![]},{'model':db['FaxInteraction'],'as':_0x50a0('0x23'),'attributes':['id'],'raw':!![]},{'model':db[_0x50a0('0x24')],'as':_0x50a0('0x25'),'attributes':['id'],'raw':!![]},{'model':db['OpenchannelInteraction'],'as':_0x50a0('0x26'),'attributes':['id'],'raw':!![]},{'model':db[_0x50a0('0x27')],'as':_0x50a0('0x28'),'attributes':['id'],'raw':!![]}]})['then'](function(_0x3b5eb8){if(_0x3b5eb8){_0x10ec8b=_0x3b5eb8;_0xa82805[_0x89e493](util[_0x50a0('0x1a')](_0x50a0('0x29'),_0x3b5eb8[_0x50a0('0x5')]));var _0x5970e5=[];switch(_0x3b5eb8['role']){case'admin':_0xa82805[_0x89e493]('voice:inbound');_0xa82805[_0x89e493](_0x50a0('0x2a'));if(queryQueues[_0x50a0('0x2b')](_0x50a0('0x2c'))){delete queryQueues[_0x50a0('0x2c')];}_0x5970e5[_0x50a0('0x2d')](db[_0x50a0('0x2e')][_0x50a0('0x11')](queryQueues));_0x5970e5['push'](db['ChatQueue'][_0x50a0('0x11')](queryQueues));_0x5970e5['push'](db[_0x50a0('0x2f')]['findAll'](queryQueues));_0x5970e5[_0x50a0('0x2d')](db[_0x50a0('0x30')][_0x50a0('0x11')](queryQueues));_0x5970e5[_0x50a0('0x2d')](db[_0x50a0('0x31')][_0x50a0('0x11')](queryQueues));_0x5970e5[_0x50a0('0x2d')](db[_0x50a0('0x32')][_0x50a0('0x11')](queryQueues));_0x5970e5[_0x50a0('0x2d')](db[_0x50a0('0x33')][_0x50a0('0x11')](queryQueues));_0x5970e5['push'](db[_0x50a0('0x17')]['findAll'](queryTelephones));_0x5970e5['push'](db[_0x50a0('0x34')][_0x50a0('0x11')](queryTrunks));_0x5970e5['push'](db[_0x50a0('0x35')][_0x50a0('0x11')](queryCampaigns));_0x5970e5[_0x50a0('0x2d')](db[_0x50a0('0x17')][_0x50a0('0x11')](queryAgents));break;case _0x50a0('0x36'):_0xa82805[_0x89e493](_0x50a0('0x37'));_0xa82805[_0x89e493](_0x50a0('0x2a'));_0x5970e5[_0x50a0('0x2d')](getAssociatedResources(_0x50a0('0xd'),_0x3b5eb8[_0x50a0('0x1f')],_0x50a0('0x2e')));_0x5970e5[_0x50a0('0x2d')](getAssociatedResources('ChatQueues',_0x3b5eb8[_0x50a0('0x1f')],_0x50a0('0x38')));_0x5970e5[_0x50a0('0x2d')](getAssociatedResources(_0x50a0('0xe'),_0x3b5eb8[_0x50a0('0x1f')],_0x50a0('0x2f')));_0x5970e5[_0x50a0('0x2d')](getAssociatedResources(_0x50a0('0x39'),_0x3b5eb8['userProfileId'],_0x50a0('0x30')));_0x5970e5[_0x50a0('0x2d')](getAssociatedResources('MailQueues',_0x3b5eb8['userProfileId'],_0x50a0('0x31')));_0x5970e5[_0x50a0('0x2d')](getAssociatedResources('OpenchannelQueues',_0x3b5eb8[_0x50a0('0x1f')],_0x50a0('0x32')));_0x5970e5[_0x50a0('0x2d')](getAssociatedResources(_0x50a0('0x10'),_0x3b5eb8['userProfileId'],_0x50a0('0x33')));_0x5970e5[_0x50a0('0x2d')](getAssociatedResources(_0x50a0('0x12'),_0x3b5eb8['userProfileId'],_0x50a0('0x17')));_0x5970e5[_0x50a0('0x2d')](getAssociatedResources('Trunks',_0x3b5eb8['userProfileId'],_0x50a0('0x34')));_0x5970e5[_0x50a0('0x2d')](getAssociatedResources(_0x50a0('0x13'),_0x3b5eb8[_0x50a0('0x1f')],_0x50a0('0x35')));_0x5970e5['push'](db[_0x50a0('0x17')][_0x50a0('0x11')](queryAgents));break;case'agent':_0xa82805[_0x89e493](_0x50a0('0x37'));_0xa82805[_0x89e493]('voice:outbound');_0x5970e5['push'](_0x3b5eb8['getVoiceQueues']({'attributes':['id',_0x50a0('0x5')]}));_0x5970e5['push'](_0x3b5eb8[_0x50a0('0x3a')]({'attributes':['id',_0x50a0('0x5')]}));_0x5970e5[_0x50a0('0x2d')](_0x3b5eb8[_0x50a0('0x3b')]({'attributes':['id',_0x50a0('0x5')]}));_0x5970e5[_0x50a0('0x2d')](_0x3b5eb8[_0x50a0('0x3c')]({'attributes':['id','name']}));_0x5970e5[_0x50a0('0x2d')](_0x3b5eb8[_0x50a0('0x3d')]({'attributes':['id','name']}));_0x5970e5[_0x50a0('0x2d')](_0x3b5eb8[_0x50a0('0x3e')]({'attributes':['id',_0x50a0('0x5')]}));_0x5970e5['push'](_0x3b5eb8[_0x50a0('0x3f')]({'attributes':['id',_0x50a0('0x5')]}));break;}return BPromise['all'](_0x5970e5);}})['then'](function(_0x4de799){if(_0x4de799&&_0x4de799[_0x50a0('0x1c')]){for(var _0x1797b6=0x0;_0x1797b6<_0x4de799[_0x50a0('0x1c')];_0x1797b6+=0x1){for(var _0x20b466=0x0;_0x20b466<_0x4de799[_0x1797b6][_0x50a0('0x1c')];_0x20b466+=0x1){switch(_0x1797b6){case 0x0:joinOrLeaveQueues(_0xa82805,_0x89e493,_0x50a0('0x40'),_0x4de799[_0x1797b6][_0x20b466]);break;case 0x1:joinOrLeaveQueues(_0xa82805,_0x89e493,_0x50a0('0x41'),_0x4de799[_0x1797b6][_0x20b466]);break;case 0x2:joinOrLeaveQueues(_0xa82805,_0x89e493,_0x50a0('0x42'),_0x4de799[_0x1797b6][_0x20b466]);break;case 0x3:joinOrLeaveQueues(_0xa82805,_0x89e493,_0x50a0('0x43'),_0x4de799[_0x1797b6][_0x20b466]);break;case 0x4:joinOrLeaveQueues(_0xa82805,_0x89e493,_0x50a0('0x44'),_0x4de799[_0x1797b6][_0x20b466]);break;case 0x5:joinOrLeaveQueues(_0xa82805,_0x89e493,'openchannel',_0x4de799[_0x1797b6][_0x20b466]);break;case 0x6:joinOrLeaveQueues(_0xa82805,_0x89e493,_0x50a0('0x45'),_0x4de799[_0x1797b6][_0x20b466]);break;case 0x7:if(_0x10ec8b[_0x50a0('0x19')]!==_0x50a0('0x7'))_0xa82805[_0x89e493](util[_0x50a0('0x1a')]('telephone:%s',_0x4de799[_0x1797b6][_0x20b466][_0x50a0('0x5')]));break;case 0x8:if(_0x10ec8b['role']!==_0x50a0('0x7'))_0xa82805[_0x89e493](util['format'](_0x50a0('0x46'),_0x4de799[_0x1797b6][_0x20b466][_0x50a0('0x5')]));break;case 0x9:if(_0x10ec8b['role']!=='agent')_0xa82805[_0x89e493](util[_0x50a0('0x1a')](_0x50a0('0x47'),_0x4de799[_0x1797b6][_0x20b466][_0x50a0('0x9')],_0x4de799[_0x1797b6][_0x20b466][_0x50a0('0x5')]));break;case 0xa:_0xa82805[_0x89e493](util['format']('user:%s',_0x4de799[_0x1797b6][_0x20b466][_0x50a0('0x5')]));break;}}}}})[_0x50a0('0xc')](function(){if(_0x89e493==='leave'){var _0x4af95d=_[_0x50a0('0x15')](_0x10ec8b['ChatInteractions'],'id');return _0x10ec8b[_0x50a0('0x48')](_0x4af95d)[_0x50a0('0xc')](function(){for(var _0x54feae=0x0;_0x54feae<_0x4af95d[_0x50a0('0x1c')];_0x54feae+=0x1){_0x1a264a[_0x50a0('0x49')]('user_has_chat_interactions:remove',{'ChatInteractionId':Number(_0x4af95d[_0x54feae]),'UserId':Number(_0x10ec8b['id'])});}});}})[_0x50a0('0xc')](function(){if(_0x89e493==='leave'){var _0x4abdf0=_[_0x50a0('0x15')](_0x10ec8b[_0x50a0('0x22')],'id');return _0x10ec8b[_0x50a0('0x4a')](_0x4abdf0)[_0x50a0('0xc')](function(){for(var _0x2730a6=0x0;_0x2730a6<_0x4abdf0[_0x50a0('0x1c')];_0x2730a6+=0x1){_0x1a264a['emit'](_0x50a0('0x4b'),{'MailInteractionId':Number(_0x4abdf0[_0x2730a6]),'UserId':Number(_0x10ec8b['id'])});}});}})[_0x50a0('0xc')](function(){if(_0x89e493==='leave'){var _0x51c1b5=_[_0x50a0('0x15')](_0x10ec8b[_0x50a0('0x23')],'id');return _0x10ec8b[_0x50a0('0x4c')](_0x51c1b5)[_0x50a0('0xc')](function(){for(var _0x447444=0x0;_0x447444<_0x51c1b5[_0x50a0('0x1c')];_0x447444+=0x1){_0x1a264a['emit'](_0x50a0('0x4d'),{'FaxInteractionId':Number(_0x51c1b5[_0x447444]),'UserId':Number(_0x10ec8b['id'])});}});}})[_0x50a0('0xc')](function(){if(_0x89e493===_0x50a0('0x4e')){var _0x3109d5=_['map'](_0x10ec8b['SmsInteractions'],'id');return _0x10ec8b['removeSmsInteractions'](_0x3109d5)[_0x50a0('0xc')](function(){for(var _0x16584b=0x0;_0x16584b<_0x3109d5[_0x50a0('0x1c')];_0x16584b+=0x1){_0x1a264a[_0x50a0('0x49')](_0x50a0('0x4f'),{'SmsInteractionId':Number(_0x3109d5[_0x16584b]),'UserId':Number(_0x10ec8b['id'])});}});}})[_0x50a0('0xc')](function(){if(_0x89e493===_0x50a0('0x4e')){var _0x2aadbc=_[_0x50a0('0x15')](_0x10ec8b[_0x50a0('0x26')],'id');return _0x10ec8b[_0x50a0('0x50')](_0x2aadbc)[_0x50a0('0xc')](function(){for(var _0x9822d=0x0;_0x9822d<_0x2aadbc['length'];_0x9822d+=0x1){_0x1a264a[_0x50a0('0x49')](_0x50a0('0x51'),{'OpenchannelInteractionId':Number(_0x2aadbc[_0x9822d]),'UserId':Number(_0x10ec8b['id'])});}});}})['then'](function(){if(_0x89e493===_0x50a0('0x4e')){var _0x40f648=_['map'](_0x10ec8b[_0x50a0('0x28')],'id');return _0x10ec8b[_0x50a0('0x52')](_0x40f648)[_0x50a0('0xc')](function(){for(var _0x29f05a=0x0;_0x29f05a<_0x40f648[_0x50a0('0x1c')];_0x29f05a+=0x1){_0x1a264a[_0x50a0('0x49')](_0x50a0('0x53'),{'WhatsappInteractionId':Number(_0x40f648[_0x29f05a]),'UserId':Number(_0x10ec8b['id'])});}});}})['catch'](function(_0x46e7b1){_0xa82805[_0x50a0('0x54')](_0x46e7b1);});}}function onDisconnect(_0x23ac08,_0x1456e3){joinOrLeave(_0x23ac08,'leave',_0x1456e3);}function onConnect(_0x547f05){joinOrLeave(_0x547f05,_0x50a0('0x55'));}exports[_0x50a0('0x56')]=function(_0x31cc0d){_0x31cc0d['on'](_0x50a0('0x57'),function(_0x3f8e20){_0x3f8e20[_0x50a0('0x58')](0x0);_0x3f8e20['address']=_0x3f8e20[_0x50a0('0x59')][_0x50a0('0x57')]['remoteAddress']+':'+_0x3f8e20[_0x50a0('0x59')]['connection']['remotePort'];_0x3f8e20['connectedAt']=new Date();_0x3f8e20[_0x50a0('0x54')]=function(_0x5b2174){console['log'](_0x50a0('0x5a')+_0x3f8e20[_0x50a0('0x5b')][_0x50a0('0x5')]+'['+_0x3f8e20['address']+']',_0x5b2174);};_0x3f8e20['on']('disconnect',function(){onDisconnect(_0x3f8e20,_0x31cc0d);_0x3f8e20[_0x50a0('0x54')]('DISCONNECTED');});onConnect(_0x3f8e20);_0x3f8e20['log'](_0x50a0('0x5c'));});}; \ No newline at end of file diff --git a/server/config/triggers/index.js b/server/config/triggers/index.js index a0b7e2c..704f12f 100644 --- a/server/config/triggers/index.js +++ b/server/config/triggers/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x75cc=['sequelize','query','SELECT','contact','UserId','User','interface','format','SIP/%s','name','incomingmessage','opened','keys','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','Sequelize','QueryTypes','closed','find','default','model','hook','callback','toLowerCase','condition','util','jayson/promise','client','http','ChatInteraction','afterCreate','newinteraction','closedinteraction','Chat','ChatMessage','newmessage','Sms','SmsInteraction','afterUpdate','SmsMessage','Whatsapp','WhatsappInteraction','WhatsappMessage','Fax','FaxInteraction','FaxMessage','Mail','MailInteraction','Openchannel','OpenchannelInteraction','OpenchannelMessage','request','EventManager','info','Trigger,\x20%s','error','code','catch','get','channel','event','direction','CmContact','describe','then','length','startsWith','cf_','push','ContactId'];(function(_0x134c2e,_0x3573c4){var _0x2825db=function(_0x2a574d){while(--_0x2a574d){_0x134c2e['push'](_0x134c2e['shift']());}};_0x2825db(++_0x3573c4);}(_0x75cc,0x12c));var _0xc75c=function(_0x347fcb,_0x1d3eff){_0x347fcb=_0x347fcb-0x0;var _0x5e64ee=_0x75cc[_0x347fcb];return _0x5e64ee;};'use strict';var util=require(_0xc75c('0x0'));var db=require('../../mysqldb')['db'];var jayson=require(_0xc75c('0x1'));var logger=require('../logger')('triggers');var _=require('lodash');var client=jayson[_0xc75c('0x2')][_0xc75c('0x3')]({'port':0x232a});var triggers=[{'channel':'Chat','model':_0xc75c('0x4'),'event':_0xc75c('0x5'),'condition':_0xc75c('0x6'),'callback':afterCreate},{'channel':'Chat','model':'ChatInteraction','event':'afterUpdate','condition':_0xc75c('0x7'),'callback':afterUpdate},{'channel':_0xc75c('0x8'),'model':_0xc75c('0x9'),'event':_0xc75c('0x5'),'condition':_0xc75c('0xa'),'callback':afterCreateMessage},{'channel':_0xc75c('0xb'),'model':_0xc75c('0xc'),'event':_0xc75c('0x5'),'condition':_0xc75c('0x6'),'callback':afterCreate},{'channel':_0xc75c('0xb'),'model':_0xc75c('0xc'),'event':_0xc75c('0xd'),'condition':'closedinteraction','callback':afterUpdate},{'channel':_0xc75c('0xb'),'model':_0xc75c('0xe'),'event':'afterCreate','condition':_0xc75c('0xa'),'callback':afterCreateMessage},{'channel':_0xc75c('0xf'),'model':_0xc75c('0x10'),'event':_0xc75c('0x5'),'condition':_0xc75c('0x6'),'callback':afterCreate},{'channel':'Whatsapp','model':_0xc75c('0x10'),'event':_0xc75c('0xd'),'condition':_0xc75c('0x7'),'callback':afterUpdate},{'channel':_0xc75c('0xf'),'model':_0xc75c('0x11'),'event':_0xc75c('0x5'),'condition':_0xc75c('0xa'),'callback':afterCreateMessage},{'channel':_0xc75c('0x12'),'model':'FaxInteraction','event':_0xc75c('0x5'),'condition':_0xc75c('0x6'),'callback':afterCreate},{'channel':'Fax','model':_0xc75c('0x13'),'event':'afterUpdate','condition':_0xc75c('0x7'),'callback':afterUpdate},{'channel':'Fax','model':_0xc75c('0x14'),'event':'afterCreate','condition':_0xc75c('0xa'),'callback':afterCreateMessage},{'channel':_0xc75c('0x15'),'model':_0xc75c('0x16'),'event':_0xc75c('0x5'),'condition':_0xc75c('0x6'),'callback':afterCreate},{'channel':'Mail','model':'MailInteraction','event':_0xc75c('0xd'),'condition':_0xc75c('0x7'),'callback':afterUpdate},{'channel':_0xc75c('0x15'),'model':'MailMessage','event':_0xc75c('0x5'),'condition':_0xc75c('0xa'),'callback':afterCreateMessage},{'channel':_0xc75c('0x17'),'model':_0xc75c('0x18'),'event':'afterCreate','condition':'newinteraction','callback':afterCreate},{'channel':_0xc75c('0x17'),'model':'OpenchannelInteraction','event':_0xc75c('0xd'),'condition':'closedinteraction','callback':afterUpdate},{'channel':'Openchannel','model':_0xc75c('0x19'),'event':_0xc75c('0x5'),'condition':'newmessage','callback':afterCreateMessage}];function request(_0x14284d){return client[_0xc75c('0x1a')](_0xc75c('0x1b'),_0x14284d)['then'](function(_0x2722d1){logger[_0xc75c('0x1c')](_0xc75c('0x1d'),_0xc75c('0x1b'),_0x2722d1);if(_0x2722d1[_0xc75c('0x1e')]){if(_0x2722d1[_0xc75c('0x1e')][_0xc75c('0x1f')]===0x1f4){logger['error'](_0xc75c('0x1d'),_0xc75c('0x1b'),_0x2722d1['error']);}}})[_0xc75c('0x20')](function(_0x3fe4cc){logger[_0xc75c('0x1e')](_0xc75c('0x1d'),'EventManager',_0x3fe4cc);});}function afterCreateMessage(_0x277290,_0xf06505){return function(_0x1d0ca5,_0x4b1762){_0x1d0ca5=_0x1d0ca5[_0xc75c('0x21')]({'plain':!![]});_0x1d0ca5[_0xc75c('0x22')]=_0x277290;_0x1d0ca5[_0xc75c('0x23')]=_0x1d0ca5[_0xc75c('0x24')];return db[_0xc75c('0x25')][_0xc75c('0x26')]()[_0xc75c('0x27')](function(_0x3e757b){var _0x36ab82=[];for(var _0x5b5458=0x0;_0x5b5458=_0x20d20e[_0xeeab('0x15')]){throw Error(_0xeeab('0x16'));}_0x112d8e(_0x4d83ec);})['catch'](function(_0x3be186){_0x15ed92(_0x3be186);});});}; \ No newline at end of file +var _0xc676=['blockedAt','updateAttributes','role','agent','User','count','getLicense','agents','Maximum\x20login\x20has\x20been\x20reached','catch','lodash','bluebird','../mysqldb','./license/util','voice','mail','chat','fax','sms','openchannel','getChannels','isValidChannel','toLowerCase','includes','clearBlockUser','isUndefined'];(function(_0x4a1efa,_0xb707ca){var _0x3386ed=function(_0x5a9fda){while(--_0x5a9fda){_0x4a1efa['push'](_0x4a1efa['shift']());}};_0x3386ed(++_0xb707ca);}(_0xc676,0xc0));var _0x6c67=function(_0x58ad68,_0x52d5bd){_0x58ad68=_0x58ad68-0x0;var _0x1ffb0c=_0xc676[_0x58ad68];return _0x1ffb0c;};'use strict';var _=require(_0x6c67('0x0'));var BPromise=require(_0x6c67('0x1'));var db=require(_0x6c67('0x2'))['db'];var util=require(_0x6c67('0x3'));var channels=[_0x6c67('0x4'),_0x6c67('0x5'),_0x6c67('0x6'),_0x6c67('0x7'),_0x6c67('0x8'),'whatsapp',_0x6c67('0x9')];exports[_0x6c67('0xa')]=function(){return channels;};exports[_0x6c67('0xb')]=function(_0x180f7d){_0x180f7d=_0x180f7d[_0x6c67('0xc')]();return _[_0x6c67('0xd')](channels,_0x180f7d);};exports[_0x6c67('0xe')]=function(_0x55829d,_0x14903b,_0x1ace64,_0x580afd){var _0x4ce864={'loginAttempts':_0x14903b,'blocked':_0x1ace64};if(!_[_0x6c67('0xf')](_0x580afd)){_0x4ce864[_0x6c67('0x10')]=_0x580afd;}return _0x55829d[_0x6c67('0x11')](_0x4ce864);};exports['getLicense']=function(_0xef58e8){return new BPromise(function(_0x5c72a7,_0x4192c3){var _0xa3f7f1=0x0;if(_0xef58e8[_0x6c67('0x12')]!==_0x6c67('0x13')){_0x5c72a7(_0xef58e8);}db[_0x6c67('0x14')][_0x6c67('0x15')]({'where':{'role':_0x6c67('0x13'),'online':!![],'id':{'$ne':_0xef58e8['id']}}})['then'](function(_0x2629d2){_0xa3f7f1=_0x2629d2;return util[_0x6c67('0x16')]();})['then'](function(_0x38926d){if(_0x38926d&&_0x38926d[_0x6c67('0x17')]&&_0xa3f7f1>=_0x38926d[_0x6c67('0x17')]){throw Error(_0x6c67('0x18'));}_0x5c72a7(_0xef58e8);})[_0x6c67('0x19')](function(_0x2c77e2){_0x4192c3(_0x2c77e2);});});}; \ No newline at end of file diff --git a/server/errors/index.js b/server/errors/index.js index e7ca99b..2360277 100644 --- a/server/errors/index.js +++ b/server/errors/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2863=['status','render','json','send','exports','404'];(function(_0x2b0656,_0x314f52){var _0x313c61=function(_0x21cbe2){while(--_0x21cbe2){_0x2b0656['push'](_0x2b0656['shift']());}};_0x313c61(++_0x314f52);}(_0x2863,0x142));var _0x3286=function(_0x464121,_0x39c954){_0x464121=_0x464121-0x0;var _0x1d0cb8=_0x2863[_0x464121];return _0x1d0cb8;};'use strict';module[_0x3286('0x0')][0x194]=function pageNotFound(_0x34bc99,_0x5e07b2){var _0xe36fe=_0x3286('0x1');var _0x33f44d=0x194;var _0x5d4b32={'status':_0x33f44d};_0x5e07b2['status'](_0x5d4b32[_0x3286('0x2')]);_0x5e07b2[_0x3286('0x3')](_0xe36fe,{},function(_0x53ea56,_0x14aed4){if(_0x53ea56){return _0x5e07b2[_0x3286('0x2')](_0x5d4b32[_0x3286('0x2')])[_0x3286('0x4')](_0x5d4b32);}_0x5e07b2[_0x3286('0x5')](_0x14aed4);});}; \ No newline at end of file +var _0xca1d=['send','exports','404','status','render'];(function(_0x1dd00b,_0x5b7466){var _0x353048=function(_0x1bbd65){while(--_0x1bbd65){_0x1dd00b['push'](_0x1dd00b['shift']());}};_0x353048(++_0x5b7466);}(_0xca1d,0x1e6));var _0xdca1=function(_0x5d507f,_0x249d57){_0x5d507f=_0x5d507f-0x0;var _0x1124f7=_0xca1d[_0x5d507f];return _0x1124f7;};'use strict';module[_0xdca1('0x0')][0x194]=function pageNotFound(_0x2d5503,_0x1c0a81){var _0x7ee78b=_0xdca1('0x1');var _0x41f79d=0x194;var _0x3b9f8f={'status':_0x41f79d};_0x1c0a81['status'](_0x3b9f8f[_0xdca1('0x2')]);_0x1c0a81[_0xdca1('0x3')](_0x7ee78b,{},function(_0x5a351e,_0x3dedf3){if(_0x5a351e){return _0x1c0a81[_0xdca1('0x2')](_0x3b9f8f[_0xdca1('0x2')])['json'](_0x3b9f8f);}_0x1c0a81[_0xdca1('0x4')](_0x3dedf3);});}; \ No newline at end of file diff --git a/server/mysqldb/index.js b/server/mysqldb/index.js index 52612ce..b3724a9 100644 --- a/server/mysqldb/index.js +++ b/server/mysqldb/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2a90=['user_has_whatsapp_accounts','user_has_square_projects','SpiedAgents','ChanSpyId','Applications','Sounds','moh_has_sounds','Members','VoiceQueueId','Hoppers','ReportAgentPreview','HopperBlacks','JscriptySessionReport','JscriptySessions','TrunkId','TrunkBackup','TrunkBackupId','Interval','IntervalId','mandatoryDispositionPause','mandatoryDispositionPauseId','Lists','voice_queues_has_cm_lists','Agents','Teams','BlackLists','voice_queues_has_cm_blacklists','Messages','mailboxuser','mailbox','uniqueid','AgentReports','Contact','ContactId','MailAccountId','MailServerOut','Imap','Smtp','CannedAnswer','MailMessage','Interactions','ListId','TemplateId','team_has_mail_queues','MailInteractionId','Owner','mail_interaction_has_tags','Users','user_has_mail_interactions','Attachments','Interaction','ChatWebsiteId','ChatOfflineMessageId','restrict','List','Items','Disposition','Dispositions','FaxAccountId','Exntensions','TagId','FaxInteractionId','fax_interaction_has_tags','Tags','ThroughTags','Account','team_has_fax_queues','SmsAccountId','SmsMessage','SmsInteractionId','sms_interaction_has_tags','team_has_sms_queues','OpenchannelAccountId','Answers','OpenchannelApplication','OpenchannelQueueId','openchannel_interaction_has_tags','OpenchannelInteractionId','AttachmentId','team_has_openchannel_queues','Agent','Queue','ChatQueueId','Website','chat_interaction_has_tags','ChatInteractionId','ChatGroupId','ChatGroup','CompanyId','HopperHistories','Company','cm_contact_has_tags','CampaignId','OwnerId','All','Actions','AutomationId','ParentId','Intervals','ChatApplications','FaxApplications','Schedule','AnalyticCustomReport','CustomReportId','Mohs','whatsapp_interaction_has_tags','AllCondition','TriggerAllId','AnyConditions','Fields','DefaultReportId','MetricId','SalesforceConfiguration','AccountId','SubjectId','Descriptions','DescriptionId','FieldId','Description','VariableId','Configurations','SugarcrmField','Subject','Field','Subjects','int_desk_configuration_has_tags','ZohoConfiguration','int_zendesk_configuration_has_tags','FreshdeskAccount','FreshdeskField','int_freshdesk_configuration_has_tags','Dynamics365Account','FreshsalesConfiguration','FromId','ToId','SessionId','JscriptyAnswerReport','SmsQueueReport','ProjectId','team_has_chat_queues','OpenchannelQueues','team_has_whatsapp_queues','SquareProjectId','campaigns_has_cm_lists','campaigns_has_cm_blacklists','FromAccount','ToUserId','ToAgent','ToMailQueueId','ToMailAccountId','ToAccount','ChatTransferReport','FromUserId','ToChatQueueId','ToQueue','ToChatWebsiteId','FromFaxAccountId','ToFaxQueueId','ToFaxAccountId','OpenchannelTransferReport','FromOpenchannelAccountId','FromSmsAccountId','FromAgent','ToSmsAccountId','CustomFields','HopperHistory','Queues','UserProfileSections','Resources','sectionId','WhatsappAccountId','WhatsappInteractionId','FromWhatsappAccountId','ToWhatsappAccountId','WhatsappQueueId','exports','path','../config/environment','sequelize','lodash','jstz','xcall','xC@LL1234','127.0.0.1','mysql','utf8mb4','name','utf8','utf8_general_ci','sequelizeHistory','motion2','database','username','password','User','import','../api/user/user.model','VoiceChanSpy','VoiceContext','VoiceExtension','../api/voiceExtension/voiceExtension.model','VoiceMusicOnHold','../api/voiceMusicOnHold/voiceMusicOnHold.model','VoiceQueue','VoiceRecording','../api/voiceRecording/voiceRecording.model','ScreenRecording','../api/screenRecording/screenRecording.model','VoiceMail','../api/voiceMail/voiceMail.model','VoiceMailMessage','VoiceCallReport','../api/voiceAgentReport/voiceAgentReport.model','VoiceQueueReport','MemberReport','Trunk','../api/trunk/trunk.model','../api/voiceTransferReport/voiceTransferReport.model','UserVoiceQueueRt','../api/userVoiceQueueRt/userVoiceQueueRt.model','../api/userVoiceQueue/userVoiceQueue.model','../api/userChatQueue/userChatQueue.model','UserMailQueue','UserFaxQueue','../api/userFaxQueue/userFaxQueue.model','UserSmsQueue','../api/userSmsQueue/userSmsQueue.model','UserWhatsappQueue','../api/userWhatsappQueue/userWhatsappQueue.model','MailServerIn','../api/mailServerIn/mailServerIn.model','MailAccount','MailQueue','../api/mailQueue/mailQueue.model','../api/mailSubstatus/mailSubstatus.model','MailInteraction','../api/mailInteraction/mailInteraction.model','../api/mailMessage/mailMessage.model','MailApplication','MailQueueReport','../api/mailQueueReport/mailQueueReport.model','Dashboard','DashboardItem','../api/dashboardItem/dashboardItem.model','../api/faxAccount/faxAccount.model','FaxApplication','../api/faxApplication/faxApplication.model','FaxMessage','../api/faxMessage/faxMessage.model','../api/faxQueue/faxQueue.model','FaxQueueReport','../api/faxQueueReport/faxQueueReport.model','SmsAccount','../api/smsAccount/smsAccount.model','SmsApplication','../api/smsApplication/smsApplication.model','SmsInteraction','../api/smsInteraction/smsInteraction.model','../api/smsMessage/smsMessage.model','SmsQueue','../api/smsQueue/smsQueue.model','OpenchannelAccount','../api/openchannelAccount/openchannelAccount.model','OpenchannelInteraction','../api/openchannelInteraction/openchannelInteraction.model','OpenchannelMessage','../api/openchannelMessage/openchannelMessage.model','OpenchannelQueue','../api/openchannelQueue/openchannelQueue.model','ChatWebsite','../api/chatWebsite/chatWebsite.model','OpenchannelQueueReport','../api/openchannelQueueReport/openchannelQueueReport.model','ChatApplication','../api/chatApplication/chatApplication.model','ChatMessage','../api/chatMessage/chatMessage.model','ChatOfflineMessage','../api/chatOfflineMessage/chatOfflineMessage.model','ChatQueue','../api/chatQueue/chatQueue.model','ChatProactiveAction','../api/chatProactiveAction/chatProactiveAction.model','CmCompany','../api/cmCompany/cmCompany.model','CmContact','../api/cmContact/cmContact.model','CmHopper','CmHopperBlack','../api/cmHopperBlack/cmHopperBlack.model','CmHopperFinal','CmHopperHistory','CmCustomField','../api/cmCustomField/cmCustomField.model','Action','../api/action/action.model','Automation','../api/automation/automation.model','../api/cannedAnswer/cannedAnswer.model','../api/disposition/disposition.model','Condition','Pause','../api/pause/pause.model','../api/cdr/cdr.model','VoiceQueuesLog','../api/voiceQueuesLog/voiceQueuesLog.model','../api/schedule/schedule.model','Sound','../api/sound/sound.model','Tag','Template','../api/template/template.model','Trigger','../api/trigger/trigger.model','Variable','../api/variable/variable.model','../api/integration/integration.model','../api/analyticCustomReport/analyticCustomReport.model','AnalyticDefaultReport','../api/analyticDefaultReport/analyticDefaultReport.model','AnalyticExtractedReport','../api/analyticExtractedReport/analyticExtractedReport.model','AnalyticMetric','../api/analyticMetric/analyticMetric.model','AnalyticFieldReport','../api/analyticFieldReport/analyticFieldReport.model','AnalyticTreeReport','../api/analyticTreeReport/analyticTreeReport.model','SalesforceAccount','../api/intSalesforceAccount/intSalesforceAccount.model','../api/intSalesforceConfiguration/intSalesforceConfiguration.model','SalesforceField','SugarcrmAccount','../api/intSugarcrmAccount/intSugarcrmAccount.model','SugarcrmConfiguration','../api/intSugarcrmField/intSugarcrmField.model','DeskAccount','../api/intDeskAccount/intDeskAccount.model','DeskConfiguration','../api/intDeskConfiguration/intDeskConfiguration.model','DeskField','../api/intDeskField/intDeskField.model','ZohoAccount','../api/intZohoAccount/intZohoAccount.model','../api/intZohoConfiguration/intZohoConfiguration.model','ZohoField','../api/intZohoField/intZohoField.model','ZendeskAccount','../api/intZendeskAccount/intZendeskAccount.model','ZendeskConfiguration','../api/intZendeskConfiguration/intZendeskConfiguration.model','ZendeskField','../api/intFreshdeskAccount/intFreshdeskAccount.model','FreshdeskConfiguration','../api/intFreshdeskConfiguration/intFreshdeskConfiguration.model','../api/intFreshdeskField/intFreshdeskField.model','VtigerAccount','../api/intVtigerAccount/intVtigerAccount.model','VtigerConfiguration','VtigerField','../api/intVtigerField/intVtigerField.model','ServicenowAccount','../api/intServicenowAccount/intServicenowAccount.model','ServicenowConfiguration','../api/intServicenowConfiguration/intServicenowConfiguration.model','ServicenowField','../api/intServicenowField/intServicenowField.model','../api/intDynamics365Account/intDynamics365Account.model','Dynamics365Configuration','Dynamics365Field','../api/intDynamics365Field/intDynamics365Field.model','FreshsalesAccount','../api/intFreshsalesAccount/intFreshsalesAccount.model','FreshsalesField','../api/intFreshsalesField/intFreshsalesField.model','Integration','Network','ChatQueueReport','../api/chatQueueReport/chatQueueReport.model','ChatInternalMessage','../api/chatInternalMessage/chatInternalMessage.model','../api/jscriptyAnswerReport/jscriptyAnswerReport.model','JscriptyQuestionReport','../api/jscriptyQuestionReport/jscriptyQuestionReport.model','SquareReport','SquareDetailsReport','../api/squareReportDetail/squareReportDetail.model','JscriptyProject','../api/jscriptyProject/jscriptyProject.model','Setting','../api/setting/setting.model','SquareOdbc','SquareProject','../api/squareProject/squareProject.model','SquareRecording','SquareMessage','Team','../api/team/team.model','License','../api/license/license.model','Campaign','../api/campaign/campaign.model','Migration','../api/migration/migration.model','Attachment','../api/attachment/attachment.model','Plugin','../api/plugin/plugin.model','MailTransferReport','../api/mailTransferReport/mailTransferReport.model','../api/chatTransferReport/chatTransferReport.model','FaxTransferReport','../api/faxTransferReport/faxTransferReport.model','../api/openchannelTransferReport/openchannelTransferReport.model','SmsTransferReport','../api/smsTransferReport/smsTransferReport.model','CmList','../api/cmList/cmList.model','../api/voicePrefix/voicePrefix.model','UserProfile','../api/userProfile/userProfile.model','UserProfileSection','../api/userProfileSection/userProfileSection.model','UserProfileResource','../api/userProfileResource/userProfileResource.model','../api/userNotification/userNotification.model','WhatsappAccount','WhatsappApplication','../api/whatsappApplication/whatsappApplication.model','WhatsappInteraction','../api/whatsappInteraction/whatsappInteraction.model','WhatsappMessage','WhatsappQueueReport','../api/whatsappQueueReport/whatsappQueueReport.model','WhatsappTransferReport','../api/whatsappTransferReport/whatsappTransferReport.model','WhatsappQueue','../api/whatsappQueue/whatsappQueue.model','CloudProvider','../api/cloudProvider/cloudProvider.model','TeamVoiceQueue','hasOne','Recordings','VoiceQueuesRt','UserId','hasMany','Extensions','cascade','HopperFinals','OpenchannelInteractions','ChatInteraction','ChatInteractions','SmsInteractions','FaxInteraction','MailInteractions','UserNotifications','belongsTo','userProfileId','Groups','chat_group_has_users','belongsToMany','Contacts','cm_user_has_contacts','cm_user_has_lists','user_has_teams','user_has_chat_interactions','FaxInteractions','user_has_fax_interactions','user_has_sms_interactions','user_has_openchannel_interactions','WhatsappInteractions','user_has_whatsapp_interactions','VoiceQueues','UserVoiceQueue','MailQueues','ChatQueues','UserChatQueue','FaxQueue','FaxQueues','SmsQueues','WhatsappQueues','VoicePrefix','user_has_voice_prefixes','ChatWebsites','user_has_chat_websites','FaxAccount','FaxAccounts','MailAccounts','user_has_mail_accounts','OpenchannelAccounts','user_has_openchannel_accounts','SmsAccounts','user_has_sms_accounts'];(function(_0x5957e7,_0x578a47){var _0x4e291c=function(_0x4169e9){while(--_0x4169e9){_0x5957e7['push'](_0x5957e7['shift']());}};_0x4e291c(++_0x578a47);}(_0x2a90,0xb0));var _0x02a9=function(_0x1facfa,_0x1acf7d){_0x1facfa=_0x1facfa-0x0;var _0x9ec701=_0x2a90[_0x1facfa];return _0x9ec701;};'use strict';var path=require(_0x02a9('0x0'));var config=require(_0x02a9('0x1'));var Sequelize=require(_0x02a9('0x2'));var _=require(_0x02a9('0x3'));var jstz=require(_0x02a9('0x4'));var timezone=jstz['determine']();config['sequelize']=_['defaultsDeep'](config[_0x02a9('0x2')],{'database':'motion2','username':_0x02a9('0x5'),'password':_0x02a9('0x6'),'options':{'host':_0x02a9('0x7'),'port':0xcea,'dialect':_0x02a9('0x8'),'dialectOptions':{'charset':_0x02a9('0x9')},'logging':![],'timezone':timezone[_0x02a9('0xa')](),'define':{'charset':_0x02a9('0xb'),'collate':_0x02a9('0xc')}}});config[_0x02a9('0xd')]=_['defaultsDeep'](config[_0x02a9('0xd')],{'database':_0x02a9('0xe'),'username':'xcall','password':_0x02a9('0x6'),'options':{'host':'127.0.0.1','port':0xcea,'dialect':'mysql','dialectOptions':{'charset':_0x02a9('0x9')},'logging':![],'timezone':timezone['name'](),'define':{'charset':'utf8','collate':_0x02a9('0xc')}}});var db={'Sequelize':Sequelize,'sequelize':new Sequelize(config['sequelize'][_0x02a9('0xf')],config['sequelize'][_0x02a9('0x10')],config[_0x02a9('0x2')]['password'],config[_0x02a9('0x2')]['options'])};var dbH={'Sequelize':Sequelize,'sequelize':new Sequelize(config[_0x02a9('0xd')]['database'],config[_0x02a9('0xd')][_0x02a9('0x10')],config['sequelizeHistory'][_0x02a9('0x11')],config[_0x02a9('0xd')]['options'])};db[_0x02a9('0x12')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x14'));db[_0x02a9('0x15')]=db[_0x02a9('0x2')]['import']('../api/voiceChanSpy/voiceChanSpy.model');db[_0x02a9('0x16')]=db['sequelize'][_0x02a9('0x13')]('../api/voiceContext/voiceContext.model');db[_0x02a9('0x17')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x18'));db[_0x02a9('0x19')]=db['sequelize']['import'](_0x02a9('0x1a'));db[_0x02a9('0x1b')]=db[_0x02a9('0x2')][_0x02a9('0x13')]('../api/voiceQueue/voiceQueue.model');db[_0x02a9('0x1c')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x1d'));db[_0x02a9('0x1e')]=db['sequelize']['import'](_0x02a9('0x1f'));db[_0x02a9('0x20')]=db[_0x02a9('0x2')]['import'](_0x02a9('0x21'));db[_0x02a9('0x22')]=db['sequelize'][_0x02a9('0x13')]('../api/voiceMailMessage/voiceMailMessage.model');db[_0x02a9('0x23')]=db[_0x02a9('0x2')][_0x02a9('0x13')]('../api/voiceCallReport/voiceCallReport.model');db['VoiceDialReport']=db[_0x02a9('0x2')][_0x02a9('0x13')]('../api/voiceDialReport/voiceDialReport.model');db['VoiceAgentReport']=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x24'));db[_0x02a9('0x25')]=db[_0x02a9('0x2')]['import']('../api/voiceQueueReport/voiceQueueReport.model');db[_0x02a9('0x26')]=db[_0x02a9('0x2')]['import']('../api/memberReport/memberReport.model');db[_0x02a9('0x27')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x28'));db['VoiceTransferReport']=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x29'));db[_0x02a9('0x2a')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x2b'));db['UserVoiceQueue']=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x2c'));db['UserChatQueue']=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x2d'));db[_0x02a9('0x2e')]=db[_0x02a9('0x2')][_0x02a9('0x13')]('../api/userMailQueue/userMailQueue.model');db[_0x02a9('0x2f')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x30'));db[_0x02a9('0x31')]=db[_0x02a9('0x2')]['import'](_0x02a9('0x32'));db['UserOpenchannelQueue']=db[_0x02a9('0x2')]['import']('../api/userOpenchannelQueue/userOpenchannelQueue.model');db[_0x02a9('0x33')]=db[_0x02a9('0x2')]['import'](_0x02a9('0x34'));db[_0x02a9('0x35')]=db['sequelize']['import'](_0x02a9('0x36'));db['MailServerOut']=db[_0x02a9('0x2')][_0x02a9('0x13')]('../api/mailServerOut/mailServerOut.model');db[_0x02a9('0x37')]=db[_0x02a9('0x2')][_0x02a9('0x13')]('../api/mailAccount/mailAccount.model');db[_0x02a9('0x38')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x39'));db['MailSubstatus']=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x3a'));db[_0x02a9('0x3b')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x3c'));db['MailMessage']=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x3d'));db[_0x02a9('0x3e')]=db[_0x02a9('0x2')]['import']('../api/mailApplication/mailApplication.model');db[_0x02a9('0x3f')]=db[_0x02a9('0x2')]['import'](_0x02a9('0x40'));db[_0x02a9('0x41')]=db[_0x02a9('0x2')][_0x02a9('0x13')]('../api/dashboard/dashboard.model');db[_0x02a9('0x42')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x43'));db['FaxAccount']=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x44'));db[_0x02a9('0x45')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x46'));db['FaxInteraction']=db[_0x02a9('0x2')][_0x02a9('0x13')]('../api/faxInteraction/faxInteraction.model');db[_0x02a9('0x47')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x48'));db['FaxQueue']=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x49'));db[_0x02a9('0x4a')]=db[_0x02a9('0x2')]['import'](_0x02a9('0x4b'));db[_0x02a9('0x4c')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x4d'));db[_0x02a9('0x4e')]=db['sequelize'][_0x02a9('0x13')](_0x02a9('0x4f'));db[_0x02a9('0x50')]=db['sequelize']['import'](_0x02a9('0x51'));db['SmsMessage']=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x52'));db[_0x02a9('0x53')]=db[_0x02a9('0x2')]['import'](_0x02a9('0x54'));db[_0x02a9('0x55')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x56'));db['OpenchannelApplication']=db[_0x02a9('0x2')][_0x02a9('0x13')]('../api/openchannelApplication/openchannelApplication.model');db[_0x02a9('0x57')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x58'));db[_0x02a9('0x59')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x5a'));db[_0x02a9('0x5b')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x5c'));db[_0x02a9('0x5d')]=db[_0x02a9('0x2')]['import'](_0x02a9('0x5e'));db[_0x02a9('0x5f')]=db['sequelize'][_0x02a9('0x13')](_0x02a9('0x60'));db[_0x02a9('0x61')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x62'));db['ChatInteraction']=db['sequelize'][_0x02a9('0x13')]('../api/chatInteraction/chatInteraction.model');db[_0x02a9('0x63')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x64'));db[_0x02a9('0x65')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x66'));db[_0x02a9('0x67')]=db['sequelize'][_0x02a9('0x13')](_0x02a9('0x68'));db['ChatGroup']=db['sequelize']['import']('../api/chatGroup/chatGroup.model');db[_0x02a9('0x69')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x6a'));db[_0x02a9('0x6b')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x6c'));db[_0x02a9('0x6d')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x6e'));db[_0x02a9('0x6f')]=db[_0x02a9('0x2')][_0x02a9('0x13')]('../api/cmHopper/cmHopper.model');db[_0x02a9('0x70')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x71'));db[_0x02a9('0x72')]=db[_0x02a9('0x2')][_0x02a9('0x13')]('../api/cmHopperFinal/cmHopperFinal.model');db[_0x02a9('0x73')]=db[_0x02a9('0x2')]['import']('../api/cmHopperHistory/cmHopperHistory.model');db['ReportAgentPreview']=db['sequelize']['import']('../api/reportAgentPreview/reportAgentPreview.model');db[_0x02a9('0x74')]=db['sequelize'][_0x02a9('0x13')](_0x02a9('0x75'));db[_0x02a9('0x76')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x77'));db[_0x02a9('0x78')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x79'));db['CannedAnswer']=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x7a'));db['Disposition']=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x7b'));db[_0x02a9('0x7c')]=db[_0x02a9('0x2')][_0x02a9('0x13')]('../api/condition/condition.model');db['Interval']=db['sequelize']['import']('../api/interval/interval.model');db[_0x02a9('0x7d')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x7e'));db['Cdr']=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x7f'));db[_0x02a9('0x80')]=db[_0x02a9('0x2')]['import'](_0x02a9('0x81'));db['Schedule']=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x82'));db[_0x02a9('0x83')]=db['sequelize'][_0x02a9('0x13')](_0x02a9('0x84'));db[_0x02a9('0x85')]=db[_0x02a9('0x2')][_0x02a9('0x13')]('../api/tag/tag.model');db[_0x02a9('0x86')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x87'));db[_0x02a9('0x88')]=db['sequelize'][_0x02a9('0x13')](_0x02a9('0x89'));db[_0x02a9('0x8a')]=db['sequelize']['import'](_0x02a9('0x8b'));db['Integration']=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x8c'));db['IntegrationReport']=db[_0x02a9('0x2')]['import']('../api/integrationReport/integrationReport.model');db['AnalyticCustomReport']=db['sequelize'][_0x02a9('0x13')](_0x02a9('0x8d'));db[_0x02a9('0x8e')]=db['sequelize']['import'](_0x02a9('0x8f'));db[_0x02a9('0x90')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x91'));db[_0x02a9('0x92')]=db[_0x02a9('0x2')]['import'](_0x02a9('0x93'));db[_0x02a9('0x94')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x95'));db[_0x02a9('0x96')]=db[_0x02a9('0x2')]['import'](_0x02a9('0x97'));db[_0x02a9('0x98')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x99'));db['SalesforceConfiguration']=db['sequelize'][_0x02a9('0x13')](_0x02a9('0x9a'));db[_0x02a9('0x9b')]=db[_0x02a9('0x2')][_0x02a9('0x13')]('../api/intSalesforceField/intSalesforceField.model');db[_0x02a9('0x9c')]=db[_0x02a9('0x2')]['import'](_0x02a9('0x9d'));db[_0x02a9('0x9e')]=db[_0x02a9('0x2')][_0x02a9('0x13')]('../api/intSugarcrmConfiguration/intSugarcrmConfiguration.model');db['SugarcrmField']=db['sequelize'][_0x02a9('0x13')](_0x02a9('0x9f'));db[_0x02a9('0xa0')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0xa1'));db[_0x02a9('0xa2')]=db['sequelize'][_0x02a9('0x13')](_0x02a9('0xa3'));db[_0x02a9('0xa4')]=db[_0x02a9('0x2')]['import'](_0x02a9('0xa5'));db[_0x02a9('0xa6')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0xa7'));db['ZohoConfiguration']=db[_0x02a9('0x2')]['import'](_0x02a9('0xa8'));db[_0x02a9('0xa9')]=db[_0x02a9('0x2')]['import'](_0x02a9('0xaa'));db[_0x02a9('0xab')]=db['sequelize']['import'](_0x02a9('0xac'));db[_0x02a9('0xad')]=db['sequelize'][_0x02a9('0x13')](_0x02a9('0xae'));db[_0x02a9('0xaf')]=db[_0x02a9('0x2')][_0x02a9('0x13')]('../api/intZendeskField/intZendeskField.model');db['FreshdeskAccount']=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0xb0'));db[_0x02a9('0xb1')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0xb2'));db['FreshdeskField']=db[_0x02a9('0x2')]['import'](_0x02a9('0xb3'));db[_0x02a9('0xb4')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0xb5'));db[_0x02a9('0xb6')]=db[_0x02a9('0x2')]['import']('../api/intVtigerConfiguration/intVtigerConfiguration.model');db[_0x02a9('0xb7')]=db[_0x02a9('0x2')]['import'](_0x02a9('0xb8'));db[_0x02a9('0xb9')]=db['sequelize'][_0x02a9('0x13')](_0x02a9('0xba'));db[_0x02a9('0xbb')]=db[_0x02a9('0x2')]['import'](_0x02a9('0xbc'));db[_0x02a9('0xbd')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0xbe'));db['Dynamics365Account']=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0xbf'));db[_0x02a9('0xc0')]=db[_0x02a9('0x2')][_0x02a9('0x13')]('../api/intDynamics365Configuration/intDynamics365Configuration.model');db[_0x02a9('0xc1')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0xc2'));db[_0x02a9('0xc3')]=db['sequelize'][_0x02a9('0x13')](_0x02a9('0xc4'));db['FreshsalesConfiguration']=db[_0x02a9('0x2')][_0x02a9('0x13')]('../api/intFreshsalesConfiguration/intFreshsalesConfiguration.model');db[_0x02a9('0xc5')]=db[_0x02a9('0x2')]['import'](_0x02a9('0xc6'));db[_0x02a9('0xc7')]=db['sequelize'][_0x02a9('0x13')](_0x02a9('0x8c'));db[_0x02a9('0xc8')]=db[_0x02a9('0x2')][_0x02a9('0x13')]('../api/network/network.model');db[_0x02a9('0xc9')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0xca'));db[_0x02a9('0xcb')]=db[_0x02a9('0x2')]['import'](_0x02a9('0xcc'));db['JscriptyAnswerReport']=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0xcd'));db[_0x02a9('0xce')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0xcf'));db['JscriptySessionReport']=db[_0x02a9('0x2')][_0x02a9('0x13')]('../api/jscriptySessionReport/jscriptySessionReport.model');db['SmsQueueReport']=db[_0x02a9('0x2')][_0x02a9('0x13')]('../api/smsQueueReport/smsQueueReport.model');db[_0x02a9('0xd0')]=db['sequelize']['import']('../api/squareReport/squareReport.model');db[_0x02a9('0xd1')]=db['sequelize'][_0x02a9('0x13')](_0x02a9('0xd2'));db[_0x02a9('0xd3')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0xd4'));db[_0x02a9('0xd5')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0xd6'));db[_0x02a9('0xd7')]=db[_0x02a9('0x2')]['import']('../api/squareOdbc/squareOdbc.model');db[_0x02a9('0xd8')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0xd9'));db[_0x02a9('0xda')]=db[_0x02a9('0x2')]['import']('../api/squareRecording/squareRecording.model');db[_0x02a9('0xdb')]=db[_0x02a9('0x2')][_0x02a9('0x13')]('../api/squareMessage/squareMessage.model');db[_0x02a9('0xdc')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0xdd'));db[_0x02a9('0xde')]=db[_0x02a9('0x2')]['import'](_0x02a9('0xdf'));db[_0x02a9('0xe0')]=db[_0x02a9('0x2')]['import'](_0x02a9('0xe1'));db[_0x02a9('0xe2')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0xe3'));db[_0x02a9('0xe4')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0xe5'));db[_0x02a9('0xe6')]=db['sequelize'][_0x02a9('0x13')](_0x02a9('0xe7'));db[_0x02a9('0xe8')]=db[_0x02a9('0x2')]['import'](_0x02a9('0xe9'));db['ChatTransferReport']=db[_0x02a9('0x2')]['import'](_0x02a9('0xea'));db[_0x02a9('0xeb')]=db['sequelize'][_0x02a9('0x13')](_0x02a9('0xec'));db['OpenchannelTransferReport']=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0xed'));db[_0x02a9('0xee')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0xef'));db[_0x02a9('0xf0')]=db[_0x02a9('0x2')]['import'](_0x02a9('0xf1'));db['VoicePrefix']=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0xf2'));db[_0x02a9('0xf3')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0xf4'));db[_0x02a9('0xf5')]=db[_0x02a9('0x2')]['import'](_0x02a9('0xf6'));db[_0x02a9('0xf7')]=db[_0x02a9('0x2')]['import'](_0x02a9('0xf8'));db['UserNotification']=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0xf9'));db[_0x02a9('0xfa')]=db[_0x02a9('0x2')][_0x02a9('0x13')]('../api/whatsappAccount/whatsappAccount.model');db[_0x02a9('0xfb')]=db[_0x02a9('0x2')]['import'](_0x02a9('0xfc'));db[_0x02a9('0xfd')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0xfe'));db[_0x02a9('0xff')]=db[_0x02a9('0x2')]['import']('../api/whatsappMessage/whatsappMessage.model');db[_0x02a9('0x100')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x101'));db[_0x02a9('0x102')]=db[_0x02a9('0x2')]['import'](_0x02a9('0x103'));db[_0x02a9('0x104')]=db[_0x02a9('0x2')]['import'](_0x02a9('0x105'));db[_0x02a9('0x106')]=db[_0x02a9('0x2')][_0x02a9('0x13')](_0x02a9('0x107'));db[_0x02a9('0x108')]=db[_0x02a9('0x2')][_0x02a9('0x13')]('../api/teamVoiceQueue/teamVoiceQueue.model');db['User'][_0x02a9('0x109')](db['VoiceMail'],{'as':_0x02a9('0x20'),'onDelete':'cascade','foreignKey':'UserId'});db[_0x02a9('0x12')]['hasMany'](db['VoiceRecording'],{'as':_0x02a9('0x10a'),'foreignKey':'UserId'});db['User']['hasMany'](db[_0x02a9('0x2a')],{'as':_0x02a9('0x10b'),'foreignKey':_0x02a9('0x10c')});db[_0x02a9('0x12')][_0x02a9('0x10d')](db[_0x02a9('0x17')],{'as':_0x02a9('0x10e'),'onDelete':_0x02a9('0x10f'),'hooks':!![]});db[_0x02a9('0x12')][_0x02a9('0x10d')](db[_0x02a9('0x72')],{'as':_0x02a9('0x110'),'foreignKey':_0x02a9('0x10c')});db[_0x02a9('0x12')][_0x02a9('0x10d')](db[_0x02a9('0x73')],{'as':'HopperHistory','foreignKey':_0x02a9('0x10c')});db[_0x02a9('0x12')][_0x02a9('0x10d')](db['ReportAgentPreview'],{'as':'ReportAgentPreview','foreignKey':_0x02a9('0x10c')});db[_0x02a9('0x12')][_0x02a9('0x10d')](db['OpenchannelInteraction'],{'as':_0x02a9('0x111'),'foreignKey':_0x02a9('0x10c')});db[_0x02a9('0x12')][_0x02a9('0x10d')](db[_0x02a9('0x112')],{'as':_0x02a9('0x113'),'foreignKey':_0x02a9('0x10c')});db[_0x02a9('0x12')][_0x02a9('0x10d')](db[_0x02a9('0x50')],{'as':_0x02a9('0x114'),'foreignKey':_0x02a9('0x10c')});db['User'][_0x02a9('0x10d')](db[_0x02a9('0x115')],{'as':'FaxInteractions','foreignKey':_0x02a9('0x10c')});db[_0x02a9('0x12')][_0x02a9('0x10d')](db[_0x02a9('0x3b')],{'as':_0x02a9('0x116'),'foreignKey':'UserId'});db['User']['hasMany'](db[_0x02a9('0xfd')],{'as':'WhatsappInteractions','foreignKey':'UserId'});db['User']['hasMany'](db['UserNotification'],{'as':_0x02a9('0x117'),'foreignKey':'SenderId'});db[_0x02a9('0x12')][_0x02a9('0x118')](db['UserProfile'],{'as':'UserProfile','foreignKey':_0x02a9('0x119')});db['User']['belongsToMany'](db['ChatGroup'],{'as':_0x02a9('0x11a'),'through':_0x02a9('0x11b')});db[_0x02a9('0x12')][_0x02a9('0x11c')](db['CmContact'],{'as':_0x02a9('0x11d'),'through':_0x02a9('0x11e')});db[_0x02a9('0x12')][_0x02a9('0x11c')](db[_0x02a9('0xf0')],{'as':'Lists','through':_0x02a9('0x11f')});db['User'][_0x02a9('0x11c')](db[_0x02a9('0xdc')],{'through':_0x02a9('0x120')});db[_0x02a9('0x12')][_0x02a9('0x11c')](db[_0x02a9('0x3b')],{'as':_0x02a9('0x116'),'through':'user_has_mail_interactions'});db[_0x02a9('0x12')][_0x02a9('0x11c')](db[_0x02a9('0x112')],{'as':_0x02a9('0x113'),'through':_0x02a9('0x121')});db[_0x02a9('0x12')]['belongsToMany'](db[_0x02a9('0x115')],{'as':_0x02a9('0x122'),'through':_0x02a9('0x123')});db['User'][_0x02a9('0x11c')](db[_0x02a9('0x50')],{'as':_0x02a9('0x114'),'through':_0x02a9('0x124')});db['User'][_0x02a9('0x11c')](db[_0x02a9('0x57')],{'as':'OpenchannelInteractions','through':_0x02a9('0x125')});db[_0x02a9('0x12')][_0x02a9('0x11c')](db[_0x02a9('0xfd')],{'as':_0x02a9('0x126'),'through':_0x02a9('0x127')});db[_0x02a9('0x12')][_0x02a9('0x11c')](db[_0x02a9('0x1b')],{'as':_0x02a9('0x128'),'through':_0x02a9('0x129'),'required':![]});db[_0x02a9('0x12')][_0x02a9('0x11c')](db['MailQueue'],{'as':_0x02a9('0x12a'),'through':_0x02a9('0x2e'),'required':![]});db[_0x02a9('0x12')][_0x02a9('0x11c')](db['ChatQueue'],{'as':_0x02a9('0x12b'),'through':_0x02a9('0x12c'),'required':![],'hooks':!![]});db[_0x02a9('0x12')]['belongsToMany'](db[_0x02a9('0x12d')],{'as':_0x02a9('0x12e'),'through':_0x02a9('0x2f'),'required':![]});db[_0x02a9('0x12')][_0x02a9('0x11c')](db['SmsQueue'],{'as':_0x02a9('0x12f'),'through':'UserSmsQueue','required':![]});db[_0x02a9('0x12')]['belongsToMany'](db[_0x02a9('0x5b')],{'as':'OpenchannelQueues','through':'UserOpenchannelQueue','required':![]});db[_0x02a9('0x12')][_0x02a9('0x11c')](db[_0x02a9('0x104')],{'as':_0x02a9('0x130'),'through':'UserWhatsappQueue','required':![]});db[_0x02a9('0x12')][_0x02a9('0x11c')](db[_0x02a9('0xf0')],{'through':'cm_user_has_lists'});db['User'][_0x02a9('0x11c')](db[_0x02a9('0x131')],{'as':'VoicePrefixes','through':_0x02a9('0x132'),'required':![]});db[_0x02a9('0x12')][_0x02a9('0x11c')](db[_0x02a9('0x5d')],{'as':_0x02a9('0x133'),'through':_0x02a9('0x134')});db[_0x02a9('0x12')]['belongsToMany'](db[_0x02a9('0x135')],{'as':_0x02a9('0x136'),'through':'user_has_fax_accounts'});db[_0x02a9('0x12')]['belongsToMany'](db['MailAccount'],{'as':_0x02a9('0x137'),'through':_0x02a9('0x138')});db[_0x02a9('0x12')][_0x02a9('0x11c')](db[_0x02a9('0x55')],{'as':_0x02a9('0x139'),'through':_0x02a9('0x13a')});db[_0x02a9('0x12')][_0x02a9('0x11c')](db['SmsAccount'],{'as':_0x02a9('0x13b'),'through':_0x02a9('0x13c')});db['User'][_0x02a9('0x11c')](db['WhatsappAccount'],{'as':'WhatsappAccounts','through':_0x02a9('0x13d')});db[_0x02a9('0x12')][_0x02a9('0x11c')](db['SquareProject'],{'as':'SquareProjects','through':_0x02a9('0x13e')});db[_0x02a9('0x15')]['hasMany'](db[_0x02a9('0x17')],{'as':_0x02a9('0x13f'),'onDelete':_0x02a9('0x10f'),'foreignKey':_0x02a9('0x140')});db[_0x02a9('0x16')]['hasMany'](db['VoiceExtension'],{'onDelete':'cascade'});db[_0x02a9('0x17')][_0x02a9('0x10d')](db[_0x02a9('0x17')],{'as':_0x02a9('0x141'),'onDelete':'cascade'});db['VoiceMusicOnHold'][_0x02a9('0x11c')](db[_0x02a9('0x83')],{'as':_0x02a9('0x142'),'through':_0x02a9('0x143')});db['VoiceQueue'][_0x02a9('0x10d')](db[_0x02a9('0x2a')],{'as':_0x02a9('0x144'),'foreignKey':_0x02a9('0x145')});db[_0x02a9('0x1b')][_0x02a9('0x10d')](db['CmHopper'],{'as':_0x02a9('0x146'),'foreignKey':_0x02a9('0x145')});db[_0x02a9('0x1b')][_0x02a9('0x10d')](db[_0x02a9('0x72')],{'as':'HopperFinals','foreignKey':'VoiceQueueId'});db[_0x02a9('0x1b')][_0x02a9('0x10d')](db[_0x02a9('0x73')],{'as':'HopperHistories','foreignKey':_0x02a9('0x145')});db[_0x02a9('0x1b')][_0x02a9('0x10d')](db[_0x02a9('0x147')],{'as':_0x02a9('0x147'),'foreignKey':_0x02a9('0x145')});db[_0x02a9('0x1b')][_0x02a9('0x10d')](db[_0x02a9('0x70')],{'as':_0x02a9('0x148'),'foreignKey':_0x02a9('0x145')});db[_0x02a9('0x1b')][_0x02a9('0x10d')](db[_0x02a9('0x149')],{'as':_0x02a9('0x14a'),'foreignKey':'VoiceQueueId'});db[_0x02a9('0x1b')][_0x02a9('0x118')](db['Trunk'],{'as':_0x02a9('0x27'),'foreignKey':_0x02a9('0x14b')});db[_0x02a9('0x1b')][_0x02a9('0x118')](db[_0x02a9('0x27')],{'as':_0x02a9('0x14c'),'foreignKey':_0x02a9('0x14d')});db[_0x02a9('0x1b')]['belongsTo'](db['Interval'],{'as':_0x02a9('0x14e'),'foreignKey':_0x02a9('0x14f')});db['VoiceQueue'][_0x02a9('0x118')](db[_0x02a9('0x7d')],{'as':_0x02a9('0x150'),'foreignKey':_0x02a9('0x151')});db['VoiceQueue'][_0x02a9('0x11c')](db[_0x02a9('0xf0')],{'as':_0x02a9('0x152'),'through':_0x02a9('0x153')});db[_0x02a9('0x1b')][_0x02a9('0x11c')](db[_0x02a9('0x12')],{'as':_0x02a9('0x154'),'through':'UserVoiceQueue'});db[_0x02a9('0x1b')][_0x02a9('0x11c')](db['Team'],{'as':_0x02a9('0x155'),'through':_0x02a9('0x108')});db[_0x02a9('0x1b')][_0x02a9('0x11c')](db[_0x02a9('0xf0')],{'as':_0x02a9('0x156'),'through':_0x02a9('0x157')});db[_0x02a9('0x1c')][_0x02a9('0x118')](db[_0x02a9('0x12')],{'as':_0x02a9('0x12'),'foreignKey':_0x02a9('0x10c')});db['ScreenRecording'][_0x02a9('0x118')](db[_0x02a9('0x12')],{'as':_0x02a9('0x12'),'foreignKey':_0x02a9('0x10c')});db[_0x02a9('0x20')]['hasMany'](db['VoiceMailMessage'],{'as':_0x02a9('0x158'),'onDelete':_0x02a9('0x10f'),'foreignKey':_0x02a9('0x159'),'sourceKey':_0x02a9('0x15a')});db[_0x02a9('0x22')]['belongsTo'](db[_0x02a9('0x20')],{'foreignKey':'mailboxuser','targetKey':_0x02a9('0x15a')});db['VoiceCallReport'][_0x02a9('0x10d')](db['VoiceQueueReport'],{'as':'QueueCalls','foreignKey':_0x02a9('0x15b'),'constraints':![]});db[_0x02a9('0x23')]['hasMany'](db['VoiceAgentReport'],{'as':_0x02a9('0x15c'),'foreignKey':'uniqueid','constraints':![]});db['VoiceCallReport']['belongsTo'](db['User'],{'as':_0x02a9('0x12'),'foreignKey':_0x02a9('0x10c')});db[_0x02a9('0x23')][_0x02a9('0x118')](db[_0x02a9('0x6d')],{'as':_0x02a9('0x15d'),'foreignKey':_0x02a9('0x15e')});db[_0x02a9('0x35')][_0x02a9('0x118')](db['MailAccount'],{'as':'MailAccount','foreignKey':_0x02a9('0x15f')});db[_0x02a9('0x160')][_0x02a9('0x118')](db['MailAccount'],{'as':_0x02a9('0x37'),'foreignKey':'MailAccountId'});db[_0x02a9('0x37')][_0x02a9('0x109')](db['MailServerIn'],{'as':_0x02a9('0x161'),'onDelete':_0x02a9('0x10f')});db['MailAccount'][_0x02a9('0x109')](db[_0x02a9('0x160')],{'as':_0x02a9('0x162'),'onDelete':_0x02a9('0x10f')});db['MailAccount'][_0x02a9('0x10d')](db['Disposition'],{'as':'Dispositions','foreignKey':_0x02a9('0x15f')});db[_0x02a9('0x37')][_0x02a9('0x10d')](db[_0x02a9('0x163')],{'as':'Answers','foreignKey':_0x02a9('0x15f')});db[_0x02a9('0x37')][_0x02a9('0x10d')](db[_0x02a9('0x164')],{'as':_0x02a9('0x158'),'foreignKey':_0x02a9('0x15f')});db[_0x02a9('0x37')][_0x02a9('0x10d')](db[_0x02a9('0x3b')],{'as':_0x02a9('0x165')});db[_0x02a9('0x37')][_0x02a9('0x10d')](db[_0x02a9('0x3e')],{'as':_0x02a9('0x141')});db['MailAccount']['belongsTo'](db[_0x02a9('0xf0')],{'as':'List','foreignKey':_0x02a9('0x166')});db[_0x02a9('0x37')][_0x02a9('0x118')](db[_0x02a9('0x86')],{'as':_0x02a9('0x86'),'foreignKey':_0x02a9('0x167')});db[_0x02a9('0x37')]['belongsTo'](db[_0x02a9('0x7d')],{'as':_0x02a9('0x150'),'foreignKey':_0x02a9('0x151')});db[_0x02a9('0x37')][_0x02a9('0x11c')](db[_0x02a9('0x12')],{'as':'Agents','through':_0x02a9('0x138')});db[_0x02a9('0x38')]['belongsToMany'](db[_0x02a9('0x12')],{'as':'Agents','through':_0x02a9('0x2e')});db[_0x02a9('0x38')][_0x02a9('0x11c')](db[_0x02a9('0xdc')],{'through':_0x02a9('0x168'),'as':_0x02a9('0x155')});db[_0x02a9('0x3b')]['hasMany'](db[_0x02a9('0x164')],{'as':'Messages','onDelete':_0x02a9('0x10f'),'foreignKey':_0x02a9('0x169')});db['MailInteraction']['belongsTo'](db[_0x02a9('0x37')],{'as':'Account','foreignKey':_0x02a9('0x15f')});db[_0x02a9('0x3b')][_0x02a9('0x118')](db['CmContact'],{'as':_0x02a9('0x15d'),'foreignKey':'ContactId'});db[_0x02a9('0x3b')][_0x02a9('0x118')](db[_0x02a9('0x12')],{'as':_0x02a9('0x16a'),'foreignKey':_0x02a9('0x10c')});db[_0x02a9('0x3b')][_0x02a9('0x11c')](db[_0x02a9('0x85')],{'through':'mail_interaction_has_tags','as':'Tags'});db['MailInteraction']['belongsToMany'](db[_0x02a9('0x85')],{'through':_0x02a9('0x16b'),'as':'ThroughTags'});db['MailInteraction'][_0x02a9('0x11c')](db[_0x02a9('0x12')],{'as':_0x02a9('0x16c'),'through':_0x02a9('0x16d'),'foreignKey':'MailInteractionId'});db[_0x02a9('0x164')][_0x02a9('0x10d')](db[_0x02a9('0xe4')],{'as':_0x02a9('0x16e'),'onDelete':_0x02a9('0x10f')});db['MailMessage']['belongsTo'](db['User'],{'as':_0x02a9('0x12')});db[_0x02a9('0x164')][_0x02a9('0x118')](db[_0x02a9('0x6d')],{'onDelete':'cascade','as':_0x02a9('0x15d')});db['MailMessage'][_0x02a9('0x118')](db[_0x02a9('0x3b')],{'as':_0x02a9('0x16f'),'foreignKey':_0x02a9('0x169')});db['MailMessage'][_0x02a9('0x118')](db['MailAccount'],{'as':'Account','foreignKey':_0x02a9('0x15f')});db[_0x02a9('0x164')][_0x02a9('0x118')](db['ChatWebsite'],{'as':'ChatWebsite','foreignKey':_0x02a9('0x170')});db[_0x02a9('0x164')][_0x02a9('0x118')](db[_0x02a9('0x65')],{'as':_0x02a9('0x65'),'foreignKey':_0x02a9('0x171')});db[_0x02a9('0x3e')]['belongsTo'](db['User'],{'onDelete':'restrict'});db[_0x02a9('0x3e')][_0x02a9('0x118')](db['MailQueue'],{'onDelete':'restrict'});db['MailApplication'][_0x02a9('0x118')](db['MailAccount'],{'onDelete':_0x02a9('0x172')});db[_0x02a9('0x3e')][_0x02a9('0x118')](db[_0x02a9('0x14e')],{'onDelete':_0x02a9('0x172'),'foreignKey':_0x02a9('0x14f')});db[_0x02a9('0x3e')]['belongsTo'](db[_0x02a9('0x85')],{'onDelete':_0x02a9('0x172'),'foreignKey':'TagId'});db[_0x02a9('0x3f')][_0x02a9('0x118')](db[_0x02a9('0x37')],{});db['MailQueueReport'][_0x02a9('0x118')](db[_0x02a9('0xf0')],{'as':_0x02a9('0x173'),'foreignKey':'ListId'});db[_0x02a9('0x3f')][_0x02a9('0x118')](db[_0x02a9('0x6d')],{'as':'Contact','foreignKey':_0x02a9('0x15e')});db[_0x02a9('0x3f')][_0x02a9('0x118')](db['MailInteraction'],{});db['MailQueueReport']['belongsTo'](db['MailMessage'],{});db['MailQueueReport']['belongsTo'](db[_0x02a9('0x12')],{});db['MailQueueReport'][_0x02a9('0x118')](db[_0x02a9('0x38')],{});db['Dashboard'][_0x02a9('0x10d')](db['DashboardItem'],{'as':_0x02a9('0x174'),'onDelete':_0x02a9('0x10f')});db['FaxAccount'][_0x02a9('0x10d')](db[_0x02a9('0x175')],{'as':_0x02a9('0x176'),'foreignKey':_0x02a9('0x177')});db[_0x02a9('0x135')][_0x02a9('0x10d')](db[_0x02a9('0x163')],{'as':'Answers','foreignKey':_0x02a9('0x177')});db['FaxAccount'][_0x02a9('0x10d')](db['FaxInteraction'],{'as':_0x02a9('0x165')});db[_0x02a9('0x135')][_0x02a9('0x10d')](db[_0x02a9('0x45')],{'as':_0x02a9('0x141')});db['FaxAccount']['hasMany'](db['VoiceExtension'],{'as':_0x02a9('0x178'),'onDelete':_0x02a9('0x10f')});db[_0x02a9('0x135')][_0x02a9('0x10d')](db[_0x02a9('0x47')],{'as':_0x02a9('0x158')});db[_0x02a9('0x135')][_0x02a9('0x118')](db[_0x02a9('0x27')],{'as':_0x02a9('0x27')});db['FaxAccount'][_0x02a9('0x118')](db[_0x02a9('0xf0')],{'as':_0x02a9('0x173'),'foreignKey':_0x02a9('0x166')});db[_0x02a9('0x135')][_0x02a9('0x118')](db[_0x02a9('0x7d')],{'as':_0x02a9('0x150'),'foreignKey':_0x02a9('0x151')});db[_0x02a9('0x135')]['belongsToMany'](db['User'],{'as':_0x02a9('0x154'),'through':'user_has_fax_accounts'});db[_0x02a9('0x45')][_0x02a9('0x118')](db[_0x02a9('0x12')],{'onDelete':_0x02a9('0x172')});db[_0x02a9('0x45')]['belongsTo'](db['FaxQueue'],{'onDelete':_0x02a9('0x172')});db[_0x02a9('0x45')][_0x02a9('0x118')](db[_0x02a9('0x135')],{'onDelete':'restrict'});db['FaxApplication'][_0x02a9('0x118')](db[_0x02a9('0x85')],{'onDelete':'restrict','foreignKey':_0x02a9('0x179')});db['FaxInteraction']['hasMany'](db[_0x02a9('0x47')],{'as':'Messages','onDelete':_0x02a9('0x10f'),'foreignKey':_0x02a9('0x17a')});db[_0x02a9('0x115')][_0x02a9('0x118')](db[_0x02a9('0x135')],{'as':'Account','foreignKey':_0x02a9('0x177')});db[_0x02a9('0x115')][_0x02a9('0x118')](db[_0x02a9('0x6d')],{'as':'Contact','foreignKey':_0x02a9('0x15e')});db[_0x02a9('0x115')]['belongsTo'](db[_0x02a9('0x12')],{'as':_0x02a9('0x16a'),'foreignKey':_0x02a9('0x10c')});db[_0x02a9('0x115')][_0x02a9('0x11c')](db['Tag'],{'through':_0x02a9('0x17b'),'as':_0x02a9('0x17c')});db[_0x02a9('0x115')][_0x02a9('0x11c')](db[_0x02a9('0x85')],{'through':_0x02a9('0x17b'),'as':_0x02a9('0x17d')});db['FaxInteraction'][_0x02a9('0x11c')](db['User'],{'as':_0x02a9('0x16c'),'through':_0x02a9('0x123'),'foreignKey':'FaxInteractionId'});db[_0x02a9('0x47')][_0x02a9('0x118')](db['User'],{'onDelete':_0x02a9('0x10f'),'as':'User'});db[_0x02a9('0x47')][_0x02a9('0x118')](db[_0x02a9('0x115')],{'as':'Interaction','foreignKey':_0x02a9('0x17a')});db['FaxMessage'][_0x02a9('0x118')](db[_0x02a9('0x6d')],{'onDelete':_0x02a9('0x10f'),'as':'Contact'});db[_0x02a9('0x47')][_0x02a9('0x118')](db['Attachment'],{'as':_0x02a9('0xe4'),'foreignKey':'AttachmentId'});db['FaxMessage']['belongsTo'](db[_0x02a9('0x135')],{'as':_0x02a9('0x17e'),'foreignKey':_0x02a9('0x177')});db[_0x02a9('0x12d')]['belongsToMany'](db[_0x02a9('0x12')],{'as':_0x02a9('0x154'),'through':_0x02a9('0x2f')});db[_0x02a9('0x12d')][_0x02a9('0x11c')](db[_0x02a9('0xdc')],{'through':_0x02a9('0x17f'),'as':_0x02a9('0x155')});db['FaxQueueReport'][_0x02a9('0x118')](db[_0x02a9('0x135')],{});db[_0x02a9('0x4a')][_0x02a9('0x118')](db[_0x02a9('0xf0')],{'as':_0x02a9('0x173'),'foreignKey':'ListId'});db[_0x02a9('0x4a')][_0x02a9('0x118')](db[_0x02a9('0x6d')],{'as':_0x02a9('0x15d'),'foreignKey':'ContactId'});db['FaxQueueReport'][_0x02a9('0x118')](db[_0x02a9('0x115')],{});db[_0x02a9('0x4a')]['belongsTo'](db['FaxMessage'],{});db['FaxQueueReport'][_0x02a9('0x118')](db[_0x02a9('0x12')],{});db[_0x02a9('0x4a')][_0x02a9('0x118')](db[_0x02a9('0x12d')],{});db[_0x02a9('0x4c')][_0x02a9('0x10d')](db[_0x02a9('0x175')],{'as':_0x02a9('0x176'),'foreignKey':_0x02a9('0x180')});db[_0x02a9('0x4c')]['hasMany'](db[_0x02a9('0x163')],{'as':'Answers','foreignKey':_0x02a9('0x180')});db[_0x02a9('0x4c')][_0x02a9('0x10d')](db['SmsMessage'],{'as':'Messages','foreignKey':'SmsAccountId'});db['SmsAccount'][_0x02a9('0x10d')](db[_0x02a9('0x50')],{'as':_0x02a9('0x165')});db['SmsAccount'][_0x02a9('0x10d')](db[_0x02a9('0x4e')],{'as':_0x02a9('0x141')});db[_0x02a9('0x4c')]['belongsTo'](db[_0x02a9('0xf0')],{'as':_0x02a9('0x173'),'foreignKey':_0x02a9('0x166')});db[_0x02a9('0x4c')]['belongsTo'](db['Pause'],{'as':_0x02a9('0x150'),'foreignKey':'mandatoryDispositionPauseId'});db[_0x02a9('0x4c')][_0x02a9('0x11c')](db['User'],{'as':_0x02a9('0x154'),'through':_0x02a9('0x13c')});db[_0x02a9('0x4e')][_0x02a9('0x118')](db[_0x02a9('0x12')],{'onDelete':'restrict'});db[_0x02a9('0x4e')][_0x02a9('0x118')](db[_0x02a9('0x53')],{'onDelete':_0x02a9('0x172')});db[_0x02a9('0x4e')][_0x02a9('0x118')](db['SmsAccount'],{'onDelete':_0x02a9('0x172')});db[_0x02a9('0x4e')][_0x02a9('0x118')](db[_0x02a9('0x14e')],{'onDelete':_0x02a9('0x172'),'foreignKey':_0x02a9('0x14f')});db[_0x02a9('0x4e')]['belongsTo'](db['Tag'],{'onDelete':'restrict','foreignKey':_0x02a9('0x179')});db['SmsInteraction'][_0x02a9('0x10d')](db[_0x02a9('0x181')],{'as':_0x02a9('0x158'),'onDelete':_0x02a9('0x10f'),'foreignKey':_0x02a9('0x182')});db['SmsInteraction'][_0x02a9('0x118')](db[_0x02a9('0x4c')],{'as':_0x02a9('0x17e'),'foreignKey':_0x02a9('0x180')});db[_0x02a9('0x50')][_0x02a9('0x118')](db[_0x02a9('0x6d')],{'as':_0x02a9('0x15d'),'foreignKey':_0x02a9('0x15e')});db['SmsInteraction'][_0x02a9('0x118')](db[_0x02a9('0x12')],{'as':_0x02a9('0x16a'),'foreignKey':_0x02a9('0x10c')});db['SmsInteraction'][_0x02a9('0x11c')](db[_0x02a9('0x85')],{'through':'sms_interaction_has_tags','as':_0x02a9('0x17c')});db[_0x02a9('0x50')][_0x02a9('0x11c')](db[_0x02a9('0x85')],{'through':_0x02a9('0x183'),'as':_0x02a9('0x17d')});db[_0x02a9('0x50')]['belongsToMany'](db[_0x02a9('0x12')],{'as':'Users','through':'user_has_sms_interactions','foreignKey':'SmsInteractionId'});db[_0x02a9('0x181')]['belongsTo'](db[_0x02a9('0x12')],{'as':_0x02a9('0x12')});db[_0x02a9('0x181')][_0x02a9('0x118')](db[_0x02a9('0x6d')],{'onDelete':_0x02a9('0x10f'),'as':_0x02a9('0x15d')});db['SmsMessage'][_0x02a9('0x118')](db[_0x02a9('0x50')],{'onDelete':_0x02a9('0x10f'),'as':_0x02a9('0x16f'),'foreignKey':_0x02a9('0x182')});db[_0x02a9('0x181')][_0x02a9('0x118')](db[_0x02a9('0x4c')],{'as':'Account','foreignKey':_0x02a9('0x180')});db[_0x02a9('0x53')]['belongsToMany'](db[_0x02a9('0x12')],{'as':'Agents','through':_0x02a9('0x31'),'foreignKey':'SmsQueueId'});db[_0x02a9('0x53')][_0x02a9('0x11c')](db['Team'],{'through':_0x02a9('0x184'),'as':_0x02a9('0x155')});db['OpenchannelAccount'][_0x02a9('0x10d')](db['Disposition'],{'as':_0x02a9('0x176'),'foreignKey':_0x02a9('0x185')});db['OpenchannelAccount'][_0x02a9('0x10d')](db[_0x02a9('0x163')],{'as':_0x02a9('0x186'),'foreignKey':'OpenchannelAccountId'});db[_0x02a9('0x55')][_0x02a9('0x10d')](db[_0x02a9('0x57')],{'as':'Interactions','foreignKey':'OpenchannelAccountId'});db[_0x02a9('0x55')]['hasMany'](db[_0x02a9('0x59')],{'as':_0x02a9('0x158'),'foreignKey':_0x02a9('0x185')});db[_0x02a9('0x55')][_0x02a9('0x10d')](db['OpenchannelApplication'],{'as':'Applications','foreignKey':_0x02a9('0x185')});db[_0x02a9('0x55')][_0x02a9('0x118')](db[_0x02a9('0xf0')],{'as':'List','foreignKey':_0x02a9('0x166')});db[_0x02a9('0x55')]['belongsTo'](db[_0x02a9('0x7d')],{'as':_0x02a9('0x150'),'foreignKey':_0x02a9('0x151')});db[_0x02a9('0x55')][_0x02a9('0x11c')](db['User'],{'as':_0x02a9('0x154'),'through':_0x02a9('0x13a')});db['OpenchannelApplication'][_0x02a9('0x118')](db['User'],{'onDelete':'restrict'});db[_0x02a9('0x187')][_0x02a9('0x118')](db[_0x02a9('0x5b')],{'onDelete':_0x02a9('0x172'),'foreignKey':_0x02a9('0x188')});db[_0x02a9('0x187')][_0x02a9('0x118')](db[_0x02a9('0x55')],{'onDelete':_0x02a9('0x172'),'foreignKey':_0x02a9('0x185')});db['OpenchannelApplication'][_0x02a9('0x118')](db['Interval'],{'onDelete':_0x02a9('0x172'),'foreignKey':'IntervalId'});db[_0x02a9('0x187')][_0x02a9('0x118')](db['Tag'],{'onDelete':_0x02a9('0x172'),'foreignKey':_0x02a9('0x179')});db[_0x02a9('0x57')]['hasMany'](db[_0x02a9('0x59')],{'as':_0x02a9('0x158'),'onDelete':'cascade','foreignKey':'OpenchannelInteractionId'});db['OpenchannelInteraction'][_0x02a9('0x118')](db[_0x02a9('0x55')],{'as':_0x02a9('0x17e'),'foreignKey':_0x02a9('0x185')});db[_0x02a9('0x57')][_0x02a9('0x118')](db[_0x02a9('0x6d')],{'as':_0x02a9('0x15d'),'foreignKey':'ContactId'});db[_0x02a9('0x57')]['belongsTo'](db[_0x02a9('0x12')],{'as':_0x02a9('0x16a'),'foreignKey':_0x02a9('0x10c')});db[_0x02a9('0x57')][_0x02a9('0x11c')](db[_0x02a9('0x85')],{'through':_0x02a9('0x189'),'as':_0x02a9('0x17c')});db[_0x02a9('0x57')][_0x02a9('0x11c')](db['Tag'],{'through':_0x02a9('0x189'),'as':_0x02a9('0x17d')});db['OpenchannelInteraction'][_0x02a9('0x11c')](db[_0x02a9('0x12')],{'as':_0x02a9('0x16c'),'through':_0x02a9('0x125'),'foreignKey':_0x02a9('0x18a')});db[_0x02a9('0x59')][_0x02a9('0x118')](db['User'],{'onDelete':_0x02a9('0x10f'),'as':_0x02a9('0x12')});db[_0x02a9('0x59')][_0x02a9('0x118')](db[_0x02a9('0x6d')],{'onDelete':_0x02a9('0x10f'),'as':_0x02a9('0x15d')});db['OpenchannelMessage'][_0x02a9('0x118')](db['OpenchannelInteraction'],{'onDelete':_0x02a9('0x10f'),'as':_0x02a9('0x16f'),'foreignKey':_0x02a9('0x18a')});db['OpenchannelMessage'][_0x02a9('0x118')](db[_0x02a9('0xe4')],{'as':_0x02a9('0xe4'),'foreignKey':_0x02a9('0x18b')});db['OpenchannelMessage']['belongsTo'](db['OpenchannelAccount'],{'as':_0x02a9('0x17e'),'foreignKey':_0x02a9('0x185')});db['OpenchannelQueue'][_0x02a9('0x11c')](db[_0x02a9('0x12')],{'as':_0x02a9('0x154'),'through':'UserOpenchannelQueue','foreignKey':_0x02a9('0x188')});db[_0x02a9('0x5b')]['belongsToMany'](db[_0x02a9('0xdc')],{'through':_0x02a9('0x18c'),'as':_0x02a9('0x155')});db['ChatWebsite'][_0x02a9('0x10d')](db[_0x02a9('0x175')],{'as':_0x02a9('0x176'),'foreignKey':_0x02a9('0x170')});db[_0x02a9('0x5d')][_0x02a9('0x10d')](db['CannedAnswer'],{'as':_0x02a9('0x186'),'foreignKey':'ChatWebsiteId'});db[_0x02a9('0x5d')]['hasMany'](db[_0x02a9('0x69')],{'as':'ProactiveActions'});db['ChatWebsite'][_0x02a9('0x10d')](db[_0x02a9('0x112')],{'as':_0x02a9('0x165')});db[_0x02a9('0x5d')][_0x02a9('0x10d')](db[_0x02a9('0x61')],{'as':'Applications'});db[_0x02a9('0x5d')][_0x02a9('0x10d')](db[_0x02a9('0x63')],{'as':_0x02a9('0x158')});db['ChatWebsite'][_0x02a9('0x118')](db['CmList'],{'as':'List','foreignKey':_0x02a9('0x166')});db[_0x02a9('0x5d')][_0x02a9('0x118')](db[_0x02a9('0x14e')],{'as':'Interval','foreignKey':_0x02a9('0x14f')});db[_0x02a9('0x5d')][_0x02a9('0x118')](db[_0x02a9('0x37')],{'as':_0x02a9('0x37'),'foreignKey':_0x02a9('0x15f')});db['ChatWebsite'][_0x02a9('0x118')](db[_0x02a9('0x7d')],{'as':'mandatoryDispositionPause','foreignKey':'mandatoryDispositionPauseId'});db['ChatWebsite'][_0x02a9('0x11c')](db[_0x02a9('0x12')],{'as':'Agents','through':'user_has_chat_websites'});db[_0x02a9('0x5f')][_0x02a9('0x118')](db['OpenchannelAccount'],{});db['OpenchannelQueueReport'][_0x02a9('0x118')](db[_0x02a9('0xf0')],{'as':_0x02a9('0x173'),'foreignKey':_0x02a9('0x166')});db[_0x02a9('0x5f')]['belongsTo'](db[_0x02a9('0x6d')],{'as':_0x02a9('0x15d'),'foreignKey':_0x02a9('0x15e')});db[_0x02a9('0x5f')][_0x02a9('0x118')](db[_0x02a9('0x57')],{});db[_0x02a9('0x5f')][_0x02a9('0x118')](db[_0x02a9('0x59')],{});db[_0x02a9('0x5f')]['belongsTo'](db['User'],{});db[_0x02a9('0x5f')][_0x02a9('0x118')](db[_0x02a9('0x5b')],{});db[_0x02a9('0x61')]['belongsTo'](db[_0x02a9('0x12')],{'as':_0x02a9('0x18d'),'foreignKey':_0x02a9('0x10c'),'onDelete':_0x02a9('0x172')});db[_0x02a9('0x61')][_0x02a9('0x118')](db[_0x02a9('0x67')],{'as':_0x02a9('0x18e'),'foreignKey':_0x02a9('0x18f'),'onDelete':_0x02a9('0x172')});db['ChatApplication'][_0x02a9('0x118')](db[_0x02a9('0x5d')],{'as':_0x02a9('0x190'),'foreignKey':_0x02a9('0x170'),'onDelete':'restrict'});db[_0x02a9('0x61')][_0x02a9('0x118')](db[_0x02a9('0x85')],{'onDelete':_0x02a9('0x172'),'foreignKey':_0x02a9('0x179')});db['ChatInteraction'][_0x02a9('0x10d')](db[_0x02a9('0x63')],{'as':_0x02a9('0x158'),'onDelete':_0x02a9('0x10f'),'foreignKey':'ChatInteractionId'});db[_0x02a9('0x112')][_0x02a9('0x118')](db[_0x02a9('0x5d')],{'as':_0x02a9('0x17e'),'foreignKey':_0x02a9('0x170')});db['ChatInteraction'][_0x02a9('0x118')](db['CmContact'],{'as':'Contact','foreignKey':_0x02a9('0x15e')});db[_0x02a9('0x112')]['belongsTo'](db[_0x02a9('0x12')],{'as':_0x02a9('0x16a'),'foreignKey':_0x02a9('0x10c')});db[_0x02a9('0x112')][_0x02a9('0x11c')](db[_0x02a9('0x85')],{'through':'chat_interaction_has_tags','as':_0x02a9('0x17c')});db[_0x02a9('0x112')][_0x02a9('0x11c')](db[_0x02a9('0x85')],{'through':_0x02a9('0x191'),'as':_0x02a9('0x17d')});db['ChatInteraction'][_0x02a9('0x11c')](db[_0x02a9('0x12')],{'as':_0x02a9('0x16c'),'through':'user_has_chat_interactions','foreignKey':_0x02a9('0x192')});db[_0x02a9('0x63')]['belongsTo'](db[_0x02a9('0x12')],{'onDelete':_0x02a9('0x10f'),'as':_0x02a9('0x12')});db['ChatMessage'][_0x02a9('0x118')](db[_0x02a9('0x6d')],{'onDelete':_0x02a9('0x10f'),'as':_0x02a9('0x15d'),'foreignKey':_0x02a9('0x15e')});db['ChatMessage'][_0x02a9('0x118')](db[_0x02a9('0x112')],{'onDelete':_0x02a9('0x10f'),'as':'Interaction','foreignKey':_0x02a9('0x192')});db[_0x02a9('0x63')][_0x02a9('0x118')](db[_0x02a9('0xe4')],{'as':_0x02a9('0xe4'),'foreignKey':'AttachmentId'});db[_0x02a9('0x63')][_0x02a9('0x118')](db['ChatWebsite'],{'as':_0x02a9('0x17e'),'foreignKey':'ChatWebsiteId'});db[_0x02a9('0x65')][_0x02a9('0x10d')](db[_0x02a9('0xe4')],{'as':_0x02a9('0x16e'),'foreignKey':_0x02a9('0x171'),'onDelete':_0x02a9('0x10f'),'hooks':!![]});db[_0x02a9('0x65')]['belongsTo'](db[_0x02a9('0x6d')],{'onDelete':'cascade','as':_0x02a9('0x15d'),'foreignKey':_0x02a9('0x15e')});db[_0x02a9('0x65')][_0x02a9('0x118')](db['ChatWebsite'],{'as':_0x02a9('0x17e'),'foreignKey':_0x02a9('0x170')});db[_0x02a9('0x67')][_0x02a9('0x11c')](db[_0x02a9('0x12')],{'as':'Agents','through':_0x02a9('0x12c'),'hooks':!![]});db[_0x02a9('0x67')][_0x02a9('0x11c')](db[_0x02a9('0xdc')],{'through':'team_has_chat_queues','as':_0x02a9('0x155')});db['ChatGroup']['hasMany'](db[_0x02a9('0xcb')],{'as':_0x02a9('0x158'),'foreignKey':_0x02a9('0x193'),'onDelete':_0x02a9('0x10f')});db[_0x02a9('0x194')][_0x02a9('0x11c')](db[_0x02a9('0x12')],{'as':'Members','through':_0x02a9('0x11b')});db[_0x02a9('0x69')][_0x02a9('0x118')](db['ChatWebsite'],{'as':_0x02a9('0x190'),'foreignKey':_0x02a9('0x170')});db[_0x02a9('0x6b')][_0x02a9('0x10d')](db[_0x02a9('0x6d')],{'as':_0x02a9('0x11d'),'foreignKey':_0x02a9('0x195')});db['CmContact'][_0x02a9('0x10d')](db['CmHopper'],{'as':_0x02a9('0x146'),'foreignKey':_0x02a9('0x15e')});db['CmContact'][_0x02a9('0x10d')](db['CmHopperFinal'],{'as':'HopperFinals','foreignKey':_0x02a9('0x15e')});db[_0x02a9('0x6d')]['hasMany'](db[_0x02a9('0x73')],{'as':_0x02a9('0x196'),'foreignKey':_0x02a9('0x15e')});db[_0x02a9('0x6d')][_0x02a9('0x10d')](db[_0x02a9('0x147')],{'as':_0x02a9('0x147'),'foreignKey':_0x02a9('0x15e')});db[_0x02a9('0x6d')][_0x02a9('0x10d')](db[_0x02a9('0x149')],{'as':_0x02a9('0x14a'),'foreignKey':_0x02a9('0x15e')});db[_0x02a9('0x6d')][_0x02a9('0x10d')](db[_0x02a9('0x57')],{'as':_0x02a9('0x111'),'foreignKey':_0x02a9('0x15e'),'onDelete':'restrict'});db['CmContact'][_0x02a9('0x10d')](db[_0x02a9('0x112')],{'as':_0x02a9('0x113'),'foreignKey':_0x02a9('0x15e'),'onDelete':'restrict'});db['CmContact'][_0x02a9('0x10d')](db[_0x02a9('0x50')],{'as':_0x02a9('0x114'),'foreignKey':_0x02a9('0x15e'),'onDelete':_0x02a9('0x172')});db[_0x02a9('0x6d')][_0x02a9('0x10d')](db[_0x02a9('0x115')],{'as':_0x02a9('0x122'),'foreignKey':'ContactId','onDelete':_0x02a9('0x172')});db[_0x02a9('0x6d')][_0x02a9('0x10d')](db[_0x02a9('0x3b')],{'as':_0x02a9('0x116'),'foreignKey':_0x02a9('0x15e'),'onDelete':'restrict'});db[_0x02a9('0x6d')][_0x02a9('0x118')](db['CmCompany'],{'as':_0x02a9('0x197'),'foreignKey':_0x02a9('0x195')});db['CmContact'][_0x02a9('0x118')](db['CmList'],{'as':_0x02a9('0x173'),'foreignKey':_0x02a9('0x166'),'onDelete':_0x02a9('0x10f')});db[_0x02a9('0x6d')][_0x02a9('0x11c')](db[_0x02a9('0x12')],{'as':_0x02a9('0x16c'),'through':'cm_user_has_contacts'});db[_0x02a9('0x6d')][_0x02a9('0x11c')](db[_0x02a9('0x85')],{'as':_0x02a9('0x17c'),'through':'cm_contact_has_tags'});db[_0x02a9('0x6d')]['belongsToMany'](db[_0x02a9('0x85')],{'through':_0x02a9('0x198'),'as':_0x02a9('0x17d')});db[_0x02a9('0x6f')][_0x02a9('0x118')](db[_0x02a9('0x6d')],{'as':_0x02a9('0x15d'),'foreignKey':'ContactId','onDelete':_0x02a9('0x10f')});db['CmHopper'][_0x02a9('0x118')](db[_0x02a9('0xf0')],{'as':_0x02a9('0x173'),'foreignKey':_0x02a9('0x166'),'onDelete':_0x02a9('0x10f')});db[_0x02a9('0x6f')][_0x02a9('0x118')](db[_0x02a9('0x12')],{'as':_0x02a9('0x18d'),'foreignKey':'UserId'});db[_0x02a9('0x6f')][_0x02a9('0x118')](db[_0x02a9('0x1b')],{'as':_0x02a9('0x18e'),'foreignKey':_0x02a9('0x145'),'onDelete':'cascade'});db[_0x02a9('0x6f')][_0x02a9('0x118')](db[_0x02a9('0xe0')],{'as':'Campaign','foreignKey':_0x02a9('0x199'),'onDelete':'cascade'});db[_0x02a9('0x6f')][_0x02a9('0x118')](db[_0x02a9('0x12')],{'as':_0x02a9('0x16a'),'foreignKey':_0x02a9('0x19a')});db['CmHopperBlack'][_0x02a9('0x118')](db[_0x02a9('0x6d')],{'as':_0x02a9('0x15d'),'foreignKey':_0x02a9('0x15e'),'onDelete':'cascade'});db['CmHopperBlack'][_0x02a9('0x118')](db[_0x02a9('0xf0')],{'as':_0x02a9('0x173'),'foreignKey':_0x02a9('0x166'),'onDelete':_0x02a9('0x10f')});db[_0x02a9('0x70')][_0x02a9('0x118')](db[_0x02a9('0x1b')],{'as':_0x02a9('0x18e'),'foreignKey':'VoiceQueueId','onDelete':_0x02a9('0x10f')});db['CmHopperBlack'][_0x02a9('0x118')](db[_0x02a9('0xe0')],{'as':_0x02a9('0xe0'),'foreignKey':'CampaignId','onDelete':'cascade'});db[_0x02a9('0x78')][_0x02a9('0x10d')](db['Condition'],{'as':{'plural':_0x02a9('0x19b'),'singular':'OneAll'},'foreignKey':'AutomationAllId','onDelete':_0x02a9('0x10f'),'hooks':!![]});db[_0x02a9('0x78')][_0x02a9('0x10d')](db[_0x02a9('0x7c')],{'as':{'plural':'Any','singular':'OneAny'},'foreignKey':'AutomationAnyId','onDelete':'cascade','hooks':!![]});db[_0x02a9('0x78')][_0x02a9('0x10d')](db[_0x02a9('0x76')],{'as':_0x02a9('0x19c'),'foreignKey':_0x02a9('0x19d'),'onDelete':_0x02a9('0x10f'),'hooks':!![]});db[_0x02a9('0x175')][_0x02a9('0x10d')](db['Disposition'],{'as':_0x02a9('0x176'),'foreignKey':_0x02a9('0x19e'),'onDelete':_0x02a9('0x10f')});db[_0x02a9('0x14e')][_0x02a9('0x10d')](db[_0x02a9('0x14e')],{'as':_0x02a9('0x19f'),'foreignKey':_0x02a9('0x14f'),'onDelete':_0x02a9('0x10f'),'hooks':!![],'required':![]});db[_0x02a9('0x14e')][_0x02a9('0x10d')](db[_0x02a9('0x17')],{'as':_0x02a9('0x10e'),'foreignKey':'IntervalId','onDelete':_0x02a9('0x172')});db[_0x02a9('0x14e')][_0x02a9('0x10d')](db[_0x02a9('0x3e')],{'as':'MailApplications','foreignKey':_0x02a9('0x14f')});db[_0x02a9('0x14e')][_0x02a9('0x10d')](db[_0x02a9('0x61')],{'as':_0x02a9('0x1a0'),'foreignKey':_0x02a9('0x14f')});db[_0x02a9('0x14e')][_0x02a9('0x10d')](db[_0x02a9('0x45')],{'as':_0x02a9('0x1a1'),'foreignKey':_0x02a9('0x14f')});db[_0x02a9('0x14e')][_0x02a9('0x10d')](db[_0x02a9('0x4e')],{'as':'SmsApplications','foreignKey':'IntervalId'});db[_0x02a9('0x1a2')][_0x02a9('0x118')](db[_0x02a9('0x37')],{});db[_0x02a9('0x1a2')][_0x02a9('0x118')](db[_0x02a9('0x8e')],{'foreignKey':'DefaultReportId'});db[_0x02a9('0x1a2')][_0x02a9('0x118')](db[_0x02a9('0x1a3')],{'foreignKey':_0x02a9('0x1a4')});db[_0x02a9('0x83')][_0x02a9('0x11c')](db[_0x02a9('0x19')],{'as':_0x02a9('0x1a5'),'through':_0x02a9('0x143'),'onDelete':_0x02a9('0x172')});db[_0x02a9('0x85')]['belongsToMany'](db[_0x02a9('0x6d')],{'through':_0x02a9('0x198')});db[_0x02a9('0x85')]['belongsToMany'](db[_0x02a9('0x112')],{'through':_0x02a9('0x191')});db[_0x02a9('0x85')][_0x02a9('0x11c')](db['MailInteraction'],{'through':_0x02a9('0x16b')});db['Tag'][_0x02a9('0x11c')](db[_0x02a9('0x50')],{'through':_0x02a9('0x183')});db[_0x02a9('0x85')]['belongsToMany'](db[_0x02a9('0x115')],{'through':_0x02a9('0x17b')});db[_0x02a9('0x85')][_0x02a9('0x11c')](db['OpenchannelInteraction'],{'through':_0x02a9('0x189')});db[_0x02a9('0x85')][_0x02a9('0x11c')](db[_0x02a9('0xfd')],{'through':_0x02a9('0x1a6')});db[_0x02a9('0x88')]['hasMany'](db[_0x02a9('0x7c')],{'as':{'plural':'AllConditions','singular':_0x02a9('0x1a7')},'foreignKey':_0x02a9('0x1a8'),'onDelete':_0x02a9('0x10f'),'hooks':!![]});db[_0x02a9('0x88')][_0x02a9('0x10d')](db[_0x02a9('0x7c')],{'as':{'plural':_0x02a9('0x1a9'),'singular':'AnyCondition'},'foreignKey':'TriggerAnyId','onDelete':_0x02a9('0x10f'),'hooks':!![]});db[_0x02a9('0x88')]['hasMany'](db[_0x02a9('0x76')],{'as':'Actions','foreignKey':'TriggerId','onDelete':_0x02a9('0x10f'),'hooks':!![]});db[_0x02a9('0x1a3')]['hasMany'](db[_0x02a9('0x94')],{'as':_0x02a9('0x1aa'),'onDelete':_0x02a9('0x10f'),'foreignKey':_0x02a9('0x1a4'),'hooks':!![]});db[_0x02a9('0x8e')]['hasMany'](db[_0x02a9('0x94')],{'as':_0x02a9('0x1aa'),'onDelete':_0x02a9('0x10f'),'foreignKey':_0x02a9('0x1ab')});db[_0x02a9('0x92')][_0x02a9('0x10d')](db[_0x02a9('0x94')],{'as':_0x02a9('0x1aa'),'onDelete':'cascade','foreignKey':_0x02a9('0x1ac')});db[_0x02a9('0x94')]['belongsTo'](db['AnalyticMetric'],{'foreignKey':_0x02a9('0x1ac')});db['SalesforceAccount']['hasMany'](db[_0x02a9('0x1ad')],{'as':'Configurations','onDelete':_0x02a9('0x10f'),'foreignKey':_0x02a9('0x1ae')});db[_0x02a9('0x1ad')][_0x02a9('0x10d')](db[_0x02a9('0x9b')],{'as':'Subjects','onDelete':_0x02a9('0x10f'),'foreignKey':_0x02a9('0x1af')});db[_0x02a9('0x1ad')][_0x02a9('0x10d')](db['SalesforceField'],{'as':_0x02a9('0x1b0'),'onDelete':_0x02a9('0x10f'),'foreignKey':_0x02a9('0x1b1')});db[_0x02a9('0x1ad')][_0x02a9('0x10d')](db[_0x02a9('0x9b')],{'as':_0x02a9('0x1aa'),'onDelete':_0x02a9('0x10f'),'foreignKey':_0x02a9('0x1b2')});db['SalesforceConfiguration'][_0x02a9('0x118')](db['SalesforceAccount'],{'as':_0x02a9('0x17e'),'foreignKey':'AccountId'});db['SalesforceField'][_0x02a9('0x10d')](db['SalesforceField'],{'as':'Subject','foreignKey':_0x02a9('0x1af')});db['SalesforceField']['hasMany'](db['SalesforceField'],{'as':_0x02a9('0x1b3'),'foreignKey':'DescriptionId'});db[_0x02a9('0x9b')]['hasMany'](db[_0x02a9('0x9b')],{'as':'Field','foreignKey':_0x02a9('0x1b2')});db[_0x02a9('0x9b')][_0x02a9('0x118')](db[_0x02a9('0x8a')],{'as':'Variable','foreignKey':_0x02a9('0x1b4')});db[_0x02a9('0x9c')][_0x02a9('0x10d')](db[_0x02a9('0x9e')],{'as':_0x02a9('0x1b5'),'onDelete':_0x02a9('0x10f'),'foreignKey':_0x02a9('0x1ae')});db['SugarcrmConfiguration'][_0x02a9('0x10d')](db[_0x02a9('0x1b6')],{'as':'Subjects','onDelete':_0x02a9('0x10f'),'foreignKey':_0x02a9('0x1af')});db[_0x02a9('0x9e')]['hasMany'](db[_0x02a9('0x1b6')],{'as':'Descriptions','onDelete':_0x02a9('0x10f'),'foreignKey':_0x02a9('0x1b1')});db[_0x02a9('0x9e')][_0x02a9('0x10d')](db[_0x02a9('0x1b6')],{'as':_0x02a9('0x1aa'),'onDelete':_0x02a9('0x10f'),'foreignKey':'FieldId'});db['SugarcrmConfiguration'][_0x02a9('0x118')](db[_0x02a9('0x9c')],{'as':_0x02a9('0x17e'),'foreignKey':'AccountId'});db[_0x02a9('0x1b6')]['hasMany'](db[_0x02a9('0x1b6')],{'as':_0x02a9('0x1b7'),'foreignKey':_0x02a9('0x1af')});db['SugarcrmField'][_0x02a9('0x10d')](db['SugarcrmField'],{'as':_0x02a9('0x1b3'),'foreignKey':_0x02a9('0x1b1')});db['SugarcrmField'][_0x02a9('0x10d')](db[_0x02a9('0x1b6')],{'as':_0x02a9('0x1b8'),'foreignKey':_0x02a9('0x1b2')});db[_0x02a9('0x1b6')][_0x02a9('0x118')](db[_0x02a9('0x8a')],{'as':_0x02a9('0x8a'),'foreignKey':_0x02a9('0x1b4')});db['DeskAccount'][_0x02a9('0x10d')](db[_0x02a9('0xa2')],{'as':'Configurations','onDelete':_0x02a9('0x10f'),'foreignKey':_0x02a9('0x1ae')});db['DeskConfiguration']['hasMany'](db[_0x02a9('0xa4')],{'as':_0x02a9('0x1b9'),'onDelete':_0x02a9('0x10f'),'foreignKey':_0x02a9('0x1af')});db[_0x02a9('0xa2')][_0x02a9('0x10d')](db[_0x02a9('0xa4')],{'as':_0x02a9('0x1b0'),'onDelete':_0x02a9('0x10f'),'foreignKey':_0x02a9('0x1b1')});db[_0x02a9('0xa2')]['hasMany'](db[_0x02a9('0xa4')],{'as':_0x02a9('0x1aa'),'onDelete':_0x02a9('0x10f'),'foreignKey':_0x02a9('0x1b2')});db[_0x02a9('0xa2')][_0x02a9('0x118')](db[_0x02a9('0xa0')],{'as':_0x02a9('0x17e'),'foreignKey':_0x02a9('0x1ae')});db[_0x02a9('0xa2')][_0x02a9('0x11c')](db[_0x02a9('0x85')],{'through':_0x02a9('0x1ba')});db[_0x02a9('0xa4')][_0x02a9('0x10d')](db[_0x02a9('0xa4')],{'as':_0x02a9('0x1b7'),'foreignKey':'SubjectId'});db['DeskField'][_0x02a9('0x10d')](db[_0x02a9('0xa4')],{'as':_0x02a9('0x1b3'),'foreignKey':_0x02a9('0x1b1')});db[_0x02a9('0xa4')][_0x02a9('0x10d')](db[_0x02a9('0xa4')],{'as':_0x02a9('0x1b8'),'foreignKey':_0x02a9('0x1b2')});db['DeskField'][_0x02a9('0x118')](db[_0x02a9('0x8a')],{'as':_0x02a9('0x8a'),'foreignKey':_0x02a9('0x1b4')});db[_0x02a9('0xa6')][_0x02a9('0x10d')](db[_0x02a9('0x1bb')],{'as':_0x02a9('0x1b5'),'onDelete':_0x02a9('0x10f'),'foreignKey':'AccountId'});db[_0x02a9('0x1bb')][_0x02a9('0x10d')](db[_0x02a9('0xa9')],{'as':_0x02a9('0x1b9'),'onDelete':_0x02a9('0x10f'),'foreignKey':_0x02a9('0x1af')});db['ZohoConfiguration'][_0x02a9('0x10d')](db[_0x02a9('0xa9')],{'as':'Descriptions','onDelete':'cascade','foreignKey':'DescriptionId'});db['ZohoConfiguration'][_0x02a9('0x10d')](db[_0x02a9('0xa9')],{'as':_0x02a9('0x1aa'),'onDelete':_0x02a9('0x10f'),'foreignKey':_0x02a9('0x1b2')});db[_0x02a9('0x1bb')][_0x02a9('0x118')](db['ZohoAccount'],{'as':_0x02a9('0x17e'),'foreignKey':'AccountId'});db[_0x02a9('0xa9')][_0x02a9('0x10d')](db[_0x02a9('0xa9')],{'as':_0x02a9('0x1b7'),'foreignKey':_0x02a9('0x1af')});db['ZohoField'][_0x02a9('0x10d')](db[_0x02a9('0xa9')],{'as':_0x02a9('0x1b3'),'foreignKey':_0x02a9('0x1b1')});db[_0x02a9('0xa9')][_0x02a9('0x10d')](db[_0x02a9('0xa9')],{'as':_0x02a9('0x1b8'),'foreignKey':_0x02a9('0x1b2')});db[_0x02a9('0xa9')]['belongsTo'](db[_0x02a9('0x8a')],{'as':'Variable','foreignKey':_0x02a9('0x1b4')});db[_0x02a9('0xab')][_0x02a9('0x10d')](db[_0x02a9('0xad')],{'as':_0x02a9('0x1b5'),'onDelete':'cascade','foreignKey':_0x02a9('0x1ae')});db[_0x02a9('0xad')][_0x02a9('0x10d')](db[_0x02a9('0xaf')],{'as':'Subjects','foreignKey':'SubjectId'});db[_0x02a9('0xad')]['hasMany'](db[_0x02a9('0xaf')],{'as':_0x02a9('0x1b0'),'foreignKey':_0x02a9('0x1b1')});db[_0x02a9('0xad')][_0x02a9('0x10d')](db[_0x02a9('0xaf')],{'as':_0x02a9('0x1aa'),'foreignKey':_0x02a9('0x1b2')});db[_0x02a9('0xad')][_0x02a9('0x118')](db[_0x02a9('0xab')],{'as':_0x02a9('0x17e'),'foreignKey':_0x02a9('0x1ae')});db[_0x02a9('0xad')][_0x02a9('0x11c')](db['Tag'],{'through':_0x02a9('0x1bc')});db[_0x02a9('0xaf')][_0x02a9('0x10d')](db[_0x02a9('0xaf')],{'as':'Subject','foreignKey':_0x02a9('0x1af')});db[_0x02a9('0xaf')]['hasMany'](db[_0x02a9('0xaf')],{'as':'Description','foreignKey':'DescriptionId'});db[_0x02a9('0xaf')]['hasMany'](db['ZendeskField'],{'as':_0x02a9('0x1b8'),'foreignKey':_0x02a9('0x1b2')});db[_0x02a9('0xaf')][_0x02a9('0x118')](db['Variable'],{'as':_0x02a9('0x8a'),'foreignKey':_0x02a9('0x1b4')});db[_0x02a9('0x1bd')][_0x02a9('0x10d')](db['FreshdeskConfiguration'],{'as':_0x02a9('0x1b5'),'onDelete':_0x02a9('0x10f'),'foreignKey':_0x02a9('0x1ae')});db[_0x02a9('0xb1')]['hasMany'](db['FreshdeskField'],{'as':_0x02a9('0x1b9'),'onDelete':'cascade','foreignKey':_0x02a9('0x1af')});db[_0x02a9('0xb1')][_0x02a9('0x10d')](db[_0x02a9('0x1be')],{'as':_0x02a9('0x1b0'),'onDelete':'cascade','foreignKey':_0x02a9('0x1b1')});db[_0x02a9('0xb1')][_0x02a9('0x10d')](db[_0x02a9('0x1be')],{'as':'Fields','onDelete':_0x02a9('0x10f'),'foreignKey':'FieldId'});db[_0x02a9('0xb1')][_0x02a9('0x118')](db['FreshdeskAccount'],{'as':'Account','foreignKey':_0x02a9('0x1ae')});db[_0x02a9('0xb1')][_0x02a9('0x11c')](db['Tag'],{'through':_0x02a9('0x1bf')});db[_0x02a9('0x1be')]['hasMany'](db[_0x02a9('0x1be')],{'as':_0x02a9('0x1b7'),'foreignKey':_0x02a9('0x1af')});db[_0x02a9('0x1be')]['hasMany'](db[_0x02a9('0x1be')],{'as':_0x02a9('0x1b3'),'foreignKey':_0x02a9('0x1b1')});db[_0x02a9('0x1be')][_0x02a9('0x10d')](db[_0x02a9('0x1be')],{'as':_0x02a9('0x1b8'),'foreignKey':'FieldId'});db[_0x02a9('0x1be')]['belongsTo'](db['Variable'],{'as':_0x02a9('0x8a'),'foreignKey':_0x02a9('0x1b4')});db['VtigerAccount'][_0x02a9('0x10d')](db[_0x02a9('0xb6')],{'as':_0x02a9('0x1b5'),'onDelete':_0x02a9('0x10f'),'foreignKey':'AccountId'});db[_0x02a9('0xb6')]['hasMany'](db[_0x02a9('0xb7')],{'as':_0x02a9('0x1b9'),'foreignKey':_0x02a9('0x1af')});db[_0x02a9('0xb6')][_0x02a9('0x10d')](db['VtigerField'],{'as':_0x02a9('0x1b0'),'foreignKey':_0x02a9('0x1b1')});db[_0x02a9('0xb6')][_0x02a9('0x10d')](db[_0x02a9('0xb7')],{'as':_0x02a9('0x1aa'),'foreignKey':'FieldId'});db[_0x02a9('0xb6')][_0x02a9('0x118')](db[_0x02a9('0xb4')],{'as':_0x02a9('0x17e'),'foreignKey':'AccountId'});db[_0x02a9('0xb7')][_0x02a9('0x10d')](db[_0x02a9('0xb7')],{'as':'Subject','foreignKey':_0x02a9('0x1af')});db[_0x02a9('0xb7')]['hasMany'](db[_0x02a9('0xb7')],{'as':_0x02a9('0x1b3'),'foreignKey':_0x02a9('0x1b1')});db[_0x02a9('0xb7')][_0x02a9('0x10d')](db[_0x02a9('0xb7')],{'as':_0x02a9('0x1b8'),'foreignKey':_0x02a9('0x1b2')});db['VtigerField'][_0x02a9('0x118')](db[_0x02a9('0x8a')],{'as':'Variable','foreignKey':_0x02a9('0x1b4')});db[_0x02a9('0xb9')]['hasMany'](db['ServicenowConfiguration'],{'as':_0x02a9('0x1b5'),'onDelete':'cascade','foreignKey':_0x02a9('0x1ae')});db[_0x02a9('0xbb')]['hasMany'](db[_0x02a9('0xbd')],{'as':_0x02a9('0x1b9'),'foreignKey':_0x02a9('0x1af')});db[_0x02a9('0xbb')]['hasMany'](db['ServicenowField'],{'as':_0x02a9('0x1b0'),'foreignKey':_0x02a9('0x1b1')});db[_0x02a9('0xbb')]['hasMany'](db[_0x02a9('0xbd')],{'as':_0x02a9('0x1aa'),'foreignKey':_0x02a9('0x1b2')});db[_0x02a9('0xbb')][_0x02a9('0x118')](db[_0x02a9('0xb9')],{'as':_0x02a9('0x17e'),'foreignKey':'AccountId'});db[_0x02a9('0xbd')][_0x02a9('0x10d')](db['ServicenowField'],{'as':'Subject','foreignKey':_0x02a9('0x1af')});db[_0x02a9('0xbd')][_0x02a9('0x10d')](db[_0x02a9('0xbd')],{'as':'Description','foreignKey':_0x02a9('0x1b1')});db[_0x02a9('0xbd')][_0x02a9('0x10d')](db[_0x02a9('0xbd')],{'as':_0x02a9('0x1b8'),'foreignKey':_0x02a9('0x1b2')});db[_0x02a9('0xbd')]['belongsTo'](db[_0x02a9('0x8a')],{'as':_0x02a9('0x8a'),'foreignKey':'VariableId'});db[_0x02a9('0x1c0')]['hasMany'](db[_0x02a9('0xc0')],{'as':_0x02a9('0x1b5'),'onDelete':_0x02a9('0x10f'),'foreignKey':_0x02a9('0x1ae')});db[_0x02a9('0xc0')][_0x02a9('0x10d')](db[_0x02a9('0xc1')],{'as':'Subjects','onDelete':_0x02a9('0x10f'),'foreignKey':_0x02a9('0x1af')});db[_0x02a9('0xc0')]['hasMany'](db[_0x02a9('0xc1')],{'as':_0x02a9('0x1b0'),'onDelete':'cascade','foreignKey':_0x02a9('0x1b1')});db['Dynamics365Configuration']['hasMany'](db['Dynamics365Field'],{'as':_0x02a9('0x1aa'),'onDelete':_0x02a9('0x10f'),'foreignKey':_0x02a9('0x1b2')});db[_0x02a9('0xc0')][_0x02a9('0x118')](db[_0x02a9('0x1c0')],{'as':_0x02a9('0x17e'),'foreignKey':_0x02a9('0x1ae')});db['Dynamics365Field'][_0x02a9('0x10d')](db[_0x02a9('0xc1')],{'as':_0x02a9('0x1b7'),'foreignKey':'SubjectId'});db['Dynamics365Field']['hasMany'](db[_0x02a9('0xc1')],{'as':_0x02a9('0x1b3'),'foreignKey':'DescriptionId'});db[_0x02a9('0xc1')][_0x02a9('0x10d')](db[_0x02a9('0xc1')],{'as':_0x02a9('0x1b8'),'foreignKey':'FieldId'});db['Dynamics365Field'][_0x02a9('0x118')](db[_0x02a9('0x8a')],{'as':_0x02a9('0x8a'),'foreignKey':_0x02a9('0x1b4')});db[_0x02a9('0xc3')][_0x02a9('0x10d')](db[_0x02a9('0x1c1')],{'as':_0x02a9('0x1b5'),'onDelete':_0x02a9('0x10f'),'foreignKey':'AccountId'});db[_0x02a9('0x1c1')][_0x02a9('0x10d')](db[_0x02a9('0xc5')],{'as':'Subjects','foreignKey':_0x02a9('0x1af')});db[_0x02a9('0x1c1')][_0x02a9('0x10d')](db[_0x02a9('0xc5')],{'as':_0x02a9('0x1b0'),'foreignKey':'DescriptionId'});db[_0x02a9('0x1c1')][_0x02a9('0x10d')](db[_0x02a9('0xc5')],{'as':'Fields','foreignKey':_0x02a9('0x1b2')});db[_0x02a9('0x1c1')]['belongsTo'](db[_0x02a9('0xc3')],{'as':_0x02a9('0x17e'),'foreignKey':'AccountId'});db[_0x02a9('0xc5')]['hasMany'](db['FreshsalesField'],{'as':'Subject','foreignKey':'SubjectId'});db[_0x02a9('0xc5')][_0x02a9('0x10d')](db[_0x02a9('0xc5')],{'as':_0x02a9('0x1b3'),'foreignKey':_0x02a9('0x1b1')});db['FreshsalesField'][_0x02a9('0x10d')](db[_0x02a9('0xc5')],{'as':'Field','foreignKey':_0x02a9('0x1b2')});db['FreshsalesField'][_0x02a9('0x118')](db[_0x02a9('0x8a')],{'as':_0x02a9('0x8a'),'foreignKey':_0x02a9('0x1b4')});db[_0x02a9('0xc9')][_0x02a9('0x118')](db[_0x02a9('0x5d')],{});db[_0x02a9('0xc9')][_0x02a9('0x118')](db['CmList'],{'as':_0x02a9('0x173'),'foreignKey':_0x02a9('0x166')});db[_0x02a9('0xc9')]['belongsTo'](db['CmContact'],{'as':'Contact','foreignKey':_0x02a9('0x15e')});db[_0x02a9('0xc9')]['belongsTo'](db[_0x02a9('0x112')],{});db['ChatQueueReport'][_0x02a9('0x118')](db[_0x02a9('0x63')],{});db[_0x02a9('0xc9')][_0x02a9('0x118')](db['User'],{});db[_0x02a9('0xc9')][_0x02a9('0x118')](db['ChatQueue'],{});db[_0x02a9('0xcb')]['belongsTo'](db[_0x02a9('0x12')],{'onDelete':_0x02a9('0x10f'),'foreignKey':_0x02a9('0x1c2')});db[_0x02a9('0xcb')][_0x02a9('0x118')](db[_0x02a9('0x12')],{'onDelete':_0x02a9('0x10f'),'foreignKey':_0x02a9('0x1c3')});db[_0x02a9('0x149')]['hasMany'](db[_0x02a9('0xce')],{'foreignKey':_0x02a9('0x1c4'),'onDelete':'cascade'});db[_0x02a9('0x149')][_0x02a9('0x10d')](db[_0x02a9('0x1c5')],{'foreignKey':_0x02a9('0x1c4'),'onDelete':_0x02a9('0x10f')});db[_0x02a9('0x1c6')][_0x02a9('0x118')](db['SmsAccount'],{});db[_0x02a9('0x1c6')][_0x02a9('0x118')](db[_0x02a9('0xf0')],{'as':_0x02a9('0x173'),'foreignKey':_0x02a9('0x166')});db[_0x02a9('0x1c6')][_0x02a9('0x118')](db[_0x02a9('0x6d')],{'as':_0x02a9('0x15d'),'foreignKey':_0x02a9('0x15e')});db[_0x02a9('0x1c6')][_0x02a9('0x118')](db[_0x02a9('0x50')],{});db['SmsQueueReport'][_0x02a9('0x118')](db['SmsMessage'],{});db[_0x02a9('0x1c6')][_0x02a9('0x118')](db['User'],{});db[_0x02a9('0x1c6')][_0x02a9('0x118')](db[_0x02a9('0x53')],{});db[_0x02a9('0xd3')][_0x02a9('0x10d')](db[_0x02a9('0x149')],{'foreignKey':_0x02a9('0x1c7')});db['JscriptyProject'][_0x02a9('0x10d')](db['JscriptyQuestionReport'],{'foreignKey':_0x02a9('0x1c7')});db[_0x02a9('0xd3')][_0x02a9('0x10d')](db['JscriptyAnswerReport'],{'foreignKey':'ProjectId'});db[_0x02a9('0xd8')][_0x02a9('0x11c')](db[_0x02a9('0x12')],{'as':_0x02a9('0x16c'),'through':_0x02a9('0x13e')});db[_0x02a9('0xdc')][_0x02a9('0x11c')](db[_0x02a9('0x12')],{'as':_0x02a9('0x154'),'through':_0x02a9('0x120')});db[_0x02a9('0xdc')][_0x02a9('0x11c')](db[_0x02a9('0x1b')],{'through':_0x02a9('0x108'),'as':_0x02a9('0x128')});db[_0x02a9('0xdc')]['belongsToMany'](db[_0x02a9('0x38')],{'through':'team_has_mail_queues','as':_0x02a9('0x12a')});db[_0x02a9('0xdc')][_0x02a9('0x11c')](db[_0x02a9('0x67')],{'through':_0x02a9('0x1c8'),'as':'ChatQueues'});db['Team'][_0x02a9('0x11c')](db['FaxQueue'],{'through':_0x02a9('0x17f'),'as':'FaxQueues'});db[_0x02a9('0xdc')][_0x02a9('0x11c')](db[_0x02a9('0x53')],{'through':'team_has_sms_queues','as':'SmsQueues'});db[_0x02a9('0xdc')][_0x02a9('0x11c')](db['OpenchannelQueue'],{'through':_0x02a9('0x18c'),'as':_0x02a9('0x1c9')});db[_0x02a9('0xdc')][_0x02a9('0x11c')](db[_0x02a9('0x104')],{'through':_0x02a9('0x1ca'),'as':_0x02a9('0x130')});db['Campaign']['hasMany'](db[_0x02a9('0x6f')],{'as':_0x02a9('0x146'),'foreignKey':_0x02a9('0x199')});db['Campaign'][_0x02a9('0x10d')](db[_0x02a9('0x72')],{'as':'HopperFinals','foreignKey':_0x02a9('0x199')});db[_0x02a9('0xe0')]['hasMany'](db[_0x02a9('0x73')],{'as':'HopperHistories','foreignKey':_0x02a9('0x199')});db[_0x02a9('0xe0')][_0x02a9('0x10d')](db[_0x02a9('0x70')],{'as':'HopperBlacks','foreignKey':_0x02a9('0x199')});db[_0x02a9('0xe0')]['belongsTo'](db[_0x02a9('0x27')],{'as':'Trunk','foreignKey':_0x02a9('0x14b')});db['Campaign'][_0x02a9('0x118')](db[_0x02a9('0x27')],{'as':'TrunkBackup','foreignKey':_0x02a9('0x14d')});db[_0x02a9('0xe0')]['belongsTo'](db[_0x02a9('0x14e')],{'as':'Interval','foreignKey':_0x02a9('0x14f')});db[_0x02a9('0xe0')][_0x02a9('0x118')](db[_0x02a9('0xd8')],{'as':'SquareProject','foreignKey':_0x02a9('0x1cb')});db[_0x02a9('0xe0')][_0x02a9('0x11c')](db[_0x02a9('0xf0')],{'as':_0x02a9('0x152'),'through':_0x02a9('0x1cc')});db[_0x02a9('0xe0')]['belongsToMany'](db[_0x02a9('0xf0')],{'as':_0x02a9('0x156'),'through':_0x02a9('0x1cd')});db['Attachment'][_0x02a9('0x118')](db[_0x02a9('0x65')],{'as':'ChatOfflineMessage','foreignKey':_0x02a9('0x171')});db['MailTransferReport']['belongsTo'](db['MailMessage'],{});db[_0x02a9('0xe8')][_0x02a9('0x118')](db[_0x02a9('0x3b')],{});db[_0x02a9('0xe8')][_0x02a9('0x118')](db['MailAccount'],{'foreignKey':'FromMailAccountId','as':_0x02a9('0x1ce')});db[_0x02a9('0xe8')][_0x02a9('0x118')](db['User'],{'foreignKey':'FromUserId','as':'FromAgent'});db['MailTransferReport'][_0x02a9('0x118')](db['User'],{'foreignKey':_0x02a9('0x1cf'),'as':_0x02a9('0x1d0')});db[_0x02a9('0xe8')][_0x02a9('0x118')](db[_0x02a9('0x38')],{'foreignKey':_0x02a9('0x1d1'),'as':'ToQueue'});db[_0x02a9('0xe8')][_0x02a9('0x118')](db['MailAccount'],{'foreignKey':_0x02a9('0x1d2'),'as':_0x02a9('0x1d3')});db[_0x02a9('0x1d4')]['belongsTo'](db['ChatMessage'],{});db[_0x02a9('0x1d4')]['belongsTo'](db[_0x02a9('0x112')],{});db[_0x02a9('0x1d4')][_0x02a9('0x118')](db[_0x02a9('0x5d')],{'foreignKey':'FromChatWebsiteId','as':_0x02a9('0x1ce')});db['ChatTransferReport'][_0x02a9('0x118')](db[_0x02a9('0x12')],{'foreignKey':_0x02a9('0x1d5'),'as':'FromAgent'});db[_0x02a9('0x1d4')][_0x02a9('0x118')](db[_0x02a9('0x12')],{'foreignKey':_0x02a9('0x1cf'),'as':_0x02a9('0x1d0')});db[_0x02a9('0x1d4')][_0x02a9('0x118')](db[_0x02a9('0x67')],{'foreignKey':_0x02a9('0x1d6'),'as':_0x02a9('0x1d7')});db[_0x02a9('0x1d4')][_0x02a9('0x118')](db[_0x02a9('0x5d')],{'foreignKey':_0x02a9('0x1d8'),'as':_0x02a9('0x1d3')});db['FaxTransferReport'][_0x02a9('0x118')](db['FaxMessage'],{});db['FaxTransferReport'][_0x02a9('0x118')](db[_0x02a9('0x115')],{});db['FaxTransferReport'][_0x02a9('0x118')](db[_0x02a9('0x135')],{'foreignKey':_0x02a9('0x1d9'),'as':_0x02a9('0x1ce')});db[_0x02a9('0xeb')][_0x02a9('0x118')](db['User'],{'foreignKey':_0x02a9('0x1d5'),'as':'FromAgent'});db[_0x02a9('0xeb')][_0x02a9('0x118')](db[_0x02a9('0x12')],{'foreignKey':'ToUserId','as':_0x02a9('0x1d0')});db[_0x02a9('0xeb')]['belongsTo'](db['FaxQueue'],{'foreignKey':_0x02a9('0x1da'),'as':'ToQueue'});db['FaxTransferReport'][_0x02a9('0x118')](db[_0x02a9('0x135')],{'foreignKey':_0x02a9('0x1db'),'as':_0x02a9('0x1d3')});db['OpenchannelTransferReport'][_0x02a9('0x118')](db[_0x02a9('0x59')],{});db[_0x02a9('0x1dc')][_0x02a9('0x118')](db['OpenchannelInteraction'],{});db[_0x02a9('0x1dc')][_0x02a9('0x118')](db['OpenchannelAccount'],{'foreignKey':_0x02a9('0x1dd'),'as':_0x02a9('0x1ce')});db[_0x02a9('0x1dc')][_0x02a9('0x118')](db['User'],{'foreignKey':_0x02a9('0x1d5'),'as':'FromAgent'});db['OpenchannelTransferReport'][_0x02a9('0x118')](db[_0x02a9('0x12')],{'foreignKey':_0x02a9('0x1cf'),'as':_0x02a9('0x1d0')});db[_0x02a9('0x1dc')][_0x02a9('0x118')](db[_0x02a9('0x5b')],{'foreignKey':'ToOpenchannelQueueId','as':_0x02a9('0x1d7')});db[_0x02a9('0x1dc')][_0x02a9('0x118')](db['OpenchannelAccount'],{'foreignKey':'ToOpenchannelAccountId','as':_0x02a9('0x1d3')});db['SmsTransferReport'][_0x02a9('0x118')](db['SmsMessage'],{});db[_0x02a9('0xee')]['belongsTo'](db[_0x02a9('0x50')],{});db['SmsTransferReport'][_0x02a9('0x118')](db[_0x02a9('0x4c')],{'foreignKey':_0x02a9('0x1de'),'as':_0x02a9('0x1ce')});db['SmsTransferReport'][_0x02a9('0x118')](db[_0x02a9('0x12')],{'foreignKey':_0x02a9('0x1d5'),'as':_0x02a9('0x1df')});db[_0x02a9('0xee')][_0x02a9('0x118')](db[_0x02a9('0x12')],{'foreignKey':_0x02a9('0x1cf'),'as':_0x02a9('0x1d0')});db[_0x02a9('0xee')][_0x02a9('0x118')](db[_0x02a9('0x53')],{'foreignKey':'ToSmsQueueId','as':_0x02a9('0x1d7')});db[_0x02a9('0xee')][_0x02a9('0x118')](db[_0x02a9('0x4c')],{'foreignKey':_0x02a9('0x1e0'),'as':_0x02a9('0x1d3')});db[_0x02a9('0xf0')][_0x02a9('0x10d')](db[_0x02a9('0x175')],{'as':_0x02a9('0x176'),'foreignKey':_0x02a9('0x166')});db['CmList'][_0x02a9('0x10d')](db[_0x02a9('0x74')],{'as':_0x02a9('0x1e1'),'foreignKey':'ListId'});db[_0x02a9('0xf0')][_0x02a9('0x10d')](db[_0x02a9('0x6d')],{'as':'Contacts','onDelete':_0x02a9('0x10f'),'foreignKey':_0x02a9('0x166')});db['CmList'][_0x02a9('0x10d')](db[_0x02a9('0x72')],{'as':'HopperFinals','foreignKey':_0x02a9('0x166')});db[_0x02a9('0xf0')]['hasMany'](db[_0x02a9('0x73')],{'as':_0x02a9('0x1e2'),'foreignKey':_0x02a9('0x166')});db[_0x02a9('0xf0')][_0x02a9('0x10d')](db[_0x02a9('0x147')],{'as':_0x02a9('0x147'),'foreignKey':_0x02a9('0x166')});db[_0x02a9('0xf0')][_0x02a9('0x11c')](db[_0x02a9('0x1b')],{'as':_0x02a9('0x1e3'),'through':_0x02a9('0x153')});db[_0x02a9('0xf0')][_0x02a9('0x11c')](db['User'],{'as':_0x02a9('0x154'),'through':_0x02a9('0x11f')});db[_0x02a9('0x131')]['hasMany'](db[_0x02a9('0x17')],{'as':_0x02a9('0x10e'),'onDelete':_0x02a9('0x10f')});db[_0x02a9('0x131')]['belongsToMany'](db[_0x02a9('0x12')],{'as':_0x02a9('0x154'),'through':'user_has_voice_prefixes'});db['UserProfile'][_0x02a9('0x10d')](db[_0x02a9('0x12')],{'as':'Users','foreignKey':'userProfileId'});db[_0x02a9('0xf3')][_0x02a9('0x10d')](db[_0x02a9('0xf5')],{'as':_0x02a9('0x1e4'),'foreignKey':_0x02a9('0x119'),'onDelete':_0x02a9('0x10f')});db[_0x02a9('0xf5')][_0x02a9('0x10d')](db[_0x02a9('0xf7')],{'as':_0x02a9('0x1e5'),'foreignKey':_0x02a9('0x1e6'),'onDelete':'cascade'});db[_0x02a9('0xfa')][_0x02a9('0x10d')](db[_0x02a9('0x175')],{'as':_0x02a9('0x176'),'foreignKey':_0x02a9('0x1e7')});db['WhatsappAccount'][_0x02a9('0x10d')](db[_0x02a9('0x163')],{'as':_0x02a9('0x186'),'foreignKey':'WhatsappAccountId'});db[_0x02a9('0xfa')][_0x02a9('0x10d')](db[_0x02a9('0xff')],{'as':_0x02a9('0x158'),'foreignKey':_0x02a9('0x1e7')});db['WhatsappAccount'][_0x02a9('0x10d')](db[_0x02a9('0xfd')],{'as':_0x02a9('0x165')});db['WhatsappAccount'][_0x02a9('0x10d')](db['WhatsappApplication'],{'as':'Applications'});db[_0x02a9('0xfa')][_0x02a9('0x118')](db['CmList'],{'as':'List','foreignKey':_0x02a9('0x166')});db['WhatsappAccount'][_0x02a9('0x118')](db['Pause'],{'as':'mandatoryDispositionPause','foreignKey':'mandatoryDispositionPauseId'});db[_0x02a9('0xfa')][_0x02a9('0x11c')](db['User'],{'as':_0x02a9('0x154'),'through':'user_has_whatsapp_accounts'});db[_0x02a9('0xfb')]['belongsTo'](db[_0x02a9('0x12')],{'onDelete':_0x02a9('0x172')});db['WhatsappApplication'][_0x02a9('0x118')](db[_0x02a9('0x104')],{'onDelete':_0x02a9('0x172')});db['WhatsappApplication'][_0x02a9('0x118')](db['WhatsappAccount'],{'onDelete':'restrict'});db['WhatsappApplication']['belongsTo'](db[_0x02a9('0x14e')],{'onDelete':_0x02a9('0x172'),'foreignKey':_0x02a9('0x14f')});db[_0x02a9('0xfb')][_0x02a9('0x118')](db[_0x02a9('0x85')],{'onDelete':_0x02a9('0x172'),'foreignKey':_0x02a9('0x179')});db[_0x02a9('0xfd')][_0x02a9('0x10d')](db[_0x02a9('0xff')],{'as':_0x02a9('0x158'),'onDelete':_0x02a9('0x10f'),'foreignKey':_0x02a9('0x1e8')});db['WhatsappInteraction'][_0x02a9('0x118')](db[_0x02a9('0xfa')],{'as':_0x02a9('0x17e'),'foreignKey':'WhatsappAccountId'});db['WhatsappInteraction'][_0x02a9('0x118')](db[_0x02a9('0x6d')],{'as':_0x02a9('0x15d'),'foreignKey':_0x02a9('0x15e')});db[_0x02a9('0xfd')]['belongsTo'](db['User'],{'as':_0x02a9('0x16a'),'foreignKey':_0x02a9('0x10c')});db[_0x02a9('0xfd')]['belongsToMany'](db[_0x02a9('0x85')],{'through':'whatsapp_interaction_has_tags','as':'Tags'});db[_0x02a9('0xfd')]['belongsToMany'](db['Tag'],{'through':_0x02a9('0x1a6'),'as':_0x02a9('0x17d')});db[_0x02a9('0xfd')]['belongsToMany'](db[_0x02a9('0x12')],{'as':_0x02a9('0x16c'),'through':_0x02a9('0x127'),'foreignKey':_0x02a9('0x1e8')});db[_0x02a9('0xff')]['belongsTo'](db[_0x02a9('0x12')],{'as':_0x02a9('0x12')});db[_0x02a9('0xff')]['belongsTo'](db[_0x02a9('0x6d')],{'onDelete':_0x02a9('0x10f'),'as':_0x02a9('0x15d')});db[_0x02a9('0xff')]['belongsTo'](db[_0x02a9('0xfd')],{'onDelete':_0x02a9('0x10f'),'as':_0x02a9('0x16f'),'foreignKey':_0x02a9('0x1e8')});db[_0x02a9('0xff')][_0x02a9('0x118')](db[_0x02a9('0xfa')],{'as':'Account','foreignKey':_0x02a9('0x1e7')});db[_0x02a9('0x100')][_0x02a9('0x118')](db['WhatsappAccount'],{});db[_0x02a9('0x100')]['belongsTo'](db[_0x02a9('0xf0')],{'as':_0x02a9('0x173'),'foreignKey':_0x02a9('0x166')});db[_0x02a9('0x100')][_0x02a9('0x118')](db[_0x02a9('0x6d')],{'as':_0x02a9('0x15d'),'foreignKey':_0x02a9('0x15e')});db[_0x02a9('0x100')][_0x02a9('0x118')](db['WhatsappInteraction'],{});db[_0x02a9('0x100')][_0x02a9('0x118')](db[_0x02a9('0x104')],{});db['WhatsappQueueReport'][_0x02a9('0x118')](db[_0x02a9('0xff')],{});db[_0x02a9('0x100')][_0x02a9('0x118')](db[_0x02a9('0x12')],{});db['WhatsappTransferReport']['belongsTo'](db[_0x02a9('0xff')],{});db[_0x02a9('0x102')][_0x02a9('0x118')](db[_0x02a9('0xfd')],{});db[_0x02a9('0x102')][_0x02a9('0x118')](db[_0x02a9('0xfa')],{'foreignKey':_0x02a9('0x1e9'),'as':'FromAccount'});db['WhatsappTransferReport'][_0x02a9('0x118')](db[_0x02a9('0xfa')],{'foreignKey':_0x02a9('0x1ea'),'as':_0x02a9('0x1d3')});db['WhatsappTransferReport']['belongsTo'](db[_0x02a9('0x104')],{'foreignKey':'ToQueueId','as':'ToQueue'});db['WhatsappTransferReport'][_0x02a9('0x118')](db['User'],{'foreignKey':'FromUserId','as':_0x02a9('0x1df')});db['WhatsappTransferReport']['belongsTo'](db[_0x02a9('0x12')],{'foreignKey':_0x02a9('0x1cf'),'as':_0x02a9('0x1d0')});db[_0x02a9('0x104')]['belongsToMany'](db['User'],{'as':_0x02a9('0x154'),'through':_0x02a9('0x33'),'foreignKey':_0x02a9('0x1eb')});db['WhatsappQueue'][_0x02a9('0x11c')](db[_0x02a9('0xdc')],{'through':'team_has_whatsapp_queues','as':_0x02a9('0x155')});module[_0x02a9('0x1ec')]={'db':db,'dbH':dbH}; \ No newline at end of file +var _0x0cf9=['UserSmsQueue','UserOpenchannelQueue','../api/userWhatsappQueue/userWhatsappQueue.model','../api/mailServerIn/mailServerIn.model','MailServerOut','../api/mailServerOut/mailServerOut.model','MailAccount','../api/mailAccount/mailAccount.model','MailQueue','../api/mailQueue/mailQueue.model','MailSubstatus','../api/mailSubstatus/mailSubstatus.model','../api/mailMessage/mailMessage.model','MailApplication','../api/mailApplication/mailApplication.model','MailQueueReport','../api/mailQueueReport/mailQueueReport.model','Dashboard','../api/dashboard/dashboard.model','DashboardItem','../api/dashboardItem/dashboardItem.model','FaxAccount','../api/faxAccount/faxAccount.model','FaxInteraction','FaxMessage','../api/faxMessage/faxMessage.model','FaxQueueReport','SmsAccount','../api/smsAccount/smsAccount.model','SmsApplication','SmsInteraction','../api/smsInteraction/smsInteraction.model','SmsMessage','../api/smsMessage/smsMessage.model','SmsQueue','../api/smsQueue/smsQueue.model','OpenchannelAccount','../api/openchannelApplication/openchannelApplication.model','../api/openchannelInteraction/openchannelInteraction.model','OpenchannelMessage','../api/openchannelMessage/openchannelMessage.model','OpenchannelQueue','ChatWebsite','../api/chatWebsite/chatWebsite.model','OpenchannelQueueReport','ChatApplication','../api/chatApplication/chatApplication.model','ChatInteraction','../api/chatInteraction/chatInteraction.model','ChatMessage','ChatOfflineMessage','../api/chatOfflineMessage/chatOfflineMessage.model','ChatQueue','../api/chatQueue/chatQueue.model','../api/chatGroup/chatGroup.model','../api/chatProactiveAction/chatProactiveAction.model','../api/cmCompany/cmCompany.model','CmContact','CmHopper','../api/cmHopper/cmHopper.model','CmHopperBlack','../api/cmHopperBlack/cmHopperBlack.model','../api/cmHopperFinal/cmHopperFinal.model','CmHopperHistory','../api/cmHopperHistory/cmHopperHistory.model','ReportAgentPreview','../api/cmCustomField/cmCustomField.model','Action','../api/action/action.model','Automation','../api/automation/automation.model','CannedAnswer','../api/cannedAnswer/cannedAnswer.model','Disposition','../api/disposition/disposition.model','../api/condition/condition.model','Interval','../api/interval/interval.model','Pause','../api/cdr/cdr.model','VoiceQueuesLog','../api/schedule/schedule.model','Sound','../api/sound/sound.model','Tag','../api/tag/tag.model','../api/template/template.model','../api/trigger/trigger.model','Variable','../api/variable/variable.model','Integration','../api/integration/integration.model','IntegrationReport','../api/integrationReport/integrationReport.model','AnalyticCustomReport','../api/analyticCustomReport/analyticCustomReport.model','AnalyticDefaultReport','../api/analyticDefaultReport/analyticDefaultReport.model','AnalyticExtractedReport','../api/analyticExtractedReport/analyticExtractedReport.model','AnalyticMetric','../api/analyticMetric/analyticMetric.model','AnalyticFieldReport','../api/analyticFieldReport/analyticFieldReport.model','AnalyticTreeReport','../api/analyticTreeReport/analyticTreeReport.model','SalesforceAccount','SalesforceConfiguration','../api/intSalesforceConfiguration/intSalesforceConfiguration.model','SalesforceField','../api/intSalesforceField/intSalesforceField.model','SugarcrmAccount','../api/intSugarcrmAccount/intSugarcrmAccount.model','SugarcrmConfiguration','../api/intSugarcrmConfiguration/intSugarcrmConfiguration.model','SugarcrmField','../api/intSugarcrmField/intSugarcrmField.model','DeskAccount','DeskConfiguration','../api/intDeskConfiguration/intDeskConfiguration.model','../api/intDeskField/intDeskField.model','ZohoAccount','ZohoConfiguration','../api/intZohoConfiguration/intZohoConfiguration.model','ZohoField','ZendeskAccount','../api/intZendeskAccount/intZendeskAccount.model','ZendeskConfiguration','../api/intZendeskConfiguration/intZendeskConfiguration.model','../api/intZendeskField/intZendeskField.model','FreshdeskAccount','../api/intFreshdeskAccount/intFreshdeskAccount.model','FreshdeskConfiguration','../api/intFreshdeskConfiguration/intFreshdeskConfiguration.model','../api/intFreshdeskField/intFreshdeskField.model','VtigerAccount','../api/intVtigerAccount/intVtigerAccount.model','VtigerConfiguration','../api/intVtigerConfiguration/intVtigerConfiguration.model','VtigerField','../api/intVtigerField/intVtigerField.model','ServicenowConfiguration','../api/intServicenowConfiguration/intServicenowConfiguration.model','../api/intServicenowField/intServicenowField.model','../api/intDynamics365Configuration/intDynamics365Configuration.model','Dynamics365Field','../api/intDynamics365Field/intDynamics365Field.model','../api/intFreshsalesAccount/intFreshsalesAccount.model','FreshsalesConfiguration','../api/intFreshsalesConfiguration/intFreshsalesConfiguration.model','FreshsalesField','../api/intFreshsalesField/intFreshsalesField.model','Network','ChatQueueReport','../api/chatQueueReport/chatQueueReport.model','ChatInternalMessage','../api/chatInternalMessage/chatInternalMessage.model','../api/jscriptyAnswerReport/jscriptyAnswerReport.model','../api/jscriptyQuestionReport/jscriptyQuestionReport.model','SmsQueueReport','../api/smsQueueReport/smsQueueReport.model','SquareReport','../api/squareReport/squareReport.model','../api/squareReportDetail/squareReportDetail.model','JscriptyProject','../api/jscriptyProject/jscriptyProject.model','../api/setting/setting.model','SquareOdbc','../api/squareOdbc/squareOdbc.model','SquareRecording','../api/squareRecording/squareRecording.model','../api/squareMessage/squareMessage.model','Team','../api/team/team.model','License','../api/campaign/campaign.model','Migration','Attachment','Plugin','../api/plugin/plugin.model','../api/mailTransferReport/mailTransferReport.model','ChatTransferReport','../api/chatTransferReport/chatTransferReport.model','FaxTransferReport','../api/faxTransferReport/faxTransferReport.model','OpenchannelTransferReport','../api/openchannelTransferReport/openchannelTransferReport.model','../api/smsTransferReport/smsTransferReport.model','CmList','../api/cmList/cmList.model','VoicePrefix','../api/voicePrefix/voicePrefix.model','UserProfile','../api/userProfile/userProfile.model','UserProfileSection','../api/userProfileSection/userProfileSection.model','UserProfileResource','UserNotification','WhatsappAccount','../api/whatsappAccount/whatsappAccount.model','WhatsappApplication','../api/whatsappApplication/whatsappApplication.model','WhatsappInteraction','../api/whatsappInteraction/whatsappInteraction.model','WhatsappMessage','../api/whatsappMessage/whatsappMessage.model','WhatsappQueueReport','../api/whatsappQueueReport/whatsappQueueReport.model','WhatsappTransferReport','WhatsappQueue','../api/whatsappQueue/whatsappQueue.model','CloudProvider','../api/cloudProvider/cloudProvider.model','TeamVoiceQueue','../api/teamVoiceQueue/teamVoiceQueue.model','hasOne','hasMany','VoiceRecording','UserId','VoiceQueuesRt','Extensions','cascade','CmHopperFinal','HopperFinals','HopperHistory','OpenchannelInteraction','OpenchannelInteractions','SmsInteractions','FaxInteractions','MailInteraction','UserNotifications','SenderId','belongsTo','belongsToMany','ChatGroup','chat_group_has_users','Contacts','cm_user_has_contacts','Lists','cm_user_has_lists','user_has_teams','MailInteractions','user_has_mail_interactions','ChatInteractions','user_has_sms_interactions','user_has_openchannel_interactions','user_has_whatsapp_interactions','VoiceQueue','VoiceQueues','ChatQueues','FaxQueues','SmsQueues','WhatsappQueues','UserWhatsappQueue','VoicePrefixes','user_has_voice_prefixes','ChatWebsites','FaxAccounts','user_has_fax_accounts','MailAccounts','user_has_mail_accounts','OpenchannelAccounts','user_has_openchannel_accounts','WhatsappAccounts','user_has_whatsapp_accounts','SquareProject','SquareProjects','VoiceChanSpy','SpiedAgents','ChanSpyId','Applications','Sounds','moh_has_sounds','UserVoiceQueueRt','VoiceQueueId','HopperHistories','JscriptySessionReport','TrunkId','TrunkBackup','IntervalId','mandatoryDispositionPause','mandatoryDispositionPauseId','voice_queues_has_cm_lists','BlackLists','Messages','mailboxuser','mailbox','uniqueid','VoiceAgentReport','AgentReports','MailServerIn','Imap','Smtp','MailAccountId','MailMessage','Interactions','ListId','Template','TemplateId','Agents','team_has_mail_queues','MailInteractionId','Account','ContactId','Owner','mail_interaction_has_tags','Tags','ThroughTags','Attachments','Contact','Interaction','ChatWebsiteId','ChatOfflineMessageId','restrict','TagId','List','Items','Dispositions','FaxAccountId','FaxApplication','Exntensions','FaxQueue','FaxInteractionId','fax_interaction_has_tags','Users','user_has_fax_interactions','AttachmentId','Teams','SmsAccountId','Answers','user_has_sms_accounts','SmsInteractionId','sms_interaction_has_tags','SmsQueueId','team_has_sms_queues','OpenchannelAccountId','OpenchannelApplication','OpenchannelInteractionId','openchannel_interaction_has_tags','team_has_openchannel_queues','ChatProactiveAction','ProactiveActions','user_has_chat_websites','Agent','Queue','chat_interaction_has_tags','user_has_chat_interactions','ChatInteractionId','ChatGroupId','CmCompany','CompanyId','Hoppers','JscriptySessions','Company','cm_contact_has_tags','Campaign','Condition','All','OneAll','AutomationAllId','AutomationAnyId','Actions','Intervals','MailApplications','ChatApplications','FaxApplications','SmsApplications','Schedule','DefaultReportId','CustomReportId','Mohs','AllConditions','AllCondition','TriggerAllId','Trigger','AnyConditions','AnyCondition','TriggerAnyId','TriggerId','Fields','MetricId','Configurations','Subjects','Descriptions','DescriptionId','FieldId','Subject','Description','VariableId','SubjectId','AccountId','Field','DeskField','int_desk_configuration_has_tags','ZendeskField','int_zendesk_configuration_has_tags','FreshdeskField','int_freshdesk_configuration_has_tags','ServicenowField','ServicenowAccount','Dynamics365Configuration','Dynamics365Account','FreshsalesAccount','FromId','ToId','JscriptyQuestionReport','JscriptyAnswerReport','ProjectId','user_has_square_projects','MailQueues','team_has_fax_queues','OpenchannelQueues','CampaignId','HopperBlacks','TrunkBackupId','SquareProjectId','campaigns_has_cm_lists','campaigns_has_cm_blacklists','MailTransferReport','FromMailAccountId','FromAccount','FromAgent','ToUserId','ToMailQueueId','ToQueue','ToMailAccountId','ToAccount','FromChatWebsiteId','FromUserId','ToAgent','ToChatQueueId','FromFaxAccountId','ToFaxQueueId','FromOpenchannelAccountId','ToOpenchannelQueueId','ToOpenchannelAccountId','SmsTransferReport','FromSmsAccountId','ToSmsQueueId','CmCustomField','CustomFields','userProfileId','Resources','sectionId','WhatsappAccountId','WhatsappInteractionId','whatsapp_interaction_has_tags','FromWhatsappAccountId','ToQueueId','WhatsappQueueId','team_has_whatsapp_queues','path','sequelize','lodash','jstz','defaultsDeep','motion2','127.0.0.1','mysql','utf8mb4','name','utf8','utf8_general_ci','xcall','xC@LL1234','username','password','options','sequelizeHistory','User','import','../api/user/user.model','../api/voiceContext/voiceContext.model','VoiceExtension','VoiceMusicOnHold','../api/voiceMusicOnHold/voiceMusicOnHold.model','../api/voiceQueue/voiceQueue.model','../api/voiceRecording/voiceRecording.model','ScreenRecording','../api/screenRecording/screenRecording.model','VoiceMail','../api/voiceMail/voiceMail.model','VoiceMailMessage','VoiceCallReport','../api/voiceCallReport/voiceCallReport.model','VoiceDialReport','../api/voiceAgentReport/voiceAgentReport.model','VoiceQueueReport','../api/voiceQueueReport/voiceQueueReport.model','MemberReport','../api/memberReport/memberReport.model','Trunk','../api/trunk/trunk.model','VoiceTransferReport','../api/voiceTransferReport/voiceTransferReport.model','UserVoiceQueue','../api/userVoiceQueue/userVoiceQueue.model','UserChatQueue','UserMailQueue','UserFaxQueue','../api/userFaxQueue/userFaxQueue.model'];(function(_0x254b7d,_0x13c2f1){var _0x5c6ece=function(_0x1bb506){while(--_0x1bb506){_0x254b7d['push'](_0x254b7d['shift']());}};_0x5c6ece(++_0x13c2f1);}(_0x0cf9,0x1c3));var _0x90cf=function(_0x34bd34,_0x1444f7){_0x34bd34=_0x34bd34-0x0;var _0x4e36d6=_0x0cf9[_0x34bd34];return _0x4e36d6;};'use strict';var path=require(_0x90cf('0x0'));var config=require('../config/environment');var Sequelize=require(_0x90cf('0x1'));var _=require(_0x90cf('0x2'));var jstz=require(_0x90cf('0x3'));var timezone=jstz['determine']();config['sequelize']=_[_0x90cf('0x4')](config[_0x90cf('0x1')],{'database':_0x90cf('0x5'),'username':'xcall','password':'xC@LL1234','options':{'host':_0x90cf('0x6'),'port':0xcea,'dialect':_0x90cf('0x7'),'dialectOptions':{'charset':_0x90cf('0x8')},'logging':![],'timezone':timezone[_0x90cf('0x9')](),'define':{'charset':_0x90cf('0xa'),'collate':_0x90cf('0xb')}}});config['sequelizeHistory']=_[_0x90cf('0x4')](config['sequelizeHistory'],{'database':'motion2','username':_0x90cf('0xc'),'password':_0x90cf('0xd'),'options':{'host':_0x90cf('0x6'),'port':0xcea,'dialect':_0x90cf('0x7'),'dialectOptions':{'charset':_0x90cf('0x8')},'logging':![],'timezone':timezone[_0x90cf('0x9')](),'define':{'charset':'utf8','collate':_0x90cf('0xb')}}});var db={'Sequelize':Sequelize,'sequelize':new Sequelize(config['sequelize']['database'],config[_0x90cf('0x1')][_0x90cf('0xe')],config[_0x90cf('0x1')][_0x90cf('0xf')],config[_0x90cf('0x1')][_0x90cf('0x10')])};var dbH={'Sequelize':Sequelize,'sequelize':new Sequelize(config[_0x90cf('0x11')]['database'],config[_0x90cf('0x11')][_0x90cf('0xe')],config['sequelizeHistory'][_0x90cf('0xf')],config['sequelizeHistory'][_0x90cf('0x10')])};db[_0x90cf('0x12')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x14'));db['VoiceChanSpy']=db['sequelize'][_0x90cf('0x13')]('../api/voiceChanSpy/voiceChanSpy.model');db['VoiceContext']=db[_0x90cf('0x1')]['import'](_0x90cf('0x15'));db[_0x90cf('0x16')]=db[_0x90cf('0x1')][_0x90cf('0x13')]('../api/voiceExtension/voiceExtension.model');db[_0x90cf('0x17')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x18'));db['VoiceQueue']=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x19'));db['VoiceRecording']=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x1a'));db[_0x90cf('0x1b')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x1c'));db[_0x90cf('0x1d')]=db['sequelize'][_0x90cf('0x13')](_0x90cf('0x1e'));db[_0x90cf('0x1f')]=db[_0x90cf('0x1')][_0x90cf('0x13')]('../api/voiceMailMessage/voiceMailMessage.model');db[_0x90cf('0x20')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x21'));db[_0x90cf('0x22')]=db[_0x90cf('0x1')][_0x90cf('0x13')]('../api/voiceDialReport/voiceDialReport.model');db['VoiceAgentReport']=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x23'));db[_0x90cf('0x24')]=db[_0x90cf('0x1')]['import'](_0x90cf('0x25'));db[_0x90cf('0x26')]=db[_0x90cf('0x1')]['import'](_0x90cf('0x27'));db[_0x90cf('0x28')]=db['sequelize']['import'](_0x90cf('0x29'));db[_0x90cf('0x2a')]=db['sequelize'][_0x90cf('0x13')](_0x90cf('0x2b'));db['UserVoiceQueueRt']=db[_0x90cf('0x1')][_0x90cf('0x13')]('../api/userVoiceQueueRt/userVoiceQueueRt.model');db[_0x90cf('0x2c')]=db[_0x90cf('0x1')]['import'](_0x90cf('0x2d'));db[_0x90cf('0x2e')]=db[_0x90cf('0x1')][_0x90cf('0x13')]('../api/userChatQueue/userChatQueue.model');db[_0x90cf('0x2f')]=db['sequelize'][_0x90cf('0x13')]('../api/userMailQueue/userMailQueue.model');db[_0x90cf('0x30')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x31'));db[_0x90cf('0x32')]=db['sequelize'][_0x90cf('0x13')]('../api/userSmsQueue/userSmsQueue.model');db[_0x90cf('0x33')]=db[_0x90cf('0x1')][_0x90cf('0x13')]('../api/userOpenchannelQueue/userOpenchannelQueue.model');db['UserWhatsappQueue']=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x34'));db['MailServerIn']=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x35'));db[_0x90cf('0x36')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x37'));db[_0x90cf('0x38')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x39'));db[_0x90cf('0x3a')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x3b'));db[_0x90cf('0x3c')]=db['sequelize'][_0x90cf('0x13')](_0x90cf('0x3d'));db['MailInteraction']=db[_0x90cf('0x1')]['import']('../api/mailInteraction/mailInteraction.model');db['MailMessage']=db['sequelize'][_0x90cf('0x13')](_0x90cf('0x3e'));db[_0x90cf('0x3f')]=db[_0x90cf('0x1')]['import'](_0x90cf('0x40'));db[_0x90cf('0x41')]=db[_0x90cf('0x1')]['import'](_0x90cf('0x42'));db[_0x90cf('0x43')]=db[_0x90cf('0x1')]['import'](_0x90cf('0x44'));db[_0x90cf('0x45')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x46'));db[_0x90cf('0x47')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x48'));db['FaxApplication']=db[_0x90cf('0x1')][_0x90cf('0x13')]('../api/faxApplication/faxApplication.model');db[_0x90cf('0x49')]=db['sequelize'][_0x90cf('0x13')]('../api/faxInteraction/faxInteraction.model');db[_0x90cf('0x4a')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x4b'));db['FaxQueue']=db[_0x90cf('0x1')][_0x90cf('0x13')]('../api/faxQueue/faxQueue.model');db[_0x90cf('0x4c')]=db[_0x90cf('0x1')][_0x90cf('0x13')]('../api/faxQueueReport/faxQueueReport.model');db[_0x90cf('0x4d')]=db[_0x90cf('0x1')]['import'](_0x90cf('0x4e'));db[_0x90cf('0x4f')]=db[_0x90cf('0x1')][_0x90cf('0x13')]('../api/smsApplication/smsApplication.model');db[_0x90cf('0x50')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x51'));db[_0x90cf('0x52')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x53'));db[_0x90cf('0x54')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x55'));db[_0x90cf('0x56')]=db[_0x90cf('0x1')][_0x90cf('0x13')]('../api/openchannelAccount/openchannelAccount.model');db['OpenchannelApplication']=db[_0x90cf('0x1')]['import'](_0x90cf('0x57'));db['OpenchannelInteraction']=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x58'));db[_0x90cf('0x59')]=db['sequelize'][_0x90cf('0x13')](_0x90cf('0x5a'));db[_0x90cf('0x5b')]=db[_0x90cf('0x1')]['import']('../api/openchannelQueue/openchannelQueue.model');db[_0x90cf('0x5c')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x5d'));db[_0x90cf('0x5e')]=db[_0x90cf('0x1')][_0x90cf('0x13')]('../api/openchannelQueueReport/openchannelQueueReport.model');db[_0x90cf('0x5f')]=db[_0x90cf('0x1')]['import'](_0x90cf('0x60'));db[_0x90cf('0x61')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x62'));db[_0x90cf('0x63')]=db[_0x90cf('0x1')][_0x90cf('0x13')]('../api/chatMessage/chatMessage.model');db[_0x90cf('0x64')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x65'));db[_0x90cf('0x66')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x67'));db['ChatGroup']=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x68'));db['ChatProactiveAction']=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x69'));db['CmCompany']=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x6a'));db[_0x90cf('0x6b')]=db[_0x90cf('0x1')]['import']('../api/cmContact/cmContact.model');db[_0x90cf('0x6c')]=db['sequelize'][_0x90cf('0x13')](_0x90cf('0x6d'));db[_0x90cf('0x6e')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x6f'));db['CmHopperFinal']=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x70'));db[_0x90cf('0x71')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x72'));db[_0x90cf('0x73')]=db[_0x90cf('0x1')]['import']('../api/reportAgentPreview/reportAgentPreview.model');db['CmCustomField']=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x74'));db[_0x90cf('0x75')]=db['sequelize'][_0x90cf('0x13')](_0x90cf('0x76'));db[_0x90cf('0x77')]=db['sequelize'][_0x90cf('0x13')](_0x90cf('0x78'));db[_0x90cf('0x79')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x7a'));db[_0x90cf('0x7b')]=db['sequelize'][_0x90cf('0x13')](_0x90cf('0x7c'));db['Condition']=db['sequelize'][_0x90cf('0x13')](_0x90cf('0x7d'));db[_0x90cf('0x7e')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x7f'));db[_0x90cf('0x80')]=db[_0x90cf('0x1')]['import']('../api/pause/pause.model');db['Cdr']=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x81'));db[_0x90cf('0x82')]=db[_0x90cf('0x1')][_0x90cf('0x13')]('../api/voiceQueuesLog/voiceQueuesLog.model');db['Schedule']=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x83'));db[_0x90cf('0x84')]=db[_0x90cf('0x1')]['import'](_0x90cf('0x85'));db[_0x90cf('0x86')]=db['sequelize']['import'](_0x90cf('0x87'));db['Template']=db['sequelize'][_0x90cf('0x13')](_0x90cf('0x88'));db['Trigger']=db['sequelize'][_0x90cf('0x13')](_0x90cf('0x89'));db[_0x90cf('0x8a')]=db['sequelize']['import'](_0x90cf('0x8b'));db[_0x90cf('0x8c')]=db[_0x90cf('0x1')]['import'](_0x90cf('0x8d'));db[_0x90cf('0x8e')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x8f'));db[_0x90cf('0x90')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x91'));db[_0x90cf('0x92')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x93'));db[_0x90cf('0x94')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x95'));db[_0x90cf('0x96')]=db[_0x90cf('0x1')]['import'](_0x90cf('0x97'));db[_0x90cf('0x98')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x99'));db[_0x90cf('0x9a')]=db[_0x90cf('0x1')]['import'](_0x90cf('0x9b'));db[_0x90cf('0x9c')]=db[_0x90cf('0x1')][_0x90cf('0x13')]('../api/intSalesforceAccount/intSalesforceAccount.model');db[_0x90cf('0x9d')]=db[_0x90cf('0x1')]['import'](_0x90cf('0x9e'));db[_0x90cf('0x9f')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0xa0'));db[_0x90cf('0xa1')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0xa2'));db[_0x90cf('0xa3')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0xa4'));db[_0x90cf('0xa5')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0xa6'));db[_0x90cf('0xa7')]=db[_0x90cf('0x1')][_0x90cf('0x13')]('../api/intDeskAccount/intDeskAccount.model');db[_0x90cf('0xa8')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0xa9'));db['DeskField']=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0xaa'));db[_0x90cf('0xab')]=db[_0x90cf('0x1')]['import']('../api/intZohoAccount/intZohoAccount.model');db[_0x90cf('0xac')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0xad'));db[_0x90cf('0xae')]=db[_0x90cf('0x1')][_0x90cf('0x13')]('../api/intZohoField/intZohoField.model');db[_0x90cf('0xaf')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0xb0'));db[_0x90cf('0xb1')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0xb2'));db['ZendeskField']=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0xb3'));db[_0x90cf('0xb4')]=db[_0x90cf('0x1')]['import'](_0x90cf('0xb5'));db[_0x90cf('0xb6')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0xb7'));db['FreshdeskField']=db[_0x90cf('0x1')]['import'](_0x90cf('0xb8'));db[_0x90cf('0xb9')]=db[_0x90cf('0x1')]['import'](_0x90cf('0xba'));db[_0x90cf('0xbb')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0xbc'));db[_0x90cf('0xbd')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0xbe'));db['ServicenowAccount']=db[_0x90cf('0x1')][_0x90cf('0x13')]('../api/intServicenowAccount/intServicenowAccount.model');db[_0x90cf('0xbf')]=db[_0x90cf('0x1')]['import'](_0x90cf('0xc0'));db['ServicenowField']=db['sequelize']['import'](_0x90cf('0xc1'));db['Dynamics365Account']=db['sequelize']['import']('../api/intDynamics365Account/intDynamics365Account.model');db['Dynamics365Configuration']=db['sequelize'][_0x90cf('0x13')](_0x90cf('0xc2'));db[_0x90cf('0xc3')]=db[_0x90cf('0x1')]['import'](_0x90cf('0xc4'));db['FreshsalesAccount']=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0xc5'));db[_0x90cf('0xc6')]=db['sequelize']['import'](_0x90cf('0xc7'));db[_0x90cf('0xc8')]=db[_0x90cf('0x1')]['import'](_0x90cf('0xc9'));db[_0x90cf('0x8c')]=db['sequelize']['import'](_0x90cf('0x8d'));db[_0x90cf('0xca')]=db[_0x90cf('0x1')][_0x90cf('0x13')]('../api/network/network.model');db[_0x90cf('0xcb')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0xcc'));db[_0x90cf('0xcd')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0xce'));db['JscriptyAnswerReport']=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0xcf'));db['JscriptyQuestionReport']=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0xd0'));db['JscriptySessionReport']=db[_0x90cf('0x1')][_0x90cf('0x13')]('../api/jscriptySessionReport/jscriptySessionReport.model');db[_0x90cf('0xd1')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0xd2'));db[_0x90cf('0xd3')]=db[_0x90cf('0x1')]['import'](_0x90cf('0xd4'));db['SquareDetailsReport']=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0xd5'));db[_0x90cf('0xd6')]=db['sequelize'][_0x90cf('0x13')](_0x90cf('0xd7'));db['Setting']=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0xd8'));db[_0x90cf('0xd9')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0xda'));db['SquareProject']=db['sequelize'][_0x90cf('0x13')]('../api/squareProject/squareProject.model');db[_0x90cf('0xdb')]=db['sequelize'][_0x90cf('0x13')](_0x90cf('0xdc'));db['SquareMessage']=db['sequelize']['import'](_0x90cf('0xdd'));db[_0x90cf('0xde')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0xdf'));db[_0x90cf('0xe0')]=db[_0x90cf('0x1')]['import']('../api/license/license.model');db['Campaign']=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0xe1'));db[_0x90cf('0xe2')]=db[_0x90cf('0x1')][_0x90cf('0x13')]('../api/migration/migration.model');db[_0x90cf('0xe3')]=db['sequelize'][_0x90cf('0x13')]('../api/attachment/attachment.model');db[_0x90cf('0xe4')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0xe5'));db['MailTransferReport']=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0xe6'));db[_0x90cf('0xe7')]=db[_0x90cf('0x1')]['import'](_0x90cf('0xe8'));db[_0x90cf('0xe9')]=db['sequelize'][_0x90cf('0x13')](_0x90cf('0xea'));db[_0x90cf('0xeb')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0xec'));db['SmsTransferReport']=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0xed'));db[_0x90cf('0xee')]=db['sequelize']['import'](_0x90cf('0xef'));db[_0x90cf('0xf0')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0xf1'));db[_0x90cf('0xf2')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0xf3'));db[_0x90cf('0xf4')]=db[_0x90cf('0x1')]['import'](_0x90cf('0xf5'));db[_0x90cf('0xf6')]=db[_0x90cf('0x1')]['import']('../api/userProfileResource/userProfileResource.model');db[_0x90cf('0xf7')]=db['sequelize'][_0x90cf('0x13')]('../api/userNotification/userNotification.model');db[_0x90cf('0xf8')]=db[_0x90cf('0x1')]['import'](_0x90cf('0xf9'));db[_0x90cf('0xfa')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0xfb'));db[_0x90cf('0xfc')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0xfd'));db[_0x90cf('0xfe')]=db['sequelize']['import'](_0x90cf('0xff'));db[_0x90cf('0x100')]=db[_0x90cf('0x1')]['import'](_0x90cf('0x101'));db[_0x90cf('0x102')]=db[_0x90cf('0x1')][_0x90cf('0x13')]('../api/whatsappTransferReport/whatsappTransferReport.model');db[_0x90cf('0x103')]=db[_0x90cf('0x1')][_0x90cf('0x13')](_0x90cf('0x104'));db[_0x90cf('0x105')]=db['sequelize'][_0x90cf('0x13')](_0x90cf('0x106'));db[_0x90cf('0x107')]=db[_0x90cf('0x1')]['import'](_0x90cf('0x108'));db['User'][_0x90cf('0x109')](db[_0x90cf('0x1d')],{'as':'VoiceMail','onDelete':'cascade','foreignKey':'UserId'});db[_0x90cf('0x12')][_0x90cf('0x10a')](db[_0x90cf('0x10b')],{'as':'Recordings','foreignKey':_0x90cf('0x10c')});db['User'][_0x90cf('0x10a')](db['UserVoiceQueueRt'],{'as':_0x90cf('0x10d'),'foreignKey':_0x90cf('0x10c')});db['User'][_0x90cf('0x10a')](db[_0x90cf('0x16')],{'as':_0x90cf('0x10e'),'onDelete':_0x90cf('0x10f'),'hooks':!![]});db[_0x90cf('0x12')][_0x90cf('0x10a')](db[_0x90cf('0x110')],{'as':_0x90cf('0x111'),'foreignKey':_0x90cf('0x10c')});db[_0x90cf('0x12')][_0x90cf('0x10a')](db[_0x90cf('0x71')],{'as':_0x90cf('0x112'),'foreignKey':'UserId'});db['User']['hasMany'](db['ReportAgentPreview'],{'as':'ReportAgentPreview','foreignKey':_0x90cf('0x10c')});db[_0x90cf('0x12')]['hasMany'](db[_0x90cf('0x113')],{'as':_0x90cf('0x114'),'foreignKey':_0x90cf('0x10c')});db[_0x90cf('0x12')][_0x90cf('0x10a')](db[_0x90cf('0x61')],{'as':'ChatInteractions','foreignKey':_0x90cf('0x10c')});db[_0x90cf('0x12')][_0x90cf('0x10a')](db[_0x90cf('0x50')],{'as':_0x90cf('0x115'),'foreignKey':_0x90cf('0x10c')});db[_0x90cf('0x12')][_0x90cf('0x10a')](db[_0x90cf('0x49')],{'as':_0x90cf('0x116'),'foreignKey':_0x90cf('0x10c')});db[_0x90cf('0x12')][_0x90cf('0x10a')](db[_0x90cf('0x117')],{'as':'MailInteractions','foreignKey':_0x90cf('0x10c')});db[_0x90cf('0x12')][_0x90cf('0x10a')](db['WhatsappInteraction'],{'as':'WhatsappInteractions','foreignKey':_0x90cf('0x10c')});db['User'][_0x90cf('0x10a')](db[_0x90cf('0xf7')],{'as':_0x90cf('0x118'),'foreignKey':_0x90cf('0x119')});db[_0x90cf('0x12')][_0x90cf('0x11a')](db[_0x90cf('0xf2')],{'as':_0x90cf('0xf2'),'foreignKey':'userProfileId'});db['User'][_0x90cf('0x11b')](db[_0x90cf('0x11c')],{'as':'Groups','through':_0x90cf('0x11d')});db[_0x90cf('0x12')][_0x90cf('0x11b')](db[_0x90cf('0x6b')],{'as':_0x90cf('0x11e'),'through':_0x90cf('0x11f')});db[_0x90cf('0x12')][_0x90cf('0x11b')](db['CmList'],{'as':_0x90cf('0x120'),'through':_0x90cf('0x121')});db[_0x90cf('0x12')][_0x90cf('0x11b')](db[_0x90cf('0xde')],{'through':_0x90cf('0x122')});db['User'][_0x90cf('0x11b')](db[_0x90cf('0x117')],{'as':_0x90cf('0x123'),'through':_0x90cf('0x124')});db[_0x90cf('0x12')]['belongsToMany'](db['ChatInteraction'],{'as':_0x90cf('0x125'),'through':'user_has_chat_interactions'});db[_0x90cf('0x12')]['belongsToMany'](db['FaxInteraction'],{'as':'FaxInteractions','through':'user_has_fax_interactions'});db[_0x90cf('0x12')][_0x90cf('0x11b')](db[_0x90cf('0x50')],{'as':_0x90cf('0x115'),'through':_0x90cf('0x126')});db[_0x90cf('0x12')][_0x90cf('0x11b')](db['OpenchannelInteraction'],{'as':_0x90cf('0x114'),'through':_0x90cf('0x127')});db[_0x90cf('0x12')][_0x90cf('0x11b')](db[_0x90cf('0xfc')],{'as':'WhatsappInteractions','through':_0x90cf('0x128')});db['User']['belongsToMany'](db[_0x90cf('0x129')],{'as':_0x90cf('0x12a'),'through':_0x90cf('0x2c'),'required':![]});db['User'][_0x90cf('0x11b')](db[_0x90cf('0x3a')],{'as':'MailQueues','through':_0x90cf('0x2f'),'required':![]});db[_0x90cf('0x12')][_0x90cf('0x11b')](db['ChatQueue'],{'as':_0x90cf('0x12b'),'through':_0x90cf('0x2e'),'required':![],'hooks':!![]});db[_0x90cf('0x12')][_0x90cf('0x11b')](db['FaxQueue'],{'as':_0x90cf('0x12c'),'through':_0x90cf('0x30'),'required':![]});db[_0x90cf('0x12')][_0x90cf('0x11b')](db['SmsQueue'],{'as':_0x90cf('0x12d'),'through':_0x90cf('0x32'),'required':![]});db[_0x90cf('0x12')][_0x90cf('0x11b')](db[_0x90cf('0x5b')],{'as':'OpenchannelQueues','through':_0x90cf('0x33'),'required':![]});db['User'][_0x90cf('0x11b')](db[_0x90cf('0x103')],{'as':_0x90cf('0x12e'),'through':_0x90cf('0x12f'),'required':![]});db[_0x90cf('0x12')][_0x90cf('0x11b')](db[_0x90cf('0xee')],{'through':_0x90cf('0x121')});db['User']['belongsToMany'](db['VoicePrefix'],{'as':_0x90cf('0x130'),'through':_0x90cf('0x131'),'required':![]});db['User'][_0x90cf('0x11b')](db[_0x90cf('0x5c')],{'as':_0x90cf('0x132'),'through':'user_has_chat_websites'});db['User'][_0x90cf('0x11b')](db[_0x90cf('0x47')],{'as':_0x90cf('0x133'),'through':_0x90cf('0x134')});db[_0x90cf('0x12')][_0x90cf('0x11b')](db['MailAccount'],{'as':_0x90cf('0x135'),'through':_0x90cf('0x136')});db[_0x90cf('0x12')][_0x90cf('0x11b')](db[_0x90cf('0x56')],{'as':_0x90cf('0x137'),'through':_0x90cf('0x138')});db[_0x90cf('0x12')]['belongsToMany'](db[_0x90cf('0x4d')],{'as':'SmsAccounts','through':'user_has_sms_accounts'});db[_0x90cf('0x12')][_0x90cf('0x11b')](db['WhatsappAccount'],{'as':_0x90cf('0x139'),'through':_0x90cf('0x13a')});db[_0x90cf('0x12')][_0x90cf('0x11b')](db[_0x90cf('0x13b')],{'as':_0x90cf('0x13c'),'through':'user_has_square_projects'});db[_0x90cf('0x13d')][_0x90cf('0x10a')](db['VoiceExtension'],{'as':_0x90cf('0x13e'),'onDelete':_0x90cf('0x10f'),'foreignKey':_0x90cf('0x13f')});db['VoiceContext'][_0x90cf('0x10a')](db[_0x90cf('0x16')],{'onDelete':_0x90cf('0x10f')});db[_0x90cf('0x16')]['hasMany'](db[_0x90cf('0x16')],{'as':_0x90cf('0x140'),'onDelete':_0x90cf('0x10f')});db[_0x90cf('0x17')][_0x90cf('0x11b')](db[_0x90cf('0x84')],{'as':_0x90cf('0x141'),'through':_0x90cf('0x142')});db[_0x90cf('0x129')][_0x90cf('0x10a')](db[_0x90cf('0x143')],{'as':'Members','foreignKey':_0x90cf('0x144')});db['VoiceQueue'][_0x90cf('0x10a')](db[_0x90cf('0x6c')],{'as':'Hoppers','foreignKey':_0x90cf('0x144')});db[_0x90cf('0x129')]['hasMany'](db[_0x90cf('0x110')],{'as':_0x90cf('0x111'),'foreignKey':_0x90cf('0x144')});db[_0x90cf('0x129')]['hasMany'](db[_0x90cf('0x71')],{'as':_0x90cf('0x145'),'foreignKey':_0x90cf('0x144')});db[_0x90cf('0x129')][_0x90cf('0x10a')](db['ReportAgentPreview'],{'as':_0x90cf('0x73'),'foreignKey':_0x90cf('0x144')});db['VoiceQueue'][_0x90cf('0x10a')](db[_0x90cf('0x6e')],{'as':'HopperBlacks','foreignKey':_0x90cf('0x144')});db['VoiceQueue'][_0x90cf('0x10a')](db[_0x90cf('0x146')],{'as':'JscriptySessions','foreignKey':'VoiceQueueId'});db[_0x90cf('0x129')]['belongsTo'](db[_0x90cf('0x28')],{'as':_0x90cf('0x28'),'foreignKey':_0x90cf('0x147')});db['VoiceQueue'][_0x90cf('0x11a')](db[_0x90cf('0x28')],{'as':_0x90cf('0x148'),'foreignKey':'TrunkBackupId'});db[_0x90cf('0x129')][_0x90cf('0x11a')](db[_0x90cf('0x7e')],{'as':_0x90cf('0x7e'),'foreignKey':_0x90cf('0x149')});db['VoiceQueue'][_0x90cf('0x11a')](db[_0x90cf('0x80')],{'as':_0x90cf('0x14a'),'foreignKey':_0x90cf('0x14b')});db[_0x90cf('0x129')][_0x90cf('0x11b')](db[_0x90cf('0xee')],{'as':_0x90cf('0x120'),'through':_0x90cf('0x14c')});db[_0x90cf('0x129')][_0x90cf('0x11b')](db[_0x90cf('0x12')],{'as':'Agents','through':_0x90cf('0x2c')});db['VoiceQueue'][_0x90cf('0x11b')](db[_0x90cf('0xde')],{'as':'Teams','through':_0x90cf('0x107')});db[_0x90cf('0x129')][_0x90cf('0x11b')](db[_0x90cf('0xee')],{'as':_0x90cf('0x14d'),'through':'voice_queues_has_cm_blacklists'});db[_0x90cf('0x10b')][_0x90cf('0x11a')](db['User'],{'as':_0x90cf('0x12'),'foreignKey':_0x90cf('0x10c')});db[_0x90cf('0x1b')][_0x90cf('0x11a')](db[_0x90cf('0x12')],{'as':_0x90cf('0x12'),'foreignKey':_0x90cf('0x10c')});db[_0x90cf('0x1d')][_0x90cf('0x10a')](db[_0x90cf('0x1f')],{'as':_0x90cf('0x14e'),'onDelete':_0x90cf('0x10f'),'foreignKey':_0x90cf('0x14f'),'sourceKey':_0x90cf('0x150')});db[_0x90cf('0x1f')][_0x90cf('0x11a')](db[_0x90cf('0x1d')],{'foreignKey':_0x90cf('0x14f'),'targetKey':'mailbox'});db[_0x90cf('0x20')][_0x90cf('0x10a')](db[_0x90cf('0x24')],{'as':'QueueCalls','foreignKey':_0x90cf('0x151'),'constraints':![]});db[_0x90cf('0x20')][_0x90cf('0x10a')](db[_0x90cf('0x152')],{'as':_0x90cf('0x153'),'foreignKey':_0x90cf('0x151'),'constraints':![]});db['VoiceCallReport'][_0x90cf('0x11a')](db[_0x90cf('0x12')],{'as':_0x90cf('0x12'),'foreignKey':_0x90cf('0x10c')});db[_0x90cf('0x20')][_0x90cf('0x11a')](db['CmContact'],{'as':'Contact','foreignKey':'ContactId'});db[_0x90cf('0x154')][_0x90cf('0x11a')](db[_0x90cf('0x38')],{'as':_0x90cf('0x38'),'foreignKey':'MailAccountId'});db[_0x90cf('0x36')][_0x90cf('0x11a')](db['MailAccount'],{'as':_0x90cf('0x38'),'foreignKey':'MailAccountId'});db[_0x90cf('0x38')][_0x90cf('0x109')](db[_0x90cf('0x154')],{'as':_0x90cf('0x155'),'onDelete':_0x90cf('0x10f')});db['MailAccount'][_0x90cf('0x109')](db['MailServerOut'],{'as':_0x90cf('0x156'),'onDelete':'cascade'});db[_0x90cf('0x38')][_0x90cf('0x10a')](db[_0x90cf('0x7b')],{'as':'Dispositions','foreignKey':_0x90cf('0x157')});db[_0x90cf('0x38')]['hasMany'](db['CannedAnswer'],{'as':'Answers','foreignKey':_0x90cf('0x157')});db['MailAccount'][_0x90cf('0x10a')](db[_0x90cf('0x158')],{'as':_0x90cf('0x14e'),'foreignKey':_0x90cf('0x157')});db[_0x90cf('0x38')]['hasMany'](db[_0x90cf('0x117')],{'as':_0x90cf('0x159')});db[_0x90cf('0x38')][_0x90cf('0x10a')](db[_0x90cf('0x3f')],{'as':_0x90cf('0x140')});db['MailAccount']['belongsTo'](db[_0x90cf('0xee')],{'as':'List','foreignKey':_0x90cf('0x15a')});db[_0x90cf('0x38')][_0x90cf('0x11a')](db[_0x90cf('0x15b')],{'as':_0x90cf('0x15b'),'foreignKey':_0x90cf('0x15c')});db[_0x90cf('0x38')][_0x90cf('0x11a')](db[_0x90cf('0x80')],{'as':_0x90cf('0x14a'),'foreignKey':_0x90cf('0x14b')});db[_0x90cf('0x38')][_0x90cf('0x11b')](db[_0x90cf('0x12')],{'as':_0x90cf('0x15d'),'through':_0x90cf('0x136')});db[_0x90cf('0x3a')][_0x90cf('0x11b')](db['User'],{'as':_0x90cf('0x15d'),'through':'UserMailQueue'});db[_0x90cf('0x3a')]['belongsToMany'](db[_0x90cf('0xde')],{'through':_0x90cf('0x15e'),'as':'Teams'});db[_0x90cf('0x117')][_0x90cf('0x10a')](db[_0x90cf('0x158')],{'as':_0x90cf('0x14e'),'onDelete':_0x90cf('0x10f'),'foreignKey':_0x90cf('0x15f')});db[_0x90cf('0x117')][_0x90cf('0x11a')](db['MailAccount'],{'as':_0x90cf('0x160'),'foreignKey':_0x90cf('0x157')});db['MailInteraction'][_0x90cf('0x11a')](db[_0x90cf('0x6b')],{'as':'Contact','foreignKey':_0x90cf('0x161')});db[_0x90cf('0x117')]['belongsTo'](db[_0x90cf('0x12')],{'as':_0x90cf('0x162'),'foreignKey':_0x90cf('0x10c')});db[_0x90cf('0x117')]['belongsToMany'](db[_0x90cf('0x86')],{'through':_0x90cf('0x163'),'as':_0x90cf('0x164')});db[_0x90cf('0x117')]['belongsToMany'](db[_0x90cf('0x86')],{'through':'mail_interaction_has_tags','as':_0x90cf('0x165')});db[_0x90cf('0x117')][_0x90cf('0x11b')](db[_0x90cf('0x12')],{'as':'Users','through':'user_has_mail_interactions','foreignKey':_0x90cf('0x15f')});db[_0x90cf('0x158')][_0x90cf('0x10a')](db[_0x90cf('0xe3')],{'as':_0x90cf('0x166'),'onDelete':_0x90cf('0x10f')});db['MailMessage'][_0x90cf('0x11a')](db[_0x90cf('0x12')],{'as':_0x90cf('0x12')});db[_0x90cf('0x158')]['belongsTo'](db[_0x90cf('0x6b')],{'onDelete':_0x90cf('0x10f'),'as':_0x90cf('0x167')});db['MailMessage'][_0x90cf('0x11a')](db['MailInteraction'],{'as':_0x90cf('0x168'),'foreignKey':'MailInteractionId'});db['MailMessage']['belongsTo'](db['MailAccount'],{'as':_0x90cf('0x160'),'foreignKey':_0x90cf('0x157')});db[_0x90cf('0x158')][_0x90cf('0x11a')](db[_0x90cf('0x5c')],{'as':_0x90cf('0x5c'),'foreignKey':_0x90cf('0x169')});db['MailMessage']['belongsTo'](db[_0x90cf('0x64')],{'as':'ChatOfflineMessage','foreignKey':_0x90cf('0x16a')});db[_0x90cf('0x3f')][_0x90cf('0x11a')](db[_0x90cf('0x12')],{'onDelete':_0x90cf('0x16b')});db[_0x90cf('0x3f')][_0x90cf('0x11a')](db[_0x90cf('0x3a')],{'onDelete':_0x90cf('0x16b')});db['MailApplication'][_0x90cf('0x11a')](db['MailAccount'],{'onDelete':_0x90cf('0x16b')});db[_0x90cf('0x3f')]['belongsTo'](db[_0x90cf('0x7e')],{'onDelete':_0x90cf('0x16b'),'foreignKey':'IntervalId'});db[_0x90cf('0x3f')][_0x90cf('0x11a')](db[_0x90cf('0x86')],{'onDelete':_0x90cf('0x16b'),'foreignKey':_0x90cf('0x16c')});db[_0x90cf('0x41')][_0x90cf('0x11a')](db[_0x90cf('0x38')],{});db[_0x90cf('0x41')]['belongsTo'](db[_0x90cf('0xee')],{'as':_0x90cf('0x16d'),'foreignKey':'ListId'});db[_0x90cf('0x41')][_0x90cf('0x11a')](db[_0x90cf('0x6b')],{'as':_0x90cf('0x167'),'foreignKey':_0x90cf('0x161')});db[_0x90cf('0x41')][_0x90cf('0x11a')](db[_0x90cf('0x117')],{});db[_0x90cf('0x41')][_0x90cf('0x11a')](db[_0x90cf('0x158')],{});db[_0x90cf('0x41')]['belongsTo'](db['User'],{});db[_0x90cf('0x41')][_0x90cf('0x11a')](db[_0x90cf('0x3a')],{});db['Dashboard'][_0x90cf('0x10a')](db[_0x90cf('0x45')],{'as':_0x90cf('0x16e'),'onDelete':_0x90cf('0x10f')});db[_0x90cf('0x47')]['hasMany'](db[_0x90cf('0x7b')],{'as':_0x90cf('0x16f'),'foreignKey':_0x90cf('0x170')});db[_0x90cf('0x47')][_0x90cf('0x10a')](db[_0x90cf('0x79')],{'as':'Answers','foreignKey':_0x90cf('0x170')});db[_0x90cf('0x47')][_0x90cf('0x10a')](db['FaxInteraction'],{'as':_0x90cf('0x159')});db[_0x90cf('0x47')]['hasMany'](db[_0x90cf('0x171')],{'as':_0x90cf('0x140')});db['FaxAccount'][_0x90cf('0x10a')](db[_0x90cf('0x16')],{'as':_0x90cf('0x172'),'onDelete':'cascade'});db[_0x90cf('0x47')][_0x90cf('0x10a')](db[_0x90cf('0x4a')],{'as':_0x90cf('0x14e')});db['FaxAccount'][_0x90cf('0x11a')](db['Trunk'],{'as':_0x90cf('0x28')});db[_0x90cf('0x47')][_0x90cf('0x11a')](db[_0x90cf('0xee')],{'as':_0x90cf('0x16d'),'foreignKey':_0x90cf('0x15a')});db[_0x90cf('0x47')][_0x90cf('0x11a')](db[_0x90cf('0x80')],{'as':_0x90cf('0x14a'),'foreignKey':_0x90cf('0x14b')});db['FaxAccount']['belongsToMany'](db[_0x90cf('0x12')],{'as':'Agents','through':'user_has_fax_accounts'});db[_0x90cf('0x171')][_0x90cf('0x11a')](db[_0x90cf('0x12')],{'onDelete':_0x90cf('0x16b')});db[_0x90cf('0x171')][_0x90cf('0x11a')](db[_0x90cf('0x173')],{'onDelete':_0x90cf('0x16b')});db[_0x90cf('0x171')][_0x90cf('0x11a')](db['FaxAccount'],{'onDelete':'restrict'});db[_0x90cf('0x171')]['belongsTo'](db[_0x90cf('0x86')],{'onDelete':_0x90cf('0x16b'),'foreignKey':_0x90cf('0x16c')});db['FaxInteraction']['hasMany'](db[_0x90cf('0x4a')],{'as':_0x90cf('0x14e'),'onDelete':_0x90cf('0x10f'),'foreignKey':_0x90cf('0x174')});db[_0x90cf('0x49')][_0x90cf('0x11a')](db[_0x90cf('0x47')],{'as':_0x90cf('0x160'),'foreignKey':_0x90cf('0x170')});db[_0x90cf('0x49')][_0x90cf('0x11a')](db['CmContact'],{'as':_0x90cf('0x167'),'foreignKey':'ContactId'});db[_0x90cf('0x49')][_0x90cf('0x11a')](db[_0x90cf('0x12')],{'as':_0x90cf('0x162'),'foreignKey':_0x90cf('0x10c')});db[_0x90cf('0x49')][_0x90cf('0x11b')](db[_0x90cf('0x86')],{'through':_0x90cf('0x175'),'as':'Tags'});db[_0x90cf('0x49')][_0x90cf('0x11b')](db[_0x90cf('0x86')],{'through':'fax_interaction_has_tags','as':_0x90cf('0x165')});db['FaxInteraction']['belongsToMany'](db[_0x90cf('0x12')],{'as':_0x90cf('0x176'),'through':_0x90cf('0x177'),'foreignKey':'FaxInteractionId'});db['FaxMessage'][_0x90cf('0x11a')](db['User'],{'onDelete':_0x90cf('0x10f'),'as':_0x90cf('0x12')});db[_0x90cf('0x4a')][_0x90cf('0x11a')](db[_0x90cf('0x49')],{'as':_0x90cf('0x168'),'foreignKey':_0x90cf('0x174')});db['FaxMessage'][_0x90cf('0x11a')](db[_0x90cf('0x6b')],{'onDelete':'cascade','as':_0x90cf('0x167')});db[_0x90cf('0x4a')][_0x90cf('0x11a')](db[_0x90cf('0xe3')],{'as':_0x90cf('0xe3'),'foreignKey':_0x90cf('0x178')});db[_0x90cf('0x4a')][_0x90cf('0x11a')](db[_0x90cf('0x47')],{'as':_0x90cf('0x160'),'foreignKey':'FaxAccountId'});db[_0x90cf('0x173')]['belongsToMany'](db[_0x90cf('0x12')],{'as':_0x90cf('0x15d'),'through':_0x90cf('0x30')});db[_0x90cf('0x173')]['belongsToMany'](db[_0x90cf('0xde')],{'through':'team_has_fax_queues','as':_0x90cf('0x179')});db[_0x90cf('0x4c')][_0x90cf('0x11a')](db[_0x90cf('0x47')],{});db['FaxQueueReport'][_0x90cf('0x11a')](db[_0x90cf('0xee')],{'as':_0x90cf('0x16d'),'foreignKey':_0x90cf('0x15a')});db[_0x90cf('0x4c')][_0x90cf('0x11a')](db['CmContact'],{'as':_0x90cf('0x167'),'foreignKey':'ContactId'});db[_0x90cf('0x4c')]['belongsTo'](db[_0x90cf('0x49')],{});db[_0x90cf('0x4c')][_0x90cf('0x11a')](db['FaxMessage'],{});db[_0x90cf('0x4c')]['belongsTo'](db[_0x90cf('0x12')],{});db[_0x90cf('0x4c')][_0x90cf('0x11a')](db[_0x90cf('0x173')],{});db[_0x90cf('0x4d')][_0x90cf('0x10a')](db[_0x90cf('0x7b')],{'as':_0x90cf('0x16f'),'foreignKey':_0x90cf('0x17a')});db[_0x90cf('0x4d')][_0x90cf('0x10a')](db[_0x90cf('0x79')],{'as':_0x90cf('0x17b'),'foreignKey':_0x90cf('0x17a')});db[_0x90cf('0x4d')]['hasMany'](db[_0x90cf('0x52')],{'as':_0x90cf('0x14e'),'foreignKey':_0x90cf('0x17a')});db[_0x90cf('0x4d')]['hasMany'](db[_0x90cf('0x50')],{'as':'Interactions'});db[_0x90cf('0x4d')][_0x90cf('0x10a')](db['SmsApplication'],{'as':_0x90cf('0x140')});db['SmsAccount']['belongsTo'](db[_0x90cf('0xee')],{'as':'List','foreignKey':'ListId'});db[_0x90cf('0x4d')]['belongsTo'](db[_0x90cf('0x80')],{'as':_0x90cf('0x14a'),'foreignKey':'mandatoryDispositionPauseId'});db['SmsAccount'][_0x90cf('0x11b')](db[_0x90cf('0x12')],{'as':_0x90cf('0x15d'),'through':_0x90cf('0x17c')});db[_0x90cf('0x4f')][_0x90cf('0x11a')](db[_0x90cf('0x12')],{'onDelete':_0x90cf('0x16b')});db[_0x90cf('0x4f')][_0x90cf('0x11a')](db[_0x90cf('0x54')],{'onDelete':'restrict'});db['SmsApplication'][_0x90cf('0x11a')](db[_0x90cf('0x4d')],{'onDelete':_0x90cf('0x16b')});db[_0x90cf('0x4f')][_0x90cf('0x11a')](db[_0x90cf('0x7e')],{'onDelete':_0x90cf('0x16b'),'foreignKey':_0x90cf('0x149')});db[_0x90cf('0x4f')][_0x90cf('0x11a')](db[_0x90cf('0x86')],{'onDelete':_0x90cf('0x16b'),'foreignKey':_0x90cf('0x16c')});db[_0x90cf('0x50')][_0x90cf('0x10a')](db['SmsMessage'],{'as':'Messages','onDelete':_0x90cf('0x10f'),'foreignKey':_0x90cf('0x17d')});db[_0x90cf('0x50')][_0x90cf('0x11a')](db[_0x90cf('0x4d')],{'as':_0x90cf('0x160'),'foreignKey':_0x90cf('0x17a')});db['SmsInteraction']['belongsTo'](db[_0x90cf('0x6b')],{'as':_0x90cf('0x167'),'foreignKey':_0x90cf('0x161')});db['SmsInteraction'][_0x90cf('0x11a')](db[_0x90cf('0x12')],{'as':'Owner','foreignKey':_0x90cf('0x10c')});db[_0x90cf('0x50')][_0x90cf('0x11b')](db['Tag'],{'through':_0x90cf('0x17e'),'as':_0x90cf('0x164')});db[_0x90cf('0x50')][_0x90cf('0x11b')](db[_0x90cf('0x86')],{'through':'sms_interaction_has_tags','as':'ThroughTags'});db[_0x90cf('0x50')]['belongsToMany'](db['User'],{'as':'Users','through':_0x90cf('0x126'),'foreignKey':_0x90cf('0x17d')});db[_0x90cf('0x52')]['belongsTo'](db[_0x90cf('0x12')],{'as':_0x90cf('0x12')});db[_0x90cf('0x52')][_0x90cf('0x11a')](db[_0x90cf('0x6b')],{'onDelete':'cascade','as':_0x90cf('0x167')});db[_0x90cf('0x52')][_0x90cf('0x11a')](db[_0x90cf('0x50')],{'onDelete':_0x90cf('0x10f'),'as':_0x90cf('0x168'),'foreignKey':_0x90cf('0x17d')});db[_0x90cf('0x52')]['belongsTo'](db[_0x90cf('0x4d')],{'as':_0x90cf('0x160'),'foreignKey':_0x90cf('0x17a')});db[_0x90cf('0x54')][_0x90cf('0x11b')](db[_0x90cf('0x12')],{'as':_0x90cf('0x15d'),'through':_0x90cf('0x32'),'foreignKey':_0x90cf('0x17f')});db['SmsQueue'][_0x90cf('0x11b')](db[_0x90cf('0xde')],{'through':_0x90cf('0x180'),'as':'Teams'});db['OpenchannelAccount']['hasMany'](db[_0x90cf('0x7b')],{'as':_0x90cf('0x16f'),'foreignKey':'OpenchannelAccountId'});db[_0x90cf('0x56')][_0x90cf('0x10a')](db[_0x90cf('0x79')],{'as':_0x90cf('0x17b'),'foreignKey':_0x90cf('0x181')});db[_0x90cf('0x56')][_0x90cf('0x10a')](db[_0x90cf('0x113')],{'as':_0x90cf('0x159'),'foreignKey':_0x90cf('0x181')});db['OpenchannelAccount'][_0x90cf('0x10a')](db[_0x90cf('0x59')],{'as':_0x90cf('0x14e'),'foreignKey':_0x90cf('0x181')});db['OpenchannelAccount']['hasMany'](db['OpenchannelApplication'],{'as':_0x90cf('0x140'),'foreignKey':'OpenchannelAccountId'});db[_0x90cf('0x56')][_0x90cf('0x11a')](db[_0x90cf('0xee')],{'as':'List','foreignKey':_0x90cf('0x15a')});db['OpenchannelAccount']['belongsTo'](db[_0x90cf('0x80')],{'as':_0x90cf('0x14a'),'foreignKey':_0x90cf('0x14b')});db[_0x90cf('0x56')]['belongsToMany'](db[_0x90cf('0x12')],{'as':_0x90cf('0x15d'),'through':_0x90cf('0x138')});db[_0x90cf('0x182')][_0x90cf('0x11a')](db[_0x90cf('0x12')],{'onDelete':_0x90cf('0x16b')});db['OpenchannelApplication'][_0x90cf('0x11a')](db[_0x90cf('0x5b')],{'onDelete':_0x90cf('0x16b'),'foreignKey':'OpenchannelQueueId'});db[_0x90cf('0x182')]['belongsTo'](db[_0x90cf('0x56')],{'onDelete':_0x90cf('0x16b'),'foreignKey':_0x90cf('0x181')});db['OpenchannelApplication'][_0x90cf('0x11a')](db['Interval'],{'onDelete':_0x90cf('0x16b'),'foreignKey':_0x90cf('0x149')});db[_0x90cf('0x182')]['belongsTo'](db[_0x90cf('0x86')],{'onDelete':'restrict','foreignKey':_0x90cf('0x16c')});db[_0x90cf('0x113')][_0x90cf('0x10a')](db[_0x90cf('0x59')],{'as':_0x90cf('0x14e'),'onDelete':_0x90cf('0x10f'),'foreignKey':_0x90cf('0x183')});db[_0x90cf('0x113')][_0x90cf('0x11a')](db[_0x90cf('0x56')],{'as':_0x90cf('0x160'),'foreignKey':_0x90cf('0x181')});db['OpenchannelInteraction'][_0x90cf('0x11a')](db['CmContact'],{'as':_0x90cf('0x167'),'foreignKey':'ContactId'});db[_0x90cf('0x113')][_0x90cf('0x11a')](db[_0x90cf('0x12')],{'as':_0x90cf('0x162'),'foreignKey':_0x90cf('0x10c')});db[_0x90cf('0x113')]['belongsToMany'](db[_0x90cf('0x86')],{'through':_0x90cf('0x184'),'as':_0x90cf('0x164')});db[_0x90cf('0x113')][_0x90cf('0x11b')](db[_0x90cf('0x86')],{'through':_0x90cf('0x184'),'as':'ThroughTags'});db[_0x90cf('0x113')][_0x90cf('0x11b')](db[_0x90cf('0x12')],{'as':_0x90cf('0x176'),'through':_0x90cf('0x127'),'foreignKey':_0x90cf('0x183')});db['OpenchannelMessage'][_0x90cf('0x11a')](db[_0x90cf('0x12')],{'onDelete':'cascade','as':_0x90cf('0x12')});db[_0x90cf('0x59')][_0x90cf('0x11a')](db['CmContact'],{'onDelete':'cascade','as':_0x90cf('0x167')});db['OpenchannelMessage']['belongsTo'](db['OpenchannelInteraction'],{'onDelete':'cascade','as':_0x90cf('0x168'),'foreignKey':'OpenchannelInteractionId'});db['OpenchannelMessage'][_0x90cf('0x11a')](db[_0x90cf('0xe3')],{'as':'Attachment','foreignKey':_0x90cf('0x178')});db['OpenchannelMessage'][_0x90cf('0x11a')](db[_0x90cf('0x56')],{'as':_0x90cf('0x160'),'foreignKey':_0x90cf('0x181')});db[_0x90cf('0x5b')][_0x90cf('0x11b')](db[_0x90cf('0x12')],{'as':'Agents','through':_0x90cf('0x33'),'foreignKey':'OpenchannelQueueId'});db[_0x90cf('0x5b')][_0x90cf('0x11b')](db[_0x90cf('0xde')],{'through':_0x90cf('0x185'),'as':_0x90cf('0x179')});db[_0x90cf('0x5c')][_0x90cf('0x10a')](db['Disposition'],{'as':_0x90cf('0x16f'),'foreignKey':_0x90cf('0x169')});db[_0x90cf('0x5c')]['hasMany'](db[_0x90cf('0x79')],{'as':_0x90cf('0x17b'),'foreignKey':'ChatWebsiteId'});db['ChatWebsite'][_0x90cf('0x10a')](db[_0x90cf('0x186')],{'as':_0x90cf('0x187')});db[_0x90cf('0x5c')]['hasMany'](db['ChatInteraction'],{'as':_0x90cf('0x159')});db[_0x90cf('0x5c')]['hasMany'](db[_0x90cf('0x5f')],{'as':_0x90cf('0x140')});db[_0x90cf('0x5c')]['hasMany'](db[_0x90cf('0x63')],{'as':_0x90cf('0x14e')});db[_0x90cf('0x5c')][_0x90cf('0x11a')](db['CmList'],{'as':_0x90cf('0x16d'),'foreignKey':'ListId'});db['ChatWebsite'][_0x90cf('0x11a')](db[_0x90cf('0x7e')],{'as':_0x90cf('0x7e'),'foreignKey':_0x90cf('0x149')});db[_0x90cf('0x5c')][_0x90cf('0x11a')](db['MailAccount'],{'as':_0x90cf('0x38'),'foreignKey':'MailAccountId'});db['ChatWebsite']['belongsTo'](db['Pause'],{'as':_0x90cf('0x14a'),'foreignKey':_0x90cf('0x14b')});db[_0x90cf('0x5c')][_0x90cf('0x11b')](db[_0x90cf('0x12')],{'as':_0x90cf('0x15d'),'through':_0x90cf('0x188')});db[_0x90cf('0x5e')][_0x90cf('0x11a')](db[_0x90cf('0x56')],{});db[_0x90cf('0x5e')][_0x90cf('0x11a')](db[_0x90cf('0xee')],{'as':'List','foreignKey':_0x90cf('0x15a')});db['OpenchannelQueueReport'][_0x90cf('0x11a')](db[_0x90cf('0x6b')],{'as':'Contact','foreignKey':_0x90cf('0x161')});db[_0x90cf('0x5e')]['belongsTo'](db[_0x90cf('0x113')],{});db[_0x90cf('0x5e')]['belongsTo'](db[_0x90cf('0x59')],{});db['OpenchannelQueueReport']['belongsTo'](db[_0x90cf('0x12')],{});db[_0x90cf('0x5e')]['belongsTo'](db['OpenchannelQueue'],{});db['ChatApplication'][_0x90cf('0x11a')](db[_0x90cf('0x12')],{'as':_0x90cf('0x189'),'foreignKey':_0x90cf('0x10c'),'onDelete':_0x90cf('0x16b')});db[_0x90cf('0x5f')][_0x90cf('0x11a')](db[_0x90cf('0x66')],{'as':_0x90cf('0x18a'),'foreignKey':'ChatQueueId','onDelete':'restrict'});db[_0x90cf('0x5f')][_0x90cf('0x11a')](db['ChatWebsite'],{'as':'Website','foreignKey':_0x90cf('0x169'),'onDelete':_0x90cf('0x16b')});db[_0x90cf('0x5f')]['belongsTo'](db[_0x90cf('0x86')],{'onDelete':_0x90cf('0x16b'),'foreignKey':_0x90cf('0x16c')});db[_0x90cf('0x61')][_0x90cf('0x10a')](db[_0x90cf('0x63')],{'as':_0x90cf('0x14e'),'onDelete':_0x90cf('0x10f'),'foreignKey':'ChatInteractionId'});db[_0x90cf('0x61')][_0x90cf('0x11a')](db[_0x90cf('0x5c')],{'as':_0x90cf('0x160'),'foreignKey':_0x90cf('0x169')});db['ChatInteraction'][_0x90cf('0x11a')](db[_0x90cf('0x6b')],{'as':'Contact','foreignKey':_0x90cf('0x161')});db[_0x90cf('0x61')]['belongsTo'](db['User'],{'as':_0x90cf('0x162'),'foreignKey':_0x90cf('0x10c')});db[_0x90cf('0x61')][_0x90cf('0x11b')](db[_0x90cf('0x86')],{'through':'chat_interaction_has_tags','as':'Tags'});db[_0x90cf('0x61')]['belongsToMany'](db[_0x90cf('0x86')],{'through':_0x90cf('0x18b'),'as':_0x90cf('0x165')});db[_0x90cf('0x61')]['belongsToMany'](db[_0x90cf('0x12')],{'as':'Users','through':_0x90cf('0x18c'),'foreignKey':_0x90cf('0x18d')});db[_0x90cf('0x63')][_0x90cf('0x11a')](db[_0x90cf('0x12')],{'onDelete':_0x90cf('0x10f'),'as':_0x90cf('0x12')});db[_0x90cf('0x63')][_0x90cf('0x11a')](db[_0x90cf('0x6b')],{'onDelete':_0x90cf('0x10f'),'as':'Contact','foreignKey':'ContactId'});db[_0x90cf('0x63')][_0x90cf('0x11a')](db[_0x90cf('0x61')],{'onDelete':'cascade','as':_0x90cf('0x168'),'foreignKey':_0x90cf('0x18d')});db[_0x90cf('0x63')][_0x90cf('0x11a')](db[_0x90cf('0xe3')],{'as':_0x90cf('0xe3'),'foreignKey':_0x90cf('0x178')});db[_0x90cf('0x63')]['belongsTo'](db[_0x90cf('0x5c')],{'as':_0x90cf('0x160'),'foreignKey':_0x90cf('0x169')});db[_0x90cf('0x64')]['hasMany'](db[_0x90cf('0xe3')],{'as':_0x90cf('0x166'),'foreignKey':_0x90cf('0x16a'),'onDelete':_0x90cf('0x10f'),'hooks':!![]});db[_0x90cf('0x64')][_0x90cf('0x11a')](db[_0x90cf('0x6b')],{'onDelete':_0x90cf('0x10f'),'as':_0x90cf('0x167'),'foreignKey':'ContactId'});db[_0x90cf('0x64')][_0x90cf('0x11a')](db[_0x90cf('0x5c')],{'as':_0x90cf('0x160'),'foreignKey':_0x90cf('0x169')});db[_0x90cf('0x66')][_0x90cf('0x11b')](db['User'],{'as':_0x90cf('0x15d'),'through':_0x90cf('0x2e'),'hooks':!![]});db[_0x90cf('0x66')][_0x90cf('0x11b')](db[_0x90cf('0xde')],{'through':'team_has_chat_queues','as':'Teams'});db[_0x90cf('0x11c')][_0x90cf('0x10a')](db[_0x90cf('0xcd')],{'as':_0x90cf('0x14e'),'foreignKey':_0x90cf('0x18e'),'onDelete':_0x90cf('0x10f')});db[_0x90cf('0x11c')]['belongsToMany'](db[_0x90cf('0x12')],{'as':'Members','through':_0x90cf('0x11d')});db['ChatProactiveAction'][_0x90cf('0x11a')](db[_0x90cf('0x5c')],{'as':'Website','foreignKey':_0x90cf('0x169')});db[_0x90cf('0x18f')]['hasMany'](db[_0x90cf('0x6b')],{'as':_0x90cf('0x11e'),'foreignKey':_0x90cf('0x190')});db[_0x90cf('0x6b')]['hasMany'](db['CmHopper'],{'as':_0x90cf('0x191'),'foreignKey':_0x90cf('0x161')});db[_0x90cf('0x6b')][_0x90cf('0x10a')](db[_0x90cf('0x110')],{'as':_0x90cf('0x111'),'foreignKey':_0x90cf('0x161')});db['CmContact'][_0x90cf('0x10a')](db[_0x90cf('0x71')],{'as':_0x90cf('0x145'),'foreignKey':_0x90cf('0x161')});db[_0x90cf('0x6b')][_0x90cf('0x10a')](db[_0x90cf('0x73')],{'as':_0x90cf('0x73'),'foreignKey':_0x90cf('0x161')});db['CmContact']['hasMany'](db[_0x90cf('0x146')],{'as':_0x90cf('0x192'),'foreignKey':_0x90cf('0x161')});db['CmContact'][_0x90cf('0x10a')](db['OpenchannelInteraction'],{'as':_0x90cf('0x114'),'foreignKey':_0x90cf('0x161'),'onDelete':'restrict'});db[_0x90cf('0x6b')][_0x90cf('0x10a')](db[_0x90cf('0x61')],{'as':_0x90cf('0x125'),'foreignKey':'ContactId','onDelete':_0x90cf('0x16b')});db['CmContact'][_0x90cf('0x10a')](db[_0x90cf('0x50')],{'as':_0x90cf('0x115'),'foreignKey':_0x90cf('0x161'),'onDelete':_0x90cf('0x16b')});db['CmContact'][_0x90cf('0x10a')](db[_0x90cf('0x49')],{'as':_0x90cf('0x116'),'foreignKey':_0x90cf('0x161'),'onDelete':'restrict'});db[_0x90cf('0x6b')][_0x90cf('0x10a')](db[_0x90cf('0x117')],{'as':_0x90cf('0x123'),'foreignKey':_0x90cf('0x161'),'onDelete':_0x90cf('0x16b')});db[_0x90cf('0x6b')]['belongsTo'](db['CmCompany'],{'as':_0x90cf('0x193'),'foreignKey':'CompanyId'});db[_0x90cf('0x6b')][_0x90cf('0x11a')](db['CmList'],{'as':'List','foreignKey':_0x90cf('0x15a'),'onDelete':_0x90cf('0x10f')});db[_0x90cf('0x6b')][_0x90cf('0x11b')](db['User'],{'as':_0x90cf('0x176'),'through':_0x90cf('0x11f')});db[_0x90cf('0x6b')][_0x90cf('0x11b')](db['Tag'],{'as':_0x90cf('0x164'),'through':_0x90cf('0x194')});db[_0x90cf('0x6b')]['belongsToMany'](db['Tag'],{'through':_0x90cf('0x194'),'as':_0x90cf('0x165')});db['CmHopper'][_0x90cf('0x11a')](db[_0x90cf('0x6b')],{'as':_0x90cf('0x167'),'foreignKey':_0x90cf('0x161'),'onDelete':'cascade'});db[_0x90cf('0x6c')]['belongsTo'](db[_0x90cf('0xee')],{'as':'List','foreignKey':'ListId','onDelete':_0x90cf('0x10f')});db[_0x90cf('0x6c')][_0x90cf('0x11a')](db[_0x90cf('0x12')],{'as':_0x90cf('0x189'),'foreignKey':_0x90cf('0x10c')});db[_0x90cf('0x6c')][_0x90cf('0x11a')](db['VoiceQueue'],{'as':_0x90cf('0x18a'),'foreignKey':_0x90cf('0x144'),'onDelete':_0x90cf('0x10f')});db['CmHopper'][_0x90cf('0x11a')](db[_0x90cf('0x195')],{'as':_0x90cf('0x195'),'foreignKey':'CampaignId','onDelete':_0x90cf('0x10f')});db['CmHopper'][_0x90cf('0x11a')](db['User'],{'as':_0x90cf('0x162'),'foreignKey':'OwnerId'});db[_0x90cf('0x6e')][_0x90cf('0x11a')](db['CmContact'],{'as':_0x90cf('0x167'),'foreignKey':_0x90cf('0x161'),'onDelete':'cascade'});db[_0x90cf('0x6e')][_0x90cf('0x11a')](db[_0x90cf('0xee')],{'as':_0x90cf('0x16d'),'foreignKey':_0x90cf('0x15a'),'onDelete':'cascade'});db[_0x90cf('0x6e')][_0x90cf('0x11a')](db[_0x90cf('0x129')],{'as':_0x90cf('0x18a'),'foreignKey':_0x90cf('0x144'),'onDelete':_0x90cf('0x10f')});db['CmHopperBlack'][_0x90cf('0x11a')](db[_0x90cf('0x195')],{'as':_0x90cf('0x195'),'foreignKey':'CampaignId','onDelete':_0x90cf('0x10f')});db[_0x90cf('0x77')][_0x90cf('0x10a')](db[_0x90cf('0x196')],{'as':{'plural':_0x90cf('0x197'),'singular':_0x90cf('0x198')},'foreignKey':_0x90cf('0x199'),'onDelete':'cascade','hooks':!![]});db[_0x90cf('0x77')]['hasMany'](db[_0x90cf('0x196')],{'as':{'plural':'Any','singular':'OneAny'},'foreignKey':_0x90cf('0x19a'),'onDelete':_0x90cf('0x10f'),'hooks':!![]});db[_0x90cf('0x77')][_0x90cf('0x10a')](db[_0x90cf('0x75')],{'as':_0x90cf('0x19b'),'foreignKey':'AutomationId','onDelete':_0x90cf('0x10f'),'hooks':!![]});db[_0x90cf('0x7b')]['hasMany'](db[_0x90cf('0x7b')],{'as':_0x90cf('0x16f'),'foreignKey':'ParentId','onDelete':_0x90cf('0x10f')});db[_0x90cf('0x7e')][_0x90cf('0x10a')](db['Interval'],{'as':_0x90cf('0x19c'),'foreignKey':_0x90cf('0x149'),'onDelete':_0x90cf('0x10f'),'hooks':!![],'required':![]});db[_0x90cf('0x7e')][_0x90cf('0x10a')](db[_0x90cf('0x16')],{'as':_0x90cf('0x10e'),'foreignKey':'IntervalId','onDelete':_0x90cf('0x16b')});db[_0x90cf('0x7e')][_0x90cf('0x10a')](db[_0x90cf('0x3f')],{'as':_0x90cf('0x19d'),'foreignKey':_0x90cf('0x149')});db[_0x90cf('0x7e')][_0x90cf('0x10a')](db[_0x90cf('0x5f')],{'as':_0x90cf('0x19e'),'foreignKey':'IntervalId'});db[_0x90cf('0x7e')]['hasMany'](db['FaxApplication'],{'as':_0x90cf('0x19f'),'foreignKey':_0x90cf('0x149')});db[_0x90cf('0x7e')][_0x90cf('0x10a')](db[_0x90cf('0x4f')],{'as':_0x90cf('0x1a0'),'foreignKey':_0x90cf('0x149')});db[_0x90cf('0x1a1')][_0x90cf('0x11a')](db[_0x90cf('0x38')],{});db['Schedule'][_0x90cf('0x11a')](db[_0x90cf('0x92')],{'foreignKey':_0x90cf('0x1a2')});db[_0x90cf('0x1a1')][_0x90cf('0x11a')](db[_0x90cf('0x90')],{'foreignKey':_0x90cf('0x1a3')});db[_0x90cf('0x84')][_0x90cf('0x11b')](db['VoiceMusicOnHold'],{'as':_0x90cf('0x1a4'),'through':_0x90cf('0x142'),'onDelete':_0x90cf('0x16b')});db[_0x90cf('0x86')][_0x90cf('0x11b')](db[_0x90cf('0x6b')],{'through':_0x90cf('0x194')});db[_0x90cf('0x86')][_0x90cf('0x11b')](db[_0x90cf('0x61')],{'through':'chat_interaction_has_tags'});db['Tag'][_0x90cf('0x11b')](db['MailInteraction'],{'through':_0x90cf('0x163')});db['Tag'][_0x90cf('0x11b')](db[_0x90cf('0x50')],{'through':_0x90cf('0x17e')});db['Tag'][_0x90cf('0x11b')](db['FaxInteraction'],{'through':_0x90cf('0x175')});db['Tag'][_0x90cf('0x11b')](db[_0x90cf('0x113')],{'through':_0x90cf('0x184')});db[_0x90cf('0x86')][_0x90cf('0x11b')](db[_0x90cf('0xfc')],{'through':'whatsapp_interaction_has_tags'});db['Trigger']['hasMany'](db['Condition'],{'as':{'plural':_0x90cf('0x1a5'),'singular':_0x90cf('0x1a6')},'foreignKey':_0x90cf('0x1a7'),'onDelete':_0x90cf('0x10f'),'hooks':!![]});db[_0x90cf('0x1a8')][_0x90cf('0x10a')](db[_0x90cf('0x196')],{'as':{'plural':_0x90cf('0x1a9'),'singular':_0x90cf('0x1aa')},'foreignKey':_0x90cf('0x1ab'),'onDelete':_0x90cf('0x10f'),'hooks':!![]});db['Trigger'][_0x90cf('0x10a')](db['Action'],{'as':_0x90cf('0x19b'),'foreignKey':_0x90cf('0x1ac'),'onDelete':_0x90cf('0x10f'),'hooks':!![]});db[_0x90cf('0x90')]['hasMany'](db[_0x90cf('0x98')],{'as':_0x90cf('0x1ad'),'onDelete':_0x90cf('0x10f'),'foreignKey':_0x90cf('0x1a3'),'hooks':!![]});db['AnalyticDefaultReport'][_0x90cf('0x10a')](db[_0x90cf('0x98')],{'as':_0x90cf('0x1ad'),'onDelete':_0x90cf('0x10f'),'foreignKey':_0x90cf('0x1a2')});db[_0x90cf('0x96')][_0x90cf('0x10a')](db[_0x90cf('0x98')],{'as':_0x90cf('0x1ad'),'onDelete':_0x90cf('0x10f'),'foreignKey':_0x90cf('0x1ae')});db[_0x90cf('0x98')][_0x90cf('0x11a')](db['AnalyticMetric'],{'foreignKey':_0x90cf('0x1ae')});db['SalesforceAccount'][_0x90cf('0x10a')](db[_0x90cf('0x9d')],{'as':_0x90cf('0x1af'),'onDelete':'cascade','foreignKey':'AccountId'});db[_0x90cf('0x9d')][_0x90cf('0x10a')](db[_0x90cf('0x9f')],{'as':_0x90cf('0x1b0'),'onDelete':'cascade','foreignKey':'SubjectId'});db[_0x90cf('0x9d')][_0x90cf('0x10a')](db[_0x90cf('0x9f')],{'as':_0x90cf('0x1b1'),'onDelete':_0x90cf('0x10f'),'foreignKey':_0x90cf('0x1b2')});db[_0x90cf('0x9d')]['hasMany'](db[_0x90cf('0x9f')],{'as':_0x90cf('0x1ad'),'onDelete':'cascade','foreignKey':_0x90cf('0x1b3')});db[_0x90cf('0x9d')][_0x90cf('0x11a')](db[_0x90cf('0x9c')],{'as':'Account','foreignKey':'AccountId'});db[_0x90cf('0x9f')]['hasMany'](db['SalesforceField'],{'as':_0x90cf('0x1b4'),'foreignKey':'SubjectId'});db['SalesforceField'][_0x90cf('0x10a')](db['SalesforceField'],{'as':_0x90cf('0x1b5'),'foreignKey':_0x90cf('0x1b2')});db[_0x90cf('0x9f')][_0x90cf('0x10a')](db['SalesforceField'],{'as':'Field','foreignKey':_0x90cf('0x1b3')});db[_0x90cf('0x9f')][_0x90cf('0x11a')](db[_0x90cf('0x8a')],{'as':_0x90cf('0x8a'),'foreignKey':_0x90cf('0x1b6')});db[_0x90cf('0xa1')][_0x90cf('0x10a')](db['SugarcrmConfiguration'],{'as':_0x90cf('0x1af'),'onDelete':_0x90cf('0x10f'),'foreignKey':'AccountId'});db['SugarcrmConfiguration'][_0x90cf('0x10a')](db[_0x90cf('0xa5')],{'as':_0x90cf('0x1b0'),'onDelete':_0x90cf('0x10f'),'foreignKey':_0x90cf('0x1b7')});db[_0x90cf('0xa3')][_0x90cf('0x10a')](db[_0x90cf('0xa5')],{'as':_0x90cf('0x1b1'),'onDelete':_0x90cf('0x10f'),'foreignKey':_0x90cf('0x1b2')});db[_0x90cf('0xa3')][_0x90cf('0x10a')](db[_0x90cf('0xa5')],{'as':_0x90cf('0x1ad'),'onDelete':'cascade','foreignKey':_0x90cf('0x1b3')});db[_0x90cf('0xa3')][_0x90cf('0x11a')](db['SugarcrmAccount'],{'as':_0x90cf('0x160'),'foreignKey':_0x90cf('0x1b8')});db[_0x90cf('0xa5')][_0x90cf('0x10a')](db[_0x90cf('0xa5')],{'as':_0x90cf('0x1b4'),'foreignKey':_0x90cf('0x1b7')});db[_0x90cf('0xa5')][_0x90cf('0x10a')](db['SugarcrmField'],{'as':'Description','foreignKey':'DescriptionId'});db[_0x90cf('0xa5')][_0x90cf('0x10a')](db[_0x90cf('0xa5')],{'as':_0x90cf('0x1b9'),'foreignKey':'FieldId'});db[_0x90cf('0xa5')][_0x90cf('0x11a')](db[_0x90cf('0x8a')],{'as':_0x90cf('0x8a'),'foreignKey':_0x90cf('0x1b6')});db['DeskAccount'][_0x90cf('0x10a')](db[_0x90cf('0xa8')],{'as':_0x90cf('0x1af'),'onDelete':'cascade','foreignKey':_0x90cf('0x1b8')});db['DeskConfiguration']['hasMany'](db[_0x90cf('0x1ba')],{'as':_0x90cf('0x1b0'),'onDelete':_0x90cf('0x10f'),'foreignKey':_0x90cf('0x1b7')});db['DeskConfiguration']['hasMany'](db[_0x90cf('0x1ba')],{'as':_0x90cf('0x1b1'),'onDelete':_0x90cf('0x10f'),'foreignKey':_0x90cf('0x1b2')});db[_0x90cf('0xa8')][_0x90cf('0x10a')](db['DeskField'],{'as':_0x90cf('0x1ad'),'onDelete':_0x90cf('0x10f'),'foreignKey':'FieldId'});db['DeskConfiguration'][_0x90cf('0x11a')](db[_0x90cf('0xa7')],{'as':_0x90cf('0x160'),'foreignKey':_0x90cf('0x1b8')});db['DeskConfiguration'][_0x90cf('0x11b')](db[_0x90cf('0x86')],{'through':_0x90cf('0x1bb')});db[_0x90cf('0x1ba')]['hasMany'](db[_0x90cf('0x1ba')],{'as':'Subject','foreignKey':_0x90cf('0x1b7')});db[_0x90cf('0x1ba')][_0x90cf('0x10a')](db[_0x90cf('0x1ba')],{'as':_0x90cf('0x1b5'),'foreignKey':_0x90cf('0x1b2')});db[_0x90cf('0x1ba')][_0x90cf('0x10a')](db['DeskField'],{'as':_0x90cf('0x1b9'),'foreignKey':_0x90cf('0x1b3')});db[_0x90cf('0x1ba')]['belongsTo'](db[_0x90cf('0x8a')],{'as':'Variable','foreignKey':'VariableId'});db[_0x90cf('0xab')]['hasMany'](db['ZohoConfiguration'],{'as':_0x90cf('0x1af'),'onDelete':_0x90cf('0x10f'),'foreignKey':_0x90cf('0x1b8')});db[_0x90cf('0xac')]['hasMany'](db['ZohoField'],{'as':_0x90cf('0x1b0'),'onDelete':_0x90cf('0x10f'),'foreignKey':_0x90cf('0x1b7')});db['ZohoConfiguration']['hasMany'](db[_0x90cf('0xae')],{'as':_0x90cf('0x1b1'),'onDelete':'cascade','foreignKey':_0x90cf('0x1b2')});db[_0x90cf('0xac')][_0x90cf('0x10a')](db['ZohoField'],{'as':_0x90cf('0x1ad'),'onDelete':'cascade','foreignKey':_0x90cf('0x1b3')});db[_0x90cf('0xac')]['belongsTo'](db['ZohoAccount'],{'as':'Account','foreignKey':_0x90cf('0x1b8')});db[_0x90cf('0xae')][_0x90cf('0x10a')](db['ZohoField'],{'as':_0x90cf('0x1b4'),'foreignKey':_0x90cf('0x1b7')});db['ZohoField'][_0x90cf('0x10a')](db[_0x90cf('0xae')],{'as':_0x90cf('0x1b5'),'foreignKey':_0x90cf('0x1b2')});db[_0x90cf('0xae')][_0x90cf('0x10a')](db[_0x90cf('0xae')],{'as':'Field','foreignKey':_0x90cf('0x1b3')});db['ZohoField'][_0x90cf('0x11a')](db[_0x90cf('0x8a')],{'as':'Variable','foreignKey':_0x90cf('0x1b6')});db[_0x90cf('0xaf')][_0x90cf('0x10a')](db['ZendeskConfiguration'],{'as':_0x90cf('0x1af'),'onDelete':_0x90cf('0x10f'),'foreignKey':_0x90cf('0x1b8')});db[_0x90cf('0xb1')][_0x90cf('0x10a')](db['ZendeskField'],{'as':_0x90cf('0x1b0'),'foreignKey':'SubjectId'});db[_0x90cf('0xb1')][_0x90cf('0x10a')](db['ZendeskField'],{'as':_0x90cf('0x1b1'),'foreignKey':_0x90cf('0x1b2')});db[_0x90cf('0xb1')][_0x90cf('0x10a')](db[_0x90cf('0x1bc')],{'as':_0x90cf('0x1ad'),'foreignKey':_0x90cf('0x1b3')});db[_0x90cf('0xb1')][_0x90cf('0x11a')](db[_0x90cf('0xaf')],{'as':_0x90cf('0x160'),'foreignKey':_0x90cf('0x1b8')});db[_0x90cf('0xb1')][_0x90cf('0x11b')](db[_0x90cf('0x86')],{'through':_0x90cf('0x1bd')});db['ZendeskField']['hasMany'](db[_0x90cf('0x1bc')],{'as':'Subject','foreignKey':_0x90cf('0x1b7')});db[_0x90cf('0x1bc')][_0x90cf('0x10a')](db[_0x90cf('0x1bc')],{'as':'Description','foreignKey':_0x90cf('0x1b2')});db[_0x90cf('0x1bc')][_0x90cf('0x10a')](db[_0x90cf('0x1bc')],{'as':'Field','foreignKey':_0x90cf('0x1b3')});db[_0x90cf('0x1bc')][_0x90cf('0x11a')](db[_0x90cf('0x8a')],{'as':'Variable','foreignKey':_0x90cf('0x1b6')});db['FreshdeskAccount']['hasMany'](db['FreshdeskConfiguration'],{'as':_0x90cf('0x1af'),'onDelete':_0x90cf('0x10f'),'foreignKey':_0x90cf('0x1b8')});db['FreshdeskConfiguration']['hasMany'](db[_0x90cf('0x1be')],{'as':'Subjects','onDelete':_0x90cf('0x10f'),'foreignKey':_0x90cf('0x1b7')});db[_0x90cf('0xb6')][_0x90cf('0x10a')](db[_0x90cf('0x1be')],{'as':_0x90cf('0x1b1'),'onDelete':_0x90cf('0x10f'),'foreignKey':_0x90cf('0x1b2')});db[_0x90cf('0xb6')]['hasMany'](db[_0x90cf('0x1be')],{'as':_0x90cf('0x1ad'),'onDelete':'cascade','foreignKey':_0x90cf('0x1b3')});db[_0x90cf('0xb6')][_0x90cf('0x11a')](db[_0x90cf('0xb4')],{'as':_0x90cf('0x160'),'foreignKey':_0x90cf('0x1b8')});db['FreshdeskConfiguration']['belongsToMany'](db[_0x90cf('0x86')],{'through':_0x90cf('0x1bf')});db['FreshdeskField']['hasMany'](db[_0x90cf('0x1be')],{'as':_0x90cf('0x1b4'),'foreignKey':_0x90cf('0x1b7')});db[_0x90cf('0x1be')][_0x90cf('0x10a')](db[_0x90cf('0x1be')],{'as':_0x90cf('0x1b5'),'foreignKey':_0x90cf('0x1b2')});db[_0x90cf('0x1be')][_0x90cf('0x10a')](db['FreshdeskField'],{'as':_0x90cf('0x1b9'),'foreignKey':'FieldId'});db['FreshdeskField'][_0x90cf('0x11a')](db[_0x90cf('0x8a')],{'as':_0x90cf('0x8a'),'foreignKey':_0x90cf('0x1b6')});db[_0x90cf('0xb9')][_0x90cf('0x10a')](db[_0x90cf('0xbb')],{'as':_0x90cf('0x1af'),'onDelete':_0x90cf('0x10f'),'foreignKey':_0x90cf('0x1b8')});db[_0x90cf('0xbb')][_0x90cf('0x10a')](db[_0x90cf('0xbd')],{'as':_0x90cf('0x1b0'),'foreignKey':_0x90cf('0x1b7')});db[_0x90cf('0xbb')]['hasMany'](db[_0x90cf('0xbd')],{'as':_0x90cf('0x1b1'),'foreignKey':_0x90cf('0x1b2')});db[_0x90cf('0xbb')][_0x90cf('0x10a')](db[_0x90cf('0xbd')],{'as':_0x90cf('0x1ad'),'foreignKey':_0x90cf('0x1b3')});db[_0x90cf('0xbb')][_0x90cf('0x11a')](db[_0x90cf('0xb9')],{'as':_0x90cf('0x160'),'foreignKey':_0x90cf('0x1b8')});db[_0x90cf('0xbd')][_0x90cf('0x10a')](db[_0x90cf('0xbd')],{'as':_0x90cf('0x1b4'),'foreignKey':_0x90cf('0x1b7')});db['VtigerField'][_0x90cf('0x10a')](db[_0x90cf('0xbd')],{'as':_0x90cf('0x1b5'),'foreignKey':_0x90cf('0x1b2')});db['VtigerField'][_0x90cf('0x10a')](db['VtigerField'],{'as':_0x90cf('0x1b9'),'foreignKey':_0x90cf('0x1b3')});db[_0x90cf('0xbd')][_0x90cf('0x11a')](db[_0x90cf('0x8a')],{'as':_0x90cf('0x8a'),'foreignKey':_0x90cf('0x1b6')});db['ServicenowAccount'][_0x90cf('0x10a')](db[_0x90cf('0xbf')],{'as':_0x90cf('0x1af'),'onDelete':'cascade','foreignKey':_0x90cf('0x1b8')});db['ServicenowConfiguration']['hasMany'](db[_0x90cf('0x1c0')],{'as':_0x90cf('0x1b0'),'foreignKey':_0x90cf('0x1b7')});db[_0x90cf('0xbf')][_0x90cf('0x10a')](db['ServicenowField'],{'as':_0x90cf('0x1b1'),'foreignKey':'DescriptionId'});db[_0x90cf('0xbf')][_0x90cf('0x10a')](db[_0x90cf('0x1c0')],{'as':'Fields','foreignKey':_0x90cf('0x1b3')});db[_0x90cf('0xbf')][_0x90cf('0x11a')](db[_0x90cf('0x1c1')],{'as':'Account','foreignKey':_0x90cf('0x1b8')});db[_0x90cf('0x1c0')][_0x90cf('0x10a')](db[_0x90cf('0x1c0')],{'as':_0x90cf('0x1b4'),'foreignKey':_0x90cf('0x1b7')});db[_0x90cf('0x1c0')]['hasMany'](db[_0x90cf('0x1c0')],{'as':'Description','foreignKey':_0x90cf('0x1b2')});db[_0x90cf('0x1c0')][_0x90cf('0x10a')](db['ServicenowField'],{'as':_0x90cf('0x1b9'),'foreignKey':_0x90cf('0x1b3')});db[_0x90cf('0x1c0')][_0x90cf('0x11a')](db[_0x90cf('0x8a')],{'as':_0x90cf('0x8a'),'foreignKey':_0x90cf('0x1b6')});db['Dynamics365Account'][_0x90cf('0x10a')](db[_0x90cf('0x1c2')],{'as':_0x90cf('0x1af'),'onDelete':_0x90cf('0x10f'),'foreignKey':_0x90cf('0x1b8')});db['Dynamics365Configuration'][_0x90cf('0x10a')](db[_0x90cf('0xc3')],{'as':_0x90cf('0x1b0'),'onDelete':_0x90cf('0x10f'),'foreignKey':_0x90cf('0x1b7')});db[_0x90cf('0x1c2')][_0x90cf('0x10a')](db[_0x90cf('0xc3')],{'as':_0x90cf('0x1b1'),'onDelete':_0x90cf('0x10f'),'foreignKey':_0x90cf('0x1b2')});db[_0x90cf('0x1c2')][_0x90cf('0x10a')](db[_0x90cf('0xc3')],{'as':_0x90cf('0x1ad'),'onDelete':_0x90cf('0x10f'),'foreignKey':_0x90cf('0x1b3')});db[_0x90cf('0x1c2')][_0x90cf('0x11a')](db[_0x90cf('0x1c3')],{'as':'Account','foreignKey':'AccountId'});db[_0x90cf('0xc3')][_0x90cf('0x10a')](db[_0x90cf('0xc3')],{'as':_0x90cf('0x1b4'),'foreignKey':'SubjectId'});db[_0x90cf('0xc3')][_0x90cf('0x10a')](db[_0x90cf('0xc3')],{'as':'Description','foreignKey':_0x90cf('0x1b2')});db[_0x90cf('0xc3')]['hasMany'](db[_0x90cf('0xc3')],{'as':_0x90cf('0x1b9'),'foreignKey':'FieldId'});db[_0x90cf('0xc3')][_0x90cf('0x11a')](db[_0x90cf('0x8a')],{'as':_0x90cf('0x8a'),'foreignKey':_0x90cf('0x1b6')});db[_0x90cf('0x1c4')][_0x90cf('0x10a')](db[_0x90cf('0xc6')],{'as':_0x90cf('0x1af'),'onDelete':_0x90cf('0x10f'),'foreignKey':_0x90cf('0x1b8')});db[_0x90cf('0xc6')][_0x90cf('0x10a')](db[_0x90cf('0xc8')],{'as':_0x90cf('0x1b0'),'foreignKey':_0x90cf('0x1b7')});db[_0x90cf('0xc6')][_0x90cf('0x10a')](db[_0x90cf('0xc8')],{'as':_0x90cf('0x1b1'),'foreignKey':_0x90cf('0x1b2')});db['FreshsalesConfiguration']['hasMany'](db[_0x90cf('0xc8')],{'as':_0x90cf('0x1ad'),'foreignKey':_0x90cf('0x1b3')});db[_0x90cf('0xc6')][_0x90cf('0x11a')](db[_0x90cf('0x1c4')],{'as':_0x90cf('0x160'),'foreignKey':_0x90cf('0x1b8')});db[_0x90cf('0xc8')][_0x90cf('0x10a')](db[_0x90cf('0xc8')],{'as':_0x90cf('0x1b4'),'foreignKey':_0x90cf('0x1b7')});db[_0x90cf('0xc8')][_0x90cf('0x10a')](db[_0x90cf('0xc8')],{'as':_0x90cf('0x1b5'),'foreignKey':_0x90cf('0x1b2')});db[_0x90cf('0xc8')]['hasMany'](db[_0x90cf('0xc8')],{'as':_0x90cf('0x1b9'),'foreignKey':_0x90cf('0x1b3')});db['FreshsalesField'][_0x90cf('0x11a')](db[_0x90cf('0x8a')],{'as':_0x90cf('0x8a'),'foreignKey':_0x90cf('0x1b6')});db[_0x90cf('0xcb')][_0x90cf('0x11a')](db['ChatWebsite'],{});db[_0x90cf('0xcb')][_0x90cf('0x11a')](db['CmList'],{'as':_0x90cf('0x16d'),'foreignKey':_0x90cf('0x15a')});db['ChatQueueReport']['belongsTo'](db[_0x90cf('0x6b')],{'as':'Contact','foreignKey':'ContactId'});db['ChatQueueReport'][_0x90cf('0x11a')](db[_0x90cf('0x61')],{});db[_0x90cf('0xcb')][_0x90cf('0x11a')](db[_0x90cf('0x63')],{});db[_0x90cf('0xcb')][_0x90cf('0x11a')](db['User'],{});db[_0x90cf('0xcb')]['belongsTo'](db[_0x90cf('0x66')],{});db[_0x90cf('0xcd')][_0x90cf('0x11a')](db[_0x90cf('0x12')],{'onDelete':'cascade','foreignKey':_0x90cf('0x1c5')});db[_0x90cf('0xcd')][_0x90cf('0x11a')](db[_0x90cf('0x12')],{'onDelete':'cascade','foreignKey':_0x90cf('0x1c6')});db[_0x90cf('0x146')][_0x90cf('0x10a')](db[_0x90cf('0x1c7')],{'foreignKey':'SessionId','onDelete':_0x90cf('0x10f')});db[_0x90cf('0x146')][_0x90cf('0x10a')](db[_0x90cf('0x1c8')],{'foreignKey':'SessionId','onDelete':_0x90cf('0x10f')});db[_0x90cf('0xd1')][_0x90cf('0x11a')](db['SmsAccount'],{});db[_0x90cf('0xd1')]['belongsTo'](db['CmList'],{'as':'List','foreignKey':_0x90cf('0x15a')});db[_0x90cf('0xd1')][_0x90cf('0x11a')](db['CmContact'],{'as':_0x90cf('0x167'),'foreignKey':_0x90cf('0x161')});db['SmsQueueReport'][_0x90cf('0x11a')](db['SmsInteraction'],{});db[_0x90cf('0xd1')]['belongsTo'](db['SmsMessage'],{});db[_0x90cf('0xd1')][_0x90cf('0x11a')](db[_0x90cf('0x12')],{});db[_0x90cf('0xd1')]['belongsTo'](db[_0x90cf('0x54')],{});db[_0x90cf('0xd6')][_0x90cf('0x10a')](db[_0x90cf('0x146')],{'foreignKey':_0x90cf('0x1c9')});db[_0x90cf('0xd6')][_0x90cf('0x10a')](db['JscriptyQuestionReport'],{'foreignKey':_0x90cf('0x1c9')});db[_0x90cf('0xd6')][_0x90cf('0x10a')](db[_0x90cf('0x1c8')],{'foreignKey':_0x90cf('0x1c9')});db[_0x90cf('0x13b')]['belongsToMany'](db['User'],{'as':_0x90cf('0x176'),'through':_0x90cf('0x1ca')});db[_0x90cf('0xde')][_0x90cf('0x11b')](db['User'],{'as':_0x90cf('0x15d'),'through':_0x90cf('0x122')});db[_0x90cf('0xde')]['belongsToMany'](db[_0x90cf('0x129')],{'through':_0x90cf('0x107'),'as':_0x90cf('0x12a')});db[_0x90cf('0xde')][_0x90cf('0x11b')](db[_0x90cf('0x3a')],{'through':_0x90cf('0x15e'),'as':_0x90cf('0x1cb')});db[_0x90cf('0xde')][_0x90cf('0x11b')](db[_0x90cf('0x66')],{'through':'team_has_chat_queues','as':'ChatQueues'});db[_0x90cf('0xde')][_0x90cf('0x11b')](db[_0x90cf('0x173')],{'through':_0x90cf('0x1cc'),'as':_0x90cf('0x12c')});db[_0x90cf('0xde')][_0x90cf('0x11b')](db[_0x90cf('0x54')],{'through':_0x90cf('0x180'),'as':_0x90cf('0x12d')});db[_0x90cf('0xde')][_0x90cf('0x11b')](db['OpenchannelQueue'],{'through':_0x90cf('0x185'),'as':_0x90cf('0x1cd')});db[_0x90cf('0xde')][_0x90cf('0x11b')](db[_0x90cf('0x103')],{'through':'team_has_whatsapp_queues','as':_0x90cf('0x12e')});db[_0x90cf('0x195')]['hasMany'](db['CmHopper'],{'as':_0x90cf('0x191'),'foreignKey':_0x90cf('0x1ce')});db['Campaign'][_0x90cf('0x10a')](db[_0x90cf('0x110')],{'as':_0x90cf('0x111'),'foreignKey':_0x90cf('0x1ce')});db[_0x90cf('0x195')][_0x90cf('0x10a')](db[_0x90cf('0x71')],{'as':_0x90cf('0x145'),'foreignKey':_0x90cf('0x1ce')});db[_0x90cf('0x195')][_0x90cf('0x10a')](db[_0x90cf('0x6e')],{'as':_0x90cf('0x1cf'),'foreignKey':_0x90cf('0x1ce')});db['Campaign']['belongsTo'](db[_0x90cf('0x28')],{'as':_0x90cf('0x28'),'foreignKey':_0x90cf('0x147')});db[_0x90cf('0x195')]['belongsTo'](db['Trunk'],{'as':'TrunkBackup','foreignKey':_0x90cf('0x1d0')});db['Campaign'][_0x90cf('0x11a')](db[_0x90cf('0x7e')],{'as':'Interval','foreignKey':_0x90cf('0x149')});db['Campaign'][_0x90cf('0x11a')](db[_0x90cf('0x13b')],{'as':_0x90cf('0x13b'),'foreignKey':_0x90cf('0x1d1')});db[_0x90cf('0x195')][_0x90cf('0x11b')](db[_0x90cf('0xee')],{'as':_0x90cf('0x120'),'through':_0x90cf('0x1d2')});db['Campaign'][_0x90cf('0x11b')](db[_0x90cf('0xee')],{'as':_0x90cf('0x14d'),'through':_0x90cf('0x1d3')});db['Attachment']['belongsTo'](db[_0x90cf('0x64')],{'as':_0x90cf('0x64'),'foreignKey':_0x90cf('0x16a')});db['MailTransferReport'][_0x90cf('0x11a')](db[_0x90cf('0x158')],{});db[_0x90cf('0x1d4')][_0x90cf('0x11a')](db[_0x90cf('0x117')],{});db['MailTransferReport']['belongsTo'](db['MailAccount'],{'foreignKey':_0x90cf('0x1d5'),'as':_0x90cf('0x1d6')});db[_0x90cf('0x1d4')][_0x90cf('0x11a')](db[_0x90cf('0x12')],{'foreignKey':'FromUserId','as':_0x90cf('0x1d7')});db[_0x90cf('0x1d4')][_0x90cf('0x11a')](db[_0x90cf('0x12')],{'foreignKey':_0x90cf('0x1d8'),'as':'ToAgent'});db['MailTransferReport'][_0x90cf('0x11a')](db[_0x90cf('0x3a')],{'foreignKey':_0x90cf('0x1d9'),'as':_0x90cf('0x1da')});db[_0x90cf('0x1d4')]['belongsTo'](db[_0x90cf('0x38')],{'foreignKey':_0x90cf('0x1db'),'as':_0x90cf('0x1dc')});db[_0x90cf('0xe7')]['belongsTo'](db['ChatMessage'],{});db[_0x90cf('0xe7')][_0x90cf('0x11a')](db[_0x90cf('0x61')],{});db[_0x90cf('0xe7')][_0x90cf('0x11a')](db[_0x90cf('0x5c')],{'foreignKey':_0x90cf('0x1dd'),'as':_0x90cf('0x1d6')});db[_0x90cf('0xe7')]['belongsTo'](db[_0x90cf('0x12')],{'foreignKey':_0x90cf('0x1de'),'as':'FromAgent'});db[_0x90cf('0xe7')]['belongsTo'](db[_0x90cf('0x12')],{'foreignKey':_0x90cf('0x1d8'),'as':_0x90cf('0x1df')});db[_0x90cf('0xe7')][_0x90cf('0x11a')](db['ChatQueue'],{'foreignKey':_0x90cf('0x1e0'),'as':_0x90cf('0x1da')});db[_0x90cf('0xe7')][_0x90cf('0x11a')](db[_0x90cf('0x5c')],{'foreignKey':'ToChatWebsiteId','as':'ToAccount'});db[_0x90cf('0xe9')][_0x90cf('0x11a')](db['FaxMessage'],{});db[_0x90cf('0xe9')][_0x90cf('0x11a')](db[_0x90cf('0x49')],{});db[_0x90cf('0xe9')]['belongsTo'](db['FaxAccount'],{'foreignKey':_0x90cf('0x1e1'),'as':_0x90cf('0x1d6')});db[_0x90cf('0xe9')][_0x90cf('0x11a')](db[_0x90cf('0x12')],{'foreignKey':_0x90cf('0x1de'),'as':_0x90cf('0x1d7')});db['FaxTransferReport']['belongsTo'](db[_0x90cf('0x12')],{'foreignKey':_0x90cf('0x1d8'),'as':'ToAgent'});db['FaxTransferReport'][_0x90cf('0x11a')](db[_0x90cf('0x173')],{'foreignKey':_0x90cf('0x1e2'),'as':'ToQueue'});db[_0x90cf('0xe9')][_0x90cf('0x11a')](db['FaxAccount'],{'foreignKey':'ToFaxAccountId','as':_0x90cf('0x1dc')});db[_0x90cf('0xeb')][_0x90cf('0x11a')](db['OpenchannelMessage'],{});db[_0x90cf('0xeb')][_0x90cf('0x11a')](db[_0x90cf('0x113')],{});db['OpenchannelTransferReport'][_0x90cf('0x11a')](db[_0x90cf('0x56')],{'foreignKey':_0x90cf('0x1e3'),'as':_0x90cf('0x1d6')});db[_0x90cf('0xeb')][_0x90cf('0x11a')](db[_0x90cf('0x12')],{'foreignKey':_0x90cf('0x1de'),'as':_0x90cf('0x1d7')});db[_0x90cf('0xeb')][_0x90cf('0x11a')](db['User'],{'foreignKey':_0x90cf('0x1d8'),'as':_0x90cf('0x1df')});db[_0x90cf('0xeb')][_0x90cf('0x11a')](db[_0x90cf('0x5b')],{'foreignKey':_0x90cf('0x1e4'),'as':'ToQueue'});db[_0x90cf('0xeb')][_0x90cf('0x11a')](db[_0x90cf('0x56')],{'foreignKey':_0x90cf('0x1e5'),'as':_0x90cf('0x1dc')});db[_0x90cf('0x1e6')]['belongsTo'](db['SmsMessage'],{});db[_0x90cf('0x1e6')][_0x90cf('0x11a')](db['SmsInteraction'],{});db[_0x90cf('0x1e6')][_0x90cf('0x11a')](db[_0x90cf('0x4d')],{'foreignKey':_0x90cf('0x1e7'),'as':'FromAccount'});db[_0x90cf('0x1e6')][_0x90cf('0x11a')](db[_0x90cf('0x12')],{'foreignKey':_0x90cf('0x1de'),'as':_0x90cf('0x1d7')});db[_0x90cf('0x1e6')][_0x90cf('0x11a')](db[_0x90cf('0x12')],{'foreignKey':_0x90cf('0x1d8'),'as':_0x90cf('0x1df')});db[_0x90cf('0x1e6')][_0x90cf('0x11a')](db[_0x90cf('0x54')],{'foreignKey':_0x90cf('0x1e8'),'as':_0x90cf('0x1da')});db['SmsTransferReport'][_0x90cf('0x11a')](db[_0x90cf('0x4d')],{'foreignKey':'ToSmsAccountId','as':_0x90cf('0x1dc')});db[_0x90cf('0xee')]['hasMany'](db[_0x90cf('0x7b')],{'as':_0x90cf('0x16f'),'foreignKey':_0x90cf('0x15a')});db[_0x90cf('0xee')][_0x90cf('0x10a')](db[_0x90cf('0x1e9')],{'as':_0x90cf('0x1ea'),'foreignKey':_0x90cf('0x15a')});db[_0x90cf('0xee')]['hasMany'](db[_0x90cf('0x6b')],{'as':_0x90cf('0x11e'),'onDelete':_0x90cf('0x10f'),'foreignKey':_0x90cf('0x15a')});db['CmList'][_0x90cf('0x10a')](db[_0x90cf('0x110')],{'as':_0x90cf('0x111'),'foreignKey':_0x90cf('0x15a')});db[_0x90cf('0xee')]['hasMany'](db['CmHopperHistory'],{'as':_0x90cf('0x112'),'foreignKey':_0x90cf('0x15a')});db[_0x90cf('0xee')][_0x90cf('0x10a')](db['ReportAgentPreview'],{'as':_0x90cf('0x73'),'foreignKey':_0x90cf('0x15a')});db[_0x90cf('0xee')][_0x90cf('0x11b')](db[_0x90cf('0x129')],{'as':'Queues','through':'voice_queues_has_cm_lists'});db[_0x90cf('0xee')][_0x90cf('0x11b')](db['User'],{'as':'Agents','through':_0x90cf('0x121')});db[_0x90cf('0xf0')][_0x90cf('0x10a')](db[_0x90cf('0x16')],{'as':_0x90cf('0x10e'),'onDelete':'cascade'});db[_0x90cf('0xf0')][_0x90cf('0x11b')](db['User'],{'as':'Agents','through':_0x90cf('0x131')});db[_0x90cf('0xf2')][_0x90cf('0x10a')](db[_0x90cf('0x12')],{'as':_0x90cf('0x176'),'foreignKey':_0x90cf('0x1eb')});db[_0x90cf('0xf2')]['hasMany'](db[_0x90cf('0xf4')],{'as':'UserProfileSections','foreignKey':_0x90cf('0x1eb'),'onDelete':_0x90cf('0x10f')});db[_0x90cf('0xf4')]['hasMany'](db[_0x90cf('0xf6')],{'as':_0x90cf('0x1ec'),'foreignKey':_0x90cf('0x1ed'),'onDelete':_0x90cf('0x10f')});db[_0x90cf('0xf8')]['hasMany'](db[_0x90cf('0x7b')],{'as':_0x90cf('0x16f'),'foreignKey':'WhatsappAccountId'});db[_0x90cf('0xf8')][_0x90cf('0x10a')](db[_0x90cf('0x79')],{'as':_0x90cf('0x17b'),'foreignKey':'WhatsappAccountId'});db[_0x90cf('0xf8')][_0x90cf('0x10a')](db['WhatsappMessage'],{'as':'Messages','foreignKey':_0x90cf('0x1ee')});db[_0x90cf('0xf8')][_0x90cf('0x10a')](db[_0x90cf('0xfc')],{'as':'Interactions'});db[_0x90cf('0xf8')]['hasMany'](db[_0x90cf('0xfa')],{'as':'Applications'});db[_0x90cf('0xf8')][_0x90cf('0x11a')](db[_0x90cf('0xee')],{'as':_0x90cf('0x16d'),'foreignKey':_0x90cf('0x15a')});db[_0x90cf('0xf8')][_0x90cf('0x11a')](db[_0x90cf('0x80')],{'as':_0x90cf('0x14a'),'foreignKey':_0x90cf('0x14b')});db[_0x90cf('0xf8')][_0x90cf('0x11b')](db[_0x90cf('0x12')],{'as':_0x90cf('0x15d'),'through':_0x90cf('0x13a')});db[_0x90cf('0xfa')][_0x90cf('0x11a')](db['User'],{'onDelete':_0x90cf('0x16b')});db['WhatsappApplication'][_0x90cf('0x11a')](db['WhatsappQueue'],{'onDelete':_0x90cf('0x16b')});db['WhatsappApplication']['belongsTo'](db[_0x90cf('0xf8')],{'onDelete':_0x90cf('0x16b')});db[_0x90cf('0xfa')][_0x90cf('0x11a')](db[_0x90cf('0x7e')],{'onDelete':_0x90cf('0x16b'),'foreignKey':_0x90cf('0x149')});db[_0x90cf('0xfa')][_0x90cf('0x11a')](db[_0x90cf('0x86')],{'onDelete':_0x90cf('0x16b'),'foreignKey':_0x90cf('0x16c')});db['WhatsappInteraction'][_0x90cf('0x10a')](db['WhatsappMessage'],{'as':_0x90cf('0x14e'),'onDelete':_0x90cf('0x10f'),'foreignKey':_0x90cf('0x1ef')});db[_0x90cf('0xfc')][_0x90cf('0x11a')](db[_0x90cf('0xf8')],{'as':'Account','foreignKey':_0x90cf('0x1ee')});db['WhatsappInteraction'][_0x90cf('0x11a')](db['CmContact'],{'as':_0x90cf('0x167'),'foreignKey':_0x90cf('0x161')});db[_0x90cf('0xfc')]['belongsTo'](db['User'],{'as':_0x90cf('0x162'),'foreignKey':_0x90cf('0x10c')});db['WhatsappInteraction'][_0x90cf('0x11b')](db['Tag'],{'through':_0x90cf('0x1f0'),'as':_0x90cf('0x164')});db[_0x90cf('0xfc')][_0x90cf('0x11b')](db[_0x90cf('0x86')],{'through':_0x90cf('0x1f0'),'as':_0x90cf('0x165')});db[_0x90cf('0xfc')][_0x90cf('0x11b')](db[_0x90cf('0x12')],{'as':_0x90cf('0x176'),'through':_0x90cf('0x128'),'foreignKey':_0x90cf('0x1ef')});db[_0x90cf('0xfe')][_0x90cf('0x11a')](db[_0x90cf('0x12')],{'as':'User'});db['WhatsappMessage'][_0x90cf('0x11a')](db['CmContact'],{'onDelete':_0x90cf('0x10f'),'as':_0x90cf('0x167')});db[_0x90cf('0xfe')]['belongsTo'](db[_0x90cf('0xfc')],{'onDelete':_0x90cf('0x10f'),'as':'Interaction','foreignKey':_0x90cf('0x1ef')});db[_0x90cf('0xfe')][_0x90cf('0x11a')](db[_0x90cf('0xf8')],{'as':_0x90cf('0x160'),'foreignKey':'WhatsappAccountId'});db['WhatsappQueueReport'][_0x90cf('0x11a')](db['WhatsappAccount'],{});db[_0x90cf('0x100')][_0x90cf('0x11a')](db[_0x90cf('0xee')],{'as':'List','foreignKey':_0x90cf('0x15a')});db[_0x90cf('0x100')][_0x90cf('0x11a')](db[_0x90cf('0x6b')],{'as':_0x90cf('0x167'),'foreignKey':'ContactId'});db[_0x90cf('0x100')]['belongsTo'](db[_0x90cf('0xfc')],{});db[_0x90cf('0x100')]['belongsTo'](db[_0x90cf('0x103')],{});db[_0x90cf('0x100')][_0x90cf('0x11a')](db['WhatsappMessage'],{});db[_0x90cf('0x100')][_0x90cf('0x11a')](db[_0x90cf('0x12')],{});db[_0x90cf('0x102')]['belongsTo'](db[_0x90cf('0xfe')],{});db[_0x90cf('0x102')]['belongsTo'](db[_0x90cf('0xfc')],{});db[_0x90cf('0x102')][_0x90cf('0x11a')](db[_0x90cf('0xf8')],{'foreignKey':_0x90cf('0x1f1'),'as':'FromAccount'});db['WhatsappTransferReport'][_0x90cf('0x11a')](db[_0x90cf('0xf8')],{'foreignKey':'ToWhatsappAccountId','as':_0x90cf('0x1dc')});db[_0x90cf('0x102')][_0x90cf('0x11a')](db[_0x90cf('0x103')],{'foreignKey':_0x90cf('0x1f2'),'as':_0x90cf('0x1da')});db[_0x90cf('0x102')][_0x90cf('0x11a')](db[_0x90cf('0x12')],{'foreignKey':_0x90cf('0x1de'),'as':'FromAgent'});db[_0x90cf('0x102')][_0x90cf('0x11a')](db[_0x90cf('0x12')],{'foreignKey':_0x90cf('0x1d8'),'as':_0x90cf('0x1df')});db[_0x90cf('0x103')][_0x90cf('0x11b')](db['User'],{'as':'Agents','through':'UserWhatsappQueue','foreignKey':_0x90cf('0x1f3')});db[_0x90cf('0x103')]['belongsToMany'](db[_0x90cf('0xde')],{'through':_0x90cf('0x1f4'),'as':'Teams'});module['exports']={'db':db,'dbH':dbH}; \ No newline at end of file diff --git a/server/routes.js b/server/routes.js index 7b17bac..586dd43 100644 --- a/server/routes.js +++ b/server/routes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa7e8=['url','statusCode','responseTime','user','name','%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s\x20device=%s','device','agent_id','%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s\x20device=%s\x20(id=%s\x20name=%s)','other','test','./api/user','/api/voice/chanspy','./api/voiceChanSpy','/api/voice/contexts','./api/voiceContext','/api/voice/extensions','/api/voice/mohs','/api/voice/queues','./api/voiceQueue','/api/voice/recordings','./api/voiceRecording','/api/screen/recordings','./api/screenRecording','./api/voiceMail','/api/voice/mails/messages','./api/voiceMailMessage','/api/voice/calls/reports','./api/voiceCallReport','/api/voice/dials/reports','./api/voiceDialReport','/api/voice/agents/reports','./api/voiceAgentReport','/api/voice/queues/reports','./api/voiceQueueReport','/api/members/reports','./api/memberReport','/api/trunks','./api/trunk','/api/voice/transfers/reports','/api/mail/out_servers','./api/mailServerOut','./api/mailAccount','/api/mail/queues','/api/mail/substatuses','./api/mailSubstatus','/api/mail/interactions','./api/mailInteraction','/api/mail/messages','./api/mailMessage','/api/mail/applications','./api/mailApplication','./api/mailQueueReport','/api/dashboards','/api/dashboards/items','./api/dashboardItem','/api/fax/accounts','./api/faxAccount','/api/fax/applications','/api/fax/interactions','/api/fax/messages','./api/faxMessage','/api/fax/queues','/api/fax/reports/queue','/api/sms/accounts','/api/sms/applications','./api/smsApplication','/api/sms/interactions','./api/smsInteraction','/api/sms/messages','./api/smsMessage','/api/sms/queues','./api/smsQueue','/api/openchannel/accounts','/api/openchannel/applications','/api/openchannel/interactions','./api/openchannelInteraction','./api/openchannelMessage','/api/openchannel/queues','./api/openchannelQueue','./api/chatWebsite','/api/openchannel/reports/queue','./api/openchannelQueueReport','/api/chat/applications','./api/chatApplication','/api/chat/interactions','./api/chatOfflineMessage','./api/chatQueue','./api/chatGroup','./api/chatProactiveAction','./api/cmCompany','/api/cm/contacts','/api/cm/hopper_black','./api/cmHopperBlack','/api/cm/hopper_final','/api/cm/hopper_history','/api/cm/custom_fields','./api/cmCustomField','/api/actions','./api/action','/api/automations','./api/automation','/api/canned_answers','./api/cannedAnswer','/api/dispositions','/api/conditions','./api/condition','/api/intervals','./api/interval','./api/pause','/api/cdr','./api/cdr','/api/voiceQueuesLog','/api/schedules','./api/sound','/api/tags','./api/tag','/api/triggers','./api/trigger','./api/variable','./api/integration','/api/integrations/reports','./api/analyticCustomReport','/api/analytics/default_reports','./api/analyticDefaultReport','/api/analytics/extracted_reports','./api/analyticExtractedReport','/api/analytics/metrics','./api/analyticMetric','./api/analyticFieldReport','/api/analytics/tree_reports','/api/integrations/salesforce/accounts','/api/integrations/salesforce/configurations','./api/intSalesforceConfiguration','./api/intSalesforceField','/api/integrations/sugarcrm/accounts','./api/intSugarcrmAccount','./api/intSugarcrmConfiguration','./api/intSugarcrmField','/api/integrations/desk/configurations','./api/intDeskConfiguration','/api/integrations/desk/fields','./api/intDeskField','/api/integrations/zoho/accounts','./api/intZohoAccount','/api/integrations/zoho/configurations','./api/intZohoField','/api/integrations/zendesk/accounts','./api/intZendeskAccount','/api/integrations/zendesk/configurations','./api/intZendeskConfiguration','/api/integrations/zendesk/fields','/api/integrations/freshdesk/accounts','./api/intFreshdeskAccount','./api/intFreshdeskConfiguration','/api/integrations/freshdesk/fields','./api/intFreshdeskField','/api/integrations/vtiger/accounts','./api/intVtigerAccount','/api/integrations/vtiger/fields','./api/intVtigerField','/api/integrations/servicenow/accounts','./api/intServicenowAccount','./api/intServicenowConfiguration','/api/integrations/servicenow/fields','./api/intServicenowField','/api/integrations/dynamics365/accounts','./api/intDynamics365Account','/api/integrations/dynamics365/configurations','./api/intDynamics365Configuration','/api/integrations/dynamics365/fields','./api/intDynamics365Field','/api/integrations/freshsales/accounts','./api/intFreshsalesAccount','/api/integrations/freshsales/configurations','./api/intFreshsalesConfiguration','/api/integrations/freshsales/fields','/api/networks','/api/chat/reports/queue','./api/chatQueueReport','./api/chatInternalMessage','/api/jscripty/answers/reports','./api/jscriptyAnswerReport','./api/jscriptyQuestionReport','/api/jscripty/sessions/reports','./api/jscriptySessionReport','/api/sms/reports/queue','./api/smsQueueReport','/api/square/reports','./api/squareReport','./api/squareReportDetail','/api/jscripty/projects','/api/settings','./api/setting','/api/square/odbc','./api/squareOdbc','/api/square/projects','./api/squareProject','/api/square/recordings','/api/square/messages','/api/teams','/api/license','./api/license','/api/campaigns','./api/campaign','/api/migrations','./api/migration','/api/attachments','./api/attachment','/api/plugins','./api/plugin','/api/mail/reports/transfer','/api/chat/reports/transfer','./api/chatTransferReport','/api/fax/reports/transfer','/api/openchannel/reports/transfer','./api/openchannelTransferReport','./api/smsTransferReport','/api/voice/prefixes','/api/userProfiles','./api/userProfile','/api/userProfile/sections','./api/userProfileSection','/api/userProfile/resources','./api/userProfileResource','./api/userNotification','/api/whatsapp/accounts','./api/whatsappAccount','/api/whatsapp/applications','./api/whatsappInteraction','/api/whatsapp/messages','./api/whatsappMessage','/api/whatsapp/reports/queue','./api/whatsappQueueReport','/api/whatsapp/reports/transfer','./api/whatsappTransferReport','/api/whatsapp/queues','./api/whatsappQueue','/api/cloudProviders','/api/auth/local','./api/authLocal','./api/authGoogle','/api/jira','./api/jira','/api/rpc','/api/version','./api/version','./api/system','./api/pm2','/api/webbar','./api/webbar','static','root','join','/demo','/snippet','snippet','/plugins','route','/:url(api|auth|components|app|bower_components|assets)/*','get','resolve','appPath','/index.html','username','password','newPassword','apiKey','firstName','lastName','street','phone','mobile','fax','email','clientId','clientSecret','securityToken','accessKey','channelSecret','accessToken','accessTokenSecret','authToken','consumerSecret','membername','calleridname','calleridnum','exten','vidaooApiKey','clientEmail','privateKey','accesskeyid','key','pass','accountSid','localstationid','secret','oldPassword','isPlainObject','isArray','length','isString','replace','@@{','}@@','includes','lodash','path','express','util','./errors','./config/environment','api','./config/logger','auth','default','use','logger','%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s','isEmpty','\x20body=%s','body','method','headers','x-forwarded-for','connection','remoteAddress'];(function(_0x307b51,_0x35d5b3){var _0x38d4a6=function(_0x369275){while(--_0x369275){_0x307b51['push'](_0x307b51['shift']());}};_0x38d4a6(++_0x35d5b3);}(_0xa7e8,0x132));var _0x8a7e=function(_0x349579,_0x4951c3){_0x349579=_0x349579-0x0;var _0x24a2ef=_0xa7e8[_0x349579];return _0x24a2ef;};'use strict';var _=require(_0x8a7e('0x0'));var path=require(_0x8a7e('0x1'));var express=require(_0x8a7e('0x2'));var ewinston=require('express-winston');var util=require(_0x8a7e('0x3'));var errors=require(_0x8a7e('0x4'));var config=require(_0x8a7e('0x5'));var logger=require('./config/logger')(_0x8a7e('0x6'));var authLogger=require(_0x8a7e('0x7'))(_0x8a7e('0x8'));exports[_0x8a7e('0x9')]=function(_0x40cfc8){_0x40cfc8[_0x8a7e('0xa')](ewinston[_0x8a7e('0xb')]({'winstonInstance':logger,'meta':![],'statusLevels':!![],'msg':function(_0x2497e9,_0x2d7b1f){var _0x2ccae3=_0x8a7e('0xc');if(!_[_0x8a7e('0xd')](_0x2497e9['body'])){_0x2ccae3+=_0x8a7e('0xe');var _0x42ad75=_0x2497e9[_0x8a7e('0xf')];maskSensitiveData(_0x42ad75);}return util['format'](_0x2ccae3,_0x2497e9[_0x8a7e('0x10')],_0x2497e9[_0x8a7e('0x11')][_0x8a7e('0x12')]?_0x2497e9['headers'][_0x8a7e('0x12')]:_0x2497e9[_0x8a7e('0x13')][_0x8a7e('0x14')]||_0x2497e9['ip'],_0x2497e9[_0x8a7e('0x15')],_0x2d7b1f[_0x8a7e('0x16')],_0x2d7b1f[_0x8a7e('0x17')],_0x2497e9['user']?_0x2497e9[_0x8a7e('0x18')]['id']:null,_0x2497e9['user']?_0x2497e9[_0x8a7e('0x18')][_0x8a7e('0x19')]:null,_0x2497e9['user']?_0x2497e9['user']['role']:null,_0x42ad75?util['inspect'](_0x42ad75,![],null):'');}}));_0x40cfc8[_0x8a7e('0xa')](ewinston[_0x8a7e('0xb')]({'winstonInstance':authLogger,'meta':![],'statusLevels':!![],'msg':function(_0x33f965,_0xf0118a){var _0x5741d0=_0x8a7e('0x1a');if(_0x33f965['body']&&_0x33f965[_0x8a7e('0xf')][_0x8a7e('0x1b')]&&_0x33f965[_0x8a7e('0xf')][_0x8a7e('0x1c')]){_0x5741d0=_0x8a7e('0x1d');}return util['format'](_0x5741d0,_0x33f965['method'],_0x33f965[_0x8a7e('0x11')][_0x8a7e('0x12')]?_0x33f965[_0x8a7e('0x11')]['x-forwarded-for']:_0x33f965[_0x8a7e('0x13')][_0x8a7e('0x14')]||_0x33f965['ip'],_0x33f965[_0x8a7e('0x15')],_0xf0118a['statusCode'],_0xf0118a[_0x8a7e('0x17')],_0x33f965[_0x8a7e('0x18')]?_0x33f965[_0x8a7e('0x18')]['id']:null,_0x33f965[_0x8a7e('0x18')]?_0x33f965[_0x8a7e('0x18')]['name']:null,_0x33f965[_0x8a7e('0x18')]?_0x33f965['user']['role']:null,_0x33f965[_0x8a7e('0xf')]&&_0x33f965[_0x8a7e('0xf')][_0x8a7e('0x1b')]?_0x33f965[_0x8a7e('0xf')][_0x8a7e('0x1b')]:_0x8a7e('0x1e'),_0x33f965[_0x8a7e('0xf')]&&_0x33f965[_0x8a7e('0xf')][_0x8a7e('0x1c')]?_0x33f965[_0x8a7e('0xf')][_0x8a7e('0x1c')]:'',_0x33f965[_0x8a7e('0xf')]&&_0x33f965[_0x8a7e('0xf')]['agent_name']?_0x33f965[_0x8a7e('0xf')]['agent_name']:'');},'ignoreRoute':function(_0x33ecf1){var _0x4aa85f=/\/api\/users\/[0-9]+\/(login|logout)/gi;return!_0x4aa85f[_0x8a7e('0x1f')](_0x33ecf1[_0x8a7e('0x15')]);}}));_0x40cfc8[_0x8a7e('0xa')]('/api/users',require(_0x8a7e('0x20')));_0x40cfc8['use'](_0x8a7e('0x21'),require(_0x8a7e('0x22')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x23'),require(_0x8a7e('0x24')));_0x40cfc8['use'](_0x8a7e('0x25'),require('./api/voiceExtension'));_0x40cfc8['use'](_0x8a7e('0x26'),require('./api/voiceMusicOnHold'));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x27'),require(_0x8a7e('0x28')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x29'),require(_0x8a7e('0x2a')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x2b'),require(_0x8a7e('0x2c')));_0x40cfc8['use']('/api/voice/mails',require(_0x8a7e('0x2d')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x2e'),require(_0x8a7e('0x2f')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x30'),require(_0x8a7e('0x31')));_0x40cfc8['use'](_0x8a7e('0x32'),require(_0x8a7e('0x33')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x34'),require(_0x8a7e('0x35')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x36'),require(_0x8a7e('0x37')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x38'),require(_0x8a7e('0x39')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x3a'),require(_0x8a7e('0x3b')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x3c'),require('./api/voiceTransferReport'));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x3d'),require(_0x8a7e('0x3e')));_0x40cfc8[_0x8a7e('0xa')]('/api/mail/accounts',require(_0x8a7e('0x3f')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x40'),require('./api/mailQueue'));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x41'),require(_0x8a7e('0x42')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x43'),require(_0x8a7e('0x44')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x45'),require(_0x8a7e('0x46')));_0x40cfc8['use'](_0x8a7e('0x47'),require(_0x8a7e('0x48')));_0x40cfc8['use']('/api/mail/reports/queue',require(_0x8a7e('0x49')));_0x40cfc8['use'](_0x8a7e('0x4a'),require('./api/dashboard'));_0x40cfc8['use'](_0x8a7e('0x4b'),require(_0x8a7e('0x4c')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x4d'),require(_0x8a7e('0x4e')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x4f'),require('./api/faxApplication'));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x50'),require('./api/faxInteraction'));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x51'),require(_0x8a7e('0x52')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x53'),require('./api/faxQueue'));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x54'),require('./api/faxQueueReport'));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x55'),require('./api/smsAccount'));_0x40cfc8['use'](_0x8a7e('0x56'),require(_0x8a7e('0x57')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x58'),require(_0x8a7e('0x59')));_0x40cfc8['use'](_0x8a7e('0x5a'),require(_0x8a7e('0x5b')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x5c'),require(_0x8a7e('0x5d')));_0x40cfc8['use'](_0x8a7e('0x5e'),require('./api/openchannelAccount'));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x5f'),require('./api/openchannelApplication'));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x60'),require(_0x8a7e('0x61')));_0x40cfc8[_0x8a7e('0xa')]('/api/openchannel/messages',require(_0x8a7e('0x62')));_0x40cfc8['use'](_0x8a7e('0x63'),require(_0x8a7e('0x64')));_0x40cfc8['use']('/api/chat/websites',require(_0x8a7e('0x65')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x66'),require(_0x8a7e('0x67')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x68'),require(_0x8a7e('0x69')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x6a'),require('./api/chatInteraction'));_0x40cfc8['use']('/api/chat/messages',require('./api/chatMessage'));_0x40cfc8[_0x8a7e('0xa')]('/api/chat/offline_messages',require(_0x8a7e('0x6b')));_0x40cfc8[_0x8a7e('0xa')]('/api/chat/queues',require(_0x8a7e('0x6c')));_0x40cfc8['use']('/api/chat/groups',require(_0x8a7e('0x6d')));_0x40cfc8[_0x8a7e('0xa')]('/api/chat/proactive_actions',require(_0x8a7e('0x6e')));_0x40cfc8[_0x8a7e('0xa')]('/api/cm/companies',require(_0x8a7e('0x6f')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x70'),require('./api/cmContact'));_0x40cfc8[_0x8a7e('0xa')]('/api/cm/hopper',require('./api/cmHopper'));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x71'),require(_0x8a7e('0x72')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x73'),require('./api/cmHopperFinal'));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x74'),require('./api/cmHopperHistory'));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x75'),require(_0x8a7e('0x76')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x77'),require(_0x8a7e('0x78')));_0x40cfc8['use'](_0x8a7e('0x79'),require(_0x8a7e('0x7a')));_0x40cfc8['use'](_0x8a7e('0x7b'),require(_0x8a7e('0x7c')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x7d'),require('./api/disposition'));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x7e'),require(_0x8a7e('0x7f')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x80'),require(_0x8a7e('0x81')));_0x40cfc8['use']('/api/pauses',require(_0x8a7e('0x82')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x83'),require(_0x8a7e('0x84')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x85'),require('./api/voiceQueuesLog'));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x86'),require('./api/schedule'));_0x40cfc8['use']('/api/sounds',require(_0x8a7e('0x87')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x88'),require(_0x8a7e('0x89')));_0x40cfc8[_0x8a7e('0xa')]('/api/templates',require('./api/template'));_0x40cfc8['use'](_0x8a7e('0x8a'),require(_0x8a7e('0x8b')));_0x40cfc8[_0x8a7e('0xa')]('/api/variables',require(_0x8a7e('0x8c')));_0x40cfc8[_0x8a7e('0xa')]('/api/integrations',require(_0x8a7e('0x8d')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x8e'),require('./api/integrationReport'));_0x40cfc8[_0x8a7e('0xa')]('/api/analytics/custom_reports',require(_0x8a7e('0x8f')));_0x40cfc8['use'](_0x8a7e('0x90'),require(_0x8a7e('0x91')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x92'),require(_0x8a7e('0x93')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x94'),require(_0x8a7e('0x95')));_0x40cfc8[_0x8a7e('0xa')]('/api/analytics/field_reports',require(_0x8a7e('0x96')));_0x40cfc8['use'](_0x8a7e('0x97'),require('./api/analyticTreeReport'));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x98'),require('./api/intSalesforceAccount'));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x99'),require(_0x8a7e('0x9a')));_0x40cfc8[_0x8a7e('0xa')]('/api/integrations/salesforce/fields',require(_0x8a7e('0x9b')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x9c'),require(_0x8a7e('0x9d')));_0x40cfc8['use']('/api/integrations/sugarcrm/configurations',require(_0x8a7e('0x9e')));_0x40cfc8[_0x8a7e('0xa')]('/api/integrations/sugarcrm/fields',require(_0x8a7e('0x9f')));_0x40cfc8[_0x8a7e('0xa')]('/api/integrations/desk/accounts',require('./api/intDeskAccount'));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xa0'),require(_0x8a7e('0xa1')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xa2'),require(_0x8a7e('0xa3')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xa4'),require(_0x8a7e('0xa5')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xa6'),require('./api/intZohoConfiguration'));_0x40cfc8[_0x8a7e('0xa')]('/api/integrations/zoho/fields',require(_0x8a7e('0xa7')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xa8'),require(_0x8a7e('0xa9')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xaa'),require(_0x8a7e('0xab')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xac'),require('./api/intZendeskField'));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xad'),require(_0x8a7e('0xae')));_0x40cfc8['use']('/api/integrations/freshdesk/configurations',require(_0x8a7e('0xaf')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xb0'),require(_0x8a7e('0xb1')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xb2'),require(_0x8a7e('0xb3')));_0x40cfc8[_0x8a7e('0xa')]('/api/integrations/vtiger/configurations',require('./api/intVtigerConfiguration'));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xb4'),require(_0x8a7e('0xb5')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xb6'),require(_0x8a7e('0xb7')));_0x40cfc8[_0x8a7e('0xa')]('/api/integrations/servicenow/configurations',require(_0x8a7e('0xb8')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xb9'),require(_0x8a7e('0xba')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xbb'),require(_0x8a7e('0xbc')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xbd'),require(_0x8a7e('0xbe')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xbf'),require(_0x8a7e('0xc0')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xc1'),require(_0x8a7e('0xc2')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xc3'),require(_0x8a7e('0xc4')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xc5'),require('./api/intFreshsalesField'));_0x40cfc8['use'](_0x8a7e('0xc6'),require('./api/network'));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xc7'),require(_0x8a7e('0xc8')));_0x40cfc8[_0x8a7e('0xa')]('/api/chat/internal/messages',require(_0x8a7e('0xc9')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xca'),require(_0x8a7e('0xcb')));_0x40cfc8['use']('/api/jscripty/questions/reports',require(_0x8a7e('0xcc')));_0x40cfc8['use'](_0x8a7e('0xcd'),require(_0x8a7e('0xce')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xcf'),require(_0x8a7e('0xd0')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xd1'),require(_0x8a7e('0xd2')));_0x40cfc8['use']('/api/square/details/reports',require(_0x8a7e('0xd3')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xd4'),require('./api/jscriptyProject'));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xd5'),require(_0x8a7e('0xd6')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xd7'),require(_0x8a7e('0xd8')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xd9'),require(_0x8a7e('0xda')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xdb'),require('./api/squareRecording'));_0x40cfc8['use'](_0x8a7e('0xdc'),require('./api/squareMessage'));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xdd'),require('./api/team'));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xde'),require(_0x8a7e('0xdf')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xe0'),require(_0x8a7e('0xe1')));_0x40cfc8['use'](_0x8a7e('0xe2'),require(_0x8a7e('0xe3')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xe4'),require(_0x8a7e('0xe5')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xe6'),require(_0x8a7e('0xe7')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xe8'),require('./api/mailTransferReport'));_0x40cfc8['use'](_0x8a7e('0xe9'),require(_0x8a7e('0xea')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xeb'),require('./api/faxTransferReport'));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xec'),require(_0x8a7e('0xed')));_0x40cfc8[_0x8a7e('0xa')]('/api/sms/reports/transfer',require(_0x8a7e('0xee')));_0x40cfc8[_0x8a7e('0xa')]('/api/cm/lists',require('./api/cmList'));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xef'),require('./api/voicePrefix'));_0x40cfc8['use'](_0x8a7e('0xf0'),require(_0x8a7e('0xf1')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xf2'),require(_0x8a7e('0xf3')));_0x40cfc8['use'](_0x8a7e('0xf4'),require(_0x8a7e('0xf5')));_0x40cfc8['use']('/api/userNotifications',require(_0x8a7e('0xf6')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xf7'),require(_0x8a7e('0xf8')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xf9'),require('./api/whatsappApplication'));_0x40cfc8['use']('/api/whatsapp/interactions',require(_0x8a7e('0xfa')));_0x40cfc8['use'](_0x8a7e('0xfb'),require(_0x8a7e('0xfc')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xfd'),require(_0x8a7e('0xfe')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0xff'),require(_0x8a7e('0x100')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x101'),require(_0x8a7e('0x102')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x103'),require('./api/cloudProvider'));_0x40cfc8['use'](_0x8a7e('0x104'),require(_0x8a7e('0x105')));_0x40cfc8[_0x8a7e('0xa')]('/api/auth/google',require(_0x8a7e('0x106')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x107'),require(_0x8a7e('0x108')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x109'),require('./api/rpc'));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x10a'),require(_0x8a7e('0x10b')));_0x40cfc8['use']('/api/system',require(_0x8a7e('0x10c')));_0x40cfc8['use']('/api/pm2',require(_0x8a7e('0x10d')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x10e'),require(_0x8a7e('0x10f')));_0x40cfc8['use']('/apidoc',express[_0x8a7e('0x110')](path['join'](config[_0x8a7e('0x111')],'/apidoc')));_0x40cfc8[_0x8a7e('0xa')]('/www',express[_0x8a7e('0x110')](path[_0x8a7e('0x112')](config['root'],'/www')));_0x40cfc8['use'](_0x8a7e('0x113'),express[_0x8a7e('0x110')](path[_0x8a7e('0x112')](config[_0x8a7e('0x111')],_0x8a7e('0x113'))));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x114'),express[_0x8a7e('0x110')](path['join'](config[_0x8a7e('0x111')],_0x8a7e('0x115'),'3.0.0')));_0x40cfc8[_0x8a7e('0xa')](_0x8a7e('0x116'),express[_0x8a7e('0x110')](path[_0x8a7e('0x112')](config[_0x8a7e('0x111')],'/server/files/plugins')));_0x40cfc8[_0x8a7e('0x117')](_0x8a7e('0x118'))[_0x8a7e('0x119')](errors[0x194]);_0x40cfc8[_0x8a7e('0x117')]('/*')[_0x8a7e('0x119')](function(_0xe8d381,_0x3cb951){_0x3cb951['sendFile'](path[_0x8a7e('0x11a')](_0x40cfc8[_0x8a7e('0x119')](_0x8a7e('0x11b'))+_0x8a7e('0x11c')));});};var sensitiveFields=[_0x8a7e('0x11d'),_0x8a7e('0x11e'),_0x8a7e('0x11f'),_0x8a7e('0x120'),_0x8a7e('0x121'),_0x8a7e('0x122'),_0x8a7e('0x123'),_0x8a7e('0x124'),_0x8a7e('0x125'),_0x8a7e('0x126'),_0x8a7e('0x127'),_0x8a7e('0x128'),_0x8a7e('0x129'),_0x8a7e('0x12a'),'code',_0x8a7e('0x12b'),'tenantId','token',_0x8a7e('0x12c'),_0x8a7e('0x12d'),_0x8a7e('0x12e'),_0x8a7e('0x12f'),'consumerKey',_0x8a7e('0x130'),_0x8a7e('0x131'),_0x8a7e('0x132'),_0x8a7e('0x133'),_0x8a7e('0x134'),_0x8a7e('0x135'),_0x8a7e('0x136'),_0x8a7e('0x137'),_0x8a7e('0x138'),'secretaccesskey',_0x8a7e('0x139'),_0x8a7e('0x18'),_0x8a7e('0x13a'),_0x8a7e('0x13b'),_0x8a7e('0x13c'),'dsn',_0x8a7e('0x13d'),'registry',_0x8a7e('0x13e')];function maskSensitiveData(_0x2c6275){var _0x4a71ef=/(?!^)[\s\S](?!$)/g;if(!_[_0x8a7e('0x13f')](_0x2c6275))return;for(var _0x254963 in _0x2c6275){if(_[_0x8a7e('0x140')](_0x2c6275[_0x254963])){for(var _0x319b54=0x0;_0x319b54<_0x2c6275[_0x254963][_0x8a7e('0x141')];_0x319b54++){maskSensitiveData(_0x2c6275[_0x254963][_0x319b54]);}}else if(_[_0x8a7e('0x13f')](_0x2c6275[_0x254963])){maskSensitiveData(_0x2c6275[_0x254963]);}else if(_[_0x8a7e('0x142')](_0x2c6275[_0x254963])){_0x2c6275[_0x254963]=_0x2c6275[_0x254963][_0x8a7e('0x143')](/{{{/g,_0x8a7e('0x144'))[_0x8a7e('0x143')](/}}}/g,_0x8a7e('0x145'))[_0x8a7e('0x143')](/{{/g,'@{')[_0x8a7e('0x143')](/}}/g,'}@');if(_[_0x8a7e('0x146')](sensitiveFields,_0x254963)){_0x2c6275[_0x254963]=_0x2c6275[_0x254963]['replace'](_0x4a71ef,'*');}}}} \ No newline at end of file +var _0xb3f6=['/api/whatsapp/reports/transfer','./api/whatsappTransferReport','./api/whatsappQueue','/api/auth/local','/api/auth/google','./api/authGoogle','/api/jira','./api/jira','/api/rpc','/api/version','./api/version','/api/system','./api/system','/api/pm2','./api/pm2','/api/webbar','static','join','/apidoc','/www','/demo','root','snippet','3.0.0','/plugins','/server/files/plugins','route','/:url(api|auth|components|app|bower_components|assets)/*','sendFile','resolve','get','appPath','/index.html','username','newPassword','apiKey','firstName','lastName','street','phone','mobile','fax','clientId','securityToken','code','accessKey','token','channelSecret','accessToken','accessTokenSecret','authToken','consumerKey','consumerSecret','membername','calleridname','calleridnum','exten','vidaooApiKey','privateKey','accesskeyid','secretaccesskey','key','localstationid','dsn','secret','registry','oldPassword','isArray','isPlainObject','isString','replace','}@@','includes','lodash','path','express','express-winston','util','./errors','./config/environment','api','auth','default','use','logger','%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s','isEmpty','body','\x20body=%s','format','method','headers','x-forwarded-for','connection','remoteAddress','url','responseTime','user','role','device','agent_id','%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s\x20device=%s\x20(id=%s\x20name=%s)','statusCode','name','agent_name','test','./api/user','/api/voice/chanspy','./api/voiceChanSpy','/api/voice/contexts','/api/voice/extensions','./api/voiceExtension','/api/voice/mohs','./api/voiceMusicOnHold','/api/voice/queues','./api/voiceQueue','/api/voice/recordings','./api/voiceRecording','/api/screen/recordings','./api/screenRecording','/api/voice/mails','/api/voice/mails/messages','./api/voiceMailMessage','/api/voice/calls/reports','/api/voice/dials/reports','./api/voiceDialReport','/api/voice/agents/reports','./api/voiceAgentReport','/api/voice/queues/reports','./api/voiceQueueReport','/api/members/reports','./api/memberReport','/api/trunks','./api/trunk','./api/voiceTransferReport','/api/mail/out_servers','./api/mailServerOut','/api/mail/accounts','/api/mail/queues','./api/mailQueue','/api/mail/substatuses','./api/mailSubstatus','/api/mail/interactions','/api/mail/messages','./api/mailMessage','/api/mail/applications','./api/mailQueueReport','/api/dashboards','./api/dashboard','./api/dashboardItem','/api/fax/accounts','./api/faxAccount','./api/faxApplication','/api/fax/interactions','/api/fax/messages','./api/faxMessage','/api/fax/queues','./api/faxQueue','/api/fax/reports/queue','/api/sms/accounts','./api/smsAccount','/api/sms/interactions','./api/smsInteraction','/api/sms/messages','./api/smsMessage','/api/sms/queues','./api/smsQueue','/api/openchannel/accounts','./api/openchannelAccount','/api/openchannel/applications','./api/openchannelApplication','./api/openchannelInteraction','./api/openchannelMessage','./api/openchannelQueue','/api/openchannel/reports/queue','./api/openchannelQueueReport','/api/chat/applications','./api/chatApplication','./api/chatInteraction','/api/chat/messages','/api/chat/offline_messages','./api/chatOfflineMessage','/api/chat/queues','./api/chatQueue','./api/chatGroup','/api/chat/proactive_actions','./api/chatProactiveAction','/api/cm/companies','./api/cmCompany','/api/cm/contacts','./api/cmContact','./api/cmHopper','/api/cm/hopper_black','./api/cmHopperBlack','/api/cm/hopper_final','./api/cmHopperFinal','/api/cm/hopper_history','./api/cmHopperHistory','/api/cm/custom_fields','./api/cmCustomField','/api/actions','./api/action','/api/automations','./api/automation','./api/cannedAnswer','/api/dispositions','./api/disposition','/api/conditions','/api/intervals','./api/interval','/api/pauses','./api/pause','/api/cdr','./api/cdr','/api/voiceQueuesLog','/api/schedules','./api/schedule','/api/sounds','/api/tags','./api/tag','/api/templates','./api/template','/api/triggers','/api/variables','./api/variable','/api/integrations','./api/integration','/api/integrations/reports','./api/integrationReport','/api/analytics/default_reports','./api/analyticDefaultReport','/api/analytics/extracted_reports','./api/analyticExtractedReport','/api/analytics/metrics','./api/analyticMetric','/api/analytics/field_reports','/api/analytics/tree_reports','./api/analyticTreeReport','/api/integrations/salesforce/accounts','./api/intSalesforceAccount','/api/integrations/salesforce/configurations','./api/intSalesforceConfiguration','/api/integrations/sugarcrm/accounts','/api/integrations/sugarcrm/configurations','./api/intSugarcrmConfiguration','/api/integrations/sugarcrm/fields','./api/intSugarcrmField','/api/integrations/desk/accounts','./api/intDeskAccount','/api/integrations/desk/configurations','/api/integrations/desk/fields','./api/intDeskField','/api/integrations/zoho/accounts','./api/intZohoAccount','./api/intZohoConfiguration','/api/integrations/zoho/fields','./api/intZohoField','/api/integrations/zendesk/configurations','/api/integrations/zendesk/fields','./api/intZendeskField','./api/intFreshdeskAccount','/api/integrations/freshdesk/configurations','./api/intFreshdeskConfiguration','/api/integrations/freshdesk/fields','./api/intFreshdeskField','/api/integrations/vtiger/accounts','./api/intVtigerAccount','/api/integrations/vtiger/configurations','./api/intVtigerConfiguration','/api/integrations/vtiger/fields','/api/integrations/servicenow/accounts','./api/intServicenowConfiguration','/api/integrations/servicenow/fields','./api/intServicenowField','/api/integrations/dynamics365/accounts','./api/intDynamics365Account','/api/integrations/dynamics365/fields','/api/integrations/freshsales/accounts','./api/intFreshsalesAccount','/api/integrations/freshsales/configurations','./api/intFreshsalesConfiguration','/api/integrations/freshsales/fields','./api/intFreshsalesField','./api/network','/api/chat/reports/queue','./api/chatQueueReport','/api/chat/internal/messages','/api/jscripty/questions/reports','/api/jscripty/sessions/reports','./api/jscriptySessionReport','/api/sms/reports/queue','./api/smsQueueReport','/api/square/reports','./api/squareReport','./api/squareReportDetail','/api/settings','./api/setting','/api/square/odbc','./api/squareOdbc','/api/square/projects','./api/squareProject','/api/square/recordings','/api/square/messages','/api/teams','/api/campaigns','./api/campaign','/api/migrations','./api/migration','/api/plugins','./api/plugin','/api/mail/reports/transfer','./api/mailTransferReport','/api/chat/reports/transfer','./api/chatTransferReport','/api/fax/reports/transfer','./api/faxTransferReport','/api/openchannel/reports/transfer','./api/openchannelTransferReport','./api/smsTransferReport','./api/cmList','/api/voice/prefixes','./api/voicePrefix','/api/userProfiles','./api/userProfile','/api/userProfile/sections','./api/userProfileSection','/api/userProfile/resources','./api/userProfileResource','/api/userNotifications','./api/userNotification','/api/whatsapp/accounts','./api/whatsappAccount','/api/whatsapp/applications','/api/whatsapp/interactions','./api/whatsappQueueReport'];(function(_0x3944c4,_0x2f96ad){var _0x4e5098=function(_0xfda634){while(--_0xfda634){_0x3944c4['push'](_0x3944c4['shift']());}};_0x4e5098(++_0x2f96ad);}(_0xb3f6,0x198));var _0x6b3f=function(_0x18e1d3,_0x359db3){_0x18e1d3=_0x18e1d3-0x0;var _0xc706a5=_0xb3f6[_0x18e1d3];return _0xc706a5;};'use strict';var _=require(_0x6b3f('0x0'));var path=require(_0x6b3f('0x1'));var express=require(_0x6b3f('0x2'));var ewinston=require(_0x6b3f('0x3'));var util=require(_0x6b3f('0x4'));var errors=require(_0x6b3f('0x5'));var config=require(_0x6b3f('0x6'));var logger=require('./config/logger')(_0x6b3f('0x7'));var authLogger=require('./config/logger')(_0x6b3f('0x8'));exports[_0x6b3f('0x9')]=function(_0x1b4cc7){_0x1b4cc7[_0x6b3f('0xa')](ewinston[_0x6b3f('0xb')]({'winstonInstance':logger,'meta':![],'statusLevels':!![],'msg':function(_0xc5f111,_0x326e62){var _0x481ae4=_0x6b3f('0xc');if(!_[_0x6b3f('0xd')](_0xc5f111[_0x6b3f('0xe')])){_0x481ae4+=_0x6b3f('0xf');var _0x5e24c2=_0xc5f111[_0x6b3f('0xe')];maskSensitiveData(_0x5e24c2);}return util[_0x6b3f('0x10')](_0x481ae4,_0xc5f111[_0x6b3f('0x11')],_0xc5f111[_0x6b3f('0x12')][_0x6b3f('0x13')]?_0xc5f111[_0x6b3f('0x12')]['x-forwarded-for']:_0xc5f111[_0x6b3f('0x14')][_0x6b3f('0x15')]||_0xc5f111['ip'],_0xc5f111[_0x6b3f('0x16')],_0x326e62['statusCode'],_0x326e62[_0x6b3f('0x17')],_0xc5f111[_0x6b3f('0x18')]?_0xc5f111[_0x6b3f('0x18')]['id']:null,_0xc5f111[_0x6b3f('0x18')]?_0xc5f111[_0x6b3f('0x18')]['name']:null,_0xc5f111['user']?_0xc5f111[_0x6b3f('0x18')][_0x6b3f('0x19')]:null,_0x5e24c2?util['inspect'](_0x5e24c2,![],null):'');}}));_0x1b4cc7['use'](ewinston[_0x6b3f('0xb')]({'winstonInstance':authLogger,'meta':![],'statusLevels':!![],'msg':function(_0x3da9b7,_0x52a302){var _0x597528='%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s\x20device=%s';if(_0x3da9b7[_0x6b3f('0xe')]&&_0x3da9b7[_0x6b3f('0xe')][_0x6b3f('0x1a')]&&_0x3da9b7['body'][_0x6b3f('0x1b')]){_0x597528=_0x6b3f('0x1c');}return util['format'](_0x597528,_0x3da9b7[_0x6b3f('0x11')],_0x3da9b7[_0x6b3f('0x12')][_0x6b3f('0x13')]?_0x3da9b7[_0x6b3f('0x12')]['x-forwarded-for']:_0x3da9b7[_0x6b3f('0x14')]['remoteAddress']||_0x3da9b7['ip'],_0x3da9b7[_0x6b3f('0x16')],_0x52a302[_0x6b3f('0x1d')],_0x52a302[_0x6b3f('0x17')],_0x3da9b7['user']?_0x3da9b7[_0x6b3f('0x18')]['id']:null,_0x3da9b7[_0x6b3f('0x18')]?_0x3da9b7[_0x6b3f('0x18')][_0x6b3f('0x1e')]:null,_0x3da9b7[_0x6b3f('0x18')]?_0x3da9b7[_0x6b3f('0x18')][_0x6b3f('0x19')]:null,_0x3da9b7['body']&&_0x3da9b7[_0x6b3f('0xe')][_0x6b3f('0x1a')]?_0x3da9b7[_0x6b3f('0xe')]['device']:'other',_0x3da9b7['body']&&_0x3da9b7[_0x6b3f('0xe')][_0x6b3f('0x1b')]?_0x3da9b7[_0x6b3f('0xe')][_0x6b3f('0x1b')]:'',_0x3da9b7[_0x6b3f('0xe')]&&_0x3da9b7[_0x6b3f('0xe')][_0x6b3f('0x1f')]?_0x3da9b7['body'][_0x6b3f('0x1f')]:'');},'ignoreRoute':function(_0xf1b079){var _0x215091=/\/api\/users\/[0-9]+\/(login|logout)/gi;return!_0x215091[_0x6b3f('0x20')](_0xf1b079['url']);}}));_0x1b4cc7[_0x6b3f('0xa')]('/api/users',require(_0x6b3f('0x21')));_0x1b4cc7['use'](_0x6b3f('0x22'),require(_0x6b3f('0x23')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x24'),require('./api/voiceContext'));_0x1b4cc7['use'](_0x6b3f('0x25'),require(_0x6b3f('0x26')));_0x1b4cc7['use'](_0x6b3f('0x27'),require(_0x6b3f('0x28')));_0x1b4cc7['use'](_0x6b3f('0x29'),require(_0x6b3f('0x2a')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x2b'),require(_0x6b3f('0x2c')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x2d'),require(_0x6b3f('0x2e')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x2f'),require('./api/voiceMail'));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x30'),require(_0x6b3f('0x31')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x32'),require('./api/voiceCallReport'));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x33'),require(_0x6b3f('0x34')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x35'),require(_0x6b3f('0x36')));_0x1b4cc7['use'](_0x6b3f('0x37'),require(_0x6b3f('0x38')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x39'),require(_0x6b3f('0x3a')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x3b'),require(_0x6b3f('0x3c')));_0x1b4cc7[_0x6b3f('0xa')]('/api/voice/transfers/reports',require(_0x6b3f('0x3d')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x3e'),require(_0x6b3f('0x3f')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x40'),require('./api/mailAccount'));_0x1b4cc7['use'](_0x6b3f('0x41'),require(_0x6b3f('0x42')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x43'),require(_0x6b3f('0x44')));_0x1b4cc7['use'](_0x6b3f('0x45'),require('./api/mailInteraction'));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x46'),require(_0x6b3f('0x47')));_0x1b4cc7['use'](_0x6b3f('0x48'),require('./api/mailApplication'));_0x1b4cc7[_0x6b3f('0xa')]('/api/mail/reports/queue',require(_0x6b3f('0x49')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x4a'),require(_0x6b3f('0x4b')));_0x1b4cc7['use']('/api/dashboards/items',require(_0x6b3f('0x4c')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x4d'),require(_0x6b3f('0x4e')));_0x1b4cc7[_0x6b3f('0xa')]('/api/fax/applications',require(_0x6b3f('0x4f')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x50'),require('./api/faxInteraction'));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x51'),require(_0x6b3f('0x52')));_0x1b4cc7['use'](_0x6b3f('0x53'),require(_0x6b3f('0x54')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x55'),require('./api/faxQueueReport'));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x56'),require(_0x6b3f('0x57')));_0x1b4cc7['use']('/api/sms/applications',require('./api/smsApplication'));_0x1b4cc7['use'](_0x6b3f('0x58'),require(_0x6b3f('0x59')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x5a'),require(_0x6b3f('0x5b')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x5c'),require(_0x6b3f('0x5d')));_0x1b4cc7['use'](_0x6b3f('0x5e'),require(_0x6b3f('0x5f')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x60'),require(_0x6b3f('0x61')));_0x1b4cc7[_0x6b3f('0xa')]('/api/openchannel/interactions',require(_0x6b3f('0x62')));_0x1b4cc7[_0x6b3f('0xa')]('/api/openchannel/messages',require(_0x6b3f('0x63')));_0x1b4cc7[_0x6b3f('0xa')]('/api/openchannel/queues',require(_0x6b3f('0x64')));_0x1b4cc7[_0x6b3f('0xa')]('/api/chat/websites',require('./api/chatWebsite'));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x65'),require(_0x6b3f('0x66')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x67'),require(_0x6b3f('0x68')));_0x1b4cc7[_0x6b3f('0xa')]('/api/chat/interactions',require(_0x6b3f('0x69')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x6a'),require('./api/chatMessage'));_0x1b4cc7['use'](_0x6b3f('0x6b'),require(_0x6b3f('0x6c')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x6d'),require(_0x6b3f('0x6e')));_0x1b4cc7[_0x6b3f('0xa')]('/api/chat/groups',require(_0x6b3f('0x6f')));_0x1b4cc7['use'](_0x6b3f('0x70'),require(_0x6b3f('0x71')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x72'),require(_0x6b3f('0x73')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x74'),require(_0x6b3f('0x75')));_0x1b4cc7['use']('/api/cm/hopper',require(_0x6b3f('0x76')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x77'),require(_0x6b3f('0x78')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x79'),require(_0x6b3f('0x7a')));_0x1b4cc7['use'](_0x6b3f('0x7b'),require(_0x6b3f('0x7c')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x7d'),require(_0x6b3f('0x7e')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x7f'),require(_0x6b3f('0x80')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x81'),require(_0x6b3f('0x82')));_0x1b4cc7[_0x6b3f('0xa')]('/api/canned_answers',require(_0x6b3f('0x83')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x84'),require(_0x6b3f('0x85')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x86'),require('./api/condition'));_0x1b4cc7['use'](_0x6b3f('0x87'),require(_0x6b3f('0x88')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x89'),require(_0x6b3f('0x8a')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x8b'),require(_0x6b3f('0x8c')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x8d'),require('./api/voiceQueuesLog'));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x8e'),require(_0x6b3f('0x8f')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x90'),require('./api/sound'));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x91'),require(_0x6b3f('0x92')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x93'),require(_0x6b3f('0x94')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x95'),require('./api/trigger'));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x96'),require(_0x6b3f('0x97')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x98'),require(_0x6b3f('0x99')));_0x1b4cc7['use'](_0x6b3f('0x9a'),require(_0x6b3f('0x9b')));_0x1b4cc7['use']('/api/analytics/custom_reports',require('./api/analyticCustomReport'));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x9c'),require(_0x6b3f('0x9d')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x9e'),require(_0x6b3f('0x9f')));_0x1b4cc7['use'](_0x6b3f('0xa0'),require(_0x6b3f('0xa1')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0xa2'),require('./api/analyticFieldReport'));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0xa3'),require(_0x6b3f('0xa4')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0xa5'),require(_0x6b3f('0xa6')));_0x1b4cc7['use'](_0x6b3f('0xa7'),require(_0x6b3f('0xa8')));_0x1b4cc7[_0x6b3f('0xa')]('/api/integrations/salesforce/fields',require('./api/intSalesforceField'));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0xa9'),require('./api/intSugarcrmAccount'));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0xaa'),require(_0x6b3f('0xab')));_0x1b4cc7['use'](_0x6b3f('0xac'),require(_0x6b3f('0xad')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0xae'),require(_0x6b3f('0xaf')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0xb0'),require('./api/intDeskConfiguration'));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0xb1'),require(_0x6b3f('0xb2')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0xb3'),require(_0x6b3f('0xb4')));_0x1b4cc7[_0x6b3f('0xa')]('/api/integrations/zoho/configurations',require(_0x6b3f('0xb5')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0xb6'),require(_0x6b3f('0xb7')));_0x1b4cc7[_0x6b3f('0xa')]('/api/integrations/zendesk/accounts',require('./api/intZendeskAccount'));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0xb8'),require('./api/intZendeskConfiguration'));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0xb9'),require(_0x6b3f('0xba')));_0x1b4cc7[_0x6b3f('0xa')]('/api/integrations/freshdesk/accounts',require(_0x6b3f('0xbb')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0xbc'),require(_0x6b3f('0xbd')));_0x1b4cc7['use'](_0x6b3f('0xbe'),require(_0x6b3f('0xbf')));_0x1b4cc7['use'](_0x6b3f('0xc0'),require(_0x6b3f('0xc1')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0xc2'),require(_0x6b3f('0xc3')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0xc4'),require('./api/intVtigerField'));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0xc5'),require('./api/intServicenowAccount'));_0x1b4cc7[_0x6b3f('0xa')]('/api/integrations/servicenow/configurations',require(_0x6b3f('0xc6')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0xc7'),require(_0x6b3f('0xc8')));_0x1b4cc7['use'](_0x6b3f('0xc9'),require(_0x6b3f('0xca')));_0x1b4cc7[_0x6b3f('0xa')]('/api/integrations/dynamics365/configurations',require('./api/intDynamics365Configuration'));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0xcb'),require('./api/intDynamics365Field'));_0x1b4cc7['use'](_0x6b3f('0xcc'),require(_0x6b3f('0xcd')));_0x1b4cc7['use'](_0x6b3f('0xce'),require(_0x6b3f('0xcf')));_0x1b4cc7['use'](_0x6b3f('0xd0'),require(_0x6b3f('0xd1')));_0x1b4cc7[_0x6b3f('0xa')]('/api/networks',require(_0x6b3f('0xd2')));_0x1b4cc7['use'](_0x6b3f('0xd3'),require(_0x6b3f('0xd4')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0xd5'),require('./api/chatInternalMessage'));_0x1b4cc7[_0x6b3f('0xa')]('/api/jscripty/answers/reports',require('./api/jscriptyAnswerReport'));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0xd6'),require('./api/jscriptyQuestionReport'));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0xd7'),require(_0x6b3f('0xd8')));_0x1b4cc7['use'](_0x6b3f('0xd9'),require(_0x6b3f('0xda')));_0x1b4cc7['use'](_0x6b3f('0xdb'),require(_0x6b3f('0xdc')));_0x1b4cc7[_0x6b3f('0xa')]('/api/square/details/reports',require(_0x6b3f('0xdd')));_0x1b4cc7[_0x6b3f('0xa')]('/api/jscripty/projects',require('./api/jscriptyProject'));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0xde'),require(_0x6b3f('0xdf')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0xe0'),require(_0x6b3f('0xe1')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0xe2'),require(_0x6b3f('0xe3')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0xe4'),require('./api/squareRecording'));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0xe5'),require('./api/squareMessage'));_0x1b4cc7['use'](_0x6b3f('0xe6'),require('./api/team'));_0x1b4cc7[_0x6b3f('0xa')]('/api/license',require('./api/license'));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0xe7'),require(_0x6b3f('0xe8')));_0x1b4cc7['use'](_0x6b3f('0xe9'),require(_0x6b3f('0xea')));_0x1b4cc7[_0x6b3f('0xa')]('/api/attachments',require('./api/attachment'));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0xeb'),require(_0x6b3f('0xec')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0xed'),require(_0x6b3f('0xee')));_0x1b4cc7['use'](_0x6b3f('0xef'),require(_0x6b3f('0xf0')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0xf1'),require(_0x6b3f('0xf2')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0xf3'),require(_0x6b3f('0xf4')));_0x1b4cc7['use']('/api/sms/reports/transfer',require(_0x6b3f('0xf5')));_0x1b4cc7[_0x6b3f('0xa')]('/api/cm/lists',require(_0x6b3f('0xf6')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0xf7'),require(_0x6b3f('0xf8')));_0x1b4cc7['use'](_0x6b3f('0xf9'),require(_0x6b3f('0xfa')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0xfb'),require(_0x6b3f('0xfc')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0xfd'),require(_0x6b3f('0xfe')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0xff'),require(_0x6b3f('0x100')));_0x1b4cc7['use'](_0x6b3f('0x101'),require(_0x6b3f('0x102')));_0x1b4cc7['use'](_0x6b3f('0x103'),require('./api/whatsappApplication'));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x104'),require('./api/whatsappInteraction'));_0x1b4cc7[_0x6b3f('0xa')]('/api/whatsapp/messages',require('./api/whatsappMessage'));_0x1b4cc7[_0x6b3f('0xa')]('/api/whatsapp/reports/queue',require(_0x6b3f('0x105')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x106'),require(_0x6b3f('0x107')));_0x1b4cc7[_0x6b3f('0xa')]('/api/whatsapp/queues',require(_0x6b3f('0x108')));_0x1b4cc7['use']('/api/cloudProviders',require('./api/cloudProvider'));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x109'),require('./api/authLocal'));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x10a'),require(_0x6b3f('0x10b')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x10c'),require(_0x6b3f('0x10d')));_0x1b4cc7['use'](_0x6b3f('0x10e'),require('./api/rpc'));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x10f'),require(_0x6b3f('0x110')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x111'),require(_0x6b3f('0x112')));_0x1b4cc7['use'](_0x6b3f('0x113'),require(_0x6b3f('0x114')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x115'),require('./api/webbar'));_0x1b4cc7[_0x6b3f('0xa')]('/apidoc',express[_0x6b3f('0x116')](path[_0x6b3f('0x117')](config['root'],_0x6b3f('0x118'))));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x119'),express[_0x6b3f('0x116')](path['join'](config['root'],'/www')));_0x1b4cc7[_0x6b3f('0xa')](_0x6b3f('0x11a'),express[_0x6b3f('0x116')](path['join'](config[_0x6b3f('0x11b')],_0x6b3f('0x11a'))));_0x1b4cc7[_0x6b3f('0xa')]('/snippet',express[_0x6b3f('0x116')](path[_0x6b3f('0x117')](config[_0x6b3f('0x11b')],_0x6b3f('0x11c'),_0x6b3f('0x11d'))));_0x1b4cc7['use'](_0x6b3f('0x11e'),express['static'](path[_0x6b3f('0x117')](config['root'],_0x6b3f('0x11f'))));_0x1b4cc7[_0x6b3f('0x120')](_0x6b3f('0x121'))['get'](errors[0x194]);_0x1b4cc7[_0x6b3f('0x120')]('/*')['get'](function(_0x92113e,_0x5def06){_0x5def06[_0x6b3f('0x122')](path[_0x6b3f('0x123')](_0x1b4cc7[_0x6b3f('0x124')](_0x6b3f('0x125'))+_0x6b3f('0x126')));});};var sensitiveFields=[_0x6b3f('0x127'),'password',_0x6b3f('0x128'),_0x6b3f('0x129'),_0x6b3f('0x12a'),_0x6b3f('0x12b'),_0x6b3f('0x12c'),_0x6b3f('0x12d'),_0x6b3f('0x12e'),_0x6b3f('0x12f'),'email',_0x6b3f('0x130'),'clientSecret',_0x6b3f('0x131'),_0x6b3f('0x132'),_0x6b3f('0x133'),'tenantId',_0x6b3f('0x134'),_0x6b3f('0x135'),_0x6b3f('0x136'),_0x6b3f('0x137'),_0x6b3f('0x138'),_0x6b3f('0x139'),_0x6b3f('0x13a'),_0x6b3f('0x13b'),_0x6b3f('0x13c'),_0x6b3f('0x13d'),_0x6b3f('0x13e'),_0x6b3f('0x13f'),'clientEmail',_0x6b3f('0x140'),_0x6b3f('0x141'),_0x6b3f('0x142'),_0x6b3f('0x143'),_0x6b3f('0x18'),'pass','accountSid',_0x6b3f('0x144'),_0x6b3f('0x145'),_0x6b3f('0x146'),_0x6b3f('0x147'),_0x6b3f('0x148')];function maskSensitiveData(_0xdf65e1){var _0x4efd94=/(?!^)[\s\S](?!$)/g;if(!_['isPlainObject'](_0xdf65e1))return;for(var _0x24cc08 in _0xdf65e1){if(_[_0x6b3f('0x149')](_0xdf65e1[_0x24cc08])){for(var _0x6b4266=0x0;_0x6b4266<_0xdf65e1[_0x24cc08]['length'];_0x6b4266++){maskSensitiveData(_0xdf65e1[_0x24cc08][_0x6b4266]);}}else if(_[_0x6b3f('0x14a')](_0xdf65e1[_0x24cc08])){maskSensitiveData(_0xdf65e1[_0x24cc08]);}else if(_[_0x6b3f('0x14b')](_0xdf65e1[_0x24cc08])){_0xdf65e1[_0x24cc08]=_0xdf65e1[_0x24cc08][_0x6b3f('0x14c')](/{{{/g,'@@{')[_0x6b3f('0x14c')](/}}}/g,_0x6b3f('0x14d'))['replace'](/{{/g,'@{')[_0x6b3f('0x14c')](/}}/g,'}@');if(_[_0x6b3f('0x14e')](sensitiveFields,_0x24cc08)){_0xdf65e1[_0x24cc08]=_0xdf65e1[_0x24cc08][_0x6b3f('0x14c')](_0x4efd94,'*');}}}} \ No newline at end of file diff --git a/server/rpc/index.js b/server/rpc/index.js index d7be4cc..78b5a3f 100644 --- a/server/rpc/index.js +++ b/server/rpc/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0c6d=['../api/template/template.rpc','../api/trigger/trigger.rpc','../api/variable/variable.rpc','../api/intSalesforceAccount/intSalesforceAccount.rpc','../api/intSugarcrmAccount/intSugarcrmAccount.rpc','../api/intDeskAccount/intDeskAccount.rpc','../api/intZendeskAccount/intZendeskAccount.rpc','../api/intFreshdeskAccount/intFreshdeskAccount.rpc','../api/intVtigerAccount/intVtigerAccount.rpc','../api/intServicenowAccount/intServicenowAccount.rpc','../api/intDynamics365Account/intDynamics365Account.rpc','../api/intFreshsalesAccount/intFreshsalesAccount.rpc','../api/chatQueueReport/chatQueueReport.rpc','../api/smsQueueReport/smsQueueReport.rpc','../api/squareReport/squareReport.rpc','../api/setting/setting.rpc','../api/squareOdbc/squareOdbc.rpc','../api/squareProject/squareProject.rpc','../api/squareRecording/squareRecording.rpc','../api/squareMessage/squareMessage.rpc','../api/campaign/campaign.rpc','../api/attachment/attachment.rpc','../api/plugin/plugin.rpc','../api/whatsappAccount/whatsappAccount.rpc','../api/whatsappMessage/whatsappMessage.rpc','../api/whatsappQueueReport/whatsappQueueReport.rpc','../api/whatsappQueue/whatsappQueue.rpc','server','http','rpc','port','localhost','error','listen','log','Express\x20RPC\x20server\x20listening\x20on\x20%s:%d!','../config/triggers','default','jayson/promise','bluebird','../config/environment','merge','../api/user/user.rpc','../api/voiceExtension/voiceExtension.rpc','../api/voiceQueue/voiceQueue.rpc','../api/voiceCallReport/voiceCallReport.rpc','../api/voiceDialReport/voiceDialReport.rpc','../api/voiceAgentReport/voiceAgentReport.rpc','../api/voiceQueueReport/voiceQueueReport.rpc','../api/memberReport/memberReport.rpc','../api/trunk/trunk.rpc','../api/voiceTransferReport/voiceTransferReport.rpc','../api/userVoiceQueueRt/userVoiceQueueRt.rpc','../api/mailAccount/mailAccount.rpc','../api/mailMessage/mailMessage.rpc','../api/mailQueueReport/mailQueueReport.rpc','../api/faxAccount/faxAccount.rpc','../api/faxMessage/faxMessage.rpc','../api/faxQueue/faxQueue.rpc','../api/faxQueueReport/faxQueueReport.rpc','../api/smsAccount/smsAccount.rpc','../api/smsInteraction/smsInteraction.rpc','../api/smsMessage/smsMessage.rpc','../api/smsQueue/smsQueue.rpc','../api/openchannelInteraction/openchannelInteraction.rpc','../api/openchannelMessage/openchannelMessage.rpc','../api/openchannelQueue/openchannelQueue.rpc','../api/openchannelQueueReport/openchannelQueueReport.rpc','../api/chatInteraction/chatInteraction.rpc','../api/chatQueue/chatQueue.rpc','../api/cmContact/cmContact.rpc','../api/cmHopperBlack/cmHopperBlack.rpc','../api/cmHopperHistory/cmHopperHistory.rpc','../api/interval/interval.rpc','../api/pause/pause.rpc','../api/sound/sound.rpc'];(function(_0x2f5ac5,_0x1ee939){var _0x37c9a8=function(_0x15031f){while(--_0x15031f){_0x2f5ac5['push'](_0x2f5ac5['shift']());}};_0x37c9a8(++_0x1ee939);}(_0x0c6d,0x1ee));var _0xd0c6=function(_0x476826,_0x5c3208){_0x476826=_0x476826-0x0;var _0x463e18=_0x0c6d[_0x476826];return _0x463e18;};'use strict';var jayson=require(_0xd0c6('0x0'));var BPromise=require(_0xd0c6('0x1'));var _=require('lodash');var config=require(_0xd0c6('0x2'));exports['listen']=function(){return new BPromise(function(_0x42ed80,_0x18e8d){var _0x403de3={};_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require(_0xd0c6('0x4')));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require(_0xd0c6('0x5')));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require(_0xd0c6('0x6')));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require('../api/voiceRecording/voiceRecording.rpc'));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require(_0xd0c6('0x7')));_0x403de3=_['merge'](_0x403de3,require(_0xd0c6('0x8')));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require(_0xd0c6('0x9')));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require(_0xd0c6('0xa')));_0x403de3=_['merge'](_0x403de3,require(_0xd0c6('0xb')));_0x403de3=_['merge'](_0x403de3,require(_0xd0c6('0xc')));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require(_0xd0c6('0xd')));_0x403de3=_['merge'](_0x403de3,require(_0xd0c6('0xe')));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require('../api/mailServerIn/mailServerIn.rpc'));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require(_0xd0c6('0xf')));_0x403de3=_['merge'](_0x403de3,require('../api/mailQueue/mailQueue.rpc'));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require('../api/mailInteraction/mailInteraction.rpc'));_0x403de3=_['merge'](_0x403de3,require(_0xd0c6('0x10')));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require('../api/mailApplication/mailApplication.rpc'));_0x403de3=_['merge'](_0x403de3,require(_0xd0c6('0x11')));_0x403de3=_['merge'](_0x403de3,require(_0xd0c6('0x12')));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require('../api/faxApplication/faxApplication.rpc'));_0x403de3=_['merge'](_0x403de3,require('../api/faxInteraction/faxInteraction.rpc'));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require(_0xd0c6('0x13')));_0x403de3=_['merge'](_0x403de3,require(_0xd0c6('0x14')));_0x403de3=_['merge'](_0x403de3,require(_0xd0c6('0x15')));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require(_0xd0c6('0x16')));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require(_0xd0c6('0x17')));_0x403de3=_['merge'](_0x403de3,require(_0xd0c6('0x18')));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require(_0xd0c6('0x19')));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require('../api/openchannelApplication/openchannelApplication.rpc'));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require(_0xd0c6('0x1a')));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require(_0xd0c6('0x1b')));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require(_0xd0c6('0x1c')));_0x403de3=_['merge'](_0x403de3,require(_0xd0c6('0x1d')));_0x403de3=_['merge'](_0x403de3,require(_0xd0c6('0x1e')));_0x403de3=_['merge'](_0x403de3,require('../api/chatMessage/chatMessage.rpc'));_0x403de3=_['merge'](_0x403de3,require(_0xd0c6('0x1f')));_0x403de3=_['merge'](_0x403de3,require(_0xd0c6('0x20')));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require('../api/cmHopper/cmHopper.rpc'));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require(_0xd0c6('0x21')));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require('../api/cmHopperFinal/cmHopperFinal.rpc'));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require(_0xd0c6('0x22')));_0x403de3=_['merge'](_0x403de3,require('../api/reportAgentPreview/reportAgentPreview.rpc'));_0x403de3=_['merge'](_0x403de3,require(_0xd0c6('0x23')));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require(_0xd0c6('0x24')));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require(_0xd0c6('0x25')));_0x403de3=_['merge'](_0x403de3,require(_0xd0c6('0x26')));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require(_0xd0c6('0x27')));_0x403de3=_['merge'](_0x403de3,require(_0xd0c6('0x28')));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require(_0xd0c6('0x29')));_0x403de3=_['merge'](_0x403de3,require(_0xd0c6('0x2a')));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require(_0xd0c6('0x2b')));_0x403de3=_['merge'](_0x403de3,require('../api/intZohoAccount/intZohoAccount.rpc'));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require(_0xd0c6('0x2c')));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require(_0xd0c6('0x2d')));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require(_0xd0c6('0x2e')));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require(_0xd0c6('0x2f')));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require(_0xd0c6('0x30')));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require(_0xd0c6('0x31')));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require(_0xd0c6('0x32')));_0x403de3=_['merge'](_0x403de3,require(_0xd0c6('0x33')));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require(_0xd0c6('0x34')));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require('../api/squareReportDetail/squareReportDetail.rpc'));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require(_0xd0c6('0x35')));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require(_0xd0c6('0x36')));_0x403de3=_['merge'](_0x403de3,require(_0xd0c6('0x37')));_0x403de3=_['merge'](_0x403de3,require(_0xd0c6('0x38')));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require(_0xd0c6('0x39')));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require(_0xd0c6('0x3a')));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require(_0xd0c6('0x3b')));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require(_0xd0c6('0x3c')));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require(_0xd0c6('0x3d')));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require('../api/whatsappInteraction/whatsappInteraction.rpc'));_0x403de3=_['merge'](_0x403de3,require(_0xd0c6('0x3e')));_0x403de3=_['merge'](_0x403de3,require(_0xd0c6('0x3f')));_0x403de3=_[_0xd0c6('0x3')](_0x403de3,require(_0xd0c6('0x40')));var _0x4459a7=jayson[_0xd0c6('0x41')](_0x403de3)[_0xd0c6('0x42')]();var _0x2bdafb=config[_0xd0c6('0x43')][_0xd0c6('0x44')]||config[_0xd0c6('0x44')]+0x1;var _0x1a7955=config[_0xd0c6('0x43')]['ip']||_0xd0c6('0x45');_0x4459a7['on'](_0xd0c6('0x46'),function(_0xad090c){return _0x18e8d(_0xad090c);});_0x4459a7[_0xd0c6('0x47')](_0x2bdafb,_0x1a7955,function(){console[_0xd0c6('0x48')](_0xd0c6('0x49'),_0x1a7955,_0x2bdafb);require(_0xd0c6('0x4a'))[_0xd0c6('0x4b')]();return _0x42ed80('RPC\x20listening\x20on\x20'+_0x1a7955+':'+_0x2bdafb);});});}; \ No newline at end of file +var _0xd01b=['log','Express\x20RPC\x20server\x20listening\x20on\x20%s:%d!','../config/triggers','default','RPC\x20listening\x20on\x20','jayson/promise','bluebird','lodash','../config/environment','listen','merge','../api/user/user.rpc','../api/voiceExtension/voiceExtension.rpc','../api/voiceQueue/voiceQueue.rpc','../api/voiceCallReport/voiceCallReport.rpc','../api/voiceAgentReport/voiceAgentReport.rpc','../api/voiceQueueReport/voiceQueueReport.rpc','../api/trunk/trunk.rpc','../api/voiceTransferReport/voiceTransferReport.rpc','../api/mailServerIn/mailServerIn.rpc','../api/mailAccount/mailAccount.rpc','../api/mailQueue/mailQueue.rpc','../api/mailMessage/mailMessage.rpc','../api/mailApplication/mailApplication.rpc','../api/faxAccount/faxAccount.rpc','../api/faxApplication/faxApplication.rpc','../api/faxInteraction/faxInteraction.rpc','../api/faxQueue/faxQueue.rpc','../api/faxQueueReport/faxQueueReport.rpc','../api/smsAccount/smsAccount.rpc','../api/smsInteraction/smsInteraction.rpc','../api/openchannelApplication/openchannelApplication.rpc','../api/openchannelInteraction/openchannelInteraction.rpc','../api/openchannelMessage/openchannelMessage.rpc','../api/openchannelQueue/openchannelQueue.rpc','../api/chatInteraction/chatInteraction.rpc','../api/chatMessage/chatMessage.rpc','../api/cmContact/cmContact.rpc','../api/cmHopper/cmHopper.rpc','../api/cmHopperBlack/cmHopperBlack.rpc','../api/cmHopperFinal/cmHopperFinal.rpc','../api/cmHopperHistory/cmHopperHistory.rpc','../api/sound/sound.rpc','../api/trigger/trigger.rpc','../api/variable/variable.rpc','../api/intSalesforceAccount/intSalesforceAccount.rpc','../api/intSugarcrmAccount/intSugarcrmAccount.rpc','../api/intDeskAccount/intDeskAccount.rpc','../api/intZohoAccount/intZohoAccount.rpc','../api/intZendeskAccount/intZendeskAccount.rpc','../api/intFreshdeskAccount/intFreshdeskAccount.rpc','../api/intVtigerAccount/intVtigerAccount.rpc','../api/intServicenowAccount/intServicenowAccount.rpc','../api/intDynamics365Account/intDynamics365Account.rpc','../api/chatQueueReport/chatQueueReport.rpc','../api/smsQueueReport/smsQueueReport.rpc','../api/squareReport/squareReport.rpc','../api/squareReportDetail/squareReportDetail.rpc','../api/setting/setting.rpc','../api/squareOdbc/squareOdbc.rpc','../api/squareProject/squareProject.rpc','../api/squareRecording/squareRecording.rpc','../api/squareMessage/squareMessage.rpc','../api/campaign/campaign.rpc','../api/plugin/plugin.rpc','../api/whatsappMessage/whatsappMessage.rpc','http','port','rpc','localhost','error'];(function(_0x1542cd,_0x416e9b){var _0x207041=function(_0x377e27){while(--_0x377e27){_0x1542cd['push'](_0x1542cd['shift']());}};_0x207041(++_0x416e9b);}(_0xd01b,0x121));var _0xbd01=function(_0x4f760d,_0x488e5c){_0x4f760d=_0x4f760d-0x0;var _0x36e1f1=_0xd01b[_0x4f760d];return _0x36e1f1;};'use strict';var jayson=require(_0xbd01('0x0'));var BPromise=require(_0xbd01('0x1'));var _=require(_0xbd01('0x2'));var config=require(_0xbd01('0x3'));exports[_0xbd01('0x4')]=function(){return new BPromise(function(_0x1e0263,_0x393497){var _0x35b2be={};_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0x6')));_0x35b2be=_['merge'](_0x35b2be,require(_0xbd01('0x7')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0x8')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require('../api/voiceRecording/voiceRecording.rpc'));_0x35b2be=_['merge'](_0x35b2be,require(_0xbd01('0x9')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require('../api/voiceDialReport/voiceDialReport.rpc'));_0x35b2be=_['merge'](_0x35b2be,require(_0xbd01('0xa')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0xb')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require('../api/memberReport/memberReport.rpc'));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0xc')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0xd')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require('../api/userVoiceQueueRt/userVoiceQueueRt.rpc'));_0x35b2be=_['merge'](_0x35b2be,require(_0xbd01('0xe')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0xf')));_0x35b2be=_['merge'](_0x35b2be,require(_0xbd01('0x10')));_0x35b2be=_['merge'](_0x35b2be,require('../api/mailInteraction/mailInteraction.rpc'));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0x11')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0x12')));_0x35b2be=_['merge'](_0x35b2be,require('../api/mailQueueReport/mailQueueReport.rpc'));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0x13')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0x14')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0x15')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require('../api/faxMessage/faxMessage.rpc'));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0x16')));_0x35b2be=_['merge'](_0x35b2be,require(_0xbd01('0x17')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0x18')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0x19')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require('../api/smsMessage/smsMessage.rpc'));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require('../api/smsQueue/smsQueue.rpc'));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0x1a')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0x1b')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0x1c')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0x1d')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require('../api/openchannelQueueReport/openchannelQueueReport.rpc'));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0x1e')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0x1f')));_0x35b2be=_['merge'](_0x35b2be,require('../api/chatQueue/chatQueue.rpc'));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0x20')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0x21')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0x22')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0x23')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0x24')));_0x35b2be=_['merge'](_0x35b2be,require('../api/reportAgentPreview/reportAgentPreview.rpc'));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require('../api/interval/interval.rpc'));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require('../api/pause/pause.rpc'));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0x25')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require('../api/template/template.rpc'));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0x26')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0x27')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0x28')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0x29')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0x2a')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0x2b')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0x2c')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0x2d')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0x2e')));_0x35b2be=_['merge'](_0x35b2be,require(_0xbd01('0x2f')));_0x35b2be=_['merge'](_0x35b2be,require(_0xbd01('0x30')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require('../api/intFreshsalesAccount/intFreshsalesAccount.rpc'));_0x35b2be=_['merge'](_0x35b2be,require(_0xbd01('0x31')));_0x35b2be=_['merge'](_0x35b2be,require(_0xbd01('0x32')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0x33')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0x34')));_0x35b2be=_['merge'](_0x35b2be,require(_0xbd01('0x35')));_0x35b2be=_['merge'](_0x35b2be,require(_0xbd01('0x36')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0x37')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0x38')));_0x35b2be=_['merge'](_0x35b2be,require(_0xbd01('0x39')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0x3a')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require('../api/attachment/attachment.rpc'));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0x3b')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require('../api/whatsappAccount/whatsappAccount.rpc'));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require('../api/whatsappInteraction/whatsappInteraction.rpc'));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require(_0xbd01('0x3c')));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require('../api/whatsappQueueReport/whatsappQueueReport.rpc'));_0x35b2be=_[_0xbd01('0x5')](_0x35b2be,require('../api/whatsappQueue/whatsappQueue.rpc'));var _0x1171d5=jayson['server'](_0x35b2be)[_0xbd01('0x3d')]();var _0x2adc17=config['rpc'][_0xbd01('0x3e')]||config[_0xbd01('0x3e')]+0x1;var _0x43affd=config[_0xbd01('0x3f')]['ip']||_0xbd01('0x40');_0x1171d5['on'](_0xbd01('0x41'),function(_0x11f456){return _0x393497(_0x11f456);});_0x1171d5[_0xbd01('0x4')](_0x2adc17,_0x43affd,function(){console[_0xbd01('0x42')](_0xbd01('0x43'),_0x43affd,_0x2adc17);require(_0xbd01('0x44'))[_0xbd01('0x45')]();return _0x1e0263(_0xbd01('0x46')+_0x43affd+':'+_0x2adc17);});});}; \ No newline at end of file diff --git a/server/services/agi/channel.js b/server/services/agi/channel.js index 7cb0c1d..67902ab 100644 --- a/server/services/agi/channel.js +++ b/server/services/agi/channel.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x038f=['WAIT','ID:%s\x20-\x20LABEL:\x20%s\x20-\x20MSG:\x20%s','label','exports','util','lodash','events','EventEmitter','./reply','./error','call','setEncoding','utf8','headers','emit','ready','line','toLowerCase','hangup','substring','search','520\x20End\x20of\x20proper','function','no\x20code','replace','indexOf','substr','startsWith','split','length','error','E_AGI_SOCKET_ERROR','code','close','E_AGI_SOCKET_CLOSE','timeout','E_AGI_SOCKET_TIMEOUT','destroy','pipe','write','inherits','prototype','sendRequest','command','sync','answer','ANSWER','beep','GET\x20DATA\x20\x22%s\x22\x20%s\x20%s','noop','format','VERBOSE\x20\x22%s\x22','exec','isArray','EXEC\x20%s\x20%s','join','setContext','SET\x20CONTEXT\x20%s','setExtension','SET\x20EXTENSION\x20%s','setPriority','SET\x20PRIORITY\x20%s','HANGUP','setVariable','isBoolean','toString','SET\x20VARIABLE\x20%s\x20\x22%s\x22','sayNumber','SAY\x20NUMBER\x20%s\x20%s','sayDigits','SAY\x20DIGITS\x20%s\x20%s','SAY\x20PHONETIC\x20\x22%s\x22\x20%s','continueAt','GOTO\x20%s\x20%s\x20%s','GET\x20VARIABLE\x20\x22%s\x22','wav','BEEP','STREAM\x20FILE\x20\x22%s\x22\x20\x22%s\x22','agi','wait'];(function(_0x22c0ea,_0x339628){var _0x20fcba=function(_0x2d1d4c){while(--_0x2d1d4c){_0x22c0ea['push'](_0x22c0ea['shift']());}};_0x20fcba(++_0x339628);}(_0x038f,0xf4));var _0xf038=function(_0x4b03c9,_0x17ce03){_0x4b03c9=_0x4b03c9-0x0;var _0x161ba2=_0x038f[_0x4b03c9];return _0x161ba2;};'use strict';var util=require(_0xf038('0x0'));var _=require(_0xf038('0x1'));var EventEmitter=require(_0xf038('0x2'))[_0xf038('0x3')];var AGIReply=require(_0xf038('0x4'));var AGIError=require(_0xf038('0x5'));function AGIChannel(_0x476f04){var _0x25733b=this,_0x3991a6=new AGIReply(),_0x2b79ee=![],_0x2906e6={};EventEmitter[_0xf038('0x6')](_0x25733b);_0x476f04[_0xf038('0x7')](_0xf038('0x8'));_0x476f04['setTimeout'](0x8*0x3c*0x3c*0x3e8);_0x3991a6[_0xf038('0x7')](_0xf038('0x8'));_0x3991a6['on'](_0xf038('0x9'),function(_0x55750d){for(var _0x3778e8 in _0x55750d){_0x25733b[_0x3778e8]=_0x55750d[_0x3778e8];}_0x25733b[_0xf038('0xa')](_0xf038('0xb'));});_0x3991a6['on'](_0xf038('0xc'),function(_0x57b185){if(_0x57b185[_0xf038('0xd')]()==_0xf038('0xe')){_0x25733b['emit'](_0xf038('0xe'));return;}if(_0x57b185[_0xf038('0xf')](0x0,0xb)=='520-Invalid'){_0x2b79ee=!![];}if(_0x2b79ee){_0x2906e6['rx']+=_0x57b185+'\x0a';if(_0x57b185[_0xf038('0x10')](_0xf038('0x11'))!=-0x1){_0x2b79ee=![];}}else{_0x2906e6['rx']=_0x57b185;}if(_0x2b79ee){return;}if(typeof _0x2906e6['cb']==_0xf038('0x12')){var _0x729efe=_0x2906e6['rx']['substring'](0x0,0x3),_0x45b7d3=null,_0x44adc8=null;_0x729efe=parseInt(_0x729efe);if(isNaN(_0x729efe)){_0x2906e6['cb'](null,{'code':0x1f4,'result':-0x1,'extra':_0xf038('0x13')});return;}if(_0x729efe!=0xc8){_0x2906e6['cb'](null,{'code':_0x729efe,'result':-0x1,'extra':'KO'});return;}_0x45b7d3=_0x2906e6['rx'][_0xf038('0xf')](0x4)[_0xf038('0x14')]('result=','');if(_0x45b7d3[_0xf038('0x15')]('\x20')!=-0x1){_0x45b7d3=_0x45b7d3[_0xf038('0x16')](0x0,_0x45b7d3[_0xf038('0x15')]('\x20'));}if(_[_0xf038('0x17')](_0x45b7d3,'-1')){_0x45b7d3=parseInt(_0x45b7d3);}_0x44adc8=_0x2906e6['rx'][_0xf038('0x18')]('\x20');if(_0x44adc8[_0xf038('0x19')]==0x3){_0x44adc8=_0x44adc8[0x2][_0xf038('0xf')](0x1,_0x44adc8[0x2]['length']-0x1);}else if(_0x44adc8[_0xf038('0x19')]>0x3){var _0xbf21b5=/\((.+)\)/;var _0x45ee32=_0x2906e6['rx']['match'](_0xbf21b5);if(_0x45ee32){_0x44adc8=_0x45ee32[0x1];}else{_0x44adc8=null;}}else{_0x44adc8=null;}_0x2906e6['cb'](null,{'code':_0x729efe,'result':_0x45b7d3,'extra':_0x44adc8});}});_0x476f04['on'](_0xf038('0x1a'),function(_0xc15c2e){_0x25733b[_0xf038('0xa')]('error',new AGIError(_0xf038('0x1b'),_0xc15c2e[_0xf038('0x1c')]));});_0x476f04['on']('close',function(){_0x25733b[_0xf038('0xa')](_0xf038('0x1d'),new AGIError(_0xf038('0x1e')));});_0x476f04['on'](_0xf038('0x1f'),function(){_0x25733b[_0xf038('0xa')]('timeout',new AGIError(_0xf038('0x20')));_0x476f04[_0xf038('0x21')]();});_0x476f04[_0xf038('0x22')](_0x3991a6);this['command']=function(_0x47c5a2,_0x577992){var _0x47c5a2=_0x47c5a2||'',_0x577992=typeof _0x577992=='function'?_0x577992:new Function();_0x2906e6={'tx':_0x47c5a2,'rx':'','cb':_0x577992};_0x476f04[_0xf038('0x23')](_0x47c5a2+'\x0a');},this[_0xf038('0x1d')]=function(){_0x476f04[_0xf038('0x21')]();};}util[_0xf038('0x24')](AGIChannel,EventEmitter);AGIChannel[_0xf038('0x25')][_0xf038('0x26')]=function(_0x3ae231){return this[_0xf038('0x27')][_0xf038('0x28')](this,_0x3ae231);};AGIChannel['prototype'][_0xf038('0x29')]=function(){return this[_0xf038('0x26')](_0xf038('0x2a'));};AGIChannel[_0xf038('0x25')]['getData']=function(_0x535ff8,_0x3e03fa,_0x3949f0){_0x535ff8=_0x535ff8===undefined?_0xf038('0x2b'):_0x535ff8;_0x3e03fa=_0x3e03fa===undefined?'5':_0x3e03fa;_0x3949f0=_0x3949f0===undefined?'1':_0x3949f0;return this[_0xf038('0x26')](util['format'](_0xf038('0x2c'),_0x535ff8,_0x3e03fa*0x3e8,_0x3949f0));};AGIChannel[_0xf038('0x25')][_0xf038('0x2d')]=function(_0x18be81){_0x18be81=_0x18be81||'NO\x20MESSAGE';return this[_0xf038('0x26')](util[_0xf038('0x2e')](_0xf038('0x2f'),_0x18be81));};AGIChannel['prototype'][_0xf038('0x30')]=function(_0x4dba67,_0x5f471d){if(_[_0xf038('0x31')](_0x5f471d)){return this[_0xf038('0x26')](util[_0xf038('0x2e')](_0xf038('0x32'),_0x4dba67,_0x5f471d[_0xf038('0x33')](',')));}return this[_0xf038('0x26')](util['format'](_0xf038('0x32'),_0x4dba67,_0x5f471d));};AGIChannel[_0xf038('0x25')][_0xf038('0x34')]=function(_0x43806d){return this[_0xf038('0x26')](util['format'](_0xf038('0x35'),_0x43806d));};AGIChannel[_0xf038('0x25')][_0xf038('0x36')]=function(_0x4e0a91){return this[_0xf038('0x26')](util['format'](_0xf038('0x37'),_0x4e0a91));};AGIChannel[_0xf038('0x25')][_0xf038('0x38')]=function(_0x5af01f){return this[_0xf038('0x26')](util[_0xf038('0x2e')](_0xf038('0x39'),_0x5af01f));};AGIChannel[_0xf038('0x25')]['hangup']=function(){return this[_0xf038('0x26')](_0xf038('0x3a'));};AGIChannel[_0xf038('0x25')][_0xf038('0x3b')]=function(_0x292973,_0x7f85a2){var _0x1a5576=_[_0xf038('0x3c')](_0x7f85a2)||_['isNumber'](_0x7f85a2)?_0x7f85a2[_0xf038('0x3d')]():_0x7f85a2;return this['sendRequest'](util['format'](_0xf038('0x3e'),_0x292973,_0x1a5576?_0x1a5576[_0xf038('0x3d')]()[_0xf038('0x14')](/(\r\n|\n|\r)/gm,'\x20'):''));};AGIChannel[_0xf038('0x25')][_0xf038('0x3f')]=function(_0x4fd349,_0x1247f7){return this[_0xf038('0x26')](util[_0xf038('0x2e')](_0xf038('0x40'),_0x4fd349,_0x1247f7));};AGIChannel['prototype'][_0xf038('0x41')]=function(_0x4ef30e,_0x241cab){return this[_0xf038('0x26')](util['format'](_0xf038('0x42'),_0x4ef30e,_0x241cab));};AGIChannel[_0xf038('0x25')]['sayPhonetic']=function(_0x1c1b8c,_0xfba0f2){return this[_0xf038('0x26')](util[_0xf038('0x2e')](_0xf038('0x43'),_0x1c1b8c,_0xfba0f2));};AGIChannel[_0xf038('0x25')][_0xf038('0x44')]=function(_0x38f561,_0xdcfaf6,_0x514369){_0xdcfaf6=_0xdcfaf6||this['extension'];_0x514369=_0x514369||0x1;this['setContext'](_0x38f561);this[_0xf038('0x36')](_0xdcfaf6);this['setPriority'](_0x514369);return this['noop'](util['format'](_0xf038('0x45'),_0x38f561,_0xdcfaf6,_0x514369));};AGIChannel['prototype']['getVariable']=function(_0x1289ea){return this['sendRequest'](util[_0xf038('0x2e')](_0xf038('0x46'),_0x1289ea));};AGIChannel['prototype']['recordFile']=function(_0x2e1e31,_0x4e19f9,_0x48efd3,_0x387510,_0x28303a,_0x42123c){_0x4e19f9=_0x4e19f9||_0xf038('0x47');_0x48efd3=_0x48efd3||'';_0x387510=_0x387510===undefined?-0x1:_0x387510==='-1'?-0x1:_0x387510*0x3e8;_0x28303a=_0x28303a===undefined?'':'s='+_0x28303a;_0x42123c=_0x42123c?_0xf038('0x48'):'';return this[_0xf038('0x26')](util[_0xf038('0x2e')]('RECORD\x20FILE\x20\x22%s\x22\x20\x22%s\x22\x20\x22%s\x22\x20%s\x20%s\x20%s',_0x2e1e31,_0x4e19f9,_0x48efd3,_0x387510,_0x42123c,_0x28303a));};AGIChannel[_0xf038('0x25')]['streamFile']=function(_0xc6165f,_0x3a7f6c){_0x3a7f6c=_0x3a7f6c||'';return this[_0xf038('0x26')](util[_0xf038('0x2e')](_0xf038('0x49'),_0xc6165f,_0x3a7f6c));};AGIChannel[_0xf038('0x25')][_0xf038('0x4a')]=function(_0x22fc08){return this[_0xf038('0x30')]('AGI',_0x22fc08);};AGIChannel['prototype'][_0xf038('0x4b')]=function(_0x8205db){return this[_0xf038('0x30')](_0xf038('0x4c'),_0x8205db);};AGIChannel[_0xf038('0x25')][_0xf038('0x1a')]=function(_0x3e6617,_0x1535db){this[_0xf038('0x2d')](util['format'](_0xf038('0x4d'),_0x3e6617['id'],_0x3e6617[_0xf038('0x4e')],_0x1535db));return{'code':0x1f4,'result':'-1','extra':''};};module[_0xf038('0x4f')]=AGIChannel; \ No newline at end of file +var _0x0bd5=['wav','BEEP','RECORD\x20FILE\x20\x22%s\x22\x20\x22%s\x22\x20\x22%s\x22\x20%s\x20%s\x20%s','streamFile','STREAM\x20FILE\x20\x22%s\x22\x20\x22%s\x22','agi','exec','AGI','wait','WAIT','ID:%s\x20-\x20LABEL:\x20%s\x20-\x20MSG:\x20%s','label','exports','util','lodash','events','EventEmitter','./reply','./error','call','setEncoding','utf8','setTimeout','headers','emit','ready','toLowerCase','substring','520-Invalid','search','520\x20End\x20of\x20proper','no\x20code','replace','result=','indexOf','substr','split','length','match','error','E_AGI_SOCKET_CLOSE','timeout','E_AGI_SOCKET_TIMEOUT','close','destroy','prototype','sendRequest','command','sync','answer','getData','beep','format','GET\x20DATA\x20\x22%s\x22\x20%s\x20%s','NO\x20MESSAGE','VERBOSE\x20\x22%s\x22','EXEC\x20%s\x20%s','setContext','SET\x20CONTEXT\x20%s','setPriority','SET\x20PRIORITY\x20%s','hangup','setVariable','isNumber','toString','SAY\x20NUMBER\x20%s\x20%s','sayDigits','SAY\x20DIGITS\x20%s\x20%s','sayPhonetic','continueAt','extension','setExtension','noop','GOTO\x20%s\x20%s\x20%s','getVariable','GET\x20VARIABLE\x20\x22%s\x22'];(function(_0xf2884d,_0x52514e){var _0x34cc1d=function(_0x502330){while(--_0x502330){_0xf2884d['push'](_0xf2884d['shift']());}};_0x34cc1d(++_0x52514e);}(_0x0bd5,0x189));var _0x50bd=function(_0x323b12,_0x37f5ee){_0x323b12=_0x323b12-0x0;var _0x498b32=_0x0bd5[_0x323b12];return _0x498b32;};'use strict';var util=require(_0x50bd('0x0'));var _=require(_0x50bd('0x1'));var EventEmitter=require(_0x50bd('0x2'))[_0x50bd('0x3')];var AGIReply=require(_0x50bd('0x4'));var AGIError=require(_0x50bd('0x5'));function AGIChannel(_0x4bde9b){var _0x2ad7c4=this,_0x166305=new AGIReply(),_0x3566fe=![],_0xa9e120={};EventEmitter[_0x50bd('0x6')](_0x2ad7c4);_0x4bde9b[_0x50bd('0x7')](_0x50bd('0x8'));_0x4bde9b[_0x50bd('0x9')](0x8*0x3c*0x3c*0x3e8);_0x166305[_0x50bd('0x7')](_0x50bd('0x8'));_0x166305['on'](_0x50bd('0xa'),function(_0x5162fe){for(var _0x5b0a9f in _0x5162fe){_0x2ad7c4[_0x5b0a9f]=_0x5162fe[_0x5b0a9f];}_0x2ad7c4[_0x50bd('0xb')](_0x50bd('0xc'));});_0x166305['on']('line',function(_0x1af14c){if(_0x1af14c[_0x50bd('0xd')]()=='hangup'){_0x2ad7c4[_0x50bd('0xb')]('hangup');return;}if(_0x1af14c[_0x50bd('0xe')](0x0,0xb)==_0x50bd('0xf')){_0x3566fe=!![];}if(_0x3566fe){_0xa9e120['rx']+=_0x1af14c+'\x0a';if(_0x1af14c[_0x50bd('0x10')](_0x50bd('0x11'))!=-0x1){_0x3566fe=![];}}else{_0xa9e120['rx']=_0x1af14c;}if(_0x3566fe){return;}if(typeof _0xa9e120['cb']=='function'){var _0x4ea8f3=_0xa9e120['rx']['substring'](0x0,0x3),_0x1c9867=null,_0x170450=null;_0x4ea8f3=parseInt(_0x4ea8f3);if(isNaN(_0x4ea8f3)){_0xa9e120['cb'](null,{'code':0x1f4,'result':-0x1,'extra':_0x50bd('0x12')});return;}if(_0x4ea8f3!=0xc8){_0xa9e120['cb'](null,{'code':_0x4ea8f3,'result':-0x1,'extra':'KO'});return;}_0x1c9867=_0xa9e120['rx']['substring'](0x4)[_0x50bd('0x13')](_0x50bd('0x14'),'');if(_0x1c9867[_0x50bd('0x15')]('\x20')!=-0x1){_0x1c9867=_0x1c9867[_0x50bd('0x16')](0x0,_0x1c9867[_0x50bd('0x15')]('\x20'));}if(_['startsWith'](_0x1c9867,'-1')){_0x1c9867=parseInt(_0x1c9867);}_0x170450=_0xa9e120['rx'][_0x50bd('0x17')]('\x20');if(_0x170450[_0x50bd('0x18')]==0x3){_0x170450=_0x170450[0x2][_0x50bd('0xe')](0x1,_0x170450[0x2][_0x50bd('0x18')]-0x1);}else if(_0x170450[_0x50bd('0x18')]>0x3){var _0x28490c=/\((.+)\)/;var _0x33f927=_0xa9e120['rx'][_0x50bd('0x19')](_0x28490c);if(_0x33f927){_0x170450=_0x33f927[0x1];}else{_0x170450=null;}}else{_0x170450=null;}_0xa9e120['cb'](null,{'code':_0x4ea8f3,'result':_0x1c9867,'extra':_0x170450});}});_0x4bde9b['on']('error',function(_0xdb3da0){_0x2ad7c4[_0x50bd('0xb')](_0x50bd('0x1a'),new AGIError('E_AGI_SOCKET_ERROR',_0xdb3da0['code']));});_0x4bde9b['on']('close',function(){_0x2ad7c4[_0x50bd('0xb')]('close',new AGIError(_0x50bd('0x1b')));});_0x4bde9b['on'](_0x50bd('0x1c'),function(){_0x2ad7c4[_0x50bd('0xb')](_0x50bd('0x1c'),new AGIError(_0x50bd('0x1d')));_0x4bde9b['destroy']();});_0x4bde9b['pipe'](_0x166305);this['command']=function(_0x43f889,_0x5727de){var _0x43f889=_0x43f889||'',_0x5727de=typeof _0x5727de=='function'?_0x5727de:new Function();_0xa9e120={'tx':_0x43f889,'rx':'','cb':_0x5727de};_0x4bde9b['write'](_0x43f889+'\x0a');},this[_0x50bd('0x1e')]=function(){_0x4bde9b[_0x50bd('0x1f')]();};}util['inherits'](AGIChannel,EventEmitter);AGIChannel[_0x50bd('0x20')][_0x50bd('0x21')]=function(_0x256491){return this[_0x50bd('0x22')][_0x50bd('0x23')](this,_0x256491);};AGIChannel[_0x50bd('0x20')][_0x50bd('0x24')]=function(){return this[_0x50bd('0x21')]('ANSWER');};AGIChannel[_0x50bd('0x20')][_0x50bd('0x25')]=function(_0x2fa81b,_0x3df520,_0x2f07de){_0x2fa81b=_0x2fa81b===undefined?_0x50bd('0x26'):_0x2fa81b;_0x3df520=_0x3df520===undefined?'5':_0x3df520;_0x2f07de=_0x2f07de===undefined?'1':_0x2f07de;return this['sendRequest'](util[_0x50bd('0x27')](_0x50bd('0x28'),_0x2fa81b,_0x3df520*0x3e8,_0x2f07de));};AGIChannel[_0x50bd('0x20')]['noop']=function(_0x200b9b){_0x200b9b=_0x200b9b||_0x50bd('0x29');return this[_0x50bd('0x21')](util[_0x50bd('0x27')](_0x50bd('0x2a'),_0x200b9b));};AGIChannel[_0x50bd('0x20')]['exec']=function(_0x1bd70d,_0x56e35d){if(_['isArray'](_0x56e35d)){return this[_0x50bd('0x21')](util[_0x50bd('0x27')](_0x50bd('0x2b'),_0x1bd70d,_0x56e35d['join'](',')));}return this[_0x50bd('0x21')](util['format'](_0x50bd('0x2b'),_0x1bd70d,_0x56e35d));};AGIChannel['prototype'][_0x50bd('0x2c')]=function(_0x5e2e89){return this[_0x50bd('0x21')](util[_0x50bd('0x27')](_0x50bd('0x2d'),_0x5e2e89));};AGIChannel[_0x50bd('0x20')]['setExtension']=function(_0x4e6ecf){return this[_0x50bd('0x21')](util['format']('SET\x20EXTENSION\x20%s',_0x4e6ecf));};AGIChannel[_0x50bd('0x20')][_0x50bd('0x2e')]=function(_0x1e557f){return this[_0x50bd('0x21')](util[_0x50bd('0x27')](_0x50bd('0x2f'),_0x1e557f));};AGIChannel[_0x50bd('0x20')][_0x50bd('0x30')]=function(){return this[_0x50bd('0x21')]('HANGUP');};AGIChannel['prototype'][_0x50bd('0x31')]=function(_0x367226,_0x3ec4ca){var _0x680a6d=_['isBoolean'](_0x3ec4ca)||_[_0x50bd('0x32')](_0x3ec4ca)?_0x3ec4ca[_0x50bd('0x33')]():_0x3ec4ca;return this['sendRequest'](util[_0x50bd('0x27')]('SET\x20VARIABLE\x20%s\x20\x22%s\x22',_0x367226,_0x680a6d?_0x680a6d[_0x50bd('0x33')]()[_0x50bd('0x13')](/(\r\n|\n|\r)/gm,'\x20'):''));};AGIChannel[_0x50bd('0x20')]['sayNumber']=function(_0xb0006d,_0x34d59a){return this[_0x50bd('0x21')](util['format'](_0x50bd('0x34'),_0xb0006d,_0x34d59a));};AGIChannel[_0x50bd('0x20')][_0x50bd('0x35')]=function(_0x5e7270,_0x22a875){return this['sendRequest'](util['format'](_0x50bd('0x36'),_0x5e7270,_0x22a875));};AGIChannel[_0x50bd('0x20')][_0x50bd('0x37')]=function(_0x413a8c,_0x2e1c47){return this[_0x50bd('0x21')](util[_0x50bd('0x27')]('SAY\x20PHONETIC\x20\x22%s\x22\x20%s',_0x413a8c,_0x2e1c47));};AGIChannel[_0x50bd('0x20')][_0x50bd('0x38')]=function(_0x739ae9,_0x328d6e,_0x5ed690){_0x328d6e=_0x328d6e||this[_0x50bd('0x39')];_0x5ed690=_0x5ed690||0x1;this[_0x50bd('0x2c')](_0x739ae9);this[_0x50bd('0x3a')](_0x328d6e);this[_0x50bd('0x2e')](_0x5ed690);return this[_0x50bd('0x3b')](util['format'](_0x50bd('0x3c'),_0x739ae9,_0x328d6e,_0x5ed690));};AGIChannel[_0x50bd('0x20')][_0x50bd('0x3d')]=function(_0x385b21){return this[_0x50bd('0x21')](util[_0x50bd('0x27')](_0x50bd('0x3e'),_0x385b21));};AGIChannel['prototype']['recordFile']=function(_0x1379a0,_0x1020dc,_0x51f7e9,_0xb6c07b,_0x2237b9,_0x46f4f5){_0x1020dc=_0x1020dc||_0x50bd('0x3f');_0x51f7e9=_0x51f7e9||'';_0xb6c07b=_0xb6c07b===undefined?-0x1:_0xb6c07b==='-1'?-0x1:_0xb6c07b*0x3e8;_0x2237b9=_0x2237b9===undefined?'':'s='+_0x2237b9;_0x46f4f5=_0x46f4f5?_0x50bd('0x40'):'';return this['sendRequest'](util[_0x50bd('0x27')](_0x50bd('0x41'),_0x1379a0,_0x1020dc,_0x51f7e9,_0xb6c07b,_0x46f4f5,_0x2237b9));};AGIChannel[_0x50bd('0x20')][_0x50bd('0x42')]=function(_0x2bc3d3,_0x3b2bec){_0x3b2bec=_0x3b2bec||'';return this['sendRequest'](util[_0x50bd('0x27')](_0x50bd('0x43'),_0x2bc3d3,_0x3b2bec));};AGIChannel[_0x50bd('0x20')][_0x50bd('0x44')]=function(_0x11b23d){return this[_0x50bd('0x45')](_0x50bd('0x46'),_0x11b23d);};AGIChannel[_0x50bd('0x20')][_0x50bd('0x47')]=function(_0x59cbc1){return this[_0x50bd('0x45')](_0x50bd('0x48'),_0x59cbc1);};AGIChannel[_0x50bd('0x20')][_0x50bd('0x1a')]=function(_0x405f1a,_0x146d9a){this[_0x50bd('0x3b')](util[_0x50bd('0x27')](_0x50bd('0x49'),_0x405f1a['id'],_0x405f1a[_0x50bd('0x4a')],_0x146d9a));return{'code':0x1f4,'result':'-1','extra':''};};module[_0x50bd('0x4b')]=AGIChannel; \ No newline at end of file diff --git a/server/services/agi/error.js b/server/services/agi/error.js index 986c060..a99745e 100644 --- a/server/services/agi/error.js +++ b/server/services/agi/error.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1f41=['format','apply','message','name','exports','util','Server\x20error.\x20Code:\x20%s.','Server\x20closed.','[LICENSE]\x20Server\x20max\x20connection.\x20Count:\x20%s.','Socket\x20error.\x20Code:\x20%s.','Socket\x20closed.','Empty\x20command.','Missing\x20\x27ivr.entry\x27\x20menu.','E_AGI_UNDEFINED','push'];(function(_0x11a51b,_0x5bfe94){var _0x2cf0a6=function(_0x48d445){while(--_0x48d445){_0x11a51b['push'](_0x11a51b['shift']());}};_0x2cf0a6(++_0x5bfe94);}(_0x1f41,0x19a));var _0x11f4=function(_0x52d3bc,_0x20605d){_0x52d3bc=_0x52d3bc-0x0;var _0x16bb00=_0x1f41[_0x52d3bc];return _0x16bb00;};'use strict';var util=require(_0x11f4('0x0'));var error={'E_AGI_UNDEFINED':'Undefined\x20error.','E_AGI_ARGUMENT_PORT':'Argument\x20\x27port\x27\x20missing\x20in\x20function\x20call.','E_AGI_SERVER_ERROR':_0x11f4('0x1'),'E_AGI_SERVER_CLOSE':_0x11f4('0x2'),'E_AGI_SERVER_MAXCONNECTION':_0x11f4('0x3'),'E_AGI_SERVER_VOICE_DISABLED':'[LICENSE\x20VOICE]\x20Server\x20license\x20voice\x20disabled.','E_AGI_SOCKET_ERROR':_0x11f4('0x4'),'E_AGI_SOCKET_CLOSE':_0x11f4('0x5'),'E_AGI_SOCKET_TIMEOUT':'Socket\x20timeout.','E_AGI_COMMAND_EMPTY':_0x11f4('0x6'),'E_AGI_IVR_AGI_NETWORK_SCRIPT':'Missing\x20\x27ivr.agi_network_script\x27.','E_AGI_IVR_ENTRY':_0x11f4('0x7')};function AGIError(_0x3b3bee){var _0x3b3bee=_0x3b3bee||null,_0x519696=_0x519696||[],_0x454379=0x1,_0x349e0c='';if(!error[_0x3b3bee]){_0x3b3bee=_0x11f4('0x8');}_0x519696[_0x11f4('0x9')](error[_0x3b3bee]);while(arguments[_0x454379]){_0x519696['push'](arguments[_0x454379]);_0x454379++;}_0x349e0c=util[_0x11f4('0xa')][_0x11f4('0xb')](util,_0x519696);this[_0x11f4('0xc')]=_0x349e0c;this[_0x11f4('0xd')]=_0x3b3bee;}module[_0x11f4('0xe')]=AGIError; \ No newline at end of file +var _0x8325=['Socket\x20timeout.','Empty\x20command.','Missing\x20\x27ivr.agi_network_script\x27.','E_AGI_UNDEFINED','push','apply','message','name','exports','util','Undefined\x20error.','Argument\x20\x27port\x27\x20missing\x20in\x20function\x20call.','Server\x20error.\x20Code:\x20%s.','[LICENSE]\x20Server\x20max\x20connection.\x20Count:\x20%s.','[LICENSE\x20VOICE]\x20Server\x20license\x20voice\x20disabled.','Socket\x20closed.'];(function(_0x1bc82c,_0x4dff4c){var _0x5b2ada=function(_0x1ebb57){while(--_0x1ebb57){_0x1bc82c['push'](_0x1bc82c['shift']());}};_0x5b2ada(++_0x4dff4c);}(_0x8325,0x119));var _0x5832=function(_0x2c72ec,_0x422b49){_0x2c72ec=_0x2c72ec-0x0;var _0x227208=_0x8325[_0x2c72ec];return _0x227208;};'use strict';var util=require(_0x5832('0x0'));var error={'E_AGI_UNDEFINED':_0x5832('0x1'),'E_AGI_ARGUMENT_PORT':_0x5832('0x2'),'E_AGI_SERVER_ERROR':_0x5832('0x3'),'E_AGI_SERVER_CLOSE':'Server\x20closed.','E_AGI_SERVER_MAXCONNECTION':_0x5832('0x4'),'E_AGI_SERVER_VOICE_DISABLED':_0x5832('0x5'),'E_AGI_SOCKET_ERROR':'Socket\x20error.\x20Code:\x20%s.','E_AGI_SOCKET_CLOSE':_0x5832('0x6'),'E_AGI_SOCKET_TIMEOUT':_0x5832('0x7'),'E_AGI_COMMAND_EMPTY':_0x5832('0x8'),'E_AGI_IVR_AGI_NETWORK_SCRIPT':_0x5832('0x9'),'E_AGI_IVR_ENTRY':'Missing\x20\x27ivr.entry\x27\x20menu.'};function AGIError(_0x57ce3a){var _0x57ce3a=_0x57ce3a||null,_0x4e419f=_0x4e419f||[],_0x208f17=0x1,_0x4498da='';if(!error[_0x57ce3a]){_0x57ce3a=_0x5832('0xa');}_0x4e419f['push'](error[_0x57ce3a]);while(arguments[_0x208f17]){_0x4e419f[_0x5832('0xb')](arguments[_0x208f17]);_0x208f17++;}_0x4498da=util['format'][_0x5832('0xc')](util,_0x4e419f);this[_0x5832('0xd')]=_0x4498da;this[_0x5832('0xe')]=_0x57ce3a;}module[_0x5832('0xf')]=AGIError; \ No newline at end of file diff --git a/server/services/agi/graph/index.js b/server/services/agi/graph/index.js index 04c53a2..ff1cfe7 100644 --- a/server/services/agi/graph/index.js +++ b/server/services/agi/graph/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3c19=['info','stop\x20traverse','no\x20edge/s\x20available','length','condition','agicommand','vswitch','target','invalid','default\x20on\x20switch\x20not\x20found','max\x20retry\x20reach','condition\x20not\x20found','exports','lodash','../../../config/logger','agi','getsecretdigits','vertices','edges','numberOfEdges','prototype','push','size','relations','getVertex','traverseBFS','no\x20vertex\x20found'];(function(_0x536638,_0x28a743){var _0x4033ef=function(_0x4b8069){while(--_0x4b8069){_0x536638['push'](_0x536638['shift']());}};_0x4033ef(++_0x28a743);}(_0x3c19,0x11b));var _0x93c1=function(_0x12c34e,_0x39287a){_0x12c34e=_0x12c34e-0x0;var _0x244e88=_0x3c19[_0x12c34e];return _0x244e88;};'use strict';var _=require(_0x93c1('0x0'));var logger=require(_0x93c1('0x1'))(_0x93c1('0x2'));var verticesWithRetry=['menu','getdigits',_0x93c1('0x3')];var Graph=function(){this[_0x93c1('0x4')]={};this[_0x93c1('0x5')]={};this[_0x93c1('0x6')]=0x0;};Graph['prototype']['addVertex']=function(_0x31c727){this[_0x93c1('0x4')][_0x31c727['id']]=_0x31c727;this[_0x93c1('0x5')][_0x31c727['id']]=[];};Graph[_0x93c1('0x7')]['addEdge']=function(_0xd78383,_0x429af3,_0x30a226){this[_0x93c1('0x5')][_0xd78383][_0x93c1('0x8')]({'target':_0x429af3,'condition':_0x30a226});this[_0x93c1('0x6')]+=0x1;};Graph[_0x93c1('0x7')]['size']=function(){return _[_0x93c1('0x9')](this['vertices']);};Graph['prototype'][_0x93c1('0xa')]=function(){return this['numberOfEdges'];};Graph[_0x93c1('0x7')][_0x93c1('0xb')]=function(_0x362440){return this[_0x93c1('0x4')][_0x362440];};Graph[_0x93c1('0x7')][_0x93c1('0xc')]=function(_0x5320ff,_0x5128f2){if(!this[_0x93c1('0x4')][_0x5320ff]){return logger['info'](_0x93c1('0xd'));}var _0x26decb=_0x5128f2(this[_0x93c1('0x4')][_0x5320ff]);if(!_0x26decb){return logger[_0x93c1('0xe')](_0x93c1('0xf'));}if(this[_0x93c1('0x5')][_0x5320ff]['length']===0x0){return logger['info'](_0x93c1('0x10'));}for(var _0x11a8f6=0x0,_0x5266a4=[],_0x1b6671=![];_0x11a8f6\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','close','timeout','hangup','production','start','joinAt','YYYY-MM-DD\x20HH:mm:ss','[START\x20TRAVERSE]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','traverseBFS','clear','vertex','gotoc','gotoc\x20block\x20stop\x20traverse\x20BFS','context','extension','priority','response','code','result','isUndefined','toString','agicommand\x20not\x20found','finally','[END]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','[GOTO]\x20context:\x20%s\x20extension:\x20%s\x20priority:\x20%s','continueAt','Project\x20%s\x20not\x20published','Project\x20%s\x20not\x20found','getLicense','voice','callysquare','[LICENSE]\x20CHANNELS:\x20%s','[LICENSE]\x20VOICE\x20IS\x20DISABLED','[LICENSE]','./server','listening','connection','lodash','syncho','util','moment','../../config/environment','../../config/license/util','./vertices','agi','defaults','127.0.0.1','nextTick','error','stack','[LISTENING]\x20Cally\x20Square\x20listening\x20%s:%d','port','name','message','[%s]\x20%s','format','[ERROR]\x20%s','info','[CLOSE]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','calleridname','callerid','dnid','[TIMEOUT]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','arg_1','uniqueid','[HANGUP]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','evtHangup','mxGraphModel','root','agicommand','hasOwnProperty','retry','addVertex','omit','mxCell','isArray','length','source','target','value'];(function(_0x21d532,_0x4552a4){var _0x37bda1=function(_0x134a6f){while(--_0x134a6f){_0x21d532['push'](_0x21d532['shift']());}};_0x37bda1(++_0x4552a4);}(_0x83b7,0x197));var _0x783b=function(_0x3a67db,_0x4c0eaf){_0x3a67db=_0x3a67db-0x0;var _0x204991=_0x83b7[_0x3a67db];return _0x204991;};'use strict';var parser=require('xml2json');var _=require(_0x783b('0x0'));var syncho=require(_0x783b('0x1'));var util=require(_0x783b('0x2'));var moment=require(_0x783b('0x3'));var config=require(_0x783b('0x4'));var logger=require('../../config/logger')('agi');var utilLicense=require(_0x783b('0x5'));var rpc=require('./rpc');var mailRpc=require('./mailRpc');var Graph=require('./graph');var Vertices=require(_0x783b('0x6'));var AGI_CODE_SUCCESS=0xc8;var AGI_RESULT_ERROR=-0x1;config[_0x783b('0x7')]=_[_0x783b('0x8')](config['agi'],{'ip':_0x783b('0x9'),'port':0x11dd});function connectionHandler(_0x119675){process[_0x783b('0xa')](function(){syncho(function(){try{setChannelVariables(_0x119675);agiHandler(_0x119675);}catch(_0x56d7ac){logger[_0x783b('0xb')](_0x56d7ac[_0x783b('0xc')]);}});});}function listeningHandler(){console['log']('Cally\x20Square\x20server\x20listening\x20on\x20port\x20%d!',config[_0x783b('0x7')]['port']);logger['info'](util['format'](_0x783b('0xd'),config[_0x783b('0x7')]['ip'],config['agi'][_0x783b('0xe')]));}function errorHandler(_0x37998d){if(_0x37998d&&_0x37998d[_0x783b('0xf')]&&_0x37998d[_0x783b('0x10')]){logger[_0x783b('0xb')](util['format'](_0x783b('0x11'),_0x37998d['name'],_0x37998d[_0x783b('0x10')]));}else{logger[_0x783b('0xb')](util[_0x783b('0x12')](_0x783b('0x13'),_0x37998d[_0x783b('0xc')]));}}function closeHandler(){logger[_0x783b('0x14')](util[_0x783b('0x12')](_0x783b('0x15'),this['arg_1'],this[_0x783b('0x16')],this[_0x783b('0x17')],this[_0x783b('0x18')],this['uniqueid']));try{createSquareReport(this);}catch(_0x51ac90){logger[_0x783b('0xb')](_0x51ac90['stack']);}}function timeoutHandler(){logger[_0x783b('0x14')](util[_0x783b('0x12')](_0x783b('0x19'),this[_0x783b('0x1a')],this[_0x783b('0x16')],this[_0x783b('0x17')],this['dnid'],this[_0x783b('0x1b')]));}function hangupHandler(){logger['info'](util[_0x783b('0x12')](_0x783b('0x1c'),this['arg_1'],this[_0x783b('0x16')],this[_0x783b('0x17')],this[_0x783b('0x18')],this[_0x783b('0x1b')]));this[_0x783b('0x1d')]=!![];}function getRoot(_0x3252fb){return parser['toJson'](_0x3252fb,{'object':!![]})[_0x783b('0x1e')][_0x783b('0x1f')];}function addVertex(_0x1905f5,_0x5ec319,_0x5905c0){_0x5ec319[_0x783b('0x20')]=_0x5905c0;if(_0x5ec319[_0x783b('0x21')](_0x783b('0x22'))){_0x5ec319['maxRetry']=parseInt(_0x5ec319['retry'],0xa);}_0x1905f5[_0x783b('0x23')](_[_0x783b('0x24')](_0x5ec319,_0x783b('0x25')));}function initGraph(_0xde2f20,_0x5eb775){var _0x528095=new Graph();for(var _0x2f234b in _0xde2f20){if(_0xde2f20[_0x783b('0x21')](_0x2f234b)){if(_[_0x783b('0x26')](_0xde2f20[_0x2f234b])){for(var _0x2f9da0=0x0;_0x2f9da0<_0xde2f20[_0x2f234b][_0x783b('0x27')];_0x2f9da0+=0x1){addVertex(_0x528095,_0xde2f20[_0x2f234b][_0x2f9da0],_0x2f234b);}}else{addVertex(_0x528095,_0xde2f20[_0x2f234b],_0x2f234b);}}}for(var _0x5b9d19=0x0;_0x5b9d19<_0x5eb775['length'];_0x5b9d19+=0x1){if(_0x5eb775[_0x5b9d19][_0x783b('0x28')]&&_0x5eb775[_0x5b9d19][_0x783b('0x29')]){_0x528095['addEdge'](_0x5eb775[_0x5b9d19][_0x783b('0x28')],_0x5eb775[_0x5b9d19][_0x783b('0x29')],_0x5eb775[_0x5b9d19][_0x783b('0x2a')]);}}return _0x528095;}function getSquareProject(_0x3034dd,_0x23764e){rpc[_0x783b('0x2b')](_0x3034dd)[_0x783b('0x2c')](function(_0x37184b){_0x23764e(null,_0x37184b);})[_0x783b('0x2d')](function(_0xa38e12){_0x23764e(null,_0xa38e12);});}function createSquareReport(_0xd72963,_0x243e1b){rpc[_0x783b('0x2e')](_0xd72963)[_0x783b('0x2c')](function(_0x3a0d1f){if(_0x243e1b){_0x243e1b(null,_0x3a0d1f);}})[_0x783b('0x2d')](function(_0x32baed){if(_0x243e1b){_0x243e1b(null,_0x32baed);}});}function setChannelVariables(_0x1287a6){for(var _0x31ac2f in _0x1287a6){if(_0x1287a6[_0x783b('0x21')](_0x31ac2f)){if(_0x31ac2f['indexOf']('agi_')===0x0){_0x1287a6[_0x31ac2f[_0x783b('0x2f')](0x4)]=_0x1287a6[_0x31ac2f];delete _0x1287a6[_0x31ac2f];}}}}function getLogFromObject(_0x2f5ad3){return util[_0x783b('0x30')](_0x2f5ad3,{'showHidden':![],'depth':null});}function agiHandler(_0x1874a0){var _0x591250,_0x53a4a8,_0x559562,_0x371434,_0x45e723;logger[_0x783b('0x31')](_0x783b('0x32'),JSON[_0x783b('0x33')](_0x1874a0,null,0x2));logger[_0x783b('0x14')](util[_0x783b('0x12')](_0x783b('0x34'),_0x1874a0['arg_1'],_0x1874a0[_0x783b('0x16')],_0x1874a0[_0x783b('0x17')],_0x1874a0[_0x783b('0x18')],_0x1874a0['uniqueid']));_0x1874a0['on'](_0x783b('0xb'),errorHandler);_0x1874a0['on'](_0x783b('0x35'),closeHandler);_0x1874a0['on'](_0x783b('0x36'),timeoutHandler);_0x1874a0[_0x783b('0x1d')]=![];_0x1874a0['on'](_0x783b('0x37'),hangupHandler);var _0x49d6dd=getSquareProject['sync'](null,_0x1874a0[_0x783b('0x1a')]);if(_0x49d6dd){if(_0x49d6dd[_0x783b('0x38')]){_0x591250=getRoot(_0x49d6dd[_0x783b('0x38')]);if(_0x591250&&_0x591250[_0x783b('0x39')]){logger[_0x783b('0x31')]('root',JSON['stringify'](_0x591250,null,0x2));_0x1874a0[_0x783b('0x3a')]=moment()[_0x783b('0x12')](_0x783b('0x3b'));_0x53a4a8=initGraph(_[_0x783b('0x24')](_0x591250,_0x783b('0x25')),_0x591250[_0x783b('0x25')]);_0x559562=new Vertices(_0x1874a0,rpc,mailRpc);logger[_0x783b('0x14')](util['format'](_0x783b('0x3c'),_0x1874a0[_0x783b('0x1a')],_0x1874a0[_0x783b('0x16')],_0x1874a0[_0x783b('0x17')],_0x1874a0[_0x783b('0x18')],_0x1874a0[_0x783b('0x1b')]));_0x53a4a8[_0x783b('0x3d')](_0x591250[_0x783b('0x39')]['id'],function(_0x4cd5ce){try{_0x4cd5ce=_0x559562[_0x783b('0x3e')](_0x4cd5ce);logger['debug'](_0x783b('0x3f'),JSON[_0x783b('0x33')](_0x4cd5ce,null,0x2));if(_0x4cd5ce['agicommand']===_0x783b('0x40')){logger[_0x783b('0x14')](_0x783b('0x41'));_0x1874a0[_0x783b('0x42')]=_0x4cd5ce['context']||_0x1874a0['context'];_0x1874a0['extension']=_0x4cd5ce[_0x783b('0x43')];_0x1874a0['priority']=_0x4cd5ce[_0x783b('0x44')]?_0x4cd5ce['priority']-0x1:0x1;return null;}else if(_0x4cd5ce&&_0x559562[_0x4cd5ce[_0x783b('0x20')]]){_0x45e723=_0x559562[_0x4cd5ce[_0x783b('0x20')]](_0x4cd5ce);logger[_0x783b('0x14')](_0x783b('0x45'),JSON[_0x783b('0x33')](_0x45e723,null,0x2));if(_0x45e723&&_0x45e723[_0x783b('0x46')]===AGI_CODE_SUCCESS&&_0x45e723[_0x783b('0x47')]!==AGI_RESULT_ERROR&&!_0x1874a0['evtHangup']){logger[_0x783b('0x31')](_0x783b('0x45'),getLogFromObject(_0x45e723));return _[_0x783b('0x48')](_0x45e723[_0x783b('0x47')])?null:_0x45e723['result'][_0x783b('0x49')]();}else{logger[_0x783b('0xb')]('response',getLogFromObject(_0x45e723));return null;}}else{logger['error'](_0x783b('0x4a'));return null;}}catch(_0x1a222f){logger[_0x783b('0xb')](_0x1a222f[_0x783b('0xc')]);return null;}});if(_0x591250[_0x783b('0x4b')]){logger[_0x783b('0x14')](util[_0x783b('0x12')]('[FINALLY\x20TRAVERSE]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s',_0x1874a0[_0x783b('0x1a')],_0x1874a0[_0x783b('0x16')],_0x1874a0[_0x783b('0x17')],_0x1874a0[_0x783b('0x18')],_0x1874a0['uniqueid']));_0x53a4a8['traverseBFS'](_0x591250[_0x783b('0x4b')]['id'],function(_0x31fc9a){try{_0x31fc9a=_0x559562[_0x783b('0x3e')](_0x31fc9a);logger['debug'](_0x783b('0x3f'),JSON['stringify'](_0x31fc9a,null,0x2));if(_0x31fc9a&&_0x559562[_0x31fc9a['agicommand']]){_0x45e723=_0x559562[_0x31fc9a['agicommand']](_0x31fc9a);if(_0x45e723){logger[_0x783b('0x31')](_0x783b('0x45'),getLogFromObject(_0x45e723));return _[_0x783b('0x48')](_0x45e723['result'])?null:_0x45e723[_0x783b('0x47')][_0x783b('0x49')]();}else{logger['error'](_0x783b('0x45'),getLogFromObject(_0x45e723));return null;}}else{logger['error'](_0x783b('0x4a'));return null;}}catch(_0x443dc8){logger[_0x783b('0xb')](_0x443dc8[_0x783b('0xc')]);return null;}});}logger[_0x783b('0x14')](util[_0x783b('0x12')](_0x783b('0x4c'),_0x1874a0[_0x783b('0x1a')],_0x1874a0[_0x783b('0x16')],_0x1874a0[_0x783b('0x17')],_0x1874a0[_0x783b('0x18')],_0x1874a0['uniqueid']));logger[_0x783b('0x14')](util[_0x783b('0x12')](_0x783b('0x4d'),_0x1874a0[_0x783b('0x42')],_0x1874a0[_0x783b('0x43')],parseInt(_0x1874a0['priority'],0xa)+0x1));_0x1874a0[_0x783b('0x4e')](_0x1874a0[_0x783b('0x42')],_0x1874a0[_0x783b('0x43')],parseInt(_0x1874a0[_0x783b('0x44')],0xa)+0x1);_0x1874a0[_0x783b('0x35')]();}}else{logger['error'](util[_0x783b('0x12')](_0x783b('0x4f'),_0x1874a0['arg_1']));_0x1874a0['continueAt'](_0x1874a0[_0x783b('0x42')],_0x1874a0[_0x783b('0x43')],parseInt(_0x1874a0[_0x783b('0x44')],0xa)+0x1);_0x1874a0[_0x783b('0x35')]();}}else{logger[_0x783b('0xb')](util[_0x783b('0x12')](_0x783b('0x50'),_0x1874a0[_0x783b('0x1a')]));_0x1874a0[_0x783b('0x4e')](_0x1874a0[_0x783b('0x42')],_0x1874a0[_0x783b('0x43')],parseInt(_0x1874a0[_0x783b('0x44')],0xa)+0x1);_0x1874a0[_0x783b('0x35')]();}}function main(){var _0x20ed15;return utilLicense[_0x783b('0x51')]()['then'](function(_0x39cabe){if(_0x39cabe){if(_0x39cabe[_0x783b('0x52')]){if(_0x39cabe[_0x783b('0x53')]&&_0x39cabe['callysquare']>0x0){logger[_0x783b('0x14')](util[_0x783b('0x12')](_0x783b('0x54'),_0x39cabe[_0x783b('0x53')]));_0x20ed15=_0x39cabe[_0x783b('0x53')];}else{logger[_0x783b('0x14')]('[LICENSE]\x20CHANNELS:\x20UNLIMITED');}}else{logger[_0x783b('0x14')](_0x783b('0x55'));_0x20ed15=-0x1;}}})['catch'](function(_0x424179){logger[_0x783b('0xb')](_0x783b('0x56'),_0x424179[_0x783b('0xc')]);})[_0x783b('0x4b')](function(){var _0x408adc=require(_0x783b('0x57'))(config['agi']['port'],config['agi']['ip'],_0x20ed15);_0x408adc['on'](_0x783b('0xb'),errorHandler);_0x408adc['on'](_0x783b('0x58'),listeningHandler);_0x408adc['on'](_0x783b('0x59'),connectionHandler);_0x408adc['on'](_0x783b('0x35'),closeHandler);});}main(); \ No newline at end of file +var _0xda4c=['stack','log','Cally\x20Square\x20server\x20listening\x20on\x20port\x20%d!','port','info','format','[LISTENING]\x20Cally\x20Square\x20listening\x20%s:%d','name','message','[%s]\x20%s','[ERROR]\x20%s','[CLOSE]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','calleridname','callerid','dnid','uniqueid','arg_1','toJson','mxGraphModel','root','agicommand','retry','maxRetry','addVertex','omit','hasOwnProperty','isArray','source','addEdge','target','value','getSquareProject','catch','indexOf','agi_','substring','debug','variables','stringify','[START]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','close','timeout','evtHangup','hangup','sync','production','start','joinAt','YYYY-MM-DD\x20HH:mm:ss','mxCell','[START\x20TRAVERSE]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','traverseBFS','clear','gotoc','gotoc\x20block\x20stop\x20traverse\x20BFS','context','extension','priority','response','code','isUndefined','result','toString','finally','[FINALLY\x20TRAVERSE]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','vertex','agicommand\x20not\x20found','continueAt','Project\x20%s\x20not\x20published','Project\x20%s\x20not\x20found','then','voice','callysquare','[LICENSE]\x20CHANNELS:\x20UNLIMITED','[LICENSE]\x20VOICE\x20IS\x20DISABLED','[LICENSE]','./server','listening','connection','xml2json','util','moment','../../config/environment','../../config/logger','agi','../../config/license/util','./rpc','./mailRpc','./graph','nextTick','error'];(function(_0x470cfd,_0x2b5879){var _0x44c8c7=function(_0x5d87ab){while(--_0x5d87ab){_0x470cfd['push'](_0x470cfd['shift']());}};_0x44c8c7(++_0x2b5879);}(_0xda4c,0xaa));var _0xcda4=function(_0x5ec3f1,_0x1153d5){_0x5ec3f1=_0x5ec3f1-0x0;var _0x13b84b=_0xda4c[_0x5ec3f1];return _0x13b84b;};'use strict';var parser=require(_0xcda4('0x0'));var _=require('lodash');var syncho=require('syncho');var util=require(_0xcda4('0x1'));var moment=require(_0xcda4('0x2'));var config=require(_0xcda4('0x3'));var logger=require(_0xcda4('0x4'))(_0xcda4('0x5'));var utilLicense=require(_0xcda4('0x6'));var rpc=require(_0xcda4('0x7'));var mailRpc=require(_0xcda4('0x8'));var Graph=require(_0xcda4('0x9'));var Vertices=require('./vertices');var AGI_CODE_SUCCESS=0xc8;var AGI_RESULT_ERROR=-0x1;config[_0xcda4('0x5')]=_['defaults'](config[_0xcda4('0x5')],{'ip':'127.0.0.1','port':0x11dd});function connectionHandler(_0x2329f8){process[_0xcda4('0xa')](function(){syncho(function(){try{setChannelVariables(_0x2329f8);agiHandler(_0x2329f8);}catch(_0x3f0ba4){logger[_0xcda4('0xb')](_0x3f0ba4[_0xcda4('0xc')]);}});});}function listeningHandler(){console[_0xcda4('0xd')](_0xcda4('0xe'),config[_0xcda4('0x5')][_0xcda4('0xf')]);logger[_0xcda4('0x10')](util[_0xcda4('0x11')](_0xcda4('0x12'),config[_0xcda4('0x5')]['ip'],config['agi'][_0xcda4('0xf')]));}function errorHandler(_0x1fef0d){if(_0x1fef0d&&_0x1fef0d[_0xcda4('0x13')]&&_0x1fef0d[_0xcda4('0x14')]){logger[_0xcda4('0xb')](util[_0xcda4('0x11')](_0xcda4('0x15'),_0x1fef0d[_0xcda4('0x13')],_0x1fef0d[_0xcda4('0x14')]));}else{logger[_0xcda4('0xb')](util[_0xcda4('0x11')](_0xcda4('0x16'),_0x1fef0d[_0xcda4('0xc')]));}}function closeHandler(){logger[_0xcda4('0x10')](util['format'](_0xcda4('0x17'),this['arg_1'],this[_0xcda4('0x18')],this[_0xcda4('0x19')],this[_0xcda4('0x1a')],this[_0xcda4('0x1b')]));try{createSquareReport(this);}catch(_0x1fe190){logger[_0xcda4('0xb')](_0x1fe190[_0xcda4('0xc')]);}}function timeoutHandler(){logger[_0xcda4('0x10')](util[_0xcda4('0x11')]('[TIMEOUT]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s',this['arg_1'],this[_0xcda4('0x18')],this[_0xcda4('0x19')],this['dnid'],this[_0xcda4('0x1b')]));}function hangupHandler(){logger[_0xcda4('0x10')](util[_0xcda4('0x11')]('[HANGUP]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s',this[_0xcda4('0x1c')],this['calleridname'],this[_0xcda4('0x19')],this[_0xcda4('0x1a')],this[_0xcda4('0x1b')]));this['evtHangup']=!![];}function getRoot(_0x44cb59){return parser[_0xcda4('0x1d')](_0x44cb59,{'object':!![]})[_0xcda4('0x1e')][_0xcda4('0x1f')];}function addVertex(_0x5f3f4e,_0xafb2a1,_0x2b9d46){_0xafb2a1[_0xcda4('0x20')]=_0x2b9d46;if(_0xafb2a1['hasOwnProperty'](_0xcda4('0x21'))){_0xafb2a1[_0xcda4('0x22')]=parseInt(_0xafb2a1[_0xcda4('0x21')],0xa);}_0x5f3f4e[_0xcda4('0x23')](_[_0xcda4('0x24')](_0xafb2a1,'mxCell'));}function initGraph(_0x1babd5,_0x471ac7){var _0x4fba16=new Graph();for(var _0x1e287e in _0x1babd5){if(_0x1babd5[_0xcda4('0x25')](_0x1e287e)){if(_[_0xcda4('0x26')](_0x1babd5[_0x1e287e])){for(var _0x56848e=0x0;_0x56848e<_0x1babd5[_0x1e287e]['length'];_0x56848e+=0x1){addVertex(_0x4fba16,_0x1babd5[_0x1e287e][_0x56848e],_0x1e287e);}}else{addVertex(_0x4fba16,_0x1babd5[_0x1e287e],_0x1e287e);}}}for(var _0x15d589=0x0;_0x15d589<_0x471ac7['length'];_0x15d589+=0x1){if(_0x471ac7[_0x15d589][_0xcda4('0x27')]&&_0x471ac7[_0x15d589]['target']){_0x4fba16[_0xcda4('0x28')](_0x471ac7[_0x15d589]['source'],_0x471ac7[_0x15d589][_0xcda4('0x29')],_0x471ac7[_0x15d589][_0xcda4('0x2a')]);}}return _0x4fba16;}function getSquareProject(_0x31b8d8,_0x632acd){rpc[_0xcda4('0x2b')](_0x31b8d8)['then'](function(_0x49b35c){_0x632acd(null,_0x49b35c);})['catch'](function(_0x2a9b4a){_0x632acd(null,_0x2a9b4a);});}function createSquareReport(_0x5b20f3,_0x35dec0){rpc['createSquareReport'](_0x5b20f3)['then'](function(_0x1e57c9){if(_0x35dec0){_0x35dec0(null,_0x1e57c9);}})[_0xcda4('0x2c')](function(_0x5f0298){if(_0x35dec0){_0x35dec0(null,_0x5f0298);}});}function setChannelVariables(_0x3cafe5){for(var _0x3a736d in _0x3cafe5){if(_0x3cafe5[_0xcda4('0x25')](_0x3a736d)){if(_0x3a736d[_0xcda4('0x2d')](_0xcda4('0x2e'))===0x0){_0x3cafe5[_0x3a736d[_0xcda4('0x2f')](0x4)]=_0x3cafe5[_0x3a736d];delete _0x3cafe5[_0x3a736d];}}}}function getLogFromObject(_0x1d3b4e){return util['inspect'](_0x1d3b4e,{'showHidden':![],'depth':null});}function agiHandler(_0x622654){var _0x10595d,_0x2e5e4f,_0x242f87,_0x4168f1,_0x274038;logger[_0xcda4('0x30')](_0xcda4('0x31'),JSON[_0xcda4('0x32')](_0x622654,null,0x2));logger[_0xcda4('0x10')](util['format'](_0xcda4('0x33'),_0x622654[_0xcda4('0x1c')],_0x622654[_0xcda4('0x18')],_0x622654[_0xcda4('0x19')],_0x622654['dnid'],_0x622654[_0xcda4('0x1b')]));_0x622654['on'](_0xcda4('0xb'),errorHandler);_0x622654['on'](_0xcda4('0x34'),closeHandler);_0x622654['on'](_0xcda4('0x35'),timeoutHandler);_0x622654[_0xcda4('0x36')]=![];_0x622654['on'](_0xcda4('0x37'),hangupHandler);var _0x5a7925=getSquareProject[_0xcda4('0x38')](null,_0x622654[_0xcda4('0x1c')]);if(_0x5a7925){if(_0x5a7925[_0xcda4('0x39')]){_0x10595d=getRoot(_0x5a7925[_0xcda4('0x39')]);if(_0x10595d&&_0x10595d[_0xcda4('0x3a')]){logger[_0xcda4('0x30')](_0xcda4('0x1f'),JSON[_0xcda4('0x32')](_0x10595d,null,0x2));_0x622654[_0xcda4('0x3b')]=moment()['format'](_0xcda4('0x3c'));_0x2e5e4f=initGraph(_[_0xcda4('0x24')](_0x10595d,'mxCell'),_0x10595d[_0xcda4('0x3d')]);_0x242f87=new Vertices(_0x622654,rpc,mailRpc);logger[_0xcda4('0x10')](util['format'](_0xcda4('0x3e'),_0x622654[_0xcda4('0x1c')],_0x622654[_0xcda4('0x18')],_0x622654[_0xcda4('0x19')],_0x622654[_0xcda4('0x1a')],_0x622654[_0xcda4('0x1b')]));_0x2e5e4f[_0xcda4('0x3f')](_0x10595d[_0xcda4('0x3a')]['id'],function(_0x3a91bb){try{_0x3a91bb=_0x242f87[_0xcda4('0x40')](_0x3a91bb);logger['debug']('vertex',JSON[_0xcda4('0x32')](_0x3a91bb,null,0x2));if(_0x3a91bb[_0xcda4('0x20')]===_0xcda4('0x41')){logger[_0xcda4('0x10')](_0xcda4('0x42'));_0x622654['context']=_0x3a91bb[_0xcda4('0x43')]||_0x622654[_0xcda4('0x43')];_0x622654[_0xcda4('0x44')]=_0x3a91bb['extension'];_0x622654[_0xcda4('0x45')]=_0x3a91bb[_0xcda4('0x45')]?_0x3a91bb['priority']-0x1:0x1;return null;}else if(_0x3a91bb&&_0x242f87[_0x3a91bb[_0xcda4('0x20')]]){_0x274038=_0x242f87[_0x3a91bb['agicommand']](_0x3a91bb);logger[_0xcda4('0x10')](_0xcda4('0x46'),JSON[_0xcda4('0x32')](_0x274038,null,0x2));if(_0x274038&&_0x274038[_0xcda4('0x47')]===AGI_CODE_SUCCESS&&_0x274038['result']!==AGI_RESULT_ERROR&&!_0x622654[_0xcda4('0x36')]){logger[_0xcda4('0x30')](_0xcda4('0x46'),getLogFromObject(_0x274038));return _[_0xcda4('0x48')](_0x274038[_0xcda4('0x49')])?null:_0x274038[_0xcda4('0x49')][_0xcda4('0x4a')]();}else{logger[_0xcda4('0xb')]('response',getLogFromObject(_0x274038));return null;}}else{logger[_0xcda4('0xb')]('agicommand\x20not\x20found');return null;}}catch(_0x37ff38){logger[_0xcda4('0xb')](_0x37ff38[_0xcda4('0xc')]);return null;}});if(_0x10595d[_0xcda4('0x4b')]){logger[_0xcda4('0x10')](util[_0xcda4('0x11')](_0xcda4('0x4c'),_0x622654[_0xcda4('0x1c')],_0x622654[_0xcda4('0x18')],_0x622654['callerid'],_0x622654[_0xcda4('0x1a')],_0x622654[_0xcda4('0x1b')]));_0x2e5e4f[_0xcda4('0x3f')](_0x10595d[_0xcda4('0x4b')]['id'],function(_0xfa92e6){try{_0xfa92e6=_0x242f87[_0xcda4('0x40')](_0xfa92e6);logger['debug'](_0xcda4('0x4d'),JSON[_0xcda4('0x32')](_0xfa92e6,null,0x2));if(_0xfa92e6&&_0x242f87[_0xfa92e6[_0xcda4('0x20')]]){_0x274038=_0x242f87[_0xfa92e6[_0xcda4('0x20')]](_0xfa92e6);if(_0x274038){logger[_0xcda4('0x30')](_0xcda4('0x46'),getLogFromObject(_0x274038));return _['isUndefined'](_0x274038[_0xcda4('0x49')])?null:_0x274038[_0xcda4('0x49')]['toString']();}else{logger['error'](_0xcda4('0x46'),getLogFromObject(_0x274038));return null;}}else{logger[_0xcda4('0xb')](_0xcda4('0x4e'));return null;}}catch(_0x50bf63){logger[_0xcda4('0xb')](_0x50bf63['stack']);return null;}});}logger['info'](util[_0xcda4('0x11')]('[END]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s',_0x622654[_0xcda4('0x1c')],_0x622654[_0xcda4('0x18')],_0x622654[_0xcda4('0x19')],_0x622654[_0xcda4('0x1a')],_0x622654['uniqueid']));logger[_0xcda4('0x10')](util[_0xcda4('0x11')]('[GOTO]\x20context:\x20%s\x20extension:\x20%s\x20priority:\x20%s',_0x622654['context'],_0x622654[_0xcda4('0x44')],parseInt(_0x622654[_0xcda4('0x45')],0xa)+0x1));_0x622654[_0xcda4('0x4f')](_0x622654[_0xcda4('0x43')],_0x622654[_0xcda4('0x44')],parseInt(_0x622654[_0xcda4('0x45')],0xa)+0x1);_0x622654[_0xcda4('0x34')]();}}else{logger[_0xcda4('0xb')](util[_0xcda4('0x11')](_0xcda4('0x50'),_0x622654[_0xcda4('0x1c')]));_0x622654[_0xcda4('0x4f')](_0x622654[_0xcda4('0x43')],_0x622654['extension'],parseInt(_0x622654[_0xcda4('0x45')],0xa)+0x1);_0x622654['close']();}}else{logger['error'](util['format'](_0xcda4('0x51'),_0x622654['arg_1']));_0x622654[_0xcda4('0x4f')](_0x622654[_0xcda4('0x43')],_0x622654['extension'],parseInt(_0x622654[_0xcda4('0x45')],0xa)+0x1);_0x622654['close']();}}function main(){var _0x2f9cd1;return utilLicense['getLicense']()[_0xcda4('0x52')](function(_0x45bf44){if(_0x45bf44){if(_0x45bf44[_0xcda4('0x53')]){if(_0x45bf44['callysquare']&&_0x45bf44[_0xcda4('0x54')]>0x0){logger[_0xcda4('0x10')](util[_0xcda4('0x11')]('[LICENSE]\x20CHANNELS:\x20%s',_0x45bf44[_0xcda4('0x54')]));_0x2f9cd1=_0x45bf44[_0xcda4('0x54')];}else{logger[_0xcda4('0x10')](_0xcda4('0x55'));}}else{logger[_0xcda4('0x10')](_0xcda4('0x56'));_0x2f9cd1=-0x1;}}})[_0xcda4('0x2c')](function(_0x2351a7){logger[_0xcda4('0xb')](_0xcda4('0x57'),_0x2351a7[_0xcda4('0xc')]);})['finally'](function(){var _0x1872d9=require(_0xcda4('0x58'))(config[_0xcda4('0x5')][_0xcda4('0xf')],config[_0xcda4('0x5')]['ip'],_0x2f9cd1);_0x1872d9['on'](_0xcda4('0xb'),errorHandler);_0x1872d9['on'](_0xcda4('0x59'),listeningHandler);_0x1872d9['on'](_0xcda4('0x5a'),connectionHandler);_0x1872d9['on'](_0xcda4('0x34'),closeHandler);});}main(); \ No newline at end of file diff --git a/server/services/agi/mailRpc/index.js b/server/services/agi/mailRpc/index.js index e27440a..b0932d5 100644 --- a/server/services/agi/mailRpc/index.js +++ b/server/services/agi/mailRpc/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd2f9=['result','catch','sendMailMessage','SendMail','jayson/promise','client','request','then','error','message'];(function(_0x4e676e,_0x2a7c6d){var _0x336a3c=function(_0x4767c4){while(--_0x4767c4){_0x4e676e['push'](_0x4e676e['shift']());}};_0x336a3c(++_0x2a7c6d);}(_0xd2f9,0x130));var _0x9d2f=function(_0x6c993a,_0x5ea3ab){_0x6c993a=_0x6c993a-0x0;var _0x27f547=_0xd2f9[_0x6c993a];return _0x27f547;};'use strict';var BPromise=require('bluebird');var jayson=require(_0x9d2f('0x0'));var client=jayson[_0x9d2f('0x1')]['http']({'port':0x232b});function request(_0x54830c,_0x4b129c){return new BPromise(function(_0x3b370e,_0x1a2d6c){return client[_0x9d2f('0x2')](_0x54830c,_0x4b129c)[_0x9d2f('0x3')](function(_0x593e55){if(_0x593e55[_0x9d2f('0x4')]){return _0x1a2d6c(_0x593e55[_0x9d2f('0x4')][_0x9d2f('0x5')]);}else{return _0x3b370e(_0x593e55[_0x9d2f('0x6')]);}})[_0x9d2f('0x7')](function(_0x4a6d92){return _0x1a2d6c(_0x4a6d92);});});}exports[_0x9d2f('0x8')]=function(_0x7d65a2,_0x16de75){return request(_0x9d2f('0x9'),{'account':_0x7d65a2,'message':_0x16de75});}; \ No newline at end of file +var _0x0dc0=['error','catch','sendMailMessage','SendMail','bluebird','client','http','then'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x0dc0,0xbc));var _0x00dc=function(_0x54330d,_0x1c37b0){_0x54330d=_0x54330d-0x0;var _0x212925=_0x0dc0[_0x54330d];return _0x212925;};'use strict';var BPromise=require(_0x00dc('0x0'));var jayson=require('jayson/promise');var client=jayson[_0x00dc('0x1')][_0x00dc('0x2')]({'port':0x232b});function request(_0x210f23,_0x4cc683){return new BPromise(function(_0x496e19,_0x2a0650){return client['request'](_0x210f23,_0x4cc683)[_0x00dc('0x3')](function(_0x3bf667){if(_0x3bf667[_0x00dc('0x4')]){return _0x2a0650(_0x3bf667[_0x00dc('0x4')]['message']);}else{return _0x496e19(_0x3bf667['result']);}})[_0x00dc('0x5')](function(_0x119b1c){return _0x2a0650(_0x119b1c);});});}exports[_0x00dc('0x6')]=function(_0x22e76e,_0x5cd639){return request(_0x00dc('0x7'),{'account':_0x22e76e,'message':_0x5cd639});}; \ No newline at end of file diff --git a/server/services/agi/reply.js b/server/services/agi/reply.js index 1b49142..419597f 100644 --- a/server/services/agi/reply.js +++ b/server/services/agi/reply.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x899d=['emit','headers','line','exports','util','stream','Transform','_localBuffer','_inBody','inherits','prototype','_transform','\x0d\x0a\x0d\x0a','toString','indexOf','substring','slice','length'];(function(_0x1894d9,_0x3e88c5){var _0x40c6c2=function(_0x9c759b){while(--_0x9c759b){_0x1894d9['push'](_0x1894d9['shift']());}};_0x40c6c2(++_0x3e88c5);}(_0x899d,0xca));var _0xd899=function(_0x53ccf2,_0x13cb67){_0x53ccf2=_0x53ccf2-0x0;var _0x5a2964=_0x899d[_0x53ccf2];return _0x5a2964;};'use strict';var util=require(_0xd899('0x0'));var Transform=require(_0xd899('0x1'))[_0xd899('0x2')];function AGIReply(_0x3d3412){Transform['call'](this,_0x3d3412);this[_0xd899('0x3')]='';this[_0xd899('0x4')]=![];}util[_0xd899('0x5')](AGIReply,Transform);AGIReply[_0xd899('0x6')][_0xd899('0x7')]=function(_0x588872,_0x5323af,_0x10f463){var _0x1864a3='\x0a',_0x412ece=['\x0a\x0a',_0xd899('0x8')],_0x129b13=-0x1,_0x2e4f7d=-0x1,_0x29a88c='',_0x52660f=0x0,_0x58f5a9='',_0x5658ac='';this[_0xd899('0x3')]+=_0x588872[_0xd899('0x9')]();_0x58f5a9=this[_0xd899('0x3')];if(!this[_0xd899('0x4')]){_0x52660f=0x0;while(_0x412ece[_0x52660f]){while((_0x2e4f7d=_0x58f5a9[_0xd899('0xa')](_0x412ece[_0x52660f]))!=-0x1){_0x29a88c=_0x412ece[_0x52660f];_0x5658ac=_0x58f5a9[_0xd899('0xb')](0x0,_0x2e4f7d);_0x58f5a9=_0x58f5a9['substring'](_0x2e4f7d+_0x29a88c['length']);var _0x1f6b39=_0x5658ac['split'](_0x1864a3),_0x15da6c=0x0,_0x27e457={},_0x188128='',_0x1d996d='',_0x3128c6=-0x1;while(_0x1f6b39[_0x15da6c]){_0x3128c6=_0x1f6b39[_0x15da6c][_0xd899('0xa')](':');if(_0x3128c6!=-0x1){_0x188128=_0x1f6b39[_0x15da6c][_0xd899('0xc')](0x0,_0x3128c6)['trim']();_0x1d996d=_0x1f6b39[_0x15da6c]['slice'](_0x3128c6+0x1)['trim']();if(_0x188128[_0xd899('0xd')]>0x0){_0x27e457[_0x188128]=_0x1d996d;}}else{}_0x15da6c++;}this[_0xd899('0xe')](_0xd899('0xf'),_0x27e457);this['_inBody']=!![];}_0x52660f++;}this['_localBuffer']=_0x58f5a9;}else{while((_0x129b13=_0x58f5a9[_0xd899('0xa')](_0x1864a3))!=-0x1){_0x5658ac=_0x58f5a9['substring'](0x0,_0x129b13);this[_0xd899('0xe')](_0xd899('0x10'),_0x5658ac);_0x58f5a9=_0x58f5a9[_0xd899('0xb')](_0x129b13+_0x1864a3[_0xd899('0xd')]);}this[_0xd899('0x3')]=_0x58f5a9;}_0x10f463();};module[_0xd899('0x11')]=AGIReply; \ No newline at end of file +var _0x2285=['_localBuffer','inherits','prototype','\x0d\x0a\x0d\x0a','toString','_inBody','indexOf','substring','split','slice','trim','length','emit','line','exports','stream','Transform','call'];(function(_0x5a66aa,_0xd2ddb){var _0x45f457=function(_0x45277e){while(--_0x45277e){_0x5a66aa['push'](_0x5a66aa['shift']());}};_0x45f457(++_0xd2ddb);}(_0x2285,0x177));var _0x5228=function(_0x5b2741,_0x1d7fb9){_0x5b2741=_0x5b2741-0x0;var _0xecfc9d=_0x2285[_0x5b2741];return _0xecfc9d;};'use strict';var util=require('util');var Transform=require(_0x5228('0x0'))[_0x5228('0x1')];function AGIReply(_0x725912){Transform[_0x5228('0x2')](this,_0x725912);this[_0x5228('0x3')]='';this['_inBody']=![];}util[_0x5228('0x4')](AGIReply,Transform);AGIReply[_0x5228('0x5')]['_transform']=function(_0x352ddd,_0x25b413,_0x322927){var _0x5ef1d3='\x0a',_0x18b2db=['\x0a\x0a',_0x5228('0x6')],_0x156977=-0x1,_0x192393=-0x1,_0x322b86='',_0x81c9c6=0x0,_0x7fe3f0='',_0x3341db='';this[_0x5228('0x3')]+=_0x352ddd[_0x5228('0x7')]();_0x7fe3f0=this['_localBuffer'];if(!this[_0x5228('0x8')]){_0x81c9c6=0x0;while(_0x18b2db[_0x81c9c6]){while((_0x192393=_0x7fe3f0[_0x5228('0x9')](_0x18b2db[_0x81c9c6]))!=-0x1){_0x322b86=_0x18b2db[_0x81c9c6];_0x3341db=_0x7fe3f0[_0x5228('0xa')](0x0,_0x192393);_0x7fe3f0=_0x7fe3f0[_0x5228('0xa')](_0x192393+_0x322b86['length']);var _0x6cf415=_0x3341db[_0x5228('0xb')](_0x5ef1d3),_0x313fcb=0x0,_0x8237ce={},_0x3e984a='',_0x5bbdfe='',_0x2a939d=-0x1;while(_0x6cf415[_0x313fcb]){_0x2a939d=_0x6cf415[_0x313fcb][_0x5228('0x9')](':');if(_0x2a939d!=-0x1){_0x3e984a=_0x6cf415[_0x313fcb][_0x5228('0xc')](0x0,_0x2a939d)[_0x5228('0xd')]();_0x5bbdfe=_0x6cf415[_0x313fcb][_0x5228('0xc')](_0x2a939d+0x1)['trim']();if(_0x3e984a[_0x5228('0xe')]>0x0){_0x8237ce[_0x3e984a]=_0x5bbdfe;}}else{}_0x313fcb++;}this[_0x5228('0xf')]('headers',_0x8237ce);this[_0x5228('0x8')]=!![];}_0x81c9c6++;}this[_0x5228('0x3')]=_0x7fe3f0;}else{while((_0x156977=_0x7fe3f0['indexOf'](_0x5ef1d3))!=-0x1){_0x3341db=_0x7fe3f0[_0x5228('0xa')](0x0,_0x156977);this[_0x5228('0xf')](_0x5228('0x10'),_0x3341db);_0x7fe3f0=_0x7fe3f0[_0x5228('0xa')](_0x156977+_0x5ef1d3['length']);}this[_0x5228('0x3')]=_0x7fe3f0;}_0x322927();};module[_0x5228('0x11')]=AGIReply; \ No newline at end of file diff --git a/server/services/agi/rpc/index.js b/server/services/agi/rpc/index.js index efe9632..2cca91e 100644 --- a/server/services/agi/rpc/index.js +++ b/server/services/agi/rpc/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x88eb=['getUserById','ShowUser','getTrunkById','ShowTrunk','ShowSound','save_name','ShowInterval','Intervals','getSmsAccountById','ShowSmsAccount','CreateSmsMessage','createSquareReport','merge','arg_1','arg_2','format','YYYY-MM-DD\x20HH:mm:ss','createSquareRecording','CreateSquareMessage','phone','ListId','CreateCmContact','getPauseById','ShowPause','agentLogin','PauseUser','agentUnpause','UnpauseUser','LogoutUser','moment','lodash','util','client','http','request','message','result','catch','getSquareProject','ShowSquareProject','ShowMailAccount','MailServerOut','Smtp','name','getSquareProjectById','getVoiceQueueById','getVariableById','ShowVariable','getSquareOdbcById','ShowSquareOdbc','dsn'];(function(_0x57f9b5,_0x4d054d){var _0x40c5ca=function(_0x24b4cc){while(--_0x24b4cc){_0x57f9b5['push'](_0x57f9b5['shift']());}};_0x40c5ca(++_0x4d054d);}(_0x88eb,0x1b5));var _0xb88e=function(_0x155be2,_0xfeade0){_0x155be2=_0x155be2-0x0;var _0x3db158=_0x88eb[_0x155be2];return _0x3db158;};'use strict';var BPromise=require('bluebird');var moment=require(_0xb88e('0x0'));var _=require(_0xb88e('0x1'));var util=require(_0xb88e('0x2'));var jayson=require('jayson/promise');var client=jayson[_0xb88e('0x3')][_0xb88e('0x4')]({'port':0x2329});function request(_0x19cc4f,_0x2d7b49){return new BPromise(function(_0x229130,_0xfa368b){return client[_0xb88e('0x5')](_0x19cc4f,_0x2d7b49)['then'](function(_0x1e8a28){if(_0x1e8a28['error']){return _0xfa368b(_0x1e8a28['error'][_0xb88e('0x6')]);}else{return _0x229130(_0x1e8a28[_0xb88e('0x7')]);}})[_0xb88e('0x8')](function(_0x1e105c){return _0xfa368b(_0x1e105c);});});}exports[_0xb88e('0x9')]=function(_0x291d32){return request(_0xb88e('0xa'),{'options':{'raw':![],'where':{'name':_0x291d32},'attributes':['production']}});};exports['getMailAccountById']=function(_0x4b326c){return request(_0xb88e('0xb'),{'options':{'raw':![],'where':{'id':_0x4b326c},'include':[{'model':_0xb88e('0xc'),'as':_0xb88e('0xd')}],'attributes':['id',_0xb88e('0xe'),'email']}});};exports[_0xb88e('0xf')]=function(_0x3d71ea){return request('ShowSquareProject',{'options':{'where':{'id':_0x3d71ea},'attributes':[_0xb88e('0xe')]}});};exports[_0xb88e('0x10')]=function(_0x32f86c){return request('ShowVoiceQueue',{'options':{'where':{'id':_0x32f86c},'attributes':[_0xb88e('0xe')]}});};exports[_0xb88e('0x11')]=function(_0x165469){return request(_0xb88e('0x12'),{'options':{'where':{'id':_0x165469},'attributes':[_0xb88e('0xe')]}});};exports[_0xb88e('0x13')]=function(_0x513918){return request(_0xb88e('0x14'),{'options':{'where':{'id':_0x513918},'attributes':[_0xb88e('0x15')]}});};exports[_0xb88e('0x16')]=function(_0x33bde9){return request(_0xb88e('0x17'),{'options':{'where':{'id':_0x33bde9},'attributes':[_0xb88e('0xe')]}});};exports[_0xb88e('0x18')]=function(_0x48b6de){return request(_0xb88e('0x19'),{'options':{'where':{'id':_0x48b6de},'attributes':[_0xb88e('0xe')]}});};exports['getSoundById']=function(_0x4d5cb4){return request(_0xb88e('0x1a'),{'options':{'where':{'id':_0x4d5cb4},'attributes':[_0xb88e('0x1b')]}});};exports['getIntervalById']=function(_0x3b66f7){return request(_0xb88e('0x1c'),{'options':{'raw':![],'where':{'id':_0x3b66f7},'include':[{'model':'Interval','as':_0xb88e('0x1d')}]}});};exports[_0xb88e('0x1e')]=function(_0x59575d){return request(_0xb88e('0x1f'),{'options':{'where':{'id':_0x59575d},'attributes':['id',_0xb88e('0xe')]}});};exports['createSmsMessage']=function(_0x573b60){return request(_0xb88e('0x20'),{'body':_0x573b60});};exports['createSquareDetailsReport']=function(_0x1bb14a){return request('CreateSquareDetailsReport',{'body':_0x1bb14a});};exports[_0xb88e('0x21')]=function(_0x34ba31){return request('CreateSquareReport',{'body':_[_0xb88e('0x22')](_0x34ba31,{'project_name':_0x34ba31[_0xb88e('0x23')],'prev_project_name':_0x34ba31[_0xb88e('0x24')]||'','is_subproject':_0x34ba31[_0xb88e('0x24')]?!![]:![],'leaveAt':moment()[_0xb88e('0x25')](_0xb88e('0x26'))})});};exports[_0xb88e('0x27')]=function(_0x1fe5e4){return request('CreateSquareRecording',{'body':_0x1fe5e4});};exports['createSquareMessage']=function(_0x56b4ec){return request(_0xb88e('0x28'),{'body':_0x56b4ec});};exports['createCmContact']=function(_0x23f171){return request('ShowCmHopper',{'options':{'raw':![],'where':{'phone':_0x23f171[_0xb88e('0x29')],'ListId':_0x23f171[_0xb88e('0x2a')]}}})['then'](function(_0x172f9c){if(_0x172f9c){return _0x172f9c;}return request(_0xb88e('0x2b'),{'body':_0x23f171});});};exports[_0xb88e('0x2c')]=function(_0x3ff81d){return request(_0xb88e('0x2d'),{'options':{'where':{'id':_0x3ff81d},'attributes':[_0xb88e('0xe')]}});};exports[_0xb88e('0x2e')]=function(_0x24ee39,_0xe5a7a3){return request('LoginUser',{'body':{'interface':_0xe5a7a3},'options':{'where':_0x24ee39}});};exports['agentPause']=function(_0x54aa5f,_0x539c0b,_0x51940e){return request(_0xb88e('0x2f'),{'body':{'type':_0x539c0b,'uniqueid':_0x51940e},'options':{'where':_0x54aa5f}});};exports[_0xb88e('0x30')]=function(_0x3df9f8){return request(_0xb88e('0x31'),{'body':{},'options':{'where':_0x3df9f8}});};exports['agentLogout']=function(_0x25cf40){return request(_0xb88e('0x32'),{'body':{},'options':{'where':_0x25cf40}});}; \ No newline at end of file +var _0x01d3=['getMailAccountById','ShowMailAccount','MailServerOut','name','email','getVoiceQueueById','ShowVoiceQueue','getSquareOdbcById','ShowSquareOdbc','dsn','getUserById','ShowUser','getTrunkById','ShowTrunk','save_name','getIntervalById','Interval','Intervals','getSmsAccountById','ShowSmsAccount','createSmsMessage','createSquareDetailsReport','CreateSquareDetailsReport','createSquareReport','CreateSquareReport','merge','arg_1','arg_2','format','createSquareRecording','CreateSquareRecording','createSquareMessage','CreateSquareMessage','createCmContact','phone','CreateCmContact','getPauseById','agentLogin','LoginUser','agentPause','PauseUser','agentLogout','LogoutUser','moment','lodash','jayson/promise','client','then','error','result','catch','getSquareProject','ShowSquareProject','production'];(function(_0xb36ccf,_0x24c93b){var _0x37b01e=function(_0x5d188a){while(--_0x5d188a){_0xb36ccf['push'](_0xb36ccf['shift']());}};_0x37b01e(++_0x24c93b);}(_0x01d3,0x1db));var _0x301d=function(_0x3b5f1a,_0x306a52){_0x3b5f1a=_0x3b5f1a-0x0;var _0x1e6f58=_0x01d3[_0x3b5f1a];return _0x1e6f58;};'use strict';var BPromise=require('bluebird');var moment=require(_0x301d('0x0'));var _=require(_0x301d('0x1'));var util=require('util');var jayson=require(_0x301d('0x2'));var client=jayson[_0x301d('0x3')]['http']({'port':0x2329});function request(_0x270909,_0x32ee37){return new BPromise(function(_0x4af68c,_0x118a10){return client['request'](_0x270909,_0x32ee37)[_0x301d('0x4')](function(_0x23520b){if(_0x23520b[_0x301d('0x5')]){return _0x118a10(_0x23520b[_0x301d('0x5')]['message']);}else{return _0x4af68c(_0x23520b[_0x301d('0x6')]);}})[_0x301d('0x7')](function(_0x4df368){return _0x118a10(_0x4df368);});});}exports[_0x301d('0x8')]=function(_0xedde37){return request(_0x301d('0x9'),{'options':{'raw':![],'where':{'name':_0xedde37},'attributes':[_0x301d('0xa')]}});};exports[_0x301d('0xb')]=function(_0x422ddc){return request(_0x301d('0xc'),{'options':{'raw':![],'where':{'id':_0x422ddc},'include':[{'model':_0x301d('0xd'),'as':'Smtp'}],'attributes':['id',_0x301d('0xe'),_0x301d('0xf')]}});};exports['getSquareProjectById']=function(_0x5e0577){return request(_0x301d('0x9'),{'options':{'where':{'id':_0x5e0577},'attributes':['name']}});};exports[_0x301d('0x10')]=function(_0x1fdcc9){return request(_0x301d('0x11'),{'options':{'where':{'id':_0x1fdcc9},'attributes':['name']}});};exports['getVariableById']=function(_0x37e2ad){return request('ShowVariable',{'options':{'where':{'id':_0x37e2ad},'attributes':['name']}});};exports[_0x301d('0x12')]=function(_0x502501){return request(_0x301d('0x13'),{'options':{'where':{'id':_0x502501},'attributes':[_0x301d('0x14')]}});};exports[_0x301d('0x15')]=function(_0x2d5a99){return request(_0x301d('0x16'),{'options':{'where':{'id':_0x2d5a99},'attributes':['name']}});};exports[_0x301d('0x17')]=function(_0x430343){return request(_0x301d('0x18'),{'options':{'where':{'id':_0x430343},'attributes':[_0x301d('0xe')]}});};exports['getSoundById']=function(_0x2c99f4){return request('ShowSound',{'options':{'where':{'id':_0x2c99f4},'attributes':[_0x301d('0x19')]}});};exports[_0x301d('0x1a')]=function(_0x4f14e9){return request('ShowInterval',{'options':{'raw':![],'where':{'id':_0x4f14e9},'include':[{'model':_0x301d('0x1b'),'as':_0x301d('0x1c')}]}});};exports[_0x301d('0x1d')]=function(_0x5904f5){return request(_0x301d('0x1e'),{'options':{'where':{'id':_0x5904f5},'attributes':['id','name']}});};exports[_0x301d('0x1f')]=function(_0x3bd3ed){return request('CreateSmsMessage',{'body':_0x3bd3ed});};exports[_0x301d('0x20')]=function(_0x2785f7){return request(_0x301d('0x21'),{'body':_0x2785f7});};exports[_0x301d('0x22')]=function(_0x58b869){return request(_0x301d('0x23'),{'body':_[_0x301d('0x24')](_0x58b869,{'project_name':_0x58b869[_0x301d('0x25')],'prev_project_name':_0x58b869[_0x301d('0x26')]||'','is_subproject':_0x58b869[_0x301d('0x26')]?!![]:![],'leaveAt':moment()[_0x301d('0x27')]('YYYY-MM-DD\x20HH:mm:ss')})});};exports[_0x301d('0x28')]=function(_0x97419f){return request(_0x301d('0x29'),{'body':_0x97419f});};exports[_0x301d('0x2a')]=function(_0x72020b){return request(_0x301d('0x2b'),{'body':_0x72020b});};exports[_0x301d('0x2c')]=function(_0x4742c0){return request('ShowCmHopper',{'options':{'raw':![],'where':{'phone':_0x4742c0[_0x301d('0x2d')],'ListId':_0x4742c0['ListId']}}})[_0x301d('0x4')](function(_0x2e6538){if(_0x2e6538){return _0x2e6538;}return request(_0x301d('0x2e'),{'body':_0x4742c0});});};exports[_0x301d('0x2f')]=function(_0x1e5be4){return request('ShowPause',{'options':{'where':{'id':_0x1e5be4},'attributes':[_0x301d('0xe')]}});};exports[_0x301d('0x30')]=function(_0x3a382d,_0x35fb3f){return request(_0x301d('0x31'),{'body':{'interface':_0x35fb3f},'options':{'where':_0x3a382d}});};exports[_0x301d('0x32')]=function(_0x2b1842,_0x2b999c,_0x57f89a){return request(_0x301d('0x33'),{'body':{'type':_0x2b999c,'uniqueid':_0x57f89a},'options':{'where':_0x2b1842}});};exports['agentUnpause']=function(_0x181a90){return request('UnpauseUser',{'body':{},'options':{'where':_0x181a90}});};exports[_0x301d('0x34')]=function(_0x21127e){return request(_0x301d('0x35'),{'body':{},'options':{'where':_0x21127e}});}; \ No newline at end of file diff --git a/server/services/agi/scripts/aws/index.js b/server/services/agi/scripts/aws/index.js index 7d85afa..6c49ad5 100644 --- a/server/services/agi/scripts/aws/index.js +++ b/server/services/agi/scripts/aws/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xdbb1=['./polly'];(function(_0x38fb8b,_0x70dd0a){var _0x1ec681=function(_0x58f130){while(--_0x58f130){_0x38fb8b['push'](_0x38fb8b['shift']());}};_0x1ec681(++_0x70dd0a);}(_0xdbb1,0x105));var _0x1dbb=function(_0xdc37a1,_0x53ebb9){_0xdc37a1=_0xdc37a1-0x0;var _0x99b4fe=_0xdbb1[_0xdc37a1];return _0x99b4fe;};var polly=require(_0x1dbb('0x0'));var lex=require('./lex');module['exports']={'polly':polly,'lex':lex}; \ No newline at end of file +var _0x254a=['./polly','./lex','exports'];(function(_0x9772bb,_0x21b339){var _0x36c7f6=function(_0x2ad40b){while(--_0x2ad40b){_0x9772bb['push'](_0x9772bb['shift']());}};_0x36c7f6(++_0x21b339);}(_0x254a,0x138));var _0xa254=function(_0x12fc6d,_0x1b2dc1){_0x12fc6d=_0x12fc6d-0x0;var _0x2929f0=_0x254a[_0x12fc6d];return _0x2929f0;};var polly=require(_0xa254('0x0'));var lex=require(_0xa254('0x1'));module[_0xa254('0x2')]={'polly':polly,'lex':lex}; \ No newline at end of file diff --git a/server/services/agi/scripts/aws/lex/index.js b/server/services/agi/scripts/aws/lex/index.js index c963978..c7682a8 100644 --- a/server/services/agi/scripts/aws/lex/index.js +++ b/server/services/agi/scripts/aws/lex/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe706=['exports','./lib/api'];(function(_0x3c77f9,_0x2abb07){var _0x41790a=function(_0x363994){while(--_0x363994){_0x3c77f9['push'](_0x3c77f9['shift']());}};_0x41790a(++_0x2abb07);}(_0xe706,0xa3));var _0x6e70=function(_0xa9c870,_0x111b20){_0xa9c870=_0xa9c870-0x0;var _0x2d13a3=_0xe706[_0xa9c870];return _0x2d13a3;};'use strict';var lex=require(_0x6e70('0x0'));module[_0x6e70('0x1')]=function(_0x311951,_0x5e8446,_0x2cae77,_0x315629,_0x2ca810,_0x7dfbc3){return lex(_0x311951,_0x5e8446,_0x2cae77,_0x315629,_0x2ca810,_0x7dfbc3);}; \ No newline at end of file +var _0xe706=['exports','./lib/api'];(function(_0x14c4bb,_0xffe187){var _0xfd5913=function(_0xb43f0a){while(--_0xb43f0a){_0x14c4bb['push'](_0x14c4bb['shift']());}};_0xfd5913(++_0xffe187);}(_0xe706,0xa3));var _0x6e70=function(_0x43d16c,_0x2b5447){_0x43d16c=_0x43d16c-0x0;var _0x208cce=_0xe706[_0x43d16c];return _0x208cce;};'use strict';var lex=require(_0x6e70('0x0'));module[_0x6e70('0x1')]=function(_0x311951,_0x5e8446,_0x2cae77,_0x315629,_0x2ca810,_0x7dfbc3){return lex(_0x311951,_0x5e8446,_0x2cae77,_0x315629,_0x2ca810,_0x7dfbc3);}; \ No newline at end of file diff --git a/server/services/agi/scripts/aws/lex/lib/api.js b/server/services/agi/scripts/aws/lex/lib/api.js index a67c9cc..2b2f451 100644 --- a/server/services/agi/scripts/aws/lex/lib/api.js +++ b/server/services/agi/scripts/aws/lex/lib/api.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['LexRuntime','bluebird','aws-sdk','slots','hasOwnProperty'];(function(_0x271315,_0x4c7202){var _0x317b1c=function(_0xda5d7d){while(--_0xda5d7d){_0x271315['push'](_0x271315['shift']());}};_0x317b1c(++_0x4c7202);}(_0xa9e0,0x123));var _0x0a9e=function(_0xf0bcac,_0x531755){_0xf0bcac=_0xf0bcac-0x0;var _0x4e4c65=_0xa9e0[_0xf0bcac];return _0x4e4c65;};'use strict';var BPromise=require(_0x0a9e('0x0'));var AWS=require(_0x0a9e('0x1'));function lexResult(_0x29929c,_0x5dd881){return new BPromise(function(_0x550fbc,_0x18d5c9){_0x29929c['postText'](_0x5dd881,function(_0x333808,_0x432180){if(_0x333808){_0x18d5c9(_0x333808);}if(_0x432180[_0x0a9e('0x2')]){for(const _0x991246 in _0x432180[_0x0a9e('0x2')]){if(_0x432180['slots'][_0x0a9e('0x3')](_0x991246)){var _0x441e3a=_0x432180[_0x0a9e('0x2')][_0x991246];_0x432180['slot_'+_0x991246]=_0x441e3a;}}}_0x550fbc(_0x432180);});});}module['exports']=function(_0xe42b77,_0x56465b,_0x52cace,_0x39753a,_0xf81284,_0x307b3e){var _0x3ab53f=new AWS[(_0x0a9e('0x4'))]({'accessKeyId':_0x56465b,'secretAccessKey':_0x52cace,'region':_0x39753a});var _0xbd1168={'botAlias':'$LATEST','botName':_0x307b3e,'inputText':_0xf81284,'userId':_0xe42b77};return lexResult(_0x3ab53f,_0xbd1168);}; \ No newline at end of file +var _0xa9e0=['LexRuntime','bluebird','aws-sdk','slots','hasOwnProperty'];(function(_0x498769,_0x33acd0){var _0x12ccf0=function(_0xdf244e){while(--_0xdf244e){_0x498769['push'](_0x498769['shift']());}};_0x12ccf0(++_0x33acd0);}(_0xa9e0,0x123));var _0x0a9e=function(_0x2f3848,_0x48564d){_0x2f3848=_0x2f3848-0x0;var _0x102668=_0xa9e0[_0x2f3848];return _0x102668;};'use strict';var BPromise=require(_0x0a9e('0x0'));var AWS=require(_0x0a9e('0x1'));function lexResult(_0x29929c,_0x5dd881){return new BPromise(function(_0x550fbc,_0x18d5c9){_0x29929c['postText'](_0x5dd881,function(_0x333808,_0x432180){if(_0x333808){_0x18d5c9(_0x333808);}if(_0x432180[_0x0a9e('0x2')]){for(const _0x991246 in _0x432180[_0x0a9e('0x2')]){if(_0x432180['slots'][_0x0a9e('0x3')](_0x991246)){var _0x441e3a=_0x432180[_0x0a9e('0x2')][_0x991246];_0x432180['slot_'+_0x991246]=_0x441e3a;}}}_0x550fbc(_0x432180);});});}module['exports']=function(_0xe42b77,_0x56465b,_0x52cace,_0x39753a,_0xf81284,_0x307b3e){var _0x3ab53f=new AWS[(_0x0a9e('0x4'))]({'accessKeyId':_0x56465b,'secretAccessKey':_0x52cace,'region':_0x39753a});var _0xbd1168={'botAlias':'$LATEST','botName':_0x307b3e,'inputText':_0xf81284,'userId':_0xe42b77};return lexResult(_0x3ab53f,_0xbd1168);}; \ No newline at end of file diff --git a/server/services/agi/scripts/aws/polly/index.js b/server/services/agi/scripts/aws/polly/index.js index 1f34357..e5e45a3 100644 --- a/server/services/agi/scripts/aws/polly/index.js +++ b/server/services/agi/scripts/aws/polly/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8aaf=['./lib/api','exports'];(function(_0x37aa80,_0x13c9c7){var _0x53a97e=function(_0x270a7f){while(--_0x270a7f){_0x37aa80['push'](_0x37aa80['shift']());}};_0x53a97e(++_0x13c9c7);}(_0x8aaf,0x96));var _0xf8aa=function(_0x19f067,_0x5e686a){_0x19f067=_0x19f067-0x0;var _0x117212=_0x8aaf[_0x19f067];return _0x117212;};'use strict';var polly=require(_0xf8aa('0x0'));module[_0xf8aa('0x1')]=function(_0x2248fe,_0x3de67f,_0x4103e1,_0x18ba25,_0x4dfa38,_0x56572d,_0xd125a3){return polly(_0x2248fe,_0x3de67f,_0x4103e1,_0x18ba25,_0x4dfa38,_0x56572d,_0xd125a3);}; \ No newline at end of file +var _0x82df=['./lib/api'];(function(_0x82b3b8,_0xdcdb77){var _0x2825e7=function(_0x38f61d){while(--_0x38f61d){_0x82b3b8['push'](_0x82b3b8['shift']());}};_0x2825e7(++_0xdcdb77);}(_0x82df,0x7a));var _0xf82d=function(_0x4b3afb,_0x3647a8){_0x4b3afb=_0x4b3afb-0x0;var _0xbd2892=_0x82df[_0x4b3afb];return _0xbd2892;};'use strict';var polly=require(_0xf82d('0x0'));module['exports']=function(_0xe83912,_0x2f9c11,_0x3a4364,_0x389ab4,_0x458db0,_0x328404,_0x265566){return polly(_0xe83912,_0x2f9c11,_0x3a4364,_0x389ab4,_0x458db0,_0x328404,_0x265566);}; \ No newline at end of file diff --git a/server/services/agi/scripts/aws/polly/lib/api.js b/server/services/agi/scripts/aws/polly/lib/api.js index fba71d4..7a3f355 100644 --- a/server/services/agi/scripts/aws/polly/lib/api.js +++ b/server/services/agi/scripts/aws/polly/lib/api.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x910e=['mp3','path','bluebird','aws-sdk','synthesizeSpeech','AudioStream','writeFile','Invalid\x20data\x20response\x20from\x20aws\x20Polly!','No\x20data\x20response\x20from\x20aws\x20Polly!','exports','Polly','text'];(function(_0x58965a,_0x2e71db){var _0x254efc=function(_0xf14fb4){while(--_0xf14fb4){_0x58965a['push'](_0x58965a['shift']());}};_0x254efc(++_0x2e71db);}(_0x910e,0xe5));var _0xe910=function(_0xa6ad6,_0x3ffa43){_0xa6ad6=_0xa6ad6-0x0;var _0x2f54ac=_0x910e[_0xa6ad6];return _0x2f54ac;};'use strict';var fs=require('fs');var path=require(_0xe910('0x0'));var BPromise=require(_0xe910('0x1'));var rs=require('randomstring');var AWS=require(_0xe910('0x2'));function pollyResult(_0x474a2b,_0x4eab4d,_0xa9a11f){return new BPromise(function(_0x3340ca,_0x19ab1c){_0x474a2b[_0xe910('0x3')](_0x4eab4d,function(_0x577556,_0x5b0ddb){if(_0x577556){_0x19ab1c(_0x577556);}else if(_0x5b0ddb){if(_0x5b0ddb[_0xe910('0x4')]instanceof Buffer){fs[_0xe910('0x5')](_0xa9a11f,_0x5b0ddb[_0xe910('0x4')],function(_0x636027){if(_0x636027){_0x19ab1c(_0x636027);}else{_0x3340ca();}});}else{_0x19ab1c(new Error(_0xe910('0x6')));}}else{_0x19ab1c(new Error(_0xe910('0x7')));}});});}module[_0xe910('0x8')]=function(_0x4cad3c,_0x2f13ef,_0x44d68d,_0x42e077,_0xd613de,_0x4e6f71,_0x583623){var _0x5119f3=new AWS[(_0xe910('0x9'))]({'accessKeyId':_0x4cad3c,'secretAccessKey':_0x2f13ef,'region':_0x44d68d});var _0x37615b={'Text':_0xd613de,'TextType':_0x4e6f71||_0xe910('0xa'),'OutputFormat':_0xe910('0xb'),'VoiceId':_0x42e077};return pollyResult(_0x5119f3,_0x37615b,_0x583623);}; \ No newline at end of file +var _0x3c25=['text','mp3','path','bluebird','aws-sdk','synthesizeSpeech','writeFile','Invalid\x20data\x20response\x20from\x20aws\x20Polly!','exports','Polly'];(function(_0x53ccf2,_0x13cb67){var _0x5a2964=function(_0x3b0514){while(--_0x3b0514){_0x53ccf2['push'](_0x53ccf2['shift']());}};_0x5a2964(++_0x13cb67);}(_0x3c25,0x1ec));var _0x53c2=function(_0x2795cf,_0x4d299c){_0x2795cf=_0x2795cf-0x0;var _0x48ce19=_0x3c25[_0x2795cf];return _0x48ce19;};'use strict';var fs=require('fs');var path=require(_0x53c2('0x0'));var BPromise=require(_0x53c2('0x1'));var rs=require('randomstring');var AWS=require(_0x53c2('0x2'));function pollyResult(_0x3fb67b,_0x404da7,_0x14e478){return new BPromise(function(_0x596ca7,_0x8faf10){_0x3fb67b[_0x53c2('0x3')](_0x404da7,function(_0x488297,_0xf2a78a){if(_0x488297){_0x8faf10(_0x488297);}else if(_0xf2a78a){if(_0xf2a78a['AudioStream']instanceof Buffer){fs[_0x53c2('0x4')](_0x14e478,_0xf2a78a['AudioStream'],function(_0x459868){if(_0x459868){_0x8faf10(_0x459868);}else{_0x596ca7();}});}else{_0x8faf10(new Error(_0x53c2('0x5')));}}else{_0x8faf10(new Error('No\x20data\x20response\x20from\x20aws\x20Polly!'));}});});}module[_0x53c2('0x6')]=function(_0xb0865b,_0x52a208,_0x4be9cf,_0x501eca,_0x356fda,_0x10936d,_0x58ff42){var _0x5a7b4d=new AWS[(_0x53c2('0x7'))]({'accessKeyId':_0xb0865b,'secretAccessKey':_0x52a208,'region':_0x4be9cf});var _0x17eb81={'Text':_0x356fda,'TextType':_0x10936d||_0x53c2('0x8'),'OutputFormat':_0x53c2('0x9'),'VoiceId':_0x501eca};return pollyResult(_0x5a7b4d,_0x17eb81,_0x58ff42);}; \ No newline at end of file diff --git a/server/services/agi/scripts/google/asr/index.js b/server/services/agi/scripts/google/asr/index.js index 2488c43..87cf9cc 100644 --- a/server/services/agi/scripts/google/asr/index.js +++ b/server/services/agi/scripts/google/asr/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4881=['./lib/api'];(function(_0x6131cd,_0x4c26a1){var _0x47e916=function(_0x1f2bce){while(--_0x1f2bce){_0x6131cd['push'](_0x6131cd['shift']());}};_0x47e916(++_0x4c26a1);}(_0x4881,0x1a9));var _0x1488=function(_0x3a92db,_0x5192bf){_0x3a92db=_0x3a92db-0x0;var _0x339c8f=_0x4881[_0x3a92db];return _0x339c8f;};'use strict';var asr=require(_0x1488('0x0'));module['exports']=function(_0x141168,_0x5cdc99,_0x5ee849,_0x40faa8){return asr(_0x141168,_0x5cdc99,_0x5ee849);}; \ No newline at end of file +var _0x9e6d=['./lib/api','exports'];(function(_0x37ef22,_0x348c92){var _0x49eeb3=function(_0x1ef837){while(--_0x1ef837){_0x37ef22['push'](_0x37ef22['shift']());}};_0x49eeb3(++_0x348c92);}(_0x9e6d,0x1be));var _0xd9e6=function(_0xbad627,_0x51660d){_0xbad627=_0xbad627-0x0;var _0x34449a=_0x9e6d[_0xbad627];return _0x34449a;};'use strict';var asr=require(_0xd9e6('0x0'));module[_0xd9e6('0x1')]=function(_0x109301,_0x30d3fd,_0x4560f4,_0x40e485){return asr(_0x109301,_0x30d3fd,_0x4560f4);}; \ No newline at end of file diff --git a/server/services/agi/scripts/google/asr/lib/api.js b/server/services/agi/scripts/google/asr/lib/api.js index da38e90..3d41f8c 100644 --- a/server/services/agi/scripts/google/asr/lib/api.js +++ b/server/services/agi/scripts/google/asr/lib/api.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6282=['bluebird','https://speech.googleapis.com','exports','string','length','filepath\x20should\x20be\x20a\x20string','key\x20should\x20be\x20a\x20string','undefined','lang\x20should\x20be\x20a\x20string','readFileSync','toString','base64','POST','/v1/speech:recognize?key=','LINEAR16','8000','url'];(function(_0x3e9314,_0x4bf00e){var _0x5e464b=function(_0x2a760d){while(--_0x2a760d){_0x3e9314['push'](_0x3e9314['shift']());}};_0x5e464b(++_0x4bf00e);}(_0x6282,0x76));var _0x2628=function(_0x56698c,_0x1f490d){_0x56698c=_0x56698c-0x0;var _0x458f04=_0x6282[_0x56698c];return _0x458f04;};'use strict';var url=require(_0x2628('0x0'));var BPromise=require(_0x2628('0x1'));var fs=require('fs');var host=_0x2628('0x2');module[_0x2628('0x3')]=function(_0x58f873,_0x50e40f,_0x126d9a){return new BPromise(function(_0xc5c0c7,_0x5eb31b){var _0x2d420f;if(typeof _0x58f873!==_0x2628('0x4')||_0x58f873[_0x2628('0x5')]===0x0){return _0x5eb31b(_0x2628('0x6'));}if(typeof _0x50e40f!==_0x2628('0x4')||_0x50e40f['length']===0x0){return _0x5eb31b(_0x2628('0x7'));}if(typeof _0x126d9a!==_0x2628('0x8')&&(typeof _0x126d9a!==_0x2628('0x4')||_0x126d9a[_0x2628('0x5')]===0x0)){return _0x5eb31b(_0x2628('0x9'));}try{_0x2d420f=fs[_0x2628('0xa')](_0x58f873)[_0x2628('0xb')](_0x2628('0xc'));}catch(_0x3f9015){return _0x5eb31b(_0x3f9015);}return _0xc5c0c7({'method':_0x2628('0xd'),'uri':host+_0x2628('0xe')+_0x50e40f,'body':{'config':{'encoding':_0x2628('0xf'),'sampleRateHertz':_0x2628('0x10'),'languageCode':_0x126d9a},'audio':{'content':_0x2d420f}},'json':!![]});});}; \ No newline at end of file +var _0x78f0=['base64','POST','LINEAR16','8000','url','bluebird','https://speech.googleapis.com','exports','string','length','filepath\x20should\x20be\x20a\x20string','key\x20should\x20be\x20a\x20string','lang\x20should\x20be\x20a\x20string','readFileSync','toString'];(function(_0x565c49,_0x54acd0){var _0x20ca34=function(_0x42f7e1){while(--_0x42f7e1){_0x565c49['push'](_0x565c49['shift']());}};_0x20ca34(++_0x54acd0);}(_0x78f0,0x15d));var _0x078f=function(_0xaf130b,_0x3fe780){_0xaf130b=_0xaf130b-0x0;var _0x3f1983=_0x78f0[_0xaf130b];return _0x3f1983;};'use strict';var url=require(_0x078f('0x0'));var BPromise=require(_0x078f('0x1'));var fs=require('fs');var host=_0x078f('0x2');module[_0x078f('0x3')]=function(_0x11b4c1,_0x2bde34,_0x34a715){return new BPromise(function(_0x316f1c,_0x5785fd){var _0x2f3d53;if(typeof _0x11b4c1!==_0x078f('0x4')||_0x11b4c1[_0x078f('0x5')]===0x0){return _0x5785fd(_0x078f('0x6'));}if(typeof _0x2bde34!=='string'||_0x2bde34[_0x078f('0x5')]===0x0){return _0x5785fd(_0x078f('0x7'));}if(typeof _0x34a715!=='undefined'&&(typeof _0x34a715!==_0x078f('0x4')||_0x34a715[_0x078f('0x5')]===0x0)){return _0x5785fd(_0x078f('0x8'));}try{_0x2f3d53=fs[_0x078f('0x9')](_0x11b4c1)[_0x078f('0xa')](_0x078f('0xb'));}catch(_0x4207d0){return _0x5785fd(_0x4207d0);}return _0x316f1c({'method':_0x078f('0xc'),'uri':host+'/v1/speech:recognize?key='+_0x2bde34,'body':{'config':{'encoding':_0x078f('0xd'),'sampleRateHertz':_0x078f('0xe'),'languageCode':_0x34a715},'audio':{'content':_0x2f3d53}},'json':!![]});});}; \ No newline at end of file diff --git a/server/services/agi/scripts/google/index.js b/server/services/agi/scripts/google/index.js index 6d6de11..9073398 100644 --- a/server/services/agi/scripts/google/index.js +++ b/server/services/agi/scripts/google/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x26b5=['exports','./asr'];(function(_0x18ac03,_0x351ee7){var _0x2689e8=function(_0x424166){while(--_0x424166){_0x18ac03['push'](_0x18ac03['shift']());}};_0x2689e8(++_0x351ee7);}(_0x26b5,0xd7));var _0x526b=function(_0x1ec845,_0x5a71e5){_0x1ec845=_0x1ec845-0x0;var _0x3fa2e8=_0x26b5[_0x1ec845];return _0x3fa2e8;};var asr=require(_0x526b('0x0'));module[_0x526b('0x1')]={'asr':asr}; \ No newline at end of file +var _0xae76=['exports','./asr'];(function(_0x1fedfe,_0x1c8f22){var _0x55303d=function(_0x2e77b9){while(--_0x2e77b9){_0x1fedfe['push'](_0x1fedfe['shift']());}};_0x55303d(++_0x1c8f22);}(_0xae76,0xb9));var _0x6ae7=function(_0x420c7e,_0x2fb00d){_0x420c7e=_0x420c7e-0x0;var _0x1fdcb0=_0xae76[_0x420c7e];return _0x1fdcb0;};var asr=require(_0x6ae7('0x0'));module[_0x6ae7('0x1')]={'asr':asr}; \ No newline at end of file diff --git a/server/services/agi/scripts/index.js b/server/services/agi/scripts/index.js index 47fcc67..db6eee9 100644 --- a/server/services/agi/scripts/index.js +++ b/server/services/agi/scripts/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0048=['unlink','https://translate.google.com/_/TranslateWebserverUi/data/batchexecute','utf8','f.req=','stringify','null','generic','text\x20length\x20limit\x20reached','\x22\x20might\x20not\x20exist','parse\x20response\x20failed:\x0a','base64','goggleTTS\x20path','asr','results','map','alternatives','transcript','join','confidence','googleASR\x20transcription','googleASR\x20confidence','catch','name','message','googleDialogflow','textRequest','result','source','resolvedQuery','speech','score','status','metadata','endConversation','isFallbackIntent','replace','detectIntent','length','action','queryResult','allRequiredParamsPresent','diagnosticInfo','fields','end_conversation','boolValue','intent','displayName','isFallback','languageCode','queryText','responseId','intentDetectionConfidence','fulfillmentText','tildeASR','Tilde\x20ASR\x20transcription','Tilde\x20ASR\x20confidence','polly','awsLex','ispeechTTS','format','%s?apikey=%s&action=convert&text=%s&voice=%s&speed=%s&format=mp3','ispeechASR','%s?apikey=%s&action=recognize&locale=%s&content-type=audio/x-wav&audio=%s&%s','sestekNDA','nda','text','channelData','CustomActionData','AudioFromTts','Data','audiofile','dirName','apiai-promise','bluebird','dialogflow','http','https','md5','path','querystring','request-promise','randomstring','sox','url','parse','util','./aws','./sestek','./tilde','../../../config/logger','https://api.ispeech.org/api/rest','protocol','https:','host','WHAT_EVER','get','statusCode','error','request\x20to\x20','\x20failed,\x20status\x20code\x20=\x20','statusMessage','createWriteStream','info','close','download\x20error','data','end','transcode','wav','finish\x20to\x20convert','start','resolve','tmp','generate','.wav','writeFileSync','then','777','split','readFileSync','toString','googleCloudTTS','https://texttospeech.googleapis.com/v1/','?key=','ssml','input','voice','MP3','text:synthesize','POST','.mp3','audioContent','writeFile','chmodSync'];(function(_0x5763f4,_0x592d37){var _0x5433ef=function(_0x3e2c84){while(--_0x3e2c84){_0x5763f4['push'](_0x5763f4['shift']());}};_0x5433ef(++_0x592d37);}(_0x0048,0x154));var _0x8004=function(_0x4f484c,_0x9bccb4){_0x4f484c=_0x4f484c-0x0;var _0x276e95=_0x0048[_0x4f484c];return _0x276e95;};'use strict';var apiai=require(_0x8004('0x0'));var BPromise=require(_0x8004('0x1'));var dialogflow=require(_0x8004('0x2'));var fs=require('fs');var http=require(_0x8004('0x3'));var https=require(_0x8004('0x4'));var md5=require(_0x8004('0x5'));var path=require(_0x8004('0x6'));var querystring=require(_0x8004('0x7'));var rp=require(_0x8004('0x8'));var rs=require(_0x8004('0x9'));var sox=require(_0x8004('0xa'));var tts=require('google-tts-api');var urlParse=require(_0x8004('0xb'))[_0x8004('0xc')];var util=require(_0x8004('0xd'));var aws=require(_0x8004('0xe'));var google=require('./google');var sestek=require(_0x8004('0xf'));var tilde=require(_0x8004('0x10'));var logger=require(_0x8004('0x11'))('agi');var ISPEECH_API=_0x8004('0x12');function downloadFile(_0x3eeab9,_0x3c3789){return new BPromise(function(_0x49a176,_0x2851e0){var _0x2883d7=urlParse(_0x3eeab9);var _0x5344ea=_0x2883d7[_0x8004('0x13')]===_0x8004('0x14')?https:http;var _0x245f71={'host':_0x2883d7[_0x8004('0x15')],'path':_0x2883d7[_0x8004('0x6')],'headers':{'user-agent':_0x8004('0x16')}};_0x5344ea[_0x8004('0x17')](_0x245f71,function(_0x24a9f6){if(_0x24a9f6[_0x8004('0x18')]!==0xc8){logger[_0x8004('0x19')](_0x8004('0x1a')+_0x3eeab9+_0x8004('0x1b')+_0x24a9f6[_0x8004('0x18')]+'\x20('+_0x24a9f6['statusMessage']+')');_0x2851e0(new Error(_0x8004('0x1a')+_0x3eeab9+'\x20failed,\x20status\x20code\x20=\x20'+_0x24a9f6[_0x8004('0x18')]+'\x20('+_0x24a9f6[_0x8004('0x1c')]+')'));return;}var _0x1c0330=fs[_0x8004('0x1d')](_0x3c3789);_0x1c0330['on']('finish',function(){logger[_0x8004('0x1e')]('finish\x20download\x20file');_0x1c0330[_0x8004('0x1f')](_0x49a176);});_0x1c0330['on'](_0x8004('0x19'),function(_0x89dac){fs['unlink'](_0x3c3789);logger[_0x8004('0x19')](_0x8004('0x20'),_0x89dac);_0x2851e0(_0x89dac);});_0x24a9f6['pipe'](_0x1c0330);})['on'](_0x8004('0x19'),function(_0x372605){logger[_0x8004('0x19')](_0x372605);_0x2851e0(_0x372605);})['end']();});}function uploadFile(_0xc42e47){return new BPromise(function(_0x64f77b,_0xb513a7){var _0x561867=urlParse(_0xc42e47);var _0x29be4c=_0x561867[_0x8004('0x13')]===_0x8004('0x14')?https:http;var _0x3ed1a3={'host':_0x561867[_0x8004('0x15')],'path':_0x561867['path'],'headers':{'user-agent':'WHAT_EVER'}};_0x29be4c[_0x8004('0x17')](_0x3ed1a3,function(_0x522480){if(_0x522480[_0x8004('0x18')]!==0xc8){_0xb513a7(new Error('request\x20to\x20'+_0xc42e47+_0x8004('0x1b')+_0x522480['statusCode']+'\x20('+_0x522480['statusMessage']+')'));return;}var _0x32d453='';_0x522480['on'](_0x8004('0x21'),function(_0x360d24){_0x32d453+=_0x360d24;});_0x522480['on'](_0x8004('0x22'),function(){_0x64f77b(_0x32d453);});})['on']('error',function(_0x171e10){_0xb513a7(_0x171e10);})['end']();});}function convertFile(_0x343ffc,_0x47b16d){return new BPromise(function(_0x1fe95f,_0xf97005){var _0x3e31ae=sox[_0x8004('0x23')](_0x343ffc,_0x47b16d,{'sampleRate':0x1f40,'format':_0x8004('0x24'),'channelCount':0x1,'bitRate':0xc0*0x400,'compressionQuality':0x5});_0x3e31ae['on'](_0x8004('0x19'),function(_0x438293){logger[_0x8004('0x19')]('error\x20convert',_0x438293);_0xf97005(_0x438293);});_0x3e31ae['on'](_0x8004('0x22'),function(){logger[_0x8004('0x1e')](_0x8004('0x25'));_0x1fe95f();});_0x3e31ae[_0x8004('0x26')]();});}function base64Decode(_0x480f76,_0x5c581c){var _0x21f95e=path[_0x8004('0x27')](__dirname,_0x8004('0x28'),rs[_0x8004('0x29')](0x4)+_0x8004('0x2a'));fs[_0x8004('0x2b')](_0x21f95e,_0x480f76,'base64');return convertFile(_0x21f95e,_0x5c581c)[_0x8004('0x2c')](function(){try{fs['unlink'](_0x21f95e);fs['chmodSync'](_0x5c581c,_0x8004('0x2d'));}catch(_0x5b3949){logger[_0x8004('0x19')](_0x5b3949);}return _0x5c581c[_0x8004('0x2e')]('.')[0x0];});}function base64Encode(_0x307ae0){var _0xe6f9e5=fs[_0x8004('0x2f')](_0x307ae0);return new Buffer(_0xe6f9e5)[_0x8004('0x30')]('base64');}exports[_0x8004('0x31')]=function(_0x245849,_0x430778,_0x261ddd,_0x3f98aa,_0x401514,_0x45a1f6){var _0x199de,_0x1ef225;var _0x4d1ea4=_0x8004('0x32');var _0x37ee53=_0x8004('0x33')+_0x245849;var _0x1d82b0={};if(_0x430778===_0x8004('0x34')){_0x1d82b0['input']={'ssml':_0x261ddd};}else{_0x1d82b0[_0x8004('0x35')]={'text':_0x261ddd};};_0x1d82b0[_0x8004('0x36')]={'languageCode':_0x3f98aa,'ssmlGender':_0x401514};_0x1d82b0['audioConfig']={'audioEncoding':_0x8004('0x37'),'sampleRateHertz':0x1f40};var _0x30299d={'url':_0x4d1ea4+_0x8004('0x38')+_0x37ee53,'method':_0x8004('0x39'),'json':!![],'body':_0x1d82b0};return rp(_0x30299d)['then'](function(_0x378ef2){return new BPromise(function(_0x2befac,_0x432919){_0x199de=path[_0x8004('0x27')](__dirname,'tmp',rs[_0x8004('0x29')](0x4)+_0x8004('0x3a'));var _0x92814c=Buffer['from'](_0x378ef2[_0x8004('0x3b')],'base64');return fs[_0x8004('0x3c')](_0x199de,_0x92814c,function(_0x16159a){_0x432919(_0x16159a);},function(_0x404066){fs[_0x8004('0x3d')](_0x199de,_0x8004('0x2d'));_0x2befac(_0x404066);});});})['then'](function(_0x2ff709){_0x1ef225=path[_0x8004('0x27')](__dirname,_0x8004('0x28'),rs[_0x8004('0x29')](0x4)+_0x8004('0x2a'));return convertFile(_0x199de,_0x1ef225);})[_0x8004('0x2c')](function(){try{fs[_0x8004('0x3e')](_0x199de);fs[_0x8004('0x3d')](_0x1ef225,_0x8004('0x2d'));}catch(_0x2ad355){logger[_0x8004('0x19')](_0x2ad355);}logger[_0x8004('0x1e')]('googleCloudTTS\x20path',_0x1ef225['split']('.')[0x0]);return _0x1ef225[_0x8004('0x2e')]('.')[0x0];});};exports['googleTTS']=function(_0x11733e,_0x2c59f6){var _0x947d52=_0x8004('0x3f');var _0x2990ed,_0x5c9277;var _0x282688;var _0x2366e0={'encoding':_0x8004('0x40'),'method':_0x8004('0x39'),'timeout':0x2710,'url':_0x947d52,'headers':{'Content-Type':'application/x-www-form-urlencoded'},'body':_0x8004('0x41')+encodeURIComponent(JSON[_0x8004('0x42')]([[['jQ1olc',JSON[_0x8004('0x42')]([_0x11733e,_0x2c59f6||'en',![],_0x8004('0x43')]),null,_0x8004('0x44')]]]))};return rp(_0x2366e0)['then'](function(_0x28c92c){try{_0x282688=eval(_0x28c92c['slice'](0x5))[0x0][0x2];}catch(_0x10f55f){throw new Error('parse\x20response\x20failed:\x0a'+_0x28c92c[_0x8004('0x21')]);}if(!_0x282688){if(_0x11733e['length']>0xc8){throw new Error(_0x8004('0x45'));}else{throw new Error('lang\x20\x22'+_0x2c59f6+_0x8004('0x46'));}}try{_0x282688=eval(_0x282688)[0x0];}catch(_0x9e746b){throw new Error(_0x8004('0x47')+res['data']);}const _0x503a0a=_0x282688;_0x2990ed=path[_0x8004('0x27')](__dirname,_0x8004('0x28'),rs[_0x8004('0x29')](0x4)+_0x8004('0x3a'));fs[_0x8004('0x2b')](_0x2990ed,_0x282688,{'encoding':_0x8004('0x48')});_0x5c9277=path[_0x8004('0x27')](__dirname,_0x8004('0x28'),rs[_0x8004('0x29')](0x4)+'.wav');return convertFile(_0x2990ed,_0x5c9277);})[_0x8004('0x2c')](function(){try{fs[_0x8004('0x3e')](_0x2990ed);fs['chmodSync'](_0x5c9277,_0x8004('0x2d'));}catch(_0x461629){logger['error'](_0x461629);}logger['info'](_0x8004('0x49'),_0x5c9277[_0x8004('0x2e')]('.')[0x0]);return _0x5c9277['split']('.')[0x0];});};exports['googleASR']=function(_0x2c981f,_0x5b8e7a,_0x3bc401){return google[_0x8004('0x4a')](_0x2c981f,_0x5b8e7a,_0x3bc401)['then'](function(_0x5b7968){logger[_0x8004('0x1e')](_0x5b7968['uri']);return rp(_0x5b7968);})[_0x8004('0x2c')](function(_0x4bcce4){var _0x438a66='';var _0x1943c5=0x0;try{fs[_0x8004('0x3e')](_0x2c981f);}catch(_0x3c8604){logger[_0x8004('0x19')](_0x3c8604);}if(_0x4bcce4&&_0x4bcce4['results']){_0x438a66=_0x4bcce4[_0x8004('0x4b')][_0x8004('0x4c')](function(_0x2b081f){return _0x2b081f&&_0x2b081f[_0x8004('0x4d')][0x0]&&_0x2b081f['alternatives'][0x0][_0x8004('0x4e')]?_0x2b081f[_0x8004('0x4d')][0x0]['transcript']:'';})[_0x8004('0x4f')]('\x0a');_0x1943c5=_0x4bcce4[_0x8004('0x4b')][_0x8004('0x4c')](function(_0x59448d){return _0x59448d&&_0x59448d[_0x8004('0x4d')][0x0]&&_0x59448d[_0x8004('0x4d')][0x0][_0x8004('0x50')]?_0x59448d[_0x8004('0x4d')][0x0]['confidence']:0x0;})['join']('\x0a');}logger['info'](_0x8004('0x51'),_0x438a66);logger[_0x8004('0x1e')](_0x8004('0x52'),_0x1943c5);return{'transcript':_0x438a66,'confidence':_0x1943c5};})[_0x8004('0x53')](function(_0x7856cb){logger[_0x8004('0x19')]('[%s]\x20%s:%s',_0x7856cb['statusCode'],_0x7856cb[_0x8004('0x54')],_0x7856cb[_0x8004('0x55')]);});};exports[_0x8004('0x56')]=function(_0x264717,_0x2f095b,_0xe0eb99,_0x6ebb3a){var _0x5296fe=apiai(_0x2f095b,{'language':_0x6ebb3a||'en'});return _0x5296fe[_0x8004('0x57')](_0xe0eb99,{'sessionId':md5(_0x264717)})[_0x8004('0x2c')](function(_0x73542e){logger[_0x8004('0x1e')](JSON[_0x8004('0x42')](_0x73542e));return{'source':_0x73542e[_0x8004('0x58')][_0x8004('0x59')],'resolvedQuery':_0x73542e['result'][_0x8004('0x5a')],'action':_0x73542e[_0x8004('0x58')]['action'],'actionIncomplete':_0x73542e[_0x8004('0x58')]['actionIncomplete'],'speech':_0x73542e[_0x8004('0x58')]['fulfillment'][_0x8004('0x5b')],'score':_0x73542e[_0x8004('0x58')][_0x8004('0x5c')],'statusCode':_0x73542e[_0x8004('0x5d')]['code'],'endConversation':_0x73542e['result'][_0x8004('0x5e')][_0x8004('0x5f')]||![],'isFallbackIntent':_0x73542e[_0x8004('0x58')][_0x8004('0x5e')][_0x8004('0x60')]};});};exports['googleDialogflowV2']=function(_0x1705aa,_0x5b817c,_0xd330c6,_0x585d97,_0x2e17d9,_0x30a6da){var _0x5db5be=_0x585d97[_0x8004('0x61')](/\\n/g,'\x0a');var _0x5dbd6b={'credentials':{'private_key':_0x5db5be,'client_email':_0xd330c6}};var _0x574387=new dialogflow['SessionsClient'](_0x5dbd6b);var _0x53f809=_0x574387['sessionPath'](_0x5b817c,md5(_0x1705aa));var _0x21491d={'session':_0x53f809,'queryInput':{'text':{'text':_0x2e17d9,'languageCode':_0x30a6da}}};return _0x574387[_0x8004('0x62')](_0x21491d)[_0x8004('0x2c')](function(_0x30d8e5){if(_0x30d8e5&&_0x30d8e5[_0x8004('0x63')]){logger[_0x8004('0x1e')]('Dialogflow\x20V2\x20response:',JSON[_0x8004('0x42')](_0x30d8e5));var _0x2374cd=_0x30d8e5[0x0];if(_0x2374cd){var _0x2a8935={'action':_0x2374cd['queryResult'][_0x8004('0x64')],'allRequiredParamsPresent':_0x2374cd[_0x8004('0x65')][_0x8004('0x66')],'endConversation':_0x2374cd[_0x8004('0x65')]['diagnosticInfo']&&_0x2374cd[_0x8004('0x65')][_0x8004('0x67')]['fields']?_0x2374cd[_0x8004('0x65')][_0x8004('0x67')][_0x8004('0x68')][_0x8004('0x69')][_0x8004('0x6a')]:![],'fulfillmentText':_0x2374cd['queryResult']['fulfillmentText'],'intentName':_0x2374cd[_0x8004('0x65')][_0x8004('0x6b')][_0x8004('0x54')],'intentDisplayName':_0x2374cd[_0x8004('0x65')]['intent'][_0x8004('0x6c')],'isFallbackIntent':_0x2374cd['queryResult'][_0x8004('0x6b')][_0x8004('0x6d')],'languageCode':_0x2374cd['queryResult'][_0x8004('0x6e')],'queryText':_0x2374cd[_0x8004('0x65')][_0x8004('0x6f')],'responseId':_0x2374cd[_0x8004('0x70')],'score':_0x2374cd[_0x8004('0x65')][_0x8004('0x71')],'speech':_0x2374cd[_0x8004('0x65')][_0x8004('0x72')],'providerResponse':JSON[_0x8004('0x42')](_0x30d8e5)};return _0x2a8935;}}});};exports[_0x8004('0x73')]=function(_0x290b2f,_0x1eafca,_0x2a105e,_0x551a1b){return tilde['asr'](_0x290b2f,_0x1eafca,_0x2a105e,_0x551a1b)[_0x8004('0x2c')](function(_0x58b838){try{fs[_0x8004('0x3e')](_0x290b2f);}catch(_0x905d41){logger[_0x8004('0x19')](_0x905d41);}logger[_0x8004('0x1e')](_0x8004('0x74'),_0x58b838[_0x8004('0x4e')]);logger[_0x8004('0x1e')](_0x8004('0x75'),_0x58b838[_0x8004('0x50')]);return _0x58b838;});};exports['awsPolly']=function(_0x2efedf,_0x33ecc7,_0x5e37ea,_0x551e9a,_0x178211,_0xdb47c9){var _0x2a0067=path[_0x8004('0x27')](__dirname,_0x8004('0x28'),rs[_0x8004('0x29')](0x4)+'.mp3');var _0x5bd98e;return aws[_0x8004('0x76')](_0x2efedf,_0x33ecc7,_0x5e37ea,_0x551e9a,_0x178211,_0xdb47c9,_0x2a0067)[_0x8004('0x2c')](function(){_0x5bd98e=path[_0x8004('0x27')](__dirname,_0x8004('0x28'),rs[_0x8004('0x29')](0x4)+'.wav');return convertFile(_0x2a0067,_0x5bd98e);})[_0x8004('0x2c')](function(){try{fs[_0x8004('0x3e')](_0x2a0067);fs['chmodSync'](_0x5bd98e,_0x8004('0x2d'));}catch(_0x2929a9){logger['error'](_0x2929a9);}return _0x5bd98e[_0x8004('0x2e')]('.')[0x0];});};exports[_0x8004('0x77')]=function(_0x4a7ce0,_0x352bc5,_0x259eff,_0x3f9b08,_0x374769,_0xeac89e){return aws['lex'](_0x4a7ce0,_0x352bc5,_0x259eff,_0x3f9b08,_0x374769,_0xeac89e)[_0x8004('0x2c')](function(_0x396f4d){logger['info'](JSON['stringify'](_0x396f4d));return _0x396f4d;});};exports[_0x8004('0x78')]=function(_0x1e283c,_0x1b12fb,_0x34c01c,_0x5d56a2){var _0x1c0d2e=util[_0x8004('0x79')](_0x8004('0x7a'),ISPEECH_API,_0x1e283c,encodeURIComponent(_0x1b12fb),_0x34c01c,_0x5d56a2);var _0x50b1db=path[_0x8004('0x27')](__dirname,'tmp',rs[_0x8004('0x29')](0x4)+'.mp3');var _0x17ac30;return downloadFile(_0x1c0d2e,_0x50b1db)[_0x8004('0x2c')](function(){_0x17ac30=path[_0x8004('0x27')](__dirname,_0x8004('0x28'),rs['generate'](0x4)+_0x8004('0x2a'));return convertFile(_0x50b1db,_0x17ac30);})[_0x8004('0x2c')](function(){try{fs[_0x8004('0x3e')](_0x50b1db);fs[_0x8004('0x3d')](_0x17ac30,_0x8004('0x2d'));}catch(_0x375552){logger[_0x8004('0x19')](_0x375552);}return _0x17ac30['split']('.')[0x0];});};exports[_0x8004('0x7b')]=function(_0x5e626e,_0x3725f8,_0x4ddff1,_0x33acfe){var _0x16b2c4=util[_0x8004('0x79')](_0x8004('0x7c'),ISPEECH_API,_0x3725f8,_0x4ddff1,base64Encode(_0x5e626e),_0x33acfe?util[_0x8004('0x79')]('model=%s',encodeURIComponent(_0x33acfe)):'freeform=3');return uploadFile(_0x16b2c4)['then'](function(_0x3b400c){return querystring[_0x8004('0xc')](_0x3b400c);});};exports[_0x8004('0x7d')]=function(_0x1631fc,_0xe15987){return sestek[_0x8004('0x7e')](_0x1631fc,_0xe15987)['then'](function(_0x78c9a2){logger[_0x8004('0x1e')](JSON[_0x8004('0x42')](_0x78c9a2));var _0xca3443={'speech':_0x78c9a2[_0x8004('0x7f')],'action':_0x78c9a2[_0x8004('0x80')]?_0x78c9a2[_0x8004('0x80')]['CustomAction']:undefined,'actiondata':_0x78c9a2[_0x8004('0x80')]?_0x78c9a2[_0x8004('0x80')][_0x8004('0x81')]:undefined};if(_0x78c9a2[_0x8004('0x80')]&&_0x78c9a2[_0x8004('0x80')][_0x8004('0x82')]){return base64Decode(_0x78c9a2[_0x8004('0x80')][_0x8004('0x82')][_0x8004('0x83')],path[_0x8004('0x27')](__dirname,_0x8004('0x28'),rs[_0x8004('0x29')](0x4)+_0x8004('0x2a')))[_0x8004('0x2c')](function(_0x24ee93){_0xca3443[_0x8004('0x84')]=_0x24ee93;return _0xca3443;});}return _0xca3443;});};exports[_0x8004('0x85')]=function(){return __dirname;}; \ No newline at end of file +var _0xd140=['textRequest','result','resolvedQuery','actionIncomplete','score','status','code','metadata','endConversation','isFallbackIntent','replace','SessionsClient','sessionPath','detectIntent','Dialogflow\x20V2\x20response:','action','queryResult','allRequiredParamsPresent','diagnosticInfo','fields','end_conversation','boolValue','intent','displayName','isFallback','languageCode','queryText','responseId','fulfillmentText','tildeASR','asr','Tilde\x20ASR\x20transcription','awsPolly','polly','awsLex','lex','ispeechASR','format','%s?apikey=%s&action=recognize&locale=%s&content-type=audio/x-wav&audio=%s&%s','model=%s','freeform=3','sestekNDA','text','CustomAction','channelData','CustomActionData','AudioFromTts','Data','apiai-promise','http','https','md5','path','querystring','request-promise','randomstring','sox','url','parse','util','./aws','./google','./sestek','./tilde','../../../config/logger','https://api.ispeech.org/api/rest','https:','host','WHAT_EVER','get','error','request\x20to\x20','statusMessage','\x20failed,\x20status\x20code\x20=\x20','statusCode','finish','info','finish\x20download\x20file','close','unlink','download\x20error','end','protocol','data','wav','error\x20convert','finish\x20to\x20convert','start','resolve','tmp','generate','.wav','base64','then','chmodSync','777','split','readFileSync','googleCloudTTS','input','voice','audioConfig','MP3','text:synthesize','.mp3','from','audioContent','writeFile','googleCloudTTS\x20path','googleTTS','https://translate.google.com/_/TranslateWebserverUi/data/batchexecute','utf8','POST','f.req=','jQ1olc','stringify','null','generic','slice','parse\x20response\x20failed:\x0a','length','lang\x20\x22','writeFileSync','goggleTTS\x20path','googleASR','uri','results','map','alternatives','transcript','join','confidence','googleASR\x20confidence','catch','[%s]\x20%s:%s','name','message','googleDialogflow'];(function(_0x34134a,_0x2067e4){var _0x5dc5a9=function(_0xeb37bd){while(--_0xeb37bd){_0x34134a['push'](_0x34134a['shift']());}};_0x5dc5a9(++_0x2067e4);}(_0xd140,0x144));var _0x0d14=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xd140[_0x321bb2];return _0x9c12ed;};'use strict';var apiai=require(_0x0d14('0x0'));var BPromise=require('bluebird');var dialogflow=require('dialogflow');var fs=require('fs');var http=require(_0x0d14('0x1'));var https=require(_0x0d14('0x2'));var md5=require(_0x0d14('0x3'));var path=require(_0x0d14('0x4'));var querystring=require(_0x0d14('0x5'));var rp=require(_0x0d14('0x6'));var rs=require(_0x0d14('0x7'));var sox=require(_0x0d14('0x8'));var tts=require('google-tts-api');var urlParse=require(_0x0d14('0x9'))[_0x0d14('0xa')];var util=require(_0x0d14('0xb'));var aws=require(_0x0d14('0xc'));var google=require(_0x0d14('0xd'));var sestek=require(_0x0d14('0xe'));var tilde=require(_0x0d14('0xf'));var logger=require(_0x0d14('0x10'))('agi');var ISPEECH_API=_0x0d14('0x11');function downloadFile(_0x5b9ae8,_0x50e710){return new BPromise(function(_0x44f566,_0x18441e){var _0x54d613=urlParse(_0x5b9ae8);var _0x1be1bf=_0x54d613['protocol']===_0x0d14('0x12')?https:http;var _0x422530={'host':_0x54d613[_0x0d14('0x13')],'path':_0x54d613[_0x0d14('0x4')],'headers':{'user-agent':_0x0d14('0x14')}};_0x1be1bf[_0x0d14('0x15')](_0x422530,function(_0x291506){if(_0x291506['statusCode']!==0xc8){logger[_0x0d14('0x16')](_0x0d14('0x17')+_0x5b9ae8+'\x20failed,\x20status\x20code\x20=\x20'+_0x291506['statusCode']+'\x20('+_0x291506[_0x0d14('0x18')]+')');_0x18441e(new Error(_0x0d14('0x17')+_0x5b9ae8+_0x0d14('0x19')+_0x291506[_0x0d14('0x1a')]+'\x20('+_0x291506['statusMessage']+')'));return;}var _0x232ba7=fs['createWriteStream'](_0x50e710);_0x232ba7['on'](_0x0d14('0x1b'),function(){logger[_0x0d14('0x1c')](_0x0d14('0x1d'));_0x232ba7[_0x0d14('0x1e')](_0x44f566);});_0x232ba7['on'](_0x0d14('0x16'),function(_0x353986){fs[_0x0d14('0x1f')](_0x50e710);logger[_0x0d14('0x16')](_0x0d14('0x20'),_0x353986);_0x18441e(_0x353986);});_0x291506['pipe'](_0x232ba7);})['on']('error',function(_0x7f1263){logger[_0x0d14('0x16')](_0x7f1263);_0x18441e(_0x7f1263);})[_0x0d14('0x21')]();});}function uploadFile(_0x27c331){return new BPromise(function(_0x3dfaf4,_0x3dcea4){var _0x53aaf5=urlParse(_0x27c331);var _0x3835bb=_0x53aaf5[_0x0d14('0x22')]===_0x0d14('0x12')?https:http;var _0x599cf3={'host':_0x53aaf5['host'],'path':_0x53aaf5[_0x0d14('0x4')],'headers':{'user-agent':_0x0d14('0x14')}};_0x3835bb['get'](_0x599cf3,function(_0x1e9fc6){if(_0x1e9fc6[_0x0d14('0x1a')]!==0xc8){_0x3dcea4(new Error(_0x0d14('0x17')+_0x27c331+_0x0d14('0x19')+_0x1e9fc6['statusCode']+'\x20('+_0x1e9fc6[_0x0d14('0x18')]+')'));return;}var _0x1d575d='';_0x1e9fc6['on'](_0x0d14('0x23'),function(_0x590df4){_0x1d575d+=_0x590df4;});_0x1e9fc6['on'](_0x0d14('0x21'),function(){_0x3dfaf4(_0x1d575d);});})['on']('error',function(_0x5cc0d2){_0x3dcea4(_0x5cc0d2);})[_0x0d14('0x21')]();});}function convertFile(_0xd37f1d,_0x2f17ee){return new BPromise(function(_0x502986,_0x20b995){var _0x45b835=sox['transcode'](_0xd37f1d,_0x2f17ee,{'sampleRate':0x1f40,'format':_0x0d14('0x24'),'channelCount':0x1,'bitRate':0xc0*0x400,'compressionQuality':0x5});_0x45b835['on'](_0x0d14('0x16'),function(_0x518b79){logger['error'](_0x0d14('0x25'),_0x518b79);_0x20b995(_0x518b79);});_0x45b835['on'](_0x0d14('0x21'),function(){logger[_0x0d14('0x1c')](_0x0d14('0x26'));_0x502986();});_0x45b835[_0x0d14('0x27')]();});}function base64Decode(_0x31c92f,_0x442caa){var _0x7c82ac=path[_0x0d14('0x28')](__dirname,_0x0d14('0x29'),rs[_0x0d14('0x2a')](0x4)+_0x0d14('0x2b'));fs['writeFileSync'](_0x7c82ac,_0x31c92f,_0x0d14('0x2c'));return convertFile(_0x7c82ac,_0x442caa)[_0x0d14('0x2d')](function(){try{fs['unlink'](_0x7c82ac);fs[_0x0d14('0x2e')](_0x442caa,_0x0d14('0x2f'));}catch(_0x491aa5){logger[_0x0d14('0x16')](_0x491aa5);}return _0x442caa[_0x0d14('0x30')]('.')[0x0];});}function base64Encode(_0xe44cc8){var _0x1ae8e3=fs[_0x0d14('0x31')](_0xe44cc8);return new Buffer(_0x1ae8e3)['toString']('base64');}exports[_0x0d14('0x32')]=function(_0x27b98a,_0x5558e7,_0x20eadb,_0x4ce2aa,_0x2184ab,_0x579578){var _0x40edac,_0x12eaf9;var _0x1596e8='https://texttospeech.googleapis.com/v1/';var _0x51c332='?key='+_0x27b98a;var _0x343c09={};if(_0x5558e7==='ssml'){_0x343c09['input']={'ssml':_0x20eadb};}else{_0x343c09[_0x0d14('0x33')]={'text':_0x20eadb};};_0x343c09[_0x0d14('0x34')]={'languageCode':_0x4ce2aa,'ssmlGender':_0x2184ab};_0x343c09[_0x0d14('0x35')]={'audioEncoding':_0x0d14('0x36'),'sampleRateHertz':0x1f40};var _0x49848e={'url':_0x1596e8+_0x0d14('0x37')+_0x51c332,'method':'POST','json':!![],'body':_0x343c09};return rp(_0x49848e)[_0x0d14('0x2d')](function(_0x55ccba){return new BPromise(function(_0x3469f6,_0x497819){_0x40edac=path[_0x0d14('0x28')](__dirname,_0x0d14('0x29'),rs[_0x0d14('0x2a')](0x4)+_0x0d14('0x38'));var _0x2bf4a8=Buffer[_0x0d14('0x39')](_0x55ccba[_0x0d14('0x3a')],_0x0d14('0x2c'));return fs[_0x0d14('0x3b')](_0x40edac,_0x2bf4a8,function(_0x5d86af){_0x497819(_0x5d86af);},function(_0x24e4e6){fs['chmodSync'](_0x40edac,'777');_0x3469f6(_0x24e4e6);});});})[_0x0d14('0x2d')](function(_0x11d228){_0x12eaf9=path[_0x0d14('0x28')](__dirname,_0x0d14('0x29'),rs['generate'](0x4)+'.wav');return convertFile(_0x40edac,_0x12eaf9);})['then'](function(){try{fs[_0x0d14('0x1f')](_0x40edac);fs[_0x0d14('0x2e')](_0x12eaf9,_0x0d14('0x2f'));}catch(_0x554aec){logger[_0x0d14('0x16')](_0x554aec);}logger[_0x0d14('0x1c')](_0x0d14('0x3c'),_0x12eaf9[_0x0d14('0x30')]('.')[0x0]);return _0x12eaf9['split']('.')[0x0];});};exports[_0x0d14('0x3d')]=function(_0x37ed8c,_0x4e1f70){var _0x43802f=_0x0d14('0x3e');var _0x38fafa,_0xa1e46c;var _0x2a8590;var _0x31bae5={'encoding':_0x0d14('0x3f'),'method':_0x0d14('0x40'),'timeout':0x2710,'url':_0x43802f,'headers':{'Content-Type':'application/x-www-form-urlencoded'},'body':_0x0d14('0x41')+encodeURIComponent(JSON['stringify']([[[_0x0d14('0x42'),JSON[_0x0d14('0x43')]([_0x37ed8c,_0x4e1f70||'en',![],_0x0d14('0x44')]),null,_0x0d14('0x45')]]]))};return rp(_0x31bae5)[_0x0d14('0x2d')](function(_0x40a82c){try{_0x2a8590=eval(_0x40a82c[_0x0d14('0x46')](0x5))[0x0][0x2];}catch(_0x4ff24b){throw new Error(_0x0d14('0x47')+_0x40a82c['data']);}if(!_0x2a8590){if(_0x37ed8c[_0x0d14('0x48')]>0xc8){throw new Error('text\x20length\x20limit\x20reached');}else{throw new Error(_0x0d14('0x49')+_0x4e1f70+'\x22\x20might\x20not\x20exist');}}try{_0x2a8590=eval(_0x2a8590)[0x0];}catch(_0x4eeeb5){throw new Error(_0x0d14('0x47')+res[_0x0d14('0x23')]);}const _0x44c0a8=_0x2a8590;_0x38fafa=path['resolve'](__dirname,_0x0d14('0x29'),rs[_0x0d14('0x2a')](0x4)+_0x0d14('0x38'));fs[_0x0d14('0x4a')](_0x38fafa,_0x2a8590,{'encoding':_0x0d14('0x2c')});_0xa1e46c=path[_0x0d14('0x28')](__dirname,'tmp',rs['generate'](0x4)+'.wav');return convertFile(_0x38fafa,_0xa1e46c);})['then'](function(){try{fs[_0x0d14('0x1f')](_0x38fafa);fs['chmodSync'](_0xa1e46c,'777');}catch(_0x46ed24){logger[_0x0d14('0x16')](_0x46ed24);}logger['info'](_0x0d14('0x4b'),_0xa1e46c['split']('.')[0x0]);return _0xa1e46c[_0x0d14('0x30')]('.')[0x0];});};exports[_0x0d14('0x4c')]=function(_0x37ce51,_0xc7e474,_0x5cfe64){return google['asr'](_0x37ce51,_0xc7e474,_0x5cfe64)['then'](function(_0x3a80c8){logger[_0x0d14('0x1c')](_0x3a80c8[_0x0d14('0x4d')]);return rp(_0x3a80c8);})[_0x0d14('0x2d')](function(_0x8eac3d){var _0x54f7da='';var _0x4a9ff7=0x0;try{fs[_0x0d14('0x1f')](_0x37ce51);}catch(_0x28012a){logger[_0x0d14('0x16')](_0x28012a);}if(_0x8eac3d&&_0x8eac3d[_0x0d14('0x4e')]){_0x54f7da=_0x8eac3d[_0x0d14('0x4e')][_0x0d14('0x4f')](function(_0x20129a){return _0x20129a&&_0x20129a[_0x0d14('0x50')][0x0]&&_0x20129a[_0x0d14('0x50')][0x0]['transcript']?_0x20129a[_0x0d14('0x50')][0x0][_0x0d14('0x51')]:'';})[_0x0d14('0x52')]('\x0a');_0x4a9ff7=_0x8eac3d['results'][_0x0d14('0x4f')](function(_0x4e40f5){return _0x4e40f5&&_0x4e40f5[_0x0d14('0x50')][0x0]&&_0x4e40f5[_0x0d14('0x50')][0x0][_0x0d14('0x53')]?_0x4e40f5[_0x0d14('0x50')][0x0]['confidence']:0x0;})[_0x0d14('0x52')]('\x0a');}logger[_0x0d14('0x1c')]('googleASR\x20transcription',_0x54f7da);logger[_0x0d14('0x1c')](_0x0d14('0x54'),_0x4a9ff7);return{'transcript':_0x54f7da,'confidence':_0x4a9ff7};})[_0x0d14('0x55')](function(_0x46b1e5){logger[_0x0d14('0x16')](_0x0d14('0x56'),_0x46b1e5[_0x0d14('0x1a')],_0x46b1e5[_0x0d14('0x57')],_0x46b1e5[_0x0d14('0x58')]);});};exports[_0x0d14('0x59')]=function(_0x5bd84a,_0x1913a7,_0x59aac2,_0xb331cf){var _0x303c40=apiai(_0x1913a7,{'language':_0xb331cf||'en'});return _0x303c40[_0x0d14('0x5a')](_0x59aac2,{'sessionId':md5(_0x5bd84a)})[_0x0d14('0x2d')](function(_0xeca985){logger['info'](JSON['stringify'](_0xeca985));return{'source':_0xeca985[_0x0d14('0x5b')]['source'],'resolvedQuery':_0xeca985[_0x0d14('0x5b')][_0x0d14('0x5c')],'action':_0xeca985[_0x0d14('0x5b')]['action'],'actionIncomplete':_0xeca985[_0x0d14('0x5b')][_0x0d14('0x5d')],'speech':_0xeca985[_0x0d14('0x5b')]['fulfillment']['speech'],'score':_0xeca985[_0x0d14('0x5b')][_0x0d14('0x5e')],'statusCode':_0xeca985[_0x0d14('0x5f')][_0x0d14('0x60')],'endConversation':_0xeca985[_0x0d14('0x5b')][_0x0d14('0x61')][_0x0d14('0x62')]||![],'isFallbackIntent':_0xeca985['result'][_0x0d14('0x61')][_0x0d14('0x63')]};});};exports['googleDialogflowV2']=function(_0x50485a,_0x43654c,_0x3aca6b,_0x52a2e0,_0xf5ec08,_0x248288){var _0x4710da=_0x52a2e0[_0x0d14('0x64')](/\\n/g,'\x0a');var _0x331b65={'credentials':{'private_key':_0x4710da,'client_email':_0x3aca6b}};var _0xbbf4a4=new dialogflow[(_0x0d14('0x65'))](_0x331b65);var _0x106013=_0xbbf4a4[_0x0d14('0x66')](_0x43654c,md5(_0x50485a));var _0x5d30be={'session':_0x106013,'queryInput':{'text':{'text':_0xf5ec08,'languageCode':_0x248288}}};return _0xbbf4a4[_0x0d14('0x67')](_0x5d30be)[_0x0d14('0x2d')](function(_0x4ea634){if(_0x4ea634&&_0x4ea634[_0x0d14('0x48')]){logger[_0x0d14('0x1c')](_0x0d14('0x68'),JSON[_0x0d14('0x43')](_0x4ea634));var _0x4a09e5=_0x4ea634[0x0];if(_0x4a09e5){var _0x431ff8={'action':_0x4a09e5['queryResult'][_0x0d14('0x69')],'allRequiredParamsPresent':_0x4a09e5[_0x0d14('0x6a')][_0x0d14('0x6b')],'endConversation':_0x4a09e5[_0x0d14('0x6a')][_0x0d14('0x6c')]&&_0x4a09e5['queryResult'][_0x0d14('0x6c')][_0x0d14('0x6d')]?_0x4a09e5[_0x0d14('0x6a')][_0x0d14('0x6c')]['fields'][_0x0d14('0x6e')][_0x0d14('0x6f')]:![],'fulfillmentText':_0x4a09e5['queryResult']['fulfillmentText'],'intentName':_0x4a09e5[_0x0d14('0x6a')][_0x0d14('0x70')][_0x0d14('0x57')],'intentDisplayName':_0x4a09e5[_0x0d14('0x6a')]['intent'][_0x0d14('0x71')],'isFallbackIntent':_0x4a09e5[_0x0d14('0x6a')][_0x0d14('0x70')][_0x0d14('0x72')],'languageCode':_0x4a09e5[_0x0d14('0x6a')][_0x0d14('0x73')],'queryText':_0x4a09e5[_0x0d14('0x6a')][_0x0d14('0x74')],'responseId':_0x4a09e5[_0x0d14('0x75')],'score':_0x4a09e5[_0x0d14('0x6a')]['intentDetectionConfidence'],'speech':_0x4a09e5[_0x0d14('0x6a')][_0x0d14('0x76')],'providerResponse':JSON[_0x0d14('0x43')](_0x4ea634)};return _0x431ff8;}}});};exports[_0x0d14('0x77')]=function(_0x2ea111,_0xc998fe,_0x3a12c0,_0x21344b){return tilde[_0x0d14('0x78')](_0x2ea111,_0xc998fe,_0x3a12c0,_0x21344b)[_0x0d14('0x2d')](function(_0x432267){try{fs[_0x0d14('0x1f')](_0x2ea111);}catch(_0x270cbe){logger[_0x0d14('0x16')](_0x270cbe);}logger[_0x0d14('0x1c')](_0x0d14('0x79'),_0x432267[_0x0d14('0x51')]);logger['info']('Tilde\x20ASR\x20confidence',_0x432267['confidence']);return _0x432267;});};exports[_0x0d14('0x7a')]=function(_0x4404e9,_0x41d8e9,_0xf18706,_0x37f156,_0x5baae7,_0x42e276){var _0x271ec5=path[_0x0d14('0x28')](__dirname,_0x0d14('0x29'),rs[_0x0d14('0x2a')](0x4)+_0x0d14('0x38'));var _0x80c336;return aws[_0x0d14('0x7b')](_0x4404e9,_0x41d8e9,_0xf18706,_0x37f156,_0x5baae7,_0x42e276,_0x271ec5)['then'](function(){_0x80c336=path[_0x0d14('0x28')](__dirname,_0x0d14('0x29'),rs[_0x0d14('0x2a')](0x4)+_0x0d14('0x2b'));return convertFile(_0x271ec5,_0x80c336);})['then'](function(){try{fs[_0x0d14('0x1f')](_0x271ec5);fs[_0x0d14('0x2e')](_0x80c336,_0x0d14('0x2f'));}catch(_0x71431a){logger[_0x0d14('0x16')](_0x71431a);}return _0x80c336[_0x0d14('0x30')]('.')[0x0];});};exports[_0x0d14('0x7c')]=function(_0x37121b,_0x4477c1,_0x31f150,_0x488e6d,_0x44ca86,_0x168b81){return aws[_0x0d14('0x7d')](_0x37121b,_0x4477c1,_0x31f150,_0x488e6d,_0x44ca86,_0x168b81)[_0x0d14('0x2d')](function(_0xe6c321){logger[_0x0d14('0x1c')](JSON['stringify'](_0xe6c321));return _0xe6c321;});};exports['ispeechTTS']=function(_0x4b7b8d,_0x4a2426,_0x4c3358,_0x5dec28){var _0x226b03=util['format']('%s?apikey=%s&action=convert&text=%s&voice=%s&speed=%s&format=mp3',ISPEECH_API,_0x4b7b8d,encodeURIComponent(_0x4a2426),_0x4c3358,_0x5dec28);var _0x23d024=path[_0x0d14('0x28')](__dirname,_0x0d14('0x29'),rs['generate'](0x4)+_0x0d14('0x38'));var _0x4cfbda;return downloadFile(_0x226b03,_0x23d024)['then'](function(){_0x4cfbda=path['resolve'](__dirname,'tmp',rs[_0x0d14('0x2a')](0x4)+_0x0d14('0x2b'));return convertFile(_0x23d024,_0x4cfbda);})[_0x0d14('0x2d')](function(){try{fs[_0x0d14('0x1f')](_0x23d024);fs[_0x0d14('0x2e')](_0x4cfbda,_0x0d14('0x2f'));}catch(_0x275eef){logger['error'](_0x275eef);}return _0x4cfbda[_0x0d14('0x30')]('.')[0x0];});};exports[_0x0d14('0x7e')]=function(_0x4c1be7,_0x17bc10,_0xd6b52c,_0xde0231){var _0x56ca69=util[_0x0d14('0x7f')](_0x0d14('0x80'),ISPEECH_API,_0x17bc10,_0xd6b52c,base64Encode(_0x4c1be7),_0xde0231?util[_0x0d14('0x7f')](_0x0d14('0x81'),encodeURIComponent(_0xde0231)):_0x0d14('0x82'));return uploadFile(_0x56ca69)['then'](function(_0x3a33b7){return querystring[_0x0d14('0xa')](_0x3a33b7);});};exports[_0x0d14('0x83')]=function(_0x48093b,_0x55fe78){return sestek['nda'](_0x48093b,_0x55fe78)[_0x0d14('0x2d')](function(_0xda5e83){logger[_0x0d14('0x1c')](JSON[_0x0d14('0x43')](_0xda5e83));var _0x41e5f0={'speech':_0xda5e83[_0x0d14('0x84')],'action':_0xda5e83['channelData']?_0xda5e83['channelData'][_0x0d14('0x85')]:undefined,'actiondata':_0xda5e83[_0x0d14('0x86')]?_0xda5e83[_0x0d14('0x86')][_0x0d14('0x87')]:undefined};if(_0xda5e83[_0x0d14('0x86')]&&_0xda5e83[_0x0d14('0x86')][_0x0d14('0x88')]){return base64Decode(_0xda5e83[_0x0d14('0x86')][_0x0d14('0x88')][_0x0d14('0x89')],path[_0x0d14('0x28')](__dirname,_0x0d14('0x29'),rs[_0x0d14('0x2a')](0x4)+_0x0d14('0x2b')))[_0x0d14('0x2d')](function(_0x321551){_0x41e5f0['audiofile']=_0x321551;return _0x41e5f0;});}return _0x41e5f0;});};exports['dirName']=function(){return __dirname;}; \ No newline at end of file diff --git a/server/services/agi/scripts/sestek/index.js b/server/services/agi/scripts/sestek/index.js index f2f419c..4b6b57f 100644 --- a/server/services/agi/scripts/sestek/index.js +++ b/server/services/agi/scripts/sestek/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd4fb=['./nda','exports'];(function(_0x37b653,_0x1d2082){var _0x172e4d=function(_0x3385b9){while(--_0x3385b9){_0x37b653['push'](_0x37b653['shift']());}};_0x172e4d(++_0x1d2082);}(_0xd4fb,0x9c));var _0xbd4f=function(_0x3197ef,_0x1ec14c){_0x3197ef=_0x3197ef-0x0;var _0x3402bf=_0xd4fb[_0x3197ef];return _0x3402bf;};var nda=require(_0xbd4f('0x0'));module[_0xbd4f('0x1')]={'nda':nda}; \ No newline at end of file +var _0x85cb=['./nda'];(function(_0x5dea97,_0x18bef9){var _0x1fa906=function(_0x23092c){while(--_0x23092c){_0x5dea97['push'](_0x5dea97['shift']());}};_0x1fa906(++_0x18bef9);}(_0x85cb,0x150));var _0xb85c=function(_0x112144,_0x1432ae){_0x112144=_0x112144-0x0;var _0x2ea2b7=_0x85cb[_0x112144];return _0x2ea2b7;};var nda=require(_0xb85c('0x0'));module['exports']={'nda':nda}; \ No newline at end of file diff --git a/server/services/agi/scripts/sestek/nda/index.js b/server/services/agi/scripts/sestek/nda/index.js index bac79ac..66e3e0c 100644 --- a/server/services/agi/scripts/sestek/nda/index.js +++ b/server/services/agi/scripts/sestek/nda/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9b00=['ndauth_url','password','then','ndassistant_url','ndaactivity_type','message','Nda','uniqueid','callerid','calleridname','dnid','extension','text','Bearer\x20','access_token','body','channelData','ProjectName','ndagenerate_audio','AudioOutputSettings','custom_action','CustomAction','CustomActionData','info','request-promise','url','../../../../../config/logger','exports','POST','resolve'];(function(_0x45b8b5,_0x4c987e){var _0x1e698b=function(_0x36a3c7){while(--_0x36a3c7){_0x45b8b5['push'](_0x45b8b5['shift']());}};_0x1e698b(++_0x4c987e);}(_0x9b00,0xcc));var _0x09b0=function(_0x138adb,_0x193fee){_0x138adb=_0x138adb-0x0;var _0x1b27f2=_0x9b00[_0x138adb];return _0x1b27f2;};'use strict';var rp=require(_0x09b0('0x0'));var url=require(_0x09b0('0x1'));var logger=require(_0x09b0('0x2'))('agi');module[_0x09b0('0x3')]=function(_0x2bf951,_0x18bb45){var _0x21e010={'method':_0x09b0('0x4'),'uri':url[_0x09b0('0x5')](_0x18bb45[_0x09b0('0x6')],'/token'),'form':{'grant_type':_0x09b0('0x7'),'username':_0x18bb45['username'],'password':_0x18bb45[_0x09b0('0x7')]},'json':!![]};return rp(_0x21e010)[_0x09b0('0x8')](function(_0x396bd6){var _0x4290c7={'method':_0x09b0('0x4'),'uri':url[_0x09b0('0x5')](_0x18bb45[_0x09b0('0x9')],'/api/NaturalDialogAssistant/v1/Run'),'body':{'type':_0x18bb45[_0x09b0('0xa')]||_0x09b0('0xb'),'channelId':_0x09b0('0xc'),'conversation':{'id':_0x2bf951[_0x09b0('0xd')]},'from':{'id':_0x2bf951[_0x09b0('0xe')],'name':_0x2bf951[_0x09b0('0xf')]},'recipient':{'id':_0x2bf951[_0x09b0('0x10')],'name':_0x2bf951[_0x09b0('0x11')]},'text':_0x18bb45[_0x09b0('0x12')],'channelData':{}},'headers':{'Authorization':_0x09b0('0x13')+_0x396bd6[_0x09b0('0x14')]},'json':!![]};if(_0x18bb45['project']){_0x4290c7[_0x09b0('0x15')][_0x09b0('0x16')][_0x09b0('0x17')]=_0x18bb45['project'];}if(_0x18bb45[_0x09b0('0x18')]=='1'){_0x4290c7[_0x09b0('0x15')]['channelData'][_0x09b0('0x19')]={'Generate':!![],'PutInStructuredPart':![],'ExpectedFormat':'audio/wav'};}if(_0x18bb45[_0x09b0('0x1a')]){_0x4290c7[_0x09b0('0x15')][_0x09b0('0x16')][_0x09b0('0x1b')]=_0x18bb45['custom_action'];if(_0x18bb45['custom_action_data']){_0x4290c7['body'][_0x09b0('0x16')][_0x09b0('0x1c')]=_0x18bb45['custom_action_data'];}}logger[_0x09b0('0x1d')](JSON['stringify'](_0x4290c7));return rp(_0x4290c7);});}; \ No newline at end of file +var _0x2a41=['CustomAction','custom_action','CustomActionData','custom_action_data','info','stringify','request-promise','../../../../../config/logger','agi','exports','POST','resolve','ndauth_url','password','username','ndassistant_url','/api/NaturalDialogAssistant/v1/Run','ndaactivity_type','Nda','uniqueid','callerid','calleridname','dnid','extension','text','Bearer\x20','access_token','project','body','channelData','ndagenerate_audio','AudioOutputSettings'];(function(_0x12d914,_0x42c554){var _0x2a3a3e=function(_0x119ae5){while(--_0x119ae5){_0x12d914['push'](_0x12d914['shift']());}};_0x2a3a3e(++_0x42c554);}(_0x2a41,0x126));var _0x12a4=function(_0x59f2fe,_0x372cfb){_0x59f2fe=_0x59f2fe-0x0;var _0x121432=_0x2a41[_0x59f2fe];return _0x121432;};'use strict';var rp=require(_0x12a4('0x0'));var url=require('url');var logger=require(_0x12a4('0x1'))(_0x12a4('0x2'));module[_0x12a4('0x3')]=function(_0x321075,_0x1b4dd3){var _0x23d966={'method':_0x12a4('0x4'),'uri':url[_0x12a4('0x5')](_0x1b4dd3[_0x12a4('0x6')],'/token'),'form':{'grant_type':_0x12a4('0x7'),'username':_0x1b4dd3[_0x12a4('0x8')],'password':_0x1b4dd3['password']},'json':!![]};return rp(_0x23d966)['then'](function(_0x2042cc){var _0x5ae867={'method':_0x12a4('0x4'),'uri':url[_0x12a4('0x5')](_0x1b4dd3[_0x12a4('0x9')],_0x12a4('0xa')),'body':{'type':_0x1b4dd3[_0x12a4('0xb')]||'message','channelId':_0x12a4('0xc'),'conversation':{'id':_0x321075[_0x12a4('0xd')]},'from':{'id':_0x321075[_0x12a4('0xe')],'name':_0x321075[_0x12a4('0xf')]},'recipient':{'id':_0x321075[_0x12a4('0x10')],'name':_0x321075[_0x12a4('0x11')]},'text':_0x1b4dd3[_0x12a4('0x12')],'channelData':{}},'headers':{'Authorization':_0x12a4('0x13')+_0x2042cc[_0x12a4('0x14')]},'json':!![]};if(_0x1b4dd3[_0x12a4('0x15')]){_0x5ae867[_0x12a4('0x16')][_0x12a4('0x17')]['ProjectName']=_0x1b4dd3[_0x12a4('0x15')];}if(_0x1b4dd3[_0x12a4('0x18')]=='1'){_0x5ae867[_0x12a4('0x16')][_0x12a4('0x17')][_0x12a4('0x19')]={'Generate':!![],'PutInStructuredPart':![],'ExpectedFormat':'audio/wav'};}if(_0x1b4dd3['custom_action']){_0x5ae867[_0x12a4('0x16')][_0x12a4('0x17')][_0x12a4('0x1a')]=_0x1b4dd3[_0x12a4('0x1b')];if(_0x1b4dd3['custom_action_data']){_0x5ae867[_0x12a4('0x16')][_0x12a4('0x17')][_0x12a4('0x1c')]=_0x1b4dd3[_0x12a4('0x1d')];}}logger[_0x12a4('0x1e')](JSON[_0x12a4('0x1f')](_0x5ae867));return rp(_0x5ae867);});}; \ No newline at end of file diff --git a/server/services/agi/scripts/tilde/asr/index.js b/server/services/agi/scripts/tilde/asr/index.js index 931b1a3..ec09061 100644 --- a/server/services/agi/scripts/tilde/asr/index.js +++ b/server/services/agi/scripts/tilde/asr/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x805c=['exports','./lib/api'];(function(_0x2186b4,_0x5ab340){var _0x3602a1=function(_0x49b6aa){while(--_0x49b6aa){_0x2186b4['push'](_0x2186b4['shift']());}};_0x3602a1(++_0x5ab340);}(_0x805c,0x127));var _0xc805=function(_0x548586,_0x3b8580){_0x548586=_0x548586-0x0;var _0x77869b=_0x805c[_0x548586];return _0x77869b;};'use strict';var asr=require(_0xc805('0x0'));module[_0xc805('0x1')]=function(_0xa91a31,_0xea8ad9,_0x2b638c,_0x27e41b){return asr(_0xa91a31,_0xea8ad9,_0x2b638c,_0x27e41b);}; \ No newline at end of file +var _0x5521=['exports','./lib/api'];(function(_0x2f14db,_0x5b73d1){var _0x452eea=function(_0x432dc9){while(--_0x432dc9){_0x2f14db['push'](_0x2f14db['shift']());}};_0x452eea(++_0x5b73d1);}(_0x5521,0x133));var _0x1552=function(_0x2641f9,_0x26715f){_0x2641f9=_0x2641f9-0x0;var _0x585741=_0x5521[_0x2641f9];return _0x585741;};'use strict';var asr=require(_0x1552('0x0'));module[_0x1552('0x1')]=function(_0x11a939,_0x4d8188,_0x1bff33,_0x50bf26){return asr(_0x11a939,_0x4d8188,_0x1bff33,_0x50bf26);}; \ No newline at end of file diff --git a/server/services/agi/scripts/tilde/asr/lib/api.js b/server/services/agi/scripts/tilde/asr/lib/api.js index 7101396..d3709fd 100644 --- a/server/services/agi/scripts/tilde/asr/lib/api.js +++ b/server/services/agi/scripts/tilde/asr/lib/api.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa56a=['Not\x20available.\x20Max\x20load\x20limit\x20reached.','Authentication\x20failed.','All\x20recognition\x20workers\x20are\x20currently\x20in\x20use\x20and\x20real-time\x20recognition\x20is\x20not\x20possible.','Tilde\x20ASR\x20parse\x20error','Error\x20Tilde\x20ASR\x20socket','isObject','open','close','bluebird','exports','info','Tilde\x20URI','wss://runa.tilde.lv/client/ws/speech/LVASR-ONLINE','No\x20speech.\x20Sent\x20when\x20the\x20incoming\x20audio\x20contains\x20a\x20large\x20portion\x20of\x20silence\x20or\x20non-speech','createHash','sha1','hex','Open\x20Tilde\x20ASR\x20socket','unix','send','stringify','createReadStream','data','error','Tilde\x20ASR\x20send\x20error','terminate','status','final','Tilde\x20ASR\x20hypoteses','result','hypotheses','transcript','likelihood','Success.','Aborted.\x20Recognition\x20was\x20aborted\x20for\x20some\x20reason.'];(function(_0x5b279c,_0x287061){var _0x45d867=function(_0x4882f7){while(--_0x4882f7){_0x5b279c['push'](_0x5b279c['shift']());}};_0x45d867(++_0x287061);}(_0xa56a,0x166));var _0xaa56=function(_0x4d9e92,_0x40d7fd){_0x4d9e92=_0x4d9e92-0x0;var _0x48f175=_0xa56a[_0x4d9e92];return _0x48f175;};'use strict';var BPromise=require(_0xaa56('0x0'));var _=require('lodash');var fs=require('fs');var WebSocket=require('ws');var moment=require('moment');var crypto=require('crypto');var logger=require('../../../../../../config/logger')('agi');module[_0xaa56('0x1')]=function(_0x88d80,_0x2e40a9,_0x581778,_0x2493bd){return new BPromise(function(_0x7f60f2,_0x521117){logger[_0xaa56('0x2')](_0xaa56('0x3'),_0x2493bd||'wss://runa.tilde.lv/client/ws/speech/LVASR-ONLINE');var _0x5ac02c=new WebSocket(_0x2493bd||_0xaa56('0x4'),{'perMessageDeflate':![]});var _0x2fa5bb='';var _0x2ebe17='0';var _0x19bfbd='1';var _0x1f6643=_0xaa56('0x5');function _0x28865e(_0x37395b){var _0x2c5869=crypto[_0xaa56('0x6')](_0xaa56('0x7'));_0x2c5869['update'](_0x37395b);return _0x2c5869['digest'](_0xaa56('0x8'));}function _0x41e580(){try{logger[_0xaa56('0x2')](_0xaa56('0x9'));var _0xcc6b10=moment()[_0xaa56('0xa')]();var _0x3be1d6=_0x28865e(_0xcc6b10+_0x2e40a9+_0x581778);_0x5ac02c[_0xaa56('0xb')](JSON[_0xaa56('0xc')]({'appID':_0x2e40a9,'timestamp':_0xcc6b10,'appKey':_0x3be1d6}));var _0x5d00d6=fs[_0xaa56('0xd')](_0x88d80);_0x5d00d6['on'](_0xaa56('0xe'),function(_0x21c9bf){_0x5ac02c['send'](_0x21c9bf);});_0x5d00d6['on']('close',function(){_0x5ac02c[_0xaa56('0xb')]('EOS');});}catch(_0x56f0c5){logger[_0xaa56('0xf')](_0xaa56('0x10'),JSON['stringify'](_0x56f0c5));_0x5ac02c[_0xaa56('0x11')]();}}function _0x274c62(_0x12e7ca){try{if(_0x12e7ca){var _0x30850d=JSON['parse'](_0x12e7ca);switch(_0x30850d[_0xaa56('0x12')]){case 0x0:if(_0x30850d['result']){if(_0x30850d['result'][_0xaa56('0x13')]){logger['info'](_0xaa56('0x14'),JSON[_0xaa56('0xc')](_0x30850d[_0xaa56('0x15')]['hypotheses']));_0x2fa5bb=_0x30850d[_0xaa56('0x15')][_0xaa56('0x16')][0x0][_0xaa56('0x17')];_0x2ebe17=_0x30850d[_0xaa56('0x15')]['hypotheses'][0x0][_0xaa56('0x18')];_0x19bfbd='0';_0x1f6643=_0xaa56('0x19');_0x5ac02c[_0xaa56('0x11')]();}}break;case 0x1:logger[_0xaa56('0x2')]('No\x20speech.\x20Sent\x20when\x20the\x20incoming\x20audio\x20contains\x20a\x20large\x20portion\x20of\x20silence\x20or\x20non-speech');_0x19bfbd='1';_0x1f6643='No\x20speech.\x20Sent\x20when\x20the\x20incoming\x20audio\x20contains\x20a\x20large\x20portion\x20of\x20silence\x20or\x20non-speech';break;case 0x2:logger[_0xaa56('0x2')]('Aborted.\x20Recognition\x20was\x20aborted\x20for\x20some\x20reason.');_0x19bfbd='2';_0x1f6643=_0xaa56('0x1a');break;case 0x9:logger['info'](_0xaa56('0x1b'));_0x19bfbd='9';_0x1f6643='Not\x20available.\x20Max\x20load\x20limit\x20reached.';break;case 0xa:logger[_0xaa56('0x2')]('Authentication\x20failed.');_0x19bfbd='10';_0x1f6643=_0xaa56('0x1c');break;case 0xb:logger[_0xaa56('0x2')](_0xaa56('0x1d'));_0x19bfbd='11';_0x1f6643=_0xaa56('0x1d');}}}catch(_0xe19c3){logger['error'](_0xaa56('0x1e'),JSON['stringify'](_0xe19c3));_0x5ac02c['terminate']();}}function _0x5cbb77(){logger[_0xaa56('0x2')]('Close\x20Tilde\x20ASR\x20socket');_0x7f60f2({'transcript':_0x2fa5bb,'confidence':_0x2ebe17,'status':_0x19bfbd,'status_message':_0x1f6643});}function _0x38a95b(_0x44433a){logger['error'](_0xaa56('0x1f'));if(!_['isNil'](_0x44433a)){logger['error'](_[_0xaa56('0x20')](_0x44433a)?JSON['stringify'](_0x44433a):_0x44433a);}}_0x5ac02c['on'](_0xaa56('0x21'),_0x41e580);_0x5ac02c['on']('message',_0x274c62);_0x5ac02c['on'](_0xaa56('0x22'),_0x5cbb77);_0x5ac02c['on'](_0xaa56('0xf'),_0x38a95b);});}; \ No newline at end of file +var _0x3cb2=['Tilde\x20ASR\x20send\x20error','terminate','status','result','final','Tilde\x20ASR\x20hypoteses','hypotheses','transcript','likelihood','Success.','Aborted.\x20Recognition\x20was\x20aborted\x20for\x20some\x20reason.','Not\x20available.\x20Max\x20load\x20limit\x20reached.','Authentication\x20failed.','All\x20recognition\x20workers\x20are\x20currently\x20in\x20use\x20and\x20real-time\x20recognition\x20is\x20not\x20possible.','Tilde\x20ASR\x20parse\x20error','Close\x20Tilde\x20ASR\x20socket','Error\x20Tilde\x20ASR\x20socket','isNil','message','close','lodash','moment','crypto','../../../../../../config/logger','agi','exports','info','Tilde\x20URI','wss://runa.tilde.lv/client/ws/speech/LVASR-ONLINE','No\x20speech.\x20Sent\x20when\x20the\x20incoming\x20audio\x20contains\x20a\x20large\x20portion\x20of\x20silence\x20or\x20non-speech','createHash','digest','hex','unix','send','stringify','createReadStream','EOS','error'];(function(_0x3bddc1,_0xa4e97c){var _0x239404=function(_0xed2656){while(--_0xed2656){_0x3bddc1['push'](_0x3bddc1['shift']());}};_0x239404(++_0xa4e97c);}(_0x3cb2,0x1c1));var _0x23cb=function(_0xc4966b,_0x6cd5e0){_0xc4966b=_0xc4966b-0x0;var _0x1802bb=_0x3cb2[_0xc4966b];return _0x1802bb;};'use strict';var BPromise=require('bluebird');var _=require(_0x23cb('0x0'));var fs=require('fs');var WebSocket=require('ws');var moment=require(_0x23cb('0x1'));var crypto=require(_0x23cb('0x2'));var logger=require(_0x23cb('0x3'))(_0x23cb('0x4'));module[_0x23cb('0x5')]=function(_0x4fc9ad,_0x15385f,_0x251dc1,_0x582886){return new BPromise(function(_0x5c04d0,_0x44826a){logger[_0x23cb('0x6')](_0x23cb('0x7'),_0x582886||'wss://runa.tilde.lv/client/ws/speech/LVASR-ONLINE');var _0x345cd7=new WebSocket(_0x582886||_0x23cb('0x8'),{'perMessageDeflate':![]});var _0x893f6a='';var _0x344fe6='0';var _0x4793a8='1';var _0x12a992=_0x23cb('0x9');function _0xa3a603(_0x28a357){var _0x51b2c9=crypto[_0x23cb('0xa')]('sha1');_0x51b2c9['update'](_0x28a357);return _0x51b2c9[_0x23cb('0xb')](_0x23cb('0xc'));}function _0x20e52f(){try{logger[_0x23cb('0x6')]('Open\x20Tilde\x20ASR\x20socket');var _0x1f485a=moment()[_0x23cb('0xd')]();var _0x487169=_0xa3a603(_0x1f485a+_0x15385f+_0x251dc1);_0x345cd7[_0x23cb('0xe')](JSON[_0x23cb('0xf')]({'appID':_0x15385f,'timestamp':_0x1f485a,'appKey':_0x487169}));var _0x412ea2=fs[_0x23cb('0x10')](_0x4fc9ad);_0x412ea2['on']('data',function(_0x1d47d0){_0x345cd7['send'](_0x1d47d0);});_0x412ea2['on']('close',function(){_0x345cd7[_0x23cb('0xe')](_0x23cb('0x11'));});}catch(_0x380e69){logger[_0x23cb('0x12')](_0x23cb('0x13'),JSON['stringify'](_0x380e69));_0x345cd7[_0x23cb('0x14')]();}}function _0x102dbc(_0x117904){try{if(_0x117904){var _0x511491=JSON['parse'](_0x117904);switch(_0x511491[_0x23cb('0x15')]){case 0x0:if(_0x511491[_0x23cb('0x16')]){if(_0x511491[_0x23cb('0x16')][_0x23cb('0x17')]){logger[_0x23cb('0x6')](_0x23cb('0x18'),JSON[_0x23cb('0xf')](_0x511491[_0x23cb('0x16')][_0x23cb('0x19')]));_0x893f6a=_0x511491[_0x23cb('0x16')][_0x23cb('0x19')][0x0][_0x23cb('0x1a')];_0x344fe6=_0x511491[_0x23cb('0x16')][_0x23cb('0x19')][0x0][_0x23cb('0x1b')];_0x4793a8='0';_0x12a992=_0x23cb('0x1c');_0x345cd7[_0x23cb('0x14')]();}}break;case 0x1:logger[_0x23cb('0x6')](_0x23cb('0x9'));_0x4793a8='1';_0x12a992=_0x23cb('0x9');break;case 0x2:logger[_0x23cb('0x6')](_0x23cb('0x1d'));_0x4793a8='2';_0x12a992=_0x23cb('0x1d');break;case 0x9:logger[_0x23cb('0x6')](_0x23cb('0x1e'));_0x4793a8='9';_0x12a992='Not\x20available.\x20Max\x20load\x20limit\x20reached.';break;case 0xa:logger[_0x23cb('0x6')](_0x23cb('0x1f'));_0x4793a8='10';_0x12a992=_0x23cb('0x1f');break;case 0xb:logger[_0x23cb('0x6')](_0x23cb('0x20'));_0x4793a8='11';_0x12a992='All\x20recognition\x20workers\x20are\x20currently\x20in\x20use\x20and\x20real-time\x20recognition\x20is\x20not\x20possible.';}}}catch(_0x2961ed){logger[_0x23cb('0x12')](_0x23cb('0x21'),JSON[_0x23cb('0xf')](_0x2961ed));_0x345cd7[_0x23cb('0x14')]();}}function _0x5004f8(){logger[_0x23cb('0x6')](_0x23cb('0x22'));_0x5c04d0({'transcript':_0x893f6a,'confidence':_0x344fe6,'status':_0x4793a8,'status_message':_0x12a992});}function _0x256dac(_0x3600ce){logger[_0x23cb('0x12')](_0x23cb('0x23'));if(!_[_0x23cb('0x24')](_0x3600ce)){logger[_0x23cb('0x12')](_['isObject'](_0x3600ce)?JSON[_0x23cb('0xf')](_0x3600ce):_0x3600ce);}}_0x345cd7['on']('open',_0x20e52f);_0x345cd7['on'](_0x23cb('0x25'),_0x102dbc);_0x345cd7['on'](_0x23cb('0x26'),_0x5004f8);_0x345cd7['on'](_0x23cb('0x12'),_0x256dac);});}; \ No newline at end of file diff --git a/server/services/agi/scripts/tilde/index.js b/server/services/agi/scripts/tilde/index.js index 10decd0..541738f 100644 --- a/server/services/agi/scripts/tilde/index.js +++ b/server/services/agi/scripts/tilde/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0ae6=['./asr'];(function(_0x2aebef,_0x214d2f){var _0x547f1a=function(_0x5ce17e){while(--_0x5ce17e){_0x2aebef['push'](_0x2aebef['shift']());}};_0x547f1a(++_0x214d2f);}(_0x0ae6,0x17a));var _0x60ae=function(_0x4da496,_0x295dfb){_0x4da496=_0x4da496-0x0;var _0x1dd124=_0x0ae6[_0x4da496];return _0x1dd124;};var asr=require(_0x60ae('0x0'));module['exports']={'asr':asr}; \ No newline at end of file +var _0xac03=['exports'];(function(_0x197ced,_0x522485){var _0x4fdc7f=function(_0x28abb7){while(--_0x28abb7){_0x197ced['push'](_0x197ced['shift']());}};_0x4fdc7f(++_0x522485);}(_0xac03,0x192));var _0x3ac0=function(_0x1024e4,_0x67a93c){_0x1024e4=_0x1024e4-0x0;var _0x145c57=_0xac03[_0x1024e4];return _0x145c57;};var asr=require('./asr');module[_0x3ac0('0x0')]={'asr':asr}; \ No newline at end of file diff --git a/server/services/agi/server.js b/server/services/agi/server.js index df1ab65..f3bc7f5 100644 --- a/server/services/agi/server.js +++ b/server/services/agi/server.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2fdc=['inherits','net','events','EventEmitter','./error','./channel','call','error','E_AGI_ARGUMENT_PORT','createServer','listen','listening','connection','getConnections','emit','E_AGI_SERVER_ERROR','E_AGI_SERVER_VOICE_DISABLED','destroy','E_AGI_SERVER_MAXCONNECTION','ready','code','close'];(function(_0x35da13,_0x5be649){var _0x3541fe=function(_0x3ebcb5){while(--_0x3ebcb5){_0x35da13['push'](_0x35da13['shift']());}};_0x3541fe(++_0x5be649);}(_0x2fdc,0x9b));var _0xc2fd=function(_0x25a42a,_0x3d489b){_0x25a42a=_0x25a42a-0x0;var _0x1129b1=_0x2fdc[_0x25a42a];return _0x1129b1;};'use strict';var util=require('util');var net=require(_0xc2fd('0x0'));var EventEmitter=require(_0xc2fd('0x1'))[_0xc2fd('0x2')];var AGIError=require(_0xc2fd('0x3'));var AGIChannel=require(_0xc2fd('0x4'));var AGIServer=function(_0x3bea89,_0x41ef5f,_0x49c563){var _0x43c3d8=this,_0x3bea89=_0x3bea89||0x11dd,_0x41ef5f=_0x41ef5f||'127.0.0.1',_0x39a86e=null,_0x22a09d=0x0;EventEmitter[_0xc2fd('0x5')](_0x43c3d8);function _0x31d97b(){if(!_0x3bea89){_0x43c3d8['emit'](_0xc2fd('0x6'),new AGIError(_0xc2fd('0x7')));return![];}_0x39a86e=net[_0xc2fd('0x8')]();_0x39a86e[_0xc2fd('0x9')](_0x3bea89,_0x41ef5f);_0x39a86e['on'](_0xc2fd('0xa'),function(){_0x43c3d8['emit'](_0xc2fd('0xa'));});_0x39a86e['on'](_0xc2fd('0xb'),function(_0x37e390){_0x39a86e[_0xc2fd('0xc')](function(_0x53c2b8,_0x345ea6){if(_0x53c2b8){_0x43c3d8[_0xc2fd('0xd')](_0xc2fd('0x6'),new AGIError(_0xc2fd('0xe'),_0x53c2b8));}else if(_0x49c563&&_0x49c563<0x0){_0x43c3d8[_0xc2fd('0xd')](_0xc2fd('0x6'),new AGIError(_0xc2fd('0xf')));_0x37e390[_0xc2fd('0x10')]();}else if(_0x49c563&&_0x49c563>0x0&&_0x49c563<_0x345ea6){_0x22a09d+=0x1;_0x43c3d8[_0xc2fd('0xd')](_0xc2fd('0x6'),new AGIError(_0xc2fd('0x11'),_0x22a09d));_0x37e390[_0xc2fd('0x10')]();}else{var _0x1d781e=new AGIChannel(_0x37e390);_0x1d781e['on'](_0xc2fd('0x12'),function(){_0x43c3d8[_0xc2fd('0xd')]('connection',_0x1d781e);});}});});_0x39a86e['on']('error',function(_0x51640e){_0x43c3d8['emit']('error',new AGIError(_0xc2fd('0xe'),_0x51640e[_0xc2fd('0x13')]));});_0x39a86e['on'](_0xc2fd('0x14'),function(){_0x43c3d8[_0xc2fd('0xd')]('close',new AGIError('E_AGI_SERVER_CLOSE'));});}process['nextTick'](function(){_0x31d97b();});};util[_0xc2fd('0x15')](AGIServer,EventEmitter);module['exports']=function(_0x33bc85,_0x21ce51,_0x2cb8ce){return new AGIServer(_0x33bc85,_0x21ce51,_0x2cb8ce);}; \ No newline at end of file +var _0x5d1f=['util','net','events','EventEmitter','./error','./channel','127.0.0.1','call','emit','error','E_AGI_ARGUMENT_PORT','createServer','listen','listening','connection','getConnections','E_AGI_SERVER_ERROR','E_AGI_SERVER_VOICE_DISABLED','E_AGI_SERVER_MAXCONNECTION','destroy','ready','code','close','E_AGI_SERVER_CLOSE','nextTick','inherits'];(function(_0x1569fc,_0x115095){var _0x277783=function(_0x49e9c1){while(--_0x49e9c1){_0x1569fc['push'](_0x1569fc['shift']());}};_0x277783(++_0x115095);}(_0x5d1f,0x104));var _0xf5d1=function(_0x5c9615,_0xb1c95e){_0x5c9615=_0x5c9615-0x0;var _0x4db5df=_0x5d1f[_0x5c9615];return _0x4db5df;};'use strict';var util=require(_0xf5d1('0x0'));var net=require(_0xf5d1('0x1'));var EventEmitter=require(_0xf5d1('0x2'))[_0xf5d1('0x3')];var AGIError=require(_0xf5d1('0x4'));var AGIChannel=require(_0xf5d1('0x5'));var AGIServer=function(_0x23cdeb,_0x4357c8,_0x758dca){var _0x1d2a27=this,_0x23cdeb=_0x23cdeb||0x11dd,_0x4357c8=_0x4357c8||_0xf5d1('0x6'),_0x568b7=null,_0x23ab83=0x0;EventEmitter[_0xf5d1('0x7')](_0x1d2a27);function _0xb7b822(){if(!_0x23cdeb){_0x1d2a27[_0xf5d1('0x8')](_0xf5d1('0x9'),new AGIError(_0xf5d1('0xa')));return![];}_0x568b7=net[_0xf5d1('0xb')]();_0x568b7[_0xf5d1('0xc')](_0x23cdeb,_0x4357c8);_0x568b7['on'](_0xf5d1('0xd'),function(){_0x1d2a27[_0xf5d1('0x8')](_0xf5d1('0xd'));});_0x568b7['on'](_0xf5d1('0xe'),function(_0x38ef80){_0x568b7[_0xf5d1('0xf')](function(_0x11d6b6,_0x56d8f4){if(_0x11d6b6){_0x1d2a27[_0xf5d1('0x8')](_0xf5d1('0x9'),new AGIError(_0xf5d1('0x10'),_0x11d6b6));}else if(_0x758dca&&_0x758dca<0x0){_0x1d2a27[_0xf5d1('0x8')]('error',new AGIError(_0xf5d1('0x11')));_0x38ef80['destroy']();}else if(_0x758dca&&_0x758dca>0x0&&_0x758dca<_0x56d8f4){_0x23ab83+=0x1;_0x1d2a27[_0xf5d1('0x8')](_0xf5d1('0x9'),new AGIError(_0xf5d1('0x12'),_0x23ab83));_0x38ef80[_0xf5d1('0x13')]();}else{var _0x237e6e=new AGIChannel(_0x38ef80);_0x237e6e['on'](_0xf5d1('0x14'),function(){_0x1d2a27[_0xf5d1('0x8')](_0xf5d1('0xe'),_0x237e6e);});}});});_0x568b7['on'](_0xf5d1('0x9'),function(_0x22ace3){_0x1d2a27[_0xf5d1('0x8')](_0xf5d1('0x9'),new AGIError(_0xf5d1('0x10'),_0x22ace3[_0xf5d1('0x15')]));});_0x568b7['on'](_0xf5d1('0x16'),function(){_0x1d2a27['emit'](_0xf5d1('0x16'),new AGIError(_0xf5d1('0x17')));});}process[_0xf5d1('0x18')](function(){_0xb7b822();});};util[_0xf5d1('0x19')](AGIServer,EventEmitter);module['exports']=function(_0x5b764a,_0x70b030,_0x6d86ee){return new AGIServer(_0x5b764a,_0x70b030,_0x6d86ee);}; \ No newline at end of file diff --git a/server/services/agi/vertices.js b/server/services/agi/vertices.js index c68919c..8dfa1f1 100644 --- a/server/services/agi/vertices.js +++ b/server/services/agi/vertices.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc423=['no\x20key\x20configured','%s/recordings/%s','intKey','GOOGLE_ASR_%s','tildeasr','Enter\x20in\x20TILDEASR\x20(%s)\x20block','no\x20appid\x20configured','no\x20appsecret\x20configured','wav','beep','NOBEEP','recordFile','tilde\x20%s\x20file\x20created','TILDE_ASR_%s','TildeASR\x20Result\x20%s','gotoc','Enter\x20in\x20GOTO\x20(%s)\x20block','continueAt','gotoif','Enter\x20in\x20GOTOIF\x20(%s)\x20block','condition','no\x20condition\x20configured','true','false','EVAL\x20CONDITION\x20%s\x20%s','gotoiftime','interval_id','no\x20interval\x20configured','no\x20intervals\x20found','IFTIME\x20%s\x20%s','extra','Enter\x20in\x20HANGUP\x20(%s)\x20block','hangup','ispeechasr','Enter\x20in\x20ISPEECHASR\x20(%s)\x20block','ispeech\x20%s\x20file\x20created','ISPEECH_ASR_%s','ispeechtts','Enter\x20in\x20ISPEECHTTS\x20(%s)\x20block','Trying\x20ispeech\x20TTS\x20%s','unlink','login','Enter\x20in\x20LOGIN\x20(%s)\x20block','findBy','no\x20find\x20by\x20configured','FIND\x20AGENT\x20%s\x20BY\x20%s','AGENT\x20%s\x20FOUND\x20BY','success','AGENT\x20%s\x20NOT\x20FOUND\x20BY','failure','logout','Enter\x20in\x20LOGOUT\x20(%s)\x20block','math','Enter\x20in\x20MATH\x20(%s)\x20block','no\x20operation\x20configured','math\x20%s','operation','%s[%s]','Enter\x20in\x20MENU\x20(%s)\x20block','no\x20file\x20audio\x20selected','no\x20file\x20audio\x20found','getData','digit','Enter\x20in\x20NOOP\x20(%s)\x20block','output','pause_id','playback','Enter\x20in\x20PLAYBACK\x20(%s)\x20block','getSound','PLAYBACK','queue','Enter\x20in\x20QUEUE\x20(%s)\x20block','queue_id','no\x20queue\x20selected','getVoiceQueue','indexOf','XMCS-QUEUE','toLowerCase','QUEUE','macro','gosub','position','record','Enter\x20in\x20RECORD\x20(%s)\x20block','recordingFormat','%s_%s','RECORDING_SAVENAME','escape_digits','restapi','Enter\x20in\x20RESTAPI\x20(%s)\x20block','no\x20url\x20configured','restAPI','Response:','inspect','%s_STATUS_CODE','200','%s_STATUS_MESSAGE','statusMessage','Unable\x20to\x20set\x20result\x20in\x20variable\x20%s','saydigits','Enter\x20in\x20SAYDIGITS\x20(%s)\x20block','digits','saynumber','sayNumber','number','Enter\x20in\x20SAYPHONETIC\x20(%s)\x20block','sayPhonetic','Enter\x20in\x20SENDMAIL\x20(%s)\x20block','account_id','no\x20mail\x20account\x20configured','getMailAccount','Smtp','no\x20mail\x20account\x20found','\x22%s\x22\x20<%s>','email','user','service','host','port','secure','pass','template_id','sendMail\x20message','Mail\x20message\x20added\x20to\x20outgoing\x20process','sendFax','Enter\x20in\x20SENDFAX\x20(%s)\x20block','SENDFAX\x20block\x20not\x20implemented','sendSMS','Enter\x20in\x20SENDSMS\x20(%s)\x20block','sms_account_id','no\x20sms\x20account\x20found','sms_text','sendSMS\x20message','Trying\x20SendSMS\x20with\x20account\x20%s','Sms\x20message\x20added\x20to\x20outgoing\x20process','set','Enter\x20in\x20SET\x20(%s)\x20block','variable_value','start','Enter\x20in\x20START\x20(%s)\x20block','yes','Skipped\x20Answer','subproject','no\x20subproject\x20selected','project_id','no\x20subproject\x20found\x20with\x20id\x20%d','AGI','agi://%s/square,\x22%s\x22,\x22%s\x22','127.0.0.1','system','Enter\x20in\x20SYSTEM\x20(%s)\x20block','sh\x20command:\x20%s\x20result\x20on\x20variable:\x20%s','google_cloud_tts','Enter\x20in\x20Google\x20Cloud\x20TTS\x20(%s)\x20block','no\x20apiKey\x20configured','Trying\x20Google\x20Cloud\x20TTS\x20%s','Google\x20Cloud\x20TTS\x20%s\x20file\x20created','Google\x20Cloud\x20TTS\x20is\x20unreachable','tts','Enter\x20in\x20GOOGLETTS\x20(%s)\x20block','Trying\x20Google\x20TTS\x20%s','Google\x20TTS\x20%s\x20file\x20created','unpause','Enter\x20in\x20UNPAUSE\x20(%s)\x20block','Enter\x20in\x20VOICEMAIL\x20(%s)\x20block','VOICEMAIL','mailbox','vswitch','Enter\x20in\x20SWITCH\x20(%s)\x20block','no\x20variable\x20selected','path','lodash','shelljs','randomstring','mustache','request-promise','../../config/logger','../../config/environment','./scripts','/var/opt/motion2/server/files','rawHeaders','rawBody','menu','getdigits','getsecretdigits','rpc','mailRpc','prototype','getVariableById','name','catch','getVoiceQueueById','then','getSquareProject','getSquareProjectById','getSquareOdbcById','dsn','getUser','getUserById','getTrunk','getTrunkById','getSoundById','getSoundPath','save_name','getMailAccountById','sendMailMessage','getIntervals','getIntervalById','IntervalId','interval','map','Intervals','format','%s/sounds/converted/%s','getQueryOdbc','open','error','Error\x20getting\x20ODBC\x20connection\x20%s','ODBC\x20connection\x20successfully','info','Query\x20executed\x20correctly\x20%s','close','Error\x20closing\x20connection\x20to\x20odbc\x20%s','getSmsAccount','getSmsAccountById','createSmsMessage','createSquareDetailsReport','channel','label','agicommand','createSquareRecording','uniqueid','callerid','calleridname','context','extension','priority','dnid','arg_1','createSquareMessage','createCmContact','isEmpty','isNil','callback_','random','lastName','phone','callback','Callback\x20scheduled\x20at\x20','scheduledAt','getPauseById','agentPause','agent','agentUnpause','agentLogout','agentLogin','internal','shellCommand','exec','trim','replace','googleCloudTTS','apiKey','google_cloud_tts_text_type','text','languageCode','MALE','audioEncoding','MP3','googleTTS','google_tts_language','url','method','timeout','includes','PUT','toUpperCase','parse','headers','computedVariables','sync','uri','render','stringify','body','An\x20incorrect\x20formatted\x20json\x20has\x20been\x20passed\x20to\x20the\x20function','statusCode','message','options','googleDialogflow','key','dialogflow_language','googleDialogflowV2','dialogflowV2_project_id','client_email','private_key','dialogflowV2_language','sestekNDA','ispeechTTS','en-US','speed','ispeechASR','isConfigured','model','awsPolly','aws_access_key_id','aws_secret_access_key','aws_polly_voice','Amy','aws_text_type','awsLex','aws_bot_name','googleASR','tildeASR','appid','appsecret','clear','clone','hasOwnProperty','isString','replaceAllVariables','recursiveNodeIndex','isPlainObject','isArray','length','saveRestApiResult','%s.%s','setVariable','replaceObjectAllVariables','split','replaceAll','getVariable','toString','result','The\x20\x22%s\x22\x20variable\x20value\x20is:\x20%s','maxRetry','retry','mrcpsynth','noop','Executed\x20command\x20MRCPSynth\x20%s','mrcprecog','grammar','no\x20grammar\x20configured','MRCPRecog','getAndSetVariable','RECOG_CONFIDENCE()','MRCP_RECOG_CONFIDENCE','RECOG_INPUT()','RECOG_INSTANCE()','MRCP_RECOG_INSTANCE','Executed\x20command\x20MRCPRecog\x20%s','agi','Enter\x20in\x20AGI\x20(%s)\x20block','command','args','answer','Enter\x20in\x20ANSWER\x20(%s)\x20block','Wait\x20%s\x20seconds\x20before\x20answer','Enter\x20in\x20CALLBACK\x20(%s)\x20block','list_id','no\x20list\x20selected','add','delay','minutes','callback_priority','custom_app','Enter\x20in\x20CUSTOM\x20APP\x20(%s)\x20block','application','Executed\x20command\x20%s\x20%s','Enter\x20in\x20LUMENVOXTTS\x20(%s)\x20block','no\x20text\x20configured','MRCPSynth','sestektts','Enter\x20in\x20SESTEKTTS\x20(%s)\x20block','lumenvoxasr','Enter\x20in\x20LUMENVOXASR\x20(%s)\x20block','LUMENVOX_ASR_CONFIDENCE','LUMENVOX_ASR_TRANSCRIPT','LUMENVOX_ASR_INSTANCE','Enter\x20in\x20SESTEKASR\x20(%s)\x20block','SESTEK_ASR_CONFIDENCE','SESTEK_ASR_TRANSCRIPT','database','Enter\x20in\x20DATABASE\x20(%s)\x20block','odbc_id','no\x20database\x20selected','getSquareOdbc','query','variable_id','no\x20variable\x20selected\x20for\x20the\x20result','forEach','keys','%s[%s][%s]','debug','no\x20user\x20selected','sip_id','no\x20user\x20found','DIAL','SIP/%s','opts','Executed\x20command\x20%s','dialogflow','Enter\x20in\x20DIALOGFLOW\x20(%s)\x20block','bot','DIALOGFLOW_%s','speech','out','Dialogflow\x20Result\x20%s','dialogflowV2','Enter\x20in\x20DIALOGFLOW\x20V2\x20(%s)\x20block','no\x20project_id\x20configured','no\x20private_key\x20configured','no\x20anguage\x20configured','providerResponse','DialogflowV2\x20is\x20unreachable','Enter\x20in\x20SESTEKNDA\x20(%s)\x20block','no\x20ndauth\x20url\x20configured','username','no\x20password\x20configured','Trying\x20SestekNDA:\x20%s','SESTEK_NDA_%s','Sestek\x20NDA\x20%s\x20file\x20created','audiofile','streamFile','.wav','Enter\x20in\x20END\x20(%s)\x20block','ext_dial','Enter\x20in\x20EXTERNAL\x20DIAL\x20(%s)\x20block','trunk_id','no\x20trunk\x20selected','trunk_name','Enter\x20in\x20FINALLY\x20(%s)\x20block','finally','Enter\x20in\x20GETDIGITS\x20(%s)\x20block','file_id','maxdigit','test','mindigit','no\x20variable\x20found','hiddendigitsnum','generate','hiddendigitspos','first','substr','goal','Enter\x20in\x20GOAL\x20(%s)\x20block','goalname','GOAL\x20%s','awspolly','aws\x20Polly\x20%s\x20file\x20created','aws\x20Polly\x20is\x20unreachable','Enter\x20in\x20Amazon\x20Lex\x20(%s)\x20block','no\x20valid\x20credentials\x20configured','no\x20bot\x20name\x20configured','AWS_LEX_%s','amazonlex','Amazon\x20Lex\x20Result\x20%s','Amazon\x20Lex\x20is\x20unreachable','Enter\x20in\x20GOOGLEASR\x20(%s)\x20block\x20%s'];(function(_0x55bf70,_0x3147d8){var _0x5f3317=function(_0x5eff76){while(--_0x5eff76){_0x55bf70['push'](_0x55bf70['shift']());}};_0x5f3317(++_0x3147d8);}(_0xc423,0xaa));var _0x3c42=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0xc423[_0x122ef9];return _0x42fba0;};'use strict';var fs=require('fs');var path=require(_0x3c42('0x0'));var util=require('util');var _=require(_0x3c42('0x1'));var sh=require(_0x3c42('0x2'));var odbc=require('odbc')();var rs=require(_0x3c42('0x3'));var moment=require('moment');var Mustache=require(_0x3c42('0x4'));var rp=require(_0x3c42('0x5'));var logger=require(_0x3c42('0x6'))('agi');var config=require(_0x3c42('0x7'));var scripts=require(_0x3c42('0x8'));var FILES_PATH=_0x3c42('0x9');var recursiveMapAttributes=[_0x3c42('0xa'),_0x3c42('0xb')];var verticesWithRetry=[_0x3c42('0xc'),_0x3c42('0xd'),_0x3c42('0xe')];var AGIVertices=function(_0xd87527,_0x18059d,_0x24e09d){this['channel']=_0xd87527;this[_0x3c42('0xf')]=_0x18059d;this[_0x3c42('0x10')]=_0x24e09d;};AGIVertices[_0x3c42('0x11')]['getVariable']=function(_0x15101b,_0x1b731d){this[_0x3c42('0xf')][_0x3c42('0x12')](_0x15101b)['then'](function(_0x592700){_0x1b731d(null,_0x592700?_0x592700[_0x3c42('0x13')]:![]);})[_0x3c42('0x14')](function(_0x2d49b7){_0x1b731d(_0x2d49b7);});};AGIVertices[_0x3c42('0x11')]['getVoiceQueue']=function(_0x31597d,_0xa04328){this[_0x3c42('0xf')][_0x3c42('0x15')](_0x31597d)[_0x3c42('0x16')](function(_0x30a882){_0xa04328(null,_0x30a882?_0x30a882[_0x3c42('0x13')]:![]);})[_0x3c42('0x14')](function(_0x1302c4){_0xa04328(_0x1302c4);});};AGIVertices[_0x3c42('0x11')][_0x3c42('0x17')]=function(_0x28f254,_0x298e0d){this[_0x3c42('0xf')][_0x3c42('0x18')](_0x28f254)[_0x3c42('0x16')](function(_0x1c3c62){_0x298e0d(null,_0x1c3c62?_0x1c3c62[_0x3c42('0x13')]:![]);})[_0x3c42('0x14')](function(_0x4e54bc){_0x298e0d(_0x4e54bc);});};AGIVertices[_0x3c42('0x11')]['getSquareOdbc']=function(_0x224764,_0x17b017){this[_0x3c42('0xf')][_0x3c42('0x19')](_0x224764)['then'](function(_0x3ec81b){_0x17b017(null,_0x3ec81b?_0x3ec81b[_0x3c42('0x1a')]:![]);})[_0x3c42('0x14')](function(_0xc1fc9c){_0x17b017(_0xc1fc9c);});};AGIVertices[_0x3c42('0x11')][_0x3c42('0x1b')]=function(_0xcfa291,_0x4ecfdc){this[_0x3c42('0xf')][_0x3c42('0x1c')](_0xcfa291)[_0x3c42('0x16')](function(_0xc9324a){_0x4ecfdc(null,_0xc9324a?_0xc9324a[_0x3c42('0x13')]:![]);})[_0x3c42('0x14')](function(_0x10b685){_0x4ecfdc(_0x10b685);});};AGIVertices[_0x3c42('0x11')][_0x3c42('0x1d')]=function(_0x4d5f3c,_0x3de814){this[_0x3c42('0xf')][_0x3c42('0x1e')](_0x4d5f3c)[_0x3c42('0x16')](function(_0x306fe0){_0x3de814(null,_0x306fe0?_0x306fe0[_0x3c42('0x13')]:![]);})[_0x3c42('0x14')](function(_0x18f1f4){_0x3de814(_0x18f1f4);});};AGIVertices[_0x3c42('0x11')]['getSound']=function(_0xc92cfc,_0x57a934){var _0x4c1904=this;this['rpc'][_0x3c42('0x1f')](_0xc92cfc)[_0x3c42('0x16')](function(_0x5bbd93){_0x57a934(null,_0x5bbd93?_0x4c1904[_0x3c42('0x20')](_0x5bbd93[_0x3c42('0x21')]):![]);})[_0x3c42('0x14')](function(_0xa4822a){_0x57a934(_0xa4822a);});};AGIVertices[_0x3c42('0x11')]['getMailAccount']=function(_0x2277f2,_0x5d0cf7){this[_0x3c42('0xf')][_0x3c42('0x22')](_0x2277f2)['then'](function(_0x309cb8){_0x5d0cf7(null,_0x309cb8?_0x309cb8:![]);})[_0x3c42('0x14')](function(_0x1da760){_0x5d0cf7(_0x1da760);});};AGIVertices['prototype'][_0x3c42('0x23')]=function(_0x348ddb,_0x5afbe3,_0x53cd10){this[_0x3c42('0x10')]['sendMailMessage'](_0x348ddb,_0x5afbe3)['then'](function(){_0x53cd10(null);})[_0x3c42('0x14')](function(_0x2017df){_0x53cd10(_0x2017df);});};AGIVertices[_0x3c42('0x11')][_0x3c42('0x24')]=function(_0x3369dd,_0x5e5921){this[_0x3c42('0xf')][_0x3c42('0x25')](_0x3369dd)[_0x3c42('0x16')](function(_0x48c430){if(_0x48c430){if(_0x48c430[_0x3c42('0x26')]){_0x5e5921(null,[_0x48c430[_0x3c42('0x27')]]);}else{_0x5e5921(null,_[_0x3c42('0x28')](_0x48c430[_0x3c42('0x29')],_0x3c42('0x27')));}}else{_0x5e5921(null,![]);}})[_0x3c42('0x14')](function(_0x426001){_0x5e5921(_0x426001);});};AGIVertices[_0x3c42('0x11')][_0x3c42('0x20')]=function(_0x2abedc){return util[_0x3c42('0x2a')](_0x3c42('0x2b'),FILES_PATH,_0x2abedc);};AGIVertices['prototype'][_0x3c42('0x2c')]=function(_0x519e30,_0x38ad92,_0x57ce15){odbc[_0x3c42('0x2d')](_0x519e30,function(_0x4f4cc4){if(_0x4f4cc4){logger[_0x3c42('0x2e')](_0x3c42('0x2f'),_0x4f4cc4);_0x57ce15(_0x4f4cc4);}else{logger['info'](_0x3c42('0x30'));odbc['query'](_0x38ad92,function(_0x2c66e8,_0x1a688f){if(_0x2c66e8){logger[_0x3c42('0x31')]('Error\x20executing\x20query\x20%s',_0x38ad92);_0x57ce15(_0x2c66e8);}else{logger[_0x3c42('0x31')](_0x3c42('0x32'),_0x38ad92);odbc[_0x3c42('0x33')](function(_0x274a0e){if(_0x274a0e){logger[_0x3c42('0x2e')](_0x3c42('0x34'),_0x274a0e);}_0x57ce15(null,_0x1a688f);});}});}});};AGIVertices[_0x3c42('0x11')][_0x3c42('0x35')]=function(_0x4fdb5d,_0x280676){this[_0x3c42('0xf')][_0x3c42('0x36')](_0x4fdb5d)[_0x3c42('0x16')](function(_0x3eec6c){_0x280676(null,_0x3eec6c?_0x3eec6c:![]);})['catch'](function(_0x385308){_0x280676(_0x385308);});};AGIVertices[_0x3c42('0x11')][_0x3c42('0x37')]=function(_0xd24e55,_0x3f970d){this['rpc']['createSmsMessage'](_0xd24e55)['then'](function(_0x3d9b38){_0x3f970d(null,_0x3d9b38);})[_0x3c42('0x14')](function(_0x512933){_0x3f970d(_0x512933);});};AGIVertices['prototype']['createSquareDetailsReport']=function(_0x223846,_0x4b0b17,_0x50d4d7){this[_0x3c42('0xf')][_0x3c42('0x38')]({'uniqueid':this[_0x3c42('0x39')]['uniqueid'],'node':_0x223846[_0x3c42('0x3a')],'application':_0x223846[_0x3c42('0x3b')],'data':_0x4b0b17||null,'project_name':this[_0x3c42('0x39')]['arg_1'],'callerid':this['channel']['callerid']})[_0x3c42('0x16')](function(_0x26b4ef){if(_0x50d4d7){_0x50d4d7(null,_0x26b4ef);}})['catch'](function(_0x21a1c1){if(_0x50d4d7){_0x50d4d7(_0x21a1c1);}});};AGIVertices[_0x3c42('0x11')]['createSquareRecording']=function(_0x31067a,_0x22e648,_0x8ad48c,_0x19fbc3){this[_0x3c42('0xf')][_0x3c42('0x3c')]({'uniqueid':this[_0x3c42('0x39')][_0x3c42('0x3d')],'callerid':this[_0x3c42('0x39')][_0x3c42('0x3e')],'calleridname':this['channel'][_0x3c42('0x3f')],'context':this[_0x3c42('0x39')][_0x3c42('0x40')],'extension':this['channel'][_0x3c42('0x41')],'priority':this[_0x3c42('0x39')][_0x3c42('0x42')],'accountcode':this[_0x3c42('0x39')]['accountcode'],'dnid':this[_0x3c42('0x39')][_0x3c42('0x43')],'projectName':this[_0x3c42('0x39')][_0x3c42('0x44')],'saveName':_0x22e648,'filename':_0x31067a['file']||_0x22e648,'savePath':_0x8ad48c})[_0x3c42('0x16')](function(_0x33678e){_0x19fbc3(null,_0x33678e);})[_0x3c42('0x14')](function(_0x183aee){_0x19fbc3(_0x183aee);});};AGIVertices[_0x3c42('0x11')][_0x3c42('0x45')]=function(_0x29ffc9,_0x533e09,_0x3b1941,_0x3de492,_0x4a8543){this[_0x3c42('0xf')][_0x3c42('0x45')]({'uniqueid':this[_0x3c42('0x39')][_0x3c42('0x3d')],'body':_0x29ffc9,'direction':_0x533e09,'providerName':_0x3b1941,'providerResponse':_0x3de492})[_0x3c42('0x16')](function(_0x1c58ca){if(_0x4a8543){_0x4a8543(null,_0x1c58ca);}})[_0x3c42('0x14')](function(_0x599f42){if(_0x4a8543){_0x4a8543(_0x599f42);}});};AGIVertices[_0x3c42('0x11')][_0x3c42('0x46')]=function(_0x54048e,_0x46aa0b){this[_0x3c42('0xf')][_0x3c42('0x46')]({'firstName':_[_0x3c42('0x47')](_0x54048e['name'])||_[_0x3c42('0x48')](_0x54048e[_0x3c42('0x13')])?_0x3c42('0x49')+Math[_0x3c42('0x4a')]():_0x54048e['name'],'lastName':_[_0x3c42('0x47')](_0x54048e[_0x3c42('0x4b')])||_[_0x3c42('0x48')](_0x54048e[_0x3c42('0x4b')])?null:_0x54048e[_0x3c42('0x4b')],'phone':_0x54048e[_0x3c42('0x4c')],'ListId':_0x54048e['list_id'],'scheduledat':_0x54048e['scheduledAt'],'callbackUniqueid':this[_0x3c42('0x39')][_0x3c42('0x3d')],'tags':_0x3c42('0x4d'),'description':_0x3c42('0x4e')+_0x54048e[_0x3c42('0x4f')]['toString'](),'priority':_0x54048e['callback_priority']})[_0x3c42('0x16')](function(_0x1bf1d2){_0x46aa0b(null,_0x1bf1d2);})['catch'](function(_0x14716a){_0x46aa0b(_0x14716a);});};AGIVertices[_0x3c42('0x11')]['getPause']=function(_0x278e86,_0x2544e8){this['rpc'][_0x3c42('0x50')](_0x278e86)[_0x3c42('0x16')](function(_0x37f78c){_0x2544e8(null,_0x37f78c?_0x37f78c[_0x3c42('0x13')]:![]);})[_0x3c42('0x14')](function(_0x32fd0f){_0x2544e8(_0x32fd0f);});};AGIVertices[_0x3c42('0x11')][_0x3c42('0x51')]=function(_0x34a941,_0x4a7030,_0x43146e){var _0x2b7303={'role':_0x3c42('0x52')};_0x2b7303[_0x34a941]=this[_0x3c42('0x39')][_0x3c42('0x3e')];this[_0x3c42('0xf')]['agentPause'](_0x2b7303,_0x4a7030,this[_0x3c42('0x39')]['uniqueid'])[_0x3c42('0x16')](function(_0x1941a5){_0x43146e(null,_[_0x3c42('0x48')](_0x1941a5)?![]:!![]);})[_0x3c42('0x14')](function(_0x1ea785){logger[_0x3c42('0x2e')](_0x1ea785);_0x43146e(null,![]);});};AGIVertices[_0x3c42('0x11')]['agentUnpause']=function(_0x3918ab,_0x865356){var _0x4a2955={'role':_0x3c42('0x52')};_0x4a2955[_0x3918ab]=this[_0x3c42('0x39')][_0x3c42('0x3e')];this[_0x3c42('0xf')][_0x3c42('0x53')](_0x4a2955)[_0x3c42('0x16')](function(_0x3b0686){_0x865356(null,_['isNil'](_0x3b0686)?![]:!![]);})[_0x3c42('0x14')](function(_0x4a3d29){logger['error'](_0x4a3d29);_0x865356(null,![]);});};AGIVertices[_0x3c42('0x11')][_0x3c42('0x54')]=function(_0x2a1f67,_0x126733){var _0x175d6b={'role':_0x3c42('0x52')};_0x175d6b[_0x2a1f67]=this[_0x3c42('0x39')][_0x3c42('0x3e')];this[_0x3c42('0xf')]['agentLogout'](_0x175d6b)[_0x3c42('0x16')](function(_0x41dea9){_0x126733(null,_['isNil'](_0x41dea9)?![]:!![]);})[_0x3c42('0x14')](function(_0x59f758){logger[_0x3c42('0x2e')](_0x59f758);_0x126733(null,![]);});};AGIVertices[_0x3c42('0x11')][_0x3c42('0x55')]=function(_0x227b0c,_0x2a56ef){var _0x5e1f4c={'role':_0x3c42('0x52')};_0x5e1f4c[_0x227b0c]=this['channel'][_0x3c42('0x3e')];var _0x11a2c9=_0x227b0c!=_0x3c42('0x56')?util['format']('%s/%s@from-sip/n','LOCAL',this['channel'][_0x3c42('0x3e')]):undefined;this[_0x3c42('0xf')][_0x3c42('0x55')](_0x5e1f4c,_0x11a2c9)[_0x3c42('0x16')](function(_0x19c59d){_0x2a56ef(null,_['isNil'](_0x19c59d)?![]:!![]);})[_0x3c42('0x14')](function(_0x42d25b){logger[_0x3c42('0x2e')](_0x42d25b);_0x2a56ef(null,![]);});};AGIVertices[_0x3c42('0x11')][_0x3c42('0x57')]=function(_0x3873ce,_0x519c8f){sh[_0x3c42('0x58')](_[_0x3c42('0x59')](_0x3873ce),function(_0x1d7520,_0x58d52a){var _0x43d740=_0x58d52a[_0x3c42('0x5a')](/(\r\n|\n|\r)/gm,'');_0x519c8f(null,_0x43d740);});};AGIVertices[_0x3c42('0x11')][_0x3c42('0x5b')]=function(_0x1d4e4c,_0x17ba62){scripts[_0x3c42('0x5b')](_0x1d4e4c[_0x3c42('0x5c')],_0x1d4e4c[_0x3c42('0x5d')]||_0x3c42('0x5e'),_0x1d4e4c[_0x3c42('0x5e')],_0x1d4e4c[_0x3c42('0x5f')]||'en-US',_0x1d4e4c['ssmlGender']||_0x3c42('0x60'),_0x1d4e4c[_0x3c42('0x61')]||_0x3c42('0x62'))[_0x3c42('0x16')](function(_0x497768){_0x17ba62(null,_0x497768);})[_0x3c42('0x14')](function(_0x4849b5){_0x17ba62(_0x4849b5);});};AGIVertices['prototype'][_0x3c42('0x63')]=function(_0x47deb1,_0x1dc614){scripts[_0x3c42('0x63')](_0x47deb1[_0x3c42('0x5e')],_0x47deb1[_0x3c42('0x64')]||'en',0x1)[_0x3c42('0x16')](function(_0xab10bd){_0x1dc614(null,_0xab10bd);})[_0x3c42('0x14')](function(_0x47b68b){_0x1dc614(_0x47b68b);});};AGIVertices[_0x3c42('0x11')]['restAPI']=function(_0x455706,_0x27a7a5){var _0x5c94fc={'uri':_0x455706[_0x3c42('0x65')],'method':_0x455706[_0x3c42('0x66')],'json':!![],'resolveWithFullResponse':!![],'strictSSL':![],'timeout':typeof parseInt(_0x455706['timeout'])==='number'&&parseInt(_0x455706[_0x3c42('0x67')])>=0x1?parseInt(_0x455706[_0x3c42('0x67')])*0x3e8:0x5*0x3e8};if(_[_0x3c42('0x68')](['POST',_0x3c42('0x69')],_0x5c94fc[_0x3c42('0x66')][_0x3c42('0x6a')]())){try{_0x5c94fc['body']=_0x455706['rawBody']?JSON[_0x3c42('0x6b')](_0x455706[_0x3c42('0xb')]):{};}catch(_0x51690f){logger[_0x3c42('0x2e')]('An\x20incorrect\x20formatted\x20json\x20body\x20has\x20been\x20passed\x20to\x20the\x20function',_0x51690f);}}try{_0x5c94fc[_0x3c42('0x6c')]=_0x455706[_0x3c42('0xa')]?JSON[_0x3c42('0x6b')](_0x455706[_0x3c42('0xa')]):{};}catch(_0x39399f){logger[_0x3c42('0x2e')]('An\x20incorrect\x20formatted\x20json\x20headers\x20has\x20been\x20passed\x20to\x20the\x20function',_0x39399f);}if(_0x455706[_0x3c42('0x6d')]){try{var _0x157fd5=require(_0x455706[_0x3c42('0x6d')])[_0x3c42('0x6e')](this,_0x5c94fc);_0x5c94fc[_0x3c42('0x6f')]=Mustache[_0x3c42('0x70')](_0x455706[_0x3c42('0x65')],_0x157fd5,{},['$$','$$']);if(_0x5c94fc[_0x3c42('0x6c')]){_0x5c94fc[_0x3c42('0x6c')]=JSON[_0x3c42('0x6b')](Mustache[_0x3c42('0x70')](JSON[_0x3c42('0x71')](_0x5c94fc[_0x3c42('0x6c')]),_0x157fd5,{},['$$','$$']));}if(_0x5c94fc[_0x3c42('0x72')]){_0x5c94fc[_0x3c42('0x72')]=JSON[_0x3c42('0x6b')](Mustache[_0x3c42('0x70')](JSON[_0x3c42('0x71')](_0x5c94fc['body']),_0x157fd5,{},['$$','$$']));}}catch(_0x2fc3ff){logger[_0x3c42('0x2e')](_0x3c42('0x73'),_0x2fc3ff);}}rp(_0x5c94fc)[_0x3c42('0x16')](function(_0x3bb38a){var _0x224a92={'statusCode':_0x3bb38a[_0x3c42('0x74')]||0xc8,'statusMessage':_0x3bb38a['statusMessage']||'OK','headers':_0x3bb38a[_0x3c42('0x6c')]||{},'body':_0x3bb38a[_0x3c42('0x72')]||{}};_0x27a7a5(null,_0x224a92);})['catch'](function(_0x37be07){var _0x39dbfb={'statusCode':_0x37be07[_0x3c42('0x74')]||0x1f4,'statusMessage':_0x37be07[_0x3c42('0x75')]||'500\x20-\x20Internal\x20Server\x20Error','headers':_0x37be07[_0x3c42('0x76')]['headers']||{},'body':_0x37be07[_0x3c42('0x76')][_0x3c42('0x72')]||{}};_0x27a7a5(null,_0x39dbfb);});};AGIVertices[_0x3c42('0x11')][_0x3c42('0x77')]=function(_0x59ca6d,_0x559b47){scripts['googleDialogflow'](this['channel']['uniqueid'],_0x59ca6d[_0x3c42('0x78')],_0x59ca6d['text'],_0x59ca6d[_0x3c42('0x79')]||'en')['then'](function(_0x420f60){_0x559b47(null,_0x420f60);})['catch'](function(_0x44f4aa){_0x559b47(_0x44f4aa);});};AGIVertices[_0x3c42('0x11')][_0x3c42('0x7a')]=function(_0x1d98f5,_0xe8d822){scripts[_0x3c42('0x7a')](this[_0x3c42('0x39')]['uniqueid'],_0x1d98f5[_0x3c42('0x7b')],_0x1d98f5[_0x3c42('0x7c')],_0x1d98f5[_0x3c42('0x7d')],_0x1d98f5[_0x3c42('0x5e')],_0x1d98f5[_0x3c42('0x7e')]||'en')['then'](function(_0x48349b){_0xe8d822(null,_0x48349b);})['catch'](function(_0x5e9ef0){_0xe8d822(_0x5e9ef0);});};AGIVertices[_0x3c42('0x11')][_0x3c42('0x7f')]=function(_0x38ba5a,_0x535c89){scripts[_0x3c42('0x7f')](this[_0x3c42('0x39')],_0x38ba5a)['then'](function(_0x2eab79){_0x535c89(null,_0x2eab79);})[_0x3c42('0x14')](function(_0x25a70d){_0x535c89(_0x25a70d);});};AGIVertices['prototype'][_0x3c42('0x80')]=function(_0x408b6b,_0x76f9ae){scripts[_0x3c42('0x80')](_0x408b6b['key'],_0x408b6b[_0x3c42('0x5e')],_0x408b6b['ispeech_tts_language']||_0x3c42('0x81'),_0x408b6b[_0x3c42('0x82')])[_0x3c42('0x16')](function(_0x33a315){_0x76f9ae(null,_0x33a315);})['catch'](function(_0x1a4c4a){_0x76f9ae(_0x1a4c4a);});};AGIVertices[_0x3c42('0x11')][_0x3c42('0x83')]=function(_0x169f94,_0x1d2b6e,_0xc30775){scripts[_0x3c42('0x83')](_0x1d2b6e,_0x169f94[_0x3c42('0x78')],_0x169f94['ispeech_asr_language']||_0x3c42('0x81'),this[_0x3c42('0x84')](_0x169f94[_0x3c42('0x85')])?_0x169f94[_0x3c42('0x85')]:undefined)[_0x3c42('0x16')](function(_0x2754ee){_0xc30775(null,_0x2754ee);})[_0x3c42('0x14')](function(_0x32fbd4){_0xc30775(_0x32fbd4);});};AGIVertices[_0x3c42('0x11')][_0x3c42('0x86')]=function(_0x23f5c3,_0x333af6){scripts[_0x3c42('0x86')](_0x23f5c3[_0x3c42('0x87')],_0x23f5c3[_0x3c42('0x88')],_0x23f5c3['aws_polly_region'],_0x23f5c3[_0x3c42('0x89')]||_0x3c42('0x8a'),_0x23f5c3[_0x3c42('0x5e')],_0x23f5c3[_0x3c42('0x8b')]||_0x3c42('0x5e'))[_0x3c42('0x16')](function(_0x2bf6d4){_0x333af6(null,_0x2bf6d4);})[_0x3c42('0x14')](function(_0x2a2b8f){_0x333af6(_0x2a2b8f);});};AGIVertices[_0x3c42('0x11')][_0x3c42('0x8c')]=function(_0x12d477,_0x42883c){scripts['awsLex'](this[_0x3c42('0x39')]['uniqueid'],_0x12d477[_0x3c42('0x87')],_0x12d477['aws_secret_access_key'],_0x12d477['aws_lex_region'],_0x12d477[_0x3c42('0x5e')],_0x12d477[_0x3c42('0x8d')])['then'](function(_0x146bab){_0x42883c(null,_0x146bab);})['catch'](function(_0x27b47f){_0x42883c(_0x27b47f);});};AGIVertices[_0x3c42('0x11')]['googleASR']=function(_0x18af5d,_0x3e1506,_0x42a3c3){scripts[_0x3c42('0x8e')](_0x3e1506,_0x18af5d[_0x3c42('0x78')],_0x18af5d['google_asr_language']||_0x3c42('0x81'))['then'](function(_0x3e1858){_0x42a3c3(null,_0x3e1858);})[_0x3c42('0x14')](function(_0x175c7b){_0x42a3c3(_0x175c7b);});};AGIVertices[_0x3c42('0x11')][_0x3c42('0x8f')]=function(_0x5344c2,_0xfead9,_0x148fef){scripts[_0x3c42('0x8f')](_0xfead9,_0x5344c2[_0x3c42('0x90')],_0x5344c2[_0x3c42('0x91')],_0x5344c2['uri'])[_0x3c42('0x16')](function(_0xb37d0a){_0x148fef(null,_0xb37d0a);})[_0x3c42('0x14')](function(_0x15b54c){_0x148fef(_0x15b54c);});};AGIVertices[_0x3c42('0x11')][_0x3c42('0x92')]=function(_0x57df5b){var _0x2bb08f=_[_0x3c42('0x68')](verticesWithRetry,_0x57df5b[_0x3c42('0x3b')])?_0x57df5b:_[_0x3c42('0x93')](_0x57df5b);for(var _0x1595e1 in _0x2bb08f){if(_0x2bb08f[_0x3c42('0x94')](_0x1595e1)){if(_0x2bb08f[_0x1595e1]&&_[_0x3c42('0x95')](_0x2bb08f[_0x1595e1])){if(_[_0x3c42('0x68')](recursiveMapAttributes,_0x1595e1)){_0x2bb08f[_0x1595e1]=this['replaceObjectAllVariables'](_0x2bb08f[_0x1595e1]);}else{_0x2bb08f[_0x1595e1]=this[_0x3c42('0x96')](_0x2bb08f[_0x1595e1]);}}}}return _0x2bb08f;};AGIVertices['prototype'][_0x3c42('0x97')]=function(_0x307a52){for(var _0x299306 in _0x307a52){if(_0x307a52[_0x3c42('0x94')](_0x299306)){if(_[_0x3c42('0x98')](_0x307a52[_0x299306])){this[_0x3c42('0x97')](_0x307a52[_0x299306]);}else if(_[_0x3c42('0x99')](_0x307a52[_0x299306])){for(var _0x20e403=0x0;_0x20e403<_0x307a52[_0x299306]['length'];_0x20e403++){this[_0x3c42('0x97')](_0x307a52[_0x299306][_0x20e403]);}}else if(_[_0x3c42('0x95')](_0x307a52[_0x299306])){_0x307a52[_0x299306]=this[_0x3c42('0x96')](_0x307a52[_0x299306]);}}}};AGIVertices['prototype']['saveRestApiResult']=function(_0x50b6f1,_0x55963e){for(var _0x335f49 in _0x50b6f1){if(_0x50b6f1['hasOwnProperty'](_0x335f49)){if(_['isPlainObject'](_0x50b6f1[_0x335f49])){if(!_['isEmpty'](_0x50b6f1[_0x335f49])){this['saveRestApiResult'](_0x50b6f1[_0x335f49],util[_0x3c42('0x2a')]('%s.%s',_0x55963e,_0x335f49));}}else if(_['isArray'](_0x50b6f1[_0x335f49])){for(var _0x44eb53=0x0;_0x44eb53<_0x50b6f1[_0x335f49][_0x3c42('0x9a')];_0x44eb53++){this[_0x3c42('0x9b')](_0x50b6f1[_0x335f49][_0x44eb53],util[_0x3c42('0x2a')](_0x3c42('0x9c'),_0x55963e,_0x335f49+'['+_0x44eb53+']'));}}else{if(!_[_0x3c42('0x48')](_0x50b6f1[_0x335f49])){this[_0x3c42('0x39')][_0x3c42('0x9d')](util['format'](_0x3c42('0x9c'),_0x55963e,_0x335f49),_0x50b6f1[_0x335f49]);}}}}};AGIVertices[_0x3c42('0x11')][_0x3c42('0x9e')]=function(_0x1d3b53){try{var _0x48968f=JSON['parse'](_0x1d3b53);this[_0x3c42('0x97')](_0x48968f);return JSON[_0x3c42('0x71')](_0x48968f);}catch(_0x546ffd){return this[_0x3c42('0x96')](_0x1d3b53);}};AGIVertices[_0x3c42('0x11')][_0x3c42('0x96')]=function(_0x3b40dc){var _0x5e0111=_0x3b40dc['split']('{');for(var _0xe087c6=0x1;_0xe087c6<_0x5e0111[_0x3c42('0x9a')];_0xe087c6+=0x1){var _0x125139=_0x5e0111[_0xe087c6][_0x3c42('0x9f')]('}');if(_0x125139[_0x3c42('0x9a')]>0x1){_0x3b40dc=_0x3b40dc[_0x3c42('0xa0')]('{'+_0x125139[0x0]+'}',this[_0x3c42('0x39')][_0x3c42('0xa1')](_0x125139[0x0])['extra']||_0x125139[0x0]);}}if(_0x5e0111[_0x3c42('0x9a')]===0x1){return _0x3b40dc[_0x3c42('0xa2')]();}return this[_0x3c42('0x96')](_0x3b40dc);};AGIVertices[_0x3c42('0x11')]['getAndSetVariable']=function(_0x47559b,_0x1f84b0){var _0x17c0bb=this[_0x3c42('0x39')]['getVariable'](_0x47559b);if(_0x17c0bb[_0x3c42('0xa3')]===-0x1){return _0x17c0bb;}logger[_0x3c42('0x31')](util['format'](_0x3c42('0xa4'),_0x1f84b0,_0x17c0bb['extra']));return this[_0x3c42('0x39')]['setVariable'](_0x1f84b0,_0x17c0bb['extra']);};AGIVertices[_0x3c42('0x11')][_0x3c42('0x84')]=function(_0x3ada2c){return _0x3ada2c&&_0x3ada2c!=='0'&&_0x3ada2c!=='-1'&&_0x3ada2c!=='';};AGIVertices[_0x3c42('0x11')][_0x3c42('0xa5')]=function(_0x5cf96c){this['createSquareDetailsReport'][_0x3c42('0x6e')](this,_0x5cf96c,'-');_0x5cf96c[_0x3c42('0xa6')]=_0x5cf96c[_0x3c42('0xa5')];return{'code':0xc8,'result':'-'};};AGIVertices[_0x3c42('0x11')][_0x3c42('0xa7')]=function(_0x4bf1d0){logger['info'](util[_0x3c42('0x2a')]('Enter\x20in\x20MRCPSynth\x20(%s)\x20block',_0x4bf1d0['label']));if(!this['isConfigured'](_0x4bf1d0[_0x3c42('0x5e')])){return this['channel'][_0x3c42('0xa8')]('no\x20text\x20configured');}var _0x1f65d5='\x22'+_0x4bf1d0[_0x3c42('0x5e')]+'\x22';if(this['isConfigured'](_0x4bf1d0[_0x3c42('0x76')])){_0x1f65d5+=','+_0x4bf1d0[_0x3c42('0x76')];}var _0x4416af=this[_0x3c42('0x39')][_0x3c42('0x58')]('MRCPSynth',_0x1f65d5);if(_0x4416af[_0x3c42('0xa3')]===-0x1){return _0x4416af;}return this[_0x3c42('0x39')][_0x3c42('0xa8')](util[_0x3c42('0x2a')](_0x3c42('0xa9'),_0x1f65d5));};AGIVertices[_0x3c42('0x11')][_0x3c42('0xaa')]=function(_0x143f1c){logger[_0x3c42('0x31')](util[_0x3c42('0x2a')]('Enter\x20in\x20MRCPRecog\x20(%s)\x20block',_0x143f1c[_0x3c42('0x3a')]));if(!this['isConfigured'](_0x143f1c[_0x3c42('0xab')])){return this[_0x3c42('0x39')]['noop'](_0x3c42('0xac'));}var _0xab162=_0x143f1c[_0x3c42('0xab')];if(this[_0x3c42('0x84')](_0x143f1c[_0x3c42('0x76')])){_0xab162+=','+_0x143f1c[_0x3c42('0x76')];}var _0x5279dc=this[_0x3c42('0x39')][_0x3c42('0x58')](_0x3c42('0xad'),_0xab162);if(_0x5279dc[_0x3c42('0xa3')]===-0x1){return _0x5279dc;}var _0x106c6b=this[_0x3c42('0xae')](_0x3c42('0xaf'),_0x3c42('0xb0'));if(_0x106c6b[_0x3c42('0xa3')]===-0x1){return _0x106c6b;}var _0x341550=this[_0x3c42('0xae')](_0x3c42('0xb1'),'MRCP_RECOG_TRANSCRIPT');if(_0x341550[_0x3c42('0xa3')]===-0x1){return _0x341550;}var _0x404dab=this[_0x3c42('0xae')](_0x3c42('0xb2'),_0x3c42('0xb3'));if(_0x404dab[_0x3c42('0xa3')]===-0x1){return _0x404dab;}return this[_0x3c42('0x39')][_0x3c42('0xa8')](util[_0x3c42('0x2a')](_0x3c42('0xb4'),_0xab162));};AGIVertices[_0x3c42('0x11')][_0x3c42('0xb5')]=function(_0x29ee8e){logger[_0x3c42('0x31')](util[_0x3c42('0x2a')](_0x3c42('0xb6'),_0x29ee8e[_0x3c42('0x3a')]));return this[_0x3c42('0x39')][_0x3c42('0xb5')]([_0x29ee8e[_0x3c42('0xb7')],_0x29ee8e[_0x3c42('0xb8')]]);};AGIVertices['prototype'][_0x3c42('0xb9')]=function(_0x4db52d){logger[_0x3c42('0x31')](util[_0x3c42('0x2a')](_0x3c42('0xba'),_0x4db52d[_0x3c42('0x3a')]));if(this[_0x3c42('0x84')](_0x4db52d['timeout'])){logger['info'](util[_0x3c42('0x2a')](_0x3c42('0xbb'),_0x4db52d[_0x3c42('0x67')]));var _0x35775c=this['channel']['wait'](_0x4db52d['timeout']);if(_0x35775c[_0x3c42('0xa3')]===-0x1){return _0x35775c;}}return this['channel']['answer']();};AGIVertices['prototype']['callback']=function(_0x552b4){logger[_0x3c42('0x31')](util[_0x3c42('0x2a')](_0x3c42('0xbc'),_0x552b4['label']));if(!this[_0x3c42('0x84')](_0x552b4[_0x3c42('0xbd')])){return this[_0x3c42('0x39')]['error'](_0x552b4,_0x3c42('0xbe'));}_0x552b4['scheduledAt']=moment();if(this['isConfigured'](_0x552b4['delay'])){_0x552b4[_0x3c42('0x4f')]=moment()[_0x3c42('0xbf')](_0x552b4[_0x3c42('0xc0')],_0x3c42('0xc1'));}if(!this['isConfigured'](_0x552b4['callback_priority'])){_0x552b4[_0x3c42('0xc2')]=0x2;}this[_0x3c42('0x46')][_0x3c42('0x6e')](this,_0x552b4);return this['channel'][_0x3c42('0xa8')](util[_0x3c42('0x2a')]('CALLBACK\x20added\x20phone:\x20%s\x20on\x20list:\x20%s\x20at\x20%s',_0x552b4[_0x3c42('0x4c')],_0x552b4[_0x3c42('0xbd')],_0x552b4[_0x3c42('0x4f')]));};AGIVertices[_0x3c42('0x11')][_0x3c42('0xc3')]=function(_0x3ba3c3){logger[_0x3c42('0x31')](util[_0x3c42('0x2a')](_0x3c42('0xc4'),_0x3ba3c3[_0x3c42('0x3a')]));var _0x4d807b=this[_0x3c42('0x39')][_0x3c42('0x58')](_0x3ba3c3[_0x3c42('0xc5')],_0x3ba3c3[_0x3c42('0x76')]);if(_0x4d807b['result']===-0x1){return _0x4d807b;}return this[_0x3c42('0x39')]['noop'](util[_0x3c42('0x2a')](_0x3c42('0xc6'),_0x3ba3c3[_0x3c42('0xc5')],_0x3ba3c3[_0x3c42('0x76')]));};AGIVertices[_0x3c42('0x11')]['lumenvoxtts']=function(_0x37e7dc){logger[_0x3c42('0x31')](util[_0x3c42('0x2a')](_0x3c42('0xc7'),_0x37e7dc[_0x3c42('0x3a')]));if(!this['isConfigured'](_0x37e7dc[_0x3c42('0x5e')])){return this['channel'][_0x3c42('0xa8')](_0x3c42('0xc8'));}var _0x8419d4='\x22'+_0x37e7dc['text']+'\x22';if(this[_0x3c42('0x84')](_0x37e7dc[_0x3c42('0x76')])){_0x8419d4+=','+_0x37e7dc[_0x3c42('0x76')];}var _0x334131=this[_0x3c42('0x39')][_0x3c42('0x58')](_0x3c42('0xc9'),_0x8419d4);if(_0x334131[_0x3c42('0xa3')]===-0x1){return _0x334131;}return this[_0x3c42('0x39')][_0x3c42('0xa8')](util[_0x3c42('0x2a')](_0x3c42('0xa9'),_0x8419d4));};AGIVertices[_0x3c42('0x11')][_0x3c42('0xca')]=function(_0x4adf1b){logger[_0x3c42('0x31')](util[_0x3c42('0x2a')](_0x3c42('0xcb'),_0x4adf1b[_0x3c42('0x3a')]));if(!this[_0x3c42('0x84')](_0x4adf1b[_0x3c42('0x5e')])){return this[_0x3c42('0x39')][_0x3c42('0xa8')](_0x3c42('0xc8'));}var _0x28cd4e='\x22'+_0x4adf1b[_0x3c42('0x5e')]+'\x22';if(this['isConfigured'](_0x4adf1b[_0x3c42('0x76')])){_0x28cd4e+=','+_0x4adf1b[_0x3c42('0x76')];}var _0x583b9f=this[_0x3c42('0x39')][_0x3c42('0x58')](_0x3c42('0xc9'),_0x28cd4e);if(_0x583b9f[_0x3c42('0xa3')]===-0x1){return _0x583b9f;}return this[_0x3c42('0x39')][_0x3c42('0xa8')](util[_0x3c42('0x2a')](_0x3c42('0xa9'),_0x28cd4e));};AGIVertices[_0x3c42('0x11')][_0x3c42('0xcc')]=function(_0x189ccf){logger[_0x3c42('0x31')](util[_0x3c42('0x2a')](_0x3c42('0xcd'),_0x189ccf[_0x3c42('0x3a')]));if(!this[_0x3c42('0x84')](_0x189ccf[_0x3c42('0xab')])){return this[_0x3c42('0x39')][_0x3c42('0xa8')](_0x3c42('0xac'));}var _0x5dbad5=_0x189ccf[_0x3c42('0xab')];if(this['isConfigured'](_0x189ccf[_0x3c42('0x76')])){_0x5dbad5+=','+_0x189ccf[_0x3c42('0x76')];}var _0x4aacfb=this[_0x3c42('0x39')][_0x3c42('0x58')]('MRCPRecog',_0x5dbad5);if(_0x4aacfb[_0x3c42('0xa3')]===-0x1){return _0x4aacfb;}var _0xc3684c=this[_0x3c42('0xae')]('RECOG_CONFIDENCE()',_0x3c42('0xce'));if(_0xc3684c[_0x3c42('0xa3')]===-0x1){return _0xc3684c;}var _0x5435be=this[_0x3c42('0xae')](_0x3c42('0xb1'),_0x3c42('0xcf'));if(_0x5435be[_0x3c42('0xa3')]===-0x1){return _0x5435be;}var _0x27e249=this['getAndSetVariable'](_0x3c42('0xb2'),_0x3c42('0xd0'));if(_0x27e249[_0x3c42('0xa3')]===-0x1){return _0x27e249;}return this[_0x3c42('0x39')][_0x3c42('0xa8')](util[_0x3c42('0x2a')](_0x3c42('0xb4'),_0x5dbad5));};AGIVertices[_0x3c42('0x11')]['sestekasr']=function(_0x431d94){logger['info'](util[_0x3c42('0x2a')](_0x3c42('0xd1'),_0x431d94[_0x3c42('0x3a')]));if(!this[_0x3c42('0x84')](_0x431d94[_0x3c42('0xab')])){return this[_0x3c42('0x39')][_0x3c42('0xa8')](_0x3c42('0xac'));}var _0x2f7775=_0x431d94['grammar'];if(this[_0x3c42('0x84')](_0x431d94[_0x3c42('0x76')])){_0x2f7775+=','+_0x431d94[_0x3c42('0x76')];}var _0x42e642=this[_0x3c42('0x39')][_0x3c42('0x58')]('MRCPRecog',_0x2f7775);if(_0x42e642['result']===-0x1){return _0x42e642;}var _0x3263ff=this[_0x3c42('0xae')](_0x3c42('0xaf'),_0x3c42('0xd2'));if(_0x3263ff[_0x3c42('0xa3')]===-0x1){return _0x3263ff;}var _0x17fea4=this['getAndSetVariable']('RECOG_INPUT()',_0x3c42('0xd3'));if(_0x17fea4['result']===-0x1){return _0x17fea4;}var _0x525a3c=this['getAndSetVariable'](_0x3c42('0xb2'),'SESTEK_ASR_INSTANCE');if(_0x525a3c[_0x3c42('0xa3')]===-0x1){return _0x525a3c;}return this['channel'][_0x3c42('0xa8')](util['format']('Executed\x20command\x20MRCPRecog\x20%s',_0x2f7775));};AGIVertices[_0x3c42('0x11')][_0x3c42('0xd4')]=function(_0x54ebda){logger[_0x3c42('0x31')](util[_0x3c42('0x2a')](_0x3c42('0xd5'),_0x54ebda[_0x3c42('0x3a')]));if(!this[_0x3c42('0x84')](_0x54ebda[_0x3c42('0xd6')])){return this[_0x3c42('0x39')][_0x3c42('0x2e')](_0x54ebda,_0x3c42('0xd7'));}var _0x2d66f4=this[_0x3c42('0xd8')][_0x3c42('0x6e')](this,_0x54ebda[_0x3c42('0xd6')]);if(!_0x2d66f4){return this['channel'][_0x3c42('0x2e')](_0x54ebda,'no\x20odbc\x20database\x20found');}if(!this[_0x3c42('0x84')](_0x54ebda[_0x3c42('0xd9')])){return this[_0x3c42('0x39')][_0x3c42('0x2e')](_0x54ebda,'no\x20query\x20configured');}var _0x5818f8=_0x54ebda[_0x3c42('0xd9')]['replace'](/(\r\n|\n|\r)/gm,'\x20');this[_0x3c42('0x39')][_0x3c42('0xa8')](util[_0x3c42('0x2a')]('query:\x20%s',_0x5818f8));var _0x2a5deb=this[_0x3c42('0x2c')][_0x3c42('0x6e')](this,_0x2d66f4,_0x5818f8);this[_0x3c42('0x38')][_0x3c42('0x6e')](this,_0x54ebda,_0x5818f8);if(!this['isConfigured'](_0x54ebda[_0x3c42('0xda')])){return this[_0x3c42('0x39')]['noop'](_0x3c42('0xdb'));}var _0x338105=this[_0x3c42('0xa1')][_0x3c42('0x6e')](this,_0x54ebda[_0x3c42('0xda')]);if(!_0x338105){return this[_0x3c42('0x39')][_0x3c42('0x2e')](_0x54ebda,'no\x20variable\x20found');}var _0x197a1f=this;_0x2a5deb[_0x3c42('0xdc')](function(_0x129d17,_0x41a996){Object[_0x3c42('0xdd')](_0x129d17)[_0x3c42('0xdc')](function(_0xad747f){_0x197a1f[_0x3c42('0x39')][_0x3c42('0x9d')](util[_0x3c42('0x2a')](_0x3c42('0xde'),_0x338105,_0x41a996,_0xad747f),_0x129d17[_0xad747f]);});});this['channel']['setVariable'](util[_0x3c42('0x2a')]('%s_ROWS_COUNT',_0x338105),_0x2a5deb[_0x3c42('0x9a')]);return this[_0x3c42('0x39')]['noop'](util[_0x3c42('0x2a')]('variable\x20%s\x20set',_0x338105));};AGIVertices[_0x3c42('0x11')]['dial']=function(_0x28a51b){logger[_0x3c42('0xdf')](util['format']('Enter\x20in\x20DIAL\x20(%s)\x20block',_0x28a51b[_0x3c42('0x3a')]));if(!this[_0x3c42('0x84')](_0x28a51b['sip_id'])){return this[_0x3c42('0x39')][_0x3c42('0x2e')](_0x28a51b,_0x3c42('0xe0'));}var _0x2d57b1=this[_0x3c42('0x1b')][_0x3c42('0x6e')](this,_0x28a51b[_0x3c42('0xe1')]);if(!_0x2d57b1){return this[_0x3c42('0x39')][_0x3c42('0x2e')](_0x28a51b,_0x3c42('0xe2'));}var _0x541134=this[_0x3c42('0x39')]['exec'](_0x3c42('0xe3'),[util[_0x3c42('0x2a')](_0x3c42('0xe4'),_0x2d57b1),_0x28a51b[_0x3c42('0x67')],_0x28a51b[_0x3c42('0xe5')],_0x28a51b[_0x3c42('0x65')]]);if(_0x541134[_0x3c42('0xa3')]===-0x1){return _0x541134;}return this[_0x3c42('0x39')][_0x3c42('0xa8')](util[_0x3c42('0x2a')](_0x3c42('0xe6'),_0x3c42('0xe3')));};AGIVertices[_0x3c42('0x11')][_0x3c42('0xe7')]=function(_0xe5d47){logger[_0x3c42('0x31')](util[_0x3c42('0x2a')](_0x3c42('0xe8'),_0xe5d47[_0x3c42('0x3a')]));if(!this['isConfigured'](_0xe5d47[_0x3c42('0x78')])){return this[_0x3c42('0x39')][_0x3c42('0xa8')]('no\x20key\x20configured');}if(!this[_0x3c42('0x84')](_0xe5d47[_0x3c42('0x5e')])){return this[_0x3c42('0x39')][_0x3c42('0xa8')](_0x3c42('0xc8'));}this['channel'][_0x3c42('0xe9')]=!![];this['createSquareDetailsReport'](_0xe5d47);this['createSquareMessage'](_0xe5d47[_0x3c42('0x5e')],'in','','');this[_0x3c42('0x39')]['noop'](util[_0x3c42('0x2a')]('Trying\x20Dialogflow:\x20%s',_0xe5d47[_0x3c42('0x5e')]));var _0x27cf0d=this[_0x3c42('0x77')][_0x3c42('0x6e')](this,_0xe5d47);if(_0x27cf0d){for(var _0x422c92 in _0x27cf0d){if(_0x27cf0d['hasOwnProperty'](_0x422c92)){this[_0x3c42('0x39')][_0x3c42('0x9d')](util[_0x3c42('0x2a')](_0x3c42('0xea'),_0x422c92[_0x3c42('0x6a')]()),_0x27cf0d[_0x422c92]);}}this['createSquareMessage'](_0x27cf0d[_0x3c42('0xeb')],_0x3c42('0xec'),_0x3c42('0xe7'),'');return this['channel'][_0x3c42('0xa8')](util['format'](_0x3c42('0xed'),_0x27cf0d[_0x3c42('0xeb')]));}return this['channel'][_0x3c42('0x2e')](_0xe5d47,'Dialogflow\x20is\x20unreachable');};AGIVertices['prototype'][_0x3c42('0xee')]=function(_0x3d99ab){logger['info'](util[_0x3c42('0x2a')](_0x3c42('0xef'),_0x3d99ab[_0x3c42('0x3a')]));if(!this[_0x3c42('0x84')](_0x3d99ab[_0x3c42('0x7b')])){return this[_0x3c42('0x39')][_0x3c42('0xa8')](_0x3c42('0xf0'));}if(!this[_0x3c42('0x84')](_0x3d99ab[_0x3c42('0x7c')])){return this[_0x3c42('0x39')]['noop']('no\x20client_email\x20configured');}if(!this[_0x3c42('0x84')](_0x3d99ab[_0x3c42('0x7d')])){return this[_0x3c42('0x39')][_0x3c42('0xa8')](_0x3c42('0xf1'));}if(!this['isConfigured'](_0x3d99ab[_0x3c42('0x7e')])){return this[_0x3c42('0x39')]['noop'](_0x3c42('0xf2'));}if(!this[_0x3c42('0x84')](_0x3d99ab[_0x3c42('0x5e')])){return this['channel']['noop'](_0x3c42('0xc8'));}this['channel'][_0x3c42('0xe9')]=!![];this[_0x3c42('0x38')](_0x3d99ab);this[_0x3c42('0x45')](_0x3d99ab['text'],'in','','');this[_0x3c42('0x39')][_0x3c42('0xa8')](util[_0x3c42('0x2a')]('Trying\x20DialogflowV2:\x20%s',_0x3d99ab[_0x3c42('0x5e')]));var _0x5b23d4=this[_0x3c42('0x7a')][_0x3c42('0x6e')](this,_0x3d99ab);if(_0x5b23d4){for(var _0x1293cc in _0x5b23d4){if(_0x5b23d4['hasOwnProperty'](_0x1293cc)){if(_0x1293cc!=='providerResponse'){this[_0x3c42('0x39')][_0x3c42('0x9d')](util[_0x3c42('0x2a')]('DIALOGFLOW_%s',_0x1293cc['toUpperCase']()),_0x5b23d4[_0x1293cc]);}}}this['createSquareMessage'](_0x5b23d4['speech'],_0x3c42('0xec'),_0x3c42('0xee'),_0x5b23d4[_0x3c42('0xf3')]);return this['channel'][_0x3c42('0xa8')](util['format']('DialogflowV2\x20Result\x20%s',_0x5b23d4['speech']));}return this[_0x3c42('0x39')][_0x3c42('0x2e')](_0x3d99ab,_0x3c42('0xf4'));};AGIVertices[_0x3c42('0x11')]['sesteknda']=function(_0x448532){logger[_0x3c42('0x31')](util[_0x3c42('0x2a')](_0x3c42('0xf5'),_0x448532['label']));if(!this[_0x3c42('0x84')](_0x448532['ndauth_url'])){return this[_0x3c42('0x39')][_0x3c42('0xa8')](_0x3c42('0xf6'));}if(!this['isConfigured'](_0x448532[_0x3c42('0xf7')])){return this[_0x3c42('0x39')][_0x3c42('0xa8')]('no\x20username\x20configured');}if(!this[_0x3c42('0x84')](_0x448532['password'])){return this['channel'][_0x3c42('0xa8')](_0x3c42('0xf8'));}if(!this['isConfigured'](_0x448532['ndassistant_url'])){return this[_0x3c42('0x39')][_0x3c42('0xa8')](_0x3c42('0xc8'));}this['channel'][_0x3c42('0xe9')]=!![];this[_0x3c42('0x38')](_0x448532);this['createSquareMessage'](_0x448532[_0x3c42('0x5e')],'in','','');this[_0x3c42('0x39')][_0x3c42('0xa8')](util[_0x3c42('0x2a')](_0x3c42('0xf9'),_0x448532[_0x3c42('0x5e')]));var _0x48e916=this[_0x3c42('0x7f')][_0x3c42('0x6e')](this,_0x448532);if(_0x48e916){for(var _0x12d423 in _0x48e916){if(_0x48e916[_0x3c42('0x94')](_0x12d423)){this[_0x3c42('0x39')][_0x3c42('0x9d')](util[_0x3c42('0x2a')](_0x3c42('0xfa'),_0x12d423[_0x3c42('0x6a')]()),_0x48e916[_0x12d423]);}}this['createSquareMessage'](_0x48e916[_0x3c42('0xeb')],_0x3c42('0xec'),'sesteknda','');if(_0x48e916['audiofile']){this[_0x3c42('0x39')][_0x3c42('0xa8')](util[_0x3c42('0x2a')](_0x3c42('0xfb'),_0x48e916[_0x3c42('0xfc')]));var _0x374dca=this['channel'][_0x3c42('0xfd')](_0x48e916[_0x3c42('0xfc')]);try{fs['unlink'](_0x48e916[_0x3c42('0xfc')]+_0x3c42('0xfe'));}catch(_0x19a7ad){logger['error'](_0x19a7ad);}return _0x374dca;}else{return this['channel'][_0x3c42('0xa8')](util[_0x3c42('0x2a')]('SestekNDA\x20Result\x20%s',_0x48e916['speech']));}}return this[_0x3c42('0x39')][_0x3c42('0x2e')](_0x448532,'SestekNDA\x20is\x20unreachable');};AGIVertices[_0x3c42('0x11')]['end']=function(_0xf1ebb8){logger[_0x3c42('0x31')](util[_0x3c42('0x2a')](_0x3c42('0xff'),_0xf1ebb8['label']));return this[_0x3c42('0x39')]['noop']('end');};AGIVertices[_0x3c42('0x11')][_0x3c42('0x100')]=function(_0x1b212b){logger['info'](util[_0x3c42('0x2a')](_0x3c42('0x101'),_0x1b212b['label']));var _0x5d994e='';if(_0x1b212b[_0x3c42('0x102')]){if(!this['isConfigured'](_0x1b212b[_0x3c42('0x102')])){return this[_0x3c42('0x39')][_0x3c42('0x2e')](_0x1b212b,_0x3c42('0x103'));}else{var _0x25b2cd=parseInt(_0x1b212b[_0x3c42('0x102')],0xa);if(isNaN(_0x25b2cd)){_0x5d994e=_0x1b212b['trunk_id'];}else{_0x5d994e=this['getTrunk'][_0x3c42('0x6e')](this,_0x1b212b[_0x3c42('0x102')]);if(!_0x5d994e){return this[_0x3c42('0x39')][_0x3c42('0x2e')](_0x1b212b,'no\x20trunk\x20found');}}}}else if(_0x1b212b[_0x3c42('0x104')]){_0x5d994e=_0x1b212b[_0x3c42('0x104')];}else{return this['channel'][_0x3c42('0x2e')](_0x1b212b,'no\x20trunk\x20selected');}var _0x2c74dc=this[_0x3c42('0x39')][_0x3c42('0x58')](_0x3c42('0xe3'),[util[_0x3c42('0x2a')]('SIP/%s/%s',_0x5d994e,_0x1b212b['phone']),_0x1b212b[_0x3c42('0x67')],_0x1b212b[_0x3c42('0xe5')],_0x1b212b[_0x3c42('0x65')]]);if(_0x2c74dc[_0x3c42('0xa3')]===-0x1){return _0x2c74dc;}return this[_0x3c42('0x39')][_0x3c42('0xa8')](util[_0x3c42('0x2a')](_0x3c42('0xe6'),_0x3c42('0xe3')));};AGIVertices[_0x3c42('0x11')]['finally']=function(_0x1f6b43){logger[_0x3c42('0x31')](util['format'](_0x3c42('0x105'),_0x1f6b43[_0x3c42('0x3a')]));return this['channel'][_0x3c42('0xa8')](_0x3c42('0x106'));};AGIVertices['prototype'][_0x3c42('0xd')]=function(_0x402fa4){logger['info'](util[_0x3c42('0x2a')](_0x3c42('0x107'),_0x402fa4[_0x3c42('0x3a')]));if(_0x402fa4[_0x3c42('0xa6')]===0x0){return this[_0x3c42('0xa5')](_0x402fa4);}_0x402fa4[_0x3c42('0xa6')]-=0x1;if(!this[_0x3c42('0x84')](_0x402fa4[_0x3c42('0x108')])){return this[_0x3c42('0x39')][_0x3c42('0x2e')](_0x402fa4,'no\x20file\x20audio\x20selected');}var _0x80d7ca=this['getSound'][_0x3c42('0x6e')](this,_0x402fa4[_0x3c42('0x108')]);if(!_0x80d7ca){return this[_0x3c42('0x39')][_0x3c42('0x2e')](_0x402fa4,'no\x20file\x20audio\x20found');}if(!this[_0x3c42('0x84')](_0x402fa4[_0x3c42('0xda')])){return this[_0x3c42('0x39')]['error'](_0x3c42('0xdb'));}var _0x2529af=this[_0x3c42('0x39')]['getData'](_0x80d7ca,_0x402fa4['response'],_0x402fa4[_0x3c42('0x109')]);var _0x4c63cd=_0x2529af[_0x3c42('0xa3')]?_0x2529af[_0x3c42('0xa3')][_0x3c42('0xa2')]():'';logger[_0x3c42('0x31')](_0x3c42('0x10a'),JSON['stringify'](_0x2529af));if(_0x2529af[_0x3c42('0xa3')]===-0x1){this[_0x3c42('0x38')][_0x3c42('0x6e')](this,_0x402fa4,_0x4c63cd);return _0x2529af;}else if(_0x2529af['extra']===_0x3c42('0x67')){_0x2529af[_0x3c42('0xa3')]=_0x4c63cd['length']>=parseInt(_0x402fa4[_0x3c42('0x10b')])?'x':'i';}else{_0x2529af['result']=_0x4c63cd[_0x3c42('0x9a')]>=parseInt(_0x402fa4[_0x3c42('0x10b')])&&_0x4c63cd[_0x3c42('0x9a')]<=parseInt(_0x402fa4[_0x3c42('0x109')])?'x':'i';}var _0x412ce6=this[_0x3c42('0xa1')]['sync'](this,_0x402fa4[_0x3c42('0xda')]);if(!_0x412ce6){return this[_0x3c42('0x39')][_0x3c42('0x2e')](_0x402fa4,_0x3c42('0x10c'));}this[_0x3c42('0x39')][_0x3c42('0x9d')](_0x412ce6,_0x4c63cd);if(this[_0x3c42('0x84')](_0x402fa4[_0x3c42('0x10d')])){var _0x16907c=parseInt(_0x402fa4[_0x3c42('0x10d')],0xa);var _0x320452=rs[_0x3c42('0x10e')]({'charset':'*','length':_0x16907c});var _0x5ec740=_0x4c63cd['length'];if(_0x5ec740>0x0){if(_0x5ec740>_0x16907c){this[_0x3c42('0x38')][_0x3c42('0x6e')](this,_0x402fa4,_0x402fa4[_0x3c42('0x10f')]===_0x3c42('0x110')?_0x320452+_0x4c63cd['substr'](_0x16907c):_0x4c63cd[_0x3c42('0x111')](0x0,_0x5ec740-_0x16907c)+_0x320452);}else{this[_0x3c42('0x38')]['sync'](this,_0x402fa4,rs[_0x3c42('0x10e')]({'charset':'*','length':_0x5ec740}));}}else{this['createSquareDetailsReport'][_0x3c42('0x6e')](this,_0x402fa4,'');}}else{this['createSquareDetailsReport']['sync'](this,_0x402fa4,_0x4c63cd);}return _0x2529af;};AGIVertices[_0x3c42('0x11')][_0x3c42('0xe')]=function(_0x54b2b7){logger[_0x3c42('0x31')](util['format']('Enter\x20in\x20GETSECRETDIGITS\x20(%s)\x20block',_0x54b2b7['label']));return this['getdigits'](_0x54b2b7);};AGIVertices[_0x3c42('0x11')][_0x3c42('0x112')]=function(_0x29536e){logger[_0x3c42('0x31')](util[_0x3c42('0x2a')](_0x3c42('0x113'),_0x29536e[_0x3c42('0x3a')]));this['createSquareDetailsReport'][_0x3c42('0x6e')](this,_0x29536e,_0x29536e[_0x3c42('0x114')]);return this[_0x3c42('0x39')][_0x3c42('0xa8')](util[_0x3c42('0x2a')](_0x3c42('0x115'),_0x29536e[_0x3c42('0x114')]));};AGIVertices[_0x3c42('0x11')][_0x3c42('0x116')]=function(_0x8eef69){logger['info'](util[_0x3c42('0x2a')]('[AGI]\x20Enter\x20in\x20AWSPOLLY\x20(%s)\x20block',_0x8eef69[_0x3c42('0x3a')]));if(!this['isConfigured'](_0x8eef69[_0x3c42('0x87')])||!this['isConfigured'](_0x8eef69[_0x3c42('0x88')])){return this['channel']['noop']('no\x20valid\x20credentials\x20configured');}if(!this['isConfigured'](_0x8eef69[_0x3c42('0x5e')])){return this[_0x3c42('0x39')][_0x3c42('0xa8')]('no\x20text\x20configured');}this['channel']['noop'](util[_0x3c42('0x2a')]('Trying\x20aws\x20Polly\x20%s',_0x8eef69[_0x3c42('0x5e')]));var _0x35c6ff=this[_0x3c42('0x86')][_0x3c42('0x6e')](this,_0x8eef69);if(_0x35c6ff){this[_0x3c42('0x39')]['noop'](util[_0x3c42('0x2a')](_0x3c42('0x117'),_0x35c6ff));var _0x287746=this['channel'][_0x3c42('0xfd')](_0x35c6ff);try{fs['unlink'](_0x35c6ff+_0x3c42('0xfe'));}catch(_0x535405){logger[_0x3c42('0x2e')](_0x535405);}return _0x287746;}return this[_0x3c42('0x39')][_0x3c42('0x2e')](_0x8eef69,_0x3c42('0x118'));};AGIVertices[_0x3c42('0x11')]['awslex']=function(_0x1ef7a3){logger[_0x3c42('0x31')](util['format'](_0x3c42('0x119'),_0x1ef7a3['label']));if(!this[_0x3c42('0x84')](_0x1ef7a3[_0x3c42('0x87')])||!this[_0x3c42('0x84')](_0x1ef7a3[_0x3c42('0x88')])){return this[_0x3c42('0x39')][_0x3c42('0xa8')](_0x3c42('0x11a'));}if(!this[_0x3c42('0x84')](_0x1ef7a3[_0x3c42('0x8d')])){return this[_0x3c42('0x39')]['noop'](_0x3c42('0x11b'));}if(!this[_0x3c42('0x84')](_0x1ef7a3['text'])){return this[_0x3c42('0x39')][_0x3c42('0xa8')]('no\x20text\x20configured');}this[_0x3c42('0x39')][_0x3c42('0xe9')]=!![];this['createSquareDetailsReport'](_0x1ef7a3);this[_0x3c42('0x45')](_0x1ef7a3[_0x3c42('0x5e')],'in','','');this[_0x3c42('0x39')][_0x3c42('0xa8')](util[_0x3c42('0x2a')]('Trying\x20Amazon\x20Lex:\x20%s',_0x1ef7a3[_0x3c42('0x5e')]));var _0x155391=this[_0x3c42('0x8c')][_0x3c42('0x6e')](this,_0x1ef7a3);if(_0x155391){for(var _0x401871 in _0x155391){if(_0x155391[_0x3c42('0x94')](_0x401871)&&_[_0x3c42('0x95')](_0x155391[_0x401871])){this['channel'][_0x3c42('0x9d')](util[_0x3c42('0x2a')](_0x3c42('0x11c'),_0x401871['toUpperCase']()),_0x155391[_0x401871]);}}if(_[_0x3c42('0x48')](_0x155391[_0x3c42('0x75')])){return this[_0x3c42('0x39')]['noop']('Amazon\x20Lex\x20ready\x20for\x20fulfillment');}else{this[_0x3c42('0x45')](_0x155391[_0x3c42('0x75')],'out',_0x3c42('0x11d'),'');return this[_0x3c42('0x39')]['noop'](util[_0x3c42('0x2a')](_0x3c42('0x11e'),_0x155391['message']));}}return this[_0x3c42('0x39')][_0x3c42('0x2e')](_0x1ef7a3,_0x3c42('0x11f'));};AGIVertices[_0x3c42('0x11')]['googleasr']=function(_0x11e25c){logger[_0x3c42('0x31')](util[_0x3c42('0x2a')](_0x3c42('0x120'),_0x11e25c[_0x3c42('0x3a')],_0x11e25c['timeout']));if(!this[_0x3c42('0x84')](_0x11e25c[_0x3c42('0x78')])){return this[_0x3c42('0x39')][_0x3c42('0xa8')](_0x3c42('0x121'));}var _0x25b805='wav';var _0x160717=util[_0x3c42('0x2a')](_0x3c42('0x122'),FILES_PATH,rs[_0x3c42('0x10e')](0x4));var _0x4d80f4=util[_0x3c42('0x2a')](_0x3c42('0x9c'),_0x160717,_0x25b805);var _0x489a23=!![];if(_0x11e25c['beep']==='NOBEEP'){_0x489a23=![];}var _0x14157e=this[_0x3c42('0x39')]['recordFile'](_0x160717,_0x25b805,_0x11e25c[_0x3c42('0x123')],_0x11e25c['timeout'],undefined,_0x489a23);if(_0x14157e[_0x3c42('0xa3')]!==-0x1){this[_0x3c42('0x39')][_0x3c42('0xa8')](util[_0x3c42('0x2a')]('google\x20%s\x20file\x20created',_0x4d80f4));var _0x59c2bb=this[_0x3c42('0x8e')][_0x3c42('0x6e')](this,_0x11e25c,_0x4d80f4);if(_0x59c2bb){for(var _0x4859ce in _0x59c2bb){if(_0x59c2bb[_0x3c42('0x94')](_0x4859ce)){this[_0x3c42('0x39')][_0x3c42('0x9d')](util[_0x3c42('0x2a')](_0x3c42('0x124'),_0x4859ce[_0x3c42('0x6a')]()),_0x59c2bb[_0x4859ce]);}}return this[_0x3c42('0x39')][_0x3c42('0xa8')](util[_0x3c42('0x2a')]('GoogleASR\x20Result\x20%s',JSON[_0x3c42('0x71')](_0x59c2bb)));}}return _0x14157e;};AGIVertices['prototype'][_0x3c42('0x125')]=function(_0x44acf9){logger[_0x3c42('0x31')](util[_0x3c42('0x2a')](_0x3c42('0x126'),_0x44acf9[_0x3c42('0x3a')]));if(!this['isConfigured'](_0x44acf9[_0x3c42('0x90')])){return this['channel'][_0x3c42('0xa8')](_0x3c42('0x127'));}if(!this['isConfigured'](_0x44acf9[_0x3c42('0x91')])){return this['channel'][_0x3c42('0xa8')](_0x3c42('0x128'));}var _0x5c083b=_0x3c42('0x129');var _0x41174d=util[_0x3c42('0x2a')](_0x3c42('0x122'),FILES_PATH,rs[_0x3c42('0x10e')](0x4));var _0x385e3c=util['format']('%s.%s',_0x41174d,_0x5c083b);var _0x7c6a94=!![];if(_0x44acf9[_0x3c42('0x12a')]===_0x3c42('0x12b')){_0x7c6a94=![];}var _0x251bac=this[_0x3c42('0x39')][_0x3c42('0x12c')](_0x41174d,_0x5c083b,_0x44acf9[_0x3c42('0x123')],_0x44acf9[_0x3c42('0x67')],undefined,_0x7c6a94);if(_0x251bac['result']!==-0x1){this[_0x3c42('0x39')][_0x3c42('0xa8')](util['format'](_0x3c42('0x12d'),_0x385e3c));var _0x217e41=this[_0x3c42('0x8f')]['sync'](this,_0x44acf9,_0x385e3c);if(_0x217e41){for(var _0x290972 in _0x217e41){if(_0x217e41[_0x3c42('0x94')](_0x290972)){this[_0x3c42('0x39')][_0x3c42('0x9d')](util[_0x3c42('0x2a')](_0x3c42('0x12e'),_0x290972[_0x3c42('0x6a')]()),_0x217e41[_0x290972]);}}return this[_0x3c42('0x39')]['noop'](util['format'](_0x3c42('0x12f'),JSON['stringify'](_0x217e41)));}}return _0x251bac;};AGIVertices[_0x3c42('0x11')][_0x3c42('0x130')]=function(_0xec1f0a){logger[_0x3c42('0x31')](util[_0x3c42('0x2a')](_0x3c42('0x131'),_0xec1f0a[_0x3c42('0x3a')]));return this[_0x3c42('0x39')][_0x3c42('0x132')](_0xec1f0a[_0x3c42('0x40')],_0xec1f0a[_0x3c42('0x41')],_0xec1f0a[_0x3c42('0x42')]);};AGIVertices['prototype'][_0x3c42('0x133')]=function(_0x5f591e){logger[_0x3c42('0x31')](util[_0x3c42('0x2a')](_0x3c42('0x134'),_0x5f591e[_0x3c42('0x3a')]));if(!this[_0x3c42('0x84')](_0x5f591e[_0x3c42('0x135')])){return this['channel'][_0x3c42('0x2e')](_0x5f591e,_0x3c42('0x136'));}try{var _0x225ed0=eval(_0x5f591e[_0x3c42('0x135')])?_0x3c42('0x137'):_0x3c42('0x138');this[_0x3c42('0x39')][_0x3c42('0xa8')](util['format'](_0x3c42('0x139'),_0x5f591e[_0x3c42('0x135')],_0x225ed0));return{'code':0xc8,'result':_0x225ed0};}catch(_0x5f3084){return{'code':0xc8,'result':_0x3c42('0x138')};}};AGIVertices['prototype'][_0x3c42('0x13a')]=function(_0x44535f){logger['info'](util[_0x3c42('0x2a')]('Enter\x20in\x20GOTOIFTIME\x20(%s)\x20block',_0x44535f[_0x3c42('0x3a')]));if(!this[_0x3c42('0x84')](_0x44535f[_0x3c42('0x13b')])){return this[_0x3c42('0x39')]['error'](_0x44535f,_0x3c42('0x13c'));}var _0x2b3d12=this[_0x3c42('0x24')][_0x3c42('0x6e')](this,_0x44535f[_0x3c42('0x13b')]);if(!_0x2b3d12){return this['channel'][_0x3c42('0x2e')](_0x44535f,_0x3c42('0x13d'));}for(var _0x5c2083=0x0;_0x5c2083<_0x2b3d12[_0x3c42('0x9a')];_0x5c2083+=0x1){var _0x403c01=this[_0x3c42('0x39')][_0x3c42('0xa1')](util[_0x3c42('0x2a')]('IFTIME(%s?true:false)',_0x2b3d12[_0x5c2083]));if(_0x403c01[_0x3c42('0xa3')]===-0x1){return _0x403c01;}logger[_0x3c42('0x31')](util[_0x3c42('0x2a')](_0x3c42('0x13e'),_0x2b3d12[_0x5c2083],_0x403c01[_0x3c42('0x13f')]));if(_0x403c01[_0x3c42('0x13f')]==='true'){logger['info'](util[_0x3c42('0x2a')](_0x3c42('0x13e'),_0x2b3d12[_0x5c2083],_0x3c42('0x137')));this['channel']['noop'](util['format'](_0x3c42('0x13e'),_0x2b3d12[_0x5c2083],'true'));return{'code':0xc8,'result':_0x3c42('0x137')};}else{logger[_0x3c42('0x31')](util[_0x3c42('0x2a')](_0x3c42('0x13e'),_0x2b3d12[_0x5c2083],_0x3c42('0x138')));this[_0x3c42('0x39')]['noop'](util[_0x3c42('0x2a')]('IFTIME\x20%s\x20%s',_0x2b3d12[_0x5c2083],'false'));}}return{'code':0xc8,'result':'false'};};AGIVertices[_0x3c42('0x11')]['hangup']=function(_0x2571ec){logger[_0x3c42('0x31')](util['format'](_0x3c42('0x140'),_0x2571ec[_0x3c42('0x3a')]));return this['channel'][_0x3c42('0x141')]();};AGIVertices[_0x3c42('0x11')][_0x3c42('0x142')]=function(_0xd96834){logger[_0x3c42('0x31')](util[_0x3c42('0x2a')](_0x3c42('0x143'),_0xd96834[_0x3c42('0x3a')]));if(!this[_0x3c42('0x84')](_0xd96834['key'])){return this[_0x3c42('0x39')][_0x3c42('0xa8')](_0x3c42('0x121'));}var _0x9127f8='wav';var _0x4a9e8f=util['format'](_0x3c42('0x122'),FILES_PATH,rs[_0x3c42('0x10e')](0x4));var _0x511b3b=util[_0x3c42('0x2a')](_0x3c42('0x9c'),_0x4a9e8f,_0x9127f8);var _0x8e8d1b=!![];if(_0xd96834[_0x3c42('0x12a')]===_0x3c42('0x12b')){_0x8e8d1b=![];}var _0x5848c8=this['channel'][_0x3c42('0x12c')](_0x4a9e8f,_0x9127f8,_0xd96834[_0x3c42('0x123')],_0xd96834['timeout'],undefined,_0x8e8d1b);if(_0x5848c8[_0x3c42('0xa3')]!==-0x1){this[_0x3c42('0x39')][_0x3c42('0xa8')](util[_0x3c42('0x2a')](_0x3c42('0x144'),_0x511b3b));var _0x5146c3=this[_0x3c42('0x83')][_0x3c42('0x6e')](this,_0xd96834,_0x511b3b);if(_0x5146c3){for(var _0x50d224 in _0x5146c3){if(_0x5146c3[_0x3c42('0x94')](_0x50d224)){this[_0x3c42('0x39')][_0x3c42('0x9d')](util[_0x3c42('0x2a')](_0x3c42('0x145'),_0x50d224[_0x3c42('0x6a')]()),_0x5146c3[_0x50d224]);}}return this[_0x3c42('0x39')][_0x3c42('0xa8')](util[_0x3c42('0x2a')]('IspeechASR\x20Result\x20%s',JSON[_0x3c42('0x71')](_0x5146c3)));}}return _0x5848c8;};AGIVertices['prototype'][_0x3c42('0x146')]=function(_0x58cf4f){logger['info'](util['format'](_0x3c42('0x147'),_0x58cf4f[_0x3c42('0x3a')]));if(!this[_0x3c42('0x84')](_0x58cf4f[_0x3c42('0x78')])){return this[_0x3c42('0x39')][_0x3c42('0xa8')](_0x3c42('0x121'));}if(!this['isConfigured'](_0x58cf4f[_0x3c42('0x5e')])){return this['channel'][_0x3c42('0xa8')]('no\x20text\x20configured');}this[_0x3c42('0x39')][_0x3c42('0xa8')](util['format'](_0x3c42('0x148'),_0x58cf4f[_0x3c42('0x5e')]));var _0x1acf22=this[_0x3c42('0x80')][_0x3c42('0x6e')](this,_0x58cf4f);if(_0x1acf22){this[_0x3c42('0x39')][_0x3c42('0xa8')](util[_0x3c42('0x2a')](_0x3c42('0x144'),_0x1acf22));var _0x2f8d28=this[_0x3c42('0x39')][_0x3c42('0xfd')](_0x1acf22,_0x58cf4f['intKey']);try{fs[_0x3c42('0x149')](_0x1acf22+'.wav');}catch(_0x5cf585){logger[_0x3c42('0x2e')](_0x5cf585);}return _0x2f8d28;}return this['channel']['error'](_0x58cf4f,'ispeech\x20TTS\x20is\x20unreachable');};AGIVertices[_0x3c42('0x11')][_0x3c42('0x14a')]=function(_0x57dfca){logger[_0x3c42('0x31')](util[_0x3c42('0x2a')](_0x3c42('0x14b'),_0x57dfca[_0x3c42('0x3a')]));if(!this['isConfigured'](_0x57dfca[_0x3c42('0x14c')])){return this['channel']['error'](_0x57dfca,_0x3c42('0x14d'));}logger[_0x3c42('0x31')](util[_0x3c42('0x2a')](_0x3c42('0x14e'),this['channel'][_0x3c42('0x3e')],_0x57dfca[_0x3c42('0x14c')]));var _0xb80059=this[_0x3c42('0x55')][_0x3c42('0x6e')](this,_0x57dfca[_0x3c42('0x14c')]);if(_0xb80059){logger[_0x3c42('0x31')](util[_0x3c42('0x2a')](_0x3c42('0x14f'),this[_0x3c42('0x39')][_0x3c42('0x3e')],_0x57dfca[_0x3c42('0x14c')]));this[_0x3c42('0x39')][_0x3c42('0xa8')](util['format']('AGENT\x20%s\x20FOUND\x20BY',this[_0x3c42('0x39')][_0x3c42('0x3e')],_0x57dfca[_0x3c42('0x14c')]));return{'code':0xc8,'result':_0x3c42('0x150')};}else{logger['info'](util['format'](_0x3c42('0x151'),this['channel']['callerid'],_0x57dfca[_0x3c42('0x14c')]));this[_0x3c42('0x39')][_0x3c42('0xa8')](util[_0x3c42('0x2a')]('AGENT\x20%s\x20NOT\x20FOUND\x20BY',this['channel'][_0x3c42('0x3e')],_0x57dfca[_0x3c42('0x14c')]));return{'code':0xc8,'result':_0x3c42('0x152')};}};AGIVertices['prototype'][_0x3c42('0x153')]=function(_0x2ac190){logger[_0x3c42('0x31')](util[_0x3c42('0x2a')](_0x3c42('0x154'),_0x2ac190[_0x3c42('0x3a')]));if(!this[_0x3c42('0x84')](_0x2ac190[_0x3c42('0x14c')])){return this[_0x3c42('0x39')][_0x3c42('0x2e')](_0x2ac190,_0x3c42('0x14d'));}logger[_0x3c42('0x31')](util[_0x3c42('0x2a')](_0x3c42('0x14e'),this[_0x3c42('0x39')]['callerid'],_0x2ac190[_0x3c42('0x14c')]));var _0x16c50e=this[_0x3c42('0x54')][_0x3c42('0x6e')](this,_0x2ac190[_0x3c42('0x14c')]);if(_0x16c50e){logger[_0x3c42('0x31')](util['format']('AGENT\x20%s\x20FOUND\x20BY',this['channel'][_0x3c42('0x3e')],_0x2ac190['findBy']));this['channel'][_0x3c42('0xa8')](util[_0x3c42('0x2a')]('AGENT\x20%s\x20FOUND\x20BY',this[_0x3c42('0x39')][_0x3c42('0x3e')],_0x2ac190[_0x3c42('0x14c')]));return{'code':0xc8,'result':_0x3c42('0x150')};}else{logger[_0x3c42('0x31')](util['format'](_0x3c42('0x151'),this[_0x3c42('0x39')]['callerid'],_0x2ac190[_0x3c42('0x14c')]));this['channel']['noop'](util['format'](_0x3c42('0x151'),this[_0x3c42('0x39')]['callerid'],_0x2ac190[_0x3c42('0x14c')]));return{'code':0xc8,'result':_0x3c42('0x152')};}};AGIVertices['prototype'][_0x3c42('0x155')]=function(_0x48ad91){logger[_0x3c42('0x31')](util[_0x3c42('0x2a')](_0x3c42('0x156'),_0x48ad91[_0x3c42('0x3a')]));if(!this[_0x3c42('0x84')](_0x48ad91['operation'])){return this[_0x3c42('0x39')][_0x3c42('0x2e')](_0x48ad91,_0x3c42('0x157'));}this[_0x3c42('0x39')][_0x3c42('0xa8')](util[_0x3c42('0x2a')](_0x3c42('0x158'),_0x48ad91[_0x3c42('0x159')]));var _0x215e5d=eval(_0x48ad91[_0x3c42('0x159')]);if(!this['isConfigured'](_0x48ad91[_0x3c42('0xda')])){return this[_0x3c42('0x39')]['noop']('no\x20variable\x20selected\x20for\x20the\x20result');}var _0x40745f=this[_0x3c42('0xa1')][_0x3c42('0x6e')](this,_0x48ad91[_0x3c42('0xda')]);if(!_0x40745f){return this[_0x3c42('0x39')][_0x3c42('0x2e')](_0x48ad91,_0x3c42('0x10c'));}if(_[_0x3c42('0x99')](_0x215e5d)){var _0x47a97c=this;_0x215e5d['forEach'](function(_0x4f4429,_0x41e6e0){_0x47a97c[_0x3c42('0x39')][_0x3c42('0x9d')](util[_0x3c42('0x2a')](_0x3c42('0x15a'),_0x40745f,_0x41e6e0),_0x4f4429);});return this['channel'][_0x3c42('0xa8')](util[_0x3c42('0x2a')]('variable\x20%s[key]\x20set',_0x40745f));}else{return this[_0x3c42('0x39')][_0x3c42('0x9d')](_0x40745f,_0x215e5d);}};AGIVertices['prototype']['menu']=function(_0x5b5190){logger[_0x3c42('0x31')](util[_0x3c42('0x2a')](_0x3c42('0x15b'),_0x5b5190['label']));if(_0x5b5190[_0x3c42('0xa6')]===0x0){return this[_0x3c42('0xa5')](_0x5b5190);}_0x5b5190[_0x3c42('0xa6')]-=0x1;if(!this[_0x3c42('0x84')](_0x5b5190['file_id'])){return this[_0x3c42('0x39')]['error'](_0x5b5190,_0x3c42('0x15c'));}var _0x2e3dc5=this['getSound'][_0x3c42('0x6e')](this,_0x5b5190['file_id']);if(!_0x2e3dc5){return this[_0x3c42('0x39')][_0x3c42('0x2e')](_0x5b5190,_0x3c42('0x15d'));}var _0x21c561=this[_0x3c42('0x39')][_0x3c42('0x15e')](_0x2e3dc5,_0x5b5190['response'],_0x5b5190[_0x3c42('0x15f')]);var _0x16f38c=_0x21c561[_0x3c42('0xa3')];if(_0x21c561[_0x3c42('0xa3')]===-0x1){this['createSquareDetailsReport'][_0x3c42('0x6e')](this,_0x5b5190,'-1');return _0x21c561;}else if(_0x21c561[_0x3c42('0x13f')]==='timeout'){_0x21c561[_0x3c42('0xa3')]=_0x21c561['result']['length']>0x0?_0x21c561[_0x3c42('0xa3')]:'t';}else if(_['isEmpty'](_0x21c561[_0x3c42('0xa3')])){_0x21c561[_0x3c42('0xa3')]='#';_0x16f38c='#';}if(!this[_0x3c42('0x84')](_0x5b5190['variable_id'])){this['channel'][_0x3c42('0xa8')](_0x3c42('0xdb'));}else{var _0x23b1c2=this[_0x3c42('0xa1')][_0x3c42('0x6e')](this,_0x5b5190[_0x3c42('0xda')]);if(!_0x23b1c2){return this['channel'][_0x3c42('0x2e')](_0x5b5190,_0x3c42('0x10c'));}this[_0x3c42('0x39')]['setVariable'](_0x23b1c2,_0x16f38c);}this[_0x3c42('0x38')][_0x3c42('0x6e')](this,_0x5b5190,_0x16f38c);return _0x21c561;};AGIVertices[_0x3c42('0x11')][_0x3c42('0xa8')]=function(_0x12f3ad){logger[_0x3c42('0x31')](util[_0x3c42('0x2a')](_0x3c42('0x160'),_0x12f3ad['label']));return this[_0x3c42('0x39')][_0x3c42('0xa8')](_0x12f3ad[_0x3c42('0x161')]||_0x12f3ad[_0x3c42('0x3a')]);};AGIVertices['prototype']['pause']=function(_0x3cd274){logger[_0x3c42('0x31')](util[_0x3c42('0x2a')]('Enter\x20in\x20PAUSE\x20(%s)\x20block',_0x3cd274['label']));if(!this[_0x3c42('0x84')](_0x3cd274[_0x3c42('0x14c')])){return this[_0x3c42('0x39')][_0x3c42('0x2e')](_0x3cd274,_0x3c42('0x14d'));}logger[_0x3c42('0x31')](util[_0x3c42('0x2a')](_0x3c42('0x14e'),this[_0x3c42('0x39')][_0x3c42('0x3e')],_0x3cd274['findBy']));var _0x57e4b7=this['getPause']['sync'](this,_0x3cd274[_0x3c42('0x162')]);var _0xc10ced=this[_0x3c42('0x51')][_0x3c42('0x6e')](this,_0x3cd274[_0x3c42('0x14c')],_0x57e4b7);if(_0xc10ced){logger['info'](util[_0x3c42('0x2a')](_0x3c42('0x14f'),this[_0x3c42('0x39')][_0x3c42('0x3e')],_0x3cd274[_0x3c42('0x14c')]));this[_0x3c42('0x39')][_0x3c42('0xa8')](util['format'](_0x3c42('0x14f'),this[_0x3c42('0x39')]['callerid'],_0x3cd274[_0x3c42('0x14c')]));return{'code':0xc8,'result':'success'};}else{logger[_0x3c42('0x31')](util['format'](_0x3c42('0x151'),this[_0x3c42('0x39')][_0x3c42('0x3e')],_0x3cd274['findBy']));this[_0x3c42('0x39')]['noop'](util[_0x3c42('0x2a')](_0x3c42('0x14f'),this['channel'][_0x3c42('0x3e')],_0x3cd274[_0x3c42('0x14c')]));return{'code':0xc8,'result':'failure'};}};AGIVertices[_0x3c42('0x11')][_0x3c42('0x163')]=function(_0x524ff1){logger['info'](util[_0x3c42('0x2a')](_0x3c42('0x164'),_0x524ff1[_0x3c42('0x3a')]));if(!this[_0x3c42('0x84')](_0x524ff1[_0x3c42('0x108')])){return this['channel'][_0x3c42('0x2e')](_0x524ff1,'no\x20file\x20audio\x20selected');}var _0x114bbe=this[_0x3c42('0x165')][_0x3c42('0x6e')](this,_0x524ff1['file_id']);if(!_0x114bbe){return this[_0x3c42('0x39')][_0x3c42('0x2e')](_0x524ff1,'no\x20file\x20audio\x20found');}var _0x4121e1=this[_0x3c42('0x39')]['exec'](_0x3c42('0x166'),[_0x114bbe,_0x524ff1[_0x3c42('0xe5')]]);if(_0x4121e1[_0x3c42('0xa3')]===-0x1){return _0x4121e1;}return this[_0x3c42('0x39')]['noop'](util[_0x3c42('0x2a')](_0x3c42('0xc6'),_0x3c42('0x166'),_0x114bbe));};AGIVertices[_0x3c42('0x11')][_0x3c42('0x167')]=function(_0x46e0c1){logger[_0x3c42('0x31')](util['format'](_0x3c42('0x168'),_0x46e0c1['label']));if(!this[_0x3c42('0x84')](_0x46e0c1[_0x3c42('0x169')])){return this[_0x3c42('0x39')][_0x3c42('0x2e')](_0x46e0c1,_0x3c42('0x16a'));}var _0x368077='';var _0x551272=parseInt(_0x46e0c1[_0x3c42('0x169')],0xa);if(isNaN(_0x551272)){_0x368077=_0x46e0c1[_0x3c42('0x169')];}else{_0x368077=this[_0x3c42('0x16b')]['sync'](this,_0x46e0c1[_0x3c42('0x169')]);if(!_0x368077){return this[_0x3c42('0x39')]['error'](_0x46e0c1,'no\x20queue\x20found');}}var _0x29362a='';if(this[_0x3c42('0x84')](_0x46e0c1[_0x3c42('0x108')])){var _0x51f64b=this[_0x3c42('0x165')]['sync'](this,_0x46e0c1[_0x3c42('0x108')]);if(_0x51f64b){_0x29362a=_0x51f64b;}}this[_0x3c42('0x38')][_0x3c42('0x6e')](this,_0x46e0c1,_0x368077);if(_0x46e0c1[_0x3c42('0xe5')][_0x3c42('0x16c')]('x')<0x0){_0x46e0c1[_0x3c42('0xe5')]+='x';}if(_0x46e0c1['opts'][_0x3c42('0x16c')]('X')<0x0){_0x46e0c1[_0x3c42('0xe5')]+='X';}this[_0x3c42('0x39')]['setVariable'](_0x3c42('0x16d'),_0x368077?_0x368077[_0x3c42('0x16e')]():'');var _0x3a50a6=this['channel'][_0x3c42('0x58')](_0x3c42('0x16f'),[_0x368077,_0x46e0c1[_0x3c42('0xe5')],_0x46e0c1[_0x3c42('0x65')],_0x29362a,_0x46e0c1['timeout'],_0x46e0c1[_0x3c42('0xb5')],_0x46e0c1[_0x3c42('0x170')],_0x46e0c1[_0x3c42('0x171')],'',_0x46e0c1[_0x3c42('0x172')]]);if(_0x3a50a6[_0x3c42('0xa3')]===-0x1){return _0x3a50a6;}return this[_0x3c42('0x39')][_0x3c42('0xa8')](util['format'](_0x3c42('0xc6'),_0x3c42('0x16f'),_0x368077));};AGIVertices['prototype'][_0x3c42('0x173')]=function(_0x2daea0){logger[_0x3c42('0x31')](util['format'](_0x3c42('0x174'),_0x2daea0[_0x3c42('0x3a')]));var _0x178791=_0x2daea0[_0x3c42('0x175')]||_0x3c42('0x129');var _0x47e5f7=util['format'](_0x3c42('0x176'),this['channel'][_0x3c42('0x3d')],rs[_0x3c42('0x10e')](0x5));var _0x34b90b=util[_0x3c42('0x2a')]('%s/recordings/%s.%s',FILES_PATH,_0x47e5f7,_0x178791);var _0x3a0b2e=util['format'](_0x3c42('0x122'),FILES_PATH,_0x47e5f7);this['createSquareRecording'][_0x3c42('0x6e')](this,_0x2daea0,_0x47e5f7,_0x34b90b);this[_0x3c42('0x39')][_0x3c42('0x9d')](_0x3c42('0x177'),_0x47e5f7);logger[_0x3c42('0x31')]('Recording\x20%s\x20%s\x20%s\x20%s',_0x3a0b2e,_0x178791,_0x2daea0[_0x3c42('0x178')],_0x2daea0['timeout']);return this[_0x3c42('0x39')]['recordFile'](_0x3a0b2e,_0x178791,_0x2daea0[_0x3c42('0x178')],_0x2daea0[_0x3c42('0x67')],undefined,!![]);};AGIVertices['prototype'][_0x3c42('0x179')]=function(_0xc28741){logger[_0x3c42('0x31')](util['format'](_0x3c42('0x17a'),_0xc28741['label']));if(!this[_0x3c42('0x84')](_0xc28741[_0x3c42('0x65')])){return this[_0x3c42('0x39')][_0x3c42('0xa8')](_0x3c42('0x17b'));}var _0x3281d0=this[_0x3c42('0x17c')][_0x3c42('0x6e')](this,_0xc28741);logger[_0x3c42('0x31')](util[_0x3c42('0x2a')](_0x3c42('0x17d'),util[_0x3c42('0x17e')](_0x3281d0,{'showHidden':![],'depth':null})));if(!this[_0x3c42('0x84')](_0xc28741[_0x3c42('0xda')])){return this[_0x3c42('0x39')][_0x3c42('0xa8')]('no\x20variable\x20selected\x20for\x20the\x20response');}var _0x1b32de=this[_0x3c42('0xa1')][_0x3c42('0x6e')](this,_0xc28741[_0x3c42('0xda')]);if(!_0x1b32de){return this[_0x3c42('0x39')][_0x3c42('0x2e')](_0xc28741,_0x3c42('0x10c'));}this[_0x3c42('0x39')][_0x3c42('0x9d')](util[_0x3c42('0x2a')](_0x3c42('0x17f'),_0x1b32de),_0x3281d0[_0x3c42('0x74')]?_0x3281d0[_0x3c42('0x74')]:_0x3c42('0x180'));this[_0x3c42('0x39')][_0x3c42('0x9d')](util['format'](_0x3c42('0x181'),_0x1b32de),_0x3281d0[_0x3c42('0x182')]?_0x3281d0[_0x3c42('0x182')]:'OK');if(_0x3281d0[_0x3c42('0x72')]){try{this['saveRestApiResult'](_0x3281d0[_0x3c42('0x72')],_0x1b32de);}catch(_0x4626f0){logger[_0x3c42('0x2e')](util[_0x3c42('0x2a')](_0x3c42('0x183'),_0x1b32de));}}return this['channel'][_0x3c42('0xa8')](util['format']('variable\x20%s\x20set',_0x1b32de));};AGIVertices[_0x3c42('0x11')][_0x3c42('0x184')]=function(_0x2ab217){logger['info'](util[_0x3c42('0x2a')](_0x3c42('0x185'),_0x2ab217[_0x3c42('0x3a')]));return this[_0x3c42('0x39')]['sayDigits'](_0x2ab217[_0x3c42('0x186')][_0x3c42('0x5a')](/\s+/g,''),_0x2ab217['escape_digits']);};AGIVertices['prototype'][_0x3c42('0x187')]=function(_0x3ce5eb){logger['info'](util[_0x3c42('0x2a')]('Enter\x20in\x20SAYNUMBER\x20(%s)\x20block',_0x3ce5eb[_0x3c42('0x3a')]));return this[_0x3c42('0x39')][_0x3c42('0x188')](_0x3ce5eb[_0x3c42('0x189')][_0x3c42('0x5a')](/\s+/g,''),_0x3ce5eb[_0x3c42('0x178')]);};AGIVertices[_0x3c42('0x11')]['sayphonetic']=function(_0x6e6fc7){logger[_0x3c42('0x31')](util[_0x3c42('0x2a')](_0x3c42('0x18a'),_0x6e6fc7[_0x3c42('0x3a')]));return this[_0x3c42('0x39')][_0x3c42('0x18b')](_0x6e6fc7['text'],_0x6e6fc7['escape_digits']);};AGIVertices[_0x3c42('0x11')]['sendMail']=function(_0x449ca6){logger[_0x3c42('0x31')](util['format'](_0x3c42('0x18c'),_0x449ca6[_0x3c42('0x3a')]));if(!this[_0x3c42('0x84')](_0x449ca6[_0x3c42('0x18d')])){return this[_0x3c42('0x39')][_0x3c42('0xa8')](_0x3c42('0x18e'));}var _0x450560=this[_0x3c42('0x18f')][_0x3c42('0x6e')](this,_0x449ca6[_0x3c42('0x18d')]);if(!_0x450560||!_0x450560[_0x3c42('0x190')]){return this[_0x3c42('0x39')][_0x3c42('0x2e')](_0x449ca6,_0x3c42('0x191'));}var _0x3ffc30={'from':util[_0x3c42('0x2a')](_0x3c42('0x192'),_0x450560[_0x3c42('0x13')],_0x450560[_0x3c42('0x193')]||_0x450560['Smtp'][_0x3c42('0x194')]),'to':_0x449ca6['to']||'','cc':_0x449ca6['cc']||'','bcc':_0x449ca6['bcc']||'','subject':_0x449ca6['subject'],'html':_0x449ca6['text'],'text':_0x449ca6['text']};var _0x34b1d0={'tls':{'rejectUnauthorized':![]}};if(_0x450560[_0x3c42('0x190')]['service']){_0x34b1d0[_0x3c42('0x195')]=_0x450560[_0x3c42('0x190')][_0x3c42('0x195')];}else{_0x34b1d0['host']=_0x450560[_0x3c42('0x190')][_0x3c42('0x196')];_0x34b1d0[_0x3c42('0x197')]=_0x450560[_0x3c42('0x190')][_0x3c42('0x197')];_0x34b1d0[_0x3c42('0x198')]=_0x450560[_0x3c42('0x190')][_0x3c42('0x198')];}if(_0x450560['Smtp']['authentication']){_0x34b1d0['auth']={'user':_0x450560[_0x3c42('0x190')][_0x3c42('0x194')],'pass':_0x450560[_0x3c42('0x190')][_0x3c42('0x199')]};}if(this['isConfigured'](_0x449ca6[_0x3c42('0x19a')])){}logger[_0x3c42('0xdf')](_0x3c42('0x19b'),JSON[_0x3c42('0x71')](_0x3ffc30));this[_0x3c42('0x38')][_0x3c42('0x6e')](this,_0x449ca6,_0x449ca6['account_id']);this[_0x3c42('0x39')][_0x3c42('0xa8')](util[_0x3c42('0x2a')]('Trying\x20SendMail\x20with\x20account\x20%s',_0x450560['name']));this[_0x3c42('0x23')][_0x3c42('0x6e')](this,_0x34b1d0,_0x3ffc30);return this[_0x3c42('0x39')]['noop'](_0x3c42('0x19c'));};AGIVertices['prototype'][_0x3c42('0x19d')]=function(_0x7902a2){logger[_0x3c42('0x31')](util[_0x3c42('0x2a')](_0x3c42('0x19e'),_0x7902a2['label']));return this[_0x3c42('0x39')][_0x3c42('0xa8')](_0x3c42('0x19f'));};AGIVertices['prototype'][_0x3c42('0x1a0')]=function(_0x1ed24c){logger[_0x3c42('0x31')](util[_0x3c42('0x2a')](_0x3c42('0x1a1'),_0x1ed24c[_0x3c42('0x3a')]));if(!this[_0x3c42('0x84')](_0x1ed24c['sms_account_id'])){return this['channel'][_0x3c42('0xa8')]('no\x20sms\x20account\x20configured');}var _0x3cab75=this['getSmsAccount'][_0x3c42('0x6e')](this,_0x1ed24c[_0x3c42('0x1a2')]);if(!_0x3cab75){return this[_0x3c42('0x39')][_0x3c42('0x2e')](_0x1ed24c,_0x3c42('0x1a3'));}var _0x52fc24={'body':_0x1ed24c[_0x3c42('0x1a4')],'phone':_0x1ed24c['to']||'','SmsAccountId':_0x3cab75['id']};logger['debug'](_0x3c42('0x1a5'),JSON[_0x3c42('0x71')](_0x52fc24));this['createSquareDetailsReport'][_0x3c42('0x6e')](this,_0x1ed24c,_0x1ed24c['sms_account_id']);this[_0x3c42('0x39')]['noop'](util[_0x3c42('0x2a')](_0x3c42('0x1a6'),_0x3cab75[_0x3c42('0x13')]));this['createSmsMessage'][_0x3c42('0x6e')](this,_0x52fc24);return this[_0x3c42('0x39')][_0x3c42('0xa8')](_0x3c42('0x1a7'));};AGIVertices[_0x3c42('0x11')][_0x3c42('0x1a8')]=function(_0x462283){logger[_0x3c42('0x31')](util[_0x3c42('0x2a')](_0x3c42('0x1a9'),_0x462283[_0x3c42('0x3a')]));if(!this['isConfigured'](_0x462283['variable_id'])){return this['channel'][_0x3c42('0x2e')](_0x462283,'no\x20variable\x20selected');}var _0x1efdc8=this[_0x3c42('0xa1')][_0x3c42('0x6e')](this,_0x462283['variable_id']);if(!_0x1efdc8){return this[_0x3c42('0x39')][_0x3c42('0x2e')](_0x462283,_0x3c42('0x10c'));}return this['channel'][_0x3c42('0x9d')](_0x1efdc8,_0x462283[_0x3c42('0x1aa')]);};AGIVertices[_0x3c42('0x11')][_0x3c42('0x1ab')]=function(_0x32ee57){logger[_0x3c42('0x31')](util[_0x3c42('0x2a')](_0x3c42('0x1ac'),_0x32ee57[_0x3c42('0x3a')]));this[_0x3c42('0x39')][_0x3c42('0xa8')]('START\x20CALLY\x20SQUARE');if(_0x32ee57[_0x3c42('0xb9')]===_0x3c42('0x1ad')){this['channel'][_0x3c42('0xa8')]('Answer');return this[_0x3c42('0x39')][_0x3c42('0xb9')]();}return this[_0x3c42('0x39')][_0x3c42('0xa8')](_0x3c42('0x1ae'));};AGIVertices[_0x3c42('0x11')][_0x3c42('0x1af')]=function(_0x1bd78b){logger[_0x3c42('0x31')](util[_0x3c42('0x2a')]('Enter\x20in\x20SUBPROJECT\x20(%s)\x20block',_0x1bd78b['label']));if(!this[_0x3c42('0x84')](_0x1bd78b['project_id'])){return this['channel'][_0x3c42('0x2e')](_0x1bd78b,_0x3c42('0x1b0'));}var _0x30fc3f=this[_0x3c42('0x17')]['sync'](this,_0x1bd78b[_0x3c42('0x1b1')]);if(!this[_0x3c42('0x84')](_0x30fc3f)){return this[_0x3c42('0x39')][_0x3c42('0x2e')](_0x1bd78b,util[_0x3c42('0x2a')](_0x3c42('0x1b2'),_0x1bd78b['project_id']));}if(_0x30fc3f===this[_0x3c42('0x39')]['arg_1']){return this['channel'][_0x3c42('0x2e')](_0x1bd78b,'project\x20in\x20subproject\x20must\x20be\x20different\x20from\x20the\x20called\x20project');}this[_0x3c42('0x38')][_0x3c42('0x6e')](this,_0x1bd78b,_0x30fc3f);var _0x4c165c=this[_0x3c42('0x39')][_0x3c42('0x58')](_0x3c42('0x1b3'),util[_0x3c42('0x2a')](_0x3c42('0x1b4'),config[_0x3c42('0xb5')][_0x3c42('0x196')]||_0x3c42('0x1b5'),_0x30fc3f,this[_0x3c42('0x39')]['arg_1']));if(_0x4c165c[_0x3c42('0xa3')]===-0x1){return _0x4c165c;}return this[_0x3c42('0x39')][_0x3c42('0xa8')](util[_0x3c42('0x2a')](_0x3c42('0xc6'),_0x3c42('0x1b3'),_0x30fc3f));};AGIVertices[_0x3c42('0x11')][_0x3c42('0x1b6')]=function(_0x5594e6){logger[_0x3c42('0x31')](util['format'](_0x3c42('0x1b7'),_0x5594e6[_0x3c42('0x3a')]));var _0x28c57e=this['shellCommand'][_0x3c42('0x6e')](this,_0x5594e6['command']);this[_0x3c42('0x38')][_0x3c42('0x6e')](this,_0x5594e6,_0x5594e6[_0x3c42('0xb7')]);if(this['isConfigured'](_0x5594e6[_0x3c42('0xda')])){var _0x282b23=this[_0x3c42('0xa1')][_0x3c42('0x6e')](this,_0x5594e6[_0x3c42('0xda')]);if(_0x282b23){this[_0x3c42('0x39')][_0x3c42('0x9d')](_0x282b23,_0x28c57e);return this[_0x3c42('0x39')]['noop'](util[_0x3c42('0x2a')](_0x3c42('0x1b8'),_0x5594e6[_0x3c42('0xb7')],_0x282b23));}}return this[_0x3c42('0x39')]['noop'](util[_0x3c42('0x2a')]('sh\x20command:\x20%s\x20result\x20no\x20stored',_0x5594e6[_0x3c42('0xb7')]));};AGIVertices[_0x3c42('0x11')][_0x3c42('0x1b9')]=function(_0x352054){logger[_0x3c42('0x31')](util['format'](_0x3c42('0x1ba'),_0x352054['label']));_0x352054[_0x3c42('0x5e')]=_0x352054[_0x3c42('0x5e')]['replace'](/(\r\n|\n|\r)/gm,'\x20');if(!this[_0x3c42('0x84')](_0x352054[_0x3c42('0x5c')])){return this[_0x3c42('0x39')][_0x3c42('0xa8')](_0x3c42('0x1bb'));}if(!this[_0x3c42('0x84')](_0x352054[_0x3c42('0x5e')])){return this[_0x3c42('0x39')][_0x3c42('0xa8')](_0x3c42('0xc8'));}this['channel'][_0x3c42('0xa8')](util['format'](_0x3c42('0x1bc'),_0x352054[_0x3c42('0x5e')]));var _0x593c3b=this[_0x3c42('0x5b')][_0x3c42('0x6e')](this,_0x352054);if(_0x593c3b){this['channel']['noop'](util[_0x3c42('0x2a')](_0x3c42('0x1bd'),_0x593c3b));var _0x29b69a=this[_0x3c42('0x39')][_0x3c42('0xfd')](_0x593c3b);try{fs[_0x3c42('0x149')](_0x593c3b+_0x3c42('0xfe'));}catch(_0x408c8a){logger['error'](_0x408c8a);}return _0x29b69a;}return this['channel'][_0x3c42('0x2e')](_0x352054,_0x3c42('0x1be'));};AGIVertices['prototype'][_0x3c42('0x1bf')]=function(_0x5d90b9){logger[_0x3c42('0x31')](util[_0x3c42('0x2a')](_0x3c42('0x1c0'),_0x5d90b9[_0x3c42('0x3a')]));_0x5d90b9['text']=_0x5d90b9[_0x3c42('0x5e')]['replace'](/(\r\n|\n|\r)/gm,'\x20');if(!this[_0x3c42('0x84')](_0x5d90b9[_0x3c42('0x5e')])){return this['channel'][_0x3c42('0xa8')](_0x3c42('0xc8'));}this[_0x3c42('0x39')][_0x3c42('0xa8')](util[_0x3c42('0x2a')](_0x3c42('0x1c1'),_0x5d90b9[_0x3c42('0x5e')]));var _0x12cd1c=this[_0x3c42('0x63')][_0x3c42('0x6e')](this,_0x5d90b9);if(_0x12cd1c){this[_0x3c42('0x39')][_0x3c42('0xa8')](util[_0x3c42('0x2a')](_0x3c42('0x1c2'),_0x12cd1c));var _0x3a802d=this['channel']['streamFile'](_0x12cd1c);try{fs[_0x3c42('0x149')](_0x12cd1c+'.wav');}catch(_0x16c1da){logger['error'](_0x16c1da);}return _0x3a802d;}return this[_0x3c42('0x39')]['error'](_0x5d90b9,'Google\x20TTS\x20is\x20unreachable');};AGIVertices['prototype'][_0x3c42('0x1c3')]=function(_0x1477c7){logger[_0x3c42('0x31')](util[_0x3c42('0x2a')](_0x3c42('0x1c4'),_0x1477c7[_0x3c42('0x3a')]));if(!this[_0x3c42('0x84')](_0x1477c7[_0x3c42('0x14c')])){return this[_0x3c42('0x39')]['error'](_0x1477c7,_0x3c42('0x14d'));}logger[_0x3c42('0x31')](util['format'](_0x3c42('0x14e'),this[_0x3c42('0x39')][_0x3c42('0x3e')],_0x1477c7['findBy']));var _0x124bb7=this['agentUnpause'][_0x3c42('0x6e')](this,_0x1477c7[_0x3c42('0x14c')]);if(_0x124bb7){logger[_0x3c42('0x31')](util['format'](_0x3c42('0x14f'),this[_0x3c42('0x39')]['callerid'],_0x1477c7[_0x3c42('0x14c')]));this[_0x3c42('0x39')][_0x3c42('0xa8')](util[_0x3c42('0x2a')](_0x3c42('0x14f'),this[_0x3c42('0x39')][_0x3c42('0x3e')],_0x1477c7['findBy']));return{'code':0xc8,'result':_0x3c42('0x150')};}else{logger['info'](util['format'](_0x3c42('0x151'),this[_0x3c42('0x39')][_0x3c42('0x3e')],_0x1477c7[_0x3c42('0x14c')]));this[_0x3c42('0x39')]['noop'](util['format'](_0x3c42('0x151'),this[_0x3c42('0x39')]['callerid'],_0x1477c7['findBy']));return{'code':0xc8,'result':_0x3c42('0x152')};}};AGIVertices[_0x3c42('0x11')]['voicemail']=function(_0x1bad2f){logger[_0x3c42('0x31')](util[_0x3c42('0x2a')](_0x3c42('0x1c5'),_0x1bad2f[_0x3c42('0x3a')]));var _0x455901=this['channel']['exec'](_0x3c42('0x1c6'),[_0x1bad2f[_0x3c42('0x1c7')],_0x1bad2f['options']]);if(_0x455901['result']===-0x1){return _0x455901;}return this[_0x3c42('0x39')][_0x3c42('0xa8')](util['format'](_0x3c42('0xc6'),_0x3c42('0x1c6'),_0x1bad2f[_0x3c42('0x1c7')]));};AGIVertices[_0x3c42('0x11')][_0x3c42('0x1c8')]=function(_0x5df9c0){logger[_0x3c42('0x31')](util[_0x3c42('0x2a')](_0x3c42('0x1c9'),_0x5df9c0[_0x3c42('0x3a')]));if(!this['isConfigured'](_0x5df9c0[_0x3c42('0xda')])){return this[_0x3c42('0x39')][_0x3c42('0x2e')](_0x5df9c0,_0x3c42('0x1ca'));}var _0x59618f=this[_0x3c42('0xa1')]['sync'](this,_0x5df9c0[_0x3c42('0xda')]);if(!_0x59618f){return this[_0x3c42('0x39')][_0x3c42('0x2e')](_0x5df9c0,_0x3c42('0x10c'));}var _0xefec20=this['channel']['getVariable'](_0x59618f);return{'code':0xc8,'result':_0xefec20['extra']?_0xefec20[_0x3c42('0x13f')]:'-'};};String['prototype'][_0x3c42('0xa0')]=function(_0x361bcc,_0x1f17b0){return this[_0x3c42('0x9f')](_0x361bcc)['join'](_0x1f17b0);};module['exports']=AGIVertices; \ No newline at end of file +var _0x011a=['join','exports','path','util','lodash','shelljs','randomstring','moment','mustache','request-promise','../../config/logger','agi','../../config/environment','./scripts','menu','getsecretdigits','rpc','mailRpc','prototype','getVariable','getVariableById','then','name','catch','getVoiceQueue','getVoiceQueueById','getSquareProject','getSquareProjectById','getSquareOdbcById','getUser','getUserById','getTrunk','getTrunkById','getSound','getSoundById','save_name','getMailAccount','sendMailMessage','getIntervals','getIntervalById','IntervalId','interval','Intervals','getSoundPath','getQueryOdbc','open','error','info','ODBC\x20connection\x20successfully','query','Error\x20executing\x20query\x20%s','Query\x20executed\x20correctly\x20%s','close','Error\x20closing\x20connection\x20to\x20odbc\x20%s','getSmsAccount','createSquareDetailsReport','channel','uniqueid','agicommand','arg_1','callerid','createSquareRecording','context','priority','accountcode','dnid','file','createSquareMessage','createCmContact','callback_','random','isNil','lastName','phone','list_id','scheduledAt','callback','Callback\x20scheduled\x20at\x20','toString','callback_priority','getPause','getPauseById','agentPause','agent','agentUnpause','agentLogout','agentLogin','internal','LOCAL','shellCommand','exec','trim','replace','googleCloudTTS','apiKey','text','en-US','MALE','audioEncoding','MP3','googleTTS','google_tts_language','method','timeout','number','includes','PUT','toUpperCase','body','rawBody','An\x20incorrect\x20formatted\x20json\x20body\x20has\x20been\x20passed\x20to\x20the\x20function','headers','rawHeaders','An\x20incorrect\x20formatted\x20json\x20headers\x20has\x20been\x20passed\x20to\x20the\x20function','computedVariables','sync','url','parse','render','stringify','statusMessage','options','googleDialogflow','key','dialogflow_language','dialogflowV2_project_id','private_key','sestekNDA','ispeechTTS','ispeech_tts_language','speed','ispeechASR','ispeech_asr_language','model','awsPolly','aws_access_key_id','aws_polly_region','aws_text_type','awsLex','aws_secret_access_key','aws_lex_region','aws_bot_name','googleASR','google_asr_language','tildeASR','appid','appsecret','uri','hasOwnProperty','isString','replaceObjectAllVariables','recursiveNodeIndex','isArray','length','replaceAllVariables','saveRestApiResult','isPlainObject','isEmpty','format','%s.%s','setVariable','split','extra','getAndSetVariable','result','The\x20\x22%s\x22\x20variable\x20value\x20is:\x20%s','isConfigured','maxRetry','retry','mrcpsynth','Enter\x20in\x20MRCPSynth\x20(%s)\x20block','label','noop','Executed\x20command\x20MRCPSynth\x20%s','mrcprecog','grammar','MRCPRecog','RECOG_CONFIDENCE()','RECOG_INPUT()','RECOG_INSTANCE()','Executed\x20command\x20MRCPRecog\x20%s','Enter\x20in\x20AGI\x20(%s)\x20block','command','args','Wait\x20%s\x20seconds\x20before\x20answer','answer','Enter\x20in\x20CALLBACK\x20(%s)\x20block','no\x20list\x20selected','delay','add','minutes','Enter\x20in\x20CUSTOM\x20APP\x20(%s)\x20block','application','Executed\x20command\x20%s\x20%s','Enter\x20in\x20LUMENVOXTTS\x20(%s)\x20block','no\x20text\x20configured','MRCPSynth','sestektts','lumenvoxasr','no\x20grammar\x20configured','LUMENVOX_ASR_CONFIDENCE','LUMENVOX_ASR_INSTANCE','Enter\x20in\x20SESTEKASR\x20(%s)\x20block','SESTEK_ASR_CONFIDENCE','SESTEK_ASR_TRANSCRIPT','SESTEK_ASR_INSTANCE','database','Enter\x20in\x20DATABASE\x20(%s)\x20block','odbc_id','no\x20database\x20selected','getSquareOdbc','variable_id','no\x20variable\x20selected\x20for\x20the\x20result','forEach','keys','%s[%s][%s]','%s_ROWS_COUNT','variable\x20%s\x20set','dial','debug','Enter\x20in\x20DIAL\x20(%s)\x20block','sip_id','no\x20user\x20selected','no\x20user\x20found','DIAL','opts','Executed\x20command\x20%s','Enter\x20in\x20DIALOGFLOW\x20(%s)\x20block','bot','Trying\x20Dialogflow:\x20%s','speech','Dialogflow\x20Result\x20%s','Dialogflow\x20is\x20unreachable','dialogflowV2','no\x20project_id\x20configured','client_email','no\x20client_email\x20configured','no\x20private_key\x20configured','dialogflowV2_language','Trying\x20DialogflowV2:\x20%s','providerResponse','out','DialogflowV2\x20is\x20unreachable','sesteknda','ndauth_url','no\x20username\x20configured','Trying\x20SestekNDA:\x20%s','audiofile','streamFile','unlink','.wav','SestekNDA\x20Result\x20%s','end','Enter\x20in\x20END\x20(%s)\x20block','ext_dial','Enter\x20in\x20EXTERNAL\x20DIAL\x20(%s)\x20block','trunk_id','no\x20trunk\x20selected','trunk_name','SIP/%s/%s','finally','getdigits','Enter\x20in\x20GETDIGITS\x20(%s)\x20block','file_id','no\x20file\x20audio\x20selected','no\x20file\x20audio\x20found','response','maxdigit','test','mindigit','hiddendigitsnum','generate','hiddendigitspos','first','substr','Enter\x20in\x20GETSECRETDIGITS\x20(%s)\x20block','goal','goalname','GOAL\x20%s','[AGI]\x20Enter\x20in\x20AWSPOLLY\x20(%s)\x20block','no\x20valid\x20credentials\x20configured','Trying\x20aws\x20Polly\x20%s','aws\x20Polly\x20%s\x20file\x20created','aws\x20Polly\x20is\x20unreachable','awslex','Enter\x20in\x20Amazon\x20Lex\x20(%s)\x20block','no\x20bot\x20name\x20configured','Trying\x20Amazon\x20Lex:\x20%s','AWS_LEX_%s','message','Amazon\x20Lex\x20ready\x20for\x20fulfillment','amazonlex','Amazon\x20Lex\x20is\x20unreachable','googleasr','Enter\x20in\x20GOOGLEASR\x20(%s)\x20block\x20%s','no\x20key\x20configured','%s/recordings/%s','NOBEEP','recordFile','intKey','GOOGLE_ASR_%s','tildeasr','no\x20appid\x20configured','no\x20appsecret\x20configured','tilde\x20%s\x20file\x20created','TILDE_ASR_%s','TildeASR\x20Result\x20%s','continueAt','extension','gotoif','condition','no\x20condition\x20configured','true','false','EVAL\x20CONDITION\x20%s\x20%s','gotoiftime','Enter\x20in\x20GOTOIFTIME\x20(%s)\x20block','no\x20interval\x20configured','interval_id','no\x20intervals\x20found','IFTIME(%s?true:false)','IFTIME\x20%s\x20%s','hangup','Enter\x20in\x20ISPEECHASR\x20(%s)\x20block','wav','beep','ISPEECH_ASR_%s','IspeechASR\x20Result\x20%s','ispeechtts','Enter\x20in\x20ISPEECHTTS\x20(%s)\x20block','ispeech\x20%s\x20file\x20created','ispeech\x20TTS\x20is\x20unreachable','login','Enter\x20in\x20LOGIN\x20(%s)\x20block','no\x20find\x20by\x20configured','FIND\x20AGENT\x20%s\x20BY\x20%s','findBy','AGENT\x20%s\x20FOUND\x20BY','success','AGENT\x20%s\x20NOT\x20FOUND\x20BY','failure','logout','Enter\x20in\x20LOGOUT\x20(%s)\x20block','math','Enter\x20in\x20MATH\x20(%s)\x20block','operation','no\x20operation\x20configured','%s[%s]','variable\x20%s[key]\x20set','Enter\x20in\x20MENU\x20(%s)\x20block','getData','digit','no\x20variable\x20found','Enter\x20in\x20NOOP\x20(%s)\x20block','output','pause','Enter\x20in\x20PAUSE\x20(%s)\x20block','playback','PLAYBACK','Enter\x20in\x20QUEUE\x20(%s)\x20block','queue_id','no\x20queue\x20selected','no\x20queue\x20found','indexOf','XMCS-QUEUE','toLowerCase','macro','gosub','position','QUEUE','record','Enter\x20in\x20RECORD\x20(%s)\x20block','%s_%s','RECORDING_SAVENAME','Recording\x20%s\x20%s\x20%s\x20%s','escape_digits','restapi','no\x20url\x20configured','restAPI','Response:','no\x20variable\x20selected\x20for\x20the\x20response','statusCode','200','%s_STATUS_MESSAGE','saydigits','Enter\x20in\x20SAYDIGITS\x20(%s)\x20block','sayDigits','digits','saynumber','sayphonetic','Enter\x20in\x20SAYPHONETIC\x20(%s)\x20block','sayPhonetic','sendMail','Enter\x20in\x20SENDMAIL\x20(%s)\x20block','account_id','no\x20mail\x20account\x20configured','Smtp','no\x20mail\x20account\x20found','email','user','subject','service','host','port','secure','authentication','auth','template_id','sendMail\x20message','Mail\x20message\x20added\x20to\x20outgoing\x20process','sendFax','Enter\x20in\x20SENDFAX\x20(%s)\x20block','SENDFAX\x20block\x20not\x20implemented','sendSMS','sms_account_id','no\x20sms\x20account\x20found','sms_text','sendSMS\x20message','Trying\x20SendSMS\x20with\x20account\x20%s','Sms\x20message\x20added\x20to\x20outgoing\x20process','Enter\x20in\x20SET\x20(%s)\x20block','no\x20variable\x20selected','variable_value','start','Enter\x20in\x20START\x20(%s)\x20block','yes','Skipped\x20Answer','subproject','project_id','no\x20subproject\x20found\x20with\x20id\x20%d','project\x20in\x20subproject\x20must\x20be\x20different\x20from\x20the\x20called\x20project','AGI','agi://%s/square,\x22%s\x22,\x22%s\x22','127.0.0.1','system','sh\x20command:\x20%s\x20result\x20on\x20variable:\x20%s','sh\x20command:\x20%s\x20result\x20no\x20stored','google_cloud_tts','Enter\x20in\x20Google\x20Cloud\x20TTS\x20(%s)\x20block','no\x20apiKey\x20configured','Trying\x20Google\x20Cloud\x20TTS\x20%s','Google\x20Cloud\x20TTS\x20%s\x20file\x20created','Google\x20Cloud\x20TTS\x20is\x20unreachable','Trying\x20Google\x20TTS\x20%s','Google\x20TTS\x20%s\x20file\x20created','Google\x20TTS\x20is\x20unreachable','unpause','Enter\x20in\x20UNPAUSE\x20(%s)\x20block','voicemail','Enter\x20in\x20VOICEMAIL\x20(%s)\x20block','mailbox','vswitch','Enter\x20in\x20SWITCH\x20(%s)\x20block','replaceAll'];(function(_0x2387c5,_0xfcc74c){var _0x2c414c=function(_0x3d1881){while(--_0x3d1881){_0x2387c5['push'](_0x2387c5['shift']());}};_0x2c414c(++_0xfcc74c);}(_0x011a,0x1c8));var _0xa011=function(_0x2ee790,_0x5a8661){_0x2ee790=_0x2ee790-0x0;var _0x5a54a5=_0x011a[_0x2ee790];return _0x5a54a5;};'use strict';var fs=require('fs');var path=require(_0xa011('0x0'));var util=require(_0xa011('0x1'));var _=require(_0xa011('0x2'));var sh=require(_0xa011('0x3'));var odbc=require('odbc')();var rs=require(_0xa011('0x4'));var moment=require(_0xa011('0x5'));var Mustache=require(_0xa011('0x6'));var rp=require(_0xa011('0x7'));var logger=require(_0xa011('0x8'))(_0xa011('0x9'));var config=require(_0xa011('0xa'));var scripts=require(_0xa011('0xb'));var FILES_PATH='/var/opt/motion2/server/files';var recursiveMapAttributes=['rawHeaders','rawBody'];var verticesWithRetry=[_0xa011('0xc'),'getdigits',_0xa011('0xd')];var AGIVertices=function(_0x5b0178,_0x25125a,_0x34475b){this['channel']=_0x5b0178;this[_0xa011('0xe')]=_0x25125a;this[_0xa011('0xf')]=_0x34475b;};AGIVertices[_0xa011('0x10')][_0xa011('0x11')]=function(_0x272b32,_0x19f46b){this['rpc'][_0xa011('0x12')](_0x272b32)[_0xa011('0x13')](function(_0x357aaf){_0x19f46b(null,_0x357aaf?_0x357aaf[_0xa011('0x14')]:![]);})[_0xa011('0x15')](function(_0x2f5164){_0x19f46b(_0x2f5164);});};AGIVertices[_0xa011('0x10')][_0xa011('0x16')]=function(_0xc64418,_0x246eca){this['rpc'][_0xa011('0x17')](_0xc64418)[_0xa011('0x13')](function(_0x260e6e){_0x246eca(null,_0x260e6e?_0x260e6e[_0xa011('0x14')]:![]);})[_0xa011('0x15')](function(_0x37fc22){_0x246eca(_0x37fc22);});};AGIVertices['prototype'][_0xa011('0x18')]=function(_0x54fb48,_0xdc0235){this[_0xa011('0xe')][_0xa011('0x19')](_0x54fb48)[_0xa011('0x13')](function(_0x1b24e8){_0xdc0235(null,_0x1b24e8?_0x1b24e8[_0xa011('0x14')]:![]);})[_0xa011('0x15')](function(_0x15e3d0){_0xdc0235(_0x15e3d0);});};AGIVertices['prototype']['getSquareOdbc']=function(_0x5b0ce5,_0x1f71bc){this[_0xa011('0xe')][_0xa011('0x1a')](_0x5b0ce5)[_0xa011('0x13')](function(_0x443652){_0x1f71bc(null,_0x443652?_0x443652['dsn']:![]);})[_0xa011('0x15')](function(_0x2901fb){_0x1f71bc(_0x2901fb);});};AGIVertices['prototype'][_0xa011('0x1b')]=function(_0x33cc33,_0x173a07){this[_0xa011('0xe')][_0xa011('0x1c')](_0x33cc33)['then'](function(_0x19c1b4){_0x173a07(null,_0x19c1b4?_0x19c1b4['name']:![]);})[_0xa011('0x15')](function(_0x3661b6){_0x173a07(_0x3661b6);});};AGIVertices[_0xa011('0x10')][_0xa011('0x1d')]=function(_0x223f1f,_0x4e5cb9){this['rpc'][_0xa011('0x1e')](_0x223f1f)[_0xa011('0x13')](function(_0x4c876c){_0x4e5cb9(null,_0x4c876c?_0x4c876c[_0xa011('0x14')]:![]);})[_0xa011('0x15')](function(_0xf9ae60){_0x4e5cb9(_0xf9ae60);});};AGIVertices[_0xa011('0x10')][_0xa011('0x1f')]=function(_0x3b1a9d,_0x26925c){var _0x48d8ab=this;this[_0xa011('0xe')][_0xa011('0x20')](_0x3b1a9d)[_0xa011('0x13')](function(_0x5a1891){_0x26925c(null,_0x5a1891?_0x48d8ab['getSoundPath'](_0x5a1891[_0xa011('0x21')]):![]);})[_0xa011('0x15')](function(_0xbf262f){_0x26925c(_0xbf262f);});};AGIVertices[_0xa011('0x10')][_0xa011('0x22')]=function(_0x530a55,_0x13ec7b){this[_0xa011('0xe')]['getMailAccountById'](_0x530a55)['then'](function(_0x211e3c){_0x13ec7b(null,_0x211e3c?_0x211e3c:![]);})[_0xa011('0x15')](function(_0x27d206){_0x13ec7b(_0x27d206);});};AGIVertices[_0xa011('0x10')]['sendMailMessage']=function(_0x3beb58,_0x1fd9dd,_0x203a3d){this[_0xa011('0xf')][_0xa011('0x23')](_0x3beb58,_0x1fd9dd)['then'](function(){_0x203a3d(null);})[_0xa011('0x15')](function(_0x3f7645){_0x203a3d(_0x3f7645);});};AGIVertices[_0xa011('0x10')][_0xa011('0x24')]=function(_0x240911,_0x428da8){this[_0xa011('0xe')][_0xa011('0x25')](_0x240911)[_0xa011('0x13')](function(_0x2bcbbc){if(_0x2bcbbc){if(_0x2bcbbc[_0xa011('0x26')]){_0x428da8(null,[_0x2bcbbc[_0xa011('0x27')]]);}else{_0x428da8(null,_['map'](_0x2bcbbc[_0xa011('0x28')],_0xa011('0x27')));}}else{_0x428da8(null,![]);}})['catch'](function(_0x29ee59){_0x428da8(_0x29ee59);});};AGIVertices[_0xa011('0x10')][_0xa011('0x29')]=function(_0x37a553){return util['format']('%s/sounds/converted/%s',FILES_PATH,_0x37a553);};AGIVertices[_0xa011('0x10')][_0xa011('0x2a')]=function(_0xb878ab,_0xffac17,_0x25ad0e){odbc[_0xa011('0x2b')](_0xb878ab,function(_0x1c9a6d){if(_0x1c9a6d){logger[_0xa011('0x2c')]('Error\x20getting\x20ODBC\x20connection\x20%s',_0x1c9a6d);_0x25ad0e(_0x1c9a6d);}else{logger[_0xa011('0x2d')](_0xa011('0x2e'));odbc[_0xa011('0x2f')](_0xffac17,function(_0x4babdc,_0x3c6abe){if(_0x4babdc){logger[_0xa011('0x2d')](_0xa011('0x30'),_0xffac17);_0x25ad0e(_0x4babdc);}else{logger[_0xa011('0x2d')](_0xa011('0x31'),_0xffac17);odbc[_0xa011('0x32')](function(_0x8a3b1b){if(_0x8a3b1b){logger[_0xa011('0x2c')](_0xa011('0x33'),_0x8a3b1b);}_0x25ad0e(null,_0x3c6abe);});}});}});};AGIVertices[_0xa011('0x10')][_0xa011('0x34')]=function(_0x56ae7f,_0x22b292){this[_0xa011('0xe')]['getSmsAccountById'](_0x56ae7f)[_0xa011('0x13')](function(_0x5d513d){_0x22b292(null,_0x5d513d?_0x5d513d:![]);})[_0xa011('0x15')](function(_0x56b7e8){_0x22b292(_0x56b7e8);});};AGIVertices['prototype']['createSmsMessage']=function(_0x2bc86c,_0x580a9c){this[_0xa011('0xe')]['createSmsMessage'](_0x2bc86c)[_0xa011('0x13')](function(_0x5d177b){_0x580a9c(null,_0x5d177b);})[_0xa011('0x15')](function(_0x51b2a1){_0x580a9c(_0x51b2a1);});};AGIVertices[_0xa011('0x10')][_0xa011('0x35')]=function(_0xefcbab,_0x4da5ed,_0x1ad7c8){this[_0xa011('0xe')][_0xa011('0x35')]({'uniqueid':this[_0xa011('0x36')][_0xa011('0x37')],'node':_0xefcbab['label'],'application':_0xefcbab[_0xa011('0x38')],'data':_0x4da5ed||null,'project_name':this[_0xa011('0x36')][_0xa011('0x39')],'callerid':this[_0xa011('0x36')][_0xa011('0x3a')]})['then'](function(_0x1c0a7f){if(_0x1ad7c8){_0x1ad7c8(null,_0x1c0a7f);}})['catch'](function(_0x52a671){if(_0x1ad7c8){_0x1ad7c8(_0x52a671);}});};AGIVertices[_0xa011('0x10')][_0xa011('0x3b')]=function(_0x404532,_0x3685ad,_0x54350e,_0x3718ac){this[_0xa011('0xe')][_0xa011('0x3b')]({'uniqueid':this[_0xa011('0x36')][_0xa011('0x37')],'callerid':this[_0xa011('0x36')]['callerid'],'calleridname':this[_0xa011('0x36')]['calleridname'],'context':this[_0xa011('0x36')][_0xa011('0x3c')],'extension':this['channel']['extension'],'priority':this[_0xa011('0x36')][_0xa011('0x3d')],'accountcode':this[_0xa011('0x36')][_0xa011('0x3e')],'dnid':this[_0xa011('0x36')][_0xa011('0x3f')],'projectName':this[_0xa011('0x36')][_0xa011('0x39')],'saveName':_0x3685ad,'filename':_0x404532[_0xa011('0x40')]||_0x3685ad,'savePath':_0x54350e})[_0xa011('0x13')](function(_0x1f9af4){_0x3718ac(null,_0x1f9af4);})[_0xa011('0x15')](function(_0x52c805){_0x3718ac(_0x52c805);});};AGIVertices[_0xa011('0x10')][_0xa011('0x41')]=function(_0xcb37aa,_0xe714a4,_0x519459,_0x4a1191,_0x387cd1){this[_0xa011('0xe')][_0xa011('0x41')]({'uniqueid':this[_0xa011('0x36')][_0xa011('0x37')],'body':_0xcb37aa,'direction':_0xe714a4,'providerName':_0x519459,'providerResponse':_0x4a1191})[_0xa011('0x13')](function(_0x45804f){if(_0x387cd1){_0x387cd1(null,_0x45804f);}})[_0xa011('0x15')](function(_0x525938){if(_0x387cd1){_0x387cd1(_0x525938);}});};AGIVertices[_0xa011('0x10')][_0xa011('0x42')]=function(_0x352c70,_0x2cd083){this['rpc']['createCmContact']({'firstName':_['isEmpty'](_0x352c70[_0xa011('0x14')])||_['isNil'](_0x352c70[_0xa011('0x14')])?_0xa011('0x43')+Math[_0xa011('0x44')]():_0x352c70['name'],'lastName':_['isEmpty'](_0x352c70['lastName'])||_[_0xa011('0x45')](_0x352c70[_0xa011('0x46')])?null:_0x352c70[_0xa011('0x46')],'phone':_0x352c70[_0xa011('0x47')],'ListId':_0x352c70[_0xa011('0x48')],'scheduledat':_0x352c70[_0xa011('0x49')],'callbackUniqueid':this[_0xa011('0x36')][_0xa011('0x37')],'tags':_0xa011('0x4a'),'description':_0xa011('0x4b')+_0x352c70['scheduledAt'][_0xa011('0x4c')](),'priority':_0x352c70[_0xa011('0x4d')]})[_0xa011('0x13')](function(_0x1f3068){_0x2cd083(null,_0x1f3068);})[_0xa011('0x15')](function(_0x341526){_0x2cd083(_0x341526);});};AGIVertices['prototype'][_0xa011('0x4e')]=function(_0xd70314,_0x4a8744){this[_0xa011('0xe')][_0xa011('0x4f')](_0xd70314)[_0xa011('0x13')](function(_0x48b5e2){_0x4a8744(null,_0x48b5e2?_0x48b5e2[_0xa011('0x14')]:![]);})[_0xa011('0x15')](function(_0x1bef1f){_0x4a8744(_0x1bef1f);});};AGIVertices[_0xa011('0x10')][_0xa011('0x50')]=function(_0x2d68b3,_0x69db11,_0x34d7e7){var _0x1d9978={'role':_0xa011('0x51')};_0x1d9978[_0x2d68b3]=this[_0xa011('0x36')][_0xa011('0x3a')];this[_0xa011('0xe')][_0xa011('0x50')](_0x1d9978,_0x69db11,this[_0xa011('0x36')][_0xa011('0x37')])[_0xa011('0x13')](function(_0x2ba757){_0x34d7e7(null,_[_0xa011('0x45')](_0x2ba757)?![]:!![]);})['catch'](function(_0x36ab77){logger[_0xa011('0x2c')](_0x36ab77);_0x34d7e7(null,![]);});};AGIVertices[_0xa011('0x10')][_0xa011('0x52')]=function(_0x47d4e6,_0x2e25e1){var _0x12a710={'role':'agent'};_0x12a710[_0x47d4e6]=this[_0xa011('0x36')][_0xa011('0x3a')];this[_0xa011('0xe')][_0xa011('0x52')](_0x12a710)[_0xa011('0x13')](function(_0x434a54){_0x2e25e1(null,_['isNil'](_0x434a54)?![]:!![]);})[_0xa011('0x15')](function(_0x4367e){logger[_0xa011('0x2c')](_0x4367e);_0x2e25e1(null,![]);});};AGIVertices[_0xa011('0x10')]['agentLogout']=function(_0x2c0460,_0x13863d){var _0x30908a={'role':'agent'};_0x30908a[_0x2c0460]=this[_0xa011('0x36')][_0xa011('0x3a')];this[_0xa011('0xe')][_0xa011('0x53')](_0x30908a)[_0xa011('0x13')](function(_0xcba614){_0x13863d(null,_[_0xa011('0x45')](_0xcba614)?![]:!![]);})[_0xa011('0x15')](function(_0x399d65){logger['error'](_0x399d65);_0x13863d(null,![]);});};AGIVertices[_0xa011('0x10')][_0xa011('0x54')]=function(_0x3b6379,_0x5e14d2){var _0x4392fc={'role':_0xa011('0x51')};_0x4392fc[_0x3b6379]=this['channel'][_0xa011('0x3a')];var _0x4bd33e=_0x3b6379!=_0xa011('0x55')?util['format']('%s/%s@from-sip/n',_0xa011('0x56'),this['channel'][_0xa011('0x3a')]):undefined;this[_0xa011('0xe')][_0xa011('0x54')](_0x4392fc,_0x4bd33e)[_0xa011('0x13')](function(_0x21c94a){_0x5e14d2(null,_[_0xa011('0x45')](_0x21c94a)?![]:!![]);})[_0xa011('0x15')](function(_0x44e359){logger[_0xa011('0x2c')](_0x44e359);_0x5e14d2(null,![]);});};AGIVertices['prototype'][_0xa011('0x57')]=function(_0x9f4eb5,_0x584a7f){sh[_0xa011('0x58')](_[_0xa011('0x59')](_0x9f4eb5),function(_0x415793,_0x469ad4){var _0x346b76=_0x469ad4[_0xa011('0x5a')](/(\r\n|\n|\r)/gm,'');_0x584a7f(null,_0x346b76);});};AGIVertices['prototype'][_0xa011('0x5b')]=function(_0x2f6f01,_0x3002fb){scripts['googleCloudTTS'](_0x2f6f01[_0xa011('0x5c')],_0x2f6f01['google_cloud_tts_text_type']||_0xa011('0x5d'),_0x2f6f01['text'],_0x2f6f01['languageCode']||_0xa011('0x5e'),_0x2f6f01['ssmlGender']||_0xa011('0x5f'),_0x2f6f01[_0xa011('0x60')]||_0xa011('0x61'))[_0xa011('0x13')](function(_0xf66b94){_0x3002fb(null,_0xf66b94);})['catch'](function(_0x4f7abc){_0x3002fb(_0x4f7abc);});};AGIVertices[_0xa011('0x10')][_0xa011('0x62')]=function(_0x42bd4e,_0x1092bc){scripts[_0xa011('0x62')](_0x42bd4e[_0xa011('0x5d')],_0x42bd4e[_0xa011('0x63')]||'en',0x1)[_0xa011('0x13')](function(_0x540bf9){_0x1092bc(null,_0x540bf9);})[_0xa011('0x15')](function(_0x1d4f87){_0x1092bc(_0x1d4f87);});};AGIVertices[_0xa011('0x10')]['restAPI']=function(_0x44c66a,_0xff9989){var _0x357583={'uri':_0x44c66a['url'],'method':_0x44c66a[_0xa011('0x64')],'json':!![],'resolveWithFullResponse':!![],'strictSSL':![],'timeout':typeof parseInt(_0x44c66a[_0xa011('0x65')])===_0xa011('0x66')&&parseInt(_0x44c66a[_0xa011('0x65')])>=0x1?parseInt(_0x44c66a[_0xa011('0x65')])*0x3e8:0x5*0x3e8};if(_[_0xa011('0x67')](['POST',_0xa011('0x68')],_0x357583[_0xa011('0x64')][_0xa011('0x69')]())){try{_0x357583[_0xa011('0x6a')]=_0x44c66a[_0xa011('0x6b')]?JSON['parse'](_0x44c66a[_0xa011('0x6b')]):{};}catch(_0x4badb5){logger[_0xa011('0x2c')](_0xa011('0x6c'),_0x4badb5);}}try{_0x357583[_0xa011('0x6d')]=_0x44c66a['rawHeaders']?JSON['parse'](_0x44c66a[_0xa011('0x6e')]):{};}catch(_0x2d6dff){logger[_0xa011('0x2c')](_0xa011('0x6f'),_0x2d6dff);}if(_0x44c66a['computedVariables']){try{var _0x2fc5f7=require(_0x44c66a[_0xa011('0x70')])[_0xa011('0x71')](this,_0x357583);_0x357583['uri']=Mustache['render'](_0x44c66a[_0xa011('0x72')],_0x2fc5f7,{},['$$','$$']);if(_0x357583[_0xa011('0x6d')]){_0x357583[_0xa011('0x6d')]=JSON[_0xa011('0x73')](Mustache[_0xa011('0x74')](JSON[_0xa011('0x75')](_0x357583['headers']),_0x2fc5f7,{},['$$','$$']));}if(_0x357583['body']){_0x357583['body']=JSON[_0xa011('0x73')](Mustache[_0xa011('0x74')](JSON[_0xa011('0x75')](_0x357583[_0xa011('0x6a')]),_0x2fc5f7,{},['$$','$$']));}}catch(_0x45490e){logger[_0xa011('0x2c')]('An\x20incorrect\x20formatted\x20json\x20has\x20been\x20passed\x20to\x20the\x20function',_0x45490e);}}rp(_0x357583)[_0xa011('0x13')](function(_0x1fb596){var _0x2c6bbd={'statusCode':_0x1fb596['statusCode']||0xc8,'statusMessage':_0x1fb596[_0xa011('0x76')]||'OK','headers':_0x1fb596[_0xa011('0x6d')]||{},'body':_0x1fb596[_0xa011('0x6a')]||{}};_0xff9989(null,_0x2c6bbd);})[_0xa011('0x15')](function(_0x371a71){var _0x57c6c3={'statusCode':_0x371a71['statusCode']||0x1f4,'statusMessage':_0x371a71['message']||'500\x20-\x20Internal\x20Server\x20Error','headers':_0x371a71['options']['headers']||{},'body':_0x371a71[_0xa011('0x77')][_0xa011('0x6a')]||{}};_0xff9989(null,_0x57c6c3);});};AGIVertices[_0xa011('0x10')][_0xa011('0x78')]=function(_0x33e182,_0x243925){scripts[_0xa011('0x78')](this[_0xa011('0x36')][_0xa011('0x37')],_0x33e182[_0xa011('0x79')],_0x33e182[_0xa011('0x5d')],_0x33e182[_0xa011('0x7a')]||'en')[_0xa011('0x13')](function(_0x6a7f38){_0x243925(null,_0x6a7f38);})['catch'](function(_0x43708d){_0x243925(_0x43708d);});};AGIVertices[_0xa011('0x10')]['googleDialogflowV2']=function(_0x156ee7,_0x526834){scripts['googleDialogflowV2'](this[_0xa011('0x36')][_0xa011('0x37')],_0x156ee7[_0xa011('0x7b')],_0x156ee7['client_email'],_0x156ee7[_0xa011('0x7c')],_0x156ee7[_0xa011('0x5d')],_0x156ee7['dialogflowV2_language']||'en')[_0xa011('0x13')](function(_0x38c62a){_0x526834(null,_0x38c62a);})[_0xa011('0x15')](function(_0x405e5b){_0x526834(_0x405e5b);});};AGIVertices['prototype'][_0xa011('0x7d')]=function(_0x223ccd,_0x339ee9){scripts['sestekNDA'](this[_0xa011('0x36')],_0x223ccd)['then'](function(_0x4228fd){_0x339ee9(null,_0x4228fd);})[_0xa011('0x15')](function(_0x1f77eb){_0x339ee9(_0x1f77eb);});};AGIVertices[_0xa011('0x10')]['ispeechTTS']=function(_0x5ad577,_0x326fae){scripts[_0xa011('0x7e')](_0x5ad577['key'],_0x5ad577[_0xa011('0x5d')],_0x5ad577[_0xa011('0x7f')]||'en-US',_0x5ad577[_0xa011('0x80')])['then'](function(_0x40d5e2){_0x326fae(null,_0x40d5e2);})['catch'](function(_0x58a7f2){_0x326fae(_0x58a7f2);});};AGIVertices[_0xa011('0x10')]['ispeechASR']=function(_0x571589,_0x18c5bc,_0x68e7ca){scripts[_0xa011('0x81')](_0x18c5bc,_0x571589[_0xa011('0x79')],_0x571589[_0xa011('0x82')]||_0xa011('0x5e'),this['isConfigured'](_0x571589['model'])?_0x571589[_0xa011('0x83')]:undefined)['then'](function(_0x408175){_0x68e7ca(null,_0x408175);})[_0xa011('0x15')](function(_0x3298a8){_0x68e7ca(_0x3298a8);});};AGIVertices['prototype'][_0xa011('0x84')]=function(_0x1c17c7,_0x26b9b3){scripts['awsPolly'](_0x1c17c7[_0xa011('0x85')],_0x1c17c7['aws_secret_access_key'],_0x1c17c7[_0xa011('0x86')],_0x1c17c7['aws_polly_voice']||'Amy',_0x1c17c7[_0xa011('0x5d')],_0x1c17c7[_0xa011('0x87')]||'text')[_0xa011('0x13')](function(_0x44335c){_0x26b9b3(null,_0x44335c);})[_0xa011('0x15')](function(_0x59824f){_0x26b9b3(_0x59824f);});};AGIVertices[_0xa011('0x10')][_0xa011('0x88')]=function(_0x2ef911,_0x39fe9b){scripts[_0xa011('0x88')](this[_0xa011('0x36')][_0xa011('0x37')],_0x2ef911[_0xa011('0x85')],_0x2ef911[_0xa011('0x89')],_0x2ef911[_0xa011('0x8a')],_0x2ef911[_0xa011('0x5d')],_0x2ef911[_0xa011('0x8b')])[_0xa011('0x13')](function(_0x25ac2e){_0x39fe9b(null,_0x25ac2e);})[_0xa011('0x15')](function(_0x11a86d){_0x39fe9b(_0x11a86d);});};AGIVertices['prototype'][_0xa011('0x8c')]=function(_0x4f6b3c,_0x252c63,_0x393813){scripts[_0xa011('0x8c')](_0x252c63,_0x4f6b3c['key'],_0x4f6b3c[_0xa011('0x8d')]||'en-US')['then'](function(_0x5e4cb9){_0x393813(null,_0x5e4cb9);})[_0xa011('0x15')](function(_0x56e6a2){_0x393813(_0x56e6a2);});};AGIVertices[_0xa011('0x10')]['tildeASR']=function(_0x4cd6ef,_0x571d5a,_0x3fa7fe){scripts[_0xa011('0x8e')](_0x571d5a,_0x4cd6ef[_0xa011('0x8f')],_0x4cd6ef[_0xa011('0x90')],_0x4cd6ef[_0xa011('0x91')])['then'](function(_0x3123e1){_0x3fa7fe(null,_0x3123e1);})[_0xa011('0x15')](function(_0x1562fa){_0x3fa7fe(_0x1562fa);});};AGIVertices[_0xa011('0x10')]['clear']=function(_0x3eac97){var _0x1e6cb8=_[_0xa011('0x67')](verticesWithRetry,_0x3eac97[_0xa011('0x38')])?_0x3eac97:_['clone'](_0x3eac97);for(var _0x319aa9 in _0x1e6cb8){if(_0x1e6cb8[_0xa011('0x92')](_0x319aa9)){if(_0x1e6cb8[_0x319aa9]&&_[_0xa011('0x93')](_0x1e6cb8[_0x319aa9])){if(_['includes'](recursiveMapAttributes,_0x319aa9)){_0x1e6cb8[_0x319aa9]=this[_0xa011('0x94')](_0x1e6cb8[_0x319aa9]);}else{_0x1e6cb8[_0x319aa9]=this['replaceAllVariables'](_0x1e6cb8[_0x319aa9]);}}}}return _0x1e6cb8;};AGIVertices[_0xa011('0x10')][_0xa011('0x95')]=function(_0x353241){for(var _0x535557 in _0x353241){if(_0x353241[_0xa011('0x92')](_0x535557)){if(_['isPlainObject'](_0x353241[_0x535557])){this[_0xa011('0x95')](_0x353241[_0x535557]);}else if(_[_0xa011('0x96')](_0x353241[_0x535557])){for(var _0x1f0e05=0x0;_0x1f0e05<_0x353241[_0x535557][_0xa011('0x97')];_0x1f0e05++){this['recursiveNodeIndex'](_0x353241[_0x535557][_0x1f0e05]);}}else if(_['isString'](_0x353241[_0x535557])){_0x353241[_0x535557]=this[_0xa011('0x98')](_0x353241[_0x535557]);}}}};AGIVertices[_0xa011('0x10')][_0xa011('0x99')]=function(_0x3885f5,_0x39aeeb){for(var _0xcd8f6 in _0x3885f5){if(_0x3885f5[_0xa011('0x92')](_0xcd8f6)){if(_[_0xa011('0x9a')](_0x3885f5[_0xcd8f6])){if(!_[_0xa011('0x9b')](_0x3885f5[_0xcd8f6])){this['saveRestApiResult'](_0x3885f5[_0xcd8f6],util[_0xa011('0x9c')]('%s.%s',_0x39aeeb,_0xcd8f6));}}else if(_[_0xa011('0x96')](_0x3885f5[_0xcd8f6])){for(var _0x206872=0x0;_0x206872<_0x3885f5[_0xcd8f6]['length'];_0x206872++){this[_0xa011('0x99')](_0x3885f5[_0xcd8f6][_0x206872],util['format'](_0xa011('0x9d'),_0x39aeeb,_0xcd8f6+'['+_0x206872+']'));}}else{if(!_['isNil'](_0x3885f5[_0xcd8f6])){this[_0xa011('0x36')][_0xa011('0x9e')](util[_0xa011('0x9c')](_0xa011('0x9d'),_0x39aeeb,_0xcd8f6),_0x3885f5[_0xcd8f6]);}}}}};AGIVertices[_0xa011('0x10')][_0xa011('0x94')]=function(_0xdfe1ce){try{var _0x6eb05d=JSON[_0xa011('0x73')](_0xdfe1ce);this[_0xa011('0x95')](_0x6eb05d);return JSON[_0xa011('0x75')](_0x6eb05d);}catch(_0x510149){return this[_0xa011('0x98')](_0xdfe1ce);}};AGIVertices['prototype']['replaceAllVariables']=function(_0x342566){var _0xccb72=_0x342566[_0xa011('0x9f')]('{');for(var _0x415a4a=0x1;_0x415a4a<_0xccb72[_0xa011('0x97')];_0x415a4a+=0x1){var _0x5b8338=_0xccb72[_0x415a4a][_0xa011('0x9f')]('}');if(_0x5b8338[_0xa011('0x97')]>0x1){_0x342566=_0x342566['replaceAll']('{'+_0x5b8338[0x0]+'}',this['channel'][_0xa011('0x11')](_0x5b8338[0x0])[_0xa011('0xa0')]||_0x5b8338[0x0]);}}if(_0xccb72[_0xa011('0x97')]===0x1){return _0x342566[_0xa011('0x4c')]();}return this['replaceAllVariables'](_0x342566);};AGIVertices[_0xa011('0x10')][_0xa011('0xa1')]=function(_0x3b446a,_0x18c1c9){var _0xa5c326=this[_0xa011('0x36')]['getVariable'](_0x3b446a);if(_0xa5c326[_0xa011('0xa2')]===-0x1){return _0xa5c326;}logger[_0xa011('0x2d')](util[_0xa011('0x9c')](_0xa011('0xa3'),_0x18c1c9,_0xa5c326[_0xa011('0xa0')]));return this['channel'][_0xa011('0x9e')](_0x18c1c9,_0xa5c326['extra']);};AGIVertices['prototype'][_0xa011('0xa4')]=function(_0xcdc222){return _0xcdc222&&_0xcdc222!=='0'&&_0xcdc222!=='-1'&&_0xcdc222!=='';};AGIVertices[_0xa011('0x10')][_0xa011('0xa5')]=function(_0xb6fd45){this['createSquareDetailsReport'][_0xa011('0x71')](this,_0xb6fd45,'-');_0xb6fd45[_0xa011('0xa6')]=_0xb6fd45[_0xa011('0xa5')];return{'code':0xc8,'result':'-'};};AGIVertices[_0xa011('0x10')][_0xa011('0xa7')]=function(_0x47d5e8){logger['info'](util[_0xa011('0x9c')](_0xa011('0xa8'),_0x47d5e8[_0xa011('0xa9')]));if(!this[_0xa011('0xa4')](_0x47d5e8[_0xa011('0x5d')])){return this[_0xa011('0x36')]['noop']('no\x20text\x20configured');}var _0x20011a='\x22'+_0x47d5e8['text']+'\x22';if(this[_0xa011('0xa4')](_0x47d5e8[_0xa011('0x77')])){_0x20011a+=','+_0x47d5e8[_0xa011('0x77')];}var _0x124653=this[_0xa011('0x36')][_0xa011('0x58')]('MRCPSynth',_0x20011a);if(_0x124653[_0xa011('0xa2')]===-0x1){return _0x124653;}return this[_0xa011('0x36')][_0xa011('0xaa')](util['format'](_0xa011('0xab'),_0x20011a));};AGIVertices[_0xa011('0x10')][_0xa011('0xac')]=function(_0x3909d5){logger[_0xa011('0x2d')](util[_0xa011('0x9c')]('Enter\x20in\x20MRCPRecog\x20(%s)\x20block',_0x3909d5[_0xa011('0xa9')]));if(!this[_0xa011('0xa4')](_0x3909d5['grammar'])){return this[_0xa011('0x36')][_0xa011('0xaa')]('no\x20grammar\x20configured');}var _0x331a2a=_0x3909d5[_0xa011('0xad')];if(this[_0xa011('0xa4')](_0x3909d5[_0xa011('0x77')])){_0x331a2a+=','+_0x3909d5[_0xa011('0x77')];}var _0x5806b2=this['channel'][_0xa011('0x58')](_0xa011('0xae'),_0x331a2a);if(_0x5806b2[_0xa011('0xa2')]===-0x1){return _0x5806b2;}var _0x4565ff=this['getAndSetVariable'](_0xa011('0xaf'),'MRCP_RECOG_CONFIDENCE');if(_0x4565ff[_0xa011('0xa2')]===-0x1){return _0x4565ff;}var _0x3be40f=this['getAndSetVariable'](_0xa011('0xb0'),'MRCP_RECOG_TRANSCRIPT');if(_0x3be40f[_0xa011('0xa2')]===-0x1){return _0x3be40f;}var _0x352cb9=this['getAndSetVariable'](_0xa011('0xb1'),'MRCP_RECOG_INSTANCE');if(_0x352cb9[_0xa011('0xa2')]===-0x1){return _0x352cb9;}return this[_0xa011('0x36')][_0xa011('0xaa')](util['format'](_0xa011('0xb2'),_0x331a2a));};AGIVertices['prototype']['agi']=function(_0x42638f){logger[_0xa011('0x2d')](util[_0xa011('0x9c')](_0xa011('0xb3'),_0x42638f[_0xa011('0xa9')]));return this[_0xa011('0x36')][_0xa011('0x9')]([_0x42638f[_0xa011('0xb4')],_0x42638f[_0xa011('0xb5')]]);};AGIVertices[_0xa011('0x10')]['answer']=function(_0x282a31){logger[_0xa011('0x2d')](util['format']('Enter\x20in\x20ANSWER\x20(%s)\x20block',_0x282a31[_0xa011('0xa9')]));if(this[_0xa011('0xa4')](_0x282a31[_0xa011('0x65')])){logger[_0xa011('0x2d')](util[_0xa011('0x9c')](_0xa011('0xb6'),_0x282a31[_0xa011('0x65')]));var _0xbb6732=this[_0xa011('0x36')]['wait'](_0x282a31['timeout']);if(_0xbb6732[_0xa011('0xa2')]===-0x1){return _0xbb6732;}}return this[_0xa011('0x36')][_0xa011('0xb7')]();};AGIVertices[_0xa011('0x10')]['callback']=function(_0x4431a5){logger['info'](util[_0xa011('0x9c')](_0xa011('0xb8'),_0x4431a5['label']));if(!this[_0xa011('0xa4')](_0x4431a5[_0xa011('0x48')])){return this[_0xa011('0x36')]['error'](_0x4431a5,_0xa011('0xb9'));}_0x4431a5[_0xa011('0x49')]=moment();if(this['isConfigured'](_0x4431a5[_0xa011('0xba')])){_0x4431a5[_0xa011('0x49')]=moment()[_0xa011('0xbb')](_0x4431a5[_0xa011('0xba')],_0xa011('0xbc'));}if(!this[_0xa011('0xa4')](_0x4431a5[_0xa011('0x4d')])){_0x4431a5[_0xa011('0x4d')]=0x2;}this['createCmContact'][_0xa011('0x71')](this,_0x4431a5);return this['channel']['noop'](util[_0xa011('0x9c')]('CALLBACK\x20added\x20phone:\x20%s\x20on\x20list:\x20%s\x20at\x20%s',_0x4431a5[_0xa011('0x47')],_0x4431a5[_0xa011('0x48')],_0x4431a5['scheduledAt']));};AGIVertices['prototype']['custom_app']=function(_0x590bae){logger['info'](util['format'](_0xa011('0xbd'),_0x590bae['label']));var _0x7a8ec9=this[_0xa011('0x36')][_0xa011('0x58')](_0x590bae[_0xa011('0xbe')],_0x590bae[_0xa011('0x77')]);if(_0x7a8ec9[_0xa011('0xa2')]===-0x1){return _0x7a8ec9;}return this['channel']['noop'](util[_0xa011('0x9c')](_0xa011('0xbf'),_0x590bae['application'],_0x590bae[_0xa011('0x77')]));};AGIVertices[_0xa011('0x10')]['lumenvoxtts']=function(_0x5cbd44){logger[_0xa011('0x2d')](util[_0xa011('0x9c')](_0xa011('0xc0'),_0x5cbd44[_0xa011('0xa9')]));if(!this[_0xa011('0xa4')](_0x5cbd44[_0xa011('0x5d')])){return this[_0xa011('0x36')][_0xa011('0xaa')](_0xa011('0xc1'));}var _0x39d701='\x22'+_0x5cbd44['text']+'\x22';if(this['isConfigured'](_0x5cbd44[_0xa011('0x77')])){_0x39d701+=','+_0x5cbd44[_0xa011('0x77')];}var _0x11a4a9=this[_0xa011('0x36')]['exec'](_0xa011('0xc2'),_0x39d701);if(_0x11a4a9[_0xa011('0xa2')]===-0x1){return _0x11a4a9;}return this['channel'][_0xa011('0xaa')](util[_0xa011('0x9c')](_0xa011('0xab'),_0x39d701));};AGIVertices['prototype'][_0xa011('0xc3')]=function(_0x50a200){logger[_0xa011('0x2d')](util[_0xa011('0x9c')]('Enter\x20in\x20SESTEKTTS\x20(%s)\x20block',_0x50a200[_0xa011('0xa9')]));if(!this[_0xa011('0xa4')](_0x50a200[_0xa011('0x5d')])){return this[_0xa011('0x36')][_0xa011('0xaa')]('no\x20text\x20configured');}var _0x34ed1a='\x22'+_0x50a200[_0xa011('0x5d')]+'\x22';if(this[_0xa011('0xa4')](_0x50a200[_0xa011('0x77')])){_0x34ed1a+=','+_0x50a200['options'];}var _0x51bf60=this[_0xa011('0x36')][_0xa011('0x58')](_0xa011('0xc2'),_0x34ed1a);if(_0x51bf60[_0xa011('0xa2')]===-0x1){return _0x51bf60;}return this[_0xa011('0x36')][_0xa011('0xaa')](util['format']('Executed\x20command\x20MRCPSynth\x20%s',_0x34ed1a));};AGIVertices[_0xa011('0x10')][_0xa011('0xc4')]=function(_0x380235){logger[_0xa011('0x2d')](util[_0xa011('0x9c')]('Enter\x20in\x20LUMENVOXASR\x20(%s)\x20block',_0x380235[_0xa011('0xa9')]));if(!this[_0xa011('0xa4')](_0x380235[_0xa011('0xad')])){return this[_0xa011('0x36')][_0xa011('0xaa')](_0xa011('0xc5'));}var _0x409bae=_0x380235[_0xa011('0xad')];if(this[_0xa011('0xa4')](_0x380235[_0xa011('0x77')])){_0x409bae+=','+_0x380235[_0xa011('0x77')];}var _0x3f5f4f=this[_0xa011('0x36')][_0xa011('0x58')]('MRCPRecog',_0x409bae);if(_0x3f5f4f[_0xa011('0xa2')]===-0x1){return _0x3f5f4f;}var _0x135944=this['getAndSetVariable']('RECOG_CONFIDENCE()',_0xa011('0xc6'));if(_0x135944['result']===-0x1){return _0x135944;}var _0x42c5a1=this[_0xa011('0xa1')](_0xa011('0xb0'),'LUMENVOX_ASR_TRANSCRIPT');if(_0x42c5a1[_0xa011('0xa2')]===-0x1){return _0x42c5a1;}var _0x2c2ac1=this['getAndSetVariable']('RECOG_INSTANCE()',_0xa011('0xc7'));if(_0x2c2ac1['result']===-0x1){return _0x2c2ac1;}return this[_0xa011('0x36')][_0xa011('0xaa')](util['format'](_0xa011('0xb2'),_0x409bae));};AGIVertices['prototype']['sestekasr']=function(_0x2b2647){logger[_0xa011('0x2d')](util[_0xa011('0x9c')](_0xa011('0xc8'),_0x2b2647[_0xa011('0xa9')]));if(!this[_0xa011('0xa4')](_0x2b2647[_0xa011('0xad')])){return this[_0xa011('0x36')]['noop'](_0xa011('0xc5'));}var _0x4f9e1e=_0x2b2647[_0xa011('0xad')];if(this['isConfigured'](_0x2b2647[_0xa011('0x77')])){_0x4f9e1e+=','+_0x2b2647[_0xa011('0x77')];}var _0x39f5a8=this[_0xa011('0x36')][_0xa011('0x58')](_0xa011('0xae'),_0x4f9e1e);if(_0x39f5a8['result']===-0x1){return _0x39f5a8;}var _0x1227a6=this['getAndSetVariable'](_0xa011('0xaf'),_0xa011('0xc9'));if(_0x1227a6[_0xa011('0xa2')]===-0x1){return _0x1227a6;}var _0x35ca03=this[_0xa011('0xa1')]('RECOG_INPUT()',_0xa011('0xca'));if(_0x35ca03[_0xa011('0xa2')]===-0x1){return _0x35ca03;}var _0x882947=this['getAndSetVariable'](_0xa011('0xb1'),_0xa011('0xcb'));if(_0x882947[_0xa011('0xa2')]===-0x1){return _0x882947;}return this['channel'][_0xa011('0xaa')](util[_0xa011('0x9c')](_0xa011('0xb2'),_0x4f9e1e));};AGIVertices[_0xa011('0x10')][_0xa011('0xcc')]=function(_0x4f9211){logger[_0xa011('0x2d')](util['format'](_0xa011('0xcd'),_0x4f9211['label']));if(!this[_0xa011('0xa4')](_0x4f9211[_0xa011('0xce')])){return this[_0xa011('0x36')]['error'](_0x4f9211,_0xa011('0xcf'));}var _0x2bc2c1=this[_0xa011('0xd0')]['sync'](this,_0x4f9211['odbc_id']);if(!_0x2bc2c1){return this[_0xa011('0x36')][_0xa011('0x2c')](_0x4f9211,'no\x20odbc\x20database\x20found');}if(!this['isConfigured'](_0x4f9211[_0xa011('0x2f')])){return this[_0xa011('0x36')][_0xa011('0x2c')](_0x4f9211,'no\x20query\x20configured');}var _0x5991d8=_0x4f9211[_0xa011('0x2f')][_0xa011('0x5a')](/(\r\n|\n|\r)/gm,'\x20');this[_0xa011('0x36')][_0xa011('0xaa')](util['format']('query:\x20%s',_0x5991d8));var _0x258cc1=this['getQueryOdbc'][_0xa011('0x71')](this,_0x2bc2c1,_0x5991d8);this[_0xa011('0x35')][_0xa011('0x71')](this,_0x4f9211,_0x5991d8);if(!this[_0xa011('0xa4')](_0x4f9211[_0xa011('0xd1')])){return this[_0xa011('0x36')][_0xa011('0xaa')](_0xa011('0xd2'));}var _0x115fb2=this['getVariable'][_0xa011('0x71')](this,_0x4f9211['variable_id']);if(!_0x115fb2){return this['channel'][_0xa011('0x2c')](_0x4f9211,'no\x20variable\x20found');}var _0x297966=this;_0x258cc1[_0xa011('0xd3')](function(_0x37bb90,_0x4bb212){Object[_0xa011('0xd4')](_0x37bb90)[_0xa011('0xd3')](function(_0xcf96bd){_0x297966[_0xa011('0x36')]['setVariable'](util['format'](_0xa011('0xd5'),_0x115fb2,_0x4bb212,_0xcf96bd),_0x37bb90[_0xcf96bd]);});});this[_0xa011('0x36')][_0xa011('0x9e')](util[_0xa011('0x9c')](_0xa011('0xd6'),_0x115fb2),_0x258cc1[_0xa011('0x97')]);return this[_0xa011('0x36')][_0xa011('0xaa')](util[_0xa011('0x9c')](_0xa011('0xd7'),_0x115fb2));};AGIVertices[_0xa011('0x10')][_0xa011('0xd8')]=function(_0x27531c){logger[_0xa011('0xd9')](util[_0xa011('0x9c')](_0xa011('0xda'),_0x27531c[_0xa011('0xa9')]));if(!this[_0xa011('0xa4')](_0x27531c[_0xa011('0xdb')])){return this[_0xa011('0x36')][_0xa011('0x2c')](_0x27531c,_0xa011('0xdc'));}var _0x3857b0=this['getUser'][_0xa011('0x71')](this,_0x27531c[_0xa011('0xdb')]);if(!_0x3857b0){return this['channel'][_0xa011('0x2c')](_0x27531c,_0xa011('0xdd'));}var _0x1af3df=this[_0xa011('0x36')][_0xa011('0x58')](_0xa011('0xde'),[util[_0xa011('0x9c')]('SIP/%s',_0x3857b0),_0x27531c['timeout'],_0x27531c[_0xa011('0xdf')],_0x27531c['url']]);if(_0x1af3df[_0xa011('0xa2')]===-0x1){return _0x1af3df;}return this[_0xa011('0x36')][_0xa011('0xaa')](util['format'](_0xa011('0xe0'),_0xa011('0xde')));};AGIVertices[_0xa011('0x10')]['dialogflow']=function(_0x23b4dd){logger[_0xa011('0x2d')](util['format'](_0xa011('0xe1'),_0x23b4dd[_0xa011('0xa9')]));if(!this[_0xa011('0xa4')](_0x23b4dd[_0xa011('0x79')])){return this[_0xa011('0x36')]['noop']('no\x20key\x20configured');}if(!this[_0xa011('0xa4')](_0x23b4dd[_0xa011('0x5d')])){return this[_0xa011('0x36')][_0xa011('0xaa')]('no\x20text\x20configured');}this[_0xa011('0x36')][_0xa011('0xe2')]=!![];this[_0xa011('0x35')](_0x23b4dd);this[_0xa011('0x41')](_0x23b4dd[_0xa011('0x5d')],'in','','');this[_0xa011('0x36')][_0xa011('0xaa')](util[_0xa011('0x9c')](_0xa011('0xe3'),_0x23b4dd['text']));var _0x3d7815=this[_0xa011('0x78')]['sync'](this,_0x23b4dd);if(_0x3d7815){for(var _0x19a390 in _0x3d7815){if(_0x3d7815[_0xa011('0x92')](_0x19a390)){this[_0xa011('0x36')][_0xa011('0x9e')](util[_0xa011('0x9c')]('DIALOGFLOW_%s',_0x19a390[_0xa011('0x69')]()),_0x3d7815[_0x19a390]);}}this['createSquareMessage'](_0x3d7815[_0xa011('0xe4')],'out','dialogflow','');return this['channel'][_0xa011('0xaa')](util[_0xa011('0x9c')](_0xa011('0xe5'),_0x3d7815[_0xa011('0xe4')]));}return this['channel']['error'](_0x23b4dd,_0xa011('0xe6'));};AGIVertices[_0xa011('0x10')][_0xa011('0xe7')]=function(_0x89273b){logger['info'](util[_0xa011('0x9c')]('Enter\x20in\x20DIALOGFLOW\x20V2\x20(%s)\x20block',_0x89273b[_0xa011('0xa9')]));if(!this[_0xa011('0xa4')](_0x89273b[_0xa011('0x7b')])){return this[_0xa011('0x36')][_0xa011('0xaa')](_0xa011('0xe8'));}if(!this[_0xa011('0xa4')](_0x89273b[_0xa011('0xe9')])){return this[_0xa011('0x36')][_0xa011('0xaa')](_0xa011('0xea'));}if(!this[_0xa011('0xa4')](_0x89273b[_0xa011('0x7c')])){return this[_0xa011('0x36')][_0xa011('0xaa')](_0xa011('0xeb'));}if(!this[_0xa011('0xa4')](_0x89273b[_0xa011('0xec')])){return this[_0xa011('0x36')][_0xa011('0xaa')]('no\x20anguage\x20configured');}if(!this['isConfigured'](_0x89273b[_0xa011('0x5d')])){return this[_0xa011('0x36')][_0xa011('0xaa')](_0xa011('0xc1'));}this[_0xa011('0x36')]['bot']=!![];this[_0xa011('0x35')](_0x89273b);this[_0xa011('0x41')](_0x89273b[_0xa011('0x5d')],'in','','');this['channel'][_0xa011('0xaa')](util[_0xa011('0x9c')](_0xa011('0xed'),_0x89273b[_0xa011('0x5d')]));var _0x463e8e=this['googleDialogflowV2'][_0xa011('0x71')](this,_0x89273b);if(_0x463e8e){for(var _0x51e622 in _0x463e8e){if(_0x463e8e[_0xa011('0x92')](_0x51e622)){if(_0x51e622!==_0xa011('0xee')){this['channel']['setVariable'](util[_0xa011('0x9c')]('DIALOGFLOW_%s',_0x51e622[_0xa011('0x69')]()),_0x463e8e[_0x51e622]);}}}this['createSquareMessage'](_0x463e8e[_0xa011('0xe4')],_0xa011('0xef'),_0xa011('0xe7'),_0x463e8e[_0xa011('0xee')]);return this[_0xa011('0x36')]['noop'](util[_0xa011('0x9c')]('DialogflowV2\x20Result\x20%s',_0x463e8e[_0xa011('0xe4')]));}return this['channel'][_0xa011('0x2c')](_0x89273b,_0xa011('0xf0'));};AGIVertices[_0xa011('0x10')][_0xa011('0xf1')]=function(_0x2f9372){logger['info'](util[_0xa011('0x9c')]('Enter\x20in\x20SESTEKNDA\x20(%s)\x20block',_0x2f9372[_0xa011('0xa9')]));if(!this[_0xa011('0xa4')](_0x2f9372[_0xa011('0xf2')])){return this[_0xa011('0x36')][_0xa011('0xaa')]('no\x20ndauth\x20url\x20configured');}if(!this['isConfigured'](_0x2f9372['username'])){return this[_0xa011('0x36')][_0xa011('0xaa')](_0xa011('0xf3'));}if(!this[_0xa011('0xa4')](_0x2f9372['password'])){return this['channel'][_0xa011('0xaa')]('no\x20password\x20configured');}if(!this['isConfigured'](_0x2f9372['ndassistant_url'])){return this[_0xa011('0x36')][_0xa011('0xaa')](_0xa011('0xc1'));}this[_0xa011('0x36')]['bot']=!![];this[_0xa011('0x35')](_0x2f9372);this[_0xa011('0x41')](_0x2f9372[_0xa011('0x5d')],'in','','');this[_0xa011('0x36')][_0xa011('0xaa')](util[_0xa011('0x9c')](_0xa011('0xf4'),_0x2f9372[_0xa011('0x5d')]));var _0x83ea1c=this[_0xa011('0x7d')]['sync'](this,_0x2f9372);if(_0x83ea1c){for(var _0x71c8a9 in _0x83ea1c){if(_0x83ea1c[_0xa011('0x92')](_0x71c8a9)){this[_0xa011('0x36')][_0xa011('0x9e')](util[_0xa011('0x9c')]('SESTEK_NDA_%s',_0x71c8a9[_0xa011('0x69')]()),_0x83ea1c[_0x71c8a9]);}}this['createSquareMessage'](_0x83ea1c[_0xa011('0xe4')],'out',_0xa011('0xf1'),'');if(_0x83ea1c[_0xa011('0xf5')]){this[_0xa011('0x36')]['noop'](util[_0xa011('0x9c')]('Sestek\x20NDA\x20%s\x20file\x20created',_0x83ea1c[_0xa011('0xf5')]));var _0x357e4c=this[_0xa011('0x36')][_0xa011('0xf6')](_0x83ea1c['audiofile']);try{fs[_0xa011('0xf7')](_0x83ea1c[_0xa011('0xf5')]+_0xa011('0xf8'));}catch(_0x396f7c){logger[_0xa011('0x2c')](_0x396f7c);}return _0x357e4c;}else{return this[_0xa011('0x36')]['noop'](util['format'](_0xa011('0xf9'),_0x83ea1c[_0xa011('0xe4')]));}}return this[_0xa011('0x36')][_0xa011('0x2c')](_0x2f9372,'SestekNDA\x20is\x20unreachable');};AGIVertices[_0xa011('0x10')][_0xa011('0xfa')]=function(_0x3325aa){logger[_0xa011('0x2d')](util[_0xa011('0x9c')](_0xa011('0xfb'),_0x3325aa['label']));return this[_0xa011('0x36')]['noop']('end');};AGIVertices[_0xa011('0x10')][_0xa011('0xfc')]=function(_0x4944cb){logger[_0xa011('0x2d')](util[_0xa011('0x9c')](_0xa011('0xfd'),_0x4944cb[_0xa011('0xa9')]));var _0x1a0611='';if(_0x4944cb['trunk_id']){if(!this[_0xa011('0xa4')](_0x4944cb[_0xa011('0xfe')])){return this['channel']['error'](_0x4944cb,_0xa011('0xff'));}else{var _0x2cd883=parseInt(_0x4944cb[_0xa011('0xfe')],0xa);if(isNaN(_0x2cd883)){_0x1a0611=_0x4944cb[_0xa011('0xfe')];}else{_0x1a0611=this[_0xa011('0x1d')][_0xa011('0x71')](this,_0x4944cb[_0xa011('0xfe')]);if(!_0x1a0611){return this[_0xa011('0x36')][_0xa011('0x2c')](_0x4944cb,'no\x20trunk\x20found');}}}}else if(_0x4944cb[_0xa011('0x100')]){_0x1a0611=_0x4944cb['trunk_name'];}else{return this[_0xa011('0x36')][_0xa011('0x2c')](_0x4944cb,_0xa011('0xff'));}var _0x445f7f=this['channel'][_0xa011('0x58')](_0xa011('0xde'),[util[_0xa011('0x9c')](_0xa011('0x101'),_0x1a0611,_0x4944cb['phone']),_0x4944cb[_0xa011('0x65')],_0x4944cb[_0xa011('0xdf')],_0x4944cb[_0xa011('0x72')]]);if(_0x445f7f[_0xa011('0xa2')]===-0x1){return _0x445f7f;}return this[_0xa011('0x36')][_0xa011('0xaa')](util[_0xa011('0x9c')](_0xa011('0xe0'),_0xa011('0xde')));};AGIVertices[_0xa011('0x10')]['finally']=function(_0x33a3d3){logger[_0xa011('0x2d')](util[_0xa011('0x9c')]('Enter\x20in\x20FINALLY\x20(%s)\x20block',_0x33a3d3[_0xa011('0xa9')]));return this[_0xa011('0x36')][_0xa011('0xaa')](_0xa011('0x102'));};AGIVertices[_0xa011('0x10')][_0xa011('0x103')]=function(_0x1c2139){logger[_0xa011('0x2d')](util[_0xa011('0x9c')](_0xa011('0x104'),_0x1c2139[_0xa011('0xa9')]));if(_0x1c2139[_0xa011('0xa6')]===0x0){return this[_0xa011('0xa5')](_0x1c2139);}_0x1c2139[_0xa011('0xa6')]-=0x1;if(!this[_0xa011('0xa4')](_0x1c2139[_0xa011('0x105')])){return this[_0xa011('0x36')][_0xa011('0x2c')](_0x1c2139,_0xa011('0x106'));}var _0x3fa5a7=this[_0xa011('0x1f')][_0xa011('0x71')](this,_0x1c2139[_0xa011('0x105')]);if(!_0x3fa5a7){return this[_0xa011('0x36')][_0xa011('0x2c')](_0x1c2139,_0xa011('0x107'));}if(!this[_0xa011('0xa4')](_0x1c2139[_0xa011('0xd1')])){return this[_0xa011('0x36')][_0xa011('0x2c')](_0xa011('0xd2'));}var _0x28a894=this['channel']['getData'](_0x3fa5a7,_0x1c2139[_0xa011('0x108')],_0x1c2139[_0xa011('0x109')]);var _0x24e229=_0x28a894['result']?_0x28a894[_0xa011('0xa2')][_0xa011('0x4c')]():'';logger[_0xa011('0x2d')](_0xa011('0x10a'),JSON['stringify'](_0x28a894));if(_0x28a894[_0xa011('0xa2')]===-0x1){this[_0xa011('0x35')][_0xa011('0x71')](this,_0x1c2139,_0x24e229);return _0x28a894;}else if(_0x28a894[_0xa011('0xa0')]===_0xa011('0x65')){_0x28a894[_0xa011('0xa2')]=_0x24e229[_0xa011('0x97')]>=parseInt(_0x1c2139[_0xa011('0x10b')])?'x':'i';}else{_0x28a894[_0xa011('0xa2')]=_0x24e229['length']>=parseInt(_0x1c2139[_0xa011('0x10b')])&&_0x24e229[_0xa011('0x97')]<=parseInt(_0x1c2139[_0xa011('0x109')])?'x':'i';}var _0x7425e9=this[_0xa011('0x11')][_0xa011('0x71')](this,_0x1c2139[_0xa011('0xd1')]);if(!_0x7425e9){return this[_0xa011('0x36')]['error'](_0x1c2139,'no\x20variable\x20found');}this[_0xa011('0x36')][_0xa011('0x9e')](_0x7425e9,_0x24e229);if(this[_0xa011('0xa4')](_0x1c2139[_0xa011('0x10c')])){var _0x430960=parseInt(_0x1c2139[_0xa011('0x10c')],0xa);var _0x911f51=rs[_0xa011('0x10d')]({'charset':'*','length':_0x430960});var _0x4b02dc=_0x24e229[_0xa011('0x97')];if(_0x4b02dc>0x0){if(_0x4b02dc>_0x430960){this['createSquareDetailsReport']['sync'](this,_0x1c2139,_0x1c2139[_0xa011('0x10e')]===_0xa011('0x10f')?_0x911f51+_0x24e229[_0xa011('0x110')](_0x430960):_0x24e229[_0xa011('0x110')](0x0,_0x4b02dc-_0x430960)+_0x911f51);}else{this[_0xa011('0x35')][_0xa011('0x71')](this,_0x1c2139,rs[_0xa011('0x10d')]({'charset':'*','length':_0x4b02dc}));}}else{this['createSquareDetailsReport'][_0xa011('0x71')](this,_0x1c2139,'');}}else{this['createSquareDetailsReport']['sync'](this,_0x1c2139,_0x24e229);}return _0x28a894;};AGIVertices[_0xa011('0x10')][_0xa011('0xd')]=function(_0x19d051){logger['info'](util[_0xa011('0x9c')](_0xa011('0x111'),_0x19d051[_0xa011('0xa9')]));return this['getdigits'](_0x19d051);};AGIVertices[_0xa011('0x10')][_0xa011('0x112')]=function(_0x3d4b97){logger[_0xa011('0x2d')](util[_0xa011('0x9c')]('Enter\x20in\x20GOAL\x20(%s)\x20block',_0x3d4b97[_0xa011('0xa9')]));this[_0xa011('0x35')]['sync'](this,_0x3d4b97,_0x3d4b97[_0xa011('0x113')]);return this[_0xa011('0x36')][_0xa011('0xaa')](util['format'](_0xa011('0x114'),_0x3d4b97[_0xa011('0x113')]));};AGIVertices[_0xa011('0x10')]['awspolly']=function(_0x28ad3a){logger[_0xa011('0x2d')](util[_0xa011('0x9c')](_0xa011('0x115'),_0x28ad3a[_0xa011('0xa9')]));if(!this['isConfigured'](_0x28ad3a[_0xa011('0x85')])||!this[_0xa011('0xa4')](_0x28ad3a[_0xa011('0x89')])){return this[_0xa011('0x36')][_0xa011('0xaa')](_0xa011('0x116'));}if(!this[_0xa011('0xa4')](_0x28ad3a[_0xa011('0x5d')])){return this[_0xa011('0x36')][_0xa011('0xaa')]('no\x20text\x20configured');}this[_0xa011('0x36')][_0xa011('0xaa')](util[_0xa011('0x9c')](_0xa011('0x117'),_0x28ad3a[_0xa011('0x5d')]));var _0x3077df=this['awsPolly'][_0xa011('0x71')](this,_0x28ad3a);if(_0x3077df){this[_0xa011('0x36')][_0xa011('0xaa')](util[_0xa011('0x9c')](_0xa011('0x118'),_0x3077df));var _0xb8b217=this['channel']['streamFile'](_0x3077df);try{fs[_0xa011('0xf7')](_0x3077df+_0xa011('0xf8'));}catch(_0x235752){logger[_0xa011('0x2c')](_0x235752);}return _0xb8b217;}return this[_0xa011('0x36')][_0xa011('0x2c')](_0x28ad3a,_0xa011('0x119'));};AGIVertices[_0xa011('0x10')][_0xa011('0x11a')]=function(_0x547f8d){logger[_0xa011('0x2d')](util['format'](_0xa011('0x11b'),_0x547f8d['label']));if(!this[_0xa011('0xa4')](_0x547f8d[_0xa011('0x85')])||!this[_0xa011('0xa4')](_0x547f8d[_0xa011('0x89')])){return this[_0xa011('0x36')][_0xa011('0xaa')](_0xa011('0x116'));}if(!this['isConfigured'](_0x547f8d[_0xa011('0x8b')])){return this[_0xa011('0x36')][_0xa011('0xaa')](_0xa011('0x11c'));}if(!this[_0xa011('0xa4')](_0x547f8d[_0xa011('0x5d')])){return this[_0xa011('0x36')][_0xa011('0xaa')]('no\x20text\x20configured');}this['channel']['bot']=!![];this[_0xa011('0x35')](_0x547f8d);this['createSquareMessage'](_0x547f8d[_0xa011('0x5d')],'in','','');this['channel'][_0xa011('0xaa')](util[_0xa011('0x9c')](_0xa011('0x11d'),_0x547f8d['text']));var _0x5c501c=this[_0xa011('0x88')][_0xa011('0x71')](this,_0x547f8d);if(_0x5c501c){for(var _0x5c39e9 in _0x5c501c){if(_0x5c501c['hasOwnProperty'](_0x5c39e9)&&_[_0xa011('0x93')](_0x5c501c[_0x5c39e9])){this[_0xa011('0x36')]['setVariable'](util[_0xa011('0x9c')](_0xa011('0x11e'),_0x5c39e9[_0xa011('0x69')]()),_0x5c501c[_0x5c39e9]);}}if(_[_0xa011('0x45')](_0x5c501c[_0xa011('0x11f')])){return this['channel']['noop'](_0xa011('0x120'));}else{this[_0xa011('0x41')](_0x5c501c[_0xa011('0x11f')],_0xa011('0xef'),_0xa011('0x121'),'');return this[_0xa011('0x36')][_0xa011('0xaa')](util[_0xa011('0x9c')]('Amazon\x20Lex\x20Result\x20%s',_0x5c501c[_0xa011('0x11f')]));}}return this['channel'][_0xa011('0x2c')](_0x547f8d,_0xa011('0x122'));};AGIVertices[_0xa011('0x10')][_0xa011('0x123')]=function(_0x59f797){logger[_0xa011('0x2d')](util[_0xa011('0x9c')](_0xa011('0x124'),_0x59f797[_0xa011('0xa9')],_0x59f797[_0xa011('0x65')]));if(!this[_0xa011('0xa4')](_0x59f797[_0xa011('0x79')])){return this[_0xa011('0x36')]['noop'](_0xa011('0x125'));}var _0x363df2='wav';var _0x19cb71=util['format'](_0xa011('0x126'),FILES_PATH,rs['generate'](0x4));var _0x207712=util[_0xa011('0x9c')](_0xa011('0x9d'),_0x19cb71,_0x363df2);var _0x1fd5e5=!![];if(_0x59f797['beep']===_0xa011('0x127')){_0x1fd5e5=![];}var _0x130e9d=this[_0xa011('0x36')][_0xa011('0x128')](_0x19cb71,_0x363df2,_0x59f797[_0xa011('0x129')],_0x59f797[_0xa011('0x65')],undefined,_0x1fd5e5);if(_0x130e9d[_0xa011('0xa2')]!==-0x1){this[_0xa011('0x36')][_0xa011('0xaa')](util['format']('google\x20%s\x20file\x20created',_0x207712));var _0x318151=this[_0xa011('0x8c')][_0xa011('0x71')](this,_0x59f797,_0x207712);if(_0x318151){for(var _0x4e224f in _0x318151){if(_0x318151[_0xa011('0x92')](_0x4e224f)){this[_0xa011('0x36')][_0xa011('0x9e')](util[_0xa011('0x9c')](_0xa011('0x12a'),_0x4e224f[_0xa011('0x69')]()),_0x318151[_0x4e224f]);}}return this[_0xa011('0x36')][_0xa011('0xaa')](util[_0xa011('0x9c')]('GoogleASR\x20Result\x20%s',JSON['stringify'](_0x318151)));}}return _0x130e9d;};AGIVertices[_0xa011('0x10')][_0xa011('0x12b')]=function(_0x3df80c){logger['info'](util['format']('Enter\x20in\x20TILDEASR\x20(%s)\x20block',_0x3df80c[_0xa011('0xa9')]));if(!this[_0xa011('0xa4')](_0x3df80c[_0xa011('0x8f')])){return this[_0xa011('0x36')][_0xa011('0xaa')](_0xa011('0x12c'));}if(!this[_0xa011('0xa4')](_0x3df80c[_0xa011('0x90')])){return this[_0xa011('0x36')][_0xa011('0xaa')](_0xa011('0x12d'));}var _0x2ee1f4='wav';var _0x222e9b=util[_0xa011('0x9c')](_0xa011('0x126'),FILES_PATH,rs[_0xa011('0x10d')](0x4));var _0x2459fc=util[_0xa011('0x9c')](_0xa011('0x9d'),_0x222e9b,_0x2ee1f4);var _0x4b3509=!![];if(_0x3df80c['beep']==='NOBEEP'){_0x4b3509=![];}var _0x1c5d2a=this[_0xa011('0x36')][_0xa011('0x128')](_0x222e9b,_0x2ee1f4,_0x3df80c['intKey'],_0x3df80c['timeout'],undefined,_0x4b3509);if(_0x1c5d2a['result']!==-0x1){this[_0xa011('0x36')][_0xa011('0xaa')](util['format'](_0xa011('0x12e'),_0x2459fc));var _0x2b1b5d=this[_0xa011('0x8e')][_0xa011('0x71')](this,_0x3df80c,_0x2459fc);if(_0x2b1b5d){for(var _0x775c6b in _0x2b1b5d){if(_0x2b1b5d[_0xa011('0x92')](_0x775c6b)){this[_0xa011('0x36')][_0xa011('0x9e')](util[_0xa011('0x9c')](_0xa011('0x12f'),_0x775c6b[_0xa011('0x69')]()),_0x2b1b5d[_0x775c6b]);}}return this['channel'][_0xa011('0xaa')](util[_0xa011('0x9c')](_0xa011('0x130'),JSON[_0xa011('0x75')](_0x2b1b5d)));}}return _0x1c5d2a;};AGIVertices['prototype']['gotoc']=function(_0x2e0be6){logger[_0xa011('0x2d')](util[_0xa011('0x9c')]('Enter\x20in\x20GOTO\x20(%s)\x20block',_0x2e0be6['label']));return this[_0xa011('0x36')][_0xa011('0x131')](_0x2e0be6['context'],_0x2e0be6[_0xa011('0x132')],_0x2e0be6[_0xa011('0x3d')]);};AGIVertices['prototype'][_0xa011('0x133')]=function(_0x36eb83){logger[_0xa011('0x2d')](util[_0xa011('0x9c')]('Enter\x20in\x20GOTOIF\x20(%s)\x20block',_0x36eb83[_0xa011('0xa9')]));if(!this['isConfigured'](_0x36eb83[_0xa011('0x134')])){return this[_0xa011('0x36')][_0xa011('0x2c')](_0x36eb83,_0xa011('0x135'));}try{var _0x5b2c79=eval(_0x36eb83['condition'])?_0xa011('0x136'):_0xa011('0x137');this[_0xa011('0x36')][_0xa011('0xaa')](util[_0xa011('0x9c')](_0xa011('0x138'),_0x36eb83[_0xa011('0x134')],_0x5b2c79));return{'code':0xc8,'result':_0x5b2c79};}catch(_0x41022b){return{'code':0xc8,'result':_0xa011('0x137')};}};AGIVertices[_0xa011('0x10')][_0xa011('0x139')]=function(_0x45a454){logger[_0xa011('0x2d')](util[_0xa011('0x9c')](_0xa011('0x13a'),_0x45a454[_0xa011('0xa9')]));if(!this[_0xa011('0xa4')](_0x45a454['interval_id'])){return this[_0xa011('0x36')][_0xa011('0x2c')](_0x45a454,_0xa011('0x13b'));}var _0x1598e7=this[_0xa011('0x24')][_0xa011('0x71')](this,_0x45a454[_0xa011('0x13c')]);if(!_0x1598e7){return this[_0xa011('0x36')][_0xa011('0x2c')](_0x45a454,_0xa011('0x13d'));}for(var _0x47a33e=0x0;_0x47a33e<_0x1598e7[_0xa011('0x97')];_0x47a33e+=0x1){var _0x52c057=this[_0xa011('0x36')][_0xa011('0x11')](util[_0xa011('0x9c')](_0xa011('0x13e'),_0x1598e7[_0x47a33e]));if(_0x52c057[_0xa011('0xa2')]===-0x1){return _0x52c057;}logger[_0xa011('0x2d')](util[_0xa011('0x9c')](_0xa011('0x13f'),_0x1598e7[_0x47a33e],_0x52c057[_0xa011('0xa0')]));if(_0x52c057[_0xa011('0xa0')]===_0xa011('0x136')){logger[_0xa011('0x2d')](util['format']('IFTIME\x20%s\x20%s',_0x1598e7[_0x47a33e],_0xa011('0x136')));this['channel']['noop'](util[_0xa011('0x9c')](_0xa011('0x13f'),_0x1598e7[_0x47a33e],_0xa011('0x136')));return{'code':0xc8,'result':_0xa011('0x136')};}else{logger[_0xa011('0x2d')](util[_0xa011('0x9c')](_0xa011('0x13f'),_0x1598e7[_0x47a33e],'false'));this['channel'][_0xa011('0xaa')](util[_0xa011('0x9c')](_0xa011('0x13f'),_0x1598e7[_0x47a33e],_0xa011('0x137')));}}return{'code':0xc8,'result':_0xa011('0x137')};};AGIVertices[_0xa011('0x10')][_0xa011('0x140')]=function(_0x5d3498){logger[_0xa011('0x2d')](util[_0xa011('0x9c')]('Enter\x20in\x20HANGUP\x20(%s)\x20block',_0x5d3498['label']));return this['channel'][_0xa011('0x140')]();};AGIVertices[_0xa011('0x10')]['ispeechasr']=function(_0x14b697){logger['info'](util[_0xa011('0x9c')](_0xa011('0x141'),_0x14b697[_0xa011('0xa9')]));if(!this[_0xa011('0xa4')](_0x14b697[_0xa011('0x79')])){return this[_0xa011('0x36')][_0xa011('0xaa')]('no\x20key\x20configured');}var _0xba1dea=_0xa011('0x142');var _0x8df5f6=util[_0xa011('0x9c')]('%s/recordings/%s',FILES_PATH,rs[_0xa011('0x10d')](0x4));var _0x371b9c=util[_0xa011('0x9c')](_0xa011('0x9d'),_0x8df5f6,_0xba1dea);var _0x387959=!![];if(_0x14b697[_0xa011('0x143')]===_0xa011('0x127')){_0x387959=![];}var _0x3f1611=this[_0xa011('0x36')][_0xa011('0x128')](_0x8df5f6,_0xba1dea,_0x14b697[_0xa011('0x129')],_0x14b697[_0xa011('0x65')],undefined,_0x387959);if(_0x3f1611[_0xa011('0xa2')]!==-0x1){this[_0xa011('0x36')][_0xa011('0xaa')](util[_0xa011('0x9c')]('ispeech\x20%s\x20file\x20created',_0x371b9c));var _0x28ae9e=this[_0xa011('0x81')]['sync'](this,_0x14b697,_0x371b9c);if(_0x28ae9e){for(var _0xfaa6e1 in _0x28ae9e){if(_0x28ae9e['hasOwnProperty'](_0xfaa6e1)){this[_0xa011('0x36')][_0xa011('0x9e')](util[_0xa011('0x9c')](_0xa011('0x144'),_0xfaa6e1['toUpperCase']()),_0x28ae9e[_0xfaa6e1]);}}return this['channel'][_0xa011('0xaa')](util['format'](_0xa011('0x145'),JSON[_0xa011('0x75')](_0x28ae9e)));}}return _0x3f1611;};AGIVertices['prototype'][_0xa011('0x146')]=function(_0xd52268){logger[_0xa011('0x2d')](util['format'](_0xa011('0x147'),_0xd52268[_0xa011('0xa9')]));if(!this['isConfigured'](_0xd52268['key'])){return this[_0xa011('0x36')]['noop']('no\x20key\x20configured');}if(!this[_0xa011('0xa4')](_0xd52268[_0xa011('0x5d')])){return this[_0xa011('0x36')]['noop'](_0xa011('0xc1'));}this[_0xa011('0x36')][_0xa011('0xaa')](util[_0xa011('0x9c')]('Trying\x20ispeech\x20TTS\x20%s',_0xd52268[_0xa011('0x5d')]));var _0x1024f6=this[_0xa011('0x7e')][_0xa011('0x71')](this,_0xd52268);if(_0x1024f6){this[_0xa011('0x36')][_0xa011('0xaa')](util[_0xa011('0x9c')](_0xa011('0x148'),_0x1024f6));var _0x43f6b7=this[_0xa011('0x36')][_0xa011('0xf6')](_0x1024f6,_0xd52268[_0xa011('0x129')]);try{fs[_0xa011('0xf7')](_0x1024f6+_0xa011('0xf8'));}catch(_0x3c718e){logger[_0xa011('0x2c')](_0x3c718e);}return _0x43f6b7;}return this[_0xa011('0x36')][_0xa011('0x2c')](_0xd52268,_0xa011('0x149'));};AGIVertices[_0xa011('0x10')][_0xa011('0x14a')]=function(_0x8fdf28){logger[_0xa011('0x2d')](util[_0xa011('0x9c')](_0xa011('0x14b'),_0x8fdf28[_0xa011('0xa9')]));if(!this['isConfigured'](_0x8fdf28['findBy'])){return this['channel']['error'](_0x8fdf28,_0xa011('0x14c'));}logger[_0xa011('0x2d')](util[_0xa011('0x9c')](_0xa011('0x14d'),this[_0xa011('0x36')][_0xa011('0x3a')],_0x8fdf28[_0xa011('0x14e')]));var _0x1af393=this['agentLogin']['sync'](this,_0x8fdf28[_0xa011('0x14e')]);if(_0x1af393){logger[_0xa011('0x2d')](util[_0xa011('0x9c')](_0xa011('0x14f'),this[_0xa011('0x36')][_0xa011('0x3a')],_0x8fdf28[_0xa011('0x14e')]));this['channel'][_0xa011('0xaa')](util['format'](_0xa011('0x14f'),this[_0xa011('0x36')]['callerid'],_0x8fdf28[_0xa011('0x14e')]));return{'code':0xc8,'result':_0xa011('0x150')};}else{logger['info'](util[_0xa011('0x9c')](_0xa011('0x151'),this['channel'][_0xa011('0x3a')],_0x8fdf28[_0xa011('0x14e')]));this[_0xa011('0x36')][_0xa011('0xaa')](util[_0xa011('0x9c')](_0xa011('0x151'),this[_0xa011('0x36')][_0xa011('0x3a')],_0x8fdf28['findBy']));return{'code':0xc8,'result':_0xa011('0x152')};}};AGIVertices[_0xa011('0x10')][_0xa011('0x153')]=function(_0x4067ff){logger[_0xa011('0x2d')](util[_0xa011('0x9c')](_0xa011('0x154'),_0x4067ff[_0xa011('0xa9')]));if(!this[_0xa011('0xa4')](_0x4067ff['findBy'])){return this[_0xa011('0x36')][_0xa011('0x2c')](_0x4067ff,_0xa011('0x14c'));}logger[_0xa011('0x2d')](util[_0xa011('0x9c')](_0xa011('0x14d'),this[_0xa011('0x36')][_0xa011('0x3a')],_0x4067ff[_0xa011('0x14e')]));var _0xa292da=this[_0xa011('0x53')][_0xa011('0x71')](this,_0x4067ff[_0xa011('0x14e')]);if(_0xa292da){logger['info'](util['format'](_0xa011('0x14f'),this['channel']['callerid'],_0x4067ff[_0xa011('0x14e')]));this[_0xa011('0x36')][_0xa011('0xaa')](util[_0xa011('0x9c')](_0xa011('0x14f'),this['channel']['callerid'],_0x4067ff[_0xa011('0x14e')]));return{'code':0xc8,'result':'success'};}else{logger[_0xa011('0x2d')](util[_0xa011('0x9c')]('AGENT\x20%s\x20NOT\x20FOUND\x20BY',this[_0xa011('0x36')][_0xa011('0x3a')],_0x4067ff[_0xa011('0x14e')]));this[_0xa011('0x36')][_0xa011('0xaa')](util[_0xa011('0x9c')](_0xa011('0x151'),this[_0xa011('0x36')][_0xa011('0x3a')],_0x4067ff[_0xa011('0x14e')]));return{'code':0xc8,'result':_0xa011('0x152')};}};AGIVertices['prototype'][_0xa011('0x155')]=function(_0x3e022f){logger[_0xa011('0x2d')](util[_0xa011('0x9c')](_0xa011('0x156'),_0x3e022f[_0xa011('0xa9')]));if(!this['isConfigured'](_0x3e022f[_0xa011('0x157')])){return this['channel']['error'](_0x3e022f,_0xa011('0x158'));}this[_0xa011('0x36')]['noop'](util[_0xa011('0x9c')]('math\x20%s',_0x3e022f['operation']));var _0x3d3a87=eval(_0x3e022f[_0xa011('0x157')]);if(!this[_0xa011('0xa4')](_0x3e022f[_0xa011('0xd1')])){return this[_0xa011('0x36')][_0xa011('0xaa')]('no\x20variable\x20selected\x20for\x20the\x20result');}var _0x2ba5d3=this[_0xa011('0x11')][_0xa011('0x71')](this,_0x3e022f['variable_id']);if(!_0x2ba5d3){return this['channel'][_0xa011('0x2c')](_0x3e022f,'no\x20variable\x20found');}if(_[_0xa011('0x96')](_0x3d3a87)){var _0x3a2f63=this;_0x3d3a87[_0xa011('0xd3')](function(_0x57142c,_0x473101){_0x3a2f63[_0xa011('0x36')][_0xa011('0x9e')](util[_0xa011('0x9c')](_0xa011('0x159'),_0x2ba5d3,_0x473101),_0x57142c);});return this[_0xa011('0x36')][_0xa011('0xaa')](util[_0xa011('0x9c')](_0xa011('0x15a'),_0x2ba5d3));}else{return this[_0xa011('0x36')]['setVariable'](_0x2ba5d3,_0x3d3a87);}};AGIVertices[_0xa011('0x10')][_0xa011('0xc')]=function(_0x452061){logger[_0xa011('0x2d')](util['format'](_0xa011('0x15b'),_0x452061[_0xa011('0xa9')]));if(_0x452061[_0xa011('0xa6')]===0x0){return this[_0xa011('0xa5')](_0x452061);}_0x452061[_0xa011('0xa6')]-=0x1;if(!this[_0xa011('0xa4')](_0x452061[_0xa011('0x105')])){return this[_0xa011('0x36')][_0xa011('0x2c')](_0x452061,_0xa011('0x106'));}var _0x4ddbbe=this[_0xa011('0x1f')][_0xa011('0x71')](this,_0x452061[_0xa011('0x105')]);if(!_0x4ddbbe){return this[_0xa011('0x36')][_0xa011('0x2c')](_0x452061,'no\x20file\x20audio\x20found');}var _0x1ed041=this[_0xa011('0x36')][_0xa011('0x15c')](_0x4ddbbe,_0x452061[_0xa011('0x108')],_0x452061[_0xa011('0x15d')]);var _0x3658f4=_0x1ed041[_0xa011('0xa2')];if(_0x1ed041[_0xa011('0xa2')]===-0x1){this[_0xa011('0x35')][_0xa011('0x71')](this,_0x452061,'-1');return _0x1ed041;}else if(_0x1ed041[_0xa011('0xa0')]===_0xa011('0x65')){_0x1ed041['result']=_0x1ed041[_0xa011('0xa2')][_0xa011('0x97')]>0x0?_0x1ed041[_0xa011('0xa2')]:'t';}else if(_[_0xa011('0x9b')](_0x1ed041['result'])){_0x1ed041[_0xa011('0xa2')]='#';_0x3658f4='#';}if(!this[_0xa011('0xa4')](_0x452061[_0xa011('0xd1')])){this['channel']['noop']('no\x20variable\x20selected\x20for\x20the\x20result');}else{var _0x224a93=this[_0xa011('0x11')][_0xa011('0x71')](this,_0x452061[_0xa011('0xd1')]);if(!_0x224a93){return this[_0xa011('0x36')][_0xa011('0x2c')](_0x452061,_0xa011('0x15e'));}this[_0xa011('0x36')][_0xa011('0x9e')](_0x224a93,_0x3658f4);}this[_0xa011('0x35')][_0xa011('0x71')](this,_0x452061,_0x3658f4);return _0x1ed041;};AGIVertices[_0xa011('0x10')][_0xa011('0xaa')]=function(_0x5f59c7){logger[_0xa011('0x2d')](util[_0xa011('0x9c')](_0xa011('0x15f'),_0x5f59c7[_0xa011('0xa9')]));return this['channel'][_0xa011('0xaa')](_0x5f59c7[_0xa011('0x160')]||_0x5f59c7[_0xa011('0xa9')]);};AGIVertices[_0xa011('0x10')][_0xa011('0x161')]=function(_0x1ae2f8){logger['info'](util[_0xa011('0x9c')](_0xa011('0x162'),_0x1ae2f8['label']));if(!this[_0xa011('0xa4')](_0x1ae2f8[_0xa011('0x14e')])){return this[_0xa011('0x36')][_0xa011('0x2c')](_0x1ae2f8,_0xa011('0x14c'));}logger[_0xa011('0x2d')](util[_0xa011('0x9c')](_0xa011('0x14d'),this[_0xa011('0x36')]['callerid'],_0x1ae2f8[_0xa011('0x14e')]));var _0x248da5=this[_0xa011('0x4e')][_0xa011('0x71')](this,_0x1ae2f8['pause_id']);var _0xce1ebf=this['agentPause'][_0xa011('0x71')](this,_0x1ae2f8['findBy'],_0x248da5);if(_0xce1ebf){logger[_0xa011('0x2d')](util[_0xa011('0x9c')](_0xa011('0x14f'),this['channel']['callerid'],_0x1ae2f8[_0xa011('0x14e')]));this['channel'][_0xa011('0xaa')](util[_0xa011('0x9c')]('AGENT\x20%s\x20FOUND\x20BY',this[_0xa011('0x36')]['callerid'],_0x1ae2f8['findBy']));return{'code':0xc8,'result':'success'};}else{logger[_0xa011('0x2d')](util[_0xa011('0x9c')](_0xa011('0x151'),this['channel'][_0xa011('0x3a')],_0x1ae2f8['findBy']));this['channel'][_0xa011('0xaa')](util['format'](_0xa011('0x14f'),this[_0xa011('0x36')]['callerid'],_0x1ae2f8[_0xa011('0x14e')]));return{'code':0xc8,'result':_0xa011('0x152')};}};AGIVertices[_0xa011('0x10')][_0xa011('0x163')]=function(_0xd891a5){logger[_0xa011('0x2d')](util[_0xa011('0x9c')]('Enter\x20in\x20PLAYBACK\x20(%s)\x20block',_0xd891a5[_0xa011('0xa9')]));if(!this[_0xa011('0xa4')](_0xd891a5[_0xa011('0x105')])){return this[_0xa011('0x36')][_0xa011('0x2c')](_0xd891a5,_0xa011('0x106'));}var _0x19d3d3=this[_0xa011('0x1f')][_0xa011('0x71')](this,_0xd891a5[_0xa011('0x105')]);if(!_0x19d3d3){return this[_0xa011('0x36')]['error'](_0xd891a5,'no\x20file\x20audio\x20found');}var _0x2b2803=this[_0xa011('0x36')][_0xa011('0x58')](_0xa011('0x164'),[_0x19d3d3,_0xd891a5[_0xa011('0xdf')]]);if(_0x2b2803[_0xa011('0xa2')]===-0x1){return _0x2b2803;}return this[_0xa011('0x36')][_0xa011('0xaa')](util['format'](_0xa011('0xbf'),_0xa011('0x164'),_0x19d3d3));};AGIVertices[_0xa011('0x10')]['queue']=function(_0x103d02){logger[_0xa011('0x2d')](util[_0xa011('0x9c')](_0xa011('0x165'),_0x103d02['label']));if(!this[_0xa011('0xa4')](_0x103d02[_0xa011('0x166')])){return this[_0xa011('0x36')]['error'](_0x103d02,_0xa011('0x167'));}var _0x2f176c='';var _0x29658f=parseInt(_0x103d02[_0xa011('0x166')],0xa);if(isNaN(_0x29658f)){_0x2f176c=_0x103d02['queue_id'];}else{_0x2f176c=this[_0xa011('0x16')][_0xa011('0x71')](this,_0x103d02['queue_id']);if(!_0x2f176c){return this['channel']['error'](_0x103d02,_0xa011('0x168'));}}var _0x1c8994='';if(this[_0xa011('0xa4')](_0x103d02[_0xa011('0x105')])){var _0x17d9cc=this[_0xa011('0x1f')][_0xa011('0x71')](this,_0x103d02[_0xa011('0x105')]);if(_0x17d9cc){_0x1c8994=_0x17d9cc;}}this[_0xa011('0x35')][_0xa011('0x71')](this,_0x103d02,_0x2f176c);if(_0x103d02[_0xa011('0xdf')]['indexOf']('x')<0x0){_0x103d02[_0xa011('0xdf')]+='x';}if(_0x103d02[_0xa011('0xdf')][_0xa011('0x169')]('X')<0x0){_0x103d02[_0xa011('0xdf')]+='X';}this[_0xa011('0x36')][_0xa011('0x9e')](_0xa011('0x16a'),_0x2f176c?_0x2f176c[_0xa011('0x16b')]():'');var _0x537c89=this[_0xa011('0x36')][_0xa011('0x58')]('QUEUE',[_0x2f176c,_0x103d02[_0xa011('0xdf')],_0x103d02['url'],_0x1c8994,_0x103d02[_0xa011('0x65')],_0x103d02[_0xa011('0x9')],_0x103d02[_0xa011('0x16c')],_0x103d02[_0xa011('0x16d')],'',_0x103d02[_0xa011('0x16e')]]);if(_0x537c89[_0xa011('0xa2')]===-0x1){return _0x537c89;}return this['channel'][_0xa011('0xaa')](util[_0xa011('0x9c')](_0xa011('0xbf'),_0xa011('0x16f'),_0x2f176c));};AGIVertices['prototype'][_0xa011('0x170')]=function(_0x1b5f42){logger[_0xa011('0x2d')](util[_0xa011('0x9c')](_0xa011('0x171'),_0x1b5f42[_0xa011('0xa9')]));var _0x3c1671=_0x1b5f42['recordingFormat']||'wav';var _0x3bb3d4=util[_0xa011('0x9c')](_0xa011('0x172'),this[_0xa011('0x36')][_0xa011('0x37')],rs[_0xa011('0x10d')](0x5));var _0x834c43=util['format']('%s/recordings/%s.%s',FILES_PATH,_0x3bb3d4,_0x3c1671);var _0x5c43c5=util[_0xa011('0x9c')]('%s/recordings/%s',FILES_PATH,_0x3bb3d4);this[_0xa011('0x3b')]['sync'](this,_0x1b5f42,_0x3bb3d4,_0x834c43);this[_0xa011('0x36')][_0xa011('0x9e')](_0xa011('0x173'),_0x3bb3d4);logger['info'](_0xa011('0x174'),_0x5c43c5,_0x3c1671,_0x1b5f42[_0xa011('0x175')],_0x1b5f42[_0xa011('0x65')]);return this['channel']['recordFile'](_0x5c43c5,_0x3c1671,_0x1b5f42[_0xa011('0x175')],_0x1b5f42[_0xa011('0x65')],undefined,!![]);};AGIVertices['prototype'][_0xa011('0x176')]=function(_0x50fa85){logger['info'](util[_0xa011('0x9c')]('Enter\x20in\x20RESTAPI\x20(%s)\x20block',_0x50fa85[_0xa011('0xa9')]));if(!this[_0xa011('0xa4')](_0x50fa85[_0xa011('0x72')])){return this[_0xa011('0x36')][_0xa011('0xaa')](_0xa011('0x177'));}var _0x5dbef6=this[_0xa011('0x178')][_0xa011('0x71')](this,_0x50fa85);logger[_0xa011('0x2d')](util[_0xa011('0x9c')](_0xa011('0x179'),util['inspect'](_0x5dbef6,{'showHidden':![],'depth':null})));if(!this[_0xa011('0xa4')](_0x50fa85[_0xa011('0xd1')])){return this[_0xa011('0x36')]['noop'](_0xa011('0x17a'));}var _0x462c29=this[_0xa011('0x11')][_0xa011('0x71')](this,_0x50fa85['variable_id']);if(!_0x462c29){return this[_0xa011('0x36')]['error'](_0x50fa85,'no\x20variable\x20found');}this[_0xa011('0x36')][_0xa011('0x9e')](util[_0xa011('0x9c')]('%s_STATUS_CODE',_0x462c29),_0x5dbef6['statusCode']?_0x5dbef6[_0xa011('0x17b')]:_0xa011('0x17c'));this[_0xa011('0x36')][_0xa011('0x9e')](util[_0xa011('0x9c')](_0xa011('0x17d'),_0x462c29),_0x5dbef6[_0xa011('0x76')]?_0x5dbef6['statusMessage']:'OK');if(_0x5dbef6[_0xa011('0x6a')]){try{this['saveRestApiResult'](_0x5dbef6['body'],_0x462c29);}catch(_0x16fc2c){logger[_0xa011('0x2c')](util[_0xa011('0x9c')]('Unable\x20to\x20set\x20result\x20in\x20variable\x20%s',_0x462c29));}}return this['channel'][_0xa011('0xaa')](util['format'](_0xa011('0xd7'),_0x462c29));};AGIVertices[_0xa011('0x10')][_0xa011('0x17e')]=function(_0x1da737){logger[_0xa011('0x2d')](util[_0xa011('0x9c')](_0xa011('0x17f'),_0x1da737[_0xa011('0xa9')]));return this[_0xa011('0x36')][_0xa011('0x180')](_0x1da737[_0xa011('0x181')]['replace'](/\s+/g,''),_0x1da737[_0xa011('0x175')]);};AGIVertices['prototype'][_0xa011('0x182')]=function(_0x49b251){logger[_0xa011('0x2d')](util['format']('Enter\x20in\x20SAYNUMBER\x20(%s)\x20block',_0x49b251['label']));return this['channel']['sayNumber'](_0x49b251[_0xa011('0x66')][_0xa011('0x5a')](/\s+/g,''),_0x49b251['escape_digits']);};AGIVertices[_0xa011('0x10')][_0xa011('0x183')]=function(_0xb10723){logger[_0xa011('0x2d')](util['format'](_0xa011('0x184'),_0xb10723[_0xa011('0xa9')]));return this[_0xa011('0x36')][_0xa011('0x185')](_0xb10723[_0xa011('0x5d')],_0xb10723['escape_digits']);};AGIVertices[_0xa011('0x10')][_0xa011('0x186')]=function(_0x3b479f){logger['info'](util[_0xa011('0x9c')](_0xa011('0x187'),_0x3b479f[_0xa011('0xa9')]));if(!this['isConfigured'](_0x3b479f[_0xa011('0x188')])){return this[_0xa011('0x36')][_0xa011('0xaa')](_0xa011('0x189'));}var _0x32a6e9=this[_0xa011('0x22')][_0xa011('0x71')](this,_0x3b479f['account_id']);if(!_0x32a6e9||!_0x32a6e9[_0xa011('0x18a')]){return this['channel'][_0xa011('0x2c')](_0x3b479f,_0xa011('0x18b'));}var _0x3689bc={'from':util['format']('\x22%s\x22\x20<%s>',_0x32a6e9[_0xa011('0x14')],_0x32a6e9[_0xa011('0x18c')]||_0x32a6e9[_0xa011('0x18a')][_0xa011('0x18d')]),'to':_0x3b479f['to']||'','cc':_0x3b479f['cc']||'','bcc':_0x3b479f['bcc']||'','subject':_0x3b479f[_0xa011('0x18e')],'html':_0x3b479f['text'],'text':_0x3b479f[_0xa011('0x5d')]};var _0x497108={'tls':{'rejectUnauthorized':![]}};if(_0x32a6e9[_0xa011('0x18a')][_0xa011('0x18f')]){_0x497108[_0xa011('0x18f')]=_0x32a6e9[_0xa011('0x18a')][_0xa011('0x18f')];}else{_0x497108[_0xa011('0x190')]=_0x32a6e9[_0xa011('0x18a')][_0xa011('0x190')];_0x497108['port']=_0x32a6e9[_0xa011('0x18a')][_0xa011('0x191')];_0x497108[_0xa011('0x192')]=_0x32a6e9[_0xa011('0x18a')][_0xa011('0x192')];}if(_0x32a6e9[_0xa011('0x18a')][_0xa011('0x193')]){_0x497108[_0xa011('0x194')]={'user':_0x32a6e9[_0xa011('0x18a')][_0xa011('0x18d')],'pass':_0x32a6e9[_0xa011('0x18a')]['pass']};}if(this[_0xa011('0xa4')](_0x3b479f[_0xa011('0x195')])){}logger[_0xa011('0xd9')](_0xa011('0x196'),JSON[_0xa011('0x75')](_0x3689bc));this[_0xa011('0x35')][_0xa011('0x71')](this,_0x3b479f,_0x3b479f['account_id']);this[_0xa011('0x36')]['noop'](util[_0xa011('0x9c')]('Trying\x20SendMail\x20with\x20account\x20%s',_0x32a6e9[_0xa011('0x14')]));this[_0xa011('0x23')][_0xa011('0x71')](this,_0x497108,_0x3689bc);return this[_0xa011('0x36')]['noop'](_0xa011('0x197'));};AGIVertices[_0xa011('0x10')][_0xa011('0x198')]=function(_0x4f5560){logger[_0xa011('0x2d')](util[_0xa011('0x9c')](_0xa011('0x199'),_0x4f5560[_0xa011('0xa9')]));return this['channel']['noop'](_0xa011('0x19a'));};AGIVertices['prototype'][_0xa011('0x19b')]=function(_0x529c55){logger[_0xa011('0x2d')](util[_0xa011('0x9c')]('Enter\x20in\x20SENDSMS\x20(%s)\x20block',_0x529c55['label']));if(!this['isConfigured'](_0x529c55['sms_account_id'])){return this[_0xa011('0x36')]['noop']('no\x20sms\x20account\x20configured');}var _0xa6b989=this['getSmsAccount']['sync'](this,_0x529c55[_0xa011('0x19c')]);if(!_0xa6b989){return this[_0xa011('0x36')][_0xa011('0x2c')](_0x529c55,_0xa011('0x19d'));}var _0x255df6={'body':_0x529c55[_0xa011('0x19e')],'phone':_0x529c55['to']||'','SmsAccountId':_0xa6b989['id']};logger['debug'](_0xa011('0x19f'),JSON[_0xa011('0x75')](_0x255df6));this[_0xa011('0x35')][_0xa011('0x71')](this,_0x529c55,_0x529c55['sms_account_id']);this['channel'][_0xa011('0xaa')](util[_0xa011('0x9c')](_0xa011('0x1a0'),_0xa6b989['name']));this['createSmsMessage'][_0xa011('0x71')](this,_0x255df6);return this[_0xa011('0x36')]['noop'](_0xa011('0x1a1'));};AGIVertices[_0xa011('0x10')]['set']=function(_0x4244c2){logger[_0xa011('0x2d')](util[_0xa011('0x9c')](_0xa011('0x1a2'),_0x4244c2['label']));if(!this['isConfigured'](_0x4244c2[_0xa011('0xd1')])){return this[_0xa011('0x36')][_0xa011('0x2c')](_0x4244c2,_0xa011('0x1a3'));}var _0x362290=this[_0xa011('0x11')][_0xa011('0x71')](this,_0x4244c2[_0xa011('0xd1')]);if(!_0x362290){return this[_0xa011('0x36')]['error'](_0x4244c2,_0xa011('0x15e'));}return this[_0xa011('0x36')]['setVariable'](_0x362290,_0x4244c2[_0xa011('0x1a4')]);};AGIVertices['prototype'][_0xa011('0x1a5')]=function(_0x5925b0){logger[_0xa011('0x2d')](util['format'](_0xa011('0x1a6'),_0x5925b0[_0xa011('0xa9')]));this['channel'][_0xa011('0xaa')]('START\x20CALLY\x20SQUARE');if(_0x5925b0[_0xa011('0xb7')]===_0xa011('0x1a7')){this[_0xa011('0x36')][_0xa011('0xaa')]('Answer');return this[_0xa011('0x36')][_0xa011('0xb7')]();}return this['channel'][_0xa011('0xaa')](_0xa011('0x1a8'));};AGIVertices[_0xa011('0x10')][_0xa011('0x1a9')]=function(_0x14427d){logger[_0xa011('0x2d')](util[_0xa011('0x9c')]('Enter\x20in\x20SUBPROJECT\x20(%s)\x20block',_0x14427d[_0xa011('0xa9')]));if(!this[_0xa011('0xa4')](_0x14427d[_0xa011('0x1aa')])){return this['channel'][_0xa011('0x2c')](_0x14427d,'no\x20subproject\x20selected');}var _0xa6f752=this['getSquareProject'][_0xa011('0x71')](this,_0x14427d[_0xa011('0x1aa')]);if(!this[_0xa011('0xa4')](_0xa6f752)){return this[_0xa011('0x36')]['error'](_0x14427d,util[_0xa011('0x9c')](_0xa011('0x1ab'),_0x14427d[_0xa011('0x1aa')]));}if(_0xa6f752===this[_0xa011('0x36')][_0xa011('0x39')]){return this[_0xa011('0x36')][_0xa011('0x2c')](_0x14427d,_0xa011('0x1ac'));}this[_0xa011('0x35')]['sync'](this,_0x14427d,_0xa6f752);var _0x51cb06=this[_0xa011('0x36')][_0xa011('0x58')](_0xa011('0x1ad'),util[_0xa011('0x9c')](_0xa011('0x1ae'),config[_0xa011('0x9')]['host']||_0xa011('0x1af'),_0xa6f752,this[_0xa011('0x36')][_0xa011('0x39')]));if(_0x51cb06['result']===-0x1){return _0x51cb06;}return this['channel']['noop'](util[_0xa011('0x9c')](_0xa011('0xbf'),_0xa011('0x1ad'),_0xa6f752));};AGIVertices[_0xa011('0x10')][_0xa011('0x1b0')]=function(_0x5721dc){logger[_0xa011('0x2d')](util[_0xa011('0x9c')]('Enter\x20in\x20SYSTEM\x20(%s)\x20block',_0x5721dc['label']));var _0x3d12c0=this[_0xa011('0x57')][_0xa011('0x71')](this,_0x5721dc[_0xa011('0xb4')]);this['createSquareDetailsReport'][_0xa011('0x71')](this,_0x5721dc,_0x5721dc['command']);if(this[_0xa011('0xa4')](_0x5721dc[_0xa011('0xd1')])){var _0x14361a=this[_0xa011('0x11')][_0xa011('0x71')](this,_0x5721dc['variable_id']);if(_0x14361a){this[_0xa011('0x36')]['setVariable'](_0x14361a,_0x3d12c0);return this[_0xa011('0x36')][_0xa011('0xaa')](util['format'](_0xa011('0x1b1'),_0x5721dc[_0xa011('0xb4')],_0x14361a));}}return this[_0xa011('0x36')][_0xa011('0xaa')](util[_0xa011('0x9c')](_0xa011('0x1b2'),_0x5721dc[_0xa011('0xb4')]));};AGIVertices[_0xa011('0x10')][_0xa011('0x1b3')]=function(_0x578314){logger[_0xa011('0x2d')](util['format'](_0xa011('0x1b4'),_0x578314[_0xa011('0xa9')]));_0x578314[_0xa011('0x5d')]=_0x578314['text'][_0xa011('0x5a')](/(\r\n|\n|\r)/gm,'\x20');if(!this['isConfigured'](_0x578314['apiKey'])){return this[_0xa011('0x36')][_0xa011('0xaa')](_0xa011('0x1b5'));}if(!this[_0xa011('0xa4')](_0x578314[_0xa011('0x5d')])){return this[_0xa011('0x36')][_0xa011('0xaa')](_0xa011('0xc1'));}this[_0xa011('0x36')][_0xa011('0xaa')](util[_0xa011('0x9c')](_0xa011('0x1b6'),_0x578314['text']));var _0x3d0cc1=this[_0xa011('0x5b')]['sync'](this,_0x578314);if(_0x3d0cc1){this[_0xa011('0x36')]['noop'](util[_0xa011('0x9c')](_0xa011('0x1b7'),_0x3d0cc1));var _0x11e73c=this[_0xa011('0x36')][_0xa011('0xf6')](_0x3d0cc1);try{fs[_0xa011('0xf7')](_0x3d0cc1+_0xa011('0xf8'));}catch(_0x1501d8){logger[_0xa011('0x2c')](_0x1501d8);}return _0x11e73c;}return this['channel'][_0xa011('0x2c')](_0x578314,_0xa011('0x1b8'));};AGIVertices[_0xa011('0x10')]['tts']=function(_0x42b026){logger[_0xa011('0x2d')](util['format']('Enter\x20in\x20GOOGLETTS\x20(%s)\x20block',_0x42b026[_0xa011('0xa9')]));_0x42b026['text']=_0x42b026['text'][_0xa011('0x5a')](/(\r\n|\n|\r)/gm,'\x20');if(!this[_0xa011('0xa4')](_0x42b026['text'])){return this[_0xa011('0x36')]['noop'](_0xa011('0xc1'));}this[_0xa011('0x36')][_0xa011('0xaa')](util[_0xa011('0x9c')](_0xa011('0x1b9'),_0x42b026[_0xa011('0x5d')]));var _0x384915=this[_0xa011('0x62')][_0xa011('0x71')](this,_0x42b026);if(_0x384915){this[_0xa011('0x36')][_0xa011('0xaa')](util[_0xa011('0x9c')](_0xa011('0x1ba'),_0x384915));var _0x38ea7a=this[_0xa011('0x36')][_0xa011('0xf6')](_0x384915);try{fs['unlink'](_0x384915+_0xa011('0xf8'));}catch(_0x4b31a3){logger['error'](_0x4b31a3);}return _0x38ea7a;}return this[_0xa011('0x36')][_0xa011('0x2c')](_0x42b026,_0xa011('0x1bb'));};AGIVertices[_0xa011('0x10')][_0xa011('0x1bc')]=function(_0x245bf1){logger['info'](util[_0xa011('0x9c')](_0xa011('0x1bd'),_0x245bf1['label']));if(!this[_0xa011('0xa4')](_0x245bf1[_0xa011('0x14e')])){return this[_0xa011('0x36')][_0xa011('0x2c')](_0x245bf1,'no\x20find\x20by\x20configured');}logger[_0xa011('0x2d')](util[_0xa011('0x9c')](_0xa011('0x14d'),this[_0xa011('0x36')]['callerid'],_0x245bf1['findBy']));var _0x1f5910=this[_0xa011('0x52')]['sync'](this,_0x245bf1[_0xa011('0x14e')]);if(_0x1f5910){logger[_0xa011('0x2d')](util[_0xa011('0x9c')](_0xa011('0x14f'),this[_0xa011('0x36')]['callerid'],_0x245bf1['findBy']));this[_0xa011('0x36')][_0xa011('0xaa')](util[_0xa011('0x9c')]('AGENT\x20%s\x20FOUND\x20BY',this[_0xa011('0x36')][_0xa011('0x3a')],_0x245bf1[_0xa011('0x14e')]));return{'code':0xc8,'result':_0xa011('0x150')};}else{logger[_0xa011('0x2d')](util[_0xa011('0x9c')](_0xa011('0x151'),this[_0xa011('0x36')][_0xa011('0x3a')],_0x245bf1[_0xa011('0x14e')]));this[_0xa011('0x36')][_0xa011('0xaa')](util[_0xa011('0x9c')]('AGENT\x20%s\x20NOT\x20FOUND\x20BY',this[_0xa011('0x36')][_0xa011('0x3a')],_0x245bf1[_0xa011('0x14e')]));return{'code':0xc8,'result':'failure'};}};AGIVertices['prototype'][_0xa011('0x1be')]=function(_0x4b7e50){logger['info'](util['format'](_0xa011('0x1bf'),_0x4b7e50[_0xa011('0xa9')]));var _0x330c8c=this[_0xa011('0x36')][_0xa011('0x58')]('VOICEMAIL',[_0x4b7e50['mailbox'],_0x4b7e50[_0xa011('0x77')]]);if(_0x330c8c[_0xa011('0xa2')]===-0x1){return _0x330c8c;}return this[_0xa011('0x36')]['noop'](util[_0xa011('0x9c')](_0xa011('0xbf'),'VOICEMAIL',_0x4b7e50[_0xa011('0x1c0')]));};AGIVertices['prototype'][_0xa011('0x1c1')]=function(_0x26d27a){logger[_0xa011('0x2d')](util['format'](_0xa011('0x1c2'),_0x26d27a[_0xa011('0xa9')]));if(!this[_0xa011('0xa4')](_0x26d27a[_0xa011('0xd1')])){return this[_0xa011('0x36')][_0xa011('0x2c')](_0x26d27a,_0xa011('0x1a3'));}var _0x5b9b74=this[_0xa011('0x11')][_0xa011('0x71')](this,_0x26d27a[_0xa011('0xd1')]);if(!_0x5b9b74){return this[_0xa011('0x36')][_0xa011('0x2c')](_0x26d27a,_0xa011('0x15e'));}var _0x1c26b2=this[_0xa011('0x36')][_0xa011('0x11')](_0x5b9b74);return{'code':0xc8,'result':_0x1c26b2['extra']?_0x1c26b2[_0xa011('0xa0')]:'-'};};String[_0xa011('0x10')][_0xa011('0x1c3')]=function(_0x549be6,_0x2dd489){return this[_0xa011('0x9f')](_0x549be6)[_0xa011('0x1c4')](_0x2dd489);};module[_0xa011('0x1c5')]=AGIVertices; \ No newline at end of file diff --git a/server/services/ami/acw/index.js b/server/services/ami/acw/index.js index c3dca33..6854117 100644 --- a/server/services/ami/acw/index.js +++ b/server/services/ami/acw/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa74e=['update','[%s][UPDATE][ACWTIME:%s]','error','[%s][UPDATE][ERRORS:%s]','[%s][TIMER:%s][AGENT:%s][QUEUE:%s]','finally','[ACW][START]\x20%s','message','saveUnpause','catch','[ACW][TIMERS]','stringify','[ACW][syncAgentConnect]\x20%s','syncAgentConnectPreview','isUndefined','linkedid','[%s][HANGUP:LINKEDID]','[ACW][syncHangupRequest]\x20%s','[%s][HANGUPATTENDEDTRANSFER:UNIQUEID]','[ACW][syncHangup]\x20%s','transfereeuniqueid','secondtransfereruniqueid','transfertargetuniqueid','isNil','origtransfereruniqueid','transfereruniqueid','[%s][BLINDTRANSFER:UNIQUEID]','transfererlinkedid','autopause','savePause','[ACW][syncAgentRingNoAnswer]\x20%s','exports','lodash','../ami','../../../config/logger','acw','../rpc/user','voiceQueues','agents','timers','syncAgentConnect','bind','hangup','syncHangup','agentringnoanswer','syncAgentRingNoAnswer','attendedtransfer','syncAttendedTransfer','blindtransfer','syncBlindTransfer','custom:agentConnectPreview','milliseconds','seconds','prototype','startAcw','interface','queue','ACW','mandatoryDisposition','name','mandatoryDispositionPause','Action','QueuePause','then','getAgent','info','attended','channels','destlinkedid','acwTimeout','stopAcw','lastPauseAt','YYYY-MM-DD\x20HH:mm:ss','uniqueid','updateAcw','timer'];(function(_0x13d678,_0x2510ce){var _0x5b1ffc=function(_0x50bf46){while(--_0x50bf46){_0x13d678['push'](_0x13d678['shift']());}};_0x5b1ffc(++_0x2510ce);}(_0xa74e,0x19c));var _0xea74=function(_0x9e8730,_0x3863f6){_0x9e8730=_0x9e8730-0x0;var _0x5c82d7=_0xa74e[_0x9e8730];return _0x5c82d7;};'use strict';var util=require('util');var _=require(_0xea74('0x0'));var moment=require('moment');var ami=require(_0xea74('0x1'));var logger=require(_0xea74('0x2'))(_0xea74('0x3'));var RpcUser=require(_0xea74('0x4'));var RpcVoiceAgentReport=require('../rpc/voiceAgentReport');function Acw(_0x53cd4f){this['voiceQueues']=_0x53cd4f[_0xea74('0x5')];this['agents']=_0x53cd4f[_0xea74('0x6')];this[_0xea74('0x7')]=_0x53cd4f[_0xea74('0x7')];this['channels']={};ami['on']('agentconnect',this[_0xea74('0x8')][_0xea74('0x9')](this));ami['on']('hanguprequest',this['syncHangupRequest']['bind'](this));ami['on'](_0xea74('0xa'),this[_0xea74('0xb')][_0xea74('0x9')](this));ami['on'](_0xea74('0xc'),this[_0xea74('0xd')][_0xea74('0x9')](this));ami['on'](_0xea74('0xe'),this[_0xea74('0xf')][_0xea74('0x9')](this));ami['on'](_0xea74('0x10'),this[_0xea74('0x11')][_0xea74('0x9')](this));ami['on'](_0xea74('0x12'),this['syncAgentConnectPreview'][_0xea74('0x9')](this));}function getDiff(_0x22eada){var _0x43562c=moment()['milliseconds'](0x0);var _0x540255=moment(_0x22eada)[_0xea74('0x13')](0x0);return _0x43562c['diff'](_0x540255,_0xea74('0x14'));}Acw[_0xea74('0x15')][_0xea74('0x16')]=function(_0x3c4c29){try{var _0x1b41eb=this;var _0x2c52a3=this['channels'][_0x3c4c29][_0xea74('0x17')];var _0x98be79=this['channels'][_0x3c4c29][_0xea74('0x18')];var _0x4d0a99=this[_0xea74('0x5')][_0x98be79];var _0x5cfd96=![];var _0x312dc4=_0xea74('0x19');if(_0x4d0a99[_0xea74('0x1a')]){if(_0x4d0a99['mandatoryDispositionPause'][_0xea74('0x1b')]){_0x5cfd96=!![];_0x312dc4=_0x4d0a99[_0xea74('0x1c')][_0xea74('0x1b')];}}ami[_0xea74('0x1d')]({'action':_0xea74('0x1e'),'interface':_0x2c52a3,'paused':!![],'reason':_0x312dc4})[_0xea74('0x1f')](function(_0x921184){if(_0x1b41eb[_0xea74('0x6')][_0x2c52a3]){return RpcUser[_0xea74('0x20')](_0x1b41eb[_0xea74('0x6')][_0x2c52a3]['id'])[_0xea74('0x1f')](function(_0xb522c8){if(_0xb522c8&&!_0xb522c8['voicePause']){logger[_0xea74('0x21')]('[%s][START][AGENT:%s][QUEUE:%s]',_0x3c4c29,_0x2c52a3,_0x98be79);var _0x272cd3=_0x1b41eb['channels'][_0x3c4c29][_0xea74('0x22')]&&_0x1b41eb[_0xea74('0x23')][_0x3c4c29][_0xea74('0x24')]?_0x1b41eb['channels'][_0x3c4c29]['destlinkedid']:_0x3c4c29;return RpcUser['savePause'](_0x1b41eb['agents'][_0x2c52a3],_0x312dc4,_0x272cd3)[_0xea74('0x1f')](function(_0x3dfc16){if(!_0x5cfd96){_0x1b41eb[_0xea74('0x7')][_0x2c52a3]={};logger['info']('[%s][TIMER:%s][AGENT:%s][QUEUE:%s]',_0x3c4c29,_0x1b41eb[_0xea74('0x5')][_0x98be79][_0xea74('0x25')],_0x2c52a3,_0x98be79);_0x1b41eb[_0xea74('0x7')][_0x2c52a3]['timer']=setTimeout(_0x1b41eb[_0xea74('0x26')][_0xea74('0x9')](_0x1b41eb,_0x2c52a3),_0x1b41eb[_0xea74('0x5')][_0x98be79][_0xea74('0x25')]*0x3e8);_0x1b41eb[_0xea74('0x7')][_0x2c52a3][_0xea74('0x27')]=moment()['format'](_0xea74('0x28'));_0x1b41eb[_0xea74('0x7')][_0x2c52a3][_0xea74('0x29')]=_0x3c4c29;_0x1b41eb[_0xea74('0x7')][_0x2c52a3]['queue']=_0x98be79;_0x1b41eb[_0xea74('0x7')][_0x2c52a3][_0xea74('0x2a')]=function(){var _0x5e7de7=getDiff(_0x1b41eb[_0xea74('0x7')][_0x2c52a3][_0xea74('0x27')]);clearTimeout(_0x1b41eb[_0xea74('0x7')][_0x2c52a3][_0xea74('0x2b')]);_0x1b41eb[_0xea74('0x7')][_0x2c52a3][_0xea74('0x2b')]=![];RpcVoiceAgentReport[_0xea74('0x2c')]({'acwtime':_0x5e7de7},_0x1b41eb['timers'][_0x2c52a3][_0xea74('0x29')],_0x2c52a3)[_0xea74('0x1f')](function(_0x3d21f2){logger['info'](_0xea74('0x2d'),_0x3c4c29,_0x5e7de7,_0x3d21f2);})['catch'](function(_0x1293eb){logger[_0xea74('0x2e')](_0xea74('0x2f'),_0x3c4c29,_0x1293eb);});delete _0x1b41eb[_0xea74('0x7')][_0x2c52a3];};}});}else{logger[_0xea74('0x21')]('[%s][INPAUSE][AGENT:%s][QUEUE:%s]',_0x3c4c29,_0x2c52a3,_0x98be79);}});}})['catch'](function(_0x24ce0a){logger['error'](_0xea74('0x30'),_0x3c4c29,_0x1b41eb['voiceQueues'][_0x98be79][_0xea74('0x25')],_0x2c52a3,_0x98be79);})[_0xea74('0x31')](function(){delete _0x1b41eb['channels'][_0x3c4c29];});}catch(_0x4e9537){logger[_0xea74('0x2e')](_0xea74('0x32'),_0x4e9537[_0xea74('0x33')]);}};Acw[_0xea74('0x15')][_0xea74('0x26')]=function(_0x629a81){try{var _0x48d743=this;if(_0x48d743[_0xea74('0x7')][_0x629a81]){_0x48d743[_0xea74('0x7')][_0x629a81][_0xea74('0x2b')]=![];var _0x132011=_0x48d743[_0xea74('0x7')][_0x629a81][_0xea74('0x29')];var _0x422445=_0x48d743[_0xea74('0x7')][_0x629a81]['queue'];var _0x2ad40c=_0x48d743[_0xea74('0x5')][_0x422445]['acwTimeout'];logger[_0xea74('0x21')]('[%s][TIMER][STOP][AGENT:%s]',_0x132011,_0x629a81);RpcUser[_0xea74('0x34')](this[_0xea74('0x6')][_0x629a81]);RpcVoiceAgentReport['update']({'acwtime':_0x2ad40c,'agentacw':!![]},_0x132011,_0x629a81)[_0xea74('0x1f')](function(_0x3b6616){logger[_0xea74('0x21')](_0xea74('0x2d'),_0x132011,_0x2ad40c,_0x3b6616);})[_0xea74('0x35')](function(_0x38698b){logger[_0xea74('0x2e')](_0xea74('0x2f'),_0x132011,_0x38698b);});}else{logger[_0xea74('0x2e')]('[ACW][STOP]\x20Interface\x20%s\x20doesn\x27t\x20have\x20timer',_0x629a81);if(_0x48d743[_0xea74('0x7')]){logger[_0xea74('0x21')](_0xea74('0x36'),JSON[_0xea74('0x37')](_0x48d743['timers']));}}}catch(_0x2c3c50){logger[_0xea74('0x2e')]('[ACW][STOP]\x20%s',_0x2c3c50[_0xea74('0x33')]);}};Acw[_0xea74('0x15')][_0xea74('0x8')]=function(_0x3b4841){try{if(this[_0xea74('0x5')][_0x3b4841['queue']]&&(this[_0xea74('0x5')][_0x3b4841[_0xea74('0x18')]][_0xea74('0x3')]||this[_0xea74('0x5')][_0x3b4841['queue']][_0xea74('0x1a')])){if(this[_0xea74('0x6')][_0x3b4841['interface']]){this[_0xea74('0x23')][_0x3b4841[_0xea74('0x29')]]={'queue':_0x3b4841[_0xea74('0x18')],'interface':_0x3b4841[_0xea74('0x17')],'destlinkedid':_0x3b4841[_0xea74('0x24')]};}}}catch(_0x2dab46){logger[_0xea74('0x2e')](_0xea74('0x38'),_0x2dab46[_0xea74('0x33')]);}};Acw[_0xea74('0x15')][_0xea74('0x39')]=function(_0xa4d2c5){try{if(this[_0xea74('0x5')][_0xa4d2c5[_0xea74('0x18')]]&&(this[_0xea74('0x5')][_0xa4d2c5[_0xea74('0x18')]]['acw']||this[_0xea74('0x5')][_0xa4d2c5[_0xea74('0x18')]][_0xea74('0x1a')])){if(this['agents'][_0xa4d2c5['interface']]){this[_0xea74('0x23')][_0xa4d2c5[_0xea74('0x29')]]={'queue':_0xa4d2c5[_0xea74('0x18')],'interface':_0xa4d2c5[_0xea74('0x17')]};}}}catch(_0x45d10b){logger[_0xea74('0x2e')]('[ACW][syncAgentConnectPreview]\x20%s',_0x45d10b[_0xea74('0x33')]);}};Acw[_0xea74('0x15')]['syncHangupRequest']=function(_0x4129d9){try{if(this[_0xea74('0x23')][_0x4129d9['uniqueid']]&&_[_0xea74('0x3a')](this[_0xea74('0x23')][_0x4129d9[_0xea74('0x29')]]['attended'])){logger[_0xea74('0x21')]('[%s][HANGUP:UNIQUEID]',_0x4129d9['uniqueid']);this[_0xea74('0x16')](_0x4129d9['uniqueid']);}else if(this['channels'][_0x4129d9[_0xea74('0x3b')]]&&_['isUndefined'](this[_0xea74('0x23')][_0x4129d9[_0xea74('0x3b')]][_0xea74('0x22')])){logger['info'](_0xea74('0x3c'),_0x4129d9[_0xea74('0x3b')]);this[_0xea74('0x16')](_0x4129d9[_0xea74('0x3b')]);}}catch(_0x5a9dc1){logger[_0xea74('0x2e')](_0xea74('0x3d'),_0x5a9dc1[_0xea74('0x33')]);}};Acw[_0xea74('0x15')]['syncHangup']=function(_0x30409b){try{if(this[_0xea74('0x23')][_0x30409b[_0xea74('0x29')]]&&this[_0xea74('0x23')][_0x30409b['uniqueid']][_0xea74('0x22')]){logger['info'](_0xea74('0x3e'),_0x30409b['uniqueid']);this['startAcw'](_0x30409b[_0xea74('0x29')]);}else if(this[_0xea74('0x23')][_0x30409b[_0xea74('0x3b')]]&&this[_0xea74('0x23')][_0x30409b[_0xea74('0x3b')]][_0xea74('0x22')]){logger[_0xea74('0x21')]('[%s][HANGUPATTENDEDTRANSFER:LINKEDID]',_0x30409b[_0xea74('0x3b')]);this[_0xea74('0x16')](_0x30409b[_0xea74('0x3b')]);}}catch(_0x230836){logger['error'](_0xea74('0x3f'),_0x230836[_0xea74('0x33')]);}};Acw[_0xea74('0x15')][_0xea74('0xf')]=function(_0xd32bc5){try{if(!_['isNil'](this['channels'][_0xd32bc5['transfereeuniqueid']])){this[_0xea74('0x16')](_0xd32bc5[_0xea74('0x40')]);if(this[_0xea74('0x23')][_0xd32bc5['secondtransfereruniqueid']]){this['channels'][_0xd32bc5[_0xea74('0x41')]]['attended']=!![];this[_0xea74('0x23')][_0xd32bc5[_0xea74('0x42')]]=this[_0xea74('0x23')][_0xd32bc5[_0xea74('0x41')]];delete this['channels'][_0xd32bc5[_0xea74('0x41')]];}}else if(!_[_0xea74('0x43')](this['channels'][_0xd32bc5['transfertargetuniqueid']])){this['startAcw'](_0xd32bc5[_0xea74('0x42')]);if(this[_0xea74('0x23')][_0xd32bc5[_0xea74('0x44')]]){this[_0xea74('0x23')][_0xd32bc5[_0xea74('0x44')]][_0xea74('0x22')]=!![];this[_0xea74('0x23')][_0xd32bc5[_0xea74('0x40')]]=this[_0xea74('0x23')][_0xd32bc5[_0xea74('0x44')]];delete this[_0xea74('0x23')][_0xd32bc5[_0xea74('0x44')]];}}}catch(_0x5d8655){logger[_0xea74('0x2e')]('[ACW][syncAttendedTransfer]\x20%s',_0x5d8655[_0xea74('0x33')]);}};Acw['prototype']['syncBlindTransfer']=function(_0x19b1ac){try{if(this[_0xea74('0x23')][_0x19b1ac[_0xea74('0x45')]]){logger[_0xea74('0x21')](_0xea74('0x46'),JSON['stringify'](_0x19b1ac['transfereruniqueid']));this[_0xea74('0x16')](_0x19b1ac[_0xea74('0x45')]);}else if(this[_0xea74('0x23')][_0x19b1ac[_0xea74('0x47')]]){logger['info']('[%s][BLINDTRANSFER:LINKEDID]',JSON[_0xea74('0x37')](_0x19b1ac['transfererlinkedid']));this[_0xea74('0x16')](_0x19b1ac[_0xea74('0x47')]);}}catch(_0x2b9219){logger[_0xea74('0x2e')]('[ACW][syncBlindTransfer]\x20%s',_0x2b9219['message']);}};Acw[_0xea74('0x15')][_0xea74('0xd')]=function(_0x11effe){try{if(this[_0xea74('0x5')][_0x11effe['queue']]&&this['voiceQueues'][_0x11effe[_0xea74('0x18')]][_0xea74('0x48')]==='all'){if(this[_0xea74('0x6')][_0x11effe[_0xea74('0x17')]]){logger[_0xea74('0x21')]('[%s][AUTOPAUSE][AGENT:%s][QUEUE:%]',_0x11effe['uniqueid'],_0x11effe[_0xea74('0x17')],_0x11effe[_0xea74('0x18')]);return RpcUser[_0xea74('0x49')](this[_0xea74('0x6')][_0x11effe['interface']],'Auto-Pause',_0x11effe[_0xea74('0x29')]);}}}catch(_0x3c65d0){logger[_0xea74('0x2e')](_0xea74('0x4a'),_0x3c65d0[_0xea74('0x33')]);}};module[_0xea74('0x4b')]=Acw; \ No newline at end of file +var _0x423b=['moment','../../../config/logger','acw','../rpc/user','../rpc/voiceAgentReport','voiceQueues','timers','channels','agentconnect','syncAgentConnect','bind','syncHangupRequest','hangup','syncHangup','syncAgentRingNoAnswer','syncAttendedTransfer','blindtransfer','seconds','prototype','queue','ACW','mandatoryDisposition','name','then','agents','getAgent','attended','savePause','info','[%s][TIMER:%s][AGENT:%s][QUEUE:%s]','acwTimeout','stopAcw','format','YYYY-MM-DD\x20HH:mm:ss','uniqueid','updateAcw','lastPauseAt','timer','update','[%s][INPAUSE][AGENT:%s][QUEUE:%s]','catch','error','[ACW][START]\x20%s','message','[%s][UPDATE][ACWTIME:%s]','[%s][UPDATE][ERRORS:%s]','[ACW][STOP]\x20Interface\x20%s\x20doesn\x27t\x20have\x20timer','[ACW][TIMERS]','[ACW][STOP]\x20%s','interface','[ACW][syncAgentConnect]\x20%s','[ACW][syncAgentConnectPreview]\x20%s','isUndefined','[%s][HANGUP:UNIQUEID]','linkedid','[%s][HANGUP:LINKEDID]','startAcw','[ACW][syncHangupRequest]\x20%s','[%s][HANGUPATTENDEDTRANSFER:LINKEDID]','[ACW][syncHangup]\x20%s','isNil','transfereeuniqueid','secondtransfereruniqueid','transfertargetuniqueid','origtransfereruniqueid','[ACW][syncAttendedTransfer]\x20%s','syncBlindTransfer','transfereruniqueid','stringify','transfererlinkedid','[%s][BLINDTRANSFER:LINKEDID]','autopause','all','Auto-Pause','exports','lodash'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x423b,0x12f));var _0xb423=function(_0x36ed3c,_0x44a00a){_0x36ed3c=_0x36ed3c-0x0;var _0x52a2e0=_0x423b[_0x36ed3c];return _0x52a2e0;};'use strict';var util=require('util');var _=require(_0xb423('0x0'));var moment=require(_0xb423('0x1'));var ami=require('../ami');var logger=require(_0xb423('0x2'))(_0xb423('0x3'));var RpcUser=require(_0xb423('0x4'));var RpcVoiceAgentReport=require(_0xb423('0x5'));function Acw(_0x36c939){this[_0xb423('0x6')]=_0x36c939[_0xb423('0x6')];this['agents']=_0x36c939['agents'];this[_0xb423('0x7')]=_0x36c939[_0xb423('0x7')];this[_0xb423('0x8')]={};ami['on'](_0xb423('0x9'),this[_0xb423('0xa')][_0xb423('0xb')](this));ami['on']('hanguprequest',this[_0xb423('0xc')][_0xb423('0xb')](this));ami['on'](_0xb423('0xd'),this[_0xb423('0xe')][_0xb423('0xb')](this));ami['on']('agentringnoanswer',this[_0xb423('0xf')][_0xb423('0xb')](this));ami['on']('attendedtransfer',this[_0xb423('0x10')]['bind'](this));ami['on'](_0xb423('0x11'),this['syncBlindTransfer']['bind'](this));ami['on']('custom:agentConnectPreview',this['syncAgentConnectPreview'][_0xb423('0xb')](this));}function getDiff(_0x544274){var _0x4b5f70=moment()['milliseconds'](0x0);var _0x21f842=moment(_0x544274)['milliseconds'](0x0);return _0x4b5f70['diff'](_0x21f842,_0xb423('0x12'));}Acw[_0xb423('0x13')]['startAcw']=function(_0x3ec1e9){try{var _0x4568bb=this;var _0x220062=this[_0xb423('0x8')][_0x3ec1e9]['interface'];var _0x27c888=this['channels'][_0x3ec1e9][_0xb423('0x14')];var _0x1829d5=this['voiceQueues'][_0x27c888];var _0x40803c=![];var _0x518349=_0xb423('0x15');if(_0x1829d5[_0xb423('0x16')]){if(_0x1829d5['mandatoryDispositionPause'][_0xb423('0x17')]){_0x40803c=!![];_0x518349=_0x1829d5['mandatoryDispositionPause']['name'];}}ami['Action']({'action':'QueuePause','interface':_0x220062,'paused':!![],'reason':_0x518349})[_0xb423('0x18')](function(_0x459474){if(_0x4568bb[_0xb423('0x19')][_0x220062]){return RpcUser[_0xb423('0x1a')](_0x4568bb[_0xb423('0x19')][_0x220062]['id'])['then'](function(_0x36a8f8){if(_0x36a8f8&&!_0x36a8f8['voicePause']){logger['info']('[%s][START][AGENT:%s][QUEUE:%s]',_0x3ec1e9,_0x220062,_0x27c888);var _0x34190f=_0x4568bb['channels'][_0x3ec1e9][_0xb423('0x1b')]&&_0x4568bb['channels'][_0x3ec1e9]['destlinkedid']?_0x4568bb['channels'][_0x3ec1e9]['destlinkedid']:_0x3ec1e9;return RpcUser[_0xb423('0x1c')](_0x4568bb[_0xb423('0x19')][_0x220062],_0x518349,_0x34190f)['then'](function(_0x3502a7){if(!_0x40803c){_0x4568bb[_0xb423('0x7')][_0x220062]={};logger[_0xb423('0x1d')](_0xb423('0x1e'),_0x3ec1e9,_0x4568bb[_0xb423('0x6')][_0x27c888][_0xb423('0x1f')],_0x220062,_0x27c888);_0x4568bb[_0xb423('0x7')][_0x220062]['timer']=setTimeout(_0x4568bb[_0xb423('0x20')][_0xb423('0xb')](_0x4568bb,_0x220062),_0x4568bb[_0xb423('0x6')][_0x27c888][_0xb423('0x1f')]*0x3e8);_0x4568bb[_0xb423('0x7')][_0x220062]['lastPauseAt']=moment()[_0xb423('0x21')](_0xb423('0x22'));_0x4568bb[_0xb423('0x7')][_0x220062][_0xb423('0x23')]=_0x3ec1e9;_0x4568bb[_0xb423('0x7')][_0x220062]['queue']=_0x27c888;_0x4568bb[_0xb423('0x7')][_0x220062][_0xb423('0x24')]=function(){var _0x2c21b9=getDiff(_0x4568bb[_0xb423('0x7')][_0x220062][_0xb423('0x25')]);clearTimeout(_0x4568bb[_0xb423('0x7')][_0x220062][_0xb423('0x26')]);_0x4568bb[_0xb423('0x7')][_0x220062][_0xb423('0x26')]=![];RpcVoiceAgentReport[_0xb423('0x27')]({'acwtime':_0x2c21b9},_0x4568bb[_0xb423('0x7')][_0x220062][_0xb423('0x23')],_0x220062)['then'](function(_0x28c277){logger[_0xb423('0x1d')]('[%s][UPDATE][ACWTIME:%s]',_0x3ec1e9,_0x2c21b9,_0x28c277);})['catch'](function(_0x8a9365){logger['error']('[%s][UPDATE][ERRORS:%s]',_0x3ec1e9,_0x8a9365);});delete _0x4568bb[_0xb423('0x7')][_0x220062];};}});}else{logger['info'](_0xb423('0x28'),_0x3ec1e9,_0x220062,_0x27c888);}});}})[_0xb423('0x29')](function(_0x4701ab){logger[_0xb423('0x2a')](_0xb423('0x1e'),_0x3ec1e9,_0x4568bb[_0xb423('0x6')][_0x27c888][_0xb423('0x1f')],_0x220062,_0x27c888);})['finally'](function(){delete _0x4568bb[_0xb423('0x8')][_0x3ec1e9];});}catch(_0x297985){logger[_0xb423('0x2a')](_0xb423('0x2b'),_0x297985[_0xb423('0x2c')]);}};Acw[_0xb423('0x13')][_0xb423('0x20')]=function(_0x4a6fc4){try{var _0x472392=this;if(_0x472392[_0xb423('0x7')][_0x4a6fc4]){_0x472392[_0xb423('0x7')][_0x4a6fc4][_0xb423('0x26')]=![];var _0x49be99=_0x472392['timers'][_0x4a6fc4][_0xb423('0x23')];var _0x55703a=_0x472392[_0xb423('0x7')][_0x4a6fc4]['queue'];var _0x58714b=_0x472392[_0xb423('0x6')][_0x55703a][_0xb423('0x1f')];logger[_0xb423('0x1d')]('[%s][TIMER][STOP][AGENT:%s]',_0x49be99,_0x4a6fc4);RpcUser['saveUnpause'](this[_0xb423('0x19')][_0x4a6fc4]);RpcVoiceAgentReport[_0xb423('0x27')]({'acwtime':_0x58714b,'agentacw':!![]},_0x49be99,_0x4a6fc4)['then'](function(_0x30481d){logger[_0xb423('0x1d')](_0xb423('0x2d'),_0x49be99,_0x58714b,_0x30481d);})['catch'](function(_0x38d79a){logger[_0xb423('0x2a')](_0xb423('0x2e'),_0x49be99,_0x38d79a);});}else{logger[_0xb423('0x2a')](_0xb423('0x2f'),_0x4a6fc4);if(_0x472392['timers']){logger[_0xb423('0x1d')](_0xb423('0x30'),JSON['stringify'](_0x472392[_0xb423('0x7')]));}}}catch(_0x5f0319){logger[_0xb423('0x2a')](_0xb423('0x31'),_0x5f0319[_0xb423('0x2c')]);}};Acw[_0xb423('0x13')][_0xb423('0xa')]=function(_0x59185f){try{if(this['voiceQueues'][_0x59185f[_0xb423('0x14')]]&&(this[_0xb423('0x6')][_0x59185f[_0xb423('0x14')]][_0xb423('0x3')]||this['voiceQueues'][_0x59185f[_0xb423('0x14')]][_0xb423('0x16')])){if(this[_0xb423('0x19')][_0x59185f['interface']]){this[_0xb423('0x8')][_0x59185f['uniqueid']]={'queue':_0x59185f[_0xb423('0x14')],'interface':_0x59185f[_0xb423('0x32')],'destlinkedid':_0x59185f['destlinkedid']};}}}catch(_0x16b013){logger['error'](_0xb423('0x33'),_0x16b013['message']);}};Acw[_0xb423('0x13')]['syncAgentConnectPreview']=function(_0x48bf5a){try{if(this[_0xb423('0x6')][_0x48bf5a[_0xb423('0x14')]]&&(this[_0xb423('0x6')][_0x48bf5a[_0xb423('0x14')]][_0xb423('0x3')]||this[_0xb423('0x6')][_0x48bf5a[_0xb423('0x14')]][_0xb423('0x16')])){if(this[_0xb423('0x19')][_0x48bf5a[_0xb423('0x32')]]){this['channels'][_0x48bf5a[_0xb423('0x23')]]={'queue':_0x48bf5a[_0xb423('0x14')],'interface':_0x48bf5a[_0xb423('0x32')]};}}}catch(_0x21f1e4){logger[_0xb423('0x2a')](_0xb423('0x34'),_0x21f1e4[_0xb423('0x2c')]);}};Acw[_0xb423('0x13')][_0xb423('0xc')]=function(_0x28c21b){try{if(this['channels'][_0x28c21b['uniqueid']]&&_[_0xb423('0x35')](this[_0xb423('0x8')][_0x28c21b['uniqueid']]['attended'])){logger[_0xb423('0x1d')](_0xb423('0x36'),_0x28c21b[_0xb423('0x23')]);this['startAcw'](_0x28c21b['uniqueid']);}else if(this[_0xb423('0x8')][_0x28c21b[_0xb423('0x37')]]&&_[_0xb423('0x35')](this['channels'][_0x28c21b[_0xb423('0x37')]][_0xb423('0x1b')])){logger['info'](_0xb423('0x38'),_0x28c21b['linkedid']);this[_0xb423('0x39')](_0x28c21b[_0xb423('0x37')]);}}catch(_0x331451){logger['error'](_0xb423('0x3a'),_0x331451[_0xb423('0x2c')]);}};Acw[_0xb423('0x13')][_0xb423('0xe')]=function(_0x41af56){try{if(this[_0xb423('0x8')][_0x41af56['uniqueid']]&&this['channels'][_0x41af56[_0xb423('0x23')]][_0xb423('0x1b')]){logger[_0xb423('0x1d')]('[%s][HANGUPATTENDEDTRANSFER:UNIQUEID]',_0x41af56['uniqueid']);this['startAcw'](_0x41af56[_0xb423('0x23')]);}else if(this[_0xb423('0x8')][_0x41af56[_0xb423('0x37')]]&&this['channels'][_0x41af56['linkedid']][_0xb423('0x1b')]){logger['info'](_0xb423('0x3b'),_0x41af56['linkedid']);this[_0xb423('0x39')](_0x41af56[_0xb423('0x37')]);}}catch(_0x49caca){logger[_0xb423('0x2a')](_0xb423('0x3c'),_0x49caca['message']);}};Acw['prototype'][_0xb423('0x10')]=function(_0x31903f){try{if(!_[_0xb423('0x3d')](this[_0xb423('0x8')][_0x31903f[_0xb423('0x3e')]])){this[_0xb423('0x39')](_0x31903f[_0xb423('0x3e')]);if(this[_0xb423('0x8')][_0x31903f[_0xb423('0x3f')]]){this[_0xb423('0x8')][_0x31903f[_0xb423('0x3f')]][_0xb423('0x1b')]=!![];this[_0xb423('0x8')][_0x31903f[_0xb423('0x40')]]=this['channels'][_0x31903f[_0xb423('0x3f')]];delete this['channels'][_0x31903f[_0xb423('0x3f')]];}}else if(!_[_0xb423('0x3d')](this[_0xb423('0x8')][_0x31903f[_0xb423('0x40')]])){this['startAcw'](_0x31903f[_0xb423('0x40')]);if(this[_0xb423('0x8')][_0x31903f[_0xb423('0x41')]]){this[_0xb423('0x8')][_0x31903f[_0xb423('0x41')]][_0xb423('0x1b')]=!![];this[_0xb423('0x8')][_0x31903f['transfereeuniqueid']]=this['channels'][_0x31903f[_0xb423('0x41')]];delete this[_0xb423('0x8')][_0x31903f[_0xb423('0x41')]];}}}catch(_0x2f0736){logger[_0xb423('0x2a')](_0xb423('0x42'),_0x2f0736[_0xb423('0x2c')]);}};Acw[_0xb423('0x13')][_0xb423('0x43')]=function(_0x3b58bf){try{if(this[_0xb423('0x8')][_0x3b58bf[_0xb423('0x44')]]){logger[_0xb423('0x1d')]('[%s][BLINDTRANSFER:UNIQUEID]',JSON[_0xb423('0x45')](_0x3b58bf[_0xb423('0x44')]));this[_0xb423('0x39')](_0x3b58bf[_0xb423('0x44')]);}else if(this[_0xb423('0x8')][_0x3b58bf[_0xb423('0x46')]]){logger[_0xb423('0x1d')](_0xb423('0x47'),JSON['stringify'](_0x3b58bf['transfererlinkedid']));this[_0xb423('0x39')](_0x3b58bf[_0xb423('0x46')]);}}catch(_0x6021cf){logger['error']('[ACW][syncBlindTransfer]\x20%s',_0x6021cf[_0xb423('0x2c')]);}};Acw[_0xb423('0x13')][_0xb423('0xf')]=function(_0x4c0e1c){try{if(this[_0xb423('0x6')][_0x4c0e1c[_0xb423('0x14')]]&&this[_0xb423('0x6')][_0x4c0e1c[_0xb423('0x14')]][_0xb423('0x48')]===_0xb423('0x49')){if(this[_0xb423('0x19')][_0x4c0e1c['interface']]){logger[_0xb423('0x1d')]('[%s][AUTOPAUSE][AGENT:%s][QUEUE:%]',_0x4c0e1c[_0xb423('0x23')],_0x4c0e1c['interface'],_0x4c0e1c['queue']);return RpcUser[_0xb423('0x1c')](this[_0xb423('0x19')][_0x4c0e1c[_0xb423('0x32')]],_0xb423('0x4a'),_0x4c0e1c[_0xb423('0x23')]);}}}catch(_0x5e4e7a){logger[_0xb423('0x2a')]('[ACW][syncAgentRingNoAnswer]\x20%s',_0x5e4e7a[_0xb423('0x2c')]);}};module[_0xb423('0x4b')]=Acw; \ No newline at end of file diff --git a/server/services/ami/ami.js b/server/services/ami/ami.js index 9cc895f..52ee915 100644 --- a/server/services/ami/ami.js +++ b/server/services/ami/ami.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf94d=['Manager\x20\x22%s\x22\x20closed\x20to\x20%s:%s','port','actionSipPeerStatus','sippeerstatus','actionQueueSummary','queuesummary','coreshowchannels','info','Manager\x20\x22%s\x22\x20logged\x20on\x20to\x20%s:%s','once','close','connect','shutdown','Shutdown\x20\x22%s\x22\x20to\x20%s:%s\x20with:\x0a%s','Fullybooted\x20\x22%s\x22\x20to\x20%s:%s','resolve','then','actionSipShowRegistry','catch','exports','asterisk-manager','bluebird','moment','util','lodash','ami','../../config/environment','asterisk','username','password','Action','promisify','action','format','Manager\x20\x22%s\x22\x20error\x20to\x20%s:%s\x20with:\x0a%s','inspect','error'];(function(_0xb13527,_0x37c392){var _0x23a645=function(_0x3607ff){while(--_0x3607ff){_0xb13527['push'](_0xb13527['shift']());}};_0x23a645(++_0x37c392);}(_0xf94d,0x1d0));var _0xdf94=function(_0x3420e1,_0x4b7734){_0x3420e1=_0x3420e1-0x0;var _0x137eec=_0xf94d[_0x3420e1];return _0x137eec;};'use strict';var Manager=require(_0xdf94('0x0'));var BPromise=require(_0xdf94('0x1'));var moment=require(_0xdf94('0x2'));var util=require(_0xdf94('0x3'));var _=require(_0xdf94('0x4'));var logger=require('../../config/logger')(_0xdf94('0x5'));var config=require(_0xdf94('0x6'));var ami=new Manager(config[_0xdf94('0x7')]['port'],config[_0xdf94('0x7')]['ip'],config[_0xdf94('0x7')][_0xdf94('0x8')],config[_0xdf94('0x7')][_0xdf94('0x9')],!![]);ami['keepConnected']();ami[_0xdf94('0xa')]=BPromise[_0xdf94('0xb')](ami[_0xdf94('0xc')]);function error(_0x128e7f){logger['error'](util[_0xdf94('0xd')](_0xdf94('0xe'),config[_0xdf94('0x7')]['username'],config['asterisk']['ip'],config[_0xdf94('0x7')]['port'],util[_0xdf94('0xf')](_0x128e7f,![],null)));}function close(){logger[_0xdf94('0x10')](util[_0xdf94('0xd')](_0xdf94('0x11'),config[_0xdf94('0x7')]['username'],config['asterisk']['ip'],config[_0xdf94('0x7')][_0xdf94('0x12')]));}ami['actionSipShowRegistry']=function(){return function(){return ami['Action']({'action':'sipshowregistry'});};};ami['actionDeviceStateList']=function(){return function(){return ami[_0xdf94('0xa')]({'action':'devicestatelist'});};};ami[_0xdf94('0x13')]=function(){return function(){return ami[_0xdf94('0xa')]({'action':_0xdf94('0x14')});};};ami[_0xdf94('0x15')]=function(){return function(){return ami[_0xdf94('0xa')]({'action':_0xdf94('0x16')});};};ami['actionCoreShowChannels']=function(){return function(){return ami[_0xdf94('0xa')]({'action':_0xdf94('0x17')});};};function connect(_0x57b258){logger[_0xdf94('0x18')](util[_0xdf94('0xd')](_0xdf94('0x19'),config[_0xdf94('0x7')][_0xdf94('0x8')],config[_0xdf94('0x7')]['ip'],config['asterisk'][_0xdf94('0x12')]));ami['once']('error',error);ami[_0xdf94('0x1a')](_0xdf94('0x1b'),close);}ami['on'](_0xdf94('0x1c'),connect);ami['on'](_0xdf94('0x1d'),function(_0x1abbee){logger[_0xdf94('0x18')](util[_0xdf94('0xd')](_0xdf94('0x1e'),config[_0xdf94('0x7')][_0xdf94('0x8')],config[_0xdf94('0x7')]['ip'],config[_0xdf94('0x7')][_0xdf94('0x12')],util['inspect'](_0x1abbee,![],null)));});ami['on']('fullybooted',function(_0x5352b0){logger[_0xdf94('0x18')](util[_0xdf94('0xd')](_0xdf94('0x1f'),config['asterisk']['username'],config['asterisk']['ip'],config[_0xdf94('0x7')][_0xdf94('0x12')]));return BPromise[_0xdf94('0x20')]()[_0xdf94('0x21')](ami[_0xdf94('0x22')]())[_0xdf94('0x21')](ami['actionDeviceStateList']())[_0xdf94('0x21')](ami[_0xdf94('0x13')]())[_0xdf94('0x21')](ami[_0xdf94('0x15')]())['then'](ami['actionCoreShowChannels']())[_0xdf94('0x23')](function(_0x3783f7){console['log'](_0x3783f7);});});ami[_0xdf94('0x1a')]('error',error);ami[_0xdf94('0x1a')](_0xdf94('0x1b'),close);module[_0xdf94('0x24')]=ami; \ No newline at end of file +var _0x8a29=['sipshowregistry','actionDeviceStateList','devicestatelist','sippeerstatus','queuesummary','actionCoreShowChannels','info','once','close','connect','shutdown','Shutdown\x20\x22%s\x22\x20to\x20%s:%s\x20with:\x0a%s','inspect','fullybooted','Fullybooted\x20\x22%s\x22\x20to\x20%s:%s','resolve','then','actionSipShowRegistry','actionQueueSummary','catch','log','exports','asterisk-manager','bluebird','moment','util','lodash','port','asterisk','username','keepConnected','promisify','action','error','format','Manager\x20\x22%s\x22\x20error\x20to\x20%s:%s\x20with:\x0a%s','Manager\x20\x22%s\x22\x20closed\x20to\x20%s:%s','Action'];(function(_0x197506,_0x47ec93){var _0x319357=function(_0x136f79){while(--_0x136f79){_0x197506['push'](_0x197506['shift']());}};_0x319357(++_0x47ec93);}(_0x8a29,0xd4));var _0x98a2=function(_0x575ea1,_0x1f6599){_0x575ea1=_0x575ea1-0x0;var _0x396d52=_0x8a29[_0x575ea1];return _0x396d52;};'use strict';var Manager=require(_0x98a2('0x0'));var BPromise=require(_0x98a2('0x1'));var moment=require(_0x98a2('0x2'));var util=require(_0x98a2('0x3'));var _=require(_0x98a2('0x4'));var logger=require('../../config/logger')('ami');var config=require('../../config/environment');var ami=new Manager(config['asterisk'][_0x98a2('0x5')],config[_0x98a2('0x6')]['ip'],config[_0x98a2('0x6')][_0x98a2('0x7')],config['asterisk']['password'],!![]);ami[_0x98a2('0x8')]();ami['Action']=BPromise[_0x98a2('0x9')](ami[_0x98a2('0xa')]);function error(_0x5d3e9c){logger[_0x98a2('0xb')](util[_0x98a2('0xc')](_0x98a2('0xd'),config['asterisk'][_0x98a2('0x7')],config['asterisk']['ip'],config[_0x98a2('0x6')][_0x98a2('0x5')],util['inspect'](_0x5d3e9c,![],null)));}function close(){logger[_0x98a2('0xb')](util[_0x98a2('0xc')](_0x98a2('0xe'),config[_0x98a2('0x6')][_0x98a2('0x7')],config[_0x98a2('0x6')]['ip'],config[_0x98a2('0x6')][_0x98a2('0x5')]));}ami['actionSipShowRegistry']=function(){return function(){return ami[_0x98a2('0xf')]({'action':_0x98a2('0x10')});};};ami[_0x98a2('0x11')]=function(){return function(){return ami['Action']({'action':_0x98a2('0x12')});};};ami['actionSipPeerStatus']=function(){return function(){return ami['Action']({'action':_0x98a2('0x13')});};};ami['actionQueueSummary']=function(){return function(){return ami[_0x98a2('0xf')]({'action':_0x98a2('0x14')});};};ami[_0x98a2('0x15')]=function(){return function(){return ami[_0x98a2('0xf')]({'action':'coreshowchannels'});};};function connect(_0x1c1a30){logger[_0x98a2('0x16')](util[_0x98a2('0xc')]('Manager\x20\x22%s\x22\x20logged\x20on\x20to\x20%s:%s',config[_0x98a2('0x6')][_0x98a2('0x7')],config[_0x98a2('0x6')]['ip'],config['asterisk'][_0x98a2('0x5')]));ami['once']('error',error);ami[_0x98a2('0x17')](_0x98a2('0x18'),close);}ami['on'](_0x98a2('0x19'),connect);ami['on'](_0x98a2('0x1a'),function(_0x40d9fd){logger[_0x98a2('0x16')](util['format'](_0x98a2('0x1b'),config['asterisk'][_0x98a2('0x7')],config[_0x98a2('0x6')]['ip'],config[_0x98a2('0x6')][_0x98a2('0x5')],util[_0x98a2('0x1c')](_0x40d9fd,![],null)));});ami['on'](_0x98a2('0x1d'),function(_0x2fcbc5){logger[_0x98a2('0x16')](util[_0x98a2('0xc')](_0x98a2('0x1e'),config[_0x98a2('0x6')]['username'],config[_0x98a2('0x6')]['ip'],config['asterisk']['port']));return BPromise[_0x98a2('0x1f')]()[_0x98a2('0x20')](ami[_0x98a2('0x21')]())[_0x98a2('0x20')](ami['actionDeviceStateList']())[_0x98a2('0x20')](ami['actionSipPeerStatus']())['then'](ami[_0x98a2('0x22')]())['then'](ami['actionCoreShowChannels']())[_0x98a2('0x23')](function(_0x2a3565){console[_0x98a2('0x24')](_0x2a3565);});});ami['once']('error',error);ami[_0x98a2('0x17')](_0x98a2('0x18'),close);module[_0x98a2('0x25')]=ami; \ No newline at end of file diff --git a/server/services/ami/client.js b/server/services/ami/client.js index c42f54b..203cf13 100644 --- a/server/services/ami/client.js +++ b/server/services/ami/client.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbdb7=['result','catch','jayson/promise','bluebird','../../config/logger','ami','client','http','Request','debug','error','message'];(function(_0x24e723,_0x42964a){var _0x241f70=function(_0x31932c){while(--_0x31932c){_0x24e723['push'](_0x24e723['shift']());}};_0x241f70(++_0x42964a);}(_0xbdb7,0x12e));var _0x7bdb=function(_0x29b01f,_0x13e8bb){_0x29b01f=_0x29b01f-0x0;var _0xf7d6c3=_0xbdb7[_0x29b01f];return _0xf7d6c3;};'use strict';var jayson=require(_0x7bdb('0x0'));var BPromise=require(_0x7bdb('0x1'));var logger=require(_0x7bdb('0x2'))(_0x7bdb('0x3'));var client=jayson[_0x7bdb('0x4')][_0x7bdb('0x5')]({'port':0x2329});client[_0x7bdb('0x6')]=function(_0x2c7e07,_0x46c068){return new BPromise(function(_0x47aec5,_0x28542c){return client['request'](_0x2c7e07,_0x46c068)['then'](function(_0xffdc86){logger[_0x7bdb('0x7')]('rpc','memberReport',_0x2c7e07,_0x46c068,_0xffdc86);if(_0xffdc86[_0x7bdb('0x8')]){logger[_0x7bdb('0x8')]('rpc','memberReport',_0x2c7e07,_0xffdc86[_0x7bdb('0x8')][_0x7bdb('0x9')],_0x46c068);return _0x28542c(_0xffdc86[_0x7bdb('0x8')][_0x7bdb('0x9')]);}else{return _0x47aec5(_0xffdc86[_0x7bdb('0xa')]);}})[_0x7bdb('0xb')](function(_0x297724){logger[_0x7bdb('0x8')]('rpc','memberReport',_0x2c7e07,_0x297724,_0x46c068);return _0x28542c(_0x297724);});});};module['exports']=client; \ No newline at end of file +var _0xda3f=['then','rpc','memberReport','error','message','result','catch','exports','bluebird','../../config/logger','Request','request'];(function(_0x19950b,_0x53d0d7){var _0x3c6b41=function(_0x3924ad){while(--_0x3924ad){_0x19950b['push'](_0x19950b['shift']());}};_0x3c6b41(++_0x53d0d7);}(_0xda3f,0xec));var _0xfda3=function(_0x3dc5bd,_0xd32f4f){_0x3dc5bd=_0x3dc5bd-0x0;var _0x5dbd9d=_0xda3f[_0x3dc5bd];return _0x5dbd9d;};'use strict';var jayson=require('jayson/promise');var BPromise=require(_0xfda3('0x0'));var logger=require(_0xfda3('0x1'))('ami');var client=jayson['client']['http']({'port':0x2329});client[_0xfda3('0x2')]=function(_0x581693,_0x36dc71){return new BPromise(function(_0x22187d,_0x516500){return client[_0xfda3('0x3')](_0x581693,_0x36dc71)[_0xfda3('0x4')](function(_0x47e7e2){logger['debug'](_0xfda3('0x5'),_0xfda3('0x6'),_0x581693,_0x36dc71,_0x47e7e2);if(_0x47e7e2[_0xfda3('0x7')]){logger[_0xfda3('0x7')](_0xfda3('0x5'),_0xfda3('0x6'),_0x581693,_0x47e7e2[_0xfda3('0x7')][_0xfda3('0x8')],_0x36dc71);return _0x516500(_0x47e7e2[_0xfda3('0x7')][_0xfda3('0x8')]);}else{return _0x22187d(_0x47e7e2[_0xfda3('0x9')]);}})[_0xfda3('0xa')](function(_0x4d7841){logger[_0xfda3('0x7')](_0xfda3('0x5'),_0xfda3('0x6'),_0x581693,_0x4d7841,_0x36dc71);return _0x516500(_0x4d7841);});});};module[_0xfda3('0xb')]=client; \ No newline at end of file diff --git a/server/services/ami/dialer/action.js b/server/services/ami/dialer/action.js index b562654..b9ba540 100644 --- a/server/services/ami/dialer/action.js +++ b/server/services/ami/dialer/action.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x60b5=['YYYY-MM-DD\x20HH:mm:ss','callback','callbackuniqueid','callbackat','recallme','originatecalleridnum','originatecalleridname','prototype','getCaller','\x22%s\x22\x20<%s>','substring','dialCutDigit','getQueue','queue','util','lodash','isNil','string','voiceQueue','uniqueid','name','phone','firstName','Contact','lastName','number','active','type','dialQueueTimeout','scheduledat','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','ContactId','ListId','UserId','VoiceQueueId','CampaignId','idHopper','ContactFirstName','starttime','format'];(function(_0x1a1bb8,_0x38e77a){var _0x102a46=function(_0x5193ff){while(--_0x5193ff){_0x1a1bb8['push'](_0x1a1bb8['shift']());}};_0x102a46(++_0x38e77a);}(_0x60b5,0x9b));var _0x560b=function(_0xbd3479,_0x28e3ff){_0xbd3479=_0xbd3479-0x0;var _0x1173e4=_0x60b5[_0xbd3479];return _0x1173e4;};'use strict';var util=require(_0x560b('0x0'));var _=require(_0x560b('0x1'));var moment=require('moment');function checkNameSurname(_0xc385a4,_0x2cb666,_0x19c531){var _0x189d3a='';if(!_[_0x560b('0x2')](_0x2cb666)&&'string'===typeof _0x2cb666){_0x189d3a+=_0x2cb666;}if(!_[_0x560b('0x2')](_0x19c531)&&_0x560b('0x3')===typeof _0x19c531){_0x189d3a+='\x20'+_0x19c531;}if(_0x189d3a!==''){return _0x189d3a;}return _0xc385a4;}function Action(_0x904457,_0x48b726,_0x4f7975){this[_0x560b('0x4')]=_0x904457;this[_0x560b('0x5')]=_0x4f7975||undefined;this[_0x560b('0x6')]=checkNameSurname(_0x48b726['Contact'][_0x560b('0x7')],_0x48b726['Contact'][_0x560b('0x8')],_0x48b726[_0x560b('0x9')][_0x560b('0xa')]);this[_0x560b('0xb')]=_0x48b726[_0x560b('0x9')][_0x560b('0x7')];this['queue']=_0x904457[_0x560b('0x6')];this['active']=_0x48b726[_0x560b('0xc')]||![];this[_0x560b('0xd')]=_0x904457[_0x560b('0xd')];this[_0x560b('0xe')]=_0x904457[_0x560b('0xe')]||0x3;this[_0x560b('0xf')]=_0x48b726['scheduledat'];this[_0x560b('0x10')]=_0x48b726[_0x560b('0x10')];this[_0x560b('0x11')]=_0x48b726['countcongestionretry'];this[_0x560b('0x12')]=_0x48b726[_0x560b('0x12')];this[_0x560b('0x13')]=_0x48b726[_0x560b('0x13')];this[_0x560b('0x14')]=_0x48b726[_0x560b('0x14')];this[_0x560b('0x15')]=_0x48b726[_0x560b('0x15')];this['countmachineretry']=_0x48b726[_0x560b('0x16')];this[_0x560b('0x17')]=_0x48b726['countagentrejectretry'];this[_0x560b('0x18')]=_0x48b726[_0x560b('0x18')];this[_0x560b('0x19')]=_0x48b726[_0x560b('0x19')];this[_0x560b('0x1a')]=_0x48b726['UserId'];this[_0x560b('0x1b')]=_0x48b726['VoiceQueueId'];this[_0x560b('0x1c')]=_0x48b726[_0x560b('0x1c')];this[_0x560b('0x1d')]=_0x48b726['id'];this[_0x560b('0x1e')]=_0x48b726[_0x560b('0x9')]['firstName']||'';this[_0x560b('0x1f')]=moment()[_0x560b('0x20')](_0x560b('0x21'));this[_0x560b('0x22')]=_0x48b726[_0x560b('0x22')];this[_0x560b('0x23')]=_0x48b726[_0x560b('0x23')];this[_0x560b('0x24')]=_0x48b726['callbackat'];this['recallme']=_0x48b726[_0x560b('0x25')];this[_0x560b('0x26')]='';this[_0x560b('0x27')]='';}Action[_0x560b('0x28')][_0x560b('0x29')]=function(){return util[_0x560b('0x20')](_0x560b('0x2a'),this[_0x560b('0x6')],this[_0x560b('0x4')]['dialCutDigit']>0x0?this[_0x560b('0xb')][_0x560b('0x2b')](this[_0x560b('0x4')][_0x560b('0x2c')]):this['number']);};Action[_0x560b('0x28')][_0x560b('0x2d')]=function(){return this[_0x560b('0x2e')];};module['exports']=Action; \ No newline at end of file +var _0xe468=['VoiceQueueId','CampaignId','idHopper','firstName','format','YYYY-MM-DD\x20HH:mm:ss','callback','callbackuniqueid','callbackat','recallme','originatecalleridnum','prototype','getCaller','\x22%s\x22\x20<%s>','dialCutDigit','substring','getQueue','util','lodash','isNil','string','voiceQueue','uniqueid','name','Contact','lastName','number','queue','active','type','dialQueueTimeout','scheduledat','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','countabandonedretry','countmachineretry','countagentrejectretry','ContactId','ListId','UserId'];(function(_0x52fdfb,_0x204ff9){var _0x493f0a=function(_0x59c68c){while(--_0x59c68c){_0x52fdfb['push'](_0x52fdfb['shift']());}};_0x493f0a(++_0x204ff9);}(_0xe468,0x8f));var _0x8e46=function(_0x583b67,_0x232b31){_0x583b67=_0x583b67-0x0;var _0x449294=_0xe468[_0x583b67];return _0x449294;};'use strict';var util=require(_0x8e46('0x0'));var _=require(_0x8e46('0x1'));var moment=require('moment');function checkNameSurname(_0x57d20b,_0x1e993f,_0x11d75f){var _0x292a6e='';if(!_[_0x8e46('0x2')](_0x1e993f)&&'string'===typeof _0x1e993f){_0x292a6e+=_0x1e993f;}if(!_[_0x8e46('0x2')](_0x11d75f)&&_0x8e46('0x3')===typeof _0x11d75f){_0x292a6e+='\x20'+_0x11d75f;}if(_0x292a6e!==''){return _0x292a6e;}return _0x57d20b;}function Action(_0x508eeb,_0xfe7363,_0x3275c3){this[_0x8e46('0x4')]=_0x508eeb;this[_0x8e46('0x5')]=_0x3275c3||undefined;this[_0x8e46('0x6')]=checkNameSurname(_0xfe7363[_0x8e46('0x7')]['phone'],_0xfe7363[_0x8e46('0x7')]['firstName'],_0xfe7363[_0x8e46('0x7')][_0x8e46('0x8')]);this[_0x8e46('0x9')]=_0xfe7363['Contact']['phone'];this[_0x8e46('0xa')]=_0x508eeb['name'];this[_0x8e46('0xb')]=_0xfe7363['active']||![];this['type']=_0x508eeb[_0x8e46('0xc')];this[_0x8e46('0xd')]=_0x508eeb['dialQueueTimeout']||0x3;this[_0x8e46('0xe')]=_0xfe7363['scheduledat'];this[_0x8e46('0xf')]=_0xfe7363['countbusyretry'];this[_0x8e46('0x10')]=_0xfe7363[_0x8e46('0x10')];this[_0x8e46('0x11')]=_0xfe7363[_0x8e46('0x11')];this['countnosuchnumberretry']=_0xfe7363[_0x8e46('0x12')];this['countdropretry']=_0xfe7363['countdropretry'];this[_0x8e46('0x13')]=_0xfe7363['countabandonedretry'];this[_0x8e46('0x14')]=_0xfe7363[_0x8e46('0x14')];this[_0x8e46('0x15')]=_0xfe7363[_0x8e46('0x15')];this[_0x8e46('0x16')]=_0xfe7363[_0x8e46('0x16')];this['ListId']=_0xfe7363[_0x8e46('0x17')];this[_0x8e46('0x18')]=_0xfe7363[_0x8e46('0x18')];this['VoiceQueueId']=_0xfe7363[_0x8e46('0x19')];this[_0x8e46('0x1a')]=_0xfe7363[_0x8e46('0x1a')];this[_0x8e46('0x1b')]=_0xfe7363['id'];this['ContactFirstName']=_0xfe7363[_0x8e46('0x7')][_0x8e46('0x1c')]||'';this['starttime']=moment()[_0x8e46('0x1d')](_0x8e46('0x1e'));this[_0x8e46('0x1f')]=_0xfe7363[_0x8e46('0x1f')];this[_0x8e46('0x20')]=_0xfe7363['callbackuniqueid'];this[_0x8e46('0x21')]=_0xfe7363[_0x8e46('0x21')];this['recallme']=_0xfe7363[_0x8e46('0x22')];this[_0x8e46('0x23')]='';this['originatecalleridname']='';}Action[_0x8e46('0x24')][_0x8e46('0x25')]=function(){return util['format'](_0x8e46('0x26'),this[_0x8e46('0x6')],this[_0x8e46('0x4')][_0x8e46('0x27')]>0x0?this[_0x8e46('0x9')][_0x8e46('0x28')](this[_0x8e46('0x4')][_0x8e46('0x27')]):this['number']);};Action['prototype'][_0x8e46('0x29')]=function(){return this['queue'];};module['exports']=Action; \ No newline at end of file diff --git a/server/services/ami/dialer/agentComplete.js b/server/services/ami/dialer/agentComplete.js index 6b94f35..51c9e8e 100644 --- a/server/services/ami/dialer/agentComplete.js +++ b/server/services/ami/dialer/agentComplete.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x44d4=['countnosuchnumberretry','countdropretry','countabandonedretry','countagentrejectretry','uniqueid','calleridname','name','number','starttime','responsetime','answertime','format','YYYY-MM-DD\x20HH:mm:ss','holdtime','talktime','endtime','queue','membername','reason','callback','callbackuniqueid','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','lodash','moment','milliseconds','diff','seconds','state','Answer','scheduledat','type','campaigntype','outbound','countbusyretry','countcongestionretry','countnoanswerretry','countglobal'];(function(_0x40c8d1,_0x561cf8){var _0xadad3=function(_0x141343){while(--_0x141343){_0x40c8d1['push'](_0x40c8d1['shift']());}};_0xadad3(++_0x561cf8);}(_0x44d4,0x125));var _0x444d=function(_0x50c103,_0x15347c){_0x50c103=_0x50c103-0x0;var _0x41b2ce=_0x44d4[_0x50c103];return _0x41b2ce;};'use strict';var util=require('util');var _=require(_0x444d('0x0'));var moment=require(_0x444d('0x1'));function getSeconds(_0x17a83a,_0x22d217){var _0x21df6b=moment(_0x17a83a)['milliseconds'](0x0);var _0x12365a=moment(_0x22d217)[_0x444d('0x2')](0x0);return _0x21df6b[_0x444d('0x3')](_0x12365a,_0x444d('0x4'));}function AgentComplete(_0x4671ca,_0x4f8cd4){this[_0x444d('0x5')]=0x4;this['statedesc']=_0x444d('0x6');this[_0x444d('0x7')]=_0x4671ca[_0x444d('0x7')];this[_0x444d('0x8')]=_0x4671ca[_0x444d('0x8')];this[_0x444d('0x9')]=_0x4671ca[_0x444d('0x8')]===_0x444d('0xa')?'queue':_0x4671ca['type'];this['countbusyretry']=_0x4671ca[_0x444d('0xb')];this[_0x444d('0xc')]=_0x4671ca[_0x444d('0xc')];this[_0x444d('0xd')]=_0x4671ca[_0x444d('0xd')];this[_0x444d('0xe')]=_0x4671ca[_0x444d('0xb')]+_0x4671ca[_0x444d('0xc')]+_0x4671ca['countnoanswerretry']+_0x4671ca[_0x444d('0xf')]+_0x4671ca[_0x444d('0x10')]+_0x4671ca[_0x444d('0x11')]+_0x4671ca['countmachineretry']+_0x4671ca[_0x444d('0x12')];this[_0x444d('0xf')]=_0x4671ca[_0x444d('0xf')];this[_0x444d('0x10')]=_0x4671ca[_0x444d('0x10')];this[_0x444d('0x11')]=_0x4671ca[_0x444d('0x11')];this['countmachineretry']=_0x4671ca['countmachineretry'];this[_0x444d('0x12')]=_0x4671ca[_0x444d('0x12')];this[_0x444d('0x13')]=_0x4f8cd4['uniqueid'];this[_0x444d('0x14')]=_0x4671ca[_0x444d('0x15')];this['calleridnum']=_0x4671ca[_0x444d('0x16')];this[_0x444d('0x17')]=_0x4671ca['starttime'];this['responsetime']=_0x4671ca[_0x444d('0x18')];this[_0x444d('0x19')]=_0x4671ca[_0x444d('0x19')];this['endtime']=moment()[_0x444d('0x1a')](_0x444d('0x1b'));this['ringtime']=getSeconds(_0x4671ca['responsetime'],_0x4671ca[_0x444d('0x17')]);this[_0x444d('0x1c')]=getSeconds(_0x4671ca[_0x444d('0x19')],_0x4671ca[_0x444d('0x18')]);this[_0x444d('0x1d')]=getSeconds(this[_0x444d('0x1e')],_0x4671ca[_0x444d('0x19')]);this[_0x444d('0x1f')]=_0x4f8cd4['queue'];this['membername']=_0x4f8cd4[_0x444d('0x20')];this[_0x444d('0x21')]=_0x4f8cd4[_0x444d('0x21')];this[_0x444d('0x22')]=_0x4671ca[_0x444d('0x22')];this[_0x444d('0x23')]=_0x4671ca[_0x444d('0x23')];this['callbackat']=_0x4671ca['callbackat'];this[_0x444d('0x24')]=_0x4671ca[_0x444d('0x24')];this[_0x444d('0x25')]=_0x4671ca['ContactId'];this['ListId']=_0x4671ca[_0x444d('0x26')];this[_0x444d('0x27')]=_0x4671ca[_0x444d('0x27')];this[_0x444d('0x28')]=_0x4671ca[_0x444d('0x28')];this[_0x444d('0x29')]=_0x4671ca[_0x444d('0x29')];this[_0x444d('0x2a')]=_0x4671ca[_0x444d('0x2a')]||'';this['originatecalleridname']=_0x4671ca[_0x444d('0x2b')]||'';}module['exports']=AgentComplete; \ No newline at end of file +var _0x3b0a=['queue','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','uniqueid','name','number','starttime','responsetime','answertime','endtime','format','YYYY-MM-DD\x20HH:mm:ss','ringtime','holdtime','talktime','membername','reason','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','originatecalleridnum','originatecalleridname','exports','util','lodash','moment','milliseconds','diff','seconds','state','Answer','scheduledat','type','campaigntype','outbound'];(function(_0x513717,_0x370aec){var _0x42e4f9=function(_0x4e137f){while(--_0x4e137f){_0x513717['push'](_0x513717['shift']());}};_0x42e4f9(++_0x370aec);}(_0x3b0a,0x1ee));var _0xa3b0=function(_0x581a2b,_0x557f1c){_0x581a2b=_0x581a2b-0x0;var _0x52ee00=_0x3b0a[_0x581a2b];return _0x52ee00;};'use strict';var util=require(_0xa3b0('0x0'));var _=require(_0xa3b0('0x1'));var moment=require(_0xa3b0('0x2'));function getSeconds(_0x3308ee,_0x2640f1){var _0x354ed1=moment(_0x3308ee)[_0xa3b0('0x3')](0x0);var _0x5e539e=moment(_0x2640f1)['milliseconds'](0x0);return _0x354ed1[_0xa3b0('0x4')](_0x5e539e,_0xa3b0('0x5'));}function AgentComplete(_0x265926,_0x3feef8){this[_0xa3b0('0x6')]=0x4;this['statedesc']=_0xa3b0('0x7');this[_0xa3b0('0x8')]=_0x265926[_0xa3b0('0x8')];this[_0xa3b0('0x9')]=_0x265926[_0xa3b0('0x9')];this[_0xa3b0('0xa')]=_0x265926['type']===_0xa3b0('0xb')?_0xa3b0('0xc'):_0x265926[_0xa3b0('0x9')];this[_0xa3b0('0xd')]=_0x265926[_0xa3b0('0xd')];this[_0xa3b0('0xe')]=_0x265926[_0xa3b0('0xe')];this[_0xa3b0('0xf')]=_0x265926[_0xa3b0('0xf')];this['countglobal']=_0x265926[_0xa3b0('0xd')]+_0x265926[_0xa3b0('0xe')]+_0x265926[_0xa3b0('0xf')]+_0x265926[_0xa3b0('0x10')]+_0x265926[_0xa3b0('0x11')]+_0x265926[_0xa3b0('0x12')]+_0x265926[_0xa3b0('0x13')]+_0x265926[_0xa3b0('0x14')];this[_0xa3b0('0x10')]=_0x265926[_0xa3b0('0x10')];this['countdropretry']=_0x265926[_0xa3b0('0x11')];this['countabandonedretry']=_0x265926[_0xa3b0('0x12')];this[_0xa3b0('0x13')]=_0x265926[_0xa3b0('0x13')];this[_0xa3b0('0x14')]=_0x265926[_0xa3b0('0x14')];this[_0xa3b0('0x15')]=_0x3feef8[_0xa3b0('0x15')];this['calleridname']=_0x265926[_0xa3b0('0x16')];this['calleridnum']=_0x265926[_0xa3b0('0x17')];this[_0xa3b0('0x18')]=_0x265926[_0xa3b0('0x18')];this[_0xa3b0('0x19')]=_0x265926['responsetime'];this[_0xa3b0('0x1a')]=_0x265926['answertime'];this[_0xa3b0('0x1b')]=moment()[_0xa3b0('0x1c')](_0xa3b0('0x1d'));this[_0xa3b0('0x1e')]=getSeconds(_0x265926['responsetime'],_0x265926[_0xa3b0('0x18')]);this[_0xa3b0('0x1f')]=getSeconds(_0x265926[_0xa3b0('0x1a')],_0x265926['responsetime']);this[_0xa3b0('0x20')]=getSeconds(this[_0xa3b0('0x1b')],_0x265926[_0xa3b0('0x1a')]);this[_0xa3b0('0xc')]=_0x3feef8[_0xa3b0('0xc')];this[_0xa3b0('0x21')]=_0x3feef8[_0xa3b0('0x21')];this[_0xa3b0('0x22')]=_0x3feef8['reason'];this[_0xa3b0('0x23')]=_0x265926[_0xa3b0('0x23')];this[_0xa3b0('0x24')]=_0x265926['callbackuniqueid'];this[_0xa3b0('0x25')]=_0x265926[_0xa3b0('0x25')];this[_0xa3b0('0x26')]=_0x265926['recallme'];this['ContactId']=_0x265926[_0xa3b0('0x27')];this[_0xa3b0('0x28')]=_0x265926[_0xa3b0('0x28')];this[_0xa3b0('0x29')]=_0x265926[_0xa3b0('0x29')];this[_0xa3b0('0x2a')]=_0x265926[_0xa3b0('0x2a')];this['CampaignId']=_0x265926['CampaignId'];this[_0xa3b0('0x2b')]=_0x265926[_0xa3b0('0x2b')]||'';this[_0xa3b0('0x2c')]=_0x265926[_0xa3b0('0x2c')]||'';}module[_0xa3b0('0x2d')]=AgentComplete; \ No newline at end of file diff --git a/server/services/ami/dialer/final.js b/server/services/ami/dialer/final.js index 9b734e9..01eb92d 100644 --- a/server/services/ami/dialer/final.js +++ b/server/services/ami/dialer/final.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9f5a=['countcongestionretry','countglobal','countnoanswerretry','countdropretry','countabandonedretry','countmachineretry','countnosuchnumberretry','countagentrejectretry','queue','calleridname','calleridnum','starttime','responsetime','endtime','ringtime','holdtime','talktime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','util','lodash','moment','milliseconds','diff','uniqueid','scheduledat','type','campaigntype','outbound','countbusyretry'];(function(_0x222f5b,_0x4b4c25){var _0x3a3a11=function(_0xaf8ed0){while(--_0xaf8ed0){_0x222f5b['push'](_0x222f5b['shift']());}};_0x3a3a11(++_0x4b4c25);}(_0x9f5a,0xbd));var _0xa9f5=function(_0x5eb30a,_0x374aab){_0x5eb30a=_0x5eb30a-0x0;var _0x888973=_0x9f5a[_0x5eb30a];return _0x888973;};'use strict';var util=require(_0xa9f5('0x0'));var _=require(_0xa9f5('0x1'));var moment=require(_0xa9f5('0x2'));function getSeconds(_0x308912,_0x546306){var _0x4268b0=moment(_0x308912)[_0xa9f5('0x3')](0x0);var _0x3cdf79=moment(_0x546306)['milliseconds'](0x0);return _0x4268b0[_0xa9f5('0x4')](_0x3cdf79,'seconds');}function Final(_0x1a2b95){this[_0xa9f5('0x5')]=_0x1a2b95['uniqueid'];this[_0xa9f5('0x6')]=_0x1a2b95[_0xa9f5('0x6')];this[_0xa9f5('0x7')]=_0x1a2b95[_0xa9f5('0x7')];this[_0xa9f5('0x8')]=_0x1a2b95[_0xa9f5('0x7')]===_0xa9f5('0x9')?'queue':_0x1a2b95[_0xa9f5('0x7')];this[_0xa9f5('0xa')]=_0x1a2b95['countbusyretry'];this[_0xa9f5('0xb')]=_0x1a2b95[_0xa9f5('0xb')];this['countnoanswerretry']=_0x1a2b95['countnoanswerretry'];this[_0xa9f5('0xc')]=_0x1a2b95[_0xa9f5('0xa')]+_0x1a2b95[_0xa9f5('0xb')]+_0x1a2b95[_0xa9f5('0xd')]+_0x1a2b95['countnosuchnumberretry']+_0x1a2b95[_0xa9f5('0xe')]+_0x1a2b95[_0xa9f5('0xf')]+_0x1a2b95[_0xa9f5('0x10')]+_0x1a2b95['countagentrejectretry'];this[_0xa9f5('0x11')]=_0x1a2b95[_0xa9f5('0x11')];this['countdropretry']=_0x1a2b95['countdropretry'];this['countabandonedretry']=_0x1a2b95[_0xa9f5('0xf')];this['countmachineretry']=_0x1a2b95['countmachineretry'];this[_0xa9f5('0x12')]=_0x1a2b95[_0xa9f5('0x12')];this[_0xa9f5('0x13')]=_0x1a2b95[_0xa9f5('0x13')];this['calleridname']=_0x1a2b95[_0xa9f5('0x14')];this[_0xa9f5('0x15')]=_0x1a2b95[_0xa9f5('0x15')];this[_0xa9f5('0x16')]=_0x1a2b95[_0xa9f5('0x16')];this[_0xa9f5('0x17')]=_0x1a2b95[_0xa9f5('0x17')];this[_0xa9f5('0x18')]=_0x1a2b95[_0xa9f5('0x17')];this[_0xa9f5('0x19')]=_0x1a2b95[_0xa9f5('0x19')]||0x0;this[_0xa9f5('0x1a')]=_0x1a2b95['holdtime']||0x0;this[_0xa9f5('0x1b')]=_0x1a2b95[_0xa9f5('0x1b')]||0x0;this[_0xa9f5('0x1c')]=_0x1a2b95[_0xa9f5('0x1c')];this[_0xa9f5('0x1d')]=_0x1a2b95[_0xa9f5('0x1d')];this[_0xa9f5('0x1e')]=_0x1a2b95['callbackat'];this[_0xa9f5('0x1f')]=_0x1a2b95[_0xa9f5('0x1f')];this[_0xa9f5('0x20')]=_0x1a2b95[_0xa9f5('0x20')];this[_0xa9f5('0x21')]=_0x1a2b95[_0xa9f5('0x21')];this[_0xa9f5('0x22')]=_0x1a2b95[_0xa9f5('0x22')];this['VoiceQueueId']=_0x1a2b95[_0xa9f5('0x23')];this[_0xa9f5('0x24')]=_0x1a2b95[_0xa9f5('0x24')];this[_0xa9f5('0x25')]=_0x1a2b95[_0xa9f5('0x25')]||'';this[_0xa9f5('0x26')]=_0x1a2b95['originatecalleridname']||'';}module[_0xa9f5('0x27')]=Final; \ No newline at end of file +var _0x5075=['seconds','uniqueid','scheduledat','type','campaigntype','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','calleridname','calleridnum','starttime','responsetime','endtime','ringtime','holdtime','talktime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','util','lodash','moment','milliseconds','diff'];(function(_0x23fcbc,_0x22558a){var _0x9b85d0=function(_0x5cefcd){while(--_0x5cefcd){_0x23fcbc['push'](_0x23fcbc['shift']());}};_0x9b85d0(++_0x22558a);}(_0x5075,0x73));var _0x5507=function(_0x34473f,_0x2b9c5c){_0x34473f=_0x34473f-0x0;var _0x25cf6f=_0x5075[_0x34473f];return _0x25cf6f;};'use strict';var util=require(_0x5507('0x0'));var _=require(_0x5507('0x1'));var moment=require(_0x5507('0x2'));function getSeconds(_0x1a552a,_0x3ec62f){var _0x2b444e=moment(_0x1a552a)[_0x5507('0x3')](0x0);var _0x518ca7=moment(_0x3ec62f)[_0x5507('0x3')](0x0);return _0x2b444e[_0x5507('0x4')](_0x518ca7,_0x5507('0x5'));}function Final(_0x54267f){this['uniqueid']=_0x54267f[_0x5507('0x6')];this[_0x5507('0x7')]=_0x54267f['scheduledat'];this[_0x5507('0x8')]=_0x54267f[_0x5507('0x8')];this[_0x5507('0x9')]=_0x54267f['type']==='outbound'?_0x5507('0xa'):_0x54267f[_0x5507('0x8')];this[_0x5507('0xb')]=_0x54267f[_0x5507('0xb')];this['countcongestionretry']=_0x54267f[_0x5507('0xc')];this[_0x5507('0xd')]=_0x54267f['countnoanswerretry'];this[_0x5507('0xe')]=_0x54267f[_0x5507('0xb')]+_0x54267f['countcongestionretry']+_0x54267f[_0x5507('0xd')]+_0x54267f[_0x5507('0xf')]+_0x54267f[_0x5507('0x10')]+_0x54267f[_0x5507('0x11')]+_0x54267f[_0x5507('0x12')]+_0x54267f[_0x5507('0x13')];this['countnosuchnumberretry']=_0x54267f[_0x5507('0xf')];this[_0x5507('0x10')]=_0x54267f[_0x5507('0x10')];this[_0x5507('0x11')]=_0x54267f['countabandonedretry'];this[_0x5507('0x12')]=_0x54267f[_0x5507('0x12')];this[_0x5507('0x13')]=_0x54267f[_0x5507('0x13')];this[_0x5507('0xa')]=_0x54267f[_0x5507('0xa')];this[_0x5507('0x14')]=_0x54267f[_0x5507('0x14')];this[_0x5507('0x15')]=_0x54267f[_0x5507('0x15')];this[_0x5507('0x16')]=_0x54267f[_0x5507('0x16')];this[_0x5507('0x17')]=_0x54267f['responsetime'];this[_0x5507('0x18')]=_0x54267f[_0x5507('0x17')];this[_0x5507('0x19')]=_0x54267f[_0x5507('0x19')]||0x0;this['holdtime']=_0x54267f[_0x5507('0x1a')]||0x0;this[_0x5507('0x1b')]=_0x54267f[_0x5507('0x1b')]||0x0;this[_0x5507('0x1c')]=_0x54267f[_0x5507('0x1c')];this[_0x5507('0x1d')]=_0x54267f['callbackuniqueid'];this[_0x5507('0x1e')]=_0x54267f[_0x5507('0x1e')];this[_0x5507('0x1f')]=_0x54267f[_0x5507('0x1f')];this[_0x5507('0x20')]=_0x54267f[_0x5507('0x20')];this[_0x5507('0x21')]=_0x54267f[_0x5507('0x21')];this[_0x5507('0x22')]=_0x54267f[_0x5507('0x22')];this[_0x5507('0x23')]=_0x54267f[_0x5507('0x23')];this[_0x5507('0x24')]=_0x54267f[_0x5507('0x24')];this[_0x5507('0x25')]=_0x54267f['originatecalleridnum']||'';this[_0x5507('0x26')]=_0x54267f['originatecalleridname']||'';}module[_0x5507('0x27')]=Final; \ No newline at end of file diff --git a/server/services/ami/dialer/hangup.js b/server/services/ami/dialer/hangup.js index e93ebd1..230819b 100644 --- a/server/services/ami/dialer/hangup.js +++ b/server/services/ami/dialer/hangup.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xcaca=['countagentrejectretry','countabandonedretry','uniqueid','name','calleridnum','starttime','responsetime','endtime','YYYY-MM-DD\x20HH:mm:ss','ringtime','talktime','reason','cause-txt','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','util','lodash','moment','milliseconds','state','Answer','scheduledat','type','campaigntype','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countmachineretry'];(function(_0x2863cb,_0x530f4c){var _0x32fd01=function(_0x39f8d0){while(--_0x39f8d0){_0x2863cb['push'](_0x2863cb['shift']());}};_0x32fd01(++_0x530f4c);}(_0xcaca,0x64));var _0xacac=function(_0x19c9f1,_0x919764){_0x19c9f1=_0x19c9f1-0x0;var _0x35da1d=_0xcaca[_0x19c9f1];return _0x35da1d;};'use strict';var util=require(_0xacac('0x0'));var _=require(_0xacac('0x1'));var moment=require(_0xacac('0x2'));function getSeconds(_0x5e02de,_0x3b30e7){var _0x333656=moment(_0x5e02de)[_0xacac('0x3')](0x0);var _0x25b4ee=moment(_0x3b30e7)[_0xacac('0x3')](0x0);return _0x333656['diff'](_0x25b4ee,'seconds');}function Hangup(_0x248690,_0x478176){this[_0xacac('0x4')]=0x4;this['statedesc']=_0xacac('0x5');this[_0xacac('0x6')]=_0x248690[_0xacac('0x6')];this['type']=_0x248690[_0xacac('0x7')];this[_0xacac('0x8')]=_0x248690[_0xacac('0x7')]==='outbound'?_0xacac('0x9'):_0x248690['type'];this[_0xacac('0xa')]=_0x248690[_0xacac('0xa')];this[_0xacac('0xb')]=_0x248690['countcongestionretry'];this['countnoanswerretry']=_0x248690[_0xacac('0xc')];this[_0xacac('0xd')]=_0x248690['countbusyretry']+_0x248690[_0xacac('0xb')]+_0x248690[_0xacac('0xc')]+_0x248690[_0xacac('0xe')]+_0x248690[_0xacac('0xf')]+_0x248690['countabandonedretry']+_0x248690[_0xacac('0x10')]+_0x248690[_0xacac('0x11')];this[_0xacac('0xe')]=_0x248690['countnosuchnumberretry'];this[_0xacac('0xf')]=_0x248690[_0xacac('0xf')];this[_0xacac('0x12')]=_0x248690[_0xacac('0x12')];this['countmachineretry']=_0x248690[_0xacac('0x10')];this[_0xacac('0x11')]=_0x248690['countagentrejectretry'];this[_0xacac('0x13')]=_0x478176[_0xacac('0x13')];this['calleridname']=_0x248690[_0xacac('0x14')];this[_0xacac('0x15')]=_0x248690['number'];this[_0xacac('0x16')]=_0x248690[_0xacac('0x16')];this[_0xacac('0x17')]=_0x248690['responsetime'];this[_0xacac('0x18')]=moment()['format'](_0xacac('0x19'));this[_0xacac('0x1a')]=getSeconds(_0x248690[_0xacac('0x17')],_0x248690[_0xacac('0x16')]);this['holdtime']=0x0;this[_0xacac('0x1b')]=getSeconds(this[_0xacac('0x18')],_0x248690['responsetime']);this[_0xacac('0x9')]=_0x248690[_0xacac('0x9')];this['membername']='IVR';this[_0xacac('0x1c')]=_0x478176[_0xacac('0x1d')];this[_0xacac('0x1e')]=_0x248690[_0xacac('0x1e')];this[_0xacac('0x1f')]=_0x248690['callbackuniqueid'];this['callbackat']=_0x248690[_0xacac('0x20')];this[_0xacac('0x21')]=_0x248690[_0xacac('0x21')];this[_0xacac('0x22')]=_0x248690[_0xacac('0x22')];this[_0xacac('0x23')]=_0x248690[_0xacac('0x23')];this[_0xacac('0x24')]=_0x248690[_0xacac('0x24')];this[_0xacac('0x25')]=_0x248690[_0xacac('0x25')];this[_0xacac('0x26')]=_0x248690[_0xacac('0x26')];}module['exports']=Hangup; \ No newline at end of file +var _0x0ca5=['calleridnum','number','starttime','responsetime','endtime','talktime','queue','membername','cause-txt','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','exports','util','lodash','moment','milliseconds','diff','seconds','state','statedesc','scheduledat','type','outbound','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countagentrejectretry','uniqueid'];(function(_0x86d807,_0x4c11e5){var _0x590517=function(_0xffdbb3){while(--_0xffdbb3){_0x86d807['push'](_0x86d807['shift']());}};_0x590517(++_0x4c11e5);}(_0x0ca5,0x1c0));var _0x50ca=function(_0x128950,_0x283ac3){_0x128950=_0x128950-0x0;var _0x405519=_0x0ca5[_0x128950];return _0x405519;};'use strict';var util=require(_0x50ca('0x0'));var _=require(_0x50ca('0x1'));var moment=require(_0x50ca('0x2'));function getSeconds(_0x3f269d,_0x17daf7){var _0x16c6b6=moment(_0x3f269d)[_0x50ca('0x3')](0x0);var _0x18a2e3=moment(_0x17daf7)[_0x50ca('0x3')](0x0);return _0x16c6b6[_0x50ca('0x4')](_0x18a2e3,_0x50ca('0x5'));}function Hangup(_0x8ff7f2,_0x59cc24){this[_0x50ca('0x6')]=0x4;this[_0x50ca('0x7')]='Answer';this[_0x50ca('0x8')]=_0x8ff7f2[_0x50ca('0x8')];this[_0x50ca('0x9')]=_0x8ff7f2['type'];this['campaigntype']=_0x8ff7f2[_0x50ca('0x9')]===_0x50ca('0xa')?'queue':_0x8ff7f2[_0x50ca('0x9')];this[_0x50ca('0xb')]=_0x8ff7f2['countbusyretry'];this[_0x50ca('0xc')]=_0x8ff7f2[_0x50ca('0xc')];this[_0x50ca('0xd')]=_0x8ff7f2[_0x50ca('0xd')];this[_0x50ca('0xe')]=_0x8ff7f2['countbusyretry']+_0x8ff7f2[_0x50ca('0xc')]+_0x8ff7f2['countnoanswerretry']+_0x8ff7f2[_0x50ca('0xf')]+_0x8ff7f2[_0x50ca('0x10')]+_0x8ff7f2[_0x50ca('0x11')]+_0x8ff7f2['countmachineretry']+_0x8ff7f2['countagentrejectretry'];this[_0x50ca('0xf')]=_0x8ff7f2['countnosuchnumberretry'];this[_0x50ca('0x10')]=_0x8ff7f2[_0x50ca('0x10')];this['countabandonedretry']=_0x8ff7f2[_0x50ca('0x11')];this['countmachineretry']=_0x8ff7f2['countmachineretry'];this[_0x50ca('0x12')]=_0x8ff7f2[_0x50ca('0x12')];this[_0x50ca('0x13')]=_0x59cc24[_0x50ca('0x13')];this['calleridname']=_0x8ff7f2['name'];this[_0x50ca('0x14')]=_0x8ff7f2[_0x50ca('0x15')];this['starttime']=_0x8ff7f2[_0x50ca('0x16')];this['responsetime']=_0x8ff7f2[_0x50ca('0x17')];this[_0x50ca('0x18')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');this['ringtime']=getSeconds(_0x8ff7f2[_0x50ca('0x17')],_0x8ff7f2[_0x50ca('0x16')]);this['holdtime']=0x0;this[_0x50ca('0x19')]=getSeconds(this[_0x50ca('0x18')],_0x8ff7f2['responsetime']);this['queue']=_0x8ff7f2[_0x50ca('0x1a')];this[_0x50ca('0x1b')]='IVR';this['reason']=_0x59cc24[_0x50ca('0x1c')];this[_0x50ca('0x1d')]=_0x8ff7f2[_0x50ca('0x1d')];this[_0x50ca('0x1e')]=_0x8ff7f2[_0x50ca('0x1e')];this['callbackat']=_0x8ff7f2[_0x50ca('0x1f')];this[_0x50ca('0x20')]=_0x8ff7f2['recallme'];this[_0x50ca('0x21')]=_0x8ff7f2[_0x50ca('0x21')];this[_0x50ca('0x22')]=_0x8ff7f2['ListId'];this[_0x50ca('0x23')]=_0x8ff7f2[_0x50ca('0x23')];this[_0x50ca('0x24')]=_0x8ff7f2[_0x50ca('0x24')];this[_0x50ca('0x25')]=_0x8ff7f2['CampaignId'];}module[_0x50ca('0x26')]=Hangup; \ No newline at end of file diff --git a/server/services/ami/dialer/history.js b/server/services/ami/dialer/history.js index 15b5148..5d7ddf3 100644 --- a/server/services/ami/dialer/history.js +++ b/server/services/ami/dialer/history.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5e9e=['ringtime','holdtime','talktime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','lodash','moment','milliseconds','diff','seconds','uniqueid','scheduledat','type','outbound','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','queue','calleridname','name','calleridnum','starttime','responsetime','endtime'];(function(_0x570069,_0x3048b1){var _0x5648ea=function(_0x266ec3){while(--_0x266ec3){_0x570069['push'](_0x570069['shift']());}};_0x5648ea(++_0x3048b1);}(_0x5e9e,0xaf));var _0xe5e9=function(_0x50e7e0,_0x5affce){_0x50e7e0=_0x50e7e0-0x0;var _0x1a0307=_0x5e9e[_0x50e7e0];return _0x1a0307;};'use strict';var util=require('util');var _=require(_0xe5e9('0x0'));var moment=require(_0xe5e9('0x1'));function getSeconds(_0x27cf17,_0x12b04a){var _0x894b18=moment(_0x27cf17)[_0xe5e9('0x2')](0x0);var _0x1ddea6=moment(_0x12b04a)['milliseconds'](0x0);return _0x894b18[_0xe5e9('0x3')](_0x1ddea6,_0xe5e9('0x4'));}function History(_0x3f1fb7){this[_0xe5e9('0x5')]=_0x3f1fb7[_0xe5e9('0x5')];this[_0xe5e9('0x6')]=_0x3f1fb7[_0xe5e9('0x6')]||undefined;this[_0xe5e9('0x7')]=_0x3f1fb7[_0xe5e9('0x7')];this['campaigntype']=_0x3f1fb7['type']===_0xe5e9('0x8')?'queue':_0x3f1fb7['type'];this['countbusyretry']=_0x3f1fb7[_0xe5e9('0x9')];this[_0xe5e9('0xa')]=_0x3f1fb7['countcongestionretry'];this[_0xe5e9('0xb')]=_0x3f1fb7[_0xe5e9('0xb')];this[_0xe5e9('0xc')]=_0x3f1fb7[_0xe5e9('0x9')]+_0x3f1fb7[_0xe5e9('0xa')]+_0x3f1fb7[_0xe5e9('0xb')]+_0x3f1fb7[_0xe5e9('0xd')]+_0x3f1fb7[_0xe5e9('0xe')]+_0x3f1fb7[_0xe5e9('0xf')]+_0x3f1fb7[_0xe5e9('0x10')]+_0x3f1fb7[_0xe5e9('0x11')];this[_0xe5e9('0xd')]=_0x3f1fb7[_0xe5e9('0xd')];this[_0xe5e9('0xe')]=_0x3f1fb7[_0xe5e9('0xe')];this[_0xe5e9('0xf')]=_0x3f1fb7[_0xe5e9('0xf')];this[_0xe5e9('0x10')]=_0x3f1fb7[_0xe5e9('0x10')];this['countagentrejectretry']=_0x3f1fb7[_0xe5e9('0x11')];this[_0xe5e9('0x12')]=_0x3f1fb7['queue'];this[_0xe5e9('0x13')]=_0x3f1fb7[_0xe5e9('0x14')];this[_0xe5e9('0x15')]=_0x3f1fb7['number'];this[_0xe5e9('0x16')]=_0x3f1fb7[_0xe5e9('0x16')];this['responsetime']=_0x3f1fb7[_0xe5e9('0x17')];this[_0xe5e9('0x18')]=_0x3f1fb7[_0xe5e9('0x17')];this[_0xe5e9('0x19')]=getSeconds(_0x3f1fb7[_0xe5e9('0x17')],_0x3f1fb7[_0xe5e9('0x16')]);this[_0xe5e9('0x1a')]=0x0;this[_0xe5e9('0x1b')]=0x0;this[_0xe5e9('0x1c')]=_0x3f1fb7[_0xe5e9('0x1c')];this['callbackuniqueid']=_0x3f1fb7[_0xe5e9('0x1d')];this[_0xe5e9('0x1e')]=_0x3f1fb7[_0xe5e9('0x1e')];this['recallme']=_0x3f1fb7[_0xe5e9('0x1f')];this[_0xe5e9('0x20')]=_0x3f1fb7[_0xe5e9('0x20')];this[_0xe5e9('0x21')]=_0x3f1fb7[_0xe5e9('0x21')];this[_0xe5e9('0x22')]=_0x3f1fb7[_0xe5e9('0x22')];this['VoiceQueueId']=_0x3f1fb7[_0xe5e9('0x23')];this[_0xe5e9('0x24')]=_0x3f1fb7[_0xe5e9('0x24')];this[_0xe5e9('0x25')]=_0x3f1fb7[_0xe5e9('0x25')]||'';this[_0xe5e9('0x26')]=_0x3f1fb7[_0xe5e9('0x26')]||'';}module[_0xe5e9('0x27')]=History; \ No newline at end of file +var _0xcb6f=['recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','lodash','milliseconds','seconds','uniqueid','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','calleridname','name','calleridnum','number','starttime','responsetime','endtime','ringtime','holdtime','talktime','callback','callbackuniqueid'];(function(_0x5d9a7f,_0x49293d){var _0x1f47c6=function(_0x426441){while(--_0x426441){_0x5d9a7f['push'](_0x5d9a7f['shift']());}};_0x1f47c6(++_0x49293d);}(_0xcb6f,0x168));var _0xfcb6=function(_0x27f867,_0x4ab12e){_0x27f867=_0x27f867-0x0;var _0x22fa6d=_0xcb6f[_0x27f867];return _0x22fa6d;};'use strict';var util=require('util');var _=require(_0xfcb6('0x0'));var moment=require('moment');function getSeconds(_0x17e85e,_0x2e57cd){var _0x2892d0=moment(_0x17e85e)[_0xfcb6('0x1')](0x0);var _0x33de51=moment(_0x2e57cd)[_0xfcb6('0x1')](0x0);return _0x2892d0['diff'](_0x33de51,_0xfcb6('0x2'));}function History(_0x23c2d4){this['uniqueid']=_0x23c2d4[_0xfcb6('0x3')];this[_0xfcb6('0x4')]=_0x23c2d4[_0xfcb6('0x4')]||undefined;this['type']=_0x23c2d4[_0xfcb6('0x5')];this[_0xfcb6('0x6')]=_0x23c2d4[_0xfcb6('0x5')]===_0xfcb6('0x7')?_0xfcb6('0x8'):_0x23c2d4[_0xfcb6('0x5')];this[_0xfcb6('0x9')]=_0x23c2d4['countbusyretry'];this[_0xfcb6('0xa')]=_0x23c2d4['countcongestionretry'];this[_0xfcb6('0xb')]=_0x23c2d4['countnoanswerretry'];this[_0xfcb6('0xc')]=_0x23c2d4[_0xfcb6('0x9')]+_0x23c2d4['countcongestionretry']+_0x23c2d4['countnoanswerretry']+_0x23c2d4[_0xfcb6('0xd')]+_0x23c2d4[_0xfcb6('0xe')]+_0x23c2d4[_0xfcb6('0xf')]+_0x23c2d4[_0xfcb6('0x10')]+_0x23c2d4['countagentrejectretry'];this[_0xfcb6('0xd')]=_0x23c2d4[_0xfcb6('0xd')];this[_0xfcb6('0xe')]=_0x23c2d4[_0xfcb6('0xe')];this[_0xfcb6('0xf')]=_0x23c2d4[_0xfcb6('0xf')];this['countmachineretry']=_0x23c2d4[_0xfcb6('0x10')];this['countagentrejectretry']=_0x23c2d4[_0xfcb6('0x11')];this[_0xfcb6('0x8')]=_0x23c2d4[_0xfcb6('0x8')];this[_0xfcb6('0x12')]=_0x23c2d4[_0xfcb6('0x13')];this[_0xfcb6('0x14')]=_0x23c2d4[_0xfcb6('0x15')];this[_0xfcb6('0x16')]=_0x23c2d4[_0xfcb6('0x16')];this[_0xfcb6('0x17')]=_0x23c2d4['responsetime'];this[_0xfcb6('0x18')]=_0x23c2d4[_0xfcb6('0x17')];this[_0xfcb6('0x19')]=getSeconds(_0x23c2d4[_0xfcb6('0x17')],_0x23c2d4[_0xfcb6('0x16')]);this[_0xfcb6('0x1a')]=0x0;this[_0xfcb6('0x1b')]=0x0;this['callback']=_0x23c2d4[_0xfcb6('0x1c')];this['callbackuniqueid']=_0x23c2d4[_0xfcb6('0x1d')];this['callbackat']=_0x23c2d4['callbackat'];this[_0xfcb6('0x1e')]=_0x23c2d4[_0xfcb6('0x1e')];this[_0xfcb6('0x1f')]=_0x23c2d4[_0xfcb6('0x1f')];this[_0xfcb6('0x20')]=_0x23c2d4[_0xfcb6('0x20')];this[_0xfcb6('0x21')]=_0x23c2d4['UserId'];this[_0xfcb6('0x22')]=_0x23c2d4[_0xfcb6('0x22')];this[_0xfcb6('0x23')]=_0x23c2d4[_0xfcb6('0x23')];this[_0xfcb6('0x24')]=_0x23c2d4[_0xfcb6('0x24')]||'';this['originatecalleridname']=_0x23c2d4[_0xfcb6('0x25')]||'';}module[_0xfcb6('0x26')]=History; \ No newline at end of file diff --git a/server/services/ami/dialer/index.js b/server/services/ami/dialer/index.js index 92965be..e9a291d 100644 --- a/server/services/ami/dialer/index.js +++ b/server/services/ami/dialer/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x97f5=['dialCongestionMaxRetry','dialCongestionRetryFrequency','[rescheduleContact]\x20[Congestion]','[rescheduleContact][NoSuchNumber]','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','[callProgressDetecting]','entity\x20is\x20undefine','NoSuchNumber','custom:agentnosuchnumber','nosuchnumber','dialNoSuchNumberMaxRetry','reason\x200\x20no\x20such\x20number....','outboundNoAnswerCallsDay','NoAnswer','custom:agentnoanswer','noanswer','[syncAgentComplete][createHistory][3]','checkRetriveMax','reason\x203\x20ringing\x20no\x20answer','Busy','busy','reason\x205\x20busy','Congestion','custom:agentcongestion','congestion','[syncAgentComplete][createHistory][8]','reason\x208\x20congestion','outboundAbandonedCallsDay','reason\x2011\x20abandoned','AgentReject','custom:agentreject','agentreject','[syncAgentComplete][createHistory][20]','reason\x2020\x20agentreject','[syncAgentComplete][createHistory][?]','Global','Success','[moveContactManagedDialer][0]','contact\x20not\x20moved','dialPredictiveOptimizationPercentage','predictiveIntervalAvailable','predictiveIntervalMaxThreshold','floor','[startMethodPredictive][StartProgressive]','check\x20handlePredictive\x20is\x20not\x20undefine','collection\x20data\x20in\x20progressive\x20at','dialPredictiveInterval','dialPredictiveOptimization','dropRate','[stopMethodPredictive][ReStartProgressive][ExceededDropDay]','Dropped\x20calls\x20day','Max\x20Drop\x20','started\x20in\x20predictive\x20at','getDataPredictive','startMethodPredictive','Predictive\x20after\x20first\x20interval','switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',')\x20are\x20less\x20than\x20threshold\x20(',')\x20are\x20more\x20than\x20threshold\x20(','agentBusyFactor','busyFactor','Unknown\x20Predictive','[getDataPredictive]','outboundQueuePauses','[CatchErlangB]','check\x20failure','erlangCallToSecond','one\x20call\x20every:','[handlePredictive]','fail\x20to\x20scheduled\x20calls','dialMethod','[booked][checkContactBlack]','Queue:\x20','queuestatus','[booked][checkContactBlack][else]','scheduledat','Agent','voicePause','dialRecallInQueue','RECALLINQUEUE','RecallInQueue','RecallFailedTimeout','Blacklist','inBlackList','limitCalls','[getContactCampaign2][Empty]','RUNNING','ivrTotalCallsDays','[actionOriginate]\x20','[getContactCampaign2]','dialLimitQueue','dialOrderByScheduledAt','Contact.phone','checkContactBlack','tryOriginatePredictive','[handlePredictive][limitChannel]','[actionOriginatePredictive]\x20','[getContactDialerPredictive]','--------\x20Drop\x20Rate\x20--------','Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Ts:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','P:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','m\x20=\x20','Ts\x20=\x20','[abandonmentRate]','p\x20=\x20','interval\x20=\x20','Amax\x20=\x20','----\x20Agent\x20Busy\x20Factor\x20----','M:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','[busyFactor]','Umin\x20=\x20','exports','util','lodash','bluebird','md5','ioredis','../preview/util/util','../../../config/environment/','../../../config/logger','dialer','booked','predictiveCalls','syncQueueSummary','../ami','redis','localhost','socket.io-emitter','../rpc/cmHopperHistory','../rpc/voiceQueueRt','./action','./history','./agentComplete','./queueCallerAbandon','./hangup','env','XCALLY_IP_AGI','127.0.0.1','rrmemory','roundrobin','prototype','enqueue','tail','finally','preview','trunks','maxNumberOriginate','channels','actions','contactsId','startPredictive','startProgressive','ivrOriginated','queueBooked','syncAgentConnect','syncQueueCallerAbandon','bind','originateresponse','syncAgentComplete','hangup','newexten','varset','syncVarSet','queuemember','syncQueueMember','loopClearZombieChannels','isUndefined','message','AGENTS_NOT_LOGGED','NOT_ACTIVE','name','Interval','INTERVAL_IS_NULL','\x20INTERVAL_IS_NULL','Intervals','[ifTime][Action]','Error','milliseconds','diff','emit','type','outbound','strategy','answered','available','sumDuration','sumHoldTime','talking','unmanaged','waiting','loggedInDb','dialActive','dialOriginateTimeout','dialPrefix','outboundAnswerAgiCallsDay','outboundAnswerCallsDay','outboundBlacklistCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundDropCallsDayACS','outboundDropCallsDayCallersExit','outboundDropCallsDayTimeout','outboundOriginateFailureCallsDay','outboundReCallsDay','outboundRejectCallsDay','outboundUnknownCallsDay','predictiveIntervalAnsweredCalls','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','predictiveIntervalDroppedCallsTimeout','predictiveIntervalErlangCalls','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalHitRate','predictiveIntervalMultiplicativeFactor','predictiveIntervalPauses','predictiveIntervalTotalCalls','originated','erlangCalls','erlangAbandonmentRate','Trunk','active','callerid','format','ivr','campaign:save','info','Answered\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Dropped\x20Timeout:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Dropped\x20Exit:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalDroppedCallsCallersExit','AVG\x20Talk\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Avg\x20Hold\x20Time\x20is\x20not\x20enough\x20for\x20predictive','History\x20information\x20are\x20empty','---------\x20ErlangB\x20---------','One\x20call\x20every:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Agent\x20Busy\x20Factor:\x20\x20\x20\x20\x20\x20\x20\x20\x20','---------------------------','merge','seconds','clearing\x20variable\x20start\x20predictive','handlePredictive','clearing\x20variable\x20handle\x20predictive','string','isEmpty','\x22%s\x22\x20<%s>','\x22\x22\x20<>','error','inspect','stack','length','[decremetOriginate]\x20object\x20originated\x20is\x20negative','[decremetOriginate]\x20is\x20null\x20or\x20undefined','contactsRescheduled','RESCHEDULED_CONTACTS','AVAILABLE_CONTACTS_FINISHED','[getContactDialer2][Empty]','pTalking','sendMessageOneNotActive','is\x20not\x20active','IS_DISACTIVED','is\x20disactive','[syncQueueSummary]\x20Campaign\x20Ivr:\x20','statedesc','endtime','starttime','uniqueId','[uniqueid]','clearZombieChannels','[actions]','undefined','isNil','Action','channel','voiceQueues','queue','updateOriginated','campaigns','[Dialer][checkChannel][ivr]','then','countReScheduled','catch','[countReScheduled]\x20','checkIsBlackList','[checkIsBlackList]\x20','checkIsBlackListIvr','resolve','[checkIsBlackListIvr]\x20','averageHandleTime','avgHandleTime','rescheduleContact','[rescheduleContact]\x20','unlockContact','[unlockContact]\x20','getContactDialer','temp','getContactDialerIvr','[getContactDialerIvr]\x20','getVoiceQueueRtPauses','[moveContactManagedDialer]\x20','createHistory','[createHistory]\x20','[updateOriginated]\x20object\x20originated\x20is\x20negative','[updateOriginated]\x20is\x20null\x20or\x20undefined','loggerHandler','emptyContact','pick','ListId','UserId','VoiceQueueId','[emptyContact][createHistory]','[emptyContact]','SIP/%s','status','reachable','unmonitored','uniqueid','variable','amdstatus','exten','xcally-motion-dialer','dialAMDActive','value','state','HangupInAMD','membername','AMD','custom:amd','buildObj','amd','saveInDb','[syncHangupInAMD][createHistory]','[syncHangupInAMD]','countmachineretry','countglobal','[syncAgentComplete][createHistory][0]','countbusyretry','countnoanswerretry','countnosuchnumberretry','countdropretry','countabandonedretry','stateGlobal','reason19\x20machine....','reason\x2019\x20machine....','dialMachineRetryFrequency','YYYY-MM-DD\x20HH:mm:ss','ContactId','[rescheduleContact][Machine]','[syncHangupInAMDIvr][createHistory]','[syncHangupInAMDIvr]','MACHINE','countcongestionretry','dialGlobalMaxRetry','dialMachineMaxRetry','createStateFinal','add','minutes','CampaignId','syncHangup','ivrAnswerCallsDay','[syncHangupIvr][createHistory]','moveContactManagedDialer','[syncHangupIvr]','dialQueueProject','AnswerAGI','AGI','Unknow','reason','agent','agiafterat','dialQueueProject2','dialAgiAfterHangupAgent','[syncAgentComplete][createHistory]','answertime','queueCallerAbandonCreateState','[syncQueueCallerAbandon]\x20[Drop]','droptime','responsetime','dialQueueTimeout','Drop','dropreason','dialDropMaxRetry','dialDropRetryFrequency','[rescheduleContact][Drop]','calleridname','calleridnum','[syncAgentComplete][createHistory][10]','Abandoned','CALLEREXIT','dialAbandonedMaxRetry','dialAbandonedRetryFrequency','[rescheduleContact][Abandoned]','[syncAgentComplete][createHistory][11]','syncNewExten','actionid','locked','agents','stateinterface','idHopper','paused','queueStatusComplete','[unlockQueueStatus][undefined]','[booked][unlockQueueStatus]','syncQueueStatusComplete','[unlock][syncQueueStatusComplete]','queueBookedRR','_rr','unlockRR','[booked][RR]','Agent:\x20','stringify','contactAgent-idHopper:\x20','run','[Catch][Preview][syncQueueStatusComplete]','[booked][RR][finaly]','[booked][unlock2]','[booked][unlock3]','[unlock3][syncQueueStatusComplete]','loopCampaigns','checkIsTrunkReachable','TRUNK_IS_NOT_REACHABLE','\x20trunk\x20is\x20not\x20reachable','checkIfTime','ifTime','Failure','INTERVAL_IS_EMPTY','\x20Intervals\x20is\x20empty\x20','timezones','\x20Timezone\x20unknow\x20','isArray','push','command','content','indexOf','iftime\x20%s,%s','true','all','some','GLOBAL_INTERVAL_IS_OVERTIME','INTERVAL_IS_OVERTIME','[ifTime][promiseAll]','Global:\x20','\x20Interval\x20is\x20overtime:\x20','Timezone:\x20','checkDialMethod','progressive','power','handlePower','predictive','method\x20not\x20recognized','handleIvr','loggedIn','dialGlobalInterval','dialTimezone','[syncQueueSummary]','syncCampaigns','checkIfTimeIntervals','\x5cw{0,','pow','replace','random','match','actionOriginate','object','originate','voiceQueue\x20is\x20undefine','Contact','phone','contact\x20is\x20undefine','getCaller','\x22agi://%s/square,%s\x22','NONE','XMD-AMDINITIALSILENCE','dialAMDInitialSilence','XMD-AMDGREETING','dialAMDGreeting','dialAMDAfterGreetingSilence','XMD-AMDTOTALANALYSISTIME','dialAMDTotalAnalysisTime','XMD-AMDBETWEENWORDSSILENCE','XMD-AMDMAXIMUMNUMBEROFWORDS','XMD-AMDSILENCETHRESHOLD','dialAMDSilenceThreshold','dialAMDMaximumWordLength','XMD-VOICEQUEUEID','XMD-CAMPAIGNID','tags','createdAt','updatedAt','%s%s','toUpper','dialOriginateCallerIdName','dialRandomLastDigitCallerIdNumber','dialOriginateCallerIdNumber','TrunkBackup','XMD-ORIGINATECALLERIDNAME','XMD-ORIGINATECALLERIDNUM','isTrunkReachable','SIP/%s/%s%s','trim','dialCutDigit','substring','from-sip','[originateError]:\x20%s','OriginateError','[originate][error]','originate\x20action\x20Error','syncOriginateResponse','getQueue','response','callProgressDetecting','[callProgressDetecting]\x20','countagentrejectretry','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','[rescheduleContact][NoAnswer]','dialBusyMaxRetry','dialBusyRetryFrequency'];(function(_0x1adf7d,_0x261994){var _0x578e7c=function(_0x5bf8f7){while(--_0x5bf8f7){_0x1adf7d['push'](_0x1adf7d['shift']());}};_0x578e7c(++_0x261994);}(_0x97f5,0x72));var _0x597f=function(_0x6ac220,_0xc34e02){_0x6ac220=_0x6ac220-0x0;var _0x3c278c=_0x97f5[_0x6ac220];return _0x3c278c;};'use strict';var util=require(_0x597f('0x0'));var _=require(_0x597f('0x1'));var BPromise=require(_0x597f('0x2'));var uuid=require('uuid');var moment=require('moment');var rr=require('rr');var md5=require(_0x597f('0x3'));var Redis=require(_0x597f('0x4'));var ut=require(_0x597f('0x5'));var config=require(_0x597f('0x6'));var logger=require(_0x597f('0x7'))(_0x597f('0x8'));var loggerBooked=require(_0x597f('0x7'))(_0x597f('0x9'));var loggerPredictive=require(_0x597f('0x7'))('predictive');var loggerPredictiveCalls=require(_0x597f('0x7'))(_0x597f('0xa'));var loggerSyncQueueSummary=require(_0x597f('0x7'))(_0x597f('0xb'));var ami=require(_0x597f('0xc'));config[_0x597f('0xd')]=_['defaults'](config[_0x597f('0xd')],{'host':_0x597f('0xe'),'port':0x18eb});var io=require(_0x597f('0xf'))(new Redis(config['redis']));var cmHopper=require('../rpc/cmHopper');var cmHopperHistory=require(_0x597f('0x10'));var cmHopperBlack=require('../rpc/cmHopperBlack');var voiceQueueRt=require(_0x597f('0x11'));var Action=require(_0x597f('0x12'));var History=require(_0x597f('0x13'));var Final=require('./final');var AgentComplete=require(_0x597f('0x14'));var QueueCallerAbandon=require(_0x597f('0x15'));var Hangup=require(_0x597f('0x16'));var ipAgi=process[_0x597f('0x17')][_0x597f('0x18')]||_0x597f('0x19');var strategy={'rrmemory':_0x597f('0x1a'),'roundrobin':_0x597f('0x1b')};var Sequence=function(){};Sequence[_0x597f('0x1c')][_0x597f('0x1d')]=function(_0x3bae9c){this[_0x597f('0x1e')]=this[_0x597f('0x1e')]?this['tail'][_0x597f('0x1f')](_0x3bae9c):_0x3bae9c();};function Dialer(_0x41b574,_0x257f1a){this['sequence']=new Sequence();this[_0x597f('0x20')]=_0x257f1a;this['voiceQueues']=_0x41b574['voiceQueues'];this['campaigns']=_0x41b574['campaigns'];this['agents']=_0x41b574['agents'];this[_0x597f('0x21')]=_0x41b574[_0x597f('0x21')];this['maxNumberOriginate']=config[_0x597f('0x22')]||0x2;this[_0x597f('0x23')]={};this[_0x597f('0x24')]={};this[_0x597f('0x25')]={};this['uniqueId']={};this['optionPredictive']={};this[_0x597f('0x26')]={};this[_0x597f('0x27')]={};this[_0x597f('0x28')]={};this[_0x597f('0x29')]={};this['queueBookedRR']={};ami['on']('agentconnect',this[_0x597f('0x2a')]['bind'](this));ami['on']('queuecallerabandon',this[_0x597f('0x2b')][_0x597f('0x2c')](this));ami['on'](_0x597f('0x2d'),this['syncOriginateResponse']['bind'](this));ami['on']('agentcomplete',this[_0x597f('0x2e')][_0x597f('0x2c')](this));ami['on']('custom:queuesummary',this[_0x597f('0xb')][_0x597f('0x2c')](this));ami['on'](_0x597f('0x2f'),this['syncHangup']['bind'](this));ami['on'](_0x597f('0x30'),this['syncNewExten'][_0x597f('0x2c')](this));ami['on'](_0x597f('0x31'),this[_0x597f('0x32')][_0x597f('0x2c')](this));ami['on'](_0x597f('0x33'),this[_0x597f('0x34')][_0x597f('0x2c')](this));ami['on']('queuestatuscomplete',this['syncQueueStatusComplete'][_0x597f('0x2c')](this));this['loopCampaigns']();this[_0x597f('0x35')]();}function isNotNull(_0x1fa04e){return _0x1fa04e!==null&&!_[_0x597f('0x36')](_0x1fa04e);}function checkIsLoggedIn(_0x2ae7fb,_0x32fa1a){return function(){if(_0x32fa1a<=0x0){_0x2ae7fb[_0x597f('0x37')]=_0x597f('0x38');throw _0x2ae7fb['name']+'\x20AGENTS\x20NOT\x20LOGGED';}};}function isActive(_0x35b33c){return _0x35b33c;}function checkIsActive(_0x504fcf,_0x22ae6b){return function(){if(!isActive(_0x22ae6b)){_0x504fcf[_0x597f('0x37')]=_0x597f('0x39');throw _0x504fcf[_0x597f('0x3a')]+'\x20NOT\x20Active';}};}function checkInterval(_0x179fee){return function(){if(!isNotNull(_0x179fee[_0x597f('0x3b')])){_0x179fee['message']=_0x597f('0x3c');throw _0x179fee[_0x597f('0x3a')]+_0x597f('0x3d');}if(!isNotNull(_0x179fee['Interval']['Intervals'])){_0x179fee[_0x597f('0x37')]=_0x597f('0x3c');throw _0x179fee[_0x597f('0x3a')]+'\x20INTERVAL_IS_NULL';}if(!isNotNull(_['isEmpty'](_0x179fee[_0x597f('0x3b')][_0x597f('0x3e')]))){_0x179fee[_0x597f('0x37')]=_0x597f('0x3c');throw _0x179fee[_0x597f('0x3a')]+'\x20INTERVAL_IS_NULL';}};}function msgResponse(_0x8335af,_0xd050c2,_0x19cc8f){return{'action':_0x8335af,'response':_0xd050c2,'message':_0x19cc8f,'stack':_0x19cc8f};}function myreject(_0x1b17fc){return function(_0x383ac6){return _0x1b17fc(msgResponse(_0x597f('0x3f'),_0x597f('0x40'),JSON['stringify'](_0x383ac6)));};}function getSeconds(_0x2f457d,_0x47cbe2){var _0x1b0c19=moment(_0x2f457d)[_0x597f('0x41')](0x0);var _0x3e3505=moment(_0x47cbe2)['milliseconds'](0x0);return _0x1b0c19[_0x597f('0x42')](_0x3e3505,'seconds');}function emit(_0x3261cd,_0x1e71de,_0x3acfe6){io['to'](_0x3261cd)[_0x597f('0x43')](_0x1e71de,_0x3acfe6);}function emitVoiceQueueSummary(_0x386f87){if(_0x386f87[_0x597f('0x44')]===_0x597f('0x45')){var _0x25f103={'id':_0x386f87['id'],'name':_0x386f87['name'],'strategy':_0x386f87[_0x597f('0x46')],'answered':_0x386f87[_0x597f('0x47')],'available':_0x386f87[_0x597f('0x48')],'loggedIn':_0x386f87['loggedIn'],'pTalking':_0x386f87['pTalking'],'sumBillable':_0x386f87['sumBillable'],'sumDuration':_0x386f87[_0x597f('0x49')],'sumHoldTime':_0x386f87[_0x597f('0x4a')]||0x0,'talking':_0x386f87[_0x597f('0x4b')],'total':_0x386f87['total'],'type':_0x386f87[_0x597f('0x44')],'unmanaged':_0x386f87[_0x597f('0x4c')],'abandoned':_0x386f87['abandoned'],'waiting':_0x386f87[_0x597f('0x4d')],'loggedInDb':_0x386f87[_0x597f('0x4e')],'dialActive':_0x386f87[_0x597f('0x4f')],'dialMethod':_0x386f87['dialMethod'],'dialOriginateCallerIdName':_0x386f87['dialOriginateCallerIdName'],'dialOriginateCallerIdNumber':_0x386f87['dialOriginateCallerIdNumber'],'dialOriginateTimeout':_0x386f87[_0x597f('0x50')],'dialPrefix':_0x386f87[_0x597f('0x51')],'outboundAnswerAgiCallsDay':_0x386f87[_0x597f('0x52')],'outboundAnswerCallsDay':_0x386f87[_0x597f('0x53')],'outboundBlacklistCallsDay':_0x386f87[_0x597f('0x54')],'outboundBusyCallsDay':_0x386f87[_0x597f('0x55')],'outboundCongestionCallsDay':_0x386f87[_0x597f('0x56')],'outboundDropCallsDayACS':_0x386f87[_0x597f('0x57')],'outboundDropCallsDayCallersExit':_0x386f87[_0x597f('0x58')],'outboundDropCallsDayTimeout':_0x386f87[_0x597f('0x59')],'outboundNoAnswerCallsDay':_0x386f87['outboundNoAnswerCallsDay'],'outboundNoSuchCallsDay':_0x386f87['outboundNoSuchCallsDay'],'outboundOriginateFailureCallsDay':_0x386f87[_0x597f('0x5a')],'outboundReCallsDay':_0x386f87[_0x597f('0x5b')],'outboundRejectCallsDay':_0x386f87[_0x597f('0x5c')],'outboundUnknownCallsDay':_0x386f87[_0x597f('0x5d')],'predictiveIntervalAnsweredCalls':_0x386f87[_0x597f('0x5e')],'predictiveIntervalAvgHoldtime':_0x386f87[_0x597f('0x5f')],'predictiveIntervalAvgTalktime':_0x386f87[_0x597f('0x60')],'predictiveIntervalDroppedCallsCallersExit':_0x386f87['predictiveIntervalDroppedCallsCallersExit'],'predictiveIntervalDroppedCallsTimeout':_0x386f87[_0x597f('0x61')],'predictiveIntervalErlangCalls':_0x386f87[_0x597f('0x62')],'predictiveIntervalErlangCallsDroppedCalls':_0x386f87[_0x597f('0x63')],'predictiveIntervalHitRate':_0x386f87[_0x597f('0x64')],'predictiveIntervalMultiplicativeFactor':_0x386f87[_0x597f('0x65')],'predictiveIntervalPauses':_0x386f87[_0x597f('0x66')],'predictiveIntervalAvailable':_0x386f87['predictiveIntervalAvailable'],'predictiveIntervalTotalCalls':_0x386f87[_0x597f('0x67')],'message':_0x386f87[_0x597f('0x37')],'originated':_0x386f87[_0x597f('0x68')],'erlangCalls':_0x386f87[_0x597f('0x69')],'erlangCallToSecond':_0x386f87['erlangCallToSecond'],'erlangAbandonmentRate':_0x386f87[_0x597f('0x6a')],'erlangBusyFactor':_0x386f87['erlangBusyFactor'],'startPredictive':_0x386f87['startPredictive'],'startProgressive':_0x386f87[_0x597f('0x27')]};if(_0x386f87[_0x597f('0x6b')]){_0x25f103[_0x597f('0x6b')]={'id':_0x386f87[_0x597f('0x6b')]['id'],'name':_0x386f87[_0x597f('0x6b')]['name'],'active':_0x386f87[_0x597f('0x6b')][_0x597f('0x6c')],'callerid':_0x386f87[_0x597f('0x6b')][_0x597f('0x6d')]};}if(_0x386f87[_0x597f('0x3b')]){_0x25f103[_0x597f('0x3b')]={'id':_0x386f87['Interval']['id'],'name':_0x386f87[_0x597f('0x3b')][_0x597f('0x3a')]};}var _0x237e09=md5(JSON['stringify'](_0x25f103));if(_0x386f87['md5']!==_0x237e09){_0x386f87[_0x597f('0x3')]=_0x237e09;emit(util[_0x597f('0x6e')]('voice:queue:%s',_0x25f103[_0x597f('0x3a')]),'voice_queue:save',_0x25f103);}}}function emitCampaignSummary(_0x1e82e9){if(_0x1e82e9[_0x597f('0x44')]===_0x597f('0x6f')){emit(util[_0x597f('0x6e')]('campaign:ivr:%s',_0x1e82e9[_0x597f('0x3a')]),_0x597f('0x70'),_0x1e82e9);}}function checkGetDataPredictive(_0x3bba59){if(isNotNull(_0x3bba59)&&!_['isEmpty'](_0x3bba59)){loggerPredictive[_0x597f('0x71')]('-----\x20Stats\x20Predictive\x20---');loggerPredictive[_0x597f('0x71')]('Total\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x3bba59[_0x597f('0x67')]);loggerPredictive['info'](_0x597f('0x72'),_0x3bba59[_0x597f('0x5e')]);loggerPredictive[_0x597f('0x71')](_0x597f('0x73'),_0x3bba59[_0x597f('0x61')]);loggerPredictive[_0x597f('0x71')](_0x597f('0x74'),_0x3bba59[_0x597f('0x75')]);loggerPredictive[_0x597f('0x71')]('AVG\x20Hold\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x3bba59[_0x597f('0x5f')]);loggerPredictive['info'](_0x597f('0x76'),_0x3bba59[_0x597f('0x60')]);loggerPredictive['info']('---------------------------');if(_0x3bba59['predictiveIntervalTotalCalls']>0x0){if(!_[_0x597f('0x36')](_0x3bba59[_0x597f('0x60')])&&_0x3bba59[_0x597f('0x60')]>0x0){return!![];}loggerPredictive[_0x597f('0x71')]('Avg\x20Talk\x20Time\x20is\x20not\x20enough\x20for\x20predictive');if(!_[_0x597f('0x36')](_0x3bba59[_0x597f('0x5f')])&&_0x3bba59[_0x597f('0x5f')]>0x0){return!![];}loggerPredictive[_0x597f('0x71')](_0x597f('0x77'));}else{loggerPredictive[_0x597f('0x71')]('Total\x20Calls\x20are\x20not\x20enough\x20for\x20predictive');}}else{loggerPredictive[_0x597f('0x71')](_0x597f('0x78'));}return![];}function mergeDataErlangB(_0x41fc3e){return function(_0x15a674){loggerPredictive[_0x597f('0x71')](_0x597f('0x79'));loggerPredictive[_0x597f('0x71')]('Scheduled\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x15a674[_0x597f('0x69')]);loggerPredictive['info'](_0x597f('0x7a'),_0x15a674['erlangCallToSecond']);loggerPredictive[_0x597f('0x71')](_0x597f('0x7b'),_0x15a674[_0x597f('0x6a')]);loggerPredictive[_0x597f('0x71')](_0x597f('0x7c'),_0x15a674['erlangBusyFactor']);loggerPredictive[_0x597f('0x71')](_0x597f('0x7b'),_0x15a674['erlangAbandonmentRate']);loggerPredictive[_0x597f('0x71')](_0x597f('0x7d'));_[_0x597f('0x7e')](_0x41fc3e,_0x15a674);};}function getDiff(_0x1cffcc){var _0x211112=moment()[_0x597f('0x41')](0x0);var _0x4535d1=moment(_0x1cffcc)[_0x597f('0x41')](0x0);return _0x211112['diff'](_0x4535d1,_0x597f('0x7f'));}function ifInterval(_0x5becef,_0x4ce67b){if(_[_0x597f('0x36')](_0x4ce67b)){return![];}return getDiff(_0x4ce67b)<_0x5becef*0x3c;}function freeVariablesPredictive(_0x5aafed){if(isNotNull(_0x5aafed)){if(!_['isUndefined'](_0x5aafed[_0x597f('0x27')])){_0x5aafed['startProgressive']=undefined;loggerPredictive[_0x597f('0x71')](_0x5aafed[_0x597f('0x3a')],'clearing\x20variable\x20start\x20progressive');}if(!_[_0x597f('0x36')](_0x5aafed[_0x597f('0x26')])){_0x5aafed[_0x597f('0x26')]=undefined;loggerPredictive[_0x597f('0x71')](_0x5aafed[_0x597f('0x3a')],_0x597f('0x80'));}if(!_[_0x597f('0x36')](_0x5aafed[_0x597f('0x81')])){clearInterval(_0x5aafed[_0x597f('0x81')]);_0x5aafed[_0x597f('0x81')]=undefined;loggerPredictive[_0x597f('0x71')](_0x5aafed[_0x597f('0x3a')],_0x597f('0x82'));}}}function erlangb(_0x486ac,_0x4c9be7){if(_0x4c9be7===0x0){return 0x0;}var _0x93b356=0x1;for(var _0x371227=0x1;_0x371227<=_0x4c9be7;_0x371227+=0x1){_0x93b356=0x1+_0x93b356*_0x371227/_0x486ac;}return 0x1/_0x93b356;}function isVoiceQueueOutbound(_0x47e771){return _0x47e771===_0x597f('0x45');}function isNotPreview(_0x54d412){return _0x54d412!==_0x597f('0x20');}function isCampaignIvr(_0x5aa71e){return _0x5aa71e===_0x597f('0x6f');}function getCallerId(_0x2a8d5d,_0x51742a,_0x468fd0){if(!_['isUndefined'](_0x468fd0)&&typeof _0x468fd0===_0x597f('0x83')&&!_[_0x597f('0x84')](_0x468fd0)){if(!_[_0x597f('0x36')](_0x51742a)&&typeof _0x51742a===_0x597f('0x83')&&!_[_0x597f('0x84')](_0x51742a)){return util[_0x597f('0x6e')](_0x597f('0x85'),_0x51742a,_0x468fd0);}return util['format'](_0x597f('0x85'),_0x468fd0,_0x468fd0);}if(!_['isUndefined'](_0x2a8d5d)&&typeof _0x2a8d5d==='string'&&!_[_0x597f('0x84')](_0x2a8d5d)){return _0x2a8d5d;}return _0x597f('0x86');}function loggerCatchQueueSummary(_0x5dbcb5,_0x59feff){return function(_0x344398){freeVariablesPredictive(_0x59feff);emitVoiceQueueSummary(_0x59feff);emitCampaignSummary(_0x59feff);loggerSyncQueueSummary[_0x597f('0x87')](_0x5dbcb5,util[_0x597f('0x88')](_0x344398,{'showHidden':![],'depth':null}));};}function loggerCatchPredictive(_0x393711,_0x4e2ea6){return function(_0x5a18bf){loggerPredictive[_0x597f('0x87')](_0x4e2ea6[_0x597f('0x3a')],_0x393711);loggerPredictive[_0x597f('0x87')](_0x5a18bf[_0x597f('0x89')]);freeVariablesPredictive(_0x4e2ea6);};}function loggerCatch(_0x2c5d62){return function(_0x2f7879){logger[_0x597f('0x87')](_0x2c5d62,util[_0x597f('0x88')](_0x2f7879,{'showHidden':![],'depth':null}));};}function checkContactEmpty(_0x8169f4){return _0x8169f4&&!_['isUndefined'](_0x8169f4)&&_0x8169f4[_0x597f('0x8a')]>0x0;}function decremetOriginate(_0x2e33ed){if(!_[_0x597f('0x36')](_0x2e33ed)&&_0x2e33ed!==null){if(typeof _0x2e33ed[_0x597f('0x68')]!=='undefined'){if(_0x2e33ed[_0x597f('0x68')]>0x0){_0x2e33ed[_0x597f('0x68')]-=0x1;}else{logger[_0x597f('0x87')](_0x597f('0x8b'));}}}else{logger[_0x597f('0x87')](_0x597f('0x8c'));}}function checkContactLowerLimitOriginate(_0x8ddf1,_0x469f0c,_0x55836c){if(_0x469f0c>_0x55836c){for(var _0x248812=0x0;_0x248812<_0x469f0c-_0x55836c;_0x248812+=0x1){decremetOriginate(_0x8ddf1);}}}function loggerGetContactDialer(_0x13dc6a,_0x4a843b,_0x48894f){return function(_0x5a053b){checkContactLowerLimitOriginate(_0x4a843b,_0x48894f,0x0);logger[_0x597f('0x87')](_0x13dc6a,util[_0x597f('0x88')](_0x5a053b,{'showHidden':![],'depth':null}));};}function sendMessageReschedule(_0x509807){return function(_0x2b5826){if(isNotNull(_0x2b5826)&&isNotNull(_0x2b5826[0x0])){if(_0x2b5826[0x0][_0x597f('0x8d')]>0x0){_0x509807[_0x597f('0x37')]=_0x597f('0x8e');logger['info']('[getContactDialer2][ReScheduled]'+_0x509807[_0x597f('0x3a')],_0x2b5826[0x0][_0x597f('0x8d')],'contacts');}else{_0x509807[_0x597f('0x37')]=_0x597f('0x8f');logger['info'](_0x597f('0x90')+_0x509807[_0x597f('0x3a')]);}}};}function notSendMessagesQueue(_0xa2a1e1){if(_0xa2a1e1['sendMessageOneNotActive']){freeVariablesPredictive(_0xa2a1e1);if(_0xa2a1e1[_0x597f('0x68')]===0x0&&_0xa2a1e1['talking']===0x0&&_0xa2a1e1[_0x597f('0x4d')]===0x0&&(_0xa2a1e1[_0x597f('0x91')]||0x0)===0x0){_0xa2a1e1[_0x597f('0x92')]=![];_0xa2a1e1['available']=0x0;_0xa2a1e1[_0x597f('0x37')]='NOT_ACTIVE';loggerSyncQueueSummary['error']('[syncQueueSummary]\x20Campaign\x20Queue:\x20',_0xa2a1e1['name'],_0x597f('0x93'));}else{_0xa2a1e1[_0x597f('0x37')]=_0x597f('0x94');loggerSyncQueueSummary[_0x597f('0x87')]('[syncQueueSummary]\x20Campaign\x20Queue:\x20',_0xa2a1e1['name'],_0x597f('0x95'));}emitVoiceQueueSummary(_0xa2a1e1);}}function notSendMessagesCampaign(_0x4d8af3){if(_0x4d8af3[_0x597f('0x92')]){if(_0x4d8af3[_0x597f('0x68')]===0x0){_0x4d8af3[_0x597f('0x92')]=![];_0x4d8af3['message']=_0x597f('0x39');loggerSyncQueueSummary[_0x597f('0x87')]('[syncQueueSummary]\x20Campaign\x20Ivr:\x20',_0x4d8af3['name'],'is\x20not\x20active');}else{_0x4d8af3[_0x597f('0x37')]=_0x597f('0x94');loggerSyncQueueSummary[_0x597f('0x87')](_0x597f('0x96'),_0x4d8af3[_0x597f('0x3a')],_0x597f('0x95'));}emitCampaignSummary(_0x4d8af3);}}function createObjHistory(_0x1cba8a,_0x376574,_0x365a6b,_0x1a6af6,_0x3ae4cf){_0x1cba8a[_0x597f('0x37')]=_0x365a6b;var _0x41ec20=new Action(_0x1cba8a,_0x376574);var _0x211b52=new History(_0x41ec20);_0x211b52['state']=_0x1a6af6;_0x211b52[_0x597f('0x97')]=_0x3ae4cf;_0x211b52[_0x597f('0x98')]=_0x41ec20[_0x597f('0x99')];return _0x211b52;}Dialer[_0x597f('0x1c')][_0x597f('0x35')]=function(){var _0x3ca1a7=this;setInterval(function(){_0x3ca1a7['clearZombieChannels'](_0x3ca1a7[_0x597f('0x9a')],_0x597f('0x9b'));_0x3ca1a7[_0x597f('0x9c')](_0x3ca1a7[_0x597f('0x24')],_0x597f('0x9d'));},0x32c8);};Dialer[_0x597f('0x1c')][_0x597f('0x9c')]=function(_0x1d49f4,_0x324e7b){var _0x2ba81c=this;for(var _0x23b73d in _0x1d49f4){if(typeof _0x1d49f4[_0x23b73d]!==_0x597f('0x9e')){this['sequence'][_0x597f('0x1d')](function(){if(!_[_0x597f('0x9f')](_0x1d49f4[_0x23b73d])){return ami[_0x597f('0xa0')]({'action':'status','channel':_0x1d49f4[_0x23b73d][_0x597f('0xa1')]})['catch'](function(_0x593a2d){if(_0x593a2d['message']==='No\x20such\x20channel'){setTimeout(function(){if(_0x1d49f4[_0x23b73d]&&_0x1d49f4[_0x23b73d][_0x597f('0x44')]!=='ivr'){_0x2ba81c['updateOriginated'](_0x2ba81c[_0x597f('0xa2')][_0x1d49f4[_0x23b73d][_0x597f('0xa3')]]);logger[_0x597f('0x87')]('[Dialer][checkChannel]',_0x324e7b,_0x23b73d,_0x1d49f4[_0x23b73d]['queue']);delete _0x1d49f4[_0x23b73d];}if(_0x1d49f4[_0x23b73d]&&_0x1d49f4[_0x23b73d]['type']===_0x597f('0x6f')){_0x2ba81c[_0x597f('0xa4')](_0x2ba81c[_0x597f('0xa5')][_0x1d49f4[_0x23b73d][_0x597f('0xa3')]]);logger[_0x597f('0x87')](_0x597f('0xa6'),_0x324e7b,_0x23b73d,_0x1d49f4[_0x23b73d]['queue']);delete _0x1d49f4[_0x23b73d];}},0x2328);}});}});}}};Dialer[_0x597f('0x1c')]['countReScheduled']=function(_0x43c9d7){return BPromise['resolve']()[_0x597f('0xa7')](cmHopper[_0x597f('0xa8')](_0x43c9d7))[_0x597f('0xa9')](loggerCatch(_0x597f('0xaa')));};Dialer[_0x597f('0x1c')][_0x597f('0xab')]=function(_0x258b6f){return BPromise['resolve']()[_0x597f('0xa7')](cmHopperBlack[_0x597f('0xab')](_0x258b6f))[_0x597f('0xa9')](loggerCatch(_0x597f('0xac')));};Dialer[_0x597f('0x1c')][_0x597f('0xad')]=function(_0x48d5f2){return BPromise[_0x597f('0xae')]()['then'](cmHopperBlack[_0x597f('0xad')](_0x48d5f2))[_0x597f('0xa9')](loggerCatch(_0x597f('0xaf')));};Dialer[_0x597f('0x1c')][_0x597f('0xb0')]=function(_0x3f1025){return BPromise[_0x597f('0xae')]()['then'](cmHopperHistory[_0x597f('0xb1')](_0x3f1025))[_0x597f('0xa9')](loggerCatch('[averageHandleTime]\x20'));};Dialer[_0x597f('0x1c')][_0x597f('0xb2')]=function(_0x3bd46f){return BPromise['resolve']()[_0x597f('0xa7')](cmHopper[_0x597f('0xb2')](_0x3bd46f))[_0x597f('0xa9')](loggerCatch(_0x597f('0xb3')));};Dialer[_0x597f('0x1c')]['unlockContact']=function(_0x31fed7,_0x12a6d1,_0x3e9aee){return BPromise[_0x597f('0xae')]()[_0x597f('0xa7')](cmHopper[_0x597f('0xb4')](_0x31fed7,_0x12a6d1,_0x3e9aee))[_0x597f('0xa9')](loggerCatch(_0x597f('0xb5')));};Dialer[_0x597f('0x1c')][_0x597f('0xb6')]=function(_0x3aef43,_0x1d3be3,_0x508988,_0x5da914,_0x1b4e33){return BPromise[_0x597f('0xae')]()[_0x597f('0xa7')](cmHopper[_0x597f('0xb6')](_0x3aef43,_0x1d3be3,_0x508988,_0x5da914))[_0x597f('0xa9')](function(_0x5d1ce0){_0x1b4e33[_0x597f('0xb7')]-=_0x508988;_0x1b4e33['temp']=_0x1b4e33['temp']>0x0?_0x1b4e33[_0x597f('0xb7')]:0x0;loggerCatch('[getContactDialer]\x20')(_0x5d1ce0);});};Dialer[_0x597f('0x1c')][_0x597f('0xb8')]=function(_0x29f6cc,_0x89261c,_0x14469c,_0x5f4269){return BPromise['resolve']()['then'](cmHopper[_0x597f('0xb8')](_0x29f6cc,_0x89261c,_0x14469c))[_0x597f('0xa9')](function(_0x4c36ed){_0x5f4269[_0x597f('0xb7')]-=_0x89261c;_0x5f4269[_0x597f('0xb7')]=_0x5f4269['temp']>0x0?_0x5f4269[_0x597f('0xb7')]:0x0;loggerCatch(_0x597f('0xb9'))(_0x4c36ed);});};Dialer['prototype'][_0x597f('0xba')]=function(_0x421d73){return BPromise['resolve']()['then'](voiceQueueRt[_0x597f('0xba')](_0x421d73))[_0x597f('0xa9')](loggerCatch('[getVoiceQueueRtPauses]\x20'));};Dialer[_0x597f('0x1c')]['moveContactManagedDialer']=function(_0x3f4213){return BPromise[_0x597f('0xae')]()[_0x597f('0xa7')](cmHopper['moveContactManagedDialer'](_0x3f4213))[_0x597f('0xa9')](loggerCatch(_0x597f('0xbb')));};Dialer[_0x597f('0x1c')]['createHistory']=function(_0x5b6855){return BPromise[_0x597f('0xae')]()[_0x597f('0xa7')](cmHopperHistory[_0x597f('0xbc')](_0x5b6855))[_0x597f('0xa9')](loggerCatch(_0x597f('0xbd')));};Dialer[_0x597f('0x1c')][_0x597f('0xa4')]=function(_0x4de9e0){if(!_['isUndefined'](_0x4de9e0)&&_0x4de9e0!==null){if(typeof _0x4de9e0[_0x597f('0x68')]!==_0x597f('0x9e')){if(_0x4de9e0[_0x597f('0x68')]>0x0){_0x4de9e0[_0x597f('0x68')]-=0x1;}else{logger[_0x597f('0x87')](_0x597f('0xbe'));}}}else{logger['error'](_0x597f('0xbf'));}};Dialer[_0x597f('0x1c')][_0x597f('0xc0')]=function(_0x2bde39,_0x1a48d1){var _0x484144=this;return function(_0x1ed6f3){_0x484144[_0x597f('0xa4')](_0x1a48d1);logger[_0x597f('0x87')](_0x2bde39,util[_0x597f('0x88')](_0x1ed6f3,{'showHidden':![],'depth':null}));};};Dialer['prototype'][_0x597f('0xc1')]=function(_0x3e5f8a,_0x4086bd,_0x4ac4d4){var _0x43076e={'state':0x19,'statedesc':'notFound'};this[_0x597f('0xa4')](_0x4086bd);this['saveInDb'](_[_0x597f('0x7e')](_0x43076e,_[_0x597f('0xc2')](_0x4ac4d4,['ContactId',_0x597f('0xc3'),_0x597f('0xc4'),_0x597f('0xc5'),'CampaignId'])),_0x597f('0xc6'),_0x597f('0xc7'));logger[_0x597f('0x87')](_0x3e5f8a);};Dialer[_0x597f('0x1c')]['isSuccess']=function(_0x22ca62){return _0x22ca62==='Success';};Dialer[_0x597f('0x1c')]['isTrunkReachable']=function(_0x233d08){return!_[_0x597f('0x36')](_0x233d08)&&_0x233d08&&!_['isUndefined'](_0x233d08[_0x597f('0x3a')])&&!_[_0x597f('0x36')](_0x233d08['active'])&&_0x233d08[_0x597f('0x6c')]&&(this[_0x597f('0x21')][util[_0x597f('0x6e')](_0x597f('0xc8'),_0x233d08[_0x597f('0x3a')])][_0x597f('0xc9')]===_0x597f('0xca')||this[_0x597f('0x21')][util[_0x597f('0x6e')](_0x597f('0xc8'),_0x233d08[_0x597f('0x3a')])][_0x597f('0xc9')]===_0x597f('0xcb'));};Dialer['prototype']['saveInDb']=function(_0x58850f,_0x3c8603,_0x56334d){this[_0x597f('0xbc')](_0x58850f)[_0x597f('0xa9')](loggerCatch(_0x3c8603));this['moveContactManagedDialer'](_0x58850f)[_0x597f('0xa9')](loggerCatch(_0x56334d));};Dialer[_0x597f('0x1c')][_0x597f('0x32')]=function(_0x3b5425){var _0x2c60dd=this['uniqueId'][_0x3b5425[_0x597f('0xcc')]];var _0x30b015;if(!_[_0x597f('0x9f')](_0x3b5425)&&!_[_0x597f('0x9f')](_0x3b5425[_0x597f('0xcd')])&&!_[_0x597f('0x9f')](_0x3b5425[_0x597f('0xcd')][_0x597f('0xce')])&&_0x3b5425[_0x597f('0xcf')]===_0x597f('0xd0')&&_0x2c60dd){if(_0x2c60dd[_0x597f('0x44')]!=='ivr'&&this[_0x597f('0xa2')][_0x2c60dd[_0x597f('0xa3')]][_0x597f('0xd1')]&&_0x3b5425[_0x597f('0xd2')]==='HANGUP'){delete this['uniqueId'][_0x3b5425[_0x597f('0xcc')]];this[_0x597f('0xa4')](this['voiceQueues'][_0x2c60dd['queue']]);this[_0x597f('0xa2')][_0x2c60dd[_0x597f('0xa3')]][_0x597f('0x53')]+=0x1;this[_0x597f('0xa2')][_0x2c60dd[_0x597f('0xa3')]][_0x597f('0x52')]+=0x1;_0x30b015=new Hangup(_0x2c60dd,_0x3b5425);_0x30b015[_0x597f('0xd3')]=0x12;_0x30b015[_0x597f('0x97')]=_0x597f('0xd4');_0x30b015[_0x597f('0xd5')]=_0x597f('0xd6');ami['emit'](_0x597f('0xd7'),ut[_0x597f('0xd8')](_0x30b015,_0x597f('0xd9')));this[_0x597f('0xda')](_0x30b015,_0x597f('0xdb'),_0x597f('0xdc'));}if(_0x2c60dd[_0x597f('0x44')]!==_0x597f('0x6f')&&this[_0x597f('0xa2')][_0x2c60dd[_0x597f('0xa3')]][_0x597f('0xd1')]&&_0x3b5425['value']==='MACHINE'){var _0x266f2a=this;return new BPromise(function(_0x3cc98e,_0x56f74d){delete _0x266f2a['uniqueId'][_0x3b5425[_0x597f('0xcc')]];_0x266f2a[_0x597f('0xa4')](_0x266f2a[_0x597f('0xa2')][_0x2c60dd[_0x597f('0xa3')]]);_0x266f2a[_0x597f('0xa2')][_0x2c60dd[_0x597f('0xa3')]]['outboundAnswerCallsDay']+=0x1;_0x266f2a[_0x597f('0xa2')][_0x2c60dd[_0x597f('0xa3')]][_0x597f('0x52')]+=0x1;var _0x5469c9=_0x266f2a[_0x597f('0xa2')][_0x2c60dd[_0x597f('0xa3')]];var _0x1c81e5=new Hangup(_0x2c60dd,_0x3b5425);_0x1c81e5['state']=0x13;_0x1c81e5['statedesc']='Machine';_0x1c81e5[_0x597f('0xd5')]=_0x597f('0xd6');_0x1c81e5[_0x597f('0xdd')]+=0x1;_0x1c81e5[_0x597f('0xde')]+=0x1;_0x1c81e5['amd']=!![];ami[_0x597f('0x43')](_0x597f('0xd7'),ut[_0x597f('0xd8')](_0x1c81e5,_0x597f('0xd9')));_0x266f2a['createHistory'](_0x1c81e5)[_0x597f('0xa9')](loggerCatch(_0x597f('0xdf')));if(_0x1c81e5[_0x597f('0xe0')]+_0x1c81e5['countcongestionretry']+_0x1c81e5[_0x597f('0xe1')]+_0x1c81e5[_0x597f('0xe2')]+_0x1c81e5[_0x597f('0xe3')]+_0x1c81e5[_0x597f('0xe4')]+_0x1c81e5['countmachineretry']+_0x1c81e5['countagentrejectretry']>=_0x5469c9['dialGlobalMaxRetry']){_0x266f2a[_0x597f('0xe5')](_0x1c81e5,_0x3cc98e,_0x56f74d,_0x597f('0xe6'));}else{if(_0x1c81e5[_0x597f('0xdd')]>=_0x5469c9['dialMachineMaxRetry']){_0x266f2a['createStateFinal'](_0x1c81e5,_0x3cc98e,_0x56f74d,_0x597f('0xe7'));}else{_0x266f2a[_0x597f('0xb2')]({'active':![],'countmachineretry':_0x1c81e5[_0x597f('0xdd')],'scheduledat':moment()['add'](_0x5469c9[_0x597f('0xe8')],'minutes')[_0x597f('0x6e')](_0x597f('0xe9')),'ContactId':_0x1c81e5[_0x597f('0xea')],'ListId':_0x1c81e5['ListId'],'VoiceQueueId':_0x1c81e5[_0x597f('0xc5')]||undefined,'CampaignId':_0x1c81e5['CampaignId']||undefined})['catch'](loggerCatch(_0x597f('0xeb')));_0x3cc98e({'reschedule':0x1});}}});}if(_0x2c60dd['type']==='ivr'&&this[_0x597f('0xa5')][_0x2c60dd[_0x597f('0xa3')]][_0x597f('0xd1')]&&_0x3b5425[_0x597f('0xd2')]==='HANGUP'){delete this[_0x597f('0x9a')][_0x3b5425[_0x597f('0xcc')]];this[_0x597f('0xa4')](this[_0x597f('0xa5')][_0x2c60dd['queue']]);_0x30b015=new Hangup(_0x2c60dd,_0x3b5425);_0x30b015[_0x597f('0xd3')]=0x12;_0x30b015['statedesc']=_0x597f('0xd4');_0x30b015[_0x597f('0xd5')]=_0x597f('0xd6');ami[_0x597f('0x43')](_0x597f('0xd7'),ut[_0x597f('0xd8')](_0x30b015,_0x597f('0xd9')));this[_0x597f('0xda')](_0x30b015,_0x597f('0xec'),_0x597f('0xed'));}if(_0x2c60dd['type']===_0x597f('0x6f')&&this[_0x597f('0xa5')][_0x2c60dd['queue']][_0x597f('0xd1')]&&_0x3b5425[_0x597f('0xd2')]===_0x597f('0xee')){var _0x266f2a=this;return new BPromise(function(_0x12c447,_0x13aede){delete _0x266f2a[_0x597f('0x9a')][_0x3b5425[_0x597f('0xcc')]];_0x266f2a[_0x597f('0xa4')](_0x266f2a[_0x597f('0xa5')][_0x2c60dd[_0x597f('0xa3')]]);_0x266f2a[_0x597f('0xa5')][_0x2c60dd[_0x597f('0xa3')]]['outboundAnswerCallsDay']+=0x1;_0x266f2a[_0x597f('0xa5')][_0x2c60dd[_0x597f('0xa3')]]['outboundAnswerAgiCallsDay']+=0x1;var _0x35a5ae=_0x266f2a[_0x597f('0xa5')][_0x2c60dd[_0x597f('0xa3')]];var _0x5d2433=new Hangup(_0x2c60dd,_0x3b5425);_0x5d2433[_0x597f('0xd3')]=0x13;_0x5d2433[_0x597f('0x97')]='Machine';_0x5d2433[_0x597f('0xd5')]=_0x597f('0xd6');_0x5d2433[_0x597f('0xdd')]+=0x1;_0x5d2433[_0x597f('0xde')]+=0x1;_0x5d2433['amd']=!![];ami['emit'](_0x597f('0xd7'),ut[_0x597f('0xd8')](_0x5d2433,_0x597f('0xd9')));_0x266f2a[_0x597f('0xbc')](_0x5d2433)[_0x597f('0xa9')](loggerCatch('[syncAgentComplete][createHistory][0]'));if(_0x5d2433[_0x597f('0xe0')]+_0x5d2433[_0x597f('0xef')]+_0x5d2433[_0x597f('0xe1')]+_0x5d2433['countnosuchnumberretry']+_0x5d2433[_0x597f('0xe3')]+_0x5d2433[_0x597f('0xe4')]+_0x5d2433['countmachineretry']+_0x5d2433['countagentrejectretry']>=_0x35a5ae[_0x597f('0xf0')]){_0x266f2a[_0x597f('0xe5')](_0x5d2433,_0x12c447,_0x13aede,'reason19\x20machine....');}else{if(_0x5d2433['countmachineretry']>=_0x35a5ae[_0x597f('0xf1')]){_0x266f2a[_0x597f('0xf2')](_0x5d2433,_0x12c447,_0x13aede,_0x597f('0xe7'));}else{_0x266f2a[_0x597f('0xb2')]({'active':![],'countmachineretry':_0x5d2433[_0x597f('0xdd')],'scheduledat':moment()[_0x597f('0xf3')](_0x35a5ae[_0x597f('0xe8')],_0x597f('0xf4'))[_0x597f('0x6e')](_0x597f('0xe9')),'ContactId':_0x5d2433[_0x597f('0xea')],'ListId':_0x5d2433[_0x597f('0xc3')],'VoiceQueueId':_0x5d2433[_0x597f('0xc5')]||undefined,'CampaignId':_0x5d2433[_0x597f('0xf5')]||undefined})[_0x597f('0xa9')](loggerCatch(_0x597f('0xeb')));_0x12c447({'reschedule':0x1});}}});}}};Dialer[_0x597f('0x1c')][_0x597f('0xf6')]=function(_0x44c000){var _0x5cc390=this[_0x597f('0x9a')][_0x44c000[_0x597f('0xcc')]];var _0x2951f9=this;var _0x37bd0a;if(_0x5cc390&&_0x5cc390[_0x597f('0x44')]==='ivr'){delete this[_0x597f('0x9a')][_0x44c000[_0x597f('0xcc')]];this[_0x597f('0xa4')](this[_0x597f('0xa5')][_0x5cc390[_0x597f('0xa3')]]);this['campaigns'][_0x5cc390[_0x597f('0xa3')]][_0x597f('0xf7')]+=0x1;_0x37bd0a=new Hangup(_0x5cc390,_0x44c000);this[_0x597f('0xbc')](_0x37bd0a)[_0x597f('0xa9')](loggerCatch(_0x597f('0xf8')));this[_0x597f('0xf9')](_0x37bd0a)[_0x597f('0xa9')](loggerCatch(_0x597f('0xfa')));}if(_0x5cc390&&_0x5cc390[_0x597f('0x44')]!==_0x597f('0x6f')&&isNotNull(this[_0x597f('0xa2')][_0x5cc390[_0x597f('0xa3')]][_0x597f('0xfb')])){delete this['uniqueId'][_0x44c000['uniqueid']];this[_0x597f('0xa4')](this['voiceQueues'][_0x5cc390[_0x597f('0xa3')]]);this[_0x597f('0xa2')][_0x5cc390[_0x597f('0xa3')]]['outboundAnswerCallsDay']+=0x1;this[_0x597f('0xa2')][_0x5cc390[_0x597f('0xa3')]]['outboundAnswerAgiCallsDay']+=0x1;_0x37bd0a=new Hangup(_0x5cc390,_0x44c000);_0x37bd0a[_0x597f('0xd3')]=0x10;_0x37bd0a[_0x597f('0x97')]=_0x597f('0xfc');_0x37bd0a[_0x597f('0xd5')]=_0x597f('0xfd');this['createHistory'](_0x37bd0a)[_0x597f('0xa9')](loggerCatch(_0x597f('0xf8')));this[_0x597f('0xf9')](_0x37bd0a)[_0x597f('0xa9')](loggerCatch('[syncHangupIvr]'));}if(_0x5cc390&&_0x5cc390['type']!==_0x597f('0x6f')&&!isNotNull(this[_0x597f('0xa2')][_0x5cc390[_0x597f('0xa3')]][_0x597f('0xfb')])){delete this[_0x597f('0x9a')][_0x44c000[_0x597f('0xcc')]];this[_0x597f('0xa4')](this[_0x597f('0xa2')][_0x5cc390[_0x597f('0xa3')]]);this[_0x597f('0xa2')][_0x5cc390[_0x597f('0xa3')]]['outboundUnknownCallsDay']+=0x1;_0x37bd0a=new Hangup(_0x5cc390,_0x44c000);_0x37bd0a[_0x597f('0xd3')]=0xc;_0x37bd0a[_0x597f('0x97')]=_0x44c000['cause-txt'];_0x37bd0a[_0x597f('0xd5')]=_0x597f('0xfe');this[_0x597f('0xbc')](_0x37bd0a)['catch'](loggerCatch(_0x597f('0xf8')));this[_0x597f('0xf9')](_0x37bd0a)[_0x597f('0xa9')](loggerCatch(_0x597f('0xfa')));}};Dialer[_0x597f('0x1c')][_0x597f('0x2e')]=function(_0x3e817e){var _0x155035=this[_0x597f('0x9a')][_0x3e817e[_0x597f('0xcc')]];var _0x5c3ecc=this;if(this[_0x597f('0xa2')][_0x3e817e[_0x597f('0xa3')]]){if(_0x155035&&_0x155035[_0x597f('0x44')]!==_0x597f('0x6f')){delete this[_0x597f('0x9a')][_0x3e817e[_0x597f('0xcc')]];this[_0x597f('0xa2')][_0x3e817e[_0x597f('0xa3')]][_0x597f('0x53')]+=0x1;var _0x1f9ee1=new AgentComplete(_0x155035,_0x3e817e);if(_0x3e817e[_0x597f('0xff')]===_0x597f('0x100')){_0x1f9ee1[_0x597f('0x101')]=this['voiceQueues'][_0x3e817e[_0x597f('0xa3')]][_0x597f('0x102')]&&this['voiceQueues'][_0x3e817e[_0x597f('0xa3')]][_0x597f('0x103')]?moment()['format'](_0x597f('0xe9')):undefined;}this[_0x597f('0xbc')](_0x1f9ee1)[_0x597f('0xa9')](loggerCatch(_0x597f('0x104')));this[_0x597f('0xf9')](_0x1f9ee1)[_0x597f('0xa9')](loggerCatch('[syncAgentComplete]'));}}};Dialer['prototype']['syncAgentConnect']=function(_0x5a0448){if(this[_0x597f('0xa2')][_0x5a0448[_0x597f('0xa3')]]){if(this[_0x597f('0x9a')][_0x5a0448[_0x597f('0xcc')]]&&this[_0x597f('0x9a')][_0x5a0448[_0x597f('0xcc')]][_0x597f('0x44')]!==_0x597f('0x6f')){this[_0x597f('0xa4')](this[_0x597f('0xa2')][_0x5a0448['queue']]);this[_0x597f('0x9a')][_0x5a0448['uniqueid']][_0x597f('0x105')]=moment()[_0x597f('0x6e')](_0x597f('0xe9'));}}};Dialer['prototype'][_0x597f('0x106')]=function(_0x43d581){this[_0x597f('0xbc')](_0x43d581)[_0x597f('0xa9')](loggerCatch(_0x597f('0x104')));this[_0x597f('0xf9')](_0x43d581)[_0x597f('0xa9')](loggerCatch(_0x597f('0x107')));};Dialer[_0x597f('0x1c')][_0x597f('0x2b')]=function(_0x43ff37){var _0x8ef06c=this[_0x597f('0x9a')][_0x43ff37['uniqueid']];var _0x23dd2e=this;if(this['voiceQueues'][_0x43ff37[_0x597f('0xa3')]]){if(_0x8ef06c&&_0x8ef06c[_0x597f('0x44')]!=='ivr'){delete this['uniqueId'][_0x43ff37[_0x597f('0xcc')]];this[_0x597f('0xa4')](this[_0x597f('0xa2')][_0x43ff37['queue']]);_0x8ef06c['droptime']=moment()['format'](_0x597f('0xe9'));var _0x116c37=new QueueCallerAbandon(_0x8ef06c,_0x43ff37);if(getSeconds(_0x8ef06c[_0x597f('0x108')],_0x8ef06c[_0x597f('0x109')])>=_0x8ef06c[_0x597f('0x10a')]){this['voiceQueues'][_0x43ff37[_0x597f('0xa3')]][_0x597f('0x61')]+=0x1;this[_0x597f('0xa2')][_0x43ff37['queue']][_0x597f('0x59')]+=0x1;this[_0x597f('0xa2')][_0x43ff37['queue']]['predictiveIntervalErlangCallsDroppedCalls']+=0x1;_0x116c37[_0x597f('0xd3')]=0xa;_0x116c37[_0x597f('0x97')]=_0x597f('0x10b');_0x116c37[_0x597f('0x10c')]='TIMEOUT';_0x116c37['agiafterat']=this['voiceQueues'][_0x43ff37[_0x597f('0xa3')]][_0x597f('0x102')]?moment()[_0x597f('0x6e')](_0x597f('0xe9')):undefined;_0x116c37[_0x597f('0xe3')]+=0x1;_0x116c37[_0x597f('0xde')]+=0x1;if(_0x116c37[_0x597f('0xe3')]>=this['voiceQueues'][_0x43ff37[_0x597f('0xa3')]][_0x597f('0x10d')]){this['queueCallerAbandonCreateState'](_0x116c37);}else{this[_0x597f('0xb2')]({'active':![],'countdropretry':_0x116c37[_0x597f('0xe3')],'scheduledat':moment()[_0x597f('0xf3')](this[_0x597f('0xa2')][_0x43ff37['queue']][_0x597f('0x10e')],'minutes')[_0x597f('0x6e')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x8ef06c[_0x597f('0xea')],'ListId':_0x8ef06c['ListId'],'VoiceQueueId':_0x8ef06c[_0x597f('0xc5')]||undefined,'CampaignId':_0x8ef06c['CampaignId']||undefined})[_0x597f('0xa9')](loggerCatch(_0x597f('0x10f')));var _0x38d856=new History(_0x116c37);_0x38d856['state']=0xa;_0x38d856[_0x597f('0x97')]='Drop';_0x38d856['starttime']=moment()[_0x597f('0x6e')](_0x597f('0xe9'));_0x38d856[_0x597f('0x98')]=_0x38d856[_0x597f('0x99')];_0x38d856[_0x597f('0x110')]=_0x116c37[_0x597f('0x110')];_0x38d856[_0x597f('0x111')]=_0x116c37[_0x597f('0x111')];this[_0x597f('0xbc')](_0x38d856)[_0x597f('0xa9')](loggerCatch(_0x597f('0x112')));}}else{this[_0x597f('0xa2')][_0x43ff37['queue']]['predictiveIntervalDroppedCallsCallersExit']+=0x1;this[_0x597f('0xa2')][_0x43ff37[_0x597f('0xa3')]][_0x597f('0x58')]+=0x1;_0x116c37['state']=0xb;_0x116c37[_0x597f('0x97')]=_0x597f('0x113');_0x116c37['dropreason']=_0x597f('0x114');_0x116c37['countabandonedretry']+=0x1;_0x116c37[_0x597f('0xde')]+=0x1;if(_0x116c37[_0x597f('0xe4')]>=this['voiceQueues'][_0x43ff37[_0x597f('0xa3')]][_0x597f('0x115')]){this['queueCallerAbandonCreateState'](_0x116c37);}else{this[_0x597f('0xb2')]({'active':![],'countabandonedretry':_0x116c37['countabandonedretry'],'scheduledat':moment()[_0x597f('0xf3')](this['voiceQueues'][_0x43ff37[_0x597f('0xa3')]][_0x597f('0x116')],_0x597f('0xf4'))[_0x597f('0x6e')](_0x597f('0xe9')),'ContactId':_0x8ef06c[_0x597f('0xea')],'ListId':_0x8ef06c[_0x597f('0xc3')],'VoiceQueueId':_0x8ef06c[_0x597f('0xc5')]||undefined,'CampaignId':_0x8ef06c[_0x597f('0xf5')]||undefined})['catch'](loggerCatch(_0x597f('0x117')));var _0x38d856=new History(_0x116c37);_0x38d856[_0x597f('0xd3')]=0xb;_0x38d856['statedesc']=_0x597f('0x113');_0x38d856['starttime']=moment()['format'](_0x597f('0xe9'));_0x38d856[_0x597f('0x98')]=_0x38d856[_0x597f('0x99')];_0x38d856[_0x597f('0x110')]=_0x116c37[_0x597f('0x110')];_0x38d856['calleridnum']=_0x116c37[_0x597f('0x111')];this[_0x597f('0xbc')](_0x38d856)[_0x597f('0xa9')](loggerCatch(_0x597f('0x118')));}}}}};Dialer[_0x597f('0x1c')][_0x597f('0x119')]=function(_0x73aef9){if(this[_0x597f('0x24')][_0x73aef9[_0x597f('0xcc')]]){this[_0x597f('0x24')][_0x73aef9['uniqueid']][_0x597f('0xa1')]=_0x73aef9[_0x597f('0xa1')];}if(this[_0x597f('0x9a')][_0x73aef9[_0x597f('0xcc')]]){this['uniqueId'][_0x73aef9[_0x597f('0xcc')]][_0x597f('0xa1')]=_0x73aef9[_0x597f('0xa1')];}};Dialer['prototype'][_0x597f('0x34')]=function(_0x329e2c){if(strategy[this[_0x597f('0xa2')][this[_0x597f('0x24')][_0x329e2c[_0x597f('0x11a')]][_0x597f('0xa3')]][_0x597f('0x46')]]===_0x597f('0x1b')){if(this['actions'][_0x329e2c[_0x597f('0x11a')]]&&_['isNil'](this['actions'][_0x329e2c[_0x597f('0x11a')]][_0x597f('0x11b')])&&_0x329e2c[_0x597f('0xc9')]==='1'&&_0x329e2c['paused']==='0'){if(this[_0x597f('0x11c')][_0x329e2c['stateinterface']]){if(!this['agents'][_0x329e2c[_0x597f('0x11d')]][_0x597f('0x11b')]){this[_0x597f('0x11c')][_0x329e2c[_0x597f('0x11d')]][_0x597f('0x11b')]=!![];this[_0x597f('0x24')][_0x329e2c[_0x597f('0x11a')]][_0x597f('0x11b')]=!![];this['actions'][_0x329e2c['actionid']][_0x597f('0x11d')]=_0x329e2c[_0x597f('0x11d')];}}}}else if((strategy[this[_0x597f('0xa2')][this[_0x597f('0x24')][_0x329e2c[_0x597f('0x11a')]][_0x597f('0xa3')]][_0x597f('0x46')]]||_0x597f('0x1a'))===_0x597f('0x1a')){if(this[_0x597f('0x24')][_0x329e2c[_0x597f('0x11a')]]){if(this['agents'][_0x329e2c[_0x597f('0x11d')]]){this[_0x597f('0x24')][_0x329e2c['actionid']]['stateinterface']=_0x329e2c[_0x597f('0x11d')];if(_['isNil'](this['queueBooked'][this[_0x597f('0x24')][_0x329e2c[_0x597f('0x11a')]][_0x597f('0xa3')]])){this['queueBooked'][this[_0x597f('0x24')][_0x329e2c[_0x597f('0x11a')]][_0x597f('0xa3')]]=[];}this['queueBooked'][this['actions'][_0x329e2c[_0x597f('0x11a')]]['queue']]['push'](_[_0x597f('0x7e')](_[_0x597f('0xc2')](this[_0x597f('0x24')][_0x329e2c[_0x597f('0x11a')]],[_0x597f('0x11e'),_0x597f('0x11d')]),{'status':_0x329e2c['status'],'paused':_0x329e2c[_0x597f('0x11f')]}));}}}};function unlockQueueStatus(_0x5bf670,_0x2b7e92){setTimeout(function(){if(_['isUndefined'](_0x5bf670[_0x597f('0x120')])){loggerBooked[_0x597f('0x87')](_0x597f('0x121'),_0x2b7e92);}_0x5bf670[_0x597f('0x120')]=!![];loggerBooked[_0x597f('0x71')](_0x597f('0x122'),_0x2b7e92,JSON['stringify'](_[_0x597f('0xc2')](_0x5bf670,[_0x597f('0x3a'),'queueStatusComplete'])));},0x1f3);}Dialer[_0x597f('0x1c')][_0x597f('0x123')]=function(_0x2cc630){var _0x379935=this;var _0xe01bbc=_0x379935[_0x597f('0xa2')][_0x379935[_0x597f('0x24')][_0x2cc630['actionid']][_0x597f('0xa3')]];if(strategy[this[_0x597f('0xa2')][this['actions'][_0x2cc630[_0x597f('0x11a')]][_0x597f('0xa3')]][_0x597f('0x46')]]===_0x597f('0x1b')){if(this[_0x597f('0x24')][_0x2cc630[_0x597f('0x11a')]]&&this['actions'][_0x2cc630[_0x597f('0x11a')]][_0x597f('0x11d')]){this[_0x597f('0x20')]['run'](this[_0x597f('0x24')][_0x2cc630[_0x597f('0x11a')]][_0x597f('0x11e')],this[_0x597f('0x24')][_0x2cc630[_0x597f('0x11a')]][_0x597f('0x11d')])['catch'](function(_0x1a9a45){logger[_0x597f('0x87')]('[Catch][Preview][syncQueueStatusComplete]',util[_0x597f('0x88')](_0x1a9a45,{'showHidden':![],'depth':null}));})['finally'](function(){_0x379935[_0x597f('0xa4')](_0x379935[_0x597f('0xa2')][_0x379935[_0x597f('0x24')][_0x2cc630[_0x597f('0x11a')]]['queue']]);_0x379935[_0x597f('0x11c')][_0x379935[_0x597f('0x24')][_0x2cc630['actionid']][_0x597f('0x11d')]][_0x597f('0x11b')]=![];delete _0x379935[_0x597f('0x24')][_0x2cc630[_0x597f('0x11a')]];unlockQueueStatus(_0xe01bbc);});}else{this[_0x597f('0xa4')](this[_0x597f('0xa2')][this[_0x597f('0x24')][_0x2cc630[_0x597f('0x11a')]][_0x597f('0xa3')]]);this[_0x597f('0xb2')]({'active':![],'ContactId':this[_0x597f('0x24')][_0x2cc630[_0x597f('0x11a')]][_0x597f('0xea')],'ListId':this[_0x597f('0x24')][_0x2cc630['actionid']][_0x597f('0xc3')],'VoiceQueueId':this[_0x597f('0x24')][_0x2cc630['actionid']][_0x597f('0xc5')]||undefined,'CampaignId':this[_0x597f('0x24')][_0x2cc630['actionid']][_0x597f('0xf5')]||undefined})['catch'](loggerCatch(_0x597f('0x124')));delete this[_0x597f('0x24')][_0x2cc630['actionid']];unlockQueueStatus(_0xe01bbc);}}else if((strategy[this['voiceQueues'][this[_0x597f('0x24')][_0x2cc630[_0x597f('0x11a')]]['queue']][_0x597f('0x46')]]||_0x597f('0x1a'))===_0x597f('0x1a')){var _0xc2cae8;if(this[_0x597f('0x24')][_0x2cc630['actionid']]&&!_[_0x597f('0x84')](this[_0x597f('0x29')][this[_0x597f('0x24')][_0x2cc630[_0x597f('0x11a')]][_0x597f('0xa3')]])){if(this['queueBookedRR'][_0x379935[_0x597f('0x24')][_0x2cc630['actionid']][_0x597f('0xa3')]]){this['queueBookedRR'][_0x379935['actions'][_0x2cc630['actionid']][_0x597f('0xa3')]]=this['queueBookedRR'][this[_0x597f('0x24')][_0x2cc630[_0x597f('0x11a')]]['queue']]?this[_0x597f('0x125')][this[_0x597f('0x24')][_0x2cc630[_0x597f('0x11a')]][_0x597f('0xa3')]]:this[_0x597f('0x29')][this[_0x597f('0x24')][_0x2cc630[_0x597f('0x11a')]][_0x597f('0xa3')]]?this[_0x597f('0x29')][this[_0x597f('0x24')][_0x2cc630[_0x597f('0x11a')]]['queue']][_0x597f('0x126')]||0x0:0x0;}this['queueBooked'][this['actions'][_0x2cc630['actionid']][_0x597f('0xa3')]][_0x597f('0x126')]=this[_0x597f('0x125')][this[_0x597f('0x24')][_0x2cc630[_0x597f('0x11a')]][_0x597f('0xa3')]];for(var _0x129917=0x0;_0x129917=0x0;})['catch'](myreject(_0x1883be)));}}else{_0x3695e9['push'](ami['Action']({'action':_0x597f('0x13f'),'command':util[_0x597f('0x6e')](_0x597f('0x142'),_0x39ab30,!_['isUndefined'](config[_0x597f('0x13b')][_0x54e02c])?_0x54e02c:'')})[_0x597f('0xa7')](function(_0x31a8ae){return _0x31a8ae[_0x597f('0x140')][_0x597f('0x141')](_0x597f('0x143'))>=0x0;})['catch'](myreject(_0x1883be)));}BPromise[_0x597f('0x144')](_0x3695e9)[_0x597f('0xa7')](function(_0x9b3d39){var _0x5dd80d=_[_0x597f('0x145')](_0x9b3d39);if(_0x5dd80d){return _0x949f09(_0x5dd80d);}else{_0x54eafb[_0x597f('0x37')]=_0xb42404?_0x597f('0x146'):_0x597f('0x147');return _0x1883be(msgResponse(_0x597f('0x148'),_0x597f('0x138'),_0x597f('0x149')+_0xb42404+'\x20'+_0xd727c+_0x597f('0x14a')+util[_0x597f('0x88')](_0x39ab30,{'showHidden':![],'depth':null})+_0x597f('0x14b')+_0x54e02c));}})['catch'](function(_0x14fc9a){return _0x1883be(msgResponse(_0x597f('0x137'),_0x597f('0x138'),JSON[_0x597f('0x12a')](_0x14fc9a)));});});};Dialer['prototype'][_0x597f('0x14c')]=function(_0x2abae3){var _0x107243=this;return function(){switch(_0x2abae3['dialMethod']){case _0x597f('0x14d'):freeVariablesPredictive(_0x2abae3);_0x107243['handlePower'](_0x2abae3,0x1);break;case _0x597f('0x14e'):freeVariablesPredictive(_0x2abae3);_0x107243[_0x597f('0x14f')](_0x2abae3,_0x2abae3['dialPowerLevel']);break;case'predictive':_0x107243[_0x597f('0x150')](_0x2abae3);break;case _0x597f('0x9'):freeVariablesPredictive(_0x2abae3);_0x107243['handlePower'](_0x2abae3,0x1);break;default:freeVariablesPredictive(_0x2abae3);logger[_0x597f('0x87')]('Queue',_0x2abae3[_0x597f('0x3a')],_0x597f('0x151'));}};};Dialer[_0x597f('0x1c')]['launchHandleIvr']=function(_0x5059f7){var _0x1828f5=this;return function(){_0x1828f5[_0x597f('0x152')](_0x5059f7);};};Dialer[_0x597f('0x1c')][_0x597f('0xb')]=function(_0x1d2ae6){var _0x1fd71d=this;if(isNotPreview(_0x1d2ae6['dialMethod'])){if(isVoiceQueueOutbound(_0x1d2ae6['type'])&&isActive(_0x1d2ae6[_0x597f('0x4f')])){_0x1d2ae6[_0x597f('0x92')]=!![];BPromise[_0x597f('0xae')]()[_0x597f('0xa7')](checkIsLoggedIn(_0x1d2ae6,_0x1d2ae6[_0x597f('0x153')]))['then'](checkIsActive(_0x1d2ae6,_0x1d2ae6[_0x597f('0x4f')]))[_0x597f('0xa7')](checkInterval(_0x1d2ae6))[_0x597f('0xa7')](_0x1fd71d[_0x597f('0x133')](_0x1d2ae6))['then'](_0x1fd71d[_0x597f('0x136')](_0x1d2ae6[_0x597f('0x154')],_0x1d2ae6[_0x597f('0x155')],_0x1d2ae6[_0x597f('0x3a')],_0x1d2ae6))[_0x597f('0xa7')](_0x1fd71d['checkIfTimeIntervals'](_0x1d2ae6[_0x597f('0x3b')],_0x1d2ae6[_0x597f('0x155')],_0x1d2ae6[_0x597f('0x3a')],_0x1d2ae6))[_0x597f('0xa7')](_0x1fd71d['checkDialMethod'](_0x1d2ae6))[_0x597f('0xa9')](loggerCatchQueueSummary(_0x597f('0x156'),_0x1d2ae6));}else{notSendMessagesQueue(_0x1d2ae6);}}else{freeVariablesPredictive(_0x1d2ae6);}};Dialer['prototype'][_0x597f('0x157')]=function(){var _0x2c3ae7=this;var _0x465fc6;for(var _0x24bdaf in this[_0x597f('0xa5')]){if(typeof this[_0x597f('0xa5')][_0x24bdaf]!==_0x597f('0x9e')){_0x465fc6=this['campaigns'][_0x24bdaf];if(isCampaignIvr(_0x465fc6[_0x597f('0x44')])&&isActive(_0x465fc6[_0x597f('0x6c')])){_0x465fc6[_0x597f('0x92')]=!![];BPromise[_0x597f('0xae')]()[_0x597f('0xa7')](checkIsActive(_0x465fc6,_0x465fc6[_0x597f('0x6c')]))['then'](checkInterval(_0x465fc6))[_0x597f('0xa7')](_0x2c3ae7['checkIsTrunkReachable'](_0x465fc6))[_0x597f('0xa7')](_0x2c3ae7['checkIfTime'](_0x465fc6[_0x597f('0x154')],_0x465fc6[_0x597f('0x155')],_0x465fc6[_0x597f('0x3a')],_0x465fc6))[_0x597f('0xa7')](_0x2c3ae7[_0x597f('0x158')](_0x465fc6['Interval'],_0x465fc6[_0x597f('0x155')],_0x465fc6[_0x597f('0x3a')],_0x465fc6))[_0x597f('0xa7')](_0x2c3ae7['launchHandleIvr'](_0x465fc6))[_0x597f('0xa9')](loggerCatchQueueSummary('[syncCampaigns]',_0x465fc6));}else{notSendMessagesCampaign(_0x465fc6);}}}};function getCallerIdRandom(_0xa1b9d5,_0x509d52){var _0x57cde5;var _0x85dad6;var _0x547879;if(_0x509d52<=0x0){_0x509d52=0x1;}_0x57cde5=new RegExp(_0x597f('0x159')+_0x509d52+'}$');_0x85dad6=Math['pow'](0xa,_0x509d52-0x1);_0x547879=Math[_0x597f('0x15a')](0xa,_0x509d52)-0x1;return util[_0x597f('0x6e')]('%s',_[_0x597f('0x15b')](_0xa1b9d5,_0x57cde5,_[_0x597f('0x15c')](_0x85dad6,_0x547879)));}function extractCalleridName(_0x526fb3){var _0x320ec7=_0x526fb3['match'](/"(.*?)"/);return _0x320ec7?_0x320ec7[0x1]:_0x526fb3;}function extractCalleridNumber(_0x453d5d){var _0x3b9f41=_0x453d5d[_0x597f('0x15d')](/<(.*?)>/);return _0x3b9f41?_0x3b9f41[0x1]:_0x453d5d;}Dialer[_0x597f('0x1c')][_0x597f('0x15e')]=function(_0xa0d1a9,_0xd03860){var _0x27b142=this;var _0x4f6baf=uuid['v4']();this['actions'][_0x4f6baf]=new Action(_0xa0d1a9,_0xd03860,_0x4f6baf);return new BPromise(function(_0x3de046,_0x456736){if(_[_0x597f('0x36')](_0xa0d1a9)&&typeof _0xa0d1a9!==_0x597f('0x15f')){return _0x456736(msgResponse(_0x597f('0x160'),_0x597f('0x138'),_0x597f('0x161')));}if(_['isUndefined'](_0xd03860[_0x597f('0x162')]['phone'])||_0xd03860[_0x597f('0x162')][_0x597f('0x163')]===null){return _0x456736(msgResponse('originate','Failure',_0x597f('0x164')));}var _0x56aa04={'XMD-CALLERID':_0x27b142['actions'][_0x4f6baf][_0x597f('0x165')](),'XMD-AGI':_0xa0d1a9['dialQueueProject']?util[_0x597f('0x6e')](_0x597f('0x166'),ipAgi,_0xa0d1a9[_0x597f('0xfb')]):_0x597f('0x167'),'XMD-AGIAFTER':_0xa0d1a9['dialQueueProject2']?util[_0x597f('0x6e')](_0x597f('0x166'),ipAgi,_0xa0d1a9[_0x597f('0x102')]):_0x597f('0x167'),'XMD-QUEUE':_0xa0d1a9[_0x597f('0x44')]===_0x597f('0x45')?util[_0x597f('0x6e')]('\x22%s,%s%s,,,%s\x22',_0xa0d1a9['name'],_0xa0d1a9['dialQueueOptions']||'',_0xa0d1a9[_0x597f('0x103')]?'c':'',_0xa0d1a9[_0x597f('0x10a')]||0x3):'NONE','XMD-CONTACTID':_0xd03860['ContactId'],'XMD-CDRTYPE':'dialer','CALLERID(all)':_0x27b142[_0x597f('0x24')][_0x4f6baf]['getCaller'](),'XMD-AMD':_0xa0d1a9[_0x597f('0xd1')]?'ACTIVE':'NONE','XMD-DESTINATION':_0x597f('0xd0')};if(_0xa0d1a9[_0x597f('0xd1')]){_0x56aa04[_0x597f('0x168')]=_0xa0d1a9[_0x597f('0x169')]||0x9c4;_0x56aa04[_0x597f('0x16a')]=_0xa0d1a9[_0x597f('0x16b')]||0x5dc;_0x56aa04['XMD-AMDAFTERGREETINGSILENCE']=_0xa0d1a9[_0x597f('0x16c')]||0x320;_0x56aa04[_0x597f('0x16d')]=_0xa0d1a9[_0x597f('0x16e')]||0x1388;_0x56aa04['XMD-AMDMINWORDLENGTH']=_0xa0d1a9['dialAMDMinWordLength']||0x64;_0x56aa04[_0x597f('0x16f')]=_0xa0d1a9['dialAMDBetweenWordsSilence']||0x32;_0x56aa04[_0x597f('0x170')]=_0xa0d1a9['dialAMDMaximumNumberOfWords']||0x3;_0x56aa04[_0x597f('0x171')]=_0xa0d1a9[_0x597f('0x172')]||0x100;_0x56aa04['XMD-AMDMAXIMUMWORDLENGTH']=_0xa0d1a9[_0x597f('0x173')]||0x1388;}if(_0xa0d1a9[_0x597f('0x44')]==='outbound'){_0x56aa04[_0x597f('0x174')]=_0xd03860['VoiceQueueId'];}else{_0x56aa04[_0x597f('0x175')]=_0xd03860[_0x597f('0xf5')];}for(var _0x186ab6 in _0xd03860['Contact']){if(typeof _0xd03860[_0x597f('0x162')][_0x186ab6]!==_0x597f('0x9e')){if(isNotNull(_0xd03860['Contact'][_0x186ab6])&&_0x186ab6!=='id'&&_0x186ab6!==_0x597f('0x176')&&_0x186ab6!==_0x597f('0x177')&&_0x186ab6!==_0x597f('0x178')){_0x56aa04[util[_0x597f('0x6e')](_0x597f('0x179'),'XMD-',_[_0x597f('0x17a')](_0x186ab6))]=_0xd03860[_0x597f('0x162')][_0x186ab6];}}}var _0x254a60=_0x27b142['isTrunkReachable'](_0xa0d1a9[_0x597f('0x6b')])?getCallerId(_0xa0d1a9[_0x597f('0x6b')]['callerid'],_0xa0d1a9[_0x597f('0x17b')],_0xa0d1a9[_0x597f('0x17c')]>0x0?getCallerIdRandom(_0xa0d1a9['dialOriginateCallerIdNumber'],_0xa0d1a9[_0x597f('0x17c')]):_0xa0d1a9[_0x597f('0x17d')]):getCallerId(_[_0x597f('0x9f')](_0xa0d1a9['TrunkBackup'])?_0xa0d1a9[_0x597f('0x6b')][_0x597f('0x6d')]:_0xa0d1a9[_0x597f('0x17e')]['callerid'],_0xa0d1a9[_0x597f('0x17b')],_0xa0d1a9[_0x597f('0x17c')]>0x0?getCallerIdRandom(_0xa0d1a9['dialOriginateCallerIdNumber'],_0xa0d1a9['dialRandomLastDigitCallerIdNumber']):_0xa0d1a9[_0x597f('0x17d')]);if(_0x254a60){_0x56aa04[_0x597f('0x17f')]=_0x27b142[_0x597f('0x24')][_0x4f6baf]['originatecalleridname']=extractCalleridName(_0x254a60);_0x56aa04[_0x597f('0x180')]=_0x27b142[_0x597f('0x24')][_0x4f6baf]['originatecalleridnum']=extractCalleridNumber(_0x254a60);}return ami[_0x597f('0xa0')]({'actionid':_0x4f6baf,'action':_0x597f('0x160'),'channel':_0x27b142[_0x597f('0x181')](_0xa0d1a9[_0x597f('0x6b')])?util[_0x597f('0x6e')](_0x597f('0x182'),_0xa0d1a9[_0x597f('0x6b')][_0x597f('0x3a')],isNotNull(_0xa0d1a9[_0x597f('0x51')])?_0xa0d1a9[_0x597f('0x51')][_0x597f('0x183')]()||'':'',_0xa0d1a9[_0x597f('0x184')]>0x0?_0xd03860[_0x597f('0x162')][_0x597f('0x163')][_0x597f('0x185')](_0xa0d1a9[_0x597f('0x184')]):_0xd03860['Contact']['phone']):util[_0x597f('0x6e')](_0x597f('0x182'),_[_0x597f('0x9f')](_0xa0d1a9['TrunkBackup'])?_0xa0d1a9[_0x597f('0x6b')][_0x597f('0x3a')]:_0xa0d1a9[_0x597f('0x17e')][_0x597f('0x3a')],isNotNull(_0xa0d1a9[_0x597f('0x51')])?_0xa0d1a9['dialPrefix'][_0x597f('0x183')]()||'':'',_0xa0d1a9[_0x597f('0x184')]>0x0?_0xd03860['Contact'][_0x597f('0x163')]['substring'](_0xa0d1a9[_0x597f('0x184')]):_0xd03860[_0x597f('0x162')][_0x597f('0x163')]),'callerid':_0x254a60,'Exten':'xcally-motion-dialer','Context':_0x597f('0x186'),'Priority':'1','variable':_0x56aa04,'timeout':(_0xa0d1a9[_0x597f('0x50')]||0x1e)*0x3e8,'async':!![],'channelid':_0x4f6baf})['then'](function(_0x35437a){return _0x3de046(_0x35437a);})['catch'](function(_0x4bf01d){_0xa0d1a9[_0x597f('0x5a')]+=0x1;var _0x5307ac=new History(_0x27b142[_0x597f('0x24')][_0x4f6baf]);logger['error'](util[_0x597f('0x6e')](_0x597f('0x187'),JSON[_0x597f('0x12a')](_0x4bf01d)));_0x5307ac[_0x597f('0xd3')]=0xe;_0x5307ac[_0x597f('0x97')]=_0x597f('0x188');_0x5307ac['starttime']=moment()[_0x597f('0x6e')]('YYYY-MM-DD\x20HH:mm:ss');_0x5307ac[_0x597f('0x98')]=_0x5307ac['starttime'];_0x27b142['createHistory'](_0x5307ac)[_0x597f('0xa9')](loggerCatch('[originate][error]'));_0x27b142[_0x597f('0xf9')](_0x5307ac)[_0x597f('0xa9')](loggerCatch(_0x597f('0x189')))['finally'](function(){delete _0x27b142[_0x597f('0x24')][_0x4f6baf];return _0x456736(msgResponse('originate',_0x597f('0x40'),_0x597f('0x18a')));});});});};Dialer[_0x597f('0x1c')][_0x597f('0x18b')]=function(_0x20f718){var _0x46c478=this[_0x597f('0x24')][_0x20f718[_0x597f('0x11a')]];if(_0x46c478){delete this['actions'][_0x20f718[_0x597f('0x11a')]];_0x46c478[_0x597f('0x109')]=moment()[_0x597f('0x6e')]('YYYY-MM-DD\x20HH:mm:ss');var _0x458c80=_0x46c478[_0x597f('0x44')]===_0x597f('0x6f')?this[_0x597f('0xa5')][_0x46c478[_0x597f('0xa3')]]:this[_0x597f('0xa2')][_0x46c478[_0x597f('0x18c')]()];if(!this['isSuccess'](_0x20f718[_0x597f('0x18d')])){this[_0x597f('0xa4')](_0x458c80);return this[_0x597f('0x18e')](_0x46c478,_0x458c80,_0x20f718)['catch'](loggerCatch(_0x597f('0x18f')));}this[_0x597f('0x9a')][_0x20f718[_0x597f('0xcc')]]=_0x46c478;}};Dialer[_0x597f('0x1c')]['checkRetriveMax']=function(_0x52e0a0,_0x2fdd8a,_0x205a08){var _0x4c32bf=new History(_0x2fdd8a);if(_0x4c32bf[_0x597f('0xe0')]+_0x4c32bf[_0x597f('0xef')]+_0x4c32bf[_0x597f('0xe1')]+_0x4c32bf['countnosuchnumberretry']+_0x4c32bf[_0x597f('0xe3')]+_0x4c32bf['countabandonedretry']+_0x4c32bf[_0x597f('0xdd')]+_0x4c32bf[_0x597f('0x190')]>=_0x205a08[_0x597f('0xf0')]-0x1){return!![];}switch(_0x52e0a0){case 0x3:if(_0x4c32bf['countnoanswerretry']>=_0x205a08[_0x597f('0x191')]-0x1){return!![];}this[_0x597f('0xb2')]({'active':![],'countnoanswerretry':_0x4c32bf['countnoanswerretry']+=0x1,'scheduledat':moment()[_0x597f('0xf3')](_0x205a08[_0x597f('0x192')],_0x597f('0xf4'))['format'](_0x597f('0xe9')),'ContactId':_0x4c32bf[_0x597f('0xea')],'ListId':_0x4c32bf[_0x597f('0xc3')],'VoiceQueueId':_0x4c32bf[_0x597f('0xc5')]||undefined,'CampaignId':_0x4c32bf[_0x597f('0xf5')]||undefined})[_0x597f('0xa9')](loggerCatch(_0x597f('0x193')));break;case 0x5:if(_0x4c32bf['countbusyretry']>=_0x205a08[_0x597f('0x194')]-0x1){return!![];}this['rescheduleContact']({'active':![],'countbusyretry':_0x4c32bf[_0x597f('0xe0')]+=0x1,'scheduledat':moment()[_0x597f('0xf3')](_0x205a08[_0x597f('0x195')],_0x597f('0xf4'))[_0x597f('0x6e')](_0x597f('0xe9')),'ContactId':_0x4c32bf[_0x597f('0xea')],'ListId':_0x4c32bf[_0x597f('0xc3')],'VoiceQueueId':_0x4c32bf[_0x597f('0xc5')]||undefined,'CampaignId':_0x4c32bf['CampaignId']||undefined})[_0x597f('0xa9')](loggerCatch('[rescheduleContact]\x20[Busy]'));break;case 0x8:if(_0x4c32bf['countcongestionretry']>=_0x205a08[_0x597f('0x196')]-0x1){return!![];}this[_0x597f('0xb2')]({'active':![],'countcongestionretry':_0x4c32bf[_0x597f('0xef')]+=0x1,'scheduledat':moment()[_0x597f('0xf3')](_0x205a08[_0x597f('0x197')],_0x597f('0xf4'))['format'](_0x597f('0xe9')),'ContactId':_0x4c32bf[_0x597f('0xea')],'ListId':_0x4c32bf[_0x597f('0xc3')],'VoiceQueueId':_0x4c32bf[_0x597f('0xc5')]||undefined,'CampaignId':_0x4c32bf[_0x597f('0xf5')]||undefined})['catch'](loggerCatch(_0x597f('0x198')));break;case 0x0:if(_0x4c32bf['countnosuchnumberretry']>=_0x205a08['dialNoSuchNumberMaxRetry']-0x1){return!![];}else{this[_0x597f('0xb2')]({'active':![],'countnosuchnumberretry':_0x4c32bf[_0x597f('0xe2')]+=0x1,'scheduledat':moment()[_0x597f('0xf3')](_0x205a08['dialNoSuchNumberRetryFrequency'],_0x597f('0xf4'))[_0x597f('0x6e')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x4c32bf[_0x597f('0xea')],'ListId':_0x4c32bf['ListId'],'VoiceQueueId':_0x4c32bf[_0x597f('0xc5')]||undefined,'CampaignId':_0x4c32bf[_0x597f('0xf5')]||undefined})['catch'](loggerCatch(_0x597f('0x199')));}break;case 0xa:if(_0x4c32bf[_0x597f('0xe3')]>=_0x205a08[_0x597f('0x10d')]-0x1){return!![];}this[_0x597f('0xb2')]({'active':![],'countdropretry':_0x4c32bf[_0x597f('0xe3')]+=0x1,'scheduledat':moment()['add'](_0x205a08[_0x597f('0x10e')],_0x597f('0xf4'))[_0x597f('0x6e')](_0x597f('0xe9')),'ContactId':_0x4c32bf[_0x597f('0xea')],'ListId':_0x4c32bf[_0x597f('0xc3')],'VoiceQueueId':_0x4c32bf[_0x597f('0xc5')]||undefined,'CampaignId':_0x4c32bf[_0x597f('0xf5')]||undefined})[_0x597f('0xa9')](loggerCatch(_0x597f('0x10f')));break;case 0xb:if(_0x4c32bf['countabandonedretry']>=_0x205a08['dialAbandonedMaxRetry']-0x1){return!![];}this[_0x597f('0xb2')]({'active':![],'countabandonedretry':_0x4c32bf[_0x597f('0xe4')]+=0x1,'scheduledat':moment()[_0x597f('0xf3')](_0x205a08[_0x597f('0x116')],_0x597f('0xf4'))['format']('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x4c32bf[_0x597f('0xea')],'ListId':_0x4c32bf[_0x597f('0xc3')],'VoiceQueueId':_0x4c32bf[_0x597f('0xc5')]||undefined,'CampaignId':_0x4c32bf[_0x597f('0xf5')]||undefined})[_0x597f('0xa9')](loggerCatch(_0x597f('0x117')));break;case 0x13:if(_0x4c32bf[_0x597f('0xdd')]>=_0x205a08['dialMachineMaxRetry']-0x1){return!![];}this[_0x597f('0xb2')]({'active':![],'countmachineretry':_0x4c32bf[_0x597f('0xdd')]+=0x1,'scheduledat':moment()['add'](_0x205a08[_0x597f('0xe8')],'minutes')['format'](_0x597f('0xe9')),'ContactId':_0x4c32bf[_0x597f('0xea')],'ListId':_0x4c32bf[_0x597f('0xc3')],'VoiceQueueId':_0x4c32bf['VoiceQueueId']||undefined,'CampaignId':_0x4c32bf[_0x597f('0xf5')]||undefined})[_0x597f('0xa9')](loggerCatch('[rescheduleContact][Machine]'));break;case 0x14:if(_0x4c32bf['countagentrejectretry']>=_0x205a08[_0x597f('0x19a')]-0x1){return!![];}this[_0x597f('0xb2')]({'active':![],'countagentrejectretry':_0x4c32bf[_0x597f('0x190')]+=0x1,'scheduledat':moment()[_0x597f('0xf3')](_0x205a08[_0x597f('0x19b')],'minutes')[_0x597f('0x6e')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x4c32bf['ContactId'],'ListId':_0x4c32bf[_0x597f('0xc3')],'VoiceQueueId':_0x4c32bf[_0x597f('0xc5')]||undefined,'CampaignId':_0x4c32bf[_0x597f('0xf5')]||undefined})[_0x597f('0xa9')](loggerCatch('[rescheduleContact][AgentReject]'));break;default:return!![];}};Dialer[_0x597f('0x1c')][_0x597f('0x18e')]=function(_0x35c7f2,_0x4f05c0,_0x246ef6){var _0x570e1d=this;var _0x2bb01d=new History(_0x35c7f2);return new BPromise(function(_0x197d65,_0x35a4a1){if(_[_0x597f('0x36')](_0x4f05c0)&&typeof _0x4f05c0!==_0x597f('0x15f')){return _0x35a4a1(msgResponse(_0x597f('0x19c'),_0x597f('0x138'),_0x597f('0x19d')));}if(_[_0x597f('0x36')](_0x246ef6)&&typeof _0x246ef6!==_0x597f('0x15f')){return _0x35a4a1(msgResponse(_0x597f('0x19c'),_0x597f('0x138'),'evt\x20is\x20undefine'));}switch(_0x246ef6['reason']){case'0':_0x4f05c0['outboundNoSuchCallsDay']+=0x1;_0x2bb01d[_0x597f('0xd3')]=0x0;_0x2bb01d[_0x597f('0x97')]=_0x597f('0x19e');_0x2bb01d[_0x597f('0xe2')]+=0x1;_0x2bb01d[_0x597f('0xde')]+=0x1;ami[_0x597f('0x43')](_0x597f('0x19f'),ut[_0x597f('0xd8')](_0x35c7f2,_0x597f('0x1a0')));_0x570e1d[_0x597f('0xbc')](_0x2bb01d)[_0x597f('0xa9')](loggerCatch(_0x597f('0xdf')));if(_0x570e1d['checkRetriveMax'](0x0,_0x35c7f2,_0x4f05c0)){if(_0x2bb01d[_0x597f('0xe2')]>=_0x4f05c0[_0x597f('0x1a1')]){_0x570e1d[_0x597f('0xf2')](_0x2bb01d,_0x197d65,_0x35a4a1,'reason\x200\x20no\x20such\x20number....');}else{_0x570e1d['stateGlobal'](_0x2bb01d,_0x197d65,_0x35a4a1,_0x597f('0x1a2'));}}break;case'3':_0x4f05c0[_0x597f('0x1a3')]+=0x1;_0x2bb01d[_0x597f('0xd3')]=0x3;_0x2bb01d[_0x597f('0x97')]=_0x597f('0x1a4');_0x2bb01d[_0x597f('0xe1')]+=0x1;_0x2bb01d[_0x597f('0xde')]+=0x1;ami['emit'](_0x597f('0x1a5'),ut[_0x597f('0xd8')](_0x35c7f2,_0x597f('0x1a6')));_0x570e1d['createHistory'](_0x2bb01d)[_0x597f('0xa9')](loggerCatch(_0x597f('0x1a7')));if(_0x570e1d[_0x597f('0x1a8')](0x3,_0x35c7f2,_0x4f05c0)){if(_0x2bb01d['countnoanswerretry']>=_0x4f05c0['dialNoAnswerMaxRetry']){_0x570e1d[_0x597f('0xf2')](_0x2bb01d,_0x197d65,_0x35a4a1,_0x597f('0x1a9'));}else{_0x570e1d[_0x597f('0xe5')](_0x2bb01d,_0x197d65,_0x35a4a1,_0x597f('0x1a9'));}}break;case'5':_0x4f05c0[_0x597f('0x55')]+=0x1;_0x2bb01d[_0x597f('0xd3')]=0x5;_0x2bb01d[_0x597f('0x97')]=_0x597f('0x1aa');_0x2bb01d['countbusyretry']+=0x1;_0x2bb01d[_0x597f('0xde')]+=0x1;ami['emit']('custom:agentbusy',ut['buildObj'](_0x35c7f2,_0x597f('0x1ab')));_0x570e1d[_0x597f('0xbc')](_0x2bb01d)['catch'](loggerCatch('[syncAgentComplete][createHistory][5]'));if(_0x570e1d[_0x597f('0x1a8')](0x5,_0x35c7f2,_0x4f05c0)){if(_0x2bb01d[_0x597f('0xe0')]>=_0x4f05c0[_0x597f('0x194')]){_0x570e1d[_0x597f('0xf2')](_0x2bb01d,_0x197d65,_0x35a4a1,_0x597f('0x1ac'));}else{_0x570e1d[_0x597f('0xe5')](_0x2bb01d,_0x197d65,_0x35a4a1,'reason\x205\x20busy');}}break;case'8':_0x4f05c0['outboundCongestionCallsDay']+=0x1;_0x2bb01d['state']=0x8;_0x2bb01d[_0x597f('0x97')]=_0x597f('0x1ad');_0x2bb01d[_0x597f('0xef')]+=0x1;_0x2bb01d['countglobal']+=0x1;ami[_0x597f('0x43')](_0x597f('0x1ae'),ut['buildObj'](_0x35c7f2,_0x597f('0x1af')));_0x570e1d[_0x597f('0xbc')](_0x2bb01d)['catch'](loggerCatch(_0x597f('0x1b0')));if(_0x570e1d['checkRetriveMax'](0x8,_0x35c7f2,_0x4f05c0)){if(_0x2bb01d['countcongestionretry']>=_0x4f05c0[_0x597f('0x196')]){_0x570e1d['createStateFinal'](_0x2bb01d,_0x197d65,_0x35a4a1,_0x597f('0x1b1'));}else{_0x570e1d[_0x597f('0xe5')](_0x2bb01d,_0x197d65,_0x35a4a1,_0x597f('0x1b1'));}}break;case'11':_0x4f05c0[_0x597f('0x1b2')]+=0x1;_0x2bb01d[_0x597f('0xd3')]=0xb;_0x2bb01d[_0x597f('0x97')]='Abandoned';_0x2bb01d['countabandonedretry']+=0x1;_0x2bb01d[_0x597f('0xde')]+=0x1;_0x570e1d[_0x597f('0xbc')](_0x2bb01d)[_0x597f('0xa9')](loggerCatch(_0x597f('0x118')));if(_0x570e1d[_0x597f('0x1a8')](0xb,_0x35c7f2,_0x4f05c0)){if(_0x2bb01d['countabandonedretry']>=_0x4f05c0[_0x597f('0x115')]){_0x570e1d[_0x597f('0xf2')](_0x2bb01d,_0x197d65,_0x35a4a1,_0x597f('0x1b3'));}else{_0x570e1d['stateGlobal'](_0x2bb01d,_0x197d65,_0x35a4a1,_0x597f('0x1b3'));}}break;case'20':_0x4f05c0['outboundRejectCallsDay']+=0x1;_0x2bb01d[_0x597f('0xd3')]=0x14;_0x2bb01d[_0x597f('0x97')]=_0x597f('0x1b4');_0x2bb01d[_0x597f('0x190')]+=0x1;_0x2bb01d[_0x597f('0xde')]+=0x1;ami[_0x597f('0x43')](_0x597f('0x1b5'),ut['buildObj'](_0x35c7f2,_0x597f('0x1b6')));_0x570e1d['createHistory'](_0x2bb01d)[_0x597f('0xa9')](loggerCatch(_0x597f('0x1b7')));if(_0x570e1d[_0x597f('0x1a8')](0x14,_0x35c7f2,_0x4f05c0)){if(_0x2bb01d['countagentrejectretry']>=_0x4f05c0[_0x597f('0x19a')]){_0x570e1d[_0x597f('0xf2')](_0x2bb01d,_0x197d65,_0x35a4a1,_0x597f('0x1b8'));}else{_0x570e1d[_0x597f('0xe5')](_0x2bb01d,_0x197d65,_0x35a4a1,'reason\x2020\x20agentreject');}}break;default:_0x4f05c0[_0x597f('0x5d')]+=0x1;_0x2bb01d[_0x597f('0xd3')]=0xc;_0x2bb01d[_0x597f('0x97')]=_0x246ef6[_0x597f('0xff')];_0x570e1d[_0x597f('0xbc')](_0x2bb01d)[_0x597f('0xa9')](loggerCatch(_0x597f('0x1b9')));if(_0x570e1d['checkRetriveMax'](_0x246ef6[_0x597f('0xff')],_0x35c7f2,_0x4f05c0)){if(_0x2bb01d[_0x597f('0xe0')]+_0x2bb01d['countcongestionretry']+_0x2bb01d['countnoanswerretry']+_0x2bb01d[_0x597f('0xe2')]+_0x2bb01d[_0x597f('0xe3')]+_0x2bb01d[_0x597f('0xe4')]+_0x2bb01d['countmachineretry']+_0x2bb01d['countagentrejectretry']>=_0x4f05c0[_0x597f('0xf0')]){_0x570e1d['stateGlobal'](_0x2bb01d,_0x197d65,_0x35a4a1,_0x246ef6['reason']);}else{_0x570e1d['createStateFinal'](_0x2bb01d,_0x197d65,_0x35a4a1,_0x246ef6['reason']);}}}});};Dialer['prototype'][_0x597f('0xe5')]=function(_0xe4e05b,_0x271b89,_0x381364,_0x5c4ef6){var _0x1950b5=new Final(_0xe4e05b);_0x1950b5[_0x597f('0xd3')]=0xf;_0x1950b5[_0x597f('0x97')]=_0x597f('0x1ba');this[_0x597f('0xf2')](_0x1950b5,_0x271b89,_0x381364,_0x5c4ef6);};Dialer[_0x597f('0x1c')][_0x597f('0xf2')]=function(_0x1bd452,_0x5d481b,_0x5cddc6,_0x236e2e){this[_0x597f('0xf9')](_0x1bd452)['then'](function(){return _0x5d481b(msgResponse(_0x597f('0x19c'),_0x597f('0x1bb'),_0x236e2e));})['catch'](function(){return _0x5cddc6(msgResponse(_0x597f('0x1bc'),'Failure',_0x597f('0x1bd')));});};Dialer[_0x597f('0x1c')][_0x597f('0x150')]=function(_0x3707df){var _0xd61a0=_0x3707df[_0x597f('0x1be')]/0x64;var _0x5d8856=_0x3707df[_0x597f('0x59')]/(_0x3707df[_0x597f('0x59')]+_0x3707df[_0x597f('0x53')]);var _0x225ac8=Math['round'](_0x3707df[_0x597f('0x1bf')]*(_0x3707df[_0x597f('0x1c0')]/0x64));var _0x50ab10=Math['round'](_0x3707df['predictiveIntervalAvailable']*(_0x3707df['predictiveIntervalMinThreshold']/0x64));var _0xfda4a7=_0x3707df['available']+_0x3707df[_0x597f('0x4b')];var _0x5a763f=Math[_0x597f('0x1c1')](_0x3707df[_0x597f('0x69')]*_0x3707df[_0x597f('0x6a')]*_0x3707df[_0x597f('0x64')]*_0x3707df[_0x597f('0x65')]);if(_[_0x597f('0x36')](_0x3707df[_0x597f('0x27')])){if(!_[_0x597f('0x36')](_0x3707df['startPredictive'])){_0x3707df['startPredictive']=undefined;loggerPredictive['error']('[startMethodPredictive][StartProgressive]','check\x20predictive\x20is\x20not\x20undefine');}if(!_[_0x597f('0x36')](_0x3707df['handlePredictive'])){loggerPredictive[_0x597f('0x87')](_0x597f('0x1c2'),_0x597f('0x1c3'));clearInterval(_0x3707df[_0x597f('0x81')]);_0x3707df[_0x597f('0x81')]=undefined;}_0x3707df[_0x597f('0x27')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');loggerPredictive[_0x597f('0x71')](_0x3707df[_0x597f('0x3a')],_0x597f('0x1c4'),_0x3707df[_0x597f('0x27')]);this[_0x597f('0x14f')](_0x3707df,0x1);}else if(ifInterval(_0x3707df[_0x597f('0x1c5')],_0x3707df[_0x597f('0x27')])){this[_0x597f('0x14f')](_0x3707df,0x1);loggerPredictiveCalls['info']('[startMethodPredictive][StartProgressive][Loop]',_0x3707df['startProgressive'],_0x3707df[_0x597f('0x3a')]);_0x3707df[_0x597f('0x69')]=0x0;_0x3707df['predictiveIntervalErlangCallsDroppedCalls']=0x0;}else if(_0xd61a0<_0x5d8856&&_0x3707df[_0x597f('0x1c6')]===_0x597f('0x1c7')){freeVariablesPredictive(_0x3707df);loggerPredictive['info'](_0x597f('0x1c8'),_0x597f('0x1c9'),_0x5d8856,_0x597f('0x27'),_0x3707df[_0x597f('0x3a')]);}else if(_0x5a763f<_0x3707df[_0x597f('0x63')]&&_0x3707df[_0x597f('0x1c6')]==='dropRate'){freeVariablesPredictive(_0x3707df);loggerPredictive['info']('[stopMethodPredictive][ReStartProgressive][ExceededDropInterval]',_0x597f('0x1ca'),_0x5a763f,'Drop\x20in\x20this\x20interval',_0x3707df['predictiveIntervalErlangCallsDroppedCalls'],_0x597f('0x27'),_0x3707df[_0x597f('0x3a')]);}else if(!ifInterval(_0x3707df[_0x597f('0x1c5')],_0x3707df['startProgressive'])&&_[_0x597f('0x36')](_0x3707df[_0x597f('0x26')])&&!_['isUndefined'](_0x3707df['startProgressive'])){_0x3707df['startPredictive']=moment()[_0x597f('0x6e')](_0x597f('0xe9'));loggerPredictive['info'](_0x3707df[_0x597f('0x3a')],_0x597f('0x1cb'),_0x3707df[_0x597f('0x26')]);this[_0x597f('0xb0')](_0x3707df[_0x597f('0x1c5')])[_0x597f('0xa7')](this[_0x597f('0x1cc')](_0x3707df))[_0x597f('0xa7')](mergeDataErlangB(_0x3707df))[_0x597f('0xa7')](this[_0x597f('0x1cd')](_0x3707df))['catch'](loggerCatchPredictive(_0x597f('0x1ce'),_0x3707df));}else if(!ifInterval(_0x3707df[_0x597f('0x1c5')],_0x3707df['startPredictive'])){_0x3707df[_0x597f('0x63')]=0x0;_0x3707df[_0x597f('0x26')]=moment()[_0x597f('0x6e')](_0x597f('0xe9'));loggerPredictive[_0x597f('0x71')](_0x3707df['name'],'recalculate\x20predictive\x20at',_0x3707df[_0x597f('0x26')]);clearInterval(_0x3707df[_0x597f('0x81')]);_0x3707df[_0x597f('0x81')]=undefined;this[_0x597f('0xb0')](_0x3707df[_0x597f('0x1c5')])[_0x597f('0xa7')](this[_0x597f('0x1cc')](_0x3707df))[_0x597f('0xa7')](mergeDataErlangB(_0x3707df))[_0x597f('0xa7')](this['startMethodPredictive'](_0x3707df))['catch'](loggerCatchPredictive('Predictive\x20for\x20every\x20interval',_0x3707df));}else if(_0x3707df[_0x597f('0x1bf')]&&_0xfda4a7<_0x3707df[_0x597f('0x1bf')]-_0x50ab10){freeVariablesPredictive(_0x3707df);loggerPredictive[_0x597f('0x71')](_0x3707df[_0x597f('0x3a')],_0x597f('0x1cf'),_0xfda4a7,_0x597f('0x1d0'),_0x3707df[_0x597f('0x1bf')],'-',_0x50ab10,'=',_0x3707df[_0x597f('0x1bf')]-_0x50ab10,')');}else if(_0x3707df[_0x597f('0x1bf')]&&_0xfda4a7>_0x3707df[_0x597f('0x1bf')]+_0x225ac8){freeVariablesPredictive(_0x3707df);loggerPredictive[_0x597f('0x71')](_0x3707df[_0x597f('0x3a')],'switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',_0xfda4a7,_0x597f('0x1d1'),_0x3707df[_0x597f('0x1bf')],'+',_0x225ac8,'=',_0x3707df['predictiveIntervalAvailable']+_0x225ac8,')');}};Dialer[_0x597f('0x1c')][_0x597f('0x1cc')]=function(_0x3e8566){var _0x3f886f=this;return function(_0x3cd688){return new BPromise(function(_0x32d3e0,_0x24da38){_[_0x597f('0x7e')](_0x3e8566,_0x3cd688[0x0]);if(checkGetDataPredictive(_0x3cd688[0x0])){var _0x3d0b56=_0x3e8566[_0x597f('0x1bf')]=_0x3e8566['talking']+_0x3e8566[_0x597f('0x48')];var _0x200b4d=_0x3e8566['dialPredictiveInterval']*0x3c;var _0x34ef8=_0x3cd688[0x0][_0x597f('0x60')]+_0x3cd688[0x0][_0x597f('0x5f')];var _0x4275e3=(_0x3cd688[0x0][_0x597f('0x5e')]+_0x3cd688[0x0][_0x597f('0x61')]+_0x3cd688[0x0][_0x597f('0x75')])/_0x3cd688[0x0][_0x597f('0x67')];_0x3e8566[_0x597f('0x64')]=_0x4275e3>0x0?_0x4275e3:0x1;switch(_0x3e8566[_0x597f('0x1c6')]){case'dropRate':var _0x66167b=_0x3e8566[_0x597f('0x1be')]/0x64;return _0x3f886f['abandonmentRate'](_0x3d0b56,_0x200b4d,_0x34ef8,_0x4275e3,_0x66167b)[_0x597f('0xa7')](function(_0x288e19){return _0x32d3e0(_0x288e19);});case _0x597f('0x1d2'):var _0x486eea=_0x3e8566['dialPredictiveOptimizationPercentage']/0x64;return _0x3f886f[_0x597f('0x1d3')](_0x3d0b56,_0x200b4d,_0x34ef8,_0x4275e3,_0x486eea)[_0x597f('0xa7')](function(_0x1d0fa9){return _0x32d3e0(_0x1d0fa9);});default:return _0x24da38(msgResponse('[getDataPredictive]','Failure',_0x597f('0x1d4')));}}else{return _0x24da38(msgResponse(_0x597f('0x1d5'),_0x597f('0x138'),'check\x20failure'));}});};};Dialer[_0x597f('0x1c')]['getDataPredictiveOld']=function(_0x19e854){var _0x35257c=this;return function(_0x32a4d6){return new BPromise(function(_0x47c594,_0x19e227){_['merge'](_0x19e854,_0x32a4d6[0x0]);if(checkGetDataPredictive(_0x32a4d6[0x0])){loggerPredictive[_0x597f('0x71')](JSON[_0x597f('0x12a')](_0x32a4d6[0x0]));if(_0x19e854[_0x597f('0x1c6')]==='dropRate'){return _0x35257c[_0x597f('0xba')](_0x19e854['id'])[_0x597f('0xa7')](function(_0x3e117c){var _0x459ea6=_0x19e854['loggedIn']-_0x3e117c[0x0]['outboundQueuePauses'];var _0x1531c4=_0x19e854[_0x597f('0x1c5')]*0x3c;var _0x540cfb=_0x32a4d6[0x0][_0x597f('0x60')]+_0x32a4d6[0x0][_0x597f('0x5f')];var _0x2effd5=(_0x32a4d6[0x0][_0x597f('0x5e')]+_0x32a4d6[0x0][_0x597f('0x61')]+_0x32a4d6[0x0]['predictiveIntervalDroppedCallsCallersExit'])/_0x32a4d6[0x0]['predictiveIntervalTotalCalls'];var _0x147344=_0x19e854[_0x597f('0x1be')]/0x64;_0x19e854[_0x597f('0x66')]=_0x3e117c[0x0][_0x597f('0x1d6')]||0x0;_0x19e854[_0x597f('0x64')]=_0x2effd5>0x0?_0x2effd5:0x1;return _0x35257c['abandonmentRate'](_0x459ea6,_0x1531c4,_0x540cfb,_0x2effd5,_0x147344);})[_0x597f('0xa7')](function(_0xc1ed0a){return _0x47c594(_0xc1ed0a);})[_0x597f('0xa9')](function(_0x358017){return _0x19e227(msgResponse(_0x597f('0x1d7'),_0x597f('0x138'),JSON[_0x597f('0x12a')](_0x358017)));});}if(_0x19e854[_0x597f('0x1c6')]===_0x597f('0x1d2')){return _0x35257c['getVoiceQueueRtPauses'](_0x19e854['id'])[_0x597f('0xa7')](function(_0x3c85ca){var _0xb5b78c=_0x19e854[_0x597f('0x153')]-_0x3c85ca[0x0]['outboundQueuePauses'];var _0x22ffb1=_0x19e854[_0x597f('0x1c5')]*0x3c;var _0x545fbc=_0x32a4d6[0x0][_0x597f('0x60')]+_0x32a4d6[0x0][_0x597f('0x5f')];var _0x5dbc96=(_0x32a4d6[0x0][_0x597f('0x5e')]+_0x32a4d6[0x0][_0x597f('0x61')]+_0x32a4d6[0x0][_0x597f('0x75')])/_0x32a4d6[0x0][_0x597f('0x67')];var _0x5a8864=_0x19e854[_0x597f('0x1be')]/0x64;_0x19e854[_0x597f('0x66')]=_0x3c85ca[0x0][_0x597f('0x1d6')]||0x0;_0x19e854['predictiveIntervalHitRate']=_0x5dbc96>0x0?_0x5dbc96:0x1;return _0x35257c[_0x597f('0x1d3')](_0xb5b78c,_0x22ffb1,_0x545fbc,_0x5dbc96,_0x5a8864);})[_0x597f('0xa7')](function(_0x3c7ebf){return _0x47c594(_0x3c7ebf);})[_0x597f('0xa9')](function(_0x3f4bbf){return _0x19e227(msgResponse('[CatchErlangB]',_0x597f('0x138'),JSON[_0x597f('0x12a')](_0x3f4bbf)));});}}else{return _0x19e227(msgResponse(_0x597f('0x1d5'),'Failure',_0x597f('0x1d8')));}});};};Dialer[_0x597f('0x1c')][_0x597f('0x1cd')]=function(_0x4132ee){var _0x7fb30f=this;return function(){var _0x5aa929=0x0;var _0x556780=Math['floor'](_0x4132ee[_0x597f('0x1d9')]*0x3e8);if(_0x556780>0x0){_0x556780=_0x556780<0x64?0x64:_0x556780;loggerPredictive['info'](_0x4132ee[_0x597f('0x3a')],_0x597f('0x1da'),_0x556780,'milliseconds');_0x4132ee[_0x597f('0x81')]=setInterval(function(){_0x7fb30f[_0x597f('0x81')](_0x4132ee);loggerPredictiveCalls[_0x597f('0x71')](_0x597f('0x1db'),_0x5aa929+=0x1);},_0x556780);}else{loggerPredictive['info'](_0x4132ee[_0x597f('0x3a')],_0x597f('0x1dc'));}};};Dialer[_0x597f('0x1c')]['checkContactBlack']=function(_0x237c30,_0x480fb7){var _0x8cf356=this;return function(_0x39cdd8){if(_[_0x597f('0x84')](_0x39cdd8)){if(_['isNil'](_0x480fb7[_0x597f('0xc4')])||!_0x480fb7['recallme']){if(_0x237c30[_0x597f('0x1dd')]===_0x597f('0x9')){_0x237c30['queueStatusComplete']=_[_0x597f('0x36')](_0x237c30['queueStatusComplete'])?!![]:_0x237c30['queueStatusComplete'];var _0x35d451=uuid['v4']();_0x8cf356['actions'][_0x35d451]=new Action(_0x237c30,_0x480fb7,_0x35d451);loggerBooked[_0x597f('0x71')](_0x597f('0x1de'),_0x35d451,'queueStatusComplete:\x20',JSON[_0x597f('0x12a')](_0x237c30['queueStatusComplete']),_0x597f('0x1df'),_0x237c30[_0x597f('0x3a')]);if(_0x237c30['queueStatusComplete']){_0x237c30[_0x597f('0x120')]=![];_0x8cf356[_0x597f('0x29')][_0x8cf356[_0x597f('0x24')][_0x35d451][_0x597f('0xa3')]]=[];ami[_0x597f('0xa0')]({'actionid':_0x35d451,'action':_0x597f('0x1e0'),'queue':_0x237c30['name']})['catch'](function(){_0x8cf356[_0x597f('0xa4')](_0x237c30);_0x8cf356[_0x597f('0xb2')]({'active':![],'ContactId':_0x8cf356[_0x597f('0x24')][_0x35d451][_0x597f('0xea')],'ListId':_0x8cf356[_0x597f('0x24')][_0x35d451][_0x597f('0xc3')],'VoiceQueueId':_0x8cf356[_0x597f('0x24')][_0x35d451][_0x597f('0xc5')]||undefined,'CampaignId':_0x8cf356[_0x597f('0x24')][_0x35d451][_0x597f('0xf5')]||undefined})[_0x597f('0xa9')](loggerCatch('[unlockOriginate][syncQueueStatusComplete]'));delete _0x8cf356['actions'][_0x35d451];});}else{loggerBooked[_0x597f('0x71')](_0x597f('0x1e1'),JSON[_0x597f('0x12a')](_0x237c30[_0x597f('0x120')]),_0x597f('0x1df'),_0x237c30[_0x597f('0x3a')]);_0x8cf356[_0x597f('0xa4')](_0x237c30);_0x8cf356['rescheduleContact']({'active':![],'ContactId':_0x8cf356[_0x597f('0x24')][_0x35d451][_0x597f('0xea')],'ListId':_0x8cf356['actions'][_0x35d451][_0x597f('0xc3')],'VoiceQueueId':_0x8cf356[_0x597f('0x24')][_0x35d451]['VoiceQueueId']||undefined,'CampaignId':_0x8cf356['actions'][_0x35d451][_0x597f('0xf5')]||undefined})[_0x597f('0xa9')](loggerCatch('[unlockOriginate][syncQueueStatusComplete]'));delete _0x8cf356[_0x597f('0x24')][_0x35d451];}}else{return _0x8cf356['actionOriginate'](_0x237c30,_0x480fb7);}}else{if(getDiff(_0x480fb7[_0x597f('0x1e2')])<_0x237c30['dialRecallMeTimeout']*0x3c){if(_0x480fb7[_0x597f('0x1e3')]&&!_0x480fb7[_0x597f('0x1e3')][_0x597f('0x1e4')]){_0x8cf356['preview'][_0x597f('0x12c')](_0x480fb7['id'])[_0x597f('0x1f')](function(){_0x8cf356['updateOriginated'](_0x237c30);});}else{_0x8cf356[_0x597f('0xb4')]({'active':![]},_0x480fb7['id'],0x1)['finally'](function(){_0x8cf356[_0x597f('0xa4')](_0x237c30);});}}else{_0x237c30[_0x597f('0x5b')]+=0x1;_0x8cf356[_0x597f('0xa4')](_0x237c30);if(_0x237c30[_0x597f('0x1e5')]){_0x8cf356[_0x597f('0xb2')]({'active':![],'recallme':![],'UserId':null,'ContactId':_0x480fb7[_0x597f('0xea')],'ListId':_0x480fb7[_0x597f('0xc3')],'VoiceQueueId':_0x480fb7['VoiceQueueId']||undefined,'CampaignId':_0x480fb7[_0x597f('0xf5')]||undefined})['catch'](loggerCatch('[rescheduleContact][dialRecallInQueue]'));_0x8cf356[_0x597f('0xbc')](createObjHistory(_0x237c30,_0x480fb7,_0x597f('0x1e6'),0x17,_0x597f('0x1e7')))[_0x597f('0xa9')](loggerCatch('[Originate][HistoryDialRecallInQueue][historyCatch]'));}else{_0x8cf356[_0x597f('0xda')](createObjHistory(_0x237c30,_0x480fb7,'RECALLFAILEDTIMEOUT',0x16,_0x597f('0x1e8')),'[Originate][HistoryRecallClose][historyCatch]','[Originate][HistoryRecallClose]');}}}}else{_0x237c30[_0x597f('0x54')]+=0x1;_0x8cf356['saveInDb'](createObjHistory(_0x237c30,_0x480fb7,'BLACKLIST',0xd,_0x597f('0x1e9')),'[Originate][historyBlacklist]','[Originate][MoveBlacklist]');throw _0x597f('0x1ea');}};};Dialer['prototype'][_0x597f('0x152')]=function(_0x5ca184){var _0x5d74ec=this;var _0x1f5cca=_0x5ca184[_0x597f('0x1eb')]-_0x5ca184['originated']-_0x5ca184[_0x597f('0xb7')];emitCampaignSummary(_0x5ca184);if(_0x1f5cca>0x0){if(_0x1f5cca>this[_0x597f('0x22')]){_0x1f5cca=this[_0x597f('0x22')];}_0x5ca184[_0x597f('0xb7')]+=_0x1f5cca;this[_0x597f('0xb8')](_0x5ca184['id'],_0x1f5cca,_0x5ca184['dialOrderByScheduledAt'],_0x5ca184)['then'](function(_0x3ad0a8){_0x5ca184[_0x597f('0xb7')]-=_0x1f5cca;_0x5ca184[_0x597f('0xb7')]=_0x5ca184[_0x597f('0xb7')]>0x0?_0x5ca184[_0x597f('0xb7')]:0x0;if(!checkContactEmpty(_0x3ad0a8)){_0x5ca184['message']='AVAILABLE_CONTACTS_FINISHED';logger[_0x597f('0x71')](_0x597f('0x1ec')+_0x5ca184[_0x597f('0x3a')]);}else{_0x5ca184['originated']+=_0x3ad0a8[_0x597f('0x8a')];_0x5ca184[_0x597f('0x37')]=_0x597f('0x1ed');for(var _0x538fb1=0x0;_0x538fb1<_0x3ad0a8[_0x597f('0x8a')];_0x538fb1+=0x1){_0x5ca184[_0x597f('0x1ee')]+=0x1;if(_[_0x597f('0x9f')](_0x3ad0a8[_0x538fb1])||_[_0x597f('0x9f')](_0x3ad0a8[_0x538fb1][_0x597f('0x162')])||_[_0x597f('0x9f')](_0x3ad0a8[_0x538fb1][_0x597f('0x162')][_0x597f('0x163')])){_0x5d74ec[_0x597f('0xc1')](_0x597f('0x1ef'),_0x5ca184,_0x3ad0a8[_0x538fb1]);}else{_0x5d74ec['checkIsBlackListIvr'](_['pick'](_0x3ad0a8[_0x538fb1],['CampaignId','Contact.phone']))[_0x597f('0xa7')](_0x5d74ec['checkContactBlack'](_0x5ca184,_0x3ad0a8[_0x538fb1]))['catch'](_0x5d74ec['loggerHandler']('[actionOriginateIvr]\x20',_0x5ca184));}}}})['catch'](loggerGetContactDialer(_0x597f('0x1f0'),_0x5ca184,_0x1f5cca));}};Dialer[_0x597f('0x1c')][_0x597f('0x14f')]=function(_0xc5aaad,_0x120515){var _0x1fc677=this;var _0x49c188=[];var _0x43b09d=_0x120515>=0x1?_0x120515:0x1;if(_0xc5aaad[_0x597f('0x1dd')]===_0x597f('0x9')){_0x43b09d=0x1;}var _0x69e2b4=Math['floor'](_0xc5aaad[_0x597f('0x48')]*_0x43b09d)-_0xc5aaad[_0x597f('0x68')]-_0xc5aaad['temp'];emitVoiceQueueSummary(_0xc5aaad);if(_0xc5aaad[_0x597f('0x1f1')]>0x0){var _0x16b70d=_0xc5aaad[_0x597f('0x1f1')]-_0xc5aaad[_0x597f('0x68')]-_0xc5aaad[_0x597f('0x4b')]-_0xc5aaad['temp']-_0xc5aaad[_0x597f('0x91')];if(_0x69e2b4>_0x16b70d){_0x69e2b4=_0x16b70d;}}if(_0x69e2b4>0x0){if(_0xc5aaad[_0x597f('0x1dd')]===_0x597f('0x9')){_0x69e2b4=0x1;}if(_0x69e2b4>this[_0x597f('0x22')]){_0x69e2b4=this[_0x597f('0x22')];}_0xc5aaad['temp']+=_0x69e2b4;for(var _0x5abb5c in this[_0x597f('0x11c')]){if(typeof this[_0x597f('0x11c')][_0x5abb5c]!==_0x597f('0x9e')){if(this[_0x597f('0x11c')][_0x5abb5c][_0x597f('0xd3')]==='not_inuse'&&this[_0x597f('0x11c')][_0x5abb5c][_0x597f('0xc9')]==='reachable'){_0x49c188['push'](this['agents'][_0x5abb5c]['id']);}}}this[_0x597f('0xb6')](_0xc5aaad['id'],_0x49c188,_0x69e2b4,_0xc5aaad[_0x597f('0x1f2')],_0xc5aaad)['then'](function(_0x569a4e){_0xc5aaad[_0x597f('0xb7')]-=_0x69e2b4;_0xc5aaad['temp']=_0xc5aaad[_0x597f('0xb7')]>0x0?_0xc5aaad['temp']:0x0;if(!checkContactEmpty(_0x569a4e)){_0x1fc677['countReScheduled'](_0xc5aaad)[_0x597f('0xa7')](sendMessageReschedule(_0xc5aaad))[_0x597f('0xa9')](loggerCatch(_0x597f('0xaa')));}else{_0xc5aaad['originated']+=_0x569a4e[_0x597f('0x8a')];_0xc5aaad[_0x597f('0x37')]=_0xc5aaad[_0x597f('0x1dd')]==='booked'?'ACTIVE':_0x597f('0x1ed');for(var _0x418ba5=0x0;_0x418ba5<_0x569a4e[_0x597f('0x8a')];_0x418ba5+=0x1){if(_['isNil'](_0x569a4e[_0x418ba5])||_[_0x597f('0x9f')](_0x569a4e[_0x418ba5][_0x597f('0x162')])||_['isNil'](_0x569a4e[_0x418ba5][_0x597f('0x162')]['phone'])){_0x1fc677[_0x597f('0xc1')](_0x597f('0x1ef'),_0xc5aaad,_0x569a4e[_0x418ba5]);}else{_0x1fc677[_0x597f('0xab')](_[_0x597f('0xc2')](_0x569a4e[_0x418ba5],[_0x597f('0xc5'),_0x597f('0x1f3')]))[_0x597f('0xa7')](_0x1fc677[_0x597f('0x1f4')](_0xc5aaad,_0x569a4e[_0x418ba5]))[_0x597f('0xa9')](_0x1fc677['loggerHandler'](_0x597f('0x1ef'),_0xc5aaad));}}}})[_0x597f('0xa9')](loggerGetContactDialer('[getContactDialer2]',_0xc5aaad,_0x69e2b4));}};Dialer[_0x597f('0x1c')]['handlePredictive']=function(_0x3e3499){if(_0x3e3499[_0x597f('0x1f1')]>0x0){var _0xb5bbe7=_0x3e3499[_0x597f('0x1f1')]-_0x3e3499['originated']-_0x3e3499['talking'];if(_0xb5bbe7>0x0){this[_0x597f('0x1f5')](_0x3e3499);}else{loggerPredictiveCalls[_0x597f('0x71')](_0x597f('0x1f6'));}}else{this[_0x597f('0x1f5')](_0x3e3499);}};Dialer[_0x597f('0x1c')]['tryOriginatePredictive']=function(_0x2e19fb){var _0x5ec190=this;var _0x576da2=[];_0x2e19fb[_0x597f('0x68')]+=0x1;for(var _0x53993c in this[_0x597f('0x11c')]){if(typeof this[_0x597f('0x11c')][_0x53993c]!=='undefined'){if(this[_0x597f('0x11c')][_0x53993c]['state']==='not_inuse'&&this[_0x597f('0x11c')][_0x53993c][_0x597f('0xc9')]===_0x597f('0xca')){_0x576da2[_0x597f('0x13e')](this[_0x597f('0x11c')][_0x53993c]['id']);}}}this[_0x597f('0xb6')](_0x2e19fb['id'],_0x576da2,0x1,_0x2e19fb[_0x597f('0x1f2')],_0x2e19fb)[_0x597f('0xa7')](function(_0x25692c){if(!checkContactEmpty(_0x25692c)){checkContactLowerLimitOriginate(_0x2e19fb,0x1,0x0);_0x5ec190[_0x597f('0xa8')](_0x2e19fb)[_0x597f('0xa7')](sendMessageReschedule(_0x2e19fb))[_0x597f('0xa9')](loggerCatch(_0x597f('0xaa')));}else{_0x2e19fb[_0x597f('0x37')]=_0x597f('0x1ed');if(_[_0x597f('0x9f')](_0x25692c[0x0])||_[_0x597f('0x9f')](_0x25692c[0x0]['Contact'])||_[_0x597f('0x9f')](_0x25692c[0x0]['Contact'][_0x597f('0x163')])){_0x5ec190[_0x597f('0xc1')](_0x597f('0x1ef'),_0x2e19fb,_0x25692c[0x0]);}else{_0x5ec190[_0x597f('0xab')](_[_0x597f('0xc2')](_0x25692c[0x0],['VoiceQueueId',_0x597f('0x1f3')]))['then'](_0x5ec190[_0x597f('0x1f4')](_0x2e19fb,_0x25692c[0x0]))['catch'](_0x5ec190['loggerHandler'](_0x597f('0x1f7'),_0x2e19fb));}}})[_0x597f('0xa9')](loggerGetContactDialer(_0x597f('0x1f8'),_0x2e19fb,0x1));emitVoiceQueueSummary(_0x2e19fb);};Dialer[_0x597f('0x1c')]['abandonmentRate']=function(_0x397e0d,_0xd0908b,_0x2923cc,_0x38a0e9,_0x1412e1,_0x26d7b7){loggerPredictive[_0x597f('0x71')](_0x597f('0x1f9'));loggerPredictive[_0x597f('0x71')]('M:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x397e0d);loggerPredictive['info'](_0x597f('0x1fa'),_0xd0908b);loggerPredictive[_0x597f('0x71')](_0x597f('0x1fb'),_0x2923cc);loggerPredictive[_0x597f('0x71')](_0x597f('0x1fc'),_0x38a0e9);loggerPredictive[_0x597f('0x71')]('Amax:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x1412e1);loggerPredictive[_0x597f('0x71')](_0x597f('0x7d'));return new BPromise(function(_0x32a487,_0x36edf7){if(_0x397e0d<=0x0||isNaN(_0x397e0d)){return _0x36edf7(msgResponse('[abandonmentRate]',_0x597f('0x40'),_0x597f('0x1fd')+_0x397e0d));}if(_0x2923cc<=0x0||isNaN(_0x2923cc)){return _0x36edf7(msgResponse('[abandonmentRate]',_0x597f('0x40'),_0x597f('0x1fe')+_0x2923cc));}if(_0x38a0e9<=0x0||isNaN(_0x38a0e9)){return _0x36edf7(msgResponse(_0x597f('0x1ff'),_0x597f('0x40'),_0x597f('0x200')+_0x38a0e9));}if(_0xd0908b<=0x0||isNaN(_0xd0908b)){return _0x36edf7(msgResponse(_0x597f('0x1ff'),'Error',_0x597f('0x201')+_0xd0908b));}if(_0x1412e1<=0x0||isNaN(_0x1412e1)){return _0x36edf7(msgResponse(_0x597f('0x1ff'),_0x597f('0x40'),_0x597f('0x202')+_0x1412e1));}_0x26d7b7=_0x26d7b7||0x0;var _0x1ec058=0x1/_0x2923cc;var _0xbb26dd=0x0;var _0x1d5f6e=0x0;var _0x2c08d2=0x0;var _0x5337b2=0x0;for(var _0x1c5d3b=0x0;_0x2c08d2<_0x1412e1;_0x1c5d3b+=0x1){_0x1d5f6e=_0x1c5d3b/_0xd0908b;_0xbb26dd=(_0x38a0e9*_0x1d5f6e+_0x26d7b7)/_0x1ec058;_0x2c08d2=erlangb(_0xbb26dd,_0x397e0d);_0x5337b2=_0xbb26dd/_0x397e0d*(0x1-erlangb(_0xbb26dd,_0x397e0d));}return _0x32a487({'erlangCalls':_0x1c5d3b,'erlangCallToSecond':_0xd0908b/_0x1c5d3b,'erlangAbandonmentRate':_0x2c08d2,'erlangBusyFactor':_0x5337b2});});};Dialer['prototype'][_0x597f('0x1d3')]=function(_0x3c21d3,_0x3a95aa,_0x554515,_0x42ef94,_0x4abb99,_0x306245){loggerPredictive['info'](_0x597f('0x203'));loggerPredictive[_0x597f('0x71')](_0x597f('0x204'),_0x3c21d3);loggerPredictive[_0x597f('0x71')](_0x597f('0x1fa'),_0x3a95aa);loggerPredictive[_0x597f('0x71')](_0x597f('0x1fb'),_0x554515);loggerPredictive[_0x597f('0x71')](_0x597f('0x1fc'),_0x42ef94);loggerPredictive[_0x597f('0x71')]('Umin:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x4abb99);loggerPredictive[_0x597f('0x71')](_0x597f('0x7d'));return new BPromise(function(_0x6accbd,_0x2e8f82){if(_0x3c21d3<=0x0||isNaN(_0x3c21d3)){return _0x2e8f82(msgResponse(_0x597f('0x205'),_0x597f('0x40'),_0x597f('0x1fd')+_0x3c21d3));}if(_0x554515<=0x0||isNaN(_0x554515)){return _0x2e8f82(msgResponse('[busyFactor]','Error',_0x597f('0x1fe')+_0x554515));}if(_0x42ef94<=0x0||isNaN(_0x42ef94)){return _0x2e8f82(msgResponse('[busyFactor]',_0x597f('0x40'),_0x597f('0x200')+_0x42ef94));}if(_0x3a95aa<=0x0||isNaN(_0x3a95aa)){return _0x2e8f82(msgResponse(_0x597f('0x205'),_0x597f('0x40'),_0x597f('0x201')+_0x3a95aa));}if(_0x4abb99<=0x0||isNaN(_0x4abb99)){return _0x2e8f82(msgResponse(_0x597f('0x205'),_0x597f('0x40'),_0x597f('0x206')+_0x4abb99));}_0x306245=_0x306245||0x0;var _0xf9f6e0=0x1/_0x554515;var _0x14363b=0x0;var _0x14b3d7=0x0;var _0x5e30b2=0x0;var _0x48ff43=0x0;for(var _0x265d70=0x0;_0x48ff43<_0x4abb99;_0x265d70+=0x1){_0x14b3d7=_0x265d70/_0x3a95aa;_0x14363b=(_0x42ef94*_0x14b3d7+_0x306245)/_0xf9f6e0;_0x5e30b2=erlangb(_0x14363b,_0x3c21d3);_0x48ff43=_0x14363b/_0x3c21d3*(0x1-erlangb(_0x14363b,_0x3c21d3));}return _0x6accbd({'erlangCalls':_0x265d70,'erlangCallToSecond':_0x3a95aa/_0x265d70,'erlangAbandonmentRate':_0x5e30b2,'erlangBusyFactor':_0x48ff43});});};module[_0x597f('0x207')]=Dialer; \ No newline at end of file +var _0x2060=['loggedInDb','dialMethod','dialOriginateCallerIdName','dialOriginateTimeout','dialPrefix','outboundAnswerAgiCallsDay','outboundAnswerCallsDay','outboundBlacklistCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundDropCallsDayACS','outboundDropCallsDayCallersExit','outboundDropCallsDayTimeout','outboundNoSuchCallsDay','outboundOriginateFailureCallsDay','outboundReCallsDay','outboundRejectCallsDay','outboundUnknownCallsDay','predictiveIntervalAnsweredCalls','predictiveIntervalAvgTalktime','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalDroppedCallsTimeout','predictiveIntervalErlangCalls','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalHitRate','predictiveIntervalTotalCalls','originated','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','Trunk','active','callerid','format','voice:queue:%s','voice_queue:save','ivr','campaign:save','info','-----\x20Stats\x20Predictive\x20---','Answered\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','AVG\x20Hold\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalAvgHoldtime','AVG\x20Talk\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','---------------------------','Avg\x20Hold\x20Time\x20is\x20not\x20enough\x20for\x20predictive','Total\x20Calls\x20are\x20not\x20enough\x20for\x20predictive','---------\x20ErlangB\x20---------','Scheduled\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','One\x20call\x20every:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','merge','clearing\x20variable\x20start\x20predictive','handlePredictive','clearing\x20variable\x20handle\x20predictive','preview','string','\x22%s\x22\x20<%s>','error','inspect','stack','length','[decremetOriginate]\x20object\x20originated\x20is\x20negative','contactsRescheduled','RESCHEDULED_CONTACTS','[getContactDialer2][ReScheduled]','contacts','AVAILABLE_CONTACTS_FINISHED','[getContactDialer2][Empty]','sendMessageOneNotActive','[syncQueueSummary]\x20Campaign\x20Queue:\x20','is\x20not\x20active','IS_DISACTIVED','is\x20disactive','[syncQueueSummary]\x20Campaign\x20Ivr:\x20','state','statedesc','endtime','starttime','loopClearZombieChannels','[uniqueid]','clearZombieChannels','undefined','enqueue','isNil','Action','channel','catch','No\x20such\x20channel','updateOriginated','queue','campaigns','countReScheduled','resolve','then','checkIsBlackList','[checkIsBlackList]\x20','checkIsBlackListIvr','[checkIsBlackListIvr]\x20','averageHandleTime','avgHandleTime','[averageHandleTime]\x20','rescheduleContact','[rescheduleContact]\x20','[unlockContact]\x20','getContactDialer','temp','getContactDialerIvr','[getContactDialerIvr]\x20','getVoiceQueueRtPauses','[getVoiceQueueRtPauses]\x20','moveContactManagedDialer','[moveContactManagedDialer]\x20','createHistory','[createHistory]\x20','[updateOriginated]\x20is\x20null\x20or\x20undefined','notFound','saveInDb','pick','ContactId','ListId','CampaignId','[emptyContact][createHistory]','isSuccess','Success','isTrunkReachable','status','reachable','SIP/%s','variable','exten','xcally-motion-dialer','HANGUP','uniqueid','HangupInAMD','membername','AMD','amd','[syncHangupInAMD][createHistory]','[syncHangupInAMD]','dialAMDActive','value','MACHINE','Machine','countmachineretry','countglobal','custom:amd','buildObj','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','countdropretry','countagentrejectretry','dialGlobalMaxRetry','reason19\x20machine....','dialMachineMaxRetry','createStateFinal','reason\x2019\x20machine....','add','minutes','YYYY-MM-DD\x20HH:mm:ss','VoiceQueueId','[rescheduleContact][Machine]','[syncHangupInAMDIvr][createHistory]','[syncHangupInAMDIvr]','[syncAgentComplete][createHistory][0]','countabandonedretry','stateGlobal','dialMachineRetryFrequency','[syncHangupIvr][createHistory]','dialQueueProject','AnswerAGI','AGI','cause-txt','Unknow','syncAgentComplete','reason','agent','agiafterat','dialQueueProject2','dialAgiAfterHangupAgent','[syncAgentComplete][createHistory]','[syncAgentComplete]','answertime','queueCallerAbandonCreateState','[syncQueueCallerAbandon]\x20[Drop]','droptime','responsetime','dialQueueTimeout','Drop','dropreason','TIMEOUT','dialDropMaxRetry','calleridname','calleridnum','[syncAgentComplete][createHistory][10]','Abandoned','CALLEREXIT','dialAbandonedMaxRetry','dialAbandonedRetryFrequency','[rescheduleContact][Abandoned]','[syncAgentComplete][createHistory][11]','actionid','locked','paused','stateinterface','push','queueStatusComplete','[unlockQueueStatus][undefined]','[booked][unlockQueueStatus]','idHopper','[Catch][Preview][syncQueueStatusComplete]','[unlock][syncQueueStatusComplete]','queueBookedRR','_rr','unlockRR','[booked][RR]','Agent:\x20','run','[booked][RR][finaly]','contactAgent-idHopper:\x20','[booked][unlock]','[booked][unlock2]','[unlock2][syncQueueStatusComplete]','[booked][unlock3]','[unlock3][syncQueueStatusComplete]','syncCampaigns','TRUNK_IS_NOT_REACHABLE','\x20trunk\x20is\x20not\x20reachable','checkIfTime','checkIfTimeIntervals','ifTime','Failure','\x20Intervals\x20is\x20null\x20','INTERVAL_IS_EMPTY','\x20Intervals\x20is\x20empty\x20','timezones','\x20Timezone\x20unknow\x20','command','interval','indexOf','true','iftime\x20%s,%s','content','some','INTERVAL_IS_OVERTIME','[ifTime][promiseAll]','Global:\x20','Timezone:\x20','checkDialMethod','progressive','handlePower','power','dialPowerLevel','predictive','Queue','method\x20not\x20recognized','launchHandleIvr','handleIvr','dialActive','dialGlobalInterval','dialTimezone','[syncQueueSummary]','checkIsTrunkReachable','\x5cw{0,','pow','random','match','actionOriginate','object','originate','voiceQueue\x20is\x20undefine','Contact','phone','contact\x20is\x20undefine','getCaller','\x22agi://%s/square,%s\x22','NONE','\x22%s,%s%s,,,%s\x22','dialQueueOptions','XMD-AMDINITIALSILENCE','dialAMDInitialSilence','XMD-AMDGREETING','dialAMDGreeting','XMD-AMDAFTERGREETINGSILENCE','dialAMDAfterGreetingSilence','XMD-AMDTOTALANALYSISTIME','XMD-AMDMINWORDLENGTH','dialAMDMinWordLength','XMD-AMDBETWEENWORDSSILENCE','dialAMDMaximumNumberOfWords','XMD-AMDSILENCETHRESHOLD','dialAMDSilenceThreshold','XMD-AMDMAXIMUMWORDLENGTH','XMD-VOICEQUEUEID','tags','createdAt','updatedAt','%s%s','toUpper','dialRandomLastDigitCallerIdNumber','dialOriginateCallerIdNumber','TrunkBackup','XMD-ORIGINATECALLERIDNAME','originatecalleridname','XMD-ORIGINATECALLERIDNUM','originatecalleridnum','SIP/%s/%s%s','dialCutDigit','substring','trim','from-sip','[originateError]:\x20%s','[originate][error]','Error','originate\x20action\x20Error','getQueue','response','[callProgressDetecting]\x20','checkRetriveMax','dialNoAnswerRetryFrequency','[rescheduleContact][NoAnswer]','dialBusyRetryFrequency','[rescheduleContact]\x20[Busy]','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialNoSuchNumberMaxRetry','[rescheduleContact][NoSuchNumber]','dialDropRetryFrequency','[rescheduleContact][Drop]','dialAgentRejectMaxRetry','[rescheduleContact][AgentReject]','[callProgressDetecting]','custom:agentnosuchnumber','nosuchnumber','reason\x200\x20no\x20such\x20number....','NoAnswer','[syncAgentComplete][createHistory][3]','reason\x203\x20ringing\x20no\x20answer','Busy','[syncAgentComplete][createHistory][5]','dialBusyMaxRetry','reason\x205\x20busy','Congestion','custom:agentcongestion','congestion','[syncAgentComplete][createHistory][8]','reason\x208\x20congestion','outboundAbandonedCallsDay','reason\x2011\x20abandoned','AgentReject','custom:agentreject','agentreject','reason\x2020\x20agentreject','[syncAgentComplete][createHistory][?]','Global','contact\x20not\x20moved','round','predictiveIntervalAvailable','predictiveIntervalMaxThreshold','predictiveIntervalMinThreshold','check\x20predictive\x20is\x20not\x20undefine','check\x20handlePredictive\x20is\x20not\x20undefine','[startMethodPredictive][StartProgressive][Loop]','[stopMethodPredictive][ReStartProgressive][ExceededDropDay]','Dropped\x20calls\x20day','dialPredictiveOptimization','dropRate','[stopMethodPredictive][ReStartProgressive][ExceededDropInterval]','Drop\x20in\x20this\x20interval','started\x20in\x20predictive\x20at','dialPredictiveInterval','getDataPredictive','startMethodPredictive','Predictive\x20for\x20every\x20interval','switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',')\x20are\x20less\x20than\x20threshold\x20(',')\x20are\x20more\x20than\x20threshold\x20(','dialPredictiveOptimizationPercentage','abandonmentRate','agentBusyFactor','Unknown\x20Predictive','check\x20failure','getDataPredictiveOld','outboundQueuePauses','[CatchErlangB]','predictiveIntervalPauses','busyFactor','floor','one\x20call\x20every:','recallme','[booked][checkContactBlack]','queueStatusComplete:\x20','Queue:\x20','queuestatus','[unlockOriginate][syncQueueStatusComplete]','[booked][checkContactBlack][else]','scheduledat','dialRecallMeTimeout','Agent','voicePause','unlockContact','dialRecallInQueue','[rescheduleContact][dialRecallInQueue]','RecallInQueue','[Originate][HistoryDialRecallInQueue][historyCatch]','[Originate][HistoryRecallClose][historyCatch]','[Originate][HistoryRecallClose]','BLACKLIST','Blacklist','[Originate][historyBlacklist]','[Originate][MoveBlacklist]','inBlackList','limitCalls','[getContactCampaign2][Empty]','RUNNING','ivrTotalCallsDays','emptyContact','[actionOriginate]\x20','loggerHandler','[actionOriginateIvr]\x20','[getContactCampaign2]','dialLimitQueue','not_inuse','dialOrderByScheduledAt','Contact.phone','[getContactDialer2]','tryOriginatePredictive','[handlePredictive][limitChannel]','[countReScheduled]\x20','--------\x20Drop\x20Rate\x20--------','M:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','P:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Amax:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','m\x20=\x20','[abandonmentRate]','Ts\x20=\x20','p\x20=\x20','interval\x20=\x20','Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Ts:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Umin:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','[busyFactor]','Umin\x20=\x20','util','bluebird','uuid','moment','md5','../preview/util/util','../../../config/environment/','dialer','booked','../../../config/logger','syncQueueSummary','../ami','redis','defaults','localhost','socket.io-emitter','../rpc/cmHopper','../rpc/cmHopperHistory','../rpc/cmHopperBlack','./history','./final','./queueCallerAbandon','./hangup','env','127.0.0.1','rrmemory','roundrobin','prototype','tail','finally','sequence','voiceQueues','agents','trunks','maxNumberOriginate','channels','actions','contactsId','uniqueId','optionPredictive','startPredictive','startProgressive','queueBooked','syncAgentConnect','queuecallerabandon','syncQueueCallerAbandon','bind','syncOriginateResponse','agentcomplete','custom:queuesummary','hangup','syncHangup','newexten','syncNewExten','varset','syncVarSet','syncQueueMember','queuestatuscomplete','loopCampaigns','isUndefined','message','AGENTS_NOT_LOGGED','name','\x20AGENTS\x20NOT\x20LOGGED','NOT_ACTIVE','\x20NOT\x20Active','INTERVAL_IS_NULL','\x20INTERVAL_IS_NULL','Interval','Intervals','isEmpty','[ifTime][Action]','stringify','milliseconds','diff','seconds','emit','outbound','strategy','answered','available','loggedIn','pTalking','sumDuration','talking','type','unmanaged','abandoned','waiting'];(function(_0x5783fd,_0x35bbb1){var _0x396d46=function(_0x29b603){while(--_0x29b603){_0x5783fd['push'](_0x5783fd['shift']());}};_0x396d46(++_0x35bbb1);}(_0x2060,0x1be));var _0x0206=function(_0x52dc89,_0x5a7272){_0x52dc89=_0x52dc89-0x0;var _0x230a61=_0x2060[_0x52dc89];return _0x230a61;};'use strict';var util=require(_0x0206('0x0'));var _=require('lodash');var BPromise=require(_0x0206('0x1'));var uuid=require(_0x0206('0x2'));var moment=require(_0x0206('0x3'));var rr=require('rr');var md5=require(_0x0206('0x4'));var Redis=require('ioredis');var ut=require(_0x0206('0x5'));var config=require(_0x0206('0x6'));var logger=require('../../../config/logger')(_0x0206('0x7'));var loggerBooked=require('../../../config/logger')(_0x0206('0x8'));var loggerPredictive=require(_0x0206('0x9'))('predictive');var loggerPredictiveCalls=require(_0x0206('0x9'))('predictiveCalls');var loggerSyncQueueSummary=require('../../../config/logger')(_0x0206('0xa'));var ami=require(_0x0206('0xb'));config[_0x0206('0xc')]=_[_0x0206('0xd')](config[_0x0206('0xc')],{'host':_0x0206('0xe'),'port':0x18eb});var io=require(_0x0206('0xf'))(new Redis(config[_0x0206('0xc')]));var cmHopper=require(_0x0206('0x10'));var cmHopperHistory=require(_0x0206('0x11'));var cmHopperBlack=require(_0x0206('0x12'));var voiceQueueRt=require('../rpc/voiceQueueRt');var Action=require('./action');var History=require(_0x0206('0x13'));var Final=require(_0x0206('0x14'));var AgentComplete=require('./agentComplete');var QueueCallerAbandon=require(_0x0206('0x15'));var Hangup=require(_0x0206('0x16'));var ipAgi=process[_0x0206('0x17')]['XCALLY_IP_AGI']||_0x0206('0x18');var strategy={'rrmemory':_0x0206('0x19'),'roundrobin':_0x0206('0x1a')};var Sequence=function(){};Sequence[_0x0206('0x1b')]['enqueue']=function(_0x251c08){this['tail']=this[_0x0206('0x1c')]?this[_0x0206('0x1c')][_0x0206('0x1d')](_0x251c08):_0x251c08();};function Dialer(_0x11bc7f,_0x1c1771){this[_0x0206('0x1e')]=new Sequence();this['preview']=_0x1c1771;this['voiceQueues']=_0x11bc7f[_0x0206('0x1f')];this['campaigns']=_0x11bc7f['campaigns'];this[_0x0206('0x20')]=_0x11bc7f[_0x0206('0x20')];this[_0x0206('0x21')]=_0x11bc7f[_0x0206('0x21')];this['maxNumberOriginate']=config[_0x0206('0x22')]||0x2;this[_0x0206('0x23')]={};this[_0x0206('0x24')]={};this[_0x0206('0x25')]={};this[_0x0206('0x26')]={};this[_0x0206('0x27')]={};this[_0x0206('0x28')]={};this[_0x0206('0x29')]={};this['ivrOriginated']={};this[_0x0206('0x2a')]={};this['queueBookedRR']={};ami['on']('agentconnect',this[_0x0206('0x2b')]['bind'](this));ami['on'](_0x0206('0x2c'),this[_0x0206('0x2d')][_0x0206('0x2e')](this));ami['on']('originateresponse',this[_0x0206('0x2f')][_0x0206('0x2e')](this));ami['on'](_0x0206('0x30'),this['syncAgentComplete']['bind'](this));ami['on'](_0x0206('0x31'),this[_0x0206('0xa')]['bind'](this));ami['on'](_0x0206('0x32'),this[_0x0206('0x33')][_0x0206('0x2e')](this));ami['on'](_0x0206('0x34'),this[_0x0206('0x35')]['bind'](this));ami['on'](_0x0206('0x36'),this[_0x0206('0x37')][_0x0206('0x2e')](this));ami['on']('queuemember',this[_0x0206('0x38')][_0x0206('0x2e')](this));ami['on'](_0x0206('0x39'),this['syncQueueStatusComplete'][_0x0206('0x2e')](this));this[_0x0206('0x3a')]();this['loopClearZombieChannels']();}function isNotNull(_0x1e14de){return _0x1e14de!==null&&!_[_0x0206('0x3b')](_0x1e14de);}function checkIsLoggedIn(_0x3e1e35,_0x497a24){return function(){if(_0x497a24<=0x0){_0x3e1e35[_0x0206('0x3c')]=_0x0206('0x3d');throw _0x3e1e35[_0x0206('0x3e')]+_0x0206('0x3f');}};}function isActive(_0x3cf73c){return _0x3cf73c;}function checkIsActive(_0x2cf6c4,_0x1b51ba){return function(){if(!isActive(_0x1b51ba)){_0x2cf6c4[_0x0206('0x3c')]=_0x0206('0x40');throw _0x2cf6c4[_0x0206('0x3e')]+_0x0206('0x41');}};}function checkInterval(_0x5187ac){return function(){if(!isNotNull(_0x5187ac['Interval'])){_0x5187ac[_0x0206('0x3c')]=_0x0206('0x42');throw _0x5187ac[_0x0206('0x3e')]+_0x0206('0x43');}if(!isNotNull(_0x5187ac[_0x0206('0x44')][_0x0206('0x45')])){_0x5187ac[_0x0206('0x3c')]='INTERVAL_IS_NULL';throw _0x5187ac[_0x0206('0x3e')]+_0x0206('0x43');}if(!isNotNull(_[_0x0206('0x46')](_0x5187ac[_0x0206('0x44')][_0x0206('0x45')]))){_0x5187ac['message']=_0x0206('0x42');throw _0x5187ac[_0x0206('0x3e')]+_0x0206('0x43');}};}function msgResponse(_0x4c660d,_0x120118,_0x481c80){return{'action':_0x4c660d,'response':_0x120118,'message':_0x481c80,'stack':_0x481c80};}function myreject(_0x137d80){return function(_0x28ed68){return _0x137d80(msgResponse(_0x0206('0x47'),'Error',JSON[_0x0206('0x48')](_0x28ed68)));};}function getSeconds(_0x3df80d,_0x5b2641){var _0x4e2c57=moment(_0x3df80d)[_0x0206('0x49')](0x0);var _0x472fa9=moment(_0x5b2641)[_0x0206('0x49')](0x0);return _0x4e2c57[_0x0206('0x4a')](_0x472fa9,_0x0206('0x4b'));}function emit(_0x11ec0d,_0x4faa92,_0x21ea60){io['to'](_0x11ec0d)[_0x0206('0x4c')](_0x4faa92,_0x21ea60);}function emitVoiceQueueSummary(_0x5793f6){if(_0x5793f6['type']===_0x0206('0x4d')){var _0x28c8dc={'id':_0x5793f6['id'],'name':_0x5793f6[_0x0206('0x3e')],'strategy':_0x5793f6[_0x0206('0x4e')],'answered':_0x5793f6[_0x0206('0x4f')],'available':_0x5793f6[_0x0206('0x50')],'loggedIn':_0x5793f6[_0x0206('0x51')],'pTalking':_0x5793f6[_0x0206('0x52')],'sumBillable':_0x5793f6['sumBillable'],'sumDuration':_0x5793f6[_0x0206('0x53')],'sumHoldTime':_0x5793f6['sumHoldTime']||0x0,'talking':_0x5793f6[_0x0206('0x54')],'total':_0x5793f6['total'],'type':_0x5793f6[_0x0206('0x55')],'unmanaged':_0x5793f6[_0x0206('0x56')],'abandoned':_0x5793f6[_0x0206('0x57')],'waiting':_0x5793f6[_0x0206('0x58')],'loggedInDb':_0x5793f6[_0x0206('0x59')],'dialActive':_0x5793f6['dialActive'],'dialMethod':_0x5793f6[_0x0206('0x5a')],'dialOriginateCallerIdName':_0x5793f6[_0x0206('0x5b')],'dialOriginateCallerIdNumber':_0x5793f6['dialOriginateCallerIdNumber'],'dialOriginateTimeout':_0x5793f6[_0x0206('0x5c')],'dialPrefix':_0x5793f6[_0x0206('0x5d')],'outboundAnswerAgiCallsDay':_0x5793f6[_0x0206('0x5e')],'outboundAnswerCallsDay':_0x5793f6[_0x0206('0x5f')],'outboundBlacklistCallsDay':_0x5793f6[_0x0206('0x60')],'outboundBusyCallsDay':_0x5793f6[_0x0206('0x61')],'outboundCongestionCallsDay':_0x5793f6[_0x0206('0x62')],'outboundDropCallsDayACS':_0x5793f6[_0x0206('0x63')],'outboundDropCallsDayCallersExit':_0x5793f6[_0x0206('0x64')],'outboundDropCallsDayTimeout':_0x5793f6[_0x0206('0x65')],'outboundNoAnswerCallsDay':_0x5793f6['outboundNoAnswerCallsDay'],'outboundNoSuchCallsDay':_0x5793f6[_0x0206('0x66')],'outboundOriginateFailureCallsDay':_0x5793f6[_0x0206('0x67')],'outboundReCallsDay':_0x5793f6[_0x0206('0x68')],'outboundRejectCallsDay':_0x5793f6[_0x0206('0x69')],'outboundUnknownCallsDay':_0x5793f6[_0x0206('0x6a')],'predictiveIntervalAnsweredCalls':_0x5793f6[_0x0206('0x6b')],'predictiveIntervalAvgHoldtime':_0x5793f6['predictiveIntervalAvgHoldtime'],'predictiveIntervalAvgTalktime':_0x5793f6[_0x0206('0x6c')],'predictiveIntervalDroppedCallsCallersExit':_0x5793f6[_0x0206('0x6d')],'predictiveIntervalDroppedCallsTimeout':_0x5793f6[_0x0206('0x6e')],'predictiveIntervalErlangCalls':_0x5793f6[_0x0206('0x6f')],'predictiveIntervalErlangCallsDroppedCalls':_0x5793f6[_0x0206('0x70')],'predictiveIntervalHitRate':_0x5793f6[_0x0206('0x71')],'predictiveIntervalMultiplicativeFactor':_0x5793f6['predictiveIntervalMultiplicativeFactor'],'predictiveIntervalPauses':_0x5793f6['predictiveIntervalPauses'],'predictiveIntervalAvailable':_0x5793f6['predictiveIntervalAvailable'],'predictiveIntervalTotalCalls':_0x5793f6[_0x0206('0x72')],'message':_0x5793f6[_0x0206('0x3c')],'originated':_0x5793f6[_0x0206('0x73')],'erlangCalls':_0x5793f6[_0x0206('0x74')],'erlangCallToSecond':_0x5793f6[_0x0206('0x75')],'erlangAbandonmentRate':_0x5793f6[_0x0206('0x76')],'erlangBusyFactor':_0x5793f6[_0x0206('0x77')],'startPredictive':_0x5793f6[_0x0206('0x28')],'startProgressive':_0x5793f6[_0x0206('0x29')]};if(_0x5793f6[_0x0206('0x78')]){_0x28c8dc[_0x0206('0x78')]={'id':_0x5793f6['Trunk']['id'],'name':_0x5793f6[_0x0206('0x78')][_0x0206('0x3e')],'active':_0x5793f6['Trunk'][_0x0206('0x79')],'callerid':_0x5793f6[_0x0206('0x78')][_0x0206('0x7a')]};}if(_0x5793f6['Interval']){_0x28c8dc['Interval']={'id':_0x5793f6[_0x0206('0x44')]['id'],'name':_0x5793f6[_0x0206('0x44')][_0x0206('0x3e')]};}var _0x3c308f=md5(JSON['stringify'](_0x28c8dc));if(_0x5793f6[_0x0206('0x4')]!==_0x3c308f){_0x5793f6[_0x0206('0x4')]=_0x3c308f;emit(util[_0x0206('0x7b')](_0x0206('0x7c'),_0x28c8dc[_0x0206('0x3e')]),_0x0206('0x7d'),_0x28c8dc);}}}function emitCampaignSummary(_0xbe6131){if(_0xbe6131[_0x0206('0x55')]===_0x0206('0x7e')){emit(util[_0x0206('0x7b')]('campaign:ivr:%s',_0xbe6131[_0x0206('0x3e')]),_0x0206('0x7f'),_0xbe6131);}}function checkGetDataPredictive(_0x272996){if(isNotNull(_0x272996)&&!_[_0x0206('0x46')](_0x272996)){loggerPredictive[_0x0206('0x80')](_0x0206('0x81'));loggerPredictive[_0x0206('0x80')]('Total\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x272996['predictiveIntervalTotalCalls']);loggerPredictive['info'](_0x0206('0x82'),_0x272996[_0x0206('0x6b')]);loggerPredictive[_0x0206('0x80')]('Dropped\x20Timeout:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x272996['predictiveIntervalDroppedCallsTimeout']);loggerPredictive[_0x0206('0x80')]('Dropped\x20Exit:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x272996[_0x0206('0x6d')]);loggerPredictive[_0x0206('0x80')](_0x0206('0x83'),_0x272996[_0x0206('0x84')]);loggerPredictive[_0x0206('0x80')](_0x0206('0x85'),_0x272996['predictiveIntervalAvgTalktime']);loggerPredictive[_0x0206('0x80')](_0x0206('0x86'));if(_0x272996['predictiveIntervalTotalCalls']>0x0){if(!_[_0x0206('0x3b')](_0x272996[_0x0206('0x6c')])&&_0x272996[_0x0206('0x6c')]>0x0){return!![];}loggerPredictive[_0x0206('0x80')]('Avg\x20Talk\x20Time\x20is\x20not\x20enough\x20for\x20predictive');if(!_[_0x0206('0x3b')](_0x272996[_0x0206('0x84')])&&_0x272996[_0x0206('0x84')]>0x0){return!![];}loggerPredictive['info'](_0x0206('0x87'));}else{loggerPredictive[_0x0206('0x80')](_0x0206('0x88'));}}else{loggerPredictive[_0x0206('0x80')]('History\x20information\x20are\x20empty');}return![];}function mergeDataErlangB(_0x2d7690){return function(_0x3d90d6){loggerPredictive[_0x0206('0x80')](_0x0206('0x89'));loggerPredictive['info'](_0x0206('0x8a'),_0x3d90d6[_0x0206('0x74')]);loggerPredictive[_0x0206('0x80')](_0x0206('0x8b'),_0x3d90d6['erlangCallToSecond']);loggerPredictive[_0x0206('0x80')](_0x0206('0x8c'),_0x3d90d6[_0x0206('0x76')]);loggerPredictive[_0x0206('0x80')]('Agent\x20Busy\x20Factor:\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x3d90d6[_0x0206('0x77')]);loggerPredictive['info'](_0x0206('0x8c'),_0x3d90d6['erlangAbandonmentRate']);loggerPredictive[_0x0206('0x80')]('---------------------------');_[_0x0206('0x8d')](_0x2d7690,_0x3d90d6);};}function getDiff(_0x2f91ac){var _0x595681=moment()[_0x0206('0x49')](0x0);var _0x591ca0=moment(_0x2f91ac)['milliseconds'](0x0);return _0x595681[_0x0206('0x4a')](_0x591ca0,_0x0206('0x4b'));}function ifInterval(_0x48e9ed,_0x5874ea){if(_[_0x0206('0x3b')](_0x5874ea)){return![];}return getDiff(_0x5874ea)<_0x48e9ed*0x3c;}function freeVariablesPredictive(_0x4116d9){if(isNotNull(_0x4116d9)){if(!_[_0x0206('0x3b')](_0x4116d9[_0x0206('0x29')])){_0x4116d9['startProgressive']=undefined;loggerPredictive[_0x0206('0x80')](_0x4116d9['name'],'clearing\x20variable\x20start\x20progressive');}if(!_['isUndefined'](_0x4116d9[_0x0206('0x28')])){_0x4116d9['startPredictive']=undefined;loggerPredictive[_0x0206('0x80')](_0x4116d9['name'],_0x0206('0x8e'));}if(!_[_0x0206('0x3b')](_0x4116d9['handlePredictive'])){clearInterval(_0x4116d9[_0x0206('0x8f')]);_0x4116d9['handlePredictive']=undefined;loggerPredictive[_0x0206('0x80')](_0x4116d9[_0x0206('0x3e')],_0x0206('0x90'));}}}function erlangb(_0x3e0383,_0x4a0962){if(_0x4a0962===0x0){return 0x0;}var _0x31b4c4=0x1;for(var _0x376a52=0x1;_0x376a52<=_0x4a0962;_0x376a52+=0x1){_0x31b4c4=0x1+_0x31b4c4*_0x376a52/_0x3e0383;}return 0x1/_0x31b4c4;}function isVoiceQueueOutbound(_0x5170bf){return _0x5170bf===_0x0206('0x4d');}function isNotPreview(_0x1bb7ad){return _0x1bb7ad!==_0x0206('0x91');}function isCampaignIvr(_0x17c0b8){return _0x17c0b8===_0x0206('0x7e');}function getCallerId(_0x3074a6,_0x294053,_0x385395){if(!_[_0x0206('0x3b')](_0x385395)&&typeof _0x385395===_0x0206('0x92')&&!_[_0x0206('0x46')](_0x385395)){if(!_[_0x0206('0x3b')](_0x294053)&&typeof _0x294053==='string'&&!_['isEmpty'](_0x294053)){return util[_0x0206('0x7b')]('\x22%s\x22\x20<%s>',_0x294053,_0x385395);}return util[_0x0206('0x7b')](_0x0206('0x93'),_0x385395,_0x385395);}if(!_[_0x0206('0x3b')](_0x3074a6)&&typeof _0x3074a6===_0x0206('0x92')&&!_[_0x0206('0x46')](_0x3074a6)){return _0x3074a6;}return'\x22\x22\x20<>';}function loggerCatchQueueSummary(_0x407cb5,_0x1d724d){return function(_0x48263a){freeVariablesPredictive(_0x1d724d);emitVoiceQueueSummary(_0x1d724d);emitCampaignSummary(_0x1d724d);loggerSyncQueueSummary[_0x0206('0x94')](_0x407cb5,util[_0x0206('0x95')](_0x48263a,{'showHidden':![],'depth':null}));};}function loggerCatchPredictive(_0x20e050,_0x317ed4){return function(_0x309145){loggerPredictive['error'](_0x317ed4[_0x0206('0x3e')],_0x20e050);loggerPredictive[_0x0206('0x94')](_0x309145[_0x0206('0x96')]);freeVariablesPredictive(_0x317ed4);};}function loggerCatch(_0x3ecbdd){return function(_0x44540c){logger[_0x0206('0x94')](_0x3ecbdd,util[_0x0206('0x95')](_0x44540c,{'showHidden':![],'depth':null}));};}function checkContactEmpty(_0xedfaa1){return _0xedfaa1&&!_['isUndefined'](_0xedfaa1)&&_0xedfaa1[_0x0206('0x97')]>0x0;}function decremetOriginate(_0x5c2070){if(!_['isUndefined'](_0x5c2070)&&_0x5c2070!==null){if(typeof _0x5c2070['originated']!=='undefined'){if(_0x5c2070[_0x0206('0x73')]>0x0){_0x5c2070[_0x0206('0x73')]-=0x1;}else{logger[_0x0206('0x94')](_0x0206('0x98'));}}}else{logger['error']('[decremetOriginate]\x20is\x20null\x20or\x20undefined');}}function checkContactLowerLimitOriginate(_0x3f123c,_0x36099e,_0x3bf8b8){if(_0x36099e>_0x3bf8b8){for(var _0x5a1bb6=0x0;_0x5a1bb6<_0x36099e-_0x3bf8b8;_0x5a1bb6+=0x1){decremetOriginate(_0x3f123c);}}}function loggerGetContactDialer(_0x566f2d,_0x9be472,_0x130d1d){return function(_0x80ba3d){checkContactLowerLimitOriginate(_0x9be472,_0x130d1d,0x0);logger['error'](_0x566f2d,util[_0x0206('0x95')](_0x80ba3d,{'showHidden':![],'depth':null}));};}function sendMessageReschedule(_0xd67207){return function(_0x1eb38c){if(isNotNull(_0x1eb38c)&&isNotNull(_0x1eb38c[0x0])){if(_0x1eb38c[0x0][_0x0206('0x99')]>0x0){_0xd67207[_0x0206('0x3c')]=_0x0206('0x9a');logger[_0x0206('0x80')](_0x0206('0x9b')+_0xd67207[_0x0206('0x3e')],_0x1eb38c[0x0]['contactsRescheduled'],_0x0206('0x9c'));}else{_0xd67207[_0x0206('0x3c')]=_0x0206('0x9d');logger[_0x0206('0x80')](_0x0206('0x9e')+_0xd67207[_0x0206('0x3e')]);}}};}function notSendMessagesQueue(_0x5c806d){if(_0x5c806d[_0x0206('0x9f')]){freeVariablesPredictive(_0x5c806d);if(_0x5c806d['originated']===0x0&&_0x5c806d[_0x0206('0x54')]===0x0&&_0x5c806d[_0x0206('0x58')]===0x0&&(_0x5c806d['pTalking']||0x0)===0x0){_0x5c806d['sendMessageOneNotActive']=![];_0x5c806d[_0x0206('0x50')]=0x0;_0x5c806d[_0x0206('0x3c')]=_0x0206('0x40');loggerSyncQueueSummary[_0x0206('0x94')](_0x0206('0xa0'),_0x5c806d[_0x0206('0x3e')],_0x0206('0xa1'));}else{_0x5c806d[_0x0206('0x3c')]=_0x0206('0xa2');loggerSyncQueueSummary['error'](_0x0206('0xa0'),_0x5c806d[_0x0206('0x3e')],_0x0206('0xa3'));}emitVoiceQueueSummary(_0x5c806d);}}function notSendMessagesCampaign(_0x3eb35a){if(_0x3eb35a[_0x0206('0x9f')]){if(_0x3eb35a[_0x0206('0x73')]===0x0){_0x3eb35a[_0x0206('0x9f')]=![];_0x3eb35a[_0x0206('0x3c')]=_0x0206('0x40');loggerSyncQueueSummary[_0x0206('0x94')](_0x0206('0xa4'),_0x3eb35a['name'],'is\x20not\x20active');}else{_0x3eb35a[_0x0206('0x3c')]=_0x0206('0xa2');loggerSyncQueueSummary['error']('[syncQueueSummary]\x20Campaign\x20Ivr:\x20',_0x3eb35a[_0x0206('0x3e')],'is\x20disactive');}emitCampaignSummary(_0x3eb35a);}}function createObjHistory(_0x31b7e2,_0x3607d1,_0x483c87,_0x5d7630,_0x223d5c){_0x31b7e2[_0x0206('0x3c')]=_0x483c87;var _0x5167cb=new Action(_0x31b7e2,_0x3607d1);var _0x23d291=new History(_0x5167cb);_0x23d291[_0x0206('0xa5')]=_0x5d7630;_0x23d291[_0x0206('0xa6')]=_0x223d5c;_0x23d291[_0x0206('0xa7')]=_0x5167cb[_0x0206('0xa8')];return _0x23d291;}Dialer[_0x0206('0x1b')][_0x0206('0xa9')]=function(){var _0x2308d8=this;setInterval(function(){_0x2308d8['clearZombieChannels'](_0x2308d8['uniqueId'],_0x0206('0xaa'));_0x2308d8[_0x0206('0xab')](_0x2308d8[_0x0206('0x24')],'[actions]');},0x32c8);};Dialer[_0x0206('0x1b')]['clearZombieChannels']=function(_0x5eb5fd,_0xaa4bd2){var _0x487ae0=this;for(var _0x315d03 in _0x5eb5fd){if(typeof _0x5eb5fd[_0x315d03]!==_0x0206('0xac')){this[_0x0206('0x1e')][_0x0206('0xad')](function(){if(!_[_0x0206('0xae')](_0x5eb5fd[_0x315d03])){return ami[_0x0206('0xaf')]({'action':'status','channel':_0x5eb5fd[_0x315d03][_0x0206('0xb0')]})[_0x0206('0xb1')](function(_0x17726f){if(_0x17726f['message']===_0x0206('0xb2')){setTimeout(function(){if(_0x5eb5fd[_0x315d03]&&_0x5eb5fd[_0x315d03][_0x0206('0x55')]!==_0x0206('0x7e')){_0x487ae0[_0x0206('0xb3')](_0x487ae0[_0x0206('0x1f')][_0x5eb5fd[_0x315d03][_0x0206('0xb4')]]);logger[_0x0206('0x94')]('[Dialer][checkChannel]',_0xaa4bd2,_0x315d03,_0x5eb5fd[_0x315d03][_0x0206('0xb4')]);delete _0x5eb5fd[_0x315d03];}if(_0x5eb5fd[_0x315d03]&&_0x5eb5fd[_0x315d03]['type']===_0x0206('0x7e')){_0x487ae0['updateOriginated'](_0x487ae0[_0x0206('0xb5')][_0x5eb5fd[_0x315d03]['queue']]);logger[_0x0206('0x94')]('[Dialer][checkChannel][ivr]',_0xaa4bd2,_0x315d03,_0x5eb5fd[_0x315d03][_0x0206('0xb4')]);delete _0x5eb5fd[_0x315d03];}},0x2328);}});}});}}};Dialer['prototype'][_0x0206('0xb6')]=function(_0x7691f0){return BPromise[_0x0206('0xb7')]()[_0x0206('0xb8')](cmHopper[_0x0206('0xb6')](_0x7691f0))[_0x0206('0xb1')](loggerCatch('[countReScheduled]\x20'));};Dialer[_0x0206('0x1b')][_0x0206('0xb9')]=function(_0x26f046){return BPromise[_0x0206('0xb7')]()[_0x0206('0xb8')](cmHopperBlack[_0x0206('0xb9')](_0x26f046))[_0x0206('0xb1')](loggerCatch(_0x0206('0xba')));};Dialer[_0x0206('0x1b')][_0x0206('0xbb')]=function(_0x45d165){return BPromise[_0x0206('0xb7')]()[_0x0206('0xb8')](cmHopperBlack[_0x0206('0xbb')](_0x45d165))[_0x0206('0xb1')](loggerCatch(_0x0206('0xbc')));};Dialer['prototype'][_0x0206('0xbd')]=function(_0x2597a8){return BPromise[_0x0206('0xb7')]()[_0x0206('0xb8')](cmHopperHistory[_0x0206('0xbe')](_0x2597a8))[_0x0206('0xb1')](loggerCatch(_0x0206('0xbf')));};Dialer[_0x0206('0x1b')]['rescheduleContact']=function(_0xd3fc3){return BPromise['resolve']()[_0x0206('0xb8')](cmHopper[_0x0206('0xc0')](_0xd3fc3))['catch'](loggerCatch(_0x0206('0xc1')));};Dialer[_0x0206('0x1b')]['unlockContact']=function(_0x11f2aa,_0x5dfb44,_0x16d96a){return BPromise[_0x0206('0xb7')]()[_0x0206('0xb8')](cmHopper['unlockContact'](_0x11f2aa,_0x5dfb44,_0x16d96a))[_0x0206('0xb1')](loggerCatch(_0x0206('0xc2')));};Dialer[_0x0206('0x1b')][_0x0206('0xc3')]=function(_0x5d4235,_0x5c6a69,_0x26cad7,_0x6802e3,_0x1d62be){return BPromise[_0x0206('0xb7')]()[_0x0206('0xb8')](cmHopper[_0x0206('0xc3')](_0x5d4235,_0x5c6a69,_0x26cad7,_0x6802e3))['catch'](function(_0x3f90d5){_0x1d62be[_0x0206('0xc4')]-=_0x26cad7;_0x1d62be[_0x0206('0xc4')]=_0x1d62be[_0x0206('0xc4')]>0x0?_0x1d62be[_0x0206('0xc4')]:0x0;loggerCatch('[getContactDialer]\x20')(_0x3f90d5);});};Dialer[_0x0206('0x1b')]['getContactDialerIvr']=function(_0x11882f,_0x4ff282,_0x53029e,_0x187df6){return BPromise['resolve']()['then'](cmHopper[_0x0206('0xc5')](_0x11882f,_0x4ff282,_0x53029e))[_0x0206('0xb1')](function(_0x4eae48){_0x187df6['temp']-=_0x4ff282;_0x187df6[_0x0206('0xc4')]=_0x187df6['temp']>0x0?_0x187df6[_0x0206('0xc4')]:0x0;loggerCatch(_0x0206('0xc6'))(_0x4eae48);});};Dialer[_0x0206('0x1b')][_0x0206('0xc7')]=function(_0x168d53){return BPromise[_0x0206('0xb7')]()[_0x0206('0xb8')](voiceQueueRt[_0x0206('0xc7')](_0x168d53))['catch'](loggerCatch(_0x0206('0xc8')));};Dialer[_0x0206('0x1b')][_0x0206('0xc9')]=function(_0x398a35){return BPromise[_0x0206('0xb7')]()[_0x0206('0xb8')](cmHopper['moveContactManagedDialer'](_0x398a35))[_0x0206('0xb1')](loggerCatch(_0x0206('0xca')));};Dialer['prototype'][_0x0206('0xcb')]=function(_0xf1fc72){return BPromise['resolve']()[_0x0206('0xb8')](cmHopperHistory['createHistory'](_0xf1fc72))[_0x0206('0xb1')](loggerCatch(_0x0206('0xcc')));};Dialer[_0x0206('0x1b')][_0x0206('0xb3')]=function(_0x32d229){if(!_[_0x0206('0x3b')](_0x32d229)&&_0x32d229!==null){if(typeof _0x32d229[_0x0206('0x73')]!==_0x0206('0xac')){if(_0x32d229[_0x0206('0x73')]>0x0){_0x32d229[_0x0206('0x73')]-=0x1;}else{logger[_0x0206('0x94')]('[updateOriginated]\x20object\x20originated\x20is\x20negative');}}}else{logger[_0x0206('0x94')](_0x0206('0xcd'));}};Dialer[_0x0206('0x1b')]['loggerHandler']=function(_0x40da13,_0x567fb4){var _0x32b3a7=this;return function(_0x2b413b){_0x32b3a7[_0x0206('0xb3')](_0x567fb4);logger['error'](_0x40da13,util[_0x0206('0x95')](_0x2b413b,{'showHidden':![],'depth':null}));};};Dialer[_0x0206('0x1b')]['emptyContact']=function(_0x4bb8fd,_0x5b2739,_0x1aece5){var _0x127562={'state':0x19,'statedesc':_0x0206('0xce')};this[_0x0206('0xb3')](_0x5b2739);this[_0x0206('0xcf')](_[_0x0206('0x8d')](_0x127562,_[_0x0206('0xd0')](_0x1aece5,[_0x0206('0xd1'),_0x0206('0xd2'),'UserId','VoiceQueueId',_0x0206('0xd3')])),_0x0206('0xd4'),'[emptyContact]');logger[_0x0206('0x94')](_0x4bb8fd);};Dialer['prototype'][_0x0206('0xd5')]=function(_0x5c8ddf){return _0x5c8ddf===_0x0206('0xd6');};Dialer[_0x0206('0x1b')][_0x0206('0xd7')]=function(_0x4127e4){return!_[_0x0206('0x3b')](_0x4127e4)&&_0x4127e4&&!_['isUndefined'](_0x4127e4[_0x0206('0x3e')])&&!_[_0x0206('0x3b')](_0x4127e4[_0x0206('0x79')])&&_0x4127e4[_0x0206('0x79')]&&(this['trunks'][util[_0x0206('0x7b')]('SIP/%s',_0x4127e4['name'])][_0x0206('0xd8')]===_0x0206('0xd9')||this[_0x0206('0x21')][util[_0x0206('0x7b')](_0x0206('0xda'),_0x4127e4[_0x0206('0x3e')])][_0x0206('0xd8')]==='unmonitored');};Dialer[_0x0206('0x1b')]['saveInDb']=function(_0x5afd47,_0x4e46d4,_0x2a4c1a){this[_0x0206('0xcb')](_0x5afd47)['catch'](loggerCatch(_0x4e46d4));this[_0x0206('0xc9')](_0x5afd47)['catch'](loggerCatch(_0x2a4c1a));};Dialer[_0x0206('0x1b')]['syncVarSet']=function(_0x4113f0){var _0xed882d=this[_0x0206('0x26')][_0x4113f0['uniqueid']];var _0x1550cb;if(!_[_0x0206('0xae')](_0x4113f0)&&!_[_0x0206('0xae')](_0x4113f0[_0x0206('0xdb')])&&!_[_0x0206('0xae')](_0x4113f0[_0x0206('0xdb')]['amdstatus'])&&_0x4113f0[_0x0206('0xdc')]===_0x0206('0xdd')&&_0xed882d){if(_0xed882d['type']!==_0x0206('0x7e')&&this[_0x0206('0x1f')][_0xed882d['queue']]['dialAMDActive']&&_0x4113f0['value']===_0x0206('0xde')){delete this[_0x0206('0x26')][_0x4113f0[_0x0206('0xdf')]];this[_0x0206('0xb3')](this[_0x0206('0x1f')][_0xed882d[_0x0206('0xb4')]]);this['voiceQueues'][_0xed882d['queue']][_0x0206('0x5f')]+=0x1;this['voiceQueues'][_0xed882d[_0x0206('0xb4')]][_0x0206('0x5e')]+=0x1;_0x1550cb=new Hangup(_0xed882d,_0x4113f0);_0x1550cb[_0x0206('0xa5')]=0x12;_0x1550cb[_0x0206('0xa6')]=_0x0206('0xe0');_0x1550cb[_0x0206('0xe1')]=_0x0206('0xe2');ami['emit']('custom:amd',ut['buildObj'](_0x1550cb,_0x0206('0xe3')));this[_0x0206('0xcf')](_0x1550cb,_0x0206('0xe4'),_0x0206('0xe5'));}if(_0xed882d[_0x0206('0x55')]!==_0x0206('0x7e')&&this['voiceQueues'][_0xed882d[_0x0206('0xb4')]][_0x0206('0xe6')]&&_0x4113f0[_0x0206('0xe7')]===_0x0206('0xe8')){var _0x4ec72a=this;return new BPromise(function(_0x142f10,_0x5c9972){delete _0x4ec72a[_0x0206('0x26')][_0x4113f0[_0x0206('0xdf')]];_0x4ec72a[_0x0206('0xb3')](_0x4ec72a[_0x0206('0x1f')][_0xed882d[_0x0206('0xb4')]]);_0x4ec72a['voiceQueues'][_0xed882d['queue']][_0x0206('0x5f')]+=0x1;_0x4ec72a[_0x0206('0x1f')][_0xed882d[_0x0206('0xb4')]][_0x0206('0x5e')]+=0x1;var _0x2a1d50=_0x4ec72a[_0x0206('0x1f')][_0xed882d['queue']];var _0x436838=new Hangup(_0xed882d,_0x4113f0);_0x436838[_0x0206('0xa5')]=0x13;_0x436838[_0x0206('0xa6')]=_0x0206('0xe9');_0x436838[_0x0206('0xe1')]=_0x0206('0xe2');_0x436838[_0x0206('0xea')]+=0x1;_0x436838[_0x0206('0xeb')]+=0x1;_0x436838[_0x0206('0xe3')]=!![];ami[_0x0206('0x4c')](_0x0206('0xec'),ut[_0x0206('0xed')](_0x436838,'amd'));_0x4ec72a[_0x0206('0xcb')](_0x436838)[_0x0206('0xb1')](loggerCatch('[syncAgentComplete][createHistory][0]'));if(_0x436838[_0x0206('0xee')]+_0x436838[_0x0206('0xef')]+_0x436838[_0x0206('0xf0')]+_0x436838[_0x0206('0xf1')]+_0x436838[_0x0206('0xf2')]+_0x436838['countabandonedretry']+_0x436838[_0x0206('0xea')]+_0x436838[_0x0206('0xf3')]>=_0x2a1d50[_0x0206('0xf4')]){_0x4ec72a['stateGlobal'](_0x436838,_0x142f10,_0x5c9972,_0x0206('0xf5'));}else{if(_0x436838[_0x0206('0xea')]>=_0x2a1d50[_0x0206('0xf6')]){_0x4ec72a[_0x0206('0xf7')](_0x436838,_0x142f10,_0x5c9972,_0x0206('0xf8'));}else{_0x4ec72a['rescheduleContact']({'active':![],'countmachineretry':_0x436838[_0x0206('0xea')],'scheduledat':moment()[_0x0206('0xf9')](_0x2a1d50['dialMachineRetryFrequency'],_0x0206('0xfa'))[_0x0206('0x7b')](_0x0206('0xfb')),'ContactId':_0x436838['ContactId'],'ListId':_0x436838[_0x0206('0xd2')],'VoiceQueueId':_0x436838[_0x0206('0xfc')]||undefined,'CampaignId':_0x436838[_0x0206('0xd3')]||undefined})[_0x0206('0xb1')](loggerCatch(_0x0206('0xfd')));_0x142f10({'reschedule':0x1});}}});}if(_0xed882d[_0x0206('0x55')]===_0x0206('0x7e')&&this[_0x0206('0xb5')][_0xed882d[_0x0206('0xb4')]][_0x0206('0xe6')]&&_0x4113f0['value']==='HANGUP'){delete this[_0x0206('0x26')][_0x4113f0['uniqueid']];this[_0x0206('0xb3')](this[_0x0206('0xb5')][_0xed882d['queue']]);_0x1550cb=new Hangup(_0xed882d,_0x4113f0);_0x1550cb['state']=0x12;_0x1550cb[_0x0206('0xa6')]=_0x0206('0xe0');_0x1550cb['membername']=_0x0206('0xe2');ami['emit'](_0x0206('0xec'),ut[_0x0206('0xed')](_0x1550cb,_0x0206('0xe3')));this[_0x0206('0xcf')](_0x1550cb,_0x0206('0xfe'),_0x0206('0xff'));}if(_0xed882d[_0x0206('0x55')]==='ivr'&&this[_0x0206('0xb5')][_0xed882d['queue']][_0x0206('0xe6')]&&_0x4113f0[_0x0206('0xe7')]==='MACHINE'){var _0x4ec72a=this;return new BPromise(function(_0x2914d7,_0x57aea7){delete _0x4ec72a[_0x0206('0x26')][_0x4113f0[_0x0206('0xdf')]];_0x4ec72a[_0x0206('0xb3')](_0x4ec72a[_0x0206('0xb5')][_0xed882d['queue']]);_0x4ec72a[_0x0206('0xb5')][_0xed882d[_0x0206('0xb4')]][_0x0206('0x5f')]+=0x1;_0x4ec72a['campaigns'][_0xed882d['queue']][_0x0206('0x5e')]+=0x1;var _0x25004c=_0x4ec72a[_0x0206('0xb5')][_0xed882d[_0x0206('0xb4')]];var _0x3b9d81=new Hangup(_0xed882d,_0x4113f0);_0x3b9d81['state']=0x13;_0x3b9d81['statedesc']=_0x0206('0xe9');_0x3b9d81[_0x0206('0xe1')]=_0x0206('0xe2');_0x3b9d81['countmachineretry']+=0x1;_0x3b9d81['countglobal']+=0x1;_0x3b9d81[_0x0206('0xe3')]=!![];ami[_0x0206('0x4c')](_0x0206('0xec'),ut[_0x0206('0xed')](_0x3b9d81,_0x0206('0xe3')));_0x4ec72a[_0x0206('0xcb')](_0x3b9d81)[_0x0206('0xb1')](loggerCatch(_0x0206('0x100')));if(_0x3b9d81[_0x0206('0xee')]+_0x3b9d81['countcongestionretry']+_0x3b9d81['countnoanswerretry']+_0x3b9d81['countnosuchnumberretry']+_0x3b9d81[_0x0206('0xf2')]+_0x3b9d81[_0x0206('0x101')]+_0x3b9d81[_0x0206('0xea')]+_0x3b9d81[_0x0206('0xf3')]>=_0x25004c[_0x0206('0xf4')]){_0x4ec72a[_0x0206('0x102')](_0x3b9d81,_0x2914d7,_0x57aea7,_0x0206('0xf5'));}else{if(_0x3b9d81[_0x0206('0xea')]>=_0x25004c[_0x0206('0xf6')]){_0x4ec72a[_0x0206('0xf7')](_0x3b9d81,_0x2914d7,_0x57aea7,_0x0206('0xf8'));}else{_0x4ec72a['rescheduleContact']({'active':![],'countmachineretry':_0x3b9d81[_0x0206('0xea')],'scheduledat':moment()[_0x0206('0xf9')](_0x25004c[_0x0206('0x103')],'minutes')[_0x0206('0x7b')](_0x0206('0xfb')),'ContactId':_0x3b9d81[_0x0206('0xd1')],'ListId':_0x3b9d81['ListId'],'VoiceQueueId':_0x3b9d81[_0x0206('0xfc')]||undefined,'CampaignId':_0x3b9d81[_0x0206('0xd3')]||undefined})['catch'](loggerCatch('[rescheduleContact][Machine]'));_0x2914d7({'reschedule':0x1});}}});}}};Dialer[_0x0206('0x1b')][_0x0206('0x33')]=function(_0x222698){var _0x2f067d=this['uniqueId'][_0x222698[_0x0206('0xdf')]];var _0x3ca0a8=this;var _0x32df58;if(_0x2f067d&&_0x2f067d[_0x0206('0x55')]===_0x0206('0x7e')){delete this['uniqueId'][_0x222698[_0x0206('0xdf')]];this['updateOriginated'](this[_0x0206('0xb5')][_0x2f067d[_0x0206('0xb4')]]);this[_0x0206('0xb5')][_0x2f067d['queue']]['ivrAnswerCallsDay']+=0x1;_0x32df58=new Hangup(_0x2f067d,_0x222698);this[_0x0206('0xcb')](_0x32df58)['catch'](loggerCatch(_0x0206('0x104')));this['moveContactManagedDialer'](_0x32df58)[_0x0206('0xb1')](loggerCatch('[syncHangupIvr]'));}if(_0x2f067d&&_0x2f067d[_0x0206('0x55')]!==_0x0206('0x7e')&&isNotNull(this[_0x0206('0x1f')][_0x2f067d[_0x0206('0xb4')]][_0x0206('0x105')])){delete this[_0x0206('0x26')][_0x222698[_0x0206('0xdf')]];this[_0x0206('0xb3')](this[_0x0206('0x1f')][_0x2f067d[_0x0206('0xb4')]]);this[_0x0206('0x1f')][_0x2f067d[_0x0206('0xb4')]][_0x0206('0x5f')]+=0x1;this[_0x0206('0x1f')][_0x2f067d[_0x0206('0xb4')]][_0x0206('0x5e')]+=0x1;_0x32df58=new Hangup(_0x2f067d,_0x222698);_0x32df58[_0x0206('0xa5')]=0x10;_0x32df58['statedesc']=_0x0206('0x106');_0x32df58['membername']=_0x0206('0x107');this[_0x0206('0xcb')](_0x32df58)['catch'](loggerCatch(_0x0206('0x104')));this[_0x0206('0xc9')](_0x32df58)[_0x0206('0xb1')](loggerCatch('[syncHangupIvr]'));}if(_0x2f067d&&_0x2f067d[_0x0206('0x55')]!=='ivr'&&!isNotNull(this[_0x0206('0x1f')][_0x2f067d[_0x0206('0xb4')]]['dialQueueProject'])){delete this[_0x0206('0x26')][_0x222698[_0x0206('0xdf')]];this['updateOriginated'](this[_0x0206('0x1f')][_0x2f067d['queue']]);this[_0x0206('0x1f')][_0x2f067d[_0x0206('0xb4')]][_0x0206('0x6a')]+=0x1;_0x32df58=new Hangup(_0x2f067d,_0x222698);_0x32df58[_0x0206('0xa5')]=0xc;_0x32df58[_0x0206('0xa6')]=_0x222698[_0x0206('0x108')];_0x32df58[_0x0206('0xe1')]=_0x0206('0x109');this[_0x0206('0xcb')](_0x32df58)[_0x0206('0xb1')](loggerCatch(_0x0206('0x104')));this['moveContactManagedDialer'](_0x32df58)[_0x0206('0xb1')](loggerCatch('[syncHangupIvr]'));}};Dialer[_0x0206('0x1b')][_0x0206('0x10a')]=function(_0x11033b){var _0x4a47a3=this[_0x0206('0x26')][_0x11033b['uniqueid']];var _0x17e89e=this;if(this[_0x0206('0x1f')][_0x11033b[_0x0206('0xb4')]]){if(_0x4a47a3&&_0x4a47a3[_0x0206('0x55')]!==_0x0206('0x7e')){delete this[_0x0206('0x26')][_0x11033b[_0x0206('0xdf')]];this[_0x0206('0x1f')][_0x11033b['queue']][_0x0206('0x5f')]+=0x1;var _0x1f785a=new AgentComplete(_0x4a47a3,_0x11033b);if(_0x11033b[_0x0206('0x10b')]===_0x0206('0x10c')){_0x1f785a[_0x0206('0x10d')]=this[_0x0206('0x1f')][_0x11033b[_0x0206('0xb4')]][_0x0206('0x10e')]&&this[_0x0206('0x1f')][_0x11033b['queue']][_0x0206('0x10f')]?moment()[_0x0206('0x7b')](_0x0206('0xfb')):undefined;}this[_0x0206('0xcb')](_0x1f785a)[_0x0206('0xb1')](loggerCatch(_0x0206('0x110')));this['moveContactManagedDialer'](_0x1f785a)[_0x0206('0xb1')](loggerCatch(_0x0206('0x111')));}}};Dialer[_0x0206('0x1b')][_0x0206('0x2b')]=function(_0x184b08){if(this[_0x0206('0x1f')][_0x184b08[_0x0206('0xb4')]]){if(this[_0x0206('0x26')][_0x184b08[_0x0206('0xdf')]]&&this[_0x0206('0x26')][_0x184b08[_0x0206('0xdf')]]['type']!=='ivr'){this['updateOriginated'](this[_0x0206('0x1f')][_0x184b08[_0x0206('0xb4')]]);this[_0x0206('0x26')][_0x184b08['uniqueid']][_0x0206('0x112')]=moment()[_0x0206('0x7b')]('YYYY-MM-DD\x20HH:mm:ss');}}};Dialer[_0x0206('0x1b')][_0x0206('0x113')]=function(_0x3d3c20){this[_0x0206('0xcb')](_0x3d3c20)[_0x0206('0xb1')](loggerCatch(_0x0206('0x110')));this[_0x0206('0xc9')](_0x3d3c20)[_0x0206('0xb1')](loggerCatch(_0x0206('0x114')));};Dialer[_0x0206('0x1b')][_0x0206('0x2d')]=function(_0x30d7af){var _0x351bc3=this[_0x0206('0x26')][_0x30d7af['uniqueid']];var _0x230b1e=this;if(this['voiceQueues'][_0x30d7af[_0x0206('0xb4')]]){if(_0x351bc3&&_0x351bc3['type']!==_0x0206('0x7e')){delete this[_0x0206('0x26')][_0x30d7af['uniqueid']];this[_0x0206('0xb3')](this[_0x0206('0x1f')][_0x30d7af[_0x0206('0xb4')]]);_0x351bc3[_0x0206('0x115')]=moment()[_0x0206('0x7b')]('YYYY-MM-DD\x20HH:mm:ss');var _0xcb2096=new QueueCallerAbandon(_0x351bc3,_0x30d7af);if(getSeconds(_0x351bc3['droptime'],_0x351bc3[_0x0206('0x116')])>=_0x351bc3[_0x0206('0x117')]){this['voiceQueues'][_0x30d7af['queue']][_0x0206('0x6e')]+=0x1;this[_0x0206('0x1f')][_0x30d7af[_0x0206('0xb4')]][_0x0206('0x65')]+=0x1;this[_0x0206('0x1f')][_0x30d7af[_0x0206('0xb4')]][_0x0206('0x70')]+=0x1;_0xcb2096['state']=0xa;_0xcb2096['statedesc']=_0x0206('0x118');_0xcb2096[_0x0206('0x119')]=_0x0206('0x11a');_0xcb2096['agiafterat']=this['voiceQueues'][_0x30d7af[_0x0206('0xb4')]][_0x0206('0x10e')]?moment()[_0x0206('0x7b')]('YYYY-MM-DD\x20HH:mm:ss'):undefined;_0xcb2096[_0x0206('0xf2')]+=0x1;_0xcb2096[_0x0206('0xeb')]+=0x1;if(_0xcb2096[_0x0206('0xf2')]>=this[_0x0206('0x1f')][_0x30d7af['queue']][_0x0206('0x11b')]){this['queueCallerAbandonCreateState'](_0xcb2096);}else{this[_0x0206('0xc0')]({'active':![],'countdropretry':_0xcb2096[_0x0206('0xf2')],'scheduledat':moment()[_0x0206('0xf9')](this[_0x0206('0x1f')][_0x30d7af[_0x0206('0xb4')]]['dialDropRetryFrequency'],_0x0206('0xfa'))[_0x0206('0x7b')](_0x0206('0xfb')),'ContactId':_0x351bc3[_0x0206('0xd1')],'ListId':_0x351bc3['ListId'],'VoiceQueueId':_0x351bc3['VoiceQueueId']||undefined,'CampaignId':_0x351bc3[_0x0206('0xd3')]||undefined})[_0x0206('0xb1')](loggerCatch('[rescheduleContact][Drop]'));var _0x390b7c=new History(_0xcb2096);_0x390b7c[_0x0206('0xa5')]=0xa;_0x390b7c['statedesc']=_0x0206('0x118');_0x390b7c[_0x0206('0xa8')]=moment()[_0x0206('0x7b')]('YYYY-MM-DD\x20HH:mm:ss');_0x390b7c[_0x0206('0xa7')]=_0x390b7c[_0x0206('0xa8')];_0x390b7c['calleridname']=_0xcb2096[_0x0206('0x11c')];_0x390b7c['calleridnum']=_0xcb2096[_0x0206('0x11d')];this[_0x0206('0xcb')](_0x390b7c)['catch'](loggerCatch(_0x0206('0x11e')));}}else{this['voiceQueues'][_0x30d7af[_0x0206('0xb4')]][_0x0206('0x6d')]+=0x1;this[_0x0206('0x1f')][_0x30d7af[_0x0206('0xb4')]]['outboundDropCallsDayCallersExit']+=0x1;_0xcb2096[_0x0206('0xa5')]=0xb;_0xcb2096[_0x0206('0xa6')]=_0x0206('0x11f');_0xcb2096['dropreason']=_0x0206('0x120');_0xcb2096['countabandonedretry']+=0x1;_0xcb2096['countglobal']+=0x1;if(_0xcb2096['countabandonedretry']>=this[_0x0206('0x1f')][_0x30d7af[_0x0206('0xb4')]][_0x0206('0x121')]){this[_0x0206('0x113')](_0xcb2096);}else{this['rescheduleContact']({'active':![],'countabandonedretry':_0xcb2096['countabandonedretry'],'scheduledat':moment()[_0x0206('0xf9')](this[_0x0206('0x1f')][_0x30d7af[_0x0206('0xb4')]][_0x0206('0x122')],_0x0206('0xfa'))[_0x0206('0x7b')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x351bc3['ContactId'],'ListId':_0x351bc3[_0x0206('0xd2')],'VoiceQueueId':_0x351bc3[_0x0206('0xfc')]||undefined,'CampaignId':_0x351bc3['CampaignId']||undefined})[_0x0206('0xb1')](loggerCatch(_0x0206('0x123')));var _0x390b7c=new History(_0xcb2096);_0x390b7c['state']=0xb;_0x390b7c[_0x0206('0xa6')]=_0x0206('0x11f');_0x390b7c[_0x0206('0xa8')]=moment()[_0x0206('0x7b')](_0x0206('0xfb'));_0x390b7c['endtime']=_0x390b7c[_0x0206('0xa8')];_0x390b7c['calleridname']=_0xcb2096[_0x0206('0x11c')];_0x390b7c['calleridnum']=_0xcb2096[_0x0206('0x11d')];this['createHistory'](_0x390b7c)['catch'](loggerCatch(_0x0206('0x124')));}}}}};Dialer[_0x0206('0x1b')][_0x0206('0x35')]=function(_0x2bb9dc){if(this['actions'][_0x2bb9dc[_0x0206('0xdf')]]){this[_0x0206('0x24')][_0x2bb9dc['uniqueid']][_0x0206('0xb0')]=_0x2bb9dc['channel'];}if(this[_0x0206('0x26')][_0x2bb9dc[_0x0206('0xdf')]]){this[_0x0206('0x26')][_0x2bb9dc[_0x0206('0xdf')]][_0x0206('0xb0')]=_0x2bb9dc[_0x0206('0xb0')];}};Dialer[_0x0206('0x1b')]['syncQueueMember']=function(_0x21d82c){if(strategy[this[_0x0206('0x1f')][this[_0x0206('0x24')][_0x21d82c[_0x0206('0x125')]][_0x0206('0xb4')]]['strategy']]===_0x0206('0x1a')){if(this['actions'][_0x21d82c[_0x0206('0x125')]]&&_[_0x0206('0xae')](this[_0x0206('0x24')][_0x21d82c[_0x0206('0x125')]][_0x0206('0x126')])&&_0x21d82c[_0x0206('0xd8')]==='1'&&_0x21d82c[_0x0206('0x127')]==='0'){if(this[_0x0206('0x20')][_0x21d82c[_0x0206('0x128')]]){if(!this[_0x0206('0x20')][_0x21d82c[_0x0206('0x128')]][_0x0206('0x126')]){this[_0x0206('0x20')][_0x21d82c[_0x0206('0x128')]][_0x0206('0x126')]=!![];this[_0x0206('0x24')][_0x21d82c[_0x0206('0x125')]][_0x0206('0x126')]=!![];this[_0x0206('0x24')][_0x21d82c[_0x0206('0x125')]]['stateinterface']=_0x21d82c[_0x0206('0x128')];}}}}else if((strategy[this['voiceQueues'][this['actions'][_0x21d82c[_0x0206('0x125')]][_0x0206('0xb4')]][_0x0206('0x4e')]]||'rrmemory')===_0x0206('0x19')){if(this['actions'][_0x21d82c[_0x0206('0x125')]]){if(this[_0x0206('0x20')][_0x21d82c[_0x0206('0x128')]]){this[_0x0206('0x24')][_0x21d82c[_0x0206('0x125')]][_0x0206('0x128')]=_0x21d82c[_0x0206('0x128')];if(_[_0x0206('0xae')](this[_0x0206('0x2a')][this['actions'][_0x21d82c[_0x0206('0x125')]][_0x0206('0xb4')]])){this[_0x0206('0x2a')][this[_0x0206('0x24')][_0x21d82c[_0x0206('0x125')]]['queue']]=[];}this[_0x0206('0x2a')][this[_0x0206('0x24')][_0x21d82c[_0x0206('0x125')]][_0x0206('0xb4')]][_0x0206('0x129')](_[_0x0206('0x8d')](_[_0x0206('0xd0')](this[_0x0206('0x24')][_0x21d82c[_0x0206('0x125')]],['idHopper',_0x0206('0x128')]),{'status':_0x21d82c['status'],'paused':_0x21d82c[_0x0206('0x127')]}));}}}};function unlockQueueStatus(_0x3fd6bc,_0x20c600){setTimeout(function(){if(_['isUndefined'](_0x3fd6bc[_0x0206('0x12a')])){loggerBooked[_0x0206('0x94')](_0x0206('0x12b'),_0x20c600);}_0x3fd6bc['queueStatusComplete']=!![];loggerBooked[_0x0206('0x80')](_0x0206('0x12c'),_0x20c600,JSON[_0x0206('0x48')](_[_0x0206('0xd0')](_0x3fd6bc,[_0x0206('0x3e'),_0x0206('0x12a')])));},0x1f3);}Dialer[_0x0206('0x1b')]['syncQueueStatusComplete']=function(_0x14e897){var _0x507a18=this;var _0x4e7afc=_0x507a18[_0x0206('0x1f')][_0x507a18[_0x0206('0x24')][_0x14e897[_0x0206('0x125')]]['queue']];if(strategy[this[_0x0206('0x1f')][this[_0x0206('0x24')][_0x14e897[_0x0206('0x125')]][_0x0206('0xb4')]][_0x0206('0x4e')]]===_0x0206('0x1a')){if(this[_0x0206('0x24')][_0x14e897[_0x0206('0x125')]]&&this[_0x0206('0x24')][_0x14e897[_0x0206('0x125')]]['stateinterface']){this['preview']['run'](this[_0x0206('0x24')][_0x14e897[_0x0206('0x125')]][_0x0206('0x12d')],this[_0x0206('0x24')][_0x14e897[_0x0206('0x125')]]['stateinterface'])['catch'](function(_0x1dda70){logger[_0x0206('0x94')](_0x0206('0x12e'),util[_0x0206('0x95')](_0x1dda70,{'showHidden':![],'depth':null}));})['finally'](function(){_0x507a18[_0x0206('0xb3')](_0x507a18['voiceQueues'][_0x507a18[_0x0206('0x24')][_0x14e897[_0x0206('0x125')]][_0x0206('0xb4')]]);_0x507a18[_0x0206('0x20')][_0x507a18['actions'][_0x14e897['actionid']][_0x0206('0x128')]][_0x0206('0x126')]=![];delete _0x507a18[_0x0206('0x24')][_0x14e897[_0x0206('0x125')]];unlockQueueStatus(_0x4e7afc);});}else{this['updateOriginated'](this[_0x0206('0x1f')][this[_0x0206('0x24')][_0x14e897[_0x0206('0x125')]][_0x0206('0xb4')]]);this['rescheduleContact']({'active':![],'ContactId':this[_0x0206('0x24')][_0x14e897[_0x0206('0x125')]][_0x0206('0xd1')],'ListId':this[_0x0206('0x24')][_0x14e897['actionid']]['ListId'],'VoiceQueueId':this['actions'][_0x14e897[_0x0206('0x125')]]['VoiceQueueId']||undefined,'CampaignId':this[_0x0206('0x24')][_0x14e897[_0x0206('0x125')]]['CampaignId']||undefined})['catch'](loggerCatch(_0x0206('0x12f')));delete this['actions'][_0x14e897[_0x0206('0x125')]];unlockQueueStatus(_0x4e7afc);}}else if((strategy[this[_0x0206('0x1f')][this[_0x0206('0x24')][_0x14e897[_0x0206('0x125')]][_0x0206('0xb4')]][_0x0206('0x4e')]]||_0x0206('0x19'))===_0x0206('0x19')){var _0x5e47cd;if(this[_0x0206('0x24')][_0x14e897[_0x0206('0x125')]]&&!_[_0x0206('0x46')](this[_0x0206('0x2a')][this['actions'][_0x14e897[_0x0206('0x125')]][_0x0206('0xb4')]])){if(this[_0x0206('0x130')][_0x507a18['actions'][_0x14e897[_0x0206('0x125')]][_0x0206('0xb4')]]){this[_0x0206('0x130')][_0x507a18[_0x0206('0x24')][_0x14e897[_0x0206('0x125')]][_0x0206('0xb4')]]=this['queueBookedRR'][this[_0x0206('0x24')][_0x14e897[_0x0206('0x125')]][_0x0206('0xb4')]]?this[_0x0206('0x130')][this['actions'][_0x14e897[_0x0206('0x125')]][_0x0206('0xb4')]]:this[_0x0206('0x2a')][this[_0x0206('0x24')][_0x14e897[_0x0206('0x125')]][_0x0206('0xb4')]]?this[_0x0206('0x2a')][this[_0x0206('0x24')][_0x14e897[_0x0206('0x125')]][_0x0206('0xb4')]][_0x0206('0x131')]||0x0:0x0;}this[_0x0206('0x2a')][this[_0x0206('0x24')][_0x14e897[_0x0206('0x125')]][_0x0206('0xb4')]][_0x0206('0x131')]=this['queueBookedRR'][this['actions'][_0x14e897[_0x0206('0x125')]][_0x0206('0xb4')]];for(var _0x38f6e8=0x0;_0x38f6e8=0x0;})[_0x0206('0xb1')](myreject(_0x2f7312)));}}else{_0xf1c353[_0x0206('0x129')](ami[_0x0206('0xaf')]({'action':_0x0206('0x149'),'command':util[_0x0206('0x7b')](_0x0206('0x14d'),_0x40f17f,!_[_0x0206('0x3b')](config['timezones'][_0x463502])?_0x463502:'')})[_0x0206('0xb8')](function(_0x7857fd){return _0x7857fd[_0x0206('0x14e')][_0x0206('0x14b')](_0x0206('0x14c'))>=0x0;})['catch'](myreject(_0x2f7312)));}BPromise['all'](_0xf1c353)[_0x0206('0xb8')](function(_0x40dbc8){var _0x2032d7=_[_0x0206('0x14f')](_0x40dbc8);if(_0x2032d7){return _0x41399c(_0x2032d7);}else{_0x21a3c4[_0x0206('0x3c')]=_0x56597a?'GLOBAL_INTERVAL_IS_OVERTIME':_0x0206('0x150');return _0x2f7312(msgResponse(_0x0206('0x151'),'Failure',_0x0206('0x152')+_0x56597a+'\x20'+_0xfb3e3a+'\x20Interval\x20is\x20overtime:\x20'+util[_0x0206('0x95')](_0x40f17f,{'showHidden':![],'depth':null})+_0x0206('0x153')+_0x463502));}})[_0x0206('0xb1')](function(_0x142995){return _0x2f7312(msgResponse(_0x0206('0x142'),_0x0206('0x143'),JSON[_0x0206('0x48')](_0x142995)));});});};Dialer['prototype'][_0x0206('0x154')]=function(_0x3f40b3){var _0x5dc9dd=this;return function(){switch(_0x3f40b3['dialMethod']){case _0x0206('0x155'):freeVariablesPredictive(_0x3f40b3);_0x5dc9dd[_0x0206('0x156')](_0x3f40b3,0x1);break;case _0x0206('0x157'):freeVariablesPredictive(_0x3f40b3);_0x5dc9dd[_0x0206('0x156')](_0x3f40b3,_0x3f40b3[_0x0206('0x158')]);break;case _0x0206('0x159'):_0x5dc9dd['predictive'](_0x3f40b3);break;case _0x0206('0x8'):freeVariablesPredictive(_0x3f40b3);_0x5dc9dd[_0x0206('0x156')](_0x3f40b3,0x1);break;default:freeVariablesPredictive(_0x3f40b3);logger['error'](_0x0206('0x15a'),_0x3f40b3[_0x0206('0x3e')],_0x0206('0x15b'));}};};Dialer[_0x0206('0x1b')][_0x0206('0x15c')]=function(_0x4608f4){var _0x464714=this;return function(){_0x464714[_0x0206('0x15d')](_0x4608f4);};};Dialer[_0x0206('0x1b')]['syncQueueSummary']=function(_0x1660e6){var _0x5a5bcf=this;if(isNotPreview(_0x1660e6[_0x0206('0x5a')])){if(isVoiceQueueOutbound(_0x1660e6[_0x0206('0x55')])&&isActive(_0x1660e6[_0x0206('0x15e')])){_0x1660e6[_0x0206('0x9f')]=!![];BPromise[_0x0206('0xb7')]()[_0x0206('0xb8')](checkIsLoggedIn(_0x1660e6,_0x1660e6[_0x0206('0x51')]))[_0x0206('0xb8')](checkIsActive(_0x1660e6,_0x1660e6[_0x0206('0x15e')]))[_0x0206('0xb8')](checkInterval(_0x1660e6))['then'](_0x5a5bcf['checkIsTrunkReachable'](_0x1660e6))[_0x0206('0xb8')](_0x5a5bcf[_0x0206('0x140')](_0x1660e6[_0x0206('0x15f')],_0x1660e6[_0x0206('0x160')],_0x1660e6[_0x0206('0x3e')],_0x1660e6))[_0x0206('0xb8')](_0x5a5bcf[_0x0206('0x141')](_0x1660e6['Interval'],_0x1660e6['dialTimezone'],_0x1660e6[_0x0206('0x3e')],_0x1660e6))[_0x0206('0xb8')](_0x5a5bcf['checkDialMethod'](_0x1660e6))[_0x0206('0xb1')](loggerCatchQueueSummary(_0x0206('0x161'),_0x1660e6));}else{notSendMessagesQueue(_0x1660e6);}}else{freeVariablesPredictive(_0x1660e6);}};Dialer['prototype'][_0x0206('0x13d')]=function(){var _0xee6fd4=this;var _0x3fea3f;for(var _0x2df2e7 in this[_0x0206('0xb5')]){if(typeof this[_0x0206('0xb5')][_0x2df2e7]!==_0x0206('0xac')){_0x3fea3f=this[_0x0206('0xb5')][_0x2df2e7];if(isCampaignIvr(_0x3fea3f[_0x0206('0x55')])&&isActive(_0x3fea3f[_0x0206('0x79')])){_0x3fea3f['sendMessageOneNotActive']=!![];BPromise['resolve']()[_0x0206('0xb8')](checkIsActive(_0x3fea3f,_0x3fea3f[_0x0206('0x79')]))[_0x0206('0xb8')](checkInterval(_0x3fea3f))[_0x0206('0xb8')](_0xee6fd4[_0x0206('0x162')](_0x3fea3f))['then'](_0xee6fd4[_0x0206('0x140')](_0x3fea3f[_0x0206('0x15f')],_0x3fea3f[_0x0206('0x160')],_0x3fea3f[_0x0206('0x3e')],_0x3fea3f))[_0x0206('0xb8')](_0xee6fd4[_0x0206('0x141')](_0x3fea3f[_0x0206('0x44')],_0x3fea3f['dialTimezone'],_0x3fea3f[_0x0206('0x3e')],_0x3fea3f))[_0x0206('0xb8')](_0xee6fd4[_0x0206('0x15c')](_0x3fea3f))[_0x0206('0xb1')](loggerCatchQueueSummary('[syncCampaigns]',_0x3fea3f));}else{notSendMessagesCampaign(_0x3fea3f);}}}};function getCallerIdRandom(_0x5f206f,_0x4eb362){var _0x1eacce;var _0x1ccdae;var _0x208694;if(_0x4eb362<=0x0){_0x4eb362=0x1;}_0x1eacce=new RegExp(_0x0206('0x163')+_0x4eb362+'}$');_0x1ccdae=Math[_0x0206('0x164')](0xa,_0x4eb362-0x1);_0x208694=Math[_0x0206('0x164')](0xa,_0x4eb362)-0x1;return util['format']('%s',_['replace'](_0x5f206f,_0x1eacce,_[_0x0206('0x165')](_0x1ccdae,_0x208694)));}function extractCalleridName(_0x4bf181){var _0xf4998f=_0x4bf181['match'](/"(.*?)"/);return _0xf4998f?_0xf4998f[0x1]:_0x4bf181;}function extractCalleridNumber(_0x187713){var _0x447f36=_0x187713[_0x0206('0x166')](/<(.*?)>/);return _0x447f36?_0x447f36[0x1]:_0x187713;}Dialer[_0x0206('0x1b')][_0x0206('0x167')]=function(_0x418d04,_0x4da385){var _0x412cab=this;var _0x2aa1ef=uuid['v4']();this['actions'][_0x2aa1ef]=new Action(_0x418d04,_0x4da385,_0x2aa1ef);return new BPromise(function(_0x138cd8,_0x3ad4c2){if(_[_0x0206('0x3b')](_0x418d04)&&typeof _0x418d04!==_0x0206('0x168')){return _0x3ad4c2(msgResponse(_0x0206('0x169'),_0x0206('0x143'),_0x0206('0x16a')));}if(_[_0x0206('0x3b')](_0x4da385[_0x0206('0x16b')][_0x0206('0x16c')])||_0x4da385['Contact']['phone']===null){return _0x3ad4c2(msgResponse(_0x0206('0x169'),_0x0206('0x143'),_0x0206('0x16d')));}var _0x3568be={'XMD-CALLERID':_0x412cab[_0x0206('0x24')][_0x2aa1ef][_0x0206('0x16e')](),'XMD-AGI':_0x418d04[_0x0206('0x105')]?util[_0x0206('0x7b')](_0x0206('0x16f'),ipAgi,_0x418d04[_0x0206('0x105')]):_0x0206('0x170'),'XMD-AGIAFTER':_0x418d04[_0x0206('0x10e')]?util[_0x0206('0x7b')]('\x22agi://%s/square,%s\x22',ipAgi,_0x418d04[_0x0206('0x10e')]):'NONE','XMD-QUEUE':_0x418d04[_0x0206('0x55')]==='outbound'?util[_0x0206('0x7b')](_0x0206('0x171'),_0x418d04['name'],_0x418d04[_0x0206('0x172')]||'',_0x418d04['dialAgiAfterHangupAgent']?'c':'',_0x418d04[_0x0206('0x117')]||0x3):_0x0206('0x170'),'XMD-CONTACTID':_0x4da385[_0x0206('0xd1')],'XMD-CDRTYPE':'dialer','CALLERID(all)':_0x412cab[_0x0206('0x24')][_0x2aa1ef][_0x0206('0x16e')](),'XMD-AMD':_0x418d04[_0x0206('0xe6')]?'ACTIVE':_0x0206('0x170'),'XMD-DESTINATION':_0x0206('0xdd')};if(_0x418d04['dialAMDActive']){_0x3568be[_0x0206('0x173')]=_0x418d04[_0x0206('0x174')]||0x9c4;_0x3568be[_0x0206('0x175')]=_0x418d04[_0x0206('0x176')]||0x5dc;_0x3568be[_0x0206('0x177')]=_0x418d04[_0x0206('0x178')]||0x320;_0x3568be[_0x0206('0x179')]=_0x418d04['dialAMDTotalAnalysisTime']||0x1388;_0x3568be[_0x0206('0x17a')]=_0x418d04[_0x0206('0x17b')]||0x64;_0x3568be[_0x0206('0x17c')]=_0x418d04['dialAMDBetweenWordsSilence']||0x32;_0x3568be['XMD-AMDMAXIMUMNUMBEROFWORDS']=_0x418d04[_0x0206('0x17d')]||0x3;_0x3568be[_0x0206('0x17e')]=_0x418d04[_0x0206('0x17f')]||0x100;_0x3568be[_0x0206('0x180')]=_0x418d04['dialAMDMaximumWordLength']||0x1388;}if(_0x418d04[_0x0206('0x55')]===_0x0206('0x4d')){_0x3568be[_0x0206('0x181')]=_0x4da385[_0x0206('0xfc')];}else{_0x3568be['XMD-CAMPAIGNID']=_0x4da385[_0x0206('0xd3')];}for(var _0x7ae9f3 in _0x4da385['Contact']){if(typeof _0x4da385[_0x0206('0x16b')][_0x7ae9f3]!==_0x0206('0xac')){if(isNotNull(_0x4da385['Contact'][_0x7ae9f3])&&_0x7ae9f3!=='id'&&_0x7ae9f3!==_0x0206('0x182')&&_0x7ae9f3!==_0x0206('0x183')&&_0x7ae9f3!==_0x0206('0x184')){_0x3568be[util[_0x0206('0x7b')](_0x0206('0x185'),'XMD-',_[_0x0206('0x186')](_0x7ae9f3))]=_0x4da385[_0x0206('0x16b')][_0x7ae9f3];}}}var _0x51c9a2=_0x412cab[_0x0206('0xd7')](_0x418d04['Trunk'])?getCallerId(_0x418d04[_0x0206('0x78')][_0x0206('0x7a')],_0x418d04[_0x0206('0x5b')],_0x418d04[_0x0206('0x187')]>0x0?getCallerIdRandom(_0x418d04[_0x0206('0x188')],_0x418d04[_0x0206('0x187')]):_0x418d04[_0x0206('0x188')]):getCallerId(_[_0x0206('0xae')](_0x418d04[_0x0206('0x189')])?_0x418d04[_0x0206('0x78')][_0x0206('0x7a')]:_0x418d04[_0x0206('0x189')][_0x0206('0x7a')],_0x418d04[_0x0206('0x5b')],_0x418d04[_0x0206('0x187')]>0x0?getCallerIdRandom(_0x418d04['dialOriginateCallerIdNumber'],_0x418d04[_0x0206('0x187')]):_0x418d04[_0x0206('0x188')]);if(_0x51c9a2){_0x3568be[_0x0206('0x18a')]=_0x412cab[_0x0206('0x24')][_0x2aa1ef][_0x0206('0x18b')]=extractCalleridName(_0x51c9a2);_0x3568be[_0x0206('0x18c')]=_0x412cab[_0x0206('0x24')][_0x2aa1ef][_0x0206('0x18d')]=extractCalleridNumber(_0x51c9a2);}return ami[_0x0206('0xaf')]({'actionid':_0x2aa1ef,'action':_0x0206('0x169'),'channel':_0x412cab[_0x0206('0xd7')](_0x418d04[_0x0206('0x78')])?util[_0x0206('0x7b')](_0x0206('0x18e'),_0x418d04[_0x0206('0x78')][_0x0206('0x3e')],isNotNull(_0x418d04[_0x0206('0x5d')])?_0x418d04[_0x0206('0x5d')]['trim']()||'':'',_0x418d04[_0x0206('0x18f')]>0x0?_0x4da385[_0x0206('0x16b')]['phone'][_0x0206('0x190')](_0x418d04[_0x0206('0x18f')]):_0x4da385['Contact'][_0x0206('0x16c')]):util['format'](_0x0206('0x18e'),_['isNil'](_0x418d04[_0x0206('0x189')])?_0x418d04['Trunk']['name']:_0x418d04[_0x0206('0x189')][_0x0206('0x3e')],isNotNull(_0x418d04[_0x0206('0x5d')])?_0x418d04[_0x0206('0x5d')][_0x0206('0x191')]()||'':'',_0x418d04[_0x0206('0x18f')]>0x0?_0x4da385[_0x0206('0x16b')][_0x0206('0x16c')][_0x0206('0x190')](_0x418d04[_0x0206('0x18f')]):_0x4da385[_0x0206('0x16b')][_0x0206('0x16c')]),'callerid':_0x51c9a2,'Exten':_0x0206('0xdd'),'Context':_0x0206('0x192'),'Priority':'1','variable':_0x3568be,'timeout':(_0x418d04[_0x0206('0x5c')]||0x1e)*0x3e8,'async':!![],'channelid':_0x2aa1ef})[_0x0206('0xb8')](function(_0x3c222f){return _0x138cd8(_0x3c222f);})[_0x0206('0xb1')](function(_0x38b70a){_0x418d04[_0x0206('0x67')]+=0x1;var _0x39e5f2=new History(_0x412cab[_0x0206('0x24')][_0x2aa1ef]);logger[_0x0206('0x94')](util[_0x0206('0x7b')](_0x0206('0x193'),JSON[_0x0206('0x48')](_0x38b70a)));_0x39e5f2[_0x0206('0xa5')]=0xe;_0x39e5f2[_0x0206('0xa6')]='OriginateError';_0x39e5f2['starttime']=moment()[_0x0206('0x7b')](_0x0206('0xfb'));_0x39e5f2[_0x0206('0xa7')]=_0x39e5f2[_0x0206('0xa8')];_0x412cab['createHistory'](_0x39e5f2)[_0x0206('0xb1')](loggerCatch(_0x0206('0x194')));_0x412cab[_0x0206('0xc9')](_0x39e5f2)[_0x0206('0xb1')](loggerCatch('[originate][error]'))['finally'](function(){delete _0x412cab[_0x0206('0x24')][_0x2aa1ef];return _0x3ad4c2(msgResponse('originate',_0x0206('0x195'),_0x0206('0x196')));});});});};Dialer[_0x0206('0x1b')][_0x0206('0x2f')]=function(_0x1bcacc){var _0x25dabf=this[_0x0206('0x24')][_0x1bcacc[_0x0206('0x125')]];if(_0x25dabf){delete this[_0x0206('0x24')][_0x1bcacc[_0x0206('0x125')]];_0x25dabf['responsetime']=moment()[_0x0206('0x7b')](_0x0206('0xfb'));var _0x3a0f09=_0x25dabf[_0x0206('0x55')]==='ivr'?this[_0x0206('0xb5')][_0x25dabf['queue']]:this[_0x0206('0x1f')][_0x25dabf[_0x0206('0x197')]()];if(!this[_0x0206('0xd5')](_0x1bcacc[_0x0206('0x198')])){this['updateOriginated'](_0x3a0f09);return this['callProgressDetecting'](_0x25dabf,_0x3a0f09,_0x1bcacc)[_0x0206('0xb1')](loggerCatch(_0x0206('0x199')));}this[_0x0206('0x26')][_0x1bcacc[_0x0206('0xdf')]]=_0x25dabf;}};Dialer[_0x0206('0x1b')][_0x0206('0x19a')]=function(_0x54d63e,_0x440de8,_0x356ec4){var _0x3b9464=new History(_0x440de8);if(_0x3b9464[_0x0206('0xee')]+_0x3b9464[_0x0206('0xef')]+_0x3b9464[_0x0206('0xf0')]+_0x3b9464[_0x0206('0xf1')]+_0x3b9464[_0x0206('0xf2')]+_0x3b9464['countabandonedretry']+_0x3b9464[_0x0206('0xea')]+_0x3b9464[_0x0206('0xf3')]>=_0x356ec4[_0x0206('0xf4')]-0x1){return!![];}switch(_0x54d63e){case 0x3:if(_0x3b9464[_0x0206('0xf0')]>=_0x356ec4['dialNoAnswerMaxRetry']-0x1){return!![];}this[_0x0206('0xc0')]({'active':![],'countnoanswerretry':_0x3b9464[_0x0206('0xf0')]+=0x1,'scheduledat':moment()['add'](_0x356ec4[_0x0206('0x19b')],_0x0206('0xfa'))[_0x0206('0x7b')](_0x0206('0xfb')),'ContactId':_0x3b9464[_0x0206('0xd1')],'ListId':_0x3b9464[_0x0206('0xd2')],'VoiceQueueId':_0x3b9464['VoiceQueueId']||undefined,'CampaignId':_0x3b9464[_0x0206('0xd3')]||undefined})['catch'](loggerCatch(_0x0206('0x19c')));break;case 0x5:if(_0x3b9464['countbusyretry']>=_0x356ec4['dialBusyMaxRetry']-0x1){return!![];}this[_0x0206('0xc0')]({'active':![],'countbusyretry':_0x3b9464[_0x0206('0xee')]+=0x1,'scheduledat':moment()['add'](_0x356ec4[_0x0206('0x19d')],'minutes')[_0x0206('0x7b')](_0x0206('0xfb')),'ContactId':_0x3b9464[_0x0206('0xd1')],'ListId':_0x3b9464['ListId'],'VoiceQueueId':_0x3b9464[_0x0206('0xfc')]||undefined,'CampaignId':_0x3b9464['CampaignId']||undefined})[_0x0206('0xb1')](loggerCatch(_0x0206('0x19e')));break;case 0x8:if(_0x3b9464[_0x0206('0xef')]>=_0x356ec4[_0x0206('0x19f')]-0x1){return!![];}this['rescheduleContact']({'active':![],'countcongestionretry':_0x3b9464[_0x0206('0xef')]+=0x1,'scheduledat':moment()[_0x0206('0xf9')](_0x356ec4[_0x0206('0x1a0')],_0x0206('0xfa'))[_0x0206('0x7b')](_0x0206('0xfb')),'ContactId':_0x3b9464['ContactId'],'ListId':_0x3b9464[_0x0206('0xd2')],'VoiceQueueId':_0x3b9464[_0x0206('0xfc')]||undefined,'CampaignId':_0x3b9464['CampaignId']||undefined})[_0x0206('0xb1')](loggerCatch('[rescheduleContact]\x20[Congestion]'));break;case 0x0:if(_0x3b9464[_0x0206('0xf1')]>=_0x356ec4[_0x0206('0x1a1')]-0x1){return!![];}else{this[_0x0206('0xc0')]({'active':![],'countnosuchnumberretry':_0x3b9464[_0x0206('0xf1')]+=0x1,'scheduledat':moment()[_0x0206('0xf9')](_0x356ec4['dialNoSuchNumberRetryFrequency'],'minutes')[_0x0206('0x7b')](_0x0206('0xfb')),'ContactId':_0x3b9464[_0x0206('0xd1')],'ListId':_0x3b9464['ListId'],'VoiceQueueId':_0x3b9464[_0x0206('0xfc')]||undefined,'CampaignId':_0x3b9464[_0x0206('0xd3')]||undefined})[_0x0206('0xb1')](loggerCatch(_0x0206('0x1a2')));}break;case 0xa:if(_0x3b9464[_0x0206('0xf2')]>=_0x356ec4[_0x0206('0x11b')]-0x1){return!![];}this[_0x0206('0xc0')]({'active':![],'countdropretry':_0x3b9464[_0x0206('0xf2')]+=0x1,'scheduledat':moment()['add'](_0x356ec4[_0x0206('0x1a3')],_0x0206('0xfa'))[_0x0206('0x7b')](_0x0206('0xfb')),'ContactId':_0x3b9464[_0x0206('0xd1')],'ListId':_0x3b9464[_0x0206('0xd2')],'VoiceQueueId':_0x3b9464['VoiceQueueId']||undefined,'CampaignId':_0x3b9464[_0x0206('0xd3')]||undefined})[_0x0206('0xb1')](loggerCatch(_0x0206('0x1a4')));break;case 0xb:if(_0x3b9464[_0x0206('0x101')]>=_0x356ec4[_0x0206('0x121')]-0x1){return!![];}this[_0x0206('0xc0')]({'active':![],'countabandonedretry':_0x3b9464[_0x0206('0x101')]+=0x1,'scheduledat':moment()['add'](_0x356ec4['dialAbandonedRetryFrequency'],_0x0206('0xfa'))[_0x0206('0x7b')](_0x0206('0xfb')),'ContactId':_0x3b9464['ContactId'],'ListId':_0x3b9464['ListId'],'VoiceQueueId':_0x3b9464[_0x0206('0xfc')]||undefined,'CampaignId':_0x3b9464[_0x0206('0xd3')]||undefined})['catch'](loggerCatch('[rescheduleContact][Abandoned]'));break;case 0x13:if(_0x3b9464[_0x0206('0xea')]>=_0x356ec4[_0x0206('0xf6')]-0x1){return!![];}this['rescheduleContact']({'active':![],'countmachineretry':_0x3b9464['countmachineretry']+=0x1,'scheduledat':moment()[_0x0206('0xf9')](_0x356ec4['dialMachineRetryFrequency'],_0x0206('0xfa'))[_0x0206('0x7b')](_0x0206('0xfb')),'ContactId':_0x3b9464[_0x0206('0xd1')],'ListId':_0x3b9464['ListId'],'VoiceQueueId':_0x3b9464[_0x0206('0xfc')]||undefined,'CampaignId':_0x3b9464['CampaignId']||undefined})[_0x0206('0xb1')](loggerCatch(_0x0206('0xfd')));break;case 0x14:if(_0x3b9464['countagentrejectretry']>=_0x356ec4[_0x0206('0x1a5')]-0x1){return!![];}this[_0x0206('0xc0')]({'active':![],'countagentrejectretry':_0x3b9464[_0x0206('0xf3')]+=0x1,'scheduledat':moment()[_0x0206('0xf9')](_0x356ec4['dialAgentRejectRetryFrequency'],_0x0206('0xfa'))['format'](_0x0206('0xfb')),'ContactId':_0x3b9464['ContactId'],'ListId':_0x3b9464[_0x0206('0xd2')],'VoiceQueueId':_0x3b9464[_0x0206('0xfc')]||undefined,'CampaignId':_0x3b9464['CampaignId']||undefined})[_0x0206('0xb1')](loggerCatch(_0x0206('0x1a6')));break;default:return!![];}};Dialer[_0x0206('0x1b')]['callProgressDetecting']=function(_0x2d3a95,_0x56fea6,_0x59e086){var _0x1aee40=this;var _0x2ddaf6=new History(_0x2d3a95);return new BPromise(function(_0x26be5f,_0x321bb8){if(_['isUndefined'](_0x56fea6)&&typeof _0x56fea6!==_0x0206('0x168')){return _0x321bb8(msgResponse(_0x0206('0x1a7'),_0x0206('0x143'),'entity\x20is\x20undefine'));}if(_[_0x0206('0x3b')](_0x59e086)&&typeof _0x59e086!=='object'){return _0x321bb8(msgResponse(_0x0206('0x1a7'),_0x0206('0x143'),'evt\x20is\x20undefine'));}switch(_0x59e086[_0x0206('0x10b')]){case'0':_0x56fea6[_0x0206('0x66')]+=0x1;_0x2ddaf6[_0x0206('0xa5')]=0x0;_0x2ddaf6['statedesc']='NoSuchNumber';_0x2ddaf6[_0x0206('0xf1')]+=0x1;_0x2ddaf6[_0x0206('0xeb')]+=0x1;ami['emit'](_0x0206('0x1a8'),ut[_0x0206('0xed')](_0x2d3a95,_0x0206('0x1a9')));_0x1aee40[_0x0206('0xcb')](_0x2ddaf6)[_0x0206('0xb1')](loggerCatch('[syncAgentComplete][createHistory][0]'));if(_0x1aee40[_0x0206('0x19a')](0x0,_0x2d3a95,_0x56fea6)){if(_0x2ddaf6['countnosuchnumberretry']>=_0x56fea6[_0x0206('0x1a1')]){_0x1aee40[_0x0206('0xf7')](_0x2ddaf6,_0x26be5f,_0x321bb8,_0x0206('0x1aa'));}else{_0x1aee40['stateGlobal'](_0x2ddaf6,_0x26be5f,_0x321bb8,_0x0206('0x1aa'));}}break;case'3':_0x56fea6['outboundNoAnswerCallsDay']+=0x1;_0x2ddaf6[_0x0206('0xa5')]=0x3;_0x2ddaf6['statedesc']=_0x0206('0x1ab');_0x2ddaf6[_0x0206('0xf0')]+=0x1;_0x2ddaf6['countglobal']+=0x1;ami[_0x0206('0x4c')]('custom:agentnoanswer',ut[_0x0206('0xed')](_0x2d3a95,'noanswer'));_0x1aee40['createHistory'](_0x2ddaf6)['catch'](loggerCatch(_0x0206('0x1ac')));if(_0x1aee40[_0x0206('0x19a')](0x3,_0x2d3a95,_0x56fea6)){if(_0x2ddaf6[_0x0206('0xf0')]>=_0x56fea6['dialNoAnswerMaxRetry']){_0x1aee40[_0x0206('0xf7')](_0x2ddaf6,_0x26be5f,_0x321bb8,'reason\x203\x20ringing\x20no\x20answer');}else{_0x1aee40[_0x0206('0x102')](_0x2ddaf6,_0x26be5f,_0x321bb8,_0x0206('0x1ad'));}}break;case'5':_0x56fea6[_0x0206('0x61')]+=0x1;_0x2ddaf6[_0x0206('0xa5')]=0x5;_0x2ddaf6[_0x0206('0xa6')]=_0x0206('0x1ae');_0x2ddaf6[_0x0206('0xee')]+=0x1;_0x2ddaf6[_0x0206('0xeb')]+=0x1;ami[_0x0206('0x4c')]('custom:agentbusy',ut[_0x0206('0xed')](_0x2d3a95,'busy'));_0x1aee40['createHistory'](_0x2ddaf6)[_0x0206('0xb1')](loggerCatch(_0x0206('0x1af')));if(_0x1aee40[_0x0206('0x19a')](0x5,_0x2d3a95,_0x56fea6)){if(_0x2ddaf6[_0x0206('0xee')]>=_0x56fea6[_0x0206('0x1b0')]){_0x1aee40['createStateFinal'](_0x2ddaf6,_0x26be5f,_0x321bb8,_0x0206('0x1b1'));}else{_0x1aee40[_0x0206('0x102')](_0x2ddaf6,_0x26be5f,_0x321bb8,_0x0206('0x1b1'));}}break;case'8':_0x56fea6[_0x0206('0x62')]+=0x1;_0x2ddaf6[_0x0206('0xa5')]=0x8;_0x2ddaf6['statedesc']=_0x0206('0x1b2');_0x2ddaf6[_0x0206('0xef')]+=0x1;_0x2ddaf6[_0x0206('0xeb')]+=0x1;ami[_0x0206('0x4c')](_0x0206('0x1b3'),ut[_0x0206('0xed')](_0x2d3a95,_0x0206('0x1b4')));_0x1aee40[_0x0206('0xcb')](_0x2ddaf6)[_0x0206('0xb1')](loggerCatch(_0x0206('0x1b5')));if(_0x1aee40[_0x0206('0x19a')](0x8,_0x2d3a95,_0x56fea6)){if(_0x2ddaf6[_0x0206('0xef')]>=_0x56fea6['dialCongestionMaxRetry']){_0x1aee40[_0x0206('0xf7')](_0x2ddaf6,_0x26be5f,_0x321bb8,'reason\x208\x20congestion');}else{_0x1aee40[_0x0206('0x102')](_0x2ddaf6,_0x26be5f,_0x321bb8,_0x0206('0x1b6'));}}break;case'11':_0x56fea6[_0x0206('0x1b7')]+=0x1;_0x2ddaf6[_0x0206('0xa5')]=0xb;_0x2ddaf6['statedesc']=_0x0206('0x11f');_0x2ddaf6['countabandonedretry']+=0x1;_0x2ddaf6['countglobal']+=0x1;_0x1aee40[_0x0206('0xcb')](_0x2ddaf6)[_0x0206('0xb1')](loggerCatch(_0x0206('0x124')));if(_0x1aee40[_0x0206('0x19a')](0xb,_0x2d3a95,_0x56fea6)){if(_0x2ddaf6[_0x0206('0x101')]>=_0x56fea6[_0x0206('0x121')]){_0x1aee40['createStateFinal'](_0x2ddaf6,_0x26be5f,_0x321bb8,_0x0206('0x1b8'));}else{_0x1aee40[_0x0206('0x102')](_0x2ddaf6,_0x26be5f,_0x321bb8,_0x0206('0x1b8'));}}break;case'20':_0x56fea6[_0x0206('0x69')]+=0x1;_0x2ddaf6[_0x0206('0xa5')]=0x14;_0x2ddaf6[_0x0206('0xa6')]=_0x0206('0x1b9');_0x2ddaf6[_0x0206('0xf3')]+=0x1;_0x2ddaf6[_0x0206('0xeb')]+=0x1;ami[_0x0206('0x4c')](_0x0206('0x1ba'),ut[_0x0206('0xed')](_0x2d3a95,_0x0206('0x1bb')));_0x1aee40[_0x0206('0xcb')](_0x2ddaf6)['catch'](loggerCatch('[syncAgentComplete][createHistory][20]'));if(_0x1aee40[_0x0206('0x19a')](0x14,_0x2d3a95,_0x56fea6)){if(_0x2ddaf6[_0x0206('0xf3')]>=_0x56fea6['dialAgentRejectMaxRetry']){_0x1aee40[_0x0206('0xf7')](_0x2ddaf6,_0x26be5f,_0x321bb8,_0x0206('0x1bc'));}else{_0x1aee40[_0x0206('0x102')](_0x2ddaf6,_0x26be5f,_0x321bb8,_0x0206('0x1bc'));}}break;default:_0x56fea6[_0x0206('0x6a')]+=0x1;_0x2ddaf6['state']=0xc;_0x2ddaf6[_0x0206('0xa6')]=_0x59e086[_0x0206('0x10b')];_0x1aee40[_0x0206('0xcb')](_0x2ddaf6)[_0x0206('0xb1')](loggerCatch(_0x0206('0x1bd')));if(_0x1aee40['checkRetriveMax'](_0x59e086['reason'],_0x2d3a95,_0x56fea6)){if(_0x2ddaf6[_0x0206('0xee')]+_0x2ddaf6[_0x0206('0xef')]+_0x2ddaf6[_0x0206('0xf0')]+_0x2ddaf6['countnosuchnumberretry']+_0x2ddaf6[_0x0206('0xf2')]+_0x2ddaf6[_0x0206('0x101')]+_0x2ddaf6['countmachineretry']+_0x2ddaf6[_0x0206('0xf3')]>=_0x56fea6[_0x0206('0xf4')]){_0x1aee40[_0x0206('0x102')](_0x2ddaf6,_0x26be5f,_0x321bb8,_0x59e086[_0x0206('0x10b')]);}else{_0x1aee40[_0x0206('0xf7')](_0x2ddaf6,_0x26be5f,_0x321bb8,_0x59e086['reason']);}}}});};Dialer[_0x0206('0x1b')]['stateGlobal']=function(_0x670d58,_0x6dffc2,_0x577a2a,_0x3cf695){var _0x476a87=new Final(_0x670d58);_0x476a87[_0x0206('0xa5')]=0xf;_0x476a87[_0x0206('0xa6')]=_0x0206('0x1be');this['createStateFinal'](_0x476a87,_0x6dffc2,_0x577a2a,_0x3cf695);};Dialer[_0x0206('0x1b')][_0x0206('0xf7')]=function(_0x2ce003,_0x3de8b8,_0x4af63a,_0x439b69){this[_0x0206('0xc9')](_0x2ce003)[_0x0206('0xb8')](function(){return _0x3de8b8(msgResponse(_0x0206('0x1a7'),'Success',_0x439b69));})[_0x0206('0xb1')](function(){return _0x4af63a(msgResponse('[moveContactManagedDialer][0]','Failure',_0x0206('0x1bf')));});};Dialer[_0x0206('0x1b')][_0x0206('0x159')]=function(_0x57ad95){var _0x5d2f41=_0x57ad95['dialPredictiveOptimizationPercentage']/0x64;var _0x2fc921=_0x57ad95[_0x0206('0x65')]/(_0x57ad95[_0x0206('0x65')]+_0x57ad95[_0x0206('0x5f')]);var _0x30a04b=Math[_0x0206('0x1c0')](_0x57ad95[_0x0206('0x1c1')]*(_0x57ad95[_0x0206('0x1c2')]/0x64));var _0x1cc705=Math[_0x0206('0x1c0')](_0x57ad95[_0x0206('0x1c1')]*(_0x57ad95[_0x0206('0x1c3')]/0x64));var _0xc58022=_0x57ad95[_0x0206('0x50')]+_0x57ad95[_0x0206('0x54')];var _0x33e779=Math['floor'](_0x57ad95[_0x0206('0x74')]*_0x57ad95['erlangAbandonmentRate']*_0x57ad95[_0x0206('0x71')]*_0x57ad95['predictiveIntervalMultiplicativeFactor']);if(_['isUndefined'](_0x57ad95[_0x0206('0x29')])){if(!_[_0x0206('0x3b')](_0x57ad95['startPredictive'])){_0x57ad95['startPredictive']=undefined;loggerPredictive[_0x0206('0x94')]('[startMethodPredictive][StartProgressive]',_0x0206('0x1c4'));}if(!_[_0x0206('0x3b')](_0x57ad95[_0x0206('0x8f')])){loggerPredictive[_0x0206('0x94')]('[startMethodPredictive][StartProgressive]',_0x0206('0x1c5'));clearInterval(_0x57ad95[_0x0206('0x8f')]);_0x57ad95[_0x0206('0x8f')]=undefined;}_0x57ad95[_0x0206('0x29')]=moment()[_0x0206('0x7b')](_0x0206('0xfb'));loggerPredictive[_0x0206('0x80')](_0x57ad95[_0x0206('0x3e')],'collection\x20data\x20in\x20progressive\x20at',_0x57ad95[_0x0206('0x29')]);this[_0x0206('0x156')](_0x57ad95,0x1);}else if(ifInterval(_0x57ad95['dialPredictiveInterval'],_0x57ad95[_0x0206('0x29')])){this['handlePower'](_0x57ad95,0x1);loggerPredictiveCalls[_0x0206('0x80')](_0x0206('0x1c6'),_0x57ad95[_0x0206('0x29')],_0x57ad95[_0x0206('0x3e')]);_0x57ad95[_0x0206('0x74')]=0x0;_0x57ad95[_0x0206('0x70')]=0x0;}else if(_0x5d2f41<_0x2fc921&&_0x57ad95['dialPredictiveOptimization']==='dropRate'){freeVariablesPredictive(_0x57ad95);loggerPredictive[_0x0206('0x80')](_0x0206('0x1c7'),_0x0206('0x1c8'),_0x2fc921,_0x0206('0x29'),_0x57ad95[_0x0206('0x3e')]);}else if(_0x33e779<_0x57ad95[_0x0206('0x70')]&&_0x57ad95[_0x0206('0x1c9')]===_0x0206('0x1ca')){freeVariablesPredictive(_0x57ad95);loggerPredictive[_0x0206('0x80')](_0x0206('0x1cb'),'Max\x20Drop\x20',_0x33e779,_0x0206('0x1cc'),_0x57ad95[_0x0206('0x70')],_0x0206('0x29'),_0x57ad95[_0x0206('0x3e')]);}else if(!ifInterval(_0x57ad95['dialPredictiveInterval'],_0x57ad95['startProgressive'])&&_[_0x0206('0x3b')](_0x57ad95[_0x0206('0x28')])&&!_[_0x0206('0x3b')](_0x57ad95['startProgressive'])){_0x57ad95[_0x0206('0x28')]=moment()[_0x0206('0x7b')](_0x0206('0xfb'));loggerPredictive[_0x0206('0x80')](_0x57ad95[_0x0206('0x3e')],_0x0206('0x1cd'),_0x57ad95['startPredictive']);this['averageHandleTime'](_0x57ad95[_0x0206('0x1ce')])[_0x0206('0xb8')](this[_0x0206('0x1cf')](_0x57ad95))['then'](mergeDataErlangB(_0x57ad95))[_0x0206('0xb8')](this[_0x0206('0x1d0')](_0x57ad95))[_0x0206('0xb1')](loggerCatchPredictive('Predictive\x20after\x20first\x20interval',_0x57ad95));}else if(!ifInterval(_0x57ad95['dialPredictiveInterval'],_0x57ad95['startPredictive'])){_0x57ad95[_0x0206('0x70')]=0x0;_0x57ad95[_0x0206('0x28')]=moment()[_0x0206('0x7b')](_0x0206('0xfb'));loggerPredictive[_0x0206('0x80')](_0x57ad95[_0x0206('0x3e')],'recalculate\x20predictive\x20at',_0x57ad95['startPredictive']);clearInterval(_0x57ad95[_0x0206('0x8f')]);_0x57ad95['handlePredictive']=undefined;this[_0x0206('0xbd')](_0x57ad95['dialPredictiveInterval'])[_0x0206('0xb8')](this[_0x0206('0x1cf')](_0x57ad95))[_0x0206('0xb8')](mergeDataErlangB(_0x57ad95))['then'](this[_0x0206('0x1d0')](_0x57ad95))[_0x0206('0xb1')](loggerCatchPredictive(_0x0206('0x1d1'),_0x57ad95));}else if(_0x57ad95[_0x0206('0x1c1')]&&_0xc58022<_0x57ad95[_0x0206('0x1c1')]-_0x1cc705){freeVariablesPredictive(_0x57ad95);loggerPredictive[_0x0206('0x80')](_0x57ad95[_0x0206('0x3e')],_0x0206('0x1d2'),_0xc58022,_0x0206('0x1d3'),_0x57ad95['predictiveIntervalAvailable'],'-',_0x1cc705,'=',_0x57ad95[_0x0206('0x1c1')]-_0x1cc705,')');}else if(_0x57ad95[_0x0206('0x1c1')]&&_0xc58022>_0x57ad95['predictiveIntervalAvailable']+_0x30a04b){freeVariablesPredictive(_0x57ad95);loggerPredictive[_0x0206('0x80')](_0x57ad95[_0x0206('0x3e')],_0x0206('0x1d2'),_0xc58022,_0x0206('0x1d4'),_0x57ad95[_0x0206('0x1c1')],'+',_0x30a04b,'=',_0x57ad95[_0x0206('0x1c1')]+_0x30a04b,')');}};Dialer[_0x0206('0x1b')][_0x0206('0x1cf')]=function(_0x14abbb){var _0x39508d=this;return function(_0x5f0419){return new BPromise(function(_0x1d0049,_0x48c298){_[_0x0206('0x8d')](_0x14abbb,_0x5f0419[0x0]);if(checkGetDataPredictive(_0x5f0419[0x0])){var _0x1212a5=_0x14abbb[_0x0206('0x1c1')]=_0x14abbb['talking']+_0x14abbb[_0x0206('0x50')];var _0x18b1d9=_0x14abbb[_0x0206('0x1ce')]*0x3c;var _0x155df9=_0x5f0419[0x0]['predictiveIntervalAvgTalktime']+_0x5f0419[0x0][_0x0206('0x84')];var _0x2f6e93=(_0x5f0419[0x0][_0x0206('0x6b')]+_0x5f0419[0x0][_0x0206('0x6e')]+_0x5f0419[0x0][_0x0206('0x6d')])/_0x5f0419[0x0]['predictiveIntervalTotalCalls'];_0x14abbb['predictiveIntervalHitRate']=_0x2f6e93>0x0?_0x2f6e93:0x1;switch(_0x14abbb[_0x0206('0x1c9')]){case'dropRate':var _0x5280b5=_0x14abbb[_0x0206('0x1d5')]/0x64;return _0x39508d[_0x0206('0x1d6')](_0x1212a5,_0x18b1d9,_0x155df9,_0x2f6e93,_0x5280b5)[_0x0206('0xb8')](function(_0x2dd16f){return _0x1d0049(_0x2dd16f);});case _0x0206('0x1d7'):var _0x423a9b=_0x14abbb[_0x0206('0x1d5')]/0x64;return _0x39508d['busyFactor'](_0x1212a5,_0x18b1d9,_0x155df9,_0x2f6e93,_0x423a9b)[_0x0206('0xb8')](function(_0x30d1bc){return _0x1d0049(_0x30d1bc);});default:return _0x48c298(msgResponse('[getDataPredictive]',_0x0206('0x143'),_0x0206('0x1d8')));}}else{return _0x48c298(msgResponse('[getDataPredictive]',_0x0206('0x143'),_0x0206('0x1d9')));}});};};Dialer[_0x0206('0x1b')][_0x0206('0x1da')]=function(_0x11ac7e){var _0x9ecf41=this;return function(_0x5050bf){return new BPromise(function(_0x38a4c5,_0x2d023b){_[_0x0206('0x8d')](_0x11ac7e,_0x5050bf[0x0]);if(checkGetDataPredictive(_0x5050bf[0x0])){loggerPredictive[_0x0206('0x80')](JSON[_0x0206('0x48')](_0x5050bf[0x0]));if(_0x11ac7e[_0x0206('0x1c9')]===_0x0206('0x1ca')){return _0x9ecf41[_0x0206('0xc7')](_0x11ac7e['id'])[_0x0206('0xb8')](function(_0xc33d21){var _0x5dd879=_0x11ac7e[_0x0206('0x51')]-_0xc33d21[0x0][_0x0206('0x1db')];var _0xf41e5a=_0x11ac7e['dialPredictiveInterval']*0x3c;var _0x3af30e=_0x5050bf[0x0][_0x0206('0x6c')]+_0x5050bf[0x0][_0x0206('0x84')];var _0x58ebd2=(_0x5050bf[0x0][_0x0206('0x6b')]+_0x5050bf[0x0][_0x0206('0x6e')]+_0x5050bf[0x0][_0x0206('0x6d')])/_0x5050bf[0x0][_0x0206('0x72')];var _0x31acd0=_0x11ac7e[_0x0206('0x1d5')]/0x64;_0x11ac7e['predictiveIntervalPauses']=_0xc33d21[0x0][_0x0206('0x1db')]||0x0;_0x11ac7e[_0x0206('0x71')]=_0x58ebd2>0x0?_0x58ebd2:0x1;return _0x9ecf41[_0x0206('0x1d6')](_0x5dd879,_0xf41e5a,_0x3af30e,_0x58ebd2,_0x31acd0);})[_0x0206('0xb8')](function(_0x407b17){return _0x38a4c5(_0x407b17);})[_0x0206('0xb1')](function(_0x3ccc83){return _0x2d023b(msgResponse(_0x0206('0x1dc'),'Failure',JSON['stringify'](_0x3ccc83)));});}if(_0x11ac7e[_0x0206('0x1c9')]===_0x0206('0x1d7')){return _0x9ecf41['getVoiceQueueRtPauses'](_0x11ac7e['id'])[_0x0206('0xb8')](function(_0x5cb4d6){var _0x93651=_0x11ac7e[_0x0206('0x51')]-_0x5cb4d6[0x0][_0x0206('0x1db')];var _0x270bb4=_0x11ac7e['dialPredictiveInterval']*0x3c;var _0x5a0e03=_0x5050bf[0x0][_0x0206('0x6c')]+_0x5050bf[0x0][_0x0206('0x84')];var _0x2968f9=(_0x5050bf[0x0][_0x0206('0x6b')]+_0x5050bf[0x0]['predictiveIntervalDroppedCallsTimeout']+_0x5050bf[0x0][_0x0206('0x6d')])/_0x5050bf[0x0][_0x0206('0x72')];var _0x54aca6=_0x11ac7e[_0x0206('0x1d5')]/0x64;_0x11ac7e[_0x0206('0x1dd')]=_0x5cb4d6[0x0][_0x0206('0x1db')]||0x0;_0x11ac7e[_0x0206('0x71')]=_0x2968f9>0x0?_0x2968f9:0x1;return _0x9ecf41[_0x0206('0x1de')](_0x93651,_0x270bb4,_0x5a0e03,_0x2968f9,_0x54aca6);})[_0x0206('0xb8')](function(_0x3e0f42){return _0x38a4c5(_0x3e0f42);})[_0x0206('0xb1')](function(_0x35c247){return _0x2d023b(msgResponse(_0x0206('0x1dc'),'Failure',JSON[_0x0206('0x48')](_0x35c247)));});}}else{return _0x2d023b(msgResponse('[getDataPredictive]','Failure',_0x0206('0x1d9')));}});};};Dialer['prototype'][_0x0206('0x1d0')]=function(_0x5d90fa){var _0x1d6b05=this;return function(){var _0x6af962=0x0;var _0x79633c=Math[_0x0206('0x1df')](_0x5d90fa[_0x0206('0x75')]*0x3e8);if(_0x79633c>0x0){_0x79633c=_0x79633c<0x64?0x64:_0x79633c;loggerPredictive['info'](_0x5d90fa[_0x0206('0x3e')],_0x0206('0x1e0'),_0x79633c,_0x0206('0x49'));_0x5d90fa['handlePredictive']=setInterval(function(){_0x1d6b05[_0x0206('0x8f')](_0x5d90fa);loggerPredictiveCalls[_0x0206('0x80')]('[handlePredictive]',_0x6af962+=0x1);},_0x79633c);}else{loggerPredictive['info'](_0x5d90fa[_0x0206('0x3e')],'fail\x20to\x20scheduled\x20calls');}};};Dialer[_0x0206('0x1b')]['checkContactBlack']=function(_0x5a244b,_0x32c82b){var _0x2e6596=this;return function(_0x3eb25b){if(_[_0x0206('0x46')](_0x3eb25b)){if(_[_0x0206('0xae')](_0x32c82b['UserId'])||!_0x32c82b[_0x0206('0x1e1')]){if(_0x5a244b[_0x0206('0x5a')]==='booked'){_0x5a244b[_0x0206('0x12a')]=_['isUndefined'](_0x5a244b[_0x0206('0x12a')])?!![]:_0x5a244b[_0x0206('0x12a')];var _0x5e6e64=uuid['v4']();_0x2e6596[_0x0206('0x24')][_0x5e6e64]=new Action(_0x5a244b,_0x32c82b,_0x5e6e64);loggerBooked[_0x0206('0x80')](_0x0206('0x1e2'),_0x5e6e64,_0x0206('0x1e3'),JSON[_0x0206('0x48')](_0x5a244b[_0x0206('0x12a')]),_0x0206('0x1e4'),_0x5a244b[_0x0206('0x3e')]);if(_0x5a244b[_0x0206('0x12a')]){_0x5a244b[_0x0206('0x12a')]=![];_0x2e6596[_0x0206('0x2a')][_0x2e6596['actions'][_0x5e6e64][_0x0206('0xb4')]]=[];ami[_0x0206('0xaf')]({'actionid':_0x5e6e64,'action':_0x0206('0x1e5'),'queue':_0x5a244b[_0x0206('0x3e')]})[_0x0206('0xb1')](function(){_0x2e6596[_0x0206('0xb3')](_0x5a244b);_0x2e6596[_0x0206('0xc0')]({'active':![],'ContactId':_0x2e6596[_0x0206('0x24')][_0x5e6e64][_0x0206('0xd1')],'ListId':_0x2e6596[_0x0206('0x24')][_0x5e6e64]['ListId'],'VoiceQueueId':_0x2e6596['actions'][_0x5e6e64][_0x0206('0xfc')]||undefined,'CampaignId':_0x2e6596[_0x0206('0x24')][_0x5e6e64]['CampaignId']||undefined})[_0x0206('0xb1')](loggerCatch(_0x0206('0x1e6')));delete _0x2e6596[_0x0206('0x24')][_0x5e6e64];});}else{loggerBooked[_0x0206('0x80')](_0x0206('0x1e7'),JSON[_0x0206('0x48')](_0x5a244b['queueStatusComplete']),'Queue:\x20',_0x5a244b['name']);_0x2e6596[_0x0206('0xb3')](_0x5a244b);_0x2e6596[_0x0206('0xc0')]({'active':![],'ContactId':_0x2e6596[_0x0206('0x24')][_0x5e6e64][_0x0206('0xd1')],'ListId':_0x2e6596[_0x0206('0x24')][_0x5e6e64]['ListId'],'VoiceQueueId':_0x2e6596['actions'][_0x5e6e64][_0x0206('0xfc')]||undefined,'CampaignId':_0x2e6596[_0x0206('0x24')][_0x5e6e64]['CampaignId']||undefined})[_0x0206('0xb1')](loggerCatch(_0x0206('0x1e6')));delete _0x2e6596['actions'][_0x5e6e64];}}else{return _0x2e6596[_0x0206('0x167')](_0x5a244b,_0x32c82b);}}else{if(getDiff(_0x32c82b[_0x0206('0x1e8')])<_0x5a244b[_0x0206('0x1e9')]*0x3c){if(_0x32c82b['Agent']&&!_0x32c82b[_0x0206('0x1ea')][_0x0206('0x1eb')]){_0x2e6596['preview'][_0x0206('0x135')](_0x32c82b['id'])[_0x0206('0x1d')](function(){_0x2e6596[_0x0206('0xb3')](_0x5a244b);});}else{_0x2e6596[_0x0206('0x1ec')]({'active':![]},_0x32c82b['id'],0x1)[_0x0206('0x1d')](function(){_0x2e6596[_0x0206('0xb3')](_0x5a244b);});}}else{_0x5a244b[_0x0206('0x68')]+=0x1;_0x2e6596[_0x0206('0xb3')](_0x5a244b);if(_0x5a244b[_0x0206('0x1ed')]){_0x2e6596['rescheduleContact']({'active':![],'recallme':![],'UserId':null,'ContactId':_0x32c82b[_0x0206('0xd1')],'ListId':_0x32c82b['ListId'],'VoiceQueueId':_0x32c82b['VoiceQueueId']||undefined,'CampaignId':_0x32c82b[_0x0206('0xd3')]||undefined})[_0x0206('0xb1')](loggerCatch(_0x0206('0x1ee')));_0x2e6596[_0x0206('0xcb')](createObjHistory(_0x5a244b,_0x32c82b,'RECALLINQUEUE',0x17,_0x0206('0x1ef')))[_0x0206('0xb1')](loggerCatch(_0x0206('0x1f0')));}else{_0x2e6596[_0x0206('0xcf')](createObjHistory(_0x5a244b,_0x32c82b,'RECALLFAILEDTIMEOUT',0x16,'RecallFailedTimeout'),_0x0206('0x1f1'),_0x0206('0x1f2'));}}}}else{_0x5a244b[_0x0206('0x60')]+=0x1;_0x2e6596[_0x0206('0xcf')](createObjHistory(_0x5a244b,_0x32c82b,_0x0206('0x1f3'),0xd,_0x0206('0x1f4')),_0x0206('0x1f5'),_0x0206('0x1f6'));throw _0x0206('0x1f7');}};};Dialer[_0x0206('0x1b')][_0x0206('0x15d')]=function(_0x4efc60){var _0x8ffd54=this;var _0x3a0891=_0x4efc60[_0x0206('0x1f8')]-_0x4efc60[_0x0206('0x73')]-_0x4efc60['temp'];emitCampaignSummary(_0x4efc60);if(_0x3a0891>0x0){if(_0x3a0891>this['maxNumberOriginate']){_0x3a0891=this['maxNumberOriginate'];}_0x4efc60[_0x0206('0xc4')]+=_0x3a0891;this[_0x0206('0xc5')](_0x4efc60['id'],_0x3a0891,_0x4efc60['dialOrderByScheduledAt'],_0x4efc60)[_0x0206('0xb8')](function(_0x346bb5){_0x4efc60['temp']-=_0x3a0891;_0x4efc60['temp']=_0x4efc60[_0x0206('0xc4')]>0x0?_0x4efc60[_0x0206('0xc4')]:0x0;if(!checkContactEmpty(_0x346bb5)){_0x4efc60[_0x0206('0x3c')]=_0x0206('0x9d');logger[_0x0206('0x80')](_0x0206('0x1f9')+_0x4efc60[_0x0206('0x3e')]);}else{_0x4efc60[_0x0206('0x73')]+=_0x346bb5['length'];_0x4efc60[_0x0206('0x3c')]=_0x0206('0x1fa');for(var _0x3c51b0=0x0;_0x3c51b0<_0x346bb5[_0x0206('0x97')];_0x3c51b0+=0x1){_0x4efc60[_0x0206('0x1fb')]+=0x1;if(_[_0x0206('0xae')](_0x346bb5[_0x3c51b0])||_['isNil'](_0x346bb5[_0x3c51b0]['Contact'])||_[_0x0206('0xae')](_0x346bb5[_0x3c51b0][_0x0206('0x16b')][_0x0206('0x16c')])){_0x8ffd54[_0x0206('0x1fc')](_0x0206('0x1fd'),_0x4efc60,_0x346bb5[_0x3c51b0]);}else{_0x8ffd54[_0x0206('0xbb')](_[_0x0206('0xd0')](_0x346bb5[_0x3c51b0],['CampaignId','Contact.phone']))[_0x0206('0xb8')](_0x8ffd54['checkContactBlack'](_0x4efc60,_0x346bb5[_0x3c51b0]))[_0x0206('0xb1')](_0x8ffd54[_0x0206('0x1fe')](_0x0206('0x1ff'),_0x4efc60));}}}})[_0x0206('0xb1')](loggerGetContactDialer(_0x0206('0x200'),_0x4efc60,_0x3a0891));}};Dialer[_0x0206('0x1b')][_0x0206('0x156')]=function(_0x488db7,_0x4733e1){var _0x31b0bd=this;var _0x36d5b4=[];var _0x4eca96=_0x4733e1>=0x1?_0x4733e1:0x1;if(_0x488db7[_0x0206('0x5a')]===_0x0206('0x8')){_0x4eca96=0x1;}var _0x228215=Math[_0x0206('0x1df')](_0x488db7[_0x0206('0x50')]*_0x4eca96)-_0x488db7[_0x0206('0x73')]-_0x488db7['temp'];emitVoiceQueueSummary(_0x488db7);if(_0x488db7['dialLimitQueue']>0x0){var _0x4da032=_0x488db7[_0x0206('0x201')]-_0x488db7[_0x0206('0x73')]-_0x488db7[_0x0206('0x54')]-_0x488db7[_0x0206('0xc4')]-_0x488db7[_0x0206('0x52')];if(_0x228215>_0x4da032){_0x228215=_0x4da032;}}if(_0x228215>0x0){if(_0x488db7[_0x0206('0x5a')]===_0x0206('0x8')){_0x228215=0x1;}if(_0x228215>this[_0x0206('0x22')]){_0x228215=this['maxNumberOriginate'];}_0x488db7[_0x0206('0xc4')]+=_0x228215;for(var _0x10d34c in this[_0x0206('0x20')]){if(typeof this['agents'][_0x10d34c]!==_0x0206('0xac')){if(this[_0x0206('0x20')][_0x10d34c][_0x0206('0xa5')]===_0x0206('0x202')&&this[_0x0206('0x20')][_0x10d34c]['status']===_0x0206('0xd9')){_0x36d5b4[_0x0206('0x129')](this['agents'][_0x10d34c]['id']);}}}this[_0x0206('0xc3')](_0x488db7['id'],_0x36d5b4,_0x228215,_0x488db7[_0x0206('0x203')],_0x488db7)['then'](function(_0xb3b21){_0x488db7['temp']-=_0x228215;_0x488db7[_0x0206('0xc4')]=_0x488db7[_0x0206('0xc4')]>0x0?_0x488db7['temp']:0x0;if(!checkContactEmpty(_0xb3b21)){_0x31b0bd[_0x0206('0xb6')](_0x488db7)[_0x0206('0xb8')](sendMessageReschedule(_0x488db7))[_0x0206('0xb1')](loggerCatch('[countReScheduled]\x20'));}else{_0x488db7[_0x0206('0x73')]+=_0xb3b21[_0x0206('0x97')];_0x488db7[_0x0206('0x3c')]=_0x488db7[_0x0206('0x5a')]==='booked'?'ACTIVE':'RUNNING';for(var _0x482d2e=0x0;_0x482d2e<_0xb3b21[_0x0206('0x97')];_0x482d2e+=0x1){if(_[_0x0206('0xae')](_0xb3b21[_0x482d2e])||_['isNil'](_0xb3b21[_0x482d2e][_0x0206('0x16b')])||_[_0x0206('0xae')](_0xb3b21[_0x482d2e]['Contact'][_0x0206('0x16c')])){_0x31b0bd[_0x0206('0x1fc')]('[actionOriginate]\x20',_0x488db7,_0xb3b21[_0x482d2e]);}else{_0x31b0bd[_0x0206('0xb9')](_[_0x0206('0xd0')](_0xb3b21[_0x482d2e],[_0x0206('0xfc'),_0x0206('0x204')]))[_0x0206('0xb8')](_0x31b0bd['checkContactBlack'](_0x488db7,_0xb3b21[_0x482d2e]))[_0x0206('0xb1')](_0x31b0bd[_0x0206('0x1fe')]('[actionOriginate]\x20',_0x488db7));}}}})[_0x0206('0xb1')](loggerGetContactDialer(_0x0206('0x205'),_0x488db7,_0x228215));}};Dialer['prototype'][_0x0206('0x8f')]=function(_0xa8dfe6){if(_0xa8dfe6[_0x0206('0x201')]>0x0){var _0x2bdee4=_0xa8dfe6['dialLimitQueue']-_0xa8dfe6[_0x0206('0x73')]-_0xa8dfe6[_0x0206('0x54')];if(_0x2bdee4>0x0){this[_0x0206('0x206')](_0xa8dfe6);}else{loggerPredictiveCalls[_0x0206('0x80')](_0x0206('0x207'));}}else{this['tryOriginatePredictive'](_0xa8dfe6);}};Dialer[_0x0206('0x1b')][_0x0206('0x206')]=function(_0x168522){var _0x4d818f=this;var _0x42c8ec=[];_0x168522[_0x0206('0x73')]+=0x1;for(var _0x298cd9 in this['agents']){if(typeof this[_0x0206('0x20')][_0x298cd9]!=='undefined'){if(this[_0x0206('0x20')][_0x298cd9][_0x0206('0xa5')]===_0x0206('0x202')&&this[_0x0206('0x20')][_0x298cd9][_0x0206('0xd8')]===_0x0206('0xd9')){_0x42c8ec[_0x0206('0x129')](this[_0x0206('0x20')][_0x298cd9]['id']);}}}this[_0x0206('0xc3')](_0x168522['id'],_0x42c8ec,0x1,_0x168522['dialOrderByScheduledAt'],_0x168522)[_0x0206('0xb8')](function(_0x172608){if(!checkContactEmpty(_0x172608)){checkContactLowerLimitOriginate(_0x168522,0x1,0x0);_0x4d818f[_0x0206('0xb6')](_0x168522)[_0x0206('0xb8')](sendMessageReschedule(_0x168522))[_0x0206('0xb1')](loggerCatch(_0x0206('0x208')));}else{_0x168522[_0x0206('0x3c')]=_0x0206('0x1fa');if(_['isNil'](_0x172608[0x0])||_[_0x0206('0xae')](_0x172608[0x0]['Contact'])||_[_0x0206('0xae')](_0x172608[0x0][_0x0206('0x16b')][_0x0206('0x16c')])){_0x4d818f[_0x0206('0x1fc')](_0x0206('0x1fd'),_0x168522,_0x172608[0x0]);}else{_0x4d818f[_0x0206('0xb9')](_[_0x0206('0xd0')](_0x172608[0x0],[_0x0206('0xfc'),_0x0206('0x204')]))[_0x0206('0xb8')](_0x4d818f['checkContactBlack'](_0x168522,_0x172608[0x0]))[_0x0206('0xb1')](_0x4d818f[_0x0206('0x1fe')]('[actionOriginatePredictive]\x20',_0x168522));}}})['catch'](loggerGetContactDialer('[getContactDialerPredictive]',_0x168522,0x1));emitVoiceQueueSummary(_0x168522);};Dialer['prototype'][_0x0206('0x1d6')]=function(_0x16224f,_0x388b6c,_0x200fe1,_0x22cde7,_0x19104e,_0x4daded){loggerPredictive[_0x0206('0x80')](_0x0206('0x209'));loggerPredictive[_0x0206('0x80')](_0x0206('0x20a'),_0x16224f);loggerPredictive['info']('Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x388b6c);loggerPredictive[_0x0206('0x80')]('Ts:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x200fe1);loggerPredictive['info'](_0x0206('0x20b'),_0x22cde7);loggerPredictive['info'](_0x0206('0x20c'),_0x19104e);loggerPredictive[_0x0206('0x80')](_0x0206('0x86'));return new BPromise(function(_0x47c18c,_0x2bf896){if(_0x16224f<=0x0||isNaN(_0x16224f)){return _0x2bf896(msgResponse('[abandonmentRate]',_0x0206('0x195'),_0x0206('0x20d')+_0x16224f));}if(_0x200fe1<=0x0||isNaN(_0x200fe1)){return _0x2bf896(msgResponse(_0x0206('0x20e'),_0x0206('0x195'),_0x0206('0x20f')+_0x200fe1));}if(_0x22cde7<=0x0||isNaN(_0x22cde7)){return _0x2bf896(msgResponse('[abandonmentRate]',_0x0206('0x195'),_0x0206('0x210')+_0x22cde7));}if(_0x388b6c<=0x0||isNaN(_0x388b6c)){return _0x2bf896(msgResponse(_0x0206('0x20e'),_0x0206('0x195'),_0x0206('0x211')+_0x388b6c));}if(_0x19104e<=0x0||isNaN(_0x19104e)){return _0x2bf896(msgResponse(_0x0206('0x20e'),_0x0206('0x195'),'Amax\x20=\x20'+_0x19104e));}_0x4daded=_0x4daded||0x0;var _0x4c3696=0x1/_0x200fe1;var _0x1b23fb=0x0;var _0x325067=0x0;var _0x1308a8=0x0;var _0x5f1330=0x0;for(var _0x3e9317=0x0;_0x1308a8<_0x19104e;_0x3e9317+=0x1){_0x325067=_0x3e9317/_0x388b6c;_0x1b23fb=(_0x22cde7*_0x325067+_0x4daded)/_0x4c3696;_0x1308a8=erlangb(_0x1b23fb,_0x16224f);_0x5f1330=_0x1b23fb/_0x16224f*(0x1-erlangb(_0x1b23fb,_0x16224f));}return _0x47c18c({'erlangCalls':_0x3e9317,'erlangCallToSecond':_0x388b6c/_0x3e9317,'erlangAbandonmentRate':_0x1308a8,'erlangBusyFactor':_0x5f1330});});};Dialer['prototype'][_0x0206('0x1de')]=function(_0x408dcb,_0x14aed1,_0x535bc0,_0x4e1c1c,_0x2dd6ee,_0x507a9d){loggerPredictive[_0x0206('0x80')]('----\x20Agent\x20Busy\x20Factor\x20----');loggerPredictive['info'](_0x0206('0x20a'),_0x408dcb);loggerPredictive['info'](_0x0206('0x212'),_0x14aed1);loggerPredictive['info'](_0x0206('0x213'),_0x535bc0);loggerPredictive[_0x0206('0x80')](_0x0206('0x20b'),_0x4e1c1c);loggerPredictive['info'](_0x0206('0x214'),_0x2dd6ee);loggerPredictive[_0x0206('0x80')]('---------------------------');return new BPromise(function(_0x52daf6,_0x20fdd0){if(_0x408dcb<=0x0||isNaN(_0x408dcb)){return _0x20fdd0(msgResponse(_0x0206('0x215'),_0x0206('0x195'),_0x0206('0x20d')+_0x408dcb));}if(_0x535bc0<=0x0||isNaN(_0x535bc0)){return _0x20fdd0(msgResponse(_0x0206('0x215'),'Error',_0x0206('0x20f')+_0x535bc0));}if(_0x4e1c1c<=0x0||isNaN(_0x4e1c1c)){return _0x20fdd0(msgResponse(_0x0206('0x215'),_0x0206('0x195'),_0x0206('0x210')+_0x4e1c1c));}if(_0x14aed1<=0x0||isNaN(_0x14aed1)){return _0x20fdd0(msgResponse(_0x0206('0x215'),_0x0206('0x195'),'interval\x20=\x20'+_0x14aed1));}if(_0x2dd6ee<=0x0||isNaN(_0x2dd6ee)){return _0x20fdd0(msgResponse(_0x0206('0x215'),_0x0206('0x195'),_0x0206('0x216')+_0x2dd6ee));}_0x507a9d=_0x507a9d||0x0;var _0x4ef6b9=0x1/_0x535bc0;var _0x4783f0=0x0;var _0x3cc626=0x0;var _0x584baf=0x0;var _0x1f200c=0x0;for(var _0x52574d=0x0;_0x1f200c<_0x2dd6ee;_0x52574d+=0x1){_0x3cc626=_0x52574d/_0x14aed1;_0x4783f0=(_0x4e1c1c*_0x3cc626+_0x507a9d)/_0x4ef6b9;_0x584baf=erlangb(_0x4783f0,_0x408dcb);_0x1f200c=_0x4783f0/_0x408dcb*(0x1-erlangb(_0x4783f0,_0x408dcb));}return _0x52daf6({'erlangCalls':_0x52574d,'erlangCallToSecond':_0x14aed1/_0x52574d,'erlangAbandonmentRate':_0x584baf,'erlangBusyFactor':_0x1f200c});});};module['exports']=Dialer; \ No newline at end of file diff --git a/server/services/ami/dialer/queueCallerAbandon.js b/server/services/ami/dialer/queueCallerAbandon.js index d78daaa..e0d04bb 100644 --- a/server/services/ami/dialer/queueCallerAbandon.js +++ b/server/services/ami/dialer/queueCallerAbandon.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf570=['endtime','holdtime','talktime','membername','reason','callback','callbackuniqueid','recallme','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','moment','milliseconds','seconds','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','uniqueid','calleridname','name','calleridnum','number','starttime','responsetime','droptime'];(function(_0x504429,_0x437cd9){var _0x516a77=function(_0x5d84b4){while(--_0x5d84b4){_0x504429['push'](_0x504429['shift']());}};_0x516a77(++_0x437cd9);}(_0xf570,0x19f));var _0x0f57=function(_0x2f6b46,_0x198f7f){_0x2f6b46=_0x2f6b46-0x0;var _0x40cc04=_0xf570[_0x2f6b46];return _0x40cc04;};'use strict';var util=require('util');var _=require('lodash');var moment=require(_0x0f57('0x0'));function getSeconds(_0x2a9033,_0x1d4b81){var _0x22d4eb=moment(_0x2a9033)['milliseconds'](0x0);var _0xf850a8=moment(_0x1d4b81)[_0x0f57('0x1')](0x0);return _0x22d4eb['diff'](_0xf850a8,_0x0f57('0x2'));}function QueueCallerAbandon(_0x238a7c,_0x5bbc9c){this['scheduledat']=_0x238a7c[_0x0f57('0x3')];this[_0x0f57('0x4')]=_0x238a7c[_0x0f57('0x4')];this[_0x0f57('0x5')]=_0x238a7c[_0x0f57('0x4')]===_0x0f57('0x6')?_0x0f57('0x7'):_0x238a7c[_0x0f57('0x4')];this[_0x0f57('0x8')]=_0x238a7c[_0x0f57('0x8')];this[_0x0f57('0x9')]=_0x238a7c[_0x0f57('0x9')];this[_0x0f57('0xa')]=_0x238a7c[_0x0f57('0xa')];this[_0x0f57('0xb')]=_0x238a7c[_0x0f57('0x8')]+_0x238a7c[_0x0f57('0x9')]+_0x238a7c[_0x0f57('0xa')]+_0x238a7c[_0x0f57('0xc')]+_0x238a7c[_0x0f57('0xd')]+_0x238a7c[_0x0f57('0xe')]+_0x238a7c[_0x0f57('0xf')]+_0x238a7c[_0x0f57('0x10')];this['countnosuchnumberretry']=_0x238a7c[_0x0f57('0xc')];this[_0x0f57('0xd')]=_0x238a7c[_0x0f57('0xd')];this[_0x0f57('0xe')]=_0x238a7c[_0x0f57('0xe')];this[_0x0f57('0xf')]=_0x238a7c[_0x0f57('0xf')];this[_0x0f57('0x10')]=_0x238a7c[_0x0f57('0x10')];this[_0x0f57('0x11')]=_0x5bbc9c['uniqueid'];this[_0x0f57('0x12')]=_0x238a7c[_0x0f57('0x13')];this[_0x0f57('0x14')]=_0x238a7c[_0x0f57('0x15')];this[_0x0f57('0x16')]=_0x238a7c[_0x0f57('0x16')];this['responsetime']=_0x238a7c[_0x0f57('0x17')];this[_0x0f57('0x18')]=_0x238a7c[_0x0f57('0x18')];this[_0x0f57('0x19')]=this[_0x0f57('0x18')];this['ringtime']=getSeconds(_0x238a7c[_0x0f57('0x17')],_0x238a7c[_0x0f57('0x16')]);this[_0x0f57('0x1a')]=getSeconds(this['droptime'],_0x238a7c[_0x0f57('0x17')]);this[_0x0f57('0x1b')]=0x0;this['queue']=_0x5bbc9c[_0x0f57('0x7')];this[_0x0f57('0x1c')]=_0x5bbc9c['connectedlinename'];this[_0x0f57('0x1d')]=_0x5bbc9c[_0x0f57('0x1d')];this['callback']=_0x238a7c[_0x0f57('0x1e')];this['callbackuniqueid']=_0x238a7c[_0x0f57('0x1f')];this['callbackat']=_0x238a7c['callbackat'];this[_0x0f57('0x20')]=_0x238a7c['recallme'];this['ContactId']=_0x238a7c['ContactId'];this[_0x0f57('0x21')]=_0x238a7c[_0x0f57('0x21')];this[_0x0f57('0x22')]=_0x238a7c[_0x0f57('0x22')];this['VoiceQueueId']=_0x238a7c[_0x0f57('0x23')];this[_0x0f57('0x24')]=_0x238a7c[_0x0f57('0x24')];this[_0x0f57('0x25')]=_0x238a7c[_0x0f57('0x25')]||'';this[_0x0f57('0x26')]=_0x238a7c[_0x0f57('0x26')]||'';}module[_0x0f57('0x27')]=QueueCallerAbandon; \ No newline at end of file +var _0x52e3=['CampaignId','originatecalleridnum','originatecalleridname','util','moment','milliseconds','diff','seconds','scheduledat','type','campaigntype','outbound','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','countnosuchnumberretry','calleridname','calleridnum','number','starttime','responsetime','droptime','queue','membername','connectedlinename','reason','callback','callbackuniqueid','callbackat','ContactId','ListId','UserId','VoiceQueueId'];(function(_0x40a045,_0x516f0e){var _0x1a687c=function(_0x48c9fe){while(--_0x48c9fe){_0x40a045['push'](_0x40a045['shift']());}};_0x1a687c(++_0x516f0e);}(_0x52e3,0x159));var _0x352e=function(_0x53878f,_0x569f66){_0x53878f=_0x53878f-0x0;var _0x5a4d80=_0x52e3[_0x53878f];return _0x5a4d80;};'use strict';var util=require(_0x352e('0x0'));var _=require('lodash');var moment=require(_0x352e('0x1'));function getSeconds(_0x24642f,_0x505be1){var _0x156c32=moment(_0x24642f)[_0x352e('0x2')](0x0);var _0x38743f=moment(_0x505be1)[_0x352e('0x2')](0x0);return _0x156c32[_0x352e('0x3')](_0x38743f,_0x352e('0x4'));}function QueueCallerAbandon(_0x1f7348,_0x43e03d){this[_0x352e('0x5')]=_0x1f7348[_0x352e('0x5')];this[_0x352e('0x6')]=_0x1f7348['type'];this[_0x352e('0x7')]=_0x1f7348[_0x352e('0x6')]===_0x352e('0x8')?'queue':_0x1f7348[_0x352e('0x6')];this[_0x352e('0x9')]=_0x1f7348[_0x352e('0x9')];this[_0x352e('0xa')]=_0x1f7348['countcongestionretry'];this[_0x352e('0xb')]=_0x1f7348[_0x352e('0xb')];this[_0x352e('0xc')]=_0x1f7348[_0x352e('0x9')]+_0x1f7348[_0x352e('0xa')]+_0x1f7348['countnoanswerretry']+_0x1f7348['countnosuchnumberretry']+_0x1f7348[_0x352e('0xd')]+_0x1f7348[_0x352e('0xe')]+_0x1f7348[_0x352e('0xf')]+_0x1f7348[_0x352e('0x10')];this[_0x352e('0x11')]=_0x1f7348[_0x352e('0x11')];this[_0x352e('0xd')]=_0x1f7348[_0x352e('0xd')];this[_0x352e('0xe')]=_0x1f7348[_0x352e('0xe')];this[_0x352e('0xf')]=_0x1f7348[_0x352e('0xf')];this[_0x352e('0x10')]=_0x1f7348[_0x352e('0x10')];this['uniqueid']=_0x43e03d['uniqueid'];this[_0x352e('0x12')]=_0x1f7348['name'];this[_0x352e('0x13')]=_0x1f7348[_0x352e('0x14')];this['starttime']=_0x1f7348[_0x352e('0x15')];this[_0x352e('0x16')]=_0x1f7348[_0x352e('0x16')];this[_0x352e('0x17')]=_0x1f7348['droptime'];this['endtime']=this['droptime'];this['ringtime']=getSeconds(_0x1f7348[_0x352e('0x16')],_0x1f7348[_0x352e('0x15')]);this['holdtime']=getSeconds(this['droptime'],_0x1f7348[_0x352e('0x16')]);this['talktime']=0x0;this['queue']=_0x43e03d[_0x352e('0x18')];this[_0x352e('0x19')]=_0x43e03d[_0x352e('0x1a')];this[_0x352e('0x1b')]=_0x43e03d[_0x352e('0x1b')];this[_0x352e('0x1c')]=_0x1f7348[_0x352e('0x1c')];this['callbackuniqueid']=_0x1f7348[_0x352e('0x1d')];this[_0x352e('0x1e')]=_0x1f7348['callbackat'];this['recallme']=_0x1f7348['recallme'];this[_0x352e('0x1f')]=_0x1f7348[_0x352e('0x1f')];this[_0x352e('0x20')]=_0x1f7348[_0x352e('0x20')];this[_0x352e('0x21')]=_0x1f7348[_0x352e('0x21')];this[_0x352e('0x22')]=_0x1f7348['VoiceQueueId'];this[_0x352e('0x23')]=_0x1f7348['CampaignId'];this['originatecalleridnum']=_0x1f7348[_0x352e('0x24')]||'';this[_0x352e('0x25')]=_0x1f7348['originatecalleridname']||'';}module['exports']=QueueCallerAbandon; \ No newline at end of file diff --git a/server/services/ami/fax/action.js b/server/services/ami/fax/action.js index 5d3077d..6d2f6ac 100644 --- a/server/services/ami/fax/action.js +++ b/server/services/ami/fax/action.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['fax','localstationid','path','AttachmentId','exports','util','lodash','moment','channel','format','%s/%s/%s','tech','Trunk'];(function(_0x10acce,_0x3459d4){var _0x501ce1=function(_0x22e6e0){while(--_0x22e6e0){_0x10acce['push'](_0x10acce['shift']());}};_0x501ce1(++_0x3459d4);}(_0xa9e0,0x123));var _0x0a9e=function(_0x8de54f,_0x271987){_0x8de54f=_0x8de54f-0x0;var _0x14cba4=_0xa9e0[_0x8de54f];return _0x14cba4;};'use strict';var util=require(_0x0a9e('0x0'));var _=require(_0x0a9e('0x1'));var moment=require(_0x0a9e('0x2'));function Action(_0x5dd881,_0x550fbc,_0x18d5c9){this['uniqueid']=_0x5dd881||undefined;this[_0x0a9e('0x3')]=util[_0x0a9e('0x4')](_0x0a9e('0x5'),_0x550fbc[_0x0a9e('0x6')],_0x550fbc[_0x0a9e('0x7')]['name'],_0x18d5c9[_0x0a9e('0x8')]);this[_0x0a9e('0x9')]=_0x550fbc[_0x0a9e('0x9')];this['headerinfo']=_0x550fbc['headerinfo'];this[_0x0a9e('0xa')]=_0x18d5c9['path'];this['AttachmentId']=_0x18d5c9[_0x0a9e('0xb')];}module[_0x0a9e('0xc')]=Action; \ No newline at end of file +var _0xa9e0=['fax','localstationid','path','AttachmentId','exports','util','lodash','moment','channel','format','%s/%s/%s','tech','Trunk'];(function(_0xab8cee,_0x42ba59){var _0x41760b=function(_0x80afab){while(--_0x80afab){_0xab8cee['push'](_0xab8cee['shift']());}};_0x41760b(++_0x42ba59);}(_0xa9e0,0x123));var _0x0a9e=function(_0x1facfa,_0x1acf7d){_0x1facfa=_0x1facfa-0x0;var _0x9ec701=_0xa9e0[_0x1facfa];return _0x9ec701;};'use strict';var util=require(_0x0a9e('0x0'));var _=require(_0x0a9e('0x1'));var moment=require(_0x0a9e('0x2'));function Action(_0x5dd881,_0x550fbc,_0x18d5c9){this['uniqueid']=_0x5dd881||undefined;this[_0x0a9e('0x3')]=util[_0x0a9e('0x4')](_0x0a9e('0x5'),_0x550fbc[_0x0a9e('0x6')],_0x550fbc[_0x0a9e('0x7')]['name'],_0x18d5c9[_0x0a9e('0x8')]);this[_0x0a9e('0x9')]=_0x550fbc[_0x0a9e('0x9')];this['headerinfo']=_0x550fbc['headerinfo'];this[_0x0a9e('0xa')]=_0x18d5c9['path'];this['AttachmentId']=_0x18d5c9[_0x0a9e('0xb')];}module[_0x0a9e('0xc')]=Action; \ No newline at end of file diff --git a/server/services/ami/fax/index.js b/server/services/ami/fax/index.js index a799002..4f7e3e1 100644 --- a/server/services/ami/fax/index.js +++ b/server/services/ami/fax/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1e34=['../ami','./rpcDb','./channel','./util/util','./action','../rpc/attachment','../rpc/faxMessage','channels','faxAccounts','trunks','actions','newchannel','syncNewchannel','varset','syncVarSet','bind','syncNewState','newexten','syncNewExten','faxstatus','syncFaxStatus','receivefax','hangup','syncHangup','originateresponse','syncOriginateResponse','prototype','from-voip-provider','exten','localstationid','uniqueid','channel','name','info','\x20syncNewchannel\x20','variable','hasOwnProperty','channelstate','channelstatedesc','value','operation','status','filename','remotestationid','pagestransferred','transferrate','calleridnum','/var/opt/motion2/server/files/attachments/','\x20result\x20conversion\x20file\x20','create','parse','.pdf','then','notify','error','\x20notify\x20','stringify','catch','\x20receiveFax\x20','merge','pick','response','reason','update','AttachmentId','SENDING\x20FAILED\x20','logger','[Fax][Message][Error][Updated]','[Fax][Message][Error][NoUpdate1]','[Fax][Message][Error][NoUpdate2]','updateStatus','[Fax][Message][Updated]','[Fax][Message][NoUpdate1]','finally','[Fax][Message][NoUpdate2]','\x20hangup\x20sendFile\x20','faxpages','SUCCESS','faxstatusstring','SENDING\x20FAILED:\x20','send','execOriginate','FaxAccountId','[Fax][execOriginate][success]','message','Fax\x20received','[Fax][execOriginate][failure]','checkAfterSend','checkTrunk','Trunk','Trunk\x20Reachable','format','gs\x20-q\x20-dNOPAUSE\x20-dBATCH\x20-sDEVICE=tiffg4\x20-sPAPERSIZE=letter\x20-sOutputFile=/var/opt/motion2/server/files/attachments/%s.tif\x20\x20%s\x20-c\x20quit','execute','dir','XMF-PATH','variablesAction','Action','addVariables','isTrunkReachable','isNil','active','SIP/%s','reachable','unmonitored','Trunk\x20not\x20working','fax','[Fax][checkTrunk][Empty\x20Fax]','Empty\x20Fax','Empty\x20path','Is\x20Valid','exports','util','lodash','bluebird','uuid','moment','path','./util/gs','../../../config/logger'];(function(_0x115720,_0x52366a){var _0x5de394=function(_0x5e10b7){while(--_0x5e10b7){_0x115720['push'](_0x115720['shift']());}};_0x5de394(++_0x52366a);}(_0x1e34,0x160));var _0x41e3=function(_0xcc195f,_0x4e19e5){_0xcc195f=_0xcc195f-0x0;var _0x56a55b=_0x1e34[_0xcc195f];return _0x56a55b;};'use strict';var util=require(_0x41e3('0x0'));var _=require(_0x41e3('0x1'));var BPromise=require(_0x41e3('0x2'));var uuid=require(_0x41e3('0x3'));var moment=require(_0x41e3('0x4'));var path=require(_0x41e3('0x5'));var tiff2pdf=require('tiff2pdf');var gs=require(_0x41e3('0x6'));var logger=require(_0x41e3('0x7'))('fax');var ami=require(_0x41e3('0x8'));var rpcDb=require(_0x41e3('0x9'));var Channel=require(_0x41e3('0xa'));var ut=require(_0x41e3('0xb'));var Action=require(_0x41e3('0xc'));var faxAccount=require('../rpc/faxAccount');var attachment=require(_0x41e3('0xd'));var faxMessage=require(_0x41e3('0xe'));function Fax(_0x3a83f9){this[_0x41e3('0xf')]={};this['faxAccounts']=_0x3a83f9[_0x41e3('0x10')];this[_0x41e3('0x11')]=_0x3a83f9['trunks'];this[_0x41e3('0x12')]={};ami['on'](_0x41e3('0x13'),this[_0x41e3('0x14')]['bind'](this));ami['on'](_0x41e3('0x15'),this[_0x41e3('0x16')][_0x41e3('0x17')](this));ami['on']('newstate',this[_0x41e3('0x18')][_0x41e3('0x17')](this));ami['on'](_0x41e3('0x19'),this[_0x41e3('0x1a')][_0x41e3('0x17')](this));ami['on'](_0x41e3('0x1b'),this[_0x41e3('0x1c')][_0x41e3('0x17')](this));ami['on'](_0x41e3('0x1d'),this['syncReceiveFax'][_0x41e3('0x17')](this));ami['on'](_0x41e3('0x1e'),this[_0x41e3('0x1f')][_0x41e3('0x17')](this));ami['on'](_0x41e3('0x20'),this[_0x41e3('0x21')][_0x41e3('0x17')](this));}Fax[_0x41e3('0x22')][_0x41e3('0x14')]=function(_0x42e708){if(_0x42e708['context']===_0x41e3('0x23')){for(var _0xbbbd36 in this['faxAccounts']){if(this[_0x41e3('0x10')]['hasOwnProperty'](_0xbbbd36)){if(_0x42e708[_0x41e3('0x24')]===this[_0x41e3('0x10')][_0xbbbd36][_0x41e3('0x25')]){this[_0x41e3('0xf')][_0x42e708[_0x41e3('0x26')]]={};this[_0x41e3('0xf')][_0x42e708[_0x41e3('0x26')]][_0x41e3('0x27')]=_0x42e708['channel'];this[_0x41e3('0xf')][_0x42e708[_0x41e3('0x26')]]['id']=this[_0x41e3('0x10')][_0xbbbd36]['id'];this[_0x41e3('0xf')][_0x42e708[_0x41e3('0x26')]][_0x41e3('0x28')]=this[_0x41e3('0x10')][_0xbbbd36][_0x41e3('0x28')];logger[_0x41e3('0x29')](_0x42e708['uniqueid'],_0x41e3('0x2a'));}}}}if(this[_0x41e3('0x12')][_0x42e708['uniqueid']]){this['channels'][_0x42e708[_0x41e3('0x26')]]={};this[_0x41e3('0xf')][_0x42e708[_0x41e3('0x26')]][_0x41e3('0x27')]=_0x42e708[_0x41e3('0x27')];logger[_0x41e3('0x29')](_0x42e708[_0x41e3('0x26')],_0x41e3('0x2a'));}};Fax['prototype']['syncVarSet']=function(_0x3d7584){if(this[_0x41e3('0xf')][_0x3d7584['uniqueid']]){for(var _0x507a65 in _0x3d7584[_0x41e3('0x2b')]){if(_0x3d7584[_0x41e3('0x2b')][_0x41e3('0x2c')](_0x507a65)){this[_0x41e3('0xf')][_0x3d7584[_0x41e3('0x26')]][_0x507a65]=_0x3d7584['value'];}}}};Fax[_0x41e3('0x22')]['syncNewState']=function(_0x16431b){if(this[_0x41e3('0xf')][_0x16431b[_0x41e3('0x26')]]){this[_0x41e3('0xf')][_0x16431b[_0x41e3('0x26')]][_0x41e3('0x2d')]=_0x16431b[_0x41e3('0x2d')];this[_0x41e3('0xf')][_0x16431b[_0x41e3('0x26')]][_0x41e3('0x2e')]=_0x16431b['channelstatedesc'];}};Fax[_0x41e3('0x22')][_0x41e3('0x1a')]=function(_0x5ad4c){if(this['channels'][_0x5ad4c['uniqueid']]){for(var _0x55c340 in _0x5ad4c[_0x41e3('0x2b')]){if(_0x5ad4c[_0x41e3('0x2b')][_0x41e3('0x2c')](_0x55c340)){this['channels'][_0x5ad4c[_0x41e3('0x26')]][_0x55c340]=_0x5ad4c[_0x41e3('0x2f')];}}}};Fax[_0x41e3('0x22')][_0x41e3('0x1c')]=function(_0xa50a48){if(this['channels'][_0xa50a48['uniqueid']]){this[_0x41e3('0xf')][_0xa50a48[_0x41e3('0x26')]][_0x41e3('0x30')]=_0xa50a48['operation'];this[_0x41e3('0xf')][_0xa50a48[_0x41e3('0x26')]][_0x41e3('0x31')]=_0xa50a48['status'];this[_0x41e3('0xf')][_0xa50a48[_0x41e3('0x26')]][_0x41e3('0x25')]=_0xa50a48[_0x41e3('0x25')];this[_0x41e3('0xf')][_0xa50a48[_0x41e3('0x26')]][_0x41e3('0x32')]=_0xa50a48['filename'];logger[_0x41e3('0x29')](_0xa50a48[_0x41e3('0x26')],'\x20syncFaxStatus\x20');}};Fax[_0x41e3('0x22')]['syncReceiveFax']=function(_0xb82366){var _0x3059e1=this;if(this[_0x41e3('0xf')][_0xb82366[_0x41e3('0x26')]]){var _0x12f056=this['channels'][_0xb82366['uniqueid']]['id'];this['channels'][_0xb82366[_0x41e3('0x26')]][_0x41e3('0x33')]=_0xb82366[_0x41e3('0x33')];this['channels'][_0xb82366[_0x41e3('0x26')]][_0x41e3('0x34')]=_0xb82366[_0x41e3('0x34')];this['channels'][_0xb82366[_0x41e3('0x26')]][_0x41e3('0x25')]=_0xb82366['localstationid'];this['channels'][_0xb82366[_0x41e3('0x26')]]['resolution']=_0xb82366['resolution'];this['channels'][_0xb82366[_0x41e3('0x26')]][_0x41e3('0x35')]=_0xb82366[_0x41e3('0x35')];this['channels'][_0xb82366[_0x41e3('0x26')]][_0x41e3('0x32')]=_0xb82366['filename'];this['channels'][_0xb82366[_0x41e3('0x26')]][_0x41e3('0x36')]=_0xb82366[_0x41e3('0x36')];if(this[_0x41e3('0xf')][_0xb82366[_0x41e3('0x26')]]['pagestransferred']>0x0){tiff2pdf(_0xb82366['filename'],_0x41e3('0x37'),function(_0x40a6bd){logger[_0x41e3('0x29')](_0xb82366[_0x41e3('0x26')],_0x41e3('0x38'),_0x40a6bd['message']);attachment[_0x41e3('0x39')]({'name':path[_0x41e3('0x3a')](_0xb82366[_0x41e3('0x32')])[_0x41e3('0x28')],'basename':path[_0x41e3('0x3a')](_0xb82366[_0x41e3('0x32')])['name']+_0x41e3('0x3b'),'type':'application/pdf'})[_0x41e3('0x3c')](function(_0x5b3b4b){faxAccount[_0x41e3('0x3d')](_0x12f056,{'from':_0xb82366[_0x41e3('0x36')],'mapKey':'fax','body':path[_0x41e3('0x3a')](_0xb82366[_0x41e3('0x32')])[_0x41e3('0x28')]+_0x41e3('0x3b'),'AttachmentId':_0x5b3b4b['id']})['catch'](function(_0x2004f8){logger[_0x41e3('0x3e')](_0xb82366[_0x41e3('0x26')],_0x41e3('0x3f'),JSON[_0x41e3('0x40')](_0x2004f8));});})[_0x41e3('0x41')](function(_0x1ebba4){logger[_0x41e3('0x3e')](_0xb82366[_0x41e3('0x26')],_0x41e3('0x42'),JSON[_0x41e3('0x40')](_0x1ebba4));});});}logger[_0x41e3('0x29')](_0xb82366[_0x41e3('0x26')],_0x41e3('0x42'));}};Fax[_0x41e3('0x22')][_0x41e3('0x21')]=function(_0x2f90c4){if(this[_0x41e3('0x12')][_0x2f90c4[_0x41e3('0x26')]]){_[_0x41e3('0x43')](this[_0x41e3('0xf')][_0x2f90c4[_0x41e3('0x26')]],_[_0x41e3('0x44')](_0x2f90c4,[_0x41e3('0x45'),_0x41e3('0x46')]));}};function updateStatus(_0x4eee79){if(_0x4eee79['AttachmentId']){faxMessage[_0x41e3('0x47')](_0x4eee79[_0x41e3('0x48')],{'failMessage':_0x41e3('0x49')})[_0x41e3('0x3c')](function(_0x5436e4){ut[_0x41e3('0x4a')](_0x41e3('0x4b'),_0x5436e4);})[_0x41e3('0x41')](function(_0x414f0a){ut[_0x41e3('0x4a')](_0x41e3('0x4c'),_0x414f0a);});}else{ut[_0x41e3('0x4a')](_0x41e3('0x4d'));}}Fax[_0x41e3('0x22')][_0x41e3('0x4e')]=function(_0x501065,_0x35c31a,_0x3a19c0){var _0xa4a780=this;var _0x21c0ff={};if(_0x35c31a){_0x21c0ff={'read':_0x35c31a};}else{_0x21c0ff={'failMessage':_0x3a19c0};}if(this['actions'][_0x501065][_0x41e3('0x48')]){faxMessage[_0x41e3('0x47')](this['actions'][_0x501065][_0x41e3('0x48')],_0x21c0ff)[_0x41e3('0x3c')](function(_0x120382){ut[_0x41e3('0x4a')](_0x41e3('0x4f'),_0x120382);})[_0x41e3('0x41')](function(_0x479ddc){ut['logger'](_0x41e3('0x50'),_0x479ddc);})[_0x41e3('0x51')](function(){delete _0xa4a780[_0x41e3('0xf')][_0x501065];delete _0xa4a780[_0x41e3('0x12')][_0x501065];});}else{ut[_0x41e3('0x4a')](_0x41e3('0x52'));delete this['channels'][_0x501065];delete this['actions'][_0x501065];}};Fax[_0x41e3('0x22')][_0x41e3('0x1f')]=function(_0xb4f564){var _0x50af17=this;if(this[_0x41e3('0xf')][_0xb4f564[_0x41e3('0x26')]]){if(this[_0x41e3('0x12')][_0xb4f564[_0x41e3('0x26')]]){this['channels'][_0xb4f564[_0x41e3('0x26')]]['id']=this[_0x41e3('0x12')][_0xb4f564[_0x41e3('0x26')]]['id'];this[_0x41e3('0xf')][_0xb4f564[_0x41e3('0x26')]][_0x41e3('0x28')]=this[_0x41e3('0x12')][_0xb4f564[_0x41e3('0x26')]]['name'];}logger['info'](_0xb4f564['uniqueid'],this[_0x41e3('0x12')][_0xb4f564[_0x41e3('0x26')]]?_0x41e3('0x53'):'\x20hangup\x20faxRiceive\x20',JSON['stringify'](this['channels'][_0xb4f564[_0x41e3('0x26')]]));if(this[_0x41e3('0x12')][_0xb4f564[_0x41e3('0x26')]]){if(this['channels'][_0xb4f564[_0x41e3('0x26')]][_0x41e3('0x54')]>0x0&&this[_0x41e3('0xf')][_0xb4f564[_0x41e3('0x26')]]['faxstatus']===_0x41e3('0x55')){this[_0x41e3('0x4e')](_0xb4f564[_0x41e3('0x26')],!![]);}else{this[_0x41e3('0x4e')](_0xb4f564[_0x41e3('0x26')],![],this[_0x41e3('0xf')][_0xb4f564[_0x41e3('0x26')]][_0x41e3('0x56')]?_0x41e3('0x57')+this['channels'][_0xb4f564[_0x41e3('0x26')]][_0x41e3('0x56')]:'SENDING\x20FAILED');}}}};Fax[_0x41e3('0x22')][_0x41e3('0x58')]=function(_0x3477e9){var _0x48589b=this;return new BPromise(function(_0x337291,_0x33da3a){_0x48589b[_0x41e3('0x59')](_0x3477e9,_0x48589b[_0x41e3('0x10')][_0x3477e9[_0x41e3('0x5a')]])[_0x41e3('0x3c')](function(_0x3de58a){ut[_0x41e3('0x4a')](_0x41e3('0x5b'),_0x3de58a);_0x337291(ut[_0x41e3('0x5c')](_0x41e3('0x5d')));})[_0x41e3('0x41')](function(_0x2b662e){ut[_0x41e3('0x4a')](_0x41e3('0x5e'),_0x2b662e);updateStatus(_0x3477e9);_0x33da3a(ut[_0x41e3('0x5c')]('Fax\x20failed'));});});};Fax[_0x41e3('0x22')][_0x41e3('0x5f')]=function(_0x2ee0e7){var _0x1684d6=this;return new BPromise(function(_0x3ceae8,_0x3495a5){var _0x18bc25=_0x1684d6[_0x41e3('0x60')](_0x1684d6[_0x41e3('0x10')][_0x2ee0e7['FaxAccountId']][_0x41e3('0x61')],_0x2ee0e7);if(_0x18bc25['isValid']){_0x3ceae8(ut[_0x41e3('0x5c')](_0x41e3('0x62')));}else{_0x3495a5(ut[_0x41e3('0x5c')](_0x18bc25[_0x41e3('0x5c')]));}});};function originate(_0x2751ea,_0x5c86e0,_0x41c8f0){return new BPromise(function(_0x39a0c6,_0x2c7880){if(_0x41c8f0){var _0x2f5038=util[_0x41e3('0x63')](_0x41e3('0x64'),path[_0x41e3('0x3a')](_0x2751ea[_0x41e3('0x5')])[_0x41e3('0x28')],_0x2751ea['path']);gs[_0x41e3('0x65')](_0x2f5038)[_0x41e3('0x3c')](function(){_0x2751ea[_0x41e3('0x5')]=util[_0x41e3('0x63')]('%s/%s.tif',path['parse'](_0x2751ea[_0x41e3('0x5')])[_0x41e3('0x66')],path[_0x41e3('0x3a')](_0x2751ea['path'])[_0x41e3('0x28')]);_0x5c86e0[_0x41e3('0x67')]=_0x2751ea[_0x41e3('0x5')];ut[_0x41e3('0x4a')]('Convert\x20pdf\x20to\x20tif','');ami['Action'](ut[_0x41e3('0x68')](_0x2751ea,_0x5c86e0))[_0x41e3('0x3c')](function(_0x43252e){_0x39a0c6(_0x43252e);})[_0x41e3('0x41')](function(_0x66c398){_0x2c7880(_0x66c398);});})[_0x41e3('0x41')](function(_0x5893be){_0x2c7880(_0x5893be);});}else{ami[_0x41e3('0x69')](ut[_0x41e3('0x68')](_0x2751ea,_0x5c86e0))['then'](function(_0x3be403){_0x39a0c6(_0x3be403);})[_0x41e3('0x41')](function(_0x3ec577){_0x2c7880(_0x3ec577);});}});}Fax['prototype']['execOriginate']=function(_0x456afb,_0x18da5f){var _0x5d27ce=this;return new BPromise(function(_0x1f6e7a,_0x40e912){var _0x4a244b=uuid['v4']();var _0x40f8d2=ut[_0x41e3('0x6a')](_0x456afb,_0x18da5f);_0x5d27ce['actions'][_0x4a244b]=new Action(_0x4a244b,_0x18da5f,_0x456afb);var _0x4b3854=_0x5d27ce[_0x41e3('0x12')][_0x4a244b];if(path[_0x41e3('0x3a')](_0x456afb[_0x41e3('0x5')])['ext']===_0x41e3('0x3b')){originate(_0x4b3854,_0x40f8d2,!![])[_0x41e3('0x3c')](function(_0x27a8f3){_0x1f6e7a(_0x27a8f3);})[_0x41e3('0x41')](function(_0x15f6d9){_0x40e912(_0x15f6d9);});}else{originate(_0x4b3854,_0x40f8d2,![])[_0x41e3('0x3c')](function(_0x30fff1){_0x1f6e7a(_0x30fff1);})['catch'](function(_0x551379){_0x40e912(_0x551379);});}});};Fax['prototype'][_0x41e3('0x6b')]=function(_0x81aed0){return!_[_0x41e3('0x6c')](_0x81aed0)&&!_[_0x41e3('0x6c')](_0x81aed0[_0x41e3('0x28')])&&!_[_0x41e3('0x6c')](_0x81aed0[_0x41e3('0x6d')])&&_0x81aed0['active']&&!_[_0x41e3('0x6c')](this[_0x41e3('0x11')][util[_0x41e3('0x63')]('SIP/%s',_0x81aed0[_0x41e3('0x28')])])&&!_[_0x41e3('0x6c')](this[_0x41e3('0x11')][util[_0x41e3('0x63')]('SIP/%s',_0x81aed0['name'])]['status'])&&(this[_0x41e3('0x11')][util[_0x41e3('0x63')](_0x41e3('0x6e'),_0x81aed0[_0x41e3('0x28')])]['status']===_0x41e3('0x6f')||this['trunks'][util['format'](_0x41e3('0x6e'),_0x81aed0['name'])][_0x41e3('0x31')]===_0x41e3('0x70'));};Fax[_0x41e3('0x22')]['checkTrunk']=function(_0x46f156,_0x31c6b9){if(!this[_0x41e3('0x6b')](_0x46f156)){ut[_0x41e3('0x4a')]('[Fax][checkTrunk][Trunk\x20not\x20work]',_[_0x41e3('0x6c')](_0x46f156)?'':_0x46f156[_0x41e3('0x28')]+'\x20Trunk\x20is\x20not\x20active');return{'isValid':![],'message':_0x41e3('0x71')};}if(_[_0x41e3('0x6c')](_0x31c6b9[_0x41e3('0x72')])){ut['logger'](_0x41e3('0x73'),JSON[_0x41e3('0x40')](_0x31c6b9));return{'isValid':![],'message':_0x41e3('0x74')};}if(_[_0x41e3('0x6c')](_0x31c6b9['path'])){ut[_0x41e3('0x4a')]('[Fax][checkTrunk][Empty\x20path]',JSON['stringify'](_0x31c6b9));return{'isValid':![],'message':_0x41e3('0x75')};}return{'isValid':!![],'message':_0x41e3('0x76')};};module[_0x41e3('0x77')]=Fax; \ No newline at end of file +var _0x52d9=['\x20Trunk\x20is\x20not\x20active','Trunk\x20not\x20working','Empty\x20Fax','[Fax][checkTrunk][Empty\x20path]','util','lodash','bluebird','uuid','moment','path','tiff2pdf','./util/gs','../../../config/logger','fax','../ami','./rpcDb','./action','../rpc/attachment','../rpc/faxMessage','faxAccounts','trunks','newchannel','syncNewchannel','bind','varset','newstate','syncNewState','newexten','syncNewExten','syncFaxStatus','receivefax','syncReceiveFax','syncHangup','syncOriginateResponse','prototype','context','from-voip-provider','exten','localstationid','channels','uniqueid','channel','name','info','\x20syncNewchannel\x20','actions','variable','hasOwnProperty','value','channelstate','channelstatedesc','operation','status','filename','\x20syncFaxStatus\x20','remotestationid','pagestransferred','resolution','transferrate','calleridnum','message','create','parse','.pdf','application/pdf','notify','catch','\x20notify\x20','stringify','error','\x20receiveFax\x20','merge','pick','response','AttachmentId','SENDING\x20FAILED\x20','then','logger','[Fax][Message][Error][Updated]','[Fax][Message][Error][NoUpdate1]','[Fax][Message][Error][NoUpdate2]','updateStatus','[Fax][Message][Updated]','[Fax][Message][NoUpdate1]','finally','[Fax][Message][NoUpdate2]','\x20hangup\x20faxRiceive\x20','faxpages','faxstatus','faxstatusstring','SENDING\x20FAILED:\x20','SENDING\x20FAILED','send','execOriginate','[Fax][execOriginate][success]','Fax\x20failed','checkAfterSend','checkTrunk','Trunk','Trunk\x20Reachable','gs\x20-q\x20-dNOPAUSE\x20-dBATCH\x20-sDEVICE=tiffg4\x20-sPAPERSIZE=letter\x20-sOutputFile=/var/opt/motion2/server/files/attachments/%s.tif\x20\x20%s\x20-c\x20quit','execute','format','%s/%s.tif','dir','XMF-PATH','Action','variablesAction','addVariables','isTrunkReachable','isNil','active','SIP/%s','reachable','unmonitored','[Fax][checkTrunk][Trunk\x20not\x20work]'];(function(_0x9d1e6b,_0x3bdc22){var _0x2b3070=function(_0x4c4ced){while(--_0x4c4ced){_0x9d1e6b['push'](_0x9d1e6b['shift']());}};_0x2b3070(++_0x3bdc22);}(_0x52d9,0xec));var _0x952d=function(_0x260b48,_0x117977){_0x260b48=_0x260b48-0x0;var _0x3f730b=_0x52d9[_0x260b48];return _0x3f730b;};'use strict';var util=require(_0x952d('0x0'));var _=require(_0x952d('0x1'));var BPromise=require(_0x952d('0x2'));var uuid=require(_0x952d('0x3'));var moment=require(_0x952d('0x4'));var path=require(_0x952d('0x5'));var tiff2pdf=require(_0x952d('0x6'));var gs=require(_0x952d('0x7'));var logger=require(_0x952d('0x8'))(_0x952d('0x9'));var ami=require(_0x952d('0xa'));var rpcDb=require(_0x952d('0xb'));var Channel=require('./channel');var ut=require('./util/util');var Action=require(_0x952d('0xc'));var faxAccount=require('../rpc/faxAccount');var attachment=require(_0x952d('0xd'));var faxMessage=require(_0x952d('0xe'));function Fax(_0x807ad5){this['channels']={};this[_0x952d('0xf')]=_0x807ad5[_0x952d('0xf')];this[_0x952d('0x10')]=_0x807ad5[_0x952d('0x10')];this['actions']={};ami['on'](_0x952d('0x11'),this[_0x952d('0x12')][_0x952d('0x13')](this));ami['on'](_0x952d('0x14'),this['syncVarSet']['bind'](this));ami['on'](_0x952d('0x15'),this[_0x952d('0x16')]['bind'](this));ami['on'](_0x952d('0x17'),this[_0x952d('0x18')][_0x952d('0x13')](this));ami['on']('faxstatus',this[_0x952d('0x19')]['bind'](this));ami['on'](_0x952d('0x1a'),this[_0x952d('0x1b')][_0x952d('0x13')](this));ami['on']('hangup',this[_0x952d('0x1c')][_0x952d('0x13')](this));ami['on']('originateresponse',this[_0x952d('0x1d')][_0x952d('0x13')](this));}Fax[_0x952d('0x1e')][_0x952d('0x12')]=function(_0x365d5a){if(_0x365d5a[_0x952d('0x1f')]===_0x952d('0x20')){for(var _0x4956c7 in this[_0x952d('0xf')]){if(this[_0x952d('0xf')]['hasOwnProperty'](_0x4956c7)){if(_0x365d5a[_0x952d('0x21')]===this['faxAccounts'][_0x4956c7][_0x952d('0x22')]){this[_0x952d('0x23')][_0x365d5a['uniqueid']]={};this[_0x952d('0x23')][_0x365d5a[_0x952d('0x24')]][_0x952d('0x25')]=_0x365d5a[_0x952d('0x25')];this[_0x952d('0x23')][_0x365d5a['uniqueid']]['id']=this[_0x952d('0xf')][_0x4956c7]['id'];this[_0x952d('0x23')][_0x365d5a[_0x952d('0x24')]]['name']=this['faxAccounts'][_0x4956c7][_0x952d('0x26')];logger[_0x952d('0x27')](_0x365d5a[_0x952d('0x24')],_0x952d('0x28'));}}}}if(this[_0x952d('0x29')][_0x365d5a[_0x952d('0x24')]]){this[_0x952d('0x23')][_0x365d5a[_0x952d('0x24')]]={};this['channels'][_0x365d5a[_0x952d('0x24')]]['channel']=_0x365d5a[_0x952d('0x25')];logger[_0x952d('0x27')](_0x365d5a[_0x952d('0x24')],_0x952d('0x28'));}};Fax[_0x952d('0x1e')]['syncVarSet']=function(_0x2a9f02){if(this[_0x952d('0x23')][_0x2a9f02[_0x952d('0x24')]]){for(var _0x3a5ce2 in _0x2a9f02[_0x952d('0x2a')]){if(_0x2a9f02[_0x952d('0x2a')][_0x952d('0x2b')](_0x3a5ce2)){this[_0x952d('0x23')][_0x2a9f02[_0x952d('0x24')]][_0x3a5ce2]=_0x2a9f02[_0x952d('0x2c')];}}}};Fax[_0x952d('0x1e')][_0x952d('0x16')]=function(_0x4f9fbc){if(this[_0x952d('0x23')][_0x4f9fbc[_0x952d('0x24')]]){this[_0x952d('0x23')][_0x4f9fbc[_0x952d('0x24')]][_0x952d('0x2d')]=_0x4f9fbc[_0x952d('0x2d')];this[_0x952d('0x23')][_0x4f9fbc[_0x952d('0x24')]][_0x952d('0x2e')]=_0x4f9fbc[_0x952d('0x2e')];}};Fax['prototype'][_0x952d('0x18')]=function(_0x4bde68){if(this[_0x952d('0x23')][_0x4bde68[_0x952d('0x24')]]){for(var _0x11c651 in _0x4bde68[_0x952d('0x2a')]){if(_0x4bde68[_0x952d('0x2a')][_0x952d('0x2b')](_0x11c651)){this[_0x952d('0x23')][_0x4bde68[_0x952d('0x24')]][_0x11c651]=_0x4bde68[_0x952d('0x2c')];}}}};Fax[_0x952d('0x1e')][_0x952d('0x19')]=function(_0x39e640){if(this[_0x952d('0x23')][_0x39e640['uniqueid']]){this[_0x952d('0x23')][_0x39e640[_0x952d('0x24')]][_0x952d('0x2f')]=_0x39e640[_0x952d('0x2f')];this[_0x952d('0x23')][_0x39e640[_0x952d('0x24')]][_0x952d('0x30')]=_0x39e640[_0x952d('0x30')];this[_0x952d('0x23')][_0x39e640[_0x952d('0x24')]]['localstationid']=_0x39e640[_0x952d('0x22')];this[_0x952d('0x23')][_0x39e640['uniqueid']]['filename']=_0x39e640[_0x952d('0x31')];logger[_0x952d('0x27')](_0x39e640['uniqueid'],_0x952d('0x32'));}};Fax['prototype'][_0x952d('0x1b')]=function(_0x2e7bba){var _0x196221=this;if(this[_0x952d('0x23')][_0x2e7bba[_0x952d('0x24')]]){var _0x3d6f77=this[_0x952d('0x23')][_0x2e7bba[_0x952d('0x24')]]['id'];this[_0x952d('0x23')][_0x2e7bba[_0x952d('0x24')]]['remotestationid']=_0x2e7bba[_0x952d('0x33')];this[_0x952d('0x23')][_0x2e7bba[_0x952d('0x24')]][_0x952d('0x34')]=_0x2e7bba[_0x952d('0x34')];this['channels'][_0x2e7bba[_0x952d('0x24')]][_0x952d('0x22')]=_0x2e7bba[_0x952d('0x22')];this['channels'][_0x2e7bba[_0x952d('0x24')]][_0x952d('0x35')]=_0x2e7bba[_0x952d('0x35')];this[_0x952d('0x23')][_0x2e7bba['uniqueid']]['transferrate']=_0x2e7bba[_0x952d('0x36')];this[_0x952d('0x23')][_0x2e7bba[_0x952d('0x24')]][_0x952d('0x31')]=_0x2e7bba[_0x952d('0x31')];this[_0x952d('0x23')][_0x2e7bba['uniqueid']]['calleridnum']=_0x2e7bba[_0x952d('0x37')];if(this[_0x952d('0x23')][_0x2e7bba[_0x952d('0x24')]]['pagestransferred']>0x0){tiff2pdf(_0x2e7bba[_0x952d('0x31')],'/var/opt/motion2/server/files/attachments/',function(_0x1e1d34){logger[_0x952d('0x27')](_0x2e7bba['uniqueid'],'\x20result\x20conversion\x20file\x20',_0x1e1d34[_0x952d('0x38')]);attachment[_0x952d('0x39')]({'name':path[_0x952d('0x3a')](_0x2e7bba[_0x952d('0x31')])[_0x952d('0x26')],'basename':path[_0x952d('0x3a')](_0x2e7bba[_0x952d('0x31')])[_0x952d('0x26')]+_0x952d('0x3b'),'type':_0x952d('0x3c')})['then'](function(_0x4d638f){faxAccount[_0x952d('0x3d')](_0x3d6f77,{'from':_0x2e7bba['calleridnum'],'mapKey':_0x952d('0x9'),'body':path[_0x952d('0x3a')](_0x2e7bba[_0x952d('0x31')])['name']+_0x952d('0x3b'),'AttachmentId':_0x4d638f['id']})[_0x952d('0x3e')](function(_0x661a0b){logger['error'](_0x2e7bba['uniqueid'],_0x952d('0x3f'),JSON[_0x952d('0x40')](_0x661a0b));});})[_0x952d('0x3e')](function(_0x5b9e9d){logger[_0x952d('0x41')](_0x2e7bba[_0x952d('0x24')],_0x952d('0x42'),JSON[_0x952d('0x40')](_0x5b9e9d));});});}logger[_0x952d('0x27')](_0x2e7bba['uniqueid'],'\x20receiveFax\x20');}};Fax[_0x952d('0x1e')][_0x952d('0x1d')]=function(_0x2380e1){if(this[_0x952d('0x29')][_0x2380e1[_0x952d('0x24')]]){_[_0x952d('0x43')](this[_0x952d('0x23')][_0x2380e1['uniqueid']],_[_0x952d('0x44')](_0x2380e1,[_0x952d('0x45'),'reason']));}};function updateStatus(_0x35c65d){if(_0x35c65d['AttachmentId']){faxMessage['update'](_0x35c65d[_0x952d('0x46')],{'failMessage':_0x952d('0x47')})[_0x952d('0x48')](function(_0x3c390e){ut[_0x952d('0x49')](_0x952d('0x4a'),_0x3c390e);})['catch'](function(_0x26a0d5){ut[_0x952d('0x49')](_0x952d('0x4b'),_0x26a0d5);});}else{ut[_0x952d('0x49')](_0x952d('0x4c'));}}Fax[_0x952d('0x1e')][_0x952d('0x4d')]=function(_0x557ec5,_0xf639e7,_0x1aab5d){var _0x5cf0bf=this;var _0x4248e2={};if(_0xf639e7){_0x4248e2={'read':_0xf639e7};}else{_0x4248e2={'failMessage':_0x1aab5d};}if(this[_0x952d('0x29')][_0x557ec5]['AttachmentId']){faxMessage['update'](this[_0x952d('0x29')][_0x557ec5][_0x952d('0x46')],_0x4248e2)[_0x952d('0x48')](function(_0x4c8ed6){ut[_0x952d('0x49')](_0x952d('0x4e'),_0x4c8ed6);})[_0x952d('0x3e')](function(_0x395683){ut['logger'](_0x952d('0x4f'),_0x395683);})[_0x952d('0x50')](function(){delete _0x5cf0bf[_0x952d('0x23')][_0x557ec5];delete _0x5cf0bf[_0x952d('0x29')][_0x557ec5];});}else{ut[_0x952d('0x49')](_0x952d('0x51'));delete this[_0x952d('0x23')][_0x557ec5];delete this[_0x952d('0x29')][_0x557ec5];}};Fax[_0x952d('0x1e')]['syncHangup']=function(_0x4f913f){var _0x53a10b=this;if(this['channels'][_0x4f913f[_0x952d('0x24')]]){if(this['actions'][_0x4f913f['uniqueid']]){this['channels'][_0x4f913f[_0x952d('0x24')]]['id']=this[_0x952d('0x29')][_0x4f913f[_0x952d('0x24')]]['id'];this['channels'][_0x4f913f['uniqueid']][_0x952d('0x26')]=this['actions'][_0x4f913f[_0x952d('0x24')]][_0x952d('0x26')];}logger['info'](_0x4f913f['uniqueid'],this[_0x952d('0x29')][_0x4f913f['uniqueid']]?'\x20hangup\x20sendFile\x20':_0x952d('0x52'),JSON[_0x952d('0x40')](this[_0x952d('0x23')][_0x4f913f[_0x952d('0x24')]]));if(this[_0x952d('0x29')][_0x4f913f[_0x952d('0x24')]]){if(this[_0x952d('0x23')][_0x4f913f[_0x952d('0x24')]][_0x952d('0x53')]>0x0&&this[_0x952d('0x23')][_0x4f913f[_0x952d('0x24')]][_0x952d('0x54')]==='SUCCESS'){this[_0x952d('0x4d')](_0x4f913f[_0x952d('0x24')],!![]);}else{this['updateStatus'](_0x4f913f[_0x952d('0x24')],![],this[_0x952d('0x23')][_0x4f913f[_0x952d('0x24')]][_0x952d('0x55')]?_0x952d('0x56')+this[_0x952d('0x23')][_0x4f913f[_0x952d('0x24')]]['faxstatusstring']:_0x952d('0x57'));}}}};Fax[_0x952d('0x1e')][_0x952d('0x58')]=function(_0x25da2e){var _0xfcf0a=this;return new BPromise(function(_0x17b8c0,_0x47cf92){_0xfcf0a[_0x952d('0x59')](_0x25da2e,_0xfcf0a[_0x952d('0xf')][_0x25da2e['FaxAccountId']])['then'](function(_0x4f9c92){ut[_0x952d('0x49')](_0x952d('0x5a'),_0x4f9c92);_0x17b8c0(ut['message']('Fax\x20received'));})[_0x952d('0x3e')](function(_0x1bb10a){ut[_0x952d('0x49')]('[Fax][execOriginate][failure]',_0x1bb10a);updateStatus(_0x25da2e);_0x47cf92(ut[_0x952d('0x38')](_0x952d('0x5b')));});});};Fax[_0x952d('0x1e')][_0x952d('0x5c')]=function(_0x581160){var _0x31aa61=this;return new BPromise(function(_0x119e43,_0x322df9){var _0x35b0e7=_0x31aa61[_0x952d('0x5d')](_0x31aa61[_0x952d('0xf')][_0x581160['FaxAccountId']][_0x952d('0x5e')],_0x581160);if(_0x35b0e7['isValid']){_0x119e43(ut[_0x952d('0x38')](_0x952d('0x5f')));}else{_0x322df9(ut['message'](_0x35b0e7['message']));}});};function originate(_0x2b0729,_0x260e77,_0xe36d4f){return new BPromise(function(_0x2c5367,_0x2d1960){if(_0xe36d4f){var _0x48cd86=util['format'](_0x952d('0x60'),path[_0x952d('0x3a')](_0x2b0729[_0x952d('0x5')])[_0x952d('0x26')],_0x2b0729[_0x952d('0x5')]);gs[_0x952d('0x61')](_0x48cd86)['then'](function(){_0x2b0729[_0x952d('0x5')]=util[_0x952d('0x62')](_0x952d('0x63'),path[_0x952d('0x3a')](_0x2b0729['path'])[_0x952d('0x64')],path[_0x952d('0x3a')](_0x2b0729['path'])[_0x952d('0x26')]);_0x260e77[_0x952d('0x65')]=_0x2b0729[_0x952d('0x5')];ut['logger']('Convert\x20pdf\x20to\x20tif','');ami[_0x952d('0x66')](ut[_0x952d('0x67')](_0x2b0729,_0x260e77))[_0x952d('0x48')](function(_0x472c45){_0x2c5367(_0x472c45);})['catch'](function(_0x81c07c){_0x2d1960(_0x81c07c);});})['catch'](function(_0x327035){_0x2d1960(_0x327035);});}else{ami[_0x952d('0x66')](ut[_0x952d('0x67')](_0x2b0729,_0x260e77))['then'](function(_0x519e5f){_0x2c5367(_0x519e5f);})['catch'](function(_0x998e3c){_0x2d1960(_0x998e3c);});}});}Fax[_0x952d('0x1e')][_0x952d('0x59')]=function(_0x420a05,_0x4a4b15){var _0x241dc8=this;return new BPromise(function(_0x30b4f3,_0x312d5b){var _0x3c657a=uuid['v4']();var _0x2843d3=ut[_0x952d('0x68')](_0x420a05,_0x4a4b15);_0x241dc8[_0x952d('0x29')][_0x3c657a]=new Action(_0x3c657a,_0x4a4b15,_0x420a05);var _0xe6643c=_0x241dc8[_0x952d('0x29')][_0x3c657a];if(path[_0x952d('0x3a')](_0x420a05[_0x952d('0x5')])['ext']==='.pdf'){originate(_0xe6643c,_0x2843d3,!![])[_0x952d('0x48')](function(_0x54f685){_0x30b4f3(_0x54f685);})[_0x952d('0x3e')](function(_0x1e678f){_0x312d5b(_0x1e678f);});}else{originate(_0xe6643c,_0x2843d3,![])[_0x952d('0x48')](function(_0x4c343b){_0x30b4f3(_0x4c343b);})[_0x952d('0x3e')](function(_0x538b46){_0x312d5b(_0x538b46);});}});};Fax[_0x952d('0x1e')][_0x952d('0x69')]=function(_0x1d205d){return!_[_0x952d('0x6a')](_0x1d205d)&&!_[_0x952d('0x6a')](_0x1d205d[_0x952d('0x26')])&&!_[_0x952d('0x6a')](_0x1d205d[_0x952d('0x6b')])&&_0x1d205d[_0x952d('0x6b')]&&!_[_0x952d('0x6a')](this[_0x952d('0x10')][util['format'](_0x952d('0x6c'),_0x1d205d[_0x952d('0x26')])])&&!_[_0x952d('0x6a')](this[_0x952d('0x10')][util[_0x952d('0x62')](_0x952d('0x6c'),_0x1d205d[_0x952d('0x26')])][_0x952d('0x30')])&&(this[_0x952d('0x10')][util[_0x952d('0x62')](_0x952d('0x6c'),_0x1d205d[_0x952d('0x26')])][_0x952d('0x30')]===_0x952d('0x6d')||this['trunks'][util[_0x952d('0x62')](_0x952d('0x6c'),_0x1d205d[_0x952d('0x26')])]['status']===_0x952d('0x6e'));};Fax[_0x952d('0x1e')]['checkTrunk']=function(_0x23e254,_0x28ce1b){if(!this['isTrunkReachable'](_0x23e254)){ut[_0x952d('0x49')](_0x952d('0x6f'),_[_0x952d('0x6a')](_0x23e254)?'':_0x23e254[_0x952d('0x26')]+_0x952d('0x70'));return{'isValid':![],'message':_0x952d('0x71')};}if(_[_0x952d('0x6a')](_0x28ce1b[_0x952d('0x9')])){ut[_0x952d('0x49')]('[Fax][checkTrunk][Empty\x20Fax]',JSON[_0x952d('0x40')](_0x28ce1b));return{'isValid':![],'message':_0x952d('0x72')};}if(_[_0x952d('0x6a')](_0x28ce1b[_0x952d('0x5')])){ut[_0x952d('0x49')](_0x952d('0x73'),JSON['stringify'](_0x28ce1b));return{'isValid':![],'message':'Empty\x20path'};}return{'isValid':!![],'message':'Is\x20Valid'};};module['exports']=Fax; \ No newline at end of file diff --git a/server/services/ami/fax/rpcDb.js b/server/services/ami/fax/rpcDb.js index 090735b..66a6814 100644 --- a/server/services/ami/fax/rpcDb.js +++ b/server/services/ami/fax/rpcDb.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc3a3=['inspect','notify','then','[Notify]\x20','util','bluebird','../../../config/logger','error'];(function(_0x32be47,_0xf88fec){var _0x322510=function(_0x46c9b4){while(--_0x46c9b4){_0x32be47['push'](_0x32be47['shift']());}};_0x322510(++_0xf88fec);}(_0xc3a3,0x6c));var _0x3c3a=function(_0x3f6cdf,_0xe7354e){_0x3f6cdf=_0x3f6cdf-0x0;var _0xf60c51=_0xc3a3[_0x3f6cdf];return _0xf60c51;};'use strict';var util=require(_0x3c3a('0x0'));var BPromise=require(_0x3c3a('0x1'));var logger=require(_0x3c3a('0x2'))('preview');var _=require('lodash');var faxAccount=require('../rpc/faxAccount');function loggerCatch(_0x3849ce){return function(_0x50ded4){logger[_0x3c3a('0x3')](_0x3849ce,util[_0x3c3a('0x4')](_0x50ded4,{'showHidden':![],'depth':null}));};}exports[_0x3c3a('0x5')]=function(_0x1bd955,_0x1477af){return BPromise['resolve']()[_0x3c3a('0x6')](faxAccount[_0x3c3a('0x5')](_0x1bd955,_0x1477af))['catch'](loggerCatch(_0x3c3a('0x7')));}; \ No newline at end of file +var _0xa13d=['inspect','notify','resolve','then','catch','[Notify]\x20','util','../../../config/logger','preview','../rpc/faxAccount','error'];(function(_0x3f0122,_0x1627ca){var _0x2039d7=function(_0x5631dd){while(--_0x5631dd){_0x3f0122['push'](_0x3f0122['shift']());}};_0x2039d7(++_0x1627ca);}(_0xa13d,0xd7));var _0xda13=function(_0x3d081f,_0x322d09){_0x3d081f=_0x3d081f-0x0;var _0x472e8b=_0xa13d[_0x3d081f];return _0x472e8b;};'use strict';var util=require(_0xda13('0x0'));var BPromise=require('bluebird');var logger=require(_0xda13('0x1'))(_0xda13('0x2'));var _=require('lodash');var faxAccount=require(_0xda13('0x3'));function loggerCatch(_0x543a35){return function(_0x3c473f){logger[_0xda13('0x4')](_0x543a35,util[_0xda13('0x5')](_0x3c473f,{'showHidden':![],'depth':null}));};}exports[_0xda13('0x6')]=function(_0x372e41,_0x4a9b72){return BPromise[_0xda13('0x7')]()[_0xda13('0x8')](faxAccount[_0xda13('0x6')](_0x372e41,_0x4a9b72))[_0xda13('0x9')](loggerCatch(_0xda13('0xa')));}; \ No newline at end of file diff --git a/server/services/ami/fax/util/gs.js b/server/services/ami/fax/util/gs.js index b92fe55..eadcbfe 100644 --- a/server/services/ami/fax/util/gs.js +++ b/server/services/ami/fax/util/gs.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x36e3=['Exec\x20gs','\x20Error\x20:','inspect','../../../../config/logger','fax','exec','execute','info'];(function(_0x29f19f,_0x33ec77){var _0x4f3bdb=function(_0x360d7e){while(--_0x360d7e){_0x29f19f['push'](_0x29f19f['shift']());}};_0x4f3bdb(++_0x33ec77);}(_0x36e3,0x73));var _0x336e=function(_0x2bf141,_0x31eac7){_0x2bf141=_0x2bf141-0x0;var _0x48277b=_0x36e3[_0x2bf141];return _0x48277b;};'use strict';var util=require('util');var logger=require(_0x336e('0x0'))(_0x336e('0x1'));var BPromise=require('bluebird');var exec=require('child_process')[_0x336e('0x2')];exports[_0x336e('0x3')]=function(_0xbe470b){return new BPromise(function(_0x289e3f,_0xeebc45){exec(_0xbe470b,function(_0x56feeb,_0xe5e03e,_0x106947){logger[_0x336e('0x4')](_0x336e('0x5'),_0xe5e03e);if(_0x56feeb){logger['info'](_0x336e('0x5'),_0x336e('0x6'),util[_0x336e('0x7')](_0x56feeb,{'showHidden':![],'depth':null}),_0xe5e03e,_0x106947);_0xeebc45(_0x56feeb);}_0x289e3f(_0xe5e03e);});});}; \ No newline at end of file +var _0x03e0=['bluebird','child_process','execute','info','Exec\x20gs','\x20Error\x20:','inspect','util','fax'];(function(_0x4c876d,_0x3ab541){var _0x58b963=function(_0x1cf41a){while(--_0x1cf41a){_0x4c876d['push'](_0x4c876d['shift']());}};_0x58b963(++_0x3ab541);}(_0x03e0,0xbb));var _0x003e=function(_0x474dca,_0x5b6a9f){_0x474dca=_0x474dca-0x0;var _0x310468=_0x03e0[_0x474dca];return _0x310468;};'use strict';var util=require(_0x003e('0x0'));var logger=require('../../../../config/logger')(_0x003e('0x1'));var BPromise=require(_0x003e('0x2'));var exec=require(_0x003e('0x3'))['exec'];exports[_0x003e('0x4')]=function(_0xea2cae){return new BPromise(function(_0x22ba37,_0x38b7cc){exec(_0xea2cae,function(_0xe6807b,_0x5489a0,_0x1d73af){logger[_0x003e('0x5')](_0x003e('0x6'),_0x5489a0);if(_0xe6807b){logger[_0x003e('0x5')]('Exec\x20gs',_0x003e('0x7'),util[_0x003e('0x8')](_0xe6807b,{'showHidden':![],'depth':null}),_0x5489a0,_0x1d73af);_0x38b7cc(_0xe6807b);}_0x22ba37(_0x5489a0);});});}; \ No newline at end of file diff --git a/server/services/ami/fax/util/util.js b/server/services/ami/fax/util/util.js index eb66fc5..b6bb992 100644 --- a/server/services/ami/fax/util/util.js +++ b/server/services/ami/fax/util/util.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd38c=['maxrate','format','\x22%s\x22','modem','gateway','t38timeout','path','variablesAction','uniqueid','channel','from-sip','headerinfo','util','lodash','../../../../config/logger','fax','logger','info','ecm','minrate'];(function(_0x179b0f,_0xe6c805){var _0xa95cfa=function(_0x51730e){while(--_0x51730e){_0x179b0f['push'](_0x179b0f['shift']());}};_0xa95cfa(++_0xe6c805);}(_0xd38c,0x174));var _0xcd38=function(_0x26659f,_0x5532a6){_0x26659f=_0x26659f-0x0;var _0x33ef20=_0xd38c[_0x26659f];return _0x33ef20;};'use strict';var util=require(_0xcd38('0x0'));var _=require(_0xcd38('0x1'));var moment=require('moment');var logger=require(_0xcd38('0x2'))(_0xcd38('0x3'));exports['message']=function(_0x2817e9){return{'message':_0x2817e9};};exports[_0xcd38('0x4')]=function(_0x4e2887,_0x21f42f){logger[_0xcd38('0x5')](_0x4e2887,util['inspect'](_0x21f42f,{'showHidden':![],'depth':null}));};exports['addVariables']=function(_0xcb6e5f,_0x4a0a13){var _0x1d8379={'XMF-ECM':_0x4a0a13[_0xcd38('0x6')],'XMF-HEADERINFO':_0x4a0a13['headerinfo'],'XMF-MINRATE':_0x4a0a13[_0xcd38('0x7')],'XMF-MAXRATE':_0x4a0a13[_0xcd38('0x8')],'XMF-MODEM':util[_0xcd38('0x9')](_0xcd38('0xa'),_0x4a0a13[_0xcd38('0xb')]),'XMF-GATEWAY':_0x4a0a13[_0xcd38('0xc')],'XMF-FAXDETECT':_0x4a0a13['faxdetect'],'XMF-T38TIMEOUT':_0x4a0a13[_0xcd38('0xd')],'XMF-LOCALSTATIONID':_0x4a0a13['localstationid'],'XMF-PATH':_0xcb6e5f[_0xcd38('0xe')]};return _0x1d8379;};exports[_0xcd38('0xf')]=function(_0x17e258,_0x4458e4){return{'actionid':_0x17e258[_0xcd38('0x10')],'action':'originate','channel':_0x17e258[_0xcd38('0x11')],'Exten':'xcally-motion-fax','Context':_0xcd38('0x12'),'Priority':'1','callerid':util[_0xcd38('0x9')]('\x22%s\x22\x20<%s>',_0x17e258[_0xcd38('0x13')]?_0x17e258[_0xcd38('0x13')]:'',_0x17e258['localstationid']),'variable':_0x4458e4,'timeout':0x1e*0x3e8,'async':!![],'channelid':_0x17e258[_0xcd38('0x10')]};}; \ No newline at end of file +var _0x6446=['maxrate','format','\x22%s\x22','modem','gateway','faxdetect','t38timeout','variablesAction','uniqueid','originate','xcally-motion-fax','from-sip','util','lodash','fax','message','logger','inspect','ecm','headerinfo'];(function(_0x15cdcb,_0x4340e9){var _0x37b069=function(_0x304cfb){while(--_0x304cfb){_0x15cdcb['push'](_0x15cdcb['shift']());}};_0x37b069(++_0x4340e9);}(_0x6446,0x160));var _0x6644=function(_0x324d02,_0x6d9c0b){_0x324d02=_0x324d02-0x0;var _0x3d4f59=_0x6446[_0x324d02];return _0x3d4f59;};'use strict';var util=require(_0x6644('0x0'));var _=require(_0x6644('0x1'));var moment=require('moment');var logger=require('../../../../config/logger')(_0x6644('0x2'));exports[_0x6644('0x3')]=function(_0x358244){return{'message':_0x358244};};exports[_0x6644('0x4')]=function(_0x2bd24b,_0x5b4138){logger['info'](_0x2bd24b,util[_0x6644('0x5')](_0x5b4138,{'showHidden':![],'depth':null}));};exports['addVariables']=function(_0x5106f4,_0x5aec45){var _0x54a2d5={'XMF-ECM':_0x5aec45[_0x6644('0x6')],'XMF-HEADERINFO':_0x5aec45[_0x6644('0x7')],'XMF-MINRATE':_0x5aec45['minrate'],'XMF-MAXRATE':_0x5aec45[_0x6644('0x8')],'XMF-MODEM':util[_0x6644('0x9')](_0x6644('0xa'),_0x5aec45[_0x6644('0xb')]),'XMF-GATEWAY':_0x5aec45[_0x6644('0xc')],'XMF-FAXDETECT':_0x5aec45[_0x6644('0xd')],'XMF-T38TIMEOUT':_0x5aec45[_0x6644('0xe')],'XMF-LOCALSTATIONID':_0x5aec45['localstationid'],'XMF-PATH':_0x5106f4['path']};return _0x54a2d5;};exports[_0x6644('0xf')]=function(_0x1583cd,_0x37fb30){return{'actionid':_0x1583cd[_0x6644('0x10')],'action':_0x6644('0x11'),'channel':_0x1583cd['channel'],'Exten':_0x6644('0x12'),'Context':_0x6644('0x13'),'Priority':'1','callerid':util[_0x6644('0x9')]('\x22%s\x22\x20<%s>',_0x1583cd[_0x6644('0x7')]?_0x1583cd[_0x6644('0x7')]:'',_0x1583cd['localstationid']),'variable':_0x37fb30,'timeout':0x1e*0x3e8,'async':!![],'channelid':_0x1583cd[_0x6644('0x10')]};}; \ No newline at end of file diff --git a/server/services/ami/index.js b/server/services/ami/index.js index 46d52ba..7f7cbdd 100644 --- a/server/services/ami/index.js +++ b/server/services/ami/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2ed1=['initVoiceQueueHopperHistory','getCampaignHopperHistory','initCampaignHopperHistory','getVoiceCallReports','initVoiceCallReports','catch','log','sync','util','moment','./report','./acw','./trigger','./dialer','./preview','./fax','./rpc/user','./rpc/voiceQueue','./rpc/voiceQueueReport','./rpc/voiceCallReport','./rpc/trigger','./rpc/template','./rpc/campaign','./rpc/voiceExtension','./rpc/faxAccount','./rpc/integrations/zendesk','./rpc/integrations/salesforce','./rpc/integrations/sugarcrm','./rpc/integrations/freshdesk','./rpc/integrations/desk','./rpc/integrations/zoho','./rpc/integrations/vtiger','./rpc/integrations/servicenow','./rpc/integrations/dynamics365','get','hour','resolve','then','initAgents','getTelephones','initTelephones','initTrunks','getVoiceQueues','initVoiceQueues','getTriggers','initTriggers','getTemplates','initTemplates','initZendeskAccounts','getSalesforceAccounts','getSugarcrmAccounts','initSugarcrmAccounts','getFreshdeskAccounts','initFreshdeskAccounts','getDeskAccounts','initDeskAccounts','getZohoAccounts','getVtigerAccounts','initVtigerAccounts','getFreshsalesAccounts','getServicenowAccounts','getCampaigns','initCampaigns','getVoiceExtensions','initVoiceExtensions','initFaxAccounts','getVoiceQueueReports','initVoiceQueueReports','getVoiceQueueHopperHistory'];(function(_0x14ec54,_0x2d5098){var _0x2f8c0e=function(_0x3e621e){while(--_0x3e621e){_0x14ec54['push'](_0x14ec54['shift']());}};_0x2f8c0e(++_0x2d5098);}(_0x2ed1,0x1eb));var _0x12ed=function(_0xa2a24a,_0x1e5b1a){_0xa2a24a=_0xa2a24a-0x0;var _0x5d568a=_0x2ed1[_0xa2a24a];return _0x5d568a;};'use strict';var BPromise=require('bluebird');var util=require(_0x12ed('0x0'));var moment=require(_0x12ed('0x1'));var server=require('./server');var Realtime=require('./realtime');var Report=require(_0x12ed('0x2'));var Acw=require(_0x12ed('0x3'));var Trigger=require(_0x12ed('0x4'));var Dialer=require(_0x12ed('0x5'));var Preview=require(_0x12ed('0x6'));var Fax=require(_0x12ed('0x7'));var user=require(_0x12ed('0x8'));var voiceQueue=require(_0x12ed('0x9'));var voiceQueueReport=require(_0x12ed('0xa'));var voiceCallReport=require(_0x12ed('0xb'));var trunk=require('./rpc/trunk');var trigger=require(_0x12ed('0xc'));var template=require(_0x12ed('0xd'));var cmHopperHistory=require('./rpc/cmHopperHistory');var campaign=require(_0x12ed('0xe'));var voiceExtension=require(_0x12ed('0xf'));var faxAccount=require(_0x12ed('0x10'));var zendesk=require(_0x12ed('0x11'));var salesforce=require(_0x12ed('0x12'));var sugarcrm=require(_0x12ed('0x13'));var freshdesk=require(_0x12ed('0x14'));var desk=require(_0x12ed('0x15'));var zoho=require(_0x12ed('0x16'));var vtiger=require(_0x12ed('0x17'));var freshsales=require('./rpc/integrations/freshsales');var servicenow=require(_0x12ed('0x18'));var dynamics365=require(_0x12ed('0x19'));var realtime=new Realtime();var report=new Report(realtime);var acw=new Acw(realtime);var channelTrigger=new Trigger(realtime);var preview=new Preview(realtime);var dialer=new Dialer(realtime,preview);var fax=new Fax(realtime);var isTrue=!![];var initP=!![];function ifMidnight(){if(moment()[_0x12ed('0x1a')](_0x12ed('0x1b'))===0x0&&initP){initP=![];isTrue=!![];initParams();}if(moment()['get']('hour')===0x1&&isTrue){isTrue=![];initP=!![];}}function initRealtime(){ifMidnight();return BPromise[_0x12ed('0x1c')]()[_0x12ed('0x1d')](user['getAgents']())[_0x12ed('0x1d')](realtime[_0x12ed('0x1e')]())[_0x12ed('0x1d')](user[_0x12ed('0x1f')]())[_0x12ed('0x1d')](realtime[_0x12ed('0x20')]())[_0x12ed('0x1d')](trunk['getTrunks']())['then'](realtime[_0x12ed('0x21')]())[_0x12ed('0x1d')](voiceQueue[_0x12ed('0x22')]())['then'](realtime[_0x12ed('0x23')]())[_0x12ed('0x1d')](trigger[_0x12ed('0x24')]())[_0x12ed('0x1d')](realtime[_0x12ed('0x25')]())[_0x12ed('0x1d')](template[_0x12ed('0x26')]())[_0x12ed('0x1d')](realtime[_0x12ed('0x27')]())['then'](zendesk['getZendeskAccounts']())[_0x12ed('0x1d')](realtime[_0x12ed('0x28')]())[_0x12ed('0x1d')](salesforce[_0x12ed('0x29')]())[_0x12ed('0x1d')](realtime['initSalesforceAccounts']())[_0x12ed('0x1d')](sugarcrm[_0x12ed('0x2a')]())[_0x12ed('0x1d')](realtime[_0x12ed('0x2b')]())[_0x12ed('0x1d')](freshdesk[_0x12ed('0x2c')]())[_0x12ed('0x1d')](realtime[_0x12ed('0x2d')]())['then'](desk[_0x12ed('0x2e')]())['then'](realtime[_0x12ed('0x2f')]())['then'](zoho[_0x12ed('0x30')]())['then'](realtime['initZohoAccounts']())['then'](vtiger[_0x12ed('0x31')]())[_0x12ed('0x1d')](realtime[_0x12ed('0x32')]())[_0x12ed('0x1d')](freshsales[_0x12ed('0x33')]())[_0x12ed('0x1d')](realtime['initFreshsalesAccounts']())['then'](servicenow[_0x12ed('0x34')]())[_0x12ed('0x1d')](realtime['initServicenowAccounts']())[_0x12ed('0x1d')](dynamics365['getDynamics365Accounts']())[_0x12ed('0x1d')](realtime['initDynamics365Accounts']())[_0x12ed('0x1d')](campaign[_0x12ed('0x35')]())['then'](realtime[_0x12ed('0x36')]())[_0x12ed('0x1d')](voiceExtension[_0x12ed('0x37')]())['then'](realtime[_0x12ed('0x38')]())['then'](faxAccount['getFaxAccounts']())['then'](realtime[_0x12ed('0x39')]())['then'](function(){return realtime;});}function initParams(){return BPromise[_0x12ed('0x1c')]()[_0x12ed('0x1d')](voiceQueueReport[_0x12ed('0x3a')]())[_0x12ed('0x1d')](realtime[_0x12ed('0x3b')]())[_0x12ed('0x1d')](cmHopperHistory[_0x12ed('0x3c')]())[_0x12ed('0x1d')](realtime[_0x12ed('0x3d')]())[_0x12ed('0x1d')](cmHopperHistory[_0x12ed('0x3e')]())[_0x12ed('0x1d')](realtime[_0x12ed('0x3f')]())[_0x12ed('0x1d')](voiceCallReport[_0x12ed('0x40')]())['then'](realtime[_0x12ed('0x41')]())[_0x12ed('0x1d')](function(_0x337fac){})[_0x12ed('0x42')](function(_0x396f31){console[_0x12ed('0x43')](_0x396f31);});}function main(){return server['listen'](realtime,preview,fax)[_0x12ed('0x1d')](function(_0x32b3cb){return initRealtime();})[_0x12ed('0x1d')](function(){return initParams();})[_0x12ed('0x1d')](function(){report[_0x12ed('0x44')]();setInterval(initRealtime,0x1388);})[_0x12ed('0x42')](function(_0x30c62f){console[_0x12ed('0x43')](_0x30c62f);});}main(); \ No newline at end of file +var _0x15ed=['initTelephones','getTrunks','initTrunks','getVoiceQueues','initVoiceQueues','getTriggers','getTemplates','initTemplates','initZendeskAccounts','getSalesforceAccounts','initSalesforceAccounts','getSugarcrmAccounts','getFreshdeskAccounts','initFreshdeskAccounts','getDeskAccounts','getZohoAccounts','getFreshsalesAccounts','initFreshsalesAccounts','initServicenowAccounts','getDynamics365Accounts','initCampaigns','getVoiceExtensions','initVoiceExtensions','initFaxAccounts','resolve','initVoiceQueueReports','getVoiceQueueHopperHistory','initVoiceQueueHopperHistory','initCampaignHopperHistory','getVoiceCallReports','initVoiceCallReports','catch','log','bluebird','moment','./server','./acw','./trigger','./fax','./rpc/user','./rpc/voiceQueue','./rpc/voiceQueueReport','./rpc/voiceCallReport','./rpc/trunk','./rpc/trigger','./rpc/template','./rpc/cmHopperHistory','./rpc/campaign','./rpc/voiceExtension','./rpc/faxAccount','./rpc/integrations/zendesk','./rpc/integrations/salesforce','./rpc/integrations/sugarcrm','./rpc/integrations/freshdesk','./rpc/integrations/zoho','./rpc/integrations/vtiger','./rpc/integrations/freshsales','./rpc/integrations/servicenow','./rpc/integrations/dynamics365','get','hour','then','getAgents','initAgents','getTelephones'];(function(_0x20203d,_0x32beb3){var _0x3f4c9c=function(_0x24dd33){while(--_0x24dd33){_0x20203d['push'](_0x20203d['shift']());}};_0x3f4c9c(++_0x32beb3);}(_0x15ed,0x125));var _0xd15e=function(_0xc36d01,_0x3bf1a6){_0xc36d01=_0xc36d01-0x0;var _0xecb231=_0x15ed[_0xc36d01];return _0xecb231;};'use strict';var BPromise=require(_0xd15e('0x0'));var util=require('util');var moment=require(_0xd15e('0x1'));var server=require(_0xd15e('0x2'));var Realtime=require('./realtime');var Report=require('./report');var Acw=require(_0xd15e('0x3'));var Trigger=require(_0xd15e('0x4'));var Dialer=require('./dialer');var Preview=require('./preview');var Fax=require(_0xd15e('0x5'));var user=require(_0xd15e('0x6'));var voiceQueue=require(_0xd15e('0x7'));var voiceQueueReport=require(_0xd15e('0x8'));var voiceCallReport=require(_0xd15e('0x9'));var trunk=require(_0xd15e('0xa'));var trigger=require(_0xd15e('0xb'));var template=require(_0xd15e('0xc'));var cmHopperHistory=require(_0xd15e('0xd'));var campaign=require(_0xd15e('0xe'));var voiceExtension=require(_0xd15e('0xf'));var faxAccount=require(_0xd15e('0x10'));var zendesk=require(_0xd15e('0x11'));var salesforce=require(_0xd15e('0x12'));var sugarcrm=require(_0xd15e('0x13'));var freshdesk=require(_0xd15e('0x14'));var desk=require('./rpc/integrations/desk');var zoho=require(_0xd15e('0x15'));var vtiger=require(_0xd15e('0x16'));var freshsales=require(_0xd15e('0x17'));var servicenow=require(_0xd15e('0x18'));var dynamics365=require(_0xd15e('0x19'));var realtime=new Realtime();var report=new Report(realtime);var acw=new Acw(realtime);var channelTrigger=new Trigger(realtime);var preview=new Preview(realtime);var dialer=new Dialer(realtime,preview);var fax=new Fax(realtime);var isTrue=!![];var initP=!![];function ifMidnight(){if(moment()['get']('hour')===0x0&&initP){initP=![];isTrue=!![];initParams();}if(moment()[_0xd15e('0x1a')](_0xd15e('0x1b'))===0x1&&isTrue){isTrue=![];initP=!![];}}function initRealtime(){ifMidnight();return BPromise['resolve']()[_0xd15e('0x1c')](user[_0xd15e('0x1d')]())[_0xd15e('0x1c')](realtime[_0xd15e('0x1e')]())[_0xd15e('0x1c')](user[_0xd15e('0x1f')]())[_0xd15e('0x1c')](realtime[_0xd15e('0x20')]())[_0xd15e('0x1c')](trunk[_0xd15e('0x21')]())[_0xd15e('0x1c')](realtime[_0xd15e('0x22')]())['then'](voiceQueue[_0xd15e('0x23')]())[_0xd15e('0x1c')](realtime[_0xd15e('0x24')]())[_0xd15e('0x1c')](trigger[_0xd15e('0x25')]())[_0xd15e('0x1c')](realtime['initTriggers']())[_0xd15e('0x1c')](template[_0xd15e('0x26')]())[_0xd15e('0x1c')](realtime[_0xd15e('0x27')]())[_0xd15e('0x1c')](zendesk['getZendeskAccounts']())[_0xd15e('0x1c')](realtime[_0xd15e('0x28')]())[_0xd15e('0x1c')](salesforce[_0xd15e('0x29')]())[_0xd15e('0x1c')](realtime[_0xd15e('0x2a')]())[_0xd15e('0x1c')](sugarcrm[_0xd15e('0x2b')]())['then'](realtime['initSugarcrmAccounts']())[_0xd15e('0x1c')](freshdesk[_0xd15e('0x2c')]())[_0xd15e('0x1c')](realtime[_0xd15e('0x2d')]())[_0xd15e('0x1c')](desk[_0xd15e('0x2e')]())[_0xd15e('0x1c')](realtime['initDeskAccounts']())[_0xd15e('0x1c')](zoho[_0xd15e('0x2f')]())[_0xd15e('0x1c')](realtime['initZohoAccounts']())[_0xd15e('0x1c')](vtiger['getVtigerAccounts']())['then'](realtime['initVtigerAccounts']())[_0xd15e('0x1c')](freshsales[_0xd15e('0x30')]())['then'](realtime[_0xd15e('0x31')]())[_0xd15e('0x1c')](servicenow['getServicenowAccounts']())['then'](realtime[_0xd15e('0x32')]())[_0xd15e('0x1c')](dynamics365[_0xd15e('0x33')]())[_0xd15e('0x1c')](realtime['initDynamics365Accounts']())[_0xd15e('0x1c')](campaign['getCampaigns']())['then'](realtime[_0xd15e('0x34')]())[_0xd15e('0x1c')](voiceExtension[_0xd15e('0x35')]())['then'](realtime[_0xd15e('0x36')]())['then'](faxAccount['getFaxAccounts']())[_0xd15e('0x1c')](realtime[_0xd15e('0x37')]())[_0xd15e('0x1c')](function(){return realtime;});}function initParams(){return BPromise[_0xd15e('0x38')]()[_0xd15e('0x1c')](voiceQueueReport['getVoiceQueueReports']())[_0xd15e('0x1c')](realtime[_0xd15e('0x39')]())[_0xd15e('0x1c')](cmHopperHistory[_0xd15e('0x3a')]())[_0xd15e('0x1c')](realtime[_0xd15e('0x3b')]())[_0xd15e('0x1c')](cmHopperHistory['getCampaignHopperHistory']())[_0xd15e('0x1c')](realtime[_0xd15e('0x3c')]())[_0xd15e('0x1c')](voiceCallReport[_0xd15e('0x3d')]())[_0xd15e('0x1c')](realtime[_0xd15e('0x3e')]())[_0xd15e('0x1c')](function(_0xbfb636){})[_0xd15e('0x3f')](function(_0x1b2c32){console[_0xd15e('0x40')](_0x1b2c32);});}function main(){return server['listen'](realtime,preview,fax)[_0xd15e('0x1c')](function(_0x39c80d){return initRealtime();})[_0xd15e('0x1c')](function(){return initParams();})['then'](function(){report['sync']();setInterval(initRealtime,0x1388);})[_0xd15e('0x3f')](function(_0x2c1eee){console[_0xd15e('0x40')](_0x2c1eee);});}main(); \ No newline at end of file diff --git a/server/services/ami/model/agent.js b/server/services/ami/model/agent.js index ffb6fd2..cd77b6a 100644 --- a/server/services/ami/model/agent.js +++ b/server/services/ami/model/agent.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9c44=['phone','mobile','online','voiceStatus','voiceStatusTime','voiceStatusCallerIdNumber','onhold','local','prototype','updateStatusRealtime','toLowerCase','not_inuse','idle','inuse','talking','statePause','stateTime','address','voiceStatusQueue','stringify','format','user:%s','emit','user:presence','exports','moment','md5','ioredis','../../../config/environment','redis','defaults','socket.io-emitter','name','email','accountcode','fullname','state','status','unknown'];(function(_0x1b16cf,_0x220918){var _0x1ae2d8=function(_0x344a58){while(--_0x344a58){_0x1b16cf['push'](_0x1b16cf['shift']());}};_0x1ae2d8(++_0x220918);}(_0x9c44,0x178));var _0x49c4=function(_0x8c43de,_0x90ff31){_0x8c43de=_0x8c43de-0x0;var _0xa6591b=_0x9c44[_0x8c43de];return _0xa6591b;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x49c4('0x0'));var md5=require(_0x49c4('0x1'));var Redis=require(_0x49c4('0x2'));var config=require(_0x49c4('0x3'));config[_0x49c4('0x4')]=_[_0x49c4('0x5')](config['redis'],{'host':'localhost','port':0x18eb});var io=require(_0x49c4('0x6'))(new Redis(config['redis']));function Agent(_0xc1278f){this['id']=_0xc1278f['id']||0x0;this[_0x49c4('0x7')]=_0xc1278f[_0x49c4('0x7')]||'';this[_0x49c4('0x8')]=_0xc1278f[_0x49c4('0x8')]||'';this['accountcode']=_0xc1278f[_0x49c4('0x9')]||'';this[_0x49c4('0xa')]=_0xc1278f[_0x49c4('0xa')]||'';this[_0x49c4('0xb')]='unknown';this['stateTime']=0x0;this[_0x49c4('0xc')]=_0x49c4('0xd');this['address']='';this[_0x49c4('0xe')]='';this[_0x49c4('0xf')]='';this['interface']='';this['online']=_0xc1278f[_0x49c4('0x10')]||![];this[_0x49c4('0x11')]='unknown';this[_0x49c4('0x12')]=0x0;this[_0x49c4('0x13')]='';this['voiceStatusQueue']='';this[_0x49c4('0x14')]=![];this[_0x49c4('0x15')]=![];this[_0x49c4('0x1')]='';}Agent[_0x49c4('0x16')][_0x49c4('0x17')]=function(_0x18211c){var _0x75ea8;if(_0x18211c&&_0x18211c[_0x49c4('0xb')]){_0x75ea8=_0x18211c['state'][_0x49c4('0x18')]();switch(_0x75ea8){case _0x49c4('0x19'):_0x75ea8=_0x49c4('0x1a');break;case _0x49c4('0x1b'):_0x75ea8=_0x49c4('0x1c');break;}}if(_0x75ea8&&this['voiceStatus']!==_0x75ea8||_0x18211c[_0x49c4('0x1d')]){this[_0x49c4('0x12')]=_['toNumber'](moment()['format']('x'));}if(_0x75ea8){this[_0x49c4('0x11')]=_0x75ea8;}var _0x2f82d5={'id':this['id'],'name':this[_0x49c4('0x7')],'email':this['email'],'accountcode':this[_0x49c4('0x9')],'fullname':this['fullname'],'state':this[_0x49c4('0xb')],'stateTime':this[_0x49c4('0x1e')],'status':this[_0x49c4('0xc')],'address':this[_0x49c4('0x1f')],'online':this[_0x49c4('0x10')],'voiceStatus':this[_0x49c4('0x11')],'voiceStatusTime':this[_0x49c4('0x12')],'voiceStatusCallerIdNumber':this[_0x49c4('0x13')],'voiceStatusQueue':this[_0x49c4('0x20')],'interface':this['interface'],'onhold':this['onhold']};var _0x57f502=md5(JSON[_0x49c4('0x21')](_0x2f82d5));if(this['md5']!==_0x57f502){this['md5']=_0x57f502;io['to'](util[_0x49c4('0x22')](_0x49c4('0x23'),_0x2f82d5[_0x49c4('0x7')]))[_0x49c4('0x24')]('user:save',_0x2f82d5);io['emit'](_0x49c4('0x25'),_0x2f82d5);}};module[_0x49c4('0x26')]=Agent; \ No newline at end of file +var _0x70e0=['name','voiceStatusQueue','onhold','stringify','md5','user:%s','user:save','emit','user:presence','lodash','util','moment','../../../config/environment','redis','defaults','socket.io-emitter','email','accountcode','fullname','state','unknown','address','phone','mobile','interface','online','voiceStatus','voiceStatusTime','voiceStatusCallerIdNumber','local','toLowerCase','not_inuse','idle','inuse','statePause','toNumber','format'];(function(_0x215881,_0x2f0c54){var _0x6575f=function(_0x54aede){while(--_0x54aede){_0x215881['push'](_0x215881['shift']());}};_0x6575f(++_0x2f0c54);}(_0x70e0,0x17b));var _0x070e=function(_0x444894,_0x2cfcd4){_0x444894=_0x444894-0x0;var _0x463181=_0x70e0[_0x444894];return _0x463181;};'use strict';var _=require(_0x070e('0x0'));var util=require(_0x070e('0x1'));var moment=require(_0x070e('0x2'));var md5=require('md5');var Redis=require('ioredis');var config=require(_0x070e('0x3'));config[_0x070e('0x4')]=_[_0x070e('0x5')](config[_0x070e('0x4')],{'host':'localhost','port':0x18eb});var io=require(_0x070e('0x6'))(new Redis(config['redis']));function Agent(_0x46fe68){this['id']=_0x46fe68['id']||0x0;this['name']=_0x46fe68['name']||'';this['email']=_0x46fe68[_0x070e('0x7')]||'';this[_0x070e('0x8')]=_0x46fe68[_0x070e('0x8')]||'';this[_0x070e('0x9')]=_0x46fe68[_0x070e('0x9')]||'';this[_0x070e('0xa')]=_0x070e('0xb');this['stateTime']=0x0;this['status']=_0x070e('0xb');this[_0x070e('0xc')]='';this[_0x070e('0xd')]='';this[_0x070e('0xe')]='';this[_0x070e('0xf')]='';this[_0x070e('0x10')]=_0x46fe68[_0x070e('0x10')]||![];this[_0x070e('0x11')]=_0x070e('0xb');this[_0x070e('0x12')]=0x0;this[_0x070e('0x13')]='';this['voiceStatusQueue']='';this['onhold']=![];this[_0x070e('0x14')]=![];this['md5']='';}Agent['prototype']['updateStatusRealtime']=function(_0x11d2ce){var _0x14c3fd;if(_0x11d2ce&&_0x11d2ce['state']){_0x14c3fd=_0x11d2ce['state'][_0x070e('0x15')]();switch(_0x14c3fd){case _0x070e('0x16'):_0x14c3fd=_0x070e('0x17');break;case _0x070e('0x18'):_0x14c3fd='talking';break;}}if(_0x14c3fd&&this['voiceStatus']!==_0x14c3fd||_0x11d2ce[_0x070e('0x19')]){this[_0x070e('0x12')]=_[_0x070e('0x1a')](moment()[_0x070e('0x1b')]('x'));}if(_0x14c3fd){this[_0x070e('0x11')]=_0x14c3fd;}var _0x5037eb={'id':this['id'],'name':this[_0x070e('0x1c')],'email':this[_0x070e('0x7')],'accountcode':this[_0x070e('0x8')],'fullname':this[_0x070e('0x9')],'state':this[_0x070e('0xa')],'stateTime':this['stateTime'],'status':this['status'],'address':this['address'],'online':this[_0x070e('0x10')],'voiceStatus':this[_0x070e('0x11')],'voiceStatusTime':this[_0x070e('0x12')],'voiceStatusCallerIdNumber':this['voiceStatusCallerIdNumber'],'voiceStatusQueue':this[_0x070e('0x1d')],'interface':this['interface'],'onhold':this[_0x070e('0x1e')]};var _0x3f6985=md5(JSON[_0x070e('0x1f')](_0x5037eb));if(this[_0x070e('0x20')]!==_0x3f6985){this[_0x070e('0x20')]=_0x3f6985;io['to'](util[_0x070e('0x1b')](_0x070e('0x21'),_0x5037eb[_0x070e('0x1c')]))['emit'](_0x070e('0x22'),_0x5037eb);io[_0x070e('0x23')](_0x070e('0x24'),_0x5037eb);}};module['exports']=Agent; \ No newline at end of file diff --git a/server/services/ami/model/campaign.js b/server/services/ami/model/campaign.js index c63944f..470e890 100644 --- a/server/services/ami/model/campaign.js +++ b/server/services/ami/model/campaign.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5762=['dialNoAnswerRetryFrequency','dialGlobalMaxRetry','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','dialDropMaxRetry','dialDropRetryFrequency','dialAbandonedMaxRetry','dialAbandonedRetryFrequency','dialMachineMaxRetry','dialMachineRetryFrequency','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','dialOrderByScheduledAt','DESC','dialPrefix','dialRandomLastDigitCallerIdNumber','TrunkBackup','Trunk','Interval','SquareProject','dialQueueProject','dialAMDInitialSilence','dialAMDGreeting','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','dialAMDMinWordLength','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','exports','name','type','campaign','originated','temp','ivrAnswerCallsDay','sendMessageOneNotActive','active','limitCalls','dialTimezone','dialGlobalInterval','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency','dialNoAnswerMaxRetry'];(function(_0x485abd,_0x32c7c1){var _0x3379f1=function(_0x36b528){while(--_0x36b528){_0x485abd['push'](_0x485abd['shift']());}};_0x3379f1(++_0x32c7c1);}(_0x5762,0x1d8));var _0x2576=function(_0x181a86,_0x2a04e2){_0x181a86=_0x181a86-0x0;var _0x5a7b71=_0x5762[_0x181a86];return _0x5a7b71;};'use strict';function Campaign(_0x51925c){this['id']=_0x51925c['id']||0x0;this[_0x2576('0x0')]=_0x51925c[_0x2576('0x0')]||'';this[_0x2576('0x1')]=_0x51925c[_0x2576('0x1')]||_0x2576('0x2');this[_0x2576('0x3')]=0x0;this[_0x2576('0x4')]=0x0;this[_0x2576('0x5')]=0x0;this['ivrTotalCallsDays']=0x0;this['message']='';this[_0x2576('0x6')]=!![];this[_0x2576('0x7')]=_0x51925c['active'];this[_0x2576('0x8')]=_0x51925c[_0x2576('0x8')];this[_0x2576('0x9')]=_0x51925c[_0x2576('0x9')]||null;this[_0x2576('0xa')]=_0x51925c[_0x2576('0xa')]?_0x51925c['dialGlobalInterval']:null;this[_0x2576('0xb')]=_0x51925c[_0x2576('0xb')];this[_0x2576('0xc')]=_0x51925c[_0x2576('0xc')];this['dialOriginateTimeout']=_0x51925c['dialOriginateTimeout']||0x1e;this[_0x2576('0xd')]=_0x51925c[_0x2576('0xd')];this[_0x2576('0xe')]=_0x51925c[_0x2576('0xe')];this[_0x2576('0xf')]=_0x51925c['dialBusyMaxRetry'];this[_0x2576('0x10')]=_0x51925c[_0x2576('0x10')];this[_0x2576('0x11')]=_0x51925c['dialNoAnswerMaxRetry'];this['dialNoAnswerRetryFrequency']=_0x51925c[_0x2576('0x12')];this[_0x2576('0x13')]=_0x51925c['dialGlobalMaxRetry'];this[_0x2576('0x14')]=_0x51925c[_0x2576('0x14')]||0x3;this[_0x2576('0x15')]=_0x51925c[_0x2576('0x15')]||0x96;this[_0x2576('0x16')]=_0x51925c[_0x2576('0x16')]||0x3;this[_0x2576('0x17')]=_0x51925c[_0x2576('0x17')]||0x96;this['dialAbandonedMaxRetry']=_0x51925c[_0x2576('0x18')]||0x3;this[_0x2576('0x19')]=_0x51925c['dialAbandonedRetryFrequency']||0x96;this[_0x2576('0x1a')]=_0x51925c[_0x2576('0x1a')]||0x3;this[_0x2576('0x1b')]=_0x51925c[_0x2576('0x1b')]||0x96;this[_0x2576('0x1c')]=_0x51925c[_0x2576('0x1c')]||0x3;this[_0x2576('0x1d')]=_0x51925c[_0x2576('0x1d')]||0x96;this[_0x2576('0x1e')]=_0x51925c[_0x2576('0x1e')]||_0x2576('0x1f');this[_0x2576('0x20')]=_0x51925c['dialPrefix']||undefined;this[_0x2576('0x21')]=_0x51925c['dialRandomLastDigitCallerIdNumber']||undefined;this['dialCutDigit']=_0x51925c['dialCutDigit']||undefined;this[_0x2576('0x22')]=_0x51925c[_0x2576('0x22')]?_0x51925c['TrunkBackup']:undefined;this[_0x2576('0x23')]=_0x51925c[_0x2576('0x23')]?_0x51925c[_0x2576('0x23')]:undefined;this[_0x2576('0x24')]=_0x51925c[_0x2576('0x24')]?_0x51925c[_0x2576('0x24')]:undefined;this[_0x2576('0x25')]=_0x51925c[_0x2576('0x25')]?_0x51925c[_0x2576('0x25')]:undefined;this[_0x2576('0x26')]=_0x51925c['SquareProject']?_0x51925c[_0x2576('0x25')][_0x2576('0x0')]:undefined;this['dialAMDActive']=_0x51925c['dialAMDActive']||![];this[_0x2576('0x27')]=_0x51925c[_0x2576('0x27')];this['dialAMDGreeting']=_0x51925c[_0x2576('0x28')];this[_0x2576('0x29')]=_0x51925c[_0x2576('0x29')];this['dialAMDTotalAnalysisTime']=_0x51925c[_0x2576('0x2a')];this[_0x2576('0x2b')]=_0x51925c[_0x2576('0x2b')];this[_0x2576('0x2c')]=_0x51925c[_0x2576('0x2c')];this[_0x2576('0x2d')]=_0x51925c[_0x2576('0x2d')];this[_0x2576('0x2e')]=_0x51925c['dialAMDSilenceThreshold'];this['dialAMDMaximumWordLength']=_0x51925c[_0x2576('0x2f')];}module[_0x2576('0x30')]=Campaign; \ No newline at end of file +var _0xe705=['dialAbandonedRetryFrequency','dialMachineMaxRetry','dialMachineRetryFrequency','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','dialOrderByScheduledAt','dialPrefix','dialRandomLastDigitCallerIdNumber','dialCutDigit','TrunkBackup','Trunk','Interval','SquareProject','dialAMDActive','dialAMDInitialSilence','dialAMDGreeting','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','dialAMDMinWordLength','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','exports','name','type','campaign','originated','ivrAnswerCallsDay','ivrTotalCallsDays','message','active','limitCalls','dialTimezone','dialGlobalInterval','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialOriginateTimeout','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialGlobalMaxRetry','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','dialDropMaxRetry','dialDropRetryFrequency','dialAbandonedMaxRetry'];(function(_0x4cf98e,_0xba4b79){var _0x1623ac=function(_0x459bc0){while(--_0x459bc0){_0x4cf98e['push'](_0x4cf98e['shift']());}};_0x1623ac(++_0xba4b79);}(_0xe705,0x7c));var _0x5e70=function(_0x1a660d,_0x182bba){_0x1a660d=_0x1a660d-0x0;var _0x3c1a19=_0xe705[_0x1a660d];return _0x3c1a19;};'use strict';function Campaign(_0x48c9e3){this['id']=_0x48c9e3['id']||0x0;this[_0x5e70('0x0')]=_0x48c9e3['name']||'';this[_0x5e70('0x1')]=_0x48c9e3['type']||_0x5e70('0x2');this[_0x5e70('0x3')]=0x0;this['temp']=0x0;this[_0x5e70('0x4')]=0x0;this[_0x5e70('0x5')]=0x0;this[_0x5e70('0x6')]='';this['sendMessageOneNotActive']=!![];this[_0x5e70('0x7')]=_0x48c9e3['active'];this['limitCalls']=_0x48c9e3[_0x5e70('0x8')];this[_0x5e70('0x9')]=_0x48c9e3[_0x5e70('0x9')]||null;this['dialGlobalInterval']=_0x48c9e3[_0x5e70('0xa')]?_0x48c9e3[_0x5e70('0xa')]:null;this[_0x5e70('0xb')]=_0x48c9e3['dialOriginateCallerIdName'];this['dialOriginateCallerIdNumber']=_0x48c9e3[_0x5e70('0xc')];this[_0x5e70('0xd')]=_0x48c9e3['dialOriginateTimeout']||0x1e;this[_0x5e70('0xe')]=_0x48c9e3[_0x5e70('0xe')];this[_0x5e70('0xf')]=_0x48c9e3['dialCongestionRetryFrequency'];this[_0x5e70('0x10')]=_0x48c9e3[_0x5e70('0x10')];this[_0x5e70('0x11')]=_0x48c9e3[_0x5e70('0x11')];this[_0x5e70('0x12')]=_0x48c9e3[_0x5e70('0x12')];this[_0x5e70('0x13')]=_0x48c9e3['dialNoAnswerRetryFrequency'];this[_0x5e70('0x14')]=_0x48c9e3[_0x5e70('0x14')];this[_0x5e70('0x15')]=_0x48c9e3[_0x5e70('0x15')]||0x3;this[_0x5e70('0x16')]=_0x48c9e3[_0x5e70('0x16')]||0x96;this['dialDropMaxRetry']=_0x48c9e3[_0x5e70('0x17')]||0x3;this[_0x5e70('0x18')]=_0x48c9e3[_0x5e70('0x18')]||0x96;this[_0x5e70('0x19')]=_0x48c9e3[_0x5e70('0x19')]||0x3;this[_0x5e70('0x1a')]=_0x48c9e3[_0x5e70('0x1a')]||0x96;this[_0x5e70('0x1b')]=_0x48c9e3[_0x5e70('0x1b')]||0x3;this[_0x5e70('0x1c')]=_0x48c9e3['dialMachineRetryFrequency']||0x96;this['dialAgentRejectMaxRetry']=_0x48c9e3[_0x5e70('0x1d')]||0x3;this[_0x5e70('0x1e')]=_0x48c9e3['dialAgentRejectRetryFrequency']||0x96;this[_0x5e70('0x1f')]=_0x48c9e3[_0x5e70('0x1f')]||'DESC';this[_0x5e70('0x20')]=_0x48c9e3[_0x5e70('0x20')]||undefined;this[_0x5e70('0x21')]=_0x48c9e3[_0x5e70('0x21')]||undefined;this[_0x5e70('0x22')]=_0x48c9e3['dialCutDigit']||undefined;this[_0x5e70('0x23')]=_0x48c9e3['TrunkBackup']?_0x48c9e3[_0x5e70('0x23')]:undefined;this['Trunk']=_0x48c9e3[_0x5e70('0x24')]?_0x48c9e3['Trunk']:undefined;this['Interval']=_0x48c9e3[_0x5e70('0x25')]?_0x48c9e3[_0x5e70('0x25')]:undefined;this['SquareProject']=_0x48c9e3[_0x5e70('0x26')]?_0x48c9e3[_0x5e70('0x26')]:undefined;this['dialQueueProject']=_0x48c9e3[_0x5e70('0x26')]?_0x48c9e3[_0x5e70('0x26')][_0x5e70('0x0')]:undefined;this[_0x5e70('0x27')]=_0x48c9e3[_0x5e70('0x27')]||![];this[_0x5e70('0x28')]=_0x48c9e3[_0x5e70('0x28')];this[_0x5e70('0x29')]=_0x48c9e3[_0x5e70('0x29')];this[_0x5e70('0x2a')]=_0x48c9e3[_0x5e70('0x2a')];this[_0x5e70('0x2b')]=_0x48c9e3[_0x5e70('0x2b')];this[_0x5e70('0x2c')]=_0x48c9e3[_0x5e70('0x2c')];this[_0x5e70('0x2d')]=_0x48c9e3[_0x5e70('0x2d')];this[_0x5e70('0x2e')]=_0x48c9e3[_0x5e70('0x2e')];this[_0x5e70('0x2f')]=_0x48c9e3[_0x5e70('0x2f')];this['dialAMDMaximumWordLength']=_0x48c9e3[_0x5e70('0x30')];}module[_0x5e70('0x31')]=Campaign; \ No newline at end of file diff --git a/server/services/ami/model/channel.js b/server/services/ami/model/channel.js index 650bcd4..ec90dc1 100644 --- a/server/services/ami/model/channel.js +++ b/server/services/ami/model/channel.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x223e=['answered','answertime','unmanaged','abandoned','lastdata','duration','billableseconds','holdtime','type','disposition','monitorFilename','queue','monitors','transfercalleridnum','transferconnectedlinenum','mohtime','exports','starttime','channel','destinationchannel','calleridname','connectedlinenum','connectedlinename','accountcode','context','uniqueid'];(function(_0x1b70e3,_0x3a15b1){var _0x1452ab=function(_0x692883){while(--_0x692883){_0x1b70e3['push'](_0x1b70e3['shift']());}};_0x1452ab(++_0x3a15b1);}(_0x223e,0x1b1));var _0xe223=function(_0x23ec06,_0x561142){_0x23ec06=_0x23ec06-0x0;var _0x2831d4=_0x223e[_0x23ec06];return _0x2831d4;};'use strict';function Channel(){this[_0xe223('0x0')]=null;this[_0xe223('0x1')]='';this[_0xe223('0x2')]='';this['calleridnum']=0x0;this[_0xe223('0x3')]='';this[_0xe223('0x4')]=undefined;this[_0xe223('0x5')]=undefined;this[_0xe223('0x6')]=0x0;this[_0xe223('0x7')]='';this[_0xe223('0x8')]=0x0;this['linkedid']=0x0;this['exten']=0x0;this[_0xe223('0x9')]=![];this[_0xe223('0xa')]=null;this['endtime']=null;this[_0xe223('0xb')]=![];this[_0xe223('0xc')]=![];this['lastapplication']='';this[_0xe223('0xd')]='';this[_0xe223('0xe')]=0x0;this[_0xe223('0xf')]=0x0;this[_0xe223('0x10')]=0x0;this[_0xe223('0x11')]=null;this['tag']=null;this[_0xe223('0x12')]=null;this['monitor']=![];this[_0xe223('0x13')]=null;this[_0xe223('0x14')]=null;this[_0xe223('0x15')]=[];this[_0xe223('0x16')]=undefined;this[_0xe223('0x17')]=undefined;this['transferType']=undefined;this[_0xe223('0x18')]=0x0;}module[_0xe223('0x19')]=Channel; \ No newline at end of file +var _0xd7ac=['calleridnum','calleridname','connectedlinename','accountcode','linkedid','exten','answered','endtime','unmanaged','abandoned','lastapplication','duration','billableseconds','type','tag','disposition','monitor','monitorFilename','queue','transfercalleridnum','transferconnectedlinenum','mohtime','exports','starttime'];(function(_0x5d9466,_0x1814ea){var _0x432409=function(_0x1580b7){while(--_0x1580b7){_0x5d9466['push'](_0x5d9466['shift']());}};_0x432409(++_0x1814ea);}(_0xd7ac,0x167));var _0xcd7a=function(_0xbd08b4,_0x4790ed){_0xbd08b4=_0xbd08b4-0x0;var _0x314f1e=_0xd7ac[_0xbd08b4];return _0x314f1e;};'use strict';function Channel(){this[_0xcd7a('0x0')]=null;this['channel']='';this['destinationchannel']='';this[_0xcd7a('0x1')]=0x0;this[_0xcd7a('0x2')]='';this['connectedlinenum']=undefined;this[_0xcd7a('0x3')]=undefined;this[_0xcd7a('0x4')]=0x0;this['context']='';this['uniqueid']=0x0;this[_0xcd7a('0x5')]=0x0;this[_0xcd7a('0x6')]=0x0;this[_0xcd7a('0x7')]=![];this['answertime']=null;this[_0xcd7a('0x8')]=null;this[_0xcd7a('0x9')]=![];this[_0xcd7a('0xa')]=![];this[_0xcd7a('0xb')]='';this['lastdata']='';this[_0xcd7a('0xc')]=0x0;this[_0xcd7a('0xd')]=0x0;this['holdtime']=0x0;this[_0xcd7a('0xe')]=null;this[_0xcd7a('0xf')]=null;this[_0xcd7a('0x10')]=null;this[_0xcd7a('0x11')]=![];this[_0xcd7a('0x12')]=null;this[_0xcd7a('0x13')]=null;this['monitors']=[];this[_0xcd7a('0x14')]=undefined;this[_0xcd7a('0x15')]=undefined;this['transferType']=undefined;this[_0xcd7a('0x16')]=0x0;}module[_0xcd7a('0x17')]=Channel; \ No newline at end of file diff --git a/server/services/ami/model/deskAccount.js b/server/services/ami/model/deskAccount.js index 0646000..ef194d2 100644 --- a/server/services/ami/model/deskAccount.js +++ b/server/services/ami/model/deskAccount.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x78e9=['consumerSecret','token','tokenSecret','type','serverUrl','Configurations','exports','name','username','remoteUri','authType','password','consumerKey'];(function(_0x24f755,_0x5006fc){var _0x294feb=function(_0x5cf63b){while(--_0x5cf63b){_0x24f755['push'](_0x24f755['shift']());}};_0x294feb(++_0x5006fc);}(_0x78e9,0x1ce));var _0x978e=function(_0x308cf5,_0x262cfc){_0x308cf5=_0x308cf5-0x0;var _0x4c66b5=_0x78e9[_0x308cf5];return _0x4c66b5;};'use strict';function DeskAccount(_0x1506dd){this['id']=_0x1506dd['id']||0x0;this[_0x978e('0x0')]=_0x1506dd[_0x978e('0x0')]||'';this['username']=_0x1506dd[_0x978e('0x1')]||'';this[_0x978e('0x2')]=_0x1506dd[_0x978e('0x2')]||'';this[_0x978e('0x3')]=_0x1506dd[_0x978e('0x3')]||'';this['password']=_0x1506dd[_0x978e('0x4')]||'';this[_0x978e('0x5')]=_0x1506dd[_0x978e('0x5')]||'';this['consumerSecret']=_0x1506dd[_0x978e('0x6')]||'';this[_0x978e('0x7')]=_0x1506dd['token']||'';this[_0x978e('0x8')]=_0x1506dd['tokenSecret']||'';this[_0x978e('0x9')]=_0x1506dd[_0x978e('0x9')]||'';this[_0x978e('0xa')]=_0x1506dd[_0x978e('0xa')]||'';this[_0x978e('0xb')]=_0x1506dd[_0x978e('0xb')]||{};}module[_0x978e('0xc')]=DeskAccount; \ No newline at end of file +var _0xb776=['type','serverUrl','Configurations','exports','name','username','remoteUri','authType','password','consumerKey','consumerSecret','token','tokenSecret'];(function(_0x104a84,_0x285970){var _0x4973ff=function(_0x5064e7){while(--_0x5064e7){_0x104a84['push'](_0x104a84['shift']());}};_0x4973ff(++_0x285970);}(_0xb776,0x79));var _0x6b77=function(_0x383005,_0x4680e4){_0x383005=_0x383005-0x0;var _0x1e23b2=_0xb776[_0x383005];return _0x1e23b2;};'use strict';function DeskAccount(_0x1ed689){this['id']=_0x1ed689['id']||0x0;this[_0x6b77('0x0')]=_0x1ed689['name']||'';this[_0x6b77('0x1')]=_0x1ed689[_0x6b77('0x1')]||'';this[_0x6b77('0x2')]=_0x1ed689[_0x6b77('0x2')]||'';this[_0x6b77('0x3')]=_0x1ed689[_0x6b77('0x3')]||'';this[_0x6b77('0x4')]=_0x1ed689[_0x6b77('0x4')]||'';this[_0x6b77('0x5')]=_0x1ed689[_0x6b77('0x5')]||'';this[_0x6b77('0x6')]=_0x1ed689[_0x6b77('0x6')]||'';this[_0x6b77('0x7')]=_0x1ed689['token']||'';this[_0x6b77('0x8')]=_0x1ed689[_0x6b77('0x8')]||'';this[_0x6b77('0x9')]=_0x1ed689[_0x6b77('0x9')]||'';this[_0x6b77('0xa')]=_0x1ed689[_0x6b77('0xa')]||'';this[_0x6b77('0xb')]=_0x1ed689[_0x6b77('0xb')]||{};}module[_0x6b77('0xc')]=DeskAccount; \ No newline at end of file diff --git a/server/services/ami/model/dynamics365Account.js b/server/services/ami/model/dynamics365Account.js index c549279..3eee84b 100644 --- a/server/services/ami/model/dynamics365Account.js +++ b/server/services/ami/model/dynamics365Account.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5b02=['username','password','remoteUri','tenantId','clientId','clientSecret','serverUrl','Configurations','name'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x5b02,0xe9));var _0x25b0=function(_0x4a19ae,_0x207626){_0x4a19ae=_0x4a19ae-0x0;var _0x5357db=_0x5b02[_0x4a19ae];return _0x5357db;};'use strict';function Dynamics365Account(_0x5d3c24){this['id']=_0x5d3c24['id']||0x0;this[_0x25b0('0x0')]=_0x5d3c24[_0x25b0('0x0')]||'';this[_0x25b0('0x1')]=_0x5d3c24['username']||'';this['password']=_0x5d3c24[_0x25b0('0x2')]||'';this['remoteUri']=_0x5d3c24[_0x25b0('0x3')]||'';this[_0x25b0('0x4')]=_0x5d3c24[_0x25b0('0x4')]||'';this[_0x25b0('0x5')]=_0x5d3c24[_0x25b0('0x5')]||'';this['clientSecret']=_0x5d3c24[_0x25b0('0x6')]||{};this[_0x25b0('0x7')]=_0x5d3c24['serverUrl']||'';this[_0x25b0('0x8')]=_0x5d3c24['Configurations']||{};}module['exports']=Dynamics365Account; \ No newline at end of file +var _0x153f=['remoteUri','tenantId','clientId','clientSecret','serverUrl','Configurations','exports','name','username','password'];(function(_0x1da527,_0x2dc953){var _0x40fc7c=function(_0x9949f5){while(--_0x9949f5){_0x1da527['push'](_0x1da527['shift']());}};_0x40fc7c(++_0x2dc953);}(_0x153f,0x15b));var _0xf153=function(_0x5a3e99,_0x2e4fbe){_0x5a3e99=_0x5a3e99-0x0;var _0x4cdff4=_0x153f[_0x5a3e99];return _0x4cdff4;};'use strict';function Dynamics365Account(_0x2bbc4c){this['id']=_0x2bbc4c['id']||0x0;this[_0xf153('0x0')]=_0x2bbc4c[_0xf153('0x0')]||'';this[_0xf153('0x1')]=_0x2bbc4c[_0xf153('0x1')]||'';this[_0xf153('0x2')]=_0x2bbc4c[_0xf153('0x2')]||'';this['remoteUri']=_0x2bbc4c[_0xf153('0x3')]||'';this['tenantId']=_0x2bbc4c[_0xf153('0x4')]||'';this[_0xf153('0x5')]=_0x2bbc4c[_0xf153('0x5')]||'';this[_0xf153('0x6')]=_0x2bbc4c[_0xf153('0x6')]||{};this['serverUrl']=_0x2bbc4c[_0xf153('0x7')]||'';this[_0xf153('0x8')]=_0x2bbc4c[_0xf153('0x8')]||{};}module[_0xf153('0x9')]=Dynamics365Account; \ No newline at end of file diff --git a/server/services/ami/model/faxAccount.js b/server/services/ami/model/faxAccount.js index 173070a..4000a46 100644 --- a/server/services/ami/model/faxAccount.js +++ b/server/services/ami/model/faxAccount.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd1b9=['gateway','faxdetect','t38timeout','tech','SIP','Trunk','ListId','key','exports','name','description','ecm','headerinfo','localstationid','minrate','maxrate','modem'];(function(_0x340d3e,_0x3491de){var _0x1d0330=function(_0x26e85b){while(--_0x26e85b){_0x340d3e['push'](_0x340d3e['shift']());}};_0x1d0330(++_0x3491de);}(_0xd1b9,0x1a1));var _0x9d1b=function(_0x340380,_0x4bd2a8){_0x340380=_0x340380-0x0;var _0x49ce1c=_0xd1b9[_0x340380];return _0x49ce1c;};'use strict';function FaxAccount(_0x4f724b){this['id']=_0x4f724b['id']||0x0;this[_0x9d1b('0x0')]=_0x4f724b[_0x9d1b('0x0')]||'';this[_0x9d1b('0x1')]=_0x4f724b[_0x9d1b('0x1')];this[_0x9d1b('0x2')]=_0x4f724b[_0x9d1b('0x2')];this['headerinfo']=_0x4f724b[_0x9d1b('0x3')];this['localstationid']=_0x4f724b[_0x9d1b('0x4')];this['minrate']=_0x4f724b[_0x9d1b('0x5')]||0x960;this[_0x9d1b('0x6')]=_0x4f724b['maxrate']||0x3840;this[_0x9d1b('0x7')]=_0x4f724b['modem']||'v17,v27,v29';this[_0x9d1b('0x8')]=_0x4f724b[_0x9d1b('0x8')]||'no';this[_0x9d1b('0x9')]=_0x4f724b['faxdetect']||'no';this[_0x9d1b('0xa')]=_0x4f724b[_0x9d1b('0xa')]||0x1388;this[_0x9d1b('0xb')]=_0x4f724b[_0x9d1b('0xb')]||_0x9d1b('0xc');this['Trunk']=_0x4f724b[_0x9d1b('0xd')]?_0x4f724b[_0x9d1b('0xd')]:undefined;this[_0x9d1b('0xe')]=_0x4f724b[_0x9d1b('0xe')];this[_0x9d1b('0xf')]=_0x4f724b[_0x9d1b('0xf')];}module[_0x9d1b('0x10')]=FaxAccount; \ No newline at end of file +var _0x6aae=['exports','name','description','ecm','headerinfo','localstationid','minrate','maxrate','modem','v17,v27,v29','gateway','faxdetect','t38timeout','SIP','Trunk','ListId','key'];(function(_0x17ded7,_0x502c7d){var _0xd0ce9f=function(_0x5d81b0){while(--_0x5d81b0){_0x17ded7['push'](_0x17ded7['shift']());}};_0xd0ce9f(++_0x502c7d);}(_0x6aae,0x100));var _0xe6aa=function(_0x16c6a3,_0x1e5867){_0x16c6a3=_0x16c6a3-0x0;var _0x1cc69c=_0x6aae[_0x16c6a3];return _0x1cc69c;};'use strict';function FaxAccount(_0x52be83){this['id']=_0x52be83['id']||0x0;this[_0xe6aa('0x0')]=_0x52be83['name']||'';this[_0xe6aa('0x1')]=_0x52be83['description'];this[_0xe6aa('0x2')]=_0x52be83[_0xe6aa('0x2')];this[_0xe6aa('0x3')]=_0x52be83['headerinfo'];this[_0xe6aa('0x4')]=_0x52be83[_0xe6aa('0x4')];this[_0xe6aa('0x5')]=_0x52be83[_0xe6aa('0x5')]||0x960;this[_0xe6aa('0x6')]=_0x52be83['maxrate']||0x3840;this[_0xe6aa('0x7')]=_0x52be83[_0xe6aa('0x7')]||_0xe6aa('0x8');this[_0xe6aa('0x9')]=_0x52be83[_0xe6aa('0x9')]||'no';this[_0xe6aa('0xa')]=_0x52be83[_0xe6aa('0xa')]||'no';this[_0xe6aa('0xb')]=_0x52be83[_0xe6aa('0xb')]||0x1388;this['tech']=_0x52be83['tech']||_0xe6aa('0xc');this[_0xe6aa('0xd')]=_0x52be83[_0xe6aa('0xd')]?_0x52be83[_0xe6aa('0xd')]:undefined;this['ListId']=_0x52be83[_0xe6aa('0xe')];this[_0xe6aa('0xf')]=_0x52be83['key'];}module[_0xe6aa('0x10')]=FaxAccount; \ No newline at end of file diff --git a/server/services/ami/model/freshdeskAccount.js b/server/services/ami/model/freshdeskAccount.js index 25bd7e0..9d2553b 100644 --- a/server/services/ami/model/freshdeskAccount.js +++ b/server/services/ami/model/freshdeskAccount.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xed26=['name','username','apiKey','token','remoteUri','serverUrl','Configurations','exports'];(function(_0x2dafbe,_0x5d04de){var _0x58a45a=function(_0x50ac96){while(--_0x50ac96){_0x2dafbe['push'](_0x2dafbe['shift']());}};_0x58a45a(++_0x5d04de);}(_0xed26,0x1f0));var _0x6ed2=function(_0x5389c5,_0xd4953b){_0x5389c5=_0x5389c5-0x0;var _0x31f328=_0xed26[_0x5389c5];return _0x31f328;};'use strict';function FreshdeskAccount(_0x3e64d7){this['id']=_0x3e64d7['id']||0x0;this['name']=_0x3e64d7[_0x6ed2('0x0')]||'';this[_0x6ed2('0x1')]=_0x3e64d7[_0x6ed2('0x1')]||'';this[_0x6ed2('0x2')]=_0x3e64d7[_0x6ed2('0x3')]||'';this['remoteUri']=_0x3e64d7[_0x6ed2('0x4')]||'';this[_0x6ed2('0x5')]=_0x3e64d7[_0x6ed2('0x5')]||'';this[_0x6ed2('0x6')]=_0x3e64d7[_0x6ed2('0x6')]||{};}module[_0x6ed2('0x7')]=FreshdeskAccount; \ No newline at end of file +var _0xff94=['username','apiKey','token','remoteUri','serverUrl','Configurations','exports','name'];(function(_0x6cf19c,_0x2f3f02){var _0xce14f3=function(_0x474587){while(--_0x474587){_0x6cf19c['push'](_0x6cf19c['shift']());}};_0xce14f3(++_0x2f3f02);}(_0xff94,0x19f));var _0x4ff9=function(_0x24e024,_0x2e655f){_0x24e024=_0x24e024-0x0;var _0x23a2d9=_0xff94[_0x24e024];return _0x23a2d9;};'use strict';function FreshdeskAccount(_0xab0343){this['id']=_0xab0343['id']||0x0;this[_0x4ff9('0x0')]=_0xab0343['name']||'';this[_0x4ff9('0x1')]=_0xab0343[_0x4ff9('0x1')]||'';this[_0x4ff9('0x2')]=_0xab0343[_0x4ff9('0x3')]||'';this[_0x4ff9('0x4')]=_0xab0343['remoteUri']||'';this[_0x4ff9('0x5')]=_0xab0343[_0x4ff9('0x5')]||'';this[_0x4ff9('0x6')]=_0xab0343['Configurations']||{};}module[_0x4ff9('0x7')]=FreshdeskAccount; \ No newline at end of file diff --git a/server/services/ami/model/freshsalesAccount.js b/server/services/ami/model/freshsalesAccount.js index ff76dc9..9c284a8 100644 --- a/server/services/ami/model/freshsalesAccount.js +++ b/server/services/ami/model/freshsalesAccount.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd7c3=['token','remoteUri','serverUrl','name','username','apiKey'];(function(_0x4932a6,_0x530e29){var _0x3b45b9=function(_0x1d1eb7){while(--_0x1d1eb7){_0x4932a6['push'](_0x4932a6['shift']());}};_0x3b45b9(++_0x530e29);}(_0xd7c3,0x1c5));var _0x3d7c=function(_0x4b1896,_0x2e26a6){_0x4b1896=_0x4b1896-0x0;var _0x22391d=_0xd7c3[_0x4b1896];return _0x22391d;};'use strict';function FreshsalesAccount(_0x5c1e67){this['id']=_0x5c1e67['id']||0x0;this[_0x3d7c('0x0')]=_0x5c1e67[_0x3d7c('0x0')]||'';this[_0x3d7c('0x1')]=_0x5c1e67[_0x3d7c('0x1')]||'';this[_0x3d7c('0x2')]=_0x5c1e67[_0x3d7c('0x3')]||'';this[_0x3d7c('0x4')]=_0x5c1e67[_0x3d7c('0x4')]||'';this['serverUrl']=_0x5c1e67[_0x3d7c('0x5')]||'';this['Configurations']=_0x5c1e67['Configurations']||{};}module['exports']=FreshsalesAccount; \ No newline at end of file +var _0x6bb4=['remoteUri','serverUrl','Configurations','name','username','apiKey'];(function(_0x182528,_0x4147e3){var _0x1e57a7=function(_0x4adadb){while(--_0x4adadb){_0x182528['push'](_0x182528['shift']());}};_0x1e57a7(++_0x4147e3);}(_0x6bb4,0x1a7));var _0x46bb=function(_0x23c4a9,_0x15eaf1){_0x23c4a9=_0x23c4a9-0x0;var _0xf708c5=_0x6bb4[_0x23c4a9];return _0xf708c5;};'use strict';function FreshsalesAccount(_0x9027ff){this['id']=_0x9027ff['id']||0x0;this[_0x46bb('0x0')]=_0x9027ff[_0x46bb('0x0')]||'';this['username']=_0x9027ff[_0x46bb('0x1')]||'';this[_0x46bb('0x2')]=_0x9027ff['token']||'';this[_0x46bb('0x3')]=_0x9027ff[_0x46bb('0x3')]||'';this[_0x46bb('0x4')]=_0x9027ff[_0x46bb('0x4')]||'';this[_0x46bb('0x5')]=_0x9027ff[_0x46bb('0x5')]||{};}module['exports']=FreshsalesAccount; \ No newline at end of file diff --git a/server/services/ami/model/queueReport.js b/server/services/ami/model/queueReport.js index 3f215e6..545b0d0 100644 --- a/server/services/ami/model/queueReport.js +++ b/server/services/ami/model/queueReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4431=['queuecallerabandon','queuecallerabandonAt','queuecallerexit','queuecallerexitAt','originalposition','channel','connectedlinenum','accountcode','context','priority','holdtime','assigned','mohtime','variables','exports','inbound','uniqueid','calleridname','queue','queuecallerjoinAt','queuecallerleaveAt','position','count'];(function(_0x2a0e05,_0x39bf1c){var _0x486d00=function(_0x4525c1){while(--_0x4525c1){_0x2a0e05['push'](_0x2a0e05['shift']());}};_0x486d00(++_0x39bf1c);}(_0x4431,0x10c));var _0x1443=function(_0x4c4771,_0x5edf23){_0x4c4771=_0x4c4771-0x0;var _0x2d9105=_0x4431[_0x4c4771];return _0x2d9105;};'use strict';function QueueReport(){this['type']=_0x1443('0x0');this[_0x1443('0x1')]='';this['calleridnum']='';this[_0x1443('0x2')]='';this[_0x1443('0x3')]='';this[_0x1443('0x4')]=null;this[_0x1443('0x5')]=null;this[_0x1443('0x6')]=0x1;this[_0x1443('0x7')]=0x1;this[_0x1443('0x8')]=![];this[_0x1443('0x9')]=null;this['queuecallercomplete']=![];this['queuecallercompleteAt']=null;this[_0x1443('0xa')]=![];this[_0x1443('0xb')]=null;this[_0x1443('0xc')]=0x1;this[_0x1443('0xd')]='';this[_0x1443('0xe')]='';this['connectedlinename']='';this[_0x1443('0xf')]='';this[_0x1443('0x10')]='';this['exten']='';this[_0x1443('0x11')]='';this[_0x1443('0x12')]=0x0;this[_0x1443('0x13')]=![];this['lastAssignedTo']='';this[_0x1443('0x14')]=0x0;this[_0x1443('0x15')]={};}module[_0x1443('0x16')]=QueueReport; \ No newline at end of file +var _0x2f4d=['mohtime','inbound','uniqueid','calleridnum','calleridname','queue','queuecallerjoinAt','queuecallerleaveAt','position','count','queuecallerabandon','queuecallerabandonAt','queuecallerexit','queuecallerexitAt','channel','connectedlinenum','connectedlinename','accountcode','context','holdtime','assigned'];(function(_0x122916,_0x37439f){var _0x2bf15b=function(_0x4c76f5){while(--_0x4c76f5){_0x122916['push'](_0x122916['shift']());}};_0x2bf15b(++_0x37439f);}(_0x2f4d,0x1ba));var _0xd2f4=function(_0x54644d,_0x497051){_0x54644d=_0x54644d-0x0;var _0x265cc7=_0x2f4d[_0x54644d];return _0x265cc7;};'use strict';function QueueReport(){this['type']=_0xd2f4('0x0');this[_0xd2f4('0x1')]='';this[_0xd2f4('0x2')]='';this[_0xd2f4('0x3')]='';this[_0xd2f4('0x4')]='';this[_0xd2f4('0x5')]=null;this[_0xd2f4('0x6')]=null;this[_0xd2f4('0x7')]=0x1;this[_0xd2f4('0x8')]=0x1;this[_0xd2f4('0x9')]=![];this[_0xd2f4('0xa')]=null;this['queuecallercomplete']=![];this['queuecallercompleteAt']=null;this[_0xd2f4('0xb')]=![];this[_0xd2f4('0xc')]=null;this['originalposition']=0x1;this[_0xd2f4('0xd')]='';this[_0xd2f4('0xe')]='';this[_0xd2f4('0xf')]='';this[_0xd2f4('0x10')]='';this[_0xd2f4('0x11')]='';this['exten']='';this['priority']='';this[_0xd2f4('0x12')]=0x0;this[_0xd2f4('0x13')]=![];this['lastAssignedTo']='';this[_0xd2f4('0x14')]=0x0;this['variables']={};}module['exports']=QueueReport; \ No newline at end of file diff --git a/server/services/ami/model/salesforceAccount.js b/server/services/ami/model/salesforceAccount.js index 9b8ea5e..62877ad 100644 --- a/server/services/ami/model/salesforceAccount.js +++ b/server/services/ami/model/salesforceAccount.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc2a2=['password','clientId','clientSecret','serverUrl','Configurations','exports','name','username','remoteUri'];(function(_0x2eb620,_0x288898){var _0x10a04e=function(_0x426f2c){while(--_0x426f2c){_0x2eb620['push'](_0x2eb620['shift']());}};_0x10a04e(++_0x288898);}(_0xc2a2,0x84));var _0x2c2a=function(_0x1f7b38,_0x30c87f){_0x1f7b38=_0x1f7b38-0x0;var _0xf6fe0e=_0xc2a2[_0x1f7b38];return _0xf6fe0e;};'use strict';function SalesforceAccount(_0x4f22d2){this['id']=_0x4f22d2['id']||0x0;this[_0x2c2a('0x0')]=_0x4f22d2[_0x2c2a('0x0')]||'';this[_0x2c2a('0x1')]=_0x4f22d2['username']||'';this[_0x2c2a('0x2')]=_0x4f22d2[_0x2c2a('0x2')]||'';this[_0x2c2a('0x3')]=_0x4f22d2['password']||'';this[_0x2c2a('0x4')]=_0x4f22d2[_0x2c2a('0x4')]||'';this[_0x2c2a('0x5')]=_0x4f22d2[_0x2c2a('0x5')]||'';this['securityToken']=_0x4f22d2['securityToken']||'';this['type']=_0x4f22d2['type']||'integrationTab';this[_0x2c2a('0x6')]=_0x4f22d2['serverUrl']||'';this[_0x2c2a('0x7')]=_0x4f22d2['Configurations']||{};}module[_0x2c2a('0x8')]=SalesforceAccount; \ No newline at end of file +var _0x1745=['integrationTab','serverUrl','exports','name','remoteUri','password','clientId','securityToken','type'];(function(_0x55622f,_0x1f5174){var _0x22bffa=function(_0x8d9b73){while(--_0x8d9b73){_0x55622f['push'](_0x55622f['shift']());}};_0x22bffa(++_0x1f5174);}(_0x1745,0x1e9));var _0x5174=function(_0x4cf98e,_0xba4b79){_0x4cf98e=_0x4cf98e-0x0;var _0x1623ac=_0x1745[_0x4cf98e];return _0x1623ac;};'use strict';function SalesforceAccount(_0x552ce5){this['id']=_0x552ce5['id']||0x0;this[_0x5174('0x0')]=_0x552ce5['name']||'';this['username']=_0x552ce5['username']||'';this[_0x5174('0x1')]=_0x552ce5[_0x5174('0x1')]||'';this[_0x5174('0x2')]=_0x552ce5['password']||'';this[_0x5174('0x3')]=_0x552ce5[_0x5174('0x3')]||'';this['clientSecret']=_0x552ce5['clientSecret']||'';this[_0x5174('0x4')]=_0x552ce5[_0x5174('0x4')]||'';this['type']=_0x552ce5[_0x5174('0x5')]||_0x5174('0x6');this[_0x5174('0x7')]=_0x552ce5[_0x5174('0x7')]||'';this['Configurations']=_0x552ce5['Configurations']||{};}module[_0x5174('0x8')]=SalesforceAccount; \ No newline at end of file diff --git a/server/services/ami/model/servicenowAccount.js b/server/services/ami/model/servicenowAccount.js index 2f2beea..3522a5d 100644 --- a/server/services/ami/model/servicenowAccount.js +++ b/server/services/ami/model/servicenowAccount.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6bb7=['serverUrl','Configurations','name','username','password'];(function(_0x1d453f,_0x5793a9){var _0x50996a=function(_0x59bdf3){while(--_0x59bdf3){_0x1d453f['push'](_0x1d453f['shift']());}};_0x50996a(++_0x5793a9);}(_0x6bb7,0xde));var _0x76bb=function(_0x2c8d2b,_0x15fec1){_0x2c8d2b=_0x2c8d2b-0x0;var _0x5a71c2=_0x6bb7[_0x2c8d2b];return _0x5a71c2;};'use strict';function ServicenowAccount(_0x4f2988){this['id']=_0x4f2988['id']||0x0;this[_0x76bb('0x0')]=_0x4f2988['name']||'';this['username']=_0x4f2988[_0x76bb('0x1')]||'';this[_0x76bb('0x2')]=_0x4f2988[_0x76bb('0x2')]||'';this['remoteUri']=_0x4f2988['remoteUri']||'';this[_0x76bb('0x3')]=_0x4f2988[_0x76bb('0x3')]||'';this['Configurations']=_0x4f2988[_0x76bb('0x4')]||{};}module['exports']=ServicenowAccount; \ No newline at end of file +var _0x7219=['username','password','remoteUri','serverUrl','Configurations','exports','name'];(function(_0x3818c0,_0x542521){var _0x55ec33=function(_0x2be9ea){while(--_0x2be9ea){_0x3818c0['push'](_0x3818c0['shift']());}};_0x55ec33(++_0x542521);}(_0x7219,0x15d));var _0x9721=function(_0x2836f8,_0x3d5eac){_0x2836f8=_0x2836f8-0x0;var _0x1d3713=_0x7219[_0x2836f8];return _0x1d3713;};'use strict';function ServicenowAccount(_0x4f1927){this['id']=_0x4f1927['id']||0x0;this[_0x9721('0x0')]=_0x4f1927[_0x9721('0x0')]||'';this[_0x9721('0x1')]=_0x4f1927[_0x9721('0x1')]||'';this[_0x9721('0x2')]=_0x4f1927[_0x9721('0x2')]||'';this[_0x9721('0x3')]=_0x4f1927[_0x9721('0x3')]||'';this[_0x9721('0x4')]=_0x4f1927[_0x9721('0x4')]||'';this[_0x9721('0x5')]=_0x4f1927[_0x9721('0x5')]||{};}module[_0x9721('0x6')]=ServicenowAccount; \ No newline at end of file diff --git a/server/services/ami/model/sugarcrmAccount.js b/server/services/ami/model/sugarcrmAccount.js index feadd18..623489f 100644 --- a/server/services/ami/model/sugarcrmAccount.js +++ b/server/services/ami/model/sugarcrmAccount.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2b9a=['remoteUri','serverUrl','Configurations','exports','name','username'];(function(_0x19950b,_0x53d0d7){var _0x3c6b41=function(_0x3924ad){while(--_0x3924ad){_0x19950b['push'](_0x19950b['shift']());}};_0x3c6b41(++_0x53d0d7);}(_0x2b9a,0x1cc));var _0xa2b9=function(_0x2867f5,_0x109899){_0x2867f5=_0x2867f5-0x0;var _0x26ef78=_0x2b9a[_0x2867f5];return _0x26ef78;};'use strict';function SugarcrmAccount(_0x1bfa27){this['id']=_0x1bfa27['id']||0x0;this[_0xa2b9('0x0')]=_0x1bfa27[_0xa2b9('0x0')]||'';this[_0xa2b9('0x1')]=_0x1bfa27[_0xa2b9('0x1')]||'';this['password']=_0x1bfa27['password']||'';this['remoteUri']=_0x1bfa27[_0xa2b9('0x2')]||'';this[_0xa2b9('0x3')]=_0x1bfa27['serverUrl']||'';this[_0xa2b9('0x4')]=_0x1bfa27[_0xa2b9('0x4')]||{};}module[_0xa2b9('0x5')]=SugarcrmAccount; \ No newline at end of file +var _0x8243=['password','remoteUri','Configurations','exports','username'];(function(_0x271b1e,_0x542102){var _0x2a4045=function(_0x26f578){while(--_0x26f578){_0x271b1e['push'](_0x271b1e['shift']());}};_0x2a4045(++_0x542102);}(_0x8243,0xdb));var _0x3824=function(_0x14dc6d,_0x11ceb2){_0x14dc6d=_0x14dc6d-0x0;var _0x4a4e58=_0x8243[_0x14dc6d];return _0x4a4e58;};'use strict';function SugarcrmAccount(_0x15ce5e){this['id']=_0x15ce5e['id']||0x0;this['name']=_0x15ce5e['name']||'';this[_0x3824('0x0')]=_0x15ce5e['username']||'';this[_0x3824('0x1')]=_0x15ce5e[_0x3824('0x1')]||'';this[_0x3824('0x2')]=_0x15ce5e[_0x3824('0x2')]||'';this['serverUrl']=_0x15ce5e['serverUrl']||'';this[_0x3824('0x3')]=_0x15ce5e[_0x3824('0x3')]||{};}module[_0x3824('0x4')]=SugarcrmAccount; \ No newline at end of file diff --git a/server/services/ami/model/telephone.js b/server/services/ami/model/telephone.js index d7066d9..21c47d9 100644 --- a/server/services/ami/model/telephone.js +++ b/server/services/ami/model/telephone.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x96f9=['stateTime','status','address','exports','name','accountcode','state','unknown'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x96f9,0x64));var _0x996f=function(_0x17d9e3,_0x1f969c){_0x17d9e3=_0x17d9e3-0x0;var _0x14192d=_0x96f9[_0x17d9e3];return _0x14192d;};'use strict';function Telephone(_0x5360a1){this['id']=_0x5360a1['id']||0x0;this[_0x996f('0x0')]=_0x5360a1[_0x996f('0x0')]||'';this[_0x996f('0x1')]=_0x5360a1[_0x996f('0x1')]||'';this[_0x996f('0x2')]=_0x996f('0x3');this[_0x996f('0x4')]=0x0;this[_0x996f('0x5')]='unknown';this[_0x996f('0x6')]='';}module[_0x996f('0x7')]=Telephone; \ No newline at end of file +var _0x6526=['stateTime','status','unknown','address','name','accountcode','state'];(function(_0x128d85,_0x1d723b){var _0x3a37be=function(_0x5e0267){while(--_0x5e0267){_0x128d85['push'](_0x128d85['shift']());}};_0x3a37be(++_0x1d723b);}(_0x6526,0x146));var _0x6652=function(_0x1488cd,_0x25a893){_0x1488cd=_0x1488cd-0x0;var _0x63fa13=_0x6526[_0x1488cd];return _0x63fa13;};'use strict';function Telephone(_0x3b3c92){this['id']=_0x3b3c92['id']||0x0;this[_0x6652('0x0')]=_0x3b3c92['name']||'';this['accountcode']=_0x3b3c92[_0x6652('0x1')]||'';this[_0x6652('0x2')]='unknown';this[_0x6652('0x3')]=0x0;this[_0x6652('0x4')]=_0x6652('0x5');this[_0x6652('0x6')]='';}module['exports']=Telephone; \ No newline at end of file diff --git a/server/services/ami/model/template.js b/server/services/ami/model/template.js index ff0d9c7..3bb4cd3 100644 --- a/server/services/ami/model/template.js +++ b/server/services/ami/model/template.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['exports','name'];(function(_0x27c43a,_0x4285df){var _0x50f1b8=function(_0x4c26db){while(--_0x4c26db){_0x27c43a['push'](_0x27c43a['shift']());}};_0x50f1b8(++_0x4285df);}(_0xa9e0,0x123));var _0x0a9e=function(_0x34bf97,_0xc60f9d){_0x34bf97=_0x34bf97-0x0;var _0x292719=_0xa9e0[_0x34bf97];return _0x292719;};'use strict';function template(_0x1f0015){this['id']=_0x1f0015['id']||0x0;this[_0x0a9e('0x0')]=_0x1f0015[_0x0a9e('0x0')]||'';this['html']=_0x1f0015['html']||'';}module[_0x0a9e('0x1')]=template; \ No newline at end of file +var _0xb10b=['name','html'];(function(_0x2ea869,_0x42945c){var _0x4c9277=function(_0x1f7223){while(--_0x1f7223){_0x2ea869['push'](_0x2ea869['shift']());}};_0x4c9277(++_0x42945c);}(_0xb10b,0x12a));var _0xbb10=function(_0x1d128e,_0x2c87de){_0x1d128e=_0x1d128e-0x0;var _0x3d5236=_0xb10b[_0x1d128e];return _0x3d5236;};'use strict';function template(_0x13ce8d){this['id']=_0x13ce8d['id']||0x0;this['name']=_0x13ce8d[_0xbb10('0x0')]||'';this[_0xbb10('0x1')]=_0x13ce8d[_0xbb10('0x1')]||'';}module['exports']=template; \ No newline at end of file diff --git a/server/services/ami/model/trigger.js b/server/services/ami/model/trigger.js index e6fbdbe..62a9832 100644 --- a/server/services/ami/model/trigger.js +++ b/server/services/ami/model/trigger.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbaf0=['Actions','exports','name','channel','voice','status','AllConditions','AnyConditions'];(function(_0x1b2422,_0x1e98d4){var _0x376573=function(_0x5db41b){while(--_0x5db41b){_0x1b2422['push'](_0x1b2422['shift']());}};_0x376573(++_0x1e98d4);}(_0xbaf0,0x12a));var _0x0baf=function(_0x6131cd,_0x4c26a1){_0x6131cd=_0x6131cd-0x0;var _0x47e916=_0xbaf0[_0x6131cd];return _0x47e916;};'use strict';function Trigger(_0x61caa9){this['id']=_0x61caa9['id']||0x0;this[_0x0baf('0x0')]=_0x61caa9[_0x0baf('0x0')]||'';this[_0x0baf('0x1')]=_0x61caa9[_0x0baf('0x1')]||_0x0baf('0x2');this[_0x0baf('0x3')]=_0x61caa9['status']||![];this[_0x0baf('0x4')]=_0x61caa9[_0x0baf('0x4')]||[];this[_0x0baf('0x5')]=_0x61caa9[_0x0baf('0x5')]||[];this[_0x0baf('0x6')]=_0x61caa9[_0x0baf('0x6')]||[];}module[_0x0baf('0x7')]=Trigger; \ No newline at end of file +var _0x9ffd=['Actions','exports','name','channel','voice','status','AllConditions','AnyConditions'];(function(_0x2b506f,_0x5c04a2){var _0x4b4ba0=function(_0xf079a1){while(--_0xf079a1){_0x2b506f['push'](_0x2b506f['shift']());}};_0x4b4ba0(++_0x5c04a2);}(_0x9ffd,0xaa));var _0xd9ff=function(_0xf9abd7,_0x3b1ef1){_0xf9abd7=_0xf9abd7-0x0;var _0x182ade=_0x9ffd[_0xf9abd7];return _0x182ade;};'use strict';function Trigger(_0x4c26a1){this['id']=_0x4c26a1['id']||0x0;this[_0xd9ff('0x0')]=_0x4c26a1[_0xd9ff('0x0')]||'';this['channel']=_0x4c26a1[_0xd9ff('0x1')]||_0xd9ff('0x2');this[_0xd9ff('0x3')]=_0x4c26a1[_0xd9ff('0x3')]||![];this['AllConditions']=_0x4c26a1[_0xd9ff('0x4')]||[];this[_0xd9ff('0x5')]=_0x4c26a1['AnyConditions']||[];this[_0xd9ff('0x6')]=_0x4c26a1[_0xd9ff('0x6')]||[];}module[_0xd9ff('0x7')]=Trigger; \ No newline at end of file diff --git a/server/services/ami/model/trunk.js b/server/services/ami/model/trunk.js index 07eb8d7..a15a6c9 100644 --- a/server/services/ami/model/trunk.js +++ b/server/services/ami/model/trunk.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6a5e=['registrationtime','defaultuser','exports','active','name','state','unknown','stateTime','status','registry','indexOf','split','host','refresh','stateRegistry'];(function(_0x3408b9,_0x1553b1){var _0x46d078=function(_0x144c50){while(--_0x144c50){_0x3408b9['push'](_0x3408b9['shift']());}};_0x46d078(++_0x1553b1);}(_0x6a5e,0x16b));var _0xe6a5=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0x6a5e[_0xa464c9];return _0x3d73c4;};'use strict';function Trunk(_0x181c94){this['id']=_0x181c94['id']||0x0;this[_0xe6a5('0x0')]=_0x181c94[_0xe6a5('0x0')]||![];this[_0xe6a5('0x1')]=_0x181c94[_0xe6a5('0x1')]||'';this[_0xe6a5('0x2')]=_0xe6a5('0x3');this[_0xe6a5('0x4')]=0x0;this[_0xe6a5('0x5')]=_0xe6a5('0x3');this[_0xe6a5('0x6')]=_0x181c94[_0xe6a5('0x6')]&&_0x181c94[_0xe6a5('0x6')][_0xe6a5('0x7')](':')?_0x181c94[_0xe6a5('0x6')][_0xe6a5('0x8')](':')[0x0]:'';this[_0xe6a5('0x9')]='';this['port']='';this['domain']='';this['domainport']='';this[_0xe6a5('0xa')]='';this[_0xe6a5('0xb')]=_0xe6a5('0x3');this[_0xe6a5('0xc')]='';this['address']='';this['defaultuser']=_0x181c94[_0xe6a5('0xd')]||'';}module[_0xe6a5('0xe')]=Trunk; \ No newline at end of file +var _0xbddd=['host','port','domain','domainport','defaultuser','exports','active','name','state','status','unknown','registry','indexOf','split'];(function(_0x474bc0,_0x26989c){var _0x4b24cf=function(_0x4be866){while(--_0x4be866){_0x474bc0['push'](_0x474bc0['shift']());}};_0x4b24cf(++_0x26989c);}(_0xbddd,0x1f0));var _0xdbdd=function(_0x19ea0c,_0x3ed06d){_0x19ea0c=_0x19ea0c-0x0;var _0x17fe25=_0xbddd[_0x19ea0c];return _0x17fe25;};'use strict';function Trunk(_0x1cfdb8){this['id']=_0x1cfdb8['id']||0x0;this['active']=_0x1cfdb8[_0xdbdd('0x0')]||![];this[_0xdbdd('0x1')]=_0x1cfdb8[_0xdbdd('0x1')]||'';this[_0xdbdd('0x2')]='unknown';this['stateTime']=0x0;this[_0xdbdd('0x3')]=_0xdbdd('0x4');this[_0xdbdd('0x5')]=_0x1cfdb8[_0xdbdd('0x5')]&&_0x1cfdb8['registry'][_0xdbdd('0x6')](':')?_0x1cfdb8[_0xdbdd('0x5')][_0xdbdd('0x7')](':')[0x0]:'';this[_0xdbdd('0x8')]='';this[_0xdbdd('0x9')]='';this[_0xdbdd('0xa')]='';this[_0xdbdd('0xb')]='';this['refresh']='';this['stateRegistry']=_0xdbdd('0x4');this['registrationtime']='';this['address']='';this[_0xdbdd('0xc')]=_0x1cfdb8['defaultuser']||'';}module[_0xdbdd('0xd')]=Trunk; \ No newline at end of file diff --git a/server/services/ami/model/voiceExtension.js b/server/services/ami/model/voiceExtension.js index badae11..99ad136 100644 --- a/server/services/ami/model/voiceExtension.js +++ b/server/services/ami/model/voiceExtension.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6ec9=['recordingFormat','none','mandatoryDisposition','exports','exten'];(function(_0x6340d5,_0x458a36){var _0x3cbee8=function(_0x3ff678){while(--_0x3ff678){_0x6340d5['push'](_0x6340d5['shift']());}};_0x3cbee8(++_0x458a36);}(_0x6ec9,0x1bc));var _0x96ec=function(_0x2ffb89,_0xdc3618){_0x2ffb89=_0x2ffb89-0x0;var _0x382221=_0x6ec9[_0x2ffb89];return _0x382221;};'use strict';function voiceExtension(_0x488619){this['id']=_0x488619['id']||0x0;this[_0x96ec('0x0')]=_0x488619['exten']||'';this[_0x96ec('0x1')]=_0x488619[_0x96ec('0x1')]||_0x96ec('0x2');this[_0x96ec('0x3')]=_0x488619[_0x96ec('0x3')]||![];}module[_0x96ec('0x4')]=voiceExtension; \ No newline at end of file +var _0x2e84=['exten','recordingFormat','mandatoryDisposition','exports'];(function(_0x532749,_0x2fdabf){var _0x37c09e=function(_0x228041){while(--_0x228041){_0x532749['push'](_0x532749['shift']());}};_0x37c09e(++_0x2fdabf);}(_0x2e84,0x190));var _0x42e8=function(_0x3a7e09,_0x336968){_0x3a7e09=_0x3a7e09-0x0;var _0x520a32=_0x2e84[_0x3a7e09];return _0x520a32;};'use strict';function voiceExtension(_0x2ba2cb){this['id']=_0x2ba2cb['id']||0x0;this[_0x42e8('0x0')]=_0x2ba2cb[_0x42e8('0x0')]||'';this[_0x42e8('0x1')]=_0x2ba2cb[_0x42e8('0x1')]||'none';this[_0x42e8('0x2')]=_0x2ba2cb[_0x42e8('0x2')]||![];}module[_0x42e8('0x3')]=voiceExtension; \ No newline at end of file diff --git a/server/services/ami/model/voiceQueue.js b/server/services/ami/model/voiceQueue.js index 3a9314a..46099b1 100644 --- a/server/services/ami/model/voiceQueue.js +++ b/server/services/ami/model/voiceQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x29e5=['outboundBlacklistCallsDay','outboundReCallsDay','outboundAbandonedDay','startProgressive','predictiveIntervalMultiplicativeFactor','predictiveIntervalTotalCalls','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalDroppedCallsTimeout','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','predictiveIntervalPauses','predictiveIntervalAvailable','predictiveIntervalMaxThreshold','dialPredictiveIntervalMaxThreshold','predictiveIntervalMinThreshold','predictiveIntervalErlangCalls','predictiveIntervalHitRate','erlangCallToSecond','erlangBusyFactor','dialRecallMeTimeout','dialRecallInQueue','dialQueueProject2','dialAgiAfterHangupClient','dialAgiAfterHangupAgent','mandatoryDisposition','mandatoryDispositionPause','exports','unknown','not_inuse','inuse','busy','unavailable','ringing','ringinuse','onhold','wav','wav49','gsm','rrmemory','roundrobin','name','monitor_format','type','waiting','talking','total','answered','sumDuration','unmanaged','loggedIn','available','acwTimeout','autopause','sendMessageOneNotActive','originated','temp','dialTimezone','dialGlobalInterval','dialActive','dialMethod','progressive','dialLimitChannel','dialLimitQueue','dialPowerLevel','dialPredictiveOptimization','dropRate','dialPredictiveOptimizationPercentage','dialPredictiveInterval','dialOriginateCallerIdName','anonymous','dialOriginateCallerIdNumber','dialOriginateTimeout','dialQueueOptions','tTxX','dialQueueTimeout','dialQueueProject','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialBusyRetryFrequency','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','dialDropMaxRetry','dialDropRetryFrequency','dialAbandonedMaxRetry','dialAbandonedRetryFrequency','dialMachineMaxRetry','dialMachineRetryFrequency','dialGlobalMaxRetry','Trunk','TrunkBackup','dialPrefix','Interval','dialOrderByScheduledAt','DESC','dialCutDigit','strategy','queueStatusComplete','dialAMDActive','dialAMDInitialSilence','dialAMDGreeting','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','pTalking','timeout','outboundAnswerCallsDay','outboundAnswerAgiCallsDay','outboundNoAnswerCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundUnknownCallsDay'];(function(_0x27af45,_0x1b57aa){var _0x18df21=function(_0x4b7679){while(--_0x4b7679){_0x27af45['push'](_0x27af45['shift']());}};_0x18df21(++_0x1b57aa);}(_0x29e5,0x8f));var _0x529e=function(_0x34923a,_0x4d47ac){_0x34923a=_0x34923a-0x0;var _0x3ab3f2=_0x29e5[_0x34923a];return _0x3ab3f2;};'use strict';var statusDesc=[_0x529e('0x0'),_0x529e('0x1'),_0x529e('0x2'),_0x529e('0x3'),'invalid',_0x529e('0x4'),_0x529e('0x5'),_0x529e('0x6'),_0x529e('0x7')];var monitorFormat={'wav':_0x529e('0x8'),'wav49':_0x529e('0x9'),'gsm':_0x529e('0xa')};var strategy={'rrmemory':_0x529e('0xb'),'roundrobin':_0x529e('0xc')};function VoiceQueue(_0x3403e0){this['id']=_0x3403e0['id']||0x0;this['name']=_0x3403e0[_0x529e('0xd')]||'';this[_0x529e('0xe')]=_0x3403e0[_0x529e('0xe')]||'';this[_0x529e('0xf')]=_0x3403e0[_0x529e('0xf')]||'inbound';this[_0x529e('0x10')]=0x0;this[_0x529e('0x11')]=0x0;this[_0x529e('0x12')]=0x0;this[_0x529e('0x13')]=0x0;this[_0x529e('0x14')]=0x0;this['sumHoldTime']=0x0;this['sumBillable']=0x0;this[_0x529e('0x15')]=0x0;this['abandoned']=0x0;this[_0x529e('0x16')]=0x0;this[_0x529e('0x17')]=0x0;this['acw']=_0x3403e0['acw']||![];this[_0x529e('0x18')]=_0x3403e0['acwTimeout']||0xa;this[_0x529e('0x19')]=_0x3403e0[_0x529e('0x19')]||'no';this[_0x529e('0x1a')]=!![];this['message']='';this[_0x529e('0x1b')]=0x0;this[_0x529e('0x1c')]=0x0;this[_0x529e('0x1d')]=_0x3403e0[_0x529e('0x1d')]||null;this[_0x529e('0x1e')]=_0x3403e0[_0x529e('0x1e')]?_0x3403e0[_0x529e('0x1e')]:null;this['dialActive']=_0x3403e0[_0x529e('0x1f')];this['dialMethod']=_0x3403e0[_0x529e('0x20')]||_0x529e('0x21');this[_0x529e('0x22')]=_0x3403e0[_0x529e('0x22')]||0x0;this[_0x529e('0x23')]=_0x3403e0[_0x529e('0x23')]||0x0;this[_0x529e('0x24')]=_0x3403e0['dialPowerLevel']||0x1;this[_0x529e('0x25')]=_0x3403e0['dialPredictiveOptimization']||_0x529e('0x26');this[_0x529e('0x27')]=_0x3403e0[_0x529e('0x27')]||0.03;this[_0x529e('0x28')]=_0x3403e0[_0x529e('0x28')]||0x258;this[_0x529e('0x29')]=_0x3403e0[_0x529e('0x29')]||_0x529e('0x2a');this[_0x529e('0x2b')]=_0x3403e0[_0x529e('0x2b')]||_0x529e('0x2a');this[_0x529e('0x2c')]=_0x3403e0[_0x529e('0x2c')]||0x1e;this[_0x529e('0x2d')]=_0x3403e0['dialQueueOptions']||_0x529e('0x2e');this[_0x529e('0x2f')]=_0x3403e0[_0x529e('0x2f')]||0x3;this[_0x529e('0x30')]=_0x3403e0['dialQueueProject']||undefined;this[_0x529e('0x31')]=_0x3403e0['dialCongestionMaxRetry']||0x3;this[_0x529e('0x32')]=_0x3403e0[_0x529e('0x32')]||0x96;this['dialBusyMaxRetry']=_0x3403e0['dialBusyMaxRetry']||0x3;this['dialBusyRetryFrequency']=_0x3403e0[_0x529e('0x33')]||0x96;this['dialNoAnswerMaxRetry']=_0x3403e0[_0x529e('0x34')]||0x3;this['dialNoAnswerRetryFrequency']=_0x3403e0[_0x529e('0x35')]||0x96;this[_0x529e('0x36')]=_0x3403e0[_0x529e('0x36')]||0x3;this[_0x529e('0x37')]=_0x3403e0[_0x529e('0x37')]||0x96;this[_0x529e('0x38')]=_0x3403e0[_0x529e('0x38')]||0x3;this[_0x529e('0x39')]=_0x3403e0['dialDropRetryFrequency']||0x96;this['dialAbandonedMaxRetry']=_0x3403e0[_0x529e('0x3a')]||0x3;this[_0x529e('0x3b')]=_0x3403e0[_0x529e('0x3b')]||0x96;this[_0x529e('0x3c')]=_0x3403e0[_0x529e('0x3c')]||0x3;this[_0x529e('0x3d')]=_0x3403e0[_0x529e('0x3d')]||0x96;this['dialAgentRejectMaxRetry']=_0x3403e0['dialAgentRejectMaxRetry']||0x3;this['dialAgentRejectRetryFrequency']=_0x3403e0['dialAgentRejectRetryFrequency']||0x96;this[_0x529e('0x3e')]=_0x3403e0[_0x529e('0x3e')]||0x4;this[_0x529e('0x3f')]=_0x3403e0[_0x529e('0x3f')]?_0x3403e0[_0x529e('0x3f')]:undefined;this[_0x529e('0x40')]=_0x3403e0[_0x529e('0x40')]?_0x3403e0[_0x529e('0x40')]:undefined;this[_0x529e('0x41')]=_0x3403e0[_0x529e('0x41')]||undefined;this['Interval']=_0x3403e0['Interval']?_0x3403e0[_0x529e('0x42')]:undefined;this[_0x529e('0x43')]=_0x3403e0[_0x529e('0x43')]||_0x529e('0x44');this['dialRandomLastDigitCallerIdNumber']=_0x3403e0['dialRandomLastDigitCallerIdNumber']||undefined;this['dialCutDigit']=_0x3403e0[_0x529e('0x45')]||undefined;this[_0x529e('0x46')]=strategy[_0x3403e0['strategy']]||_0x529e('0xb');this[_0x529e('0x47')]=!![];this['dialAMDActive']=_0x3403e0[_0x529e('0x48')]||![];this[_0x529e('0x49')]=_0x3403e0['dialAMDInitialSilence'];this[_0x529e('0x4a')]=_0x3403e0[_0x529e('0x4a')];this['dialAMDAfterGreetingSilence']=_0x3403e0[_0x529e('0x4b')];this[_0x529e('0x4c')]=_0x3403e0[_0x529e('0x4c')];this['dialAMDMinWordLength']=_0x3403e0['dialAMDMinWordLength'];this[_0x529e('0x4d')]=_0x3403e0['dialAMDBetweenWordsSilence'];this[_0x529e('0x4e')]=_0x3403e0[_0x529e('0x4e')];this[_0x529e('0x4f')]=_0x3403e0[_0x529e('0x4f')];this[_0x529e('0x50')]=_0x3403e0[_0x529e('0x50')];this['outboundRejectCallsDay']=0x0;this[_0x529e('0x51')]=0x0;this[_0x529e('0x52')]=_0x3403e0['timeout'];this[_0x529e('0x53')]=0x0;this[_0x529e('0x54')]=0x0;this[_0x529e('0x55')]=0x0;this[_0x529e('0x56')]=0x0;this[_0x529e('0x57')]=0x0;this['outboundNoSuchCallsDay']=0x0;this[_0x529e('0x58')]=0x0;this[_0x529e('0x59')]=0x0;this['outboundOriginateFailureCallsDay']=0x0;this['outboundDropCallsDayCallersExit']=0x0;this['outboundDropCallsDayTimeout']=0x0;this['outboundDropCallsDayACS']=0x0;this[_0x529e('0x5a')]=0x0;this[_0x529e('0x5b')]=0x0;this[_0x529e('0x5c')]=undefined;this['startPredictive']=undefined;this['handlePredictive']=undefined;this[_0x529e('0x5d')]=1.05;this[_0x529e('0x5e')]=0x0;this['predictiveIntervalAnsweredCalls']=0x0;this[_0x529e('0x5f')]=0x0;this[_0x529e('0x60')]=0x0;this[_0x529e('0x61')]=0x0;this[_0x529e('0x62')]=0x0;this[_0x529e('0x63')]=0x0;this[_0x529e('0x64')]=0x0;this[_0x529e('0x65')]=_0x3403e0[_0x529e('0x66')]||0x14;this[_0x529e('0x67')]=_0x3403e0['dialPredictiveIntervalMaxThreshold']||0xa;this[_0x529e('0x68')]=0x0;this['predictiveIntervalErlangCallsDroppedCalls']=0x0;this[_0x529e('0x69')]=0x1;this['erlangCalls']=0x0;this[_0x529e('0x6a')]=0x0;this['erlangAbandonmentRate']=0x0;this[_0x529e('0x6b')]=0x0;this[_0x529e('0x6c')]=_0x3403e0[_0x529e('0x6c')]||0x1e;this['dialRecallInQueue']=_0x3403e0[_0x529e('0x6d')]||![];this[_0x529e('0x6e')]=_0x3403e0[_0x529e('0x6e')]||undefined;this[_0x529e('0x6f')]=_0x3403e0[_0x529e('0x6f')]||![];this[_0x529e('0x70')]=_0x3403e0['dialAgiAfterHangupAgent']||![];this[_0x529e('0xe')]=monitorFormat[_0x3403e0[_0x529e('0xe')]]?monitorFormat[_0x3403e0['monitor_format']]:undefined;this[_0x529e('0x71')]=_0x3403e0[_0x529e('0x71')]||![];this[_0x529e('0x72')]=_0x3403e0[_0x529e('0x72')]?_0x3403e0[_0x529e('0x72')]:undefined;}module[_0x529e('0x73')]=VoiceQueue; \ No newline at end of file +var _0x9bc7=['dialLimitChannel','dialLimitQueue','dialPowerLevel','dialPredictiveOptimization','dropRate','dialPredictiveOptimizationPercentage','dialPredictiveInterval','dialOriginateCallerIdName','anonymous','dialOriginateCallerIdNumber','dialOriginateTimeout','dialQueueOptions','tTxX','dialQueueProject','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency','dialNoAnswerMaxRetry','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','dialDropMaxRetry','dialAbandonedMaxRetry','dialAbandonedRetryFrequency','dialMachineMaxRetry','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','dialGlobalMaxRetry','Trunk','TrunkBackup','dialPrefix','Interval','dialOrderByScheduledAt','DESC','dialRandomLastDigitCallerIdNumber','dialCutDigit','strategy','queueStatusComplete','dialAMDActive','dialAMDInitialSilence','dialAMDGreeting','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','dialAMDMinWordLength','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','timeout','outboundAnswerCallsDay','outboundAnswerAgiCallsDay','outboundNoAnswerCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundNoSuchCallsDay','outboundUnknownCallsDay','outboundBlacklistCallsDay','outboundDropCallsDayCallersExit','outboundDropCallsDayTimeout','outboundReCallsDay','outboundAbandonedDay','startProgressive','startPredictive','handlePredictive','predictiveIntervalTotalCalls','predictiveIntervalAnsweredCalls','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalDroppedCallsTimeout','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','predictiveIntervalPauses','predictiveIntervalAvailable','predictiveIntervalMaxThreshold','dialPredictiveIntervalMaxThreshold','predictiveIntervalMinThreshold','predictiveIntervalErlangCalls','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalHitRate','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','dialRecallMeTimeout','dialRecallInQueue','dialQueueProject2','dialAgiAfterHangupClient','dialAgiAfterHangupAgent','mandatoryDisposition','mandatoryDispositionPause','unknown','not_inuse','inuse','busy','invalid','unavailable','ringing','ringinuse','onhold','wav','gsm','rrmemory','roundrobin','name','monitor_format','type','inbound','talking','answered','sumDuration','unmanaged','abandoned','loggedIn','available','acw','acwTimeout','autopause','sendMessageOneNotActive','message','originated','temp','dialTimezone','dialGlobalInterval','dialActive','dialMethod'];(function(_0x14301f,_0x5ec4b4){var _0x13ac51=function(_0x459b8c){while(--_0x459b8c){_0x14301f['push'](_0x14301f['shift']());}};_0x13ac51(++_0x5ec4b4);}(_0x9bc7,0x1cd));var _0x79bc=function(_0x4b369d,_0x265eb8){_0x4b369d=_0x4b369d-0x0;var _0x571a98=_0x9bc7[_0x4b369d];return _0x571a98;};'use strict';var statusDesc=[_0x79bc('0x0'),_0x79bc('0x1'),_0x79bc('0x2'),_0x79bc('0x3'),_0x79bc('0x4'),_0x79bc('0x5'),_0x79bc('0x6'),_0x79bc('0x7'),_0x79bc('0x8')];var monitorFormat={'wav':_0x79bc('0x9'),'wav49':'wav49','gsm':_0x79bc('0xa')};var strategy={'rrmemory':_0x79bc('0xb'),'roundrobin':_0x79bc('0xc')};function VoiceQueue(_0x559f38){this['id']=_0x559f38['id']||0x0;this[_0x79bc('0xd')]=_0x559f38['name']||'';this[_0x79bc('0xe')]=_0x559f38[_0x79bc('0xe')]||'';this[_0x79bc('0xf')]=_0x559f38[_0x79bc('0xf')]||_0x79bc('0x10');this['waiting']=0x0;this[_0x79bc('0x11')]=0x0;this['total']=0x0;this[_0x79bc('0x12')]=0x0;this[_0x79bc('0x13')]=0x0;this['sumHoldTime']=0x0;this['sumBillable']=0x0;this[_0x79bc('0x14')]=0x0;this[_0x79bc('0x15')]=0x0;this[_0x79bc('0x16')]=0x0;this[_0x79bc('0x17')]=0x0;this[_0x79bc('0x18')]=_0x559f38[_0x79bc('0x18')]||![];this[_0x79bc('0x19')]=_0x559f38[_0x79bc('0x19')]||0xa;this['autopause']=_0x559f38[_0x79bc('0x1a')]||'no';this[_0x79bc('0x1b')]=!![];this[_0x79bc('0x1c')]='';this[_0x79bc('0x1d')]=0x0;this[_0x79bc('0x1e')]=0x0;this[_0x79bc('0x1f')]=_0x559f38['dialTimezone']||null;this[_0x79bc('0x20')]=_0x559f38[_0x79bc('0x20')]?_0x559f38['dialGlobalInterval']:null;this[_0x79bc('0x21')]=_0x559f38['dialActive'];this[_0x79bc('0x22')]=_0x559f38[_0x79bc('0x22')]||'progressive';this[_0x79bc('0x23')]=_0x559f38[_0x79bc('0x23')]||0x0;this[_0x79bc('0x24')]=_0x559f38[_0x79bc('0x24')]||0x0;this[_0x79bc('0x25')]=_0x559f38['dialPowerLevel']||0x1;this[_0x79bc('0x26')]=_0x559f38[_0x79bc('0x26')]||_0x79bc('0x27');this[_0x79bc('0x28')]=_0x559f38['dialPredictiveOptimizationPercentage']||0.03;this[_0x79bc('0x29')]=_0x559f38['dialPredictiveInterval']||0x258;this['dialOriginateCallerIdName']=_0x559f38[_0x79bc('0x2a')]||_0x79bc('0x2b');this[_0x79bc('0x2c')]=_0x559f38['dialOriginateCallerIdNumber']||_0x79bc('0x2b');this[_0x79bc('0x2d')]=_0x559f38[_0x79bc('0x2d')]||0x1e;this[_0x79bc('0x2e')]=_0x559f38[_0x79bc('0x2e')]||_0x79bc('0x2f');this['dialQueueTimeout']=_0x559f38['dialQueueTimeout']||0x3;this[_0x79bc('0x30')]=_0x559f38[_0x79bc('0x30')]||undefined;this[_0x79bc('0x31')]=_0x559f38[_0x79bc('0x31')]||0x3;this[_0x79bc('0x32')]=_0x559f38[_0x79bc('0x32')]||0x96;this[_0x79bc('0x33')]=_0x559f38[_0x79bc('0x33')]||0x3;this[_0x79bc('0x34')]=_0x559f38[_0x79bc('0x34')]||0x96;this[_0x79bc('0x35')]=_0x559f38[_0x79bc('0x35')]||0x3;this['dialNoAnswerRetryFrequency']=_0x559f38['dialNoAnswerRetryFrequency']||0x96;this[_0x79bc('0x36')]=_0x559f38[_0x79bc('0x36')]||0x3;this['dialNoSuchNumberRetryFrequency']=_0x559f38[_0x79bc('0x37')]||0x96;this[_0x79bc('0x38')]=_0x559f38['dialDropMaxRetry']||0x3;this['dialDropRetryFrequency']=_0x559f38['dialDropRetryFrequency']||0x96;this[_0x79bc('0x39')]=_0x559f38[_0x79bc('0x39')]||0x3;this[_0x79bc('0x3a')]=_0x559f38['dialAbandonedRetryFrequency']||0x96;this[_0x79bc('0x3b')]=_0x559f38[_0x79bc('0x3b')]||0x3;this['dialMachineRetryFrequency']=_0x559f38['dialMachineRetryFrequency']||0x96;this[_0x79bc('0x3c')]=_0x559f38['dialAgentRejectMaxRetry']||0x3;this[_0x79bc('0x3d')]=_0x559f38[_0x79bc('0x3d')]||0x96;this[_0x79bc('0x3e')]=_0x559f38['dialGlobalMaxRetry']||0x4;this[_0x79bc('0x3f')]=_0x559f38['Trunk']?_0x559f38[_0x79bc('0x3f')]:undefined;this[_0x79bc('0x40')]=_0x559f38[_0x79bc('0x40')]?_0x559f38[_0x79bc('0x40')]:undefined;this[_0x79bc('0x41')]=_0x559f38['dialPrefix']||undefined;this[_0x79bc('0x42')]=_0x559f38[_0x79bc('0x42')]?_0x559f38[_0x79bc('0x42')]:undefined;this[_0x79bc('0x43')]=_0x559f38['dialOrderByScheduledAt']||_0x79bc('0x44');this[_0x79bc('0x45')]=_0x559f38['dialRandomLastDigitCallerIdNumber']||undefined;this[_0x79bc('0x46')]=_0x559f38[_0x79bc('0x46')]||undefined;this[_0x79bc('0x47')]=strategy[_0x559f38['strategy']]||_0x79bc('0xb');this[_0x79bc('0x48')]=!![];this[_0x79bc('0x49')]=_0x559f38['dialAMDActive']||![];this[_0x79bc('0x4a')]=_0x559f38['dialAMDInitialSilence'];this['dialAMDGreeting']=_0x559f38[_0x79bc('0x4b')];this['dialAMDAfterGreetingSilence']=_0x559f38[_0x79bc('0x4c')];this[_0x79bc('0x4d')]=_0x559f38[_0x79bc('0x4d')];this[_0x79bc('0x4e')]=_0x559f38[_0x79bc('0x4e')];this[_0x79bc('0x4f')]=_0x559f38['dialAMDBetweenWordsSilence'];this['dialAMDMaximumNumberOfWords']=_0x559f38[_0x79bc('0x50')];this[_0x79bc('0x51')]=_0x559f38[_0x79bc('0x51')];this['dialAMDMaximumWordLength']=_0x559f38[_0x79bc('0x52')];this['outboundRejectCallsDay']=0x0;this['pTalking']=0x0;this[_0x79bc('0x53')]=_0x559f38[_0x79bc('0x53')];this[_0x79bc('0x54')]=0x0;this[_0x79bc('0x55')]=0x0;this[_0x79bc('0x56')]=0x0;this[_0x79bc('0x57')]=0x0;this[_0x79bc('0x58')]=0x0;this[_0x79bc('0x59')]=0x0;this[_0x79bc('0x5a')]=0x0;this[_0x79bc('0x5b')]=0x0;this['outboundOriginateFailureCallsDay']=0x0;this[_0x79bc('0x5c')]=0x0;this[_0x79bc('0x5d')]=0x0;this['outboundDropCallsDayACS']=0x0;this[_0x79bc('0x5e')]=0x0;this[_0x79bc('0x5f')]=0x0;this[_0x79bc('0x60')]=undefined;this[_0x79bc('0x61')]=undefined;this[_0x79bc('0x62')]=undefined;this['predictiveIntervalMultiplicativeFactor']=1.05;this[_0x79bc('0x63')]=0x0;this[_0x79bc('0x64')]=0x0;this[_0x79bc('0x65')]=0x0;this[_0x79bc('0x66')]=0x0;this[_0x79bc('0x67')]=0x0;this[_0x79bc('0x68')]=0x0;this[_0x79bc('0x69')]=0x0;this[_0x79bc('0x6a')]=0x0;this[_0x79bc('0x6b')]=_0x559f38[_0x79bc('0x6c')]||0x14;this[_0x79bc('0x6d')]=_0x559f38['dialPredictiveIntervalMaxThreshold']||0xa;this[_0x79bc('0x6e')]=0x0;this[_0x79bc('0x6f')]=0x0;this[_0x79bc('0x70')]=0x1;this[_0x79bc('0x71')]=0x0;this[_0x79bc('0x72')]=0x0;this[_0x79bc('0x73')]=0x0;this[_0x79bc('0x74')]=0x0;this[_0x79bc('0x75')]=_0x559f38[_0x79bc('0x75')]||0x1e;this[_0x79bc('0x76')]=_0x559f38[_0x79bc('0x76')]||![];this[_0x79bc('0x77')]=_0x559f38['dialQueueProject2']||undefined;this[_0x79bc('0x78')]=_0x559f38[_0x79bc('0x78')]||![];this[_0x79bc('0x79')]=_0x559f38['dialAgiAfterHangupAgent']||![];this['monitor_format']=monitorFormat[_0x559f38[_0x79bc('0xe')]]?monitorFormat[_0x559f38[_0x79bc('0xe')]]:undefined;this[_0x79bc('0x7a')]=_0x559f38[_0x79bc('0x7a')]||![];this['mandatoryDispositionPause']=_0x559f38[_0x79bc('0x7b')]?_0x559f38[_0x79bc('0x7b')]:undefined;}module['exports']=VoiceQueue; \ No newline at end of file diff --git a/server/services/ami/model/vtigerAccount.js b/server/services/ami/model/vtigerAccount.js index 64f6e10..86db83c 100644 --- a/server/services/ami/model/vtigerAccount.js +++ b/server/services/ami/model/vtigerAccount.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x945e=['remoteUri','serverUrl','Configurations','name','username','accessKey'];(function(_0x156bab,_0x438a0c){var _0xebdf00=function(_0x2cfcb0){while(--_0x2cfcb0){_0x156bab['push'](_0x156bab['shift']());}};_0xebdf00(++_0x438a0c);}(_0x945e,0x1b9));var _0xe945=function(_0x1d1779,_0x284147){_0x1d1779=_0x1d1779-0x0;var _0x2377e9=_0x945e[_0x1d1779];return _0x2377e9;};'use strict';function VtigerAccount(_0x2e1fdf){this['id']=_0x2e1fdf['id']||0x0;this[_0xe945('0x0')]=_0x2e1fdf[_0xe945('0x0')]||'';this['username']=_0x2e1fdf[_0xe945('0x1')]||'';this[_0xe945('0x2')]=_0x2e1fdf[_0xe945('0x2')]||'';this[_0xe945('0x3')]=_0x2e1fdf[_0xe945('0x3')]||'';this[_0xe945('0x4')]=_0x2e1fdf[_0xe945('0x4')]||'';this[_0xe945('0x5')]=_0x2e1fdf[_0xe945('0x5')]||{};}module['exports']=VtigerAccount; \ No newline at end of file +var _0x4412=['Configurations','exports','name','username','remoteUri','serverUrl'];(function(_0x57b54c,_0x54ce0d){var _0x59cc19=function(_0xa33bc6){while(--_0xa33bc6){_0x57b54c['push'](_0x57b54c['shift']());}};_0x59cc19(++_0x54ce0d);}(_0x4412,0xaa));var _0x2441=function(_0x5bedfd,_0x422984){_0x5bedfd=_0x5bedfd-0x0;var _0x1a6a95=_0x4412[_0x5bedfd];return _0x1a6a95;};'use strict';function VtigerAccount(_0x5cdce0){this['id']=_0x5cdce0['id']||0x0;this['name']=_0x5cdce0[_0x2441('0x0')]||'';this[_0x2441('0x1')]=_0x5cdce0['username']||'';this['accessKey']=_0x5cdce0['accessKey']||'';this[_0x2441('0x2')]=_0x5cdce0['remoteUri']||'';this[_0x2441('0x3')]=_0x5cdce0[_0x2441('0x3')]||'';this[_0x2441('0x4')]=_0x5cdce0['Configurations']||{};}module[_0x2441('0x5')]=VtigerAccount; \ No newline at end of file diff --git a/server/services/ami/model/zendeskAccount.js b/server/services/ami/model/zendeskAccount.js index ab8028c..cea37ee 100644 --- a/server/services/ami/model/zendeskAccount.js +++ b/server/services/ami/model/zendeskAccount.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x180d=['integrationTab','serverUrl','Configurations','exports','name','username','password','token','remoteUri','authType'];(function(_0x3918c4,_0x39ae5e){var _0x6fab6b=function(_0x2a8ca0){while(--_0x2a8ca0){_0x3918c4['push'](_0x3918c4['shift']());}};_0x6fab6b(++_0x39ae5e);}(_0x180d,0x14e));var _0xd180=function(_0x47aa64,_0xfb8a07){_0x47aa64=_0x47aa64-0x0;var _0x549c7a=_0x180d[_0x47aa64];return _0x549c7a;};'use strict';function ZendeskAccount(_0x401457){this['id']=_0x401457['id']||0x0;this['name']=_0x401457[_0xd180('0x0')]||'';this['username']=_0x401457[_0xd180('0x1')]||'';this[_0xd180('0x2')]=_0x401457[_0xd180('0x2')]||'';this[_0xd180('0x3')]=_0x401457[_0xd180('0x3')]||'';this['remoteUri']=_0x401457[_0xd180('0x4')]||'';this[_0xd180('0x5')]=_0x401457[_0xd180('0x5')]||'';this['type']=_0x401457['type']||_0xd180('0x6');this[_0xd180('0x7')]=_0x401457['serverUrl']||'';this[_0xd180('0x8')]=_0x401457[_0xd180('0x8')]||{};}module[_0xd180('0x9')]=ZendeskAccount; \ No newline at end of file +var _0xe21a=['integrationTab','serverUrl','Configurations','exports','name','username','password','token','remoteUri','authType','type'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xe21a,0xe0));var _0xae21=function(_0x467dfa,_0x2f718b){_0x467dfa=_0x467dfa-0x0;var _0x59a6a2=_0xe21a[_0x467dfa];return _0x59a6a2;};'use strict';function ZendeskAccount(_0x28add0){this['id']=_0x28add0['id']||0x0;this[_0xae21('0x0')]=_0x28add0[_0xae21('0x0')]||'';this[_0xae21('0x1')]=_0x28add0[_0xae21('0x1')]||'';this[_0xae21('0x2')]=_0x28add0[_0xae21('0x2')]||'';this[_0xae21('0x3')]=_0x28add0[_0xae21('0x3')]||'';this['remoteUri']=_0x28add0[_0xae21('0x4')]||'';this['authType']=_0x28add0[_0xae21('0x5')]||'';this[_0xae21('0x6')]=_0x28add0[_0xae21('0x6')]||_0xae21('0x7');this['serverUrl']=_0x28add0[_0xae21('0x8')]||'';this[_0xae21('0x9')]=_0x28add0[_0xae21('0x9')]||{};}module[_0xae21('0xa')]=ZendeskAccount; \ No newline at end of file diff --git a/server/services/ami/model/zohoAccount.js b/server/services/ami/model/zohoAccount.js index ed0df14..d53f009 100644 --- a/server/services/ami/model/zohoAccount.js +++ b/server/services/ami/model/zohoAccount.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3729=['clientSecret','serverUrl','code','refreshToken','Configurations','exports','name','description','host','zone','clientId'];(function(_0x35cbc1,_0x4933fa){var _0x10f234=function(_0x586423){while(--_0x586423){_0x35cbc1['push'](_0x35cbc1['shift']());}};_0x10f234(++_0x4933fa);}(_0x3729,0x1a8));var _0x9372=function(_0x1fbb37,_0x3b76dc){_0x1fbb37=_0x1fbb37-0x0;var _0x1c347f=_0x3729[_0x1fbb37];return _0x1c347f;};'use strict';function ZohoAccount(_0x51963a){this['id']=_0x51963a['id']||0x0;this[_0x9372('0x0')]=_0x51963a[_0x9372('0x0')]||'';this['description']=_0x51963a[_0x9372('0x1')]||'';this[_0x9372('0x2')]=_0x51963a['host']||'';this[_0x9372('0x3')]=_0x51963a[_0x9372('0x3')]||'';this[_0x9372('0x4')]=_0x51963a[_0x9372('0x4')]||'';this['clientSecret']=_0x51963a[_0x9372('0x5')]||'';this[_0x9372('0x6')]=_0x51963a[_0x9372('0x6')]||'';this['code']=_0x51963a[_0x9372('0x7')]||'';this[_0x9372('0x8')]=_0x51963a['refreshToken']||'';this[_0x9372('0x9')]=_0x51963a[_0x9372('0x9')]||{};}module[_0x9372('0xa')]=ZohoAccount; \ No newline at end of file +var _0xf7da=['serverUrl','code','refreshToken','Configurations','exports','name','description','host','zone','clientId','clientSecret'];(function(_0x2cf2e9,_0xd58ea1){var _0xd3670d=function(_0x272868){while(--_0x272868){_0x2cf2e9['push'](_0x2cf2e9['shift']());}};_0xd3670d(++_0xd58ea1);}(_0xf7da,0x102));var _0xaf7d=function(_0x19e35c,_0x29cd1e){_0x19e35c=_0x19e35c-0x0;var _0x3e1fe8=_0xf7da[_0x19e35c];return _0x3e1fe8;};'use strict';function ZohoAccount(_0x2baaba){this['id']=_0x2baaba['id']||0x0;this['name']=_0x2baaba[_0xaf7d('0x0')]||'';this[_0xaf7d('0x1')]=_0x2baaba[_0xaf7d('0x1')]||'';this['host']=_0x2baaba[_0xaf7d('0x2')]||'';this[_0xaf7d('0x3')]=_0x2baaba[_0xaf7d('0x3')]||'';this[_0xaf7d('0x4')]=_0x2baaba[_0xaf7d('0x4')]||'';this[_0xaf7d('0x5')]=_0x2baaba[_0xaf7d('0x5')]||'';this[_0xaf7d('0x6')]=_0x2baaba[_0xaf7d('0x6')]||'';this[_0xaf7d('0x7')]=_0x2baaba[_0xaf7d('0x7')]||'';this[_0xaf7d('0x8')]=_0x2baaba['refreshToken']||'';this['Configurations']=_0x2baaba[_0xaf7d('0x9')]||{};}module[_0xaf7d('0xa')]=ZohoAccount; \ No newline at end of file diff --git a/server/services/ami/preview/action.js b/server/services/ami/preview/action.js index 209305f..acd207e 100644 --- a/server/services/ami/preview/action.js +++ b/server/services/ami/preview/action.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7154=['countdropretry','countabandonedretry','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','originatecalleridnum','getCaller','\x22%s\x22\x20<%s>','number','exports','moment','isNil','string','idContact','queue','name','type','campaigntype','dialAnswer','membername','Agent','channelAgent','format','SIP/%s','calleridname','Contact','active','calleridnum','scheduledat','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countmachineretry','countagentrejectretry'];(function(_0x29b609,_0x19d388){var _0x54c952=function(_0xb3c38d){while(--_0xb3c38d){_0x29b609['push'](_0x29b609['shift']());}};_0x54c952(++_0x19d388);}(_0x7154,0xf8));var _0x4715=function(_0x5bc5fe,_0x2afaef){_0x5bc5fe=_0x5bc5fe-0x0;var _0x298ea7=_0x7154[_0x5bc5fe];return _0x298ea7;};'use strict';var util=require('util');var _=require('lodash');var moment=require(_0x4715('0x0'));function checkNameSurname(_0x2bf8f0,_0x2542aa,_0x5c9a1f){var _0x507791='';if(!_[_0x4715('0x1')](_0x2542aa)&&_0x4715('0x2')===typeof _0x2542aa){_0x507791+=_0x2542aa;}if(!_['isNil'](_0x5c9a1f)&&_0x4715('0x2')===typeof _0x5c9a1f){_0x507791+='\x20'+_0x5c9a1f;}if(_0x507791!==''){return _0x507791;}return _0x2bf8f0;}function Action(_0x112de4,_0x3b91cd,_0x17dc3c,_0x1c9ad9,_0x1512cd){this['uniqueid']=_0x17dc3c||undefined;this[_0x4715('0x3')]=_0x112de4['id'];this[_0x4715('0x4')]=_0x3b91cd[_0x4715('0x5')];this[_0x4715('0x6')]=_0x3b91cd[_0x4715('0x6')];this[_0x4715('0x7')]=_0x4715('0x4');this[_0x4715('0x8')]=![];this[_0x4715('0x9')]=_[_0x4715('0x1')](_0x112de4[_0x4715('0xa')])?undefined:_0x112de4[_0x4715('0xa')][_0x4715('0x5')];this[_0x4715('0xb')]=this[_0x4715('0x9')]?util[_0x4715('0xc')](_0x4715('0xd'),this[_0x4715('0x9')]):_0x1c9ad9||undefined;this[_0x4715('0xe')]=checkNameSurname(_0x112de4['Contact']['phone'],_0x112de4[_0x4715('0xf')]['firstName'],_0x112de4[_0x4715('0xf')]['lastName']);this[_0x4715('0x10')]=_0x112de4[_0x4715('0x10')]||![];this[_0x4715('0x11')]=_0x112de4['Contact']['phone'];this[_0x4715('0x12')]=_0x112de4[_0x4715('0x12')];this[_0x4715('0x13')]=_0x112de4[_0x4715('0x13')]||0x0;this[_0x4715('0x14')]=_0x112de4['countcongestionretry']||0x0;this[_0x4715('0x15')]=_0x112de4[_0x4715('0x15')]||0x0;this[_0x4715('0x16')]=(_0x112de4[_0x4715('0x13')]||0x0)+(_0x112de4[_0x4715('0x14')]||0x0)+(_0x112de4[_0x4715('0x15')]||0x0)+(_0x112de4['countnosuchnumberretry']||0x0)+(_0x112de4['countdropretry']||0x0)+(_0x112de4['countabandonedretry']||0x0)+(_0x112de4[_0x4715('0x17')]||0x0)+(_0x112de4[_0x4715('0x18')]||0x0);this['countnosuchnumberretry']=_0x112de4['countnosuchnumberretry']||0x0;this[_0x4715('0x19')]=_0x112de4['countdropretry']||0x0;this[_0x4715('0x1a')]=_0x112de4[_0x4715('0x1a')]||0x0;this[_0x4715('0x17')]=_0x112de4[_0x4715('0x17')]||0x0;this[_0x4715('0x18')]=_0x112de4[_0x4715('0x18')]||0x0;this[_0x4715('0x1b')]=_0x112de4[_0x4715('0x1b')];this[_0x4715('0x1c')]=_0x112de4[_0x4715('0x1c')];this[_0x4715('0x1d')]=_0x112de4[_0x4715('0x1d')];this[_0x4715('0x1e')]=_0x112de4['recallme'];this[_0x4715('0x1f')]=_0x112de4[_0x4715('0x1f')];this[_0x4715('0x20')]=_0x112de4['ListId'];this[_0x4715('0x21')]=_[_0x4715('0x1')](_0x112de4[_0x4715('0xa')])?_0x112de4['UserId']:_0x112de4[_0x4715('0xa')]['id'];this['VoiceQueueId']=_0x112de4['VoiceQueueId'];this[_0x4715('0x22')]='';this['originatecalleridname']='';}Action['prototype'][_0x4715('0x23')]=function(){return util['format'](_0x4715('0x24'),this[_0x4715('0xe')],this[_0x4715('0x25')]);};module[_0x4715('0x26')]=Action; \ No newline at end of file +var _0x455e=['callbackat','recallme','ContactId','ListId','UserId','Agent','VoiceQueueId','originatecalleridnum','originatecalleridname','getCaller','\x22%s\x22\x20<%s>','calleridname','number','exports','moment','isNil','string','idContact','name','type','campaigntype','queue','dialAnswer','membername','channelAgent','SIP/%s','phone','Contact','firstName','lastName','active','scheduledat','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','countabandonedretry','countmachineretry','countagentrejectretry','countdropretry','callback','callbackuniqueid'];(function(_0x36c5b0,_0x5001da){var _0xf19333=function(_0x1e880a){while(--_0x1e880a){_0x36c5b0['push'](_0x36c5b0['shift']());}};_0xf19333(++_0x5001da);}(_0x455e,0xb6));var _0xe455=function(_0x26cebc,_0x4fbbfa){_0x26cebc=_0x26cebc-0x0;var _0x18cf95=_0x455e[_0x26cebc];return _0x18cf95;};'use strict';var util=require('util');var _=require('lodash');var moment=require(_0xe455('0x0'));function checkNameSurname(_0x2ba399,_0x3bd50f,_0x5e1450){var _0x8edd51='';if(!_[_0xe455('0x1')](_0x3bd50f)&&_0xe455('0x2')===typeof _0x3bd50f){_0x8edd51+=_0x3bd50f;}if(!_[_0xe455('0x1')](_0x5e1450)&&_0xe455('0x2')===typeof _0x5e1450){_0x8edd51+='\x20'+_0x5e1450;}if(_0x8edd51!==''){return _0x8edd51;}return _0x2ba399;}function Action(_0x1cad3c,_0x4e9dee,_0x4f5a0f,_0x4747ab,_0x48cdb1){this['uniqueid']=_0x4f5a0f||undefined;this[_0xe455('0x3')]=_0x1cad3c['id'];this['queue']=_0x4e9dee[_0xe455('0x4')];this[_0xe455('0x5')]=_0x4e9dee['type'];this[_0xe455('0x6')]=_0xe455('0x7');this[_0xe455('0x8')]=![];this[_0xe455('0x9')]=_[_0xe455('0x1')](_0x1cad3c['Agent'])?undefined:_0x1cad3c['Agent'][_0xe455('0x4')];this[_0xe455('0xa')]=this['membername']?util['format'](_0xe455('0xb'),this[_0xe455('0x9')]):_0x4747ab||undefined;this['calleridname']=checkNameSurname(_0x1cad3c['Contact'][_0xe455('0xc')],_0x1cad3c[_0xe455('0xd')][_0xe455('0xe')],_0x1cad3c['Contact'][_0xe455('0xf')]);this[_0xe455('0x10')]=_0x1cad3c['active']||![];this['calleridnum']=_0x1cad3c[_0xe455('0xd')][_0xe455('0xc')];this[_0xe455('0x11')]=_0x1cad3c[_0xe455('0x11')];this[_0xe455('0x12')]=_0x1cad3c[_0xe455('0x12')]||0x0;this[_0xe455('0x13')]=_0x1cad3c['countcongestionretry']||0x0;this[_0xe455('0x14')]=_0x1cad3c[_0xe455('0x14')]||0x0;this['countglobal']=(_0x1cad3c[_0xe455('0x12')]||0x0)+(_0x1cad3c[_0xe455('0x13')]||0x0)+(_0x1cad3c[_0xe455('0x14')]||0x0)+(_0x1cad3c[_0xe455('0x15')]||0x0)+(_0x1cad3c['countdropretry']||0x0)+(_0x1cad3c[_0xe455('0x16')]||0x0)+(_0x1cad3c[_0xe455('0x17')]||0x0)+(_0x1cad3c[_0xe455('0x18')]||0x0);this[_0xe455('0x15')]=_0x1cad3c[_0xe455('0x15')]||0x0;this[_0xe455('0x19')]=_0x1cad3c[_0xe455('0x19')]||0x0;this[_0xe455('0x16')]=_0x1cad3c[_0xe455('0x16')]||0x0;this[_0xe455('0x17')]=_0x1cad3c[_0xe455('0x17')]||0x0;this[_0xe455('0x18')]=_0x1cad3c['countagentrejectretry']||0x0;this[_0xe455('0x1a')]=_0x1cad3c[_0xe455('0x1a')];this['callbackuniqueid']=_0x1cad3c[_0xe455('0x1b')];this['callbackat']=_0x1cad3c[_0xe455('0x1c')];this['recallme']=_0x1cad3c[_0xe455('0x1d')];this[_0xe455('0x1e')]=_0x1cad3c['ContactId'];this['ListId']=_0x1cad3c[_0xe455('0x1f')];this[_0xe455('0x20')]=_['isNil'](_0x1cad3c['Agent'])?_0x1cad3c[_0xe455('0x20')]:_0x1cad3c[_0xe455('0x21')]['id'];this[_0xe455('0x22')]=_0x1cad3c[_0xe455('0x22')];this[_0xe455('0x23')]='';this[_0xe455('0x24')]='';}Action['prototype'][_0xe455('0x25')]=function(){return util['format'](_0xe455('0x26'),this[_0xe455('0x27')],this[_0xe455('0x28')]);};module[_0xe455('0x29')]=Action; \ No newline at end of file diff --git a/server/services/ami/preview/index.js b/server/services/ami/preview/index.js index 8fa1949..6d7c6ae 100644 --- a/server/services/ami/preview/index.js +++ b/server/services/ami/preview/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb9c1=['[HistoryRecallClose]','createCustomerFinal','catch','IsNotLoggedIn','NOT_ACTIVE','TrunkBackup','ACTIVE','countnosuchnumberretry','totalGlobal','NoSuchNumber','custom:agentnosuchnumber','buildObj','nosuchnumber','[callProgressDetectingCustomer][logNoSuch]','Global','rescheduleContact','dialNoSuchNumberRetryFrequency','unlockAgent','activeContact','linkedid','ANSWER','responsetime','answertime','[syncHangup][talking][increment]','uniqueid','\x20Queue','custom:agentconnect','connect','acw','custom:agentConnectPreview','buildAcw','custom:agentcomplete','complete','[16]','countglobal','Answer','[callProgressDetectingCustomer][logAnswerGlobal]','crateCustomerReportQueue','talktime','BUSY','countbusyretry','Busy','custom:agentbusy','busy','cloneAction','[callProgressDetectingCustomer][logBusyGlobal]','dialBusyMaxRetry','[callProgressDetectingCustomer][logBusy]','scheduledAt','NOANSWER','countnoanswerretry','custom:agentnoanswer','noanswer','[callProgressDetectingCustomer][logNoAnswer]','dialGlobalMaxRetry','dialNoAnswerMaxRetry','CONGESTION','countcongestionretry','Congestion','custom:agentcongestion','congestion','[callProgressDetectingCustomer][logCongestion]','[callProgressDetectingCustomer][logCongestionGlobal]','dialBusyRetryFrequency','CANCEL','outboundRejectCallsDay','countagentrejectretry','custom:agentreject','agentreject','[syncHangupRequest][logAgentReject]','dialAgentRejectMaxRetry','ABANDONED','outboundAbandonedCallsDay','countabandonedretry','Abandoned','[callProgressDetectingCustomer][logAbandoned]','countabandonedetry','dialAbandonedMaxRety','dialAbandonedRetryFrequency','countmachineretry','cause-txt','dialstatus','custom:amd','amd','[callProgressDetectingCustomer][hangupInAMD]','[callProgressDetectingCustomer][machine]','decrementTalkink','[Dialer][decrementTalkink][no\x20Hangup][Preview]','[callProgressDetectingCustomer][logUnknown]','[callProgressDetectingCustomer][logUnknownGlobal]','[callProgressDetectingCustomer]','[originated][decrement][callProgressDetectingCustomer]','destlinkedid','callProgressDetectingAgent','isUndefined','object','reason','logAgent','createAgentHistory','[callProgressDetectingAgent][logNoSuch]','NoAnswer','[callProgressDetectingAgent][logNoAnswer]','[callProgressDetectingAgent][logBusy]','[callProgressDetectingAgent][logCongestion]','[callProgressDetectingAgent][logAnswerAGI]','[callProgressDetectingAgent]','[originated][decrement][callProgressDetectingAgent]','checkInBlack','Contact','phone','Contact\x20is\x20undefined','lookAgent','isEmpty','Queue:\x20','idContact','custom:agentcalled','called','Calling','[Preview][execCall][failure]','Call\x20failed','createHistory','[Blacklist][error]','isTrunkReachable','active','reachable','unmonitored','execRun','unlock','unlockContact','disableContact','getContactPreview','recallme','validateContact','isValid','checkIsBlackList','[Preview][checkIsBlackList]','Call\x20unsuccessful','[Preview][getContactPreview]','[Preview][validateContact][Empty\x20Contact]','[Preview][validateContact][Empty\x20Campaign]','Empty\x20Campaign','[Preview][validateContact][Trunk\x20not\x20work]','\x20Trunk\x20is\x20not\x20active','\x20Trunk\x20Backup\x20is\x20not\x20active','Trunk\x20not\x20work','isActive','campaign\x20Name:\x20','\x20Not\x20Active','Is\x20Valid','SIP/%s/%s%s','dialCutDigit','substring','trim','callerid','dialOriginateCallerIdName','dialRandomLastDigitCallerIdNumber','getCallerIdRandom','getCallerId','originatecalleridname','extractCalleridName','extractCalleridNumber','addVariables','merge','variablesAction','[originated][increment]','OriginateError','syncNewExten','channel','actionid','logLookAgent','clone','isFailure','response','custom:agentringnoanswer','rejected','[callProgressDetectingAgent][logAnswer]','syncHangup','cause','callProgressDetectingCustomer','statedesc','dialQueueProject','transfer','variables','syncVarSet','keys','addVariable','variable','value','[syncVarSet][Preview]','inspect','transfertargetlinkedid','transfererlinkedid','exports','util','bluebird','uuid','moment','md5','ioredis','../../../config/environment','../../../config/logger','preview','../ami','./rpcDb','./util/util','redis','defaults','localhost','socket.io-emitter','prototype','enqueue','tail','sequence','campaignsPreview','voiceQueues','trunks','agents','clockClearZombieChannels','bind','hangup','hanguprequest','syncHangupRequest','dialend','syncDialEnd','varset','syncAttendedTransfer','syncBlindTransfer','loopCampaigns','emit','type','outbound','strategy','answered','available','loggedIn','pTalking','sumDuration','sumHoldTime','talking','total','unmanaged','abandoned','waiting','dialMethod','dialOriginateCallerIdNumber','dialPrefix','outboundAnswerCallsDay','outboundBlacklistCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundDropCallsDayCallersExit','outboundDropCallsDayTimeout','outboundNoSuchCallsDay','outboundOriginateFailureCallsDay','outboundUnknownCallsDay','predictiveIntervalAnsweredCalls','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','predictiveIntervalDroppedCallsTimeout','predictiveIntervalErlangCalls','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalHitRate','predictiveIntervalMultiplicativeFactor','predictiveIntervalPauses','predictiveIntervalAvailable','predictiveIntervalTotalCalls','message','erlangAbandonmentRate','startPredictive','startProgressive','Trunk','Interval','name','stringify','format','info','[DEBUG]\x20Emit\x20voice_queue_channel:remove\x20event','voice_queue_channel:remove','voice_queue_presence:remove','originated','sendMessageOneNotActive','paused','IS_DISACTIVED','logger','[CampaignPreview]\x20Campaign\x20Queue:\x20','\x20is\x20disactive','syncCampaigns','hasOwnProperty','booked','clearZombieChannels','dialActive','setMessage','recallMe','clearZombieChannel','isNil','actions','[clearZombieChannels][talking]','Queue','originated:\x20','queue','pTalking:\x20','pick','contactId','VoiceQueueId','ListId','status','No\x20such\x20channel','updateOriginated','[clearZombieChannel]','dialAnswer','[Dialer][checkChannel][pTalking][Preview]','loggerError','[action]','size','getContactRecallMe','agentReadyId','then','length','getDiff','scheduledat','dialRecallMeTimeout','Agent','voicePause','run','logger2','[RecallMe]','starttime','YYYY-MM-DD\x20HH:mm:ss','logCustomer','RecallInQueue','dialRecallInQueue','rescheduleContactInQueue','[HistoryDialRecallInQueue][historyCatch]','createCustomerHistory'];(function(_0x4cf98e,_0xba4b79){var _0x1623ac=function(_0x459bc0){while(--_0x459bc0){_0x4cf98e['push'](_0x4cf98e['shift']());}};_0x1623ac(++_0xba4b79);}(_0xb9c1,0xc1));var _0x1b9c=function(_0x301e80,_0x2d2c04){_0x301e80=_0x301e80-0x0;var _0x46a09b=_0xb9c1[_0x301e80];return _0x46a09b;};'use strict';var util=require(_0x1b9c('0x0'));var _=require('lodash');var BPromise=require(_0x1b9c('0x1'));var uuid=require(_0x1b9c('0x2'));var moment=require(_0x1b9c('0x3'));var md5=require(_0x1b9c('0x4'));var Redis=require(_0x1b9c('0x5'));var config=require(_0x1b9c('0x6'));var logger=require(_0x1b9c('0x7'))(_0x1b9c('0x8'));var loggerAction=require(_0x1b9c('0x7'))('actionPreview');var ami=require(_0x1b9c('0x9'));var rpcDb=require(_0x1b9c('0xa'));var Action=require('./action');var ut=require(_0x1b9c('0xb'));config[_0x1b9c('0xc')]=_[_0x1b9c('0xd')](config[_0x1b9c('0xc')],{'host':_0x1b9c('0xe'),'port':0x18eb});var io=require(_0x1b9c('0xf'))(new Redis(config[_0x1b9c('0xc')]));var Sequence=function(){};Sequence[_0x1b9c('0x10')][_0x1b9c('0x11')]=function(_0x58cccc){this[_0x1b9c('0x12')]=this[_0x1b9c('0x12')]?this[_0x1b9c('0x12')]['finally'](_0x58cccc):_0x58cccc();};function Preview(_0x50a8d0){this[_0x1b9c('0x13')]=new Sequence();this[_0x1b9c('0x14')]=_0x50a8d0[_0x1b9c('0x15')];this[_0x1b9c('0x16')]=_0x50a8d0[_0x1b9c('0x16')];this['actions']={};this[_0x1b9c('0x17')]=_0x50a8d0[_0x1b9c('0x17')];this[_0x1b9c('0x18')]=0x0;ami['on']('originateresponse',this['syncOriginateResponse'][_0x1b9c('0x19')](this));ami['on'](_0x1b9c('0x1a'),this['syncHangup'][_0x1b9c('0x19')](this));ami['on'](_0x1b9c('0x1b'),this[_0x1b9c('0x1c')]['bind'](this));ami['on'](_0x1b9c('0x1d'),this[_0x1b9c('0x1e')]['bind'](this));ami['on']('newexten',this['syncNewExten'][_0x1b9c('0x19')](this));ami['on'](_0x1b9c('0x1f'),this['syncVarSet'][_0x1b9c('0x19')](this));ami['on']('attendedtransfer',this[_0x1b9c('0x20')][_0x1b9c('0x19')](this));ami['on']('blindtransfer',this[_0x1b9c('0x21')]['bind'](this));this[_0x1b9c('0x22')](this['campaignsPreview']);}function emit(_0x3bf09e,_0x3e2717,_0x1881cb){io['to'](_0x3bf09e)[_0x1b9c('0x23')](_0x3e2717,_0x1881cb);}function emitCampaignPreview(_0x237385){if(_0x237385[_0x1b9c('0x24')]===_0x1b9c('0x25')){var _0x192bee={'id':_0x237385['id'],'name':_0x237385['name'],'strategy':_0x237385[_0x1b9c('0x26')],'answered':_0x237385[_0x1b9c('0x27')],'available':_0x237385[_0x1b9c('0x28')],'loggedIn':_0x237385[_0x1b9c('0x29')],'pTalking':_0x237385[_0x1b9c('0x2a')],'sumBillable':_0x237385['sumBillable'],'sumDuration':_0x237385[_0x1b9c('0x2b')],'sumHoldTime':_0x237385[_0x1b9c('0x2c')]||0x0,'talking':_0x237385[_0x1b9c('0x2d')],'total':_0x237385[_0x1b9c('0x2e')],'type':_0x237385[_0x1b9c('0x24')],'unmanaged':_0x237385[_0x1b9c('0x2f')],'abandoned':_0x237385[_0x1b9c('0x30')],'waiting':_0x237385[_0x1b9c('0x31')],'loggedInDb':_0x237385['loggedInDb'],'dialActive':_0x237385['dialActive'],'dialMethod':_0x237385[_0x1b9c('0x32')],'dialOriginateCallerIdName':_0x237385['dialOriginateCallerIdName'],'dialOriginateCallerIdNumber':_0x237385[_0x1b9c('0x33')],'dialOriginateTimeout':_0x237385['dialOriginateTimeout'],'dialPrefix':_0x237385[_0x1b9c('0x34')],'outboundAnswerAgiCallsDay':_0x237385['outboundAnswerAgiCallsDay'],'outboundAnswerCallsDay':_0x237385[_0x1b9c('0x35')],'outboundBlacklistCallsDay':_0x237385[_0x1b9c('0x36')],'outboundBusyCallsDay':_0x237385[_0x1b9c('0x37')],'outboundCongestionCallsDay':_0x237385[_0x1b9c('0x38')],'outboundDropCallsDayACS':_0x237385['outboundDropCallsDayACS'],'outboundDropCallsDayCallersExit':_0x237385[_0x1b9c('0x39')],'outboundDropCallsDayTimeout':_0x237385[_0x1b9c('0x3a')],'outboundNoAnswerCallsDay':_0x237385['outboundNoAnswerCallsDay'],'outboundNoSuchCallsDay':_0x237385[_0x1b9c('0x3b')],'outboundOriginateFailureCallsDay':_0x237385[_0x1b9c('0x3c')],'outboundReCallsDay':_0x237385['outboundReCallsDay'],'outboundRejectCallsDay':_0x237385['outboundRejectCallsDay'],'outboundUnknownCallsDay':_0x237385[_0x1b9c('0x3d')],'outboundAbandonedCallsDay':_0x237385['outboundAbandonedCallsDay'],'predictiveIntervalAnsweredCalls':_0x237385[_0x1b9c('0x3e')],'predictiveIntervalAvgHoldtime':_0x237385[_0x1b9c('0x3f')],'predictiveIntervalAvgTalktime':_0x237385[_0x1b9c('0x40')],'predictiveIntervalDroppedCallsCallersExit':_0x237385['predictiveIntervalDroppedCallsCallersExit'],'predictiveIntervalDroppedCallsTimeout':_0x237385[_0x1b9c('0x41')],'predictiveIntervalErlangCalls':_0x237385[_0x1b9c('0x42')],'predictiveIntervalErlangCallsDroppedCalls':_0x237385[_0x1b9c('0x43')],'predictiveIntervalHitRate':_0x237385[_0x1b9c('0x44')],'predictiveIntervalMultiplicativeFactor':_0x237385[_0x1b9c('0x45')],'predictiveIntervalPauses':_0x237385[_0x1b9c('0x46')],'predictiveIntervalAvailable':_0x237385[_0x1b9c('0x47')],'predictiveIntervalTotalCalls':_0x237385[_0x1b9c('0x48')],'message':_0x237385[_0x1b9c('0x49')],'originated':_0x237385['originated'],'erlangCalls':_0x237385['erlangCalls'],'erlangCallToSecond':_0x237385['erlangCallToSecond'],'erlangAbandonmentRate':_0x237385[_0x1b9c('0x4a')],'erlangBusyFactor':_0x237385['erlangBusyFactor'],'startPredictive':_0x237385[_0x1b9c('0x4b')],'startProgressive':_0x237385[_0x1b9c('0x4c')]};if(_0x237385[_0x1b9c('0x4d')]){_0x192bee[_0x1b9c('0x4d')]={'id':_0x237385[_0x1b9c('0x4d')]['id'],'name':_0x237385[_0x1b9c('0x4d')]['name'],'active':_0x237385[_0x1b9c('0x4d')]['active'],'callerid':_0x237385[_0x1b9c('0x4d')]['callerid']};}if(_0x237385[_0x1b9c('0x4e')]){_0x192bee[_0x1b9c('0x4e')]={'id':_0x237385[_0x1b9c('0x4e')]['id'],'name':_0x237385[_0x1b9c('0x4e')][_0x1b9c('0x4f')]};}var _0xb3280f=md5(JSON[_0x1b9c('0x50')](_0x192bee));if(_0x237385[_0x1b9c('0x4')]!==_0xb3280f){_0x237385[_0x1b9c('0x4')]=_0xb3280f;emit(util[_0x1b9c('0x51')]('voice:queue:%s',_0x192bee[_0x1b9c('0x4f')]),'voice_queue:save',_0x192bee);}}}function emitVoiceQueueChannelRemove(_0x1e6205){logger[_0x1b9c('0x52')](_0x1b9c('0x53'),JSON[_0x1b9c('0x50')](_0x1e6205));emit(util[_0x1b9c('0x51')]('voice:queue:%s',_0x1e6205['name']),_0x1b9c('0x54'),_0x1e6205);io[_0x1b9c('0x23')](_0x1b9c('0x55'),_0x1e6205);}function notSendMessagesQueue(_0xfc03da){if(_0xfc03da['sendMessageOneNotActive']){if(_0xfc03da[_0x1b9c('0x56')]===0x0&&_0xfc03da[_0x1b9c('0x2a')]===0x0){_0xfc03da[_0x1b9c('0x57')]=![];_0xfc03da['available']=0x0;_0xfc03da[_0x1b9c('0x58')]=0x0;_0xfc03da[_0x1b9c('0x49')]='NOT_ACTIVE';ut['logger']('[CampaignPreview]\x20Campaign\x20Queue:\x20',_0xfc03da[_0x1b9c('0x4f')]+'\x20is\x20not\x20active');}else{_0xfc03da[_0x1b9c('0x49')]=_0x1b9c('0x59');ut[_0x1b9c('0x5a')](_0x1b9c('0x5b'),_0xfc03da[_0x1b9c('0x4f')]+_0x1b9c('0x5c'));}emitCampaignPreview(_0xfc03da);}}Preview['prototype']['loopCampaigns']=function(){var _0x456a22=this;setInterval(function(){_0x456a22['syncCampaigns']();},0x7cf);};Preview[_0x1b9c('0x10')][_0x1b9c('0x5d')]=function(){var _0x814db8=this[_0x1b9c('0x14')];this[_0x1b9c('0x18')]+=0x1;for(var _0x5d9920 in _0x814db8){if(_0x814db8[_0x1b9c('0x5e')](_0x5d9920)&&(_0x814db8[_0x5d9920][_0x1b9c('0x32')]===_0x1b9c('0x8')||_0x814db8[_0x5d9920][_0x1b9c('0x32')]===_0x1b9c('0x5f'))&&_0x814db8[_0x5d9920]['type']===_0x1b9c('0x25')){if(this['clockClearZombieChannels']>0x7){this[_0x1b9c('0x18')]=0x0;this[_0x1b9c('0x60')]();}}if(_0x814db8[_0x1b9c('0x5e')](_0x5d9920)&&_0x814db8[_0x5d9920]['dialMethod']===_0x1b9c('0x8')&&_0x814db8[_0x5d9920][_0x1b9c('0x24')]===_0x1b9c('0x25')){if(_0x814db8[_0x5d9920][_0x1b9c('0x61')]){this[_0x1b9c('0x62')](_0x814db8[_0x5d9920]);this[_0x1b9c('0x63')](_0x814db8[_0x5d9920]);}else{notSendMessagesQueue(_0x814db8[_0x5d9920]);}}}};Preview[_0x1b9c('0x10')][_0x1b9c('0x64')]=function(_0x1e4039){var _0x27f192=this;this[_0x1b9c('0x13')]['enqueue'](function(){if(!_[_0x1b9c('0x65')](_0x27f192[_0x1b9c('0x66')][_0x1e4039])){loggerAction['info'](_0x1b9c('0x67'),_0x1e4039,_0x1b9c('0x68'),_0x27f192['actions'][_0x1e4039]['queue'],_0x1b9c('0x69'),JSON['stringify'](_0x27f192[_0x1b9c('0x14')][_0x27f192[_0x1b9c('0x66')][_0x1e4039][_0x1b9c('0x6a')]][_0x1b9c('0x56')]),_0x1b9c('0x6b'),JSON[_0x1b9c('0x50')](_0x27f192[_0x1b9c('0x14')][_0x27f192[_0x1b9c('0x66')][_0x1e4039]['queue']][_0x1b9c('0x2a')]),JSON[_0x1b9c('0x50')](_0x27f192[_0x1b9c('0x66')][_0x1e4039]['dialAnswer']),JSON['stringify'](_[_0x1b9c('0x6c')](_0x27f192[_0x1b9c('0x66')][_0x1e4039],[_0x1b9c('0x6d'),'UserId',_0x1b9c('0x6e'),_0x1b9c('0x6f')])));return ami['Action']({'action':_0x1b9c('0x70'),'channel':_0x27f192[_0x1b9c('0x66')][_0x1e4039]['channel']})['catch'](function(_0x1da8de){if(_0x1da8de['message']===_0x1b9c('0x71')){setTimeout(function(){if(_0x27f192['actions'][_0x1e4039]){ut[_0x1b9c('0x72')](_0x27f192[_0x1b9c('0x14')][_0x27f192['actions'][_0x1e4039][_0x1b9c('0x6a')]],_0x1b9c('0x73'));if(_0x27f192[_0x1b9c('0x66')][_0x1e4039][_0x1b9c('0x74')]===!![]){ut['decrementTalkink'](_0x27f192[_0x1b9c('0x14')][_0x27f192[_0x1b9c('0x66')][_0x1e4039]['queue']],_0x1b9c('0x73'));ut['loggerError'](_0x1b9c('0x75')+_0x1e4039,_0x27f192[_0x1b9c('0x66')][_0x1e4039][_0x1b9c('0x6a')]);}ut[_0x1b9c('0x76')]('[Dialer][checkChannel][Preview]'+_0x1e4039,_0x27f192[_0x1b9c('0x66')][_0x1e4039][_0x1b9c('0x6a')]);delete _0x27f192[_0x1b9c('0x66')][_0x1e4039];}},0x2328);}});}});};Preview['prototype'][_0x1b9c('0x60')]=function(){var _0x3ad9ee=this;loggerAction[_0x1b9c('0x52')](_0x1b9c('0x77'),_[_0x1b9c('0x78')](this[_0x1b9c('0x66')]));for(var _0x5e6048 in this[_0x1b9c('0x66')]){if(_0x3ad9ee['actions'][_0x1b9c('0x5e')](_0x5e6048)){_0x3ad9ee[_0x1b9c('0x64')](_0x5e6048);}}};Preview[_0x1b9c('0x10')]['recallMe']=function(_0x164c11){var _0xeda621=this;rpcDb[_0x1b9c('0x79')](_0x164c11['id'],ut[_0x1b9c('0x7a')](this[_0x1b9c('0x17')]))[_0x1b9c('0x7b')](function(_0x257b66){if(!_[_0x1b9c('0x65')](_0x257b66)){for(var _0x46b308=0x0;_0x46b308<_0x257b66[_0x1b9c('0x7c')];_0x46b308+=0x1){if(ut[_0x1b9c('0x7d')](_0x257b66[_0x46b308][_0x1b9c('0x7e')])<_0x164c11[_0x1b9c('0x7f')]*0x3c){if(_0x257b66[_0x46b308][_0x1b9c('0x80')]&&!_0x257b66[_0x46b308][_0x1b9c('0x80')][_0x1b9c('0x81')]){_0xeda621[_0x1b9c('0x82')](_0x257b66[_0x46b308]['id'])[_0x1b9c('0x7b')](ut[_0x1b9c('0x83')]('[RecallMe]'))['catch'](ut['logger2'](_0x1b9c('0x84')));}else{rpcDb['disableContact'](_0x257b66[_0x46b308]['id']);}}else{var _0x154b88=new Action(_0x257b66[_0x46b308],_0x164c11);_0x154b88[_0x1b9c('0x85')]=moment()[_0x1b9c('0x51')](_0x1b9c('0x86'));_0x164c11['outboundReCallsDay']+=0x1;ut[_0x1b9c('0x87')](_0x154b88,0x17,_0x1b9c('0x88'));if(_0x164c11[_0x1b9c('0x89')]){rpcDb[_0x1b9c('0x8a')](ut['createBody'](_0x257b66[_0x46b308]));rpcDb['createCustomerHistory'](_0x154b88,_0x1b9c('0x8b'));}else{ut[_0x1b9c('0x87')](_0x154b88,0x16,'RecallFailedTimeout');rpcDb[_0x1b9c('0x8c')](_0x154b88,_0x1b9c('0x8d'));rpcDb[_0x1b9c('0x8e')](_0x154b88,_0x1b9c('0x8d'));}}}}})[_0x1b9c('0x8f')](ut[_0x1b9c('0x83')]('[getContactRecallMe]'));};Preview[_0x1b9c('0x10')][_0x1b9c('0x62')]=function(_0x1953db){_0x1953db['sendMessageOneNotActive']=!![];if(ut[_0x1b9c('0x90')](_0x1953db[_0x1b9c('0x29')])){_0x1953db[_0x1b9c('0x49')]='AGENTS_NOT_LOGGED';}else if(!ut['isActive'](_0x1953db['dialActive'])){_0x1953db[_0x1b9c('0x49')]=_0x1b9c('0x91');}else if(!this['isTrunkReachable'](_0x1953db[_0x1b9c('0x4d')])){if(!this['isTrunkReachable'](_0x1953db[_0x1b9c('0x92')])){_0x1953db[_0x1b9c('0x49')]='TRUNK_IS_NOT_REACHABLE';}else{_0x1953db[_0x1b9c('0x49')]=_0x1b9c('0x93');}}else{_0x1953db[_0x1b9c('0x49')]='ACTIVE';}emitCampaignPreview(_0x1953db);};Preview[_0x1b9c('0x10')]['callProgressDetectingCustomer']=function(_0x362baf,_0x57568f,_0x2665e5){var _0x127da3=this;var _0x2db235=this[_0x1b9c('0x66')][_0x57568f];var _0x181843=this['campaignsPreview'][_0x2db235[_0x1b9c('0x6a')]];var _0x4b0704;if(_0x181843){switch(_0x2665e5){case'1':_0x181843['outboundNoSuchCallsDay']+=0x1;_0x2db235[_0x1b9c('0x94')]+=0x1;_0x2db235['countglobal']=ut[_0x1b9c('0x95')](_0x2db235);ut[_0x1b9c('0x87')](_0x2db235,0x0,_0x1b9c('0x96'));ami[_0x1b9c('0x23')](_0x1b9c('0x97'),ut[_0x1b9c('0x98')](_0x2db235,_0x1b9c('0x99')));rpcDb[_0x1b9c('0x8c')](_0x2db235,_0x1b9c('0x9a'));if(ut[_0x1b9c('0x95')](_0x2db235)>=_0x181843['dialGlobalMaxRetry']){_0x4b0704=ut['cloneAction'](_0x2db235,0xf,_0x1b9c('0x9b'));rpcDb[_0x1b9c('0x8e')](_0x4b0704,'[callProgressDetectingCustomer][logNoSuchGlobal]');}else{if(_0x2db235[_0x1b9c('0x94')]>=_0x181843['dialNoSuchNumberMaxRetry']){rpcDb[_0x1b9c('0x8e')](_0x2db235,'[callProgressDetectingCustomer][logNoSuchGlobal]');}else{rpcDb[_0x1b9c('0x9c')](ut['scheduledAt'](_0x2db235,_0x1b9c('0x94'),_0x181843[_0x1b9c('0x9d')]),_0x2db235[_0x1b9c('0x9e')],_0x2db235[_0x1b9c('0x9f')]);}}delete this[_0x1b9c('0x66')][_0x362baf[_0x1b9c('0xa0')]];break;case _0x1b9c('0xa1'):var _0x228a66=moment()[_0x1b9c('0x51')](_0x1b9c('0x86'));_0x2db235[_0x1b9c('0xa2')]=_0x228a66;_0x2db235[_0x1b9c('0xa3')]=_0x228a66;_0x2db235[_0x1b9c('0x74')]=!![];_0x181843[_0x1b9c('0x2a')]+=0x1;logger[_0x1b9c('0x52')](_0x1b9c('0xa4'),_0x2db235[_0x1b9c('0xa5')],_0x1b9c('0xa6'),_0x181843['name'],_0x1b9c('0x6b'),_0x181843[_0x1b9c('0x2a')]);ami[_0x1b9c('0x23')](_0x1b9c('0xa7'),ut[_0x1b9c('0x98')](_0x2db235,_0x1b9c('0xa8'),this[_0x1b9c('0x14')][_0x2db235['queue']]));if(_0x181843[_0x1b9c('0xa9')]){ami['emit'](_0x1b9c('0xaa'),ut[_0x1b9c('0xab')](_0x2db235));}break;case'16':ami[_0x1b9c('0x23')](_0x1b9c('0xac'),ut[_0x1b9c('0x98')](_0x2db235,'complete',this['campaignsPreview'][_0x2db235['queue']]));emitVoiceQueueChannelRemove(ut[_0x1b9c('0x98')](_0x2db235,_0x1b9c('0xad')));_0x181843[_0x1b9c('0x35')]+=0x1;_0x181843[_0x1b9c('0x2e')]+=0x1;_0x181843[_0x1b9c('0x27')]+=0x1;ut['decrementTalkink'](_0x181843,_0x1b9c('0xae'));_0x2db235[_0x1b9c('0xaf')]=ut[_0x1b9c('0x95')](_0x2db235);ut[_0x1b9c('0x87')](_0x2db235,0x4,_0x1b9c('0xb0'));rpcDb[_0x1b9c('0x8c')](_0x2db235,'[callProgressDetectingCustomer][logAnswer]');rpcDb[_0x1b9c('0x8e')](_0x2db235,_0x1b9c('0xb1'));rpcDb[_0x1b9c('0xb2')](_0x2db235);_0x181843[_0x1b9c('0x2b')]+=_0x2db235[_0x1b9c('0xb3')];_0x181843['sumBillable']+=_0x2db235[_0x1b9c('0xb3')];logger[_0x1b9c('0x52')]('[syncHangup][talking][decrement]',_0x2db235['uniqueid'],_0x1b9c('0xa6'),_0x181843[_0x1b9c('0x4f')],'pTalking:\x20',_0x181843[_0x1b9c('0x2a')]);delete this[_0x1b9c('0x66')][_0x362baf[_0x1b9c('0xa0')]];break;case _0x1b9c('0xb4'):_0x181843[_0x1b9c('0x37')]+=0x1;_0x2db235[_0x1b9c('0xb5')]+=0x1;_0x2db235[_0x1b9c('0xaf')]=ut[_0x1b9c('0x95')](_0x2db235);ut[_0x1b9c('0x87')](_0x2db235,0x5,_0x1b9c('0xb6'));ami['emit'](_0x1b9c('0xb7'),ut[_0x1b9c('0x98')](_0x2db235,_0x1b9c('0xb8')));rpcDb[_0x1b9c('0x8c')](_0x2db235,'[callProgressDetectingCustomer][logBusy]');if(ut[_0x1b9c('0x95')](_0x2db235)>=_0x181843['dialGlobalMaxRetry']){_0x4b0704=ut[_0x1b9c('0xb9')](_0x2db235,0xf,_0x1b9c('0x9b'));rpcDb[_0x1b9c('0x8e')](_0x4b0704,_0x1b9c('0xba'));}else{if(_0x2db235['countbusyretry']>=_0x181843[_0x1b9c('0xbb')]){rpcDb[_0x1b9c('0x8e')](_0x2db235,_0x1b9c('0xbc'));}else{rpcDb[_0x1b9c('0x9c')](ut[_0x1b9c('0xbd')](_0x2db235,_0x1b9c('0xb5'),_0x181843['dialBusyRetryFrequency']),_0x2db235['unlockAgent'],_0x2db235['activeContact']);}}break;case _0x1b9c('0xbe'):_0x181843['outboundNoAnswerCallsDay']+=0x1;_0x2db235[_0x1b9c('0xbf')]+=0x1;_0x2db235[_0x1b9c('0xaf')]=ut['totalGlobal'](_0x2db235);ut[_0x1b9c('0x87')](_0x2db235,0x3,'NoAnswer');ami[_0x1b9c('0x23')](_0x1b9c('0xc0'),ut[_0x1b9c('0x98')](_0x2db235,_0x1b9c('0xc1')));rpcDb[_0x1b9c('0x8c')](_0x2db235,_0x1b9c('0xc2'));if(ut[_0x1b9c('0x95')](_0x2db235)>=_0x181843[_0x1b9c('0xc3')]){_0x4b0704=ut[_0x1b9c('0xb9')](_0x2db235,0xf,'Global');rpcDb[_0x1b9c('0x8e')](_0x4b0704,'[callProgressDetectingCustomer][logNoAnswerGlobal]');}else{if(_0x2db235[_0x1b9c('0xbf')]>=_0x181843[_0x1b9c('0xc4')]){rpcDb[_0x1b9c('0x8e')](_0x2db235,'[callProgressDetectingCustomer][logNoAnswer]');}else{rpcDb[_0x1b9c('0x9c')](ut[_0x1b9c('0xbd')](_0x2db235,_0x1b9c('0xbf'),_0x181843['dialNoAnswerRetryFrequency']),_0x2db235['unlockAgent'],_0x2db235[_0x1b9c('0x9f')]);}}break;case _0x1b9c('0xc5'):_0x181843[_0x1b9c('0x38')]+=0x1;_0x2db235[_0x1b9c('0xc6')]+=0x1;_0x2db235[_0x1b9c('0xaf')]=ut['totalGlobal'](_0x2db235);ut[_0x1b9c('0x87')](_0x2db235,0x8,_0x1b9c('0xc7'));ami[_0x1b9c('0x23')](_0x1b9c('0xc8'),ut[_0x1b9c('0x98')](_0x2db235,_0x1b9c('0xc9')));rpcDb[_0x1b9c('0x8c')](_0x2db235,_0x1b9c('0xca'));if(ut[_0x1b9c('0x95')](_0x2db235)>=_0x181843[_0x1b9c('0xc3')]){_0x4b0704=ut[_0x1b9c('0xb9')](_0x2db235,0xf,_0x1b9c('0x9b'));rpcDb['createCustomerFinal'](_0x4b0704,_0x1b9c('0xcb'));}else{if(_0x2db235[_0x1b9c('0xc6')]>=_0x181843['dialCongestionMaxRetry']){rpcDb[_0x1b9c('0x8e')](_0x2db235,_0x1b9c('0xca'));}else{rpcDb[_0x1b9c('0x9c')](ut[_0x1b9c('0xbd')](_0x2db235,_0x1b9c('0xc6'),_0x181843[_0x1b9c('0xcc')]),_0x2db235[_0x1b9c('0x9e')],_0x2db235['activeContact']);}}break;case _0x1b9c('0xcd'):_0x181843[_0x1b9c('0xce')]+=0x1;_0x2db235[_0x1b9c('0xcf')]+=0x1;_0x2db235['countglobal']=ut[_0x1b9c('0x95')](_0x2db235);ut['logCustomer'](_0x2db235,0x14,'AgentReject');ami[_0x1b9c('0x23')](_0x1b9c('0xd0'),ut[_0x1b9c('0x98')](_0x2db235,_0x1b9c('0xd1')));rpcDb[_0x1b9c('0x8c')](_0x2db235,_0x1b9c('0xd2'));if(ut[_0x1b9c('0x95')](_0x2db235)>=_0x181843[_0x1b9c('0xc3')]){_0x4b0704=ut['cloneAction'](_0x2db235,0x14,'AgentReject');rpcDb[_0x1b9c('0x8e')](_0x4b0704,'[callProgressDetectingCustomer][logAgentReject]');}else{if(_0x2db235[_0x1b9c('0xcf')]>=_0x181843[_0x1b9c('0xd3')]){rpcDb[_0x1b9c('0x8e')](_0x2db235,'[callProgressDetectingCustomer][logAgentReject]');}else{rpcDb['rescheduleContact'](ut['scheduledAt'](_0x2db235,_0x1b9c('0xcf'),_0x181843['dialAgentRejectRetryFrequency']),_0x2db235['unlockAgent'],_0x2db235[_0x1b9c('0x9f')]);}}break;case _0x1b9c('0xd4'):_0x181843[_0x1b9c('0xd5')]+=0x1;_0x2db235[_0x1b9c('0xd6')]+=0x1;_0x2db235[_0x1b9c('0xaf')]=ut[_0x1b9c('0x95')](_0x2db235);ut[_0x1b9c('0x87')](_0x2db235,0xb,_0x1b9c('0xd7'));rpcDb[_0x1b9c('0x8c')](_0x2db235,_0x1b9c('0xd8'));if(ut[_0x1b9c('0x95')](_0x2db235)>=_0x181843[_0x1b9c('0xc3')]){_0x4b0704=ut[_0x1b9c('0xb9')](_0x2db235,0xf,_0x1b9c('0x9b'));rpcDb[_0x1b9c('0x8e')](_0x4b0704,_0x1b9c('0xd8'));}else{if(_0x2db235[_0x1b9c('0xd9')]>=_0x181843[_0x1b9c('0xda')]){rpcDb['createCustomerFinal'](_0x2db235,_0x1b9c('0xd8'));}else{rpcDb[_0x1b9c('0x9c')](ut[_0x1b9c('0xbd')](_0x2db235,_0x1b9c('0xd6'),_0x181843[_0x1b9c('0xdb')]),_0x2db235[_0x1b9c('0x9e')],_0x2db235[_0x1b9c('0x9f')]);}}break;case'18':_0x181843[_0x1b9c('0x3d')]+=0x1;_0x2db235[_0x1b9c('0xdc')]+=0x1;_0x2db235[_0x1b9c('0xaf')]=ut[_0x1b9c('0x95')](_0x2db235);ut[_0x1b9c('0x87')](_0x2db235,0x12,_0x362baf[_0x1b9c('0xdd')]||_0x362baf[_0x1b9c('0xde')]);ami[_0x1b9c('0x23')](_0x1b9c('0xdf'),ut['buildObj'](_0x2db235,_0x1b9c('0xe0')));rpcDb[_0x1b9c('0x8c')](_0x2db235,'[callProgressDetectingCustomer][hangupInAMD]');if(ut['totalGlobal'](_0x2db235)>=_0x181843[_0x1b9c('0xc3')]){_0x4b0704=ut[_0x1b9c('0xb9')](_0x2db235,0xf,_0x1b9c('0x9b'));rpcDb[_0x1b9c('0x8e')](_0x4b0704,'[callProgressDetectingCustomer][hangupInAMD]');}else{rpcDb[_0x1b9c('0x8e')](_0x2db235,_0x1b9c('0xe1'));}delete this['actions'][_0x362baf['linkedid']];break;case'19':_0x181843[_0x1b9c('0x3d')]+=0x1;_0x2db235[_0x1b9c('0xaf')]=ut[_0x1b9c('0x95')](_0x2db235);ut[_0x1b9c('0x87')](_0x2db235,0x13,_0x362baf[_0x1b9c('0xdd')]||_0x362baf[_0x1b9c('0xde')]);ami['emit'](_0x1b9c('0xdf'),ut['buildObj'](_0x2db235,_0x1b9c('0xe0')));rpcDb[_0x1b9c('0x8c')](_0x2db235,'[callProgressDetectingCustomer][machine]');if(ut[_0x1b9c('0x95')](_0x2db235)>=_0x181843[_0x1b9c('0xc3')]){_0x4b0704=ut['cloneAction'](_0x2db235,0xf,_0x1b9c('0x9b'));rpcDb[_0x1b9c('0x8e')](_0x4b0704,_0x1b9c('0xe2'));}else{rpcDb[_0x1b9c('0x8e')](_0x2db235,'[callProgressDetectingCustomer][machine]');}delete this[_0x1b9c('0x66')][_0x362baf[_0x1b9c('0xa0')]];break;default:if(_0x2db235[_0x1b9c('0x74')]){ut[_0x1b9c('0xe3')](_0x181843,'[default]');ut[_0x1b9c('0x76')](_0x1b9c('0xe4')+_0x181843[_0x1b9c('0x4f')],_0x362baf);}_0x181843[_0x1b9c('0x3d')]+=0x1;_0x2db235[_0x1b9c('0xaf')]=ut[_0x1b9c('0x95')](_0x2db235);ut['logCustomer'](_0x2db235,0xc,_0x362baf['cause-txt']||_0x362baf[_0x1b9c('0xde')]);rpcDb['createCustomerHistory'](_0x2db235,_0x1b9c('0xe5'));if(ut[_0x1b9c('0x95')](_0x2db235)>=_0x181843['dialGlobalMaxRetry']){_0x4b0704=ut[_0x1b9c('0xb9')](_0x2db235,0xf,_0x1b9c('0x9b'));rpcDb[_0x1b9c('0x8e')](_0x4b0704,_0x1b9c('0xe6'));}else{rpcDb[_0x1b9c('0x8e')](_0x2db235,'[callProgressDetectingCustomer][logUnknownGlobal]');}delete this[_0x1b9c('0x66')][_0x362baf[_0x1b9c('0xa0')]];}if(!(_0x2db235[_0x1b9c('0x74')]&&_0x2665e5==='16')){ut[_0x1b9c('0x72')](_0x181843,_0x1b9c('0xe7'));logger[_0x1b9c('0x52')](_0x1b9c('0xe8'),_0x2db235[_0x1b9c('0xa5')],_0x1b9c('0xa6'),_0x181843[_0x1b9c('0x4f')],'originated:\x20',_0x181843[_0x1b9c('0x56')]);}if(_0x2665e5!==_0x1b9c('0xa1')){delete this[_0x1b9c('0x66')][_0x362baf[_0x1b9c('0xa0')]];delete this[_0x1b9c('0x66')][_0x362baf[_0x1b9c('0xe9')]];}}};Preview[_0x1b9c('0x10')][_0x1b9c('0xea')]=function(_0x305a33,_0x4f319b,_0x40d42c){if(_[_0x1b9c('0xeb')](_0x4f319b)&&_0x1b9c('0xec')!==typeof _0x4f319b){return;}if(_[_0x1b9c('0xeb')](_0x40d42c)&&_0x1b9c('0xec')!==typeof _0x40d42c){return;}switch(_0x40d42c[_0x1b9c('0xed')]){case'0':ut[_0x1b9c('0xee')](_0x305a33,0x0,'NoSuchNumber');rpcDb[_0x1b9c('0xef')](_0x305a33,_0x1b9c('0xf0'));break;case'3':ut[_0x1b9c('0xee')](_0x305a33,0x3,_0x1b9c('0xf1'));rpcDb[_0x1b9c('0xef')](_0x305a33,_0x1b9c('0xf2'));break;case'5':ut[_0x1b9c('0xee')](_0x305a33,0x5,_0x1b9c('0xb6'));rpcDb[_0x1b9c('0xef')](_0x305a33,_0x1b9c('0xf3'));break;case'8':ut[_0x1b9c('0xee')](_0x305a33,0x8,_0x1b9c('0xc7'));rpcDb[_0x1b9c('0xef')](_0x305a33,_0x1b9c('0xf4'));break;case'22':ut[_0x1b9c('0xee')](_0x305a33,0x16,'AnswerAGI');rpcDb[_0x1b9c('0xef')](_0x305a33,_0x1b9c('0xf5'));break;default:ut['logAgent'](_0x305a33,0xc,_0x40d42c[_0x1b9c('0xed')]);rpcDb[_0x1b9c('0xef')](_0x305a33,_0x1b9c('0xf4'));}ut[_0x1b9c('0x72')](_0x4f319b,_0x1b9c('0xf6'));logger[_0x1b9c('0x52')](_0x1b9c('0xf7'),_0x305a33[_0x1b9c('0xa5')],_0x1b9c('0xa6'),_0x4f319b[_0x1b9c('0x4f')],_0x1b9c('0x69'),_0x4f319b[_0x1b9c('0x56')]);delete this['actions'][_0x305a33['uniqueid']];};Preview[_0x1b9c('0x10')][_0x1b9c('0xf8')]=function(_0x374360,_0x36e080,_0x5b5447,_0x3041ce,_0x18fc93){var _0x70a44=this;return new BPromise(function(_0x2a172e,_0xec5551){if(_['isNil'](_0x36e080)||_[_0x1b9c('0x65')](_0x36e080[_0x1b9c('0xf9')])||_[_0x1b9c('0x65')](_0x36e080[_0x1b9c('0xf9')][_0x1b9c('0xfa')])||_[_0x1b9c('0x65')](_0x36e080[_0x1b9c('0x6e')])){_0xec5551(ut[_0x1b9c('0x49')](_0x1b9c('0xfb'),_0x3041ce,_0x18fc93));return;}var _0x24ead9=uuid['v4']();var _0x1dfe7c=_0x70a44[_0x1b9c('0x14')][_0x36e080[_0x1b9c('0x68')][_0x1b9c('0x4f')]];var _0x407025=_0x5b5447?_0x70a44[_0x1b9c('0x17')][_0x5b5447]['id']:undefined;_0x70a44[_0x1b9c('0x66')][_0x24ead9]=new Action(_0x36e080,_0x1dfe7c,_0x24ead9,_0x5b5447,_0x407025);var _0x44584c=_0x70a44[_0x1b9c('0x66')][_0x24ead9];_0x44584c[_0x1b9c('0x9e')]=_0x3041ce;_0x44584c[_0x1b9c('0x9f')]=_0x18fc93;_0x44584c[_0x1b9c('0xfc')]=_0x5b5447;if(_[_0x1b9c('0xfd')](_0x374360)){_0x70a44['execCall'](_0x44584c,_0x1dfe7c,_0x36e080,_0x5b5447)['then'](function(_0x3da085){logger[_0x1b9c('0x52')]('[Preview][execCall][success]',_0x1b9c('0xfe')+_0x44584c[_0x1b9c('0x6a')]+'\x20IdHopper:\x20'+_0x44584c[_0x1b9c('0xff')],JSON[_0x1b9c('0x50')](_0x3da085));ami[_0x1b9c('0x23')](_0x1b9c('0x100'),ut[_0x1b9c('0x98')](_0x44584c,_0x1b9c('0x101'),_0x70a44['campaignsPreview'][_0x44584c[_0x1b9c('0x6a')]]));_0x2a172e(ut[_0x1b9c('0x49')](_0x1b9c('0x102')));})[_0x1b9c('0x8f')](function(_0x9ac1c7){ut[_0x1b9c('0x5a')](_0x1b9c('0x103'),_0x9ac1c7);_0xec5551(ut[_0x1b9c('0x49')](_0x1b9c('0x104'),_0x3041ce,_0x18fc93));});}else{_0x1dfe7c[_0x1b9c('0x36')]+=0x1;ut['logBlacklist'](_0x44584c);rpcDb[_0x1b9c('0x105')](_0x44584c,_0x1b9c('0x106'));delete _0x70a44[_0x1b9c('0x66')][_0x24ead9];_0xec5551(ut['message']('Contact\x20in\x20black\x20List',_0x3041ce,_0x18fc93));}});};Preview[_0x1b9c('0x10')][_0x1b9c('0x107')]=function(_0x4f3cb7){return!_[_0x1b9c('0x65')](_0x4f3cb7)&&!_[_0x1b9c('0x65')](_0x4f3cb7[_0x1b9c('0x4f')])&&!_['isNil'](_0x4f3cb7[_0x1b9c('0x108')])&&_0x4f3cb7[_0x1b9c('0x108')]&&!_[_0x1b9c('0x65')](this['trunks'][util[_0x1b9c('0x51')]('SIP/%s',_0x4f3cb7[_0x1b9c('0x4f')])])&&!_[_0x1b9c('0x65')](this[_0x1b9c('0x16')][util[_0x1b9c('0x51')]('SIP/%s',_0x4f3cb7[_0x1b9c('0x4f')])]['status'])&&(this[_0x1b9c('0x16')][util[_0x1b9c('0x51')]('SIP/%s',_0x4f3cb7[_0x1b9c('0x4f')])][_0x1b9c('0x70')]===_0x1b9c('0x109')||this['trunks'][util[_0x1b9c('0x51')]('SIP/%s',_0x4f3cb7[_0x1b9c('0x4f')])][_0x1b9c('0x70')]===_0x1b9c('0x10a'));};Preview[_0x1b9c('0x10')]['run']=function(_0xff0677,_0x2d4b1f){var _0xef511b=this;return new BPromise(function(_0x22b50e,_0x20f888){_0xef511b[_0x1b9c('0x10b')](_0xff0677,_0x2d4b1f)[_0x1b9c('0x7b')](function(_0x2b4935){_0x22b50e(_[_0x1b9c('0x6c')](_0x2b4935,[_0x1b9c('0x49')]));})['catch'](function(_0x194f5c){if(_0x194f5c[_0x1b9c('0x10c')]){rpcDb[_0x1b9c('0x10d')](_0xff0677);}if(_0x194f5c[_0x1b9c('0x108')]){rpcDb[_0x1b9c('0x10e')](_0xff0677);}_0x20f888(_[_0x1b9c('0x6c')](_0x194f5c,[_0x1b9c('0x49')]));});});};Preview[_0x1b9c('0x10')][_0x1b9c('0x10b')]=function(_0x4bd92a,_0x4ad283){var _0x36b895=this;return new BPromise(function(_0x35d7e1,_0x7e2fd9){var _0x50d014,_0x46bfdc;rpcDb[_0x1b9c('0x10f')](_0x4bd92a)[_0x1b9c('0x7b')](function(_0xa7afba){if(!_[_0x1b9c('0x65')](_0xa7afba[0x0])){_0x46bfdc=_0xa7afba[0x0][_0x1b9c('0x110')]?![]:!![];_0x50d014=_0xa7afba[0x0][_0x1b9c('0x110')]?!![]:![];_0x50d014=_0x4ad283?!![]:_0x50d014;}var _0x5dc2a7=_0x36b895[_0x1b9c('0x111')](_0xa7afba);if(_0x5dc2a7[_0x1b9c('0x112')]){rpcDb[_0x1b9c('0x113')](_['pick'](_0xa7afba[0x0],[_0x1b9c('0x6e'),'Contact.phone']))[_0x1b9c('0x7b')](function(_0x5dde3a){_0x36b895[_0x1b9c('0xf8')](_0x5dde3a,_0xa7afba[0x0],_0x4ad283,_0x46bfdc,_0x50d014)[_0x1b9c('0x7b')](function(_0x3c950a){_0x35d7e1(_0x3c950a);})['catch'](function(_0x19f7b0){_0x7e2fd9(_0x19f7b0);});})[_0x1b9c('0x8f')](function(_0x5a3545){ut[_0x1b9c('0x5a')](_0x1b9c('0x114'),_0x5a3545);_0x7e2fd9(ut['message'](_0x1b9c('0x115'),_0x46bfdc,_0x50d014));});}else{_0x7e2fd9(ut[_0x1b9c('0x49')](_0x5dc2a7['message'],_0x46bfdc,_0x50d014));}})['catch'](function(_0x2a1c47){ut[_0x1b9c('0x5a')](_0x1b9c('0x116'),_0x2a1c47);_0x7e2fd9(ut['message'](_0x1b9c('0x115'),![],!![]));});});};Preview[_0x1b9c('0x10')][_0x1b9c('0x111')]=function(_0x20c931){if(_[_0x1b9c('0x65')](_0x20c931)||_[_0x1b9c('0xfd')](_0x20c931)||!_[_0x1b9c('0x65')](_0x20c931[0x0][_0x1b9c('0x80')])&&_[_0x1b9c('0x65')](_0x20c931[0x0][_0x1b9c('0x80')][_0x1b9c('0x4f')])){ut['logger'](_0x1b9c('0x117'),_0x20c931);return{'isValid':![],'message':'Empty\x20Contact'};}var _0x40371e=this[_0x1b9c('0x14')][_0x20c931[0x0][_0x1b9c('0x68')]['name']];_0x40371e[_0x1b9c('0x49')]=_0x1b9c('0x93');if(_[_0x1b9c('0x65')](_0x40371e)){ut[_0x1b9c('0x5a')](_0x1b9c('0x118'),_0x40371e);return{'isValid':![],'message':_0x1b9c('0x119')};}if(!this[_0x1b9c('0x107')](_0x40371e[_0x1b9c('0x4d')])){ut[_0x1b9c('0x5a')](_0x1b9c('0x11a'),'campaign\x20Name:\x20'+_0x40371e[_0x1b9c('0x4f')]+_0x1b9c('0x11b'));if(!this[_0x1b9c('0x107')](_0x40371e[_0x1b9c('0x92')])){ut['logger']('[Preview][validateContact][Trunk\x20not\x20work]',_0x40371e[_0x1b9c('0x4f')]+_0x1b9c('0x11c'));return{'isValid':![],'message':_0x1b9c('0x11d')};}}if(!ut[_0x1b9c('0x11e')](_0x40371e['dialActive'])){ut[_0x1b9c('0x5a')]('[Preview][validateContact][Campaign\x20Active]',_0x40371e[_0x1b9c('0x4f')]+'\x20Not\x20Active');return{'isValid':![],'message':_0x1b9c('0x11f')+_0x40371e[_0x1b9c('0x4f')]+_0x1b9c('0x120')};}return{'isValid':!![],'message':_0x1b9c('0x121')};};Preview['prototype']['execCall']=function(_0x41c472,_0x155ab7,_0xf1756f,_0x54f2ab){var _0x3aa7e9=this;return new BPromise(function(_0x5be177,_0x18891a){var _0x4870cd=_0x41c472[_0x1b9c('0xa5')];var _0x49f54b=_0x3aa7e9[_0x1b9c('0x107')](_0x155ab7[_0x1b9c('0x4d')])?util[_0x1b9c('0x51')](_0x1b9c('0x122'),_0x155ab7[_0x1b9c('0x4d')][_0x1b9c('0x4f')],_[_0x1b9c('0x65')](_0x155ab7[_0x1b9c('0x34')])?'':_0x155ab7[_0x1b9c('0x34')]['trim']()||'',_0x155ab7[_0x1b9c('0x123')]>0x0?_0xf1756f[_0x1b9c('0xf9')][_0x1b9c('0xfa')][_0x1b9c('0x124')](_0x155ab7['dialCutDigit']):_0xf1756f[_0x1b9c('0xf9')][_0x1b9c('0xfa')]):util['format']('SIP/%s/%s%s',_['isNil'](_0x155ab7[_0x1b9c('0x92')])?_0x155ab7[_0x1b9c('0x4d')][_0x1b9c('0x4f')]:_0x155ab7['TrunkBackup'][_0x1b9c('0x4f')],_[_0x1b9c('0x65')](_0x155ab7[_0x1b9c('0x34')])?'':_0x155ab7[_0x1b9c('0x34')][_0x1b9c('0x125')]()||'',_0x155ab7['dialCutDigit']>0x0?_0xf1756f[_0x1b9c('0xf9')]['phone']['substring'](_0x155ab7[_0x1b9c('0x123')]):_0xf1756f[_0x1b9c('0xf9')]['phone']);var _0x46c0b2=_0x3aa7e9['isTrunkReachable'](_0x155ab7[_0x1b9c('0x4d')])?ut['getCallerId'](_0x155ab7['Trunk'][_0x1b9c('0x126')],_0x155ab7[_0x1b9c('0x127')],_0x155ab7[_0x1b9c('0x128')]>0x0?ut[_0x1b9c('0x129')](_0x155ab7[_0x1b9c('0x33')],_0x155ab7[_0x1b9c('0x128')]):_0x155ab7[_0x1b9c('0x33')]):ut[_0x1b9c('0x12a')](_[_0x1b9c('0x65')](_0x155ab7['TrunkBackup'])?_0x155ab7[_0x1b9c('0x4d')]['callerid']:_0x155ab7[_0x1b9c('0x92')][_0x1b9c('0x126')],_0x155ab7['dialOriginateCallerIdName'],_0x155ab7['dialRandomLastDigitCallerIdNumber']>0x0?ut[_0x1b9c('0x129')](_0x155ab7[_0x1b9c('0x33')],_0x155ab7[_0x1b9c('0x128')]):_0x155ab7[_0x1b9c('0x33')]);if(_0x46c0b2){_0x41c472[_0x1b9c('0x12b')]=ut[_0x1b9c('0x12c')](_0x46c0b2);_0x41c472['originatecalleridnum']=ut[_0x1b9c('0x12d')](_0x46c0b2);}var _0x1e2afe=ut[_0x1b9c('0x12e')](_0x155ab7,_0xf1756f,_0x49f54b,_0x46c0b2,_0x4870cd,_0x41c472);_[_0x1b9c('0x12f')](_0x41c472,ut['toLowerVariables'](_0x1e2afe));_0x41c472[_0x1b9c('0x85')]=moment()[_0x1b9c('0x51')](_0x1b9c('0x86'));ami['Action'](ut[_0x1b9c('0x130')](_0x41c472,_0x155ab7,_0x1e2afe,_0x41c472['activeContact'],_0x54f2ab))[_0x1b9c('0x7b')](function(_0x215238){_0x155ab7[_0x1b9c('0x56')]+=0x1;logger['info'](_0x1b9c('0x131'),_0x4870cd,_0x1b9c('0xa6'),_0x155ab7[_0x1b9c('0x4f')],'originated:\x20',_0x155ab7[_0x1b9c('0x56')]);_0x5be177(_0x215238);})['catch'](function(_0x248b8d){ut[_0x1b9c('0xee')](_0x41c472,0xe,_0x1b9c('0x132'));rpcDb[_0x1b9c('0xef')](_0x41c472,'[originateFailure][logOriginateFailure]');_0x18891a(_0x248b8d);});});};Preview[_0x1b9c('0x10')][_0x1b9c('0x133')]=function(_0x58f6c0){if(this['actions'][_0x58f6c0[_0x1b9c('0xa0')]]){this['actions'][_0x58f6c0[_0x1b9c('0xa0')]]['channel']=_0x58f6c0[_0x1b9c('0x134')];}};Preview[_0x1b9c('0x10')]['syncOriginateResponse']=function(_0x59eb21){var _0x291e02=this;var _0x14233=this[_0x1b9c('0x66')][_0x59eb21[_0x1b9c('0x135')]];if(_0x14233){if(_0x14233[_0x1b9c('0xfc')]&&this[_0x1b9c('0x17')][_0x14233[_0x1b9c('0xfc')]]){ut[_0x1b9c('0x136')](_0x14233,this[_0x1b9c('0x17')][_0x14233['lookAgent']][_0x1b9c('0x4f')],this[_0x1b9c('0x17')][_0x14233[_0x1b9c('0xfc')]]['id']);}var _0x58af49=_[_0x1b9c('0x137')](_0x14233);_0x58af49['responsetime']=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');var _0x3e0d39=_0x291e02[_0x1b9c('0x14')][_0x14233['queue']];if(ut[_0x1b9c('0x138')](_0x59eb21[_0x1b9c('0x139')])){if(_0x14233[_0x1b9c('0x9e')]){rpcDb[_0x1b9c('0x10d')](_0x14233[_0x1b9c('0xff')]);}if(_0x14233['activeContact']){rpcDb[_0x1b9c('0x10e')](_0x14233['idContact']);}ami['emit'](_0x1b9c('0x13a'),ut['buildObj'](_0x14233,_0x1b9c('0x13b'),this[_0x1b9c('0x14')][_0x14233[_0x1b9c('0x6a')]]));this[_0x1b9c('0xea')](_0x58af49,_0x3e0d39,_0x59eb21);}else{_0x14233[_0x1b9c('0x85')]=moment()[_0x1b9c('0x51')](_0x1b9c('0x86'));ut[_0x1b9c('0xee')](_0x58af49,0x4,_0x1b9c('0xb0'));rpcDb[_0x1b9c('0xef')](_0x58af49,_0x1b9c('0x13c'));}}};Preview[_0x1b9c('0x10')][_0x1b9c('0x13d')]=function(_0x19d3c3){var _0x37b1f0=this;var _0x12b452=this['actions'][_0x19d3c3[_0x1b9c('0xa0')]];var _0x1509aa;if(_0x12b452){_0x1509aa=this[_0x1b9c('0x14')][_0x12b452[_0x1b9c('0x6a')]];logger[_0x1b9c('0x52')]('[syncHangup][talking]',_0x19d3c3[_0x1b9c('0xa0')],_0x1b9c('0xa6'),_0x1509aa[_0x1b9c('0x4f')],_0x1b9c('0x6b'),_0x1509aa[_0x1b9c('0x2a')]);}if(this[_0x1b9c('0x66')][_0x19d3c3[_0x1b9c('0xa0')]]&&_0x19d3c3[_0x1b9c('0xa0')]!==_0x19d3c3['uniqueid']){if(_0x19d3c3[_0x1b9c('0x13e')]==='16'&&this[_0x1b9c('0x66')][_0x19d3c3['linkedid']]['dialAnswer']){this[_0x1b9c('0x13f')](_0x19d3c3,_0x19d3c3['linkedid'],_0x19d3c3[_0x1b9c('0x13e')]);}else if(this[_0x1b9c('0x66')][_0x19d3c3[_0x1b9c('0xa0')]][_0x1b9c('0x74')]){logger[_0x1b9c('0x52')]('[syncHangup][talking][cause]',_0x19d3c3[_0x1b9c('0xa0')],_0x19d3c3[_0x1b9c('0x13e')],'\x20Queue',_0x1509aa['name'],'pTalking:\x20',_0x1509aa[_0x1b9c('0x2a')]);this['callProgressDetectingCustomer'](_0x19d3c3,_0x19d3c3['linkedid'],_0x19d3c3['cause']);}}else if(_0x12b452&&_['isNil'](_0x12b452[_0x1b9c('0x140')])&&_0x1509aa[_0x1b9c('0x141')]&&_0x19d3c3[_0x1b9c('0xa0')]===_0x19d3c3[_0x1b9c('0xa5')]&&_['isNil'](_0x19d3c3['reason'])&&_0x19d3c3['cause']==='16'&&_0x19d3c3['channelstate']==='6'&&_['isUndefined'](_0x12b452[_0x1b9c('0x142')])){if(_0x12b452['unlockAgent']){rpcDb['unlockContact'](_0x12b452['idContact']);}if(_0x12b452[_0x1b9c('0x9f')]){rpcDb[_0x1b9c('0x10e')](_0x12b452[_0x1b9c('0xff')]);}_0x19d3c3[_0x1b9c('0xed')]='22';this[_0x1b9c('0xea')](_0x12b452,_0x1509aa,_0x19d3c3);}else if(_0x12b452&&_0x12b452[_0x1b9c('0x142')]){if(_0x19d3c3[_0x1b9c('0x13e')]==='16'&&this[_0x1b9c('0x66')][_0x19d3c3[_0x1b9c('0xa0')]][_0x1b9c('0x74')]){logger[_0x1b9c('0x52')]('[syncHangup][talking][transfer]',_0x19d3c3[_0x1b9c('0xa0')],_0x19d3c3[_0x1b9c('0x13e')],_0x1b9c('0xa6'),_0x1509aa['name'],'pTalking:\x20',_0x1509aa[_0x1b9c('0x2a')]);this[_0x1b9c('0x13f')](_0x19d3c3,_0x19d3c3[_0x1b9c('0xa0')],_0x19d3c3['cause']);}else if(this[_0x1b9c('0x66')][_0x19d3c3[_0x1b9c('0xa0')]]['dialAnswer']){logger[_0x1b9c('0x52')]('[syncHangup][talking][cause]',_0x19d3c3[_0x1b9c('0xa0')],_0x19d3c3[_0x1b9c('0x13e')],_0x1b9c('0xa6'),_0x1509aa[_0x1b9c('0x4f')],_0x1b9c('0x6b'),_0x1509aa[_0x1b9c('0x2a')]);this[_0x1b9c('0x13f')](_0x19d3c3,_0x19d3c3[_0x1b9c('0xa0')],_0x19d3c3[_0x1b9c('0x13e')]);}}};Preview[_0x1b9c('0x10')][_0x1b9c('0x1e')]=function(_0x26eb93){if(this[_0x1b9c('0x66')][_0x26eb93['destlinkedid']]&&_0x26eb93[_0x1b9c('0xe9')]!==_0x26eb93['destuniqueid']){this[_0x1b9c('0x13f')](_0x26eb93,_0x26eb93[_0x1b9c('0xe9')],_0x26eb93[_0x1b9c('0xde')]);}};Preview[_0x1b9c('0x10')]['syncHangupRequest']=function(_0x3f3f2e){if(this[_0x1b9c('0x66')][_0x3f3f2e['linkedid']]&&_0x3f3f2e[_0x1b9c('0xa0')]!==_0x3f3f2e[_0x1b9c('0xa5')]&&!this[_0x1b9c('0x66')][_0x3f3f2e[_0x1b9c('0xa0')]]['dialAnswer']){if(_0x3f3f2e[_0x1b9c('0x13e')]==='1'){this[_0x1b9c('0x13f')](_0x3f3f2e,_0x3f3f2e['linkedid'],_0x3f3f2e[_0x1b9c('0x13e')]);}}};Preview['prototype']['addVariable']=function(_0x9f4bc0,_0xe8f3e2,_0x1031df){if(this[_0x1b9c('0x66')][_0x9f4bc0]){if(_[_0x1b9c('0x65')](this[_0x1b9c('0x66')][_0x9f4bc0][_0x1b9c('0x143')])){this[_0x1b9c('0x66')][_0x9f4bc0]['variables']={};}this[_0x1b9c('0x66')][_0x9f4bc0][_0x1b9c('0x143')][_0xe8f3e2]=_0x1031df;}};Preview[_0x1b9c('0x10')][_0x1b9c('0x144')]=function(_0x5939ec){try{if(!_[_0x1b9c('0x65')](_0x5939ec)){if(ut['filterKey'](_[_0x1b9c('0x145')](_0x5939ec['variable'])[0x0])){this[_0x1b9c('0x146')](_0x5939ec[_0x1b9c('0xa5')],_['keys'](_0x5939ec[_0x1b9c('0x147')])[0x0],_0x5939ec[_0x1b9c('0x148')]);}}}catch(_0x278256){logger['error'](_0x1b9c('0x149'),util[_0x1b9c('0x14a')](_0x278256,{'showHidden':![],'depth':null}));}};Preview[_0x1b9c('0x10')]['syncAttendedTransfer']=function(_0x57167d){if(_0x57167d){if(this[_0x1b9c('0x66')][_0x57167d[_0x1b9c('0x14b')]]){this['actions'][_0x57167d['transfertargetlinkedid']][_0x1b9c('0x142')]=!![];}}};Preview[_0x1b9c('0x10')]['syncBlindTransfer']=function(_0xd2d0f1){if(_0xd2d0f1){if(this['actions'][_0xd2d0f1[_0x1b9c('0x14c')]]){this['actions'][_0xd2d0f1[_0x1b9c('0x14c')]][_0x1b9c('0x142')]=!![];}}};module[_0x1b9c('0x14d')]=Preview; \ No newline at end of file +var _0x7ea4=['extractCalleridName','originatecalleridnum','merge','toLowerVariables','variablesAction','[originated][increment]','OriginateError','[originateFailure][logOriginateFailure]','actionid','clone','responsetime','response','rejected','[callProgressDetectingAgent][logAnswer]','[syncHangup][talking]','cause','[syncHangup][talking][cause]','statedesc','reason','channelstate','transfer','[syncHangup][talking][transfer]','destuniqueid','addVariable','variables','filterKey','keys','variable','value','error','inspect','transfertargetlinkedid','exports','lodash','bluebird','uuid','moment','md5','ioredis','../../../config/environment','../../../config/logger','actionPreview','../ami','./rpcDb','./util/util','redis','defaults','localhost','prototype','enqueue','tail','finally','sequence','campaignsPreview','voiceQueues','trunks','actions','agents','clockClearZombieChannels','syncOriginateResponse','bind','hangup','hanguprequest','syncHangupRequest','dialend','syncDialEnd','syncNewExten','syncVarSet','attendedtransfer','syncAttendedTransfer','blindtransfer','syncBlindTransfer','emit','type','outbound','name','strategy','available','loggedIn','pTalking','sumDuration','total','unmanaged','abandoned','waiting','loggedInDb','dialMethod','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialOriginateTimeout','dialPrefix','outboundAnswerAgiCallsDay','outboundBlacklistCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundDropCallsDayACS','outboundDropCallsDayCallersExit','outboundDropCallsDayTimeout','outboundNoAnswerCallsDay','outboundRejectCallsDay','outboundUnknownCallsDay','outboundAbandonedCallsDay','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalErlangCalls','predictiveIntervalHitRate','predictiveIntervalMultiplicativeFactor','predictiveIntervalPauses','predictiveIntervalAvailable','predictiveIntervalTotalCalls','message','originated','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','startPredictive','startProgressive','Trunk','active','callerid','Interval','stringify','format','voice:queue:%s','[DEBUG]\x20Emit\x20voice_queue_channel:remove\x20event','voice_queue_presence:remove','sendMessageOneNotActive','NOT_ACTIVE','logger','\x20is\x20not\x20active','\x20is\x20disactive','loopCampaigns','syncCampaigns','preview','hasOwnProperty','dialActive','clearZombieChannel','isNil','info','[clearZombieChannels][talking]','Queue','queue','originated:\x20','pTalking:\x20','pick','contactId','VoiceQueueId','ListId','Action','status','channel','catch','No\x20such\x20channel','updateOriginated','[clearZombieChannel]','decrementTalkink','[Dialer][checkChannel][pTalking][Preview]','[Dialer][checkChannel][Preview]','clearZombieChannels','[action]','size','recallMe','getContactRecallMe','agentReadyId','then','getDiff','scheduledat','Agent','voicePause','run','logger2','disableContact','starttime','YYYY-MM-DD\x20HH:mm:ss','outboundReCallsDay','logCustomer','RecallInQueue','dialRecallInQueue','rescheduleContactInQueue','[HistoryDialRecallInQueue][historyCatch]','RecallFailedTimeout','[HistoryRecallClose]','[getContactRecallMe]','setMessage','IsNotLoggedIn','AGENTS_NOT_LOGGED','isActive','isTrunkReachable','TrunkBackup','TRUNK_IS_NOT_REACHABLE','ACTIVE','callProgressDetectingCustomer','outboundNoSuchCallsDay','countnosuchnumberretry','countglobal','totalGlobal','NoSuchNumber','custom:agentnosuchnumber','nosuchnumber','[callProgressDetectingCustomer][logNoSuch]','cloneAction','Global','createCustomerFinal','[callProgressDetectingCustomer][logNoSuchGlobal]','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','unlockAgent','activeContact','linkedid','ANSWER','answertime','[syncHangup][talking][increment]','uniqueid','\x20Queue','buildObj','custom:agentConnectPreview','complete','answered','[16]','Answer','createCustomerHistory','[callProgressDetectingCustomer][logAnswer]','[callProgressDetectingCustomer][logAnswerGlobal]','crateCustomerReportQueue','talktime','sumBillable','[syncHangup][talking][decrement]','BUSY','Busy','busy','[callProgressDetectingCustomer][logBusy]','dialGlobalMaxRetry','countbusyretry','dialBusyMaxRetry','rescheduleContact','NOANSWER','NoAnswer','custom:agentnoanswer','noanswer','[callProgressDetectingCustomer][logNoAnswerGlobal]','countnoanswerretry','dialNoAnswerMaxRetry','scheduledAt','dialNoAnswerRetryFrequency','countcongestionretry','Congestion','custom:agentcongestion','congestion','[callProgressDetectingCustomer][logCongestion]','[callProgressDetectingCustomer][logCongestionGlobal]','dialBusyRetryFrequency','CANCEL','countagentrejectretry','AgentReject','agentreject','[syncHangupRequest][logAgentReject]','[callProgressDetectingCustomer][logAgentReject]','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','countabandonedretry','Abandoned','[callProgressDetectingCustomer][logAbandoned]','countabandonedetry','dialAbandonedMaxRety','dialAbandonedRetryFrequency','countmachineretry','custom:amd','amd','[callProgressDetectingCustomer][hangupInAMD]','cause-txt','dialstatus','[callProgressDetectingCustomer][machine]','[default]','loggerError','[Dialer][decrementTalkink][no\x20Hangup][Preview]','[callProgressDetectingCustomer][logUnknown]','[callProgressDetectingCustomer][logUnknownGlobal]','dialAnswer','[callProgressDetectingCustomer]','[originated][decrement][callProgressDetectingCustomer]','destlinkedid','callProgressDetectingAgent','isUndefined','object','logAgent','[callProgressDetectingAgent][logNoSuch]','createAgentHistory','[callProgressDetectingAgent][logNoAnswer]','[callProgressDetectingAgent][logBusy]','[callProgressDetectingAgent][logCongestion]','AnswerAGI','[callProgressDetectingAgent]','[originated][decrement][callProgressDetectingAgent]','checkInBlack','Contact','phone','Contact\x20is\x20undefined','lookAgent','execCall','[Preview][execCall][success]','\x20IdHopper:\x20','idContact','custom:agentcalled','called','Calling','[Preview][execCall][failure]','Call\x20failed','createHistory','[Blacklist][error]','Contact\x20in\x20black\x20List','SIP/%s','unmonitored','execRun','unlock','unlockContact','getContactPreview','Contact.phone','[Preview][checkIsBlackList]','[Preview][getContactPreview]','Call\x20unsuccessful','isEmpty','[Preview][validateContact][Empty\x20Contact]','Empty\x20Contact','[Preview][validateContact][Empty\x20Campaign]','Empty\x20Campaign','[Preview][validateContact][Trunk\x20not\x20work]','campaign\x20Name:\x20','\x20Trunk\x20is\x20not\x20active','\x20Trunk\x20Backup\x20is\x20not\x20active','Trunk\x20not\x20work','[Preview][validateContact][Campaign\x20Active]','\x20Not\x20Active','Is\x20Valid','SIP/%s/%s%s','dialCutDigit','substring','trim','dialRandomLastDigitCallerIdNumber','getCallerId','getCallerIdRandom','originatecalleridname'];(function(_0x3e7fc1,_0x205a39){var _0x2c4ade=function(_0xbaebec){while(--_0xbaebec){_0x3e7fc1['push'](_0x3e7fc1['shift']());}};_0x2c4ade(++_0x205a39);}(_0x7ea4,0x177));var _0x47ea=function(_0xa1e3ca,_0x559022){_0xa1e3ca=_0xa1e3ca-0x0;var _0x5005ab=_0x7ea4[_0xa1e3ca];return _0x5005ab;};'use strict';var util=require('util');var _=require(_0x47ea('0x0'));var BPromise=require(_0x47ea('0x1'));var uuid=require(_0x47ea('0x2'));var moment=require(_0x47ea('0x3'));var md5=require(_0x47ea('0x4'));var Redis=require(_0x47ea('0x5'));var config=require(_0x47ea('0x6'));var logger=require(_0x47ea('0x7'))('preview');var loggerAction=require(_0x47ea('0x7'))(_0x47ea('0x8'));var ami=require(_0x47ea('0x9'));var rpcDb=require(_0x47ea('0xa'));var Action=require('./action');var ut=require(_0x47ea('0xb'));config[_0x47ea('0xc')]=_[_0x47ea('0xd')](config[_0x47ea('0xc')],{'host':_0x47ea('0xe'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x47ea('0xc')]));var Sequence=function(){};Sequence[_0x47ea('0xf')][_0x47ea('0x10')]=function(_0x41462f){this['tail']=this[_0x47ea('0x11')]?this[_0x47ea('0x11')][_0x47ea('0x12')](_0x41462f):_0x41462f();};function Preview(_0x4b86c8){this[_0x47ea('0x13')]=new Sequence();this[_0x47ea('0x14')]=_0x4b86c8[_0x47ea('0x15')];this['trunks']=_0x4b86c8[_0x47ea('0x16')];this[_0x47ea('0x17')]={};this['agents']=_0x4b86c8[_0x47ea('0x18')];this[_0x47ea('0x19')]=0x0;ami['on']('originateresponse',this[_0x47ea('0x1a')][_0x47ea('0x1b')](this));ami['on'](_0x47ea('0x1c'),this['syncHangup'][_0x47ea('0x1b')](this));ami['on'](_0x47ea('0x1d'),this[_0x47ea('0x1e')][_0x47ea('0x1b')](this));ami['on'](_0x47ea('0x1f'),this[_0x47ea('0x20')][_0x47ea('0x1b')](this));ami['on']('newexten',this[_0x47ea('0x21')][_0x47ea('0x1b')](this));ami['on']('varset',this[_0x47ea('0x22')][_0x47ea('0x1b')](this));ami['on'](_0x47ea('0x23'),this[_0x47ea('0x24')][_0x47ea('0x1b')](this));ami['on'](_0x47ea('0x25'),this[_0x47ea('0x26')]['bind'](this));this['loopCampaigns'](this['campaignsPreview']);}function emit(_0xf882cf,_0x78cf11,_0x39a268){io['to'](_0xf882cf)[_0x47ea('0x27')](_0x78cf11,_0x39a268);}function emitCampaignPreview(_0x4d0bf7){if(_0x4d0bf7[_0x47ea('0x28')]===_0x47ea('0x29')){var _0x13db4a={'id':_0x4d0bf7['id'],'name':_0x4d0bf7[_0x47ea('0x2a')],'strategy':_0x4d0bf7[_0x47ea('0x2b')],'answered':_0x4d0bf7['answered'],'available':_0x4d0bf7[_0x47ea('0x2c')],'loggedIn':_0x4d0bf7[_0x47ea('0x2d')],'pTalking':_0x4d0bf7[_0x47ea('0x2e')],'sumBillable':_0x4d0bf7['sumBillable'],'sumDuration':_0x4d0bf7[_0x47ea('0x2f')],'sumHoldTime':_0x4d0bf7['sumHoldTime']||0x0,'talking':_0x4d0bf7['talking'],'total':_0x4d0bf7[_0x47ea('0x30')],'type':_0x4d0bf7[_0x47ea('0x28')],'unmanaged':_0x4d0bf7[_0x47ea('0x31')],'abandoned':_0x4d0bf7[_0x47ea('0x32')],'waiting':_0x4d0bf7[_0x47ea('0x33')],'loggedInDb':_0x4d0bf7[_0x47ea('0x34')],'dialActive':_0x4d0bf7['dialActive'],'dialMethod':_0x4d0bf7[_0x47ea('0x35')],'dialOriginateCallerIdName':_0x4d0bf7[_0x47ea('0x36')],'dialOriginateCallerIdNumber':_0x4d0bf7[_0x47ea('0x37')],'dialOriginateTimeout':_0x4d0bf7[_0x47ea('0x38')],'dialPrefix':_0x4d0bf7[_0x47ea('0x39')],'outboundAnswerAgiCallsDay':_0x4d0bf7[_0x47ea('0x3a')],'outboundAnswerCallsDay':_0x4d0bf7['outboundAnswerCallsDay'],'outboundBlacklistCallsDay':_0x4d0bf7[_0x47ea('0x3b')],'outboundBusyCallsDay':_0x4d0bf7[_0x47ea('0x3c')],'outboundCongestionCallsDay':_0x4d0bf7[_0x47ea('0x3d')],'outboundDropCallsDayACS':_0x4d0bf7[_0x47ea('0x3e')],'outboundDropCallsDayCallersExit':_0x4d0bf7[_0x47ea('0x3f')],'outboundDropCallsDayTimeout':_0x4d0bf7[_0x47ea('0x40')],'outboundNoAnswerCallsDay':_0x4d0bf7[_0x47ea('0x41')],'outboundNoSuchCallsDay':_0x4d0bf7['outboundNoSuchCallsDay'],'outboundOriginateFailureCallsDay':_0x4d0bf7['outboundOriginateFailureCallsDay'],'outboundReCallsDay':_0x4d0bf7['outboundReCallsDay'],'outboundRejectCallsDay':_0x4d0bf7[_0x47ea('0x42')],'outboundUnknownCallsDay':_0x4d0bf7[_0x47ea('0x43')],'outboundAbandonedCallsDay':_0x4d0bf7[_0x47ea('0x44')],'predictiveIntervalAnsweredCalls':_0x4d0bf7['predictiveIntervalAnsweredCalls'],'predictiveIntervalAvgHoldtime':_0x4d0bf7[_0x47ea('0x45')],'predictiveIntervalAvgTalktime':_0x4d0bf7[_0x47ea('0x46')],'predictiveIntervalDroppedCallsCallersExit':_0x4d0bf7[_0x47ea('0x47')],'predictiveIntervalDroppedCallsTimeout':_0x4d0bf7['predictiveIntervalDroppedCallsTimeout'],'predictiveIntervalErlangCalls':_0x4d0bf7[_0x47ea('0x48')],'predictiveIntervalErlangCallsDroppedCalls':_0x4d0bf7['predictiveIntervalErlangCallsDroppedCalls'],'predictiveIntervalHitRate':_0x4d0bf7[_0x47ea('0x49')],'predictiveIntervalMultiplicativeFactor':_0x4d0bf7[_0x47ea('0x4a')],'predictiveIntervalPauses':_0x4d0bf7[_0x47ea('0x4b')],'predictiveIntervalAvailable':_0x4d0bf7[_0x47ea('0x4c')],'predictiveIntervalTotalCalls':_0x4d0bf7[_0x47ea('0x4d')],'message':_0x4d0bf7[_0x47ea('0x4e')],'originated':_0x4d0bf7[_0x47ea('0x4f')],'erlangCalls':_0x4d0bf7[_0x47ea('0x50')],'erlangCallToSecond':_0x4d0bf7[_0x47ea('0x51')],'erlangAbandonmentRate':_0x4d0bf7[_0x47ea('0x52')],'erlangBusyFactor':_0x4d0bf7['erlangBusyFactor'],'startPredictive':_0x4d0bf7[_0x47ea('0x53')],'startProgressive':_0x4d0bf7[_0x47ea('0x54')]};if(_0x4d0bf7[_0x47ea('0x55')]){_0x13db4a[_0x47ea('0x55')]={'id':_0x4d0bf7[_0x47ea('0x55')]['id'],'name':_0x4d0bf7[_0x47ea('0x55')][_0x47ea('0x2a')],'active':_0x4d0bf7[_0x47ea('0x55')][_0x47ea('0x56')],'callerid':_0x4d0bf7[_0x47ea('0x55')][_0x47ea('0x57')]};}if(_0x4d0bf7[_0x47ea('0x58')]){_0x13db4a[_0x47ea('0x58')]={'id':_0x4d0bf7[_0x47ea('0x58')]['id'],'name':_0x4d0bf7[_0x47ea('0x58')][_0x47ea('0x2a')]};}var _0x488e2d=md5(JSON[_0x47ea('0x59')](_0x13db4a));if(_0x4d0bf7[_0x47ea('0x4')]!==_0x488e2d){_0x4d0bf7['md5']=_0x488e2d;emit(util[_0x47ea('0x5a')](_0x47ea('0x5b'),_0x13db4a[_0x47ea('0x2a')]),'voice_queue:save',_0x13db4a);}}}function emitVoiceQueueChannelRemove(_0x53f8bd){logger['info'](_0x47ea('0x5c'),JSON[_0x47ea('0x59')](_0x53f8bd));emit(util[_0x47ea('0x5a')](_0x47ea('0x5b'),_0x53f8bd[_0x47ea('0x2a')]),'voice_queue_channel:remove',_0x53f8bd);io[_0x47ea('0x27')](_0x47ea('0x5d'),_0x53f8bd);}function notSendMessagesQueue(_0x591761){if(_0x591761[_0x47ea('0x5e')]){if(_0x591761[_0x47ea('0x4f')]===0x0&&_0x591761[_0x47ea('0x2e')]===0x0){_0x591761['sendMessageOneNotActive']=![];_0x591761[_0x47ea('0x2c')]=0x0;_0x591761['paused']=0x0;_0x591761['message']=_0x47ea('0x5f');ut[_0x47ea('0x60')]('[CampaignPreview]\x20Campaign\x20Queue:\x20',_0x591761[_0x47ea('0x2a')]+_0x47ea('0x61'));}else{_0x591761[_0x47ea('0x4e')]='IS_DISACTIVED';ut['logger']('[CampaignPreview]\x20Campaign\x20Queue:\x20',_0x591761[_0x47ea('0x2a')]+_0x47ea('0x62'));}emitCampaignPreview(_0x591761);}}Preview['prototype'][_0x47ea('0x63')]=function(){var _0xd13fe=this;setInterval(function(){_0xd13fe[_0x47ea('0x64')]();},0x7cf);};Preview[_0x47ea('0xf')][_0x47ea('0x64')]=function(){var _0x188cd9=this['campaignsPreview'];this[_0x47ea('0x19')]+=0x1;for(var _0x2b1537 in _0x188cd9){if(_0x188cd9['hasOwnProperty'](_0x2b1537)&&(_0x188cd9[_0x2b1537][_0x47ea('0x35')]===_0x47ea('0x65')||_0x188cd9[_0x2b1537]['dialMethod']==='booked')&&_0x188cd9[_0x2b1537]['type']===_0x47ea('0x29')){if(this[_0x47ea('0x19')]>0x7){this['clockClearZombieChannels']=0x0;this['clearZombieChannels']();}}if(_0x188cd9[_0x47ea('0x66')](_0x2b1537)&&_0x188cd9[_0x2b1537][_0x47ea('0x35')]==='preview'&&_0x188cd9[_0x2b1537]['type']==='outbound'){if(_0x188cd9[_0x2b1537][_0x47ea('0x67')]){this['setMessage'](_0x188cd9[_0x2b1537]);this['recallMe'](_0x188cd9[_0x2b1537]);}else{notSendMessagesQueue(_0x188cd9[_0x2b1537]);}}}};Preview[_0x47ea('0xf')][_0x47ea('0x68')]=function(_0xce90c4){var _0x3b45bc=this;this['sequence'][_0x47ea('0x10')](function(){if(!_[_0x47ea('0x69')](_0x3b45bc[_0x47ea('0x17')][_0xce90c4])){loggerAction[_0x47ea('0x6a')](_0x47ea('0x6b'),_0xce90c4,_0x47ea('0x6c'),_0x3b45bc['actions'][_0xce90c4][_0x47ea('0x6d')],_0x47ea('0x6e'),JSON['stringify'](_0x3b45bc[_0x47ea('0x14')][_0x3b45bc[_0x47ea('0x17')][_0xce90c4][_0x47ea('0x6d')]]['originated']),_0x47ea('0x6f'),JSON[_0x47ea('0x59')](_0x3b45bc[_0x47ea('0x14')][_0x3b45bc[_0x47ea('0x17')][_0xce90c4][_0x47ea('0x6d')]][_0x47ea('0x2e')]),JSON[_0x47ea('0x59')](_0x3b45bc[_0x47ea('0x17')][_0xce90c4]['dialAnswer']),JSON[_0x47ea('0x59')](_[_0x47ea('0x70')](_0x3b45bc[_0x47ea('0x17')][_0xce90c4],[_0x47ea('0x71'),'UserId',_0x47ea('0x72'),_0x47ea('0x73')])));return ami[_0x47ea('0x74')]({'action':_0x47ea('0x75'),'channel':_0x3b45bc[_0x47ea('0x17')][_0xce90c4][_0x47ea('0x76')]})[_0x47ea('0x77')](function(_0x20ea92){if(_0x20ea92[_0x47ea('0x4e')]===_0x47ea('0x78')){setTimeout(function(){if(_0x3b45bc[_0x47ea('0x17')][_0xce90c4]){ut[_0x47ea('0x79')](_0x3b45bc[_0x47ea('0x14')][_0x3b45bc[_0x47ea('0x17')][_0xce90c4]['queue']],_0x47ea('0x7a'));if(_0x3b45bc[_0x47ea('0x17')][_0xce90c4]['dialAnswer']===!![]){ut[_0x47ea('0x7b')](_0x3b45bc['campaignsPreview'][_0x3b45bc[_0x47ea('0x17')][_0xce90c4][_0x47ea('0x6d')]],_0x47ea('0x7a'));ut['loggerError'](_0x47ea('0x7c')+_0xce90c4,_0x3b45bc[_0x47ea('0x17')][_0xce90c4][_0x47ea('0x6d')]);}ut['loggerError'](_0x47ea('0x7d')+_0xce90c4,_0x3b45bc[_0x47ea('0x17')][_0xce90c4][_0x47ea('0x6d')]);delete _0x3b45bc[_0x47ea('0x17')][_0xce90c4];}},0x2328);}});}});};Preview[_0x47ea('0xf')][_0x47ea('0x7e')]=function(){var _0x122ac2=this;loggerAction[_0x47ea('0x6a')](_0x47ea('0x7f'),_[_0x47ea('0x80')](this['actions']));for(var _0x254552 in this[_0x47ea('0x17')]){if(_0x122ac2['actions'][_0x47ea('0x66')](_0x254552)){_0x122ac2[_0x47ea('0x68')](_0x254552);}}};Preview['prototype'][_0x47ea('0x81')]=function(_0x54deb0){var _0x8a40da=this;rpcDb[_0x47ea('0x82')](_0x54deb0['id'],ut[_0x47ea('0x83')](this[_0x47ea('0x18')]))[_0x47ea('0x84')](function(_0x4db4aa){if(!_[_0x47ea('0x69')](_0x4db4aa)){for(var _0x22235f=0x0;_0x22235f<_0x4db4aa['length'];_0x22235f+=0x1){if(ut[_0x47ea('0x85')](_0x4db4aa[_0x22235f][_0x47ea('0x86')])<_0x54deb0['dialRecallMeTimeout']*0x3c){if(_0x4db4aa[_0x22235f][_0x47ea('0x87')]&&!_0x4db4aa[_0x22235f][_0x47ea('0x87')][_0x47ea('0x88')]){_0x8a40da[_0x47ea('0x89')](_0x4db4aa[_0x22235f]['id'])['then'](ut[_0x47ea('0x8a')]('[RecallMe]'))[_0x47ea('0x77')](ut[_0x47ea('0x8a')]('[RecallMe]'));}else{rpcDb[_0x47ea('0x8b')](_0x4db4aa[_0x22235f]['id']);}}else{var _0xf1b808=new Action(_0x4db4aa[_0x22235f],_0x54deb0);_0xf1b808[_0x47ea('0x8c')]=moment()[_0x47ea('0x5a')](_0x47ea('0x8d'));_0x54deb0[_0x47ea('0x8e')]+=0x1;ut[_0x47ea('0x8f')](_0xf1b808,0x17,_0x47ea('0x90'));if(_0x54deb0[_0x47ea('0x91')]){rpcDb[_0x47ea('0x92')](ut['createBody'](_0x4db4aa[_0x22235f]));rpcDb['createCustomerHistory'](_0xf1b808,_0x47ea('0x93'));}else{ut[_0x47ea('0x8f')](_0xf1b808,0x16,_0x47ea('0x94'));rpcDb['createCustomerHistory'](_0xf1b808,_0x47ea('0x95'));rpcDb['createCustomerFinal'](_0xf1b808,_0x47ea('0x95'));}}}}})[_0x47ea('0x77')](ut[_0x47ea('0x8a')](_0x47ea('0x96')));};Preview[_0x47ea('0xf')][_0x47ea('0x97')]=function(_0x4229fb){_0x4229fb[_0x47ea('0x5e')]=!![];if(ut[_0x47ea('0x98')](_0x4229fb[_0x47ea('0x2d')])){_0x4229fb['message']=_0x47ea('0x99');}else if(!ut[_0x47ea('0x9a')](_0x4229fb[_0x47ea('0x67')])){_0x4229fb[_0x47ea('0x4e')]=_0x47ea('0x5f');}else if(!this[_0x47ea('0x9b')](_0x4229fb[_0x47ea('0x55')])){if(!this[_0x47ea('0x9b')](_0x4229fb[_0x47ea('0x9c')])){_0x4229fb['message']=_0x47ea('0x9d');}else{_0x4229fb['message']=_0x47ea('0x9e');}}else{_0x4229fb[_0x47ea('0x4e')]=_0x47ea('0x9e');}emitCampaignPreview(_0x4229fb);};Preview[_0x47ea('0xf')][_0x47ea('0x9f')]=function(_0x5668df,_0xabc38a,_0x495458){var _0x52d98f=this;var _0xb19d70=this[_0x47ea('0x17')][_0xabc38a];var _0x10b42d=this[_0x47ea('0x14')][_0xb19d70['queue']];var _0x3a60f5;if(_0x10b42d){switch(_0x495458){case'1':_0x10b42d[_0x47ea('0xa0')]+=0x1;_0xb19d70[_0x47ea('0xa1')]+=0x1;_0xb19d70[_0x47ea('0xa2')]=ut[_0x47ea('0xa3')](_0xb19d70);ut[_0x47ea('0x8f')](_0xb19d70,0x0,_0x47ea('0xa4'));ami[_0x47ea('0x27')](_0x47ea('0xa5'),ut['buildObj'](_0xb19d70,_0x47ea('0xa6')));rpcDb['createCustomerHistory'](_0xb19d70,_0x47ea('0xa7'));if(ut['totalGlobal'](_0xb19d70)>=_0x10b42d['dialGlobalMaxRetry']){_0x3a60f5=ut[_0x47ea('0xa8')](_0xb19d70,0xf,_0x47ea('0xa9'));rpcDb[_0x47ea('0xaa')](_0x3a60f5,_0x47ea('0xab'));}else{if(_0xb19d70[_0x47ea('0xa1')]>=_0x10b42d[_0x47ea('0xac')]){rpcDb['createCustomerFinal'](_0xb19d70,_0x47ea('0xab'));}else{rpcDb['rescheduleContact'](ut['scheduledAt'](_0xb19d70,_0x47ea('0xa1'),_0x10b42d[_0x47ea('0xad')]),_0xb19d70[_0x47ea('0xae')],_0xb19d70[_0x47ea('0xaf')]);}}delete this[_0x47ea('0x17')][_0x5668df[_0x47ea('0xb0')]];break;case _0x47ea('0xb1'):var _0x41c79a=moment()[_0x47ea('0x5a')](_0x47ea('0x8d'));_0xb19d70['responsetime']=_0x41c79a;_0xb19d70[_0x47ea('0xb2')]=_0x41c79a;_0xb19d70['dialAnswer']=!![];_0x10b42d[_0x47ea('0x2e')]+=0x1;logger[_0x47ea('0x6a')](_0x47ea('0xb3'),_0xb19d70[_0x47ea('0xb4')],_0x47ea('0xb5'),_0x10b42d[_0x47ea('0x2a')],_0x47ea('0x6f'),_0x10b42d[_0x47ea('0x2e')]);ami[_0x47ea('0x27')]('custom:agentconnect',ut[_0x47ea('0xb6')](_0xb19d70,'connect',this[_0x47ea('0x14')][_0xb19d70[_0x47ea('0x6d')]]));if(_0x10b42d['acw']){ami['emit'](_0x47ea('0xb7'),ut['buildAcw'](_0xb19d70));}break;case'16':ami['emit']('custom:agentcomplete',ut[_0x47ea('0xb6')](_0xb19d70,'complete',this[_0x47ea('0x14')][_0xb19d70[_0x47ea('0x6d')]]));emitVoiceQueueChannelRemove(ut[_0x47ea('0xb6')](_0xb19d70,_0x47ea('0xb8')));_0x10b42d['outboundAnswerCallsDay']+=0x1;_0x10b42d['total']+=0x1;_0x10b42d[_0x47ea('0xb9')]+=0x1;ut['decrementTalkink'](_0x10b42d,_0x47ea('0xba'));_0xb19d70[_0x47ea('0xa2')]=ut[_0x47ea('0xa3')](_0xb19d70);ut[_0x47ea('0x8f')](_0xb19d70,0x4,_0x47ea('0xbb'));rpcDb[_0x47ea('0xbc')](_0xb19d70,_0x47ea('0xbd'));rpcDb[_0x47ea('0xaa')](_0xb19d70,_0x47ea('0xbe'));rpcDb[_0x47ea('0xbf')](_0xb19d70);_0x10b42d[_0x47ea('0x2f')]+=_0xb19d70[_0x47ea('0xc0')];_0x10b42d[_0x47ea('0xc1')]+=_0xb19d70[_0x47ea('0xc0')];logger['info'](_0x47ea('0xc2'),_0xb19d70[_0x47ea('0xb4')],_0x47ea('0xb5'),_0x10b42d[_0x47ea('0x2a')],_0x47ea('0x6f'),_0x10b42d[_0x47ea('0x2e')]);delete this[_0x47ea('0x17')][_0x5668df[_0x47ea('0xb0')]];break;case _0x47ea('0xc3'):_0x10b42d['outboundBusyCallsDay']+=0x1;_0xb19d70['countbusyretry']+=0x1;_0xb19d70[_0x47ea('0xa2')]=ut['totalGlobal'](_0xb19d70);ut[_0x47ea('0x8f')](_0xb19d70,0x5,_0x47ea('0xc4'));ami[_0x47ea('0x27')]('custom:agentbusy',ut[_0x47ea('0xb6')](_0xb19d70,_0x47ea('0xc5')));rpcDb['createCustomerHistory'](_0xb19d70,_0x47ea('0xc6'));if(ut[_0x47ea('0xa3')](_0xb19d70)>=_0x10b42d[_0x47ea('0xc7')]){_0x3a60f5=ut[_0x47ea('0xa8')](_0xb19d70,0xf,'Global');rpcDb[_0x47ea('0xaa')](_0x3a60f5,'[callProgressDetectingCustomer][logBusyGlobal]');}else{if(_0xb19d70[_0x47ea('0xc8')]>=_0x10b42d[_0x47ea('0xc9')]){rpcDb[_0x47ea('0xaa')](_0xb19d70,_0x47ea('0xc6'));}else{rpcDb[_0x47ea('0xca')](ut['scheduledAt'](_0xb19d70,_0x47ea('0xc8'),_0x10b42d['dialBusyRetryFrequency']),_0xb19d70[_0x47ea('0xae')],_0xb19d70['activeContact']);}}break;case _0x47ea('0xcb'):_0x10b42d[_0x47ea('0x41')]+=0x1;_0xb19d70['countnoanswerretry']+=0x1;_0xb19d70[_0x47ea('0xa2')]=ut['totalGlobal'](_0xb19d70);ut[_0x47ea('0x8f')](_0xb19d70,0x3,_0x47ea('0xcc'));ami[_0x47ea('0x27')](_0x47ea('0xcd'),ut[_0x47ea('0xb6')](_0xb19d70,_0x47ea('0xce')));rpcDb[_0x47ea('0xbc')](_0xb19d70,'[callProgressDetectingCustomer][logNoAnswer]');if(ut[_0x47ea('0xa3')](_0xb19d70)>=_0x10b42d['dialGlobalMaxRetry']){_0x3a60f5=ut[_0x47ea('0xa8')](_0xb19d70,0xf,_0x47ea('0xa9'));rpcDb[_0x47ea('0xaa')](_0x3a60f5,_0x47ea('0xcf'));}else{if(_0xb19d70[_0x47ea('0xd0')]>=_0x10b42d[_0x47ea('0xd1')]){rpcDb[_0x47ea('0xaa')](_0xb19d70,'[callProgressDetectingCustomer][logNoAnswer]');}else{rpcDb[_0x47ea('0xca')](ut[_0x47ea('0xd2')](_0xb19d70,'countnoanswerretry',_0x10b42d[_0x47ea('0xd3')]),_0xb19d70[_0x47ea('0xae')],_0xb19d70[_0x47ea('0xaf')]);}}break;case'CONGESTION':_0x10b42d[_0x47ea('0x3d')]+=0x1;_0xb19d70[_0x47ea('0xd4')]+=0x1;_0xb19d70['countglobal']=ut[_0x47ea('0xa3')](_0xb19d70);ut[_0x47ea('0x8f')](_0xb19d70,0x8,_0x47ea('0xd5'));ami[_0x47ea('0x27')](_0x47ea('0xd6'),ut['buildObj'](_0xb19d70,_0x47ea('0xd7')));rpcDb[_0x47ea('0xbc')](_0xb19d70,_0x47ea('0xd8'));if(ut['totalGlobal'](_0xb19d70)>=_0x10b42d[_0x47ea('0xc7')]){_0x3a60f5=ut[_0x47ea('0xa8')](_0xb19d70,0xf,_0x47ea('0xa9'));rpcDb[_0x47ea('0xaa')](_0x3a60f5,_0x47ea('0xd9'));}else{if(_0xb19d70['countcongestionretry']>=_0x10b42d['dialCongestionMaxRetry']){rpcDb[_0x47ea('0xaa')](_0xb19d70,_0x47ea('0xd8'));}else{rpcDb[_0x47ea('0xca')](ut[_0x47ea('0xd2')](_0xb19d70,_0x47ea('0xd4'),_0x10b42d[_0x47ea('0xda')]),_0xb19d70[_0x47ea('0xae')],_0xb19d70[_0x47ea('0xaf')]);}}break;case _0x47ea('0xdb'):_0x10b42d['outboundRejectCallsDay']+=0x1;_0xb19d70[_0x47ea('0xdc')]+=0x1;_0xb19d70[_0x47ea('0xa2')]=ut[_0x47ea('0xa3')](_0xb19d70);ut['logCustomer'](_0xb19d70,0x14,_0x47ea('0xdd'));ami[_0x47ea('0x27')]('custom:agentreject',ut[_0x47ea('0xb6')](_0xb19d70,_0x47ea('0xde')));rpcDb[_0x47ea('0xbc')](_0xb19d70,_0x47ea('0xdf'));if(ut[_0x47ea('0xa3')](_0xb19d70)>=_0x10b42d[_0x47ea('0xc7')]){_0x3a60f5=ut[_0x47ea('0xa8')](_0xb19d70,0x14,_0x47ea('0xdd'));rpcDb[_0x47ea('0xaa')](_0x3a60f5,_0x47ea('0xe0'));}else{if(_0xb19d70['countagentrejectretry']>=_0x10b42d[_0x47ea('0xe1')]){rpcDb[_0x47ea('0xaa')](_0xb19d70,_0x47ea('0xe0'));}else{rpcDb[_0x47ea('0xca')](ut['scheduledAt'](_0xb19d70,_0x47ea('0xdc'),_0x10b42d[_0x47ea('0xe2')]),_0xb19d70[_0x47ea('0xae')],_0xb19d70[_0x47ea('0xaf')]);}}break;case'ABANDONED':_0x10b42d[_0x47ea('0x44')]+=0x1;_0xb19d70[_0x47ea('0xe3')]+=0x1;_0xb19d70['countglobal']=ut[_0x47ea('0xa3')](_0xb19d70);ut[_0x47ea('0x8f')](_0xb19d70,0xb,_0x47ea('0xe4'));rpcDb['createCustomerHistory'](_0xb19d70,_0x47ea('0xe5'));if(ut[_0x47ea('0xa3')](_0xb19d70)>=_0x10b42d[_0x47ea('0xc7')]){_0x3a60f5=ut[_0x47ea('0xa8')](_0xb19d70,0xf,'Global');rpcDb[_0x47ea('0xaa')](_0x3a60f5,_0x47ea('0xe5'));}else{if(_0xb19d70[_0x47ea('0xe6')]>=_0x10b42d[_0x47ea('0xe7')]){rpcDb[_0x47ea('0xaa')](_0xb19d70,'[callProgressDetectingCustomer][logAbandoned]');}else{rpcDb[_0x47ea('0xca')](ut[_0x47ea('0xd2')](_0xb19d70,_0x47ea('0xe3'),_0x10b42d[_0x47ea('0xe8')]),_0xb19d70[_0x47ea('0xae')],_0xb19d70['activeContact']);}}break;case'18':_0x10b42d[_0x47ea('0x43')]+=0x1;_0xb19d70[_0x47ea('0xe9')]+=0x1;_0xb19d70[_0x47ea('0xa2')]=ut[_0x47ea('0xa3')](_0xb19d70);ut[_0x47ea('0x8f')](_0xb19d70,0x12,_0x5668df['cause-txt']||_0x5668df['dialstatus']);ami[_0x47ea('0x27')](_0x47ea('0xea'),ut['buildObj'](_0xb19d70,_0x47ea('0xeb')));rpcDb[_0x47ea('0xbc')](_0xb19d70,_0x47ea('0xec'));if(ut[_0x47ea('0xa3')](_0xb19d70)>=_0x10b42d[_0x47ea('0xc7')]){_0x3a60f5=ut[_0x47ea('0xa8')](_0xb19d70,0xf,_0x47ea('0xa9'));rpcDb[_0x47ea('0xaa')](_0x3a60f5,_0x47ea('0xec'));}else{rpcDb[_0x47ea('0xaa')](_0xb19d70,_0x47ea('0xec'));}delete this[_0x47ea('0x17')][_0x5668df['linkedid']];break;case'19':_0x10b42d['outboundUnknownCallsDay']+=0x1;_0xb19d70[_0x47ea('0xa2')]=ut[_0x47ea('0xa3')](_0xb19d70);ut[_0x47ea('0x8f')](_0xb19d70,0x13,_0x5668df[_0x47ea('0xed')]||_0x5668df[_0x47ea('0xee')]);ami[_0x47ea('0x27')](_0x47ea('0xea'),ut[_0x47ea('0xb6')](_0xb19d70,_0x47ea('0xeb')));rpcDb[_0x47ea('0xbc')](_0xb19d70,_0x47ea('0xef'));if(ut[_0x47ea('0xa3')](_0xb19d70)>=_0x10b42d[_0x47ea('0xc7')]){_0x3a60f5=ut[_0x47ea('0xa8')](_0xb19d70,0xf,_0x47ea('0xa9'));rpcDb[_0x47ea('0xaa')](_0x3a60f5,_0x47ea('0xef'));}else{rpcDb[_0x47ea('0xaa')](_0xb19d70,_0x47ea('0xef'));}delete this[_0x47ea('0x17')][_0x5668df['linkedid']];break;default:if(_0xb19d70['dialAnswer']){ut[_0x47ea('0x7b')](_0x10b42d,_0x47ea('0xf0'));ut[_0x47ea('0xf1')](_0x47ea('0xf2')+_0x10b42d[_0x47ea('0x2a')],_0x5668df);}_0x10b42d[_0x47ea('0x43')]+=0x1;_0xb19d70['countglobal']=ut[_0x47ea('0xa3')](_0xb19d70);ut['logCustomer'](_0xb19d70,0xc,_0x5668df[_0x47ea('0xed')]||_0x5668df['dialstatus']);rpcDb[_0x47ea('0xbc')](_0xb19d70,_0x47ea('0xf3'));if(ut[_0x47ea('0xa3')](_0xb19d70)>=_0x10b42d[_0x47ea('0xc7')]){_0x3a60f5=ut[_0x47ea('0xa8')](_0xb19d70,0xf,_0x47ea('0xa9'));rpcDb['createCustomerFinal'](_0x3a60f5,_0x47ea('0xf4'));}else{rpcDb['createCustomerFinal'](_0xb19d70,_0x47ea('0xf4'));}delete this[_0x47ea('0x17')][_0x5668df['linkedid']];}if(!(_0xb19d70[_0x47ea('0xf5')]&&_0x495458==='16')){ut[_0x47ea('0x79')](_0x10b42d,_0x47ea('0xf6'));logger[_0x47ea('0x6a')](_0x47ea('0xf7'),_0xb19d70['uniqueid'],_0x47ea('0xb5'),_0x10b42d[_0x47ea('0x2a')],_0x47ea('0x6e'),_0x10b42d[_0x47ea('0x4f')]);}if(_0x495458!==_0x47ea('0xb1')){delete this['actions'][_0x5668df[_0x47ea('0xb0')]];delete this['actions'][_0x5668df[_0x47ea('0xf8')]];}}};Preview[_0x47ea('0xf')][_0x47ea('0xf9')]=function(_0x2fbc48,_0x2cb1cc,_0x5204e4){if(_[_0x47ea('0xfa')](_0x2cb1cc)&&_0x47ea('0xfb')!==typeof _0x2cb1cc){return;}if(_[_0x47ea('0xfa')](_0x5204e4)&&_0x47ea('0xfb')!==typeof _0x5204e4){return;}switch(_0x5204e4['reason']){case'0':ut[_0x47ea('0xfc')](_0x2fbc48,0x0,_0x47ea('0xa4'));rpcDb['createAgentHistory'](_0x2fbc48,_0x47ea('0xfd'));break;case'3':ut[_0x47ea('0xfc')](_0x2fbc48,0x3,_0x47ea('0xcc'));rpcDb[_0x47ea('0xfe')](_0x2fbc48,_0x47ea('0xff'));break;case'5':ut[_0x47ea('0xfc')](_0x2fbc48,0x5,_0x47ea('0xc4'));rpcDb[_0x47ea('0xfe')](_0x2fbc48,_0x47ea('0x100'));break;case'8':ut['logAgent'](_0x2fbc48,0x8,_0x47ea('0xd5'));rpcDb['createAgentHistory'](_0x2fbc48,_0x47ea('0x101'));break;case'22':ut[_0x47ea('0xfc')](_0x2fbc48,0x16,_0x47ea('0x102'));rpcDb[_0x47ea('0xfe')](_0x2fbc48,'[callProgressDetectingAgent][logAnswerAGI]');break;default:ut[_0x47ea('0xfc')](_0x2fbc48,0xc,_0x5204e4['reason']);rpcDb[_0x47ea('0xfe')](_0x2fbc48,_0x47ea('0x101'));}ut[_0x47ea('0x79')](_0x2cb1cc,_0x47ea('0x103'));logger[_0x47ea('0x6a')](_0x47ea('0x104'),_0x2fbc48[_0x47ea('0xb4')],_0x47ea('0xb5'),_0x2cb1cc[_0x47ea('0x2a')],_0x47ea('0x6e'),_0x2cb1cc[_0x47ea('0x4f')]);delete this['actions'][_0x2fbc48[_0x47ea('0xb4')]];};Preview[_0x47ea('0xf')][_0x47ea('0x105')]=function(_0x2f896e,_0x3c157a,_0x29ab99,_0x1edd1f,_0x44cfd6){var _0x36ecee=this;return new BPromise(function(_0x712b6c,_0x360821){if(_[_0x47ea('0x69')](_0x3c157a)||_['isNil'](_0x3c157a['Contact'])||_[_0x47ea('0x69')](_0x3c157a[_0x47ea('0x106')][_0x47ea('0x107')])||_['isNil'](_0x3c157a[_0x47ea('0x72')])){_0x360821(ut[_0x47ea('0x4e')](_0x47ea('0x108'),_0x1edd1f,_0x44cfd6));return;}var _0x2bf0ef=uuid['v4']();var _0x5d52c2=_0x36ecee[_0x47ea('0x14')][_0x3c157a[_0x47ea('0x6c')][_0x47ea('0x2a')]];var _0x4a933c=_0x29ab99?_0x36ecee[_0x47ea('0x18')][_0x29ab99]['id']:undefined;_0x36ecee['actions'][_0x2bf0ef]=new Action(_0x3c157a,_0x5d52c2,_0x2bf0ef,_0x29ab99,_0x4a933c);var _0x160825=_0x36ecee[_0x47ea('0x17')][_0x2bf0ef];_0x160825[_0x47ea('0xae')]=_0x1edd1f;_0x160825[_0x47ea('0xaf')]=_0x44cfd6;_0x160825[_0x47ea('0x109')]=_0x29ab99;if(_['isEmpty'](_0x2f896e)){_0x36ecee[_0x47ea('0x10a')](_0x160825,_0x5d52c2,_0x3c157a,_0x29ab99)[_0x47ea('0x84')](function(_0x4e5856){logger[_0x47ea('0x6a')](_0x47ea('0x10b'),'Queue:\x20'+_0x160825[_0x47ea('0x6d')]+_0x47ea('0x10c')+_0x160825[_0x47ea('0x10d')],JSON['stringify'](_0x4e5856));ami[_0x47ea('0x27')](_0x47ea('0x10e'),ut[_0x47ea('0xb6')](_0x160825,_0x47ea('0x10f'),_0x36ecee[_0x47ea('0x14')][_0x160825[_0x47ea('0x6d')]]));_0x712b6c(ut['message'](_0x47ea('0x110')));})[_0x47ea('0x77')](function(_0x2f3d16){ut['logger'](_0x47ea('0x111'),_0x2f3d16);_0x360821(ut[_0x47ea('0x4e')](_0x47ea('0x112'),_0x1edd1f,_0x44cfd6));});}else{_0x5d52c2[_0x47ea('0x3b')]+=0x1;ut['logBlacklist'](_0x160825);rpcDb[_0x47ea('0x113')](_0x160825,_0x47ea('0x114'));delete _0x36ecee[_0x47ea('0x17')][_0x2bf0ef];_0x360821(ut[_0x47ea('0x4e')](_0x47ea('0x115'),_0x1edd1f,_0x44cfd6));}});};Preview[_0x47ea('0xf')][_0x47ea('0x9b')]=function(_0x860cea){return!_['isNil'](_0x860cea)&&!_[_0x47ea('0x69')](_0x860cea[_0x47ea('0x2a')])&&!_['isNil'](_0x860cea[_0x47ea('0x56')])&&_0x860cea[_0x47ea('0x56')]&&!_['isNil'](this[_0x47ea('0x16')][util[_0x47ea('0x5a')](_0x47ea('0x116'),_0x860cea[_0x47ea('0x2a')])])&&!_[_0x47ea('0x69')](this['trunks'][util[_0x47ea('0x5a')]('SIP/%s',_0x860cea[_0x47ea('0x2a')])][_0x47ea('0x75')])&&(this[_0x47ea('0x16')][util[_0x47ea('0x5a')](_0x47ea('0x116'),_0x860cea[_0x47ea('0x2a')])][_0x47ea('0x75')]==='reachable'||this[_0x47ea('0x16')][util[_0x47ea('0x5a')]('SIP/%s',_0x860cea['name'])][_0x47ea('0x75')]===_0x47ea('0x117'));};Preview['prototype'][_0x47ea('0x89')]=function(_0x1d68b5,_0x4dc33c){var _0x2413c1=this;return new BPromise(function(_0x136a5b,_0xaf4fed){_0x2413c1[_0x47ea('0x118')](_0x1d68b5,_0x4dc33c)[_0x47ea('0x84')](function(_0x17a5d9){_0x136a5b(_[_0x47ea('0x70')](_0x17a5d9,['message']));})[_0x47ea('0x77')](function(_0x1c56a8){if(_0x1c56a8[_0x47ea('0x119')]){rpcDb[_0x47ea('0x11a')](_0x1d68b5);}if(_0x1c56a8[_0x47ea('0x56')]){rpcDb[_0x47ea('0x8b')](_0x1d68b5);}_0xaf4fed(_[_0x47ea('0x70')](_0x1c56a8,['message']));});});};Preview['prototype']['execRun']=function(_0x5d5cf8,_0x18e108){var _0x136118=this;return new BPromise(function(_0x4b4653,_0xe1e663){var _0x22ccfe,_0x5260f0;rpcDb[_0x47ea('0x11b')](_0x5d5cf8)[_0x47ea('0x84')](function(_0x4676ac){if(!_[_0x47ea('0x69')](_0x4676ac[0x0])){_0x5260f0=_0x4676ac[0x0]['recallme']?![]:!![];_0x22ccfe=_0x4676ac[0x0]['recallme']?!![]:![];_0x22ccfe=_0x18e108?!![]:_0x22ccfe;}var _0x3b931f=_0x136118['validateContact'](_0x4676ac);if(_0x3b931f['isValid']){rpcDb['checkIsBlackList'](_[_0x47ea('0x70')](_0x4676ac[0x0],[_0x47ea('0x72'),_0x47ea('0x11c')]))[_0x47ea('0x84')](function(_0x339842){_0x136118[_0x47ea('0x105')](_0x339842,_0x4676ac[0x0],_0x18e108,_0x5260f0,_0x22ccfe)[_0x47ea('0x84')](function(_0x422fa2){_0x4b4653(_0x422fa2);})[_0x47ea('0x77')](function(_0x560d5d){_0xe1e663(_0x560d5d);});})[_0x47ea('0x77')](function(_0x54d2ee){ut[_0x47ea('0x60')](_0x47ea('0x11d'),_0x54d2ee);_0xe1e663(ut[_0x47ea('0x4e')]('Call\x20unsuccessful',_0x5260f0,_0x22ccfe));});}else{_0xe1e663(ut[_0x47ea('0x4e')](_0x3b931f[_0x47ea('0x4e')],_0x5260f0,_0x22ccfe));}})[_0x47ea('0x77')](function(_0x545e3e){ut[_0x47ea('0x60')](_0x47ea('0x11e'),_0x545e3e);_0xe1e663(ut[_0x47ea('0x4e')](_0x47ea('0x11f'),![],!![]));});});};Preview[_0x47ea('0xf')]['validateContact']=function(_0x4f7f9d){if(_[_0x47ea('0x69')](_0x4f7f9d)||_[_0x47ea('0x120')](_0x4f7f9d)||!_['isNil'](_0x4f7f9d[0x0]['Agent'])&&_[_0x47ea('0x69')](_0x4f7f9d[0x0][_0x47ea('0x87')][_0x47ea('0x2a')])){ut[_0x47ea('0x60')](_0x47ea('0x121'),_0x4f7f9d);return{'isValid':![],'message':_0x47ea('0x122')};}var _0x3f5fa3=this[_0x47ea('0x14')][_0x4f7f9d[0x0][_0x47ea('0x6c')][_0x47ea('0x2a')]];_0x3f5fa3[_0x47ea('0x4e')]=_0x47ea('0x9e');if(_[_0x47ea('0x69')](_0x3f5fa3)){ut[_0x47ea('0x60')](_0x47ea('0x123'),_0x3f5fa3);return{'isValid':![],'message':_0x47ea('0x124')};}if(!this[_0x47ea('0x9b')](_0x3f5fa3[_0x47ea('0x55')])){ut[_0x47ea('0x60')](_0x47ea('0x125'),_0x47ea('0x126')+_0x3f5fa3['name']+_0x47ea('0x127'));if(!this[_0x47ea('0x9b')](_0x3f5fa3[_0x47ea('0x9c')])){ut[_0x47ea('0x60')](_0x47ea('0x125'),_0x3f5fa3[_0x47ea('0x2a')]+_0x47ea('0x128'));return{'isValid':![],'message':_0x47ea('0x129')};}}if(!ut[_0x47ea('0x9a')](_0x3f5fa3['dialActive'])){ut['logger'](_0x47ea('0x12a'),_0x3f5fa3['name']+_0x47ea('0x12b'));return{'isValid':![],'message':_0x47ea('0x126')+_0x3f5fa3[_0x47ea('0x2a')]+'\x20Not\x20Active'};}return{'isValid':!![],'message':_0x47ea('0x12c')};};Preview['prototype']['execCall']=function(_0x58645c,_0x3d6fd4,_0x54ca29,_0x268d8c){var _0x1eef42=this;return new BPromise(function(_0x5400a5,_0xc12f88){var _0x814d55=_0x58645c[_0x47ea('0xb4')];var _0x423981=_0x1eef42['isTrunkReachable'](_0x3d6fd4['Trunk'])?util[_0x47ea('0x5a')](_0x47ea('0x12d'),_0x3d6fd4[_0x47ea('0x55')]['name'],_[_0x47ea('0x69')](_0x3d6fd4[_0x47ea('0x39')])?'':_0x3d6fd4['dialPrefix']['trim']()||'',_0x3d6fd4[_0x47ea('0x12e')]>0x0?_0x54ca29[_0x47ea('0x106')][_0x47ea('0x107')][_0x47ea('0x12f')](_0x3d6fd4[_0x47ea('0x12e')]):_0x54ca29[_0x47ea('0x106')][_0x47ea('0x107')]):util[_0x47ea('0x5a')](_0x47ea('0x12d'),_[_0x47ea('0x69')](_0x3d6fd4[_0x47ea('0x9c')])?_0x3d6fd4[_0x47ea('0x55')][_0x47ea('0x2a')]:_0x3d6fd4[_0x47ea('0x9c')][_0x47ea('0x2a')],_[_0x47ea('0x69')](_0x3d6fd4[_0x47ea('0x39')])?'':_0x3d6fd4[_0x47ea('0x39')][_0x47ea('0x130')]()||'',_0x3d6fd4[_0x47ea('0x12e')]>0x0?_0x54ca29[_0x47ea('0x106')][_0x47ea('0x107')]['substring'](_0x3d6fd4[_0x47ea('0x12e')]):_0x54ca29[_0x47ea('0x106')][_0x47ea('0x107')]);var _0x2b985f=_0x1eef42[_0x47ea('0x9b')](_0x3d6fd4[_0x47ea('0x55')])?ut['getCallerId'](_0x3d6fd4[_0x47ea('0x55')][_0x47ea('0x57')],_0x3d6fd4[_0x47ea('0x36')],_0x3d6fd4[_0x47ea('0x131')]>0x0?ut['getCallerIdRandom'](_0x3d6fd4[_0x47ea('0x37')],_0x3d6fd4['dialRandomLastDigitCallerIdNumber']):_0x3d6fd4[_0x47ea('0x37')]):ut[_0x47ea('0x132')](_[_0x47ea('0x69')](_0x3d6fd4[_0x47ea('0x9c')])?_0x3d6fd4[_0x47ea('0x55')][_0x47ea('0x57')]:_0x3d6fd4[_0x47ea('0x9c')][_0x47ea('0x57')],_0x3d6fd4['dialOriginateCallerIdName'],_0x3d6fd4['dialRandomLastDigitCallerIdNumber']>0x0?ut[_0x47ea('0x133')](_0x3d6fd4[_0x47ea('0x37')],_0x3d6fd4['dialRandomLastDigitCallerIdNumber']):_0x3d6fd4[_0x47ea('0x37')]);if(_0x2b985f){_0x58645c[_0x47ea('0x134')]=ut[_0x47ea('0x135')](_0x2b985f);_0x58645c[_0x47ea('0x136')]=ut['extractCalleridNumber'](_0x2b985f);}var _0xe7fedc=ut['addVariables'](_0x3d6fd4,_0x54ca29,_0x423981,_0x2b985f,_0x814d55,_0x58645c);_[_0x47ea('0x137')](_0x58645c,ut[_0x47ea('0x138')](_0xe7fedc));_0x58645c[_0x47ea('0x8c')]=moment()[_0x47ea('0x5a')]('YYYY-MM-DD\x20HH:mm:ss');ami[_0x47ea('0x74')](ut[_0x47ea('0x139')](_0x58645c,_0x3d6fd4,_0xe7fedc,_0x58645c[_0x47ea('0xaf')],_0x268d8c))[_0x47ea('0x84')](function(_0x31dac4){_0x3d6fd4[_0x47ea('0x4f')]+=0x1;logger[_0x47ea('0x6a')](_0x47ea('0x13a'),_0x814d55,_0x47ea('0xb5'),_0x3d6fd4['name'],_0x47ea('0x6e'),_0x3d6fd4['originated']);_0x5400a5(_0x31dac4);})[_0x47ea('0x77')](function(_0x12226a){ut[_0x47ea('0xfc')](_0x58645c,0xe,_0x47ea('0x13b'));rpcDb[_0x47ea('0xfe')](_0x58645c,_0x47ea('0x13c'));_0xc12f88(_0x12226a);});});};Preview[_0x47ea('0xf')]['syncNewExten']=function(_0x820911){if(this[_0x47ea('0x17')][_0x820911[_0x47ea('0xb0')]]){this['actions'][_0x820911[_0x47ea('0xb0')]][_0x47ea('0x76')]=_0x820911[_0x47ea('0x76')];}};Preview['prototype']['syncOriginateResponse']=function(_0x28a65e){var _0x4b4f53=this;var _0x29decc=this['actions'][_0x28a65e[_0x47ea('0x13d')]];if(_0x29decc){if(_0x29decc[_0x47ea('0x109')]&&this[_0x47ea('0x18')][_0x29decc['lookAgent']]){ut['logLookAgent'](_0x29decc,this['agents'][_0x29decc['lookAgent']]['name'],this[_0x47ea('0x18')][_0x29decc['lookAgent']]['id']);}var _0x50d608=_[_0x47ea('0x13e')](_0x29decc);_0x50d608[_0x47ea('0x13f')]=moment()['format'](_0x47ea('0x8d'));var _0x214ea7=_0x4b4f53[_0x47ea('0x14')][_0x29decc['queue']];if(ut['isFailure'](_0x28a65e[_0x47ea('0x140')])){if(_0x29decc[_0x47ea('0xae')]){rpcDb[_0x47ea('0x11a')](_0x29decc[_0x47ea('0x10d')]);}if(_0x29decc[_0x47ea('0xaf')]){rpcDb[_0x47ea('0x8b')](_0x29decc[_0x47ea('0x10d')]);}ami['emit']('custom:agentringnoanswer',ut[_0x47ea('0xb6')](_0x29decc,_0x47ea('0x141'),this[_0x47ea('0x14')][_0x29decc['queue']]));this[_0x47ea('0xf9')](_0x50d608,_0x214ea7,_0x28a65e);}else{_0x29decc[_0x47ea('0x8c')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');ut[_0x47ea('0xfc')](_0x50d608,0x4,_0x47ea('0xbb'));rpcDb[_0x47ea('0xfe')](_0x50d608,_0x47ea('0x142'));}}};Preview[_0x47ea('0xf')]['syncHangup']=function(_0x503510){var _0x3eb109=this;var _0x200618=this[_0x47ea('0x17')][_0x503510[_0x47ea('0xb0')]];var _0x26ef12;if(_0x200618){_0x26ef12=this['campaignsPreview'][_0x200618[_0x47ea('0x6d')]];logger[_0x47ea('0x6a')](_0x47ea('0x143'),_0x503510[_0x47ea('0xb0')],_0x47ea('0xb5'),_0x26ef12[_0x47ea('0x2a')],'pTalking:\x20',_0x26ef12[_0x47ea('0x2e')]);}if(this[_0x47ea('0x17')][_0x503510[_0x47ea('0xb0')]]&&_0x503510['linkedid']!==_0x503510[_0x47ea('0xb4')]){if(_0x503510[_0x47ea('0x144')]==='16'&&this[_0x47ea('0x17')][_0x503510[_0x47ea('0xb0')]][_0x47ea('0xf5')]){this[_0x47ea('0x9f')](_0x503510,_0x503510['linkedid'],_0x503510[_0x47ea('0x144')]);}else if(this['actions'][_0x503510[_0x47ea('0xb0')]][_0x47ea('0xf5')]){logger[_0x47ea('0x6a')](_0x47ea('0x145'),_0x503510[_0x47ea('0xb0')],_0x503510[_0x47ea('0x144')],_0x47ea('0xb5'),_0x26ef12[_0x47ea('0x2a')],_0x47ea('0x6f'),_0x26ef12[_0x47ea('0x2e')]);this[_0x47ea('0x9f')](_0x503510,_0x503510['linkedid'],_0x503510['cause']);}}else if(_0x200618&&_['isNil'](_0x200618[_0x47ea('0x146')])&&_0x26ef12['dialQueueProject']&&_0x503510['linkedid']===_0x503510['uniqueid']&&_[_0x47ea('0x69')](_0x503510[_0x47ea('0x147')])&&_0x503510[_0x47ea('0x144')]==='16'&&_0x503510[_0x47ea('0x148')]==='6'&&_['isUndefined'](_0x200618[_0x47ea('0x149')])){if(_0x200618[_0x47ea('0xae')]){rpcDb['unlockContact'](_0x200618[_0x47ea('0x10d')]);}if(_0x200618[_0x47ea('0xaf')]){rpcDb[_0x47ea('0x8b')](_0x200618[_0x47ea('0x10d')]);}_0x503510[_0x47ea('0x147')]='22';this[_0x47ea('0xf9')](_0x200618,_0x26ef12,_0x503510);}else if(_0x200618&&_0x200618['transfer']){if(_0x503510['cause']==='16'&&this[_0x47ea('0x17')][_0x503510[_0x47ea('0xb0')]][_0x47ea('0xf5')]){logger[_0x47ea('0x6a')](_0x47ea('0x14a'),_0x503510[_0x47ea('0xb0')],_0x503510['cause'],_0x47ea('0xb5'),_0x26ef12[_0x47ea('0x2a')],'pTalking:\x20',_0x26ef12['pTalking']);this['callProgressDetectingCustomer'](_0x503510,_0x503510[_0x47ea('0xb0')],_0x503510[_0x47ea('0x144')]);}else if(this[_0x47ea('0x17')][_0x503510['linkedid']][_0x47ea('0xf5')]){logger[_0x47ea('0x6a')](_0x47ea('0x145'),_0x503510['linkedid'],_0x503510[_0x47ea('0x144')],_0x47ea('0xb5'),_0x26ef12[_0x47ea('0x2a')],_0x47ea('0x6f'),_0x26ef12['pTalking']);this['callProgressDetectingCustomer'](_0x503510,_0x503510[_0x47ea('0xb0')],_0x503510[_0x47ea('0x144')]);}}};Preview[_0x47ea('0xf')][_0x47ea('0x20')]=function(_0x23fcbf){if(this[_0x47ea('0x17')][_0x23fcbf[_0x47ea('0xf8')]]&&_0x23fcbf[_0x47ea('0xf8')]!==_0x23fcbf[_0x47ea('0x14b')]){this[_0x47ea('0x9f')](_0x23fcbf,_0x23fcbf[_0x47ea('0xf8')],_0x23fcbf[_0x47ea('0xee')]);}};Preview[_0x47ea('0xf')]['syncHangupRequest']=function(_0x332fc5){if(this[_0x47ea('0x17')][_0x332fc5[_0x47ea('0xb0')]]&&_0x332fc5[_0x47ea('0xb0')]!==_0x332fc5[_0x47ea('0xb4')]&&!this[_0x47ea('0x17')][_0x332fc5['linkedid']][_0x47ea('0xf5')]){if(_0x332fc5[_0x47ea('0x144')]==='1'){this['callProgressDetectingCustomer'](_0x332fc5,_0x332fc5[_0x47ea('0xb0')],_0x332fc5['cause']);}}};Preview['prototype'][_0x47ea('0x14c')]=function(_0x4310b6,_0x19f5b8,_0x3b3057){if(this[_0x47ea('0x17')][_0x4310b6]){if(_[_0x47ea('0x69')](this[_0x47ea('0x17')][_0x4310b6][_0x47ea('0x14d')])){this[_0x47ea('0x17')][_0x4310b6]['variables']={};}this[_0x47ea('0x17')][_0x4310b6][_0x47ea('0x14d')][_0x19f5b8]=_0x3b3057;}};Preview[_0x47ea('0xf')]['syncVarSet']=function(_0x146dda){try{if(!_['isNil'](_0x146dda)){if(ut[_0x47ea('0x14e')](_[_0x47ea('0x14f')](_0x146dda[_0x47ea('0x150')])[0x0])){this['addVariable'](_0x146dda[_0x47ea('0xb4')],_[_0x47ea('0x14f')](_0x146dda[_0x47ea('0x150')])[0x0],_0x146dda[_0x47ea('0x151')]);}}}catch(_0x4d853b){logger[_0x47ea('0x152')]('[syncVarSet][Preview]',util[_0x47ea('0x153')](_0x4d853b,{'showHidden':![],'depth':null}));}};Preview[_0x47ea('0xf')][_0x47ea('0x24')]=function(_0x4beb25){if(_0x4beb25){if(this[_0x47ea('0x17')][_0x4beb25[_0x47ea('0x154')]]){this[_0x47ea('0x17')][_0x4beb25['transfertargetlinkedid']][_0x47ea('0x149')]=!![];}}};Preview[_0x47ea('0xf')]['syncBlindTransfer']=function(_0x35fa0e){if(_0x35fa0e){if(this['actions'][_0x35fa0e['transfererlinkedid']]){this[_0x47ea('0x17')][_0x35fa0e['transfererlinkedid']][_0x47ea('0x149')]=!![];}}};module[_0x47ea('0x155')]=Preview; \ No newline at end of file diff --git a/server/services/ami/preview/rpcDb.js b/server/services/ami/preview/rpcDb.js index 9952018..272105b 100644 --- a/server/services/ami/preview/rpcDb.js +++ b/server/services/ami/preview/rpcDb.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5daf=['endtime','connectedlinename','membername','context','from-sip','exten','xcally-motion-preview','holdtime','lastAssignedTo','COMPLETED','create','[voiceQueueReport]\x20','getContactRecallMe','[GetContactRecallMe]\x20','../../../config/logger','preview','lodash','../rpc/cmHopper','../rpc/cmHopperHistory','../rpc/cmHopperBlack','../rpc/voiceQueueRt','../rpc/voiceQueueReport','inspect','resolve','then','createHistory','catch','[createHistory]\x20','moveContactManagedDialer','[moveContactManagedDialer]\x20','checkIsBlackList','[checkIsBlackList]\x20','getContactPreview','[getContactPreview]\x20','createAgentHistory','createCustomerHistory','UserId','active','rescheduleContact','[rescheduleContact]\x20','countReScheduled','[countReScheduled]\x20','unlockContact','[unlockContact]\x20','disableContact','type','uniqueid','calleridnum','queuecallerjoinAt','answertime','queuecallerleaveAt','queuecallercomplete'];(function(_0x5e618b,_0x4589f6){var _0x29665c=function(_0x218048){while(--_0x218048){_0x5e618b['push'](_0x5e618b['shift']());}};_0x29665c(++_0x4589f6);}(_0x5daf,0x1ae));var _0xf5da=function(_0x5ea7cb,_0x1864cf){_0x5ea7cb=_0x5ea7cb-0x0;var _0x417ec7=_0x5daf[_0x5ea7cb];return _0x417ec7;};'use strict';var util=require('util');var BPromise=require('bluebird');var logger=require(_0xf5da('0x0'))(_0xf5da('0x1'));var _=require(_0xf5da('0x2'));var cmHopper=require(_0xf5da('0x3'));var cmHopperFinal=require('../rpc/cmHopperFinal');var cmHopperHistory=require(_0xf5da('0x4'));var cmHopperBlack=require(_0xf5da('0x5'));var voiceQueueRt=require(_0xf5da('0x6'));var agentReportPreview=require('../rpc/agentReportPreview');var voiceQueueReport=require(_0xf5da('0x7'));function loggerCatch(_0x5da156){return function(_0x1f7483){logger['error'](_0x5da156,util[_0xf5da('0x8')](_0x1f7483,{'showHidden':![],'depth':null}));};}function create(_0x289948){return BPromise[_0xf5da('0x9')]()[_0xf5da('0xa')](cmHopperHistory[_0xf5da('0xb')](_0x289948))[_0xf5da('0xc')](loggerCatch('[createHistory]\x20'));}function createAgent(_0x305f33){return BPromise['resolve']()[_0xf5da('0xa')](agentReportPreview[_0xf5da('0xb')](_0x305f33))[_0xf5da('0xc')](loggerCatch(_0xf5da('0xd')));}function moveContact(_0xe484e){return BPromise[_0xf5da('0x9')]()[_0xf5da('0xa')](cmHopper[_0xf5da('0xe')](_0xe484e,!![]))[_0xf5da('0xc')](loggerCatch(_0xf5da('0xf')));}exports[_0xf5da('0x10')]=function(_0x486b34){return BPromise[_0xf5da('0x9')]()[_0xf5da('0xa')](cmHopperBlack['checkIsBlackList'](_0x486b34))[_0xf5da('0xc')](loggerCatch(_0xf5da('0x11')));};exports[_0xf5da('0x12')]=function(_0x3d943a){return BPromise[_0xf5da('0x9')]()[_0xf5da('0xa')](cmHopper[_0xf5da('0x12')](_0x3d943a))[_0xf5da('0xc')](loggerCatch(_0xf5da('0x13')));};exports[_0xf5da('0xb')]=function(_0x5a7f92,_0x140d33){create(_0x5a7f92)[_0xf5da('0xc')](loggerCatch(_0x140d33));moveContact(_0x5a7f92)[_0xf5da('0xc')](loggerCatch(_0x140d33));};exports[_0xf5da('0x14')]=function(_0x37cd96,_0x2148aa){createAgent(_0x37cd96)[_0xf5da('0xc')](loggerCatch(_0x2148aa));};exports[_0xf5da('0x15')]=function(_0x3095ed,_0x3603f6){create(_0x3095ed)[_0xf5da('0xc')](loggerCatch(_0x3603f6));};exports['createCustomerFinal']=function(_0x552442,_0x8bc960){moveContact(_0x552442)[_0xf5da('0xc')](loggerCatch(_0x8bc960));};exports['rescheduleContact']=function(_0xe8df0f,_0x29faf0,_0x3e4907){if(_0x29faf0){_0xe8df0f[_0xf5da('0x16')]=null;}if(_0x3e4907){_0xe8df0f[_0xf5da('0x17')]=![];}return BPromise['resolve']()[_0xf5da('0xa')](cmHopper[_0xf5da('0x18')](_0xe8df0f))[_0xf5da('0xc')](loggerCatch(_0xf5da('0x19')));};exports[_0xf5da('0x1a')]=function(_0x49097b){return BPromise['resolve']()[_0xf5da('0xa')](cmHopper[_0xf5da('0x1a')](_0x49097b))['catch'](loggerCatch(_0xf5da('0x1b')));};exports[_0xf5da('0x1c')]=function(_0x22c06f){return BPromise[_0xf5da('0x9')]()['then'](cmHopper['unlockContact']({'UserId':null},_0x22c06f,0x1))[_0xf5da('0xc')](loggerCatch(_0xf5da('0x1d')));};exports[_0xf5da('0x1e')]=function(_0x4650df){return BPromise['resolve']()['then'](cmHopper[_0xf5da('0x1c')]({'active':![]},_0x4650df,0x1))['catch'](loggerCatch('[activeContact]\x20'));};exports['crateCustomerReportQueue']=function(_0x3a989f){var _0x112e10={};_0x112e10['type']=_0x3a989f[_0xf5da('0x1f')];_0x112e10[_0xf5da('0x20')]=_0x3a989f[_0xf5da('0x20')];_0x112e10['calleridnum']=_0x3a989f[_0xf5da('0x21')];_0x112e10['calleridname']=_0x3a989f['calleridname'];_0x112e10['queue']=_0x3a989f['queue'];_0x112e10[_0xf5da('0x22')]=_0x3a989f[_0xf5da('0x23')];_0x112e10[_0xf5da('0x24')]=_0x3a989f[_0xf5da('0x23')];_0x112e10[_0xf5da('0x25')]=0x1;_0x112e10['queuecallercompleteAt']=_0x3a989f[_0xf5da('0x26')];_0x112e10[_0xf5da('0x27')]=_0x3a989f[_0xf5da('0x28')];_0x112e10[_0xf5da('0x29')]=_0xf5da('0x2a');_0x112e10[_0xf5da('0x2b')]=_0xf5da('0x2c');_0x112e10[_0xf5da('0x2d')]=0x0;_0x112e10['assigned']=0x1;_0x112e10[_0xf5da('0x2e')]=_0x3a989f[_0xf5da('0x28')];_0x112e10['queuecallerexitreason']=_0xf5da('0x2f');return BPromise['resolve']()['then'](voiceQueueReport[_0xf5da('0x30')](_0x112e10))[_0xf5da('0xc')](loggerCatch(_0xf5da('0x31')));};exports[_0xf5da('0x32')]=function(_0x2b7be1,_0xda6890){return BPromise[_0xf5da('0x9')]()[_0xf5da('0xa')](cmHopper['getContactRecallMe'](_0x2b7be1,_0xda6890))['catch'](loggerCatch(_0xf5da('0x33')));};exports['rescheduleContactInQueue']=function(_0x43c962){return BPromise[_0xf5da('0x9')]()[_0xf5da('0xa')](cmHopper['rescheduleContact'](_0x43c962,!![],!![]))[_0xf5da('0xc')](loggerCatch('[rescheduleContactInQueue]\x20'));}; \ No newline at end of file +var _0x4efd=['resolve','createHistory','catch','[createHistory]\x20','then','moveContactManagedDialer','[moveContactManagedDialer]\x20','checkIsBlackList','[checkIsBlackList]\x20','getContactPreview','[getContactPreview]\x20','createCustomerFinal','rescheduleContact','UserId','active','[rescheduleContact]\x20','countReScheduled','[countReScheduled]\x20','[unlockContact]\x20','disableContact','unlockContact','crateCustomerReportQueue','type','uniqueid','calleridnum','calleridname','queue','queuecallerjoinAt','answertime','queuecallercomplete','queuecallercompleteAt','endtime','connectedlinename','membername','context','exten','xcally-motion-preview','holdtime','assigned','lastAssignedTo','queuecallerexitreason','create','[voiceQueueReport]\x20','getContactRecallMe','rescheduleContactInQueue','util','../rpc/cmHopper','../rpc/cmHopperFinal','../rpc/cmHopperHistory','../rpc/cmHopperBlack','../rpc/voiceQueueRt','../rpc/agentReportPreview','../rpc/voiceQueueReport','error','inspect'];(function(_0x13ce0c,_0x3f2a0d){var _0x4388fb=function(_0x27db4b){while(--_0x27db4b){_0x13ce0c['push'](_0x13ce0c['shift']());}};_0x4388fb(++_0x3f2a0d);}(_0x4efd,0x1e5));var _0xd4ef=function(_0x57d370,_0x3ed0f6){_0x57d370=_0x57d370-0x0;var _0x550fd2=_0x4efd[_0x57d370];return _0x550fd2;};'use strict';var util=require(_0xd4ef('0x0'));var BPromise=require('bluebird');var logger=require('../../../config/logger')('preview');var _=require('lodash');var cmHopper=require(_0xd4ef('0x1'));var cmHopperFinal=require(_0xd4ef('0x2'));var cmHopperHistory=require(_0xd4ef('0x3'));var cmHopperBlack=require(_0xd4ef('0x4'));var voiceQueueRt=require(_0xd4ef('0x5'));var agentReportPreview=require(_0xd4ef('0x6'));var voiceQueueReport=require(_0xd4ef('0x7'));function loggerCatch(_0x91fbd5){return function(_0x2e6fc5){logger[_0xd4ef('0x8')](_0x91fbd5,util[_0xd4ef('0x9')](_0x2e6fc5,{'showHidden':![],'depth':null}));};}function create(_0x1ea9ad){return BPromise[_0xd4ef('0xa')]()['then'](cmHopperHistory[_0xd4ef('0xb')](_0x1ea9ad))[_0xd4ef('0xc')](loggerCatch(_0xd4ef('0xd')));}function createAgent(_0x94245b){return BPromise[_0xd4ef('0xa')]()[_0xd4ef('0xe')](agentReportPreview['createHistory'](_0x94245b))['catch'](loggerCatch(_0xd4ef('0xd')));}function moveContact(_0x56d3bd){return BPromise[_0xd4ef('0xa')]()['then'](cmHopper[_0xd4ef('0xf')](_0x56d3bd,!![]))[_0xd4ef('0xc')](loggerCatch(_0xd4ef('0x10')));}exports[_0xd4ef('0x11')]=function(_0x462612){return BPromise[_0xd4ef('0xa')]()[_0xd4ef('0xe')](cmHopperBlack[_0xd4ef('0x11')](_0x462612))['catch'](loggerCatch(_0xd4ef('0x12')));};exports['getContactPreview']=function(_0xdaadc0){return BPromise[_0xd4ef('0xa')]()[_0xd4ef('0xe')](cmHopper[_0xd4ef('0x13')](_0xdaadc0))[_0xd4ef('0xc')](loggerCatch(_0xd4ef('0x14')));};exports['createHistory']=function(_0x656255,_0x35dc95){create(_0x656255)[_0xd4ef('0xc')](loggerCatch(_0x35dc95));moveContact(_0x656255)[_0xd4ef('0xc')](loggerCatch(_0x35dc95));};exports['createAgentHistory']=function(_0x9171d0,_0x457a2c){createAgent(_0x9171d0)['catch'](loggerCatch(_0x457a2c));};exports['createCustomerHistory']=function(_0x30e76b,_0x23c3b1){create(_0x30e76b)[_0xd4ef('0xc')](loggerCatch(_0x23c3b1));};exports[_0xd4ef('0x15')]=function(_0x412b75,_0x1bd689){moveContact(_0x412b75)[_0xd4ef('0xc')](loggerCatch(_0x1bd689));};exports[_0xd4ef('0x16')]=function(_0xa88a19,_0xffb6c8,_0x15fffe){if(_0xffb6c8){_0xa88a19[_0xd4ef('0x17')]=null;}if(_0x15fffe){_0xa88a19[_0xd4ef('0x18')]=![];}return BPromise[_0xd4ef('0xa')]()[_0xd4ef('0xe')](cmHopper[_0xd4ef('0x16')](_0xa88a19))[_0xd4ef('0xc')](loggerCatch(_0xd4ef('0x19')));};exports[_0xd4ef('0x1a')]=function(_0x391882){return BPromise[_0xd4ef('0xa')]()['then'](cmHopper[_0xd4ef('0x1a')](_0x391882))['catch'](loggerCatch(_0xd4ef('0x1b')));};exports['unlockContact']=function(_0x11c0c4){return BPromise[_0xd4ef('0xa')]()[_0xd4ef('0xe')](cmHopper['unlockContact']({'UserId':null},_0x11c0c4,0x1))['catch'](loggerCatch(_0xd4ef('0x1c')));};exports[_0xd4ef('0x1d')]=function(_0x2a6ad5){return BPromise[_0xd4ef('0xa')]()[_0xd4ef('0xe')](cmHopper[_0xd4ef('0x1e')]({'active':![]},_0x2a6ad5,0x1))[_0xd4ef('0xc')](loggerCatch('[activeContact]\x20'));};exports[_0xd4ef('0x1f')]=function(_0x272259){var _0xac095d={};_0xac095d[_0xd4ef('0x20')]=_0x272259['type'];_0xac095d['uniqueid']=_0x272259[_0xd4ef('0x21')];_0xac095d[_0xd4ef('0x22')]=_0x272259[_0xd4ef('0x22')];_0xac095d[_0xd4ef('0x23')]=_0x272259['calleridname'];_0xac095d['queue']=_0x272259[_0xd4ef('0x24')];_0xac095d[_0xd4ef('0x25')]=_0x272259[_0xd4ef('0x26')];_0xac095d['queuecallerleaveAt']=_0x272259[_0xd4ef('0x26')];_0xac095d[_0xd4ef('0x27')]=0x1;_0xac095d[_0xd4ef('0x28')]=_0x272259[_0xd4ef('0x29')];_0xac095d[_0xd4ef('0x2a')]=_0x272259[_0xd4ef('0x2b')];_0xac095d[_0xd4ef('0x2c')]='from-sip';_0xac095d[_0xd4ef('0x2d')]=_0xd4ef('0x2e');_0xac095d[_0xd4ef('0x2f')]=0x0;_0xac095d[_0xd4ef('0x30')]=0x1;_0xac095d[_0xd4ef('0x31')]=_0x272259[_0xd4ef('0x2b')];_0xac095d[_0xd4ef('0x32')]='COMPLETED';return BPromise[_0xd4ef('0xa')]()[_0xd4ef('0xe')](voiceQueueReport[_0xd4ef('0x33')](_0xac095d))[_0xd4ef('0xc')](loggerCatch(_0xd4ef('0x34')));};exports[_0xd4ef('0x35')]=function(_0x45364a,_0x5b84f0){return BPromise['resolve']()[_0xd4ef('0xe')](cmHopper[_0xd4ef('0x35')](_0x45364a,_0x5b84f0))[_0xd4ef('0xc')](loggerCatch('[GetContactRecallMe]\x20'));};exports[_0xd4ef('0x36')]=function(_0x25fb3c){return BPromise[_0xd4ef('0xa')]()[_0xd4ef('0xe')](cmHopper['rescheduleContact'](_0x25fb3c,!![],!![]))[_0xd4ef('0xc')](loggerCatch('[rescheduleContactInQueue]\x20'));}; \ No newline at end of file diff --git a/server/services/ami/preview/util/util.js b/server/services/ami/preview/util/util.js index 9e9abdb..95a1451 100644 --- a/server/services/ami/preview/util/util.js +++ b/server/services/ami/preview/util/util.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xcc23=['[updateOriginated]\x20is\x20null\x20or\x20undefined','logBlacklist','YYYY-MM-DD\x20HH:mm:ss','state','statedesc','starttime','responsetime','endtime','ringtime','logLookAgent','UserId','logCustomer','talktime','answertime','Failure','RECALL','BOOKED','uniqueid','channelAgent','from-sip','timeout','totalGlobal','countcongestionretry','countnoanswerretry','countagentrejectretry','countnosuchnumberretry','cloneAction','clone','Global','scheduledAt','active','scheduledat','add','ListId','VoiceQueueId','decrementTalkink','pTalking','[decrementTalkink]\x20object\x20talking\x20is\x20negative','IsNotLoggedIn','buildObj','queue','interface','mandatoryDisposition','buildAcw','agentReadyId','not_inuse','status','reachable','push','getDiff','CampaignId','type','campaigntype','membername','countglobal','callback','callbackuniqueid','callbackat','recallme','sipcallid','xmd-voicequeueid','xmd-queue','xmd-phone','xmd-listid','xmd-dialtimeout','xmd-dialoptions','xmd-dialchannel','xmd-contactid','xmd-cdrtype','xmd-agiafter','xmd-agi','rtpaudioqosjitterbridged','rtpaudioqosloss','rtpaudioqoslossbridged','rtpaudioqosrttbridged','rtpaudioqos','rtpaudioqosjitter','bridgepeer','getCallerIdRandom','\x5cw{0,','random','extractCalleridName','match','extractCalleridNumber','util','lodash','moment','../../../../config/logger','preview','env','XCALLY_IP_AGI','milliseconds','diff','seconds','logger','info','inspect','loggerError','error','getCallerId','isUndefined','string','isEmpty','format','\x22%s\x22\x20<%s>','addVariables','Queue','name','calleridname','calleridnum','ContactId','dialer','dialOriginateTimeout','\x22rtTxX%s%s\x22','monitor_format','dialPreviewUrl','dialQueueProject','NONE','dialQueueProject2','\x22agi://%s/square,%s\x22','originatecalleridnum','originatecalleridname','xcally-motion-preview','_XCALLY_MIXMONITOR_FORMAT','_XCALLY_MIXMONITOR_UNIQUEID','Contact','hasOwnProperty','isNil','tags','updatedAt','XMD-','toUpper','toLower','updateOriginated','originated','[updateOriginated]\x20object\x20originated\x20is\x20negative'];(function(_0x5d5527,_0x19359e){var _0x30d801=function(_0x59ba97){while(--_0x59ba97){_0x5d5527['push'](_0x5d5527['shift']());}};_0x30d801(++_0x19359e);}(_0xcc23,0x1ec));var _0x3cc2=function(_0xf168d3,_0x43dcfc){_0xf168d3=_0xf168d3-0x0;var _0x17fb54=_0xcc23[_0xf168d3];return _0x17fb54;};'use strict';var util=require(_0x3cc2('0x0'));var _=require(_0x3cc2('0x1'));var moment=require(_0x3cc2('0x2'));var logger=require(_0x3cc2('0x3'))(_0x3cc2('0x4'));var ipAgi=process[_0x3cc2('0x5')][_0x3cc2('0x6')]||'127.0.0.1';function getSeconds(_0x407f9e,_0x46268a){var _0x587291=moment(_0x407f9e)[_0x3cc2('0x7')](0x0);var _0x809bab=moment(_0x46268a)[_0x3cc2('0x7')](0x0);return _0x587291[_0x3cc2('0x8')](_0x809bab,_0x3cc2('0x9'));}exports['loggerCatch']=function(_0x306c13){return function(_0x156ddf){logger['error'](_0x306c13,util['inspect'](_0x156ddf,{'showHidden':![],'depth':null}));};};exports[_0x3cc2('0xa')]=function(_0x1cc270,_0x3f8e43){logger[_0x3cc2('0xb')](_0x1cc270,util[_0x3cc2('0xc')](_0x3f8e43,{'showHidden':![],'depth':null}));};exports[_0x3cc2('0xd')]=function(_0x29af25,_0x5f01a8){logger[_0x3cc2('0xe')](_0x29af25,util[_0x3cc2('0xc')](_0x5f01a8,{'showHidden':![],'depth':null}));};exports['logger2']=function(_0x37c11b){return function(_0x35c5bf){logger['info'](_0x37c11b,util[_0x3cc2('0xc')](_0x35c5bf,{'showHidden':![],'depth':null}));};};exports['message']=function(_0x30c442,_0x5bd6d6,_0x4c13e7){return{'message':_0x30c442,'unlock':_0x5bd6d6,'active':_0x4c13e7};};exports[_0x3cc2('0xf')]=function(_0x3a4a5f,_0x28a75b,_0x1594ba){if(!_[_0x3cc2('0x10')](_0x1594ba)&&_0x3cc2('0x11')===typeof _0x1594ba&&!_[_0x3cc2('0x12')](_0x1594ba)){if(!_[_0x3cc2('0x10')](_0x28a75b)&&'string'===typeof _0x28a75b&&!_['isEmpty'](_0x28a75b)){return util[_0x3cc2('0x13')](_0x3cc2('0x14'),_0x28a75b,_0x1594ba);}return util[_0x3cc2('0x13')](_0x3cc2('0x14'),_0x1594ba,_0x1594ba);}if(!_['isUndefined'](_0x3a4a5f)&&_0x3cc2('0x11')===typeof _0x3a4a5f&&!_['isEmpty'](_0x3a4a5f)){return _0x3a4a5f;}return'\x22\x22\x20<>';};exports['isActive']=function(_0x27b1e6){if(_['isNil'](_0x27b1e6)){return![];}return _0x27b1e6;};exports[_0x3cc2('0x15')]=function(_0x146a69,_0x393d4b,_0x431f5d,_0x504b9e,_0x3cc32d,_0x1a6db5){var _0x4ff904={'XMD-QUEUE':_0x393d4b['Queue']?_0x393d4b[_0x3cc2('0x16')][_0x3cc2('0x17')]:'','XMD-CALLERID':_0x504b9e,'XMD-CALLERID-PREVIEW':_0x1a6db5?util['format'](_0x3cc2('0x14'),_0x1a6db5[_0x3cc2('0x18')],_0x1a6db5[_0x3cc2('0x19')]):_0x504b9e,'XMD-DIALID':_0x3cc32d,'XMD-CONTACTID':_0x393d4b[_0x3cc2('0x1a')],'XMD-CDRTYPE':_0x3cc2('0x1b'),'CALLERID(all)':_0x504b9e,'XMD-VOICEQUEUEID':_0x393d4b['VoiceQueueId'],'XMD-DIALCHANNEL':_0x431f5d,'XMD-DIALTIMEOUT':_0x146a69[_0x3cc2('0x1c')]||0x1e,'XMD-DIALOPTIONS':util[_0x3cc2('0x13')](_0x3cc2('0x1d'),_0x146a69['dialQueueProject2']?'g':'',_[_0x3cc2('0x12')](_0x146a69[_0x3cc2('0x1e')])?'':'U(xcally-mixmonitor-context)'),'XMD-DIALURL':_0x146a69[_0x3cc2('0x1f')]||'','XMD-AGI':_0x146a69[_0x3cc2('0x20')]?util[_0x3cc2('0x13')]('\x22agi://%s/square,%s\x22',ipAgi,_0x146a69[_0x3cc2('0x20')]):_0x3cc2('0x21'),'XMD-AGIAFTER':_0x146a69[_0x3cc2('0x22')]?util['format'](_0x3cc2('0x23'),ipAgi,_0x146a69[_0x3cc2('0x22')]):_0x3cc2('0x21'),'XMD-ORIGINATECALLERIDNUM':_0x1a6db5?_0x1a6db5[_0x3cc2('0x24')]:'','XMD-ORIGINATECALLERIDNAME':_0x1a6db5?_0x1a6db5[_0x3cc2('0x25')]:'','XMD-DESTINATION':_0x3cc2('0x26')};if(!_[_0x3cc2('0x12')](_0x146a69[_0x3cc2('0x1e')])){_0x4ff904[util[_0x3cc2('0x13')]('%s',_0x3cc2('0x27'))]=_0x146a69[_0x3cc2('0x1e')];_0x4ff904[util['format']('%s',_0x3cc2('0x28'))]=_0x3cc32d;}if(_0x393d4b&&_0x393d4b[_0x3cc2('0x29')]){for(var _0x3a88d3 in _0x393d4b[_0x3cc2('0x29')]){if(_0x393d4b[_0x3cc2('0x29')][_0x3cc2('0x2a')](_0x3a88d3)){if(!_[_0x3cc2('0x2b')](_0x393d4b[_0x3cc2('0x29')][_0x3a88d3])&&_0x3a88d3!=='id'&&_0x3a88d3!==_0x3cc2('0x2c')&&_0x3a88d3!=='createdAt'&&_0x3a88d3!==_0x3cc2('0x2d')){_0x4ff904[util['format']('%s%s',_0x3cc2('0x2e'),_[_0x3cc2('0x2f')](_0x3a88d3))]=_0x393d4b[_0x3cc2('0x29')][_0x3a88d3];}}}}return _0x4ff904;};exports['toLowerVariables']=function(_0x5c6467){var _0x447020={};for(var _0x58dba5 in _0x5c6467){if(_0x5c6467[_0x3cc2('0x2a')](_0x58dba5)){_0x447020[util[_0x3cc2('0x13')]('%s',_[_0x3cc2('0x30')](_0x58dba5))]=_0x5c6467[_0x58dba5];}}return{'variables':_0x447020};};exports[_0x3cc2('0x31')]=function(_0x40cc30,_0x4248d0){if(!_[_0x3cc2('0x2b')](_0x40cc30)){if(_0x40cc30[_0x3cc2('0x2a')]('originated')){if(_0x40cc30['originated']>0x0){_0x40cc30[_0x3cc2('0x32')]-=0x1;}else{logger['error'](_0x3cc2('0x33'),_0x4248d0);}}}else{logger[_0x3cc2('0xe')](_0x3cc2('0x34'),_0x4248d0);}};exports[_0x3cc2('0x35')]=function(_0x25a848){var _0x9c7d12=moment()[_0x3cc2('0x13')](_0x3cc2('0x36'));_0x25a848[_0x3cc2('0x37')]=0xd;_0x25a848[_0x3cc2('0x38')]='Blacklist';_0x25a848[_0x3cc2('0x39')]=_0x9c7d12;_0x25a848[_0x3cc2('0x3a')]=_0x9c7d12;_0x25a848[_0x3cc2('0x3b')]=_0x9c7d12;};exports['logAgent']=function(_0x1cb556,_0x506869,_0x1e7ead){var _0x2c6a5f=moment()[_0x3cc2('0x13')]('YYYY-MM-DD\x20HH:mm:ss');_0x1cb556['state']=_0x506869;_0x1cb556[_0x3cc2('0x38')]=_0x1e7ead;_0x1cb556[_0x3cc2('0x3a')]=_0x2c6a5f;_0x1cb556[_0x3cc2('0x3c')]=getSeconds(_0x1cb556[_0x3cc2('0x3a')],_0x1cb556[_0x3cc2('0x39')]);};exports[_0x3cc2('0x3d')]=function(_0x19c579,_0x44a46c,_0x4640ba){_0x19c579['membername']=_0x44a46c;_0x19c579[_0x3cc2('0x3e')]=_0x4640ba;};exports[_0x3cc2('0x3f')]=function(_0x488dc6,_0x320aa8,_0x4c986a){var _0x37d08b=moment()[_0x3cc2('0x13')]('YYYY-MM-DD\x20HH:mm:ss');_0x488dc6[_0x3cc2('0x37')]=_0x320aa8;_0x488dc6[_0x3cc2('0x38')]=_0x4c986a;_0x488dc6[_0x3cc2('0x3a')]=_0x488dc6['responsetime']?_0x488dc6['responsetime']:_0x37d08b;_0x488dc6[_0x3cc2('0x3b')]=_0x488dc6[_0x3cc2('0x3b')]?_0x488dc6[_0x3cc2('0x3b')]:_0x37d08b;_0x488dc6[_0x3cc2('0x3c')]=getSeconds(_0x488dc6[_0x3cc2('0x3a')]||0x0,_0x488dc6[_0x3cc2('0x39')]||0x0);_0x488dc6[_0x3cc2('0x40')]=_0x488dc6[_0x3cc2('0x41')]?getSeconds(_0x488dc6[_0x3cc2('0x3b')],_0x488dc6[_0x3cc2('0x41')]):0x0;};exports['isFailure']=function(_0x5664d3){return _0x5664d3===_0x3cc2('0x42');};exports['variablesAction']=function(_0x4b4cba,_0x180fb2,_0x84e020,_0x49ca4d,_0x2288ee){var _0x307260=_0x49ca4d?_0x3cc2('0x43'):_0x4b4cba[_0x3cc2('0x18')];_0x307260=_0x2288ee?_0x3cc2('0x44'):_0x307260;return{'actionid':_0x4b4cba[_0x3cc2('0x45')],'action':'originate','channel':_0x4b4cba[_0x3cc2('0x46')],'callerid':util[_0x3cc2('0x13')]('\x22%s\x22\x20<%s>',_0x307260,_0x4b4cba[_0x3cc2('0x19')]),'Exten':_0x3cc2('0x26'),'Context':_0x3cc2('0x47'),'Priority':'1','variable':_0x84e020,'timeout':(_0x180fb2[_0x3cc2('0x48')]||0x1e)*0x3e8,'async':!![],'channelid':_0x4b4cba[_0x3cc2('0x45')]};};exports[_0x3cc2('0x49')]=function(_0x48c9d7){return _0x48c9d7['countbusyretry']+_0x48c9d7[_0x3cc2('0x4a')]+_0x48c9d7[_0x3cc2('0x4b')]+_0x48c9d7[_0x3cc2('0x4c')]+_0x48c9d7[_0x3cc2('0x4d')];};exports[_0x3cc2('0x4e')]=function(_0x2b56ee){var _0x3b4999=_[_0x3cc2('0x4f')](_0x2b56ee);_0x3b4999[_0x3cc2('0x37')]=0xf;_0x3b4999[_0x3cc2('0x38')]=_0x3cc2('0x50');return _0x3b4999;};exports[_0x3cc2('0x51')]=function(_0x34ef47,_0x4b11d2,_0x4ce12d){var _0x186e38={};_0x186e38[_0x4b11d2]=_0x34ef47[_0x4b11d2];_0x186e38[_0x3cc2('0x52')]=![];_0x186e38[_0x3cc2('0x53')]=moment()[_0x3cc2('0x54')](_0x4ce12d,'minutes')['format'](_0x3cc2('0x36'));_0x186e38['ContactId']=_0x34ef47[_0x3cc2('0x1a')];_0x186e38[_0x3cc2('0x55')]=_0x34ef47['ListId'];_0x186e38[_0x3cc2('0x56')]=_0x34ef47[_0x3cc2('0x56')]||undefined;return _0x186e38;};exports[_0x3cc2('0x57')]=function(_0x234e61,_0x33dd2e){if(!_[_0x3cc2('0x2b')](_0x234e61)){if(_0x234e61[_0x3cc2('0x58')]>0x0){_0x234e61['pTalking']-=0x1;}else{logger[_0x3cc2('0xe')](_0x33dd2e,_0x3cc2('0x59'));}}else{logger[_0x3cc2('0xe')](_0x33dd2e,'[decrementTalkink]\x20is\x20null\x20or\x20undefined');}};exports[_0x3cc2('0x5a')]=function(_0x1d3b3c){if(_0x1d3b3c<=0x0){return!![];}return![];};exports[_0x3cc2('0x5b')]=function(_0x38f9d5,_0x386d7f,_0x44147b){_0x38f9d5['lastevent']=_0x386d7f;_0x38f9d5['name']=_0x38f9d5[_0x3cc2('0x5c')];_0x38f9d5[_0x3cc2('0x5d')]=_0x38f9d5['channelAgent'];if(_0x44147b){_0x38f9d5[_0x3cc2('0x5e')]=_0x44147b[_0x3cc2('0x5e')];}return _0x38f9d5;};exports[_0x3cc2('0x5f')]=function(_0x4c9d2f){var _0x2abd7f={};_0x2abd7f[_0x3cc2('0x5c')]=_0x4c9d2f[_0x3cc2('0x5c')];_0x2abd7f[_0x3cc2('0x5d')]=_0x4c9d2f[_0x3cc2('0x46')];_0x2abd7f['uniqueid']=_0x4c9d2f[_0x3cc2('0x45')];return _0x2abd7f;};exports[_0x3cc2('0x60')]=function(_0x35529e){var _0x21540e=[];for(var _0x2a189a in _0x35529e){if(_0x35529e['hasOwnProperty'](_0x2a189a)){if(!_[_0x3cc2('0x2b')](_0x35529e[_0x2a189a])&&_0x35529e[_0x2a189a][_0x3cc2('0x37')]===_0x3cc2('0x61')&&_0x35529e[_0x2a189a][_0x3cc2('0x62')]===_0x3cc2('0x63')){_0x21540e[_0x3cc2('0x64')](_0x35529e[_0x2a189a]['id']);}}}return _0x21540e;};exports[_0x3cc2('0x65')]=function(_0x16fd4c){var _0x31b963=moment()[_0x3cc2('0x7')](0x0);var _0x109bb7=moment(_0x16fd4c)[_0x3cc2('0x7')](0x0);return _0x31b963[_0x3cc2('0x8')](_0x109bb7,_0x3cc2('0x9'));};exports['createBody']=function(_0x27a1f2){return{'active':![],'recallme':![],'UserId':null,'ContactId':_0x27a1f2['ContactId'],'ListId':_0x27a1f2[_0x3cc2('0x55')],'VoiceQueueId':_0x27a1f2['VoiceQueueId']||undefined,'CampaignId':_0x27a1f2[_0x3cc2('0x66')]||undefined};};exports['filterKey']=function(_0x4def0b){if(_0x4def0b===_0x3cc2('0x45')||_0x4def0b==='idContact'||_0x4def0b===_0x3cc2('0x5c')||_0x4def0b===_0x3cc2('0x67')||_0x4def0b===_0x3cc2('0x68')||_0x4def0b==='dialAnswer'||_0x4def0b===_0x3cc2('0x69')||_0x4def0b===_0x3cc2('0x46')||_0x4def0b==='calleridname'||_0x4def0b===_0x3cc2('0x52')||_0x4def0b===_0x3cc2('0x19')||_0x4def0b==='scheduledat'||_0x4def0b==='countbusyretry'||_0x4def0b===_0x3cc2('0x4a')||_0x4def0b==='countnoanswerretry'||_0x4def0b===_0x3cc2('0x6a')||_0x4def0b===_0x3cc2('0x6b')||_0x4def0b===_0x3cc2('0x6c')||_0x4def0b===_0x3cc2('0x6d')||_0x4def0b===_0x3cc2('0x6e')||_0x4def0b===_0x3cc2('0x1a')||_0x4def0b===_0x3cc2('0x55')||_0x4def0b===_0x3cc2('0x3e')||_0x4def0b===_0x3cc2('0x56')||_0x4def0b===_0x3cc2('0x6f')||_0x4def0b===_0x3cc2('0x70')||_0x4def0b===_0x3cc2('0x71')||_0x4def0b===_0x3cc2('0x72')||_0x4def0b===_0x3cc2('0x73')||_0x4def0b==='xmd-dialurl'||_0x4def0b===_0x3cc2('0x74')||_0x4def0b===_0x3cc2('0x75')||_0x4def0b==='xmd-dialid'||_0x4def0b===_0x3cc2('0x76')||_0x4def0b===_0x3cc2('0x77')||_0x4def0b===_0x3cc2('0x78')||_0x4def0b==='xmd-callerid'||_0x4def0b===_0x3cc2('0x79')||_0x4def0b===_0x3cc2('0x7a')||_0x4def0b==='rtpaudioqos'||_0x4def0b==='rtpaudioqosbridged'||_0x4def0b==='rtpaudioqosjitter'||_0x4def0b===_0x3cc2('0x7b')||_0x4def0b===_0x3cc2('0x7c')||_0x4def0b===_0x3cc2('0x7d')||_0x4def0b==='rtpaudioqosrtt'||_0x4def0b===_0x3cc2('0x7e')||_0x4def0b===_0x3cc2('0x7f')||_0x4def0b==='rtpaudioqosbridged'||_0x4def0b===_0x3cc2('0x80')||_0x4def0b==='rtpaudioqosjitterbridged'||_0x4def0b==='rtpaudioqosloss'||_0x4def0b==='rtpaudioqoslossbridged'||_0x4def0b==='rtpaudioqosrtt'||_0x4def0b===_0x3cc2('0x7e')||_0x4def0b===_0x3cc2('0x81')||_0x4def0b==='bridgepvtcallid'||_0x4def0b===_0x3cc2('0x37')||_0x4def0b===_0x3cc2('0x38')){return![];}return!![];};exports[_0x3cc2('0x82')]=function(_0x255e23,_0x242659){var _0xe22691,_0x453c1c,_0x217af9;if(_0x242659<=0x0){_0x242659=0x1;}_0xe22691=new RegExp(_0x3cc2('0x83')+_0x242659+'}$');_0x453c1c=Math['pow'](0xa,_0x242659-0x1);_0x217af9=Math['pow'](0xa,_0x242659)-0x1;return util[_0x3cc2('0x13')]('%s',_['replace'](_0x255e23,_0xe22691,_[_0x3cc2('0x84')](_0x453c1c,_0x217af9)));};exports[_0x3cc2('0x85')]=function(_0x5dc4ba){var _0x32ec62=_0x5dc4ba[_0x3cc2('0x86')](/"(.*?)"/);return _0x32ec62?_0x32ec62[0x1]:_0x5dc4ba;};exports[_0x3cc2('0x87')]=function(_0x53996c){var _0x2b8c2c=_0x53996c[_0x3cc2('0x86')](/<(.*?)>/);return _0x2b8c2c?_0x2b8c2c[0x1]:_0x53996c;}; \ No newline at end of file +var _0x7406=['xmd-cdrtype','xmd-agiafter','xmd-agi','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqosloss','rtpaudioqoslossbridged','rtpaudioqosrtt','rtpaudioqosrttbridged','bridgepeer','getCallerIdRandom','\x5cw{0,','pow','replace','random','extractCalleridName','match','extractCalleridNumber','util','lodash','../../../../config/logger','preview','env','XCALLY_IP_AGI','127.0.0.1','seconds','loggerCatch','error','inspect','logger','info','loggerError','logger2','message','getCallerId','isUndefined','string','isEmpty','format','\x22%s\x22\x20<%s>','\x22\x22\x20<>','isActive','addVariables','Queue','calleridname','calleridnum','ContactId','VoiceQueueId','dialOriginateTimeout','\x22rtTxX%s%s\x22','dialQueueProject2','monitor_format','dialPreviewUrl','dialQueueProject','\x22agi://%s/square,%s\x22','NONE','originatecalleridnum','xcally-motion-preview','_XCALLY_MIXMONITOR_FORMAT','_XCALLY_MIXMONITOR_UNIQUEID','Contact','hasOwnProperty','isNil','createdAt','updatedAt','toUpper','toLowerVariables','toLower','updateOriginated','originated','[updateOriginated]\x20is\x20null\x20or\x20undefined','logBlacklist','state','statedesc','responsetime','endtime','YYYY-MM-DD\x20HH:mm:ss','ringtime','starttime','logLookAgent','membername','logCustomer','talktime','answertime','RECALL','BOOKED','uniqueid','channelAgent','from-sip','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','cloneAction','scheduledAt','active','add','ListId','pTalking','[decrementTalkink]\x20is\x20null\x20or\x20undefined','IsNotLoggedIn','lastevent','name','queue','mandatoryDisposition','buildAcw','interface','agentReadyId','not_inuse','status','reachable','push','getDiff','milliseconds','diff','createBody','CampaignId','filterKey','idContact','type','campaigntype','dialAnswer','callback','callbackuniqueid','callbackat','recallme','UserId','sipcallid','xmd-phone','xmd-listid','xmd-dialtimeout','xmd-dialid','xmd-dialchannel','xmd-contactid'];(function(_0x3bdec4,_0x2d9b87){var _0x54c1e6=function(_0x32f389){while(--_0x32f389){_0x3bdec4['push'](_0x3bdec4['shift']());}};_0x54c1e6(++_0x2d9b87);}(_0x7406,0x124));var _0x6740=function(_0x58675f,_0x390355){_0x58675f=_0x58675f-0x0;var _0x1cc7f0=_0x7406[_0x58675f];return _0x1cc7f0;};'use strict';var util=require(_0x6740('0x0'));var _=require(_0x6740('0x1'));var moment=require('moment');var logger=require(_0x6740('0x2'))(_0x6740('0x3'));var ipAgi=process[_0x6740('0x4')][_0x6740('0x5')]||_0x6740('0x6');function getSeconds(_0x56ba7a,_0x2f235d){var _0x4353d4=moment(_0x56ba7a)['milliseconds'](0x0);var _0x43dc8a=moment(_0x2f235d)['milliseconds'](0x0);return _0x4353d4['diff'](_0x43dc8a,_0x6740('0x7'));}exports[_0x6740('0x8')]=function(_0x3294d9){return function(_0x326552){logger[_0x6740('0x9')](_0x3294d9,util[_0x6740('0xa')](_0x326552,{'showHidden':![],'depth':null}));};};exports[_0x6740('0xb')]=function(_0x126528,_0xd22ca7){logger[_0x6740('0xc')](_0x126528,util[_0x6740('0xa')](_0xd22ca7,{'showHidden':![],'depth':null}));};exports[_0x6740('0xd')]=function(_0x4565b9,_0x57620c){logger[_0x6740('0x9')](_0x4565b9,util[_0x6740('0xa')](_0x57620c,{'showHidden':![],'depth':null}));};exports[_0x6740('0xe')]=function(_0x5cc647){return function(_0x20c30f){logger[_0x6740('0xc')](_0x5cc647,util[_0x6740('0xa')](_0x20c30f,{'showHidden':![],'depth':null}));};};exports[_0x6740('0xf')]=function(_0x90d812,_0x59ca7c,_0x2d260c){return{'message':_0x90d812,'unlock':_0x59ca7c,'active':_0x2d260c};};exports[_0x6740('0x10')]=function(_0xb55356,_0x3fd777,_0xa8be2f){if(!_[_0x6740('0x11')](_0xa8be2f)&&_0x6740('0x12')===typeof _0xa8be2f&&!_[_0x6740('0x13')](_0xa8be2f)){if(!_['isUndefined'](_0x3fd777)&&_0x6740('0x12')===typeof _0x3fd777&&!_['isEmpty'](_0x3fd777)){return util[_0x6740('0x14')](_0x6740('0x15'),_0x3fd777,_0xa8be2f);}return util[_0x6740('0x14')](_0x6740('0x15'),_0xa8be2f,_0xa8be2f);}if(!_[_0x6740('0x11')](_0xb55356)&&'string'===typeof _0xb55356&&!_['isEmpty'](_0xb55356)){return _0xb55356;}return _0x6740('0x16');};exports[_0x6740('0x17')]=function(_0x17a723){if(_['isNil'](_0x17a723)){return![];}return _0x17a723;};exports[_0x6740('0x18')]=function(_0x96aae9,_0x4671ed,_0x2ce1a7,_0x399474,_0x278a16,_0x3a0d48){var _0x4096cd={'XMD-QUEUE':_0x4671ed[_0x6740('0x19')]?_0x4671ed[_0x6740('0x19')]['name']:'','XMD-CALLERID':_0x399474,'XMD-CALLERID-PREVIEW':_0x3a0d48?util[_0x6740('0x14')](_0x6740('0x15'),_0x3a0d48[_0x6740('0x1a')],_0x3a0d48[_0x6740('0x1b')]):_0x399474,'XMD-DIALID':_0x278a16,'XMD-CONTACTID':_0x4671ed[_0x6740('0x1c')],'XMD-CDRTYPE':'dialer','CALLERID(all)':_0x399474,'XMD-VOICEQUEUEID':_0x4671ed[_0x6740('0x1d')],'XMD-DIALCHANNEL':_0x2ce1a7,'XMD-DIALTIMEOUT':_0x96aae9[_0x6740('0x1e')]||0x1e,'XMD-DIALOPTIONS':util['format'](_0x6740('0x1f'),_0x96aae9[_0x6740('0x20')]?'g':'',_[_0x6740('0x13')](_0x96aae9[_0x6740('0x21')])?'':'U(xcally-mixmonitor-context)'),'XMD-DIALURL':_0x96aae9[_0x6740('0x22')]||'','XMD-AGI':_0x96aae9[_0x6740('0x23')]?util[_0x6740('0x14')](_0x6740('0x24'),ipAgi,_0x96aae9[_0x6740('0x23')]):_0x6740('0x25'),'XMD-AGIAFTER':_0x96aae9[_0x6740('0x20')]?util[_0x6740('0x14')]('\x22agi://%s/square,%s\x22',ipAgi,_0x96aae9['dialQueueProject2']):_0x6740('0x25'),'XMD-ORIGINATECALLERIDNUM':_0x3a0d48?_0x3a0d48[_0x6740('0x26')]:'','XMD-ORIGINATECALLERIDNAME':_0x3a0d48?_0x3a0d48['originatecalleridname']:'','XMD-DESTINATION':_0x6740('0x27')};if(!_[_0x6740('0x13')](_0x96aae9[_0x6740('0x21')])){_0x4096cd[util[_0x6740('0x14')]('%s',_0x6740('0x28'))]=_0x96aae9[_0x6740('0x21')];_0x4096cd[util[_0x6740('0x14')]('%s',_0x6740('0x29'))]=_0x278a16;}if(_0x4671ed&&_0x4671ed[_0x6740('0x2a')]){for(var _0x409e6e in _0x4671ed[_0x6740('0x2a')]){if(_0x4671ed[_0x6740('0x2a')][_0x6740('0x2b')](_0x409e6e)){if(!_[_0x6740('0x2c')](_0x4671ed['Contact'][_0x409e6e])&&_0x409e6e!=='id'&&_0x409e6e!=='tags'&&_0x409e6e!==_0x6740('0x2d')&&_0x409e6e!==_0x6740('0x2e')){_0x4096cd[util[_0x6740('0x14')]('%s%s','XMD-',_[_0x6740('0x2f')](_0x409e6e))]=_0x4671ed['Contact'][_0x409e6e];}}}}return _0x4096cd;};exports[_0x6740('0x30')]=function(_0x5cc5a5){var _0x41ab4c={};for(var _0x4b8eae in _0x5cc5a5){if(_0x5cc5a5[_0x6740('0x2b')](_0x4b8eae)){_0x41ab4c[util['format']('%s',_[_0x6740('0x31')](_0x4b8eae))]=_0x5cc5a5[_0x4b8eae];}}return{'variables':_0x41ab4c};};exports[_0x6740('0x32')]=function(_0x3d2100,_0x334829){if(!_[_0x6740('0x2c')](_0x3d2100)){if(_0x3d2100['hasOwnProperty'](_0x6740('0x33'))){if(_0x3d2100['originated']>0x0){_0x3d2100[_0x6740('0x33')]-=0x1;}else{logger[_0x6740('0x9')]('[updateOriginated]\x20object\x20originated\x20is\x20negative',_0x334829);}}}else{logger[_0x6740('0x9')](_0x6740('0x34'),_0x334829);}};exports[_0x6740('0x35')]=function(_0x1afe95){var _0x56562d=moment()[_0x6740('0x14')]('YYYY-MM-DD\x20HH:mm:ss');_0x1afe95[_0x6740('0x36')]=0xd;_0x1afe95[_0x6740('0x37')]='Blacklist';_0x1afe95['starttime']=_0x56562d;_0x1afe95[_0x6740('0x38')]=_0x56562d;_0x1afe95[_0x6740('0x39')]=_0x56562d;};exports['logAgent']=function(_0x44f1d6,_0x562072,_0x3c9057){var _0x28f444=moment()['format'](_0x6740('0x3a'));_0x44f1d6[_0x6740('0x36')]=_0x562072;_0x44f1d6[_0x6740('0x37')]=_0x3c9057;_0x44f1d6['responsetime']=_0x28f444;_0x44f1d6[_0x6740('0x3b')]=getSeconds(_0x44f1d6[_0x6740('0x38')],_0x44f1d6[_0x6740('0x3c')]);};exports[_0x6740('0x3d')]=function(_0x14111d,_0x4b51f9,_0x4af2be){_0x14111d[_0x6740('0x3e')]=_0x4b51f9;_0x14111d['UserId']=_0x4af2be;};exports[_0x6740('0x3f')]=function(_0x4485f7,_0x2da040,_0x2135db){var _0x370d6f=moment()[_0x6740('0x14')]('YYYY-MM-DD\x20HH:mm:ss');_0x4485f7[_0x6740('0x36')]=_0x2da040;_0x4485f7[_0x6740('0x37')]=_0x2135db;_0x4485f7[_0x6740('0x38')]=_0x4485f7[_0x6740('0x38')]?_0x4485f7[_0x6740('0x38')]:_0x370d6f;_0x4485f7[_0x6740('0x39')]=_0x4485f7[_0x6740('0x39')]?_0x4485f7['endtime']:_0x370d6f;_0x4485f7[_0x6740('0x3b')]=getSeconds(_0x4485f7[_0x6740('0x38')]||0x0,_0x4485f7[_0x6740('0x3c')]||0x0);_0x4485f7[_0x6740('0x40')]=_0x4485f7[_0x6740('0x41')]?getSeconds(_0x4485f7[_0x6740('0x39')],_0x4485f7[_0x6740('0x41')]):0x0;};exports['isFailure']=function(_0x1f2f41){return _0x1f2f41==='Failure';};exports['variablesAction']=function(_0x388caa,_0xa8f694,_0x39748b,_0x4e5bd6,_0x4dacf5){var _0x506eda=_0x4e5bd6?_0x6740('0x42'):_0x388caa[_0x6740('0x1a')];_0x506eda=_0x4dacf5?_0x6740('0x43'):_0x506eda;return{'actionid':_0x388caa[_0x6740('0x44')],'action':'originate','channel':_0x388caa[_0x6740('0x45')],'callerid':util[_0x6740('0x14')](_0x6740('0x15'),_0x506eda,_0x388caa[_0x6740('0x1b')]),'Exten':_0x6740('0x27'),'Context':_0x6740('0x46'),'Priority':'1','variable':_0x39748b,'timeout':(_0xa8f694['timeout']||0x1e)*0x3e8,'async':!![],'channelid':_0x388caa[_0x6740('0x44')]};};exports['totalGlobal']=function(_0x340bf1){return _0x340bf1[_0x6740('0x47')]+_0x340bf1[_0x6740('0x48')]+_0x340bf1[_0x6740('0x49')]+_0x340bf1['countagentrejectretry']+_0x340bf1[_0x6740('0x4a')];};exports[_0x6740('0x4b')]=function(_0x230f26){var _0x767b72=_['clone'](_0x230f26);_0x767b72['state']=0xf;_0x767b72['statedesc']='Global';return _0x767b72;};exports[_0x6740('0x4c')]=function(_0x18a749,_0x460569,_0x19af4e){var _0x437304={};_0x437304[_0x460569]=_0x18a749[_0x460569];_0x437304[_0x6740('0x4d')]=![];_0x437304['scheduledat']=moment()[_0x6740('0x4e')](_0x19af4e,'minutes')['format']('YYYY-MM-DD\x20HH:mm:ss');_0x437304[_0x6740('0x1c')]=_0x18a749[_0x6740('0x1c')];_0x437304[_0x6740('0x4f')]=_0x18a749['ListId'];_0x437304[_0x6740('0x1d')]=_0x18a749[_0x6740('0x1d')]||undefined;return _0x437304;};exports['decrementTalkink']=function(_0x2036d1,_0x51d3ac){if(!_[_0x6740('0x2c')](_0x2036d1)){if(_0x2036d1['pTalking']>0x0){_0x2036d1[_0x6740('0x50')]-=0x1;}else{logger[_0x6740('0x9')](_0x51d3ac,'[decrementTalkink]\x20object\x20talking\x20is\x20negative');}}else{logger[_0x6740('0x9')](_0x51d3ac,_0x6740('0x51'));}};exports[_0x6740('0x52')]=function(_0x4db4c2){if(_0x4db4c2<=0x0){return!![];}return![];};exports['buildObj']=function(_0x2a2cee,_0x127c10,_0x297f05){_0x2a2cee[_0x6740('0x53')]=_0x127c10;_0x2a2cee[_0x6740('0x54')]=_0x2a2cee[_0x6740('0x55')];_0x2a2cee['interface']=_0x2a2cee[_0x6740('0x45')];if(_0x297f05){_0x2a2cee[_0x6740('0x56')]=_0x297f05[_0x6740('0x56')];}return _0x2a2cee;};exports[_0x6740('0x57')]=function(_0x2e9e3c){var _0x5c24e5={};_0x5c24e5['queue']=_0x2e9e3c['queue'];_0x5c24e5[_0x6740('0x58')]=_0x2e9e3c[_0x6740('0x45')];_0x5c24e5[_0x6740('0x44')]=_0x2e9e3c[_0x6740('0x44')];return _0x5c24e5;};exports[_0x6740('0x59')]=function(_0x204eee){var _0x27fcad=[];for(var _0x5eb7d0 in _0x204eee){if(_0x204eee[_0x6740('0x2b')](_0x5eb7d0)){if(!_['isNil'](_0x204eee[_0x5eb7d0])&&_0x204eee[_0x5eb7d0][_0x6740('0x36')]===_0x6740('0x5a')&&_0x204eee[_0x5eb7d0][_0x6740('0x5b')]===_0x6740('0x5c')){_0x27fcad[_0x6740('0x5d')](_0x204eee[_0x5eb7d0]['id']);}}}return _0x27fcad;};exports[_0x6740('0x5e')]=function(_0x144002){var _0x1ebf24=moment()[_0x6740('0x5f')](0x0);var _0x35b678=moment(_0x144002)['milliseconds'](0x0);return _0x1ebf24[_0x6740('0x60')](_0x35b678,_0x6740('0x7'));};exports[_0x6740('0x61')]=function(_0x51c8ff){return{'active':![],'recallme':![],'UserId':null,'ContactId':_0x51c8ff[_0x6740('0x1c')],'ListId':_0x51c8ff[_0x6740('0x4f')],'VoiceQueueId':_0x51c8ff[_0x6740('0x1d')]||undefined,'CampaignId':_0x51c8ff[_0x6740('0x62')]||undefined};};exports[_0x6740('0x63')]=function(_0x482b60){if(_0x482b60===_0x6740('0x44')||_0x482b60===_0x6740('0x64')||_0x482b60===_0x6740('0x55')||_0x482b60===_0x6740('0x65')||_0x482b60===_0x6740('0x66')||_0x482b60===_0x6740('0x67')||_0x482b60===_0x6740('0x3e')||_0x482b60===_0x6740('0x45')||_0x482b60===_0x6740('0x1a')||_0x482b60===_0x6740('0x4d')||_0x482b60===_0x6740('0x1b')||_0x482b60==='scheduledat'||_0x482b60===_0x6740('0x47')||_0x482b60===_0x6740('0x48')||_0x482b60===_0x6740('0x49')||_0x482b60==='countglobal'||_0x482b60===_0x6740('0x68')||_0x482b60===_0x6740('0x69')||_0x482b60===_0x6740('0x6a')||_0x482b60===_0x6740('0x6b')||_0x482b60===_0x6740('0x1c')||_0x482b60===_0x6740('0x4f')||_0x482b60===_0x6740('0x6c')||_0x482b60===_0x6740('0x1d')||_0x482b60===_0x6740('0x6d')||_0x482b60==='xmd-voicequeueid'||_0x482b60==='xmd-queue'||_0x482b60===_0x6740('0x6e')||_0x482b60===_0x6740('0x6f')||_0x482b60==='xmd-dialurl'||_0x482b60===_0x6740('0x70')||_0x482b60==='xmd-dialoptions'||_0x482b60===_0x6740('0x71')||_0x482b60===_0x6740('0x72')||_0x482b60===_0x6740('0x73')||_0x482b60===_0x6740('0x74')||_0x482b60==='xmd-callerid'||_0x482b60===_0x6740('0x75')||_0x482b60===_0x6740('0x76')||_0x482b60===_0x6740('0x77')||_0x482b60===_0x6740('0x78')||_0x482b60===_0x6740('0x79')||_0x482b60===_0x6740('0x7a')||_0x482b60===_0x6740('0x7b')||_0x482b60===_0x6740('0x7c')||_0x482b60===_0x6740('0x7d')||_0x482b60===_0x6740('0x7e')||_0x482b60===_0x6740('0x77')||_0x482b60===_0x6740('0x78')||_0x482b60==='rtpaudioqosjitter'||_0x482b60===_0x6740('0x7a')||_0x482b60===_0x6740('0x7b')||_0x482b60===_0x6740('0x7c')||_0x482b60==='rtpaudioqosrtt'||_0x482b60==='rtpaudioqosrttbridged'||_0x482b60===_0x6740('0x7f')||_0x482b60==='bridgepvtcallid'||_0x482b60==='state'||_0x482b60===_0x6740('0x37')){return![];}return!![];};exports[_0x6740('0x80')]=function(_0xe7d2a,_0xe2dca6){var _0x207c99,_0x2e2afb,_0x4b3c65;if(_0xe2dca6<=0x0){_0xe2dca6=0x1;}_0x207c99=new RegExp(_0x6740('0x81')+_0xe2dca6+'}$');_0x2e2afb=Math[_0x6740('0x82')](0xa,_0xe2dca6-0x1);_0x4b3c65=Math['pow'](0xa,_0xe2dca6)-0x1;return util[_0x6740('0x14')]('%s',_[_0x6740('0x83')](_0xe7d2a,_0x207c99,_[_0x6740('0x84')](_0x2e2afb,_0x4b3c65)));};exports[_0x6740('0x85')]=function(_0x37d712){var _0x184dab=_0x37d712[_0x6740('0x86')](/"(.*?)"/);return _0x184dab?_0x184dab[0x1]:_0x37d712;};exports[_0x6740('0x87')]=function(_0x3770ab){var _0x4fe5b5=_0x3770ab['match'](/<(.*?)>/);return _0x4fe5b5?_0x4fe5b5[0x1]:_0x3770ab;}; \ No newline at end of file diff --git a/server/services/ami/properties.js b/server/services/ami/properties.js index 942dd7f..b75526d 100644 --- a/server/services/ami/properties.js +++ b/server/services/ami/properties.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb4e6=['voicechannel','voicequeuechannelhangup','voicequeuechannelredirect','string','number','queuepause','boolean','voicequeuechannel'];(function(_0x493676,_0x5cc8f0){var _0x2dce20=function(_0x26ccd2){while(--_0x26ccd2){_0x493676['push'](_0x493676['shift']());}};_0x2dce20(++_0x5cc8f0);}(_0xb4e6,0xe3));var _0x6b4e=function(_0x34325b,_0x5e5afe){_0x34325b=_0x34325b-0x0;var _0x3da348=_0xb4e6[_0x34325b];return _0x3da348;};'use strict';exports['queueadd']={'queue':{'type':_0x6b4e('0x0'),'required':!![]},'interface':{'type':'string','required':!![]},'membername':{'type':_0x6b4e('0x0'),'required':!![]},'penalty':{'type':_0x6b4e('0x1'),'required':![]},'paused':{'type':'boolean','required':![]}};exports['queueremove']={'queue':{'type':'string','required':!![]},'interface':{'type':_0x6b4e('0x0'),'required':!![]}};exports[_0x6b4e('0x2')]={'interface':{'type':_0x6b4e('0x0'),'required':!![]},'paused':{'type':_0x6b4e('0x3')},'reason':{'type':_0x6b4e('0x0'),'required':![]}};exports['reload']={'module':{'type':_0x6b4e('0x0'),'required':![]}};exports[_0x6b4e('0x4')]={'uniqueid':{'type':_0x6b4e('0x0'),'required':!![]}};exports[_0x6b4e('0x5')]={'uniqueid':{'type':_0x6b4e('0x0'),'required':!![]},'filename':{'type':_0x6b4e('0x0')},'format':{'type':_0x6b4e('0x0')},'mixmonitorid':{'type':_0x6b4e('0x0')}};exports[_0x6b4e('0x6')]={'uniqueid':{'type':_0x6b4e('0x0'),'required':!![]}};exports[_0x6b4e('0x7')]={'uniqueid':{'type':_0x6b4e('0x0'),'required':!![]},'exten':{'type':'string','required':!![]},'context':{'type':'string'}}; \ No newline at end of file +var _0xc72e=['boolean','voicequeuechannel','voicequeuechannelhangup','voicequeuechannelredirect','string','number'];(function(_0x6c993a,_0x5ea3ab){var _0x27f547=function(_0x22df20){while(--_0x22df20){_0x6c993a['push'](_0x6c993a['shift']());}};_0x27f547(++_0x5ea3ab);}(_0xc72e,0x1c6));var _0xec72=function(_0x2f77ed,_0x95f440){_0x2f77ed=_0x2f77ed-0x0;var _0xfad340=_0xc72e[_0x2f77ed];return _0xfad340;};'use strict';exports['queueadd']={'queue':{'type':_0xec72('0x0'),'required':!![]},'interface':{'type':_0xec72('0x0'),'required':!![]},'membername':{'type':_0xec72('0x0'),'required':!![]},'penalty':{'type':_0xec72('0x1'),'required':![]},'paused':{'type':_0xec72('0x2'),'required':![]}};exports['queueremove']={'queue':{'type':_0xec72('0x0'),'required':!![]},'interface':{'type':'string','required':!![]}};exports['queuepause']={'interface':{'type':_0xec72('0x0'),'required':!![]},'paused':{'type':_0xec72('0x2')},'reason':{'type':_0xec72('0x0'),'required':![]}};exports['reload']={'module':{'type':'string','required':![]}};exports[_0xec72('0x3')]={'uniqueid':{'type':_0xec72('0x0'),'required':!![]}};exports['voicechannel']={'uniqueid':{'type':'string','required':!![]},'filename':{'type':_0xec72('0x0')},'format':{'type':_0xec72('0x0')},'mixmonitorid':{'type':_0xec72('0x0')}};exports[_0xec72('0x4')]={'uniqueid':{'type':'string','required':!![]}};exports[_0xec72('0x5')]={'uniqueid':{'type':'string','required':!![]},'exten':{'type':_0xec72('0x0'),'required':!![]},'context':{'type':'string'}}; \ No newline at end of file diff --git a/server/services/ami/realtime/index.js b/server/services/ami/realtime/index.js index 7e38e70..5ecb913 100644 --- a/server/services/ami/realtime/index.js +++ b/server/services/ami/realtime/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe04a=['zendeskAccounts','salesforceAccounts','freshdeskAccounts','deskAccounts','vtigerAccounts','servicenowAccounts','freshsalesAccounts','mapKeys','hasOwnProperty','SIP/%s','name','isNil','interface','total','sumHoldTime','sumDuration','sumBillable','isEmpty','ivrTotalCallsDays','ivrAnswerCallsDay','answered','unmanaged','outboundAnswerAgiCallsDay','outboundNoAnswerCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundNoSuchCallsDay','outboundDropCallsDayTimeout','outboundDropCallsDayCallersExit','outboundBlacklistCallsDay','outboundRejectCallsDay','outboundReCallsDay','outboundAnswerCallsDay','queueStatusComplete','prototype','mergeFromDatabase','initAgents','agents','length','format','isUndefined','initTelephones','initTrunks','initTriggers','initTemplates','initZendeskAccounts','initSalesforceAccounts','initFreshdeskAccounts','initZohoAccounts','zohoAccounts','initSugarcrmAccounts','sugarcrmAccounts','initVtigerAccounts','initServicenowAccounts','initDynamics365Accounts','dynamics365Accounts','initFreshsalesAccounts','initVoiceQueueHopperHistory','merge','initVoiceQueueReports','uniqueid','queue','queuecallerexit','queuecallerabandon','abandoned','queuecallerleaveAt','queuecallerjoinAt','queuecallercompleteAt','queuecallerabandonAt','queuecallerexitAt','diff','seconds','queuecallercomplete','initVoiceCallReports','outbound','duration','disposition','ANSWERED','billableseconds','initCampaigns','campaigns','dialQueueProject','SquareProject','initVoiceExtensions','initCampaignHopperHistory','initFaxAccounts','faxAccounts','exports','bluebird','util','lodash','moment','../model/telephone','../model/trunk','../model/trigger','../model/template','../model/campaign','../model/voiceExtension','../model/zendeskAccount','../model/salesforceAccount','../model/freshdeskAccount','../model/sugarcrmAccount','../model/zohoAccount','../model/deskAccount','../model/vtigerAccount','../model/servicenowAccount','../model/dynamics365Account','telephones','trunks','voiceQueues','triggers','templates','voiceExtensions','channels','queueChannels','timers','settings'];(function(_0x325a12,_0x20cdae){var _0x1ce78a=function(_0x4c36eb){while(--_0x4c36eb){_0x325a12['push'](_0x325a12['shift']());}};_0x1ce78a(++_0x20cdae);}(_0xe04a,0x142));var _0xae04=function(_0x38236c,_0x4b7daa){_0x38236c=_0x38236c-0x0;var _0x2b5f36=_0xe04a[_0x38236c];return _0x2b5f36;};'use strict';var BPromise=require(_0xae04('0x0'));var util=require(_0xae04('0x1'));var _=require(_0xae04('0x2'));var moment=require(_0xae04('0x3'));var Agent=require('../model/agent');var Telephone=require(_0xae04('0x4'));var Trunk=require(_0xae04('0x5'));var VoiceQueue=require('../model/voiceQueue');var Trigger=require(_0xae04('0x6'));var Template=require(_0xae04('0x7'));var Campaign=require(_0xae04('0x8'));var VoiceExtension=require(_0xae04('0x9'));var ZendeskAccount=require(_0xae04('0xa'));var SalesforceAccount=require(_0xae04('0xb'));var FreshdeskAccount=require(_0xae04('0xc'));var SugarcrmAccount=require(_0xae04('0xd'));var ZohoAccount=require(_0xae04('0xe'));var DeskAccount=require(_0xae04('0xf'));var VtigerAccount=require(_0xae04('0x10'));var ServicenowAccount=require(_0xae04('0x11'));var Dynamics365Account=require(_0xae04('0x12'));var FreshsalesAccount=require('../model/freshsalesAccount');var FaxAccount=require('../model/faxAccount');var Realtime=function(){this['agents']={};this[_0xae04('0x13')]={};this[_0xae04('0x14')]={};this[_0xae04('0x15')]={};this[_0xae04('0x16')]={};this['campaigns']={};this[_0xae04('0x17')]={};this['outbound']={'total':0x0,'answered':0x0,'sumHoldTime':0x0,'sumDuration':0x0,'sumBillable':0x0};this[_0xae04('0x18')]={};this[_0xae04('0x19')]={};this[_0xae04('0x1a')]={};this['outboundChannels']={};this[_0xae04('0x1b')]={};this[_0xae04('0x1c')]={};this[_0xae04('0x1d')]={};this[_0xae04('0x1e')]={};this['sugarcrmAccounts']={};this[_0xae04('0x1f')]={};this['zohoAccounts']={};this[_0xae04('0x20')]={};this[_0xae04('0x21')]={};this[_0xae04('0x22')]={};this['dynamics365Accounts']={};this[_0xae04('0x23')]={};this['faxAccounts']={};};function freeIsNotKey(_0x397f8f,_0x5aeb01,_0x341e48){var _0x37beb9=_[_0xae04('0x24')](_0x397f8f,function(_0x50bd0d,_0x567ba5){return _0x50bd0d[_0x341e48];});for(var _0x5e98cf in _0x5aeb01){if(_0x5aeb01[_0xae04('0x25')](_0x5e98cf)){if(!_0x37beb9[_0x5e98cf]){delete _0x5aeb01[_0x5e98cf];}}}}function freeIsNotKeySip(_0x1e147f,_0xfb032b){var _0x584824=_['mapKeys'](_0x1e147f,function(_0x2e78a5,_0x30e4b3){return util['format'](_0xae04('0x26'),_0x2e78a5[_0xae04('0x27')]);});for(var _0x59da46 in _0xfb032b){if(_0xfb032b[_0xae04('0x25')](_0x59da46)){if(!_0x584824[_0x59da46]){delete _0xfb032b[_0x59da46];}}}}function freeIsNotKeyAgent(_0x30922a,_0x55e2bc){var _0x727b5d=_['mapKeys'](_0x30922a,function(_0x2ad309,_0x257050){var _0x132fdb=_[_0xae04('0x28')](_0x2ad309['interface'])?util['format'](_0xae04('0x26'),_0x2ad309[_0xae04('0x27')]):_0x2ad309[_0xae04('0x29')];return _0x132fdb;});for(var _0x48d33b in _0x55e2bc){if(_0x55e2bc['hasOwnProperty'](_0x48d33b)){if(!_0x727b5d[_0x48d33b]){delete _0x55e2bc[_0x48d33b];}}}}function clearVoiceCallReports(_0x18525f){_0x18525f[_0xae04('0x2a')]=0x0;_0x18525f['answered']=0x0;_0x18525f[_0xae04('0x2b')]=0x0;_0x18525f[_0xae04('0x2c')]=0x0;_0x18525f[_0xae04('0x2d')]=0x0;}function clearCampaigns(_0xbbfa13){if(!_[_0xae04('0x2e')](_0xbbfa13)){for(var _0x3678e3 in _0xbbfa13){if(_0xbbfa13[_0xae04('0x25')](_0x3678e3)){_0xbbfa13[_0x3678e3][_0xae04('0x2f')]=0x0;_0xbbfa13[_0x3678e3][_0xae04('0x30')]=0x0;}}}}function clearVoiceQueues(_0xfa9946){if(!_[_0xae04('0x2e')](_0xfa9946)){for(var _0x2f5a45 in _0xfa9946){if(_0xfa9946[_0xae04('0x25')](_0x2f5a45)){_0xfa9946[_0x2f5a45][_0xae04('0x2a')]=0x0;_0xfa9946[_0x2f5a45][_0xae04('0x31')]=0x0;_0xfa9946[_0x2f5a45][_0xae04('0x32')]=0x0;_0xfa9946[_0x2f5a45]['abandoned']=0x0;_0xfa9946[_0x2f5a45][_0xae04('0x2b')]=0x0;_0xfa9946[_0x2f5a45][_0xae04('0x2c')]=0x0;_0xfa9946[_0x2f5a45]['sumBillable']=0x0;_0xfa9946[_0x2f5a45][_0xae04('0x33')]=0x0;_0xfa9946[_0x2f5a45][_0xae04('0x34')]=0x0;_0xfa9946[_0x2f5a45][_0xae04('0x35')]=0x0;_0xfa9946[_0x2f5a45][_0xae04('0x36')]=0x0;_0xfa9946[_0x2f5a45][_0xae04('0x37')]=0x0;_0xfa9946[_0x2f5a45]['outboundUnknownCallsDay']=0x0;_0xfa9946[_0x2f5a45][_0xae04('0x38')]=0x0;_0xfa9946[_0x2f5a45][_0xae04('0x39')]=0x0;_0xfa9946[_0x2f5a45][_0xae04('0x3a')]=0x0;_0xfa9946[_0x2f5a45]['outboundOriginateFailureCallsDay']=0x0;_0xfa9946[_0x2f5a45][_0xae04('0x3b')]=0x0;_0xfa9946[_0x2f5a45][_0xae04('0x3c')]=0x0;_0xfa9946[_0x2f5a45][_0xae04('0x33')]=0x0;_0xfa9946[_0x2f5a45][_0xae04('0x3d')]=0x0;_0xfa9946[_0x2f5a45][_0xae04('0x3e')]=!![];}}}}Realtime[_0xae04('0x3f')][_0xae04('0x40')]=function(_0x110e80,_0xe75ffa){for(var _0x5bd26 in _0xe75ffa){if(_0x110e80[_0xae04('0x25')](_0x5bd26)){_0x110e80[_0x5bd26]=_0xe75ffa[_0x5bd26];}}};Realtime['prototype'][_0xae04('0x41')]=function(){var _0x408468=this;return function(_0x200c4d){if(_0x200c4d){freeIsNotKeyAgent(_0x200c4d,_0x408468[_0xae04('0x42')]);for(var _0xda3dd5=0x0,_0x232781={},_0x1076a7={};_0xda3dd5<_0x200c4d[_0xae04('0x43')];_0xda3dd5+=0x1){_0x232781=_0x200c4d[_0xda3dd5];var _0x59f791=_[_0xae04('0x28')](_0x232781[_0xae04('0x29')])?util[_0xae04('0x44')](_0xae04('0x26'),_0x232781[_0xae04('0x27')]):_0x232781['interface'];if(_[_0xae04('0x45')](_0x408468['agents'][_0x59f791])){_0x408468[_0xae04('0x42')][_0x59f791]=new Agent(_0x232781);}else{_0x408468[_0xae04('0x40')](_0x408468['agents'][_0x59f791],_0x232781);}}}return _0x408468[_0xae04('0x42')];};};Realtime[_0xae04('0x3f')][_0xae04('0x46')]=function(){var _0xae7c37=this;return function(_0x13cb9a){if(_0x13cb9a){freeIsNotKeySip(_0x13cb9a,_0xae7c37[_0xae04('0x13')]);for(var _0x43c2c4=0x0,_0x2734c6={},_0x1de661={};_0x43c2c4<_0x13cb9a[_0xae04('0x43')];_0x43c2c4+=0x1){_0x2734c6=_0x13cb9a[_0x43c2c4];if(_[_0xae04('0x45')](_0xae7c37[_0xae04('0x13')][util[_0xae04('0x44')](_0xae04('0x26'),_0x2734c6[_0xae04('0x27')])])){_0xae7c37[_0xae04('0x13')][util['format'](_0xae04('0x26'),_0x2734c6[_0xae04('0x27')])]=new Telephone(_0x2734c6);}else{_0xae7c37[_0xae04('0x40')](_0xae7c37[_0xae04('0x13')][util[_0xae04('0x44')](_0xae04('0x26'),_0x2734c6[_0xae04('0x27')])],_0x2734c6);}}}return _0xae7c37['telephones'];};};Realtime[_0xae04('0x3f')][_0xae04('0x47')]=function(){var _0x4e4157=this;return function(_0x3c84e5){if(_0x3c84e5){freeIsNotKeySip(_0x3c84e5,_0x4e4157['trunks']);for(var _0x3dd136=0x0,_0x5707ff={},_0x24dcca={};_0x3dd136<_0x3c84e5[_0xae04('0x43')];_0x3dd136+=0x1){_0x5707ff=_0x3c84e5[_0x3dd136];if(_['isUndefined'](_0x4e4157[_0xae04('0x14')][util[_0xae04('0x44')]('SIP/%s',_0x5707ff['name'])])){_0x4e4157['trunks'][util[_0xae04('0x44')](_0xae04('0x26'),_0x5707ff[_0xae04('0x27')])]=new Trunk(_0x5707ff);}else{_0x4e4157['mergeFromDatabase'](_0x4e4157['trunks'][util[_0xae04('0x44')](_0xae04('0x26'),_0x5707ff['name'])],_0x5707ff);}}}return _0x4e4157[_0xae04('0x14')];};};Realtime[_0xae04('0x3f')]['initVoiceQueues']=function(){var _0x38e949=this;return function(_0x344062){if(_0x344062){freeIsNotKey(_0x344062,_0x38e949[_0xae04('0x15')],_0xae04('0x27'));for(var _0x5d6a59=0x0,_0x207798={},_0x37b31a={};_0x5d6a59<_0x344062[_0xae04('0x43')];_0x5d6a59+=0x1){_0x207798=_0x344062[_0x5d6a59];if(_[_0xae04('0x45')](_0x38e949[_0xae04('0x15')][_0x207798[_0xae04('0x27')]])){_0x38e949['voiceQueues'][_0x207798[_0xae04('0x27')]]=new VoiceQueue(_0x207798);}else{_0x38e949[_0xae04('0x40')](_0x38e949[_0xae04('0x15')][_0x207798[_0xae04('0x27')]],_0x207798);}}}return _0x38e949['voiceQueues'];};};Realtime['prototype'][_0xae04('0x48')]=function(){var _0x1719a2=this;return function(_0x123ca2){if(_0x123ca2){freeIsNotKey(_0x123ca2,_0x1719a2[_0xae04('0x16')],'id');for(var _0xa69ea=0x0,_0x4adc17={},_0x5d7fc1={};_0xa69ea<_0x123ca2[_0xae04('0x43')];_0xa69ea+=0x1){_0x4adc17=_0x123ca2[_0xa69ea];if(_[_0xae04('0x45')](_0x1719a2[_0xae04('0x16')][_0x4adc17['id']])){_0x1719a2[_0xae04('0x16')][_0x4adc17['id']]=new Trigger(_0x4adc17);}else{_0x1719a2[_0xae04('0x40')](_0x1719a2[_0xae04('0x16')][_0x4adc17['id']],_0x4adc17);}}}return _0x1719a2[_0xae04('0x16')];};};Realtime[_0xae04('0x3f')][_0xae04('0x49')]=function(){var _0x9860a8=this;return function(_0x18d8e6){if(_0x18d8e6){freeIsNotKey(_0x18d8e6,_0x9860a8['templates'],'id');for(var _0xe05786=0x0,_0x17f99e={},_0x1b6707={};_0xe05786<_0x18d8e6[_0xae04('0x43')];_0xe05786+=0x1){_0x17f99e=_0x18d8e6[_0xe05786];if(_[_0xae04('0x45')](_0x9860a8[_0xae04('0x17')][_0x17f99e['id']])){_0x9860a8['templates'][_0x17f99e['id']]=new Template(_0x17f99e);}else{_0x9860a8[_0xae04('0x40')](_0x9860a8[_0xae04('0x17')][_0x17f99e['id']],_0x17f99e);}}}return _0x9860a8['templates'];};};Realtime[_0xae04('0x3f')][_0xae04('0x4a')]=function(){var _0x5d8bdd=this;return function(_0x4955b4){if(_0x4955b4){freeIsNotKey(_0x4955b4,_0x5d8bdd['zendeskAccounts'],'id');for(var _0x29c211=0x0,_0x433161={},_0x118dbd={};_0x29c211<_0x4955b4[_0xae04('0x43')];_0x29c211+=0x1){_0x433161=_0x4955b4[_0x29c211];if(_[_0xae04('0x45')](_0x5d8bdd[_0xae04('0x1d')][_0x433161['id']])){_0x5d8bdd['zendeskAccounts'][_0x433161['id']]=new ZendeskAccount(_0x433161);}else{_0x5d8bdd[_0xae04('0x40')](_0x5d8bdd[_0xae04('0x1d')][_0x433161['id']],_0x433161);}}}return _0x5d8bdd[_0xae04('0x1d')];};};Realtime[_0xae04('0x3f')][_0xae04('0x4b')]=function(){var _0x5ee946=this;return function(_0x43e0d9){if(_0x43e0d9){freeIsNotKey(_0x43e0d9,_0x5ee946[_0xae04('0x1e')],'id');for(var _0x2cdbad=0x0,_0x234145={},_0x5a2b78={};_0x2cdbad<_0x43e0d9['length'];_0x2cdbad+=0x1){_0x234145=_0x43e0d9[_0x2cdbad];if(_[_0xae04('0x45')](_0x5ee946[_0xae04('0x1e')][_0x234145['id']])){_0x5ee946[_0xae04('0x1e')][_0x234145['id']]=new SalesforceAccount(_0x234145);}else{_0x5ee946['mergeFromDatabase'](_0x5ee946[_0xae04('0x1e')][_0x234145['id']],_0x234145);}}}return _0x5ee946[_0xae04('0x1e')];};};Realtime['prototype'][_0xae04('0x4c')]=function(){var _0x43e56c=this;return function(_0x41a4af){if(_0x41a4af){freeIsNotKey(_0x41a4af,_0x43e56c[_0xae04('0x1f')],'id');for(var _0x428ab1=0x0,_0x50ee8b={},_0x475c5b={};_0x428ab1<_0x41a4af[_0xae04('0x43')];_0x428ab1+=0x1){_0x50ee8b=_0x41a4af[_0x428ab1];if(_[_0xae04('0x45')](_0x43e56c[_0xae04('0x1f')][_0x50ee8b['id']])){_0x43e56c[_0xae04('0x1f')][_0x50ee8b['id']]=new FreshdeskAccount(_0x50ee8b);}else{_0x43e56c[_0xae04('0x40')](_0x43e56c['freshdeskAccounts'][_0x50ee8b['id']],_0x50ee8b);}}}return _0x43e56c[_0xae04('0x1f')];};};Realtime[_0xae04('0x3f')][_0xae04('0x4d')]=function(){var _0x359b4b=this;return function(_0x2d8a3c){if(_0x2d8a3c){freeIsNotKey(_0x2d8a3c,_0x359b4b[_0xae04('0x4e')],'id');for(var _0x5ec07b=0x0,_0x100188={},_0x9fc5d9={};_0x5ec07b<_0x2d8a3c[_0xae04('0x43')];_0x5ec07b+=0x1){_0x100188=_0x2d8a3c[_0x5ec07b];if(_[_0xae04('0x45')](_0x359b4b[_0xae04('0x4e')][_0x100188['id']])){_0x359b4b['zohoAccounts'][_0x100188['id']]=new ZohoAccount(_0x100188);}else{_0x359b4b[_0xae04('0x40')](_0x359b4b[_0xae04('0x4e')][_0x100188['id']],_0x100188);}}}return _0x359b4b['zohoAccounts'];};};Realtime[_0xae04('0x3f')]['initDeskAccounts']=function(){var _0x46eb96=this;return function(_0x3be39a){if(_0x3be39a){freeIsNotKey(_0x3be39a,_0x46eb96[_0xae04('0x20')],'id');for(var _0x2e84a5=0x0,_0x4d19d4={},_0x311da3={};_0x2e84a5<_0x3be39a[_0xae04('0x43')];_0x2e84a5+=0x1){_0x4d19d4=_0x3be39a[_0x2e84a5];if(_['isUndefined'](_0x46eb96[_0xae04('0x20')][_0x4d19d4['id']])){_0x46eb96['deskAccounts'][_0x4d19d4['id']]=new DeskAccount(_0x4d19d4);}else{_0x46eb96[_0xae04('0x40')](_0x46eb96[_0xae04('0x20')][_0x4d19d4['id']],_0x4d19d4);}}}return _0x46eb96[_0xae04('0x20')];};};Realtime[_0xae04('0x3f')][_0xae04('0x4f')]=function(){var _0x1090c2=this;return function(_0x25e455){if(_0x25e455){freeIsNotKey(_0x25e455,_0x1090c2[_0xae04('0x50')],'id');for(var _0x473d7a=0x0,_0x2ad21f={},_0x2dca85={};_0x473d7a<_0x25e455[_0xae04('0x43')];_0x473d7a+=0x1){_0x2ad21f=_0x25e455[_0x473d7a];if(_[_0xae04('0x45')](_0x1090c2[_0xae04('0x50')][_0x2ad21f['id']])){_0x1090c2['sugarcrmAccounts'][_0x2ad21f['id']]=new SugarcrmAccount(_0x2ad21f);}else{_0x1090c2[_0xae04('0x40')](_0x1090c2[_0xae04('0x50')][_0x2ad21f['id']],_0x2ad21f);}}}return _0x1090c2[_0xae04('0x50')];};};Realtime['prototype'][_0xae04('0x51')]=function(){var _0x4c7996=this;return function(_0x51167e){if(_0x51167e){freeIsNotKey(_0x51167e,_0x4c7996[_0xae04('0x21')],'id');for(var _0x307692=0x0,_0x190422={},_0x2a1933={};_0x307692<_0x51167e[_0xae04('0x43')];_0x307692+=0x1){_0x190422=_0x51167e[_0x307692];if(_['isUndefined'](_0x4c7996['vtigerAccounts'][_0x190422['id']])){_0x4c7996[_0xae04('0x21')][_0x190422['id']]=new VtigerAccount(_0x190422);}else{_0x4c7996[_0xae04('0x40')](_0x4c7996[_0xae04('0x21')][_0x190422['id']],_0x190422);}}}return _0x4c7996[_0xae04('0x21')];};};Realtime[_0xae04('0x3f')][_0xae04('0x52')]=function(){var _0x37f699=this;return function(_0x2c59cd){if(_0x2c59cd){freeIsNotKey(_0x2c59cd,_0x37f699[_0xae04('0x22')],'id');for(var _0x4f2587=0x0,_0x449874={},_0x186fc9={};_0x4f2587<_0x2c59cd['length'];_0x4f2587+=0x1){_0x449874=_0x2c59cd[_0x4f2587];if(_[_0xae04('0x45')](_0x37f699[_0xae04('0x22')][_0x449874['id']])){_0x37f699[_0xae04('0x22')][_0x449874['id']]=new ServicenowAccount(_0x449874);}else{_0x37f699[_0xae04('0x40')](_0x37f699[_0xae04('0x22')][_0x449874['id']],_0x449874);}}}return _0x37f699[_0xae04('0x22')];};};Realtime[_0xae04('0x3f')][_0xae04('0x53')]=function(){var _0x131cdc=this;return function(_0x566037){if(_0x566037){freeIsNotKey(_0x566037,_0x131cdc['dynamics365Accounts'],'id');for(var _0x4e706c=0x0,_0x4b03f6={},_0x1f8f6a={};_0x4e706c<_0x566037[_0xae04('0x43')];_0x4e706c+=0x1){_0x4b03f6=_0x566037[_0x4e706c];if(_[_0xae04('0x45')](_0x131cdc[_0xae04('0x54')][_0x4b03f6['id']])){_0x131cdc[_0xae04('0x54')][_0x4b03f6['id']]=new Dynamics365Account(_0x4b03f6);}else{_0x131cdc[_0xae04('0x40')](_0x131cdc['dynamics365Accounts'][_0x4b03f6['id']],_0x4b03f6);}}}return _0x131cdc[_0xae04('0x54')];};};Realtime[_0xae04('0x3f')][_0xae04('0x55')]=function(){var _0x5a3fda=this;return function(_0x10d6b5){if(_0x10d6b5){freeIsNotKey(_0x10d6b5,_0x5a3fda[_0xae04('0x23')],'id');for(var _0x8f9cf5=0x0,_0x477e02={},_0x569d2b={};_0x8f9cf5<_0x10d6b5['length'];_0x8f9cf5+=0x1){_0x477e02=_0x10d6b5[_0x8f9cf5];if(_['isUndefined'](_0x5a3fda['freshsalesAccounts'][_0x477e02['id']])){_0x5a3fda[_0xae04('0x23')][_0x477e02['id']]=new FreshsalesAccount(_0x477e02);}else{_0x5a3fda[_0xae04('0x40')](_0x5a3fda[_0xae04('0x23')][_0x477e02['id']],_0x477e02);}}}return _0x5a3fda['freshsalesAccounts'];};};Realtime[_0xae04('0x3f')][_0xae04('0x56')]=function(){var _0x480fff=this;return function(_0x479fcf){for(var _0x46231a=0x0;_0x46231a<_0x479fcf[_0xae04('0x43')];_0x46231a+=0x1){_[_0xae04('0x57')](_0x480fff[_0xae04('0x15')][_0x479fcf[_0x46231a][_0xae04('0x27')]],_0x479fcf[_0x46231a]);}return _0x480fff[_0xae04('0x15')];};};Realtime[_0xae04('0x3f')][_0xae04('0x58')]=function(){var _0x17435d=this;return function(_0x51878d){clearVoiceQueues(_0x17435d[_0xae04('0x15')]);if(_0x51878d){_0x51878d=_['groupBy'](_0x51878d,_0xae04('0x59'));for(var _0x5a786a in _0x51878d){if(_0x51878d[_0xae04('0x25')](_0x5a786a)){var _0x2e1dda={};for(var _0xe288a4=0x0;_0xe288a4<_0x51878d[_0x5a786a][_0xae04('0x43')];_0xe288a4+=0x1){var _0x50a63a=_0x51878d[_0x5a786a][_0xe288a4][_0xae04('0x5a')];if(_0x17435d[_0xae04('0x15')][_0x50a63a]){if(_0x51878d[_0x5a786a][_0xe288a4][_0xae04('0x5b')]){_0x17435d[_0xae04('0x15')][_0x50a63a]['unmanaged']+=0x1;}if(_0x51878d[_0x5a786a][_0xe288a4][_0xae04('0x5c')]){_0x17435d['voiceQueues'][_0x50a63a][_0xae04('0x5d')]+=0x1;}_0x17435d['voiceQueues'][_0x50a63a][_0xae04('0x2b')]+=moment(_0x51878d[_0x5a786a][_0xe288a4][_0xae04('0x5e')])['diff'](moment(_0x51878d[_0x5a786a][_0xe288a4][_0xae04('0x5f')]),'seconds')||0x0;if(_0xe288a4===_0x51878d[_0x5a786a][_0xae04('0x43')]-0x1){_0x17435d['voiceQueues'][_0x50a63a][_0xae04('0x2c')]+=moment(_0x51878d[_0x5a786a][_0xe288a4][_0xae04('0x60')]||_0x51878d[_0x5a786a][_0xe288a4][_0xae04('0x61')]||_0x51878d[_0x5a786a][_0xe288a4][_0xae04('0x62')])[_0xae04('0x63')](moment(_0x51878d[_0x5a786a][_0xe288a4][_0xae04('0x5f')]),_0xae04('0x64'))||0x0;_0x17435d[_0xae04('0x15')][_0x50a63a][_0xae04('0x2a')]+=0x1;if(_0x51878d[_0x5a786a][_0xe288a4][_0xae04('0x65')]){_0x17435d[_0xae04('0x15')][_0x50a63a]['answered']+=0x1;_0x17435d[_0xae04('0x15')][_0x50a63a][_0xae04('0x2d')]+=moment(_0x51878d[_0x5a786a][_0xe288a4]['queuecallercompleteAt'])[_0xae04('0x63')](moment(_0x51878d[_0x5a786a][_0xe288a4][_0xae04('0x5e')]),'seconds')||0x0;}}else{_0x17435d[_0xae04('0x15')][_0x50a63a][_0xae04('0x2c')]+=_0x17435d[_0xae04('0x15')][_0x50a63a][_0xae04('0x2b')]||0x0;}}}}}}return _0x17435d['voiceQueues'];};};Realtime[_0xae04('0x3f')][_0xae04('0x66')]=function(){var _0x3e480a=this;return function(_0x3c37bd){clearVoiceCallReports(_0x3e480a[_0xae04('0x67')]);if(_0x3c37bd){for(var _0x183bf4=0x0;_0x183bf4<_0x3c37bd['length'];_0x183bf4+=0x1){_0x3e480a['outbound'][_0xae04('0x2a')]+=0x1;_0x3e480a[_0xae04('0x67')][_0xae04('0x2c')]+=_0x3c37bd[_0x183bf4][_0xae04('0x68')];if(_0x3c37bd[_0x183bf4][_0xae04('0x69')]===_0xae04('0x6a')){_0x3e480a[_0xae04('0x67')]['answered']+=0x1;_0x3e480a[_0xae04('0x67')]['sumHoldTime']+=_0x3c37bd[_0x183bf4][_0xae04('0x68')]-_0x3c37bd[_0x183bf4][_0xae04('0x6b')]||0x0;_0x3e480a[_0xae04('0x67')][_0xae04('0x2d')]+=_0x3c37bd[_0x183bf4][_0xae04('0x6b')];}}}return _0x3e480a[_0xae04('0x67')];};};Realtime[_0xae04('0x3f')][_0xae04('0x6c')]=function(){var _0x616188=this;return function(_0x34b936){if(_0x34b936){freeIsNotKey(_0x34b936,_0x616188['campaigns'],'name');for(var _0x3897bb=0x0,_0x49ac46={};_0x3897bb<_0x34b936[_0xae04('0x43')];_0x3897bb+=0x1){_0x49ac46=_0x34b936[_0x3897bb];if(_[_0xae04('0x45')](_0x616188[_0xae04('0x6d')][_0x49ac46['name']])){_0x616188[_0xae04('0x6d')][_0x49ac46[_0xae04('0x27')]]=new Campaign(_0x49ac46);}else{_0x616188[_0xae04('0x40')](_0x616188[_0xae04('0x6d')][_0x49ac46[_0xae04('0x27')]],_0x49ac46);_0x616188[_0xae04('0x6d')][_0x49ac46[_0xae04('0x27')]][_0xae04('0x6e')]=_0x49ac46[_0xae04('0x6f')]?_0x49ac46[_0xae04('0x6f')][_0xae04('0x27')]:undefined;}}}return _0x616188[_0xae04('0x6d')];};};Realtime[_0xae04('0x3f')][_0xae04('0x70')]=function(){var _0xb2c28c=this;return function(_0x197ca1){if(_0x197ca1){freeIsNotKey(_0x197ca1,_0xb2c28c[_0xae04('0x18')],'id');for(var _0x3da6c2=0x0,_0x46900d={};_0x3da6c2<_0x197ca1[_0xae04('0x43')];_0x3da6c2+=0x1){_0x46900d=_0x197ca1[_0x3da6c2];if(_['isUndefined'](_0xb2c28c[_0xae04('0x18')][_0x46900d['id']])){_0xb2c28c['voiceExtensions'][_0x46900d['id']]=new VoiceExtension(_0x46900d);}else{_0xb2c28c[_0xae04('0x40')](_0xb2c28c[_0xae04('0x18')][_0x46900d['id']],_0x46900d);}}}return _0xb2c28c[_0xae04('0x18')];};};Realtime['prototype'][_0xae04('0x71')]=function(){var _0x396585=this;return function(_0x15298a){clearCampaigns(_0x396585[_0xae04('0x6d')]);for(var _0x4c8b3c=0x0;_0x4c8b3c<_0x15298a['length'];_0x4c8b3c+=0x1){_[_0xae04('0x57')](_0x396585[_0xae04('0x6d')][_0x15298a[_0x4c8b3c][_0xae04('0x27')]],_0x15298a[_0x4c8b3c]);}return _0x396585[_0xae04('0x6d')];};};Realtime['prototype'][_0xae04('0x72')]=function(){var _0x69f6dc=this;return function(_0x231008){if(_0x231008){freeIsNotKey(_0x231008,_0x69f6dc['faxAccounts'],'id');for(var _0x32a72e=0x0,_0x12085c={},_0x2bf851={};_0x32a72e<_0x231008[_0xae04('0x43')];_0x32a72e+=0x1){_0x12085c=_0x231008[_0x32a72e];if(_[_0xae04('0x45')](_0x69f6dc[_0xae04('0x73')][_0x12085c['id']])){_0x69f6dc[_0xae04('0x73')][_0x12085c['id']]=new FaxAccount(_0x12085c);}else{_0x69f6dc[_0xae04('0x40')](_0x69f6dc[_0xae04('0x73')][_0x12085c['id']],_0x12085c);}}}return _0x69f6dc['faxAccounts'];};};module[_0xae04('0x74')]=Realtime; \ No newline at end of file +var _0xdde1=['initFreshdeskAccounts','initZohoAccounts','initDeskAccounts','initSugarcrmAccounts','initVtigerAccounts','vtigerAccounts','initDynamics365Accounts','initFreshsalesAccounts','freshsalesAccounts','initVoiceQueueHopperHistory','merge','initVoiceQueueReports','uniqueid','queue','queuecallerexit','queuecallerabandon','queuecallerleaveAt','queuecallerjoinAt','seconds','queuecallerabandonAt','queuecallercomplete','queuecallercompleteAt','diff','initVoiceCallReports','disposition','ANSWERED','duration','billableseconds','initCampaigns','dialQueueProject','SquareProject','initVoiceExtensions','initCampaignHopperHistory','initFaxAccounts','exports','bluebird','util','lodash','../model/agent','../model/telephone','../model/trunk','../model/trigger','../model/template','../model/campaign','../model/voiceExtension','../model/zendeskAccount','../model/freshdeskAccount','../model/sugarcrmAccount','../model/zohoAccount','../model/vtigerAccount','../model/dynamics365Account','../model/freshsalesAccount','../model/faxAccount','agents','trunks','triggers','campaigns','templates','outbound','voiceExtensions','channels','outboundChannels','settings','zendeskAccounts','sugarcrmAccounts','freshdeskAccounts','zohoAccounts','deskAccounts','servicenowAccounts','dynamics365Accounts','faxAccounts','hasOwnProperty','mapKeys','format','SIP/%s','name','isNil','interface','total','sumHoldTime','sumDuration','sumBillable','isEmpty','ivrTotalCallsDays','ivrAnswerCallsDay','answered','unmanaged','abandoned','outboundAnswerAgiCallsDay','outboundNoAnswerCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundNoSuchCallsDay','outboundDropCallsDayTimeout','outboundRejectCallsDay','outboundReCallsDay','outboundAnswerCallsDay','mergeFromDatabase','prototype','initAgents','length','initTelephones','telephones','isUndefined','initTrunks','voiceQueues','initTriggers','initTemplates','initZendeskAccounts','initSalesforceAccounts','salesforceAccounts'];(function(_0x5c2c98,_0x247376){var _0x39fb2e=function(_0x5b37a1){while(--_0x5b37a1){_0x5c2c98['push'](_0x5c2c98['shift']());}};_0x39fb2e(++_0x247376);}(_0xdde1,0x101));var _0x1dde=function(_0x9fdd0c,_0x59b230){_0x9fdd0c=_0x9fdd0c-0x0;var _0x224beb=_0xdde1[_0x9fdd0c];return _0x224beb;};'use strict';var BPromise=require(_0x1dde('0x0'));var util=require(_0x1dde('0x1'));var _=require(_0x1dde('0x2'));var moment=require('moment');var Agent=require(_0x1dde('0x3'));var Telephone=require(_0x1dde('0x4'));var Trunk=require(_0x1dde('0x5'));var VoiceQueue=require('../model/voiceQueue');var Trigger=require(_0x1dde('0x6'));var Template=require(_0x1dde('0x7'));var Campaign=require(_0x1dde('0x8'));var VoiceExtension=require(_0x1dde('0x9'));var ZendeskAccount=require(_0x1dde('0xa'));var SalesforceAccount=require('../model/salesforceAccount');var FreshdeskAccount=require(_0x1dde('0xb'));var SugarcrmAccount=require(_0x1dde('0xc'));var ZohoAccount=require(_0x1dde('0xd'));var DeskAccount=require('../model/deskAccount');var VtigerAccount=require(_0x1dde('0xe'));var ServicenowAccount=require('../model/servicenowAccount');var Dynamics365Account=require(_0x1dde('0xf'));var FreshsalesAccount=require(_0x1dde('0x10'));var FaxAccount=require(_0x1dde('0x11'));var Realtime=function(){this[_0x1dde('0x12')]={};this['telephones']={};this[_0x1dde('0x13')]={};this['voiceQueues']={};this[_0x1dde('0x14')]={};this[_0x1dde('0x15')]={};this[_0x1dde('0x16')]={};this[_0x1dde('0x17')]={'total':0x0,'answered':0x0,'sumHoldTime':0x0,'sumDuration':0x0,'sumBillable':0x0};this[_0x1dde('0x18')]={};this[_0x1dde('0x19')]={};this['queueChannels']={};this[_0x1dde('0x1a')]={};this['timers']={};this[_0x1dde('0x1b')]={};this[_0x1dde('0x1c')]={};this['salesforceAccounts']={};this[_0x1dde('0x1d')]={};this[_0x1dde('0x1e')]={};this[_0x1dde('0x1f')]={};this[_0x1dde('0x20')]={};this['vtigerAccounts']={};this[_0x1dde('0x21')]={};this[_0x1dde('0x22')]={};this['freshsalesAccounts']={};this[_0x1dde('0x23')]={};};function freeIsNotKey(_0x2a6677,_0x217b3f,_0x49839a){var _0x1ba1e8=_['mapKeys'](_0x2a6677,function(_0x277728,_0x151e3d){return _0x277728[_0x49839a];});for(var _0x2b7f1a in _0x217b3f){if(_0x217b3f[_0x1dde('0x24')](_0x2b7f1a)){if(!_0x1ba1e8[_0x2b7f1a]){delete _0x217b3f[_0x2b7f1a];}}}}function freeIsNotKeySip(_0x34187f,_0x46c4f2){var _0x178002=_[_0x1dde('0x25')](_0x34187f,function(_0x1b4681,_0x4a58c9){return util[_0x1dde('0x26')](_0x1dde('0x27'),_0x1b4681[_0x1dde('0x28')]);});for(var _0x33b7f3 in _0x46c4f2){if(_0x46c4f2[_0x1dde('0x24')](_0x33b7f3)){if(!_0x178002[_0x33b7f3]){delete _0x46c4f2[_0x33b7f3];}}}}function freeIsNotKeyAgent(_0x155c66,_0x4bb851){var _0x5c2d26=_[_0x1dde('0x25')](_0x155c66,function(_0xe3ab70,_0x3cb578){var _0x50e9e3=_[_0x1dde('0x29')](_0xe3ab70[_0x1dde('0x2a')])?util['format'](_0x1dde('0x27'),_0xe3ab70[_0x1dde('0x28')]):_0xe3ab70[_0x1dde('0x2a')];return _0x50e9e3;});for(var _0x13ca3b in _0x4bb851){if(_0x4bb851[_0x1dde('0x24')](_0x13ca3b)){if(!_0x5c2d26[_0x13ca3b]){delete _0x4bb851[_0x13ca3b];}}}}function clearVoiceCallReports(_0x3723ca){_0x3723ca[_0x1dde('0x2b')]=0x0;_0x3723ca['answered']=0x0;_0x3723ca[_0x1dde('0x2c')]=0x0;_0x3723ca[_0x1dde('0x2d')]=0x0;_0x3723ca[_0x1dde('0x2e')]=0x0;}function clearCampaigns(_0x30f4e0){if(!_[_0x1dde('0x2f')](_0x30f4e0)){for(var _0x3e1d52 in _0x30f4e0){if(_0x30f4e0[_0x1dde('0x24')](_0x3e1d52)){_0x30f4e0[_0x3e1d52][_0x1dde('0x30')]=0x0;_0x30f4e0[_0x3e1d52][_0x1dde('0x31')]=0x0;}}}}function clearVoiceQueues(_0x5ea1a8){if(!_[_0x1dde('0x2f')](_0x5ea1a8)){for(var _0x29222e in _0x5ea1a8){if(_0x5ea1a8[_0x1dde('0x24')](_0x29222e)){_0x5ea1a8[_0x29222e][_0x1dde('0x2b')]=0x0;_0x5ea1a8[_0x29222e][_0x1dde('0x32')]=0x0;_0x5ea1a8[_0x29222e][_0x1dde('0x33')]=0x0;_0x5ea1a8[_0x29222e][_0x1dde('0x34')]=0x0;_0x5ea1a8[_0x29222e]['sumHoldTime']=0x0;_0x5ea1a8[_0x29222e]['sumDuration']=0x0;_0x5ea1a8[_0x29222e][_0x1dde('0x2e')]=0x0;_0x5ea1a8[_0x29222e][_0x1dde('0x35')]=0x0;_0x5ea1a8[_0x29222e][_0x1dde('0x36')]=0x0;_0x5ea1a8[_0x29222e][_0x1dde('0x37')]=0x0;_0x5ea1a8[_0x29222e][_0x1dde('0x38')]=0x0;_0x5ea1a8[_0x29222e][_0x1dde('0x39')]=0x0;_0x5ea1a8[_0x29222e]['outboundUnknownCallsDay']=0x0;_0x5ea1a8[_0x29222e][_0x1dde('0x3a')]=0x0;_0x5ea1a8[_0x29222e]['outboundDropCallsDayCallersExit']=0x0;_0x5ea1a8[_0x29222e]['outboundBlacklistCallsDay']=0x0;_0x5ea1a8[_0x29222e]['outboundOriginateFailureCallsDay']=0x0;_0x5ea1a8[_0x29222e][_0x1dde('0x3b')]=0x0;_0x5ea1a8[_0x29222e][_0x1dde('0x3c')]=0x0;_0x5ea1a8[_0x29222e][_0x1dde('0x35')]=0x0;_0x5ea1a8[_0x29222e][_0x1dde('0x3d')]=0x0;_0x5ea1a8[_0x29222e]['queueStatusComplete']=!![];}}}}Realtime['prototype'][_0x1dde('0x3e')]=function(_0x567237,_0x207a61){for(var _0x3b2bb1 in _0x207a61){if(_0x567237[_0x1dde('0x24')](_0x3b2bb1)){_0x567237[_0x3b2bb1]=_0x207a61[_0x3b2bb1];}}};Realtime[_0x1dde('0x3f')][_0x1dde('0x40')]=function(){var _0x22ab08=this;return function(_0x1115bf){if(_0x1115bf){freeIsNotKeyAgent(_0x1115bf,_0x22ab08['agents']);for(var _0x38bb2e=0x0,_0x54e2e8={},_0x3923c5={};_0x38bb2e<_0x1115bf[_0x1dde('0x41')];_0x38bb2e+=0x1){_0x54e2e8=_0x1115bf[_0x38bb2e];var _0x80775=_['isNil'](_0x54e2e8[_0x1dde('0x2a')])?util['format']('SIP/%s',_0x54e2e8[_0x1dde('0x28')]):_0x54e2e8[_0x1dde('0x2a')];if(_['isUndefined'](_0x22ab08['agents'][_0x80775])){_0x22ab08[_0x1dde('0x12')][_0x80775]=new Agent(_0x54e2e8);}else{_0x22ab08[_0x1dde('0x3e')](_0x22ab08[_0x1dde('0x12')][_0x80775],_0x54e2e8);}}}return _0x22ab08[_0x1dde('0x12')];};};Realtime[_0x1dde('0x3f')][_0x1dde('0x42')]=function(){var _0x809480=this;return function(_0x49d2ff){if(_0x49d2ff){freeIsNotKeySip(_0x49d2ff,_0x809480[_0x1dde('0x43')]);for(var _0x4f2783=0x0,_0x10fba3={},_0x4264b6={};_0x4f2783<_0x49d2ff[_0x1dde('0x41')];_0x4f2783+=0x1){_0x10fba3=_0x49d2ff[_0x4f2783];if(_[_0x1dde('0x44')](_0x809480[_0x1dde('0x43')][util[_0x1dde('0x26')](_0x1dde('0x27'),_0x10fba3[_0x1dde('0x28')])])){_0x809480[_0x1dde('0x43')][util[_0x1dde('0x26')](_0x1dde('0x27'),_0x10fba3[_0x1dde('0x28')])]=new Telephone(_0x10fba3);}else{_0x809480[_0x1dde('0x3e')](_0x809480[_0x1dde('0x43')][util['format'](_0x1dde('0x27'),_0x10fba3[_0x1dde('0x28')])],_0x10fba3);}}}return _0x809480[_0x1dde('0x43')];};};Realtime[_0x1dde('0x3f')][_0x1dde('0x45')]=function(){var _0x1c988b=this;return function(_0x11713a){if(_0x11713a){freeIsNotKeySip(_0x11713a,_0x1c988b[_0x1dde('0x13')]);for(var _0x3d011c=0x0,_0x4b7feb={},_0x42e1ff={};_0x3d011c<_0x11713a[_0x1dde('0x41')];_0x3d011c+=0x1){_0x4b7feb=_0x11713a[_0x3d011c];if(_['isUndefined'](_0x1c988b[_0x1dde('0x13')][util[_0x1dde('0x26')](_0x1dde('0x27'),_0x4b7feb[_0x1dde('0x28')])])){_0x1c988b[_0x1dde('0x13')][util[_0x1dde('0x26')](_0x1dde('0x27'),_0x4b7feb[_0x1dde('0x28')])]=new Trunk(_0x4b7feb);}else{_0x1c988b['mergeFromDatabase'](_0x1c988b['trunks'][util[_0x1dde('0x26')](_0x1dde('0x27'),_0x4b7feb[_0x1dde('0x28')])],_0x4b7feb);}}}return _0x1c988b[_0x1dde('0x13')];};};Realtime[_0x1dde('0x3f')]['initVoiceQueues']=function(){var _0x4a65ca=this;return function(_0x2c8c1a){if(_0x2c8c1a){freeIsNotKey(_0x2c8c1a,_0x4a65ca[_0x1dde('0x46')],_0x1dde('0x28'));for(var _0x2edfde=0x0,_0x3b58b8={},_0x3a71bf={};_0x2edfde<_0x2c8c1a[_0x1dde('0x41')];_0x2edfde+=0x1){_0x3b58b8=_0x2c8c1a[_0x2edfde];if(_[_0x1dde('0x44')](_0x4a65ca[_0x1dde('0x46')][_0x3b58b8[_0x1dde('0x28')]])){_0x4a65ca['voiceQueues'][_0x3b58b8[_0x1dde('0x28')]]=new VoiceQueue(_0x3b58b8);}else{_0x4a65ca[_0x1dde('0x3e')](_0x4a65ca[_0x1dde('0x46')][_0x3b58b8[_0x1dde('0x28')]],_0x3b58b8);}}}return _0x4a65ca[_0x1dde('0x46')];};};Realtime[_0x1dde('0x3f')][_0x1dde('0x47')]=function(){var _0x5482ac=this;return function(_0x1ccf83){if(_0x1ccf83){freeIsNotKey(_0x1ccf83,_0x5482ac[_0x1dde('0x14')],'id');for(var _0x24f9b4=0x0,_0x5d491d={},_0x11b6b6={};_0x24f9b4<_0x1ccf83['length'];_0x24f9b4+=0x1){_0x5d491d=_0x1ccf83[_0x24f9b4];if(_['isUndefined'](_0x5482ac[_0x1dde('0x14')][_0x5d491d['id']])){_0x5482ac[_0x1dde('0x14')][_0x5d491d['id']]=new Trigger(_0x5d491d);}else{_0x5482ac[_0x1dde('0x3e')](_0x5482ac[_0x1dde('0x14')][_0x5d491d['id']],_0x5d491d);}}}return _0x5482ac[_0x1dde('0x14')];};};Realtime[_0x1dde('0x3f')][_0x1dde('0x48')]=function(){var _0x9c7ac6=this;return function(_0x49ac3b){if(_0x49ac3b){freeIsNotKey(_0x49ac3b,_0x9c7ac6[_0x1dde('0x16')],'id');for(var _0x11f2a2=0x0,_0x928bd9={},_0xb91695={};_0x11f2a2<_0x49ac3b[_0x1dde('0x41')];_0x11f2a2+=0x1){_0x928bd9=_0x49ac3b[_0x11f2a2];if(_[_0x1dde('0x44')](_0x9c7ac6[_0x1dde('0x16')][_0x928bd9['id']])){_0x9c7ac6['templates'][_0x928bd9['id']]=new Template(_0x928bd9);}else{_0x9c7ac6[_0x1dde('0x3e')](_0x9c7ac6[_0x1dde('0x16')][_0x928bd9['id']],_0x928bd9);}}}return _0x9c7ac6[_0x1dde('0x16')];};};Realtime[_0x1dde('0x3f')][_0x1dde('0x49')]=function(){var _0x421133=this;return function(_0x127699){if(_0x127699){freeIsNotKey(_0x127699,_0x421133[_0x1dde('0x1c')],'id');for(var _0x5c7735=0x0,_0x515388={},_0x30ffc9={};_0x5c7735<_0x127699[_0x1dde('0x41')];_0x5c7735+=0x1){_0x515388=_0x127699[_0x5c7735];if(_[_0x1dde('0x44')](_0x421133['zendeskAccounts'][_0x515388['id']])){_0x421133[_0x1dde('0x1c')][_0x515388['id']]=new ZendeskAccount(_0x515388);}else{_0x421133[_0x1dde('0x3e')](_0x421133['zendeskAccounts'][_0x515388['id']],_0x515388);}}}return _0x421133[_0x1dde('0x1c')];};};Realtime[_0x1dde('0x3f')][_0x1dde('0x4a')]=function(){var _0x16025b=this;return function(_0x45704e){if(_0x45704e){freeIsNotKey(_0x45704e,_0x16025b[_0x1dde('0x4b')],'id');for(var _0x3c6967=0x0,_0x13fc1e={},_0x615ea6={};_0x3c6967<_0x45704e[_0x1dde('0x41')];_0x3c6967+=0x1){_0x13fc1e=_0x45704e[_0x3c6967];if(_[_0x1dde('0x44')](_0x16025b[_0x1dde('0x4b')][_0x13fc1e['id']])){_0x16025b['salesforceAccounts'][_0x13fc1e['id']]=new SalesforceAccount(_0x13fc1e);}else{_0x16025b[_0x1dde('0x3e')](_0x16025b[_0x1dde('0x4b')][_0x13fc1e['id']],_0x13fc1e);}}}return _0x16025b[_0x1dde('0x4b')];};};Realtime[_0x1dde('0x3f')][_0x1dde('0x4c')]=function(){var _0x31d72e=this;return function(_0xc54b5){if(_0xc54b5){freeIsNotKey(_0xc54b5,_0x31d72e['freshdeskAccounts'],'id');for(var _0x698629=0x0,_0x17b38e={},_0x55c9e7={};_0x698629<_0xc54b5[_0x1dde('0x41')];_0x698629+=0x1){_0x17b38e=_0xc54b5[_0x698629];if(_[_0x1dde('0x44')](_0x31d72e[_0x1dde('0x1e')][_0x17b38e['id']])){_0x31d72e[_0x1dde('0x1e')][_0x17b38e['id']]=new FreshdeskAccount(_0x17b38e);}else{_0x31d72e['mergeFromDatabase'](_0x31d72e[_0x1dde('0x1e')][_0x17b38e['id']],_0x17b38e);}}}return _0x31d72e[_0x1dde('0x1e')];};};Realtime[_0x1dde('0x3f')][_0x1dde('0x4d')]=function(){var _0x19fe73=this;return function(_0xd4947d){if(_0xd4947d){freeIsNotKey(_0xd4947d,_0x19fe73[_0x1dde('0x1f')],'id');for(var _0x3eb825=0x0,_0x19e24c={},_0x1f4fd1={};_0x3eb825<_0xd4947d['length'];_0x3eb825+=0x1){_0x19e24c=_0xd4947d[_0x3eb825];if(_[_0x1dde('0x44')](_0x19fe73['zohoAccounts'][_0x19e24c['id']])){_0x19fe73[_0x1dde('0x1f')][_0x19e24c['id']]=new ZohoAccount(_0x19e24c);}else{_0x19fe73[_0x1dde('0x3e')](_0x19fe73[_0x1dde('0x1f')][_0x19e24c['id']],_0x19e24c);}}}return _0x19fe73[_0x1dde('0x1f')];};};Realtime[_0x1dde('0x3f')][_0x1dde('0x4e')]=function(){var _0x2e5ab3=this;return function(_0x163d1c){if(_0x163d1c){freeIsNotKey(_0x163d1c,_0x2e5ab3['deskAccounts'],'id');for(var _0x59beab=0x0,_0x2daa1f={},_0x197d2e={};_0x59beab<_0x163d1c[_0x1dde('0x41')];_0x59beab+=0x1){_0x2daa1f=_0x163d1c[_0x59beab];if(_[_0x1dde('0x44')](_0x2e5ab3[_0x1dde('0x20')][_0x2daa1f['id']])){_0x2e5ab3[_0x1dde('0x20')][_0x2daa1f['id']]=new DeskAccount(_0x2daa1f);}else{_0x2e5ab3[_0x1dde('0x3e')](_0x2e5ab3['deskAccounts'][_0x2daa1f['id']],_0x2daa1f);}}}return _0x2e5ab3[_0x1dde('0x20')];};};Realtime[_0x1dde('0x3f')][_0x1dde('0x4f')]=function(){var _0xcc0941=this;return function(_0x309b1b){if(_0x309b1b){freeIsNotKey(_0x309b1b,_0xcc0941[_0x1dde('0x1d')],'id');for(var _0x361ef0=0x0,_0x225533={},_0x3d75d6={};_0x361ef0<_0x309b1b[_0x1dde('0x41')];_0x361ef0+=0x1){_0x225533=_0x309b1b[_0x361ef0];if(_[_0x1dde('0x44')](_0xcc0941['sugarcrmAccounts'][_0x225533['id']])){_0xcc0941['sugarcrmAccounts'][_0x225533['id']]=new SugarcrmAccount(_0x225533);}else{_0xcc0941[_0x1dde('0x3e')](_0xcc0941['sugarcrmAccounts'][_0x225533['id']],_0x225533);}}}return _0xcc0941[_0x1dde('0x1d')];};};Realtime[_0x1dde('0x3f')][_0x1dde('0x50')]=function(){var _0x4abdec=this;return function(_0x26fe8c){if(_0x26fe8c){freeIsNotKey(_0x26fe8c,_0x4abdec[_0x1dde('0x51')],'id');for(var _0x54cebd=0x0,_0x115f08={},_0x45889c={};_0x54cebd<_0x26fe8c[_0x1dde('0x41')];_0x54cebd+=0x1){_0x115f08=_0x26fe8c[_0x54cebd];if(_[_0x1dde('0x44')](_0x4abdec[_0x1dde('0x51')][_0x115f08['id']])){_0x4abdec['vtigerAccounts'][_0x115f08['id']]=new VtigerAccount(_0x115f08);}else{_0x4abdec[_0x1dde('0x3e')](_0x4abdec['vtigerAccounts'][_0x115f08['id']],_0x115f08);}}}return _0x4abdec[_0x1dde('0x51')];};};Realtime[_0x1dde('0x3f')]['initServicenowAccounts']=function(){var _0x125be7=this;return function(_0x529d29){if(_0x529d29){freeIsNotKey(_0x529d29,_0x125be7[_0x1dde('0x21')],'id');for(var _0x1bb624=0x0,_0x27fd3e={},_0x55a31c={};_0x1bb624<_0x529d29[_0x1dde('0x41')];_0x1bb624+=0x1){_0x27fd3e=_0x529d29[_0x1bb624];if(_[_0x1dde('0x44')](_0x125be7[_0x1dde('0x21')][_0x27fd3e['id']])){_0x125be7[_0x1dde('0x21')][_0x27fd3e['id']]=new ServicenowAccount(_0x27fd3e);}else{_0x125be7[_0x1dde('0x3e')](_0x125be7[_0x1dde('0x21')][_0x27fd3e['id']],_0x27fd3e);}}}return _0x125be7['servicenowAccounts'];};};Realtime[_0x1dde('0x3f')][_0x1dde('0x52')]=function(){var _0x6c4372=this;return function(_0x3a01f4){if(_0x3a01f4){freeIsNotKey(_0x3a01f4,_0x6c4372['dynamics365Accounts'],'id');for(var _0x3d5c23=0x0,_0x148e81={},_0x265d2f={};_0x3d5c23<_0x3a01f4['length'];_0x3d5c23+=0x1){_0x148e81=_0x3a01f4[_0x3d5c23];if(_['isUndefined'](_0x6c4372['dynamics365Accounts'][_0x148e81['id']])){_0x6c4372[_0x1dde('0x22')][_0x148e81['id']]=new Dynamics365Account(_0x148e81);}else{_0x6c4372[_0x1dde('0x3e')](_0x6c4372[_0x1dde('0x22')][_0x148e81['id']],_0x148e81);}}}return _0x6c4372[_0x1dde('0x22')];};};Realtime[_0x1dde('0x3f')][_0x1dde('0x53')]=function(){var _0x2b6f33=this;return function(_0x23aa7b){if(_0x23aa7b){freeIsNotKey(_0x23aa7b,_0x2b6f33[_0x1dde('0x54')],'id');for(var _0x6be77a=0x0,_0x1dabd7={},_0x5f58da={};_0x6be77a<_0x23aa7b[_0x1dde('0x41')];_0x6be77a+=0x1){_0x1dabd7=_0x23aa7b[_0x6be77a];if(_[_0x1dde('0x44')](_0x2b6f33[_0x1dde('0x54')][_0x1dabd7['id']])){_0x2b6f33[_0x1dde('0x54')][_0x1dabd7['id']]=new FreshsalesAccount(_0x1dabd7);}else{_0x2b6f33[_0x1dde('0x3e')](_0x2b6f33[_0x1dde('0x54')][_0x1dabd7['id']],_0x1dabd7);}}}return _0x2b6f33[_0x1dde('0x54')];};};Realtime['prototype'][_0x1dde('0x55')]=function(){var _0x430da3=this;return function(_0xf90040){for(var _0xa9ddc4=0x0;_0xa9ddc4<_0xf90040['length'];_0xa9ddc4+=0x1){_[_0x1dde('0x56')](_0x430da3[_0x1dde('0x46')][_0xf90040[_0xa9ddc4][_0x1dde('0x28')]],_0xf90040[_0xa9ddc4]);}return _0x430da3[_0x1dde('0x46')];};};Realtime[_0x1dde('0x3f')][_0x1dde('0x57')]=function(){var _0x4af219=this;return function(_0x24acc8){clearVoiceQueues(_0x4af219[_0x1dde('0x46')]);if(_0x24acc8){_0x24acc8=_['groupBy'](_0x24acc8,_0x1dde('0x58'));for(var _0x43abc2 in _0x24acc8){if(_0x24acc8[_0x1dde('0x24')](_0x43abc2)){var _0x2135a5={};for(var _0x194cd1=0x0;_0x194cd1<_0x24acc8[_0x43abc2]['length'];_0x194cd1+=0x1){var _0x4f251e=_0x24acc8[_0x43abc2][_0x194cd1][_0x1dde('0x59')];if(_0x4af219[_0x1dde('0x46')][_0x4f251e]){if(_0x24acc8[_0x43abc2][_0x194cd1][_0x1dde('0x5a')]){_0x4af219[_0x1dde('0x46')][_0x4f251e][_0x1dde('0x33')]+=0x1;}if(_0x24acc8[_0x43abc2][_0x194cd1][_0x1dde('0x5b')]){_0x4af219[_0x1dde('0x46')][_0x4f251e][_0x1dde('0x34')]+=0x1;}_0x4af219['voiceQueues'][_0x4f251e][_0x1dde('0x2c')]+=moment(_0x24acc8[_0x43abc2][_0x194cd1][_0x1dde('0x5c')])['diff'](moment(_0x24acc8[_0x43abc2][_0x194cd1][_0x1dde('0x5d')]),_0x1dde('0x5e'))||0x0;if(_0x194cd1===_0x24acc8[_0x43abc2][_0x1dde('0x41')]-0x1){_0x4af219[_0x1dde('0x46')][_0x4f251e][_0x1dde('0x2d')]+=moment(_0x24acc8[_0x43abc2][_0x194cd1]['queuecallercompleteAt']||_0x24acc8[_0x43abc2][_0x194cd1][_0x1dde('0x5f')]||_0x24acc8[_0x43abc2][_0x194cd1]['queuecallerexitAt'])['diff'](moment(_0x24acc8[_0x43abc2][_0x194cd1][_0x1dde('0x5d')]),'seconds')||0x0;_0x4af219[_0x1dde('0x46')][_0x4f251e][_0x1dde('0x2b')]+=0x1;if(_0x24acc8[_0x43abc2][_0x194cd1][_0x1dde('0x60')]){_0x4af219[_0x1dde('0x46')][_0x4f251e]['answered']+=0x1;_0x4af219[_0x1dde('0x46')][_0x4f251e][_0x1dde('0x2e')]+=moment(_0x24acc8[_0x43abc2][_0x194cd1][_0x1dde('0x61')])[_0x1dde('0x62')](moment(_0x24acc8[_0x43abc2][_0x194cd1][_0x1dde('0x5c')]),_0x1dde('0x5e'))||0x0;}}else{_0x4af219[_0x1dde('0x46')][_0x4f251e]['sumDuration']+=_0x4af219['voiceQueues'][_0x4f251e][_0x1dde('0x2c')]||0x0;}}}}}}return _0x4af219['voiceQueues'];};};Realtime[_0x1dde('0x3f')][_0x1dde('0x63')]=function(){var _0x5f2d52=this;return function(_0x560d36){clearVoiceCallReports(_0x5f2d52[_0x1dde('0x17')]);if(_0x560d36){for(var _0x1eaaaa=0x0;_0x1eaaaa<_0x560d36['length'];_0x1eaaaa+=0x1){_0x5f2d52[_0x1dde('0x17')][_0x1dde('0x2b')]+=0x1;_0x5f2d52[_0x1dde('0x17')][_0x1dde('0x2d')]+=_0x560d36[_0x1eaaaa]['duration'];if(_0x560d36[_0x1eaaaa][_0x1dde('0x64')]===_0x1dde('0x65')){_0x5f2d52[_0x1dde('0x17')][_0x1dde('0x32')]+=0x1;_0x5f2d52[_0x1dde('0x17')][_0x1dde('0x2c')]+=_0x560d36[_0x1eaaaa][_0x1dde('0x66')]-_0x560d36[_0x1eaaaa][_0x1dde('0x67')]||0x0;_0x5f2d52['outbound']['sumBillable']+=_0x560d36[_0x1eaaaa][_0x1dde('0x67')];}}}return _0x5f2d52['outbound'];};};Realtime['prototype'][_0x1dde('0x68')]=function(){var _0x491200=this;return function(_0x51477d){if(_0x51477d){freeIsNotKey(_0x51477d,_0x491200[_0x1dde('0x15')],_0x1dde('0x28'));for(var _0x129d34=0x0,_0x37a7d0={};_0x129d34<_0x51477d[_0x1dde('0x41')];_0x129d34+=0x1){_0x37a7d0=_0x51477d[_0x129d34];if(_[_0x1dde('0x44')](_0x491200[_0x1dde('0x15')][_0x37a7d0['name']])){_0x491200[_0x1dde('0x15')][_0x37a7d0[_0x1dde('0x28')]]=new Campaign(_0x37a7d0);}else{_0x491200[_0x1dde('0x3e')](_0x491200[_0x1dde('0x15')][_0x37a7d0[_0x1dde('0x28')]],_0x37a7d0);_0x491200[_0x1dde('0x15')][_0x37a7d0[_0x1dde('0x28')]][_0x1dde('0x69')]=_0x37a7d0['SquareProject']?_0x37a7d0[_0x1dde('0x6a')]['name']:undefined;}}}return _0x491200[_0x1dde('0x15')];};};Realtime['prototype'][_0x1dde('0x6b')]=function(){var _0x3ecb59=this;return function(_0x2aa6b1){if(_0x2aa6b1){freeIsNotKey(_0x2aa6b1,_0x3ecb59[_0x1dde('0x18')],'id');for(var _0x51c01f=0x0,_0x2f4fc2={};_0x51c01f<_0x2aa6b1[_0x1dde('0x41')];_0x51c01f+=0x1){_0x2f4fc2=_0x2aa6b1[_0x51c01f];if(_['isUndefined'](_0x3ecb59['voiceExtensions'][_0x2f4fc2['id']])){_0x3ecb59[_0x1dde('0x18')][_0x2f4fc2['id']]=new VoiceExtension(_0x2f4fc2);}else{_0x3ecb59[_0x1dde('0x3e')](_0x3ecb59['voiceExtensions'][_0x2f4fc2['id']],_0x2f4fc2);}}}return _0x3ecb59[_0x1dde('0x18')];};};Realtime['prototype'][_0x1dde('0x6c')]=function(){var _0x3eefaf=this;return function(_0x38b707){clearCampaigns(_0x3eefaf[_0x1dde('0x15')]);for(var _0x5086df=0x0;_0x5086df<_0x38b707[_0x1dde('0x41')];_0x5086df+=0x1){_['merge'](_0x3eefaf['campaigns'][_0x38b707[_0x5086df][_0x1dde('0x28')]],_0x38b707[_0x5086df]);}return _0x3eefaf['campaigns'];};};Realtime[_0x1dde('0x3f')][_0x1dde('0x6d')]=function(){var _0x4f555f=this;return function(_0x357e33){if(_0x357e33){freeIsNotKey(_0x357e33,_0x4f555f[_0x1dde('0x23')],'id');for(var _0xb573c2=0x0,_0x19a90c={},_0xcd22eb={};_0xb573c2<_0x357e33[_0x1dde('0x41')];_0xb573c2+=0x1){_0x19a90c=_0x357e33[_0xb573c2];if(_[_0x1dde('0x44')](_0x4f555f[_0x1dde('0x23')][_0x19a90c['id']])){_0x4f555f[_0x1dde('0x23')][_0x19a90c['id']]=new FaxAccount(_0x19a90c);}else{_0x4f555f[_0x1dde('0x3e')](_0x4f555f['faxAccounts'][_0x19a90c['id']],_0x19a90c);}}}return _0x4f555f['faxAccounts'];};};module[_0x1dde('0x6e')]=Realtime; \ No newline at end of file diff --git a/server/services/ami/report/index.js b/server/services/ami/report/index.js index 5c95a84..1d3aa42 100644 --- a/server/services/ami/report/index.js +++ b/server/services/ami/report/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7d15=['indexOf','mobile','phone','lastIndexOf','exports','lodash','util','../../../config/environment','../ami','../rpc/voiceAgentReport','../rpc/voiceDialReport','../rpc/memberReport','../rpc/voiceQueueReport','../rpc/voiceRecording','../rpc/voiceTransferReport','./voiceQueueReport','./voiceAgentReport','./voiceDialReport','realtime','agents','telephones','prototype','sync','xdr','custom:voiceQueueReport','bind','custom:voiceCallReport','voiceCallReport','voiceAgentReport','custom:voiceDialReport','voiceDialReport','blindTransfer','attendedTransfer','accountcode','name','isNil','find','interface','format','voiceQueueReport','length','findAgent','connectedlinenum','assigned','lastAssignedTo','SIP/%s','queuecallercomplete','queuecallerexit','queuecallerexitAt','YYYY-MM-DD\x20HH:mm:ss','create','destination','exten','type','dialer','lastapplication','queue','lastdata','context','from-voip-provider','from-sip','xcally-motion-preview','calleridpreview','calleridnum','originatecalleridnum','channel','callerid','disposition','ANSWERED','calleridname','transfers','linkedid','transfereelinkedid','uniqueid','monitor','monitors','monitorFilename','connectedlinename','membername','xcally-motion-dialer','isArray','startsWith','substring'];(function(_0x1eda20,_0x1149f4){var _0x31b953=function(_0x25f0d8){while(--_0x25f0d8){_0x1eda20['push'](_0x1eda20['shift']());}};_0x31b953(++_0x1149f4);}(_0x7d15,0x1a4));var _0x57d1=function(_0x465634,_0x5b5fa7){_0x465634=_0x465634-0x0;var _0x4ef9bc=_0x7d15[_0x465634];return _0x4ef9bc;};'use strict';var _=require(_0x57d1('0x0'));var moment=require('moment');var util=require(_0x57d1('0x1'));var config=require(_0x57d1('0x2'));var ami=require(_0x57d1('0x3'));var RpcVoiceAgentReport=require(_0x57d1('0x4'));var RpcVoiceCallReport=require('../rpc/voiceCallReport');var RpcVoiceDialReport=require(_0x57d1('0x5'));var RpcMemberReport=require(_0x57d1('0x6'));var RpcVoiceQueueReport=require(_0x57d1('0x7'));var RpcVoiceRecording=require(_0x57d1('0x8'));var RpcVoiceTransferReport=require(_0x57d1('0x9'));var VoiceQueueReport=require(_0x57d1('0xa'));var VoiceCallReport=require('./voiceCallReport');var VoiceAgentReport=require(_0x57d1('0xb'));var VoiceDialReport=require(_0x57d1('0xc'));var UserReport=require('./userReport');function Report(_0x40425d){this[_0x57d1('0xd')]=_0x40425d;this[_0x57d1('0xe')]=_0x40425d[_0x57d1('0xe')];this[_0x57d1('0xf')]=_0x40425d[_0x57d1('0xf')];}Report[_0x57d1('0x10')][_0x57d1('0x11')]=function(_0x43a952){var _0x2aece3=new VoiceQueueReport(this['realtime']);var _0x599af1=new VoiceAgentReport(this[_0x57d1('0xd')]);var _0x18a102=new VoiceDialReport(this[_0x57d1('0xd')]);var _0xb34807=new VoiceCallReport(this['realtime']);var _0x3e8e05=new UserReport(this[_0x57d1('0xd')]);if(config[_0x57d1('0x12')]&&config['xdr']['disabled']){ami['on'](_0x57d1('0x13'),this['voiceQueueReport'][_0x57d1('0x14')](this));ami['on'](_0x57d1('0x15'),this[_0x57d1('0x16')]['bind'](this));ami['on']('custom:voiceAgentReport',this[_0x57d1('0x17')][_0x57d1('0x14')](this));ami['on'](_0x57d1('0x18'),this[_0x57d1('0x19')][_0x57d1('0x14')](this));ami['on']('blindtransfer',this[_0x57d1('0x1a')][_0x57d1('0x14')](this));ami['on']('attendedtransfer',this[_0x57d1('0x1b')]['bind'](this));}};Report[_0x57d1('0x10')]['findAgent']=function(_0x43caef){var _0x395116;_0x395116=_['find'](this[_0x57d1('0xe')],function(_0x1ade7d){return _0x1ade7d[_0x57d1('0x1c')]==_0x43caef||_0x1ade7d[_0x57d1('0x1d')]==_0x43caef;});if(_[_0x57d1('0x1e')](_0x395116)){var _0x43c13f=_[_0x57d1('0x1f')](this[_0x57d1('0xf')],function(_0x25e1d2){return _0x25e1d2[_0x57d1('0x1c')]==_0x43caef||_0x25e1d2[_0x57d1('0x1d')]==_0x43caef;});if(_0x43c13f){_0x395116=_[_0x57d1('0x1f')](this[_0x57d1('0xe')],function(_0x3209b1){return _0x3209b1[_0x57d1('0x20')]==util[_0x57d1('0x21')]('SIP/%s',_0x43c13f[_0x57d1('0x1d')]);});}}return _0x395116;};Report['prototype'][_0x57d1('0x22')]=function(_0x5a3b58){for(var _0x3d4246=0x0;_0x3d4246<_0x5a3b58[_0x57d1('0x23')];_0x3d4246+=0x1){var _0xe15e1a=this[_0x57d1('0x24')](_0x5a3b58[_0x3d4246][_0x57d1('0x25')]);if(_0xe15e1a){_0x5a3b58[_0x3d4246][_0x57d1('0x1c')]=_0xe15e1a[_0x57d1('0x1c')];_0x5a3b58[_0x3d4246][_0x57d1('0x26')]=!![];_0x5a3b58[_0x3d4246][_0x57d1('0x27')]=_0xe15e1a['name'];_0x5a3b58[_0x3d4246][_0x57d1('0x20')]=_[_0x57d1('0x1e')](_0xe15e1a[_0x57d1('0x20')])?util[_0x57d1('0x21')](_0x57d1('0x28'),_0xe15e1a['name']):_0xe15e1a['interface'];if(_0x5a3b58[_0x3d4246][_0x57d1('0x29')]){_0x5a3b58[_0x3d4246]['queuecallercompleteAt']=moment()[_0x57d1('0x21')]('YYYY-MM-DD\x20HH:mm:ss');}if(_0x5a3b58[_0x3d4246][_0x57d1('0x2a')]){_0x5a3b58[_0x3d4246][_0x57d1('0x2b')]=moment()[_0x57d1('0x21')](_0x57d1('0x2c'));}RpcMemberReport[_0x57d1('0x22')](_0x5a3b58[_0x3d4246]);}RpcVoiceQueueReport[_0x57d1('0x2d')](_0x5a3b58[_0x3d4246]);}};function extractCalleridNumber(_0x45bb65){var _0x1a4ab4=_0x45bb65['match'](/<(.*?)>/);return _0x1a4ab4?_0x1a4ab4[0x1]:_0x45bb65;}Report['prototype'][_0x57d1('0x16')]=function(_0x533e4d){_0x533e4d[_0x57d1('0x2e')]=_0x533e4d[_0x57d1('0x2e')]||_0x533e4d[_0x57d1('0x2f')];if(_0x533e4d[_0x57d1('0x30')]==_0x57d1('0x31')){_0x533e4d[_0x57d1('0x32')]=_0x57d1('0x33');_0x533e4d[_0x57d1('0x34')]=_0x533e4d['queue'];if(_0x533e4d[_0x57d1('0x35')]==_0x57d1('0x36')){_0x533e4d['accountcode']='';_0x533e4d['destination']=extractCalleridNumber(_0x533e4d['callerid']);}else if(_0x533e4d[_0x57d1('0x35')]==_0x57d1('0x37')){if(_0x533e4d[_0x57d1('0x2e')]==_0x57d1('0x38')){_0x533e4d[_0x57d1('0x2e')]=extractCalleridNumber(_0x533e4d[_0x57d1('0x39')]);_0x533e4d[_0x57d1('0x3a')]=_0x533e4d[_0x57d1('0x3b')];_0x533e4d['destinationchannel']=[_0x533e4d['channel'],_0x533e4d[_0x57d1('0x3c')]=_0x533e4d['destinationchannel']][0x0];_0x533e4d[_0x57d1('0x3d')]=_0x533e4d['calleridpreview'];}else{_0x533e4d[_0x57d1('0x2e')]=_0x533e4d['calleridnum'];_0x533e4d[_0x57d1('0x3a')]=_0x533e4d['originatecalleridnum'];if(_0x533e4d[_0x57d1('0x3e')]==_0x57d1('0x3f')){_0x533e4d[_0x57d1('0x1c')]=_0x533e4d['connectedlinenum'];}else{_0x533e4d[_0x57d1('0x1c')]='';}}}}else{_0x533e4d[_0x57d1('0x3d')]=util[_0x57d1('0x21')]('\x22%s\x22\x20<%s>',_0x533e4d[_0x57d1('0x40')],_0x533e4d['calleridnum']);}if(RpcVoiceTransferReport[_0x57d1('0x41')][_0x533e4d[_0x57d1('0x42')]]){var _0x2576c3=RpcVoiceTransferReport['transfers'][_0x533e4d['linkedid']];_0x2576c3[_0x57d1('0x43')]=_0x533e4d[_0x57d1('0x44')];RpcVoiceTransferReport[_0x57d1('0x1a')](_0x2576c3);delete RpcVoiceTransferReport[_0x57d1('0x41')][_0x533e4d['linkedid']];}RpcVoiceCallReport[_0x57d1('0x2d')](_0x533e4d);if(_0x533e4d[_0x57d1('0x45')]){for(var _0x32fe05=0x0;_0x32fe05<_0x533e4d[_0x57d1('0x46')][_0x57d1('0x23')];_0x32fe05+=0x1){_0x533e4d[_0x57d1('0x47')]=_0x533e4d[_0x57d1('0x46')][_0x32fe05]['filename'];_0x533e4d['createdAt']=_0x533e4d[_0x57d1('0x46')][_0x32fe05]['createdAt'];if(_0x533e4d[_0x57d1('0x2f')]=='xcally-motion-preview'){_0x533e4d[_0x57d1('0x3a')]=_0x533e4d[_0x57d1('0x25')];_0x533e4d['calleridname']=_0x533e4d[_0x57d1('0x48')];_0x533e4d[_0x57d1('0x25')]=_0x533e4d[_0x57d1('0x1c')];_0x533e4d[_0x57d1('0x48')]=_0x533e4d[_0x57d1('0x49')];_0x533e4d[_0x57d1('0x2f')]=_0x533e4d['originatecalleridnum'];}else if(_0x533e4d[_0x57d1('0x2f')]==_0x57d1('0x4a')){_0x533e4d[_0x57d1('0x3a')]=_0x533e4d[_0x57d1('0x2e')];_0x533e4d[_0x57d1('0x2f')]=_0x533e4d[_0x57d1('0x3b')];}RpcVoiceRecording['create'](_0x533e4d);}}};Report[_0x57d1('0x10')][_0x57d1('0x17')]=function(_0x16c9cb){if(_[_0x57d1('0x4b')](_0x16c9cb)){_0x16c9cb['forEach'](function(_0x25e6cd){RpcVoiceAgentReport[_0x57d1('0x2d')](_0x25e6cd);});}else{RpcVoiceAgentReport['create'](_0x16c9cb);}};Report[_0x57d1('0x10')][_0x57d1('0x19')]=function(_0x2f490d){RpcVoiceDialReport[_0x57d1('0x2d')](_0x2f490d);var _0x40b75e;var _0x5e0786;var _0x3de556=_0x2f490d[_0x57d1('0x3c')];if(_[_0x57d1('0x4c')](_0x3de556,'Local')){_0x5e0786=_0x3de556[_0x57d1('0x4d')](_0x3de556['indexOf']('/')+0x1,_0x3de556[_0x57d1('0x4e')]('@'));_0x40b75e=_[_0x57d1('0x1f')](this[_0x57d1('0xe')],function(_0x75231){return _0x75231[_0x57d1('0x4f')]==_0x5e0786||_0x75231[_0x57d1('0x50')]==_0x5e0786||_0x75231[_0x57d1('0x1c')]==_0x5e0786;});}else{_0x5e0786=_0x3de556['substring'](_0x3de556['indexOf']('/')+0x1,_0x3de556[_0x57d1('0x51')]('-'));_0x40b75e=this['findAgent'](_0x5e0786);}if(_0x40b75e){_0x2f490d[_0x57d1('0x20')]=_[_0x57d1('0x1e')](_0x40b75e[_0x57d1('0x20')])?util[_0x57d1('0x21')]('SIP/%s',_0x40b75e[_0x57d1('0x1d')]):_0x40b75e[_0x57d1('0x20')];_0x2f490d[_0x57d1('0x49')]=_0x40b75e['name'];_0x2f490d[_0x57d1('0x1c')]=_0x40b75e[_0x57d1('0x1c')];RpcMemberReport[_0x57d1('0x19')](_0x2f490d);}};Report[_0x57d1('0x10')][_0x57d1('0x1a')]=function(_0x5c0c2e){RpcVoiceTransferReport[_0x57d1('0x41')][_0x5c0c2e['transfererlinkedid']]=_0x5c0c2e;};Report[_0x57d1('0x10')][_0x57d1('0x1b')]=function(_0x33d916){RpcVoiceTransferReport[_0x57d1('0x1b')](_0x33d916);};module[_0x57d1('0x52')]=Report; \ No newline at end of file +var _0xf249=['realtime','agents','telephones','prototype','sync','disabled','custom:voiceQueueReport','bind','custom:voiceCallReport','voiceCallReport','custom:voiceAgentReport','voiceAgentReport','custom:voiceDialReport','voiceDialReport','blindtransfer','blindTransfer','attendedtransfer','findAgent','find','accountcode','name','isNil','interface','format','voiceQueueReport','length','connectedlinenum','assigned','SIP/%s','queuecallercomplete','queuecallercompleteAt','YYYY-MM-DD\x20HH:mm:ss','queuecallerexitAt','create','match','destination','type','dialer','lastapplication','lastdata','context','from-voip-provider','callerid','from-sip','xcally-motion-preview','calleridpreview','calleridnum','originatecalleridnum','channel','destinationchannel','disposition','ANSWERED','\x22%s\x22\x20<%s>','calleridname','linkedid','transfereelinkedid','uniqueid','monitor','monitorFilename','monitors','filename','createdAt','exten','connectedlinename','membername','isArray','forEach','Local','substring','indexOf','mobile','lastIndexOf','transfererlinkedid','attendedTransfer','exports','lodash','moment','util','../ami','../rpc/voiceCallReport','../rpc/voiceDialReport','../rpc/memberReport','../rpc/voiceQueueReport','../rpc/voiceTransferReport','./voiceQueueReport','./voiceCallReport','./voiceDialReport'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0xf249,0xa2));var _0x9f24=function(_0x366d3e,_0x24525a){_0x366d3e=_0x366d3e-0x0;var _0x4ed561=_0xf249[_0x366d3e];return _0x4ed561;};'use strict';var _=require(_0x9f24('0x0'));var moment=require(_0x9f24('0x1'));var util=require(_0x9f24('0x2'));var config=require('../../../config/environment');var ami=require(_0x9f24('0x3'));var RpcVoiceAgentReport=require('../rpc/voiceAgentReport');var RpcVoiceCallReport=require(_0x9f24('0x4'));var RpcVoiceDialReport=require(_0x9f24('0x5'));var RpcMemberReport=require(_0x9f24('0x6'));var RpcVoiceQueueReport=require(_0x9f24('0x7'));var RpcVoiceRecording=require('../rpc/voiceRecording');var RpcVoiceTransferReport=require(_0x9f24('0x8'));var VoiceQueueReport=require(_0x9f24('0x9'));var VoiceCallReport=require(_0x9f24('0xa'));var VoiceAgentReport=require('./voiceAgentReport');var VoiceDialReport=require(_0x9f24('0xb'));var UserReport=require('./userReport');function Report(_0x498ada){this[_0x9f24('0xc')]=_0x498ada;this[_0x9f24('0xd')]=_0x498ada[_0x9f24('0xd')];this[_0x9f24('0xe')]=_0x498ada[_0x9f24('0xe')];}Report[_0x9f24('0xf')][_0x9f24('0x10')]=function(_0x37b976){var _0x1bedbf=new VoiceQueueReport(this[_0x9f24('0xc')]);var _0xa9d5f7=new VoiceAgentReport(this[_0x9f24('0xc')]);var _0x376086=new VoiceDialReport(this['realtime']);var _0x161c9e=new VoiceCallReport(this[_0x9f24('0xc')]);var _0x21a553=new UserReport(this['realtime']);if(config['xdr']&&config['xdr'][_0x9f24('0x11')]){ami['on'](_0x9f24('0x12'),this['voiceQueueReport'][_0x9f24('0x13')](this));ami['on'](_0x9f24('0x14'),this[_0x9f24('0x15')][_0x9f24('0x13')](this));ami['on'](_0x9f24('0x16'),this[_0x9f24('0x17')][_0x9f24('0x13')](this));ami['on'](_0x9f24('0x18'),this[_0x9f24('0x19')]['bind'](this));ami['on'](_0x9f24('0x1a'),this[_0x9f24('0x1b')][_0x9f24('0x13')](this));ami['on'](_0x9f24('0x1c'),this['attendedTransfer'][_0x9f24('0x13')](this));}};Report[_0x9f24('0xf')][_0x9f24('0x1d')]=function(_0x2e7653){var _0x1487d7;_0x1487d7=_[_0x9f24('0x1e')](this['agents'],function(_0x42ad43){return _0x42ad43[_0x9f24('0x1f')]==_0x2e7653||_0x42ad43[_0x9f24('0x20')]==_0x2e7653;});if(_[_0x9f24('0x21')](_0x1487d7)){var _0x436ecc=_[_0x9f24('0x1e')](this[_0x9f24('0xe')],function(_0x4cb6a){return _0x4cb6a['accountcode']==_0x2e7653||_0x4cb6a[_0x9f24('0x20')]==_0x2e7653;});if(_0x436ecc){_0x1487d7=_['find'](this[_0x9f24('0xd')],function(_0x38acad){return _0x38acad[_0x9f24('0x22')]==util[_0x9f24('0x23')]('SIP/%s',_0x436ecc[_0x9f24('0x20')]);});}}return _0x1487d7;};Report['prototype'][_0x9f24('0x24')]=function(_0x17e9e9){for(var _0x42de5a=0x0;_0x42de5a<_0x17e9e9[_0x9f24('0x25')];_0x42de5a+=0x1){var _0x39e8ec=this[_0x9f24('0x1d')](_0x17e9e9[_0x42de5a][_0x9f24('0x26')]);if(_0x39e8ec){_0x17e9e9[_0x42de5a][_0x9f24('0x1f')]=_0x39e8ec[_0x9f24('0x1f')];_0x17e9e9[_0x42de5a][_0x9f24('0x27')]=!![];_0x17e9e9[_0x42de5a]['lastAssignedTo']=_0x39e8ec['name'];_0x17e9e9[_0x42de5a][_0x9f24('0x22')]=_[_0x9f24('0x21')](_0x39e8ec[_0x9f24('0x22')])?util[_0x9f24('0x23')](_0x9f24('0x28'),_0x39e8ec[_0x9f24('0x20')]):_0x39e8ec['interface'];if(_0x17e9e9[_0x42de5a][_0x9f24('0x29')]){_0x17e9e9[_0x42de5a][_0x9f24('0x2a')]=moment()[_0x9f24('0x23')](_0x9f24('0x2b'));}if(_0x17e9e9[_0x42de5a]['queuecallerexit']){_0x17e9e9[_0x42de5a][_0x9f24('0x2c')]=moment()[_0x9f24('0x23')]('YYYY-MM-DD\x20HH:mm:ss');}RpcMemberReport[_0x9f24('0x24')](_0x17e9e9[_0x42de5a]);}RpcVoiceQueueReport[_0x9f24('0x2d')](_0x17e9e9[_0x42de5a]);}};function extractCalleridNumber(_0x29f3a3){var _0x42dbca=_0x29f3a3[_0x9f24('0x2e')](/<(.*?)>/);return _0x42dbca?_0x42dbca[0x1]:_0x29f3a3;}Report[_0x9f24('0xf')][_0x9f24('0x15')]=function(_0xec4383){_0xec4383[_0x9f24('0x2f')]=_0xec4383[_0x9f24('0x2f')]||_0xec4383['exten'];if(_0xec4383[_0x9f24('0x30')]==_0x9f24('0x31')){_0xec4383[_0x9f24('0x32')]='queue';_0xec4383[_0x9f24('0x33')]=_0xec4383['queue'];if(_0xec4383[_0x9f24('0x34')]==_0x9f24('0x35')){_0xec4383[_0x9f24('0x1f')]='';_0xec4383['destination']=extractCalleridNumber(_0xec4383[_0x9f24('0x36')]);}else if(_0xec4383[_0x9f24('0x34')]==_0x9f24('0x37')){if(_0xec4383[_0x9f24('0x2f')]==_0x9f24('0x38')){_0xec4383[_0x9f24('0x2f')]=extractCalleridNumber(_0xec4383[_0x9f24('0x39')]);_0xec4383[_0x9f24('0x3a')]=_0xec4383[_0x9f24('0x3b')];_0xec4383['destinationchannel']=[_0xec4383['channel'],_0xec4383[_0x9f24('0x3c')]=_0xec4383[_0x9f24('0x3d')]][0x0];_0xec4383[_0x9f24('0x36')]=_0xec4383['calleridpreview'];}else{_0xec4383[_0x9f24('0x2f')]=_0xec4383[_0x9f24('0x3a')];_0xec4383[_0x9f24('0x3a')]=_0xec4383[_0x9f24('0x3b')];if(_0xec4383[_0x9f24('0x3e')]==_0x9f24('0x3f')){_0xec4383['accountcode']=_0xec4383[_0x9f24('0x26')];}else{_0xec4383[_0x9f24('0x1f')]='';}}}}else{_0xec4383[_0x9f24('0x36')]=util['format'](_0x9f24('0x40'),_0xec4383[_0x9f24('0x41')],_0xec4383[_0x9f24('0x3a')]);}if(RpcVoiceTransferReport['transfers'][_0xec4383[_0x9f24('0x42')]]){var _0x4280f0=RpcVoiceTransferReport['transfers'][_0xec4383['linkedid']];_0x4280f0[_0x9f24('0x43')]=_0xec4383[_0x9f24('0x44')];RpcVoiceTransferReport[_0x9f24('0x1b')](_0x4280f0);delete RpcVoiceTransferReport['transfers'][_0xec4383[_0x9f24('0x42')]];}RpcVoiceCallReport[_0x9f24('0x2d')](_0xec4383);if(_0xec4383[_0x9f24('0x45')]){for(var _0x1b0909=0x0;_0x1b0909<_0xec4383['monitors'][_0x9f24('0x25')];_0x1b0909+=0x1){_0xec4383[_0x9f24('0x46')]=_0xec4383[_0x9f24('0x47')][_0x1b0909][_0x9f24('0x48')];_0xec4383[_0x9f24('0x49')]=_0xec4383['monitors'][_0x1b0909][_0x9f24('0x49')];if(_0xec4383[_0x9f24('0x4a')]==_0x9f24('0x38')){_0xec4383[_0x9f24('0x3a')]=_0xec4383[_0x9f24('0x26')];_0xec4383['calleridname']=_0xec4383['connectedlinename'];_0xec4383[_0x9f24('0x26')]=_0xec4383[_0x9f24('0x1f')];_0xec4383[_0x9f24('0x4b')]=_0xec4383[_0x9f24('0x4c')];_0xec4383[_0x9f24('0x4a')]=_0xec4383[_0x9f24('0x3b')];}else if(_0xec4383['exten']=='xcally-motion-dialer'){_0xec4383[_0x9f24('0x3a')]=_0xec4383[_0x9f24('0x2f')];_0xec4383[_0x9f24('0x4a')]=_0xec4383['originatecalleridnum'];}RpcVoiceRecording[_0x9f24('0x2d')](_0xec4383);}}};Report[_0x9f24('0xf')]['voiceAgentReport']=function(_0x495f45){if(_[_0x9f24('0x4d')](_0x495f45)){_0x495f45[_0x9f24('0x4e')](function(_0x33f595){RpcVoiceAgentReport[_0x9f24('0x2d')](_0x33f595);});}else{RpcVoiceAgentReport['create'](_0x495f45);}};Report[_0x9f24('0xf')][_0x9f24('0x19')]=function(_0x14a5d5){RpcVoiceDialReport['create'](_0x14a5d5);var _0x436713;var _0x10aed2;var _0x10bfbf=_0x14a5d5['channel'];if(_['startsWith'](_0x10bfbf,_0x9f24('0x4f'))){_0x10aed2=_0x10bfbf[_0x9f24('0x50')](_0x10bfbf[_0x9f24('0x51')]('/')+0x1,_0x10bfbf[_0x9f24('0x51')]('@'));_0x436713=_[_0x9f24('0x1e')](this[_0x9f24('0xd')],function(_0x15b7c5){return _0x15b7c5[_0x9f24('0x52')]==_0x10aed2||_0x15b7c5['phone']==_0x10aed2||_0x15b7c5[_0x9f24('0x1f')]==_0x10aed2;});}else{_0x10aed2=_0x10bfbf[_0x9f24('0x50')](_0x10bfbf[_0x9f24('0x51')]('/')+0x1,_0x10bfbf[_0x9f24('0x53')]('-'));_0x436713=this[_0x9f24('0x1d')](_0x10aed2);}if(_0x436713){_0x14a5d5[_0x9f24('0x22')]=_[_0x9f24('0x21')](_0x436713[_0x9f24('0x22')])?util['format'](_0x9f24('0x28'),_0x436713[_0x9f24('0x20')]):_0x436713[_0x9f24('0x22')];_0x14a5d5[_0x9f24('0x4c')]=_0x436713[_0x9f24('0x20')];_0x14a5d5[_0x9f24('0x1f')]=_0x436713[_0x9f24('0x1f')];RpcMemberReport[_0x9f24('0x19')](_0x14a5d5);}};Report[_0x9f24('0xf')][_0x9f24('0x1b')]=function(_0x4c1fe3){RpcVoiceTransferReport['transfers'][_0x4c1fe3[_0x9f24('0x54')]]=_0x4c1fe3;};Report[_0x9f24('0xf')][_0x9f24('0x55')]=function(_0x2634a7){RpcVoiceTransferReport[_0x9f24('0x55')](_0x2634a7);};module[_0x9f24('0x56')]=Report; \ No newline at end of file diff --git a/server/services/ami/report/userReport.js b/server/services/ami/report/userReport.js index d27872d..338f2c4 100644 --- a/server/services/ami/report/userReport.js +++ b/server/services/ami/report/userReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xadcf=['exports','lodash','bluebird','../../../config/environment','../../../config/logger','ami','defaults','redis','trunks','registryentry','syncRegistry','bind','registry','devicestatechange','peerstatus','syncPeerStatus','resolve','then','actionSipShowRegistry','catch','error','[userReport][sipshowregistry]','inspect','actionDeviceStateList','[userReport][devicestatelist]','actionSipPeerStatus','[userReport][sippeerstatus]','prototype','syncRealtimeShow','isUndefined','emit','info','username','state','debug','find','stateRegistry','merge','omit','event','actionid','[userReport][registry]\x20sending\x20trunk:save\x20event:','format','trunk:%s','name','trunk:save','[userReport][registry]','syncDeviceState','isNotNull','[userReport][devicestatechange]\x20device:%s\x20state:%s','device','agents','local','toLowerCase','inuse','stateTime','toNumber','telephones','[userReport][devicestatechange]\x20sending\x20telephone:save\x20event:','telephone:%s','[userReport][devicestatechange]\x20sending\x20trunk:save\x20event:','Local','substring','indexOf','accountcode','updateStatusRealtime','[userReport][peerstatus]\x20peer:%s\x20address:%s\x20status:%s','peer','address','[userReport][peerstatus]','registered','status','[userReport][peerstatus]\x20sending\x20telephone:save\x20event:','[userReport][peerstatus]\x20sending\x20trunk:save\x20event:'];(function(_0x556bb1,_0x34830d){var _0x45455f=function(_0x13c6ba){while(--_0x13c6ba){_0x556bb1['push'](_0x556bb1['shift']());}};_0x45455f(++_0x34830d);}(_0xadcf,0x173));var _0xfadc=function(_0x38c7e3,_0x34b4bc){_0x38c7e3=_0x38c7e3-0x0;var _0x34b66f=_0xadcf[_0x38c7e3];return _0x34b66f;};'use strict';var _=require(_0xfadc('0x0'));var moment=require('moment');var util=require('util');var Redis=require('ioredis');var BPromise=require(_0xfadc('0x1'));var config=require(_0xfadc('0x2'));var logger=require(_0xfadc('0x3'))(_0xfadc('0x4'));var ami=require('../ami');config['redis']=_[_0xfadc('0x5')](config[_0xfadc('0x6')],{'host':'localhost','port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0xfadc('0x6')]));function UserReport(_0x25d95e){this[_0xfadc('0x7')]=_0x25d95e[_0xfadc('0x7')];this['agents']=_0x25d95e['agents'];this['telephones']=_0x25d95e['telephones'];ami['on'](_0xfadc('0x8'),this[_0xfadc('0x9')][_0xfadc('0xa')](this));ami['on'](_0xfadc('0xb'),this[_0xfadc('0x9')][_0xfadc('0xa')](this));ami['on'](_0xfadc('0xc'),this['syncDeviceState']['bind'](this));ami['on'](_0xfadc('0xd'),this[_0xfadc('0xe')][_0xfadc('0xa')](this));return this['syncRealtimeShow']();}function showSipRegistrations(){Promise[_0xfadc('0xf')]()[_0xfadc('0x10')](ami[_0xfadc('0x11')]())[_0xfadc('0x12')](function(_0x1a9082){logger[_0xfadc('0x13')](_0xfadc('0x14'),util[_0xfadc('0x15')](_0x1a9082,{'showHidden':![],'depth':null}));});}function listDeviceStates(){Promise[_0xfadc('0xf')]()[_0xfadc('0x10')](ami[_0xfadc('0x16')]())[_0xfadc('0x12')](function(_0x23953f){logger[_0xfadc('0x13')](_0xfadc('0x17'),util[_0xfadc('0x15')](_0x23953f,{'showHidden':![],'depth':null}));});}function showPeersStatus(){Promise['resolve']()['then'](ami[_0xfadc('0x18')]())['catch'](function(_0x3f8cde){logger['error'](_0xfadc('0x19'),util[_0xfadc('0x15')](_0x3f8cde,{'showHidden':![],'depth':null}));});}UserReport[_0xfadc('0x1a')][_0xfadc('0x1b')]=function(){setInterval(function(){BPromise['resolve']()[_0xfadc('0x10')](showSipRegistrations())[_0xfadc('0x10')](listDeviceStates())[_0xfadc('0x10')](showPeersStatus());},0x32c8);};UserReport[_0xfadc('0x1a')]['isNotNull']=function(_0x482d47){return _0x482d47!==null&&!_[_0xfadc('0x1c')](_0x482d47);};UserReport['prototype'][_0xfadc('0x1d')]=function(_0x213705,_0x2b3889,_0x356177){io['to'](_0x213705)[_0xfadc('0x1d')](_0x2b3889,_0x356177);};UserReport[_0xfadc('0x1a')][_0xfadc('0x9')]=function(_0x1bcbf4){try{if(this['isNotNull'](_0x1bcbf4)){logger[_0xfadc('0x1e')]('[userReport][registry]\x20registry:%s\x20state:%s',_0x1bcbf4[_0xfadc('0x1f')],_0x1bcbf4[_0xfadc('0x20')]);logger[_0xfadc('0x21')]('[userReport][registry]',util[_0xfadc('0x15')](_0x1bcbf4,{'showHidden':![],'depth':null}));var _0xc8e46f=_[_0xfadc('0x22')](this[_0xfadc('0x7')],{'defaultuser':_0x1bcbf4[_0xfadc('0x1f')]});if(_0xc8e46f){_0x1bcbf4[_0xfadc('0x23')]=_0x1bcbf4[_0xfadc('0x20')];_[_0xfadc('0x24')](_0xc8e46f,_[_0xfadc('0x25')](_0x1bcbf4,[_0xfadc('0x26'),_0xfadc('0x27'),_0xfadc('0x1f'),_0xfadc('0x20')]));logger['debug'](_0xfadc('0x28'),util[_0xfadc('0x15')](_0xc8e46f,{'showHidden':![],'depth':null}));this[_0xfadc('0x1d')](util[_0xfadc('0x29')](_0xfadc('0x2a'),_0xc8e46f[_0xfadc('0x2b')]),_0xfadc('0x2c'),_0xc8e46f);}}}catch(_0x41558d){logger['error'](_0xfadc('0x2d'),util[_0xfadc('0x15')](_0x41558d,{'showHidden':![],'depth':null}));}};UserReport['prototype'][_0xfadc('0x2e')]=function(_0x49874d){try{if(this[_0xfadc('0x2f')](_0x49874d)){logger[_0xfadc('0x1e')](_0xfadc('0x30'),_0x49874d[_0xfadc('0x31')],_0x49874d['state']);logger[_0xfadc('0x21')]('[userReport][devicestatechange]',util[_0xfadc('0x15')](_0x49874d,{'showHidden':![],'depth':null}));if(this[_0xfadc('0x32')][_0x49874d[_0xfadc('0x31')]]){if(!this[_0xfadc('0x32')][_0x49874d[_0xfadc('0x31')]][_0xfadc('0x33')]||_0x49874d[_0xfadc('0x20')][_0xfadc('0x34')]()==_0xfadc('0x35')){this[_0xfadc('0x32')][_0x49874d[_0xfadc('0x31')]][_0xfadc('0x33')]=![];if(this[_0xfadc('0x32')][_0x49874d[_0xfadc('0x31')]][_0xfadc('0x20')]!==_0x49874d[_0xfadc('0x20')][_0xfadc('0x34')]()){this['agents'][_0x49874d[_0xfadc('0x31')]][_0xfadc('0x36')]=_[_0xfadc('0x37')](moment()['format']('x'));}this[_0xfadc('0x32')][_0x49874d['device']]['state']=_0x49874d[_0xfadc('0x20')]['toLowerCase']();this['agents'][_0x49874d['device']]['updateStatusRealtime'](_0x49874d);}}else if(this[_0xfadc('0x38')][_0x49874d[_0xfadc('0x31')]]){if(this[_0xfadc('0x38')][_0x49874d['device']][_0xfadc('0x20')]!==_0x49874d[_0xfadc('0x20')]['toLowerCase']()){this[_0xfadc('0x38')][_0x49874d[_0xfadc('0x31')]][_0xfadc('0x36')]=_[_0xfadc('0x37')](moment()[_0xfadc('0x29')]('x'));}this[_0xfadc('0x38')][_0x49874d['device']][_0xfadc('0x20')]=_0x49874d[_0xfadc('0x20')]['toLowerCase']();logger[_0xfadc('0x21')](_0xfadc('0x39'),util[_0xfadc('0x15')](this[_0xfadc('0x38')][_0x49874d[_0xfadc('0x31')]],{'showHidden':![],'depth':null}));this[_0xfadc('0x1d')](util[_0xfadc('0x29')](_0xfadc('0x3a'),this[_0xfadc('0x38')][_0x49874d['device']][_0xfadc('0x2b')]),'telephone:save',this[_0xfadc('0x38')][_0x49874d[_0xfadc('0x31')]]);}else if(this[_0xfadc('0x7')][_0x49874d[_0xfadc('0x31')]]){if(this['trunks'][_0x49874d[_0xfadc('0x31')]][_0xfadc('0x20')]!==_0x49874d[_0xfadc('0x20')][_0xfadc('0x34')]()){this[_0xfadc('0x7')][_0x49874d[_0xfadc('0x31')]]['stateTime']=_[_0xfadc('0x37')](moment()[_0xfadc('0x29')]('x'));}this[_0xfadc('0x7')][_0x49874d[_0xfadc('0x31')]][_0xfadc('0x20')]=_0x49874d['state']['toLowerCase']();logger['debug'](_0xfadc('0x3b'),util['inspect'](this['trunks'][_0x49874d[_0xfadc('0x31')]],{'showHidden':![],'depth':null}));this[_0xfadc('0x1d')](util['format'](_0xfadc('0x2a'),this['trunks'][_0x49874d['device']][_0xfadc('0x2b')]),_0xfadc('0x2c'),this[_0xfadc('0x7')][_0x49874d[_0xfadc('0x31')]]);}else if(_['startsWith'](_0x49874d[_0xfadc('0x31')],_0xfadc('0x3c'))){var _0x7fd9fe=_0x49874d['device'];var _0xec6607=_0x7fd9fe[_0xfadc('0x3d')](_0x7fd9fe[_0xfadc('0x3e')]('/')+0x1,_0x7fd9fe[_0xfadc('0x3e')]('@'));var _0x2dd073=_[_0xfadc('0x22')](this[_0xfadc('0x32')],function(_0x55b2eb){return _0x55b2eb['mobile']==_0xec6607||_0x55b2eb['phone']==_0xec6607||_0x55b2eb[_0xfadc('0x3f')]==_0xec6607;});if(_0x2dd073){if(_0x2dd073[_0xfadc('0x20')]!==_0x49874d['state']['toLowerCase']()){_0x2dd073['stateTime']=_[_0xfadc('0x37')](moment()[_0xfadc('0x29')]('x'));}_0x2dd073[_0xfadc('0x20')]=_0x49874d['state'][_0xfadc('0x34')]();_0x2dd073[_0xfadc('0x33')]=!![];_0x2dd073[_0xfadc('0x40')](_0x49874d);}}}}catch(_0x426047){logger[_0xfadc('0x13')]('[userReport][devicestatechange]',util[_0xfadc('0x15')](_0x426047,{'showHidden':![],'depth':null}));}};UserReport[_0xfadc('0x1a')][_0xfadc('0xe')]=function(_0x53ebc3){try{if(this['isNotNull'](_0x53ebc3)&&this[_0xfadc('0x2f')](_0x53ebc3[_0xfadc('0xd')])){logger[_0xfadc('0x1e')](_0xfadc('0x41'),_0x53ebc3[_0xfadc('0x42')],_0x53ebc3[_0xfadc('0x43')],_0x53ebc3[_0xfadc('0xd')]);logger[_0xfadc('0x21')](_0xfadc('0x44'),util[_0xfadc('0x15')](_0x53ebc3,{'showHidden':![],'depth':null}));if(this[_0xfadc('0x32')][_0x53ebc3[_0xfadc('0x42')]]){if(!this[_0xfadc('0x32')][_0x53ebc3[_0xfadc('0x42')]][_0xfadc('0x33')]||_0x53ebc3['peerstatus'][_0xfadc('0x34')]()==_0xfadc('0x45')){this[_0xfadc('0x32')][_0x53ebc3[_0xfadc('0x42')]]['local']=![];this[_0xfadc('0x32')][_0x53ebc3[_0xfadc('0x42')]][_0xfadc('0x46')]=_0x53ebc3[_0xfadc('0xd')][_0xfadc('0x34')]();this['agents'][_0x53ebc3[_0xfadc('0x42')]][_0xfadc('0x43')]=_0x53ebc3[_0xfadc('0x43')];this[_0xfadc('0x32')][_0x53ebc3[_0xfadc('0x42')]][_0xfadc('0x40')](_0x53ebc3);}}else if(this[_0xfadc('0x38')][_0x53ebc3[_0xfadc('0x42')]]){this['telephones'][_0x53ebc3['peer']][_0xfadc('0x46')]=_0x53ebc3[_0xfadc('0xd')][_0xfadc('0x34')]();this[_0xfadc('0x38')][_0x53ebc3[_0xfadc('0x42')]][_0xfadc('0x43')]=_0x53ebc3[_0xfadc('0x43')];logger[_0xfadc('0x21')](_0xfadc('0x47'),util['inspect'](this['telephones'][_0x53ebc3[_0xfadc('0x42')]],{'showHidden':![],'depth':null}));this[_0xfadc('0x1d')](util[_0xfadc('0x29')](_0xfadc('0x3a'),this['telephones'][_0x53ebc3[_0xfadc('0x42')]][_0xfadc('0x2b')]),'telephone:save',this[_0xfadc('0x38')][_0x53ebc3[_0xfadc('0x42')]]);}else if(this[_0xfadc('0x7')][_0x53ebc3[_0xfadc('0x42')]]){this[_0xfadc('0x7')][_0x53ebc3[_0xfadc('0x42')]]['status']=_0x53ebc3['peerstatus']['toLowerCase']();this[_0xfadc('0x7')][_0x53ebc3[_0xfadc('0x42')]]['address']=_0x53ebc3[_0xfadc('0x43')];logger[_0xfadc('0x21')](_0xfadc('0x48'),util[_0xfadc('0x15')](this['trunks'][_0x53ebc3['peer']],{'showHidden':![],'depth':null}));this[_0xfadc('0x1d')](util[_0xfadc('0x29')](_0xfadc('0x2a'),this[_0xfadc('0x7')][_0x53ebc3[_0xfadc('0x42')]][_0xfadc('0x2b')]),_0xfadc('0x2c'),this[_0xfadc('0x7')][_0x53ebc3[_0xfadc('0x42')]]);}}}catch(_0x45f9fc){logger[_0xfadc('0x13')](_0xfadc('0x44'),util['inspect'](_0x45f9fc,{'showHidden':![],'depth':null}));}};module[_0xfadc('0x49')]=UserReport; \ No newline at end of file +var _0x1175=['registered','status','[userReport][peerstatus]\x20sending\x20telephone:save\x20event:','[userReport][peerstatus]','exports','lodash','moment','util','bluebird','../../../config/environment','../ami','redis','localhost','trunks','agents','telephones','registryentry','syncRegistry','bind','devicestatechange','syncDeviceState','syncPeerStatus','resolve','then','actionSipShowRegistry','catch','[userReport][sipshowregistry]','actionDeviceStateList','[userReport][devicestatelist]','error','[userReport][sippeerstatus]','inspect','prototype','syncRealtimeShow','isUndefined','emit','isNotNull','info','[userReport][registry]\x20registry:%s\x20state:%s','state','debug','[userReport][registry]','find','username','omit','event','actionid','[userReport][registry]\x20sending\x20trunk:save\x20event:','trunk:%s','name','trunk:save','[userReport][devicestatechange]\x20device:%s\x20state:%s','device','[userReport][devicestatechange]','local','toLowerCase','toNumber','format','updateStatusRealtime','stateTime','[userReport][devicestatechange]\x20sending\x20telephone:save\x20event:','telephone:%s','telephone:save','startsWith','Local','substring','indexOf','mobile','phone','accountcode','peerstatus','[userReport][peerstatus]\x20peer:%s\x20address:%s\x20status:%s','peer','address'];(function(_0x590790,_0x3f317d){var _0x358420=function(_0x3aba7a){while(--_0x3aba7a){_0x590790['push'](_0x590790['shift']());}};_0x358420(++_0x3f317d);}(_0x1175,0x1c1));var _0x5117=function(_0x386f8b,_0x153bc6){_0x386f8b=_0x386f8b-0x0;var _0x1c3246=_0x1175[_0x386f8b];return _0x1c3246;};'use strict';var _=require(_0x5117('0x0'));var moment=require(_0x5117('0x1'));var util=require(_0x5117('0x2'));var Redis=require('ioredis');var BPromise=require(_0x5117('0x3'));var config=require(_0x5117('0x4'));var logger=require('../../../config/logger')('ami');var ami=require(_0x5117('0x5'));config[_0x5117('0x6')]=_['defaults'](config[_0x5117('0x6')],{'host':_0x5117('0x7'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x5117('0x6')]));function UserReport(_0x368fba){this[_0x5117('0x8')]=_0x368fba[_0x5117('0x8')];this[_0x5117('0x9')]=_0x368fba[_0x5117('0x9')];this[_0x5117('0xa')]=_0x368fba[_0x5117('0xa')];ami['on'](_0x5117('0xb'),this[_0x5117('0xc')][_0x5117('0xd')](this));ami['on']('registry',this[_0x5117('0xc')][_0x5117('0xd')](this));ami['on'](_0x5117('0xe'),this[_0x5117('0xf')]['bind'](this));ami['on']('peerstatus',this[_0x5117('0x10')][_0x5117('0xd')](this));return this['syncRealtimeShow']();}function showSipRegistrations(){Promise[_0x5117('0x11')]()[_0x5117('0x12')](ami[_0x5117('0x13')]())[_0x5117('0x14')](function(_0x37c38d){logger['error'](_0x5117('0x15'),util['inspect'](_0x37c38d,{'showHidden':![],'depth':null}));});}function listDeviceStates(){Promise['resolve']()['then'](ami[_0x5117('0x16')]())[_0x5117('0x14')](function(_0x103bf8){logger['error'](_0x5117('0x17'),util['inspect'](_0x103bf8,{'showHidden':![],'depth':null}));});}function showPeersStatus(){Promise[_0x5117('0x11')]()['then'](ami['actionSipPeerStatus']())[_0x5117('0x14')](function(_0x18a305){logger[_0x5117('0x18')](_0x5117('0x19'),util[_0x5117('0x1a')](_0x18a305,{'showHidden':![],'depth':null}));});}UserReport[_0x5117('0x1b')][_0x5117('0x1c')]=function(){setInterval(function(){BPromise[_0x5117('0x11')]()[_0x5117('0x12')](showSipRegistrations())[_0x5117('0x12')](listDeviceStates())[_0x5117('0x12')](showPeersStatus());},0x32c8);};UserReport[_0x5117('0x1b')]['isNotNull']=function(_0x5df546){return _0x5df546!==null&&!_[_0x5117('0x1d')](_0x5df546);};UserReport[_0x5117('0x1b')][_0x5117('0x1e')]=function(_0x42ca93,_0x5c513f,_0x1b122b){io['to'](_0x42ca93)[_0x5117('0x1e')](_0x5c513f,_0x1b122b);};UserReport['prototype'][_0x5117('0xc')]=function(_0x45b816){try{if(this[_0x5117('0x1f')](_0x45b816)){logger[_0x5117('0x20')](_0x5117('0x21'),_0x45b816['username'],_0x45b816[_0x5117('0x22')]);logger[_0x5117('0x23')](_0x5117('0x24'),util['inspect'](_0x45b816,{'showHidden':![],'depth':null}));var _0x4bf559=_[_0x5117('0x25')](this[_0x5117('0x8')],{'defaultuser':_0x45b816[_0x5117('0x26')]});if(_0x4bf559){_0x45b816['stateRegistry']=_0x45b816[_0x5117('0x22')];_['merge'](_0x4bf559,_[_0x5117('0x27')](_0x45b816,[_0x5117('0x28'),_0x5117('0x29'),_0x5117('0x26'),_0x5117('0x22')]));logger[_0x5117('0x23')](_0x5117('0x2a'),util[_0x5117('0x1a')](_0x4bf559,{'showHidden':![],'depth':null}));this[_0x5117('0x1e')](util['format'](_0x5117('0x2b'),_0x4bf559[_0x5117('0x2c')]),_0x5117('0x2d'),_0x4bf559);}}}catch(_0x50943a){logger[_0x5117('0x18')](_0x5117('0x24'),util[_0x5117('0x1a')](_0x50943a,{'showHidden':![],'depth':null}));}};UserReport[_0x5117('0x1b')][_0x5117('0xf')]=function(_0x3ec7e0){try{if(this[_0x5117('0x1f')](_0x3ec7e0)){logger[_0x5117('0x20')](_0x5117('0x2e'),_0x3ec7e0[_0x5117('0x2f')],_0x3ec7e0[_0x5117('0x22')]);logger[_0x5117('0x23')](_0x5117('0x30'),util[_0x5117('0x1a')](_0x3ec7e0,{'showHidden':![],'depth':null}));if(this[_0x5117('0x9')][_0x3ec7e0[_0x5117('0x2f')]]){if(!this[_0x5117('0x9')][_0x3ec7e0[_0x5117('0x2f')]][_0x5117('0x31')]||_0x3ec7e0[_0x5117('0x22')][_0x5117('0x32')]()=='inuse'){this[_0x5117('0x9')][_0x3ec7e0[_0x5117('0x2f')]][_0x5117('0x31')]=![];if(this['agents'][_0x3ec7e0[_0x5117('0x2f')]][_0x5117('0x22')]!==_0x3ec7e0[_0x5117('0x22')]['toLowerCase']()){this[_0x5117('0x9')][_0x3ec7e0['device']]['stateTime']=_[_0x5117('0x33')](moment()[_0x5117('0x34')]('x'));}this['agents'][_0x3ec7e0[_0x5117('0x2f')]]['state']=_0x3ec7e0[_0x5117('0x22')][_0x5117('0x32')]();this[_0x5117('0x9')][_0x3ec7e0[_0x5117('0x2f')]][_0x5117('0x35')](_0x3ec7e0);}}else if(this[_0x5117('0xa')][_0x3ec7e0['device']]){if(this[_0x5117('0xa')][_0x3ec7e0['device']][_0x5117('0x22')]!==_0x3ec7e0['state'][_0x5117('0x32')]()){this[_0x5117('0xa')][_0x3ec7e0[_0x5117('0x2f')]][_0x5117('0x36')]=_[_0x5117('0x33')](moment()[_0x5117('0x34')]('x'));}this[_0x5117('0xa')][_0x3ec7e0[_0x5117('0x2f')]][_0x5117('0x22')]=_0x3ec7e0['state'][_0x5117('0x32')]();logger[_0x5117('0x23')](_0x5117('0x37'),util['inspect'](this[_0x5117('0xa')][_0x3ec7e0[_0x5117('0x2f')]],{'showHidden':![],'depth':null}));this[_0x5117('0x1e')](util[_0x5117('0x34')](_0x5117('0x38'),this[_0x5117('0xa')][_0x3ec7e0['device']][_0x5117('0x2c')]),_0x5117('0x39'),this[_0x5117('0xa')][_0x3ec7e0['device']]);}else if(this['trunks'][_0x3ec7e0['device']]){if(this[_0x5117('0x8')][_0x3ec7e0[_0x5117('0x2f')]][_0x5117('0x22')]!==_0x3ec7e0[_0x5117('0x22')][_0x5117('0x32')]()){this['trunks'][_0x3ec7e0['device']][_0x5117('0x36')]=_['toNumber'](moment()['format']('x'));}this[_0x5117('0x8')][_0x3ec7e0[_0x5117('0x2f')]][_0x5117('0x22')]=_0x3ec7e0['state'][_0x5117('0x32')]();logger['debug']('[userReport][devicestatechange]\x20sending\x20trunk:save\x20event:',util[_0x5117('0x1a')](this[_0x5117('0x8')][_0x3ec7e0[_0x5117('0x2f')]],{'showHidden':![],'depth':null}));this[_0x5117('0x1e')](util[_0x5117('0x34')](_0x5117('0x2b'),this[_0x5117('0x8')][_0x3ec7e0[_0x5117('0x2f')]][_0x5117('0x2c')]),_0x5117('0x2d'),this[_0x5117('0x8')][_0x3ec7e0[_0x5117('0x2f')]]);}else if(_[_0x5117('0x3a')](_0x3ec7e0[_0x5117('0x2f')],_0x5117('0x3b'))){var _0x50de59=_0x3ec7e0[_0x5117('0x2f')];var _0x1ecb89=_0x50de59[_0x5117('0x3c')](_0x50de59[_0x5117('0x3d')]('/')+0x1,_0x50de59[_0x5117('0x3d')]('@'));var _0x6054c6=_[_0x5117('0x25')](this[_0x5117('0x9')],function(_0x4ec12d){return _0x4ec12d[_0x5117('0x3e')]==_0x1ecb89||_0x4ec12d[_0x5117('0x3f')]==_0x1ecb89||_0x4ec12d[_0x5117('0x40')]==_0x1ecb89;});if(_0x6054c6){if(_0x6054c6[_0x5117('0x22')]!==_0x3ec7e0[_0x5117('0x22')][_0x5117('0x32')]()){_0x6054c6['stateTime']=_[_0x5117('0x33')](moment()[_0x5117('0x34')]('x'));}_0x6054c6[_0x5117('0x22')]=_0x3ec7e0['state']['toLowerCase']();_0x6054c6[_0x5117('0x31')]=!![];_0x6054c6[_0x5117('0x35')](_0x3ec7e0);}}}}catch(_0xbf63dc){logger[_0x5117('0x18')](_0x5117('0x30'),util[_0x5117('0x1a')](_0xbf63dc,{'showHidden':![],'depth':null}));}};UserReport['prototype']['syncPeerStatus']=function(_0x451a02){try{if(this[_0x5117('0x1f')](_0x451a02)&&this[_0x5117('0x1f')](_0x451a02[_0x5117('0x41')])){logger['info'](_0x5117('0x42'),_0x451a02[_0x5117('0x43')],_0x451a02[_0x5117('0x44')],_0x451a02['peerstatus']);logger[_0x5117('0x23')]('[userReport][peerstatus]',util['inspect'](_0x451a02,{'showHidden':![],'depth':null}));if(this[_0x5117('0x9')][_0x451a02[_0x5117('0x43')]]){if(!this['agents'][_0x451a02[_0x5117('0x43')]][_0x5117('0x31')]||_0x451a02[_0x5117('0x41')]['toLowerCase']()==_0x5117('0x45')){this[_0x5117('0x9')][_0x451a02['peer']]['local']=![];this['agents'][_0x451a02['peer']]['status']=_0x451a02['peerstatus'][_0x5117('0x32')]();this['agents'][_0x451a02[_0x5117('0x43')]][_0x5117('0x44')]=_0x451a02[_0x5117('0x44')];this[_0x5117('0x9')][_0x451a02[_0x5117('0x43')]]['updateStatusRealtime'](_0x451a02);}}else if(this[_0x5117('0xa')][_0x451a02[_0x5117('0x43')]]){this['telephones'][_0x451a02[_0x5117('0x43')]][_0x5117('0x46')]=_0x451a02[_0x5117('0x41')][_0x5117('0x32')]();this[_0x5117('0xa')][_0x451a02[_0x5117('0x43')]][_0x5117('0x44')]=_0x451a02[_0x5117('0x44')];logger[_0x5117('0x23')](_0x5117('0x47'),util['inspect'](this[_0x5117('0xa')][_0x451a02[_0x5117('0x43')]],{'showHidden':![],'depth':null}));this[_0x5117('0x1e')](util['format']('telephone:%s',this[_0x5117('0xa')][_0x451a02[_0x5117('0x43')]]['name']),'telephone:save',this[_0x5117('0xa')][_0x451a02[_0x5117('0x43')]]);}else if(this['trunks'][_0x451a02['peer']]){this[_0x5117('0x8')][_0x451a02[_0x5117('0x43')]][_0x5117('0x46')]=_0x451a02[_0x5117('0x41')][_0x5117('0x32')]();this[_0x5117('0x8')][_0x451a02[_0x5117('0x43')]][_0x5117('0x44')]=_0x451a02[_0x5117('0x44')];logger[_0x5117('0x23')]('[userReport][peerstatus]\x20sending\x20trunk:save\x20event:',util[_0x5117('0x1a')](this[_0x5117('0x8')][_0x451a02[_0x5117('0x43')]],{'showHidden':![],'depth':null}));this[_0x5117('0x1e')](util[_0x5117('0x34')](_0x5117('0x2b'),this[_0x5117('0x8')][_0x451a02[_0x5117('0x43')]]['name']),_0x5117('0x2d'),this['trunks'][_0x451a02[_0x5117('0x43')]]);}}}catch(_0x8a0ceb){logger[_0x5117('0x18')](_0x5117('0x48'),util['inspect'](_0x8a0ceb,{'showHidden':![],'depth':null}));}};module[_0x5117('0x49')]=UserReport; \ No newline at end of file diff --git a/server/services/ami/report/voiceAgentReport.js b/server/services/ami/report/voiceAgentReport.js index b19600b..f7096b7 100644 --- a/server/services/ami/report/voiceAgentReport.js +++ b/server/services/ami/report/voiceAgentReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa7aa=['[%s][voiceAgentReport][blindtransfer]','channel','substring','lastIndexOf','[%s][voiceAgentReport][musiconholdstart]\x20interface:%s','onhold','[%s][voiceAgentReport][musiconholdstart]','[%s][voiceAgentReport][musiconholdstop]\x20event:','[%s][voiceAgentReport][musiconholdstop]\x20interface:%s','[%s][voiceAgentReport][musiconholdstop]','exports','moment','util','ioredis','../../../config/environment','../../../config/logger','../ami','redis','defaults','localhost','socket.io-emitter','voiceQueues','agents','variables','agentcalled','syncAgentCalled','bind','agentconnect','syncAgentConnect','syncAgentRingNoAnswer','queuecallerabandon','syncQueueCallerAbandon','agentcomplete','syncAgentComplete','varset','syncVarSet','hangup','syncHangup','musiconholdstart','syncMusicOnHoldStart','blindtransfer','prototype','emit','isNotNull','isUndefined','info','[%s][voiceAgentReport][agentcalled]\x20agent:%s\x20destuniqueid:%s\x20lastevent:called','uniqueid','destuniqueid','debug','inspect','channels','format','called','queue','mandatoryDisposition','inbound','merge','privilege','[%s][voiceAgentReport][agentcalled]\x20sending\x20agentcalled\x20event:','custom:agentcalled','user:%s','membername','user:called','error','[%s][voiceAgentReport][agentcalled]','[%s][voiceAgentReport][agentconnect]\x20event:','hasOwnProperty','connectedlinename','connectedlinenum','destchannelstate','destchannelstatedesc','holdtime','lastevent','connect','interface','destconnectedlinenum','[%s][voiceAgentReport][agentconnect]\x20sending\x20agentconnect\x20event:','custom:agentconnect','[%s][voiceAgentReport][agentcalled]\x20sending\x20user:agentconnect\x20event:','[%s][voiceAgentReport][agentconnect]\x20agent:%s\x20destuniqueid:%s\x20lastevent:answered_elsewhere','agentringnoanswerAt','answeredelsewheredestinationuniqueid','answeredelsewheremembername','answered_elsewhere','reason','[%s][voiceAgentReport][agentconnect]\x20sending\x20agentansweredelsewhere\x20event:','custom:agentansweredelsewhere','[%s][voiceAgentReport][agentringnoanswer]\x20event:','[%s][voiceAgentReport][agentringnoanswer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:rejected','agentringnoanswer','YYYY-MM-DD\x20HH:mm:ss','rejected','custom:agentringnoanswer','[%s][voiceAgentReport][queuecallerabandon]\x20agent:%s\x20destuniqueid:%s\x20lastevent:abandoned','abandoned','[%s][voiceAgentReport][queuecallerabandon]\x20sending\x20agentqueuecallerabandon\x20event:','custom:agentqueuecallerabandon','[%s][voiceAgentReport][agentcomplete]\x20event:','agentconnectAt','[%s][voiceAgentReport][agentcomplete]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete','agentcompleteAt','complete','transfer','talktime','acw','acwtime','acwTimeout','omit','[%s][voiceAgentReport][agentcomplete]\x20sending\x20agentcomplete\x20event:','user:agentcomplete','[%s][voiceAgentReport][agentcomplete]','addVariable','keys','variable','[%s][voiceAgentReport][varset]\x20destuniqueid:%s\x20variable:%s\x20value:%s','[%s][voiceAgentReport][varset]','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqoslossbridged','rtpaudioqosrtt','rtpaudioqosrttbridged','sipcallid','sipuri','bridgepeer','bridgepvtcallid','membercalls','memberdynamic','memberinterface','memberlastcall','[%s][voiceAgentReport][hangup]\x20event:','[%s][voiceAgentReport][hangup]\x20destuniqueid:%s','[%s][voiceAgentReport][hangup]\x20sending\x20voiceAgentReport\x20event:','values','[%s][voiceAgentReport][hangup]','syncAttendedTransfer','transfereeuniqueid','origtransfereruniqueid','[%s][voiceAgentReport][attendedtransfer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete','diff','seconds','secondtransfereruniqueid','[%s][voiceAgentReport][attendedtransfer]','syncBlindTransfer','[%s][voiceAgentReport][blindtransfer]\x20event:','[%s][voiceAgentReport][blindtransfer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete'];(function(_0x18be11,_0x4bae58){var _0x5693d5=function(_0x7b2413){while(--_0x7b2413){_0x18be11['push'](_0x18be11['shift']());}};_0x5693d5(++_0x4bae58);}(_0xa7aa,0x133));var _0xaa7a=function(_0x5ae275,_0x10117a){_0x5ae275=_0x5ae275-0x0;var _0x387c00=_0xa7aa[_0x5ae275];return _0x387c00;};'use strict';var _=require('lodash');var moment=require(_0xaa7a('0x0'));var util=require(_0xaa7a('0x1'));var Redis=require(_0xaa7a('0x2'));var config=require(_0xaa7a('0x3'));var logger=require(_0xaa7a('0x4'))('ami');var ami=require(_0xaa7a('0x5'));config[_0xaa7a('0x6')]=_[_0xaa7a('0x7')](config[_0xaa7a('0x6')],{'host':_0xaa7a('0x8'),'port':0x18eb});var io=require(_0xaa7a('0x9'))(new Redis(config[_0xaa7a('0x6')]));function VoiceAgentReport(_0x437fb7){this['channels']={};this[_0xaa7a('0xa')]=_0x437fb7[_0xaa7a('0xa')];this[_0xaa7a('0xb')]=_0x437fb7[_0xaa7a('0xb')];this[_0xaa7a('0xc')]={};ami['on'](_0xaa7a('0xd'),this[_0xaa7a('0xe')][_0xaa7a('0xf')](this));ami['on'](_0xaa7a('0x10'),this[_0xaa7a('0x11')]['bind'](this));ami['on']('agentringnoanswer',this[_0xaa7a('0x12')][_0xaa7a('0xf')](this));ami['on'](_0xaa7a('0x13'),this[_0xaa7a('0x14')][_0xaa7a('0xf')](this));ami['on'](_0xaa7a('0x15'),this[_0xaa7a('0x16')][_0xaa7a('0xf')](this));ami['on'](_0xaa7a('0x17'),this[_0xaa7a('0x18')][_0xaa7a('0xf')](this));ami['on'](_0xaa7a('0x19'),this[_0xaa7a('0x1a')][_0xaa7a('0xf')](this));ami['on'](_0xaa7a('0x1b'),this[_0xaa7a('0x1c')][_0xaa7a('0xf')](this));ami['on']('musiconholdstop',this['syncMusicOnHoldStop']['bind'](this));ami['on']('attendedtransfer',this['syncAttendedTransfer']['bind'](this));ami['on'](_0xaa7a('0x1d'),this['syncBlindTransfer'][_0xaa7a('0xf')](this));}VoiceAgentReport[_0xaa7a('0x1e')]['emit']=function(_0x5a27ff,_0x3a5834,_0x5f1c80){io['to'](_0x5a27ff)[_0xaa7a('0x1f')](_0x3a5834,_0x5f1c80);};VoiceAgentReport[_0xaa7a('0x1e')][_0xaa7a('0x20')]=function(_0x1303e1){return _0x1303e1!==null&&!_[_0xaa7a('0x21')](_0x1303e1);};VoiceAgentReport['prototype'][_0xaa7a('0xe')]=function(_0x1f2b80){try{if(this[_0xaa7a('0x20')](_0x1f2b80)){logger[_0xaa7a('0x22')](_0xaa7a('0x23'),_0x1f2b80[_0xaa7a('0x24')],_0x1f2b80['membername'],_0x1f2b80[_0xaa7a('0x25')]);logger[_0xaa7a('0x26')]('[%s][voiceAgentReport][agentcalled]\x20event:',_0x1f2b80[_0xaa7a('0x24')],util[_0xaa7a('0x27')](_0x1f2b80,{'showHidden':![],'depth':null}));if(_['isUndefined'](this[_0xaa7a('0x28')][_0x1f2b80[_0xaa7a('0x24')]])){this[_0xaa7a('0x28')][_0x1f2b80['uniqueid']]={};}if(_[_0xaa7a('0x21')](this[_0xaa7a('0x28')][_0x1f2b80[_0xaa7a('0x24')]][_0x1f2b80[_0xaa7a('0x25')]])){this['channels'][_0x1f2b80[_0xaa7a('0x24')]][_0x1f2b80[_0xaa7a('0x25')]]={'agentcalledAt':moment()[_0xaa7a('0x29')]('YYYY-MM-DD\x20HH:mm:ss'),'lastevent':_0xaa7a('0x2a'),'mandatoryDisposition':this[_0xaa7a('0xa')][_0x1f2b80[_0xaa7a('0x2b')]]?this[_0xaa7a('0xa')][_0x1f2b80[_0xaa7a('0x2b')]][_0xaa7a('0x2c')]||![]:![],'type':this[_0xaa7a('0xa')][_0x1f2b80['queue']]?this[_0xaa7a('0xa')][_0x1f2b80[_0xaa7a('0x2b')]]['type']||_0xaa7a('0x2d'):_0xaa7a('0x2d'),'variables':this[_0xaa7a('0xc')][_0x1f2b80[_0xaa7a('0x24')]]};}_[_0xaa7a('0x2e')](this[_0xaa7a('0x28')][_0x1f2b80[_0xaa7a('0x24')]][_0x1f2b80[_0xaa7a('0x25')]],_['omit'](_0x1f2b80,['event',_0xaa7a('0x2f')]));logger[_0xaa7a('0x26')](_0xaa7a('0x30'),_0x1f2b80[_0xaa7a('0x24')],util['inspect'](this[_0xaa7a('0x28')][_0x1f2b80['uniqueid']][_0x1f2b80[_0xaa7a('0x25')]],{'showHidden':![],'depth':null}));ami[_0xaa7a('0x1f')](_0xaa7a('0x31'),this['channels'][_0x1f2b80['uniqueid']][_0x1f2b80[_0xaa7a('0x25')]]);logger[_0xaa7a('0x26')]('[%s][voiceAgentReport][agentcalled]\x20sending\x20user:called\x20event:',_0x1f2b80[_0xaa7a('0x24')],util[_0xaa7a('0x27')](this[_0xaa7a('0x28')][_0x1f2b80['uniqueid']][_0x1f2b80[_0xaa7a('0x25')]],{'showHidden':![],'depth':null}));this[_0xaa7a('0x1f')](util[_0xaa7a('0x29')](_0xaa7a('0x32'),_0x1f2b80[_0xaa7a('0x33')]),_0xaa7a('0x34'),this['channels'][_0x1f2b80[_0xaa7a('0x24')]][_0x1f2b80['destuniqueid']]);}}catch(_0x2dd124){logger[_0xaa7a('0x35')](_0xaa7a('0x36'),_0x1f2b80[_0xaa7a('0x24')],util['inspect'](_0x2dd124,{'showHidden':![],'depth':null}));}};VoiceAgentReport['prototype']['syncAgentConnect']=function(_0x3b29a7){try{if(this[_0xaa7a('0x20')](_0x3b29a7)){if(this[_0xaa7a('0x28')][_0x3b29a7[_0xaa7a('0x24')]]){logger[_0xaa7a('0x26')](_0xaa7a('0x37'),_0x3b29a7[_0xaa7a('0x24')],util['inspect'](_0x3b29a7,{'showHidden':![],'depth':null}));for(var _0x2459f8 in this['channels'][_0x3b29a7[_0xaa7a('0x24')]]){if(this[_0xaa7a('0x28')][_0x3b29a7[_0xaa7a('0x24')]][_0xaa7a('0x38')](_0x2459f8)){if(_0x3b29a7[_0xaa7a('0x25')]===_0x2459f8){logger[_0xaa7a('0x22')]('[%s][voiceAgentReport][agentconnect]\x20agent:%s\x20destuniqueid:%s\x20lastevent:connect',_0x3b29a7[_0xaa7a('0x24')],_0x3b29a7[_0xaa7a('0x33')],_0x3b29a7['destuniqueid']);this[_0xaa7a('0x28')][_0x3b29a7[_0xaa7a('0x24')]][_0x2459f8]['agentconnectAt']=moment()[_0xaa7a('0x29')]('YYYY-MM-DD\x20HH:mm:ss');this[_0xaa7a('0x28')][_0x3b29a7[_0xaa7a('0x24')]][_0x2459f8][_0xaa7a('0x39')]=_0x3b29a7['connectedlinename'];this['channels'][_0x3b29a7[_0xaa7a('0x24')]][_0x2459f8]['connectedlinenum']=_0x3b29a7[_0xaa7a('0x3a')];this[_0xaa7a('0x28')][_0x3b29a7[_0xaa7a('0x24')]][_0x2459f8][_0xaa7a('0x3b')]=_0x3b29a7[_0xaa7a('0x3b')];this['channels'][_0x3b29a7[_0xaa7a('0x24')]][_0x2459f8][_0xaa7a('0x3c')]=_0x3b29a7['destchannelstatedesc'];this[_0xaa7a('0x28')][_0x3b29a7['uniqueid']][_0x2459f8][_0xaa7a('0x3d')]=_0x3b29a7[_0xaa7a('0x3d')];this[_0xaa7a('0x28')][_0x3b29a7[_0xaa7a('0x24')]][_0x2459f8][_0xaa7a('0x3e')]=_0xaa7a('0x3f');_['merge'](this[_0xaa7a('0xb')][_0x3b29a7[_0xaa7a('0x40')]],_['pick'](_0x3b29a7,[_0xaa7a('0x2b'),_0xaa7a('0x41')]));logger[_0xaa7a('0x26')](_0xaa7a('0x42'),_0x3b29a7['uniqueid'],util[_0xaa7a('0x27')](this[_0xaa7a('0x28')][_0x3b29a7[_0xaa7a('0x24')]][_0x3b29a7['destuniqueid']],{'showHidden':![],'depth':null}));ami[_0xaa7a('0x1f')](_0xaa7a('0x43'),this[_0xaa7a('0x28')][_0x3b29a7[_0xaa7a('0x24')]][_0x3b29a7['destuniqueid']]);logger[_0xaa7a('0x26')](_0xaa7a('0x44'),_0x3b29a7[_0xaa7a('0x24')],util['inspect'](this[_0xaa7a('0x28')][_0x3b29a7[_0xaa7a('0x24')]][_0x3b29a7[_0xaa7a('0x25')]],{'showHidden':![],'depth':null}));this[_0xaa7a('0x1f')](util[_0xaa7a('0x29')](_0xaa7a('0x32'),_0x3b29a7[_0xaa7a('0x33')]),'user:agentconnect',this[_0xaa7a('0x28')][_0x3b29a7['uniqueid']][_0x3b29a7[_0xaa7a('0x25')]]);}else if(!this[_0xaa7a('0x28')][_0x3b29a7[_0xaa7a('0x24')]][_0x2459f8]['agentringnoanswer']&&!this[_0xaa7a('0x28')][_0x3b29a7['uniqueid']][_0x2459f8][_0xaa7a('0x15')]){logger[_0xaa7a('0x22')](_0xaa7a('0x45'),_0x3b29a7[_0xaa7a('0x24')],this[_0xaa7a('0x28')][_0x3b29a7['uniqueid']][_0x2459f8][_0xaa7a('0x33')],_0x2459f8);this[_0xaa7a('0x28')][_0x3b29a7[_0xaa7a('0x24')]][_0x2459f8]['agentringnoanswer']=!![];this['channels'][_0x3b29a7[_0xaa7a('0x24')]][_0x2459f8][_0xaa7a('0x46')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');this[_0xaa7a('0x28')][_0x3b29a7[_0xaa7a('0x24')]][_0x2459f8][_0xaa7a('0x47')]=_0x3b29a7[_0xaa7a('0x25')];this['channels'][_0x3b29a7[_0xaa7a('0x24')]][_0x2459f8][_0xaa7a('0x48')]=_0x3b29a7['membername'];this[_0xaa7a('0x28')][_0x3b29a7[_0xaa7a('0x24')]][_0x2459f8]['lastevent']=_0xaa7a('0x49');this['channels'][_0x3b29a7[_0xaa7a('0x24')]][_0x2459f8][_0xaa7a('0x4a')]=_0xaa7a('0x49');logger[_0xaa7a('0x26')](_0xaa7a('0x4b'),_0x3b29a7[_0xaa7a('0x24')],util[_0xaa7a('0x27')](this[_0xaa7a('0x28')][_0x3b29a7[_0xaa7a('0x24')]][_0x2459f8],{'showHidden':![],'depth':null}));ami[_0xaa7a('0x1f')](_0xaa7a('0x4c'),this[_0xaa7a('0x28')][_0x3b29a7[_0xaa7a('0x24')]][_0x2459f8]);}}}}}}catch(_0x43ccc3){logger['error']('[%s][voiceAgentReport][agentconnect]',_0x3b29a7[_0xaa7a('0x24')],util[_0xaa7a('0x27')](_0x43ccc3,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xaa7a('0x1e')][_0xaa7a('0x12')]=function(_0x2c1e82){try{if(this[_0xaa7a('0x20')](_0x2c1e82)){logger[_0xaa7a('0x26')](_0xaa7a('0x4d'),_0x2c1e82[_0xaa7a('0x24')],util[_0xaa7a('0x27')](_0x2c1e82,{'showHidden':![],'depth':null}));if(this[_0xaa7a('0x28')][_0x2c1e82[_0xaa7a('0x24')]]&&this[_0xaa7a('0x28')][_0x2c1e82[_0xaa7a('0x24')]][_0x2c1e82[_0xaa7a('0x25')]]){logger['info'](_0xaa7a('0x4e'),_0x2c1e82[_0xaa7a('0x24')],_0x2c1e82[_0xaa7a('0x33')],_0x2c1e82[_0xaa7a('0x25')]);this[_0xaa7a('0x28')][_0x2c1e82[_0xaa7a('0x24')]][_0x2c1e82['destuniqueid']][_0xaa7a('0x4f')]=!![];this[_0xaa7a('0x28')][_0x2c1e82[_0xaa7a('0x24')]][_0x2c1e82[_0xaa7a('0x25')]][_0xaa7a('0x46')]=moment()[_0xaa7a('0x29')](_0xaa7a('0x50'));this[_0xaa7a('0x28')][_0x2c1e82[_0xaa7a('0x24')]][_0x2c1e82['destuniqueid']][_0xaa7a('0x3e')]=_0xaa7a('0x51');this[_0xaa7a('0x28')][_0x2c1e82['uniqueid']][_0x2c1e82['destuniqueid']][_0xaa7a('0x4a')]=_0xaa7a('0x51');logger[_0xaa7a('0x26')]('[%s][voiceAgentReport][agentringnoanswer]\x20sending\x20agentringnoanswer\x20event:',_0x2c1e82[_0xaa7a('0x24')],util[_0xaa7a('0x27')](this[_0xaa7a('0x28')][_0x2c1e82['uniqueid']][_0x2c1e82[_0xaa7a('0x25')]],{'showHidden':![],'depth':null}));ami['emit'](_0xaa7a('0x52'),this[_0xaa7a('0x28')][_0x2c1e82[_0xaa7a('0x24')]][_0x2c1e82['destuniqueid']]);}}}catch(_0x57870d){logger['error']('[%s][voiceAgentReport][agentringnoanswer]',_0x2c1e82['uniqueid'],util[_0xaa7a('0x27')](_0x57870d,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xaa7a('0x1e')][_0xaa7a('0x14')]=function(_0x1ad112){try{if(this[_0xaa7a('0x20')](_0x1ad112)){logger[_0xaa7a('0x26')]('[%s][voiceAgentReport][queuecallerabandon]\x20event:',_0x1ad112[_0xaa7a('0x24')],util['inspect'](_0x1ad112,{'showHidden':![],'depth':null}));if(this['channels'][_0x1ad112[_0xaa7a('0x24')]]){for(var _0x4bd0cf in this['channels'][_0x1ad112[_0xaa7a('0x24')]]){if(this['channels'][_0x1ad112['uniqueid']]['hasOwnProperty'](_0x4bd0cf)&&!this[_0xaa7a('0x28')][_0x1ad112['uniqueid']][_0x4bd0cf][_0xaa7a('0x4f')]&&!this['channels'][_0x1ad112[_0xaa7a('0x24')]][_0x4bd0cf][_0xaa7a('0x15')]){logger[_0xaa7a('0x22')](_0xaa7a('0x53'),_0x1ad112['uniqueid'],this[_0xaa7a('0x28')][_0x1ad112[_0xaa7a('0x24')]][_0x4bd0cf][_0xaa7a('0x33')],_0x4bd0cf);this['channels'][_0x1ad112[_0xaa7a('0x24')]][_0x4bd0cf][_0xaa7a('0x4f')]=!![];this[_0xaa7a('0x28')][_0x1ad112[_0xaa7a('0x24')]][_0x4bd0cf]['agentringnoanswerAt']=moment()[_0xaa7a('0x29')](_0xaa7a('0x50'));this[_0xaa7a('0x28')][_0x1ad112[_0xaa7a('0x24')]][_0x4bd0cf]['lastevent']=_0xaa7a('0x54');this['channels'][_0x1ad112[_0xaa7a('0x24')]][_0x4bd0cf]['reason']=_0xaa7a('0x54');logger['debug'](_0xaa7a('0x55'),_0x1ad112[_0xaa7a('0x24')],util[_0xaa7a('0x27')](this[_0xaa7a('0x28')][_0x1ad112[_0xaa7a('0x24')]][_0x4bd0cf],{'showHidden':![],'depth':null}));ami[_0xaa7a('0x1f')](_0xaa7a('0x56'),this[_0xaa7a('0x28')][_0x1ad112[_0xaa7a('0x24')]][_0x4bd0cf]);}}}}}catch(_0x1b02cb){logger[_0xaa7a('0x35')]('[%s][voiceAgentReport][queuecallerabandon]',_0x1ad112[_0xaa7a('0x24')],util[_0xaa7a('0x27')](_0x1b02cb,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xaa7a('0x1e')][_0xaa7a('0x16')]=function(_0x11ee95){try{if(this[_0xaa7a('0x20')](_0x11ee95)){logger[_0xaa7a('0x26')](_0xaa7a('0x57'),_0x11ee95[_0xaa7a('0x24')],util[_0xaa7a('0x27')](_0x11ee95,{'showHidden':![],'depth':null}));if(this[_0xaa7a('0x28')][_0x11ee95[_0xaa7a('0x24')]]){for(var _0x214c7e in this[_0xaa7a('0x28')][_0x11ee95[_0xaa7a('0x24')]]){if(this[_0xaa7a('0x28')][_0x11ee95['uniqueid']]['hasOwnProperty'](_0x214c7e)){if(this[_0xaa7a('0x28')][_0x11ee95[_0xaa7a('0x24')]][_0x214c7e][_0xaa7a('0x58')]&&!this[_0xaa7a('0x28')][_0x11ee95[_0xaa7a('0x24')]][_0x214c7e][_0xaa7a('0x15')]){logger['info'](_0xaa7a('0x59'),_0x11ee95[_0xaa7a('0x24')],this[_0xaa7a('0x28')][_0x11ee95[_0xaa7a('0x24')]][_0x214c7e][_0xaa7a('0x33')],_0x214c7e);this[_0xaa7a('0x28')][_0x11ee95[_0xaa7a('0x24')]][_0x214c7e]['agentcomplete']=!![];this[_0xaa7a('0x28')][_0x11ee95[_0xaa7a('0x24')]][_0x214c7e][_0xaa7a('0x5a')]=moment()[_0xaa7a('0x29')]('YYYY-MM-DD\x20HH:mm:ss');this[_0xaa7a('0x28')][_0x11ee95[_0xaa7a('0x24')]][_0x214c7e]['lastevent']=_0xaa7a('0x5b');this[_0xaa7a('0x28')][_0x11ee95[_0xaa7a('0x24')]][_0x214c7e][_0xaa7a('0x4a')]=_0x11ee95[_0xaa7a('0x4a')]==_0xaa7a('0x5c')?'agent':_0x11ee95[_0xaa7a('0x4a')];this[_0xaa7a('0x28')][_0x11ee95[_0xaa7a('0x24')]][_0x214c7e][_0xaa7a('0x5d')]=_0x11ee95[_0xaa7a('0x5d')];if(this[_0xaa7a('0xa')][_0x11ee95[_0xaa7a('0x2b')]]&&this[_0xaa7a('0xa')][_0x11ee95[_0xaa7a('0x2b')]][_0xaa7a('0x5e')]){this[_0xaa7a('0x28')][_0x11ee95[_0xaa7a('0x24')]][_0x214c7e][_0xaa7a('0x5f')]=this[_0xaa7a('0xa')][_0x11ee95['queue']][_0xaa7a('0x60')];this[_0xaa7a('0x28')][_0x11ee95[_0xaa7a('0x24')]][_0x214c7e]['agentacw']=!![];}this['agents'][_0x11ee95[_0xaa7a('0x40')]]=_[_0xaa7a('0x61')](this[_0xaa7a('0xb')][_0x11ee95['interface']],[_0xaa7a('0x2b'),_0xaa7a('0x41')]);logger[_0xaa7a('0x26')](_0xaa7a('0x62'),_0x11ee95[_0xaa7a('0x24')],util[_0xaa7a('0x27')](this['channels'][_0x11ee95[_0xaa7a('0x24')]][_0x214c7e],{'showHidden':![],'depth':null}));ami[_0xaa7a('0x1f')]('custom:agentcomplete',this[_0xaa7a('0x28')][_0x11ee95[_0xaa7a('0x24')]][_0x214c7e]);logger['debug']('[%s][voiceAgentReport][agentcomplete]\x20sending\x20user:agentcomplete\x20event:',_0x11ee95[_0xaa7a('0x24')],util[_0xaa7a('0x27')](this[_0xaa7a('0x28')][_0x11ee95[_0xaa7a('0x24')]][_0x214c7e],{'showHidden':![],'depth':null}));this[_0xaa7a('0x1f')](util[_0xaa7a('0x29')]('user:%s',_0x11ee95['membername']),_0xaa7a('0x63'),this[_0xaa7a('0x28')][_0x11ee95[_0xaa7a('0x24')]][_0x214c7e]);}}}}}}catch(_0x2647ee){logger[_0xaa7a('0x35')](_0xaa7a('0x64'),_0x11ee95[_0xaa7a('0x24')],util[_0xaa7a('0x27')](_0x2647ee,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xaa7a('0x1e')][_0xaa7a('0x18')]=function(_0x411c81){try{if(this['isNotNull'](_0x411c81)){logger[_0xaa7a('0x26')]('[%s][voiceAgentReport][varset]\x20event:',_0x411c81[_0xaa7a('0x24')],util['inspect'](_0x411c81,{'showHidden':![],'depth':null}));this[_0xaa7a('0x65')](_0x411c81[_0xaa7a('0x24')],_[_0xaa7a('0x66')](_0x411c81[_0xaa7a('0x67')])[0x0],_0x411c81['value']);if(this[_0xaa7a('0x28')][_0x411c81[_0xaa7a('0x24')]]){for(var _0x2d76a6 in this[_0xaa7a('0x28')][_0x411c81['uniqueid']]){if(this[_0xaa7a('0x28')][_0x411c81[_0xaa7a('0x24')]][_0xaa7a('0x38')](_0x2d76a6)){logger[_0xaa7a('0x22')](_0xaa7a('0x68'),_0x411c81[_0xaa7a('0x24')],_0x2d76a6,_[_0xaa7a('0x66')](_0x411c81[_0xaa7a('0x67')])[0x0],_0x411c81['value']);if(_[_0xaa7a('0x21')](this[_0xaa7a('0x28')][_0x411c81[_0xaa7a('0x24')]][_0x2d76a6][_0xaa7a('0xc')])){this['channels'][_0x411c81[_0xaa7a('0x24')]][_0x2d76a6][_0xaa7a('0xc')]={};}this[_0xaa7a('0x28')][_0x411c81[_0xaa7a('0x24')]][_0x2d76a6]['variables']=this[_0xaa7a('0xc')][_0x411c81[_0xaa7a('0x24')]];}}}}}catch(_0x7a826d){logger[_0xaa7a('0x35')](_0xaa7a('0x69'),_0x411c81[_0xaa7a('0x24')],util[_0xaa7a('0x27')](_0x7a826d,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xaa7a('0x1e')][_0xaa7a('0x65')]=function(_0xcd2e61,_0x485508,_0x3fc4dc){var _0x4742a6=[_0xaa7a('0x6a'),_0xaa7a('0x6b'),_0xaa7a('0x6c'),_0xaa7a('0x6d'),'rtpaudioqosloss',_0xaa7a('0x6e'),_0xaa7a('0x6f'),_0xaa7a('0x70'),_0xaa7a('0x71'),_0xaa7a('0x72'),_0xaa7a('0x73'),_0xaa7a('0x74'),_0xaa7a('0x75'),_0xaa7a('0x76'),_0xaa7a('0x77'),_0xaa7a('0x78'),_0xaa7a('0x33'),'memberpenalty','memberrealtime'];if(!_['isNil'](_0x485508)&&!_['includes'](_0x4742a6,_0x485508)){if(_[_0xaa7a('0x21')](this[_0xaa7a('0xc')][_0xcd2e61])){this[_0xaa7a('0xc')][_0xcd2e61]={};}this[_0xaa7a('0xc')][_0xcd2e61][_0x485508]=_0x3fc4dc;}};VoiceAgentReport[_0xaa7a('0x1e')]['syncHangup']=function(_0x33179b){try{if(this[_0xaa7a('0x20')](_0x33179b)){logger[_0xaa7a('0x26')](_0xaa7a('0x79'),_0x33179b[_0xaa7a('0x24')],util[_0xaa7a('0x27')](_0x33179b,{'showHidden':![],'depth':null}));if(this[_0xaa7a('0x28')][_0x33179b[_0xaa7a('0x24')]]){for(var _0x4a4aa3 in this['channels'][_0x33179b[_0xaa7a('0x24')]]){if(this[_0xaa7a('0x28')][_0x33179b['uniqueid']][_0xaa7a('0x38')](_0x4a4aa3)){if(this[_0xaa7a('0x28')][_0x33179b[_0xaa7a('0x24')]][_0x4a4aa3][_0xaa7a('0x4a')]=='transfer'&&this[_0xaa7a('0x28')][_0x33179b['uniqueid']][_0x4a4aa3]['agentcomplete']){logger['info'](_0xaa7a('0x7a'),_0x33179b['uniqueid'],_0x4a4aa3);this[_0xaa7a('0x28')][_0x33179b[_0xaa7a('0x24')]][_0x4a4aa3]['agentcompleteAt']=moment()[_0xaa7a('0x29')](_0xaa7a('0x50'));}}}logger['debug'](_0xaa7a('0x7b'),_0x33179b[_0xaa7a('0x24')],util[_0xaa7a('0x27')](_[_0xaa7a('0x7c')](this[_0xaa7a('0x28')][_0x33179b[_0xaa7a('0x24')]]),{'showHidden':![],'depth':null}));ami['emit']('custom:voiceAgentReport',_[_0xaa7a('0x7c')](this[_0xaa7a('0x28')][_0x33179b[_0xaa7a('0x24')]]));delete this[_0xaa7a('0x28')][_0x33179b[_0xaa7a('0x24')]];}if(this[_0xaa7a('0xc')][_0x33179b[_0xaa7a('0x24')]]){delete this[_0xaa7a('0xc')][_0x33179b[_0xaa7a('0x24')]];}}}catch(_0x3d4f4a){logger[_0xaa7a('0x35')](_0xaa7a('0x7d'),_0x33179b[_0xaa7a('0x24')],util[_0xaa7a('0x27')](_0x3d4f4a,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xaa7a('0x1e')][_0xaa7a('0x7e')]=function(_0x20a060){try{if(this[_0xaa7a('0x20')](_0x20a060)){logger[_0xaa7a('0x26')]('[%s][voiceAgentReport][attendedtransfer]\x20event:',_0x20a060[_0xaa7a('0x24')],util[_0xaa7a('0x27')](_0x20a060,{'showHidden':![],'depth':null}));if(this[_0xaa7a('0x28')][_0x20a060[_0xaa7a('0x7f')]]){for(var _0x3c6707 in this[_0xaa7a('0x28')][_0x20a060[_0xaa7a('0x7f')]]){if(this[_0xaa7a('0x28')][_0x20a060[_0xaa7a('0x7f')]][_0xaa7a('0x38')](_0x3c6707)){if(_0x20a060[_0xaa7a('0x80')]===_0x3c6707){logger[_0xaa7a('0x22')](_0xaa7a('0x81'),_0x20a060[_0xaa7a('0x24')],this['channels'][_0x20a060[_0xaa7a('0x7f')]][_0x3c6707][_0xaa7a('0x33')],_0x3c6707);var _0x45aa11=moment();this[_0xaa7a('0x28')][_0x20a060[_0xaa7a('0x7f')]][_0x3c6707][_0xaa7a('0x15')]=!![];this[_0xaa7a('0x28')][_0x20a060[_0xaa7a('0x7f')]][_0x3c6707][_0xaa7a('0x5a')]=moment()['format'](_0xaa7a('0x50'));this[_0xaa7a('0x28')][_0x20a060[_0xaa7a('0x7f')]][_0x3c6707][_0xaa7a('0x3e')]=_0xaa7a('0x5b');this['channels'][_0x20a060[_0xaa7a('0x7f')]][_0x3c6707][_0xaa7a('0x4a')]=_0xaa7a('0x5c');this['channels'][_0x20a060[_0xaa7a('0x7f')]][_0x3c6707][_0xaa7a('0x5d')]=_0x45aa11[_0xaa7a('0x82')](this[_0xaa7a('0x28')][_0x20a060['transfereeuniqueid']][_0x3c6707][_0xaa7a('0x58')],_0xaa7a('0x83'));}}}}if(this[_0xaa7a('0x28')][_0x20a060['secondtransfereruniqueid']]){var _0x1d6f6b=this[_0xaa7a('0x28')][_0x20a060[_0xaa7a('0x84')]];this[_0xaa7a('0x28')][_0x20a060['secondtransfereruniqueid']]=this[_0xaa7a('0x28')][_0x20a060['transfereeuniqueid']];this[_0xaa7a('0x28')][_0x20a060[_0xaa7a('0x7f')]]=_0x1d6f6b;}}}catch(_0x21f1cc){logger[_0xaa7a('0x35')](_0xaa7a('0x85'),_0x20a060[_0xaa7a('0x24')],util['inspect'](_0x21f1cc,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xaa7a('0x1e')][_0xaa7a('0x86')]=function(_0x5850a1){try{if(this[_0xaa7a('0x20')](_0x5850a1)){logger[_0xaa7a('0x26')](_0xaa7a('0x87'),_0x5850a1[_0xaa7a('0x24')],util['inspect'](_0x5850a1,{'showHidden':![],'depth':null}));if(this['channels'][_0x5850a1[_0xaa7a('0x7f')]]){for(var _0x294cd2 in this[_0xaa7a('0x28')][_0x5850a1[_0xaa7a('0x7f')]]){if(this['channels'][_0x5850a1[_0xaa7a('0x7f')]][_0xaa7a('0x38')](_0x294cd2)){if(_0x5850a1['transfereruniqueid']===_0x294cd2){logger[_0xaa7a('0x22')](_0xaa7a('0x88'),_0x5850a1[_0xaa7a('0x24')],this[_0xaa7a('0x28')][_0x5850a1[_0xaa7a('0x7f')]][_0x294cd2][_0xaa7a('0x33')],_0x294cd2);var _0x59aa34=moment();this['channels'][_0x5850a1['transfereeuniqueid']][_0x294cd2][_0xaa7a('0x15')]=!![];this[_0xaa7a('0x28')][_0x5850a1['transfereeuniqueid']][_0x294cd2][_0xaa7a('0x5a')]=_0x59aa34;this[_0xaa7a('0x28')][_0x5850a1[_0xaa7a('0x7f')]][_0x294cd2][_0xaa7a('0x3e')]=_0xaa7a('0x5b');this[_0xaa7a('0x28')][_0x5850a1[_0xaa7a('0x7f')]][_0x294cd2]['reason']='transfer';this[_0xaa7a('0x28')][_0x5850a1[_0xaa7a('0x7f')]][_0x294cd2][_0xaa7a('0x5d')]=_0x59aa34[_0xaa7a('0x82')](this[_0xaa7a('0x28')][_0x5850a1[_0xaa7a('0x7f')]][_0x294cd2][_0xaa7a('0x58')],_0xaa7a('0x83'));}}}}}}catch(_0x290ad7){logger[_0xaa7a('0x35')](_0xaa7a('0x89'),_0x5850a1['uniqueid'],util[_0xaa7a('0x27')](_0x290ad7,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xaa7a('0x1e')][_0xaa7a('0x1c')]=function(_0x3cd88c){var _0xc15fcc='';try{if(this[_0xaa7a('0x20')](_0x3cd88c)){logger['debug']('[%s][voiceAgentReport][musiconholdstart]\x20event:',_0x3cd88c[_0xaa7a('0x24')],util[_0xaa7a('0x27')](_0x3cd88c,{'showHidden':![],'depth':null}));if(_0x3cd88c[_0xaa7a('0x8a')]){_0xc15fcc=_0x3cd88c[_0xaa7a('0x8a')][_0xaa7a('0x8b')](0x0,_0x3cd88c['channel'][_0xaa7a('0x8c')]('-'));if(this[_0xaa7a('0xb')][_0xc15fcc]){logger['info'](_0xaa7a('0x8d'),_0x3cd88c[_0xaa7a('0x24')],_0xc15fcc);this['agents'][_0xc15fcc][_0xaa7a('0x8e')]=!![];}}}}catch(_0x11633c){logger[_0xaa7a('0x35')](_0xaa7a('0x8f'),_0x3cd88c[_0xaa7a('0x24')],util[_0xaa7a('0x27')](_0x11633c,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xaa7a('0x1e')]['syncMusicOnHoldStop']=function(_0x3d4269){var _0x240493='';try{if(this[_0xaa7a('0x20')](_0x3d4269)){logger[_0xaa7a('0x26')](_0xaa7a('0x90'),_0x3d4269['uniqueid'],util[_0xaa7a('0x27')](_0x3d4269,{'showHidden':![],'depth':null}));if(_0x3d4269[_0xaa7a('0x8a')]){_0x240493=_0x3d4269[_0xaa7a('0x8a')][_0xaa7a('0x8b')](0x0,_0x3d4269[_0xaa7a('0x8a')][_0xaa7a('0x8c')]('-'));if(this[_0xaa7a('0xb')][_0x240493]){logger[_0xaa7a('0x22')](_0xaa7a('0x91'),_0x3d4269[_0xaa7a('0x24')],_0x240493);this[_0xaa7a('0xb')][_0x240493][_0xaa7a('0x8e')]=![];}}}}catch(_0x33b4ca){logger[_0xaa7a('0x35')](_0xaa7a('0x92'),_0x3d4269[_0xaa7a('0x24')],util[_0xaa7a('0x27')](_0x33b4ca,{'showHidden':![],'depth':null}));}};module[_0xaa7a('0x93')]=VoiceAgentReport; \ No newline at end of file +var _0x2306=['[%s][voiceAgentReport][musiconholdstart]\x20event:','channel','substring','lastIndexOf','[%s][voiceAgentReport][musiconholdstart]\x20interface:%s','[%s][voiceAgentReport][musiconholdstart]','[%s][voiceAgentReport][musiconholdstop]\x20event:','[%s][voiceAgentReport][musiconholdstop]\x20interface:%s','onhold','exports','moment','util','../../../config/logger','ami','../ami','redis','defaults','socket.io-emitter','channels','voiceQueues','agents','variables','agentcalled','bind','syncAgentRingNoAnswer','queuecallerabandon','syncQueueCallerAbandon','syncAgentComplete','syncVarSet','hangup','syncHangup','musiconholdstart','musiconholdstop','attendedtransfer','syncAttendedTransfer','blindtransfer','syncBlindTransfer','emit','syncAgentCalled','isNotNull','info','destuniqueid','debug','[%s][voiceAgentReport][agentcalled]\x20event:','uniqueid','isUndefined','format','YYYY-MM-DD\x20HH:mm:ss','queue','mandatoryDisposition','type','inbound','merge','omit','event','[%s][voiceAgentReport][agentcalled]\x20sending\x20agentcalled\x20event:','inspect','user:called','error','[%s][voiceAgentReport][agentcalled]','prototype','syncAgentConnect','[%s][voiceAgentReport][agentconnect]\x20event:','hasOwnProperty','membername','agentconnectAt','connectedlinename','connectedlinenum','destchannelstate','destchannelstatedesc','holdtime','lastevent','connect','destconnectedlinenum','custom:agentconnect','user:%s','user:agentconnect','agentringnoanswer','[%s][voiceAgentReport][agentconnect]\x20agent:%s\x20destuniqueid:%s\x20lastevent:answered_elsewhere','agentringnoanswerAt','answeredelsewheredestinationuniqueid','reason','answered_elsewhere','[%s][voiceAgentReport][agentconnect]\x20sending\x20agentansweredelsewhere\x20event:','[%s][voiceAgentReport][agentconnect]','[%s][voiceAgentReport][agentringnoanswer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:rejected','rejected','[%s][voiceAgentReport][agentringnoanswer]\x20sending\x20agentringnoanswer\x20event:','[%s][voiceAgentReport][agentringnoanswer]','[%s][voiceAgentReport][queuecallerabandon]\x20event:','[%s][voiceAgentReport][queuecallerabandon]\x20agent:%s\x20destuniqueid:%s\x20lastevent:abandoned','abandoned','custom:agentqueuecallerabandon','[%s][voiceAgentReport][queuecallerabandon]','[%s][voiceAgentReport][agentcomplete]\x20event:','agentcompleteAt','complete','transfer','agent','acwtime','acwTimeout','agentacw','interface','[%s][voiceAgentReport][agentcomplete]\x20sending\x20agentcomplete\x20event:','custom:agentcomplete','user:agentcomplete','[%s][voiceAgentReport][agentcomplete]','[%s][voiceAgentReport][varset]\x20event:','keys','variable','[%s][voiceAgentReport][varset]\x20destuniqueid:%s\x20variable:%s\x20value:%s','value','[%s][voiceAgentReport][varset]','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqoslossbridged','bridgepeer','bridgepvtcallid','membercalls','memberinterface','memberlastcall','memberpenalty','isNil','[%s][voiceAgentReport][hangup]\x20destuniqueid:%s','[%s][voiceAgentReport][hangup]\x20sending\x20voiceAgentReport\x20event:','values','[%s][voiceAgentReport][hangup]','[%s][voiceAgentReport][attendedtransfer]\x20event:','transfereeuniqueid','origtransfereruniqueid','[%s][voiceAgentReport][attendedtransfer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete','talktime','diff','seconds','secondtransfereruniqueid','[%s][voiceAgentReport][attendedtransfer]','[%s][voiceAgentReport][blindtransfer]\x20event:','transfereruniqueid','[%s][voiceAgentReport][blindtransfer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete','[%s][voiceAgentReport][blindtransfer]'];(function(_0x24780a,_0x572807){var _0x4c5885=function(_0x8aaf6a){while(--_0x8aaf6a){_0x24780a['push'](_0x24780a['shift']());}};_0x4c5885(++_0x572807);}(_0x2306,0x98));var _0x6230=function(_0x2aff27,_0xec769a){_0x2aff27=_0x2aff27-0x0;var _0x11530f=_0x2306[_0x2aff27];return _0x11530f;};'use strict';var _=require('lodash');var moment=require(_0x6230('0x0'));var util=require(_0x6230('0x1'));var Redis=require('ioredis');var config=require('../../../config/environment');var logger=require(_0x6230('0x2'))(_0x6230('0x3'));var ami=require(_0x6230('0x4'));config[_0x6230('0x5')]=_[_0x6230('0x6')](config[_0x6230('0x5')],{'host':'localhost','port':0x18eb});var io=require(_0x6230('0x7'))(new Redis(config[_0x6230('0x5')]));function VoiceAgentReport(_0x12ea90){this[_0x6230('0x8')]={};this['voiceQueues']=_0x12ea90[_0x6230('0x9')];this[_0x6230('0xa')]=_0x12ea90[_0x6230('0xa')];this[_0x6230('0xb')]={};ami['on'](_0x6230('0xc'),this['syncAgentCalled'][_0x6230('0xd')](this));ami['on']('agentconnect',this['syncAgentConnect'][_0x6230('0xd')](this));ami['on']('agentringnoanswer',this[_0x6230('0xe')][_0x6230('0xd')](this));ami['on'](_0x6230('0xf'),this[_0x6230('0x10')][_0x6230('0xd')](this));ami['on']('agentcomplete',this[_0x6230('0x11')]['bind'](this));ami['on']('varset',this[_0x6230('0x12')][_0x6230('0xd')](this));ami['on'](_0x6230('0x13'),this[_0x6230('0x14')][_0x6230('0xd')](this));ami['on'](_0x6230('0x15'),this['syncMusicOnHoldStart']['bind'](this));ami['on'](_0x6230('0x16'),this['syncMusicOnHoldStop'][_0x6230('0xd')](this));ami['on'](_0x6230('0x17'),this[_0x6230('0x18')][_0x6230('0xd')](this));ami['on'](_0x6230('0x19'),this[_0x6230('0x1a')][_0x6230('0xd')](this));}VoiceAgentReport['prototype']['emit']=function(_0x4f03bc,_0x55ac13,_0x3e2da1){io['to'](_0x4f03bc)[_0x6230('0x1b')](_0x55ac13,_0x3e2da1);};VoiceAgentReport['prototype']['isNotNull']=function(_0x381079){return _0x381079!==null&&!_['isUndefined'](_0x381079);};VoiceAgentReport['prototype'][_0x6230('0x1c')]=function(_0x5a1a65){try{if(this[_0x6230('0x1d')](_0x5a1a65)){logger[_0x6230('0x1e')]('[%s][voiceAgentReport][agentcalled]\x20agent:%s\x20destuniqueid:%s\x20lastevent:called',_0x5a1a65['uniqueid'],_0x5a1a65['membername'],_0x5a1a65[_0x6230('0x1f')]);logger[_0x6230('0x20')](_0x6230('0x21'),_0x5a1a65[_0x6230('0x22')],util['inspect'](_0x5a1a65,{'showHidden':![],'depth':null}));if(_[_0x6230('0x23')](this['channels'][_0x5a1a65['uniqueid']])){this[_0x6230('0x8')][_0x5a1a65['uniqueid']]={};}if(_[_0x6230('0x23')](this['channels'][_0x5a1a65['uniqueid']][_0x5a1a65[_0x6230('0x1f')]])){this[_0x6230('0x8')][_0x5a1a65[_0x6230('0x22')]][_0x5a1a65[_0x6230('0x1f')]]={'agentcalledAt':moment()[_0x6230('0x24')](_0x6230('0x25')),'lastevent':'called','mandatoryDisposition':this[_0x6230('0x9')][_0x5a1a65[_0x6230('0x26')]]?this['voiceQueues'][_0x5a1a65[_0x6230('0x26')]][_0x6230('0x27')]||![]:![],'type':this['voiceQueues'][_0x5a1a65['queue']]?this[_0x6230('0x9')][_0x5a1a65[_0x6230('0x26')]][_0x6230('0x28')]||_0x6230('0x29'):_0x6230('0x29'),'variables':this[_0x6230('0xb')][_0x5a1a65[_0x6230('0x22')]]};}_[_0x6230('0x2a')](this[_0x6230('0x8')][_0x5a1a65[_0x6230('0x22')]][_0x5a1a65['destuniqueid']],_[_0x6230('0x2b')](_0x5a1a65,[_0x6230('0x2c'),'privilege']));logger['debug'](_0x6230('0x2d'),_0x5a1a65[_0x6230('0x22')],util[_0x6230('0x2e')](this[_0x6230('0x8')][_0x5a1a65[_0x6230('0x22')]][_0x5a1a65[_0x6230('0x1f')]],{'showHidden':![],'depth':null}));ami[_0x6230('0x1b')]('custom:agentcalled',this[_0x6230('0x8')][_0x5a1a65[_0x6230('0x22')]][_0x5a1a65[_0x6230('0x1f')]]);logger[_0x6230('0x20')]('[%s][voiceAgentReport][agentcalled]\x20sending\x20user:called\x20event:',_0x5a1a65[_0x6230('0x22')],util[_0x6230('0x2e')](this[_0x6230('0x8')][_0x5a1a65['uniqueid']][_0x5a1a65['destuniqueid']],{'showHidden':![],'depth':null}));this[_0x6230('0x1b')](util['format']('user:%s',_0x5a1a65['membername']),_0x6230('0x2f'),this[_0x6230('0x8')][_0x5a1a65['uniqueid']][_0x5a1a65[_0x6230('0x1f')]]);}}catch(_0x533bc7){logger[_0x6230('0x30')](_0x6230('0x31'),_0x5a1a65['uniqueid'],util[_0x6230('0x2e')](_0x533bc7,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x6230('0x32')][_0x6230('0x33')]=function(_0xeccedc){try{if(this[_0x6230('0x1d')](_0xeccedc)){if(this[_0x6230('0x8')][_0xeccedc[_0x6230('0x22')]]){logger[_0x6230('0x20')](_0x6230('0x34'),_0xeccedc[_0x6230('0x22')],util[_0x6230('0x2e')](_0xeccedc,{'showHidden':![],'depth':null}));for(var _0x55fe43 in this[_0x6230('0x8')][_0xeccedc[_0x6230('0x22')]]){if(this[_0x6230('0x8')][_0xeccedc[_0x6230('0x22')]][_0x6230('0x35')](_0x55fe43)){if(_0xeccedc[_0x6230('0x1f')]===_0x55fe43){logger[_0x6230('0x1e')]('[%s][voiceAgentReport][agentconnect]\x20agent:%s\x20destuniqueid:%s\x20lastevent:connect',_0xeccedc[_0x6230('0x22')],_0xeccedc[_0x6230('0x36')],_0xeccedc[_0x6230('0x1f')]);this[_0x6230('0x8')][_0xeccedc[_0x6230('0x22')]][_0x55fe43][_0x6230('0x37')]=moment()[_0x6230('0x24')](_0x6230('0x25'));this[_0x6230('0x8')][_0xeccedc[_0x6230('0x22')]][_0x55fe43][_0x6230('0x38')]=_0xeccedc[_0x6230('0x38')];this[_0x6230('0x8')][_0xeccedc[_0x6230('0x22')]][_0x55fe43][_0x6230('0x39')]=_0xeccedc[_0x6230('0x39')];this[_0x6230('0x8')][_0xeccedc[_0x6230('0x22')]][_0x55fe43][_0x6230('0x3a')]=_0xeccedc['destchannelstate'];this[_0x6230('0x8')][_0xeccedc[_0x6230('0x22')]][_0x55fe43][_0x6230('0x3b')]=_0xeccedc[_0x6230('0x3b')];this[_0x6230('0x8')][_0xeccedc[_0x6230('0x22')]][_0x55fe43]['holdtime']=_0xeccedc[_0x6230('0x3c')];this[_0x6230('0x8')][_0xeccedc[_0x6230('0x22')]][_0x55fe43][_0x6230('0x3d')]=_0x6230('0x3e');_['merge'](this['agents'][_0xeccedc['interface']],_['pick'](_0xeccedc,[_0x6230('0x26'),_0x6230('0x3f')]));logger['debug']('[%s][voiceAgentReport][agentconnect]\x20sending\x20agentconnect\x20event:',_0xeccedc['uniqueid'],util['inspect'](this['channels'][_0xeccedc[_0x6230('0x22')]][_0xeccedc['destuniqueid']],{'showHidden':![],'depth':null}));ami[_0x6230('0x1b')](_0x6230('0x40'),this[_0x6230('0x8')][_0xeccedc[_0x6230('0x22')]][_0xeccedc[_0x6230('0x1f')]]);logger[_0x6230('0x20')]('[%s][voiceAgentReport][agentcalled]\x20sending\x20user:agentconnect\x20event:',_0xeccedc[_0x6230('0x22')],util[_0x6230('0x2e')](this[_0x6230('0x8')][_0xeccedc['uniqueid']][_0xeccedc[_0x6230('0x1f')]],{'showHidden':![],'depth':null}));this[_0x6230('0x1b')](util['format'](_0x6230('0x41'),_0xeccedc[_0x6230('0x36')]),_0x6230('0x42'),this['channels'][_0xeccedc[_0x6230('0x22')]][_0xeccedc['destuniqueid']]);}else if(!this[_0x6230('0x8')][_0xeccedc['uniqueid']][_0x55fe43][_0x6230('0x43')]&&!this[_0x6230('0x8')][_0xeccedc[_0x6230('0x22')]][_0x55fe43]['agentcomplete']){logger[_0x6230('0x1e')](_0x6230('0x44'),_0xeccedc[_0x6230('0x22')],this[_0x6230('0x8')][_0xeccedc['uniqueid']][_0x55fe43][_0x6230('0x36')],_0x55fe43);this[_0x6230('0x8')][_0xeccedc[_0x6230('0x22')]][_0x55fe43][_0x6230('0x43')]=!![];this[_0x6230('0x8')][_0xeccedc['uniqueid']][_0x55fe43][_0x6230('0x45')]=moment()[_0x6230('0x24')]('YYYY-MM-DD\x20HH:mm:ss');this['channels'][_0xeccedc['uniqueid']][_0x55fe43][_0x6230('0x46')]=_0xeccedc[_0x6230('0x1f')];this[_0x6230('0x8')][_0xeccedc[_0x6230('0x22')]][_0x55fe43]['answeredelsewheremembername']=_0xeccedc['membername'];this['channels'][_0xeccedc[_0x6230('0x22')]][_0x55fe43][_0x6230('0x3d')]='answered_elsewhere';this[_0x6230('0x8')][_0xeccedc[_0x6230('0x22')]][_0x55fe43][_0x6230('0x47')]=_0x6230('0x48');logger[_0x6230('0x20')](_0x6230('0x49'),_0xeccedc[_0x6230('0x22')],util['inspect'](this[_0x6230('0x8')][_0xeccedc[_0x6230('0x22')]][_0x55fe43],{'showHidden':![],'depth':null}));ami['emit']('custom:agentansweredelsewhere',this['channels'][_0xeccedc[_0x6230('0x22')]][_0x55fe43]);}}}}}}catch(_0x1a1580){logger[_0x6230('0x30')](_0x6230('0x4a'),_0xeccedc['uniqueid'],util['inspect'](_0x1a1580,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x6230('0x32')][_0x6230('0xe')]=function(_0x315026){try{if(this['isNotNull'](_0x315026)){logger['debug']('[%s][voiceAgentReport][agentringnoanswer]\x20event:',_0x315026['uniqueid'],util[_0x6230('0x2e')](_0x315026,{'showHidden':![],'depth':null}));if(this['channels'][_0x315026[_0x6230('0x22')]]&&this[_0x6230('0x8')][_0x315026[_0x6230('0x22')]][_0x315026[_0x6230('0x1f')]]){logger[_0x6230('0x1e')](_0x6230('0x4b'),_0x315026[_0x6230('0x22')],_0x315026[_0x6230('0x36')],_0x315026['destuniqueid']);this[_0x6230('0x8')][_0x315026[_0x6230('0x22')]][_0x315026['destuniqueid']][_0x6230('0x43')]=!![];this[_0x6230('0x8')][_0x315026[_0x6230('0x22')]][_0x315026[_0x6230('0x1f')]]['agentringnoanswerAt']=moment()[_0x6230('0x24')]('YYYY-MM-DD\x20HH:mm:ss');this['channels'][_0x315026[_0x6230('0x22')]][_0x315026[_0x6230('0x1f')]]['lastevent']=_0x6230('0x4c');this[_0x6230('0x8')][_0x315026[_0x6230('0x22')]][_0x315026[_0x6230('0x1f')]][_0x6230('0x47')]=_0x6230('0x4c');logger[_0x6230('0x20')](_0x6230('0x4d'),_0x315026['uniqueid'],util[_0x6230('0x2e')](this[_0x6230('0x8')][_0x315026['uniqueid']][_0x315026[_0x6230('0x1f')]],{'showHidden':![],'depth':null}));ami[_0x6230('0x1b')]('custom:agentringnoanswer',this[_0x6230('0x8')][_0x315026[_0x6230('0x22')]][_0x315026[_0x6230('0x1f')]]);}}}catch(_0x16250b){logger['error'](_0x6230('0x4e'),_0x315026[_0x6230('0x22')],util[_0x6230('0x2e')](_0x16250b,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x6230('0x32')][_0x6230('0x10')]=function(_0x3b14e5){try{if(this[_0x6230('0x1d')](_0x3b14e5)){logger[_0x6230('0x20')](_0x6230('0x4f'),_0x3b14e5[_0x6230('0x22')],util[_0x6230('0x2e')](_0x3b14e5,{'showHidden':![],'depth':null}));if(this[_0x6230('0x8')][_0x3b14e5[_0x6230('0x22')]]){for(var _0x5a8a28 in this[_0x6230('0x8')][_0x3b14e5['uniqueid']]){if(this[_0x6230('0x8')][_0x3b14e5[_0x6230('0x22')]][_0x6230('0x35')](_0x5a8a28)&&!this[_0x6230('0x8')][_0x3b14e5[_0x6230('0x22')]][_0x5a8a28]['agentringnoanswer']&&!this['channels'][_0x3b14e5[_0x6230('0x22')]][_0x5a8a28]['agentcomplete']){logger[_0x6230('0x1e')](_0x6230('0x50'),_0x3b14e5['uniqueid'],this['channels'][_0x3b14e5[_0x6230('0x22')]][_0x5a8a28][_0x6230('0x36')],_0x5a8a28);this['channels'][_0x3b14e5[_0x6230('0x22')]][_0x5a8a28]['agentringnoanswer']=!![];this[_0x6230('0x8')][_0x3b14e5['uniqueid']][_0x5a8a28][_0x6230('0x45')]=moment()[_0x6230('0x24')](_0x6230('0x25'));this[_0x6230('0x8')][_0x3b14e5['uniqueid']][_0x5a8a28][_0x6230('0x3d')]=_0x6230('0x51');this[_0x6230('0x8')][_0x3b14e5['uniqueid']][_0x5a8a28][_0x6230('0x47')]=_0x6230('0x51');logger[_0x6230('0x20')]('[%s][voiceAgentReport][queuecallerabandon]\x20sending\x20agentqueuecallerabandon\x20event:',_0x3b14e5['uniqueid'],util[_0x6230('0x2e')](this[_0x6230('0x8')][_0x3b14e5[_0x6230('0x22')]][_0x5a8a28],{'showHidden':![],'depth':null}));ami[_0x6230('0x1b')](_0x6230('0x52'),this['channels'][_0x3b14e5[_0x6230('0x22')]][_0x5a8a28]);}}}}}catch(_0x18c768){logger['error'](_0x6230('0x53'),_0x3b14e5[_0x6230('0x22')],util[_0x6230('0x2e')](_0x18c768,{'showHidden':![],'depth':null}));}};VoiceAgentReport['prototype'][_0x6230('0x11')]=function(_0x1f5d41){try{if(this[_0x6230('0x1d')](_0x1f5d41)){logger['debug'](_0x6230('0x54'),_0x1f5d41['uniqueid'],util[_0x6230('0x2e')](_0x1f5d41,{'showHidden':![],'depth':null}));if(this[_0x6230('0x8')][_0x1f5d41['uniqueid']]){for(var _0x5db346 in this[_0x6230('0x8')][_0x1f5d41[_0x6230('0x22')]]){if(this[_0x6230('0x8')][_0x1f5d41[_0x6230('0x22')]][_0x6230('0x35')](_0x5db346)){if(this['channels'][_0x1f5d41['uniqueid']][_0x5db346][_0x6230('0x37')]&&!this[_0x6230('0x8')][_0x1f5d41[_0x6230('0x22')]][_0x5db346]['agentcomplete']){logger['info']('[%s][voiceAgentReport][agentcomplete]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete',_0x1f5d41[_0x6230('0x22')],this[_0x6230('0x8')][_0x1f5d41[_0x6230('0x22')]][_0x5db346][_0x6230('0x36')],_0x5db346);this['channels'][_0x1f5d41[_0x6230('0x22')]][_0x5db346]['agentcomplete']=!![];this['channels'][_0x1f5d41[_0x6230('0x22')]][_0x5db346][_0x6230('0x55')]=moment()[_0x6230('0x24')](_0x6230('0x25'));this[_0x6230('0x8')][_0x1f5d41[_0x6230('0x22')]][_0x5db346][_0x6230('0x3d')]=_0x6230('0x56');this['channels'][_0x1f5d41[_0x6230('0x22')]][_0x5db346][_0x6230('0x47')]=_0x1f5d41[_0x6230('0x47')]==_0x6230('0x57')?_0x6230('0x58'):_0x1f5d41[_0x6230('0x47')];this[_0x6230('0x8')][_0x1f5d41[_0x6230('0x22')]][_0x5db346]['talktime']=_0x1f5d41['talktime'];if(this['voiceQueues'][_0x1f5d41[_0x6230('0x26')]]&&this[_0x6230('0x9')][_0x1f5d41[_0x6230('0x26')]]['acw']){this[_0x6230('0x8')][_0x1f5d41['uniqueid']][_0x5db346][_0x6230('0x59')]=this[_0x6230('0x9')][_0x1f5d41[_0x6230('0x26')]][_0x6230('0x5a')];this[_0x6230('0x8')][_0x1f5d41[_0x6230('0x22')]][_0x5db346][_0x6230('0x5b')]=!![];}this[_0x6230('0xa')][_0x1f5d41[_0x6230('0x5c')]]=_[_0x6230('0x2b')](this['agents'][_0x1f5d41[_0x6230('0x5c')]],[_0x6230('0x26'),_0x6230('0x3f')]);logger[_0x6230('0x20')](_0x6230('0x5d'),_0x1f5d41[_0x6230('0x22')],util['inspect'](this[_0x6230('0x8')][_0x1f5d41[_0x6230('0x22')]][_0x5db346],{'showHidden':![],'depth':null}));ami[_0x6230('0x1b')](_0x6230('0x5e'),this[_0x6230('0x8')][_0x1f5d41[_0x6230('0x22')]][_0x5db346]);logger[_0x6230('0x20')]('[%s][voiceAgentReport][agentcomplete]\x20sending\x20user:agentcomplete\x20event:',_0x1f5d41[_0x6230('0x22')],util[_0x6230('0x2e')](this[_0x6230('0x8')][_0x1f5d41[_0x6230('0x22')]][_0x5db346],{'showHidden':![],'depth':null}));this[_0x6230('0x1b')](util[_0x6230('0x24')](_0x6230('0x41'),_0x1f5d41[_0x6230('0x36')]),_0x6230('0x5f'),this[_0x6230('0x8')][_0x1f5d41[_0x6230('0x22')]][_0x5db346]);}}}}}}catch(_0x5e7230){logger[_0x6230('0x30')](_0x6230('0x60'),_0x1f5d41[_0x6230('0x22')],util['inspect'](_0x5e7230,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x6230('0x32')][_0x6230('0x12')]=function(_0x496ec4){try{if(this['isNotNull'](_0x496ec4)){logger[_0x6230('0x20')](_0x6230('0x61'),_0x496ec4[_0x6230('0x22')],util[_0x6230('0x2e')](_0x496ec4,{'showHidden':![],'depth':null}));this['addVariable'](_0x496ec4[_0x6230('0x22')],_[_0x6230('0x62')](_0x496ec4[_0x6230('0x63')])[0x0],_0x496ec4['value']);if(this['channels'][_0x496ec4[_0x6230('0x22')]]){for(var _0x26b4af in this[_0x6230('0x8')][_0x496ec4[_0x6230('0x22')]]){if(this[_0x6230('0x8')][_0x496ec4[_0x6230('0x22')]][_0x6230('0x35')](_0x26b4af)){logger[_0x6230('0x1e')](_0x6230('0x64'),_0x496ec4['uniqueid'],_0x26b4af,_[_0x6230('0x62')](_0x496ec4['variable'])[0x0],_0x496ec4[_0x6230('0x65')]);if(_[_0x6230('0x23')](this[_0x6230('0x8')][_0x496ec4[_0x6230('0x22')]][_0x26b4af][_0x6230('0xb')])){this[_0x6230('0x8')][_0x496ec4[_0x6230('0x22')]][_0x26b4af][_0x6230('0xb')]={};}this[_0x6230('0x8')][_0x496ec4[_0x6230('0x22')]][_0x26b4af][_0x6230('0xb')]=this[_0x6230('0xb')][_0x496ec4['uniqueid']];}}}}}catch(_0x30ce5e){logger[_0x6230('0x30')](_0x6230('0x66'),_0x496ec4[_0x6230('0x22')],util[_0x6230('0x2e')](_0x30ce5e,{'showHidden':![],'depth':null}));}};VoiceAgentReport['prototype']['addVariable']=function(_0x44017e,_0x14baed,_0x3ff345){var _0x2ff506=[_0x6230('0x67'),_0x6230('0x68'),_0x6230('0x69'),_0x6230('0x6a'),'rtpaudioqosloss',_0x6230('0x6b'),'rtpaudioqosrtt','rtpaudioqosrttbridged','sipcallid','sipuri',_0x6230('0x6c'),_0x6230('0x6d'),_0x6230('0x6e'),'memberdynamic',_0x6230('0x6f'),_0x6230('0x70'),'membername',_0x6230('0x71'),'memberrealtime'];if(!_[_0x6230('0x72')](_0x14baed)&&!_['includes'](_0x2ff506,_0x14baed)){if(_[_0x6230('0x23')](this[_0x6230('0xb')][_0x44017e])){this[_0x6230('0xb')][_0x44017e]={};}this[_0x6230('0xb')][_0x44017e][_0x14baed]=_0x3ff345;}};VoiceAgentReport['prototype'][_0x6230('0x14')]=function(_0x4cb746){try{if(this['isNotNull'](_0x4cb746)){logger['debug']('[%s][voiceAgentReport][hangup]\x20event:',_0x4cb746[_0x6230('0x22')],util[_0x6230('0x2e')](_0x4cb746,{'showHidden':![],'depth':null}));if(this[_0x6230('0x8')][_0x4cb746[_0x6230('0x22')]]){for(var _0x3ad86c in this[_0x6230('0x8')][_0x4cb746[_0x6230('0x22')]]){if(this['channels'][_0x4cb746['uniqueid']][_0x6230('0x35')](_0x3ad86c)){if(this[_0x6230('0x8')][_0x4cb746[_0x6230('0x22')]][_0x3ad86c][_0x6230('0x47')]==_0x6230('0x57')&&this[_0x6230('0x8')][_0x4cb746[_0x6230('0x22')]][_0x3ad86c]['agentcomplete']){logger['info'](_0x6230('0x73'),_0x4cb746[_0x6230('0x22')],_0x3ad86c);this[_0x6230('0x8')][_0x4cb746[_0x6230('0x22')]][_0x3ad86c][_0x6230('0x55')]=moment()['format'](_0x6230('0x25'));}}}logger[_0x6230('0x20')](_0x6230('0x74'),_0x4cb746[_0x6230('0x22')],util[_0x6230('0x2e')](_[_0x6230('0x75')](this[_0x6230('0x8')][_0x4cb746['uniqueid']]),{'showHidden':![],'depth':null}));ami[_0x6230('0x1b')]('custom:voiceAgentReport',_[_0x6230('0x75')](this[_0x6230('0x8')][_0x4cb746[_0x6230('0x22')]]));delete this[_0x6230('0x8')][_0x4cb746[_0x6230('0x22')]];}if(this['variables'][_0x4cb746[_0x6230('0x22')]]){delete this[_0x6230('0xb')][_0x4cb746['uniqueid']];}}}catch(_0x3a73d7){logger[_0x6230('0x30')](_0x6230('0x76'),_0x4cb746[_0x6230('0x22')],util[_0x6230('0x2e')](_0x3a73d7,{'showHidden':![],'depth':null}));}};VoiceAgentReport['prototype'][_0x6230('0x18')]=function(_0x527210){try{if(this[_0x6230('0x1d')](_0x527210)){logger[_0x6230('0x20')](_0x6230('0x77'),_0x527210[_0x6230('0x22')],util['inspect'](_0x527210,{'showHidden':![],'depth':null}));if(this[_0x6230('0x8')][_0x527210[_0x6230('0x78')]]){for(var _0x42b584 in this[_0x6230('0x8')][_0x527210[_0x6230('0x78')]]){if(this[_0x6230('0x8')][_0x527210[_0x6230('0x78')]][_0x6230('0x35')](_0x42b584)){if(_0x527210[_0x6230('0x79')]===_0x42b584){logger[_0x6230('0x1e')](_0x6230('0x7a'),_0x527210[_0x6230('0x22')],this['channels'][_0x527210[_0x6230('0x78')]][_0x42b584][_0x6230('0x36')],_0x42b584);var _0x3f9566=moment();this[_0x6230('0x8')][_0x527210['transfereeuniqueid']][_0x42b584]['agentcomplete']=!![];this['channels'][_0x527210['transfereeuniqueid']][_0x42b584][_0x6230('0x55')]=moment()[_0x6230('0x24')](_0x6230('0x25'));this['channels'][_0x527210[_0x6230('0x78')]][_0x42b584][_0x6230('0x3d')]=_0x6230('0x56');this[_0x6230('0x8')][_0x527210['transfereeuniqueid']][_0x42b584][_0x6230('0x47')]=_0x6230('0x57');this[_0x6230('0x8')][_0x527210['transfereeuniqueid']][_0x42b584][_0x6230('0x7b')]=_0x3f9566[_0x6230('0x7c')](this[_0x6230('0x8')][_0x527210['transfereeuniqueid']][_0x42b584]['agentconnectAt'],_0x6230('0x7d'));}}}}if(this['channels'][_0x527210[_0x6230('0x7e')]]){var _0x50191c=this[_0x6230('0x8')][_0x527210[_0x6230('0x7e')]];this[_0x6230('0x8')][_0x527210[_0x6230('0x7e')]]=this[_0x6230('0x8')][_0x527210[_0x6230('0x78')]];this[_0x6230('0x8')][_0x527210['transfereeuniqueid']]=_0x50191c;}}}catch(_0xec5693){logger[_0x6230('0x30')](_0x6230('0x7f'),_0x527210[_0x6230('0x22')],util['inspect'](_0xec5693,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x6230('0x32')]['syncBlindTransfer']=function(_0x235c3b){try{if(this[_0x6230('0x1d')](_0x235c3b)){logger[_0x6230('0x20')](_0x6230('0x80'),_0x235c3b[_0x6230('0x22')],util['inspect'](_0x235c3b,{'showHidden':![],'depth':null}));if(this['channels'][_0x235c3b['transfereeuniqueid']]){for(var _0x6dc9a2 in this[_0x6230('0x8')][_0x235c3b[_0x6230('0x78')]]){if(this[_0x6230('0x8')][_0x235c3b[_0x6230('0x78')]][_0x6230('0x35')](_0x6dc9a2)){if(_0x235c3b[_0x6230('0x81')]===_0x6dc9a2){logger[_0x6230('0x1e')](_0x6230('0x82'),_0x235c3b['uniqueid'],this[_0x6230('0x8')][_0x235c3b[_0x6230('0x78')]][_0x6dc9a2][_0x6230('0x36')],_0x6dc9a2);var _0x1839a9=moment();this['channels'][_0x235c3b[_0x6230('0x78')]][_0x6dc9a2]['agentcomplete']=!![];this[_0x6230('0x8')][_0x235c3b['transfereeuniqueid']][_0x6dc9a2][_0x6230('0x55')]=_0x1839a9;this[_0x6230('0x8')][_0x235c3b[_0x6230('0x78')]][_0x6dc9a2]['lastevent']=_0x6230('0x56');this[_0x6230('0x8')][_0x235c3b[_0x6230('0x78')]][_0x6dc9a2][_0x6230('0x47')]='transfer';this['channels'][_0x235c3b['transfereeuniqueid']][_0x6dc9a2]['talktime']=_0x1839a9['diff'](this[_0x6230('0x8')][_0x235c3b[_0x6230('0x78')]][_0x6dc9a2]['agentconnectAt'],_0x6230('0x7d'));}}}}}}catch(_0x3775df){logger[_0x6230('0x30')](_0x6230('0x83'),_0x235c3b['uniqueid'],util[_0x6230('0x2e')](_0x3775df,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x6230('0x32')]['syncMusicOnHoldStart']=function(_0x3eba42){var _0x1ee4c8='';try{if(this[_0x6230('0x1d')](_0x3eba42)){logger[_0x6230('0x20')](_0x6230('0x84'),_0x3eba42['uniqueid'],util[_0x6230('0x2e')](_0x3eba42,{'showHidden':![],'depth':null}));if(_0x3eba42['channel']){_0x1ee4c8=_0x3eba42[_0x6230('0x85')][_0x6230('0x86')](0x0,_0x3eba42[_0x6230('0x85')][_0x6230('0x87')]('-'));if(this[_0x6230('0xa')][_0x1ee4c8]){logger[_0x6230('0x1e')](_0x6230('0x88'),_0x3eba42[_0x6230('0x22')],_0x1ee4c8);this[_0x6230('0xa')][_0x1ee4c8]['onhold']=!![];}}}}catch(_0x4ebda2){logger[_0x6230('0x30')](_0x6230('0x89'),_0x3eba42[_0x6230('0x22')],util[_0x6230('0x2e')](_0x4ebda2,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x6230('0x32')]['syncMusicOnHoldStop']=function(_0x2a4267){var _0x19ada0='';try{if(this[_0x6230('0x1d')](_0x2a4267)){logger[_0x6230('0x20')](_0x6230('0x8a'),_0x2a4267[_0x6230('0x22')],util[_0x6230('0x2e')](_0x2a4267,{'showHidden':![],'depth':null}));if(_0x2a4267['channel']){_0x19ada0=_0x2a4267[_0x6230('0x85')][_0x6230('0x86')](0x0,_0x2a4267[_0x6230('0x85')][_0x6230('0x87')]('-'));if(this[_0x6230('0xa')][_0x19ada0]){logger[_0x6230('0x1e')](_0x6230('0x8b'),_0x2a4267['uniqueid'],_0x19ada0);this['agents'][_0x19ada0][_0x6230('0x8c')]=![];}}}}catch(_0x34f8c3){logger['error']('[%s][voiceAgentReport][musiconholdstop]',_0x2a4267[_0x6230('0x22')],util[_0x6230('0x2e')](_0x34f8c3,{'showHidden':![],'depth':null}));}};module[_0x6230('0x8d')]=VoiceAgentReport; \ No newline at end of file diff --git a/server/services/ami/report/voiceCallReport.js b/server/services/ami/report/voiceCallReport.js index 8e8461f..4cb7b68 100644 --- a/server/services/ami/report/voiceCallReport.js +++ b/server/services/ami/report/voiceCallReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9957=['[voiceCallReport][coreshowchannels]','inspect','isNotNull','isUndefined','prototype','emit','calleridname','calleridnum','debug','[%s][voiceCallReport][newcallerid]\x20event:','uniqueid','merge','pick','syncNewChannel','[%s][voiceCallReport][newchannel]\x20event:','OutgoingSpoolFailed','info','[%s][voiceCallReport][newchannel]\x20context:%s\x20exten:%s','context','format','YYYY-MM-DD\x20HH:mm:ss','disposition','toNumber','keys','from-sip','channel','split','destconnectedlinenum','exten','accountcode','user:%s','name','user:agentconnect','[%s][voiceCallReport][newexten]\x20event:','linkedid','application','applicationdata','appdata','toLowerCase','starttime','duration','seconds','includes','lastapplication','startsWith','cdr(','match','[%s][voiceCallReport][newexten]','syncNewState','channelstate','answered','answertime','diff','xcally-motion-preview','connectedlinenum','connectedlinename','UserId','membername','monitor','.wav49','replace','.WAV','monitorFilename','find','monitors','isNil','push','rec','[%s][voiceCallReport][mixMonitorFilename]','[%s][voiceCallReport][varset]\x20event:','variable','mixmonitor_filename','value','syncMixMonitorFilename','xmd-phone','[%s][voiceCallReport][varset]\x20variable:xmd-phone\x20value:%s','[%s][voiceCallReport][varset]\x20variable:xmd-callerid\x20value:%s','callerid','xmd-cdrtype','[%s][voiceCallReport][varset]\x20variable:xmd-cdrtype\x20value:%s','xmd-queue','[%s][voiceCallReport][varset]\x20variable:xmd-queue\x20value:%s','xmd-originatecalleridnum','[%s][voiceCallReport][varset]\x20variable:xmd-originatecalleridnum\x20value:%s','[%s][voiceCallReport][varset]\x20variable:xmd-destination\x20value:%s','destination','[%s][voiceCallReport][varset]\x20variable:xmd-callerid-preview\x20value:%s','calleridpreview','xmcs-queue','[%s][voiceCallReport][varset]\x20variable:xmcs-queue\x20value:%s','sipcallid','[%s][voiceCallReport][varset]\x20variable:sipcallid\x20value:%s','[%s][voiceCallReport][varset]\x20variable:mixmonitor_filename\x20value:%s','syncHangup','[%s][voiceCallReport][hangup]\x20event:','[%s][voiceCallReport][hangup]\x20reason:%s','billableseconds','holdtime','omit','[%s][voiceCallReport][hangup]\x20sending\x20user:agentcomplete\x20event:','user:agentcomplete','resolve','transferType','getSettings','then','Action','StopMixMonitor','destinationchannel','catch','finally','webbar:stopmonitors','event','BlindTransfer','type','[%s][voiceCallReport][hangup]\x20sending\x20hangup\x20event:','custom:voiceCallReport','[%s][voiceCallReport][attendedtransfer]\x20transfercalleridnum:%s\x20transferconnectedlinenum:%s','origtransferercalleridnum','transfertargetcalleridnum','[%s][voiceCallReport][attendedtransfer]\x20event:','transfereeuniqueid','transfercalleridnum','transferconnectedlinenum','secondtransfereruniqueid','transfertargetuniqueid','origtransfereruniqueid','some','origtransfererlinkedid','outbound','routeid','ATTENDED','[%s][voiceCallReport][attendedtransfer]','[%s][voiceCallReport][blindtransfer]\x20transfercalleridnum:%s\x20transferconnectedlinenum:%s','transfereecalleridnum','extension','BLIND','transfererchannel','transfereruniqueid','[%s][voiceCallReport][blindtransfer]','[%s][voiceCallReport][musiconholdstart]\x20event:','mohstarttime','[%s][voiceCallReport][musiconholdstart]\x20mohstarttime:%s','[%s][voiceCallReport][musiconholdstop]\x20event:','mohtime','milliseconds','[%s][voiceCallReport][musiconholdstop]\x20mohtime:%s','exports','bluebird','lodash','moment','util','ioredis','../../../config/environment','../../../config/logger','ami','../model/channel','../rpc/setting','unknown','not_inuse','inuse','busy','unavailable','ringing','onhold','set','queue','agi','dial','playback','voicemail','FAILED','NO\x20ANSWER','ANSWERED','BUSY','redis','localhost','socket.io-emitter','channels','agents','blindTransfers','syncNewExten','bind','newexten','newchannel','newstate','varset','syncVarSet','hangup','newcallerid','syncNewCallerId','attendedtransfer','syncAttendedTransfer','syncBlindTransfer','musiconholdstart','syncMusicOnHoldStart','musiconholdstop','syncMusicOnHoldStop','[voiceCallReport][coreshowchannels]\x20started','actionCoreShowChannels','error'];(function(_0xb7e087,_0x449a56){var _0xed959=function(_0x70caf7){while(--_0x70caf7){_0xb7e087['push'](_0xb7e087['shift']());}};_0xed959(++_0x449a56);}(_0x9957,0x93));var _0x7995=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0x9957[_0x501510];return _0x1e6ee5;};'use strict';var BPromise=require(_0x7995('0x0'));var _=require(_0x7995('0x1'));var moment=require(_0x7995('0x2'));var util=require(_0x7995('0x3'));var path=require('path');var Redis=require(_0x7995('0x4'));var config=require(_0x7995('0x5'));var logger=require(_0x7995('0x6'))(_0x7995('0x7'));var ami=require('../ami');var Channel=require(_0x7995('0x8'));var RpcSetting=require(_0x7995('0x9'));var statusDesc=[_0x7995('0xa'),_0x7995('0xb'),_0x7995('0xc'),_0x7995('0xd'),'invalid',_0x7995('0xe'),_0x7995('0xf'),'ringinuse',_0x7995('0x10')];var applications=[_0x7995('0x11'),_0x7995('0x12'),_0x7995('0x13'),_0x7995('0x14'),_0x7995('0x15'),_0x7995('0x16')];var dispositions=['NO\x20ANSWER',_0x7995('0x17'),_0x7995('0x17'),'NO\x20ANSWER',_0x7995('0x18'),_0x7995('0x18'),_0x7995('0x19'),_0x7995('0x1a'),_0x7995('0x17'),_0x7995('0x17'),_0x7995('0x17')];var actions={};config['redis']=_['defaults'](config[_0x7995('0x1b')],{'host':_0x7995('0x1c'),'port':0x18eb});var io=require(_0x7995('0x1d'))(new Redis(config[_0x7995('0x1b')]));function VoiceCallReport(_0x3f1d3e){this[_0x7995('0x1e')]=_0x3f1d3e[_0x7995('0x1e')];this[_0x7995('0x1f')]=_0x3f1d3e['agents'];this[_0x7995('0x20')]={};ami['on']('coreshowchannel',this[_0x7995('0x21')][_0x7995('0x22')](this));ami['on'](_0x7995('0x23'),this[_0x7995('0x21')][_0x7995('0x22')](this));ami['on'](_0x7995('0x24'),this['syncNewChannel']['bind'](this));ami['on'](_0x7995('0x25'),this['syncNewState']['bind'](this));ami['on'](_0x7995('0x26'),this[_0x7995('0x27')]['bind'](this));ami['on'](_0x7995('0x28'),this['syncHangup']['bind'](this));ami['on'](_0x7995('0x29'),this[_0x7995('0x2a')][_0x7995('0x22')](this));ami['on'](_0x7995('0x2b'),this[_0x7995('0x2c')][_0x7995('0x22')](this));ami['on']('blindtransfer',this[_0x7995('0x2d')][_0x7995('0x22')](this));ami['on'](_0x7995('0x2e'),this[_0x7995('0x2f')][_0x7995('0x22')](this));ami['on'](_0x7995('0x30'),this[_0x7995('0x31')][_0x7995('0x22')](this));try{logger['info'](_0x7995('0x32'));ami[_0x7995('0x33')]();}catch(_0x401dc3){logger[_0x7995('0x34')](_0x7995('0x35'),util[_0x7995('0x36')](_0x401dc3,{'showHidden':![],'depth':null}));}}VoiceCallReport['prototype'][_0x7995('0x37')]=function(_0x5911c3){return _0x5911c3!==null&&!_[_0x7995('0x38')](_0x5911c3);};VoiceCallReport[_0x7995('0x39')][_0x7995('0x3a')]=function(_0x132a42,_0x11c1eb,_0x4b6f99){io['to'](_0x132a42)[_0x7995('0x3a')](_0x11c1eb,_0x4b6f99);};VoiceCallReport['prototype'][_0x7995('0x2a')]=function(_0x3250e0){try{if(this[_0x7995('0x37')](_0x3250e0)){logger['info']('[%s][voiceCallReport][newcallerid]\x20calleridname:%s\x20calleridnum:%s',_0x3250e0['uniqueid'],_0x3250e0[_0x7995('0x3b')],_0x3250e0[_0x7995('0x3c')]);logger[_0x7995('0x3d')](_0x7995('0x3e'),_0x3250e0[_0x7995('0x3f')],util[_0x7995('0x36')](_0x3250e0,{'showHidden':![],'depth':null}));if(_0x3250e0['uniqueid']===_0x3250e0['linkedid']){if(!_[_0x7995('0x38')](this['channels'][_0x3250e0[_0x7995('0x3f')]])){_[_0x7995('0x40')](this[_0x7995('0x1e')][_0x3250e0[_0x7995('0x3f')]],_[_0x7995('0x41')](_0x3250e0,_['keys'](this[_0x7995('0x1e')][_0x3250e0[_0x7995('0x3f')]])));}}}}catch(_0x5dd802){logger['error']('[%s][voiceCallReport][newcallerid]',_0x3250e0[_0x7995('0x3f')],util[_0x7995('0x36')](_0x5dd802,{'showHidden':![],'depth':null}));}};VoiceCallReport['prototype'][_0x7995('0x42')]=function(_0x51b95d){try{if(this[_0x7995('0x37')](_0x51b95d)){logger[_0x7995('0x3d')](_0x7995('0x43'),_0x51b95d['uniqueid'],util['inspect'](_0x51b95d,{'showHidden':![],'depth':null}));if(_0x51b95d[_0x7995('0x3f')]===_0x51b95d['linkedid']&&_0x51b95d['channel']!=_0x7995('0x44')){if(_[_0x7995('0x38')](this['channels'][_0x51b95d[_0x7995('0x3f')]])){logger[_0x7995('0x45')](_0x7995('0x46'),_0x51b95d[_0x7995('0x3f')],_0x51b95d[_0x7995('0x47')],_0x51b95d['exten']);this[_0x7995('0x1e')][_0x51b95d[_0x7995('0x3f')]]=new Channel();this[_0x7995('0x1e')][_0x51b95d[_0x7995('0x3f')]]['starttime']=moment()[_0x7995('0x48')](_0x7995('0x49'));this[_0x7995('0x1e')][_0x51b95d[_0x7995('0x3f')]][_0x7995('0x4a')]=dispositions[_[_0x7995('0x4b')](_0x51b95d['channelstate'])];_[_0x7995('0x40')](this[_0x7995('0x1e')][_0x51b95d[_0x7995('0x3f')]],_[_0x7995('0x41')](_0x51b95d,_[_0x7995('0x4c')](this[_0x7995('0x1e')][_0x51b95d[_0x7995('0x3f')]])));if(_0x51b95d[_0x7995('0x47')]===_0x7995('0x4d')){if(this[_0x7995('0x1f')][_0x51b95d[_0x7995('0x4e')][_0x7995('0x4f')]('-')[0x0]]){this[_0x7995('0x1f')][_0x51b95d['channel']['split']('-')[0x0]][_0x7995('0x50')]=_0x51b95d[_0x7995('0x51')];logger['debug']('[%s][voiceCallReport][newchannel]\x20sending\x20user:agentconnect\x20event:',_0x51b95d[_0x7995('0x3f')],util['inspect']({'destaccountcode':this['agents'][_0x51b95d[_0x7995('0x4e')][_0x7995('0x4f')]('-')[0x0]][_0x7995('0x52')],'destconnectedlinenum':_0x51b95d['exten']},{'showHidden':![],'depth':null}));this[_0x7995('0x3a')](util['format'](_0x7995('0x53'),this['agents'][_0x51b95d['channel'][_0x7995('0x4f')]('-')[0x0]][_0x7995('0x54')]),_0x7995('0x55'),{'destaccountcode':this[_0x7995('0x1f')][_0x51b95d['channel'][_0x7995('0x4f')]('-')[0x0]][_0x7995('0x52')],'destconnectedlinenum':_0x51b95d[_0x7995('0x51')]});}}}}}}catch(_0x6c7bec){logger['error']('[%s][voiceCallReport][newchannel]',_0x51b95d[_0x7995('0x3f')],util['inspect'](_0x6c7bec,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7995('0x39')]['syncNewExten']=function(_0x2f435e){try{if(this['isNotNull'](_0x2f435e)){logger[_0x7995('0x3d')](_0x7995('0x56'),_0x2f435e['uniqueid'],util[_0x7995('0x36')](_0x2f435e,{'showHidden':![],'depth':null}));if(_0x2f435e[_0x7995('0x3f')]===_0x2f435e[_0x7995('0x57')]&&_0x2f435e[_0x7995('0x51')]!='h'&&_0x2f435e['channel']!=_0x7995('0x44')){_0x2f435e[_0x7995('0x58')]=_0x2f435e[_0x7995('0x58')]['toLowerCase']();_0x2f435e[_0x7995('0x59')]=(_0x2f435e[_0x7995('0x5a')]||_0x2f435e[_0x7995('0x59')])[_0x7995('0x5b')]();logger[_0x7995('0x45')]('[%s][voiceCallReport][newexten]\x20application:%s\x20appdata:%s',_0x2f435e[_0x7995('0x3f')],_0x2f435e[_0x7995('0x58')],_0x2f435e['applicationdata']);if(_[_0x7995('0x38')](this['channels'][_0x2f435e[_0x7995('0x3f')]])){this[_0x7995('0x1e')][_0x2f435e[_0x7995('0x3f')]]=new Channel();this[_0x7995('0x1e')][_0x2f435e[_0x7995('0x3f')]][_0x7995('0x5c')]=_0x2f435e[_0x7995('0x5d')]?moment()['subtract'](moment[_0x7995('0x5d')](_0x2f435e[_0x7995('0x5d')])[_0x7995('0x5e')](),'seconds')[_0x7995('0x48')](_0x7995('0x49')):moment()[_0x7995('0x48')]('YYYY-MM-DD\x20HH:mm:ss');this['channels'][_0x2f435e['uniqueid']][_0x7995('0x4a')]=_0x7995('0x18');}_['merge'](this[_0x7995('0x1e')][_0x2f435e[_0x7995('0x3f')]],_[_0x7995('0x41')](_0x2f435e,_[_0x7995('0x4c')](this[_0x7995('0x1e')][_0x2f435e['uniqueid']])));if(_[_0x7995('0x5f')](applications,_0x2f435e['application'])){this[_0x7995('0x1e')][_0x2f435e[_0x7995('0x3f')]][_0x7995('0x60')]=_0x2f435e['application'];this['channels'][_0x2f435e['uniqueid']]['lastdata']=_0x2f435e[_0x7995('0x59')];if(_0x2f435e[_0x7995('0x58')]===_0x7995('0x11')&&_[_0x7995('0x61')](_0x2f435e[_0x7995('0x59')],_0x7995('0x62'))){var _0x1f4270=_0x2f435e[_0x7995('0x59')][_0x7995('0x4f')]('=');var _0x17ecd3=_0x1f4270[0x0][_0x7995('0x63')](/cdr\((.*)\)/);if(_0x17ecd3){this[_0x7995('0x1e')][_0x2f435e[_0x7995('0x3f')]][_0x17ecd3[0x1]]=_0x1f4270[0x1];}}else if(_0x2f435e[_0x7995('0x58')]===_0x7995('0x12')){this[_0x7995('0x1e')][_0x2f435e[_0x7995('0x3f')]][_0x7995('0x12')]=_0x2f435e[_0x7995('0x59')]['split'](',')[0x0];}}}}}catch(_0x56a374){logger[_0x7995('0x34')](_0x7995('0x64'),_0x2f435e[_0x7995('0x3f')],util['inspect'](_0x56a374,{'showHidden':![],'depth':null}));}};VoiceCallReport['prototype'][_0x7995('0x65')]=function(_0x197b52){try{if(this[_0x7995('0x37')](_0x197b52)){logger[_0x7995('0x45')]('[%s][voiceCallReport][newstate]\x20linkedid:%s\x20calleridname:%s\x20calleridnum:%s',_0x197b52[_0x7995('0x3f')],_0x197b52[_0x7995('0x57')],_0x197b52[_0x7995('0x3b')],_0x197b52[_0x7995('0x3c')]);logger['debug']('[%s][voiceCallReport][newstate]\x20event:',_0x197b52[_0x7995('0x3f')],util[_0x7995('0x36')](_0x197b52,{'showHidden':![],'depth':null}));if(_0x197b52[_0x7995('0x3f')]!==_0x197b52[_0x7995('0x57')]){if(this[_0x7995('0x1e')][_0x197b52[_0x7995('0x57')]]){if(_0x197b52[_0x7995('0x66')]==='6'){if(!this[_0x7995('0x1e')][_0x197b52[_0x7995('0x57')]]['answered']){var _0x18f230=moment();this[_0x7995('0x1e')][_0x197b52[_0x7995('0x57')]][_0x7995('0x67')]=!![];this['channels'][_0x197b52['linkedid']][_0x7995('0x68')]=_0x18f230[_0x7995('0x48')]('YYYY-MM-DD\x20HH:mm:ss');if(this[_0x7995('0x1e')][_0x197b52[_0x7995('0x57')]][_0x7995('0x5c')]){this[_0x7995('0x1e')][_0x197b52[_0x7995('0x57')]]['holdtime']=_0x18f230[_0x7995('0x69')](this['channels'][_0x197b52[_0x7995('0x57')]][_0x7995('0x5c')],_0x7995('0x5e'));}}this[_0x7995('0x1e')][_0x197b52[_0x7995('0x57')]][_0x7995('0x57')]=_0x197b52[_0x7995('0x3f')];if(_0x197b52[_0x7995('0x3c')]!==_0x7995('0x6a')){this[_0x7995('0x1e')][_0x197b52[_0x7995('0x57')]][_0x7995('0x6b')]=_0x197b52['calleridnum'];}this[_0x7995('0x1e')][_0x197b52[_0x7995('0x57')]][_0x7995('0x6c')]=_0x197b52[_0x7995('0x3b')];this[_0x7995('0x1e')][_0x197b52['linkedid']]['destinationchannel']=_0x197b52[_0x7995('0x4e')];this[_0x7995('0x1e')][_0x197b52[_0x7995('0x57')]][_0x7995('0x4a')]=dispositions[_['toNumber'](_0x197b52[_0x7995('0x66')])];if(this['agents'][_0x197b52['channel'][_0x7995('0x4f')]('-')[0x0]]){this[_0x7995('0x1e')][_0x197b52[_0x7995('0x57')]][_0x7995('0x6d')]=this[_0x7995('0x1f')][_0x197b52[_0x7995('0x4e')][_0x7995('0x4f')]('-')[0x0]]['id'];this[_0x7995('0x1e')][_0x197b52[_0x7995('0x57')]][_0x7995('0x6e')]=this['agents'][_0x197b52[_0x7995('0x4e')][_0x7995('0x4f')]('-')[0x0]][_0x7995('0x54')];}}}}else{if(this['channels'][_0x197b52[_0x7995('0x3f')]]){if(_0x197b52[_0x7995('0x66')]==='6'){if(this[_0x7995('0x1f')][_0x197b52[_0x7995('0x4e')][_0x7995('0x4f')]('-')[0x0]]){this[_0x7995('0x1e')][_0x197b52[_0x7995('0x3f')]][_0x7995('0x6d')]=this[_0x7995('0x1f')][_0x197b52[_0x7995('0x4e')][_0x7995('0x4f')]('-')[0x0]]['id'];this['channels'][_0x197b52['uniqueid']][_0x7995('0x6e')]=this[_0x7995('0x1f')][_0x197b52[_0x7995('0x4e')][_0x7995('0x4f')]('-')[0x0]]['name'];}}}}}}catch(_0x3b45e8){logger[_0x7995('0x34')]('[%s][voiceCallReport][newstate]',_0x197b52['uniqueid'],util[_0x7995('0x36')](_0x3b45e8,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7995('0x39')]['syncMixMonitorFilename']=function(_0x228de1,_0x5b1cba){try{if(this[_0x7995('0x1e')][_0x228de1]){logger[_0x7995('0x45')]('[%s][voiceCallReport][mixMonitorFilename]\x20monitorFilename:%s',_0x228de1,_0x5b1cba);this['channels'][_0x228de1][_0x7995('0x6f')]=!![];if(_['endsWith'](_0x5b1cba,_0x7995('0x70'))){_0x5b1cba=_0x5b1cba[_0x7995('0x71')](_0x7995('0x70'),_0x7995('0x72'));}this[_0x7995('0x1e')][_0x228de1][_0x7995('0x73')]=_0x5b1cba;var _0x8af865=_[_0x7995('0x74')](this[_0x7995('0x1e')][_0x228de1][_0x7995('0x75')],{'filename':_0x5b1cba});if(_[_0x7995('0x76')](_0x8af865)){this[_0x7995('0x1e')][_0x228de1][_0x7995('0x75')][_0x7995('0x77')]({'filename':_0x5b1cba,'createdAt':moment()[_0x7995('0x48')](_0x7995('0x49')),'mixmonitorid':'','status':_0x7995('0x78')});}}}catch(_0x251490){logger[_0x7995('0x34')](_0x7995('0x79'),_0x228de1,util[_0x7995('0x36')](_0x251490,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7995('0x39')][_0x7995('0x27')]=function(_0x280fbb){try{if(this[_0x7995('0x37')](_0x280fbb)){logger[_0x7995('0x3d')](_0x7995('0x7a'),_0x280fbb[_0x7995('0x3f')],util['inspect'](_0x280fbb,{'showHidden':![],'depth':null}));if(this[_0x7995('0x1e')][_0x280fbb[_0x7995('0x3f')]]&&_0x280fbb['channel']!='OutgoingSpoolFailed'){if(this[_0x7995('0x37')](_0x280fbb[_0x7995('0x7b')])){if(this[_0x7995('0x37')](_0x280fbb[_0x7995('0x7b')][_0x7995('0x7c')])){logger[_0x7995('0x45')]('[%s][voiceCallReport][varset]\x20variable:mixmonitor_filename\x20value:%s',_0x280fbb[_0x7995('0x3f')],_0x280fbb[_0x7995('0x7d')]);this[_0x7995('0x7e')](_0x280fbb[_0x7995('0x3f')],_0x280fbb[_0x7995('0x7d')]);}else if(this[_0x7995('0x37')](_0x280fbb[_0x7995('0x7b')][_0x7995('0x7f')])){logger['info'](_0x7995('0x80'),_0x280fbb[_0x7995('0x3f')],_0x280fbb['value']);this['channels'][_0x280fbb[_0x7995('0x3f')]][_0x7995('0x3c')]=_0x280fbb[_0x7995('0x7d')];}else if(this[_0x7995('0x37')](_0x280fbb[_0x7995('0x7b')]['xmd-callerid'])){logger[_0x7995('0x45')](_0x7995('0x81'),_0x280fbb['uniqueid'],_0x280fbb[_0x7995('0x7d')]);this[_0x7995('0x1e')][_0x280fbb['uniqueid']][_0x7995('0x82')]=_0x280fbb['value'];}else if(this[_0x7995('0x37')](_0x280fbb[_0x7995('0x7b')][_0x7995('0x83')])){logger[_0x7995('0x45')](_0x7995('0x84'),_0x280fbb['uniqueid'],_0x280fbb[_0x7995('0x7d')]);this[_0x7995('0x1e')][_0x280fbb[_0x7995('0x3f')]]['type']=_0x280fbb[_0x7995('0x7d')];}else if(this[_0x7995('0x37')](_0x280fbb[_0x7995('0x7b')][_0x7995('0x85')])){logger['info'](_0x7995('0x86'),_0x280fbb[_0x7995('0x3f')],_0x280fbb[_0x7995('0x7d')]['split'](',')[0x0]);this['channels'][_0x280fbb[_0x7995('0x3f')]][_0x7995('0x12')]=_0x280fbb['value']['split'](',')[0x0];}else if(this[_0x7995('0x37')](_0x280fbb[_0x7995('0x7b')][_0x7995('0x87')])){logger[_0x7995('0x45')](_0x7995('0x88'),_0x280fbb['uniqueid'],_0x280fbb['value']);this[_0x7995('0x1e')][_0x280fbb['uniqueid']]['originatecalleridnum']=_0x280fbb[_0x7995('0x7d')];}else if(this[_0x7995('0x37')](_0x280fbb[_0x7995('0x7b')]['xmd-destination'])){logger[_0x7995('0x45')](_0x7995('0x89'),_0x280fbb[_0x7995('0x3f')],_0x280fbb[_0x7995('0x7d')]);this[_0x7995('0x1e')][_0x280fbb['uniqueid']][_0x7995('0x8a')]=_0x280fbb[_0x7995('0x7d')];}else if(this[_0x7995('0x37')](_0x280fbb[_0x7995('0x7b')]['xmd-callerid-preview'])){logger[_0x7995('0x45')](_0x7995('0x8b'),_0x280fbb['uniqueid'],_0x280fbb[_0x7995('0x7d')]);this[_0x7995('0x1e')][_0x280fbb['uniqueid']][_0x7995('0x8c')]=_0x280fbb['value'];}else if(this[_0x7995('0x37')](_0x280fbb['variable'][_0x7995('0x8d')])){logger['info'](_0x7995('0x8e'),_0x280fbb[_0x7995('0x3f')],_0x280fbb['value']);this[_0x7995('0x1e')][_0x280fbb['uniqueid']]['queue']=_0x280fbb[_0x7995('0x7d')];}else if(this[_0x7995('0x37')](_0x280fbb[_0x7995('0x7b')][_0x7995('0x8f')])){logger['info'](_0x7995('0x90'),_0x280fbb[_0x7995('0x3f')],_0x280fbb['value']);this['channels'][_0x280fbb[_0x7995('0x3f')]]['sipcalluniqueid']=_0x280fbb[_0x7995('0x7d')];}}}else if(this[_0x7995('0x37')](_0x280fbb[_0x7995('0x7b')]['mixmonitor_filename'])){if(_0x280fbb['value']){var _0x2b7852=path['parse'](_0x280fbb[_0x7995('0x7d')])[_0x7995('0x54')];logger[_0x7995('0x45')](_0x7995('0x91'),_0x2b7852,_0x280fbb['value']);this['syncMixMonitorFilename'](_0x2b7852,_0x280fbb['value']);}}else if(this[_0x7995('0x1e')][_0x280fbb[_0x7995('0x57')]]){if(this[_0x7995('0x37')](_0x280fbb[_0x7995('0x7b')])){if(this[_0x7995('0x37')](_0x280fbb[_0x7995('0x7b')]['sipcallid'])){logger['info'](_0x7995('0x90'),_0x280fbb['linkedid'],_0x280fbb['value']);this[_0x7995('0x1e')][_0x280fbb['linkedid']]['sipcalllinkedid']=_0x280fbb[_0x7995('0x7d')];}}}}}catch(_0x3541d7){logger[_0x7995('0x34')]('[%s][voiceCallReport][varset]',_0x280fbb[_0x7995('0x3f')],util[_0x7995('0x36')](_0x3541d7,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7995('0x39')][_0x7995('0x92')]=function(_0x227372){try{if(this[_0x7995('0x37')](_0x227372)){logger[_0x7995('0x3d')](_0x7995('0x93'),_0x227372[_0x7995('0x3f')],util['inspect'](_0x227372,{'showHidden':![],'depth':null}));if(this[_0x7995('0x1e')][_0x227372[_0x7995('0x3f')]]){logger[_0x7995('0x45')](_0x7995('0x94'),_0x227372[_0x7995('0x3f')],_0x227372['cause-txt']);var _0x1ea316=moment();this[_0x7995('0x1e')][_0x227372[_0x7995('0x3f')]]['endtime']=_0x1ea316['format']('YYYY-MM-DD\x20HH:mm:ss');this[_0x7995('0x1e')][_0x227372[_0x7995('0x3f')]][_0x7995('0x5d')]=_0x1ea316[_0x7995('0x69')](this[_0x7995('0x1e')][_0x227372[_0x7995('0x3f')]]['starttime'],_0x7995('0x5e'));if(this['channels'][_0x227372[_0x7995('0x3f')]][_0x7995('0x67')]){this[_0x7995('0x1e')][_0x227372[_0x7995('0x3f')]][_0x7995('0x95')]=_0x1ea316[_0x7995('0x69')](this[_0x7995('0x1e')][_0x227372[_0x7995('0x3f')]][_0x7995('0x68')],_0x7995('0x5e'));this[_0x7995('0x1e')][_0x227372['uniqueid']][_0x7995('0x96')]=this['channels'][_0x227372[_0x7995('0x3f')]][_0x7995('0x5d')]-this['channels'][_0x227372['uniqueid']][_0x7995('0x95')];}if(_0x227372[_0x7995('0x47')]===_0x7995('0x4d')){if(this[_0x7995('0x1f')][_0x227372[_0x7995('0x4e')][_0x7995('0x4f')]('-')[0x0]]){this[_0x7995('0x1f')][_0x227372[_0x7995('0x4e')][_0x7995('0x4f')]('-')[0x0]]=_[_0x7995('0x97')](this[_0x7995('0x1f')][_0x227372[_0x7995('0x4e')]['split']('-')[0x0]],['destconnectedlinenum']);logger[_0x7995('0x3d')](_0x7995('0x98'),_0x227372[_0x7995('0x3f')],util[_0x7995('0x36')]({'destaccountcode':this[_0x7995('0x1f')][_0x227372['channel'][_0x7995('0x4f')]('-')[0x0]][_0x7995('0x52')]},{'showHidden':![],'depth':null}));this['emit'](util[_0x7995('0x48')]('user:%s',this[_0x7995('0x1f')][_0x227372[_0x7995('0x4e')][_0x7995('0x4f')]('-')[0x0]]['name']),_0x7995('0x99'),{'destaccountcode':this[_0x7995('0x1f')][_0x227372[_0x7995('0x4e')][_0x7995('0x4f')]('-')[0x0]][_0x7995('0x52')]});}}var _0x8a5aa8=this;Promise[_0x7995('0x9a')]()['then'](function(){var _0x4c0a67=_0x8a5aa8['channels'][_0x227372[_0x7995('0x3f')]];if(typeof _0x4c0a67[_0x7995('0x9b')]==='undefined')return;if(_['isEmpty'](_0x4c0a67[_0x7995('0x75')]))return;return RpcSetting[_0x7995('0x9c')]()['then'](function(_0x4b07de){if(!_0x4b07de['stopRecordingOnTransfer'])return;return Promise['resolve']()[_0x7995('0x9d')](function(){return ami[_0x7995('0x9e')]({'action':_0x7995('0x9f'),'channel':_0x4c0a67[_0x7995('0x4e')]})['catch'](function(){});})[_0x7995('0x9d')](function(){return ami[_0x7995('0x9e')]({'action':'StopMixMonitor','channel':_0x4c0a67[_0x7995('0xa0')]})[_0x7995('0xa1')](function(){})[_0x7995('0xa2')](function(){var _0x580917=_0x8a5aa8[_0x7995('0x1f')][_0x4c0a67[_0x7995('0xa0')]['split']('-')[0x0]];if(!_0x580917)return;io[_0x7995('0x3a')](_0x7995('0xa3'),{'agentId':_0x580917['id'],'uniqueid':_0x4c0a67[_0x7995('0x3f')]});});});});})[_0x7995('0x9d')](function(){if(_0x227372[_0x7995('0xa4')]===_0x7995('0xa5')){_0x8a5aa8[_0x7995('0x20')][_0x227372[_0x7995('0x3f')]]=_0x8a5aa8[_0x7995('0x1e')][_0x227372[_0x7995('0x3f')]];}else{if(_0x8a5aa8[_0x7995('0x1e')][_0x227372[_0x7995('0x3f')]][_0x7995('0xa6')]==='outbound'&&_0x8a5aa8[_0x7995('0x20')][_0x227372[_0x7995('0x3f')]]){_0x8a5aa8[_0x7995('0x1e')][_0x227372[_0x7995('0x3f')]]['uniqueid']=[_0x8a5aa8[_0x7995('0x1e')][_0x227372[_0x7995('0x3f')]][_0x7995('0x57')],_0x8a5aa8['channels'][_0x227372[_0x7995('0x3f')]][_0x7995('0x57')]=_0x8a5aa8[_0x7995('0x1e')][_0x227372[_0x7995('0x3f')]][_0x7995('0x3f')]][0x0];delete _0x8a5aa8[_0x7995('0x20')][_0x227372[_0x7995('0x3f')]];}}logger['debug'](_0x7995('0xa7'),_0x227372['uniqueid'],util[_0x7995('0x36')](_0x8a5aa8[_0x7995('0x1e')][_0x227372[_0x7995('0x3f')]],{'showHidden':![],'depth':null}));ami['emit'](_0x7995('0xa8'),_0x8a5aa8['channels'][_0x227372['uniqueid']]);delete _0x8a5aa8['channels'][_0x227372['uniqueid']];});}}}catch(_0x31cbe6){logger[_0x7995('0x34')]('[%s][voiceCallReport][hangup]',_0x227372[_0x7995('0x3f')],util[_0x7995('0x36')](_0x31cbe6,{'showHidden':![],'depth':null}));}};VoiceCallReport['prototype'][_0x7995('0x2c')]=function(_0xb80394){try{if(this[_0x7995('0x37')](_0xb80394)){logger[_0x7995('0x45')](_0x7995('0xa9'),_0xb80394['uniqueid'],_0xb80394[_0x7995('0xaa')],_0xb80394[_0x7995('0xab')]);logger[_0x7995('0x3d')](_0x7995('0xac'),_0xb80394['uniqueid'],util[_0x7995('0x36')](_0xb80394,{'showHidden':![],'depth':null}));if(this[_0x7995('0x1e')][_0xb80394[_0x7995('0xad')]]){this[_0x7995('0x1e')][_0xb80394[_0x7995('0xad')]][_0x7995('0xae')]=_0xb80394[_0x7995('0xaa')];this[_0x7995('0x1e')][_0xb80394[_0x7995('0xad')]][_0x7995('0xaf')]=_0xb80394['transfertargetcalleridnum'];if(this[_0x7995('0x1e')][_0xb80394['secondtransfereruniqueid']]){var _0x139204=this[_0x7995('0x1e')][_0xb80394[_0x7995('0xb0')]];this['channels'][_0xb80394['secondtransfereruniqueid']]=this[_0x7995('0x1e')][_0xb80394[_0x7995('0xad')]];this['channels'][_0xb80394[_0x7995('0xad')]]=_0x139204;}}else if(this['channels'][_0xb80394[_0x7995('0xb1')]]){this[_0x7995('0x1e')][_0xb80394[_0x7995('0xb1')]][_0x7995('0xae')]=_0xb80394['origtransferercalleridnum'];this['channels'][_0xb80394[_0x7995('0xb1')]][_0x7995('0xaf')]=_0xb80394[_0x7995('0xab')];if(this[_0x7995('0x1e')][_0xb80394['origtransfereruniqueid']]){var _0x139204=this[_0x7995('0x1e')][_0xb80394[_0x7995('0xb2')]];this[_0x7995('0x1e')][_0xb80394[_0x7995('0xb2')]]=this['channels'][_0xb80394['transfertargetuniqueid']];this['channels'][_0xb80394[_0x7995('0xb1')]]=_0x139204;}}if((this[_0x7995('0x1e')][_0xb80394['origtransfereruniqueid']]||this[_0x7995('0x1e')][_0xb80394['origtransfererlinkedid']])&&this[_0x7995('0x1e')][_0xb80394[_0x7995('0xb0')]]){var _0x1e7398=_[_0x7995('0xb3')]([this['channels'][_0xb80394[_0x7995('0xb2')]],this[_0x7995('0x1e')][_0xb80394[_0x7995('0xb4')]],this[_0x7995('0x1e')][_0xb80394[_0x7995('0xb0')]]],function(_0x197adc){return _0x197adc&&_0x197adc[_0x7995('0xa6')]===_0x7995('0xb5')&&_0x197adc[_0x7995('0xb6')];});if(_0x1e7398){if(this[_0x7995('0x1e')][_0xb80394[_0x7995('0xb2')]])this[_0x7995('0x1e')][_0xb80394[_0x7995('0xb2')]][_0x7995('0x9b')]='ATTENDED';if(this[_0x7995('0x1e')][_0xb80394['origtransfererlinkedid']])this[_0x7995('0x1e')][_0xb80394[_0x7995('0xb4')]]['transferType']=_0x7995('0xb7');this['channels'][_0xb80394[_0x7995('0xb0')]][_0x7995('0x9b')]='ATTENDED';}}}}catch(_0x4985f3){logger['error'](_0x7995('0xb8'),_0xb80394[_0x7995('0x3f')],util[_0x7995('0x36')](_0x4985f3,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7995('0x39')]['syncBlindTransfer']=function(_0x1ce3ff){try{if(this[_0x7995('0x37')](_0x1ce3ff)){logger[_0x7995('0x45')](_0x7995('0xb9'),_0x1ce3ff[_0x7995('0x3f')],_0x1ce3ff[_0x7995('0xba')],_0x1ce3ff[_0x7995('0xbb')]);logger[_0x7995('0x3d')]('[%s][voiceCallReport][blindtransfer]\x20event:',_0x1ce3ff[_0x7995('0x3f')],util[_0x7995('0x36')](_0x1ce3ff,{'showHidden':![],'depth':null}));if(this[_0x7995('0x1e')][_0x1ce3ff[_0x7995('0xad')]]){this['channels'][_0x1ce3ff[_0x7995('0xad')]][_0x7995('0xae')]=_0x1ce3ff[_0x7995('0xba')];this[_0x7995('0x1e')][_0x1ce3ff[_0x7995('0xad')]][_0x7995('0xaf')]=_0x1ce3ff['extension'];this[_0x7995('0x1e')][_0x1ce3ff[_0x7995('0xad')]][_0x7995('0x9b')]=_0x7995('0xbc');this[_0x7995('0x92')]({'event':_0x7995('0xa5'),'uniqueid':_0x1ce3ff[_0x7995('0xad')],'context':_0x1ce3ff[_0x7995('0x47')],'channel':_0x1ce3ff[_0x7995('0xbd')]});}else{this[_0x7995('0x1e')][_0x1ce3ff[_0x7995('0xbe')]][_0x7995('0x9b')]=_0x7995('0xbc');}}}catch(_0x789f7a){logger[_0x7995('0x34')](_0x7995('0xbf'),_0x1ce3ff[_0x7995('0x3f')],util[_0x7995('0x36')](_0x789f7a,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7995('0x39')][_0x7995('0x2f')]=function(_0x37e69d){try{if(this['isNotNull'](_0x37e69d)){logger['debug'](_0x7995('0xc0'),_0x37e69d[_0x7995('0x3f')],util['inspect'](_0x37e69d,{'showHidden':![],'depth':null}));if(this[_0x7995('0x1e')][_0x37e69d['uniqueid']]){if(!_[_0x7995('0x76')](this['channels'][_0x37e69d[_0x7995('0x3f')]][_0x7995('0x68')])){this[_0x7995('0x1e')][_0x37e69d[_0x7995('0x3f')]][_0x7995('0xc1')]=moment()[_0x7995('0x48')](_0x7995('0x49'));logger[_0x7995('0x45')](_0x7995('0xc2'),_0x37e69d[_0x7995('0x3f')],this['channels'][_0x37e69d[_0x7995('0x3f')]][_0x7995('0xc1')]);}}}}catch(_0x1d0481){logger[_0x7995('0x34')]('[%s][voiceCallReport][musiconholdstart]',_0x37e69d[_0x7995('0x3f')],util[_0x7995('0x36')](_0x1d0481,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7995('0x39')][_0x7995('0x31')]=function(_0x4d19b8){try{if(this[_0x7995('0x37')](_0x4d19b8)){logger[_0x7995('0x3d')](_0x7995('0xc3'),_0x4d19b8[_0x7995('0x3f')],util[_0x7995('0x36')](_0x4d19b8,{'showHidden':![],'depth':null}));if(this[_0x7995('0x1e')][_0x4d19b8[_0x7995('0x3f')]]){if(!_[_0x7995('0x76')](this[_0x7995('0x1e')][_0x4d19b8['uniqueid']][_0x7995('0xc1')])){this['channels'][_0x4d19b8[_0x7995('0x3f')]][_0x7995('0xc4')]+=moment()[_0x7995('0xc5')](0x0)[_0x7995('0x69')](this['channels'][_0x4d19b8[_0x7995('0x3f')]][_0x7995('0xc1')],_0x7995('0x5e'));logger[_0x7995('0x45')](_0x7995('0xc6'),_0x4d19b8[_0x7995('0x3f')],this[_0x7995('0x1e')][_0x4d19b8[_0x7995('0x3f')]][_0x7995('0xc4')]);delete this[_0x7995('0x1e')][_0x4d19b8[_0x7995('0x3f')]][_0x7995('0xc1')];}}}}catch(_0x7d14e2){logger[_0x7995('0x34')]('[%s][voiceCallReport][musiconholdstop]',_0x4d19b8['uniqueid'],util[_0x7995('0x36')](_0x7d14e2,{'showHidden':![],'depth':null}));}};module[_0x7995('0xc7')]=VoiceCallReport; \ No newline at end of file +var _0x7217=['isNil','mohstarttime','[%s][voiceCallReport][musiconholdstart]\x20mohstarttime:%s','[%s][voiceCallReport][musiconholdstart]','syncMusicOnHoldStop','[%s][voiceCallReport][musiconholdstop]\x20event:','mohtime','milliseconds','[%s][voiceCallReport][musiconholdstop]\x20mohtime:%s','[%s][voiceCallReport][musiconholdstop]','bluebird','moment','util','path','ioredis','../../../config/environment','../ami','../model/channel','../rpc/setting','unknown','not_inuse','inuse','busy','invalid','unavailable','ringing','ringinuse','onhold','set','queue','agi','playback','voicemail','NO\x20ANSWER','FAILED','BUSY','redis','defaults','socket.io-emitter','agents','blindTransfers','coreshowchannel','bind','syncNewExten','newchannel','syncNewChannel','newstate','syncNewState','varset','syncVarSet','hangup','newcallerid','syncNewCallerId','syncAttendedTransfer','blindtransfer','syncBlindTransfer','musiconholdstart','syncMusicOnHoldStart','musiconholdstop','info','[voiceCallReport][coreshowchannels]\x20started','actionCoreShowChannels','error','[voiceCallReport][coreshowchannels]','inspect','prototype','emit','[%s][voiceCallReport][newcallerid]\x20calleridname:%s\x20calleridnum:%s','calleridnum','debug','uniqueid','isUndefined','channels','merge','pick','keys','isNotNull','[%s][voiceCallReport][newchannel]\x20event:','linkedid','channel','[%s][voiceCallReport][newchannel]\x20context:%s\x20exten:%s','context','exten','starttime','format','YYYY-MM-DD\x20HH:mm:ss','disposition','channelstate','from-sip','split','destconnectedlinenum','name','user:agentconnect','[%s][voiceCallReport][newchannel]','OutgoingSpoolFailed','application','applicationdata','toLowerCase','duration','subtract','seconds','lastapplication','lastdata','cdr(','match','[%s][voiceCallReport][newexten]','answered','answertime','holdtime','diff','xcally-motion-preview','connectedlinenum','connectedlinename','calleridname','destinationchannel','toNumber','UserId','membername','[%s][voiceCallReport][newstate]','syncMixMonitorFilename','[%s][voiceCallReport][mixMonitorFilename]\x20monitorFilename:%s','monitor','endsWith','.wav49','.WAV','find','monitors','push','rec','[%s][voiceCallReport][mixMonitorFilename]','[%s][voiceCallReport][varset]\x20event:','variable','mixmonitor_filename','[%s][voiceCallReport][varset]\x20variable:mixmonitor_filename\x20value:%s','value','xmd-phone','[%s][voiceCallReport][varset]\x20variable:xmd-phone\x20value:%s','xmd-callerid','[%s][voiceCallReport][varset]\x20variable:xmd-callerid\x20value:%s','callerid','xmd-queue','[%s][voiceCallReport][varset]\x20variable:xmd-queue\x20value:%s','xmd-originatecalleridnum','[%s][voiceCallReport][varset]\x20variable:xmd-originatecalleridnum\x20value:%s','originatecalleridnum','destination','xmd-callerid-preview','[%s][voiceCallReport][varset]\x20variable:xmd-callerid-preview\x20value:%s','[%s][voiceCallReport][varset]\x20variable:xmcs-queue\x20value:%s','sipcallid','[%s][voiceCallReport][varset]\x20variable:sipcallid\x20value:%s','sipcalluniqueid','parse','sipcalllinkedid','[%s][voiceCallReport][varset]','[%s][voiceCallReport][hangup]\x20event:','[%s][voiceCallReport][hangup]\x20reason:%s','cause-txt','endtime','billableseconds','omit','user:agentcomplete','resolve','then','transferType','undefined','isEmpty','getSettings','StopMixMonitor','Action','catch','webbar:stopmonitors','event','BlindTransfer','type','outbound','[%s][voiceCallReport][hangup]\x20sending\x20hangup\x20event:','custom:voiceCallReport','[%s][voiceCallReport][hangup]','origtransferercalleridnum','transfereeuniqueid','transfercalleridnum','transferconnectedlinenum','transfertargetcalleridnum','secondtransfereruniqueid','transfertargetuniqueid','origtransfereruniqueid','origtransfererlinkedid','some','routeid','ATTENDED','[%s][voiceCallReport][attendedtransfer]','[%s][voiceCallReport][blindtransfer]\x20transfercalleridnum:%s\x20transferconnectedlinenum:%s','transfereecalleridnum','extension','[%s][voiceCallReport][blindtransfer]\x20event:','BLIND','syncHangup','transfererchannel','transfereruniqueid','[%s][voiceCallReport][blindtransfer]','[%s][voiceCallReport][musiconholdstart]\x20event:'];(function(_0x93e61d,_0x1ebcd5){var _0x51e606=function(_0x22bdf3){while(--_0x22bdf3){_0x93e61d['push'](_0x93e61d['shift']());}};_0x51e606(++_0x1ebcd5);}(_0x7217,0x19e));var _0x7721=function(_0x387777,_0x356171){_0x387777=_0x387777-0x0;var _0x3f84c0=_0x7217[_0x387777];return _0x3f84c0;};'use strict';var BPromise=require(_0x7721('0x0'));var _=require('lodash');var moment=require(_0x7721('0x1'));var util=require(_0x7721('0x2'));var path=require(_0x7721('0x3'));var Redis=require(_0x7721('0x4'));var config=require(_0x7721('0x5'));var logger=require('../../../config/logger')('ami');var ami=require(_0x7721('0x6'));var Channel=require(_0x7721('0x7'));var RpcSetting=require(_0x7721('0x8'));var statusDesc=[_0x7721('0x9'),_0x7721('0xa'),_0x7721('0xb'),_0x7721('0xc'),_0x7721('0xd'),_0x7721('0xe'),_0x7721('0xf'),_0x7721('0x10'),_0x7721('0x11')];var applications=[_0x7721('0x12'),_0x7721('0x13'),_0x7721('0x14'),'dial',_0x7721('0x15'),_0x7721('0x16')];var dispositions=[_0x7721('0x17'),_0x7721('0x18'),_0x7721('0x18'),_0x7721('0x17'),_0x7721('0x17'),_0x7721('0x17'),'ANSWERED',_0x7721('0x19'),_0x7721('0x18'),'FAILED',_0x7721('0x18')];var actions={};config[_0x7721('0x1a')]=_[_0x7721('0x1b')](config[_0x7721('0x1a')],{'host':'localhost','port':0x18eb});var io=require(_0x7721('0x1c'))(new Redis(config[_0x7721('0x1a')]));function VoiceCallReport(_0x534f1b){this['channels']=_0x534f1b['channels'];this[_0x7721('0x1d')]=_0x534f1b[_0x7721('0x1d')];this[_0x7721('0x1e')]={};ami['on'](_0x7721('0x1f'),this['syncNewExten'][_0x7721('0x20')](this));ami['on']('newexten',this[_0x7721('0x21')]['bind'](this));ami['on'](_0x7721('0x22'),this[_0x7721('0x23')][_0x7721('0x20')](this));ami['on'](_0x7721('0x24'),this[_0x7721('0x25')][_0x7721('0x20')](this));ami['on'](_0x7721('0x26'),this[_0x7721('0x27')][_0x7721('0x20')](this));ami['on'](_0x7721('0x28'),this['syncHangup'][_0x7721('0x20')](this));ami['on'](_0x7721('0x29'),this[_0x7721('0x2a')][_0x7721('0x20')](this));ami['on']('attendedtransfer',this[_0x7721('0x2b')]['bind'](this));ami['on'](_0x7721('0x2c'),this[_0x7721('0x2d')][_0x7721('0x20')](this));ami['on'](_0x7721('0x2e'),this[_0x7721('0x2f')][_0x7721('0x20')](this));ami['on'](_0x7721('0x30'),this['syncMusicOnHoldStop'][_0x7721('0x20')](this));try{logger[_0x7721('0x31')](_0x7721('0x32'));ami[_0x7721('0x33')]();}catch(_0x40d550){logger[_0x7721('0x34')](_0x7721('0x35'),util[_0x7721('0x36')](_0x40d550,{'showHidden':![],'depth':null}));}}VoiceCallReport[_0x7721('0x37')]['isNotNull']=function(_0x258ddf){return _0x258ddf!==null&&!_['isUndefined'](_0x258ddf);};VoiceCallReport['prototype'][_0x7721('0x38')]=function(_0x343c19,_0x53c904,_0x158d98){io['to'](_0x343c19)[_0x7721('0x38')](_0x53c904,_0x158d98);};VoiceCallReport[_0x7721('0x37')][_0x7721('0x2a')]=function(_0x1da2d8){try{if(this['isNotNull'](_0x1da2d8)){logger[_0x7721('0x31')](_0x7721('0x39'),_0x1da2d8['uniqueid'],_0x1da2d8['calleridname'],_0x1da2d8[_0x7721('0x3a')]);logger[_0x7721('0x3b')]('[%s][voiceCallReport][newcallerid]\x20event:',_0x1da2d8[_0x7721('0x3c')],util[_0x7721('0x36')](_0x1da2d8,{'showHidden':![],'depth':null}));if(_0x1da2d8[_0x7721('0x3c')]===_0x1da2d8['linkedid']){if(!_[_0x7721('0x3d')](this[_0x7721('0x3e')][_0x1da2d8[_0x7721('0x3c')]])){_[_0x7721('0x3f')](this[_0x7721('0x3e')][_0x1da2d8['uniqueid']],_[_0x7721('0x40')](_0x1da2d8,_[_0x7721('0x41')](this[_0x7721('0x3e')][_0x1da2d8['uniqueid']])));}}}}catch(_0x35de7a){logger[_0x7721('0x34')]('[%s][voiceCallReport][newcallerid]',_0x1da2d8[_0x7721('0x3c')],util['inspect'](_0x35de7a,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7721('0x37')][_0x7721('0x23')]=function(_0x19d082){try{if(this[_0x7721('0x42')](_0x19d082)){logger[_0x7721('0x3b')](_0x7721('0x43'),_0x19d082[_0x7721('0x3c')],util[_0x7721('0x36')](_0x19d082,{'showHidden':![],'depth':null}));if(_0x19d082[_0x7721('0x3c')]===_0x19d082[_0x7721('0x44')]&&_0x19d082[_0x7721('0x45')]!='OutgoingSpoolFailed'){if(_[_0x7721('0x3d')](this['channels'][_0x19d082[_0x7721('0x3c')]])){logger[_0x7721('0x31')](_0x7721('0x46'),_0x19d082[_0x7721('0x3c')],_0x19d082[_0x7721('0x47')],_0x19d082[_0x7721('0x48')]);this['channels'][_0x19d082['uniqueid']]=new Channel();this['channels'][_0x19d082['uniqueid']][_0x7721('0x49')]=moment()[_0x7721('0x4a')](_0x7721('0x4b'));this[_0x7721('0x3e')][_0x19d082['uniqueid']][_0x7721('0x4c')]=dispositions[_['toNumber'](_0x19d082[_0x7721('0x4d')])];_[_0x7721('0x3f')](this['channels'][_0x19d082[_0x7721('0x3c')]],_[_0x7721('0x40')](_0x19d082,_['keys'](this['channels'][_0x19d082[_0x7721('0x3c')]])));if(_0x19d082[_0x7721('0x47')]===_0x7721('0x4e')){if(this[_0x7721('0x1d')][_0x19d082['channel'][_0x7721('0x4f')]('-')[0x0]]){this[_0x7721('0x1d')][_0x19d082[_0x7721('0x45')][_0x7721('0x4f')]('-')[0x0]][_0x7721('0x50')]=_0x19d082['exten'];logger[_0x7721('0x3b')]('[%s][voiceCallReport][newchannel]\x20sending\x20user:agentconnect\x20event:',_0x19d082[_0x7721('0x3c')],util['inspect']({'destaccountcode':this[_0x7721('0x1d')][_0x19d082[_0x7721('0x45')][_0x7721('0x4f')]('-')[0x0]]['accountcode'],'destconnectedlinenum':_0x19d082[_0x7721('0x48')]},{'showHidden':![],'depth':null}));this[_0x7721('0x38')](util[_0x7721('0x4a')]('user:%s',this[_0x7721('0x1d')][_0x19d082[_0x7721('0x45')][_0x7721('0x4f')]('-')[0x0]][_0x7721('0x51')]),_0x7721('0x52'),{'destaccountcode':this[_0x7721('0x1d')][_0x19d082[_0x7721('0x45')]['split']('-')[0x0]]['accountcode'],'destconnectedlinenum':_0x19d082[_0x7721('0x48')]});}}}}}}catch(_0x1fdc79){logger[_0x7721('0x34')](_0x7721('0x53'),_0x19d082[_0x7721('0x3c')],util[_0x7721('0x36')](_0x1fdc79,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7721('0x37')][_0x7721('0x21')]=function(_0xa601bc){try{if(this[_0x7721('0x42')](_0xa601bc)){logger['debug']('[%s][voiceCallReport][newexten]\x20event:',_0xa601bc[_0x7721('0x3c')],util[_0x7721('0x36')](_0xa601bc,{'showHidden':![],'depth':null}));if(_0xa601bc[_0x7721('0x3c')]===_0xa601bc[_0x7721('0x44')]&&_0xa601bc['exten']!='h'&&_0xa601bc[_0x7721('0x45')]!=_0x7721('0x54')){_0xa601bc['application']=_0xa601bc[_0x7721('0x55')]['toLowerCase']();_0xa601bc[_0x7721('0x56')]=(_0xa601bc['appdata']||_0xa601bc[_0x7721('0x56')])[_0x7721('0x57')]();logger[_0x7721('0x31')]('[%s][voiceCallReport][newexten]\x20application:%s\x20appdata:%s',_0xa601bc[_0x7721('0x3c')],_0xa601bc[_0x7721('0x55')],_0xa601bc['applicationdata']);if(_[_0x7721('0x3d')](this[_0x7721('0x3e')][_0xa601bc[_0x7721('0x3c')]])){this['channels'][_0xa601bc[_0x7721('0x3c')]]=new Channel();this['channels'][_0xa601bc[_0x7721('0x3c')]][_0x7721('0x49')]=_0xa601bc[_0x7721('0x58')]?moment()[_0x7721('0x59')](moment[_0x7721('0x58')](_0xa601bc[_0x7721('0x58')])[_0x7721('0x5a')](),_0x7721('0x5a'))[_0x7721('0x4a')](_0x7721('0x4b')):moment()[_0x7721('0x4a')](_0x7721('0x4b'));this[_0x7721('0x3e')][_0xa601bc[_0x7721('0x3c')]][_0x7721('0x4c')]='NO\x20ANSWER';}_[_0x7721('0x3f')](this[_0x7721('0x3e')][_0xa601bc[_0x7721('0x3c')]],_[_0x7721('0x40')](_0xa601bc,_[_0x7721('0x41')](this[_0x7721('0x3e')][_0xa601bc[_0x7721('0x3c')]])));if(_['includes'](applications,_0xa601bc[_0x7721('0x55')])){this[_0x7721('0x3e')][_0xa601bc[_0x7721('0x3c')]][_0x7721('0x5b')]=_0xa601bc[_0x7721('0x55')];this[_0x7721('0x3e')][_0xa601bc[_0x7721('0x3c')]][_0x7721('0x5c')]=_0xa601bc[_0x7721('0x56')];if(_0xa601bc[_0x7721('0x55')]===_0x7721('0x12')&&_['startsWith'](_0xa601bc[_0x7721('0x56')],_0x7721('0x5d'))){var _0x1234bc=_0xa601bc[_0x7721('0x56')][_0x7721('0x4f')]('=');var _0x3e7918=_0x1234bc[0x0][_0x7721('0x5e')](/cdr\((.*)\)/);if(_0x3e7918){this[_0x7721('0x3e')][_0xa601bc[_0x7721('0x3c')]][_0x3e7918[0x1]]=_0x1234bc[0x1];}}else if(_0xa601bc[_0x7721('0x55')]===_0x7721('0x13')){this[_0x7721('0x3e')][_0xa601bc[_0x7721('0x3c')]][_0x7721('0x13')]=_0xa601bc[_0x7721('0x56')]['split'](',')[0x0];}}}}}catch(_0x50e9e9){logger['error'](_0x7721('0x5f'),_0xa601bc['uniqueid'],util['inspect'](_0x50e9e9,{'showHidden':![],'depth':null}));}};VoiceCallReport['prototype']['syncNewState']=function(_0x47925a){try{if(this[_0x7721('0x42')](_0x47925a)){logger[_0x7721('0x31')]('[%s][voiceCallReport][newstate]\x20linkedid:%s\x20calleridname:%s\x20calleridnum:%s',_0x47925a[_0x7721('0x3c')],_0x47925a['linkedid'],_0x47925a['calleridname'],_0x47925a['calleridnum']);logger[_0x7721('0x3b')]('[%s][voiceCallReport][newstate]\x20event:',_0x47925a['uniqueid'],util['inspect'](_0x47925a,{'showHidden':![],'depth':null}));if(_0x47925a[_0x7721('0x3c')]!==_0x47925a[_0x7721('0x44')]){if(this[_0x7721('0x3e')][_0x47925a['linkedid']]){if(_0x47925a[_0x7721('0x4d')]==='6'){if(!this[_0x7721('0x3e')][_0x47925a[_0x7721('0x44')]][_0x7721('0x60')]){var _0x6b7c1e=moment();this[_0x7721('0x3e')][_0x47925a[_0x7721('0x44')]][_0x7721('0x60')]=!![];this[_0x7721('0x3e')][_0x47925a[_0x7721('0x44')]][_0x7721('0x61')]=_0x6b7c1e[_0x7721('0x4a')](_0x7721('0x4b'));if(this[_0x7721('0x3e')][_0x47925a[_0x7721('0x44')]]['starttime']){this[_0x7721('0x3e')][_0x47925a[_0x7721('0x44')]][_0x7721('0x62')]=_0x6b7c1e[_0x7721('0x63')](this['channels'][_0x47925a[_0x7721('0x44')]][_0x7721('0x49')],'seconds');}}this[_0x7721('0x3e')][_0x47925a['linkedid']][_0x7721('0x44')]=_0x47925a[_0x7721('0x3c')];if(_0x47925a[_0x7721('0x3a')]!==_0x7721('0x64')){this[_0x7721('0x3e')][_0x47925a[_0x7721('0x44')]][_0x7721('0x65')]=_0x47925a[_0x7721('0x3a')];}this[_0x7721('0x3e')][_0x47925a['linkedid']][_0x7721('0x66')]=_0x47925a[_0x7721('0x67')];this[_0x7721('0x3e')][_0x47925a[_0x7721('0x44')]][_0x7721('0x68')]=_0x47925a[_0x7721('0x45')];this[_0x7721('0x3e')][_0x47925a['linkedid']][_0x7721('0x4c')]=dispositions[_[_0x7721('0x69')](_0x47925a['channelstate'])];if(this[_0x7721('0x1d')][_0x47925a['channel'][_0x7721('0x4f')]('-')[0x0]]){this[_0x7721('0x3e')][_0x47925a[_0x7721('0x44')]][_0x7721('0x6a')]=this[_0x7721('0x1d')][_0x47925a[_0x7721('0x45')][_0x7721('0x4f')]('-')[0x0]]['id'];this['channels'][_0x47925a[_0x7721('0x44')]][_0x7721('0x6b')]=this[_0x7721('0x1d')][_0x47925a['channel']['split']('-')[0x0]]['name'];}}}}else{if(this['channels'][_0x47925a['uniqueid']]){if(_0x47925a[_0x7721('0x4d')]==='6'){if(this[_0x7721('0x1d')][_0x47925a['channel'][_0x7721('0x4f')]('-')[0x0]]){this[_0x7721('0x3e')][_0x47925a[_0x7721('0x3c')]][_0x7721('0x6a')]=this['agents'][_0x47925a[_0x7721('0x45')][_0x7721('0x4f')]('-')[0x0]]['id'];this[_0x7721('0x3e')][_0x47925a[_0x7721('0x3c')]][_0x7721('0x6b')]=this['agents'][_0x47925a[_0x7721('0x45')][_0x7721('0x4f')]('-')[0x0]][_0x7721('0x51')];}}}}}}catch(_0x5f515e){logger['error'](_0x7721('0x6c'),_0x47925a[_0x7721('0x3c')],util[_0x7721('0x36')](_0x5f515e,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7721('0x37')][_0x7721('0x6d')]=function(_0x52a614,_0x4ba35e){try{if(this[_0x7721('0x3e')][_0x52a614]){logger[_0x7721('0x31')](_0x7721('0x6e'),_0x52a614,_0x4ba35e);this[_0x7721('0x3e')][_0x52a614][_0x7721('0x6f')]=!![];if(_[_0x7721('0x70')](_0x4ba35e,_0x7721('0x71'))){_0x4ba35e=_0x4ba35e['replace'](_0x7721('0x71'),_0x7721('0x72'));}this[_0x7721('0x3e')][_0x52a614]['monitorFilename']=_0x4ba35e;var _0xdc60ee=_[_0x7721('0x73')](this[_0x7721('0x3e')][_0x52a614][_0x7721('0x74')],{'filename':_0x4ba35e});if(_['isNil'](_0xdc60ee)){this['channels'][_0x52a614][_0x7721('0x74')][_0x7721('0x75')]({'filename':_0x4ba35e,'createdAt':moment()[_0x7721('0x4a')](_0x7721('0x4b')),'mixmonitorid':'','status':_0x7721('0x76')});}}}catch(_0x2581b3){logger['error'](_0x7721('0x77'),_0x52a614,util[_0x7721('0x36')](_0x2581b3,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7721('0x37')]['syncVarSet']=function(_0x3f68ae){try{if(this[_0x7721('0x42')](_0x3f68ae)){logger[_0x7721('0x3b')](_0x7721('0x78'),_0x3f68ae[_0x7721('0x3c')],util['inspect'](_0x3f68ae,{'showHidden':![],'depth':null}));if(this[_0x7721('0x3e')][_0x3f68ae['uniqueid']]&&_0x3f68ae[_0x7721('0x45')]!=_0x7721('0x54')){if(this[_0x7721('0x42')](_0x3f68ae[_0x7721('0x79')])){if(this[_0x7721('0x42')](_0x3f68ae[_0x7721('0x79')][_0x7721('0x7a')])){logger[_0x7721('0x31')](_0x7721('0x7b'),_0x3f68ae[_0x7721('0x3c')],_0x3f68ae[_0x7721('0x7c')]);this['syncMixMonitorFilename'](_0x3f68ae[_0x7721('0x3c')],_0x3f68ae[_0x7721('0x7c')]);}else if(this[_0x7721('0x42')](_0x3f68ae['variable'][_0x7721('0x7d')])){logger[_0x7721('0x31')](_0x7721('0x7e'),_0x3f68ae[_0x7721('0x3c')],_0x3f68ae[_0x7721('0x7c')]);this['channels'][_0x3f68ae[_0x7721('0x3c')]][_0x7721('0x3a')]=_0x3f68ae[_0x7721('0x7c')];}else if(this[_0x7721('0x42')](_0x3f68ae[_0x7721('0x79')][_0x7721('0x7f')])){logger['info'](_0x7721('0x80'),_0x3f68ae[_0x7721('0x3c')],_0x3f68ae['value']);this[_0x7721('0x3e')][_0x3f68ae['uniqueid']][_0x7721('0x81')]=_0x3f68ae[_0x7721('0x7c')];}else if(this['isNotNull'](_0x3f68ae[_0x7721('0x79')]['xmd-cdrtype'])){logger['info']('[%s][voiceCallReport][varset]\x20variable:xmd-cdrtype\x20value:%s',_0x3f68ae[_0x7721('0x3c')],_0x3f68ae[_0x7721('0x7c')]);this[_0x7721('0x3e')][_0x3f68ae['uniqueid']]['type']=_0x3f68ae['value'];}else if(this[_0x7721('0x42')](_0x3f68ae[_0x7721('0x79')][_0x7721('0x82')])){logger[_0x7721('0x31')](_0x7721('0x83'),_0x3f68ae[_0x7721('0x3c')],_0x3f68ae['value'][_0x7721('0x4f')](',')[0x0]);this[_0x7721('0x3e')][_0x3f68ae[_0x7721('0x3c')]][_0x7721('0x13')]=_0x3f68ae[_0x7721('0x7c')][_0x7721('0x4f')](',')[0x0];}else if(this[_0x7721('0x42')](_0x3f68ae[_0x7721('0x79')][_0x7721('0x84')])){logger[_0x7721('0x31')](_0x7721('0x85'),_0x3f68ae[_0x7721('0x3c')],_0x3f68ae['value']);this['channels'][_0x3f68ae[_0x7721('0x3c')]][_0x7721('0x86')]=_0x3f68ae['value'];}else if(this[_0x7721('0x42')](_0x3f68ae['variable']['xmd-destination'])){logger[_0x7721('0x31')]('[%s][voiceCallReport][varset]\x20variable:xmd-destination\x20value:%s',_0x3f68ae['uniqueid'],_0x3f68ae[_0x7721('0x7c')]);this[_0x7721('0x3e')][_0x3f68ae[_0x7721('0x3c')]][_0x7721('0x87')]=_0x3f68ae[_0x7721('0x7c')];}else if(this['isNotNull'](_0x3f68ae[_0x7721('0x79')][_0x7721('0x88')])){logger[_0x7721('0x31')](_0x7721('0x89'),_0x3f68ae['uniqueid'],_0x3f68ae['value']);this[_0x7721('0x3e')][_0x3f68ae[_0x7721('0x3c')]]['calleridpreview']=_0x3f68ae[_0x7721('0x7c')];}else if(this[_0x7721('0x42')](_0x3f68ae['variable']['xmcs-queue'])){logger[_0x7721('0x31')](_0x7721('0x8a'),_0x3f68ae[_0x7721('0x3c')],_0x3f68ae[_0x7721('0x7c')]);this[_0x7721('0x3e')][_0x3f68ae[_0x7721('0x3c')]][_0x7721('0x13')]=_0x3f68ae[_0x7721('0x7c')];}else if(this['isNotNull'](_0x3f68ae[_0x7721('0x79')][_0x7721('0x8b')])){logger[_0x7721('0x31')](_0x7721('0x8c'),_0x3f68ae[_0x7721('0x3c')],_0x3f68ae[_0x7721('0x7c')]);this[_0x7721('0x3e')][_0x3f68ae['uniqueid']][_0x7721('0x8d')]=_0x3f68ae[_0x7721('0x7c')];}}}else if(this['isNotNull'](_0x3f68ae[_0x7721('0x79')][_0x7721('0x7a')])){if(_0x3f68ae[_0x7721('0x7c')]){var _0xb8547a=path[_0x7721('0x8e')](_0x3f68ae[_0x7721('0x7c')])[_0x7721('0x51')];logger[_0x7721('0x31')](_0x7721('0x7b'),_0xb8547a,_0x3f68ae[_0x7721('0x7c')]);this['syncMixMonitorFilename'](_0xb8547a,_0x3f68ae[_0x7721('0x7c')]);}}else if(this[_0x7721('0x3e')][_0x3f68ae[_0x7721('0x44')]]){if(this[_0x7721('0x42')](_0x3f68ae[_0x7721('0x79')])){if(this[_0x7721('0x42')](_0x3f68ae[_0x7721('0x79')][_0x7721('0x8b')])){logger[_0x7721('0x31')](_0x7721('0x8c'),_0x3f68ae[_0x7721('0x44')],_0x3f68ae[_0x7721('0x7c')]);this[_0x7721('0x3e')][_0x3f68ae[_0x7721('0x44')]][_0x7721('0x8f')]=_0x3f68ae[_0x7721('0x7c')];}}}}}catch(_0xea9824){logger[_0x7721('0x34')](_0x7721('0x90'),_0x3f68ae[_0x7721('0x3c')],util['inspect'](_0xea9824,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7721('0x37')]['syncHangup']=function(_0xacbefb){try{if(this[_0x7721('0x42')](_0xacbefb)){logger[_0x7721('0x3b')](_0x7721('0x91'),_0xacbefb[_0x7721('0x3c')],util['inspect'](_0xacbefb,{'showHidden':![],'depth':null}));if(this['channels'][_0xacbefb['uniqueid']]){logger['info'](_0x7721('0x92'),_0xacbefb[_0x7721('0x3c')],_0xacbefb[_0x7721('0x93')]);var _0x43e4ff=moment();this[_0x7721('0x3e')][_0xacbefb['uniqueid']][_0x7721('0x94')]=_0x43e4ff['format'](_0x7721('0x4b'));this[_0x7721('0x3e')][_0xacbefb[_0x7721('0x3c')]][_0x7721('0x58')]=_0x43e4ff[_0x7721('0x63')](this[_0x7721('0x3e')][_0xacbefb['uniqueid']][_0x7721('0x49')],'seconds');if(this['channels'][_0xacbefb[_0x7721('0x3c')]][_0x7721('0x60')]){this[_0x7721('0x3e')][_0xacbefb[_0x7721('0x3c')]][_0x7721('0x95')]=_0x43e4ff['diff'](this[_0x7721('0x3e')][_0xacbefb[_0x7721('0x3c')]][_0x7721('0x61')],_0x7721('0x5a'));this[_0x7721('0x3e')][_0xacbefb[_0x7721('0x3c')]][_0x7721('0x62')]=this['channels'][_0xacbefb[_0x7721('0x3c')]][_0x7721('0x58')]-this[_0x7721('0x3e')][_0xacbefb[_0x7721('0x3c')]][_0x7721('0x95')];}if(_0xacbefb['context']===_0x7721('0x4e')){if(this[_0x7721('0x1d')][_0xacbefb[_0x7721('0x45')]['split']('-')[0x0]]){this[_0x7721('0x1d')][_0xacbefb[_0x7721('0x45')]['split']('-')[0x0]]=_[_0x7721('0x96')](this[_0x7721('0x1d')][_0xacbefb[_0x7721('0x45')][_0x7721('0x4f')]('-')[0x0]],['destconnectedlinenum']);logger[_0x7721('0x3b')]('[%s][voiceCallReport][hangup]\x20sending\x20user:agentcomplete\x20event:',_0xacbefb[_0x7721('0x3c')],util[_0x7721('0x36')]({'destaccountcode':this['agents'][_0xacbefb[_0x7721('0x45')][_0x7721('0x4f')]('-')[0x0]]['accountcode']},{'showHidden':![],'depth':null}));this[_0x7721('0x38')](util[_0x7721('0x4a')]('user:%s',this[_0x7721('0x1d')][_0xacbefb['channel'][_0x7721('0x4f')]('-')[0x0]][_0x7721('0x51')]),_0x7721('0x97'),{'destaccountcode':this['agents'][_0xacbefb[_0x7721('0x45')]['split']('-')[0x0]]['accountcode']});}}var _0x287d61=this;Promise[_0x7721('0x98')]()[_0x7721('0x99')](function(){var _0x335852=_0x287d61[_0x7721('0x3e')][_0xacbefb['uniqueid']];if(typeof _0x335852[_0x7721('0x9a')]===_0x7721('0x9b'))return;if(_[_0x7721('0x9c')](_0x335852[_0x7721('0x74')]))return;return RpcSetting[_0x7721('0x9d')]()['then'](function(_0x22f899){if(!_0x22f899['stopRecordingOnTransfer'])return;return Promise[_0x7721('0x98')]()['then'](function(){return ami['Action']({'action':_0x7721('0x9e'),'channel':_0x335852['channel']})['catch'](function(){});})[_0x7721('0x99')](function(){return ami[_0x7721('0x9f')]({'action':_0x7721('0x9e'),'channel':_0x335852['destinationchannel']})[_0x7721('0xa0')](function(){})['finally'](function(){var _0x4ac09d=_0x287d61['agents'][_0x335852[_0x7721('0x68')][_0x7721('0x4f')]('-')[0x0]];if(!_0x4ac09d)return;io[_0x7721('0x38')](_0x7721('0xa1'),{'agentId':_0x4ac09d['id'],'uniqueid':_0x335852[_0x7721('0x3c')]});});});});})[_0x7721('0x99')](function(){if(_0xacbefb[_0x7721('0xa2')]===_0x7721('0xa3')){_0x287d61[_0x7721('0x1e')][_0xacbefb[_0x7721('0x3c')]]=_0x287d61[_0x7721('0x3e')][_0xacbefb['uniqueid']];}else{if(_0x287d61[_0x7721('0x3e')][_0xacbefb[_0x7721('0x3c')]][_0x7721('0xa4')]===_0x7721('0xa5')&&_0x287d61[_0x7721('0x1e')][_0xacbefb[_0x7721('0x3c')]]){_0x287d61[_0x7721('0x3e')][_0xacbefb['uniqueid']]['uniqueid']=[_0x287d61[_0x7721('0x3e')][_0xacbefb[_0x7721('0x3c')]][_0x7721('0x44')],_0x287d61[_0x7721('0x3e')][_0xacbefb['uniqueid']][_0x7721('0x44')]=_0x287d61['channels'][_0xacbefb[_0x7721('0x3c')]]['uniqueid']][0x0];delete _0x287d61[_0x7721('0x1e')][_0xacbefb[_0x7721('0x3c')]];}}logger[_0x7721('0x3b')](_0x7721('0xa6'),_0xacbefb[_0x7721('0x3c')],util[_0x7721('0x36')](_0x287d61['channels'][_0xacbefb['uniqueid']],{'showHidden':![],'depth':null}));ami['emit'](_0x7721('0xa7'),_0x287d61['channels'][_0xacbefb[_0x7721('0x3c')]]);delete _0x287d61[_0x7721('0x3e')][_0xacbefb['uniqueid']];});}}}catch(_0x340926){logger[_0x7721('0x34')](_0x7721('0xa8'),_0xacbefb['uniqueid'],util[_0x7721('0x36')](_0x340926,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7721('0x37')]['syncAttendedTransfer']=function(_0x483a1e){try{if(this[_0x7721('0x42')](_0x483a1e)){logger[_0x7721('0x31')]('[%s][voiceCallReport][attendedtransfer]\x20transfercalleridnum:%s\x20transferconnectedlinenum:%s',_0x483a1e[_0x7721('0x3c')],_0x483a1e[_0x7721('0xa9')],_0x483a1e['transfertargetcalleridnum']);logger['debug']('[%s][voiceCallReport][attendedtransfer]\x20event:',_0x483a1e['uniqueid'],util[_0x7721('0x36')](_0x483a1e,{'showHidden':![],'depth':null}));if(this[_0x7721('0x3e')][_0x483a1e[_0x7721('0xaa')]]){this['channels'][_0x483a1e['transfereeuniqueid']][_0x7721('0xab')]=_0x483a1e[_0x7721('0xa9')];this[_0x7721('0x3e')][_0x483a1e[_0x7721('0xaa')]][_0x7721('0xac')]=_0x483a1e[_0x7721('0xad')];if(this[_0x7721('0x3e')][_0x483a1e[_0x7721('0xae')]]){var _0x315093=this['channels'][_0x483a1e['secondtransfereruniqueid']];this[_0x7721('0x3e')][_0x483a1e['secondtransfereruniqueid']]=this[_0x7721('0x3e')][_0x483a1e['transfereeuniqueid']];this[_0x7721('0x3e')][_0x483a1e['transfereeuniqueid']]=_0x315093;}}else if(this[_0x7721('0x3e')][_0x483a1e[_0x7721('0xaf')]]){this['channels'][_0x483a1e['transfertargetuniqueid']][_0x7721('0xab')]=_0x483a1e[_0x7721('0xa9')];this[_0x7721('0x3e')][_0x483a1e[_0x7721('0xaf')]][_0x7721('0xac')]=_0x483a1e['transfertargetcalleridnum'];if(this[_0x7721('0x3e')][_0x483a1e[_0x7721('0xb0')]]){var _0x315093=this['channels'][_0x483a1e[_0x7721('0xb0')]];this[_0x7721('0x3e')][_0x483a1e[_0x7721('0xb0')]]=this[_0x7721('0x3e')][_0x483a1e[_0x7721('0xaf')]];this[_0x7721('0x3e')][_0x483a1e[_0x7721('0xaf')]]=_0x315093;}}if((this[_0x7721('0x3e')][_0x483a1e[_0x7721('0xb0')]]||this[_0x7721('0x3e')][_0x483a1e[_0x7721('0xb1')]])&&this['channels'][_0x483a1e[_0x7721('0xae')]]){var _0x3e319e=_[_0x7721('0xb2')]([this[_0x7721('0x3e')][_0x483a1e[_0x7721('0xb0')]],this[_0x7721('0x3e')][_0x483a1e[_0x7721('0xb1')]],this['channels'][_0x483a1e[_0x7721('0xae')]]],function(_0x5391c3){return _0x5391c3&&_0x5391c3[_0x7721('0xa4')]===_0x7721('0xa5')&&_0x5391c3[_0x7721('0xb3')];});if(_0x3e319e){if(this[_0x7721('0x3e')][_0x483a1e[_0x7721('0xb0')]])this[_0x7721('0x3e')][_0x483a1e['origtransfereruniqueid']][_0x7721('0x9a')]='ATTENDED';if(this[_0x7721('0x3e')][_0x483a1e[_0x7721('0xb1')]])this[_0x7721('0x3e')][_0x483a1e['origtransfererlinkedid']][_0x7721('0x9a')]=_0x7721('0xb4');this[_0x7721('0x3e')][_0x483a1e[_0x7721('0xae')]]['transferType']=_0x7721('0xb4');}}}}catch(_0x767a4c){logger[_0x7721('0x34')](_0x7721('0xb5'),_0x483a1e['uniqueid'],util[_0x7721('0x36')](_0x767a4c,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7721('0x37')][_0x7721('0x2d')]=function(_0x11acd6){try{if(this['isNotNull'](_0x11acd6)){logger[_0x7721('0x31')](_0x7721('0xb6'),_0x11acd6[_0x7721('0x3c')],_0x11acd6[_0x7721('0xb7')],_0x11acd6[_0x7721('0xb8')]);logger[_0x7721('0x3b')](_0x7721('0xb9'),_0x11acd6[_0x7721('0x3c')],util[_0x7721('0x36')](_0x11acd6,{'showHidden':![],'depth':null}));if(this['channels'][_0x11acd6[_0x7721('0xaa')]]){this[_0x7721('0x3e')][_0x11acd6[_0x7721('0xaa')]][_0x7721('0xab')]=_0x11acd6[_0x7721('0xb7')];this[_0x7721('0x3e')][_0x11acd6[_0x7721('0xaa')]][_0x7721('0xac')]=_0x11acd6[_0x7721('0xb8')];this[_0x7721('0x3e')][_0x11acd6[_0x7721('0xaa')]][_0x7721('0x9a')]=_0x7721('0xba');this[_0x7721('0xbb')]({'event':_0x7721('0xa3'),'uniqueid':_0x11acd6[_0x7721('0xaa')],'context':_0x11acd6['context'],'channel':_0x11acd6[_0x7721('0xbc')]});}else{this[_0x7721('0x3e')][_0x11acd6[_0x7721('0xbd')]][_0x7721('0x9a')]=_0x7721('0xba');}}}catch(_0x857c38){logger[_0x7721('0x34')](_0x7721('0xbe'),_0x11acd6[_0x7721('0x3c')],util[_0x7721('0x36')](_0x857c38,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7721('0x37')][_0x7721('0x2f')]=function(_0x5ea8a2){try{if(this['isNotNull'](_0x5ea8a2)){logger[_0x7721('0x3b')](_0x7721('0xbf'),_0x5ea8a2[_0x7721('0x3c')],util[_0x7721('0x36')](_0x5ea8a2,{'showHidden':![],'depth':null}));if(this[_0x7721('0x3e')][_0x5ea8a2['uniqueid']]){if(!_[_0x7721('0xc0')](this[_0x7721('0x3e')][_0x5ea8a2[_0x7721('0x3c')]][_0x7721('0x61')])){this[_0x7721('0x3e')][_0x5ea8a2[_0x7721('0x3c')]][_0x7721('0xc1')]=moment()[_0x7721('0x4a')](_0x7721('0x4b'));logger[_0x7721('0x31')](_0x7721('0xc2'),_0x5ea8a2[_0x7721('0x3c')],this['channels'][_0x5ea8a2[_0x7721('0x3c')]][_0x7721('0xc1')]);}}}}catch(_0x16e0cd){logger['error'](_0x7721('0xc3'),_0x5ea8a2[_0x7721('0x3c')],util[_0x7721('0x36')](_0x16e0cd,{'showHidden':![],'depth':null}));}};VoiceCallReport['prototype'][_0x7721('0xc4')]=function(_0x48b8b6){try{if(this['isNotNull'](_0x48b8b6)){logger[_0x7721('0x3b')](_0x7721('0xc5'),_0x48b8b6[_0x7721('0x3c')],util[_0x7721('0x36')](_0x48b8b6,{'showHidden':![],'depth':null}));if(this['channels'][_0x48b8b6[_0x7721('0x3c')]]){if(!_[_0x7721('0xc0')](this[_0x7721('0x3e')][_0x48b8b6[_0x7721('0x3c')]][_0x7721('0xc1')])){this['channels'][_0x48b8b6[_0x7721('0x3c')]][_0x7721('0xc6')]+=moment()[_0x7721('0xc7')](0x0)[_0x7721('0x63')](this[_0x7721('0x3e')][_0x48b8b6[_0x7721('0x3c')]][_0x7721('0xc1')],_0x7721('0x5a'));logger[_0x7721('0x31')](_0x7721('0xc8'),_0x48b8b6[_0x7721('0x3c')],this[_0x7721('0x3e')][_0x48b8b6[_0x7721('0x3c')]][_0x7721('0xc6')]);delete this[_0x7721('0x3e')][_0x48b8b6[_0x7721('0x3c')]][_0x7721('0xc1')];}}}}catch(_0x344dc3){logger[_0x7721('0x34')](_0x7721('0xc9'),_0x48b8b6[_0x7721('0x3c')],util[_0x7721('0x36')](_0x344dc3,{'showHidden':![],'depth':null}));}};module['exports']=VoiceCallReport; \ No newline at end of file diff --git a/server/services/ami/report/voiceDialReport.js b/server/services/ami/report/voiceDialReport.js index eb18004..9b925b6 100644 --- a/server/services/ami/report/voiceDialReport.js +++ b/server/services/ami/report/voiceDialReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xaa8d=['sipcallid','sipuri','bridgepeer','bridgepvtcallid','membercalls','memberdynamic','memberinterface','memberpenalty','memberrealtime','includes','syncHangup','[%s][voiceDialReport][hangup]\x20event:','cause-txt','endtime','duration','diff','starttime','seconds','lastevent','complete','total','sumHoldTime','holdtime','sumBillable','billableseconds','sumDuration','[%s][voiceDialReport][hangup]\x20sending\x20voiceDialReport\x20event:','custom:voiceDialReport','[%s][voiceDialReport][hangup]\x20sending\x20dialend\x20event:','custom:dialend','[%s][voiceDialReport][hangup]\x20sending\x20voice_outbound:save\x20event:','voice_outbound:save','[DEBUG]\x20Emit\x20voice_outbound_channel:remove\x20event','stringify','voice_outbound_channel:remove','linkedid','destuniqueid','[%s][voiceDialReport][hangup]','util','ioredis','../../../config/environment','../ami','redis','defaults','localhost','channels','outboundChannels','outbound','variables','dialbegin','syncDialBegin','bind','syncDialEnd','varset','syncVarSet','hangup','prototype','isNotNull','isUndefined','debug','inspect','merge','format','YYYY-MM-DD\x20HH:mm:ss','called','channel','substring','lastIndexOf','omit','info','[%s][voiceDialReport][dialbegin]\x20agent:%s\x20interface:%s\x20lastevent:called','uniqueid','membername','[%s][voiceDialReport][dialbegin]\x20sending\x20voice_outbound_channel:save\x20event:','emit','voice_outbound_channel:save','custom:dialbegin','error','dialstatus','ANSWER','connectedlinenum','connectedlinename','answertime','connect','[%s][voiceDialReport][dialend]\x20agent:%s\x20lastevent:connect','custom:dialconnect','[%s][voiceDialReport][dialend]\x20sending\x20voice_outbound_channel:save\x20event:','voice:outbound','[%s][voiceDialReport][dialend]','[%s][voiceDialReport][varset]\x20event:','addVariable','keys','value','variable','outboundrouteid','[%s][voiceDialReport][varset]','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosloss','rtpaudioqoslossbridged','rtpaudioqosrttbridged'];(function(_0x2ef1a1,_0x5db979){var _0x467d02=function(_0x20491b){while(--_0x20491b){_0x2ef1a1['push'](_0x2ef1a1['shift']());}};_0x467d02(++_0x5db979);}(_0xaa8d,0x8c));var _0xdaa8=function(_0x219b34,_0x3173f7){_0x219b34=_0x219b34-0x0;var _0xd2606e=_0xaa8d[_0x219b34];return _0xd2606e;};'use strict';var _=require('lodash');var moment=require('moment');var util=require(_0xdaa8('0x0'));var Redis=require(_0xdaa8('0x1'));var config=require(_0xdaa8('0x2'));var logger=require('../../../config/logger')('ami');var ami=require(_0xdaa8('0x3'));config[_0xdaa8('0x4')]=_[_0xdaa8('0x5')](config['redis'],{'host':_0xdaa8('0x6'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config['redis']));function VoiceDialReport(_0x48e86d){this[_0xdaa8('0x7')]=_0x48e86d[_0xdaa8('0x8')];this[_0xdaa8('0x9')]=_0x48e86d[_0xdaa8('0x9')];this[_0xdaa8('0xa')]={};ami['on'](_0xdaa8('0xb'),this[_0xdaa8('0xc')][_0xdaa8('0xd')](this));ami['on']('dialend',this[_0xdaa8('0xe')][_0xdaa8('0xd')](this));ami['on'](_0xdaa8('0xf'),this[_0xdaa8('0x10')][_0xdaa8('0xd')](this));ami['on'](_0xdaa8('0x11'),this['syncHangup'][_0xdaa8('0xd')](this));}VoiceDialReport[_0xdaa8('0x12')][_0xdaa8('0x13')]=function(_0x49059b){return _0x49059b!==null&&!_[_0xdaa8('0x14')](_0x49059b);};VoiceDialReport[_0xdaa8('0x12')]['emit']=function(_0x4d62ec,_0x1af5da,_0x287716){io['to'](_0x4d62ec)['emit'](_0x1af5da,_0x287716);};VoiceDialReport[_0xdaa8('0x12')]['syncDialBegin']=function(_0x3bbbdb){try{if(this[_0xdaa8('0x13')](_0x3bbbdb)){logger[_0xdaa8('0x15')]('[%s][voiceDialReport][dialbegin]\x20event:',_0x3bbbdb['uniqueid'],util[_0xdaa8('0x16')](_0x3bbbdb,{'showHidden':![],'depth':null}));if(this[_0xdaa8('0x7')][_0x3bbbdb['uniqueid']]){_[_0xdaa8('0x17')](this['channels'][_0x3bbbdb['uniqueid']],{'starttime':moment()[_0xdaa8('0x18')](_0xdaa8('0x19')),'lastevent':_0xdaa8('0x1a'),'interface':_0x3bbbdb[_0xdaa8('0x1b')][_0xdaa8('0x1c')](0x0,_0x3bbbdb[_0xdaa8('0x1b')]['lastIndexOf']('-')),'membername':_0x3bbbdb['channel'][_0xdaa8('0x1c')](_0x3bbbdb[_0xdaa8('0x1b')][_0xdaa8('0x1d')]('/')+0x1,_0x3bbbdb[_0xdaa8('0x1b')][_0xdaa8('0x1d')]('-'))},_[_0xdaa8('0x1e')](_0x3bbbdb,['event','privilege']));logger[_0xdaa8('0x1f')](_0xdaa8('0x20'),_0x3bbbdb['uniqueid'],this['channels'][_0x3bbbdb[_0xdaa8('0x21')]][_0xdaa8('0x22')],this[_0xdaa8('0x7')][_0x3bbbdb['uniqueid']]['interface']);logger[_0xdaa8('0x15')](_0xdaa8('0x23'),_0x3bbbdb[_0xdaa8('0x21')],util['inspect'](this[_0xdaa8('0x7')][_0x3bbbdb[_0xdaa8('0x21')]],{'showHidden':![],'depth':null}));this[_0xdaa8('0x24')]('voice:outbound',_0xdaa8('0x25'),this[_0xdaa8('0x7')][_0x3bbbdb['uniqueid']]);logger[_0xdaa8('0x15')]('[%s][voiceDialReport][dialbegin]\x20sending\x20dialbegin\x20event:',_0x3bbbdb[_0xdaa8('0x21')],util[_0xdaa8('0x16')](this[_0xdaa8('0x7')][_0x3bbbdb['uniqueid']],{'showHidden':![],'depth':null}));ami[_0xdaa8('0x24')](_0xdaa8('0x26'),this['channels'][_0x3bbbdb[_0xdaa8('0x21')]]);}}}catch(_0x125d73){logger[_0xdaa8('0x27')]('[%s][voiceDialReport][dialbegin]',_0x3bbbdb[_0xdaa8('0x21')],util[_0xdaa8('0x16')](_0x125d73,{'showHidden':![],'depth':null}));}};VoiceDialReport[_0xdaa8('0x12')]['syncDialEnd']=function(_0xffa34c){try{if(this[_0xdaa8('0x13')](_0xffa34c)){logger[_0xdaa8('0x15')]('[%s][voiceDialReport][dialend]\x20event:',_0xffa34c[_0xdaa8('0x21')],util[_0xdaa8('0x16')](_0xffa34c,{'showHidden':![],'depth':null}));if(this[_0xdaa8('0x7')][_0xffa34c[_0xdaa8('0x21')]]){this[_0xdaa8('0x7')][_0xffa34c[_0xdaa8('0x21')]][_0xdaa8('0x28')]=_0xffa34c['dialstatus'];if(_0xffa34c[_0xdaa8('0x28')]===_0xdaa8('0x29')){this['channels'][_0xffa34c[_0xdaa8('0x21')]][_0xdaa8('0x2a')]=_0xffa34c[_0xdaa8('0x2a')];this[_0xdaa8('0x7')][_0xffa34c[_0xdaa8('0x21')]]['connectedlinename']=_0xffa34c[_0xdaa8('0x2b')];this[_0xdaa8('0x7')][_0xffa34c['uniqueid']][_0xdaa8('0x2c')]=moment()[_0xdaa8('0x18')]('YYYY-MM-DD\x20HH:mm:ss');this[_0xdaa8('0x7')][_0xffa34c[_0xdaa8('0x21')]]['lastevent']=_0xdaa8('0x2d');logger[_0xdaa8('0x1f')](_0xdaa8('0x2e'),_0xffa34c[_0xdaa8('0x21')],_0xffa34c[_0xdaa8('0x1b')][_0xdaa8('0x1c')](_0xffa34c[_0xdaa8('0x1b')]['lastIndexOf']('/')+0x1,_0xffa34c[_0xdaa8('0x1b')][_0xdaa8('0x1d')]('-')));logger[_0xdaa8('0x15')]('[%s][voiceDialReport][dialend]\x20sending\x20dialconnect\x20event:',_0xffa34c[_0xdaa8('0x21')],util[_0xdaa8('0x16')](this[_0xdaa8('0x7')][_0xffa34c[_0xdaa8('0x21')]],{'showHidden':![],'depth':null}));ami[_0xdaa8('0x24')](_0xdaa8('0x2f'),this['channels'][_0xffa34c[_0xdaa8('0x21')]]);}logger['debug'](_0xdaa8('0x30'),_0xffa34c[_0xdaa8('0x21')],util[_0xdaa8('0x16')](this['channels'][_0xffa34c[_0xdaa8('0x21')]],{'showHidden':![],'depth':null}));this[_0xdaa8('0x24')](_0xdaa8('0x31'),_0xdaa8('0x25'),this[_0xdaa8('0x7')][_0xffa34c['uniqueid']]);}}}catch(_0x2c6a4c){logger[_0xdaa8('0x27')](_0xdaa8('0x32'),_0xffa34c[_0xdaa8('0x21')],util[_0xdaa8('0x16')](_0x2c6a4c,{'showHidden':![],'depth':null}));}};VoiceDialReport['prototype']['syncVarSet']=function(_0x3dd968){try{if(this['isNotNull'](_0x3dd968)){logger['debug'](_0xdaa8('0x33'),_0x3dd968[_0xdaa8('0x21')],util['inspect'](_0x3dd968,{'showHidden':![],'depth':null}));this[_0xdaa8('0x34')](_0x3dd968[_0xdaa8('0x21')],_[_0xdaa8('0x35')](_0x3dd968['variable'])[0x0],_0x3dd968[_0xdaa8('0x36')]);if(this[_0xdaa8('0x13')](_0x3dd968[_0xdaa8('0x37')])&&this[_0xdaa8('0x13')](_0x3dd968['variable'][_0xdaa8('0x38')])){if(_['isUndefined'](this[_0xdaa8('0x7')][_0x3dd968[_0xdaa8('0x21')]])){this[_0xdaa8('0x7')][_0x3dd968['uniqueid']]={'routeId':_0x3dd968[_0xdaa8('0x36')],'variables':this[_0xdaa8('0xa')][_0x3dd968['uniqueid']]};logger['info']('[%s][voiceDialReport][varset]\x20outboundrouteid:%s\x20variable:%s\x20value:%s',_0x3dd968[_0xdaa8('0x21')],_0x3dd968['variable'][_0xdaa8('0x38')],_[_0xdaa8('0x35')](_0x3dd968[_0xdaa8('0x37')])[0x0],_0x3dd968[_0xdaa8('0x36')]);logger['debug']('[%s][voiceDialReport][varset]\x20sending\x20voice_outbound_channel:save\x20event:',_0x3dd968[_0xdaa8('0x21')],util[_0xdaa8('0x16')](this[_0xdaa8('0x7')][_0x3dd968[_0xdaa8('0x21')]],{'showHidden':![],'depth':null}));this[_0xdaa8('0x24')](_0xdaa8('0x31'),_0xdaa8('0x25'),this[_0xdaa8('0x7')][_0x3dd968['uniqueid']]);}}}}catch(_0x5d90e5){logger[_0xdaa8('0x27')](_0xdaa8('0x39'),_0x3dd968['uniqueid'],util[_0xdaa8('0x16')](_0x5d90e5,{'showHidden':![],'depth':null}));}};VoiceDialReport['prototype'][_0xdaa8('0x34')]=function(_0x8b7580,_0x3a9363,_0x403f5a){var _0x4ae636=[_0xdaa8('0x3a'),_0xdaa8('0x3b'),_0xdaa8('0x3c'),'rtpaudioqosjitterbridged',_0xdaa8('0x3d'),_0xdaa8('0x3e'),'rtpaudioqosrtt',_0xdaa8('0x3f'),_0xdaa8('0x40'),_0xdaa8('0x41'),_0xdaa8('0x42'),_0xdaa8('0x43'),_0xdaa8('0x44'),_0xdaa8('0x45'),_0xdaa8('0x46'),'memberlastcall',_0xdaa8('0x22'),_0xdaa8('0x47'),_0xdaa8('0x48')];if(!_['isNil'](_0x3a9363)&&!_[_0xdaa8('0x49')](_0x4ae636,_0x3a9363)){if(_[_0xdaa8('0x14')](this['variables'][_0x8b7580])){this[_0xdaa8('0xa')][_0x8b7580]={};}this['variables'][_0x8b7580][_0x3a9363]=_0x403f5a;}};VoiceDialReport['prototype'][_0xdaa8('0x4a')]=function(_0x3fb8d2){try{if(this[_0xdaa8('0x13')](_0x3fb8d2)){logger[_0xdaa8('0x15')](_0xdaa8('0x4b'),_0x3fb8d2[_0xdaa8('0x21')],util['inspect'](_0x3fb8d2,{'showHidden':![],'depth':null}));if(this[_0xdaa8('0x7')][_0x3fb8d2[_0xdaa8('0x21')]]){logger[_0xdaa8('0x1f')]('[%s][voiceDialReport][hangup]\x20reason:%s\x20lasteevent:complete',_0x3fb8d2['uniqueid'],_0x3fb8d2[_0xdaa8('0x4c')]);this[_0xdaa8('0x7')][_0x3fb8d2[_0xdaa8('0x21')]][_0xdaa8('0x4d')]=moment()[_0xdaa8('0x18')]('YYYY-MM-DD\x20HH:mm:ss');this[_0xdaa8('0x7')][_0x3fb8d2['uniqueid']][_0xdaa8('0x4e')]=moment(this[_0xdaa8('0x7')][_0x3fb8d2[_0xdaa8('0x21')]][_0xdaa8('0x4d')])[_0xdaa8('0x4f')](this[_0xdaa8('0x7')][_0x3fb8d2[_0xdaa8('0x21')]][_0xdaa8('0x50')],_0xdaa8('0x51'));this[_0xdaa8('0x7')][_0x3fb8d2[_0xdaa8('0x21')]][_0xdaa8('0x52')]=_0xdaa8('0x53');this[_0xdaa8('0x9')][_0xdaa8('0x54')]+=0x1;if(this[_0xdaa8('0x7')][_0x3fb8d2[_0xdaa8('0x21')]][_0xdaa8('0x2c')]){this[_0xdaa8('0x9')]['answered']+=0x1;this['channels'][_0x3fb8d2['uniqueid']]['holdtime']=moment(this[_0xdaa8('0x7')][_0x3fb8d2[_0xdaa8('0x21')]][_0xdaa8('0x2c')])[_0xdaa8('0x4f')](this['channels'][_0x3fb8d2[_0xdaa8('0x21')]][_0xdaa8('0x50')],_0xdaa8('0x51'));this[_0xdaa8('0x7')][_0x3fb8d2['uniqueid']]['billableseconds']=moment(this[_0xdaa8('0x7')][_0x3fb8d2[_0xdaa8('0x21')]][_0xdaa8('0x4d')])[_0xdaa8('0x4f')](this[_0xdaa8('0x7')][_0x3fb8d2[_0xdaa8('0x21')]][_0xdaa8('0x2c')],_0xdaa8('0x51'));this['outbound'][_0xdaa8('0x55')]+=this[_0xdaa8('0x7')][_0x3fb8d2['uniqueid']][_0xdaa8('0x56')]||0x0;this[_0xdaa8('0x9')][_0xdaa8('0x57')]+=this[_0xdaa8('0x7')][_0x3fb8d2['uniqueid']][_0xdaa8('0x58')];}this[_0xdaa8('0x9')][_0xdaa8('0x59')]+=this[_0xdaa8('0x7')][_0x3fb8d2['uniqueid']][_0xdaa8('0x4e')];logger['debug'](_0xdaa8('0x5a'),_0x3fb8d2[_0xdaa8('0x21')],util[_0xdaa8('0x16')](this['channels'][_0x3fb8d2[_0xdaa8('0x21')]],{'showHidden':![],'depth':null}));ami[_0xdaa8('0x24')](_0xdaa8('0x5b'),this[_0xdaa8('0x7')][_0x3fb8d2[_0xdaa8('0x21')]]);logger[_0xdaa8('0x15')](_0xdaa8('0x5c'),_0x3fb8d2[_0xdaa8('0x21')],util[_0xdaa8('0x16')](this[_0xdaa8('0x7')][_0x3fb8d2['uniqueid']],{'showHidden':![],'depth':null}));ami[_0xdaa8('0x24')](_0xdaa8('0x5d'),this[_0xdaa8('0x7')][_0x3fb8d2[_0xdaa8('0x21')]]);logger[_0xdaa8('0x15')](_0xdaa8('0x5e'),_0x3fb8d2['uniqueid'],util['inspect'](this[_0xdaa8('0x7')][_0x3fb8d2['uniqueid']],{'showHidden':![],'depth':null}));this[_0xdaa8('0x24')](_0xdaa8('0x31'),_0xdaa8('0x5f'),this['outbound']);logger['info'](_0xdaa8('0x60'),JSON[_0xdaa8('0x61')](this[_0xdaa8('0x7')][_0x3fb8d2[_0xdaa8('0x21')]]));logger[_0xdaa8('0x15')]('[%s][voiceDialReport][hangup]\x20sending\x20voice_outbound_channel:remove\x20event:',_0x3fb8d2['uniqueid'],util[_0xdaa8('0x16')](this[_0xdaa8('0x7')][_0x3fb8d2[_0xdaa8('0x21')]],{'showHidden':![],'depth':null}));this[_0xdaa8('0x24')](_0xdaa8('0x31'),_0xdaa8('0x62'),this[_0xdaa8('0x7')][_0x3fb8d2[_0xdaa8('0x21')]]);delete this[_0xdaa8('0x7')][_0x3fb8d2[_0xdaa8('0x21')]];}else if(this[_0xdaa8('0x7')][_0x3fb8d2['linkedid']]){this[_0xdaa8('0x7')][_0x3fb8d2[_0xdaa8('0x63')]][_0xdaa8('0x21')]=this[_0xdaa8('0x7')][_0x3fb8d2[_0xdaa8('0x63')]][_0xdaa8('0x64')];}if(this[_0xdaa8('0xa')][_0x3fb8d2[_0xdaa8('0x21')]]){delete this[_0xdaa8('0xa')][_0x3fb8d2[_0xdaa8('0x21')]];}}}catch(_0x1ed9a7){logger[_0xdaa8('0x27')](_0xdaa8('0x65'),_0x3fb8d2[_0xdaa8('0x21')],util[_0xdaa8('0x16')](_0x1ed9a7,{'showHidden':![],'depth':null}));}};module['exports']=VoiceDialReport; \ No newline at end of file +var _0xfb2f=['redis','socket.io-emitter','outboundChannels','outbound','variables','dialbegin','syncDialBegin','bind','syncDialEnd','varset','syncVarSet','hangup','syncHangup','prototype','isNotNull','isUndefined','emit','debug','uniqueid','inspect','channels','merge','YYYY-MM-DD\x20HH:mm:ss','channel','substring','lastIndexOf','omit','privilege','info','[%s][voiceDialReport][dialbegin]\x20agent:%s\x20interface:%s\x20lastevent:called','membername','interface','[%s][voiceDialReport][dialbegin]\x20sending\x20voice_outbound_channel:save\x20event:','voice:outbound','[%s][voiceDialReport][dialbegin]\x20sending\x20dialbegin\x20event:','custom:dialbegin','[%s][voiceDialReport][dialbegin]','[%s][voiceDialReport][dialend]\x20event:','dialstatus','ANSWER','connectedlinenum','connectedlinename','answertime','lastevent','connect','custom:dialconnect','[%s][voiceDialReport][dialend]\x20sending\x20voice_outbound_channel:save\x20event:','voice_outbound_channel:save','error','[%s][voiceDialReport][dialend]','addVariable','value','variable','outboundrouteid','keys','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosrtt','rtpaudioqosrttbridged','sipcallid','sipuri','bridgepeer','membercalls','memberdynamic','memberpenalty','memberrealtime','isNil','includes','[%s][voiceDialReport][hangup]\x20reason:%s\x20lasteevent:complete','cause-txt','endtime','format','duration','starttime','total','answered','diff','seconds','billableseconds','sumHoldTime','holdtime','sumBillable','[%s][voiceDialReport][hangup]\x20sending\x20voiceDialReport\x20event:','[%s][voiceDialReport][hangup]\x20sending\x20dialend\x20event:','custom:dialend','[%s][voiceDialReport][hangup]\x20sending\x20voice_outbound:save\x20event:','[DEBUG]\x20Emit\x20voice_outbound_channel:remove\x20event','linkedid','[%s][voiceDialReport][hangup]','exports','lodash','moment','ioredis','../../../config/environment','../ami','defaults'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0xfb2f,0x11d));var _0xffb2=function(_0x54570e,_0x43b7d0){_0x54570e=_0x54570e-0x0;var _0x2d70e6=_0xfb2f[_0x54570e];return _0x2d70e6;};'use strict';var _=require(_0xffb2('0x0'));var moment=require(_0xffb2('0x1'));var util=require('util');var Redis=require(_0xffb2('0x2'));var config=require(_0xffb2('0x3'));var logger=require('../../../config/logger')('ami');var ami=require(_0xffb2('0x4'));config['redis']=_[_0xffb2('0x5')](config[_0xffb2('0x6')],{'host':'localhost','port':0x18eb});var io=require(_0xffb2('0x7'))(new Redis(config['redis']));function VoiceDialReport(_0x18f2e3){this['channels']=_0x18f2e3[_0xffb2('0x8')];this[_0xffb2('0x9')]=_0x18f2e3[_0xffb2('0x9')];this[_0xffb2('0xa')]={};ami['on'](_0xffb2('0xb'),this[_0xffb2('0xc')][_0xffb2('0xd')](this));ami['on']('dialend',this[_0xffb2('0xe')][_0xffb2('0xd')](this));ami['on'](_0xffb2('0xf'),this[_0xffb2('0x10')]['bind'](this));ami['on'](_0xffb2('0x11'),this[_0xffb2('0x12')]['bind'](this));}VoiceDialReport[_0xffb2('0x13')][_0xffb2('0x14')]=function(_0x28ca45){return _0x28ca45!==null&&!_[_0xffb2('0x15')](_0x28ca45);};VoiceDialReport[_0xffb2('0x13')]['emit']=function(_0x1252de,_0x5be8a7,_0x3736c6){io['to'](_0x1252de)[_0xffb2('0x16')](_0x5be8a7,_0x3736c6);};VoiceDialReport[_0xffb2('0x13')]['syncDialBegin']=function(_0xbf1407){try{if(this['isNotNull'](_0xbf1407)){logger[_0xffb2('0x17')]('[%s][voiceDialReport][dialbegin]\x20event:',_0xbf1407[_0xffb2('0x18')],util[_0xffb2('0x19')](_0xbf1407,{'showHidden':![],'depth':null}));if(this[_0xffb2('0x1a')][_0xbf1407['uniqueid']]){_[_0xffb2('0x1b')](this[_0xffb2('0x1a')][_0xbf1407[_0xffb2('0x18')]],{'starttime':moment()['format'](_0xffb2('0x1c')),'lastevent':'called','interface':_0xbf1407[_0xffb2('0x1d')][_0xffb2('0x1e')](0x0,_0xbf1407[_0xffb2('0x1d')][_0xffb2('0x1f')]('-')),'membername':_0xbf1407[_0xffb2('0x1d')]['substring'](_0xbf1407[_0xffb2('0x1d')]['lastIndexOf']('/')+0x1,_0xbf1407['channel']['lastIndexOf']('-'))},_[_0xffb2('0x20')](_0xbf1407,['event',_0xffb2('0x21')]));logger[_0xffb2('0x22')](_0xffb2('0x23'),_0xbf1407[_0xffb2('0x18')],this['channels'][_0xbf1407[_0xffb2('0x18')]][_0xffb2('0x24')],this[_0xffb2('0x1a')][_0xbf1407['uniqueid']][_0xffb2('0x25')]);logger[_0xffb2('0x17')](_0xffb2('0x26'),_0xbf1407['uniqueid'],util['inspect'](this['channels'][_0xbf1407['uniqueid']],{'showHidden':![],'depth':null}));this[_0xffb2('0x16')](_0xffb2('0x27'),'voice_outbound_channel:save',this[_0xffb2('0x1a')][_0xbf1407[_0xffb2('0x18')]]);logger[_0xffb2('0x17')](_0xffb2('0x28'),_0xbf1407[_0xffb2('0x18')],util['inspect'](this[_0xffb2('0x1a')][_0xbf1407[_0xffb2('0x18')]],{'showHidden':![],'depth':null}));ami[_0xffb2('0x16')](_0xffb2('0x29'),this['channels'][_0xbf1407['uniqueid']]);}}}catch(_0x2ace6c){logger['error'](_0xffb2('0x2a'),_0xbf1407[_0xffb2('0x18')],util['inspect'](_0x2ace6c,{'showHidden':![],'depth':null}));}};VoiceDialReport[_0xffb2('0x13')][_0xffb2('0xe')]=function(_0x471d81){try{if(this[_0xffb2('0x14')](_0x471d81)){logger[_0xffb2('0x17')](_0xffb2('0x2b'),_0x471d81['uniqueid'],util[_0xffb2('0x19')](_0x471d81,{'showHidden':![],'depth':null}));if(this[_0xffb2('0x1a')][_0x471d81['uniqueid']]){this[_0xffb2('0x1a')][_0x471d81[_0xffb2('0x18')]]['dialstatus']=_0x471d81[_0xffb2('0x2c')];if(_0x471d81[_0xffb2('0x2c')]===_0xffb2('0x2d')){this[_0xffb2('0x1a')][_0x471d81[_0xffb2('0x18')]][_0xffb2('0x2e')]=_0x471d81[_0xffb2('0x2e')];this['channels'][_0x471d81[_0xffb2('0x18')]][_0xffb2('0x2f')]=_0x471d81[_0xffb2('0x2f')];this[_0xffb2('0x1a')][_0x471d81[_0xffb2('0x18')]][_0xffb2('0x30')]=moment()['format'](_0xffb2('0x1c'));this[_0xffb2('0x1a')][_0x471d81['uniqueid']][_0xffb2('0x31')]=_0xffb2('0x32');logger[_0xffb2('0x22')]('[%s][voiceDialReport][dialend]\x20agent:%s\x20lastevent:connect',_0x471d81[_0xffb2('0x18')],_0x471d81[_0xffb2('0x1d')][_0xffb2('0x1e')](_0x471d81[_0xffb2('0x1d')][_0xffb2('0x1f')]('/')+0x1,_0x471d81['channel'][_0xffb2('0x1f')]('-')));logger[_0xffb2('0x17')]('[%s][voiceDialReport][dialend]\x20sending\x20dialconnect\x20event:',_0x471d81[_0xffb2('0x18')],util[_0xffb2('0x19')](this['channels'][_0x471d81[_0xffb2('0x18')]],{'showHidden':![],'depth':null}));ami[_0xffb2('0x16')](_0xffb2('0x33'),this[_0xffb2('0x1a')][_0x471d81[_0xffb2('0x18')]]);}logger[_0xffb2('0x17')](_0xffb2('0x34'),_0x471d81[_0xffb2('0x18')],util[_0xffb2('0x19')](this[_0xffb2('0x1a')][_0x471d81[_0xffb2('0x18')]],{'showHidden':![],'depth':null}));this[_0xffb2('0x16')](_0xffb2('0x27'),_0xffb2('0x35'),this['channels'][_0x471d81[_0xffb2('0x18')]]);}}}catch(_0x36a377){logger[_0xffb2('0x36')](_0xffb2('0x37'),_0x471d81[_0xffb2('0x18')],util[_0xffb2('0x19')](_0x36a377,{'showHidden':![],'depth':null}));}};VoiceDialReport[_0xffb2('0x13')]['syncVarSet']=function(_0xe6c230){try{if(this['isNotNull'](_0xe6c230)){logger[_0xffb2('0x17')]('[%s][voiceDialReport][varset]\x20event:',_0xe6c230[_0xffb2('0x18')],util[_0xffb2('0x19')](_0xe6c230,{'showHidden':![],'depth':null}));this[_0xffb2('0x38')](_0xe6c230[_0xffb2('0x18')],_['keys'](_0xe6c230['variable'])[0x0],_0xe6c230[_0xffb2('0x39')]);if(this[_0xffb2('0x14')](_0xe6c230['variable'])&&this[_0xffb2('0x14')](_0xe6c230[_0xffb2('0x3a')][_0xffb2('0x3b')])){if(_[_0xffb2('0x15')](this['channels'][_0xe6c230[_0xffb2('0x18')]])){this[_0xffb2('0x1a')][_0xe6c230[_0xffb2('0x18')]]={'routeId':_0xe6c230[_0xffb2('0x39')],'variables':this['variables'][_0xe6c230[_0xffb2('0x18')]]};logger[_0xffb2('0x22')]('[%s][voiceDialReport][varset]\x20outboundrouteid:%s\x20variable:%s\x20value:%s',_0xe6c230[_0xffb2('0x18')],_0xe6c230[_0xffb2('0x3a')][_0xffb2('0x3b')],_[_0xffb2('0x3c')](_0xe6c230['variable'])[0x0],_0xe6c230['value']);logger[_0xffb2('0x17')]('[%s][voiceDialReport][varset]\x20sending\x20voice_outbound_channel:save\x20event:',_0xe6c230['uniqueid'],util[_0xffb2('0x19')](this[_0xffb2('0x1a')][_0xe6c230[_0xffb2('0x18')]],{'showHidden':![],'depth':null}));this[_0xffb2('0x16')](_0xffb2('0x27'),_0xffb2('0x35'),this[_0xffb2('0x1a')][_0xe6c230[_0xffb2('0x18')]]);}}}}catch(_0x54e012){logger[_0xffb2('0x36')]('[%s][voiceDialReport][varset]',_0xe6c230[_0xffb2('0x18')],util[_0xffb2('0x19')](_0x54e012,{'showHidden':![],'depth':null}));}};VoiceDialReport[_0xffb2('0x13')][_0xffb2('0x38')]=function(_0x39e0f2,_0x215b8b,_0x142ad6){var _0x44e92e=[_0xffb2('0x3d'),_0xffb2('0x3e'),_0xffb2('0x3f'),'rtpaudioqosjitterbridged','rtpaudioqosloss','rtpaudioqoslossbridged',_0xffb2('0x40'),_0xffb2('0x41'),_0xffb2('0x42'),_0xffb2('0x43'),_0xffb2('0x44'),'bridgepvtcallid',_0xffb2('0x45'),_0xffb2('0x46'),'memberinterface','memberlastcall',_0xffb2('0x24'),_0xffb2('0x47'),_0xffb2('0x48')];if(!_[_0xffb2('0x49')](_0x215b8b)&&!_[_0xffb2('0x4a')](_0x44e92e,_0x215b8b)){if(_['isUndefined'](this[_0xffb2('0xa')][_0x39e0f2])){this[_0xffb2('0xa')][_0x39e0f2]={};}this[_0xffb2('0xa')][_0x39e0f2][_0x215b8b]=_0x142ad6;}};VoiceDialReport[_0xffb2('0x13')][_0xffb2('0x12')]=function(_0x4e93a0){try{if(this[_0xffb2('0x14')](_0x4e93a0)){logger[_0xffb2('0x17')]('[%s][voiceDialReport][hangup]\x20event:',_0x4e93a0[_0xffb2('0x18')],util[_0xffb2('0x19')](_0x4e93a0,{'showHidden':![],'depth':null}));if(this[_0xffb2('0x1a')][_0x4e93a0[_0xffb2('0x18')]]){logger[_0xffb2('0x22')](_0xffb2('0x4b'),_0x4e93a0[_0xffb2('0x18')],_0x4e93a0[_0xffb2('0x4c')]);this[_0xffb2('0x1a')][_0x4e93a0[_0xffb2('0x18')]][_0xffb2('0x4d')]=moment()[_0xffb2('0x4e')](_0xffb2('0x1c'));this[_0xffb2('0x1a')][_0x4e93a0[_0xffb2('0x18')]][_0xffb2('0x4f')]=moment(this[_0xffb2('0x1a')][_0x4e93a0[_0xffb2('0x18')]][_0xffb2('0x4d')])['diff'](this[_0xffb2('0x1a')][_0x4e93a0[_0xffb2('0x18')]][_0xffb2('0x50')],'seconds');this[_0xffb2('0x1a')][_0x4e93a0[_0xffb2('0x18')]][_0xffb2('0x31')]='complete';this[_0xffb2('0x9')][_0xffb2('0x51')]+=0x1;if(this[_0xffb2('0x1a')][_0x4e93a0[_0xffb2('0x18')]]['answertime']){this[_0xffb2('0x9')][_0xffb2('0x52')]+=0x1;this[_0xffb2('0x1a')][_0x4e93a0[_0xffb2('0x18')]]['holdtime']=moment(this[_0xffb2('0x1a')][_0x4e93a0[_0xffb2('0x18')]][_0xffb2('0x30')])[_0xffb2('0x53')](this[_0xffb2('0x1a')][_0x4e93a0[_0xffb2('0x18')]][_0xffb2('0x50')],_0xffb2('0x54'));this[_0xffb2('0x1a')][_0x4e93a0[_0xffb2('0x18')]][_0xffb2('0x55')]=moment(this[_0xffb2('0x1a')][_0x4e93a0[_0xffb2('0x18')]]['endtime'])[_0xffb2('0x53')](this['channels'][_0x4e93a0[_0xffb2('0x18')]][_0xffb2('0x30')],'seconds');this[_0xffb2('0x9')][_0xffb2('0x56')]+=this[_0xffb2('0x1a')][_0x4e93a0[_0xffb2('0x18')]][_0xffb2('0x57')]||0x0;this['outbound'][_0xffb2('0x58')]+=this['channels'][_0x4e93a0[_0xffb2('0x18')]]['billableseconds'];}this[_0xffb2('0x9')]['sumDuration']+=this[_0xffb2('0x1a')][_0x4e93a0['uniqueid']][_0xffb2('0x4f')];logger['debug'](_0xffb2('0x59'),_0x4e93a0[_0xffb2('0x18')],util['inspect'](this[_0xffb2('0x1a')][_0x4e93a0[_0xffb2('0x18')]],{'showHidden':![],'depth':null}));ami[_0xffb2('0x16')]('custom:voiceDialReport',this[_0xffb2('0x1a')][_0x4e93a0[_0xffb2('0x18')]]);logger[_0xffb2('0x17')](_0xffb2('0x5a'),_0x4e93a0[_0xffb2('0x18')],util[_0xffb2('0x19')](this[_0xffb2('0x1a')][_0x4e93a0[_0xffb2('0x18')]],{'showHidden':![],'depth':null}));ami[_0xffb2('0x16')](_0xffb2('0x5b'),this[_0xffb2('0x1a')][_0x4e93a0[_0xffb2('0x18')]]);logger[_0xffb2('0x17')](_0xffb2('0x5c'),_0x4e93a0[_0xffb2('0x18')],util[_0xffb2('0x19')](this['channels'][_0x4e93a0[_0xffb2('0x18')]],{'showHidden':![],'depth':null}));this[_0xffb2('0x16')](_0xffb2('0x27'),'voice_outbound:save',this[_0xffb2('0x9')]);logger['info'](_0xffb2('0x5d'),JSON['stringify'](this[_0xffb2('0x1a')][_0x4e93a0['uniqueid']]));logger[_0xffb2('0x17')]('[%s][voiceDialReport][hangup]\x20sending\x20voice_outbound_channel:remove\x20event:',_0x4e93a0['uniqueid'],util[_0xffb2('0x19')](this[_0xffb2('0x1a')][_0x4e93a0['uniqueid']],{'showHidden':![],'depth':null}));this[_0xffb2('0x16')](_0xffb2('0x27'),'voice_outbound_channel:remove',this[_0xffb2('0x1a')][_0x4e93a0[_0xffb2('0x18')]]);delete this[_0xffb2('0x1a')][_0x4e93a0[_0xffb2('0x18')]];}else if(this['channels'][_0x4e93a0[_0xffb2('0x5e')]]){this[_0xffb2('0x1a')][_0x4e93a0[_0xffb2('0x5e')]][_0xffb2('0x18')]=this[_0xffb2('0x1a')][_0x4e93a0['linkedid']]['destuniqueid'];}if(this[_0xffb2('0xa')][_0x4e93a0[_0xffb2('0x18')]]){delete this[_0xffb2('0xa')][_0x4e93a0['uniqueid']];}}}catch(_0x2ae1a2){logger[_0xffb2('0x36')](_0xffb2('0x5f'),_0x4e93a0[_0xffb2('0x18')],util['inspect'](_0x2ae1a2,{'showHidden':![],'depth':null}));}};module[_0xffb2('0x60')]=VoiceDialReport; \ No newline at end of file diff --git a/server/services/ami/report/voiceQueueReport.js b/server/services/ami/report/voiceQueueReport.js index 5a975e9..4d5721e 100644 --- a/server/services/ami/report/voiceQueueReport.js +++ b/server/services/ami/report/voiceQueueReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x85f1=['unlockRR','clearZombieChannels','channels','switch','sequence','enqueue','isNil','Action','status','channel','message','No\x20such\x20channel','[%s][voiceQueueReport][checkChannel]','inspect','error','[%s][voiceQueueReport][checkQueueReport]','[FullyBooted]\x20clear\x20realtime','clearQueueReport','clearqueuereport','emit','emitVoiceQueueChannelSave','debug','uniqueid','format','voice:queue:%s','voice_queue_presence:save','[%s][voiceQueueReport][',']\x20sending\x20voice_queue_channel:remove\x20event:','voice_queue_channel:remove','emitVoiceQueueSummary','type','inbound','name','strategy','answered','available','sumBillable','sumDuration','total','unmanaged','abandoned','Trunk','active','callerid','Interval','stringify','[voiceQueueReport][','voice_queue:save','isNotNull','isUndefined','queues','catch','[voiceQueueReport][queues]','then','[voiceQueueReport][queuesummary]','queue','info','[voiceQueueReport][queuesummary]\x20name:%s','callers','toNumber','loggedIn','loggedin','[voiceQueueReport][queuesummary]\x20sending\x20queuesummary\x20event:','custom:queuesummary','[voiceQueueReport][queuesummarycomplete]\x20event:','syncQueueCallerJoin','[%s][voiceQueueReport][queuecallerjoin]','queuecallerjoinAt','position','count','[voiceQueueReport][queuecallerjoin]\x20name:%s\x20type:%s','merge','pick','keys','[%s][voiceQueueReport][queuecallerabandon]','last','queuecallercomplete','queuecallercompleteAt','holdtime','queuecallerabandonAt','YYYY-MM-DD\x20HH:mm:ss','queuecallerexitreason','ABANDONED','[voiceQueueReport][queuecallerabandon]\x20name:%s\x20type:%s','emitVoiceQueueChannelRemove','queuecallerleaveAt','connectedlinenum','connectedlinename','[voiceQueueReport][queuecallerleave]\x20name:%s\x20type:%s\x20connectedlinenum:%s\x20connectedlinename:%s','[%s][voiceQueueReport][agentconnect]','[voiceQueueReport][agentconnect]\x20name:%s\x20type:%s\x20queuecallerexitreason:COMPLETEDBYAGENT','[%s][voiceQueueReport][agentcomplete]','assigned','membername','queuecallerexit','queuecallerexitAt','transfer','COMPLETED','startsWith','toLowerCase','linkedid','add','seconds','FORWARDTRANSFER','transfertype','transferexten','destexten','transferuniqueid','toUpperCase','agentcomplete','addVariable','variable','value','queuestatus','TIMEOUT','lastevent','timeout','[%s][voiceQueueReport][varset]\x20sending\x20timeout\x20event:','custom:timeout','queueposition','EXITWITHKEY','[%s][voiceQueueReport][varset]\x20name:%s\x20type:%s\x20variable:%s\x20value:%s','[%s][voiceQueueReport][varset]','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqosrtt','rtpaudioqosrttbridged','sipcallid','sipuri','bridgepeer','membercalls','memberdynamic','memberinterface','memberlastcall','memberpenalty','memberrealtime','includes','length','sumHoldTime','diff','milliseconds','custom:queuecallerunmanaged','[%s][voiceQueueReport][hangup]\x20sending\x20queuecallerabandon\x20event:','[%s][voiceQueueReport][hangup]\x20name:%s\x20type:%s\x20reason:%s','hangup','[%s][voiceQueueReport][hangup]\x20sending\x20voiceQueueReport\x20event:','custom:voiceQueueReport','[%s][voiceQueueReport][attendedtransfer]','transfereeuniqueid','ATTENDEDTRANSFER','ATTENDED','secondtransfereruniqueid','[%s][voiceQueueReport][attendedTransfer]\x20name:%s\x20type:%s\x20transferexten:%s\x20transferuniqueid:%s','transfertargetuniqueid','origtransfererexten','origtransfereruniqueid','BLINDTRANSFER','BLIND','extension','BlindTransfer','context','[%s][voiceQueueReport][blindtransfer]','mohstarttime','[%s][voiceQueueReport][musiconholdstart]\x20mohstarttime:%s','[%s][voiceQueueReport][musiconholdstart]','syncMusicOnHoldStop','[%s][voiceQueueReport][musiconholdstop]','mohtime','[%s][voiceQueueReport][musiconholdstop]\x20mohtime:%s','exports','moment','md5','ioredis','../../../config/environment','../../../config/logger','redis','defaults','localhost','socket.io-emitter','prototype','tail','finally','queueReports','agents','voiceQueues','flagQueueSummary','campaigns','variables','queuesummary','syncQueueSummary','queuesummarycomplete','syncQueueSummaryComplete','bind','queuecallerabandon','syncQueueCallerAbandon','queuecallerleave','syncQueueCallerLeave','syncAgentComplete','agentconnect','syncAgentConnect','varset','syncVarSet','syncHangup','fullybooted','syncFullyBooted','musiconholdstart','syncMusicOnHoldStart','attendedtransfer','syncAttendedTransfer','syncBlindTransfer','loopQueueSummary','loopQueueShow','hasOwnProperty','originated','isEmpty','talking','pTalking','waiting'];(function(_0x2641f9,_0x26715f){var _0x585741=function(_0x2d1462){while(--_0x2d1462){_0x2641f9['push'](_0x2641f9['shift']());}};_0x585741(++_0x26715f);}(_0x85f1,0x184));var _0x185f=function(_0x3c4f1f,_0x20d3ec){_0x3c4f1f=_0x3c4f1f-0x0;var _0x19cb69=_0x85f1[_0x3c4f1f];return _0x19cb69;};'use strict';var _=require('lodash');var moment=require(_0x185f('0x0'));var util=require('util');var md5=require(_0x185f('0x1'));var Redis=require(_0x185f('0x2'));var config=require(_0x185f('0x3'));var logger=require(_0x185f('0x4'))('ami');var ami=require('../ami');var QueueReport=require('../model/queueReport');config[_0x185f('0x5')]=_[_0x185f('0x6')](config[_0x185f('0x5')],{'host':_0x185f('0x7'),'port':0x18eb});var io=require(_0x185f('0x8'))(new Redis(config[_0x185f('0x5')]));var Sequence=function(){};Sequence[_0x185f('0x9')]['enqueue']=function(_0x446180){this[_0x185f('0xa')]=this[_0x185f('0xa')]?this[_0x185f('0xa')][_0x185f('0xb')](_0x446180):_0x446180();};function VoiceQueueReport(_0x54cd89){this['sequence']=new Sequence();this[_0x185f('0xc')]={};this[_0x185f('0xd')]=_0x54cd89['agents'];this['channels']=_0x54cd89['queueChannels'];this[_0x185f('0xe')]=_0x54cd89[_0x185f('0xe')];this[_0x185f('0xf')]=!![];this[_0x185f('0x10')]=_0x54cd89['campaigns'];this[_0x185f('0x11')]={};ami['on'](_0x185f('0x12'),this[_0x185f('0x13')]['bind'](this));ami['on'](_0x185f('0x14'),this[_0x185f('0x15')][_0x185f('0x16')](this));ami['on']('queuecallerjoin',this['syncQueueCallerJoin'][_0x185f('0x16')](this));ami['on'](_0x185f('0x17'),this[_0x185f('0x18')][_0x185f('0x16')](this));ami['on'](_0x185f('0x19'),this[_0x185f('0x1a')]['bind'](this));ami['on']('agentcomplete',this[_0x185f('0x1b')]['bind'](this));ami['on'](_0x185f('0x1c'),this[_0x185f('0x1d')]['bind'](this));ami['on'](_0x185f('0x1e'),this[_0x185f('0x1f')]['bind'](this));ami['on']('hangup',this[_0x185f('0x20')][_0x185f('0x16')](this));ami['on'](_0x185f('0x21'),this[_0x185f('0x22')]['bind'](this));ami['on'](_0x185f('0x23'),this[_0x185f('0x24')][_0x185f('0x16')](this));ami['on']('musiconholdstop',this['syncMusicOnHoldStop'][_0x185f('0x16')](this));ami['on'](_0x185f('0x25'),this[_0x185f('0x26')][_0x185f('0x16')](this));ami['on']('blindtransfer',this[_0x185f('0x27')][_0x185f('0x16')](this));this[_0x185f('0x28')]();this[_0x185f('0x29')]();}function clearChannels(_0x35af8d){if(!_['isEmpty'](_0x35af8d)){for(var _0xa2a640 in _0x35af8d){if(_0x35af8d[_0x185f('0x2a')](_0xa2a640)){delete _0x35af8d[_0xa2a640];}}}}function clearCampaigns(_0x3f4535){if(!_['isEmpty'](_0x3f4535)){for(var _0x1c109c in _0x3f4535){if(_0x3f4535['hasOwnProperty'](_0x1c109c)){_0x3f4535[_0x1c109c][_0x185f('0x2b')]=0x0;}}}}function clearVoiceQueues(_0x7eabd2){if(!_[_0x185f('0x2c')](_0x7eabd2)){for(var _0x5f58ca in _0x7eabd2){if(_0x7eabd2[_0x185f('0x2a')](_0x5f58ca)){_0x7eabd2[_0x5f58ca][_0x185f('0x2b')]=0x0;_0x7eabd2[_0x5f58ca][_0x185f('0x2d')]=0x0;_0x7eabd2[_0x5f58ca][_0x185f('0x2e')]=0x0;_0x7eabd2[_0x5f58ca][_0x185f('0x2f')]=0x0;_0x7eabd2[_0x5f58ca]['queueStatusComplete']=!![];}}}}function clearAgentBooked(_0x50d8a4){if(!_[_0x185f('0x2c')](_0x50d8a4)){for(var _0x3dbcbc in _0x50d8a4){if(_0x50d8a4[_0x185f('0x2a')](_0x3dbcbc)){_0x50d8a4[_0x3dbcbc][_0x185f('0x30')]=!![];}}}}VoiceQueueReport[_0x185f('0x9')][_0x185f('0x31')]=function(){var _0x3cc609=this;for(var _0x4dad13 in this[_0x185f('0x32')]){if(this[_0x185f('0x32')][_0x185f('0x2a')](_0x4dad13)&&!this[_0x185f('0x32')][_0x4dad13][_0x185f('0x33')]){this[_0x185f('0x34')][_0x185f('0x35')](function(){if(!_[_0x185f('0x36')](_0x3cc609[_0x185f('0x32')][_0x4dad13])){return ami[_0x185f('0x37')]({'action':_0x185f('0x38'),'channel':_0x3cc609['channels'][_0x4dad13][_0x185f('0x39')]})['catch'](function(_0x9d5dbc){if(_0x9d5dbc[_0x185f('0x3a')]===_0x185f('0x3b')){setTimeout(function(){if(_0x3cc609[_0x185f('0x32')][_0x4dad13]){delete _0x3cc609[_0x185f('0x32')][_0x4dad13];logger['error'](_0x185f('0x3c'),_0x4dad13,util[_0x185f('0x3d')](_0x9d5dbc,{'showHidden':![],'depth':null}));}if(_0x3cc609[_0x185f('0xc')][_0x4dad13]){delete _0x3cc609[_0x185f('0xc')][_0x4dad13];logger[_0x185f('0x3e')](_0x185f('0x3f'),_0x4dad13,util[_0x185f('0x3d')](_0x9d5dbc,{'showHidden':![],'depth':null}));}if(_0x3cc609[_0x185f('0x11')][_0x4dad13]){delete _0x3cc609[_0x185f('0x11')][_0x4dad13];logger[_0x185f('0x3e')]('[%s][voiceQueueReport][checkVariables]',_0x4dad13,util['inspect'](_0x9d5dbc,{'showHidden':![],'depth':null}));}},0x1f40);}});}});}}};VoiceQueueReport[_0x185f('0x9')][_0x185f('0x22')]=function(){logger[_0x185f('0x3e')](_0x185f('0x40'));clearChannels(this[_0x185f('0x32')]);this[_0x185f('0x41')](this[_0x185f('0xc')]);clearAgentBooked(this[_0x185f('0xd')]);clearVoiceQueues(this[_0x185f('0xe')]);clearCampaigns(this[_0x185f('0x10')]);};VoiceQueueReport[_0x185f('0x9')][_0x185f('0x41')]=function(_0x4384d1){var _0x44435e=this;if(!_[_0x185f('0x2c')](_0x4384d1)){for(var _0x48328a in _0x4384d1){if(_0x4384d1['hasOwnProperty'](_0x48328a)){_0x44435e['emitVoiceQueueChannelRemove'](_0x4384d1[_0x48328a],_0x185f('0x42'));delete _0x4384d1[_0x48328a];}}}};VoiceQueueReport[_0x185f('0x9')][_0x185f('0x43')]=function(_0x9c9015,_0x4c8e29,_0x2eb4d9){io['to'](_0x9c9015)[_0x185f('0x43')](_0x4c8e29,_0x2eb4d9);};VoiceQueueReport[_0x185f('0x9')][_0x185f('0x44')]=function(_0x5d8f8c,_0x725a64){logger[_0x185f('0x45')]('[%s][voiceQueueReport]['+_0x725a64+']\x20sending\x20voice_queue_channel:save\x20event:',_0x5d8f8c[_0x185f('0x46')],util[_0x185f('0x3d')](_0x5d8f8c,{'showHidden':![],'depth':null}));this[_0x185f('0x43')](util[_0x185f('0x47')](_0x185f('0x48'),_0x5d8f8c['name']),'voice_queue_channel:save',_0x5d8f8c);io['emit'](_0x185f('0x49'),_0x5d8f8c);};VoiceQueueReport[_0x185f('0x9')]['emitVoiceQueueChannelRemove']=function(_0x2d847d,_0x528eb6){logger[_0x185f('0x45')](_0x185f('0x4a')+_0x528eb6+_0x185f('0x4b'),_0x2d847d['uniqueid'],util[_0x185f('0x3d')](_0x2d847d,{'showHidden':![],'depth':null}));this[_0x185f('0x43')](util[_0x185f('0x47')](_0x185f('0x48'),_0x2d847d['name']),_0x185f('0x4c'),_0x2d847d);io['emit']('voice_queue_presence:remove',_0x2d847d);};VoiceQueueReport['prototype'][_0x185f('0x4d')]=function(_0x39eaf7,_0x1c0276){if(_0x39eaf7[_0x185f('0x4e')]===_0x185f('0x4f')){var _0x27d624={'id':_0x39eaf7['id'],'name':_0x39eaf7[_0x185f('0x50')],'strategy':_0x39eaf7[_0x185f('0x51')],'answered':_0x39eaf7[_0x185f('0x52')],'available':_0x39eaf7[_0x185f('0x53')],'loggedIn':_0x39eaf7['loggedIn'],'pTalking':_0x39eaf7[_0x185f('0x2e')],'sumBillable':_0x39eaf7[_0x185f('0x54')],'sumDuration':_0x39eaf7[_0x185f('0x55')],'sumHoldTime':_0x39eaf7['sumHoldTime']||0x0,'talking':_0x39eaf7[_0x185f('0x2d')],'total':_0x39eaf7[_0x185f('0x56')],'type':_0x39eaf7[_0x185f('0x4e')],'unmanaged':_0x39eaf7[_0x185f('0x57')],'abandoned':_0x39eaf7[_0x185f('0x58')],'waiting':_0x39eaf7[_0x185f('0x2f')]};if(_0x39eaf7[_0x185f('0x59')]){_0x27d624[_0x185f('0x59')]={'id':_0x39eaf7[_0x185f('0x59')]['id'],'name':_0x39eaf7[_0x185f('0x59')][_0x185f('0x50')],'active':_0x39eaf7[_0x185f('0x59')][_0x185f('0x5a')],'callerid':_0x39eaf7[_0x185f('0x59')][_0x185f('0x5b')]};}if(_0x39eaf7[_0x185f('0x5c')]){_0x27d624[_0x185f('0x5c')]={'id':_0x39eaf7[_0x185f('0x5c')]['id'],'name':_0x39eaf7[_0x185f('0x5c')][_0x185f('0x50')]};}var _0x4fc38e=md5(JSON[_0x185f('0x5d')](_0x27d624));if(_0x39eaf7[_0x185f('0x1')]!==_0x4fc38e){_0x39eaf7['md5']=_0x4fc38e;logger[_0x185f('0x45')](_0x185f('0x5e')+_0x1c0276+']\x20sending\x20voice_queue:save\x20event:',util[_0x185f('0x3d')](_0x27d624,{'showHidden':![],'depth':null}));this[_0x185f('0x43')](util['format'](_0x185f('0x48'),_0x27d624[_0x185f('0x50')]),_0x185f('0x5f'),_0x27d624);}}};VoiceQueueReport[_0x185f('0x9')][_0x185f('0x60')]=function(_0x1f7633){return _0x1f7633!==null&&!_[_0x185f('0x61')](_0x1f7633);};VoiceQueueReport[_0x185f('0x9')][_0x185f('0x29')]=function(){var _0xa16b96=this;setInterval(function(){_0xa16b96[_0x185f('0x31')]();ami[_0x185f('0x37')]({'action':_0x185f('0x62')})[_0x185f('0x63')](function(_0x20fbe2){logger[_0x185f('0x3e')](_0x185f('0x64'),util[_0x185f('0x3d')](_0x20fbe2,{'showHidden':![],'depth':null}));});},0x2710);};VoiceQueueReport['prototype'][_0x185f('0x28')]=function(){var _0x3966e4=this;setInterval(function(){if(_0x3966e4[_0x185f('0xf')]){return ami[_0x185f('0x37')]({'action':_0x185f('0x12')})[_0x185f('0x65')](function(_0x3e5411){_0x3966e4[_0x185f('0xf')]=![];})['catch'](function(_0x5679fc){logger['error'](_0x185f('0x66'),util[_0x185f('0x3d')](_0x5679fc,{'showHidden':![],'depth':null}));});}},0x3e8);};VoiceQueueReport[_0x185f('0x9')]['syncQueueSummary']=function(_0x53dc42){try{if(this['isNotNull'](_0x53dc42)&&this[_0x185f('0x60')](_0x53dc42[_0x185f('0x67')])){logger[_0x185f('0x45')]('[voiceQueueReport][queuesummary]\x20event:',util[_0x185f('0x3d')](_0x53dc42,{'showHidden':![],'depth':null}));if(this['voiceQueues'][_0x53dc42[_0x185f('0x67')]]){logger[_0x185f('0x68')](_0x185f('0x69'),_0x53dc42['queue']);var _0x4969e3=_['countBy'](this[_0x185f('0x32')],_0x185f('0x67'))[_0x53dc42[_0x185f('0x67')]]||0x0;var _0x50fa4a=_0x4969e3-_0x53dc42[_0x185f('0x6a')];if(this[_0x185f('0xe')][_0x53dc42[_0x185f('0x67')]][_0x185f('0x2f')]!==_[_0x185f('0x6b')](_0x53dc42['callers'])||this['voiceQueues'][_0x53dc42['queue']][_0x185f('0x6c')]!==_[_0x185f('0x6b')](_0x53dc42[_0x185f('0x6d')])||this[_0x185f('0xe')][_0x53dc42['queue']][_0x185f('0x53')]!==_[_0x185f('0x6b')](_0x53dc42[_0x185f('0x53')])||this[_0x185f('0xe')][_0x53dc42['queue']][_0x185f('0x2d')]!==_0x50fa4a){this[_0x185f('0xe')][_0x53dc42[_0x185f('0x67')]][_0x185f('0x2f')]=_[_0x185f('0x6b')](_0x53dc42['callers']);this[_0x185f('0xe')][_0x53dc42[_0x185f('0x67')]][_0x185f('0x6c')]=_['toNumber'](_0x53dc42['loggedin']);this[_0x185f('0xe')][_0x53dc42['queue']][_0x185f('0x53')]=_['toNumber'](_0x53dc42['available']);this[_0x185f('0xe')][_0x53dc42[_0x185f('0x67')]][_0x185f('0x2d')]=_0x50fa4a>0x0?_0x50fa4a:0x0;this[_0x185f('0xe')][_0x53dc42[_0x185f('0x67')]]['talking']=this[_0x185f('0xe')][_0x53dc42[_0x185f('0x67')]][_0x185f('0x2d')]>_[_0x185f('0x6b')](_0x53dc42['loggedin'])?_[_0x185f('0x6b')](_0x53dc42[_0x185f('0x6d')]):this[_0x185f('0xe')][_0x53dc42[_0x185f('0x67')]]['talking'];this[_0x185f('0x4d')](this['voiceQueues'][_0x53dc42['queue']],_0x185f('0x12'));}logger[_0x185f('0x45')](_0x185f('0x6e'),util[_0x185f('0x3d')](this['voiceQueues'][_0x53dc42['queue']],{'showHidden':![],'depth':null}));ami[_0x185f('0x43')](_0x185f('0x6f'),this[_0x185f('0xe')][_0x53dc42[_0x185f('0x67')]]);}}}catch(_0x578b67){logger[_0x185f('0x3e')](_0x185f('0x66'),util[_0x185f('0x3d')](_0x578b67,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x185f('0x9')]['syncQueueSummaryComplete']=function(_0x1b8a9f){logger[_0x185f('0x45')](_0x185f('0x70'),util[_0x185f('0x3d')](_0x1b8a9f,{'showHidden':![],'depth':null}));this[_0x185f('0xf')]=!![];};VoiceQueueReport[_0x185f('0x9')][_0x185f('0x71')]=function(_0xb9b9f6){try{if(this[_0x185f('0x60')](_0xb9b9f6)){logger[_0x185f('0x45')](_0x185f('0x72'),_0xb9b9f6[_0x185f('0x46')],util[_0x185f('0x3d')](_0xb9b9f6,{'showHidden':![],'depth':null}));if(_[_0x185f('0x61')](this[_0x185f('0xc')][_0xb9b9f6['uniqueid']])){this['queueReports'][_0xb9b9f6[_0x185f('0x46')]]=[];this[_0x185f('0x32')][_0xb9b9f6[_0x185f('0x46')]]={};}var _0x94ebfc=new QueueReport();_0x94ebfc[_0x185f('0x50')]=_0xb9b9f6[_0x185f('0x67')];_0x94ebfc[_0x185f('0x4e')]=this[_0x185f('0xe')][_0x94ebfc[_0x185f('0x50')]]&&this['voiceQueues'][_0x94ebfc['name']][_0x185f('0x4e')]?this[_0x185f('0xe')][_0x94ebfc[_0x185f('0x50')]][_0x185f('0x4e')]||'inbound':_0x185f('0x4f');_0x94ebfc[_0x185f('0x67')]=_0xb9b9f6[_0x185f('0x67')];_0x94ebfc[_0x185f('0x73')]=moment()[_0x185f('0x47')]('YYYY-MM-DD\x20HH:mm:ss');_0x94ebfc[_0x185f('0x74')]=_0xb9b9f6[_0x185f('0x74')];_0x94ebfc[_0x185f('0x75')]=_0xb9b9f6['count'];_0x94ebfc[_0x185f('0x46')]=_0xb9b9f6['uniqueid'];logger[_0x185f('0x68')](_0x185f('0x76'),_0x94ebfc[_0x185f('0x50')],_0x94ebfc[_0x185f('0x4e')]);_[_0x185f('0x77')](_0x94ebfc,_[_0x185f('0x78')](_0xb9b9f6,_[_0x185f('0x79')](_0x94ebfc)));this[_0x185f('0xc')][_0xb9b9f6['uniqueid']]['push'](_0x94ebfc);this[_0x185f('0x32')][_0xb9b9f6[_0x185f('0x46')]]=_0x94ebfc;this[_0x185f('0x44')](_0x94ebfc,'queuecallerjoin');}}catch(_0x1ec449){logger[_0x185f('0x3e')](_0x185f('0x72'),_0xb9b9f6[_0x185f('0x46')],util[_0x185f('0x3d')](_0x1ec449,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x185f('0x9')][_0x185f('0x18')]=function(_0x5b273a){try{if(this['isNotNull'](_0x5b273a)){logger[_0x185f('0x45')](_0x185f('0x7a'),_0x5b273a['uniqueid'],util[_0x185f('0x3d')](_0x5b273a,{'showHidden':![],'depth':null}));if(this[_0x185f('0xc')][_0x5b273a[_0x185f('0x46')]]){var _0x454301=_[_0x185f('0x7b')](this[_0x185f('0xc')][_0x5b273a[_0x185f('0x46')]]);_0x454301[_0x185f('0x7c')]=![];_0x454301[_0x185f('0x7d')]=null;_0x454301[_0x185f('0x7e')]=_0x5b273a[_0x185f('0x7e')];_0x454301['originalposition']=_0x5b273a['originalposition'];_0x454301[_0x185f('0x17')]=!![];_0x454301[_0x185f('0x7f')]=moment()['format'](_0x185f('0x80'));_0x454301[_0x185f('0x81')]=_0x185f('0x82');_0x454301['lastAssignedTo']=null;logger[_0x185f('0x68')](_0x185f('0x83'),_0x454301['name'],_0x454301['type']);this[_0x185f('0x32')][_0x5b273a[_0x185f('0x46')]]=_0x454301;this[_0x185f('0x84')](_0x454301,_0x185f('0x17'));}}}catch(_0xde2cef){logger[_0x185f('0x3e')]('[%s][voiceQueueReport][queuecallerabandon]',_0x5b273a[_0x185f('0x46')],util[_0x185f('0x3d')](_0xde2cef,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x185f('0x9')][_0x185f('0x1a')]=function(_0x3020bc){try{if(this['isNotNull'](_0x3020bc)){logger[_0x185f('0x45')]('[%s][voiceQueueReport][queuecallerleave]',_0x3020bc[_0x185f('0x46')],util[_0x185f('0x3d')](_0x3020bc,{'showHidden':![],'depth':null}));if(this[_0x185f('0xc')][_0x3020bc[_0x185f('0x46')]]){var _0x4a6f6d=_[_0x185f('0x7b')](this['queueReports'][_0x3020bc[_0x185f('0x46')]]);_0x4a6f6d[_0x185f('0x85')]=moment()[_0x185f('0x47')](_0x185f('0x80'));_0x4a6f6d[_0x185f('0x86')]=_0x3020bc[_0x185f('0x86')];_0x4a6f6d[_0x185f('0x87')]=_0x3020bc[_0x185f('0x87')];logger['info'](_0x185f('0x88'),_0x4a6f6d[_0x185f('0x50')],_0x4a6f6d['type'],_0x3020bc[_0x185f('0x86')],_0x3020bc[_0x185f('0x87')]);this[_0x185f('0x32')][_0x3020bc[_0x185f('0x46')]]=_0x4a6f6d;this['emitVoiceQueueChannelSave'](_0x4a6f6d,_0x185f('0x19'));}}}catch(_0x108716){logger[_0x185f('0x3e')]('[%s][voiceQueueReport][queuecallerleave]',_0x3020bc[_0x185f('0x46')],util[_0x185f('0x3d')](_0x108716,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x185f('0x9')][_0x185f('0x1d')]=function(_0x52c53c){try{if(this['isNotNull'](_0x52c53c)){logger['debug'](_0x185f('0x89'),_0x52c53c[_0x185f('0x46')],util[_0x185f('0x3d')](_0x52c53c,{'showHidden':![],'depth':null}));if(this['queueReports'][_0x52c53c[_0x185f('0x46')]]){var _0x594578=_[_0x185f('0x7b')](this[_0x185f('0xc')][_0x52c53c['uniqueid']]);_0x594578['queuecallercomplete']=!![];_0x594578['queuecallerexitreason']='COMPLETEDBYAGENT';logger[_0x185f('0x68')](_0x185f('0x8a'),_0x594578[_0x185f('0x50')],_0x594578[_0x185f('0x4e')]);}}}catch(_0x76b1cb){logger['error'](_0x185f('0x89'),_0x52c53c[_0x185f('0x46')],util[_0x185f('0x3d')](_0x76b1cb,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x185f('0x9')][_0x185f('0x1b')]=function(_0xfcdfd8){try{if(this[_0x185f('0x60')](_0xfcdfd8)){logger['debug'](_0x185f('0x8b'),_0xfcdfd8['uniqueid'],util[_0x185f('0x3d')](_0xfcdfd8,{'showHidden':![],'depth':null}));if(this[_0x185f('0xc')][_0xfcdfd8['uniqueid']]){var _0xc4b2bf=_[_0x185f('0x7b')](this['queueReports'][_0xfcdfd8[_0x185f('0x46')]]);_0xc4b2bf['queuecallerabandon']=![];_0xc4b2bf[_0x185f('0x7f')]=null;_0xc4b2bf[_0x185f('0x8c')]=!![];_0xc4b2bf['lastAssignedTo']=_0xfcdfd8[_0x185f('0x8d')];_0xc4b2bf[_0x185f('0x7e')]=_0xfcdfd8[_0x185f('0x7e')];_0xc4b2bf[_0x185f('0x7c')]=!![];_0xc4b2bf[_0x185f('0x8e')]=![];_0xc4b2bf[_0x185f('0x8f')]=null;if(!_0xc4b2bf['transfer']){if(_0xfcdfd8['reason']==_0x185f('0x90')){_0xc4b2bf[_0x185f('0x81')]=_0x185f('0x91');logger[_0x185f('0x68')]('[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:COMPLETED',_0xc4b2bf[_0x185f('0x50')],_0xc4b2bf[_0x185f('0x4e')]);}else{if(_[_0x185f('0x92')](_0xfcdfd8[_0x185f('0x39')][_0x185f('0x93')](),'local/')){if(this[_0x185f('0xc')][_0xfcdfd8[_0x185f('0x94')]]){var _0xb8671c=_[_0x185f('0x7b')](this[_0x185f('0xc')][_0xfcdfd8[_0x185f('0x94')]]);_0xb8671c['queuecallercomplete']=![];_0xb8671c[_0x185f('0x8e')]=!![];_0xb8671c[_0x185f('0x8f')]=moment(_0xc4b2bf[_0x185f('0x73')])[_0x185f('0x95')](_0xfcdfd8[_0x185f('0x7e')],_0x185f('0x96'))[_0x185f('0x47')](_0x185f('0x80'));_0xb8671c[_0x185f('0x81')]=_0x185f('0x97');_0xb8671c[_0x185f('0x90')]=!![];_0xb8671c[_0x185f('0x98')]='FORWARD';_0xb8671c[_0x185f('0x99')]=_0xfcdfd8[_0x185f('0x9a')];_0xb8671c[_0x185f('0x9b')]=_0xfcdfd8['uniqueid'];logger[_0x185f('0x68')]('[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:FORWARDTRANSFER',_0xb8671c[_0x185f('0x50')],_0xb8671c[_0x185f('0x4e')]);var _0x488b16=this['queueReports'][_0xfcdfd8[_0x185f('0x94')]];this[_0x185f('0xc')][_0xfcdfd8[_0x185f('0x94')]]=this[_0x185f('0xc')][_0xfcdfd8['uniqueid']];this[_0x185f('0xc')][_0xfcdfd8['uniqueid']]=_0x488b16;}}else{_0xc4b2bf[_0x185f('0x81')]='COMPLETEDBY'+_0xfcdfd8['reason'][_0x185f('0x9c')]();logger[_0x185f('0x68')]('[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:%s',_0xc4b2bf['name'],_0xc4b2bf['type'],_0xc4b2bf[_0x185f('0x81')]);}}}this[_0x185f('0x32')][_0xfcdfd8[_0x185f('0x46')]]=_0xc4b2bf;this[_0x185f('0x84')](_0xc4b2bf,_0x185f('0x9d'));}}}catch(_0x105747){logger[_0x185f('0x3e')](_0x185f('0x8b'),_0xfcdfd8['uniqueid'],util[_0x185f('0x3d')](_0x105747,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x185f('0x9')][_0x185f('0x1f')]=function(_0x4f500c){try{if(this[_0x185f('0x60')](_0x4f500c)){logger[_0x185f('0x45')]('[%s][voiceQueueReport][varset]',_0x4f500c[_0x185f('0x46')],util[_0x185f('0x3d')](_0x4f500c,{'showHidden':![],'depth':null}));this[_0x185f('0x9e')](_0x4f500c[_0x185f('0x46')],_['keys'](_0x4f500c[_0x185f('0x9f')])[0x0],_0x4f500c[_0x185f('0xa0')]);if(this['queueReports'][_0x4f500c[_0x185f('0x46')]]){var _0x529aa7=_[_0x185f('0x7b')](this['queueReports'][_0x4f500c[_0x185f('0x46')]]);if(_0x529aa7){if(this[_0x185f('0x60')](_0x4f500c[_0x185f('0x9f')])&&this[_0x185f('0x60')](_0x4f500c[_0x185f('0x9f')][_0x185f('0xa1')])){switch(_0x4f500c[_0x185f('0xa0')]){case'CONTINUE':_0x529aa7[_0x185f('0x8e')]=![];_0x529aa7[_0x185f('0x8f')]=null;break;case _0x185f('0xa2'):_0x529aa7[_0x185f('0xa3')]=_0x185f('0xa4');_0x529aa7['queuecallerexit']=!![];_0x529aa7['queuecallerexitAt']=moment()[_0x185f('0x47')](_0x185f('0x80'));_0x529aa7[_0x185f('0x85')]=moment()[_0x185f('0x47')](_0x185f('0x80'));logger[_0x185f('0x45')](_0x185f('0xa5'),_0x4f500c[_0x185f('0x46')],util['inspect'](_0x529aa7,{'showHidden':![],'depth':null}));ami[_0x185f('0x43')](_0x185f('0xa6'),_0x529aa7);break;default:_0x529aa7[_0x185f('0x8e')]=!![];_0x529aa7[_0x185f('0x8f')]=moment()[_0x185f('0x47')](_0x185f('0x80'));_0x529aa7[_0x185f('0x85')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');}_0x529aa7[_0x185f('0x17')]=![];_0x529aa7['queuecallerabandonAt']=null;_0x529aa7[_0x185f('0x81')]=_0x4f500c[_0x185f('0xa0')];this[_0x185f('0x32')][_0x4f500c[_0x185f('0x46')]]=_0x529aa7;this[_0x185f('0x84')](_0x529aa7,_0x185f('0x1e'));}else if(this[_0x185f('0x60')](_0x4f500c['variable'])&&this[_0x185f('0x60')](_0x4f500c[_0x185f('0x9f')][_0x185f('0xa7')])){if(!_0x529aa7['queuecallerabandon']){_0x529aa7['queuecallerexit']=!![];_0x529aa7[_0x185f('0x8f')]=moment()[_0x185f('0x47')](_0x185f('0x80'));_0x529aa7[_0x185f('0x81')]=_0x185f('0xa8');_0x529aa7[_0x185f('0x85')]=moment()[_0x185f('0x47')](_0x185f('0x80'));this[_0x185f('0x32')][_0x4f500c[_0x185f('0x46')]]=_0x529aa7;}}logger[_0x185f('0x68')](_0x185f('0xa9'),_0x4f500c[_0x185f('0x46')],_0x529aa7[_0x185f('0x50')],_0x529aa7[_0x185f('0x4e')],_['keys'](_0x4f500c[_0x185f('0x9f')])[0x0],_0x4f500c['value']);_0x529aa7[_0x185f('0x11')]=this[_0x185f('0x11')][_0x4f500c[_0x185f('0x46')]];}}}}catch(_0x54c305){logger['error'](_0x185f('0xaa'),_0x4f500c['uniqueid'],util[_0x185f('0x3d')](_0x54c305,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x185f('0x9')][_0x185f('0x9e')]=function(_0x507c07,_0x27774f,_0x3a9b1c){var _0x1a8c86=['rtpaudioqos','rtpaudioqosbridged',_0x185f('0xab'),_0x185f('0xac'),'rtpaudioqosloss','rtpaudioqoslossbridged',_0x185f('0xad'),_0x185f('0xae'),_0x185f('0xaf'),_0x185f('0xb0'),_0x185f('0xb1'),'bridgepvtcallid',_0x185f('0xb2'),_0x185f('0xb3'),_0x185f('0xb4'),_0x185f('0xb5'),_0x185f('0x8d'),_0x185f('0xb6'),_0x185f('0xb7')];if(!_[_0x185f('0x36')](_0x27774f)&&!_[_0x185f('0xb8')](_0x1a8c86,_0x27774f)){if(_['isUndefined'](this[_0x185f('0x11')][_0x507c07])){this[_0x185f('0x11')][_0x507c07]={};}this['variables'][_0x507c07][_0x27774f]=_0x3a9b1c;}};VoiceQueueReport['prototype'][_0x185f('0x20')]=function(_0xf1bf59){try{if(this[_0x185f('0x60')](_0xf1bf59)){logger[_0x185f('0x45')]('[%s][voiceQueueReport][hangup]',_0xf1bf59[_0x185f('0x46')],util[_0x185f('0x3d')](_0xf1bf59,{'showHidden':![],'depth':null}));if(this[_0x185f('0xc')][_0xf1bf59[_0x185f('0x46')]]){for(var _0x1aedf8=0x0,_0x53bc4d={};_0x1aedf80x0?_0x42a4eb:0x0;this[_0x2250('0x14')][_0x4d9468['queue']][_0x2250('0x31')]=this['voiceQueues'][_0x4d9468[_0x2250('0x72')]][_0x2250('0x31')]>_['toNumber'](_0x4d9468['loggedin'])?_[_0x2250('0x74')](_0x4d9468[_0x2250('0x75')]):this[_0x2250('0x14')][_0x4d9468[_0x2250('0x72')]][_0x2250('0x31')];this['emitVoiceQueueSummary'](this[_0x2250('0x14')][_0x4d9468['queue']],'queuesummary');}logger[_0x2250('0x4a')]('[voiceQueueReport][queuesummary]\x20sending\x20queuesummary\x20event:',util[_0x2250('0x40')](this['voiceQueues'][_0x4d9468[_0x2250('0x72')]],{'showHidden':![],'depth':null}));ami[_0x2250('0x49')]('custom:queuesummary',this[_0x2250('0x14')][_0x4d9468[_0x2250('0x72')]]);}}}catch(_0x19a9c7){logger['error'](_0x2250('0x77'),util[_0x2250('0x40')](_0x19a9c7,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x2250('0xc')][_0x2250('0x1a')]=function(_0x1eed14){logger[_0x2250('0x4a')](_0x2250('0x78'),util['inspect'](_0x1eed14,{'showHidden':![],'depth':null}));this[_0x2250('0x15')]=!![];};VoiceQueueReport[_0x2250('0xc')][_0x2250('0x79')]=function(_0x44742b){try{if(this[_0x2250('0x69')](_0x44742b)){logger[_0x2250('0x4a')]('[%s][voiceQueueReport][queuecallerjoin]',_0x44742b['uniqueid'],util['inspect'](_0x44742b,{'showHidden':![],'depth':null}));if(_[_0x2250('0x6a')](this[_0x2250('0x10')][_0x44742b[_0x2250('0x4c')]])){this[_0x2250('0x10')][_0x44742b[_0x2250('0x4c')]]=[];this[_0x2250('0x12')][_0x44742b[_0x2250('0x4c')]]={};}var _0x57b51f=new QueueReport();_0x57b51f[_0x2250('0x4f')]=_0x44742b[_0x2250('0x72')];_0x57b51f[_0x2250('0x56')]=this[_0x2250('0x14')][_0x57b51f[_0x2250('0x4f')]]&&this[_0x2250('0x14')][_0x57b51f['name']][_0x2250('0x56')]?this['voiceQueues'][_0x57b51f['name']][_0x2250('0x56')]||_0x2250('0x57'):_0x2250('0x57');_0x57b51f[_0x2250('0x72')]=_0x44742b[_0x2250('0x72')];_0x57b51f[_0x2250('0x7a')]=moment()[_0x2250('0x4d')](_0x2250('0x7b'));_0x57b51f[_0x2250('0x7c')]=_0x44742b['position'];_0x57b51f[_0x2250('0x7d')]=_0x44742b[_0x2250('0x7d')];_0x57b51f[_0x2250('0x4c')]=_0x44742b[_0x2250('0x4c')];logger['info'](_0x2250('0x7e'),_0x57b51f[_0x2250('0x4f')],_0x57b51f['type']);_[_0x2250('0x7f')](_0x57b51f,_['pick'](_0x44742b,_['keys'](_0x57b51f)));this[_0x2250('0x10')][_0x44742b['uniqueid']]['push'](_0x57b51f);this[_0x2250('0x12')][_0x44742b[_0x2250('0x4c')]]=_0x57b51f;this[_0x2250('0x80')](_0x57b51f,_0x2250('0x81'));}}catch(_0x5e6a96){logger[_0x2250('0x3f')]('[%s][voiceQueueReport][queuecallerjoin]',_0x44742b['uniqueid'],util[_0x2250('0x40')](_0x5e6a96,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype']['syncQueueCallerAbandon']=function(_0x25ca70){try{if(this['isNotNull'](_0x25ca70)){logger[_0x2250('0x4a')]('[%s][voiceQueueReport][queuecallerabandon]',_0x25ca70[_0x2250('0x4c')],util['inspect'](_0x25ca70,{'showHidden':![],'depth':null}));if(this[_0x2250('0x10')][_0x25ca70['uniqueid']]){var _0x1fefb7=_[_0x2250('0x82')](this[_0x2250('0x10')][_0x25ca70[_0x2250('0x4c')]]);_0x1fefb7[_0x2250('0x83')]=![];_0x1fefb7[_0x2250('0x84')]=null;_0x1fefb7['holdtime']=_0x25ca70[_0x2250('0x85')];_0x1fefb7[_0x2250('0x86')]=_0x25ca70[_0x2250('0x86')];_0x1fefb7['queuecallerabandon']=!![];_0x1fefb7['queuecallerabandonAt']=moment()[_0x2250('0x4d')](_0x2250('0x7b'));_0x1fefb7['queuecallerexitreason']=_0x2250('0x87');_0x1fefb7[_0x2250('0x88')]=null;logger[_0x2250('0x70')](_0x2250('0x89'),_0x1fefb7[_0x2250('0x4f')],_0x1fefb7['type']);this[_0x2250('0x12')][_0x25ca70[_0x2250('0x4c')]]=_0x1fefb7;this[_0x2250('0x47')](_0x1fefb7,'queuecallerabandon');}}}catch(_0x2a4940){logger[_0x2250('0x3f')]('[%s][voiceQueueReport][queuecallerabandon]',_0x25ca70[_0x2250('0x4c')],util[_0x2250('0x40')](_0x2a4940,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0x2250('0x1e')]=function(_0x550a10){try{if(this[_0x2250('0x69')](_0x550a10)){logger['debug'](_0x2250('0x8a'),_0x550a10[_0x2250('0x4c')],util['inspect'](_0x550a10,{'showHidden':![],'depth':null}));if(this[_0x2250('0x10')][_0x550a10['uniqueid']]){var _0x2ac3a0=_['last'](this[_0x2250('0x10')][_0x550a10[_0x2250('0x4c')]]);_0x2ac3a0[_0x2250('0x8b')]=moment()[_0x2250('0x4d')](_0x2250('0x7b'));_0x2ac3a0['connectedlinenum']=_0x550a10[_0x2250('0x8c')];_0x2ac3a0[_0x2250('0x8d')]=_0x550a10[_0x2250('0x8d')];logger[_0x2250('0x70')](_0x2250('0x8e'),_0x2ac3a0[_0x2250('0x4f')],_0x2ac3a0[_0x2250('0x56')],_0x550a10[_0x2250('0x8c')],_0x550a10[_0x2250('0x8d')]);this[_0x2250('0x12')][_0x550a10[_0x2250('0x4c')]]=_0x2ac3a0;this[_0x2250('0x80')](_0x2ac3a0,_0x2250('0x1d'));}}}catch(_0x24efb2){logger['error']('[%s][voiceQueueReport][queuecallerleave]',_0x550a10['uniqueid'],util['inspect'](_0x24efb2,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0x2250('0x22')]=function(_0x2e1aac){try{if(this[_0x2250('0x69')](_0x2e1aac)){logger[_0x2250('0x4a')](_0x2250('0x8f'),_0x2e1aac['uniqueid'],util[_0x2250('0x40')](_0x2e1aac,{'showHidden':![],'depth':null}));if(this[_0x2250('0x10')][_0x2e1aac[_0x2250('0x4c')]]){var _0x590d28=_[_0x2250('0x82')](this[_0x2250('0x10')][_0x2e1aac[_0x2250('0x4c')]]);_0x590d28[_0x2250('0x83')]=!![];_0x590d28[_0x2250('0x90')]=_0x2250('0x91');logger[_0x2250('0x70')]('[voiceQueueReport][agentconnect]\x20name:%s\x20type:%s\x20queuecallerexitreason:COMPLETEDBYAGENT',_0x590d28[_0x2250('0x4f')],_0x590d28[_0x2250('0x56')]);}}}catch(_0x309ab8){logger['error'](_0x2250('0x8f'),_0x2e1aac['uniqueid'],util[_0x2250('0x40')](_0x309ab8,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x2250('0xc')][_0x2250('0x20')]=function(_0x201f70){try{if(this[_0x2250('0x69')](_0x201f70)){logger[_0x2250('0x4a')](_0x2250('0x92'),_0x201f70['uniqueid'],util[_0x2250('0x40')](_0x201f70,{'showHidden':![],'depth':null}));if(this[_0x2250('0x10')][_0x201f70[_0x2250('0x4c')]]){var _0x50a5af=_[_0x2250('0x82')](this[_0x2250('0x10')][_0x201f70['uniqueid']]);_0x50a5af['queuecallerabandon']=![];_0x50a5af[_0x2250('0x93')]=null;_0x50a5af[_0x2250('0x94')]=!![];_0x50a5af[_0x2250('0x88')]=_0x201f70['membername'];_0x50a5af['holdtime']=_0x201f70[_0x2250('0x85')];_0x50a5af[_0x2250('0x83')]=!![];_0x50a5af[_0x2250('0x95')]=![];_0x50a5af[_0x2250('0x96')]=null;if(!_0x50a5af['transfer']){if(_0x201f70[_0x2250('0x97')]==_0x2250('0x98')){_0x50a5af[_0x2250('0x90')]=_0x2250('0x99');logger[_0x2250('0x70')]('[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:COMPLETED',_0x50a5af['name'],_0x50a5af[_0x2250('0x56')]);}else{if(_[_0x2250('0x9a')](_0x201f70[_0x2250('0x3b')]['toLowerCase'](),_0x2250('0x9b'))){if(this[_0x2250('0x10')][_0x201f70[_0x2250('0x9c')]]){var _0xcb097f=_[_0x2250('0x82')](this[_0x2250('0x10')][_0x201f70[_0x2250('0x9c')]]);_0xcb097f[_0x2250('0x83')]=![];_0xcb097f[_0x2250('0x95')]=!![];_0xcb097f[_0x2250('0x96')]=moment(_0x50a5af['queuecallerjoinAt'])[_0x2250('0x9d')](_0x201f70[_0x2250('0x85')],_0x2250('0x9e'))[_0x2250('0x4d')](_0x2250('0x7b'));_0xcb097f[_0x2250('0x90')]=_0x2250('0x9f');_0xcb097f[_0x2250('0x98')]=!![];_0xcb097f[_0x2250('0xa0')]=_0x2250('0xa1');_0xcb097f['transferexten']=_0x201f70[_0x2250('0xa2')];_0xcb097f[_0x2250('0xa3')]=_0x201f70[_0x2250('0x4c')];logger['info'](_0x2250('0xa4'),_0xcb097f[_0x2250('0x4f')],_0xcb097f[_0x2250('0x56')]);var _0x51ef77=this[_0x2250('0x10')][_0x201f70[_0x2250('0x9c')]];this['queueReports'][_0x201f70[_0x2250('0x9c')]]=this[_0x2250('0x10')][_0x201f70[_0x2250('0x4c')]];this[_0x2250('0x10')][_0x201f70[_0x2250('0x4c')]]=_0x51ef77;}}else{_0x50a5af['queuecallerexitreason']=_0x2250('0xa5')+_0x201f70[_0x2250('0x97')]['toUpperCase']();logger[_0x2250('0x70')](_0x2250('0xa6'),_0x50a5af[_0x2250('0x4f')],_0x50a5af[_0x2250('0x56')],_0x50a5af[_0x2250('0x90')]);}}}this[_0x2250('0x12')][_0x201f70[_0x2250('0x4c')]]=_0x50a5af;this['emitVoiceQueueChannelRemove'](_0x50a5af,_0x2250('0x1f'));}}}catch(_0x9f55c0){logger[_0x2250('0x3f')](_0x2250('0x92'),_0x201f70[_0x2250('0x4c')],util[_0x2250('0x40')](_0x9f55c0,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0x2250('0xa7')]=function(_0x1f9674){try{if(this[_0x2250('0x69')](_0x1f9674)){logger[_0x2250('0x4a')](_0x2250('0xa8'),_0x1f9674['uniqueid'],util[_0x2250('0x40')](_0x1f9674,{'showHidden':![],'depth':null}));this[_0x2250('0xa9')](_0x1f9674['uniqueid'],_[_0x2250('0xaa')](_0x1f9674[_0x2250('0xab')])[0x0],_0x1f9674[_0x2250('0xac')]);if(this[_0x2250('0x10')][_0x1f9674[_0x2250('0x4c')]]){var _0x16d55d=_[_0x2250('0x82')](this[_0x2250('0x10')][_0x1f9674['uniqueid']]);if(_0x16d55d){if(this['isNotNull'](_0x1f9674[_0x2250('0xab')])&&this[_0x2250('0x69')](_0x1f9674[_0x2250('0xab')][_0x2250('0xad')])){switch(_0x1f9674[_0x2250('0xac')]){case _0x2250('0xae'):_0x16d55d['queuecallerexit']=![];_0x16d55d[_0x2250('0x96')]=null;break;case _0x2250('0xaf'):_0x16d55d['lastevent']=_0x2250('0xb0');_0x16d55d[_0x2250('0x95')]=!![];_0x16d55d['queuecallerexitAt']=moment()[_0x2250('0x4d')](_0x2250('0x7b'));_0x16d55d[_0x2250('0x8b')]=moment()[_0x2250('0x4d')](_0x2250('0x7b'));logger['debug'](_0x2250('0xb1'),_0x1f9674[_0x2250('0x4c')],util[_0x2250('0x40')](_0x16d55d,{'showHidden':![],'depth':null}));ami[_0x2250('0x49')](_0x2250('0xb2'),_0x16d55d);break;default:_0x16d55d[_0x2250('0x95')]=!![];_0x16d55d['queuecallerexitAt']=moment()[_0x2250('0x4d')](_0x2250('0x7b'));_0x16d55d[_0x2250('0x8b')]=moment()[_0x2250('0x4d')](_0x2250('0x7b'));}_0x16d55d['queuecallerabandon']=![];_0x16d55d[_0x2250('0x93')]=null;_0x16d55d[_0x2250('0x90')]=_0x1f9674[_0x2250('0xac')];this[_0x2250('0x12')][_0x1f9674['uniqueid']]=_0x16d55d;this['emitVoiceQueueChannelRemove'](_0x16d55d,'varset');}else if(this['isNotNull'](_0x1f9674['variable'])&&this['isNotNull'](_0x1f9674['variable'][_0x2250('0xb3')])){if(!_0x16d55d['queuecallerabandon']){_0x16d55d[_0x2250('0x95')]=!![];_0x16d55d['queuecallerexitAt']=moment()['format'](_0x2250('0x7b'));_0x16d55d['queuecallerexitreason']=_0x2250('0xb4');_0x16d55d['queuecallerleaveAt']=moment()[_0x2250('0x4d')](_0x2250('0x7b'));this[_0x2250('0x12')][_0x1f9674[_0x2250('0x4c')]]=_0x16d55d;}}logger[_0x2250('0x70')](_0x2250('0xb5'),_0x1f9674[_0x2250('0x4c')],_0x16d55d['name'],_0x16d55d[_0x2250('0x56')],_[_0x2250('0xaa')](_0x1f9674[_0x2250('0xab')])[0x0],_0x1f9674[_0x2250('0xac')]);_0x16d55d[_0x2250('0x42')]=this[_0x2250('0x42')][_0x1f9674['uniqueid']];}}}}catch(_0x1eb886){logger[_0x2250('0x3f')]('[%s][voiceQueueReport][varset]',_0x1f9674['uniqueid'],util['inspect'](_0x1eb886,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x2250('0xc')]['addVariable']=function(_0x55af79,_0x173310,_0x4ad1a3){var _0x2458ab=['rtpaudioqos',_0x2250('0xb6'),_0x2250('0xb7'),_0x2250('0xb8'),'rtpaudioqosloss',_0x2250('0xb9'),'rtpaudioqosrtt','rtpaudioqosrttbridged',_0x2250('0xba'),_0x2250('0xbb'),_0x2250('0xbc'),_0x2250('0xbd'),_0x2250('0xbe'),'memberdynamic',_0x2250('0xbf'),_0x2250('0xc0'),_0x2250('0xc1'),_0x2250('0xc2'),'memberrealtime'];if(!_['isNil'](_0x173310)&&!_['includes'](_0x2458ab,_0x173310)){if(_[_0x2250('0x6a')](this['variables'][_0x55af79])){this[_0x2250('0x42')][_0x55af79]={};}this[_0x2250('0x42')][_0x55af79][_0x173310]=_0x4ad1a3;}};VoiceQueueReport[_0x2250('0xc')][_0x2250('0x24')]=function(_0x409b5e){try{if(this[_0x2250('0x69')](_0x409b5e)){logger['debug'](_0x2250('0xc3'),_0x409b5e[_0x2250('0x4c')],util[_0x2250('0x40')](_0x409b5e,{'showHidden':![],'depth':null}));if(this[_0x2250('0x10')][_0x409b5e[_0x2250('0x4c')]]){for(var _0x1abcd3=0x0,_0x5d3b2c={};_0x1abcd3=0x0?moment(_0x2844c4[_0x3800('0x17')])[_0x3800('0xb')](_0x2844c4['starttime'],_0x3800('0x19')):null,'data1':'outbound','data2':_0x2844c4[_0x3800('0x11')],'data3':_0x2844c4[_0x3800('0xe')],'data4':_0x2844c4[_0x3800('0x1a')]||null,'role':'agent','internal':_0x2844c4[_0x3800('0x11')]?_['toNumber'](_0x2844c4[_0x3800('0x11')]):undefined,'uniqueid':_0x2844c4[_0x3800('0x13')]},'log':'CreateMemberReport'});}; \ No newline at end of file +var _0x697c=['lodash','../client','voiceQueueReport','queuecallerexitAt','Request','CreateMemberReport','voice','lastAssignedTo','isNil','interface','format','SIP/%s','TALKING','queuecallerleaveAt','diff','seconds','calleridnum','exten','queue','agent','accountcode','toNumber','uniqueid','voiceDialReport','starttime','endtime','dialstring','moment'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x697c,0x14f));var _0xc697=function(_0x44fbb7,_0x276fe7){_0x44fbb7=_0x44fbb7-0x0;var _0x1d7f71=_0x697c[_0x44fbb7];return _0x1d7f71;};'use strict';var moment=require(_0xc697('0x0'));var _=require(_0xc697('0x1'));var util=require('util');var client=require(_0xc697('0x2'));exports[_0xc697('0x3')]=function(_0x447587){var _0x113fce=_0x447587['queuecallercompleteAt']||_0x447587[_0xc697('0x4')];return client[_0xc697('0x5')](_0xc697('0x6'),{'body':{'channel':_0xc697('0x7'),'membername':_0x447587[_0xc697('0x8')],'interface':_[_0xc697('0x9')](_0x447587[_0xc697('0xa')])?util[_0xc697('0xb')](_0xc697('0xc'),_0x447587[_0xc697('0x8')]):_0x447587[_0xc697('0xa')],'type':_0xc697('0xd'),'enterAt':_0x447587[_0xc697('0xe')],'exitAt':_0x113fce,'duration':moment(_0x113fce)[_0xc697('0xf')](_0x447587[_0xc697('0xe')],_0xc697('0x10')),'data1':'inbound','data2':_0x447587[_0xc697('0x11')],'data3':_0x447587[_0xc697('0x12')],'data4':null,'data5':_0x447587[_0xc697('0x13')],'role':_0xc697('0x14'),'internal':_0x447587[_0xc697('0x15')]?_[_0xc697('0x16')](_0x447587['accountcode']):undefined,'uniqueid':_0x447587[_0xc697('0x17')]},'log':_0xc697('0x6')});};exports[_0xc697('0x18')]=function(_0x8a60a1){return client[_0xc697('0x5')]('CreateMemberReport',{'body':{'channel':_0xc697('0x7'),'membername':_0x8a60a1['membername'],'interface':_0x8a60a1['interface'],'type':'TALKING','enterAt':_0x8a60a1[_0xc697('0x19')],'exitAt':_0x8a60a1['endtime'],'duration':moment(_0x8a60a1[_0xc697('0x1a')])[_0xc697('0xf')](_0x8a60a1[_0xc697('0x19')],_0xc697('0x10'))>=0x0?moment(_0x8a60a1[_0xc697('0x1a')])[_0xc697('0xf')](_0x8a60a1['starttime'],'seconds'):null,'data1':'outbound','data2':_0x8a60a1[_0xc697('0x15')],'data3':_0x8a60a1['exten'],'data4':_0x8a60a1[_0xc697('0x1b')]||null,'role':_0xc697('0x14'),'internal':_0x8a60a1[_0xc697('0x15')]?_['toNumber'](_0x8a60a1[_0xc697('0x15')]):undefined,'uniqueid':_0x8a60a1[_0xc697('0x17')]},'log':'CreateMemberReport'});}; \ No newline at end of file diff --git a/server/services/ami/rpc/setting.js b/server/services/ami/rpc/setting.js index b192e32..9e01a01 100644 --- a/server/services/ami/rpc/setting.js +++ b/server/services/ami/rpc/setting.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x94df=['GetSettings','../client','getSettings','Request','ShowSetting','stopRecordingOnTransfer'];(function(_0xafe71f,_0x5bb1d2){var _0x187685=function(_0x173bc2){while(--_0x173bc2){_0xafe71f['push'](_0xafe71f['shift']());}};_0x187685(++_0x5bb1d2);}(_0x94df,0xa3));var _0xf94d=function(_0x4d44f3,_0x210f73){_0x4d44f3=_0x4d44f3-0x0;var _0x2b0aba=_0x94df[_0x4d44f3];return _0x2b0aba;};'use strict';var client=require(_0xf94d('0x0'));exports[_0xf94d('0x1')]=function(){return client[_0xf94d('0x2')](_0xf94d('0x3'),{'options':{'raw':!![],'where':{'id':0x1},'attributes':[_0xf94d('0x4')]},'log':_0xf94d('0x5')});}; \ No newline at end of file +var _0xba78=['GetSettings','../client','Request','ShowSetting'];(function(_0x4acb64,_0x281268){var _0x375074=function(_0x37a13a){while(--_0x37a13a){_0x4acb64['push'](_0x4acb64['shift']());}};_0x375074(++_0x281268);}(_0xba78,0x159));var _0x8ba7=function(_0x19c79c,_0x3642e9){_0x19c79c=_0x19c79c-0x0;var _0x1b92c2=_0xba78[_0x19c79c];return _0x1b92c2;};'use strict';var client=require(_0x8ba7('0x0'));exports['getSettings']=function(){return client[_0x8ba7('0x1')](_0x8ba7('0x2'),{'options':{'raw':!![],'where':{'id':0x1},'attributes':['stopRecordingOnTransfer']},'log':_0x8ba7('0x3')});}; \ No newline at end of file diff --git a/server/services/ami/rpc/template.js b/server/services/ami/rpc/template.js index a520e7e..25622a6 100644 --- a/server/services/ami/rpc/template.js +++ b/server/services/ami/rpc/template.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3e9e=['GetTemplate','html','getTemplates'];(function(_0x57c0b6,_0xb6a157){var _0x4a3844=function(_0x5a39cc){while(--_0x5a39cc){_0x57c0b6['push'](_0x57c0b6['shift']());}};_0x4a3844(++_0xb6a157);}(_0x3e9e,0x13d));var _0xe3e9=function(_0x18e3d6,_0x4131cb){_0x18e3d6=_0x18e3d6-0x0;var _0x13aa18=_0x3e9e[_0x18e3d6];return _0x13aa18;};'use strict';var client=require('../client');exports[_0xe3e9('0x0')]=function(_0x5f18b7){return function(_0xca8454){return client['Request'](_0xe3e9('0x1'),{'options':{'raw':!![],'attributes':['id','name',_0xe3e9('0x2')]},'log':'GetTemplate'});};}; \ No newline at end of file +var _0x056b=['name','html','getTemplates','Request','GetTemplate'];(function(_0x5ad0d7,_0x2645f8){var _0xd83bd=function(_0x33d3bd){while(--_0x33d3bd){_0x5ad0d7['push'](_0x5ad0d7['shift']());}};_0xd83bd(++_0x2645f8);}(_0x056b,0xb6));var _0xb056=function(_0x1aa2a2,_0x570bb3){_0x1aa2a2=_0x1aa2a2-0x0;var _0x596b90=_0x056b[_0x1aa2a2];return _0x596b90;};'use strict';var client=require('../client');exports[_0xb056('0x0')]=function(_0x556e84){return function(_0xed6810){return client[_0xb056('0x1')](_0xb056('0x2'),{'options':{'raw':!![],'attributes':['id',_0xb056('0x3'),_0xb056('0x4')]},'log':_0xb056('0x2')});};}; \ No newline at end of file diff --git a/server/services/ami/rpc/trigger.js b/server/services/ami/rpc/trigger.js index 262a905..9e6941a 100644 --- a/server/services/ami/rpc/trigger.js +++ b/server/services/ami/rpc/trigger.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd2a2=['status','Condition','AllConditions','operator','value','AnyConditions','field','Actions','action','data1','data2','data3','data4','data5','data6','data7','../client','GetTrigger','name','channel'];(function(_0x23b57c,_0xdc7f98){var _0x4c3b1d=function(_0x283147){while(--_0x283147){_0x23b57c['push'](_0x23b57c['shift']());}};_0x4c3b1d(++_0xdc7f98);}(_0xd2a2,0xb0));var _0x2d2a=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xd2a2[_0x3dd15e];return _0x231fd0;};'use strict';var client=require(_0x2d2a('0x0'));exports['getTriggers']=function(_0x57cfa3){return function(_0xd384e6){return client['Request'](_0x2d2a('0x1'),{'options':{'raw':![],'attributes':['id',_0x2d2a('0x2'),_0x2d2a('0x3'),_0x2d2a('0x4')],'include':[{'model':_0x2d2a('0x5'),'as':_0x2d2a('0x6'),'attributes':['id','field',_0x2d2a('0x7'),_0x2d2a('0x8')]},{'model':_0x2d2a('0x5'),'as':_0x2d2a('0x9'),'attributes':['id',_0x2d2a('0xa'),_0x2d2a('0x7'),_0x2d2a('0x8')]},{'model':'Action','as':_0x2d2a('0xb'),'attributes':['id',_0x2d2a('0xc'),_0x2d2a('0xd'),_0x2d2a('0xe'),_0x2d2a('0xf'),_0x2d2a('0x10'),_0x2d2a('0x11'),_0x2d2a('0x12'),_0x2d2a('0x13')]}]},'log':_0x2d2a('0x1')});};}; \ No newline at end of file +var _0x4173=['data2','data4','data5','data7','../client','getTriggers','Request','GetTrigger','Condition','AllConditions','field','operator','value','AnyConditions','Action','Actions','action'];(function(_0x13a204,_0xf1a6c){var _0x2c6221=function(_0x88ae01){while(--_0x88ae01){_0x13a204['push'](_0x13a204['shift']());}};_0x2c6221(++_0xf1a6c);}(_0x4173,0xf2));var _0x3417=function(_0x4f3949,_0x1b28b5){_0x4f3949=_0x4f3949-0x0;var _0x2bbb60=_0x4173[_0x4f3949];return _0x2bbb60;};'use strict';var client=require(_0x3417('0x0'));exports[_0x3417('0x1')]=function(_0x5cde4f){return function(_0x1ec627){return client[_0x3417('0x2')](_0x3417('0x3'),{'options':{'raw':![],'attributes':['id','name','channel','status'],'include':[{'model':_0x3417('0x4'),'as':_0x3417('0x5'),'attributes':['id',_0x3417('0x6'),_0x3417('0x7'),_0x3417('0x8')]},{'model':_0x3417('0x4'),'as':_0x3417('0x9'),'attributes':['id','field',_0x3417('0x7'),'value']},{'model':_0x3417('0xa'),'as':_0x3417('0xb'),'attributes':['id',_0x3417('0xc'),'data1',_0x3417('0xd'),'data3',_0x3417('0xe'),_0x3417('0xf'),'data6',_0x3417('0x10')]}]},'log':_0x3417('0x3')});};}; \ No newline at end of file diff --git a/server/services/ami/rpc/trunk.js b/server/services/ami/rpc/trunk.js index a2558b1..71614df 100644 --- a/server/services/ami/rpc/trunk.js +++ b/server/services/ami/rpc/trunk.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xab0a=['Request','GetTrunk','name','defaultuser','../client','getTrunks'];(function(_0x34aebf,_0xdd95f8){var _0x45d164=function(_0x480fea){while(--_0x480fea){_0x34aebf['push'](_0x34aebf['shift']());}};_0x45d164(++_0xdd95f8);}(_0xab0a,0x1f0));var _0xaab0=function(_0x5777ce,_0x1b74ba){_0x5777ce=_0x5777ce-0x0;var _0x217ab9=_0xab0a[_0x5777ce];return _0x217ab9;};'use strict';var client=require(_0xaab0('0x0'));exports[_0xaab0('0x1')]=function(_0x40fabe){return function(_0xb37896){return client[_0xaab0('0x2')](_0xaab0('0x3'),{'options':{'raw':!![],'where':{'active':0x1},'attributes':['id',_0xaab0('0x4'),'registry',_0xaab0('0x5')]},'log':_0xaab0('0x3')});};}; \ No newline at end of file +var _0xb790=['defaultuser','getTrunks','GetTrunk'];(function(_0x243b59,_0x3f9495){var _0x3e1676=function(_0x354052){while(--_0x354052){_0x243b59['push'](_0x243b59['shift']());}};_0x3e1676(++_0x3f9495);}(_0xb790,0xe5));var _0x0b79=function(_0x5de818,_0x7c4485){_0x5de818=_0x5de818-0x0;var _0x345670=_0xb790[_0x5de818];return _0x345670;};'use strict';var client=require('../client');exports[_0x0b79('0x0')]=function(_0x557e0e){return function(_0x59dbe8){return client['Request'](_0x0b79('0x1'),{'options':{'raw':!![],'where':{'active':0x1},'attributes':['id','name','registry',_0x0b79('0x2')]},'log':_0x0b79('0x1')});};}; \ No newline at end of file diff --git a/server/services/ami/rpc/user.js b/server/services/ami/rpc/user.js index 955777c..e420caa 100644 --- a/server/services/ami/rpc/user.js +++ b/server/services/ami/rpc/user.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xcb91=['UnpauseUser','getAgent','ShowUser','email','lastPauseAt','Request','GetUser','agent','name','accountcode','fullname','lastLoginAt','pauseType','voicePause','phone','interface','getAgents','internal','getTelephones','savePause','PauseUser'];(function(_0x15a76a,_0x58645f){var _0x3cd894=function(_0x2e524d){while(--_0x2e524d){_0x15a76a['push'](_0x15a76a['shift']());}};_0x3cd894(++_0x58645f);}(_0xcb91,0x1a9));var _0x1cb9=function(_0x3a8dc1,_0x2f03b8){_0x3a8dc1=_0x3a8dc1-0x0;var _0x4b3595=_0xcb91[_0x3a8dc1];return _0x4b3595;};'use strict';var client=require('../client');exports['getAgents']=function(){return function(){return client[_0x1cb9('0x0')](_0x1cb9('0x1'),{'options':{'raw':![],'where':{'role':_0x1cb9('0x2')},'attributes':['id',_0x1cb9('0x3'),'email',_0x1cb9('0x4'),_0x1cb9('0x5'),'online',_0x1cb9('0x6'),_0x1cb9('0x7'),'lastPauseAt',_0x1cb9('0x8'),_0x1cb9('0x9'),'mobile',_0x1cb9('0xa')]},'log':_0x1cb9('0xb')});};};exports['getTelephones']=function(){return function(){return client[_0x1cb9('0x0')]('GetUser',{'options':{'raw':!![],'where':{'role':'telephone'},'attributes':['id',_0x1cb9('0x3'),_0x1cb9('0x4'),_0x1cb9('0xc')]},'log':_0x1cb9('0xd')});};};exports[_0x1cb9('0xe')]=function(_0x50ce71,_0x9b58f1,_0x44a6b4){return client[_0x1cb9('0x0')](_0x1cb9('0xf'),{'body':{'type':_0x9b58f1,'uniqueid':_0x44a6b4},'options':{'where':{'id':_0x50ce71['id']}},'log':_0x1cb9('0xe')});};exports['saveUnpause']=function(_0x5e3c19){return client['Request'](_0x1cb9('0x10'),{'body':{},'options':{'where':{'id':_0x5e3c19['id']}},'log':_0x1cb9('0xe')});};exports[_0x1cb9('0x11')]=function(_0x1c714f){return client['Request'](_0x1cb9('0x12'),{'options':{'raw':![],'where':{'role':_0x1cb9('0x2'),'id':_0x1c714f},'attributes':['id',_0x1cb9('0x3'),_0x1cb9('0x13'),_0x1cb9('0x4'),'fullname','online',_0x1cb9('0x6'),_0x1cb9('0x7'),_0x1cb9('0x14'),_0x1cb9('0x8'),_0x1cb9('0xa')]},'log':_0x1cb9('0x11')});}; \ No newline at end of file +var _0x34e8=['../client','getAgents','Request','GetUser','name','email','accountcode','fullname','online','lastLoginAt','pauseType','voicePause','mobile','interface','getTelephones','telephone','internal','savePause','PauseUser','saveUnpause','UnpauseUser','getAgent','ShowUser','agent','lastPauseAt'];(function(_0x1517ab,_0x47a398){var _0x21e815=function(_0x29b2c5){while(--_0x29b2c5){_0x1517ab['push'](_0x1517ab['shift']());}};_0x21e815(++_0x47a398);}(_0x34e8,0x12c));var _0x834e=function(_0x2dc707,_0x334816){_0x2dc707=_0x2dc707-0x0;var _0x2ef54=_0x34e8[_0x2dc707];return _0x2ef54;};'use strict';var client=require(_0x834e('0x0'));exports[_0x834e('0x1')]=function(){return function(){return client[_0x834e('0x2')](_0x834e('0x3'),{'options':{'raw':![],'where':{'role':'agent'},'attributes':['id',_0x834e('0x4'),_0x834e('0x5'),_0x834e('0x6'),_0x834e('0x7'),_0x834e('0x8'),_0x834e('0x9'),_0x834e('0xa'),'lastPauseAt',_0x834e('0xb'),'phone',_0x834e('0xc'),_0x834e('0xd')]},'log':_0x834e('0x1')});};};exports[_0x834e('0xe')]=function(){return function(){return client[_0x834e('0x2')](_0x834e('0x3'),{'options':{'raw':!![],'where':{'role':_0x834e('0xf')},'attributes':['id',_0x834e('0x4'),_0x834e('0x6'),_0x834e('0x10')]},'log':_0x834e('0xe')});};};exports[_0x834e('0x11')]=function(_0x14038b,_0x2e1a37,_0x293514){return client[_0x834e('0x2')](_0x834e('0x12'),{'body':{'type':_0x2e1a37,'uniqueid':_0x293514},'options':{'where':{'id':_0x14038b['id']}},'log':'savePause'});};exports[_0x834e('0x13')]=function(_0x6cd9b9){return client['Request'](_0x834e('0x14'),{'body':{},'options':{'where':{'id':_0x6cd9b9['id']}},'log':_0x834e('0x11')});};exports[_0x834e('0x15')]=function(_0x21cc0a){return client['Request'](_0x834e('0x16'),{'options':{'raw':![],'where':{'role':_0x834e('0x17'),'id':_0x21cc0a},'attributes':['id','name',_0x834e('0x5'),'accountcode',_0x834e('0x7'),_0x834e('0x8'),'lastLoginAt',_0x834e('0xa'),_0x834e('0x18'),_0x834e('0xb'),'interface']},'log':_0x834e('0x15')});}; \ No newline at end of file diff --git a/server/services/ami/rpc/voiceAgentReport.js b/server/services/ami/rpc/voiceAgentReport.js index 94193ae..99112ed 100644 --- a/server/services/ami/rpc/voiceAgentReport.js +++ b/server/services/ami/rpc/voiceAgentReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x52ea=['CreateVoiceAgentReport','update','UpdateVoiceAgentReport','create','Request'];(function(_0x17418d,_0x3046fd){var _0x2108c6=function(_0x3a89a1){while(--_0x3a89a1){_0x17418d['push'](_0x17418d['shift']());}};_0x2108c6(++_0x3046fd);}(_0x52ea,0x1d9));var _0xa52e=function(_0x1a37df,_0x3ed536){_0x1a37df=_0x1a37df-0x0;var _0x5a7d5f=_0x52ea[_0x1a37df];return _0x5a7d5f;};'use strict';var client=require('../client');exports[_0xa52e('0x0')]=function(_0x35216b){return client[_0xa52e('0x1')](_0xa52e('0x2'),{'body':_0x35216b,'log':_0xa52e('0x2')});};exports[_0xa52e('0x3')]=function(_0x29b52a,_0x3747e1,_0x40e2e0){return client[_0xa52e('0x1')](_0xa52e('0x4'),{'body':_0x29b52a,'options':{'where':{'uniqueid':_0x3747e1,'interface':_0x40e2e0,'agentcomplete':!![]}},'log':_0xa52e('0x4')});}; \ No newline at end of file +var _0x619d=['../client','create','CreateVoiceAgentReport','Request','UpdateVoiceAgentReport'];(function(_0x76a502,_0x32fe16){var _0x186387=function(_0xc7c62c){while(--_0xc7c62c){_0x76a502['push'](_0x76a502['shift']());}};_0x186387(++_0x32fe16);}(_0x619d,0x163));var _0xd619=function(_0x5d7697,_0x3c75d8){_0x5d7697=_0x5d7697-0x0;var _0x4ea626=_0x619d[_0x5d7697];return _0x4ea626;};'use strict';var client=require(_0xd619('0x0'));exports[_0xd619('0x1')]=function(_0x47cacc){return client['Request'](_0xd619('0x2'),{'body':_0x47cacc,'log':_0xd619('0x2')});};exports['update']=function(_0x126692,_0x4a9695,_0x45cc58){return client[_0xd619('0x3')](_0xd619('0x4'),{'body':_0x126692,'options':{'where':{'uniqueid':_0x4a9695,'interface':_0x45cc58,'agentcomplete':!![]}},'log':'UpdateVoiceAgentReport'});}; \ No newline at end of file diff --git a/server/services/ami/rpc/voiceCallReport.js b/server/services/ami/rpc/voiceCallReport.js index e54bf2d..2f224ed 100644 --- a/server/services/ami/rpc/voiceCallReport.js +++ b/server/services/ami/rpc/voiceCallReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x58fe=['context','callerid','DOCUMENTATION','CreateVoiceCallReport','getVoiceCallReports','GetVoiceCallReport','startOf','day','format','YYYY-MM-DD\x20HH:mm:ss','endOf','type','disposition','duration','billableseconds','GetVoiceCallReports','moment','util','../client','create','Request','calleridnum'];(function(_0x4fe19c,_0x45d0fe){var _0x952ac7=function(_0x274a16){while(--_0x274a16){_0x4fe19c['push'](_0x4fe19c['shift']());}};_0x952ac7(++_0x45d0fe);}(_0x58fe,0x12e));var _0xe58f=function(_0x29ce14,_0x334166){_0x29ce14=_0x29ce14-0x0;var _0x48f289=_0x58fe[_0x29ce14];return _0x48f289;};'use strict';var moment=require(_0xe58f('0x0'));var util=require(_0xe58f('0x1'));var _=require('lodash');var client=require(_0xe58f('0x2'));exports[_0xe58f('0x3')]=function(_0x3ad513){return client[_0xe58f('0x4')]('CreateVoiceCallReport',{'body':_['merge'](_0x3ad513,{'source':_0x3ad513[_0xe58f('0x5')],'destinationcontext':_0x3ad513[_0xe58f('0x6')],'callerid':_0x3ad513[_0xe58f('0x7')],'amaflags':_0xe58f('0x8')}),'log':_0xe58f('0x9')});};exports[_0xe58f('0xa')]=function(){return function(){return client['Request'](_0xe58f('0xb'),{'options':{'where':{'type':['outbound'],'createdAt':{'$between':[moment()[_0xe58f('0xc')](_0xe58f('0xd'))[_0xe58f('0xe')](_0xe58f('0xf')),moment()[_0xe58f('0x10')](_0xe58f('0xd'))[_0xe58f('0xe')](_0xe58f('0xf'))]}},'attributes':[_0xe58f('0x11'),_0xe58f('0x12'),_0xe58f('0x13'),_0xe58f('0x14')]},'log':_0xe58f('0x15')});};}; \ No newline at end of file +var _0xc40d=['moment','util','lodash','../client','create','Request','CreateVoiceCallReport','merge','calleridnum','context','callerid','DOCUMENTATION','getVoiceCallReports','GetVoiceCallReport','outbound','startOf','day','format','YYYY-MM-DD\x20HH:mm:ss','type','disposition','duration','billableseconds','GetVoiceCallReports'];(function(_0x17881d,_0x54c53a){var _0x2e868d=function(_0x1e0125){while(--_0x1e0125){_0x17881d['push'](_0x17881d['shift']());}};_0x2e868d(++_0x54c53a);}(_0xc40d,0x1c8));var _0xdc40=function(_0x1cd726,_0x2bf581){_0x1cd726=_0x1cd726-0x0;var _0x179932=_0xc40d[_0x1cd726];return _0x179932;};'use strict';var moment=require(_0xdc40('0x0'));var util=require(_0xdc40('0x1'));var _=require(_0xdc40('0x2'));var client=require(_0xdc40('0x3'));exports[_0xdc40('0x4')]=function(_0x1b64c4){return client[_0xdc40('0x5')](_0xdc40('0x6'),{'body':_[_0xdc40('0x7')](_0x1b64c4,{'source':_0x1b64c4[_0xdc40('0x8')],'destinationcontext':_0x1b64c4[_0xdc40('0x9')],'callerid':_0x1b64c4[_0xdc40('0xa')],'amaflags':_0xdc40('0xb')}),'log':'CreateVoiceCallReport'});};exports[_0xdc40('0xc')]=function(){return function(){return client[_0xdc40('0x5')](_0xdc40('0xd'),{'options':{'where':{'type':[_0xdc40('0xe')],'createdAt':{'$between':[moment()[_0xdc40('0xf')](_0xdc40('0x10'))[_0xdc40('0x11')](_0xdc40('0x12')),moment()['endOf'](_0xdc40('0x10'))[_0xdc40('0x11')](_0xdc40('0x12'))]}},'attributes':[_0xdc40('0x13'),_0xdc40('0x14'),_0xdc40('0x15'),_0xdc40('0x16')]},'log':_0xdc40('0x17')});};}; \ No newline at end of file diff --git a/server/services/ami/rpc/voiceDialReport.js b/server/services/ami/rpc/voiceDialReport.js index 3c1db23..b479c42 100644 --- a/server/services/ami/rpc/voiceDialReport.js +++ b/server/services/ami/rpc/voiceDialReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc021=['Request','../client','create'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xc021,0x151));var _0x1c02=function(_0x34f8ce,_0x2f5b24){_0x34f8ce=_0x34f8ce-0x0;var _0x25da8b=_0xc021[_0x34f8ce];return _0x25da8b;};'use strict';var client=require(_0x1c02('0x0'));exports[_0x1c02('0x1')]=function(_0x23b5f8){return client[_0x1c02('0x2')]('CreateVoiceDialReport',{'body':_0x23b5f8,'log':'CreateVoiceDialReport'});}; \ No newline at end of file +var _0x7fe5=['Request','CreateVoiceDialReport','../client','create'];(function(_0x2bfd4f,_0x1bbf2c){var _0x341849=function(_0x4c246e){while(--_0x4c246e){_0x2bfd4f['push'](_0x2bfd4f['shift']());}};_0x341849(++_0x1bbf2c);}(_0x7fe5,0x122));var _0x57fe=function(_0x250514,_0x389eda){_0x250514=_0x250514-0x0;var _0x59c25b=_0x7fe5[_0x250514];return _0x59c25b;};'use strict';var client=require(_0x57fe('0x0'));exports[_0x57fe('0x1')]=function(_0x2eb087){return client[_0x57fe('0x2')](_0x57fe('0x3'),{'body':_0x2eb087,'log':_0x57fe('0x3')});}; \ No newline at end of file diff --git a/server/services/ami/rpc/voiceExtension.js b/server/services/ami/rpc/voiceExtension.js index e877073..1e1ab89 100644 --- a/server/services/ami/rpc/voiceExtension.js +++ b/server/services/ami/rpc/voiceExtension.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf4eb=['../client','recordingFormat'];(function(_0x94959d,_0x3c0146){var _0x2f84b3=function(_0x265f50){while(--_0x265f50){_0x94959d['push'](_0x94959d['shift']());}};_0x2f84b3(++_0x3c0146);}(_0xf4eb,0xec));var _0xbf4e=function(_0x5dab0c,_0xbb0005){_0x5dab0c=_0x5dab0c-0x0;var _0x69f88=_0xf4eb[_0x5dab0c];return _0x69f88;};'use strict';var client=require(_0xbf4e('0x0'));exports['getVoiceExtensions']=function(){return function(){return client['Request']('GetVoiceExtension',{'options':{'raw':!![],'attributes':['id','exten',_0xbf4e('0x1')],'where':{'VoiceExtensionId':null}},'log':'getVoiceExtensions'});};}; \ No newline at end of file +var _0x2750=['exten','recordingFormat','getVoiceExtensions','../client','Request','GetVoiceExtension'];(function(_0x4a7840,_0x11aead){var _0x192c24=function(_0x2437e5){while(--_0x2437e5){_0x4a7840['push'](_0x4a7840['shift']());}};_0x192c24(++_0x11aead);}(_0x2750,0x13b));var _0x0275=function(_0x4584e1,_0x41f311){_0x4584e1=_0x4584e1-0x0;var _0x1cf8be=_0x2750[_0x4584e1];return _0x1cf8be;};'use strict';var client=require(_0x0275('0x0'));exports['getVoiceExtensions']=function(){return function(){return client[_0x0275('0x1')](_0x0275('0x2'),{'options':{'raw':!![],'attributes':['id',_0x0275('0x3'),_0x0275('0x4')],'where':{'VoiceExtensionId':null}},'log':_0x0275('0x5')});};}; \ No newline at end of file diff --git a/server/services/ami/rpc/voiceQueue.js b/server/services/ami/rpc/voiceQueue.js index daf8722..f41ee03 100644 --- a/server/services/ami/rpc/voiceQueue.js +++ b/server/services/ami/rpc/voiceQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x51de=['dialGlobalMaxRetry','dialTimezone','dialPrefix','dialCheckDuplicateType','dialAMDGreeting','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','dialAMDMinWordLength','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','timeout','dialRecallInQueue','dialOrderByScheduledAt','dialAgiAfterHangupAgent','dialAgiAfterHangupClient','dialQueueProject2','strategy','dialRandomLastDigitCallerIdNumber','dialCutDigit','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','dialDropMaxRetry','dialDropRetryFrequency','dialAbandonedMaxRetry','dialMachineMaxRetry','dialMachineRetryFrequency','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','mandatoryDisposition','dialPredictiveIntervalMaxThreshold','Trunk','callerid','active','mandatoryDispositionPause','TrunkBackup','Interval','Intervals','interval','../client','getVoiceQueues','Request','GetVoiceQueue','name','acw','acwTimeout','autopause','monitor_format','type','dialActive','dialLimitChannel','dialPredictiveOptimization','dialPredictiveOptimizationPercentage','dialPredictiveInterval','dialOriginateCallerIdName','dialOriginateTimeout','dialQueueOptions','dialQueueTimeout','dialQueueProject','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialNoAnswerMaxRetry'];(function(_0xbc2974,_0xec3342){var _0x3a5b4f=function(_0x5ec5b5){while(--_0x5ec5b5){_0xbc2974['push'](_0xbc2974['shift']());}};_0x3a5b4f(++_0xec3342);}(_0x51de,0x67));var _0xe51d=function(_0x201e4c,_0x18a03c){_0x201e4c=_0x201e4c-0x0;var _0x43da2e=_0x51de[_0x201e4c];return _0x43da2e;};'use strict';var client=require(_0xe51d('0x0'));exports[_0xe51d('0x1')]=function(){return function(){return client[_0xe51d('0x2')](_0xe51d('0x3'),{'options':{'raw':![],'attributes':['id',_0xe51d('0x4'),_0xe51d('0x5'),_0xe51d('0x6'),_0xe51d('0x7'),_0xe51d('0x8'),_0xe51d('0x9'),_0xe51d('0xa'),'dialMethod',_0xe51d('0xb'),'dialLimitQueue','dialPowerLevel',_0xe51d('0xc'),_0xe51d('0xd'),_0xe51d('0xe'),_0xe51d('0xf'),'dialOriginateCallerIdNumber',_0xe51d('0x10'),_0xe51d('0x11'),_0xe51d('0x12'),_0xe51d('0x13'),_0xe51d('0x14'),_0xe51d('0x15'),'dialBusyMaxRetry','dialBusyRetryFrequency',_0xe51d('0x16'),'dialNoAnswerRetryFrequency',_0xe51d('0x17'),_0xe51d('0x18'),'dialGlobalInterval',_0xe51d('0x19'),_0xe51d('0x1a'),'dialAMDActive','dialAMDInitialSilence',_0xe51d('0x1b'),_0xe51d('0x1c'),_0xe51d('0x1d'),_0xe51d('0x1e'),_0xe51d('0x1f'),_0xe51d('0x20'),_0xe51d('0x21'),_0xe51d('0x22'),_0xe51d('0x23'),'dialRecallMeTimeout',_0xe51d('0x24'),_0xe51d('0x25'),_0xe51d('0x26'),_0xe51d('0x27'),_0xe51d('0x28'),_0xe51d('0x8'),_0xe51d('0x29'),_0xe51d('0x2a'),_0xe51d('0x2b'),_0xe51d('0x2c'),_0xe51d('0x2d'),_0xe51d('0x2e'),_0xe51d('0x2f'),_0xe51d('0x30'),'dialAbandonedRetryFrequency',_0xe51d('0x31'),_0xe51d('0x32'),_0xe51d('0x33'),_0xe51d('0x34'),_0xe51d('0x35'),_0xe51d('0x36'),'dialPredictiveIntervalMinThreshold'],'include':[{'model':_0xe51d('0x37'),'as':'Trunk','attributes':['id','name',_0xe51d('0x38'),_0xe51d('0x39')]},{'model':'Pause','as':_0xe51d('0x3a'),'attributes':['id','name']},{'model':'Trunk','as':_0xe51d('0x3b'),'attributes':['id',_0xe51d('0x4'),'callerid',_0xe51d('0x39')]},{'model':'Interval','as':_0xe51d('0x3c'),'attributes':['id','name'],'include':[{'model':_0xe51d('0x3c'),'as':_0xe51d('0x3d'),'attributes':['id','name',_0xe51d('0x3e')]}]}]},'log':_0xe51d('0x1')});};}; \ No newline at end of file +var _0x12fa=['dialAgiAfterHangupAgent','dialQueueProject2','strategy','dialCutDigit','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','dialDropMaxRetry','dialDropRetryFrequency','dialAbandonedMaxRetry','dialAbandonedRetryFrequency','dialMachineMaxRetry','dialMachineRetryFrequency','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','mandatoryDisposition','dialPredictiveIntervalMaxThreshold','dialPredictiveIntervalMinThreshold','Pause','mandatoryDispositionPause','Trunk','TrunkBackup','active','Interval','Intervals','interval','getVoiceQueues','Request','name','acw','monitor_format','type','dialActive','dialLimitChannel','dialPowerLevel','dialPredictiveOptimization','dialPredictiveOptimizationPercentage','dialPredictiveInterval','dialOriginateCallerIdName','dialOriginateTimeout','dialQueueOptions','dialQueueProject','dialCongestionRetryFrequency','dialBusyRetryFrequency','dialNoAnswerMaxRetry','dialGlobalMaxRetry','dialTimezone','dialGlobalInterval','dialPrefix','dialAMDActive','dialAMDInitialSilence','dialAMDGreeting','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','dialAMDMinWordLength','dialAMDMaximumNumberOfWords','dialAMDMaximumWordLength','dialRecallMeTimeout','dialRecallInQueue'];(function(_0x4934aa,_0x55d2a3){var _0x59dd38=function(_0x306717){while(--_0x306717){_0x4934aa['push'](_0x4934aa['shift']());}};_0x59dd38(++_0x55d2a3);}(_0x12fa,0xc7));var _0xa12f=function(_0x1c37a9,_0x2886e9){_0x1c37a9=_0x1c37a9-0x0;var _0x449c09=_0x12fa[_0x1c37a9];return _0x449c09;};'use strict';var client=require('../client');exports[_0xa12f('0x0')]=function(){return function(){return client[_0xa12f('0x1')]('GetVoiceQueue',{'options':{'raw':![],'attributes':['id',_0xa12f('0x2'),_0xa12f('0x3'),'acwTimeout','autopause',_0xa12f('0x4'),_0xa12f('0x5'),_0xa12f('0x6'),'dialMethod',_0xa12f('0x7'),'dialLimitQueue',_0xa12f('0x8'),_0xa12f('0x9'),_0xa12f('0xa'),_0xa12f('0xb'),_0xa12f('0xc'),'dialOriginateCallerIdNumber',_0xa12f('0xd'),_0xa12f('0xe'),'dialQueueTimeout',_0xa12f('0xf'),'dialCongestionMaxRetry',_0xa12f('0x10'),'dialBusyMaxRetry',_0xa12f('0x11'),_0xa12f('0x12'),'dialNoAnswerRetryFrequency',_0xa12f('0x13'),_0xa12f('0x14'),_0xa12f('0x15'),_0xa12f('0x16'),'dialCheckDuplicateType',_0xa12f('0x17'),_0xa12f('0x18'),_0xa12f('0x19'),_0xa12f('0x1a'),_0xa12f('0x1b'),_0xa12f('0x1c'),'dialAMDBetweenWordsSilence',_0xa12f('0x1d'),'dialAMDSilenceThreshold',_0xa12f('0x1e'),'timeout',_0xa12f('0x1f'),_0xa12f('0x20'),'dialOrderByScheduledAt',_0xa12f('0x21'),'dialAgiAfterHangupClient',_0xa12f('0x22'),_0xa12f('0x4'),_0xa12f('0x23'),'dialRandomLastDigitCallerIdNumber',_0xa12f('0x24'),_0xa12f('0x25'),_0xa12f('0x26'),_0xa12f('0x27'),_0xa12f('0x28'),_0xa12f('0x29'),_0xa12f('0x2a'),_0xa12f('0x2b'),_0xa12f('0x2c'),_0xa12f('0x2d'),_0xa12f('0x2e'),_0xa12f('0x2f'),_0xa12f('0x30'),_0xa12f('0x31')],'include':[{'model':'Trunk','as':'Trunk','attributes':['id',_0xa12f('0x2'),'callerid','active']},{'model':_0xa12f('0x32'),'as':_0xa12f('0x33'),'attributes':['id',_0xa12f('0x2')]},{'model':_0xa12f('0x34'),'as':_0xa12f('0x35'),'attributes':['id',_0xa12f('0x2'),'callerid',_0xa12f('0x36')]},{'model':_0xa12f('0x37'),'as':_0xa12f('0x37'),'attributes':['id','name'],'include':[{'model':_0xa12f('0x37'),'as':_0xa12f('0x38'),'attributes':['id',_0xa12f('0x2'),_0xa12f('0x39')]}]}]},'log':_0xa12f('0x0')});};}; \ No newline at end of file diff --git a/server/services/ami/rpc/voiceQueueReport.js b/server/services/ami/rpc/voiceQueueReport.js index 360ae34..8cf45d6 100644 --- a/server/services/ami/rpc/voiceQueueReport.js +++ b/server/services/ami/rpc/voiceQueueReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['queuecallerexit','queuecallerexitAt','moment','lodash','../client','Request','CreateVoiceQueueReport','getVoiceQueueReports','GetVoiceQueueReport','startOf','format','YYYY-MM-DD\x20HH:mm:ss','endOf','queuecallerjoinAt','queuecallerleaveAt','queuecallercomplete','queuecallercompleteAt'];(function(_0x1d7b02,_0x42f479){var _0x2b0e05=function(_0x5bfacf){while(--_0x5bfacf){_0x1d7b02['push'](_0x1d7b02['shift']());}};_0x2b0e05(++_0x42f479);}(_0xa9e0,0x123));var _0x0a9e=function(_0x5037ab,_0x43209e){_0x5037ab=_0x5037ab-0x0;var _0x512adb=_0xa9e0[_0x5037ab];return _0x512adb;};'use strict';var moment=require(_0x0a9e('0x0'));var _=require(_0x0a9e('0x1'));var client=require(_0x0a9e('0x2'));exports['create']=function(_0x550fbc){return client[_0x0a9e('0x3')]('CreateVoiceQueueReport',{'body':_0x550fbc,'log':_0x0a9e('0x4')});};exports[_0x0a9e('0x5')]=function(){return function(){return client[_0x0a9e('0x3')](_0x0a9e('0x6'),{'options':{'where':{'createdAt':{'$between':[moment()[_0x0a9e('0x7')]('day')[_0x0a9e('0x8')](_0x0a9e('0x9')),moment()[_0x0a9e('0xa')]('day')['format'](_0x0a9e('0x9'))]}},'attributes':['uniqueid','queue',_0x0a9e('0xb'),_0x0a9e('0xc'),_0x0a9e('0xd'),_0x0a9e('0xe'),_0x0a9e('0xf'),_0x0a9e('0x10'),'queuecallerabandon','queuecallerabandonAt']},'log':'GetVoiceQueueReports'});};}; \ No newline at end of file +var _0xa9e0=['queuecallerexit','queuecallerexitAt','moment','lodash','../client','Request','CreateVoiceQueueReport','getVoiceQueueReports','GetVoiceQueueReport','startOf','format','YYYY-MM-DD\x20HH:mm:ss','endOf','queuecallerjoinAt','queuecallerleaveAt','queuecallercomplete','queuecallercompleteAt'];(function(_0x1a0057,_0x3130a9){var _0x2d7e81=function(_0x55ba8b){while(--_0x55ba8b){_0x1a0057['push'](_0x1a0057['shift']());}};_0x2d7e81(++_0x3130a9);}(_0xa9e0,0x123));var _0x0a9e=function(_0x34bf97,_0xc60f9d){_0x34bf97=_0x34bf97-0x0;var _0x292719=_0xa9e0[_0x34bf97];return _0x292719;};'use strict';var moment=require(_0x0a9e('0x0'));var _=require(_0x0a9e('0x1'));var client=require(_0x0a9e('0x2'));exports['create']=function(_0x550fbc){return client[_0x0a9e('0x3')]('CreateVoiceQueueReport',{'body':_0x550fbc,'log':_0x0a9e('0x4')});};exports[_0x0a9e('0x5')]=function(){return function(){return client[_0x0a9e('0x3')](_0x0a9e('0x6'),{'options':{'where':{'createdAt':{'$between':[moment()[_0x0a9e('0x7')]('day')[_0x0a9e('0x8')](_0x0a9e('0x9')),moment()[_0x0a9e('0xa')]('day')['format'](_0x0a9e('0x9'))]}},'attributes':['uniqueid','queue',_0x0a9e('0xb'),_0x0a9e('0xc'),_0x0a9e('0xd'),_0x0a9e('0xe'),_0x0a9e('0xf'),_0x0a9e('0x10'),'queuecallerabandon','queuecallerabandonAt']},'log':'GetVoiceQueueReports'});};}; \ No newline at end of file diff --git a/server/services/ami/rpc/voiceQueueRt.js b/server/services/ami/rpc/voiceQueueRt.js index df1a336..fb006c3 100644 --- a/server/services/ami/rpc/voiceQueueRt.js +++ b/server/services/ami/rpc/voiceQueueRt.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc1dc=['Request','getVoiceQueueRtPauses'];(function(_0xc6be3a,_0x540e05){var _0x56a310=function(_0x50a144){while(--_0x50a144){_0xc6be3a['push'](_0xc6be3a['shift']());}};_0x56a310(++_0x540e05);}(_0xc1dc,0x163));var _0xcc1d=function(_0x2f57bb,_0x2b9d18){_0x2f57bb=_0x2f57bb-0x0;var _0x1e114b=_0xc1dc[_0x2f57bb];return _0x1e114b;};'use strict';var client=require('../client');exports[_0xcc1d('0x0')]=function(_0x5b60d2){return function(){return client[_0xcc1d('0x1')]('GetVoiceQueueRtPauses',{'options':{'where':{'VoiceQueueId':_0x5b60d2,'paused':!![]},'raw':!![]},'log':_0xcc1d('0x0')});};}; \ No newline at end of file +var _0x157f=['getVoiceQueueRtPauses','../client','Request'];(function(_0x1234b6,_0x15386c){var _0x282361=function(_0x443bbc){while(--_0x443bbc){_0x1234b6['push'](_0x1234b6['shift']());}};_0x282361(++_0x15386c);}(_0x157f,0x76));var _0xf157=function(_0x618414,_0x1a7a60){_0x618414=_0x618414-0x0;var _0x21c19a=_0x157f[_0x618414];return _0x21c19a;};'use strict';var client=require(_0xf157('0x0'));exports['getVoiceQueueRtPauses']=function(_0x9105bb){return function(){return client[_0xf157('0x1')]('GetVoiceQueueRtPauses',{'options':{'where':{'VoiceQueueId':_0x9105bb,'paused':!![]},'raw':!![]},'log':_0xf157('0x2')});};}; \ No newline at end of file diff --git a/server/services/ami/rpc/voiceRecording.js b/server/services/ami/rpc/voiceRecording.js index f4130c6..8048ee0 100644 --- a/server/services/ami/rpc/voiceRecording.js +++ b/server/services/ami/rpc/voiceRecording.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9957=['CreateVoiceRecording','merge','monitorFilename','lodash','../client','create'];(function(_0x5c135a,_0xfefd66){var _0x3bd3ab=function(_0x4969d7){while(--_0x4969d7){_0x5c135a['push'](_0x5c135a['shift']());}};_0x3bd3ab(++_0xfefd66);}(_0x9957,0x93));var _0x7995=function(_0x618414,_0x1a7a60){_0x618414=_0x618414-0x0;var _0x21c19a=_0x9957[_0x618414];return _0x21c19a;};'use strict';var _=require(_0x7995('0x0'));var client=require(_0x7995('0x1'));exports[_0x7995('0x2')]=function(_0x10a05d){return client['Request'](_0x7995('0x3'),{'body':_[_0x7995('0x4')](_0x10a05d,{'value':_0x10a05d[_0x7995('0x5')]}),'log':_0x7995('0x3')});}; \ No newline at end of file +var _0x7a54=['create','Request','CreateVoiceRecording','monitorFilename','lodash','../client'];(function(_0x2585dd,_0x13b9e1){var _0x368ad7=function(_0x1e94b9){while(--_0x1e94b9){_0x2585dd['push'](_0x2585dd['shift']());}};_0x368ad7(++_0x13b9e1);}(_0x7a54,0x106));var _0x47a5=function(_0x126e6b,_0x4a42a7){_0x126e6b=_0x126e6b-0x0;var _0x1779fa=_0x7a54[_0x126e6b];return _0x1779fa;};'use strict';var _=require(_0x47a5('0x0'));var client=require(_0x47a5('0x1'));exports[_0x47a5('0x2')]=function(_0x58157c){return client[_0x47a5('0x3')](_0x47a5('0x4'),{'body':_['merge'](_0x58157c,{'value':_0x58157c[_0x47a5('0x5')]}),'log':_0x47a5('0x4')});}; \ No newline at end of file diff --git a/server/services/ami/rpc/voiceTransferReport.js b/server/services/ami/rpc/voiceTransferReport.js index becff78..211182b 100644 --- a/server/services/ami/rpc/voiceTransferReport.js +++ b/server/services/ami/rpc/voiceTransferReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4a45=['transferercalleridname','transfererconnectedlinenum','transfererconnectedlinename','transfereraccountcode','transferercontext','transfererexten','transfererlinkedid','transfereechannel','transfereecalleridname','transfereeconnectedlinenum','transfereeaccountcode','transfereecontext','transfereeexten','transfereelinkedid','isexternal','extension','blind','CreateVoiceTransferReport','origtransfererchannel','origtransferercalleridnum','origtransferercalleridname','secondtransfererconnectedlinenum','secondtransfererconnectedlinename','origtransfereraccountcode','secondtransferercontext','secondtransfererexten','origtransfererlinkedid','transfertargetchannel','transfertargetcalleridnum','transfertargetcalleridname','transfertargetconnectedlinenum','transfertargetconnectedlinename','transfertargetcontext','transfertargetexten','transfertargetlinkedid','origtransferercontext','origtransfererexten','attended','../client','blindTransfer','Request','result','transfererchannel','transferercalleridnum'];(function(_0x3a16d4,_0x23ecda){var _0x31ea9c=function(_0x35fea8){while(--_0x35fea8){_0x3a16d4['push'](_0x3a16d4['shift']());}};_0x31ea9c(++_0x23ecda);}(_0x4a45,0xaa));var _0x54a4=function(_0x3515c6,_0x4b33b6){_0x3515c6=_0x3515c6-0x0;var _0x3183f9=_0x4a45[_0x3515c6];return _0x3183f9;};'use strict';var client=require(_0x54a4('0x0'));exports['transfers']={};exports[_0x54a4('0x1')]=function(_0x15aae8){return client[_0x54a4('0x2')]('CreateVoiceTransferReport',{'body':{'result':_0x15aae8[_0x54a4('0x3')],'transfererchannel':_0x15aae8[_0x54a4('0x4')],'transferercalleridnum':_0x15aae8[_0x54a4('0x5')],'transferercalleridname':_0x15aae8[_0x54a4('0x6')],'transfererconnectedlinenum':_0x15aae8[_0x54a4('0x7')],'transfererconnectedlinename':_0x15aae8[_0x54a4('0x8')],'transfereraccountcode':_0x15aae8[_0x54a4('0x9')],'transferercontext':_0x15aae8[_0x54a4('0xa')],'transfererexten':_0x15aae8[_0x54a4('0xb')],'transfererlinkedid':_0x15aae8[_0x54a4('0xc')],'transfereechannel':_0x15aae8[_0x54a4('0xd')],'transfereecalleridnum':_0x15aae8['transfereecalleridnum'],'transfereecalleridname':_0x15aae8[_0x54a4('0xe')],'transfereeconnectedlinenum':_0x15aae8[_0x54a4('0xf')],'transfereeconnectedlinename':_0x15aae8['transfereeconnectedlinename'],'transfereeaccountcode':_0x15aae8[_0x54a4('0x10')],'transfereecontext':_0x15aae8[_0x54a4('0x11')],'transfereeexten':_0x15aae8[_0x54a4('0x12')],'transfereelinkedid':_0x15aae8[_0x54a4('0x13')],'isexternal':_0x15aae8[_0x54a4('0x14')],'context':_0x15aae8['context'],'extension':_0x15aae8[_0x54a4('0x15')],'type':_0x54a4('0x16')},'log':_0x54a4('0x17')});};exports['attendedTransfer']=function(_0x1168b1){return client['Request'](_0x54a4('0x17'),{'body':{'result':_0x1168b1['result'],'transfererchannel':_0x1168b1[_0x54a4('0x18')],'transferercalleridnum':_0x1168b1[_0x54a4('0x19')],'transferercalleridname':_0x1168b1[_0x54a4('0x1a')],'transfererconnectedlinenum':_0x1168b1[_0x54a4('0x1b')],'transfererconnectedlinename':_0x1168b1[_0x54a4('0x1c')],'transfereraccountcode':_0x1168b1[_0x54a4('0x1d')],'transferercontext':_0x1168b1[_0x54a4('0x1e')],'transfererexten':_0x1168b1[_0x54a4('0x1f')],'transfererlinkedid':_0x1168b1[_0x54a4('0x20')],'transfereechannel':_0x1168b1[_0x54a4('0x21')],'transfereecalleridnum':_0x1168b1[_0x54a4('0x22')],'transfereecalleridname':_0x1168b1[_0x54a4('0x23')],'transfereeconnectedlinenum':_0x1168b1[_0x54a4('0x24')],'transfereeconnectedlinename':_0x1168b1[_0x54a4('0x25')],'transfereeaccountcode':_0x1168b1['transfertargetaccountcode'],'transfereecontext':_0x1168b1[_0x54a4('0x26')],'transfereeexten':_0x1168b1[_0x54a4('0x27')],'transfereelinkedid':_0x1168b1[_0x54a4('0x28')],'isexternal':_0x1168b1[_0x54a4('0x14')],'context':_0x1168b1[_0x54a4('0x29')],'extension':_0x1168b1[_0x54a4('0x2a')],'type':_0x54a4('0x2b')},'log':_0x54a4('0x17')});}; \ No newline at end of file +var _0x82db=['transfererexten','transfereecalleridnum','transfereecalleridname','transfereeconnectedlinenum','transfereeconnectedlinename','transfereecontext','isexternal','context','blind','CreateVoiceTransferReport','attendedTransfer','origtransfererchannel','origtransferercalleridnum','origtransferercalleridname','secondtransfererconnectedlinenum','secondtransfererconnectedlinename','origtransfereraccountcode','secondtransfererexten','transfertargetcalleridname','transfertargetconnectedlinenum','transfertargetconnectedlinename','transfertargetaccountcode','transfertargetcontext','transfertargetlinkedid','origtransfererexten','../client','transfers','Request','result','transfererchannel','transferercalleridnum','transferercalleridname','transfererconnectedlinename','transfereraccountcode'];(function(_0xc5c780,_0x478e85){var _0xe31bf0=function(_0x4bd815){while(--_0x4bd815){_0xc5c780['push'](_0xc5c780['shift']());}};_0xe31bf0(++_0x478e85);}(_0x82db,0x1b1));var _0xb82d=function(_0x249374,_0xecf144){_0x249374=_0x249374-0x0;var _0x4c5b53=_0x82db[_0x249374];return _0x4c5b53;};'use strict';var client=require(_0xb82d('0x0'));exports[_0xb82d('0x1')]={};exports['blindTransfer']=function(_0x3c041c){return client[_0xb82d('0x2')]('CreateVoiceTransferReport',{'body':{'result':_0x3c041c[_0xb82d('0x3')],'transfererchannel':_0x3c041c[_0xb82d('0x4')],'transferercalleridnum':_0x3c041c[_0xb82d('0x5')],'transferercalleridname':_0x3c041c[_0xb82d('0x6')],'transfererconnectedlinenum':_0x3c041c['transfererconnectedlinenum'],'transfererconnectedlinename':_0x3c041c[_0xb82d('0x7')],'transfereraccountcode':_0x3c041c[_0xb82d('0x8')],'transferercontext':_0x3c041c['transferercontext'],'transfererexten':_0x3c041c[_0xb82d('0x9')],'transfererlinkedid':_0x3c041c['transfererlinkedid'],'transfereechannel':_0x3c041c['transfereechannel'],'transfereecalleridnum':_0x3c041c[_0xb82d('0xa')],'transfereecalleridname':_0x3c041c[_0xb82d('0xb')],'transfereeconnectedlinenum':_0x3c041c[_0xb82d('0xc')],'transfereeconnectedlinename':_0x3c041c[_0xb82d('0xd')],'transfereeaccountcode':_0x3c041c['transfereeaccountcode'],'transfereecontext':_0x3c041c[_0xb82d('0xe')],'transfereeexten':_0x3c041c['transfereeexten'],'transfereelinkedid':_0x3c041c['transfereelinkedid'],'isexternal':_0x3c041c[_0xb82d('0xf')],'context':_0x3c041c[_0xb82d('0x10')],'extension':_0x3c041c['extension'],'type':_0xb82d('0x11')},'log':_0xb82d('0x12')});};exports[_0xb82d('0x13')]=function(_0x32e857){return client[_0xb82d('0x2')](_0xb82d('0x12'),{'body':{'result':_0x32e857['result'],'transfererchannel':_0x32e857[_0xb82d('0x14')],'transferercalleridnum':_0x32e857[_0xb82d('0x15')],'transferercalleridname':_0x32e857[_0xb82d('0x16')],'transfererconnectedlinenum':_0x32e857[_0xb82d('0x17')],'transfererconnectedlinename':_0x32e857[_0xb82d('0x18')],'transfereraccountcode':_0x32e857[_0xb82d('0x19')],'transferercontext':_0x32e857['secondtransferercontext'],'transfererexten':_0x32e857[_0xb82d('0x1a')],'transfererlinkedid':_0x32e857['origtransfererlinkedid'],'transfereechannel':_0x32e857['transfertargetchannel'],'transfereecalleridnum':_0x32e857['transfertargetcalleridnum'],'transfereecalleridname':_0x32e857[_0xb82d('0x1b')],'transfereeconnectedlinenum':_0x32e857[_0xb82d('0x1c')],'transfereeconnectedlinename':_0x32e857[_0xb82d('0x1d')],'transfereeaccountcode':_0x32e857[_0xb82d('0x1e')],'transfereecontext':_0x32e857[_0xb82d('0x1f')],'transfereeexten':_0x32e857['transfertargetexten'],'transfereelinkedid':_0x32e857[_0xb82d('0x20')],'isexternal':_0x32e857['isexternal'],'context':_0x32e857['origtransferercontext'],'extension':_0x32e857[_0xb82d('0x21')],'type':'attended'},'log':_0xb82d('0x12')});}; \ No newline at end of file diff --git a/server/services/ami/server/index.js b/server/services/ami/server/index.js index 1ac64b1..010f501 100644 --- a/server/services/ami/server/index.js +++ b/server/services/ami/server/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x199c=['predictiveIntervalAvgTalktime','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalDroppedCallsTimeout','predictiveIntervalErlangCalls','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalHitRate','predictiveIntervalMultiplicativeFactor','predictiveIntervalPauses','predictiveIntervalAvailable','predictiveIntervalTotalCalls','originated','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','startPredictive','startProgressive','Trunk','callerid','Interval','length','find','omit','undefined','channels','username','voicechannel','map','uniqueid','channel','%s.%s','filename','wav','MixMonitor','ai(mixmonitorid)','monitors','/var/spool/asterisk/monitor/','isNil','push','YYYY-MM-DD\x20HH:mm:ss','rec','mixmonitorid','status','MixMonitor\x20Success','toLowerCase','Channel\x20doesn\x27t\x20exist','StopMixMonitor','destinationchannel','stop','values','queueChannels','voicequeuechannel','voicequeuechannelhangup','Redirect','exten','context','trunks','outboundChannels','campaigns','event','Event\x20name\x20mandatory','emit','faxAccounts','send','server','127.0.0.1','AMI\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!','jayson/promise','validate','bluebird','moment','../../../config/environment','../properties','../ami','listen','format','%s/%s','SIP','timers','timer','updateAcw','agents','updateStatusRealtime','pause','QueuePause','isConnected','error','asterisk','ami\x20disconnected','pick','keys','action','Action','then','message','catch','join','command','Command','hasOwnProperty','voiceQueues','name','strategy','available','pTalking','sumDuration','sumHoldTime','talking','total','type','unmanaged','abandoned','waiting','outbound','dialActive','dialMethod','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialOriginateTimeout','dialPrefix','temp','outboundAnswerAgiCallsDay','outboundAnswerCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundDropCallsDayACS','outboundDropCallsDayCallersExit','outboundDropCallsDayTimeout','outboundNoAnswerCallsDay','outboundNoSuchCallsDay','outboundOriginateFailureCallsDay','outboundReCallsDay','outboundRejectCallsDay','outboundUnknownCallsDay','predictiveIntervalAnsweredCalls'];(function(_0x34933a,_0x327378){var _0x36abb4=function(_0x2d6814){while(--_0x2d6814){_0x34933a['push'](_0x34933a['shift']());}};_0x36abb4(++_0x327378);}(_0x199c,0x1d8));var _0xc199=function(_0x3260c9,_0x730a73){_0x3260c9=_0x3260c9-0x0;var _0x1bd0d4=_0x199c[_0x3260c9];return _0x1bd0d4;};'use strict';var _=require('lodash');var util=require('util');var jayson=require(_0xc199('0x0'));var schema=require(_0xc199('0x1'));var BPromise=require(_0xc199('0x2'));var moment=require(_0xc199('0x3'));var config=require(_0xc199('0x4'));var properties=require(_0xc199('0x5'));var ami=require(_0xc199('0x6'));exports[_0xc199('0x7')]=function(_0x4b4a7b,_0x4688b9,_0x2ff172){return new BPromise(function(_0x499721,_0x4cd9cb){var _0xc2b40a={'QueuePause':function(_0x126236){return new Promise(function(_0x12d6df,_0x2619ea){var _0x157717=util[_0xc199('0x8')](_0xc199('0x9'),_0xc199('0xa'),_0x126236['name']);if(_0x4b4a7b[_0xc199('0xb')]&&_0x4b4a7b[_0xc199('0xb')][_0x157717]&&_0x4b4a7b[_0xc199('0xb')][_0x157717][_0xc199('0xc')]){_0x4b4a7b[_0xc199('0xb')][_0x157717][_0xc199('0xd')]();}if(_0x4b4a7b['agents'][_0x157717]){_0x4b4a7b[_0xc199('0xe')][_0x157717][_0xc199('0xf')]({'statePause':_0x126236[_0xc199('0x10')]?!![]:![]});}_0x12d6df({'code':0xc8,'message':_0xc199('0x11')});});},'Reload':function(_0x3c3cf9){var _0x52d3c3=this;return new Promise(function(_0xa5bfc2,_0x445c68){if(ami[_0xc199('0x12')]()==![]){return _0x445c68(_0x52d3c3[_0xc199('0x13')](0x1f4,[config[_0xc199('0x14')]['ip'],config['asterisk']['username'],_0xc199('0x15')]['join']('\x20')));}_0x3c3cf9=_[_0xc199('0x16')](_0x3c3cf9,_[_0xc199('0x17')](properties['module']));_0x3c3cf9[_0xc199('0x18')]='Reload';return ami[_0xc199('0x19')](_0x3c3cf9)[_0xc199('0x1a')](function(_0x5ee3f8){_0xa5bfc2({'code':0xc8,'message':_0x5ee3f8[_0xc199('0x1b')]});})[_0xc199('0x1c')](function(_0x40de74){_0x445c68(_0x52d3c3[_0xc199('0x13')](0x1f5,_0x40de74[_0xc199('0x1b')]));});});},'Command':function(_0x2c953f){var _0x14e969=this;return new Promise(function(_0x153098,_0x54babd){if(ami[_0xc199('0x12')]()==![]){return _0x54babd(_0x14e969[_0xc199('0x13')](0x1f4,[config[_0xc199('0x14')]['ip'],config[_0xc199('0x14')]['username'],_0xc199('0x15')][_0xc199('0x1d')]('\x20')));}_0x2c953f=_[_0xc199('0x16')](_0x2c953f,_0xc199('0x1e'));_0x2c953f[_0xc199('0x18')]=_0xc199('0x1f');return ami['Action'](_0x2c953f)['then'](function(_0x16f03f){_0x153098({'code':0xc8,'message':_0x16f03f['content']});})[_0xc199('0x1c')](function(_0x5cefd7){_0x54babd(_0x14e969[_0xc199('0x13')](0x1f5,_0x5cefd7[_0xc199('0x1b')]));});});},'VoiceQueues':function(_0x4e0306){return new Promise(function(_0x2d184d,_0x838760){var _0x507f71=[];for(var _0x1c6703 in _0x4b4a7b['voiceQueues']){if(_0x4b4a7b['voiceQueues'][_0xc199('0x20')](_0x1c6703)){var _0x4494b5=_0x4b4a7b[_0xc199('0x21')][_0x1c6703];var _0x4d795f={'id':_0x4494b5['id'],'name':_0x4494b5[_0xc199('0x22')],'strategy':_0x4494b5[_0xc199('0x23')],'answered':_0x4494b5['answered'],'available':_0x4494b5[_0xc199('0x24')],'loggedIn':_0x4494b5['loggedIn'],'pTalking':_0x4494b5[_0xc199('0x25')],'sumBillable':_0x4494b5['sumBillable'],'sumDuration':_0x4494b5[_0xc199('0x26')],'sumHoldTime':_0x4494b5[_0xc199('0x27')]||0x0,'talking':_0x4494b5[_0xc199('0x28')],'total':_0x4494b5[_0xc199('0x29')],'type':_0x4494b5[_0xc199('0x2a')],'unmanaged':_0x4494b5[_0xc199('0x2b')],'abandoned':_0x4494b5[_0xc199('0x2c')],'waiting':_0x4494b5[_0xc199('0x2d')],'loggedInDb':_0x4494b5['loggedInDb']};if(_0x4494b5[_0xc199('0x2a')]===_0xc199('0x2e')){_0x4d795f[_0xc199('0x2f')]=_0x4494b5['dialActive'];_0x4d795f[_0xc199('0x30')]=_0x4494b5['dialMethod'];_0x4d795f['dialOriginateCallerIdName']=_0x4494b5[_0xc199('0x31')];_0x4d795f[_0xc199('0x32')]=_0x4494b5['dialOriginateCallerIdNumber'];_0x4d795f[_0xc199('0x33')]=_0x4494b5['dialOriginateTimeout'];_0x4d795f['dialPrefix']=_0x4494b5[_0xc199('0x34')];_0x4d795f['temp']=_0x4494b5[_0xc199('0x35')];_0x4d795f[_0xc199('0x36')]=_0x4494b5[_0xc199('0x36')];_0x4d795f[_0xc199('0x37')]=_0x4494b5[_0xc199('0x37')];_0x4d795f['outboundBlacklistCallsDay']=_0x4494b5['outboundBlacklistCallsDay'];_0x4d795f['outboundBusyCallsDay']=_0x4494b5[_0xc199('0x38')];_0x4d795f['outboundCongestionCallsDay']=_0x4494b5[_0xc199('0x39')];_0x4d795f[_0xc199('0x3a')]=_0x4494b5[_0xc199('0x3a')];_0x4d795f[_0xc199('0x3b')]=_0x4494b5[_0xc199('0x3b')];_0x4d795f[_0xc199('0x3c')]=_0x4494b5[_0xc199('0x3c')];_0x4d795f[_0xc199('0x3d')]=_0x4494b5[_0xc199('0x3d')];_0x4d795f[_0xc199('0x3e')]=_0x4494b5['outboundNoSuchCallsDay'];_0x4d795f['outboundOriginateFailureCallsDay']=_0x4494b5[_0xc199('0x3f')];_0x4d795f[_0xc199('0x40')]=_0x4494b5[_0xc199('0x40')];_0x4d795f[_0xc199('0x41')]=_0x4494b5[_0xc199('0x41')];_0x4d795f[_0xc199('0x42')]=_0x4494b5[_0xc199('0x42')];_0x4d795f[_0xc199('0x43')]=_0x4494b5['predictiveIntervalAnsweredCalls'];_0x4d795f['predictiveIntervalAvgHoldtime']=_0x4494b5['predictiveIntervalAvgHoldtime'];_0x4d795f[_0xc199('0x44')]=_0x4494b5[_0xc199('0x44')];_0x4d795f[_0xc199('0x45')]=_0x4494b5['predictiveIntervalDroppedCallsCallersExit'];_0x4d795f[_0xc199('0x46')]=_0x4494b5[_0xc199('0x46')];_0x4d795f['predictiveIntervalErlangCalls']=_0x4494b5[_0xc199('0x47')];_0x4d795f[_0xc199('0x48')]=_0x4494b5[_0xc199('0x48')];_0x4d795f[_0xc199('0x49')]=_0x4494b5['predictiveIntervalHitRate'];_0x4d795f[_0xc199('0x4a')]=_0x4494b5[_0xc199('0x4a')];_0x4d795f[_0xc199('0x4b')]=_0x4494b5[_0xc199('0x4b')];_0x4d795f[_0xc199('0x4c')]=_0x4494b5[_0xc199('0x4c')];_0x4d795f[_0xc199('0x4d')]=_0x4494b5['predictiveIntervalTotalCalls'];_0x4d795f['message']=_0x4494b5['message'];_0x4d795f[_0xc199('0x4e')]=_0x4494b5[_0xc199('0x4e')];_0x4d795f[_0xc199('0x4f')]=_0x4494b5[_0xc199('0x4f')];_0x4d795f[_0xc199('0x50')]=_0x4494b5['erlangCallToSecond'];_0x4d795f['erlangAbandonmentRate']=_0x4494b5[_0xc199('0x51')];_0x4d795f[_0xc199('0x52')]=_0x4494b5['erlangBusyFactor'];_0x4d795f['startPredictive']=_0x4494b5[_0xc199('0x53')];_0x4d795f[_0xc199('0x54')]=_0x4494b5['startProgressive'];}if(_0x4494b5[_0xc199('0x55')]){_0x4d795f[_0xc199('0x55')]={'id':_0x4494b5['Trunk']['id'],'name':_0x4494b5[_0xc199('0x55')][_0xc199('0x22')],'active':_0x4494b5[_0xc199('0x55')]['active'],'callerid':_0x4494b5[_0xc199('0x55')][_0xc199('0x56')]};}if(_0x4494b5[_0xc199('0x57')]){_0x4d795f['Interval']={'id':_0x4494b5[_0xc199('0x57')]['id'],'name':_0x4494b5[_0xc199('0x57')][_0xc199('0x22')]};}_0x507f71['push'](_0x4d795f);}}_0x2d184d({'count':_0x507f71[_0xc199('0x58')],'rows':_0x507f71});});},'UpdateVoiceQueue':function(_0xc290cc){return new Promise(function(_0x5c87d7,_0x3a0763){var _0x450ce5=_[_0xc199('0x59')](_0x4b4a7b['voiceQueues'],{'id':parseInt(_0xc290cc['id'])});var _0x5cf201=_[_0xc199('0x5a')](_0xc290cc,['id']);if(_0x450ce5){for(var _0x1a6238 in _0x5cf201){if(typeof _0x5cf201[_0x1a6238]!=='undefined'&&typeof _0x450ce5[_0x1a6238]!==_0xc199('0x5b')){_0x450ce5[_0x1a6238]=_0x5cf201[_0x1a6238];}}_0x5c87d7(_0x450ce5);}else{_0x3a0763();}});},'VoiceChannels':function(_0x157127){return new Promise(function(_0x4e987f,_0x1971f2){var _0x1baae3=_['values'](_0x4b4a7b[_0xc199('0x5c')]);_0x4e987f({'count':_0x1baae3[_0xc199('0x58')],'rows':_0x1baae3});});},'VoiceChannelMixMonitor':function(_0x13ec95){var _0x38ebd0=this;return new Promise(function(_0x4f2500,_0x2d1eed){if(ami[_0xc199('0x12')]()==![]){return _0x2d1eed(_0x38ebd0[_0xc199('0x13')](0x1f4,[config[_0xc199('0x14')]['ip'],config['asterisk'][_0xc199('0x5d')],'ami\x20disconnected']['join']('\x20')));}var _0x18f410=schema(properties[_0xc199('0x5e')])[_0xc199('0x1')](_0x13ec95);if(_0x18f410[_0xc199('0x58')]>0x0){return _0x2d1eed(_0x38ebd0[_0xc199('0x13')](0x1f4,_[_0xc199('0x5f')](_0x18f410,_0xc199('0x1b'))[_0xc199('0x1d')](',\x20')));}var _0x57b58d=_['find'](_0x4b4a7b[_0xc199('0x5c')],{'uniqueid':_0x13ec95[_0xc199('0x60')]});if(_0x57b58d&&_0x57b58d[_0xc199('0x61')]){var _0x38a795=util[_0xc199('0x8')](_0xc199('0x62'),_0x13ec95[_0xc199('0x63')]||_0x13ec95[_0xc199('0x60')],_0x13ec95[_0xc199('0x8')]||_0xc199('0x64'));return ami[_0xc199('0x19')]({'action':_0xc199('0x65'),'channel':_0x57b58d[_0xc199('0x61')],'file':_0x38a795,'options':_0xc199('0x66')})[_0xc199('0x1a')](function(_0x4573e2){var _0x3dc0fd=_[_0xc199('0x59')](_0x57b58d[_0xc199('0x67')],{'filename':_0xc199('0x68')+_0x38a795['toLowerCase']()});if(_[_0xc199('0x69')](_0x3dc0fd)){_0x57b58d['monitors'][_0xc199('0x6a')]({'filename':_0xc199('0x68')+_0x38a795['toLowerCase'](),'createdAt':moment()[_0xc199('0x8')](_0xc199('0x6b')),'mixmonitorid':_0x4573e2['mixmonitorid'],'status':_0xc199('0x6c')});}else{_0x3dc0fd[_0xc199('0x6d')]=_0x4573e2[_0xc199('0x6d')];_0x3dc0fd[_0xc199('0x6e')]='rec';}_0x4f2500({'code':0xc8,'message':[_0x13ec95[_0xc199('0x60')],_0xc199('0x6f'),_0x4573e2[_0xc199('0x6d')]]['join']('\x20'),'mixmonitorid':_0x4573e2['mixmonitorid']});})['catch'](function(_0x4bfa77){_0x2d1eed(_0x38ebd0[_0xc199('0x13')](0x1f5,[_0x13ec95[_0xc199('0x60')],_0x4bfa77[_0xc199('0x1b')][_0xc199('0x70')]()]['join']('\x20')));});}else{return _0x2d1eed(_0x38ebd0[_0xc199('0x13')](0x1f5,_0xc199('0x71')));}});},'VoiceChannelStopMixMonitor':function(_0xfe3054){var _0xc37dc0=this;return new Promise(function(_0x5e856e,_0xed11fc){if(ami[_0xc199('0x12')]()==![]){return _0xed11fc(_0xc37dc0[_0xc199('0x13')](0x1f4,[config[_0xc199('0x14')]['ip'],config[_0xc199('0x14')]['username'],'ami\x20disconnected'][_0xc199('0x1d')]('\x20')));}var _0x153509=schema(properties[_0xc199('0x5e')])[_0xc199('0x1')](_0xfe3054);if(_0x153509[_0xc199('0x58')]>0x0){return _0xed11fc(_0xc37dc0[_0xc199('0x13')](0x1f4,_[_0xc199('0x5f')](_0x153509,_0xc199('0x1b'))[_0xc199('0x1d')](',\x20')));}var _0x368670=_['find'](_0x4b4a7b['channels'],{'uniqueid':_0xfe3054[_0xc199('0x60')]});if(_0x368670){return BPromise['resolve']()['then'](function(){if(_0x368670['channel']){return ami[_0xc199('0x19')]({'action':_0xc199('0x72'),'channel':_0x368670[_0xc199('0x61')],'mixmonitorid':_0xfe3054['mixmonitorid']})[_0xc199('0x1c')](function(_0x58e4a3){});}})[_0xc199('0x1a')](function(){if(_0x368670[_0xc199('0x73')]){return ami[_0xc199('0x19')]({'action':'StopMixMonitor','channel':_0x368670[_0xc199('0x73')],'mixmonitorid':_0xfe3054[_0xc199('0x6d')]})[_0xc199('0x1c')](function(_0x261d10){});}})[_0xc199('0x1a')](function(_0x8f05a9){var _0x50ac56=_['find'](_0x368670[_0xc199('0x67')],{'mixmonitorid':_0xfe3054['mixmonitorid']});if(_0x50ac56){_0x50ac56[_0xc199('0x6e')]=_0xc199('0x74');}})[_0xc199('0x1a')](function(){var _0x427d04=util[_0xc199('0x8')](_0xc199('0x62'),_0xfe3054[_0xc199('0x63')]||_0xfe3054[_0xc199('0x60')],_0xfe3054[_0xc199('0x8')]||_0xc199('0x64'));var _0x5a9900=_[_0xc199('0x59')](_0x368670['monitors'],{'filename':_0xc199('0x68')+_0x427d04[_0xc199('0x70')]()});if(_0x5a9900){_0x5a9900['status']=_0xc199('0x74');}})[_0xc199('0x1a')](function(){_0x5e856e({'code':0xc8,'message':[_0xfe3054['uniqueid'],'StopMixMonitor\x20Success']['join']('\x20')});})['catch'](function(_0x565c01){_0xed11fc(_0xc37dc0[_0xc199('0x13')](0x1f5,[_0xfe3054[_0xc199('0x60')],_0x565c01[_0xc199('0x1b')][_0xc199('0x70')]()][_0xc199('0x1d')]('\x20')));});}else{return _0xed11fc(_0xc37dc0[_0xc199('0x13')](0x1f5,_0xc199('0x71')));}});},'VoiceQueuesChannels':function(_0x5b672b){return new Promise(function(_0x43c8b2,_0x2c4cc3){var _0x4d1425=_[_0xc199('0x75')](_0x4b4a7b[_0xc199('0x76')]);_0x43c8b2({'count':_0x4d1425[_0xc199('0x58')],'rows':_0x4d1425});});},'VoiceQueuesChannel':function(_0x1d56ac){var _0x416d51=this;return new Promise(function(_0x4a095e,_0x33d854){var _0x534ce1=schema(properties[_0xc199('0x77')])['validate'](_0x1d56ac);if(_0x534ce1[_0xc199('0x58')]>0x0){return _0x33d854(_0x416d51[_0xc199('0x13')](0x1f4,_['map'](_0x534ce1,_0xc199('0x1b'))[_0xc199('0x1d')](',\x20')));}var _0x5bf5e3=_[_0xc199('0x59')](_0x4b4a7b['queueChannels'],{'uniqueid':_0x1d56ac[_0xc199('0x60')]});if(_0x5bf5e3){_0x4a095e(_0x5bf5e3);}else{return _0x33d854(_0x416d51['error'](0x1f5,_0xc199('0x71')));}});},'VoiceQueuesChannelHangup':function(_0x46f23c){var _0x48d89a=this;return new Promise(function(_0x19b5a6,_0x541275){if(ami['isConnected']()==![]){return _0x541275(_0x48d89a[_0xc199('0x13')](0x1f4,[config[_0xc199('0x14')]['ip'],config[_0xc199('0x14')][_0xc199('0x5d')],_0xc199('0x15')]['join']('\x20')));}var _0x24975f=schema(properties[_0xc199('0x78')])[_0xc199('0x1')](_0x46f23c);if(_0x24975f[_0xc199('0x58')]>0x0){return _0x541275(_0x48d89a[_0xc199('0x13')](0x1f4,_[_0xc199('0x5f')](_0x24975f,_0xc199('0x1b'))[_0xc199('0x1d')](',\x20')));}var _0x23453c=_['find'](_0x4b4a7b[_0xc199('0x76')],{'uniqueid':_0x46f23c['uniqueid']});if(_0x23453c&&_0x23453c[_0xc199('0x61')]){return ami[_0xc199('0x19')]({'action':'Hangup','channel':_0x23453c['channel']})['then'](function(_0x2de663){_0x19b5a6({'code':0xc8,'message':[_0x46f23c['uniqueid'],_0x2de663[_0xc199('0x1b')][_0xc199('0x70')]()][_0xc199('0x1d')]('\x20')});})[_0xc199('0x1c')](function(_0x310c65){_0x541275(_0x48d89a[_0xc199('0x13')](0x1f5,[_0x46f23c['uniqueid'],_0x310c65[_0xc199('0x1b')][_0xc199('0x70')]()][_0xc199('0x1d')]('\x20')));});}else{return _0x541275(_0x48d89a[_0xc199('0x13')](0x1f5,_0xc199('0x71')));}});},'VoiceQueuesChannelRedirect':function(_0x2cc9ad){var _0x3c3d1c=this;return new Promise(function(_0x2a8d2a,_0x2fda54){if(ami[_0xc199('0x12')]()==![]){return _0x2fda54(_0x3c3d1c['error'](0x1f4,[config[_0xc199('0x14')]['ip'],config['asterisk'][_0xc199('0x5d')],'ami\x20disconnected']['join']('\x20')));}var _0xf8731c=schema(properties['voicequeuechannelredirect'])[_0xc199('0x1')](_0x2cc9ad);if(_0xf8731c['length']>0x0){return _0x2fda54(_0x3c3d1c['error'](0x1f4,_[_0xc199('0x5f')](_0xf8731c,'message')[_0xc199('0x1d')](',\x20')));}var _0x4d2807=_[_0xc199('0x59')](_0x4b4a7b[_0xc199('0x76')],{'uniqueid':_0x2cc9ad[_0xc199('0x60')]});if(_0x4d2807&&_0x4d2807[_0xc199('0x61')]){return ami[_0xc199('0x19')]({'action':_0xc199('0x79'),'channel':_0x4d2807[_0xc199('0x61')],'exten':_0x2cc9ad[_0xc199('0x7a')],'context':_0x2cc9ad[_0xc199('0x7b')]||_0x4d2807[_0xc199('0x7b')],'priority':0x1})['then'](function(_0xbd8500){_0x2a8d2a({'code':0xc8,'message':[_0x2cc9ad[_0xc199('0x60')],_0xbd8500[_0xc199('0x1b')][_0xc199('0x70')]()][_0xc199('0x1d')]('\x20')});})['catch'](function(_0x3666b4){_0x2fda54(_0x3c3d1c[_0xc199('0x13')](0x1f5,[_0x2cc9ad[_0xc199('0x60')],_0x3666b4[_0xc199('0x1b')]['toLowerCase']()][_0xc199('0x1d')]('\x20')));});}else{return _0x2fda54(_0x3c3d1c[_0xc199('0x13')](0x1f5,'Channel\x20doesn\x27t\x20exist'));}});},'Agents':function(_0xd06d58){return new Promise(function(_0x24c877,_0x1ae95d){var _0x35b7ef=_[_0xc199('0x75')](_0x4b4a7b[_0xc199('0xe')]);_0x24c877({'count':_0x35b7ef['length'],'rows':_0x35b7ef});});},'Telephones':function(_0x3dcdf6){return new Promise(function(_0x1c5b9b,_0x5312f1){var _0x17ceda=_[_0xc199('0x75')](_0x4b4a7b['telephones']);_0x1c5b9b({'count':_0x17ceda['length'],'rows':_0x17ceda});});},'Trunks':function(_0x1201e7){return new Promise(function(_0x20a652,_0x14c81b){var _0x3b9534=_[_0xc199('0x75')](_0x4b4a7b[_0xc199('0x7c')]);_0x20a652({'count':_0x3b9534[_0xc199('0x58')],'rows':_0x3b9534});});},'OutboundChannels':function(_0x23b2cb){return new Promise(function(_0x152faa,_0x1ce5f4){var _0x3ddbc6=_[_0xc199('0x75')](_0x4b4a7b[_0xc199('0x7d')]);_0x152faa({'count':_0x3ddbc6[_0xc199('0x58')],'rows':_0x3ddbc6});});},'Outbound':function(_0x152231){return new Promise(function(_0x25bc1e,_0x2a41af){_0x25bc1e(_0x4b4a7b[_0xc199('0x2e')]);});},'Campaigns':function(_0x55e4dd){return new Promise(function(_0x3e4a2a,_0x18954c){var _0x53a763=_['values'](_0x4b4a7b[_0xc199('0x7e')]);_0x3e4a2a({'count':_0x53a763[_0xc199('0x58')],'rows':_0x53a763});});},'VoiceQueuesPreview':function(_0x29cd7a){var _0x40d4ed=this;return new Promise(function(_0x163849,_0x15d5be){_0x4688b9['run'](_0x29cd7a['id'])[_0xc199('0x1a')](function(_0x341f10){_0x163849({'code':0xc8,'message':_0x341f10[_0xc199('0x1b')]});})[_0xc199('0x1c')](function(_0x5c4264){_0x15d5be(_0x40d4ed[_0xc199('0x13')](0x1f4,_0x5c4264[_0xc199('0x1b')]));});});},'EventManager':function(_0x584f5a){var _0x1375dd=this;return new Promise(function(_0x2e823b,_0x24a51d){if(!_0x584f5a[_0xc199('0x7f')]){return _0x24a51d(_0x1375dd['error'](0x1f4,_0xc199('0x80')));}ami[_0xc199('0x81')]('custom:'+_0x584f5a['event'],_0x584f5a[_0xc199('0x1b')]);_0x2e823b({'code':0xc8,'message':_0x584f5a});});},'FaxAccounts':function(_0x20d032){return new Promise(function(_0x22d5f0,_0x415b54){var _0x1afeb0=_[_0xc199('0x75')](_0x4b4a7b[_0xc199('0x82')]);_0x22d5f0({'count':_0x1afeb0['length'],'rows':_0x1afeb0});});},'SendFax':function(_0x33b10b){var _0x2d5f00=this;return new Promise(function(_0x4f6802,_0x464bef){_0x2ff172[_0xc199('0x83')](_0x33b10b)['then'](function(_0x20abe1){_0x4f6802({'code':0xc8,'message':_0x20abe1['message']});})[_0xc199('0x1c')](function(_0x5f081b){_0x464bef(_0x2d5f00[_0xc199('0x13')](0x1f4,_0x5f081b['message']));});});},'CheckAfterSend':function(_0x23824c){var _0x16b378=this;return new Promise(function(_0x563c0f,_0x120eb1){_0x2ff172['checkAfterSend'](_0x23824c)[_0xc199('0x1a')](function(_0x58cece){_0x563c0f({'code':0xc8,'message':_0x58cece[_0xc199('0x1b')]});})[_0xc199('0x1c')](function(_0x7f4a75){_0x120eb1(_0x16b378['error'](0x1f4,_0x7f4a75[_0xc199('0x1b')]));});});}};var _0x18386f=jayson[_0xc199('0x84')](_0xc2b40a)['http']();_0x18386f['on'](_0xc199('0x13'),function(_0x39fdb4){return _0x4cd9cb(_0x39fdb4);});_0x18386f[_0xc199('0x7')](0x232a,_0xc199('0x85'),function(){console['log'](_0xc199('0x86'),0x232a);return _0x499721('RPC\x20listening\x20on\x20port:'+0x232a);});});}; \ No newline at end of file +var _0x5d58=['RPC\x20listening\x20on\x20port:','moment','../../../config/environment','../ami','listen','%s/%s','SIP','name','timer','timers','updateAcw','agents','updateStatusRealtime','pause','isConnected','error','asterisk','username','join','pick','keys','module','action','Reload','Action','then','message','catch','ami\x20disconnected','command','Command','voiceQueues','strategy','answered','available','loggedIn','pTalking','sumDuration','sumHoldTime','talking','total','type','waiting','loggedInDb','outbound','dialActive','dialMethod','dialOriginateCallerIdNumber','dialOriginateTimeout','dialPrefix','temp','outboundAnswerAgiCallsDay','outboundAnswerCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundDropCallsDayACS','outboundDropCallsDayCallersExit','outboundDropCallsDayTimeout','outboundNoAnswerCallsDay','outboundNoSuchCallsDay','outboundOriginateFailureCallsDay','outboundReCallsDay','outboundRejectCallsDay','outboundUnknownCallsDay','predictiveIntervalAnsweredCalls','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalDroppedCallsTimeout','predictiveIntervalErlangCalls','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalMultiplicativeFactor','predictiveIntervalPauses','predictiveIntervalAvailable','predictiveIntervalTotalCalls','originated','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','startPredictive','Trunk','active','callerid','Interval','push','length','find','omit','undefined','values','channels','map','uniqueid','channel','format','%s.%s','filename','wav','MixMonitor','/var/spool/asterisk/monitor/','isNil','monitors','mixmonitorid','status','rec','toLowerCase','Channel\x20doesn\x27t\x20exist','voicechannel','validate','resolve','destinationchannel','StopMixMonitor','stop','queueChannels','voicequeuechannelhangup','Hangup','voicequeuechannelredirect','Redirect','context','telephones','outboundChannels','campaigns','run','event','Event\x20name\x20mandatory','faxAccounts','send','checkAfterSend','http'];(function(_0x37e6dd,_0x3da7df){var _0x4c64e7=function(_0x37a2d7){while(--_0x37a2d7){_0x37e6dd['push'](_0x37e6dd['shift']());}};_0x4c64e7(++_0x3da7df);}(_0x5d58,0x187));var _0x85d5=function(_0x3fdd8c,_0x51fc09){_0x3fdd8c=_0x3fdd8c-0x0;var _0x48444b=_0x5d58[_0x3fdd8c];return _0x48444b;};'use strict';var _=require('lodash');var util=require('util');var jayson=require('jayson/promise');var schema=require('validate');var BPromise=require('bluebird');var moment=require(_0x85d5('0x0'));var config=require(_0x85d5('0x1'));var properties=require('../properties');var ami=require(_0x85d5('0x2'));exports[_0x85d5('0x3')]=function(_0x54207b,_0x1eb211,_0x2d457a){return new BPromise(function(_0x578fad,_0x46e7b4){var _0x5f47ec={'QueuePause':function(_0x98c963){return new Promise(function(_0x3fecca,_0x4ca293){var _0x4326a8=util['format'](_0x85d5('0x4'),_0x85d5('0x5'),_0x98c963[_0x85d5('0x6')]);if(_0x54207b['timers']&&_0x54207b['timers'][_0x4326a8]&&_0x54207b['timers'][_0x4326a8][_0x85d5('0x7')]){_0x54207b[_0x85d5('0x8')][_0x4326a8][_0x85d5('0x9')]();}if(_0x54207b[_0x85d5('0xa')][_0x4326a8]){_0x54207b[_0x85d5('0xa')][_0x4326a8][_0x85d5('0xb')]({'statePause':_0x98c963[_0x85d5('0xc')]?!![]:![]});}_0x3fecca({'code':0xc8,'message':'QueuePause'});});},'Reload':function(_0x4bbf2a){var _0x4869ca=this;return new Promise(function(_0x3e1285,_0x226d34){if(ami[_0x85d5('0xd')]()==![]){return _0x226d34(_0x4869ca[_0x85d5('0xe')](0x1f4,[config[_0x85d5('0xf')]['ip'],config[_0x85d5('0xf')][_0x85d5('0x10')],'ami\x20disconnected'][_0x85d5('0x11')]('\x20')));}_0x4bbf2a=_[_0x85d5('0x12')](_0x4bbf2a,_[_0x85d5('0x13')](properties[_0x85d5('0x14')]));_0x4bbf2a[_0x85d5('0x15')]=_0x85d5('0x16');return ami[_0x85d5('0x17')](_0x4bbf2a)[_0x85d5('0x18')](function(_0x17652b){_0x3e1285({'code':0xc8,'message':_0x17652b[_0x85d5('0x19')]});})[_0x85d5('0x1a')](function(_0x432bd6){_0x226d34(_0x4869ca[_0x85d5('0xe')](0x1f5,_0x432bd6[_0x85d5('0x19')]));});});},'Command':function(_0x341e8e){var _0x26981b=this;return new Promise(function(_0x54e991,_0x1d6134){if(ami['isConnected']()==![]){return _0x1d6134(_0x26981b[_0x85d5('0xe')](0x1f4,[config[_0x85d5('0xf')]['ip'],config['asterisk'][_0x85d5('0x10')],_0x85d5('0x1b')]['join']('\x20')));}_0x341e8e=_['pick'](_0x341e8e,_0x85d5('0x1c'));_0x341e8e['action']=_0x85d5('0x1d');return ami['Action'](_0x341e8e)[_0x85d5('0x18')](function(_0x1f8d27){_0x54e991({'code':0xc8,'message':_0x1f8d27['content']});})['catch'](function(_0x4da71b){_0x1d6134(_0x26981b['error'](0x1f5,_0x4da71b[_0x85d5('0x19')]));});});},'VoiceQueues':function(_0x46c06e){return new Promise(function(_0x244353,_0x466bbd){var _0x12fea3=[];for(var _0xef2405 in _0x54207b['voiceQueues']){if(_0x54207b[_0x85d5('0x1e')]['hasOwnProperty'](_0xef2405)){var _0x1b3fae=_0x54207b[_0x85d5('0x1e')][_0xef2405];var _0x233ccd={'id':_0x1b3fae['id'],'name':_0x1b3fae['name'],'strategy':_0x1b3fae[_0x85d5('0x1f')],'answered':_0x1b3fae[_0x85d5('0x20')],'available':_0x1b3fae[_0x85d5('0x21')],'loggedIn':_0x1b3fae[_0x85d5('0x22')],'pTalking':_0x1b3fae[_0x85d5('0x23')],'sumBillable':_0x1b3fae['sumBillable'],'sumDuration':_0x1b3fae[_0x85d5('0x24')],'sumHoldTime':_0x1b3fae[_0x85d5('0x25')]||0x0,'talking':_0x1b3fae[_0x85d5('0x26')],'total':_0x1b3fae[_0x85d5('0x27')],'type':_0x1b3fae[_0x85d5('0x28')],'unmanaged':_0x1b3fae['unmanaged'],'abandoned':_0x1b3fae['abandoned'],'waiting':_0x1b3fae[_0x85d5('0x29')],'loggedInDb':_0x1b3fae[_0x85d5('0x2a')]};if(_0x1b3fae[_0x85d5('0x28')]===_0x85d5('0x2b')){_0x233ccd[_0x85d5('0x2c')]=_0x1b3fae['dialActive'];_0x233ccd[_0x85d5('0x2d')]=_0x1b3fae[_0x85d5('0x2d')];_0x233ccd['dialOriginateCallerIdName']=_0x1b3fae['dialOriginateCallerIdName'];_0x233ccd[_0x85d5('0x2e')]=_0x1b3fae[_0x85d5('0x2e')];_0x233ccd['dialOriginateTimeout']=_0x1b3fae[_0x85d5('0x2f')];_0x233ccd['dialPrefix']=_0x1b3fae[_0x85d5('0x30')];_0x233ccd[_0x85d5('0x31')]=_0x1b3fae['temp'];_0x233ccd[_0x85d5('0x32')]=_0x1b3fae[_0x85d5('0x32')];_0x233ccd[_0x85d5('0x33')]=_0x1b3fae[_0x85d5('0x33')];_0x233ccd['outboundBlacklistCallsDay']=_0x1b3fae['outboundBlacklistCallsDay'];_0x233ccd[_0x85d5('0x34')]=_0x1b3fae[_0x85d5('0x34')];_0x233ccd[_0x85d5('0x35')]=_0x1b3fae[_0x85d5('0x35')];_0x233ccd[_0x85d5('0x36')]=_0x1b3fae[_0x85d5('0x36')];_0x233ccd[_0x85d5('0x37')]=_0x1b3fae[_0x85d5('0x37')];_0x233ccd[_0x85d5('0x38')]=_0x1b3fae['outboundDropCallsDayTimeout'];_0x233ccd['outboundNoAnswerCallsDay']=_0x1b3fae[_0x85d5('0x39')];_0x233ccd[_0x85d5('0x3a')]=_0x1b3fae[_0x85d5('0x3a')];_0x233ccd[_0x85d5('0x3b')]=_0x1b3fae[_0x85d5('0x3b')];_0x233ccd[_0x85d5('0x3c')]=_0x1b3fae[_0x85d5('0x3c')];_0x233ccd[_0x85d5('0x3d')]=_0x1b3fae['outboundRejectCallsDay'];_0x233ccd[_0x85d5('0x3e')]=_0x1b3fae[_0x85d5('0x3e')];_0x233ccd[_0x85d5('0x3f')]=_0x1b3fae[_0x85d5('0x3f')];_0x233ccd['predictiveIntervalAvgHoldtime']=_0x1b3fae[_0x85d5('0x40')];_0x233ccd[_0x85d5('0x41')]=_0x1b3fae[_0x85d5('0x41')];_0x233ccd[_0x85d5('0x42')]=_0x1b3fae['predictiveIntervalDroppedCallsCallersExit'];_0x233ccd[_0x85d5('0x43')]=_0x1b3fae['predictiveIntervalDroppedCallsTimeout'];_0x233ccd['predictiveIntervalErlangCalls']=_0x1b3fae[_0x85d5('0x44')];_0x233ccd['predictiveIntervalErlangCallsDroppedCalls']=_0x1b3fae[_0x85d5('0x45')];_0x233ccd['predictiveIntervalHitRate']=_0x1b3fae['predictiveIntervalHitRate'];_0x233ccd[_0x85d5('0x46')]=_0x1b3fae[_0x85d5('0x46')];_0x233ccd[_0x85d5('0x47')]=_0x1b3fae[_0x85d5('0x47')];_0x233ccd[_0x85d5('0x48')]=_0x1b3fae['predictiveIntervalAvailable'];_0x233ccd['predictiveIntervalTotalCalls']=_0x1b3fae[_0x85d5('0x49')];_0x233ccd[_0x85d5('0x19')]=_0x1b3fae[_0x85d5('0x19')];_0x233ccd[_0x85d5('0x4a')]=_0x1b3fae[_0x85d5('0x4a')];_0x233ccd[_0x85d5('0x4b')]=_0x1b3fae['erlangCalls'];_0x233ccd['erlangCallToSecond']=_0x1b3fae[_0x85d5('0x4c')];_0x233ccd['erlangAbandonmentRate']=_0x1b3fae[_0x85d5('0x4d')];_0x233ccd[_0x85d5('0x4e')]=_0x1b3fae[_0x85d5('0x4e')];_0x233ccd[_0x85d5('0x4f')]=_0x1b3fae[_0x85d5('0x4f')];_0x233ccd['startProgressive']=_0x1b3fae['startProgressive'];}if(_0x1b3fae[_0x85d5('0x50')]){_0x233ccd[_0x85d5('0x50')]={'id':_0x1b3fae[_0x85d5('0x50')]['id'],'name':_0x1b3fae[_0x85d5('0x50')][_0x85d5('0x6')],'active':_0x1b3fae[_0x85d5('0x50')][_0x85d5('0x51')],'callerid':_0x1b3fae[_0x85d5('0x50')][_0x85d5('0x52')]};}if(_0x1b3fae[_0x85d5('0x53')]){_0x233ccd[_0x85d5('0x53')]={'id':_0x1b3fae[_0x85d5('0x53')]['id'],'name':_0x1b3fae[_0x85d5('0x53')][_0x85d5('0x6')]};}_0x12fea3[_0x85d5('0x54')](_0x233ccd);}}_0x244353({'count':_0x12fea3[_0x85d5('0x55')],'rows':_0x12fea3});});},'UpdateVoiceQueue':function(_0x414d0e){return new Promise(function(_0x54e91b,_0x54c786){var _0x3d12c0=_[_0x85d5('0x56')](_0x54207b[_0x85d5('0x1e')],{'id':parseInt(_0x414d0e['id'])});var _0x22cffd=_[_0x85d5('0x57')](_0x414d0e,['id']);if(_0x3d12c0){for(var _0xe34edd in _0x22cffd){if(typeof _0x22cffd[_0xe34edd]!=='undefined'&&typeof _0x3d12c0[_0xe34edd]!==_0x85d5('0x58')){_0x3d12c0[_0xe34edd]=_0x22cffd[_0xe34edd];}}_0x54e91b(_0x3d12c0);}else{_0x54c786();}});},'VoiceChannels':function(_0x5d3b36){return new Promise(function(_0x5d6df2,_0x1cc44b){var _0x13ab32=_[_0x85d5('0x59')](_0x54207b[_0x85d5('0x5a')]);_0x5d6df2({'count':_0x13ab32[_0x85d5('0x55')],'rows':_0x13ab32});});},'VoiceChannelMixMonitor':function(_0x588d8a){var _0x26adc5=this;return new Promise(function(_0x4d3e06,_0x1f2ef9){if(ami[_0x85d5('0xd')]()==![]){return _0x1f2ef9(_0x26adc5[_0x85d5('0xe')](0x1f4,[config['asterisk']['ip'],config['asterisk']['username'],_0x85d5('0x1b')][_0x85d5('0x11')]('\x20')));}var _0x2d4fe4=schema(properties['voicechannel'])['validate'](_0x588d8a);if(_0x2d4fe4[_0x85d5('0x55')]>0x0){return _0x1f2ef9(_0x26adc5[_0x85d5('0xe')](0x1f4,_[_0x85d5('0x5b')](_0x2d4fe4,_0x85d5('0x19'))['join'](',\x20')));}var _0x3f69ea=_[_0x85d5('0x56')](_0x54207b[_0x85d5('0x5a')],{'uniqueid':_0x588d8a[_0x85d5('0x5c')]});if(_0x3f69ea&&_0x3f69ea[_0x85d5('0x5d')]){var _0x39d3a9=util[_0x85d5('0x5e')](_0x85d5('0x5f'),_0x588d8a[_0x85d5('0x60')]||_0x588d8a[_0x85d5('0x5c')],_0x588d8a[_0x85d5('0x5e')]||_0x85d5('0x61'));return ami[_0x85d5('0x17')]({'action':_0x85d5('0x62'),'channel':_0x3f69ea[_0x85d5('0x5d')],'file':_0x39d3a9,'options':'ai(mixmonitorid)'})[_0x85d5('0x18')](function(_0x16daf7){var _0x12692a=_[_0x85d5('0x56')](_0x3f69ea['monitors'],{'filename':_0x85d5('0x63')+_0x39d3a9['toLowerCase']()});if(_[_0x85d5('0x64')](_0x12692a)){_0x3f69ea[_0x85d5('0x65')][_0x85d5('0x54')]({'filename':_0x85d5('0x63')+_0x39d3a9['toLowerCase'](),'createdAt':moment()[_0x85d5('0x5e')]('YYYY-MM-DD\x20HH:mm:ss'),'mixmonitorid':_0x16daf7['mixmonitorid'],'status':'rec'});}else{_0x12692a[_0x85d5('0x66')]=_0x16daf7[_0x85d5('0x66')];_0x12692a[_0x85d5('0x67')]=_0x85d5('0x68');}_0x4d3e06({'code':0xc8,'message':[_0x588d8a[_0x85d5('0x5c')],'MixMonitor\x20Success',_0x16daf7['mixmonitorid']][_0x85d5('0x11')]('\x20'),'mixmonitorid':_0x16daf7[_0x85d5('0x66')]});})[_0x85d5('0x1a')](function(_0xfac901){_0x1f2ef9(_0x26adc5['error'](0x1f5,[_0x588d8a[_0x85d5('0x5c')],_0xfac901[_0x85d5('0x19')][_0x85d5('0x69')]()]['join']('\x20')));});}else{return _0x1f2ef9(_0x26adc5['error'](0x1f5,_0x85d5('0x6a')));}});},'VoiceChannelStopMixMonitor':function(_0x404451){var _0x19cb24=this;return new Promise(function(_0x550d7f,_0x3dfbda){if(ami[_0x85d5('0xd')]()==![]){return _0x3dfbda(_0x19cb24[_0x85d5('0xe')](0x1f4,[config[_0x85d5('0xf')]['ip'],config['asterisk'][_0x85d5('0x10')],_0x85d5('0x1b')][_0x85d5('0x11')]('\x20')));}var _0x51e021=schema(properties[_0x85d5('0x6b')])[_0x85d5('0x6c')](_0x404451);if(_0x51e021[_0x85d5('0x55')]>0x0){return _0x3dfbda(_0x19cb24['error'](0x1f4,_[_0x85d5('0x5b')](_0x51e021,_0x85d5('0x19'))['join'](',\x20')));}var _0x242ad0=_['find'](_0x54207b[_0x85d5('0x5a')],{'uniqueid':_0x404451['uniqueid']});if(_0x242ad0){return BPromise[_0x85d5('0x6d')]()[_0x85d5('0x18')](function(){if(_0x242ad0[_0x85d5('0x5d')]){return ami[_0x85d5('0x17')]({'action':'StopMixMonitor','channel':_0x242ad0[_0x85d5('0x5d')],'mixmonitorid':_0x404451[_0x85d5('0x66')]})[_0x85d5('0x1a')](function(_0x3db5c7){});}})[_0x85d5('0x18')](function(){if(_0x242ad0[_0x85d5('0x6e')]){return ami[_0x85d5('0x17')]({'action':_0x85d5('0x6f'),'channel':_0x242ad0['destinationchannel'],'mixmonitorid':_0x404451['mixmonitorid']})[_0x85d5('0x1a')](function(_0x5e326a){});}})[_0x85d5('0x18')](function(_0x12c235){var _0x5662d2=_['find'](_0x242ad0[_0x85d5('0x65')],{'mixmonitorid':_0x404451[_0x85d5('0x66')]});if(_0x5662d2){_0x5662d2[_0x85d5('0x67')]='stop';}})[_0x85d5('0x18')](function(){var _0x102cd3=util[_0x85d5('0x5e')](_0x85d5('0x5f'),_0x404451['filename']||_0x404451['uniqueid'],_0x404451[_0x85d5('0x5e')]||'wav');var _0x565337=_[_0x85d5('0x56')](_0x242ad0[_0x85d5('0x65')],{'filename':_0x85d5('0x63')+_0x102cd3['toLowerCase']()});if(_0x565337){_0x565337['status']=_0x85d5('0x70');}})[_0x85d5('0x18')](function(){_0x550d7f({'code':0xc8,'message':[_0x404451[_0x85d5('0x5c')],'StopMixMonitor\x20Success'][_0x85d5('0x11')]('\x20')});})[_0x85d5('0x1a')](function(_0x109f19){_0x3dfbda(_0x19cb24[_0x85d5('0xe')](0x1f5,[_0x404451[_0x85d5('0x5c')],_0x109f19[_0x85d5('0x19')][_0x85d5('0x69')]()][_0x85d5('0x11')]('\x20')));});}else{return _0x3dfbda(_0x19cb24['error'](0x1f5,'Channel\x20doesn\x27t\x20exist'));}});},'VoiceQueuesChannels':function(_0x2a0a59){return new Promise(function(_0x176632,_0x167918){var _0x595301=_[_0x85d5('0x59')](_0x54207b[_0x85d5('0x71')]);_0x176632({'count':_0x595301['length'],'rows':_0x595301});});},'VoiceQueuesChannel':function(_0x2dbd18){var _0xe6617d=this;return new Promise(function(_0x39bcea,_0x146254){var _0xe97bcc=schema(properties['voicequeuechannel'])[_0x85d5('0x6c')](_0x2dbd18);if(_0xe97bcc[_0x85d5('0x55')]>0x0){return _0x146254(_0xe6617d[_0x85d5('0xe')](0x1f4,_[_0x85d5('0x5b')](_0xe97bcc,_0x85d5('0x19'))['join'](',\x20')));}var _0x403df1=_[_0x85d5('0x56')](_0x54207b[_0x85d5('0x71')],{'uniqueid':_0x2dbd18[_0x85d5('0x5c')]});if(_0x403df1){_0x39bcea(_0x403df1);}else{return _0x146254(_0xe6617d[_0x85d5('0xe')](0x1f5,_0x85d5('0x6a')));}});},'VoiceQueuesChannelHangup':function(_0x378f56){var _0xcff925=this;return new Promise(function(_0x3166ce,_0x2ed09d){if(ami['isConnected']()==![]){return _0x2ed09d(_0xcff925[_0x85d5('0xe')](0x1f4,[config[_0x85d5('0xf')]['ip'],config[_0x85d5('0xf')][_0x85d5('0x10')],_0x85d5('0x1b')][_0x85d5('0x11')]('\x20')));}var _0x4cd3a6=schema(properties[_0x85d5('0x72')])['validate'](_0x378f56);if(_0x4cd3a6['length']>0x0){return _0x2ed09d(_0xcff925[_0x85d5('0xe')](0x1f4,_[_0x85d5('0x5b')](_0x4cd3a6,_0x85d5('0x19'))[_0x85d5('0x11')](',\x20')));}var _0x47044b=_[_0x85d5('0x56')](_0x54207b[_0x85d5('0x71')],{'uniqueid':_0x378f56[_0x85d5('0x5c')]});if(_0x47044b&&_0x47044b[_0x85d5('0x5d')]){return ami['Action']({'action':_0x85d5('0x73'),'channel':_0x47044b[_0x85d5('0x5d')]})[_0x85d5('0x18')](function(_0x2e7d36){_0x3166ce({'code':0xc8,'message':[_0x378f56[_0x85d5('0x5c')],_0x2e7d36[_0x85d5('0x19')][_0x85d5('0x69')]()][_0x85d5('0x11')]('\x20')});})[_0x85d5('0x1a')](function(_0x22c352){_0x2ed09d(_0xcff925[_0x85d5('0xe')](0x1f5,[_0x378f56[_0x85d5('0x5c')],_0x22c352[_0x85d5('0x19')][_0x85d5('0x69')]()][_0x85d5('0x11')]('\x20')));});}else{return _0x2ed09d(_0xcff925['error'](0x1f5,'Channel\x20doesn\x27t\x20exist'));}});},'VoiceQueuesChannelRedirect':function(_0x2f4119){var _0x4983ca=this;return new Promise(function(_0x99f670,_0xa18a5e){if(ami[_0x85d5('0xd')]()==![]){return _0xa18a5e(_0x4983ca[_0x85d5('0xe')](0x1f4,[config[_0x85d5('0xf')]['ip'],config[_0x85d5('0xf')][_0x85d5('0x10')],_0x85d5('0x1b')][_0x85d5('0x11')]('\x20')));}var _0x5ed6cb=schema(properties[_0x85d5('0x74')])[_0x85d5('0x6c')](_0x2f4119);if(_0x5ed6cb['length']>0x0){return _0xa18a5e(_0x4983ca[_0x85d5('0xe')](0x1f4,_['map'](_0x5ed6cb,_0x85d5('0x19'))[_0x85d5('0x11')](',\x20')));}var _0x1c1595=_[_0x85d5('0x56')](_0x54207b['queueChannels'],{'uniqueid':_0x2f4119[_0x85d5('0x5c')]});if(_0x1c1595&&_0x1c1595[_0x85d5('0x5d')]){return ami['Action']({'action':_0x85d5('0x75'),'channel':_0x1c1595[_0x85d5('0x5d')],'exten':_0x2f4119['exten'],'context':_0x2f4119[_0x85d5('0x76')]||_0x1c1595[_0x85d5('0x76')],'priority':0x1})[_0x85d5('0x18')](function(_0x538121){_0x99f670({'code':0xc8,'message':[_0x2f4119[_0x85d5('0x5c')],_0x538121[_0x85d5('0x19')][_0x85d5('0x69')]()][_0x85d5('0x11')]('\x20')});})[_0x85d5('0x1a')](function(_0x1e45e5){_0xa18a5e(_0x4983ca['error'](0x1f5,[_0x2f4119[_0x85d5('0x5c')],_0x1e45e5[_0x85d5('0x19')]['toLowerCase']()][_0x85d5('0x11')]('\x20')));});}else{return _0xa18a5e(_0x4983ca['error'](0x1f5,_0x85d5('0x6a')));}});},'Agents':function(_0x38fb5b){return new Promise(function(_0x36432f,_0x52acec){var _0x4696bc=_[_0x85d5('0x59')](_0x54207b[_0x85d5('0xa')]);_0x36432f({'count':_0x4696bc[_0x85d5('0x55')],'rows':_0x4696bc});});},'Telephones':function(_0x429fd1){return new Promise(function(_0x57549f,_0x26a50f){var _0x29ca79=_[_0x85d5('0x59')](_0x54207b[_0x85d5('0x77')]);_0x57549f({'count':_0x29ca79['length'],'rows':_0x29ca79});});},'Trunks':function(_0x1764b0){return new Promise(function(_0x21f4fa,_0x340bca){var _0x5b4f25=_[_0x85d5('0x59')](_0x54207b['trunks']);_0x21f4fa({'count':_0x5b4f25[_0x85d5('0x55')],'rows':_0x5b4f25});});},'OutboundChannels':function(_0x3ab83f){return new Promise(function(_0x564c84,_0x4d4b95){var _0x3d8ffc=_[_0x85d5('0x59')](_0x54207b[_0x85d5('0x78')]);_0x564c84({'count':_0x3d8ffc[_0x85d5('0x55')],'rows':_0x3d8ffc});});},'Outbound':function(_0x1432e4){return new Promise(function(_0x243112,_0x9df0e7){_0x243112(_0x54207b[_0x85d5('0x2b')]);});},'Campaigns':function(_0x577d9b){return new Promise(function(_0x1be535,_0x2ba8cf){var _0x1470bf=_['values'](_0x54207b[_0x85d5('0x79')]);_0x1be535({'count':_0x1470bf[_0x85d5('0x55')],'rows':_0x1470bf});});},'VoiceQueuesPreview':function(_0x5d09e8){var _0x28ff23=this;return new Promise(function(_0x3bc3c4,_0x2c803e){_0x1eb211[_0x85d5('0x7a')](_0x5d09e8['id'])[_0x85d5('0x18')](function(_0x9f9619){_0x3bc3c4({'code':0xc8,'message':_0x9f9619[_0x85d5('0x19')]});})['catch'](function(_0x30c7d0){_0x2c803e(_0x28ff23[_0x85d5('0xe')](0x1f4,_0x30c7d0[_0x85d5('0x19')]));});});},'EventManager':function(_0xd3cbc9){var _0x51fcfb=this;return new Promise(function(_0x9f5b36,_0x2c1cb3){if(!_0xd3cbc9[_0x85d5('0x7b')]){return _0x2c1cb3(_0x51fcfb[_0x85d5('0xe')](0x1f4,_0x85d5('0x7c')));}ami['emit']('custom:'+_0xd3cbc9[_0x85d5('0x7b')],_0xd3cbc9['message']);_0x9f5b36({'code':0xc8,'message':_0xd3cbc9});});},'FaxAccounts':function(_0x8e33fd){return new Promise(function(_0x3ca915,_0xed342){var _0xc595b5=_[_0x85d5('0x59')](_0x54207b[_0x85d5('0x7d')]);_0x3ca915({'count':_0xc595b5[_0x85d5('0x55')],'rows':_0xc595b5});});},'SendFax':function(_0x48553d){var _0xedb32d=this;return new Promise(function(_0x5366bc,_0x26fbbe){_0x2d457a[_0x85d5('0x7e')](_0x48553d)[_0x85d5('0x18')](function(_0x5a884a){_0x5366bc({'code':0xc8,'message':_0x5a884a[_0x85d5('0x19')]});})[_0x85d5('0x1a')](function(_0x3263ea){_0x26fbbe(_0xedb32d['error'](0x1f4,_0x3263ea['message']));});});},'CheckAfterSend':function(_0x3de686){var _0x428fd4=this;return new Promise(function(_0x514a3c,_0x3d9a7b){_0x2d457a[_0x85d5('0x7f')](_0x3de686)['then'](function(_0x3e1e10){_0x514a3c({'code':0xc8,'message':_0x3e1e10[_0x85d5('0x19')]});})[_0x85d5('0x1a')](function(_0x4433ef){_0x3d9a7b(_0x428fd4[_0x85d5('0xe')](0x1f4,_0x4433ef[_0x85d5('0x19')]));});});}};var _0xd7cf5b=jayson['server'](_0x5f47ec)[_0x85d5('0x80')]();_0xd7cf5b['on'](_0x85d5('0xe'),function(_0xd3f8af){return _0x46e7b4(_0xd3f8af);});_0xd7cf5b[_0x85d5('0x3')](0x232a,'127.0.0.1',function(){console['log']('AMI\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!',0x232a);return _0x578fad(_0x85d5('0x81')+0x232a);});});}; \ No newline at end of file diff --git a/server/services/ami/trigger/cmContact/index.js b/server/services/ami/trigger/cmContact/index.js index d60a75d..155d5cf 100644 --- a/server/services/ami/trigger/cmContact/index.js +++ b/server/services/ami/trigger/cmContact/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1bd6=['[CM][%s][%s]\x20Contact\x20not\x20found','data4','[CM][%s][%s]\x20Autocreate\x20enabled','calleridname','','Unknown','destcalleridname','resolve','createContact','push','[CM][%s][%s]\x20Contact\x20created:%s','[CM][%s][%s]\x20Autocreate\x20disabled','isNil','user:%s','name','format','trigger:%s','action','toLowerCase','merge','lodash','bluebird','ioredis','../../../../config/logger','trigger','../../rpc/cmContact','redis','defaults','localhost','socket.io-emitter','info','stringify','emit','data1','data2','xmd-contactid','ListId','data3','split','phone','$or','map','routeId','destcalleridnum','calleridnum','firstName','lastName','mobile','fax','scheduledAt','updatedAt','union','getContacts','then','isEmpty','length','[CM][%s][%s]\x20Multiple\x20contacts\x20found:[%s]','uniqueid','join'];(function(_0xc7f7b0,_0x5450d9){var _0x3c47e8=function(_0xec803d){while(--_0xec803d){_0xc7f7b0['push'](_0xc7f7b0['shift']());}};_0x3c47e8(++_0x5450d9);}(_0x1bd6,0x100));var _0x61bd=function(_0x2b86d5,_0x4d03d5){_0x2b86d5=_0x2b86d5-0x0;var _0x45f37a=_0x1bd6[_0x2b86d5];return _0x45f37a;};'use strict';var _=require(_0x61bd('0x0'));var BPromise=require(_0x61bd('0x1'));var Redis=require(_0x61bd('0x2'));var util=require('util');var config=require('../../../../config/environment');var logger=require(_0x61bd('0x3'))(_0x61bd('0x4'));var cmContactRpc=require(_0x61bd('0x5'));config[_0x61bd('0x6')]=_[_0x61bd('0x7')](config[_0x61bd('0x6')],{'host':_0x61bd('0x8'),'port':0x18eb});var io=require(_0x61bd('0x9'))(new Redis(config[_0x61bd('0x6')]));function emit(_0x3dc745,_0x9441d3,_0xbe48ed,_0x31f513,_0x44fd8d){logger[_0x61bd('0xa')]('[CM][%s][%s]',_0x3dc745,_0x9441d3['id'],_0xbe48ed,_0x31f513,JSON[_0x61bd('0xb')](_0x44fd8d));io['to'](_0xbe48ed)[_0x61bd('0xc')](_0x31f513,_0x44fd8d);}exports['exec']=function(_0x49cb92,_0x396581,_0x4933ce,_0x125cf4){var _0x29bb36,_0x1160d0;var _0xb21361={};var _0x1f17a2=Number(_0x4933ce[_0x61bd('0xd')]);var _0x502843=_0x4933ce[_0x61bd('0xe')]?Boolean(Number(_0x4933ce[_0x61bd('0xe')])):![];var _0x277c54;if(_0x125cf4[_0x61bd('0xf')]){_0xb21361['id']=_0x125cf4[_0x61bd('0xf')];}if(!_0xb21361['id']){_0xb21361[_0x61bd('0x10')]=_0x1f17a2;_0x277c54=_0x4933ce[_0x61bd('0x11')]&&_0x4933ce[_0x61bd('0x11')]!=='0'?_0x4933ce['data3'][_0x61bd('0x12')](','):[_0x61bd('0x13')];_0xb21361[_0x61bd('0x14')]=_[_0x61bd('0x15')](_0x277c54,function(_0x267332){var _0x34ecec={};_0x34ecec[_0x267332]=_0x125cf4[_0x61bd('0x16')]?_0x125cf4[_0x61bd('0x17')]:_0x125cf4[_0x61bd('0x18')];return _0x34ecec;});}var _0x4c4a25=['id',_0x61bd('0x19'),_0x61bd('0x1a'),_0x61bd('0x13'),_0x61bd('0x1b'),_0x61bd('0x1c'),_0x61bd('0x10'),'createdAt',_0x61bd('0x1d'),_0x61bd('0x1e')];var _0x547461=_[_0x61bd('0x1f')](_0x4c4a25,_0x277c54);BPromise['resolve']()['then'](cmContactRpc[_0x61bd('0x20')]({'attributes':_0x547461,'where':_0xb21361}))[_0x61bd('0x21')](function(_0x42777a){_0x1160d0=_0x42777a;if(!_[_0x61bd('0x22')](_0x1160d0)){if(_0x1160d0[_0x61bd('0x23')]===0x1){_0x29bb36=_0x1160d0[0x0];logger[_0x61bd('0xa')]('[CM][%s][%s]\x20Contact\x20found:%s',_0x125cf4['uniqueid'],_0x396581['id'],_0x29bb36['id']);}else{logger[_0x61bd('0xa')](_0x61bd('0x24'),_0x125cf4[_0x61bd('0x25')],_0x396581['id'],_[_0x61bd('0x15')](_0x1160d0,'id')[_0x61bd('0x26')](','));}return;}else{logger[_0x61bd('0xa')](_0x61bd('0x27'),_0x125cf4[_0x61bd('0x25')],_0x396581['id']);var _0x271d4a={'ListId':_0x1f17a2};var _0x30e7e6=_0x4933ce[_0x61bd('0x28')]&&_0x4933ce[_0x61bd('0x28')]!=='0'?_0x4933ce['data4']:_0x61bd('0x13');if(_0x502843){logger[_0x61bd('0xa')](_0x61bd('0x29'),_0x125cf4[_0x61bd('0x25')],_0x396581['id']);_0x271d4a[_0x30e7e6]=_['isNil'](_0x125cf4['routeId'])?_0x125cf4[_0x61bd('0x18')]:_0x125cf4[_0x61bd('0x17')];if(_['isNil'](_0x125cf4[_0x61bd('0x16')])){_0x271d4a['firstName']=_0x125cf4[_0x61bd('0x2a')]&&_0x125cf4['calleridname']!==_0x61bd('0x2b')?_0x125cf4[_0x61bd('0x2a')]:_0x61bd('0x2c');}else{_0x271d4a[_0x61bd('0x19')]=_0x125cf4[_0x61bd('0x2d')]&&_0x125cf4[_0x61bd('0x2d')]!==_0x61bd('0x2b')?_0x125cf4['destcalleridname']:_0x61bd('0x2c');}return BPromise[_0x61bd('0x2e')]()[_0x61bd('0x21')](cmContactRpc[_0x61bd('0x2f')](_0x271d4a))[_0x61bd('0x21')](function(_0x49f1d2){_0x29bb36=_0x49f1d2;_0x1160d0[_0x61bd('0x30')](_0x49f1d2);if(_0x29bb36){logger[_0x61bd('0xa')](_0x61bd('0x31'),_0x125cf4[_0x61bd('0x25')],_0x396581['id'],_0x29bb36['id']);}return;});}else{logger[_0x61bd('0xa')](_0x61bd('0x32'),_0x125cf4[_0x61bd('0x25')],_0x396581['id']);_0x271d4a[_0x30e7e6]=_[_0x61bd('0x33')](_0x125cf4['routeId'])?_0x125cf4[_0x61bd('0x18')]:_0x125cf4[_0x61bd('0x17')];if(_[_0x61bd('0x33')](_0x125cf4['routeId'])){_0x271d4a[_0x61bd('0x19')]=_0x125cf4[_0x61bd('0x2a')]&&_0x125cf4[_0x61bd('0x2a')]!==_0x61bd('0x2b')?_0x125cf4[_0x61bd('0x2a')]:_0x61bd('0x2c');}else{_0x271d4a[_0x61bd('0x19')]=_0x125cf4[_0x61bd('0x2d')]&&_0x125cf4[_0x61bd('0x2d')]!==_0x61bd('0x2b')?_0x125cf4[_0x61bd('0x2d')]:'Unknown';}_0x29bb36=_0x271d4a;_0x1160d0['push'](_0x271d4a);return;}}})[_0x61bd('0x21')](function(){if(_0x49cb92){emit(_0x125cf4['uniqueid'],_0x396581,util['format'](_0x61bd('0x34'),_0x49cb92[_0x61bd('0x35')]),util[_0x61bd('0x36')](_0x61bd('0x37'),_0x4933ce[_0x61bd('0x38')][_0x61bd('0x39')]()),{'evt':_[_0x61bd('0x3a')](_0x125cf4,{'autoCreate':_0x502843}),'contact':_0x29bb36===undefined?{}:_0x29bb36,'contacts':_0x1160d0['length']===0x0?undefined:_0x1160d0});}});}; \ No newline at end of file +var _0x881a=['uniqueid','[CM][%s][%s]\x20Multiple\x20contacts\x20found:[%s]','join','data4','[CM][%s][%s]\x20Autocreate\x20enabled','isNil','firstName','calleridname','','destcalleridname','Unknown','createContact','push','[CM][%s][%s]\x20Contact\x20created:%s','[CM][%s][%s]\x20Autocreate\x20disabled','format','user:%s','name','trigger:%s','toLowerCase','merge','lodash','ioredis','util','../../../../config/environment','../../../../config/logger','trigger','redis','defaults','localhost','socket.io-emitter','info','[CM][%s][%s]','stringify','emit','exec','data1','data2','xmd-contactid','ListId','data3','split','map','routeId','destcalleridnum','calleridnum','mobile','createdAt','scheduledAt','union','resolve','then','getContacts','isEmpty','length'];(function(_0x25506f,_0x2e5e61){var _0x50236b=function(_0x4b3f38){while(--_0x4b3f38){_0x25506f['push'](_0x25506f['shift']());}};_0x50236b(++_0x2e5e61);}(_0x881a,0x15f));var _0xa881=function(_0xc9bc0f,_0x12e2ac){_0xc9bc0f=_0xc9bc0f-0x0;var _0x4aacbc=_0x881a[_0xc9bc0f];return _0x4aacbc;};'use strict';var _=require(_0xa881('0x0'));var BPromise=require('bluebird');var Redis=require(_0xa881('0x1'));var util=require(_0xa881('0x2'));var config=require(_0xa881('0x3'));var logger=require(_0xa881('0x4'))(_0xa881('0x5'));var cmContactRpc=require('../../rpc/cmContact');config[_0xa881('0x6')]=_[_0xa881('0x7')](config[_0xa881('0x6')],{'host':_0xa881('0x8'),'port':0x18eb});var io=require(_0xa881('0x9'))(new Redis(config[_0xa881('0x6')]));function emit(_0xda4bd2,_0x123d26,_0x33fd24,_0x3598bb,_0x254e55){logger[_0xa881('0xa')](_0xa881('0xb'),_0xda4bd2,_0x123d26['id'],_0x33fd24,_0x3598bb,JSON[_0xa881('0xc')](_0x254e55));io['to'](_0x33fd24)[_0xa881('0xd')](_0x3598bb,_0x254e55);}exports[_0xa881('0xe')]=function(_0x42c8ff,_0xf8c43,_0x2311a6,_0x2a3865){var _0x1f2e40,_0x2250a5;var _0x38a9d8={};var _0x1f6980=Number(_0x2311a6[_0xa881('0xf')]);var _0x270200=_0x2311a6[_0xa881('0x10')]?Boolean(Number(_0x2311a6[_0xa881('0x10')])):![];var _0x223484;if(_0x2a3865[_0xa881('0x11')]){_0x38a9d8['id']=_0x2a3865['xmd-contactid'];}if(!_0x38a9d8['id']){_0x38a9d8[_0xa881('0x12')]=_0x1f6980;_0x223484=_0x2311a6[_0xa881('0x13')]&&_0x2311a6['data3']!=='0'?_0x2311a6['data3'][_0xa881('0x14')](','):['phone'];_0x38a9d8['$or']=_[_0xa881('0x15')](_0x223484,function(_0x29a35a){var _0x4a157e={};_0x4a157e[_0x29a35a]=_0x2a3865[_0xa881('0x16')]?_0x2a3865[_0xa881('0x17')]:_0x2a3865[_0xa881('0x18')];return _0x4a157e;});}var _0x4e25d8=['id','firstName','lastName','phone',_0xa881('0x19'),'fax',_0xa881('0x12'),_0xa881('0x1a'),_0xa881('0x1b'),'updatedAt'];var _0x5d0097=_[_0xa881('0x1c')](_0x4e25d8,_0x223484);BPromise[_0xa881('0x1d')]()[_0xa881('0x1e')](cmContactRpc[_0xa881('0x1f')]({'attributes':_0x5d0097,'where':_0x38a9d8}))[_0xa881('0x1e')](function(_0x5c47f4){_0x2250a5=_0x5c47f4;if(!_[_0xa881('0x20')](_0x2250a5)){if(_0x2250a5[_0xa881('0x21')]===0x1){_0x1f2e40=_0x2250a5[0x0];logger[_0xa881('0xa')]('[CM][%s][%s]\x20Contact\x20found:%s',_0x2a3865[_0xa881('0x22')],_0xf8c43['id'],_0x1f2e40['id']);}else{logger[_0xa881('0xa')](_0xa881('0x23'),_0x2a3865[_0xa881('0x22')],_0xf8c43['id'],_[_0xa881('0x15')](_0x2250a5,'id')[_0xa881('0x24')](','));}return;}else{logger[_0xa881('0xa')]('[CM][%s][%s]\x20Contact\x20not\x20found',_0x2a3865[_0xa881('0x22')],_0xf8c43['id']);var _0x34de07={'ListId':_0x1f6980};var _0x459d5d=_0x2311a6[_0xa881('0x25')]&&_0x2311a6[_0xa881('0x25')]!=='0'?_0x2311a6[_0xa881('0x25')]:'phone';if(_0x270200){logger[_0xa881('0xa')](_0xa881('0x26'),_0x2a3865[_0xa881('0x22')],_0xf8c43['id']);_0x34de07[_0x459d5d]=_['isNil'](_0x2a3865[_0xa881('0x16')])?_0x2a3865['calleridnum']:_0x2a3865[_0xa881('0x17')];if(_[_0xa881('0x27')](_0x2a3865[_0xa881('0x16')])){_0x34de07[_0xa881('0x28')]=_0x2a3865[_0xa881('0x29')]&&_0x2a3865[_0xa881('0x29')]!==_0xa881('0x2a')?_0x2a3865['calleridname']:'Unknown';}else{_0x34de07[_0xa881('0x28')]=_0x2a3865[_0xa881('0x2b')]&&_0x2a3865['destcalleridname']!==_0xa881('0x2a')?_0x2a3865[_0xa881('0x2b')]:_0xa881('0x2c');}return BPromise[_0xa881('0x1d')]()[_0xa881('0x1e')](cmContactRpc[_0xa881('0x2d')](_0x34de07))[_0xa881('0x1e')](function(_0x3bfd39){_0x1f2e40=_0x3bfd39;_0x2250a5[_0xa881('0x2e')](_0x3bfd39);if(_0x1f2e40){logger['info'](_0xa881('0x2f'),_0x2a3865['uniqueid'],_0xf8c43['id'],_0x1f2e40['id']);}return;});}else{logger[_0xa881('0xa')](_0xa881('0x30'),_0x2a3865[_0xa881('0x22')],_0xf8c43['id']);_0x34de07[_0x459d5d]=_[_0xa881('0x27')](_0x2a3865[_0xa881('0x16')])?_0x2a3865[_0xa881('0x18')]:_0x2a3865[_0xa881('0x17')];if(_['isNil'](_0x2a3865[_0xa881('0x16')])){_0x34de07[_0xa881('0x28')]=_0x2a3865[_0xa881('0x29')]&&_0x2a3865[_0xa881('0x29')]!==_0xa881('0x2a')?_0x2a3865[_0xa881('0x29')]:_0xa881('0x2c');}else{_0x34de07[_0xa881('0x28')]=_0x2a3865[_0xa881('0x2b')]&&_0x2a3865[_0xa881('0x2b')]!==_0xa881('0x2a')?_0x2a3865[_0xa881('0x2b')]:_0xa881('0x2c');}_0x1f2e40=_0x34de07;_0x2250a5['push'](_0x34de07);return;}}})[_0xa881('0x1e')](function(){if(_0x42c8ff){emit(_0x2a3865[_0xa881('0x22')],_0xf8c43,util[_0xa881('0x31')](_0xa881('0x32'),_0x42c8ff[_0xa881('0x33')]),util['format'](_0xa881('0x34'),_0x2311a6['action'][_0xa881('0x35')]()),{'evt':_[_0xa881('0x36')](_0x2a3865,{'autoCreate':_0x270200}),'contact':_0x1f2e40===undefined?{}:_0x1f2e40,'contacts':_0x2250a5[_0xa881('0x21')]===0x0?undefined:_0x2250a5});}});}; \ No newline at end of file diff --git a/server/services/ami/trigger/index.js b/server/services/ami/trigger/index.js index d820217..91773ec 100644 --- a/server/services/ami/trigger/index.js +++ b/server/services/ami/trigger/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7a30=['operator','message','event','agent','membername','lastevent','exports','util','lodash','mustache','ioredis','./urlforward','./cmContact','./script','../../../config/environment','../../../config/logger','trigger','../ami','redis','defaults','socket.io-emitter','url','triggers','agents','voiceQueues','templates','voiceExtensions','zendeskAccounts','freshdeskAccounts','salesforceAccounts','sugarcrmAccounts','zohoAccounts','deskAccounts','vtigerAccounts','servicenowAccounts','dynamics365Accounts','freshsalesAccounts','accounts','custom:agentcalled','syncCustomEvent','bind','custom:agentringnoanswer','custom:agentnosuchnumber','custom:agentnoanswer','custom:agentbusy','custom:agentreject','custom:amd','custom:queuecallerabandon','custom:timeout','custom:dialbegin','syncAgentDial','custom:dialconnect','custom:newinteraction','custom:closedinteraction','custom:incomingmessage','prototype','emit','clone','checkTriggers','interface','hasOwnProperty','status','checkTrigger','merge','variables','Actions','action','toLowerCase','motionbar','browser','TemplateId','data2','html','render','template\x20not\x20found','uri','buildUri','isNil','data3','data4','location','uriLocation','windowWidth','data5','800','windowHeight','600','data6','winApplication','winArguments','format','user:%s','name','data1','jscripty','trigger:%s','contactmanager','exec','queue','routeId','urlforward','script','parse','query','search','AllConditions','length','every','channel','some','AnyConditions','checkConditions','field','chat','ChatWebsiteId','value','upperFirst','AccountId'];(function(_0x214f0a,_0x2dd8da){var _0x378a10=function(_0x52edca){while(--_0x52edca){_0x214f0a['push'](_0x214f0a['shift']());}};_0x378a10(++_0x2dd8da);}(_0x7a30,0x1df));var _0x07a3=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x7a30[_0x20a584];return _0x4b41a8;};'use strict';var util=require(_0x07a3('0x0'));var _=require(_0x07a3('0x1'));var url=require('url');var Mustache=require(_0x07a3('0x2'));var Redis=require(_0x07a3('0x3'));var urlforward=require(_0x07a3('0x4'));var integration=require('./integration');var cmContact=require(_0x07a3('0x5'));var script=require(_0x07a3('0x6'));var config=require(_0x07a3('0x7'));var logger=require(_0x07a3('0x8'))(_0x07a3('0x9'));var ami=require(_0x07a3('0xa'));config[_0x07a3('0xb')]=_[_0x07a3('0xc')](config[_0x07a3('0xb')],{'host':'localhost','port':0x18eb});var io=require(_0x07a3('0xd'))(new Redis(config[_0x07a3('0xb')]));var operators={'equals':function(_0x376c92,_0x58fb7a){return _0x376c92==_0x58fb7a;},'not_equals':function(_0x47dcb9,_0x17dbde){return _0x47dcb9!=_0x17dbde;}};var barAndWebActions=['popup',_0x07a3('0xe'),'winapp'];function Trigger(_0x26aa6b){this[_0x07a3('0xf')]=_0x26aa6b[_0x07a3('0xf')];this[_0x07a3('0x10')]=_0x26aa6b[_0x07a3('0x10')];this[_0x07a3('0x11')]=_0x26aa6b[_0x07a3('0x11')];this[_0x07a3('0x12')]=_0x26aa6b[_0x07a3('0x12')];this[_0x07a3('0x13')]=_0x26aa6b[_0x07a3('0x13')];this[_0x07a3('0x14')]=_0x26aa6b[_0x07a3('0x14')];this[_0x07a3('0x15')]=_0x26aa6b[_0x07a3('0x15')];this[_0x07a3('0x16')]=_0x26aa6b[_0x07a3('0x16')];this[_0x07a3('0x17')]=_0x26aa6b[_0x07a3('0x17')];this[_0x07a3('0x18')]=_0x26aa6b[_0x07a3('0x18')];this[_0x07a3('0x19')]=_0x26aa6b['deskAccounts'];this[_0x07a3('0x1a')]=_0x26aa6b[_0x07a3('0x1a')];this[_0x07a3('0x1b')]=_0x26aa6b[_0x07a3('0x1b')];this[_0x07a3('0x1c')]=_0x26aa6b[_0x07a3('0x1c')];this[_0x07a3('0x1d')]=_0x26aa6b[_0x07a3('0x1d')];this[_0x07a3('0x1e')]={'zendesk':this[_0x07a3('0x14')],'salesforce':this['salesforceAccounts'],'freshdesk':this[_0x07a3('0x15')],'sugarcrm':this[_0x07a3('0x17')],'zoho':this['zohoAccounts'],'desk':this['deskAccounts'],'vtiger':this[_0x07a3('0x1a')],'dynamics365':this[_0x07a3('0x1c')],'freshsales':this['freshsalesAccounts'],'servicenow':this['servicenowAccounts']};ami['on'](_0x07a3('0x1f'),this['syncCustomEvent']['bind'](this));ami['on']('custom:agentconnect',this[_0x07a3('0x20')][_0x07a3('0x21')](this));ami['on'](_0x07a3('0x22'),this[_0x07a3('0x20')][_0x07a3('0x21')](this));ami['on']('custom:agentcomplete',this[_0x07a3('0x20')][_0x07a3('0x21')](this));ami['on'](_0x07a3('0x23'),this[_0x07a3('0x20')][_0x07a3('0x21')](this));ami['on'](_0x07a3('0x24'),this[_0x07a3('0x20')]['bind'](this));ami['on'](_0x07a3('0x25'),this['syncCustomEvent'][_0x07a3('0x21')](this));ami['on']('custom:agentcongestion',this[_0x07a3('0x20')]['bind'](this));ami['on'](_0x07a3('0x26'),this['syncCustomEvent'][_0x07a3('0x21')](this));ami['on'](_0x07a3('0x27'),this[_0x07a3('0x20')][_0x07a3('0x21')](this));ami['on'](_0x07a3('0x28'),this[_0x07a3('0x20')][_0x07a3('0x21')](this));ami['on'](_0x07a3('0x29'),this[_0x07a3('0x20')]['bind'](this));ami['on'](_0x07a3('0x2a'),this[_0x07a3('0x2b')][_0x07a3('0x21')](this));ami['on'](_0x07a3('0x2c'),this[_0x07a3('0x2b')][_0x07a3('0x21')](this));ami['on']('custom:dialend',this[_0x07a3('0x2b')][_0x07a3('0x21')](this));ami['on'](_0x07a3('0x2d'),this[_0x07a3('0x20')][_0x07a3('0x21')](this));ami['on'](_0x07a3('0x2e'),this['syncCustomEvent'][_0x07a3('0x21')](this));ami['on'](_0x07a3('0x2f'),this[_0x07a3('0x20')][_0x07a3('0x21')](this));ami['on']('custom:outgoingmessage',this[_0x07a3('0x20')][_0x07a3('0x21')](this));ami['on']('custom:acceptmessage',this[_0x07a3('0x20')][_0x07a3('0x21')](this));ami['on']('custom:rejectmessage',this[_0x07a3('0x20')][_0x07a3('0x21')](this));}Trigger[_0x07a3('0x30')][_0x07a3('0x31')]=function(_0x28d5fa,_0x1ff7a6,_0x1bde08){logger['info'](_0x28d5fa,_0x1ff7a6,JSON['stringify'](_0x1bde08));io['to'](_0x28d5fa)['emit'](_0x1ff7a6,_0x1bde08);};Trigger[_0x07a3('0x30')][_0x07a3('0x20')]=function(_0x2129f4){var _0x46d0ec=_[_0x07a3('0x32')](_0x2129f4);this[_0x07a3('0x33')](_0x46d0ec);};Trigger[_0x07a3('0x30')][_0x07a3('0x2b')]=function(_0xebbf54){if(this[_0x07a3('0x10')][_0xebbf54[_0x07a3('0x34')]]){this['syncCustomEvent'](_0xebbf54);}};Trigger[_0x07a3('0x30')][_0x07a3('0x33')]=function(_0x280145){var _0x3442c5;for(var _0x1586b9 in this[_0x07a3('0xf')]){if(this[_0x07a3('0xf')][_0x07a3('0x35')](_0x1586b9)){if(this[_0x07a3('0xf')][_0x1586b9][_0x07a3('0x36')]){_0x3442c5=this[_0x07a3('0x37')](this[_0x07a3('0xf')][_0x1586b9],_0x280145);if(_0x3442c5){_[_0x07a3('0x38')](_0x280145,_0x280145[_0x07a3('0x39')]);for(var _0x2a8c27=0x0,_0x2f02e7,_0x2f5719,_0x28f480;_0x2a8c270x0){_0x55ad0f=_[_0xf326('0x25')](_0x581531,_0x1617d2);}return _0x55ad0f;}function getCustomFields(_0x1ae23a,_0x2fa28e){var _0x5dbe63=[];var _0xc115d9={'custom_fields':{}};if(_0x1ae23a[_0xf326('0x26')]>0x0){_['forEach'](_0x1ae23a,function(_0x225776){if(_[_0xf326('0x27')]([_0xf326('0x28'),_0xf326('0x29')],_0x225776[_0xf326('0x2a')])&&_0x225776[_0xf326('0x2b')]&&!_0x225776[_0xf326('0x2c')]){_0xc115d9[_0x225776[_0xf326('0x2b')][_0xf326('0x2d')]()]=_0x225776[_0xf326('0x2e')]['toString']();}else if(_[_0xf326('0x27')]([_0xf326('0x28'),_0xf326('0x29')],_0x225776['type'])&&_0x225776[_0xf326('0x2f')]&&_0x225776[_0xf326('0x2c')]){_0xc115d9[_0xf326('0x30')][_0x225776['idField']]=_0x225776['content'][_0xf326('0x31')]();}else if(_0x225776[_0xf326('0x2a')]===_0xf326('0x32')&&_0x225776[_0xf326('0x33')]&&_0x225776[_0xf326('0x2f')]&&_0x225776[_0xf326('0x2c')]){_0x2fa28e[_0x225776[_0xf326('0x33')]]&&(_0xc115d9[_0xf326('0x30')][_0x225776['idField']]=_0x2fa28e[_0x225776[_0xf326('0x33')]][_0xf326('0x31')]());}else if(_0x225776['type']===_0xf326('0x34')&&_0x225776['Variable']&&_0x225776[_0xf326('0x35')]['name']&&_0x225776['idField']&&_0x225776[_0xf326('0x2c')]){_0x2fa28e[_0x225776['Variable'][_0xf326('0x36')]['toLowerCase']()]&&(_0xc115d9[_0xf326('0x30')][_0x225776[_0xf326('0x2f')]]=_0x2fa28e[_0x225776[_0xf326('0x35')]['name'][_0xf326('0x2d')]()][_0xf326('0x31')]());}});}if(_0xc115d9['priority']){_0xc115d9[_0xf326('0x37')]=Number(_0xc115d9[_0xf326('0x37')]);}return _0xc115d9;}function getTicket(_0x40fa7a,_0xaf65e0,_0x51076c,_0x2c4416,_0xb1ef35){logger[_0xf326('0xb')](_0xf326('0x38'));var _0x1d88ed=_['merge']({'subject':intUtil[_0xf326('0x39')](_0x2c4416[_0xf326('0x3a')],_0xb1ef35,'\x20'),'type':'phone','status':'new','labels':[_0xf326('0x3b'),'Motion','CTI'][_0xf326('0x3c')](getTags(_0x2c4416['Tags'],_0xf326('0x36'))),'description':intUtil[_0xf326('0x39')](_0x2c4416[_0xf326('0x3d')],_0xb1ef35,'\x0a'),'_links':{'assigned_user':{'href':util[_0xf326('0x13')]('/api/v2/users/%d',_0xaf65e0['id']),'class':_0xf326('0x3e')}},'message':{'direction':'in','body':intUtil[_0xf326('0x39')](_0x2c4416[_0xf326('0x3d')],_0xb1ef35,'\x0a')}},getCustomFields(_0x2c4416[_0xf326('0x3f')],_0xb1ef35));return request({'uri':util[_0xf326('0x13')](_0xf326('0x40'),_0x40fa7a[_0xf326('0x16')],_0x51076c['id']),'method':_0xf326('0x23'),'body':_0x1d88ed});}exports[_0xf326('0x41')]=function(_0x1227d3,_0x361776,_0x2bab13,_0x50d63f,_0x1b6126,_0x1637dc){var _0x2ed1a7,_0x270288;_0x1637dc[_0xf326('0x16')]=intUtil[_0xf326('0x42')](_0x1637dc['remoteUri']);_0x1637dc[_0xf326('0x43')]=intUtil[_0xf326('0x42')](_0x1637dc['serverUrl']);if(_0x1b6126&&_0x1b6126[_0xf326('0x44')]){logger[_0xf326('0xb')](_0xf326('0x45'),_0xf326('0x46'));_0x361776[_0xf326('0x47')]=util['format']('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x1637dc[_0xf326('0x43')],_0x361776[_0xf326('0x48')],md5(_0x361776['uniqueid']));}else{_0x361776['recordingURL']='';}headers[_0xf326('0x49')]=getAuth(_0x1637dc);return getUser(_0x1637dc,_0x50d63f[_0xf326('0x4a')])[_0xf326('0xe')](function(_0x5b3705){_0x2ed1a7=_0x5b3705;logger[_0xf326('0xb')](_0xf326('0x4b'),_0x2ed1a7['id']);return getEndUser(_0x1637dc,_0x361776[_0xf326('0x4c')],_0x361776[_0xf326('0x4d')]);})[_0xf326('0xe')](function(_0x2d9bba){_0x270288=_0x2d9bba;logger[_0xf326('0xb')](_0xf326('0x4e'),_0x270288['id']);return getTicket(_0x1637dc,_0x2ed1a7,_0x270288,_0x2bab13,_0x361776);})[_0xf326('0xe')](function(_0x27ced1){if(_0x27ced1){logger[_0xf326('0xb')](_0xf326('0x4f'));logger[_0xf326('0xb')](_0xf326('0x50'),_0x27ced1['id']);switch(_0x1637dc[_0xf326('0x2a')]){case'integrationTab':logger[_0xf326('0xb')](_0xf326('0x45'),_0xf326('0x51'));emit(util[_0xf326('0x13')]('user:%s',_0x50d63f[_0xf326('0x36')]),_0xf326('0x52'),{'recordId':_0x27ced1['id']});break;case _0xf326('0x53'):logger[_0xf326('0xb')]('[QUEUE]',_0xf326('0x54'));emit(util[_0xf326('0x13')](_0xf326('0x55'),_0x50d63f[_0xf326('0x36')]),_0xf326('0x56'),{'uri':util['format']('https://xcally.desk.com/web/agent/case/%d',_0x27ced1['id'])});break;default:logger[_0xf326('0x57')](_0xf326('0x45'),_0xf326('0x58'));}}})['catch'](function(_0x102fba){console[_0xf326('0x57')](_0x102fba);logger[_0xf326('0x57')]('[QUEUE]',JSON['stringify'](_0x102fba));});};exports[_0xf326('0x59')]=function(_0x5b4832,_0x1cf58f,_0x554277,_0x458e5f,_0x7ee57,_0x28c959,_0x25e091){var _0x212594,_0x35d3c8;_0x28c959[_0xf326('0x16')]=intUtil['stripTrailingSlash'](_0x28c959[_0xf326('0x16')]);_0x28c959[_0xf326('0x43')]=intUtil[_0xf326('0x42')](_0x28c959['serverUrl']);if(_0x25e091&&_0x25e091[_0xf326('0x5a')]&&_0x25e091[_0xf326('0x5a')]!==_0xf326('0x5b')){logger[_0xf326('0xb')](_0xf326('0x5c'),'Recording\x20is\x20enabled!');_0x1cf58f[_0xf326('0x47')]=util[_0xf326('0x13')](_0xf326('0x5d'),_0x28c959[_0xf326('0x43')],_0x1cf58f['uniqueid'],md5(_0x1cf58f[_0xf326('0x48')]));}headers[_0xf326('0x49')]=getAuth(_0x28c959);return getUser(_0x28c959,_0x458e5f[_0xf326('0x4a')])[_0xf326('0xe')](function(_0x4d3b9e){_0x212594=_0x4d3b9e;logger['info'](_0xf326('0x4b'),_0x212594['id']);return getEndUser(_0x28c959,_0x1cf58f[_0xf326('0x5e')],_0x1cf58f['destcalleridnum']);})[_0xf326('0xe')](function(_0x29de71){_0x35d3c8=_0x29de71;logger[_0xf326('0xb')](_0xf326('0x4e'),_0x35d3c8['id']);return getTicket(_0x28c959,_0x212594,_0x35d3c8,_0x554277,_0x1cf58f);})['then'](function(_0xb1c18c){if(_0xb1c18c){logger['info']('Ticket\x20created!');logger[_0xf326('0xb')]('The\x20Ticket\x20ID\x20is:',_0xb1c18c['id']);switch(_0x28c959[_0xf326('0x2a')]){case _0xf326('0x5f'):logger[_0xf326('0xb')]('[QUEUE]','Displaying\x20ticket\x20to\x20agent...');emit(util[_0xf326('0x13')](_0xf326('0x55'),_0x458e5f[_0xf326('0x36')]),'trigger:desk:display',{'recordId':_0xb1c18c['id']});break;case _0xf326('0x53'):logger['info'](_0xf326('0x45'),_0xf326('0x54'));emit(util[_0xf326('0x13')](_0xf326('0x55'),_0x458e5f[_0xf326('0x36')]),_0xf326('0x56'),{'uri':util[_0xf326('0x13')](_0xf326('0x60'),_0x28c959[_0xf326('0x16')],_0xb1c18c['id'])});break;default:logger[_0xf326('0x57')](_0xf326('0x5c'),_0xf326('0x58'));}}})[_0xf326('0x61')](function(_0x4ca1b8){logger[_0xf326('0x57')]('[OUTBOUND]',JSON[_0xf326('0x62')](_0x4ca1b8));});};exports[_0xf326('0x63')]=function(_0x5e858d,_0x2b770c,_0x5283da,_0x3255b2,_0xd55246,_0x28f3cb){var _0x2d45c9,_0x31b6dd;_0x28f3cb['remoteUri']=intUtil['stripTrailingSlash'](_0x28f3cb[_0xf326('0x16')]);_0x28f3cb[_0xf326('0x43')]=intUtil[_0xf326('0x42')](_0x28f3cb[_0xf326('0x43')]);if(_0xd55246&&_0xd55246[_0xf326('0x44')]){logger['info']('['+_0x2b770c[_0xf326('0x64')][_0xf326('0x65')]()+']','Recording\x20is\x20enabled!');_0x2b770c['recordingURL']=util['format'](_0xf326('0x5d'),_0x28f3cb[_0xf326('0x43')],_0x2b770c[_0xf326('0x48')],md5(_0x2b770c[_0xf326('0x48')]));}else{_0x2b770c[_0xf326('0x47')]='';}headers[_0xf326('0x49')]=getAuth(_0x28f3cb);return getUser(_0x28f3cb)[_0xf326('0xe')](function(_0x4b9013){_0x2d45c9=_0x4b9013;logger[_0xf326('0xb')](_0xf326('0x4b'),_0x2d45c9['id']);return getEndUser(_0x28f3cb,_0x2b770c[_0xf326('0x4c')],_0x2b770c[_0xf326('0x4d')]);})['then'](function(_0x3717fe){_0x31b6dd=_0x3717fe;logger['info']('The\x20Enduser\x20ID\x20is:',_0x31b6dd['id']);return getTicket(_0x28f3cb,_0x2d45c9,_0x31b6dd,_0x5283da,_0x2b770c);})[_0xf326('0xe')](function(_0x540fa0){if(_0x540fa0){logger[_0xf326('0xb')](_0xf326('0x4f'));logger[_0xf326('0xb')](_0xf326('0x50'),_0x540fa0['id']);}})[_0xf326('0x61')](function(_0x541491){logger['error']('['+_0x2b770c['lastevent'][_0xf326('0x65')]()+']',JSON[_0xf326('0x62')](_0x541491));});}; \ No newline at end of file +var _0xe14b=['CTI','concat','Tags','Descriptions','/api/v2/users/%d','user','%s/customers/%d/cases','serverUrl','stripTrailingSlash','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','recordingURL','The\x20User\x20ID\x20is:','calleridnum','The\x20Enduser\x20ID\x20is:','The\x20Ticket\x20ID\x20is:','Displaying\x20ticket\x20to\x20agent...','user:%s','trigger:desk:display','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','trigger:browser:url','https://xcally.desk.com/web/agent/case/%d','error','Desk\x20account\x20type\x20not\x20recognized','recordingFormat','none','[OUTBOUND]','Authorization','destcalleridname','destcalleridnum','integrationTab','newTab','catch','unmanaged','lastevent','toUpperCase','calleridname','lodash','request-promise','ioredis','./util','../../../../config/logger','defaults','redis','localhost','socket.io-emitter','application/json','validateEmail','format','%s/users','then','total_entries','find','_embedded','entries','info','Agent\x20found!','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','Invalid\x20email\x20format,\x20using\x20the\x20admin\x20account!','%s/users/me','debug','[HTTP]','stringify','GET','authType','basic','%s:%s','username','password','token','%s/token:%s','Basic\x20%s','base64','Searching\x20enduser\x20with\x20phone','%s/customers/search','Enduser\x20found!','%s/customers','remoteUri','POST','length','map','forEach','includes','string','picklist','type','nameField','customField','toLowerCase','content','toString','idField','variableName','custom_fields','Variable','name','priority','Creating\x20new\x20ticket...','merge','getString','Subjects','phone','new','xCALLY'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0xe14b,0x93));var _0xbe14=function(_0x2dd761,_0x592855){_0x2dd761=_0x2dd761-0x0;var _0x35beea=_0xe14b[_0x2dd761];return _0x35beea;};'use strict';var _=require(_0xbe14('0x0'));var rp=require(_0xbe14('0x1'));var md5=require('md5');var util=require('util');var Redis=require(_0xbe14('0x2'));var intUtil=require(_0xbe14('0x3'));var config=require('../../../../config/environment');var logger=require(_0xbe14('0x4'))('desk');config['redis']=_[_0xbe14('0x5')](config[_0xbe14('0x6')],{'host':_0xbe14('0x7'),'port':0x18eb});var io=require(_0xbe14('0x8'))(new Redis(config[_0xbe14('0x6')]));function emit(_0x39387e,_0x196fca,_0x566ae7){io['to'](_0x39387e)['emit'](_0x196fca,_0x566ae7);}var headers={'Content-Type':'application/json','Accept':_0xbe14('0x9')};function getUser(_0x6fceff,_0xd68cd7){if(intUtil[_0xbe14('0xa')](_0xd68cd7)===!![]){logger['info']('Getting\x20agent\x20with\x20email',_0xd68cd7);return request({'uri':util[_0xbe14('0xb')](_0xbe14('0xc'),_0x6fceff['remoteUri'])})[_0xbe14('0xd')](function(_0x35aa19){if(_0x35aa19[_0xbe14('0xe')]){return _[_0xbe14('0xf')](_0x35aa19[_0xbe14('0x10')][_0xbe14('0x11')],{'email':_0xd68cd7});}})[_0xbe14('0xd')](function(_0x2850cb){if(_0x2850cb){logger[_0xbe14('0x12')](_0xbe14('0x13'));return _0x2850cb;}else{logger[_0xbe14('0x12')](_0xbe14('0x14'));return request({'uri':util[_0xbe14('0xb')]('%s/users/me',_0x6fceff['remoteUri'])});}});}else{logger[_0xbe14('0x12')](_0xbe14('0x15'));return request({'uri':util[_0xbe14('0xb')](_0xbe14('0x16'),_0x6fceff['remoteUri'])});}}function request(_0x21c789){logger[_0xbe14('0x17')](_0xbe14('0x18'),JSON[_0xbe14('0x19')](_0x21c789));return rp(_[_0xbe14('0x5')](_0x21c789,{'method':_0xbe14('0x1a'),'headers':headers,'json':!![]}));}function getAuth(_0x17ae86){var _0x5ea1f8;if(_0x17ae86[_0xbe14('0x1b')]===_0xbe14('0x1c')){_0x5ea1f8=util[_0xbe14('0xb')](_0xbe14('0x1d'),_0x17ae86[_0xbe14('0x1e')],_0x17ae86[_0xbe14('0x1f')]);}else if(_0x17ae86['authType']===_0xbe14('0x20')){_0x5ea1f8=util[_0xbe14('0xb')](_0xbe14('0x21'),_0x17ae86[_0xbe14('0x1e')],_0x17ae86[_0xbe14('0x20')]);}return util['format'](_0xbe14('0x22'),new Buffer(_0x5ea1f8)['toString'](_0xbe14('0x23')));}function getEndUser(_0x56e80c,_0x32e8eb,_0x4a25fa){logger[_0xbe14('0x12')](_0xbe14('0x24'),_0x4a25fa);return request({'uri':util['format'](_0xbe14('0x25'),_0x56e80c['remoteUri']),'qs':{'phone':_0x4a25fa}})[_0xbe14('0xd')](function(_0x4851f8){if(_0x4851f8[_0xbe14('0xe')]){logger[_0xbe14('0x12')](_0xbe14('0x26'));return _0x4851f8[_0xbe14('0x10')][_0xbe14('0x11')][0x0];}else{logger[_0xbe14('0x12')]('Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!');return request({'uri':util[_0xbe14('0xb')](_0xbe14('0x27'),_0x56e80c[_0xbe14('0x28')]),'method':_0xbe14('0x29'),'body':{'first_name':_0x32e8eb,'title':_0x32e8eb,'phone_numbers':[{'type':'work','value':_0x4a25fa}]}});}});}function getTags(_0x16f884,_0x29fc64){var _0x59bf34=[];if(_0x16f884&&_0x16f884[_0xbe14('0x2a')]>0x0){_0x59bf34=_[_0xbe14('0x2b')](_0x16f884,_0x29fc64);}return _0x59bf34;}function getCustomFields(_0x1c7cc7,_0x19252f){var _0x34d648=[];var _0x36d4b2={'custom_fields':{}};if(_0x1c7cc7[_0xbe14('0x2a')]>0x0){_[_0xbe14('0x2c')](_0x1c7cc7,function(_0x4168c8){if(_[_0xbe14('0x2d')]([_0xbe14('0x2e'),_0xbe14('0x2f')],_0x4168c8[_0xbe14('0x30')])&&_0x4168c8[_0xbe14('0x31')]&&!_0x4168c8[_0xbe14('0x32')]){_0x36d4b2[_0x4168c8[_0xbe14('0x31')][_0xbe14('0x33')]()]=_0x4168c8[_0xbe14('0x34')][_0xbe14('0x35')]();}else if(_[_0xbe14('0x2d')](['string',_0xbe14('0x2f')],_0x4168c8['type'])&&_0x4168c8['idField']&&_0x4168c8[_0xbe14('0x32')]){_0x36d4b2['custom_fields'][_0x4168c8[_0xbe14('0x36')]]=_0x4168c8[_0xbe14('0x34')]['toString']();}else if(_0x4168c8['type']==='variable'&&_0x4168c8[_0xbe14('0x37')]&&_0x4168c8[_0xbe14('0x36')]&&_0x4168c8['customField']){_0x19252f[_0x4168c8[_0xbe14('0x37')]]&&(_0x36d4b2[_0xbe14('0x38')][_0x4168c8[_0xbe14('0x36')]]=_0x19252f[_0x4168c8[_0xbe14('0x37')]][_0xbe14('0x35')]());}else if(_0x4168c8['type']==='customVariable'&&_0x4168c8[_0xbe14('0x39')]&&_0x4168c8['Variable']['name']&&_0x4168c8['idField']&&_0x4168c8[_0xbe14('0x32')]){_0x19252f[_0x4168c8[_0xbe14('0x39')][_0xbe14('0x3a')][_0xbe14('0x33')]()]&&(_0x36d4b2[_0xbe14('0x38')][_0x4168c8[_0xbe14('0x36')]]=_0x19252f[_0x4168c8[_0xbe14('0x39')][_0xbe14('0x3a')][_0xbe14('0x33')]()][_0xbe14('0x35')]());}});}if(_0x36d4b2[_0xbe14('0x3b')]){_0x36d4b2[_0xbe14('0x3b')]=Number(_0x36d4b2['priority']);}return _0x36d4b2;}function getTicket(_0x4f51f8,_0x43cdaa,_0x2951e1,_0x13bfcf,_0x520e09){logger[_0xbe14('0x12')](_0xbe14('0x3c'));var _0xeda70e=_[_0xbe14('0x3d')]({'subject':intUtil[_0xbe14('0x3e')](_0x13bfcf[_0xbe14('0x3f')],_0x520e09,'\x20'),'type':_0xbe14('0x40'),'status':_0xbe14('0x41'),'labels':[_0xbe14('0x42'),'Motion',_0xbe14('0x43')][_0xbe14('0x44')](getTags(_0x13bfcf[_0xbe14('0x45')],_0xbe14('0x3a'))),'description':intUtil[_0xbe14('0x3e')](_0x13bfcf[_0xbe14('0x46')],_0x520e09,'\x0a'),'_links':{'assigned_user':{'href':util['format'](_0xbe14('0x47'),_0x43cdaa['id']),'class':_0xbe14('0x48')}},'message':{'direction':'in','body':intUtil[_0xbe14('0x3e')](_0x13bfcf[_0xbe14('0x46')],_0x520e09,'\x0a')}},getCustomFields(_0x13bfcf['Fields'],_0x520e09));return request({'uri':util['format'](_0xbe14('0x49'),_0x4f51f8[_0xbe14('0x28')],_0x2951e1['id']),'method':_0xbe14('0x29'),'body':_0xeda70e});}exports['queue']=function(_0x5d5318,_0x6b6aa8,_0x59ae4d,_0x5657fe,_0x3593f8,_0x1f0355){var _0x8216c3,_0x5051e4;_0x1f0355['remoteUri']=intUtil['stripTrailingSlash'](_0x1f0355[_0xbe14('0x28')]);_0x1f0355[_0xbe14('0x4a')]=intUtil[_0xbe14('0x4b')](_0x1f0355['serverUrl']);if(_0x3593f8&&_0x3593f8[_0xbe14('0x4c')]){logger[_0xbe14('0x12')](_0xbe14('0x4d'),_0xbe14('0x4e'));_0x6b6aa8['recordingURL']=util['format'](_0xbe14('0x4f'),_0x1f0355[_0xbe14('0x4a')],_0x6b6aa8[_0xbe14('0x50')],md5(_0x6b6aa8[_0xbe14('0x50')]));}else{_0x6b6aa8[_0xbe14('0x51')]='';}headers['Authorization']=getAuth(_0x1f0355);return getUser(_0x1f0355,_0x5657fe['email'])[_0xbe14('0xd')](function(_0x2a3623){_0x8216c3=_0x2a3623;logger[_0xbe14('0x12')](_0xbe14('0x52'),_0x8216c3['id']);return getEndUser(_0x1f0355,_0x6b6aa8['calleridname'],_0x6b6aa8[_0xbe14('0x53')]);})[_0xbe14('0xd')](function(_0x53e8ab){_0x5051e4=_0x53e8ab;logger[_0xbe14('0x12')](_0xbe14('0x54'),_0x5051e4['id']);return getTicket(_0x1f0355,_0x8216c3,_0x5051e4,_0x59ae4d,_0x6b6aa8);})[_0xbe14('0xd')](function(_0x36c20c){if(_0x36c20c){logger['info']('Ticket\x20created!');logger[_0xbe14('0x12')](_0xbe14('0x55'),_0x36c20c['id']);switch(_0x1f0355['type']){case'integrationTab':logger[_0xbe14('0x12')](_0xbe14('0x4d'),_0xbe14('0x56'));emit(util[_0xbe14('0xb')](_0xbe14('0x57'),_0x5657fe[_0xbe14('0x3a')]),_0xbe14('0x58'),{'recordId':_0x36c20c['id']});break;case'newTab':logger[_0xbe14('0x12')](_0xbe14('0x4d'),_0xbe14('0x59'));emit(util[_0xbe14('0xb')](_0xbe14('0x57'),_0x5657fe['name']),_0xbe14('0x5a'),{'uri':util[_0xbe14('0xb')](_0xbe14('0x5b'),_0x36c20c['id'])});break;default:logger[_0xbe14('0x5c')](_0xbe14('0x4d'),_0xbe14('0x5d'));}}})['catch'](function(_0x5aeea9){console[_0xbe14('0x5c')](_0x5aeea9);logger[_0xbe14('0x5c')](_0xbe14('0x4d'),JSON['stringify'](_0x5aeea9));});};exports['outbound']=function(_0x44fe0d,_0x134878,_0x50d78f,_0x339a86,_0x32496a,_0x50c2a0,_0x28f995){var _0x4a40d2,_0x41ba58;_0x50c2a0[_0xbe14('0x28')]=intUtil[_0xbe14('0x4b')](_0x50c2a0['remoteUri']);_0x50c2a0[_0xbe14('0x4a')]=intUtil[_0xbe14('0x4b')](_0x50c2a0['serverUrl']);if(_0x28f995&&_0x28f995[_0xbe14('0x5e')]&&_0x28f995[_0xbe14('0x5e')]!==_0xbe14('0x5f')){logger[_0xbe14('0x12')](_0xbe14('0x60'),'Recording\x20is\x20enabled!');_0x134878[_0xbe14('0x51')]=util[_0xbe14('0xb')](_0xbe14('0x4f'),_0x50c2a0[_0xbe14('0x4a')],_0x134878[_0xbe14('0x50')],md5(_0x134878[_0xbe14('0x50')]));}headers[_0xbe14('0x61')]=getAuth(_0x50c2a0);return getUser(_0x50c2a0,_0x339a86['email'])[_0xbe14('0xd')](function(_0x1b47a4){_0x4a40d2=_0x1b47a4;logger[_0xbe14('0x12')](_0xbe14('0x52'),_0x4a40d2['id']);return getEndUser(_0x50c2a0,_0x134878[_0xbe14('0x62')],_0x134878[_0xbe14('0x63')]);})[_0xbe14('0xd')](function(_0x32df3c){_0x41ba58=_0x32df3c;logger[_0xbe14('0x12')](_0xbe14('0x54'),_0x41ba58['id']);return getTicket(_0x50c2a0,_0x4a40d2,_0x41ba58,_0x50d78f,_0x134878);})[_0xbe14('0xd')](function(_0x4bccfc){if(_0x4bccfc){logger['info']('Ticket\x20created!');logger[_0xbe14('0x12')](_0xbe14('0x55'),_0x4bccfc['id']);switch(_0x50c2a0[_0xbe14('0x30')]){case _0xbe14('0x64'):logger[_0xbe14('0x12')](_0xbe14('0x4d'),_0xbe14('0x56'));emit(util[_0xbe14('0xb')](_0xbe14('0x57'),_0x339a86[_0xbe14('0x3a')]),_0xbe14('0x58'),{'recordId':_0x4bccfc['id']});break;case _0xbe14('0x65'):logger[_0xbe14('0x12')](_0xbe14('0x4d'),_0xbe14('0x59'));emit(util[_0xbe14('0xb')](_0xbe14('0x57'),_0x339a86[_0xbe14('0x3a')]),_0xbe14('0x5a'),{'uri':util[_0xbe14('0xb')]('%s/agent/tickets/%s',_0x50c2a0[_0xbe14('0x28')],_0x4bccfc['id'])});break;default:logger[_0xbe14('0x5c')](_0xbe14('0x60'),_0xbe14('0x5d'));}}})[_0xbe14('0x66')](function(_0x222944){logger[_0xbe14('0x5c')](_0xbe14('0x60'),JSON[_0xbe14('0x19')](_0x222944));});};exports[_0xbe14('0x67')]=function(_0x5917d5,_0x18be56,_0x442ec4,_0x2d4dd4,_0xfd32a3,_0x3ac6d8){var _0x5a1ea6,_0x42b341;_0x3ac6d8[_0xbe14('0x28')]=intUtil[_0xbe14('0x4b')](_0x3ac6d8[_0xbe14('0x28')]);_0x3ac6d8[_0xbe14('0x4a')]=intUtil['stripTrailingSlash'](_0x3ac6d8[_0xbe14('0x4a')]);if(_0xfd32a3&&_0xfd32a3[_0xbe14('0x4c')]){logger[_0xbe14('0x12')]('['+_0x18be56[_0xbe14('0x68')][_0xbe14('0x69')]()+']',_0xbe14('0x4e'));_0x18be56[_0xbe14('0x51')]=util[_0xbe14('0xb')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x3ac6d8[_0xbe14('0x4a')],_0x18be56[_0xbe14('0x50')],md5(_0x18be56[_0xbe14('0x50')]));}else{_0x18be56[_0xbe14('0x51')]='';}headers[_0xbe14('0x61')]=getAuth(_0x3ac6d8);return getUser(_0x3ac6d8)[_0xbe14('0xd')](function(_0x445302){_0x5a1ea6=_0x445302;logger['info']('The\x20User\x20ID\x20is:',_0x5a1ea6['id']);return getEndUser(_0x3ac6d8,_0x18be56[_0xbe14('0x6a')],_0x18be56[_0xbe14('0x53')]);})[_0xbe14('0xd')](function(_0x2510a0){_0x42b341=_0x2510a0;logger[_0xbe14('0x12')](_0xbe14('0x54'),_0x42b341['id']);return getTicket(_0x3ac6d8,_0x5a1ea6,_0x42b341,_0x442ec4,_0x18be56);})[_0xbe14('0xd')](function(_0x43511e){if(_0x43511e){logger['info']('Ticket\x20created!');logger[_0xbe14('0x12')](_0xbe14('0x55'),_0x43511e['id']);}})[_0xbe14('0x66')](function(_0x57729f){logger[_0xbe14('0x5c')]('['+_0x18be56[_0xbe14('0x68')][_0xbe14('0x69')]()+']',JSON[_0xbe14('0x19')](_0x57729f));});}; \ No newline at end of file diff --git a/server/services/ami/trigger/integration/dynamics365.js b/server/services/ami/trigger/integration/dynamics365.js index 9b4d6f9..1b35ea3 100644 --- a/server/services/ami/trigger/integration/dynamics365.js +++ b/server/services/ami/trigger/integration/dynamics365.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa282=['emit','trigger:browser:url','stripTrailingSlash','serverUrl','tenantId','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','monitor_format','[QUEUE]','recordingURL','recordingFormat','none','[OUTBOUND]','Recording\x20is\x20enabled!',']\x20The\x20User\x20email\x20is:',']\x20The\x20Enduser\x20ID\x20is:',']\x20The\x20Enduser\x20phone\x20is:',']\x20The\x20%s\x20ID\x20is:\x20%s',']\x20Call\x20direction:\x20%s','unmanaged','name','ticketId','inspect','lodash','request-promise','util','md5','ioredis','../../../../config/logger','dynamics365','../../../../config/environment','defaults','localhost','socket.io-emitter','redis','POST','clientId','remoteUri','username','clientSecret','then','catch','error','GET','systemusers?$select=internalemailaddress,isdisabled,systemuserid','4.0','value','isNil','email','userEmail','length','internalemailaddress','isdisabled','info','toUpperCase',']\x20Agent\x20found\x20','systemuserid','userId',']\x20Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','message','toLowerCase','outbound','calleridnum','contacts','/systemusers(','headers','odata-entityid','lastIndexOf','contacts?$select=telephone1','destcalleridnum','telephone1','contactid',']\x20Enduser\x20created!','enduserId','forEach','includes','string','type','idField','substring','indexOf','content','ticketType','incident','incidents','getString','Descriptions','/contacts(','Bearer\x20','phonecall','phonecalls','callDirection','queue','Fields','format','%s/main.aspx?pagetype=entityrecord&etn=%s&id=%s'];(function(_0x3518a0,_0x79011e){var _0x59ecad=function(_0x2471fd){while(--_0x2471fd){_0x3518a0['push'](_0x3518a0['shift']());}};_0x59ecad(++_0x79011e);}(_0xa282,0x77));var _0x2a28=function(_0x68c979,_0x431cff){_0x68c979=_0x68c979-0x0;var _0x4f0001=_0xa282[_0x68c979];return _0x4f0001;};'use strict';var _=require(_0x2a28('0x0'));var BPromise=require('bluebird');var rp=require(_0x2a28('0x1'));var util=require(_0x2a28('0x2'));var intUtil=require('./util');var md5=require(_0x2a28('0x3'));var Redis=require(_0x2a28('0x4'));var logger=require(_0x2a28('0x5'))(_0x2a28('0x6'));var config=require(_0x2a28('0x7'));config['redis']=_[_0x2a28('0x8')](config['redis'],{'host':_0x2a28('0x9'),'port':0x18eb});var io=require(_0x2a28('0xa'))(new Redis(config[_0x2a28('0xb')]));function getAuthToken(_0x45c33c,_0x400dc6,_0x499e48){var _0x21b1a2={'method':_0x2a28('0xc'),'uri':_0x400dc6,'form':{'client_id':_0x45c33c[_0x2a28('0xd')],'resource':_0x45c33c[_0x2a28('0xe')],'username':_0x45c33c[_0x2a28('0xf')],'password':_0x45c33c['password'],'grant_type':'password','client_secret':_0x45c33c[_0x2a28('0x10')]},'json':!![]};return rp(_0x21b1a2)[_0x2a28('0x11')](function(_0xfd79c9){return _0xfd79c9['access_token'];})[_0x2a28('0x12')](function(_0x4e6c7f){logger[_0x2a28('0x13')]('['+[_0x499e48['toUpperCase']()]+']\x20Wrong\x20credentials!');return _0x4e6c7f['message'];});}function getUser(_0x42c3a3,_0x57c0b7,_0x11222c,_0x5ce628,_0x384436,_0x16991c){return new BPromise(function(_0x1f7152,_0x455b39){return getAuthToken(_0x57c0b7,_0x5ce628,_0x16991c)['then'](function(_0x1259eb){var _0x13d751={'method':_0x2a28('0x14'),'uri':_0x384436+_0x2a28('0x15'),'headers':{'Authorization':'Bearer\x20'+_0x1259eb,'OData-Version':_0x2a28('0x16')},'json':!![]};return rp(_0x13d751);})[_0x2a28('0x11')](function(_0x177dbc){var _0x2eb368=_0x177dbc[_0x2a28('0x17')];var _0x325a94=![];var _0x11a879=null;if(!_[_0x2a28('0x18')](_0x11222c)){if(intUtil['validateEmail'](_0x11222c[_0x2a28('0x19')])){_0x42c3a3[_0x2a28('0x1a')]=_0x11222c['email'];for(_0x11a879=0x0;_0x11a879<_0x2eb368[_0x2a28('0x1b')];_0x11a879++){if(_0x2eb368[_0x11a879][_0x2a28('0x1c')]===_0x11222c[_0x2a28('0x19')]&&!_0x2eb368[_0x11a879][_0x2a28('0x1d')]){_0x325a94=!![];logger[_0x2a28('0x1e')]('['+[_0x16991c[_0x2a28('0x1f')]()]+_0x2a28('0x20')+_0x2eb368[_0x11a879][_0x2a28('0x21')]+'!');_0x42c3a3[_0x2a28('0x22')]=_0x2eb368[_0x11a879]['systemuserid'];}}}}if(!_0x325a94){logger['info']('['+[_0x16991c[_0x2a28('0x1f')]()]+_0x2a28('0x23'));_0x42c3a3[_0x2a28('0x1a')]=_0x57c0b7['username'];for(_0x11a879=0x0;_0x11a879<_0x2eb368[_0x2a28('0x1b')];_0x11a879++){if(_0x2eb368[_0x11a879][_0x2a28('0x1c')]===_0x57c0b7['username']){_0x42c3a3[_0x2a28('0x22')]=_0x2eb368[_0x11a879][_0x2a28('0x21')];}}}_0x1f7152(_0x42c3a3);})['catch'](function(_0x1aa7f0){_0x455b39(_0x1aa7f0[_0x2a28('0x24')]);});});}function createEndUser(_0x388e7b,_0x52c4df,_0x53934f,_0x282c33,_0x2801cd,_0x3dfd44){return new BPromise(function(_0x53d879,_0x39b6ea){return getAuthToken(_0x52c4df,_0x53934f,_0x3dfd44)[_0x2a28('0x11')](function(_0x24d628){var _0x206900=_0x3dfd44[_0x2a28('0x25')]()===_0x2a28('0x26')?_0x2801cd['destcalleridnum']:_0x2801cd[_0x2a28('0x27')];var _0x323809={'method':'POST','uri':_0x282c33+_0x2a28('0x28'),'body':{'telephone1':_0x206900,'fullname':_0x206900,'firstname':_0x206900,'lastname':'_','mobilephone':null,'address1_telephone1':null,'ownerid@odata.bind':_0x2a28('0x29')+_0x388e7b[_0x2a28('0x22')]+')'},'headers':{'Authorization':'Bearer\x20'+_0x24d628,'OData-Version':_0x2a28('0x16')},'json':!![],'resolveWithFullResponse':!![]};return rp(_0x323809);})[_0x2a28('0x11')](function(_0x3e394c){var _0x225052=_0x3e394c[_0x2a28('0x2a')][_0x2a28('0x2b')];var _0x538c50=_0x225052['substring'](_0x225052['lastIndexOf']('(')+0x1,_0x225052[_0x2a28('0x2c')](')'));_0x388e7b['enduserId']=_0x538c50;_0x53d879(_0x388e7b);})[_0x2a28('0x12')](function(_0x1031dd){_0x39b6ea(_0x1031dd[_0x2a28('0x24')]);});});}function getEndUser(_0x14c0b0,_0x48c972,_0x21c062,_0x5afc53,_0x5cf966,_0x254670){return new BPromise(function(_0x5052d9,_0x1893a5){return getAuthToken(_0x48c972,_0x21c062,_0x254670)[_0x2a28('0x11')](function(_0xc9c62d){var _0x5f1e48={'method':_0x2a28('0x14'),'uri':_0x5afc53+_0x2a28('0x2d'),'headers':{'Authorization':'Bearer\x20'+_0xc9c62d,'If-None-Match':null,'OData-Version':_0x2a28('0x16')},'json':!![]};return rp(_0x5f1e48);})[_0x2a28('0x11')](function(_0x2a2d62){var _0x237990=null;if(_0x2a2d62){var _0x5c0f88=_0x2a2d62[_0x2a28('0x17')];var _0x1c54de=![];for(_0x237990=0x0;_0x237990<_0x5c0f88[_0x2a28('0x1b')];_0x237990++){var _0x2c8c5d=_0x254670[_0x2a28('0x25')]()==='outbound'?_0x5cf966[_0x2a28('0x2e')]:_0x5cf966[_0x2a28('0x27')];if(_0x5c0f88[_0x237990][_0x2a28('0x2f')]===_0x2c8c5d){_0x1c54de=!![];_0x14c0b0['enduserId']=_0x5c0f88[_0x237990][_0x2a28('0x30')];}}if(_0x1c54de){_0x5052d9(_0x14c0b0);}else{return createEndUser(_0x14c0b0,_0x48c972,_0x21c062,_0x5afc53,_0x5cf966,_0x254670)[_0x2a28('0x11')](function(_0x3ea1f9){logger[_0x2a28('0x1e')]('['+[_0x254670[_0x2a28('0x1f')]()]+_0x2a28('0x31'),_0x3ea1f9[_0x2a28('0x32')]);_0x5052d9(_0x3ea1f9);});}}else{return createEndUser(_0x14c0b0,_0x48c972,_0x21c062,_0x5afc53,_0x5cf966,_0x254670)['then'](function(_0x39b8c6){logger[_0x2a28('0x1e')]('['+[_0x254670[_0x2a28('0x1f')]()]+']\x20Enduser\x20Created!',_0x39b8c6[_0x2a28('0x32')]);_0x5052d9(_0x39b8c6);});}});});}function getCustomFields(_0x26785a,_0x23cc05,_0x279204){var _0x5dfcd1={};if(_0x26785a[_0x2a28('0x1b')]>0x0){_[_0x2a28('0x33')](_0x26785a,function(_0x2f951f){if(_[_0x2a28('0x34')]([_0x2a28('0x35'),'picklist'],_0x2f951f[_0x2a28('0x36')])&&_0x2f951f['nameField']&&!_0x2f951f['customField']){var _0x3cd1da=_0x2f951f[_0x2a28('0x37')][_0x2a28('0x25')]();var _0x5c1f37=_0x3cd1da[_0x2a28('0x38')](0x0,_0x3cd1da[_0x2a28('0x39')]('_'));var _0x2de180=_0x3cd1da[_0x2a28('0x38')](_0x3cd1da['indexOf']('_')+0x1);if(_0x5c1f37===_0x279204){_0x5dfcd1[_0x2de180]=_0x2f951f[_0x2a28('0x3a')];}}});}return _0x5dfcd1;}function getTicket(_0x2b4f99,_0x11a4ff,_0x1b22f4,_0x50845e,_0x158900,_0x32c86b,_0x274c2d){return new BPromise(function(_0x4f9096,_0x577f04){var _0x405b8b;return getAuthToken(_0x11a4ff,_0x1b22f4,_0x274c2d)[_0x2a28('0x11')](function(_0x15027c){if(_0x32c86b[_0x2a28('0x3b')]===_0x2a28('0x3c')){_0x405b8b={'method':_0x2a28('0xc'),'uri':_0x50845e+_0x2a28('0x3d'),'body':Object['assign']({},{'title':intUtil[_0x2a28('0x3e')](_0x32c86b['Subjects'],_0x158900,'\x20'),'description':intUtil[_0x2a28('0x3e')](_0x32c86b[_0x2a28('0x3f')],_0x158900,'\x0a'),'customerid_contact@odata.bind':_0x2a28('0x40')+_0x2b4f99[_0x2a28('0x32')]+')','ownerid@odata.bind':_0x2a28('0x29')+_0x2b4f99['userId']+')','caseorigincode':'1'},getCustomFields(_0x32c86b['Fields'],_0x158900,_0x32c86b[_0x2a28('0x3b')])),'headers':{'Authorization':_0x2a28('0x41')+_0x15027c,'OData-Version':_0x2a28('0x16')},'json':!![],'resolveWithFullResponse':!![]};}if(_0x32c86b[_0x2a28('0x3b')]===_0x2a28('0x42')){_0x405b8b={'method':_0x2a28('0xc'),'uri':_0x50845e+_0x2a28('0x43'),'body':Object['assign']({},{'subject':intUtil[_0x2a28('0x3e')](_0x32c86b['Subjects'],_0x158900,'\x20'),'phonenumber':String(_0x158900[_0x2a28('0x27')]),'description':intUtil[_0x2a28('0x3e')](_0x32c86b[_0x2a28('0x3f')],_0x158900,'\x0a'),'regardingobjectid_contact@odata.bind':_0x2a28('0x40')+_0x2b4f99['enduserId']+')','ownerid@odata.bind':_0x2a28('0x29')+_0x2b4f99[_0x2a28('0x22')]+')','directioncode':_0x2b4f99['callDirection']==='queue'?![]:!![],'phonecall_activity_parties':[{'partyid_systemuser@odata.bind':_0x2a28('0x29')+_0x2b4f99[_0x2a28('0x22')]+')','participationtypemask':_0x2b4f99[_0x2a28('0x44')]===_0x2a28('0x45')?0x2:0x1},{'partyid_contact@odata.bind':'/contacts('+_0x2b4f99[_0x2a28('0x32')]+')','participationtypemask':_0x2b4f99['callDirection']===_0x2a28('0x45')?0x1:0x2}]},getCustomFields(_0x32c86b[_0x2a28('0x46')],_0x158900,_0x32c86b['ticketType'])),'headers':{'Authorization':_0x2a28('0x41')+_0x15027c,'OData-Version':_0x2a28('0x16')},'json':!![],'resolveWithFullResponse':!![]};}return rp(_0x405b8b);})[_0x2a28('0x11')](function(_0x5a952d){var _0x5347ae=_0x5a952d[_0x2a28('0x2a')][_0x2a28('0x2b')];var _0x5ca36b=_0x5347ae[_0x2a28('0x38')](_0x5347ae[_0x2a28('0x2c')]('(')+0x1,_0x5347ae[_0x2a28('0x2c')](')'));_0x2b4f99['ticketId']=_0x5ca36b;_0x4f9096(_0x2b4f99);})['catch'](function(_0x379be4){_0x577f04(_0x379be4[_0x2a28('0x24')]);});});}function emit(_0x2c95f0,_0x41b3c7,_0x3baadc,_0x4f37e4){var _0x510a30={'uri':util[_0x2a28('0x47')](_0x2a28('0x48'),_0x2c95f0,_0x3baadc,_0x4f37e4)};io['to'](util[_0x2a28('0x47')]('user:%s',_0x41b3c7))[_0x2a28('0x49')](_0x2a28('0x4a'),_0x510a30);}exports['cs']=function(_0x4f4d40,_0x685a59,_0x400de4,_0x23df13,_0x4dc084,_0x2519ef,_0x565ec7,_0x195e55){var _0x47479a={};_0x2519ef[_0x2a28('0xe')]=intUtil[_0x2a28('0x4b')](_0x2519ef[_0x2a28('0xe')]);_0x2519ef['serverUrl']=intUtil[_0x2a28('0x4b')](_0x2519ef[_0x2a28('0x4c')]);_0x47479a['callDirection']=_0x195e55===_0x2a28('0x45')||_0x195e55==='unmanaged'?_0x2a28('0x45'):_0x2a28('0x26');var _0x30125b=util[_0x2a28('0x47')]('%s/api/data/v9.0/',_0x2519ef[_0x2a28('0xe')]);var _0x42ae60=util[_0x2a28('0x47')]('https://login.microsoftonline.com/%s/oauth2/token',_0x2519ef[_0x2a28('0x4d')]);var _0x593279=util[_0x2a28('0x47')](_0x2a28('0x4e'),_0x2519ef['serverUrl'],_0x685a59[_0x2a28('0x4f')],md5(_0x685a59[_0x2a28('0x4f')]));if(_0x4dc084&&_0x4dc084[_0x2a28('0x50')]){logger[_0x2a28('0x1e')](_0x2a28('0x51'),'Recording\x20is\x20enabled!');_0x685a59[_0x2a28('0x52')]=_0x593279;}else if(_0x565ec7&&_0x565ec7[_0x2a28('0x53')]&&_0x565ec7[_0x2a28('0x53')]!==_0x2a28('0x54')){logger[_0x2a28('0x1e')](_0x2a28('0x55'),_0x2a28('0x56'));_0x685a59[_0x2a28('0x52')]=_0x593279;}else{_0x685a59[_0x2a28('0x52')]='';}return getUser(_0x47479a,_0x2519ef,_0x23df13,_0x42ae60,_0x30125b,_0x195e55)[_0x2a28('0x11')](function(_0xa54986){logger[_0x2a28('0x1e')]('['+_0x195e55[_0x2a28('0x1f')]()+']\x20The\x20User\x20ID\x20is:',_0xa54986[_0x2a28('0x22')]);logger[_0x2a28('0x1e')]('['+_0x195e55['toUpperCase']()+_0x2a28('0x57'),_0xa54986[_0x2a28('0x1a')]);return getEndUser(_0xa54986,_0x2519ef,_0x42ae60,_0x30125b,_0x685a59,_0x195e55);})[_0x2a28('0x11')](function(_0x198404){logger[_0x2a28('0x1e')]('['+_0x195e55['toUpperCase']()+_0x2a28('0x58'),_0x198404[_0x2a28('0x32')]);logger[_0x2a28('0x1e')]('['+_0x195e55['toUpperCase']()+_0x2a28('0x59'),_0x685a59[_0x2a28('0x27')]);return getTicket(_0x198404,_0x2519ef,_0x42ae60,_0x30125b,_0x685a59,_0x400de4,_0x195e55);})[_0x2a28('0x11')](function(_0x58d8c3){logger[_0x2a28('0x1e')](util[_0x2a28('0x47')]('['+_0x195e55['toUpperCase']()+_0x2a28('0x5a'),_0x400de4[_0x2a28('0x3b')],_0x58d8c3['ticketId']));logger[_0x2a28('0x1e')](util[_0x2a28('0x47')]('['+_0x195e55[_0x2a28('0x1f')]()+_0x2a28('0x5b'),_0x195e55));if(_0x195e55!==_0x2a28('0x5c')){logger['info']('['+_0x195e55[_0x2a28('0x1f')]()+']','Displaying\x20call\x20in\x20a\x20new\x20tab...');emit(_0x2519ef[_0x2a28('0xe')],_0x23df13[_0x2a28('0x5d')],_0x400de4[_0x2a28('0x3b')],_0x58d8c3[_0x2a28('0x5e')]);}})[_0x2a28('0x12')](function(_0x201834){logger['error']('['+_0x195e55[_0x2a28('0x1f')]()+']\x20Error\x20running\x20Dynamics365\x20integration',util[_0x2a28('0x5f')](_0x201834,{'showHidden':!![],'depth':null}));});}; \ No newline at end of file +var _0x8093=['remoteUri','username','clientSecret','error','toUpperCase','message','GET','systemusers?$select=internalemailaddress,isdisabled,systemuserid','Bearer\x20','4.0','then','userEmail','length','email','isdisabled','info',']\x20Agent\x20found\x20','userId','systemuserid',']\x20Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','catch','toLowerCase','calleridnum','contacts','/systemusers(','headers','substring','lastIndexOf','enduserId','value','outbound','contactid',']\x20Enduser\x20created!',']\x20Enduser\x20Created!','forEach','includes','string','picklist','indexOf','content','ticketType','incident','incidents','assign','Subjects','getString','Descriptions','Fields','phonecalls','callDirection','queue','odata-entityid','ticketId','format','%s/main.aspx?pagetype=entityrecord&etn=%s&id=%s','user:%s','emit','stripTrailingSlash','serverUrl','unmanaged','%s/api/data/v9.0/','https://login.microsoftonline.com/%s/oauth2/token','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','[QUEUE]','Recording\x20is\x20enabled!','recordingURL','recordingFormat','none','[OUTBOUND]',']\x20The\x20User\x20ID\x20is:',']\x20The\x20User\x20email\x20is:',']\x20The\x20Enduser\x20ID\x20is:',']\x20The\x20Enduser\x20phone\x20is:',']\x20Call\x20direction:\x20%s','Displaying\x20call\x20in\x20a\x20new\x20tab...',']\x20Error\x20running\x20Dynamics365\x20integration','lodash','bluebird','request-promise','util','./util','md5','../../../../config/logger','dynamics365','../../../../config/environment','redis','defaults','localhost','socket.io-emitter','POST','clientId'];(function(_0x2b4411,_0x2625ed){var _0x8e41ef=function(_0x2aa8c1){while(--_0x2aa8c1){_0x2b4411['push'](_0x2b4411['shift']());}};_0x8e41ef(++_0x2625ed);}(_0x8093,0xa9));var _0x3809=function(_0x2bece8,_0x27c181){_0x2bece8=_0x2bece8-0x0;var _0xc01f33=_0x8093[_0x2bece8];return _0xc01f33;};'use strict';var _=require(_0x3809('0x0'));var BPromise=require(_0x3809('0x1'));var rp=require(_0x3809('0x2'));var util=require(_0x3809('0x3'));var intUtil=require(_0x3809('0x4'));var md5=require(_0x3809('0x5'));var Redis=require('ioredis');var logger=require(_0x3809('0x6'))(_0x3809('0x7'));var config=require(_0x3809('0x8'));config[_0x3809('0x9')]=_[_0x3809('0xa')](config[_0x3809('0x9')],{'host':_0x3809('0xb'),'port':0x18eb});var io=require(_0x3809('0xc'))(new Redis(config[_0x3809('0x9')]));function getAuthToken(_0x31db08,_0x38aa21,_0x156d98){var _0x55633e={'method':_0x3809('0xd'),'uri':_0x38aa21,'form':{'client_id':_0x31db08[_0x3809('0xe')],'resource':_0x31db08[_0x3809('0xf')],'username':_0x31db08[_0x3809('0x10')],'password':_0x31db08['password'],'grant_type':'password','client_secret':_0x31db08[_0x3809('0x11')]},'json':!![]};return rp(_0x55633e)['then'](function(_0x3221b7){return _0x3221b7['access_token'];})['catch'](function(_0x470dbb){logger[_0x3809('0x12')]('['+[_0x156d98[_0x3809('0x13')]()]+']\x20Wrong\x20credentials!');return _0x470dbb[_0x3809('0x14')];});}function getUser(_0x3e09c0,_0x2db602,_0x498dab,_0x5073ff,_0x4e5f3c,_0x2018ab){return new BPromise(function(_0x177240,_0x3cfbc5){return getAuthToken(_0x2db602,_0x5073ff,_0x2018ab)['then'](function(_0x442f01){var _0x545a71={'method':_0x3809('0x15'),'uri':_0x4e5f3c+_0x3809('0x16'),'headers':{'Authorization':_0x3809('0x17')+_0x442f01,'OData-Version':_0x3809('0x18')},'json':!![]};return rp(_0x545a71);})[_0x3809('0x19')](function(_0x15f1ce){var _0x550635=_0x15f1ce['value'];var _0x53b283=![];var _0x5e4c12=null;if(!_['isNil'](_0x498dab)){if(intUtil['validateEmail'](_0x498dab['email'])){_0x3e09c0[_0x3809('0x1a')]=_0x498dab['email'];for(_0x5e4c12=0x0;_0x5e4c12<_0x550635[_0x3809('0x1b')];_0x5e4c12++){if(_0x550635[_0x5e4c12]['internalemailaddress']===_0x498dab[_0x3809('0x1c')]&&!_0x550635[_0x5e4c12][_0x3809('0x1d')]){_0x53b283=!![];logger[_0x3809('0x1e')]('['+[_0x2018ab[_0x3809('0x13')]()]+_0x3809('0x1f')+_0x550635[_0x5e4c12]['systemuserid']+'!');_0x3e09c0[_0x3809('0x20')]=_0x550635[_0x5e4c12][_0x3809('0x21')];}}}}if(!_0x53b283){logger[_0x3809('0x1e')]('['+[_0x2018ab[_0x3809('0x13')]()]+_0x3809('0x22'));_0x3e09c0[_0x3809('0x1a')]=_0x2db602[_0x3809('0x10')];for(_0x5e4c12=0x0;_0x5e4c12<_0x550635[_0x3809('0x1b')];_0x5e4c12++){if(_0x550635[_0x5e4c12]['internalemailaddress']===_0x2db602['username']){_0x3e09c0['userId']=_0x550635[_0x5e4c12][_0x3809('0x21')];}}}_0x177240(_0x3e09c0);})[_0x3809('0x23')](function(_0x47754d){_0x3cfbc5(_0x47754d['message']);});});}function createEndUser(_0x149acd,_0x5d1739,_0x113160,_0x164377,_0x1f7754,_0x294d56){return new BPromise(function(_0x1b39dd,_0x5ac584){return getAuthToken(_0x5d1739,_0x113160,_0x294d56)['then'](function(_0x470c17){var _0x5a7697=_0x294d56[_0x3809('0x24')]()==='outbound'?_0x1f7754['destcalleridnum']:_0x1f7754[_0x3809('0x25')];var _0x3ff422={'method':_0x3809('0xd'),'uri':_0x164377+_0x3809('0x26'),'body':{'telephone1':_0x5a7697,'fullname':_0x5a7697,'firstname':_0x5a7697,'lastname':'_','mobilephone':null,'address1_telephone1':null,'ownerid@odata.bind':_0x3809('0x27')+_0x149acd[_0x3809('0x20')]+')'},'headers':{'Authorization':'Bearer\x20'+_0x470c17,'OData-Version':_0x3809('0x18')},'json':!![],'resolveWithFullResponse':!![]};return rp(_0x3ff422);})['then'](function(_0x1fce83){var _0x3dfd37=_0x1fce83[_0x3809('0x28')]['odata-entityid'];var _0x34e0ca=_0x3dfd37[_0x3809('0x29')](_0x3dfd37[_0x3809('0x2a')]('(')+0x1,_0x3dfd37[_0x3809('0x2a')](')'));_0x149acd[_0x3809('0x2b')]=_0x34e0ca;_0x1b39dd(_0x149acd);})[_0x3809('0x23')](function(_0x547ede){_0x5ac584(_0x547ede[_0x3809('0x14')]);});});}function getEndUser(_0x189026,_0x48dc40,_0x4ef3a6,_0x2ba71f,_0x560cbc,_0x214ac2){return new BPromise(function(_0x2df5dd,_0x54a544){return getAuthToken(_0x48dc40,_0x4ef3a6,_0x214ac2)[_0x3809('0x19')](function(_0x591242){var _0x7de288={'method':'GET','uri':_0x2ba71f+'contacts?$select=telephone1','headers':{'Authorization':'Bearer\x20'+_0x591242,'If-None-Match':null,'OData-Version':_0x3809('0x18')},'json':!![]};return rp(_0x7de288);})['then'](function(_0xae4472){var _0x280a90=null;if(_0xae4472){var _0x1e4ee=_0xae4472[_0x3809('0x2c')];var _0x5d246b=![];for(_0x280a90=0x0;_0x280a90<_0x1e4ee[_0x3809('0x1b')];_0x280a90++){var _0x548550=_0x214ac2['toLowerCase']()===_0x3809('0x2d')?_0x560cbc['destcalleridnum']:_0x560cbc[_0x3809('0x25')];if(_0x1e4ee[_0x280a90]['telephone1']===_0x548550){_0x5d246b=!![];_0x189026[_0x3809('0x2b')]=_0x1e4ee[_0x280a90][_0x3809('0x2e')];}}if(_0x5d246b){_0x2df5dd(_0x189026);}else{return createEndUser(_0x189026,_0x48dc40,_0x4ef3a6,_0x2ba71f,_0x560cbc,_0x214ac2)['then'](function(_0x5b220e){logger[_0x3809('0x1e')]('['+[_0x214ac2[_0x3809('0x13')]()]+_0x3809('0x2f'),_0x5b220e[_0x3809('0x2b')]);_0x2df5dd(_0x5b220e);});}}else{return createEndUser(_0x189026,_0x48dc40,_0x4ef3a6,_0x2ba71f,_0x560cbc,_0x214ac2)[_0x3809('0x19')](function(_0x2ea83e){logger[_0x3809('0x1e')]('['+[_0x214ac2[_0x3809('0x13')]()]+_0x3809('0x30'),_0x2ea83e[_0x3809('0x2b')]);_0x2df5dd(_0x2ea83e);});}});});}function getCustomFields(_0x20fff3,_0xbdf29,_0x14ab1e){var _0x8b1d54={};if(_0x20fff3['length']>0x0){_[_0x3809('0x31')](_0x20fff3,function(_0x2aa0d9){if(_[_0x3809('0x32')]([_0x3809('0x33'),_0x3809('0x34')],_0x2aa0d9['type'])&&_0x2aa0d9['nameField']&&!_0x2aa0d9['customField']){var _0x497748=_0x2aa0d9['idField']['toLowerCase']();var _0x1fb4eb=_0x497748['substring'](0x0,_0x497748[_0x3809('0x35')]('_'));var _0x3be0f=_0x497748['substring'](_0x497748['indexOf']('_')+0x1);if(_0x1fb4eb===_0x14ab1e){_0x8b1d54[_0x3be0f]=_0x2aa0d9[_0x3809('0x36')];}}});}return _0x8b1d54;}function getTicket(_0x3f5a7e,_0x23faac,_0x506512,_0x2571d1,_0x4a6370,_0x4fa306,_0x39d5eb){return new BPromise(function(_0x1135da,_0xc63323){var _0x1100c0;return getAuthToken(_0x23faac,_0x506512,_0x39d5eb)[_0x3809('0x19')](function(_0x4e8f15){if(_0x4fa306[_0x3809('0x37')]===_0x3809('0x38')){_0x1100c0={'method':_0x3809('0xd'),'uri':_0x2571d1+_0x3809('0x39'),'body':Object[_0x3809('0x3a')]({},{'title':intUtil['getString'](_0x4fa306[_0x3809('0x3b')],_0x4a6370,'\x20'),'description':intUtil[_0x3809('0x3c')](_0x4fa306[_0x3809('0x3d')],_0x4a6370,'\x0a'),'customerid_contact@odata.bind':'/contacts('+_0x3f5a7e[_0x3809('0x2b')]+')','ownerid@odata.bind':'/systemusers('+_0x3f5a7e[_0x3809('0x20')]+')','caseorigincode':'1'},getCustomFields(_0x4fa306[_0x3809('0x3e')],_0x4a6370,_0x4fa306[_0x3809('0x37')])),'headers':{'Authorization':_0x3809('0x17')+_0x4e8f15,'OData-Version':_0x3809('0x18')},'json':!![],'resolveWithFullResponse':!![]};}if(_0x4fa306[_0x3809('0x37')]==='phonecall'){_0x1100c0={'method':_0x3809('0xd'),'uri':_0x2571d1+_0x3809('0x3f'),'body':Object[_0x3809('0x3a')]({},{'subject':intUtil['getString'](_0x4fa306[_0x3809('0x3b')],_0x4a6370,'\x20'),'phonenumber':String(_0x4a6370['calleridnum']),'description':intUtil['getString'](_0x4fa306['Descriptions'],_0x4a6370,'\x0a'),'regardingobjectid_contact@odata.bind':'/contacts('+_0x3f5a7e[_0x3809('0x2b')]+')','ownerid@odata.bind':_0x3809('0x27')+_0x3f5a7e['userId']+')','directioncode':_0x3f5a7e[_0x3809('0x40')]===_0x3809('0x41')?![]:!![],'phonecall_activity_parties':[{'partyid_systemuser@odata.bind':_0x3809('0x27')+_0x3f5a7e[_0x3809('0x20')]+')','participationtypemask':_0x3f5a7e[_0x3809('0x40')]===_0x3809('0x41')?0x2:0x1},{'partyid_contact@odata.bind':'/contacts('+_0x3f5a7e[_0x3809('0x2b')]+')','participationtypemask':_0x3f5a7e[_0x3809('0x40')]===_0x3809('0x41')?0x1:0x2}]},getCustomFields(_0x4fa306[_0x3809('0x3e')],_0x4a6370,_0x4fa306[_0x3809('0x37')])),'headers':{'Authorization':'Bearer\x20'+_0x4e8f15,'OData-Version':_0x3809('0x18')},'json':!![],'resolveWithFullResponse':!![]};}return rp(_0x1100c0);})['then'](function(_0x561445){var _0x56d894=_0x561445['headers'][_0x3809('0x42')];var _0xeebf8f=_0x56d894[_0x3809('0x29')](_0x56d894[_0x3809('0x2a')]('(')+0x1,_0x56d894['lastIndexOf'](')'));_0x3f5a7e[_0x3809('0x43')]=_0xeebf8f;_0x1135da(_0x3f5a7e);})[_0x3809('0x23')](function(_0x4a3330){_0xc63323(_0x4a3330[_0x3809('0x14')]);});});}function emit(_0x1f0415,_0x20d699,_0x57446f,_0x174f61){var _0x52b602={'uri':util[_0x3809('0x44')](_0x3809('0x45'),_0x1f0415,_0x57446f,_0x174f61)};io['to'](util['format'](_0x3809('0x46'),_0x20d699))[_0x3809('0x47')]('trigger:browser:url',_0x52b602);}exports['cs']=function(_0x42f363,_0x5ecb61,_0x5b10e1,_0xd06a29,_0x5cedec,_0x2b2ac1,_0x25f15f,_0x10f859){var _0x1cdd50={};_0x2b2ac1[_0x3809('0xf')]=intUtil[_0x3809('0x48')](_0x2b2ac1['remoteUri']);_0x2b2ac1['serverUrl']=intUtil[_0x3809('0x48')](_0x2b2ac1[_0x3809('0x49')]);_0x1cdd50[_0x3809('0x40')]=_0x10f859===_0x3809('0x41')||_0x10f859===_0x3809('0x4a')?_0x3809('0x41'):_0x3809('0x2d');var _0x1bec51=util[_0x3809('0x44')](_0x3809('0x4b'),_0x2b2ac1['remoteUri']);var _0x3bcfa4=util[_0x3809('0x44')](_0x3809('0x4c'),_0x2b2ac1['tenantId']);var _0x5902b6=util[_0x3809('0x44')](_0x3809('0x4d'),_0x2b2ac1['serverUrl'],_0x5ecb61[_0x3809('0x4e')],md5(_0x5ecb61[_0x3809('0x4e')]));if(_0x5cedec&&_0x5cedec['monitor_format']){logger[_0x3809('0x1e')](_0x3809('0x4f'),_0x3809('0x50'));_0x5ecb61[_0x3809('0x51')]=_0x5902b6;}else if(_0x25f15f&&_0x25f15f[_0x3809('0x52')]&&_0x25f15f['recordingFormat']!==_0x3809('0x53')){logger[_0x3809('0x1e')](_0x3809('0x54'),_0x3809('0x50'));_0x5ecb61['recordingURL']=_0x5902b6;}else{_0x5ecb61[_0x3809('0x51')]='';}return getUser(_0x1cdd50,_0x2b2ac1,_0xd06a29,_0x3bcfa4,_0x1bec51,_0x10f859)['then'](function(_0xc99fe3){logger['info']('['+_0x10f859['toUpperCase']()+_0x3809('0x55'),_0xc99fe3[_0x3809('0x20')]);logger[_0x3809('0x1e')]('['+_0x10f859[_0x3809('0x13')]()+_0x3809('0x56'),_0xc99fe3[_0x3809('0x1a')]);return getEndUser(_0xc99fe3,_0x2b2ac1,_0x3bcfa4,_0x1bec51,_0x5ecb61,_0x10f859);})[_0x3809('0x19')](function(_0xb6d89a){logger['info']('['+_0x10f859[_0x3809('0x13')]()+_0x3809('0x57'),_0xb6d89a['enduserId']);logger[_0x3809('0x1e')]('['+_0x10f859[_0x3809('0x13')]()+_0x3809('0x58'),_0x5ecb61[_0x3809('0x25')]);return getTicket(_0xb6d89a,_0x2b2ac1,_0x3bcfa4,_0x1bec51,_0x5ecb61,_0x5b10e1,_0x10f859);})[_0x3809('0x19')](function(_0x6b4c28){logger[_0x3809('0x1e')](util[_0x3809('0x44')]('['+_0x10f859['toUpperCase']()+']\x20The\x20%s\x20ID\x20is:\x20%s',_0x5b10e1[_0x3809('0x37')],_0x6b4c28[_0x3809('0x43')]));logger[_0x3809('0x1e')](util[_0x3809('0x44')]('['+_0x10f859[_0x3809('0x13')]()+_0x3809('0x59'),_0x10f859));if(_0x10f859!==_0x3809('0x4a')){logger['info']('['+_0x10f859[_0x3809('0x13')]()+']',_0x3809('0x5a'));emit(_0x2b2ac1[_0x3809('0xf')],_0xd06a29['name'],_0x5b10e1['ticketType'],_0x6b4c28[_0x3809('0x43')]);}})['catch'](function(_0x19e959){logger[_0x3809('0x12')]('['+_0x10f859[_0x3809('0x13')]()+_0x3809('0x5b'),util['inspect'](_0x19e959,{'showHidden':!![],'depth':null}));});}; \ No newline at end of file diff --git a/server/services/ami/trigger/integration/freshdesk.js b/server/services/ami/trigger/integration/freshdesk.js index e2325e4..7bb4b8f 100644 --- a/server/services/ami/trigger/integration/freshdesk.js +++ b/server/services/ami/trigger/integration/freshdesk.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xec6e=['variableName','customVariable','Variable','queue','stripTrailingSlash','serverUrl','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','recordingURL','uniqueid','Authorization','The\x20User\x20ID\x20is:','The\x20Enduser\x20ID\x20is:','The\x20Ticket\x20ID\x20is:','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','trigger:browser:url','%s/helpdesk/tickets/%d','catch','error','outbound','recordingFormat','none','[OUTBOUND]','destcalleridnum','unmanaged','lastevent','toUpperCase','lodash','request-promise','md5','ioredis','./util','../../../../config/environment','../../../../config/logger','defaults','redis','localhost','socket.io-emitter','emit','info','Creating\x20new\x20ticket...','merge','Caller\x20-\x20%s','calleridname','calleridnum','Subjects','getString','Descriptions','
','Tags','name','Fields','custom_fields','mapValues','value','format','remoteUri','POST','then','Ticket\x20created!','validateEmail','%s/api/v2/agents','length','Agent\x20found!','find','contact','email','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','%s/api/v2/agents/me','Invalid\x20email\x20format,\x20using\x20the\x20admin\x20account!','Admin\x20account\x20selected.','Searching\x20enduser\x20with\x20phone','Enduser\x20found!','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','%s/api/v2/contacts','Enduser\x20created.','apiKey','toString','debug','[HTTP]','stringify','GET','forEach','type','nameField','customField','toLowerCase','includes','string','idField','push','variable'];(function(_0xcafda3,_0x3ba68c){var _0x47483d=function(_0x594928){while(--_0x594928){_0xcafda3['push'](_0xcafda3['shift']());}};_0x47483d(++_0x3ba68c);}(_0xec6e,0xd9));var _0xeec6=function(_0x264d4d,_0x118fb5){_0x264d4d=_0x264d4d-0x0;var _0xc917e2=_0xec6e[_0x264d4d];return _0xc917e2;};'use strict';var _=require(_0xeec6('0x0'));var rp=require(_0xeec6('0x1'));var md5=require(_0xeec6('0x2'));var util=require('util');var Redis=require(_0xeec6('0x3'));var intUtil=require(_0xeec6('0x4'));var config=require(_0xeec6('0x5'));var logger=require(_0xeec6('0x6'))('freshdesk');config['redis']=_[_0xeec6('0x7')](config[_0xeec6('0x8')],{'host':_0xeec6('0x9'),'port':0x18eb});var io=require(_0xeec6('0xa'))(new Redis(config[_0xeec6('0x8')]));var headers={'Content-Type':'application/json','Accept':'application/json'};function emit(_0xcbd425,_0x4e3c32,_0x37442d){io['to'](_0xcbd425)[_0xeec6('0xb')](_0x4e3c32,_0x37442d);}function getTicket(_0x5d4cff,_0x29e070,_0x2f742d,_0x87cdff,_0x55df6f){logger[_0xeec6('0xc')](_0xeec6('0xd'));var _0x275b51=_[_0xeec6('0xe')]({'responder_id':_0x29e070['id'],'requester_id':_0x2f742d['id'],'name':util['format'](_0xeec6('0xf'),_0x55df6f[_0xeec6('0x10')]),'phone':_0x55df6f[_0xeec6('0x11')],'source':0x3,'priority':0x1,'status':0x2,'subject':intUtil['getString'](_0x87cdff[_0xeec6('0x12')],_0x55df6f,'\x20'),'description':intUtil[_0xeec6('0x13')](_0x87cdff[_0xeec6('0x14')],_0x55df6f,_0xeec6('0x15')),'tags':getTags(_0x87cdff[_0xeec6('0x16')],_0xeec6('0x17'))},getCustomFields(_0x87cdff[_0xeec6('0x18')],_0x55df6f));_0x275b51[_0xeec6('0x19')]=_[_0xeec6('0x1a')](_['keyBy'](_0x275b51['custom_fields'],'id'),_0xeec6('0x1b'));return request({'uri':util[_0xeec6('0x1c')]('%s/api/v2/tickets',_0x5d4cff[_0xeec6('0x1d')]),'method':_0xeec6('0x1e'),'body':_0x275b51})[_0xeec6('0x1f')](function(_0x4cc80d){logger['info'](_0xeec6('0x20'));return _0x4cc80d;});}function getUser(_0x163f13,_0x11fb08){if(intUtil[_0xeec6('0x21')](_0x11fb08)){return request({'uri':util['format'](_0xeec6('0x22'),_0x163f13[_0xeec6('0x1d')]),'qs':{'email':_0x11fb08}})[_0xeec6('0x1f')](function(_0x21df22){if(_0x21df22[_0xeec6('0x23')]){logger[_0xeec6('0xc')](_0xeec6('0x24'));return _[_0xeec6('0x25')](_0x21df22,function(_0x35799e){return _0x35799e[_0xeec6('0x26')][_0xeec6('0x27')]===_0x11fb08;});}else{logger[_0xeec6('0xc')](_0xeec6('0x28'));return request({'uri':util[_0xeec6('0x1c')](_0xeec6('0x29'),_0x163f13[_0xeec6('0x1d')])})[_0xeec6('0x1f')](function(_0xb82fcb){logger[_0xeec6('0xc')]('Admin\x20account\x20selected.');return _0xb82fcb;});}});}else{logger['info'](_0xeec6('0x2a'));return request({'uri':util[_0xeec6('0x1c')]('%s/api/v2/agents/me',_0x163f13[_0xeec6('0x1d')])})['then'](function(_0x474c16){logger[_0xeec6('0xc')](_0xeec6('0x2b'));return _0x474c16;});}}function getEndUser(_0x2b7d06,_0x21f27a,_0xddb9d9){logger[_0xeec6('0xc')](_0xeec6('0x2c'),_0xddb9d9);return request({'uri':util[_0xeec6('0x1c')]('%s/api/v2/contacts',_0x2b7d06[_0xeec6('0x1d')]),'qs':{'phone':_0xddb9d9}})['then'](function(_0x5bc632){if(_0x5bc632[_0xeec6('0x23')]){logger[_0xeec6('0xc')](_0xeec6('0x2d'));return _[_0xeec6('0x25')](_0x5bc632,{'phone':_0xddb9d9});}else{logger[_0xeec6('0xc')](_0xeec6('0x2e'));return request({'uri':util[_0xeec6('0x1c')](_0xeec6('0x2f'),_0x2b7d06[_0xeec6('0x1d')]),'method':_0xeec6('0x1e'),'body':{'name':_0x21f27a,'phone':_0xddb9d9}})[_0xeec6('0x1f')](function(_0x271662){logger[_0xeec6('0xc')](_0xeec6('0x30'));return _0x271662;});}});}function getAuth(_0x10f1d4){return util[_0xeec6('0x1c')]('Basic\x20%s',new Buffer(_0x10f1d4[_0xeec6('0x31')]+':X')[_0xeec6('0x32')]('base64'));}function request(_0x3cb54d){logger[_0xeec6('0x33')](_0xeec6('0x34'),JSON[_0xeec6('0x35')](_0x3cb54d));return rp(_[_0xeec6('0x7')](_0x3cb54d,{'method':_0xeec6('0x36'),'headers':headers,'json':!![]}));}function getTags(_0x42ea83,_0x365951){var _0x29244c=[];if(_0x42ea83&&_0x42ea83[_0xeec6('0x23')]>0x0){_0x29244c=_['map'](_0x42ea83,_0x365951);}return _0x29244c;}function getCustomFields(_0xa3212d,_0x355a72){var _0x4e503f=[];var _0x59b55b={'custom_fields':[]};if(_0xa3212d[_0xeec6('0x23')]>0x0){_[_0xeec6('0x37')](_0xa3212d,function(_0x1fae5b){if(_['includes'](['string','picklist'],_0x1fae5b[_0xeec6('0x38')])&&_0x1fae5b[_0xeec6('0x39')]&&!_0x1fae5b[_0xeec6('0x3a')]){_0x59b55b[_0x1fae5b[_0xeec6('0x39')][_0xeec6('0x3b')]()]=_0x1fae5b['content']['toString']();}else if(_[_0xeec6('0x3c')]([_0xeec6('0x3d'),'picklist'],_0x1fae5b['type'])&&_0x1fae5b[_0xeec6('0x3e')]&&_0x1fae5b['customField']){_0x59b55b[_0xeec6('0x19')][_0xeec6('0x3f')]({'id':_0x1fae5b[_0xeec6('0x3e')],'value':_0x1fae5b['content']['toString']()});}else if(_0x1fae5b[_0xeec6('0x38')]===_0xeec6('0x40')&&_0x1fae5b[_0xeec6('0x41')]&&_0x1fae5b['idField']&&_0x1fae5b[_0xeec6('0x3a')]){_0x355a72[_0x1fae5b[_0xeec6('0x41')]]&&_0x59b55b['custom_fields'][_0xeec6('0x3f')]({'id':_0x1fae5b[_0xeec6('0x3e')],'value':_0x355a72[_0x1fae5b[_0xeec6('0x41')]][_0xeec6('0x32')]()});}else if(_0x1fae5b['type']===_0xeec6('0x42')&&_0x1fae5b[_0xeec6('0x43')]&&_0x1fae5b[_0xeec6('0x43')][_0xeec6('0x17')]&&_0x1fae5b[_0xeec6('0x3e')]&&_0x1fae5b['customField']){_0x355a72[_0x1fae5b[_0xeec6('0x43')]['name']['toLowerCase']()]&&_0x59b55b[_0xeec6('0x19')][_0xeec6('0x3f')]({'id':_0x1fae5b[_0xeec6('0x3e')],'value':_0x355a72[_0x1fae5b[_0xeec6('0x43')]['name'][_0xeec6('0x3b')]()]['toString']()});}});}return _0x59b55b;}exports[_0xeec6('0x44')]=function(_0x3174f9,_0xc906c7,_0x440098,_0x167264,_0xdd2f4d,_0x7940ec){var _0x180fc2,_0xb6dd0c;_0x7940ec[_0xeec6('0x1d')]=intUtil[_0xeec6('0x45')](_0x7940ec[_0xeec6('0x1d')]);_0x7940ec[_0xeec6('0x46')]=intUtil['stripTrailingSlash'](_0x7940ec[_0xeec6('0x46')]);if(_0xdd2f4d&&_0xdd2f4d[_0xeec6('0x47')]){logger[_0xeec6('0xc')](_0xeec6('0x48'),_0xeec6('0x49'));_0xc906c7[_0xeec6('0x4a')]=util[_0xeec6('0x1c')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x7940ec[_0xeec6('0x46')],_0xc906c7[_0xeec6('0x4b')],md5(_0xc906c7['uniqueid']));}else{_0xc906c7[_0xeec6('0x4a')]='';}headers[_0xeec6('0x4c')]=getAuth(_0x7940ec);return getUser(_0x7940ec,_0x167264[_0xeec6('0x27')])[_0xeec6('0x1f')](function(_0xd6c80b){_0x180fc2=_0xd6c80b;logger[_0xeec6('0xc')](_0xeec6('0x4d'),_0x180fc2['id']);return getEndUser(_0x7940ec,_0xc906c7[_0xeec6('0x10')],_0xc906c7['calleridnum']);})['then'](function(_0x38dd56){_0xb6dd0c=_0x38dd56;logger[_0xeec6('0xc')](_0xeec6('0x4e'),_0xb6dd0c['id']);return getTicket(_0x7940ec,_0x180fc2,_0xb6dd0c,_0x440098,_0xc906c7);})['then'](function(_0x55c79f){if(_0x55c79f&&_0x55c79f['id']){logger[_0xeec6('0xc')](_0xeec6('0x20'));logger[_0xeec6('0xc')](_0xeec6('0x4f'),_0x55c79f['id']);logger['info'](_0xeec6('0x48'),_0xeec6('0x50'));emit(util[_0xeec6('0x1c')](_0xeec6('0x51'),_0x167264[_0xeec6('0x17')]),_0xeec6('0x52'),{'uri':util[_0xeec6('0x1c')](_0xeec6('0x53'),_0x7940ec[_0xeec6('0x1d')],_0x55c79f['id'])});}})[_0xeec6('0x54')](function(_0x1e01f5){logger[_0xeec6('0x55')](_0xeec6('0x48'),JSON[_0xeec6('0x35')](_0x1e01f5));});};exports[_0xeec6('0x56')]=function(_0xb16a0c,_0x3f1bee,_0x19d4b6,_0xa1a841,_0x246e54,_0x2df9a8,_0x210144){var _0x3c1170,_0xf64992;_0x2df9a8[_0xeec6('0x1d')]=intUtil[_0xeec6('0x45')](_0x2df9a8[_0xeec6('0x1d')]);_0x2df9a8[_0xeec6('0x46')]=intUtil[_0xeec6('0x45')](_0x2df9a8['serverUrl']);if(_0x210144&&_0x210144[_0xeec6('0x57')]&&_0x210144[_0xeec6('0x57')]!==_0xeec6('0x58')){logger[_0xeec6('0xc')](_0xeec6('0x59'),_0xeec6('0x49'));_0x3f1bee[_0xeec6('0x4a')]=util[_0xeec6('0x1c')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x2df9a8[_0xeec6('0x46')],_0x3f1bee[_0xeec6('0x4b')],md5(_0x3f1bee['uniqueid']));}headers[_0xeec6('0x4c')]=getAuth(_0x2df9a8);return getUser(_0x2df9a8,_0xa1a841[_0xeec6('0x27')])[_0xeec6('0x1f')](function(_0x407c2d){_0x3c1170=_0x407c2d;logger[_0xeec6('0xc')]('The\x20User\x20ID\x20is:',_0x3c1170['id']);return getEndUser(_0x2df9a8,_0x3f1bee['destcalleridname'],_0x3f1bee[_0xeec6('0x5a')]);})[_0xeec6('0x1f')](function(_0x385d9e){_0xf64992=_0x385d9e;logger['info'](_0xeec6('0x4e'),_0xf64992['id']);return getTicket(_0x2df9a8,_0x3c1170,_0xf64992,_0x19d4b6,_0x3f1bee);})['then'](function(_0x26256e){if(_0x26256e&&_0x26256e['id']){logger[_0xeec6('0xc')]('Ticket\x20created!');logger[_0xeec6('0xc')](_0xeec6('0x4f'),_0x26256e['id']);logger[_0xeec6('0xc')](_0xeec6('0x59'),_0xeec6('0x50'));emit(util[_0xeec6('0x1c')](_0xeec6('0x51'),_0xa1a841['name']),_0xeec6('0x52'),{'uri':util[_0xeec6('0x1c')](_0xeec6('0x53'),_0x2df9a8[_0xeec6('0x1d')],_0x26256e['id'])});}})[_0xeec6('0x54')](function(_0x1f0522){logger['error']('[OUTBOUND]',JSON[_0xeec6('0x35')](_0x1f0522));});};exports[_0xeec6('0x5b')]=function(_0x2b23ef,_0x35d11d,_0x493728,_0x3ffcdb,_0x3e4adf,_0x8a0be0){var _0x5eb679,_0x178ca3;_0x8a0be0['remoteUri']=intUtil[_0xeec6('0x45')](_0x8a0be0[_0xeec6('0x1d')]);_0x8a0be0[_0xeec6('0x46')]=intUtil[_0xeec6('0x45')](_0x8a0be0[_0xeec6('0x46')]);if(_0x3e4adf&&_0x3e4adf[_0xeec6('0x47')]){logger[_0xeec6('0xc')]('['+_0x35d11d[_0xeec6('0x5c')][_0xeec6('0x5d')]()+']',_0xeec6('0x49'));_0x35d11d[_0xeec6('0x4a')]=util[_0xeec6('0x1c')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x8a0be0[_0xeec6('0x46')],_0x35d11d[_0xeec6('0x4b')],md5(_0x35d11d[_0xeec6('0x4b')]));}else{_0x35d11d['recordingURL']='';}headers[_0xeec6('0x4c')]=getAuth(_0x8a0be0);return getUser(_0x8a0be0,'')[_0xeec6('0x1f')](function(_0x91cd9){_0x5eb679=_0x91cd9;logger[_0xeec6('0xc')]('The\x20User\x20ID\x20is:',_0x5eb679['id']);return getEndUser(_0x8a0be0,_0x35d11d[_0xeec6('0x10')],_0x35d11d[_0xeec6('0x11')]);})[_0xeec6('0x1f')](function(_0x10ab36){_0x178ca3=_0x10ab36;logger[_0xeec6('0xc')](_0xeec6('0x4e'),_0x178ca3['id']);return getTicket(_0x8a0be0,_0x5eb679,_0x178ca3,_0x493728,_0x35d11d);})[_0xeec6('0x1f')](function(_0x24a8eb){if(_0x24a8eb){logger['info'](_0xeec6('0x20'));logger['info']('The\x20Ticket\x20ID\x20is:',_0x24a8eb['id']);}})['catch'](function(_0x15974a){logger[_0xeec6('0x55')]('['+_0x35d11d['lastevent'][_0xeec6('0x5d')]()+']',JSON[_0xeec6('0x35')](_0x15974a));});}; \ No newline at end of file +var _0xa1b7=['length','Agent\x20found!','contact','email','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','%s/api/v2/agents/me','Admin\x20account\x20selected.','Invalid\x20email\x20format,\x20using\x20the\x20admin\x20account!','Searching\x20enduser\x20with\x20phone','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','Enduser\x20created.','apiKey','toString','base64','debug','[HTTP]','stringify','GET','map','forEach','includes','string','picklist','type','nameField','toLowerCase','idField','variable','custom_fields','push','variableName','Variable','queue','serverUrl','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','recordingURL','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','calleridname','The\x20Enduser\x20ID\x20is:','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','trigger:browser:url','%s/helpdesk/tickets/%d','catch','error','outbound','stripTrailingSlash','recordingFormat','none','[OUTBOUND]','Authorization','destcalleridname','destcalleridnum','The\x20Ticket\x20ID\x20is:','unmanaged','lastevent','toUpperCase','lodash','request-promise','md5','util','ioredis','./util','../../../../config/environment','../../../../config/logger','redis','defaults','localhost','socket.io-emitter','application/json','emit','info','Creating\x20new\x20ticket...','merge','format','Caller\x20-\x20%s','calleridnum','getString','name','Fields','mapValues','keyBy','value','%s/api/v2/tickets','remoteUri','POST','Ticket\x20created!','%s/api/v2/agents','then'];(function(_0x2c7240,_0x18565d){var _0x5a3c7a=function(_0x1f430b){while(--_0x1f430b){_0x2c7240['push'](_0x2c7240['shift']());}};_0x5a3c7a(++_0x18565d);}(_0xa1b7,0xf4));var _0x7a1b=function(_0x2addc4,_0xb13cc4){_0x2addc4=_0x2addc4-0x0;var _0x20e376=_0xa1b7[_0x2addc4];return _0x20e376;};'use strict';var _=require(_0x7a1b('0x0'));var rp=require(_0x7a1b('0x1'));var md5=require(_0x7a1b('0x2'));var util=require(_0x7a1b('0x3'));var Redis=require(_0x7a1b('0x4'));var intUtil=require(_0x7a1b('0x5'));var config=require(_0x7a1b('0x6'));var logger=require(_0x7a1b('0x7'))('freshdesk');config[_0x7a1b('0x8')]=_[_0x7a1b('0x9')](config[_0x7a1b('0x8')],{'host':_0x7a1b('0xa'),'port':0x18eb});var io=require(_0x7a1b('0xb'))(new Redis(config[_0x7a1b('0x8')]));var headers={'Content-Type':'application/json','Accept':_0x7a1b('0xc')};function emit(_0x4ef891,_0x1bc546,_0x3200f0){io['to'](_0x4ef891)[_0x7a1b('0xd')](_0x1bc546,_0x3200f0);}function getTicket(_0x3e64cf,_0x125651,_0x5b67a6,_0x50fdad,_0x26e094){logger[_0x7a1b('0xe')](_0x7a1b('0xf'));var _0x2a1602=_[_0x7a1b('0x10')]({'responder_id':_0x125651['id'],'requester_id':_0x5b67a6['id'],'name':util[_0x7a1b('0x11')](_0x7a1b('0x12'),_0x26e094['calleridname']),'phone':_0x26e094[_0x7a1b('0x13')],'source':0x3,'priority':0x1,'status':0x2,'subject':intUtil[_0x7a1b('0x14')](_0x50fdad['Subjects'],_0x26e094,'\x20'),'description':intUtil[_0x7a1b('0x14')](_0x50fdad['Descriptions'],_0x26e094,'
'),'tags':getTags(_0x50fdad['Tags'],_0x7a1b('0x15'))},getCustomFields(_0x50fdad[_0x7a1b('0x16')],_0x26e094));_0x2a1602['custom_fields']=_[_0x7a1b('0x17')](_[_0x7a1b('0x18')](_0x2a1602['custom_fields'],'id'),_0x7a1b('0x19'));return request({'uri':util[_0x7a1b('0x11')](_0x7a1b('0x1a'),_0x3e64cf[_0x7a1b('0x1b')]),'method':_0x7a1b('0x1c'),'body':_0x2a1602})['then'](function(_0x343daf){logger[_0x7a1b('0xe')](_0x7a1b('0x1d'));return _0x343daf;});}function getUser(_0x1405fe,_0x25c4e6){if(intUtil['validateEmail'](_0x25c4e6)){return request({'uri':util[_0x7a1b('0x11')](_0x7a1b('0x1e'),_0x1405fe[_0x7a1b('0x1b')]),'qs':{'email':_0x25c4e6}})[_0x7a1b('0x1f')](function(_0x2b9cd7){if(_0x2b9cd7[_0x7a1b('0x20')]){logger['info'](_0x7a1b('0x21'));return _['find'](_0x2b9cd7,function(_0x35e070){return _0x35e070[_0x7a1b('0x22')][_0x7a1b('0x23')]===_0x25c4e6;});}else{logger[_0x7a1b('0xe')](_0x7a1b('0x24'));return request({'uri':util['format'](_0x7a1b('0x25'),_0x1405fe['remoteUri'])})[_0x7a1b('0x1f')](function(_0x177115){logger[_0x7a1b('0xe')](_0x7a1b('0x26'));return _0x177115;});}});}else{logger[_0x7a1b('0xe')](_0x7a1b('0x27'));return request({'uri':util['format']('%s/api/v2/agents/me',_0x1405fe[_0x7a1b('0x1b')])})[_0x7a1b('0x1f')](function(_0x1dbf55){logger[_0x7a1b('0xe')](_0x7a1b('0x26'));return _0x1dbf55;});}}function getEndUser(_0x22d0ce,_0x46aa36,_0x3d0871){logger['info'](_0x7a1b('0x28'),_0x3d0871);return request({'uri':util[_0x7a1b('0x11')]('%s/api/v2/contacts',_0x22d0ce[_0x7a1b('0x1b')]),'qs':{'phone':_0x3d0871}})[_0x7a1b('0x1f')](function(_0x125750){if(_0x125750['length']){logger[_0x7a1b('0xe')]('Enduser\x20found!');return _['find'](_0x125750,{'phone':_0x3d0871});}else{logger[_0x7a1b('0xe')](_0x7a1b('0x29'));return request({'uri':util[_0x7a1b('0x11')]('%s/api/v2/contacts',_0x22d0ce[_0x7a1b('0x1b')]),'method':'POST','body':{'name':_0x46aa36,'phone':_0x3d0871}})[_0x7a1b('0x1f')](function(_0x1cb1e9){logger[_0x7a1b('0xe')](_0x7a1b('0x2a'));return _0x1cb1e9;});}});}function getAuth(_0x35c998){return util['format']('Basic\x20%s',new Buffer(_0x35c998[_0x7a1b('0x2b')]+':X')[_0x7a1b('0x2c')](_0x7a1b('0x2d')));}function request(_0x118b8d){logger[_0x7a1b('0x2e')](_0x7a1b('0x2f'),JSON[_0x7a1b('0x30')](_0x118b8d));return rp(_[_0x7a1b('0x9')](_0x118b8d,{'method':_0x7a1b('0x31'),'headers':headers,'json':!![]}));}function getTags(_0x1d8ea7,_0x63d9b3){var _0x24d9b9=[];if(_0x1d8ea7&&_0x1d8ea7[_0x7a1b('0x20')]>0x0){_0x24d9b9=_[_0x7a1b('0x32')](_0x1d8ea7,_0x63d9b3);}return _0x24d9b9;}function getCustomFields(_0x28f975,_0x10e76a){var _0x26a9ec=[];var _0x5c7a67={'custom_fields':[]};if(_0x28f975['length']>0x0){_[_0x7a1b('0x33')](_0x28f975,function(_0x1e7da8){if(_[_0x7a1b('0x34')]([_0x7a1b('0x35'),_0x7a1b('0x36')],_0x1e7da8[_0x7a1b('0x37')])&&_0x1e7da8[_0x7a1b('0x38')]&&!_0x1e7da8['customField']){_0x5c7a67[_0x1e7da8[_0x7a1b('0x38')][_0x7a1b('0x39')]()]=_0x1e7da8['content'][_0x7a1b('0x2c')]();}else if(_[_0x7a1b('0x34')](['string',_0x7a1b('0x36')],_0x1e7da8[_0x7a1b('0x37')])&&_0x1e7da8[_0x7a1b('0x3a')]&&_0x1e7da8['customField']){_0x5c7a67['custom_fields']['push']({'id':_0x1e7da8[_0x7a1b('0x3a')],'value':_0x1e7da8['content'][_0x7a1b('0x2c')]()});}else if(_0x1e7da8[_0x7a1b('0x37')]===_0x7a1b('0x3b')&&_0x1e7da8['variableName']&&_0x1e7da8[_0x7a1b('0x3a')]&&_0x1e7da8['customField']){_0x10e76a[_0x1e7da8['variableName']]&&_0x5c7a67[_0x7a1b('0x3c')][_0x7a1b('0x3d')]({'id':_0x1e7da8[_0x7a1b('0x3a')],'value':_0x10e76a[_0x1e7da8[_0x7a1b('0x3e')]]['toString']()});}else if(_0x1e7da8[_0x7a1b('0x37')]==='customVariable'&&_0x1e7da8['Variable']&&_0x1e7da8[_0x7a1b('0x3f')][_0x7a1b('0x15')]&&_0x1e7da8[_0x7a1b('0x3a')]&&_0x1e7da8['customField']){_0x10e76a[_0x1e7da8[_0x7a1b('0x3f')][_0x7a1b('0x15')][_0x7a1b('0x39')]()]&&_0x5c7a67[_0x7a1b('0x3c')]['push']({'id':_0x1e7da8[_0x7a1b('0x3a')],'value':_0x10e76a[_0x1e7da8['Variable'][_0x7a1b('0x15')]['toLowerCase']()][_0x7a1b('0x2c')]()});}});}return _0x5c7a67;}exports[_0x7a1b('0x40')]=function(_0x22df42,_0x43bef6,_0x21ad08,_0x590378,_0x464646,_0x4dec93){var _0x489de3,_0x34692c;_0x4dec93['remoteUri']=intUtil['stripTrailingSlash'](_0x4dec93['remoteUri']);_0x4dec93[_0x7a1b('0x41')]=intUtil['stripTrailingSlash'](_0x4dec93[_0x7a1b('0x41')]);if(_0x464646&&_0x464646[_0x7a1b('0x42')]){logger['info'](_0x7a1b('0x43'),_0x7a1b('0x44'));_0x43bef6[_0x7a1b('0x45')]=util[_0x7a1b('0x11')](_0x7a1b('0x46'),_0x4dec93[_0x7a1b('0x41')],_0x43bef6[_0x7a1b('0x47')],md5(_0x43bef6[_0x7a1b('0x47')]));}else{_0x43bef6[_0x7a1b('0x45')]='';}headers['Authorization']=getAuth(_0x4dec93);return getUser(_0x4dec93,_0x590378[_0x7a1b('0x23')])[_0x7a1b('0x1f')](function(_0x585e83){_0x489de3=_0x585e83;logger[_0x7a1b('0xe')]('The\x20User\x20ID\x20is:',_0x489de3['id']);return getEndUser(_0x4dec93,_0x43bef6[_0x7a1b('0x48')],_0x43bef6[_0x7a1b('0x13')]);})[_0x7a1b('0x1f')](function(_0x5a5627){_0x34692c=_0x5a5627;logger[_0x7a1b('0xe')](_0x7a1b('0x49'),_0x34692c['id']);return getTicket(_0x4dec93,_0x489de3,_0x34692c,_0x21ad08,_0x43bef6);})['then'](function(_0xf2c6d7){if(_0xf2c6d7&&_0xf2c6d7['id']){logger[_0x7a1b('0xe')](_0x7a1b('0x1d'));logger['info']('The\x20Ticket\x20ID\x20is:',_0xf2c6d7['id']);logger['info'](_0x7a1b('0x43'),_0x7a1b('0x4a'));emit(util[_0x7a1b('0x11')](_0x7a1b('0x4b'),_0x590378[_0x7a1b('0x15')]),_0x7a1b('0x4c'),{'uri':util[_0x7a1b('0x11')](_0x7a1b('0x4d'),_0x4dec93[_0x7a1b('0x1b')],_0xf2c6d7['id'])});}})[_0x7a1b('0x4e')](function(_0xfce9f3){logger[_0x7a1b('0x4f')](_0x7a1b('0x43'),JSON[_0x7a1b('0x30')](_0xfce9f3));});};exports[_0x7a1b('0x50')]=function(_0x27936e,_0xf056f4,_0x5214f0,_0x1ac825,_0x4d07b3,_0x48de92,_0x4571e9){var _0x2366fe,_0xdfe3c9;_0x48de92[_0x7a1b('0x1b')]=intUtil[_0x7a1b('0x51')](_0x48de92[_0x7a1b('0x1b')]);_0x48de92['serverUrl']=intUtil[_0x7a1b('0x51')](_0x48de92[_0x7a1b('0x41')]);if(_0x4571e9&&_0x4571e9[_0x7a1b('0x52')]&&_0x4571e9[_0x7a1b('0x52')]!==_0x7a1b('0x53')){logger[_0x7a1b('0xe')](_0x7a1b('0x54'),'Recording\x20is\x20enabled!');_0xf056f4[_0x7a1b('0x45')]=util[_0x7a1b('0x11')](_0x7a1b('0x46'),_0x48de92[_0x7a1b('0x41')],_0xf056f4[_0x7a1b('0x47')],md5(_0xf056f4[_0x7a1b('0x47')]));}headers[_0x7a1b('0x55')]=getAuth(_0x48de92);return getUser(_0x48de92,_0x1ac825[_0x7a1b('0x23')])[_0x7a1b('0x1f')](function(_0x4a5dd3){_0x2366fe=_0x4a5dd3;logger[_0x7a1b('0xe')]('The\x20User\x20ID\x20is:',_0x2366fe['id']);return getEndUser(_0x48de92,_0xf056f4[_0x7a1b('0x56')],_0xf056f4[_0x7a1b('0x57')]);})['then'](function(_0x32fe95){_0xdfe3c9=_0x32fe95;logger[_0x7a1b('0xe')](_0x7a1b('0x49'),_0xdfe3c9['id']);return getTicket(_0x48de92,_0x2366fe,_0xdfe3c9,_0x5214f0,_0xf056f4);})[_0x7a1b('0x1f')](function(_0x50fbbd){if(_0x50fbbd&&_0x50fbbd['id']){logger['info'](_0x7a1b('0x1d'));logger['info'](_0x7a1b('0x58'),_0x50fbbd['id']);logger[_0x7a1b('0xe')](_0x7a1b('0x54'),'Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...');emit(util[_0x7a1b('0x11')](_0x7a1b('0x4b'),_0x1ac825[_0x7a1b('0x15')]),_0x7a1b('0x4c'),{'uri':util[_0x7a1b('0x11')](_0x7a1b('0x4d'),_0x48de92['remoteUri'],_0x50fbbd['id'])});}})['catch'](function(_0x402dd2){logger[_0x7a1b('0x4f')]('[OUTBOUND]',JSON['stringify'](_0x402dd2));});};exports[_0x7a1b('0x59')]=function(_0x55f6f5,_0x12beac,_0x108362,_0x377dcc,_0x4b8254,_0x2f51e1){var _0x52ff50,_0x3e987c;_0x2f51e1[_0x7a1b('0x1b')]=intUtil[_0x7a1b('0x51')](_0x2f51e1[_0x7a1b('0x1b')]);_0x2f51e1[_0x7a1b('0x41')]=intUtil['stripTrailingSlash'](_0x2f51e1[_0x7a1b('0x41')]);if(_0x4b8254&&_0x4b8254[_0x7a1b('0x42')]){logger[_0x7a1b('0xe')]('['+_0x12beac['lastevent']['toUpperCase']()+']',_0x7a1b('0x44'));_0x12beac[_0x7a1b('0x45')]=util[_0x7a1b('0x11')](_0x7a1b('0x46'),_0x2f51e1[_0x7a1b('0x41')],_0x12beac[_0x7a1b('0x47')],md5(_0x12beac[_0x7a1b('0x47')]));}else{_0x12beac['recordingURL']='';}headers[_0x7a1b('0x55')]=getAuth(_0x2f51e1);return getUser(_0x2f51e1,'')[_0x7a1b('0x1f')](function(_0x207404){_0x52ff50=_0x207404;logger['info']('The\x20User\x20ID\x20is:',_0x52ff50['id']);return getEndUser(_0x2f51e1,_0x12beac[_0x7a1b('0x48')],_0x12beac[_0x7a1b('0x13')]);})[_0x7a1b('0x1f')](function(_0x3242e8){_0x3e987c=_0x3242e8;logger['info']('The\x20Enduser\x20ID\x20is:',_0x3e987c['id']);return getTicket(_0x2f51e1,_0x52ff50,_0x3e987c,_0x108362,_0x12beac);})[_0x7a1b('0x1f')](function(_0x1bde32){if(_0x1bde32){logger[_0x7a1b('0xe')](_0x7a1b('0x1d'));logger[_0x7a1b('0xe')]('The\x20Ticket\x20ID\x20is:',_0x1bde32['id']);}})[_0x7a1b('0x4e')](function(_0x32cda5){logger[_0x7a1b('0x4f')]('['+_0x12beac[_0x7a1b('0x5a')][_0x7a1b('0x5b')]()+']',JSON[_0x7a1b('0x30')](_0x32cda5));});}; \ No newline at end of file diff --git a/server/services/ami/trigger/integration/freshsales.js b/server/services/ami/trigger/integration/freshsales.js index 58b7e0e..af52ecb 100644 --- a/server/services/ami/trigger/integration/freshsales.js +++ b/server/services/ami/trigger/integration/freshsales.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5f76=['work_number','Contact\x20found\x20work_number:','POST','/api/contacts','Contact\x20not\x20found,\x20creating\x20a\x20new\x20contact','Creating\x20new\x20task','/api/tasks','getString','Subjects','Descriptions','Contact','YYYY-MM-DDTHH:mm:ss','add','ticketId','task','Task\x20created:','/contacts/','user:%s','emit','apiKey','remoteUri','serverUrl','stripTrailingSlash','username','toLowerCase','outbound','destcalleridnum','callDirection','queue','email','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','monitor_format','[QUEUE]','recordingURL','recordingFormat','none','[OUTBOUND]','Recording\x20is\x20enabled!','unmanaged','Displaying\x20task\x20in\x20a\x20new\x20tab...','name',']\x20Error\x20running\x20Freshsales\x20integration','inspect','lodash','md5','moment','bluebird','ioredis','./util','../../../../config/environment','../../../../config/logger','defaults','redis','localhost','socket.io-emitter','GET','headers','info','Getting\x20admin\x20information','then','users','length','adminEmail','Requested\x20Resource\x20not\x20Found','catch','error','message','/api/selector/owners','Getting\x20user\x20with\x20email','userEmail','agentEmail','User\x20found:','userId','Admin\x20selected','adminId','toUpperCase','contacts','format','contactNumber','mobile_number','endUserId','Contact\x20found\x20mobile_number:'];(function(_0x21e243,_0xfc68b8){var _0x5ca5a9=function(_0x5cfa5e){while(--_0x5cfa5e){_0x21e243['push'](_0x21e243['shift']());}};_0x5ca5a9(++_0xfc68b8);}(_0x5f76,0xd2));var _0x65f7=function(_0x408d22,_0x53eef9){_0x408d22=_0x408d22-0x0;var _0x58effd=_0x5f76[_0x408d22];return _0x58effd;};'use strict';var _=require(_0x65f7('0x0'));var rp=require('request-promise');var md5=require(_0x65f7('0x1'));var util=require('util');var moment=require(_0x65f7('0x2'));var Promise=require(_0x65f7('0x3'));var Redis=require(_0x65f7('0x4'));var intUtil=require(_0x65f7('0x5'));var config=require(_0x65f7('0x6'));var logger=require(_0x65f7('0x7'))('freshsales');config['redis']=_[_0x65f7('0x8')](config[_0x65f7('0x9')],{'host':_0x65f7('0xa'),'port':0x18eb});var io=require(_0x65f7('0xb'))(new Redis(config[_0x65f7('0x9')]));function getAdminId(_0x46d2f6,_0x29e5ac,_0x3f6105,_0x253615){return new Promise(function(_0x5965d1,_0x9ec43){var _0x191b78=![];var _0x556e16={'method':_0x65f7('0xc'),'uri':_0x253615+'/api/selector/owners','json':!![]};_0x556e16[_0x65f7('0xd')]=_0x3f6105;logger[_0x65f7('0xe')](_0x65f7('0xf'));return rp(_0x556e16)[_0x65f7('0x10')](function(_0x4d1ac5){if(_0x4d1ac5){var _0x122d72=_0x4d1ac5[_0x65f7('0x11')];var _0x14c0b0=null;for(_0x14c0b0=0x0;_0x14c0b0<_0x122d72[_0x65f7('0x12')];_0x14c0b0++){if(_0x122d72[_0x14c0b0]['email']===_0x46d2f6[_0x65f7('0x13')]){_0x46d2f6['adminId']=_0x122d72[_0x14c0b0]['id'];_0x191b78=!![];}}if(_0x191b78){logger[_0x65f7('0xe')]('Admin\x20found:',_0x46d2f6['adminId']);_0x5965d1(_0x46d2f6);}else{_0x9ec43({'statusCode':0x194,'message':'Requested\x20Resource\x20not\x20Found'});}}else{_0x9ec43({'statusCode':0x194,'message':_0x65f7('0x14')});}})[_0x65f7('0x15')](function(_0x1cb633){logger[_0x65f7('0x16')]('['+[_0x29e5ac['toUpperCase']()]+']',_0x1cb633[_0x65f7('0x17')]);_0x9ec43(_0x1cb633);});});}function getUser(_0x40c2fb,_0x26fe97,_0x35c696){return function(_0xdedb49){return new Promise(function(_0x407bd1,_0x472d95){var _0x15cb51={'method':_0x65f7('0xc'),'uri':_0x35c696+_0x65f7('0x18'),'json':!![]};_0x15cb51[_0x65f7('0xd')]=_0x26fe97;logger[_0x65f7('0xe')]('Getting\x20user\x20list');return rp(_0x15cb51)[_0x65f7('0x10')](function(_0x11141d){if(_0x11141d){var _0x589f5b=_0x11141d[_0x65f7('0x11')];var _0x48bcf1=![];var _0x33a842=null;if(_0xdedb49['agentEmail']!==null){logger[_0x65f7('0xe')](_0x65f7('0x19'),_0xdedb49['agentEmail']);_0xdedb49[_0x65f7('0x1a')]=_0xdedb49[_0x65f7('0x1b')];for(_0x33a842=0x0;_0x33a842<_0x589f5b[_0x65f7('0x12')];_0x33a842++){if(_0x589f5b[_0x33a842]['email']===_0xdedb49[_0x65f7('0x1b')]){_0x48bcf1=!![];_0xdedb49['userId']=_0x589f5b[_0x33a842]['id'];logger['info'](_0x65f7('0x1c'),_0xdedb49[_0x65f7('0x1d')]);}}}if(!_0x48bcf1){logger[_0x65f7('0xe')](_0x65f7('0x1e'));_0xdedb49['userEmail']=_0xdedb49[_0x65f7('0x13')];_0xdedb49['userId']=_0xdedb49[_0x65f7('0x1f')];_0x48bcf1=!![];}if(_0x48bcf1){_0x407bd1(_0xdedb49);}else{_0x472d95({'statusCode':0x194,'message':_0x65f7('0x14')});}}else{_0x472d95({'statusCode':0x194,'message':_0x65f7('0x14')});}})['catch'](function(_0x5e7d71){logger['error']('['+[_0x40c2fb[_0x65f7('0x20')]()]+']',_0x5e7d71[_0x65f7('0x17')]);_0x472d95(_0x5e7d71);});});};}function searchContact(_0x408473,_0x42c12c,_0x5bdd84,_0x46d3be){return new Promise(function(_0x26576a,_0x3c3eab){var _0x35a4cd={'method':_0x65f7('0xc'),'headers':_0x42c12c,'uri':_0x408473+'/api/lookup?q='+_0x46d3be+'&f='+_0x5bdd84+'&entities=contact','json':!![]};rp(_0x35a4cd)[_0x65f7('0x10')](function(_0x4455a7){var _0x2ca638=_['find'](_0x4455a7[_0x65f7('0x21')]['contacts'],[_0x5bdd84,_0x46d3be]);_0x26576a(_0x2ca638);})['catch'](function(_0x5cff71){_0x3c3eab(_0x5cff71);});});}function getEndUser(_0x41ffd5,_0x367905,_0x2cca76){return function(_0x439847){return new Promise(function(_0x17e4c1,_0x2f7fe0){logger[_0x65f7('0xe')](util[_0x65f7('0x22')]('Searching\x20contact\x20with\x20phone\x20%s',_0x439847[_0x65f7('0x23')]));searchContact(_0x2cca76,_0x367905,_0x65f7('0x24'),_0x439847['contactNumber'])['then'](function(_0x5524cc){if(_0x5524cc){_0x439847[_0x65f7('0x25')]=_0x5524cc['id'];logger[_0x65f7('0xe')](_0x65f7('0x26'),_0x439847['endUserId']);return _0x17e4c1(_0x439847);}searchContact(_0x2cca76,_0x367905,_0x65f7('0x27'),_0x439847[_0x65f7('0x23')])['then'](function(_0x42b343){if(_0x42b343){_0x439847['endUserId']=_0x42b343['id'];logger['info'](_0x65f7('0x28'),_0x439847['endUserId']);return _0x17e4c1(_0x439847);}createEndUser(_0x439847,_0x41ffd5,_0x367905,_0x2cca76)[_0x65f7('0x10')](function(_0x5c7f34){logger[_0x65f7('0xe')]('Contact\x20created:',_0x5c7f34['endUserId']);return _0x17e4c1(_0x5c7f34);});});})[_0x65f7('0x15')](function(_0x3e0275){_0x2f7fe0(_0x3e0275);});});};}function createEndUser(_0x5bc0c2,_0x47bc31,_0x237941,_0x4570b1){return new Promise(function(_0x272116,_0xb7a52a){var _0x1d1a89=moment();var _0x4a3583={'method':_0x65f7('0x29'),'uri':_0x4570b1+_0x65f7('0x2a'),'body':{'contact':{'last_name':_0x5bc0c2[_0x65f7('0x23')],'work_number':_0x5bc0c2[_0x65f7('0x23')],'mobile_number':_0x5bc0c2[_0x65f7('0x23')],'owner_id':_0x5bc0c2[_0x65f7('0x1d')],'created_at':_0x1d1a89[_0x65f7('0x22')]('YYYY-MM-DDTHH:mm:ss')}},'json':!![]};_0x4a3583['headers']=_0x237941;logger[_0x65f7('0xe')](_0x65f7('0x2b'));return rp(_0x4a3583)['then'](function(_0x58f7eb){_0x5bc0c2[_0x65f7('0x25')]=_0x58f7eb['contact']['id'];_0x272116(_0x5bc0c2);})[_0x65f7('0x15')](function(_0x80021c){logger['error']('['+[_0x47bc31['toUpperCase']()]+']',_0x80021c[_0x65f7('0x17')]);_0xb7a52a(_0x80021c[_0x65f7('0x17')]);});});}function getTicket(_0x571433,_0x4b76a4,_0x268ce3,_0x128aa6,_0x593c22){return function(_0xf59638){logger[_0x65f7('0xe')](_0x65f7('0x2c'));return new Promise(function(_0x2f5f9c,_0x49adb9){var _0x9ed635=moment();var _0x3b12cd={'method':'POST','uri':_0x268ce3+_0x65f7('0x2d'),'body':{'title':intUtil[_0x65f7('0x2e')](_0x128aa6[_0x65f7('0x2f')],_0x593c22,'\x20'),'description':intUtil[_0x65f7('0x2e')](_0x128aa6[_0x65f7('0x30')],_0x593c22,'\x0a'),'owner_id':_0xf59638['userId'],'creater_id':_0xf59638[_0x65f7('0x1f')],'targetable_id':_0xf59638[_0x65f7('0x25')],'targetable_type':_0x65f7('0x31'),'created_at':_0x9ed635[_0x65f7('0x22')](_0x65f7('0x32')),'due_date':_0x9ed635[_0x65f7('0x33')](0x1e,'m')[_0x65f7('0x22')](_0x65f7('0x32'))},'json':!![]};_0x3b12cd['headers']=_0x4b76a4;return rp(_0x3b12cd)[_0x65f7('0x10')](function(_0x51f162){_0xf59638[_0x65f7('0x34')]=_0x51f162[_0x65f7('0x35')]['id'];logger['info'](_0x65f7('0x36'),_0xf59638['ticketId']);_0x2f5f9c(_0xf59638);})[_0x65f7('0x15')](function(_0x42c4aa){logger[_0x65f7('0x16')]('['+[_0x571433[_0x65f7('0x20')]()]+']',_0x42c4aa[_0x65f7('0x17')]);_0x49adb9(_0x42c4aa[_0x65f7('0x17')]);});});};}function emit(_0xd81a54,_0x4c6a2b,_0x490fef){var _0x5e4f63={'uri':_0xd81a54+_0x65f7('0x37')+_0x490fef};io['to'](util[_0x65f7('0x22')](_0x65f7('0x38'),_0x4c6a2b))[_0x65f7('0x39')]('trigger:browser:url',_0x5e4f63);}exports['cs']=function(_0x7a94b1,_0x10aa21,_0x58a792,_0x52c3c8,_0x489276,_0x3572d2,_0x2253ce,_0x1ae68a){var _0x162519={};var _0x51348c={'Authorization':'Token\x20token='+_0x3572d2[_0x65f7('0x3a')]};_0x3572d2['remoteUri']=intUtil['stripTrailingSlash'](_0x3572d2[_0x65f7('0x3b')]);_0x3572d2[_0x65f7('0x3c')]=intUtil[_0x65f7('0x3d')](_0x3572d2[_0x65f7('0x3c')]);var _0x181390=_0x3572d2['remoteUri'];_0x162519[_0x65f7('0x13')]=_0x3572d2[_0x65f7('0x3e')];_0x162519[_0x65f7('0x23')]=_0x1ae68a[_0x65f7('0x3f')]()===_0x65f7('0x40')?_0x10aa21[_0x65f7('0x41')]:_0x10aa21['calleridnum'];_0x162519[_0x65f7('0x42')]=_0x1ae68a===_0x65f7('0x43')||_0x1ae68a==='unmanaged'?'queue':_0x65f7('0x40');if(_0x52c3c8){_0x162519[_0x65f7('0x1b')]=_0x52c3c8[_0x65f7('0x44')];}var _0x52cfa7=util['format'](_0x65f7('0x45'),_0x3572d2[_0x65f7('0x3c')],_0x10aa21[_0x65f7('0x46')],md5(_0x10aa21[_0x65f7('0x46')]));if(_0x489276&&_0x489276[_0x65f7('0x47')]){logger[_0x65f7('0xe')](_0x65f7('0x48'),'Recording\x20is\x20enabled!');_0x10aa21[_0x65f7('0x49')]=_0x52cfa7;}else if(_0x2253ce&&_0x2253ce[_0x65f7('0x4a')]&&_0x2253ce[_0x65f7('0x4a')]!==_0x65f7('0x4b')){logger[_0x65f7('0xe')](_0x65f7('0x4c'),_0x65f7('0x4d'));_0x10aa21[_0x65f7('0x49')]=_0x52cfa7;}else{_0x10aa21[_0x65f7('0x49')]='';}return getAdminId(_0x162519,_0x1ae68a,_0x51348c,_0x181390)[_0x65f7('0x10')](getUser(_0x1ae68a,_0x51348c,_0x181390))[_0x65f7('0x10')](getEndUser(_0x1ae68a,_0x51348c,_0x181390))[_0x65f7('0x10')](getTicket(_0x1ae68a,_0x51348c,_0x181390,_0x58a792,_0x10aa21))[_0x65f7('0x10')](function(_0x57e2dc){logger[_0x65f7('0xe')](util['format']('The\x20ticket\x20ID\x20is:\x20%s',_0x57e2dc[_0x65f7('0x34')]));if(_0x1ae68a!==_0x65f7('0x4e')){logger[_0x65f7('0xe')]('['+[_0x1ae68a[_0x65f7('0x20')]()]+']',_0x65f7('0x4f'));emit(_0x181390,_0x52c3c8[_0x65f7('0x50')],_0x57e2dc[_0x65f7('0x25')]);}})[_0x65f7('0x15')](function(_0x1e5700){logger[_0x65f7('0x16')]('['+[_0x1ae68a[_0x65f7('0x20')]()]+_0x65f7('0x51'),util[_0x65f7('0x52')](_0x1e5700,{'showHidden':!![],'depth':null}));});}; \ No newline at end of file +var _0xcda6=['headers','Getting\x20admin\x20information','then','users','length','email','info','Admin\x20found:','Requested\x20Resource\x20not\x20Found','catch','error','toUpperCase','message','Getting\x20user\x20list','agentEmail','Getting\x20user\x20with\x20email','userEmail','userId','User\x20found:','adminEmail','&f=','&entities=contact','find','contacts','format','Searching\x20contact\x20with\x20phone\x20%s','mobile_number','endUserId','Contact\x20found\x20mobile_number:','work_number','contactNumber','Contact\x20found\x20work_number:','POST','/api/contacts','YYYY-MM-DDTHH:mm:ss','Contact\x20not\x20found,\x20creating\x20a\x20new\x20contact','contact','Creating\x20new\x20task','Subjects','getString','adminId','add','ticketId','task','Task\x20created:','/contacts/','user:%s','emit','trigger:browser:url','Token\x20token=','remoteUri','serverUrl','outbound','destcalleridnum','calleridnum','queue','unmanaged','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','recordingURL','recordingFormat','none','[OUTBOUND]','The\x20ticket\x20ID\x20is:\x20%s','Displaying\x20task\x20in\x20a\x20new\x20tab...',']\x20Error\x20running\x20Freshsales\x20integration','request-promise','util','moment','bluebird','../../../../config/logger','freshsales','redis','defaults','localhost','GET','/api/selector/owners'];(function(_0x326aff,_0x1f0296){var _0x5593cd=function(_0x202933){while(--_0x202933){_0x326aff['push'](_0x326aff['shift']());}};_0x5593cd(++_0x1f0296);}(_0xcda6,0x95));var _0x6cda=function(_0x2ca538,_0x4bfd20){_0x2ca538=_0x2ca538-0x0;var _0x5bae49=_0xcda6[_0x2ca538];return _0x5bae49;};'use strict';var _=require('lodash');var rp=require(_0x6cda('0x0'));var md5=require('md5');var util=require(_0x6cda('0x1'));var moment=require(_0x6cda('0x2'));var Promise=require(_0x6cda('0x3'));var Redis=require('ioredis');var intUtil=require('./util');var config=require('../../../../config/environment');var logger=require(_0x6cda('0x4'))(_0x6cda('0x5'));config[_0x6cda('0x6')]=_[_0x6cda('0x7')](config[_0x6cda('0x6')],{'host':_0x6cda('0x8'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config['redis']));function getAdminId(_0x50e01b,_0x2cc789,_0x273a1d,_0x1dae7f){return new Promise(function(_0x13c038,_0x2adf13){var _0x5b8c15=![];var _0x11cd0f={'method':_0x6cda('0x9'),'uri':_0x1dae7f+_0x6cda('0xa'),'json':!![]};_0x11cd0f[_0x6cda('0xb')]=_0x273a1d;logger['info'](_0x6cda('0xc'));return rp(_0x11cd0f)[_0x6cda('0xd')](function(_0x207bb6){if(_0x207bb6){var _0x540db6=_0x207bb6[_0x6cda('0xe')];var _0x37cc87=null;for(_0x37cc87=0x0;_0x37cc87<_0x540db6[_0x6cda('0xf')];_0x37cc87++){if(_0x540db6[_0x37cc87][_0x6cda('0x10')]===_0x50e01b['adminEmail']){_0x50e01b['adminId']=_0x540db6[_0x37cc87]['id'];_0x5b8c15=!![];}}if(_0x5b8c15){logger[_0x6cda('0x11')](_0x6cda('0x12'),_0x50e01b['adminId']);_0x13c038(_0x50e01b);}else{_0x2adf13({'statusCode':0x194,'message':_0x6cda('0x13')});}}else{_0x2adf13({'statusCode':0x194,'message':_0x6cda('0x13')});}})[_0x6cda('0x14')](function(_0x5d59f5){logger[_0x6cda('0x15')]('['+[_0x2cc789[_0x6cda('0x16')]()]+']',_0x5d59f5[_0x6cda('0x17')]);_0x2adf13(_0x5d59f5);});});}function getUser(_0x1eb3ee,_0x5b245e,_0x2869bb){return function(_0x4b8e30){return new Promise(function(_0x743102,_0x225651){var _0x50866b={'method':_0x6cda('0x9'),'uri':_0x2869bb+_0x6cda('0xa'),'json':!![]};_0x50866b[_0x6cda('0xb')]=_0x5b245e;logger[_0x6cda('0x11')](_0x6cda('0x18'));return rp(_0x50866b)[_0x6cda('0xd')](function(_0xdf771b){if(_0xdf771b){var _0x4830ad=_0xdf771b[_0x6cda('0xe')];var _0x2fa2ee=![];var _0x243fe2=null;if(_0x4b8e30[_0x6cda('0x19')]!==null){logger['info'](_0x6cda('0x1a'),_0x4b8e30[_0x6cda('0x19')]);_0x4b8e30[_0x6cda('0x1b')]=_0x4b8e30[_0x6cda('0x19')];for(_0x243fe2=0x0;_0x243fe2<_0x4830ad[_0x6cda('0xf')];_0x243fe2++){if(_0x4830ad[_0x243fe2]['email']===_0x4b8e30[_0x6cda('0x19')]){_0x2fa2ee=!![];_0x4b8e30[_0x6cda('0x1c')]=_0x4830ad[_0x243fe2]['id'];logger[_0x6cda('0x11')](_0x6cda('0x1d'),_0x4b8e30[_0x6cda('0x1c')]);}}}if(!_0x2fa2ee){logger[_0x6cda('0x11')]('Admin\x20selected');_0x4b8e30[_0x6cda('0x1b')]=_0x4b8e30[_0x6cda('0x1e')];_0x4b8e30['userId']=_0x4b8e30['adminId'];_0x2fa2ee=!![];}if(_0x2fa2ee){_0x743102(_0x4b8e30);}else{_0x225651({'statusCode':0x194,'message':_0x6cda('0x13')});}}else{_0x225651({'statusCode':0x194,'message':_0x6cda('0x13')});}})['catch'](function(_0x1e13a3){logger[_0x6cda('0x15')]('['+[_0x1eb3ee['toUpperCase']()]+']',_0x1e13a3[_0x6cda('0x17')]);_0x225651(_0x1e13a3);});});};}function searchContact(_0x5bb6d7,_0x141a87,_0x23bb12,_0x27e5d0){return new Promise(function(_0x2547f7,_0x581368){var _0x44077d={'method':_0x6cda('0x9'),'headers':_0x141a87,'uri':_0x5bb6d7+'/api/lookup?q='+_0x27e5d0+_0x6cda('0x1f')+_0x23bb12+_0x6cda('0x20'),'json':!![]};rp(_0x44077d)[_0x6cda('0xd')](function(_0xd920d4){var _0xf09031=_[_0x6cda('0x21')](_0xd920d4[_0x6cda('0x22')][_0x6cda('0x22')],[_0x23bb12,_0x27e5d0]);_0x2547f7(_0xf09031);})[_0x6cda('0x14')](function(_0x22221c){_0x581368(_0x22221c);});});}function getEndUser(_0x436df9,_0x17a2cf,_0x19f0ce){return function(_0x58cff7){return new Promise(function(_0xed35f6,_0x6c01ef){logger[_0x6cda('0x11')](util[_0x6cda('0x23')](_0x6cda('0x24'),_0x58cff7['contactNumber']));searchContact(_0x19f0ce,_0x17a2cf,_0x6cda('0x25'),_0x58cff7['contactNumber'])[_0x6cda('0xd')](function(_0x4bdc34){if(_0x4bdc34){_0x58cff7[_0x6cda('0x26')]=_0x4bdc34['id'];logger['info'](_0x6cda('0x27'),_0x58cff7[_0x6cda('0x26')]);return _0xed35f6(_0x58cff7);}searchContact(_0x19f0ce,_0x17a2cf,_0x6cda('0x28'),_0x58cff7[_0x6cda('0x29')])[_0x6cda('0xd')](function(_0x1a3744){if(_0x1a3744){_0x58cff7[_0x6cda('0x26')]=_0x1a3744['id'];logger[_0x6cda('0x11')](_0x6cda('0x2a'),_0x58cff7[_0x6cda('0x26')]);return _0xed35f6(_0x58cff7);}createEndUser(_0x58cff7,_0x436df9,_0x17a2cf,_0x19f0ce)[_0x6cda('0xd')](function(_0x24c1ba){logger['info']('Contact\x20created:',_0x24c1ba[_0x6cda('0x26')]);return _0xed35f6(_0x24c1ba);});});})['catch'](function(_0x390423){_0x6c01ef(_0x390423);});});};}function createEndUser(_0x1ba038,_0xaa7267,_0x19e892,_0xa9d428){return new Promise(function(_0x1282b8,_0x2a0584){var _0x16a3b5=moment();var _0x563c1a={'method':_0x6cda('0x2b'),'uri':_0xa9d428+_0x6cda('0x2c'),'body':{'contact':{'last_name':_0x1ba038[_0x6cda('0x29')],'work_number':_0x1ba038[_0x6cda('0x29')],'mobile_number':_0x1ba038[_0x6cda('0x29')],'owner_id':_0x1ba038[_0x6cda('0x1c')],'created_at':_0x16a3b5[_0x6cda('0x23')](_0x6cda('0x2d'))}},'json':!![]};_0x563c1a['headers']=_0x19e892;logger[_0x6cda('0x11')](_0x6cda('0x2e'));return rp(_0x563c1a)[_0x6cda('0xd')](function(_0x1b483c){_0x1ba038[_0x6cda('0x26')]=_0x1b483c[_0x6cda('0x2f')]['id'];_0x1282b8(_0x1ba038);})['catch'](function(_0x201a3e){logger[_0x6cda('0x15')]('['+[_0xaa7267[_0x6cda('0x16')]()]+']',_0x201a3e[_0x6cda('0x17')]);_0x2a0584(_0x201a3e[_0x6cda('0x17')]);});});}function getTicket(_0x4a70d7,_0x1307b5,_0x41d58b,_0xabe4fa,_0xec47fd){return function(_0x2d3281){logger[_0x6cda('0x11')](_0x6cda('0x30'));return new Promise(function(_0x2b4e74,_0x4a7511){var _0x1f6cf3=moment();var _0x2477c9={'method':_0x6cda('0x2b'),'uri':_0x41d58b+'/api/tasks','body':{'title':intUtil['getString'](_0xabe4fa[_0x6cda('0x31')],_0xec47fd,'\x20'),'description':intUtil[_0x6cda('0x32')](_0xabe4fa['Descriptions'],_0xec47fd,'\x0a'),'owner_id':_0x2d3281['userId'],'creater_id':_0x2d3281[_0x6cda('0x33')],'targetable_id':_0x2d3281[_0x6cda('0x26')],'targetable_type':'Contact','created_at':_0x1f6cf3[_0x6cda('0x23')](_0x6cda('0x2d')),'due_date':_0x1f6cf3[_0x6cda('0x34')](0x1e,'m')[_0x6cda('0x23')](_0x6cda('0x2d'))},'json':!![]};_0x2477c9[_0x6cda('0xb')]=_0x1307b5;return rp(_0x2477c9)['then'](function(_0x2ed74c){_0x2d3281[_0x6cda('0x35')]=_0x2ed74c[_0x6cda('0x36')]['id'];logger['info'](_0x6cda('0x37'),_0x2d3281['ticketId']);_0x2b4e74(_0x2d3281);})[_0x6cda('0x14')](function(_0x5c8134){logger[_0x6cda('0x15')]('['+[_0x4a70d7[_0x6cda('0x16')]()]+']',_0x5c8134['message']);_0x4a7511(_0x5c8134[_0x6cda('0x17')]);});});};}function emit(_0x385633,_0x2a0d9c,_0x4dabf6){var _0x253294={'uri':_0x385633+_0x6cda('0x38')+_0x4dabf6};io['to'](util[_0x6cda('0x23')](_0x6cda('0x39'),_0x2a0d9c))[_0x6cda('0x3a')](_0x6cda('0x3b'),_0x253294);}exports['cs']=function(_0xa17acc,_0x212af6,_0x32a325,_0x313aa9,_0x28dd91,_0x307cd4,_0x16e45e,_0x592b23){var _0x5b2613={};var _0x3bdf89={'Authorization':_0x6cda('0x3c')+_0x307cd4['apiKey']};_0x307cd4[_0x6cda('0x3d')]=intUtil['stripTrailingSlash'](_0x307cd4[_0x6cda('0x3d')]);_0x307cd4[_0x6cda('0x3e')]=intUtil['stripTrailingSlash'](_0x307cd4[_0x6cda('0x3e')]);var _0x35275f=_0x307cd4['remoteUri'];_0x5b2613[_0x6cda('0x1e')]=_0x307cd4['username'];_0x5b2613[_0x6cda('0x29')]=_0x592b23['toLowerCase']()===_0x6cda('0x3f')?_0x212af6[_0x6cda('0x40')]:_0x212af6[_0x6cda('0x41')];_0x5b2613['callDirection']=_0x592b23===_0x6cda('0x42')||_0x592b23===_0x6cda('0x43')?_0x6cda('0x42'):_0x6cda('0x3f');if(_0x313aa9){_0x5b2613[_0x6cda('0x19')]=_0x313aa9[_0x6cda('0x10')];}var _0x3aef58=util[_0x6cda('0x23')](_0x6cda('0x44'),_0x307cd4[_0x6cda('0x3e')],_0x212af6[_0x6cda('0x45')],md5(_0x212af6[_0x6cda('0x45')]));if(_0x28dd91&&_0x28dd91[_0x6cda('0x46')]){logger['info'](_0x6cda('0x47'),_0x6cda('0x48'));_0x212af6[_0x6cda('0x49')]=_0x3aef58;}else if(_0x16e45e&&_0x16e45e[_0x6cda('0x4a')]&&_0x16e45e['recordingFormat']!==_0x6cda('0x4b')){logger['info'](_0x6cda('0x4c'),_0x6cda('0x48'));_0x212af6[_0x6cda('0x49')]=_0x3aef58;}else{_0x212af6['recordingURL']='';}return getAdminId(_0x5b2613,_0x592b23,_0x3bdf89,_0x35275f)[_0x6cda('0xd')](getUser(_0x592b23,_0x3bdf89,_0x35275f))[_0x6cda('0xd')](getEndUser(_0x592b23,_0x3bdf89,_0x35275f))[_0x6cda('0xd')](getTicket(_0x592b23,_0x3bdf89,_0x35275f,_0x32a325,_0x212af6))[_0x6cda('0xd')](function(_0xa76628){logger[_0x6cda('0x11')](util[_0x6cda('0x23')](_0x6cda('0x4d'),_0xa76628[_0x6cda('0x35')]));if(_0x592b23!==_0x6cda('0x43')){logger[_0x6cda('0x11')]('['+[_0x592b23[_0x6cda('0x16')]()]+']',_0x6cda('0x4e'));emit(_0x35275f,_0x313aa9['name'],_0xa76628[_0x6cda('0x26')]);}})[_0x6cda('0x14')](function(_0x5d1f06){logger[_0x6cda('0x15')]('['+[_0x592b23[_0x6cda('0x16')]()]+_0x6cda('0x4f'),util['inspect'](_0x5d1f06,{'showHidden':!![],'depth':null}));});}; \ No newline at end of file diff --git a/server/services/ami/trigger/integration/index.js b/server/services/ami/trigger/integration/index.js index 8c030b5..0e70c3d 100644 --- a/server/services/ami/trigger/integration/index.js +++ b/server/services/ami/trigger/integration/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2d8e=['./zendesk','./salesforce','./sugarcrm','./freshdesk','./zoho','./desk','./vtiger','./dynamics365','salesforce','sugarcrm','freshdesk','zoho','desk','dynamics365','freshsales','servicenow','exec','includes','data1','toLowerCase','data2','find','Configurations','data3','queue','routeId','outbound','unmanaged','zendesk','unknown\x20integration','error','format','%s\x20configuration\x20#%s\x20not\x20found','../../../../config/logger','[EXEC]','%s\x20account\x20#%s\x20not\x20found','lodash','util'];(function(_0x4fd426,_0xd610c0){var _0x3dc689=function(_0x4c92ba){while(--_0x4c92ba){_0x4fd426['push'](_0x4fd426['shift']());}};_0x3dc689(++_0xd610c0);}(_0x2d8e,0x17a));var _0xe2d8=function(_0x3086c8,_0x5d1940){_0x3086c8=_0x3086c8-0x0;var _0x26ff3c=_0x2d8e[_0x3086c8];return _0x26ff3c;};'use strict';var _=require(_0xe2d8('0x0'));var util=require(_0xe2d8('0x1'));var zendesk=require(_0xe2d8('0x2'));var salesforce=require(_0xe2d8('0x3'));var sugarcrm=require(_0xe2d8('0x4'));var freshdesk=require(_0xe2d8('0x5'));var zoho=require(_0xe2d8('0x6'));var desk=require(_0xe2d8('0x7'));var vtiger=require(_0xe2d8('0x8'));var servicenow=require('./servicenow');var dynamics365=require(_0xe2d8('0x9'));var freshsales=require('./freshsales');var integrations=['zendesk',_0xe2d8('0xa'),_0xe2d8('0xb'),_0xe2d8('0xc'),_0xe2d8('0xd'),_0xe2d8('0xe'),'vtiger',_0xe2d8('0xf'),_0xe2d8('0x10'),_0xe2d8('0x11')];exports[_0xe2d8('0x12')]=function(_0x3ce1fa,_0x4d0f5a,_0x31dcc3,_0x7f732a,_0x368b33,_0x340938){if(_0x31dcc3){if(_[_0xe2d8('0x13')](integrations,_0x3ce1fa[_0xe2d8('0x14')][_0xe2d8('0x15')]())){try{var _0x19a96d=null;var _0x44f65f='';var _0xebe98c=_0x31dcc3[_0x3ce1fa[_0xe2d8('0x14')][_0xe2d8('0x15')]()];if(_0xebe98c){var _0x418301=_0xebe98c[_0x3ce1fa[_0xe2d8('0x16')]];if(_0x418301){var _0x372dc2=_[_0xe2d8('0x17')](_0x418301[_0xe2d8('0x18')],{'id':parseInt(_0x3ce1fa[_0xe2d8('0x19')],0xa)});if(_0x372dc2){if(_0x7f732a){if(_0x368b33&&_0x4d0f5a[_0xe2d8('0x1a')]){_0x44f65f=_0xe2d8('0x1a');}else if(_0x4d0f5a[_0xe2d8('0x1b')]){_0x44f65f=_0xe2d8('0x1c');}else{console['log']('EVENT\x20UNKNOWN',_0x4d0f5a);}}else{_0x44f65f=_0xe2d8('0x1d');}switch(_0x3ce1fa[_0xe2d8('0x14')][_0xe2d8('0x15')]()){case _0xe2d8('0x1e'):zendesk[_0x44f65f](_0x3ce1fa,_0x4d0f5a,_0x372dc2,_0x7f732a,_0x368b33,_0x418301,_0x340938);break;case _0xe2d8('0xa'):salesforce[_0x44f65f](_0x3ce1fa,_0x4d0f5a,_0x372dc2,_0x7f732a,_0x368b33,_0x418301,_0x340938);break;case _0xe2d8('0xb'):sugarcrm[_0x44f65f](_0x3ce1fa,_0x4d0f5a,_0x372dc2,_0x7f732a,_0x368b33,_0x418301,_0x340938);break;case _0xe2d8('0xc'):freshdesk[_0x44f65f](_0x3ce1fa,_0x4d0f5a,_0x372dc2,_0x7f732a,_0x368b33,_0x418301,_0x340938);break;case'zoho':zoho[_0x44f65f](_0x3ce1fa,_0x4d0f5a,_0x372dc2,_0x7f732a,_0x368b33,_0x418301,_0x340938);break;case _0xe2d8('0xe'):desk[_0x44f65f](_0x3ce1fa,_0x4d0f5a,_0x372dc2,_0x7f732a,_0x368b33,_0x418301,_0x340938);break;case'vtiger':vtiger[_0x44f65f](_0x3ce1fa,_0x4d0f5a,_0x372dc2,_0x7f732a,_0x368b33,_0x418301,_0x340938);break;case'freshsales':freshsales['cs'](_0x3ce1fa,_0x4d0f5a,_0x372dc2,_0x7f732a,_0x368b33,_0x418301,_0x340938,_0x44f65f);break;case _0xe2d8('0x11'):servicenow['cs'](_0x3ce1fa,_0x4d0f5a,_0x372dc2,_0x7f732a,_0x368b33,_0x418301,_0x340938,_0x44f65f);break;case _0xe2d8('0xf'):dynamics365['cs'](_0x3ce1fa,_0x4d0f5a,_0x372dc2,_0x7f732a,_0x368b33,_0x418301,_0x340938,_0x44f65f);break;default:console['log'](_0xe2d8('0x1f'));}}else{_0x19a96d=require('../../../../config/logger')(_0x3ce1fa[_0xe2d8('0x14')][_0xe2d8('0x15')]());_0x19a96d[_0xe2d8('0x20')]('[EXEC]',util[_0xe2d8('0x21')](_0xe2d8('0x22'),_0x3ce1fa[_0xe2d8('0x14')]['toLowerCase'](),_0x3ce1fa[_0xe2d8('0x19')]));}}else{_0x19a96d=require(_0xe2d8('0x23'))(_0x3ce1fa[_0xe2d8('0x14')][_0xe2d8('0x15')]());_0x19a96d['error'](_0xe2d8('0x24'),util[_0xe2d8('0x21')](_0xe2d8('0x25'),_0x3ce1fa['data1'][_0xe2d8('0x15')](),_0x3ce1fa[_0xe2d8('0x16')]));}}else{}}catch(_0x10f0a7){console['error'](_0x10f0a7);}}}}; \ No newline at end of file +var _0xbb31=['queue','outbound','EVENT\x20UNKNOWN','salesforce','servicenow','log','unknown\x20integration','../../../../config/logger','error','[EXEC]','format','lodash','util','./zendesk','./sugarcrm','./freshdesk','./zoho','./vtiger','./servicenow','./dynamics365','zendesk','sugarcrm','freshdesk','zoho','desk','vtiger','dynamics365','freshsales','exec','includes','data1','toLowerCase','data2','data3'];(function(_0x1872bb,_0x139eff){var _0x8566be=function(_0x1c663c){while(--_0x1c663c){_0x1872bb['push'](_0x1872bb['shift']());}};_0x8566be(++_0x139eff);}(_0xbb31,0x1e7));var _0x1bb3=function(_0x535cac,_0x39943f){_0x535cac=_0x535cac-0x0;var _0x2f2541=_0xbb31[_0x535cac];return _0x2f2541;};'use strict';var _=require(_0x1bb3('0x0'));var util=require(_0x1bb3('0x1'));var zendesk=require(_0x1bb3('0x2'));var salesforce=require('./salesforce');var sugarcrm=require(_0x1bb3('0x3'));var freshdesk=require(_0x1bb3('0x4'));var zoho=require(_0x1bb3('0x5'));var desk=require('./desk');var vtiger=require(_0x1bb3('0x6'));var servicenow=require(_0x1bb3('0x7'));var dynamics365=require(_0x1bb3('0x8'));var freshsales=require('./freshsales');var integrations=[_0x1bb3('0x9'),'salesforce',_0x1bb3('0xa'),_0x1bb3('0xb'),_0x1bb3('0xc'),_0x1bb3('0xd'),_0x1bb3('0xe'),_0x1bb3('0xf'),_0x1bb3('0x10'),'servicenow'];exports[_0x1bb3('0x11')]=function(_0x5a415a,_0x2b340e,_0x15a1e5,_0x3074cc,_0x4643b1,_0x28da19){if(_0x15a1e5){if(_[_0x1bb3('0x12')](integrations,_0x5a415a[_0x1bb3('0x13')][_0x1bb3('0x14')]())){try{var _0x5e4501=null;var _0x3b7b2f='';var _0x3c115e=_0x15a1e5[_0x5a415a[_0x1bb3('0x13')][_0x1bb3('0x14')]()];if(_0x3c115e){var _0x214169=_0x3c115e[_0x5a415a[_0x1bb3('0x15')]];if(_0x214169){var _0x308b95=_['find'](_0x214169['Configurations'],{'id':parseInt(_0x5a415a[_0x1bb3('0x16')],0xa)});if(_0x308b95){if(_0x3074cc){if(_0x4643b1&&_0x2b340e[_0x1bb3('0x17')]){_0x3b7b2f=_0x1bb3('0x17');}else if(_0x2b340e['routeId']){_0x3b7b2f=_0x1bb3('0x18');}else{console['log'](_0x1bb3('0x19'),_0x2b340e);}}else{_0x3b7b2f='unmanaged';}switch(_0x5a415a['data1'][_0x1bb3('0x14')]()){case'zendesk':zendesk[_0x3b7b2f](_0x5a415a,_0x2b340e,_0x308b95,_0x3074cc,_0x4643b1,_0x214169,_0x28da19);break;case _0x1bb3('0x1a'):salesforce[_0x3b7b2f](_0x5a415a,_0x2b340e,_0x308b95,_0x3074cc,_0x4643b1,_0x214169,_0x28da19);break;case _0x1bb3('0xa'):sugarcrm[_0x3b7b2f](_0x5a415a,_0x2b340e,_0x308b95,_0x3074cc,_0x4643b1,_0x214169,_0x28da19);break;case _0x1bb3('0xb'):freshdesk[_0x3b7b2f](_0x5a415a,_0x2b340e,_0x308b95,_0x3074cc,_0x4643b1,_0x214169,_0x28da19);break;case _0x1bb3('0xc'):zoho[_0x3b7b2f](_0x5a415a,_0x2b340e,_0x308b95,_0x3074cc,_0x4643b1,_0x214169,_0x28da19);break;case _0x1bb3('0xd'):desk[_0x3b7b2f](_0x5a415a,_0x2b340e,_0x308b95,_0x3074cc,_0x4643b1,_0x214169,_0x28da19);break;case _0x1bb3('0xe'):vtiger[_0x3b7b2f](_0x5a415a,_0x2b340e,_0x308b95,_0x3074cc,_0x4643b1,_0x214169,_0x28da19);break;case _0x1bb3('0x10'):freshsales['cs'](_0x5a415a,_0x2b340e,_0x308b95,_0x3074cc,_0x4643b1,_0x214169,_0x28da19,_0x3b7b2f);break;case _0x1bb3('0x1b'):servicenow['cs'](_0x5a415a,_0x2b340e,_0x308b95,_0x3074cc,_0x4643b1,_0x214169,_0x28da19,_0x3b7b2f);break;case _0x1bb3('0xf'):dynamics365['cs'](_0x5a415a,_0x2b340e,_0x308b95,_0x3074cc,_0x4643b1,_0x214169,_0x28da19,_0x3b7b2f);break;default:console[_0x1bb3('0x1c')](_0x1bb3('0x1d'));}}else{_0x5e4501=require(_0x1bb3('0x1e'))(_0x5a415a[_0x1bb3('0x13')][_0x1bb3('0x14')]());_0x5e4501[_0x1bb3('0x1f')](_0x1bb3('0x20'),util[_0x1bb3('0x21')]('%s\x20configuration\x20#%s\x20not\x20found',_0x5a415a[_0x1bb3('0x13')][_0x1bb3('0x14')](),_0x5a415a[_0x1bb3('0x16')]));}}else{_0x5e4501=require('../../../../config/logger')(_0x5a415a['data1'][_0x1bb3('0x14')]());_0x5e4501['error']('[EXEC]',util['format']('%s\x20account\x20#%s\x20not\x20found',_0x5a415a[_0x1bb3('0x13')]['toLowerCase'](),_0x5a415a[_0x1bb3('0x15')]));}}else{}}catch(_0x152f65){console[_0x1bb3('0x1f')](_0x152f65);}}}}; \ No newline at end of file diff --git a/server/services/ami/trigger/integration/salesforce.js b/server/services/ami/trigger/integration/salesforce.js index 8669449..c680cb6 100644 --- a/server/services/ami/trigger/integration/salesforce.js +++ b/server/services/ami/trigger/integration/salesforce.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x069e=['none','destcalleridname','destcalleridnum','Fields','[OUTBOUND]\x20Displaying\x20ticket\x20%s\x20to\x20agent\x20%s.\x20Integration\x20account\x20type\x20%s.','trigger:browser:url','instanceUrl','Salesforce\x20account\x20type\x20not\x20recognized','unmanaged','lastevent','toUpperCase',']\x20Integration\x20account\x20type\x20%s.','lodash','request-promise','md5','jsforce','util','ioredis','./util','../../../../config/environment','../../../../config/logger','salesforce','redis','defaults','localhost','socket.io-emitter','emit','assign','getString','Subjects','Descriptions','Task','ActivityDate','utc','IsReminderSet','IsRecurrence','contact','WhoId','endUserType','account','ticketType','lead','leadId','info','Association\x20between\x20Case\x20and\x20Lead\x20skipped','sobject','create','isNil','validateEmail','User','find','then','Email','Agent\x20%s\x20found.','Name','identity','resolve','display_name','Searching\x20enduser\x20with\x20phone\x20%s.\x20Serching\x20method\x20used\x20%s.','moduleSearch','contact_lead','cloneDeep','additionalSearchContact','merge','$or','Contact','length','additionalSearchLead','Lead','additionalSearchAccount','Account','execute','first','attributes','type','toLowerCase','Enduser\x20(%s)\x20with\x20phone\x20%s\x20found','Enduser\x20with\x20phone\x20%s\x20not\x20found','moduleCreate','Enduser\x20with\x20phone\x20%s.\x20Creating\x20method\x20used\x20%s.','LastName','','format','Caller\x20-\x20%s','Company','upperFirst','forEach','includes','string','idField','variable','variableName','toString','customVariable','Variable','name','password','concat','securityToken','Connection','remoteUri','clientId','clientSecret','login','Connection\x20established.','queue','stripTrailingSlash','serverUrl','monitor_format','Recording\x20is\x20enabled!','recordingURL','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','email','calleridname','calleridnum','[QUEUE]\x20Ticket\x20%s\x20created','[QUEUE]\x20Displaying\x20ticket\x20%s\x20to\x20agent\x20%s.\x20Integration\x20account\x20type\x20%s.','integrationTab','user:%s','trigger:salesforce:display','newTab','%s/%s/e','catch','error','[QUEUE]','outbound','recordingFormat'];(function(_0x3b5e9d,_0x5970dc){var _0x44681d=function(_0x306697){while(--_0x306697){_0x3b5e9d['push'](_0x3b5e9d['shift']());}};_0x44681d(++_0x5970dc);}(_0x069e,0x10c));var _0xe069=function(_0x203a88,_0x32521b){_0x203a88=_0x203a88-0x0;var _0x46e6ce=_0x069e[_0x203a88];return _0x46e6ce;};'use strict';var _=require(_0xe069('0x0'));var rp=require(_0xe069('0x1'));var moment=require('moment');var BPromise=require('bluebird');var md5=require(_0xe069('0x2'));var jsforce=require(_0xe069('0x3'));var util=require(_0xe069('0x4'));var Redis=require(_0xe069('0x5'));var intUtil=require(_0xe069('0x6'));var config=require(_0xe069('0x7'));var logger=require(_0xe069('0x8'))(_0xe069('0x9'));config[_0xe069('0xa')]=_[_0xe069('0xb')](config['redis'],{'host':_0xe069('0xc'),'port':0x18eb});var io=require(_0xe069('0xd'))(new Redis(config[_0xe069('0xa')]));function emit(_0x4a85db,_0x3da91c,_0x440872){io['to'](_0x4a85db)[_0xe069('0xe')](_0x3da91c,_0x440872);}function getTicket(_0x5c07cd,_0x339b6d,_0x1aac58,_0x3b3288,_0x376f83,_0x7734fa,_0x56e488,_0x213fdd){var _0x3070bf=Object[_0xe069('0xf')]({},{'OwnerId':_0x339b6d['id'],'Subject':intUtil[_0xe069('0x10')](_0x3b3288[_0xe069('0x11')],_0x376f83,'\x20'),'Description':intUtil['getString'](_0x3b3288[_0xe069('0x12')],_0x376f83,'\x0a')},getCustomFields(_0x7734fa,_0x376f83));if(_0x1aac58){if(_0x3b3288['ticketType']===_0xe069('0x13')){_0x3070bf[_0xe069('0x14')]=moment[_0xe069('0x15')]();_0x3070bf[_0xe069('0x16')]=![];_0x3070bf[_0xe069('0x17')]=![];if(_0x1aac58['endUserType']===_0xe069('0x18')||_0x1aac58['endUserType']==='lead'){_0x3070bf[_0xe069('0x19')]=_0x1aac58['id'];}else if(_0x1aac58[_0xe069('0x1a')]===_0xe069('0x1b')){_0x3070bf['WhatId']=_0x1aac58['id'];}}else if(_0x3b3288[_0xe069('0x1c')]==='Case'){if(_0x1aac58[_0xe069('0x1a')]===_0xe069('0x18')){_0x3070bf['ContactId']=_0x1aac58['id'];}else if(_0x1aac58[_0xe069('0x1a')]===_0xe069('0x1b')){_0x3070bf['AccountId']=_0x1aac58['id'];}else if(_0x1aac58[_0xe069('0x1a')]===_0xe069('0x1d')&&_0x3b3288[_0xe069('0x1e')]){_0x3070bf[_0x3b3288['leadId']]=_0x1aac58['id'];}else{logger[_0xe069('0x1f')](_0xe069('0x20'));}}}return _0x56e488[_0xe069('0x21')](_0x3b3288[_0xe069('0x1c')])[_0xe069('0x22')](_0x3070bf);}function getUser(_0x47f1a3,_0xccd495,_0x2e67ee){if(!_[_0xe069('0x23')](_0xccd495)&&intUtil[_0xe069('0x24')](_0xccd495)){var _0x1df30d={'Email':_0xccd495};var _0x15b931={'Id':!![],'Username':!![],'Name':!![],'Email':!![]};return _0x2e67ee[_0xe069('0x21')](_0xe069('0x25'))[_0xe069('0x26')](_0x1df30d,_0x15b931)['execute']()[_0xe069('0x27')](function(_0x5aed5c){if(_0x5aed5c['length']){var _0x3f1fe0=_[_0xe069('0x26')](_0x5aed5c,function(_0x580307){return _0x580307[_0xe069('0x28')]===_0xccd495;});if(_0x3f1fe0){logger[_0xe069('0x1f')](_0xe069('0x29'),_0xccd495);return BPromise['resolve']({'id':_0x3f1fe0['Id'],'name':_0x3f1fe0[_0xe069('0x2a')]});}}else{logger[_0xe069('0x1f')]('Agent\x20%s\x20not\x20found.\x20Switch\x20to\x20the\x20admin\x20account.',_0xccd495);return _0x2e67ee[_0xe069('0x2b')]()['then'](function(_0x575b3b){return BPromise[_0xe069('0x2c')]({'id':_0x575b3b['user_id'],'name':_0x575b3b[_0xe069('0x2d')]});});}});}else{logger[_0xe069('0x1f')]('Agent\x20%s\x20not\x20found.\x20Switch\x20to\x20the\x20admin\x20account.',_0xccd495);return _0x2e67ee[_0xe069('0x2b')]()['then'](function(_0x2fb9a0){return BPromise['resolve']({'id':_0x2fb9a0['user_id'],'name':_0x2fb9a0[_0xe069('0x2d')]});});}}function getEndUser(_0x401554,_0x1ae055,_0x219b14,_0x404e73,_0x51d0dd){var _0x4c4719={'$or':{'Phone':_0x404e73}};var _0x2021fe={'Id':!![],'Name':!![],'Phone':!![]};return BPromise['resolve']()[_0xe069('0x27')](function(){logger[_0xe069('0x1f')](_0xe069('0x2e'),_0x404e73,_0x1ae055[_0xe069('0x2f')]);switch(_0x1ae055[_0xe069('0x2f')]){case _0xe069('0x30'):var _0x2315d1=_[_0xe069('0x31')](_0x4c4719);if(_0x1ae055['additionalSearchContact']){var _0x250672={};_0x250672[_0x1ae055[_0xe069('0x32')]]=_0x404e73;_[_0xe069('0x33')](_0x2315d1[_0xe069('0x34')],_0x250672);}return _0x51d0dd['sobject'](_0xe069('0x35'))[_0xe069('0x26')](_0x2315d1,_0x2021fe)['execute']()['then'](function(_0xa4caa7){if(_0xa4caa7&&_0xa4caa7[_0xe069('0x36')]){return _0xa4caa7;}else{var _0x5eb798=_['cloneDeep'](_0x4c4719);if(_0x1ae055[_0xe069('0x37')]){var _0x401f00={};_0x401f00[_0x1ae055[_0xe069('0x37')]]=_0x404e73;_[_0xe069('0x33')](_0x5eb798['$or'],_0x401f00);}return _0x51d0dd['sobject'](_0xe069('0x38'))[_0xe069('0x26')](_0x5eb798,_0x2021fe);}});case'account_contact_lead':var _0x2bd1be=_[_0xe069('0x31')](_0x4c4719);if(_0x1ae055[_0xe069('0x39')]){var _0x250672={};_0x250672[_0x1ae055[_0xe069('0x39')]]=_0x404e73;_['merge'](_0x2bd1be[_0xe069('0x34')],_0x250672);}return _0x51d0dd[_0xe069('0x21')](_0xe069('0x3a'))[_0xe069('0x26')](_0x2bd1be,_0x2021fe)['execute']()['then'](function(_0x1c57b5){if(_0x1c57b5&&_0x1c57b5['length']){return _0x1c57b5;}else{var _0x557ade=_['cloneDeep'](_0x4c4719);if(_0x1ae055['additionalSearchContact']){var _0x11995d={};_0x11995d[_0x1ae055[_0xe069('0x32')]]=_0x404e73;_[_0xe069('0x33')](_0x557ade[_0xe069('0x34')],_0x11995d);}return _0x51d0dd[_0xe069('0x21')](_0xe069('0x35'))['find'](_0x557ade,_0x2021fe)['then'](function(_0x6eaf6e){if(_0x6eaf6e&&_0x6eaf6e[_0xe069('0x36')]){return _0x6eaf6e;}else{var _0x39a9f0=_[_0xe069('0x31')](_0x4c4719);if(_0x1ae055[_0xe069('0x37')]){var _0x1e23a0={};_0x1e23a0[_0x1ae055[_0xe069('0x37')]]=_0x404e73;_[_0xe069('0x33')](_0x39a9f0[_0xe069('0x34')],_0x1e23a0);}return _0x51d0dd[_0xe069('0x21')](_0xe069('0x38'))[_0xe069('0x26')](_0x39a9f0,_0x2021fe);}});}});case _0xe069('0x18'):var _0x2315d1=_[_0xe069('0x31')](_0x4c4719);if(_0x1ae055['additionalSearchContact']){var _0x250672={};_0x250672[_0x1ae055['additionalSearchContact']]=_0x404e73;_[_0xe069('0x33')](_0x2315d1[_0xe069('0x34')],_0x250672);}return _0x51d0dd['sobject'](_0xe069('0x35'))[_0xe069('0x26')](_0x2315d1,_0x2021fe)[_0xe069('0x3b')]();case _0xe069('0x1d'):var _0x5386a3=_[_0xe069('0x31')](_0x4c4719);if(_0x1ae055[_0xe069('0x37')]){var _0x250672={};_0x250672[_0x1ae055[_0xe069('0x37')]]=_0x404e73;_[_0xe069('0x33')](_0x5386a3[_0xe069('0x34')],_0x250672);}return _0x51d0dd[_0xe069('0x21')](_0xe069('0x38'))[_0xe069('0x26')](_0x5386a3,_0x2021fe);case _0xe069('0x1b'):var _0x2bd1be=_[_0xe069('0x31')](_0x4c4719);if(_0x1ae055[_0xe069('0x39')]){var _0x250672={};_0x250672[_0x1ae055[_0xe069('0x39')]]=_0x404e73;_['merge'](_0x2bd1be[_0xe069('0x34')],_0x250672);}return _0x51d0dd[_0xe069('0x21')](_0xe069('0x3a'))[_0xe069('0x26')](_0x2bd1be,_0x2021fe);default:return null;}})[_0xe069('0x27')](function(_0x4266f9){if(_0x4266f9&&_0x4266f9[_0xe069('0x36')]){var _0x2786c1=_[_0xe069('0x3c')](_0x4266f9);if(_0x2786c1){return BPromise['resolve']({'id':_0x2786c1['Id'],'name':_0x2786c1[_0xe069('0x2a')],'phone':_0x2786c1['Phone'],'endUserType':_0x2786c1[_0xe069('0x3d')][_0xe069('0x3e')][_0xe069('0x3f')]()});}}})[_0xe069('0x27')](function(_0x3e52a0){if(_0x3e52a0){logger[_0xe069('0x1f')](_0xe069('0x40'),_0x3e52a0['endUserType'],_0x404e73);return BPromise[_0xe069('0x2c')](_0x3e52a0);}else{logger['info'](_0xe069('0x41'),_0x404e73);var _0x18f017={'Phone':_0x404e73};if(_0x1ae055[_0xe069('0x42')]){if(_0x1ae055['moduleCreate']===_0xe069('0x18')){logger['info'](_0xe069('0x43'),_0x404e73,_0x1ae055[_0xe069('0x42')]);_0x18f017[_0xe069('0x44')]=_0x219b14!==_0xe069('0x45')?_0x219b14:util[_0xe069('0x46')](_0xe069('0x47'),_0x404e73);}else if(_0x1ae055['moduleCreate']===_0xe069('0x1d')){logger['info'](_0xe069('0x43'),_0x404e73,_0x1ae055[_0xe069('0x42')]);_0x18f017[_0xe069('0x44')]=_0x219b14!==_0xe069('0x45')?_0x219b14:util[_0xe069('0x46')](_0xe069('0x47'),_0x404e73);_0x18f017[_0xe069('0x48')]='No\x20Company';}else if(_0x1ae055[_0xe069('0x42')]===_0xe069('0x1b')){logger['info'](_0xe069('0x43'),_0x404e73,_0x1ae055[_0xe069('0x42')]);_0x18f017['Name']=_0x219b14!==_0xe069('0x45')?_0x219b14:util[_0xe069('0x46')](_0xe069('0x47'),_0x404e73);}else{return null;}}return _0x51d0dd['sobject'](_[_0xe069('0x49')](_0x1ae055[_0xe069('0x42')]))['create'](_0x18f017)[_0xe069('0x27')](function(_0x561913){return BPromise[_0xe069('0x2c')]({'id':_0x561913['id'],'endUserType':_0x1ae055[_0xe069('0x42')]});});}});}function getCustomFields(_0x5ade3c,_0x4d87d5){var _0x14293f={};if(_0x5ade3c[_0xe069('0x36')]>0x0){_[_0xe069('0x4a')](_0x5ade3c,function(_0x57703b){if(_[_0xe069('0x4b')]([_0xe069('0x4c'),'picklist'],_0x57703b[_0xe069('0x3e')])&&_0x57703b[_0xe069('0x4d')]){_0x14293f[_0x57703b['idField']]=_0x57703b['content']['toString']();}else if(_0x57703b[_0xe069('0x3e')]===_0xe069('0x4e')&&_0x57703b[_0xe069('0x4f')]&&_0x57703b[_0xe069('0x4d')]){_0x4d87d5[_0x57703b['variableName']]&&(_0x14293f[_0x57703b[_0xe069('0x4d')]]=_0x4d87d5[_0x57703b[_0xe069('0x4f')]][_0xe069('0x50')]());}else if(_0x57703b['type']===_0xe069('0x51')&&_0x57703b[_0xe069('0x52')]&&_0x57703b['Variable'][_0xe069('0x53')]&&_0x57703b['idField']){_0x4d87d5[_0x57703b['Variable'][_0xe069('0x53')][_0xe069('0x3f')]()]&&(_0x14293f[_0x57703b[_0xe069('0x4d')]]=_0x4d87d5[_0x57703b[_0xe069('0x52')][_0xe069('0x53')][_0xe069('0x3f')]()][_0xe069('0x50')]());}});}return _0x14293f;}function getConnection(_0x306ab2){var _0x2117df=_0x306ab2[_0xe069('0x54')][_0xe069('0x55')](_0x306ab2[_0xe069('0x56')]);var _0x4a8a24=new jsforce[(_0xe069('0x57'))]({'oauth2':{'loginUrl':_0x306ab2[_0xe069('0x58')]||'https://login.salesforce.com','clientId':_0x306ab2[_0xe069('0x59')],'clientSecret':_0x306ab2[_0xe069('0x5a')]}});return _0x4a8a24[_0xe069('0x5b')](_0x306ab2['username'],_0x2117df)[_0xe069('0x27')](function(){logger[_0xe069('0x1f')](_0xe069('0x5c'));return _0x4a8a24;});}exports[_0xe069('0x5d')]=function(_0x424640,_0x280795,_0xc82bb,_0x59eb06,_0x5a11f5,_0x457b4a){var _0x112a12,_0x1f09f8,_0x39360e,_0x654104;_0x457b4a['serverUrl']=intUtil[_0xe069('0x5e')](_0x457b4a[_0xe069('0x5f')]);_0x457b4a[_0xe069('0x58')]=intUtil[_0xe069('0x5e')](_0x457b4a['remoteUri']);if(_0x5a11f5&&_0x5a11f5[_0xe069('0x60')]){logger['info']('[QUEUE]',_0xe069('0x61'));_0x280795[_0xe069('0x62')]=util[_0xe069('0x46')](_0xe069('0x63'),_0x457b4a[_0xe069('0x5f')],_0x280795[_0xe069('0x64')],md5(_0x280795[_0xe069('0x64')]));}else{_0x280795[_0xe069('0x62')]='';}return getConnection(_0x457b4a)[_0xe069('0x27')](function(_0x460833){_0x654104=_0x460833;return getUser(_0x457b4a,_0x59eb06[_0xe069('0x65')],_0x654104);})[_0xe069('0x27')](function(_0x2f68ca){_0x112a12=_0x2f68ca;return getEndUser(_0x457b4a,_0xc82bb,_0x280795[_0xe069('0x66')],_0x280795[_0xe069('0x67')],_0x654104);})[_0xe069('0x27')](function(_0x32796b){_0x1f09f8=_0x32796b;return getTicket(_0x457b4a,_0x112a12,_0x1f09f8,_0xc82bb,_0x280795,_0xc82bb['Fields'],_0x654104,'queue');})[_0xe069('0x27')](function(_0x122e93){_0x39360e=_0x122e93;logger['info'](_0xe069('0x68'),_0x39360e['id']);logger['info'](_0xe069('0x69'),_0x39360e['id'],_0x59eb06[_0xe069('0x53')],_0x457b4a[_0xe069('0x3e')]);switch(_0x457b4a[_0xe069('0x3e')]){case _0xe069('0x6a'):emit(util[_0xe069('0x46')](_0xe069('0x6b'),_0x59eb06[_0xe069('0x53')]),_0xe069('0x6c'),{'recordId':_0x39360e['id']});break;case _0xe069('0x6d'):emit(util[_0xe069('0x46')]('user:%s',_0x59eb06['name']),'trigger:browser:url',{'uri':util[_0xe069('0x46')](_0xe069('0x6e'),_0x654104['instanceUrl'],_0x39360e['id'])});break;default:logger['error']('[QUEUE]\x20Salesforce\x20account\x20type\x20not\x20recognized.');}})[_0xe069('0x6f')](function(_0x544783){logger[_0xe069('0x70')](_0xe069('0x71'),_0x544783);});};exports[_0xe069('0x72')]=function(_0x2539b5,_0x313362,_0x5ddf49,_0x42ace6,_0x50a703,_0x3e864b,_0x10aead){var _0xaf10e7,_0x5b92db,_0x2df24e,_0x587ca1;_0x3e864b[_0xe069('0x5f')]=intUtil['stripTrailingSlash'](_0x3e864b[_0xe069('0x5f')]);_0x3e864b[_0xe069('0x58')]=intUtil[_0xe069('0x5e')](_0x3e864b[_0xe069('0x58')]);if(_0x10aead&&_0x10aead[_0xe069('0x73')]&&_0x10aead['recordingFormat']!==_0xe069('0x74')){logger[_0xe069('0x1f')]('[OUTBOUND]','Recording\x20is\x20enabled!');_0x313362['recordingURL']=util[_0xe069('0x46')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x3e864b[_0xe069('0x5f')],_0x313362['uniqueid'],md5(_0x313362[_0xe069('0x64')]));}return getConnection(_0x3e864b)[_0xe069('0x27')](function(_0x13958b){_0x587ca1=_0x13958b;return getUser(_0x3e864b,_0x42ace6[_0xe069('0x65')],_0x587ca1);})[_0xe069('0x27')](function(_0x40b687){_0xaf10e7=_0x40b687;return getEndUser(_0x3e864b,_0x5ddf49,_0x313362[_0xe069('0x75')],_0x313362[_0xe069('0x76')],_0x587ca1);})[_0xe069('0x27')](function(_0x253d17){_0x5b92db=_0x253d17;return getTicket(_0x3e864b,_0xaf10e7,_0x5b92db,_0x5ddf49,_0x313362,_0x5ddf49[_0xe069('0x77')],_0x587ca1,_0xe069('0x72'));})[_0xe069('0x27')](function(_0x364299){_0x2df24e=_0x364299;logger[_0xe069('0x1f')]('[OUTBOUND]\x20Ticket\x20%s\x20created.',_0x2df24e['id']);logger['info'](_0xe069('0x78'),_0x2df24e['id'],_0x42ace6[_0xe069('0x53')],_0x3e864b[_0xe069('0x3e')]);switch(_0x3e864b[_0xe069('0x3e')]){case _0xe069('0x6a'):emit(util[_0xe069('0x46')](_0xe069('0x6b'),_0x42ace6[_0xe069('0x53')]),'trigger:salesforce:display',{'recordId':_0x2df24e['id']});break;case'newTab':emit(util[_0xe069('0x46')](_0xe069('0x6b'),_0x42ace6[_0xe069('0x53')]),_0xe069('0x79'),{'uri':util[_0xe069('0x46')]('%s/%s/e',_0x587ca1[_0xe069('0x7a')],_0x2df24e['id'])});break;default:logger[_0xe069('0x70')]('[OUTBOUND]',_0xe069('0x7b'));}})['catch'](function(_0x250824){logger[_0xe069('0x70')]('[OUTBOUND]',_0x250824);});};exports[_0xe069('0x7c')]=function(_0x6aef71,_0x504377,_0x57dd0f,_0x1b3de6,_0x5f28fa,_0x215ead){var _0x46b9e0,_0xa40a61,_0x48b79b,_0x2e04cc;_0x215ead['serverUrl']=intUtil['stripTrailingSlash'](_0x215ead[_0xe069('0x5f')]);_0x215ead[_0xe069('0x58')]=intUtil['stripTrailingSlash'](_0x215ead['remoteUri']);if(_0x5f28fa&&_0x5f28fa['monitor_format']){logger[_0xe069('0x1f')]('['+_0x504377[_0xe069('0x7d')][_0xe069('0x7e')]()+']',_0xe069('0x61'));_0x504377[_0xe069('0x62')]=util[_0xe069('0x46')](_0xe069('0x63'),_0x215ead[_0xe069('0x5f')],_0x504377[_0xe069('0x64')],md5(_0x504377[_0xe069('0x64')]));}else{_0x504377[_0xe069('0x62')]='';}return getConnection(_0x215ead)[_0xe069('0x27')](function(_0x2d2b94){_0x2e04cc=_0x2d2b94;if(!_[_0xe069('0x23')](_0x1b3de6)){return getUser(_0x215ead,_0x1b3de6[_0xe069('0x53')],_0x2e04cc);}else{return getUser(_0x215ead,null,_0x2e04cc);}})[_0xe069('0x27')](function(_0x35275f){_0x46b9e0=_0x35275f;return getEndUser(_0x215ead,_0x57dd0f,_0x504377[_0xe069('0x66')],_0x504377[_0xe069('0x67')],_0x2e04cc);})[_0xe069('0x27')](function(_0x58e0fd){_0xa40a61=_0x58e0fd;return getTicket(_0x215ead,_0x46b9e0,_0xa40a61,_0x57dd0f,_0x504377,_0x57dd0f[_0xe069('0x77')],_0x2e04cc);})['then'](function(_0x1de4be){_0x48b79b=_0x1de4be;logger[_0xe069('0x1f')]('['+_0x504377[_0xe069('0x7d')]['toUpperCase']()+']\x20Ticket\x20%s\x20created.',_0x48b79b['id']);logger[_0xe069('0x1f')]('['+_0x504377['lastevent'][_0xe069('0x7e')]()+_0xe069('0x7f'),_0x215ead[_0xe069('0x3e')]);})[_0xe069('0x6f')](function(_0x17f3d6){logger[_0xe069('0x70')]('['+_0x504377['lastevent'][_0xe069('0x7e')]()+']',_0x17f3d6);});}; \ No newline at end of file +var _0x5f69=['ContactId','AccountId','leadId','info','Association\x20between\x20Case\x20and\x20Lead\x20skipped','sobject','ticketType','create','isNil','validateEmail','User','find','execute','then','length','Agent\x20%s\x20found.','resolve','Name','identity','user_id','display_name','Searching\x20enduser\x20with\x20phone\x20%s.\x20Serching\x20method\x20used\x20%s.','moduleSearch','additionalSearchContact','merge','$or','cloneDeep','additionalSearchLead','Lead','account_contact_lead','additionalSearchAccount','Contact','Phone','type','toLowerCase','Enduser\x20(%s)\x20with\x20phone\x20%s\x20found','Enduser\x20with\x20phone\x20%s\x20not\x20found','moduleCreate','Enduser\x20with\x20phone\x20%s.\x20Creating\x20method\x20used\x20%s.','LastName','format','Caller\x20-\x20%s','Company','','upperFirst','forEach','includes','string','picklist','idField','toString','variable','variableName','customVariable','Variable','name','password','concat','remoteUri','https://login.salesforce.com','clientId','username','Connection\x20established.','queue','serverUrl','stripTrailingSlash','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','recordingURL','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','email','calleridname','calleridnum','Fields','[QUEUE]\x20Ticket\x20%s\x20created','[QUEUE]\x20Displaying\x20ticket\x20%s\x20to\x20agent\x20%s.\x20Integration\x20account\x20type\x20%s.','integrationTab','user:%s','trigger:salesforce:display','newTab','trigger:browser:url','%s/%s/e','instanceUrl','error','[QUEUE]\x20Salesforce\x20account\x20type\x20not\x20recognized.','outbound','recordingFormat','none','[OUTBOUND]','destcalleridname','destcalleridnum','[OUTBOUND]\x20Ticket\x20%s\x20created.','[OUTBOUND]\x20Displaying\x20ticket\x20%s\x20to\x20agent\x20%s.\x20Integration\x20account\x20type\x20%s.','catch','unmanaged','lastevent',']\x20Ticket\x20%s\x20created.','toUpperCase',']\x20Integration\x20account\x20type\x20%s.','lodash','request-promise','moment','md5','jsforce','util','ioredis','./util','../../../../config/environment','../../../../config/logger','redis','defaults','localhost','socket.io-emitter','emit','getString','Descriptions','Task','ActivityDate','utc','IsReminderSet','IsRecurrence','endUserType','lead','WhoId','account','WhatId','contact'];(function(_0x5006b8,_0x545181){var _0x9cbd19=function(_0x6c11bc){while(--_0x6c11bc){_0x5006b8['push'](_0x5006b8['shift']());}};_0x9cbd19(++_0x545181);}(_0x5f69,0x167));var _0x95f6=function(_0x23c3f4,_0x24f0b3){_0x23c3f4=_0x23c3f4-0x0;var _0x82f0f1=_0x5f69[_0x23c3f4];return _0x82f0f1;};'use strict';var _=require(_0x95f6('0x0'));var rp=require(_0x95f6('0x1'));var moment=require(_0x95f6('0x2'));var BPromise=require('bluebird');var md5=require(_0x95f6('0x3'));var jsforce=require(_0x95f6('0x4'));var util=require(_0x95f6('0x5'));var Redis=require(_0x95f6('0x6'));var intUtil=require(_0x95f6('0x7'));var config=require(_0x95f6('0x8'));var logger=require(_0x95f6('0x9'))('salesforce');config[_0x95f6('0xa')]=_[_0x95f6('0xb')](config[_0x95f6('0xa')],{'host':_0x95f6('0xc'),'port':0x18eb});var io=require(_0x95f6('0xd'))(new Redis(config['redis']));function emit(_0x3e4292,_0x3480ee,_0x2f5903){io['to'](_0x3e4292)[_0x95f6('0xe')](_0x3480ee,_0x2f5903);}function getTicket(_0x461448,_0x4f723a,_0x5b67b4,_0x2f1fb6,_0x4d81c7,_0x357c3e,_0x4fe340,_0x5bf791){var _0x31b4fe=Object['assign']({},{'OwnerId':_0x4f723a['id'],'Subject':intUtil[_0x95f6('0xf')](_0x2f1fb6['Subjects'],_0x4d81c7,'\x20'),'Description':intUtil[_0x95f6('0xf')](_0x2f1fb6[_0x95f6('0x10')],_0x4d81c7,'\x0a')},getCustomFields(_0x357c3e,_0x4d81c7));if(_0x5b67b4){if(_0x2f1fb6['ticketType']===_0x95f6('0x11')){_0x31b4fe[_0x95f6('0x12')]=moment[_0x95f6('0x13')]();_0x31b4fe[_0x95f6('0x14')]=![];_0x31b4fe[_0x95f6('0x15')]=![];if(_0x5b67b4[_0x95f6('0x16')]==='contact'||_0x5b67b4['endUserType']===_0x95f6('0x17')){_0x31b4fe[_0x95f6('0x18')]=_0x5b67b4['id'];}else if(_0x5b67b4[_0x95f6('0x16')]===_0x95f6('0x19')){_0x31b4fe[_0x95f6('0x1a')]=_0x5b67b4['id'];}}else if(_0x2f1fb6['ticketType']==='Case'){if(_0x5b67b4[_0x95f6('0x16')]===_0x95f6('0x1b')){_0x31b4fe[_0x95f6('0x1c')]=_0x5b67b4['id'];}else if(_0x5b67b4[_0x95f6('0x16')]==='account'){_0x31b4fe[_0x95f6('0x1d')]=_0x5b67b4['id'];}else if(_0x5b67b4[_0x95f6('0x16')]==='lead'&&_0x2f1fb6[_0x95f6('0x1e')]){_0x31b4fe[_0x2f1fb6['leadId']]=_0x5b67b4['id'];}else{logger[_0x95f6('0x1f')](_0x95f6('0x20'));}}}return _0x4fe340[_0x95f6('0x21')](_0x2f1fb6[_0x95f6('0x22')])[_0x95f6('0x23')](_0x31b4fe);}function getUser(_0x3fc0cd,_0x10eeae,_0x28371d){if(!_[_0x95f6('0x24')](_0x10eeae)&&intUtil[_0x95f6('0x25')](_0x10eeae)){var _0x521621={'Email':_0x10eeae};var _0x7a50ab={'Id':!![],'Username':!![],'Name':!![],'Email':!![]};return _0x28371d[_0x95f6('0x21')](_0x95f6('0x26'))[_0x95f6('0x27')](_0x521621,_0x7a50ab)[_0x95f6('0x28')]()[_0x95f6('0x29')](function(_0xe940f0){if(_0xe940f0[_0x95f6('0x2a')]){var _0x4cdbe3=_[_0x95f6('0x27')](_0xe940f0,function(_0x2bd69b){return _0x2bd69b['Email']===_0x10eeae;});if(_0x4cdbe3){logger['info'](_0x95f6('0x2b'),_0x10eeae);return BPromise[_0x95f6('0x2c')]({'id':_0x4cdbe3['Id'],'name':_0x4cdbe3[_0x95f6('0x2d')]});}}else{logger[_0x95f6('0x1f')]('Agent\x20%s\x20not\x20found.\x20Switch\x20to\x20the\x20admin\x20account.',_0x10eeae);return _0x28371d[_0x95f6('0x2e')]()[_0x95f6('0x29')](function(_0x522268){return BPromise[_0x95f6('0x2c')]({'id':_0x522268[_0x95f6('0x2f')],'name':_0x522268['display_name']});});}});}else{logger[_0x95f6('0x1f')]('Agent\x20%s\x20not\x20found.\x20Switch\x20to\x20the\x20admin\x20account.',_0x10eeae);return _0x28371d[_0x95f6('0x2e')]()['then'](function(_0x34c328){return BPromise['resolve']({'id':_0x34c328[_0x95f6('0x2f')],'name':_0x34c328[_0x95f6('0x30')]});});}}function getEndUser(_0x24b0c5,_0x43712c,_0xf31d9d,_0x1c987f,_0x35924d){var _0x26ffc0={'$or':{'Phone':_0x1c987f}};var _0x5c1a62={'Id':!![],'Name':!![],'Phone':!![]};return BPromise[_0x95f6('0x2c')]()[_0x95f6('0x29')](function(){logger[_0x95f6('0x1f')](_0x95f6('0x31'),_0x1c987f,_0x43712c[_0x95f6('0x32')]);switch(_0x43712c['moduleSearch']){case'contact_lead':var _0x2ad6af=_['cloneDeep'](_0x26ffc0);if(_0x43712c[_0x95f6('0x33')]){var _0x452c64={};_0x452c64[_0x43712c[_0x95f6('0x33')]]=_0x1c987f;_[_0x95f6('0x34')](_0x2ad6af[_0x95f6('0x35')],_0x452c64);}return _0x35924d[_0x95f6('0x21')]('Contact')[_0x95f6('0x27')](_0x2ad6af,_0x5c1a62)[_0x95f6('0x28')]()[_0x95f6('0x29')](function(_0x43fd90){if(_0x43fd90&&_0x43fd90[_0x95f6('0x2a')]){return _0x43fd90;}else{var _0x5b1e88=_[_0x95f6('0x36')](_0x26ffc0);if(_0x43712c['additionalSearchLead']){var _0x46251e={};_0x46251e[_0x43712c[_0x95f6('0x37')]]=_0x1c987f;_[_0x95f6('0x34')](_0x5b1e88[_0x95f6('0x35')],_0x46251e);}return _0x35924d[_0x95f6('0x21')](_0x95f6('0x38'))[_0x95f6('0x27')](_0x5b1e88,_0x5c1a62);}});case _0x95f6('0x39'):var _0x4886dc=_['cloneDeep'](_0x26ffc0);if(_0x43712c[_0x95f6('0x3a')]){var _0x452c64={};_0x452c64[_0x43712c['additionalSearchAccount']]=_0x1c987f;_['merge'](_0x4886dc['$or'],_0x452c64);}return _0x35924d[_0x95f6('0x21')]('Account')[_0x95f6('0x27')](_0x4886dc,_0x5c1a62)[_0x95f6('0x28')]()['then'](function(_0x3f0dda){if(_0x3f0dda&&_0x3f0dda[_0x95f6('0x2a')]){return _0x3f0dda;}else{var _0xd8d09b=_['cloneDeep'](_0x26ffc0);if(_0x43712c['additionalSearchContact']){var _0x278fdf={};_0x278fdf[_0x43712c['additionalSearchContact']]=_0x1c987f;_[_0x95f6('0x34')](_0xd8d09b[_0x95f6('0x35')],_0x278fdf);}return _0x35924d[_0x95f6('0x21')](_0x95f6('0x3b'))['find'](_0xd8d09b,_0x5c1a62)['then'](function(_0x27a547){if(_0x27a547&&_0x27a547['length']){return _0x27a547;}else{var _0x15a13e=_['cloneDeep'](_0x26ffc0);if(_0x43712c[_0x95f6('0x37')]){var _0x5d7b6c={};_0x5d7b6c[_0x43712c[_0x95f6('0x37')]]=_0x1c987f;_[_0x95f6('0x34')](_0x15a13e['$or'],_0x5d7b6c);}return _0x35924d[_0x95f6('0x21')]('Lead')['find'](_0x15a13e,_0x5c1a62);}});}});case _0x95f6('0x1b'):var _0x2ad6af=_[_0x95f6('0x36')](_0x26ffc0);if(_0x43712c['additionalSearchContact']){var _0x452c64={};_0x452c64[_0x43712c[_0x95f6('0x33')]]=_0x1c987f;_[_0x95f6('0x34')](_0x2ad6af['$or'],_0x452c64);}return _0x35924d['sobject']('Contact')[_0x95f6('0x27')](_0x2ad6af,_0x5c1a62)[_0x95f6('0x28')]();case _0x95f6('0x17'):var _0xe478ac=_['cloneDeep'](_0x26ffc0);if(_0x43712c['additionalSearchLead']){var _0x452c64={};_0x452c64[_0x43712c[_0x95f6('0x37')]]=_0x1c987f;_[_0x95f6('0x34')](_0xe478ac[_0x95f6('0x35')],_0x452c64);}return _0x35924d['sobject']('Lead')[_0x95f6('0x27')](_0xe478ac,_0x5c1a62);case _0x95f6('0x19'):var _0x4886dc=_[_0x95f6('0x36')](_0x26ffc0);if(_0x43712c[_0x95f6('0x3a')]){var _0x452c64={};_0x452c64[_0x43712c['additionalSearchAccount']]=_0x1c987f;_[_0x95f6('0x34')](_0x4886dc['$or'],_0x452c64);}return _0x35924d['sobject']('Account')[_0x95f6('0x27')](_0x4886dc,_0x5c1a62);default:return null;}})[_0x95f6('0x29')](function(_0x466740){if(_0x466740&&_0x466740[_0x95f6('0x2a')]){var _0x5c20ab=_['first'](_0x466740);if(_0x5c20ab){return BPromise[_0x95f6('0x2c')]({'id':_0x5c20ab['Id'],'name':_0x5c20ab['Name'],'phone':_0x5c20ab[_0x95f6('0x3c')],'endUserType':_0x5c20ab['attributes'][_0x95f6('0x3d')][_0x95f6('0x3e')]()});}}})['then'](function(_0x5704c4){if(_0x5704c4){logger[_0x95f6('0x1f')](_0x95f6('0x3f'),_0x5704c4[_0x95f6('0x16')],_0x1c987f);return BPromise[_0x95f6('0x2c')](_0x5704c4);}else{logger[_0x95f6('0x1f')](_0x95f6('0x40'),_0x1c987f);var _0x313dd8={'Phone':_0x1c987f};if(_0x43712c[_0x95f6('0x41')]){if(_0x43712c[_0x95f6('0x41')]===_0x95f6('0x1b')){logger['info'](_0x95f6('0x42'),_0x1c987f,_0x43712c[_0x95f6('0x41')]);_0x313dd8[_0x95f6('0x43')]=_0xf31d9d!==''?_0xf31d9d:util[_0x95f6('0x44')](_0x95f6('0x45'),_0x1c987f);}else if(_0x43712c[_0x95f6('0x41')]===_0x95f6('0x17')){logger[_0x95f6('0x1f')](_0x95f6('0x42'),_0x1c987f,_0x43712c[_0x95f6('0x41')]);_0x313dd8[_0x95f6('0x43')]=_0xf31d9d!==''?_0xf31d9d:util[_0x95f6('0x44')](_0x95f6('0x45'),_0x1c987f);_0x313dd8[_0x95f6('0x46')]='No\x20Company';}else if(_0x43712c[_0x95f6('0x41')]===_0x95f6('0x19')){logger[_0x95f6('0x1f')](_0x95f6('0x42'),_0x1c987f,_0x43712c[_0x95f6('0x41')]);_0x313dd8[_0x95f6('0x2d')]=_0xf31d9d!==_0x95f6('0x47')?_0xf31d9d:util[_0x95f6('0x44')](_0x95f6('0x45'),_0x1c987f);}else{return null;}}return _0x35924d[_0x95f6('0x21')](_[_0x95f6('0x48')](_0x43712c[_0x95f6('0x41')]))[_0x95f6('0x23')](_0x313dd8)['then'](function(_0x45ce29){return BPromise['resolve']({'id':_0x45ce29['id'],'endUserType':_0x43712c[_0x95f6('0x41')]});});}});}function getCustomFields(_0x29fb73,_0x124c0a){var _0x2a1a24={};if(_0x29fb73[_0x95f6('0x2a')]>0x0){_[_0x95f6('0x49')](_0x29fb73,function(_0x5be229){if(_[_0x95f6('0x4a')]([_0x95f6('0x4b'),_0x95f6('0x4c')],_0x5be229[_0x95f6('0x3d')])&&_0x5be229[_0x95f6('0x4d')]){_0x2a1a24[_0x5be229[_0x95f6('0x4d')]]=_0x5be229['content'][_0x95f6('0x4e')]();}else if(_0x5be229[_0x95f6('0x3d')]===_0x95f6('0x4f')&&_0x5be229[_0x95f6('0x50')]&&_0x5be229[_0x95f6('0x4d')]){_0x124c0a[_0x5be229[_0x95f6('0x50')]]&&(_0x2a1a24[_0x5be229[_0x95f6('0x4d')]]=_0x124c0a[_0x5be229[_0x95f6('0x50')]]['toString']());}else if(_0x5be229[_0x95f6('0x3d')]===_0x95f6('0x51')&&_0x5be229[_0x95f6('0x52')]&&_0x5be229[_0x95f6('0x52')][_0x95f6('0x53')]&&_0x5be229[_0x95f6('0x4d')]){_0x124c0a[_0x5be229['Variable'][_0x95f6('0x53')]['toLowerCase']()]&&(_0x2a1a24[_0x5be229['idField']]=_0x124c0a[_0x5be229[_0x95f6('0x52')][_0x95f6('0x53')][_0x95f6('0x3e')]()][_0x95f6('0x4e')]());}});}return _0x2a1a24;}function getConnection(_0x27f176){var _0x629ab1=_0x27f176[_0x95f6('0x54')][_0x95f6('0x55')](_0x27f176['securityToken']);var _0x5955a6=new jsforce['Connection']({'oauth2':{'loginUrl':_0x27f176[_0x95f6('0x56')]||_0x95f6('0x57'),'clientId':_0x27f176[_0x95f6('0x58')],'clientSecret':_0x27f176['clientSecret']}});return _0x5955a6['login'](_0x27f176[_0x95f6('0x59')],_0x629ab1)[_0x95f6('0x29')](function(){logger[_0x95f6('0x1f')](_0x95f6('0x5a'));return _0x5955a6;});}exports[_0x95f6('0x5b')]=function(_0x68b651,_0x392235,_0x12b7cb,_0x1c9b32,_0x588c1a,_0x3905f7){var _0x4d728e,_0x29e008,_0x365d04,_0x58b45b;_0x3905f7[_0x95f6('0x5c')]=intUtil[_0x95f6('0x5d')](_0x3905f7[_0x95f6('0x5c')]);_0x3905f7[_0x95f6('0x56')]=intUtil['stripTrailingSlash'](_0x3905f7[_0x95f6('0x56')]);if(_0x588c1a&&_0x588c1a[_0x95f6('0x5e')]){logger[_0x95f6('0x1f')](_0x95f6('0x5f'),_0x95f6('0x60'));_0x392235[_0x95f6('0x61')]=util[_0x95f6('0x44')](_0x95f6('0x62'),_0x3905f7[_0x95f6('0x5c')],_0x392235[_0x95f6('0x63')],md5(_0x392235['uniqueid']));}else{_0x392235[_0x95f6('0x61')]='';}return getConnection(_0x3905f7)[_0x95f6('0x29')](function(_0x277954){_0x58b45b=_0x277954;return getUser(_0x3905f7,_0x1c9b32[_0x95f6('0x64')],_0x58b45b);})[_0x95f6('0x29')](function(_0x48f8e5){_0x4d728e=_0x48f8e5;return getEndUser(_0x3905f7,_0x12b7cb,_0x392235[_0x95f6('0x65')],_0x392235[_0x95f6('0x66')],_0x58b45b);})[_0x95f6('0x29')](function(_0x1b2b07){_0x29e008=_0x1b2b07;return getTicket(_0x3905f7,_0x4d728e,_0x29e008,_0x12b7cb,_0x392235,_0x12b7cb[_0x95f6('0x67')],_0x58b45b,_0x95f6('0x5b'));})[_0x95f6('0x29')](function(_0x3e6a74){_0x365d04=_0x3e6a74;logger[_0x95f6('0x1f')](_0x95f6('0x68'),_0x365d04['id']);logger[_0x95f6('0x1f')](_0x95f6('0x69'),_0x365d04['id'],_0x1c9b32[_0x95f6('0x53')],_0x3905f7[_0x95f6('0x3d')]);switch(_0x3905f7[_0x95f6('0x3d')]){case _0x95f6('0x6a'):emit(util[_0x95f6('0x44')](_0x95f6('0x6b'),_0x1c9b32[_0x95f6('0x53')]),_0x95f6('0x6c'),{'recordId':_0x365d04['id']});break;case _0x95f6('0x6d'):emit(util['format'](_0x95f6('0x6b'),_0x1c9b32[_0x95f6('0x53')]),_0x95f6('0x6e'),{'uri':util[_0x95f6('0x44')](_0x95f6('0x6f'),_0x58b45b[_0x95f6('0x70')],_0x365d04['id'])});break;default:logger[_0x95f6('0x71')](_0x95f6('0x72'));}})['catch'](function(_0x2254af){logger[_0x95f6('0x71')]('[QUEUE]',_0x2254af);});};exports[_0x95f6('0x73')]=function(_0x4dc192,_0x4244a0,_0xa3c1ac,_0x49648c,_0x3f817a,_0x3a26dc,_0x3268ea){var _0x39da29,_0x2bc059,_0x27e4e4,_0xe54df0;_0x3a26dc['serverUrl']=intUtil[_0x95f6('0x5d')](_0x3a26dc[_0x95f6('0x5c')]);_0x3a26dc[_0x95f6('0x56')]=intUtil[_0x95f6('0x5d')](_0x3a26dc[_0x95f6('0x56')]);if(_0x3268ea&&_0x3268ea[_0x95f6('0x74')]&&_0x3268ea[_0x95f6('0x74')]!==_0x95f6('0x75')){logger[_0x95f6('0x1f')](_0x95f6('0x76'),_0x95f6('0x60'));_0x4244a0[_0x95f6('0x61')]=util[_0x95f6('0x44')](_0x95f6('0x62'),_0x3a26dc[_0x95f6('0x5c')],_0x4244a0[_0x95f6('0x63')],md5(_0x4244a0['uniqueid']));}return getConnection(_0x3a26dc)[_0x95f6('0x29')](function(_0xb3ca6){_0xe54df0=_0xb3ca6;return getUser(_0x3a26dc,_0x49648c['email'],_0xe54df0);})['then'](function(_0x44b1da){_0x39da29=_0x44b1da;return getEndUser(_0x3a26dc,_0xa3c1ac,_0x4244a0[_0x95f6('0x77')],_0x4244a0[_0x95f6('0x78')],_0xe54df0);})[_0x95f6('0x29')](function(_0x403852){_0x2bc059=_0x403852;return getTicket(_0x3a26dc,_0x39da29,_0x2bc059,_0xa3c1ac,_0x4244a0,_0xa3c1ac[_0x95f6('0x67')],_0xe54df0,_0x95f6('0x73'));})[_0x95f6('0x29')](function(_0x415b15){_0x27e4e4=_0x415b15;logger[_0x95f6('0x1f')](_0x95f6('0x79'),_0x27e4e4['id']);logger[_0x95f6('0x1f')](_0x95f6('0x7a'),_0x27e4e4['id'],_0x49648c[_0x95f6('0x53')],_0x3a26dc['type']);switch(_0x3a26dc['type']){case _0x95f6('0x6a'):emit(util[_0x95f6('0x44')]('user:%s',_0x49648c[_0x95f6('0x53')]),'trigger:salesforce:display',{'recordId':_0x27e4e4['id']});break;case _0x95f6('0x6d'):emit(util[_0x95f6('0x44')](_0x95f6('0x6b'),_0x49648c[_0x95f6('0x53')]),_0x95f6('0x6e'),{'uri':util['format'](_0x95f6('0x6f'),_0xe54df0[_0x95f6('0x70')],_0x27e4e4['id'])});break;default:logger[_0x95f6('0x71')](_0x95f6('0x76'),'Salesforce\x20account\x20type\x20not\x20recognized');}})[_0x95f6('0x7b')](function(_0x2a6907){logger[_0x95f6('0x71')](_0x95f6('0x76'),_0x2a6907);});};exports[_0x95f6('0x7c')]=function(_0x335bb4,_0x315ff6,_0x41a416,_0x44bd80,_0x242f9e,_0x9e9b68){var _0x3f0b28,_0x41986b,_0x186b24,_0x3b5723;_0x9e9b68[_0x95f6('0x5c')]=intUtil[_0x95f6('0x5d')](_0x9e9b68[_0x95f6('0x5c')]);_0x9e9b68[_0x95f6('0x56')]=intUtil[_0x95f6('0x5d')](_0x9e9b68['remoteUri']);if(_0x242f9e&&_0x242f9e[_0x95f6('0x5e')]){logger['info']('['+_0x315ff6[_0x95f6('0x7d')]['toUpperCase']()+']','Recording\x20is\x20enabled!');_0x315ff6[_0x95f6('0x61')]=util[_0x95f6('0x44')](_0x95f6('0x62'),_0x9e9b68[_0x95f6('0x5c')],_0x315ff6[_0x95f6('0x63')],md5(_0x315ff6[_0x95f6('0x63')]));}else{_0x315ff6[_0x95f6('0x61')]='';}return getConnection(_0x9e9b68)['then'](function(_0x3ad792){_0x3b5723=_0x3ad792;if(!_[_0x95f6('0x24')](_0x44bd80)){return getUser(_0x9e9b68,_0x44bd80[_0x95f6('0x53')],_0x3b5723);}else{return getUser(_0x9e9b68,null,_0x3b5723);}})[_0x95f6('0x29')](function(_0x48d999){_0x3f0b28=_0x48d999;return getEndUser(_0x9e9b68,_0x41a416,_0x315ff6['calleridname'],_0x315ff6[_0x95f6('0x66')],_0x3b5723);})['then'](function(_0x2146c3){_0x41986b=_0x2146c3;return getTicket(_0x9e9b68,_0x3f0b28,_0x41986b,_0x41a416,_0x315ff6,_0x41a416[_0x95f6('0x67')],_0x3b5723);})[_0x95f6('0x29')](function(_0x5db7ce){_0x186b24=_0x5db7ce;logger[_0x95f6('0x1f')]('['+_0x315ff6[_0x95f6('0x7d')]['toUpperCase']()+_0x95f6('0x7e'),_0x186b24['id']);logger[_0x95f6('0x1f')]('['+_0x315ff6[_0x95f6('0x7d')][_0x95f6('0x7f')]()+_0x95f6('0x80'),_0x9e9b68['type']);})[_0x95f6('0x7b')](function(_0x1fa70c){logger[_0x95f6('0x71')]('['+_0x315ff6['lastevent']['toUpperCase']()+']',_0x1fa70c);});}; \ No newline at end of file diff --git a/server/services/ami/trigger/integration/servicenow.js b/server/services/ami/trigger/integration/servicenow.js index 14744d5..516f940 100644 --- a/server/services/ami/trigger/integration/servicenow.js +++ b/server/services/ami/trigger/integration/servicenow.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3364=['%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','[QUEUE]','Recording\x20is\x20enabled!','recordingURL','recordingFormat','none','call\x20direction:\x20%s','Displaying\x20call\x20in\x20a\x20new\x20tab...',']\x20Error\x20running\x20ServiceNow\x20integration','inspect','lodash','bluebird','request-promise','md5','./util','../../../../config/environment','../../../../config/logger','defaults','redis','localhost','socket.io-emitter','GET','then','result','adminId','sys_id','info','toUpperCase','],\x20getAdminUser\x20crm','catch','message','],\x20getUser\x20input\x20crm','sys_user?sysparm_query=email%3D','userEmail','],\x20getUser\x20rp\x20obj','length','true','userId','adminEmail','],\x20getUser\x20crm','error',']\x20using\x20admin\x20profile','],\x20createEndUser\x20input\x20crm','POST','endUserNumber','user','System','],\x20EndUser\x20schema','endUserId','],\x20getEndUser\x20input\x20crm','sys_user?sysparm_query=phone%3D','],\x20getEndUser\x20crm','string','picklist','type','nameField','customField','toLowerCase','toString','includes','idField','content','variable','variableName','Variable','name',']\x20getTicket\x20input\x20crm','outbound','incident','assign','getString','Subjects','Descriptions','Fields',']\x20POST\x20incident\x20entity\x20schema','ticketNumber','number',']\x20getTicket\x20crm','label','?sysparm_query=name%3D','Incident','ticketId','Incident\x20-\x20','forEach','all','Tags','map','%26sysparm_record_target%3Dincident','%26sysparm_record_row%3D1%26sysparm_record_rows%3D39','%26sysparm_record_list%3Dactive%253Dtrue','/nav_to.do?uri=incident.do?sys_id%3D','user:%s','trigger:browser:url','username','password','sysparm_limit=1','stripTrailingSlash','remoteUri','serverUrl','format','%s/api/now/table/','isNil','email','destcalleridnum','callDirection','queue','unmanaged'];(function(_0x36856f,_0x98b59e){var _0x43ac52=function(_0x36bc47){while(--_0x36bc47){_0x36856f['push'](_0x36856f['shift']());}};_0x43ac52(++_0x98b59e);}(_0x3364,0xe3));var _0x4336=function(_0x3384ca,_0x4a8e79){_0x3384ca=_0x3384ca-0x0;var _0x1d2f66=_0x3364[_0x3384ca];return _0x1d2f66;};'use strict';var _=require(_0x4336('0x0'));var Promise=require(_0x4336('0x1'));var rp=require(_0x4336('0x2'));var util=require('util');var md5=require(_0x4336('0x3'));var Redis=require('ioredis');var intUtil=require(_0x4336('0x4'));var config=require(_0x4336('0x5'));var logger=require(_0x4336('0x6'))('servicenow');config['redis']=_[_0x4336('0x7')](config[_0x4336('0x8')],{'host':_0x4336('0x9'),'port':0x18eb});var io=require(_0x4336('0xa'))(new Redis(config[_0x4336('0x8')]));function getAdminUser(_0x5f2098,_0x5ea4f8,_0x31ba96,_0x11a781,_0x449c2f,_0x53482d){return new Promise(function(_0x4f3e79,_0x2b1b79){var _0x15bb94={'method':_0x4336('0xb'),'uri':_0x11a781+'sys_user?sysparm_query=user_name%3Dadmin'+'&'+_0x449c2f+'&'+_0x53482d,'auth':_0x5ea4f8,'json':!![]};return rp(_0x15bb94)[_0x4336('0xc')](function(_0x3cf97b){if(_0x3cf97b[_0x4336('0xd')]['length']>0x0){_0x31ba96[_0x4336('0xe')]=_0x3cf97b[_0x4336('0xd')][0x0][_0x4336('0xf')];}logger[_0x4336('0x10')]('['+[_0x5f2098[_0x4336('0x11')]()]+_0x4336('0x12'),_0x31ba96);_0x4f3e79(_0x31ba96);})[_0x4336('0x13')](function(_0x70935b){logger['error']('['+[_0x5f2098['toUpperCase']()]+']',_0x70935b[_0x4336('0x14')]);_0x2b1b79(_0x70935b['message']);});});}function getUser(_0x2033fc,_0x16abee,_0x4f3b97,_0xf34069,_0x3c188c){return function(_0x58eb09){logger[_0x4336('0x10')]('['+[_0x2033fc[_0x4336('0x11')]()]+_0x4336('0x15'),_0x58eb09);return new Promise(function(_0x545782,_0x21634e){if(intUtil['validateEmail'](_0x58eb09['userEmail'])){var _0xe5d5cb={'method':_0x4336('0xb'),'uri':_0x4f3b97+_0x4336('0x16')+_0x58eb09[_0x4336('0x17')]+'&'+_0xf34069+'&'+_0x3c188c,'auth':_0x16abee,'json':!![]};logger['info']('['+[_0x2033fc['toUpperCase']()]+_0x4336('0x18'),_0xe5d5cb);return rp(_0xe5d5cb)[_0x4336('0xc')](function(_0x29c157){logger[_0x4336('0x10')]('['+[_0x2033fc[_0x4336('0x11')]()]+'],\x20getUser\x20entity',_0x29c157);if(_0x29c157[_0x4336('0xd')][_0x4336('0x19')]>0x0&&String(_0x29c157[_0x4336('0xd')][0x0]['active'])===_0x4336('0x1a')){_0x58eb09[_0x4336('0x1b')]=_0x29c157[_0x4336('0xd')][0x0][_0x4336('0xf')];}else{_0x58eb09[_0x4336('0x1b')]=_0x58eb09[_0x4336('0xe')];_0x58eb09[_0x4336('0x17')]=_0x58eb09[_0x4336('0x1c')];}logger[_0x4336('0x10')]('['+[_0x2033fc['toUpperCase']()]+_0x4336('0x1d'),_0x58eb09);_0x545782(_0x58eb09);})[_0x4336('0x13')](function(_0x5badfc){logger[_0x4336('0x1e')]('['+[_0x2033fc['toUpperCase']()]+']',_0x5badfc[_0x4336('0x14')]);_0x21634e(_0x5badfc[_0x4336('0x14')]);});}else{logger[_0x4336('0x10')]('['+[_0x2033fc[_0x4336('0x11')]()]+_0x4336('0x1f'));_0x58eb09[_0x4336('0x1b')]=_0x58eb09[_0x4336('0xe')];_0x58eb09['userEmail']=_0x58eb09[_0x4336('0x1c')];_0x545782(_0x58eb09);}});};}function createEndUser(_0x2f18bc,_0x27ccbd,_0x3c5809,_0x18fbbf,_0xecfa6e){logger[_0x4336('0x10')]('['+[_0x2f18bc[_0x4336('0x11')]()]+_0x4336('0x20'),_0x3c5809);return new Promise(function(_0x5405a4,_0x399010){var _0x292234={'method':_0x4336('0x21'),'uri':_0x18fbbf+'sys_user?'+_0xecfa6e,'body':{'user_name':_0x3c5809[_0x4336('0x22')],'roles':_0x4336('0x23'),'first_name':_0x3c5809[_0x4336('0x22')],'active':_0x4336('0x1a'),'date_format':_0x4336('0x24'),'phone':_0x3c5809[_0x4336('0x22')]},'auth':_0x27ccbd,'json':!![]};return rp(_0x292234)[_0x4336('0xc')](function(_0x39a299){logger['info']('['+[_0x2f18bc[_0x4336('0x11')]()]+_0x4336('0x25'),_0x39a299[_0x4336('0xd')]);_0x3c5809[_0x4336('0x26')]=_0x39a299[_0x4336('0xd')][_0x4336('0xf')];_0x5405a4(_0x3c5809);})[_0x4336('0x13')](function(_0x603816){logger[_0x4336('0x1e')]('['+[_0x2f18bc['toUpperCase']()]+']',_0x603816[_0x4336('0x14')]);_0x399010(_0x603816[_0x4336('0x14')]);});});}function getEndUser(_0x5a54a5,_0x17ef03,_0x281054,_0x3a9375,_0xf562bd){return function(_0x35b007){logger[_0x4336('0x10')]('['+[_0x5a54a5['toUpperCase']()]+_0x4336('0x27'),_0x35b007);return new Promise(function(_0x30b07b,_0x1dc4c1){var _0x477ca3={'method':_0x4336('0xb'),'uri':_0x281054+_0x4336('0x28')+_0x35b007[_0x4336('0x22')]+'&'+_0x3a9375+'&'+_0xf562bd,'auth':_0x17ef03,'json':!![]};return rp(_0x477ca3)[_0x4336('0xc')](function(_0x43f2a1){if(_0x43f2a1[_0x4336('0xd')][_0x4336('0x19')]>0x0){_0x35b007[_0x4336('0x26')]=_0x43f2a1['result'][0x0][_0x4336('0xf')];logger[_0x4336('0x10')]('['+[_0x5a54a5[_0x4336('0x11')]()]+_0x4336('0x29'),_0x35b007);_0x30b07b(_0x35b007);}else{return createEndUser(_0x5a54a5,_0x17ef03,_0x35b007,_0x281054,_0x3a9375)['then'](function(_0x549fb3){logger['info']('['+[_0x5a54a5[_0x4336('0x11')]()]+'],\x20createEndUser\x20crm',_0x549fb3);_0x30b07b(_0x549fb3);});}})[_0x4336('0x13')](function(_0xb005c1){logger['error']('['+[_0x5a54a5[_0x4336('0x11')]()]+']',_0xb005c1[_0x4336('0x14')]);_0x1dc4c1(_0xb005c1[_0x4336('0x14')]);});});};}function getCustomFields(_0x56659d,_0x5d7ed1){var _0x2b471e={};if(_0x56659d[_0x4336('0x19')]>0x0){_['forEach'](_0x56659d,function(_0x34193a){if(_['includes']([_0x4336('0x2a'),_0x4336('0x2b')],_0x34193a[_0x4336('0x2c')])&&_0x34193a[_0x4336('0x2d')]&&!_0x34193a[_0x4336('0x2e')]){_0x2b471e[_0x34193a[_0x4336('0x2d')][_0x4336('0x2f')]()]=_0x34193a['content'][_0x4336('0x30')]();}else if(_[_0x4336('0x31')](['string',_0x4336('0x2b')],_0x34193a['type'])&&_0x34193a[_0x4336('0x32')]&&_0x34193a[_0x4336('0x2e')]){_0x2b471e[_0x34193a[_0x4336('0x32')][_0x4336('0x2f')]()]=_0x34193a[_0x4336('0x33')]['toString']();}else if(_0x34193a[_0x4336('0x2c')]===_0x4336('0x34')&&_0x34193a['variableName']&&_0x34193a[_0x4336('0x32')]&&_0x34193a['customField']){_0x2b471e[_0x34193a['idField']['toLowerCase']()]=_0x5d7ed1[_0x34193a[_0x4336('0x35')]][_0x4336('0x30')]();}else if(_0x34193a['type']==='customVariable'&&_0x34193a['Variable']&&_0x34193a[_0x4336('0x36')][_0x4336('0x37')]&&_0x34193a['idField']&&_0x34193a[_0x4336('0x2e')]){_0x2b471e[_0x34193a['idField']['toLowerCase']()]=_0x5d7ed1[_0x34193a[_0x4336('0x36')][_0x4336('0x37')]['toLowerCase']()][_0x4336('0x30')]();}});}return _0x2b471e;}function getTicket(_0x3d7d16,_0xf07513,_0xc6323,_0x45e544,_0x26f05e,_0x4f4fa3){return function(_0x55be0e){logger[_0x4336('0x10')]('['+[_0x3d7d16[_0x4336('0x11')]()]+_0x4336('0x38'),_0x55be0e);return new Promise(function(_0x21842f,_0x322e1a){var _0x10e30c=_0x3d7d16[_0x4336('0x2f')]()===_0x4336('0x39')?_0x55be0e[_0x4336('0x1b')]:_0x55be0e[_0x4336('0x26')];var _0x32fa58={'method':_0x4336('0x21'),'uri':_0xc6323+_0x4336('0x3a')+'?'+_0x4f4fa3,'body':Object[_0x4336('0x3b')]({},{'active':_0x4336('0x1a'),'caller_id':_0x10e30c,'assigned_to':_0x55be0e[_0x4336('0x1b')],'short_description':intUtil[_0x4336('0x3c')](_0x45e544[_0x4336('0x3d')],_0x26f05e,'\x20'),'description':intUtil[_0x4336('0x3c')](_0x45e544[_0x4336('0x3e')],_0x26f05e,'\x0a')},getCustomFields(_0x45e544[_0x4336('0x3f')],_0x26f05e)),'auth':_0xf07513,'json':!![]};return rp(_0x32fa58)[_0x4336('0xc')](function(_0x3b7f65){logger['info']('['+[_0x3d7d16[_0x4336('0x11')]()]+_0x4336('0x40'),_0x3b7f65[_0x4336('0xd')]);_0x55be0e['ticketId']=_0x3b7f65[_0x4336('0xd')][_0x4336('0xf')];_0x55be0e[_0x4336('0x41')]=_0x3b7f65['result'][_0x4336('0x42')];logger['info']('['+[_0x3d7d16['toUpperCase']()]+_0x4336('0x43'),_0x55be0e);_0x21842f(_0x55be0e);})[_0x4336('0x13')](function(_0x44ac82){logger['error']('['+[_0x3d7d16[_0x4336('0x11')]()]+']',_0x44ac82[_0x4336('0x14')]);_0x322e1a(_0x44ac82['message']);});});};}function createRemoteTag(_0x1ec36c,_0x29397c,_0x100112,_0x65e9c9){return new Promise(function(_0x3e8d02,_0xa4951a){var _0x57b797={'method':_0x4336('0x21'),'uri':_0x100112+_0x4336('0x44')+'?'+_0x65e9c9,'body':{'short_description':_0x1ec36c,'global':!![],'active':!![],'name':_0x1ec36c},'auth':_0x29397c,'json':!![]};return rp(_0x57b797)[_0x4336('0xc')](function(_0x59c68e){var _0x115958=_0x59c68e[_0x4336('0xd')]['sys_id'];_0x3e8d02(_0x115958);});});}function getRemoteTag(_0x35cd0d,_0x2c5d34,_0x54b84,_0x58ccbe,_0x5e1103){return new Promise(function(_0x23f6aa,_0x352789){var _0x4312cb={'method':'GET','uri':_0x54b84+_0x4336('0x44')+_0x4336('0x45')+_0x35cd0d+'&'+_0x58ccbe,'auth':_0x2c5d34,'json':!![]};return rp(_0x4312cb)[_0x4336('0xc')](function(_0x51e00f){if(_0x51e00f[_0x4336('0xd')][_0x4336('0x19')]>0x0){var _0x42a928=_0x51e00f[_0x4336('0xd')][0x0]['sys_id'];_0x23f6aa(_0x42a928);}else{return createRemoteTag(_0x35cd0d,_0x2c5d34,_0x54b84,_0x58ccbe)['then'](function(_0x48009a){_0x23f6aa(_0x48009a);});}});});}function assignTagToIncident(_0x37fc84,_0x1b5db5,_0x4b94e5,_0x277d3f,_0x58604a){return new Promise(function(_0x306bbe,_0x4ec09){var _0x430336={'method':_0x4336('0x21'),'uri':_0x4b94e5+'label_entry'+'?'+_0x58604a,'body':{'label':_0x37fc84,'table':_0x4336('0x3a'),'id_type':_0x4336('0x46'),'table_key':_0x277d3f[_0x4336('0x47')],'title':_0x4336('0x48')+_0x277d3f[_0x4336('0x41')],'id_display':_0x277d3f['ticketNumber']},'auth':_0x1b5db5,'json':!![]};return rp(_0x430336)['then'](function(_0x2c6071){_0x306bbe();})[_0x4336('0x13')](function(){_0x306bbe();});});}function manageTags(_0x24ebff,_0x32348f,_0x1beb2f,_0x255f19,_0x1c0bec,_0x1af27e,_0x3f3190){return new Promise(function(_0x20463d,_0x4f948c){var _0x43f61f=[];_0x32348f[_0x4336('0x49')](function(_0x447134){_0x43f61f['push'](getRemoteTag(_0x447134,_0x1beb2f,_0x255f19,_0x1af27e,_0x3f3190));});return Promise[_0x4336('0x4a')](_0x43f61f)[_0x4336('0xc')](function(_0x17d359){if(_0x17d359[_0x4336('0x19')]){logger[_0x4336('0x10')]('['+[_0x24ebff[_0x4336('0x11')]()]+']\x20arrayPromises:\x20IDs\x20in\x20table\x20label',_0x17d359);var _0xa4edb=[];_0x17d359[_0x4336('0x49')](function(_0x10c2c4){_0xa4edb['push'](assignTagToIncident(_0x10c2c4,_0x1beb2f,_0x255f19,_0x1c0bec,_0x1af27e));});return Promise['all'](_0xa4edb)['then'](function(){_0x20463d();})[_0x4336('0x13')](function(){_0x20463d();});}else{_0x20463d();}});});}function getTags(_0x2371d5,_0x320587,_0x47d91e,_0x2a2b14,_0x2361ae,_0x48adfe){return function(_0x412629){return new Promise(function(_0x1dc4f8,_0x28e068){var _0x55de3e=[];var _0x2bbf3=_0x2a2b14[_0x4336('0x4b')];if(_0x2bbf3&&_0x2bbf3[_0x4336('0x19')]>0x0){_0x55de3e=_[_0x4336('0x4c')](_0x2bbf3,_0x4336('0x37'));}if(_0x55de3e[_0x4336('0x19')]>0x0){return manageTags(_0x2371d5,_0x55de3e,_0x320587,_0x47d91e,_0x412629,_0x2361ae,_0x48adfe)[_0x4336('0xc')](function(){_0x1dc4f8(_0x412629);});}else{_0x1dc4f8(_0x412629);}});};}function emit(_0xf60b56,_0x7682a1,_0x4b9302){var _0x1be1ab=_0x4336('0x4d')+_0x4336('0x4e')+_0x4336('0x4f')+'%255EORDERBYDESCnumber';var _0x472aa0={'uri':_0xf60b56+_0x4336('0x50')+_0x4b9302+_0x1be1ab};io['to'](util['format'](_0x4336('0x51'),_0x7682a1))['emit'](_0x4336('0x52'),_0x472aa0);}exports['cs']=function(_0x2ece93,_0x350bf3,_0x4c776f,_0x4ef53c,_0x2e7708,_0x429540,_0x5cdc57,_0x596055){var _0x4fd66b={};var _0x1ef4c0={'user':_0x429540[_0x4336('0x53')],'pass':_0x429540[_0x4336('0x54')]};var _0x4153b8=_0x4336('0x55');var _0x57e996='sysparm_display_value=true';_0x429540['remoteUri']=intUtil[_0x4336('0x56')](_0x429540[_0x4336('0x57')]);_0x429540[_0x4336('0x58')]=intUtil[_0x4336('0x56')](_0x429540[_0x4336('0x58')]);var _0x56639a=util[_0x4336('0x59')](_0x4336('0x5a'),_0x429540[_0x4336('0x57')]);_0x4fd66b[_0x4336('0x17')]=!_[_0x4336('0x5b')](_0x4ef53c)?_0x4ef53c[_0x4336('0x5c')]:null;_0x4fd66b[_0x4336('0x1c')]=_0x429540[_0x4336('0x5c')];_0x4fd66b[_0x4336('0x22')]=_0x596055[_0x4336('0x2f')]()===_0x4336('0x39')?_0x350bf3[_0x4336('0x5d')]:_0x350bf3['calleridnum'];_0x4fd66b[_0x4336('0x5e')]=_0x596055===_0x4336('0x5f')||_0x596055===_0x4336('0x60')?_0x4336('0x5f'):_0x4336('0x39');var _0x15b416=util[_0x4336('0x59')](_0x4336('0x61'),_0x429540['serverUrl'],_0x350bf3[_0x4336('0x62')],md5(_0x350bf3['uniqueid']));if(_0x2e7708&&_0x2e7708['monitor_format']){logger[_0x4336('0x10')](_0x4336('0x63'),_0x4336('0x64'));_0x350bf3[_0x4336('0x65')]=_0x15b416;}else if(_0x5cdc57&&_0x5cdc57[_0x4336('0x66')]&&_0x5cdc57[_0x4336('0x66')]!==_0x4336('0x67')){logger[_0x4336('0x10')]('[OUTBOUND]',_0x4336('0x64'));_0x350bf3[_0x4336('0x65')]=_0x15b416;}else{_0x350bf3[_0x4336('0x65')]='';}return getAdminUser(_0x596055,_0x1ef4c0,_0x4fd66b,_0x56639a,_0x57e996,_0x4153b8)['then'](getUser(_0x596055,_0x1ef4c0,_0x56639a,_0x57e996,_0x4153b8))['then'](getEndUser(_0x596055,_0x1ef4c0,_0x56639a,_0x57e996,_0x4153b8))[_0x4336('0xc')](getTicket(_0x596055,_0x1ef4c0,_0x56639a,_0x4c776f,_0x350bf3,_0x57e996))[_0x4336('0xc')](function(_0x48e503){logger[_0x4336('0x10')](util[_0x4336('0x59')]('The\x20ticket\x20ID\x20is:\x20%s',_0x48e503['ticketId']));logger['info'](util['format'](_0x4336('0x68'),_0x596055));if(_0x596055!==_0x4336('0x60')){logger[_0x4336('0x10')]('['+[_0x596055[_0x4336('0x11')]()]+']',_0x4336('0x69'));emit(_0x429540[_0x4336('0x57')],_0x4ef53c['name'],_0x48e503[_0x4336('0x47')]);}})[_0x4336('0x13')](function(_0x25212e){logger[_0x4336('0x1e')]('['+[_0x596055[_0x4336('0x11')]()]+_0x4336('0x6a'),util[_0x4336('0x6b')](_0x25212e,{'showHidden':!![],'depth':null}));});}; \ No newline at end of file +var _0xc768=['Displaying\x20call\x20in\x20a\x20new\x20tab...','lodash','request-promise','ioredis','../../../../config/environment','../../../../config/logger','servicenow','defaults','localhost','socket.io-emitter','GET','sys_user?sysparm_query=user_name%3Dadmin','then','result','length','adminId','sys_id','toUpperCase','],\x20getAdminUser\x20crm','error','message','info','],\x20getUser\x20input\x20crm','validateEmail','userEmail','sys_user?sysparm_query=email%3D','],\x20getUser\x20entity','active','true','userId','adminEmail','],\x20getUser\x20crm','catch','POST','endUserNumber','System','],\x20EndUser\x20schema','endUserId','],\x20getEndUser\x20input\x20crm','],\x20getEndUser\x20crm','forEach','string','picklist','includes','type','idField','customField','toLowerCase','variable','variableName','toString','customVariable','Variable','name',']\x20getTicket\x20input\x20crm','incident','assign','getString','Descriptions','Fields',']\x20POST\x20incident\x20entity\x20schema','ticketId','ticketNumber','number',']\x20getTicket\x20crm','label','label_entry','Incident','Incident\x20-\x20','push','all',']\x20arrayPromises:\x20IDs\x20in\x20table\x20label','Tags','%26sysparm_record_target%3Dincident','%26sysparm_record_list%3Dactive%253Dtrue','%255EORDERBYDESCnumber','/nav_to.do?uri=incident.do?sys_id%3D','user:%s','trigger:browser:url','username','password','sysparm_limit=1','sysparm_display_value=true','remoteUri','stripTrailingSlash','serverUrl','format','%s/api/now/table/','email','outbound','destcalleridnum','calleridnum','queue','unmanaged','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','monitor_format','recordingFormat','none','[OUTBOUND]','Recording\x20is\x20enabled!','recordingURL','The\x20ticket\x20ID\x20is:\x20%s','call\x20direction:\x20%s'];(function(_0x53199f,_0x1dac3a){var _0x1f9609=function(_0x452065){while(--_0x452065){_0x53199f['push'](_0x53199f['shift']());}};_0x1f9609(++_0x1dac3a);}(_0xc768,0xd1));var _0x8c76=function(_0x43aca0,_0x4e9fb5){_0x43aca0=_0x43aca0-0x0;var _0x4716f5=_0xc768[_0x43aca0];return _0x4716f5;};'use strict';var _=require(_0x8c76('0x0'));var Promise=require('bluebird');var rp=require(_0x8c76('0x1'));var util=require('util');var md5=require('md5');var Redis=require(_0x8c76('0x2'));var intUtil=require('./util');var config=require(_0x8c76('0x3'));var logger=require(_0x8c76('0x4'))(_0x8c76('0x5'));config['redis']=_[_0x8c76('0x6')](config['redis'],{'host':_0x8c76('0x7'),'port':0x18eb});var io=require(_0x8c76('0x8'))(new Redis(config['redis']));function getAdminUser(_0x5868bd,_0x5276f1,_0x11ae6f,_0x50a87f,_0x13d299,_0x1255e6){return new Promise(function(_0x5291d6,_0x5f0690){var _0x4eb8c0={'method':_0x8c76('0x9'),'uri':_0x50a87f+_0x8c76('0xa')+'&'+_0x13d299+'&'+_0x1255e6,'auth':_0x5276f1,'json':!![]};return rp(_0x4eb8c0)[_0x8c76('0xb')](function(_0x39f48b){if(_0x39f48b[_0x8c76('0xc')][_0x8c76('0xd')]>0x0){_0x11ae6f[_0x8c76('0xe')]=_0x39f48b[_0x8c76('0xc')][0x0][_0x8c76('0xf')];}logger['info']('['+[_0x5868bd[_0x8c76('0x10')]()]+_0x8c76('0x11'),_0x11ae6f);_0x5291d6(_0x11ae6f);})['catch'](function(_0x23db37){logger[_0x8c76('0x12')]('['+[_0x5868bd[_0x8c76('0x10')]()]+']',_0x23db37[_0x8c76('0x13')]);_0x5f0690(_0x23db37[_0x8c76('0x13')]);});});}function getUser(_0x4fb321,_0x226f7a,_0x1305ea,_0x5c06d7,_0x3bc7b7){return function(_0x59a3b0){logger[_0x8c76('0x14')]('['+[_0x4fb321['toUpperCase']()]+_0x8c76('0x15'),_0x59a3b0);return new Promise(function(_0x58d4d4,_0x388ab9){if(intUtil[_0x8c76('0x16')](_0x59a3b0[_0x8c76('0x17')])){var _0x5a5db3={'method':'GET','uri':_0x1305ea+_0x8c76('0x18')+_0x59a3b0[_0x8c76('0x17')]+'&'+_0x5c06d7+'&'+_0x3bc7b7,'auth':_0x226f7a,'json':!![]};logger[_0x8c76('0x14')]('['+[_0x4fb321[_0x8c76('0x10')]()]+'],\x20getUser\x20rp\x20obj',_0x5a5db3);return rp(_0x5a5db3)[_0x8c76('0xb')](function(_0x441f01){logger['info']('['+[_0x4fb321['toUpperCase']()]+_0x8c76('0x19'),_0x441f01);if(_0x441f01[_0x8c76('0xc')][_0x8c76('0xd')]>0x0&&String(_0x441f01[_0x8c76('0xc')][0x0][_0x8c76('0x1a')])===_0x8c76('0x1b')){_0x59a3b0['userId']=_0x441f01[_0x8c76('0xc')][0x0][_0x8c76('0xf')];}else{_0x59a3b0[_0x8c76('0x1c')]=_0x59a3b0['adminId'];_0x59a3b0['userEmail']=_0x59a3b0[_0x8c76('0x1d')];}logger[_0x8c76('0x14')]('['+[_0x4fb321[_0x8c76('0x10')]()]+_0x8c76('0x1e'),_0x59a3b0);_0x58d4d4(_0x59a3b0);})[_0x8c76('0x1f')](function(_0x70a490){logger[_0x8c76('0x12')]('['+[_0x4fb321[_0x8c76('0x10')]()]+']',_0x70a490[_0x8c76('0x13')]);_0x388ab9(_0x70a490[_0x8c76('0x13')]);});}else{logger[_0x8c76('0x14')]('['+[_0x4fb321[_0x8c76('0x10')]()]+']\x20using\x20admin\x20profile');_0x59a3b0[_0x8c76('0x1c')]=_0x59a3b0[_0x8c76('0xe')];_0x59a3b0[_0x8c76('0x17')]=_0x59a3b0[_0x8c76('0x1d')];_0x58d4d4(_0x59a3b0);}});};}function createEndUser(_0x4caa86,_0x452b7e,_0x58bb4e,_0x3932b5,_0x8ed95a){logger[_0x8c76('0x14')]('['+[_0x4caa86[_0x8c76('0x10')]()]+'],\x20createEndUser\x20input\x20crm',_0x58bb4e);return new Promise(function(_0x4875d6,_0x5295f4){var _0x2df2be={'method':_0x8c76('0x20'),'uri':_0x3932b5+'sys_user?'+_0x8ed95a,'body':{'user_name':_0x58bb4e[_0x8c76('0x21')],'roles':'user','first_name':_0x58bb4e[_0x8c76('0x21')],'active':_0x8c76('0x1b'),'date_format':_0x8c76('0x22'),'phone':_0x58bb4e['endUserNumber']},'auth':_0x452b7e,'json':!![]};return rp(_0x2df2be)[_0x8c76('0xb')](function(_0x488e73){logger[_0x8c76('0x14')]('['+[_0x4caa86[_0x8c76('0x10')]()]+_0x8c76('0x23'),_0x488e73[_0x8c76('0xc')]);_0x58bb4e[_0x8c76('0x24')]=_0x488e73['result'][_0x8c76('0xf')];_0x4875d6(_0x58bb4e);})[_0x8c76('0x1f')](function(_0x47cf06){logger[_0x8c76('0x12')]('['+[_0x4caa86['toUpperCase']()]+']',_0x47cf06['message']);_0x5295f4(_0x47cf06['message']);});});}function getEndUser(_0x2a7f2d,_0x4c338b,_0x3c3919,_0x29686d,_0xf418cd){return function(_0x14d7e5){logger['info']('['+[_0x2a7f2d[_0x8c76('0x10')]()]+_0x8c76('0x25'),_0x14d7e5);return new Promise(function(_0x4f98a0,_0x544b1b){var _0x4d892f={'method':_0x8c76('0x9'),'uri':_0x3c3919+'sys_user?sysparm_query=phone%3D'+_0x14d7e5['endUserNumber']+'&'+_0x29686d+'&'+_0xf418cd,'auth':_0x4c338b,'json':!![]};return rp(_0x4d892f)[_0x8c76('0xb')](function(_0x470938){if(_0x470938[_0x8c76('0xc')]['length']>0x0){_0x14d7e5['endUserId']=_0x470938[_0x8c76('0xc')][0x0][_0x8c76('0xf')];logger[_0x8c76('0x14')]('['+[_0x2a7f2d[_0x8c76('0x10')]()]+_0x8c76('0x26'),_0x14d7e5);_0x4f98a0(_0x14d7e5);}else{return createEndUser(_0x2a7f2d,_0x4c338b,_0x14d7e5,_0x3c3919,_0x29686d)['then'](function(_0x51ae9f){logger[_0x8c76('0x14')]('['+[_0x2a7f2d['toUpperCase']()]+'],\x20createEndUser\x20crm',_0x51ae9f);_0x4f98a0(_0x51ae9f);});}})[_0x8c76('0x1f')](function(_0x4b52e0){logger[_0x8c76('0x12')]('['+[_0x2a7f2d[_0x8c76('0x10')]()]+']',_0x4b52e0[_0x8c76('0x13')]);_0x544b1b(_0x4b52e0['message']);});});};}function getCustomFields(_0x19b8fa,_0x2eef0d){var _0x276de4={};if(_0x19b8fa[_0x8c76('0xd')]>0x0){_[_0x8c76('0x27')](_0x19b8fa,function(_0x231f95){if(_['includes']([_0x8c76('0x28'),_0x8c76('0x29')],_0x231f95['type'])&&_0x231f95['nameField']&&!_0x231f95['customField']){_0x276de4[_0x231f95['nameField']['toLowerCase']()]=_0x231f95['content']['toString']();}else if(_[_0x8c76('0x2a')](['string',_0x8c76('0x29')],_0x231f95[_0x8c76('0x2b')])&&_0x231f95[_0x8c76('0x2c')]&&_0x231f95[_0x8c76('0x2d')]){_0x276de4[_0x231f95['idField'][_0x8c76('0x2e')]()]=_0x231f95['content']['toString']();}else if(_0x231f95[_0x8c76('0x2b')]===_0x8c76('0x2f')&&_0x231f95[_0x8c76('0x30')]&&_0x231f95[_0x8c76('0x2c')]&&_0x231f95[_0x8c76('0x2d')]){_0x276de4[_0x231f95['idField']['toLowerCase']()]=_0x2eef0d[_0x231f95[_0x8c76('0x30')]][_0x8c76('0x31')]();}else if(_0x231f95[_0x8c76('0x2b')]===_0x8c76('0x32')&&_0x231f95[_0x8c76('0x33')]&&_0x231f95[_0x8c76('0x33')][_0x8c76('0x34')]&&_0x231f95[_0x8c76('0x2c')]&&_0x231f95['customField']){_0x276de4[_0x231f95['idField'][_0x8c76('0x2e')]()]=_0x2eef0d[_0x231f95[_0x8c76('0x33')]['name'][_0x8c76('0x2e')]()]['toString']();}});}return _0x276de4;}function getTicket(_0x17a1c9,_0x540f9f,_0x50a09a,_0x2a6515,_0x2a1c65,_0x3632f0){return function(_0x52573c){logger['info']('['+[_0x17a1c9['toUpperCase']()]+_0x8c76('0x35'),_0x52573c);return new Promise(function(_0x1974fa,_0x54727e){var _0x533642=_0x17a1c9[_0x8c76('0x2e')]()==='outbound'?_0x52573c[_0x8c76('0x1c')]:_0x52573c[_0x8c76('0x24')];var _0x76c178={'method':_0x8c76('0x20'),'uri':_0x50a09a+_0x8c76('0x36')+'?'+_0x3632f0,'body':Object[_0x8c76('0x37')]({},{'active':_0x8c76('0x1b'),'caller_id':_0x533642,'assigned_to':_0x52573c[_0x8c76('0x1c')],'short_description':intUtil[_0x8c76('0x38')](_0x2a6515['Subjects'],_0x2a1c65,'\x20'),'description':intUtil[_0x8c76('0x38')](_0x2a6515[_0x8c76('0x39')],_0x2a1c65,'\x0a')},getCustomFields(_0x2a6515[_0x8c76('0x3a')],_0x2a1c65)),'auth':_0x540f9f,'json':!![]};return rp(_0x76c178)[_0x8c76('0xb')](function(_0x5e937d){logger[_0x8c76('0x14')]('['+[_0x17a1c9[_0x8c76('0x10')]()]+_0x8c76('0x3b'),_0x5e937d['result']);_0x52573c[_0x8c76('0x3c')]=_0x5e937d[_0x8c76('0xc')][_0x8c76('0xf')];_0x52573c[_0x8c76('0x3d')]=_0x5e937d[_0x8c76('0xc')][_0x8c76('0x3e')];logger['info']('['+[_0x17a1c9[_0x8c76('0x10')]()]+_0x8c76('0x3f'),_0x52573c);_0x1974fa(_0x52573c);})[_0x8c76('0x1f')](function(_0x200e59){logger[_0x8c76('0x12')]('['+[_0x17a1c9[_0x8c76('0x10')]()]+']',_0x200e59[_0x8c76('0x13')]);_0x54727e(_0x200e59[_0x8c76('0x13')]);});});};}function createRemoteTag(_0x6a92c9,_0x378e74,_0x343cf1,_0x4fdedb){return new Promise(function(_0x4411ca,_0xd7ebcd){var _0x26abb7={'method':_0x8c76('0x20'),'uri':_0x343cf1+_0x8c76('0x40')+'?'+_0x4fdedb,'body':{'short_description':_0x6a92c9,'global':!![],'active':!![],'name':_0x6a92c9},'auth':_0x378e74,'json':!![]};return rp(_0x26abb7)['then'](function(_0x1c7549){var _0x609903=_0x1c7549[_0x8c76('0xc')]['sys_id'];_0x4411ca(_0x609903);});});}function getRemoteTag(_0x3ea723,_0x3c4341,_0x2e1689,_0x23426f,_0x2d0f81){return new Promise(function(_0x255039,_0x28c1e9){var _0x42d696={'method':_0x8c76('0x9'),'uri':_0x2e1689+'label'+'?sysparm_query=name%3D'+_0x3ea723+'&'+_0x23426f,'auth':_0x3c4341,'json':!![]};return rp(_0x42d696)[_0x8c76('0xb')](function(_0x34600a){if(_0x34600a[_0x8c76('0xc')][_0x8c76('0xd')]>0x0){var _0x217990=_0x34600a[_0x8c76('0xc')][0x0]['sys_id'];_0x255039(_0x217990);}else{return createRemoteTag(_0x3ea723,_0x3c4341,_0x2e1689,_0x23426f)[_0x8c76('0xb')](function(_0x1772d0){_0x255039(_0x1772d0);});}});});}function assignTagToIncident(_0x59a93f,_0x54eaf2,_0x4b0898,_0x24521c,_0x4ce110){return new Promise(function(_0x403a26,_0x502a78){var _0x49a8cf={'method':_0x8c76('0x20'),'uri':_0x4b0898+_0x8c76('0x41')+'?'+_0x4ce110,'body':{'label':_0x59a93f,'table':_0x8c76('0x36'),'id_type':_0x8c76('0x42'),'table_key':_0x24521c[_0x8c76('0x3c')],'title':_0x8c76('0x43')+_0x24521c[_0x8c76('0x3d')],'id_display':_0x24521c[_0x8c76('0x3d')]},'auth':_0x54eaf2,'json':!![]};return rp(_0x49a8cf)['then'](function(_0x9b7b71){_0x403a26();})[_0x8c76('0x1f')](function(){_0x403a26();});});}function manageTags(_0x116fab,_0x4710c2,_0x5bbaf5,_0x35d62a,_0x500717,_0x54f068,_0x430fc6){return new Promise(function(_0x5cb17a,_0x1d20df){var _0x5996d9=[];_0x4710c2[_0x8c76('0x27')](function(_0x38e3f9){_0x5996d9[_0x8c76('0x44')](getRemoteTag(_0x38e3f9,_0x5bbaf5,_0x35d62a,_0x54f068,_0x430fc6));});return Promise[_0x8c76('0x45')](_0x5996d9)[_0x8c76('0xb')](function(_0x3be696){if(_0x3be696[_0x8c76('0xd')]){logger[_0x8c76('0x14')]('['+[_0x116fab[_0x8c76('0x10')]()]+_0x8c76('0x46'),_0x3be696);var _0x32e843=[];_0x3be696[_0x8c76('0x27')](function(_0x41e5d4){_0x32e843[_0x8c76('0x44')](assignTagToIncident(_0x41e5d4,_0x5bbaf5,_0x35d62a,_0x500717,_0x54f068));});return Promise[_0x8c76('0x45')](_0x32e843)[_0x8c76('0xb')](function(){_0x5cb17a();})['catch'](function(){_0x5cb17a();});}else{_0x5cb17a();}});});}function getTags(_0x450088,_0x2549af,_0x49ab05,_0x4dd446,_0x2f2f89,_0x8ec036){return function(_0xf00d74){return new Promise(function(_0x168cb1,_0x1d2b1e){var _0x4ede38=[];var _0x457283=_0x4dd446[_0x8c76('0x47')];if(_0x457283&&_0x457283[_0x8c76('0xd')]>0x0){_0x4ede38=_['map'](_0x457283,'name');}if(_0x4ede38['length']>0x0){return manageTags(_0x450088,_0x4ede38,_0x2549af,_0x49ab05,_0xf00d74,_0x2f2f89,_0x8ec036)[_0x8c76('0xb')](function(){_0x168cb1(_0xf00d74);});}else{_0x168cb1(_0xf00d74);}});};}function emit(_0x482758,_0x4304ab,_0x171163){var _0x3f55a4=_0x8c76('0x48')+'%26sysparm_record_row%3D1%26sysparm_record_rows%3D39'+_0x8c76('0x49')+_0x8c76('0x4a');var _0x5e4c23={'uri':_0x482758+_0x8c76('0x4b')+_0x171163+_0x3f55a4};io['to'](util['format'](_0x8c76('0x4c'),_0x4304ab))['emit'](_0x8c76('0x4d'),_0x5e4c23);}exports['cs']=function(_0x596bee,_0xbd4a07,_0x9a329e,_0x4d32ab,_0x4594a7,_0x348067,_0x4fa026,_0x5b640a){var _0x57a428={};var _0x9b23f8={'user':_0x348067[_0x8c76('0x4e')],'pass':_0x348067[_0x8c76('0x4f')]};var _0x52ebf7=_0x8c76('0x50');var _0x5f3a06=_0x8c76('0x51');_0x348067[_0x8c76('0x52')]=intUtil[_0x8c76('0x53')](_0x348067['remoteUri']);_0x348067[_0x8c76('0x54')]=intUtil[_0x8c76('0x53')](_0x348067['serverUrl']);var _0x4a053a=util[_0x8c76('0x55')](_0x8c76('0x56'),_0x348067['remoteUri']);_0x57a428[_0x8c76('0x17')]=!_['isNil'](_0x4d32ab)?_0x4d32ab[_0x8c76('0x57')]:null;_0x57a428['adminEmail']=_0x348067['email'];_0x57a428['endUserNumber']=_0x5b640a[_0x8c76('0x2e')]()===_0x8c76('0x58')?_0xbd4a07[_0x8c76('0x59')]:_0xbd4a07[_0x8c76('0x5a')];_0x57a428['callDirection']=_0x5b640a===_0x8c76('0x5b')||_0x5b640a===_0x8c76('0x5c')?_0x8c76('0x5b'):'outbound';var _0x57feba=util[_0x8c76('0x55')](_0x8c76('0x5d'),_0x348067[_0x8c76('0x54')],_0xbd4a07[_0x8c76('0x5e')],md5(_0xbd4a07['uniqueid']));if(_0x4594a7&&_0x4594a7[_0x8c76('0x5f')]){logger[_0x8c76('0x14')]('[QUEUE]','Recording\x20is\x20enabled!');_0xbd4a07['recordingURL']=_0x57feba;}else if(_0x4fa026&&_0x4fa026['recordingFormat']&&_0x4fa026[_0x8c76('0x60')]!==_0x8c76('0x61')){logger[_0x8c76('0x14')](_0x8c76('0x62'),_0x8c76('0x63'));_0xbd4a07['recordingURL']=_0x57feba;}else{_0xbd4a07[_0x8c76('0x64')]='';}return getAdminUser(_0x5b640a,_0x9b23f8,_0x57a428,_0x4a053a,_0x5f3a06,_0x52ebf7)['then'](getUser(_0x5b640a,_0x9b23f8,_0x4a053a,_0x5f3a06,_0x52ebf7))[_0x8c76('0xb')](getEndUser(_0x5b640a,_0x9b23f8,_0x4a053a,_0x5f3a06,_0x52ebf7))[_0x8c76('0xb')](getTicket(_0x5b640a,_0x9b23f8,_0x4a053a,_0x9a329e,_0xbd4a07,_0x5f3a06))[_0x8c76('0xb')](function(_0x1fd64c){logger[_0x8c76('0x14')](util[_0x8c76('0x55')](_0x8c76('0x65'),_0x1fd64c['ticketId']));logger[_0x8c76('0x14')](util[_0x8c76('0x55')](_0x8c76('0x66'),_0x5b640a));if(_0x5b640a!==_0x8c76('0x5c')){logger[_0x8c76('0x14')]('['+[_0x5b640a[_0x8c76('0x10')]()]+']',_0x8c76('0x67'));emit(_0x348067['remoteUri'],_0x4d32ab[_0x8c76('0x34')],_0x1fd64c[_0x8c76('0x3c')]);}})['catch'](function(_0x36f638){logger[_0x8c76('0x12')]('['+[_0x5b640a['toUpperCase']()]+']\x20Error\x20running\x20ServiceNow\x20integration',util['inspect'](_0x36f638,{'showHidden':!![],'depth':null}));});}; \ No newline at end of file diff --git a/server/services/ami/trigger/integration/sugarcrm.js b/server/services/ami/trigger/integration/sugarcrm.js index 80692c9..b28bd3e 100644 --- a/server/services/ami/trigger/integration/sugarcrm.js +++ b/server/services/ami/trigger/integration/sugarcrm.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1095=['merge','forEach','type','customField','nameField','content','string','custom_fields','variable','customVariable','Variable','toLowerCase','login','password','PLAIN','xCALLY\x20Motion\x20integration','set_relationship','remoteUri','stripTrailingSlash','serverUrl','uri','%s/service/v4_1/rest.php','monitor_format','[QUEUE]','uniqueid','recordingURL','calleridname','calleridnum','Ticket\x20created!','The\x20Ticket\x20ID\x20is:','users','contacts','version','%s/index.php?action=ajaxui#ajaxUILoc=index.php%3Fmodule%3DCalls%26action%3DEditView%26record%3D%s','%s/#bwc/index.php?module=Calls&action=EditView&record=%s','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','recordingFormat','[OUTBOUND]','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','The\x20User\x20ID\x20is:','destcalleridnum','The\x20Enduser\x20ID\x20is:','charAt','trigger:browser:url','catch','error','toUpperCase','Recording\x20is\x20enabled!','lodash','md5','util','../../../../config/logger','sugarcrm','redis','defaults','localhost','socket.io-emitter','POST','emit','Creating\x20new\x20ticket...','name','getString','Subjects','assigned_user_id','created_by','description','date_start','replace','duration_minutes','parent_id','parent_type','Contacts','parent_name','direction','variableName','push','idField','set_entry','JSON','stringify','Calls','format','Basic\x20%s','apiKey','toString','base64','get_server_info','isNil','info','get_entry_list','Employees','INSTR\x20(\x20users.user_name,\x20\x22%s\x22)\x20>\x200','user_name','then','entry_list','length','find','name_value_list','value','Agent\x20found!','resolve','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','user_id','Searching\x20enduser\x20with\x20phone','contacts.phone_home\x20=\x20\x22%s\x22','phone_home','Enduser\x20found!','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','','Caller\x20-\x20%s','Enduser\x20created.','first_name','[HTTP]'];(function(_0x2b27b2,_0x5e42ea){var _0x44d0c9=function(_0x24f18a){while(--_0x24f18a){_0x2b27b2['push'](_0x2b27b2['shift']());}};_0x44d0c9(++_0x5e42ea);}(_0x1095,0x187));var _0x5109=function(_0x376b45,_0x5964fb){_0x376b45=_0x376b45-0x0;var _0x2341b3=_0x1095[_0x376b45];return _0x2341b3;};'use strict';var _=require(_0x5109('0x0'));var rp=require('request-promise');var BPromise=require('bluebird');var md5=require(_0x5109('0x1'));var util=require(_0x5109('0x2'));var Redis=require('ioredis');var intUtil=require('./util');var config=require('../../../../config/environment');var logger=require(_0x5109('0x3'))(_0x5109('0x4'));config[_0x5109('0x5')]=_[_0x5109('0x6')](config[_0x5109('0x5')],{'host':_0x5109('0x7'),'port':0x18eb});var io=require(_0x5109('0x8'))(new Redis(config[_0x5109('0x5')]));var def={'method':_0x5109('0x9'),'json':!![]};function emit(_0x11392e,_0x38b262,_0xc3c101){io['to'](_0x11392e)[_0x5109('0xa')](_0x38b262,_0xc3c101);}function getTicket(_0x3f06b1,_0x27af68,_0x91e251,_0x144b28,_0x29872a,_0x22b359,_0x2279aa,_0x484aff){logger['info'](_0x5109('0xb'));var _0x2f3cf0=new Date();var _0x21c0f5=[{'name':_0x5109('0xc'),'value':intUtil[_0x5109('0xd')](_0x144b28[_0x5109('0xe')],_0x29872a,'\x20')},{'name':_0x5109('0xf'),'value':_0x27af68['id']},{'name':_0x5109('0x10'),'value':_0x27af68['id']},{'name':_0x5109('0x11'),'value':intUtil[_0x5109('0xd')](_0x144b28['Descriptions'],_0x29872a,'\x0a')},{'name':_0x5109('0x12'),'value':_0x2f3cf0['toISOString']()['slice'](0x0,0x13)[_0x5109('0x13')]('T','\x20')},{'name':'duration_hours','value':'0'},{'name':_0x5109('0x14'),'value':'15'},{'name':_0x5109('0x15'),'value':_0x91e251['id']},{'name':_0x5109('0x16'),'value':_0x5109('0x17')},{'name':_0x5109('0x18'),'value':_0x91e251['name']},{'name':_0x5109('0x19'),'value':_0x484aff}];if(_0x22b359['length']){_['forEach'](_0x22b359,function(_0x1d84f8){if(_0x29872a[_0x1d84f8[_0x5109('0x1a')]]){_0x21c0f5[_0x5109('0x1b')]({'name':_0x1d84f8[_0x5109('0x1c')],'value':_0x29872a[_0x1d84f8[_0x5109('0x1a')]]});}});}return request({'form':{'method':_0x5109('0x1d'),'input_type':'JSON','response_type':_0x5109('0x1e'),'rest_data':JSON[_0x5109('0x1f')]({'session':_0x2279aa['id'],'module_name':_0x5109('0x20'),'name_value_list':_0x21c0f5})}});}function getAuth(_0x32636d){return util[_0x5109('0x21')](_0x5109('0x22'),new Buffer(_0x32636d[_0x5109('0x23')]+':X')[_0x5109('0x24')](_0x5109('0x25')));}function getServerInfo(_0x1473fb){return request({'form':{'method':_0x5109('0x26'),'input_type':'JSON','response_type':_0x5109('0x1e'),'rest_data':JSON[_0x5109('0x1f')]({'session':_0x1473fb['id']})}});}function getUser(_0x53d5ba,_0x1ac849,_0x88aada){if(!_[_0x5109('0x27')](_0x1ac849)){logger[_0x5109('0x28')]('Getting\x20agent\x20with\x20name',_0x1ac849);return request({'form':{'method':_0x5109('0x29'),'input_type':_0x5109('0x1e'),'response_type':'JSON','rest_data':JSON['stringify']({'session':_0x88aada['id'],'module_name':_0x5109('0x2a'),'query':util[_0x5109('0x21')](_0x5109('0x2b'),_0x1ac849),'order_by':'','offset':'0','select_fields':['id',_0x5109('0xc'),_0x5109('0x2c')],'link_name_to_fields_array':[],'max_results':-0x1,'deleted':'0'})}})[_0x5109('0x2d')](function(_0x2c6fca){if(_0x2c6fca[_0x5109('0x2e')][_0x5109('0x2f')]){var _0x5e6b79=_[_0x5109('0x30')](_0x2c6fca[_0x5109('0x2e')],function(_0x125dc5){return _0x125dc5[_0x5109('0x31')][_0x5109('0x2c')][_0x5109('0x32')]===_0x1ac849;});if(_0x5e6b79){logger['info'](_0x5109('0x33'));return BPromise[_0x5109('0x34')]({'id':_0x5e6b79[_0x5109('0x31')]['id'][_0x5109('0x32')],'name':_0x5e6b79['name_value_list'][_0x5109('0xc')]['value']});}}logger[_0x5109('0x28')](_0x5109('0x35'));return BPromise[_0x5109('0x34')]({'id':_0x88aada['name_value_list'][_0x5109('0x36')][_0x5109('0x32')],'name':_0x88aada[_0x5109('0x31')]['user_name'][_0x5109('0x32')]});});}else{logger[_0x5109('0x28')]('Agent\x20not\x20available,\x20using\x20the\x20admin\x20account!');return BPromise[_0x5109('0x34')]({'id':_0x88aada['name_value_list']['user_id']['value'],'name':_0x88aada[_0x5109('0x31')]['user_name']['value']});}}function getEndUser(_0x40a9b5,_0x35ebce,_0x24504a,_0x48cd60){logger['info'](_0x5109('0x37'),_0x24504a);return request({'form':{'method':_0x5109('0x29'),'input_type':_0x5109('0x1e'),'response_type':_0x5109('0x1e'),'rest_data':JSON['stringify']({'session':_0x48cd60['id'],'module_name':_0x5109('0x17'),'query':util[_0x5109('0x21')](_0x5109('0x38'),_0x24504a),'order_by':'','offset':'0','select_fields':['id',_0x5109('0xc'),_0x5109('0x39')],'link_name_to_fields_array':[],'max_results':-0x1,'deleted':'0'})}})[_0x5109('0x2d')](function(_0x3555ba){if(_0x3555ba['entry_list']['length']){var _0x3f763d=_['find'](_0x3555ba['entry_list'],function(_0x24e9b9){return _0x24e9b9[_0x5109('0x31')][_0x5109('0x39')][_0x5109('0x32')]===_0x24504a;});if(_0x3f763d){logger['info'](_0x5109('0x3a'));return BPromise[_0x5109('0x34')]({'id':_0x3f763d[_0x5109('0x31')]['id'][_0x5109('0x32')],'name':_0x3f763d[_0x5109('0x31')][_0x5109('0xc')][_0x5109('0x32')],'phone':_0x3f763d[_0x5109('0x31')][_0x5109('0x39')][_0x5109('0x32')]});}}else{logger[_0x5109('0x28')](_0x5109('0x3b'));return request({'form':{'method':_0x5109('0x1d'),'input_type':'JSON','response_type':_0x5109('0x1e'),'rest_data':JSON[_0x5109('0x1f')]({'session':_0x48cd60['id'],'module_name':_0x5109('0x17'),'name_value_list':[{'name':'first_name','value':_0x35ebce!==_0x5109('0x3c')?_0x35ebce:util['format'](_0x5109('0x3d'),_0x24504a)},{'name':_0x5109('0x39'),'value':_0x24504a}]})}})[_0x5109('0x2d')](function(_0x1bc59b){logger[_0x5109('0x28')](_0x5109('0x3e'));return BPromise[_0x5109('0x34')]({'id':_0x1bc59b['id'],'name':_0x1bc59b['entry_list'][_0x5109('0x3f')][_0x5109('0x32')],'phone':_0x1bc59b[_0x5109('0x2e')]['phone_home'][_0x5109('0x32')]});});}});}function request(_0x1d4d8b){logger['debug'](_0x5109('0x40'),JSON[_0x5109('0x1f')](_0x1d4d8b));return rp(_[_0x5109('0x41')](def,_0x1d4d8b));}function getTags(_0x5bd142,_0x4ae9b5){var _0x2fda17=[];if(_0x5bd142&&_0x5bd142[_0x5109('0x2f')]>0x0){_0x2fda17=_['map'](_0x5bd142,_0x4ae9b5);}return _0x2fda17;}function getCustomFields(_0x37bb5d,_0x4b5816){var _0x142b4a=[];var _0x5e2d3b={'custom_fields':[]};if(_0x37bb5d[_0x5109('0x2f')]>0x0){_[_0x5109('0x42')](_0x37bb5d,function(_0xb8d2e2){if(_0xb8d2e2[_0x5109('0x43')]==='string'&&_0xb8d2e2['nameField']&&!_0xb8d2e2[_0x5109('0x44')]){_0x5e2d3b[_0xb8d2e2[_0x5109('0x45')]['toLowerCase']()]=_0xb8d2e2[_0x5109('0x46')][_0x5109('0x24')]();}else if(_0xb8d2e2['type']===_0x5109('0x47')&&_0xb8d2e2['idField']&&_0xb8d2e2[_0x5109('0x44')]){_0x5e2d3b[_0x5109('0x48')][_0x5109('0x1b')]({'id':_0xb8d2e2[_0x5109('0x1c')],'value':_0xb8d2e2[_0x5109('0x46')][_0x5109('0x24')]()});}else if(_0xb8d2e2['type']===_0x5109('0x49')&&_0xb8d2e2[_0x5109('0x1a')]&&_0xb8d2e2[_0x5109('0x1c')]&&_0xb8d2e2[_0x5109('0x44')]){_0x4b5816[_0xb8d2e2[_0x5109('0x1a')]]&&_0x5e2d3b[_0x5109('0x48')]['push']({'id':_0xb8d2e2['idField'],'value':_0x4b5816[_0xb8d2e2[_0x5109('0x1a')]][_0x5109('0x24')]()});}else if(_0xb8d2e2[_0x5109('0x43')]===_0x5109('0x4a')&&_0xb8d2e2['Variable']&&_0xb8d2e2[_0x5109('0x4b')][_0x5109('0xc')]&&_0xb8d2e2['idField']&&_0xb8d2e2[_0x5109('0x44')]){_0x4b5816[_0xb8d2e2[_0x5109('0x4b')][_0x5109('0xc')][_0x5109('0x4c')]()]&&_0x5e2d3b[_0x5109('0x48')]['push']({'id':_0xb8d2e2[_0x5109('0x1c')],'value':_0x4b5816[_0xb8d2e2[_0x5109('0x4b')][_0x5109('0xc')][_0x5109('0x4c')]()][_0x5109('0x24')]()});}});}return _0x5e2d3b;}function getConnection(_0x2abb89){return request({'method':_0x5109('0x9'),'form':{'method':_0x5109('0x4d'),'input_type':_0x5109('0x1e'),'response_type':_0x5109('0x1e'),'rest_data':JSON[_0x5109('0x1f')]({'user_auth':{'user_name':_0x2abb89['username'],'password':_0x2abb89[_0x5109('0x4e')],'encryption':_0x5109('0x4f')},'application':_0x5109('0x50')})}})[_0x5109('0x2d')](function(_0x517310){var _0x57700c=_0x517310;if(_0x57700c['id']){def['sessionID']=_0x57700c['id'];return BPromise['resolve'](_0x57700c);}else{throw new Error(util[_0x5109('0x21')]('Account\x20%d\x20is\x20not\x20valid',_0x2abb89['id']));}});}function setRelationship(_0x396784,_0x48d666,_0x4a438c,_0x197a9b){return request({'form':{'method':_0x5109('0x51'),'input_type':'JSON','response_type':_0x5109('0x1e'),'rest_data':JSON['stringify']({'session':_0x396784['id'],'module_name':_0x5109('0x20'),'module_id':_0x4a438c['id'],'link_field_name':_0x197a9b,'related_ids':[_0x48d666['id']],'name_value_list':[],'delete':0x0})}});}exports['queue']=function(_0x3b3252,_0x561f7f,_0x3eeeff,_0x128fb9,_0x51ecae,_0x26b28b){var _0x685b7c,_0x5334cc,_0x40d663,_0x49f63e;_0x26b28b[_0x5109('0x52')]=intUtil[_0x5109('0x53')](_0x26b28b['remoteUri']);_0x26b28b[_0x5109('0x54')]=intUtil[_0x5109('0x53')](_0x26b28b[_0x5109('0x54')]);def[_0x5109('0x55')]=util[_0x5109('0x21')](_0x5109('0x56'),_0x26b28b['remoteUri']);if(_0x51ecae&&_0x51ecae[_0x5109('0x57')]){logger[_0x5109('0x28')](_0x5109('0x58'),'Recording\x20is\x20enabled!');_0x561f7f['recordingURL']=util[_0x5109('0x21')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x26b28b['serverUrl'],_0x561f7f[_0x5109('0x59')],md5(_0x561f7f[_0x5109('0x59')]));}else{_0x561f7f[_0x5109('0x5a')]='';}return getConnection(_0x26b28b)['then'](function(_0x220440){_0x49f63e=_0x220440;return getUser(_0x26b28b,_0x128fb9['name'],_0x49f63e);})['then'](function(_0x3d2490){_0x685b7c=_0x3d2490;logger[_0x5109('0x28')]('The\x20User\x20ID\x20is:',_0x685b7c['id']);return getEndUser(_0x26b28b,_0x561f7f[_0x5109('0x5b')],_0x561f7f[_0x5109('0x5c')],_0x49f63e);})[_0x5109('0x2d')](function(_0x50d01d){_0x5334cc=_0x50d01d;logger['info']('The\x20Enduser\x20ID\x20is:',_0x5334cc['id']);return getTicket(_0x26b28b,_0x685b7c,_0x5334cc,_0x3eeeff,_0x561f7f,_0x3eeeff['Fields'],_0x49f63e,'Inbound');})['then'](function(_0x58289a){_0x40d663=_0x58289a;logger['info'](_0x5109('0x5d'));logger[_0x5109('0x28')](_0x5109('0x5e'),_0x40d663['id']);return setRelationship(_0x49f63e,_0x685b7c,_0x40d663,_0x5109('0x5f'));})[_0x5109('0x2d')](function(){return setRelationship(_0x49f63e,_0x5334cc,_0x40d663,_0x5109('0x60'));})[_0x5109('0x2d')](function(){return getServerInfo(_0x49f63e);})[_0x5109('0x2d')](function(_0x3ab09a){var _0x79c5f0=parseInt(_0x3ab09a[_0x5109('0x61')]['charAt'](0x0));var _0x1c6f2d=util[_0x5109('0x21')](_0x5109('0x62'),_0x26b28b[_0x5109('0x52')],_0x40d663['id']);if(_0x79c5f0>0x6){_0x1c6f2d=util[_0x5109('0x21')](_0x5109('0x63'),_0x26b28b['remoteUri'],_0x40d663['id']);}logger[_0x5109('0x28')](_0x5109('0x58'),_0x5109('0x64'));emit(util[_0x5109('0x21')](_0x5109('0x65'),_0x128fb9[_0x5109('0xc')]),'trigger:browser:url',{'uri':_0x1c6f2d});})['catch'](function(_0x356634){logger['error'](_0x5109('0x58'),JSON[_0x5109('0x1f')](_0x356634));});};exports['outbound']=function(_0x34fb22,_0x1c9293,_0xdbe7b1,_0x470f91,_0x286541,_0xae907d,_0x2e79a6){var _0x5dcf7f,_0x367c4d,_0xe0ae51,_0x4563c9;_0xae907d[_0x5109('0x52')]=intUtil['stripTrailingSlash'](_0xae907d['remoteUri']);_0xae907d['serverUrl']=intUtil['stripTrailingSlash'](_0xae907d[_0x5109('0x54')]);def[_0x5109('0x55')]=util[_0x5109('0x21')](_0x5109('0x56'),_0xae907d[_0x5109('0x52')]);if(_0x2e79a6&&_0x2e79a6[_0x5109('0x66')]&&_0x2e79a6[_0x5109('0x66')]!=='none'){logger['info'](_0x5109('0x67'),'Recording\x20is\x20enabled!');_0x1c9293[_0x5109('0x5a')]=util[_0x5109('0x21')](_0x5109('0x68'),_0xae907d[_0x5109('0x54')],_0x1c9293[_0x5109('0x59')],md5(_0x1c9293[_0x5109('0x59')]));}return getConnection(_0xae907d)[_0x5109('0x2d')](function(_0x470498){_0x4563c9=_0x470498;return getUser(_0xae907d,_0x470f91[_0x5109('0xc')],_0x4563c9);})[_0x5109('0x2d')](function(_0x2d088f){_0x5dcf7f=_0x2d088f;logger[_0x5109('0x28')](_0x5109('0x69'),_0x5dcf7f['id']);return getEndUser(_0xae907d,_0x1c9293['destcalleridname'],_0x1c9293[_0x5109('0x6a')],_0x4563c9);})[_0x5109('0x2d')](function(_0x41bfda){_0x367c4d=_0x41bfda;logger[_0x5109('0x28')](_0x5109('0x6b'),_0x367c4d['id']);return getTicket(_0xae907d,_0x5dcf7f,_0x367c4d,_0xdbe7b1,_0x1c9293,_0xdbe7b1['Fields'],_0x4563c9,'Outbound');})[_0x5109('0x2d')](function(_0x4b34f1){_0xe0ae51=_0x4b34f1;logger[_0x5109('0x28')](_0x5109('0x5d'));logger['info'](_0x5109('0x5e'),_0xe0ae51['id']);return setRelationship(_0x4563c9,_0x5dcf7f,_0xe0ae51,_0x5109('0x5f'));})[_0x5109('0x2d')](function(){return setRelationship(_0x4563c9,_0x367c4d,_0xe0ae51,_0x5109('0x60'));})[_0x5109('0x2d')](function(){return getServerInfo(_0x4563c9);})[_0x5109('0x2d')](function(_0x4f8c1c){var _0x4a2325=parseInt(_0x4f8c1c['version'][_0x5109('0x6c')](0x0));var _0x699aeb=util['format'](_0x5109('0x62'),_0xae907d['remoteUri'],_0xe0ae51['id']);if(_0x4a2325>0x6){_0x699aeb=util[_0x5109('0x21')](_0x5109('0x63'),_0xae907d[_0x5109('0x52')],_0xe0ae51['id']);}logger[_0x5109('0x28')]('[OUTBOUND]',_0x5109('0x64'));emit(util[_0x5109('0x21')](_0x5109('0x65'),_0x470f91[_0x5109('0xc')]),_0x5109('0x6d'),{'uri':_0x699aeb});})[_0x5109('0x6e')](function(_0x2b31c9){logger[_0x5109('0x6f')](_0x5109('0x67'),JSON[_0x5109('0x1f')](_0x2b31c9));});};exports['unmanaged']=function(_0x15e0ae,_0x3a480e,_0x1977bd,_0x3a9cf2,_0x3cbc06,_0x1f91d8){var _0x1af1cf,_0x2e3e68,_0x1a8568,_0x3d4a10;_0x1f91d8[_0x5109('0x52')]=intUtil[_0x5109('0x53')](_0x1f91d8['remoteUri']);_0x1f91d8[_0x5109('0x54')]=intUtil[_0x5109('0x53')](_0x1f91d8[_0x5109('0x54')]);def[_0x5109('0x55')]=util[_0x5109('0x21')](_0x5109('0x56'),_0x1f91d8['remoteUri']);if(_0x3cbc06&&_0x3cbc06[_0x5109('0x57')]){logger[_0x5109('0x28')]('['+_0x3a480e['lastevent'][_0x5109('0x70')]()+']',_0x5109('0x71'));_0x3a480e[_0x5109('0x5a')]=util['format'](_0x5109('0x68'),_0x1f91d8[_0x5109('0x54')],_0x3a480e[_0x5109('0x59')],md5(_0x3a480e['uniqueid']));}else{_0x3a480e[_0x5109('0x5a')]='';}return getConnection(_0x1f91d8)['then'](function(_0x5bd2b0){_0x3d4a10=_0x5bd2b0;if(!_['isNil'](_0x3a9cf2)){return getUser(_0x1f91d8,_0x3a9cf2[_0x5109('0xc')],_0x3d4a10);}else{return getUser(_0x1f91d8,null,_0x3d4a10);}})[_0x5109('0x2d')](function(_0x38c45d){_0x1af1cf=_0x38c45d;logger[_0x5109('0x28')]('The\x20User\x20ID\x20is:',_0x1af1cf['id']);return getEndUser(_0x1f91d8,_0x3a480e['calleridname'],_0x3a480e[_0x5109('0x5c')],_0x3d4a10);})[_0x5109('0x2d')](function(_0x40b894){_0x2e3e68=_0x40b894;logger[_0x5109('0x28')]('The\x20Enduser\x20ID\x20is:',_0x2e3e68['id']);return getTicket(_0x1f91d8,_0x1af1cf,_0x2e3e68,_0x1977bd,_0x3a480e,_0x1977bd['Fields'],_0x3d4a10,'Inbound');})[_0x5109('0x2d')](function(_0x2f0822){_0x1a8568=_0x2f0822;logger[_0x5109('0x28')]('Ticket\x20created!');logger[_0x5109('0x28')]('The\x20Ticket\x20ID\x20is:',_0x1a8568['id']);return setRelationship(_0x3d4a10,_0x1af1cf,_0x1a8568,_0x5109('0x5f'));})[_0x5109('0x2d')](function(){return setRelationship(_0x3d4a10,_0x2e3e68,_0x1a8568,_0x5109('0x60'));})[_0x5109('0x2d')](function(){return getServerInfo(_0x3d4a10);})[_0x5109('0x6e')](function(_0xe25161){logger['error']('['+_0x3a480e['lastevent'][_0x5109('0x70')]()+']',JSON[_0x5109('0x1f')](_0xe25161));});}; \ No newline at end of file +var _0xd547=['name_value_list','user_name','value','resolve','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','user_id','Agent\x20not\x20available,\x20using\x20the\x20admin\x20account!','phone_home','entry_list','length','find','Enduser\x20found!','first_name','','Caller\x20-\x20%s','Enduser\x20created.','debug','[HTTP]','merge','map','string','nameField','content','type','customField','custom_fields','customVariable','Variable','username','password','PLAIN','xCALLY\x20Motion\x20integration','sessionID','Account\x20%d\x20is\x20not\x20valid','set_relationship','queue','remoteUri','stripTrailingSlash','serverUrl','uri','%s/service/v4_1/rest.php','monitor_format','Recording\x20is\x20enabled!','recordingURL','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','The\x20User\x20ID\x20is:','calleridnum','The\x20Enduser\x20ID\x20is:','Fields','Inbound','Ticket\x20created!','users','version','charAt','%s/index.php?action=ajaxui#ajaxUILoc=index.php%3Fmodule%3DCalls%26action%3DEditView%26record%3D%s','%s/#bwc/index.php?module=Calls&action=EditView&record=%s','[QUEUE]','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','catch','error','outbound','[OUTBOUND]','destcalleridname','destcalleridnum','Outbound','The\x20Ticket\x20ID\x20is:','lastevent','toUpperCase','calleridname','md5','ioredis','../../../../config/environment','../../../../config/logger','sugarcrm','redis','socket.io-emitter','info','Creating\x20new\x20ticket...','name','Subjects','assigned_user_id','created_by','description','getString','toISOString','duration_hours','duration_minutes','parent_id','Contacts','parent_name','push','idField','variableName','set_entry','stringify','Calls','format','apiKey','toString','base64','get_server_info','JSON','isNil','get_entry_list','Employees','INSTR\x20(\x20users.user_name,\x20\x22%s\x22)\x20>\x200','then'];(function(_0x2d7f0e,_0x3e6fbd){var _0x110b07=function(_0x557b00){while(--_0x557b00){_0x2d7f0e['push'](_0x2d7f0e['shift']());}};_0x110b07(++_0x3e6fbd);}(_0xd547,0xb4));var _0x7d54=function(_0x6c225b,_0x4de56c){_0x6c225b=_0x6c225b-0x0;var _0x268839=_0xd547[_0x6c225b];return _0x268839;};'use strict';var _=require('lodash');var rp=require('request-promise');var BPromise=require('bluebird');var md5=require(_0x7d54('0x0'));var util=require('util');var Redis=require(_0x7d54('0x1'));var intUtil=require('./util');var config=require(_0x7d54('0x2'));var logger=require(_0x7d54('0x3'))(_0x7d54('0x4'));config[_0x7d54('0x5')]=_['defaults'](config[_0x7d54('0x5')],{'host':'localhost','port':0x18eb});var io=require(_0x7d54('0x6'))(new Redis(config[_0x7d54('0x5')]));var def={'method':'POST','json':!![]};function emit(_0x55e4a3,_0x2a219b,_0x7d1e7d){io['to'](_0x55e4a3)['emit'](_0x2a219b,_0x7d1e7d);}function getTicket(_0x44e839,_0x505424,_0x32aef4,_0x5dffdd,_0x2ee1ee,_0x3d2c15,_0x540c86,_0x1bfe90){logger[_0x7d54('0x7')](_0x7d54('0x8'));var _0x539126=new Date();var _0x318d7c=[{'name':_0x7d54('0x9'),'value':intUtil['getString'](_0x5dffdd[_0x7d54('0xa')],_0x2ee1ee,'\x20')},{'name':_0x7d54('0xb'),'value':_0x505424['id']},{'name':_0x7d54('0xc'),'value':_0x505424['id']},{'name':_0x7d54('0xd'),'value':intUtil[_0x7d54('0xe')](_0x5dffdd['Descriptions'],_0x2ee1ee,'\x0a')},{'name':'date_start','value':_0x539126[_0x7d54('0xf')]()['slice'](0x0,0x13)['replace']('T','\x20')},{'name':_0x7d54('0x10'),'value':'0'},{'name':_0x7d54('0x11'),'value':'15'},{'name':_0x7d54('0x12'),'value':_0x32aef4['id']},{'name':'parent_type','value':_0x7d54('0x13')},{'name':_0x7d54('0x14'),'value':_0x32aef4[_0x7d54('0x9')]},{'name':'direction','value':_0x1bfe90}];if(_0x3d2c15['length']){_['forEach'](_0x3d2c15,function(_0x521560){if(_0x2ee1ee[_0x521560['variableName']]){_0x318d7c[_0x7d54('0x15')]({'name':_0x521560[_0x7d54('0x16')],'value':_0x2ee1ee[_0x521560[_0x7d54('0x17')]]});}});}return request({'form':{'method':_0x7d54('0x18'),'input_type':'JSON','response_type':'JSON','rest_data':JSON[_0x7d54('0x19')]({'session':_0x540c86['id'],'module_name':_0x7d54('0x1a'),'name_value_list':_0x318d7c})}});}function getAuth(_0x3ec527){return util[_0x7d54('0x1b')]('Basic\x20%s',new Buffer(_0x3ec527[_0x7d54('0x1c')]+':X')[_0x7d54('0x1d')](_0x7d54('0x1e')));}function getServerInfo(_0x21bb45){return request({'form':{'method':_0x7d54('0x1f'),'input_type':_0x7d54('0x20'),'response_type':_0x7d54('0x20'),'rest_data':JSON[_0x7d54('0x19')]({'session':_0x21bb45['id']})}});}function getUser(_0x52a2a9,_0x4164a1,_0x1e4263){if(!_[_0x7d54('0x21')](_0x4164a1)){logger[_0x7d54('0x7')]('Getting\x20agent\x20with\x20name',_0x4164a1);return request({'form':{'method':_0x7d54('0x22'),'input_type':_0x7d54('0x20'),'response_type':_0x7d54('0x20'),'rest_data':JSON[_0x7d54('0x19')]({'session':_0x1e4263['id'],'module_name':_0x7d54('0x23'),'query':util[_0x7d54('0x1b')](_0x7d54('0x24'),_0x4164a1),'order_by':'','offset':'0','select_fields':['id',_0x7d54('0x9'),'user_name'],'link_name_to_fields_array':[],'max_results':-0x1,'deleted':'0'})}})[_0x7d54('0x25')](function(_0x17ce9e){if(_0x17ce9e['entry_list']['length']){var _0x5a951b=_['find'](_0x17ce9e['entry_list'],function(_0x40feaa){return _0x40feaa[_0x7d54('0x26')][_0x7d54('0x27')][_0x7d54('0x28')]===_0x4164a1;});if(_0x5a951b){logger[_0x7d54('0x7')]('Agent\x20found!');return BPromise[_0x7d54('0x29')]({'id':_0x5a951b[_0x7d54('0x26')]['id']['value'],'name':_0x5a951b['name_value_list'][_0x7d54('0x9')]['value']});}}logger[_0x7d54('0x7')](_0x7d54('0x2a'));return BPromise[_0x7d54('0x29')]({'id':_0x1e4263['name_value_list'][_0x7d54('0x2b')]['value'],'name':_0x1e4263['name_value_list'][_0x7d54('0x27')][_0x7d54('0x28')]});});}else{logger[_0x7d54('0x7')](_0x7d54('0x2c'));return BPromise[_0x7d54('0x29')]({'id':_0x1e4263[_0x7d54('0x26')][_0x7d54('0x2b')]['value'],'name':_0x1e4263[_0x7d54('0x26')][_0x7d54('0x27')][_0x7d54('0x28')]});}}function getEndUser(_0x4297fd,_0x4b6aa5,_0xe54f5f,_0x4a0221){logger[_0x7d54('0x7')]('Searching\x20enduser\x20with\x20phone',_0xe54f5f);return request({'form':{'method':'get_entry_list','input_type':'JSON','response_type':_0x7d54('0x20'),'rest_data':JSON[_0x7d54('0x19')]({'session':_0x4a0221['id'],'module_name':_0x7d54('0x13'),'query':util[_0x7d54('0x1b')]('contacts.phone_home\x20=\x20\x22%s\x22',_0xe54f5f),'order_by':'','offset':'0','select_fields':['id',_0x7d54('0x9'),_0x7d54('0x2d')],'link_name_to_fields_array':[],'max_results':-0x1,'deleted':'0'})}})['then'](function(_0x4d98b1){if(_0x4d98b1[_0x7d54('0x2e')][_0x7d54('0x2f')]){var _0xa0c77f=_[_0x7d54('0x30')](_0x4d98b1[_0x7d54('0x2e')],function(_0xd775bc){return _0xd775bc[_0x7d54('0x26')][_0x7d54('0x2d')]['value']===_0xe54f5f;});if(_0xa0c77f){logger[_0x7d54('0x7')](_0x7d54('0x31'));return BPromise['resolve']({'id':_0xa0c77f['name_value_list']['id']['value'],'name':_0xa0c77f['name_value_list'][_0x7d54('0x9')][_0x7d54('0x28')],'phone':_0xa0c77f['name_value_list'][_0x7d54('0x2d')]['value']});}}else{logger[_0x7d54('0x7')]('Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!');return request({'form':{'method':_0x7d54('0x18'),'input_type':_0x7d54('0x20'),'response_type':_0x7d54('0x20'),'rest_data':JSON[_0x7d54('0x19')]({'session':_0x4a0221['id'],'module_name':'Contacts','name_value_list':[{'name':_0x7d54('0x32'),'value':_0x4b6aa5!==_0x7d54('0x33')?_0x4b6aa5:util['format'](_0x7d54('0x34'),_0xe54f5f)},{'name':_0x7d54('0x2d'),'value':_0xe54f5f}]})}})[_0x7d54('0x25')](function(_0x2d2acc){logger[_0x7d54('0x7')](_0x7d54('0x35'));return BPromise[_0x7d54('0x29')]({'id':_0x2d2acc['id'],'name':_0x2d2acc['entry_list'][_0x7d54('0x32')]['value'],'phone':_0x2d2acc[_0x7d54('0x2e')][_0x7d54('0x2d')]['value']});});}});}function request(_0x53cee4){logger[_0x7d54('0x36')](_0x7d54('0x37'),JSON[_0x7d54('0x19')](_0x53cee4));return rp(_[_0x7d54('0x38')](def,_0x53cee4));}function getTags(_0x1842a0,_0x375dbb){var _0x1e3782=[];if(_0x1842a0&&_0x1842a0[_0x7d54('0x2f')]>0x0){_0x1e3782=_[_0x7d54('0x39')](_0x1842a0,_0x375dbb);}return _0x1e3782;}function getCustomFields(_0x33fbd9,_0x7b580a){var _0x4634f2=[];var _0x22a200={'custom_fields':[]};if(_0x33fbd9['length']>0x0){_['forEach'](_0x33fbd9,function(_0x57c4c6){if(_0x57c4c6['type']===_0x7d54('0x3a')&&_0x57c4c6[_0x7d54('0x3b')]&&!_0x57c4c6['customField']){_0x22a200[_0x57c4c6[_0x7d54('0x3b')]['toLowerCase']()]=_0x57c4c6[_0x7d54('0x3c')][_0x7d54('0x1d')]();}else if(_0x57c4c6[_0x7d54('0x3d')]==='string'&&_0x57c4c6[_0x7d54('0x16')]&&_0x57c4c6[_0x7d54('0x3e')]){_0x22a200[_0x7d54('0x3f')][_0x7d54('0x15')]({'id':_0x57c4c6[_0x7d54('0x16')],'value':_0x57c4c6[_0x7d54('0x3c')][_0x7d54('0x1d')]()});}else if(_0x57c4c6['type']==='variable'&&_0x57c4c6[_0x7d54('0x17')]&&_0x57c4c6['idField']&&_0x57c4c6[_0x7d54('0x3e')]){_0x7b580a[_0x57c4c6['variableName']]&&_0x22a200[_0x7d54('0x3f')][_0x7d54('0x15')]({'id':_0x57c4c6['idField'],'value':_0x7b580a[_0x57c4c6['variableName']][_0x7d54('0x1d')]()});}else if(_0x57c4c6[_0x7d54('0x3d')]===_0x7d54('0x40')&&_0x57c4c6[_0x7d54('0x41')]&&_0x57c4c6[_0x7d54('0x41')][_0x7d54('0x9')]&&_0x57c4c6['idField']&&_0x57c4c6[_0x7d54('0x3e')]){_0x7b580a[_0x57c4c6[_0x7d54('0x41')]['name']['toLowerCase']()]&&_0x22a200[_0x7d54('0x3f')]['push']({'id':_0x57c4c6[_0x7d54('0x16')],'value':_0x7b580a[_0x57c4c6[_0x7d54('0x41')][_0x7d54('0x9')]['toLowerCase']()][_0x7d54('0x1d')]()});}});}return _0x22a200;}function getConnection(_0x25e6a6){return request({'method':'POST','form':{'method':'login','input_type':_0x7d54('0x20'),'response_type':_0x7d54('0x20'),'rest_data':JSON[_0x7d54('0x19')]({'user_auth':{'user_name':_0x25e6a6[_0x7d54('0x42')],'password':_0x25e6a6[_0x7d54('0x43')],'encryption':_0x7d54('0x44')},'application':_0x7d54('0x45')})}})[_0x7d54('0x25')](function(_0x3d2e8d){var _0x26424d=_0x3d2e8d;if(_0x26424d['id']){def[_0x7d54('0x46')]=_0x26424d['id'];return BPromise['resolve'](_0x26424d);}else{throw new Error(util[_0x7d54('0x1b')](_0x7d54('0x47'),_0x25e6a6['id']));}});}function setRelationship(_0x34e60c,_0x266d1e,_0x1b0d7e,_0x1a7d11){return request({'form':{'method':_0x7d54('0x48'),'input_type':_0x7d54('0x20'),'response_type':_0x7d54('0x20'),'rest_data':JSON[_0x7d54('0x19')]({'session':_0x34e60c['id'],'module_name':_0x7d54('0x1a'),'module_id':_0x1b0d7e['id'],'link_field_name':_0x1a7d11,'related_ids':[_0x266d1e['id']],'name_value_list':[],'delete':0x0})}});}exports[_0x7d54('0x49')]=function(_0x24b2c1,_0x5033c9,_0x5aad2a,_0x23e1ac,_0x297731,_0x1bcc29){var _0x27e6c6,_0x29de92,_0x52cb78,_0x28b34d;_0x1bcc29[_0x7d54('0x4a')]=intUtil[_0x7d54('0x4b')](_0x1bcc29['remoteUri']);_0x1bcc29[_0x7d54('0x4c')]=intUtil[_0x7d54('0x4b')](_0x1bcc29[_0x7d54('0x4c')]);def[_0x7d54('0x4d')]=util[_0x7d54('0x1b')](_0x7d54('0x4e'),_0x1bcc29[_0x7d54('0x4a')]);if(_0x297731&&_0x297731[_0x7d54('0x4f')]){logger['info']('[QUEUE]',_0x7d54('0x50'));_0x5033c9[_0x7d54('0x51')]=util[_0x7d54('0x1b')](_0x7d54('0x52'),_0x1bcc29['serverUrl'],_0x5033c9[_0x7d54('0x53')],md5(_0x5033c9[_0x7d54('0x53')]));}else{_0x5033c9[_0x7d54('0x51')]='';}return getConnection(_0x1bcc29)[_0x7d54('0x25')](function(_0x4ee9e1){_0x28b34d=_0x4ee9e1;return getUser(_0x1bcc29,_0x23e1ac[_0x7d54('0x9')],_0x28b34d);})[_0x7d54('0x25')](function(_0x3e1208){_0x27e6c6=_0x3e1208;logger[_0x7d54('0x7')](_0x7d54('0x54'),_0x27e6c6['id']);return getEndUser(_0x1bcc29,_0x5033c9['calleridname'],_0x5033c9[_0x7d54('0x55')],_0x28b34d);})['then'](function(_0x297606){_0x29de92=_0x297606;logger[_0x7d54('0x7')](_0x7d54('0x56'),_0x29de92['id']);return getTicket(_0x1bcc29,_0x27e6c6,_0x29de92,_0x5aad2a,_0x5033c9,_0x5aad2a[_0x7d54('0x57')],_0x28b34d,_0x7d54('0x58'));})[_0x7d54('0x25')](function(_0x1f6609){_0x52cb78=_0x1f6609;logger[_0x7d54('0x7')](_0x7d54('0x59'));logger['info']('The\x20Ticket\x20ID\x20is:',_0x52cb78['id']);return setRelationship(_0x28b34d,_0x27e6c6,_0x52cb78,_0x7d54('0x5a'));})[_0x7d54('0x25')](function(){return setRelationship(_0x28b34d,_0x29de92,_0x52cb78,'contacts');})[_0x7d54('0x25')](function(){return getServerInfo(_0x28b34d);})[_0x7d54('0x25')](function(_0x2435e1){var _0x3b0a4f=parseInt(_0x2435e1[_0x7d54('0x5b')][_0x7d54('0x5c')](0x0));var _0x592591=util['format'](_0x7d54('0x5d'),_0x1bcc29[_0x7d54('0x4a')],_0x52cb78['id']);if(_0x3b0a4f>0x6){_0x592591=util[_0x7d54('0x1b')](_0x7d54('0x5e'),_0x1bcc29['remoteUri'],_0x52cb78['id']);}logger['info'](_0x7d54('0x5f'),_0x7d54('0x60'));emit(util[_0x7d54('0x1b')](_0x7d54('0x61'),_0x23e1ac[_0x7d54('0x9')]),'trigger:browser:url',{'uri':_0x592591});})[_0x7d54('0x62')](function(_0x4e51f5){logger[_0x7d54('0x63')](_0x7d54('0x5f'),JSON[_0x7d54('0x19')](_0x4e51f5));});};exports[_0x7d54('0x64')]=function(_0x3f04d7,_0x567490,_0x1d488a,_0x24551b,_0x1ef7f6,_0x4f31bf,_0x4a2d14){var _0x1d3f42,_0x460ada,_0x12f618,_0x2c6e08;_0x4f31bf[_0x7d54('0x4a')]=intUtil[_0x7d54('0x4b')](_0x4f31bf['remoteUri']);_0x4f31bf[_0x7d54('0x4c')]=intUtil['stripTrailingSlash'](_0x4f31bf[_0x7d54('0x4c')]);def[_0x7d54('0x4d')]=util['format']('%s/service/v4_1/rest.php',_0x4f31bf[_0x7d54('0x4a')]);if(_0x4a2d14&&_0x4a2d14['recordingFormat']&&_0x4a2d14['recordingFormat']!=='none'){logger['info'](_0x7d54('0x65'),_0x7d54('0x50'));_0x567490['recordingURL']=util[_0x7d54('0x1b')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x4f31bf[_0x7d54('0x4c')],_0x567490[_0x7d54('0x53')],md5(_0x567490['uniqueid']));}return getConnection(_0x4f31bf)[_0x7d54('0x25')](function(_0x3dee06){_0x2c6e08=_0x3dee06;return getUser(_0x4f31bf,_0x24551b[_0x7d54('0x9')],_0x2c6e08);})[_0x7d54('0x25')](function(_0x338095){_0x1d3f42=_0x338095;logger[_0x7d54('0x7')]('The\x20User\x20ID\x20is:',_0x1d3f42['id']);return getEndUser(_0x4f31bf,_0x567490[_0x7d54('0x66')],_0x567490[_0x7d54('0x67')],_0x2c6e08);})[_0x7d54('0x25')](function(_0x573c4e){_0x460ada=_0x573c4e;logger[_0x7d54('0x7')]('The\x20Enduser\x20ID\x20is:',_0x460ada['id']);return getTicket(_0x4f31bf,_0x1d3f42,_0x460ada,_0x1d488a,_0x567490,_0x1d488a['Fields'],_0x2c6e08,_0x7d54('0x68'));})[_0x7d54('0x25')](function(_0x42ea01){_0x12f618=_0x42ea01;logger[_0x7d54('0x7')](_0x7d54('0x59'));logger[_0x7d54('0x7')](_0x7d54('0x69'),_0x12f618['id']);return setRelationship(_0x2c6e08,_0x1d3f42,_0x12f618,_0x7d54('0x5a'));})[_0x7d54('0x25')](function(){return setRelationship(_0x2c6e08,_0x460ada,_0x12f618,'contacts');})[_0x7d54('0x25')](function(){return getServerInfo(_0x2c6e08);})[_0x7d54('0x25')](function(_0xd2e9a3){var _0x4ada27=parseInt(_0xd2e9a3['version'][_0x7d54('0x5c')](0x0));var _0x38c6d4=util[_0x7d54('0x1b')](_0x7d54('0x5d'),_0x4f31bf[_0x7d54('0x4a')],_0x12f618['id']);if(_0x4ada27>0x6){_0x38c6d4=util['format']('%s/#bwc/index.php?module=Calls&action=EditView&record=%s',_0x4f31bf[_0x7d54('0x4a')],_0x12f618['id']);}logger[_0x7d54('0x7')](_0x7d54('0x65'),_0x7d54('0x60'));emit(util[_0x7d54('0x1b')]('user:%s',_0x24551b[_0x7d54('0x9')]),'trigger:browser:url',{'uri':_0x38c6d4});})['catch'](function(_0x2554c6){logger[_0x7d54('0x63')]('[OUTBOUND]',JSON[_0x7d54('0x19')](_0x2554c6));});};exports['unmanaged']=function(_0x29ad43,_0x283979,_0x3293bd,_0x56299b,_0xee5aac,_0x14f576){var _0x5e9d03,_0x3b66b0,_0x1fdf53,_0x5f20f3;_0x14f576[_0x7d54('0x4a')]=intUtil[_0x7d54('0x4b')](_0x14f576[_0x7d54('0x4a')]);_0x14f576['serverUrl']=intUtil[_0x7d54('0x4b')](_0x14f576['serverUrl']);def['uri']=util[_0x7d54('0x1b')](_0x7d54('0x4e'),_0x14f576['remoteUri']);if(_0xee5aac&&_0xee5aac[_0x7d54('0x4f')]){logger[_0x7d54('0x7')]('['+_0x283979[_0x7d54('0x6a')][_0x7d54('0x6b')]()+']','Recording\x20is\x20enabled!');_0x283979[_0x7d54('0x51')]=util[_0x7d54('0x1b')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x14f576['serverUrl'],_0x283979[_0x7d54('0x53')],md5(_0x283979[_0x7d54('0x53')]));}else{_0x283979['recordingURL']='';}return getConnection(_0x14f576)[_0x7d54('0x25')](function(_0x7f49e4){_0x5f20f3=_0x7f49e4;if(!_[_0x7d54('0x21')](_0x56299b)){return getUser(_0x14f576,_0x56299b[_0x7d54('0x9')],_0x5f20f3);}else{return getUser(_0x14f576,null,_0x5f20f3);}})[_0x7d54('0x25')](function(_0x2fd3c4){_0x5e9d03=_0x2fd3c4;logger[_0x7d54('0x7')]('The\x20User\x20ID\x20is:',_0x5e9d03['id']);return getEndUser(_0x14f576,_0x283979[_0x7d54('0x6c')],_0x283979[_0x7d54('0x55')],_0x5f20f3);})[_0x7d54('0x25')](function(_0x3f1166){_0x3b66b0=_0x3f1166;logger[_0x7d54('0x7')](_0x7d54('0x56'),_0x3b66b0['id']);return getTicket(_0x14f576,_0x5e9d03,_0x3b66b0,_0x3293bd,_0x283979,_0x3293bd['Fields'],_0x5f20f3,_0x7d54('0x58'));})['then'](function(_0x50c5aa){_0x1fdf53=_0x50c5aa;logger['info'](_0x7d54('0x59'));logger['info'](_0x7d54('0x69'),_0x1fdf53['id']);return setRelationship(_0x5f20f3,_0x5e9d03,_0x1fdf53,'users');})['then'](function(){return setRelationship(_0x5f20f3,_0x3b66b0,_0x1fdf53,'contacts');})[_0x7d54('0x25')](function(){return getServerInfo(_0x5f20f3);})[_0x7d54('0x62')](function(_0x522836){logger[_0x7d54('0x63')]('['+_0x283979['lastevent'][_0x7d54('0x6b')]()+']',JSON[_0x7d54('0x19')](_0x522836));});}; \ No newline at end of file diff --git a/server/services/ami/trigger/integration/util.js b/server/services/ami/trigger/integration/util.js index cdab6b6..38ec10d 100644 --- a/server/services/ami/trigger/integration/util.js +++ b/server/services/ami/trigger/integration/util.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xafa0=['%s:\x20%s','keyContent','join','stripTrailingSlash','slice','substring','lastIndexOf','validateEmail','isNil','test','lodash','util','getString','length','sortBy','type','push','content','variable','variableName','toString','customVariable','Variable','name','toLowerCase','keyType','string','key','format'];(function(_0x110715,_0x16864b){var _0x4384cd=function(_0x3e41d8){while(--_0x3e41d8){_0x110715['push'](_0x110715['shift']());}};_0x4384cd(++_0x16864b);}(_0xafa0,0x7e));var _0x0afa=function(_0x10ec51,_0x2320ca){_0x10ec51=_0x10ec51-0x0;var _0xfa32b6=_0xafa0[_0x10ec51];return _0xfa32b6;};'use strict';var _=require(_0x0afa('0x0'));var util=require(_0x0afa('0x1'));exports[_0x0afa('0x2')]=function(_0x4cafed,_0x30dcd4,_0x52d058){var _0x16b876=[];if(_0x4cafed[_0x0afa('0x3')]>0x0){var _0x3d8edb=_[_0x0afa('0x4')](_0x4cafed,['id']);for(var _0x349622=0x0;_0x349622<_0x3d8edb['length'];_0x349622++){var _0x3db671=_0x3d8edb[_0x349622];if(_0x3db671[_0x0afa('0x5')]==='string'){_0x16b876[_0x0afa('0x6')](_0x3db671[_0x0afa('0x7')]);}else if(_0x3db671[_0x0afa('0x5')]===_0x0afa('0x8')&&_0x3db671[_0x0afa('0x9')]){_0x30dcd4[_0x3db671['variableName']]&&_0x16b876['push'](_0x30dcd4[_0x3db671[_0x0afa('0x9')]][_0x0afa('0xa')]());}else if(_0x3db671[_0x0afa('0x5')]===_0x0afa('0xb')&&_0x3db671['Variable']&&_0x3db671[_0x0afa('0xc')][_0x0afa('0xd')]){_0x30dcd4[_0x3db671[_0x0afa('0xc')][_0x0afa('0xd')][_0x0afa('0xe')]()]&&_0x16b876[_0x0afa('0x6')](_0x30dcd4[_0x3db671['Variable'][_0x0afa('0xd')][_0x0afa('0xe')]()][_0x0afa('0xa')]());}else if(_0x3db671[_0x0afa('0x5')]==='keyValue'){if(_0x3db671[_0x0afa('0xf')]===_0x0afa('0x10')&&_0x3db671[_0x0afa('0x11')]){_0x16b876[_0x0afa('0x6')](util[_0x0afa('0x12')](_0x0afa('0x13'),_0x3db671['key'],_0x3db671[_0x0afa('0x14')]));}else if(_0x3db671['keyType']===_0x0afa('0x8')&&_0x3db671[_0x0afa('0x9')]&&_0x3db671[_0x0afa('0x11')]){_0x30dcd4[_0x3db671[_0x0afa('0x9')]]&&_0x16b876[_0x0afa('0x6')](util['format'](_0x0afa('0x13'),_0x3db671[_0x0afa('0x11')],_0x30dcd4[_0x3db671[_0x0afa('0x9')]]));}else if(_0x3db671[_0x0afa('0xf')]===_0x0afa('0xb')&&_0x3db671[_0x0afa('0xc')]&&_0x3db671[_0x0afa('0xc')]['name']&&_0x3db671['key']){_0x30dcd4[_0x3db671[_0x0afa('0xc')][_0x0afa('0xd')][_0x0afa('0xe')]()]&&_0x16b876[_0x0afa('0x6')](util['format'](_0x0afa('0x13'),_0x3db671[_0x0afa('0x11')],_0x30dcd4[_0x3db671[_0x0afa('0xc')][_0x0afa('0xd')]['toLowerCase']()]));}}}}return _0x16b876[_0x0afa('0x15')](_0x52d058);};exports[_0x0afa('0x16')]=function(_0x11458c){var _0x88c0c7=_0x11458c[_0x0afa('0x17')](-0x1);if(_0x88c0c7==='/'){_0x11458c=_0x11458c[_0x0afa('0x18')](0x0,_0x11458c[_0x0afa('0x19')](_0x88c0c7));}return _0x11458c;};exports[_0x0afa('0x1a')]=function(_0x589cb4){if(!_[_0x0afa('0x1b')](_0x589cb4)&&_0x589cb4!==''){var _0x14d84b=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return _0x14d84b[_0x0afa('0x1c')](String(_0x589cb4)[_0x0afa('0xe')]());}else{return![];}}; \ No newline at end of file +var _0x60a9=['variable','variableName','Variable','name','toLowerCase','toString','keyValue','keyType','key','format','%s:\x20%s','keyContent','customVariable','stripTrailingSlash','slice','substring','validateEmail','isNil','test','util','getString','length','type','string','push'];(function(_0x527a6c,_0x15b18d){var _0x4c780d=function(_0xebc03){while(--_0xebc03){_0x527a6c['push'](_0x527a6c['shift']());}};_0x4c780d(++_0x15b18d);}(_0x60a9,0x1a3));var _0x960a=function(_0x3d1267,_0x34563e){_0x3d1267=_0x3d1267-0x0;var _0x29b481=_0x60a9[_0x3d1267];return _0x29b481;};'use strict';var _=require('lodash');var util=require(_0x960a('0x0'));exports[_0x960a('0x1')]=function(_0x520609,_0x235544,_0x2aac63){var _0x36d687=[];if(_0x520609[_0x960a('0x2')]>0x0){var _0x54385d=_['sortBy'](_0x520609,['id']);for(var _0x289d99=0x0;_0x289d99<_0x54385d['length'];_0x289d99++){var _0x44bd61=_0x54385d[_0x289d99];if(_0x44bd61[_0x960a('0x3')]===_0x960a('0x4')){_0x36d687[_0x960a('0x5')](_0x44bd61['content']);}else if(_0x44bd61[_0x960a('0x3')]===_0x960a('0x6')&&_0x44bd61[_0x960a('0x7')]){_0x235544[_0x44bd61[_0x960a('0x7')]]&&_0x36d687[_0x960a('0x5')](_0x235544[_0x44bd61[_0x960a('0x7')]]['toString']());}else if(_0x44bd61[_0x960a('0x3')]==='customVariable'&&_0x44bd61['Variable']&&_0x44bd61[_0x960a('0x8')][_0x960a('0x9')]){_0x235544[_0x44bd61['Variable']['name'][_0x960a('0xa')]()]&&_0x36d687[_0x960a('0x5')](_0x235544[_0x44bd61['Variable'][_0x960a('0x9')][_0x960a('0xa')]()][_0x960a('0xb')]());}else if(_0x44bd61[_0x960a('0x3')]===_0x960a('0xc')){if(_0x44bd61[_0x960a('0xd')]===_0x960a('0x4')&&_0x44bd61[_0x960a('0xe')]){_0x36d687[_0x960a('0x5')](util[_0x960a('0xf')](_0x960a('0x10'),_0x44bd61[_0x960a('0xe')],_0x44bd61[_0x960a('0x11')]));}else if(_0x44bd61[_0x960a('0xd')]==='variable'&&_0x44bd61[_0x960a('0x7')]&&_0x44bd61['key']){_0x235544[_0x44bd61[_0x960a('0x7')]]&&_0x36d687['push'](util[_0x960a('0xf')](_0x960a('0x10'),_0x44bd61[_0x960a('0xe')],_0x235544[_0x44bd61[_0x960a('0x7')]]));}else if(_0x44bd61[_0x960a('0xd')]===_0x960a('0x12')&&_0x44bd61[_0x960a('0x8')]&&_0x44bd61[_0x960a('0x8')][_0x960a('0x9')]&&_0x44bd61['key']){_0x235544[_0x44bd61[_0x960a('0x8')][_0x960a('0x9')]['toLowerCase']()]&&_0x36d687[_0x960a('0x5')](util[_0x960a('0xf')]('%s:\x20%s',_0x44bd61[_0x960a('0xe')],_0x235544[_0x44bd61[_0x960a('0x8')]['name'][_0x960a('0xa')]()]));}}}}return _0x36d687['join'](_0x2aac63);};exports[_0x960a('0x13')]=function(_0x1b9c75){var _0x222265=_0x1b9c75[_0x960a('0x14')](-0x1);if(_0x222265==='/'){_0x1b9c75=_0x1b9c75[_0x960a('0x15')](0x0,_0x1b9c75['lastIndexOf'](_0x222265));}return _0x1b9c75;};exports[_0x960a('0x16')]=function(_0x1f66b1){if(!_[_0x960a('0x17')](_0x1f66b1)&&_0x1f66b1!==''){var _0xcc470=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return _0xcc470[_0x960a('0x18')](String(_0x1f66b1)[_0x960a('0xa')]());}else{return![];}}; \ No newline at end of file diff --git a/server/services/ami/trigger/integration/vtiger.js b/server/services/ami/trigger/integration/vtiger.js index 34839cb..09985a1 100644 --- a/server/services/ami/trigger/integration/vtiger.js +++ b/server/services/ami/trigger/integration/vtiger.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9c44=['stringify','validateEmail','Getting\x20agent\x20with\x20email','GET','%s/webservice.php','SELECT\x20first_name,\x20last_name,\x20email1\x20FROM\x20Users\x20WHERE\x20email1=\x27%s\x27;','success','length','Agent\x20found!','email1','first_name','last_name','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','userId','getUser','admin','Searching\x20end\x20user\x20with\x20phone','SELECT\x20id,\x20firstname,\x20lastname,\x20email,\x20phone,\x20mobile,\x20homephone,\x20otherphone,\x20assistantphone\x20FROM\x20Contacts\x20WHERE\x20phone\x20=\x20\x27%s\x27\x20OR\x20mobile\x20=\x27%s\x27\x20OR\x20homephone\x20=\x27%s\x27\x20OR\x20otherphone\x20=\x27%s\x27\x20OR\x20assistantphone\x20=\x27%s\x27;','Enduser\x20found!','firstname','lastname','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','Contacts','Enduser\x20created.','phone','getEndUser','accessKey','login','Account\x20%d\x20is\x20not\x20valid','getConnection','[HTTP]','queue','stripTrailingSlash','[QUEUE]','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','serverUrl','uniqueid','recordingURL','email','The\x20User\x20ID\x20is:','calleridname','The\x20Enduser\x20ID\x20is:','Fields','The\x20Ticket\x20ID\x20is:','split','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','recordingFormat','none','[OUTBOUND]','Recording\x20is\x20enabled!','destcalleridname','destcalleridnum','Ticket\x20created!','%s/index.php?module=HelpDesk&view=Detail&record=%s&app=SUPPORT','trigger:browser:url','unmanaged','monitor_format','toUpperCase','calleridnum','lastevent','bluebird','md5','util','ioredis','./util','../../../../config/environment','redis','localhost','socket.io-emitter','emit','forEach','string','picklist','idField','content','type','variable','variableName','toString','customVariable','Variable','name','toLowerCase','info','Creating\x20new\x20ticket...','merge','Normal','Open','getString','Subjects','POST','remoteUri','create','username','sessionName','then','resolve','result','format','Ticket\x20could\x20not\x20be\x20created\x20due\x20to:\x20%s','catch','statusCode','error','[vTiger],\x20%s,\x20%s,\x20%s'];(function(_0x4b462b,_0x4d4a00){var _0xfe6ab4=function(_0x1a9dc5){while(--_0x1a9dc5){_0x4b462b['push'](_0x4b462b['shift']());}};_0xfe6ab4(++_0x4d4a00);}(_0x9c44,0x178));var _0x49c4=function(_0x2d2c16,_0x4e88b6){_0x2d2c16=_0x2d2c16-0x0;var _0x53f2fb=_0x9c44[_0x2d2c16];return _0x53f2fb;};'use strict';var _=require('lodash');var rp=require('request-promise');var BPromise=require(_0x49c4('0x0'));var md5=require(_0x49c4('0x1'));var util=require(_0x49c4('0x2'));var Redis=require(_0x49c4('0x3'));var intUtil=require(_0x49c4('0x4'));var config=require(_0x49c4('0x5'));var logger=require('../../../../config/logger')('vTiger');config[_0x49c4('0x6')]=_['defaults'](config[_0x49c4('0x6')],{'host':_0x49c4('0x7'),'port':0x18eb});var io=require(_0x49c4('0x8'))(new Redis(config[_0x49c4('0x6')]));function emit(_0x436234,_0x511d53,_0x11c586){io['to'](_0x436234)[_0x49c4('0x9')](_0x511d53,_0x11c586);}function getCustomFields(_0x1d13fb,_0x4487ca){var _0x4c7d3a={};if(_0x1d13fb['length']>0x0){_[_0x49c4('0xa')](_0x1d13fb,function(_0x313e73){if(_['includes']([_0x49c4('0xb'),_0x49c4('0xc')],_0x313e73['type'])&&_0x313e73['idField']){_0x4c7d3a[_0x313e73[_0x49c4('0xd')]]=_0x313e73[_0x49c4('0xe')]['toString']();}else if(_0x313e73[_0x49c4('0xf')]===_0x49c4('0x10')&&_0x313e73['variableName']&&_0x313e73[_0x49c4('0xd')]&&_0x4487ca[_0x313e73[_0x49c4('0x11')]]){_0x4c7d3a[_0x313e73[_0x49c4('0xd')]]=_0x4487ca[_0x313e73[_0x49c4('0x11')]][_0x49c4('0x12')]();}else if(_0x313e73[_0x49c4('0xf')]===_0x49c4('0x13')&&_0x313e73[_0x49c4('0x14')]&&_0x313e73['Variable'][_0x49c4('0x15')]&&_0x313e73[_0x49c4('0xd')]&&_0x4487ca[_0x313e73[_0x49c4('0x14')][_0x49c4('0x15')][_0x49c4('0x16')]()]){_0x4c7d3a[_0x313e73['idField']]=_0x4487ca[_0x313e73[_0x49c4('0x14')][_0x49c4('0x15')]['toLowerCase']()]['toString']();}});}return _0x4c7d3a;}function createTicket(_0x3c782d,_0x2f82d5,_0x3addb2,_0x59f29b,_0x24856d,_0x50b151,_0x2cbd50){logger[_0x49c4('0x17')](_0x49c4('0x18'));var _0x291526=_[_0x49c4('0x19')]({'parent_id':'','assigned_user_id':_0x2f82d5['id'],'ticketpriorities':_0x49c4('0x1a'),'ticketstatus':_0x49c4('0x1b'),'ticket_title':intUtil[_0x49c4('0x1c')](_0x59f29b[_0x49c4('0x1d')],_0x24856d,'\x20'),'description':intUtil['getString'](_0x59f29b['Descriptions'],_0x24856d,'\x0a'),'contact_id':_0x3addb2['id']},getCustomFields(_0x50b151,_0x24856d));var _0x57f502={'method':_0x49c4('0x1e'),'uri':util['format']('%s/webservice.php',_0x3c782d[_0x49c4('0x1f')]),'form':{'operation':_0x49c4('0x20'),'username':_0x3c782d[_0x49c4('0x21')],'sessionName':_0x2cbd50[_0x49c4('0x22')],'elementType':'HelpDesk','element':JSON['stringify'](_0x291526)},'json':!![]};return request(_0x57f502)[_0x49c4('0x23')](function(_0x9cb797){if(_0x9cb797['success']){return BPromise[_0x49c4('0x24')]({'id':_0x9cb797[_0x49c4('0x25')]['id']});}else{throw new Error(util[_0x49c4('0x26')](_0x49c4('0x27'),JSON['stringify'](_0x9cb797['error'])));}})[_0x49c4('0x28')](function(_0x53c199){var _0x3800b7=_0x53c199[_0x49c4('0x29')]||0x1f4;logger[_0x49c4('0x2a')](_0x49c4('0x2b'),'createTicket',_0x3800b7,JSON[_0x49c4('0x2c')](_0x53c199));});}function getUser(_0x2b2793,_0x46e04d,_0x4f28a2){if(intUtil[_0x49c4('0x2d')](_0x46e04d)){logger[_0x49c4('0x17')](_0x49c4('0x2e'),_0x46e04d);return request({'method':_0x49c4('0x2f'),'uri':util[_0x49c4('0x26')](_0x49c4('0x30'),_0x2b2793[_0x49c4('0x1f')]),'qs':{'operation':'query','username':_0x2b2793['username'],'sessionName':_0x4f28a2['sessionName'],'query':util[_0x49c4('0x26')](_0x49c4('0x31'),_0x46e04d)},'json':!![]})[_0x49c4('0x23')](function(_0x27e467){if(_0x27e467[_0x49c4('0x32')]&&_0x27e467['result'][_0x49c4('0x33')]){logger[_0x49c4('0x17')](_0x49c4('0x34'));return BPromise[_0x49c4('0x24')]({'id':_0x27e467['result'][0x0]['id'],'email':_0x27e467['result'][0x0][_0x49c4('0x35')],'name':_0x27e467[_0x49c4('0x25')][0x0][_0x49c4('0x36')]+'\x20'+_0x27e467[_0x49c4('0x25')][_0x49c4('0x37')]});}else{logger['info'](_0x49c4('0x38'));return BPromise[_0x49c4('0x24')]({'id':_0x4f28a2[_0x49c4('0x39')],'email':_0x2b2793['username'],'name':'admin'});}})[_0x49c4('0x28')](function(_0x1991e9){var _0x3bec0a=_0x1991e9[_0x49c4('0x29')]||0x1f4;logger[_0x49c4('0x2a')](_0x49c4('0x2b'),_0x49c4('0x3a'),_0x3bec0a,JSON[_0x49c4('0x2c')](_0x1991e9));});}else{logger[_0x49c4('0x17')]('Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!');return BPromise[_0x49c4('0x24')]({'id':_0x4f28a2['userId'],'email':_0x2b2793[_0x49c4('0x21')],'name':_0x49c4('0x3b')})[_0x49c4('0x28')](function(_0x1c2830){var _0x4ed4f8=_0x1c2830[_0x49c4('0x29')]||0x1f4;logger[_0x49c4('0x2a')](_0x49c4('0x2b'),'getUser',_0x4ed4f8,JSON[_0x49c4('0x2c')](_0x1c2830));});}}function getEndUser(_0x21d8c7,_0x178987,_0x5e5366,_0x1ba7a0){logger[_0x49c4('0x17')](_0x49c4('0x3c'),_0x5e5366);return request({'method':_0x49c4('0x2f'),'uri':util[_0x49c4('0x26')](_0x49c4('0x30'),_0x21d8c7[_0x49c4('0x1f')]),'qs':{'operation':'query','username':_0x21d8c7[_0x49c4('0x21')],'sessionName':_0x1ba7a0[_0x49c4('0x22')],'query':util[_0x49c4('0x26')](_0x49c4('0x3d'),_0x5e5366,_0x5e5366,_0x5e5366,_0x5e5366,_0x5e5366)},'json':!![]})[_0x49c4('0x23')](function(_0x29dd5d){if(_0x29dd5d[_0x49c4('0x32')]&&_0x29dd5d[_0x49c4('0x25')][_0x49c4('0x33')]){logger[_0x49c4('0x17')](_0x49c4('0x3e'));return BPromise[_0x49c4('0x24')]({'id':_0x29dd5d[_0x49c4('0x25')][0x0]['id'],'name':_0x29dd5d['result'][0x0][_0x49c4('0x3f')]+'\x20'+_0x29dd5d['result'][0x0][_0x49c4('0x40')],'phone':_0x5e5366});}else{logger[_0x49c4('0x17')](_0x49c4('0x41'));return request({'method':_0x49c4('0x1e'),'uri':util[_0x49c4('0x26')](_0x49c4('0x30'),_0x21d8c7['remoteUri']),'form':{'operation':'create','sessionName':_0x1ba7a0[_0x49c4('0x22')],'elementType':_0x49c4('0x42'),'element':JSON[_0x49c4('0x2c')]({'lastname':_0x178987,'phone':_0x5e5366,'assigned_user_id':'\x20'})},'json':!![]})[_0x49c4('0x23')](function(_0x490823){logger[_0x49c4('0x17')](_0x49c4('0x43'));return BPromise[_0x49c4('0x24')]({'id':_0x490823[_0x49c4('0x25')]['id'],'name':_0x490823[_0x49c4('0x25')][_0x49c4('0x40')],'phone':_0x490823[_0x49c4('0x25')][_0x49c4('0x44')]});})[_0x49c4('0x28')](function(_0x5640d3){var _0x2ad771=_0x5640d3['statusCode']||0x1f4;logger[_0x49c4('0x2a')](_0x49c4('0x2b'),_0x49c4('0x45'),_0x2ad771,JSON[_0x49c4('0x2c')](_0x5640d3));});}});}function getConnection(_0x2d93d8){var _0x5b296d=_0x2d93d8[_0x49c4('0x21')];var _0x15b674=_0x2d93d8[_0x49c4('0x46')];return request({'method':_0x49c4('0x2f'),'uri':util[_0x49c4('0x26')](_0x49c4('0x30'),_0x2d93d8[_0x49c4('0x1f')]),'qs':{'operation':'getchallenge','username':_0x5b296d},'json':!![]})[_0x49c4('0x23')](function(_0x5cfff9){if(_0x5cfff9[_0x49c4('0x32')]){return request({'method':_0x49c4('0x1e'),'uri':util[_0x49c4('0x26')](_0x49c4('0x30'),_0x2d93d8[_0x49c4('0x1f')]),'form':{'operation':_0x49c4('0x47'),'username':_0x5b296d,'accessKey':md5(_0x5cfff9[_0x49c4('0x25')]['token']+_0x15b674)},'json':!![]});}})[_0x49c4('0x23')](function(_0x3feaf0){if(_0x3feaf0['success']){return BPromise[_0x49c4('0x24')](_0x3feaf0[_0x49c4('0x25')]);}else{throw new Error(util[_0x49c4('0x26')](_0x49c4('0x48'),_0x2d93d8['id']));}})['catch'](function(_0x5d8bf0){var _0x144fd2=_0x5d8bf0['statusCode']||0x1f4;logger[_0x49c4('0x2a')](_0x49c4('0x2b'),_0x49c4('0x49'),_0x144fd2,JSON[_0x49c4('0x2c')](_0x5d8bf0));});}function request(_0x240c20){logger[_0x49c4('0x17')](_0x49c4('0x4a'),JSON['stringify'](_0x240c20));return rp(_0x240c20);}exports[_0x49c4('0x4b')]=function(_0x1550ce,_0x3936d3,_0x3d944c,_0x17ef75,_0x2644c0,_0x156748){var _0x25d174,_0x1e0b4f,_0x1856be,_0x5b822f;_0x156748['remoteUri']=intUtil[_0x49c4('0x4c')](_0x156748[_0x49c4('0x1f')]);if(_0x2644c0&&_0x2644c0['monitor_format']){logger['info'](_0x49c4('0x4d'),'Recording\x20is\x20enabled!');_0x3936d3['recordingURL']=util[_0x49c4('0x26')](_0x49c4('0x4e'),_0x156748[_0x49c4('0x4f')],_0x3936d3[_0x49c4('0x50')],md5(_0x3936d3[_0x49c4('0x50')]));}else{_0x3936d3[_0x49c4('0x51')]='';}return getConnection(_0x156748)[_0x49c4('0x23')](function(_0x50798e){_0x5b822f=_0x50798e;return getUser(_0x156748,_0x17ef75[_0x49c4('0x52')],_0x5b822f);})[_0x49c4('0x23')](function(_0x207572){_0x25d174=_0x207572;logger[_0x49c4('0x17')](_0x49c4('0x53'),_0x25d174['id']);return getEndUser(_0x156748,_0x3936d3[_0x49c4('0x54')],_0x3936d3['calleridnum'],_0x5b822f);})['then'](function(_0x1ef0c1){_0x1e0b4f=_0x1ef0c1;logger[_0x49c4('0x17')](_0x49c4('0x55'),_0x1e0b4f['id']);return createTicket(_0x156748,_0x25d174,_0x1e0b4f,_0x3d944c,_0x3936d3,_0x3d944c[_0x49c4('0x56')],_0x5b822f);})[_0x49c4('0x23')](function(_0x6b2592){_0x1856be=_0x6b2592;logger[_0x49c4('0x17')]('Ticket\x20created!');logger[_0x49c4('0x17')](_0x49c4('0x57'),_0x1856be['id']);var _0x4ba4eb=util[_0x49c4('0x26')]('%s/index.php?module=HelpDesk&view=Detail&record=%s&app=SUPPORT',_0x156748[_0x49c4('0x1f')],_[_0x49c4('0x58')](_0x1856be['id'],'x')[0x1]);logger[_0x49c4('0x17')](_0x49c4('0x4d'),_0x49c4('0x59'));emit(util[_0x49c4('0x26')](_0x49c4('0x5a'),_0x17ef75[_0x49c4('0x15')]),'trigger:browser:url',{'uri':_0x4ba4eb});})[_0x49c4('0x28')](function(_0x27b9c2){logger['error'](_0x49c4('0x4d'),JSON[_0x49c4('0x2c')](_0x27b9c2));});};exports['outbound']=function(_0x39c455,_0x42e0e6,_0x4f50bf,_0x4dc54d,_0x589484,_0x513879,_0xc43386){var _0x54947d,_0xb20a5d,_0x32f344,_0x515240;_0x513879[_0x49c4('0x1f')]=intUtil[_0x49c4('0x4c')](_0x513879['remoteUri']);_0x513879[_0x49c4('0x4f')]=intUtil[_0x49c4('0x4c')](_0x513879[_0x49c4('0x4f')]);if(_0xc43386&&_0xc43386[_0x49c4('0x5b')]&&_0xc43386['recordingFormat']!==_0x49c4('0x5c')){logger[_0x49c4('0x17')](_0x49c4('0x5d'),_0x49c4('0x5e'));_0x42e0e6['recordingURL']=util[_0x49c4('0x26')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x513879['serverUrl'],_0x42e0e6['uniqueid'],md5(_0x42e0e6['uniqueid']));}return getConnection(_0x513879)[_0x49c4('0x23')](function(_0x32eaef){_0x515240=_0x32eaef;return getUser(_0x513879,_0x4dc54d[_0x49c4('0x52')],_0x515240);})[_0x49c4('0x23')](function(_0x5b056e){_0x54947d=_0x5b056e;logger['info'](_0x49c4('0x53'),_0x54947d['id']);return getEndUser(_0x513879,_0x42e0e6[_0x49c4('0x5f')],_0x42e0e6[_0x49c4('0x60')],_0x515240);})[_0x49c4('0x23')](function(_0x102c15){_0xb20a5d=_0x102c15;logger[_0x49c4('0x17')](_0x49c4('0x55'),_0xb20a5d['id']);return createTicket(_0x513879,_0x54947d,_0xb20a5d,_0x4f50bf,_0x42e0e6,_0x4f50bf[_0x49c4('0x56')],_0x515240);})['then'](function(_0x2276db){_0x32f344=_0x2276db;logger['info'](_0x49c4('0x61'));logger[_0x49c4('0x17')](_0x49c4('0x57'),_0x32f344['id']);var _0x1ea1b4=util[_0x49c4('0x26')](_0x49c4('0x62'),_0x513879[_0x49c4('0x1f')],_[_0x49c4('0x58')](_0x32f344['id'],'x')[0x1]);logger[_0x49c4('0x17')](_0x49c4('0x5d'),_0x49c4('0x59'));emit(util[_0x49c4('0x26')](_0x49c4('0x5a'),_0x4dc54d[_0x49c4('0x15')]),_0x49c4('0x63'),{'uri':_0x1ea1b4});})[_0x49c4('0x28')](function(_0x371e49){logger[_0x49c4('0x2a')]('[OUTBOUND]',JSON['stringify'](_0x371e49));});};exports[_0x49c4('0x64')]=function(_0x16b3e8,_0x4af680,_0x1a15f3,_0x38ad50,_0x2939fd,_0x16e7b1){var _0x4d6aaa,_0x5a14a5,_0x4a85d4,_0x2e90d8;_0x16e7b1[_0x49c4('0x1f')]=intUtil[_0x49c4('0x4c')](_0x16e7b1[_0x49c4('0x1f')]);_0x16e7b1[_0x49c4('0x4f')]=intUtil[_0x49c4('0x4c')](_0x16e7b1[_0x49c4('0x4f')]);if(_0x2939fd&&_0x2939fd[_0x49c4('0x65')]){logger[_0x49c4('0x17')]('['+_0x4af680['lastevent'][_0x49c4('0x66')]()+']',_0x49c4('0x5e'));_0x4af680[_0x49c4('0x51')]=util['format'](_0x49c4('0x4e'),_0x16e7b1[_0x49c4('0x4f')],_0x4af680[_0x49c4('0x50')],md5(_0x4af680[_0x49c4('0x50')]));}else{_0x4af680[_0x49c4('0x51')]='';}return getConnection(_0x16e7b1)[_0x49c4('0x23')](function(_0x35fa39){_0x2e90d8=_0x35fa39;return getUser(_0x16e7b1,'',_0x2e90d8);})[_0x49c4('0x23')](function(_0x4ba198){_0x4d6aaa=_0x4ba198;logger[_0x49c4('0x17')](_0x49c4('0x53'),_0x4d6aaa['id']);return getEndUser(_0x16e7b1,_0x4af680[_0x49c4('0x54')],_0x4af680[_0x49c4('0x67')],_0x2e90d8);})[_0x49c4('0x23')](function(_0x4a204d){_0x5a14a5=_0x4a204d;logger['info'](_0x49c4('0x55'),_0x5a14a5['id']);return createTicket(_0x16e7b1,_0x4d6aaa,_0x5a14a5,_0x1a15f3,_0x4af680,_0x1a15f3['Fields'],_0x2e90d8);})[_0x49c4('0x23')](function(_0x558880){_0x4a85d4=_0x558880;logger[_0x49c4('0x17')](_0x49c4('0x61'));logger[_0x49c4('0x17')](_0x49c4('0x57'),_0x4a85d4['id']);})['catch'](function(_0x123060){logger[_0x49c4('0x2a')]('['+_0x4af680[_0x49c4('0x68')][_0x49c4('0x66')]()+']',JSON[_0x49c4('0x2c')](_0x123060));});}; \ No newline at end of file +var _0x9c44=['stringify','validateEmail','Getting\x20agent\x20with\x20email','GET','%s/webservice.php','SELECT\x20first_name,\x20last_name,\x20email1\x20FROM\x20Users\x20WHERE\x20email1=\x27%s\x27;','success','length','Agent\x20found!','email1','first_name','last_name','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','userId','getUser','admin','Searching\x20end\x20user\x20with\x20phone','SELECT\x20id,\x20firstname,\x20lastname,\x20email,\x20phone,\x20mobile,\x20homephone,\x20otherphone,\x20assistantphone\x20FROM\x20Contacts\x20WHERE\x20phone\x20=\x20\x27%s\x27\x20OR\x20mobile\x20=\x27%s\x27\x20OR\x20homephone\x20=\x27%s\x27\x20OR\x20otherphone\x20=\x27%s\x27\x20OR\x20assistantphone\x20=\x27%s\x27;','Enduser\x20found!','firstname','lastname','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','Contacts','Enduser\x20created.','phone','getEndUser','accessKey','login','Account\x20%d\x20is\x20not\x20valid','getConnection','[HTTP]','queue','stripTrailingSlash','[QUEUE]','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','serverUrl','uniqueid','recordingURL','email','The\x20User\x20ID\x20is:','calleridname','The\x20Enduser\x20ID\x20is:','Fields','The\x20Ticket\x20ID\x20is:','split','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','recordingFormat','none','[OUTBOUND]','Recording\x20is\x20enabled!','destcalleridname','destcalleridnum','Ticket\x20created!','%s/index.php?module=HelpDesk&view=Detail&record=%s&app=SUPPORT','trigger:browser:url','unmanaged','monitor_format','toUpperCase','calleridnum','lastevent','bluebird','md5','util','ioredis','./util','../../../../config/environment','redis','localhost','socket.io-emitter','emit','forEach','string','picklist','idField','content','type','variable','variableName','toString','customVariable','Variable','name','toLowerCase','info','Creating\x20new\x20ticket...','merge','Normal','Open','getString','Subjects','POST','remoteUri','create','username','sessionName','then','resolve','result','format','Ticket\x20could\x20not\x20be\x20created\x20due\x20to:\x20%s','catch','statusCode','error','[vTiger],\x20%s,\x20%s,\x20%s'];(function(_0xe4c26e,_0x3c2e8c){var _0x48720c=function(_0xaae25a){while(--_0xaae25a){_0xe4c26e['push'](_0xe4c26e['shift']());}};_0x48720c(++_0x3c2e8c);}(_0x9c44,0x178));var _0x49c4=function(_0x5f09c5,_0x2bfca0){_0x5f09c5=_0x5f09c5-0x0;var _0x426ad9=_0x9c44[_0x5f09c5];return _0x426ad9;};'use strict';var _=require('lodash');var rp=require('request-promise');var BPromise=require(_0x49c4('0x0'));var md5=require(_0x49c4('0x1'));var util=require(_0x49c4('0x2'));var Redis=require(_0x49c4('0x3'));var intUtil=require(_0x49c4('0x4'));var config=require(_0x49c4('0x5'));var logger=require('../../../../config/logger')('vTiger');config[_0x49c4('0x6')]=_['defaults'](config[_0x49c4('0x6')],{'host':_0x49c4('0x7'),'port':0x18eb});var io=require(_0x49c4('0x8'))(new Redis(config[_0x49c4('0x6')]));function emit(_0x436234,_0x511d53,_0x11c586){io['to'](_0x436234)[_0x49c4('0x9')](_0x511d53,_0x11c586);}function getCustomFields(_0x1d13fb,_0x4487ca){var _0x4c7d3a={};if(_0x1d13fb['length']>0x0){_[_0x49c4('0xa')](_0x1d13fb,function(_0x313e73){if(_['includes']([_0x49c4('0xb'),_0x49c4('0xc')],_0x313e73['type'])&&_0x313e73['idField']){_0x4c7d3a[_0x313e73[_0x49c4('0xd')]]=_0x313e73[_0x49c4('0xe')]['toString']();}else if(_0x313e73[_0x49c4('0xf')]===_0x49c4('0x10')&&_0x313e73['variableName']&&_0x313e73[_0x49c4('0xd')]&&_0x4487ca[_0x313e73[_0x49c4('0x11')]]){_0x4c7d3a[_0x313e73[_0x49c4('0xd')]]=_0x4487ca[_0x313e73[_0x49c4('0x11')]][_0x49c4('0x12')]();}else if(_0x313e73[_0x49c4('0xf')]===_0x49c4('0x13')&&_0x313e73[_0x49c4('0x14')]&&_0x313e73['Variable'][_0x49c4('0x15')]&&_0x313e73[_0x49c4('0xd')]&&_0x4487ca[_0x313e73[_0x49c4('0x14')][_0x49c4('0x15')][_0x49c4('0x16')]()]){_0x4c7d3a[_0x313e73['idField']]=_0x4487ca[_0x313e73[_0x49c4('0x14')][_0x49c4('0x15')]['toLowerCase']()]['toString']();}});}return _0x4c7d3a;}function createTicket(_0x3c782d,_0x2f82d5,_0x3addb2,_0x59f29b,_0x24856d,_0x50b151,_0x2cbd50){logger[_0x49c4('0x17')](_0x49c4('0x18'));var _0x291526=_[_0x49c4('0x19')]({'parent_id':'','assigned_user_id':_0x2f82d5['id'],'ticketpriorities':_0x49c4('0x1a'),'ticketstatus':_0x49c4('0x1b'),'ticket_title':intUtil[_0x49c4('0x1c')](_0x59f29b[_0x49c4('0x1d')],_0x24856d,'\x20'),'description':intUtil['getString'](_0x59f29b['Descriptions'],_0x24856d,'\x0a'),'contact_id':_0x3addb2['id']},getCustomFields(_0x50b151,_0x24856d));var _0x57f502={'method':_0x49c4('0x1e'),'uri':util['format']('%s/webservice.php',_0x3c782d[_0x49c4('0x1f')]),'form':{'operation':_0x49c4('0x20'),'username':_0x3c782d[_0x49c4('0x21')],'sessionName':_0x2cbd50[_0x49c4('0x22')],'elementType':'HelpDesk','element':JSON['stringify'](_0x291526)},'json':!![]};return request(_0x57f502)[_0x49c4('0x23')](function(_0x9cb797){if(_0x9cb797['success']){return BPromise[_0x49c4('0x24')]({'id':_0x9cb797[_0x49c4('0x25')]['id']});}else{throw new Error(util[_0x49c4('0x26')](_0x49c4('0x27'),JSON['stringify'](_0x9cb797['error'])));}})[_0x49c4('0x28')](function(_0x53c199){var _0x3800b7=_0x53c199[_0x49c4('0x29')]||0x1f4;logger[_0x49c4('0x2a')](_0x49c4('0x2b'),'createTicket',_0x3800b7,JSON[_0x49c4('0x2c')](_0x53c199));});}function getUser(_0x2b2793,_0x46e04d,_0x4f28a2){if(intUtil[_0x49c4('0x2d')](_0x46e04d)){logger[_0x49c4('0x17')](_0x49c4('0x2e'),_0x46e04d);return request({'method':_0x49c4('0x2f'),'uri':util[_0x49c4('0x26')](_0x49c4('0x30'),_0x2b2793[_0x49c4('0x1f')]),'qs':{'operation':'query','username':_0x2b2793['username'],'sessionName':_0x4f28a2['sessionName'],'query':util[_0x49c4('0x26')](_0x49c4('0x31'),_0x46e04d)},'json':!![]})[_0x49c4('0x23')](function(_0x27e467){if(_0x27e467[_0x49c4('0x32')]&&_0x27e467['result'][_0x49c4('0x33')]){logger[_0x49c4('0x17')](_0x49c4('0x34'));return BPromise[_0x49c4('0x24')]({'id':_0x27e467['result'][0x0]['id'],'email':_0x27e467['result'][0x0][_0x49c4('0x35')],'name':_0x27e467[_0x49c4('0x25')][0x0][_0x49c4('0x36')]+'\x20'+_0x27e467[_0x49c4('0x25')][_0x49c4('0x37')]});}else{logger['info'](_0x49c4('0x38'));return BPromise[_0x49c4('0x24')]({'id':_0x4f28a2[_0x49c4('0x39')],'email':_0x2b2793['username'],'name':'admin'});}})[_0x49c4('0x28')](function(_0x1991e9){var _0x3bec0a=_0x1991e9[_0x49c4('0x29')]||0x1f4;logger[_0x49c4('0x2a')](_0x49c4('0x2b'),_0x49c4('0x3a'),_0x3bec0a,JSON[_0x49c4('0x2c')](_0x1991e9));});}else{logger[_0x49c4('0x17')]('Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!');return BPromise[_0x49c4('0x24')]({'id':_0x4f28a2['userId'],'email':_0x2b2793[_0x49c4('0x21')],'name':_0x49c4('0x3b')})[_0x49c4('0x28')](function(_0x1c2830){var _0x4ed4f8=_0x1c2830[_0x49c4('0x29')]||0x1f4;logger[_0x49c4('0x2a')](_0x49c4('0x2b'),'getUser',_0x4ed4f8,JSON[_0x49c4('0x2c')](_0x1c2830));});}}function getEndUser(_0x21d8c7,_0x178987,_0x5e5366,_0x1ba7a0){logger[_0x49c4('0x17')](_0x49c4('0x3c'),_0x5e5366);return request({'method':_0x49c4('0x2f'),'uri':util[_0x49c4('0x26')](_0x49c4('0x30'),_0x21d8c7[_0x49c4('0x1f')]),'qs':{'operation':'query','username':_0x21d8c7[_0x49c4('0x21')],'sessionName':_0x1ba7a0[_0x49c4('0x22')],'query':util[_0x49c4('0x26')](_0x49c4('0x3d'),_0x5e5366,_0x5e5366,_0x5e5366,_0x5e5366,_0x5e5366)},'json':!![]})[_0x49c4('0x23')](function(_0x29dd5d){if(_0x29dd5d[_0x49c4('0x32')]&&_0x29dd5d[_0x49c4('0x25')][_0x49c4('0x33')]){logger[_0x49c4('0x17')](_0x49c4('0x3e'));return BPromise[_0x49c4('0x24')]({'id':_0x29dd5d[_0x49c4('0x25')][0x0]['id'],'name':_0x29dd5d['result'][0x0][_0x49c4('0x3f')]+'\x20'+_0x29dd5d['result'][0x0][_0x49c4('0x40')],'phone':_0x5e5366});}else{logger[_0x49c4('0x17')](_0x49c4('0x41'));return request({'method':_0x49c4('0x1e'),'uri':util[_0x49c4('0x26')](_0x49c4('0x30'),_0x21d8c7['remoteUri']),'form':{'operation':'create','sessionName':_0x1ba7a0[_0x49c4('0x22')],'elementType':_0x49c4('0x42'),'element':JSON[_0x49c4('0x2c')]({'lastname':_0x178987,'phone':_0x5e5366,'assigned_user_id':'\x20'})},'json':!![]})[_0x49c4('0x23')](function(_0x490823){logger[_0x49c4('0x17')](_0x49c4('0x43'));return BPromise[_0x49c4('0x24')]({'id':_0x490823[_0x49c4('0x25')]['id'],'name':_0x490823[_0x49c4('0x25')][_0x49c4('0x40')],'phone':_0x490823[_0x49c4('0x25')][_0x49c4('0x44')]});})[_0x49c4('0x28')](function(_0x5640d3){var _0x2ad771=_0x5640d3['statusCode']||0x1f4;logger[_0x49c4('0x2a')](_0x49c4('0x2b'),_0x49c4('0x45'),_0x2ad771,JSON[_0x49c4('0x2c')](_0x5640d3));});}});}function getConnection(_0x2d93d8){var _0x5b296d=_0x2d93d8[_0x49c4('0x21')];var _0x15b674=_0x2d93d8[_0x49c4('0x46')];return request({'method':_0x49c4('0x2f'),'uri':util[_0x49c4('0x26')](_0x49c4('0x30'),_0x2d93d8[_0x49c4('0x1f')]),'qs':{'operation':'getchallenge','username':_0x5b296d},'json':!![]})[_0x49c4('0x23')](function(_0x5cfff9){if(_0x5cfff9[_0x49c4('0x32')]){return request({'method':_0x49c4('0x1e'),'uri':util[_0x49c4('0x26')](_0x49c4('0x30'),_0x2d93d8[_0x49c4('0x1f')]),'form':{'operation':_0x49c4('0x47'),'username':_0x5b296d,'accessKey':md5(_0x5cfff9[_0x49c4('0x25')]['token']+_0x15b674)},'json':!![]});}})[_0x49c4('0x23')](function(_0x3feaf0){if(_0x3feaf0['success']){return BPromise[_0x49c4('0x24')](_0x3feaf0[_0x49c4('0x25')]);}else{throw new Error(util[_0x49c4('0x26')](_0x49c4('0x48'),_0x2d93d8['id']));}})['catch'](function(_0x5d8bf0){var _0x144fd2=_0x5d8bf0['statusCode']||0x1f4;logger[_0x49c4('0x2a')](_0x49c4('0x2b'),_0x49c4('0x49'),_0x144fd2,JSON[_0x49c4('0x2c')](_0x5d8bf0));});}function request(_0x240c20){logger[_0x49c4('0x17')](_0x49c4('0x4a'),JSON['stringify'](_0x240c20));return rp(_0x240c20);}exports[_0x49c4('0x4b')]=function(_0x1550ce,_0x3936d3,_0x3d944c,_0x17ef75,_0x2644c0,_0x156748){var _0x25d174,_0x1e0b4f,_0x1856be,_0x5b822f;_0x156748['remoteUri']=intUtil[_0x49c4('0x4c')](_0x156748[_0x49c4('0x1f')]);if(_0x2644c0&&_0x2644c0['monitor_format']){logger['info'](_0x49c4('0x4d'),'Recording\x20is\x20enabled!');_0x3936d3['recordingURL']=util[_0x49c4('0x26')](_0x49c4('0x4e'),_0x156748[_0x49c4('0x4f')],_0x3936d3[_0x49c4('0x50')],md5(_0x3936d3[_0x49c4('0x50')]));}else{_0x3936d3[_0x49c4('0x51')]='';}return getConnection(_0x156748)[_0x49c4('0x23')](function(_0x50798e){_0x5b822f=_0x50798e;return getUser(_0x156748,_0x17ef75[_0x49c4('0x52')],_0x5b822f);})[_0x49c4('0x23')](function(_0x207572){_0x25d174=_0x207572;logger[_0x49c4('0x17')](_0x49c4('0x53'),_0x25d174['id']);return getEndUser(_0x156748,_0x3936d3[_0x49c4('0x54')],_0x3936d3['calleridnum'],_0x5b822f);})['then'](function(_0x1ef0c1){_0x1e0b4f=_0x1ef0c1;logger[_0x49c4('0x17')](_0x49c4('0x55'),_0x1e0b4f['id']);return createTicket(_0x156748,_0x25d174,_0x1e0b4f,_0x3d944c,_0x3936d3,_0x3d944c[_0x49c4('0x56')],_0x5b822f);})[_0x49c4('0x23')](function(_0x6b2592){_0x1856be=_0x6b2592;logger[_0x49c4('0x17')]('Ticket\x20created!');logger[_0x49c4('0x17')](_0x49c4('0x57'),_0x1856be['id']);var _0x4ba4eb=util[_0x49c4('0x26')]('%s/index.php?module=HelpDesk&view=Detail&record=%s&app=SUPPORT',_0x156748[_0x49c4('0x1f')],_[_0x49c4('0x58')](_0x1856be['id'],'x')[0x1]);logger[_0x49c4('0x17')](_0x49c4('0x4d'),_0x49c4('0x59'));emit(util[_0x49c4('0x26')](_0x49c4('0x5a'),_0x17ef75[_0x49c4('0x15')]),'trigger:browser:url',{'uri':_0x4ba4eb});})[_0x49c4('0x28')](function(_0x27b9c2){logger['error'](_0x49c4('0x4d'),JSON[_0x49c4('0x2c')](_0x27b9c2));});};exports['outbound']=function(_0x39c455,_0x42e0e6,_0x4f50bf,_0x4dc54d,_0x589484,_0x513879,_0xc43386){var _0x54947d,_0xb20a5d,_0x32f344,_0x515240;_0x513879[_0x49c4('0x1f')]=intUtil[_0x49c4('0x4c')](_0x513879['remoteUri']);_0x513879[_0x49c4('0x4f')]=intUtil[_0x49c4('0x4c')](_0x513879[_0x49c4('0x4f')]);if(_0xc43386&&_0xc43386[_0x49c4('0x5b')]&&_0xc43386['recordingFormat']!==_0x49c4('0x5c')){logger[_0x49c4('0x17')](_0x49c4('0x5d'),_0x49c4('0x5e'));_0x42e0e6['recordingURL']=util[_0x49c4('0x26')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x513879['serverUrl'],_0x42e0e6['uniqueid'],md5(_0x42e0e6['uniqueid']));}return getConnection(_0x513879)[_0x49c4('0x23')](function(_0x32eaef){_0x515240=_0x32eaef;return getUser(_0x513879,_0x4dc54d[_0x49c4('0x52')],_0x515240);})[_0x49c4('0x23')](function(_0x5b056e){_0x54947d=_0x5b056e;logger['info'](_0x49c4('0x53'),_0x54947d['id']);return getEndUser(_0x513879,_0x42e0e6[_0x49c4('0x5f')],_0x42e0e6[_0x49c4('0x60')],_0x515240);})[_0x49c4('0x23')](function(_0x102c15){_0xb20a5d=_0x102c15;logger[_0x49c4('0x17')](_0x49c4('0x55'),_0xb20a5d['id']);return createTicket(_0x513879,_0x54947d,_0xb20a5d,_0x4f50bf,_0x42e0e6,_0x4f50bf[_0x49c4('0x56')],_0x515240);})['then'](function(_0x2276db){_0x32f344=_0x2276db;logger['info'](_0x49c4('0x61'));logger[_0x49c4('0x17')](_0x49c4('0x57'),_0x32f344['id']);var _0x1ea1b4=util[_0x49c4('0x26')](_0x49c4('0x62'),_0x513879[_0x49c4('0x1f')],_[_0x49c4('0x58')](_0x32f344['id'],'x')[0x1]);logger[_0x49c4('0x17')](_0x49c4('0x5d'),_0x49c4('0x59'));emit(util[_0x49c4('0x26')](_0x49c4('0x5a'),_0x4dc54d[_0x49c4('0x15')]),_0x49c4('0x63'),{'uri':_0x1ea1b4});})[_0x49c4('0x28')](function(_0x371e49){logger[_0x49c4('0x2a')]('[OUTBOUND]',JSON['stringify'](_0x371e49));});};exports[_0x49c4('0x64')]=function(_0x16b3e8,_0x4af680,_0x1a15f3,_0x38ad50,_0x2939fd,_0x16e7b1){var _0x4d6aaa,_0x5a14a5,_0x4a85d4,_0x2e90d8;_0x16e7b1[_0x49c4('0x1f')]=intUtil[_0x49c4('0x4c')](_0x16e7b1[_0x49c4('0x1f')]);_0x16e7b1[_0x49c4('0x4f')]=intUtil[_0x49c4('0x4c')](_0x16e7b1[_0x49c4('0x4f')]);if(_0x2939fd&&_0x2939fd[_0x49c4('0x65')]){logger[_0x49c4('0x17')]('['+_0x4af680['lastevent'][_0x49c4('0x66')]()+']',_0x49c4('0x5e'));_0x4af680[_0x49c4('0x51')]=util['format'](_0x49c4('0x4e'),_0x16e7b1[_0x49c4('0x4f')],_0x4af680[_0x49c4('0x50')],md5(_0x4af680[_0x49c4('0x50')]));}else{_0x4af680[_0x49c4('0x51')]='';}return getConnection(_0x16e7b1)[_0x49c4('0x23')](function(_0x35fa39){_0x2e90d8=_0x35fa39;return getUser(_0x16e7b1,'',_0x2e90d8);})[_0x49c4('0x23')](function(_0x4ba198){_0x4d6aaa=_0x4ba198;logger[_0x49c4('0x17')](_0x49c4('0x53'),_0x4d6aaa['id']);return getEndUser(_0x16e7b1,_0x4af680[_0x49c4('0x54')],_0x4af680[_0x49c4('0x67')],_0x2e90d8);})[_0x49c4('0x23')](function(_0x4a204d){_0x5a14a5=_0x4a204d;logger['info'](_0x49c4('0x55'),_0x5a14a5['id']);return createTicket(_0x16e7b1,_0x4d6aaa,_0x5a14a5,_0x1a15f3,_0x4af680,_0x1a15f3['Fields'],_0x2e90d8);})[_0x49c4('0x23')](function(_0x558880){_0x4a85d4=_0x558880;logger[_0x49c4('0x17')](_0x49c4('0x61'));logger[_0x49c4('0x17')](_0x49c4('0x57'),_0x4a85d4['id']);})['catch'](function(_0x123060){logger[_0x49c4('0x2a')]('['+_0x4af680[_0x49c4('0x68')][_0x49c4('0x66')]()+']',JSON[_0x49c4('0x2c')](_0x123060));});}; \ No newline at end of file diff --git a/server/services/ami/trigger/integration/zendesk.js b/server/services/ami/trigger/integration/zendesk.js index 0f0c889..04181de 100644 --- a/server/services/ami/trigger/integration/zendesk.js +++ b/server/services/ami/trigger/integration/zendesk.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x80da=['merge','name','getString','Subjects','Descriptions','Fields','then','Ticket\x20created!','validateEmail','Getting\x20agent\x20with\x20email','type:user\x20role:agent\x20email:%s','count','Agent\x20found!','find','results','agent','info','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','%s/users/me.json','Admin\x20account\x20selected.','user','Searching\x20enduser\x20with\x20phone','type:user\x20role:end-user\x20phone:%s','filter','end-user','length','first','Enduser\x20found!','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','%s/users.json','POST','Caller\x20-\x20%s','Enduser\x20created.','authType','password','username','token','%s/token:%s','Basic\x20%s','toString','debug','[HTTP]','stringify','GET','map','forEach','includes','string','picklist','type','nameField','customField','content','push','idField','variable','variableName','custom_fields','customVariable','Variable','toLowerCase','queue','serverUrl','stripTrailingSlash','monitor_format','recordingURL','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','Authorization','email','The\x20User\x20ID\x20is:','calleridnum','The\x20Enduser\x20ID\x20is:','The\x20Ticket\x20ID\x20is:','[QUEUE]','Displaying\x20ticket\x20to\x20agent...','%s/channels/voice/agents/%d/tickets/%d/display.json','newTab','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','%s/agent/tickets/%s','replace','error','[QUEUE]\x20Error\x20running\x20Zendesk\x20integration','outbound','none','Recording\x20is\x20enabled!','destcalleridname','destcalleridnum','integrationTab','trigger:browser:url','/api/v2','[OUTBOUND]','catch','[OUTBOUND]\x20Error\x20running\x20Zendesk\x20integration','inspect','unmanaged','lastevent','toUpperCase','\x20Error\x20running\x20Zendesk\x20integration','lodash','request-promise','md5','util','../../../../config/logger','zendesk','redis','defaults','localhost','socket.io-emitter','emit','application/json','Creating\x20new\x20ticket...','format','%s/tickets.json','remoteUri'];(function(_0x591e16,_0x5aefc1){var _0x543b35=function(_0x81e3be){while(--_0x81e3be){_0x591e16['push'](_0x591e16['shift']());}};_0x543b35(++_0x5aefc1);}(_0x80da,0x1c0));var _0xa80d=function(_0x48e085,_0x377e0b){_0x48e085=_0x48e085-0x0;var _0x274999=_0x80da[_0x48e085];return _0x274999;};'use strict';var _=require(_0xa80d('0x0'));var rp=require(_0xa80d('0x1'));var md5=require(_0xa80d('0x2'));var util=require(_0xa80d('0x3'));var Redis=require('ioredis');var intUtil=require('./util');var config=require('../../../../config/environment');var logger=require(_0xa80d('0x4'))(_0xa80d('0x5'));config[_0xa80d('0x6')]=_[_0xa80d('0x7')](config[_0xa80d('0x6')],{'host':_0xa80d('0x8'),'port':0x18eb});var io=require(_0xa80d('0x9'))(new Redis(config[_0xa80d('0x6')]));function emit(_0xd1abb6,_0x290498,_0x1e886b){io['to'](_0xd1abb6)[_0xa80d('0xa')](_0x290498,_0x1e886b);}var headers={'Content-Type':_0xa80d('0xb'),'Accept':_0xa80d('0xb')};function getTicket(_0x554ef8,_0x368e66,_0x110813,_0x2972f8,_0x5bb541){logger['info'](_0xa80d('0xc'));return request({'uri':util[_0xa80d('0xd')](_0xa80d('0xe'),_0x554ef8[_0xa80d('0xf')]),'method':'POST','body':{'ticket':_[_0xa80d('0x10')]({'requester_id':_0x110813['id'],'submitter_id':_0x368e66?_0x368e66['id']:undefined,'assignee_id':_0x368e66?_0x368e66['id']:undefined,'tags':getTags(_0x2972f8['Tags'],_0xa80d('0x11')),'subject':intUtil[_0xa80d('0x12')](_0x2972f8[_0xa80d('0x13')],_0x5bb541,'\x20'),'description':intUtil[_0xa80d('0x12')](_0x2972f8['Descriptions'],_0x5bb541,'\x0a'),'comment':{'public':![],'body':intUtil[_0xa80d('0x12')](_0x2972f8[_0xa80d('0x14')],_0x5bb541,'\x0a')}},getCustomFields(_0x2972f8[_0xa80d('0x15')],_0x5bb541))}})[_0xa80d('0x16')](function(_0x202254){logger['info'](_0xa80d('0x17'));return _0x202254['ticket'];});}function getUser(_0x1b3f9f,_0x6c53a5){if(intUtil[_0xa80d('0x18')](_0x6c53a5)){logger['info'](_0xa80d('0x19'),_0x6c53a5);return request({'uri':util[_0xa80d('0xd')]('%s/search.json',_0x1b3f9f[_0xa80d('0xf')]),'qs':{'query':util[_0xa80d('0xd')](_0xa80d('0x1a'),_0x6c53a5)}})['then'](function(_0x25a168){if(_0x25a168[_0xa80d('0x1b')]){logger['info'](_0xa80d('0x1c'));return _[_0xa80d('0x1d')](_0x25a168[_0xa80d('0x1e')],{'email':_0x6c53a5,'role':_0xa80d('0x1f')});}else{logger[_0xa80d('0x20')](_0xa80d('0x21'));return request({'uri':util[_0xa80d('0xd')](_0xa80d('0x22'),_0x1b3f9f[_0xa80d('0xf')])})[_0xa80d('0x16')](function(_0x54af95){logger[_0xa80d('0x20')](_0xa80d('0x23'));return _0x54af95[_0xa80d('0x24')];});}});}else{logger[_0xa80d('0x20')](_0xa80d('0x21'));return request({'uri':util['format'](_0xa80d('0x22'),_0x1b3f9f[_0xa80d('0xf')])})[_0xa80d('0x16')](function(_0x42f5fc){logger[_0xa80d('0x20')](_0xa80d('0x23'));return _0x42f5fc[_0xa80d('0x24')];});}}function getEndUser(_0x1580ce,_0x4b2a13,_0x37506d){logger[_0xa80d('0x20')](_0xa80d('0x25'),_0x37506d);return request({'uri':util[_0xa80d('0xd')]('%s/search.json',_0x1580ce[_0xa80d('0xf')]),'qs':{'query':util[_0xa80d('0xd')](_0xa80d('0x26'),_0x37506d)}})['then'](function(_0x193e79){var _0x4c216c;if(_0x193e79[_0xa80d('0x1e')]['length']){_0x193e79[_0xa80d('0x1e')]=_[_0xa80d('0x27')](_0x193e79[_0xa80d('0x1e')],{'suspended':![],'role':_0xa80d('0x28')});if(_0x193e79[_0xa80d('0x1e')][_0xa80d('0x29')]){_0x4c216c=_[_0xa80d('0x2a')](_0x193e79[_0xa80d('0x1e')]);}}if(_0x4c216c){logger['info'](_0xa80d('0x2b'));return _0x4c216c;}else{logger[_0xa80d('0x20')](_0xa80d('0x2c'));return request({'uri':util['format'](_0xa80d('0x2d'),_0x1580ce[_0xa80d('0xf')]),'method':_0xa80d('0x2e'),'body':{'user':{'role':_0xa80d('0x28'),'name':util[_0xa80d('0xd')](_0xa80d('0x2f'),_0x4b2a13||_0x37506d),'phone':_0x37506d}}})[_0xa80d('0x16')](function(_0x223abc){logger[_0xa80d('0x20')](_0xa80d('0x30'));return _0x223abc[_0xa80d('0x24')];});}});}function getAuth(_0x20ec66){var _0x2c0917;if(_0x20ec66[_0xa80d('0x31')]===_0xa80d('0x32')){_0x2c0917=util[_0xa80d('0xd')]('%s:%s',_0x20ec66[_0xa80d('0x33')],_0x20ec66['password']);}else if(_0x20ec66[_0xa80d('0x31')]===_0xa80d('0x34')){_0x2c0917=util['format'](_0xa80d('0x35'),_0x20ec66[_0xa80d('0x33')],_0x20ec66[_0xa80d('0x34')]);}return util['format'](_0xa80d('0x36'),new Buffer(_0x2c0917)[_0xa80d('0x37')]('base64'));}function request(_0xf03e){logger[_0xa80d('0x38')](_0xa80d('0x39'),JSON[_0xa80d('0x3a')](_0xf03e));return rp(_[_0xa80d('0x7')](_0xf03e,{'method':_0xa80d('0x3b'),'headers':headers,'json':!![]}));}function getTags(_0x699a92,_0x2108a9){var _0x1d3098=[];if(_0x699a92&&_0x699a92[_0xa80d('0x29')]>0x0){_0x1d3098=_[_0xa80d('0x3c')](_0x699a92,_0x2108a9);}return _0x1d3098;}function getCustomFields(_0x1727a8,_0x46d261){var _0x3ffe0d=[];var _0x1b6252={'custom_fields':[]};if(_0x1727a8[_0xa80d('0x29')]>0x0){_[_0xa80d('0x3d')](_0x1727a8,function(_0x44c35e){if(_[_0xa80d('0x3e')]([_0xa80d('0x3f'),_0xa80d('0x40')],_0x44c35e[_0xa80d('0x41')])&&_0x44c35e[_0xa80d('0x42')]&&!_0x44c35e[_0xa80d('0x43')]){_0x1b6252[_0x44c35e['nameField']['toLowerCase']()]=_0x44c35e[_0xa80d('0x44')][_0xa80d('0x37')]();}else if(_[_0xa80d('0x3e')]([_0xa80d('0x3f'),_0xa80d('0x40')],_0x44c35e[_0xa80d('0x41')])&&_0x44c35e['idField']&&_0x44c35e[_0xa80d('0x43')]){_0x1b6252['custom_fields'][_0xa80d('0x45')]({'id':_0x44c35e[_0xa80d('0x46')],'value':_0x44c35e[_0xa80d('0x44')][_0xa80d('0x37')]()});}else if(_0x44c35e[_0xa80d('0x41')]===_0xa80d('0x47')&&_0x44c35e[_0xa80d('0x48')]&&_0x44c35e[_0xa80d('0x46')]&&_0x44c35e[_0xa80d('0x43')]){_0x46d261[_0x44c35e[_0xa80d('0x48')]]&&_0x1b6252[_0xa80d('0x49')]['push']({'id':_0x44c35e[_0xa80d('0x46')],'value':_0x46d261[_0x44c35e[_0xa80d('0x48')]][_0xa80d('0x37')]()});}else if(_0x44c35e['type']===_0xa80d('0x4a')&&_0x44c35e[_0xa80d('0x4b')]&&_0x44c35e[_0xa80d('0x4b')][_0xa80d('0x11')]&&_0x44c35e[_0xa80d('0x46')]&&_0x44c35e[_0xa80d('0x43')]){_0x46d261[_0x44c35e[_0xa80d('0x4b')][_0xa80d('0x11')][_0xa80d('0x4c')]()]&&_0x1b6252[_0xa80d('0x49')]['push']({'id':_0x44c35e[_0xa80d('0x46')],'value':_0x46d261[_0x44c35e['Variable']['name'][_0xa80d('0x4c')]()][_0xa80d('0x37')]()});}});}return _0x1b6252;}exports[_0xa80d('0x4d')]=function(_0x56cb65,_0x36d2d4,_0x3506ca,_0x29f4ee,_0x5c7873,_0x206523){var _0x59f397,_0x3c541a;_0x206523['remoteUri']=intUtil['stripTrailingSlash'](_0x206523['remoteUri']);_0x206523[_0xa80d('0x4e')]=intUtil[_0xa80d('0x4f')](_0x206523['serverUrl']);if(_0x5c7873&&_0x5c7873[_0xa80d('0x50')]){logger['info']('[QUEUE]','Recording\x20is\x20enabled!');_0x36d2d4[_0xa80d('0x51')]=util['format'](_0xa80d('0x52'),_0x206523[_0xa80d('0x4e')],_0x36d2d4[_0xa80d('0x53')],md5(_0x36d2d4['uniqueid']));}else{_0x36d2d4['recordingURL']='';}headers[_0xa80d('0x54')]=getAuth(_0x206523);return getUser(_0x206523,_0x29f4ee[_0xa80d('0x55')])['then'](function(_0x4f9e1a){_0x59f397=_0x4f9e1a;logger[_0xa80d('0x20')](_0xa80d('0x56'),_0x59f397['id']);return getEndUser(_0x206523,_0x36d2d4['calleridname'],_0x36d2d4[_0xa80d('0x57')]);})[_0xa80d('0x16')](function(_0x29d463){_0x3c541a=_0x29d463;logger['info'](_0xa80d('0x58'),_0x3c541a['id']);return getTicket(_0x206523,_0x59f397,_0x3c541a,_0x3506ca,_0x36d2d4);})[_0xa80d('0x16')](function(_0x269581){if(_0x269581){logger['info'](_0xa80d('0x59'),_0x269581['id']);switch(_0x206523[_0xa80d('0x41')]){case'integrationTab':logger[_0xa80d('0x20')](_0xa80d('0x5a'),_0xa80d('0x5b'));return request({'uri':util[_0xa80d('0xd')](_0xa80d('0x5c'),_0x206523[_0xa80d('0xf')],_0x59f397['id'],_0x269581['id']),'method':_0xa80d('0x2e')});case _0xa80d('0x5d'):logger[_0xa80d('0x20')](_0xa80d('0x5a'),_0xa80d('0x5e'));emit(util[_0xa80d('0xd')](_0xa80d('0x5f'),_0x29f4ee[_0xa80d('0x11')]),'trigger:browser:url',{'uri':util[_0xa80d('0xd')](_0xa80d('0x60'),_0x206523[_0xa80d('0xf')][_0xa80d('0x61')]('/api/v2',''),_0x269581['id'])});break;default:logger[_0xa80d('0x62')](_0xa80d('0x5a'),'Zendesk\x20account\x20type\x20not\x20recognized');}}})['catch'](function(_0x5ac22d){logger[_0xa80d('0x62')](_0xa80d('0x63'),util['inspect'](_0x5ac22d,{'showHidden':!![],'depth':null}));});};exports[_0xa80d('0x64')]=function(_0x4b5694,_0x5cf023,_0x55026c,_0x33d981,_0x389173,_0x169594,_0x3ee6f3){var _0x2e54e8,_0x36d6f8;_0x169594[_0xa80d('0xf')]=intUtil[_0xa80d('0x4f')](_0x169594[_0xa80d('0xf')]);_0x169594[_0xa80d('0x4e')]=intUtil['stripTrailingSlash'](_0x169594[_0xa80d('0x4e')]);if(_0x3ee6f3&&_0x3ee6f3['recordingFormat']&&_0x3ee6f3['recordingFormat']!==_0xa80d('0x65')){logger['info']('[OUTBOUND]',_0xa80d('0x66'));_0x5cf023[_0xa80d('0x51')]=util[_0xa80d('0xd')](_0xa80d('0x52'),_0x169594[_0xa80d('0x4e')],_0x5cf023[_0xa80d('0x53')],md5(_0x5cf023[_0xa80d('0x53')]));}headers['Authorization']=getAuth(_0x169594);return getUser(_0x169594,_0x33d981[_0xa80d('0x55')])[_0xa80d('0x16')](function(_0x40f399){_0x2e54e8=_0x40f399;logger[_0xa80d('0x20')](_0xa80d('0x56'),_0x2e54e8['id']);return getEndUser(_0x169594,_0x5cf023[_0xa80d('0x67')],_0x5cf023[_0xa80d('0x68')]);})[_0xa80d('0x16')](function(_0x460f08){_0x36d6f8=_0x460f08;logger[_0xa80d('0x20')](_0xa80d('0x58'),_0x36d6f8['id']);return getTicket(_0x169594,_0x2e54e8,_0x36d6f8,_0x55026c,_0x5cf023);})[_0xa80d('0x16')](function(_0x558f72){if(_0x558f72){logger[_0xa80d('0x20')](_0xa80d('0x59'),_0x558f72['id']);switch(_0x169594[_0xa80d('0x41')]){case _0xa80d('0x69'):logger[_0xa80d('0x20')]('[OUTBOUND]',_0xa80d('0x5b'));return request({'uri':util[_0xa80d('0xd')](_0xa80d('0x5c'),_0x169594[_0xa80d('0xf')],_0x2e54e8['id'],_0x558f72['id']),'method':_0xa80d('0x2e')});case _0xa80d('0x5d'):logger[_0xa80d('0x20')]('[OUTBOUND]',_0xa80d('0x5e'));emit(util[_0xa80d('0xd')](_0xa80d('0x5f'),_0x33d981['name']),_0xa80d('0x6a'),{'uri':util[_0xa80d('0xd')](_0xa80d('0x60'),_0x169594[_0xa80d('0xf')][_0xa80d('0x61')](_0xa80d('0x6b'),''),_0x558f72['id'])});break;default:logger[_0xa80d('0x62')](_0xa80d('0x6c'),'Zendesk\x20account\x20type\x20not\x20recognized');}}})[_0xa80d('0x6d')](function(_0x26299b){logger[_0xa80d('0x62')](_0xa80d('0x6e'),util[_0xa80d('0x6f')](_0x26299b,{'showHidden':!![],'depth':null}));});};exports[_0xa80d('0x70')]=function(_0x22b810,_0x4aa8d7,_0x274c83,_0x25c24e,_0x1b3dda,_0xa97e93){var _0x1838be,_0x5e1fb1;_0xa97e93[_0xa80d('0xf')]=intUtil['stripTrailingSlash'](_0xa97e93[_0xa80d('0xf')]);_0xa97e93[_0xa80d('0x4e')]=intUtil[_0xa80d('0x4f')](_0xa97e93[_0xa80d('0x4e')]);if(_0x1b3dda&&_0x1b3dda[_0xa80d('0x50')]){logger['info']('['+_0x4aa8d7[_0xa80d('0x71')][_0xa80d('0x72')]()+']',_0xa80d('0x66'));_0x4aa8d7[_0xa80d('0x51')]=util[_0xa80d('0xd')](_0xa80d('0x52'),_0xa97e93[_0xa80d('0x4e')],_0x4aa8d7[_0xa80d('0x53')],md5(_0x4aa8d7[_0xa80d('0x53')]));}else{_0x4aa8d7[_0xa80d('0x51')]='';}headers[_0xa80d('0x54')]=getAuth(_0xa97e93);return getUser(_0xa97e93)[_0xa80d('0x16')](function(_0x3b2c0b){_0x1838be=_0x3b2c0b;logger[_0xa80d('0x20')](_0xa80d('0x56'),_0x1838be['id']);return getEndUser(_0xa97e93,_0x4aa8d7['calleridname'],_0x4aa8d7['calleridnum']);})[_0xa80d('0x16')](function(_0x423d79){_0x5e1fb1=_0x423d79;logger['info'](_0xa80d('0x58'),_0x5e1fb1['id']);return getTicket(_0xa97e93,_0x1838be,_0x5e1fb1,_0x274c83,_0x4aa8d7);})[_0xa80d('0x16')](function(_0x5e33cb){if(_0x5e33cb){logger[_0xa80d('0x20')](_0xa80d('0x59'),_0x5e33cb['id']);}})[_0xa80d('0x6d')](function(_0x56e863){logger[_0xa80d('0x62')]('['+_0x4aa8d7[_0xa80d('0x71')][_0xa80d('0x72')]()+']'+_0xa80d('0x73'),util['inspect'](_0x56e863,{'showHidden':!![],'depth':null}));});}; \ No newline at end of file +var _0xb5c9=['outbound','recordingFormat','none','[OUTBOUND]','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','destcalleridnum','The\x20Ticket\x20ID\x20is:','user:%s','trigger:browser:url','catch','unmanaged','lastevent','toUpperCase','\x20Error\x20running\x20Zendesk\x20integration','request-promise','md5','util','./util','zendesk','redis','defaults','localhost','socket.io-emitter','application/json','info','Creating\x20new\x20ticket...','format','%s/tickets.json','remoteUri','POST','getString','Subjects','Descriptions','Fields','then','Ticket\x20created!','ticket','validateEmail','Getting\x20agent\x20with\x20email','%s/search.json','count','find','results','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','%s/users/me.json','Admin\x20account\x20selected.','user','type:user\x20role:end-user\x20phone:%s','length','end-user','first','Enduser\x20found!','%s/users.json','Caller\x20-\x20%s','Enduser\x20created.','authType','%s:%s','username','password','%s/token:%s','token','Basic\x20%s','toString','debug','[HTTP]','stringify','map','forEach','includes','picklist','type','customField','content','string','idField','custom_fields','variable','variableName','push','customVariable','Variable','name','toLowerCase','queue','stripTrailingSlash','serverUrl','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','recordingURL','uniqueid','Authorization','email','The\x20User\x20ID\x20is:','calleridname','calleridnum','The\x20Enduser\x20ID\x20is:','integrationTab','Displaying\x20ticket\x20to\x20agent...','%s/channels/voice/agents/%d/tickets/%d/display.json','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','%s/agent/tickets/%s','replace','/api/v2','error','Zendesk\x20account\x20type\x20not\x20recognized','[QUEUE]\x20Error\x20running\x20Zendesk\x20integration','inspect'];(function(_0x580576,_0x2f107d){var _0x3f55a0=function(_0x2e180b){while(--_0x2e180b){_0x580576['push'](_0x580576['shift']());}};_0x3f55a0(++_0x2f107d);}(_0xb5c9,0x1be));var _0x9b5c=function(_0x2fc012,_0x503e5b){_0x2fc012=_0x2fc012-0x0;var _0x2891f9=_0xb5c9[_0x2fc012];return _0x2891f9;};'use strict';var _=require('lodash');var rp=require(_0x9b5c('0x0'));var md5=require(_0x9b5c('0x1'));var util=require(_0x9b5c('0x2'));var Redis=require('ioredis');var intUtil=require(_0x9b5c('0x3'));var config=require('../../../../config/environment');var logger=require('../../../../config/logger')(_0x9b5c('0x4'));config[_0x9b5c('0x5')]=_[_0x9b5c('0x6')](config[_0x9b5c('0x5')],{'host':_0x9b5c('0x7'),'port':0x18eb});var io=require(_0x9b5c('0x8'))(new Redis(config['redis']));function emit(_0x50f7ba,_0x282ca3,_0xd1811c){io['to'](_0x50f7ba)['emit'](_0x282ca3,_0xd1811c);}var headers={'Content-Type':_0x9b5c('0x9'),'Accept':_0x9b5c('0x9')};function getTicket(_0x2f220a,_0x1417d0,_0x415554,_0x3032e9,_0x25718e){logger[_0x9b5c('0xa')](_0x9b5c('0xb'));return request({'uri':util[_0x9b5c('0xc')](_0x9b5c('0xd'),_0x2f220a[_0x9b5c('0xe')]),'method':_0x9b5c('0xf'),'body':{'ticket':_['merge']({'requester_id':_0x415554['id'],'submitter_id':_0x1417d0?_0x1417d0['id']:undefined,'assignee_id':_0x1417d0?_0x1417d0['id']:undefined,'tags':getTags(_0x3032e9['Tags'],'name'),'subject':intUtil[_0x9b5c('0x10')](_0x3032e9[_0x9b5c('0x11')],_0x25718e,'\x20'),'description':intUtil[_0x9b5c('0x10')](_0x3032e9['Descriptions'],_0x25718e,'\x0a'),'comment':{'public':![],'body':intUtil['getString'](_0x3032e9[_0x9b5c('0x12')],_0x25718e,'\x0a')}},getCustomFields(_0x3032e9[_0x9b5c('0x13')],_0x25718e))}})[_0x9b5c('0x14')](function(_0x4f4d17){logger[_0x9b5c('0xa')](_0x9b5c('0x15'));return _0x4f4d17[_0x9b5c('0x16')];});}function getUser(_0x1da62f,_0x2ef587){if(intUtil[_0x9b5c('0x17')](_0x2ef587)){logger[_0x9b5c('0xa')](_0x9b5c('0x18'),_0x2ef587);return request({'uri':util[_0x9b5c('0xc')](_0x9b5c('0x19'),_0x1da62f[_0x9b5c('0xe')]),'qs':{'query':util['format']('type:user\x20role:agent\x20email:%s',_0x2ef587)}})[_0x9b5c('0x14')](function(_0x277d4d){if(_0x277d4d[_0x9b5c('0x1a')]){logger['info']('Agent\x20found!');return _[_0x9b5c('0x1b')](_0x277d4d[_0x9b5c('0x1c')],{'email':_0x2ef587,'role':'agent'});}else{logger['info'](_0x9b5c('0x1d'));return request({'uri':util['format'](_0x9b5c('0x1e'),_0x1da62f['remoteUri'])})['then'](function(_0x11e6b8){logger[_0x9b5c('0xa')](_0x9b5c('0x1f'));return _0x11e6b8[_0x9b5c('0x20')];});}});}else{logger[_0x9b5c('0xa')](_0x9b5c('0x1d'));return request({'uri':util[_0x9b5c('0xc')](_0x9b5c('0x1e'),_0x1da62f[_0x9b5c('0xe')])})[_0x9b5c('0x14')](function(_0x212afd){logger[_0x9b5c('0xa')](_0x9b5c('0x1f'));return _0x212afd['user'];});}}function getEndUser(_0x2fdf58,_0x1be234,_0x5ee137){logger[_0x9b5c('0xa')]('Searching\x20enduser\x20with\x20phone',_0x5ee137);return request({'uri':util[_0x9b5c('0xc')](_0x9b5c('0x19'),_0x2fdf58['remoteUri']),'qs':{'query':util[_0x9b5c('0xc')](_0x9b5c('0x21'),_0x5ee137)}})[_0x9b5c('0x14')](function(_0x491425){var _0x4c697d;if(_0x491425[_0x9b5c('0x1c')][_0x9b5c('0x22')]){_0x491425[_0x9b5c('0x1c')]=_['filter'](_0x491425[_0x9b5c('0x1c')],{'suspended':![],'role':_0x9b5c('0x23')});if(_0x491425['results'][_0x9b5c('0x22')]){_0x4c697d=_[_0x9b5c('0x24')](_0x491425['results']);}}if(_0x4c697d){logger[_0x9b5c('0xa')](_0x9b5c('0x25'));return _0x4c697d;}else{logger[_0x9b5c('0xa')]('Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!');return request({'uri':util[_0x9b5c('0xc')](_0x9b5c('0x26'),_0x2fdf58[_0x9b5c('0xe')]),'method':_0x9b5c('0xf'),'body':{'user':{'role':_0x9b5c('0x23'),'name':util[_0x9b5c('0xc')](_0x9b5c('0x27'),_0x1be234||_0x5ee137),'phone':_0x5ee137}}})[_0x9b5c('0x14')](function(_0x8d16f5){logger['info'](_0x9b5c('0x28'));return _0x8d16f5[_0x9b5c('0x20')];});}});}function getAuth(_0x50b033){var _0x10da37;if(_0x50b033[_0x9b5c('0x29')]==='password'){_0x10da37=util['format'](_0x9b5c('0x2a'),_0x50b033[_0x9b5c('0x2b')],_0x50b033[_0x9b5c('0x2c')]);}else if(_0x50b033[_0x9b5c('0x29')]==='token'){_0x10da37=util['format'](_0x9b5c('0x2d'),_0x50b033['username'],_0x50b033[_0x9b5c('0x2e')]);}return util[_0x9b5c('0xc')](_0x9b5c('0x2f'),new Buffer(_0x10da37)[_0x9b5c('0x30')]('base64'));}function request(_0x3ab1b7){logger[_0x9b5c('0x31')](_0x9b5c('0x32'),JSON[_0x9b5c('0x33')](_0x3ab1b7));return rp(_[_0x9b5c('0x6')](_0x3ab1b7,{'method':'GET','headers':headers,'json':!![]}));}function getTags(_0x5c01a5,_0x50c949){var _0x23cedb=[];if(_0x5c01a5&&_0x5c01a5[_0x9b5c('0x22')]>0x0){_0x23cedb=_[_0x9b5c('0x34')](_0x5c01a5,_0x50c949);}return _0x23cedb;}function getCustomFields(_0x5c6dfd,_0x25ffb6){var _0x26aaba=[];var _0x121512={'custom_fields':[]};if(_0x5c6dfd[_0x9b5c('0x22')]>0x0){_[_0x9b5c('0x35')](_0x5c6dfd,function(_0x3eed0d){if(_[_0x9b5c('0x36')](['string',_0x9b5c('0x37')],_0x3eed0d[_0x9b5c('0x38')])&&_0x3eed0d['nameField']&&!_0x3eed0d[_0x9b5c('0x39')]){_0x121512[_0x3eed0d['nameField']['toLowerCase']()]=_0x3eed0d[_0x9b5c('0x3a')][_0x9b5c('0x30')]();}else if(_[_0x9b5c('0x36')]([_0x9b5c('0x3b'),'picklist'],_0x3eed0d[_0x9b5c('0x38')])&&_0x3eed0d[_0x9b5c('0x3c')]&&_0x3eed0d[_0x9b5c('0x39')]){_0x121512[_0x9b5c('0x3d')]['push']({'id':_0x3eed0d['idField'],'value':_0x3eed0d[_0x9b5c('0x3a')][_0x9b5c('0x30')]()});}else if(_0x3eed0d[_0x9b5c('0x38')]===_0x9b5c('0x3e')&&_0x3eed0d['variableName']&&_0x3eed0d[_0x9b5c('0x3c')]&&_0x3eed0d[_0x9b5c('0x39')]){_0x25ffb6[_0x3eed0d[_0x9b5c('0x3f')]]&&_0x121512[_0x9b5c('0x3d')][_0x9b5c('0x40')]({'id':_0x3eed0d[_0x9b5c('0x3c')],'value':_0x25ffb6[_0x3eed0d['variableName']]['toString']()});}else if(_0x3eed0d['type']===_0x9b5c('0x41')&&_0x3eed0d['Variable']&&_0x3eed0d[_0x9b5c('0x42')][_0x9b5c('0x43')]&&_0x3eed0d[_0x9b5c('0x3c')]&&_0x3eed0d['customField']){_0x25ffb6[_0x3eed0d[_0x9b5c('0x42')][_0x9b5c('0x43')][_0x9b5c('0x44')]()]&&_0x121512[_0x9b5c('0x3d')][_0x9b5c('0x40')]({'id':_0x3eed0d['idField'],'value':_0x25ffb6[_0x3eed0d[_0x9b5c('0x42')]['name']['toLowerCase']()][_0x9b5c('0x30')]()});}});}return _0x121512;}exports[_0x9b5c('0x45')]=function(_0xe1577a,_0x3c32ed,_0x57ddd0,_0x214212,_0x5ba6d0,_0x451d01){var _0x38aa00,_0x32bbcb;_0x451d01[_0x9b5c('0xe')]=intUtil[_0x9b5c('0x46')](_0x451d01[_0x9b5c('0xe')]);_0x451d01['serverUrl']=intUtil[_0x9b5c('0x46')](_0x451d01[_0x9b5c('0x47')]);if(_0x5ba6d0&&_0x5ba6d0[_0x9b5c('0x48')]){logger[_0x9b5c('0xa')](_0x9b5c('0x49'),_0x9b5c('0x4a'));_0x3c32ed[_0x9b5c('0x4b')]=util[_0x9b5c('0xc')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x451d01[_0x9b5c('0x47')],_0x3c32ed['uniqueid'],md5(_0x3c32ed[_0x9b5c('0x4c')]));}else{_0x3c32ed[_0x9b5c('0x4b')]='';}headers[_0x9b5c('0x4d')]=getAuth(_0x451d01);return getUser(_0x451d01,_0x214212[_0x9b5c('0x4e')])['then'](function(_0xfb69fd){_0x38aa00=_0xfb69fd;logger[_0x9b5c('0xa')](_0x9b5c('0x4f'),_0x38aa00['id']);return getEndUser(_0x451d01,_0x3c32ed[_0x9b5c('0x50')],_0x3c32ed[_0x9b5c('0x51')]);})['then'](function(_0x5586b6){_0x32bbcb=_0x5586b6;logger['info'](_0x9b5c('0x52'),_0x32bbcb['id']);return getTicket(_0x451d01,_0x38aa00,_0x32bbcb,_0x57ddd0,_0x3c32ed);})[_0x9b5c('0x14')](function(_0x967d74){if(_0x967d74){logger[_0x9b5c('0xa')]('The\x20Ticket\x20ID\x20is:',_0x967d74['id']);switch(_0x451d01[_0x9b5c('0x38')]){case _0x9b5c('0x53'):logger[_0x9b5c('0xa')](_0x9b5c('0x49'),_0x9b5c('0x54'));return request({'uri':util[_0x9b5c('0xc')](_0x9b5c('0x55'),_0x451d01['remoteUri'],_0x38aa00['id'],_0x967d74['id']),'method':'POST'});case'newTab':logger[_0x9b5c('0xa')](_0x9b5c('0x49'),_0x9b5c('0x56'));emit(util[_0x9b5c('0xc')]('user:%s',_0x214212[_0x9b5c('0x43')]),'trigger:browser:url',{'uri':util[_0x9b5c('0xc')](_0x9b5c('0x57'),_0x451d01[_0x9b5c('0xe')][_0x9b5c('0x58')](_0x9b5c('0x59'),''),_0x967d74['id'])});break;default:logger[_0x9b5c('0x5a')]('[QUEUE]',_0x9b5c('0x5b'));}}})['catch'](function(_0x4d02df){logger['error'](_0x9b5c('0x5c'),util[_0x9b5c('0x5d')](_0x4d02df,{'showHidden':!![],'depth':null}));});};exports[_0x9b5c('0x5e')]=function(_0xfcb7ca,_0x41c9a2,_0x120963,_0x1947fb,_0x32177c,_0x3f5ca4,_0x1ef384){var _0x303727,_0x284c56;_0x3f5ca4[_0x9b5c('0xe')]=intUtil[_0x9b5c('0x46')](_0x3f5ca4['remoteUri']);_0x3f5ca4['serverUrl']=intUtil[_0x9b5c('0x46')](_0x3f5ca4[_0x9b5c('0x47')]);if(_0x1ef384&&_0x1ef384[_0x9b5c('0x5f')]&&_0x1ef384[_0x9b5c('0x5f')]!==_0x9b5c('0x60')){logger[_0x9b5c('0xa')](_0x9b5c('0x61'),_0x9b5c('0x4a'));_0x41c9a2['recordingURL']=util[_0x9b5c('0xc')](_0x9b5c('0x62'),_0x3f5ca4['serverUrl'],_0x41c9a2['uniqueid'],md5(_0x41c9a2['uniqueid']));}headers[_0x9b5c('0x4d')]=getAuth(_0x3f5ca4);return getUser(_0x3f5ca4,_0x1947fb[_0x9b5c('0x4e')])[_0x9b5c('0x14')](function(_0x5365a0){_0x303727=_0x5365a0;logger[_0x9b5c('0xa')](_0x9b5c('0x4f'),_0x303727['id']);return getEndUser(_0x3f5ca4,_0x41c9a2['destcalleridname'],_0x41c9a2[_0x9b5c('0x63')]);})[_0x9b5c('0x14')](function(_0x2c7dd1){_0x284c56=_0x2c7dd1;logger['info'](_0x9b5c('0x52'),_0x284c56['id']);return getTicket(_0x3f5ca4,_0x303727,_0x284c56,_0x120963,_0x41c9a2);})['then'](function(_0x58e5ee){if(_0x58e5ee){logger[_0x9b5c('0xa')](_0x9b5c('0x64'),_0x58e5ee['id']);switch(_0x3f5ca4[_0x9b5c('0x38')]){case _0x9b5c('0x53'):logger['info']('[OUTBOUND]','Displaying\x20ticket\x20to\x20agent...');return request({'uri':util[_0x9b5c('0xc')](_0x9b5c('0x55'),_0x3f5ca4['remoteUri'],_0x303727['id'],_0x58e5ee['id']),'method':_0x9b5c('0xf')});case'newTab':logger[_0x9b5c('0xa')]('[OUTBOUND]',_0x9b5c('0x56'));emit(util[_0x9b5c('0xc')](_0x9b5c('0x65'),_0x1947fb[_0x9b5c('0x43')]),_0x9b5c('0x66'),{'uri':util[_0x9b5c('0xc')](_0x9b5c('0x57'),_0x3f5ca4[_0x9b5c('0xe')][_0x9b5c('0x58')](_0x9b5c('0x59'),''),_0x58e5ee['id'])});break;default:logger['error']('[OUTBOUND]',_0x9b5c('0x5b'));}}})[_0x9b5c('0x67')](function(_0x223c05){logger[_0x9b5c('0x5a')]('[OUTBOUND]\x20Error\x20running\x20Zendesk\x20integration',util[_0x9b5c('0x5d')](_0x223c05,{'showHidden':!![],'depth':null}));});};exports[_0x9b5c('0x68')]=function(_0x1db336,_0x5775e4,_0x18ebd2,_0x59bca9,_0x3d395b,_0x1bc5c5){var _0x4f4d08,_0x2fd652;_0x1bc5c5[_0x9b5c('0xe')]=intUtil[_0x9b5c('0x46')](_0x1bc5c5['remoteUri']);_0x1bc5c5['serverUrl']=intUtil['stripTrailingSlash'](_0x1bc5c5['serverUrl']);if(_0x3d395b&&_0x3d395b[_0x9b5c('0x48')]){logger[_0x9b5c('0xa')]('['+_0x5775e4[_0x9b5c('0x69')]['toUpperCase']()+']','Recording\x20is\x20enabled!');_0x5775e4[_0x9b5c('0x4b')]=util[_0x9b5c('0xc')](_0x9b5c('0x62'),_0x1bc5c5['serverUrl'],_0x5775e4['uniqueid'],md5(_0x5775e4[_0x9b5c('0x4c')]));}else{_0x5775e4[_0x9b5c('0x4b')]='';}headers['Authorization']=getAuth(_0x1bc5c5);return getUser(_0x1bc5c5)[_0x9b5c('0x14')](function(_0x117763){_0x4f4d08=_0x117763;logger[_0x9b5c('0xa')](_0x9b5c('0x4f'),_0x4f4d08['id']);return getEndUser(_0x1bc5c5,_0x5775e4[_0x9b5c('0x50')],_0x5775e4[_0x9b5c('0x51')]);})['then'](function(_0x4da057){_0x2fd652=_0x4da057;logger[_0x9b5c('0xa')](_0x9b5c('0x52'),_0x2fd652['id']);return getTicket(_0x1bc5c5,_0x4f4d08,_0x2fd652,_0x18ebd2,_0x5775e4);})[_0x9b5c('0x14')](function(_0x5cd079){if(_0x5cd079){logger[_0x9b5c('0xa')](_0x9b5c('0x64'),_0x5cd079['id']);}})['catch'](function(_0x4fb655){logger[_0x9b5c('0x5a')]('['+_0x5775e4[_0x9b5c('0x69')][_0x9b5c('0x6a')]()+']'+_0x9b5c('0x6b'),util['inspect'](_0x4fb655,{'showHidden':!![],'depth':null}));});}; \ No newline at end of file diff --git a/server/services/ami/trigger/integration/zoho.js b/server/services/ami/trigger/integration/zoho.js index 0f6b8ca..33489cd 100644 --- a/server/services/ami/trigger/integration/zoho.js +++ b/server/services/ami/trigger/integration/zoho.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfe60=['Displaying\x20call\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','trigger:browser:url','https://crm.','recordingFormat','none','destcalleridname','destcalleridnum','[OUTBOUND]','/crm/EntityInfo.do?module=Calls&id=','lastevent','toUpperCase','request-promise','util','./util','moment','bluebird','../../../../config/environment','../../../../config/logger','zoho','redis','defaults','localhost','socket.io-emitter','debug','stringify','length','forEach','string','picklist','type','content','variableName','idField','toString','customVariable','Variable','name','toLowerCase','indexOf','split','isNil','access_token','expires_in','zone','https://accounts.zoho.com.au','https://accounts.zoho.eu','https://accounts.zoho.in','https://accounts.zoho.com.cn','POST','/oauth/v2/token','refreshToken','clientId','refresh_token','then','add','catch','error','Failing\x20creating\x20the\x20access_token','stack','info','Search\x20user','format','https://www.zohoapis.%s/crm/v2/users','ActiveUsers','Zoho-oauthtoken\x20','users','isArrayLikeObject','findIndex','email','Agent\x20found!','profile','user','Administrator','The\x20failing\x20result\x20is','Unable\x20to\x20retrieve\x20zoho\x20account\x20users:\x20','data','enduserType','https://www.zohoapis.','/crm/v2/','moduleCreate','role','first_name','last_name','code','details','startCase','Error:\x20','log','uri','/crm/v2/Leads/search?criteria=((Phone:equals:','Leads','nothing','contact','Contacts','lead','Creating\x20new\x20call...','Owner','administrator','Subject','getString','Who_Id','Full_Name','First_Name','Last_Name','What_Id','$se_module','talktime','utc','mm:ss','endtime','diff','starttime','YYYY-MM-DDTHH:mm:ss','called','Call_Result','Called','connect','Answered','rejected','Rejected','abandoned','timeout','Timeout','Call_Start_Time','outbound','agentcalledAt','Inbound','merge','/crm/v2/Calls','SUCCESS','Call\x20created!','err','queue','host','stripTrailingSlash','serverUrl','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','/api/voice/recordings/','uniqueid','/downloads?type=uniqueid&token=','recordingURL','zoho.eu','com','The\x20User\x20ID\x20is:','calleridname','The\x20Call\x20ID\x20is:'];(function(_0x47cdae,_0x3ec667){var _0x32081b=function(_0x5f46f1){while(--_0x5f46f1){_0x47cdae['push'](_0x47cdae['shift']());}};_0x32081b(++_0x3ec667);}(_0xfe60,0x1cb));var _0x0fe6=function(_0x5383c8,_0x25c277){_0x5383c8=_0x5383c8-0x0;var _0x23dc9b=_0xfe60[_0x5383c8];return _0x23dc9b;};'use strict';var _=require('lodash');var rp=require(_0x0fe6('0x0'));var md5=require('md5');var util=require(_0x0fe6('0x1'));var intUtil=require(_0x0fe6('0x2'));var moment=require(_0x0fe6('0x3'));var Redis=require('ioredis');var BPromise=require(_0x0fe6('0x4'));var config=require(_0x0fe6('0x5'));var logger=require(_0x0fe6('0x6'))(_0x0fe6('0x7'));config[_0x0fe6('0x8')]=_[_0x0fe6('0x9')](config[_0x0fe6('0x8')],{'host':_0x0fe6('0xa'),'port':0x18eb});var io=require(_0x0fe6('0xb'))(new Redis(config[_0x0fe6('0x8')]));function emit(_0x58d620,_0x2f1344,_0x5666a1){io['to'](_0x58d620)['emit'](_0x2f1344,_0x5666a1);}function request(_0x572d4f){logger[_0x0fe6('0xc')]('[HTTP]',JSON[_0x0fe6('0xd')](_0x572d4f));return rp(_0x572d4f);}function getCustomFields(_0x74b726,_0x1a14f3){var _0x8d9a97={};if(_0x74b726[_0x0fe6('0xe')]>0x0){_[_0x0fe6('0xf')](_0x74b726,function(_0x31fdaa){if(_['includes']([_0x0fe6('0x10'),_0x0fe6('0x11')],_0x31fdaa[_0x0fe6('0x12')])&&_0x31fdaa['idField']){_0x8d9a97[_0x31fdaa['idField']]=_0x31fdaa[_0x0fe6('0x13')]['toString']();}else if(_0x31fdaa['type']==='variable'&&_0x31fdaa[_0x0fe6('0x14')]&&_0x31fdaa[_0x0fe6('0x15')]&&_0x1a14f3[_0x31fdaa[_0x0fe6('0x14')]]){_0x8d9a97[_0x31fdaa[_0x0fe6('0x15')]]=_0x1a14f3[_0x31fdaa[_0x0fe6('0x14')]][_0x0fe6('0x16')]();}else if(_0x31fdaa[_0x0fe6('0x12')]===_0x0fe6('0x17')&&_0x31fdaa[_0x0fe6('0x18')]&&_0x31fdaa[_0x0fe6('0x18')][_0x0fe6('0x19')]&&_0x31fdaa[_0x0fe6('0x15')]&&_0x1a14f3[_0x31fdaa['Variable'][_0x0fe6('0x19')][_0x0fe6('0x1a')]()]){_0x8d9a97[_0x31fdaa[_0x0fe6('0x15')]]=_0x1a14f3[_0x31fdaa[_0x0fe6('0x18')][_0x0fe6('0x19')][_0x0fe6('0x1a')]()][_0x0fe6('0x16')]();}});}return _0x8d9a97;}function getName(_0x327f4d){if(_0x327f4d[_0x0fe6('0x1b')]('\x20')>0x0){var _0x5c50c5=_0x327f4d[_0x0fe6('0x1c')](/ (.+)/);if(_0x5c50c5[0x1]){return _0x5c50c5;}}return[_0x327f4d,_0x327f4d];}var accountsTokens={};function getAccessToken(_0x288bd6){return new Promise(function(_0x4e13f9,_0xddbe2){if(!_[_0x0fe6('0x1d')](accountsTokens[_0x288bd6['id']])&&!_[_0x0fe6('0x1d')](accountsTokens[_0x288bd6['id']][_0x0fe6('0x1e')])){if(moment()['isBefore'](accountsTokens[_0x288bd6['id']][_0x0fe6('0x1f')])){_0x4e13f9(accountsTokens[_0x288bd6['id']][_0x0fe6('0x1e')]);}}var _0x4c9569;switch(_0x288bd6[_0x0fe6('0x20')]){case'US':_0x4c9569='https://accounts.zoho.com';break;case'AU':_0x4c9569=_0x0fe6('0x21');break;case'EU':_0x4c9569=_0x0fe6('0x22');break;case'IN':_0x4c9569=_0x0fe6('0x23');break;case'CN':_0x4c9569=_0x0fe6('0x24');break;default:_0x4c9569='https://accounts.zoho.eu';break;}var _0x3ef260={'method':_0x0fe6('0x25'),'uri':_0x4c9569+_0x0fe6('0x26'),'qs':{'refresh_token':_0x288bd6[_0x0fe6('0x27')],'client_id':_0x288bd6[_0x0fe6('0x28')],'client_secret':_0x288bd6['clientSecret'],'grant_type':_0x0fe6('0x29')},'json':!![]};return rp(_0x3ef260)[_0x0fe6('0x2a')](function(_0x3428a7){accountsTokens[_0x288bd6['id']]={'access_token':_0x3428a7[_0x0fe6('0x1e')],'expires_in':moment()[_0x0fe6('0x2b')](_0x3428a7[_0x0fe6('0x1f')],'seconds')};_0x4e13f9(_0x3428a7[_0x0fe6('0x1e')]);})[_0x0fe6('0x2c')](function(_0x392fb0){logger[_0x0fe6('0x2d')](_0x0fe6('0x2e'),_0x392fb0[_0x0fe6('0x2f')]);_0xddbe2(_0x392fb0);});});}function getUser(_0x18fad1,_0x156593,_0x3151b0,_0x579b68){logger[_0x0fe6('0x30')](_0x0fe6('0x31'));return request({'method':'GET','uri':util[_0x0fe6('0x32')](_0x0fe6('0x33'),_0x156593),'qs':{'type':_0x0fe6('0x34')},'headers':{'Authorization':_0x0fe6('0x35')+_0x18fad1},'json':!![]})[_0x0fe6('0x2a')](function(_0xfe1093){if(_0xfe1093[_0x0fe6('0x36')]){var _0x3eb7ac=-0x1;if(_[_0x0fe6('0x37')](_0xfe1093[_0x0fe6('0x36')])){if(!_[_0x0fe6('0x1d')](_0x579b68)){_0x3eb7ac=_[_0x0fe6('0x38')](_0xfe1093[_0x0fe6('0x36')],function(_0x265ea6){return _0x265ea6[_0x0fe6('0x39')]===_0x579b68;});}if(_0x3eb7ac>=0x0){logger[_0x0fe6('0x30')](_0x0fe6('0x3a'));}else{logger['info']('Using\x20the\x20admin\x20account!');_0x3eb7ac=_[_0x0fe6('0x38')](_0xfe1093[_0x0fe6('0x36')],function(_0x2fb067){return _0x2fb067[_0x0fe6('0x3b')][_0x0fe6('0x19')]==='Administrator';});}return _0xfe1093[_0x0fe6('0x36')][_0x3eb7ac];}else{if(_0xfe1093[_0x0fe6('0x3c')][_0x0fe6('0x3b')][_0x0fe6('0x19')]===_0x0fe6('0x3d')){logger[_0x0fe6('0x30')]('Using\x20the\x20admin\x20account!');user=_0xfe1093['user'];return user;}else{logger[_0x0fe6('0x2d')](_0x0fe6('0x3e'),JSON[_0x0fe6('0xd')](_0xfe1093));throw new Error('Unable\x20to\x20retrieve\x20zoho\x20account\x20users:\x20'+JSON[_0x0fe6('0xd')](_0xfe1093));}}}else{logger[_0x0fe6('0x2d')](_0x0fe6('0x3e'),JSON['stringify'](_0xfe1093));throw new Error(_0x0fe6('0x3f')+JSON[_0x0fe6('0xd')](_0xfe1093));}})[_0x0fe6('0x2c')](function(_0x4f351a){console['error'](_0x4f351a);});}function getZohoUser(_0x28571e,_0x25f8fd){return new BPromise(function(_0x1d0a1b,_0x8aa6c8){request(_0x28571e)[_0x0fe6('0x2a')](function(_0x404ce9){var _0x5cb377=null;if(_0x404ce9){_0x5cb377=_0x404ce9[_0x0fe6('0x40')][0x0];_0x5cb377[_0x0fe6('0x41')]=_0x25f8fd;}_0x1d0a1b(_0x5cb377);})[_0x0fe6('0x2c')](function(_0x1e4973){_0x8aa6c8(_0x1e4973);});});}function createEndUser(_0x197435,_0x5d3473,_0x31aa98,_0x54cfc0,_0x455300,_0x41c9d1){var _0x31aa98=getName(_0x31aa98);return request({'method':'POST','uri':_0x0fe6('0x42')+_0x5d3473+_0x0fe6('0x43')+_['startCase'](_0x41c9d1[_0x0fe6('0x44')])+'s','body':{'data':[{'Last_Name':_0x31aa98[0x1],'First_Name':_0x31aa98[0x0],'Phone':_0x54cfc0,'Owner':{'name':!_[_0x0fe6('0x1d')](_0x455300[_0x0fe6('0x45')][_0x0fe6('0x19')])?_0x455300[_0x0fe6('0x45')][_0x0fe6('0x19')]:!_[_0x0fe6('0x1d')](_0x455300[_0x0fe6('0x46')])?_0x455300[_0x0fe6('0x46')]+'\x20'+_0x455300[_0x0fe6('0x47')]:_0x455300[_0x0fe6('0x47')],'id':_0x455300['id']}}]},'headers':{'Authorization':_0x0fe6('0x35')+_0x197435},'json':!![]})[_0x0fe6('0x2a')](function(_0x46cadc){if(_0x46cadc&&_0x46cadc[_0x0fe6('0x40')][0x0][_0x0fe6('0x48')]==='SUCCESS'){var _0xc74a59=_0x46cadc[_0x0fe6('0x40')][0x0][_0x0fe6('0x49')];_0xc74a59[_0x0fe6('0x41')]=_[_0x0fe6('0x4a')](_0x41c9d1[_0x0fe6('0x44')])+'s';return _0xc74a59;}logger['error']('The\x20failing\x20result\x20is',JSON[_0x0fe6('0xd')](data));throw new Error(_0x0fe6('0x4b')+JSON[_0x0fe6('0xd')](data));})['catch'](function(_0x1ffa4e){console[_0x0fe6('0x4c')]('CREATE\x20ERROR',_0x1ffa4e);});}function getEndUser(_0x3fbc28,_0x50a4eb,_0x4dc764,_0x13859d,_0x1ebbdd,_0x4bb6ea,_0x17400b){var _0x505d41={'method':'GET','uri':'','headers':{'Authorization':_0x0fe6('0x35')+_0x3fbc28},'json':!![]};switch(_0x17400b['moduleSearch']){case'contact_lead':_0x505d41[_0x0fe6('0x4d')]='https://www.zohoapis.'+_0x50a4eb+'/crm/v2/Contacts/search?criteria=((Phone:equals:'+_0x1ebbdd+'))';return getZohoUser(_0x505d41,'Contacts')[_0x0fe6('0x2a')](function(_0x1c24e5){if(_0x1c24e5)return _0x1c24e5;_0x505d41['uri']=_0x0fe6('0x42')+_0x50a4eb+_0x0fe6('0x4e')+_0x1ebbdd+'))';return getZohoUser(_0x505d41,_0x0fe6('0x4f'))[_0x0fe6('0x2a')](function(_0x36a692){if(_0x36a692)return _0x36a692;if(_0x17400b[_0x0fe6('0x44')]!=_0x0fe6('0x50')){return createEndUser(_0x3fbc28,_0x50a4eb,_0x13859d,_0x1ebbdd,_0x4bb6ea,_0x17400b);}else{return{};}});});break;case _0x0fe6('0x51'):_0x505d41['uri']=_0x0fe6('0x42')+_0x50a4eb+'/crm/v2/Contacts/search?criteria=((Phone:equals:'+_0x1ebbdd+'))';return getZohoUser(_0x505d41,_0x0fe6('0x52'))['then'](function(_0x10283e){if(_0x10283e)return _0x10283e;if(_0x17400b[_0x0fe6('0x44')]!=_0x0fe6('0x50')){return createEndUser(_0x3fbc28,_0x50a4eb,_0x13859d,_0x1ebbdd,_0x4bb6ea,_0x17400b);}else{return{};}});break;case _0x0fe6('0x53'):_0x505d41[_0x0fe6('0x4d')]=_0x0fe6('0x42')+_0x50a4eb+_0x0fe6('0x4e')+_0x1ebbdd+'))';return getZohoUser(_0x505d41,'Leads')[_0x0fe6('0x2a')](function(_0xdc31f6){if(_0xdc31f6)return _0xdc31f6;if(_0x17400b[_0x0fe6('0x44')]!=_0x0fe6('0x50')){return createEndUser(_0x3fbc28,_0x50a4eb,_0x13859d,_0x1ebbdd,_0x4bb6ea,_0x17400b);}else{return{};}});break;}}function getCall(_0x3006ca,_0x119315,_0x2ed628,_0x315f23,_0x2d54e9,_0x1107f5,_0x544a15,_0x5cf2e6){logger[_0x0fe6('0x30')](_0x0fe6('0x54'));var _0x3d5979={};_0x3d5979[_0x0fe6('0x55')]={'name':!_[_0x0fe6('0x1d')](_0x315f23[_0x0fe6('0x45')][_0x0fe6('0x19')])&&!_[_0x0fe6('0x1d')](_0x315f23[_0x0fe6('0x3b')]['name'])&&_0x315f23[_0x0fe6('0x3b')][_0x0fe6('0x19')]===_0x0fe6('0x56')?_0x315f23[_0x0fe6('0x45')]['name']:!_[_0x0fe6('0x1d')](_0x315f23[_0x0fe6('0x46')])?_0x315f23['first_name']+'\x20'+_0x315f23['last_name']:_0x315f23[_0x0fe6('0x47')],'id':_0x315f23['id']};_0x3d5979[_0x0fe6('0x57')]=intUtil[_0x0fe6('0x58')](_0x1107f5['Subjects'],_0x544a15,'\x20');_0x3d5979['Description']=intUtil['getString'](_0x1107f5['Descriptions'],_0x544a15,'\x0a');if(_0x2d54e9[_0x0fe6('0x41')]==='Contacts'){_0x3d5979[_0x0fe6('0x59')]={'name':!_['isNil'](_0x2d54e9[_0x0fe6('0x5a')])?_0x2d54e9[_0x0fe6('0x5a')]:!_['isNil'](_0x2d54e9['First_Name'])?_0x2d54e9[_0x0fe6('0x5b')]+'\x20'+_0x2d54e9[_0x0fe6('0x5c')]:_0x2d54e9[_0x0fe6('0x5c')],'id':_0x2d54e9['id']};}if(_0x2d54e9[_0x0fe6('0x41')]===_0x0fe6('0x4f')){_0x3d5979[_0x0fe6('0x5d')]={'name':!_['isNil'](_0x2d54e9[_0x0fe6('0x5a')])?_0x2d54e9[_0x0fe6('0x5a')]:!_[_0x0fe6('0x1d')](_0x2d54e9[_0x0fe6('0x5b')])?_0x2d54e9['First_Name']+'\x20'+_0x2d54e9[_0x0fe6('0x5c')]:_0x2d54e9[_0x0fe6('0x5c')],'id':_0x2d54e9['id']};_0x3d5979[_0x0fe6('0x5e')]=_[_0x0fe6('0x4a')](_0x2d54e9['enduserType']);}if(_0x544a15[_0x0fe6('0x5f')]){_0x3d5979['Call_Duration']=moment[_0x0fe6('0x60')](parseInt(_0x544a15[_0x0fe6('0x5f')])*0x3e8)[_0x0fe6('0x32')](_0x0fe6('0x61'));}else if(_0x544a15['answertime']&&_0x544a15['endtime']){_0x3d5979['Call_Duration']=moment[_0x0fe6('0x60')](moment(_0x544a15[_0x0fe6('0x62')],'YYYY-MM-DDTHH:mm:ss')[_0x0fe6('0x63')](moment(_0x544a15[_0x0fe6('0x64')],_0x0fe6('0x65'))))[_0x0fe6('0x32')](_0x0fe6('0x61'));}switch(_0x544a15['lastevent']){case _0x0fe6('0x66'):_0x3d5979[_0x0fe6('0x67')]=_0x0fe6('0x68');break;case'complete':case _0x0fe6('0x69'):_0x3d5979[_0x0fe6('0x67')]=_0x0fe6('0x6a');break;case _0x0fe6('0x6b'):_0x3d5979['Call_Result']=_0x0fe6('0x6c');break;case _0x0fe6('0x6d'):_0x3d5979['Call_Result']='Abandoned';break;case _0x0fe6('0x6e'):_0x3d5979[_0x0fe6('0x67')]=_0x0fe6('0x6f');default:}_0x3d5979[_0x0fe6('0x70')]=(_0x5cf2e6===_0x0fe6('0x71')?moment(_0x544a15[_0x0fe6('0x64')])[_0x0fe6('0x32')](_0x0fe6('0x65')):moment(_0x544a15[_0x0fe6('0x72')])[_0x0fe6('0x32')]('YYYY-MM-DDTHH:mm:ss'))||moment()[_0x0fe6('0x32')](_0x0fe6('0x65'));_0x3d5979['Call_Type']=_0x5cf2e6||_0x0fe6('0x73');_0x3d5979=_[_0x0fe6('0x74')](_0x3d5979,getCustomFields(_0x1107f5['Fields'],_0x544a15));return request({'method':'POST','uri':_0x0fe6('0x42')+_0x119315+_0x0fe6('0x75'),'headers':{'Authorization':'Zoho-oauthtoken\x20'+_0x3006ca},'body':{'data':[_0x3d5979]},'json':!![]})[_0x0fe6('0x2a')](function(_0x249712){if(_0x249712&&_0x249712['data'][0x0][_0x0fe6('0x48')]===_0x0fe6('0x76')){logger[_0x0fe6('0x30')](_0x0fe6('0x77'));return{'id':_0x249712[_0x0fe6('0x40')][0x0][_0x0fe6('0x49')]['id']};}})[_0x0fe6('0x2c')](function(_0x1e07c5){logger[_0x0fe6('0x30')](_0x0fe6('0x78'),_0x1e07c5[_0x0fe6('0x2f')]);console['log'](_0x0fe6('0x78'),_0x1e07c5);});}exports[_0x0fe6('0x79')]=function(_0x44b946,_0x162215,_0x49fc2e,_0x56ff53,_0x278a77,_0x1829cc){var _0x298b26,_0x45256f,_0x53872c;_0x1829cc[_0x0fe6('0x7a')]=intUtil[_0x0fe6('0x7b')](_0x1829cc[_0x0fe6('0x7a')]);_0x1829cc['serverUrl']=intUtil[_0x0fe6('0x7b')](_0x1829cc[_0x0fe6('0x7c')]);if(_0x278a77&&_0x278a77[_0x0fe6('0x7d')]){logger[_0x0fe6('0x30')](_0x0fe6('0x7e'),_0x0fe6('0x7f'));_0x162215['recordingURL']=_0x1829cc[_0x0fe6('0x7c')]+_0x0fe6('0x80')+_0x162215[_0x0fe6('0x81')]+_0x0fe6('0x82')+md5(_0x162215[_0x0fe6('0x81')]);}else{_0x162215[_0x0fe6('0x83')]='';}var _0x3d14b5=_0x1829cc[_0x0fe6('0x7a')]===_0x0fe6('0x84')?'eu':_0x0fe6('0x85');return getAccessToken(_0x1829cc)['then'](function(_0x113511){_0x53872c=_0x113511;return getUser(_0x53872c,_0x3d14b5,_0x1829cc,_0x56ff53['email']);})[_0x0fe6('0x2a')](function(_0x1e1d14){_0x298b26=_0x1e1d14;logger[_0x0fe6('0x30')](_0x0fe6('0x86'),_0x298b26['id']);return getEndUser(_0x53872c,_0x3d14b5,_0x1829cc,_0x162215[_0x0fe6('0x87')],_0x162215['calleridnum'],_0x298b26,_0x49fc2e);})[_0x0fe6('0x2a')](function(_0x47a5eb){_0x45256f=_0x47a5eb;return getCall(_0x53872c,_0x3d14b5,_0x1829cc,_0x298b26,_0x45256f,_0x49fc2e,_0x162215,_0x0fe6('0x73'));})[_0x0fe6('0x2a')](function(_0x25df23){if(_0x25df23){logger[_0x0fe6('0x30')](_0x0fe6('0x88'),_0x25df23['id']);logger['info'](_0x0fe6('0x7e'),_0x0fe6('0x89'));emit(util[_0x0fe6('0x32')](_0x0fe6('0x8a'),_0x56ff53[_0x0fe6('0x19')]),_0x0fe6('0x8b'),{'uri':_0x0fe6('0x8c')+_0x1829cc[_0x0fe6('0x7a')]+'/crm/EntityInfo.do?module=Calls&id='+_0x25df23['id']});}})[_0x0fe6('0x2c')](function(_0x2b0147){logger[_0x0fe6('0x2d')]('[QUEUE]',JSON[_0x0fe6('0xd')](_0x2b0147));});};exports['outbound']=function(_0xa2c718,_0x5d9603,_0x4fe9e1,_0x166d06,_0x1a8345,_0x51227d,_0x8584d3){var _0x4c4d49,_0x3c34c0,_0x551b33;_0x51227d[_0x0fe6('0x7a')]=intUtil[_0x0fe6('0x7b')](_0x51227d[_0x0fe6('0x7a')]);_0x51227d['serverUrl']=intUtil['stripTrailingSlash'](_0x51227d[_0x0fe6('0x7c')]);if(_0x8584d3&&_0x8584d3[_0x0fe6('0x8d')]&&_0x8584d3[_0x0fe6('0x8d')]!==_0x0fe6('0x8e')){logger[_0x0fe6('0x30')]('[OUTBOUND]',_0x0fe6('0x7f'));_0x5d9603[_0x0fe6('0x83')]=_0x51227d['serverUrl']+_0x0fe6('0x80')+_0x5d9603[_0x0fe6('0x81')]+_0x0fe6('0x82')+md5(_0x5d9603[_0x0fe6('0x81')]);}var _0x310da7=_0x51227d[_0x0fe6('0x7a')]===_0x0fe6('0x84')?'eu':_0x0fe6('0x85');return getAccessToken(_0x51227d)[_0x0fe6('0x2a')](function(_0x592fd4){_0x551b33=_0x592fd4;return getUser(_0x551b33,_0x310da7,_0x51227d,_0x166d06[_0x0fe6('0x39')]);})[_0x0fe6('0x2a')](function(_0x58bc02){_0x4c4d49=_0x58bc02;logger['info']('The\x20User\x20ID\x20is:',_0x4c4d49['id']);return getEndUser(_0x551b33,_0x310da7,_0x51227d,_0x5d9603[_0x0fe6('0x8f')],_0x5d9603[_0x0fe6('0x90')],_0x4c4d49,_0x4fe9e1);})[_0x0fe6('0x2a')](function(_0x5e77b9){_0x3c34c0=_0x5e77b9;return getCall(_0x551b33,_0x310da7,_0x51227d,_0x4c4d49,_0x3c34c0,_0x4fe9e1,_0x5d9603,'Outbound');})[_0x0fe6('0x2a')](function(_0x599f0c){if(_0x599f0c){logger[_0x0fe6('0x30')](_0x0fe6('0x88'),_0x599f0c['id']);logger[_0x0fe6('0x30')](_0x0fe6('0x91'),_0x0fe6('0x89'));emit(util[_0x0fe6('0x32')](_0x0fe6('0x8a'),_0x166d06['name']),'trigger:browser:url',{'uri':'https://crm.'+_0x51227d[_0x0fe6('0x7a')]+_0x0fe6('0x92')+_0x599f0c['id']});}})[_0x0fe6('0x2c')](function(_0x224387){logger[_0x0fe6('0x2d')]('[OUTBOUND]',JSON['stringify'](_0x224387));});};exports['unmanaged']=function(_0x56e429,_0x52fa08,_0x39c146,_0x118968,_0x5d776c,_0x537ad8){var _0x3b0560,_0xc6a5b7,_0x1b5835;_0x537ad8['host']=intUtil[_0x0fe6('0x7b')](_0x537ad8[_0x0fe6('0x7a')]);_0x537ad8[_0x0fe6('0x7c')]=intUtil['stripTrailingSlash'](_0x537ad8[_0x0fe6('0x7c')]);if(_0x5d776c&&_0x5d776c[_0x0fe6('0x7d')]){logger['info']('['+_0x52fa08[_0x0fe6('0x93')][_0x0fe6('0x94')]()+']',_0x0fe6('0x7f'));_0x52fa08[_0x0fe6('0x83')]=_0x537ad8['serverUrl']+_0x0fe6('0x80')+_0x52fa08[_0x0fe6('0x81')]+_0x0fe6('0x82')+md5(_0x52fa08['uniqueid']);}else{_0x52fa08[_0x0fe6('0x83')]='';}var _0x39d4ca=_0x537ad8[_0x0fe6('0x7a')]==='zoho.eu'?'eu':'com';return getAccessToken(_0x537ad8)[_0x0fe6('0x2a')](function(_0x38ba3d){_0x1b5835=_0x38ba3d;return getUser(_0x1b5835,_0x39d4ca,_0x537ad8);})[_0x0fe6('0x2a')](function(_0x48b3e8){_0x3b0560=_0x48b3e8;logger['info'](_0x0fe6('0x86'),_0x3b0560['id']);return getEndUser(_0x1b5835,_0x39d4ca,_0x537ad8,_0x52fa08['calleridname'],_0x52fa08['calleridnum'],_0x3b0560,_0x39c146);})[_0x0fe6('0x2a')](function(_0x117057){_0xc6a5b7=_0x117057;return getCall(_0x1b5835,_0x39d4ca,_0x537ad8,_0x3b0560,_0xc6a5b7,_0x39c146,_0x52fa08,_0x0fe6('0x73'));})['then'](function(_0x86db99){if(_0x86db99){logger[_0x0fe6('0x30')]('The\x20Call\x20ID\x20is:',_0x86db99['id']);}})['catch'](function(_0xe92bbe){logger[_0x0fe6('0x2d')]('['+_0x52fa08[_0x0fe6('0x93')][_0x0fe6('0x94')]()+']',JSON[_0x0fe6('0xd')](_0xe92bbe));});}; \ No newline at end of file +var _0x7728=['Call_Result','Called','complete','Answered','Rejected','abandoned','Abandoned','timeout','Timeout','Call_Start_Time','outbound','agentcalledAt','Call_Type','Inbound','merge','Fields','/crm/v2/Calls','Call\x20created!','err','stack','queue','host','stripTrailingSlash','serverUrl','[QUEUE]','Recording\x20is\x20enabled!','recordingURL','/api/voice/recordings/','uniqueid','/downloads?type=uniqueid&token=','com','The\x20User\x20ID\x20is:','calleridname','calleridnum','The\x20Call\x20ID\x20is:','Displaying\x20call\x20to\x20agent\x20in\x20a\x20new\x20tab...','trigger:browser:url','https://crm.','/crm/EntityInfo.do?module=Calls&id=','recordingFormat','none','[OUTBOUND]','zoho.eu','destcalleridname','destcalleridnum','Outbound','user:%s','monitor_format','toUpperCase','request-promise','md5','util','./util','moment','ioredis','bluebird','../../../../config/environment','../../../../config/logger','zoho','redis','defaults','localhost','emit','debug','[HTTP]','length','forEach','includes','string','picklist','type','idField','content','toString','variable','variableName','Variable','name','toLowerCase','indexOf','split','isNil','access_token','isBefore','expires_in','zone','https://accounts.zoho.com','https://accounts.zoho.com.au','https://accounts.zoho.eu','/oauth/v2/token','refreshToken','refresh_token','then','add','seconds','catch','error','Failing\x20creating\x20the\x20access_token','Search\x20user','GET','https://www.zohoapis.%s/crm/v2/users','ActiveUsers','Zoho-oauthtoken\x20','isArrayLikeObject','users','findIndex','email','info','Administrator','Using\x20the\x20admin\x20account!','user','Unable\x20to\x20retrieve\x20zoho\x20account\x20users:\x20','stringify','The\x20failing\x20result\x20is','enduserType','POST','https://www.zohoapis.','/crm/v2/','role','first_name','last_name','data','code','SUCCESS','details','startCase','moduleCreate','Error:\x20','log','CREATE\x20ERROR','moduleSearch','contact_lead','uri','/crm/v2/Contacts/search?criteria=((Phone:equals:','Leads','nothing','Contacts','lead','/crm/v2/Leads/search?criteria=((Phone:equals:','Owner','profile','administrator','Subject','Subjects','Description','getString','Descriptions','Who_Id','Full_Name','First_Name','Last_Name','What_Id','$se_module','talktime','Call_Duration','format','mm:ss','endtime','utc','YYYY-MM-DDTHH:mm:ss','diff','starttime','lastevent','called'];(function(_0x6ad3fe,_0x7adeb2){var _0x4461e5=function(_0x3050bb){while(--_0x3050bb){_0x6ad3fe['push'](_0x6ad3fe['shift']());}};_0x4461e5(++_0x7adeb2);}(_0x7728,0xd5));var _0x8772=function(_0x1cc925,_0x4c59a1){_0x1cc925=_0x1cc925-0x0;var _0x5a2e6c=_0x7728[_0x1cc925];return _0x5a2e6c;};'use strict';var _=require('lodash');var rp=require(_0x8772('0x0'));var md5=require(_0x8772('0x1'));var util=require(_0x8772('0x2'));var intUtil=require(_0x8772('0x3'));var moment=require(_0x8772('0x4'));var Redis=require(_0x8772('0x5'));var BPromise=require(_0x8772('0x6'));var config=require(_0x8772('0x7'));var logger=require(_0x8772('0x8'))(_0x8772('0x9'));config[_0x8772('0xa')]=_[_0x8772('0xb')](config[_0x8772('0xa')],{'host':_0x8772('0xc'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config['redis']));function emit(_0x19f594,_0xc7c71d,_0x20d7fe){io['to'](_0x19f594)[_0x8772('0xd')](_0xc7c71d,_0x20d7fe);}function request(_0x2c2456){logger[_0x8772('0xe')](_0x8772('0xf'),JSON['stringify'](_0x2c2456));return rp(_0x2c2456);}function getCustomFields(_0xcc062,_0x36595c){var _0x297b66={};if(_0xcc062[_0x8772('0x10')]>0x0){_[_0x8772('0x11')](_0xcc062,function(_0x53bdca){if(_[_0x8772('0x12')]([_0x8772('0x13'),_0x8772('0x14')],_0x53bdca[_0x8772('0x15')])&&_0x53bdca[_0x8772('0x16')]){_0x297b66[_0x53bdca['idField']]=_0x53bdca[_0x8772('0x17')][_0x8772('0x18')]();}else if(_0x53bdca[_0x8772('0x15')]===_0x8772('0x19')&&_0x53bdca['variableName']&&_0x53bdca[_0x8772('0x16')]&&_0x36595c[_0x53bdca[_0x8772('0x1a')]]){_0x297b66[_0x53bdca[_0x8772('0x16')]]=_0x36595c[_0x53bdca[_0x8772('0x1a')]][_0x8772('0x18')]();}else if(_0x53bdca['type']==='customVariable'&&_0x53bdca[_0x8772('0x1b')]&&_0x53bdca[_0x8772('0x1b')]['name']&&_0x53bdca[_0x8772('0x16')]&&_0x36595c[_0x53bdca['Variable'][_0x8772('0x1c')][_0x8772('0x1d')]()]){_0x297b66[_0x53bdca['idField']]=_0x36595c[_0x53bdca['Variable'][_0x8772('0x1c')][_0x8772('0x1d')]()][_0x8772('0x18')]();}});}return _0x297b66;}function getName(_0x236fcc){if(_0x236fcc[_0x8772('0x1e')]('\x20')>0x0){var _0x5029ad=_0x236fcc[_0x8772('0x1f')](/ (.+)/);if(_0x5029ad[0x1]){return _0x5029ad;}}return[_0x236fcc,_0x236fcc];}var accountsTokens={};function getAccessToken(_0x245471){return new Promise(function(_0x22351f,_0x28dc90){if(!_[_0x8772('0x20')](accountsTokens[_0x245471['id']])&&!_[_0x8772('0x20')](accountsTokens[_0x245471['id']][_0x8772('0x21')])){if(moment()[_0x8772('0x22')](accountsTokens[_0x245471['id']][_0x8772('0x23')])){_0x22351f(accountsTokens[_0x245471['id']][_0x8772('0x21')]);}}var _0x4c092f;switch(_0x245471[_0x8772('0x24')]){case'US':_0x4c092f=_0x8772('0x25');break;case'AU':_0x4c092f=_0x8772('0x26');break;case'EU':_0x4c092f=_0x8772('0x27');break;case'IN':_0x4c092f='https://accounts.zoho.in';break;case'CN':_0x4c092f='https://accounts.zoho.com.cn';break;default:_0x4c092f=_0x8772('0x27');break;}var _0xea2366={'method':'POST','uri':_0x4c092f+_0x8772('0x28'),'qs':{'refresh_token':_0x245471[_0x8772('0x29')],'client_id':_0x245471['clientId'],'client_secret':_0x245471['clientSecret'],'grant_type':_0x8772('0x2a')},'json':!![]};return rp(_0xea2366)[_0x8772('0x2b')](function(_0x53e93a){accountsTokens[_0x245471['id']]={'access_token':_0x53e93a[_0x8772('0x21')],'expires_in':moment()[_0x8772('0x2c')](_0x53e93a[_0x8772('0x23')],_0x8772('0x2d'))};_0x22351f(_0x53e93a[_0x8772('0x21')]);})[_0x8772('0x2e')](function(_0x35e970){logger[_0x8772('0x2f')](_0x8772('0x30'),_0x35e970['stack']);_0x28dc90(_0x35e970);});});}function getUser(_0x249e4c,_0x562ab4,_0x581d1d,_0x47a20f){logger['info'](_0x8772('0x31'));return request({'method':_0x8772('0x32'),'uri':util['format'](_0x8772('0x33'),_0x562ab4),'qs':{'type':_0x8772('0x34')},'headers':{'Authorization':_0x8772('0x35')+_0x249e4c},'json':!![]})[_0x8772('0x2b')](function(_0x58b86a){if(_0x58b86a['users']){var _0x4e4e5b=-0x1;if(_[_0x8772('0x36')](_0x58b86a[_0x8772('0x37')])){if(!_[_0x8772('0x20')](_0x47a20f)){_0x4e4e5b=_[_0x8772('0x38')](_0x58b86a[_0x8772('0x37')],function(_0xd7f42d){return _0xd7f42d[_0x8772('0x39')]===_0x47a20f;});}if(_0x4e4e5b>=0x0){logger[_0x8772('0x3a')]('Agent\x20found!');}else{logger[_0x8772('0x3a')]('Using\x20the\x20admin\x20account!');_0x4e4e5b=_[_0x8772('0x38')](_0x58b86a[_0x8772('0x37')],function(_0x156581){return _0x156581['profile'][_0x8772('0x1c')]===_0x8772('0x3b');});}return _0x58b86a[_0x8772('0x37')][_0x4e4e5b];}else{if(_0x58b86a['user']['profile'][_0x8772('0x1c')]===_0x8772('0x3b')){logger[_0x8772('0x3a')](_0x8772('0x3c'));user=_0x58b86a[_0x8772('0x3d')];return user;}else{logger[_0x8772('0x2f')]('The\x20failing\x20result\x20is',JSON['stringify'](_0x58b86a));throw new Error(_0x8772('0x3e')+JSON[_0x8772('0x3f')](_0x58b86a));}}}else{logger[_0x8772('0x2f')](_0x8772('0x40'),JSON[_0x8772('0x3f')](_0x58b86a));throw new Error(_0x8772('0x3e')+JSON['stringify'](_0x58b86a));}})[_0x8772('0x2e')](function(_0x50cb07){console[_0x8772('0x2f')](_0x50cb07);});}function getZohoUser(_0x301efc,_0x35d4f4){return new BPromise(function(_0x48ece5,_0x5977f6){request(_0x301efc)[_0x8772('0x2b')](function(_0x3a0556){var _0x529429=null;if(_0x3a0556){_0x529429=_0x3a0556['data'][0x0];_0x529429[_0x8772('0x41')]=_0x35d4f4;}_0x48ece5(_0x529429);})[_0x8772('0x2e')](function(_0x98bfbb){_0x5977f6(_0x98bfbb);});});}function createEndUser(_0x78e640,_0x2ef5ac,_0x5e6c30,_0x3e12d9,_0x8e7621,_0x5ca86c){var _0x5e6c30=getName(_0x5e6c30);return request({'method':_0x8772('0x42'),'uri':_0x8772('0x43')+_0x2ef5ac+_0x8772('0x44')+_['startCase'](_0x5ca86c['moduleCreate'])+'s','body':{'data':[{'Last_Name':_0x5e6c30[0x1],'First_Name':_0x5e6c30[0x0],'Phone':_0x3e12d9,'Owner':{'name':!_[_0x8772('0x20')](_0x8e7621[_0x8772('0x45')][_0x8772('0x1c')])?_0x8e7621[_0x8772('0x45')][_0x8772('0x1c')]:!_['isNil'](_0x8e7621['first_name'])?_0x8e7621[_0x8772('0x46')]+'\x20'+_0x8e7621['last_name']:_0x8e7621[_0x8772('0x47')],'id':_0x8e7621['id']}}]},'headers':{'Authorization':_0x8772('0x35')+_0x78e640},'json':!![]})[_0x8772('0x2b')](function(_0x498cdb){if(_0x498cdb&&_0x498cdb[_0x8772('0x48')][0x0][_0x8772('0x49')]===_0x8772('0x4a')){var _0x438f1e=_0x498cdb[_0x8772('0x48')][0x0][_0x8772('0x4b')];_0x438f1e[_0x8772('0x41')]=_[_0x8772('0x4c')](_0x5ca86c[_0x8772('0x4d')])+'s';return _0x438f1e;}logger[_0x8772('0x2f')](_0x8772('0x40'),JSON['stringify'](data));throw new Error(_0x8772('0x4e')+JSON[_0x8772('0x3f')](data));})[_0x8772('0x2e')](function(_0x2bb8ec){console[_0x8772('0x4f')](_0x8772('0x50'),_0x2bb8ec);});}function getEndUser(_0x36d425,_0x449c29,_0x30d59c,_0x3903d3,_0xa50cf8,_0x32327e,_0x29f70b){var _0x2ab275={'method':_0x8772('0x32'),'uri':'','headers':{'Authorization':'Zoho-oauthtoken\x20'+_0x36d425},'json':!![]};switch(_0x29f70b[_0x8772('0x51')]){case _0x8772('0x52'):_0x2ab275[_0x8772('0x53')]=_0x8772('0x43')+_0x449c29+_0x8772('0x54')+_0xa50cf8+'))';return getZohoUser(_0x2ab275,'Contacts')[_0x8772('0x2b')](function(_0x1000b3){if(_0x1000b3)return _0x1000b3;_0x2ab275[_0x8772('0x53')]='https://www.zohoapis.'+_0x449c29+'/crm/v2/Leads/search?criteria=((Phone:equals:'+_0xa50cf8+'))';return getZohoUser(_0x2ab275,_0x8772('0x55'))[_0x8772('0x2b')](function(_0x13bebd){if(_0x13bebd)return _0x13bebd;if(_0x29f70b['moduleCreate']!=_0x8772('0x56')){return createEndUser(_0x36d425,_0x449c29,_0x3903d3,_0xa50cf8,_0x32327e,_0x29f70b);}else{return{};}});});break;case'contact':_0x2ab275[_0x8772('0x53')]=_0x8772('0x43')+_0x449c29+_0x8772('0x54')+_0xa50cf8+'))';return getZohoUser(_0x2ab275,_0x8772('0x57'))[_0x8772('0x2b')](function(_0x14ff9f){if(_0x14ff9f)return _0x14ff9f;if(_0x29f70b['moduleCreate']!=_0x8772('0x56')){return createEndUser(_0x36d425,_0x449c29,_0x3903d3,_0xa50cf8,_0x32327e,_0x29f70b);}else{return{};}});break;case _0x8772('0x58'):_0x2ab275[_0x8772('0x53')]=_0x8772('0x43')+_0x449c29+_0x8772('0x59')+_0xa50cf8+'))';return getZohoUser(_0x2ab275,_0x8772('0x55'))[_0x8772('0x2b')](function(_0x2c29dc){if(_0x2c29dc)return _0x2c29dc;if(_0x29f70b['moduleCreate']!=_0x8772('0x56')){return createEndUser(_0x36d425,_0x449c29,_0x3903d3,_0xa50cf8,_0x32327e,_0x29f70b);}else{return{};}});break;}}function getCall(_0x32ee8c,_0x71497b,_0x306b4f,_0x164138,_0x39cc3a,_0x300000,_0x866dd1,_0x1535b4){logger['info']('Creating\x20new\x20call...');var _0x22d6d5={};_0x22d6d5[_0x8772('0x5a')]={'name':!_['isNil'](_0x164138[_0x8772('0x45')][_0x8772('0x1c')])&&!_['isNil'](_0x164138[_0x8772('0x5b')][_0x8772('0x1c')])&&_0x164138[_0x8772('0x5b')][_0x8772('0x1c')]===_0x8772('0x5c')?_0x164138[_0x8772('0x45')]['name']:!_[_0x8772('0x20')](_0x164138[_0x8772('0x46')])?_0x164138['first_name']+'\x20'+_0x164138['last_name']:_0x164138[_0x8772('0x47')],'id':_0x164138['id']};_0x22d6d5[_0x8772('0x5d')]=intUtil['getString'](_0x300000[_0x8772('0x5e')],_0x866dd1,'\x20');_0x22d6d5[_0x8772('0x5f')]=intUtil[_0x8772('0x60')](_0x300000[_0x8772('0x61')],_0x866dd1,'\x0a');if(_0x39cc3a['enduserType']===_0x8772('0x57')){_0x22d6d5[_0x8772('0x62')]={'name':!_['isNil'](_0x39cc3a[_0x8772('0x63')])?_0x39cc3a['Full_Name']:!_[_0x8772('0x20')](_0x39cc3a[_0x8772('0x64')])?_0x39cc3a[_0x8772('0x64')]+'\x20'+_0x39cc3a[_0x8772('0x65')]:_0x39cc3a[_0x8772('0x65')],'id':_0x39cc3a['id']};}if(_0x39cc3a[_0x8772('0x41')]===_0x8772('0x55')){_0x22d6d5[_0x8772('0x66')]={'name':!_[_0x8772('0x20')](_0x39cc3a['Full_Name'])?_0x39cc3a['Full_Name']:!_['isNil'](_0x39cc3a[_0x8772('0x64')])?_0x39cc3a[_0x8772('0x64')]+'\x20'+_0x39cc3a[_0x8772('0x65')]:_0x39cc3a[_0x8772('0x65')],'id':_0x39cc3a['id']};_0x22d6d5[_0x8772('0x67')]=_[_0x8772('0x4c')](_0x39cc3a[_0x8772('0x41')]);}if(_0x866dd1[_0x8772('0x68')]){_0x22d6d5[_0x8772('0x69')]=moment['utc'](parseInt(_0x866dd1[_0x8772('0x68')])*0x3e8)[_0x8772('0x6a')](_0x8772('0x6b'));}else if(_0x866dd1['answertime']&&_0x866dd1[_0x8772('0x6c')]){_0x22d6d5['Call_Duration']=moment[_0x8772('0x6d')](moment(_0x866dd1['endtime'],_0x8772('0x6e'))[_0x8772('0x6f')](moment(_0x866dd1[_0x8772('0x70')],'YYYY-MM-DDTHH:mm:ss')))[_0x8772('0x6a')](_0x8772('0x6b'));}switch(_0x866dd1[_0x8772('0x71')]){case _0x8772('0x72'):_0x22d6d5[_0x8772('0x73')]=_0x8772('0x74');break;case _0x8772('0x75'):case'connect':_0x22d6d5[_0x8772('0x73')]=_0x8772('0x76');break;case'rejected':_0x22d6d5[_0x8772('0x73')]=_0x8772('0x77');break;case _0x8772('0x78'):_0x22d6d5[_0x8772('0x73')]=_0x8772('0x79');break;case _0x8772('0x7a'):_0x22d6d5[_0x8772('0x73')]=_0x8772('0x7b');default:}_0x22d6d5[_0x8772('0x7c')]=(_0x1535b4===_0x8772('0x7d')?moment(_0x866dd1[_0x8772('0x70')])['format'](_0x8772('0x6e')):moment(_0x866dd1[_0x8772('0x7e')])[_0x8772('0x6a')](_0x8772('0x6e')))||moment()[_0x8772('0x6a')](_0x8772('0x6e'));_0x22d6d5[_0x8772('0x7f')]=_0x1535b4||_0x8772('0x80');_0x22d6d5=_[_0x8772('0x81')](_0x22d6d5,getCustomFields(_0x300000[_0x8772('0x82')],_0x866dd1));return request({'method':_0x8772('0x42'),'uri':_0x8772('0x43')+_0x71497b+_0x8772('0x83'),'headers':{'Authorization':_0x8772('0x35')+_0x32ee8c},'body':{'data':[_0x22d6d5]},'json':!![]})[_0x8772('0x2b')](function(_0x53727d){if(_0x53727d&&_0x53727d['data'][0x0]['code']===_0x8772('0x4a')){logger[_0x8772('0x3a')](_0x8772('0x84'));return{'id':_0x53727d[_0x8772('0x48')][0x0][_0x8772('0x4b')]['id']};}})['catch'](function(_0x25834f){logger['info'](_0x8772('0x85'),_0x25834f[_0x8772('0x86')]);console[_0x8772('0x4f')](_0x8772('0x85'),_0x25834f);});}exports[_0x8772('0x87')]=function(_0x3932c1,_0x120f36,_0x535b1e,_0x1d99ab,_0x2b30b6,_0xbd10b9){var _0x4e2a0e,_0x32b100,_0x33e0dc;_0xbd10b9[_0x8772('0x88')]=intUtil[_0x8772('0x89')](_0xbd10b9[_0x8772('0x88')]);_0xbd10b9[_0x8772('0x8a')]=intUtil[_0x8772('0x89')](_0xbd10b9[_0x8772('0x8a')]);if(_0x2b30b6&&_0x2b30b6['monitor_format']){logger[_0x8772('0x3a')](_0x8772('0x8b'),_0x8772('0x8c'));_0x120f36[_0x8772('0x8d')]=_0xbd10b9[_0x8772('0x8a')]+_0x8772('0x8e')+_0x120f36[_0x8772('0x8f')]+_0x8772('0x90')+md5(_0x120f36[_0x8772('0x8f')]);}else{_0x120f36[_0x8772('0x8d')]='';}var _0x21db2f=_0xbd10b9[_0x8772('0x88')]==='zoho.eu'?'eu':_0x8772('0x91');return getAccessToken(_0xbd10b9)[_0x8772('0x2b')](function(_0x18d50c){_0x33e0dc=_0x18d50c;return getUser(_0x33e0dc,_0x21db2f,_0xbd10b9,_0x1d99ab[_0x8772('0x39')]);})[_0x8772('0x2b')](function(_0x1f4187){_0x4e2a0e=_0x1f4187;logger[_0x8772('0x3a')](_0x8772('0x92'),_0x4e2a0e['id']);return getEndUser(_0x33e0dc,_0x21db2f,_0xbd10b9,_0x120f36[_0x8772('0x93')],_0x120f36[_0x8772('0x94')],_0x4e2a0e,_0x535b1e);})[_0x8772('0x2b')](function(_0x4dc898){_0x32b100=_0x4dc898;return getCall(_0x33e0dc,_0x21db2f,_0xbd10b9,_0x4e2a0e,_0x32b100,_0x535b1e,_0x120f36,_0x8772('0x80'));})[_0x8772('0x2b')](function(_0xc37c71){if(_0xc37c71){logger[_0x8772('0x3a')](_0x8772('0x95'),_0xc37c71['id']);logger['info'](_0x8772('0x8b'),_0x8772('0x96'));emit(util[_0x8772('0x6a')]('user:%s',_0x1d99ab[_0x8772('0x1c')]),_0x8772('0x97'),{'uri':_0x8772('0x98')+_0xbd10b9['host']+_0x8772('0x99')+_0xc37c71['id']});}})['catch'](function(_0x9c8be0){logger['error']('[QUEUE]',JSON[_0x8772('0x3f')](_0x9c8be0));});};exports['outbound']=function(_0x183344,_0x24aa75,_0x3173d5,_0x48a3e1,_0x46b832,_0x40b72d,_0x1f1efc){var _0x797c49,_0x133d0d,_0x53cfa2;_0x40b72d['host']=intUtil[_0x8772('0x89')](_0x40b72d[_0x8772('0x88')]);_0x40b72d[_0x8772('0x8a')]=intUtil[_0x8772('0x89')](_0x40b72d[_0x8772('0x8a')]);if(_0x1f1efc&&_0x1f1efc[_0x8772('0x9a')]&&_0x1f1efc[_0x8772('0x9a')]!==_0x8772('0x9b')){logger[_0x8772('0x3a')](_0x8772('0x9c'),_0x8772('0x8c'));_0x24aa75[_0x8772('0x8d')]=_0x40b72d[_0x8772('0x8a')]+_0x8772('0x8e')+_0x24aa75[_0x8772('0x8f')]+_0x8772('0x90')+md5(_0x24aa75[_0x8772('0x8f')]);}var _0x7bcf20=_0x40b72d[_0x8772('0x88')]===_0x8772('0x9d')?'eu':_0x8772('0x91');return getAccessToken(_0x40b72d)['then'](function(_0x49f701){_0x53cfa2=_0x49f701;return getUser(_0x53cfa2,_0x7bcf20,_0x40b72d,_0x48a3e1[_0x8772('0x39')]);})[_0x8772('0x2b')](function(_0x9c3367){_0x797c49=_0x9c3367;logger[_0x8772('0x3a')](_0x8772('0x92'),_0x797c49['id']);return getEndUser(_0x53cfa2,_0x7bcf20,_0x40b72d,_0x24aa75[_0x8772('0x9e')],_0x24aa75[_0x8772('0x9f')],_0x797c49,_0x3173d5);})[_0x8772('0x2b')](function(_0x269064){_0x133d0d=_0x269064;return getCall(_0x53cfa2,_0x7bcf20,_0x40b72d,_0x797c49,_0x133d0d,_0x3173d5,_0x24aa75,_0x8772('0xa0'));})[_0x8772('0x2b')](function(_0x3623c3){if(_0x3623c3){logger[_0x8772('0x3a')](_0x8772('0x95'),_0x3623c3['id']);logger[_0x8772('0x3a')](_0x8772('0x9c'),_0x8772('0x96'));emit(util[_0x8772('0x6a')](_0x8772('0xa1'),_0x48a3e1['name']),_0x8772('0x97'),{'uri':_0x8772('0x98')+_0x40b72d['host']+_0x8772('0x99')+_0x3623c3['id']});}})['catch'](function(_0x2ad562){logger[_0x8772('0x2f')](_0x8772('0x9c'),JSON[_0x8772('0x3f')](_0x2ad562));});};exports['unmanaged']=function(_0x45dce4,_0x34cb7a,_0x35c2dc,_0x3a4300,_0xc11527,_0x3d38ca){var _0x47c67f,_0x1036cf,_0x5e63eb;_0x3d38ca[_0x8772('0x88')]=intUtil['stripTrailingSlash'](_0x3d38ca[_0x8772('0x88')]);_0x3d38ca[_0x8772('0x8a')]=intUtil[_0x8772('0x89')](_0x3d38ca['serverUrl']);if(_0xc11527&&_0xc11527[_0x8772('0xa2')]){logger[_0x8772('0x3a')]('['+_0x34cb7a['lastevent'][_0x8772('0xa3')]()+']',_0x8772('0x8c'));_0x34cb7a[_0x8772('0x8d')]=_0x3d38ca['serverUrl']+_0x8772('0x8e')+_0x34cb7a['uniqueid']+_0x8772('0x90')+md5(_0x34cb7a[_0x8772('0x8f')]);}else{_0x34cb7a[_0x8772('0x8d')]='';}var _0x40805c=_0x3d38ca[_0x8772('0x88')]===_0x8772('0x9d')?'eu':'com';return getAccessToken(_0x3d38ca)[_0x8772('0x2b')](function(_0x266e04){_0x5e63eb=_0x266e04;return getUser(_0x5e63eb,_0x40805c,_0x3d38ca);})['then'](function(_0x577282){_0x47c67f=_0x577282;logger[_0x8772('0x3a')](_0x8772('0x92'),_0x47c67f['id']);return getEndUser(_0x5e63eb,_0x40805c,_0x3d38ca,_0x34cb7a['calleridname'],_0x34cb7a['calleridnum'],_0x47c67f,_0x35c2dc);})[_0x8772('0x2b')](function(_0x56346c){_0x1036cf=_0x56346c;return getCall(_0x5e63eb,_0x40805c,_0x3d38ca,_0x47c67f,_0x1036cf,_0x35c2dc,_0x34cb7a,_0x8772('0x80'));})[_0x8772('0x2b')](function(_0x49665f){if(_0x49665f){logger[_0x8772('0x3a')](_0x8772('0x95'),_0x49665f['id']);}})[_0x8772('0x2e')](function(_0x4e6297){logger[_0x8772('0x2f')]('['+_0x34cb7a[_0x8772('0x71')][_0x8772('0xa3')]()+']',JSON[_0x8772('0x3f')](_0x4e6297));});}; \ No newline at end of file diff --git a/server/services/ami/trigger/script/index.js b/server/services/ami/trigger/script/index.js index 54c0287..b4a9e70 100644 --- a/server/services/ami/trigger/script/index.js +++ b/server/services/ami/trigger/script/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x833e=['exec','data2','Script','data3','%s\x20\x27%s\x27\x20failed\x20with\x20code\x20%d\x20and\x20error:\x20%s','info','format','shelljs','mustache','../../../../config/logger','trigger'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x833e,0x96));var _0xe833=function(_0x4c6fc7,_0x5e98c3){_0x4c6fc7=_0x4c6fc7-0x0;var _0x5ca44a=_0x833e[_0x4c6fc7];return _0x5ca44a;};'use strict';var util=require('util');var sh=require(_0xe833('0x0'));var Mustache=require(_0xe833('0x1'));var logger=require(_0xe833('0x2'))(_0xe833('0x3'));exports[_0xe833('0x4')]=function(_0x359701,_0x5371ff){var _0x4b8482=_0x359701['data2']?_0x359701[_0xe833('0x5')]:_0xe833('0x6');var _0x55ab2c=_0x359701[_0xe833('0x7')]?Mustache['render'](_0x359701[_0xe833('0x7')],_0x5371ff):_0x5371ff;sh[_0xe833('0x4')](_0x55ab2c,function(_0x26ffd1,_0x430aac,_0x32d259){if(_0x26ffd1!==0x0){logger['error'](util['format'](_0xe833('0x8'),_0x4b8482,_0x55ab2c,_0x26ffd1,_0x32d259));}else{logger[_0xe833('0x9')](util[_0xe833('0xa')]('%s\x20\x27%s\x27\x20succeeded\x20with\x20output:\x20%s',_0x4b8482,_0x55ab2c,_0x430aac));}});}; \ No newline at end of file +var _0xf989=['exec','data2','Script','render','data3','error','%s\x20\x27%s\x27\x20failed\x20with\x20code\x20%d\x20and\x20error:\x20%s','info','format','%s\x20\x27%s\x27\x20succeeded\x20with\x20output:\x20%s','util','shelljs','../../../../config/logger','trigger'];(function(_0x43812b,_0x5f5923){var _0x2f3516=function(_0x1812fe){while(--_0x1812fe){_0x43812b['push'](_0x43812b['shift']());}};_0x2f3516(++_0x5f5923);}(_0xf989,0x1f4));var _0x9f98=function(_0x53b8e0,_0x55d46e){_0x53b8e0=_0x53b8e0-0x0;var _0x10630c=_0xf989[_0x53b8e0];return _0x10630c;};'use strict';var util=require(_0x9f98('0x0'));var sh=require(_0x9f98('0x1'));var Mustache=require('mustache');var logger=require(_0x9f98('0x2'))(_0x9f98('0x3'));exports[_0x9f98('0x4')]=function(_0x50f3c3,_0x2851fe){var _0x49625d=_0x50f3c3[_0x9f98('0x5')]?_0x50f3c3[_0x9f98('0x5')]:_0x9f98('0x6');var _0x4a058e=_0x50f3c3['data3']?Mustache[_0x9f98('0x7')](_0x50f3c3[_0x9f98('0x8')],_0x2851fe):_0x2851fe;sh[_0x9f98('0x4')](_0x4a058e,function(_0x1b7cc4,_0x33f3bb,_0x588616){if(_0x1b7cc4!==0x0){logger[_0x9f98('0x9')](util['format'](_0x9f98('0xa'),_0x49625d,_0x4a058e,_0x1b7cc4,_0x588616));}else{logger[_0x9f98('0xb')](util[_0x9f98('0xc')](_0x9f98('0xd'),_0x49625d,_0x4a058e,_0x33f3bb));}});}; \ No newline at end of file diff --git a/server/services/ami/trigger/urlforward/index.js b/server/services/ami/trigger/urlforward/index.js index dee83b7..effa585 100644 --- a/server/services/ami/trigger/urlforward/index.js +++ b/server/services/ami/trigger/urlforward/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xcd9e=['info','format','%s\x20%s\x20sending\x20request\x20with\x20following\x20options:\x20%s','stringify','isNil','object','%s\x20%s\x20succeeded\x20with\x20status:\x20%d\x20and\x20response:\x20%s','%s\x20%s\x20failed\x20with\x20status:\x20%d\x20and\x20error:\x20%s\x20%s','statusCode','util','lodash','../../../../config/logger','trigger','exec','toUpperCase','data2','number','data5','headers','data6','parse','render','error','data1','GET','DELETE','POST','data7','body','stack','body\x20has\x20been\x20passed\x20to\x20URLforward\x20in\x20a\x20wrong\x20format'];(function(_0x52946e,_0x18c7cc){var _0x580252=function(_0x49fd55){while(--_0x49fd55){_0x52946e['push'](_0x52946e['shift']());}};_0x580252(++_0x18c7cc);}(_0xcd9e,0x85));var _0xecd9=function(_0x4c3ea1,_0x5aa2db){_0x4c3ea1=_0x4c3ea1-0x0;var _0x44087a=_0xcd9e[_0x4c3ea1];return _0x44087a;};'use strict';var rp=require('request-promise');var util=require(_0xecd9('0x0'));var _=require(_0xecd9('0x1'));var Mustache=require('mustache');var logger=require(_0xecd9('0x2'))(_0xecd9('0x3'));exports[_0xecd9('0x4')]=function(_0x3ead53,_0xa3a02d){var _0x43f8a2,_0x26bcea;var _0x183db3={'method':_0x3ead53['data1'][_0xecd9('0x5')](),'uri':Mustache['render'](_0x3ead53[_0xecd9('0x6')],_0xa3a02d),'json':!![],'resolveWithFullResponse':!![],'timeout':typeof parseInt(_0x3ead53['data5'])===_0xecd9('0x7')&&parseInt(_0x3ead53[_0xecd9('0x8')])>=0x1&&parseInt(_0x3ead53[_0xecd9('0x8')])<=0xa?parseInt(_0x3ead53['data5'])*0x3e8:0x5*0x3e8};try{_0x183db3[_0xecd9('0x9')]=_0x3ead53[_0xecd9('0xa')]?JSON[_0xecd9('0xb')](Mustache[_0xecd9('0xc')](_0x3ead53[_0xecd9('0xa')],_0xa3a02d)):{};}catch(_0x1d7e47){logger[_0xecd9('0xd')](_0x1d7e47['stack']);}switch(_0x3ead53[_0xecd9('0xe')][_0xecd9('0x5')]()){case _0xecd9('0xf'):case _0xecd9('0x10'):_0x43f8a2=null;_0x183db3['qs']=_0xa3a02d;break;case _0xecd9('0x11'):case'PUT':if(_0x3ead53[_0xecd9('0x12')]){try{_0x43f8a2=JSON[_0xecd9('0xb')](Mustache['render'](_0x3ead53[_0xecd9('0x12')],_0xa3a02d));_0x183db3[_0xecd9('0x13')]=_0x43f8a2;}catch(_0x3aeff5){logger['error'](_0x3aeff5[_0xecd9('0x14')]);logger[_0xecd9('0xd')](_0xecd9('0x15'));}}else{_0x43f8a2=_0xa3a02d;_0x183db3['body']=_0x43f8a2;}break;}logger[_0xecd9('0x16')](util[_0xecd9('0x17')](_0xecd9('0x18'),_0x3ead53[_0xecd9('0xe')],_0x3ead53[_0xecd9('0x6')],JSON[_0xecd9('0x19')](_0x183db3)));rp(_0x183db3)['then'](function(_0x4f4d22){_0x43f8a2=!_[_0xecd9('0x1a')](_0x43f8a2)?',\x20request\x20body:\x20'+_0x43f8a2:'';_0x26bcea=typeof _0x4f4d22['body']===_0xecd9('0x1b')?JSON['stringify'](_0x4f4d22[_0xecd9('0x13')]):_0x4f4d22[_0xecd9('0x13')];logger['info'](util[_0xecd9('0x17')](_0xecd9('0x1c'),_0x3ead53[_0xecd9('0xe')],_0x3ead53[_0xecd9('0x6')],_0x4f4d22['statusCode'],_0x26bcea));})['catch'](function(_0x83073c){logger[_0xecd9('0xd')](util[_0xecd9('0x17')](_0xecd9('0x1d'),_0x3ead53[_0xecd9('0xe')],_0x3ead53[_0xecd9('0x6')],_0x83073c[_0xecd9('0x1e')],_0x83073c['name'],_0x83073c['message']));});}; \ No newline at end of file +var _0x3113=['util','lodash','mustache','../../../../config/logger','trigger','exec','data1','toUpperCase','render','data2','data5','data6','error','stack','GET','DELETE','data7','body','body\x20has\x20been\x20passed\x20to\x20URLforward\x20in\x20a\x20wrong\x20format','format','%s\x20%s\x20sending\x20request\x20with\x20following\x20options:\x20%s','then',',\x20request\x20body:\x20','stringify','info','%s\x20%s\x20succeeded\x20with\x20status:\x20%d\x20and\x20response:\x20%s','catch','%s\x20%s\x20failed\x20with\x20status:\x20%d\x20and\x20error:\x20%s\x20%s','statusCode','name','message','request-promise'];(function(_0x249c3f,_0x86aebc){var _0x3a9c12=function(_0x55c1fd){while(--_0x55c1fd){_0x249c3f['push'](_0x249c3f['shift']());}};_0x3a9c12(++_0x86aebc);}(_0x3113,0x7f));var _0x3311=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0x3113[_0x122ef9];return _0x42fba0;};'use strict';var rp=require(_0x3311('0x0'));var util=require(_0x3311('0x1'));var _=require(_0x3311('0x2'));var Mustache=require(_0x3311('0x3'));var logger=require(_0x3311('0x4'))(_0x3311('0x5'));exports[_0x3311('0x6')]=function(_0x28c565,_0x55fb70){var _0x5bb349,_0x4f96a9;var _0x2a95a5={'method':_0x28c565[_0x3311('0x7')][_0x3311('0x8')](),'uri':Mustache[_0x3311('0x9')](_0x28c565[_0x3311('0xa')],_0x55fb70),'json':!![],'resolveWithFullResponse':!![],'timeout':typeof parseInt(_0x28c565[_0x3311('0xb')])==='number'&&parseInt(_0x28c565[_0x3311('0xb')])>=0x1&&parseInt(_0x28c565[_0x3311('0xb')])<=0xa?parseInt(_0x28c565[_0x3311('0xb')])*0x3e8:0x5*0x3e8};try{_0x2a95a5['headers']=_0x28c565[_0x3311('0xc')]?JSON['parse'](Mustache[_0x3311('0x9')](_0x28c565[_0x3311('0xc')],_0x55fb70)):{};}catch(_0x1c6a40){logger[_0x3311('0xd')](_0x1c6a40[_0x3311('0xe')]);}switch(_0x28c565[_0x3311('0x7')][_0x3311('0x8')]()){case _0x3311('0xf'):case _0x3311('0x10'):_0x5bb349=null;_0x2a95a5['qs']=_0x55fb70;break;case'POST':case'PUT':if(_0x28c565[_0x3311('0x11')]){try{_0x5bb349=JSON['parse'](Mustache[_0x3311('0x9')](_0x28c565[_0x3311('0x11')],_0x55fb70));_0x2a95a5[_0x3311('0x12')]=_0x5bb349;}catch(_0x4b5213){logger[_0x3311('0xd')](_0x4b5213[_0x3311('0xe')]);logger[_0x3311('0xd')](_0x3311('0x13'));}}else{_0x5bb349=_0x55fb70;_0x2a95a5[_0x3311('0x12')]=_0x5bb349;}break;}logger['info'](util[_0x3311('0x14')](_0x3311('0x15'),_0x28c565[_0x3311('0x7')],_0x28c565['data2'],JSON['stringify'](_0x2a95a5)));rp(_0x2a95a5)[_0x3311('0x16')](function(_0x1f7c18){_0x5bb349=!_['isNil'](_0x5bb349)?_0x3311('0x17')+_0x5bb349:'';_0x4f96a9=typeof _0x1f7c18[_0x3311('0x12')]==='object'?JSON[_0x3311('0x18')](_0x1f7c18[_0x3311('0x12')]):_0x1f7c18[_0x3311('0x12')];logger[_0x3311('0x19')](util['format'](_0x3311('0x1a'),_0x28c565[_0x3311('0x7')],_0x28c565[_0x3311('0xa')],_0x1f7c18['statusCode'],_0x4f96a9));})[_0x3311('0x1b')](function(_0x5a84be){logger[_0x3311('0xd')](util[_0x3311('0x14')](_0x3311('0x1c'),_0x28c565[_0x3311('0x7')],_0x28c565[_0x3311('0xa')],_0x5a84be[_0x3311('0x1d')],_0x5a84be[_0x3311('0x1e')],_0x5a84be[_0x3311('0x1f')]));});}; \ No newline at end of file diff --git a/server/services/email/client.js b/server/services/email/client.js index b2d7400..83f11b8 100644 --- a/server/services/email/client.js +++ b/server/services/email/client.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5f81=['error','routing','message','result','catch','exports','bluebird','../../config/logger','client','request','then','debug','rpc'];(function(_0x4e44de,_0x667302){var _0x795a19=function(_0x1e864e){while(--_0x1e864e){_0x4e44de['push'](_0x4e44de['shift']());}};_0x795a19(++_0x667302);}(_0x5f81,0x6e));var _0x15f8=function(_0x320053,_0x3d9cc1){_0x320053=_0x320053-0x0;var _0x124852=_0x5f81[_0x320053];return _0x124852;};'use strict';var jayson=require('jayson/promise');var BPromise=require(_0x15f8('0x0'));var logger=require(_0x15f8('0x1'))('routing');var client=jayson[_0x15f8('0x2')]['http']({'port':0x2329});client['Request']=function(_0x444bd4,_0x48a8df){return new BPromise(function(_0x1c924e,_0x50f8ce){return client[_0x15f8('0x3')](_0x444bd4,_0x48a8df)[_0x15f8('0x4')](function(_0x1c21f9){logger[_0x15f8('0x5')](_0x15f8('0x6'),'routing',_0x444bd4,_0x48a8df,_0x1c21f9);if(_0x1c21f9[_0x15f8('0x7')]){logger[_0x15f8('0x7')](_0x15f8('0x6'),_0x15f8('0x8'),_0x444bd4,_0x1c21f9[_0x15f8('0x7')][_0x15f8('0x9')],_0x48a8df);return _0x50f8ce(_0x1c21f9[_0x15f8('0x7')][_0x15f8('0x9')]);}else{return _0x1c924e(_0x1c21f9[_0x15f8('0xa')]);}})[_0x15f8('0xb')](function(_0xcf4304){logger['error'](_0x15f8('0x6'),'routing',_0x444bd4,_0xcf4304,_0x48a8df);return _0x50f8ce(_0xcf4304);});});};module[_0x15f8('0xc')]=client; \ No newline at end of file +var _0x1286=['debug','rpc','error','message','result','catch','exports','bluebird','../../config/logger','routing','client','http','Request','request','then'];(function(_0x11a962,_0x3cc338){var _0x55d423=function(_0xf4b236){while(--_0xf4b236){_0x11a962['push'](_0x11a962['shift']());}};_0x55d423(++_0x3cc338);}(_0x1286,0x1ba));var _0x6128=function(_0x16eb11,_0x1a2251){_0x16eb11=_0x16eb11-0x0;var _0x3ae7ef=_0x1286[_0x16eb11];return _0x3ae7ef;};'use strict';var jayson=require('jayson/promise');var BPromise=require(_0x6128('0x0'));var logger=require(_0x6128('0x1'))(_0x6128('0x2'));var client=jayson[_0x6128('0x3')][_0x6128('0x4')]({'port':0x2329});client[_0x6128('0x5')]=function(_0x4df61f,_0xe91034){return new BPromise(function(_0x285410,_0x829c7a){return client[_0x6128('0x6')](_0x4df61f,_0xe91034)[_0x6128('0x7')](function(_0xc50500){logger[_0x6128('0x8')](_0x6128('0x9'),_0x6128('0x2'),_0x4df61f,_0xe91034,_0xc50500);if(_0xc50500['error']){logger[_0x6128('0xa')](_0x6128('0x9'),'routing',_0x4df61f,_0xc50500[_0x6128('0xa')][_0x6128('0xb')],_0xe91034);return _0x829c7a(_0xc50500[_0x6128('0xa')]['message']);}else{return _0x285410(_0xc50500[_0x6128('0xc')]);}})[_0x6128('0xd')](function(_0x41b282){logger[_0x6128('0xa')](_0x6128('0x9'),_0x6128('0x2'),_0x4df61f,_0x41b282,_0xe91034);return _0x829c7a(_0x41b282);});});};module[_0x6128('0xe')]=client; \ No newline at end of file diff --git a/server/services/email/index.js b/server/services/email/index.js index e508882..5a315ad 100644 --- a/server/services/email/index.js +++ b/server/services/email/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0131=['bluebird','./server','./realtime','./lib/email','./rpc/mailAccount','./rpc/setting','resolve','then','getMailAccounts','mailAccounts','listen','loginMailFrequency','catch','log'];(function(_0xa79816,_0x3dba41){var _0x1afa0a=function(_0x55a302){while(--_0x55a302){_0xa79816['push'](_0xa79816['shift']());}};_0x1afa0a(++_0x3dba41);}(_0x0131,0x1a4));var _0x1013=function(_0x2fa1c6,_0x4a5b8d){_0x2fa1c6=_0x2fa1c6-0x0;var _0x5f3257=_0x0131[_0x2fa1c6];return _0x5f3257;};'use strict';var BPromise=require(_0x1013('0x0'));var server=require(_0x1013('0x1'));var Realtime=require(_0x1013('0x2'));var EmailChannel=require(_0x1013('0x3'));var mailAccount=require(_0x1013('0x4'));var setting=require(_0x1013('0x5'));var realtime=new Realtime();var email=new EmailChannel(realtime);function initRealtime(){return BPromise[_0x1013('0x6')]()[_0x1013('0x7')](mailAccount[_0x1013('0x8')]())['then'](realtime['initMailAccounts']())['then'](function(){email['refresh'](realtime[_0x1013('0x9')]);return realtime;});}function main(){return server[_0x1013('0xa')](realtime,email)[_0x1013('0x7')](function(){return initRealtime();})['then'](function(){return setting['getSettings']();})[_0x1013('0x7')](function(_0x3240f8){return setInterval(initRealtime,_0x3240f8[_0x1013('0xb')]*0x3e8);})[_0x1013('0xc')](function(_0x4bd8d6){console[_0x1013('0xd')](_0x4bd8d6);});}main(); \ No newline at end of file +var _0x3a31=['catch','log','bluebird','./realtime','./rpc/mailAccount','./rpc/setting','resolve','then','getMailAccounts','initMailAccounts','refresh','mailAccounts','listen','getSettings','loginMailFrequency'];(function(_0x2d9da8,_0x5d5072){var _0x57a29c=function(_0x2f562d){while(--_0x2f562d){_0x2d9da8['push'](_0x2d9da8['shift']());}};_0x57a29c(++_0x5d5072);}(_0x3a31,0x7a));var _0x13a3=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0x3a31[_0x501510];return _0x1e6ee5;};'use strict';var BPromise=require(_0x13a3('0x0'));var server=require('./server');var Realtime=require(_0x13a3('0x1'));var EmailChannel=require('./lib/email');var mailAccount=require(_0x13a3('0x2'));var setting=require(_0x13a3('0x3'));var realtime=new Realtime();var email=new EmailChannel(realtime);function initRealtime(){return BPromise[_0x13a3('0x4')]()[_0x13a3('0x5')](mailAccount[_0x13a3('0x6')]())['then'](realtime[_0x13a3('0x7')]())[_0x13a3('0x5')](function(){email[_0x13a3('0x8')](realtime[_0x13a3('0x9')]);return realtime;});}function main(){return server[_0x13a3('0xa')](realtime,email)[_0x13a3('0x5')](function(){return initRealtime();})[_0x13a3('0x5')](function(){return setting[_0x13a3('0xb')]();})[_0x13a3('0x5')](function(_0x458d7d){return setInterval(initRealtime,_0x458d7d[_0x13a3('0xc')]*0x3e8);})[_0x13a3('0xd')](function(_0x345967){console[_0x13a3('0xe')](_0x345967);});}main(); \ No newline at end of file diff --git a/server/services/email/lib/email.js b/server/services/email/lib/email.js index 22cd5ce..5cefb77 100644 --- a/server/services/email/lib/email.js +++ b/server/services/email/lib/email.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5196=['md5','ioredis','../../../config/environment','../../../config/logger','redis','defaults','socket.io-emitter','./imap','./smtp','../rpc/mailAccount','info','start\x20email\x20channel','mailAccounts','imapAccounts','smtp','prototype','emit','name','key','active','Imap','messageStatus','total','isNil','stringify','mailAccount:update','refresh','hasOwnProperty','email','box','handleImapBox','bind','end','handleImapEnd','handleImapError','status','disabled','connected','messages','handleImapEmail','New\x20email\x20from\x20%s\x20%s\x20%s\x20to\x20%s','firstName','from','then','Mail\x20accepted\x20from\x20routing','catch','error','lastSync','sendMail','send','verifySmtp','Smtp','verify','verified','lodash','moment'];(function(_0x3a7273,_0x5657e5){var _0x48ca56=function(_0x297fe0){while(--_0x297fe0){_0x3a7273['push'](_0x3a7273['shift']());}};_0x48ca56(++_0x5657e5);}(_0x5196,0x186));var _0x6519=function(_0x455df6,_0x26ea84){_0x455df6=_0x455df6-0x0;var _0x2daabe=_0x5196[_0x455df6];return _0x2daabe;};'use strict';var _=require(_0x6519('0x0'));var moment=require(_0x6519('0x1'));var BPromise=require('bluebird');var md5=require(_0x6519('0x2'));var Redis=require(_0x6519('0x3'));var config=require(_0x6519('0x4'));var logger=require(_0x6519('0x5'))('email');config[_0x6519('0x6')]=_[_0x6519('0x7')](config[_0x6519('0x6')],{'host':'localhost','port':0x18eb});var io=require(_0x6519('0x8'))(new Redis(config[_0x6519('0x6')]));var EmailImap=require(_0x6519('0x9'));var EmailSmtp=require(_0x6519('0xa'));var mailAccount=require(_0x6519('0xb'));var md5Accounts={};function EmailChannel(_0x21fc6a){logger[_0x6519('0xc')](_0x6519('0xd'));this['mailAccounts']=_0x21fc6a[_0x6519('0xe')];this[_0x6519('0xf')]={};this[_0x6519('0x10')]=new EmailSmtp();}EmailChannel[_0x6519('0x11')][_0x6519('0x12')]=function(_0x3bcf56){var _0x155a00=this[_0x6519('0xe')][_0x3bcf56];var _0x1e0080={'id':_0x155a00['id'],'name':_0x155a00[_0x6519('0x13')],'key':_0x155a00[_0x6519('0x14')],'active':_0x155a00[_0x6519('0x15')],'Imap':{'status':_0x155a00['Imap']['status'],'messageStatus':_0x155a00[_0x6519('0x16')][_0x6519('0x17')],'total':_0x155a00[_0x6519('0x16')][_0x6519('0x18')]}};if(_[_0x6519('0x19')](md5Accounts[_0x3bcf56])){md5Accounts[_0x3bcf56]={};}var _0x5706e7=md5(JSON[_0x6519('0x1a')](_0x1e0080));if(md5Accounts[_0x3bcf56][_0x6519('0x2')]!==_0x5706e7){md5Accounts[_0x3bcf56][_0x6519('0x2')]=_0x5706e7;io[_0x6519('0x12')](_0x6519('0x1b'),_0x1e0080);}};EmailChannel[_0x6519('0x11')][_0x6519('0x1c')]=function(_0x267124){for(var _0x480df7 in _0x267124){if(_0x267124[_0x6519('0x1d')](_0x480df7)){if(_0x267124[_0x480df7][_0x6519('0x16')]&&_0x267124[_0x480df7][_0x6519('0x15')]){var _0x1285e5=_0x267124[_0x480df7][_0x6519('0x16')];if(!this[_0x6519('0xf')][_0x6519('0x1d')](_0x1285e5['id'])){this[_0x6519('0xf')][_0x1285e5['id']]=new EmailImap(_0x1285e5,_0x267124[_0x480df7][_0x6519('0x1e')]);this[_0x6519('0xf')][_0x1285e5['id']]['on'](_0x6519('0x1f'),this[_0x6519('0x20')][_0x6519('0x21')](this,_0x480df7));this[_0x6519('0xf')][_0x1285e5['id']]['on'](_0x6519('0x1e'),this['handleImapEmail']['bind'](this,_0x480df7));this[_0x6519('0xf')][_0x1285e5['id']]['on'](_0x6519('0x22'),this[_0x6519('0x23')][_0x6519('0x21')](this,_0x480df7));this[_0x6519('0xf')][_0x1285e5['id']]['on']('error',this[_0x6519('0x24')][_0x6519('0x21')](this,_0x480df7));}}else{if(_[_0x6519('0x19')](this[_0x6519('0xe')][_0x480df7][_0x6519('0x16')])){this[_0x6519('0xe')][_0x480df7][_0x6519('0x16')]={};}this[_0x6519('0xe')][_0x480df7][_0x6519('0x16')][_0x6519('0x25')]=_0x6519('0x26');this[_0x6519('0xe')][_0x480df7][_0x6519('0x16')]['messageStatus']='';this[_0x6519('0x12')](_0x480df7);}}}};EmailChannel[_0x6519('0x11')][_0x6519('0x20')]=function(_0x26a39a,_0x27595a){if(this['mailAccounts'][_0x26a39a]){this[_0x6519('0xe')][_0x26a39a][_0x6519('0x16')][_0x6519('0x25')]=_0x6519('0x27');this[_0x6519('0xe')][_0x26a39a][_0x6519('0x16')][_0x6519('0x17')]=_0x27595a['name'];if(_0x27595a['messages']){this[_0x6519('0xe')][_0x26a39a]['Imap'][_0x6519('0x18')]=_0x27595a[_0x6519('0x28')]['total'];}return this['emit'](_0x26a39a);}};EmailChannel['prototype'][_0x6519('0x29')]=function(_0x38199f,_0x33c612){logger[_0x6519('0xc')](_0x6519('0x2a'),_0x33c612[_0x6519('0x2b')],_0x33c612['lastName'],_0x33c612[_0x6519('0x2c')],_0x38199f);if(this[_0x6519('0xe')][_0x38199f]){return mailAccount['notify'](_0x38199f,_0x33c612)[_0x6519('0x2d')](function(_0x3066a4){if(_0x3066a4){logger[_0x6519('0xc')](_0x6519('0x2e'));}})[_0x6519('0x2f')](function(_0x43d79d){logger[_0x6519('0x30')]('Mail\x20not\x20accepted\x20from\x20routing\x20%s',JSON[_0x6519('0x1a')](_0x43d79d));});}};EmailChannel[_0x6519('0x11')]['handleImapEnd']=function(_0x2e3bee){if(this[_0x6519('0xe')][_0x2e3bee]&&this[_0x6519('0xe')][_0x2e3bee][_0x6519('0x16')]){if(this[_0x6519('0xf')][this['mailAccounts'][_0x2e3bee][_0x6519('0x16')]['id']]){delete this[_0x6519('0xf')][this[_0x6519('0xe')][_0x2e3bee][_0x6519('0x16')]['id']];}this['mailAccounts'][_0x2e3bee][_0x6519('0x16')][_0x6519('0x31')]=moment();this[_0x6519('0x12')](_0x2e3bee);}};EmailChannel['prototype'][_0x6519('0x24')]=function(_0x431ee7,_0x2a8c6d){if(this[_0x6519('0xe')][_0x431ee7]){this[_0x6519('0xe')][_0x431ee7][_0x6519('0x16')][_0x6519('0x25')]=_0x6519('0x30');this['mailAccounts'][_0x431ee7][_0x6519('0x16')][_0x6519('0x17')]=_0x2a8c6d;return this[_0x6519('0x12')](_0x431ee7);}};EmailChannel['prototype'][_0x6519('0x32')]=function(_0x5d42e4,_0xda937b){return this[_0x6519('0x10')][_0x6519('0x33')](_0x5d42e4,_0xda937b);};EmailChannel[_0x6519('0x11')][_0x6519('0x34')]=function(_0x2e384c){var _0x546b2c=this;if(this[_0x6519('0xe')][_0x2e384c['id']]){if(_[_0x6519('0x19')](this[_0x6519('0xe')][_0x2e384c['id']][_0x6519('0x35')])){this[_0x6519('0xe')][_0x2e384c['id']][_0x6519('0x35')]={};}this[_0x6519('0xe')][_0x2e384c['id']]['Smtp'][_0x6519('0x31')]=moment();return new BPromise(function(_0x3df952,_0x5196ab){return _0x546b2c['smtp'][_0x6519('0x36')](_0x2e384c)[_0x6519('0x2d')](function(_0x54d331){_0x546b2c[_0x6519('0xe')][_0x2e384c['id']][_0x6519('0x35')][_0x6519('0x25')]=_0x6519('0x37');_0x546b2c[_0x6519('0xe')][_0x2e384c['id']][_0x6519('0x35')]['messageStatus']='';_0x546b2c['emit'](_0x2e384c['id']);_0x3df952(_0x54d331);})[_0x6519('0x2f')](function(_0x308510){_0x546b2c[_0x6519('0xe')][_0x2e384c['id']][_0x6519('0x35')][_0x6519('0x25')]=_0x6519('0x30');_0x546b2c['mailAccounts'][_0x2e384c['id']][_0x6519('0x35')][_0x6519('0x17')]=_0x308510;_0x546b2c['emit'](_0x2e384c['id']);_0x5196ab(_0x308510);});});}return this['smtp']['verify'](_0x2e384c);};module['exports']=EmailChannel; \ No newline at end of file +var _0xf441=['verified','exports','lodash','moment','bluebird','ioredis','../../../config/environment','email','redis','defaults','./imap','./smtp','info','mailAccounts','imapAccounts','smtp','prototype','emit','name','key','Imap','total','isNil','md5','mailAccount:update','refresh','hasOwnProperty','active','handleImapBox','bind','end','handleImapEnd','error','handleImapError','status','disabled','connected','messageStatus','messages','New\x20email\x20from\x20%s\x20%s\x20%s\x20to\x20%s','lastName','notify','then','Mail\x20accepted\x20from\x20routing','catch','Mail\x20not\x20accepted\x20from\x20routing\x20%s','stringify','lastSync','sendMail','verifySmtp','Smtp','verify'];(function(_0x16dc85,_0x3d397b){var _0x46ae92=function(_0x808d2f){while(--_0x808d2f){_0x16dc85['push'](_0x16dc85['shift']());}};_0x46ae92(++_0x3d397b);}(_0xf441,0x9e));var _0x1f44=function(_0x1f1641,_0x42ad9d){_0x1f1641=_0x1f1641-0x0;var _0x9660b4=_0xf441[_0x1f1641];return _0x9660b4;};'use strict';var _=require(_0x1f44('0x0'));var moment=require(_0x1f44('0x1'));var BPromise=require(_0x1f44('0x2'));var md5=require('md5');var Redis=require(_0x1f44('0x3'));var config=require(_0x1f44('0x4'));var logger=require('../../../config/logger')(_0x1f44('0x5'));config[_0x1f44('0x6')]=_[_0x1f44('0x7')](config[_0x1f44('0x6')],{'host':'localhost','port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x1f44('0x6')]));var EmailImap=require(_0x1f44('0x8'));var EmailSmtp=require(_0x1f44('0x9'));var mailAccount=require('../rpc/mailAccount');var md5Accounts={};function EmailChannel(_0x4feff3){logger[_0x1f44('0xa')]('start\x20email\x20channel');this[_0x1f44('0xb')]=_0x4feff3[_0x1f44('0xb')];this[_0x1f44('0xc')]={};this[_0x1f44('0xd')]=new EmailSmtp();}EmailChannel[_0x1f44('0xe')][_0x1f44('0xf')]=function(_0x472ac1){var _0x52ee5a=this[_0x1f44('0xb')][_0x472ac1];var _0x24fd31={'id':_0x52ee5a['id'],'name':_0x52ee5a[_0x1f44('0x10')],'key':_0x52ee5a[_0x1f44('0x11')],'active':_0x52ee5a['active'],'Imap':{'status':_0x52ee5a[_0x1f44('0x12')]['status'],'messageStatus':_0x52ee5a['Imap']['messageStatus'],'total':_0x52ee5a[_0x1f44('0x12')][_0x1f44('0x13')]}};if(_[_0x1f44('0x14')](md5Accounts[_0x472ac1])){md5Accounts[_0x472ac1]={};}var _0x462d88=md5(JSON['stringify'](_0x24fd31));if(md5Accounts[_0x472ac1][_0x1f44('0x15')]!==_0x462d88){md5Accounts[_0x472ac1][_0x1f44('0x15')]=_0x462d88;io[_0x1f44('0xf')](_0x1f44('0x16'),_0x24fd31);}};EmailChannel['prototype'][_0x1f44('0x17')]=function(_0x1133e6){for(var _0x433f9b in _0x1133e6){if(_0x1133e6[_0x1f44('0x18')](_0x433f9b)){if(_0x1133e6[_0x433f9b]['Imap']&&_0x1133e6[_0x433f9b][_0x1f44('0x19')]){var _0xd6185=_0x1133e6[_0x433f9b][_0x1f44('0x12')];if(!this[_0x1f44('0xc')][_0x1f44('0x18')](_0xd6185['id'])){this[_0x1f44('0xc')][_0xd6185['id']]=new EmailImap(_0xd6185,_0x1133e6[_0x433f9b]['email']);this[_0x1f44('0xc')][_0xd6185['id']]['on']('box',this[_0x1f44('0x1a')][_0x1f44('0x1b')](this,_0x433f9b));this[_0x1f44('0xc')][_0xd6185['id']]['on'](_0x1f44('0x5'),this['handleImapEmail'][_0x1f44('0x1b')](this,_0x433f9b));this[_0x1f44('0xc')][_0xd6185['id']]['on'](_0x1f44('0x1c'),this[_0x1f44('0x1d')][_0x1f44('0x1b')](this,_0x433f9b));this['imapAccounts'][_0xd6185['id']]['on'](_0x1f44('0x1e'),this[_0x1f44('0x1f')][_0x1f44('0x1b')](this,_0x433f9b));}}else{if(_[_0x1f44('0x14')](this[_0x1f44('0xb')][_0x433f9b][_0x1f44('0x12')])){this[_0x1f44('0xb')][_0x433f9b][_0x1f44('0x12')]={};}this[_0x1f44('0xb')][_0x433f9b][_0x1f44('0x12')][_0x1f44('0x20')]=_0x1f44('0x21');this['mailAccounts'][_0x433f9b][_0x1f44('0x12')]['messageStatus']='';this[_0x1f44('0xf')](_0x433f9b);}}}};EmailChannel[_0x1f44('0xe')][_0x1f44('0x1a')]=function(_0xad3b9e,_0x5b4853){if(this[_0x1f44('0xb')][_0xad3b9e]){this['mailAccounts'][_0xad3b9e][_0x1f44('0x12')][_0x1f44('0x20')]=_0x1f44('0x22');this[_0x1f44('0xb')][_0xad3b9e]['Imap'][_0x1f44('0x23')]=_0x5b4853[_0x1f44('0x10')];if(_0x5b4853[_0x1f44('0x24')]){this[_0x1f44('0xb')][_0xad3b9e][_0x1f44('0x12')][_0x1f44('0x13')]=_0x5b4853[_0x1f44('0x24')][_0x1f44('0x13')];}return this[_0x1f44('0xf')](_0xad3b9e);}};EmailChannel[_0x1f44('0xe')]['handleImapEmail']=function(_0x4a0af8,_0x3612cf){logger[_0x1f44('0xa')](_0x1f44('0x25'),_0x3612cf['firstName'],_0x3612cf[_0x1f44('0x26')],_0x3612cf['from'],_0x4a0af8);if(this[_0x1f44('0xb')][_0x4a0af8]){return mailAccount[_0x1f44('0x27')](_0x4a0af8,_0x3612cf)[_0x1f44('0x28')](function(_0x3e8a96){if(_0x3e8a96){logger[_0x1f44('0xa')](_0x1f44('0x29'));}})[_0x1f44('0x2a')](function(_0x2422bb){logger[_0x1f44('0x1e')](_0x1f44('0x2b'),JSON[_0x1f44('0x2c')](_0x2422bb));});}};EmailChannel['prototype'][_0x1f44('0x1d')]=function(_0x3505da){if(this[_0x1f44('0xb')][_0x3505da]&&this['mailAccounts'][_0x3505da][_0x1f44('0x12')]){if(this['imapAccounts'][this['mailAccounts'][_0x3505da][_0x1f44('0x12')]['id']]){delete this['imapAccounts'][this[_0x1f44('0xb')][_0x3505da][_0x1f44('0x12')]['id']];}this[_0x1f44('0xb')][_0x3505da][_0x1f44('0x12')][_0x1f44('0x2d')]=moment();this[_0x1f44('0xf')](_0x3505da);}};EmailChannel[_0x1f44('0xe')][_0x1f44('0x1f')]=function(_0x5808f5,_0x3f157b){if(this[_0x1f44('0xb')][_0x5808f5]){this[_0x1f44('0xb')][_0x5808f5]['Imap']['status']=_0x1f44('0x1e');this[_0x1f44('0xb')][_0x5808f5][_0x1f44('0x12')][_0x1f44('0x23')]=_0x3f157b;return this[_0x1f44('0xf')](_0x5808f5);}};EmailChannel[_0x1f44('0xe')][_0x1f44('0x2e')]=function(_0x38e309,_0x1a56ab){return this[_0x1f44('0xd')]['send'](_0x38e309,_0x1a56ab);};EmailChannel[_0x1f44('0xe')][_0x1f44('0x2f')]=function(_0x4e3627){var _0x1990bd=this;if(this['mailAccounts'][_0x4e3627['id']]){if(_[_0x1f44('0x14')](this[_0x1f44('0xb')][_0x4e3627['id']]['Smtp'])){this[_0x1f44('0xb')][_0x4e3627['id']]['Smtp']={};}this[_0x1f44('0xb')][_0x4e3627['id']][_0x1f44('0x30')][_0x1f44('0x2d')]=moment();return new BPromise(function(_0xf944fc,_0x1b208e){return _0x1990bd[_0x1f44('0xd')][_0x1f44('0x31')](_0x4e3627)[_0x1f44('0x28')](function(_0x569b09){_0x1990bd[_0x1f44('0xb')][_0x4e3627['id']][_0x1f44('0x30')][_0x1f44('0x20')]=_0x1f44('0x32');_0x1990bd[_0x1f44('0xb')][_0x4e3627['id']][_0x1f44('0x30')][_0x1f44('0x23')]='';_0x1990bd['emit'](_0x4e3627['id']);_0xf944fc(_0x569b09);})[_0x1f44('0x2a')](function(_0x2a9661){_0x1990bd[_0x1f44('0xb')][_0x4e3627['id']]['Smtp'][_0x1f44('0x20')]=_0x1f44('0x1e');_0x1990bd[_0x1f44('0xb')][_0x4e3627['id']][_0x1f44('0x30')][_0x1f44('0x23')]=_0x2a9661;_0x1990bd[_0x1f44('0xf')](_0x4e3627['id']);_0x1b208e(_0x2a9661);});});}return this[_0x1f44('0xd')][_0x1f44('0x31')](_0x4e3627);};module[_0x1f44('0x33')]=EmailChannel; \ No newline at end of file diff --git a/server/services/email/lib/imap.js b/server/services/email/lib/imap.js index 6dc9c25..2eef5ae 100644 --- a/server/services/email/lib/imap.js +++ b/server/services/email/lib/imap.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7bae=['stringify','textCode','hasOwnProperty','upperFirst','exports','imap','lodash','mailparser','iconv','Iconv','events','EventEmitter','./utils','../../../config/logger','email','mailbox','INBOX','account','getAccount','once','ready','handleReady','bind','end','handleEnd','handleError','connect','inherits','prototype','connTimeout','authTimeout','authentication','user','host','port','tls','autotls','required','password','service','anonymous@xcally.com','openBox','handleOpenBox','emit','box','readUnseen','handleCloseBox','search','UNSEEN','handleReadUnseen','message','error','handleFetchError','handleFetchEnd','handleFetchMessage','handleMessageBody','attributes','handleMessageAttributes','handleMessageEnd','handleSimpleParser','parser','closeBox'];(function(_0x2b90dc,_0x10b832){var _0x4794a6=function(_0x3720ca){while(--_0x3720ca){_0x2b90dc['push'](_0x2b90dc['shift']());}};_0x4794a6(++_0x10b832);}(_0x7bae,0x13b));var _0xe7ba=function(_0x5f09c5,_0x2bfca0){_0x5f09c5=_0x5f09c5-0x0;var _0x426ad9=_0x7bae[_0x5f09c5];return _0x426ad9;};'use strict';var fs=require('fs');var path=require('path');var util=require('util');var Imap=require(_0xe7ba('0x0'));var _=require(_0xe7ba('0x1'));var rs=require('randomstring');var simpleParser=require(_0xe7ba('0x2'))['simpleParser'];var Iconv=require(_0xe7ba('0x3'))[_0xe7ba('0x4')];var EventEmitter=require(_0xe7ba('0x5'))[_0xe7ba('0x6')];var utils=require(_0xe7ba('0x7'));var logger=require(_0xe7ba('0x8'))(_0xe7ba('0x9'));function EmailImap(_0x3c5e59,_0x10b307){this[_0xe7ba('0xa')]=_0xe7ba('0xb');this[_0xe7ba('0xc')]=this[_0xe7ba('0xd')](_0x3c5e59,_0x10b307);this[_0xe7ba('0x0')]=new Imap(this['account']);this[_0xe7ba('0x0')][_0xe7ba('0xe')](_0xe7ba('0xf'),this[_0xe7ba('0x10')][_0xe7ba('0x11')](this));this[_0xe7ba('0x0')][_0xe7ba('0xe')](_0xe7ba('0x12'),this[_0xe7ba('0x13')]['bind'](this));this[_0xe7ba('0x0')]['on']('error',this[_0xe7ba('0x14')][_0xe7ba('0x11')](this));this[_0xe7ba('0x0')][_0xe7ba('0x15')]();}util[_0xe7ba('0x16')](EmailImap,EventEmitter);EmailImap[_0xe7ba('0x17')]['getAccount']=function(_0x561c48,_0x2a5183){var _0x7ba72a={'connTimeout':_0x561c48[_0xe7ba('0x18')]?_0x561c48['connTimeout']*0x3e8:0x2710,'authTimeout':_0x561c48[_0xe7ba('0x19')]?_0x561c48['authTimeout']*0x3e8:0x1388};if(_['isNil'](_0x561c48['service'])){if(_0x561c48[_0xe7ba('0x1a')]){_0x7ba72a['user']=_0x561c48[_0xe7ba('0x1b')];_0x7ba72a['password']=_0x561c48['password'];}_0x7ba72a['host']=_0x561c48[_0xe7ba('0x1c')];_0x7ba72a[_0xe7ba('0x1d')]=_0x561c48[_0xe7ba('0x1d')]||0x3e1;if(_0x561c48[_0xe7ba('0x1e')]){_0x7ba72a[_0xe7ba('0x1e')]=!![];}else{_0x7ba72a['tls']=![];_0x7ba72a[_0xe7ba('0x1f')]=_0xe7ba('0x20');}}else{_0x7ba72a[_0xe7ba('0x1b')]=_0x561c48[_0xe7ba('0x1b')];_0x7ba72a['password']=_0x561c48[_0xe7ba('0x21')];_0x7ba72a[_0xe7ba('0x1c')]=utils['getHost'](_0x561c48[_0xe7ba('0x22')]);_0x7ba72a[_0xe7ba('0x1d')]=0x3e1;_0x7ba72a[_0xe7ba('0x1e')]=!![];}_0x7ba72a[_0xe7ba('0x9')]=_0x2a5183||_0x561c48[_0xe7ba('0x1b')]||_0xe7ba('0x23');return _0x7ba72a;};EmailImap[_0xe7ba('0x17')][_0xe7ba('0x10')]=function(){this[_0xe7ba('0x0')][_0xe7ba('0x24')](this['mailbox'],![],this['handleOpenBox']['bind'](this));};EmailImap['prototype'][_0xe7ba('0x25')]=function(_0x576513,_0x4ecc0d){if(_0x576513){this['handleError'](_0x576513,!![]);}else{this[_0xe7ba('0x26')](_0xe7ba('0x27'),_0x4ecc0d);this[_0xe7ba('0x28')]();}};EmailImap[_0xe7ba('0x17')][_0xe7ba('0x29')]=function(_0xc88099){if(_0xc88099){this[_0xe7ba('0x14')](_0xc88099,!![]);}else{this[_0xe7ba('0x0')]['end']();}};EmailImap[_0xe7ba('0x17')]['readUnseen']=function(){this[_0xe7ba('0x0')][_0xe7ba('0x2a')]([_0xe7ba('0x2b')],this['handleReadUnseen']['bind'](this));};EmailImap[_0xe7ba('0x17')][_0xe7ba('0x2c')]=function(_0x8d5020,_0x20b6cd){if(_0x8d5020){this[_0xe7ba('0x14')](_0x8d5020,!![]);}else{if(_0x20b6cd['length']){try{var _0x37911d=this[_0xe7ba('0x0')]['fetch'](_0x20b6cd,{'bodies':'','markSeen':!![]});_0x37911d['on'](_0xe7ba('0x2d'),this['handleFetchMessage']['bind'](this));_0x37911d[_0xe7ba('0xe')](_0xe7ba('0x2e'),this[_0xe7ba('0x2f')]['bind'](this));_0x37911d[_0xe7ba('0xe')]('end',this[_0xe7ba('0x30')][_0xe7ba('0x11')](this));}catch(_0x3b0a69){logger[_0xe7ba('0x2e')](_0x3b0a69);}}else{this[_0xe7ba('0x0')]['closeBox'](!![],this[_0xe7ba('0x29')][_0xe7ba('0x11')](this));}}};EmailImap['prototype'][_0xe7ba('0x31')]=function(_0x285080,_0x499d3b){_0x285080['on']('body',this[_0xe7ba('0x32')][_0xe7ba('0x11')](this));_0x285080['once'](_0xe7ba('0x33'),this[_0xe7ba('0x34')][_0xe7ba('0x11')](this));_0x285080['once'](_0xe7ba('0x12'),this[_0xe7ba('0x35')]['bind'](this));};EmailImap[_0xe7ba('0x17')][_0xe7ba('0x32')]=function(_0x8a5776,_0x582833){simpleParser(_0x8a5776,{'Iconv':Iconv},this['handleSimpleParser'][_0xe7ba('0x11')](this));};EmailImap[_0xe7ba('0x17')][_0xe7ba('0x34')]=function(_0x9bd315){};EmailImap[_0xe7ba('0x17')]['handleMessageEnd']=function(){};EmailImap[_0xe7ba('0x17')][_0xe7ba('0x36')]=function(_0x3139a6,_0x23a912){if(_0x3139a6){logger['error'](_0x3139a6);}else{var _0xe67917=this;utils[_0xe7ba('0x37')](this[_0xe7ba('0xc')],_0x23a912,function(_0x45f703){_0xe67917[_0xe7ba('0x26')](_0xe7ba('0x9'),_0x45f703);});}};EmailImap[_0xe7ba('0x17')]['handleFetchEnd']=function(){this[_0xe7ba('0x0')][_0xe7ba('0x38')](!![],this[_0xe7ba('0x29')][_0xe7ba('0x11')](this));};EmailImap[_0xe7ba('0x17')][_0xe7ba('0x2f')]=function(_0x220c3b){this[_0xe7ba('0x14')](_0x220c3b);this[_0xe7ba('0x0')]['closeBox'](!![],this[_0xe7ba('0x29')][_0xe7ba('0x11')](this));};EmailImap['prototype']['handleEnd']=function(){this[_0xe7ba('0x26')](_0xe7ba('0x12'));};EmailImap[_0xe7ba('0x17')]['handleError']=function(_0x249e1d,_0x82246e){logger[_0xe7ba('0x2e')](_0xe7ba('0x14'),this[_0xe7ba('0xc')]['email'],JSON[_0xe7ba('0x39')](_0x249e1d));var _0x54ef49='';if(_0x249e1d){if(_0x249e1d[_0xe7ba('0x3a')]){_0x54ef49=_0x249e1d[_0xe7ba('0x3a')];}else{for(var _0xe0f1c3 in _0x249e1d){if(_0x249e1d[_0xe7ba('0x3b')](_0xe0f1c3)){_0x54ef49+=_[_0xe7ba('0x3c')](_0xe0f1c3)+':\x20'+_0x249e1d[_0xe0f1c3]+'\x0a';}}}}if(_0x82246e){this[_0xe7ba('0x0')][_0xe7ba('0x12')]();}else{this[_0xe7ba('0x26')]('error',_0x54ef49);this[_0xe7ba('0x26')](_0xe7ba('0x12'));}};module[_0xe7ba('0x3d')]=EmailImap; \ No newline at end of file +var _0x99c9=['randomstring','mailparser','simpleParser','Iconv','events','EventEmitter','./utils','../../../config/logger','email','mailbox','INBOX','account','getAccount','once','ready','bind','end','handleEnd','error','handleError','connect','prototype','connTimeout','authTimeout','isNil','authentication','user','password','host','port','tls','autotls','required','getHost','service','anonymous@xcally.com','handleReady','openBox','handleOpenBox','emit','box','readUnseen','handleCloseBox','search','UNSEEN','handleReadUnseen','length','fetch','message','handleFetchMessage','handleFetchEnd','closeBox','body','handleMessageBody','handleFetchError','stringify','textCode','hasOwnProperty','upperFirst','exports','path','util','imap','lodash'];(function(_0x311c35,_0x534915){var _0x5cc50c=function(_0x3ad680){while(--_0x3ad680){_0x311c35['push'](_0x311c35['shift']());}};_0x5cc50c(++_0x534915);}(_0x99c9,0x13c));var _0x999c=function(_0x819464,_0x46fc91){_0x819464=_0x819464-0x0;var _0x49dcc0=_0x99c9[_0x819464];return _0x49dcc0;};'use strict';var fs=require('fs');var path=require(_0x999c('0x0'));var util=require(_0x999c('0x1'));var Imap=require(_0x999c('0x2'));var _=require(_0x999c('0x3'));var rs=require(_0x999c('0x4'));var simpleParser=require(_0x999c('0x5'))[_0x999c('0x6')];var Iconv=require('iconv')[_0x999c('0x7')];var EventEmitter=require(_0x999c('0x8'))[_0x999c('0x9')];var utils=require(_0x999c('0xa'));var logger=require(_0x999c('0xb'))(_0x999c('0xc'));function EmailImap(_0x34f100,_0x651b7e){this[_0x999c('0xd')]=_0x999c('0xe');this[_0x999c('0xf')]=this[_0x999c('0x10')](_0x34f100,_0x651b7e);this[_0x999c('0x2')]=new Imap(this[_0x999c('0xf')]);this['imap'][_0x999c('0x11')](_0x999c('0x12'),this['handleReady'][_0x999c('0x13')](this));this[_0x999c('0x2')][_0x999c('0x11')](_0x999c('0x14'),this[_0x999c('0x15')][_0x999c('0x13')](this));this[_0x999c('0x2')]['on'](_0x999c('0x16'),this[_0x999c('0x17')][_0x999c('0x13')](this));this[_0x999c('0x2')][_0x999c('0x18')]();}util['inherits'](EmailImap,EventEmitter);EmailImap[_0x999c('0x19')][_0x999c('0x10')]=function(_0x4f2916,_0x54a2fa){var _0x5f5a20={'connTimeout':_0x4f2916[_0x999c('0x1a')]?_0x4f2916[_0x999c('0x1a')]*0x3e8:0x2710,'authTimeout':_0x4f2916[_0x999c('0x1b')]?_0x4f2916[_0x999c('0x1b')]*0x3e8:0x1388};if(_[_0x999c('0x1c')](_0x4f2916['service'])){if(_0x4f2916[_0x999c('0x1d')]){_0x5f5a20[_0x999c('0x1e')]=_0x4f2916[_0x999c('0x1e')];_0x5f5a20[_0x999c('0x1f')]=_0x4f2916[_0x999c('0x1f')];}_0x5f5a20['host']=_0x4f2916[_0x999c('0x20')];_0x5f5a20[_0x999c('0x21')]=_0x4f2916[_0x999c('0x21')]||0x3e1;if(_0x4f2916[_0x999c('0x22')]){_0x5f5a20[_0x999c('0x22')]=!![];}else{_0x5f5a20['tls']=![];_0x5f5a20[_0x999c('0x23')]=_0x999c('0x24');}}else{_0x5f5a20[_0x999c('0x1e')]=_0x4f2916[_0x999c('0x1e')];_0x5f5a20[_0x999c('0x1f')]=_0x4f2916[_0x999c('0x1f')];_0x5f5a20['host']=utils[_0x999c('0x25')](_0x4f2916[_0x999c('0x26')]);_0x5f5a20[_0x999c('0x21')]=0x3e1;_0x5f5a20[_0x999c('0x22')]=!![];}_0x5f5a20[_0x999c('0xc')]=_0x54a2fa||_0x4f2916[_0x999c('0x1e')]||_0x999c('0x27');return _0x5f5a20;};EmailImap[_0x999c('0x19')][_0x999c('0x28')]=function(){this[_0x999c('0x2')][_0x999c('0x29')](this['mailbox'],![],this[_0x999c('0x2a')][_0x999c('0x13')](this));};EmailImap[_0x999c('0x19')][_0x999c('0x2a')]=function(_0x2256fd,_0x15d102){if(_0x2256fd){this['handleError'](_0x2256fd,!![]);}else{this[_0x999c('0x2b')](_0x999c('0x2c'),_0x15d102);this[_0x999c('0x2d')]();}};EmailImap['prototype'][_0x999c('0x2e')]=function(_0x4413c5){if(_0x4413c5){this['handleError'](_0x4413c5,!![]);}else{this[_0x999c('0x2')]['end']();}};EmailImap['prototype'][_0x999c('0x2d')]=function(){this[_0x999c('0x2')][_0x999c('0x2f')]([_0x999c('0x30')],this[_0x999c('0x31')][_0x999c('0x13')](this));};EmailImap[_0x999c('0x19')][_0x999c('0x31')]=function(_0x352c25,_0x3b836a){if(_0x352c25){this['handleError'](_0x352c25,!![]);}else{if(_0x3b836a[_0x999c('0x32')]){try{var _0x192976=this[_0x999c('0x2')][_0x999c('0x33')](_0x3b836a,{'bodies':'','markSeen':!![]});_0x192976['on'](_0x999c('0x34'),this[_0x999c('0x35')][_0x999c('0x13')](this));_0x192976[_0x999c('0x11')]('error',this['handleFetchError'][_0x999c('0x13')](this));_0x192976[_0x999c('0x11')](_0x999c('0x14'),this[_0x999c('0x36')]['bind'](this));}catch(_0x12e207){logger[_0x999c('0x16')](_0x12e207);}}else{this[_0x999c('0x2')][_0x999c('0x37')](!![],this['handleCloseBox']['bind'](this));}}};EmailImap[_0x999c('0x19')][_0x999c('0x35')]=function(_0x3664fa,_0x323956){_0x3664fa['on'](_0x999c('0x38'),this[_0x999c('0x39')][_0x999c('0x13')](this));_0x3664fa['once']('attributes',this['handleMessageAttributes'][_0x999c('0x13')](this));_0x3664fa[_0x999c('0x11')]('end',this['handleMessageEnd']['bind'](this));};EmailImap[_0x999c('0x19')][_0x999c('0x39')]=function(_0x15dc10,_0x3a112d){simpleParser(_0x15dc10,{'Iconv':Iconv},this['handleSimpleParser'][_0x999c('0x13')](this));};EmailImap[_0x999c('0x19')]['handleMessageAttributes']=function(_0x510f74){};EmailImap[_0x999c('0x19')]['handleMessageEnd']=function(){};EmailImap[_0x999c('0x19')]['handleSimpleParser']=function(_0x3605a3,_0x21850d){if(_0x3605a3){logger[_0x999c('0x16')](_0x3605a3);}else{var _0xcd729=this;utils['parser'](this['account'],_0x21850d,function(_0x21318e){_0xcd729[_0x999c('0x2b')](_0x999c('0xc'),_0x21318e);});}};EmailImap[_0x999c('0x19')]['handleFetchEnd']=function(){this[_0x999c('0x2')][_0x999c('0x37')](!![],this[_0x999c('0x2e')][_0x999c('0x13')](this));};EmailImap['prototype'][_0x999c('0x3a')]=function(_0x509647){this[_0x999c('0x17')](_0x509647);this[_0x999c('0x2')]['closeBox'](!![],this[_0x999c('0x2e')][_0x999c('0x13')](this));};EmailImap[_0x999c('0x19')][_0x999c('0x15')]=function(){this[_0x999c('0x2b')](_0x999c('0x14'));};EmailImap[_0x999c('0x19')][_0x999c('0x17')]=function(_0x4ef478,_0x563e11){logger['error']('handleError',this[_0x999c('0xf')][_0x999c('0xc')],JSON[_0x999c('0x3b')](_0x4ef478));var _0x278a33='';if(_0x4ef478){if(_0x4ef478[_0x999c('0x3c')]){_0x278a33=_0x4ef478['textCode'];}else{for(var _0x267e96 in _0x4ef478){if(_0x4ef478[_0x999c('0x3d')](_0x267e96)){_0x278a33+=_[_0x999c('0x3e')](_0x267e96)+':\x20'+_0x4ef478[_0x267e96]+'\x0a';}}}}if(_0x563e11){this[_0x999c('0x2')][_0x999c('0x14')]();}else{this['emit'](_0x999c('0x16'),_0x278a33);this[_0x999c('0x2b')](_0x999c('0x14'));}};module[_0x999c('0x3f')]=EmailImap; \ No newline at end of file diff --git a/server/services/email/lib/smtp.js b/server/services/email/lib/smtp.js index dc2fedf..c015f15 100644 --- a/server/services/email/lib/smtp.js +++ b/server/services/email/lib/smtp.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0541=['verify','Not\x20verifired','exports','bluebird','nodemailer-plugin-inline-base64','prototype','send','use','compile','sendMail','toString'];(function(_0x1b349a,_0x22222c){var _0x5d1f7c=function(_0x368d7c){while(--_0x368d7c){_0x1b349a['push'](_0x1b349a['shift']());}};_0x5d1f7c(++_0x22222c);}(_0x0541,0x14d));var _0x1054=function(_0x4b784d,_0x5efb2f){_0x4b784d=_0x4b784d-0x0;var _0x2cdeaf=_0x0541[_0x4b784d];return _0x2cdeaf;};'use strict';var nodemailer=require('nodemailer');var BPromise=require(_0x1054('0x0'));var inlineBase64=require(_0x1054('0x1'));function EmailSmtp(){}EmailSmtp[_0x1054('0x2')][_0x1054('0x3')]=function(_0x21d474,_0xb4227f){return new BPromise(function(_0x379be2,_0x3eae3b){var _0x37b797=nodemailer['createTransport'](_0x21d474);_0x37b797[_0x1054('0x4')](_0x1054('0x5'),inlineBase64());_0x37b797[_0x1054('0x6')](_0xb4227f,function(_0x3af0c0,_0x2d0d54){if(_0x3af0c0){_0x3eae3b(_0x3af0c0[_0x1054('0x7')]());}else{_0x379be2(_0x2d0d54);}});});};EmailSmtp[_0x1054('0x2')][_0x1054('0x8')]=function(_0x26ff37){return new BPromise(function(_0x525284,_0x12487f){var _0x2e7487=nodemailer['createTransport'](_0x26ff37);_0x2e7487['verify'](function(_0x51bac4,_0x24bd8a){if(_0x51bac4){_0x12487f(_0x51bac4[_0x1054('0x7')]());}else{if(_0x24bd8a){_0x525284(_0x24bd8a);}else{_0x12487f(_0x1054('0x9'));}}});});};module[_0x1054('0xa')]=EmailSmtp; \ No newline at end of file +var _0x77df=['createTransport','use','compile','sendMail','toString','verify','Not\x20verifired','nodemailer','bluebird','send'];(function(_0x13e71a,_0x4f762e){var _0x15b696=function(_0x5e7962){while(--_0x5e7962){_0x13e71a['push'](_0x13e71a['shift']());}};_0x15b696(++_0x4f762e);}(_0x77df,0x1c9));var _0xf77d=function(_0x17ad14,_0x225a1f){_0x17ad14=_0x17ad14-0x0;var _0x682433=_0x77df[_0x17ad14];return _0x682433;};'use strict';var nodemailer=require(_0xf77d('0x0'));var BPromise=require(_0xf77d('0x1'));var inlineBase64=require('nodemailer-plugin-inline-base64');function EmailSmtp(){}EmailSmtp['prototype'][_0xf77d('0x2')]=function(_0xfc0880,_0x41e051){return new BPromise(function(_0x43a5fb,_0x1b6762){var _0xd89890=nodemailer[_0xf77d('0x3')](_0xfc0880);_0xd89890[_0xf77d('0x4')](_0xf77d('0x5'),inlineBase64());_0xd89890[_0xf77d('0x6')](_0x41e051,function(_0x1b886b,_0xb97d03){if(_0x1b886b){_0x1b6762(_0x1b886b[_0xf77d('0x7')]());}else{_0x43a5fb(_0xb97d03);}});});};EmailSmtp['prototype']['verify']=function(_0x4c9236){return new BPromise(function(_0x3a23fe,_0x47180e){var _0x4f7e95=nodemailer[_0xf77d('0x3')](_0x4c9236);_0x4f7e95[_0xf77d('0x8')](function(_0x2e3105,_0x1125d0){if(_0x2e3105){_0x47180e(_0x2e3105[_0xf77d('0x7')]());}else{if(_0x1125d0){_0x3a23fe(_0x1125d0);}else{_0x47180e(_0xf77d('0x9'));}}});});};module['exports']=EmailSmtp; \ No newline at end of file diff --git a/server/services/email/lib/utils.js b/server/services/email/lib/utils.js index 67ada4b..0b42312 100644 --- a/server/services/email/lib/utils.js +++ b/server/services/email/lib/utils.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xefda=['imap.gmail.com','yahoo','hotmail','outlook365','outlook.office365.com','127.0.0.1','lodash','path','util','../../../config/logger','email','../../../config/environment','head','address','anonymous','generate','name','split','length','slice','join','Anonymous','value','pop','isEmpty','@xcally.com','html','test','replace','attachments','forEach','push','_SRC','_IMG','\x20]','body','textAsHtml','originTo','message','originCc','includes','bcc','attach','type','attachment','filename','attachment-','format','%s-%s','now','root','server/files/attachments/','writeFileSync','content','contentType','parser','from','subject','date','YYYY-MM-DD\x20HH:mm:ss','filter','info','Email\x20message\x20%s\x20is\x20in\x20TNEF\x20format:\x20message\x20content\x20will\x20be\x20converted\x20by\x20the\x20system','messageId','parseBuffer','first','BodyHTML','Attachments','Title','

Empty\x20message

','getHost','gmail'];(function(_0x34d37e,_0x18f3c1){var _0x27b91c=function(_0x521e11){while(--_0x521e11){_0x34d37e['push'](_0x34d37e['shift']());}};_0x27b91c(++_0x18f3c1);}(_0xefda,0x96));var _0xaefd=function(_0x39dcc9,_0xe1cefe){_0x39dcc9=_0x39dcc9-0x0;var _0x2d12b8=_0xefda[_0x39dcc9];return _0x2d12b8;};'use strict';var _=require(_0xaefd('0x0'));var moment=require('moment');var random=require('randomstring');var fs=require('fs');var path=require(_0xaefd('0x1'));var util=require(_0xaefd('0x2'));var tnef=require('node-tnef');var logger=require(_0xaefd('0x3'))(_0xaefd('0x4'));var config=require(_0xaefd('0x5'));function getAddress(_0x22df24){var _0x1ef6b4=_[_0xaefd('0x6')](_0x22df24['value']);return _0x1ef6b4&&_0x1ef6b4[_0xaefd('0x7')]?_0x1ef6b4[_0xaefd('0x7')]:_0xaefd('0x8')+random[_0xaefd('0x9')](0x6)+'@xcally.com';}function getFirstName(_0x15193c){var _0xbb04fb=_[_0xaefd('0x6')](_0x15193c['value']);if(_0xbb04fb&&_0xbb04fb['name']){var _0x54a3b1=_0xbb04fb[_0xaefd('0xa')][_0xaefd('0xb')](/\s+/);return _0x54a3b1[_0xaefd('0xc')]?_0x54a3b1[_0xaefd('0xd')](0x0,-0x1)[_0xaefd('0xe')]('\x20'):_0xbb04fb[_0xaefd('0xa')];}return _0xaefd('0xf');}function getLastName(_0x3dfddf){var _0x27be0f=_[_0xaefd('0x6')](_0x3dfddf[_0xaefd('0x10')]);if(_0x27be0f&&_0x27be0f['name']){var _0x3172d3=_0x27be0f['name'][_0xaefd('0xb')](/\s+/);return _0x3172d3[_0xaefd('0xc')]>0x1?_0x3172d3[_0xaefd('0x11')]():'';}return'';}function getMails(_0x43b82a,_0x4ec92a){var _0x16e4f4='';for(var _0x13492c=0x0;_0x13492c<_0x4ec92a[_0xaefd('0x10')][_0xaefd('0xc')];_0x13492c+=0x1){if(_0x4ec92a[_0xaefd('0x10')][_0x13492c][_0xaefd('0x7')]!==_0x43b82a){if(!_[_0xaefd('0x12')](_0x16e4f4)){_0x16e4f4+=',';}_0x16e4f4+=_0x4ec92a[_0xaefd('0x10')][_0x13492c]['name']||_0x4ec92a[_0xaefd('0x10')][_0x13492c][_0xaefd('0x7')]||'';_0x16e4f4+='\x20<';_0x16e4f4+=_0x4ec92a[_0xaefd('0x10')][_0x13492c][_0xaefd('0x7')]?_0x4ec92a[_0xaefd('0x10')][_0x13492c][_0xaefd('0x7')]:'anonymous'+random[_0xaefd('0x9')](0x6)+_0xaefd('0x13');_0x16e4f4+='>';}}return _0x16e4f4;}function parseEmail(_0x24f131,_0x1260dd,_0x45ebf2){if(_0x1260dd[_0xaefd('0x14')]){var _0x5282ed=/)<[^<]*)*<\/script>/gi;while(_0x5282ed[_0xaefd('0x15')](_0x1260dd[_0xaefd('0x14')])){_0x1260dd[_0xaefd('0x14')]=_0x1260dd[_0xaefd('0x14')][_0xaefd('0x16')](_0x5282ed,'');}if(_0x1260dd['html']['includes']('{_0x21680a[_0xaefd('0x19')](_0x5a44ed['filename']);});var _0x3deec8=/]+>/g;var _0x3caa99=/src=\"data:image\/([a-zA-Z]*);base64,([^\"]*)\"/g;var _0x1a05eb=_0x1260dd['html'][_0xaefd('0x16')](_0x3caa99,_0xaefd('0x1a'));var _0x18e720=_0x1a05eb[_0xaefd('0x16')](_0x3deec8,_0xaefd('0x1b'));for(let _0x5a170c=0x0;_0x5a170c<_0x21680a[_0xaefd('0xc')];_0x5a170c++){var _0x58c008=_0x18e720[_0xaefd('0x16')](_0xaefd('0x1b'),'\x20[Attachment:\x20'+_0x21680a[_0x5a170c]+_0xaefd('0x1c'));_0x18e720=_0x58c008;}_0x1260dd[_0xaefd('0x14')]=_0x18e720;}_0x45ebf2['body']=_0x1260dd[_0xaefd('0x14')];}else{_0x45ebf2[_0xaefd('0x1d')]=_0x1260dd[_0xaefd('0x1e')];}if(_0x45ebf2['body']){_0x45ebf2[_0xaefd('0x1d')]=_0x45ebf2['body'][_0xaefd('0x16')](/Empty\x20message

';if(_0x52d6ab['Attachments']){for(var _0x17d611=0x0;_0x17d611<_0x52d6ab[_0xaefd('0x3d')][_0xaefd('0xc')];_0x17d611++){var _0x1ba03a=_0x52d6ab[_0xaefd('0x3d')][_0x17d611];_0x3c7022[_0xaefd('0x20')][_0xaefd('0x17')][_0xaefd('0x19')]({'filename':_0x1ba03a[_0xaefd('0x3e')],'content':new Buffer(_0x1ba03a['Data'])});}}}_0x145e9e(parseEmail(_0x3c9331,_0xa98181,_0x3c7022));});}else{_0xa98181[_0xaefd('0x14')]=_0xaefd('0x3f');_0x145e9e(parseEmail(_0x3c9331,_0xa98181,_0x3c7022));}}else{_0x145e9e(parseEmail(_0x3c9331,_0xa98181,_0x3c7022));}};exports[_0xaefd('0x40')]=function(_0x2f0cc6){switch(_0x2f0cc6){case _0xaefd('0x41'):return _0xaefd('0x42');case _0xaefd('0x43'):return'imap.mail.yahoo.com';case _0xaefd('0x44'):return'imap-mail.outlook.com';case _0xaefd('0x45'):return _0xaefd('0x46');}return _0xaefd('0x47');}; \ No newline at end of file +var _0x0b0e=['isEmpty','generate','html','test','replace','\x20[Attachment:\x20','\x20]','body','textAsHtml','Empty\x20message

','Attachments','Title','Data','getHost','gmail','imap.gmail.com','imap-mail.outlook.com','outlook365','outlook.office365.com','127.0.0.1','lodash','randomstring','util','node-tnef','../../../config/logger','email','../../../config/environment','head','value','address','@xcally.com','name','split','length','join','Anonymous','pop'];(function(_0x2e4e19,_0x493b50){var _0x9ba20b=function(_0x2f6456){while(--_0x2f6456){_0x2e4e19['push'](_0x2e4e19['shift']());}};_0x9ba20b(++_0x493b50);}(_0x0b0e,0x187));var _0xe0b0=function(_0x462fe4,_0x394d3e){_0x462fe4=_0x462fe4-0x0;var _0x82b23a=_0x0b0e[_0x462fe4];return _0x82b23a;};'use strict';var _=require(_0xe0b0('0x0'));var moment=require('moment');var random=require(_0xe0b0('0x1'));var fs=require('fs');var path=require('path');var util=require(_0xe0b0('0x2'));var tnef=require(_0xe0b0('0x3'));var logger=require(_0xe0b0('0x4'))(_0xe0b0('0x5'));var config=require(_0xe0b0('0x6'));function getAddress(_0x38a058){var _0x399e67=_[_0xe0b0('0x7')](_0x38a058[_0xe0b0('0x8')]);return _0x399e67&&_0x399e67[_0xe0b0('0x9')]?_0x399e67[_0xe0b0('0x9')]:'anonymous'+random['generate'](0x6)+_0xe0b0('0xa');}function getFirstName(_0x435060){var _0xc4a085=_[_0xe0b0('0x7')](_0x435060['value']);if(_0xc4a085&&_0xc4a085[_0xe0b0('0xb')]){var _0x1dd3b8=_0xc4a085['name'][_0xe0b0('0xc')](/\s+/);return _0x1dd3b8[_0xe0b0('0xd')]?_0x1dd3b8['slice'](0x0,-0x1)[_0xe0b0('0xe')]('\x20'):_0xc4a085[_0xe0b0('0xb')];}return _0xe0b0('0xf');}function getLastName(_0x585615){var _0x3068c0=_[_0xe0b0('0x7')](_0x585615[_0xe0b0('0x8')]);if(_0x3068c0&&_0x3068c0[_0xe0b0('0xb')]){var _0x34fed4=_0x3068c0['name'][_0xe0b0('0xc')](/\s+/);return _0x34fed4[_0xe0b0('0xd')]>0x1?_0x34fed4[_0xe0b0('0x10')]():'';}return'';}function getMails(_0x24babd,_0x177c24){var _0x55d884='';for(var _0x41a7e2=0x0;_0x41a7e2<_0x177c24['value'][_0xe0b0('0xd')];_0x41a7e2+=0x1){if(_0x177c24[_0xe0b0('0x8')][_0x41a7e2]['address']!==_0x24babd){if(!_[_0xe0b0('0x11')](_0x55d884)){_0x55d884+=',';}_0x55d884+=_0x177c24['value'][_0x41a7e2][_0xe0b0('0xb')]||_0x177c24[_0xe0b0('0x8')][_0x41a7e2]['address']||'';_0x55d884+='\x20<';_0x55d884+=_0x177c24['value'][_0x41a7e2][_0xe0b0('0x9')]?_0x177c24['value'][_0x41a7e2]['address']:'anonymous'+random[_0xe0b0('0x12')](0x6)+'@xcally.com';_0x55d884+='>';}}return _0x55d884;}function parseEmail(_0x52598b,_0x10cde1,_0x59dff5){if(_0x10cde1[_0xe0b0('0x13')]){var _0x5dba2f=/)<[^<]*)*<\/script>/gi;while(_0x5dba2f[_0xe0b0('0x14')](_0x10cde1[_0xe0b0('0x13')])){_0x10cde1[_0xe0b0('0x13')]=_0x10cde1[_0xe0b0('0x13')][_0xe0b0('0x15')](_0x5dba2f,'');}if(_0x10cde1['html']['includes'](_0xe0b0('0x16'))){var _0x5512bb=[];_0x10cde1[_0xe0b0('0x17')][_0xe0b0('0x18')](_0x513e63=>{_0x5512bb[_0xe0b0('0x19')](_0x513e63['filename']);});var _0x2208d0=/]+>/g;var _0x49a727=/src=\"data:image\/([a-zA-Z]*);base64,([^\"]*)\"/g;var _0x28586d=_0x10cde1['html'][_0xe0b0('0x15')](_0x49a727,'_SRC');var _0x4700cc=_0x28586d['replace'](_0x2208d0,_0xe0b0('0x1a'));for(let _0x5c5317=0x0;_0x5c5317<_0x5512bb[_0xe0b0('0xd')];_0x5c5317++){var _0x3c3bc2=_0x4700cc[_0xe0b0('0x15')](_0xe0b0('0x1a'),_0xe0b0('0x1b')+_0x5512bb[_0x5c5317]+_0xe0b0('0x1c'));_0x4700cc=_0x3c3bc2;}_0x10cde1['html']=_0x4700cc;}_0x59dff5[_0xe0b0('0x1d')]=_0x10cde1[_0xe0b0('0x13')];}else{_0x59dff5['body']=_0x10cde1[_0xe0b0('0x1e')];}if(_0x59dff5[_0xe0b0('0x1d')]){_0x59dff5[_0xe0b0('0x1d')]=_0x59dff5[_0xe0b0('0x1d')][_0xe0b0('0x15')](/0x0){if(this[_0x114072+_0xb96d('0x27')]>0x0&&this[_0x114072+_0xb96d('0x26')]>=this[_0x114072+_0xb96d('0x27')]){return _0xb96d('0x28');}else{return _0xb96d('0x29');}}else{return _0xb96d('0x2a');}};Agent[_0xb96d('0x25')][_0xb96d('0x2b')]=function(){var _0x61cc9b=['mail',_0xb96d('0x2c'),'openchannel','fax',_0xb96d('0x2d'),_0xb96d('0x2e')];for(var _0x473cba=0x0;_0x473cba<_0x61cc9b['length'];_0x473cba+=0x1){var _0x3dda20=this['getChannelStatus'](_0x61cc9b[_0x473cba]);if(this[_0x61cc9b[_0x473cba]+_0xb96d('0x2f')]!==_0x3dda20){this[_0x61cc9b[_0x473cba]+_0xb96d('0x30')]=_['toNumber'](moment()[_0xb96d('0x31')]('x'));}this[_0x61cc9b[_0x473cba]+_0xb96d('0x2f')]=_0x3dda20;}var _0x452db0={'id':this['id'],'name':this[_0xb96d('0x9')],'online':this[_0xb96d('0xa')],'voicePause':this[_0xb96d('0xb')],'chatPause':this[_0xb96d('0xc')],'mailPause':this[_0xb96d('0xd')],'smsPause':this[_0xb96d('0xf')],'faxPause':this[_0xb96d('0xe')],'openchannelPause':this['openchannelPause'],'chatStatus':this[_0xb96d('0x11')],'chatStatusTime':this['chatStatusTime'],'chatCapacity':this[_0xb96d('0x13')],'chatCurrentCapacity':this['chatCurrentCapacity'],'mailStatus':this[_0xb96d('0x15')],'mailStatusTime':this[_0xb96d('0x32')],'mailCapacity':this[_0xb96d('0x16')],'mailCurrentCapacity':this['mailCurrentCapacity'],'faxStatus':this[_0xb96d('0x18')],'faxStatusTime':this[_0xb96d('0x19')],'faxCapacity':this['faxCapacity'],'faxCurrentCapacity':this[_0xb96d('0x33')],'smsStatus':this[_0xb96d('0x1b')],'smsStatusTime':this[_0xb96d('0x1c')],'smsCapacity':this['smsCapacity'],'smsCurrentCapacity':this[_0xb96d('0x1e')],'whatsappStatus':this['whatsappStatus'],'whatsappStatusTime':this['whatsappStatusTime'],'whatsappCapacity':this[_0xb96d('0x20')],'whatsappCurrentCapacity':this['whatsappCurrentCapacity'],'openchannelStatus':this['openchannelStatus'],'openchannelStatusTime':this[_0xb96d('0x34')],'openchannelCapacity':this['openchannelCapacity'],'openchannelCurrentCapacity':this[_0xb96d('0x35')],'busy':this[_0xb96d('0x23')],'busyQueue':this[_0xb96d('0x24')]};var _0x5a596e=md5(JSON[_0xb96d('0x36')](_0x452db0));if(this[_0xb96d('0x2')]!==_0x5a596e){this[_0xb96d('0x2')]=_0x5a596e;io[_0xb96d('0x37')](_0xb96d('0x38'),_0x452db0);}};module['exports']=Agent; \ No newline at end of file +var _0x353a=['faxStatusTime','faxCapacity','faxCurrentCapacity','smsStatus','smsStatusTime','smsCapacity','whatsappStatus','whatsappStatusTime','whatsappCapacity','whatsappCurrentCapacity','openchannelStatus','openchannelStatusTime','openchannelCapacity','busy','busyQueue','updateRealtime','prototype','getChannelStatus','CurrentCapacity','maxcapacity','working','idle','mail','openchannel','fax','whatsapp','length','Status','StatusTime','toNumber','format','mailCapacity','smsCurrentCapacity','openchannelCurrentCapacity','exports','lodash','moment','md5','ioredis','../../../config/environment','redis','defaults','socket.io-emitter','name','online','voicePause','chatPause','mailPause','faxPause','smsPause','openchannelPause','chatStatus','chatStatusTime','chatCapacity','chatCurrentCapacity','mailStatus','unknown','mailStatusTime','mailCurrentCapacity','faxStatus'];(function(_0x40f31d,_0x166318){var _0x10d4e4=function(_0x427148){while(--_0x427148){_0x40f31d['push'](_0x40f31d['shift']());}};_0x10d4e4(++_0x166318);}(_0x353a,0x113));var _0xa353=function(_0x58736a,_0x5d0121){_0x58736a=_0x58736a-0x0;var _0x4518e2=_0x353a[_0x58736a];return _0x4518e2;};'use strict';var _=require(_0xa353('0x0'));var moment=require(_0xa353('0x1'));var md5=require(_0xa353('0x2'));var Redis=require(_0xa353('0x3'));var config=require(_0xa353('0x4'));config[_0xa353('0x5')]=_[_0xa353('0x6')](config[_0xa353('0x5')],{'host':'localhost','port':0x18eb});var io=require(_0xa353('0x7'))(new Redis(config['redis']));function Agent(_0x181051){this['id']=_0x181051['id']||0x0;this[_0xa353('0x8')]=_0x181051[_0xa353('0x8')]||'';this[_0xa353('0x9')]=_0x181051[_0xa353('0x9')]||!![];this[_0xa353('0xa')]=_0x181051[_0xa353('0xa')]||![];this[_0xa353('0xb')]=_0x181051[_0xa353('0xb')]||![];this[_0xa353('0xc')]=_0x181051['mailPause']||![];this[_0xa353('0xd')]=_0x181051[_0xa353('0xd')]||![];this[_0xa353('0xe')]=_0x181051[_0xa353('0xe')]||![];this[_0xa353('0xf')]=_0x181051['openchannelPause']||![];this[_0xa353('0x10')]='unknown';this[_0xa353('0x11')]=0x0;this[_0xa353('0x12')]=_0x181051[_0xa353('0x12')]||0x0;this[_0xa353('0x13')]=0x0;this[_0xa353('0x14')]=_0xa353('0x15');this[_0xa353('0x16')]=0x0;this['mailCapacity']=_0x181051['mailCapacity']||0x0;this[_0xa353('0x17')]=0x0;this[_0xa353('0x18')]='unknown';this[_0xa353('0x19')]=0x0;this[_0xa353('0x1a')]=_0x181051[_0xa353('0x1a')]||0x0;this[_0xa353('0x1b')]=0x0;this[_0xa353('0x1c')]=_0xa353('0x15');this[_0xa353('0x1d')]=0x0;this[_0xa353('0x1e')]=_0x181051[_0xa353('0x1e')]||0x0;this['smsCurrentCapacity']=0x0;this[_0xa353('0x1f')]=_0xa353('0x15');this[_0xa353('0x20')]=0x0;this[_0xa353('0x21')]=_0x181051['whatsappCapacity']||0x0;this[_0xa353('0x22')]=0x0;this[_0xa353('0x23')]='unknown';this[_0xa353('0x24')]=0x0;this[_0xa353('0x25')]=_0x181051[_0xa353('0x25')]||0x0;this['openchannelCurrentCapacity']=0x0;this[_0xa353('0x26')]=![];this[_0xa353('0x27')]=undefined;this[_0xa353('0x2')]='';this[_0xa353('0x28')]();}Agent[_0xa353('0x29')][_0xa353('0x2a')]=function(_0x405e91){if(this[_0x405e91+_0xa353('0x2b')]>0x0){if(this[_0x405e91+'Capacity']>0x0&&this[_0x405e91+_0xa353('0x2b')]>=this[_0x405e91+'Capacity']){return _0xa353('0x2c');}else{return _0xa353('0x2d');}}else{return _0xa353('0x2e');}};Agent[_0xa353('0x29')]['updateRealtime']=function(){var _0x24f7dd=[_0xa353('0x2f'),'chat',_0xa353('0x30'),_0xa353('0x31'),'sms',_0xa353('0x32')];for(var _0x269f54=0x0;_0x269f54<_0x24f7dd[_0xa353('0x33')];_0x269f54+=0x1){var _0x24b93d=this[_0xa353('0x2a')](_0x24f7dd[_0x269f54]);if(this[_0x24f7dd[_0x269f54]+_0xa353('0x34')]!==_0x24b93d){this[_0x24f7dd[_0x269f54]+_0xa353('0x35')]=_[_0xa353('0x36')](moment()[_0xa353('0x37')]('x'));}this[_0x24f7dd[_0x269f54]+_0xa353('0x34')]=_0x24b93d;}var _0x1f5329={'id':this['id'],'name':this[_0xa353('0x8')],'online':this[_0xa353('0x9')],'voicePause':this[_0xa353('0xa')],'chatPause':this[_0xa353('0xb')],'mailPause':this[_0xa353('0xc')],'smsPause':this[_0xa353('0xe')],'faxPause':this['faxPause'],'openchannelPause':this[_0xa353('0xf')],'chatStatus':this[_0xa353('0x10')],'chatStatusTime':this['chatStatusTime'],'chatCapacity':this[_0xa353('0x12')],'chatCurrentCapacity':this[_0xa353('0x13')],'mailStatus':this[_0xa353('0x14')],'mailStatusTime':this[_0xa353('0x16')],'mailCapacity':this[_0xa353('0x38')],'mailCurrentCapacity':this[_0xa353('0x17')],'faxStatus':this[_0xa353('0x18')],'faxStatusTime':this['faxStatusTime'],'faxCapacity':this[_0xa353('0x1a')],'faxCurrentCapacity':this[_0xa353('0x1b')],'smsStatus':this['smsStatus'],'smsStatusTime':this[_0xa353('0x1d')],'smsCapacity':this['smsCapacity'],'smsCurrentCapacity':this[_0xa353('0x39')],'whatsappStatus':this['whatsappStatus'],'whatsappStatusTime':this[_0xa353('0x20')],'whatsappCapacity':this['whatsappCapacity'],'whatsappCurrentCapacity':this[_0xa353('0x22')],'openchannelStatus':this['openchannelStatus'],'openchannelStatusTime':this[_0xa353('0x24')],'openchannelCapacity':this[_0xa353('0x25')],'openchannelCurrentCapacity':this[_0xa353('0x3a')],'busy':this['busy'],'busyQueue':this[_0xa353('0x27')]};var _0x11b45b=md5(JSON['stringify'](_0x1f5329));if(this['md5']!==_0x11b45b){this['md5']=_0x11b45b;io['emit']('user:save',_0x1f5329);}};module[_0xa353('0x3b')]=Agent; \ No newline at end of file diff --git a/server/services/routing/model/chatQueue.js b/server/services/routing/model/chatQueue.js index a64638a..06c7983 100644 --- a/server/services/routing/model/chatQueue.js +++ b/server/services/routing/model/chatQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6f7f=['waiting','md5','updateRealtime','prototype','_rr','map','loggedIn','paused','length','chatPause','available','stringify','chat:queue:%s','emit','exports','lodash','util','ioredis','defaults','redis','localhost','socket.io-emitter','name','timeout','beepall','Agents','mapAgentsId'];(function(_0x54385a,_0x1cf286){var _0x2fde54=function(_0x4d95eb){while(--_0x4d95eb){_0x54385a['push'](_0x54385a['shift']());}};_0x2fde54(++_0x1cf286);}(_0x6f7f,0x1da));var _0xf6f7=function(_0x1e296d,_0x5139bf){_0x1e296d=_0x1e296d-0x0;var _0x1b1262=_0x6f7f[_0x1e296d];return _0x1b1262;};'use strict';var _=require(_0xf6f7('0x0'));var md5=require('md5');var util=require(_0xf6f7('0x1'));var Redis=require(_0xf6f7('0x2'));var config=require('../../../config/environment');config['redis']=_[_0xf6f7('0x3')](config[_0xf6f7('0x4')],{'host':_0xf6f7('0x5'),'port':0x18eb});var io=require(_0xf6f7('0x6'))(new Redis(config['redis']));function ChatQueue(_0xbb325b){this['id']=_0xbb325b['id']||0x0;this[_0xf6f7('0x7')]=_0xbb325b[_0xf6f7('0x7')]||'';this[_0xf6f7('0x8')]=_0xbb325b[_0xf6f7('0x8')]||0xa;this['strategy']=_0xbb325b['strategy']||_0xf6f7('0x9');this[_0xf6f7('0xa')]=_0xbb325b[_0xf6f7('0xa')];this[_0xf6f7('0xb')]={};this[_0xf6f7('0xc')]=0x0;this[_0xf6f7('0xd')]='';this['updateRouting']();this[_0xf6f7('0xe')]();}ChatQueue[_0xf6f7('0xf')]['updateRouting']=function(){var _0x355bb5=this[_0xf6f7('0xb')][_0xf6f7('0x10')];this[_0xf6f7('0xb')]=_[_0xf6f7('0x11')](this[_0xf6f7('0xa')],'id');this[_0xf6f7('0xb')][_0xf6f7('0x10')]=_0x355bb5;};ChatQueue[_0xf6f7('0xf')][_0xf6f7('0xe')]=function(){this[_0xf6f7('0x12')]=0x0;this[_0xf6f7('0x13')]=0x0;for(var _0x52a038=0x0;_0x52a038=0x0?this['available']:0x0;var _0x18feca={'id':this['id'],'available':this['available'],'loggedIn':this[_0xf6f7('0x12')],'name':this['name'],'paused':this[_0xf6f7('0x13')],'waiting':this[_0xf6f7('0xc')]};var _0x1dc538=md5(JSON[_0xf6f7('0x17')](_0x18feca));if(this['md5']!==_0x1dc538){this[_0xf6f7('0xd')]=_0x1dc538;io['to'](util['format'](_0xf6f7('0x18'),_0x18feca['name']))[_0xf6f7('0x19')]('chat_queue:save',_0x18feca);}};module[_0xf6f7('0x1a')]=ChatQueue; \ No newline at end of file +var _0x05b3=['prototype','updateRouting','_rr','map','loggedIn','paused','Agents','chatPause','available','format','chat:queue:%s','emit','exports','lodash','md5','util','ioredis','redis','defaults','localhost','socket.io-emitter','name','timeout','strategy','mapAgentsId','waiting','updateRealtime'];(function(_0x432682,_0x253044){var _0x463d05=function(_0xa73403){while(--_0xa73403){_0x432682['push'](_0x432682['shift']());}};_0x463d05(++_0x253044);}(_0x05b3,0x1f3));var _0x305b=function(_0x529f1c,_0x437ed1){_0x529f1c=_0x529f1c-0x0;var _0x4d57ab=_0x05b3[_0x529f1c];return _0x4d57ab;};'use strict';var _=require(_0x305b('0x0'));var md5=require(_0x305b('0x1'));var util=require(_0x305b('0x2'));var Redis=require(_0x305b('0x3'));var config=require('../../../config/environment');config[_0x305b('0x4')]=_[_0x305b('0x5')](config['redis'],{'host':_0x305b('0x6'),'port':0x18eb});var io=require(_0x305b('0x7'))(new Redis(config['redis']));function ChatQueue(_0x369419){this['id']=_0x369419['id']||0x0;this[_0x305b('0x8')]=_0x369419['name']||'';this[_0x305b('0x9')]=_0x369419[_0x305b('0x9')]||0xa;this[_0x305b('0xa')]=_0x369419[_0x305b('0xa')]||'beepall';this['Agents']=_0x369419['Agents'];this[_0x305b('0xb')]={};this[_0x305b('0xc')]=0x0;this[_0x305b('0x1')]='';this['updateRouting']();this[_0x305b('0xd')]();}ChatQueue[_0x305b('0xe')][_0x305b('0xf')]=function(){var _0x23af6d=this['mapAgentsId'][_0x305b('0x10')];this[_0x305b('0xb')]=_[_0x305b('0x11')](this['Agents'],'id');this[_0x305b('0xb')][_0x305b('0x10')]=_0x23af6d;};ChatQueue[_0x305b('0xe')][_0x305b('0xd')]=function(){this[_0x305b('0x12')]=0x0;this[_0x305b('0x13')]=0x0;for(var _0x128520=0x0;_0x128520=0x0?this['available']:0x0;var _0x115bae={'id':this['id'],'available':this[_0x305b('0x16')],'loggedIn':this[_0x305b('0x12')],'name':this[_0x305b('0x8')],'paused':this[_0x305b('0x13')],'waiting':this[_0x305b('0xc')]};var _0x24fda0=md5(JSON['stringify'](_0x115bae));if(this[_0x305b('0x1')]!==_0x24fda0){this[_0x305b('0x1')]=_0x24fda0;io['to'](util[_0x305b('0x17')](_0x305b('0x18'),_0x115bae[_0x305b('0x8')]))[_0x305b('0x19')]('chat_queue:save',_0x115bae);}};module[_0x305b('0x1a')]=ChatQueue; \ No newline at end of file diff --git a/server/services/routing/model/faxQueue.js b/server/services/routing/model/faxQueue.js index 08d0d0f..6a31eb1 100644 --- a/server/services/routing/model/faxQueue.js +++ b/server/services/routing/model/faxQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6d92=['md5','util','ioredis','defaults','localhost','socket.io-emitter','redis','name','timeout','strategy','beepall','Agents','mapAgentsId','waiting','updateRealtime','prototype','updateRouting','map','_rr','loggedIn','paused','length','online','faxPause','available','stringify','format','emit','fax_queue:save','lodash'];(function(_0x286491,_0x1b5b3f){var _0x2e32af=function(_0x747911){while(--_0x747911){_0x286491['push'](_0x286491['shift']());}};_0x2e32af(++_0x1b5b3f);}(_0x6d92,0x12b));var _0x26d9=function(_0x151d64,_0x360f73){_0x151d64=_0x151d64-0x0;var _0x409cfd=_0x6d92[_0x151d64];return _0x409cfd;};'use strict';var _=require(_0x26d9('0x0'));var md5=require(_0x26d9('0x1'));var util=require(_0x26d9('0x2'));var Redis=require(_0x26d9('0x3'));var config=require('../../../config/environment');config['redis']=_[_0x26d9('0x4')](config['redis'],{'host':_0x26d9('0x5'),'port':0x18eb});var io=require(_0x26d9('0x6'))(new Redis(config[_0x26d9('0x7')]));function FaxQueue(_0x2de1f6){this['id']=_0x2de1f6['id']||0x0;this[_0x26d9('0x8')]=_0x2de1f6['name']||'';this[_0x26d9('0x9')]=_0x2de1f6[_0x26d9('0x9')]||0xa;this[_0x26d9('0xa')]=_0x2de1f6[_0x26d9('0xa')]||_0x26d9('0xb');this['Agents']=_0x2de1f6[_0x26d9('0xc')];this[_0x26d9('0xd')]={};this[_0x26d9('0xe')]=0x0;this[_0x26d9('0x1')]='';this['updateRouting']();this[_0x26d9('0xf')]();}FaxQueue[_0x26d9('0x10')][_0x26d9('0x11')]=function(){var _0x9992a2=this[_0x26d9('0xd')]['_rr'];this[_0x26d9('0xd')]=_[_0x26d9('0x12')](this[_0x26d9('0xc')],'id');this[_0x26d9('0xd')][_0x26d9('0x13')]=_0x9992a2;};FaxQueue['prototype']['updateRealtime']=function(){this[_0x26d9('0x14')]=0x0;this[_0x26d9('0x15')]=0x0;for(var _0x3b686c=0x0;_0x3b686c=0x0?this[_0x26d9('0x19')]:0x0;var _0x30bbcf={'id':this['id'],'available':this[_0x26d9('0x19')],'loggedIn':this[_0x26d9('0x14')],'name':this[_0x26d9('0x8')],'paused':this[_0x26d9('0x15')],'waiting':this[_0x26d9('0xe')]};var _0x3aa4a9=md5(JSON[_0x26d9('0x1a')](_0x30bbcf));if(this['md5']!==_0x3aa4a9){this[_0x26d9('0x1')]=_0x3aa4a9;io['to'](util[_0x26d9('0x1b')]('fax:queue:%s',_0x30bbcf[_0x26d9('0x8')]))[_0x26d9('0x1c')](_0x26d9('0x1d'),_0x30bbcf);}};module['exports']=FaxQueue; \ No newline at end of file +var _0x192f=['md5','util','../../../config/environment','redis','localhost','socket.io-emitter','name','timeout','strategy','Agents','mapAgentsId','waiting','updateRouting','updateRealtime','_rr','map','loggedIn','paused','length','online','faxPause','available','stringify','format','fax:queue:%s','exports','lodash'];(function(_0x34d95a,_0x361e48){var _0x838c14=function(_0x40247b){while(--_0x40247b){_0x34d95a['push'](_0x34d95a['shift']());}};_0x838c14(++_0x361e48);}(_0x192f,0xf2));var _0xf192=function(_0x504137,_0x50329e){_0x504137=_0x504137-0x0;var _0x4692ba=_0x192f[_0x504137];return _0x4692ba;};'use strict';var _=require(_0xf192('0x0'));var md5=require(_0xf192('0x1'));var util=require(_0xf192('0x2'));var Redis=require('ioredis');var config=require(_0xf192('0x3'));config[_0xf192('0x4')]=_['defaults'](config['redis'],{'host':_0xf192('0x5'),'port':0x18eb});var io=require(_0xf192('0x6'))(new Redis(config[_0xf192('0x4')]));function FaxQueue(_0x4e773d){this['id']=_0x4e773d['id']||0x0;this[_0xf192('0x7')]=_0x4e773d['name']||'';this[_0xf192('0x8')]=_0x4e773d[_0xf192('0x8')]||0xa;this[_0xf192('0x9')]=_0x4e773d[_0xf192('0x9')]||'beepall';this[_0xf192('0xa')]=_0x4e773d['Agents'];this[_0xf192('0xb')]={};this[_0xf192('0xc')]=0x0;this['md5']='';this[_0xf192('0xd')]();this[_0xf192('0xe')]();}FaxQueue['prototype'][_0xf192('0xd')]=function(){var _0x211f8a=this[_0xf192('0xb')][_0xf192('0xf')];this['mapAgentsId']=_[_0xf192('0x10')](this[_0xf192('0xa')],'id');this[_0xf192('0xb')]['_rr']=_0x211f8a;};FaxQueue['prototype'][_0xf192('0xe')]=function(){this[_0xf192('0x11')]=0x0;this[_0xf192('0x12')]=0x0;for(var _0x1603f7=0x0;_0x1603f7=0x0?this[_0xf192('0x16')]:0x0;var _0x226e4d={'id':this['id'],'available':this[_0xf192('0x16')],'loggedIn':this[_0xf192('0x11')],'name':this[_0xf192('0x7')],'paused':this[_0xf192('0x12')],'waiting':this[_0xf192('0xc')]};var _0x5a2def=md5(JSON[_0xf192('0x17')](_0x226e4d));if(this[_0xf192('0x1')]!==_0x5a2def){this[_0xf192('0x1')]=_0x5a2def;io['to'](util[_0xf192('0x18')](_0xf192('0x19'),_0x226e4d[_0xf192('0x7')]))['emit']('fax_queue:save',_0x226e4d);}};module[_0xf192('0x1a')]=FaxQueue; \ No newline at end of file diff --git a/server/services/routing/model/interval.js b/server/services/routing/model/interval.js index 85f9197..cc2885e 100644 --- a/server/services/routing/model/interval.js +++ b/server/services/routing/model/interval.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0e79=['Intervals','exports','name'];(function(_0x7f44f2,_0x1207e4){var _0xdb292f=function(_0x513e24){while(--_0x513e24){_0x7f44f2['push'](_0x7f44f2['shift']());}};_0xdb292f(++_0x1207e4);}(_0x0e79,0x14c));var _0x90e7=function(_0x25b4a4,_0x2e081b){_0x25b4a4=_0x25b4a4-0x0;var _0x707267=_0x0e79[_0x25b4a4];return _0x707267;};'use strict';function Interval(_0x424edd){this['id']=_0x424edd['id']||0x0;this[_0x90e7('0x0')]=_0x424edd['name']||'';this[_0x90e7('0x1')]=_0x424edd[_0x90e7('0x1')]||{};}module[_0x90e7('0x2')]=Interval; \ No newline at end of file +var _0x9673=['name','Intervals','exports'];(function(_0x2722bc,_0x221dd9){var _0x5ac515=function(_0x387030){while(--_0x387030){_0x2722bc['push'](_0x2722bc['shift']());}};_0x5ac515(++_0x221dd9);}(_0x9673,0x69));var _0x3967=function(_0x5d5823,_0x3dbe7a){_0x5d5823=_0x5d5823-0x0;var _0x2ad901=_0x9673[_0x5d5823];return _0x2ad901;};'use strict';function Interval(_0x37c9b8){this['id']=_0x37c9b8['id']||0x0;this[_0x3967('0x0')]=_0x37c9b8[_0x3967('0x0')]||'';this[_0x3967('0x1')]=_0x37c9b8[_0x3967('0x1')]||{};}module[_0x3967('0x2')]=Interval; \ No newline at end of file diff --git a/server/services/routing/model/mailQueue.js b/server/services/routing/model/mailQueue.js index 4775acc..39a8816 100644 --- a/server/services/routing/model/mailQueue.js +++ b/server/services/routing/model/mailQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3cac=['beepall','Agents','mapAgentsId','waiting','md5','updateRouting','_rr','prototype','updateRealtime','loggedIn','paused','length','online','available','mail:queue:%s','emit','exports','lodash','util','ioredis','../../../config/environment','redis','defaults','socket.io-emitter','name','timeout','strategy'];(function(_0xfae23b,_0x2be4ba){var _0x200640=function(_0x4ae258){while(--_0x4ae258){_0xfae23b['push'](_0xfae23b['shift']());}};_0x200640(++_0x2be4ba);}(_0x3cac,0x7d));var _0xc3ca=function(_0x38b3c3,_0x32b7f6){_0x38b3c3=_0x38b3c3-0x0;var _0x248e7f=_0x3cac[_0x38b3c3];return _0x248e7f;};'use strict';var _=require(_0xc3ca('0x0'));var md5=require('md5');var util=require(_0xc3ca('0x1'));var Redis=require(_0xc3ca('0x2'));var config=require(_0xc3ca('0x3'));config[_0xc3ca('0x4')]=_[_0xc3ca('0x5')](config['redis'],{'host':'localhost','port':0x18eb});var io=require(_0xc3ca('0x6'))(new Redis(config[_0xc3ca('0x4')]));function MailQueue(_0x157508){this['id']=_0x157508['id']||0x0;this['name']=_0x157508[_0xc3ca('0x7')]||'';this['timeout']=_0x157508[_0xc3ca('0x8')]||0xa;this[_0xc3ca('0x9')]=_0x157508['strategy']||_0xc3ca('0xa');this[_0xc3ca('0xb')]=_0x157508[_0xc3ca('0xb')];this[_0xc3ca('0xc')]={};this[_0xc3ca('0xd')]=0x0;this[_0xc3ca('0xe')]='';this[_0xc3ca('0xf')]();this['updateRealtime']();}MailQueue['prototype'][_0xc3ca('0xf')]=function(){var _0x2e7c4c=this[_0xc3ca('0xc')][_0xc3ca('0x10')];this[_0xc3ca('0xc')]=_['map'](this[_0xc3ca('0xb')],'id');this[_0xc3ca('0xc')][_0xc3ca('0x10')]=_0x2e7c4c;};MailQueue[_0xc3ca('0x11')][_0xc3ca('0x12')]=function(){this[_0xc3ca('0x13')]=0x0;this[_0xc3ca('0x14')]=0x0;for(var _0x519a98=0x0;_0x519a98=0x0?this[_0xc3ca('0x17')]:0x0;var _0x819dea={'id':this['id'],'available':this['available'],'loggedIn':this[_0xc3ca('0x13')],'name':this['name'],'paused':this[_0xc3ca('0x14')],'waiting':this[_0xc3ca('0xd')]};var _0x4590ca=md5(JSON['stringify'](_0x819dea));if(this['md5']!==_0x4590ca){this[_0xc3ca('0xe')]=_0x4590ca;io['to'](util['format'](_0xc3ca('0x18'),_0x819dea['name']))[_0xc3ca('0x19')]('mail_queue:save',_0x819dea);}};module[_0xc3ca('0x1a')]=MailQueue; \ No newline at end of file +var _0x6e6c=['exports','lodash','md5','util','ioredis','../../../config/environment','redis','localhost','name','strategy','beepall','Agents','mapAgentsId','updateRouting','updateRealtime','prototype','_rr','map','loggedIn','paused','length','online','available','waiting','stringify','format','mail:queue:%s','emit','mail_queue:save'];(function(_0x572165,_0x6a45cc){var _0x8c8709=function(_0x43faab){while(--_0x43faab){_0x572165['push'](_0x572165['shift']());}};_0x8c8709(++_0x6a45cc);}(_0x6e6c,0x123));var _0xc6e6=function(_0x397e5f,_0x454c8f){_0x397e5f=_0x397e5f-0x0;var _0x5302b8=_0x6e6c[_0x397e5f];return _0x5302b8;};'use strict';var _=require(_0xc6e6('0x0'));var md5=require(_0xc6e6('0x1'));var util=require(_0xc6e6('0x2'));var Redis=require(_0xc6e6('0x3'));var config=require(_0xc6e6('0x4'));config[_0xc6e6('0x5')]=_['defaults'](config['redis'],{'host':_0xc6e6('0x6'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0xc6e6('0x5')]));function MailQueue(_0x15586e){this['id']=_0x15586e['id']||0x0;this[_0xc6e6('0x7')]=_0x15586e[_0xc6e6('0x7')]||'';this['timeout']=_0x15586e['timeout']||0xa;this[_0xc6e6('0x8')]=_0x15586e[_0xc6e6('0x8')]||_0xc6e6('0x9');this[_0xc6e6('0xa')]=_0x15586e[_0xc6e6('0xa')];this[_0xc6e6('0xb')]={};this['waiting']=0x0;this[_0xc6e6('0x1')]='';this[_0xc6e6('0xc')]();this[_0xc6e6('0xd')]();}MailQueue[_0xc6e6('0xe')][_0xc6e6('0xc')]=function(){var _0x1b0eaa=this[_0xc6e6('0xb')][_0xc6e6('0xf')];this[_0xc6e6('0xb')]=_[_0xc6e6('0x10')](this[_0xc6e6('0xa')],'id');this[_0xc6e6('0xb')][_0xc6e6('0xf')]=_0x1b0eaa;};MailQueue[_0xc6e6('0xe')][_0xc6e6('0xd')]=function(){this[_0xc6e6('0x11')]=0x0;this[_0xc6e6('0x12')]=0x0;for(var _0x440fb4=0x0;_0x440fb4=0x0?this[_0xc6e6('0x15')]:0x0;var _0x3393b8={'id':this['id'],'available':this['available'],'loggedIn':this[_0xc6e6('0x11')],'name':this[_0xc6e6('0x7')],'paused':this['paused'],'waiting':this[_0xc6e6('0x16')]};var _0x13f729=md5(JSON[_0xc6e6('0x17')](_0x3393b8));if(this[_0xc6e6('0x1')]!==_0x13f729){this[_0xc6e6('0x1')]=_0x13f729;io['to'](util[_0xc6e6('0x18')](_0xc6e6('0x19'),_0x3393b8[_0xc6e6('0x7')]))[_0xc6e6('0x1a')](_0xc6e6('0x1b'),_0x3393b8);}};module[_0xc6e6('0x1c')]=MailQueue; \ No newline at end of file diff --git a/server/services/routing/model/openchannelQueue.js b/server/services/routing/model/openchannelQueue.js index 300b9cf..165089c 100644 --- a/server/services/routing/model/openchannelQueue.js +++ b/server/services/routing/model/openchannelQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc4aa=['strategy','Agents','mapAgentsId','updateRouting','updateRealtime','map','_rr','prototype','loggedIn','paused','length','online','available','waiting','stringify','format','openchannel:queue:%s','emit','openchannel_queue:save','lodash','md5','util','ioredis','../../../config/environment','redis','socket.io-emitter','name','timeout'];(function(_0x2db12b,_0x30ab1d){var _0x20990b=function(_0x589477){while(--_0x589477){_0x2db12b['push'](_0x2db12b['shift']());}};_0x20990b(++_0x30ab1d);}(_0xc4aa,0x1b7));var _0xac4a=function(_0x465a0c,_0x19d4d5){_0x465a0c=_0x465a0c-0x0;var _0x1e202e=_0xc4aa[_0x465a0c];return _0x1e202e;};'use strict';var _=require(_0xac4a('0x0'));var md5=require(_0xac4a('0x1'));var util=require(_0xac4a('0x2'));var Redis=require(_0xac4a('0x3'));var config=require(_0xac4a('0x4'));config[_0xac4a('0x5')]=_['defaults'](config['redis'],{'host':'localhost','port':0x18eb});var io=require(_0xac4a('0x6'))(new Redis(config[_0xac4a('0x5')]));function OpenchannelQueue(_0x730a38){this['id']=_0x730a38['id']||0x0;this[_0xac4a('0x7')]=_0x730a38[_0xac4a('0x7')]||'';this[_0xac4a('0x8')]=_0x730a38[_0xac4a('0x8')]||0xa;this[_0xac4a('0x9')]=_0x730a38['strategy']||'beepall';this[_0xac4a('0xa')]=_0x730a38[_0xac4a('0xa')];this[_0xac4a('0xb')]={};this['waiting']=0x0;this[_0xac4a('0x1')]='';this[_0xac4a('0xc')]();this[_0xac4a('0xd')]();}OpenchannelQueue['prototype'][_0xac4a('0xc')]=function(){var _0x488e3c=this[_0xac4a('0xb')]['_rr'];this[_0xac4a('0xb')]=_[_0xac4a('0xe')](this[_0xac4a('0xa')],'id');this['mapAgentsId'][_0xac4a('0xf')]=_0x488e3c;};OpenchannelQueue[_0xac4a('0x10')][_0xac4a('0xd')]=function(){this[_0xac4a('0x11')]=0x0;this[_0xac4a('0x12')]=0x0;for(var _0x3b71c0=0x0;_0x3b71c0=0x0?this[_0xac4a('0x15')]:0x0;var _0x44ec59={'id':this['id'],'available':this['available'],'loggedIn':this['loggedIn'],'name':this[_0xac4a('0x7')],'paused':this[_0xac4a('0x12')],'waiting':this[_0xac4a('0x16')]};var _0x4d837c=md5(JSON[_0xac4a('0x17')](_0x44ec59));if(this[_0xac4a('0x1')]!==_0x4d837c){this[_0xac4a('0x1')]=_0x4d837c;io['to'](util[_0xac4a('0x18')](_0xac4a('0x19'),_0x44ec59[_0xac4a('0x7')]))[_0xac4a('0x1a')](_0xac4a('0x1b'),_0x44ec59);}};module['exports']=OpenchannelQueue; \ No newline at end of file +var _0x2ef3=['stringify','format','openchannel_queue:save','exports','lodash','md5','util','ioredis','../../../config/environment','redis','localhost','timeout','strategy','beepall','Agents','mapAgentsId','waiting','prototype','updateRouting','_rr','paused','length','online','available','loggedIn','name'];(function(_0x5180c3,_0x4b35f7){var _0x55c975=function(_0x4746cb){while(--_0x4746cb){_0x5180c3['push'](_0x5180c3['shift']());}};_0x55c975(++_0x4b35f7);}(_0x2ef3,0xba));var _0x32ef=function(_0x36d182,_0x5358c5){_0x36d182=_0x36d182-0x0;var _0x37e7fb=_0x2ef3[_0x36d182];return _0x37e7fb;};'use strict';var _=require(_0x32ef('0x0'));var md5=require(_0x32ef('0x1'));var util=require(_0x32ef('0x2'));var Redis=require(_0x32ef('0x3'));var config=require(_0x32ef('0x4'));config[_0x32ef('0x5')]=_['defaults'](config[_0x32ef('0x5')],{'host':_0x32ef('0x6'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x32ef('0x5')]));function OpenchannelQueue(_0x37dd1d){this['id']=_0x37dd1d['id']||0x0;this['name']=_0x37dd1d['name']||'';this[_0x32ef('0x7')]=_0x37dd1d[_0x32ef('0x7')]||0xa;this[_0x32ef('0x8')]=_0x37dd1d[_0x32ef('0x8')]||_0x32ef('0x9');this[_0x32ef('0xa')]=_0x37dd1d[_0x32ef('0xa')];this[_0x32ef('0xb')]={};this[_0x32ef('0xc')]=0x0;this[_0x32ef('0x1')]='';this['updateRouting']();this['updateRealtime']();}OpenchannelQueue[_0x32ef('0xd')][_0x32ef('0xe')]=function(){var _0x45bfd5=this[_0x32ef('0xb')]['_rr'];this[_0x32ef('0xb')]=_['map'](this[_0x32ef('0xa')],'id');this['mapAgentsId'][_0x32ef('0xf')]=_0x45bfd5;};OpenchannelQueue[_0x32ef('0xd')]['updateRealtime']=function(){this['loggedIn']=0x0;this[_0x32ef('0x10')]=0x0;for(var _0x4d8009=0x0;_0x4d8009=0x0?this[_0x32ef('0x13')]:0x0;var _0x286bfb={'id':this['id'],'available':this['available'],'loggedIn':this[_0x32ef('0x14')],'name':this[_0x32ef('0x15')],'paused':this['paused'],'waiting':this[_0x32ef('0xc')]};var _0x314ef1=md5(JSON[_0x32ef('0x16')](_0x286bfb));if(this[_0x32ef('0x1')]!==_0x314ef1){this[_0x32ef('0x1')]=_0x314ef1;io['to'](util[_0x32ef('0x17')]('openchannel:queue:%s',_0x286bfb[_0x32ef('0x15')]))['emit'](_0x32ef('0x18'),_0x286bfb);}};module[_0x32ef('0x19')]=OpenchannelQueue; \ No newline at end of file diff --git a/server/services/routing/model/smsQueue.js b/server/services/routing/model/smsQueue.js index bbff814..3a99993 100644 --- a/server/services/routing/model/smsQueue.js +++ b/server/services/routing/model/smsQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x136c=['online','loggedIn','available','stringify','format','sms:queue:%s','emit','lodash','md5','ioredis','../../../config/environment','redis','defaults','localhost','socket.io-emitter','name','timeout','strategy','Agents','mapAgentsId','waiting','updateRouting','updateRealtime','prototype','map','_rr','paused'];(function(_0x373205,_0x29d2ca){var _0x296652=function(_0x3fa822){while(--_0x3fa822){_0x373205['push'](_0x373205['shift']());}};_0x296652(++_0x29d2ca);}(_0x136c,0x1d2));var _0xc136=function(_0x4fde48,_0x514a22){_0x4fde48=_0x4fde48-0x0;var _0x4af27f=_0x136c[_0x4fde48];return _0x4af27f;};'use strict';var _=require(_0xc136('0x0'));var md5=require(_0xc136('0x1'));var util=require('util');var Redis=require(_0xc136('0x2'));var config=require(_0xc136('0x3'));config[_0xc136('0x4')]=_[_0xc136('0x5')](config[_0xc136('0x4')],{'host':_0xc136('0x6'),'port':0x18eb});var io=require(_0xc136('0x7'))(new Redis(config[_0xc136('0x4')]));function SmsQueue(_0x104d18){this['id']=_0x104d18['id']||0x0;this['name']=_0x104d18[_0xc136('0x8')]||'';this['timeout']=_0x104d18[_0xc136('0x9')]||0xa;this[_0xc136('0xa')]=_0x104d18[_0xc136('0xa')]||'beepall';this[_0xc136('0xb')]=_0x104d18['Agents'];this[_0xc136('0xc')]={};this[_0xc136('0xd')]=0x0;this[_0xc136('0x1')]='';this[_0xc136('0xe')]();this[_0xc136('0xf')]();}SmsQueue[_0xc136('0x10')][_0xc136('0xe')]=function(){var _0x303ebe=this[_0xc136('0xc')]['_rr'];this['mapAgentsId']=_[_0xc136('0x11')](this['Agents'],'id');this[_0xc136('0xc')][_0xc136('0x12')]=_0x303ebe;};SmsQueue[_0xc136('0x10')]['updateRealtime']=function(){this['loggedIn']=0x0;this[_0xc136('0x13')]=0x0;for(var _0x36d55d=0x0;_0x36d55d=0x0?this[_0xc136('0x16')]:0x0;var _0x59503b={'id':this['id'],'available':this['available'],'loggedIn':this['loggedIn'],'name':this[_0xc136('0x8')],'paused':this['paused'],'waiting':this[_0xc136('0xd')]};var _0x18de2e=md5(JSON[_0xc136('0x17')](_0x59503b));if(this[_0xc136('0x1')]!==_0x18de2e){this['md5']=_0x18de2e;io['to'](util[_0xc136('0x18')](_0xc136('0x19'),_0x59503b['name']))[_0xc136('0x1a')]('sms_queue:save',_0x59503b);}};module['exports']=SmsQueue; \ No newline at end of file +var _0x13c0=['length','online','smsPause','available','stringify','format','sms:queue:%s','emit','sms_queue:save','lodash','md5','util','ioredis','redis','localhost','socket.io-emitter','name','timeout','beepall','Agents','mapAgentsId','waiting','updateRouting','updateRealtime','prototype','_rr','loggedIn','paused'];(function(_0x45a28f,_0x38c95c){var _0x57fb5b=function(_0x526765){while(--_0x526765){_0x45a28f['push'](_0x45a28f['shift']());}};_0x57fb5b(++_0x38c95c);}(_0x13c0,0x79));var _0x013c=function(_0x4bfd95,_0x1c3b3b){_0x4bfd95=_0x4bfd95-0x0;var _0x1484cd=_0x13c0[_0x4bfd95];return _0x1484cd;};'use strict';var _=require(_0x013c('0x0'));var md5=require(_0x013c('0x1'));var util=require(_0x013c('0x2'));var Redis=require(_0x013c('0x3'));var config=require('../../../config/environment');config['redis']=_['defaults'](config[_0x013c('0x4')],{'host':_0x013c('0x5'),'port':0x18eb});var io=require(_0x013c('0x6'))(new Redis(config[_0x013c('0x4')]));function SmsQueue(_0x129de9){this['id']=_0x129de9['id']||0x0;this[_0x013c('0x7')]=_0x129de9[_0x013c('0x7')]||'';this[_0x013c('0x8')]=_0x129de9['timeout']||0xa;this['strategy']=_0x129de9['strategy']||_0x013c('0x9');this[_0x013c('0xa')]=_0x129de9['Agents'];this[_0x013c('0xb')]={};this[_0x013c('0xc')]=0x0;this[_0x013c('0x1')]='';this[_0x013c('0xd')]();this[_0x013c('0xe')]();}SmsQueue[_0x013c('0xf')][_0x013c('0xd')]=function(){var _0x3cca33=this[_0x013c('0xb')][_0x013c('0x10')];this['mapAgentsId']=_['map'](this[_0x013c('0xa')],'id');this[_0x013c('0xb')][_0x013c('0x10')]=_0x3cca33;};SmsQueue[_0x013c('0xf')]['updateRealtime']=function(){this[_0x013c('0x11')]=0x0;this[_0x013c('0x12')]=0x0;for(var _0xcfe81a=0x0;_0xcfe81a=0x0?this[_0x013c('0x16')]:0x0;var _0x4268cf={'id':this['id'],'available':this[_0x013c('0x16')],'loggedIn':this['loggedIn'],'name':this['name'],'paused':this[_0x013c('0x12')],'waiting':this[_0x013c('0xc')]};var _0x5752bd=md5(JSON[_0x013c('0x17')](_0x4268cf));if(this[_0x013c('0x1')]!==_0x5752bd){this[_0x013c('0x1')]=_0x5752bd;io['to'](util[_0x013c('0x18')](_0x013c('0x19'),_0x4268cf['name']))[_0x013c('0x1a')](_0x013c('0x1b'),_0x4268cf);}};module['exports']=SmsQueue; \ No newline at end of file diff --git a/server/services/routing/model/whatsappQueue.js b/server/services/routing/model/whatsappQueue.js index 42e5aa0..c7fcd4e 100644 --- a/server/services/routing/model/whatsappQueue.js +++ b/server/services/routing/model/whatsappQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xcd93=['defaults','redis','socket.io-emitter','name','timeout','strategy','beepall','Agents','mapAgentsId','waiting','md5','updateRouting','updateRealtime','prototype','_rr','loggedIn','length','online','whatsappPause','paused','available','stringify','format','whatsapp:queue:%s','emit','exports','lodash','util','ioredis','../../../config/environment'];(function(_0x1a0d99,_0x401f09){var _0x355318=function(_0x28a867){while(--_0x28a867){_0x1a0d99['push'](_0x1a0d99['shift']());}};_0x355318(++_0x401f09);}(_0xcd93,0xce));var _0x3cd9=function(_0x5c0dcf,_0x565fda){_0x5c0dcf=_0x5c0dcf-0x0;var _0x4117ac=_0xcd93[_0x5c0dcf];return _0x4117ac;};'use strict';var _=require(_0x3cd9('0x0'));var md5=require('md5');var util=require(_0x3cd9('0x1'));var Redis=require(_0x3cd9('0x2'));var config=require(_0x3cd9('0x3'));config['redis']=_[_0x3cd9('0x4')](config[_0x3cd9('0x5')],{'host':'localhost','port':0x18eb});var io=require(_0x3cd9('0x6'))(new Redis(config[_0x3cd9('0x5')]));function WhatsappQueue(_0x55a3c6){this['id']=_0x55a3c6['id']||0x0;this[_0x3cd9('0x7')]=_0x55a3c6[_0x3cd9('0x7')]||'';this['timeout']=_0x55a3c6[_0x3cd9('0x8')]||0xa;this[_0x3cd9('0x9')]=_0x55a3c6[_0x3cd9('0x9')]||_0x3cd9('0xa');this[_0x3cd9('0xb')]=_0x55a3c6[_0x3cd9('0xb')];this[_0x3cd9('0xc')]={};this[_0x3cd9('0xd')]=0x0;this[_0x3cd9('0xe')]='';this[_0x3cd9('0xf')]();this[_0x3cd9('0x10')]();}WhatsappQueue[_0x3cd9('0x11')][_0x3cd9('0xf')]=function(){var _0x5f1a13=this['mapAgentsId'][_0x3cd9('0x12')];this[_0x3cd9('0xc')]=_['map'](this['Agents'],'id');this['mapAgentsId']['_rr']=_0x5f1a13;};WhatsappQueue['prototype']['updateRealtime']=function(){this[_0x3cd9('0x13')]=0x0;this['paused']=0x0;for(var _0x154bd7=0x0;_0x154bd7=0x0?this['available']:0x0;var _0x3b74f6={'id':this['id'],'available':this[_0x3cd9('0x18')],'loggedIn':this[_0x3cd9('0x13')],'name':this[_0x3cd9('0x7')],'paused':this['paused'],'waiting':this[_0x3cd9('0xd')]};var _0x159cf4=md5(JSON[_0x3cd9('0x19')](_0x3b74f6));if(this['md5']!==_0x159cf4){this[_0x3cd9('0xe')]=_0x159cf4;io['to'](util[_0x3cd9('0x1a')](_0x3cd9('0x1b'),_0x3b74f6[_0x3cd9('0x7')]))[_0x3cd9('0x1c')]('whatsapp_queue:save',_0x3b74f6);}};module[_0x3cd9('0x1d')]=WhatsappQueue; \ No newline at end of file +var _0x7a95=['../../../config/environment','defaults','redis','localhost','name','strategy','Agents','mapAgentsId','waiting','updateRealtime','prototype','map','loggedIn','paused','length','online','whatsappPause','available','stringify','format','whatsapp:queue:%s','whatsapp_queue:save','exports','lodash','md5','util'];(function(_0x3a7a9c,_0x24f7d6){var _0x59156e=function(_0x5bc930){while(--_0x5bc930){_0x3a7a9c['push'](_0x3a7a9c['shift']());}};_0x59156e(++_0x24f7d6);}(_0x7a95,0x101));var _0x57a9=function(_0x3fe17e,_0x3e28cd){_0x3fe17e=_0x3fe17e-0x0;var _0xd40b04=_0x7a95[_0x3fe17e];return _0xd40b04;};'use strict';var _=require(_0x57a9('0x0'));var md5=require(_0x57a9('0x1'));var util=require(_0x57a9('0x2'));var Redis=require('ioredis');var config=require(_0x57a9('0x3'));config['redis']=_[_0x57a9('0x4')](config[_0x57a9('0x5')],{'host':_0x57a9('0x6'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x57a9('0x5')]));function WhatsappQueue(_0x239b4d){this['id']=_0x239b4d['id']||0x0;this[_0x57a9('0x7')]=_0x239b4d['name']||'';this['timeout']=_0x239b4d['timeout']||0xa;this[_0x57a9('0x8')]=_0x239b4d['strategy']||'beepall';this['Agents']=_0x239b4d[_0x57a9('0x9')];this[_0x57a9('0xa')]={};this[_0x57a9('0xb')]=0x0;this['md5']='';this['updateRouting']();this[_0x57a9('0xc')]();}WhatsappQueue[_0x57a9('0xd')]['updateRouting']=function(){var _0x4a0efb=this[_0x57a9('0xa')]['_rr'];this[_0x57a9('0xa')]=_[_0x57a9('0xe')](this['Agents'],'id');this[_0x57a9('0xa')]['_rr']=_0x4a0efb;};WhatsappQueue['prototype'][_0x57a9('0xc')]=function(){this[_0x57a9('0xf')]=0x0;this[_0x57a9('0x10')]=0x0;for(var _0x4c2bd0=0x0;_0x4c2bd0=0x0?this[_0x57a9('0x14')]:0x0;var _0x4912e2={'id':this['id'],'available':this[_0x57a9('0x14')],'loggedIn':this['loggedIn'],'name':this[_0x57a9('0x7')],'paused':this[_0x57a9('0x10')],'waiting':this[_0x57a9('0xb')]};var _0x41d0d3=md5(JSON[_0x57a9('0x15')](_0x4912e2));if(this[_0x57a9('0x1')]!==_0x41d0d3){this[_0x57a9('0x1')]=_0x41d0d3;io['to'](util[_0x57a9('0x16')](_0x57a9('0x17'),_0x4912e2['name']))['emit'](_0x57a9('0x18'),_0x4912e2);}};module[_0x57a9('0x19')]=WhatsappQueue; \ No newline at end of file diff --git a/server/services/routing/realtime/index.js b/server/services/routing/realtime/index.js index 3f900db..fb75f5b 100644 --- a/server/services/routing/realtime/index.js +++ b/server/services/routing/realtime/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['isUndefined','initIntervals','updateRealtime','updateRouting','initSmsQueues','smsQueues','initMailQueues','mailQueues','initWhatsappQueues','whatsappQueues','exports','bluebird','util','lodash','../model/interval','../model/chatQueue','../model/smsQueue','../model/mailQueue','../model/faxQueue','../model/whatsappQueue','intervals','openchannelQueues','chatQueues','faxQueues','mailQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','smsQueuesWaitingInteractions','faxQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','hasOwnProperty','prototype','mergeFromDatabase','initAgents','agents','length'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0xa9e0,0x123));var _0x0a9e=function(_0xf50820,_0x56f041){_0xf50820=_0xf50820-0x0;var _0x2a9b10=_0xa9e0[_0xf50820];return _0x2a9b10;};'use strict';var BPromise=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var _=require(_0x0a9e('0x2'));var moment=require('moment');var Agent=require('../model/agent');var Interval=require(_0x0a9e('0x3'));var OpenchannelQueue=require('../model/openchannelQueue');var ChatQueue=require(_0x0a9e('0x4'));var SmsQueue=require(_0x0a9e('0x5'));var MailQueue=require(_0x0a9e('0x6'));var FaxQueue=require(_0x0a9e('0x7'));var WhatsappQueue=require(_0x0a9e('0x8'));var Realtime=function(){this['agents']={};this[_0x0a9e('0x9')]={};this[_0x0a9e('0xa')]={};this[_0x0a9e('0xb')]={};this['smsQueues']={};this['mailQueues']={};this[_0x0a9e('0xc')]={};this['whatsappQueues']={};this['chatQueuesWaitingInteractions']={};this[_0x0a9e('0xd')]={};this[_0x0a9e('0xe')]={};this[_0x0a9e('0xf')]={};this[_0x0a9e('0x10')]={};this[_0x0a9e('0x11')]={};};function freeIsNotKey(_0xbd1168,_0x4a4c56,_0x50dfb2){var _0x527cdd=_['mapKeys'](_0xbd1168,function(_0x273d4d,_0x36471c){return _0x273d4d[_0x50dfb2];});for(var _0xd5b662 in _0x4a4c56){if(_0x4a4c56[_0x0a9e('0x12')](_0xd5b662)){if(!_0x527cdd[_0xd5b662]){delete _0x4a4c56[_0xd5b662];}}}}Realtime[_0x0a9e('0x13')][_0x0a9e('0x14')]=function(_0x5db4b0,_0x4283ce){for(var _0x239b12 in _0x4283ce){if(_0x5db4b0[_0x0a9e('0x12')](_0x239b12)){_0x5db4b0[_0x239b12]=_0x4283ce[_0x239b12];}}};Realtime[_0x0a9e('0x13')][_0x0a9e('0x15')]=function(){var _0x4d5611=this;return function(_0x52a03d){if(_0x52a03d){freeIsNotKey(_0x52a03d,_0x4d5611[_0x0a9e('0x16')],'id');for(var _0x5d0880=0x0,_0x1985b6={},_0x519dfd={};_0x5d0880<_0x52a03d[_0x0a9e('0x17')];_0x5d0880+=0x1){_0x1985b6=_0x52a03d[_0x5d0880];if(_[_0x0a9e('0x18')](_0x4d5611['agents'][_0x1985b6['id']])){_0x4d5611[_0x0a9e('0x16')][_0x1985b6['id']]=new Agent(_0x1985b6);}else{_0x4d5611['mergeFromDatabase'](_0x4d5611[_0x0a9e('0x16')][_0x1985b6['id']],_0x1985b6);}}}return _0x4d5611[_0x0a9e('0x16')];};};Realtime[_0x0a9e('0x13')][_0x0a9e('0x19')]=function(){var _0x31b1ca=this;return function(_0x2eb11f){if(_0x2eb11f){freeIsNotKey(_0x2eb11f,_0x31b1ca[_0x0a9e('0x9')],'id');for(var _0x20559e=0x0,_0x1314ae={},_0x112016={};_0x20559e<_0x2eb11f[_0x0a9e('0x17')];_0x20559e+=0x1){_0x1314ae=_0x2eb11f[_0x20559e];if(_[_0x0a9e('0x18')](_0x31b1ca['intervals'][_0x1314ae['id']])){_0x31b1ca[_0x0a9e('0x9')][_0x1314ae['id']]=new Interval(_0x1314ae);}else{_0x31b1ca[_0x0a9e('0x14')](_0x31b1ca['intervals'][_0x1314ae['id']],_0x1314ae);}}}return _0x31b1ca[_0x0a9e('0x9')];};};Realtime['prototype']['initOpenchannelQueues']=function(){var _0x3a02e1=this;return function(_0x432e56){if(_0x432e56){freeIsNotKey(_0x432e56,_0x3a02e1[_0x0a9e('0xa')],'id');for(var _0x30bae6=0x0,_0x4abc77={},_0xfb6e48={};_0x30bae6<_0x432e56[_0x0a9e('0x17')];_0x30bae6+=0x1){_0x4abc77=_0x432e56[_0x30bae6];if(_[_0x0a9e('0x18')](_0x3a02e1[_0x0a9e('0xa')][_0x4abc77['id']])){_0x3a02e1[_0x0a9e('0xa')][_0x4abc77['id']]=new OpenchannelQueue(_0x4abc77);}else{_0x3a02e1[_0x0a9e('0x14')](_0x3a02e1[_0x0a9e('0xa')][_0x4abc77['id']],_0x4abc77);}_0x3a02e1['openchannelQueues'][_0x4abc77['id']]['updateRouting']();_0x3a02e1[_0x0a9e('0xa')][_0x4abc77['id']][_0x0a9e('0x1a')]();}}return _0x3a02e1[_0x0a9e('0xa')];};};Realtime[_0x0a9e('0x13')]['initChatQueues']=function(){var _0x384319=this;return function(_0x479bc4){if(_0x479bc4){freeIsNotKey(_0x479bc4,_0x384319[_0x0a9e('0xb')],'id');for(var _0x5bfb33=0x0,_0x1dc186={},_0x34dc65={};_0x5bfb33<_0x479bc4[_0x0a9e('0x17')];_0x5bfb33+=0x1){_0x1dc186=_0x479bc4[_0x5bfb33];if(_[_0x0a9e('0x18')](_0x384319[_0x0a9e('0xb')][_0x1dc186['id']])){_0x384319[_0x0a9e('0xb')][_0x1dc186['id']]=new ChatQueue(_0x1dc186);}else{_0x384319[_0x0a9e('0x14')](_0x384319[_0x0a9e('0xb')][_0x1dc186['id']],_0x1dc186);}_0x384319['chatQueues'][_0x1dc186['id']][_0x0a9e('0x1b')]();_0x384319[_0x0a9e('0xb')][_0x1dc186['id']][_0x0a9e('0x1a')]();}}return _0x384319[_0x0a9e('0xb')];};};Realtime['prototype'][_0x0a9e('0x1c')]=function(){var _0x40e7a3=this;return function(_0x1843b2){if(_0x1843b2){freeIsNotKey(_0x1843b2,_0x40e7a3[_0x0a9e('0x1d')],'id');for(var _0x58b06f=0x0,_0x563b45={},_0x296f41={};_0x58b06f<_0x1843b2[_0x0a9e('0x17')];_0x58b06f+=0x1){_0x563b45=_0x1843b2[_0x58b06f];if(_[_0x0a9e('0x18')](_0x40e7a3['smsQueues'][_0x563b45['id']])){_0x40e7a3[_0x0a9e('0x1d')][_0x563b45['id']]=new SmsQueue(_0x563b45);}else{_0x40e7a3['mergeFromDatabase'](_0x40e7a3[_0x0a9e('0x1d')][_0x563b45['id']],_0x563b45);}_0x40e7a3[_0x0a9e('0x1d')][_0x563b45['id']][_0x0a9e('0x1b')]();_0x40e7a3[_0x0a9e('0x1d')][_0x563b45['id']][_0x0a9e('0x1a')]();}}return _0x40e7a3['smsQueues'];};};Realtime[_0x0a9e('0x13')][_0x0a9e('0x1e')]=function(){var _0x40cb85=this;return function(_0x2da5c0){if(_0x2da5c0){freeIsNotKey(_0x2da5c0,_0x40cb85[_0x0a9e('0x1f')],'id');for(var _0x409319=0x0,_0x332d35={},_0x39e565={};_0x409319<_0x2da5c0['length'];_0x409319+=0x1){_0x332d35=_0x2da5c0[_0x409319];if(_[_0x0a9e('0x18')](_0x40cb85['mailQueues'][_0x332d35['id']])){_0x40cb85[_0x0a9e('0x1f')][_0x332d35['id']]=new MailQueue(_0x332d35);}else{_0x40cb85[_0x0a9e('0x14')](_0x40cb85[_0x0a9e('0x1f')][_0x332d35['id']],_0x332d35);}_0x40cb85[_0x0a9e('0x1f')][_0x332d35['id']]['updateRouting']();_0x40cb85[_0x0a9e('0x1f')][_0x332d35['id']][_0x0a9e('0x1a')]();}}return _0x40cb85[_0x0a9e('0x1f')];};};Realtime[_0x0a9e('0x13')]['initFaxQueues']=function(){var _0x54135e=this;return function(_0x1e8694){if(_0x1e8694){freeIsNotKey(_0x1e8694,_0x54135e['faxQueues'],'id');for(var _0x24936a=0x0,_0x3d9717={},_0x381c37={};_0x24936a<_0x1e8694[_0x0a9e('0x17')];_0x24936a+=0x1){_0x3d9717=_0x1e8694[_0x24936a];if(_['isUndefined'](_0x54135e[_0x0a9e('0xc')][_0x3d9717['id']])){_0x54135e[_0x0a9e('0xc')][_0x3d9717['id']]=new FaxQueue(_0x3d9717);}else{_0x54135e[_0x0a9e('0x14')](_0x54135e['faxQueues'][_0x3d9717['id']],_0x3d9717);}_0x54135e[_0x0a9e('0xc')][_0x3d9717['id']][_0x0a9e('0x1b')]();_0x54135e[_0x0a9e('0xc')][_0x3d9717['id']]['updateRealtime']();}}return _0x54135e['faxQueues'];};};Realtime[_0x0a9e('0x13')][_0x0a9e('0x20')]=function(){var _0x5adda1=this;return function(_0x2b814e){if(_0x2b814e){freeIsNotKey(_0x2b814e,_0x5adda1[_0x0a9e('0x21')],'id');for(var _0x2e1b3a=0x0,_0x148f55={},_0x4b38d9={};_0x2e1b3a<_0x2b814e['length'];_0x2e1b3a+=0x1){_0x148f55=_0x2b814e[_0x2e1b3a];if(_[_0x0a9e('0x18')](_0x5adda1[_0x0a9e('0x21')][_0x148f55['id']])){_0x5adda1['whatsappQueues'][_0x148f55['id']]=new WhatsappQueue(_0x148f55);}else{_0x5adda1[_0x0a9e('0x14')](_0x5adda1[_0x0a9e('0x21')][_0x148f55['id']],_0x148f55);}_0x5adda1[_0x0a9e('0x21')][_0x148f55['id']]['updateRouting']();_0x5adda1[_0x0a9e('0x21')][_0x148f55['id']][_0x0a9e('0x1a')]();}}return _0x5adda1[_0x0a9e('0x21')];};};module[_0x0a9e('0x22')]=Realtime; \ No newline at end of file +var _0xb10b=['faxQueues','whatsappQueues','chatQueuesWaitingInteractions','mailQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','smsQueuesWaitingInteractions','mapKeys','hasOwnProperty','prototype','mergeFromDatabase','initAgents','agents','isUndefined','initIntervals','length','initOpenchannelQueues','updateRealtime','initChatQueues','chatQueues','initSmsQueues','updateRouting','initMailQueues','initFaxQueues','initWhatsappQueues','exports','bluebird','lodash','moment','../model/agent','../model/openchannelQueue','../model/chatQueue','../model/smsQueue','../model/mailQueue','../model/faxQueue','../model/whatsappQueue','intervals','openchannelQueues','smsQueues','mailQueues'];(function(_0x2669f0,_0x2767b6){var _0x3cd710=function(_0x37b1e6){while(--_0x37b1e6){_0x2669f0['push'](_0x2669f0['shift']());}};_0x3cd710(++_0x2767b6);}(_0xb10b,0x12a));var _0xbb10=function(_0xf73390,_0x14c109){_0xf73390=_0xf73390-0x0;var _0x4b212f=_0xb10b[_0xf73390];return _0x4b212f;};'use strict';var BPromise=require(_0xbb10('0x0'));var util=require('util');var _=require(_0xbb10('0x1'));var moment=require(_0xbb10('0x2'));var Agent=require(_0xbb10('0x3'));var Interval=require('../model/interval');var OpenchannelQueue=require(_0xbb10('0x4'));var ChatQueue=require(_0xbb10('0x5'));var SmsQueue=require(_0xbb10('0x6'));var MailQueue=require(_0xbb10('0x7'));var FaxQueue=require(_0xbb10('0x8'));var WhatsappQueue=require(_0xbb10('0x9'));var Realtime=function(){this['agents']={};this[_0xbb10('0xa')]={};this[_0xbb10('0xb')]={};this['chatQueues']={};this[_0xbb10('0xc')]={};this[_0xbb10('0xd')]={};this[_0xbb10('0xe')]={};this[_0xbb10('0xf')]={};this[_0xbb10('0x10')]={};this[_0xbb10('0x11')]={};this[_0xbb10('0x12')]={};this[_0xbb10('0x13')]={};this['faxQueuesWaitingInteractions']={};this['whatsappQueuesWaitingInteractions']={};};function freeIsNotKey(_0x20bd61,_0x118a74,_0xce64f3){var _0x5e136d=_[_0xbb10('0x14')](_0x20bd61,function(_0x5be7e0,_0x44fb19){return _0x5be7e0[_0xce64f3];});for(var _0x916a32 in _0x118a74){if(_0x118a74[_0xbb10('0x15')](_0x916a32)){if(!_0x5e136d[_0x916a32]){delete _0x118a74[_0x916a32];}}}}Realtime[_0xbb10('0x16')][_0xbb10('0x17')]=function(_0x147230,_0x58a612){for(var _0x26e021 in _0x58a612){if(_0x147230[_0xbb10('0x15')](_0x26e021)){_0x147230[_0x26e021]=_0x58a612[_0x26e021];}}};Realtime[_0xbb10('0x16')][_0xbb10('0x18')]=function(){var _0x3df17b=this;return function(_0x2f2ebf){if(_0x2f2ebf){freeIsNotKey(_0x2f2ebf,_0x3df17b[_0xbb10('0x19')],'id');for(var _0x36b5e8=0x0,_0x3e26f4={},_0x2b184e={};_0x36b5e8<_0x2f2ebf['length'];_0x36b5e8+=0x1){_0x3e26f4=_0x2f2ebf[_0x36b5e8];if(_[_0xbb10('0x1a')](_0x3df17b[_0xbb10('0x19')][_0x3e26f4['id']])){_0x3df17b[_0xbb10('0x19')][_0x3e26f4['id']]=new Agent(_0x3e26f4);}else{_0x3df17b[_0xbb10('0x17')](_0x3df17b[_0xbb10('0x19')][_0x3e26f4['id']],_0x3e26f4);}}}return _0x3df17b[_0xbb10('0x19')];};};Realtime[_0xbb10('0x16')][_0xbb10('0x1b')]=function(){var _0xbf2906=this;return function(_0xe1c665){if(_0xe1c665){freeIsNotKey(_0xe1c665,_0xbf2906['intervals'],'id');for(var _0x5ff0cf=0x0,_0x19f48d={},_0x388fab={};_0x5ff0cf<_0xe1c665[_0xbb10('0x1c')];_0x5ff0cf+=0x1){_0x19f48d=_0xe1c665[_0x5ff0cf];if(_[_0xbb10('0x1a')](_0xbf2906[_0xbb10('0xa')][_0x19f48d['id']])){_0xbf2906['intervals'][_0x19f48d['id']]=new Interval(_0x19f48d);}else{_0xbf2906[_0xbb10('0x17')](_0xbf2906[_0xbb10('0xa')][_0x19f48d['id']],_0x19f48d);}}}return _0xbf2906['intervals'];};};Realtime['prototype'][_0xbb10('0x1d')]=function(){var _0x311abe=this;return function(_0x2e911d){if(_0x2e911d){freeIsNotKey(_0x2e911d,_0x311abe[_0xbb10('0xb')],'id');for(var _0x445761=0x0,_0x1824b7={},_0x407cb4={};_0x445761<_0x2e911d[_0xbb10('0x1c')];_0x445761+=0x1){_0x1824b7=_0x2e911d[_0x445761];if(_[_0xbb10('0x1a')](_0x311abe[_0xbb10('0xb')][_0x1824b7['id']])){_0x311abe[_0xbb10('0xb')][_0x1824b7['id']]=new OpenchannelQueue(_0x1824b7);}else{_0x311abe[_0xbb10('0x17')](_0x311abe['openchannelQueues'][_0x1824b7['id']],_0x1824b7);}_0x311abe['openchannelQueues'][_0x1824b7['id']]['updateRouting']();_0x311abe[_0xbb10('0xb')][_0x1824b7['id']][_0xbb10('0x1e')]();}}return _0x311abe[_0xbb10('0xb')];};};Realtime['prototype'][_0xbb10('0x1f')]=function(){var _0x24d586=this;return function(_0x6ed43b){if(_0x6ed43b){freeIsNotKey(_0x6ed43b,_0x24d586[_0xbb10('0x20')],'id');for(var _0x1acce9=0x0,_0x20d946={},_0x2a0e8b={};_0x1acce9<_0x6ed43b['length'];_0x1acce9+=0x1){_0x20d946=_0x6ed43b[_0x1acce9];if(_[_0xbb10('0x1a')](_0x24d586[_0xbb10('0x20')][_0x20d946['id']])){_0x24d586[_0xbb10('0x20')][_0x20d946['id']]=new ChatQueue(_0x20d946);}else{_0x24d586[_0xbb10('0x17')](_0x24d586[_0xbb10('0x20')][_0x20d946['id']],_0x20d946);}_0x24d586[_0xbb10('0x20')][_0x20d946['id']]['updateRouting']();_0x24d586[_0xbb10('0x20')][_0x20d946['id']]['updateRealtime']();}}return _0x24d586[_0xbb10('0x20')];};};Realtime['prototype'][_0xbb10('0x21')]=function(){var _0x1dcc9c=this;return function(_0x1b59f9){if(_0x1b59f9){freeIsNotKey(_0x1b59f9,_0x1dcc9c['smsQueues'],'id');for(var _0x518d47=0x0,_0x4c3744={},_0x34f65e={};_0x518d47<_0x1b59f9['length'];_0x518d47+=0x1){_0x4c3744=_0x1b59f9[_0x518d47];if(_[_0xbb10('0x1a')](_0x1dcc9c[_0xbb10('0xc')][_0x4c3744['id']])){_0x1dcc9c[_0xbb10('0xc')][_0x4c3744['id']]=new SmsQueue(_0x4c3744);}else{_0x1dcc9c[_0xbb10('0x17')](_0x1dcc9c[_0xbb10('0xc')][_0x4c3744['id']],_0x4c3744);}_0x1dcc9c[_0xbb10('0xc')][_0x4c3744['id']][_0xbb10('0x22')]();_0x1dcc9c['smsQueues'][_0x4c3744['id']][_0xbb10('0x1e')]();}}return _0x1dcc9c[_0xbb10('0xc')];};};Realtime[_0xbb10('0x16')][_0xbb10('0x23')]=function(){var _0xfb2c5e=this;return function(_0x9de708){if(_0x9de708){freeIsNotKey(_0x9de708,_0xfb2c5e[_0xbb10('0xd')],'id');for(var _0x10202c=0x0,_0x3c8d7d={},_0x56943c={};_0x10202c<_0x9de708[_0xbb10('0x1c')];_0x10202c+=0x1){_0x3c8d7d=_0x9de708[_0x10202c];if(_[_0xbb10('0x1a')](_0xfb2c5e[_0xbb10('0xd')][_0x3c8d7d['id']])){_0xfb2c5e[_0xbb10('0xd')][_0x3c8d7d['id']]=new MailQueue(_0x3c8d7d);}else{_0xfb2c5e['mergeFromDatabase'](_0xfb2c5e[_0xbb10('0xd')][_0x3c8d7d['id']],_0x3c8d7d);}_0xfb2c5e['mailQueues'][_0x3c8d7d['id']]['updateRouting']();_0xfb2c5e[_0xbb10('0xd')][_0x3c8d7d['id']][_0xbb10('0x1e')]();}}return _0xfb2c5e[_0xbb10('0xd')];};};Realtime[_0xbb10('0x16')][_0xbb10('0x24')]=function(){var _0x29d11a=this;return function(_0x547062){if(_0x547062){freeIsNotKey(_0x547062,_0x29d11a[_0xbb10('0xe')],'id');for(var _0x25d72f=0x0,_0x52de31={},_0x5e3fbd={};_0x25d72f<_0x547062['length'];_0x25d72f+=0x1){_0x52de31=_0x547062[_0x25d72f];if(_[_0xbb10('0x1a')](_0x29d11a[_0xbb10('0xe')][_0x52de31['id']])){_0x29d11a[_0xbb10('0xe')][_0x52de31['id']]=new FaxQueue(_0x52de31);}else{_0x29d11a['mergeFromDatabase'](_0x29d11a[_0xbb10('0xe')][_0x52de31['id']],_0x52de31);}_0x29d11a[_0xbb10('0xe')][_0x52de31['id']][_0xbb10('0x22')]();_0x29d11a['faxQueues'][_0x52de31['id']][_0xbb10('0x1e')]();}}return _0x29d11a[_0xbb10('0xe')];};};Realtime[_0xbb10('0x16')][_0xbb10('0x25')]=function(){var _0x4f1cdd=this;return function(_0xd238e9){if(_0xd238e9){freeIsNotKey(_0xd238e9,_0x4f1cdd[_0xbb10('0xf')],'id');for(var _0x5835fd=0x0,_0xe2040f={},_0x2e3214={};_0x5835fd<_0xd238e9[_0xbb10('0x1c')];_0x5835fd+=0x1){_0xe2040f=_0xd238e9[_0x5835fd];if(_[_0xbb10('0x1a')](_0x4f1cdd[_0xbb10('0xf')][_0xe2040f['id']])){_0x4f1cdd[_0xbb10('0xf')][_0xe2040f['id']]=new WhatsappQueue(_0xe2040f);}else{_0x4f1cdd['mergeFromDatabase'](_0x4f1cdd[_0xbb10('0xf')][_0xe2040f['id']],_0xe2040f);}_0x4f1cdd[_0xbb10('0xf')][_0xe2040f['id']][_0xbb10('0x22')]();_0x4f1cdd[_0xbb10('0xf')][_0xe2040f['id']]['updateRealtime']();}}return _0x4f1cdd[_0xbb10('0xf')];};};module[_0xbb10('0x26')]=Realtime; \ No newline at end of file diff --git a/server/services/routing/rpc/chatInteraction.js b/server/services/routing/rpc/chatInteraction.js index 6236d48..7d48e28 100644 --- a/server/services/routing/rpc/chatInteraction.js +++ b/server/services/routing/rpc/chatInteraction.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4859=['addTagsToChatInteraction','update','Request','updateChatInteraction'];(function(_0x1421c3,_0x3cb122){var _0x4b791d=function(_0x264dc8){while(--_0x264dc8){_0x1421c3['push'](_0x1421c3['shift']());}};_0x4b791d(++_0x3cb122);}(_0x4859,0x85));var _0x9485=function(_0x57ffba,_0x167187){_0x57ffba=_0x57ffba-0x0;var _0x4c9ae2=_0x4859[_0x57ffba];return _0x4c9ae2;};'use strict';var client=require('../client');exports[_0x9485('0x0')]=function(_0x41b38a,_0x25b085){return client[_0x9485('0x1')]('UpdateChatInteraction',{'body':_0x25b085,'options':{'where':{'id':_0x41b38a}},'log':_0x9485('0x2')});};exports['addTags']=function(_0x4f73e5,_0x2e376b){return client[_0x9485('0x1')]('AddTagsToChatInteraction',{'body':_0x2e376b,'options':{'where':{'id':_0x4f73e5}},'log':_0x9485('0x3')});}; \ No newline at end of file +var _0x7398=['UpdateChatInteraction','updateChatInteraction','addTagsToChatInteraction','../client','update','Request'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x7398,0x13b));var _0x8739=function(_0xb0f7c3,_0x4eae95){_0xb0f7c3=_0xb0f7c3-0x0;var _0x28ea68=_0x7398[_0xb0f7c3];return _0x28ea68;};'use strict';var client=require(_0x8739('0x0'));exports[_0x8739('0x1')]=function(_0x4625a7,_0x2a778e){return client[_0x8739('0x2')](_0x8739('0x3'),{'body':_0x2a778e,'options':{'where':{'id':_0x4625a7}},'log':_0x8739('0x4')});};exports['addTags']=function(_0x4c247c,_0x5a6a0e){return client[_0x8739('0x2')]('AddTagsToChatInteraction',{'body':_0x5a6a0e,'options':{'where':{'id':_0x4c247c}},'log':_0x8739('0x5')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/chatMessage.js b/server/services/routing/rpc/chatMessage.js index 37af9ed..dde9ad5 100644 --- a/server/services/routing/rpc/chatMessage.js +++ b/server/services/routing/rpc/chatMessage.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7561=['create','CreateChatMessage'];(function(_0x58afd5,_0x534a48){var _0x3e503b=function(_0x27ba44){while(--_0x27ba44){_0x58afd5['push'](_0x58afd5['shift']());}};_0x3e503b(++_0x534a48);}(_0x7561,0x108));var _0x1756=function(_0x424a9a,_0x2dd9af){_0x424a9a=_0x424a9a-0x0;var _0xa7831c=_0x7561[_0x424a9a];return _0xa7831c;};'use strict';var client=require('../client');exports[_0x1756('0x0')]=function(_0xacc283){return client['Request'](_0x1756('0x1'),{'body':_0xacc283,'log':'createChatMessage'});}; \ No newline at end of file +var _0xb152=['Request','CreateChatMessage','createChatMessage','../client','create'];(function(_0x119b93,_0x5b7439){var _0x46f83c=function(_0xb22d1){while(--_0xb22d1){_0x119b93['push'](_0x119b93['shift']());}};_0x46f83c(++_0x5b7439);}(_0xb152,0x107));var _0x2b15=function(_0x37bae9,_0x163213){_0x37bae9=_0x37bae9-0x0;var _0x2a37c8=_0xb152[_0x37bae9];return _0x2a37c8;};'use strict';var client=require(_0x2b15('0x0'));exports[_0x2b15('0x1')]=function(_0x1135a5){return client[_0x2b15('0x2')](_0x2b15('0x3'),{'body':_0x1135a5,'log':_0x2b15('0x4')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/chatQueue.js b/server/services/routing/rpc/chatQueue.js index 2a25d8f..8d48bb3 100644 --- a/server/services/routing/rpc/chatQueue.js +++ b/server/services/routing/rpc/chatQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x77f7=['getChatQueues','Request','GetChatQueue','name','timeout','strategy','User','Agents','chatPause','../client'];(function(_0x4e3246,_0x244bd3){var _0x3f680b=function(_0x5d513d){while(--_0x5d513d){_0x4e3246['push'](_0x4e3246['shift']());}};_0x3f680b(++_0x244bd3);}(_0x77f7,0xbd));var _0x777f=function(_0x36decc,_0x228beb){_0x36decc=_0x36decc-0x0;var _0x478c04=_0x77f7[_0x36decc];return _0x478c04;};'use strict';var client=require(_0x777f('0x0'));exports[_0x777f('0x1')]=function(){return function(){return client[_0x777f('0x2')](_0x777f('0x3'),{'options':{'raw':![],'attributes':['id',_0x777f('0x4'),_0x777f('0x5'),_0x777f('0x6')],'include':[{'model':_0x777f('0x7'),'as':_0x777f('0x8'),'attributes':['id','name','online',_0x777f('0x9')]}]},'log':_0x777f('0x1')});};}; \ No newline at end of file +var _0x254a=['../client','getChatQueues','Request','name','timeout','strategy','User','chatPause'];(function(_0x408de5,_0x24fa7b){var _0x2015a1=function(_0x13082c){while(--_0x13082c){_0x408de5['push'](_0x408de5['shift']());}};_0x2015a1(++_0x24fa7b);}(_0x254a,0x138));var _0xa254=function(_0x1bc750,_0x23f442){_0x1bc750=_0x1bc750-0x0;var _0xcd51da=_0x254a[_0x1bc750];return _0xcd51da;};'use strict';var client=require(_0xa254('0x0'));exports[_0xa254('0x1')]=function(){return function(){return client[_0xa254('0x2')]('GetChatQueue',{'options':{'raw':![],'attributes':['id',_0xa254('0x3'),_0xa254('0x4'),_0xa254('0x5')],'include':[{'model':_0xa254('0x6'),'as':'Agents','attributes':['id',_0xa254('0x3'),'online',_0xa254('0x7')]}]},'log':_0xa254('0x1')});};}; \ No newline at end of file diff --git a/server/services/routing/rpc/chatQueueReport.js b/server/services/routing/rpc/chatQueueReport.js index 8b1e018..ee238ad 100644 --- a/server/services/routing/rpc/chatQueueReport.js +++ b/server/services/routing/rpc/chatQueueReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x94b1=['CreateChatQueueReport','UpdateChatQueueReport','create','Request'];(function(_0x34325b,_0x5e5afe){var _0x3da348=function(_0x3bf709){while(--_0x3bf709){_0x34325b['push'](_0x34325b['shift']());}};_0x3da348(++_0x5e5afe);}(_0x94b1,0x102));var _0x194b=function(_0x3a56d7,_0x411b14){_0x3a56d7=_0x3a56d7-0x0;var _0xbe9c7c=_0x94b1[_0x3a56d7];return _0xbe9c7c;};'use strict';var client=require('../client');exports[_0x194b('0x0')]=function(_0x5525d4){return client[_0x194b('0x1')](_0x194b('0x2'),{'body':_0x5525d4,'log':_0x194b('0x2')});};exports['update']=function(_0x13fda1,_0x3a21be){return client[_0x194b('0x1')](_0x194b('0x3'),{'body':_0x3a21be,'options':{'where':{'uniqueid':_0x13fda1},'order':[['id','DESC']],'limit':0x1},'log':_0x194b('0x3')});}; \ No newline at end of file +var _0xc818=['../client','create','Request','CreateChatQueueReport','update','UpdateChatQueueReport','DESC'];(function(_0x33944f,_0x339cdf){var _0x2ff20f=function(_0x16193b){while(--_0x16193b){_0x33944f['push'](_0x33944f['shift']());}};_0x2ff20f(++_0x339cdf);}(_0xc818,0x1e3));var _0x8c81=function(_0x415325,_0x220188){_0x415325=_0x415325-0x0;var _0x11f033=_0xc818[_0x415325];return _0x11f033;};'use strict';var client=require(_0x8c81('0x0'));exports[_0x8c81('0x1')]=function(_0x2ebf7a){return client[_0x8c81('0x2')]('CreateChatQueueReport',{'body':_0x2ebf7a,'log':_0x8c81('0x3')});};exports[_0x8c81('0x4')]=function(_0x40b19e,_0x7e329f){return client[_0x8c81('0x2')](_0x8c81('0x5'),{'body':_0x7e329f,'options':{'where':{'uniqueid':_0x40b19e},'order':[['id',_0x8c81('0x6')]],'limit':0x1},'log':'UpdateChatQueueReport'});}; \ No newline at end of file diff --git a/server/services/routing/rpc/faxInteraction.js b/server/services/routing/rpc/faxInteraction.js index c5cf690..20c167b 100644 --- a/server/services/routing/rpc/faxInteraction.js +++ b/server/services/routing/rpc/faxInteraction.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9957=['Request','AddTagsToFaxInteraction','addTagsToFaxInteraction','../client','update','UpdateFaxInteraction','updateFaxInteraction','addTags'];(function(_0x20f4fa,_0x4511d0){var _0x3ee596=function(_0x29e9d4){while(--_0x29e9d4){_0x20f4fa['push'](_0x20f4fa['shift']());}};_0x3ee596(++_0x4511d0);}(_0x9957,0x93));var _0x7995=function(_0xbca1b1,_0x33f0ce){_0xbca1b1=_0xbca1b1-0x0;var _0x4e1686=_0x9957[_0xbca1b1];return _0x4e1686;};'use strict';var client=require(_0x7995('0x0'));exports[_0x7995('0x1')]=function(_0x2722a3,_0x10a05d){return client['Request'](_0x7995('0x2'),{'body':_0x10a05d,'options':{'where':{'id':_0x2722a3}},'log':_0x7995('0x3')});};exports[_0x7995('0x4')]=function(_0x462a03,_0x576d89){return client[_0x7995('0x5')](_0x7995('0x6'),{'body':_0x576d89,'options':{'where':{'id':_0x462a03}},'log':_0x7995('0x7')});}; \ No newline at end of file +var _0x7a54=['Request','UpdateFaxInteraction','addTags','AddTagsToFaxInteraction','../client','update'];(function(_0x34bc94,_0x74f0fd){var _0xee41e7=function(_0x424111){while(--_0x424111){_0x34bc94['push'](_0x34bc94['shift']());}};_0xee41e7(++_0x74f0fd);}(_0x7a54,0x106));var _0x47a5=function(_0x35e381,_0x18ab86){_0x35e381=_0x35e381-0x0;var _0x440bf3=_0x7a54[_0x35e381];return _0x440bf3;};'use strict';var client=require(_0x47a5('0x0'));exports[_0x47a5('0x1')]=function(_0x44b31e,_0x58157c){return client[_0x47a5('0x2')](_0x47a5('0x3'),{'body':_0x58157c,'options':{'where':{'id':_0x44b31e}},'log':'updateFaxInteraction'});};exports[_0x47a5('0x4')]=function(_0x11bf85,_0x2a1a7e){return client[_0x47a5('0x2')](_0x47a5('0x5'),{'body':_0x2a1a7e,'options':{'where':{'id':_0x11bf85}},'log':'addTagsToFaxInteraction'});}; \ No newline at end of file diff --git a/server/services/routing/rpc/faxMessage.js b/server/services/routing/rpc/faxMessage.js index 1d12a18..b208a87 100644 --- a/server/services/routing/rpc/faxMessage.js +++ b/server/services/routing/rpc/faxMessage.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf573=['Request'];(function(_0x45f193,_0x155044){var _0x556d57=function(_0x2e3c80){while(--_0x2e3c80){_0x45f193['push'](_0x45f193['shift']());}};_0x556d57(++_0x155044);}(_0xf573,0x140));var _0x3f57=function(_0x22b2c4,_0x53ddc3){_0x22b2c4=_0x22b2c4-0x0;var _0x10b68b=_0xf573[_0x22b2c4];return _0x10b68b;};'use strict';var client=require('../client');exports['create']=function(_0xbcd7ac){return client[_0x3f57('0x0')]('CreateFaxMessage',{'body':_0xbcd7ac,'log':'createFaxMessage'});}; \ No newline at end of file +var _0xc035=['../client','create','Request','CreateFaxMessage'];(function(_0x3bfaae,_0x327ee8){var _0x5e2ce0=function(_0x160d10){while(--_0x160d10){_0x3bfaae['push'](_0x3bfaae['shift']());}};_0x5e2ce0(++_0x327ee8);}(_0xc035,0x90));var _0x5c03=function(_0x3b24ca,_0x22970a){_0x3b24ca=_0x3b24ca-0x0;var _0x230369=_0xc035[_0x3b24ca];return _0x230369;};'use strict';var client=require(_0x5c03('0x0'));exports[_0x5c03('0x1')]=function(_0x3b8358){return client[_0x5c03('0x2')](_0x5c03('0x3'),{'body':_0x3b8358,'log':'createFaxMessage'});}; \ No newline at end of file diff --git a/server/services/routing/rpc/faxQueue.js b/server/services/routing/rpc/faxQueue.js index b3fe6dd..3d682b6 100644 --- a/server/services/routing/rpc/faxQueue.js +++ b/server/services/routing/rpc/faxQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x479d=['GetFaxQueue','name','timeout','User','Agents','../client','getFaxQueues','Request'];(function(_0x52ec07,_0x2dc036){var _0x54d217=function(_0x24efc3){while(--_0x24efc3){_0x52ec07['push'](_0x52ec07['shift']());}};_0x54d217(++_0x2dc036);}(_0x479d,0xf5));var _0xd479=function(_0x1361c0,_0x511a8f){_0x1361c0=_0x1361c0-0x0;var _0x555c03=_0x479d[_0x1361c0];return _0x555c03;};'use strict';var client=require(_0xd479('0x0'));exports[_0xd479('0x1')]=function(){return function(){return client[_0xd479('0x2')](_0xd479('0x3'),{'options':{'raw':![],'attributes':['id',_0xd479('0x4'),_0xd479('0x5'),'strategy'],'include':[{'model':_0xd479('0x6'),'as':_0xd479('0x7'),'attributes':['id','name','online','faxPause']}]},'log':_0xd479('0x1')});};}; \ No newline at end of file +var _0x0b31=['timeout','User','Agents','name','faxPause','getFaxQueues','Request','GetFaxQueue'];(function(_0x408e8d,_0x3d4e70){var _0x2c8c9f=function(_0x5b5908){while(--_0x5b5908){_0x408e8d['push'](_0x408e8d['shift']());}};_0x2c8c9f(++_0x3d4e70);}(_0x0b31,0x85));var _0x10b3=function(_0xf9597b,_0x24440d){_0xf9597b=_0xf9597b-0x0;var _0x50dee8=_0x0b31[_0xf9597b];return _0x50dee8;};'use strict';var client=require('../client');exports[_0x10b3('0x0')]=function(){return function(){return client[_0x10b3('0x1')](_0x10b3('0x2'),{'options':{'raw':![],'attributes':['id','name',_0x10b3('0x3'),'strategy'],'include':[{'model':_0x10b3('0x4'),'as':_0x10b3('0x5'),'attributes':['id',_0x10b3('0x6'),'online',_0x10b3('0x7')]}]},'log':_0x10b3('0x0')});};}; \ No newline at end of file diff --git a/server/services/routing/rpc/faxQueueReport.js b/server/services/routing/rpc/faxQueueReport.js index ae40385..03c7d4f 100644 --- a/server/services/routing/rpc/faxQueueReport.js +++ b/server/services/routing/rpc/faxQueueReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0ccb=['create','CreateFaxQueueReport','update','Request','UpdateFaxQueueReport','../client'];(function(_0x14ddbf,_0x32c69d){var _0x20ed89=function(_0x1fe0ca){while(--_0x1fe0ca){_0x14ddbf['push'](_0x14ddbf['shift']());}};_0x20ed89(++_0x32c69d);}(_0x0ccb,0x77));var _0xb0cc=function(_0x494458,_0x9caf6){_0x494458=_0x494458-0x0;var _0x3f2ee3=_0x0ccb[_0x494458];return _0x3f2ee3;};'use strict';var client=require(_0xb0cc('0x0'));exports[_0xb0cc('0x1')]=function(_0x5d7140){return client['Request'](_0xb0cc('0x2'),{'body':_0x5d7140,'log':'CreateFaxQueueReport'});};exports[_0xb0cc('0x3')]=function(_0x200a2a,_0x24b31b){return client[_0xb0cc('0x4')](_0xb0cc('0x5'),{'body':_0x24b31b,'options':{'where':{'uniqueid':_0x200a2a},'order':[['id','DESC']],'limit':0x1},'log':_0xb0cc('0x5')});}; \ No newline at end of file +var _0x7e68=['update','UpdateFaxQueueReport','DESC','../client','create','Request','CreateFaxQueueReport'];(function(_0x19950b,_0x53d0d7){var _0x3c6b41=function(_0x3924ad){while(--_0x3924ad){_0x19950b['push'](_0x19950b['shift']());}};_0x3c6b41(++_0x53d0d7);}(_0x7e68,0x1ed));var _0x87e6=function(_0x4ac804,_0x45e2cd){_0x4ac804=_0x4ac804-0x0;var _0x1adb12=_0x7e68[_0x4ac804];return _0x1adb12;};'use strict';var client=require(_0x87e6('0x0'));exports[_0x87e6('0x1')]=function(_0xf25ca4){return client[_0x87e6('0x2')](_0x87e6('0x3'),{'body':_0xf25ca4,'log':_0x87e6('0x3')});};exports[_0x87e6('0x4')]=function(_0x4890d6,_0x308d10){return client[_0x87e6('0x2')](_0x87e6('0x5'),{'body':_0x308d10,'options':{'where':{'uniqueid':_0x4890d6},'order':[['id',_0x87e6('0x6')]],'limit':0x1},'log':_0x87e6('0x5')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/interval.js b/server/services/routing/rpc/interval.js index e9f8c86..348b7a9 100644 --- a/server/services/routing/rpc/interval.js +++ b/server/services/routing/rpc/interval.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xcba2=['GetInterval','name','Interval','Intervals','interval','getIntervals','Request'];(function(_0x2dafbe,_0x5d04de){var _0x58a45a=function(_0x50ac96){while(--_0x50ac96){_0x2dafbe['push'](_0x2dafbe['shift']());}};_0x58a45a(++_0x5d04de);}(_0xcba2,0x18e));var _0x2cba=function(_0x402bad,_0x5aabc0){_0x402bad=_0x402bad-0x0;var _0x3235c7=_0xcba2[_0x402bad];return _0x3235c7;};'use strict';var client=require('../client');exports['getIntervals']=function(){return function(){return client[_0x2cba('0x0')](_0x2cba('0x1'),{'options':{'raw':![],'where':{'IntervalId':null},'attributes':['id',_0x2cba('0x2')],'include':[{'model':_0x2cba('0x3'),'as':_0x2cba('0x4'),'attributes':['id','name',_0x2cba('0x5')]}]},'log':_0x2cba('0x6')});};}; \ No newline at end of file +var _0x4d2a=['Intervals','../client','getIntervals','Request','GetInterval','name'];(function(_0xf50820,_0x56f041){var _0x2a9b10=function(_0x33f0f4){while(--_0x33f0f4){_0xf50820['push'](_0xf50820['shift']());}};_0x2a9b10(++_0x56f041);}(_0x4d2a,0x8b));var _0xa4d2=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x4d2a[_0x3dd15e];return _0x231fd0;};'use strict';var client=require(_0xa4d2('0x0'));exports[_0xa4d2('0x1')]=function(){return function(){return client[_0xa4d2('0x2')](_0xa4d2('0x3'),{'options':{'raw':![],'where':{'IntervalId':null},'attributes':['id',_0xa4d2('0x4')],'include':[{'model':'Interval','as':_0xa4d2('0x5'),'attributes':['id',_0xa4d2('0x4'),'interval']}]},'log':'getIntervals'});};}; \ No newline at end of file diff --git a/server/services/routing/rpc/mailInteraction.js b/server/services/routing/rpc/mailInteraction.js index c25c686..47b0f8e 100644 --- a/server/services/routing/rpc/mailInteraction.js +++ b/server/services/routing/rpc/mailInteraction.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6343=['AddTagsToMailInteraction','addTagsToChatInteraction'];(function(_0x3fd51c,_0xfac138){var _0x2ebe30=function(_0x39ec6a){while(--_0x39ec6a){_0x3fd51c['push'](_0x3fd51c['shift']());}};_0x2ebe30(++_0xfac138);}(_0x6343,0x168));var _0x3634=function(_0x2d1cd1,_0x66d64c){_0x2d1cd1=_0x2d1cd1-0x0;var _0x3de596=_0x6343[_0x2d1cd1];return _0x3de596;};'use strict';var client=require('../client');exports['update']=function(_0x35bd8f,_0x26d852){return client['Request']('UpdateMailInteraction',{'body':_0x26d852,'options':{'where':{'id':_0x35bd8f}},'log':'updateMailInteraction'});};exports['addTags']=function(_0x403aba,_0x420510){return client['Request'](_0x3634('0x0'),{'body':_0x420510,'options':{'where':{'id':_0x403aba}},'log':_0x3634('0x1')});}; \ No newline at end of file +var _0x25e7=['addTagsToChatInteraction','../client','update','Request','UpdateMailInteraction','updateMailInteraction','addTags'];(function(_0x1b0a89,_0x5f4f8f){var _0x3800f0=function(_0x2765fb){while(--_0x2765fb){_0x1b0a89['push'](_0x1b0a89['shift']());}};_0x3800f0(++_0x5f4f8f);}(_0x25e7,0x1d6));var _0x725e=function(_0x3fe0fe,_0x3bdc49){_0x3fe0fe=_0x3fe0fe-0x0;var _0x5c11f4=_0x25e7[_0x3fe0fe];return _0x5c11f4;};'use strict';var client=require(_0x725e('0x0'));exports[_0x725e('0x1')]=function(_0x2752fa,_0x3fdca4){return client[_0x725e('0x2')](_0x725e('0x3'),{'body':_0x3fdca4,'options':{'where':{'id':_0x2752fa}},'log':_0x725e('0x4')});};exports[_0x725e('0x5')]=function(_0x3d7893,_0x3da706){return client['Request']('AddTagsToMailInteraction',{'body':_0x3da706,'options':{'where':{'id':_0x3d7893}},'log':_0x725e('0x6')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/mailMessage.js b/server/services/routing/rpc/mailMessage.js index 03a6fc0..6379b2d 100644 --- a/server/services/routing/rpc/mailMessage.js +++ b/server/services/routing/rpc/mailMessage.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1588=['create','createMailMessage'];(function(_0x247de3,_0x26a930){var _0x92b363=function(_0x3d4abe){while(--_0x3d4abe){_0x247de3['push'](_0x247de3['shift']());}};_0x92b363(++_0x26a930);}(_0x1588,0x1e4));var _0x8158=function(_0x2514b6,_0x5cd143){_0x2514b6=_0x2514b6-0x0;var _0xc046a2=_0x1588[_0x2514b6];return _0xc046a2;};'use strict';var client=require('../client');exports[_0x8158('0x0')]=function(_0x2e8c4e){return client['Request']('CreateMailMessage',{'body':_0x2e8c4e,'log':_0x8158('0x1')});}; \ No newline at end of file +var _0x98a1=['create','Request','createMailMessage','../client'];(function(_0x12c32b,_0x3bbc6f){var _0x721667=function(_0x5acddf){while(--_0x5acddf){_0x12c32b['push'](_0x12c32b['shift']());}};_0x721667(++_0x3bbc6f);}(_0x98a1,0xfb));var _0x198a=function(_0x500582,_0x5eb3a7){_0x500582=_0x500582-0x0;var _0x138bf5=_0x98a1[_0x500582];return _0x138bf5;};'use strict';var client=require(_0x198a('0x0'));exports[_0x198a('0x1')]=function(_0x483a69){return client[_0x198a('0x2')]('CreateMailMessage',{'body':_0x483a69,'log':_0x198a('0x3')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/mailQueue.js b/server/services/routing/rpc/mailQueue.js index d25ceb2..1d1fdac 100644 --- a/server/services/routing/rpc/mailQueue.js +++ b/server/services/routing/rpc/mailQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfb4a=['online','mailPause','../client','getMailQueues','Request','GetMailQueue','timeout','strategy','User','Agents','name'];(function(_0x2233bc,_0x5241fe){var _0x8e4746=function(_0x4d65da){while(--_0x4d65da){_0x2233bc['push'](_0x2233bc['shift']());}};_0x8e4746(++_0x5241fe);}(_0xfb4a,0xbd));var _0xafb4=function(_0x2df724,_0x411382){_0x2df724=_0x2df724-0x0;var _0x1b2504=_0xfb4a[_0x2df724];return _0x1b2504;};'use strict';var client=require(_0xafb4('0x0'));exports[_0xafb4('0x1')]=function(){return function(){return client[_0xafb4('0x2')](_0xafb4('0x3'),{'options':{'raw':![],'attributes':['id','name',_0xafb4('0x4'),_0xafb4('0x5')],'include':[{'model':_0xafb4('0x6'),'as':_0xafb4('0x7'),'attributes':['id',_0xafb4('0x8'),_0xafb4('0x9'),_0xafb4('0xa')]}]},'log':_0xafb4('0x1')});};}; \ No newline at end of file +var _0xfb1d=['timeout','strategy','User','online','getMailQueues','name'];(function(_0x8a969d,_0x339d9f){var _0x1d8dc7=function(_0x283ec0){while(--_0x283ec0){_0x8a969d['push'](_0x8a969d['shift']());}};_0x1d8dc7(++_0x339d9f);}(_0xfb1d,0x179));var _0xdfb1=function(_0x4637ec,_0x242fa9){_0x4637ec=_0x4637ec-0x0;var _0xf36c8e=_0xfb1d[_0x4637ec];return _0xf36c8e;};'use strict';var client=require('../client');exports['getMailQueues']=function(){return function(){return client['Request']('GetMailQueue',{'options':{'raw':![],'attributes':['id',_0xdfb1('0x0'),_0xdfb1('0x1'),_0xdfb1('0x2')],'include':[{'model':_0xdfb1('0x3'),'as':'Agents','attributes':['id',_0xdfb1('0x0'),_0xdfb1('0x4'),'mailPause']}]},'log':_0xdfb1('0x5')});};}; \ No newline at end of file diff --git a/server/services/routing/rpc/mailQueueReport.js b/server/services/routing/rpc/mailQueueReport.js index 0f0f389..d52ffaf 100644 --- a/server/services/routing/rpc/mailQueueReport.js +++ b/server/services/routing/rpc/mailQueueReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9344=['../client','Request','CreateMailQueueReport','update','UpdateMailQueueReport','DESC'];(function(_0x42245d,_0x51758f){var _0x4b211a=function(_0x2634e){while(--_0x2634e){_0x42245d['push'](_0x42245d['shift']());}};_0x4b211a(++_0x51758f);}(_0x9344,0x180));var _0x4934=function(_0x3a6f68,_0xc8e6c9){_0x3a6f68=_0x3a6f68-0x0;var _0x21a1ad=_0x9344[_0x3a6f68];return _0x21a1ad;};'use strict';var client=require(_0x4934('0x0'));exports['create']=function(_0x429cb2){return client[_0x4934('0x1')](_0x4934('0x2'),{'body':_0x429cb2,'log':_0x4934('0x2')});};exports[_0x4934('0x3')]=function(_0x553600,_0x2a2dbf){return client[_0x4934('0x1')](_0x4934('0x4'),{'body':_0x2a2dbf,'options':{'where':{'uniqueid':_0x553600},'order':[['id',_0x4934('0x5')]],'limit':0x1},'log':_0x4934('0x4')});}; \ No newline at end of file +var _0xcab2=['UpdateMailQueueReport','DESC','../client','create','CreateMailQueueReport','Request'];(function(_0x6fae04,_0x33078d){var _0x546f87=function(_0xf771a0){while(--_0xf771a0){_0x6fae04['push'](_0x6fae04['shift']());}};_0x546f87(++_0x33078d);}(_0xcab2,0x17c));var _0x2cab=function(_0x2d8a22,_0x4622c1){_0x2d8a22=_0x2d8a22-0x0;var _0x362077=_0xcab2[_0x2d8a22];return _0x362077;};'use strict';var client=require(_0x2cab('0x0'));exports[_0x2cab('0x1')]=function(_0x1708d1){return client['Request'](_0x2cab('0x2'),{'body':_0x1708d1,'log':_0x2cab('0x2')});};exports['update']=function(_0x1caa4f,_0x34ae45){return client[_0x2cab('0x3')](_0x2cab('0x4'),{'body':_0x34ae45,'options':{'where':{'uniqueid':_0x1caa4f},'order':[['id',_0x2cab('0x5')]],'limit':0x1},'log':'UpdateMailQueueReport'});}; \ No newline at end of file diff --git a/server/services/routing/rpc/openchannelInteraction.js b/server/services/routing/rpc/openchannelInteraction.js index 2720ad8..ae11531 100644 --- a/server/services/routing/rpc/openchannelInteraction.js +++ b/server/services/routing/rpc/openchannelInteraction.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x97c8=['update','Request','updateOpenchannelInteraction','../client'];(function(_0x2a16aa,_0x5ddf39){var _0x3d7e0d=function(_0x3b0096){while(--_0x3b0096){_0x2a16aa['push'](_0x2a16aa['shift']());}};_0x3d7e0d(++_0x5ddf39);}(_0x97c8,0xeb));var _0x897c=function(_0x55c3d9,_0x3bf75c){_0x55c3d9=_0x55c3d9-0x0;var _0x19fd97=_0x97c8[_0x55c3d9];return _0x19fd97;};'use strict';var client=require(_0x897c('0x0'));exports[_0x897c('0x1')]=function(_0x40902d,_0x2206ab){return client[_0x897c('0x2')]('UpdateOpenchannelInteraction',{'body':_0x2206ab,'options':{'where':{'id':_0x40902d}},'log':_0x897c('0x3')});};exports['addTags']=function(_0x4be240,_0x2b7fbb){return client['Request']('AddTagsToOpenchannelInteraction',{'body':_0x2b7fbb,'options':{'where':{'id':_0x4be240}},'log':'addTagsToChatInteraction'});}; \ No newline at end of file +var _0x7544=['../client','update','Request','UpdateOpenchannelInteraction','addTags','AddTagsToOpenchannelInteraction','addTagsToChatInteraction'];(function(_0x2064e5,_0x4f6fa2){var _0x21a233=function(_0x1b2491){while(--_0x1b2491){_0x2064e5['push'](_0x2064e5['shift']());}};_0x21a233(++_0x4f6fa2);}(_0x7544,0x18f));var _0x4754=function(_0x487282,_0x4aff75){_0x487282=_0x487282-0x0;var _0x35fd0e=_0x7544[_0x487282];return _0x35fd0e;};'use strict';var client=require(_0x4754('0x0'));exports[_0x4754('0x1')]=function(_0x363500,_0x2e15d2){return client[_0x4754('0x2')](_0x4754('0x3'),{'body':_0x2e15d2,'options':{'where':{'id':_0x363500}},'log':'updateOpenchannelInteraction'});};exports[_0x4754('0x4')]=function(_0x1633a7,_0x4197ee){return client[_0x4754('0x2')](_0x4754('0x5'),{'body':_0x4197ee,'options':{'where':{'id':_0x1633a7}},'log':_0x4754('0x6')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/openchannelMessage.js b/server/services/routing/rpc/openchannelMessage.js index db01e45..64b08b6 100644 --- a/server/services/routing/rpc/openchannelMessage.js +++ b/server/services/routing/rpc/openchannelMessage.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xef0e=['createOpenchannelMessage','Request','CreateOpenchannelMessage'];(function(_0x397e5f,_0x454c8f){var _0x5302b8=function(_0x1a29ef){while(--_0x1a29ef){_0x397e5f['push'](_0x397e5f['shift']());}};_0x5302b8(++_0x454c8f);}(_0xef0e,0xa9));var _0xeef0=function(_0x4e676e,_0x2a7c6d){_0x4e676e=_0x4e676e-0x0;var _0x336a3c=_0xef0e[_0x4e676e];return _0x336a3c;};'use strict';var client=require('../client');exports['create']=function(_0x303c27){return client[_0xeef0('0x0')](_0xeef0('0x1'),{'body':_0x303c27,'log':_0xeef0('0x2')});}; \ No newline at end of file +var _0xcafb=['createOpenchannelMessage','../client','create'];(function(_0x19e35c,_0x29cd1e){var _0x3e1fe8=function(_0x17258b){while(--_0x17258b){_0x19e35c['push'](_0x19e35c['shift']());}};_0x3e1fe8(++_0x29cd1e);}(_0xcafb,0xac));var _0xbcaf=function(_0x1e9a22,_0xc07f9a){_0x1e9a22=_0x1e9a22-0x0;var _0x229a17=_0xcafb[_0x1e9a22];return _0x229a17;};'use strict';var client=require(_0xbcaf('0x0'));exports[_0xbcaf('0x1')]=function(_0x2a7832){return client['Request']('CreateOpenchannelMessage',{'body':_0x2a7832,'log':_0xbcaf('0x2')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/openchannelQueue.js b/server/services/routing/rpc/openchannelQueue.js index 80f5103..2fbcda1 100644 --- a/server/services/routing/rpc/openchannelQueue.js +++ b/server/services/routing/rpc/openchannelQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9cb6=['getOpenchannelQueues','Request','GetOpenchannelQueue','name','User','Agents','openchannelPause'];(function(_0x5e0416,_0x541afd){var _0x3dfc48=function(_0x5a4dcc){while(--_0x5a4dcc){_0x5e0416['push'](_0x5e0416['shift']());}};_0x3dfc48(++_0x541afd);}(_0x9cb6,0x9a));var _0x69cb=function(_0x196c23,_0x11d3a4){_0x196c23=_0x196c23-0x0;var _0x399432=_0x9cb6[_0x196c23];return _0x399432;};'use strict';var client=require('../client');exports[_0x69cb('0x0')]=function(){return function(){return client[_0x69cb('0x1')](_0x69cb('0x2'),{'options':{'raw':![],'attributes':['id',_0x69cb('0x3'),'timeout','strategy'],'include':[{'model':_0x69cb('0x4'),'as':_0x69cb('0x5'),'attributes':['id',_0x69cb('0x3'),'online',_0x69cb('0x6')]}]},'log':_0x69cb('0x0')});};}; \ No newline at end of file +var _0x4c71=['online','openchannelPause','../client','getOpenchannelQueues','Request','GetOpenchannelQueue','name','timeout','strategy','User'];(function(_0x323591,_0x518650){var _0x423982=function(_0x1b7a15){while(--_0x1b7a15){_0x323591['push'](_0x323591['shift']());}};_0x423982(++_0x518650);}(_0x4c71,0x138));var _0x14c7=function(_0x3511d3,_0x4107ae){_0x3511d3=_0x3511d3-0x0;var _0x5d6321=_0x4c71[_0x3511d3];return _0x5d6321;};'use strict';var client=require(_0x14c7('0x0'));exports[_0x14c7('0x1')]=function(){return function(){return client[_0x14c7('0x2')](_0x14c7('0x3'),{'options':{'raw':![],'attributes':['id',_0x14c7('0x4'),_0x14c7('0x5'),_0x14c7('0x6')],'include':[{'model':_0x14c7('0x7'),'as':'Agents','attributes':['id','name',_0x14c7('0x8'),_0x14c7('0x9')]}]},'log':_0x14c7('0x1')});};}; \ No newline at end of file diff --git a/server/services/routing/rpc/openchannelQueueReport.js b/server/services/routing/rpc/openchannelQueueReport.js index 8d35ef7..ffb4e50 100644 --- a/server/services/routing/rpc/openchannelQueueReport.js +++ b/server/services/routing/rpc/openchannelQueueReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2dfb=['../client','create','Request','CreateOpenchannelQueueReport','update','UpdateOpenchannelQueueReport'];(function(_0x421859,_0x2f77fc){var _0x3f8d98=function(_0x21dfe8){while(--_0x21dfe8){_0x421859['push'](_0x421859['shift']());}};_0x3f8d98(++_0x2f77fc);}(_0x2dfb,0x10e));var _0xb2df=function(_0xa41f48,_0x3c110b){_0xa41f48=_0xa41f48-0x0;var _0x423a4a=_0x2dfb[_0xa41f48];return _0x423a4a;};'use strict';var client=require(_0xb2df('0x0'));exports[_0xb2df('0x1')]=function(_0x51686f){return client[_0xb2df('0x2')]('CreateOpenchannelQueueReport',{'body':_0x51686f,'log':_0xb2df('0x3')});};exports[_0xb2df('0x4')]=function(_0x31d6fe,_0x5926e9){return client['Request'](_0xb2df('0x5'),{'body':_0x5926e9,'options':{'where':{'uniqueid':_0x31d6fe},'order':[['id','DESC']],'limit':0x1},'log':_0xb2df('0x5')});}; \ No newline at end of file +var _0x95c0=['UpdateOpenchannelQueueReport','DESC','../client','Request','CreateOpenchannelQueueReport','update'];(function(_0x140b08,_0x499ded){var _0x37d020=function(_0x58a6ed){while(--_0x58a6ed){_0x140b08['push'](_0x140b08['shift']());}};_0x37d020(++_0x499ded);}(_0x95c0,0x74));var _0x095c=function(_0x5bbb0d,_0x462759){_0x5bbb0d=_0x5bbb0d-0x0;var _0x381c85=_0x95c0[_0x5bbb0d];return _0x381c85;};'use strict';var client=require(_0x095c('0x0'));exports['create']=function(_0x115c99){return client[_0x095c('0x1')]('CreateOpenchannelQueueReport',{'body':_0x115c99,'log':_0x095c('0x2')});};exports[_0x095c('0x3')]=function(_0xccdf35,_0x2701c0){return client['Request'](_0x095c('0x4'),{'body':_0x2701c0,'options':{'where':{'uniqueid':_0xccdf35},'order':[['id',_0x095c('0x5')]],'limit':0x1},'log':_0x095c('0x4')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/smsInteraction.js b/server/services/routing/rpc/smsInteraction.js index a514f51..6d03909 100644 --- a/server/services/routing/rpc/smsInteraction.js +++ b/server/services/routing/rpc/smsInteraction.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3c94=['addTags','AddTagsToSmsInteraction','../client','update','Request','UpdateSmsInteraction','updateSmsInteraction'];(function(_0x1b6c6d,_0x2983b0){var _0x290d9d=function(_0x5b9779){while(--_0x5b9779){_0x1b6c6d['push'](_0x1b6c6d['shift']());}};_0x290d9d(++_0x2983b0);}(_0x3c94,0xcd));var _0x43c9=function(_0x22663b,_0xc8c6e3){_0x22663b=_0x22663b-0x0;var _0x310d0a=_0x3c94[_0x22663b];return _0x310d0a;};'use strict';var client=require(_0x43c9('0x0'));exports[_0x43c9('0x1')]=function(_0x3f7e06,_0x20116b){return client[_0x43c9('0x2')](_0x43c9('0x3'),{'body':_0x20116b,'options':{'where':{'id':_0x3f7e06}},'log':_0x43c9('0x4')});};exports[_0x43c9('0x5')]=function(_0x170a0d,_0x44fc3){return client[_0x43c9('0x2')](_0x43c9('0x6'),{'body':_0x44fc3,'options':{'where':{'id':_0x170a0d}},'log':'addTagsToSmsInteraction'});}; \ No newline at end of file +var _0x4b47=['UpdateSmsInteraction','updateSmsInteraction','addTags','AddTagsToSmsInteraction','../client','Request'];(function(_0x4d2ac4,_0x3da692){var _0x343350=function(_0xbfa61d){while(--_0xbfa61d){_0x4d2ac4['push'](_0x4d2ac4['shift']());}};_0x343350(++_0x3da692);}(_0x4b47,0x1b4));var _0x74b4=function(_0x5c13d9,_0x4e23da){_0x5c13d9=_0x5c13d9-0x0;var _0x12a1c5=_0x4b47[_0x5c13d9];return _0x12a1c5;};'use strict';var client=require(_0x74b4('0x0'));exports['update']=function(_0xf50408,_0x2542ff){return client[_0x74b4('0x1')](_0x74b4('0x2'),{'body':_0x2542ff,'options':{'where':{'id':_0xf50408}},'log':_0x74b4('0x3')});};exports[_0x74b4('0x4')]=function(_0x565f6b,_0x4ed4fe){return client[_0x74b4('0x1')](_0x74b4('0x5'),{'body':_0x4ed4fe,'options':{'where':{'id':_0x565f6b}},'log':'addTagsToSmsInteraction'});}; \ No newline at end of file diff --git a/server/services/routing/rpc/smsMessage.js b/server/services/routing/rpc/smsMessage.js index 0c2abbb..38d266f 100644 --- a/server/services/routing/rpc/smsMessage.js +++ b/server/services/routing/rpc/smsMessage.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf2e3=['../client','CreateSmsMessage','createSmsMessage'];(function(_0x2de0a7,_0x38d3e7){var _0x429437=function(_0x23c148){while(--_0x23c148){_0x2de0a7['push'](_0x2de0a7['shift']());}};_0x429437(++_0x38d3e7);}(_0xf2e3,0xc9));var _0x3f2e=function(_0x220f3f,_0x11c540){_0x220f3f=_0x220f3f-0x0;var _0x1f170e=_0xf2e3[_0x220f3f];return _0x1f170e;};'use strict';var client=require(_0x3f2e('0x0'));exports['create']=function(_0xe3540b){return client['Request'](_0x3f2e('0x1'),{'body':_0xe3540b,'log':_0x3f2e('0x2')});}; \ No newline at end of file +var _0x212e=['../client','Request'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x212e,0xb2));var _0xe212=function(_0x4fbc20,_0x33bbc4){_0x4fbc20=_0x4fbc20-0x0;var _0x419740=_0x212e[_0x4fbc20];return _0x419740;};'use strict';var client=require(_0xe212('0x0'));exports['create']=function(_0x16a87d){return client[_0xe212('0x1')]('CreateSmsMessage',{'body':_0x16a87d,'log':'createSmsMessage'});}; \ No newline at end of file diff --git a/server/services/routing/rpc/smsQueue.js b/server/services/routing/rpc/smsQueue.js index d344c31..3d9988d 100644 --- a/server/services/routing/rpc/smsQueue.js +++ b/server/services/routing/rpc/smsQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x70e0=['User','Agents','online','../client','getSmsQueues','Request','timeout','strategy'];(function(_0x2e8863,_0x7f16e1){var _0xbc7261=function(_0x1acb56){while(--_0x1acb56){_0x2e8863['push'](_0x2e8863['shift']());}};_0xbc7261(++_0x7f16e1);}(_0x70e0,0x17b));var _0x070e=function(_0x246fcc,_0x50f432){_0x246fcc=_0x246fcc-0x0;var _0x18b3ca=_0x70e0[_0x246fcc];return _0x18b3ca;};'use strict';var client=require(_0x070e('0x0'));exports[_0x070e('0x1')]=function(){return function(){return client[_0x070e('0x2')]('GetSmsQueue',{'options':{'raw':![],'attributes':['id','name',_0x070e('0x3'),_0x070e('0x4')],'include':[{'model':_0x070e('0x5'),'as':_0x070e('0x6'),'attributes':['id','name',_0x070e('0x7'),'smsPause']}]},'log':_0x070e('0x1')});};}; \ No newline at end of file +var _0x70e0=['User','Agents','online','../client','getSmsQueues','Request','timeout','strategy'];(function(_0x416b37,_0x19980a){var _0x108ec3=function(_0x556693){while(--_0x556693){_0x416b37['push'](_0x416b37['shift']());}};_0x108ec3(++_0x19980a);}(_0x70e0,0x17b));var _0x070e=function(_0x1f1a45,_0xe4ea78){_0x1f1a45=_0x1f1a45-0x0;var _0x3f91=_0x70e0[_0x1f1a45];return _0x3f91;};'use strict';var client=require(_0x070e('0x0'));exports[_0x070e('0x1')]=function(){return function(){return client[_0x070e('0x2')]('GetSmsQueue',{'options':{'raw':![],'attributes':['id','name',_0x070e('0x3'),_0x070e('0x4')],'include':[{'model':_0x070e('0x5'),'as':_0x070e('0x6'),'attributes':['id','name',_0x070e('0x7'),'smsPause']}]},'log':_0x070e('0x1')});};}; \ No newline at end of file diff --git a/server/services/routing/rpc/smsQueueReport.js b/server/services/routing/rpc/smsQueueReport.js index 71553b7..0bc4674 100644 --- a/server/services/routing/rpc/smsQueueReport.js +++ b/server/services/routing/rpc/smsQueueReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xedd9=['create','Request','CreateSmsQueueReport','update','UpdateSmsQueueReport','DESC'];(function(_0xef4cf0,_0x16c9c3){var _0x497ad2=function(_0xce63d4){while(--_0xce63d4){_0xef4cf0['push'](_0xef4cf0['shift']());}};_0x497ad2(++_0x16c9c3);}(_0xedd9,0xfc));var _0x9edd=function(_0x196628,_0x2ea0d8){_0x196628=_0x196628-0x0;var _0x22a041=_0xedd9[_0x196628];return _0x22a041;};'use strict';var client=require('../client');exports[_0x9edd('0x0')]=function(_0x2d7989){return client[_0x9edd('0x1')](_0x9edd('0x2'),{'body':_0x2d7989,'log':_0x9edd('0x2')});};exports[_0x9edd('0x3')]=function(_0x3e6d3a,_0x36b53f){return client['Request'](_0x9edd('0x4'),{'body':_0x36b53f,'options':{'where':{'uniqueid':_0x3e6d3a},'order':[['id',_0x9edd('0x5')]],'limit':0x1},'log':_0x9edd('0x4')});}; \ No newline at end of file +var _0x34e8=['create','Request','CreateSmsQueueReport','update','UpdateSmsQueueReport','DESC','../client'];(function(_0x1a1b7a,_0x417000){var _0x16e93b=function(_0x1d8253){while(--_0x1d8253){_0x1a1b7a['push'](_0x1a1b7a['shift']());}};_0x16e93b(++_0x417000);}(_0x34e8,0x12c));var _0x834e=function(_0x2ac02e,_0x462fff){_0x2ac02e=_0x2ac02e-0x0;var _0x4caa08=_0x34e8[_0x2ac02e];return _0x4caa08;};'use strict';var client=require(_0x834e('0x0'));exports[_0x834e('0x1')]=function(_0x8b339){return client[_0x834e('0x2')]('CreateSmsQueueReport',{'body':_0x8b339,'log':_0x834e('0x3')});};exports[_0x834e('0x4')]=function(_0x472111,_0x31bf20){return client[_0x834e('0x2')](_0x834e('0x5'),{'body':_0x31bf20,'options':{'where':{'uniqueid':_0x472111},'order':[['id',_0x834e('0x6')]],'limit':0x1},'log':'UpdateSmsQueueReport'});}; \ No newline at end of file diff --git a/server/services/routing/rpc/user.js b/server/services/routing/rpc/user.js index 1112603..7c21212 100644 --- a/server/services/routing/rpc/user.js +++ b/server/services/routing/rpc/user.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['name','pauseType','lastPauseAt','voicePause','chatPause','mailPause','smsPause','whatsappPause','openchannelPause','faxCapacity','openchannelCapacity','../client','getAgents','Request'];(function(_0x1c2845,_0x2bd014){var _0x17bb6f=function(_0x33d9f2){while(--_0x33d9f2){_0x1c2845['push'](_0x1c2845['shift']());}};_0x17bb6f(++_0x2bd014);}(_0xa9e0,0x123));var _0x0a9e=function(_0x110c3d,_0x12ee06){_0x110c3d=_0x110c3d-0x0;var _0x226d67=_0xa9e0[_0x110c3d];return _0x226d67;};'use strict';var client=require(_0x0a9e('0x0'));exports[_0x0a9e('0x1')]=function(){return function(){return client[_0x0a9e('0x2')]('GetUser',{'options':{'raw':!![],'where':{'role':'agent'},'attributes':['id',_0x0a9e('0x3'),'online',_0x0a9e('0x4'),_0x0a9e('0x5'),_0x0a9e('0x6'),_0x0a9e('0x7'),_0x0a9e('0x8'),'faxPause',_0x0a9e('0x9'),_0x0a9e('0xa'),_0x0a9e('0xb'),'chatCapacity','mailCapacity',_0x0a9e('0xc'),'smsCapacity','whatsappCapacity',_0x0a9e('0xd')]},'log':_0x0a9e('0x1')});};}; \ No newline at end of file +var _0xa9e0=['name','pauseType','lastPauseAt','voicePause','chatPause','mailPause','smsPause','whatsappPause','openchannelPause','faxCapacity','openchannelCapacity','../client','getAgents','Request'];(function(_0x3dfce0,_0x1d93e6){var _0x3880e5=function(_0xf03062){while(--_0xf03062){_0x3dfce0['push'](_0x3dfce0['shift']());}};_0x3880e5(++_0x1d93e6);}(_0xa9e0,0x123));var _0x0a9e=function(_0x102e37,_0x14a181){_0x102e37=_0x102e37-0x0;var _0x35a07c=_0xa9e0[_0x102e37];return _0x35a07c;};'use strict';var client=require(_0x0a9e('0x0'));exports[_0x0a9e('0x1')]=function(){return function(){return client[_0x0a9e('0x2')]('GetUser',{'options':{'raw':!![],'where':{'role':'agent'},'attributes':['id',_0x0a9e('0x3'),'online',_0x0a9e('0x4'),_0x0a9e('0x5'),_0x0a9e('0x6'),_0x0a9e('0x7'),_0x0a9e('0x8'),'faxPause',_0x0a9e('0x9'),_0x0a9e('0xa'),_0x0a9e('0xb'),'chatCapacity','mailCapacity',_0x0a9e('0xc'),'smsCapacity','whatsappCapacity',_0x0a9e('0xd')]},'log':_0x0a9e('0x1')});};}; \ No newline at end of file diff --git a/server/services/routing/rpc/whatsappInteraction.js b/server/services/routing/rpc/whatsappInteraction.js index dfc5c24..96063cc 100644 --- a/server/services/routing/rpc/whatsappInteraction.js +++ b/server/services/routing/rpc/whatsappInteraction.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6eec=['updateWhatsappInteraction','Request','AddTagsToWhatsappInteraction','addTagsToWhatsappInteraction','../client','update','UpdateWhatsappInteraction'];(function(_0x4b369d,_0x265eb8){var _0x571a98=function(_0x56341a){while(--_0x56341a){_0x4b369d['push'](_0x4b369d['shift']());}};_0x571a98(++_0x265eb8);}(_0x6eec,0x1e0));var _0xc6ee=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x6eec[_0x3dd15e];return _0x231fd0;};'use strict';var client=require(_0xc6ee('0x0'));exports[_0xc6ee('0x1')]=function(_0xfde252,_0x28512e){return client['Request'](_0xc6ee('0x2'),{'body':_0x28512e,'options':{'where':{'id':_0xfde252}},'log':_0xc6ee('0x3')});};exports['addTags']=function(_0x63587e,_0x26ee43){return client[_0xc6ee('0x4')](_0xc6ee('0x5'),{'body':_0x26ee43,'options':{'where':{'id':_0x63587e}},'log':_0xc6ee('0x6')});}; \ No newline at end of file +var _0x0618=['Request','addTags','AddTagsToWhatsappInteraction','addTagsToWhatsappInteraction','../client','update'];(function(_0x555e89,_0x13f902){var _0x392854=function(_0x27383b){while(--_0x27383b){_0x555e89['push'](_0x555e89['shift']());}};_0x392854(++_0x13f902);}(_0x0618,0x1c6));var _0x8061=function(_0x322a0a,_0x41ce19){_0x322a0a=_0x322a0a-0x0;var _0x107cac=_0x0618[_0x322a0a];return _0x107cac;};'use strict';var client=require(_0x8061('0x0'));exports[_0x8061('0x1')]=function(_0x4e65f1,_0x973865){return client[_0x8061('0x2')]('UpdateWhatsappInteraction',{'body':_0x973865,'options':{'where':{'id':_0x4e65f1}},'log':'updateWhatsappInteraction'});};exports[_0x8061('0x3')]=function(_0x6aff35,_0x382b13){return client[_0x8061('0x2')](_0x8061('0x4'),{'body':_0x382b13,'options':{'where':{'id':_0x6aff35}},'log':_0x8061('0x5')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/whatsappMessage.js b/server/services/routing/rpc/whatsappMessage.js index 91406be..5a56e7c 100644 --- a/server/services/routing/rpc/whatsappMessage.js +++ b/server/services/routing/rpc/whatsappMessage.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xdffc=['CreateWhatsappMessage','../client','create','Request'];(function(_0x1f79e4,_0x562fe1){var _0x42c5bf=function(_0x6345c5){while(--_0x6345c5){_0x1f79e4['push'](_0x1f79e4['shift']());}};_0x42c5bf(++_0x562fe1);}(_0xdffc,0x75));var _0xcdff=function(_0x329f49,_0x49b692){_0x329f49=_0x329f49-0x0;var _0x314491=_0xdffc[_0x329f49];return _0x314491;};'use strict';var client=require(_0xcdff('0x0'));exports[_0xcdff('0x1')]=function(_0x47ce92){return client[_0xcdff('0x2')](_0xcdff('0x3'),{'body':_0x47ce92,'log':'createWhatsappMessage'});}; \ No newline at end of file +var _0x9838=['createWhatsappMessage','../client','Request','CreateWhatsappMessage'];(function(_0x1b50b3,_0x248adf){var _0x15b077=function(_0x10275e){while(--_0x10275e){_0x1b50b3['push'](_0x1b50b3['shift']());}};_0x15b077(++_0x248adf);}(_0x9838,0x99));var _0x8983=function(_0x5ad076,_0x34b06d){_0x5ad076=_0x5ad076-0x0;var _0x1da03d=_0x9838[_0x5ad076];return _0x1da03d;};'use strict';var client=require(_0x8983('0x0'));exports['create']=function(_0x3e3236){return client[_0x8983('0x1')](_0x8983('0x2'),{'body':_0x3e3236,'log':_0x8983('0x3')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/whatsappQueue.js b/server/services/routing/rpc/whatsappQueue.js index ca87510..c4b54b0 100644 --- a/server/services/routing/rpc/whatsappQueue.js +++ b/server/services/routing/rpc/whatsappQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1458=['whatsappPause','../client','getWhatsappQueues','Request','timeout','strategy','User','Agents','name','online'];(function(_0x33032e,_0x31411a){var _0x13316b=function(_0x2fb049){while(--_0x2fb049){_0x33032e['push'](_0x33032e['shift']());}};_0x13316b(++_0x31411a);}(_0x1458,0x14b));var _0x8145=function(_0x172e2a,_0x1addf7){_0x172e2a=_0x172e2a-0x0;var _0xa5c441=_0x1458[_0x172e2a];return _0xa5c441;};'use strict';var client=require(_0x8145('0x0'));exports[_0x8145('0x1')]=function(){return function(){return client[_0x8145('0x2')]('GetWhatsappQueue',{'options':{'raw':![],'attributes':['id','name',_0x8145('0x3'),_0x8145('0x4')],'include':[{'model':_0x8145('0x5'),'as':_0x8145('0x6'),'attributes':['id',_0x8145('0x7'),_0x8145('0x8'),_0x8145('0x9')]}]},'log':_0x8145('0x1')});};}; \ No newline at end of file +var _0x0fa4=['getWhatsappQueues','Request','GetWhatsappQueue','name','timeout','strategy','User','Agents','online','../client'];(function(_0x456726,_0x4f3e48){var _0x2e5d50=function(_0x202c7a){while(--_0x202c7a){_0x456726['push'](_0x456726['shift']());}};_0x2e5d50(++_0x4f3e48);}(_0x0fa4,0xbd));var _0x40fa=function(_0x2da6ad,_0x2524fd){_0x2da6ad=_0x2da6ad-0x0;var _0x4b5ce9=_0x0fa4[_0x2da6ad];return _0x4b5ce9;};'use strict';var client=require(_0x40fa('0x0'));exports[_0x40fa('0x1')]=function(){return function(){return client[_0x40fa('0x2')](_0x40fa('0x3'),{'options':{'raw':![],'attributes':['id',_0x40fa('0x4'),_0x40fa('0x5'),_0x40fa('0x6')],'include':[{'model':_0x40fa('0x7'),'as':_0x40fa('0x8'),'attributes':['id',_0x40fa('0x4'),_0x40fa('0x9'),'whatsappPause']}]},'log':_0x40fa('0x1')});};}; \ No newline at end of file diff --git a/server/services/routing/rpc/whatsappQueueReport.js b/server/services/routing/rpc/whatsappQueueReport.js index d08722f..8184ba0 100644 --- a/server/services/routing/rpc/whatsappQueueReport.js +++ b/server/services/routing/rpc/whatsappQueueReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3b53=['../client','create','Request','CreateWhatsappQueueReport','update','UpdateWhatsappQueueReport','DESC'];(function(_0x179b80,_0x440291){var _0x1e8d03=function(_0x466a71){while(--_0x466a71){_0x179b80['push'](_0x179b80['shift']());}};_0x1e8d03(++_0x440291);}(_0x3b53,0x165));var _0x33b5=function(_0x4a9fb1,_0x273043){_0x4a9fb1=_0x4a9fb1-0x0;var _0x348672=_0x3b53[_0x4a9fb1];return _0x348672;};'use strict';var client=require(_0x33b5('0x0'));exports[_0x33b5('0x1')]=function(_0x4bb404){return client[_0x33b5('0x2')](_0x33b5('0x3'),{'body':_0x4bb404,'log':_0x33b5('0x3')});};exports[_0x33b5('0x4')]=function(_0x43a815,_0x4c5132){return client['Request'](_0x33b5('0x5'),{'body':_0x4c5132,'options':{'where':{'uniqueid':_0x43a815},'order':[['id',_0x33b5('0x6')]],'limit':0x1},'log':_0x33b5('0x5')});}; \ No newline at end of file +var _0x5209=['update','UpdateWhatsappQueueReport','DESC','create','Request','CreateWhatsappQueueReport'];(function(_0xa7350d,_0x230927){var _0x2c640b=function(_0x1c0eb5){while(--_0x1c0eb5){_0xa7350d['push'](_0xa7350d['shift']());}};_0x2c640b(++_0x230927);}(_0x5209,0x13b));var _0x9520=function(_0x2fb704,_0x322d48){_0x2fb704=_0x2fb704-0x0;var _0x10cdfd=_0x5209[_0x2fb704];return _0x10cdfd;};'use strict';var client=require('../client');exports[_0x9520('0x0')]=function(_0x5e3367){return client[_0x9520('0x1')](_0x9520('0x2'),{'body':_0x5e3367,'log':_0x9520('0x2')});};exports[_0x9520('0x3')]=function(_0x108b87,_0x325492){return client['Request'](_0x9520('0x4'),{'body':_0x325492,'options':{'where':{'uniqueid':_0x108b87},'order':[['id',_0x9520('0x5')]],'limit':0x1},'log':_0x9520('0x4')});}; \ No newline at end of file diff --git a/server/services/routing/server/applications/agent.js b/server/services/routing/server/applications/agent.js index 53552e5..2bc2e9c 100644 --- a/server/services/routing/server/applications/agent.js +++ b/server/services/routing/server/applications/agent.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xdf07=['timeout','atimeout','channel','START:%s','end','[%s][AGENT]\x20ROUTING\x20STOPPED','rules','complete','[%s][AGENT]\x20ROUTING\x20END','next','agent','[%s][AGENT]\x20agent\x20not\x20found\x20%s','log','validate','lodash','util','../../../../config/logger','routing','./strategy','string','name\x20is\x20a\x20string\x20and\x20it\x20is\x20required','number','timeout\x20is\x20a\x20number','info','format','[%s][AGENT][NAME:%s][STATUS:%s]','name','toLowerCase','consequence','error','map','join','stop','find','agents'];(function(_0x15b8ed,_0x27dd30){var _0x2f53a3=function(_0x46a5d9){while(--_0x46a5d9){_0x15b8ed['push'](_0x15b8ed['shift']());}};_0x2f53a3(++_0x27dd30);}(_0xdf07,0x125));var _0x7df0=function(_0x1fae6d,_0x3c9a2e){_0x1fae6d=_0x1fae6d-0x0;var _0x29bb68=_0xdf07[_0x1fae6d];return _0x29bb68;};'use strict';var schema=require(_0x7df0('0x0'));var _=require(_0x7df0('0x1'));var util=require(_0x7df0('0x2'));var seqqueue=require('seq-queue');var logger=require(_0x7df0('0x3'))(_0x7df0('0x4'));var strategy=require(_0x7df0('0x5'));var queue=schema({'name':{'type':_0x7df0('0x6'),'required':!![],'message':_0x7df0('0x7')},'timeout':{'type':_0x7df0('0x8'),'message':_0x7df0('0x9')}});function writeLog(_0x2fcdf4,_0x3a7c91,_0x44f800){return logger[_0x7df0('0xa')](util[_0x7df0('0xb')](_0x7df0('0xc'),_0x2fcdf4,_0x3a7c91['name'],_0x44f800));}function handleFindAgent(_0xefc98d){return function(_0x20c576){return _0x20c576[_0x7df0('0xd')][_0x7df0('0xe')]()===_0xefc98d['toLowerCase']();};}exports[_0x7df0('0xf')]=function(_0x1c50f7,_0x37e4df,_0x56baba,_0x1f7053){return function(_0x1c5072){try{var _0x375f4e={'name':_0x37e4df[0x0],'timeout':_0x37e4df[0x1]};var _0x297e1f=queue[_0x7df0('0x0')](_0x375f4e,{'typecast':!![]});if(_0x297e1f['length']){logger[_0x7df0('0x10')]('[%s][AGENT]\x20%s',_0x1c50f7,_[_0x7df0('0x11')](_0x297e1f,'message')[_0x7df0('0x12')](',\x20'));_0x1c5072[_0x7df0('0x13')]();}else{var _0x287f02=_[_0x7df0('0x14')](_0x56baba[_0x7df0('0x15')],handleFindAgent(_0x375f4e['name']));if(_0x287f02){var _0x4ad1d0=(_0x375f4e[_0x7df0('0x16')]||0xa)*0x3e8;var _0x3c4946,_0x5dbe2d;var _0x186cb0=seqqueue['createQueue'](_0x4ad1d0);_0x186cb0['id']=_0x1c50f7;_0x186cb0[_0x7df0('0x17')]=_0x4ad1d0;_0x186cb0[_0x7df0('0x18')]=_0x1f7053[_0x7df0('0x18')];writeLog(_0x1c50f7,_0x287f02,util[_0x7df0('0xb')](_0x7df0('0x19'),_0x4ad1d0));_0x56baba['rules'][_0x1c50f7]['on'](_0x7df0('0x1a'),function(){logger['info'](_0x7df0('0x1b'),_0x1c50f7);clearTimeout(_0x5dbe2d);_0x5dbe2d=undefined;_0x186cb0['close']();if(_0x56baba[_0x7df0('0x1c')][_0x1c50f7]){delete _0x56baba[_0x7df0('0x1c')][_0x1c50f7];}_0x1c5072[_0x7df0('0x13')]();});_0x56baba[_0x7df0('0x1c')][_0x1c50f7]['on'](_0x7df0('0x1d'),function(){if(_0x56baba[_0x7df0('0x1c')][_0x1c50f7]){delete _0x56baba[_0x7df0('0x1c')][_0x1c50f7];}});_0x5dbe2d=setTimeout(function(){logger[_0x7df0('0xa')](_0x7df0('0x1e'),_0x1c50f7);clearTimeout(_0x5dbe2d);_0x186cb0['close']();_0x1c5072[_0x7df0('0x1f')]();},_0x4ad1d0);strategy[_0x7df0('0x20')](_0x186cb0,_0x287f02,_0x56baba,_0x1f7053);}else{logger[_0x7df0('0x10')](_0x7df0('0x21'),_0x1c50f7,_0x375f4e[_0x7df0('0xd')]);_0x1c5072[_0x7df0('0x13')]();}}}catch(_0x351be1){console[_0x7df0('0x22')](_0x351be1);logger[_0x7df0('0x10')]('[%s][QUEUE]\x20%s',_0x1c50f7,_0x351be1['stack']);_0x1c5072[_0x7df0('0x13')]();}};}; \ No newline at end of file +var _0xc7e4=['./strategy','string','name\x20is\x20a\x20string\x20and\x20it\x20is\x20required','number','info','[%s][AGENT][NAME:%s][STATUS:%s]','name','toLowerCase','consequence','length','error','map','join','stop','find','agents','timeout','createQueue','channel','format','START:%s','rules','end','close','complete','[%s][AGENT]\x20ROUTING\x20END','next','agent','[%s][AGENT]\x20agent\x20not\x20found\x20%s','log','[%s][QUEUE]\x20%s','stack','validate','lodash','util','seq-queue','../../../../config/logger','routing'];(function(_0x15ae8f,_0x4968a4){var _0x424078=function(_0x2750ac){while(--_0x2750ac){_0x15ae8f['push'](_0x15ae8f['shift']());}};_0x424078(++_0x4968a4);}(_0xc7e4,0xde));var _0x4c7e=function(_0x54a8d3,_0x12b8b7){_0x54a8d3=_0x54a8d3-0x0;var _0x5eec0e=_0xc7e4[_0x54a8d3];return _0x5eec0e;};'use strict';var schema=require(_0x4c7e('0x0'));var _=require(_0x4c7e('0x1'));var util=require(_0x4c7e('0x2'));var seqqueue=require(_0x4c7e('0x3'));var logger=require(_0x4c7e('0x4'))(_0x4c7e('0x5'));var strategy=require(_0x4c7e('0x6'));var queue=schema({'name':{'type':_0x4c7e('0x7'),'required':!![],'message':_0x4c7e('0x8')},'timeout':{'type':_0x4c7e('0x9'),'message':'timeout\x20is\x20a\x20number'}});function writeLog(_0xac2533,_0x26fc78,_0x55999a){return logger[_0x4c7e('0xa')](util['format'](_0x4c7e('0xb'),_0xac2533,_0x26fc78[_0x4c7e('0xc')],_0x55999a));}function handleFindAgent(_0xccfb7d){return function(_0x2ac2ae){return _0x2ac2ae[_0x4c7e('0xc')][_0x4c7e('0xd')]()===_0xccfb7d[_0x4c7e('0xd')]();};}exports[_0x4c7e('0xe')]=function(_0x24dda8,_0x3b6252,_0x34aea5,_0xb2d4c0){return function(_0x4988b9){try{var _0x43d6e8={'name':_0x3b6252[0x0],'timeout':_0x3b6252[0x1]};var _0x17e67f=queue[_0x4c7e('0x0')](_0x43d6e8,{'typecast':!![]});if(_0x17e67f[_0x4c7e('0xf')]){logger[_0x4c7e('0x10')]('[%s][AGENT]\x20%s',_0x24dda8,_[_0x4c7e('0x11')](_0x17e67f,'message')[_0x4c7e('0x12')](',\x20'));_0x4988b9[_0x4c7e('0x13')]();}else{var _0x3ba066=_[_0x4c7e('0x14')](_0x34aea5[_0x4c7e('0x15')],handleFindAgent(_0x43d6e8['name']));if(_0x3ba066){var _0x11749e=(_0x43d6e8[_0x4c7e('0x16')]||0xa)*0x3e8;var _0x1f6a3b,_0x5734e2;var _0x19c8ef=seqqueue[_0x4c7e('0x17')](_0x11749e);_0x19c8ef['id']=_0x24dda8;_0x19c8ef['atimeout']=_0x11749e;_0x19c8ef[_0x4c7e('0x18')]=_0xb2d4c0[_0x4c7e('0x18')];writeLog(_0x24dda8,_0x3ba066,util[_0x4c7e('0x19')](_0x4c7e('0x1a'),_0x11749e));_0x34aea5[_0x4c7e('0x1b')][_0x24dda8]['on'](_0x4c7e('0x1c'),function(){logger['info']('[%s][AGENT]\x20ROUTING\x20STOPPED',_0x24dda8);clearTimeout(_0x5734e2);_0x5734e2=undefined;_0x19c8ef[_0x4c7e('0x1d')]();if(_0x34aea5['rules'][_0x24dda8]){delete _0x34aea5[_0x4c7e('0x1b')][_0x24dda8];}_0x4988b9['stop']();});_0x34aea5['rules'][_0x24dda8]['on'](_0x4c7e('0x1e'),function(){if(_0x34aea5['rules'][_0x24dda8]){delete _0x34aea5[_0x4c7e('0x1b')][_0x24dda8];}});_0x5734e2=setTimeout(function(){logger[_0x4c7e('0xa')](_0x4c7e('0x1f'),_0x24dda8);clearTimeout(_0x5734e2);_0x19c8ef[_0x4c7e('0x1d')]();_0x4988b9[_0x4c7e('0x20')]();},_0x11749e);strategy[_0x4c7e('0x21')](_0x19c8ef,_0x3ba066,_0x34aea5,_0xb2d4c0);}else{logger[_0x4c7e('0x10')](_0x4c7e('0x22'),_0x24dda8,_0x43d6e8[_0x4c7e('0xc')]);_0x4988b9[_0x4c7e('0x13')]();}}}catch(_0x8a2422){console[_0x4c7e('0x23')](_0x8a2422);logger[_0x4c7e('0x10')](_0x4c7e('0x24'),_0x24dda8,_0x8a2422[_0x4c7e('0x25')]);_0x4988b9[_0x4c7e('0x13')]();}};}; \ No newline at end of file diff --git a/server/services/routing/server/applications/amazonlex.js b/server/services/routing/server/applications/amazonlex.js index 286419f..a1fd445 100644 --- a/server/services/routing/server/applications/amazonlex.js +++ b/server/services/routing/server/applications/amazonlex.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x037b=['providerName','amazonlex','providerResponse','Failed','lodash','moment','aws-sdk','./utils','../../../../config/logger','routing','../../rpc/chatMessage','../../rpc/openchannelMessage','../../rpc/smsMessage','../../rpc/whatsappMessage','consequence','interaction','UserId','[%s][AMAZONLEX]\x20%s','next','format','YYYY-MM-DD\x20HH:mm:ss','out','channel','sms','whatsapp','phone','ChatWebsiteId','account','upperFirst','AccountId','InteractionId','created','body','Message','create','info','catch','error','stringify','[%s][AMAZONLEX]\x20Welcome\x20Message\x20has\x20been\x20sent!','stop','LexRuntime','$LATEST','toString','postText','message'];(function(_0x5b5775,_0x4aa706){var _0x57b278=function(_0x344ebd){while(--_0x344ebd){_0x5b5775['push'](_0x5b5775['shift']());}};_0x57b278(++_0x4aa706);}(_0x037b,0x1a2));var _0xb037=function(_0x4550e4,_0x1322e8){_0x4550e4=_0x4550e4-0x0;var _0x200229=_0x037b[_0x4550e4];return _0x200229;};'use strict';var _=require(_0xb037('0x0'));var moment=require(_0xb037('0x1'));var AWS=require(_0xb037('0x2'));var utils=require(_0xb037('0x3'));var logger=require(_0xb037('0x4'))(_0xb037('0x5'));var rpc={'chatMessage':require(_0xb037('0x6')),'openchannelMessage':require(_0xb037('0x7')),'mailMessage':require('../../rpc/mailMessage'),'smsMessage':require(_0xb037('0x8')),'faxMessage':require('../../rpc/faxMessage'),'whatsappMessage':require(_0xb037('0x9'))};exports[_0xb037('0xa')]=function(_0x1e2826,_0x58d442){return function(_0x3b530c){try{if(!_['isNil'](this[_0xb037('0xb')][_0xb037('0xc')])){logger['info'](_0xb037('0xd'),_0x1e2826,'Agent\x20is\x20managing\x20the\x20interaction.\x20Go\x20to\x20next\x20application.');return _0x3b530c[_0xb037('0xe')]();}var _0x4637de={'ContactId':this['contact']['id'],'sentAt':moment()[_0xb037('0xf')](_0xb037('0x10')),'direction':_0xb037('0x11')};if(this[_0xb037('0x12')]===_0xb037('0x13')||this['channel']===_0xb037('0x14')){_0x4637de['phone']=this[_0xb037('0xb')][_0xb037('0x15')];}var _0x5dfb70=this[_0xb037('0x12')];if(_0x5dfb70==='chat'){_0x4637de[_0xb037('0x16')]=this[_0xb037('0x17')]['id'];}else{_0x4637de[_[_0xb037('0x18')](_0x5dfb70)+_0xb037('0x19')]=this[_0xb037('0x17')]['id'];}_0x4637de[_['upperFirst'](_0x5dfb70)+_0xb037('0x1a')]=this['interaction']['id'];if(this[_0xb037('0xb')][_0xb037('0x1b')]){var _0x27062e=_0x58d442[0x4];if(!_['isEmpty'](_0x27062e)){_0x4637de[_0xb037('0x1c')]=utils['getMustacheRender'](_0x27062e,this);return rpc[_0x5dfb70+_0xb037('0x1d')][_0xb037('0x1e')](_0x4637de)['then'](function(_0x2ae1d4){logger[_0xb037('0x1f')]('[%s][AMAZONLEX]\x20%s',_0x1e2826,_0x4637de[_0xb037('0x1c')]);})[_0xb037('0x20')](function(_0x343547){logger[_0xb037('0x21')]('[%s][AMAZONLEX]\x20%s',_0x1e2826,JSON[_0xb037('0x22')](_0x343547));})['finally'](function(){logger[_0xb037('0x1f')](_0xb037('0x23'),_0x1e2826);_0x3b530c[_0xb037('0x24')]();});}else{logger['info']('[%s][AMAZONLEX]\x20Welcome\x20Message\x20is\x20empty.\x20It\x20will\x20wait\x20for\x20a\x20message\x20from\x20customer!',_0x1e2826);_0x3b530c[_0xb037('0x24')]();}}else{var _0x2dc0bb=this;var _0x23d4ec=new AWS[(_0xb037('0x25'))]({'accessKeyId':_0x58d442[0x0],'secretAccessKey':_0x58d442[0x1],'region':_0x58d442[0x2]});var _0x643b85={'botAlias':_0xb037('0x26'),'botName':_0x58d442[0x3],'inputText':this['message'][_0xb037('0x1c')],'userId':this[_0xb037('0x12')]+':'+this[_0xb037('0xb')]['id'][_0xb037('0x27')]()};_0x23d4ec[_0xb037('0x28')](_0x643b85,function(_0x2615e4,_0x5aea8f){if(_0x2615e4){logger['error'](_0xb037('0xd'),_0x1e2826,_0x2615e4[_0xb037('0x29')]);_0x3b530c[_0xb037('0xe')]();}else if(_0x5aea8f&&_0x5aea8f[_0xb037('0x29')]){_0x2dc0bb[_0xb037('0x1c')]['amazonlex']=_0x5aea8f;_0x4637de[_0xb037('0x1c')]=_0x5aea8f['message'];_0x4637de[_0xb037('0x2a')]=_0xb037('0x2b');_0x4637de[_0xb037('0x2c')]=JSON[_0xb037('0x22')](_0x5aea8f);return rpc[_0x5dfb70+_0xb037('0x1d')][_0xb037('0x1e')](_0x4637de)['then'](function(_0x1a2da2){logger[_0xb037('0x1f')]('[%s][AMAZONLEX]\x20%s',_0x1e2826,_0x4637de[_0xb037('0x1c')]);if(_0x5aea8f['dialogState']==_0xb037('0x2d')){_0x3b530c[_0xb037('0xe')]();}else{_0x3b530c[_0xb037('0x24')]();}})['catch'](function(_0x3e9279){logger[_0xb037('0x21')](_0xb037('0xd'),_0x1e2826,JSON[_0xb037('0x22')](_0x3e9279));_0x3b530c[_0xb037('0xe')]();});}else{_0x3b530c['next']();}});}}catch(_0x153202){logger[_0xb037('0x21')](_0xb037('0xd'),_0x1e2826,JSON[_0xb037('0x22')](_0x153202));_0x3b530c[_0xb037('0x24')]();}};}; \ No newline at end of file +var _0xbb68=['../../rpc/openchannelMessage','../../rpc/mailMessage','../../rpc/smsMessage','../../rpc/faxMessage','../../rpc/whatsappMessage','consequence','interaction','info','Agent\x20is\x20managing\x20the\x20interaction.\x20Go\x20to\x20next\x20application.','next','format','YYYY-MM-DD\x20HH:mm:ss','channel','sms','whatsapp','phone','upperFirst','AccountId','account','InteractionId','created','isEmpty','body','getMustacheRender','Message','create','[%s][AMAZONLEX]\x20%s','stringify','finally','stop','[%s][AMAZONLEX]\x20Welcome\x20Message\x20is\x20empty.\x20It\x20will\x20wait\x20for\x20a\x20message\x20from\x20customer!','$LATEST','toString','postText','error','message','amazonlex','dialogState','Failed','catch','lodash','aws-sdk','./utils','../../rpc/chatMessage'];(function(_0x3a0be9,_0x214ee4){var _0xc1ec3e=function(_0x4e04ad){while(--_0x4e04ad){_0x3a0be9['push'](_0x3a0be9['shift']());}};_0xc1ec3e(++_0x214ee4);}(_0xbb68,0x1e0));var _0x8bb6=function(_0x295c75,_0x5a8d80){_0x295c75=_0x295c75-0x0;var _0x246f1f=_0xbb68[_0x295c75];return _0x246f1f;};'use strict';var _=require(_0x8bb6('0x0'));var moment=require('moment');var AWS=require(_0x8bb6('0x1'));var utils=require(_0x8bb6('0x2'));var logger=require('../../../../config/logger')('routing');var rpc={'chatMessage':require(_0x8bb6('0x3')),'openchannelMessage':require(_0x8bb6('0x4')),'mailMessage':require(_0x8bb6('0x5')),'smsMessage':require(_0x8bb6('0x6')),'faxMessage':require(_0x8bb6('0x7')),'whatsappMessage':require(_0x8bb6('0x8'))};exports[_0x8bb6('0x9')]=function(_0x5d64b5,_0x49692c){return function(_0x55a42a){try{if(!_['isNil'](this[_0x8bb6('0xa')]['UserId'])){logger[_0x8bb6('0xb')]('[%s][AMAZONLEX]\x20%s',_0x5d64b5,_0x8bb6('0xc'));return _0x55a42a[_0x8bb6('0xd')]();}var _0x4438ef={'ContactId':this['contact']['id'],'sentAt':moment()[_0x8bb6('0xe')](_0x8bb6('0xf')),'direction':'out'};if(this[_0x8bb6('0x10')]===_0x8bb6('0x11')||this[_0x8bb6('0x10')]===_0x8bb6('0x12')){_0x4438ef[_0x8bb6('0x13')]=this['interaction']['phone'];}var _0x193d82=this[_0x8bb6('0x10')];if(_0x193d82==='chat'){_0x4438ef['ChatWebsiteId']=this['account']['id'];}else{_0x4438ef[_[_0x8bb6('0x14')](_0x193d82)+_0x8bb6('0x15')]=this[_0x8bb6('0x16')]['id'];}_0x4438ef[_[_0x8bb6('0x14')](_0x193d82)+_0x8bb6('0x17')]=this[_0x8bb6('0xa')]['id'];if(this[_0x8bb6('0xa')][_0x8bb6('0x18')]){var _0x2b0188=_0x49692c[0x4];if(!_[_0x8bb6('0x19')](_0x2b0188)){_0x4438ef[_0x8bb6('0x1a')]=utils[_0x8bb6('0x1b')](_0x2b0188,this);return rpc[_0x193d82+_0x8bb6('0x1c')][_0x8bb6('0x1d')](_0x4438ef)['then'](function(_0x3ef8ef){logger['info'](_0x8bb6('0x1e'),_0x5d64b5,_0x4438ef[_0x8bb6('0x1a')]);})['catch'](function(_0x2aaacf){logger['error'](_0x8bb6('0x1e'),_0x5d64b5,JSON[_0x8bb6('0x1f')](_0x2aaacf));})[_0x8bb6('0x20')](function(){logger[_0x8bb6('0xb')]('[%s][AMAZONLEX]\x20Welcome\x20Message\x20has\x20been\x20sent!',_0x5d64b5);_0x55a42a[_0x8bb6('0x21')]();});}else{logger['info'](_0x8bb6('0x22'),_0x5d64b5);_0x55a42a['stop']();}}else{var _0x23a284=this;var _0x361172=new AWS['LexRuntime']({'accessKeyId':_0x49692c[0x0],'secretAccessKey':_0x49692c[0x1],'region':_0x49692c[0x2]});var _0x5ec633={'botAlias':_0x8bb6('0x23'),'botName':_0x49692c[0x3],'inputText':this['message'][_0x8bb6('0x1a')],'userId':this[_0x8bb6('0x10')]+':'+this[_0x8bb6('0xa')]['id'][_0x8bb6('0x24')]()};_0x361172[_0x8bb6('0x25')](_0x5ec633,function(_0x527fae,_0x1740bd){if(_0x527fae){logger[_0x8bb6('0x26')]('[%s][AMAZONLEX]\x20%s',_0x5d64b5,_0x527fae['message']);_0x55a42a[_0x8bb6('0xd')]();}else if(_0x1740bd&&_0x1740bd[_0x8bb6('0x27')]){_0x23a284['body']['amazonlex']=_0x1740bd;_0x4438ef[_0x8bb6('0x1a')]=_0x1740bd[_0x8bb6('0x27')];_0x4438ef['providerName']=_0x8bb6('0x28');_0x4438ef['providerResponse']=JSON['stringify'](_0x1740bd);return rpc[_0x193d82+_0x8bb6('0x1c')][_0x8bb6('0x1d')](_0x4438ef)['then'](function(_0x115a20){logger['info'](_0x8bb6('0x1e'),_0x5d64b5,_0x4438ef[_0x8bb6('0x1a')]);if(_0x1740bd[_0x8bb6('0x29')]==_0x8bb6('0x2a')){_0x55a42a['next']();}else{_0x55a42a['stop']();}})[_0x8bb6('0x2b')](function(_0x2af04d){logger['error']('[%s][AMAZONLEX]\x20%s',_0x5d64b5,JSON[_0x8bb6('0x1f')](_0x2af04d));_0x55a42a[_0x8bb6('0xd')]();});}else{_0x55a42a[_0x8bb6('0xd')]();}});}}catch(_0x46217f){logger[_0x8bb6('0x26')](_0x8bb6('0x1e'),_0x5d64b5,JSON[_0x8bb6('0x1f')](_0x46217f));_0x55a42a[_0x8bb6('0x21')]();}};}; \ No newline at end of file diff --git a/server/services/routing/server/applications/autoreply.js b/server/services/routing/server/applications/autoreply.js index a9bf31c..a493725 100644 --- a/server/services/routing/server/applications/autoreply.js +++ b/server/services/routing/server/applications/autoreply.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x502a=['Re:\x20','chat','ChatWebsiteId','upperFirst','AccountId','Message','account','Smtp','service','host','port','secure','authentication','auth','user','pass','inReplyTo','messageId','html','','replace','';_0x5267d7[_0xa502('0x3c')]={'Auto-Submitted':'auto-replied','X-Auto-Response-Suppress':'All','Precedence':_0xa502('0x3d')};return mailRpc[_0xa502('0x3e')](_0x34c016,_0x5267d7)[_0xa502('0x3f')](function(_0x33d957){logger['info'](_0xa502('0x40'),_0x4f9569);_0x5267d7[_0xa502('0x37')]=_0x33d957[_0xa502('0x1e')][_0xa502('0x37')];return rpc[_0xf31843+'Message']['create'](_0x5267d7);})[_0xa502('0x3f')](function(_0x17fb5a){logger[_0xa502('0x13')](_0xa502('0x14'),_0x4f9569,JSON[_0xa502('0x41')](_0x17fb5a));})[_0xa502('0x42')](function(_0x341ca0){logger[_0xa502('0x43')](_0xa502('0x44'),_0x4f9569,JSON['stringify'](_0x341ca0));})[_0xa502('0x45')](function(){Promise[_0xa502('0x46')]()[_0xa502('0x3f')](function(){if(_0x4dc529[0x0]!=='2'||_0x529558[_0xa502('0x16')])return;return rpc[_0xf31843+_0xa502('0x47')][_0xa502('0x48')](_0x529558['id'],{'autoreplyExecuted':!![]})[_0xa502('0x3f')](function(_0x139306){logger[_0xa502('0x13')](_0xa502('0x17'),_0x4f9569,JSON['stringify'](_0x139306));})[_0xa502('0x42')](function(_0x582393){logger[_0xa502('0x43')](_0xa502('0x49'),_0x4f9569,JSON['stringify'](_0x582393));});})[_0xa502('0x3f')](function(){_0x443d99[_0xa502('0x15')]();});});}else{return rpc[this[_0xa502('0x1f')]+_0xa502('0x2b')]['create'](_0x5267d7)[_0xa502('0x3f')](function(_0x29cb52){logger[_0xa502('0x13')](_0xa502('0x14'),_0x4f9569,_0x5267d7[_0xa502('0x1c')]);})['catch'](function(_0x332b77){logger['error'](_0xa502('0x14'),_0x4f9569,JSON['stringify'](_0x332b77));})[_0xa502('0x45')](function(){Promise[_0xa502('0x46')]()[_0xa502('0x3f')](function(){if(_0x4dc529[0x0]!=='2'||_0x529558['autoreplyExecuted'])return;return rpc[_0xf31843+_0xa502('0x47')][_0xa502('0x48')](_0x529558['id'],{'autoreplyExecuted':!![]})[_0xa502('0x3f')](function(_0x3de6df){logger[_0xa502('0x13')](_0xa502('0x17'),_0x4f9569,JSON[_0xa502('0x41')](_0x3de6df));})['catch'](function(_0x14c005){logger[_0xa502('0x43')](_0xa502('0x49'),_0x4f9569,JSON[_0xa502('0x41')](_0x14c005));});})[_0xa502('0x3f')](function(){_0x443d99['next']();});});}}}catch(_0x5864b7){logger[_0xa502('0x43')]('[%s][AUTOREPLY]\x20%s',_0x4f9569,JSON[_0xa502('0x41')](_0x5864b7));_0x443d99[_0xa502('0x4a')]();}};}; \ No newline at end of file +var _0x8f10=['[%s][AUTOREPLY]\x20%s','next','autoreplyExecuted','info','[%s][AUTOREPLY][autoreplyExecuted]\x20%s','channel','contact','format','getMustacheRender','body','message','from','phone','read','subject','startsWith','Re:','Re:\x20','chat','ChatWebsiteId','account','AccountId','upperFirst','InteractionId','Message','Smtp','service','host','port','secure','authentication','auth','user','pass','messageId','html','','replace','','headers','auto-replied','All','auto_reply','sendMailMessage','then','[%s][AUTOREPLY]\x20SMTP\x20SENT','create','stringify','catch','error','finally','resolve','Interaction','update','[RPC][%s][AUTOREPLY][autoreplyExecuted]\x20%s','stop','lodash','moment','../../../../config/logger','routing','../../rpc/mailMessage','../../rpc/smsMessage','../../rpc/faxMessage','../../rpc/openchannelInteraction','../../rpc/mailInteraction','../../rpc/faxInteraction','../../rpc/whatsappInteraction','isNil','interaction','created'];(function(_0x3b9b83,_0x46d41c){var _0x3b3e0f=function(_0x5c5e62){while(--_0x5c5e62){_0x3b9b83['push'](_0x3b9b83['shift']());}};_0x3b3e0f(++_0x46d41c);}(_0x8f10,0x10e));var _0x08f1=function(_0x99dd59,_0x4bc184){_0x99dd59=_0x99dd59-0x0;var _0x1b5d7d=_0x8f10[_0x99dd59];return _0x1b5d7d;};'use strict';var _=require(_0x08f1('0x0'));var moment=require(_0x08f1('0x1'));var utils=require('./utils');var logger=require(_0x08f1('0x2'))(_0x08f1('0x3'));var rpc={'chatMessage':require('../../rpc/chatMessage'),'openchannelMessage':require('../../rpc/openchannelMessage'),'mailMessage':require(_0x08f1('0x4')),'smsMessage':require(_0x08f1('0x5')),'faxMessage':require(_0x08f1('0x6')),'whatsappMessage':require('../../rpc/whatsappMessage'),'chatInteraction':require('../../rpc/chatInteraction'),'openchannelInteraction':require(_0x08f1('0x7')),'mailInteraction':require(_0x08f1('0x8')),'smsInteraction':require('../../rpc/smsInteraction'),'faxInteraction':require(_0x08f1('0x9')),'whatsappInteraction':require(_0x08f1('0xa'))};var mailRpc=require('../../mailRpc');exports['consequence']=function(_0x54429c,_0x347f27){return function(_0x85a8ac){try{if(_0x347f27[0x0]==='1'&&(_[_0x08f1('0xb')](this[_0x08f1('0xc')]['created'])||!this[_0x08f1('0xc')][_0x08f1('0xd')])){logger['info'](_0x08f1('0xe'),_0x54429c,'Autoreply\x20already\x20sent');return _0x85a8ac[_0x08f1('0xf')]();}if(_0x347f27[0x0]==='2'&&this[_0x08f1('0xc')][_0x08f1('0x10')]){logger[_0x08f1('0x11')](_0x08f1('0x12'),_0x54429c,'One\x20Time\x20already\x20sent');return _0x85a8ac['next']();}var _0x172454=this[_0x08f1('0x13')];var _0x167ddc={'ContactId':this[_0x08f1('0x14')]['id'],'sentAt':moment()[_0x08f1('0x15')]('YYYY-MM-DD\x20HH:mm:ss'),'direction':'out'};if(this[_0x08f1('0x13')]==='mail'){_0x167ddc['body']=utils[_0x08f1('0x16')](_0x347f27[0x2],this);}else{_0x167ddc[_0x08f1('0x17')]=utils[_0x08f1('0x16')](_0x347f27[0x1],this);}if(this[_0x08f1('0x18')]){_0x167ddc['to']=this[_0x08f1('0x18')][_0x08f1('0x19')]||'';if(this[_0x08f1('0x13')]==='mail'&&_0x347f27[0x1]==='1'){_0x167ddc['cc']=this[_0x08f1('0x18')]['cc']||'';}_0x167ddc['from']=this[_0x08f1('0x18')]['to']||'';_0x167ddc[_0x08f1('0x1a')]=this['message'][_0x08f1('0x1a')]||'';_0x167ddc[_0x08f1('0x1b')]=!![];if(this[_0x08f1('0x18')][_0x08f1('0x1c')]){_0x167ddc['subject']='';_0x167ddc[_0x08f1('0x1c')]+=_[_0x08f1('0x1d')](this[_0x08f1('0x18')]['subject'],_0x08f1('0x1e'))?'':_0x08f1('0x1f');_0x167ddc[_0x08f1('0x1c')]+=this['message'][_0x08f1('0x1c')];}}if(this[_0x08f1('0x13')]===_0x08f1('0x20')){_0x167ddc[_0x08f1('0x21')]=this[_0x08f1('0x22')]['id'];}else{_0x167ddc[_['upperFirst'](this[_0x08f1('0x13')])+_0x08f1('0x23')]=this['account']['id'];}_0x167ddc[_[_0x08f1('0x24')](this['channel'])+_0x08f1('0x25')]=this[_0x08f1('0xc')]['id'];var _0x7e75ce=this['interaction'];if(rpc[this[_0x08f1('0x13')]+_0x08f1('0x26')]){if(this[_0x08f1('0x13')]==='mail'){var _0x1a7f5f={'tls':{'rejectUnauthorized':![]}};if(this[_0x08f1('0x22')][_0x08f1('0x27')][_0x08f1('0x28')]){_0x1a7f5f[_0x08f1('0x28')]=this[_0x08f1('0x22')][_0x08f1('0x27')][_0x08f1('0x28')];}else{_0x1a7f5f[_0x08f1('0x29')]=this['account'][_0x08f1('0x27')][_0x08f1('0x29')];_0x1a7f5f[_0x08f1('0x2a')]=this[_0x08f1('0x22')][_0x08f1('0x27')][_0x08f1('0x2a')];_0x1a7f5f[_0x08f1('0x2b')]=this[_0x08f1('0x22')][_0x08f1('0x27')][_0x08f1('0x2b')];}if(this['account']['Smtp'][_0x08f1('0x2c')]){_0x1a7f5f[_0x08f1('0x2d')]={'user':this[_0x08f1('0x22')]['Smtp'][_0x08f1('0x2e')],'pass':this[_0x08f1('0x22')]['Smtp'][_0x08f1('0x2f')]};}_0x167ddc['inReplyTo']=this['message'][_0x08f1('0x30')];_0x167ddc[_0x08f1('0x31')]=_0x08f1('0x32')+_[_0x08f1('0x33')](_0x167ddc['body'],']+(>|$)/g,''),'priorityTrue':_0x3bf88c[0x1],'priorityFalse':_0x3bf88c[0x2]};var _0x1f789f=gotoif[_0xdaad('0xa')](_0x23a6f6,{'typecast':!![]});if(_0x1f789f[_0xdaad('0xb')]){logger[_0xdaad('0xc')](_0xdaad('0xd'),_0x2668a3,_[_0xdaad('0xe')](_0x1f789f,'message')[_0xdaad('0xf')](',\x20'));_0x183f5e['stop']();}else{try{var _0x409118=eval('('+_0x23a6f6[_0xdaad('0x10')]+')');var _0x2deba4=_0x409118?_0x23a6f6[_0xdaad('0x11')]:_0x23a6f6[_0xdaad('0x12')];logger[_0xdaad('0x13')](_0xdaad('0x14'),_0x2668a3,_0x23a6f6['condition'],_0x409118,_0x2deba4||_0xdaad('0x15'));if(_0x2deba4){var _0x36d883=_[_0xdaad('0x16')](_0x183f5e[_0xdaad('0x17')](),{'p':_0x2deba4});if(_0x36d883>=0x0){logger['info'](_0xdaad('0x18'),_0x2668a3,_0x2deba4||_0xdaad('0x15'),_0x36d883);_0x183f5e[_0xdaad('0x15')](_0x36d883);}else{logger[_0xdaad('0x13')](_0xdaad('0x19'),_0x2668a3,_0x2deba4||'next');_0x183f5e[_0xdaad('0x1a')]();}}else{_0x183f5e[_0xdaad('0x15')]();}}catch(_0x4cbca1){logger[_0xdaad('0xc')]('[%s][GOTOIF]\x20eval\x20error:\x20%s',_0x2668a3,_0x4cbca1[_0xdaad('0x1b')]);_0x183f5e[_0xdaad('0x1a')]();}}}catch(_0x147747){logger['error'](_0xdaad('0xd'),_0x2668a3,JSON['stringify'](_0x147747));_0x183f5e[_0xdaad('0x1a')]();}};}; \ No newline at end of file +var _0x03af=['condition','priorityTrue','priorityFalse','info','[%s][GOTOIF]\x20condition\x20%s\x20is\x20%s\x20try\x20goto\x20priority\x20%s','next','rules','[%s][GOTOIF]\x20eval\x20error:\x20%s','[%s][GOTOIF]\x20%s','stringify','validate','lodash','html-to-text','./utils','../../../../config/logger','string','number','fromString','replace','error','map','message','join','stop'];(function(_0x424a9a,_0x2dd9af){var _0xa7831c=function(_0x512534){while(--_0x512534){_0x424a9a['push'](_0x424a9a['shift']());}};_0xa7831c(++_0x2dd9af);}(_0x03af,0x82));var _0xf03a=function(_0xf3dba3,_0x4507b9){_0xf3dba3=_0xf3dba3-0x0;var _0x392e2f=_0x03af[_0xf3dba3];return _0x392e2f;};'use strict';var schema=require(_0xf03a('0x0'));var _=require(_0xf03a('0x1'));var htmlToText=require(_0xf03a('0x2'));var utils=require(_0xf03a('0x3'));var logger=require(_0xf03a('0x4'))('routing');var gotoif=schema({'condition':{'type':_0xf03a('0x5'),'required':!![],'message':'condition\x20is\x20a\x20string\x20and\x20it\x20is\x20required'},'priorityTrue':{'type':_0xf03a('0x6'),'message':'priority\x20true\x20is\x20a\x20number'},'priorityFalse':{'type':_0xf03a('0x6'),'message':'priority\x20false\x20is\x20a\x20number'}});exports['consequence']=function(_0x359ff5,_0x560db7){return function(_0x4956fa){try{var _0xccfa03={'condition':htmlToText[_0xf03a('0x7')](utils['getMustacheRender'](_0x560db7[0x0],this),{'wordwrap':![]})[_0xf03a('0x8')](/<\/?[^>]+(>|$)/g,''),'priorityTrue':_0x560db7[0x1],'priorityFalse':_0x560db7[0x2]};var _0x16d011=gotoif[_0xf03a('0x0')](_0xccfa03,{'typecast':!![]});if(_0x16d011['length']){logger[_0xf03a('0x9')]('[%s][GOTOIF]\x20%s',_0x359ff5,_[_0xf03a('0xa')](_0x16d011,_0xf03a('0xb'))[_0xf03a('0xc')](',\x20'));_0x4956fa[_0xf03a('0xd')]();}else{try{var _0x530919=eval('('+_0xccfa03[_0xf03a('0xe')]+')');var _0x245f1e=_0x530919?_0xccfa03[_0xf03a('0xf')]:_0xccfa03[_0xf03a('0x10')];logger[_0xf03a('0x11')](_0xf03a('0x12'),_0x359ff5,_0xccfa03[_0xf03a('0xe')],_0x530919,_0x245f1e||_0xf03a('0x13'));if(_0x245f1e){var _0x302015=_['findIndex'](_0x4956fa[_0xf03a('0x14')](),{'p':_0x245f1e});if(_0x302015>=0x0){logger[_0xf03a('0x11')]('[%s][GOTOIF]\x20priority\x20%s\x20found\x20at\x20index:\x20%s',_0x359ff5,_0x245f1e||_0xf03a('0x13'),_0x302015);_0x4956fa['next'](_0x302015);}else{logger[_0xf03a('0x11')]('[%s][GOTOIF]\x20priority\x20%s\x20not\x20found',_0x359ff5,_0x245f1e||_0xf03a('0x13'));_0x4956fa[_0xf03a('0xd')]();}}else{_0x4956fa['next']();}}catch(_0x5ec371){logger['error'](_0xf03a('0x15'),_0x359ff5,_0x5ec371[_0xf03a('0xb')]);_0x4956fa['stop']();}}}catch(_0x4e1425){logger[_0xf03a('0x9')](_0xf03a('0x16'),_0x359ff5,JSON[_0xf03a('0x17')](_0x4e1425));_0x4956fa['stop']();}};}; \ No newline at end of file diff --git a/server/services/routing/server/applications/gotop.js b/server/services/routing/server/applications/gotop.js index 2c5a929..2b2376a 100644 --- a/server/services/routing/server/applications/gotop.js +++ b/server/services/routing/server/applications/gotop.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x982c=['rules','[%s][GOTOP]\x20priority\x20%s\x20found\x20at\x20index:\x20%s','next','[%s][GOTOP]\x20priority\x20%s\x20not\x20found','[%s][GOTOP]\x20%s','stringify','validate','lodash','../../../../config/logger','number','priority\x20is\x20a\x20number\x20and\x20it\x20is\x20required','consequence','length','error','map','stop','info','[%s][GOTOP]\x20priority\x20%s','priority','findIndex'];(function(_0x3a9da6,_0x4e45aa){var _0x196260=function(_0x25ec39){while(--_0x25ec39){_0x3a9da6['push'](_0x3a9da6['shift']());}};_0x196260(++_0x4e45aa);}(_0x982c,0x6a));var _0xc982=function(_0x3af453,_0x229b58){_0x3af453=_0x3af453-0x0;var _0x40335a=_0x982c[_0x3af453];return _0x40335a;};'use strict';var schema=require(_0xc982('0x0'));var _=require(_0xc982('0x1'));var logger=require(_0xc982('0x2'))('routing');var gotop=schema({'priority':{'type':_0xc982('0x3'),'required':!![],'message':_0xc982('0x4')}});exports[_0xc982('0x5')]=function(_0x18819b,_0x56b449){return function(_0x304e75){try{var _0x1a84d2={'priority':_0x56b449[0x0]};var _0x243deb=gotop[_0xc982('0x0')](_0x1a84d2,{'typecast':!![]});if(_0x243deb[_0xc982('0x6')]){logger[_0xc982('0x7')]('[%s][GOTOP]\x20%s',_0x18819b,_[_0xc982('0x8')](_0x243deb,'message')['join'](',\x20'));_0x304e75[_0xc982('0x9')]();}else{logger[_0xc982('0xa')](_0xc982('0xb'),_0x18819b,_0x1a84d2[_0xc982('0xc')]);if(_0x1a84d2[_0xc982('0xc')]){var _0x14ea67=_[_0xc982('0xd')](_0x304e75[_0xc982('0xe')](),{'p':_0x1a84d2['priority']});if(_0x14ea67>=0x0){logger['info'](_0xc982('0xf'),_0x18819b,_0x1a84d2[_0xc982('0xc')]||'next',_0x14ea67);_0x304e75[_0xc982('0x10')](_0x14ea67);}else{logger[_0xc982('0xa')](_0xc982('0x11'),_0x18819b,_0x1a84d2['priority']||_0xc982('0x10'));_0x304e75[_0xc982('0x9')]();}}else{_0x304e75[_0xc982('0x10')]();}}}catch(_0x27f95a){logger['error'](_0xc982('0x12'),_0x18819b,JSON[_0xc982('0x13')](_0x27f95a));_0x304e75[_0xc982('0x9')]();}};}; \ No newline at end of file +var _0x6979=['../../../../config/logger','routing','number','priority\x20is\x20a\x20number\x20and\x20it\x20is\x20required','consequence','length','error','[%s][GOTOP]\x20%s','map','message','join','stop','priority','findIndex','rules','info','[%s][GOTOP]\x20priority\x20%s\x20found\x20at\x20index:\x20%s','[%s][GOTOP]\x20priority\x20%s\x20not\x20found','next','validate','lodash'];(function(_0x41dcba,_0x91ca42){var _0xaafd27=function(_0x14d62f){while(--_0x14d62f){_0x41dcba['push'](_0x41dcba['shift']());}};_0xaafd27(++_0x91ca42);}(_0x6979,0x139));var _0x9697=function(_0x1177c7,_0x195cee){_0x1177c7=_0x1177c7-0x0;var _0x1506f1=_0x6979[_0x1177c7];return _0x1506f1;};'use strict';var schema=require(_0x9697('0x0'));var _=require(_0x9697('0x1'));var logger=require(_0x9697('0x2'))(_0x9697('0x3'));var gotop=schema({'priority':{'type':_0x9697('0x4'),'required':!![],'message':_0x9697('0x5')}});exports[_0x9697('0x6')]=function(_0x42bfc3,_0x37f2de){return function(_0x3d2c4c){try{var _0x3b3ebe={'priority':_0x37f2de[0x0]};var _0x19b499=gotop[_0x9697('0x0')](_0x3b3ebe,{'typecast':!![]});if(_0x19b499[_0x9697('0x7')]){logger[_0x9697('0x8')](_0x9697('0x9'),_0x42bfc3,_[_0x9697('0xa')](_0x19b499,_0x9697('0xb'))[_0x9697('0xc')](',\x20'));_0x3d2c4c[_0x9697('0xd')]();}else{logger['info']('[%s][GOTOP]\x20priority\x20%s',_0x42bfc3,_0x3b3ebe[_0x9697('0xe')]);if(_0x3b3ebe['priority']){var _0x5f34ee=_[_0x9697('0xf')](_0x3d2c4c[_0x9697('0x10')](),{'p':_0x3b3ebe['priority']});if(_0x5f34ee>=0x0){logger[_0x9697('0x11')](_0x9697('0x12'),_0x42bfc3,_0x3b3ebe[_0x9697('0xe')]||'next',_0x5f34ee);_0x3d2c4c['next'](_0x5f34ee);}else{logger[_0x9697('0x11')](_0x9697('0x13'),_0x42bfc3,_0x3b3ebe[_0x9697('0xe')]||_0x9697('0x14'));_0x3d2c4c[_0x9697('0xd')]();}}else{_0x3d2c4c[_0x9697('0x14')]();}}}catch(_0x5588d8){logger[_0x9697('0x8')]('[%s][GOTOP]\x20%s',_0x42bfc3,JSON['stringify'](_0x5588d8));_0x3d2c4c['stop']();}};}; \ No newline at end of file diff --git a/server/services/routing/server/applications/message.js b/server/services/routing/server/applications/message.js index a691c33..f4524b6 100644 --- a/server/services/routing/server/applications/message.js +++ b/server/services/routing/server/applications/message.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc06d=['InteractionId','interaction','Message','info','[%s][MESSAGE]\x20%s','next','catch','error','stop','stringify','lodash','./utils','../../../../config/logger','routing','../../rpc/openchannelMessage','../../rpc/mailMessage','../../rpc/whatsappMessage','getMustacheRender','contact','chat','ChatWebsiteId','account','upperFirst','channel'];(function(_0x5afe09,_0x45d806){var _0x3e1c15=function(_0x193e4d){while(--_0x193e4d){_0x5afe09['push'](_0x5afe09['shift']());}};_0x3e1c15(++_0x45d806);}(_0xc06d,0x15a));var _0xdc06=function(_0x2c22ab,_0x1ea15b){_0x2c22ab=_0x2c22ab-0x0;var _0x1f6c67=_0xc06d[_0x2c22ab];return _0x1f6c67;};'use strict';var _=require(_0xdc06('0x0'));var utils=require(_0xdc06('0x1'));var logger=require(_0xdc06('0x2'))(_0xdc06('0x3'));var rpc={'chatMessage':require('../../rpc/chatMessage'),'openchannelMessage':require(_0xdc06('0x4')),'mailMessage':require(_0xdc06('0x5')),'smsMessage':require('../../rpc/smsMessage'),'faxMessage':require('../../rpc/faxMessage'),'whatsappMessage':require(_0xdc06('0x6'))};exports['consequence']=function(_0x3d613b,_0x2f7692){return function(_0x5ce60c){try{var _0x513a0f={'body':utils[_0xdc06('0x7')](_0x2f7692[0x0],this),'ContactId':this[_0xdc06('0x8')]['id']};if(this['channel']===_0xdc06('0x9')){_0x513a0f[_0xdc06('0xa')]=this[_0xdc06('0xb')]['id'];}else{_0x513a0f[_[_0xdc06('0xc')](this[_0xdc06('0xd')])+'AccountId']=this['account']['id'];}_0x513a0f[_[_0xdc06('0xc')](this['channel'])+_0xdc06('0xe')]=this[_0xdc06('0xf')]['id'];if(rpc[this[_0xdc06('0xd')]+_0xdc06('0x10')]){return rpc[this[_0xdc06('0xd')]+_0xdc06('0x10')]['create'](_0x513a0f)['then'](function(_0xb9e716){logger[_0xdc06('0x11')](_0xdc06('0x12'),_0x3d613b,_0x513a0f['body']);_0x5ce60c[_0xdc06('0x13')]();})[_0xdc06('0x14')](function(_0x40ea3b){logger[_0xdc06('0x15')](_0xdc06('0x12'),_0x3d613b,JSON['stringify'](_0x40ea3b));_0x5ce60c[_0xdc06('0x16')]();});}}catch(_0x5a0ed2){logger[_0xdc06('0x15')](_0xdc06('0x12'),_0x3d613b,JSON[_0xdc06('0x17')](_0x5a0ed2));_0x5ce60c[_0xdc06('0x16')]();}};}; \ No newline at end of file +var _0x2083=['error','stringify','stop','lodash','./utils','routing','../../rpc/chatMessage','../../rpc/openchannelMessage','../../rpc/mailMessage','../../rpc/smsMessage','../../rpc/faxMessage','../../rpc/whatsappMessage','getMustacheRender','contact','chat','ChatWebsiteId','account','AccountId','upperFirst','channel','Message','create','then','info','[%s][MESSAGE]\x20%s','body','next','catch'];(function(_0x19f109,_0x575419){var _0x238e35=function(_0x5cace9){while(--_0x5cace9){_0x19f109['push'](_0x19f109['shift']());}};_0x238e35(++_0x575419);}(_0x2083,0x137));var _0x3208=function(_0x28571e,_0x99c3c0){_0x28571e=_0x28571e-0x0;var _0xb564a8=_0x2083[_0x28571e];return _0xb564a8;};'use strict';var _=require(_0x3208('0x0'));var utils=require(_0x3208('0x1'));var logger=require('../../../../config/logger')(_0x3208('0x2'));var rpc={'chatMessage':require(_0x3208('0x3')),'openchannelMessage':require(_0x3208('0x4')),'mailMessage':require(_0x3208('0x5')),'smsMessage':require(_0x3208('0x6')),'faxMessage':require(_0x3208('0x7')),'whatsappMessage':require(_0x3208('0x8'))};exports['consequence']=function(_0x52318e,_0x5c8d7f){return function(_0x152b81){try{var _0x3d837d={'body':utils[_0x3208('0x9')](_0x5c8d7f[0x0],this),'ContactId':this[_0x3208('0xa')]['id']};if(this['channel']===_0x3208('0xb')){_0x3d837d[_0x3208('0xc')]=this[_0x3208('0xd')]['id'];}else{_0x3d837d[_['upperFirst'](this['channel'])+_0x3208('0xe')]=this[_0x3208('0xd')]['id'];}_0x3d837d[_[_0x3208('0xf')](this[_0x3208('0x10')])+'InteractionId']=this['interaction']['id'];if(rpc[this[_0x3208('0x10')]+_0x3208('0x11')]){return rpc[this[_0x3208('0x10')]+_0x3208('0x11')][_0x3208('0x12')](_0x3d837d)[_0x3208('0x13')](function(_0xf232e5){logger[_0x3208('0x14')](_0x3208('0x15'),_0x52318e,_0x3d837d[_0x3208('0x16')]);_0x152b81[_0x3208('0x17')]();})[_0x3208('0x18')](function(_0xa5067){logger[_0x3208('0x19')]('[%s][MESSAGE]\x20%s',_0x52318e,JSON[_0x3208('0x1a')](_0xa5067));_0x152b81[_0x3208('0x1b')]();});}}catch(_0x41cdcf){logger[_0x3208('0x19')](_0x3208('0x15'),_0x52318e,JSON['stringify'](_0x41cdcf));_0x152b81[_0x3208('0x1b')]();}};}; \ No newline at end of file diff --git a/server/services/routing/server/applications/noop.js b/server/services/routing/server/applications/noop.js index 7fe1ac2..389b053 100644 --- a/server/services/routing/server/applications/noop.js +++ b/server/services/routing/server/applications/noop.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9bc9=['../../../../config/logger','routing','consequence','info','[%s][NOOP]\x20%s','next','stop'];(function(_0x332475,_0x2049df){var _0x34d1eb=function(_0x223643){while(--_0x223643){_0x332475['push'](_0x332475['shift']());}};_0x34d1eb(++_0x2049df);}(_0x9bc9,0x8c));var _0x99bc=function(_0x49ad25,_0x596de5){_0x49ad25=_0x49ad25-0x0;var _0x421009=_0x9bc9[_0x49ad25];return _0x421009;};'use strict';var utils=require('./utils');var logger=require(_0x99bc('0x0'))(_0x99bc('0x1'));exports[_0x99bc('0x2')]=function(_0x50cd22,_0x464689){return function(_0x166236){try{logger[_0x99bc('0x3')](_0x99bc('0x4'),_0x50cd22,utils['getMustacheRender'](_0x464689[0x0],this));_0x166236[_0x99bc('0x5')]();}catch(_0x28d552){logger['error']('[%s][NOOP]\x20%s',_0x50cd22,JSON['stringify'](_0x28d552));_0x166236[_0x99bc('0x6')]();}};}; \ No newline at end of file +var _0x6aab=['error','stop','./utils','../../../../config/logger','routing','consequence','info','getMustacheRender','next'];(function(_0x2c91e9,_0x2fb965){var _0x13f0ff=function(_0xb39edf){while(--_0xb39edf){_0x2c91e9['push'](_0x2c91e9['shift']());}};_0x13f0ff(++_0x2fb965);}(_0x6aab,0x173));var _0xb6aa=function(_0x50a0c2,_0x4befab){_0x50a0c2=_0x50a0c2-0x0;var _0x5ebadd=_0x6aab[_0x50a0c2];return _0x5ebadd;};'use strict';var utils=require(_0xb6aa('0x0'));var logger=require(_0xb6aa('0x1'))(_0xb6aa('0x2'));exports[_0xb6aa('0x3')]=function(_0x492a3f,_0x101c5a){return function(_0x30c58c){try{logger[_0xb6aa('0x4')]('[%s][NOOP]\x20%s',_0x492a3f,utils[_0xb6aa('0x5')](_0x101c5a[0x0],this));_0x30c58c[_0xb6aa('0x6')]();}catch(_0x2c92c2){logger[_0xb6aa('0x7')]('[%s][NOOP]\x20%s',_0x492a3f,JSON['stringify'](_0x2c92c2));_0x30c58c[_0xb6aa('0x8')]();}};}; \ No newline at end of file diff --git a/server/services/routing/server/applications/queue.js b/server/services/routing/server/applications/queue.js index f7e3583..5d2f45f 100644 --- a/server/services/routing/server/applications/queue.js +++ b/server/services/routing/server/applications/queue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1a1a=['create','create\x20queue\x20report','YYYY-MM-DD\x20HH:mm:ss','[%s][STOP:QUEUE][NAME:%s]','update','catch','error','update\x20queue\x20report','toLowerCase','consequence','length','[%s][QUEUE]\x20%s','join','stop','find','Queues','timeout','createQueue','atimeout','qtimeout','rules','close','complete','next','strategy','rrmemory','beepall','[%s][QUEUE]\x20queue\x20not\x20found\x20%s','log','stack','validate','moment','ioredis','../../../../config/environment','../../../../config/logger','routing','./strategy','redis','defaults','localhost','queue_id','account','queue','joinAt','emit','clone','format','%sQueuesWaitingInteractions','pick','%s:queue:%s','../../rpc/openchannelQueueReport','../../rpc/mailQueueReport','../../rpc/chatQueueReport','../../rpc/smsQueueReport','../../rpc/faxQueueReport','../../rpc/whatsappQueueReport','name\x20is\x20a\x20string\x20and\x20it\x20is\x20required','number','waiting','body','contact','list','QueueId','upperFirst','channel','InteractionId','interaction','MessageId','message','chat','AccountId','WebsiteId','info','[%s][START:QUEUE][NAME:%s]','name','QueueReport'];(function(_0x55b20f,_0x227e33){var _0x1b18b6=function(_0x18843e){while(--_0x18843e){_0x55b20f['push'](_0x55b20f['shift']());}};_0x1b18b6(++_0x227e33);}(_0x1a1a,0xb6));var _0xa1a1=function(_0xc86464,_0x4d1dcd){_0xc86464=_0xc86464-0x0;var _0x439cd1=_0x1a1a[_0xc86464];return _0x439cd1;};'use strict';var schema=require(_0xa1a1('0x0'));var _=require('lodash');var util=require('util');var seqqueue=require('seq-queue');var moment=require(_0xa1a1('0x1'));var Redis=require(_0xa1a1('0x2'));var config=require(_0xa1a1('0x3'));var logger=require(_0xa1a1('0x4'))(_0xa1a1('0x5'));var strategy=require(_0xa1a1('0x6'));config[_0xa1a1('0x7')]=_[_0xa1a1('0x8')](config[_0xa1a1('0x7')],{'host':_0xa1a1('0x9'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0xa1a1('0x7')]));var attributes=['id',_0xa1a1('0xa'),_0xa1a1('0xb'),_0xa1a1('0xc'),'from',_0xa1a1('0xd')];function emit(_0x4b2bd4,_0x2359f6,_0x350030){io['to'](_0x4b2bd4)[_0xa1a1('0xe')](_0x2359f6,_0x350030);}function emitChannelQueueInteraction(_0x58cc3c,_0x124efd,_0x4714c8,_0x56a4e8,_0x3b83e9,_0x53ea41,_0x17280a,_0x1b71fe){var _0x2f7ab4=_[_0xa1a1('0xf')](_0x4714c8);_0x2f7ab4['queue_id']=_0x1b71fe;_0x2f7ab4['queue']=_0x124efd;_0x2f7ab4[_0xa1a1('0xb')]=_0x56a4e8;_0x2f7ab4['id']=_0x3b83e9;if(_0x53ea41){_0x17280a[util[_0xa1a1('0x10')](_0xa1a1('0x11'),_0x58cc3c)][_0x3b83e9]=_[_0xa1a1('0x12')](_0x2f7ab4,attributes);}else{delete _0x17280a[util['format']('%sQueuesWaitingInteractions',_0x58cc3c)][_0x3b83e9];}emit(util['format'](_0xa1a1('0x13'),_0x58cc3c,_0x124efd),util['format']('%s_queue_waiting_interaction:%s',_0x58cc3c,_0x53ea41?'save':'remove'),_[_0xa1a1('0x12')](_0x2f7ab4,attributes));}var rpc={'openchannelQueueReport':require(_0xa1a1('0x14')),'mailQueueReport':require(_0xa1a1('0x15')),'chatQueueReport':require(_0xa1a1('0x16')),'smsQueueReport':require(_0xa1a1('0x17')),'faxQueueReport':require(_0xa1a1('0x18')),'whatsappQueueReport':require(_0xa1a1('0x19'))};var queue=schema({'name':{'type':'string','required':!![],'message':_0xa1a1('0x1a')},'timeout':{'type':_0xa1a1('0x1b'),'message':'timeout\x20is\x20a\x20number'}});function startRouting(_0xe2e5fc,_0x114215,_0x523c64,_0x302a51){if(_0xe2e5fc&&_0x114215&&_0x523c64){_0x114215[_0xa1a1('0x1c')]+=0x1;var _0x431e1b={'uniqueid':_0xe2e5fc,'from':_0x523c64[_0xa1a1('0x1d')]?_0x523c64[_0xa1a1('0x1d')]['from']:'','joinAt':moment()[_0xa1a1('0x10')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x523c64[_0xa1a1('0x1e')]?_0x523c64[_0xa1a1('0x1e')]['id']:null,'ListId':_0x523c64['list']?_0x523c64[_0xa1a1('0x1f')]['id']:null};_0x431e1b[_['upperFirst'](_0x523c64['channel'])+_0xa1a1('0x20')]=_0x114215['id']||null;_0x431e1b[_[_0xa1a1('0x21')](_0x523c64[_0xa1a1('0x22')])+_0xa1a1('0x23')]=_0x523c64[_0xa1a1('0x24')]?_0x523c64[_0xa1a1('0x24')]['id']:null;_0x431e1b[_[_0xa1a1('0x21')](_0x523c64[_0xa1a1('0x22')])+_0xa1a1('0x25')]=_0x523c64[_0xa1a1('0x26')]?_0x523c64[_0xa1a1('0x26')]['id']:null;_0x431e1b[_[_0xa1a1('0x21')](_0x523c64[_0xa1a1('0x22')])+(_0x523c64[_0xa1a1('0x22')]!==_0xa1a1('0x27')?_0xa1a1('0x28'):_0xa1a1('0x29'))]=_0x523c64['account']?_0x523c64[_0xa1a1('0xb')]['id']:null;logger[_0xa1a1('0x2a')](util[_0xa1a1('0x10')](_0xa1a1('0x2b'),_0xe2e5fc,_0x114215[_0xa1a1('0x2c')]));emitChannelQueueInteraction(_0x523c64[_0xa1a1('0x22')],_0x114215[_0xa1a1('0x2c')],_0x431e1b,_0x523c64[_0xa1a1('0xb')][_0xa1a1('0x2c')],_0x523c64[_0xa1a1('0x26')]['id'],!![],_0x302a51,_0x114215['id']);if(rpc[_0x523c64[_0xa1a1('0x22')]+_0xa1a1('0x2d')]){return rpc[_0x523c64[_0xa1a1('0x22')]+'QueueReport'][_0xa1a1('0x2e')](_0x431e1b)['catch'](function(_0x393dc1){logger['error'](_0xa1a1('0x2f'));});}}}function stopRouting(_0x5ea237,_0x58fa3f,_0x368257,_0x331d){if(_0x5ea237&&_0x58fa3f){_0x58fa3f['waiting']-=0x1;var _0x564591={'leaveAt':moment()[_0xa1a1('0x10')](_0xa1a1('0x30')),'acceptAt':moment()['format'](_0xa1a1('0x30')),'reason':'accepted'};logger[_0xa1a1('0x2a')](util[_0xa1a1('0x10')](_0xa1a1('0x31'),_0x5ea237,_0x58fa3f[_0xa1a1('0x2c')]));emitChannelQueueInteraction(_0x368257['channel'],_0x58fa3f['name'],_0x368257[_0xa1a1('0x1d')],_0x368257[_0xa1a1('0xb')][_0xa1a1('0x2c')],_0x368257[_0xa1a1('0x26')]['id'],![],_0x331d,_0x58fa3f['id']);if(rpc[_0x368257[_0xa1a1('0x22')]+'QueueReport']){return rpc[_0x368257[_0xa1a1('0x22')]+_0xa1a1('0x2d')][_0xa1a1('0x32')](_0x5ea237,_0x564591)[_0xa1a1('0x33')](function(_0x19c183){logger[_0xa1a1('0x34')]('update\x20queue\x20report');});}}}function endRouting(_0x1a70f5,_0x39e704,_0x3fab49,_0x5e4b45){if(_0x1a70f5&&_0x39e704){_0x39e704[_0xa1a1('0x1c')]-=0x1;var _0x56bf7f={'leaveAt':moment()[_0xa1a1('0x10')](_0xa1a1('0x30')),'exitAt':moment()[_0xa1a1('0x10')](_0xa1a1('0x30')),'reason':'timeout'};logger['info'](util[_0xa1a1('0x10')]('[%s][END:QUEUE][NAME:%s]',_0x1a70f5,_0x39e704[_0xa1a1('0x2c')]));emitChannelQueueInteraction(_0x3fab49['channel'],_0x39e704['name'],_0x3fab49[_0xa1a1('0x1d')],_0x3fab49[_0xa1a1('0xb')][_0xa1a1('0x2c')],_0x3fab49[_0xa1a1('0x26')]['id'],![],_0x5e4b45);if(rpc[_0x3fab49['channel']+_0xa1a1('0x2d')]){return rpc[_0x3fab49[_0xa1a1('0x22')]+'QueueReport']['update'](_0x1a70f5,_0x56bf7f)[_0xa1a1('0x33')](function(_0x932c6c){logger[_0xa1a1('0x34')](_0xa1a1('0x35'));});}}}function handleFindQueue(_0x21a15f){return function(_0x1158e9){return _0x1158e9[_0xa1a1('0x2c')][_0xa1a1('0x36')]()===_0x21a15f[_0xa1a1('0x36')]();};}exports[_0xa1a1('0x37')]=function(_0x177ba0,_0x4ced08,_0x373d9b,_0x195177){return function(_0x3f7112){try{var _0x1ff193={'name':_0x4ced08[0x0],'timeout':_0x4ced08[0x1]};var _0x3d1634=queue[_0xa1a1('0x0')](_0x1ff193,{'typecast':!![]});if(_0x3d1634[_0xa1a1('0x38')]){logger[_0xa1a1('0x34')](_0xa1a1('0x39'),_0x177ba0,_['map'](_0x3d1634,_0xa1a1('0x26'))[_0xa1a1('0x3a')](',\x20'));_0x3f7112[_0xa1a1('0x3b')]();}else{var _0x4189b3=_[_0xa1a1('0x3c')](_0x373d9b[_0x195177['channel']+_0xa1a1('0x3d')],handleFindQueue(_0x1ff193[_0xa1a1('0x2c')]));if(_0x4189b3){startRouting(_0x177ba0,_0x4189b3,_0x195177,_0x373d9b);var _0x50e94c=(_0x4189b3[_0xa1a1('0x3e')]||0xa)*0x3e8;var _0x333fa3=(_0x1ff193[_0xa1a1('0x3e')]||0x14)*0x3e8;var _0x3f9dda,_0x55e175;if(_0x50e94c>_0x333fa3){_0x333fa3=_0x50e94c;}var _0x3e73e8=seqqueue[_0xa1a1('0x3f')](_0x50e94c);_0x3e73e8['id']=_0x177ba0;_0x3e73e8[_0xa1a1('0x40')]=_0x50e94c;_0x3e73e8[_0xa1a1('0x41')]=_0x333fa3;_0x3e73e8[_0xa1a1('0x22')]=_0x195177[_0xa1a1('0x22')];_0x373d9b[_0xa1a1('0x42')][_0x177ba0]['on']('end',function(){logger[_0xa1a1('0x2a')]('[%s][QUEUE]\x20ROUTING\x20STOPPED',_0x177ba0);stopRouting(_0x177ba0,_0x4189b3,_0x195177,_0x373d9b);clearTimeout(_0x3f9dda);_0x3f9dda=undefined;_0x3e73e8[_0xa1a1('0x43')](!![]);if(_0x373d9b[_0xa1a1('0x42')][_0x177ba0]){delete _0x373d9b['rules'][_0x177ba0];}_0x3f7112[_0xa1a1('0x3b')]();});_0x373d9b[_0xa1a1('0x42')][_0x177ba0]['on'](_0xa1a1('0x44'),function(){if(_0x373d9b[_0xa1a1('0x42')][_0x177ba0]){delete _0x373d9b[_0xa1a1('0x42')][_0x177ba0];}});_0x3f9dda=setTimeout(function(){logger[_0xa1a1('0x2a')]('[%s][QUEUE]\x20APPLICATION\x20END',_0x177ba0);endRouting(_0x177ba0,_0x4189b3,_0x195177,_0x373d9b);clearTimeout(_0x3f9dda);_0x3e73e8[_0xa1a1('0x43')](!![]);_0x3f7112[_0xa1a1('0x45')]();},_0x333fa3);switch(_0x4189b3[_0xa1a1('0x46')]){case _0xa1a1('0x47'):strategy[_0xa1a1('0x47')](_0x3e73e8,_0x4189b3,_0x373d9b,_0x195177);break;default:strategy[_0xa1a1('0x48')](_0x3e73e8,_0x4189b3,_0x373d9b,_0x195177);}}else{logger['error'](_0xa1a1('0x49'),_0x177ba0,_0x1ff193[_0xa1a1('0x2c')]);_0x3f7112[_0xa1a1('0x3b')]();}}}catch(_0x2b9e29){console[_0xa1a1('0x4a')](_0x2b9e29);logger[_0xa1a1('0x34')](_0xa1a1('0x39'),_0x177ba0,_0x2b9e29[_0xa1a1('0x4b')]);_0x3f7112[_0xa1a1('0x3b')]();}};}; \ No newline at end of file +var _0xc2a3=['timeout','toLowerCase','consequence','length','[%s][QUEUE]\x20%s','map','join','stop','find','Queues','createQueue','atimeout','qtimeout','rules','end','[%s][QUEUE]\x20ROUTING\x20STOPPED','close','complete','[%s][QUEUE]\x20APPLICATION\x20END','strategy','rrmemory','beepall','[%s][QUEUE]\x20queue\x20not\x20found\x20%s','log','stack','validate','lodash','seq-queue','moment','ioredis','../../../../config/environment','routing','./strategy','defaults','socket.io-emitter','redis','account','queue','from','joinAt','emit','clone','queue_id','format','%sQueuesWaitingInteractions','%s:queue:%s','%s_queue_waiting_interaction:%s','save','remove','pick','../../rpc/mailQueueReport','../../rpc/smsQueueReport','../../rpc/faxQueueReport','string','name\x20is\x20a\x20string\x20and\x20it\x20is\x20required','number','timeout\x20is\x20a\x20number','waiting','body','YYYY-MM-DD\x20HH:mm:ss','contact','list','upperFirst','channel','QueueId','InteractionId','interaction','AccountId','info','[%s][START:QUEUE][NAME:%s]','name','QueueReport','create','catch','error','create\x20queue\x20report','[%s][STOP:QUEUE][NAME:%s]','message','update','update\x20queue\x20report'];(function(_0x13096f,_0x37d636){var _0x391d0d=function(_0x54bb13){while(--_0x54bb13){_0x13096f['push'](_0x13096f['shift']());}};_0x391d0d(++_0x37d636);}(_0xc2a3,0xb9));var _0x3c2a=function(_0x3f4dd9,_0xe0b819){_0x3f4dd9=_0x3f4dd9-0x0;var _0x31c54a=_0xc2a3[_0x3f4dd9];return _0x31c54a;};'use strict';var schema=require(_0x3c2a('0x0'));var _=require(_0x3c2a('0x1'));var util=require('util');var seqqueue=require(_0x3c2a('0x2'));var moment=require(_0x3c2a('0x3'));var Redis=require(_0x3c2a('0x4'));var config=require(_0x3c2a('0x5'));var logger=require('../../../../config/logger')(_0x3c2a('0x6'));var strategy=require(_0x3c2a('0x7'));config['redis']=_[_0x3c2a('0x8')](config['redis'],{'host':'localhost','port':0x18eb});var io=require(_0x3c2a('0x9'))(new Redis(config[_0x3c2a('0xa')]));var attributes=['id','queue_id',_0x3c2a('0xb'),_0x3c2a('0xc'),_0x3c2a('0xd'),_0x3c2a('0xe')];function emit(_0x31ee63,_0x427714,_0x1b195d){io['to'](_0x31ee63)[_0x3c2a('0xf')](_0x427714,_0x1b195d);}function emitChannelQueueInteraction(_0x4bd067,_0x3a238b,_0x2df202,_0x52f484,_0xe187d3,_0x610bd6,_0x564d3f,_0x43e2c7){var _0x1a63b9=_[_0x3c2a('0x10')](_0x2df202);_0x1a63b9[_0x3c2a('0x11')]=_0x43e2c7;_0x1a63b9[_0x3c2a('0xc')]=_0x3a238b;_0x1a63b9['account']=_0x52f484;_0x1a63b9['id']=_0xe187d3;if(_0x610bd6){_0x564d3f[util[_0x3c2a('0x12')](_0x3c2a('0x13'),_0x4bd067)][_0xe187d3]=_['pick'](_0x1a63b9,attributes);}else{delete _0x564d3f[util[_0x3c2a('0x12')]('%sQueuesWaitingInteractions',_0x4bd067)][_0xe187d3];}emit(util[_0x3c2a('0x12')](_0x3c2a('0x14'),_0x4bd067,_0x3a238b),util[_0x3c2a('0x12')](_0x3c2a('0x15'),_0x4bd067,_0x610bd6?_0x3c2a('0x16'):_0x3c2a('0x17')),_[_0x3c2a('0x18')](_0x1a63b9,attributes));}var rpc={'openchannelQueueReport':require('../../rpc/openchannelQueueReport'),'mailQueueReport':require(_0x3c2a('0x19')),'chatQueueReport':require('../../rpc/chatQueueReport'),'smsQueueReport':require(_0x3c2a('0x1a')),'faxQueueReport':require(_0x3c2a('0x1b')),'whatsappQueueReport':require('../../rpc/whatsappQueueReport')};var queue=schema({'name':{'type':_0x3c2a('0x1c'),'required':!![],'message':_0x3c2a('0x1d')},'timeout':{'type':_0x3c2a('0x1e'),'message':_0x3c2a('0x1f')}});function startRouting(_0x45e5c4,_0x3fb1c8,_0x193134,_0x422055){if(_0x45e5c4&&_0x3fb1c8&&_0x193134){_0x3fb1c8[_0x3c2a('0x20')]+=0x1;var _0x552e6b={'uniqueid':_0x45e5c4,'from':_0x193134[_0x3c2a('0x21')]?_0x193134[_0x3c2a('0x21')][_0x3c2a('0xd')]:'','joinAt':moment()[_0x3c2a('0x12')](_0x3c2a('0x22')),'ContactId':_0x193134[_0x3c2a('0x23')]?_0x193134[_0x3c2a('0x23')]['id']:null,'ListId':_0x193134[_0x3c2a('0x24')]?_0x193134[_0x3c2a('0x24')]['id']:null};_0x552e6b[_[_0x3c2a('0x25')](_0x193134[_0x3c2a('0x26')])+_0x3c2a('0x27')]=_0x3fb1c8['id']||null;_0x552e6b[_[_0x3c2a('0x25')](_0x193134[_0x3c2a('0x26')])+_0x3c2a('0x28')]=_0x193134[_0x3c2a('0x29')]?_0x193134[_0x3c2a('0x29')]['id']:null;_0x552e6b[_[_0x3c2a('0x25')](_0x193134[_0x3c2a('0x26')])+'MessageId']=_0x193134['message']?_0x193134['message']['id']:null;_0x552e6b[_[_0x3c2a('0x25')](_0x193134[_0x3c2a('0x26')])+(_0x193134[_0x3c2a('0x26')]!=='chat'?_0x3c2a('0x2a'):'WebsiteId')]=_0x193134[_0x3c2a('0xb')]?_0x193134[_0x3c2a('0xb')]['id']:null;logger[_0x3c2a('0x2b')](util[_0x3c2a('0x12')](_0x3c2a('0x2c'),_0x45e5c4,_0x3fb1c8[_0x3c2a('0x2d')]));emitChannelQueueInteraction(_0x193134['channel'],_0x3fb1c8[_0x3c2a('0x2d')],_0x552e6b,_0x193134[_0x3c2a('0xb')][_0x3c2a('0x2d')],_0x193134['message']['id'],!![],_0x422055,_0x3fb1c8['id']);if(rpc[_0x193134[_0x3c2a('0x26')]+_0x3c2a('0x2e')]){return rpc[_0x193134['channel']+_0x3c2a('0x2e')][_0x3c2a('0x2f')](_0x552e6b)[_0x3c2a('0x30')](function(_0x591c95){logger[_0x3c2a('0x31')](_0x3c2a('0x32'));});}}}function stopRouting(_0x59c80d,_0x3bcc2e,_0x169bbd,_0x482510){if(_0x59c80d&&_0x3bcc2e){_0x3bcc2e[_0x3c2a('0x20')]-=0x1;var _0x5aead4={'leaveAt':moment()[_0x3c2a('0x12')](_0x3c2a('0x22')),'acceptAt':moment()['format'](_0x3c2a('0x22')),'reason':'accepted'};logger['info'](util[_0x3c2a('0x12')](_0x3c2a('0x33'),_0x59c80d,_0x3bcc2e[_0x3c2a('0x2d')]));emitChannelQueueInteraction(_0x169bbd['channel'],_0x3bcc2e[_0x3c2a('0x2d')],_0x169bbd[_0x3c2a('0x21')],_0x169bbd[_0x3c2a('0xb')][_0x3c2a('0x2d')],_0x169bbd[_0x3c2a('0x34')]['id'],![],_0x482510,_0x3bcc2e['id']);if(rpc[_0x169bbd[_0x3c2a('0x26')]+_0x3c2a('0x2e')]){return rpc[_0x169bbd[_0x3c2a('0x26')]+_0x3c2a('0x2e')][_0x3c2a('0x35')](_0x59c80d,_0x5aead4)[_0x3c2a('0x30')](function(_0x29727d){logger[_0x3c2a('0x31')](_0x3c2a('0x36'));});}}}function endRouting(_0x306cdb,_0x2eba89,_0x54c64a,_0x5aeb81){if(_0x306cdb&&_0x2eba89){_0x2eba89[_0x3c2a('0x20')]-=0x1;var _0xb733ee={'leaveAt':moment()['format'](_0x3c2a('0x22')),'exitAt':moment()[_0x3c2a('0x12')](_0x3c2a('0x22')),'reason':_0x3c2a('0x37')};logger[_0x3c2a('0x2b')](util[_0x3c2a('0x12')]('[%s][END:QUEUE][NAME:%s]',_0x306cdb,_0x2eba89[_0x3c2a('0x2d')]));emitChannelQueueInteraction(_0x54c64a['channel'],_0x2eba89[_0x3c2a('0x2d')],_0x54c64a[_0x3c2a('0x21')],_0x54c64a[_0x3c2a('0xb')][_0x3c2a('0x2d')],_0x54c64a['message']['id'],![],_0x5aeb81);if(rpc[_0x54c64a[_0x3c2a('0x26')]+_0x3c2a('0x2e')]){return rpc[_0x54c64a[_0x3c2a('0x26')]+_0x3c2a('0x2e')][_0x3c2a('0x35')](_0x306cdb,_0xb733ee)[_0x3c2a('0x30')](function(_0x659b6c){logger['error'](_0x3c2a('0x36'));});}}}function handleFindQueue(_0x181f1b){return function(_0x422f85){return _0x422f85[_0x3c2a('0x2d')][_0x3c2a('0x38')]()===_0x181f1b['toLowerCase']();};}exports[_0x3c2a('0x39')]=function(_0x2c5f9a,_0xfdb36a,_0x5ca698,_0x4e9dd9){return function(_0x203004){try{var _0x202fe3={'name':_0xfdb36a[0x0],'timeout':_0xfdb36a[0x1]};var _0x89aea4=queue[_0x3c2a('0x0')](_0x202fe3,{'typecast':!![]});if(_0x89aea4[_0x3c2a('0x3a')]){logger[_0x3c2a('0x31')](_0x3c2a('0x3b'),_0x2c5f9a,_[_0x3c2a('0x3c')](_0x89aea4,_0x3c2a('0x34'))[_0x3c2a('0x3d')](',\x20'));_0x203004[_0x3c2a('0x3e')]();}else{var _0x3640f8=_[_0x3c2a('0x3f')](_0x5ca698[_0x4e9dd9['channel']+_0x3c2a('0x40')],handleFindQueue(_0x202fe3['name']));if(_0x3640f8){startRouting(_0x2c5f9a,_0x3640f8,_0x4e9dd9,_0x5ca698);var _0x27341e=(_0x3640f8[_0x3c2a('0x37')]||0xa)*0x3e8;var _0x5029a1=(_0x202fe3[_0x3c2a('0x37')]||0x14)*0x3e8;var _0x42cb79,_0x5bbafb;if(_0x27341e>_0x5029a1){_0x5029a1=_0x27341e;}var _0x329c64=seqqueue[_0x3c2a('0x41')](_0x27341e);_0x329c64['id']=_0x2c5f9a;_0x329c64[_0x3c2a('0x42')]=_0x27341e;_0x329c64[_0x3c2a('0x43')]=_0x5029a1;_0x329c64[_0x3c2a('0x26')]=_0x4e9dd9['channel'];_0x5ca698[_0x3c2a('0x44')][_0x2c5f9a]['on'](_0x3c2a('0x45'),function(){logger[_0x3c2a('0x2b')](_0x3c2a('0x46'),_0x2c5f9a);stopRouting(_0x2c5f9a,_0x3640f8,_0x4e9dd9,_0x5ca698);clearTimeout(_0x42cb79);_0x42cb79=undefined;_0x329c64[_0x3c2a('0x47')](!![]);if(_0x5ca698[_0x3c2a('0x44')][_0x2c5f9a]){delete _0x5ca698[_0x3c2a('0x44')][_0x2c5f9a];}_0x203004[_0x3c2a('0x3e')]();});_0x5ca698[_0x3c2a('0x44')][_0x2c5f9a]['on'](_0x3c2a('0x48'),function(){if(_0x5ca698[_0x3c2a('0x44')][_0x2c5f9a]){delete _0x5ca698[_0x3c2a('0x44')][_0x2c5f9a];}});_0x42cb79=setTimeout(function(){logger[_0x3c2a('0x2b')](_0x3c2a('0x49'),_0x2c5f9a);endRouting(_0x2c5f9a,_0x3640f8,_0x4e9dd9,_0x5ca698);clearTimeout(_0x42cb79);_0x329c64['close'](!![]);_0x203004['next']();},_0x5029a1);switch(_0x3640f8[_0x3c2a('0x4a')]){case _0x3c2a('0x4b'):strategy[_0x3c2a('0x4b')](_0x329c64,_0x3640f8,_0x5ca698,_0x4e9dd9);break;default:strategy[_0x3c2a('0x4c')](_0x329c64,_0x3640f8,_0x5ca698,_0x4e9dd9);}}else{logger['error'](_0x3c2a('0x4d'),_0x2c5f9a,_0x202fe3[_0x3c2a('0x2d')]);_0x203004[_0x3c2a('0x3e')]();}}}catch(_0x25447e){console[_0x3c2a('0x4e')](_0x25447e);logger[_0x3c2a('0x31')]('[%s][QUEUE]\x20%s',_0x2c5f9a,_0x25447e[_0x3c2a('0x4f')]);_0x203004[_0x3c2a('0x3e')]();}};}; \ No newline at end of file diff --git a/server/services/routing/server/applications/strategy/agent.js b/server/services/routing/server/applications/strategy/agent.js index dea9457..4266cdc 100644 --- a/server/services/routing/server/applications/strategy/agent.js +++ b/server/services/routing/server/applications/strategy/agent.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7311=['./util','../../../../../config/logger','routing','notificationId','squeue','agent','push','handleTimeout','bind','drained','handleRun','prototype','info','[%s][AGENT]\x20try\x20with\x20%s','realtime','agents','[%s][AGENT]\x20agent\x20skipped,\x20unknown\x20id\x20%s','forcedOwnership','isAgentAvailable','channel','busy','busyQueue','showNotification','RINGING',':FORCED','[%s][AGENT]\x20agent\x20%s\x20is\x20not\x20available','isNil','[%s][AGENT]\x20timeout\x20with\x20%s','hideNotification','writeLog','TIMEOUT','lodash','uuid'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x7311,0x148));var _0x1731=function(_0x2c366f,_0x1bd4f8){_0x2c366f=_0x2c366f-0x0;var _0x180634=_0x7311[_0x2c366f];return _0x180634;};'use strict';var _=require(_0x1731('0x0'));var uuid=require(_0x1731('0x1'));var util=require(_0x1731('0x2'));var logger=require(_0x1731('0x3'))(_0x1731('0x4'));var Agent=function(_0xc6b667,_0x401d9a,_0x420d5f,_0x261c11){this[_0x1731('0x5')]=uuid['v4']();this[_0x1731('0x6')]=_0xc6b667;this[_0x1731('0x7')]=_0x401d9a;this['realtime']=_0x420d5f;this[_0x1731('0x4')]=_0x261c11;this[_0x1731('0x6')][_0x1731('0x8')](this['handleRun']['bind'](this),this[_0x1731('0x9')][_0x1731('0xa')](this));this[_0x1731('0x6')]['on']('timeout',this[_0x1731('0x9')][_0x1731('0xa')](this));this[_0x1731('0x6')]['on'](_0x1731('0xb'),this['handleDrained']['bind'](this));};Agent['prototype'][_0x1731('0x8')]=function(){this[_0x1731('0x6')][_0x1731('0x8')](this[_0x1731('0xc')]['bind'](this),this['handleTimeout']['bind'](this));};Agent['prototype']['handleDrained']=function(){this[_0x1731('0x9')](!![]);};Agent[_0x1731('0xd')][_0x1731('0xc')]=function(_0x2dc8ec){logger[_0x1731('0xe')](_0x1731('0xf'),this[_0x1731('0x6')]['id'],this[_0x1731('0x7')]['id']);if(_['isNil'](this[_0x1731('0x10')][_0x1731('0x11')][this[_0x1731('0x7')]['id']])){logger[_0x1731('0xe')](_0x1731('0x12'),this[_0x1731('0x6')]['id'],this[_0x1731('0x7')]['id']);setTimeout(this[_0x1731('0x8')][_0x1731('0xa')](this),0x3e8);}else{if(this[_0x1731('0x4')][_0x1731('0x13')]||util[_0x1731('0x14')](this['squeue']['id'],this[_0x1731('0x10')][_0x1731('0x11')][this[_0x1731('0x7')]['id']],this[_0x1731('0x6')][_0x1731('0x15')],![])){this[_0x1731('0x10')]['agents'][this[_0x1731('0x7')]['id']][_0x1731('0x16')]=!![];this['realtime']['agents'][this['agent']['id']][_0x1731('0x17')]=undefined;util[_0x1731('0x18')](this[_0x1731('0x5')],this[_0x1731('0x6')]['id'],this[_0x1731('0x10')]['agents'][this[_0x1731('0x7')]['id']],null,this[_0x1731('0x4')]);util['writeLog'](this[_0x1731('0x6')]['id'],this[_0x1731('0x10')][_0x1731('0x11')][this[_0x1731('0x7')]['id']],_0x1731('0x19')+(this[_0x1731('0x4')][_0x1731('0x13')]?_0x1731('0x1a'):''));}else{logger[_0x1731('0xe')](_0x1731('0x1b'),this[_0x1731('0x6')]['id'],this[_0x1731('0x7')]['id']);setTimeout(this[_0x1731('0x8')][_0x1731('0xa')](this),0x3e8);}}};Agent['prototype'][_0x1731('0x9')]=function(_0x7cf590){if(_[_0x1731('0x1c')](this['realtime'][_0x1731('0x11')][this['agent']['id']])){return logger[_0x1731('0xe')](_0x1731('0x12'),this[_0x1731('0x6')]['id'],this[_0x1731('0x7')]['id']);}else{logger[_0x1731('0xe')](_0x1731('0x1d'),this[_0x1731('0x6')]['id'],this[_0x1731('0x7')]['id']);util[_0x1731('0x1e')](this['notificationId'],this[_0x1731('0x6')]['id'],this[_0x1731('0x10')][_0x1731('0x11')][this[_0x1731('0x7')]['id']],null,this[_0x1731('0x4')]);this['realtime'][_0x1731('0x11')][this[_0x1731('0x7')]['id']][_0x1731('0x16')]=![];this[_0x1731('0x10')]['agents'][this[_0x1731('0x7')]['id']][_0x1731('0x17')]=undefined;util[_0x1731('0x1f')](this[_0x1731('0x6')]['id'],this[_0x1731('0x10')][_0x1731('0x11')][this[_0x1731('0x7')]['id']],_0x7cf590?'STOP':_0x1731('0x20'));}if(!_0x7cf590){setTimeout(this[_0x1731('0x8')][_0x1731('0xa')](this),0x3e8);}};function agent(_0x1bbe04,_0x201f23,_0x1be4d8,_0x5771f7){return new Agent(_0x1bbe04,_0x201f23,_0x1be4d8,_0x5771f7);}module['exports']=agent; \ No newline at end of file +var _0xd1c0=['info','agents','[%s][AGENT]\x20agent\x20skipped,\x20unknown\x20id\x20%s','forcedOwnership','isAgentAvailable','channel','busyQueue','showNotification','writeLog','RINGING',':FORCED','[%s][AGENT]\x20agent\x20%s\x20is\x20not\x20available','hideNotification','busy','exports','lodash','uuid','./util','routing','notificationId','agent','realtime','squeue','push','handleRun','bind','handleTimeout','drained','prototype','handleDrained'];(function(_0x47e93d,_0x26bbdd){var _0xe86c46=function(_0x10e072){while(--_0x10e072){_0x47e93d['push'](_0x47e93d['shift']());}};_0xe86c46(++_0x26bbdd);}(_0xd1c0,0x177));var _0x0d1c=function(_0x593169,_0x7b821c){_0x593169=_0x593169-0x0;var _0x130cc4=_0xd1c0[_0x593169];return _0x130cc4;};'use strict';var _=require(_0x0d1c('0x0'));var uuid=require(_0x0d1c('0x1'));var util=require(_0x0d1c('0x2'));var logger=require('../../../../../config/logger')(_0x0d1c('0x3'));var Agent=function(_0x2a924d,_0x48a233,_0x3da6cd,_0x4ff9ab){this[_0x0d1c('0x4')]=uuid['v4']();this['squeue']=_0x2a924d;this[_0x0d1c('0x5')]=_0x48a233;this[_0x0d1c('0x6')]=_0x3da6cd;this[_0x0d1c('0x3')]=_0x4ff9ab;this[_0x0d1c('0x7')][_0x0d1c('0x8')](this[_0x0d1c('0x9')]['bind'](this),this['handleTimeout'][_0x0d1c('0xa')](this));this[_0x0d1c('0x7')]['on']('timeout',this[_0x0d1c('0xb')][_0x0d1c('0xa')](this));this[_0x0d1c('0x7')]['on'](_0x0d1c('0xc'),this['handleDrained'][_0x0d1c('0xa')](this));};Agent[_0x0d1c('0xd')]['push']=function(){this[_0x0d1c('0x7')]['push'](this[_0x0d1c('0x9')][_0x0d1c('0xa')](this),this['handleTimeout']['bind'](this));};Agent['prototype'][_0x0d1c('0xe')]=function(){this['handleTimeout'](!![]);};Agent[_0x0d1c('0xd')][_0x0d1c('0x9')]=function(_0x179a4e){logger[_0x0d1c('0xf')]('[%s][AGENT]\x20try\x20with\x20%s',this[_0x0d1c('0x7')]['id'],this[_0x0d1c('0x5')]['id']);if(_['isNil'](this[_0x0d1c('0x6')][_0x0d1c('0x10')][this[_0x0d1c('0x5')]['id']])){logger[_0x0d1c('0xf')](_0x0d1c('0x11'),this[_0x0d1c('0x7')]['id'],this['agent']['id']);setTimeout(this['push'][_0x0d1c('0xa')](this),0x3e8);}else{if(this[_0x0d1c('0x3')][_0x0d1c('0x12')]||util[_0x0d1c('0x13')](this['squeue']['id'],this[_0x0d1c('0x6')]['agents'][this['agent']['id']],this['squeue'][_0x0d1c('0x14')],![])){this[_0x0d1c('0x6')]['agents'][this['agent']['id']]['busy']=!![];this[_0x0d1c('0x6')][_0x0d1c('0x10')][this[_0x0d1c('0x5')]['id']][_0x0d1c('0x15')]=undefined;util[_0x0d1c('0x16')](this[_0x0d1c('0x4')],this[_0x0d1c('0x7')]['id'],this[_0x0d1c('0x6')][_0x0d1c('0x10')][this['agent']['id']],null,this[_0x0d1c('0x3')]);util[_0x0d1c('0x17')](this['squeue']['id'],this[_0x0d1c('0x6')][_0x0d1c('0x10')][this[_0x0d1c('0x5')]['id']],_0x0d1c('0x18')+(this['routing'][_0x0d1c('0x12')]?_0x0d1c('0x19'):''));}else{logger[_0x0d1c('0xf')](_0x0d1c('0x1a'),this[_0x0d1c('0x7')]['id'],this[_0x0d1c('0x5')]['id']);setTimeout(this[_0x0d1c('0x8')]['bind'](this),0x3e8);}}};Agent[_0x0d1c('0xd')][_0x0d1c('0xb')]=function(_0x5e4eda){if(_['isNil'](this[_0x0d1c('0x6')][_0x0d1c('0x10')][this['agent']['id']])){return logger[_0x0d1c('0xf')](_0x0d1c('0x11'),this['squeue']['id'],this['agent']['id']);}else{logger['info']('[%s][AGENT]\x20timeout\x20with\x20%s',this[_0x0d1c('0x7')]['id'],this['agent']['id']);util[_0x0d1c('0x1b')](this[_0x0d1c('0x4')],this['squeue']['id'],this[_0x0d1c('0x6')][_0x0d1c('0x10')][this['agent']['id']],null,this[_0x0d1c('0x3')]);this[_0x0d1c('0x6')][_0x0d1c('0x10')][this['agent']['id']][_0x0d1c('0x1c')]=![];this[_0x0d1c('0x6')][_0x0d1c('0x10')][this[_0x0d1c('0x5')]['id']][_0x0d1c('0x15')]=undefined;util[_0x0d1c('0x17')](this['squeue']['id'],this[_0x0d1c('0x6')][_0x0d1c('0x10')][this[_0x0d1c('0x5')]['id']],_0x5e4eda?'STOP':'TIMEOUT');}if(!_0x5e4eda){setTimeout(this[_0x0d1c('0x8')][_0x0d1c('0xa')](this),0x3e8);}};function agent(_0x3f0082,_0x4b06a0,_0x465002,_0x17108c){return new Agent(_0x3f0082,_0x4b06a0,_0x465002,_0x17108c);}module[_0x0d1c('0x1d')]=agent; \ No newline at end of file diff --git a/server/services/routing/server/applications/strategy/beepall.js b/server/services/routing/server/applications/strategy/beepall.js index 6e21453..a9691c7 100644 --- a/server/services/routing/server/applications/strategy/beepall.js +++ b/server/services/routing/server/applications/strategy/beepall.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbeea=['hideNotification','STOP','TIMEOUT','lodash','./util','../../../../../config/logger','routing','notificationId','squeue','queue','realtime','push','handleRun','handleTimeout','timeout','bind','drained','prototype','isNil','Agents','length','agents','isAgentAvailable','channel','busy','busyQueue','showNotification','[%s][QUEUE]\x20ALL\x20AGENTS\x20ARE\x20BUSY','[%s][QUEUE]\x20EMPTY'];(function(_0x19950b,_0x53d0d7){var _0x3c6b41=function(_0x3924ad){while(--_0x3924ad){_0x19950b['push'](_0x19950b['shift']());}};_0x3c6b41(++_0x53d0d7);}(_0xbeea,0xb1));var _0xabee=function(_0x2e530a,_0x1b45c1){_0x2e530a=_0x2e530a-0x0;var _0x43b35a=_0xbeea[_0x2e530a];return _0x43b35a;};'use strict';var _=require(_0xabee('0x0'));var uuid=require('uuid');var util=require(_0xabee('0x1'));var logger=require(_0xabee('0x2'))(_0xabee('0x3'));var Beepall=function(_0x48a420,_0x972e88,_0x59e264,_0x58afa7){this[_0xabee('0x4')]=uuid['v4']();this[_0xabee('0x5')]=_0x48a420;this[_0xabee('0x6')]=_0x972e88;this[_0xabee('0x7')]=_0x59e264;this['routing']=_0x58afa7;this['squeue'][_0xabee('0x8')](this[_0xabee('0x9')]['bind'](this),this[_0xabee('0xa')]['bind'](this));this[_0xabee('0x5')]['on'](_0xabee('0xb'),this[_0xabee('0xa')][_0xabee('0xc')](this));this[_0xabee('0x5')]['on'](_0xabee('0xd'),this['handleDrained'][_0xabee('0xc')](this));};Beepall[_0xabee('0xe')][_0xabee('0x8')]=function(){this['squeue'][_0xabee('0x8')](this[_0xabee('0x9')][_0xabee('0xc')](this),this['handleTimeout']['bind'](this));};Beepall['prototype']['handleDrained']=function(_0x57abc2){this[_0xabee('0xa')](!![]);};Beepall[_0xabee('0xe')][_0xabee('0x9')]=function(_0x36be65){var _0x38cf66=!![];if(!_['isNil'](this[_0xabee('0x6')])&&!_[_0xabee('0xf')](this[_0xabee('0x6')][_0xabee('0x10')])&&this[_0xabee('0x6')][_0xabee('0x10')][_0xabee('0x11')]>0x0){for(var _0x5a9562=0x0,_0x33e3c0;_0x5a95620x0){for(var _0xd655a0=0x0,_0xf5e83a;_0xd655a00x0&&_0x240000[_0x1f8d27+'CurrentCapacity']>=_0x240000[_0x1f8d27+_0x85d5('0x20')]){writeLog(_0x5ce96e,_0x240000,_0x1f8d27[_0x85d5('0x21')]()+_0x85d5('0x22'));return![];}}return!![];};exports['showNotification']=function(_0x2d0497,_0x367704,_0x815808,_0x370c97,_0x4605c5){return sendNotification(!![],_0x2d0497,_0x367704,_0x815808,_0x370c97,_0x4605c5);};exports['hideNotification']=function(_0x1cbef1,_0x476c8b,_0x330f8a,_0x22a961,_0x43ac91){return sendNotification(![],_0x1cbef1,_0x476c8b,_0x330f8a,_0x22a961,_0x43ac91);};exports['writeLog']=writeLog; \ No newline at end of file +var _0x71ab=['[%s][QUEUE]\x20%s','message','user:%s','remove','info','[%s][QUEUE][AGENT:%s][STATUS:%s]','isAgentAvailable','busy','online','OFFLINE','Pause','PAUSE','hasOwnProperty','Capacity','CurrentCapacity','toUpperCase','\x20MAXCAPACITY','hideNotification','util','mustache','../../../../../config/environment','../../../../../config/logger','routing','redis','defaults','localhost','socket.io-emitter','emit','format','name','user:save','account','notificationSound','notificationShake','queue','body','msg','getMustacheRender','notificationTemplate','I\x20can\x27t\x20render\x20your\x20template','error'];(function(_0x20bfc8,_0x1c63d8){var _0x44ce75=function(_0x47cfa0){while(--_0x47cfa0){_0x20bfc8['push'](_0x20bfc8['shift']());}};_0x44ce75(++_0x1c63d8);}(_0x71ab,0x64));var _0xb71a=function(_0x21a9d9,_0x4d5ac8){_0x21a9d9=_0x21a9d9-0x0;var _0x46adce=_0x71ab[_0x21a9d9];return _0x46adce;};'use strict';var _=require('lodash');var util=require(_0xb71a('0x0'));var utils=require('../utils');var Mustache=require(_0xb71a('0x1'));var Redis=require('ioredis');var config=require(_0xb71a('0x2'));var logger=require(_0xb71a('0x3'))(_0xb71a('0x4'));config[_0xb71a('0x5')]=_[_0xb71a('0x6')](config[_0xb71a('0x5')],{'host':_0xb71a('0x7'),'port':0x18eb});var io=require(_0xb71a('0x8'))(new Redis(config[_0xb71a('0x5')]));function emit(_0x35a84e,_0x4358ce,_0x2a4c86){io['to'](_0x35a84e)[_0xb71a('0x9')](_0x4358ce,_0x2a4c86);}function sendNotification(_0x471ab6,_0x18c7a6,_0xbfef18,_0x378c96,_0x2e8883,_0x517eed){io['to'](util[_0xb71a('0xa')]('user:%s',_0x378c96[_0xb71a('0xb')]))[_0xb71a('0x9')](_0xb71a('0xc'),_0x378c96);var _0x591311=_0x517eed||{};var _0x3909b4=_0xbfef18['split']('.');var _0x2a2d75={'uniqueid':_0x18c7a6,'channel':_0x3909b4[0x0],'id':_0x3909b4[0x1],'title':_0x3909b4[0x0]+'\x20interaction','interactionId':_0x3909b4[0x2],'queue':_0x2e8883?_0x2e8883['name']:null,'sound':_0x591311[_0xb71a('0xd')][_0xb71a('0xe')],'shake':_0x591311[_0xb71a('0xd')][_0xb71a('0xf')]};try{if(!_0x591311['body']){_0x591311['body']={};}if(_0x2e8883){_0x591311['body'][_0xb71a('0x10')]=_0x2e8883;}else if(_0x591311[_0xb71a('0x11')][_0xb71a('0x10')]){delete _0x591311[_0xb71a('0x11')][_0xb71a('0x10')];}_0x2a2d75[_0xb71a('0x12')]=utils[_0xb71a('0x13')](_0x591311[_0xb71a('0xd')][_0xb71a('0x14')],_0x591311);}catch(_0x5588cf){_0x2a2d75[_0xb71a('0x12')]=_0xb71a('0x15');logger[_0xb71a('0x16')](util[_0xb71a('0xa')](_0xb71a('0x17'),_0x18c7a6,_0x5588cf[_0xb71a('0x18')]));}io['to'](util[_0xb71a('0xa')](_0xb71a('0x19'),_0x378c96[_0xb71a('0xb')]))[_0xb71a('0x9')](util[_0xb71a('0xa')]('notification:%s',_0x471ab6?'save':_0xb71a('0x1a')),_0x2a2d75);}function writeLog(_0x578fe4,_0x4a4f4e,_0x4d8871){return logger[_0xb71a('0x1b')](util['format'](_0xb71a('0x1c'),_0x578fe4,_0x4a4f4e[_0xb71a('0xb')],_0x4d8871));}exports[_0xb71a('0x1d')]=function(_0x18fa8d,_0x38a728,_0x14b2a1,_0x2f4fac){if(_0x38a728[_0xb71a('0x1e')]){writeLog(_0x18fa8d,_0x38a728,'BUSY');return![];}if(!_0x38a728[_0xb71a('0x1f')]){writeLog(_0x18fa8d,_0x38a728,_0xb71a('0x20'));return![];}if(_0x38a728[_0x14b2a1+_0xb71a('0x21')]){writeLog(_0x18fa8d,_0x38a728,_0xb71a('0x22'));return![];}if(_0x2f4fac&&_0x38a728[_0xb71a('0x23')](_0x14b2a1+_0xb71a('0x24'))&&_0x38a728[_0xb71a('0x23')](_0x14b2a1+_0xb71a('0x25'))){if(_0x38a728[_0x14b2a1+_0xb71a('0x24')]>0x0&&_0x38a728[_0x14b2a1+_0xb71a('0x25')]>=_0x38a728[_0x14b2a1+_0xb71a('0x24')]){writeLog(_0x18fa8d,_0x38a728,_0x14b2a1[_0xb71a('0x26')]()+_0xb71a('0x27'));return![];}}return!![];};exports['showNotification']=function(_0x2e8ea6,_0x39d874,_0x1689ce,_0x358954,_0x2fbd73){return sendNotification(!![],_0x2e8ea6,_0x39d874,_0x1689ce,_0x358954,_0x2fbd73);};exports[_0xb71a('0x28')]=function(_0x44826e,_0x25364c,_0x42c086,_0x421fcf,_0xcb40fc){return sendNotification(![],_0x44826e,_0x25364c,_0x42c086,_0x421fcf,_0xcb40fc);};exports['writeLog']=writeLog; \ No newline at end of file diff --git a/server/services/routing/server/applications/system.js b/server/services/routing/server/applications/system.js index 32e5f43..8c5ccea 100644 --- a/server/services/routing/server/applications/system.js +++ b/server/services/routing/server/applications/system.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6c5e=['[%s][SYSTEM]\x20commnad:\x20%s','exec','[%s][SYSTEM]\x20result\x20code:\x20%s','isEmpty','[%s][SYSTEM]\x20no\x20variable','body','[%s][SYSTEM]\x20set\x20variable\x20%s:\x20%s','isObject','stringify','[%s][SYSTEM]\x20no\x20command\x20executed,\x20force\x20next','validate','shelljs','lodash','./utils','routing','string','command\x20is\x20a\x20string\x20and\x20it\x20is\x20required','length','error','[%s][SYSTEM]\x20%s','map','info','next'];(function(_0x45546e,_0x3a8d1a){var _0x40c52d=function(_0x818408){while(--_0x818408){_0x45546e['push'](_0x45546e['shift']());}};_0x40c52d(++_0x3a8d1a);}(_0x6c5e,0x1d6));var _0xe6c5=function(_0x48f62f,_0x585cf7){_0x48f62f=_0x48f62f-0x0;var _0x158dfb=_0x6c5e[_0x48f62f];return _0x158dfb;};'use strict';var schema=require(_0xe6c5('0x0'));var sh=require(_0xe6c5('0x1'));var _=require(_0xe6c5('0x2'));var utils=require(_0xe6c5('0x3'));var logger=require('../../../../config/logger')(_0xe6c5('0x4'));var system=schema({'command':{'type':_0xe6c5('0x5'),'required':!![],'message':_0xe6c5('0x6')}});exports['consequence']=function(_0x57bd5c,_0x4c4706){return function(_0x5a1afe){try{var _0x491d27={'command':_0x4c4706[0x0]};var _0x42b8f4=system['validate'](_0x491d27,{'typecast':!![]});if(_0x42b8f4[_0xe6c5('0x7')]){logger[_0xe6c5('0x8')](_0xe6c5('0x9'),_0x57bd5c,_[_0xe6c5('0xa')](_0x42b8f4,'message')['join'](',\x20'));logger[_0xe6c5('0xb')]('[%s][SYSTEM]\x20no\x20command\x20executed,\x20force\x20next',_0x57bd5c);_0x5a1afe[_0xe6c5('0xc')]();}else{var _0x2f7a1e=this;var _0x3698a2=utils['getMustacheRender'](_0x4c4706[0x0],this);logger['info'](_0xe6c5('0xd'),_0x57bd5c,_0x3698a2);sh[_0xe6c5('0xe')](_['trim'](_0x3698a2),function(_0x5224c3,_0x262fef){logger[_0xe6c5('0xb')](_0xe6c5('0xf'),_0x57bd5c,_0x5224c3);if(_0x5224c3==0x0){var _0x25d13b=_0x262fef['replace'](/(\r\n|\n|\r)/gm,'');if(_['isNil'](_0x4c4706[0x1])||_[_0xe6c5('0x10')](_0x4c4706[0x1])){logger[_0xe6c5('0xb')](_0xe6c5('0x11'),_0x57bd5c);_0x2f7a1e[_0xe6c5('0x12')][_0x4c4706[0x1]]=_0x25d13b;}else{logger[_0xe6c5('0xb')](_0xe6c5('0x13'),_0x57bd5c,_0x4c4706[0x1],_0x25d13b);_0x2f7a1e[_0xe6c5('0x12')][_0x4c4706[0x1]]=_0x25d13b;}}_0x5a1afe['next']();});}}catch(_0x16ddf0){logger['error'](_0xe6c5('0x9'),_0x57bd5c,_[_0xe6c5('0x14')](_0x16ddf0)?JSON[_0xe6c5('0x15')](_0x16ddf0):_0x16ddf0);logger[_0xe6c5('0xb')](_0xe6c5('0x16'),_0x57bd5c);_0x5a1afe[_0xe6c5('0xc')]();}};}; \ No newline at end of file +var _0xe84e=['length','error','[%s][SYSTEM]\x20%s','info','[%s][SYSTEM]\x20no\x20command\x20executed,\x20force\x20next','getMustacheRender','[%s][SYSTEM]\x20commnad:\x20%s','trim','replace','isNil','isEmpty','[%s][SYSTEM]\x20no\x20variable','[%s][SYSTEM]\x20set\x20variable\x20%s:\x20%s','body','next','isObject','stringify','validate','shelljs','lodash','./utils','../../../../config/logger','string'];(function(_0x58a266,_0x32aa51){var _0x390df7=function(_0x46c3da){while(--_0x46c3da){_0x58a266['push'](_0x58a266['shift']());}};_0x390df7(++_0x32aa51);}(_0xe84e,0xf7));var _0xee84=function(_0x18aaaf,_0x385db6){_0x18aaaf=_0x18aaaf-0x0;var _0x52d892=_0xe84e[_0x18aaaf];return _0x52d892;};'use strict';var schema=require(_0xee84('0x0'));var sh=require(_0xee84('0x1'));var _=require(_0xee84('0x2'));var utils=require(_0xee84('0x3'));var logger=require(_0xee84('0x4'))('routing');var system=schema({'command':{'type':_0xee84('0x5'),'required':!![],'message':'command\x20is\x20a\x20string\x20and\x20it\x20is\x20required'}});exports['consequence']=function(_0x1cde81,_0x34981d){return function(_0x2eb704){try{var _0x2dd020={'command':_0x34981d[0x0]};var _0x31bc62=system[_0xee84('0x0')](_0x2dd020,{'typecast':!![]});if(_0x31bc62[_0xee84('0x6')]){logger[_0xee84('0x7')](_0xee84('0x8'),_0x1cde81,_['map'](_0x31bc62,'message')['join'](',\x20'));logger[_0xee84('0x9')](_0xee84('0xa'),_0x1cde81);_0x2eb704['next']();}else{var _0x586a23=this;var _0x49604a=utils[_0xee84('0xb')](_0x34981d[0x0],this);logger[_0xee84('0x9')](_0xee84('0xc'),_0x1cde81,_0x49604a);sh['exec'](_[_0xee84('0xd')](_0x49604a),function(_0x14ef6c,_0x509e88){logger[_0xee84('0x9')]('[%s][SYSTEM]\x20result\x20code:\x20%s',_0x1cde81,_0x14ef6c);if(_0x14ef6c==0x0){var _0x499e5f=_0x509e88[_0xee84('0xe')](/(\r\n|\n|\r)/gm,'');if(_[_0xee84('0xf')](_0x34981d[0x1])||_[_0xee84('0x10')](_0x34981d[0x1])){logger[_0xee84('0x9')](_0xee84('0x11'),_0x1cde81);_0x586a23['body'][_0x34981d[0x1]]=_0x499e5f;}else{logger['info'](_0xee84('0x12'),_0x1cde81,_0x34981d[0x1],_0x499e5f);_0x586a23[_0xee84('0x13')][_0x34981d[0x1]]=_0x499e5f;}}_0x2eb704[_0xee84('0x14')]();});}}catch(_0x3d8302){logger[_0xee84('0x7')]('[%s][SYSTEM]\x20%s',_0x1cde81,_[_0xee84('0x15')](_0x3d8302)?JSON[_0xee84('0x16')](_0x3d8302):_0x3d8302);logger['info'](_0xee84('0xa'),_0x1cde81);_0x2eb704['next']();}};}; \ No newline at end of file diff --git a/server/services/routing/server/applications/tag.js b/server/services/routing/server/applications/tag.js index 3fc53f4..98ced5e 100644 --- a/server/services/routing/server/applications/tag.js +++ b/server/services/routing/server/applications/tag.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2303=['[%s][TAG]\x20no\x20tags\x20saved,\x20force\x20next','channel','Interaction','addTags','interaction','then','catch','next','isObject','../../rpc/chatInteraction','../../rpc/openchannelInteraction','../../rpc/smsInteraction','../../rpc/faxInteraction','../../rpc/whatsappInteraction','../../../../config/logger','routing','TagId\x20is\x20a\x20string\x20and\x20it\x20is\x20required','consequence','validate','length','error','[%s][TAG]\x20%s','map','message','join','info'];(function(_0x4af52c,_0x23bf63){var _0xa04181=function(_0x2f4110){while(--_0x2f4110){_0x4af52c['push'](_0x4af52c['shift']());}};_0xa04181(++_0x23bf63);}(_0x2303,0x141));var _0x3230=function(_0x24ce66,_0x16b922){_0x24ce66=_0x24ce66-0x0;var _0x2ed386=_0x2303[_0x24ce66];return _0x2ed386;};'use strict';var schema=require('validate');var _=require('lodash');var rpc={'chatInteraction':require(_0x3230('0x0')),'openchannelInteraction':require(_0x3230('0x1')),'smsInteraction':require(_0x3230('0x2')),'mailInteraction':require('../../rpc/mailInteraction'),'faxInteraction':require(_0x3230('0x3')),'whatsappInteraction':require(_0x3230('0x4'))};var logger=require(_0x3230('0x5'))(_0x3230('0x6'));var tag=schema({'tag':{'type':'number','required':!![],'message':_0x3230('0x7')}});exports[_0x3230('0x8')]=function(_0x538052,_0x6e271f,_0x415234,_0x32e7b7){return function(_0x3280a6){try{var _0x232dec={'tag':_0x6e271f[0x0]};var _0x53ad3f=tag[_0x3230('0x9')](_0x232dec,{'typecast':!![]});if(_0x53ad3f[_0x3230('0xa')]){logger[_0x3230('0xb')](_0x3230('0xc'),_0x538052,_[_0x3230('0xd')](_0x53ad3f,_0x3230('0xe'))[_0x3230('0xf')](',\x20'));logger[_0x3230('0x10')](_0x3230('0x11'),_0x538052);_0x3280a6['next']();}else{var _0x5f2a31={'ids':[_0x6e271f[0x0]]};if(rpc[_0x32e7b7['channel']+'Interaction']){rpc[_0x32e7b7[_0x3230('0x12')]+_0x3230('0x13')][_0x3230('0x14')](_0x32e7b7[_0x3230('0x15')]['id'],_0x5f2a31)[_0x3230('0x16')](function(_0xb3f251){logger[_0x3230('0x10')]('[%s][TAG]\x20tag\x20\x22%s\x22\x20added\x20to\x20%s\x20interaction\x20%s',_0x538052,_0x6e271f[0x1],_0x32e7b7[_0x3230('0x12')],_0x32e7b7['interaction']['id']);})[_0x3230('0x17')](function(_0x2ed308){logger[_0x3230('0xb')](_0x3230('0xc'),_0x538052,JSON['stringify'](_0x2ed308));logger[_0x3230('0x10')](_0x3230('0x11'),_0x538052);})['finally'](function(){_0x3280a6[_0x3230('0x18')]();});}}}catch(_0x4b1cf9){logger[_0x3230('0xb')](_0x3230('0xc'),_0x538052,_[_0x3230('0x19')](_0x4b1cf9)?JSON['stringify'](_0x4b1cf9):_0x4b1cf9);logger[_0x3230('0x10')]('[%s][TAG]\x20no\x20tags\x20saved,\x20force\x20next',_0x538052);_0x3280a6[_0x3230('0x18')]();}};}; \ No newline at end of file +var _0x19db=['next','isObject','validate','../../rpc/chatInteraction','../../rpc/openchannelInteraction','../../rpc/smsInteraction','../../rpc/faxInteraction','../../../../config/logger','routing','number','TagId\x20is\x20a\x20string\x20and\x20it\x20is\x20required','consequence','length','[%s][TAG]\x20%s','map','info','[%s][TAG]\x20no\x20tags\x20saved,\x20force\x20next','channel','Interaction','addTags','then','[%s][TAG]\x20tag\x20\x22%s\x22\x20added\x20to\x20%s\x20interaction\x20%s','error','stringify'];(function(_0x81d1ce,_0x24ab09){var _0x454488=function(_0x5a02e4){while(--_0x5a02e4){_0x81d1ce['push'](_0x81d1ce['shift']());}};_0x454488(++_0x24ab09);}(_0x19db,0x1e2));var _0xb19d=function(_0x35fcb7,_0x3734c0){_0x35fcb7=_0x35fcb7-0x0;var _0x30f28a=_0x19db[_0x35fcb7];return _0x30f28a;};'use strict';var schema=require(_0xb19d('0x0'));var _=require('lodash');var rpc={'chatInteraction':require(_0xb19d('0x1')),'openchannelInteraction':require(_0xb19d('0x2')),'smsInteraction':require(_0xb19d('0x3')),'mailInteraction':require('../../rpc/mailInteraction'),'faxInteraction':require(_0xb19d('0x4')),'whatsappInteraction':require('../../rpc/whatsappInteraction')};var logger=require(_0xb19d('0x5'))(_0xb19d('0x6'));var tag=schema({'tag':{'type':_0xb19d('0x7'),'required':!![],'message':_0xb19d('0x8')}});exports[_0xb19d('0x9')]=function(_0x48cd0b,_0x265fc7,_0x15e3e6,_0x182af9){return function(_0x431a30){try{var _0x1de1a8={'tag':_0x265fc7[0x0]};var _0x3ac5bf=tag[_0xb19d('0x0')](_0x1de1a8,{'typecast':!![]});if(_0x3ac5bf[_0xb19d('0xa')]){logger['error'](_0xb19d('0xb'),_0x48cd0b,_[_0xb19d('0xc')](_0x3ac5bf,'message')['join'](',\x20'));logger[_0xb19d('0xd')](_0xb19d('0xe'),_0x48cd0b);_0x431a30['next']();}else{var _0x4a9486={'ids':[_0x265fc7[0x0]]};if(rpc[_0x182af9[_0xb19d('0xf')]+_0xb19d('0x10')]){rpc[_0x182af9[_0xb19d('0xf')]+_0xb19d('0x10')][_0xb19d('0x11')](_0x182af9['interaction']['id'],_0x4a9486)[_0xb19d('0x12')](function(_0x1809d5){logger[_0xb19d('0xd')](_0xb19d('0x13'),_0x48cd0b,_0x265fc7[0x1],_0x182af9['channel'],_0x182af9['interaction']['id']);})['catch'](function(_0x26a0a9){logger[_0xb19d('0x14')](_0xb19d('0xb'),_0x48cd0b,JSON[_0xb19d('0x15')](_0x26a0a9));logger[_0xb19d('0xd')]('[%s][TAG]\x20no\x20tags\x20saved,\x20force\x20next',_0x48cd0b);})['finally'](function(){_0x431a30[_0xb19d('0x16')]();});}}}catch(_0x58e269){logger[_0xb19d('0x14')]('[%s][TAG]\x20%s',_0x48cd0b,_[_0xb19d('0x17')](_0x58e269)?JSON['stringify'](_0x58e269):_0x58e269);logger[_0xb19d('0xd')](_0xb19d('0xe'),_0x48cd0b);_0x431a30['next']();}};}; \ No newline at end of file diff --git a/server/services/routing/server/applications/utils.js b/server/services/routing/server/applications/utils.js index 05eefc0..af37882 100644 --- a/server/services/routing/server/applications/utils.js +++ b/server/services/routing/server/applications/utils.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd8b0=['merge','body','contact','message','list','mustache','lodash','render'];(function(_0x3a849a,_0xde6167){var _0xe5aac5=function(_0x5c83ed){while(--_0x5c83ed){_0x3a849a['push'](_0x3a849a['shift']());}};_0xe5aac5(++_0xde6167);}(_0xd8b0,0xad));var _0x0d8b=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xd8b0[_0x20a584];return _0x4b41a8;};'use strict';var Mustache=require(_0x0d8b('0x0'));var _=require(_0x0d8b('0x1'));module['exports']={'getMustacheRender':function(_0x585166,_0x4b72b0){return Mustache[_0x0d8b('0x2')](_0x585166,_[_0x0d8b('0x3')](_0x4b72b0[_0x0d8b('0x4')],{'contact':_0x4b72b0[_0x0d8b('0x5')],'message':_0x4b72b0[_0x0d8b('0x6')],'account':_0x4b72b0['account'],'interaction':_0x4b72b0['interaction'],'list':_0x4b72b0[_0x0d8b('0x7')]}))||'';}}; \ No newline at end of file +var _0xa9e0=['message','account','interaction','mustache','lodash','exports','render','body','contact'];(function(_0xffd5b0,_0x38bbab){var _0x22d178=function(_0x13e2b4){while(--_0x13e2b4){_0xffd5b0['push'](_0xffd5b0['shift']());}};_0x22d178(++_0x38bbab);}(_0xa9e0,0x123));var _0x0a9e=function(_0x9aada2,_0xd2d349){_0x9aada2=_0x9aada2-0x0;var _0x196dff=_0xa9e0[_0x9aada2];return _0x196dff;};'use strict';var Mustache=require(_0x0a9e('0x0'));var _=require(_0x0a9e('0x1'));module[_0x0a9e('0x2')]={'getMustacheRender':function(_0x5dd881,_0x550fbc){return Mustache[_0x0a9e('0x3')](_0x5dd881,_['merge'](_0x550fbc[_0x0a9e('0x4')],{'contact':_0x550fbc[_0x0a9e('0x5')],'message':_0x550fbc[_0x0a9e('0x6')],'account':_0x550fbc[_0x0a9e('0x7')],'interaction':_0x550fbc[_0x0a9e('0x8')],'list':_0x550fbc['list']}))||'';}}; \ No newline at end of file diff --git a/server/services/routing/server/index.js b/server/services/routing/server/index.js index c6fc373..a5281cc 100644 --- a/server/services/routing/server/index.js +++ b/server/services/routing/server/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xacc5=['values','chatQueues','loggedIn','name','paused','waiting','mailQueues','available','openchannelQueues','smsQueues','faxQueues','whatsappQueues','mailQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','smsQueuesWaitingInteractions','faxQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','server','http','listen','127.0.0.1','RPC\x20listening\x20on\x20port:','lodash','util','path','jayson/promise','bluebird','uuid','../../../config/environment','../../../config/logger','../rpc/mailQueueReport','../rpc/chatQueueReport','../rpc/smsQueueReport','../rpc/faxQueueReport','../rpc/whatsappQueueReport','format','%s.%s.%s','IntervalId','Intervals','map','interval','rules','channel','message','interaction','applications','isArray','length','existsSync','app','toLowerCase','appdata','split','mail','push','slice','join','dialogflow','amazonlex','TagId','%s:%s:%s','./interval','intervals','./applications/','consequence','priority','info','Push\x20new\x20rule','on\x20interval','error','Please\x20create\x20a\x20new\x20file\x20under','.js','execute','Applications\x20executed','stringify','emit','complete','No\x20applications\x20to\x20execute','stack','agents','agent','busy','end','QueueReport','update','UserId','catch','error\x20update\x20queue\x20report','message\x20is\x20empty','busyQueue','hasOwnProperty','capacity','CurrentCapacity','agent\x20not\x20found'];(function(_0xb5810b,_0x2e75fa){var _0xde233d=function(_0x2ffacc){while(--_0x2ffacc){_0xb5810b['push'](_0xb5810b['shift']());}};_0xde233d(++_0x2e75fa);}(_0xacc5,0x130));var _0x5acc=function(_0x17d9e3,_0x1f969c){_0x17d9e3=_0x17d9e3-0x0;var _0x14192d=_0xacc5[_0x17d9e3];return _0x14192d;};'use strict';var _=require(_0x5acc('0x0'));var util=require(_0x5acc('0x1'));var path=require(_0x5acc('0x2'));var fs=require('fs');var jayson=require(_0x5acc('0x3'));var BPromise=require(_0x5acc('0x4'));var uuid=require(_0x5acc('0x5'));var config=require(_0x5acc('0x6'));var logger=require(_0x5acc('0x7'))('routing');var rpc={'openchannelQueueReport':require('../rpc/openchannelQueueReport'),'mailQueueReport':require(_0x5acc('0x8')),'chatQueueReport':require(_0x5acc('0x9')),'smsQueueReport':require(_0x5acc('0xa')),'faxQueueReport':require(_0x5acc('0xb')),'whatsappQueueReport':require(_0x5acc('0xc'))};var RuleEngine=require('../lib/rule-engine');function getId(_0x4b9b30,_0x4a7eb2,_0xb0d21){return util[_0x5acc('0xd')](_0x5acc('0xe'),_0x4b9b30,_0x4a7eb2||0x0,_0xb0d21||0x0);}function getIntervals(_0x340d84,_0x5ab104){var _0x401400=[];if(!_['isNil'](_0x5ab104[_0x5acc('0xf')])&&!_['isNil'](_0x340d84[_0x5ab104[_0x5acc('0xf')]])&&!_['isNil'](_0x340d84[_0x5ab104[_0x5acc('0xf')]][_0x5acc('0x10')])){_0x401400=_[_0x5acc('0x11')](_0x340d84[_0x5ab104['IntervalId']][_0x5acc('0x10')],_0x5acc('0x12'));}else if(!_['isNil'](_0x5ab104[_0x5acc('0x12')])){_0x401400=[_0x5ab104[_0x5acc('0x12')]];}return _0x401400;}exports['listen']=function(_0x450832){_0x450832[_0x5acc('0x13')]={};return new BPromise(function(_0x22d408,_0x13fe98){var _0xa78ea3={'Start':function(_0xa4b4f9){var _0x58f68d=this;return new Promise(function(_0x1eac9f,_0x2861ec){if(_0xa4b4f9){try{var _0x1d7bde=[];var _0x1a9446=getId(_0xa4b4f9[_0x5acc('0x14')],_0xa4b4f9['message']?_0xa4b4f9[_0x5acc('0x15')]['id']:0x0,_0xa4b4f9[_0x5acc('0x16')]?_0xa4b4f9[_0x5acc('0x16')]['id']:0x0);if(_0xa4b4f9[_0x5acc('0x17')]&&_[_0x5acc('0x18')](_0xa4b4f9['applications'])&&_0xa4b4f9[_0x5acc('0x17')]['length']){for(var _0x5cf259=0x0;_0x5cf259<_0xa4b4f9[_0x5acc('0x17')][_0x5acc('0x19')];_0x5cf259+=0x1){var _0x1dca41=_0xa4b4f9[_0x5acc('0x17')][_0x5cf259];if(fs[_0x5acc('0x1a')](path['join'](__dirname,_0x5acc('0x17'),_0x1dca41[_0x5acc('0x1b')]+'.js'))){var _0x522247=[];switch(_0x1dca41[_0x5acc('0x1b')][_0x5acc('0x1c')]()){case'autoreply':var _0x2dbdc7=_0x1dca41[_0x5acc('0x1d')][_0x5acc('0x1e')](',');if(_0xa4b4f9[_0x5acc('0x14')]===_0x5acc('0x1f')){_0x522247[_0x5acc('0x20')](_0x2dbdc7[0x0]);_0x522247['push'](_0x2dbdc7[0x1]);_0x522247[_0x5acc('0x20')](_0x2dbdc7[_0x5acc('0x21')](0x2,_0x2dbdc7[_0x5acc('0x19')])[_0x5acc('0x22')](','));}else{_0x522247[_0x5acc('0x20')](_0x2dbdc7[0x0]);_0x522247[_0x5acc('0x20')](_0x2dbdc7['slice'](0x1,_0x2dbdc7[_0x5acc('0x19')])[_0x5acc('0x22')](','));}break;case _0x5acc('0x23'):var _0x17c70b=_0x1dca41['appdata'][_0x5acc('0x1e')](',');_0x522247['push'](_0x17c70b[0x0]);_0x522247[_0x5acc('0x20')](_0x17c70b[0x1]);_0x522247[_0x5acc('0x20')](_0x17c70b[_0x5acc('0x21')](0x2,_0x17c70b[_0x5acc('0x19')])[_0x5acc('0x22')](','));break;case'dialogflowv2':var _0x278aae=_0x1dca41[_0x5acc('0x1d')][_0x5acc('0x1e')](',');_0x522247[_0x5acc('0x20')](_0x278aae[0x0]);_0x522247[_0x5acc('0x20')](_0x278aae[0x1]);_0x522247[_0x5acc('0x20')](_0x278aae[0x2]);_0x522247['push'](_0x278aae[0x3]);_0x522247[_0x5acc('0x20')](_0x278aae[_0x5acc('0x21')](0x4,_0x278aae[_0x5acc('0x19')])[_0x5acc('0x22')](','));break;case _0x5acc('0x24'):var _0x14a145=_0x1dca41[_0x5acc('0x1d')][_0x5acc('0x1e')](',');_0x522247['push'](_0x14a145[0x0]);_0x522247[_0x5acc('0x20')](_0x14a145[0x1]);_0x522247[_0x5acc('0x20')](_0x14a145[0x2]);_0x522247['push'](_0x14a145[0x3]);_0x522247['push'](_0x14a145[_0x5acc('0x21')](0x4,_0x14a145[_0x5acc('0x19')])[_0x5acc('0x22')](','));break;case'message':_0x522247[_0x5acc('0x20')](_0x1dca41[_0x5acc('0x1d')]);break;case'tag':_0x522247[_0x5acc('0x20')](_0x1dca41[_0x5acc('0x25')]);_0x522247[_0x5acc('0x20')](_0x1dca41['appdata']);break;default:_0x522247=_['isNil'](_0x1dca41[_0x5acc('0x1d')])?[]:_0x1dca41[_0x5acc('0x1d')][_0x5acc('0x1e')](',');}var _0x2dde46={'id':util[_0x5acc('0xd')](_0x5acc('0x26'),_0x1a9446,_0x1dca41['id'],_0x1dca41[_0x5acc('0x1b')]),'condition':require(_0x5acc('0x27'))['condition'](_0x1a9446,getIntervals(_0x450832[_0x5acc('0x28')],_0x1dca41),_0x450832),'consequence':require(_0x5acc('0x29')+_0x1dca41[_0x5acc('0x1b')])[_0x5acc('0x2a')](_0x1a9446,_0x522247,_0x450832,_0xa4b4f9),'p':_0x1dca41[_0x5acc('0x2b')]||0x0};logger[_0x5acc('0x2c')](_0x5acc('0x2d'),_0x2dde46['id'],_0x5acc('0x2e'),getIntervals(_0x450832[_0x5acc('0x28')],_0x1dca41)[_0x5acc('0x22')]('\x20|\x20'));_0x1d7bde[_0x5acc('0x20')](_0x2dde46);}else{logger[_0x5acc('0x2f')](_0x5acc('0x30'),path[_0x5acc('0x22')](__dirname,_0x5acc('0x17'),_0x1dca41[_0x5acc('0x1b')]+_0x5acc('0x31')));}}_0x450832[_0x5acc('0x13')][_0x1a9446]=new RuleEngine(_0x1d7bde);_0x450832[_0x5acc('0x13')][_0x1a9446][_0x5acc('0x32')](_0xa4b4f9,function(_0xc684fd){logger[_0x5acc('0x2c')](_0x5acc('0x33'),JSON[_0x5acc('0x34')](_0xc684fd['matchPath']));if(_0x450832[_0x5acc('0x13')][_0x1a9446]){_0x450832[_0x5acc('0x13')][_0x1a9446][_0x5acc('0x35')](_0x5acc('0x36'));}});return _0x1eac9f({'code':0xc8,'message':_0xa4b4f9});}else{logger[_0x5acc('0x2c')](_0x5acc('0x37'));return _0x1eac9f({'code':0xc8,'message':_0xa4b4f9});}}catch(_0x3593b5){logger[_0x5acc('0x2f')](_0x3593b5[_0x5acc('0x38')]);return _0x2861ec(_0x58f68d[_0x5acc('0x2f')](0x1f4,_0x3593b5));}}return _0x2861ec('routing\x20is\x20empty');});},'AcceptMessage':function(_0x485fa0){var _0x1ceb5e=this;return new Promise(function(_0x5835ef,_0xdb66a6){if(_0x485fa0['agent']&&_0x485fa0['agent']['id']){if(_0x450832[_0x5acc('0x39')][_0x485fa0['agent']['id']]){_0x450832['agents'][_0x485fa0[_0x5acc('0x3a')]['id']][_0x5acc('0x3b')]=![];_0x450832[_0x5acc('0x39')][_0x485fa0[_0x5acc('0x3a')]['id']]['busyQueue']=undefined;}}if(_0x485fa0[_0x5acc('0x15')]&&_0x485fa0['message']['id']){try{var _0x18cb21=getId(_0x485fa0['channel'],_0x485fa0['message']?_0x485fa0[_0x5acc('0x15')]['id']:0x0,_0x485fa0[_0x5acc('0x16')]?_0x485fa0[_0x5acc('0x16')]['id']:0x0);if(_0x450832['rules'][_0x18cb21]){_0x450832['rules'][_0x18cb21][_0x5acc('0x35')](_0x5acc('0x3c'));if(rpc[_0x485fa0[_0x5acc('0x14')]+_0x5acc('0x3d')]){rpc[_0x485fa0[_0x5acc('0x14')]+_0x5acc('0x3d')][_0x5acc('0x3e')](_0x18cb21,{'UserId':_0x485fa0[_0x5acc('0x15')][_0x5acc('0x3f')]})[_0x5acc('0x40')](function(_0x2d7dd2){logger[_0x5acc('0x2f')](_0x5acc('0x41'));});}}return _0x5835ef({'code':0xc8,'message':_0x485fa0});}catch(_0x340171){logger[_0x5acc('0x2f')](_0x340171[_0x5acc('0x38')]);return _0xdb66a6(_0x1ceb5e['error'](0x1f4,_0x340171));}}logger[_0x5acc('0x2f')]('message\x20is\x20empty');return _0xdb66a6(_0x1ceb5e['error'](0x1f4,_0x5acc('0x42')));});},'RejectMessage':function(_0x425861){var _0x136c10=this;return new Promise(function(_0x291d3a,_0x172310){if(_0x425861[_0x5acc('0x3a')]&&_0x425861[_0x5acc('0x3a')]['id']){try{if(_0x450832['agents'][_0x425861[_0x5acc('0x3a')]['id']]){_0x450832[_0x5acc('0x39')][_0x425861[_0x5acc('0x3a')]['id']][_0x5acc('0x3b')]=![];_0x450832[_0x5acc('0x39')][_0x425861['agent']['id']][_0x5acc('0x43')]=undefined;}return _0x291d3a({'code':0xc8,'message':_0x425861});}catch(_0x2df529){logger[_0x5acc('0x2f')](_0x2df529[_0x5acc('0x38')]);return _0x172310(_0x136c10['error'](0x1f4,_0x2df529));}}logger[_0x5acc('0x2f')](_0x5acc('0x42'));return _0x172310(_0x136c10[_0x5acc('0x2f')](0x1f4,_0x5acc('0x42')));});},'AbandonInteraction':function(_0x213abc){var _0x59d6f4=this;return new Promise(function(_0x3d6afb,_0x41dfbb){if(_0x213abc[_0x5acc('0x14')]&&_0x213abc['interaction']&&_0x213abc[_0x5acc('0x16')]['id']){try{var _0x420418=getId(_0x213abc[_0x5acc('0x14')],_0x213abc['message']?_0x213abc['message']['id']:0x0,_0x213abc[_0x5acc('0x16')]?_0x213abc[_0x5acc('0x16')]['id']:0x0);if(_0x450832[_0x5acc('0x13')][_0x420418]){_0x450832[_0x5acc('0x13')][_0x420418][_0x5acc('0x35')](_0x5acc('0x3c'));}return _0x3d6afb({'code':0xc8,'message':_0x213abc});}catch(_0x4204ce){logger[_0x5acc('0x2f')](_0x4204ce['stack']);return _0x41dfbb(_0x59d6f4[_0x5acc('0x2f')](0x1f4,_0x4204ce));}}logger['error']('message\x20is\x20empty');return _0x41dfbb(_0x59d6f4['error'](0x1f4,_0x5acc('0x42')));});},'AgentCapacity':function(_0x13011b){var _0x3138ff=this;return new Promise(function(_0x33f1b8,_0x264e6b){if(_0x450832['agents'][_0x5acc('0x44')](_0x13011b['id'])){for(var _0x1063e0 in _0x13011b['capacity']){if(_0x13011b[_0x5acc('0x45')]['hasOwnProperty'](_0x1063e0)){if(_0x450832[_0x5acc('0x39')][_0x13011b['id']][_0x5acc('0x44')](_0x1063e0+_0x5acc('0x46'))){_0x450832[_0x5acc('0x39')][_0x13011b['id']][_0x1063e0+_0x5acc('0x46')]=parseInt(_0x13011b[_0x5acc('0x45')][_0x1063e0],0xa);}}}_0x450832['agents'][_0x13011b['id']]['updateRealtime']();return _0x33f1b8({'code':0xc8,'message':_0x450832[_0x5acc('0x39')][_0x13011b['id']]});}else{return _0x264e6b(_0x3138ff[_0x5acc('0x2f')](0x1f4,_0x5acc('0x47')));}});},'Agents':function(_0x9be386){return new Promise(function(_0x7b61df,_0x1de0b7){var _0x241138=_[_0x5acc('0x48')](_0x450832[_0x5acc('0x39')]);_0x7b61df({'count':_0x241138[_0x5acc('0x19')],'rows':_0x241138});});},'ChatQueues':function(_0x28f1d2){return new Promise(function(_0x1925ba,_0x2729ea){var _0x2c0c7c=[];for(var _0x52d1b8 in _0x450832['chatQueues']){if(_0x450832[_0x5acc('0x49')]['hasOwnProperty'](_0x52d1b8)){var _0x2f08aa=_0x450832[_0x5acc('0x49')][_0x52d1b8];var _0x48f31a={'id':_0x2f08aa['id'],'available':_0x2f08aa['available'],'loggedIn':_0x2f08aa[_0x5acc('0x4a')],'name':_0x2f08aa[_0x5acc('0x4b')],'paused':_0x2f08aa[_0x5acc('0x4c')],'waiting':_0x2f08aa[_0x5acc('0x4d')]};_0x2c0c7c['push'](_0x48f31a);}}_0x1925ba({'count':_0x2c0c7c['length'],'rows':_0x2c0c7c});});},'MailQueues':function(_0x5c9b84){return new Promise(function(_0x2f6bda,_0x315fb0){var _0x33379e=[];for(var _0x3858a1 in _0x450832['mailQueues']){if(_0x450832[_0x5acc('0x4e')][_0x5acc('0x44')](_0x3858a1)){var _0x32fe9f=_0x450832[_0x5acc('0x4e')][_0x3858a1];var _0x8fbdf6={'id':_0x32fe9f['id'],'available':_0x32fe9f[_0x5acc('0x4f')],'loggedIn':_0x32fe9f[_0x5acc('0x4a')],'name':_0x32fe9f[_0x5acc('0x4b')],'paused':_0x32fe9f['paused'],'waiting':_0x32fe9f[_0x5acc('0x4d')]};_0x33379e[_0x5acc('0x20')](_0x8fbdf6);}}_0x2f6bda({'count':_0x33379e['length'],'rows':_0x33379e});});},'OpenchannelQueues':function(_0x325a94){return new Promise(function(_0x13beac,_0x2f444d){var _0x41c5b4=[];for(var _0x2cb3a4 in _0x450832[_0x5acc('0x50')]){if(_0x450832[_0x5acc('0x50')]['hasOwnProperty'](_0x2cb3a4)){var _0x1607dc=_0x450832[_0x5acc('0x50')][_0x2cb3a4];var _0x59cdb4={'id':_0x1607dc['id'],'available':_0x1607dc[_0x5acc('0x4f')],'loggedIn':_0x1607dc['loggedIn'],'name':_0x1607dc[_0x5acc('0x4b')],'paused':_0x1607dc['paused'],'waiting':_0x1607dc[_0x5acc('0x4d')]};_0x41c5b4[_0x5acc('0x20')](_0x59cdb4);}}_0x13beac({'count':_0x41c5b4[_0x5acc('0x19')],'rows':_0x41c5b4});});},'SmsQueues':function(_0x440f77){return new Promise(function(_0x297fc5,_0x59f22c){var _0x48c7d4=[];for(var _0x51ff59 in _0x450832['smsQueues']){if(_0x450832[_0x5acc('0x51')][_0x5acc('0x44')](_0x51ff59)){var _0xc3511f=_0x450832['smsQueues'][_0x51ff59];var _0x4d71b0={'id':_0xc3511f['id'],'available':_0xc3511f['available'],'loggedIn':_0xc3511f['loggedIn'],'name':_0xc3511f['name'],'paused':_0xc3511f[_0x5acc('0x4c')],'waiting':_0xc3511f[_0x5acc('0x4d')]};_0x48c7d4[_0x5acc('0x20')](_0x4d71b0);}}_0x297fc5({'count':_0x48c7d4[_0x5acc('0x19')],'rows':_0x48c7d4});});},'FaxQueues':function(_0x3a901d){return new Promise(function(_0x19d98b,_0x99281a){var _0x430a5f=[];for(var _0x18f5c7 in _0x450832[_0x5acc('0x52')]){if(_0x450832['faxQueues'][_0x5acc('0x44')](_0x18f5c7)){var _0x2fe90a=_0x450832[_0x5acc('0x52')][_0x18f5c7];var _0x4a4d07={'id':_0x2fe90a['id'],'available':_0x2fe90a[_0x5acc('0x4f')],'loggedIn':_0x2fe90a['loggedIn'],'name':_0x2fe90a['name'],'paused':_0x2fe90a[_0x5acc('0x4c')],'waiting':_0x2fe90a[_0x5acc('0x4d')]};_0x430a5f[_0x5acc('0x20')](_0x4a4d07);}}_0x19d98b({'count':_0x430a5f['length'],'rows':_0x430a5f});});},'WhatsappQueues':function(_0x9e3ce8){return new Promise(function(_0x3f464c,_0x5dcb96){var _0x22257f=[];for(var _0xb00baf in _0x450832[_0x5acc('0x53')]){if(_0x450832['whatsappQueues']['hasOwnProperty'](_0xb00baf)){var _0x443f95=_0x450832['whatsappQueues'][_0xb00baf];var _0xa538d6={'id':_0x443f95['id'],'available':_0x443f95[_0x5acc('0x4f')],'loggedIn':_0x443f95[_0x5acc('0x4a')],'name':_0x443f95['name'],'paused':_0x443f95[_0x5acc('0x4c')],'waiting':_0x443f95['waiting']};_0x22257f['push'](_0xa538d6);}}_0x3f464c({'count':_0x22257f[_0x5acc('0x19')],'rows':_0x22257f});});},'ChatQueuesWaitingInteractions':function(_0x54fd8b){return new Promise(function(_0x4a2a28,_0xad60b8){var _0x370e91=_[_0x5acc('0x48')](_0x450832['chatQueuesWaitingInteractions']);_0x4a2a28({'count':_0x370e91[_0x5acc('0x19')],'rows':_0x370e91});});},'MailQueuesWaitingInteractions':function(_0x3063bf){return new Promise(function(_0x30be8b,_0x12db5c){var _0x130984=_[_0x5acc('0x48')](_0x450832[_0x5acc('0x54')]);_0x30be8b({'count':_0x130984[_0x5acc('0x19')],'rows':_0x130984});});},'OpenchannelQueuesWaitingInteractions':function(_0x53ad20){return new Promise(function(_0xcccbc6,_0x263f51){var _0x3c3a35=_[_0x5acc('0x48')](_0x450832[_0x5acc('0x55')]);_0xcccbc6({'count':_0x3c3a35[_0x5acc('0x19')],'rows':_0x3c3a35});});},'SmsQueuesWaitingInteractions':function(_0x2882eb){return new Promise(function(_0x9103fd,_0x4d798e){var _0x14928f=_[_0x5acc('0x48')](_0x450832[_0x5acc('0x56')]);_0x9103fd({'count':_0x14928f[_0x5acc('0x19')],'rows':_0x14928f});});},'FaxQueuesWaitingInteractions':function(_0x58d099){return new Promise(function(_0x33d06a,_0x445799){var _0x9919fb=_['values'](_0x450832[_0x5acc('0x57')]);_0x33d06a({'count':_0x9919fb['length'],'rows':_0x9919fb});});},'WhatsappQueuesWaitingInteractions':function(_0x287aad){return new Promise(function(_0x5d5cf1,_0x23dcd8){var _0x53c98d=_[_0x5acc('0x48')](_0x450832[_0x5acc('0x58')]);_0x5d5cf1({'count':_0x53c98d[_0x5acc('0x19')],'rows':_0x53c98d});});}};var _0x30bf02=jayson[_0x5acc('0x59')](_0xa78ea3)[_0x5acc('0x5a')]();_0x30bf02['on'](_0x5acc('0x2f'),function(_0x1adaea){logger[_0x5acc('0x2f')](JSON['stringify'](_0x1adaea));return _0x13fe98(_0x1adaea);});_0x30bf02[_0x5acc('0x5b')](0x232c,_0x5acc('0x5c'),function(){console['log']('Routing\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!',0x232c);return _0x22d408(_0x5acc('0x5d')+0x232c);});});}; \ No newline at end of file +var _0xea39=['isArray','applications','length','join','app','.js','toLowerCase','autoreply','appdata','split','mail','push','slice','dialogflow','dialogflowv2','TagId','format','%s:%s:%s','./interval','condition','intervals','./applications/','consequence','priority','info','Push\x20new\x20rule','on\x20interval','\x20|\x20','Please\x20create\x20a\x20new\x20file\x20under','execute','Applications\x20executed','emit','No\x20applications\x20to\x20execute','error','agent','busy','agents','end','update','catch','stack','message\x20is\x20empty','busyQueue','hasOwnProperty','CurrentCapacity','capacity','updateRealtime','agent\x20not\x20found','values','chatQueues','name','waiting','mailQueues','available','loggedIn','paused','openchannelQueues','smsQueues','faxQueues','whatsappQueues','chatQueuesWaitingInteractions','smsQueuesWaitingInteractions','faxQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','http','stringify','127.0.0.1','Routing\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!','lodash','util','jayson/promise','uuid','../../../config/environment','../../../config/logger','../rpc/openchannelQueueReport','../rpc/mailQueueReport','../rpc/faxQueueReport','../rpc/whatsappQueueReport','../lib/rule-engine','%s.%s.%s','isNil','IntervalId','Intervals','interval','listen','rules','channel','message','interaction'];(function(_0xbb2c04,_0x4aafea){var _0x24d617=function(_0x54991f){while(--_0x54991f){_0xbb2c04['push'](_0xbb2c04['shift']());}};_0x24d617(++_0x4aafea);}(_0xea39,0x9d));var _0x9ea3=function(_0xd83ca0,_0x481a87){_0xd83ca0=_0xd83ca0-0x0;var _0x4e66dd=_0xea39[_0xd83ca0];return _0x4e66dd;};'use strict';var _=require(_0x9ea3('0x0'));var util=require(_0x9ea3('0x1'));var path=require('path');var fs=require('fs');var jayson=require(_0x9ea3('0x2'));var BPromise=require('bluebird');var uuid=require(_0x9ea3('0x3'));var config=require(_0x9ea3('0x4'));var logger=require(_0x9ea3('0x5'))('routing');var rpc={'openchannelQueueReport':require(_0x9ea3('0x6')),'mailQueueReport':require(_0x9ea3('0x7')),'chatQueueReport':require('../rpc/chatQueueReport'),'smsQueueReport':require('../rpc/smsQueueReport'),'faxQueueReport':require(_0x9ea3('0x8')),'whatsappQueueReport':require(_0x9ea3('0x9'))};var RuleEngine=require(_0x9ea3('0xa'));function getId(_0x3db630,_0x102503,_0x5d079b){return util['format'](_0x9ea3('0xb'),_0x3db630,_0x102503||0x0,_0x5d079b||0x0);}function getIntervals(_0x2e7abd,_0x105e1d){var _0xe8068c=[];if(!_[_0x9ea3('0xc')](_0x105e1d[_0x9ea3('0xd')])&&!_[_0x9ea3('0xc')](_0x2e7abd[_0x105e1d[_0x9ea3('0xd')]])&&!_['isNil'](_0x2e7abd[_0x105e1d[_0x9ea3('0xd')]][_0x9ea3('0xe')])){_0xe8068c=_['map'](_0x2e7abd[_0x105e1d['IntervalId']][_0x9ea3('0xe')],_0x9ea3('0xf'));}else if(!_[_0x9ea3('0xc')](_0x105e1d[_0x9ea3('0xf')])){_0xe8068c=[_0x105e1d[_0x9ea3('0xf')]];}return _0xe8068c;}exports[_0x9ea3('0x10')]=function(_0x21234a){_0x21234a[_0x9ea3('0x11')]={};return new BPromise(function(_0x5dd0c9,_0x32b432){var _0x1ab219={'Start':function(_0x5c605d){var _0x5db2d6=this;return new Promise(function(_0x1b8a7d,_0x3b1d8a){if(_0x5c605d){try{var _0x120c3c=[];var _0x41b21c=getId(_0x5c605d[_0x9ea3('0x12')],_0x5c605d['message']?_0x5c605d[_0x9ea3('0x13')]['id']:0x0,_0x5c605d[_0x9ea3('0x14')]?_0x5c605d[_0x9ea3('0x14')]['id']:0x0);if(_0x5c605d['applications']&&_[_0x9ea3('0x15')](_0x5c605d[_0x9ea3('0x16')])&&_0x5c605d[_0x9ea3('0x16')][_0x9ea3('0x17')]){for(var _0x38ece2=0x0;_0x38ece2<_0x5c605d[_0x9ea3('0x16')]['length'];_0x38ece2+=0x1){var _0x260227=_0x5c605d[_0x9ea3('0x16')][_0x38ece2];if(fs['existsSync'](path[_0x9ea3('0x18')](__dirname,_0x9ea3('0x16'),_0x260227[_0x9ea3('0x19')]+_0x9ea3('0x1a')))){var _0x556676=[];switch(_0x260227[_0x9ea3('0x19')][_0x9ea3('0x1b')]()){case _0x9ea3('0x1c'):var _0x3d3090=_0x260227[_0x9ea3('0x1d')][_0x9ea3('0x1e')](',');if(_0x5c605d['channel']===_0x9ea3('0x1f')){_0x556676['push'](_0x3d3090[0x0]);_0x556676[_0x9ea3('0x20')](_0x3d3090[0x1]);_0x556676[_0x9ea3('0x20')](_0x3d3090[_0x9ea3('0x21')](0x2,_0x3d3090[_0x9ea3('0x17')])[_0x9ea3('0x18')](','));}else{_0x556676[_0x9ea3('0x20')](_0x3d3090[0x0]);_0x556676[_0x9ea3('0x20')](_0x3d3090[_0x9ea3('0x21')](0x1,_0x3d3090['length'])[_0x9ea3('0x18')](','));}break;case _0x9ea3('0x22'):var _0x776e80=_0x260227[_0x9ea3('0x1d')]['split'](',');_0x556676[_0x9ea3('0x20')](_0x776e80[0x0]);_0x556676[_0x9ea3('0x20')](_0x776e80[0x1]);_0x556676[_0x9ea3('0x20')](_0x776e80[_0x9ea3('0x21')](0x2,_0x776e80[_0x9ea3('0x17')])[_0x9ea3('0x18')](','));break;case _0x9ea3('0x23'):var _0x127667=_0x260227[_0x9ea3('0x1d')][_0x9ea3('0x1e')](',');_0x556676['push'](_0x127667[0x0]);_0x556676['push'](_0x127667[0x1]);_0x556676['push'](_0x127667[0x2]);_0x556676[_0x9ea3('0x20')](_0x127667[0x3]);_0x556676[_0x9ea3('0x20')](_0x127667['slice'](0x4,_0x127667[_0x9ea3('0x17')])[_0x9ea3('0x18')](','));break;case'amazonlex':var _0x27abc6=_0x260227[_0x9ea3('0x1d')][_0x9ea3('0x1e')](',');_0x556676[_0x9ea3('0x20')](_0x27abc6[0x0]);_0x556676['push'](_0x27abc6[0x1]);_0x556676[_0x9ea3('0x20')](_0x27abc6[0x2]);_0x556676[_0x9ea3('0x20')](_0x27abc6[0x3]);_0x556676[_0x9ea3('0x20')](_0x27abc6['slice'](0x4,_0x27abc6['length'])[_0x9ea3('0x18')](','));break;case _0x9ea3('0x13'):_0x556676['push'](_0x260227[_0x9ea3('0x1d')]);break;case'tag':_0x556676[_0x9ea3('0x20')](_0x260227[_0x9ea3('0x24')]);_0x556676[_0x9ea3('0x20')](_0x260227[_0x9ea3('0x1d')]);break;default:_0x556676=_['isNil'](_0x260227[_0x9ea3('0x1d')])?[]:_0x260227[_0x9ea3('0x1d')]['split'](',');}var _0x187dfc={'id':util[_0x9ea3('0x25')](_0x9ea3('0x26'),_0x41b21c,_0x260227['id'],_0x260227['app']),'condition':require(_0x9ea3('0x27'))[_0x9ea3('0x28')](_0x41b21c,getIntervals(_0x21234a[_0x9ea3('0x29')],_0x260227),_0x21234a),'consequence':require(_0x9ea3('0x2a')+_0x260227[_0x9ea3('0x19')])[_0x9ea3('0x2b')](_0x41b21c,_0x556676,_0x21234a,_0x5c605d),'p':_0x260227[_0x9ea3('0x2c')]||0x0};logger[_0x9ea3('0x2d')](_0x9ea3('0x2e'),_0x187dfc['id'],_0x9ea3('0x2f'),getIntervals(_0x21234a[_0x9ea3('0x29')],_0x260227)[_0x9ea3('0x18')](_0x9ea3('0x30')));_0x120c3c[_0x9ea3('0x20')](_0x187dfc);}else{logger['error'](_0x9ea3('0x31'),path[_0x9ea3('0x18')](__dirname,_0x9ea3('0x16'),_0x260227['app']+_0x9ea3('0x1a')));}}_0x21234a[_0x9ea3('0x11')][_0x41b21c]=new RuleEngine(_0x120c3c);_0x21234a[_0x9ea3('0x11')][_0x41b21c][_0x9ea3('0x32')](_0x5c605d,function(_0x162b5d){logger[_0x9ea3('0x2d')](_0x9ea3('0x33'),JSON['stringify'](_0x162b5d['matchPath']));if(_0x21234a[_0x9ea3('0x11')][_0x41b21c]){_0x21234a[_0x9ea3('0x11')][_0x41b21c][_0x9ea3('0x34')]('complete');}});return _0x1b8a7d({'code':0xc8,'message':_0x5c605d});}else{logger[_0x9ea3('0x2d')](_0x9ea3('0x35'));return _0x1b8a7d({'code':0xc8,'message':_0x5c605d});}}catch(_0x4e7f7e){logger[_0x9ea3('0x36')](_0x4e7f7e['stack']);return _0x3b1d8a(_0x5db2d6[_0x9ea3('0x36')](0x1f4,_0x4e7f7e));}}return _0x3b1d8a('routing\x20is\x20empty');});},'AcceptMessage':function(_0x17dce5){var _0x517e16=this;return new Promise(function(_0x3f8452,_0xa963d3){if(_0x17dce5['agent']&&_0x17dce5[_0x9ea3('0x37')]['id']){if(_0x21234a['agents'][_0x17dce5['agent']['id']]){_0x21234a['agents'][_0x17dce5[_0x9ea3('0x37')]['id']][_0x9ea3('0x38')]=![];_0x21234a[_0x9ea3('0x39')][_0x17dce5[_0x9ea3('0x37')]['id']]['busyQueue']=undefined;}}if(_0x17dce5[_0x9ea3('0x13')]&&_0x17dce5[_0x9ea3('0x13')]['id']){try{var _0x3b5c65=getId(_0x17dce5[_0x9ea3('0x12')],_0x17dce5[_0x9ea3('0x13')]?_0x17dce5[_0x9ea3('0x13')]['id']:0x0,_0x17dce5[_0x9ea3('0x14')]?_0x17dce5[_0x9ea3('0x14')]['id']:0x0);if(_0x21234a[_0x9ea3('0x11')][_0x3b5c65]){_0x21234a['rules'][_0x3b5c65]['emit'](_0x9ea3('0x3a'));if(rpc[_0x17dce5[_0x9ea3('0x12')]+'QueueReport']){rpc[_0x17dce5[_0x9ea3('0x12')]+'QueueReport'][_0x9ea3('0x3b')](_0x3b5c65,{'UserId':_0x17dce5[_0x9ea3('0x13')]['UserId']})[_0x9ea3('0x3c')](function(_0x3e65a8){logger[_0x9ea3('0x36')]('error\x20update\x20queue\x20report');});}}return _0x3f8452({'code':0xc8,'message':_0x17dce5});}catch(_0x30d233){logger['error'](_0x30d233[_0x9ea3('0x3d')]);return _0xa963d3(_0x517e16['error'](0x1f4,_0x30d233));}}logger['error'](_0x9ea3('0x3e'));return _0xa963d3(_0x517e16[_0x9ea3('0x36')](0x1f4,_0x9ea3('0x3e')));});},'RejectMessage':function(_0x1a4d33){var _0x54a4e7=this;return new Promise(function(_0x2ae3fb,_0x4ca538){if(_0x1a4d33[_0x9ea3('0x37')]&&_0x1a4d33[_0x9ea3('0x37')]['id']){try{if(_0x21234a[_0x9ea3('0x39')][_0x1a4d33['agent']['id']]){_0x21234a[_0x9ea3('0x39')][_0x1a4d33[_0x9ea3('0x37')]['id']][_0x9ea3('0x38')]=![];_0x21234a[_0x9ea3('0x39')][_0x1a4d33[_0x9ea3('0x37')]['id']][_0x9ea3('0x3f')]=undefined;}return _0x2ae3fb({'code':0xc8,'message':_0x1a4d33});}catch(_0x58cac9){logger['error'](_0x58cac9[_0x9ea3('0x3d')]);return _0x4ca538(_0x54a4e7[_0x9ea3('0x36')](0x1f4,_0x58cac9));}}logger[_0x9ea3('0x36')](_0x9ea3('0x3e'));return _0x4ca538(_0x54a4e7[_0x9ea3('0x36')](0x1f4,_0x9ea3('0x3e')));});},'AbandonInteraction':function(_0x40c197){var _0x1e92e0=this;return new Promise(function(_0x8e7119,_0x2261f8){if(_0x40c197[_0x9ea3('0x12')]&&_0x40c197[_0x9ea3('0x14')]&&_0x40c197[_0x9ea3('0x14')]['id']){try{var _0x27ab2e=getId(_0x40c197['channel'],_0x40c197[_0x9ea3('0x13')]?_0x40c197[_0x9ea3('0x13')]['id']:0x0,_0x40c197[_0x9ea3('0x14')]?_0x40c197['interaction']['id']:0x0);if(_0x21234a[_0x9ea3('0x11')][_0x27ab2e]){_0x21234a[_0x9ea3('0x11')][_0x27ab2e][_0x9ea3('0x34')](_0x9ea3('0x3a'));}return _0x8e7119({'code':0xc8,'message':_0x40c197});}catch(_0x15c257){logger['error'](_0x15c257['stack']);return _0x2261f8(_0x1e92e0[_0x9ea3('0x36')](0x1f4,_0x15c257));}}logger[_0x9ea3('0x36')](_0x9ea3('0x3e'));return _0x2261f8(_0x1e92e0[_0x9ea3('0x36')](0x1f4,_0x9ea3('0x3e')));});},'AgentCapacity':function(_0x8913e0){var _0x1c8bc6=this;return new Promise(function(_0x436643,_0x1426b0){if(_0x21234a[_0x9ea3('0x39')][_0x9ea3('0x40')](_0x8913e0['id'])){for(var _0x5a9091 in _0x8913e0['capacity']){if(_0x8913e0['capacity'][_0x9ea3('0x40')](_0x5a9091)){if(_0x21234a[_0x9ea3('0x39')][_0x8913e0['id']][_0x9ea3('0x40')](_0x5a9091+_0x9ea3('0x41'))){_0x21234a['agents'][_0x8913e0['id']][_0x5a9091+_0x9ea3('0x41')]=parseInt(_0x8913e0[_0x9ea3('0x42')][_0x5a9091],0xa);}}}_0x21234a[_0x9ea3('0x39')][_0x8913e0['id']][_0x9ea3('0x43')]();return _0x436643({'code':0xc8,'message':_0x21234a[_0x9ea3('0x39')][_0x8913e0['id']]});}else{return _0x1426b0(_0x1c8bc6[_0x9ea3('0x36')](0x1f4,_0x9ea3('0x44')));}});},'Agents':function(_0x1e4644){return new Promise(function(_0x3ff6db,_0x5e1aa8){var _0x22c9c1=_[_0x9ea3('0x45')](_0x21234a[_0x9ea3('0x39')]);_0x3ff6db({'count':_0x22c9c1['length'],'rows':_0x22c9c1});});},'ChatQueues':function(_0x51a42f){return new Promise(function(_0x32f722,_0x280d18){var _0x29367d=[];for(var _0x405303 in _0x21234a['chatQueues']){if(_0x21234a['chatQueues'][_0x9ea3('0x40')](_0x405303)){var _0xdd074c=_0x21234a[_0x9ea3('0x46')][_0x405303];var _0x225fac={'id':_0xdd074c['id'],'available':_0xdd074c['available'],'loggedIn':_0xdd074c['loggedIn'],'name':_0xdd074c[_0x9ea3('0x47')],'paused':_0xdd074c['paused'],'waiting':_0xdd074c[_0x9ea3('0x48')]};_0x29367d[_0x9ea3('0x20')](_0x225fac);}}_0x32f722({'count':_0x29367d[_0x9ea3('0x17')],'rows':_0x29367d});});},'MailQueues':function(_0x3dbd18){return new Promise(function(_0x1e2073,_0x2b3942){var _0x3ed6ff=[];for(var _0xa2994c in _0x21234a[_0x9ea3('0x49')]){if(_0x21234a[_0x9ea3('0x49')][_0x9ea3('0x40')](_0xa2994c)){var _0xf5c8a1=_0x21234a[_0x9ea3('0x49')][_0xa2994c];var _0x126c5f={'id':_0xf5c8a1['id'],'available':_0xf5c8a1[_0x9ea3('0x4a')],'loggedIn':_0xf5c8a1[_0x9ea3('0x4b')],'name':_0xf5c8a1[_0x9ea3('0x47')],'paused':_0xf5c8a1[_0x9ea3('0x4c')],'waiting':_0xf5c8a1['waiting']};_0x3ed6ff[_0x9ea3('0x20')](_0x126c5f);}}_0x1e2073({'count':_0x3ed6ff['length'],'rows':_0x3ed6ff});});},'OpenchannelQueues':function(_0x587501){return new Promise(function(_0x55ec4c,_0x9b8092){var _0x319736=[];for(var _0x5cefd9 in _0x21234a[_0x9ea3('0x4d')]){if(_0x21234a['openchannelQueues'][_0x9ea3('0x40')](_0x5cefd9)){var _0x1ea3e7=_0x21234a[_0x9ea3('0x4d')][_0x5cefd9];var _0x3c9a13={'id':_0x1ea3e7['id'],'available':_0x1ea3e7['available'],'loggedIn':_0x1ea3e7[_0x9ea3('0x4b')],'name':_0x1ea3e7['name'],'paused':_0x1ea3e7[_0x9ea3('0x4c')],'waiting':_0x1ea3e7[_0x9ea3('0x48')]};_0x319736['push'](_0x3c9a13);}}_0x55ec4c({'count':_0x319736[_0x9ea3('0x17')],'rows':_0x319736});});},'SmsQueues':function(_0x59bc1c){return new Promise(function(_0x5204cf,_0x59e12c){var _0x387545=[];for(var _0x517f71 in _0x21234a[_0x9ea3('0x4e')]){if(_0x21234a[_0x9ea3('0x4e')][_0x9ea3('0x40')](_0x517f71)){var _0x51513a=_0x21234a[_0x9ea3('0x4e')][_0x517f71];var _0x3b8c02={'id':_0x51513a['id'],'available':_0x51513a[_0x9ea3('0x4a')],'loggedIn':_0x51513a[_0x9ea3('0x4b')],'name':_0x51513a[_0x9ea3('0x47')],'paused':_0x51513a['paused'],'waiting':_0x51513a[_0x9ea3('0x48')]};_0x387545[_0x9ea3('0x20')](_0x3b8c02);}}_0x5204cf({'count':_0x387545[_0x9ea3('0x17')],'rows':_0x387545});});},'FaxQueues':function(_0x99419a){return new Promise(function(_0xbe854b,_0x547549){var _0x4d95ca=[];for(var _0x2bf10a in _0x21234a[_0x9ea3('0x4f')]){if(_0x21234a[_0x9ea3('0x4f')][_0x9ea3('0x40')](_0x2bf10a)){var _0x5850a9=_0x21234a['faxQueues'][_0x2bf10a];var _0x4d8c0b={'id':_0x5850a9['id'],'available':_0x5850a9['available'],'loggedIn':_0x5850a9[_0x9ea3('0x4b')],'name':_0x5850a9['name'],'paused':_0x5850a9[_0x9ea3('0x4c')],'waiting':_0x5850a9[_0x9ea3('0x48')]};_0x4d95ca[_0x9ea3('0x20')](_0x4d8c0b);}}_0xbe854b({'count':_0x4d95ca['length'],'rows':_0x4d95ca});});},'WhatsappQueues':function(_0x233421){return new Promise(function(_0x2bbd49,_0x44b59d){var _0x3d26aa=[];for(var _0x3ec7c4 in _0x21234a[_0x9ea3('0x50')]){if(_0x21234a[_0x9ea3('0x50')][_0x9ea3('0x40')](_0x3ec7c4)){var _0x21c017=_0x21234a[_0x9ea3('0x50')][_0x3ec7c4];var _0x1259d9={'id':_0x21c017['id'],'available':_0x21c017[_0x9ea3('0x4a')],'loggedIn':_0x21c017[_0x9ea3('0x4b')],'name':_0x21c017['name'],'paused':_0x21c017[_0x9ea3('0x4c')],'waiting':_0x21c017['waiting']};_0x3d26aa[_0x9ea3('0x20')](_0x1259d9);}}_0x2bbd49({'count':_0x3d26aa[_0x9ea3('0x17')],'rows':_0x3d26aa});});},'ChatQueuesWaitingInteractions':function(_0x4014aa){return new Promise(function(_0x158195,_0x4499f4){var _0x4c33f1=_[_0x9ea3('0x45')](_0x21234a[_0x9ea3('0x51')]);_0x158195({'count':_0x4c33f1[_0x9ea3('0x17')],'rows':_0x4c33f1});});},'MailQueuesWaitingInteractions':function(_0x120d6b){return new Promise(function(_0x18ac3c,_0x4b4f23){var _0x189d6d=_[_0x9ea3('0x45')](_0x21234a['mailQueuesWaitingInteractions']);_0x18ac3c({'count':_0x189d6d[_0x9ea3('0x17')],'rows':_0x189d6d});});},'OpenchannelQueuesWaitingInteractions':function(_0x245595){return new Promise(function(_0x4f4bcf,_0x1970d5){var _0x3e3c5c=_['values'](_0x21234a['openchannelQueuesWaitingInteractions']);_0x4f4bcf({'count':_0x3e3c5c[_0x9ea3('0x17')],'rows':_0x3e3c5c});});},'SmsQueuesWaitingInteractions':function(_0x38d735){return new Promise(function(_0x4f1fc9,_0x151bcd){var _0x279f99=_[_0x9ea3('0x45')](_0x21234a[_0x9ea3('0x52')]);_0x4f1fc9({'count':_0x279f99[_0x9ea3('0x17')],'rows':_0x279f99});});},'FaxQueuesWaitingInteractions':function(_0x34a444){return new Promise(function(_0x50cb09,_0x3f6e85){var _0x283e2a=_[_0x9ea3('0x45')](_0x21234a[_0x9ea3('0x53')]);_0x50cb09({'count':_0x283e2a['length'],'rows':_0x283e2a});});},'WhatsappQueuesWaitingInteractions':function(_0x2501ef){return new Promise(function(_0x43db3c,_0x404bdc){var _0x12e926=_['values'](_0x21234a[_0x9ea3('0x54')]);_0x43db3c({'count':_0x12e926[_0x9ea3('0x17')],'rows':_0x12e926});});}};var _0x31d49f=jayson['server'](_0x1ab219)[_0x9ea3('0x55')]();_0x31d49f['on'](_0x9ea3('0x36'),function(_0x50f6c3){logger[_0x9ea3('0x36')](JSON[_0x9ea3('0x56')](_0x50f6c3));return _0x32b432(_0x50f6c3);});_0x31d49f[_0x9ea3('0x10')](0x232c,_0x9ea3('0x57'),function(){console['log'](_0x9ea3('0x58'),0x232c);return _0x5dd0c9('RPC\x20listening\x20on\x20port:'+0x232c);});});}; \ No newline at end of file diff --git a/server/services/routing/server/interval.js b/server/services/routing/server/interval.js index b63f118..e01aa7b 100644 --- a/server/services/routing/server/interval.js +++ b/server/services/routing/server/interval.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7356=['Command','format','iftime\x20%s','message','indexOf','true','[%s][INTERVAL]\x20%s','all','some','info','[%s][INTERVAL]\x20%s\x20%s','\x20|\x20','log','join','stack','stop','util','bluebird','jayson/promise','../../../config/logger','routing','client','http','request','then','error','catch','rules','length'];(function(_0x328c66,_0x183373){var _0x2f8541=function(_0x186026){while(--_0x186026){_0x328c66['push'](_0x328c66['shift']());}};_0x2f8541(++_0x183373);}(_0x7356,0x14f));var _0x6735=function(_0x44db2f,_0x24c83f){_0x44db2f=_0x44db2f-0x0;var _0x3b8b52=_0x7356[_0x44db2f];return _0x3b8b52;};'use strict';var util=require(_0x6735('0x0'));var BPromise=require(_0x6735('0x1'));var jayson=require(_0x6735('0x2'));var _=require('lodash');var logger=require(_0x6735('0x3'))(_0x6735('0x4'));var client=jayson[_0x6735('0x5')][_0x6735('0x6')]({'port':0x232a});function request(_0x1fd17d,_0x1c5276){return new BPromise(function(_0x10b1cc,_0x28276a){return client[_0x6735('0x7')](_0x1fd17d,_0x1c5276)[_0x6735('0x8')](function(_0x34b37d){if(_0x34b37d[_0x6735('0x9')]){return _0x28276a(_0x34b37d[_0x6735('0x9')]['message']);}else{return _0x10b1cc(_0x34b37d['result']);}})[_0x6735('0xa')](function(_0xba6877){return _0x28276a(_0xba6877);});});}exports['condition']=function(_0x435fa8,_0x595591,_0x14ed61){return function(_0x18dcae){if(_0x14ed61[_0x6735('0xb')]&&!_0x14ed61[_0x6735('0xb')][_0x435fa8]){logger['info']('[%s][INTERVAL]\x20ROUTING\x20STOPPED',_0x435fa8);return _0x18dcae['stop']();}var _0x17037c=[];for(var _0x57e731=0x0;_0x57e731<_0x595591[_0x6735('0xc')];_0x57e731+=0x1){_0x17037c['push'](request(_0x6735('0xd'),{'command':util[_0x6735('0xe')](_0x6735('0xf'),_0x595591[_0x57e731])})[_0x6735('0x8')](function(_0x4b19e2){return _0x4b19e2&&_0x4b19e2[_0x6735('0x10')]&&_0x4b19e2[_0x6735('0x10')][_0x6735('0x11')](_0x6735('0x12'))>=0x0?!![]:![];})['catch'](function(_0x50cc24){logger['error'](_0x6735('0x13'),_0x435fa8,_0x595591[_0x57e731]);}));}BPromise[_0x6735('0x14')](_0x17037c)[_0x6735('0x8')](function(_0x1cb129){var _0x558840=_[_0x6735('0x15')](_0x1cb129);logger[_0x6735('0x16')](_0x6735('0x17'),_0x435fa8,_0x595591['join'](_0x6735('0x18')),_0x558840);_0x18dcae['when'](_0x558840);})[_0x6735('0xa')](function(_0x513cb5){console[_0x6735('0x19')](_0x513cb5);logger[_0x6735('0x9')](_0x6735('0x17'),_0x435fa8,_0x595591[_0x6735('0x1a')](_0x6735('0x18')),_0x513cb5[_0x6735('0x1b')]);_0x18dcae[_0x6735('0x1c')]();});};}; \ No newline at end of file +var _0x485b=['message','result','catch','condition','rules','info','stop','length','push','Command','iftime\x20%s','indexOf','[%s][INTERVAL]\x20%s','all','some','log','[%s][INTERVAL]\x20%s\x20%s','join','\x20|\x20','util','bluebird','jayson/promise','lodash','../../../config/logger','routing','client','request','then','error'];(function(_0x167cc1,_0x56ef5a){var _0x10bc4b=function(_0xd6a255){while(--_0xd6a255){_0x167cc1['push'](_0x167cc1['shift']());}};_0x10bc4b(++_0x56ef5a);}(_0x485b,0xde));var _0xb485=function(_0x4e1d03,_0x786f3a){_0x4e1d03=_0x4e1d03-0x0;var _0x362d4b=_0x485b[_0x4e1d03];return _0x362d4b;};'use strict';var util=require(_0xb485('0x0'));var BPromise=require(_0xb485('0x1'));var jayson=require(_0xb485('0x2'));var _=require(_0xb485('0x3'));var logger=require(_0xb485('0x4'))(_0xb485('0x5'));var client=jayson[_0xb485('0x6')]['http']({'port':0x232a});function request(_0x20c675,_0x1be995){return new BPromise(function(_0x5db050,_0x597bd1){return client[_0xb485('0x7')](_0x20c675,_0x1be995)[_0xb485('0x8')](function(_0x15c9f6){if(_0x15c9f6[_0xb485('0x9')]){return _0x597bd1(_0x15c9f6[_0xb485('0x9')][_0xb485('0xa')]);}else{return _0x5db050(_0x15c9f6[_0xb485('0xb')]);}})[_0xb485('0xc')](function(_0x175149){return _0x597bd1(_0x175149);});});}exports[_0xb485('0xd')]=function(_0x1b17c7,_0x608ef,_0x58e0b5){return function(_0x3bef97){if(_0x58e0b5[_0xb485('0xe')]&&!_0x58e0b5[_0xb485('0xe')][_0x1b17c7]){logger[_0xb485('0xf')]('[%s][INTERVAL]\x20ROUTING\x20STOPPED',_0x1b17c7);return _0x3bef97[_0xb485('0x10')]();}var _0x5b8b5f=[];for(var _0x1f65c9=0x0;_0x1f65c9<_0x608ef[_0xb485('0x11')];_0x1f65c9+=0x1){_0x5b8b5f[_0xb485('0x12')](request(_0xb485('0x13'),{'command':util['format'](_0xb485('0x14'),_0x608ef[_0x1f65c9])})[_0xb485('0x8')](function(_0x4dc26b){return _0x4dc26b&&_0x4dc26b[_0xb485('0xa')]&&_0x4dc26b['message'][_0xb485('0x15')]('true')>=0x0?!![]:![];})[_0xb485('0xc')](function(_0x1a27ac){logger['error'](_0xb485('0x16'),_0x1b17c7,_0x608ef[_0x1f65c9]);}));}BPromise[_0xb485('0x17')](_0x5b8b5f)['then'](function(_0x431e95){var _0x3035e1=_[_0xb485('0x18')](_0x431e95);logger['info']('[%s][INTERVAL]\x20%s\x20%s',_0x1b17c7,_0x608ef['join']('\x20|\x20'),_0x3035e1);_0x3bef97['when'](_0x3035e1);})[_0xb485('0xc')](function(_0x21a681){console[_0xb485('0x19')](_0x21a681);logger[_0xb485('0x9')](_0xb485('0x1a'),_0x1b17c7,_0x608ef[_0xb485('0x1b')](_0xb485('0x1c')),_0x21a681['stack']);_0x3bef97[_0xb485('0x10')]();});};}; \ No newline at end of file diff --git a/server/services/xdr/agents.controller.js b/server/services/xdr/agents.controller.js index f0d4afa..b11a50e 100644 --- a/server/services/xdr/agents.controller.js +++ b/server/services/xdr/agents.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd64b=['[%s][agents][attendedtransfer]','origtransfereruniqueid','[%s][agents][attendedtransfer]\x20agent:%s','secondtransfereruniqueid','ATTENDED','origtransfererexten','transferuniqueid','transfereeuniqueid','agententerreason','clone','calleridname','secondtransfererlinkedid','secondtransfererexten','transfertargetuniqueid','hangup','[%s][agents][hangup]','cause','rejected','indexOf','splice','agent','[%s][agents][hangup]\x20agent:%s\x20reason:%s\x20lastevent:%s','complete','lodash','./utils','info','format','[%s][agents][writeDB]\x20channel:%s\x20queue:%s\x20agent:%s\x20interface:%s\x20calleridnum:%s\x20connectedlinenum:%s\x20lastevent:%s','uniqueid','calleridnum','connectedlinenum','lastevent','queue','getVoiceQueueByName','then','type','agentacw','agentcomplete','acwtime','acwTimeout','request','destuniqueid','agentcalled','debug','[%s][agents][agentcalled]','agentcalledAt','now','called','connectedlinename','[%s][agents][agentcalled]\x20agent:%s\x20destuniqueid:%s\x20lastevent:called','membername','error','agentringnoanswer','isNil','[%s][agents][agentringnoanswer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:timeout','agentringnoanswerAt','reason','timeout','ringtime','push','queuecallerabandon','forIn','includes','[%s][agents][queuecallerabandon]','abandoned','holdtime','agentconnect','[%s][agents][agentconnect]','connect','talktime','answered_elsewhere','answeredelsewheredestinationuniqueid','answeredelsewheremembername','[%s][agents][agentcomplete]','diffTime','agentcompleteAt','agentconnectAt','blindtransfer','transfereruniqueid','[%s][agents][blindtransfer]','[%s][agents][blindtransfer]\x20agent:%s\x20transferuniqueid:%s','transfer','transfertype','blind','transferexten'];(function(_0x32858f,_0x1fa5eb){var _0x456750=function(_0x18c25f){while(--_0x18c25f){_0x32858f['push'](_0x32858f['shift']());}};_0x456750(++_0x1fa5eb);}(_0xd64b,0xc1));var _0xbd64=function(_0x5e9817,_0xa29439){_0x5e9817=_0x5e9817-0x0;var _0x25b437=_0xd64b[_0x5e9817];return _0x25b437;};'use strict';var _=require(_0xbd64('0x0'));var util=require('util');var utils=require(_0xbd64('0x1'));var agents={};var transfers={};var unanswered=[];function writeDB(_0x4bfb7c,_0x30b9b3){utils[_0xbd64('0x2')](util[_0xbd64('0x3')](_0xbd64('0x4'),_0x4bfb7c[_0xbd64('0x5')],_0x4bfb7c['channel'],_0x4bfb7c['queue'],_0x4bfb7c['membername'],_0x4bfb7c['interface'],_0x4bfb7c[_0xbd64('0x6')],_0x4bfb7c[_0xbd64('0x7')],_0x4bfb7c[_0xbd64('0x8')]));if(_0x4bfb7c[_0xbd64('0x9')]){utils[_0xbd64('0xa')](_0x4bfb7c[_0xbd64('0x9')])[_0xbd64('0xb')](function(_0x5d32b8){if(_0x5d32b8){_0x4bfb7c['type']=_0x5d32b8[_0xbd64('0xc')];_0x4bfb7c[_0xbd64('0xd')]=_0x4bfb7c[_0xbd64('0xe')]?_0x5d32b8['acw']:![];_0x4bfb7c[_0xbd64('0xf')]=_0x4bfb7c[_0xbd64('0xd')]?_0x5d32b8[_0xbd64('0x10')]:0x0;}utils[_0xbd64('0x11')]('CreateVoiceAgentReport',_0x4bfb7c);});}else{utils[_0xbd64('0x11')]('CreateVoiceAgentReport',_0x4bfb7c);}if(_0x30b9b3){delete transfers[_0x4bfb7c[_0xbd64('0x5')]];}else{delete agents[_0x4bfb7c[_0xbd64('0x12')]];}}exports[_0xbd64('0x13')]=function(_0x2183e2){try{utils[_0xbd64('0x14')](util[_0xbd64('0x3')](_0xbd64('0x15'),_0x2183e2[_0xbd64('0x5')]),_0x2183e2);agents[_0x2183e2[_0xbd64('0x12')]]=_0x2183e2;agents[_0x2183e2['destuniqueid']][_0xbd64('0x16')]=utils[_0xbd64('0x17')]();agents[_0x2183e2[_0xbd64('0x12')]][_0xbd64('0x8')]=_0xbd64('0x18');agents[_0x2183e2['destuniqueid']][_0xbd64('0x7')]=null;agents[_0x2183e2['destuniqueid']][_0xbd64('0x19')]=null;utils[_0xbd64('0x2')](util[_0xbd64('0x3')](_0xbd64('0x1a'),_0x2183e2[_0xbd64('0x5')],agents[_0x2183e2[_0xbd64('0x12')]][_0xbd64('0x1b')],_0x2183e2[_0xbd64('0x12')]));}catch(_0x5d3b00){utils[_0xbd64('0x1c')](util[_0xbd64('0x3')]('[%s][agents][agentcalled]',_0x2183e2['uniqueid']),_0x5d3b00);}};exports[_0xbd64('0x1d')]=function(_0x42b328){try{if(!_[_0xbd64('0x1e')](agents[_0x42b328[_0xbd64('0x12')]])){utils[_0xbd64('0x14')](util[_0xbd64('0x3')]('[%s][agents][agentringnoanswer]',_0x42b328['uniqueid']),_0x42b328);utils[_0xbd64('0x2')](util[_0xbd64('0x3')](_0xbd64('0x1f'),_0x42b328[_0xbd64('0x5')],agents[_0x42b328['destuniqueid']]['membername'],_0x42b328[_0xbd64('0x12')]));agents[_0x42b328['destuniqueid']][_0xbd64('0x1d')]=!![];agents[_0x42b328['destuniqueid']][_0xbd64('0x20')]=utils[_0xbd64('0x17')]();agents[_0x42b328[_0xbd64('0x12')]][_0xbd64('0x8')]='timeout';agents[_0x42b328[_0xbd64('0x12')]][_0xbd64('0x21')]=_0xbd64('0x22');agents[_0x42b328[_0xbd64('0x12')]]['holdtime']=_0x42b328['ringtime']?parseInt(_0x42b328[_0xbd64('0x23')])/0x3e8:0x0;agents[_0x42b328['destuniqueid']]['talktime']=0x0;unanswered[_0xbd64('0x24')](_0x42b328['destuniqueid']);}}catch(_0x3cf5b7){utils['error'](util[_0xbd64('0x3')]('[%s][agents][agentringnoanswer]',_0x42b328[_0xbd64('0x5')]),_0x3cf5b7);}};exports[_0xbd64('0x25')]=function(_0x3be63a){try{_[_0xbd64('0x26')](agents,function(_0x306f19,_0x207ffc){if(_0x306f19['uniqueid']==_0x3be63a[_0xbd64('0x5')]&&!_[_0xbd64('0x27')](unanswered,_0x306f19[_0xbd64('0x12')])){utils[_0xbd64('0x14')](util[_0xbd64('0x3')](_0xbd64('0x28'),_0x3be63a['uniqueid']),_0x3be63a);utils['info'](util[_0xbd64('0x3')]('[%s][agents][queuecallerabandon]\x20agent:%s\x20destuniqueid:%s\x20lastevent:abandoned',_0x3be63a[_0xbd64('0x5')],_0x306f19[_0xbd64('0x1b')],_0x306f19['destuniqueid']));_0x306f19['agentringnoanswer']=!![];_0x306f19[_0xbd64('0x20')]=utils['now']();_0x306f19['lastevent']=_0xbd64('0x29');_0x306f19[_0xbd64('0x21')]=_0xbd64('0x29');_0x306f19['holdtime']=_0x3be63a[_0xbd64('0x2a')];_0x306f19['talktime']=0x0;writeDB(_0x306f19);}});}catch(_0x1fc9cf){utils[_0xbd64('0x1c')](util[_0xbd64('0x3')](_0xbd64('0x28'),_0x3be63a[_0xbd64('0x5')]),_0x1fc9cf);}};exports[_0xbd64('0x2b')]=function(_0x513339){try{if(agents[_0x513339['destuniqueid']]){utils[_0xbd64('0x14')](util[_0xbd64('0x3')](_0xbd64('0x2c'),_0x513339[_0xbd64('0x5')]),_0x513339);utils[_0xbd64('0x2')](util[_0xbd64('0x3')]('[%s][agents][agentconnect]\x20agent:%s\x20destuniqueid:%s\x20lastevent:connect',_0x513339['uniqueid'],agents[_0x513339[_0xbd64('0x12')]][_0xbd64('0x1b')],_0x513339[_0xbd64('0x12')]));agents[_0x513339['destuniqueid']]['agentconnectAt']=utils[_0xbd64('0x17')]();agents[_0x513339['destuniqueid']][_0xbd64('0x7')]=_0x513339['connectedlinenum'];agents[_0x513339[_0xbd64('0x12')]][_0xbd64('0x19')]=_0x513339['connectedlinename'];agents[_0x513339[_0xbd64('0x12')]]['holdtime']=_0x513339['ringtime'];agents[_0x513339[_0xbd64('0x12')]][_0xbd64('0x8')]=_0xbd64('0x2d');_['forIn'](agents,function(_0x540e2a,_0x5d6bcf){if(_0x540e2a[_0xbd64('0x12')]!=_0x513339[_0xbd64('0x12')]&&_0x540e2a['uniqueid']==_0x513339[_0xbd64('0x5')]){_0x540e2a[_0xbd64('0x2e')]=0x0;_0x540e2a[_0xbd64('0x2a')]=_0x513339[_0xbd64('0x23')];_0x540e2a['agentringnoanswer']=!![];_0x540e2a['agentringnoanswerAt']=utils[_0xbd64('0x17')]();_0x540e2a['lastevent']='answered_elsewhere';_0x540e2a[_0xbd64('0x21')]=_0xbd64('0x2f');_0x540e2a[_0xbd64('0x30')]=_0x513339[_0xbd64('0x12')];_0x540e2a[_0xbd64('0x31')]=_0x513339[_0xbd64('0x1b')];writeDB(_0x540e2a);}});}}catch(_0x247775){utils[_0xbd64('0x1c')](util['format'](_0xbd64('0x2c'),_0x513339[_0xbd64('0x5')]),_0x247775);}};exports['agentcomplete']=function(_0x41b27a){try{if(!_[_0xbd64('0x1e')](agents[_0x41b27a[_0xbd64('0x12')]])){utils[_0xbd64('0x14')](util[_0xbd64('0x3')](_0xbd64('0x32'),_0x41b27a[_0xbd64('0x5')]),_0x41b27a);utils['info'](util[_0xbd64('0x3')]('[%s][agents][agentcomplete]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete',_0x41b27a[_0xbd64('0x5')],agents[_0x41b27a['destuniqueid']][_0xbd64('0x1b')],_0x41b27a[_0xbd64('0x12')]));agents[_0x41b27a[_0xbd64('0x12')]]['agentcomplete']=!![];agents[_0x41b27a[_0xbd64('0x12')]]['agentcompleteAt']=utils['now']();agents[_0x41b27a['destuniqueid']][_0xbd64('0x2e')]=utils[_0xbd64('0x33')](agents[_0x41b27a[_0xbd64('0x12')]][_0xbd64('0x34')],agents[_0x41b27a[_0xbd64('0x12')]][_0xbd64('0x35')]);agents[_0x41b27a[_0xbd64('0x12')]]['reason']=_0x41b27a[_0xbd64('0x21')];agents[_0x41b27a[_0xbd64('0x12')]][_0xbd64('0x8')]='complete';writeDB(agents[_0x41b27a[_0xbd64('0x12')]]);}}catch(_0x436f36){utils[_0xbd64('0x1c')](util[_0xbd64('0x3')](_0xbd64('0x32'),_0x41b27a['uniqueid']),_0x436f36);}};exports[_0xbd64('0x36')]=function(_0x1a9ec8){try{if(!_[_0xbd64('0x1e')](agents[_0x1a9ec8[_0xbd64('0x37')]])){utils['debug'](util['format'](_0xbd64('0x38'),_0x1a9ec8[_0xbd64('0x5')]),_0x1a9ec8);utils[_0xbd64('0x2')](util[_0xbd64('0x3')](_0xbd64('0x39'),_0x1a9ec8[_0xbd64('0x5')],agents[_0x1a9ec8[_0xbd64('0x37')]][_0xbd64('0x1b')],agents[_0x1a9ec8[_0xbd64('0x37')]][_0xbd64('0x5')]));agents[_0x1a9ec8[_0xbd64('0x37')]][_0xbd64('0x3a')]=!![];agents[_0x1a9ec8[_0xbd64('0x37')]][_0xbd64('0x3b')]=_0xbd64('0x3c');agents[_0x1a9ec8['transfereruniqueid']][_0xbd64('0x3d')]=_0x1a9ec8['extension'];agents[_0x1a9ec8['transfereruniqueid']]['transferuniqueid']=agents[_0x1a9ec8['transfereruniqueid']][_0xbd64('0x5')];}}catch(_0x2f56df){utils['error'](util[_0xbd64('0x3')](_0xbd64('0x38'),_0x1a9ec8[_0xbd64('0x5')]),_0x2f56df);}};exports['attendedtransfer']=function(_0x2c42fd){try{utils[_0xbd64('0x14')](util[_0xbd64('0x3')](_0xbd64('0x3e'),_0x2c42fd[_0xbd64('0x3f')]),_0x2c42fd);if(_0x2c42fd[_0xbd64('0x3f')]==_0x2c42fd['origtransfererlinkedid']){if(!_['isNil'](agents[_0x2c42fd['secondtransfereruniqueid']])){utils[_0xbd64('0x2')](util[_0xbd64('0x3')](_0xbd64('0x40'),_0x2c42fd[_0xbd64('0x3f')],agents[_0x2c42fd['secondtransfereruniqueid']][_0xbd64('0x1b')]));agents[_0x2c42fd[_0xbd64('0x41')]][_0xbd64('0x3a')]=!![];agents[_0x2c42fd[_0xbd64('0x41')]][_0xbd64('0x3b')]=_0xbd64('0x42');agents[_0x2c42fd['secondtransfereruniqueid']][_0xbd64('0x3d')]=_0x2c42fd[_0xbd64('0x43')];agents[_0x2c42fd[_0xbd64('0x41')]][_0xbd64('0x44')]=_0x2c42fd[_0xbd64('0x3f')];}if(_0x2c42fd[_0xbd64('0x45')]&&agents[_0x2c42fd[_0xbd64('0x45')]]){agents[_0x2c42fd[_0xbd64('0x45')]][_0xbd64('0x46')]=0x1;transfers[_0x2c42fd[_0xbd64('0x45')]]=_[_0xbd64('0x47')](agents[_0x2c42fd[_0xbd64('0x45')]]);transfers[_0x2c42fd['transfereeuniqueid']]['calleridnum']=agents[_0x2c42fd[_0xbd64('0x41')]][_0xbd64('0x6')];transfers[_0x2c42fd['transfereeuniqueid']]['calleridname']=agents[_0x2c42fd[_0xbd64('0x41')]][_0xbd64('0x48')];transfers[_0x2c42fd['transfereeuniqueid']][_0xbd64('0x16')]=utils[_0xbd64('0x17')]();transfers[_0x2c42fd[_0xbd64('0x45')]][_0xbd64('0x35')]=utils[_0xbd64('0x17')]();transfers[_0x2c42fd[_0xbd64('0x45')]][_0xbd64('0x2a')]=0x0;transfers[_0x2c42fd[_0xbd64('0x45')]][_0xbd64('0x46')]=0x2;}}else if(_0x2c42fd['secondtransfereruniqueid']==_0x2c42fd[_0xbd64('0x49')]){if(!_[_0xbd64('0x1e')](agents[_0x2c42fd[_0xbd64('0x3f')]])){utils['info'](util[_0xbd64('0x3')](_0xbd64('0x40'),_0x2c42fd['origtransfereruniqueid'],agents[_0x2c42fd[_0xbd64('0x3f')]][_0xbd64('0x1b')]));agents[_0x2c42fd[_0xbd64('0x3f')]][_0xbd64('0x3a')]=!![];agents[_0x2c42fd[_0xbd64('0x3f')]][_0xbd64('0x3b')]='ATTENDED';agents[_0x2c42fd[_0xbd64('0x3f')]][_0xbd64('0x3d')]=_0x2c42fd[_0xbd64('0x4a')];agents[_0x2c42fd[_0xbd64('0x3f')]]['transferuniqueid']=_0x2c42fd[_0xbd64('0x41')];}if(_0x2c42fd[_0xbd64('0x4b')]&&agents[_0x2c42fd['transfertargetuniqueid']]){agents[_0x2c42fd[_0xbd64('0x4b')]]['agententerreason']=0x1;transfers[_0x2c42fd[_0xbd64('0x4b')]]=_[_0xbd64('0x47')](agents[_0x2c42fd[_0xbd64('0x4b')]]);transfers[_0x2c42fd[_0xbd64('0x4b')]]['calleridnum']=agents[_0x2c42fd[_0xbd64('0x3f')]][_0xbd64('0x6')];transfers[_0x2c42fd[_0xbd64('0x4b')]][_0xbd64('0x48')]=agents[_0x2c42fd[_0xbd64('0x3f')]][_0xbd64('0x48')];transfers[_0x2c42fd['transfertargetuniqueid']]['agentcalledAt']=utils['now']();transfers[_0x2c42fd[_0xbd64('0x4b')]][_0xbd64('0x35')]=utils[_0xbd64('0x17')]();transfers[_0x2c42fd[_0xbd64('0x4b')]][_0xbd64('0x2a')]=0x0;transfers[_0x2c42fd[_0xbd64('0x4b')]]['agententerreason']=0x2;}}}catch(_0x30eddc){utils[_0xbd64('0x1c')](util[_0xbd64('0x3')](_0xbd64('0x3e'),_0x2c42fd[_0xbd64('0x3f')]),_0x30eddc);}};exports[_0xbd64('0x4c')]=function(_0x2f3516){try{utils[_0xbd64('0x14')](util[_0xbd64('0x3')](_0xbd64('0x4d'),_0x2f3516[_0xbd64('0x5')]),_0x2f3516);if(agents[_0x2f3516[_0xbd64('0x5')]]&&agents[_0x2f3516['uniqueid']]['reason']===_0xbd64('0x22')){if(_0x2f3516[_0xbd64('0x4e')]==='21'){agents[_0x2f3516[_0xbd64('0x5')]]['reason']=_0xbd64('0x4f');agents[_0x2f3516['uniqueid']][_0xbd64('0x8')]=_0xbd64('0x4f');}utils[_0xbd64('0x2')](util[_0xbd64('0x3')]('[%s][agents][hangup]\x20agent:%s\x20reason:%s\x20lastevent:%s',_0x2f3516[_0xbd64('0x5')],agents[_0x2f3516['uniqueid']][_0xbd64('0x1b')],agents[_0x2f3516[_0xbd64('0x5')]][_0xbd64('0x21')],agents[_0x2f3516[_0xbd64('0x5')]][_0xbd64('0x8')]));writeDB(agents[_0x2f3516['uniqueid']]);var _0x43780f=unanswered[_0xbd64('0x50')](_0x2f3516['uniqueid']);if(_0x43780f>-0x1){unanswered[_0xbd64('0x51')](_0x43780f,0x1);}}if(transfers[_0x2f3516[_0xbd64('0x5')]]){transfers[_0x2f3516[_0xbd64('0x5')]][_0xbd64('0xe')]=!![];transfers[_0x2f3516['uniqueid']][_0xbd64('0x34')]=utils['now']();transfers[_0x2f3516[_0xbd64('0x5')]][_0xbd64('0x2e')]=utils[_0xbd64('0x33')](transfers[_0x2f3516['uniqueid']]['agentcompleteAt'],transfers[_0x2f3516['uniqueid']]['agentconnectAt']);transfers[_0x2f3516[_0xbd64('0x5')]][_0xbd64('0x21')]=_0xbd64('0x52');transfers[_0x2f3516[_0xbd64('0x5')]][_0xbd64('0x8')]='complete';utils[_0xbd64('0x2')](util[_0xbd64('0x3')](_0xbd64('0x53'),_0x2f3516[_0xbd64('0x5')],transfers[_0x2f3516[_0xbd64('0x5')]]['membername'],transfers[_0x2f3516[_0xbd64('0x5')]][_0xbd64('0x21')],transfers[_0x2f3516[_0xbd64('0x5')]][_0xbd64('0x8')]));writeDB(transfers[_0x2f3516['uniqueid']],!![]);}if(agents[_0x2f3516['uniqueid']]&&agents[_0x2f3516[_0xbd64('0x5')]][_0xbd64('0x35')]){agents[_0x2f3516[_0xbd64('0x5')]][_0xbd64('0xe')]=!![];agents[_0x2f3516[_0xbd64('0x5')]][_0xbd64('0x34')]=utils[_0xbd64('0x17')]();agents[_0x2f3516[_0xbd64('0x5')]]['talktime']=utils[_0xbd64('0x33')](agents[_0x2f3516['uniqueid']][_0xbd64('0x34')],agents[_0x2f3516[_0xbd64('0x5')]][_0xbd64('0x35')]);agents[_0x2f3516['uniqueid']][_0xbd64('0x21')]=agents[_0x2f3516['uniqueid']]['transfer']?_0xbd64('0x3a'):_0xbd64('0x52');agents[_0x2f3516[_0xbd64('0x5')]]['lastevent']=_0xbd64('0x54');utils[_0xbd64('0x2')](util[_0xbd64('0x3')](_0xbd64('0x53'),_0x2f3516['uniqueid'],agents[_0x2f3516[_0xbd64('0x5')]][_0xbd64('0x1b')],agents[_0x2f3516[_0xbd64('0x5')]][_0xbd64('0x21')],agents[_0x2f3516[_0xbd64('0x5')]][_0xbd64('0x8')]));writeDB(agents[_0x2f3516[_0xbd64('0x5')]]);}}catch(_0x439bbd){utils[_0xbd64('0x1c')](util[_0xbd64('0x3')](_0xbd64('0x4d'),_0x2f3516[_0xbd64('0x5')]),_0x439bbd);}}; \ No newline at end of file +var _0x0fd9=['agentacw','agentcomplete','acw','acwtime','acwTimeout','request','CreateVoiceAgentReport','destuniqueid','agentcalled','format','agentcalledAt','now','connectedlinenum','info','[%s][agents][agentcalled]\x20agent:%s\x20destuniqueid:%s\x20lastevent:called','error','[%s][agents][agentcalled]','agentringnoanswer','isNil','debug','[%s][agents][agentringnoanswer]','[%s][agents][agentringnoanswer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:timeout','timeout','holdtime','ringtime','forIn','includes','[%s][agents][queuecallerabandon]\x20agent:%s\x20destuniqueid:%s\x20lastevent:abandoned','agentringnoanswerAt','abandoned','reason','[%s][agents][queuecallerabandon]','agentconnect','[%s][agents][agentconnect]','[%s][agents][agentconnect]\x20agent:%s\x20destuniqueid:%s\x20lastevent:connect','agentconnectAt','connectedlinename','connect','talktime','answered_elsewhere','answeredelsewheredestinationuniqueid','answeredelsewheremembername','[%s][agents][agentcomplete]','agentcompleteAt','complete','blindtransfer','transfereruniqueid','[%s][agents][blindtransfer]','[%s][agents][blindtransfer]\x20agent:%s\x20transferuniqueid:%s','transfertype','blind','transferexten','extension','transferuniqueid','attendedtransfer','[%s][agents][attendedtransfer]','origtransfereruniqueid','secondtransfereruniqueid','transfer','ATTENDED','transfereeuniqueid','agententerreason','clone','calleridname','secondtransfererlinkedid','[%s][agents][attendedtransfer]\x20agent:%s','secondtransfererexten','transfertargetuniqueid','calleridnum','hangup','cause','rejected','splice','agent','[%s][agents][hangup]\x20agent:%s\x20reason:%s\x20lastevent:%s','[%s][agents][hangup]','util','./utils','[%s][agents][writeDB]\x20channel:%s\x20queue:%s\x20agent:%s\x20interface:%s\x20calleridnum:%s\x20connectedlinenum:%s\x20lastevent:%s','uniqueid','channel','queue','membername','interface','lastevent','then','type'];(function(_0x1734d9,_0x47ead7){var _0x2ad3bf=function(_0x412570){while(--_0x412570){_0x1734d9['push'](_0x1734d9['shift']());}};_0x2ad3bf(++_0x47ead7);}(_0x0fd9,0xa3));var _0x90fd=function(_0x231b2e,_0x2a33f9){_0x231b2e=_0x231b2e-0x0;var _0x3feb2a=_0x0fd9[_0x231b2e];return _0x3feb2a;};'use strict';var _=require('lodash');var util=require(_0x90fd('0x0'));var utils=require(_0x90fd('0x1'));var agents={};var transfers={};var unanswered=[];function writeDB(_0x685cd0,_0x32f6b6){utils['info'](util['format'](_0x90fd('0x2'),_0x685cd0[_0x90fd('0x3')],_0x685cd0[_0x90fd('0x4')],_0x685cd0[_0x90fd('0x5')],_0x685cd0[_0x90fd('0x6')],_0x685cd0[_0x90fd('0x7')],_0x685cd0['calleridnum'],_0x685cd0['connectedlinenum'],_0x685cd0[_0x90fd('0x8')]));if(_0x685cd0['queue']){utils['getVoiceQueueByName'](_0x685cd0[_0x90fd('0x5')])[_0x90fd('0x9')](function(_0x5e66f0){if(_0x5e66f0){_0x685cd0[_0x90fd('0xa')]=_0x5e66f0[_0x90fd('0xa')];_0x685cd0[_0x90fd('0xb')]=_0x685cd0[_0x90fd('0xc')]?_0x5e66f0[_0x90fd('0xd')]:![];_0x685cd0[_0x90fd('0xe')]=_0x685cd0[_0x90fd('0xb')]?_0x5e66f0[_0x90fd('0xf')]:0x0;}utils[_0x90fd('0x10')]('CreateVoiceAgentReport',_0x685cd0);});}else{utils[_0x90fd('0x10')](_0x90fd('0x11'),_0x685cd0);}if(_0x32f6b6){delete transfers[_0x685cd0['uniqueid']];}else{delete agents[_0x685cd0[_0x90fd('0x12')]];}}exports[_0x90fd('0x13')]=function(_0x19a594){try{utils['debug'](util[_0x90fd('0x14')]('[%s][agents][agentcalled]',_0x19a594[_0x90fd('0x3')]),_0x19a594);agents[_0x19a594[_0x90fd('0x12')]]=_0x19a594;agents[_0x19a594[_0x90fd('0x12')]][_0x90fd('0x15')]=utils[_0x90fd('0x16')]();agents[_0x19a594[_0x90fd('0x12')]][_0x90fd('0x8')]='called';agents[_0x19a594['destuniqueid']][_0x90fd('0x17')]=null;agents[_0x19a594[_0x90fd('0x12')]]['connectedlinename']=null;utils[_0x90fd('0x18')](util[_0x90fd('0x14')](_0x90fd('0x19'),_0x19a594['uniqueid'],agents[_0x19a594[_0x90fd('0x12')]][_0x90fd('0x6')],_0x19a594[_0x90fd('0x12')]));}catch(_0x14958b){utils[_0x90fd('0x1a')](util[_0x90fd('0x14')](_0x90fd('0x1b'),_0x19a594[_0x90fd('0x3')]),_0x14958b);}};exports[_0x90fd('0x1c')]=function(_0x90197e){try{if(!_[_0x90fd('0x1d')](agents[_0x90197e[_0x90fd('0x12')]])){utils[_0x90fd('0x1e')](util[_0x90fd('0x14')](_0x90fd('0x1f'),_0x90197e['uniqueid']),_0x90197e);utils[_0x90fd('0x18')](util[_0x90fd('0x14')](_0x90fd('0x20'),_0x90197e[_0x90fd('0x3')],agents[_0x90197e[_0x90fd('0x12')]][_0x90fd('0x6')],_0x90197e[_0x90fd('0x12')]));agents[_0x90197e[_0x90fd('0x12')]]['agentringnoanswer']=!![];agents[_0x90197e[_0x90fd('0x12')]]['agentringnoanswerAt']=utils[_0x90fd('0x16')]();agents[_0x90197e[_0x90fd('0x12')]][_0x90fd('0x8')]=_0x90fd('0x21');agents[_0x90197e[_0x90fd('0x12')]]['reason']=_0x90fd('0x21');agents[_0x90197e[_0x90fd('0x12')]][_0x90fd('0x22')]=_0x90197e[_0x90fd('0x23')]?parseInt(_0x90197e[_0x90fd('0x23')])/0x3e8:0x0;agents[_0x90197e[_0x90fd('0x12')]]['talktime']=0x0;unanswered['push'](_0x90197e[_0x90fd('0x12')]);}}catch(_0x170cfb){utils[_0x90fd('0x1a')](util[_0x90fd('0x14')](_0x90fd('0x1f'),_0x90197e['uniqueid']),_0x170cfb);}};exports['queuecallerabandon']=function(_0x3781bb){try{_[_0x90fd('0x24')](agents,function(_0x228fbc,_0x3a0102){if(_0x228fbc['uniqueid']==_0x3781bb['uniqueid']&&!_[_0x90fd('0x25')](unanswered,_0x228fbc[_0x90fd('0x12')])){utils[_0x90fd('0x1e')](util[_0x90fd('0x14')]('[%s][agents][queuecallerabandon]',_0x3781bb[_0x90fd('0x3')]),_0x3781bb);utils[_0x90fd('0x18')](util[_0x90fd('0x14')](_0x90fd('0x26'),_0x3781bb[_0x90fd('0x3')],_0x228fbc[_0x90fd('0x6')],_0x228fbc[_0x90fd('0x12')]));_0x228fbc[_0x90fd('0x1c')]=!![];_0x228fbc[_0x90fd('0x27')]=utils[_0x90fd('0x16')]();_0x228fbc[_0x90fd('0x8')]=_0x90fd('0x28');_0x228fbc[_0x90fd('0x29')]=_0x90fd('0x28');_0x228fbc[_0x90fd('0x22')]=_0x3781bb[_0x90fd('0x22')];_0x228fbc['talktime']=0x0;writeDB(_0x228fbc);}});}catch(_0x13c019){utils[_0x90fd('0x1a')](util[_0x90fd('0x14')](_0x90fd('0x2a'),_0x3781bb[_0x90fd('0x3')]),_0x13c019);}};exports[_0x90fd('0x2b')]=function(_0x35eae2){try{if(agents[_0x35eae2[_0x90fd('0x12')]]){utils[_0x90fd('0x1e')](util[_0x90fd('0x14')](_0x90fd('0x2c'),_0x35eae2[_0x90fd('0x3')]),_0x35eae2);utils[_0x90fd('0x18')](util['format'](_0x90fd('0x2d'),_0x35eae2[_0x90fd('0x3')],agents[_0x35eae2[_0x90fd('0x12')]][_0x90fd('0x6')],_0x35eae2['destuniqueid']));agents[_0x35eae2[_0x90fd('0x12')]][_0x90fd('0x2e')]=utils[_0x90fd('0x16')]();agents[_0x35eae2['destuniqueid']]['connectedlinenum']=_0x35eae2[_0x90fd('0x17')];agents[_0x35eae2[_0x90fd('0x12')]][_0x90fd('0x2f')]=_0x35eae2[_0x90fd('0x2f')];agents[_0x35eae2[_0x90fd('0x12')]][_0x90fd('0x22')]=_0x35eae2[_0x90fd('0x23')];agents[_0x35eae2[_0x90fd('0x12')]][_0x90fd('0x8')]=_0x90fd('0x30');_[_0x90fd('0x24')](agents,function(_0x43c84c,_0x21dc9c){if(_0x43c84c[_0x90fd('0x12')]!=_0x35eae2[_0x90fd('0x12')]&&_0x43c84c[_0x90fd('0x3')]==_0x35eae2[_0x90fd('0x3')]){_0x43c84c[_0x90fd('0x31')]=0x0;_0x43c84c['holdtime']=_0x35eae2[_0x90fd('0x23')];_0x43c84c[_0x90fd('0x1c')]=!![];_0x43c84c[_0x90fd('0x27')]=utils['now']();_0x43c84c['lastevent']='answered_elsewhere';_0x43c84c[_0x90fd('0x29')]=_0x90fd('0x32');_0x43c84c[_0x90fd('0x33')]=_0x35eae2[_0x90fd('0x12')];_0x43c84c[_0x90fd('0x34')]=_0x35eae2[_0x90fd('0x6')];writeDB(_0x43c84c);}});}}catch(_0x363365){utils[_0x90fd('0x1a')](util[_0x90fd('0x14')](_0x90fd('0x2c'),_0x35eae2[_0x90fd('0x3')]),_0x363365);}};exports[_0x90fd('0xc')]=function(_0x4cb682){try{if(!_[_0x90fd('0x1d')](agents[_0x4cb682[_0x90fd('0x12')]])){utils['debug'](util['format'](_0x90fd('0x35'),_0x4cb682[_0x90fd('0x3')]),_0x4cb682);utils[_0x90fd('0x18')](util['format']('[%s][agents][agentcomplete]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete',_0x4cb682[_0x90fd('0x3')],agents[_0x4cb682[_0x90fd('0x12')]]['membername'],_0x4cb682['destuniqueid']));agents[_0x4cb682[_0x90fd('0x12')]][_0x90fd('0xc')]=!![];agents[_0x4cb682['destuniqueid']]['agentcompleteAt']=utils[_0x90fd('0x16')]();agents[_0x4cb682[_0x90fd('0x12')]][_0x90fd('0x31')]=utils['diffTime'](agents[_0x4cb682[_0x90fd('0x12')]][_0x90fd('0x36')],agents[_0x4cb682['destuniqueid']]['agentconnectAt']);agents[_0x4cb682['destuniqueid']][_0x90fd('0x29')]=_0x4cb682[_0x90fd('0x29')];agents[_0x4cb682['destuniqueid']][_0x90fd('0x8')]=_0x90fd('0x37');writeDB(agents[_0x4cb682[_0x90fd('0x12')]]);}}catch(_0xe5e47e){utils[_0x90fd('0x1a')](util['format']('[%s][agents][agentcomplete]',_0x4cb682[_0x90fd('0x3')]),_0xe5e47e);}};exports[_0x90fd('0x38')]=function(_0x125874){try{if(!_[_0x90fd('0x1d')](agents[_0x125874[_0x90fd('0x39')]])){utils[_0x90fd('0x1e')](util[_0x90fd('0x14')](_0x90fd('0x3a'),_0x125874[_0x90fd('0x3')]),_0x125874);utils[_0x90fd('0x18')](util['format'](_0x90fd('0x3b'),_0x125874[_0x90fd('0x3')],agents[_0x125874[_0x90fd('0x39')]][_0x90fd('0x6')],agents[_0x125874['transfereruniqueid']]['uniqueid']));agents[_0x125874[_0x90fd('0x39')]]['transfer']=!![];agents[_0x125874['transfereruniqueid']][_0x90fd('0x3c')]=_0x90fd('0x3d');agents[_0x125874[_0x90fd('0x39')]][_0x90fd('0x3e')]=_0x125874[_0x90fd('0x3f')];agents[_0x125874[_0x90fd('0x39')]][_0x90fd('0x40')]=agents[_0x125874['transfereruniqueid']]['uniqueid'];}}catch(_0x1b81dc){utils[_0x90fd('0x1a')](util[_0x90fd('0x14')]('[%s][agents][blindtransfer]',_0x125874[_0x90fd('0x3')]),_0x1b81dc);}};exports[_0x90fd('0x41')]=function(_0x223554){try{utils[_0x90fd('0x1e')](util[_0x90fd('0x14')](_0x90fd('0x42'),_0x223554[_0x90fd('0x43')]),_0x223554);if(_0x223554[_0x90fd('0x43')]==_0x223554['origtransfererlinkedid']){if(!_['isNil'](agents[_0x223554[_0x90fd('0x44')]])){utils[_0x90fd('0x18')](util[_0x90fd('0x14')]('[%s][agents][attendedtransfer]\x20agent:%s',_0x223554[_0x90fd('0x43')],agents[_0x223554[_0x90fd('0x44')]][_0x90fd('0x6')]));agents[_0x223554[_0x90fd('0x44')]][_0x90fd('0x45')]=!![];agents[_0x223554[_0x90fd('0x44')]]['transfertype']=_0x90fd('0x46');agents[_0x223554['secondtransfereruniqueid']][_0x90fd('0x3e')]=_0x223554['origtransfererexten'];agents[_0x223554[_0x90fd('0x44')]][_0x90fd('0x40')]=_0x223554[_0x90fd('0x43')];}if(_0x223554[_0x90fd('0x47')]&&agents[_0x223554['transfereeuniqueid']]){agents[_0x223554[_0x90fd('0x47')]][_0x90fd('0x48')]=0x1;transfers[_0x223554[_0x90fd('0x47')]]=_[_0x90fd('0x49')](agents[_0x223554[_0x90fd('0x47')]]);transfers[_0x223554[_0x90fd('0x47')]]['calleridnum']=agents[_0x223554['secondtransfereruniqueid']]['calleridnum'];transfers[_0x223554['transfereeuniqueid']]['calleridname']=agents[_0x223554[_0x90fd('0x44')]][_0x90fd('0x4a')];transfers[_0x223554[_0x90fd('0x47')]][_0x90fd('0x15')]=utils[_0x90fd('0x16')]();transfers[_0x223554['transfereeuniqueid']]['agentconnectAt']=utils['now']();transfers[_0x223554[_0x90fd('0x47')]][_0x90fd('0x22')]=0x0;transfers[_0x223554['transfereeuniqueid']][_0x90fd('0x48')]=0x2;}}else if(_0x223554[_0x90fd('0x44')]==_0x223554[_0x90fd('0x4b')]){if(!_[_0x90fd('0x1d')](agents[_0x223554[_0x90fd('0x43')]])){utils[_0x90fd('0x18')](util[_0x90fd('0x14')](_0x90fd('0x4c'),_0x223554[_0x90fd('0x43')],agents[_0x223554['origtransfereruniqueid']][_0x90fd('0x6')]));agents[_0x223554[_0x90fd('0x43')]][_0x90fd('0x45')]=!![];agents[_0x223554['origtransfereruniqueid']]['transfertype']=_0x90fd('0x46');agents[_0x223554[_0x90fd('0x43')]]['transferexten']=_0x223554[_0x90fd('0x4d')];agents[_0x223554['origtransfereruniqueid']]['transferuniqueid']=_0x223554[_0x90fd('0x44')];}if(_0x223554[_0x90fd('0x4e')]&&agents[_0x223554[_0x90fd('0x4e')]]){agents[_0x223554[_0x90fd('0x4e')]][_0x90fd('0x48')]=0x1;transfers[_0x223554[_0x90fd('0x4e')]]=_[_0x90fd('0x49')](agents[_0x223554[_0x90fd('0x4e')]]);transfers[_0x223554['transfertargetuniqueid']][_0x90fd('0x4f')]=agents[_0x223554[_0x90fd('0x43')]][_0x90fd('0x4f')];transfers[_0x223554['transfertargetuniqueid']][_0x90fd('0x4a')]=agents[_0x223554[_0x90fd('0x43')]]['calleridname'];transfers[_0x223554['transfertargetuniqueid']][_0x90fd('0x15')]=utils[_0x90fd('0x16')]();transfers[_0x223554[_0x90fd('0x4e')]]['agentconnectAt']=utils[_0x90fd('0x16')]();transfers[_0x223554['transfertargetuniqueid']]['holdtime']=0x0;transfers[_0x223554[_0x90fd('0x4e')]]['agententerreason']=0x2;}}}catch(_0x27a080){utils[_0x90fd('0x1a')](util['format'](_0x90fd('0x42'),_0x223554[_0x90fd('0x43')]),_0x27a080);}};exports[_0x90fd('0x50')]=function(_0x454201){try{utils[_0x90fd('0x1e')](util[_0x90fd('0x14')]('[%s][agents][hangup]',_0x454201['uniqueid']),_0x454201);if(agents[_0x454201['uniqueid']]&&agents[_0x454201['uniqueid']][_0x90fd('0x29')]===_0x90fd('0x21')){if(_0x454201[_0x90fd('0x51')]==='21'){agents[_0x454201['uniqueid']][_0x90fd('0x29')]=_0x90fd('0x52');agents[_0x454201['uniqueid']][_0x90fd('0x8')]=_0x90fd('0x52');}utils[_0x90fd('0x18')](util[_0x90fd('0x14')]('[%s][agents][hangup]\x20agent:%s\x20reason:%s\x20lastevent:%s',_0x454201[_0x90fd('0x3')],agents[_0x454201[_0x90fd('0x3')]]['membername'],agents[_0x454201['uniqueid']]['reason'],agents[_0x454201[_0x90fd('0x3')]]['lastevent']));writeDB(agents[_0x454201['uniqueid']]);var _0x328bda=unanswered['indexOf'](_0x454201[_0x90fd('0x3')]);if(_0x328bda>-0x1){unanswered[_0x90fd('0x53')](_0x328bda,0x1);}}if(transfers[_0x454201[_0x90fd('0x3')]]){transfers[_0x454201[_0x90fd('0x3')]][_0x90fd('0xc')]=!![];transfers[_0x454201[_0x90fd('0x3')]]['agentcompleteAt']=utils[_0x90fd('0x16')]();transfers[_0x454201[_0x90fd('0x3')]][_0x90fd('0x31')]=utils['diffTime'](transfers[_0x454201['uniqueid']][_0x90fd('0x36')],transfers[_0x454201[_0x90fd('0x3')]][_0x90fd('0x2e')]);transfers[_0x454201[_0x90fd('0x3')]][_0x90fd('0x29')]=_0x90fd('0x54');transfers[_0x454201[_0x90fd('0x3')]][_0x90fd('0x8')]=_0x90fd('0x37');utils[_0x90fd('0x18')](util[_0x90fd('0x14')](_0x90fd('0x55'),_0x454201[_0x90fd('0x3')],transfers[_0x454201[_0x90fd('0x3')]][_0x90fd('0x6')],transfers[_0x454201[_0x90fd('0x3')]][_0x90fd('0x29')],transfers[_0x454201['uniqueid']][_0x90fd('0x8')]));writeDB(transfers[_0x454201[_0x90fd('0x3')]],!![]);}if(agents[_0x454201[_0x90fd('0x3')]]&&agents[_0x454201[_0x90fd('0x3')]][_0x90fd('0x2e')]){agents[_0x454201[_0x90fd('0x3')]][_0x90fd('0xc')]=!![];agents[_0x454201['uniqueid']][_0x90fd('0x36')]=utils[_0x90fd('0x16')]();agents[_0x454201[_0x90fd('0x3')]][_0x90fd('0x31')]=utils['diffTime'](agents[_0x454201[_0x90fd('0x3')]][_0x90fd('0x36')],agents[_0x454201[_0x90fd('0x3')]][_0x90fd('0x2e')]);agents[_0x454201[_0x90fd('0x3')]]['reason']=agents[_0x454201['uniqueid']][_0x90fd('0x45')]?_0x90fd('0x45'):_0x90fd('0x54');agents[_0x454201[_0x90fd('0x3')]][_0x90fd('0x8')]=_0x90fd('0x37');utils['info'](util[_0x90fd('0x14')](_0x90fd('0x55'),_0x454201[_0x90fd('0x3')],agents[_0x454201[_0x90fd('0x3')]][_0x90fd('0x6')],agents[_0x454201[_0x90fd('0x3')]][_0x90fd('0x29')],agents[_0x454201[_0x90fd('0x3')]][_0x90fd('0x8')]));writeDB(agents[_0x454201['uniqueid']]);}}catch(_0x1adcc2){utils[_0x90fd('0x1a')](util[_0x90fd('0x14')](_0x90fd('0x56'),_0x454201[_0x90fd('0x3')]),_0x1adcc2);}}; \ No newline at end of file diff --git a/server/services/xdr/calls.controller.js b/server/services/xdr/calls.controller.js index 64da5c4..1477acf 100644 --- a/server/services/xdr/calls.controller.js +++ b/server/services/xdr/calls.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x41ed=['sipcallid','[%s][calls][varset]\x20variable:sipcallid\x20value:%s','newexten','[%s][calls][newexten]','[%s][calls][newexten]\x20application:%s\x20appdata:%s','application','toLowerCase','startsWith','cdr','appdata','split','lastIndexOf','includes','hangup','noop','execif','set','gotoif','lastdata','lodash','util','./utils','./transfers.controller','NO\x20ANSWER','FAILED','ANSWERED','blinds','uniqueid','info','format','queue','membername','interface','calleridnum','connectedlinenum','lastevent','accountcode','getUserByInternal','then','UserId','request','CreateVoiceCallReport','newchannel','[%s][calls][newchannel]','linkedid','channel','[%s][calls][newchannel]\x20context:%s\x20exten:%s','context','now','DOCUMENTATION','debug','[%s][calls][newstate]','isNil','channelstate','[%s][calls][newstate]\x20context:%s\x20channel:%s','systemanswertime','transfer','destinationchannel','answertime','error','[%s][calls][hangup]','calleridname','[%s][calls][hangup]\x20callerid:%s\x20reason:%s','callerid','endtime','duration','starttime','billableseconds','diffTime','attendedtransfer','localtwolinkedid','origtransfereruniqueid','transfereechannel','secondtransfererchannel','userfield','_attended','transfertargetchannel','[%s][calls][attendedtransfer]\x20localtwolinkedid:%s\x20destinationchannel:%s','origtransfererchannel','[%s][calls][attendedtransfer]','musiconholdstart','musiconholdstartAt','[%s][calls][musiconholdstart]\x20musiconholdstartAt:%s','musiconholdstop','[%s][calls][musiconholdstop]','mohtime','[%s][calls][musiconholdstop]\x20mohtime:%s','varset','variable','value','source','[%s][calls][varset]\x20variable:xmd-phone\x20value:%s','destination','\x22\x20<','xmd-callerid-preview','xmd-callerid','[%s][calls][varset]\x20variable:%s\x20value:%s','xmd-queue','xmcs-queue','Queue','xmd-contactid','ContactId','xmd-cdrtype','[%s][calls][varset]\x20variable:xmd-cdrtype\x20value:%s','type','outboundrouteid','[%s][calls][varset]\x20variable:outboundrouteid\x20value:%s','routeid'];(function(_0x1a82af,_0x434179){var _0x4ccacb=function(_0x34efcc){while(--_0x34efcc){_0x1a82af['push'](_0x1a82af['shift']());}};_0x4ccacb(++_0x434179);}(_0x41ed,0x1c3));var _0xd41e=function(_0x495676,_0xd33212){_0x495676=_0x495676-0x0;var _0x14ca2b=_0x41ed[_0x495676];return _0x14ca2b;};'use strict';var _=require(_0xd41e('0x0'));var util=require(_0xd41e('0x1'));var utils=require(_0xd41e('0x2'));var transfers=require(_0xd41e('0x3'));var dispositions=[_0xd41e('0x4'),_0xd41e('0x5'),_0xd41e('0x5'),_0xd41e('0x4'),_0xd41e('0x4'),'NO\x20ANSWER',_0xd41e('0x6'),'BUSY',_0xd41e('0x5'),_0xd41e('0x5'),_0xd41e('0x5')];var channels={};function writeDB(_0x232c6d){var _0x21910a;if(transfers[_0xd41e('0x7')][_0x232c6d['uniqueid']]){_0x21910a=_0x232c6d[_0xd41e('0x8')];_0x232c6d[_0xd41e('0x8')]=transfers[_0xd41e('0x7')][_0x232c6d[_0xd41e('0x8')]]['transfereeuniqueid'];}utils[_0xd41e('0x9')](util[_0xd41e('0xa')]('[%s][calls][writeDB]\x20channel:%s\x20queue:%s\x20agent:%s\x20interface:%s\x20calleridnum:%s\x20connectedlinenum:%s\x20lastevent:%s',_0x232c6d['uniqueid'],_0x232c6d['channel'],_0x232c6d[_0xd41e('0xb')],_0x232c6d[_0xd41e('0xc')],_0x232c6d[_0xd41e('0xd')],_0x232c6d[_0xd41e('0xe')],_0x232c6d[_0xd41e('0xf')],_0x232c6d[_0xd41e('0x10')]));if(_0x232c6d[_0xd41e('0x11')]){utils[_0xd41e('0x12')](_0x232c6d[_0xd41e('0x11')])[_0xd41e('0x13')](function(_0xe7ab84){if(_0xe7ab84){_0x232c6d[_0xd41e('0x14')]=_0xe7ab84['id'];}utils[_0xd41e('0x15')](_0xd41e('0x16'),_0x232c6d);});}else{utils[_0xd41e('0x15')](_0xd41e('0x16'),_0x232c6d);}if(channels[_0x232c6d[_0xd41e('0x8')]]){delete channels[_0x232c6d['uniqueid']];}else if(_0x21910a&&channels[_0x21910a]){delete transfers[_0xd41e('0x7')][_0x21910a];delete channels[_0x21910a];}}exports[_0xd41e('0x17')]=function(_0x4e49da){try{utils['debug'](util[_0xd41e('0xa')](_0xd41e('0x18'),_0x4e49da['uniqueid']),_0x4e49da);if(_0x4e49da[_0xd41e('0x8')]==_0x4e49da[_0xd41e('0x19')]&&_0x4e49da[_0xd41e('0x1a')]!='OutgoingSpoolFailed'){utils['info'](util[_0xd41e('0xa')](_0xd41e('0x1b'),_0x4e49da['uniqueid'],_0x4e49da[_0xd41e('0x1c')],_0x4e49da['exten']));channels[_0x4e49da[_0xd41e('0x8')]]={'uniqueid':_0x4e49da['uniqueid'],'accountcode':_0x4e49da['accountcode'],'source':_0x4e49da[_0xd41e('0xe')],'destination':_0x4e49da['exten'],'destinationcontext':_0x4e49da[_0xd41e('0x1c')],'channel':_0x4e49da[_0xd41e('0x1a')],'starttime':utils[_0xd41e('0x1d')](),'answertime':null,'systemanswertime':null,'mohtime':0x0,'disposition':'NO\x20ANSWER','amaflags':_0xd41e('0x1e')};}}catch(_0x4391d5){utils['error'](util[_0xd41e('0xa')](_0xd41e('0x18'),_0x4e49da[_0xd41e('0x8')]),_0x4391d5);}};exports['newstate']=function(_0x469f33){try{utils[_0xd41e('0x1f')](util[_0xd41e('0xa')](_0xd41e('0x20'),_0x469f33[_0xd41e('0x8')]),_0x469f33);if(!_[_0xd41e('0x21')](channels[_0x469f33['uniqueid']])&&_0x469f33[_0xd41e('0x22')]==0x6){utils['info'](util[_0xd41e('0xa')](_0xd41e('0x23'),_0x469f33['uniqueid'],_0x469f33['context'],_0x469f33[_0xd41e('0x1a')]));if(_[_0xd41e('0x21')](channels[_0x469f33[_0xd41e('0x8')]][_0xd41e('0x24')])){channels[_0x469f33[_0xd41e('0x8')]]['systemanswertime']=utils[_0xd41e('0x1d')]();}}else if(!_[_0xd41e('0x21')](channels[_0x469f33[_0xd41e('0x19')]])&&_0x469f33[_0xd41e('0x22')]==0x6&&_0x469f33[_0xd41e('0x1c')]!=_0xd41e('0x25')){utils[_0xd41e('0x9')](util[_0xd41e('0xa')]('[%s][calls][newstate]\x20linkedid:%s\x20context:%s\x20channel:%s',_0x469f33[_0xd41e('0x8')],_0x469f33['linkedid'],_0x469f33[_0xd41e('0x1c')],_0x469f33[_0xd41e('0x1a')]));channels[_0x469f33[_0xd41e('0x19')]][_0xd41e('0x11')]=_0x469f33[_0xd41e('0x11')];channels[_0x469f33[_0xd41e('0x19')]][_0xd41e('0x26')]=_0x469f33[_0xd41e('0x1a')];if(_[_0xd41e('0x21')](channels[_0x469f33[_0xd41e('0x19')]][_0xd41e('0x27')])){channels[_0x469f33[_0xd41e('0x19')]]['answertime']=utils[_0xd41e('0x1d')]();}channels[_0x469f33[_0xd41e('0x19')]]['disposition']=dispositions[_['toNumber'](_0x469f33[_0xd41e('0x22')])]||_0xd41e('0x6');}}catch(_0x78d60c){utils[_0xd41e('0x28')](util[_0xd41e('0xa')](_0xd41e('0x20'),_0x469f33[_0xd41e('0x8')]),_0x78d60c);}};exports['hangup']=function(_0x431b36){try{if(!_['isNil'](channels[_0x431b36[_0xd41e('0x8')]])){utils['debug'](util[_0xd41e('0xa')](_0xd41e('0x29'),_0x431b36[_0xd41e('0x8')]),_0x431b36);if(_[_0xd41e('0x21')](channels[_0x431b36['uniqueid']]['callerid'])){channels[_0x431b36['uniqueid']]['callerid']=_0x431b36[_0xd41e('0x2a')]+'\x20<'+_0x431b36['calleridnum']+'>';}utils[_0xd41e('0x9')](util[_0xd41e('0xa')](_0xd41e('0x2b'),_0x431b36[_0xd41e('0x8')],channels[_0x431b36[_0xd41e('0x8')]][_0xd41e('0x2c')],_0x431b36['cause-txt']));channels[_0x431b36['uniqueid']][_0xd41e('0x2d')]=utils[_0xd41e('0x1d')]();channels[_0x431b36[_0xd41e('0x8')]][_0xd41e('0x2e')]=utils['diffTime'](channels[_0x431b36[_0xd41e('0x8')]][_0xd41e('0x2d')],channels[_0x431b36[_0xd41e('0x8')]][_0xd41e('0x2f')]);channels[_0x431b36[_0xd41e('0x8')]][_0xd41e('0x30')]=channels[_0x431b36[_0xd41e('0x8')]][_0xd41e('0x27')]?utils[_0xd41e('0x31')](channels[_0x431b36[_0xd41e('0x8')]]['endtime'],channels[_0x431b36[_0xd41e('0x8')]]['answertime']):0x0;writeDB(channels[_0x431b36[_0xd41e('0x8')]]);}}catch(_0x2544ff){utils[_0xd41e('0x28')](util[_0xd41e('0xa')](_0xd41e('0x29'),_0x431b36['uniqueid']),_0x2544ff);}};exports[_0xd41e('0x32')]=function(_0x52dff7){try{if(!_[_0xd41e('0x21')](channels[_0x52dff7[_0xd41e('0x33')]])){utils['debug'](util[_0xd41e('0xa')]('[%s][calls][attendedtransfer]',_0x52dff7[_0xd41e('0x34')]),_0x52dff7);if(channels[_0x52dff7[_0xd41e('0x33')]][_0xd41e('0x1a')]==_0x52dff7[_0xd41e('0x35')]){utils[_0xd41e('0x9')](util[_0xd41e('0xa')]('[%s][calls][attendedtransfer]\x20localtwolinkedid:%s\x20destinationchannel:%s',_0x52dff7['origtransfereruniqueid'],_0x52dff7[_0xd41e('0x33')],_0x52dff7[_0xd41e('0x36')]));channels[_0x52dff7[_0xd41e('0x33')]]['destinationchannel']=_0x52dff7['secondtransfererchannel'];channels[_0x52dff7['localtwolinkedid']][_0xd41e('0x37')]=_0xd41e('0x38');}else if(channels[_0x52dff7['localtwolinkedid']][_0xd41e('0x1a')]=_0x52dff7[_0xd41e('0x39')]){utils[_0xd41e('0x9')](util['format'](_0xd41e('0x3a'),_0x52dff7[_0xd41e('0x34')],_0x52dff7['localtwolinkedid'],_0x52dff7[_0xd41e('0x3b')]));channels[_0x52dff7[_0xd41e('0x33')]][_0xd41e('0x26')]=_0x52dff7[_0xd41e('0x3b')];channels[_0x52dff7['localtwolinkedid']][_0xd41e('0x37')]='_attended';}}}catch(_0x1428a6){utils['error'](util[_0xd41e('0xa')](_0xd41e('0x3c'),_0x52dff7[_0xd41e('0x34')]),_0x1428a6);}};exports[_0xd41e('0x3d')]=function(_0x372740){try{if(!_[_0xd41e('0x21')](channels[_0x372740[_0xd41e('0x8')]])){utils[_0xd41e('0x1f')](util['format']('[%s][calls][musiconholdstart]',_0x372740[_0xd41e('0x8')]),_0x372740);channels[_0x372740['uniqueid']][_0xd41e('0x3e')]=utils[_0xd41e('0x1d')]();utils['info'](util[_0xd41e('0xa')](_0xd41e('0x3f'),_0x372740[_0xd41e('0x8')],channels[_0x372740[_0xd41e('0x8')]][_0xd41e('0x3e')]));}}catch(_0x2b42e1){utils['error'](util[_0xd41e('0xa')]('[%s][calls][musiconholdstart]',_0x372740[_0xd41e('0x8')]),_0x2b42e1);}};exports[_0xd41e('0x40')]=function(_0x2f3cc0){try{if(!_['isNil'](channels[_0x2f3cc0['uniqueid']])){utils[_0xd41e('0x1f')](util[_0xd41e('0xa')](_0xd41e('0x41'),_0x2f3cc0[_0xd41e('0x8')]),_0x2f3cc0);if(!_[_0xd41e('0x21')](channels[_0x2f3cc0[_0xd41e('0x8')]][_0xd41e('0x3e')])){channels[_0x2f3cc0[_0xd41e('0x8')]][_0xd41e('0x42')]+=utils['diffTime'](utils[_0xd41e('0x1d')](),channels[_0x2f3cc0[_0xd41e('0x8')]][_0xd41e('0x3e')]);utils[_0xd41e('0x9')](util[_0xd41e('0xa')](_0xd41e('0x43'),_0x2f3cc0[_0xd41e('0x8')],channels[_0x2f3cc0[_0xd41e('0x8')]][_0xd41e('0x42')]));delete channels[_0x2f3cc0[_0xd41e('0x8')]][_0xd41e('0x3e')];}}}catch(_0x1b2b1f){utils[_0xd41e('0x28')](util['format'](_0xd41e('0x41'),_0x2f3cc0[_0xd41e('0x8')]),_0x1b2b1f);}};exports[_0xd41e('0x44')]=function(_0x969bc7){try{if(!_['isNil'](channels[_0x969bc7[_0xd41e('0x8')]])){utils[_0xd41e('0x1f')](util[_0xd41e('0xa')]('[%s][calls][varset]',_0x969bc7[_0xd41e('0x8')]),_0x969bc7);if(!_[_0xd41e('0x21')](_0x969bc7[_0xd41e('0x45')]['xmd-originatecalleridnum'])){utils[_0xd41e('0x9')](util[_0xd41e('0xa')]('[%s][calls][varset]\x20variable:xmd-originatecalleridnum\x20value:%s',_0x969bc7[_0xd41e('0x8')],_0x969bc7[_0xd41e('0x46')]));channels[_0x969bc7[_0xd41e('0x8')]][_0xd41e('0x47')]=_0x969bc7[_0xd41e('0x46')];}if(!_['isNil'](_0x969bc7[_0xd41e('0x45')]['xmd-phone'])){utils['info'](util[_0xd41e('0xa')](_0xd41e('0x48'),_0x969bc7['uniqueid'],_0x969bc7[_0xd41e('0x46')]));channels[_0x969bc7['uniqueid']][_0xd41e('0x49')]=_0x969bc7[_0xd41e('0x46')];channels[_0x969bc7[_0xd41e('0x8')]]['callerid']='\x22'+_0x969bc7[_0xd41e('0x46')]+_0xd41e('0x4a')+_0x969bc7[_0xd41e('0x46')]+'>';}if(!_[_0xd41e('0x21')](_0x969bc7[_0xd41e('0x45')][_0xd41e('0x4b')])||!_[_0xd41e('0x21')](_0x969bc7[_0xd41e('0x45')][_0xd41e('0x4c')])){utils[_0xd41e('0x9')](util[_0xd41e('0xa')](_0xd41e('0x4d'),_0x969bc7[_0xd41e('0x8')],!_[_0xd41e('0x21')](_0x969bc7[_0xd41e('0x45')][_0xd41e('0x4b')])?_0xd41e('0x4b'):_0xd41e('0x4c'),_0x969bc7[_0xd41e('0x46')]));channels[_0x969bc7[_0xd41e('0x8')]][_0xd41e('0x2c')]=_0x969bc7['value'];}if(!_[_0xd41e('0x21')](_0x969bc7[_0xd41e('0x45')][_0xd41e('0x4e')])||!_[_0xd41e('0x21')](_0x969bc7[_0xd41e('0x45')][_0xd41e('0x4f')])){utils[_0xd41e('0x9')](util['format']('[%s][calls][varset]\x20variable:%s\x20value:%s',_0x969bc7[_0xd41e('0x8')],!_[_0xd41e('0x21')](_0x969bc7['variable'][_0xd41e('0x4e')])?_0xd41e('0x4e'):_0xd41e('0x4f'),_0x969bc7[_0xd41e('0x46')]));channels[_0x969bc7[_0xd41e('0x8')]]['lastapplication']=_0xd41e('0x50');channels[_0x969bc7['uniqueid']]['lastdata']=_0x969bc7[_0xd41e('0x46')];channels[_0x969bc7[_0xd41e('0x8')]]['queue']=!![];}if(!_[_0xd41e('0x21')](_0x969bc7[_0xd41e('0x45')][_0xd41e('0x51')])){utils[_0xd41e('0x9')](util['format']('[%s][calls][varset]\x20variable:xmd-contactid\x20value:%s',_0x969bc7[_0xd41e('0x8')],_0x969bc7[_0xd41e('0x46')]));channels[_0x969bc7[_0xd41e('0x8')]][_0xd41e('0x52')]=_0x969bc7[_0xd41e('0x46')];}if(!_['isNil'](_0x969bc7[_0xd41e('0x45')][_0xd41e('0x53')])){utils['info'](util['format'](_0xd41e('0x54'),_0x969bc7[_0xd41e('0x8')],_0x969bc7[_0xd41e('0x46')]));channels[_0x969bc7[_0xd41e('0x8')]][_0xd41e('0x55')]=_0x969bc7['value'];}if(!_['isNil'](_0x969bc7['variable'][_0xd41e('0x56')])){utils[_0xd41e('0x9')](util[_0xd41e('0xa')](_0xd41e('0x57'),_0x969bc7[_0xd41e('0x8')],_0x969bc7[_0xd41e('0x46')]));channels[_0x969bc7['uniqueid']][_0xd41e('0x58')]=_0x969bc7[_0xd41e('0x46')];}if(!_[_0xd41e('0x21')](_0x969bc7['variable'][_0xd41e('0x59')])){utils[_0xd41e('0x9')](util[_0xd41e('0xa')](_0xd41e('0x5a'),_0x969bc7['uniqueid'],_0x969bc7['value']));channels[_0x969bc7[_0xd41e('0x8')]][_0xd41e('0x59')]=_0x969bc7[_0xd41e('0x46')];}}}catch(_0x2b6bec){utils['error'](util[_0xd41e('0xa')]('[%s][calls][varset]',_0x969bc7[_0xd41e('0x8')]),_0x2b6bec);}};exports[_0xd41e('0x5b')]=function(_0x328833){try{if(!_[_0xd41e('0x21')](channels[_0x328833['uniqueid']])){utils[_0xd41e('0x1f')](util[_0xd41e('0xa')](_0xd41e('0x5c'),_0x328833[_0xd41e('0x8')]),_0x328833);utils[_0xd41e('0x9')](util[_0xd41e('0xa')](_0xd41e('0x5d'),_0x328833[_0xd41e('0x8')],_0x328833[_0xd41e('0x5e')],_0x328833['appdata']));if(_0x328833['application'][_0xd41e('0x5f')]()=='set'&&_[_0xd41e('0x60')](_0x328833['appdata'][_0xd41e('0x5f')](),_0xd41e('0x61'))){var _0x165513=_0x328833[_0xd41e('0x62')][_0xd41e('0x63')]('=');var _0x1b5757=_0x165513[0x0]['substring'](_0x165513[0x0][_0xd41e('0x64')]('(')+0x1,_0x165513[0x0][_0xd41e('0x64')](')'));var _0x26ed7e=_0x165513[0x1];channels[_0x328833['uniqueid']][_0x1b5757]=_0x26ed7e;}if(!_[_0xd41e('0x65')]([_0xd41e('0x66'),_0xd41e('0x67'),_0xd41e('0x68'),_0xd41e('0x69'),_0xd41e('0x6a')],_0x328833[_0xd41e('0x5e')]['toLowerCase']())){channels[_0x328833[_0xd41e('0x8')]]['lastapplication']=_0x328833[_0xd41e('0x5e')];channels[_0x328833[_0xd41e('0x8')]][_0xd41e('0x6b')]=_0x328833['appdata'];}}}catch(_0x5269bb){utils[_0xd41e('0x28')](util[_0xd41e('0xa')](_0xd41e('0x5c'),_0x328833['uniqueid']),_0x5269bb);}}; \ No newline at end of file +var _0xe681=['callerid','calleridname','[%s][calls][hangup]\x20callerid:%s\x20reason:%s','cause-txt','endtime','duration','starttime','attendedtransfer','localtwolinkedid','origtransfereruniqueid','transfereechannel','[%s][calls][attendedtransfer]\x20localtwolinkedid:%s\x20destinationchannel:%s','secondtransfererchannel','userfield','origtransfererchannel','_attended','musiconholdstart','musiconholdstartAt','mohtime','[%s][calls][musiconholdstop]\x20mohtime:%s','varset','[%s][calls][varset]','xmd-originatecalleridnum','[%s][calls][varset]\x20variable:xmd-originatecalleridnum\x20value:%s','value','source','variable','[%s][calls][varset]\x20variable:xmd-phone\x20value:%s','destination','\x22\x20<','xmd-callerid-preview','[%s][calls][varset]\x20variable:%s\x20value:%s','xmd-queue','xmcs-queue','lastapplication','Queue','xmd-contactid','[%s][calls][varset]\x20variable:xmd-contactid\x20value:%s','ContactId','xmd-cdrtype','[%s][calls][varset]\x20variable:xmd-cdrtype\x20value:%s','type','outboundrouteid','routeid','[%s][calls][varset]\x20variable:sipcallid\x20value:%s','sipcallid','newexten','[%s][calls][newexten]','[%s][calls][newexten]\x20application:%s\x20appdata:%s','application','toLowerCase','set','startsWith','appdata','cdr','substring','lastIndexOf','noop','gotoif','lodash','./utils','./transfers.controller','NO\x20ANSWER','FAILED','ANSWERED','BUSY','blinds','uniqueid','info','[%s][calls][writeDB]\x20channel:%s\x20queue:%s\x20agent:%s\x20interface:%s\x20calleridnum:%s\x20connectedlinenum:%s\x20lastevent:%s','channel','queue','membername','interface','connectedlinenum','lastevent','getUserByInternal','then','UserId','request','CreateVoiceCallReport','newchannel','debug','[%s][calls][newchannel]','linkedid','OutgoingSpoolFailed','format','[%s][calls][newchannel]\x20context:%s\x20exten:%s','context','calleridnum','DOCUMENTATION','error','newstate','[%s][calls][newstate]','channelstate','isNil','systemanswertime','now','[%s][calls][newstate]\x20linkedid:%s\x20context:%s\x20channel:%s','destinationchannel','answertime','disposition','toNumber','hangup'];(function(_0xec3a49,_0x2329a7){var _0x1de20f=function(_0x7dc2d9){while(--_0x7dc2d9){_0xec3a49['push'](_0xec3a49['shift']());}};_0x1de20f(++_0x2329a7);}(_0xe681,0x1db));var _0x1e68=function(_0x283eef,_0x322a88){_0x283eef=_0x283eef-0x0;var _0x127821=_0xe681[_0x283eef];return _0x127821;};'use strict';var _=require(_0x1e68('0x0'));var util=require('util');var utils=require(_0x1e68('0x1'));var transfers=require(_0x1e68('0x2'));var dispositions=[_0x1e68('0x3'),_0x1e68('0x4'),_0x1e68('0x4'),_0x1e68('0x3'),_0x1e68('0x3'),'NO\x20ANSWER',_0x1e68('0x5'),_0x1e68('0x6'),'FAILED',_0x1e68('0x4'),_0x1e68('0x4')];var channels={};function writeDB(_0x15d994){var _0x5e0d83;if(transfers[_0x1e68('0x7')][_0x15d994[_0x1e68('0x8')]]){_0x5e0d83=_0x15d994[_0x1e68('0x8')];_0x15d994['uniqueid']=transfers['blinds'][_0x15d994['uniqueid']]['transfereeuniqueid'];}utils[_0x1e68('0x9')](util['format'](_0x1e68('0xa'),_0x15d994[_0x1e68('0x8')],_0x15d994[_0x1e68('0xb')],_0x15d994[_0x1e68('0xc')],_0x15d994[_0x1e68('0xd')],_0x15d994[_0x1e68('0xe')],_0x15d994['calleridnum'],_0x15d994[_0x1e68('0xf')],_0x15d994[_0x1e68('0x10')]));if(_0x15d994['accountcode']){utils[_0x1e68('0x11')](_0x15d994['accountcode'])[_0x1e68('0x12')](function(_0x17672e){if(_0x17672e){_0x15d994[_0x1e68('0x13')]=_0x17672e['id'];}utils[_0x1e68('0x14')](_0x1e68('0x15'),_0x15d994);});}else{utils[_0x1e68('0x14')](_0x1e68('0x15'),_0x15d994);}if(channels[_0x15d994['uniqueid']]){delete channels[_0x15d994[_0x1e68('0x8')]];}else if(_0x5e0d83&&channels[_0x5e0d83]){delete transfers['blinds'][_0x5e0d83];delete channels[_0x5e0d83];}}exports[_0x1e68('0x16')]=function(_0x1f295d){try{utils[_0x1e68('0x17')](util['format'](_0x1e68('0x18'),_0x1f295d[_0x1e68('0x8')]),_0x1f295d);if(_0x1f295d[_0x1e68('0x8')]==_0x1f295d[_0x1e68('0x19')]&&_0x1f295d['channel']!=_0x1e68('0x1a')){utils[_0x1e68('0x9')](util[_0x1e68('0x1b')](_0x1e68('0x1c'),_0x1f295d[_0x1e68('0x8')],_0x1f295d[_0x1e68('0x1d')],_0x1f295d['exten']));channels[_0x1f295d[_0x1e68('0x8')]]={'uniqueid':_0x1f295d[_0x1e68('0x8')],'accountcode':_0x1f295d['accountcode'],'source':_0x1f295d[_0x1e68('0x1e')],'destination':_0x1f295d['exten'],'destinationcontext':_0x1f295d[_0x1e68('0x1d')],'channel':_0x1f295d[_0x1e68('0xb')],'starttime':utils['now'](),'answertime':null,'systemanswertime':null,'mohtime':0x0,'disposition':'NO\x20ANSWER','amaflags':_0x1e68('0x1f')};}}catch(_0x59832f){utils[_0x1e68('0x20')](util[_0x1e68('0x1b')](_0x1e68('0x18'),_0x1f295d[_0x1e68('0x8')]),_0x59832f);}};exports[_0x1e68('0x21')]=function(_0x1c8f3f){try{utils['debug'](util[_0x1e68('0x1b')](_0x1e68('0x22'),_0x1c8f3f[_0x1e68('0x8')]),_0x1c8f3f);if(!_['isNil'](channels[_0x1c8f3f[_0x1e68('0x8')]])&&_0x1c8f3f[_0x1e68('0x23')]==0x6){utils['info'](util[_0x1e68('0x1b')]('[%s][calls][newstate]\x20context:%s\x20channel:%s',_0x1c8f3f[_0x1e68('0x8')],_0x1c8f3f[_0x1e68('0x1d')],_0x1c8f3f[_0x1e68('0xb')]));if(_[_0x1e68('0x24')](channels[_0x1c8f3f['uniqueid']][_0x1e68('0x25')])){channels[_0x1c8f3f[_0x1e68('0x8')]][_0x1e68('0x25')]=utils[_0x1e68('0x26')]();}}else if(!_[_0x1e68('0x24')](channels[_0x1c8f3f[_0x1e68('0x19')]])&&_0x1c8f3f[_0x1e68('0x23')]==0x6&&_0x1c8f3f['context']!='transfer'){utils[_0x1e68('0x9')](util['format'](_0x1e68('0x27'),_0x1c8f3f['uniqueid'],_0x1c8f3f['linkedid'],_0x1c8f3f[_0x1e68('0x1d')],_0x1c8f3f[_0x1e68('0xb')]));channels[_0x1c8f3f['linkedid']]['accountcode']=_0x1c8f3f['accountcode'];channels[_0x1c8f3f[_0x1e68('0x19')]][_0x1e68('0x28')]=_0x1c8f3f[_0x1e68('0xb')];if(_[_0x1e68('0x24')](channels[_0x1c8f3f[_0x1e68('0x19')]]['answertime'])){channels[_0x1c8f3f[_0x1e68('0x19')]][_0x1e68('0x29')]=utils[_0x1e68('0x26')]();}channels[_0x1c8f3f[_0x1e68('0x19')]][_0x1e68('0x2a')]=dispositions[_[_0x1e68('0x2b')](_0x1c8f3f[_0x1e68('0x23')])]||_0x1e68('0x5');}}catch(_0x118b81){utils[_0x1e68('0x20')](util['format'](_0x1e68('0x22'),_0x1c8f3f[_0x1e68('0x8')]),_0x118b81);}};exports[_0x1e68('0x2c')]=function(_0x1bd759){try{if(!_['isNil'](channels[_0x1bd759['uniqueid']])){utils[_0x1e68('0x17')](util[_0x1e68('0x1b')]('[%s][calls][hangup]',_0x1bd759['uniqueid']),_0x1bd759);if(_[_0x1e68('0x24')](channels[_0x1bd759[_0x1e68('0x8')]][_0x1e68('0x2d')])){channels[_0x1bd759[_0x1e68('0x8')]]['callerid']=_0x1bd759[_0x1e68('0x2e')]+'\x20<'+_0x1bd759['calleridnum']+'>';}utils[_0x1e68('0x9')](util[_0x1e68('0x1b')](_0x1e68('0x2f'),_0x1bd759[_0x1e68('0x8')],channels[_0x1bd759[_0x1e68('0x8')]][_0x1e68('0x2d')],_0x1bd759[_0x1e68('0x30')]));channels[_0x1bd759['uniqueid']][_0x1e68('0x31')]=utils[_0x1e68('0x26')]();channels[_0x1bd759['uniqueid']][_0x1e68('0x32')]=utils['diffTime'](channels[_0x1bd759[_0x1e68('0x8')]][_0x1e68('0x31')],channels[_0x1bd759[_0x1e68('0x8')]][_0x1e68('0x33')]);channels[_0x1bd759['uniqueid']]['billableseconds']=channels[_0x1bd759[_0x1e68('0x8')]][_0x1e68('0x29')]?utils['diffTime'](channels[_0x1bd759['uniqueid']][_0x1e68('0x31')],channels[_0x1bd759[_0x1e68('0x8')]][_0x1e68('0x29')]):0x0;writeDB(channels[_0x1bd759[_0x1e68('0x8')]]);}}catch(_0x355a67){utils[_0x1e68('0x20')](util[_0x1e68('0x1b')]('[%s][calls][hangup]',_0x1bd759[_0x1e68('0x8')]),_0x355a67);}};exports[_0x1e68('0x34')]=function(_0x41fa55){try{if(!_[_0x1e68('0x24')](channels[_0x41fa55[_0x1e68('0x35')]])){utils['debug'](util[_0x1e68('0x1b')]('[%s][calls][attendedtransfer]',_0x41fa55[_0x1e68('0x36')]),_0x41fa55);if(channels[_0x41fa55[_0x1e68('0x35')]][_0x1e68('0xb')]==_0x41fa55[_0x1e68('0x37')]){utils[_0x1e68('0x9')](util[_0x1e68('0x1b')](_0x1e68('0x38'),_0x41fa55[_0x1e68('0x36')],_0x41fa55[_0x1e68('0x35')],_0x41fa55[_0x1e68('0x39')]));channels[_0x41fa55[_0x1e68('0x35')]][_0x1e68('0x28')]=_0x41fa55[_0x1e68('0x39')];channels[_0x41fa55[_0x1e68('0x35')]][_0x1e68('0x3a')]='_attended';}else if(channels[_0x41fa55['localtwolinkedid']]['channel']=_0x41fa55['transfertargetchannel']){utils[_0x1e68('0x9')](util['format'](_0x1e68('0x38'),_0x41fa55[_0x1e68('0x36')],_0x41fa55[_0x1e68('0x35')],_0x41fa55[_0x1e68('0x3b')]));channels[_0x41fa55[_0x1e68('0x35')]][_0x1e68('0x28')]=_0x41fa55[_0x1e68('0x3b')];channels[_0x41fa55[_0x1e68('0x35')]][_0x1e68('0x3a')]=_0x1e68('0x3c');}}}catch(_0x390a84){utils[_0x1e68('0x20')](util[_0x1e68('0x1b')]('[%s][calls][attendedtransfer]',_0x41fa55['origtransfereruniqueid']),_0x390a84);}};exports[_0x1e68('0x3d')]=function(_0xeb9770){try{if(!_[_0x1e68('0x24')](channels[_0xeb9770['uniqueid']])){utils[_0x1e68('0x17')](util['format']('[%s][calls][musiconholdstart]',_0xeb9770[_0x1e68('0x8')]),_0xeb9770);channels[_0xeb9770[_0x1e68('0x8')]][_0x1e68('0x3e')]=utils[_0x1e68('0x26')]();utils[_0x1e68('0x9')](util[_0x1e68('0x1b')]('[%s][calls][musiconholdstart]\x20musiconholdstartAt:%s',_0xeb9770[_0x1e68('0x8')],channels[_0xeb9770[_0x1e68('0x8')]][_0x1e68('0x3e')]));}}catch(_0x2851ff){utils[_0x1e68('0x20')](util[_0x1e68('0x1b')]('[%s][calls][musiconholdstart]',_0xeb9770[_0x1e68('0x8')]),_0x2851ff);}};exports['musiconholdstop']=function(_0x13828f){try{if(!_['isNil'](channels[_0x13828f[_0x1e68('0x8')]])){utils[_0x1e68('0x17')](util[_0x1e68('0x1b')]('[%s][calls][musiconholdstop]',_0x13828f['uniqueid']),_0x13828f);if(!_[_0x1e68('0x24')](channels[_0x13828f['uniqueid']][_0x1e68('0x3e')])){channels[_0x13828f[_0x1e68('0x8')]][_0x1e68('0x3f')]+=utils['diffTime'](utils[_0x1e68('0x26')](),channels[_0x13828f[_0x1e68('0x8')]]['musiconholdstartAt']);utils[_0x1e68('0x9')](util[_0x1e68('0x1b')](_0x1e68('0x40'),_0x13828f[_0x1e68('0x8')],channels[_0x13828f['uniqueid']][_0x1e68('0x3f')]));delete channels[_0x13828f[_0x1e68('0x8')]][_0x1e68('0x3e')];}}}catch(_0x336250){utils[_0x1e68('0x20')](util['format']('[%s][calls][musiconholdstop]',_0x13828f['uniqueid']),_0x336250);}};exports[_0x1e68('0x41')]=function(_0xae4680){try{if(!_[_0x1e68('0x24')](channels[_0xae4680[_0x1e68('0x8')]])){utils[_0x1e68('0x17')](util[_0x1e68('0x1b')](_0x1e68('0x42'),_0xae4680[_0x1e68('0x8')]),_0xae4680);if(!_[_0x1e68('0x24')](_0xae4680['variable'][_0x1e68('0x43')])){utils[_0x1e68('0x9')](util['format'](_0x1e68('0x44'),_0xae4680[_0x1e68('0x8')],_0xae4680[_0x1e68('0x45')]));channels[_0xae4680[_0x1e68('0x8')]][_0x1e68('0x46')]=_0xae4680['value'];}if(!_[_0x1e68('0x24')](_0xae4680[_0x1e68('0x47')]['xmd-phone'])){utils[_0x1e68('0x9')](util[_0x1e68('0x1b')](_0x1e68('0x48'),_0xae4680[_0x1e68('0x8')],_0xae4680['value']));channels[_0xae4680[_0x1e68('0x8')]][_0x1e68('0x49')]=_0xae4680['value'];channels[_0xae4680[_0x1e68('0x8')]][_0x1e68('0x2d')]='\x22'+_0xae4680[_0x1e68('0x45')]+_0x1e68('0x4a')+_0xae4680[_0x1e68('0x45')]+'>';}if(!_[_0x1e68('0x24')](_0xae4680['variable'][_0x1e68('0x4b')])||!_[_0x1e68('0x24')](_0xae4680[_0x1e68('0x47')]['xmd-callerid'])){utils[_0x1e68('0x9')](util[_0x1e68('0x1b')](_0x1e68('0x4c'),_0xae4680[_0x1e68('0x8')],!_[_0x1e68('0x24')](_0xae4680[_0x1e68('0x47')][_0x1e68('0x4b')])?'xmd-callerid-preview':'xmd-callerid',_0xae4680['value']));channels[_0xae4680['uniqueid']][_0x1e68('0x2d')]=_0xae4680[_0x1e68('0x45')];}if(!_['isNil'](_0xae4680[_0x1e68('0x47')][_0x1e68('0x4d')])||!_[_0x1e68('0x24')](_0xae4680[_0x1e68('0x47')][_0x1e68('0x4e')])){utils['info'](util[_0x1e68('0x1b')](_0x1e68('0x4c'),_0xae4680['uniqueid'],!_[_0x1e68('0x24')](_0xae4680['variable'][_0x1e68('0x4d')])?_0x1e68('0x4d'):'xmcs-queue',_0xae4680[_0x1e68('0x45')]));channels[_0xae4680['uniqueid']][_0x1e68('0x4f')]=_0x1e68('0x50');channels[_0xae4680[_0x1e68('0x8')]]['lastdata']=_0xae4680[_0x1e68('0x45')];channels[_0xae4680[_0x1e68('0x8')]][_0x1e68('0xc')]=!![];}if(!_[_0x1e68('0x24')](_0xae4680['variable'][_0x1e68('0x51')])){utils['info'](util['format'](_0x1e68('0x52'),_0xae4680[_0x1e68('0x8')],_0xae4680[_0x1e68('0x45')]));channels[_0xae4680[_0x1e68('0x8')]][_0x1e68('0x53')]=_0xae4680[_0x1e68('0x45')];}if(!_[_0x1e68('0x24')](_0xae4680[_0x1e68('0x47')][_0x1e68('0x54')])){utils['info'](util[_0x1e68('0x1b')](_0x1e68('0x55'),_0xae4680[_0x1e68('0x8')],_0xae4680[_0x1e68('0x45')]));channels[_0xae4680[_0x1e68('0x8')]][_0x1e68('0x56')]=_0xae4680[_0x1e68('0x45')];}if(!_[_0x1e68('0x24')](_0xae4680[_0x1e68('0x47')][_0x1e68('0x57')])){utils[_0x1e68('0x9')](util[_0x1e68('0x1b')]('[%s][calls][varset]\x20variable:outboundrouteid\x20value:%s',_0xae4680[_0x1e68('0x8')],_0xae4680[_0x1e68('0x45')]));channels[_0xae4680[_0x1e68('0x8')]][_0x1e68('0x58')]=_0xae4680[_0x1e68('0x45')];}if(!_['isNil'](_0xae4680[_0x1e68('0x47')]['sipcallid'])){utils['info'](util[_0x1e68('0x1b')](_0x1e68('0x59'),_0xae4680[_0x1e68('0x8')],_0xae4680[_0x1e68('0x45')]));channels[_0xae4680[_0x1e68('0x8')]][_0x1e68('0x5a')]=_0xae4680[_0x1e68('0x45')];}}}catch(_0xafef79){utils[_0x1e68('0x20')](util[_0x1e68('0x1b')](_0x1e68('0x42'),_0xae4680[_0x1e68('0x8')]),_0xafef79);}};exports[_0x1e68('0x5b')]=function(_0x1eafd8){try{if(!_[_0x1e68('0x24')](channels[_0x1eafd8[_0x1e68('0x8')]])){utils['debug'](util[_0x1e68('0x1b')](_0x1e68('0x5c'),_0x1eafd8[_0x1e68('0x8')]),_0x1eafd8);utils['info'](util[_0x1e68('0x1b')](_0x1e68('0x5d'),_0x1eafd8['uniqueid'],_0x1eafd8[_0x1e68('0x5e')],_0x1eafd8['appdata']));if(_0x1eafd8[_0x1e68('0x5e')][_0x1e68('0x5f')]()==_0x1e68('0x60')&&_[_0x1e68('0x61')](_0x1eafd8[_0x1e68('0x62')][_0x1e68('0x5f')](),_0x1e68('0x63'))){var _0x26938e=_0x1eafd8['appdata']['split']('=');var _0x27b0f1=_0x26938e[0x0][_0x1e68('0x64')](_0x26938e[0x0][_0x1e68('0x65')]('(')+0x1,_0x26938e[0x0][_0x1e68('0x65')](')'));var _0x2c4fc1=_0x26938e[0x1];channels[_0x1eafd8[_0x1e68('0x8')]][_0x27b0f1]=_0x2c4fc1;}if(!_['includes']([_0x1e68('0x2c'),_0x1e68('0x66'),'execif','set',_0x1e68('0x67')],_0x1eafd8[_0x1e68('0x5e')]['toLowerCase']())){channels[_0x1eafd8['uniqueid']][_0x1e68('0x4f')]=_0x1eafd8[_0x1e68('0x5e')];channels[_0x1eafd8['uniqueid']]['lastdata']=_0x1eafd8[_0x1e68('0x62')];}}}catch(_0x31b801){utils[_0x1e68('0x20')](util[_0x1e68('0x1b')](_0x1e68('0x5c'),_0x1eafd8['uniqueid']),_0x31b801);}}; \ No newline at end of file diff --git a/server/services/xdr/core.controller.js b/server/services/xdr/core.controller.js index bd47e5c..5a34f1f 100644 --- a/server/services/xdr/core.controller.js +++ b/server/services/xdr/core.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5704=['close','[core]\x20close','managerevent','info','[core]\x20connected','shutdown','[core]\x20shutdown','fullybooted','[core]\x20fullybooted','error'];(function(_0x3ed335,_0x2c98d0){var _0x525c6c=function(_0x58de38){while(--_0x58de38){_0x3ed335['push'](_0x3ed335['shift']());}};_0x525c6c(++_0x2c98d0);}(_0x5704,0x1e3));var _0x4570=function(_0x40b7fc,_0x51c685){_0x40b7fc=_0x40b7fc-0x0;var _0xe7387a=_0x5704[_0x40b7fc];return _0xe7387a;};'use strict';var utils=require('./utils');exports['connect']=function(){utils[_0x4570('0x0')](_0x4570('0x1'));};exports[_0x4570('0x2')]=function(){utils[_0x4570('0x0')](_0x4570('0x3'));};exports[_0x4570('0x4')]=function(){utils[_0x4570('0x0')](_0x4570('0x5'));};exports[_0x4570('0x6')]=function(_0x1a931c){utils['error']('[core]\x20error',_0x1a931c);};exports[_0x4570('0x7')]=function(){utils[_0x4570('0x0')](_0x4570('0x8'));};exports[_0x4570('0x9')]=function(_0x2ac130){}; \ No newline at end of file +var _0x0261=['[core]\x20connected','shutdown','[core]\x20shutdown','fullybooted','[core]\x20fullybooted','error','close','managerevent','./utils','connect','info'];(function(_0x34f91b,_0x3a92d8){var _0x2b51a3=function(_0x1f28dd){while(--_0x1f28dd){_0x34f91b['push'](_0x34f91b['shift']());}};_0x2b51a3(++_0x3a92d8);}(_0x0261,0x11b));var _0x1026=function(_0x199572,_0x33e667){_0x199572=_0x199572-0x0;var _0x13cfa3=_0x0261[_0x199572];return _0x13cfa3;};'use strict';var utils=require(_0x1026('0x0'));exports[_0x1026('0x1')]=function(){utils[_0x1026('0x2')](_0x1026('0x3'));};exports[_0x1026('0x4')]=function(){utils[_0x1026('0x2')](_0x1026('0x5'));};exports[_0x1026('0x6')]=function(){utils[_0x1026('0x2')](_0x1026('0x7'));};exports[_0x1026('0x8')]=function(_0x23fc54){utils['error']('[core]\x20error',_0x23fc54);};exports[_0x1026('0x9')]=function(){utils[_0x1026('0x2')]('[core]\x20close');};exports[_0x1026('0xa')]=function(_0x42dfa7){}; \ No newline at end of file diff --git a/server/services/xdr/dials.controller.js b/server/services/xdr/dials.controller.js index ddb4ba8..feebdb1 100644 --- a/server/services/xdr/dials.controller.js +++ b/server/services/xdr/dials.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0851=['hangup','[%s][dials][hangup]','calleridname','complete','duration','diffTime','endtime','holdtime','lodash','util','./utils','format','[%s][dials][writeDB]\x20channel:%s\x20dialstring:%s\x20calleridnum:%s\x20connectedlinenum:%s\x20dialstatus:%s','dialstring','calleridnum','connectedlinenum','dialstatus','request','CreateVoiceDialReport','uniqueid','newexten','debug','[%s][dials][newexten]','application','appdata','set','startsWith','cdr(routeid)','split','varset','[%s][dials][varset]','variable','outboundrouteid','info','[%s][dials][varset]\x20variable:outboundrouteid\x20value:%s','value','error','dialbegin','isNil','[%s][dials][dialbegin]','assign','lastevent','called','[%s][dials][hangup]\x20starttime:%s\x20lastevent:called','starttime','dialend','[%s][dials][dialend]','ANSWER','answertime','now','connect','[%s][dials][dialend]\x20dialstatus:%s\x20answertime:%s\x20lastevent:connect','[%s][dials][dialend]\x20dialstatus:%s'];(function(_0x4ed473,_0x4da38f){var _0x40a0c8=function(_0x5c0e51){while(--_0x5c0e51){_0x4ed473['push'](_0x4ed473['shift']());}};_0x40a0c8(++_0x4da38f);}(_0x0851,0xdc));var _0x1085=function(_0x5bd018,_0x466a03){_0x5bd018=_0x5bd018-0x0;var _0x182190=_0x0851[_0x5bd018];return _0x182190;};'use strict';var _=require(_0x1085('0x0'));var util=require(_0x1085('0x1'));var utils=require(_0x1085('0x2'));var dials={};function writeDB(_0x420e09){utils['info'](util[_0x1085('0x3')](_0x1085('0x4'),_0x420e09['uniqueid'],_0x420e09['channel'],_0x420e09[_0x1085('0x5')],_0x420e09[_0x1085('0x6')],_0x420e09[_0x1085('0x7')],_0x420e09[_0x1085('0x8')]));utils[_0x1085('0x9')](_0x1085('0xa'),_0x420e09);delete dials[_0x420e09[_0x1085('0xb')]];}exports[_0x1085('0xc')]=function(_0x183bb0){try{utils[_0x1085('0xd')](util[_0x1085('0x3')](_0x1085('0xe'),_0x183bb0[_0x1085('0xb')]),_0x183bb0);utils['info'](util['format']('[%s][dials][newexten]\x20application:%s\x20appdata:%s',_0x183bb0['uniqueid'],_0x183bb0[_0x1085('0xf')],_0x183bb0[_0x1085('0x10')]));if(_0x183bb0[_0x1085('0xf')]['toLowerCase']()==_0x1085('0x11')&&_[_0x1085('0x12')](_0x183bb0[_0x1085('0x10')]['toLowerCase'](),_0x1085('0x13'))){var _0x578c6f=_0x183bb0[_0x1085('0x10')][_0x1085('0x14')]('=');dials[_0x183bb0[_0x1085('0xb')]]={'routeId':_0x578c6f[0x1]};}}catch(_0x5a3a94){utils['error'](util['format'](_0x1085('0xe'),_0x183bb0[_0x1085('0xb')]),_0x5a3a94);}};exports[_0x1085('0x15')]=function(_0x49bbff){try{utils['debug'](util['format'](_0x1085('0x16'),_0x49bbff[_0x1085('0xb')]),_0x49bbff);if(!_['isNil'](_0x49bbff[_0x1085('0x17')][_0x1085('0x18')])){utils[_0x1085('0x19')](util[_0x1085('0x3')](_0x1085('0x1a'),_0x49bbff[_0x1085('0xb')],_0x49bbff[_0x1085('0x1b')]));dials[_0x49bbff[_0x1085('0xb')]]={'routeId':_0x49bbff['value']};}}catch(_0x4c6336){utils[_0x1085('0x1c')](util['format'](_0x1085('0x16'),_0x49bbff[_0x1085('0xb')]),_0x4c6336);}};exports[_0x1085('0x1d')]=function(_0x25d036){try{if(!_[_0x1085('0x1e')](dials[_0x25d036[_0x1085('0xb')]])){utils[_0x1085('0xd')](util[_0x1085('0x3')](_0x1085('0x1f'),_0x25d036[_0x1085('0xb')]),_0x25d036);dials[_0x25d036[_0x1085('0xb')]]=_[_0x1085('0x20')](dials[_0x25d036[_0x1085('0xb')]],_0x25d036);dials[_0x25d036[_0x1085('0xb')]]['starttime']=utils['now']();dials[_0x25d036[_0x1085('0xb')]][_0x1085('0x21')]=_0x1085('0x22');utils[_0x1085('0x19')](util[_0x1085('0x3')](_0x1085('0x23'),_0x25d036[_0x1085('0xb')],dials[_0x25d036[_0x1085('0xb')]][_0x1085('0x24')]));}}catch(_0x966f62){utils[_0x1085('0x1c')](util['format']('[%s][dials][dialbegin]',_0x25d036['uniqueid']),_0x966f62);}};exports[_0x1085('0x25')]=function(_0x42d3b7){try{if(!_[_0x1085('0x1e')](dials[_0x42d3b7[_0x1085('0xb')]])){utils[_0x1085('0xd')](util[_0x1085('0x3')](_0x1085('0x26'),_0x42d3b7[_0x1085('0xb')]),_0x42d3b7);dials[_0x42d3b7['uniqueid']][_0x1085('0x8')]=_0x42d3b7[_0x1085('0x8')];if(_0x42d3b7['dialstatus']==_0x1085('0x27')){dials[_0x42d3b7['uniqueid']]=_[_0x1085('0x20')](dials[_0x42d3b7[_0x1085('0xb')]],_0x42d3b7);dials[_0x42d3b7[_0x1085('0xb')]][_0x1085('0x28')]=utils[_0x1085('0x29')]();dials[_0x42d3b7[_0x1085('0xb')]][_0x1085('0x21')]=_0x1085('0x2a');utils['info'](util['format'](_0x1085('0x2b'),_0x42d3b7[_0x1085('0xb')],_0x42d3b7['dialstatus'],dials[_0x42d3b7[_0x1085('0xb')]]['answertime']));}else{utils[_0x1085('0x19')](util[_0x1085('0x3')](_0x1085('0x2c'),_0x42d3b7[_0x1085('0xb')],_0x42d3b7['dialstatus']));}}}catch(_0x2a62f1){utils[_0x1085('0x1c')](util[_0x1085('0x3')]('[%s][dials][dialend]',_0x42d3b7[_0x1085('0xb')]),_0x2a62f1);}};exports[_0x1085('0x2d')]=function(_0x21f59e){try{if(!_[_0x1085('0x1e')](dials[_0x21f59e['uniqueid']])){utils[_0x1085('0xd')](util[_0x1085('0x3')](_0x1085('0x2e'),_0x21f59e[_0x1085('0xb')]),_0x21f59e);utils['info'](util[_0x1085('0x3')]('[%s][dials][hangup]\x20calleridnum:%s\x20calleridname:%s\x20lastevent:complete\x20reason:%s',_0x21f59e[_0x1085('0xb')],_0x21f59e[_0x1085('0x6')],_0x21f59e[_0x1085('0x2f')],_0x21f59e['cause-txt']));dials[_0x21f59e[_0x1085('0xb')]]=_[_0x1085('0x20')](dials[_0x21f59e[_0x1085('0xb')]],{'endtime':utils[_0x1085('0x29')](),'lastevent':_0x1085('0x30')});dials[_0x21f59e['uniqueid']][_0x1085('0x31')]=utils[_0x1085('0x32')](dials[_0x21f59e[_0x1085('0xb')]][_0x1085('0x33')],dials[_0x21f59e[_0x1085('0xb')]][_0x1085('0x24')]);dials[_0x21f59e[_0x1085('0xb')]][_0x1085('0x34')]=utils[_0x1085('0x32')](dials[_0x21f59e[_0x1085('0xb')]]['answertime']||dials[_0x21f59e[_0x1085('0xb')]][_0x1085('0x33')],dials[_0x21f59e[_0x1085('0xb')]]['starttime']);dials[_0x21f59e['uniqueid']]['billableseconds']=dials[_0x21f59e[_0x1085('0xb')]][_0x1085('0x28')]?utils['diffTime'](dials[_0x21f59e['uniqueid']][_0x1085('0x33')],dials[_0x21f59e[_0x1085('0xb')]][_0x1085('0x28')]):0x0;writeDB(dials[_0x21f59e[_0x1085('0xb')]]);}}catch(_0x2cbadc){utils['error'](util[_0x1085('0x3')](_0x1085('0x2e'),_0x21f59e['uniqueid']),_0x2cbadc);}}; \ No newline at end of file +var _0x9366=['variable','outboundrouteid','value','dialbegin','[%s][dials][dialbegin]','assign','starttime','now','[%s][dials][hangup]\x20starttime:%s\x20lastevent:called','dialend','isNil','[%s][dials][dialend]','ANSWER','answertime','lastevent','[%s][dials][dialend]\x20dialstatus:%s\x20answertime:%s\x20lastevent:connect','[%s][dials][dialend]\x20dialstatus:%s','hangup','[%s][dials][hangup]\x20calleridnum:%s\x20calleridname:%s\x20lastevent:complete\x20reason:%s','calleridname','complete','duration','diffTime','endtime','billableseconds','[%s][dials][hangup]','lodash','util','./utils','info','format','[%s][dials][writeDB]\x20channel:%s\x20dialstring:%s\x20calleridnum:%s\x20connectedlinenum:%s\x20dialstatus:%s','uniqueid','channel','dialstring','calleridnum','connectedlinenum','dialstatus','request','CreateVoiceDialReport','newexten','debug','[%s][dials][newexten]','application','set','startsWith','appdata','toLowerCase','split','error','[%s][dials][varset]'];(function(_0x130042,_0x3e9cfc){var _0x2b5fa4=function(_0x5c60a8){while(--_0x5c60a8){_0x130042['push'](_0x130042['shift']());}};_0x2b5fa4(++_0x3e9cfc);}(_0x9366,0x17f));var _0x6936=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x9366[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x6936('0x0'));var util=require(_0x6936('0x1'));var utils=require(_0x6936('0x2'));var dials={};function writeDB(_0x2b3175){utils[_0x6936('0x3')](util[_0x6936('0x4')](_0x6936('0x5'),_0x2b3175[_0x6936('0x6')],_0x2b3175[_0x6936('0x7')],_0x2b3175[_0x6936('0x8')],_0x2b3175[_0x6936('0x9')],_0x2b3175[_0x6936('0xa')],_0x2b3175[_0x6936('0xb')]));utils[_0x6936('0xc')](_0x6936('0xd'),_0x2b3175);delete dials[_0x2b3175[_0x6936('0x6')]];}exports[_0x6936('0xe')]=function(_0x573e9e){try{utils[_0x6936('0xf')](util[_0x6936('0x4')](_0x6936('0x10'),_0x573e9e[_0x6936('0x6')]),_0x573e9e);utils[_0x6936('0x3')](util['format']('[%s][dials][newexten]\x20application:%s\x20appdata:%s',_0x573e9e[_0x6936('0x6')],_0x573e9e[_0x6936('0x11')],_0x573e9e['appdata']));if(_0x573e9e[_0x6936('0x11')]['toLowerCase']()==_0x6936('0x12')&&_[_0x6936('0x13')](_0x573e9e[_0x6936('0x14')][_0x6936('0x15')](),'cdr(routeid)')){var _0xd2ed0b=_0x573e9e[_0x6936('0x14')][_0x6936('0x16')]('=');dials[_0x573e9e[_0x6936('0x6')]]={'routeId':_0xd2ed0b[0x1]};}}catch(_0x2ee30e){utils[_0x6936('0x17')](util['format'](_0x6936('0x10'),_0x573e9e['uniqueid']),_0x2ee30e);}};exports['varset']=function(_0xc7313){try{utils['debug'](util[_0x6936('0x4')](_0x6936('0x18'),_0xc7313[_0x6936('0x6')]),_0xc7313);if(!_['isNil'](_0xc7313[_0x6936('0x19')][_0x6936('0x1a')])){utils[_0x6936('0x3')](util[_0x6936('0x4')]('[%s][dials][varset]\x20variable:outboundrouteid\x20value:%s',_0xc7313['uniqueid'],_0xc7313[_0x6936('0x1b')]));dials[_0xc7313[_0x6936('0x6')]]={'routeId':_0xc7313[_0x6936('0x1b')]};}}catch(_0x64f26a){utils[_0x6936('0x17')](util['format'](_0x6936('0x18'),_0xc7313[_0x6936('0x6')]),_0x64f26a);}};exports[_0x6936('0x1c')]=function(_0x59e59d){try{if(!_['isNil'](dials[_0x59e59d[_0x6936('0x6')]])){utils[_0x6936('0xf')](util[_0x6936('0x4')](_0x6936('0x1d'),_0x59e59d[_0x6936('0x6')]),_0x59e59d);dials[_0x59e59d[_0x6936('0x6')]]=_[_0x6936('0x1e')](dials[_0x59e59d['uniqueid']],_0x59e59d);dials[_0x59e59d['uniqueid']][_0x6936('0x1f')]=utils[_0x6936('0x20')]();dials[_0x59e59d[_0x6936('0x6')]]['lastevent']='called';utils['info'](util[_0x6936('0x4')](_0x6936('0x21'),_0x59e59d[_0x6936('0x6')],dials[_0x59e59d['uniqueid']][_0x6936('0x1f')]));}}catch(_0x47fffd){utils[_0x6936('0x17')](util[_0x6936('0x4')]('[%s][dials][dialbegin]',_0x59e59d[_0x6936('0x6')]),_0x47fffd);}};exports[_0x6936('0x22')]=function(_0x191213){try{if(!_[_0x6936('0x23')](dials[_0x191213['uniqueid']])){utils['debug'](util['format'](_0x6936('0x24'),_0x191213[_0x6936('0x6')]),_0x191213);dials[_0x191213['uniqueid']][_0x6936('0xb')]=_0x191213[_0x6936('0xb')];if(_0x191213[_0x6936('0xb')]==_0x6936('0x25')){dials[_0x191213['uniqueid']]=_['assign'](dials[_0x191213[_0x6936('0x6')]],_0x191213);dials[_0x191213[_0x6936('0x6')]][_0x6936('0x26')]=utils[_0x6936('0x20')]();dials[_0x191213[_0x6936('0x6')]][_0x6936('0x27')]='connect';utils['info'](util['format'](_0x6936('0x28'),_0x191213[_0x6936('0x6')],_0x191213['dialstatus'],dials[_0x191213[_0x6936('0x6')]][_0x6936('0x26')]));}else{utils[_0x6936('0x3')](util[_0x6936('0x4')](_0x6936('0x29'),_0x191213[_0x6936('0x6')],_0x191213[_0x6936('0xb')]));}}}catch(_0xe66fcb){utils[_0x6936('0x17')](util[_0x6936('0x4')](_0x6936('0x24'),_0x191213[_0x6936('0x6')]),_0xe66fcb);}};exports[_0x6936('0x2a')]=function(_0x4fad07){try{if(!_[_0x6936('0x23')](dials[_0x4fad07[_0x6936('0x6')]])){utils[_0x6936('0xf')](util[_0x6936('0x4')]('[%s][dials][hangup]',_0x4fad07[_0x6936('0x6')]),_0x4fad07);utils[_0x6936('0x3')](util[_0x6936('0x4')](_0x6936('0x2b'),_0x4fad07['uniqueid'],_0x4fad07['calleridnum'],_0x4fad07[_0x6936('0x2c')],_0x4fad07['cause-txt']));dials[_0x4fad07[_0x6936('0x6')]]=_[_0x6936('0x1e')](dials[_0x4fad07[_0x6936('0x6')]],{'endtime':utils[_0x6936('0x20')](),'lastevent':_0x6936('0x2d')});dials[_0x4fad07[_0x6936('0x6')]][_0x6936('0x2e')]=utils[_0x6936('0x2f')](dials[_0x4fad07[_0x6936('0x6')]][_0x6936('0x30')],dials[_0x4fad07[_0x6936('0x6')]][_0x6936('0x1f')]);dials[_0x4fad07[_0x6936('0x6')]]['holdtime']=utils[_0x6936('0x2f')](dials[_0x4fad07[_0x6936('0x6')]][_0x6936('0x26')]||dials[_0x4fad07[_0x6936('0x6')]][_0x6936('0x30')],dials[_0x4fad07[_0x6936('0x6')]][_0x6936('0x1f')]);dials[_0x4fad07[_0x6936('0x6')]][_0x6936('0x31')]=dials[_0x4fad07['uniqueid']][_0x6936('0x26')]?utils[_0x6936('0x2f')](dials[_0x4fad07[_0x6936('0x6')]][_0x6936('0x30')],dials[_0x4fad07['uniqueid']]['answertime']):0x0;writeDB(dials[_0x4fad07[_0x6936('0x6')]]);}}catch(_0x1743a){utils[_0x6936('0x17')](util[_0x6936('0x4')](_0x6936('0x32'),_0x4fad07[_0x6936('0x6')]),_0x1743a);}}; \ No newline at end of file diff --git a/server/services/xdr/index.js b/server/services/xdr/index.js index b70da84..6802968 100644 --- a/server/services/xdr/index.js +++ b/server/services/xdr/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf213=['format','[%s][index][devicestatechange]','device','uniqueid','agentcalled','[%s][index][agentcalled]','agentringnoanswer','[%s][index][agentringnoanswer]','agentconnect','[%s][index][agentconnect]','agentcomplete','[%s][index][agentcomplete]','queuecallerabandon','[%s][index][queuecallerabandon]','queuecallerjoin','[%s][index][queuecallerjoin]','[%s][index][queuecallerleave]','queuecallerleave','musiconholdstart','musiconholdstop','[%s][index][musiconholdstop]','[%s][index][newstate]','newstate','hangup','[%s][index][hangup]','cdr','[%s][index][cdr]','[%s][index][blindtransfer]','blindtransfer','attendedtransfer','[%s][index][attendedtransfer]','varset','[%s][index][varset]','newexten','[%s][index][newexten]','[%s][index][newchannel]','newchannel','dialbegin','[%s][index][dialbegin]','[%s]dialbegin','dialend','../../config/environment','./utils','util','asterisk','port','password','keepConnected','xdr','disabled','info','XDR\x20DISABLED','./agents.controller','./calls.controller','./recordings.controller','./core.controller','connect','shutdown','fullybooted','error','close','managerevent','devicestatechange','debug'];(function(_0x203d64,_0x1ec79c){var _0x462ab3=function(_0x55ee6e){while(--_0x55ee6e){_0x203d64['push'](_0x203d64['shift']());}};_0x462ab3(++_0x1ec79c);}(_0xf213,0x129));var _0x3f21=function(_0x93bd19,_0x63839e){_0x93bd19=_0x93bd19-0x0;var _0x435287=_0xf213[_0x93bd19];return _0x435287;};var AsteriskManager=require('asterisk-manager');var config=require(_0x3f21('0x0'));var utils=require(_0x3f21('0x1'));var util=require(_0x3f21('0x2'));var ami=new AsteriskManager(config[_0x3f21('0x3')][_0x3f21('0x4')],config['asterisk']['ip'],config[_0x3f21('0x3')]['username'],config['asterisk'][_0x3f21('0x5')],!![]);ami[_0x3f21('0x6')]();if(config[_0x3f21('0x7')]&&config['xdr'][_0x3f21('0x8')]){utils[_0x3f21('0x9')](_0x3f21('0xa'));}else{var agents=require(_0x3f21('0xb'));var calls=require(_0x3f21('0xc'));var queues=require('./queues.controller');var recordings=require(_0x3f21('0xd'));var members=require('./members.controller');var dials=require('./dials.controller');var transfers=require('./transfers.controller');var core=require(_0x3f21('0xe'));ami['on'](_0x3f21('0xf'),core[_0x3f21('0xf')]);ami['on'](_0x3f21('0x10'),core[_0x3f21('0x10')]);ami['on'](_0x3f21('0x11'),core[_0x3f21('0x11')]);ami['on'](_0x3f21('0x12'),core['error']);ami['on'](_0x3f21('0x13'),core[_0x3f21('0x13')]);ami['on'](_0x3f21('0x14'),core[_0x3f21('0x14')]);ami['on'](_0x3f21('0x15'),function(_0x51389f){try{utils[_0x3f21('0x16')](util[_0x3f21('0x17')](_0x3f21('0x18'),_0x51389f[_0x3f21('0x19')]),_0x51389f);members[_0x3f21('0x15')](_0x51389f);}catch(_0x1ffbcc){utils[_0x3f21('0x12')](util[_0x3f21('0x17')](_0x3f21('0x18'),_0x51389f[_0x3f21('0x19')]),_0x1ffbcc);}});ami['on']('agentcalled',function(_0x1b3968){try{utils[_0x3f21('0x16')](util[_0x3f21('0x17')]('[%s][index][agentcalled]',_0x1b3968[_0x3f21('0x1a')]),_0x1b3968);agents[_0x3f21('0x1b')](_0x1b3968);}catch(_0x207e3d){utils[_0x3f21('0x12')](util[_0x3f21('0x17')](_0x3f21('0x1c'),_0x1b3968[_0x3f21('0x1a')]),_0x207e3d);}});ami['on'](_0x3f21('0x1d'),function(_0x3b52c7){try{utils['debug'](util[_0x3f21('0x17')](_0x3f21('0x1e'),_0x3b52c7[_0x3f21('0x1a')]),_0x3b52c7);agents[_0x3f21('0x1d')](_0x3b52c7);}catch(_0x1adda1){utils[_0x3f21('0x12')](util[_0x3f21('0x17')]('[%s][index][agentringnoanswer]',_0x3b52c7[_0x3f21('0x1a')]),_0x1adda1);}});ami['on'](_0x3f21('0x1f'),function(_0x3da8d4){try{utils[_0x3f21('0x16')](util[_0x3f21('0x17')](_0x3f21('0x20'),_0x3da8d4[_0x3f21('0x1a')]),_0x3da8d4);agents['agentconnect'](_0x3da8d4);queues[_0x3f21('0x1f')](_0x3da8d4);}catch(_0x4d60f7){utils[_0x3f21('0x12')](util[_0x3f21('0x17')](_0x3f21('0x20'),_0x3da8d4[_0x3f21('0x1a')]),_0x4d60f7);}});ami['on'](_0x3f21('0x21'),function(_0x1fb651){try{utils[_0x3f21('0x16')](util['format'](_0x3f21('0x22'),_0x1fb651['uniqueid']),_0x1fb651);agents['agentcomplete'](_0x1fb651);queues[_0x3f21('0x21')](_0x1fb651);members[_0x3f21('0x21')](_0x1fb651);}catch(_0x11e9d0){utils['error'](util[_0x3f21('0x17')](_0x3f21('0x22'),_0x1fb651['uniqueid']),_0x11e9d0);}});ami['on'](_0x3f21('0x23'),function(_0x38720a){try{utils['debug'](util[_0x3f21('0x17')](_0x3f21('0x24'),_0x38720a['uniqueid']),_0x38720a);agents['queuecallerabandon'](_0x38720a);queues[_0x3f21('0x23')](_0x38720a);}catch(_0x2eec60){utils[_0x3f21('0x12')](util[_0x3f21('0x17')](_0x3f21('0x24'),_0x38720a[_0x3f21('0x1a')]),_0x2eec60);}});ami['on'](_0x3f21('0x25'),function(_0x4d6c26){try{utils[_0x3f21('0x16')](util[_0x3f21('0x17')](_0x3f21('0x26'),_0x4d6c26[_0x3f21('0x1a')]),_0x4d6c26);queues['queuecallerjoin'](_0x4d6c26);recordings[_0x3f21('0x25')](_0x4d6c26);}catch(_0x38cc52){utils[_0x3f21('0x12')](util[_0x3f21('0x17')](_0x3f21('0x26'),_0x4d6c26[_0x3f21('0x1a')]),_0x38cc52);}});ami['on']('queuecallerleave',function(_0x55632f){try{utils[_0x3f21('0x16')](util[_0x3f21('0x17')](_0x3f21('0x27'),_0x55632f[_0x3f21('0x1a')]),_0x55632f);queues[_0x3f21('0x28')](_0x55632f);}catch(_0x4a8d8b){utils['error'](util['format'](_0x3f21('0x27'),_0x55632f[_0x3f21('0x1a')]),_0x4a8d8b);}});ami['on'](_0x3f21('0x29'),function(_0x50e4dd){try{utils[_0x3f21('0x16')](util[_0x3f21('0x17')]('[%s][index][musiconholdstart]',_0x50e4dd[_0x3f21('0x1a')]),_0x50e4dd);queues['musiconholdstart'](_0x50e4dd);calls[_0x3f21('0x29')](_0x50e4dd);}catch(_0x218592){utils[_0x3f21('0x12')](util[_0x3f21('0x17')]('[%s][index][musiconholdstart]',_0x50e4dd[_0x3f21('0x1a')]),_0x218592);}});ami['on'](_0x3f21('0x2a'),function(_0xe6102e){try{utils[_0x3f21('0x16')](util['format']('[%s][index][musiconholdstop]',_0xe6102e[_0x3f21('0x1a')]),_0xe6102e);queues[_0x3f21('0x2a')](_0xe6102e);calls[_0x3f21('0x2a')](_0xe6102e);}catch(_0x3b7b62){utils['error'](util[_0x3f21('0x17')](_0x3f21('0x2b'),_0xe6102e[_0x3f21('0x1a')]),_0x3b7b62);}});ami['on']('newstate',function(_0x3b0f17){try{utils['debug'](util[_0x3f21('0x17')](_0x3f21('0x2c'),_0x3b0f17['uniqueid']),_0x3b0f17);calls[_0x3f21('0x2d')](_0x3b0f17);recordings[_0x3f21('0x2d')](_0x3b0f17);}catch(_0xd7d450){utils[_0x3f21('0x12')](util['format']('[%s][index][newstate]',_0x3b0f17[_0x3f21('0x1a')]),_0xd7d450);}});ami['on'](_0x3f21('0x2e'),function(_0x5b3e9c){try{utils['debug'](util[_0x3f21('0x17')](_0x3f21('0x2f'),_0x5b3e9c['uniqueid']),_0x5b3e9c);calls['hangup'](_0x5b3e9c);recordings[_0x3f21('0x2e')](_0x5b3e9c);dials['hangup'](_0x5b3e9c);agents[_0x3f21('0x2e')](_0x5b3e9c);queues[_0x3f21('0x2e')](_0x5b3e9c);}catch(_0x400e17){utils[_0x3f21('0x12')](util[_0x3f21('0x17')](_0x3f21('0x2f'),_0x5b3e9c['uniqueid']),_0x400e17);}});ami['on'](_0x3f21('0x30'),function(_0x4f00b7){try{utils[_0x3f21('0x16')](util[_0x3f21('0x17')](_0x3f21('0x31'),_0x4f00b7['uniqueid']),_0x4f00b7);members[_0x3f21('0x30')](_0x4f00b7);}catch(_0x210342){utils[_0x3f21('0x12')](util[_0x3f21('0x17')](_0x3f21('0x31'),_0x4f00b7[_0x3f21('0x1a')]),_0x210342);}});ami['on']('blindtransfer',function(_0x2d1c39){try{utils[_0x3f21('0x16')](util[_0x3f21('0x17')](_0x3f21('0x32'),_0x2d1c39['uniqueid']),_0x2d1c39);queues['blindtransfer'](_0x2d1c39);agents[_0x3f21('0x33')](_0x2d1c39);transfers[_0x3f21('0x33')](_0x2d1c39);}catch(_0x2708e3){utils['error'](util[_0x3f21('0x17')](_0x3f21('0x32'),_0x2d1c39[_0x3f21('0x1a')]),_0x2708e3);}});ami['on'](_0x3f21('0x34'),function(_0x224f61){try{utils[_0x3f21('0x16')](util[_0x3f21('0x17')](_0x3f21('0x35'),_0x224f61['origtransfereruniqueid']),_0x224f61);queues[_0x3f21('0x34')](_0x224f61);transfers[_0x3f21('0x34')](_0x224f61);agents['attendedtransfer'](_0x224f61);calls['attendedtransfer'](_0x224f61);}catch(_0x531534){utils[_0x3f21('0x12')](util[_0x3f21('0x17')]('[%s][index][attendedtransfer]',_0x224f61['origtransfereruniqueid']),_0x531534);}});ami['on'](_0x3f21('0x36'),function(_0x5aad45){try{utils[_0x3f21('0x16')](util[_0x3f21('0x17')](_0x3f21('0x37'),_0x5aad45[_0x3f21('0x1a')]),_0x5aad45);queues['varset'](_0x5aad45);recordings[_0x3f21('0x36')](_0x5aad45);calls['varset'](_0x5aad45);dials[_0x3f21('0x36')](_0x5aad45);}catch(_0xf28dbf){utils['error'](util[_0x3f21('0x17')]('[%s][index][varset]',_0x5aad45[_0x3f21('0x1a')]),_0xf28dbf);}});ami['on'](_0x3f21('0x38'),function(_0x18e911){try{utils[_0x3f21('0x16')](util[_0x3f21('0x17')](_0x3f21('0x39'),_0x18e911['uniqueid']),_0x18e911);calls[_0x3f21('0x38')](_0x18e911);recordings['newexten'](_0x18e911);dials[_0x3f21('0x38')](_0x18e911);}catch(_0x454d85){utils['error'](util['format'](_0x3f21('0x39'),_0x18e911[_0x3f21('0x1a')]),_0x454d85);}});ami['on']('newchannel',function(_0x2e699f){try{utils['debug'](util[_0x3f21('0x17')](_0x3f21('0x3a'),_0x2e699f[_0x3f21('0x1a')]),_0x2e699f);calls[_0x3f21('0x3b')](_0x2e699f);recordings[_0x3f21('0x3b')](_0x2e699f);}catch(_0x440b07){utils[_0x3f21('0x12')](util['format'](_0x3f21('0x3a'),_0x2e699f['uniqueid']),_0x440b07);}});ami['on'](_0x3f21('0x3c'),function(_0x128273){try{utils[_0x3f21('0x16')](util['format'](_0x3f21('0x3d'),_0x128273[_0x3f21('0x1a')]),_0x128273);dials[_0x3f21('0x3c')](_0x128273);}catch(_0x3c9489){utils[_0x3f21('0x12')](util[_0x3f21('0x17')](_0x3f21('0x3e'),_0x128273[_0x3f21('0x1a')]),_0x3c9489);}});ami['on'](_0x3f21('0x3f'),function(_0x5654bc){try{utils['debug'](util[_0x3f21('0x17')]('[%s][index][dialend]',_0x5654bc[_0x3f21('0x1a')]),_0x5654bc);dials['dialend'](_0x5654bc);}catch(_0x3b25b3){utils[_0x3f21('0x12')](util['format']('[%s][index][dialend]',_0x5654bc[_0x3f21('0x1a')]),_0x3b25b3);}});} \ No newline at end of file +var _0xd3a3=['varset','newexten','[%s][index][newexten]','[%s][index][newchannel]','newchannel','dialbegin','[%s][index][dialbegin]','[%s]dialbegin','dialend','[%s][index][dialend]','asterisk-manager','../../config/environment','./utils','util','asterisk','port','username','xdr','disabled','info','./calls.controller','./queues.controller','./members.controller','./transfers.controller','./core.controller','connect','shutdown','fullybooted','error','close','managerevent','devicestatechange','debug','format','device','[%s][index][devicestatechange]','agentcalled','uniqueid','[%s][index][agentringnoanswer]','agentconnect','[%s][index][agentconnect]','agentcomplete','[%s][index][agentcomplete]','queuecallerabandon','[%s][index][queuecallerabandon]','queuecallerjoin','[%s][index][queuecallerjoin]','queuecallerleave','[%s][index][queuecallerleave]','musiconholdstart','[%s][index][musiconholdstart]','musiconholdstop','[%s][index][musiconholdstop]','newstate','[%s][index][newstate]','[%s][index][hangup]','hangup','cdr','[%s][index][cdr]','[%s][index][blindtransfer]','blindtransfer','attendedtransfer','[%s][index][attendedtransfer]','origtransfereruniqueid','[%s][index][varset]'];(function(_0x3213d9,_0xe12b19){var _0x55bac1=function(_0x3835b2){while(--_0x3835b2){_0x3213d9['push'](_0x3213d9['shift']());}};_0x55bac1(++_0xe12b19);}(_0xd3a3,0x190));var _0x3d3a=function(_0x245f32,_0x3913cc){_0x245f32=_0x245f32-0x0;var _0x283ad6=_0xd3a3[_0x245f32];return _0x283ad6;};var AsteriskManager=require(_0x3d3a('0x0'));var config=require(_0x3d3a('0x1'));var utils=require(_0x3d3a('0x2'));var util=require(_0x3d3a('0x3'));var ami=new AsteriskManager(config[_0x3d3a('0x4')][_0x3d3a('0x5')],config[_0x3d3a('0x4')]['ip'],config['asterisk'][_0x3d3a('0x6')],config[_0x3d3a('0x4')]['password'],!![]);ami['keepConnected']();if(config[_0x3d3a('0x7')]&&config['xdr'][_0x3d3a('0x8')]){utils[_0x3d3a('0x9')]('XDR\x20DISABLED');}else{var agents=require('./agents.controller');var calls=require(_0x3d3a('0xa'));var queues=require(_0x3d3a('0xb'));var recordings=require('./recordings.controller');var members=require(_0x3d3a('0xc'));var dials=require('./dials.controller');var transfers=require(_0x3d3a('0xd'));var core=require(_0x3d3a('0xe'));ami['on'](_0x3d3a('0xf'),core[_0x3d3a('0xf')]);ami['on'](_0x3d3a('0x10'),core[_0x3d3a('0x10')]);ami['on'](_0x3d3a('0x11'),core[_0x3d3a('0x11')]);ami['on'](_0x3d3a('0x12'),core[_0x3d3a('0x12')]);ami['on'](_0x3d3a('0x13'),core['close']);ami['on'](_0x3d3a('0x14'),core[_0x3d3a('0x14')]);ami['on'](_0x3d3a('0x15'),function(_0x35432d){try{utils[_0x3d3a('0x16')](util[_0x3d3a('0x17')]('[%s][index][devicestatechange]',_0x35432d[_0x3d3a('0x18')]),_0x35432d);members[_0x3d3a('0x15')](_0x35432d);}catch(_0x318bb2){utils[_0x3d3a('0x12')](util[_0x3d3a('0x17')](_0x3d3a('0x19'),_0x35432d[_0x3d3a('0x18')]),_0x318bb2);}});ami['on'](_0x3d3a('0x1a'),function(_0x1493dc){try{utils[_0x3d3a('0x16')](util['format']('[%s][index][agentcalled]',_0x1493dc[_0x3d3a('0x1b')]),_0x1493dc);agents[_0x3d3a('0x1a')](_0x1493dc);}catch(_0x102193){utils[_0x3d3a('0x12')](util[_0x3d3a('0x17')]('[%s][index][agentcalled]',_0x1493dc[_0x3d3a('0x1b')]),_0x102193);}});ami['on']('agentringnoanswer',function(_0x36970e){try{utils[_0x3d3a('0x16')](util['format'](_0x3d3a('0x1c'),_0x36970e['uniqueid']),_0x36970e);agents['agentringnoanswer'](_0x36970e);}catch(_0x65071b){utils[_0x3d3a('0x12')](util[_0x3d3a('0x17')](_0x3d3a('0x1c'),_0x36970e[_0x3d3a('0x1b')]),_0x65071b);}});ami['on'](_0x3d3a('0x1d'),function(_0x42b8ee){try{utils['debug'](util[_0x3d3a('0x17')](_0x3d3a('0x1e'),_0x42b8ee[_0x3d3a('0x1b')]),_0x42b8ee);agents['agentconnect'](_0x42b8ee);queues[_0x3d3a('0x1d')](_0x42b8ee);}catch(_0xe835c5){utils[_0x3d3a('0x12')](util[_0x3d3a('0x17')]('[%s][index][agentconnect]',_0x42b8ee[_0x3d3a('0x1b')]),_0xe835c5);}});ami['on'](_0x3d3a('0x1f'),function(_0x1ddcbe){try{utils[_0x3d3a('0x16')](util[_0x3d3a('0x17')]('[%s][index][agentcomplete]',_0x1ddcbe['uniqueid']),_0x1ddcbe);agents[_0x3d3a('0x1f')](_0x1ddcbe);queues[_0x3d3a('0x1f')](_0x1ddcbe);members[_0x3d3a('0x1f')](_0x1ddcbe);}catch(_0x2fd9ed){utils[_0x3d3a('0x12')](util[_0x3d3a('0x17')](_0x3d3a('0x20'),_0x1ddcbe[_0x3d3a('0x1b')]),_0x2fd9ed);}});ami['on'](_0x3d3a('0x21'),function(_0x5347f8){try{utils['debug'](util[_0x3d3a('0x17')]('[%s][index][queuecallerabandon]',_0x5347f8[_0x3d3a('0x1b')]),_0x5347f8);agents[_0x3d3a('0x21')](_0x5347f8);queues[_0x3d3a('0x21')](_0x5347f8);}catch(_0x2d3ef2){utils[_0x3d3a('0x12')](util[_0x3d3a('0x17')](_0x3d3a('0x22'),_0x5347f8['uniqueid']),_0x2d3ef2);}});ami['on']('queuecallerjoin',function(_0xd7d0f3){try{utils[_0x3d3a('0x16')](util[_0x3d3a('0x17')]('[%s][index][queuecallerjoin]',_0xd7d0f3[_0x3d3a('0x1b')]),_0xd7d0f3);queues[_0x3d3a('0x23')](_0xd7d0f3);recordings[_0x3d3a('0x23')](_0xd7d0f3);}catch(_0x1370e0){utils[_0x3d3a('0x12')](util[_0x3d3a('0x17')](_0x3d3a('0x24'),_0xd7d0f3['uniqueid']),_0x1370e0);}});ami['on'](_0x3d3a('0x25'),function(_0x41d0e6){try{utils[_0x3d3a('0x16')](util[_0x3d3a('0x17')](_0x3d3a('0x26'),_0x41d0e6[_0x3d3a('0x1b')]),_0x41d0e6);queues['queuecallerleave'](_0x41d0e6);}catch(_0x21c677){utils[_0x3d3a('0x12')](util[_0x3d3a('0x17')]('[%s][index][queuecallerleave]',_0x41d0e6[_0x3d3a('0x1b')]),_0x21c677);}});ami['on'](_0x3d3a('0x27'),function(_0x4d9339){try{utils['debug'](util['format'](_0x3d3a('0x28'),_0x4d9339[_0x3d3a('0x1b')]),_0x4d9339);queues[_0x3d3a('0x27')](_0x4d9339);calls[_0x3d3a('0x27')](_0x4d9339);}catch(_0x3f2979){utils['error'](util[_0x3d3a('0x17')](_0x3d3a('0x28'),_0x4d9339[_0x3d3a('0x1b')]),_0x3f2979);}});ami['on'](_0x3d3a('0x29'),function(_0xc323f0){try{utils['debug'](util[_0x3d3a('0x17')](_0x3d3a('0x2a'),_0xc323f0[_0x3d3a('0x1b')]),_0xc323f0);queues[_0x3d3a('0x29')](_0xc323f0);calls[_0x3d3a('0x29')](_0xc323f0);}catch(_0x2f4b66){utils[_0x3d3a('0x12')](util[_0x3d3a('0x17')]('[%s][index][musiconholdstop]',_0xc323f0[_0x3d3a('0x1b')]),_0x2f4b66);}});ami['on'](_0x3d3a('0x2b'),function(_0x4786e4){try{utils[_0x3d3a('0x16')](util[_0x3d3a('0x17')](_0x3d3a('0x2c'),_0x4786e4[_0x3d3a('0x1b')]),_0x4786e4);calls[_0x3d3a('0x2b')](_0x4786e4);recordings[_0x3d3a('0x2b')](_0x4786e4);}catch(_0xca4d02){utils[_0x3d3a('0x12')](util[_0x3d3a('0x17')](_0x3d3a('0x2c'),_0x4786e4[_0x3d3a('0x1b')]),_0xca4d02);}});ami['on']('hangup',function(_0x3cd4a5){try{utils[_0x3d3a('0x16')](util[_0x3d3a('0x17')](_0x3d3a('0x2d'),_0x3cd4a5[_0x3d3a('0x1b')]),_0x3cd4a5);calls[_0x3d3a('0x2e')](_0x3cd4a5);recordings[_0x3d3a('0x2e')](_0x3cd4a5);dials[_0x3d3a('0x2e')](_0x3cd4a5);agents['hangup'](_0x3cd4a5);queues[_0x3d3a('0x2e')](_0x3cd4a5);}catch(_0x1e843b){utils[_0x3d3a('0x12')](util[_0x3d3a('0x17')](_0x3d3a('0x2d'),_0x3cd4a5[_0x3d3a('0x1b')]),_0x1e843b);}});ami['on'](_0x3d3a('0x2f'),function(_0x5d2635){try{utils['debug'](util[_0x3d3a('0x17')](_0x3d3a('0x30'),_0x5d2635[_0x3d3a('0x1b')]),_0x5d2635);members[_0x3d3a('0x2f')](_0x5d2635);}catch(_0x4a7e43){utils[_0x3d3a('0x12')](util['format'](_0x3d3a('0x30'),_0x5d2635[_0x3d3a('0x1b')]),_0x4a7e43);}});ami['on']('blindtransfer',function(_0x46b74d){try{utils[_0x3d3a('0x16')](util[_0x3d3a('0x17')](_0x3d3a('0x31'),_0x46b74d[_0x3d3a('0x1b')]),_0x46b74d);queues['blindtransfer'](_0x46b74d);agents[_0x3d3a('0x32')](_0x46b74d);transfers[_0x3d3a('0x32')](_0x46b74d);}catch(_0x1bf84c){utils['error'](util[_0x3d3a('0x17')]('[%s][index][blindtransfer]',_0x46b74d[_0x3d3a('0x1b')]),_0x1bf84c);}});ami['on'](_0x3d3a('0x33'),function(_0x302ec2){try{utils['debug'](util[_0x3d3a('0x17')](_0x3d3a('0x34'),_0x302ec2[_0x3d3a('0x35')]),_0x302ec2);queues[_0x3d3a('0x33')](_0x302ec2);transfers[_0x3d3a('0x33')](_0x302ec2);agents['attendedtransfer'](_0x302ec2);calls[_0x3d3a('0x33')](_0x302ec2);}catch(_0xf1b429){utils[_0x3d3a('0x12')](util[_0x3d3a('0x17')](_0x3d3a('0x34'),_0x302ec2[_0x3d3a('0x35')]),_0xf1b429);}});ami['on']('varset',function(_0x268bdf){try{utils['debug'](util[_0x3d3a('0x17')](_0x3d3a('0x36'),_0x268bdf[_0x3d3a('0x1b')]),_0x268bdf);queues['varset'](_0x268bdf);recordings[_0x3d3a('0x37')](_0x268bdf);calls[_0x3d3a('0x37')](_0x268bdf);dials[_0x3d3a('0x37')](_0x268bdf);}catch(_0xcfb5c6){utils[_0x3d3a('0x12')](util[_0x3d3a('0x17')](_0x3d3a('0x36'),_0x268bdf[_0x3d3a('0x1b')]),_0xcfb5c6);}});ami['on'](_0x3d3a('0x38'),function(_0x15ea04){try{utils['debug'](util[_0x3d3a('0x17')]('[%s][index][newexten]',_0x15ea04[_0x3d3a('0x1b')]),_0x15ea04);calls['newexten'](_0x15ea04);recordings[_0x3d3a('0x38')](_0x15ea04);dials[_0x3d3a('0x38')](_0x15ea04);}catch(_0x4cb913){utils[_0x3d3a('0x12')](util[_0x3d3a('0x17')](_0x3d3a('0x39'),_0x15ea04[_0x3d3a('0x1b')]),_0x4cb913);}});ami['on']('newchannel',function(_0x3f8e22){try{utils[_0x3d3a('0x16')](util[_0x3d3a('0x17')](_0x3d3a('0x3a'),_0x3f8e22['uniqueid']),_0x3f8e22);calls['newchannel'](_0x3f8e22);recordings[_0x3d3a('0x3b')](_0x3f8e22);}catch(_0x11606b){utils[_0x3d3a('0x12')](util[_0x3d3a('0x17')](_0x3d3a('0x3a'),_0x3f8e22[_0x3d3a('0x1b')]),_0x11606b);}});ami['on'](_0x3d3a('0x3c'),function(_0x29fd37){try{utils[_0x3d3a('0x16')](util[_0x3d3a('0x17')](_0x3d3a('0x3d'),_0x29fd37['uniqueid']),_0x29fd37);dials[_0x3d3a('0x3c')](_0x29fd37);}catch(_0x398842){utils[_0x3d3a('0x12')](util[_0x3d3a('0x17')](_0x3d3a('0x3e'),_0x29fd37[_0x3d3a('0x1b')]),_0x398842);}});ami['on'](_0x3d3a('0x3f'),function(_0x1546fa){try{utils[_0x3d3a('0x16')](util[_0x3d3a('0x17')](_0x3d3a('0x40'),_0x1546fa[_0x3d3a('0x1b')]),_0x1546fa);dials[_0x3d3a('0x3f')](_0x1546fa);}catch(_0x3df695){utils[_0x3d3a('0x12')](util['format'](_0x3d3a('0x40'),_0x1546fa[_0x3d3a('0x1b')]),_0x3df695);}});} \ No newline at end of file diff --git a/server/services/xdr/members.controller.js b/server/services/xdr/members.controller.js index 63b9492..f5ad507 100644 --- a/server/services/xdr/members.controller.js +++ b/server/services/xdr/members.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x61ea=['[%s][members][cdr]','lodash','util','./utils','Local/_attended@transfer','[%s][members][writeDB]\x20interface:%s\x20channel:%s\x20data2:%s\x20agent:%s\x20type:%s','interface','channel','data2','membername','type','getUserByInterface','then','internal','request','CreateMemberReport','getUserByName','split','name','catch','error','format','[%s][members][writeDB]','some','startsWith','devicestatechange','debug','device','uniqueid','info','state','INUSE','BUSY','voice','TALKING','now','isNil','exitAt','diffTime','enterAt','[%s][members][devicestatechange]','agentcomplete','[%s][members][agentcomplete]','[%s][members][agentcomplete]\x20interface:%s\x20queue:%s','assign','queue','data1','source','data3','destination','[%s][members][cdr]\x20type:%s\x20source:%s\x20destination:%s','destinationchannel'];(function(_0x137687,_0x2a1e81){var _0x2622d6=function(_0x20848e){while(--_0x20848e){_0x137687['push'](_0x137687['shift']());}};_0x2622d6(++_0x2a1e81);}(_0x61ea,0x1d5));var _0xa61e=function(_0xc51450,_0x33470c){_0xc51450=_0xc51450-0x0;var _0x1b0be2=_0x61ea[_0xc51450];return _0x1b0be2;};'use strict';var _=require(_0xa61e('0x0'));var util=require(_0xa61e('0x1'));var utils=require(_0xa61e('0x2'));var members={};var exclude=[_0xa61e('0x3'),'Queue:'];function writeDB(_0x475ee6){utils['info'](util['format'](_0xa61e('0x4'),_0x475ee6['uniqueid'],_0x475ee6[_0xa61e('0x5')],_0x475ee6[_0xa61e('0x6')],_0x475ee6[_0xa61e('0x7')],_0x475ee6[_0xa61e('0x8')],_0x475ee6[_0xa61e('0x9')]));if(_0x475ee6[_0xa61e('0x5')]){utils[_0xa61e('0xa')](_0x475ee6[_0xa61e('0x5')])[_0xa61e('0xb')](function(_0x55ec27){if(_0x55ec27){_0x475ee6['membername']=_0x55ec27['name'];_0x475ee6[_0xa61e('0xc')]=_0x55ec27[_0xa61e('0xc')];utils[_0xa61e('0xd')](_0xa61e('0xe'),_0x475ee6);}else{utils[_0xa61e('0xf')](_0x475ee6[_0xa61e('0x5')][_0xa61e('0x10')]('/')[0x1])['then'](function(_0x8f0ad2){if(_0x8f0ad2){_0x475ee6[_0xa61e('0x8')]=_0x8f0ad2[_0xa61e('0x11')];_0x475ee6['internal']=_0x8f0ad2[_0xa61e('0xc')];utils['request']('CreateMemberReport',_0x475ee6);}});}})[_0xa61e('0x12')](function(_0x2e87e1){utils[_0xa61e('0x13')](util[_0xa61e('0x14')](_0xa61e('0x15'),_0x475ee6['uniqueid']),_0x2e87e1);});}delete members[_0x475ee6[_0xa61e('0x5')]];}function startsWith(_0x1cbbed,_0x54c957){return _[_0xa61e('0x16')](_0x1cbbed,function(_0x306270){return _[_0xa61e('0x17')](_0x54c957,_0x306270);});}exports[_0xa61e('0x18')]=function(_0x2c13d7){try{utils[_0xa61e('0x19')](util[_0xa61e('0x14')]('[%s][members][devicestatechange]',members[_0x2c13d7[_0xa61e('0x1a')]]?members[_0x2c13d7['device']][_0xa61e('0x1b')]:_0x2c13d7[_0xa61e('0x1a')]),_0x2c13d7);utils[_0xa61e('0x1c')](util[_0xa61e('0x14')]('[%s][members][devicestatechange]\x20state:%s\x20interface:%s',members[_0x2c13d7[_0xa61e('0x1a')]]?members[_0x2c13d7['device']][_0xa61e('0x1b')]:_0x2c13d7['device'],_0x2c13d7[_0xa61e('0x1d')],_0x2c13d7[_0xa61e('0x1a')]));switch(_0x2c13d7['state']){case _0xa61e('0x1e'):case _0xa61e('0x1f'):if(!startsWith(exclude,_0x2c13d7[_0xa61e('0x1a')])){members[_0x2c13d7[_0xa61e('0x1a')]]={'channel':_0xa61e('0x20'),'interface':_0x2c13d7[_0xa61e('0x1a')],'type':_0xa61e('0x21'),'enterAt':utils[_0xa61e('0x22')](),'role':'agent'};}break;case'NOT_INUSE':if(!_[_0xa61e('0x23')](members[_0x2c13d7[_0xa61e('0x1a')]])){members[_0x2c13d7['device']][_0xa61e('0x24')]=utils['now']();members[_0x2c13d7[_0xa61e('0x1a')]]['duration']=utils[_0xa61e('0x25')](members[_0x2c13d7['device']]['exitAt'],members[_0x2c13d7[_0xa61e('0x1a')]][_0xa61e('0x26')]);if(members[_0x2c13d7[_0xa61e('0x1a')]][_0xa61e('0x1b')]){writeDB(members[_0x2c13d7[_0xa61e('0x1a')]]);}}break;default:break;}}catch(_0x263e18){utils['error'](util[_0xa61e('0x14')](_0xa61e('0x27'),members[_0x2c13d7['device']]?members[_0x2c13d7[_0xa61e('0x1a')]][_0xa61e('0x1b')]:_0x2c13d7[_0xa61e('0x1a')]),_0x263e18);}};exports[_0xa61e('0x28')]=function(_0xaa9368){try{if(!_[_0xa61e('0x23')](members[_0xaa9368[_0xa61e('0x5')]])){utils['debug'](util[_0xa61e('0x14')](_0xa61e('0x29'),_0xaa9368[_0xa61e('0x1b')]),_0xaa9368);utils[_0xa61e('0x1c')](util['format'](_0xa61e('0x2a'),_0xaa9368['uniqueid'],_0xaa9368['interface'],_0xaa9368['queue']));members[_0xaa9368[_0xa61e('0x5')]]=_[_0xa61e('0x2b')](members[_0xaa9368[_0xa61e('0x5')]],{'data4':_0xaa9368[_0xa61e('0x2c')],'uniqueid':_0xaa9368[_0xa61e('0x1b')]});}}catch(_0x5a9369){utils[_0xa61e('0x13')](util[_0xa61e('0x14')](_0xa61e('0x29'),_0xaa9368[_0xa61e('0x1b')]),_0x5a9369);}};exports['cdr']=function(_0x24b9b1){try{utils[_0xa61e('0x19')](util[_0xa61e('0x14')]('[%s][members][cdr]',_0x24b9b1['uniqueid']),_0x24b9b1);if(_0x24b9b1[_0xa61e('0x6')]){var _0x3ad82f=_0x24b9b1[_0xa61e('0x6')][_0xa61e('0x10')]('-')[0x0];if(!_[_0xa61e('0x23')](members[_0x3ad82f])){members[_0x3ad82f]=_[_0xa61e('0x2b')](members[_0x3ad82f],{'data1':members[_0x3ad82f][_0xa61e('0x2d')]||_0x24b9b1[_0xa61e('0x9')],'data2':members[_0x3ad82f][_0xa61e('0x7')]||_0x24b9b1[_0xa61e('0x2e')],'data3':members[_0x3ad82f][_0xa61e('0x2f')]||_0x24b9b1[_0xa61e('0x30')],'uniqueid':members[_0x3ad82f][_0xa61e('0x1b')]||_0x24b9b1[_0xa61e('0x1b')]});utils[_0xa61e('0x1c')](util[_0xa61e('0x14')](_0xa61e('0x31'),_0x24b9b1['uniqueid'],members[_0x3ad82f][_0xa61e('0x2d')],members[_0x3ad82f][_0xa61e('0x7')],members[_0x3ad82f][_0xa61e('0x2f')]));if(members[_0x3ad82f][_0xa61e('0x24')]){writeDB(members[_0x3ad82f]);}}}if(_0x24b9b1['destinationchannel']){var _0x42bd8e=_0x24b9b1[_0xa61e('0x32')]['split']('-')[0x0];if(!_[_0xa61e('0x23')](members[_0x42bd8e])){members[_0x42bd8e]=_[_0xa61e('0x2b')](members[_0x42bd8e],{'data1':members[_0x42bd8e][_0xa61e('0x2d')]||_0x24b9b1[_0xa61e('0x9')],'data2':members[_0x42bd8e][_0xa61e('0x7')]||_0x24b9b1[_0xa61e('0x2e')],'data3':members[_0x42bd8e][_0xa61e('0x2f')]||_0x24b9b1[_0xa61e('0x30')],'uniqueid':members[_0x42bd8e][_0xa61e('0x1b')]||_0x24b9b1['uniqueid']});utils[_0xa61e('0x1c')](util[_0xa61e('0x14')](_0xa61e('0x31'),_0x24b9b1[_0xa61e('0x1b')],members[_0x42bd8e][_0xa61e('0x2d')],members[_0x42bd8e][_0xa61e('0x7')],members[_0x42bd8e][_0xa61e('0x2f')]));if(members[_0x42bd8e][_0xa61e('0x24')]){writeDB(members[_0x42bd8e]);}}}}catch(_0x4e8eec){utils[_0xa61e('0x13')](util[_0xa61e('0x14')](_0xa61e('0x33'),_0x24b9b1[_0xa61e('0x1b')]),_0x4e8eec);}}; \ No newline at end of file +var _0xf5f9=['source','data3','destination','[%s][members][cdr]\x20type:%s\x20source:%s\x20destination:%s','lodash','util','Local/_attended@transfer','Queue:','format','[%s][members][writeDB]\x20interface:%s\x20channel:%s\x20data2:%s\x20agent:%s\x20type:%s','uniqueid','interface','data2','membername','getUserByInterface','internal','request','CreateMemberReport','getUserByName','split','then','name','catch','error','[%s][members][writeDB]','some','startsWith','devicestatechange','debug','[%s][members][devicestatechange]','device','info','state','INUSE','BUSY','voice','TALKING','NOT_INUSE','isNil','exitAt','now','duration','enterAt','agentcomplete','[%s][members][agentcomplete]','queue','assign','cdr','[%s][members][cdr]','data1','type'];(function(_0x563a81,_0x183ef6){var _0x5eb69d=function(_0x2e1dbc){while(--_0x2e1dbc){_0x563a81['push'](_0x563a81['shift']());}};_0x5eb69d(++_0x183ef6);}(_0xf5f9,0x6a));var _0x9f5f=function(_0x1057b8,_0x1a2abd){_0x1057b8=_0x1057b8-0x0;var _0x188fd2=_0xf5f9[_0x1057b8];return _0x188fd2;};'use strict';var _=require(_0x9f5f('0x0'));var util=require(_0x9f5f('0x1'));var utils=require('./utils');var members={};var exclude=[_0x9f5f('0x2'),_0x9f5f('0x3')];function writeDB(_0x2ad3e8){utils['info'](util[_0x9f5f('0x4')](_0x9f5f('0x5'),_0x2ad3e8[_0x9f5f('0x6')],_0x2ad3e8[_0x9f5f('0x7')],_0x2ad3e8['channel'],_0x2ad3e8[_0x9f5f('0x8')],_0x2ad3e8[_0x9f5f('0x9')],_0x2ad3e8['type']));if(_0x2ad3e8[_0x9f5f('0x7')]){utils[_0x9f5f('0xa')](_0x2ad3e8[_0x9f5f('0x7')])['then'](function(_0x41c295){if(_0x41c295){_0x2ad3e8[_0x9f5f('0x9')]=_0x41c295['name'];_0x2ad3e8[_0x9f5f('0xb')]=_0x41c295[_0x9f5f('0xb')];utils[_0x9f5f('0xc')](_0x9f5f('0xd'),_0x2ad3e8);}else{utils[_0x9f5f('0xe')](_0x2ad3e8[_0x9f5f('0x7')][_0x9f5f('0xf')]('/')[0x1])[_0x9f5f('0x10')](function(_0x453ed7){if(_0x453ed7){_0x2ad3e8['membername']=_0x453ed7[_0x9f5f('0x11')];_0x2ad3e8[_0x9f5f('0xb')]=_0x453ed7['internal'];utils['request'](_0x9f5f('0xd'),_0x2ad3e8);}});}})[_0x9f5f('0x12')](function(_0x2696b4){utils[_0x9f5f('0x13')](util[_0x9f5f('0x4')](_0x9f5f('0x14'),_0x2ad3e8[_0x9f5f('0x6')]),_0x2696b4);});}delete members[_0x2ad3e8[_0x9f5f('0x7')]];}function startsWith(_0x2722ac,_0x370781){return _[_0x9f5f('0x15')](_0x2722ac,function(_0x273d88){return _[_0x9f5f('0x16')](_0x370781,_0x273d88);});}exports[_0x9f5f('0x17')]=function(_0x5ef9e0){try{utils[_0x9f5f('0x18')](util['format'](_0x9f5f('0x19'),members[_0x5ef9e0[_0x9f5f('0x1a')]]?members[_0x5ef9e0[_0x9f5f('0x1a')]][_0x9f5f('0x6')]:_0x5ef9e0[_0x9f5f('0x1a')]),_0x5ef9e0);utils[_0x9f5f('0x1b')](util[_0x9f5f('0x4')]('[%s][members][devicestatechange]\x20state:%s\x20interface:%s',members[_0x5ef9e0[_0x9f5f('0x1a')]]?members[_0x5ef9e0[_0x9f5f('0x1a')]][_0x9f5f('0x6')]:_0x5ef9e0[_0x9f5f('0x1a')],_0x5ef9e0['state'],_0x5ef9e0[_0x9f5f('0x1a')]));switch(_0x5ef9e0[_0x9f5f('0x1c')]){case _0x9f5f('0x1d'):case _0x9f5f('0x1e'):if(!startsWith(exclude,_0x5ef9e0['device'])){members[_0x5ef9e0[_0x9f5f('0x1a')]]={'channel':_0x9f5f('0x1f'),'interface':_0x5ef9e0['device'],'type':_0x9f5f('0x20'),'enterAt':utils['now'](),'role':'agent'};}break;case _0x9f5f('0x21'):if(!_[_0x9f5f('0x22')](members[_0x5ef9e0[_0x9f5f('0x1a')]])){members[_0x5ef9e0['device']][_0x9f5f('0x23')]=utils[_0x9f5f('0x24')]();members[_0x5ef9e0['device']][_0x9f5f('0x25')]=utils['diffTime'](members[_0x5ef9e0['device']]['exitAt'],members[_0x5ef9e0['device']][_0x9f5f('0x26')]);if(members[_0x5ef9e0[_0x9f5f('0x1a')]][_0x9f5f('0x6')]){writeDB(members[_0x5ef9e0[_0x9f5f('0x1a')]]);}}break;default:break;}}catch(_0x53d290){utils['error'](util['format'](_0x9f5f('0x19'),members[_0x5ef9e0['device']]?members[_0x5ef9e0['device']][_0x9f5f('0x6')]:_0x5ef9e0[_0x9f5f('0x1a')]),_0x53d290);}};exports[_0x9f5f('0x27')]=function(_0x55d1c2){try{if(!_[_0x9f5f('0x22')](members[_0x55d1c2[_0x9f5f('0x7')]])){utils['debug'](util[_0x9f5f('0x4')](_0x9f5f('0x28'),_0x55d1c2['uniqueid']),_0x55d1c2);utils['info'](util[_0x9f5f('0x4')]('[%s][members][agentcomplete]\x20interface:%s\x20queue:%s',_0x55d1c2[_0x9f5f('0x6')],_0x55d1c2[_0x9f5f('0x7')],_0x55d1c2[_0x9f5f('0x29')]));members[_0x55d1c2[_0x9f5f('0x7')]]=_[_0x9f5f('0x2a')](members[_0x55d1c2[_0x9f5f('0x7')]],{'data4':_0x55d1c2[_0x9f5f('0x29')],'uniqueid':_0x55d1c2[_0x9f5f('0x6')]});}}catch(_0x375870){utils['error'](util[_0x9f5f('0x4')]('[%s][members][agentcomplete]',_0x55d1c2[_0x9f5f('0x6')]),_0x375870);}};exports[_0x9f5f('0x2b')]=function(_0x40bdf){try{utils[_0x9f5f('0x18')](util[_0x9f5f('0x4')](_0x9f5f('0x2c'),_0x40bdf['uniqueid']),_0x40bdf);if(_0x40bdf['channel']){var _0x4e048d=_0x40bdf['channel'][_0x9f5f('0xf')]('-')[0x0];if(!_[_0x9f5f('0x22')](members[_0x4e048d])){members[_0x4e048d]=_['assign'](members[_0x4e048d],{'data1':members[_0x4e048d][_0x9f5f('0x2d')]||_0x40bdf[_0x9f5f('0x2e')],'data2':members[_0x4e048d]['data2']||_0x40bdf[_0x9f5f('0x2f')],'data3':members[_0x4e048d][_0x9f5f('0x30')]||_0x40bdf[_0x9f5f('0x31')],'uniqueid':members[_0x4e048d][_0x9f5f('0x6')]||_0x40bdf[_0x9f5f('0x6')]});utils[_0x9f5f('0x1b')](util[_0x9f5f('0x4')](_0x9f5f('0x32'),_0x40bdf['uniqueid'],members[_0x4e048d][_0x9f5f('0x2d')],members[_0x4e048d]['data2'],members[_0x4e048d][_0x9f5f('0x30')]));if(members[_0x4e048d]['exitAt']){writeDB(members[_0x4e048d]);}}}if(_0x40bdf['destinationchannel']){var _0x55a868=_0x40bdf['destinationchannel']['split']('-')[0x0];if(!_[_0x9f5f('0x22')](members[_0x55a868])){members[_0x55a868]=_['assign'](members[_0x55a868],{'data1':members[_0x55a868][_0x9f5f('0x2d')]||_0x40bdf['type'],'data2':members[_0x55a868][_0x9f5f('0x8')]||_0x40bdf[_0x9f5f('0x2f')],'data3':members[_0x55a868]['data3']||_0x40bdf['destination'],'uniqueid':members[_0x55a868][_0x9f5f('0x6')]||_0x40bdf[_0x9f5f('0x6')]});utils['info'](util['format'](_0x9f5f('0x32'),_0x40bdf[_0x9f5f('0x6')],members[_0x55a868][_0x9f5f('0x2d')],members[_0x55a868][_0x9f5f('0x8')],members[_0x55a868][_0x9f5f('0x30')]));if(members[_0x55a868][_0x9f5f('0x23')]){writeDB(members[_0x55a868]);}}}}catch(_0x4790a2){utils[_0x9f5f('0x13')](util[_0x9f5f('0x4')]('[%s][members][cdr]',_0x40bdf[_0x9f5f('0x6')]),_0x4790a2);}}; \ No newline at end of file diff --git a/server/services/xdr/queues.controller.js b/server/services/xdr/queues.controller.js index 76198dc..93de853 100644 --- a/server/services/xdr/queues.controller.js +++ b/server/services/xdr/queues.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9949=['value','toUpperCase','CONTINUE','queuecallerabandonAt','queuecallerexitAt','[%s][queues][varset]\x20name:%s\x20variable:queuestatus\x20value:%s\x20queuecallerexitreason:%s','queueposition','EXITWITHKEY','[%s][queues][queuecallerabandon]','ABANDONED','[%s][queues][queuecallerabandon]\x20name:%s\x20queuecallerexitreason:%s','error','queuecallerleave','[%s][queues][queuecallerleave]\x20name:%s\x20connectedlinenum:%s\x20connectedlinename:%s','connectedlinenum','connectedlinename','holdtime','queuecallerjoinAt','count','[%s][queues][agentconnect]','[%s][queues][agentconnect]\x20name:%s\x20agent:%s\x20accountcode:%s','membername','destaccountcode','assigned','accountcode','[%s][queues][agentcomplete]','reason','transfer','TRANSFER','COMPLETEDBY','blindtransfer','transfereeuniqueid','transfertype','transferexten','extension','[%s][queues][blindtransfer]','attendedtransfer','origtransfereruniqueid','origtransfererlinkedid','[%s][queues][attendedtransfer]\x20name:%s\x20transferexten:%s\x20queuecallerexitreason:ATTENDEDTRANSFER','origtransfererexten','secondtransfererlinkedid','ATTENDED','transferuniqueid','transfereelinkedid','clone','transfertargetuniqueid','calleridname','[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s','secondtransfereruniqueid','secondtransfererexten','transfertargetlinkedid','mohtime','[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s\x20calleridnum:%s\x20calleridname:%s','[%s][queues][attendedtransfer]','musiconholdstart','[%s][queues][musiconholdstart]','[%s][queues][musiconholdstop]\x20name:%s\x20musiconholdstartAt:%s','musiconholdstartAt','musiconholdstop','[%s][queues][musiconholdstop]','diffTime','[%s][queues][musiconholdstop]\x20name:%s\x20mohtime:%s','util','info','format','[%s][queues][writeDB]\x20channel:%s\x20queue:%s\x20lastAssignedTo:%s\x20calleridnum:%s\x20accountcode:%s\x20queuecallerexitreason:%s','channel','lastAssignedTo','calleridnum','queuecallerexitreason','queue','type','request','CreateVoiceQueueReport','transfereduniqueid','uniqueid','queuecallerjoin','debug','[%s][queues][queuecallerjoin]\x20name:%s\x20position:%s','position','[%s][queues][queuecallerjoin]','isNil','[%s][queues][hangup]','queuecallerleaveAt','queuecallerabandon','queuecallerexit','queuecallercompleteAt','now','COMPLETEDBYAGENT','name','[%s][queues][hangup]\x20name:%s\x20transfereduniqueid:%s','queuecallerenterreason','[%s][queues][varset]','variable'];(function(_0xf1fc14,_0x44fbf4){var _0x15ea3c=function(_0x54e375){while(--_0x54e375){_0xf1fc14['push'](_0xf1fc14['shift']());}};_0x15ea3c(++_0x44fbf4);}(_0x9949,0x9e));var _0x9994=function(_0x36d5be,_0x413c1a){_0x36d5be=_0x36d5be-0x0;var _0x39a141=_0x9949[_0x36d5be];return _0x39a141;};'use strict';var _=require('lodash');var util=require(_0x9994('0x0'));var utils=require('./utils');var queues={};function writeDB(_0x4db1d5){utils[_0x9994('0x1')](util[_0x9994('0x2')](_0x9994('0x3'),_0x4db1d5['uniqueid'],_0x4db1d5[_0x9994('0x4')],_0x4db1d5['queue'],_0x4db1d5[_0x9994('0x5')],_0x4db1d5[_0x9994('0x6')],_0x4db1d5['accountcode'],_0x4db1d5[_0x9994('0x7')]));if(_0x4db1d5[_0x9994('0x8')]){utils['getVoiceQueueByName'](_0x4db1d5['queue'])['then'](function(_0x557325){if(_0x557325){_0x4db1d5[_0x9994('0x9')]=_0x557325[_0x9994('0x9')];}utils[_0x9994('0xa')]('CreateVoiceQueueReport',_0x4db1d5);});}else{utils[_0x9994('0xa')](_0x9994('0xb'),_0x4db1d5);}if(_0x4db1d5[_0x9994('0xc')]){delete queues[_0x4db1d5[_0x9994('0xc')]];}else{delete queues[_0x4db1d5[_0x9994('0xd')]];}}exports[_0x9994('0xe')]=function(_0x232e3e){try{utils[_0x9994('0xf')](util[_0x9994('0x2')]('[%s][queues][queuecallerjoin]',_0x232e3e[_0x9994('0xd')]),_0x232e3e);utils[_0x9994('0x1')](util[_0x9994('0x2')](_0x9994('0x10'),_0x232e3e[_0x9994('0xd')],_0x232e3e[_0x9994('0x8')],_0x232e3e[_0x9994('0x11')]));queues[_0x232e3e[_0x9994('0xd')]]=_['assign'](_0x232e3e,{'originalposition':_0x232e3e[_0x9994('0x11')],'queuecallerjoinAt':utils['now'](),'mohtime':0x0});}catch(_0x167453){utils['error'](util[_0x9994('0x2')](_0x9994('0x12'),_0x232e3e[_0x9994('0xd')]),_0x167453);}};exports['hangup']=function(_0x128943){try{if(!_[_0x9994('0x13')](queues[_0x128943[_0x9994('0xd')]])){utils[_0x9994('0xf')](util[_0x9994('0x2')](_0x9994('0x14'),_0x128943[_0x9994('0xd')]),_0x128943);if(queues[_0x128943['uniqueid']][_0x9994('0x15')]){if(!queues[_0x128943[_0x9994('0xd')]][_0x9994('0x16')]&&!queues[_0x128943['uniqueid']][_0x9994('0x17')]){queues[_0x128943[_0x9994('0xd')]]['queuecallercomplete']=!![];queues[_0x128943['uniqueid']][_0x9994('0x18')]=utils[_0x9994('0x19')]();queues[_0x128943['uniqueid']][_0x9994('0x7')]=_0x9994('0x1a');}utils[_0x9994('0x1')](util['format']('[%s][queues][hangup]\x20name:%s\x20queuecallerexitreason:%s',_0x128943[_0x9994('0xd')],queues[_0x128943[_0x9994('0xd')]][_0x9994('0x1b')],queues[_0x128943[_0x9994('0xd')]][_0x9994('0x7')]));writeDB(queues[_0x128943['uniqueid']]);}else if(queues[_0x128943[_0x9994('0xd')]]['transfereduniqueid']){utils['info'](util[_0x9994('0x2')](_0x9994('0x1c'),_0x128943[_0x9994('0xd')],queues[_0x128943[_0x9994('0xd')]][_0x9994('0x1b')],queues[_0x128943[_0x9994('0xd')]][_0x9994('0xc')]));queues[queues[_0x128943[_0x9994('0xd')]]['transfereduniqueid']]=queues[_0x128943[_0x9994('0xd')]];queues[queues[_0x128943[_0x9994('0xd')]][_0x9994('0xc')]][_0x9994('0x1d')]=0x2;delete queues[_0x128943[_0x9994('0xd')]];}}}catch(_0x4accb6){utils['error'](util['format'](_0x9994('0x14'),_0x128943[_0x9994('0xd')]),_0x4accb6);}};exports['varset']=function(_0x1bf357){try{utils['debug'](util['format'](_0x9994('0x1e'),_0x1bf357[_0x9994('0xd')]),_0x1bf357);if(!_[_0x9994('0x13')](_0x1bf357[_0x9994('0x1f')]['queuestatus'])&&_0x1bf357[_0x9994('0x20')][_0x9994('0x21')]()!==_0x9994('0x22')){if(!_[_0x9994('0x13')](queues[_0x1bf357[_0x9994('0xd')]])){queues[_0x1bf357[_0x9994('0xd')]][_0x9994('0x16')]=![];queues[_0x1bf357['uniqueid']][_0x9994('0x23')]=null;queues[_0x1bf357[_0x9994('0xd')]][_0x9994('0x17')]=!![];queues[_0x1bf357[_0x9994('0xd')]][_0x9994('0x24')]=utils['now']();queues[_0x1bf357[_0x9994('0xd')]]['queuecallerexitreason']=_0x1bf357['value']['toUpperCase']();utils['info'](util[_0x9994('0x2')](_0x9994('0x25'),_0x1bf357[_0x9994('0xd')],queues[_0x1bf357[_0x9994('0xd')]][_0x9994('0x1b')],_0x1bf357[_0x9994('0x20')],queues[_0x1bf357[_0x9994('0xd')]][_0x9994('0x7')]));writeDB(queues[_0x1bf357[_0x9994('0xd')]]);}}else if(!_[_0x9994('0x13')](_0x1bf357[_0x9994('0x1f')][_0x9994('0x26')])){if(!_[_0x9994('0x13')](queues[_0x1bf357[_0x9994('0xd')]])&&!queues[_0x1bf357[_0x9994('0xd')]][_0x9994('0x16')]){queues[_0x1bf357[_0x9994('0xd')]][_0x9994('0x16')]=![];queues[_0x1bf357[_0x9994('0xd')]][_0x9994('0x23')]=null;queues[_0x1bf357['uniqueid']]['queuecallerexit']=!![];queues[_0x1bf357[_0x9994('0xd')]]['queuecallerexitAt']=utils['now']();queues[_0x1bf357['uniqueid']]['queuecallerexitreason']=_0x9994('0x27');utils[_0x9994('0x1')](util['format']('[%s][queues][varset]\x20name:%s\x20variable:queueposition\x20value:%s\x20queuecallerexitreason:%s',_0x1bf357[_0x9994('0xd')],queues[_0x1bf357[_0x9994('0xd')]][_0x9994('0x1b')],_0x1bf357['value'],queues[_0x1bf357['uniqueid']][_0x9994('0x7')]));}}}catch(_0x592cf7){utils['error'](util[_0x9994('0x2')](_0x9994('0x1e'),_0x1bf357[_0x9994('0xd')]),_0x592cf7);}};exports[_0x9994('0x16')]=function(_0x5e59c2){try{if(!_['isNil'](queues[_0x5e59c2[_0x9994('0xd')]])){utils['debug'](util['format'](_0x9994('0x28'),_0x5e59c2[_0x9994('0xd')]),_0x5e59c2);queues[_0x5e59c2['uniqueid']][_0x9994('0x17')]=![];queues[_0x5e59c2[_0x9994('0xd')]][_0x9994('0x24')]=null;queues[_0x5e59c2[_0x9994('0xd')]]['queuecallerabandon']=!![];queues[_0x5e59c2['uniqueid']][_0x9994('0x23')]=utils[_0x9994('0x19')]();queues[_0x5e59c2[_0x9994('0xd')]][_0x9994('0x7')]=_0x9994('0x29');utils[_0x9994('0x1')](util[_0x9994('0x2')](_0x9994('0x2a'),_0x5e59c2[_0x9994('0xd')],queues[_0x5e59c2[_0x9994('0xd')]][_0x9994('0x1b')],queues[_0x5e59c2[_0x9994('0xd')]][_0x9994('0x7')]));}}catch(_0x204a97){utils[_0x9994('0x2b')](util[_0x9994('0x2')](_0x9994('0x28'),_0x5e59c2['uniqueid']),_0x204a97);}};exports[_0x9994('0x2c')]=function(_0x4da8d9){try{if(!_['isNil'](queues[_0x4da8d9[_0x9994('0xd')]])){utils[_0x9994('0xf')](util[_0x9994('0x2')]('[%s][queues][queuecallerleave]',_0x4da8d9[_0x9994('0xd')]),_0x4da8d9);utils[_0x9994('0x1')](util[_0x9994('0x2')](_0x9994('0x2d'),_0x4da8d9[_0x9994('0xd')],queues[_0x4da8d9[_0x9994('0xd')]][_0x9994('0x1b')],_0x4da8d9[_0x9994('0x2e')],_0x4da8d9[_0x9994('0x2f')]));queues[_0x4da8d9[_0x9994('0xd')]][_0x9994('0x2c')]=!![];queues[_0x4da8d9[_0x9994('0xd')]][_0x9994('0x15')]=utils[_0x9994('0x19')]();queues[_0x4da8d9[_0x9994('0xd')]][_0x9994('0x30')]=utils['diffTime'](queues[_0x4da8d9[_0x9994('0xd')]][_0x9994('0x15')],queues[_0x4da8d9[_0x9994('0xd')]][_0x9994('0x31')]);queues[_0x4da8d9[_0x9994('0xd')]][_0x9994('0x11')]=_0x4da8d9[_0x9994('0x11')];queues[_0x4da8d9[_0x9994('0xd')]][_0x9994('0x32')]=_0x4da8d9['count'];queues[_0x4da8d9[_0x9994('0xd')]][_0x9994('0x2e')]=_0x4da8d9[_0x9994('0x2e')];queues[_0x4da8d9[_0x9994('0xd')]][_0x9994('0x2f')]=_0x4da8d9['connectedlinename'];}}catch(_0xc693b2){utils['error'](util['format']('[%s][queues][queuecallerleave]',_0x4da8d9['uniqueid']),_0xc693b2);}};exports['agentconnect']=function(_0x23f186){try{if(!_[_0x9994('0x13')](queues[_0x23f186[_0x9994('0xd')]])){utils[_0x9994('0xf')](util[_0x9994('0x2')](_0x9994('0x33'),_0x23f186[_0x9994('0xd')]),_0x23f186);utils[_0x9994('0x1')](util['format'](_0x9994('0x34'),_0x23f186['uniqueid'],queues[_0x23f186['uniqueid']][_0x9994('0x1b')],_0x23f186[_0x9994('0x35')],_0x23f186[_0x9994('0x36')]));queues[_0x23f186[_0x9994('0xd')]]['queuecallerabandon']=![];queues[_0x23f186[_0x9994('0xd')]][_0x9994('0x16')]=![];queues[_0x23f186[_0x9994('0xd')]][_0x9994('0x23')]=null;queues[_0x23f186['uniqueid']]['queuecallerexit']=![];queues[_0x23f186[_0x9994('0xd')]][_0x9994('0x7')]=null;queues[_0x23f186[_0x9994('0xd')]]['queuecallerexitAt']=null;queues[_0x23f186[_0x9994('0xd')]][_0x9994('0x37')]=!![];queues[_0x23f186[_0x9994('0xd')]][_0x9994('0x38')]=_0x23f186[_0x9994('0x36')];queues[_0x23f186[_0x9994('0xd')]][_0x9994('0x5')]=_0x23f186[_0x9994('0x35')];}}catch(_0x554f1a){utils[_0x9994('0x2b')](util['format'](_0x9994('0x33'),_0x23f186['uniqueid']),_0x554f1a);}};exports['agentcomplete']=function(_0x5af3a5){try{if(!_[_0x9994('0x13')](queues[_0x5af3a5[_0x9994('0xd')]])){if(queues[_0x5af3a5[_0x9994('0xd')]][_0x9994('0x15')]){utils['debug'](util['format'](_0x9994('0x39'),_0x5af3a5[_0x9994('0xd')]),_0x5af3a5);queues[_0x5af3a5[_0x9994('0xd')]][_0x9994('0x16')]=![];queues[_0x5af3a5['uniqueid']]['queuecallerabandon']=![];queues[_0x5af3a5[_0x9994('0xd')]][_0x9994('0x23')]=null;queues[_0x5af3a5['uniqueid']][_0x9994('0x17')]=![];queues[_0x5af3a5[_0x9994('0xd')]][_0x9994('0x24')]=null;queues[_0x5af3a5['uniqueid']]['assigned']=!![];queues[_0x5af3a5[_0x9994('0xd')]][_0x9994('0x5')]=_0x5af3a5['membername'];queues[_0x5af3a5[_0x9994('0xd')]]['queuecallercomplete']=!![];queues[_0x5af3a5[_0x9994('0xd')]]['queuecallercompleteAt']=utils['now']();if(_0x5af3a5[_0x9994('0x3a')]==_0x9994('0x3b')){if(!queues[_0x5af3a5['uniqueid']][_0x9994('0x3b')]){queues[_0x5af3a5[_0x9994('0xd')]][_0x9994('0x7')]=_0x9994('0x3c');}}else{queues[_0x5af3a5[_0x9994('0xd')]][_0x9994('0x7')]=_0x9994('0x3d')+_0x5af3a5[_0x9994('0x3a')][_0x9994('0x21')]();}utils[_0x9994('0x1')](util[_0x9994('0x2')]('[%s][queues][agentcomplete]\x20name:%s\x20agent:%s\x20queuecallerexitreason:%s',_0x5af3a5[_0x9994('0xd')],queues[_0x5af3a5[_0x9994('0xd')]][_0x9994('0x1b')],_0x5af3a5['membername'],queues[_0x5af3a5[_0x9994('0xd')]]['queuecallerexitreason']));writeDB(queues[_0x5af3a5['uniqueid']]);}}}catch(_0x22cbb2){utils[_0x9994('0x2b')](util[_0x9994('0x2')](_0x9994('0x39'),_0x5af3a5['uniqueid']),_0x22cbb2);}};exports[_0x9994('0x3e')]=function(_0x34a6f9){try{if(!_[_0x9994('0x13')](queues[_0x34a6f9[_0x9994('0x3f')]])){utils[_0x9994('0xf')](util['format']('[%s][queues][blindtransfer]',_0x34a6f9['uniqueid']),_0x34a6f9);queues[_0x34a6f9[_0x9994('0x3f')]][_0x9994('0x3b')]=!![];queues[_0x34a6f9[_0x9994('0x3f')]][_0x9994('0x40')]='BLIND';queues[_0x34a6f9[_0x9994('0x3f')]][_0x9994('0x41')]=_0x34a6f9[_0x9994('0x42')];queues[_0x34a6f9[_0x9994('0x3f')]]['transferuniqueid']=_0x34a6f9['transfereeuniqueid'];queues[_0x34a6f9['transfereeuniqueid']][_0x9994('0x7')]='BLINDTRANSFER';utils[_0x9994('0x1')](util['format']('[%s][queues][blindtransfer]\x20name:%s\x20transferuniqueid:%s\x20transferexten:%s\x20queuecallerexitreason:BLINDTRANSFER',_0x34a6f9['uniqueid'],queues[_0x34a6f9[_0x9994('0x3f')]]['name'],_0x34a6f9['transfereeuniqueid'],_0x34a6f9[_0x9994('0x42')]));}}catch(_0x13343e){utils[_0x9994('0x2b')](util['format'](_0x9994('0x43'),_0x34a6f9[_0x9994('0xd')]),_0x13343e);}};exports[_0x9994('0x44')]=function(_0x10ad8c){try{utils[_0x9994('0xf')](util[_0x9994('0x2')]('[%s][queues][attendedtransfer]',_0x10ad8c['origtransfereruniqueid']),_0x10ad8c);if(_0x10ad8c[_0x9994('0x45')]==_0x10ad8c[_0x9994('0x46')]){if(!_['isNil'](queues[_0x10ad8c['secondtransfererlinkedid']])){utils[_0x9994('0x1')](util['format'](_0x9994('0x47'),_0x10ad8c[_0x9994('0x45')],queues[_0x10ad8c['secondtransfererlinkedid']][_0x9994('0x1b')],_0x10ad8c[_0x9994('0x48')]));queues[_0x10ad8c[_0x9994('0x49')]]['transfer']=!![];queues[_0x10ad8c['secondtransfererlinkedid']][_0x9994('0x40')]=_0x9994('0x4a');queues[_0x10ad8c[_0x9994('0x49')]]['transferexten']=_0x10ad8c[_0x9994('0x48')];queues[_0x10ad8c['secondtransfererlinkedid']][_0x9994('0x4b')]=_0x10ad8c[_0x9994('0x45')];queues[_0x10ad8c[_0x9994('0x49')]][_0x9994('0x7')]='ATTENDEDTRANSFER';}if(!_[_0x9994('0x13')](queues[_0x10ad8c[_0x9994('0x46')]])){if(_0x10ad8c[_0x9994('0x4c')]&&queues[_0x10ad8c['transfereelinkedid']]){queues[_0x10ad8c[_0x9994('0x4c')]][_0x9994('0x1d')]=0x1;queues[_0x10ad8c[_0x9994('0x3f')]]=_[_0x9994('0x4d')](queues[_0x10ad8c[_0x9994('0x4c')]]);queues[_0x10ad8c['transfereeuniqueid']][_0x9994('0xc')]=_0x10ad8c[_0x9994('0x4e')];queues[_0x10ad8c['transfereeuniqueid']][_0x9994('0x1d')]=0x2;queues[_0x10ad8c[_0x9994('0x3f')]][_0x9994('0x6')]=queues[_0x10ad8c[_0x9994('0x49')]][_0x9994('0x6')];queues[_0x10ad8c['transfereeuniqueid']]['calleridname']=queues[_0x10ad8c[_0x9994('0x49')]][_0x9994('0x4f')];queues[_0x10ad8c[_0x9994('0x3f')]][_0x9994('0x31')]=utils[_0x9994('0x19')]();queues[_0x10ad8c[_0x9994('0x3f')]]['queuecallerleaveAt']=utils['now']();queues[_0x10ad8c['transfereeuniqueid']][_0x9994('0x30')]=0x0;queues[_0x10ad8c['transfereeuniqueid']]['mohtime']=0x0;utils['info'](util[_0x9994('0x2')]('[%s][queues][attendedtransfer]\x20name:%s\x20calleridnum:%s\x20calleridname:%s',_0x10ad8c[_0x9994('0x45')],queues[_0x10ad8c[_0x9994('0x3f')]][_0x9994('0x1b')],queues[_0x10ad8c['transfereeuniqueid']]['calleridnum'],queues[_0x10ad8c['transfereeuniqueid']][_0x9994('0x4f')]));}else{utils[_0x9994('0x1')](util[_0x9994('0x2')](_0x9994('0x50'),_0x10ad8c[_0x9994('0x45')],queues[_0x10ad8c['origtransfererlinkedid']]['name'],_0x10ad8c[_0x9994('0x49')]));queues[_0x10ad8c[_0x9994('0x46')]]['transfereduniqueid']=_0x10ad8c[_0x9994('0x49')];}}}else if(_0x10ad8c[_0x9994('0x51')]==_0x10ad8c[_0x9994('0x49')]){if(!_[_0x9994('0x13')](queues[_0x10ad8c['origtransfererlinkedid']])){utils['info'](util[_0x9994('0x2')]('[%s][queues][attendedtransfer]\x20name:%s\x20transferuniqueid:%s\x20transferexten:%s\x20queuecallerexitreason:ATTENDEDTRANSFER',_0x10ad8c[_0x9994('0x45')],queues[_0x10ad8c[_0x9994('0x46')]][_0x9994('0x1b')],_0x10ad8c[_0x9994('0x51')],_0x10ad8c[_0x9994('0x52')]));queues[_0x10ad8c['origtransfererlinkedid']][_0x9994('0x3b')]=!![];queues[_0x10ad8c[_0x9994('0x46')]][_0x9994('0x40')]=_0x9994('0x4a');queues[_0x10ad8c[_0x9994('0x46')]][_0x9994('0x41')]=_0x10ad8c[_0x9994('0x52')];queues[_0x10ad8c[_0x9994('0x46')]][_0x9994('0x4b')]=_0x10ad8c[_0x9994('0x51')];queues[_0x10ad8c['origtransfererlinkedid']][_0x9994('0x7')]='ATTENDEDTRANSFER';}if(!_['isNil'](queues[_0x10ad8c[_0x9994('0x49')]])){if(_0x10ad8c['transfertargetlinkedid']&&queues[_0x10ad8c[_0x9994('0x53')]]){queues[_0x10ad8c[_0x9994('0x53')]][_0x9994('0x1d')]=0x1;queues[_0x10ad8c[_0x9994('0x4e')]]=_[_0x9994('0x4d')](queues[_0x10ad8c['transfertargetlinkedid']]);queues[_0x10ad8c[_0x9994('0x4e')]]['transfereduniqueid']=_0x10ad8c[_0x9994('0x4e')];queues[_0x10ad8c[_0x9994('0x4e')]][_0x9994('0x1d')]=0x2;queues[_0x10ad8c[_0x9994('0x4e')]]['calleridnum']=queues[_0x10ad8c['origtransfererlinkedid']][_0x9994('0x6')];queues[_0x10ad8c['transfertargetuniqueid']][_0x9994('0x4f')]=queues[_0x10ad8c[_0x9994('0x46')]]['calleridname'];queues[_0x10ad8c[_0x9994('0x4e')]]['queuecallerjoinAt']=utils[_0x9994('0x19')]();queues[_0x10ad8c['transfertargetuniqueid']][_0x9994('0x15')]=utils[_0x9994('0x19')]();queues[_0x10ad8c[_0x9994('0x4e')]][_0x9994('0x30')]=0x0;queues[_0x10ad8c['transfertargetuniqueid']][_0x9994('0x54')]=0x0;utils[_0x9994('0x1')](util[_0x9994('0x2')](_0x9994('0x55'),_0x10ad8c[_0x9994('0x45')],queues[_0x10ad8c[_0x9994('0x4e')]][_0x9994('0x1b')],queues[_0x10ad8c['transfertargetuniqueid']]['transfereduniqueid'],queues[_0x10ad8c[_0x9994('0x4e')]]['calleridnum'],queues[_0x10ad8c[_0x9994('0x4e')]][_0x9994('0x4f')]));}else{utils[_0x9994('0x1')](util[_0x9994('0x2')](_0x9994('0x50'),_0x10ad8c[_0x9994('0x45')],queues[_0x10ad8c['secondtransfererlinkedid']][_0x9994('0x1b')],_0x10ad8c[_0x9994('0x46')]));queues[_0x10ad8c[_0x9994('0x49')]][_0x9994('0xc')]=_0x10ad8c[_0x9994('0x46')];}}}}catch(_0x3bb40b){utils[_0x9994('0x2b')](util[_0x9994('0x2')](_0x9994('0x56'),_0x10ad8c[_0x9994('0x45')]),_0x3bb40b);}};exports[_0x9994('0x57')]=function(_0x5dfba1){try{if(!_['isNil'](queues[_0x5dfba1[_0x9994('0xd')]])){utils[_0x9994('0xf')](util[_0x9994('0x2')](_0x9994('0x58'),_0x5dfba1[_0x9994('0xd')]),_0x5dfba1);queues[_0x5dfba1[_0x9994('0xd')]]['musiconholdstartAt']=utils[_0x9994('0x19')]();utils['info'](util['format'](_0x9994('0x59'),_0x5dfba1[_0x9994('0xd')],queues[_0x5dfba1[_0x9994('0xd')]][_0x9994('0x1b')],queues[_0x5dfba1[_0x9994('0xd')]][_0x9994('0x5a')]));}}catch(_0x45c459){utils['error'](util[_0x9994('0x2')]('[%s][queues][musiconholdstart]',_0x5dfba1[_0x9994('0xd')]),_0x45c459);}};exports[_0x9994('0x5b')]=function(_0x49ca4d){try{if(!_['isNil'](queues[_0x49ca4d['uniqueid']])){if(!_[_0x9994('0x13')](queues[_0x49ca4d[_0x9994('0xd')]][_0x9994('0x5a')])){utils[_0x9994('0xf')](util[_0x9994('0x2')](_0x9994('0x5c'),_0x49ca4d[_0x9994('0xd')]),_0x49ca4d);queues[_0x49ca4d['uniqueid']][_0x9994('0x54')]+=utils[_0x9994('0x5d')](utils[_0x9994('0x19')](),queues[_0x49ca4d[_0x9994('0xd')]][_0x9994('0x5a')]);utils[_0x9994('0x1')](util[_0x9994('0x2')](_0x9994('0x5e'),_0x49ca4d[_0x9994('0xd')],queues[_0x49ca4d[_0x9994('0xd')]][_0x9994('0x1b')],queues[_0x49ca4d[_0x9994('0xd')]][_0x9994('0x54')]));delete queues[_0x49ca4d[_0x9994('0xd')]][_0x9994('0x5a')];}}}catch(_0x50e315){utils['error'](util['format'](_0x9994('0x5c'),_0x49ca4d[_0x9994('0xd')]),_0x50e315);}}; \ No newline at end of file +var _0x367c=['secondtransfererlinkedid','[%s][queues][attendedtransfer]\x20name:%s\x20transferexten:%s\x20queuecallerexitreason:ATTENDEDTRANSFER','origtransfererexten','transfertype','ATTENDED','ATTENDEDTRANSFER','origtransfererlinkedid','transfereelinkedid','clone','transfertargetuniqueid','calleridnum','calleridname','mohtime','[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s','secondtransfereruniqueid','[%s][queues][attendedtransfer]\x20name:%s\x20transferuniqueid:%s\x20transferexten:%s\x20queuecallerexitreason:ATTENDEDTRANSFER','secondtransfererexten','transfertargetlinkedid','[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s\x20calleridnum:%s\x20calleridname:%s','musiconholdstart','[%s][queues][musiconholdstart]','musiconholdstartAt','[%s][queues][musiconholdstop]\x20name:%s\x20musiconholdstartAt:%s','musiconholdstop','[%s][queues][musiconholdstop]','[%s][queues][musiconholdstop]\x20name:%s\x20mohtime:%s','lodash','util','./utils','info','channel','queue','lastAssignedTo','queuecallerexitreason','getVoiceQueueByName','type','request','CreateVoiceQueueReport','transfereduniqueid','uniqueid','format','[%s][queues][queuecallerjoin]','[%s][queues][queuecallerjoin]\x20name:%s\x20position:%s','position','assign','now','error','hangup','debug','queuecallerleaveAt','queuecallerexit','queuecallercomplete','COMPLETEDBYAGENT','[%s][queues][hangup]\x20name:%s\x20queuecallerexitreason:%s','name','[%s][queues][hangup]\x20name:%s\x20transfereduniqueid:%s','queuecallerenterreason','[%s][queues][hangup]','varset','[%s][queues][varset]','isNil','variable','value','queuecallerabandonAt','queueposition','queuecallerabandon','queuecallerexitAt','[%s][queues][varset]\x20name:%s\x20variable:queueposition\x20value:%s\x20queuecallerexitreason:%s','[%s][queues][queuecallerabandon]','ABANDONED','[%s][queues][queuecallerabandon]\x20name:%s\x20queuecallerexitreason:%s','queuecallerleave','[%s][queues][queuecallerleave]','[%s][queues][queuecallerleave]\x20name:%s\x20connectedlinenum:%s\x20connectedlinename:%s','connectedlinenum','connectedlinename','holdtime','diffTime','queuecallerjoinAt','count','agentconnect','[%s][queues][agentconnect]','[%s][queues][agentconnect]\x20name:%s\x20agent:%s\x20accountcode:%s','membername','destaccountcode','assigned','accountcode','[%s][queues][agentcomplete]','reason','transfer','TRANSFER','COMPLETEDBY','[%s][queues][agentcomplete]\x20name:%s\x20agent:%s\x20queuecallerexitreason:%s','transfereeuniqueid','BLIND','transferexten','extension','transferuniqueid','BLINDTRANSFER','[%s][queues][blindtransfer]\x20name:%s\x20transferuniqueid:%s\x20transferexten:%s\x20queuecallerexitreason:BLINDTRANSFER','[%s][queues][blindtransfer]','[%s][queues][attendedtransfer]','origtransfereruniqueid'];(function(_0x411017,_0x4a8117){var _0x2adeea=function(_0x545222){while(--_0x545222){_0x411017['push'](_0x411017['shift']());}};_0x2adeea(++_0x4a8117);}(_0x367c,0x14f));var _0xc367=function(_0x5ddb1c,_0x5ea4df){_0x5ddb1c=_0x5ddb1c-0x0;var _0x354adc=_0x367c[_0x5ddb1c];return _0x354adc;};'use strict';var _=require(_0xc367('0x0'));var util=require(_0xc367('0x1'));var utils=require(_0xc367('0x2'));var queues={};function writeDB(_0x53cb8b){utils[_0xc367('0x3')](util['format']('[%s][queues][writeDB]\x20channel:%s\x20queue:%s\x20lastAssignedTo:%s\x20calleridnum:%s\x20accountcode:%s\x20queuecallerexitreason:%s',_0x53cb8b['uniqueid'],_0x53cb8b[_0xc367('0x4')],_0x53cb8b[_0xc367('0x5')],_0x53cb8b[_0xc367('0x6')],_0x53cb8b['calleridnum'],_0x53cb8b['accountcode'],_0x53cb8b[_0xc367('0x7')]));if(_0x53cb8b[_0xc367('0x5')]){utils[_0xc367('0x8')](_0x53cb8b['queue'])['then'](function(_0x105076){if(_0x105076){_0x53cb8b[_0xc367('0x9')]=_0x105076[_0xc367('0x9')];}utils[_0xc367('0xa')](_0xc367('0xb'),_0x53cb8b);});}else{utils[_0xc367('0xa')]('CreateVoiceQueueReport',_0x53cb8b);}if(_0x53cb8b[_0xc367('0xc')]){delete queues[_0x53cb8b[_0xc367('0xc')]];}else{delete queues[_0x53cb8b[_0xc367('0xd')]];}}exports['queuecallerjoin']=function(_0x4ba851){try{utils['debug'](util[_0xc367('0xe')](_0xc367('0xf'),_0x4ba851[_0xc367('0xd')]),_0x4ba851);utils[_0xc367('0x3')](util[_0xc367('0xe')](_0xc367('0x10'),_0x4ba851[_0xc367('0xd')],_0x4ba851[_0xc367('0x5')],_0x4ba851[_0xc367('0x11')]));queues[_0x4ba851[_0xc367('0xd')]]=_[_0xc367('0x12')](_0x4ba851,{'originalposition':_0x4ba851[_0xc367('0x11')],'queuecallerjoinAt':utils[_0xc367('0x13')](),'mohtime':0x0});}catch(_0x918947){utils[_0xc367('0x14')](util['format'](_0xc367('0xf'),_0x4ba851[_0xc367('0xd')]),_0x918947);}};exports[_0xc367('0x15')]=function(_0x4f7f3c){try{if(!_['isNil'](queues[_0x4f7f3c['uniqueid']])){utils[_0xc367('0x16')](util[_0xc367('0xe')]('[%s][queues][hangup]',_0x4f7f3c[_0xc367('0xd')]),_0x4f7f3c);if(queues[_0x4f7f3c[_0xc367('0xd')]][_0xc367('0x17')]){if(!queues[_0x4f7f3c['uniqueid']]['queuecallerabandon']&&!queues[_0x4f7f3c['uniqueid']][_0xc367('0x18')]){queues[_0x4f7f3c[_0xc367('0xd')]][_0xc367('0x19')]=!![];queues[_0x4f7f3c['uniqueid']]['queuecallercompleteAt']=utils[_0xc367('0x13')]();queues[_0x4f7f3c[_0xc367('0xd')]][_0xc367('0x7')]=_0xc367('0x1a');}utils[_0xc367('0x3')](util['format'](_0xc367('0x1b'),_0x4f7f3c['uniqueid'],queues[_0x4f7f3c['uniqueid']][_0xc367('0x1c')],queues[_0x4f7f3c['uniqueid']][_0xc367('0x7')]));writeDB(queues[_0x4f7f3c['uniqueid']]);}else if(queues[_0x4f7f3c[_0xc367('0xd')]]['transfereduniqueid']){utils[_0xc367('0x3')](util['format'](_0xc367('0x1d'),_0x4f7f3c[_0xc367('0xd')],queues[_0x4f7f3c[_0xc367('0xd')]][_0xc367('0x1c')],queues[_0x4f7f3c[_0xc367('0xd')]][_0xc367('0xc')]));queues[queues[_0x4f7f3c[_0xc367('0xd')]]['transfereduniqueid']]=queues[_0x4f7f3c[_0xc367('0xd')]];queues[queues[_0x4f7f3c[_0xc367('0xd')]][_0xc367('0xc')]][_0xc367('0x1e')]=0x2;delete queues[_0x4f7f3c[_0xc367('0xd')]];}}}catch(_0x325b21){utils[_0xc367('0x14')](util[_0xc367('0xe')](_0xc367('0x1f'),_0x4f7f3c[_0xc367('0xd')]),_0x325b21);}};exports[_0xc367('0x20')]=function(_0x1916c7){try{utils[_0xc367('0x16')](util['format'](_0xc367('0x21'),_0x1916c7[_0xc367('0xd')]),_0x1916c7);if(!_[_0xc367('0x22')](_0x1916c7[_0xc367('0x23')]['queuestatus'])&&_0x1916c7[_0xc367('0x24')]['toUpperCase']()!=='CONTINUE'){if(!_[_0xc367('0x22')](queues[_0x1916c7[_0xc367('0xd')]])){queues[_0x1916c7[_0xc367('0xd')]]['queuecallerabandon']=![];queues[_0x1916c7['uniqueid']][_0xc367('0x25')]=null;queues[_0x1916c7[_0xc367('0xd')]][_0xc367('0x18')]=!![];queues[_0x1916c7[_0xc367('0xd')]]['queuecallerexitAt']=utils['now']();queues[_0x1916c7['uniqueid']][_0xc367('0x7')]=_0x1916c7[_0xc367('0x24')]['toUpperCase']();utils[_0xc367('0x3')](util[_0xc367('0xe')]('[%s][queues][varset]\x20name:%s\x20variable:queuestatus\x20value:%s\x20queuecallerexitreason:%s',_0x1916c7[_0xc367('0xd')],queues[_0x1916c7[_0xc367('0xd')]][_0xc367('0x1c')],_0x1916c7[_0xc367('0x24')],queues[_0x1916c7[_0xc367('0xd')]][_0xc367('0x7')]));writeDB(queues[_0x1916c7[_0xc367('0xd')]]);}}else if(!_[_0xc367('0x22')](_0x1916c7[_0xc367('0x23')][_0xc367('0x26')])){if(!_[_0xc367('0x22')](queues[_0x1916c7[_0xc367('0xd')]])&&!queues[_0x1916c7[_0xc367('0xd')]][_0xc367('0x27')]){queues[_0x1916c7[_0xc367('0xd')]]['queuecallerabandon']=![];queues[_0x1916c7[_0xc367('0xd')]][_0xc367('0x25')]=null;queues[_0x1916c7[_0xc367('0xd')]][_0xc367('0x18')]=!![];queues[_0x1916c7[_0xc367('0xd')]][_0xc367('0x28')]=utils[_0xc367('0x13')]();queues[_0x1916c7[_0xc367('0xd')]][_0xc367('0x7')]='EXITWITHKEY';utils['info'](util[_0xc367('0xe')](_0xc367('0x29'),_0x1916c7[_0xc367('0xd')],queues[_0x1916c7[_0xc367('0xd')]][_0xc367('0x1c')],_0x1916c7['value'],queues[_0x1916c7[_0xc367('0xd')]][_0xc367('0x7')]));}}}catch(_0x106172){utils[_0xc367('0x14')](util[_0xc367('0xe')](_0xc367('0x21'),_0x1916c7[_0xc367('0xd')]),_0x106172);}};exports['queuecallerabandon']=function(_0x4769bf){try{if(!_[_0xc367('0x22')](queues[_0x4769bf[_0xc367('0xd')]])){utils[_0xc367('0x16')](util[_0xc367('0xe')](_0xc367('0x2a'),_0x4769bf[_0xc367('0xd')]),_0x4769bf);queues[_0x4769bf['uniqueid']]['queuecallerexit']=![];queues[_0x4769bf[_0xc367('0xd')]]['queuecallerexitAt']=null;queues[_0x4769bf[_0xc367('0xd')]][_0xc367('0x27')]=!![];queues[_0x4769bf[_0xc367('0xd')]][_0xc367('0x25')]=utils[_0xc367('0x13')]();queues[_0x4769bf['uniqueid']][_0xc367('0x7')]=_0xc367('0x2b');utils['info'](util[_0xc367('0xe')](_0xc367('0x2c'),_0x4769bf[_0xc367('0xd')],queues[_0x4769bf[_0xc367('0xd')]][_0xc367('0x1c')],queues[_0x4769bf['uniqueid']][_0xc367('0x7')]));}}catch(_0xd1d3f7){utils['error'](util['format']('[%s][queues][queuecallerabandon]',_0x4769bf[_0xc367('0xd')]),_0xd1d3f7);}};exports[_0xc367('0x2d')]=function(_0x8c03c0){try{if(!_['isNil'](queues[_0x8c03c0[_0xc367('0xd')]])){utils[_0xc367('0x16')](util[_0xc367('0xe')](_0xc367('0x2e'),_0x8c03c0[_0xc367('0xd')]),_0x8c03c0);utils['info'](util[_0xc367('0xe')](_0xc367('0x2f'),_0x8c03c0['uniqueid'],queues[_0x8c03c0['uniqueid']][_0xc367('0x1c')],_0x8c03c0[_0xc367('0x30')],_0x8c03c0[_0xc367('0x31')]));queues[_0x8c03c0[_0xc367('0xd')]][_0xc367('0x2d')]=!![];queues[_0x8c03c0[_0xc367('0xd')]][_0xc367('0x17')]=utils[_0xc367('0x13')]();queues[_0x8c03c0[_0xc367('0xd')]][_0xc367('0x32')]=utils[_0xc367('0x33')](queues[_0x8c03c0[_0xc367('0xd')]]['queuecallerleaveAt'],queues[_0x8c03c0['uniqueid']][_0xc367('0x34')]);queues[_0x8c03c0[_0xc367('0xd')]]['position']=_0x8c03c0['position'];queues[_0x8c03c0[_0xc367('0xd')]][_0xc367('0x35')]=_0x8c03c0['count'];queues[_0x8c03c0[_0xc367('0xd')]][_0xc367('0x30')]=_0x8c03c0[_0xc367('0x30')];queues[_0x8c03c0[_0xc367('0xd')]][_0xc367('0x31')]=_0x8c03c0[_0xc367('0x31')];}}catch(_0x33d9ac){utils['error'](util['format']('[%s][queues][queuecallerleave]',_0x8c03c0[_0xc367('0xd')]),_0x33d9ac);}};exports[_0xc367('0x36')]=function(_0x2e8708){try{if(!_[_0xc367('0x22')](queues[_0x2e8708[_0xc367('0xd')]])){utils['debug'](util[_0xc367('0xe')](_0xc367('0x37'),_0x2e8708[_0xc367('0xd')]),_0x2e8708);utils[_0xc367('0x3')](util[_0xc367('0xe')](_0xc367('0x38'),_0x2e8708[_0xc367('0xd')],queues[_0x2e8708['uniqueid']][_0xc367('0x1c')],_0x2e8708[_0xc367('0x39')],_0x2e8708[_0xc367('0x3a')]));queues[_0x2e8708[_0xc367('0xd')]][_0xc367('0x27')]=![];queues[_0x2e8708[_0xc367('0xd')]][_0xc367('0x27')]=![];queues[_0x2e8708[_0xc367('0xd')]][_0xc367('0x25')]=null;queues[_0x2e8708['uniqueid']][_0xc367('0x18')]=![];queues[_0x2e8708[_0xc367('0xd')]][_0xc367('0x7')]=null;queues[_0x2e8708['uniqueid']][_0xc367('0x28')]=null;queues[_0x2e8708[_0xc367('0xd')]][_0xc367('0x3b')]=!![];queues[_0x2e8708[_0xc367('0xd')]][_0xc367('0x3c')]=_0x2e8708[_0xc367('0x3a')];queues[_0x2e8708['uniqueid']][_0xc367('0x6')]=_0x2e8708[_0xc367('0x39')];}}catch(_0x539208){utils[_0xc367('0x14')](util[_0xc367('0xe')](_0xc367('0x37'),_0x2e8708[_0xc367('0xd')]),_0x539208);}};exports['agentcomplete']=function(_0x175254){try{if(!_[_0xc367('0x22')](queues[_0x175254['uniqueid']])){if(queues[_0x175254[_0xc367('0xd')]][_0xc367('0x17')]){utils[_0xc367('0x16')](util[_0xc367('0xe')](_0xc367('0x3d'),_0x175254[_0xc367('0xd')]),_0x175254);queues[_0x175254[_0xc367('0xd')]][_0xc367('0x27')]=![];queues[_0x175254[_0xc367('0xd')]][_0xc367('0x27')]=![];queues[_0x175254[_0xc367('0xd')]][_0xc367('0x25')]=null;queues[_0x175254['uniqueid']][_0xc367('0x18')]=![];queues[_0x175254['uniqueid']][_0xc367('0x28')]=null;queues[_0x175254[_0xc367('0xd')]][_0xc367('0x3b')]=!![];queues[_0x175254[_0xc367('0xd')]][_0xc367('0x6')]=_0x175254['membername'];queues[_0x175254[_0xc367('0xd')]][_0xc367('0x19')]=!![];queues[_0x175254[_0xc367('0xd')]]['queuecallercompleteAt']=utils['now']();if(_0x175254[_0xc367('0x3e')]==_0xc367('0x3f')){if(!queues[_0x175254['uniqueid']][_0xc367('0x3f')]){queues[_0x175254['uniqueid']][_0xc367('0x7')]=_0xc367('0x40');}}else{queues[_0x175254[_0xc367('0xd')]][_0xc367('0x7')]=_0xc367('0x41')+_0x175254['reason']['toUpperCase']();}utils[_0xc367('0x3')](util[_0xc367('0xe')](_0xc367('0x42'),_0x175254[_0xc367('0xd')],queues[_0x175254[_0xc367('0xd')]][_0xc367('0x1c')],_0x175254[_0xc367('0x39')],queues[_0x175254[_0xc367('0xd')]][_0xc367('0x7')]));writeDB(queues[_0x175254['uniqueid']]);}}}catch(_0x347d04){utils[_0xc367('0x14')](util[_0xc367('0xe')](_0xc367('0x3d'),_0x175254[_0xc367('0xd')]),_0x347d04);}};exports['blindtransfer']=function(_0x5c81e7){try{if(!_[_0xc367('0x22')](queues[_0x5c81e7[_0xc367('0x43')]])){utils['debug'](util[_0xc367('0xe')]('[%s][queues][blindtransfer]',_0x5c81e7['uniqueid']),_0x5c81e7);queues[_0x5c81e7[_0xc367('0x43')]][_0xc367('0x3f')]=!![];queues[_0x5c81e7['transfereeuniqueid']]['transfertype']=_0xc367('0x44');queues[_0x5c81e7['transfereeuniqueid']][_0xc367('0x45')]=_0x5c81e7[_0xc367('0x46')];queues[_0x5c81e7[_0xc367('0x43')]][_0xc367('0x47')]=_0x5c81e7[_0xc367('0x43')];queues[_0x5c81e7[_0xc367('0x43')]][_0xc367('0x7')]=_0xc367('0x48');utils['info'](util[_0xc367('0xe')](_0xc367('0x49'),_0x5c81e7[_0xc367('0xd')],queues[_0x5c81e7[_0xc367('0x43')]][_0xc367('0x1c')],_0x5c81e7[_0xc367('0x43')],_0x5c81e7[_0xc367('0x46')]));}}catch(_0x45534d){utils[_0xc367('0x14')](util['format'](_0xc367('0x4a'),_0x5c81e7[_0xc367('0xd')]),_0x45534d);}};exports['attendedtransfer']=function(_0x70bd70){try{utils['debug'](util[_0xc367('0xe')](_0xc367('0x4b'),_0x70bd70['origtransfereruniqueid']),_0x70bd70);if(_0x70bd70[_0xc367('0x4c')]==_0x70bd70['origtransfererlinkedid']){if(!_[_0xc367('0x22')](queues[_0x70bd70[_0xc367('0x4d')]])){utils['info'](util[_0xc367('0xe')](_0xc367('0x4e'),_0x70bd70[_0xc367('0x4c')],queues[_0x70bd70['secondtransfererlinkedid']]['name'],_0x70bd70[_0xc367('0x4f')]));queues[_0x70bd70[_0xc367('0x4d')]]['transfer']=!![];queues[_0x70bd70[_0xc367('0x4d')]][_0xc367('0x50')]=_0xc367('0x51');queues[_0x70bd70[_0xc367('0x4d')]]['transferexten']=_0x70bd70[_0xc367('0x4f')];queues[_0x70bd70[_0xc367('0x4d')]][_0xc367('0x47')]=_0x70bd70[_0xc367('0x4c')];queues[_0x70bd70[_0xc367('0x4d')]]['queuecallerexitreason']=_0xc367('0x52');}if(!_['isNil'](queues[_0x70bd70[_0xc367('0x53')]])){if(_0x70bd70[_0xc367('0x54')]&&queues[_0x70bd70['transfereelinkedid']]){queues[_0x70bd70[_0xc367('0x54')]][_0xc367('0x1e')]=0x1;queues[_0x70bd70[_0xc367('0x43')]]=_[_0xc367('0x55')](queues[_0x70bd70['transfereelinkedid']]);queues[_0x70bd70[_0xc367('0x43')]][_0xc367('0xc')]=_0x70bd70[_0xc367('0x56')];queues[_0x70bd70[_0xc367('0x43')]][_0xc367('0x1e')]=0x2;queues[_0x70bd70[_0xc367('0x43')]]['calleridnum']=queues[_0x70bd70[_0xc367('0x4d')]][_0xc367('0x57')];queues[_0x70bd70[_0xc367('0x43')]]['calleridname']=queues[_0x70bd70[_0xc367('0x4d')]][_0xc367('0x58')];queues[_0x70bd70['transfereeuniqueid']][_0xc367('0x34')]=utils[_0xc367('0x13')]();queues[_0x70bd70[_0xc367('0x43')]][_0xc367('0x17')]=utils[_0xc367('0x13')]();queues[_0x70bd70[_0xc367('0x43')]][_0xc367('0x32')]=0x0;queues[_0x70bd70[_0xc367('0x43')]][_0xc367('0x59')]=0x0;utils[_0xc367('0x3')](util['format']('[%s][queues][attendedtransfer]\x20name:%s\x20calleridnum:%s\x20calleridname:%s',_0x70bd70[_0xc367('0x4c')],queues[_0x70bd70[_0xc367('0x43')]]['name'],queues[_0x70bd70[_0xc367('0x43')]][_0xc367('0x57')],queues[_0x70bd70[_0xc367('0x43')]][_0xc367('0x58')]));}else{utils[_0xc367('0x3')](util['format'](_0xc367('0x5a'),_0x70bd70[_0xc367('0x4c')],queues[_0x70bd70['origtransfererlinkedid']]['name'],_0x70bd70[_0xc367('0x4d')]));queues[_0x70bd70[_0xc367('0x53')]]['transfereduniqueid']=_0x70bd70['secondtransfererlinkedid'];}}}else if(_0x70bd70[_0xc367('0x5b')]==_0x70bd70[_0xc367('0x4d')]){if(!_[_0xc367('0x22')](queues[_0x70bd70[_0xc367('0x53')]])){utils[_0xc367('0x3')](util[_0xc367('0xe')](_0xc367('0x5c'),_0x70bd70[_0xc367('0x4c')],queues[_0x70bd70[_0xc367('0x53')]][_0xc367('0x1c')],_0x70bd70['secondtransfereruniqueid'],_0x70bd70[_0xc367('0x5d')]));queues[_0x70bd70[_0xc367('0x53')]][_0xc367('0x3f')]=!![];queues[_0x70bd70[_0xc367('0x53')]]['transfertype']=_0xc367('0x51');queues[_0x70bd70[_0xc367('0x53')]][_0xc367('0x45')]=_0x70bd70[_0xc367('0x5d')];queues[_0x70bd70['origtransfererlinkedid']][_0xc367('0x47')]=_0x70bd70[_0xc367('0x5b')];queues[_0x70bd70[_0xc367('0x53')]][_0xc367('0x7')]=_0xc367('0x52');}if(!_['isNil'](queues[_0x70bd70[_0xc367('0x4d')]])){if(_0x70bd70[_0xc367('0x5e')]&&queues[_0x70bd70['transfertargetlinkedid']]){queues[_0x70bd70[_0xc367('0x5e')]][_0xc367('0x1e')]=0x1;queues[_0x70bd70['transfertargetuniqueid']]=_[_0xc367('0x55')](queues[_0x70bd70[_0xc367('0x5e')]]);queues[_0x70bd70[_0xc367('0x56')]][_0xc367('0xc')]=_0x70bd70[_0xc367('0x56')];queues[_0x70bd70['transfertargetuniqueid']][_0xc367('0x1e')]=0x2;queues[_0x70bd70[_0xc367('0x56')]][_0xc367('0x57')]=queues[_0x70bd70['origtransfererlinkedid']]['calleridnum'];queues[_0x70bd70[_0xc367('0x56')]][_0xc367('0x58')]=queues[_0x70bd70[_0xc367('0x53')]]['calleridname'];queues[_0x70bd70['transfertargetuniqueid']][_0xc367('0x34')]=utils[_0xc367('0x13')]();queues[_0x70bd70[_0xc367('0x56')]][_0xc367('0x17')]=utils[_0xc367('0x13')]();queues[_0x70bd70[_0xc367('0x56')]][_0xc367('0x32')]=0x0;queues[_0x70bd70[_0xc367('0x56')]][_0xc367('0x59')]=0x0;utils[_0xc367('0x3')](util[_0xc367('0xe')](_0xc367('0x5f'),_0x70bd70[_0xc367('0x4c')],queues[_0x70bd70[_0xc367('0x56')]][_0xc367('0x1c')],queues[_0x70bd70['transfertargetuniqueid']][_0xc367('0xc')],queues[_0x70bd70[_0xc367('0x56')]]['calleridnum'],queues[_0x70bd70[_0xc367('0x56')]][_0xc367('0x58')]));}else{utils['info'](util[_0xc367('0xe')](_0xc367('0x5a'),_0x70bd70[_0xc367('0x4c')],queues[_0x70bd70[_0xc367('0x4d')]]['name'],_0x70bd70[_0xc367('0x53')]));queues[_0x70bd70[_0xc367('0x4d')]][_0xc367('0xc')]=_0x70bd70['origtransfererlinkedid'];}}}}catch(_0xbb8623){utils[_0xc367('0x14')](util['format']('[%s][queues][attendedtransfer]',_0x70bd70[_0xc367('0x4c')]),_0xbb8623);}};exports[_0xc367('0x60')]=function(_0x490665){try{if(!_[_0xc367('0x22')](queues[_0x490665[_0xc367('0xd')]])){utils[_0xc367('0x16')](util[_0xc367('0xe')](_0xc367('0x61'),_0x490665['uniqueid']),_0x490665);queues[_0x490665['uniqueid']][_0xc367('0x62')]=utils[_0xc367('0x13')]();utils[_0xc367('0x3')](util[_0xc367('0xe')](_0xc367('0x63'),_0x490665['uniqueid'],queues[_0x490665[_0xc367('0xd')]][_0xc367('0x1c')],queues[_0x490665[_0xc367('0xd')]][_0xc367('0x62')]));}}catch(_0x1ce0e2){utils[_0xc367('0x14')](util[_0xc367('0xe')](_0xc367('0x61'),_0x490665[_0xc367('0xd')]),_0x1ce0e2);}};exports[_0xc367('0x64')]=function(_0x1055fe){try{if(!_[_0xc367('0x22')](queues[_0x1055fe[_0xc367('0xd')]])){if(!_[_0xc367('0x22')](queues[_0x1055fe[_0xc367('0xd')]][_0xc367('0x62')])){utils['debug'](util[_0xc367('0xe')](_0xc367('0x65'),_0x1055fe[_0xc367('0xd')]),_0x1055fe);queues[_0x1055fe['uniqueid']][_0xc367('0x59')]+=utils[_0xc367('0x33')](utils['now'](),queues[_0x1055fe[_0xc367('0xd')]][_0xc367('0x62')]);utils[_0xc367('0x3')](util[_0xc367('0xe')](_0xc367('0x66'),_0x1055fe[_0xc367('0xd')],queues[_0x1055fe[_0xc367('0xd')]][_0xc367('0x1c')],queues[_0x1055fe[_0xc367('0xd')]][_0xc367('0x59')]));delete queues[_0x1055fe[_0xc367('0xd')]][_0xc367('0x62')];}}}catch(_0x2b8289){utils[_0xc367('0x14')](util[_0xc367('0xe')]('[%s][queues][musiconholdstop]',_0x1055fe['uniqueid']),_0x2b8289);}}; \ No newline at end of file diff --git a/server/services/xdr/recordings.controller.js b/server/services/xdr/recordings.controller.js index 2c9c2bb..7875c95 100644 --- a/server/services/xdr/recordings.controller.js +++ b/server/services/xdr/recordings.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x88a6=['mixmonitor_filename','[%s][recordings][varset]\x20variable:%s\x20value:%s','value','.wav49','replace','.WAV','find','monitors','push','[%s][recordings][varset]','hangup','[%s][recordings][hangup]\x20calleridnum:%s\x20calleridname:%s\x20reason:%s','calleridnum','cause-txt','calleridname','connectedlinenum','connectedlinename','type','outbound','forEach','clone','[%s][recordings][hangup]','newexten','[%s][recordings][newexten]','[%s][recordings][newexten]\x20application:%s\x20appdata:%s','application','appdata','toLowerCase','set','startsWith','cdr','substring','queuecallerjoin','[%s][recordings][queuecallerjoin]','queue','lodash','getUserByInternal','then','membername','name','UserId','request','CreateVoiceRecording','newchannel','debug','format','[%s][recordings][newchannel]','uniqueid','linkedid','[%s][recordings][newchannel]\x20context:%s\x20exten:%s','context','exten','accountcode','channel','error','isNil','channelstate','info','[%s][recordings][newstate]\x20context:%s\x20channel:%s','transfer','[%s][recordings][newstate]\x20linkedid:%s\x20context:%s\x20channel:%s','[%s][recordings][newstate]','variable'];(function(_0x4a0e68,_0x45c08c){var _0x4fb274=function(_0x5f36b1){while(--_0x5f36b1){_0x4a0e68['push'](_0x4a0e68['shift']());}};_0x4fb274(++_0x45c08c);}(_0x88a6,0x19d));var _0x688a=function(_0x2cad1d,_0x95a8c7){_0x2cad1d=_0x2cad1d-0x0;var _0x4a900c=_0x88a6[_0x2cad1d];return _0x4a900c;};'use strict';var _=require(_0x688a('0x0'));var util=require('util');var utils=require('./utils');var recordings={};function writeDB(_0x4cc0ac){utils['info'](util['format']('[%s][recordings][writeDB]',_0x4cc0ac['uniqueid']));if(_0x4cc0ac['accountcode']){utils[_0x688a('0x1')](_0x4cc0ac['accountcode'])[_0x688a('0x2')](function(_0x474f21){if(_0x474f21){_0x4cc0ac[_0x688a('0x3')]=_0x474f21[_0x688a('0x4')];_0x4cc0ac[_0x688a('0x5')]=_0x474f21['id'];}utils[_0x688a('0x6')](_0x688a('0x7'),_0x4cc0ac);});}else{utils[_0x688a('0x6')]('CreateVoiceRecording',_0x4cc0ac);}}exports[_0x688a('0x8')]=function(_0xa55b09){try{utils[_0x688a('0x9')](util[_0x688a('0xa')](_0x688a('0xb'),_0xa55b09[_0x688a('0xc')]),_0xa55b09);if(_0xa55b09[_0x688a('0xc')]==_0xa55b09[_0x688a('0xd')]){utils['info'](util[_0x688a('0xa')](_0x688a('0xe'),_0xa55b09['uniqueid'],_0xa55b09[_0x688a('0xf')],_0xa55b09[_0x688a('0x10')]));recordings[_0xa55b09['uniqueid']]={'uniqueid':_0xa55b09[_0x688a('0xc')],'accountcode':_0xa55b09[_0x688a('0x11')],'exten':_0xa55b09[_0x688a('0x10')],'context':_0xa55b09['context'],'channel':_0xa55b09[_0x688a('0x12')],'monitors':[]};}}catch(_0x5858ad){utils[_0x688a('0x13')](util['format'](_0x688a('0xb'),_0xa55b09['uniqueid']),_0x5858ad);}};exports['newstate']=function(_0x384ffb){try{utils['debug'](util[_0x688a('0xa')]('[%s][recordings][newstate]',_0x384ffb[_0x688a('0xc')]),_0x384ffb);if(!_[_0x688a('0x14')](recordings[_0x384ffb['uniqueid']])&&_0x384ffb[_0x688a('0x15')]==0x6){utils[_0x688a('0x16')](util[_0x688a('0xa')](_0x688a('0x17'),_0x384ffb['uniqueid'],_0x384ffb[_0x688a('0xf')],_0x384ffb['channel']));}else if(!_[_0x688a('0x14')](recordings[_0x384ffb[_0x688a('0xd')]])&&_0x384ffb[_0x688a('0x15')]==0x6&&_0x384ffb['context']!=_0x688a('0x18')){utils[_0x688a('0x16')](util[_0x688a('0xa')](_0x688a('0x19'),_0x384ffb[_0x688a('0xc')],_0x384ffb[_0x688a('0xd')],_0x384ffb[_0x688a('0xf')],_0x384ffb[_0x688a('0x12')]));recordings[_0x384ffb[_0x688a('0xd')]]['accountcode']=_0x384ffb['accountcode'];}}catch(_0x3e21fe){utils[_0x688a('0x13')](util[_0x688a('0xa')](_0x688a('0x1a'),_0x384ffb[_0x688a('0xc')]),_0x3e21fe);}};exports['varset']=function(_0x29f05b){try{if(!_[_0x688a('0x14')](_0x29f05b[_0x688a('0x1b')])&&!_[_0x688a('0x14')](_0x29f05b[_0x688a('0x1b')][_0x688a('0x1c')])){utils[_0x688a('0x9')](util['format']('[%s][recordings][varset]',_0x29f05b[_0x688a('0xc')]),_0x29f05b);utils[_0x688a('0x16')](util[_0x688a('0xa')](_0x688a('0x1d'),_0x29f05b['uniqueid'],_0x29f05b['variable'],_0x29f05b[_0x688a('0x1e')]));if(_['endsWith'](_0x29f05b['value'],_0x688a('0x1f'))){_0x29f05b[_0x688a('0x1e')]=_0x29f05b[_0x688a('0x1e')][_0x688a('0x20')](_0x688a('0x1f'),_0x688a('0x21'));}if(recordings[_0x29f05b[_0x688a('0xd')]]){var _0x13237a=_[_0x688a('0x22')](recordings[_0x29f05b[_0x688a('0xd')]][_0x688a('0x23')],{'value':_0x29f05b[_0x688a('0x1e')]});if(_[_0x688a('0x14')](_0x13237a)){recordings[_0x29f05b[_0x688a('0xd')]][_0x688a('0x23')][_0x688a('0x24')]({'value':_0x29f05b['value']});}}}}catch(_0x4a934a){utils[_0x688a('0x13')](util[_0x688a('0xa')](_0x688a('0x25'),_0x29f05b[_0x688a('0xc')]),_0x4a934a);}};exports[_0x688a('0x26')]=function(_0x303764){try{if(!_[_0x688a('0x14')](recordings[_0x303764[_0x688a('0xc')]])){utils[_0x688a('0x9')](util[_0x688a('0xa')]('[%s][recordings][hangup]',_0x303764['uniqueid']),_0x303764);utils['info'](util[_0x688a('0xa')](_0x688a('0x27'),_0x303764['uniqueid'],_0x303764[_0x688a('0x28')],_0x303764['calleridname'],_0x303764[_0x688a('0x29')]));recordings[_0x303764[_0x688a('0xc')]][_0x688a('0x28')]=_0x303764[_0x688a('0x28')];recordings[_0x303764[_0x688a('0xc')]][_0x688a('0x2a')]=_0x303764['calleridname'];recordings[_0x303764[_0x688a('0xc')]][_0x688a('0x2b')]=_0x303764[_0x688a('0x2b')];recordings[_0x303764[_0x688a('0xc')]][_0x688a('0x2c')]=_0x303764[_0x688a('0x2c')];if(recordings[_0x303764[_0x688a('0xc')]][_0x688a('0x2d')]==_0x688a('0x2e')&&recordings[_0x303764[_0x688a('0xc')]][_0x688a('0x11')]){recordings[_0x303764[_0x688a('0xc')]][_0x688a('0x2b')]=recordings[_0x303764[_0x688a('0xc')]][_0x688a('0x11')];recordings[_0x303764['uniqueid']][_0x688a('0x2c')]='';}recordings[_0x303764[_0x688a('0xc')]][_0x688a('0x23')][_0x688a('0x2f')](function(_0x3a5fab){var _0x176af5=_[_0x688a('0x30')](recordings[_0x303764[_0x688a('0xc')]]);_0x176af5['value']=_0x3a5fab[_0x688a('0x1e')];writeDB(_0x176af5);});delete recordings[_0x303764[_0x688a('0xc')]];}}catch(_0x30824a){utils['error'](util['format'](_0x688a('0x31'),_0x303764[_0x688a('0xc')]),_0x30824a);}};exports[_0x688a('0x32')]=function(_0x254ca0){try{if(!_[_0x688a('0x14')](recordings[_0x254ca0[_0x688a('0xc')]])){utils[_0x688a('0x9')](util[_0x688a('0xa')](_0x688a('0x33'),_0x254ca0[_0x688a('0xc')]),_0x254ca0);utils[_0x688a('0x16')](util['format'](_0x688a('0x34'),_0x254ca0[_0x688a('0xc')],_0x254ca0[_0x688a('0x35')],_0x254ca0[_0x688a('0x36')]));if(_0x254ca0[_0x688a('0x35')][_0x688a('0x37')]()==_0x688a('0x38')&&_[_0x688a('0x39')](_0x254ca0[_0x688a('0x36')][_0x688a('0x37')](),_0x688a('0x3a'))){var _0x348144=_0x254ca0['appdata']['split']('=');var _0x388290=_0x348144[0x0][_0x688a('0x3b')](_0x348144[0x0]['lastIndexOf']('(')+0x1,_0x348144[0x0]['lastIndexOf'](')'));var _0x1529f0=_0x348144[0x1];recordings[_0x254ca0[_0x688a('0xc')]][_0x388290]=_0x1529f0;}}}catch(_0x474dea){utils[_0x688a('0x13')](util[_0x688a('0xa')]('[%s][recordings][newexten]',_0x254ca0[_0x688a('0xc')]),_0x474dea);}};exports[_0x688a('0x3c')]=function(_0x4e10b7){try{if(!_[_0x688a('0x14')](recordings[_0x4e10b7[_0x688a('0xc')]])){utils['debug'](util[_0x688a('0xa')](_0x688a('0x3d'),_0x4e10b7[_0x688a('0xc')]),_0x4e10b7);utils[_0x688a('0x16')](util[_0x688a('0xa')]('[%s][recordings][queuecallerjoin]\x20queue:%s',_0x4e10b7['uniqueid'],_0x4e10b7['queue']));recordings[_0x4e10b7[_0x688a('0xc')]][_0x688a('0x3e')]=_0x4e10b7[_0x688a('0x3e')];}}catch(_0x22920b){utils[_0x688a('0x13')](util[_0x688a('0xa')](_0x688a('0x3d'),_0x4e10b7[_0x688a('0xc')]),_0x22920b);}}; \ No newline at end of file +var _0xb383=['then','membername','UserId','request','CreateVoiceRecording','newchannel','debug','linkedid','[%s][recordings][newchannel]\x20context:%s\x20exten:%s','exten','channel','error','[%s][recordings][newchannel]','newstate','isNil','channelstate','[%s][recordings][newstate]\x20context:%s\x20channel:%s','context','transfer','varset','variable','mixmonitor_filename','[%s][recordings][varset]','endsWith','.wav49','value','replace','.WAV','find','monitors','push','hangup','[%s][recordings][hangup]','[%s][recordings][hangup]\x20calleridnum:%s\x20calleridname:%s\x20reason:%s','calleridnum','cause-txt','calleridname','connectedlinenum','connectedlinename','type','forEach','clone','newexten','[%s][recordings][newexten]','[%s][recordings][newexten]\x20application:%s\x20appdata:%s','application','toLowerCase','set','startsWith','appdata','split','substring','lastIndexOf','[%s][recordings][queuecallerjoin]','[%s][recordings][queuecallerjoin]\x20queue:%s','queue','lodash','./utils','info','format','[%s][recordings][writeDB]','uniqueid','accountcode','getUserByInternal'];(function(_0x9f56d4,_0x1b8dcf){var _0xbd836f=function(_0x1f1b34){while(--_0x1f1b34){_0x9f56d4['push'](_0x9f56d4['shift']());}};_0xbd836f(++_0x1b8dcf);}(_0xb383,0x138));var _0x3b38=function(_0xde4fa9,_0x534332){_0xde4fa9=_0xde4fa9-0x0;var _0x308c3d=_0xb383[_0xde4fa9];return _0x308c3d;};'use strict';var _=require(_0x3b38('0x0'));var util=require('util');var utils=require(_0x3b38('0x1'));var recordings={};function writeDB(_0x35f4af){utils[_0x3b38('0x2')](util[_0x3b38('0x3')](_0x3b38('0x4'),_0x35f4af[_0x3b38('0x5')]));if(_0x35f4af[_0x3b38('0x6')]){utils[_0x3b38('0x7')](_0x35f4af[_0x3b38('0x6')])[_0x3b38('0x8')](function(_0x490e1e){if(_0x490e1e){_0x35f4af[_0x3b38('0x9')]=_0x490e1e['name'];_0x35f4af[_0x3b38('0xa')]=_0x490e1e['id'];}utils[_0x3b38('0xb')](_0x3b38('0xc'),_0x35f4af);});}else{utils['request'](_0x3b38('0xc'),_0x35f4af);}}exports[_0x3b38('0xd')]=function(_0x3489be){try{utils[_0x3b38('0xe')](util[_0x3b38('0x3')]('[%s][recordings][newchannel]',_0x3489be[_0x3b38('0x5')]),_0x3489be);if(_0x3489be['uniqueid']==_0x3489be[_0x3b38('0xf')]){utils[_0x3b38('0x2')](util[_0x3b38('0x3')](_0x3b38('0x10'),_0x3489be[_0x3b38('0x5')],_0x3489be['context'],_0x3489be[_0x3b38('0x11')]));recordings[_0x3489be[_0x3b38('0x5')]]={'uniqueid':_0x3489be[_0x3b38('0x5')],'accountcode':_0x3489be[_0x3b38('0x6')],'exten':_0x3489be[_0x3b38('0x11')],'context':_0x3489be['context'],'channel':_0x3489be[_0x3b38('0x12')],'monitors':[]};}}catch(_0x1f91c0){utils[_0x3b38('0x13')](util[_0x3b38('0x3')](_0x3b38('0x14'),_0x3489be[_0x3b38('0x5')]),_0x1f91c0);}};exports[_0x3b38('0x15')]=function(_0x525a43){try{utils[_0x3b38('0xe')](util['format']('[%s][recordings][newstate]',_0x525a43[_0x3b38('0x5')]),_0x525a43);if(!_[_0x3b38('0x16')](recordings[_0x525a43[_0x3b38('0x5')]])&&_0x525a43[_0x3b38('0x17')]==0x6){utils['info'](util[_0x3b38('0x3')](_0x3b38('0x18'),_0x525a43[_0x3b38('0x5')],_0x525a43['context'],_0x525a43[_0x3b38('0x12')]));}else if(!_['isNil'](recordings[_0x525a43[_0x3b38('0xf')]])&&_0x525a43[_0x3b38('0x17')]==0x6&&_0x525a43[_0x3b38('0x19')]!=_0x3b38('0x1a')){utils['info'](util[_0x3b38('0x3')]('[%s][recordings][newstate]\x20linkedid:%s\x20context:%s\x20channel:%s',_0x525a43[_0x3b38('0x5')],_0x525a43[_0x3b38('0xf')],_0x525a43['context'],_0x525a43['channel']));recordings[_0x525a43['linkedid']][_0x3b38('0x6')]=_0x525a43[_0x3b38('0x6')];}}catch(_0x192881){utils[_0x3b38('0x13')](util[_0x3b38('0x3')]('[%s][recordings][newstate]',_0x525a43[_0x3b38('0x5')]),_0x192881);}};exports[_0x3b38('0x1b')]=function(_0x5cdcfd){try{if(!_['isNil'](_0x5cdcfd[_0x3b38('0x1c')])&&!_[_0x3b38('0x16')](_0x5cdcfd['variable'][_0x3b38('0x1d')])){utils[_0x3b38('0xe')](util[_0x3b38('0x3')](_0x3b38('0x1e'),_0x5cdcfd[_0x3b38('0x5')]),_0x5cdcfd);utils['info'](util[_0x3b38('0x3')]('[%s][recordings][varset]\x20variable:%s\x20value:%s',_0x5cdcfd[_0x3b38('0x5')],_0x5cdcfd[_0x3b38('0x1c')],_0x5cdcfd['value']));if(_[_0x3b38('0x1f')](_0x5cdcfd['value'],_0x3b38('0x20'))){_0x5cdcfd['value']=_0x5cdcfd[_0x3b38('0x21')][_0x3b38('0x22')](_0x3b38('0x20'),_0x3b38('0x23'));}if(recordings[_0x5cdcfd[_0x3b38('0xf')]]){var _0xd0874c=_[_0x3b38('0x24')](recordings[_0x5cdcfd[_0x3b38('0xf')]][_0x3b38('0x25')],{'value':_0x5cdcfd[_0x3b38('0x21')]});if(_[_0x3b38('0x16')](_0xd0874c)){recordings[_0x5cdcfd[_0x3b38('0xf')]][_0x3b38('0x25')][_0x3b38('0x26')]({'value':_0x5cdcfd[_0x3b38('0x21')]});}}}}catch(_0x9281e4){utils[_0x3b38('0x13')](util[_0x3b38('0x3')]('[%s][recordings][varset]',_0x5cdcfd[_0x3b38('0x5')]),_0x9281e4);}};exports[_0x3b38('0x27')]=function(_0x1d776b){try{if(!_[_0x3b38('0x16')](recordings[_0x1d776b[_0x3b38('0x5')]])){utils[_0x3b38('0xe')](util[_0x3b38('0x3')](_0x3b38('0x28'),_0x1d776b[_0x3b38('0x5')]),_0x1d776b);utils[_0x3b38('0x2')](util[_0x3b38('0x3')](_0x3b38('0x29'),_0x1d776b[_0x3b38('0x5')],_0x1d776b[_0x3b38('0x2a')],_0x1d776b['calleridname'],_0x1d776b[_0x3b38('0x2b')]));recordings[_0x1d776b['uniqueid']][_0x3b38('0x2a')]=_0x1d776b[_0x3b38('0x2a')];recordings[_0x1d776b[_0x3b38('0x5')]][_0x3b38('0x2c')]=_0x1d776b['calleridname'];recordings[_0x1d776b['uniqueid']][_0x3b38('0x2d')]=_0x1d776b[_0x3b38('0x2d')];recordings[_0x1d776b['uniqueid']][_0x3b38('0x2e')]=_0x1d776b[_0x3b38('0x2e')];if(recordings[_0x1d776b[_0x3b38('0x5')]][_0x3b38('0x2f')]=='outbound'&&recordings[_0x1d776b[_0x3b38('0x5')]][_0x3b38('0x6')]){recordings[_0x1d776b[_0x3b38('0x5')]][_0x3b38('0x2d')]=recordings[_0x1d776b[_0x3b38('0x5')]][_0x3b38('0x6')];recordings[_0x1d776b[_0x3b38('0x5')]]['connectedlinename']='';}recordings[_0x1d776b[_0x3b38('0x5')]][_0x3b38('0x25')][_0x3b38('0x30')](function(_0x17ceae){var _0x536ff5=_[_0x3b38('0x31')](recordings[_0x1d776b[_0x3b38('0x5')]]);_0x536ff5['value']=_0x17ceae[_0x3b38('0x21')];writeDB(_0x536ff5);});delete recordings[_0x1d776b[_0x3b38('0x5')]];}}catch(_0x30aa4d){utils[_0x3b38('0x13')](util[_0x3b38('0x3')](_0x3b38('0x28'),_0x1d776b[_0x3b38('0x5')]),_0x30aa4d);}};exports[_0x3b38('0x32')]=function(_0x399cfb){try{if(!_[_0x3b38('0x16')](recordings[_0x399cfb[_0x3b38('0x5')]])){utils[_0x3b38('0xe')](util[_0x3b38('0x3')](_0x3b38('0x33'),_0x399cfb[_0x3b38('0x5')]),_0x399cfb);utils[_0x3b38('0x2')](util['format'](_0x3b38('0x34'),_0x399cfb['uniqueid'],_0x399cfb[_0x3b38('0x35')],_0x399cfb['appdata']));if(_0x399cfb[_0x3b38('0x35')][_0x3b38('0x36')]()==_0x3b38('0x37')&&_[_0x3b38('0x38')](_0x399cfb[_0x3b38('0x39')][_0x3b38('0x36')](),'cdr')){var _0x3c942c=_0x399cfb['appdata'][_0x3b38('0x3a')]('=');var _0x1f7ab6=_0x3c942c[0x0][_0x3b38('0x3b')](_0x3c942c[0x0][_0x3b38('0x3c')]('(')+0x1,_0x3c942c[0x0][_0x3b38('0x3c')](')'));var _0xe8e720=_0x3c942c[0x1];recordings[_0x399cfb[_0x3b38('0x5')]][_0x1f7ab6]=_0xe8e720;}}}catch(_0xade1bd){utils[_0x3b38('0x13')](util[_0x3b38('0x3')](_0x3b38('0x33'),_0x399cfb[_0x3b38('0x5')]),_0xade1bd);}};exports['queuecallerjoin']=function(_0x2c8337){try{if(!_[_0x3b38('0x16')](recordings[_0x2c8337[_0x3b38('0x5')]])){utils[_0x3b38('0xe')](util[_0x3b38('0x3')](_0x3b38('0x3d'),_0x2c8337[_0x3b38('0x5')]),_0x2c8337);utils[_0x3b38('0x2')](util[_0x3b38('0x3')](_0x3b38('0x3e'),_0x2c8337['uniqueid'],_0x2c8337['queue']));recordings[_0x2c8337[_0x3b38('0x5')]][_0x3b38('0x3f')]=_0x2c8337[_0x3b38('0x3f')];}}catch(_0x395bbf){utils[_0x3b38('0x13')](util[_0x3b38('0x3')](_0x3b38('0x3d'),_0x2c8337[_0x3b38('0x5')]),_0x395bbf);}}; \ No newline at end of file diff --git a/server/services/xdr/transfers.controller.js b/server/services/xdr/transfers.controller.js index 412451e..700b287 100644 --- a/server/services/xdr/transfers.controller.js +++ b/server/services/xdr/transfers.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x53fa=['secondtransferercontext','secondtransfererexten','origtransfererlinkedid','origtransferercontext','isNil','transfereechannel','assign','transfertargetcalleridnum','transfertargetconnectedlinenum','transfertargetaccountcode','transfertargetcontext','transfertargetexten','transfertargetlinkedid','lodash','util','./utils','[%s][transfers][writeDB]\x20type:%s','type','attended','uniqueid','request','CreateVoiceTransferReport','blinds','debug','format','[%s][transfers][blindtransfer]','info','[%s][transfers][blindtransfer]\x20transferercalleridnum:%s\x20transferercalleridname:%s\x20transfereecalleridnum:%s\x20transfereecalleridname:%s','transferercalleridnum','transferercalleridname','transfereecalleridnum','transfereecalleridname','blind','transfereruniqueid','error','attendedtransfer','origtransfereruniqueid','[%s][transfers][attendedtransfer]\x20transferercalleridnum:%s\x20transferercalleridname:%s\x20transfereecalleridnum:%s\x20transfereecalleridname:%s','origtransferercalleridnum','origtransferercalleridname','transfertargetcalleridname','origtransfererchannel','secondtransfererconnectedlinenum','secondtransfererconnectedlinename','origtransfereraccountcode'];(function(_0x15e63c,_0x367e2d){var _0x575109=function(_0x43af4a){while(--_0x43af4a){_0x15e63c['push'](_0x15e63c['shift']());}};_0x575109(++_0x367e2d);}(_0x53fa,0x94));var _0xa53f=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x53fa[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0xa53f('0x0'));var util=require(_0xa53f('0x1'));var utils=require(_0xa53f('0x2'));function writeDB(_0x30fbcc){utils['info'](util['format'](_0xa53f('0x3'),_0x30fbcc[_0xa53f('0x4')]===_0xa53f('0x5')?_0x30fbcc['origtransfereruniqueid']:_0x30fbcc[_0xa53f('0x6')],_0x30fbcc[_0xa53f('0x4')]));utils[_0xa53f('0x7')](_0xa53f('0x8'),_0x30fbcc);}exports[_0xa53f('0x9')]={};exports['blindtransfer']=function(_0x1d20ce){try{utils[_0xa53f('0xa')](util[_0xa53f('0xb')](_0xa53f('0xc'),_0x1d20ce[_0xa53f('0x6')]),_0x1d20ce);utils[_0xa53f('0xd')](util[_0xa53f('0xb')](_0xa53f('0xe'),_0x1d20ce['uniqueid'],_0x1d20ce[_0xa53f('0xf')],_0x1d20ce[_0xa53f('0x10')],_0x1d20ce[_0xa53f('0x11')],_0x1d20ce[_0xa53f('0x12')]));_0x1d20ce[_0xa53f('0x4')]=_0xa53f('0x13');exports[_0xa53f('0x9')][_0x1d20ce[_0xa53f('0x14')]]=_0x1d20ce;writeDB(_0x1d20ce);}catch(_0x47a8f7){utils[_0xa53f('0x15')](util[_0xa53f('0xb')]('[%s][transfers][blindtransfer]',_0x1d20ce['uniqueid']),_0x47a8f7);}};exports[_0xa53f('0x16')]=function(_0x27c8a2){try{utils[_0xa53f('0xa')](util[_0xa53f('0xb')]('[%s][transfers][attendedtransfer]',_0x27c8a2[_0xa53f('0x17')]),_0x27c8a2);utils[_0xa53f('0xd')](util[_0xa53f('0xb')](_0xa53f('0x18'),_0x27c8a2[_0xa53f('0x17')],_0x27c8a2[_0xa53f('0x19')],_0x27c8a2[_0xa53f('0x1a')],_0x27c8a2['transfertargetcalleridnum'],_0x27c8a2[_0xa53f('0x1b')]));_0x27c8a2=_['assign'](_0x27c8a2,{'transfererchannel':_0x27c8a2[_0xa53f('0x1c')],'transferercalleridnum':_0x27c8a2[_0xa53f('0x19')],'transferercalleridname':_0x27c8a2[_0xa53f('0x1a')],'transfererconnectedlinenum':_0x27c8a2[_0xa53f('0x1d')],'transfererconnectedlinename':_0x27c8a2[_0xa53f('0x1e')],'transfereraccountcode':_0x27c8a2[_0xa53f('0x1f')],'transferercontext':_0x27c8a2[_0xa53f('0x20')],'transfererexten':_0x27c8a2[_0xa53f('0x21')],'transfererlinkedid':_0x27c8a2[_0xa53f('0x22')],'context':_0x27c8a2[_0xa53f('0x23')],'extension':_0x27c8a2['origtransfererexten'],'type':_0xa53f('0x5')});if(_[_0xa53f('0x24')](_0x27c8a2[_0xa53f('0x25')])){_0x27c8a2=_[_0xa53f('0x26')](_0x27c8a2,{'transfereechannel':_0x27c8a2['transfertargetchannel'],'transfereecalleridnum':_0x27c8a2[_0xa53f('0x27')],'transfereecalleridname':_0x27c8a2[_0xa53f('0x1b')],'transfereeconnectedlinenum':_0x27c8a2[_0xa53f('0x28')],'transfereeconnectedlinename':_0x27c8a2['transfertargetconnectedlinename'],'transfereeaccountcode':_0x27c8a2[_0xa53f('0x29')],'transfereecontext':_0x27c8a2[_0xa53f('0x2a')],'transfereeexten':_0x27c8a2[_0xa53f('0x2b')],'transfereelinkedid':_0x27c8a2[_0xa53f('0x2c')]});}writeDB(_0x27c8a2);}catch(_0x536ce0){utils[_0xa53f('0x15')](util[_0xa53f('0xb')]('[%s][transfers][attendedtransfer]',_0x27c8a2[_0xa53f('0x17')]),_0x536ce0);}}; \ No newline at end of file +var _0x9001=['debug','[%s][transfers][attendedtransfer]\x20transferercalleridnum:%s\x20transferercalleridname:%s\x20transfereecalleridnum:%s\x20transfereecalleridname:%s','origtransferercalleridnum','transfertargetcalleridname','assign','origtransferercalleridname','secondtransfererconnectedlinename','secondtransferercontext','secondtransfererexten','origtransfererexten','transfereechannel','transfertargetcalleridnum','transfertargetconnectedlinename','transfertargetaccountcode','transfertargetcontext','transfertargetlinkedid','util','./utils','info','[%s][transfers][writeDB]\x20type:%s','type','origtransfereruniqueid','uniqueid','request','CreateVoiceTransferReport','blinds','[%s][transfers][blindtransfer]','format','[%s][transfers][blindtransfer]\x20transferercalleridnum:%s\x20transferercalleridname:%s\x20transfereecalleridnum:%s\x20transfereecalleridname:%s','transferercalleridnum','transferercalleridname','transfereecalleridnum','transfereecalleridname','blind','transfereruniqueid','error','attendedtransfer'];(function(_0x32d794,_0x4e4442){var _0x18d14c=function(_0x316a6c){while(--_0x316a6c){_0x32d794['push'](_0x32d794['shift']());}};_0x18d14c(++_0x4e4442);}(_0x9001,0x7f));var _0x1900=function(_0x39404c,_0x4d27d4){_0x39404c=_0x39404c-0x0;var _0x372801=_0x9001[_0x39404c];return _0x372801;};'use strict';var _=require('lodash');var util=require(_0x1900('0x0'));var utils=require(_0x1900('0x1'));function writeDB(_0x49888d){utils[_0x1900('0x2')](util['format'](_0x1900('0x3'),_0x49888d[_0x1900('0x4')]==='attended'?_0x49888d[_0x1900('0x5')]:_0x49888d[_0x1900('0x6')],_0x49888d[_0x1900('0x4')]));utils[_0x1900('0x7')](_0x1900('0x8'),_0x49888d);}exports[_0x1900('0x9')]={};exports['blindtransfer']=function(_0x1cd813){try{utils['debug'](util['format'](_0x1900('0xa'),_0x1cd813['uniqueid']),_0x1cd813);utils[_0x1900('0x2')](util[_0x1900('0xb')](_0x1900('0xc'),_0x1cd813[_0x1900('0x6')],_0x1cd813[_0x1900('0xd')],_0x1cd813[_0x1900('0xe')],_0x1cd813[_0x1900('0xf')],_0x1cd813[_0x1900('0x10')]));_0x1cd813[_0x1900('0x4')]=_0x1900('0x11');exports[_0x1900('0x9')][_0x1cd813[_0x1900('0x12')]]=_0x1cd813;writeDB(_0x1cd813);}catch(_0x5df9a5){utils[_0x1900('0x13')](util[_0x1900('0xb')](_0x1900('0xa'),_0x1cd813['uniqueid']),_0x5df9a5);}};exports[_0x1900('0x14')]=function(_0x5d3fc3){try{utils[_0x1900('0x15')](util['format']('[%s][transfers][attendedtransfer]',_0x5d3fc3[_0x1900('0x5')]),_0x5d3fc3);utils[_0x1900('0x2')](util['format'](_0x1900('0x16'),_0x5d3fc3[_0x1900('0x5')],_0x5d3fc3[_0x1900('0x17')],_0x5d3fc3['origtransferercalleridname'],_0x5d3fc3['transfertargetcalleridnum'],_0x5d3fc3[_0x1900('0x18')]));_0x5d3fc3=_[_0x1900('0x19')](_0x5d3fc3,{'transfererchannel':_0x5d3fc3['origtransfererchannel'],'transferercalleridnum':_0x5d3fc3[_0x1900('0x17')],'transferercalleridname':_0x5d3fc3[_0x1900('0x1a')],'transfererconnectedlinenum':_0x5d3fc3['secondtransfererconnectedlinenum'],'transfererconnectedlinename':_0x5d3fc3[_0x1900('0x1b')],'transfereraccountcode':_0x5d3fc3['origtransfereraccountcode'],'transferercontext':_0x5d3fc3[_0x1900('0x1c')],'transfererexten':_0x5d3fc3[_0x1900('0x1d')],'transfererlinkedid':_0x5d3fc3['origtransfererlinkedid'],'context':_0x5d3fc3['origtransferercontext'],'extension':_0x5d3fc3[_0x1900('0x1e')],'type':'attended'});if(_['isNil'](_0x5d3fc3[_0x1900('0x1f')])){_0x5d3fc3=_[_0x1900('0x19')](_0x5d3fc3,{'transfereechannel':_0x5d3fc3['transfertargetchannel'],'transfereecalleridnum':_0x5d3fc3[_0x1900('0x20')],'transfereecalleridname':_0x5d3fc3[_0x1900('0x18')],'transfereeconnectedlinenum':_0x5d3fc3['transfertargetconnectedlinenum'],'transfereeconnectedlinename':_0x5d3fc3[_0x1900('0x21')],'transfereeaccountcode':_0x5d3fc3[_0x1900('0x22')],'transfereecontext':_0x5d3fc3[_0x1900('0x23')],'transfereeexten':_0x5d3fc3['transfertargetexten'],'transfereelinkedid':_0x5d3fc3[_0x1900('0x24')]});}writeDB(_0x5d3fc3);}catch(_0x32855b){utils['error'](util[_0x1900('0xb')]('[%s][transfers][attendedtransfer]',_0x5d3fc3[_0x1900('0x5')]),_0x32855b);}}; \ No newline at end of file diff --git a/server/services/xdr/utils.js b/server/services/xdr/utils.js index a603baf..295033d 100644 --- a/server/services/xdr/utils.js +++ b/server/services/xdr/utils.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x15b8=['length','getUserByInternal','[utils][getUserByInternal]\x20internal:%s\x20%s','found','[utils][getUserByInternal]','[utils][getUserByInterface]\x20interface:%s\x20%s','catch','[utils][getUserByInterface]','getUserByName','[utils][getUserByName]\x20name:%s\x20%s','notfound','[utils][getUserByName]','getVoiceQueueByName','name','acwTimeout','[utils][getVoiceQueueByName]\x20name:%s','[utils][getVoiceQueueByName]\x20name:%s\x20%s','addTime','seconds','format','YYYY-MM-DD\x20HH:mm:ss','subtract','sumTime','now','isAfter','bluebird','jayson/promise','info','inspect','debug','error','request','then','[utils][request]\x20name:%s','GetUser','internal','interface','[utils][getUser]\x20where:%s','stringify','result'];(function(_0x202834,_0x222d6a){var _0x47b15e=function(_0x43a82a){while(--_0x43a82a){_0x202834['push'](_0x202834['shift']());}};_0x47b15e(++_0x222d6a);}(_0x15b8,0x69));var _0x815b=function(_0x3ab51d,_0x2fa01d){_0x3ab51d=_0x3ab51d-0x0;var _0x29a04e=_0x15b8[_0x3ab51d];return _0x29a04e;};'use strict';var BPromise=require(_0x815b('0x0'));var jayson=require(_0x815b('0x1'));var moment=require('moment');var util=require('util');var client=jayson['client']['http']({'port':0x2329});var logger=require('../../config/logger')('xdr');exports[_0x815b('0x2')]=function(_0x113200,_0x4746e7){logger[_0x815b('0x2')](_0x113200,_0x4746e7?util[_0x815b('0x3')](_0x4746e7,{'showHidden':![],'depth':null}):'');};exports[_0x815b('0x4')]=function(_0x3e212d,_0x49fead){logger[_0x815b('0x4')](_0x3e212d,_0x49fead?util['inspect'](_0x49fead,{'showHidden':![],'depth':null}):'');};exports['error']=function(_0xa31e16,_0x173b09){logger[_0x815b('0x5')](_0xa31e16,_0x173b09?util[_0x815b('0x3')](_0x173b09,{'showHidden':![],'depth':null}):'');};exports['request']=function(_0x1fc88c,_0x35fe61){return client[_0x815b('0x6')](_0x1fc88c,{'body':_0x35fe61})[_0x815b('0x7')](function(_0x4b3aa0){logger[_0x815b('0x4')](_0x815b('0x8'),_0x1fc88c,_0x4b3aa0?util[_0x815b('0x3')](_0x4b3aa0,{'showHidden':![],'depth':null}):'');})['catch'](function(_0x51e9d9){logger[_0x815b('0x5')](_0x815b('0x8'),_0x1fc88c,_0x51e9d9?util['inspect'](_0x51e9d9,{'showHidden':![],'depth':null}):'');});};function getUser(_0x4a9f32){return client[_0x815b('0x6')](_0x815b('0x9'),{'options':{'raw':!![],'attributes':['id',_0x815b('0xa'),'name',_0x815b('0xb')],'where':_0x4a9f32,'limit':0x1}})[_0x815b('0x7')](function(_0x1e794a){logger[_0x815b('0x4')](_0x815b('0xc'),JSON[_0x815b('0xd')](_0x4a9f32),_0x1e794a?util[_0x815b('0x3')](_0x1e794a,{'showHidden':![],'depth':null}):'');return _0x1e794a[_0x815b('0xe')][_0x815b('0xf')]?_0x1e794a['result'][0x0]:null;});}exports[_0x815b('0x10')]=function(_0x95cbd1){return new BPromise(function(_0xf0b9d9,_0x1bf564){if(_0x95cbd1){return getUser({'internal':_0x95cbd1})[_0x815b('0x7')](function(_0x5055ef){logger[_0x815b('0x2')](_0x815b('0x11'),_0x95cbd1,_0x5055ef?_0x815b('0x12'):'notfound');return _0xf0b9d9(_0x5055ef);})['catch'](function(_0x59511e){logger[_0x815b('0x5')](_0x815b('0x13'),_0x59511e?util[_0x815b('0x3')](_0x59511e,{'showHidden':![],'depth':null}):'');return _0xf0b9d9(null);});}return _0xf0b9d9(null);});};exports['getUserByInterface']=function(_0x5eecfc){return new BPromise(function(_0x773928,_0x237df9){if(_0x5eecfc){return getUser({'interface':_0x5eecfc})[_0x815b('0x7')](function(_0x5bd601){logger['info'](_0x815b('0x14'),_0x5eecfc,_0x5bd601?_0x815b('0x12'):'notfound');return _0x773928(_0x5bd601);})[_0x815b('0x15')](function(_0x456240){logger['error'](_0x815b('0x16'),_0x456240?util[_0x815b('0x3')](_0x456240,{'showHidden':![],'depth':null}):'');return _0x773928(null);});}return _0x773928(null);});};exports[_0x815b('0x17')]=function(_0x4dab59){return new BPromise(function(_0x106220,_0x2cd1b3){if(_0x4dab59){return getUser({'name':_0x4dab59})[_0x815b('0x7')](function(_0x3447a1){logger[_0x815b('0x2')](_0x815b('0x18'),_0x4dab59,_0x3447a1?_0x815b('0x12'):_0x815b('0x19'));return _0x106220(_0x3447a1);})[_0x815b('0x15')](function(_0x23872a){logger['error'](_0x815b('0x1a'),_0x23872a?util[_0x815b('0x3')](_0x23872a,{'showHidden':![],'depth':null}):'');return _0x106220(null);});}return _0x106220(null);});};exports[_0x815b('0x1b')]=function(_0xefca82){return new BPromise(function(_0x709d22,_0xd9c185){if(_0xefca82){return client[_0x815b('0x6')]('GetVoiceQueue',{'options':{'raw':!![],'attributes':['id',_0x815b('0x1c'),'type','acw',_0x815b('0x1d')],'where':{'name':_0xefca82},'limit':0x1}})[_0x815b('0x7')](function(_0x3655ae){logger[_0x815b('0x4')](_0x815b('0x1e'),_0xefca82,_0x3655ae?util['inspect'](_0x3655ae,{'showHidden':![],'depth':null}):'');logger[_0x815b('0x2')](_0x815b('0x1f'),_0xefca82,_0x3655ae?'found':_0x815b('0x19'));return _0x709d22(_0x3655ae[_0x815b('0xe')][_0x815b('0xf')]?_0x3655ae[_0x815b('0xe')][0x0]:null);})['catch'](function(_0x2541e4){logger['error']('[utils][getVoiceQueueByName]',_0x2541e4?util[_0x815b('0x3')](_0x2541e4,{'showHidden':![],'depth':null}):'');return _0x709d22(null);});}return _0x709d22(null);});};exports[_0x815b('0x20')]=function(_0x58fd47,_0x25931b){return moment(_0x58fd47)['add'](_0x25931b,_0x815b('0x21'))[_0x815b('0x22')](_0x815b('0x23'));};exports['subtractTime']=function(_0x5a3811,_0x456804){return moment(_0x5a3811)[_0x815b('0x24')](_0x456804,'seconds')[_0x815b('0x22')]('YYYY-MM-DD\x20HH:mm:ss');};exports['diffTime']=function(_0x2be07f,_0x2d0389){return moment(_0x2be07f)['diff'](moment(_0x2d0389),_0x815b('0x21'));};exports[_0x815b('0x25')]=function(_0x2cad6b,_0x532511){return parseInt(_0x2cad6b,0xa)+parseInt(_0x532511,0xa);};exports[_0x815b('0x26')]=function(){return moment()['format']('YYYY-MM-DD\x20HH:mm:ss');};exports[_0x815b('0x27')]=function(_0x49bb43,_0x10db31){if(_0x10db31){return moment(_0x49bb43)[_0x815b('0x27')](_0x10db31);}return!![];};exports['isBefore']=function(_0x12aa75,_0x2f8afb){if(_0x2f8afb){return moment(_0x12aa75)['isBefore'](_0x2f8afb);}else if(_0x12aa75){return!![];}return![];}; \ No newline at end of file +var _0x36ee=['info','inspect','debug','error','request','catch','[utils][request]\x20name:%s','internal','name','interface','then','[utils][getUser]\x20where:%s','stringify','result','[utils][getUserByInternal]\x20internal:%s\x20%s','found','notfound','[utils][getUserByInternal]','getUserByInterface','[utils][getUserByInterface]\x20interface:%s\x20%s','getUserByName','[utils][getUserByName]\x20name:%s\x20%s','[utils][getUserByName]','getVoiceQueueByName','GetVoiceQueue','type','acw','acwTimeout','[utils][getVoiceQueueByName]\x20name:%s','[utils][getVoiceQueueByName]\x20name:%s\x20%s','length','[utils][getVoiceQueueByName]','add','seconds','format','subtractTime','subtract','YYYY-MM-DD\x20HH:mm:ss','diffTime','diff','sumTime','now','isAfter','isBefore','bluebird','jayson/promise','client','../../config/logger','xdr'];(function(_0x4de7f2,_0x4cbd48){var _0x329311=function(_0xb769ff){while(--_0xb769ff){_0x4de7f2['push'](_0x4de7f2['shift']());}};_0x329311(++_0x4cbd48);}(_0x36ee,0xbf));var _0xe36e=function(_0x5b644e,_0x2e5e07){_0x5b644e=_0x5b644e-0x0;var _0x49c6bf=_0x36ee[_0x5b644e];return _0x49c6bf;};'use strict';var BPromise=require(_0xe36e('0x0'));var jayson=require(_0xe36e('0x1'));var moment=require('moment');var util=require('util');var client=jayson[_0xe36e('0x2')]['http']({'port':0x2329});var logger=require(_0xe36e('0x3'))(_0xe36e('0x4'));exports['info']=function(_0x26aa69,_0x54f00b){logger[_0xe36e('0x5')](_0x26aa69,_0x54f00b?util[_0xe36e('0x6')](_0x54f00b,{'showHidden':![],'depth':null}):'');};exports[_0xe36e('0x7')]=function(_0x594996,_0x35a80f){logger[_0xe36e('0x7')](_0x594996,_0x35a80f?util['inspect'](_0x35a80f,{'showHidden':![],'depth':null}):'');};exports[_0xe36e('0x8')]=function(_0x4c20b3,_0x1e0f9f){logger['error'](_0x4c20b3,_0x1e0f9f?util[_0xe36e('0x6')](_0x1e0f9f,{'showHidden':![],'depth':null}):'');};exports[_0xe36e('0x9')]=function(_0x11ba28,_0x116c07){return client[_0xe36e('0x9')](_0x11ba28,{'body':_0x116c07})['then'](function(_0x277a04){logger[_0xe36e('0x7')]('[utils][request]\x20name:%s',_0x11ba28,_0x277a04?util[_0xe36e('0x6')](_0x277a04,{'showHidden':![],'depth':null}):'');})[_0xe36e('0xa')](function(_0x3b523a){logger['error'](_0xe36e('0xb'),_0x11ba28,_0x3b523a?util[_0xe36e('0x6')](_0x3b523a,{'showHidden':![],'depth':null}):'');});};function getUser(_0x660d50){return client[_0xe36e('0x9')]('GetUser',{'options':{'raw':!![],'attributes':['id',_0xe36e('0xc'),_0xe36e('0xd'),_0xe36e('0xe')],'where':_0x660d50,'limit':0x1}})[_0xe36e('0xf')](function(_0x37f147){logger[_0xe36e('0x7')](_0xe36e('0x10'),JSON[_0xe36e('0x11')](_0x660d50),_0x37f147?util[_0xe36e('0x6')](_0x37f147,{'showHidden':![],'depth':null}):'');return _0x37f147[_0xe36e('0x12')]['length']?_0x37f147[_0xe36e('0x12')][0x0]:null;});}exports['getUserByInternal']=function(_0x15e5c2){return new BPromise(function(_0x289763,_0x1b66a4){if(_0x15e5c2){return getUser({'internal':_0x15e5c2})[_0xe36e('0xf')](function(_0x4fbc19){logger[_0xe36e('0x5')](_0xe36e('0x13'),_0x15e5c2,_0x4fbc19?_0xe36e('0x14'):_0xe36e('0x15'));return _0x289763(_0x4fbc19);})[_0xe36e('0xa')](function(_0x4ca9dc){logger[_0xe36e('0x8')](_0xe36e('0x16'),_0x4ca9dc?util[_0xe36e('0x6')](_0x4ca9dc,{'showHidden':![],'depth':null}):'');return _0x289763(null);});}return _0x289763(null);});};exports[_0xe36e('0x17')]=function(_0xfbfd80){return new BPromise(function(_0x3ffe32,_0x28e0e4){if(_0xfbfd80){return getUser({'interface':_0xfbfd80})[_0xe36e('0xf')](function(_0x5b5a6c){logger[_0xe36e('0x5')](_0xe36e('0x18'),_0xfbfd80,_0x5b5a6c?_0xe36e('0x14'):_0xe36e('0x15'));return _0x3ffe32(_0x5b5a6c);})[_0xe36e('0xa')](function(_0x2a08bd){logger[_0xe36e('0x8')]('[utils][getUserByInterface]',_0x2a08bd?util[_0xe36e('0x6')](_0x2a08bd,{'showHidden':![],'depth':null}):'');return _0x3ffe32(null);});}return _0x3ffe32(null);});};exports[_0xe36e('0x19')]=function(_0x106871){return new BPromise(function(_0x2bde80,_0x46f50e){if(_0x106871){return getUser({'name':_0x106871})['then'](function(_0x29e5b6){logger[_0xe36e('0x5')](_0xe36e('0x1a'),_0x106871,_0x29e5b6?'found':'notfound');return _0x2bde80(_0x29e5b6);})['catch'](function(_0x61ec2f){logger[_0xe36e('0x8')](_0xe36e('0x1b'),_0x61ec2f?util[_0xe36e('0x6')](_0x61ec2f,{'showHidden':![],'depth':null}):'');return _0x2bde80(null);});}return _0x2bde80(null);});};exports[_0xe36e('0x1c')]=function(_0x4f67bc){return new BPromise(function(_0x4db0bf,_0x410560){if(_0x4f67bc){return client[_0xe36e('0x9')](_0xe36e('0x1d'),{'options':{'raw':!![],'attributes':['id','name',_0xe36e('0x1e'),_0xe36e('0x1f'),_0xe36e('0x20')],'where':{'name':_0x4f67bc},'limit':0x1}})[_0xe36e('0xf')](function(_0x1aa332){logger['debug'](_0xe36e('0x21'),_0x4f67bc,_0x1aa332?util[_0xe36e('0x6')](_0x1aa332,{'showHidden':![],'depth':null}):'');logger['info'](_0xe36e('0x22'),_0x4f67bc,_0x1aa332?_0xe36e('0x14'):_0xe36e('0x15'));return _0x4db0bf(_0x1aa332['result'][_0xe36e('0x23')]?_0x1aa332[_0xe36e('0x12')][0x0]:null);})[_0xe36e('0xa')](function(_0x527a92){logger['error'](_0xe36e('0x24'),_0x527a92?util['inspect'](_0x527a92,{'showHidden':![],'depth':null}):'');return _0x4db0bf(null);});}return _0x4db0bf(null);});};exports['addTime']=function(_0x9ce658,_0x2a7760){return moment(_0x9ce658)[_0xe36e('0x25')](_0x2a7760,_0xe36e('0x26'))[_0xe36e('0x27')]('YYYY-MM-DD\x20HH:mm:ss');};exports[_0xe36e('0x28')]=function(_0x4a0a04,_0x386b80){return moment(_0x4a0a04)[_0xe36e('0x29')](_0x386b80,_0xe36e('0x26'))[_0xe36e('0x27')](_0xe36e('0x2a'));};exports[_0xe36e('0x2b')]=function(_0x3d8ce6,_0x7360e2){return moment(_0x3d8ce6)[_0xe36e('0x2c')](moment(_0x7360e2),'seconds');};exports[_0xe36e('0x2d')]=function(_0x38db12,_0x5ead27){return parseInt(_0x38db12,0xa)+parseInt(_0x5ead27,0xa);};exports[_0xe36e('0x2e')]=function(){return moment()[_0xe36e('0x27')](_0xe36e('0x2a'));};exports[_0xe36e('0x2f')]=function(_0x31a06f,_0x36af9f){if(_0x36af9f){return moment(_0x31a06f)[_0xe36e('0x2f')](_0x36af9f);}return!![];};exports[_0xe36e('0x30')]=function(_0x4dc3a2,_0x5c6be1){if(_0x5c6be1){return moment(_0x4dc3a2)['isBefore'](_0x5c6be1);}else if(_0x4dc3a2){return!![];}return![];}; \ No newline at end of file -- 1.7.1